diff --git a/.scrutinizer.yml b/.scrutinizer.yml index e2ae05a96c..b13a233d7a 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -5,4 +5,4 @@ imports: # FIXME: find a way to keep excluded_paths list sorted filter: - excluded_paths: [ html/js/*, includes/phpmailer/*, html/css/*, includes/console_colour.php, includes/console_table.php, html/lib/*, lib/* ] + excluded_paths: [ html/js/*, html/css/*, lib/*, vendor/* ] diff --git a/LibreNMS/ClassLoader.php b/LibreNMS/ClassLoader.php deleted file mode 100644 index 3c9fb0afe1..0000000000 --- a/LibreNMS/ClassLoader.php +++ /dev/null @@ -1,188 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -namespace LibreNMS; - -/** - * Class ClassLoader - * @package LibreNMS - */ -class ClassLoader -{ - /** - * @var array stores dynamically added class > file mappings ($classMap[fullclass] = $file) - */ - private $classMap; - - /** - * @var array stores dynamically added namespace > directory mappings ($dirMap[namespace][$dir] =1) - */ - private $dirMap; - - /** - * ClassLoader constructor. - */ - public function __construct() - { - $this->classMap = array(); - $this->dirMap = array(); - } - - /** - * Loads classes conforming to the PSR-0 specificaton - * - * @param string $name Class name to load - */ - public static function psrLoad($name) - { - global $vdebug; - - $file = str_replace(array('\\', '_'), DIRECTORY_SEPARATOR, $name) . '.php'; - $fullFile = realpath(__DIR__ . '/..') . DIRECTORY_SEPARATOR . $file; - - if ($vdebug) { - echo __CLASS__ . " [[ $name > $fullFile ]]\n"; - } - - if (is_readable($fullFile)) { - include $fullFile; - } - } - - /** - * Loads classes defined by mapClass() - * - * @param string $name Class name to load - */ - public function customLoad($name) - { - global $vdebug; - - if (isset($this->classMap[$name])) { - $file = $this->classMap[$name]; - - if ($vdebug) { - echo __CLASS__ . " (( $name > $file ))\n"; - } - - if (is_readable($file)) { - include $file; - return; - } - } - - list($namespace, $class) = $this->splitNamespace($name); - if (isset($this->dirMap[$namespace])) { - foreach (array_keys($this->dirMap[$namespace]) as $dir) { - $file = $dir . DIRECTORY_SEPARATOR . $class . '.php'; - - if ($vdebug) { - echo __CLASS__ . " (( $name > $file ))\n"; - } - - if (is_readable($file)) { - include $file; - return; - } - } - } - } - - /** - * Register a custom class > file mapping - * - * @param string $class The full class name - * @param string $file The path to the file containing the class, full path is preferred - */ - public function registerClass($class, $file) - { - $this->classMap[$class] = $file; - } - - /** - * Unregister a class from the list of class > file mappings - * - * @param string $class The full class name - */ - public function unregisterClass($class) - { - unset($this->classMap[$class]); - } - - /** - * Register a directory to search for classes in. - * If a namespace is specified, it will search for - * classes with that exact namespace in those directories. - * - * @param string $dir directory containing classes with filename = class.php - * @param string $namespace the namespace of the classes - */ - public function registerDir($dir, $namespace = '') - { - $this->dirMap[$namespace][$dir] = 1; - } - - /** - * Unregister a directory - * - * @param string $dir the directory to remove - * @param string $namespace the namespace of the classes - */ - public function unregisterDir($dir, $namespace = '') - { - unset($this->dirMap[$namespace][$dir]); - } - - /** - * Register this autoloader - * Custom mappings will take precedence over PSR-0 - */ - public function register() - { - spl_autoload_register(array($this, 'customLoad')); - spl_autoload_register(__NAMESPACE__.'\ClassLoader::psrLoad'); - } - - /** - * Unregister this autoloader - */ - public function unregister() - { - spl_autoload_unregister(array($this, 'customLoad')); - spl_autoload_unregister(__NAMESPACE__.'\ClassLoader::psrLoad'); - } - - /** - * Split a class into namspace/classname - * @param string $class the full class name to split - * @return array of the split class [namespace, classname] - */ - private function splitNamespace($class) - { - $parts = explode('\\', $class); - $last = array_pop($parts); - return array(implode('\\', $parts), $last); - } -} diff --git a/LibreNMS/ComposerHelper.php b/LibreNMS/ComposerHelper.php new file mode 100644 index 0000000000..78a27d910a --- /dev/null +++ b/LibreNMS/ComposerHelper.php @@ -0,0 +1,79 @@ +. + * + * @package LibreNMS + * @link http://librenms.org + * @copyright 2016 Tony Murray + * @author Tony Murray + */ + +namespace LibreNMS; + +use Composer\Script\Event; +use Composer\Installer\PackageEvent; + +class ComposerHelper +{ + public static function preUpdate(Event $event) + { + if (!$event->isDevMode()) { + $vendor_dir = $event->getComposer()->getConfig()->get('vendor-dir'); + + $cmds = array( + "git checkout $vendor_dir", + "git clean -x -d -f $vendor_dir" + ); + + self::exec($cmds); + } + } + + public static function postAutoloadDump(Event $event) + { + $vendor_dir = $event->getComposer()->getConfig()->get('vendor-dir'); + + $no = $event->isDevMode() ? '' : 'no-'; + $cmd = "git ls-files -z $vendor_dir | xargs -0 git update-index --{$no}assume-unchanged"; + + self::exec($cmd); + } + + public static function commit(Event $event) + { + $vendor_dir = $event->getComposer()->getConfig()->get('vendor-dir'); + $composer_json_path = $event->getComposer()->getConfig()->getConfigSource()->getName(); + $cmds = array( + "git add -f $vendor_dir $composer_json_path", + "git commit" + ); + + self::exec($cmds); + } + + /** + * Run a command or array of commands and echo the command and output + * + * @param string|array $cmds + */ + private static function exec($cmds) + { + $cmd = "set -v\n" . implode(PHP_EOL, (array)$cmds); + passthru($cmd); + } +} diff --git a/composer.json b/composer.json index 20154903b6..fcf5918d9d 100644 --- a/composer.json +++ b/composer.json @@ -1,9 +1,51 @@ { + "name": "librenms/librenms", + "description": "A fully featured network monitoring system that provides a wealth of features and device support.", + "type": "project", + "keywords": ["network", "monitoring", "snmp", "laravel"], + "homepage": "http://www.librenms.org/", + "license": "GPL-3.0", + "support": { + "source": "https://github.com/librenms/librenms/", + "docs": "http://docs.librenms.org/", + "forum": "https://community.librenms.org/", + "issues": "https://github.com/librenms/librenms/issues/", + "irc": "irc://irc.freenode.org/#librenms" + }, + "config": { + "platform": {"php": "5.3.9"} + }, + "require": { + "php": ">=5.3.9", + "ezyang/htmlpurifier": "^4.8", + "phpmailer/phpmailer": "^5.2.21", + "slim/slim": "^2.6", + "easybook/geshi": "^1.0.8", + "amenadiel/jpgraph": "^3.6", + "tecnickcom/tcpdf": "~6.2.0", + "xjtuwangke/passwordhash": "dev-master", + "pear/console_color2": "^0.1", + "pear/console_table": "^1.3", + "dapphp/radius": "^2.0", + "php-amqplib/php-amqplib": "^2.0", + "symfony/yaml": "^2.8" + }, "require-dev": { "squizlabs/php_codesniffer": "2.6.*", "phpunit/phpunit": "4.*", "jakub-onderka/php-parallel-lint": "*", "jakub-onderka/php-console-highlighter": "*", "fojuth/readmegen": "1.*" + }, + "autoload": { + "psr-4": { + "LibreNMS\\": "LibreNMS", + "LibreNMS\\Tests\\": "tests" + } + }, + "scripts": { + "pre-update-cmd": "LibreNMS\\ComposerHelper::preUpdate", + "post-autoload-dump": "LibreNMS\\ComposerHelper::postAutoloadDump", + "commit": "LibreNMS\\ComposerHelper::commit" } } diff --git a/doc/General/Contributing.md b/doc/General/Contributing.md index 7268c2c42d..f079f6f629 100644 --- a/doc/General/Contributing.md +++ b/doc/General/Contributing.md @@ -119,10 +119,18 @@ be sure to note this as a comment in the code (preferably) or the commit message. Accurate attribution is crucial to our success as a Free Software project. -- To incorporate larger blocks of code from third parties (e.g. JavaScript - libraries): - - Include its name, source URL, copyright notice, and license in - doc/General/Credits.md +- For any dependency + - Include its name, source URL, copyright notice, and license in doc/General/Credits.md + +- To add a php dependency, please use composer + - Add the dependency `composer require --update-no-dev -o slim/slim` + - Add the files and commit `composer commit` or `git add -f vendor/ composer.json; git commit` + + - Updating php dependencies + - Update dependencies `composer update --no-dev -o` + - Add the files and commit `composer commit` or `git add -f vendor/; git commit` + +- To add a javascript or other dependency - Where possible please include libraries in the lib/ folder. - Add it in a separate commit into its own directory, using git subtree if it is available via git: @@ -131,9 +139,7 @@ project. ```ssh git subtree add --squash --prefix=lib/jquery-bootgrid https://github.com/rstaib/jquery-bootgrid.git master ``` - - Add the code to integrate it in a separate commit. Include: - - code to update it in Makefile - - Scrutinizer exclusions to .scrutinizer.yml (not needed if added to lib/ folder). + - Add the code to integrate it in a separate commit. - symlinks where necessary to maintain sensible paths - Don't submit code whose license conflicts with the GPLv3. If you're not @@ -155,7 +161,7 @@ project. Please note that the above is necessary even if you don't care about keeping the copyright to your code, because otherwise we could be accused - of misappropriating Obserivum's code. As the code bases develop, we + of misappropriating Observium's code. As the code bases develop, we expect them to diverge, which means this will become less of an issue anyway. diff --git a/html/api_v0.php b/html/api_v0.php index abcc7928c1..0c4b43f70e 100644 --- a/html/api_v0.php +++ b/html/api_v0.php @@ -15,8 +15,6 @@ $init_modules = array('web', 'alerts'); require realpath(__DIR__ . '/..') . '/includes/init.php'; -require $config['install_dir'] . '/html/lib/Slim/Slim.php'; -\Slim\Slim::registerAutoloader(); $app = new \Slim\Slim(); require $config['install_dir'] . '/html/includes/api_functions.inc.php'; $app->setName('api'); diff --git a/html/bandwidth-graph.php b/html/bandwidth-graph.php index 058ef8daff..5af73f3b4a 100644 --- a/html/bandwidth-graph.php +++ b/html/bandwidth-graph.php @@ -1,5 +1,4 @@ SetColor('darkblue'); $lineplot_out->SetFillColor('lightblue@0.4'); $lineplot_out->SetWeight(1); -if ($_GET['95th']) { +if (isset($_GET['95th'])) { $lineplot_95th = new LinePlot($per_data, $ticks); $lineplot_95th->SetColor('red'); } -if ($_GET['ave']) { +if (isset($_GET['ave'])) { $lineplot_ave = new LinePlot($ave_data, $ticks); $lineplot_ave->SetColor('red'); } @@ -250,11 +246,11 @@ $graph->Add($lineplot); $graph->Add($lineplot_in); $graph->Add($lineplot_out); -if ($_GET['95th']) { +if (isset($_GET['95th'])) { $graph->Add($lineplot_95th); } -if ($_GET['ave']) { +if (isset($_GET['ave'])) { $graph->Add($lineplot_ave); } diff --git a/html/includes/authenticate.inc.php b/html/includes/authenticate.inc.php index e3a5db395f..6a412e5418 100644 --- a/html/includes/authenticate.inc.php +++ b/html/includes/authenticate.inc.php @@ -1,5 +1,7 @@ in 2004-2006 and placed in -# the public domain. Revised in subsequent years, still public domain. -# -# There's absolutely no warranty. -# -# The homepage URL for this framework is: -# -# http://www.openwall.com/phpass/ -# -# Please be sure to update the Version line if you edit this file in any way. -# It is suggested that you leave the main version number intact, but indicate -# your project name (after the slash) and add your own revision information. -# -# Please do not change the "private" password hashing method implemented in -# here, thereby making your hashes incompatible. However, if you must, please -# change the hash type identifier (the "$P$") to something different. -# -# Obviously, since this code is in the public domain, the above are not -# requirements (there can be none), but merely suggestions. -# -class PasswordHash { - var $itoa64; - var $iteration_count_log2; - var $portable_hashes; - var $random_state; - - function __construct($iteration_count_log2, $portable_hashes) - { - $this->itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; - - if ($iteration_count_log2 < 4 || $iteration_count_log2 > 31) - $iteration_count_log2 = 8; - $this->iteration_count_log2 = $iteration_count_log2; - - $this->portable_hashes = $portable_hashes; - - $this->random_state = microtime(); - if (function_exists('getmypid')) - $this->random_state .= getmypid(); - } - - function get_random_bytes($count) - { - $output = openssl_random_pseudo_bytes($count,$strong); - - if(empty($output)) - { - if (is_readable('/dev/urandom') && - ($fh = @fopen('/dev/urandom', 'rb'))) - { - $output = fread($fh, $count); - fclose($fh); - } - } - - if (strlen($output) < $count) { - $output = ''; - for ($i = 0; $i < $count; $i += 16) { - $this->random_state = - md5(microtime() . $this->random_state); - $output .= - pack('H*', md5($this->random_state)); - } - $output = substr($output, 0, $count); - } - - return $output; - } - - function encode64($input, $count) - { - $output = ''; - $i = 0; - do { - $value = ord($input[$i++]); - $output .= $this->itoa64[$value & 0x3f]; - if ($i < $count) - $value |= ord($input[$i]) << 8; - $output .= $this->itoa64[($value >> 6) & 0x3f]; - if ($i++ >= $count) - break; - if ($i < $count) - $value |= ord($input[$i]) << 16; - $output .= $this->itoa64[($value >> 12) & 0x3f]; - if ($i++ >= $count) - break; - $output .= $this->itoa64[($value >> 18) & 0x3f]; - } while ($i < $count); - - return $output; - } - - function gensalt_private($input) - { - $output = '$P$'; - $output .= $this->itoa64[min($this->iteration_count_log2 + - ((PHP_VERSION >= '5') ? 5 : 3), 30)]; - $output .= $this->encode64($input, 6); - - return $output; - } - - function crypt_private($password, $setting) - { - $output = '*0'; - if (substr($setting, 0, 2) == $output) - $output = '*1'; - - $id = substr($setting, 0, 3); - # We use "$P$", phpBB3 uses "$H$" for the same thing - if ($id != '$P$' && $id != '$H$') - return $output; - - $count_log2 = strpos($this->itoa64, $setting[3]); - if ($count_log2 < 7 || $count_log2 > 30) - return $output; - - $count = 1 << $count_log2; - - $salt = substr($setting, 4, 8); - if (strlen($salt) != 8) - return $output; - - # We're kind of forced to use MD5 here since it's the only - # cryptographic primitive available in all versions of PHP - # currently in use. To implement our own low-level crypto - # in PHP would result in much worse performance and - # consequently in lower iteration counts and hashes that are - # quicker to crack (by non-PHP code). - if (PHP_VERSION >= '5') { - $hash = md5($salt . $password, TRUE); - do { - $hash = md5($hash . $password, TRUE); - } while (--$count); - } else { - $hash = pack('H*', md5($salt . $password)); - do { - $hash = pack('H*', md5($hash . $password)); - } while (--$count); - } - - $output = substr($setting, 0, 12); - $output .= $this->encode64($hash, 16); - - return $output; - } - - function gensalt_extended($input) - { - $count_log2 = min($this->iteration_count_log2 + 8, 24); - # This should be odd to not reveal weak DES keys, and the - # maximum valid value is (2**24 - 1) which is odd anyway. - $count = (1 << $count_log2) - 1; - - $output = '_'; - $output .= $this->itoa64[$count & 0x3f]; - $output .= $this->itoa64[($count >> 6) & 0x3f]; - $output .= $this->itoa64[($count >> 12) & 0x3f]; - $output .= $this->itoa64[($count >> 18) & 0x3f]; - - $output .= $this->encode64($input, 3); - - return $output; - } - - function gensalt_blowfish($input) - { - # This one needs to use a different order of characters and a - # different encoding scheme from the one in encode64() above. - # We care because the last character in our encoded string will - # only represent 2 bits. While two known implementations of - # bcrypt will happily accept and correct a salt string which - # has the 4 unused bits set to non-zero, we do not want to take - # chances and we also do not want to waste an additional byte - # of entropy. - $itoa64 = './ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; - - $output = '$2a$'; - $output .= chr(ord('0') + $this->iteration_count_log2 / 10); - $output .= chr(ord('0') + $this->iteration_count_log2 % 10); - $output .= '$'; - - $i = 0; - do { - $c1 = ord($input[$i++]); - $output .= $itoa64[$c1 >> 2]; - $c1 = ($c1 & 0x03) << 4; - if ($i >= 16) { - $output .= $itoa64[$c1]; - break; - } - - $c2 = ord($input[$i++]); - $c1 |= $c2 >> 4; - $output .= $itoa64[$c1]; - $c1 = ($c2 & 0x0f) << 2; - - $c2 = ord($input[$i++]); - $c1 |= $c2 >> 6; - $output .= $itoa64[$c1]; - $output .= $itoa64[$c2 & 0x3f]; - } while (1); - - return $output; - } - - function HashPassword($password) - { - $random = ''; - - if (CRYPT_BLOWFISH == 1 && !$this->portable_hashes) { - $random = $this->get_random_bytes(16); - $hash = - crypt($password, $this->gensalt_blowfish($random)); - if (strlen($hash) == 60) - return $hash; - } - - if (CRYPT_EXT_DES == 1 && !$this->portable_hashes) { - if (strlen($random) < 3) - $random = $this->get_random_bytes(3); - $hash = - crypt($password, $this->gensalt_extended($random)); - if (strlen($hash) == 20) - return $hash; - } - - if (strlen($random) < 6) - $random = $this->get_random_bytes(6); - $hash = - $this->crypt_private($password, - $this->gensalt_private($random)); - if (strlen($hash) == 34) - return $hash; - - # Returning '*' on error is safe here, but would _not_ be safe - # in a crypt(3)-like function used _both_ for generating new - # hashes and for validating passwords against existing hashes. - return '*'; - } - - function CheckPassword($password, $stored_hash) - { - $hash = $this->crypt_private($password, $stored_hash); - if ($hash[0] == '*') - $hash = crypt($password, $stored_hash); - - return $hash == $stored_hash; - } -} - -?> diff --git a/html/lib/Slim/Environment.php b/html/lib/Slim/Environment.php deleted file mode 100644 index a15e1e4ba8..0000000000 --- a/html/lib/Slim/Environment.php +++ /dev/null @@ -1,224 +0,0 @@ - - * @copyright 2011 Josh Lockhart - * @link http://www.slimframework.com - * @license http://www.slimframework.com/license - * @version 2.4.2 - * @package Slim - * - * MIT LICENSE - * - * 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 Slim; - -/** - * Environment - * - * This class creates and returns a key/value array of common - * environment variables for the current HTTP request. - * - * This is a singleton class; derived environment variables will - * be common across multiple Slim applications. - * - * This class matches the Rack (Ruby) specification as closely - * as possible. More information available below. - * - * @package Slim - * @author Josh Lockhart - * @since 1.6.0 - */ -class Environment implements \ArrayAccess, \IteratorAggregate -{ - /** - * @var array - */ - protected $properties; - - /** - * @var \Slim\Environment - */ - protected static $environment; - - /** - * Get environment instance (singleton) - * - * This creates and/or returns an environment instance (singleton) - * derived from $_SERVER variables. You may override the global server - * variables by using `\Slim\Environment::mock()` instead. - * - * @param bool $refresh Refresh properties using global server variables? - * @return \Slim\Environment - */ - public static function getInstance($refresh = false) - { - if (is_null(self::$environment) || $refresh) { - self::$environment = new self(); - } - - return self::$environment; - } - - /** - * Get mock environment instance - * - * @param array $userSettings - * @return \Slim\Environment - */ - public static function mock($userSettings = array()) - { - $defaults = array( - 'REQUEST_METHOD' => 'GET', - 'SCRIPT_NAME' => '', - 'PATH_INFO' => '', - 'QUERY_STRING' => '', - 'SERVER_NAME' => 'localhost', - 'SERVER_PORT' => 80, - 'ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', - 'ACCEPT_LANGUAGE' => 'en-US,en;q=0.8', - 'ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.3', - 'USER_AGENT' => 'Slim Framework', - 'REMOTE_ADDR' => '127.0.0.1', - 'slim.url_scheme' => 'http', - 'slim.input' => '', - 'slim.errors' => @fopen('php://stderr', 'w') - ); - self::$environment = new self(array_merge($defaults, $userSettings)); - - return self::$environment; - } - - /** - * Constructor (private access) - * - * @param array|null $settings If present, these are used instead of global server variables - */ - private function __construct($settings = null) - { - if ($settings) { - $this->properties = $settings; - } else { - $env = array(); - - //The HTTP request method - $env['REQUEST_METHOD'] = $_SERVER['REQUEST_METHOD']; - - //The IP - $env['REMOTE_ADDR'] = $_SERVER['REMOTE_ADDR']; - - // Server params - $scriptName = $_SERVER['SCRIPT_NAME']; // <-- "/foo/index.php" - $requestUri = $_SERVER['REQUEST_URI']; // <-- "/foo/bar?test=abc" or "/foo/index.php/bar?test=abc" - $queryString = isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : ''; // <-- "test=abc" or "" - - // Physical path - if (strpos($requestUri, $scriptName) !== false) { - $physicalPath = $scriptName; // <-- Without rewriting - } else { - $physicalPath = str_replace('\\', '', dirname($scriptName)); // <-- With rewriting - } - $env['SCRIPT_NAME'] = rtrim($physicalPath, '/'); // <-- Remove trailing slashes - - // Virtual path - $env['PATH_INFO'] = substr_replace($requestUri, '', 0, strlen($physicalPath)); // <-- Remove physical path - $env['PATH_INFO'] = str_replace('?' . $queryString, '', $env['PATH_INFO']); // <-- Remove query string - $env['PATH_INFO'] = '/' . ltrim($env['PATH_INFO'], '/'); // <-- Ensure leading slash - - // Query string (without leading "?") - $env['QUERY_STRING'] = $queryString; - - //Name of server host that is running the script - $env['SERVER_NAME'] = $_SERVER['SERVER_NAME']; - - //Number of server port that is running the script - $env['SERVER_PORT'] = $_SERVER['SERVER_PORT']; - - //HTTP request headers (retains HTTP_ prefix to match $_SERVER) - $headers = \Slim\Http\Headers::extract($_SERVER); - foreach ($headers as $key => $value) { - $env[$key] = $value; - } - - //Is the application running under HTTPS or HTTP protocol? - $env['slim.url_scheme'] = empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] === 'off' ? 'http' : 'https'; - - //Input stream (readable one time only; not available for multipart/form-data requests) - $rawInput = @file_get_contents('php://input'); - if (!$rawInput) { - $rawInput = ''; - } - $env['slim.input'] = $rawInput; - - //Error stream - $env['slim.errors'] = @fopen('php://stderr', 'w'); - - $this->properties = $env; - } - } - - /** - * Array Access: Offset Exists - */ - public function offsetExists($offset) - { - return isset($this->properties[$offset]); - } - - /** - * Array Access: Offset Get - */ - public function offsetGet($offset) - { - if (isset($this->properties[$offset])) { - return $this->properties[$offset]; - } else { - return null; - } - } - - /** - * Array Access: Offset Set - */ - public function offsetSet($offset, $value) - { - $this->properties[$offset] = $value; - } - - /** - * Array Access: Offset Unset - */ - public function offsetUnset($offset) - { - unset($this->properties[$offset]); - } - - /** - * IteratorAggregate - * - * @return \ArrayIterator - */ - public function getIterator() - { - return new \ArrayIterator($this->properties); - } -} diff --git a/html/lib/Slim/Exception/Pass.php b/html/lib/Slim/Exception/Pass.php deleted file mode 100644 index 99d95c252b..0000000000 --- a/html/lib/Slim/Exception/Pass.php +++ /dev/null @@ -1,49 +0,0 @@ - - * @copyright 2011 Josh Lockhart - * @link http://www.slimframework.com - * @license http://www.slimframework.com/license - * @version 2.4.2 - * @package Slim - * - * MIT LICENSE - * - * 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 Slim\Exception; - -/** - * Pass Exception - * - * This Exception will cause the Router::dispatch method - * to skip the current matching route and continue to the next - * matching route. If no subsequent routes are found, a - * HTTP 404 Not Found response will be sent to the client. - * - * @package Slim - * @author Josh Lockhart - * @since 1.0.0 - */ -class Pass extends \Exception -{ -} diff --git a/html/lib/Slim/Exception/Stop.php b/html/lib/Slim/Exception/Stop.php deleted file mode 100644 index a2518515d7..0000000000 --- a/html/lib/Slim/Exception/Stop.php +++ /dev/null @@ -1,47 +0,0 @@ - - * @copyright 2011 Josh Lockhart - * @link http://www.slimframework.com - * @license http://www.slimframework.com/license - * @version 2.4.2 - * @package Slim - * - * MIT LICENSE - * - * 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 Slim\Exception; - -/** - * Stop Exception - * - * This Exception is thrown when the Slim application needs to abort - * processing and return control flow to the outer PHP script. - * - * @package Slim - * @author Josh Lockhart - * @since 1.0.0 - */ -class Stop extends \Exception -{ -} diff --git a/html/lib/Slim/Helper/Set.php b/html/lib/Slim/Helper/Set.php deleted file mode 100644 index 9538b6942a..0000000000 --- a/html/lib/Slim/Helper/Set.php +++ /dev/null @@ -1,246 +0,0 @@ - - * @copyright 2011 Josh Lockhart - * @link http://www.slimframework.com - * @license http://www.slimframework.com/license - * @version 2.4.2 - * @package Slim - * - * MIT LICENSE - * - * 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 Slim\Helper; - -class Set implements \ArrayAccess, \Countable, \IteratorAggregate -{ - /** - * Key-value array of arbitrary data - * @var array - */ - protected $data = array(); - - /** - * Constructor - * @param array $items Pre-populate set with this key-value array - */ - public function __construct($items = array()) - { - $this->replace($items); - } - - /** - * Normalize data key - * - * Used to transform data key into the necessary - * key format for this set. Used in subclasses - * like \Slim\Http\Headers. - * - * @param string $key The data key - * @return mixed The transformed/normalized data key - */ - protected function normalizeKey($key) - { - return $key; - } - - /** - * Set data key to value - * @param string $key The data key - * @param mixed $value The data value - */ - public function set($key, $value) - { - $this->data[$this->normalizeKey($key)] = $value; - } - - /** - * Get data value with key - * @param string $key The data key - * @param mixed $default The value to return if data key does not exist - * @return mixed The data value, or the default value - */ - public function get($key, $default = null) - { - if ($this->has($key)) { - $isInvokable = is_object($this->data[$this->normalizeKey($key)]) && method_exists($this->data[$this->normalizeKey($key)], '__invoke'); - - return $isInvokable ? $this->data[$this->normalizeKey($key)]($this) : $this->data[$this->normalizeKey($key)]; - } - - return $default; - } - - /** - * Add data to set - * @param array $items Key-value array of data to append to this set - */ - public function replace($items) - { - foreach ($items as $key => $value) { - $this->set($key, $value); // Ensure keys are normalized - } - } - - /** - * Fetch set data - * @return array This set's key-value data array - */ - public function all() - { - return $this->data; - } - - /** - * Fetch set data keys - * @return array This set's key-value data array keys - */ - public function keys() - { - return array_keys($this->data); - } - - /** - * Does this set contain a key? - * @param string $key The data key - * @return boolean - */ - public function has($key) - { - return array_key_exists($this->normalizeKey($key), $this->data); - } - - /** - * Remove value with key from this set - * @param string $key The data key - */ - public function remove($key) - { - unset($this->data[$this->normalizeKey($key)]); - } - - /** - * Property Overloading - */ - - public function __get($key) - { - return $this->get($key); - } - - public function __set($key, $value) - { - $this->set($key, $value); - } - - public function __isset($key) - { - return $this->has($key); - } - - public function __unset($key) - { - return $this->remove($key); - } - - /** - * Clear all values - */ - public function clear() - { - $this->data = array(); - } - - /** - * Array Access - */ - - public function offsetExists($offset) - { - return $this->has($offset); - } - - public function offsetGet($offset) - { - return $this->get($offset); - } - - public function offsetSet($offset, $value) - { - $this->set($offset, $value); - } - - public function offsetUnset($offset) - { - $this->remove($offset); - } - - /** - * Countable - */ - - public function count() - { - return count($this->data); - } - - /** - * IteratorAggregate - */ - - public function getIterator() - { - return new \ArrayIterator($this->data); - } - - /** - * Ensure a value or object will remain globally unique - * @param string $key The value or object name - * @param Closure The closure that defines the object - * @return mixed - */ - public function singleton($key, $value) - { - $this->set($key, function ($c) use ($value) { - static $object; - - if (null === $object) { - $object = $value($c); - } - - return $object; - }); - } - - /** - * Protect closure from being directly invoked - * @param Closure $callable A closure to keep from being invoked and evaluated - * @return Closure - */ - public function protect(\Closure $callable) - { - return function () use ($callable) { - return $callable; - }; - } -} diff --git a/html/lib/Slim/Http/Cookies.php b/html/lib/Slim/Http/Cookies.php deleted file mode 100644 index cf13801d7e..0000000000 --- a/html/lib/Slim/Http/Cookies.php +++ /dev/null @@ -1,91 +0,0 @@ - - * @copyright 2011 Josh Lockhart - * @link http://www.slimframework.com - * @license http://www.slimframework.com/license - * @version 2.4.2 - * @package Slim - * - * MIT LICENSE - * - * 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 Slim\Http; - -class Cookies extends \Slim\Helper\Set -{ - /** - * Default cookie settings - * @var array - */ - protected $defaults = array( - 'value' => '', - 'domain' => null, - 'path' => null, - 'expires' => null, - 'secure' => false, - 'httponly' => false - ); - - /** - * Set cookie - * - * The second argument may be a single scalar value, in which case - * it will be merged with the default settings and considered the `value` - * of the merged result. - * - * The second argument may also be an array containing any or all of - * the keys shown in the default settings above. This array will be - * merged with the defaults shown above. - * - * @param string $key Cookie name - * @param mixed $value Cookie settings - */ - public function set($key, $value) - { - if (is_array($value)) { - $cookieSettings = array_replace($this->defaults, $value); - } else { - $cookieSettings = array_replace($this->defaults, array('value' => $value)); - } - parent::set($key, $cookieSettings); - } - - /** - * Remove cookie - * - * Unlike \Slim\Helper\Set, this will actually *set* a cookie with - * an expiration date in the past. This expiration date will force - * the client-side cache to remove its cookie with the given name - * and settings. - * - * @param string $key Cookie name - * @param array $settings Optional cookie settings - */ - public function remove($key, $settings = array()) - { - $settings['value'] = ''; - $settings['expires'] = time() - 86400; - $this->set($key, array_replace($this->defaults, $settings)); - } -} diff --git a/html/lib/Slim/Http/Headers.php b/html/lib/Slim/Http/Headers.php deleted file mode 100644 index 1704b8016d..0000000000 --- a/html/lib/Slim/Http/Headers.php +++ /dev/null @@ -1,104 +0,0 @@ - - * @copyright 2011 Josh Lockhart - * @link http://www.slimframework.com - * @license http://www.slimframework.com/license - * @version 2.4.2 - * @package Slim - * - * MIT LICENSE - * - * 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 Slim\Http; - - /** - * HTTP Headers - * - * @package Slim - * @author Josh Lockhart - * @since 1.6.0 - */ -class Headers extends \Slim\Helper\Set -{ - /******************************************************************************** - * Static interface - *******************************************************************************/ - - /** - * Special-case HTTP headers that are otherwise unidentifiable as HTTP headers. - * Typically, HTTP headers in the $_SERVER array will be prefixed with - * `HTTP_` or `X_`. These are not so we list them here for later reference. - * - * @var array - */ - protected static $special = array( - 'CONTENT_TYPE', - 'CONTENT_LENGTH', - 'PHP_AUTH_USER', - 'PHP_AUTH_PW', - 'PHP_AUTH_DIGEST', - 'AUTH_TYPE' - ); - - /** - * Extract HTTP headers from an array of data (e.g. $_SERVER) - * @param array $data - * @return array - */ - public static function extract($data) - { - $results = array(); - foreach ($data as $key => $value) { - $key = strtoupper($key); - if (strpos($key, 'X_') === 0 || strpos($key, 'HTTP_') === 0 || in_array($key, static::$special)) { - if ($key === 'HTTP_CONTENT_LENGTH') { - continue; - } - $results[$key] = $value; - } - } - - return $results; - } - - /******************************************************************************** - * Instance interface - *******************************************************************************/ - - /** - * Transform header name into canonical form - * @param string $key - * @return string - */ - protected function normalizeKey($key) - { - $key = strtolower($key); - $key = str_replace(array('-', '_'), ' ', $key); - $key = preg_replace('#^http #', '', $key); - $key = ucwords($key); - $key = str_replace(' ', '-', $key); - - return $key; - } -} diff --git a/html/lib/Slim/Http/Request.php b/html/lib/Slim/Http/Request.php deleted file mode 100644 index 735484b017..0000000000 --- a/html/lib/Slim/Http/Request.php +++ /dev/null @@ -1,617 +0,0 @@ - - * @copyright 2011 Josh Lockhart - * @link http://www.slimframework.com - * @license http://www.slimframework.com/license - * @version 2.4.2 - * @package Slim - * - * MIT LICENSE - * - * 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 Slim\Http; - -/** - * Slim HTTP Request - * - * This class provides a human-friendly interface to the Slim environment variables; - * environment variables are passed by reference and will be modified directly. - * - * @package Slim - * @author Josh Lockhart - * @since 1.0.0 - */ -class Request -{ - const METHOD_HEAD = 'HEAD'; - const METHOD_GET = 'GET'; - const METHOD_POST = 'POST'; - const METHOD_PUT = 'PUT'; - const METHOD_PATCH = 'PATCH'; - const METHOD_DELETE = 'DELETE'; - const METHOD_OPTIONS = 'OPTIONS'; - const METHOD_OVERRIDE = '_METHOD'; - - /** - * @var array - */ - protected static $formDataMediaTypes = array('application/x-www-form-urlencoded'); - - /** - * Application Environment - * @var \Slim\Environment - */ - protected $env; - - /** - * HTTP Headers - * @var \Slim\Http\Headers - */ - public $headers; - - /** - * HTTP Cookies - * @var \Slim\Helper\Set - */ - public $cookies; - - /** - * Constructor - * @param \Slim\Environment $env - */ - public function __construct(\Slim\Environment $env) - { - $this->env = $env; - $this->headers = new \Slim\Http\Headers(\Slim\Http\Headers::extract($env)); - $this->cookies = new \Slim\Helper\Set(\Slim\Http\Util::parseCookieHeader($env['HTTP_COOKIE'])); - } - - /** - * Get HTTP method - * @return string - */ - public function getMethod() - { - return $this->env['REQUEST_METHOD']; - } - - /** - * Is this a GET request? - * @return bool - */ - public function isGet() - { - return $this->getMethod() === self::METHOD_GET; - } - - /** - * Is this a POST request? - * @return bool - */ - public function isPost() - { - return $this->getMethod() === self::METHOD_POST; - } - - /** - * Is this a PUT request? - * @return bool - */ - public function isPut() - { - return $this->getMethod() === self::METHOD_PUT; - } - - /** - * Is this a PATCH request? - * @return bool - */ - public function isPatch() - { - return $this->getMethod() === self::METHOD_PATCH; - } - - /** - * Is this a DELETE request? - * @return bool - */ - public function isDelete() - { - return $this->getMethod() === self::METHOD_DELETE; - } - - /** - * Is this a HEAD request? - * @return bool - */ - public function isHead() - { - return $this->getMethod() === self::METHOD_HEAD; - } - - /** - * Is this a OPTIONS request? - * @return bool - */ - public function isOptions() - { - return $this->getMethod() === self::METHOD_OPTIONS; - } - - /** - * Is this an AJAX request? - * @return bool - */ - public function isAjax() - { - if ($this->params('isajax')) { - return true; - } elseif (isset($this->headers['X_REQUESTED_WITH']) && $this->headers['X_REQUESTED_WITH'] === 'XMLHttpRequest') { - return true; - } else { - return false; - } - } - - /** - * Is this an XHR request? (alias of Slim_Http_Request::isAjax) - * @return bool - */ - public function isXhr() - { - return $this->isAjax(); - } - - /** - * Fetch GET and POST data - * - * This method returns a union of GET and POST data as a key-value array, or the value - * of the array key if requested; if the array key does not exist, NULL is returned, - * unless there is a default value specified. - * - * @param string $key - * @param mixed $default - * @return array|mixed|null - */ - public function params($key = null, $default = null) - { - $union = array_merge($this->get(), $this->post()); - if ($key) { - return isset($union[$key]) ? $union[$key] : $default; - } - - return $union; - } - - /** - * Fetch GET data - * - * This method returns a key-value array of data sent in the HTTP request query string, or - * the value of the array key if requested; if the array key does not exist, NULL is returned. - * - * @param string $key - * @param mixed $default Default return value when key does not exist - * @return array|mixed|null - */ - public function get($key = null, $default = null) - { - if (!isset($this->env['slim.request.query_hash'])) { - $output = array(); - if (function_exists('mb_parse_str') && !isset($this->env['slim.tests.ignore_multibyte'])) { - mb_parse_str($this->env['QUERY_STRING'], $output); - } else { - parse_str($this->env['QUERY_STRING'], $output); - } - $this->env['slim.request.query_hash'] = Util::stripSlashesIfMagicQuotes($output); - } - if ($key) { - if (isset($this->env['slim.request.query_hash'][$key])) { - return $this->env['slim.request.query_hash'][$key]; - } else { - return $default; - } - } else { - return $this->env['slim.request.query_hash']; - } - } - - /** - * Fetch POST data - * - * This method returns a key-value array of data sent in the HTTP request body, or - * the value of a hash key if requested; if the array key does not exist, NULL is returned. - * - * @param string $key - * @param mixed $default Default return value when key does not exist - * @return array|mixed|null - * @throws \RuntimeException If environment input is not available - */ - public function post($key = null, $default = null) - { - if (!isset($this->env['slim.input'])) { - throw new \RuntimeException('Missing slim.input in environment variables'); - } - if (!isset($this->env['slim.request.form_hash'])) { - $this->env['slim.request.form_hash'] = array(); - if ($this->isFormData() && is_string($this->env['slim.input'])) { - $output = array(); - if (function_exists('mb_parse_str') && !isset($this->env['slim.tests.ignore_multibyte'])) { - mb_parse_str($this->env['slim.input'], $output); - } else { - parse_str($this->env['slim.input'], $output); - } - $this->env['slim.request.form_hash'] = Util::stripSlashesIfMagicQuotes($output); - } else { - $this->env['slim.request.form_hash'] = Util::stripSlashesIfMagicQuotes($_POST); - } - } - if ($key) { - if (isset($this->env['slim.request.form_hash'][$key])) { - return $this->env['slim.request.form_hash'][$key]; - } else { - return $default; - } - } else { - return $this->env['slim.request.form_hash']; - } - } - - /** - * Fetch PUT data (alias for \Slim\Http\Request::post) - * @param string $key - * @param mixed $default Default return value when key does not exist - * @return array|mixed|null - */ - public function put($key = null, $default = null) - { - return $this->post($key, $default); - } - - /** - * Fetch PATCH data (alias for \Slim\Http\Request::post) - * @param string $key - * @param mixed $default Default return value when key does not exist - * @return array|mixed|null - */ - public function patch($key = null, $default = null) - { - return $this->post($key, $default); - } - - /** - * Fetch DELETE data (alias for \Slim\Http\Request::post) - * @param string $key - * @param mixed $default Default return value when key does not exist - * @return array|mixed|null - */ - public function delete($key = null, $default = null) - { - return $this->post($key, $default); - } - - /** - * Fetch COOKIE data - * - * This method returns a key-value array of Cookie data sent in the HTTP request, or - * the value of a array key if requested; if the array key does not exist, NULL is returned. - * - * @param string $key - * @return array|string|null - */ - public function cookies($key = null) - { - if ($key) { - return $this->cookies->get($key); - } - - return $this->cookies; - // if (!isset($this->env['slim.request.cookie_hash'])) { - // $cookieHeader = isset($this->env['COOKIE']) ? $this->env['COOKIE'] : ''; - // $this->env['slim.request.cookie_hash'] = Util::parseCookieHeader($cookieHeader); - // } - // if ($key) { - // if (isset($this->env['slim.request.cookie_hash'][$key])) { - // return $this->env['slim.request.cookie_hash'][$key]; - // } else { - // return null; - // } - // } else { - // return $this->env['slim.request.cookie_hash']; - // } - } - - /** - * Does the Request body contain parsed form data? - * @return bool - */ - public function isFormData() - { - $method = isset($this->env['slim.method_override.original_method']) ? $this->env['slim.method_override.original_method'] : $this->getMethod(); - - return ($method === self::METHOD_POST && is_null($this->getContentType())) || in_array($this->getMediaType(), self::$formDataMediaTypes); - } - - /** - * Get Headers - * - * This method returns a key-value array of headers sent in the HTTP request, or - * the value of a hash key if requested; if the array key does not exist, NULL is returned. - * - * @param string $key - * @param mixed $default The default value returned if the requested header is not available - * @return mixed - */ - public function headers($key = null, $default = null) - { - if ($key) { - return $this->headers->get($key, $default); - } - - return $this->headers; - // if ($key) { - // $key = strtoupper($key); - // $key = str_replace('-', '_', $key); - // $key = preg_replace('@^HTTP_@', '', $key); - // if (isset($this->env[$key])) { - // return $this->env[$key]; - // } else { - // return $default; - // } - // } else { - // $headers = array(); - // foreach ($this->env as $key => $value) { - // if (strpos($key, 'slim.') !== 0) { - // $headers[$key] = $value; - // } - // } - // - // return $headers; - // } - } - - /** - * Get Body - * @return string - */ - public function getBody() - { - return $this->env['slim.input']; - } - - /** - * Get Content Type - * @return string|null - */ - public function getContentType() - { - return $this->headers->get('CONTENT_TYPE'); - } - - /** - * Get Media Type (type/subtype within Content Type header) - * @return string|null - */ - public function getMediaType() - { - $contentType = $this->getContentType(); - if ($contentType) { - $contentTypeParts = preg_split('/\s*[;,]\s*/', $contentType); - - return strtolower($contentTypeParts[0]); - } - - return null; - } - - /** - * Get Media Type Params - * @return array - */ - public function getMediaTypeParams() - { - $contentType = $this->getContentType(); - $contentTypeParams = array(); - if ($contentType) { - $contentTypeParts = preg_split('/\s*[;,]\s*/', $contentType); - $contentTypePartsLength = count($contentTypeParts); - for ($i = 1; $i < $contentTypePartsLength; $i++) { - $paramParts = explode('=', $contentTypeParts[$i]); - $contentTypeParams[strtolower($paramParts[0])] = $paramParts[1]; - } - } - - return $contentTypeParams; - } - - /** - * Get Content Charset - * @return string|null - */ - public function getContentCharset() - { - $mediaTypeParams = $this->getMediaTypeParams(); - if (isset($mediaTypeParams['charset'])) { - return $mediaTypeParams['charset']; - } - - return null; - } - - /** - * Get Content-Length - * @return int - */ - public function getContentLength() - { - return $this->headers->get('CONTENT_LENGTH', 0); - } - - /** - * Get Host - * @return string - */ - public function getHost() - { - if (isset($this->env['HTTP_HOST'])) { - if (strpos($this->env['HTTP_HOST'], ':') !== false) { - $hostParts = explode(':', $this->env['HTTP_HOST']); - - return $hostParts[0]; - } - - return $this->env['HTTP_HOST']; - } - - return $this->env['SERVER_NAME']; - } - - /** - * Get Host with Port - * @return string - */ - public function getHostWithPort() - { - return sprintf('%s:%s', $this->getHost(), $this->getPort()); - } - - /** - * Get Port - * @return int - */ - public function getPort() - { - return (int)$this->env['SERVER_PORT']; - } - - /** - * Get Scheme (https or http) - * @return string - */ - public function getScheme() - { - return $this->env['slim.url_scheme']; - } - - /** - * Get Script Name (physical path) - * @return string - */ - public function getScriptName() - { - return $this->env['SCRIPT_NAME']; - } - - /** - * LEGACY: Get Root URI (alias for Slim_Http_Request::getScriptName) - * @return string - */ - public function getRootUri() - { - return $this->getScriptName(); - } - - /** - * Get Path (physical path + virtual path) - * @return string - */ - public function getPath() - { - return $this->getScriptName() . $this->getPathInfo(); - } - - /** - * Get Path Info (virtual path) - * @return string - */ - public function getPathInfo() - { - return $this->env['PATH_INFO']; - } - - /** - * LEGACY: Get Resource URI (alias for Slim_Http_Request::getPathInfo) - * @return string - */ - public function getResourceUri() - { - return $this->getPathInfo(); - } - - /** - * Get URL (scheme + host [ + port if non-standard ]) - * @return string - */ - public function getUrl() - { - $url = $this->getScheme() . '://' . $this->getHost(); - if (($this->getScheme() === 'https' && $this->getPort() !== 443) || ($this->getScheme() === 'http' && $this->getPort() !== 80)) { - $url .= sprintf(':%s', $this->getPort()); - } - - return $url; - } - - /** - * Get IP - * @return string - */ - public function getIp() - { - $keys = array('X_FORWARDED_FOR', 'HTTP_X_FORWARDED_FOR', 'CLIENT_IP', 'REMOTE_ADDR'); - foreach ($keys as $key) { - if (isset($this->env[$key])) { - return $this->env[$key]; - } - } - - return $this->env['REMOTE_ADDR']; - } - - /** - * Get Referrer - * @return string|null - */ - public function getReferrer() - { - return $this->headers->get('HTTP_REFERER'); - } - - /** - * Get Referer (for those who can't spell) - * @return string|null - */ - public function getReferer() - { - return $this->getReferrer(); - } - - /** - * Get User Agent - * @return string|null - */ - public function getUserAgent() - { - return $this->headers->get('HTTP_USER_AGENT'); - } -} diff --git a/html/lib/Slim/Http/Response.php b/html/lib/Slim/Http/Response.php deleted file mode 100644 index c55d647cb9..0000000000 --- a/html/lib/Slim/Http/Response.php +++ /dev/null @@ -1,512 +0,0 @@ - - * @copyright 2011 Josh Lockhart - * @link http://www.slimframework.com - * @license http://www.slimframework.com/license - * @version 2.4.2 - * @package Slim - * - * MIT LICENSE - * - * 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 Slim\Http; - -/** - * Response - * - * This is a simple abstraction over top an HTTP response. This - * provides methods to set the HTTP status, the HTTP headers, - * and the HTTP body. - * - * @package Slim - * @author Josh Lockhart - * @since 1.0.0 - */ -class Response implements \ArrayAccess, \Countable, \IteratorAggregate -{ - /** - * @var int HTTP status code - */ - protected $status; - - /** - * @var \Slim\Http\Headers - */ - public $headers; - - /** - * @var \Slim\Http\Cookies - */ - public $cookies; - - /** - * @var string HTTP response body - */ - protected $body; - - /** - * @var int Length of HTTP response body - */ - protected $length; - - /** - * @var array HTTP response codes and messages - */ - protected static $messages = array( - //Informational 1xx - 100 => '100 Continue', - 101 => '101 Switching Protocols', - //Successful 2xx - 200 => '200 OK', - 201 => '201 Created', - 202 => '202 Accepted', - 203 => '203 Non-Authoritative Information', - 204 => '204 No Content', - 205 => '205 Reset Content', - 206 => '206 Partial Content', - //Redirection 3xx - 300 => '300 Multiple Choices', - 301 => '301 Moved Permanently', - 302 => '302 Found', - 303 => '303 See Other', - 304 => '304 Not Modified', - 305 => '305 Use Proxy', - 306 => '306 (Unused)', - 307 => '307 Temporary Redirect', - //Client Error 4xx - 400 => '400 Bad Request', - 401 => '401 Unauthorized', - 402 => '402 Payment Required', - 403 => '403 Forbidden', - 404 => '404 Not Found', - 405 => '405 Method Not Allowed', - 406 => '406 Not Acceptable', - 407 => '407 Proxy Authentication Required', - 408 => '408 Request Timeout', - 409 => '409 Conflict', - 410 => '410 Gone', - 411 => '411 Length Required', - 412 => '412 Precondition Failed', - 413 => '413 Request Entity Too Large', - 414 => '414 Request-URI Too Long', - 415 => '415 Unsupported Media Type', - 416 => '416 Requested Range Not Satisfiable', - 417 => '417 Expectation Failed', - 418 => '418 I\'m a teapot', - 422 => '422 Unprocessable Entity', - 423 => '423 Locked', - //Server Error 5xx - 500 => '500 Internal Server Error', - 501 => '501 Not Implemented', - 502 => '502 Bad Gateway', - 503 => '503 Service Unavailable', - 504 => '504 Gateway Timeout', - 505 => '505 HTTP Version Not Supported' - ); - - /** - * Constructor - * @param string $body The HTTP response body - * @param int $status The HTTP response status - * @param \Slim\Http\Headers|array $headers The HTTP response headers - */ - public function __construct($body = '', $status = 200, $headers = array()) - { - $this->setStatus($status); - $this->headers = new \Slim\Http\Headers(array('Content-Type' => 'text/html')); - $this->headers->replace($headers); - $this->cookies = new \Slim\Http\Cookies(); - $this->write($body); - } - - public function getStatus() - { - return $this->status; - } - - public function setStatus($status) - { - $this->status = (int)$status; - } - - /** - * DEPRECATION WARNING! Use `getStatus` or `setStatus` instead. - * - * Get and set status - * @param int|null $status - * @return int - */ - public function status($status = null) - { - if (!is_null($status)) { - $this->status = (int) $status; - } - - return $this->status; - } - - /** - * DEPRECATION WARNING! Access `headers` property directly. - * - * Get and set header - * @param string $name Header name - * @param string|null $value Header value - * @return string Header value - */ - public function header($name, $value = null) - { - if (!is_null($value)) { - $this->headers->set($name, $value); - } - - return $this->headers->get($name); - } - - /** - * DEPRECATION WARNING! Access `headers` property directly. - * - * Get headers - * @return \Slim\Http\Headers - */ - public function headers() - { - return $this->headers; - } - - public function getBody() - { - return $this->body; - } - - public function setBody($content) - { - $this->write($content, true); - } - - /** - * DEPRECATION WARNING! use `getBody` or `setBody` instead. - * - * Get and set body - * @param string|null $body Content of HTTP response body - * @return string - */ - public function body($body = null) - { - if (!is_null($body)) { - $this->write($body, true); - } - - return $this->body; - } - - /** - * Append HTTP response body - * @param string $body Content to append to the current HTTP response body - * @param bool $replace Overwrite existing response body? - * @return string The updated HTTP response body - */ - public function write($body, $replace = false) - { - if ($replace) { - $this->body = $body; - } else { - $this->body .= (string)$body; - } - $this->length = strlen($this->body); - - return $this->body; - } - - public function getLength() - { - return $this->length; - } - - /** - * DEPRECATION WARNING! Use `getLength` or `write` or `body` instead. - * - * Get and set length - * @param int|null $length - * @return int - */ - public function length($length = null) - { - if (!is_null($length)) { - $this->length = (int) $length; - } - - return $this->length; - } - - /** - * Finalize - * - * This prepares this response and returns an array - * of [status, headers, body]. This array is passed to outer middleware - * if available or directly to the Slim run method. - * - * @return array[int status, array headers, string body] - */ - public function finalize() - { - // Prepare response - if (in_array($this->status, array(204, 304))) { - $this->headers->remove('Content-Type'); - $this->headers->remove('Content-Length'); - $this->setBody(''); - } - - return array($this->status, $this->headers, $this->body); - } - - /** - * DEPRECATION WARNING! Access `cookies` property directly. - * - * Set cookie - * - * Instead of using PHP's `setcookie()` function, Slim manually constructs the HTTP `Set-Cookie` - * header on its own and delegates this responsibility to the `Slim_Http_Util` class. This - * response's header is passed by reference to the utility class and is directly modified. By not - * relying on PHP's native implementation, Slim allows middleware the opportunity to massage or - * analyze the raw header before the response is ultimately delivered to the HTTP client. - * - * @param string $name The name of the cookie - * @param string|array $value If string, the value of cookie; if array, properties for - * cookie including: value, expire, path, domain, secure, httponly - */ - public function setCookie($name, $value) - { - // Util::setCookieHeader($this->header, $name, $value); - $this->cookies->set($name, $value); - } - - /** - * DEPRECATION WARNING! Access `cookies` property directly. - * - * Delete cookie - * - * Instead of using PHP's `setcookie()` function, Slim manually constructs the HTTP `Set-Cookie` - * header on its own and delegates this responsibility to the `Slim_Http_Util` class. This - * response's header is passed by reference to the utility class and is directly modified. By not - * relying on PHP's native implementation, Slim allows middleware the opportunity to massage or - * analyze the raw header before the response is ultimately delivered to the HTTP client. - * - * This method will set a cookie with the given name that has an expiration time in the past; this will - * prompt the HTTP client to invalidate and remove the client-side cookie. Optionally, you may - * also pass a key/value array as the second argument. If the "domain" key is present in this - * array, only the Cookie with the given name AND domain will be removed. The invalidating cookie - * sent with this response will adopt all properties of the second argument. - * - * @param string $name The name of the cookie - * @param array $settings Properties for cookie including: value, expire, path, domain, secure, httponly - */ - public function deleteCookie($name, $settings = array()) - { - $this->cookies->remove($name, $settings); - // Util::deleteCookieHeader($this->header, $name, $value); - } - - /** - * Redirect - * - * This method prepares this response to return an HTTP Redirect response - * to the HTTP client. - * - * @param string $url The redirect destination - * @param int $status The redirect HTTP status code - */ - public function redirect ($url, $status = 302) - { - $this->setStatus($status); - $this->headers->set('Location', $url); - } - - /** - * Helpers: Empty? - * @return bool - */ - public function isEmpty() - { - return in_array($this->status, array(201, 204, 304)); - } - - /** - * Helpers: Informational? - * @return bool - */ - public function isInformational() - { - return $this->status >= 100 && $this->status < 200; - } - - /** - * Helpers: OK? - * @return bool - */ - public function isOk() - { - return $this->status === 200; - } - - /** - * Helpers: Successful? - * @return bool - */ - public function isSuccessful() - { - return $this->status >= 200 && $this->status < 300; - } - - /** - * Helpers: Redirect? - * @return bool - */ - public function isRedirect() - { - return in_array($this->status, array(301, 302, 303, 307)); - } - - /** - * Helpers: Redirection? - * @return bool - */ - public function isRedirection() - { - return $this->status >= 300 && $this->status < 400; - } - - /** - * Helpers: Forbidden? - * @return bool - */ - public function isForbidden() - { - return $this->status === 403; - } - - /** - * Helpers: Not Found? - * @return bool - */ - public function isNotFound() - { - return $this->status === 404; - } - - /** - * Helpers: Client error? - * @return bool - */ - public function isClientError() - { - return $this->status >= 400 && $this->status < 500; - } - - /** - * Helpers: Server Error? - * @return bool - */ - public function isServerError() - { - return $this->status >= 500 && $this->status < 600; - } - - /** - * DEPRECATION WARNING! ArrayAccess interface will be removed from \Slim\Http\Response. - * Iterate `headers` or `cookies` properties directly. - */ - - /** - * Array Access: Offset Exists - */ - public function offsetExists($offset) - { - return isset($this->headers[$offset]); - } - - /** - * Array Access: Offset Get - */ - public function offsetGet($offset) - { - return $this->headers[$offset]; - } - - /** - * Array Access: Offset Set - */ - public function offsetSet($offset, $value) - { - $this->headers[$offset] = $value; - } - - /** - * Array Access: Offset Unset - */ - public function offsetUnset($offset) - { - unset($this->headers[$offset]); - } - - /** - * DEPRECATION WARNING! Countable interface will be removed from \Slim\Http\Response. - * Call `count` on `headers` or `cookies` properties directly. - * - * Countable: Count - */ - public function count() - { - return count($this->headers); - } - - /** - * DEPRECATION WARNING! IteratorAggregate interface will be removed from \Slim\Http\Response. - * Iterate `headers` or `cookies` properties directly. - * - * Get Iterator - * - * This returns the contained `\Slim\Http\Headers` instance which - * is itself iterable. - * - * @return \Slim\Http\Headers - */ - public function getIterator() - { - return $this->headers->getIterator(); - } - - /** - * Get message for HTTP status code - * @param int $status - * @return string|null - */ - public static function getMessageForCode($status) - { - if (isset(self::$messages[$status])) { - return self::$messages[$status]; - } else { - return null; - } - } -} diff --git a/html/lib/Slim/Http/Util.php b/html/lib/Slim/Http/Util.php deleted file mode 100644 index dafedb38dd..0000000000 --- a/html/lib/Slim/Http/Util.php +++ /dev/null @@ -1,434 +0,0 @@ - - * @copyright 2011 Josh Lockhart - * @link http://www.slimframework.com - * @license http://www.slimframework.com/license - * @version 2.4.2 - * @package Slim - * - * MIT LICENSE - * - * 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 Slim\Http; - -/** - * Slim HTTP Utilities - * - * This class provides useful methods for handling HTTP requests. - * - * @package Slim - * @author Josh Lockhart - * @since 1.0.0 - */ -class Util -{ - /** - * Strip slashes from string or array - * - * This method strips slashes from its input. By default, this method will only - * strip slashes from its input if magic quotes are enabled. Otherwise, you may - * override the magic quotes setting with either TRUE or FALSE as the send argument - * to force this method to strip or not strip slashes from its input. - * - * @param array|string $rawData - * @param bool $overrideStripSlashes - * @return array|string - */ - public static function stripSlashesIfMagicQuotes($rawData, $overrideStripSlashes = null) - { - $strip = is_null($overrideStripSlashes) ? get_magic_quotes_gpc() : $overrideStripSlashes; - if ($strip) { - return self::stripSlashes($rawData); - } else { - return $rawData; - } - } - - /** - * Strip slashes from string or array - * @param array|string $rawData - * @return array|string - */ - protected static function stripSlashes($rawData) - { - return is_array($rawData) ? array_map(array('self', 'stripSlashes'), $rawData) : stripslashes($rawData); - } - - /** - * Encrypt data - * - * This method will encrypt data using a given key, vector, and cipher. - * By default, this will encrypt data using the RIJNDAEL/AES 256 bit cipher. You - * may override the default cipher and cipher mode by passing your own desired - * cipher and cipher mode as the final key-value array argument. - * - * @param string $data The unencrypted data - * @param string $key The encryption key - * @param string $iv The encryption initialization vector - * @param array $settings Optional key-value array with custom algorithm and mode - * @return string - */ - public static function encrypt($data, $key, $iv, $settings = array()) - { - if ($data === '' || !extension_loaded('mcrypt')) { - return $data; - } - - //Merge settings with defaults - $defaults = array( - 'algorithm' => MCRYPT_RIJNDAEL_256, - 'mode' => MCRYPT_MODE_CBC - ); - $settings = array_merge($defaults, $settings); - - //Get module - $module = mcrypt_module_open($settings['algorithm'], '', $settings['mode'], ''); - - //Validate IV - $ivSize = mcrypt_enc_get_iv_size($module); - if (strlen($iv) > $ivSize) { - $iv = substr($iv, 0, $ivSize); - } - - //Validate key - $keySize = mcrypt_enc_get_key_size($module); - if (strlen($key) > $keySize) { - $key = substr($key, 0, $keySize); - } - - //Encrypt value - mcrypt_generic_init($module, $key, $iv); - $res = @mcrypt_generic($module, $data); - mcrypt_generic_deinit($module); - - return $res; - } - - /** - * Decrypt data - * - * This method will decrypt data using a given key, vector, and cipher. - * By default, this will decrypt data using the RIJNDAEL/AES 256 bit cipher. You - * may override the default cipher and cipher mode by passing your own desired - * cipher and cipher mode as the final key-value array argument. - * - * @param string $data The encrypted data - * @param string $key The encryption key - * @param string $iv The encryption initialization vector - * @param array $settings Optional key-value array with custom algorithm and mode - * @return string - */ - public static function decrypt($data, $key, $iv, $settings = array()) - { - if ($data === '' || !extension_loaded('mcrypt')) { - return $data; - } - - //Merge settings with defaults - $defaults = array( - 'algorithm' => MCRYPT_RIJNDAEL_256, - 'mode' => MCRYPT_MODE_CBC - ); - $settings = array_merge($defaults, $settings); - - //Get module - $module = mcrypt_module_open($settings['algorithm'], '', $settings['mode'], ''); - - //Validate IV - $ivSize = mcrypt_enc_get_iv_size($module); - if (strlen($iv) > $ivSize) { - $iv = substr($iv, 0, $ivSize); - } - - //Validate key - $keySize = mcrypt_enc_get_key_size($module); - if (strlen($key) > $keySize) { - $key = substr($key, 0, $keySize); - } - - //Decrypt value - mcrypt_generic_init($module, $key, $iv); - $decryptedData = @mdecrypt_generic($module, $data); - $res = rtrim($decryptedData, "\0"); - mcrypt_generic_deinit($module); - - return $res; - } - - /** - * Serialize Response cookies into raw HTTP header - * @param \Slim\Http\Headers $headers The Response headers - * @param \Slim\Http\Cookies $cookies The Response cookies - * @param array $config The Slim app settings - */ - public static function serializeCookies(\Slim\Http\Headers &$headers, \Slim\Http\Cookies $cookies, array $config) - { - if ($config['cookies.encrypt']) { - foreach ($cookies as $name => $settings) { - if (is_string($settings['expires'])) { - $expires = strtotime($settings['expires']); - } else { - $expires = (int) $settings['expires']; - } - - $settings['value'] = static::encodeSecureCookie( - $settings['value'], - $expires, - $config['cookies.secret_key'], - $config['cookies.cipher'], - $config['cookies.cipher_mode'] - ); - static::setCookieHeader($headers, $name, $settings); - } - } else { - foreach ($cookies as $name => $settings) { - static::setCookieHeader($headers, $name, $settings); - } - } - } - - /** - * Encode secure cookie value - * - * This method will create the secure value of an HTTP cookie. The - * cookie value is encrypted and hashed so that its value is - * secure and checked for integrity when read in subsequent requests. - * - * @param string $value The insecure HTTP cookie value - * @param int $expires The UNIX timestamp at which this cookie will expire - * @param string $secret The secret key used to hash the cookie value - * @param int $algorithm The algorithm to use for encryption - * @param int $mode The algorithm mode to use for encryption - * @return string - */ - public static function encodeSecureCookie($value, $expires, $secret, $algorithm, $mode) - { - $key = hash_hmac('sha1', (string) $expires, $secret); - $iv = self::getIv($expires, $secret); - $secureString = base64_encode( - self::encrypt( - $value, - $key, - $iv, - array( - 'algorithm' => $algorithm, - 'mode' => $mode - ) - ) - ); - $verificationString = hash_hmac('sha1', $expires . $value, $key); - - return implode('|', array($expires, $secureString, $verificationString)); - } - - /** - * Decode secure cookie value - * - * This method will decode the secure value of an HTTP cookie. The - * cookie value is encrypted and hashed so that its value is - * secure and checked for integrity when read in subsequent requests. - * - * @param string $value The secure HTTP cookie value - * @param string $secret The secret key used to hash the cookie value - * @param int $algorithm The algorithm to use for encryption - * @param int $mode The algorithm mode to use for encryption - * @return bool|string - */ - public static function decodeSecureCookie($value, $secret, $algorithm, $mode) - { - if ($value) { - $value = explode('|', $value); - if (count($value) === 3 && ((int) $value[0] === 0 || (int) $value[0] > time())) { - $key = hash_hmac('sha1', $value[0], $secret); - $iv = self::getIv($value[0], $secret); - $data = self::decrypt( - base64_decode($value[1]), - $key, - $iv, - array( - 'algorithm' => $algorithm, - 'mode' => $mode - ) - ); - $verificationString = hash_hmac('sha1', $value[0] . $data, $key); - if ($verificationString === $value[2]) { - return $data; - } - } - } - - return false; - } - - /** - * Set HTTP cookie header - * - * This method will construct and set the HTTP `Set-Cookie` header. Slim - * uses this method instead of PHP's native `setcookie` method. This allows - * more control of the HTTP header irrespective of the native implementation's - * dependency on PHP versions. - * - * This method accepts the Slim_Http_Headers object by reference as its - * first argument; this method directly modifies this object instead of - * returning a value. - * - * @param array $header - * @param string $name - * @param string $value - */ - public static function setCookieHeader(&$header, $name, $value) - { - //Build cookie header - if (is_array($value)) { - $domain = ''; - $path = ''; - $expires = ''; - $secure = ''; - $httponly = ''; - if (isset($value['domain']) && $value['domain']) { - $domain = '; domain=' . $value['domain']; - } - if (isset($value['path']) && $value['path']) { - $path = '; path=' . $value['path']; - } - if (isset($value['expires'])) { - if (is_string($value['expires'])) { - $timestamp = strtotime($value['expires']); - } else { - $timestamp = (int) $value['expires']; - } - if ($timestamp !== 0) { - $expires = '; expires=' . gmdate('D, d-M-Y H:i:s e', $timestamp); - } - } - if (isset($value['secure']) && $value['secure']) { - $secure = '; secure'; - } - if (isset($value['httponly']) && $value['httponly']) { - $httponly = '; HttpOnly'; - } - $cookie = sprintf('%s=%s%s', urlencode($name), urlencode((string) $value['value']), $domain . $path . $expires . $secure . $httponly); - } else { - $cookie = sprintf('%s=%s', urlencode($name), urlencode((string) $value)); - } - - //Set cookie header - if (!isset($header['Set-Cookie']) || $header['Set-Cookie'] === '') { - $header['Set-Cookie'] = $cookie; - } else { - $header['Set-Cookie'] = implode("\n", array($header['Set-Cookie'], $cookie)); - } - } - - /** - * Delete HTTP cookie header - * - * This method will construct and set the HTTP `Set-Cookie` header to invalidate - * a client-side HTTP cookie. If a cookie with the same name (and, optionally, domain) - * is already set in the HTTP response, it will also be removed. Slim uses this method - * instead of PHP's native `setcookie` method. This allows more control of the HTTP header - * irrespective of PHP's native implementation's dependency on PHP versions. - * - * This method accepts the Slim_Http_Headers object by reference as its - * first argument; this method directly modifies this object instead of - * returning a value. - * - * @param array $header - * @param string $name - * @param array $value - */ - public static function deleteCookieHeader(&$header, $name, $value = array()) - { - //Remove affected cookies from current response header - $cookiesOld = array(); - $cookiesNew = array(); - if (isset($header['Set-Cookie'])) { - $cookiesOld = explode("\n", $header['Set-Cookie']); - } - foreach ($cookiesOld as $c) { - if (isset($value['domain']) && $value['domain']) { - $regex = sprintf('@%s=.*domain=%s@', urlencode($name), preg_quote($value['domain'])); - } else { - $regex = sprintf('@%s=@', urlencode($name)); - } - if (preg_match($regex, $c) === 0) { - $cookiesNew[] = $c; - } - } - if ($cookiesNew) { - $header['Set-Cookie'] = implode("\n", $cookiesNew); - } else { - unset($header['Set-Cookie']); - } - - //Set invalidating cookie to clear client-side cookie - self::setCookieHeader($header, $name, array_merge(array('value' => '', 'path' => null, 'domain' => null, 'expires' => time() - 100), $value)); - } - - /** - * Parse cookie header - * - * This method will parse the HTTP request's `Cookie` header - * and extract cookies into an associative array. - * - * @param string - * @return array - */ - public static function parseCookieHeader($header) - { - $cookies = array(); - $header = rtrim($header, "\r\n"); - $headerPieces = preg_split('@\s*[;,]\s*@', $header); - foreach ($headerPieces as $c) { - $cParts = explode('=', $c, 2); - if (count($cParts) === 2) { - $key = urldecode($cParts[0]); - $value = urldecode($cParts[1]); - if (!isset($cookies[$key])) { - $cookies[$key] = $value; - } - } - } - - return $cookies; - } - - /** - * Generate a random IV - * - * This method will generate a non-predictable IV for use with - * the cookie encryption - * - * @param int $expires The UNIX timestamp at which this cookie will expire - * @param string $secret The secret key used to hash the cookie value - * @return string Hash - */ - private static function getIv($expires, $secret) - { - $data1 = hash_hmac('sha1', 'a'.$expires.'b', $secret); - $data2 = hash_hmac('sha1', 'z'.$expires.'y', $secret); - - return pack("h*", $data1.$data2); - } -} diff --git a/html/lib/Slim/Log.php b/html/lib/Slim/Log.php deleted file mode 100644 index d872e87152..0000000000 --- a/html/lib/Slim/Log.php +++ /dev/null @@ -1,349 +0,0 @@ - - * @copyright 2011 Josh Lockhart - * @link http://www.slimframework.com - * @license http://www.slimframework.com/license - * @version 2.4.2 - * @package Slim - * - * MIT LICENSE - * - * 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 Slim; - -/** - * Log - * - * This is the primary logger for a Slim application. You may provide - * a Log Writer in conjunction with this Log to write to various output - * destinations (e.g. a file). This class provides this interface: - * - * debug( mixed $object, array $context ) - * info( mixed $object, array $context ) - * notice( mixed $object, array $context ) - * warning( mixed $object, array $context ) - * error( mixed $object, array $context ) - * critical( mixed $object, array $context ) - * alert( mixed $object, array $context ) - * emergency( mixed $object, array $context ) - * log( mixed $level, mixed $object, array $context ) - * - * This class assumes only that your Log Writer has a public `write()` method - * that accepts any object as its one and only argument. The Log Writer - * class may write or send its argument anywhere: a file, STDERR, - * a remote web API, etc. The possibilities are endless. - * - * @package Slim - * @author Josh Lockhart - * @since 1.0.0 - */ -class Log -{ - const EMERGENCY = 1; - const ALERT = 2; - const CRITICAL = 3; - const FATAL = 3; //DEPRECATED replace with CRITICAL - const ERROR = 4; - const WARN = 5; - const NOTICE = 6; - const INFO = 7; - const DEBUG = 8; - - /** - * @var array - */ - protected static $levels = array( - self::EMERGENCY => 'EMERGENCY', - self::ALERT => 'ALERT', - self::CRITICAL => 'CRITICAL', - self::ERROR => 'ERROR', - self::WARN => 'WARNING', - self::NOTICE => 'NOTICE', - self::INFO => 'INFO', - self::DEBUG => 'DEBUG' - ); - - /** - * @var mixed - */ - protected $writer; - - /** - * @var bool - */ - protected $enabled; - - /** - * @var int - */ - protected $level; - - /** - * Constructor - * @param mixed $writer - */ - public function __construct($writer) - { - $this->writer = $writer; - $this->enabled = true; - $this->level = self::DEBUG; - } - - /** - * Is logging enabled? - * @return bool - */ - public function getEnabled() - { - return $this->enabled; - } - - /** - * Enable or disable logging - * @param bool $enabled - */ - public function setEnabled($enabled) - { - if ($enabled) { - $this->enabled = true; - } else { - $this->enabled = false; - } - } - - /** - * Set level - * @param int $level - * @throws \InvalidArgumentException If invalid log level specified - */ - public function setLevel($level) - { - if (!isset(self::$levels[$level])) { - throw new \InvalidArgumentException('Invalid log level'); - } - $this->level = $level; - } - - /** - * Get level - * @return int - */ - public function getLevel() - { - return $this->level; - } - - /** - * Set writer - * @param mixed $writer - */ - public function setWriter($writer) - { - $this->writer = $writer; - } - - /** - * Get writer - * @return mixed - */ - public function getWriter() - { - return $this->writer; - } - - /** - * Is logging enabled? - * @return bool - */ - public function isEnabled() - { - return $this->enabled; - } - - /** - * Log debug message - * @param mixed $object - * @param array $context - * @return mixed|bool What the Logger returns, or false if Logger not set or not enabled - */ - public function debug($object, $context = array()) - { - return $this->log(self::DEBUG, $object, $context); - } - - /** - * Log info message - * @param mixed $object - * @param array $context - * @return mixed|bool What the Logger returns, or false if Logger not set or not enabled - */ - public function info($object, $context = array()) - { - return $this->log(self::INFO, $object, $context); - } - - /** - * Log notice message - * @param mixed $object - * @param array $context - * @return mixed|bool What the Logger returns, or false if Logger not set or not enabled - */ - public function notice($object, $context = array()) - { - return $this->log(self::NOTICE, $object, $context); - } - - /** - * Log warning message - * @param mixed $object - * @param array $context - * @return mixed|bool What the Logger returns, or false if Logger not set or not enabled - */ - public function warning($object, $context = array()) - { - return $this->log(self::WARN, $object, $context); - } - - /** - * DEPRECATED for function warning - * Log warning message - * @param mixed $object - * @param array $context - * @return mixed|bool What the Logger returns, or false if Logger not set or not enabled - */ - public function warn($object, $context = array()) - { - return $this->log(self::WARN, $object, $context); - } - - /** - * Log error message - * @param mixed $object - * @param array $context - * @return mixed|bool What the Logger returns, or false if Logger not set or not enabled - */ - public function error($object, $context = array()) - { - return $this->log(self::ERROR, $object, $context); - } - - /** - * Log critical message - * @param mixed $object - * @param array $context - * @return mixed|bool What the Logger returns, or false if Logger not set or not enabled - */ - public function critical($object, $context = array()) - { - return $this->log(self::CRITICAL, $object, $context); - } - - /** - * DEPRECATED for function critical - * Log fatal message - * @param mixed $object - * @param array $context - * @return mixed|bool What the Logger returns, or false if Logger not set or not enabled - */ - public function fatal($object, $context = array()) - { - return $this->log(self::CRITICAL, $object, $context); - } - - /** - * Log alert message - * @param mixed $object - * @param array $context - * @return mixed|bool What the Logger returns, or false if Logger not set or not enabled - */ - public function alert($object, $context = array()) - { - return $this->log(self::ALERT, $object, $context); - } - - /** - * Log emergency message - * @param mixed $object - * @param array $context - * @return mixed|bool What the Logger returns, or false if Logger not set or not enabled - */ - public function emergency($object, $context = array()) - { - return $this->log(self::EMERGENCY, $object, $context); - } - - /** - * Log message - * @param mixed $level - * @param mixed $object - * @param array $context - * @return mixed|bool What the Logger returns, or false if Logger not set or not enabled - * @throws \InvalidArgumentException If invalid log level - */ - public function log($level, $object, $context = array()) - { - if (!isset(self::$levels[$level])) { - throw new \InvalidArgumentException('Invalid log level supplied to function'); - } else if ($this->enabled && $this->writer && $level <= $this->level) { - $message = (string)$object; - if (count($context) > 0) { - if (isset($context['exception']) && $context['exception'] instanceof \Exception) { - $message .= ' - ' . $context['exception']; - unset($context['exception']); - } - $message = $this->interpolate($message, $context); - } - return $this->writer->write($message, $level); - } else { - return false; - } - } - - /** - * DEPRECATED for function log - * Log message - * @param mixed $object The object to log - * @param int $level The message level - * @return int|bool - */ - protected function write($object, $level) - { - return $this->log($level, $object); - } - - /** - * Interpolate log message - * @param mixed $message The log message - * @param array $context An array of placeholder values - * @return string The processed string - */ - protected function interpolate($message, $context = array()) - { - $replace = array(); - foreach ($context as $key => $value) { - $replace['{' . $key . '}'] = $value; - } - return strtr($message, $replace); - } -} diff --git a/html/lib/Slim/LogWriter.php b/html/lib/Slim/LogWriter.php deleted file mode 100644 index 5e44e2f57a..0000000000 --- a/html/lib/Slim/LogWriter.php +++ /dev/null @@ -1,75 +0,0 @@ - - * @copyright 2011 Josh Lockhart - * @link http://www.slimframework.com - * @license http://www.slimframework.com/license - * @version 2.4.2 - * @package Slim - * - * MIT LICENSE - * - * 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 Slim; - -/** - * Log Writer - * - * This class is used by Slim_Log to write log messages to a valid, writable - * resource handle (e.g. a file or STDERR). - * - * @package Slim - * @author Josh Lockhart - * @since 1.6.0 - */ -class LogWriter -{ - /** - * @var resource - */ - protected $resource; - - /** - * Constructor - * @param resource $resource - * @throws \InvalidArgumentException If invalid resource - */ - public function __construct($resource) - { - if (!is_resource($resource)) { - throw new \InvalidArgumentException('Cannot create LogWriter. Invalid resource handle.'); - } - $this->resource = $resource; - } - - /** - * Write message - * @param mixed $message - * @param int $level - * @return int|bool - */ - public function write($message, $level = null) - { - return fwrite($this->resource, (string) $message . PHP_EOL); - } -} diff --git a/html/lib/Slim/Middleware.php b/html/lib/Slim/Middleware.php deleted file mode 100644 index be2310064b..0000000000 --- a/html/lib/Slim/Middleware.php +++ /dev/null @@ -1,114 +0,0 @@ - - * @copyright 2011 Josh Lockhart - * @link http://www.slimframework.com - * @license http://www.slimframework.com/license - * @version 2.4.2 - * @package Slim - * - * MIT LICENSE - * - * 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 Slim; - -/** - * Middleware - * - * @package Slim - * @author Josh Lockhart - * @since 1.6.0 - */ -abstract class Middleware -{ - /** - * @var \Slim\Slim Reference to the primary application instance - */ - protected $app; - - /** - * @var mixed Reference to the next downstream middleware - */ - protected $next; - - /** - * Set application - * - * This method injects the primary Slim application instance into - * this middleware. - * - * @param \Slim\Slim $application - */ - final public function setApplication($application) - { - $this->app = $application; - } - - /** - * Get application - * - * This method retrieves the application previously injected - * into this middleware. - * - * @return \Slim\Slim - */ - final public function getApplication() - { - return $this->app; - } - - /** - * Set next middleware - * - * This method injects the next downstream middleware into - * this middleware so that it may optionally be called - * when appropriate. - * - * @param \Slim|\Slim\Middleware - */ - final public function setNextMiddleware($nextMiddleware) - { - $this->next = $nextMiddleware; - } - - /** - * Get next middleware - * - * This method retrieves the next downstream middleware - * previously injected into this middleware. - * - * @return \Slim\Slim|\Slim\Middleware - */ - final public function getNextMiddleware() - { - return $this->next; - } - - /** - * Call - * - * Perform actions specific to this middleware and optionally - * call the next downstream middleware. - */ - abstract public function call(); -} diff --git a/html/lib/Slim/Middleware/ContentTypes.php b/html/lib/Slim/Middleware/ContentTypes.php deleted file mode 100644 index 08049db5d9..0000000000 --- a/html/lib/Slim/Middleware/ContentTypes.php +++ /dev/null @@ -1,174 +0,0 @@ - - * @copyright 2011 Josh Lockhart - * @link http://www.slimframework.com - * @license http://www.slimframework.com/license - * @version 2.4.2 - * @package Slim - * - * MIT LICENSE - * - * 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 Slim\Middleware; - - /** - * Content Types - * - * This is middleware for a Slim application that intercepts - * the HTTP request body and parses it into the appropriate - * PHP data structure if possible; else it returns the HTTP - * request body unchanged. This is particularly useful - * for preparing the HTTP request body for an XML or JSON API. - * - * @package Slim - * @author Josh Lockhart - * @since 1.6.0 - */ -class ContentTypes extends \Slim\Middleware -{ - /** - * @var array - */ - protected $contentTypes; - - /** - * Constructor - * @param array $settings - */ - public function __construct($settings = array()) - { - $defaults = array( - 'application/json' => array($this, 'parseJson'), - 'application/xml' => array($this, 'parseXml'), - 'text/xml' => array($this, 'parseXml'), - 'text/csv' => array($this, 'parseCsv') - ); - $this->contentTypes = array_merge($defaults, $settings); - } - - /** - * Call - */ - public function call() - { - $mediaType = $this->app->request()->getMediaType(); - if ($mediaType) { - $env = $this->app->environment(); - $env['slim.input_original'] = $env['slim.input']; - $env['slim.input'] = $this->parse($env['slim.input'], $mediaType); - } - $this->next->call(); - } - - /** - * Parse input - * - * This method will attempt to parse the request body - * based on its content type if available. - * - * @param string $input - * @param string $contentType - * @return mixed - */ - protected function parse ($input, $contentType) - { - if (isset($this->contentTypes[$contentType]) && is_callable($this->contentTypes[$contentType])) { - $result = call_user_func($this->contentTypes[$contentType], $input); - if ($result) { - return $result; - } - } - - return $input; - } - - /** - * Parse JSON - * - * This method converts the raw JSON input - * into an associative array. - * - * @param string $input - * @return array|string - */ - protected function parseJson($input) - { - if (function_exists('json_decode')) { - $result = json_decode($input, true); - if ($result) { - return $result; - } - } - } - - /** - * Parse XML - * - * This method creates a SimpleXMLElement - * based upon the XML input. If the SimpleXML - * extension is not available, the raw input - * will be returned unchanged. - * - * @param string $input - * @return \SimpleXMLElement|string - */ - protected function parseXml($input) - { - if (class_exists('SimpleXMLElement')) { - try { - $backup = libxml_disable_entity_loader(true); - $result = new \SimpleXMLElement($input); - libxml_disable_entity_loader($backup); - return $result; - } catch (\Exception $e) { - // Do nothing - } - } - - return $input; - } - - /** - * Parse CSV - * - * This method parses CSV content into a numeric array - * containing an array of data for each CSV line. - * - * @param string $input - * @return array - */ - protected function parseCsv($input) - { - $temp = fopen('php://memory', 'rw'); - fwrite($temp, $input); - fseek($temp, 0); - $res = array(); - while (($data = fgetcsv($temp)) !== false) { - $res[] = $data; - } - fclose($temp); - - return $res; - } -} diff --git a/html/lib/Slim/Middleware/Flash.php b/html/lib/Slim/Middleware/Flash.php deleted file mode 100644 index 96f685e9e8..0000000000 --- a/html/lib/Slim/Middleware/Flash.php +++ /dev/null @@ -1,212 +0,0 @@ - - * @copyright 2011 Josh Lockhart - * @link http://www.slimframework.com - * @license http://www.slimframework.com/license - * @version 2.4.2 - * @package Slim - * - * MIT LICENSE - * - * 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 Slim\Middleware; - - /** - * Flash - * - * This is middleware for a Slim application that enables - * Flash messaging between HTTP requests. This allows you - * set Flash messages for the current request, for the next request, - * or to retain messages from the previous request through to - * the next request. - * - * @package Slim - * @author Josh Lockhart - * @since 1.6.0 - */ -class Flash extends \Slim\Middleware implements \ArrayAccess, \IteratorAggregate, \Countable -{ - /** - * @var array - */ - protected $settings; - - /** - * @var array - */ - protected $messages; - - /** - * Constructor - * @param array $settings - */ - public function __construct($settings = array()) - { - $this->settings = array_merge(array('key' => 'slim.flash'), $settings); - $this->messages = array( - 'prev' => array(), //flash messages from prev request (loaded when middleware called) - 'next' => array(), //flash messages for next request - 'now' => array() //flash messages for current request - ); - } - - /** - * Call - */ - public function call() - { - //Read flash messaging from previous request if available - $this->loadMessages(); - - //Prepare flash messaging for current request - $env = $this->app->environment(); - $env['slim.flash'] = $this; - $this->next->call(); - $this->save(); - } - - /** - * Now - * - * Specify a flash message for a given key to be shown for the current request - * - * @param string $key - * @param string $value - */ - public function now($key, $value) - { - $this->messages['now'][(string) $key] = $value; - } - - /** - * Set - * - * Specify a flash message for a given key to be shown for the next request - * - * @param string $key - * @param string $value - */ - public function set($key, $value) - { - $this->messages['next'][(string) $key] = $value; - } - - /** - * Keep - * - * Retain flash messages from the previous request for the next request - */ - public function keep() - { - foreach ($this->messages['prev'] as $key => $val) { - $this->messages['next'][$key] = $val; - } - } - - /** - * Save - */ - public function save() - { - $_SESSION[$this->settings['key']] = $this->messages['next']; - } - - /** - * Load messages from previous request if available - */ - public function loadMessages() - { - if (isset($_SESSION[$this->settings['key']])) { - $this->messages['prev'] = $_SESSION[$this->settings['key']]; - } - } - - /** - * Return array of flash messages to be shown for the current request - * - * @return array - */ - public function getMessages() - { - return array_merge($this->messages['prev'], $this->messages['now']); - } - - /** - * Array Access: Offset Exists - */ - public function offsetExists($offset) - { - $messages = $this->getMessages(); - - return isset($messages[$offset]); - } - - /** - * Array Access: Offset Get - */ - public function offsetGet($offset) - { - $messages = $this->getMessages(); - - return isset($messages[$offset]) ? $messages[$offset] : null; - } - - /** - * Array Access: Offset Set - */ - public function offsetSet($offset, $value) - { - $this->now($offset, $value); - } - - /** - * Array Access: Offset Unset - */ - public function offsetUnset($offset) - { - unset($this->messages['prev'][$offset], $this->messages['now'][$offset]); - } - - /** - * Iterator Aggregate: Get Iterator - * @return \ArrayIterator - */ - public function getIterator() - { - $messages = $this->getMessages(); - - return new \ArrayIterator($messages); - } - - /** - * Countable: Count - */ - public function count() - { - return count($this->getMessages()); - } - - - -} diff --git a/html/lib/Slim/Middleware/MethodOverride.php b/html/lib/Slim/Middleware/MethodOverride.php deleted file mode 100644 index 7fa3bb0a30..0000000000 --- a/html/lib/Slim/Middleware/MethodOverride.php +++ /dev/null @@ -1,94 +0,0 @@ - - * @copyright 2011 Josh Lockhart - * @link http://www.slimframework.com - * @license http://www.slimframework.com/license - * @version 2.4.2 - * @package Slim - * - * MIT LICENSE - * - * 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 Slim\Middleware; - - /** - * HTTP Method Override - * - * This is middleware for a Slim application that allows traditional - * desktop browsers to submit pseudo PUT and DELETE requests by relying - * on a pre-determined request parameter. Without this middleware, - * desktop browsers are only able to submit GET and POST requests. - * - * This middleware is included automatically! - * - * @package Slim - * @author Josh Lockhart - * @since 1.6.0 - */ -class MethodOverride extends \Slim\Middleware -{ - /** - * @var array - */ - protected $settings; - - /** - * Constructor - * @param array $settings - */ - public function __construct($settings = array()) - { - $this->settings = array_merge(array('key' => '_METHOD'), $settings); - } - - /** - * Call - * - * Implements Slim middleware interface. This method is invoked and passed - * an array of environment variables. This middleware inspects the environment - * variables for the HTTP method override parameter; if found, this middleware - * modifies the environment settings so downstream middleware and/or the Slim - * application will treat the request with the desired HTTP method. - * - * @return array[status, header, body] - */ - public function call() - { - $env = $this->app->environment(); - if (isset($env['HTTP_X_HTTP_METHOD_OVERRIDE'])) { - // Header commonly used by Backbone.js and others - $env['slim.method_override.original_method'] = $env['REQUEST_METHOD']; - $env['REQUEST_METHOD'] = strtoupper($env['HTTP_X_HTTP_METHOD_OVERRIDE']); - } elseif (isset($env['REQUEST_METHOD']) && $env['REQUEST_METHOD'] === 'POST') { - // HTML Form Override - $req = new \Slim\Http\Request($env); - $method = $req->post($this->settings['key']); - if ($method) { - $env['slim.method_override.original_method'] = $env['REQUEST_METHOD']; - $env['REQUEST_METHOD'] = strtoupper($method); - } - } - $this->next->call(); - } -} diff --git a/html/lib/Slim/Middleware/PrettyExceptions.php b/html/lib/Slim/Middleware/PrettyExceptions.php deleted file mode 100644 index 8a56442b01..0000000000 --- a/html/lib/Slim/Middleware/PrettyExceptions.php +++ /dev/null @@ -1,116 +0,0 @@ - - * @copyright 2011 Josh Lockhart - * @link http://www.slimframework.com - * @license http://www.slimframework.com/license - * @version 2.4.2 - * @package Slim - * - * MIT LICENSE - * - * 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 Slim\Middleware; - -/** - * Pretty Exceptions - * - * This middleware catches any Exception thrown by the surrounded - * application and displays a developer-friendly diagnostic screen. - * - * @package Slim - * @author Josh Lockhart - * @since 1.0.0 - */ -class PrettyExceptions extends \Slim\Middleware -{ - /** - * @var array - */ - protected $settings; - - /** - * Constructor - * @param array $settings - */ - public function __construct($settings = array()) - { - $this->settings = $settings; - } - - /** - * Call - */ - public function call() - { - try { - $this->next->call(); - } catch (\Exception $e) { - $log = $this->app->getLog(); // Force Slim to append log to env if not already - $env = $this->app->environment(); - $env['slim.log'] = $log; - $env['slim.log']->error($e); - $this->app->contentType('text/html'); - $this->app->response()->status(500); - $this->app->response()->body($this->renderBody($env, $e)); - } - } - - /** - * Render response body - * @param array $env - * @param \Exception $exception - * @return string - */ - protected function renderBody(&$env, $exception) - { - $title = 'Slim Application Error'; - $code = $exception->getCode(); - $message = $exception->getMessage(); - $file = $exception->getFile(); - $line = $exception->getLine(); - $trace = str_replace(array('#', '\n'), array('
#', '
'), $exception->getTraceAsString()); - $html = sprintf('

%s

', $title); - $html .= '

The application could not run because of the following error:

'; - $html .= '

Details

'; - $html .= sprintf('
Type: %s
', get_class($exception)); - if ($code) { - $html .= sprintf('
Code: %s
', $code); - } - if ($message) { - $html .= sprintf('
Message: %s
', $message); - } - if ($file) { - $html .= sprintf('
File: %s
', $file); - } - if ($line) { - $html .= sprintf('
Line: %s
', $line); - } - if ($trace) { - $html .= '

Trace

'; - $html .= sprintf('
%s
', $trace); - } - - return sprintf("%s%s", $title, $html); - } -} diff --git a/html/lib/Slim/Middleware/SessionCookie.php b/html/lib/Slim/Middleware/SessionCookie.php deleted file mode 100644 index a467475d03..0000000000 --- a/html/lib/Slim/Middleware/SessionCookie.php +++ /dev/null @@ -1,210 +0,0 @@ - - * @copyright 2011 Josh Lockhart - * @link http://www.slimframework.com - * @license http://www.slimframework.com/license - * @version 2.4.2 - * @package Slim - * - * MIT LICENSE - * - * 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 Slim\Middleware; - -/** - * Session Cookie - * - * This class provides an HTTP cookie storage mechanism - * for session data. This class avoids using a PHP session - * and instead serializes/unserializes the $_SESSION global - * variable to/from an HTTP cookie. - * - * You should NEVER store sensitive data in a client-side cookie - * in any format, encrypted (with cookies.encrypt) or not. If you - * need to store sensitive user information in a session, you should - * rely on PHP's native session implementation, or use other middleware - * to store session data in a database or alternative server-side cache. - * - * Because this class stores serialized session data in an HTTP cookie, - * you are inherently limited to 4 Kb. If you attempt to store - * more than this amount, serialization will fail. - * - * @package Slim - * @author Josh Lockhart - * @since 1.6.0 - */ -class SessionCookie extends \Slim\Middleware -{ - /** - * @var array - */ - protected $settings; - - /** - * Constructor - * - * @param array $settings - */ - public function __construct($settings = array()) - { - $defaults = array( - 'expires' => '20 minutes', - 'path' => '/', - 'domain' => null, - 'secure' => false, - 'httponly' => false, - 'name' => 'slim_session', - ); - $this->settings = array_merge($defaults, $settings); - if (is_string($this->settings['expires'])) { - $this->settings['expires'] = strtotime($this->settings['expires']); - } - - /** - * Session - * - * We must start a native PHP session to initialize the $_SESSION superglobal. - * However, we won't be using the native session store for persistence, so we - * disable the session cookie and cache limiter. We also set the session - * handler to this class instance to avoid PHP's native session file locking. - */ - ini_set('session.use_cookies', 0); - session_cache_limiter(false); - session_set_save_handler( - array($this, 'open'), - array($this, 'close'), - array($this, 'read'), - array($this, 'write'), - array($this, 'destroy'), - array($this, 'gc') - ); - } - - /** - * Call - */ - public function call() - { - $this->loadSession(); - $this->next->call(); - $this->saveSession(); - } - - /** - * Load session - */ - protected function loadSession() - { - if (session_id() === '') { - session_start(); - } - - $value = $this->app->getCookie($this->settings['name']); - - if ($value) { - try { - $_SESSION = unserialize($value); - } catch (\Exception $e) { - $this->app->getLog()->error('Error unserializing session cookie value! ' . $e->getMessage()); - } - } else { - $_SESSION = array(); - } - } - - /** - * Save session - */ - protected function saveSession() - { - $value = serialize($_SESSION); - - if (strlen($value) > 4096) { - $this->app->getLog()->error('WARNING! Slim\Middleware\SessionCookie data size is larger than 4KB. Content save failed.'); - } else { - $this->app->setCookie( - $this->settings['name'], - $value, - $this->settings['expires'], - $this->settings['path'], - $this->settings['domain'], - $this->settings['secure'], - $this->settings['httponly'] - ); - } - // session_destroy(); - } - - /******************************************************************************** - * Session Handler - *******************************************************************************/ - - /** - * @codeCoverageIgnore - */ - public function open($savePath, $sessionName) - { - return true; - } - - /** - * @codeCoverageIgnore - */ - public function close() - { - return true; - } - - /** - * @codeCoverageIgnore - */ - public function read($id) - { - return ''; - } - - /** - * @codeCoverageIgnore - */ - public function write($id, $data) - { - return true; - } - - /** - * @codeCoverageIgnore - */ - public function destroy($id) - { - return true; - } - - /** - * @codeCoverageIgnore - */ - public function gc($maxlifetime) - { - return true; - } -} diff --git a/html/lib/Slim/Route.php b/html/lib/Slim/Route.php deleted file mode 100644 index 99b47a135f..0000000000 --- a/html/lib/Slim/Route.php +++ /dev/null @@ -1,465 +0,0 @@ - - * @copyright 2011 Josh Lockhart - * @link http://www.slimframework.com - * @license http://www.slimframework.com/license - * @version 2.4.2 - * @package Slim - * - * MIT LICENSE - * - * 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 Slim; - -/** - * Route - * @package Slim - * @author Josh Lockhart, Thomas Bley - * @since 1.0.0 - */ -class Route -{ - /** - * @var string The route pattern (e.g. "/books/:id") - */ - protected $pattern; - - /** - * @var mixed The route callable - */ - protected $callable; - - /** - * @var array Conditions for this route's URL parameters - */ - protected $conditions = array(); - - /** - * @var array Default conditions applied to all route instances - */ - protected static $defaultConditions = array(); - - /** - * @var string The name of this route (optional) - */ - protected $name; - - /** - * @var array Key-value array of URL parameters - */ - protected $params = array(); - - /** - * @var array value array of URL parameter names - */ - protected $paramNames = array(); - - /** - * @var array key array of URL parameter names with + at the end - */ - protected $paramNamesPath = array(); - - /** - * @var array HTTP methods supported by this Route - */ - protected $methods = array(); - - /** - * @var array[Callable] Middleware to be run before only this route instance - */ - protected $middleware = array(); - - /** - * @var bool Whether or not this route should be matched in a case-sensitive manner - */ - protected $caseSensitive; - - /** - * Constructor - * @param string $pattern The URL pattern (e.g. "/books/:id") - * @param mixed $callable Anything that returns TRUE for is_callable() - * @param bool $caseSensitive Whether or not this route should be matched in a case-sensitive manner - */ - public function __construct($pattern, $callable, $caseSensitive = true) - { - $this->setPattern($pattern); - $this->setCallable($callable); - $this->setConditions(self::getDefaultConditions()); - $this->caseSensitive = $caseSensitive; - } - - /** - * Set default route conditions for all instances - * @param array $defaultConditions - */ - public static function setDefaultConditions(array $defaultConditions) - { - self::$defaultConditions = $defaultConditions; - } - - /** - * Get default route conditions for all instances - * @return array - */ - public static function getDefaultConditions() - { - return self::$defaultConditions; - } - - /** - * Get route pattern - * @return string - */ - public function getPattern() - { - return $this->pattern; - } - - /** - * Set route pattern - * @param string $pattern - */ - public function setPattern($pattern) - { - $this->pattern = $pattern; - } - - /** - * Get route callable - * @return mixed - */ - public function getCallable() - { - return $this->callable; - } - - /** - * Set route callable - * @param mixed $callable - * @throws \InvalidArgumentException If argument is not callable - */ - public function setCallable($callable) - { - $matches = array(); - if (is_string($callable) && preg_match('!^([^\:]+)\:([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)$!', $callable, $matches)) { - $class = $matches[1]; - $method = $matches[2]; - $callable = function() use ($class, $method) { - static $obj = null; - if ($obj === null) { - $obj = new $class; - } - return call_user_func_array(array($obj, $method), func_get_args()); - }; - } - - if (!is_callable($callable)) { - throw new \InvalidArgumentException('Route callable must be callable'); - } - - $this->callable = $callable; - } - - /** - * Get route conditions - * @return array - */ - public function getConditions() - { - return $this->conditions; - } - - /** - * Set route conditions - * @param array $conditions - */ - public function setConditions(array $conditions) - { - $this->conditions = $conditions; - } - - /** - * Get route name - * @return string|null - */ - public function getName() - { - return $this->name; - } - - /** - * Set route name - * @param string $name - */ - public function setName($name) - { - $this->name = (string)$name; - } - - /** - * Get route parameters - * @return array - */ - public function getParams() - { - return $this->params; - } - - /** - * Set route parameters - * @param array $params - */ - public function setParams($params) - { - $this->params = $params; - } - - /** - * Get route parameter value - * @param string $index Name of URL parameter - * @return string - * @throws \InvalidArgumentException If route parameter does not exist at index - */ - public function getParam($index) - { - if (!isset($this->params[$index])) { - throw new \InvalidArgumentException('Route parameter does not exist at specified index'); - } - - return $this->params[$index]; - } - - /** - * Set route parameter value - * @param string $index Name of URL parameter - * @param mixed $value The new parameter value - * @throws \InvalidArgumentException If route parameter does not exist at index - */ - public function setParam($index, $value) - { - if (!isset($this->params[$index])) { - throw new \InvalidArgumentException('Route parameter does not exist at specified index'); - } - $this->params[$index] = $value; - } - - /** - * Add supported HTTP method(s) - */ - public function setHttpMethods() - { - $args = func_get_args(); - $this->methods = $args; - } - - /** - * Get supported HTTP methods - * @return array - */ - public function getHttpMethods() - { - return $this->methods; - } - - /** - * Append supported HTTP methods - */ - public function appendHttpMethods() - { - $args = func_get_args(); - $this->methods = array_merge($this->methods, $args); - } - - /** - * Append supported HTTP methods (alias for Route::appendHttpMethods) - * @return \Slim\Route - */ - public function via() - { - $args = func_get_args(); - $this->methods = array_merge($this->methods, $args); - - return $this; - } - - /** - * Detect support for an HTTP method - * @param string $method - * @return bool - */ - public function supportsHttpMethod($method) - { - return in_array($method, $this->methods); - } - - /** - * Get middleware - * @return array[Callable] - */ - public function getMiddleware() - { - return $this->middleware; - } - - /** - * Set middleware - * - * This method allows middleware to be assigned to a specific Route. - * If the method argument `is_callable` (including callable arrays!), - * we directly append the argument to `$this->middleware`. Else, we - * assume the argument is an array of callables and merge the array - * with `$this->middleware`. Each middleware is checked for is_callable() - * and an InvalidArgumentException is thrown immediately if it isn't. - * - * @param Callable|array[Callable] - * @return \Slim\Route - * @throws \InvalidArgumentException If argument is not callable or not an array of callables. - */ - public function setMiddleware($middleware) - { - if (is_callable($middleware)) { - $this->middleware[] = $middleware; - } elseif (is_array($middleware)) { - foreach ($middleware as $callable) { - if (!is_callable($callable)) { - throw new \InvalidArgumentException('All Route middleware must be callable'); - } - } - $this->middleware = array_merge($this->middleware, $middleware); - } else { - throw new \InvalidArgumentException('Route middleware must be callable or an array of callables'); - } - - return $this; - } - - /** - * Matches URI? - * - * Parse this route's pattern, and then compare it to an HTTP resource URI - * This method was modeled after the techniques demonstrated by Dan Sosedoff at: - * - * http://blog.sosedoff.com/2009/09/20/rails-like-php-url-router/ - * - * @param string $resourceUri A Request URI - * @return bool - */ - public function matches($resourceUri) - { - //Convert URL params into regex patterns, construct a regex for this route, init params - $patternAsRegex = preg_replace_callback( - '#:([\w]+)\+?#', - array($this, 'matchesCallback'), - str_replace(')', ')?', (string)$this->pattern) - ); - if (substr($this->pattern, -1) === '/') { - $patternAsRegex .= '?'; - } - - $regex = '#^' . $patternAsRegex . '$#'; - - if ($this->caseSensitive === false) { - $regex .= 'i'; - } - - //Cache URL params' names and values if this route matches the current HTTP request - if (!preg_match($regex, $resourceUri, $paramValues)) { - return false; - } - foreach ($this->paramNames as $name) { - if (isset($paramValues[$name])) { - if (isset($this->paramNamesPath[$name])) { - $this->params[$name] = explode('/', urldecode($paramValues[$name])); - } else { - $this->params[$name] = urldecode($paramValues[$name]); - } - } - } - - return true; - } - - /** - * Convert a URL parameter (e.g. ":id", ":id+") into a regular expression - * @param array $m URL parameters - * @return string Regular expression for URL parameter - */ - protected function matchesCallback($m) - { - $this->paramNames[] = $m[1]; - if (isset($this->conditions[$m[1]])) { - return '(?P<' . $m[1] . '>' . $this->conditions[$m[1]] . ')'; - } - if (substr($m[0], -1) === '+') { - $this->paramNamesPath[$m[1]] = 1; - - return '(?P<' . $m[1] . '>.+)'; - } - - return '(?P<' . $m[1] . '>[^/]+)'; - } - - /** - * Set route name - * @param string $name The name of the route - * @return \Slim\Route - */ - public function name($name) - { - $this->setName($name); - - return $this; - } - - /** - * Merge route conditions - * @param array $conditions Key-value array of URL parameter conditions - * @return \Slim\Route - */ - public function conditions(array $conditions) - { - $this->conditions = array_merge($this->conditions, $conditions); - - return $this; - } - - /** - * Dispatch route - * - * This method invokes the route object's callable. If middleware is - * registered for the route, each callable middleware is invoked in - * the order specified. - * - * @return bool - */ - public function dispatch() - { - foreach ($this->middleware as $mw) { - call_user_func_array($mw, array($this)); - } - - $return = call_user_func_array($this->getCallable(), array_values($this->getParams())); - return ($return === false) ? false : true; - } -} diff --git a/html/lib/Slim/Router.php b/html/lib/Slim/Router.php deleted file mode 100644 index b0e7a60f2c..0000000000 --- a/html/lib/Slim/Router.php +++ /dev/null @@ -1,257 +0,0 @@ - - * @copyright 2011 Josh Lockhart - * @link http://www.slimframework.com - * @license http://www.slimframework.com/license - * @version 2.4.2 - * @package Slim - * - * MIT LICENSE - * - * 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 Slim; - -/** - * Router - * - * This class organizes, iterates, and dispatches \Slim\Route objects. - * - * @package Slim - * @author Josh Lockhart - * @since 1.0.0 - */ -class Router -{ - /** - * @var Route The current route (most recently dispatched) - */ - protected $currentRoute; - - /** - * @var array Lookup hash of all route objects - */ - protected $routes; - - /** - * @var array Lookup hash of named route objects, keyed by route name (lazy-loaded) - */ - protected $namedRoutes; - - /** - * @var array Array of route objects that match the request URI (lazy-loaded) - */ - protected $matchedRoutes; - - /** - * @var array Array containing all route groups - */ - protected $routeGroups; - - /** - * Constructor - */ - public function __construct() - { - $this->routes = array(); - $this->routeGroups = array(); - } - - /** - * Get Current Route object or the first matched one if matching has been performed - * @return \Slim\Route|null - */ - public function getCurrentRoute() - { - if ($this->currentRoute !== null) { - return $this->currentRoute; - } - - if (is_array($this->matchedRoutes) && count($this->matchedRoutes) > 0) { - return $this->matchedRoutes[0]; - } - - return null; - } - - /** - * Return route objects that match the given HTTP method and URI - * @param string $httpMethod The HTTP method to match against - * @param string $resourceUri The resource URI to match against - * @param bool $reload Should matching routes be re-parsed? - * @return array[\Slim\Route] - */ - public function getMatchedRoutes($httpMethod, $resourceUri, $reload = false) - { - if ($reload || is_null($this->matchedRoutes)) { - $this->matchedRoutes = array(); - foreach ($this->routes as $route) { - if (!$route->supportsHttpMethod($httpMethod) && !$route->supportsHttpMethod("ANY")) { - continue; - } - - if ($route->matches($resourceUri)) { - $this->matchedRoutes[] = $route; - } - } - } - - return $this->matchedRoutes; - } - - /** - * Add a route object to the router - * @param \Slim\Route $route The Slim Route - */ - public function map(\Slim\Route $route) - { - list($groupPattern, $groupMiddleware) = $this->processGroups(); - - $route->setPattern($groupPattern . $route->getPattern()); - $this->routes[] = $route; - - - foreach ($groupMiddleware as $middleware) { - $route->setMiddleware($middleware); - } - } - - /** - * A helper function for processing the group's pattern and middleware - * @return array Returns an array with the elements: pattern, middlewareArr - */ - protected function processGroups() - { - $pattern = ""; - $middleware = array(); - foreach ($this->routeGroups as $group) { - $k = key($group); - $pattern .= $k; - if (is_array($group[$k])) { - $middleware = array_merge($middleware, $group[$k]); - } - } - return array($pattern, $middleware); - } - - /** - * Add a route group to the array - * @param string $group The group pattern (ie. "/books/:id") - * @param array|null $middleware Optional parameter array of middleware - * @return int The index of the new group - */ - public function pushGroup($group, $middleware = array()) - { - return array_push($this->routeGroups, array($group => $middleware)); - } - - /** - * Removes the last route group from the array - * @return bool True if successful, else False - */ - public function popGroup() - { - return (array_pop($this->routeGroups) !== null); - } - - /** - * Get URL for named route - * @param string $name The name of the route - * @param array $params Associative array of URL parameter names and replacement values - * @throws \RuntimeException If named route not found - * @return string The URL for the given route populated with provided replacement values - */ - public function urlFor($name, $params = array()) - { - if (!$this->hasNamedRoute($name)) { - throw new \RuntimeException('Named route not found for name: ' . $name); - } - $search = array(); - foreach ($params as $key => $value) { - $search[] = '#:' . preg_quote($key, '#') . '\+?(?!\w)#'; - } - $pattern = preg_replace($search, $params, $this->getNamedRoute($name)->getPattern()); - - //Remove remnants of unpopulated, trailing optional pattern segments, escaped special characters - return preg_replace('#\(/?:.+\)|\(|\)|\\\\#', '', $pattern); - } - - /** - * Add named route - * @param string $name The route name - * @param \Slim\Route $route The route object - * @throws \RuntimeException If a named route already exists with the same name - */ - public function addNamedRoute($name, \Slim\Route $route) - { - if ($this->hasNamedRoute($name)) { - throw new \RuntimeException('Named route already exists with name: ' . $name); - } - $this->namedRoutes[(string) $name] = $route; - } - - /** - * Has named route - * @param string $name The route name - * @return bool - */ - public function hasNamedRoute($name) - { - $this->getNamedRoutes(); - - return isset($this->namedRoutes[(string) $name]); - } - - /** - * Get named route - * @param string $name - * @return \Slim\Route|null - */ - public function getNamedRoute($name) - { - $this->getNamedRoutes(); - if ($this->hasNamedRoute($name)) { - return $this->namedRoutes[(string) $name]; - } else { - return null; - } - } - - /** - * Get named routes - * @return \ArrayIterator - */ - public function getNamedRoutes() - { - if (is_null($this->namedRoutes)) { - $this->namedRoutes = array(); - foreach ($this->routes as $route) { - if ($route->getName() !== null) { - $this->addNamedRoute($route->getName(), $route); - } - } - } - - return new \ArrayIterator($this->namedRoutes); - } -} diff --git a/html/lib/Slim/Slim.php b/html/lib/Slim/Slim.php deleted file mode 100644 index cb8ef664bf..0000000000 --- a/html/lib/Slim/Slim.php +++ /dev/null @@ -1,1412 +0,0 @@ - - * @copyright 2011 Josh Lockhart - * @link http://www.slimframework.com - * @license http://www.slimframework.com/license - * @version 2.4.2 - * @package Slim - * - * MIT LICENSE - * - * 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 Slim; - -// Ensure mcrypt constants are defined even if mcrypt extension is not loaded -if (!extension_loaded('mcrypt')) { - define('MCRYPT_MODE_CBC', 0); - define('MCRYPT_RIJNDAEL_256', 0); -} - -/** - * Slim - * @package Slim - * @author Josh Lockhart - * @since 1.0.0 - * - * @property \Slim\Environment $environment - * @property \Slim\Http\Response $response - * @property \Slim\Http\Request $request - * @property \Slim\Router $router - */ -class Slim -{ - /** - * @const string - */ - const VERSION = '2.4.2'; - - /** - * @var \Slim\Helper\Set - */ - public $container; - - /** - * @var array[\Slim] - */ - protected static $apps = array(); - - /** - * @var string - */ - protected $name; - - /** - * @var array - */ - protected $middleware; - - /** - * @var mixed Callable to be invoked if application error - */ - protected $error; - - /** - * @var mixed Callable to be invoked if no matching routes are found - */ - protected $notFound; - - /** - * @var array - */ - protected $hooks = array( - 'slim.before' => array(array()), - 'slim.before.router' => array(array()), - 'slim.before.dispatch' => array(array()), - 'slim.after.dispatch' => array(array()), - 'slim.after.router' => array(array()), - 'slim.after' => array(array()) - ); - - /******************************************************************************** - * PSR-0 Autoloader - * - * Do not use if you are using Composer to autoload dependencies. - *******************************************************************************/ - - /** - * Slim PSR-0 autoloader - */ - public static function autoload($className) - { - $thisClass = str_replace(__NAMESPACE__.'\\', '', __CLASS__); - - $baseDir = __DIR__; - - if (substr($baseDir, -strlen($thisClass)) === $thisClass) { - $baseDir = substr($baseDir, 0, -strlen($thisClass)); - } - - $className = ltrim($className, '\\'); - $fileName = $baseDir; - $namespace = ''; - if ($lastNsPos = strripos($className, '\\')) { - $namespace = substr($className, 0, $lastNsPos); - $className = substr($className, $lastNsPos + 1); - $fileName .= str_replace('\\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR; - } - $fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php'; - - if (file_exists($fileName)) { - require $fileName; - } - } - - /** - * Register Slim's PSR-0 autoloader - */ - public static function registerAutoloader() - { - spl_autoload_register(__NAMESPACE__ . "\\Slim::autoload"); - } - - /******************************************************************************** - * Instantiation and Configuration - *******************************************************************************/ - - /** - * Constructor - * @param array $userSettings Associative array of application settings - */ - public function __construct(array $userSettings = array()) - { - // Setup IoC container - $this->container = new \Slim\Helper\Set(); - $this->container['settings'] = array_merge(static::getDefaultSettings(), $userSettings); - - // Default environment - $this->container->singleton('environment', function ($c) { - return \Slim\Environment::getInstance(); - }); - - // Default request - $this->container->singleton('request', function ($c) { - return new \Slim\Http\Request($c['environment']); - }); - - // Default response - $this->container->singleton('response', function ($c) { - return new \Slim\Http\Response(); - }); - - // Default router - $this->container->singleton('router', function ($c) { - return new \Slim\Router(); - }); - - // Default view - $this->container->singleton('view', function ($c) { - $viewClass = $c['settings']['view']; - $templatesPath = $c['settings']['templates.path']; - - $view = ($viewClass instanceOf \Slim\View) ? $viewClass : new $viewClass; - $view->setTemplatesDirectory($templatesPath); - return $view; - }); - - // Default log writer - $this->container->singleton('logWriter', function ($c) { - $logWriter = $c['settings']['log.writer']; - - return is_object($logWriter) ? $logWriter : new \Slim\LogWriter($c['environment']['slim.errors']); - }); - - // Default log - $this->container->singleton('log', function ($c) { - $log = new \Slim\Log($c['logWriter']); - $log->setEnabled($c['settings']['log.enabled']); - $log->setLevel($c['settings']['log.level']); - $env = $c['environment']; - $env['slim.log'] = $log; - - return $log; - }); - - // Default mode - $this->container['mode'] = function ($c) { - $mode = $c['settings']['mode']; - - if (isset($_ENV['SLIM_MODE'])) { - $mode = $_ENV['SLIM_MODE']; - } else { - $envMode = getenv('SLIM_MODE'); - if ($envMode !== false) { - $mode = $envMode; - } - } - - return $mode; - }; - - // Define default middleware stack - $this->middleware = array($this); - $this->add(new \Slim\Middleware\Flash()); - $this->add(new \Slim\Middleware\MethodOverride()); - - // Make default if first instance - if (is_null(static::getInstance())) { - $this->setName('default'); - } - } - - public function __get($name) - { - return $this->container[$name]; - } - - public function __set($name, $value) - { - $this->container[$name] = $value; - } - - public function __isset($name) - { - return isset($this->container[$name]); - } - - public function __unset($name) - { - unset($this->container[$name]); - } - - /** - * Get application instance by name - * @param string $name The name of the Slim application - * @return \Slim\Slim|null - */ - public static function getInstance($name = 'default') - { - return isset(static::$apps[$name]) ? static::$apps[$name] : null; - } - - /** - * Set Slim application name - * @param string $name The name of this Slim application - */ - public function setName($name) - { - $this->name = $name; - static::$apps[$name] = $this; - } - - /** - * Get Slim application name - * @return string|null - */ - public function getName() - { - return $this->name; - } - - /** - * Get default application settings - * @return array - */ - public static function getDefaultSettings() - { - return array( - // Application - 'mode' => 'development', - // Debugging - 'debug' => true, - // Logging - 'log.writer' => null, - 'log.level' => \Slim\Log::DEBUG, - 'log.enabled' => true, - // View - 'templates.path' => './templates', - 'view' => '\Slim\View', - // Cookies - 'cookies.encrypt' => false, - 'cookies.lifetime' => '20 minutes', - 'cookies.path' => '/', - 'cookies.domain' => null, - 'cookies.secure' => false, - 'cookies.httponly' => false, - // Encryption - 'cookies.secret_key' => 'CHANGE_ME', - 'cookies.cipher' => MCRYPT_RIJNDAEL_256, - 'cookies.cipher_mode' => MCRYPT_MODE_CBC, - // HTTP - 'http.version' => '1.1', - // Routing - 'routes.case_sensitive' => true - ); - } - - /** - * Configure Slim Settings - * - * This method defines application settings and acts as a setter and a getter. - * - * If only one argument is specified and that argument is a string, the value - * of the setting identified by the first argument will be returned, or NULL if - * that setting does not exist. - * - * If only one argument is specified and that argument is an associative array, - * the array will be merged into the existing application settings. - * - * If two arguments are provided, the first argument is the name of the setting - * to be created or updated, and the second argument is the setting value. - * - * @param string|array $name If a string, the name of the setting to set or retrieve. Else an associated array of setting names and values - * @param mixed $value If name is a string, the value of the setting identified by $name - * @return mixed The value of a setting if only one argument is a string - */ - public function config($name, $value = null) - { - $c = $this->container; - - if (is_array($name)) { - if (true === $value) { - $c['settings'] = array_merge_recursive($c['settings'], $name); - } else { - $c['settings'] = array_merge($c['settings'], $name); - } - } elseif (func_num_args() === 1) { - return isset($c['settings'][$name]) ? $c['settings'][$name] : null; - } else { - $settings = $c['settings']; - $settings[$name] = $value; - $c['settings'] = $settings; - } - } - - /******************************************************************************** - * Application Modes - *******************************************************************************/ - - /** - * Get application mode - * - * This method determines the application mode. It first inspects the $_ENV - * superglobal for key `SLIM_MODE`. If that is not found, it queries - * the `getenv` function. Else, it uses the application `mode` setting. - * - * @return string - */ - public function getMode() - { - return $this->mode; - } - - /** - * Configure Slim for a given mode - * - * This method will immediately invoke the callable if - * the specified mode matches the current application mode. - * Otherwise, the callable is ignored. This should be called - * only _after_ you initialize your Slim app. - * - * @param string $mode - * @param mixed $callable - * @return void - */ - public function configureMode($mode, $callable) - { - if ($mode === $this->getMode() && is_callable($callable)) { - call_user_func($callable); - } - } - - /******************************************************************************** - * Logging - *******************************************************************************/ - - /** - * Get application log - * @return \Slim\Log - */ - public function getLog() - { - return $this->log; - } - - /******************************************************************************** - * Routing - *******************************************************************************/ - - /** - * Add GET|POST|PUT|PATCH|DELETE route - * - * Adds a new route to the router with associated callable. This - * route will only be invoked when the HTTP request's method matches - * this route's method. - * - * ARGUMENTS: - * - * First: string The URL pattern (REQUIRED) - * In-Between: mixed Anything that returns TRUE for `is_callable` (OPTIONAL) - * Last: mixed Anything that returns TRUE for `is_callable` (REQUIRED) - * - * The first argument is required and must always be the - * route pattern (ie. '/books/:id'). - * - * The last argument is required and must always be the callable object - * to be invoked when the route matches an HTTP request. - * - * You may also provide an unlimited number of in-between arguments; - * each interior argument must be callable and will be invoked in the - * order specified before the route's callable is invoked. - * - * USAGE: - * - * Slim::get('/foo'[, middleware, middleware, ...], callable); - * - * @param array (See notes above) - * @return \Slim\Route - */ - protected function mapRoute($args) - { - $pattern = array_shift($args); - $callable = array_pop($args); - $route = new \Slim\Route($pattern, $callable, $this->settings['routes.case_sensitive']); - $this->router->map($route); - if (count($args) > 0) { - $route->setMiddleware($args); - } - - return $route; - } - - /** - * Add generic route without associated HTTP method - * @see mapRoute() - * @return \Slim\Route - */ - public function map() - { - $args = func_get_args(); - - return $this->mapRoute($args); - } - - /** - * Add GET route - * @see mapRoute() - * @return \Slim\Route - */ - public function get() - { - $args = func_get_args(); - - return $this->mapRoute($args)->via(\Slim\Http\Request::METHOD_GET, \Slim\Http\Request::METHOD_HEAD); - } - - /** - * Add POST route - * @see mapRoute() - * @return \Slim\Route - */ - public function post() - { - $args = func_get_args(); - - return $this->mapRoute($args)->via(\Slim\Http\Request::METHOD_POST); - } - - /** - * Add PUT route - * @see mapRoute() - * @return \Slim\Route - */ - public function put() - { - $args = func_get_args(); - - return $this->mapRoute($args)->via(\Slim\Http\Request::METHOD_PUT); - } - - /** - * Add PATCH route - * @see mapRoute() - * @return \Slim\Route - */ - public function patch() - { - $args = func_get_args(); - - return $this->mapRoute($args)->via(\Slim\Http\Request::METHOD_PATCH); - } - - /** - * Add DELETE route - * @see mapRoute() - * @return \Slim\Route - */ - public function delete() - { - $args = func_get_args(); - - return $this->mapRoute($args)->via(\Slim\Http\Request::METHOD_DELETE); - } - - /** - * Add OPTIONS route - * @see mapRoute() - * @return \Slim\Route - */ - public function options() - { - $args = func_get_args(); - - return $this->mapRoute($args)->via(\Slim\Http\Request::METHOD_OPTIONS); - } - - /** - * Route Groups - * - * This method accepts a route pattern and a callback all Route - * declarations in the callback will be prepended by the group(s) - * that it is in - * - * Accepts the same parameters as a standard route so: - * (pattern, middleware1, middleware2, ..., $callback) - */ - public function group() - { - $args = func_get_args(); - $pattern = array_shift($args); - $callable = array_pop($args); - $this->router->pushGroup($pattern, $args); - if (is_callable($callable)) { - call_user_func($callable); - } - $this->router->popGroup(); - } - - /* - * Add route for any HTTP method - * @see mapRoute() - * @return \Slim\Route - */ - public function any() - { - $args = func_get_args(); - - return $this->mapRoute($args)->via("ANY"); - } - - /** - * Not Found Handler - * - * This method defines or invokes the application-wide Not Found handler. - * There are two contexts in which this method may be invoked: - * - * 1. When declaring the handler: - * - * If the $callable parameter is not null and is callable, this - * method will register the callable to be invoked when no - * routes match the current HTTP request. It WILL NOT invoke the callable. - * - * 2. When invoking the handler: - * - * If the $callable parameter is null, Slim assumes you want - * to invoke an already-registered handler. If the handler has been - * registered and is callable, it is invoked and sends a 404 HTTP Response - * whose body is the output of the Not Found handler. - * - * @param mixed $callable Anything that returns true for is_callable() - */ - public function notFound ($callable = null) - { - if (is_callable($callable)) { - $this->notFound = $callable; - } else { - ob_start(); - if (is_callable($this->notFound)) { - call_user_func($this->notFound); - } else { - call_user_func(array($this, 'defaultNotFound')); - } - $this->halt(404, ob_get_clean()); - } - } - - /** - * Error Handler - * - * This method defines or invokes the application-wide Error handler. - * There are two contexts in which this method may be invoked: - * - * 1. When declaring the handler: - * - * If the $argument parameter is callable, this - * method will register the callable to be invoked when an uncaught - * Exception is detected, or when otherwise explicitly invoked. - * The handler WILL NOT be invoked in this context. - * - * 2. When invoking the handler: - * - * If the $argument parameter is not callable, Slim assumes you want - * to invoke an already-registered handler. If the handler has been - * registered and is callable, it is invoked and passed the caught Exception - * as its one and only argument. The error handler's output is captured - * into an output buffer and sent as the body of a 500 HTTP Response. - * - * @param mixed $argument Callable|\Exception - */ - public function error($argument = null) - { - if (is_callable($argument)) { - //Register error handler - $this->error = $argument; - } else { - //Invoke error handler - $this->response->status(500); - $this->response->body(''); - $this->response->write($this->callErrorHandler($argument)); - $this->stop(); - } - } - - /** - * Call error handler - * - * This will invoke the custom or default error handler - * and RETURN its output. - * - * @param \Exception|null $argument - * @return string - */ - protected function callErrorHandler($argument = null) - { - ob_start(); - if (is_callable($this->error)) { - call_user_func_array($this->error, array($argument)); - } else { - call_user_func_array(array($this, 'defaultError'), array($argument)); - } - - return ob_get_clean(); - } - - /******************************************************************************** - * Application Accessors - *******************************************************************************/ - - /** - * Get a reference to the Environment object - * @return \Slim\Environment - */ - public function environment() - { - return $this->environment; - } - - /** - * Get the Request object - * @return \Slim\Http\Request - */ - public function request() - { - return $this->request; - } - - /** - * Get the Response object - * @return \Slim\Http\Response - */ - public function response() - { - return $this->response; - } - - /** - * Get the Router object - * @return \Slim\Router - */ - public function router() - { - return $this->router; - } - - /** - * Get and/or set the View - * - * This method declares the View to be used by the Slim application. - * If the argument is a string, Slim will instantiate a new object - * of the same class. If the argument is an instance of View or a subclass - * of View, Slim will use the argument as the View. - * - * If a View already exists and this method is called to create a - * new View, data already set in the existing View will be - * transferred to the new View. - * - * @param string|\Slim\View $viewClass The name or instance of a \Slim\View subclass - * @return \Slim\View - */ - public function view($viewClass = null) - { - if (!is_null($viewClass)) { - $existingData = is_null($this->view) ? array() : $this->view->getData(); - if ($viewClass instanceOf \Slim\View) { - $this->view = $viewClass; - } else { - $this->view = new $viewClass(); - } - $this->view->appendData($existingData); - $this->view->setTemplatesDirectory($this->config('templates.path')); - } - - return $this->view; - } - - /******************************************************************************** - * Rendering - *******************************************************************************/ - - /** - * Render a template - * - * Call this method within a GET, POST, PUT, PATCH, DELETE, NOT FOUND, or ERROR - * callable to render a template whose output is appended to the - * current HTTP response body. How the template is rendered is - * delegated to the current View. - * - * @param string $template The name of the template passed into the view's render() method - * @param array $data Associative array of data made available to the view - * @param int $status The HTTP response status code to use (optional) - */ - public function render($template, $data = array(), $status = null) - { - if (!is_null($status)) { - $this->response->status($status); - } - $this->view->appendData($data); - $this->view->display($template); - } - - /******************************************************************************** - * HTTP Caching - *******************************************************************************/ - - /** - * Set Last-Modified HTTP Response Header - * - * Set the HTTP 'Last-Modified' header and stop if a conditional - * GET request's `If-Modified-Since` header matches the last modified time - * of the resource. The `time` argument is a UNIX timestamp integer value. - * When the current request includes an 'If-Modified-Since' header that - * matches the specified last modified time, the application will stop - * and send a '304 Not Modified' response to the client. - * - * @param int $time The last modified UNIX timestamp - * @throws \InvalidArgumentException If provided timestamp is not an integer - */ - public function lastModified($time) - { - if (is_integer($time)) { - $this->response->headers->set('Last-Modified', gmdate('D, d M Y H:i:s T', $time)); - if ($time === strtotime($this->request->headers->get('IF_MODIFIED_SINCE'))) { - $this->halt(304); - } - } else { - throw new \InvalidArgumentException('Slim::lastModified only accepts an integer UNIX timestamp value.'); - } - } - - /** - * Set ETag HTTP Response Header - * - * Set the etag header and stop if the conditional GET request matches. - * The `value` argument is a unique identifier for the current resource. - * The `type` argument indicates whether the etag should be used as a strong or - * weak cache validator. - * - * When the current request includes an 'If-None-Match' header with - * a matching etag, execution is immediately stopped. If the request - * method is GET or HEAD, a '304 Not Modified' response is sent. - * - * @param string $value The etag value - * @param string $type The type of etag to create; either "strong" or "weak" - * @throws \InvalidArgumentException If provided type is invalid - */ - public function etag($value, $type = 'strong') - { - //Ensure type is correct - if (!in_array($type, array('strong', 'weak'))) { - throw new \InvalidArgumentException('Invalid Slim::etag type. Expected "strong" or "weak".'); - } - - //Set etag value - $value = '"' . $value . '"'; - if ($type === 'weak') { - $value = 'W/'.$value; - } - $this->response['ETag'] = $value; - - //Check conditional GET - if ($etagsHeader = $this->request->headers->get('IF_NONE_MATCH')) { - $etags = preg_split('@\s*,\s*@', $etagsHeader); - if (in_array($value, $etags) || in_array('*', $etags)) { - $this->halt(304); - } - } - } - - /** - * Set Expires HTTP response header - * - * The `Expires` header tells the HTTP client the time at which - * the current resource should be considered stale. At that time the HTTP - * client will send a conditional GET request to the server; the server - * may return a 200 OK if the resource has changed, else a 304 Not Modified - * if the resource has not changed. The `Expires` header should be used in - * conjunction with the `etag()` or `lastModified()` methods above. - * - * @param string|int $time If string, a time to be parsed by `strtotime()`; - * If int, a UNIX timestamp; - */ - public function expires($time) - { - if (is_string($time)) { - $time = strtotime($time); - } - $this->response->headers->set('Expires', gmdate('D, d M Y H:i:s T', $time)); - } - - /******************************************************************************** - * HTTP Cookies - *******************************************************************************/ - - /** - * Set HTTP cookie to be sent with the HTTP response - * - * @param string $name The cookie name - * @param string $value The cookie value - * @param int|string $time The duration of the cookie; - * If integer, should be UNIX timestamp; - * If string, converted to UNIX timestamp with `strtotime`; - * @param string $path The path on the server in which the cookie will be available on - * @param string $domain The domain that the cookie is available to - * @param bool $secure Indicates that the cookie should only be transmitted over a secure - * HTTPS connection to/from the client - * @param bool $httponly When TRUE the cookie will be made accessible only through the HTTP protocol - */ - public function setCookie($name, $value, $time = null, $path = null, $domain = null, $secure = null, $httponly = null) - { - $settings = array( - 'value' => $value, - 'expires' => is_null($time) ? $this->config('cookies.lifetime') : $time, - 'path' => is_null($path) ? $this->config('cookies.path') : $path, - 'domain' => is_null($domain) ? $this->config('cookies.domain') : $domain, - 'secure' => is_null($secure) ? $this->config('cookies.secure') : $secure, - 'httponly' => is_null($httponly) ? $this->config('cookies.httponly') : $httponly - ); - $this->response->cookies->set($name, $settings); - } - - /** - * Get value of HTTP cookie from the current HTTP request - * - * Return the value of a cookie from the current HTTP request, - * or return NULL if cookie does not exist. Cookies created during - * the current request will not be available until the next request. - * - * @param string $name - * @param bool $deleteIfInvalid - * @return string|null - */ - public function getCookie($name, $deleteIfInvalid = true) - { - // Get cookie value - $value = $this->request->cookies->get($name); - - // Decode if encrypted - if ($this->config('cookies.encrypt')) { - $value = \Slim\Http\Util::decodeSecureCookie( - $value, - $this->config('cookies.secret_key'), - $this->config('cookies.cipher'), - $this->config('cookies.cipher_mode') - ); - if ($value === false && $deleteIfInvalid) { - $this->deleteCookie($name); - } - } - - return $value; - } - - /** - * DEPRECATION WARNING! Use `setCookie` with the `cookies.encrypt` app setting set to `true`. - * - * Set encrypted HTTP cookie - * - * @param string $name The cookie name - * @param mixed $value The cookie value - * @param mixed $expires The duration of the cookie; - * If integer, should be UNIX timestamp; - * If string, converted to UNIX timestamp with `strtotime`; - * @param string $path The path on the server in which the cookie will be available on - * @param string $domain The domain that the cookie is available to - * @param bool $secure Indicates that the cookie should only be transmitted over a secure - * HTTPS connection from the client - * @param bool $httponly When TRUE the cookie will be made accessible only through the HTTP protocol - */ - public function setEncryptedCookie($name, $value, $expires = null, $path = null, $domain = null, $secure = false, $httponly = false) - { - $this->setCookie($name, $value, $expires, $path, $domain, $secure, $httponly); - } - - /** - * DEPRECATION WARNING! Use `getCookie` with the `cookies.encrypt` app setting set to `true`. - * - * Get value of encrypted HTTP cookie - * - * Return the value of an encrypted cookie from the current HTTP request, - * or return NULL if cookie does not exist. Encrypted cookies created during - * the current request will not be available until the next request. - * - * @param string $name - * @param bool $deleteIfInvalid - * @return string|bool - */ - public function getEncryptedCookie($name, $deleteIfInvalid = true) - { - return $this->getCookie($name, $deleteIfInvalid); - } - - /** - * Delete HTTP cookie (encrypted or unencrypted) - * - * Remove a Cookie from the client. This method will overwrite an existing Cookie - * with a new, empty, auto-expiring Cookie. This method's arguments must match - * the original Cookie's respective arguments for the original Cookie to be - * removed. If any of this method's arguments are omitted or set to NULL, the - * default Cookie setting values (set during Slim::init) will be used instead. - * - * @param string $name The cookie name - * @param string $path The path on the server in which the cookie will be available on - * @param string $domain The domain that the cookie is available to - * @param bool $secure Indicates that the cookie should only be transmitted over a secure - * HTTPS connection from the client - * @param bool $httponly When TRUE the cookie will be made accessible only through the HTTP protocol - */ - public function deleteCookie($name, $path = null, $domain = null, $secure = null, $httponly = null) - { - $settings = array( - 'domain' => is_null($domain) ? $this->config('cookies.domain') : $domain, - 'path' => is_null($path) ? $this->config('cookies.path') : $path, - 'secure' => is_null($secure) ? $this->config('cookies.secure') : $secure, - 'httponly' => is_null($httponly) ? $this->config('cookies.httponly') : $httponly - ); - $this->response->cookies->remove($name, $settings); - } - - /******************************************************************************** - * Helper Methods - *******************************************************************************/ - - /** - * Get the absolute path to this Slim application's root directory - * - * This method returns the absolute path to the Slim application's - * directory. If the Slim application is installed in a public-accessible - * sub-directory, the sub-directory path will be included. This method - * will always return an absolute path WITH a trailing slash. - * - * @return string - */ - public function root() - { - return rtrim($_SERVER['DOCUMENT_ROOT'], '/') . rtrim($this->request->getRootUri(), '/') . '/'; - } - - /** - * Clean current output buffer - */ - protected function cleanBuffer() - { - if (ob_get_level() !== 0) { - ob_clean(); - } - } - - /** - * Stop - * - * The thrown exception will be caught in application's `call()` method - * and the response will be sent as is to the HTTP client. - * - * @throws \Slim\Exception\Stop - */ - public function stop() - { - throw new \Slim\Exception\Stop(); - } - - /** - * Halt - * - * Stop the application and immediately send the response with a - * specific status and body to the HTTP client. This may send any - * type of response: info, success, redirect, client error, or server error. - * If you need to render a template AND customize the response status, - * use the application's `render()` method instead. - * - * @param int $status The HTTP response status - * @param string $message The HTTP response body - */ - public function halt($status, $message = '') - { - $this->cleanBuffer(); - $this->response->status($status); - $this->response->body($message); - $this->stop(); - } - - /** - * Pass - * - * The thrown exception is caught in the application's `call()` method causing - * the router's current iteration to stop and continue to the subsequent route if available. - * If no subsequent matching routes are found, a 404 response will be sent to the client. - * - * @throws \Slim\Exception\Pass - */ - public function pass() - { - $this->cleanBuffer(); - throw new \Slim\Exception\Pass(); - } - - /** - * Set the HTTP response Content-Type - * @param string $type The Content-Type for the Response (ie. text/html) - */ - public function contentType($type) - { - $this->response->headers->set('Content-Type', $type); - } - - /** - * Set the HTTP response status code - * @param int $code The HTTP response status code - */ - public function status($code) - { - $this->response->setStatus($code); - } - - /** - * Get the URL for a named route - * @param string $name The route name - * @param array $params Associative array of URL parameters and replacement values - * @throws \RuntimeException If named route does not exist - * @return string - */ - public function urlFor($name, $params = array()) - { - return $this->request->getRootUri() . $this->router->urlFor($name, $params); - } - - /** - * Redirect - * - * This method immediately redirects to a new URL. By default, - * this issues a 302 Found response; this is considered the default - * generic redirect response. You may also specify another valid - * 3xx status code if you want. This method will automatically set the - * HTTP Location header for you using the URL parameter. - * - * @param string $url The destination URL - * @param int $status The HTTP redirect status code (optional) - */ - public function redirect($url, $status = 302) - { - $this->response->redirect($url, $status); - $this->halt($status); - } - - /******************************************************************************** - * Flash Messages - *******************************************************************************/ - - /** - * Set flash message for subsequent request - * @param string $key - * @param mixed $value - */ - public function flash($key, $value) - { - if (isset($this->environment['slim.flash'])) { - $this->environment['slim.flash']->set($key, $value); - } - } - - /** - * Set flash message for current request - * @param string $key - * @param mixed $value - */ - public function flashNow($key, $value) - { - if (isset($this->environment['slim.flash'])) { - $this->environment['slim.flash']->now($key, $value); - } - } - - /** - * Keep flash messages from previous request for subsequent request - */ - public function flashKeep() - { - if (isset($this->environment['slim.flash'])) { - $this->environment['slim.flash']->keep(); - } - } - - /******************************************************************************** - * Hooks - *******************************************************************************/ - - /** - * Assign hook - * @param string $name The hook name - * @param mixed $callable A callable object - * @param int $priority The hook priority; 0 = high, 10 = low - */ - public function hook($name, $callable, $priority = 10) - { - if (!isset($this->hooks[$name])) { - $this->hooks[$name] = array(array()); - } - if (is_callable($callable)) { - $this->hooks[$name][(int) $priority][] = $callable; - } - } - - /** - * Invoke hook - * @param string $name The hook name - * @param mixed $hookArg (Optional) Argument for hooked functions - */ - public function applyHook($name, $hookArg = null) - { - if (!isset($this->hooks[$name])) { - $this->hooks[$name] = array(array()); - } - if (!empty($this->hooks[$name])) { - // Sort by priority, low to high, if there's more than one priority - if (count($this->hooks[$name]) > 1) { - ksort($this->hooks[$name]); - } - foreach ($this->hooks[$name] as $priority) { - if (!empty($priority)) { - foreach ($priority as $callable) { - call_user_func($callable, $hookArg); - } - } - } - } - } - - /** - * Get hook listeners - * - * Return an array of registered hooks. If `$name` is a valid - * hook name, only the listeners attached to that hook are returned. - * Else, all listeners are returned as an associative array whose - * keys are hook names and whose values are arrays of listeners. - * - * @param string $name A hook name (Optional) - * @return array|null - */ - public function getHooks($name = null) - { - if (!is_null($name)) { - return isset($this->hooks[(string) $name]) ? $this->hooks[(string) $name] : null; - } else { - return $this->hooks; - } - } - - /** - * Clear hook listeners - * - * Clear all listeners for all hooks. If `$name` is - * a valid hook name, only the listeners attached - * to that hook will be cleared. - * - * @param string $name A hook name (Optional) - */ - public function clearHooks($name = null) - { - if (!is_null($name) && isset($this->hooks[(string) $name])) { - $this->hooks[(string) $name] = array(array()); - } else { - foreach ($this->hooks as $key => $value) { - $this->hooks[$key] = array(array()); - } - } - } - - /******************************************************************************** - * Middleware - *******************************************************************************/ - - /** - * Add middleware - * - * This method prepends new middleware to the application middleware stack. - * The argument must be an instance that subclasses Slim_Middleware. - * - * @param \Slim\Middleware - */ - public function add(\Slim\Middleware $newMiddleware) - { - if(in_array($newMiddleware, $this->middleware)) { - $middleware_class = get_class($newMiddleware); - throw new \RuntimeException("Circular Middleware setup detected. Tried to queue the same Middleware instance ({$middleware_class}) twice."); - } - $newMiddleware->setApplication($this); - $newMiddleware->setNextMiddleware($this->middleware[0]); - array_unshift($this->middleware, $newMiddleware); - } - - /******************************************************************************** - * Runner - *******************************************************************************/ - - /** - * Run - * - * This method invokes the middleware stack, including the core Slim application; - * the result is an array of HTTP status, header, and body. These three items - * are returned to the HTTP client. - */ - public function run() - { - set_error_handler(array('\Slim\Slim', 'handleErrors')); - - //Apply final outer middleware layers - if ($this->config('debug')) { - //Apply pretty exceptions only in debug to avoid accidental information leakage in production - $this->add(new \Slim\Middleware\PrettyExceptions()); - } - - //Invoke middleware and application stack - $this->middleware[0]->call(); - - //Fetch status, header, and body - list($status, $headers, $body) = $this->response->finalize(); - - // Serialize cookies (with optional encryption) - \Slim\Http\Util::serializeCookies($headers, $this->response->cookies, $this->settings); - - //Send headers - if (headers_sent() === false) { - //Send status - if (strpos(PHP_SAPI, 'cgi') === 0) { - header(sprintf('Status: %s', \Slim\Http\Response::getMessageForCode($status))); - } else { - header(sprintf('HTTP/%s %s', $this->config('http.version'), \Slim\Http\Response::getMessageForCode($status))); - } - - //Send headers - foreach ($headers as $name => $value) { - $hValues = explode("\n", $value); - foreach ($hValues as $hVal) { - header("$name: $hVal", false); - } - } - } - - //Send body, but only if it isn't a HEAD request - if (!$this->request->isHead()) { - echo $body; - } - - $this->applyHook('slim.after'); - - restore_error_handler(); - } - - /** - * Call - * - * This method finds and iterates all route objects that match the current request URI. - */ - public function call() - { - try { - if (isset($this->environment['slim.flash'])) { - $this->view()->setData('flash', $this->environment['slim.flash']); - } - $this->applyHook('slim.before'); - ob_start(); - $this->applyHook('slim.before.router'); - $dispatched = false; - $matchedRoutes = $this->router->getMatchedRoutes($this->request->getMethod(), $this->request->getResourceUri()); - foreach ($matchedRoutes as $route) { - try { - $this->applyHook('slim.before.dispatch'); - $dispatched = $route->dispatch(); - $this->applyHook('slim.after.dispatch'); - if ($dispatched) { - break; - } - } catch (\Slim\Exception\Pass $e) { - continue; - } - } - if (!$dispatched) { - $this->notFound(); - } - $this->applyHook('slim.after.router'); - $this->stop(); - } catch (\Slim\Exception\Stop $e) { - $this->response()->write(ob_get_clean()); - } catch (\Exception $e) { - if ($this->config('debug')) { - throw $e; - } else { - try { - $this->error($e); - } catch (\Slim\Exception\Stop $e) { - // Do nothing - } - } - } - } - - /******************************************************************************** - * Error Handling and Debugging - *******************************************************************************/ - - /** - * Convert errors into ErrorException objects - * - * This method catches PHP errors and converts them into \ErrorException objects; - * these \ErrorException objects are then thrown and caught by Slim's - * built-in or custom error handlers. - * - * @param int $errno The numeric type of the Error - * @param string $errstr The error message - * @param string $errfile The absolute path to the affected file - * @param int $errline The line number of the error in the affected file - * @return bool - * @throws \ErrorException - */ - public static function handleErrors($errno, $errstr = '', $errfile = '', $errline = '') - { - if (!($errno & error_reporting())) { - return; - } - - throw new \ErrorException($errstr, $errno, 0, $errfile, $errline); - } - - /** - * Generate diagnostic template markup - * - * This method accepts a title and body content to generate an HTML document layout. - * - * @param string $title The title of the HTML template - * @param string $body The body content of the HTML template - * @return string - */ - protected static function generateTemplateMarkup($title, $body) - { - return sprintf("%s

%s

%s", $title, $title, $body); - } - - /** - * Default Not Found handler - */ - protected function defaultNotFound() - { - echo static::generateTemplateMarkup('404 Page Not Found', '

The page you are looking for could not be found. Check the address bar to ensure your URL is spelled correctly. If all else fails, you can visit our home page at the link below.

Visit the Home Page'); - } - - /** - * Default Error handler - */ - protected function defaultError($e) - { - $this->getLog()->error($e); - echo self::generateTemplateMarkup('Error', '

A website error has occurred. The website administrator has been notified of the issue. Sorry for the temporary inconvenience.

'); - } -} diff --git a/html/lib/Slim/View.php b/html/lib/Slim/View.php deleted file mode 100644 index 1a3973b9cf..0000000000 --- a/html/lib/Slim/View.php +++ /dev/null @@ -1,282 +0,0 @@ - - * @copyright 2011 Josh Lockhart - * @link http://www.slimframework.com - * @license http://www.slimframework.com/license - * @version 2.4.2 - * @package Slim - * - * MIT LICENSE - * - * 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 Slim; - -/** - * View - * - * The view is responsible for rendering a template. The view - * should subclass \Slim\View and implement this interface: - * - * public render(string $template); - * - * This method should render the specified template and return - * the resultant string. - * - * @package Slim - * @author Josh Lockhart - * @since 1.0.0 - */ -class View -{ - /** - * Data available to the view templates - * @var \Slim\Helper\Set - */ - protected $data; - - /** - * Path to templates base directory (without trailing slash) - * @var string - */ - protected $templatesDirectory; - - /** - * Constructor - */ - public function __construct() - { - $this->data = new \Slim\Helper\Set(); - } - - /******************************************************************************** - * Data methods - *******************************************************************************/ - - /** - * Does view data have value with key? - * @param string $key - * @return boolean - */ - public function has($key) - { - return $this->data->has($key); - } - - /** - * Return view data value with key - * @param string $key - * @return mixed - */ - public function get($key) - { - return $this->data->get($key); - } - - /** - * Set view data value with key - * @param string $key - * @param mixed $value - */ - public function set($key, $value) - { - $this->data->set($key, $value); - } - - /** - * Set view data value as Closure with key - * @param string $key - * @param mixed $value - */ - public function keep($key, Closure $value) - { - $this->data->keep($key, $value); - } - - /** - * Return view data - * @return array - */ - public function all() - { - return $this->data->all(); - } - - /** - * Replace view data - * @param array $data - */ - public function replace(array $data) - { - $this->data->replace($data); - } - - /** - * Clear view data - */ - public function clear() - { - $this->data->clear(); - } - - /******************************************************************************** - * Legacy data methods - *******************************************************************************/ - - /** - * DEPRECATION WARNING! This method will be removed in the next major point release - * - * Get data from view - */ - public function getData($key = null) - { - if (!is_null($key)) { - return isset($this->data[$key]) ? $this->data[$key] : null; - } else { - return $this->data->all(); - } - } - - /** - * DEPRECATION WARNING! This method will be removed in the next major point release - * - * Set data for view - */ - public function setData() - { - $args = func_get_args(); - if (count($args) === 1 && is_array($args[0])) { - $this->data->replace($args[0]); - } elseif (count($args) === 2) { - // Ensure original behavior is maintained. DO NOT invoke stored Closures. - if (is_object($args[1]) && method_exists($args[1], '__invoke')) { - $this->data->set($args[0], $this->data->protect($args[1])); - } else { - $this->data->set($args[0], $args[1]); - } - } else { - throw new \InvalidArgumentException('Cannot set View data with provided arguments. Usage: `View::setData( $key, $value );` or `View::setData([ key => value, ... ]);`'); - } - } - - /** - * DEPRECATION WARNING! This method will be removed in the next major point release - * - * Append data to view - * @param array $data - */ - public function appendData($data) - { - if (!is_array($data)) { - throw new \InvalidArgumentException('Cannot append view data. Expected array argument.'); - } - $this->data->replace($data); - } - - /******************************************************************************** - * Resolve template paths - *******************************************************************************/ - - /** - * Set the base directory that contains view templates - * @param string $directory - * @throws \InvalidArgumentException If directory is not a directory - */ - public function setTemplatesDirectory($directory) - { - $this->templatesDirectory = rtrim($directory, DIRECTORY_SEPARATOR); - } - - /** - * Get templates base directory - * @return string - */ - public function getTemplatesDirectory() - { - return $this->templatesDirectory; - } - - /** - * Get fully qualified path to template file using templates base directory - * @param string $file The template file pathname relative to templates base directory - * @return string - */ - public function getTemplatePathname($file) - { - return $this->templatesDirectory . DIRECTORY_SEPARATOR . ltrim($file, DIRECTORY_SEPARATOR); - } - - /******************************************************************************** - * Rendering - *******************************************************************************/ - - /** - * Display template - * - * This method echoes the rendered template to the current output buffer - * - * @param string $template Pathname of template file relative to templates directory - * @param array $data Any additonal data to be passed to the template. - */ - public function display($template, $data = null) - { - echo $this->fetch($template, $data); - } - - /** - * Return the contents of a rendered template file - * - * @param string $template The template pathname, relative to the template base directory - * @param array $data Any additonal data to be passed to the template. - * @return string The rendered template - */ - public function fetch($template, $data = null) - { - return $this->render($template, $data); - } - - /** - * Render a template file - * - * NOTE: This method should be overridden by custom view subclasses - * - * @param string $template The template pathname, relative to the template base directory - * @param array $data Any additonal data to be passed to the template. - * @return string The rendered template - * @throws \RuntimeException If resolved template pathname is not a valid file - */ - protected function render($template, $data = null) - { - $templatePathname = $this->getTemplatePathname($template); - if (!is_file($templatePathname)) { - throw new \RuntimeException("View cannot render `$template` because the template does not exist"); - } - - $data = array_merge($this->data->all(), (array) $data); - extract($data); - ob_start(); - require $templatePathname; - - return ob_get_clean(); - } -} diff --git a/html/lib/geshi/geshi.php b/html/lib/geshi/geshi.php deleted file mode 100644 index 4f36b78c0e..0000000000 --- a/html/lib/geshi/geshi.php +++ /dev/null @@ -1,4619 +0,0 @@ -, Benny Baumann - * @copyright (C) 2004 - 2007 Nigel McNie, (C) 2007 - 2008 Benny Baumann - * @license http://gnu.org/copyleft/gpl.html GNU GPL - * - */ - -// -// GeSHi Constants -// You should use these constant names in your programs instead of -// their values - you never know when a value may change in a future -// version -// - -/** The version of this GeSHi file */ -define('GESHI_VERSION', '1.0.8.3'); - -// Define the root directory for the GeSHi code tree -if (!defined('GESHI_ROOT')) { - /** The root directory for GeSHi */ - define('GESHI_ROOT', dirname(__FILE__) . DIRECTORY_SEPARATOR); -} -/** The language file directory for GeSHi - @access private */ -define('GESHI_LANG_ROOT', GESHI_ROOT . 'geshi' . DIRECTORY_SEPARATOR); - -// Define if GeSHi should be paranoid about security -if (!defined('GESHI_SECURITY_PARANOID')) { - /** Tells GeSHi to be paranoid about security settings */ - define('GESHI_SECURITY_PARANOID', false); -} - -// Line numbers - use with enable_line_numbers() -/** Use no line numbers when building the result */ -define('GESHI_NO_LINE_NUMBERS', 0); -/** Use normal line numbers when building the result */ -define('GESHI_NORMAL_LINE_NUMBERS', 1); -/** Use fancy line numbers when building the result */ -define('GESHI_FANCY_LINE_NUMBERS', 2); - -// Container HTML type -/** Use nothing to surround the source */ -define('GESHI_HEADER_NONE', 0); -/** Use a "div" to surround the source */ -define('GESHI_HEADER_DIV', 1); -/** Use a "pre" to surround the source */ -define('GESHI_HEADER_PRE', 2); -/** Use a pre to wrap lines when line numbers are enabled or to wrap the whole code. */ -define('GESHI_HEADER_PRE_VALID', 3); -/** - * Use a "table" to surround the source: - * - * - * - * - * - *
$header
$linenumbers
$code>
$footer
- * - * this is essentially only a workaround for Firefox, see sf#1651996 or take a look at - * https://bugzilla.mozilla.org/show_bug.cgi?id=365805 - * @note when linenumbers are disabled this is essentially the same as GESHI_HEADER_PRE - */ -define('GESHI_HEADER_PRE_TABLE', 4); - -// Capatalisation constants -/** Lowercase keywords found */ -define('GESHI_CAPS_NO_CHANGE', 0); -/** Uppercase keywords found */ -define('GESHI_CAPS_UPPER', 1); -/** Leave keywords found as the case that they are */ -define('GESHI_CAPS_LOWER', 2); - -// Link style constants -/** Links in the source in the :link state */ -define('GESHI_LINK', 0); -/** Links in the source in the :hover state */ -define('GESHI_HOVER', 1); -/** Links in the source in the :active state */ -define('GESHI_ACTIVE', 2); -/** Links in the source in the :visited state */ -define('GESHI_VISITED', 3); - -// Important string starter/finisher -// Note that if you change these, they should be as-is: i.e., don't -// write them as if they had been run through htmlentities() -/** The starter for important parts of the source */ -define('GESHI_START_IMPORTANT', ''); -/** The ender for important parts of the source */ -define('GESHI_END_IMPORTANT', ''); - -/**#@+ - * @access private - */ -// When strict mode applies for a language -/** Strict mode never applies (this is the most common) */ -define('GESHI_NEVER', 0); -/** Strict mode *might* apply, and can be enabled or - disabled by {@link GeSHi->enable_strict_mode()} */ -define('GESHI_MAYBE', 1); -/** Strict mode always applies */ -define('GESHI_ALWAYS', 2); - -// Advanced regexp handling constants, used in language files -/** The key of the regex array defining what to search for */ -define('GESHI_SEARCH', 0); -/** The key of the regex array defining what bracket group in a - matched search to use as a replacement */ -define('GESHI_REPLACE', 1); -/** The key of the regex array defining any modifiers to the regular expression */ -define('GESHI_MODIFIERS', 2); -/** The key of the regex array defining what bracket group in a - matched search to put before the replacement */ -define('GESHI_BEFORE', 3); -/** The key of the regex array defining what bracket group in a - matched search to put after the replacement */ -define('GESHI_AFTER', 4); -/** The key of the regex array defining a custom keyword to use - for this regexp's html tag class */ -define('GESHI_CLASS', 5); - -/** Used in language files to mark comments */ -define('GESHI_COMMENTS', 0); - -/** Used to work around missing PHP features **/ -define('GESHI_PHP_PRE_433', !(version_compare(PHP_VERSION, '4.3.3') === 1)); - -/** make sure we can call stripos **/ -if (!function_exists('stripos')) { - // the offset param of preg_match is not supported below PHP 4.3.3 - if (GESHI_PHP_PRE_433) { - /** - * @ignore - */ - function stripos($haystack, $needle, $offset = null) { - if (!is_null($offset)) { - $haystack = substr($haystack, $offset); - } - if (preg_match('/'. preg_quote($needle, '/') . '/', $haystack, $match, PREG_OFFSET_CAPTURE)) { - return $match[0][1]; - } - return false; - } - } - else { - /** - * @ignore - */ - function stripos($haystack, $needle, $offset = null) { - if (preg_match('/'. preg_quote($needle, '/') . '/', $haystack, $match, PREG_OFFSET_CAPTURE, $offset)) { - return $match[0][1]; - } - return false; - } - } -} - -/** some old PHP / PCRE subpatterns only support up to xxx subpatterns in - regular expressions. Set this to false if your PCRE lib is up to date - @see GeSHi->optimize_regexp_list() - **/ -define('GESHI_MAX_PCRE_SUBPATTERNS', 500); -/** it's also important not to generate too long regular expressions - be generous here... but keep in mind, that when reaching this limit we - still have to close open patterns. 12k should do just fine on a 16k limit. - @see GeSHi->optimize_regexp_list() - **/ -define('GESHI_MAX_PCRE_LENGTH', 12288); - -//Number format specification -/** Basic number format for integers */ -define('GESHI_NUMBER_INT_BASIC', 1); //Default integers \d+ -/** Enhanced number format for integers like seen in C */ -define('GESHI_NUMBER_INT_CSTYLE', 2); //Default C-Style \d+[lL]? -/** Number format to highlight binary numbers with a suffix "b" */ -define('GESHI_NUMBER_BIN_SUFFIX', 16); //[01]+[bB] -/** Number format to highlight binary numbers with a prefix % */ -define('GESHI_NUMBER_BIN_PREFIX_PERCENT', 32); //%[01]+ -/** Number format to highlight binary numbers with a prefix 0b (C) */ -define('GESHI_NUMBER_BIN_PREFIX_0B', 64); //0b[01]+ -/** Number format to highlight octal numbers with a leading zero */ -define('GESHI_NUMBER_OCT_PREFIX', 256); //0[0-7]+ -/** Number format to highlight octal numbers with a suffix of o */ -define('GESHI_NUMBER_OCT_SUFFIX', 512); //[0-7]+[oO] -/** Number format to highlight hex numbers with a prefix 0x */ -define('GESHI_NUMBER_HEX_PREFIX', 4096); //0x[0-9a-fA-F]+ -/** Number format to highlight hex numbers with a suffix of h */ -define('GESHI_NUMBER_HEX_SUFFIX', 8192); //[0-9][0-9a-fA-F]*h -/** Number format to highlight floating-point numbers without support for scientific notation */ -define('GESHI_NUMBER_FLT_NONSCI', 65536); //\d+\.\d+ -/** Number format to highlight floating-point numbers without support for scientific notation */ -define('GESHI_NUMBER_FLT_NONSCI_F', 131072); //\d+(\.\d+)?f -/** Number format to highlight floating-point numbers with support for scientific notation (E) and optional leading zero */ -define('GESHI_NUMBER_FLT_SCI_SHORT', 262144); //\.\d+e\d+ -/** Number format to highlight floating-point numbers with support for scientific notation (E) and required leading digit */ -define('GESHI_NUMBER_FLT_SCI_ZERO', 524288); //\d+(\.\d+)?e\d+ -//Custom formats are passed by RX array - -// Error detection - use these to analyse faults -/** No sourcecode to highlight was specified - * @deprecated - */ -define('GESHI_ERROR_NO_INPUT', 1); -/** The language specified does not exist */ -define('GESHI_ERROR_NO_SUCH_LANG', 2); -/** GeSHi could not open a file for reading (generally a language file) */ -define('GESHI_ERROR_FILE_NOT_READABLE', 3); -/** The header type passed to {@link GeSHi->set_header_type()} was invalid */ -define('GESHI_ERROR_INVALID_HEADER_TYPE', 4); -/** The line number type passed to {@link GeSHi->enable_line_numbers()} was invalid */ -define('GESHI_ERROR_INVALID_LINE_NUMBER_TYPE', 5); -/**#@-*/ - - -/** - * The GeSHi Class. - * - * Please refer to the documentation for GeSHi 1.0.X that is available - * at http://qbnz.com/highlighter/documentation.php for more information - * about how to use this class. - * - * @package geshi - * @author Nigel McNie , Benny Baumann - * @copyright (C) 2004 - 2007 Nigel McNie, (C) 2007 - 2008 Benny Baumann - */ -class GeSHi { - /**#@+ - * @access private - */ - /** - * The source code to highlight - * @var string - */ - var $source = ''; - - /** - * The language to use when highlighting - * @var string - */ - var $language = ''; - - /** - * The data for the language used - * @var array - */ - var $language_data = array(); - - /** - * The path to the language files - * @var string - */ - var $language_path = GESHI_LANG_ROOT; - - /** - * The error message associated with an error - * @var string - * @todo check err reporting works - */ - var $error = false; - - /** - * Possible error messages - * @var array - */ - var $error_messages = array( - GESHI_ERROR_NO_SUCH_LANG => 'GeSHi could not find the language {LANGUAGE} (using path {PATH})', - GESHI_ERROR_FILE_NOT_READABLE => 'The file specified for load_from_file was not readable', - GESHI_ERROR_INVALID_HEADER_TYPE => 'The header type specified is invalid', - GESHI_ERROR_INVALID_LINE_NUMBER_TYPE => 'The line number type specified is invalid' - ); - - /** - * Whether highlighting is strict or not - * @var boolean - */ - var $strict_mode = false; - - /** - * Whether to use CSS classes in output - * @var boolean - */ - var $use_classes = false; - - /** - * The type of header to use. Can be one of the following - * values: - * - * - GESHI_HEADER_PRE: Source is outputted in a "pre" HTML element. - * - GESHI_HEADER_DIV: Source is outputted in a "div" HTML element. - * - GESHI_HEADER_NONE: No header is outputted. - * - * @var int - */ - var $header_type = GESHI_HEADER_PRE; - - /** - * Array of permissions for which lexics should be highlighted - * @var array - */ - var $lexic_permissions = array( - 'KEYWORDS' => array(), - 'COMMENTS' => array('MULTI' => true), - 'REGEXPS' => array(), - 'ESCAPE_CHAR' => true, - 'BRACKETS' => true, - 'SYMBOLS' => false, - 'STRINGS' => true, - 'NUMBERS' => true, - 'METHODS' => true, - 'SCRIPT' => true - ); - - /** - * The time it took to parse the code - * @var double - */ - var $time = 0; - - /** - * The content of the header block - * @var string - */ - var $header_content = ''; - - /** - * The content of the footer block - * @var string - */ - var $footer_content = ''; - - /** - * The style of the header block - * @var string - */ - var $header_content_style = ''; - - /** - * The style of the footer block - * @var string - */ - var $footer_content_style = ''; - - /** - * Tells if a block around the highlighted source should be forced - * if not using line numbering - * @var boolean - */ - var $force_code_block = false; - - /** - * The styles for hyperlinks in the code - * @var array - */ - var $link_styles = array(); - - /** - * Whether important blocks should be recognised or not - * @var boolean - * @deprecated - * @todo REMOVE THIS FUNCTIONALITY! - */ - var $enable_important_blocks = false; - - /** - * Styles for important parts of the code - * @var string - * @deprecated - * @todo As above - rethink the whole idea of important blocks as it is buggy and - * will be hard to implement in 1.2 - */ - var $important_styles = 'font-weight: bold; color: red;'; // Styles for important parts of the code - - /** - * Whether CSS IDs should be added to the code - * @var boolean - */ - var $add_ids = false; - - /** - * Lines that should be highlighted extra - * @var array - */ - var $highlight_extra_lines = array(); - - /** - * Styles of lines that should be highlighted extra - * @var array - */ - var $highlight_extra_lines_styles = array(); - - /** - * Styles of extra-highlighted lines - * @var string - */ - var $highlight_extra_lines_style = 'background-color: #ffc;'; - - /** - * The line ending - * If null, nl2br() will be used on the result string. - * Otherwise, all instances of \n will be replaced with $line_ending - * @var string - */ - var $line_ending = null; - - /** - * Number at which line numbers should start at - * @var int - */ - var $line_numbers_start = 1; - - /** - * The overall style for this code block - * @var string - */ - var $overall_style = 'font-family:monospace;'; - - /** - * The style for the actual code - * @var string - */ - var $code_style = 'font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;'; - - /** - * The overall class for this code block - * @var string - */ - var $overall_class = ''; - - /** - * The overall ID for this code block - * @var string - */ - var $overall_id = ''; - - /** - * Line number styles - * @var string - */ - var $line_style1 = 'font-weight: normal; vertical-align:top;'; - - /** - * Line number styles for fancy lines - * @var string - */ - var $line_style2 = 'font-weight: bold; vertical-align:top;'; - - /** - * Style for line numbers when GESHI_HEADER_PRE_TABLE is chosen - * @var string - */ - var $table_linenumber_style = 'width:1px;text-align:right;margin:0;padding:0 2px;vertical-align:top;'; - - /** - * Flag for how line numbers are displayed - * @var boolean - */ - var $line_numbers = GESHI_NO_LINE_NUMBERS; - - /** - * Flag to decide if multi line spans are allowed. Set it to false to make sure - * each tag is closed before and reopened after each linefeed. - * @var boolean - */ - var $allow_multiline_span = true; - - /** - * The "nth" value for fancy line highlighting - * @var int - */ - var $line_nth_row = 0; - - /** - * The size of tab stops - * @var int - */ - var $tab_width = 8; - - /** - * Should we use language-defined tab stop widths? - * @var int - */ - var $use_language_tab_width = false; - - /** - * Default target for keyword links - * @var string - */ - var $link_target = ''; - - /** - * The encoding to use for entity encoding - * NOTE: Used with Escape Char Sequences to fix UTF-8 handling (cf. SF#2037598) - * @var string - */ - var $encoding = 'utf-8'; - - /** - * Should keywords be linked? - * @var boolean - */ - var $keyword_links = true; - - /** - * Currently loaded language file - * @var string - * @since 1.0.7.22 - */ - var $loaded_language = ''; - - /** - * Wether the caches needed for parsing are built or not - * - * @var bool - * @since 1.0.8 - */ - var $parse_cache_built = false; - - /** - * Work around for Suhosin Patch with disabled /e modifier - * - * Note from suhosins author in config file: - *
- * The /e modifier inside preg_replace() allows code execution. - * Often it is the cause for remote code execution exploits. It is wise to - * deactivate this feature and test where in the application it is used. - * The developer using the /e modifier should be made aware that he should - * use preg_replace_callback() instead - *
- * - * @var array - * @since 1.0.8 - */ - var $_kw_replace_group = 0; - var $_rx_key = 0; - - /** - * some "callback parameters" for handle_multiline_regexps - * - * @since 1.0.8 - * @access private - * @var string - */ - var $_hmr_before = ''; - var $_hmr_replace = ''; - var $_hmr_after = ''; - var $_hmr_key = 0; - - /**#@-*/ - - /** - * Creates a new GeSHi object, with source and language - * - * @param string The source code to highlight - * @param string The language to highlight the source with - * @param string The path to the language file directory. This - * is deprecated! I've backported the auto path - * detection from the 1.1.X dev branch, so now it - * should be automatically set correctly. If you have - * renamed the language directory however, you will - * still need to set the path using this parameter or - * {@link GeSHi->set_language_path()} - * @since 1.0.0 - */ - function __construct($source = '', $language = '', $path = '') { - if (!empty($source)) { - $this->set_source($source); - } - if (!empty($language)) { - $this->set_language($language); - } - $this->set_language_path($path); - } - - /** - * Returns an error message associated with the last GeSHi operation, - * or false if no error has occured - * - * @return string|false An error message if there has been an error, else false - * @since 1.0.0 - */ - function error() { - if ($this->error) { - //Put some template variables for debugging here ... - $debug_tpl_vars = array( - '{LANGUAGE}' => $this->language, - '{PATH}' => $this->language_path - ); - $msg = str_replace( - array_keys($debug_tpl_vars), - array_values($debug_tpl_vars), - $this->error_messages[$this->error]); - - return "
GeSHi Error: $msg (code {$this->error})
"; - } - return false; - } - - /** - * Gets a human-readable language name (thanks to Simon Patterson - * for the idea :)) - * - * @return string The name for the current language - * @since 1.0.2 - */ - function get_language_name() { - if (GESHI_ERROR_NO_SUCH_LANG == $this->error) { - return $this->language_data['LANG_NAME'] . ' (Unknown Language)'; - } - return $this->language_data['LANG_NAME']; - } - - /** - * Sets the source code for this object - * - * @param string The source code to highlight - * @since 1.0.0 - */ - function set_source($source) { - $this->source = $source; - $this->highlight_extra_lines = array(); - } - - /** - * Sets the language for this object - * - * @note since 1.0.8 this function won't reset language-settings by default anymore! - * if you need this set $force_reset = true - * - * @param string The name of the language to use - * @since 1.0.0 - */ - function set_language($language, $force_reset = false) { - if ($force_reset) { - $this->loaded_language = false; - } - - //Clean up the language name to prevent malicious code injection - $language = preg_replace('#[^a-zA-Z0-9\-_]#', '', $language); - - $language = strtolower($language); - - //Retreive the full filename - $file_name = $this->language_path . $language . '.php'; - if ($file_name == $this->loaded_language) { - // this language is already loaded! - return; - } - - $this->language = $language; - - $this->error = false; - $this->strict_mode = GESHI_NEVER; - - //Check if we can read the desired file - if (!is_readable($file_name)) { - $this->error = GESHI_ERROR_NO_SUCH_LANG; - return; - } - - // Load the language for parsing - $this->load_language($file_name); - } - - /** - * Sets the path to the directory containing the language files. Note - * that this path is relative to the directory of the script that included - * geshi.php, NOT geshi.php itself. - * - * @param string The path to the language directory - * @since 1.0.0 - * @deprecated The path to the language files should now be automatically - * detected, so this method should no longer be needed. The - * 1.1.X branch handles manual setting of the path differently - * so this method will disappear in 1.2.0. - */ - function set_language_path($path) { - if(strpos($path,':')) { - //Security Fix to prevent external directories using fopen wrappers. - if(DIRECTORY_SEPARATOR == "\\") { - if(!preg_match('#^[a-zA-Z]:#', $path) || false !== strpos($path, ':', 2)) { - return; - } - } else { - return; - } - } - if(preg_match('#[^/a-zA-Z0-9_\.\-\\\s:]#', $path)) { - //Security Fix to prevent external directories using fopen wrappers. - return; - } - if(GESHI_SECURITY_PARANOID && false !== strpos($path, '/.')) { - //Security Fix to prevent external directories using fopen wrappers. - return; - } - if(GESHI_SECURITY_PARANOID && false !== strpos($path, '..')) { - //Security Fix to prevent external directories using fopen wrappers. - return; - } - if ($path) { - $this->language_path = ('/' == $path[strlen($path) - 1]) ? $path : $path . '/'; - $this->set_language($this->language); // otherwise set_language_path has no effect - } - } - - /** - * Sets the type of header to be used. - * - * If GESHI_HEADER_DIV is used, the code is surrounded in a "div".This - * means more source code but more control over tab width and line-wrapping. - * GESHI_HEADER_PRE means that a "pre" is used - less source, but less - * control. Default is GESHI_HEADER_PRE. - * - * From 1.0.7.2, you can use GESHI_HEADER_NONE to specify that no header code - * should be outputted. - * - * @param int The type of header to be used - * @since 1.0.0 - */ - function set_header_type($type) { - //Check if we got a valid header type - if (!in_array($type, array(GESHI_HEADER_NONE, GESHI_HEADER_DIV, - GESHI_HEADER_PRE, GESHI_HEADER_PRE_VALID, GESHI_HEADER_PRE_TABLE))) { - $this->error = GESHI_ERROR_INVALID_HEADER_TYPE; - return; - } - - //Set that new header type - $this->header_type = $type; - } - - /** - * Sets the styles for the code that will be outputted - * when this object is parsed. The style should be a - * string of valid stylesheet declarations - * - * @param string The overall style for the outputted code block - * @param boolean Whether to merge the styles with the current styles or not - * @since 1.0.0 - */ - function set_overall_style($style, $preserve_defaults = false) { - if (!$preserve_defaults) { - $this->overall_style = $style; - } else { - $this->overall_style .= $style; - } - } - - /** - * Sets the overall classname for this block of code. This - * class can then be used in a stylesheet to style this object's - * output - * - * @param string The class name to use for this block of code - * @since 1.0.0 - */ - function set_overall_class($class) { - $this->overall_class = $class; - } - - /** - * Sets the overall id for this block of code. This id can then - * be used in a stylesheet to style this object's output - * - * @param string The ID to use for this block of code - * @since 1.0.0 - */ - function set_overall_id($id) { - $this->overall_id = $id; - } - - /** - * Sets whether CSS classes should be used to highlight the source. Default - * is off, calling this method with no arguments will turn it on - * - * @param boolean Whether to turn classes on or not - * @since 1.0.0 - */ - function enable_classes($flag = true) { - $this->use_classes = ($flag) ? true : false; - } - - /** - * Sets the style for the actual code. This should be a string - * containing valid stylesheet declarations. If $preserve_defaults is - * true, then styles are merged with the default styles, with the - * user defined styles having priority - * - * Note: Use this method to override any style changes you made to - * the line numbers if you are using line numbers, else the line of - * code will have the same style as the line number! Consult the - * GeSHi documentation for more information about this. - * - * @param string The style to use for actual code - * @param boolean Whether to merge the current styles with the new styles - * @since 1.0.2 - */ - function set_code_style($style, $preserve_defaults = false) { - if (!$preserve_defaults) { - $this->code_style = $style; - } else { - $this->code_style .= $style; - } - } - - /** - * Sets the styles for the line numbers. - * - * @param string The style for the line numbers that are "normal" - * @param string|boolean If a string, this is the style of the line - * numbers that are "fancy", otherwise if boolean then this - * defines whether the normal styles should be merged with the - * new normal styles or not - * @param boolean If set, is the flag for whether to merge the "fancy" - * styles with the current styles or not - * @since 1.0.2 - */ - function set_line_style($style1, $style2 = '', $preserve_defaults = false) { - //Check if we got 2 or three parameters - if (is_bool($style2)) { - $preserve_defaults = $style2; - $style2 = ''; - } - - //Actually set the new styles - if (!$preserve_defaults) { - $this->line_style1 = $style1; - $this->line_style2 = $style2; - } else { - $this->line_style1 .= $style1; - $this->line_style2 .= $style2; - } - } - - /** - * Sets whether line numbers should be displayed. - * - * Valid values for the first parameter are: - * - * - GESHI_NO_LINE_NUMBERS: Line numbers will not be displayed - * - GESHI_NORMAL_LINE_NUMBERS: Line numbers will be displayed - * - GESHI_FANCY_LINE_NUMBERS: Fancy line numbers will be displayed - * - * For fancy line numbers, the second parameter is used to signal which lines - * are to be fancy. For example, if the value of this parameter is 5 then every - * 5th line will be fancy. - * - * @param int How line numbers should be displayed - * @param int Defines which lines are fancy - * @since 1.0.0 - */ - function enable_line_numbers($flag, $nth_row = 5) { - if (GESHI_NO_LINE_NUMBERS != $flag && GESHI_NORMAL_LINE_NUMBERS != $flag - && GESHI_FANCY_LINE_NUMBERS != $flag) { - $this->error = GESHI_ERROR_INVALID_LINE_NUMBER_TYPE; - } - $this->line_numbers = $flag; - $this->line_nth_row = $nth_row; - } - - /** - * Sets wether spans and other HTML markup generated by GeSHi can - * span over multiple lines or not. Defaults to true to reduce overhead. - * Set it to false if you want to manipulate the output or manually display - * the code in an ordered list. - * - * @param boolean Wether multiline spans are allowed or not - * @since 1.0.7.22 - */ - function enable_multiline_span($flag) { - $this->allow_multiline_span = (bool) $flag; - } - - /** - * Get current setting for multiline spans, see GeSHi->enable_multiline_span(). - * - * @see enable_multiline_span - * @return bool - */ - function get_multiline_span() { - return $this->allow_multiline_span; - } - - /** - * Sets the style for a keyword group. If $preserve_defaults is - * true, then styles are merged with the default styles, with the - * user defined styles having priority - * - * @param int The key of the keyword group to change the styles of - * @param string The style to make the keywords - * @param boolean Whether to merge the new styles with the old or just - * to overwrite them - * @since 1.0.0 - */ - function set_keyword_group_style($key, $style, $preserve_defaults = false) { - //Set the style for this keyword group - if (!$preserve_defaults) { - $this->language_data['STYLES']['KEYWORDS'][$key] = $style; - } else { - $this->language_data['STYLES']['KEYWORDS'][$key] .= $style; - } - - //Update the lexic permissions - if (!isset($this->lexic_permissions['KEYWORDS'][$key])) { - $this->lexic_permissions['KEYWORDS'][$key] = true; - } - } - - /** - * Turns highlighting on/off for a keyword group - * - * @param int The key of the keyword group to turn on or off - * @param boolean Whether to turn highlighting for that group on or off - * @since 1.0.0 - */ - function set_keyword_group_highlighting($key, $flag = true) { - $this->lexic_permissions['KEYWORDS'][$key] = ($flag) ? true : false; - } - - /** - * Sets the styles for comment groups. If $preserve_defaults is - * true, then styles are merged with the default styles, with the - * user defined styles having priority - * - * @param int The key of the comment group to change the styles of - * @param string The style to make the comments - * @param boolean Whether to merge the new styles with the old or just - * to overwrite them - * @since 1.0.0 - */ - function set_comments_style($key, $style, $preserve_defaults = false) { - if (!$preserve_defaults) { - $this->language_data['STYLES']['COMMENTS'][$key] = $style; - } else { - $this->language_data['STYLES']['COMMENTS'][$key] .= $style; - } - } - - /** - * Turns highlighting on/off for comment groups - * - * @param int The key of the comment group to turn on or off - * @param boolean Whether to turn highlighting for that group on or off - * @since 1.0.0 - */ - function set_comments_highlighting($key, $flag = true) { - $this->lexic_permissions['COMMENTS'][$key] = ($flag) ? true : false; - } - - /** - * Sets the styles for escaped characters. If $preserve_defaults is - * true, then styles are merged with the default styles, with the - * user defined styles having priority - * - * @param string The style to make the escape characters - * @param boolean Whether to merge the new styles with the old or just - * to overwrite them - * @since 1.0.0 - */ - function set_escape_characters_style($style, $preserve_defaults = false, $group = 0) { - if (!$preserve_defaults) { - $this->language_data['STYLES']['ESCAPE_CHAR'][$group] = $style; - } else { - $this->language_data['STYLES']['ESCAPE_CHAR'][$group] .= $style; - } - } - - /** - * Turns highlighting on/off for escaped characters - * - * @param boolean Whether to turn highlighting for escape characters on or off - * @since 1.0.0 - */ - function set_escape_characters_highlighting($flag = true) { - $this->lexic_permissions['ESCAPE_CHAR'] = ($flag) ? true : false; - } - - /** - * Sets the styles for brackets. If $preserve_defaults is - * true, then styles are merged with the default styles, with the - * user defined styles having priority - * - * This method is DEPRECATED: use set_symbols_style instead. - * This method will be removed in 1.2.X - * - * @param string The style to make the brackets - * @param boolean Whether to merge the new styles with the old or just - * to overwrite them - * @since 1.0.0 - * @deprecated In favour of set_symbols_style - */ - function set_brackets_style($style, $preserve_defaults = false) { - if (!$preserve_defaults) { - $this->language_data['STYLES']['BRACKETS'][0] = $style; - } else { - $this->language_data['STYLES']['BRACKETS'][0] .= $style; - } - } - - /** - * Turns highlighting on/off for brackets - * - * This method is DEPRECATED: use set_symbols_highlighting instead. - * This method will be remove in 1.2.X - * - * @param boolean Whether to turn highlighting for brackets on or off - * @since 1.0.0 - * @deprecated In favour of set_symbols_highlighting - */ - function set_brackets_highlighting($flag) { - $this->lexic_permissions['BRACKETS'] = ($flag) ? true : false; - } - - /** - * Sets the styles for symbols. If $preserve_defaults is - * true, then styles are merged with the default styles, with the - * user defined styles having priority - * - * @param string The style to make the symbols - * @param boolean Whether to merge the new styles with the old or just - * to overwrite them - * @param int Tells the group of symbols for which style should be set. - * @since 1.0.1 - */ - function set_symbols_style($style, $preserve_defaults = false, $group = 0) { - // Update the style of symbols - if (!$preserve_defaults) { - $this->language_data['STYLES']['SYMBOLS'][$group] = $style; - } else { - $this->language_data['STYLES']['SYMBOLS'][$group] .= $style; - } - - // For backward compatibility - if (0 == $group) { - $this->set_brackets_style ($style, $preserve_defaults); - } - } - - /** - * Turns highlighting on/off for symbols - * - * @param boolean Whether to turn highlighting for symbols on or off - * @since 1.0.0 - */ - function set_symbols_highlighting($flag) { - // Update lexic permissions for this symbol group - $this->lexic_permissions['SYMBOLS'] = ($flag) ? true : false; - - // For backward compatibility - $this->set_brackets_highlighting ($flag); - } - - /** - * Sets the styles for strings. If $preserve_defaults is - * true, then styles are merged with the default styles, with the - * user defined styles having priority - * - * @param string The style to make the escape characters - * @param boolean Whether to merge the new styles with the old or just - * to overwrite them - * @since 1.0.0 - */ - function set_strings_style($style, $preserve_defaults = false) { - if (!$preserve_defaults) { - $this->language_data['STYLES']['STRINGS'][0] = $style; - } else { - $this->language_data['STYLES']['STRINGS'][0] .= $style; - } - } - - /** - * Turns highlighting on/off for strings - * - * @param boolean Whether to turn highlighting for strings on or off - * @since 1.0.0 - */ - function set_strings_highlighting($flag) { - $this->lexic_permissions['STRINGS'] = ($flag) ? true : false; - } - - /** - * Sets the styles for numbers. If $preserve_defaults is - * true, then styles are merged with the default styles, with the - * user defined styles having priority - * - * @param string The style to make the numbers - * @param boolean Whether to merge the new styles with the old or just - * to overwrite them - * @since 1.0.0 - */ - function set_numbers_style($style, $preserve_defaults = false) { - if (!$preserve_defaults) { - $this->language_data['STYLES']['NUMBERS'][0] = $style; - } else { - $this->language_data['STYLES']['NUMBERS'][0] .= $style; - } - } - - /** - * Turns highlighting on/off for numbers - * - * @param boolean Whether to turn highlighting for numbers on or off - * @since 1.0.0 - */ - function set_numbers_highlighting($flag) { - $this->lexic_permissions['NUMBERS'] = ($flag) ? true : false; - } - - /** - * Sets the styles for methods. $key is a number that references the - * appropriate "object splitter" - see the language file for the language - * you are highlighting to get this number. If $preserve_defaults is - * true, then styles are merged with the default styles, with the - * user defined styles having priority - * - * @param int The key of the object splitter to change the styles of - * @param string The style to make the methods - * @param boolean Whether to merge the new styles with the old or just - * to overwrite them - * @since 1.0.0 - */ - function set_methods_style($key, $style, $preserve_defaults = false) { - if (!$preserve_defaults) { - $this->language_data['STYLES']['METHODS'][$key] = $style; - } else { - $this->language_data['STYLES']['METHODS'][$key] .= $style; - } - } - - /** - * Turns highlighting on/off for methods - * - * @param boolean Whether to turn highlighting for methods on or off - * @since 1.0.0 - */ - function set_methods_highlighting($flag) { - $this->lexic_permissions['METHODS'] = ($flag) ? true : false; - } - - /** - * Sets the styles for regexps. If $preserve_defaults is - * true, then styles are merged with the default styles, with the - * user defined styles having priority - * - * @param string The style to make the regular expression matches - * @param boolean Whether to merge the new styles with the old or just - * to overwrite them - * @since 1.0.0 - */ - function set_regexps_style($key, $style, $preserve_defaults = false) { - if (!$preserve_defaults) { - $this->language_data['STYLES']['REGEXPS'][$key] = $style; - } else { - $this->language_data['STYLES']['REGEXPS'][$key] .= $style; - } - } - - /** - * Turns highlighting on/off for regexps - * - * @param int The key of the regular expression group to turn on or off - * @param boolean Whether to turn highlighting for the regular expression group on or off - * @since 1.0.0 - */ - function set_regexps_highlighting($key, $flag) { - $this->lexic_permissions['REGEXPS'][$key] = ($flag) ? true : false; - } - - /** - * Sets whether a set of keywords are checked for in a case sensitive manner - * - * @param int The key of the keyword group to change the case sensitivity of - * @param boolean Whether to check in a case sensitive manner or not - * @since 1.0.0 - */ - function set_case_sensitivity($key, $case) { - $this->language_data['CASE_SENSITIVE'][$key] = ($case) ? true : false; - } - - /** - * Sets the case that keywords should use when found. Use the constants: - * - * - GESHI_CAPS_NO_CHANGE: leave keywords as-is - * - GESHI_CAPS_UPPER: convert all keywords to uppercase where found - * - GESHI_CAPS_LOWER: convert all keywords to lowercase where found - * - * @param int A constant specifying what to do with matched keywords - * @since 1.0.1 - */ - function set_case_keywords($case) { - if (in_array($case, array( - GESHI_CAPS_NO_CHANGE, GESHI_CAPS_UPPER, GESHI_CAPS_LOWER))) { - $this->language_data['CASE_KEYWORDS'] = $case; - } - } - - /** - * Sets how many spaces a tab is substituted for - * - * Widths below zero are ignored - * - * @param int The tab width - * @since 1.0.0 - */ - function set_tab_width($width) { - $this->tab_width = intval($width); - - //Check if it fit's the constraints: - if ($this->tab_width < 1) { - //Return it to the default - $this->tab_width = 8; - } - } - - /** - * Sets whether or not to use tab-stop width specifed by language - * - * @param boolean Whether to use language-specific tab-stop widths - * @since 1.0.7.20 - */ - function set_use_language_tab_width($use) { - $this->use_language_tab_width = (bool) $use; - } - - /** - * Returns the tab width to use, based on the current language and user - * preference - * - * @return int Tab width - * @since 1.0.7.20 - */ - function get_real_tab_width() { - if (!$this->use_language_tab_width || - !isset($this->language_data['TAB_WIDTH'])) { - return $this->tab_width; - } else { - return $this->language_data['TAB_WIDTH']; - } - } - - /** - * Enables/disables strict highlighting. Default is off, calling this - * method without parameters will turn it on. See documentation - * for more details on strict mode and where to use it. - * - * @param boolean Whether to enable strict mode or not - * @since 1.0.0 - */ - function enable_strict_mode($mode = true) { - if (GESHI_MAYBE == $this->language_data['STRICT_MODE_APPLIES']) { - $this->strict_mode = ($mode) ? GESHI_ALWAYS : GESHI_NEVER; - } - } - - /** - * Disables all highlighting - * - * @since 1.0.0 - * @todo Rewrite with array traversal - * @deprecated In favour of enable_highlighting - */ - function disable_highlighting() { - $this->enable_highlighting(false); - } - - /** - * Enables all highlighting - * - * The optional flag parameter was added in version 1.0.7.21 and can be used - * to enable (true) or disable (false) all highlighting. - * - * @since 1.0.0 - * @param boolean A flag specifying whether to enable or disable all highlighting - * @todo Rewrite with array traversal - */ - function enable_highlighting($flag = true) { - $flag = $flag ? true : false; - foreach ($this->lexic_permissions as $key => $value) { - if (is_array($value)) { - foreach ($value as $k => $v) { - $this->lexic_permissions[$key][$k] = $flag; - } - } else { - $this->lexic_permissions[$key] = $flag; - } - } - - // Context blocks - $this->enable_important_blocks = $flag; - } - - /** - * Given a file extension, this method returns either a valid geshi language - * name, or the empty string if it couldn't be found - * - * @param string The extension to get a language name for - * @param array A lookup array to use instead of the default one - * @since 1.0.5 - * @todo Re-think about how this method works (maybe make it private and/or make it - * a extension->lang lookup?) - * @todo static? - */ - function get_language_name_from_extension( $extension, $lookup = array() ) { - if ( !is_array($lookup) || empty($lookup)) { - $lookup = array( - 'actionscript' => array('as'), - 'ada' => array('a', 'ada', 'adb', 'ads'), - 'apache' => array('conf'), - 'asm' => array('ash', 'asm', 'inc'), - 'asp' => array('asp'), - 'bash' => array('sh'), - 'bf' => array('bf'), - 'c' => array('c', 'h'), - 'c_mac' => array('c', 'h'), - 'caddcl' => array(), - 'cadlisp' => array(), - 'cdfg' => array('cdfg'), - 'cobol' => array('cbl'), - 'cpp' => array('cpp', 'hpp', 'C', 'H', 'CPP', 'HPP'), - 'csharp' => array('cs'), - 'css' => array('css'), - 'd' => array('d'), - 'delphi' => array('dpk', 'dpr', 'pp', 'pas'), - 'diff' => array('diff', 'patch'), - 'dos' => array('bat', 'cmd'), - 'gettext' => array('po', 'pot'), - 'gml' => array('gml'), - 'gnuplot' => array('plt'), - 'groovy' => array('groovy'), - 'haskell' => array('hs'), - 'html4strict' => array('html', 'htm'), - 'ini' => array('ini', 'desktop'), - 'java' => array('java'), - 'javascript' => array('js'), - 'klonec' => array('kl1'), - 'klonecpp' => array('klx'), - 'latex' => array('tex'), - 'lisp' => array('lisp'), - 'lua' => array('lua'), - 'matlab' => array('m'), - 'mpasm' => array(), - 'mysql' => array('sql'), - 'nsis' => array(), - 'objc' => array(), - 'oobas' => array(), - 'oracle8' => array(), - 'oracle10' => array(), - 'pascal' => array('pas'), - 'perl' => array('pl', 'pm'), - 'php' => array('php', 'php5', 'phtml', 'phps'), - 'povray' => array('pov'), - 'providex' => array('pvc', 'pvx'), - 'prolog' => array('pl'), - 'python' => array('py'), - 'qbasic' => array('bi'), - 'reg' => array('reg'), - 'ruby' => array('rb'), - 'sas' => array('sas'), - 'scala' => array('scala'), - 'scheme' => array('scm'), - 'scilab' => array('sci'), - 'smalltalk' => array('st'), - 'smarty' => array(), - 'tcl' => array('tcl'), - 'vb' => array('bas'), - 'vbnet' => array(), - 'visualfoxpro' => array(), - 'whitespace' => array('ws'), - 'xml' => array('xml', 'svg'), - 'z80' => array('z80', 'asm', 'inc') - ); - } - - foreach ($lookup as $lang => $extensions) { - if (in_array($extension, $extensions)) { - return $lang; - } - } - return ''; - } - - /** - * Given a file name, this method loads its contents in, and attempts - * to set the language automatically. An optional lookup table can be - * passed for looking up the language name. If not specified a default - * table is used - * - * The language table is in the form - *
array(
-     *   'lang_name' => array('extension', 'extension', ...),
-     *   'lang_name' ...
-     * );
- * - * @param string The filename to load the source from - * @param array A lookup array to use instead of the default one - * @todo Complete rethink of this and above method - * @since 1.0.5 - */ - function load_from_file($file_name, $lookup = array()) { - if (is_readable($file_name)) { - $this->set_source(file_get_contents($file_name)); - $this->set_language($this->get_language_name_from_extension(substr(strrchr($file_name, '.'), 1), $lookup)); - } else { - $this->error = GESHI_ERROR_FILE_NOT_READABLE; - } - } - - /** - * Adds a keyword to a keyword group for highlighting - * - * @param int The key of the keyword group to add the keyword to - * @param string The word to add to the keyword group - * @since 1.0.0 - */ - function add_keyword($key, $word) { - if (!in_array($word, $this->language_data['KEYWORDS'][$key])) { - $this->language_data['KEYWORDS'][$key][] = $word; - - //NEW in 1.0.8 don't recompile the whole optimized regexp, simply append it - if ($this->parse_cache_built) { - $subkey = count($this->language_data['CACHED_KEYWORD_LISTS'][$key]) - 1; - $this->language_data['CACHED_KEYWORD_LISTS'][$key][$subkey] .= '|' . preg_quote($word, '/'); - } - } - } - - /** - * Removes a keyword from a keyword group - * - * @param int The key of the keyword group to remove the keyword from - * @param string The word to remove from the keyword group - * @param bool Wether to automatically recompile the optimized regexp list or not. - * Note: if you set this to false and @see GeSHi->parse_code() was already called once, - * for the current language, you have to manually call @see GeSHi->optimize_keyword_group() - * or the removed keyword will stay in cache and still be highlighted! On the other hand - * it might be too expensive to recompile the regexp list for every removal if you want to - * remove a lot of keywords. - * @since 1.0.0 - */ - function remove_keyword($key, $word, $recompile = true) { - $key_to_remove = array_search($word, $this->language_data['KEYWORDS'][$key]); - if ($key_to_remove !== false) { - unset($this->language_data['KEYWORDS'][$key][$key_to_remove]); - - //NEW in 1.0.8, optionally recompile keyword group - if ($recompile && $this->parse_cache_built) { - $this->optimize_keyword_group($key); - } - } - } - - /** - * Creates a new keyword group - * - * @param int The key of the keyword group to create - * @param string The styles for the keyword group - * @param boolean Whether the keyword group is case sensitive ornot - * @param array The words to use for the keyword group - * @since 1.0.0 - */ - function add_keyword_group($key, $styles, $case_sensitive = true, $words = array()) { - $words = (array) $words; - if (empty($words)) { - // empty word lists mess up highlighting - return false; - } - - //Add the new keyword group internally - $this->language_data['KEYWORDS'][$key] = $words; - $this->lexic_permissions['KEYWORDS'][$key] = true; - $this->language_data['CASE_SENSITIVE'][$key] = $case_sensitive; - $this->language_data['STYLES']['KEYWORDS'][$key] = $styles; - - //NEW in 1.0.8, cache keyword regexp - if ($this->parse_cache_built) { - $this->optimize_keyword_group($key); - } - } - - /** - * Removes a keyword group - * - * @param int The key of the keyword group to remove - * @since 1.0.0 - */ - function remove_keyword_group ($key) { - //Remove the keyword group internally - unset($this->language_data['KEYWORDS'][$key]); - unset($this->lexic_permissions['KEYWORDS'][$key]); - unset($this->language_data['CASE_SENSITIVE'][$key]); - unset($this->language_data['STYLES']['KEYWORDS'][$key]); - - //NEW in 1.0.8 - unset($this->language_data['CACHED_KEYWORD_LISTS'][$key]); - } - - /** - * compile optimized regexp list for keyword group - * - * @param int The key of the keyword group to compile & optimize - * @since 1.0.8 - */ - function optimize_keyword_group($key) { - $this->language_data['CACHED_KEYWORD_LISTS'][$key] = - $this->optimize_regexp_list($this->language_data['KEYWORDS'][$key]); - $space_as_whitespace = false; - if(isset($this->language_data['PARSER_CONTROL'])) { - if(isset($this->language_data['PARSER_CONTROL']['KEYWORDS'])) { - if(isset($this->language_data['PARSER_CONTROL']['KEYWORDS']['SPACE_AS_WHITESPACE'])) { - $space_as_whitespace = $this->language_data['PARSER_CONTROL']['KEYWORDS']['SPACE_AS_WHITESPACE']; - } - if(isset($this->language_data['PARSER_CONTROL']['KEYWORDS'][$key]['SPACE_AS_WHITESPACE'])) { - if(isset($this->language_data['PARSER_CONTROL']['KEYWORDS'][$key]['SPACE_AS_WHITESPACE'])) { - $space_as_whitespace = $this->language_data['PARSER_CONTROL']['KEYWORDS'][$key]['SPACE_AS_WHITESPACE']; - } - } - } - } - if($space_as_whitespace) { - foreach($this->language_data['CACHED_KEYWORD_LISTS'][$key] as $rxk => $rxv) { - $this->language_data['CACHED_KEYWORD_LISTS'][$key][$rxk] = - str_replace(" ", "\\s+", $rxv); - } - } - } - - /** - * Sets the content of the header block - * - * @param string The content of the header block - * @since 1.0.2 - */ - function set_header_content($content) { - $this->header_content = $content; - } - - /** - * Sets the content of the footer block - * - * @param string The content of the footer block - * @since 1.0.2 - */ - function set_footer_content($content) { - $this->footer_content = $content; - } - - /** - * Sets the style for the header content - * - * @param string The style for the header content - * @since 1.0.2 - */ - function set_header_content_style($style) { - $this->header_content_style = $style; - } - - /** - * Sets the style for the footer content - * - * @param string The style for the footer content - * @since 1.0.2 - */ - function set_footer_content_style($style) { - $this->footer_content_style = $style; - } - - /** - * Sets whether to force a surrounding block around - * the highlighted code or not - * - * @param boolean Tells whether to enable or disable this feature - * @since 1.0.7.20 - */ - function enable_inner_code_block($flag) { - $this->force_code_block = (bool)$flag; - } - - /** - * Sets the base URL to be used for keywords - * - * @param int The key of the keyword group to set the URL for - * @param string The URL to set for the group. If {FNAME} is in - * the url somewhere, it is replaced by the keyword - * that the URL is being made for - * @since 1.0.2 - */ - function set_url_for_keyword_group($group, $url) { - $this->language_data['URLS'][$group] = $url; - } - - /** - * Sets styles for links in code - * - * @param int A constant that specifies what state the style is being - * set for - e.g. :hover or :visited - * @param string The styles to use for that state - * @since 1.0.2 - */ - function set_link_styles($type, $styles) { - $this->link_styles[$type] = $styles; - } - - /** - * Sets the target for links in code - * - * @param string The target for links in the code, e.g. _blank - * @since 1.0.3 - */ - function set_link_target($target) { - if (!$target) { - $this->link_target = ''; - } else { - $this->link_target = ' target="' . $target . '"'; - } - } - - /** - * Sets styles for important parts of the code - * - * @param string The styles to use on important parts of the code - * @since 1.0.2 - */ - function set_important_styles($styles) { - $this->important_styles = $styles; - } - - /** - * Sets whether context-important blocks are highlighted - * - * @param boolean Tells whether to enable or disable highlighting of important blocks - * @todo REMOVE THIS SHIZ FROM GESHI! - * @deprecated - * @since 1.0.2 - */ - function enable_important_blocks($flag) { - $this->enable_important_blocks = ( $flag ) ? true : false; - } - - /** - * Whether CSS IDs should be added to each line - * - * @param boolean If true, IDs will be added to each line. - * @since 1.0.2 - */ - function enable_ids($flag = true) { - $this->add_ids = ($flag) ? true : false; - } - - /** - * Specifies which lines to highlight extra - * - * The extra style parameter was added in 1.0.7.21. - * - * @param mixed An array of line numbers to highlight, or just a line - * number on its own. - * @param string A string specifying the style to use for this line. - * If null is specified, the default style is used. - * If false is specified, the line will be removed from - * special highlighting - * @since 1.0.2 - * @todo Some data replication here that could be cut down on - */ - function highlight_lines_extra($lines, $style = null) { - if (is_array($lines)) { - //Split up the job using single lines at a time - foreach ($lines as $line) { - $this->highlight_lines_extra($line, $style); - } - } else { - //Mark the line as being highlighted specially - $lines = intval($lines); - $this->highlight_extra_lines[$lines] = $lines; - - //Decide on which style to use - if ($style === null) { //Check if we should use default style - unset($this->highlight_extra_lines_styles[$lines]); - } else if ($style === false) { //Check if to remove this line - unset($this->highlight_extra_lines[$lines]); - unset($this->highlight_extra_lines_styles[$lines]); - } else { - $this->highlight_extra_lines_styles[$lines] = $style; - } - } - } - - /** - * Sets the style for extra-highlighted lines - * - * @param string The style for extra-highlighted lines - * @since 1.0.2 - */ - function set_highlight_lines_extra_style($styles) { - $this->highlight_extra_lines_style = $styles; - } - - /** - * Sets the line-ending - * - * @param string The new line-ending - * @since 1.0.2 - */ - function set_line_ending($line_ending) { - $this->line_ending = (string)$line_ending; - } - - /** - * Sets what number line numbers should start at. Should - * be a positive integer, and will be converted to one. - * - * Warning: Using this method will add the "start" - * attribute to the <ol> that is used for line numbering. - * This is not valid XHTML strict, so if that's what you - * care about then don't use this method. Firefox is getting - * support for the CSS method of doing this in 1.1 and Opera - * has support for the CSS method, but (of course) IE doesn't - * so it's not worth doing it the CSS way yet. - * - * @param int The number to start line numbers at - * @since 1.0.2 - */ - function start_line_numbers_at($number) { - $this->line_numbers_start = abs(intval($number)); - } - - /** - * Sets the encoding used for htmlspecialchars(), for international - * support. - * - * NOTE: This is not needed for now because htmlspecialchars() is not - * being used (it has a security hole in PHP4 that has not been patched). - * Maybe in a future version it may make a return for speed reasons, but - * I doubt it. - * - * @param string The encoding to use for the source - * @since 1.0.3 - */ - function set_encoding($encoding) { - if ($encoding) { - $this->encoding = strtolower($encoding); - } - } - - /** - * Turns linking of keywords on or off. - * - * @param boolean If true, links will be added to keywords - * @since 1.0.2 - */ - function enable_keyword_links($enable = true) { - $this->keyword_links = (bool) $enable; - } - - /** - * Setup caches needed for styling. This is automatically called in - * parse_code() and get_stylesheet() when appropriate. This function helps - * stylesheet generators as they rely on some style information being - * preprocessed - * - * @since 1.0.8 - * @access private - */ - function build_style_cache() { - //Build the style cache needed to highlight numbers appropriate - if($this->lexic_permissions['NUMBERS']) { - //First check what way highlighting information for numbers are given - if(!isset($this->language_data['NUMBERS'])) { - $this->language_data['NUMBERS'] = 0; - } - - if(is_array($this->language_data['NUMBERS'])) { - $this->language_data['NUMBERS_CACHE'] = $this->language_data['NUMBERS']; - } else { - $this->language_data['NUMBERS_CACHE'] = array(); - if(!$this->language_data['NUMBERS']) { - $this->language_data['NUMBERS'] = - GESHI_NUMBER_INT_BASIC | - GESHI_NUMBER_FLT_NONSCI; - } - - for($i = 0, $j = $this->language_data['NUMBERS']; $j > 0; ++$i, $j>>=1) { - //Rearrange style indices if required ... - if(isset($this->language_data['STYLES']['NUMBERS'][1<<$i])) { - $this->language_data['STYLES']['NUMBERS'][$i] = - $this->language_data['STYLES']['NUMBERS'][1<<$i]; - unset($this->language_data['STYLES']['NUMBERS'][1<<$i]); - } - - //Check if this bit is set for highlighting - if($j&1) { - //So this bit is set ... - //Check if it belongs to group 0 or the actual stylegroup - if(isset($this->language_data['STYLES']['NUMBERS'][$i])) { - $this->language_data['NUMBERS_CACHE'][$i] = 1 << $i; - } else { - if(!isset($this->language_data['NUMBERS_CACHE'][0])) { - $this->language_data['NUMBERS_CACHE'][0] = 0; - } - $this->language_data['NUMBERS_CACHE'][0] |= 1 << $i; - } - } - } - } - } - } - - /** - * Setup caches needed for parsing. This is automatically called in parse_code() when appropriate. - * This function makes stylesheet generators much faster as they do not need these caches. - * - * @since 1.0.8 - * @access private - */ - function build_parse_cache() { - // cache symbol regexp - //As this is a costy operation, we avoid doing it for multiple groups ... - //Instead we perform it for all symbols at once. - // - //For this to work, we need to reorganize the data arrays. - if ($this->lexic_permissions['SYMBOLS'] && !empty($this->language_data['SYMBOLS'])) { - $this->language_data['MULTIPLE_SYMBOL_GROUPS'] = count($this->language_data['STYLES']['SYMBOLS']) > 1; - - $this->language_data['SYMBOL_DATA'] = array(); - $symbol_preg_multi = array(); // multi char symbols - $symbol_preg_single = array(); // single char symbols - foreach ($this->language_data['SYMBOLS'] as $key => $symbols) { - if (is_array($symbols)) { - foreach ($symbols as $sym) { - $sym = $this->hsc($sym); - if (!isset($this->language_data['SYMBOL_DATA'][$sym])) { - $this->language_data['SYMBOL_DATA'][$sym] = $key; - if (isset($sym[1])) { // multiple chars - $symbol_preg_multi[] = preg_quote($sym, '/'); - } else { // single char - if ($sym == '-') { - // don't trigger range out of order error - $symbol_preg_single[] = '\-'; - } else { - $symbol_preg_single[] = preg_quote($sym, '/'); - } - } - } - } - } else { - $symbols = $this->hsc($symbols); - if (!isset($this->language_data['SYMBOL_DATA'][$symbols])) { - $this->language_data['SYMBOL_DATA'][$symbols] = 0; - if (isset($symbols[1])) { // multiple chars - $symbol_preg_multi[] = preg_quote($symbols, '/'); - } else if ($symbols == '-') { - // don't trigger range out of order error - $symbol_preg_single[] = '\-'; - } else { // single char - $symbol_preg_single[] = preg_quote($symbols, '/'); - } - } - } - } - - //Now we have an array with each possible symbol as the key and the style as the actual data. - //This way we can set the correct style just the moment we highlight ... - // - //Now we need to rewrite our array to get a search string that - $symbol_preg = array(); - if (!empty($symbol_preg_multi)) { - rsort($symbol_preg_multi); - $symbol_preg[] = implode('|', $symbol_preg_multi); - } - if (!empty($symbol_preg_single)) { - rsort($symbol_preg_single); - $symbol_preg[] = '[' . implode('', $symbol_preg_single) . ']'; - } - $this->language_data['SYMBOL_SEARCH'] = implode("|", $symbol_preg); - } - - // cache optimized regexp for keyword matching - // remove old cache - $this->language_data['CACHED_KEYWORD_LISTS'] = array(); - foreach (array_keys($this->language_data['KEYWORDS']) as $key) { - if (!isset($this->lexic_permissions['KEYWORDS'][$key]) || - $this->lexic_permissions['KEYWORDS'][$key]) { - $this->optimize_keyword_group($key); - } - } - - // brackets - if ($this->lexic_permissions['BRACKETS']) { - $this->language_data['CACHE_BRACKET_MATCH'] = array('[', ']', '(', ')', '{', '}'); - if (!$this->use_classes && isset($this->language_data['STYLES']['BRACKETS'][0])) { - $this->language_data['CACHE_BRACKET_REPLACE'] = array( - '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">[|>', - '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">]|>', - '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">(|>', - '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">)|>', - '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">{|>', - '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">}|>', - ); - } - else { - $this->language_data['CACHE_BRACKET_REPLACE'] = array( - '<| class="br0">[|>', - '<| class="br0">]|>', - '<| class="br0">(|>', - '<| class="br0">)|>', - '<| class="br0">{|>', - '<| class="br0">}|>', - ); - } - } - - //Build the parse cache needed to highlight numbers appropriate - if($this->lexic_permissions['NUMBERS']) { - //Check if the style rearrangements have been processed ... - //This also does some preprocessing to check which style groups are useable ... - if(!isset($this->language_data['NUMBERS_CACHE'])) { - $this->build_style_cache(); - } - - //Number format specification - //All this formats are matched case-insensitively! - static $numbers_format = array( - GESHI_NUMBER_INT_BASIC => - '(? - '(? - '(? - '(? - '(? - '(? - '(? - '(? - '(? - '(? - '(? - '(? - '(?language_data['NUMBERS_RXCACHE'] = array(); - foreach($this->language_data['NUMBERS_CACHE'] as $key => $rxdata) { - if(is_string($rxdata)) { - $regexp = $rxdata; - } else { - //This is a bitfield of number flags to highlight: - //Build an array, implode them together and make this the actual RX - $rxuse = array(); - for($i = 1; $i <= $rxdata; $i<<=1) { - if($rxdata & $i) { - $rxuse[] = $numbers_format[$i]; - } - } - $regexp = implode("|", $rxuse); - } - - $this->language_data['NUMBERS_RXCACHE'][$key] = - "/(?)($regexp)(?!\|>)/i"; - } - } - - $this->parse_cache_built = true; - } - - /** - * Returns the code in $this->source, highlighted and surrounded by the - * nessecary HTML. - * - * This should only be called ONCE, cos it's SLOW! If you want to highlight - * the same source multiple times, you're better off doing a whole lot of - * str_replaces to replace the <span>s - * - * @since 1.0.0 - */ - function parse_code () { - // Start the timer - $start_time = microtime(); - - // Firstly, if there is an error, we won't highlight - if ($this->error) { - //Escape the source for output - $result = $this->hsc($this->source); - - //This fix is related to SF#1923020, but has to be applied regardless of - //actually highlighting symbols. - $result = str_replace(array('', ''), array(';', '|'), $result); - - // Timing is irrelevant - $this->set_time($start_time, $start_time); - $this->finalise($result); - return $result; - } - - // make sure the parse cache is up2date - if (!$this->parse_cache_built) { - $this->build_parse_cache(); - } - - // Replace all newlines to a common form. - $code = str_replace("\r\n", "\n", $this->source); - $code = str_replace("\r", "\n", $code); - - // Add spaces for regular expression matching and line numbers -// $code = "\n" . $code . "\n"; - - // Initialise various stuff - $length = strlen($code); - $COMMENT_MATCHED = false; - $stuff_to_parse = ''; - $endresult = ''; - - // "Important" selections are handled like multiline comments - // @todo GET RID OF THIS SHIZ - if ($this->enable_important_blocks) { - $this->language_data['COMMENT_MULTI'][GESHI_START_IMPORTANT] = GESHI_END_IMPORTANT; - } - - if ($this->strict_mode) { - // Break the source into bits. Each bit will be a portion of the code - // within script delimiters - for example, HTML between < and > - $k = 0; - $parts = array(); - $matches = array(); - $next_match_pointer = null; - // we use a copy to unset delimiters on demand (when they are not found) - $delim_copy = $this->language_data['SCRIPT_DELIMITERS']; - $i = 0; - while ($i < $length) { - $next_match_pos = $length + 1; // never true - foreach ($delim_copy as $dk => $delimiters) { - if(is_array($delimiters)) { - foreach ($delimiters as $open => $close) { - // make sure the cache is setup properly - if (!isset($matches[$dk][$open])) { - $matches[$dk][$open] = array( - 'next_match' => -1, - 'dk' => $dk, - - 'open' => $open, // needed for grouping of adjacent code blocks (see below) - 'open_strlen' => strlen($open), - - 'close' => $close, - 'close_strlen' => strlen($close), - ); - } - // Get the next little bit for this opening string - if ($matches[$dk][$open]['next_match'] < $i) { - // only find the next pos if it was not already cached - $open_pos = strpos($code, $open, $i); - if ($open_pos === false) { - // no match for this delimiter ever - unset($delim_copy[$dk][$open]); - continue; - } - $matches[$dk][$open]['next_match'] = $open_pos; - } - if ($matches[$dk][$open]['next_match'] < $next_match_pos) { - //So we got a new match, update the close_pos - $matches[$dk][$open]['close_pos'] = - strpos($code, $close, $matches[$dk][$open]['next_match']+1); - - $next_match_pointer =& $matches[$dk][$open]; - $next_match_pos = $matches[$dk][$open]['next_match']; - } - } - } else { - //So we should match an RegExp as Strict Block ... - /** - * The value in $delimiters is expected to be an RegExp - * containing exactly 2 matching groups: - * - Group 1 is the opener - * - Group 2 is the closer - */ - if(!GESHI_PHP_PRE_433 && //Needs proper rewrite to work with PHP >=4.3.0; 4.3.3 is guaranteed to work. - preg_match($delimiters, $code, $matches_rx, PREG_OFFSET_CAPTURE, $i)) { - //We got a match ... - $matches[$dk] = array( - 'next_match' => $matches_rx[1][1], - 'dk' => $dk, - - 'close_strlen' => strlen($matches_rx[2][0]), - 'close_pos' => $matches_rx[2][1], - ); - } else { - // no match for this delimiter ever - unset($delim_copy[$dk]); - continue; - } - - if ($matches[$dk]['next_match'] <= $next_match_pos) { - $next_match_pointer =& $matches[$dk]; - $next_match_pos = $matches[$dk]['next_match']; - } - } - } - // non-highlightable text - $parts[$k] = array( - 1 => substr($code, $i, $next_match_pos - $i) - ); - ++$k; - - if ($next_match_pos > $length) { - // out of bounds means no next match was found - break; - } - - // highlightable code - $parts[$k][0] = $next_match_pointer['dk']; - - //Only combine for non-rx script blocks - if(is_array($delim_copy[$next_match_pointer['dk']])) { - // group adjacent script blocks, e.g. should be one block, not three! - $i = $next_match_pos + $next_match_pointer['open_strlen']; - while (true) { - $close_pos = strpos($code, $next_match_pointer['close'], $i); - if ($close_pos == false) { - break; - } - $i = $close_pos + $next_match_pointer['close_strlen']; - if ($i == $length) { - break; - } - if ($code[$i] == $next_match_pointer['open'][0] && ($next_match_pointer['open_strlen'] == 1 || - substr($code, $i, $next_match_pointer['open_strlen']) == $next_match_pointer['open'])) { - // merge adjacent but make sure we don't merge things like - foreach ($matches as $submatches) { - foreach ($submatches as $match) { - if ($match['next_match'] == $i) { - // a different block already matches here! - break 3; - } - } - } - } else { - break; - } - } - } else { - $close_pos = $next_match_pointer['close_pos'] + $next_match_pointer['close_strlen']; - $i = $close_pos; - } - - if ($close_pos === false) { - // no closing delimiter found! - $parts[$k][1] = substr($code, $next_match_pos); - ++$k; - break; - } else { - $parts[$k][1] = substr($code, $next_match_pos, $i - $next_match_pos); - ++$k; - } - } - unset($delim_copy, $next_match_pointer, $next_match_pos, $matches); - $num_parts = $k; - - if ($num_parts == 1 && $this->strict_mode == GESHI_MAYBE) { - // when we have only one part, we don't have anything to highlight at all. - // if we have a "maybe" strict language, this should be handled as highlightable code - $parts = array( - 0 => array( - 0 => '', - 1 => '' - ), - 1 => array( - 0 => null, - 1 => $parts[0][1] - ) - ); - $num_parts = 2; - } - - } else { - // Not strict mode - simply dump the source into - // the array at index 1 (the first highlightable block) - $parts = array( - 0 => array( - 0 => '', - 1 => '' - ), - 1 => array( - 0 => null, - 1 => $code - ) - ); - $num_parts = 2; - } - - //Unset variables we won't need any longer - unset($code); - - //Preload some repeatedly used values regarding hardquotes ... - $hq = isset($this->language_data['HARDQUOTE']) ? $this->language_data['HARDQUOTE'][0] : false; - $hq_strlen = strlen($hq); - - //Preload if line numbers are to be generated afterwards - //Added a check if line breaks should be forced even without line numbers, fixes SF#1727398 - $check_linenumbers = $this->line_numbers != GESHI_NO_LINE_NUMBERS || - !empty($this->highlight_extra_lines) || !$this->allow_multiline_span; - - //preload the escape char for faster checking ... - $escaped_escape_char = $this->hsc($this->language_data['ESCAPE_CHAR']); - - // this is used for single-line comments - $sc_disallowed_before = ""; - $sc_disallowed_after = ""; - - if (isset($this->language_data['PARSER_CONTROL'])) { - if (isset($this->language_data['PARSER_CONTROL']['COMMENTS'])) { - if (isset($this->language_data['PARSER_CONTROL']['COMMENTS']['DISALLOWED_BEFORE'])) { - $sc_disallowed_before = $this->language_data['PARSER_CONTROL']['COMMENTS']['DISALLOWED_BEFORE']; - } - if (isset($this->language_data['PARSER_CONTROL']['COMMENTS']['DISALLOWED_AFTER'])) { - $sc_disallowed_after = $this->language_data['PARSER_CONTROL']['COMMENTS']['DISALLOWED_AFTER']; - } - } - } - - //Fix for SF#1932083: Multichar Quotemarks unsupported - $is_string_starter = array(); - if ($this->lexic_permissions['STRINGS']) { - foreach ($this->language_data['QUOTEMARKS'] as $quotemark) { - if (!isset($is_string_starter[$quotemark[0]])) { - $is_string_starter[$quotemark[0]] = (string)$quotemark; - } else if (is_string($is_string_starter[$quotemark[0]])) { - $is_string_starter[$quotemark[0]] = array( - $is_string_starter[$quotemark[0]], - $quotemark); - } else { - $is_string_starter[$quotemark[0]][] = $quotemark; - } - } - } - - // Now we go through each part. We know that even-indexed parts are - // code that shouldn't be highlighted, and odd-indexed parts should - // be highlighted - for ($key = 0; $key < $num_parts; ++$key) { - $STRICTATTRS = ''; - - // If this block should be highlighted... - if (!($key & 1)) { - // Else not a block to highlight - $endresult .= $this->hsc($parts[$key][1]); - unset($parts[$key]); - continue; - } - - $result = ''; - $part = $parts[$key][1]; - - $highlight_part = true; - if ($this->strict_mode && !is_null($parts[$key][0])) { - // get the class key for this block of code - $script_key = $parts[$key][0]; - $highlight_part = $this->language_data['HIGHLIGHT_STRICT_BLOCK'][$script_key]; - if ($this->language_data['STYLES']['SCRIPT'][$script_key] != '' && - $this->lexic_permissions['SCRIPT']) { - // Add a span element around the source to - // highlight the overall source block - if (!$this->use_classes && - $this->language_data['STYLES']['SCRIPT'][$script_key] != '') { - $attributes = ' style="' . $this->language_data['STYLES']['SCRIPT'][$script_key] . '"'; - } else { - $attributes = ' class="sc' . $script_key . '"'; - } - $result .= ""; - $STRICTATTRS = $attributes; - } - } - - if ($highlight_part) { - // Now, highlight the code in this block. This code - // is really the engine of GeSHi (along with the method - // parse_non_string_part). - - // cache comment regexps incrementally - $next_comment_regexp_key = ''; - $next_comment_regexp_pos = -1; - $next_comment_multi_pos = -1; - $next_comment_single_pos = -1; - $comment_regexp_cache_per_key = array(); - $comment_multi_cache_per_key = array(); - $comment_single_cache_per_key = array(); - $next_open_comment_multi = ''; - $next_comment_single_key = ''; - $escape_regexp_cache_per_key = array(); - $next_escape_regexp_key = ''; - $next_escape_regexp_pos = -1; - - $length = strlen($part); - for ($i = 0; $i < $length; ++$i) { - // Get the next char - $char = $part[$i]; - $char_len = 1; - - // update regexp comment cache if needed - if (isset($this->language_data['COMMENT_REGEXP']) && $next_comment_regexp_pos < $i) { - $next_comment_regexp_pos = $length; - foreach ($this->language_data['COMMENT_REGEXP'] as $comment_key => $regexp) { - $match_i = false; - if (isset($comment_regexp_cache_per_key[$comment_key]) && - ($comment_regexp_cache_per_key[$comment_key]['pos'] >= $i || - $comment_regexp_cache_per_key[$comment_key]['pos'] === false)) { - // we have already matched something - if ($comment_regexp_cache_per_key[$comment_key]['pos'] === false) { - // this comment is never matched - continue; - } - $match_i = $comment_regexp_cache_per_key[$comment_key]['pos']; - } else if ( - //This is to allow use of the offset parameter in preg_match and stay as compatible with older PHP versions as possible - (GESHI_PHP_PRE_433 && preg_match($regexp, substr($part, $i), $match, PREG_OFFSET_CAPTURE)) || - (!GESHI_PHP_PRE_433 && preg_match($regexp, $part, $match, PREG_OFFSET_CAPTURE, $i)) - ) { - $match_i = $match[0][1]; - if (GESHI_PHP_PRE_433) { - $match_i += $i; - } - - $comment_regexp_cache_per_key[$comment_key] = array( - 'key' => $comment_key, - 'length' => strlen($match[0][0]), - 'pos' => $match_i - ); - } else { - $comment_regexp_cache_per_key[$comment_key]['pos'] = false; - continue; - } - - if ($match_i !== false && $match_i < $next_comment_regexp_pos) { - $next_comment_regexp_pos = $match_i; - $next_comment_regexp_key = $comment_key; - if ($match_i === $i) { - break; - } - } - } - } - - $string_started = false; - - if (isset($is_string_starter[$char])) { - // Possibly the start of a new string ... - - //Check which starter it was ... - //Fix for SF#1932083: Multichar Quotemarks unsupported - if (is_array($is_string_starter[$char])) { - $char_new = ''; - foreach ($is_string_starter[$char] as $testchar) { - if ($testchar === substr($part, $i, strlen($testchar)) && - strlen($testchar) > strlen($char_new)) { - $char_new = $testchar; - $string_started = true; - } - } - if ($string_started) { - $char = $char_new; - } - } else { - $testchar = $is_string_starter[$char]; - if ($testchar === substr($part, $i, strlen($testchar))) { - $char = $testchar; - $string_started = true; - } - } - $char_len = strlen($char); - } - - if ($string_started && $i != $next_comment_regexp_pos) { - // Hand out the correct style information for this string - $string_key = array_search($char, $this->language_data['QUOTEMARKS']); - if (!isset($this->language_data['STYLES']['STRINGS'][$string_key]) || - !isset($this->language_data['STYLES']['ESCAPE_CHAR'][$string_key])) { - $string_key = 0; - } - - // parse the stuff before this - $result .= $this->parse_non_string_part($stuff_to_parse); - $stuff_to_parse = ''; - - if (!$this->use_classes) { - $string_attributes = ' style="' . $this->language_data['STYLES']['STRINGS'][$string_key] . '"'; - } else { - $string_attributes = ' class="st'.$string_key.'"'; - } - - // now handle the string - $string = "" . GeSHi::hsc($char); - $start = $i + $char_len; - $string_open = true; - - if(empty($this->language_data['ESCAPE_REGEXP'])) { - $next_escape_regexp_pos = $length; - } - - do { - //Get the regular ending pos ... - $close_pos = strpos($part, $char, $start); - if(false === $close_pos) { - $close_pos = $length; - } - - if($this->lexic_permissions['ESCAPE_CHAR']) { - // update escape regexp cache if needed - if (isset($this->language_data['ESCAPE_REGEXP']) && $next_escape_regexp_pos < $start) { - $next_escape_regexp_pos = $length; - foreach ($this->language_data['ESCAPE_REGEXP'] as $escape_key => $regexp) { - $match_i = false; - if (isset($escape_regexp_cache_per_key[$escape_key]) && - ($escape_regexp_cache_per_key[$escape_key]['pos'] >= $start || - $escape_regexp_cache_per_key[$escape_key]['pos'] === false)) { - // we have already matched something - if ($escape_regexp_cache_per_key[$escape_key]['pos'] === false) { - // this comment is never matched - continue; - } - $match_i = $escape_regexp_cache_per_key[$escape_key]['pos']; - } else if ( - //This is to allow use of the offset parameter in preg_match and stay as compatible with older PHP versions as possible - (GESHI_PHP_PRE_433 && preg_match($regexp, substr($part, $start), $match, PREG_OFFSET_CAPTURE)) || - (!GESHI_PHP_PRE_433 && preg_match($regexp, $part, $match, PREG_OFFSET_CAPTURE, $start)) - ) { - $match_i = $match[0][1]; - if (GESHI_PHP_PRE_433) { - $match_i += $start; - } - - $escape_regexp_cache_per_key[$escape_key] = array( - 'key' => $escape_key, - 'length' => strlen($match[0][0]), - 'pos' => $match_i - ); - } else { - $escape_regexp_cache_per_key[$escape_key]['pos'] = false; - continue; - } - - if ($match_i !== false && $match_i < $next_escape_regexp_pos) { - $next_escape_regexp_pos = $match_i; - $next_escape_regexp_key = $escape_key; - if ($match_i === $start) { - break; - } - } - } - } - - //Find the next simple escape position - if('' != $this->language_data['ESCAPE_CHAR']) { - $simple_escape = strpos($part, $this->language_data['ESCAPE_CHAR'], $start); - if(false === $simple_escape) { - $simple_escape = $length; - } - } else { - $simple_escape = $length; - } - } else { - $next_escape_regexp_pos = $length; - $simple_escape = $length; - } - - if($simple_escape < $next_escape_regexp_pos && - $simple_escape < $length && - $simple_escape < $close_pos) { - //The nexxt escape sequence is a simple one ... - $es_pos = $simple_escape; - - //Add the stuff not in the string yet ... - $string .= $this->hsc(substr($part, $start, $es_pos - $start)); - - //Get the style for this escaped char ... - if (!$this->use_classes) { - $escape_char_attributes = ' style="' . $this->language_data['STYLES']['ESCAPE_CHAR'][0] . '"'; - } else { - $escape_char_attributes = ' class="es0"'; - } - - //Add the style for the escape char ... - $string .= "" . - GeSHi::hsc($this->language_data['ESCAPE_CHAR']); - - //Get the byte AFTER the ESCAPE_CHAR we just found - $es_char = $part[$es_pos + 1]; - if ($es_char == "\n") { - // don't put a newline around newlines - $string .= "\n"; - $start = $es_pos + 2; - } else if (ord($es_char) >= 128) { - //This is an non-ASCII char (UTF8 or single byte) - //This code tries to work around SF#2037598 ... - if(function_exists('mb_substr')) { - $es_char_m = mb_substr(substr($part, $es_pos+1, 16), 0, 1, $this->encoding); - $string .= $es_char_m . ''; - } else if (!GESHI_PHP_PRE_433 && 'utf-8' == $this->encoding) { - if(preg_match("/[\xC2-\xDF][\x80-\xBF]". - "|\xE0[\xA0-\xBF][\x80-\xBF]". - "|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}". - "|\xED[\x80-\x9F][\x80-\xBF]". - "|\xF0[\x90-\xBF][\x80-\xBF]{2}". - "|[\xF1-\xF3][\x80-\xBF]{3}". - "|\xF4[\x80-\x8F][\x80-\xBF]{2}/s", - $part, $es_char_m, null, $es_pos + 1)) { - $es_char_m = $es_char_m[0]; - } else { - $es_char_m = $es_char; - } - $string .= $this->hsc($es_char_m) . ''; - } else { - $es_char_m = $this->hsc($es_char); - } - $start = $es_pos + strlen($es_char_m) + 1; - } else { - $string .= $this->hsc($es_char) . ''; - $start = $es_pos + 2; - } - } else if ($next_escape_regexp_pos < $length && - $next_escape_regexp_pos < $close_pos) { - $es_pos = $next_escape_regexp_pos; - //Add the stuff not in the string yet ... - $string .= $this->hsc(substr($part, $start, $es_pos - $start)); - - //Get the key and length of this match ... - $escape = $escape_regexp_cache_per_key[$next_escape_regexp_key]; - $escape_str = substr($part, $es_pos, $escape['length']); - $escape_key = $escape['key']; - - //Get the style for this escaped char ... - if (!$this->use_classes) { - $escape_char_attributes = ' style="' . $this->language_data['STYLES']['ESCAPE_CHAR'][$escape_key] . '"'; - } else { - $escape_char_attributes = ' class="es' . $escape_key . '"'; - } - - //Add the style for the escape char ... - $string .= "" . - $this->hsc($escape_str) . ''; - - $start = $es_pos + $escape['length']; - } else { - //Copy the remainder of the string ... - $string .= $this->hsc(substr($part, $start, $close_pos - $start + $char_len)) . ''; - $start = $close_pos + $char_len; - $string_open = false; - } - } while($string_open); - - if ($check_linenumbers) { - // Are line numbers used? If, we should end the string before - // the newline and begin it again (so when
  • s are put in the source - // remains XHTML compliant) - // note to self: This opens up possibility of config files specifying - // that languages can/cannot have multiline strings??? - $string = str_replace("\n", "\n", $string); - } - - $result .= $string; - $string = ''; - $i = $start - 1; - continue; - } else if ($this->lexic_permissions['STRINGS'] && $hq && $hq[0] == $char && - substr($part, $i, $hq_strlen) == $hq) { - // The start of a hard quoted string - if (!$this->use_classes) { - $string_attributes = ' style="' . $this->language_data['STYLES']['STRINGS']['HARD'] . '"'; - $escape_char_attributes = ' style="' . $this->language_data['STYLES']['ESCAPE_CHAR']['HARD'] . '"'; - } else { - $string_attributes = ' class="st_h"'; - $escape_char_attributes = ' class="es_h"'; - } - // parse the stuff before this - $result .= $this->parse_non_string_part($stuff_to_parse); - $stuff_to_parse = ''; - - // now handle the string - $string = ''; - - // look for closing quote - $start = $i + $hq_strlen; - while ($close_pos = strpos($part, $this->language_data['HARDQUOTE'][1], $start)) { - $start = $close_pos + 1; - if ($this->lexic_permissions['ESCAPE_CHAR'] && $part[$close_pos - 1] == $this->language_data['HARDCHAR']) { - // make sure this quote is not escaped - foreach ($this->language_data['HARDESCAPE'] as $hardescape) { - if (substr($part, $close_pos - 1, strlen($hardescape)) == $hardescape) { - // check wether this quote is escaped or if it is something like '\\' - $escape_char_pos = $close_pos - 1; - while ($escape_char_pos > 0 - && $part[$escape_char_pos - 1] == $this->language_data['HARDCHAR']) { - --$escape_char_pos; - } - if (($close_pos - $escape_char_pos) & 1) { - // uneven number of escape chars => this quote is escaped - continue 2; - } - } - } - } - - // found closing quote - break; - } - - //Found the closing delimiter? - if (!$close_pos) { - // span till the end of this $part when no closing delimiter is found - $close_pos = $length; - } - - //Get the actual string - $string = substr($part, $i, $close_pos - $i + 1); - $i = $close_pos; - - // handle escape chars and encode html chars - // (special because when we have escape chars within our string they may not be escaped) - if ($this->lexic_permissions['ESCAPE_CHAR'] && $this->language_data['ESCAPE_CHAR']) { - $start = 0; - $new_string = ''; - while ($es_pos = strpos($string, $this->language_data['ESCAPE_CHAR'], $start)) { - // hmtl escape stuff before - $new_string .= $this->hsc(substr($string, $start, $es_pos - $start)); - // check if this is a hard escape - foreach ($this->language_data['HARDESCAPE'] as $hardescape) { - if (substr($string, $es_pos, strlen($hardescape)) == $hardescape) { - // indeed, this is a hardescape - $new_string .= "" . - $this->hsc($hardescape) . ''; - $start = $es_pos + strlen($hardescape); - continue 2; - } - } - // not a hard escape, but a normal escape - // they come in pairs of two - $c = 0; - while (isset($string[$es_pos + $c]) && isset($string[$es_pos + $c + 1]) - && $string[$es_pos + $c] == $this->language_data['ESCAPE_CHAR'] - && $string[$es_pos + $c + 1] == $this->language_data['ESCAPE_CHAR']) { - $c += 2; - } - if ($c) { - $new_string .= "" . - str_repeat($escaped_escape_char, $c) . - ''; - $start = $es_pos + $c; - } else { - // this is just a single lonely escape char... - $new_string .= $escaped_escape_char; - $start = $es_pos + 1; - } - } - $string = $new_string . $this->hsc(substr($string, $start)); - } else { - $string = $this->hsc($string); - } - - if ($check_linenumbers) { - // Are line numbers used? If, we should end the string before - // the newline and begin it again (so when
  • s are put in the source - // remains XHTML compliant) - // note to self: This opens up possibility of config files specifying - // that languages can/cannot have multiline strings??? - $string = str_replace("\n", "\n", $string); - } - - $result .= "" . $string . ''; - $string = ''; - continue; - } else { - //Have a look for regexp comments - if ($i == $next_comment_regexp_pos) { - $COMMENT_MATCHED = true; - $comment = $comment_regexp_cache_per_key[$next_comment_regexp_key]; - $test_str = $this->hsc(substr($part, $i, $comment['length'])); - - //@todo If remove important do remove here - if ($this->lexic_permissions['COMMENTS']['MULTI']) { - if (!$this->use_classes) { - $attributes = ' style="' . $this->language_data['STYLES']['COMMENTS'][$comment['key']] . '"'; - } else { - $attributes = ' class="co' . $comment['key'] . '"'; - } - - $test_str = "" . $test_str . ""; - - // Short-cut through all the multiline code - if ($check_linenumbers) { - // strreplace to put close span and open span around multiline newlines - $test_str = str_replace( - "\n", "\n", - str_replace("\n ", "\n ", $test_str) - ); - } - } - - $i += $comment['length'] - 1; - - // parse the rest - $result .= $this->parse_non_string_part($stuff_to_parse); - $stuff_to_parse = ''; - } - - // If we haven't matched a regexp comment, try multi-line comments - if (!$COMMENT_MATCHED) { - // Is this a multiline comment? - if (!empty($this->language_data['COMMENT_MULTI']) && $next_comment_multi_pos < $i) { - $next_comment_multi_pos = $length; - foreach ($this->language_data['COMMENT_MULTI'] as $open => $close) { - $match_i = false; - if (isset($comment_multi_cache_per_key[$open]) && - ($comment_multi_cache_per_key[$open] >= $i || - $comment_multi_cache_per_key[$open] === false)) { - // we have already matched something - if ($comment_multi_cache_per_key[$open] === false) { - // this comment is never matched - continue; - } - $match_i = $comment_multi_cache_per_key[$open]; - } else if (($match_i = stripos($part, $open, $i)) !== false) { - $comment_multi_cache_per_key[$open] = $match_i; - } else { - $comment_multi_cache_per_key[$open] = false; - continue; - } - if ($match_i !== false && $match_i < $next_comment_multi_pos) { - $next_comment_multi_pos = $match_i; - $next_open_comment_multi = $open; - if ($match_i === $i) { - break; - } - } - } - } - if ($i == $next_comment_multi_pos) { - $open = $next_open_comment_multi; - $close = $this->language_data['COMMENT_MULTI'][$open]; - $open_strlen = strlen($open); - $close_strlen = strlen($close); - $COMMENT_MATCHED = true; - $test_str_match = $open; - //@todo If remove important do remove here - if ($this->lexic_permissions['COMMENTS']['MULTI'] || - $open == GESHI_START_IMPORTANT) { - if ($open != GESHI_START_IMPORTANT) { - if (!$this->use_classes) { - $attributes = ' style="' . $this->language_data['STYLES']['COMMENTS']['MULTI'] . '"'; - } else { - $attributes = ' class="coMULTI"'; - } - $test_str = "" . $this->hsc($open); - } else { - if (!$this->use_classes) { - $attributes = ' style="' . $this->important_styles . '"'; - } else { - $attributes = ' class="imp"'; - } - - // We don't include the start of the comment if it's an - // "important" part - $test_str = ""; - } - } else { - $test_str = $this->hsc($open); - } - - $close_pos = strpos( $part, $close, $i + $open_strlen ); - - if ($close_pos === false) { - $close_pos = $length; - } - - // Short-cut through all the multiline code - $rest_of_comment = $this->hsc(substr($part, $i + $open_strlen, $close_pos - $i - $open_strlen + $close_strlen)); - if (($this->lexic_permissions['COMMENTS']['MULTI'] || - $test_str_match == GESHI_START_IMPORTANT) && - $check_linenumbers) { - - // strreplace to put close span and open span around multiline newlines - $test_str .= str_replace( - "\n", "\n", - str_replace("\n ", "\n ", $rest_of_comment) - ); - } else { - $test_str .= $rest_of_comment; - } - - if ($this->lexic_permissions['COMMENTS']['MULTI'] || - $test_str_match == GESHI_START_IMPORTANT) { - $test_str .= ''; - } - - $i = $close_pos + $close_strlen - 1; - - // parse the rest - $result .= $this->parse_non_string_part($stuff_to_parse); - $stuff_to_parse = ''; - } - } - - // If we haven't matched a multiline comment, try single-line comments - if (!$COMMENT_MATCHED) { - // cache potential single line comment occurances - if (!empty($this->language_data['COMMENT_SINGLE']) && $next_comment_single_pos < $i) { - $next_comment_single_pos = $length; - foreach ($this->language_data['COMMENT_SINGLE'] as $comment_key => $comment_mark) { - $match_i = false; - if (isset($comment_single_cache_per_key[$comment_key]) && - ($comment_single_cache_per_key[$comment_key] >= $i || - $comment_single_cache_per_key[$comment_key] === false)) { - // we have already matched something - if ($comment_single_cache_per_key[$comment_key] === false) { - // this comment is never matched - continue; - } - $match_i = $comment_single_cache_per_key[$comment_key]; - } else if ( - // case sensitive comments - ($this->language_data['CASE_SENSITIVE'][GESHI_COMMENTS] && - ($match_i = stripos($part, $comment_mark, $i)) !== false) || - // non case sensitive - (!$this->language_data['CASE_SENSITIVE'][GESHI_COMMENTS] && - (($match_i = strpos($part, $comment_mark, $i)) !== false))) { - $comment_single_cache_per_key[$comment_key] = $match_i; - } else { - $comment_single_cache_per_key[$comment_key] = false; - continue; - } - if ($match_i !== false && $match_i < $next_comment_single_pos) { - $next_comment_single_pos = $match_i; - $next_comment_single_key = $comment_key; - if ($match_i === $i) { - break; - } - } - } - } - if ($next_comment_single_pos == $i) { - $comment_key = $next_comment_single_key; - $comment_mark = $this->language_data['COMMENT_SINGLE'][$comment_key]; - $com_len = strlen($comment_mark); - - // This check will find special variables like $# in bash - // or compiler directives of Delphi beginning {$ - if ((empty($sc_disallowed_before) || ($i == 0) || - (false === strpos($sc_disallowed_before, $part[$i-1]))) && - (empty($sc_disallowed_after) || ($length <= $i + $com_len) || - (false === strpos($sc_disallowed_after, $part[$i + $com_len])))) - { - // this is a valid comment - $COMMENT_MATCHED = true; - if ($this->lexic_permissions['COMMENTS'][$comment_key]) { - if (!$this->use_classes) { - $attributes = ' style="' . $this->language_data['STYLES']['COMMENTS'][$comment_key] . '"'; - } else { - $attributes = ' class="co' . $comment_key . '"'; - } - $test_str = "" . $this->hsc($this->change_case($comment_mark)); - } else { - $test_str = $this->hsc($comment_mark); - } - - //Check if this comment is the last in the source - $close_pos = strpos($part, "\n", $i); - $oops = false; - if ($close_pos === false) { - $close_pos = $length; - $oops = true; - } - $test_str .= $this->hsc(substr($part, $i + $com_len, $close_pos - $i - $com_len)); - if ($this->lexic_permissions['COMMENTS'][$comment_key]) { - $test_str .= ""; - } - - // Take into account that the comment might be the last in the source - if (!$oops) { - $test_str .= "\n"; - } - - $i = $close_pos; - - // parse the rest - $result .= $this->parse_non_string_part($stuff_to_parse); - $stuff_to_parse = ''; - } - } - } - } - - // Where are we adding this char? - if (!$COMMENT_MATCHED) { - $stuff_to_parse .= $char; - } else { - $result .= $test_str; - unset($test_str); - $COMMENT_MATCHED = false; - } - } - // Parse the last bit - $result .= $this->parse_non_string_part($stuff_to_parse); - $stuff_to_parse = ''; - } else { - $result .= $this->hsc($part); - } - // Close the that surrounds the block - if ($STRICTATTRS != '') { - $result = str_replace("\n", "\n", $result); - $result .= ''; - } - - $endresult .= $result; - unset($part, $parts[$key], $result); - } - - //This fix is related to SF#1923020, but has to be applied regardless of - //actually highlighting symbols. - /** NOTE: memorypeak #3 */ - $endresult = str_replace(array('', ''), array(';', '|'), $endresult); - -// // Parse the last stuff (redundant?) -// $result .= $this->parse_non_string_part($stuff_to_parse); - - // Lop off the very first and last spaces -// $result = substr($result, 1, -1); - - // We're finished: stop timing - $this->set_time($start_time, microtime()); - - $this->finalise($endresult); - return $endresult; - } - - /** - * Swaps out spaces and tabs for HTML indentation. Not needed if - * the code is in a pre block... - * - * @param string The source to indent (reference!) - * @since 1.0.0 - * @access private - */ - function indent(&$result) { - // Replace tabs with the correct number of spaces - if (false !== strpos($result, "\t")) { - $lines = explode("\n", $result); - $result = null;//Save memory while we process the lines individually - $tab_width = $this->get_real_tab_width(); - $tab_string = ' ' . str_repeat(' ', $tab_width); - - for ($key = 0, $n = count($lines); $key < $n; $key++) { - $line = $lines[$key]; - if (false === strpos($line, "\t")) { - continue; - } - - $pos = 0; - $length = strlen($line); - $lines[$key] = ''; // reduce memory - - $IN_TAG = false; - for ($i = 0; $i < $length; ++$i) { - $char = $line[$i]; - // Simple engine to work out whether we're in a tag. - // If we are we modify $pos. This is so we ignore HTML - // in the line and only workout the tab replacement - // via the actual content of the string - // This test could be improved to include strings in the - // html so that < or > would be allowed in user's styles - // (e.g. quotes: '<' '>'; or similar) - if ($IN_TAG) { - if ('>' == $char) { - $IN_TAG = false; - } - $lines[$key] .= $char; - } else if ('<' == $char) { - $IN_TAG = true; - $lines[$key] .= '<'; - } else if ('&' == $char) { - $substr = substr($line, $i + 3, 5); - $posi = strpos($substr, ';'); - if (false === $posi) { - ++$pos; - } else { - $pos -= $posi+2; - } - $lines[$key] .= $char; - } else if ("\t" == $char) { - $str = ''; - // OPTIMISE - move $strs out. Make an array: - // $tabs = array( - // 1 => ' ', - // 2 => '  ', - // 3 => '   ' etc etc - // to use instead of building a string every time - $tab_end_width = $tab_width - ($pos % $tab_width); //Moved out of the look as it doesn't change within the loop - if (($pos & 1) || 1 == $tab_end_width) { - $str .= substr($tab_string, 6, $tab_end_width); - } else { - $str .= substr($tab_string, 0, $tab_end_width+5); - } - $lines[$key] .= $str; - $pos += $tab_end_width; - - if (false === strpos($line, "\t", $i + 1)) { - $lines[$key] .= substr($line, $i + 1); - break; - } - } else if (0 == $pos && ' ' == $char) { - $lines[$key] .= ' '; - ++$pos; - } else { - $lines[$key] .= $char; - ++$pos; - } - } - } - $result = implode("\n", $lines); - unset($lines);//We don't need the lines separated beyond this --- free them! - } - // Other whitespace - // BenBE: Fix to reduce the number of replacements to be done - $result = preg_replace('/^ /m', ' ', $result); - $result = str_replace(' ', '  ', $result); - - if ($this->line_numbers == GESHI_NO_LINE_NUMBERS) { - if ($this->line_ending === null) { - $result = nl2br($result); - } else { - $result = str_replace("\n", $this->line_ending, $result); - } - } - } - - /** - * Changes the case of a keyword for those languages where a change is asked for - * - * @param string The keyword to change the case of - * @return string The keyword with its case changed - * @since 1.0.0 - * @access private - */ - function change_case($instr) { - switch ($this->language_data['CASE_KEYWORDS']) { - case GESHI_CAPS_UPPER: - return strtoupper($instr); - case GESHI_CAPS_LOWER: - return strtolower($instr); - default: - return $instr; - } - } - - /** - * Handles replacements of keywords to include markup and links if requested - * - * @param string The keyword to add the Markup to - * @return The HTML for the match found - * @since 1.0.8 - * @access private - * - * @todo Get rid of ender in keyword links - */ - function handle_keyword_replace($match) { - $k = $this->_kw_replace_group; - $keyword = $match[0]; - - $before = ''; - $after = ''; - - if ($this->keyword_links) { - // Keyword links have been ebabled - - if (isset($this->language_data['URLS'][$k]) && - $this->language_data['URLS'][$k] != '') { - // There is a base group for this keyword - - // Old system: strtolower - //$keyword = ( $this->language_data['CASE_SENSITIVE'][$group] ) ? $keyword : strtolower($keyword); - // New system: get keyword from language file to get correct case - if (!$this->language_data['CASE_SENSITIVE'][$k] && - strpos($this->language_data['URLS'][$k], '{FNAME}') !== false) { - foreach ($this->language_data['KEYWORDS'][$k] as $word) { - if (strcasecmp($word, $keyword) == 0) { - break; - } - } - } else { - $word = $keyword; - } - - $before = '<|UR1|"' . - str_replace( - array( - '{FNAME}', - '{FNAMEL}', - '{FNAMEU}', - '.'), - array( - str_replace('+', '%20', urlencode($this->hsc($word))), - str_replace('+', '%20', urlencode($this->hsc(strtolower($word)))), - str_replace('+', '%20', urlencode($this->hsc(strtoupper($word)))), - ''), - $this->language_data['URLS'][$k] - ) . '">'; - $after = ''; - } - } - - return $before . '<|/'. $k .'/>' . $this->change_case($keyword) . '|>' . $after; - } - - /** - * handles regular expressions highlighting-definitions with callback functions - * - * @note this is a callback, don't use it directly - * - * @param array the matches array - * @return The highlighted string - * @since 1.0.8 - * @access private - */ - function handle_regexps_callback($matches) { - // before: "' style=\"' . call_user_func(\"$func\", '\\1') . '\"\\1|>'", - return ' style="' . call_user_func($this->language_data['STYLES']['REGEXPS'][$this->_rx_key], $matches[1]) . '"'. $matches[1] . '|>'; - } - - /** - * handles newlines in REGEXPS matches. Set the _hmr_* vars before calling this - * - * @note this is a callback, don't use it directly - * - * @param array the matches array - * @return string - * @since 1.0.8 - * @access private - */ - function handle_multiline_regexps($matches) { - $before = $this->_hmr_before; - $after = $this->_hmr_after; - if ($this->_hmr_replace) { - $replace = $this->_hmr_replace; - $search = array(); - - foreach (array_keys($matches) as $k) { - $search[] = '\\' . $k; - } - - $before = str_replace($search, $matches, $before); - $after = str_replace($search, $matches, $after); - $replace = str_replace($search, $matches, $replace); - } else { - $replace = $matches[0]; - } - return $before - . '<|!REG3XP' . $this->_hmr_key .'!>' - . str_replace("\n", "|>\n<|!REG3XP" . $this->_hmr_key . '!>', $replace) - . '|>' - . $after; - } - - /** - * Takes a string that has no strings or comments in it, and highlights - * stuff like keywords, numbers and methods. - * - * @param string The string to parse for keyword, numbers etc. - * @since 1.0.0 - * @access private - * @todo BUGGY! Why? Why not build string and return? - */ - function parse_non_string_part($stuff_to_parse) { - $stuff_to_parse = ' ' . $this->hsc($stuff_to_parse); - - // Regular expressions - foreach ($this->language_data['REGEXPS'] as $key => $regexp) { - if ($this->lexic_permissions['REGEXPS'][$key]) { - if (is_array($regexp)) { - if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { - // produce valid HTML when we match multiple lines - $this->_hmr_replace = $regexp[GESHI_REPLACE]; - $this->_hmr_before = $regexp[GESHI_BEFORE]; - $this->_hmr_key = $key; - $this->_hmr_after = $regexp[GESHI_AFTER]; - $stuff_to_parse = preg_replace_callback( - "/" . $regexp[GESHI_SEARCH] . "/{$regexp[GESHI_MODIFIERS]}", - array($this, 'handle_multiline_regexps'), - $stuff_to_parse); - $this->_hmr_replace = false; - $this->_hmr_before = ''; - $this->_hmr_after = ''; - } else { - $stuff_to_parse = preg_replace( - '/' . $regexp[GESHI_SEARCH] . '/' . $regexp[GESHI_MODIFIERS], - $regexp[GESHI_BEFORE] . '<|!REG3XP'. $key .'!>' . $regexp[GESHI_REPLACE] . '|>' . $regexp[GESHI_AFTER], - $stuff_to_parse); - } - } else { - if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { - // produce valid HTML when we match multiple lines - $this->_hmr_key = $key; - $stuff_to_parse = preg_replace_callback( "/(" . $regexp . ")/", - array($this, 'handle_multiline_regexps'), $stuff_to_parse); - $this->_hmr_key = ''; - } else { - $stuff_to_parse = preg_replace( "/(" . $regexp . ")/", "<|!REG3XP$key!>\\1|>", $stuff_to_parse); - } - } - } - } - - // Highlight numbers. As of 1.0.8 we support diffent types of numbers - $numbers_found = false; - if ($this->lexic_permissions['NUMBERS'] && preg_match('#\d#', $stuff_to_parse )) { - $numbers_found = true; - - //For each of the formats ... - foreach($this->language_data['NUMBERS_RXCACHE'] as $id => $regexp) { - //Check if it should be highlighted ... - $stuff_to_parse = preg_replace($regexp, "<|/NUM!$id/>\\1|>", $stuff_to_parse); - } - } - - // Highlight keywords - $disallowed_before = "(?|^&"; - $disallowed_after = "(?![a-zA-Z0-9_\|%\\-&;"; - if ($this->lexic_permissions['STRINGS']) { - $quotemarks = preg_quote(implode($this->language_data['QUOTEMARKS']), '/'); - $disallowed_before .= $quotemarks; - $disallowed_after .= $quotemarks; - } - $disallowed_before .= "])"; - $disallowed_after .= "])"; - - $parser_control_pergroup = false; - if (isset($this->language_data['PARSER_CONTROL'])) { - if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS'])) { - $x = 0; // check wether per-keyword-group parser_control is enabled - if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_BEFORE'])) { - $disallowed_before = $this->language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_BEFORE']; - ++$x; - } - if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_AFTER'])) { - $disallowed_after = $this->language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_AFTER']; - ++$x; - } - $parser_control_pergroup = (count($this->language_data['PARSER_CONTROL']['KEYWORDS']) - $x) > 0; - } - } - - // if this is changed, don't forget to change it below -// if (!empty($disallowed_before)) { -// $disallowed_before = "(?language_data['KEYWORDS']) as $k) { - if (!isset($this->lexic_permissions['KEYWORDS'][$k]) || - $this->lexic_permissions['KEYWORDS'][$k]) { - - $case_sensitive = $this->language_data['CASE_SENSITIVE'][$k]; - $modifiers = $case_sensitive ? '' : 'i'; - - // NEW in 1.0.8 - per-keyword-group parser control - $disallowed_before_local = $disallowed_before; - $disallowed_after_local = $disallowed_after; - if ($parser_control_pergroup && isset($this->language_data['PARSER_CONTROL']['KEYWORDS'][$k])) { - if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS'][$k]['DISALLOWED_BEFORE'])) { - $disallowed_before_local = - $this->language_data['PARSER_CONTROL']['KEYWORDS'][$k]['DISALLOWED_BEFORE']; - } - - if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS'][$k]['DISALLOWED_AFTER'])) { - $disallowed_after_local = - $this->language_data['PARSER_CONTROL']['KEYWORDS'][$k]['DISALLOWED_AFTER']; - } - } - - $this->_kw_replace_group = $k; - - //NEW in 1.0.8, the cached regexp list - // since we don't want PHP / PCRE to crash due to too large patterns we split them into smaller chunks - for ($set = 0, $set_length = count($this->language_data['CACHED_KEYWORD_LISTS'][$k]); $set < $set_length; ++$set) { - $keywordset =& $this->language_data['CACHED_KEYWORD_LISTS'][$k][$set]; - // Might make a more unique string for putting the number in soon - // Basically, we don't put the styles in yet because then the styles themselves will - // get highlighted if the language has a CSS keyword in it (like CSS, for example ;)) - $stuff_to_parse = preg_replace_callback( - "/$disallowed_before_local({$keywordset})(?!\(?:htm|php))$disallowed_after_local/$modifiers", - array($this, 'handle_keyword_replace'), - $stuff_to_parse - ); - } - } - } - - // - // Now that's all done, replace /[number]/ with the correct styles - // - foreach (array_keys($this->language_data['KEYWORDS']) as $k) { - if (!$this->use_classes) { - $attributes = ' style="' . - (isset($this->language_data['STYLES']['KEYWORDS'][$k]) ? - $this->language_data['STYLES']['KEYWORDS'][$k] : "") . '"'; - } else { - $attributes = ' class="kw' . $k . '"'; - } - $stuff_to_parse = str_replace("<|/$k/>", "<|$attributes>", $stuff_to_parse); - } - - if ($numbers_found) { - // Put number styles in - foreach($this->language_data['NUMBERS_RXCACHE'] as $id => $regexp) { -//Commented out for now, as this needs some review ... -// if ($numbers_permissions & $id) { - //Get the appropriate style ... - //Checking for unset styles is done by the style cache builder ... - if (!$this->use_classes) { - $attributes = ' style="' . $this->language_data['STYLES']['NUMBERS'][$id] . '"'; - } else { - $attributes = ' class="nu'.$id.'"'; - } - - //Set in the correct styles ... - $stuff_to_parse = str_replace("/NUM!$id/", $attributes, $stuff_to_parse); -// } - } - } - - // Highlight methods and fields in objects - if ($this->lexic_permissions['METHODS'] && $this->language_data['OOLANG']) { - $oolang_spaces = "[\s]*"; - $oolang_before = ""; - $oolang_after = "[a-zA-Z][a-zA-Z0-9_]*"; - if (isset($this->language_data['PARSER_CONTROL'])) { - if (isset($this->language_data['PARSER_CONTROL']['OOLANG'])) { - if (isset($this->language_data['PARSER_CONTROL']['OOLANG']['MATCH_BEFORE'])) { - $oolang_before = $this->language_data['PARSER_CONTROL']['OOLANG']['MATCH_BEFORE']; - } - if (isset($this->language_data['PARSER_CONTROL']['OOLANG']['MATCH_AFTER'])) { - $oolang_after = $this->language_data['PARSER_CONTROL']['OOLANG']['MATCH_AFTER']; - } - if (isset($this->language_data['PARSER_CONTROL']['OOLANG']['MATCH_SPACES'])) { - $oolang_spaces = $this->language_data['PARSER_CONTROL']['OOLANG']['MATCH_SPACES']; - } - } - } - - foreach ($this->language_data['OBJECT_SPLITTERS'] as $key => $splitter) { - if (false !== strpos($stuff_to_parse, $splitter)) { - if (!$this->use_classes) { - $attributes = ' style="' . $this->language_data['STYLES']['METHODS'][$key] . '"'; - } else { - $attributes = ' class="me' . $key . '"'; - } - $stuff_to_parse = preg_replace("/($oolang_before)(" . preg_quote($this->language_data['OBJECT_SPLITTERS'][$key], '/') . ")($oolang_spaces)($oolang_after)/", "\\1\\2\\3<|$attributes>\\4|>", $stuff_to_parse); - } - } - } - - // - // Highlight brackets. Yes, I've tried adding a semi-colon to this list. - // You try it, and see what happens ;) - // TODO: Fix lexic permissions not converting entities if shouldn't - // be highlighting regardless - // - if ($this->lexic_permissions['BRACKETS']) { - $stuff_to_parse = str_replace( $this->language_data['CACHE_BRACKET_MATCH'], - $this->language_data['CACHE_BRACKET_REPLACE'], $stuff_to_parse ); - } - - - //FIX for symbol highlighting ... - if ($this->lexic_permissions['SYMBOLS'] && !empty($this->language_data['SYMBOLS'])) { - //Get all matches and throw away those witin a block that is already highlighted... (i.e. matched by a regexp) - $n_symbols = preg_match_all("/<\|(?:|[^>])+>(?:(?!\|>).*?)\|>|<\/a>|(?:" . $this->language_data['SYMBOL_SEARCH'] . ")+/", $stuff_to_parse, $pot_symbols, PREG_OFFSET_CAPTURE | PREG_SET_ORDER); - $global_offset = 0; - for ($s_id = 0; $s_id < $n_symbols; ++$s_id) { - $symbol_match = $pot_symbols[$s_id][0][0]; - if (strpos($symbol_match, '<') !== false || strpos($symbol_match, '>') !== false) { - // already highlighted blocks _must_ include either < or > - // so if this conditional applies, we have to skip this match - // BenBE: UNLESS the block contains or - if(strpos($symbol_match, '') === false && - strpos($symbol_match, '') === false) { - continue; - } - } - - // if we reach this point, we have a valid match which needs to be highlighted - - $symbol_length = strlen($symbol_match); - $symbol_offset = $pot_symbols[$s_id][0][1]; - unset($pot_symbols[$s_id]); - $symbol_end = $symbol_length + $symbol_offset; - $symbol_hl = ""; - - // if we have multiple styles, we have to handle them properly - if ($this->language_data['MULTIPLE_SYMBOL_GROUPS']) { - $old_sym = -1; - // Split the current stuff to replace into its atomic symbols ... - preg_match_all("/" . $this->language_data['SYMBOL_SEARCH'] . "/", $symbol_match, $sym_match_syms, PREG_PATTERN_ORDER); - foreach ($sym_match_syms[0] as $sym_ms) { - //Check if consequtive symbols belong to the same group to save output ... - if (isset($this->language_data['SYMBOL_DATA'][$sym_ms]) - && ($this->language_data['SYMBOL_DATA'][$sym_ms] != $old_sym)) { - if (-1 != $old_sym) { - $symbol_hl .= "|>"; - } - $old_sym = $this->language_data['SYMBOL_DATA'][$sym_ms]; - if (!$this->use_classes) { - $symbol_hl .= '<| style="' . $this->language_data['STYLES']['SYMBOLS'][$old_sym] . '">'; - } else { - $symbol_hl .= '<| class="sy' . $old_sym . '">'; - } - } - $symbol_hl .= $sym_ms; - } - unset($sym_match_syms); - - //Close remaining tags and insert the replacement at the right position ... - //Take caution if symbol_hl is empty to avoid doubled closing spans. - if (-1 != $old_sym) { - $symbol_hl .= "|>"; - } - } else { - if (!$this->use_classes) { - $symbol_hl = '<| style="' . $this->language_data['STYLES']['SYMBOLS'][0] . '">'; - } else { - $symbol_hl = '<| class="sy0">'; - } - $symbol_hl .= $symbol_match . '|>'; - } - - $stuff_to_parse = substr_replace($stuff_to_parse, $symbol_hl, $symbol_offset + $global_offset, $symbol_length); - - // since we replace old text with something of different size, - // we'll have to keep track of the differences - $global_offset += strlen($symbol_hl) - $symbol_length; - } - } - //FIX for symbol highlighting ... - - // Add class/style for regexps - foreach (array_keys($this->language_data['REGEXPS']) as $key) { - if ($this->lexic_permissions['REGEXPS'][$key]) { - if (is_callable($this->language_data['STYLES']['REGEXPS'][$key])) { - $this->_rx_key = $key; - $stuff_to_parse = preg_replace_callback("/!REG3XP$key!(.*)\|>/U", - array($this, 'handle_regexps_callback'), - $stuff_to_parse); - } else { - if (!$this->use_classes) { - $attributes = ' style="' . $this->language_data['STYLES']['REGEXPS'][$key] . '"'; - } else { - if (is_array($this->language_data['REGEXPS'][$key]) && - array_key_exists(GESHI_CLASS, $this->language_data['REGEXPS'][$key])) { - $attributes = ' class="' . - $this->language_data['REGEXPS'][$key][GESHI_CLASS] . '"'; - } else { - $attributes = ' class="re' . $key . '"'; - } - } - $stuff_to_parse = str_replace("!REG3XP$key!", "$attributes", $stuff_to_parse); - } - } - } - - // Replace with . for urls - $stuff_to_parse = str_replace('', '.', $stuff_to_parse); - // Replace <|UR1| with link_styles[GESHI_LINK])) { - if ($this->use_classes) { - $stuff_to_parse = str_replace('<|UR1|', 'link_target . ' href=', $stuff_to_parse); - } else { - $stuff_to_parse = str_replace('<|UR1|', 'link_target . ' style="' . $this->link_styles[GESHI_LINK] . '" href=', $stuff_to_parse); - } - } else { - $stuff_to_parse = str_replace('<|UR1|', 'link_target . ' href=', $stuff_to_parse); - } - - // - // NOW we add the span thingy ;) - // - - $stuff_to_parse = str_replace('<|', '', '', $stuff_to_parse ); - return substr($stuff_to_parse, 1); - } - - /** - * Sets the time taken to parse the code - * - * @param microtime The time when parsing started - * @param microtime The time when parsing ended - * @since 1.0.2 - * @access private - */ - function set_time($start_time, $end_time) { - $start = explode(' ', $start_time); - $end = explode(' ', $end_time); - $this->time = $end[0] + $end[1] - $start[0] - $start[1]; - } - - /** - * Gets the time taken to parse the code - * - * @return double The time taken to parse the code - * @since 1.0.2 - */ - function get_time() { - return $this->time; - } - - /** - * Merges arrays recursively, overwriting values of the first array with values of later arrays - * - * @since 1.0.8 - * @access private - */ - function merge_arrays() { - $arrays = func_get_args(); - $narrays = count($arrays); - - // check arguments - // comment out if more performance is necessary (in this case the foreach loop will trigger a warning if the argument is not an array) - for ($i = 0; $i < $narrays; $i ++) { - if (!is_array($arrays[$i])) { - // also array_merge_recursive returns nothing in this case - trigger_error('Argument #' . ($i+1) . ' is not an array - trying to merge array with scalar! Returning false!', E_USER_WARNING); - return false; - } - } - - // the first array is in the output set in every case - $ret = $arrays[0]; - - // merege $ret with the remaining arrays - for ($i = 1; $i < $narrays; $i ++) { - foreach ($arrays[$i] as $key => $value) { - if (is_array($value) && isset($ret[$key])) { - // if $ret[$key] is not an array you try to merge an scalar value with an array - the result is not defined (incompatible arrays) - // in this case the call will trigger an E_USER_WARNING and the $ret[$key] will be false. - $ret[$key] = $this->merge_arrays($ret[$key], $value); - } else { - $ret[$key] = $value; - } - } - } - - return $ret; - } - - /** - * Gets language information and stores it for later use - * - * @param string The filename of the language file you want to load - * @since 1.0.0 - * @access private - * @todo Needs to load keys for lexic permissions for keywords, regexps etc - */ - function load_language($file_name) { - if ($file_name == $this->loaded_language) { - // this file is already loaded! - return; - } - - //Prepare some stuff before actually loading the language file - $this->loaded_language = $file_name; - $this->parse_cache_built = false; - $this->enable_highlighting(); - $language_data = array(); - - //Load the language file - require $file_name; - - // Perhaps some checking might be added here later to check that - // $language data is a valid thing but maybe not - $this->language_data = $language_data; - - // Set strict mode if should be set - $this->strict_mode = $this->language_data['STRICT_MODE_APPLIES']; - - // Set permissions for all lexics to true - // so they'll be highlighted by default - foreach (array_keys($this->language_data['KEYWORDS']) as $key) { - if (!empty($this->language_data['KEYWORDS'][$key])) { - $this->lexic_permissions['KEYWORDS'][$key] = true; - } else { - $this->lexic_permissions['KEYWORDS'][$key] = false; - } - } - - foreach (array_keys($this->language_data['COMMENT_SINGLE']) as $key) { - $this->lexic_permissions['COMMENTS'][$key] = true; - } - foreach (array_keys($this->language_data['REGEXPS']) as $key) { - $this->lexic_permissions['REGEXPS'][$key] = true; - } - - // for BenBE and future code reviews: - // we can use empty here since we only check for existance and emptiness of an array - // if it is not an array at all but rather false or null this will work as intended as well - // even if $this->language_data['PARSER_CONTROL'] is undefined this won't trigger a notice - if (!empty($this->language_data['PARSER_CONTROL']['ENABLE_FLAGS'])) { - foreach ($this->language_data['PARSER_CONTROL']['ENABLE_FLAGS'] as $flag => $value) { - // it's either true or false and maybe is true as well - $perm = $value !== GESHI_NEVER; - if ($flag == 'ALL') { - $this->enable_highlighting($perm); - continue; - } - if (!isset($this->lexic_permissions[$flag])) { - // unknown lexic permission - continue; - } - if (is_array($this->lexic_permissions[$flag])) { - foreach ($this->lexic_permissions[$flag] as $key => $val) { - $this->lexic_permissions[$flag][$key] = $perm; - } - } else { - $this->lexic_permissions[$flag] = $perm; - } - } - unset($this->language_data['PARSER_CONTROL']['ENABLE_FLAGS']); - } - - //Fix: Problem where hardescapes weren't handled if no ESCAPE_CHAR was given - //You need to set one for HARDESCAPES only in this case. - if(!isset($this->language_data['HARDCHAR'])) { - $this->language_data['HARDCHAR'] = $this->language_data['ESCAPE_CHAR']; - } - - //NEW in 1.0.8: Allow styles to be loaded from a separate file to override defaults - $style_filename = substr($file_name, 0, -4) . '.style.php'; - if (is_readable($style_filename)) { - //Clear any style_data that could have been set before ... - if (isset($style_data)) { - unset($style_data); - } - - //Read the Style Information from the style file - include $style_filename; - - //Apply the new styles to our current language styles - if (isset($style_data) && is_array($style_data)) { - $this->language_data['STYLES'] = - $this->merge_arrays($this->language_data['STYLES'], $style_data); - } - } - } - - /** - * Takes the parsed code and various options, and creates the HTML - * surrounding it to make it look nice. - * - * @param string The code already parsed (reference!) - * @since 1.0.0 - * @access private - */ - function finalise(&$parsed_code) { - // Remove end parts of important declarations - // This is BUGGY!! My fault for bad code: fix coming in 1.2 - // @todo Remove this crap - if ($this->enable_important_blocks && - (strpos($parsed_code, $this->hsc(GESHI_START_IMPORTANT)) === false)) { - $parsed_code = str_replace($this->hsc(GESHI_END_IMPORTANT), '', $parsed_code); - } - - // Add HTML whitespace stuff if we're using the
    header - if ($this->header_type != GESHI_HEADER_PRE && $this->header_type != GESHI_HEADER_PRE_VALID) { - $this->indent($parsed_code); - } - - // purge some unnecessary stuff - /** NOTE: memorypeak #1 */ - $parsed_code = preg_replace('#]+>(\s*)#', '\\1', $parsed_code); - - // If we are using IDs for line numbers, there needs to be an overall - // ID set to prevent collisions. - if ($this->add_ids && !$this->overall_id) { - $this->overall_id = 'geshi-' . substr(md5(microtime()), 0, 4); - } - - // Get code into lines - /** NOTE: memorypeak #2 */ - $code = explode("\n", $parsed_code); - $parsed_code = $this->header(); - - // If we're using line numbers, we insert
  • s and appropriate - // markup to style them (otherwise we don't need to do anything) - if ($this->line_numbers != GESHI_NO_LINE_NUMBERS && $this->header_type != GESHI_HEADER_PRE_TABLE) { - // If we're using the
     header, we shouldn't add newlines because
    -            // the 
     will line-break them (and the 
  • s already do this for us) - $ls = ($this->header_type != GESHI_HEADER_PRE && $this->header_type != GESHI_HEADER_PRE_VALID) ? "\n" : ''; - - // Set vars to defaults for following loop - $i = 0; - - // Foreach line... - for ($i = 0, $n = count($code); $i < $n;) { - //Reset the attributes for a new line ... - $attrs = array(); - - // Make lines have at least one space in them if they're empty - // BenBE: Checking emptiness using trim instead of relying on blanks - if ('' == trim($code[$i])) { - $code[$i] = ' '; - } - - // If this is a "special line"... - if ($this->line_numbers == GESHI_FANCY_LINE_NUMBERS && - $i % $this->line_nth_row == ($this->line_nth_row - 1)) { - // Set the attributes to style the line - if ($this->use_classes) { - //$attr = ' class="li2"'; - $attrs['class'][] = 'li2'; - $def_attr = ' class="de2"'; - } else { - //$attr = ' style="' . $this->line_style2 . '"'; - $attrs['style'][] = $this->line_style2; - // This style "covers up" the special styles set for special lines - // so that styles applied to special lines don't apply to the actual - // code on that line - $def_attr = ' style="' . $this->code_style . '"'; - } - } else { - if ($this->use_classes) { - //$attr = ' class="li1"'; - $attrs['class'][] = 'li1'; - $def_attr = ' class="de1"'; - } else { - //$attr = ' style="' . $this->line_style1 . '"'; - $attrs['style'][] = $this->line_style1; - $def_attr = ' style="' . $this->code_style . '"'; - } - } - - //Check which type of tag to insert for this line - if ($this->header_type == GESHI_HEADER_PRE_VALID) { - $start = ""; - $end = '
  • '; - } else { - // Span or div? - $start = ""; - $end = ''; - } - - ++$i; - - // Are we supposed to use ids? If so, add them - if ($this->add_ids) { - $attrs['id'][] = "$this->overall_id-$i"; - } - - //Is this some line with extra styles??? - if (in_array($i, $this->highlight_extra_lines)) { - if ($this->use_classes) { - if (isset($this->highlight_extra_lines_styles[$i])) { - $attrs['class'][] = "lx$i"; - } else { - $attrs['class'][] = "ln-xtra"; - } - } else { - array_push($attrs['style'], $this->get_line_style($i)); - } - } - - // Add in the line surrounded by appropriate list HTML - $attr_string = ''; - foreach ($attrs as $key => $attr) { - $attr_string .= ' ' . $key . '="' . implode(' ', $attr) . '"'; - } - - $parsed_code .= "$start{$code[$i-1]}$end
  • $ls"; - unset($code[$i - 1]); - } - } else { - $n = count($code); - if ($this->use_classes) { - $attributes = ' class="de1"'; - } else { - $attributes = ' style="'. $this->code_style .'"'; - } - if ($this->header_type == GESHI_HEADER_PRE_VALID) { - $parsed_code .= ''; - } elseif ($this->header_type == GESHI_HEADER_PRE_TABLE) { - if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { - if ($this->use_classes) { - $attrs = ' class="ln"'; - } else { - $attrs = ' style="'. $this->table_linenumber_style .'"'; - } - $parsed_code .= ''; - // get linenumbers - // we don't merge it with the for below, since it should be better for - // memory consumption this way - // @todo: but... actually it would still be somewhat nice to merge the two loops - // the mem peaks are at different positions - for ($i = 0; $i < $n; ++$i) { - $close = 0; - // fancy lines - if ($this->line_numbers == GESHI_FANCY_LINE_NUMBERS && - $i % $this->line_nth_row == ($this->line_nth_row - 1)) { - // Set the attributes to style the line - if ($this->use_classes) { - $parsed_code .= ''; - } else { - // This style "covers up" the special styles set for special lines - // so that styles applied to special lines don't apply to the actual - // code on that line - $parsed_code .= '' - .''; - } - $close += 2; - } - //Is this some line with extra styles??? - if (in_array($i + 1, $this->highlight_extra_lines)) { - if ($this->use_classes) { - if (isset($this->highlight_extra_lines_styles[$i])) { - $parsed_code .= ""; - } else { - $parsed_code .= ""; - } - } else { - $parsed_code .= "get_line_style($i) . "\">"; - } - ++$close; - } - $parsed_code .= $this->line_numbers_start + $i; - if ($close) { - $parsed_code .= str_repeat('', $close); - } else if ($i != $n) { - $parsed_code .= "\n"; - } - } - $parsed_code .= ''; - } - $parsed_code .= ''; - } - // No line numbers, but still need to handle highlighting lines extra. - // Have to use divs so the full width of the code is highlighted - $close = 0; - for ($i = 0; $i < $n; ++$i) { - // Make lines have at least one space in them if they're empty - // BenBE: Checking emptiness using trim instead of relying on blanks - if ('' == trim($code[$i])) { - $code[$i] = ' '; - } - // fancy lines - if ($this->line_numbers == GESHI_FANCY_LINE_NUMBERS && - $i % $this->line_nth_row == ($this->line_nth_row - 1)) { - // Set the attributes to style the line - if ($this->use_classes) { - $parsed_code .= ''; - } else { - // This style "covers up" the special styles set for special lines - // so that styles applied to special lines don't apply to the actual - // code on that line - $parsed_code .= '' - .''; - } - $close += 2; - } - //Is this some line with extra styles??? - if (in_array($i + 1, $this->highlight_extra_lines)) { - if ($this->use_classes) { - if (isset($this->highlight_extra_lines_styles[$i])) { - $parsed_code .= ""; - } else { - $parsed_code .= ""; - } - } else { - $parsed_code .= "get_line_style($i) . "\">"; - } - ++$close; - } - - $parsed_code .= $code[$i]; - - if ($close) { - $parsed_code .= str_repeat('', $close); - $close = 0; - } - elseif ($i + 1 < $n) { - $parsed_code .= "\n"; - } - unset($code[$i]); - } - - if ($this->header_type == GESHI_HEADER_PRE_VALID || $this->header_type == GESHI_HEADER_PRE_TABLE) { - $parsed_code .= ''; - } - if ($this->header_type == GESHI_HEADER_PRE_TABLE && $this->line_numbers != GESHI_NO_LINE_NUMBERS) { - $parsed_code .= ''; - } - } - - $parsed_code .= $this->footer(); - } - - /** - * Creates the header for the code block (with correct attributes) - * - * @return string The header for the code block - * @since 1.0.0 - * @access private - */ - function header() { - // Get attributes needed - /** - * @todo Document behaviour change - class is outputted regardless of whether - * we're using classes or not. Same with style - */ - $attributes = ' class="' . $this->language; - if ($this->overall_class != '') { - $attributes .= " ".$this->overall_class; - } - $attributes .= '"'; - - if ($this->overall_id != '') { - $attributes .= " id=\"{$this->overall_id}\""; - } - if ($this->overall_style != '') { - $attributes .= ' style="' . $this->overall_style . '"'; - } - - $ol_attributes = ''; - - if ($this->line_numbers_start != 1) { - $ol_attributes .= ' start="' . $this->line_numbers_start . '"'; - } - - // Get the header HTML - $header = $this->header_content; - if ($header) { - if ($this->header_type == GESHI_HEADER_PRE || $this->header_type == GESHI_HEADER_PRE_VALID) { - $header = str_replace("\n", '', $header); - } - $header = $this->replace_keywords($header); - - if ($this->use_classes) { - $attr = ' class="head"'; - } else { - $attr = " style=\"{$this->header_content_style}\""; - } - if ($this->header_type == GESHI_HEADER_PRE_TABLE && $this->line_numbers != GESHI_NO_LINE_NUMBERS) { - $header = "$header"; - } else { - $header = "$header"; - } - } - - if (GESHI_HEADER_NONE == $this->header_type) { - if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { - return "$header"; - } - return $header . ($this->force_code_block ? '
    ' : ''); - } - - // Work out what to return and do it - if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { - if ($this->header_type == GESHI_HEADER_PRE) { - return "$header"; - } else if ($this->header_type == GESHI_HEADER_DIV || - $this->header_type == GESHI_HEADER_PRE_VALID) { - return "$header"; - } else if ($this->header_type == GESHI_HEADER_PRE_TABLE) { - return "$header"; - } - } else { - if ($this->header_type == GESHI_HEADER_PRE) { - return "$header" . - ($this->force_code_block ? '
    ' : ''); - } else { - return "$header" . - ($this->force_code_block ? '
    ' : ''); - } - } - } - - /** - * Returns the footer for the code block. - * - * @return string The footer for the code block - * @since 1.0.0 - * @access private - */ - function footer() { - $footer = $this->footer_content; - if ($footer) { - if ($this->header_type == GESHI_HEADER_PRE) { - $footer = str_replace("\n", '', $footer);; - } - $footer = $this->replace_keywords($footer); - - if ($this->use_classes) { - $attr = ' class="foot"'; - } else { - $attr = " style=\"{$this->footer_content_style}\""; - } - if ($this->header_type == GESHI_HEADER_PRE_TABLE && $this->line_numbers != GESHI_NO_LINE_NUMBERS) { - $footer = "$footer"; - } else { - $footer = "$footer
    "; - } - } - - if (GESHI_HEADER_NONE == $this->header_type) { - return ($this->line_numbers != GESHI_NO_LINE_NUMBERS) ? '' . $footer : $footer; - } - - if ($this->header_type == GESHI_HEADER_DIV || $this->header_type == GESHI_HEADER_PRE_VALID) { - if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { - return "$footer
    "; - } - return ($this->force_code_block ? '
    ' : '') . - "$footer"; - } - elseif ($this->header_type == GESHI_HEADER_PRE_TABLE) { - if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { - return "$footer"; - } - return ($this->force_code_block ? '' : '') . - "$footer"; - } - else { - if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { - return "$footer"; - } - return ($this->force_code_block ? '' : '') . - "$footer"; - } - } - - /** - * Replaces certain keywords in the header and footer with - * certain configuration values - * - * @param string The header or footer content to do replacement on - * @return string The header or footer with replaced keywords - * @since 1.0.2 - * @access private - */ - function replace_keywords($instr) { - $keywords = $replacements = array(); - - $keywords[] = '
      to have no effect at all if there are line numbers - // (
        s have margins that should be destroyed so all layout is - // controlled by the set_overall_style method, which works on the - //
         or 
        container). Additionally, set default styles for lines - if (!$economy_mode || $this->line_numbers != GESHI_NO_LINE_NUMBERS) { - //$stylesheet .= "$selector, {$selector}ol, {$selector}ol li {margin: 0;}\n"; - $stylesheet .= "$selector.de1, $selector.de2 {{$this->code_style}}\n"; - } - - // Add overall styles - // note: neglect economy_mode, empty styles are meaningless - if ($this->overall_style != '') { - $stylesheet .= "$selector {{$this->overall_style}}\n"; - } - - // Add styles for links - // note: economy mode does not make _any_ sense here - // either the style is empty and thus no selector is needed - // or the appropriate key is given. - foreach ($this->link_styles as $key => $style) { - if ($style != '') { - switch ($key) { - case GESHI_LINK: - $stylesheet .= "{$selector}a:link {{$style}}\n"; - break; - case GESHI_HOVER: - $stylesheet .= "{$selector}a:hover {{$style}}\n"; - break; - case GESHI_ACTIVE: - $stylesheet .= "{$selector}a:active {{$style}}\n"; - break; - case GESHI_VISITED: - $stylesheet .= "{$selector}a:visited {{$style}}\n"; - break; - } - } - } - - // Header and footer - // note: neglect economy_mode, empty styles are meaningless - if ($this->header_content_style != '') { - $stylesheet .= "$selector.head {{$this->header_content_style}}\n"; - } - if ($this->footer_content_style != '') { - $stylesheet .= "$selector.foot {{$this->footer_content_style}}\n"; - } - - // Styles for important stuff - // note: neglect economy_mode, empty styles are meaningless - if ($this->important_styles != '') { - $stylesheet .= "$selector.imp {{$this->important_styles}}\n"; - } - - // Simple line number styles - if ((!$economy_mode || $this->line_numbers != GESHI_NO_LINE_NUMBERS) && $this->line_style1 != '') { - $stylesheet .= "{$selector}li, {$selector}.li1 {{$this->line_style1}}\n"; - } - if ((!$economy_mode || $this->line_numbers != GESHI_NO_LINE_NUMBERS) && $this->table_linenumber_style != '') { - $stylesheet .= "{$selector}.ln {{$this->table_linenumber_style}}\n"; - } - // If there is a style set for fancy line numbers, echo it out - if ((!$economy_mode || $this->line_numbers == GESHI_FANCY_LINE_NUMBERS) && $this->line_style2 != '') { - $stylesheet .= "{$selector}.li2 {{$this->line_style2}}\n"; - } - - // note: empty styles are meaningless - foreach ($this->language_data['STYLES']['KEYWORDS'] as $group => $styles) { - if ($styles != '' && (!$economy_mode || - (isset($this->lexic_permissions['KEYWORDS'][$group]) && - $this->lexic_permissions['KEYWORDS'][$group]))) { - $stylesheet .= "$selector.kw$group {{$styles}}\n"; - } - } - foreach ($this->language_data['STYLES']['COMMENTS'] as $group => $styles) { - if ($styles != '' && (!$economy_mode || - (isset($this->lexic_permissions['COMMENTS'][$group]) && - $this->lexic_permissions['COMMENTS'][$group]) || - (!empty($this->language_data['COMMENT_REGEXP']) && - !empty($this->language_data['COMMENT_REGEXP'][$group])))) { - $stylesheet .= "$selector.co$group {{$styles}}\n"; - } - } - foreach ($this->language_data['STYLES']['ESCAPE_CHAR'] as $group => $styles) { - if ($styles != '' && (!$economy_mode || $this->lexic_permissions['ESCAPE_CHAR'])) { - // NEW: since 1.0.8 we have to handle hardescapes - if ($group === 'HARD') { - $group = '_h'; - } - $stylesheet .= "$selector.es$group {{$styles}}\n"; - } - } - foreach ($this->language_data['STYLES']['BRACKETS'] as $group => $styles) { - if ($styles != '' && (!$economy_mode || $this->lexic_permissions['BRACKETS'])) { - $stylesheet .= "$selector.br$group {{$styles}}\n"; - } - } - foreach ($this->language_data['STYLES']['SYMBOLS'] as $group => $styles) { - if ($styles != '' && (!$economy_mode || $this->lexic_permissions['SYMBOLS'])) { - $stylesheet .= "$selector.sy$group {{$styles}}\n"; - } - } - foreach ($this->language_data['STYLES']['STRINGS'] as $group => $styles) { - if ($styles != '' && (!$economy_mode || $this->lexic_permissions['STRINGS'])) { - // NEW: since 1.0.8 we have to handle hardquotes - if ($group === 'HARD') { - $group = '_h'; - } - $stylesheet .= "$selector.st$group {{$styles}}\n"; - } - } - foreach ($this->language_data['STYLES']['NUMBERS'] as $group => $styles) { - if ($styles != '' && (!$economy_mode || $this->lexic_permissions['NUMBERS'])) { - $stylesheet .= "$selector.nu$group {{$styles}}\n"; - } - } - foreach ($this->language_data['STYLES']['METHODS'] as $group => $styles) { - if ($styles != '' && (!$economy_mode || $this->lexic_permissions['METHODS'])) { - $stylesheet .= "$selector.me$group {{$styles}}\n"; - } - } - // note: neglect economy_mode, empty styles are meaningless - foreach ($this->language_data['STYLES']['SCRIPT'] as $group => $styles) { - if ($styles != '') { - $stylesheet .= "$selector.sc$group {{$styles}}\n"; - } - } - foreach ($this->language_data['STYLES']['REGEXPS'] as $group => $styles) { - if ($styles != '' && (!$economy_mode || - (isset($this->lexic_permissions['REGEXPS'][$group]) && - $this->lexic_permissions['REGEXPS'][$group]))) { - if (is_array($this->language_data['REGEXPS'][$group]) && - array_key_exists(GESHI_CLASS, $this->language_data['REGEXPS'][$group])) { - $stylesheet .= "$selector."; - $stylesheet .= $this->language_data['REGEXPS'][$group][GESHI_CLASS]; - $stylesheet .= " {{$styles}}\n"; - } else { - $stylesheet .= "$selector.re$group {{$styles}}\n"; - } - } - } - // Styles for lines being highlighted extra - if (!$economy_mode || (count($this->highlight_extra_lines)!=count($this->highlight_extra_lines_styles))) { - $stylesheet .= "{$selector}.ln-xtra, {$selector}li.ln-xtra, {$selector}div.ln-xtra {{$this->highlight_extra_lines_style}}\n"; - } - $stylesheet .= "{$selector}span.xtra { display:block; }\n"; - foreach ($this->highlight_extra_lines_styles as $lineid => $linestyle) { - $stylesheet .= "{$selector}.lx$lineid, {$selector}li.lx$lineid, {$selector}div.lx$lineid {{$linestyle}}\n"; - } - - return $stylesheet; - } - - /** - * Get's the style that is used for the specified line - * - * @param int The line number information is requested for - * @access private - * @since 1.0.7.21 - */ - function get_line_style($line) { - //$style = null; - $style = null; - if (isset($this->highlight_extra_lines_styles[$line])) { - $style = $this->highlight_extra_lines_styles[$line]; - } else { // if no "extra" style assigned - $style = $this->highlight_extra_lines_style; - } - - return $style; - } - - /** - * this functions creates an optimized regular expression list - * of an array of strings. - * - * Example: - * $list = array('faa', 'foo', 'foobar'); - * => string 'f(aa|oo(bar)?)' - * - * @param $list array of (unquoted) strings - * @param $regexp_delimiter your regular expression delimiter, @see preg_quote() - * @return string for regular expression - * @author Milian Wolff - * @since 1.0.8 - * @access private - */ - function optimize_regexp_list($list, $regexp_delimiter = '/') { - $regex_chars = array('.', '\\', '+', '*', '?', '[', '^', ']', '$', - '(', ')', '{', '}', '=', '!', '<', '>', '|', ':', $regexp_delimiter); - sort($list); - $regexp_list = array(''); - $num_subpatterns = 0; - $list_key = 0; - - // the tokens which we will use to generate the regexp list - $tokens = array(); - $prev_keys = array(); - // go through all entries of the list and generate the token list - $cur_len = 0; - for ($i = 0, $i_max = count($list); $i < $i_max; ++$i) { - if ($cur_len > GESHI_MAX_PCRE_LENGTH) { - // seems like the length of this pcre is growing exorbitantly - $regexp_list[++$list_key] = $this->_optimize_regexp_list_tokens_to_string($tokens); - $num_subpatterns = substr_count($regexp_list[$list_key], '(?:'); - $tokens = array(); - $cur_len = 0; - } - $level = 0; - $entry = preg_quote((string) $list[$i], $regexp_delimiter); - $pointer = &$tokens; - // properly assign the new entry to the correct position in the token array - // possibly generate smaller common denominator keys - while (true) { - // get the common denominator - if (isset($prev_keys[$level])) { - if ($prev_keys[$level] == $entry) { - // this is a duplicate entry, skip it - continue 2; - } - $char = 0; - while (isset($entry[$char]) && isset($prev_keys[$level][$char]) - && $entry[$char] == $prev_keys[$level][$char]) { - ++$char; - } - if ($char > 0) { - // this entry has at least some chars in common with the current key - if ($char == strlen($prev_keys[$level])) { - // current key is totally matched, i.e. this entry has just some bits appended - $pointer = &$pointer[$prev_keys[$level]]; - } else { - // only part of the keys match - $new_key_part1 = substr($prev_keys[$level], 0, $char); - $new_key_part2 = substr($prev_keys[$level], $char); - - if (in_array($new_key_part1[0], $regex_chars) - || in_array($new_key_part2[0], $regex_chars)) { - // this is bad, a regex char as first character - $pointer[$entry] = array('' => true); - array_splice($prev_keys, $level, count($prev_keys), $entry); - $cur_len += strlen($entry); - continue; - } else { - // relocate previous tokens - $pointer[$new_key_part1] = array($new_key_part2 => $pointer[$prev_keys[$level]]); - unset($pointer[$prev_keys[$level]]); - $pointer = &$pointer[$new_key_part1]; - // recreate key index - array_splice($prev_keys, $level, count($prev_keys), array($new_key_part1, $new_key_part2)); - $cur_len += strlen($new_key_part2); - } - } - ++$level; - $entry = substr($entry, $char); - continue; - } - // else: fall trough, i.e. no common denominator was found - } - if ($level == 0 && !empty($tokens)) { - // we can dump current tokens into the string and throw them away afterwards - $new_entry = $this->_optimize_regexp_list_tokens_to_string($tokens); - $new_subpatterns = substr_count($new_entry, '(?:'); - if (GESHI_MAX_PCRE_SUBPATTERNS && $num_subpatterns + $new_subpatterns > GESHI_MAX_PCRE_SUBPATTERNS) { - $regexp_list[++$list_key] = $new_entry; - $num_subpatterns = $new_subpatterns; - } else { - if (!empty($regexp_list[$list_key])) { - $new_entry = '|' . $new_entry; - } - $regexp_list[$list_key] .= $new_entry; - $num_subpatterns += $new_subpatterns; - } - $tokens = array(); - $cur_len = 0; - } - // no further common denominator found - $pointer[$entry] = array('' => true); - array_splice($prev_keys, $level, count($prev_keys), $entry); - - $cur_len += strlen($entry); - break; - } - unset($list[$i]); - } - // make sure the last tokens get converted as well - $new_entry = $this->_optimize_regexp_list_tokens_to_string($tokens); - if (GESHI_MAX_PCRE_SUBPATTERNS && $num_subpatterns + substr_count($new_entry, '(?:') > GESHI_MAX_PCRE_SUBPATTERNS) { - $regexp_list[++$list_key] = $new_entry; - } else { - if (!empty($regexp_list[$list_key])) { - $new_entry = '|' . $new_entry; - } - $regexp_list[$list_key] .= $new_entry; - } - return $regexp_list; - } - /** - * this function creates the appropriate regexp string of an token array - * you should not call this function directly, @see $this->optimize_regexp_list(). - * - * @param &$tokens array of tokens - * @param $recursed bool to know wether we recursed or not - * @return string - * @author Milian Wolff - * @since 1.0.8 - * @access private - */ - function _optimize_regexp_list_tokens_to_string(&$tokens, $recursed = false) { - $list = ''; - foreach ($tokens as $token => $sub_tokens) { - $list .= $token; - $close_entry = isset($sub_tokens['']); - unset($sub_tokens['']); - if (!empty($sub_tokens)) { - $list .= '(?:' . $this->_optimize_regexp_list_tokens_to_string($sub_tokens, true) . ')'; - if ($close_entry) { - // make sub_tokens optional - $list .= '?'; - } - } - $list .= '|'; - } - if (!$recursed) { - // do some optimizations - // common trailing strings - // BUGGY! - //$list = preg_replace_callback('#(?<=^|\:|\|)\w+?(\w+)(?:\|.+\1)+(?=\|)#', create_function( - // '$matches', 'return "(?:" . preg_replace("#" . preg_quote($matches[1], "#") . "(?=\||$)#", "", $matches[0]) . ")" . $matches[1];'), $list); - // (?:p)? => p? - $list = preg_replace('#\(\?\:(.)\)\?#', '\1?', $list); - // (?:a|b|c|d|...)? => [abcd...]? - // TODO: a|bb|c => [ac]|bb - static $callback_2; - if (!isset($callback_2)) { - $callback_2 = create_function('$matches', 'return "[" . str_replace("|", "", $matches[1]) . "]";'); - } - $list = preg_replace_callback('#\(\?\:((?:.\|)+.)\)#', $callback_2, $list); - } - // return $list without trailing pipe - return substr($list, 0, -1); - } -} // End Class GeSHi - - -if (!function_exists('geshi_highlight')) { - /** - * Easy way to highlight stuff. Behaves just like highlight_string - * - * @param string The code to highlight - * @param string The language to highlight the code in - * @param string The path to the language files. You can leave this blank if you need - * as from version 1.0.7 the path should be automatically detected - * @param boolean Whether to return the result or to echo - * @return string The code highlighted (if $return is true) - * @since 1.0.2 - */ - function geshi_highlight($string, $language, $path = null, $return = false) { - $geshi = new GeSHi($string, $language, $path); - $geshi->set_header_type(GESHI_HEADER_NONE); - - if ($return) { - return '' . $geshi->parse_code() . ''; - } - - echo '' . $geshi->parse_code() . ''; - - if ($geshi->error()) { - return false; - } - return true; - } -} - -?> diff --git a/html/lib/geshi/geshi/diff.php b/html/lib/geshi/geshi/diff.php deleted file mode 100644 index e4bfc6f470..0000000000 --- a/html/lib/geshi/geshi/diff.php +++ /dev/null @@ -1,194 +0,0 @@ - 'Diff', - 'COMMENT_SINGLE' => array(), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array(), - 'ESCAPE_CHAR' => ' ', - 'KEYWORDS' => array( - 1 => array( - '\ No newline at end of file' - ), -// 2 => array( -// '***************' /* This only seems to works in some cases? */ -// ), - ), - 'SYMBOLS' => array( - ), - 'CASE_SENSITIVE' => array( - 1 => false, -// 2 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #aaaaaa; font-style: italic;', -// 2 => 'color: #dd6611;', - ), - 'COMMENTS' => array( - ), - 'ESCAPE_CHAR' => array( - 0 => '' - ), - 'BRACKETS' => array( - 0 => '' - ), - 'STRINGS' => array( - 0 => '' - ), - 'NUMBERS' => array( - 0 => '' - ), - 'METHODS' => array( - 0 => '' - ), - 'SYMBOLS' => array( - 0 => '' - ), - 'SCRIPT' => array( - 0 => '' - ), - 'REGEXPS' => array( - 0 => 'color: #440088;', - 1 => 'color: #991111;', - 2 => 'color: #00b000;', - 3 => 'color: #888822;', - 4 => 'color: #888822;', - 5 => 'color: #0011dd;', - 6 => 'color: #440088;', - 7 => 'color: #991111;', - 8 => 'color: #00b000;', - 9 => 'color: #888822;', - ), - ), - 'URLS' => array( - 1 => '', -// 2 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array(), - 'REGEXPS' => array( - 0 => "[0-9,]+[acd][0-9,]+", - //Removed lines - 1 => array( - GESHI_SEARCH => '(^|(?<=\A\s))\\<.*$', - GESHI_REPLACE => '\\0', - GESHI_MODIFIERS => 'm', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - //Inserted lines - 2 => array( - GESHI_SEARCH => '(^|(?<=\A\s))\\>.*$', - GESHI_REPLACE => '\\0', - GESHI_MODIFIERS => 'm', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - //Location line - 3 => array( - GESHI_SEARCH => '(^|(?<=\A\s))-{3}\\s.*$', - GESHI_REPLACE => '\\0', - GESHI_MODIFIERS => 'm', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - //Inserted line - 4 => array( - GESHI_SEARCH => '(^|(?<=\A\s))(\\+){3}\\s.*$', - GESHI_REPLACE => '\\0', - GESHI_MODIFIERS => 'm', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - //Modified line - 5 => array( - GESHI_SEARCH => '(^|(?<=\A\s))\\!.*$', - GESHI_REPLACE => '\\0', - GESHI_MODIFIERS => 'm', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - //File specification - 6 => array( - GESHI_SEARCH => '(^|(?<=\A\s))[\\@]{2}.*$', - GESHI_REPLACE => '\\0', - GESHI_MODIFIERS => 'm', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - //Removed line - 7 => array( - GESHI_SEARCH => '(^|(?<=\A\s))\\-.*$', - GESHI_REPLACE => '\\0', - GESHI_MODIFIERS => 'm', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - //Inserted line - 8 => array( - GESHI_SEARCH => '(^|(?<=\A\s))\\+.*$', - GESHI_REPLACE => '\\0', - GESHI_MODIFIERS => 'm', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - //File specification - 9 => array( - GESHI_SEARCH => '(^|(?<=\A\s))(\\*){3}\\s.*$', - GESHI_REPLACE => '\\0', - GESHI_MODIFIERS => 'm', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); diff --git a/html/lib/geshi/geshi/ios.php b/html/lib/geshi/geshi/ios.php deleted file mode 100644 index ab343e2d58..0000000000 --- a/html/lib/geshi/geshi/ios.php +++ /dev/null @@ -1,170 +0,0 @@ - 'IOS', - 'COMMENT_SINGLE' => array(1 => '!'), - 'CASE_KEYWORDS' => GESHI_CAPS_LOWER, - 'OOLANG' => false, - 'NUMBERS' => GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX, - 'KEYWORDS' => array( - 1 => array( - 'no', - 'shutdown', - ), - // 2 => array( - // 'router', 'interface', 'service', 'config-register', 'upgrade', 'version', 'hostname', 'boot-start-marker', 'boot', 'boot-end-marker', 'enable', 'aaa', 'clock', 'ip', - // 'logging', 'access-list', 'route-map', 'snmp-server', 'mpls', 'speed', 'media-type', 'negotiation', 'timestamps', 'prefix-list', 'network', 'mask', 'unsuppress-map', - // 'neighbor', 'remote-as', 'ebgp-multihop', 'update-source', 'description', 'peer-group', 'policy-map', 'class-map', 'class', 'match', 'access-group', 'bandwidth', 'username', - // 'password', 'send-community', 'next-hop-self', 'route-reflector-client', 'ldp', 'discovery', 'advertise-labels', 'label', 'protocol', 'login', 'debug', 'log', 'duplex', 'router-id', - // 'authentication', 'mode', 'maximum-paths', 'address-family', 'set', 'local-preference', 'community', 'trap-source', 'location', 'host', 'tacacs-server', 'session-id', - // 'flow-export', 'destination', 'source', 'in', 'out', 'permit', 'deny', 'control-plane', 'line', 'con' ,'aux', 'vty', 'access-class', 'ntp', 'server', 'end', 'source-interface', - // 'key', 'chain', 'key-string', 'redundancy', 'match-any', 'queue-limit', 'encapsulation', 'pvc', 'vbr-nrt', 'address', 'bundle-enable', 'atm', 'sonet', 'clns', 'route-cache', - // 'default-information', 'redistribute', 'log-adjacency-changes', 'metric', 'spf-interval', 'prc-interval', 'lsp-refresh-interval', 'max-lsp-lifetime', 'set-overload-bit', - // 'on-startup', 'wait-for-bgp', 'system', 'flash', 'timezone', 'subnet-zero', 'cef', 'flow-cache', 'timeout', 'active', 'domain', 'lookup', 'dhcp', 'use', 'vrf', 'hello', 'interval', - // 'priority', 'ilmi-keepalive', 'buffered', 'debugging', 'fpd', 'secret', 'accounting', 'exec', 'group', 'local', 'recurring', 'source-route', 'call', 'rsvp-sync', 'scripting', - // 'mtu', 'passive-interface', 'area' , 'distribute-list', 'metric-style', 'is-type', 'originate', 'activate', 'both', 'auto-summary', 'synchronization', 'aggregate-address', 'le', 'ge', - // 'bgp-community', 'route', 'exit-address-family', 'standard', 'file', 'verify', 'domain-name', 'domain-lookup', 'route-target', 'export', 'import', 'map', 'rd', 'mfib', 'vtp', 'mls', - // 'hardware-switching', 'replication-mode', 'ingress', 'flow', 'error', 'action', 'slb', 'purge', 'share-global', 'routing', 'traffic-eng', 'tunnels', 'propagate-ttl', 'switchport', 'vlan', - // 'portfast', 'counters', 'max', 'age', 'ethernet', 'evc', 'uni', 'count', 'oam', 'lmi', 'gmt', 'netflow', 'pseudowire-class', 'spanning-tree', 'name', 'circuit-type' - // ), - // 3 => array( - // 'isis', 'ospf', 'eigrp', 'rip', 'igrp', 'bgp', 'ipv4', 'unicast', 'multicast', 'ipv6', 'connected', 'static', 'subnets', 'tcl' - // ), - // 4 => array( - // 'point-to-point', 'aal5snap', 'rj45', 'auto', 'full', 'half', 'precedence', 'percent', 'datetime', 'msec', 'locatime', 'summer-time', 'md5', 'wait-for-bgp', 'wide', - // 'level-1', 'level-2', 'log-neighbor-changes', 'directed-request', 'password-encryption', 'common', 'origin-as', 'bgp-nexthop', 'random-detect', 'localtime', 'sso', 'stm-1', - // 'dot1q', 'isl', 'new-model', 'always', 'summary-only', 'freeze', 'global', 'forwarded', 'access', 'trunk', 'edge', 'transparent' - // ), - ), - - 'REGEXPS' => array( - 1 => array( - GESHI_SEARCH => '(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})', - GESHI_REPLACE => '\\1', - GESHI_BEFORE => '', - ), - 2 => array( - GESHI_SEARCH => '(255\.\d{1,3}\.\d{1,3}\.\d{1,3})', - GESHI_REPLACE => '\\1', - GESHI_BEFORE => '', - ), - 3 => array( - GESHI_SEARCH => '(source|interface|update-source|router-id) ([A-Za-z0-9\/\:\-\.]+)', - GESHI_REPLACE => '\\2', - GESHI_BEFORE => '\\1 ', - ), - 4 => array( - GESHI_SEARCH => '(neighbor) ([\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}]+|[a-zA-Z0-9\-\_]+)', - GESHI_REPLACE => '\\2', - GESHI_BEFORE => '\\1 ', - ), - 5 => array( - GESHI_SEARCH => '(distribute-map|access-group|policy-map|class-map\ match-any|ip\ access-list\ extended|match\ community|community-list\ standard|community-list\ expanded|ip\ access-list\ standard|router\ bgp|remote-as|key\ chain|service-policy\ input|service-policy\ output|class|login\ authentication|authentication\ key-chain|username|import\ map|export\ map|domain-name|hostname|route-map|access-class|ip\ vrf\ forwarding|ip\ vrf|vtp\ domain|name|pseudowire-class|pw-class|prefix-list|vrf) ([A-Za-z0-9\-\_\.]+)', - GESHI_REPLACE => '\\2', - GESHI_BEFORE => '\\1 ', - ), - 6 => array( - GESHI_SEARCH => '(password|key-string|key) ([0-9]) (.+)', - GESHI_REPLACE => '\\2 \\3', - GESHI_BEFORE => '\\1 ', - ), - 7 => array( - GESHI_SEARCH => '(enable) ([a-z]+) ([0-9]) (.+)', - GESHI_REPLACE => '\\3 \\4', - GESHI_BEFORE => '\\1 \\2 ', - ), - 8 => array( - GESHI_SEARCH => '(description|location|contact|remark) (.+)', - GESHI_REPLACE => '\\2', - GESHI_BEFORE => '\\1 ', - ), - 9 => array( - GESHI_SEARCH => '([0-9\.\_\*]+\:[0-9\.\_\*]+)', - GESHI_REPLACE => '\\1', - ), - 10 => array( - GESHI_SEARCH => '(boot) ([a-z]+) (.+)', - GESHI_REPLACE => '\\3', - GESHI_BEFORE => '\\1 \\2 ', - ), - 11 => array( - GESHI_SEARCH => '(net) ([0-9a-z\.]+)', - GESHI_REPLACE => '\\2', - GESHI_BEFORE => '\\1 ', - ), - 12 => array( - GESHI_SEARCH => '(access-list|RO|RW) ([0-9]+)', - GESHI_REPLACE => '\\2', - GESHI_BEFORE => '\\1 ', - ), - 13 => array( - GESHI_SEARCH => '(vlan) ([0-9]+)', - GESHI_REPLACE => '\\2', - GESHI_BEFORE => '\\1 ', - ), - 14 => array( - GESHI_SEARCH => '(encapsulation|speed|duplex|mtu|metric|media-type|negotiation|transport\ input|bgp-community|set\ as-path\ prepend|maximum-prefix|version|local-preference|continue|redistribute|cluster-id|vtp\ mode|label\ protocol|spanning-tree\ mode) (.+)', - GESHI_REPLACE => '\\2', - GESHI_BEFORE => '\\1 ', - ), - - ), - - 'STYLES' => array( - 'REGEXPS' => array( - 0 => 'color: #ff0000;', - 1 => 'color: #0000cc;', - // x.x.x.x - 2 => 'color: #000099; font-style: italic', - // 255.x.x.x - 3 => 'color: #000000; font-weight: bold; font-style: italic;', - // interface xxx - 4 => 'color: #ff0000;', - // neighbor x.x.x.x - 5 => 'color: #000099;', - // variable names - 6 => 'color: #cc0000;', - 7 => 'color: #cc0000;', - // passwords - 8 => 'color: #555555;', - // description - 9 => 'color: #990099;', - // communities - 10 => 'color: #cc0000; font-style: italic;', - // no/shut - 11 => 'color: #000099;', - // net numbers - 12 => 'color: #000099;', - // acls - 13 => 'color: #000099;', - // acls - 14 => 'color: #990099;', - // warnings - ), - 'KEYWORDS' => array( - 1 => 'color: #cc0000; font-weight: bold;', - // no/shut - 2 => 'color: #000000;', - // commands - 3 => 'color: #000000; font-weight: bold;', - // proto/service - 4 => 'color: #000000;', - // options - 5 => 'color: #ff0000;', - ), - 'COMMENTS' => array(1 => 'color: #808080; font-style: italic;'), - 'ESCAPE_CHAR' => array(0 => 'color: #000099; font-weight: bold;'), - 'BRACKETS' => array(0 => 'color: #66cc66;'), - 'STRINGS' => array(0 => 'color: #ff0000;'), - 'NUMBERS' => array(0 => 'color: #cc0000;'), - 'METHODS' => array(0 => 'color: #006600;'), - 'SYMBOLS' => array(0 => 'color: #66cc66;'), - 'SCRIPT' => array( - 0 => '', - 1 => '', - 2 => '', - 3 => '', - ), - ), -); diff --git a/html/lib/jpgraph/contour_dev/findpolygon.php b/html/lib/jpgraph/contour_dev/findpolygon.php deleted file mode 100644 index 675c74c2e1..0000000000 --- a/html/lib/jpgraph/contour_dev/findpolygon.php +++ /dev/null @@ -1,802 +0,0 @@ -contourCoord[0]); ++$i) { - // echo '('.$this->contourCoord[0][$i][0][0].','.$this->contourCoord[0][$i][0][1].') -> '. - // '('.$this->contourCoord[0][$i][1][0].','.$this->contourCoord[0][$i][1][1].")\n"; - // } - // - - $c=0; - $p[$c] = array(0.6,1, 1,0.5, 2,0.5, 3,0.5, 3.5,1, 3.5,2, 3,2.5, 2,2.5, 1,2.5, 0.5,2, 0.6,1); - $c++; - $p[$c] = array(6,0.5, 5.5,1, 5.5,2, 6,2.5); - - $this->nbrContours = $c+1; - - for ($c = 0 ; $c < count($p) ; $c++) { - $n=count($p[$c]); - - $this->contourCoord[$c][0] = array(array($p[$c][0],$p[$c][1]),array($p[$c][2],$p[$c][3])); - $k=1; - for ($i = 0; $i < ($n-4)/2; $i++, $k++) { - $this->contourCoord[$c][$k] = array($this->contourCoord[$c][$k-1][1], array($p[$c][2*$k+2],$p[$c][2*$k+1+2])); - } - - // Swap edges order at random - $n = count($this->contourCoord[$c]); - for($i=0; $i < floor($n/2); ++$i) { - $swap1 = rand(0,$n-1); - $t = $this->contourCoord[$c][$swap1]; - while( $swap1 == ($swap2 = rand(0,$n-1)) ) - ; - $this->contourCoord[$c][$swap1] = $this->contourCoord[$c][$swap2]; - $this->contourCoord[$c][$swap2] = $t; - } - - // Swap vector direction on 1/3 of the edges - for ($i = 0 ; $i < floor(count($this->contourCoord[$c])/3) ; $i++) { - $e = rand(0, count($this->contourCoord[$c])-1); - $edge = $this->contourCoord[$c][$e]; - $v1 = $edge[0]; $v2 = $edge[1]; - $this->contourCoord[$c][$e][0] = $v2; - $this->contourCoord[$c][$e][1] = $v1; - } - } - - $pp = array(); - for($j=0; $j < count($p); ++$j ) { - for( $i=0; $i < count($p[$j])/2; ++$i ) { - $pp[$j][$i] = array($p[$j][2*$i],$p[$j][2*$i+1]); - } - } - return $pp; - } - - function p_edges($v) { - for ($i = 0 ; $i < count($v) ; $i++) { - echo "(".$v[$i][0][0].",".$v[$i][0][1].") -> (".$v[$i][1][0].",".$v[$i][1][1].")\n"; - } - echo "\n"; - } - - function CompareCyclic($a,$b,$forward=true) { - - // We assume disjoint vertices and if last==first this just means - // that the polygon is closed. For this comparison it must be unique - // elements - if( $a[count($a)-1] == $a[0] ) { - array_pop($a); - } - if( $b[count($b)-1] == $b[0] ) { - array_pop($b); - } - - $n1 = count($a); - $n2 = count($b); - if( $n1 != $n2 ) { - return false; - } - - $i=0; - while( ($i < $n2) && ($a[0] != $b[$i]) ) { - ++$i; - } - - if( $i >= $n2 ) { - return false; - } - - $j=0; - if( $forward ) { - while( ($j < $n1) && ($a[$j] == $b[$i]) ) { - $i = ($i + 1) % $n2; - ++$j; - } - } - else { - while( ($j < $n1) && ($a[$j] == $b[$i]) ) { - --$i; - if( $i < 0 ) { - $i = $n2-1; - } - ++$j; - } - } - return $j >= $n1; - } - - function dbg($s) { - // echo $s."\n"; - } - - function IsVerticeOnBorder($x1,$y1) { - // Check if the vertice lies on any of the four border - if( $x1==$this->scale[0] || $x1==$this->scale[1] ) { - return true; - } - if( $y1==$this->scale[2] || $y1==$this->scale[3] ) { - return true; - } - return false; - } - - function FindPolygons($debug=false) { - - $pol = 0; - for ($c = 0; $c < $this->nbrContours; $c++) { - - $this->dbg("\n** Searching polygon chain $c ... "); - $this->dbg("------------------------------------------\n"); - - $edges = $this->contourCoord[$c]; - while( count($edges) > 0 ) { - - $edge = array_shift($edges); - list($x1,$y1) = $edge[0]; - list($x2,$y2) = $edge[1]; - $polygons[$pol]=array( - array($x1,$y1),array($x2,$y2) - ); - - $this->dbg("Searching on second vertice."); - - $found=false; - if( ! $this->IsVerticeOnBorder($x2,$y2) ) { - do { - - $this->dbg(" --Searching on edge: ($x1,$y1)->($x2,$y2)"); - - $found=false; - $nn = count($edges); - for( $i=0; $i < $nn && !$found; ++$i ) { - $edge = $edges[$i]; - if( $found = ($x2==$edge[0][0] && $y2==$edge[0][1]) ) { - $polygons[$pol][] = array($edge[1][0],$edge[1][1]); - $x1 = $x2; $y1 = $y2; - $x2 = $edge[1][0]; $y2 = $edge[1][1]; - } - elseif( $found = ($x2==$edge[1][0] && $y2==$edge[1][1]) ) { - $polygons[$pol][] = array($edge[0][0],$edge[0][1]); - $x1 = $x2; $y1 = $y2; - $x2 = $edge[0][0]; $y2 = $edge[0][1]; - } - if( $found ) { - $this->dbg(" --Found next edge: [i=$i], (%,%) -> ($x2,$y2)"); - unset($edges[$i]); - $edges = array_values($edges); - } - } - - } while( $found ); - } - - if( !$found && count($edges)>0 ) { - $this->dbg("Searching on first vertice."); - list($x1,$y1) = $polygons[$pol][0]; - list($x2,$y2) = $polygons[$pol][1]; - - if( ! $this->IsVerticeOnBorder($x1,$y1) ) { - do { - - $this->dbg(" --Searching on edge: ($x1,$y1)->($x2,$y2)"); - - $found=false; - $nn = count($edges); - for( $i=0; $i < $nn && !$found; ++$i ) { - $edge = $edges[$i]; - if( $found = ($x1==$edge[0][0] && $y1==$edge[0][1]) ) { - array_unshift($polygons[$pol],array($edge[1][0],$edge[1][1])); - $x2 = $x1; $y2 = $y1; - $x1 = $edge[1][0]; $y1 = $edge[1][1]; - } - elseif( $found = ($x1==$edge[1][0] && $y1==$edge[1][1]) ) { - array_unshift($polygons[$pol],array($edge[0][0],$edge[0][1])); - $x2 = $x1; $y2 = $y1; - $x1 = $edge[0][0]; $y1 = $edge[0][1]; - } - if( $found ) { - $this->dbg(" --Found next edge: [i=$i], ($x1,$y1) -> (%,%)"); - unset($edges[$i]); - $edges = array_values($edges); - } - } - - } while( $found ); - } - - } - - $pol++; - } - } - - return $polygons; - } - -} -define('HORIZ_EDGE',0); -define('VERT_EDGE',1); - -class FillGridRect { - private $edges,$dataPoints,$colors,$isoBars; - private $invert=false; - - function __construct(&$edges,&$dataPoints,$isoBars,$colors) { - $this->edges = $edges; - $this->dataPoints = $dataPoints; - $this->colors = $colors; - $this->isoBars = $isoBars; - } - - function GetIsobarColor($val) { - for ($i = 0 ; $i < count($this->isoBars) ; $i++) { - if( $val <= $this->isoBars[$i] ) { - return $this->colors[$i]; - } - } - return $this->colors[$i]; // The color for all values above the highest isobar - } - - function GetIsobarVal($a,$b) { - // Get the isobar that is between the values a and b - // If there are more isobars then return the one with lowest index - if( $b < $a ) { - $t=$a; $a=$b; $b=$t; - } - $i = 0 ; - $n = count($this->isoBars); - while( $i < $n && $this->isoBars[$i] < $a ) { - ++$i; - } - if( $i >= $n ) - die("Internal error. Cannot find isobar values for ($a,$b)"); - return $this->isoBars[$i]; - } - - function getCrossingCoord($aRow,$aCol,$aEdgeDir,$aIsobarVal) { - // In order to avoid numerical problem when two vertices are very close - // we have to check and avoid dividing by close to zero denumerator. - if( $aEdgeDir == HORIZ_EDGE ) { - $d = abs($this->dataPoints[$aRow][$aCol] - $this->dataPoints[$aRow][$aCol+1]); - if( $d > 0.001 ) { - $xcoord = $aCol + abs($aIsobarVal - $this->dataPoints[$aRow][$aCol]) / $d; - } - else { - $xcoord = $aCol; - } - $ycoord = $aRow; - } - else { - $d = abs($this->dataPoints[$aRow][$aCol] - $this->dataPoints[$aRow+1][$aCol]); - if( $d > 0.001 ) { - $ycoord = $aRow + abs($aIsobarVal - $this->dataPoints[$aRow][$aCol]) / $d; - } - else { - $ycoord = $aRow; - } - $xcoord = $aCol; - } - if( $this->invert ) { - $ycoord = $this->nbrRows-1 - $ycoord; - } - return array($xcoord,$ycoord); - } - - function Fill(ContCanvas $canvas) { - - $nx_vertices = count($this->dataPoints[0]); - $ny_vertices = count($this->dataPoints); - - // Loop through all squares in the grid - for($col=0; $col < $nx_vertices-1; ++$col) { - for($row=0; $row < $ny_vertices-1; ++$row) { - - $n = 0;$quad_edges=array(); - if ( $this->edges[VERT_EDGE][$row][$col] ) $quad_edges[$n++] = array($row, $col, VERT_EDGE); - if ( $this->edges[VERT_EDGE][$row][$col+1] ) $quad_edges[$n++] = array($row, $col+1,VERT_EDGE); - if ( $this->edges[HORIZ_EDGE][$row][$col] ) $quad_edges[$n++] = array($row, $col, HORIZ_EDGE); - if ( $this->edges[HORIZ_EDGE][$row+1][$col] ) $quad_edges[$n++] = array($row+1,$col, HORIZ_EDGE); - - if( $n == 0 ) { - // Easy, fill the entire quadrant with one color since we have no crossings - // Select the top left datapoint as representing this quadrant - // color for this quadrant - $color = $this->GetIsobarColor($this->dataPoints[$row][$col]); - $polygon = array($col,$row,$col,$row+1,$col+1,$row+1,$col+1,$row,$col,$row); - $canvas->FilledPolygon($polygon,$color); - - } elseif( $n==2 ) { - - // There is one isobar edge crossing this quadrant. In order to fill we need to - // find out the orientation of the two areas this edge is separating in order to - // construct the two polygons that define the two areas to be filled - // There are six possible variants - // 0) North-South - // 1) West-East - // 2) West-North - // 3) East-North - // 4) West-South - // 5) East-South - $type=-1; - if( $this->edges[HORIZ_EDGE][$row][$col] ) { - if( $this->edges[HORIZ_EDGE][$row+1][$col] ) $type=0; // North-South - elseif( $this->edges[VERT_EDGE][$row][$col] ) $type=2; - elseif( $this->edges[VERT_EDGE][$row][$col+1] ) $type=3; - } - elseif( $this->edges[HORIZ_EDGE][$row+1][$col] ) { - if( $this->edges[VERT_EDGE][$row][$col] ) $type=4; - elseif( $this->edges[VERT_EDGE][$row][$col+1] ) $type=5; - } - else { - $type=1; - } - if( $type==-1 ) { - die('Internal error: n=2 but no edges in the quadrant was find to determine type.'); - } - - switch( $type ) { - case 0: //North-South - - // North vertice - $v1 = $this->dataPoints[$row][$col]; - $v2 = $this->dataPoints[$row][$col+1]; - $isobarValue = $this->GetIsobarVal($v1, $v2); - list($x1,$y1) = $this->getCrossingCoord($row, $col,HORIZ_EDGE, $isobarValue); - - // South vertice - $v1 = $this->dataPoints[$row+1][$col]; - $v2 = $this->dataPoints[$row+1][$col+1]; - $isobarValue = $this->GetIsobarVal($v1, $v2); - list($x2,$y2) = $this->getCrossingCoord($row+1, $col,HORIZ_EDGE, $isobarValue); - - $polygon = array($col,$row,$x1,$y1,$x2,$y2,$col,$row+1,$col,$row); - $canvas->FilledPolygon($polygon,$this->GetIsobarColor($v1)); - - $polygon = array($col+1,$row,$x1,$y1,$x2,$y2,$col+1,$row+1,$col+1,$row); - $canvas->FilledPolygon($polygon,$this->GetIsobarColor($v2)); - - break; - - case 1: // West-East - - // West vertice - $v1 = $this->dataPoints[$row][$col]; - $v2 = $this->dataPoints[$row+1][$col]; - $isobarValue = $this->GetIsobarVal($v1, $v2); - list($x1,$y1) = $this->getCrossingCoord($row, $col,VERT_EDGE, $isobarValue); - - // East vertice - $v1 = $this->dataPoints[$row][$col+1]; - $v2 = $this->dataPoints[$row+1][$col+1]; - $isobarValue = $this->GetIsobarVal($v1, $v2); - list($x2,$y2) = $this->getCrossingCoord($row, $col+1,VERT_EDGE, $isobarValue); - - $polygon = array($col,$row,$x1,$y1,$x2,$y2,$col+1,$row,$col,$row); - $canvas->FilledPolygon($polygon,$this->GetIsobarColor($v1)); - - $polygon = array($col,$row+1,$x1,$y1,$x2,$y2,$col+1,$row+1,$col,$row+1); - $canvas->FilledPolygon($polygon,$this->GetIsobarColor($v2)); - break; - - case 2: // West-North - - // West vertice - $v1 = $this->dataPoints[$row][$col]; - $v2 = $this->dataPoints[$row+1][$col]; - $isobarValue = $this->GetIsobarVal($v1, $v2); - list($x1,$y1) = $this->getCrossingCoord($row, $col,VERT_EDGE, $isobarValue); - - // North vertice - $v1 = $this->dataPoints[$row][$col]; - $v2 = $this->dataPoints[$row][$col+1]; - $isobarValue = $this->GetIsobarVal($v1, $v2); - list($x2,$y2) = $this->getCrossingCoord($row, $col,HORIZ_EDGE, $isobarValue); - - $polygon = array($col,$row,$x1,$y1,$x2,$y2,$col,$row); - $canvas->FilledPolygon($polygon,$this->GetIsobarColor($v1)); - - $polygon = array($x1,$y1,$x2,$y2,$col+1,$row,$col+1,$row+1,$col,$row+1,$x1,$y1); - $canvas->FilledPolygon($polygon,$this->GetIsobarColor($v2)); - - break; - - case 3: // East-North - - // if( $row==3 && $col==1 && $n==2 ) { - // echo " ** East-North
        "; - // } - - - // East vertice - $v1 = $this->dataPoints[$row][$col+1]; - $v2 = $this->dataPoints[$row+1][$col+1]; - $isobarValue = $this->GetIsobarVal($v1, $v2); - list($x1,$y1) = $this->getCrossingCoord($row, $col+1,VERT_EDGE, $isobarValue); - // - // if( $row==3 && $col==1 && $n==2 ) { - // echo " ** E_val($v1,$v2), isobar=$isobarValue
        "; - // echo " ** E($x1,$y1)
        "; - // } - - - // North vertice - $v1 = $this->dataPoints[$row][$col]; - $v2 = $this->dataPoints[$row][$col+1]; - $isobarValue = $this->GetIsobarVal($v1, $v2); - list($x2,$y2) = $this->getCrossingCoord($row, $col,HORIZ_EDGE, $isobarValue); - - // if( $row==3 && $col==1 && $n==2 ) { - // echo " ** N_val($v1,$v2), isobar=$isobarValue
        "; - // echo " ** N($x2,$y2)
        "; - // } - // if( $row==3 && $col==1 && $n==2 ) - // $canvas->Line($x1,$y1,$x2,$y2,'blue'); - - $polygon = array($x1,$y1,$x2,$y2,$col+1,$row,$x1,$y1); - $canvas->FilledPolygon($polygon,$this->GetIsobarColor($v2)); - - $polygon = array($col,$row,$x2,$y2,$x1,$y1,$col+1,$row+1,$col,$row+1,$col,$row); - $canvas->FilledPolygon($polygon,$this->GetIsobarColor($v1)); - - break; - - case 4: // West-South - - // West vertice - $v1 = $this->dataPoints[$row][$col]; - $v2 = $this->dataPoints[$row+1][$col]; - $isobarValue = $this->GetIsobarVal($v1, $v2); - list($x1,$y1) = $this->getCrossingCoord($row, $col,VERT_EDGE, $isobarValue); - - // South vertice - $v1 = $this->dataPoints[$row+1][$col]; - $v2 = $this->dataPoints[$row+1][$col+1]; - $isobarValue = $this->GetIsobarVal($v1, $v2); - list($x2,$y2) = $this->getCrossingCoord($row+1, $col,HORIZ_EDGE, $isobarValue); - - $polygon = array($col,$row+1,$x1,$y1,$x2,$y2,$col,$row+1); - $canvas->FilledPolygon($polygon,$this->GetIsobarColor($v1)); - - $polygon = array($x1,$y1,$x2,$y2,$col+1,$row+1,$col+1,$row,$col,$row,$x1,$y1); - $canvas->FilledPolygon($polygon,$this->GetIsobarColor($v2)); - - break; - - case 5: // East-South - - // - // if( $row==1 && $col==1 && $n==2 ) { - // echo " ** Sout-East
        "; - // } - - // East vertice - $v1 = $this->dataPoints[$row][$col+1]; - $v2 = $this->dataPoints[$row+1][$col+1]; - $isobarValue = $this->GetIsobarVal($v1, $v2); - list($x1,$y1) = $this->getCrossingCoord($row, $col+1,VERT_EDGE, $isobarValue); - - // if( $row==1 && $col==1 && $n==2 ) { - // echo " ** E_val($v1,$v2), isobar=$isobarValue
        "; - // echo " ** E($x1,$y1)
        "; - // } - - // South vertice - $v1 = $this->dataPoints[$row+1][$col]; - $v2 = $this->dataPoints[$row+1][$col+1]; - $isobarValue = $this->GetIsobarVal($v1, $v2); - list($x2,$y2) = $this->getCrossingCoord($row+1, $col,HORIZ_EDGE, $isobarValue); - - // if( $row==1 && $col==1 && $n==2 ) { - // echo " ** S_val($v1,$v2), isobar=$isobarValue
        "; - // echo " ** S($x2,$y2)
        "; - // } - - $polygon = array($col+1,$row+1,$x1,$y1,$x2,$y2,$col+1,$row+1); - $canvas->FilledPolygon($polygon,$this->GetIsobarColor($v2)); - - $polygon = array($x1,$y1,$x2,$y2,$col,$row+1,$col,$row,$col+1,$row,$x1,$y1); - $canvas->FilledPolygon($polygon,$this->GetIsobarColor($v1)); - - break; - - } - - } - - } - } - - } -} - - -class ContCanvas { - public $g; - public $shape,$scale; - function __construct($xmax=6,$ymax=6,$width=400,$height=400) { - - $this->g = new CanvasGraph($width,$height); - $this->scale = new CanvasScale($this->g, 0, $xmax, 0, $ymax); - $this->shape = new Shape($this->g, $this->scale); - - //$this->g->SetFrame(true); - $this->g->SetMargin(5,5,5,5); - $this->g->SetMarginColor('white@1'); - $this->g->InitFrame(); - - - $this->shape->SetColor('gray'); - for( $col=1; $col<$xmax; ++$col ) { - $this->shape->Line($col, 0, $col, $ymax); - } - for( $row=1; $row<$ymax; ++$row ) { - $this->shape->Line(0, $row, $xmax, $row); - } - } - - function SetDatapoints($datapoints) { - $ny=count($datapoints); - $nx=count($datapoints[0]); - $t = new Text(); - $t->SetFont(FF_ARIAL,FS_NORMAL,8); - for( $x=0; $x < $nx; ++$x ) { - for( $y=0; $y < $ny; ++$y ) { - list($x1,$y1) = $this->scale->Translate($x,$y); - - if( $datapoints[$y][$x] > 0 ) - $t->SetColor('blue'); - else - $t->SetColor('black'); - $t->SetFont(FF_ARIAL,FS_BOLD,8); - $t->Set($datapoints[$y][$x]); - $t->Stroke($this->g->img,$x1,$y1); - - $t->SetColor('gray'); - $t->SetFont(FF_ARIAL,FS_NORMAL,8); - $t->Set("($y,$x)"); - $t->Stroke($this->g->img,$x1+10,$y1); - - } - } - } - - function DrawLinePolygons($p,$color='red') { - $this->shape->SetColor($color); - for ($i = 0 ; $i < count($p) ; $i++) { - $x1 = $p[$i][0][0]; $y1 = $p[$i][0][1]; - for ($j = 1 ; $j < count($p[$i]) ; $j++) { - $x2=$p[$i][$j][0]; $y2 = $p[$i][$j][1]; - $this->shape->Line($x1, $y1, $x2, $y2); - $x1=$x2; $y1=$y2; - } - } - } - - function Line($x1,$y1,$x2,$y2,$color='red') { - $this->shape->SetColor($color); - $this->shape->Line($x1, $y1, $x2, $y2); - } - function Polygon($p,$color='blue') { - $this->shape->SetColor($color); - $this->shape->Polygon($p); - } - - function FilledPolygon($p,$color='lightblue') { - $this->shape->SetColor($color); - $this->shape->FilledPolygon($p); - } - - function Point($x,$y,$color) { - list($x1,$y1) = $this->scale->Translate($x, $y); - $this->shape->SetColor($color); - $this->g->img->Point($x1,$y1); - } - - function Stroke() { - $this->g->Stroke(); - } - -} - - -class PixelFill { - - private $edges,$dataPoints,$colors,$isoBars; - - function __construct(&$edges,&$dataPoints,$isoBars,$colors) { - $this->edges = $edges; - $this->dataPoints = $dataPoints; - $this->colors = $colors; - $this->isoBars = $isoBars; - } - - function GetIsobarColor($val) { - for ($i = 0 ; $i < count($this->isoBars) ; $i++) { - if( $val <= $this->isoBars[$i] ) { - return $this->colors[$i]; - } - } - return $this->colors[$i]; // The color for all values above the highest isobar - } - - function Fill(ContCanvas $canvas) { - - $nx_vertices = count($this->dataPoints[0]); - $ny_vertices = count($this->dataPoints); - - // Loop through all squares in the grid - for($col=0; $col < $nx_vertices-1; ++$col) { - for($row=0; $row < $ny_vertices-1; ++$row) { - - $v=array( - $this->dataPoints[$row][$col], - $this->dataPoints[$row][$col+1], - $this->dataPoints[$row+1][$col+1], - $this->dataPoints[$row+1][$col], - ); - - list($x1,$y1) = $canvas->scale->Translate($col, $row); - list($x2,$y2) = $canvas->scale->Translate($col+1, $row+1); - - for( $x=$x1; $x < $x2; ++$x ) { - for( $y=$y1; $y < $y2; ++$y ) { - - $v1 = $v[0] + ($v[1]-$v[0])*($x-$x1)/($x2-$x1); - $v2 = $v[3] + ($v[2]-$v[3])*($x-$x1)/($x2-$x1); - $val = $v1 + ($v2-$v1)*($y-$y1)/($y2-$y1); - - if( $row==2 && $col==2 ) { - //echo " ($val ($x,$y)) (".$v[0].",".$v[1].",".$v[2].",".$v[3].")
        "; - } - $color = $this->GetIsobarColor($val); - $canvas->g->img->SetColor($color); - $canvas->g->img->Point($x, $y); - } - } - } - } - - } - -} - -$edges=array(array(),array(),array()); -$datapoints=array(); -for($col=0; $col<6; $col++) { - for($row=0; $row<6; $row++) { - $datapoints[$row][$col]=0; - $edges[VERT_EDGE][$row][$col] = false; - $edges[HORIZ_EDGE][$row][$col] = false; - } -} - -$datapoints[1][2] = 2; -$datapoints[2][1] = 1; -$datapoints[2][2] = 7; -$datapoints[2][3] = 2; -$datapoints[3][1] = 2; -$datapoints[3][2] = 17; -$datapoints[3][3] = 4; -$datapoints[4][2] = 3; - -$datapoints[1][4] = 12; - -$edges[VERT_EDGE][1][2] = true; -$edges[VERT_EDGE][3][2] = true; - -$edges[HORIZ_EDGE][2][1] = true; -$edges[HORIZ_EDGE][2][2] = true; -$edges[HORIZ_EDGE][3][1] = true; -$edges[HORIZ_EDGE][3][2] = true; - - - -$isobars = array(5,10,15); -$colors = array('lightgray','lightblue','lightred','red'); - -$engine = new PixelFill($edges, $datapoints, $isobars, $colors); -$canvas = new ContCanvas(); -$engine->Fill($canvas); -$canvas->SetDatapoints($datapoints); -$canvas->Stroke(); -die(); - - -//$tst = new Findpolygon(); -//$p1 = $tst->SetupTestData(); -// -//$canvas = new ContCanvas(); -//for ($i = 0 ; $i < count($tst->contourCoord); $i++) { -// $canvas->DrawLinePolygons($tst->contourCoord[$i]); -//} -// -//$p2 = $tst->FindPolygons(); -//for ($i = 0 ; $i < count($p2) ; $i++) { -// $canvas->FilledPolygon($tst->flattenEdges($p2[$i])); -//} -// -//for ($i = 0 ; $i < count($p2) ; $i++) { -// $canvas->Polygon($tst->flattenEdges($p2[$i])); -//} -// -//$canvas->Stroke(); -//die(); - - -//for( $trial = 0; $trial < 1; ++$trial ) { -// echo "\nTest $trial:\n"; -// echo "========================================\n"; -// $tst = new Findpolygon(); -// $p1 = $tst->SetupTestData(); -// -// // for ($i = 0 ; $i < count($p1) ; $i++) { -// // echo "Test polygon $i:\n"; -// // echo "---------------------\n"; -// // $tst->p_edges($tst->contourCoord[$i]); -// // echo "\n"; -// // } -// // -// $p2 = $tst->FindPolygons(); -// $npol = count($p2); -// //echo "\n** Found $npol separate polygon chains.\n\n"; -// -// for( $i=0; $i<$npol; ++$i ) { -// -// $res_forward = $tst->CompareCyclic($p1[$i], $p2[$i],true); -// $res_backward = $tst->CompareCyclic($p1[$i], $p2[$i],false); -// if( $res_backward || $res_forward ) { -// // if( $res_forward ) -// // echo "Forward matches!\n"; -// // else -// // echo "Backward matches!\n"; -// } -// else { -// echo "********** NO MATCH!!.\n\n"; -// echo "\nBefore find:\n"; -// for ($j = 0 ; $j < count($p1[$i]) ; $j++) { -// echo "(".$p1[$i][$j][0].','.$p1[$i][$j][1]."), "; -// } -// echo "\n"; -// -// echo "\nAfter find:\n"; -// for ($j = 0 ; $j < count($p2[$i]) ; $j++) { -// echo "(".$p2[$i][$j][0].','.$p2[$i][$j][1]."), "; -// } -// echo "\n"; -// } -// -// } -//} -// -//echo "\n\nAll tests ready.\n\n"; -// - - -?> diff --git a/html/lib/jpgraph/contour_dev/tri-quad.php b/html/lib/jpgraph/contour_dev/tri-quad.php deleted file mode 100644 index 826d1bf013..0000000000 --- a/html/lib/jpgraph/contour_dev/tri-quad.php +++ /dev/null @@ -1,800 +0,0 @@ -g = new CanvasGraph($width,$height); - $this->scale = new CanvasScale($this->g, 0, $xmax, 0, $ymax); - $this->shape = new Shape($this->g, $this->scale); - - //$this->g->SetFrame(true); - $this->g->SetMargin(2,2,2,2); - $this->g->SetMarginColor('white@1'); - $this->g->InitFrame(); - } - - function StrokeGrid() { - list($xmin,$xmax,$ymin,$ymax) = $this->scale->Get(); - $this->shape->SetColor('gray'); - for( $col=1; $col<$xmax; ++$col ) { - $this->shape->Line($col, 0, $col, $ymax); - } - for( $row=1; $row<$ymax; ++$row ) { - $this->shape->Line(0, $row, $xmax, $row); - } - } - - function SetDatapoints($datapoints) { - $ny=count($datapoints); - $nx=count($datapoints[0]); - $t = new Text(); - $t->SetFont(FF_ARIAL,FS_NORMAL,8); - for( $x=0; $x < $nx; ++$x ) { - for( $y=0; $y < $ny; ++$y ) { - list($x1,$y1) = $this->scale->Translate($x,$y); - - if( $datapoints[$y][$x] > 0 ) - $t->SetColor('blue'); - else - $t->SetColor('black'); - $t->SetFont(FF_ARIAL,FS_BOLD,8); - $t->Set($datapoints[$y][$x]); - $t->Stroke($this->g->img,$x1,$y1); - - $t->SetColor('gray'); - $t->SetFont(FF_ARIAL,FS_NORMAL,8); - $t->Set("($y,$x)"); - $t->Stroke($this->g->img,$x1+10,$y1); - - } - } - } - - function DrawLinePolygons($p,$color='red') { - $this->shape->SetColor($color); - for ($i = 0 ; $i < count($p) ; $i++) { - $x1 = $p[$i][0][0]; - $y1 = $p[$i][0][1]; - for ($j = 1 ; $j < count($p[$i]) ; $j++) { - $x2=$p[$i][$j][0]; - $y2 = $p[$i][$j][1]; - $this->shape->Line($x1, $y1, $x2, $y2); - $x1=$x2; - $y1=$y2; - } - } - } - - function Line($x1,$y1,$x2,$y2,$color='red') { - $this->shape->SetColor($color); - $this->shape->Line($x1, $y1, $x2, $y2); - } - function Polygon($p,$color='blue') { - $this->shape->SetColor($color); - $this->shape->Polygon($p); - } - - function FilledPolygon($p,$color='lightblue') { - $this->shape->SetColor($color); - $this->shape->FilledPolygon($p); - } - - function Point($x,$y,$color) { - list($x1,$y1) = $this->scale->Translate($x, $y); - $this->shape->SetColor($color); - $this->g->img->Point($x1,$y1); - } - - function Stroke() { - $this->g->Stroke(); - } - -} - -// Calculate the area for a simple polygon. This will not work for -// non-simple polygons, i.e. self crossing. -function polygonArea($aX, $aY) { - $n = count($aX); - $area = 0 ; - $j = 0 ; - for ($i=0; $i < $n; $i++) { - $j++; - if ( $j == $n) { - $j=0; - } - $area += ($aX[i]+$aX[j])*($aY[i]-$aY[j]); - } - return area*.5; -} - -class SingleTestTriangle { - const contval=5; - static $maxdepth=2; - static $cnt=0; - static $t; - public $g; - public $shape,$scale; - public $cont = array(2,4,5); - public $contcolors = array('yellow','purple','seagreen','green','lightblue','blue','teal','orange','red','darkred','brown'); - public $dofill=false; - public $showtriangulation=false,$triangulation_color="lightgray"; - public $showannotation=false; - public $contlinecolor='black',$showcontlines=true; - private $labels = array(), $showlabels=false; - private $labelColor='black',$labelFF=FF_ARIAL,$labelFS=FS_BOLD,$labelFSize=9; - - function __construct($width,$height,$nx,$ny) { - $xmax=$nx+0.1;$ymax=$ny+0.1; - $this->g = new CanvasGraph($width,$height); - $this->scale = new CanvasScale($this->g, -0.1, $xmax, -0.1, $ymax); - $this->shape = new Shape($this->g, $this->scale); - - //$this->g->SetFrame(true); - $this->g->SetMargin(2,2,2,2); - $this->g->SetMarginColor('white@1'); - //$this->g->InitFrame(); - - self::$t = new Text(); - self::$t->SetColor('black'); - self::$t->SetFont(FF_ARIAL,FS_BOLD,9); - self::$t->SetAlign('center','center'); - } - - function getPlotSize() { - return array($this->g->img->width,$this->g->img->height); - } - - function SetContours($c) { - $this->cont = $c; - } - - function ShowLabels($aFlg=true) { - $this->showlabels = $aFlg; - } - - function ShowLines($aFlg=true) { - $this->showcontlines=$aFlg; - } - - function SetFilled($f=true) { - $this->dofill = $f; - } - - function ShowTriangulation($f=true) { - $this->showtriangulation = $f; - } - - function Stroke() { - $this->g->Stroke(); - } - - function FillPolygon($color,&$p) { - self::$cnt++; - if( $this->dofill ) { - $this->shape->SetColor($color); - $this->shape->FilledPolygon($p); - } - if( $this->showtriangulation ) { - $this->shape->SetColor($this->triangulation_color); - $this->shape->Polygon($p); - } - } - - function GetNextHigherContourIdx($val) { - for( $i=0; $i < count($this->cont); ++$i ) { - if( $val < $this->cont[$i] ) return $i; - } - return count($this->cont); - } - - function GetContVal($v1) { - for( $i=0; $i < count($this->cont); ++$i ) { - if( $this->cont[$i] > $v1 ) { - return $this->cont[$i]; - } - } - die('No contour value is larger or equal than : '.$v1); - } - - function GetColor($v) { - return $this->contcolors[$this->GetNextHigherContourIdx($v)]; - } - - function storeAnnotation($x1,$y1,$v1,$angle) { - $this->labels[$this->GetNextHigherContourIdx($v1)][] = array($x1,$y1,$v1,$angle); - } - - function labelProx($x1,$y1,$v1) { - - list($w,$h) = $this->getPlotSize(); - - - if( $x1 < 20 || $x1 > $w-20 ) - return true; - - if( $y1 < 20 || $y1 > $h-20 ) - return true; - - if( !isset ($this->labels[$this->GetNextHigherContourIdx($v1)]) ) { - return false; - } - $p = $this->labels[$this->GetNextHigherContourIdx($v1)]; - $n = count($p); - $d = 999999; - for ($i = 0 ; $i < $n ; $i++) { - $xp = $p[$i][0]; - $yp = $p[$i][1]; - $d = min($d, ($x1-$xp)*($x1-$xp) + ($y1-$yp)*($y1-$yp)); - } - - $limit = $w*$h/9; - $limit = max(min($limit,20000),3500); - if( $d < $limit ) return true; - else return false; - } - - function putLabel($x1,$y1,$x2,$y2,$v1) { - - $angle = 0; - if( $x2 - $x1 != 0 ) { - $grad = ($y2-$y1)/($x2-$x1); - $angle = -(atan($grad) * 180/M_PI); - self::$t->SetAngle($angle); - } - - $x = $this->scale->TranslateX($x1); - $y = $this->scale->TranslateY($y1); - if( !$this->labelProx($x, $y, $v1) ) { - $this->storeAnnotation($x, $y, $v1, $angle); - } - } - - function strokeLabels() { - $t = new Text(); - $t->SetColor($this->labelColor); - $t->SetFont($this->labelFF,$this->labelFS,$this->labelFSize); - $t->SetAlign('center','center'); - - foreach ($this->labels as $cont_idx => $pos) { - if( $cont_idx >= 10 ) return; - foreach ($pos as $idx => $coord) { - $t->Set( sprintf("%.1f",$coord[2]) ); - $t->SetAngle($coord[3]); - $t->Stroke($this->g->img,$coord[0],$coord[1]); - } - } - } - - function annotate($x1,$y1,$x2,$y2,$x1p,$y1p,$v1,$v2,$v1p) { - if( !$this->showannotation ) return; - /* - $this->g->img->SetColor('green'); - $this->g->img->FilledCircle($this->scale->TranslateX($x1),$this->scale->TranslateY($y1), 4); - $this->g->img->FilledCircle($this->scale->TranslateX($x2),$this->scale->TranslateY($y2), 4); - - $this->g->img->SetColor('red'); - $this->g->img->FilledCircle($this->scale->TranslateX($x1p),$this->scale->TranslateY($y1p), 4); -*/ - //self::$t->Set(sprintf("%.1f",$v1,$this->VC($v1))); - //self::$t->Stroke($this->g->img,$this->scale->TranslateX($x1),$this->scale->TranslateY($y1)); - //self::$t->Set(sprintf("%.1f",$v2,$this->VC($v2))); - //self::$t->Stroke($this->g->img,$this->scale->TranslateX($x2),$this->scale->TranslateY($y2)); - - $x = $this->scale->TranslateX($x1p); - $y = $this->scale->TranslateY($y1p); - if( !$this->labelProx($x, $y, $v1p) ) { - $this->storeAnnotation($x, $y, $v1p); - self::$t->Set(sprintf("%.1f",$v1p,$this->VC($v1p))); - self::$t->Stroke($this->g->img,$x,$y); - } - } - - function Pertubate(&$v1,&$v2,&$v3,&$v4) { - $pert = 0.9999; - $n = count($this->cont); - for($i=0; $i < $n; ++$i) { - if( $v1==$this->cont[$i] ) { - $v1 *= $pert; - break; - } - } - for($i=0; $i < $n; ++$i) { - if( $v2==$this->cont[$i] ) { - $v2 *= $pert; - break; - } - } - for($i=0; $i < $n; ++$i) { - if( $v3==$this->cont[$i] ) { - $v3 *= $pert; - break; - } - } - for($i=0; $i < $n; ++$i) { - if( $v4==$this->cont[$i] ) { - $v4 *= $pert; - break; - } - } - } - - function interp2($x1,$y1,$x2,$y2,$v1,$v2) { - $cv = $this->GetContVal(min($v1,$v2)); - $alpha = ($v1-$cv)/($v1-$v2); - $x1p = $x1*(1-$alpha) + $x2*$alpha; - $y1p = $y1*(1-$alpha) + $y2*$alpha; - $v1p = $v1 + $alpha*($v2-$v1); - return array($x1p,$y1p,$v1p); - } - - function RectFill($v1,$v2,$v3,$v4,$x1,$y1,$x2,$y2,$x3,$y3,$x4,$y4,$depth) { - if( $depth >= self::$maxdepth ) { - // Abort and just appoximate the color of this area - // with the average of the three values - $color = $this->GetColor(($v1+$v2+$v3+$v4)/4); - $p = array($x1, $y1, $x2, $y2, $x3, $y3, $x4, $y4, $x1, $y1); - $this->FillPolygon($color,$p) ; - } - else { - - $this->Pertubate($v1,$v2,$v3,$v4); - - $fcnt = 0 ; - $vv1 = $this->GetNextHigherContourIdx($v1); - $vv2 = $this->GetNextHigherContourIdx($v2); - $vv3 = $this->GetNextHigherContourIdx($v3); - $vv4 = $this->GetNextHigherContourIdx($v4); - $eps = 0.0001; - - if( $vv1 == $vv2 && $vv2 == $vv3 && $vv3 == $vv4 ) { - $color = $this->GetColor($v1); - $p = array($x1, $y1, $x2, $y2, $x3, $y3, $x4, $y4, $x1, $y1); - $this->FillPolygon($color,$p) ; - } - else { - - $dv1 = abs($vv1-$vv2); - $dv2 = abs($vv2-$vv3); - $dv3 = abs($vv3-$vv4); - $dv4 = abs($vv1-$vv4); - - if( $dv1 == 1 ) { - list($x1p,$y1p,$v1p) = $this->interp2($x1,$y1,$x2,$y2,$v1,$v2); - $fcnt++; - } - - if( $dv2 == 1 ) { - list($x2p,$y2p,$v2p) = $this->interp2($x2,$y2,$x3,$y3,$v2,$v3); - $fcnt++; - } - - if( $dv3 == 1 ) { - list($x3p,$y3p,$v3p) = $this->interp2($x3,$y3,$x4,$y4,$v3,$v4); - $fcnt++; - } - - if( $dv4 == 1 ) { - list($x4p,$y4p,$v4p) = $this->interp2($x4,$y4,$x1,$y1,$v4,$v1); - $fcnt++; - } - - $totdv = $dv1 + $dv2 + $dv3 + $dv4 ; - - if( ($fcnt == 2 && $totdv==2) || ($fcnt == 4 && $totdv==4) ) { - - if( $fcnt == 2 && $totdv==2 ) { - - if( $dv1 == 1 && $dv2 == 1) { - $color1 = $this->GetColor($v2); - $p1 = array($x1p,$y1p,$x2,$y2,$x2p,$y2p,$x1p,$y1p); - $color2 = $this->GetColor($v4); - $p2 = array($x1,$y1,$x1p,$y1p,$x2p,$y2p,$x3,$y3,$x4,$y4,$x1,$y1); - - $color = $this->GetColor($v1p); - $p = array($x1p,$y1p,$x2p,$y2p); - $v = $v1p; - } - elseif( $dv1 == 1 && $dv3 == 1 ) { - $color1 = $this->GetColor($v2); - $p1 = array($x1p,$y1p,$x2,$y2,$x3,$y3,$x3p,$y3p,$x1p,$y1p); - $color2 = $this->GetColor($v4); - $p2 = array($x1,$y1,$x1p,$y1p,$x3p,$y3p,$x4,$y4,$x1,$y1); - - $color = $this->GetColor($v1p); - $p = array($x1p,$y1p,$x3p,$y3p); - $v = $v1p; - } - elseif( $dv1 == 1 && $dv4 == 1 ) { - $color1 = $this->GetColor($v1); - $p1 = array($x1,$y1,$x1p,$y1p,$x4p,$y4p,$x1,$y1); - $color2 = $this->GetColor($v3); - $p2 = array($x1p,$y1p,$x2,$y2,$x3,$y3,$x4,$y4,$x4p,$y4p,$x1p,$y1p); - - $color = $this->GetColor($v1p); - $p = array($x1p,$y1p,$x4p,$y4p); - $v = $v1p; - } - elseif( $dv2 == 1 && $dv4 == 1 ) { - $color1 = $this->GetColor($v1); - $p1 = array($x1,$y1,$x2,$y2,$x2p,$y2p,$x4p,$y4p,$x1,$y1); - $color2 = $this->GetColor($v3); - $p2 = array($x4p,$y4p,$x2p,$y2p,$x3,$y3,$x4,$y4,$x4p,$y4p); - - $color = $this->GetColor($v2p); - $p = array($x2p,$y2p,$x4p,$y4p); - $v = $v2p; - } - elseif( $dv2 == 1 && $dv3 == 1 ) { - $color1 = $this->GetColor($v1); - $p1 = array($x1,$y1,$x2,$y2,$x2p,$y2p,$x3p,$y3p,$x4,$y4,$x1,$y1); - $color2 = $this->GetColor($v3); - $p2 = array($x2p,$y2p,$x3,$y3,$x3p,$y3p,$x2p,$y2p); - - $color = $this->GetColor($v2p); - $p = array($x2p,$y2p,$x3p,$y3p); - $v = $v2p; - } - elseif( $dv3 == 1 && $dv4 == 1 ) { - $color1 = $this->GetColor($v1); - $p1 = array($x1,$y1,$x2,$y2,$x3,$y3,$x3p,$y3p,$x4p,$y4p,$x1,$y1); - $color2 = $this->GetColor($v4); - $p2 = array($x4p,$y4p,$x3p,$y3p,$x4,$y4,$x4p,$y4p); - - $color = $this->GetColor($v4p); - $p = array($x4p,$y4p,$x3p,$y3p); - $v = $v4p; - } - - $this->FillPolygon($color1,$p1); - $this->FillPolygon($color2,$p2); - - if( $this->showcontlines ) { - if( $this->dofill ) { - $this->shape->SetColor($this->contlinecolor); - } - else { - $this->shape->SetColor($color); - } - $this->shape->Line($p[0],$p[1],$p[2],$p[3]); - } - if( $this->showlabels ) { - $this->putLabel( ($p[0]+$p[2])/2, ($p[1]+$p[3])/2, $p[2],$p[3] , $v); - } - } - elseif( $fcnt == 4 && $totdv==4 ) { - $vc = ($v1+$v2+$v3+$v4)/4; - - if( $v1p == $v2p && $v2p == $v3p && $v3p == $v4p ) { - // Four edge crossings (saddle point) of the same contour - // so we first need to - // find out how the saddle is crossing "/" or "\" - - if( $this->GetNextHigherContourIdx($vc) == $this->GetNextHigherContourIdx($v1) ) { - // "\" - $color1 = $this->GetColor($v1); - $p1 = array($x1,$y1,$x1p,$y1p,$x4p,$y4p,$x1,$y1); - - $color2 = $this->GetColor($v2); - $p2 = array($x1p,$y1p,$x2,$y2,$x2p,$y2p,$x3p,$y3p,$x4,$y4,$x4p,$y4p,$x1p,$y1p); - - $color3 = $color1; - $p3 = array($x2p,$y2p,$x3,$y3,$x3p,$y3p,$x2p,$y2p); - - $colorl1 = $this->GetColor($v1p); - $pl1 = array($x1p,$y1p,$x4p,$y4p); - $colorl2 = $this->GetColor($v2p); - $pl2 = array($x2p,$y2p,$x3p,$y3p); - $vl1 = $v1p; - $vl2 = $v2p; - - } - else { - // "/" - $color1 = $this->GetColor($v2); - $p1 = array($x1p,$y1p,$x2,$y2,$x2p,$y2p,$x1p,$y1p); - - $color2 = $this->GetColor($v3); - $p2 = array($x1p,$y1p,$x2p,$y2p,$x3,$y3,$x3p,$y3p,$x4p,$y4p,$x1,$y1,$x1p,$y1p); - - $color3 = $color1; - $p3 = array($x4p,$y4p,$x3p,$y3p,$x4,$y4,$x4p,$y4p); - - $colorl1 = $this->GetColor($v1p); - $pl1 = array($x1p,$y1p,$x2p,$y2p); - $colorl2 = $this->GetColor($v4p); - $pl2 = array($x4p,$y4p,$x3p,$y3p); - $vl1 = $v1p; - $vl2 = $v4p; - } - } - else { - // There are two different contours crossing so we need to find - // out which belongs to which - if( $v1p == $v2p ) { - // "/" - $color1 = $this->GetColor($v2); - $p1 = array($x1p,$y1p,$x2,$y2,$x2p,$y2p,$x1p,$y1p); - - $color2 = $this->GetColor($v3); - $p2 = array($x1p,$y1p,$x2p,$y2p,$x3,$y3,$x3p,$y3p,$x4p,$y4p,$x1,$y1,$x1p,$y1p); - - $color3 = $this->GetColor($v4); - $p3 = array($x4p,$y4p,$x3p,$y3p,$x4,$y4,$x4p,$y4p); - - $colorl1 = $this->GetColor($v1p); - $pl1 = array($x1p,$y1p,$x2p,$y2p); - $colorl2 = $this->GetColor($v4p); - $pl2 = array($x4p,$y4p,$x3p,$y3p); - $vl1 = $v1p; - $vl2 = $v4p; - } - else { //( $v1p == $v4p ) - // "\" - $color1 = $this->GetColor($v1); - $p1 = array($x1,$y1,$x1p,$y1p,$x4p,$y4p,$x1,$y1); - - $color2 = $this->GetColor($v2); - $p2 = array($x1p,$y1p,$x2,$y2,$x2p,$y2p,$x3p,$y3p,$x4,$y4,$x4p,$y4p,$x1p,$y1p); - - $color3 = $this->GetColor($v3); - $p3 = array($x2p,$y2p,$x3,$y3,$x3p,$y3p,$x2p,$y2p); - - $colorl1 = $this->GetColor($v1p); - $pl1 = array($x1p,$y1p,$x4p,$y4p); - $colorl2 = $this->GetColor($v2p); - $pl2 = array($x2p,$y2p,$x3p,$y3p); - $vl1 = $v1p; - $vl2 = $v2p; - } - } - $this->FillPolygon($color1,$p1); - $this->FillPolygon($color2,$p2); - $this->FillPolygon($color3,$p3); - - if( $this->showcontlines ) { - if( $this->dofill ) { - $this->shape->SetColor($this->contlinecolor); - $this->shape->Line($pl1[0],$pl1[1],$pl1[2],$pl1[3]); - $this->shape->Line($pl2[0],$pl2[1],$pl2[2],$pl2[3]); - } - else { - $this->shape->SetColor($colorl1); - $this->shape->Line($pl1[0],$pl1[1],$pl1[2],$pl1[3]); - $this->shape->SetColor($colorl2); - $this->shape->Line($pl2[0],$pl2[1],$pl2[2],$pl2[3]); - } - } - if( $this->showlabels ) { - $this->putLabel( ($pl1[0]+$pl1[2])/2, ($pl1[1]+$pl1[3])/2, $pl1[2], $pl1[3], $vl1); - $this->putLabel( ($pl2[0]+$pl2[2])/2, ($pl2[1]+$pl2[3])/2, $pl2[2], $pl2[3],$vl2); - } - } - } - else { - $vc = ($v1+$v2+$v3+$v4)/4; - $xc = ($x1+$x4)/2; - $yc = ($y1+$y2)/2; - - // Top left - $this->RectFill(($v1+$v2)/2, $v2, ($v2+$v3)/2, $vc, - $x1,$yc, $x2,$y2, $xc,$y2, $xc,$yc, $depth+1); - // Top right - $this->RectFill($vc, ($v2+$v3)/2, $v3, ($v3+$v4)/2, - $xc,$yc, $xc,$y2, $x3,$y3, $x3,$yc, $depth+1); - - // Bottom left - $this->RectFill($v1, ($v1+$v2)/2, $vc, ($v1+$v4)/2, - $x1,$y1, $x1,$yc, $xc,$yc, $xc,$y4, $depth+1); - - // Bottom right - $this->RectFill(($v1+$v4)/2, $vc, ($v3+$v4)/2, $v4, - $xc,$y1, $xc,$yc, $x3,$yc, $x4,$y4, $depth+1); - - } - } - } - } - - function TriFill($v1,$v2,$v3,$x1,$y1,$x2,$y2,$x3,$y3,$depth) { - if( $depth >= self::$maxdepth ) { - // Abort and just appoximate the color of this area - // with the average of the three values - $color = $this->GetColor(($v1+$v2+$v3)/3); - $p = array($x1, $y1, $x2, $y2, $x3, $y3, $x1, $y1); - $this->FillPolygon($color,$p) ; - } - else { - // In order to avoid some real unpleasentness in case a vertice is exactly - // the same value as a contour we pertuberate them so that we do not end up - // in udefined situation. This will only affect the calculations and not the - // visual appearance - - $dummy=0; - $this->Pertubate($v1,$v2,$v3,$dummy); - - $fcnt = 0 ; - $vv1 = $this->GetNextHigherContourIdx($v1); - $vv2 = $this->GetNextHigherContourIdx($v2); - $vv3 = $this->GetNextHigherContourIdx($v3); - $eps = 0.0001; - - if( $vv1 == $vv2 && $vv2 == $vv3 ) { - $color = $this->GetColor($v1); - $p = array($x1, $y1, $x2, $y2, $x3, $y3, $x1, $y1); - $this->FillPolygon($color,$p) ; - } - else { - $dv1 = abs($vv1-$vv2); - $dv2 = abs($vv2-$vv3); - $dv3 = abs($vv1-$vv3); - - if( $dv1 == 1 ) { - list($x1p,$y1p,$v1p) = $this->interp2($x1,$y1,$x2,$y2,$v1,$v2); - $fcnt++; - } - else { - $x1p = ($x1+$x2)/2; - $y1p = ($y1+$y2)/2; - $v1p = ($v1+$v2)/2; - } - - if( $dv2 == 1 ) { - list($x2p,$y2p,$v2p) = $this->interp2($x2,$y2,$x3,$y3,$v2,$v3); - $fcnt++; - } - else { - $x2p = ($x2+$x3)/2; - $y2p = ($y2+$y3)/2; - $v2p = ($v2+$v3)/2; - } - - if( $dv3 == 1 ) { - list($x3p,$y3p,$v3p) = $this->interp2($x3,$y3,$x1,$y1,$v3,$v1); - $fcnt++; - } - else { - $x3p = ($x3+$x1)/2; - $y3p = ($y3+$y1)/2; - $v3p = ($v3+$v1)/2; - } - - if( $fcnt == 2 && - ((abs($v1p-$v2p) < $eps && $dv1 ==1 && $dv2==1 ) || - (abs($v1p-$v3p) < $eps && $dv1 ==1 && $dv3==1 ) || - (abs($v2p-$v3p) < $eps && $dv2 ==1 && $dv3==1 )) ) { - - // This means that the contour line crosses exactly two sides - // and that the values of each vertice is such that only this - // contour line will cross this section. - // We can now be smart. The cotour line will simply divide the - // area in two polygons that we can fill and then return. There is no - // need to recurse. - - // First find out which two sides the contour is crossing - if( abs($v1p-$v2p) < $eps ) { - $p4 = array($x1,$y1,$x1p,$y1p,$x2p,$y2p,$x3,$y3,$x1,$y1); - $color4 = $this->GetColor($v1); - - $p3 = array($x1p,$y1p,$x2,$y2,$x2p,$y2p,$x1p,$y1p); - $color3 = $this->GetColor($v2); - - $p = array($x1p,$y1p,$x2p,$y2p); - $color = $this->GetColor($v1p); - $v = $v1p; - } - elseif( abs($v1p-$v3p) < $eps ) { - $p4 = array($x1p,$y1p,$x2,$y2,$x3,$y3,$x3p,$y3p,$x1p,$y1p); - $color4 = $this->GetColor($v2); - - $p3 = array($x1,$y1,$x1p,$y1p,$x3p,$y3p,$x1,$y1); - $color3 = $this->GetColor($v1); - - $p = array($x1p,$y1p,$x3p,$y3p); - $color = $this->GetColor($v1p); - $v = $v1p; - } - else { - $p4 = array($x1,$y1,$x2,$y2,$x2p,$y2p,$x3p,$y3p,$x1,$y1); - $color4 = $this->GetColor($v2); - - $p3 = array($x3p,$y3p,$x2p,$y2p,$x3,$y3,$x3p,$y3p); - $color3 = $this->GetColor($v3); - - $p = array($x3p,$y3p,$x2p,$y2p); - $color = $this->GetColor($v3p); - $v = $v3p; - } - $this->FillPolygon($color4,$p4); - $this->FillPolygon($color3,$p3); - - if( $this->showcontlines ) { - if( $this->dofill ) { - $this->shape->SetColor($this->contlinecolor); - } - else { - $this->shape->SetColor($color); - } - $this->shape->Line($p[0],$p[1],$p[2],$p[3]); - } - if( $this->showlabels ) { - $this->putLabel( ($p[0]+$p[2])/2, ($p[1]+$p[3])/2, $p[2], $p[3], $v); - } - } - else { - $this->TriFill($v1, $v1p, $v3p, $x1, $y1, $x1p, $y1p, $x3p, $y3p, $depth+1); - $this->TriFill($v1p, $v2, $v2p, $x1p, $y1p, $x2, $y2, $x2p, $y2p, $depth+1); - $this->TriFill($v3p, $v1p, $v2p, $x3p, $y3p, $x1p, $y1p, $x2p, $y2p, $depth+1); - $this->TriFill($v3p, $v2p, $v3, $x3p, $y3p, $x2p, $y2p, $x3, $y3, $depth+1); - } - } - } - } - - function Fill($v1,$v2,$v3,$maxdepth) { - $x1=0; - $y1=1; - $x2=1; - $y2=0; - $x3=1; - $y3=1; - self::$maxdepth = $maxdepth; - $this->TriFill($v1, $v2, $v3, $x1, $y1, $x2, $y2, $x3, $y3, 0); - } - - function Fillmesh($meshdata,$maxdepth,$method='tri') { - $nx = count($meshdata[0]); - $ny = count($meshdata); - self::$maxdepth = $maxdepth; - for( $x=0; $x < $nx-1; ++$x ) { - for( $y=0; $y < $ny-1; ++$y ) { - $v1 = $meshdata[$y][$x]; - $v2 = $meshdata[$y][$x+1]; - $v3 = $meshdata[$y+1][$x+1]; - $v4 = $meshdata[$y+1][$x]; - - if( $method == 'tri' ) { - // Fill upper and lower triangle - $this->TriFill($v4, $v1, $v2, $x, $y+1, $x, $y, $x+1, $y, 0); - $this->TriFill($v4, $v2, $v3, $x, $y+1, $x+1, $y, $x+1, $y+1, 0); - } - else { - $this->RectFill($v4, $v1, $v2, $v3, $x, $y+1, $x, $y, $x+1, $y, $x+1, $y+1, 0); - } - } - } - if( $this->showlabels ) { - $this->strokeLabels(); - } - } -} - -$meshdata = array( - array (12,12,10,10), - array (10,10,8,14), - array (7,7,13,17), - array (4,5,8,12), - array (10,8,7,8)); - -$tt = new SingleTestTriangle(400,400,count($meshdata[0])-1,count($meshdata)-1); -$tt->SetContours(array(4.7, 6.0, 7.2, 8.6, 9.9, 11.2, 12.5, 13.8, 15.1, 16.4)); -$tt->SetFilled(true); - -//$tt->ShowTriangulation(true); -$tt->ShowLines(true); - -//$tt->ShowLabels(true); -$tt->Fillmesh($meshdata, 8, 'rect'); - -//$tt->Fill(4.0,3.0,7.0, 4); -//$tt->Fill(7,4,1,5); -//$tt->Fill(1,7,4,5); - -$tt->Stroke(); - -?> diff --git a/html/lib/jpgraph/flag_mapping b/html/lib/jpgraph/flag_mapping deleted file mode 100644 index 7f9c3c5fa2..0000000000 --- a/html/lib/jpgraph/flag_mapping +++ /dev/null @@ -1,237 +0,0 @@ -class JpCountryFlags { - -$iCountryFlags = array( - 'Afghanistan' => 'afgh.gif', - 'Republic of Angola' => 'agla.gif', - 'Republic of Albania' => 'alba.gif', - 'Alderney' => 'alde.gif', - 'Democratic and Popular Republic of Algeria' => 'alge.gif', - 'Territory of American Samoa' => 'amsa.gif', - 'Principality of Andorra' => 'andr.gif', - 'British Overseas Territory of Anguilla' => 'angu.gif', - 'Antarctica' => 'anta.gif', - 'Argentine Republic' => 'arge.gif', - 'League of Arab States' => 'arle.gif', - 'Republic of Armenia' => 'arme.gif', - 'Aruba' => 'arub.gif', - 'Commonwealth of Australia' => 'astl.gif', - 'Republic of Austria' => 'aust.gif', - 'Azerbaijani Republic' => 'azer.gif', - 'British Antarctic Territory' => 'bant.gif', - 'Kingdom of Belgium' => 'belg.gif', - 'British Overseas Territory of Bermuda' => 'berm.gif', - 'Commonwealth of the Bahamas' => 'bhms.gif', - 'Kingdom of Bahrain' => 'bhrn.gif', - 'Republic of Belarus' => 'blru.gif', - 'Republic of Bolivia' => 'blva.gif', - 'Belize' => 'blze.gif', - 'Republic of Benin' => 'bnin.gif', - 'Republic of Botswana' => 'bots.gif', - 'Federative Republic of Brazil' => 'braz.gif', - 'Barbados' => 'brbd.gif', - 'British Indian Ocean Territory' => 'brin.gif', - 'Brunei Darussalam' => 'brun.gif', - 'Republic of Burkina' => 'bufa.gif', - 'Republic of Bulgaria' => 'bulg.gif', - 'Republic of Burundi' => 'buru.gif', - 'Overseas Territory of the British Virgin Islands' => 'bvis.gif', - 'Central African Republic' => 'cafr.gif', - 'Kingdom of Cambodia' => 'camb.gif', - 'Republic of Cameroon' => 'came.gif', - 'Dominion of Canada' => 'cana.gif', - 'Caribbean Community' => 'cari.gif', - 'Republic of Cape Verde' => 'cave.gif', - 'Republic of Chad' => 'chad.gif', - 'Republic of Chile' => 'chil.gif', - 'Territory of Christmas Island' => 'chms.gif', - 'Commonwealth of Independent States' => 'cins.gif', - 'Cook Islands' => 'ckis.gif', - 'Republic of Colombia' => 'clmb.gif', - 'Territory of Cocos Islands' => 'cois.gif', - 'Commonwealth' => 'comn.gif', - 'Union of the Comoros' => 'como.gif', - 'Republic of the Congo' => 'cong.gif', - 'Republic of Costa Rica' => 'corc.gif', - 'Republic of Croatia' => 'croa.gif', - 'Republic of Cuba' => 'cuba.gif', - 'British Overseas Territory of the Cayman Islands' => 'cyis.gif', - 'Republic of Cyprus' => 'cypr.gif', - 'The Czech Republic' => 'czec.gif', - 'Kingdom of Denmark' => 'denm.gif', - 'Republic of Djibouti' => 'djib.gif', - 'Commonwealth of Dominica' => 'domn.gif', - 'Dominican Republic' => 'dore.gif', - 'Republic of Ecuador' => 'ecua.gif', - 'Arab Republic of Egypt' => 'egyp.gif', - 'Republic of El Salvador' => 'elsa.gif', - 'England' => 'engl.gif', - 'Republic of Equatorial Guinea' => 'eqgu.gif', - 'State of Eritrea' => 'erit.gif', - 'Republic of Estonia' => 'estn.gif', - 'Ethiopia' => 'ethp.gif', - 'European Union' => 'euun.gif', - 'British Overseas Territory of the Falkland Islands' => 'fais.gif', - 'International Federation of Vexillological Associations' => 'fiav.gif', - 'Republic of Fiji' => 'fiji.gif', - 'Republic of Finland' => 'finl.gif', - 'Territory of French Polynesia' => 'fpol.gif', - 'French Republic' => 'fran.gif', - 'Overseas Department of French Guiana' => 'frgu.gif', - 'Gabonese Republic' => 'gabn.gif', - 'Republic of the Gambia' => 'gamb.gif', - 'Republic of Georgia' => 'geor.gif', - 'Federal Republic of Germany' => 'germ.gif', - 'Republic of Ghana' => 'ghan.gif', - 'Gibraltar' => 'gibr.gif', - 'Hellenic Republic' => 'grec.gif', - 'State of Grenada' => 'gren.gif', - 'Overseas Department of Guadeloupe' => 'guad.gif', - 'Territory of Guam' => 'guam.gif', - 'Republic of Guatemala' => 'guat.gif', - 'The Bailiwick of Guernsey' => 'guer.gif', - 'Republic of Guinea' => 'guin.gif', - 'Republic of Haiti' => 'hait.gif', - 'Hong Kong Special Administrative Region' => 'hokn.gif', - 'Republic of Honduras' => 'hond.gif', - 'Republic of Hungary' => 'hung.gif', - 'Republic of Iceland' => 'icel.gif', - 'International Committee of the Red Cross' => 'icrc.gif', - 'Republic of India' => 'inda.gif', - 'Republic of Indonesia' => 'indn.gif', - 'Republic of Iraq' => 'iraq.gif', - 'Republic of Ireland' => 'irel.gif', - 'Organization of the Islamic Conference' => 'isco.gif', - 'Isle of Man' => 'isma.gif', - 'State of Israel' => 'isra.gif', - 'Italian Republic' => 'ital.gif', - 'Jamaica' => 'jama.gif', - 'Japan' => 'japa.gif', - 'The Bailiwick of Jersey' => 'jers.gif', - 'Hashemite Kingdom of Jordan' => 'jord.gif', - 'Republic of Kazakhstan' => 'kazk.gif', - 'Republic of Kenya' => 'keny.gif', - 'Republic of Kiribati' => 'kirb.gif', - 'State of Kuwait' => 'kuwa.gif', - 'Kyrgyz Republic' => 'kyrg.gif', - 'Republic of Latvia' => 'latv.gif', - 'Lebanese Republic' => 'leba.gif', - 'Kingdom of Lesotho' => 'lest.gif', - 'Republic of Liberia' => 'libe.gif', - 'Principality of Liechtenstein' => 'liec.gif', - 'Republic of Lithuania' => 'lith.gif', - 'Grand Duchy of Luxembourg' => 'luxe.gif', - 'Macao Special Administrative Region' => 'maca.gif', - 'Republic of Macedonia' => 'mace.gif', - 'Republic of Madagascar' => 'mada.gif', - 'Republic of the Marshall Islands' => 'mais.gif', - 'Republic of Maldives' => 'mald.gif', - 'Republic of Mali' => 'mali.gif', - 'Federation of Malaysia' => 'mals018.gif', - 'Republic of Malta' => 'malt.gif', - 'Republic of Malawi' => 'malw.gif', - 'Overseas Department of Martinique' => 'mart.gif', - 'Islamic Republic of Mauritania' => 'maur.gif', - 'Territorial Collectivity of Mayotte' => 'mayt.gif', - 'United Mexican States' => 'mexc.gif', - 'Federated States of Micronesia' => 'micr.gif', - 'Midway Islands' => 'miis.gif', - 'Republic of Moldova' => 'mold.gif', - 'Principality of Monaco' => 'mona.gif', - 'Republic of Mongolia' => 'mong.gif', - 'British Overseas Territory of Montserrat' => 'mont.gif', - 'Kingdom of Morocco' => 'morc.gif', - 'Republic of Mozambique' => 'moza.gif', - 'Republic of Mauritius' => 'mrts.gif', - 'Union of Myanmar' => 'myan.gif', - 'Republic of Namibia' => 'namb.gif', - 'North Atlantic Treaty Organization' => 'nato.gif', - 'Republic of Nauru' => 'naur.gif', - 'Turkish Republic of Northern Cyprus' => 'ncyp.gif', - 'Netherlands Antilles' => 'nean.gif', - 'Kingdom of Nepal' => 'nepa.gif', - 'Kingdom of the Netherlands' => 'neth.gif', - 'Territory of Norfolk Island' => 'nfis.gif', - 'Federal Republic of Nigeria' => 'ngra.gif', - 'Republic of Nicaragua' => 'nica.gif', - 'Republic of Niger' => 'nigr.gif', - 'Niue' => 'niue.gif', - 'Commonwealth of the Northern Mariana Islands' => 'nmar.gif', - 'Province of Northern Ireland' => 'noir.gif', - 'Nordic Council' => 'nord.gif', - 'Kingdom of Norway' => 'norw.gif', - 'Territory of New Caledonia and Dependencies' => 'nwca.gif', - 'New Zealand' => 'nwze.gif', - 'Organization of American States' => 'oast.gif', - 'Organization of African Unity' => 'oaun.gif', - 'International Olympic Committee' => 'olym.gif', - 'Sultanate of Oman' => 'oman.gif', - 'Organization of Petroleum Exporting Countries' => 'opec.gif', - 'Islamic Republic of Pakistan' => 'paks.gif', - 'Republic of Palau' => 'pala.gif', - 'Independent State of Papua New Guinea' => 'pang.gif', - 'Republic of Paraguay' => 'para.gif', - 'Republic of the Philippines' => 'phil.gif', - 'British Overseas Territory of the Pitcairn Islands' => 'piis.gif', - 'Republic of Poland' => 'pola.gif', - 'Republic of Portugal' => 'port.gif', - 'Commonwealth of Puerto Rico' => 'purc.gif', - 'State of Qatar' => 'qata.gif', - 'Russian Federation' => 'russ.gif', - 'Republic of Rwanda' => 'rwan.gif', - 'Kingdom of Saudi Arabia' => 'saar.gif', - 'Republic of San Marino' => 'sama.gif', - 'Nordic Sami Conference' => 'sami.gif', - 'Sark' => 'sark.gif', - 'Scotland' => 'scot.gif', - 'Principality of Seborga' => 'sebo.gif', - 'Republic of Sierra Leone' => 'sile.gif', - 'Republic of Singapore' => 'sing.gif', - 'Republic of Korea' => 'skor.gif', - 'Republic of Slovenia' => 'slva.gif', - 'Somali Republic' => 'smla.gif', - 'Republic of Somaliland' => 'smld.gif', - 'Republic of South Africa' => 'soaf.gif', - 'Solomon Islands' => 'sois.gif', - 'Kingdom of Spain' => 'span.gif', - 'Secretariat of the Pacific Community' => 'spco.gif', - 'Democratic Socialist Republic of Sri Lanka' => 'srla.gif', - 'Saint Lucia' => 'stlu.gif', - 'Republic of the Sudan' => 'suda.gif', - 'Republic of Suriname' => 'surn.gif', - 'Slovak Republic' => 'svka.gif', - 'Kingdom of Sweden' => 'swdn.gif', - 'Swiss Confederation' => 'swit.gif', - 'Syrian Arab Republic' => 'syra.gif', - 'Kingdom of Swaziland' => 'szld.gif', - 'Republic of China' => 'taiw.gif', - 'Republic of Tajikistan' => 'tajk.gif', - 'United Republic of Tanzania' => 'tanz.gif', - 'Kingdom of Thailand' => 'thal.gif', - 'Autonomous Region of Tibet' => 'tibe.gif', - 'Turkmenistan' => 'tkst.gif', - 'Togolese Republic' => 'togo.gif', - 'Tokelau' => 'toke.gif', - 'Kingdom of Tonga' => 'tong.gif', - 'Tristan da Cunha' => 'trdc.gif', - 'Tromelin' => 'tris.gif', - 'Republic of Tunisia' => 'tuns.gif', - 'Republic of Turkey' => 'turk.gif', - 'Tuvalu' => 'tuva.gif', - 'United Arab Emirates' => 'uaem.gif', - 'Republic of Uganda' => 'ugan.gif', - 'Ukraine' => 'ukrn.gif', - 'United Kingdom of Great Britain' => 'unkg.gif', - 'United Nations' => 'unna.gif', - 'United States of America' => 'unst.gif', - 'Oriental Republic of Uruguay' => 'urgy.gif', - 'Virgin Islands of the United States' => 'usvs.gif', - 'Republic of Uzbekistan' => 'uzbk.gif', - 'State of the Vatican City' => 'vacy.gif', - 'Republic of Vanuatu' => 'vant.gif', - 'Bolivarian Republic of Venezuela' => 'venz.gif', - 'Republic of Yemen' => 'yemn.gif', - 'Democratic Republic of Congo' => 'zare.gif', - 'Republic of Zimbabwe' => 'zbwe.gif' -) ; - - diff --git a/html/lib/jpgraph/gd_image.inc.php b/html/lib/jpgraph/gd_image.inc.php deleted file mode 100644 index 913558914b..0000000000 --- a/html/lib/jpgraph/gd_image.inc.php +++ /dev/null @@ -1,2045 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -//======================================================================= -// File: GD_IMAGE.INC.PHP -// Description: PHP Graph Plotting library. Low level image drawing routines -// Created: 2001-01-08, refactored 2008-03-29 -// Ver: $Id: gd_image.inc.php 1922 2010-01-11 11:42:50Z ljp $ -// -// Copyright (c) Aditus Consulting. All rights reserved. -//======================================================================== - -require_once 'jpgraph_rgb.inc.php'; -require_once 'jpgraph_ttf.inc.php'; - -// Line styles -define('LINESTYLE_SOLID',1); -define('LINESTYLE_DOTTED',2); -define('LINESTYLE_DASHED',3); -define('LINESTYLE_LONGDASH',4); - -// The DEFAULT_GFORMAT sets the default graphic encoding format, i.e. -// PNG, JPG or GIF depending on what is installed on the target system -// in that order. -if( !DEFINED("DEFAULT_GFORMAT") ) { - define("DEFAULT_GFORMAT","auto"); -} - -//======================================================================== -// CLASS Image -// Description: The very coor image drawing class that encapsulates all -// calls to the GD library -// Note: The class used by the library is the decendant -// class RotImage which extends the Image class with transparent -// rotation. -//========================================================================= -class Image { - public $left_margin=30,$right_margin=30,$top_margin=20,$bottom_margin=30; - public $img=null; - public $plotwidth=0,$plotheight=0; - public $width=0, $height=0; - public $rgb=null; - public $current_color,$current_color_name; - public $line_weight=1, $line_style=LINESTYLE_SOLID; - public $img_format; - public $ttf=null; - protected $expired=true; - protected $lastx=0, $lasty=0; - protected $obs_list=array(); - protected $font_size=12,$font_family=FF_FONT1, $font_style=FS_NORMAL; - protected $font_file=''; - protected $text_halign="left",$text_valign="bottom"; - protected $use_anti_aliasing=false; - protected $quality=null; - protected $colorstack=array(),$colorstackidx=0; - protected $canvascolor = 'white' ; - protected $langconv = null ; - protected $iInterlace=false; - protected $bbox_cache = array(); // STore the last found tetx bounding box - - //--------------- - // CONSTRUCTOR - function __construct($aWidth=0,$aHeight=0,$aFormat=DEFAULT_GFORMAT,$aSetAutoMargin=true) { - $this->CreateImgCanvas($aWidth,$aHeight); - - if( $aSetAutoMargin ) { - $this->SetAutoMargin(); - } - - if( !$this->SetImgFormat($aFormat) ) { - JpGraphError::RaiseL(25081,$aFormat);//("JpGraph: Selected graphic format is either not supported or unknown [$aFormat]"); - } - $this->ttf = new TTF(); - $this->langconv = new LanguageConv(); - } - - // Enable interlacing in images - function SetInterlace($aFlg=true) { - $this->iInterlace=$aFlg; - } - - // Should we use anti-aliasing. Note: This really slows down graphics! - function SetAntiAliasing($aFlg=true) { - $this->use_anti_aliasing = $aFlg; - if( function_exists('imageantialias') ) { - imageantialias($this->img,$aFlg); - } - else { - JpGraphError::RaiseL(25128);//('The function imageantialias() is not available in your PHP installation. Use the GD version that comes with PHP and not the standalone version.') - } - } - - function GetAntiAliasing() { - return $this->use_anti_aliasing ; - } - - function CreateRawCanvas($aWidth=0,$aHeight=0) { - if( $aWidth <= 1 || $aHeight <= 1 ) { - JpGraphError::RaiseL(25082,$aWidth,$aHeight);//("Illegal sizes specified for width or height when creating an image, (width=$aWidth, height=$aHeight)"); - } - - $this->img = @imagecreatetruecolor($aWidth, $aHeight); - if( $this->img < 1 ) { - JpGraphError::RaiseL(25126); - //die("Can't create truecolor image. Check that you really have GD2 library installed."); - } - $this->SetAlphaBlending(); - - if( $this->iInterlace ) { - imageinterlace($this->img,1); - } - if( $this->rgb != null ) { - $this->rgb->img = $this->img ; - } - else { - $this->rgb = new RGB($this->img); - } - } - - function CloneCanvasH() { - $oldimage = $this->img; - $this->CreateRawCanvas($this->width,$this->height); - imagecopy($this->img,$oldimage,0,0,0,0,$this->width,$this->height); - return $oldimage; - } - - function CreateImgCanvas($aWidth=0,$aHeight=0) { - - $old = array($this->img,$this->width,$this->height); - - $aWidth = round($aWidth); - $aHeight = round($aHeight); - - $this->width=$aWidth; - $this->height=$aHeight; - - - if( $aWidth==0 || $aHeight==0 ) { - // We will set the final size later. - // Note: The size must be specified before any other - // img routines that stroke anything are called. - $this->img = null; - $this->rgb = null; - return $old; - } - - $this->CreateRawCanvas($aWidth,$aHeight); - // Set canvas color (will also be the background color for a - // a pallett image - $this->SetColor($this->canvascolor); - $this->FilledRectangle(0,0,$aWidth-1,$aHeight-1); - - return $old ; - } - - function CopyCanvasH($aToHdl,$aFromHdl,$aToX,$aToY,$aFromX,$aFromY,$aWidth,$aHeight,$aw=-1,$ah=-1) { - if( $aw === -1 ) { - $aw = $aWidth; - $ah = $aHeight; - $f = 'imagecopyresized'; - } - else { - $f = 'imagecopyresampled'; - } - $f($aToHdl,$aFromHdl,$aToX,$aToY,$aFromX,$aFromY, $aWidth,$aHeight,$aw,$ah); - } - - function Copy($fromImg,$toX,$toY,$fromX,$fromY,$toWidth,$toHeight,$fromWidth=-1,$fromHeight=-1) { - $this->CopyCanvasH($this->img,$fromImg,$toX,$toY,$fromX,$fromY,$toWidth,$toHeight,$fromWidth,$fromHeight); - } - - function CopyMerge($fromImg,$toX,$toY,$fromX,$fromY,$toWidth,$toHeight,$fromWidth=-1,$fromHeight=-1,$aMix=100) { - if( $aMix == 100 ) { - $this->CopyCanvasH($this->img,$fromImg, - $toX,$toY,$fromX,$fromY,$toWidth,$toHeight,$fromWidth,$fromHeight); - } - else { - if( ($fromWidth != -1 && ($fromWidth != $toWidth)) || ($fromHeight != -1 && ($fromHeight != $fromHeight)) ) { - // Create a new canvas that will hold the re-scaled original from image - if( $toWidth <= 1 || $toHeight <= 1 ) { - JpGraphError::RaiseL(25083);//('Illegal image size when copying image. Size for copied to image is 1 pixel or less.'); - } - - $tmpimg = @imagecreatetruecolor($toWidth, $toHeight); - - if( $tmpimg < 1 ) { - JpGraphError::RaiseL(25084);//('Failed to create temporary GD canvas. Out of memory ?'); - } - $this->CopyCanvasH($tmpimg,$fromImg,0,0,0,0, - $toWidth,$toHeight,$fromWidth,$fromHeight); - $fromImg = $tmpimg; - } - imagecopymerge($this->img,$fromImg,$toX,$toY,$fromX,$fromY,$toWidth,$toHeight,$aMix); - } - } - - static function GetWidth($aImg=null) { - if( $aImg === null ) { - $aImg = $this->img; - } - return imagesx($aImg); - } - - static function GetHeight($aImg=null) { - if( $aImg === null ) { - $aImg = $this->img; - } - return imagesy($aImg); - } - - static function CreateFromString($aStr) { - $img = imagecreatefromstring($aStr); - if( $img === false ) { - JpGraphError::RaiseL(25085); - //('An image can not be created from the supplied string. It is either in a format not supported or the string is representing an corrupt image.'); - } - return $img; - } - - function SetCanvasH($aHdl) { - $this->img = $aHdl; - $this->rgb->img = $aHdl; - } - - function SetCanvasColor($aColor) { - $this->canvascolor = $aColor ; - } - - function SetAlphaBlending($aFlg=true) { - ImageAlphaBlending($this->img,$aFlg); - } - - function SetAutoMargin() { - $min_bm=5; - $lm = min(40,$this->width/7); - $rm = min(20,$this->width/10); - $tm = max(5,$this->height/7); - $bm = max($min_bm,$this->height/6); - $this->SetMargin($lm,$rm,$tm,$bm); - } - - //--------------- - // PUBLIC METHODS - - function SetFont($family,$style=FS_NORMAL,$size=10) { - $this->font_family=$family; - $this->font_style=$style; - $this->font_size=$size; - $this->font_file=''; - if( ($this->font_family==FF_FONT1 || $this->font_family==FF_FONT2) && $this->font_style==FS_BOLD ){ - ++$this->font_family; - } - if( $this->font_family > FF_FONT2+1 ) { // A TTF font so get the font file - - // Check that this PHP has support for TTF fonts - if( !function_exists('imagettfbbox') ) { - JpGraphError::RaiseL(25087);//('This PHP build has not been configured with TTF support. You need to recompile your PHP installation with FreeType support.'); - } - $this->font_file = $this->ttf->File($this->font_family,$this->font_style); - } - } - - // Get the specific height for a text string - function GetTextHeight($txt="",$angle=0) { - $tmp = preg_split('/\n/',$txt); - $n = count($tmp); - $m=0; - for($i=0; $i< $n; ++$i) { - $m = max($m,strlen($tmp[$i])); - } - - if( $this->font_family <= FF_FONT2+1 ) { - if( $angle==0 ) { - $h = imagefontheight($this->font_family); - if( $h === false ) { - JpGraphError::RaiseL(25088);//('You have a misconfigured GD font support. The call to imagefontwidth() fails.'); - } - - return $n*$h; - } - else { - $w = @imagefontwidth($this->font_family); - if( $w === false ) { - JpGraphError::RaiseL(25088);//('You have a misconfigured GD font support. The call to imagefontwidth() fails.'); - } - - return $m*$w; - } - } - else { - $bbox = $this->GetTTFBBox($txt,$angle); - return $bbox[1]-$bbox[5]+1; - } - } - - // Estimate font height - function GetFontHeight($angle=0) { - $txt = "XOMg"; - return $this->GetTextHeight($txt,$angle); - } - - // Approximate font width with width of letter "O" - function GetFontWidth($angle=0) { - $txt = 'O'; - return $this->GetTextWidth($txt,$angle); - } - - // Get actual width of text in absolute pixels. Note that the width is the - // texts projected with onto the x-axis. Call with angle=0 to get the true - // etxt width. - function GetTextWidth($txt,$angle=0) { - - $tmp = preg_split('/\n/',$txt); - $n = count($tmp); - if( $this->font_family <= FF_FONT2+1 ) { - - $m=0; - for($i=0; $i < $n; ++$i) { - $l=strlen($tmp[$i]); - if( $l > $m ) { - $m = $l; - } - } - - if( $angle==0 ) { - $w = @imagefontwidth($this->font_family); - if( $w === false ) { - JpGraphError::RaiseL(25088);//('You have a misconfigured GD font support. The call to imagefontwidth() fails.'); - } - return $m*$w; - } - else { - // 90 degrees internal so height becomes width - $h = @imagefontheight($this->font_family); - if( $h === false ) { - JpGraphError::RaiseL(25089);//('You have a misconfigured GD font support. The call to imagefontheight() fails.'); - } - return $n*$h; - } - } - else { - // For TTF fonts we must walk through a lines and find the - // widest one which we use as the width of the multi-line - // paragraph - $m=0; - for( $i=0; $i < $n; ++$i ) { - $bbox = $this->GetTTFBBox($tmp[$i],$angle); - $mm = $bbox[2] - $bbox[0]; - if( $mm > $m ) - $m = $mm; - } - return $m; - } - } - - - // Draw text with a box around it - function StrokeBoxedText($x,$y,$txt,$dir=0,$fcolor="white",$bcolor="black", - $shadowcolor=false,$paragraph_align="left", - $xmarg=6,$ymarg=4,$cornerradius=0,$dropwidth=3) { - - $oldx = $this->lastx; - $oldy = $this->lasty; - - if( !is_numeric($dir) ) { - if( $dir=="h" ) $dir=0; - elseif( $dir=="v" ) $dir=90; - else JpGraphError::RaiseL(25090,$dir);//(" Unknown direction specified in call to StrokeBoxedText() [$dir]"); - } - - if( $this->font_family >= FF_FONT0 && $this->font_family <= FF_FONT2+1) { - $width=$this->GetTextWidth($txt,$dir) ; - $height=$this->GetTextHeight($txt,$dir) ; - } - else { - $width=$this->GetBBoxWidth($txt,$dir) ; - $height=$this->GetBBoxHeight($txt,$dir) ; - } - - $height += 2*$ymarg; - $width += 2*$xmarg; - - if( $this->text_halign=="right" ) $x -= $width; - elseif( $this->text_halign=="center" ) $x -= $width/2; - - if( $this->text_valign=="bottom" ) $y -= $height; - elseif( $this->text_valign=="center" ) $y -= $height/2; - - $olda = $this->SetAngle(0); - - if( $shadowcolor ) { - $this->PushColor($shadowcolor); - $this->FilledRoundedRectangle($x-$xmarg+$dropwidth,$y-$ymarg+$dropwidth, - $x+$width+$dropwidth,$y+$height-$ymarg+$dropwidth, - $cornerradius); - $this->PopColor(); - $this->PushColor($fcolor); - $this->FilledRoundedRectangle($x-$xmarg,$y-$ymarg, - $x+$width,$y+$height-$ymarg, - $cornerradius); - $this->PopColor(); - $this->PushColor($bcolor); - $this->RoundedRectangle($x-$xmarg,$y-$ymarg, - $x+$width,$y+$height-$ymarg,$cornerradius); - $this->PopColor(); - } - else { - if( $fcolor ) { - $oc=$this->current_color; - $this->SetColor($fcolor); - $this->FilledRoundedRectangle($x-$xmarg,$y-$ymarg,$x+$width,$y+$height-$ymarg,$cornerradius); - $this->current_color=$oc; - } - if( $bcolor ) { - $oc=$this->current_color; - $this->SetColor($bcolor); - $this->RoundedRectangle($x-$xmarg,$y-$ymarg,$x+$width,$y+$height-$ymarg,$cornerradius); - $this->current_color=$oc; - } - } - - $h=$this->text_halign; - $v=$this->text_valign; - $this->SetTextAlign("left","top"); - - $debug=false; - $this->StrokeText($x, $y, $txt, $dir, $paragraph_align,$debug); - - $bb = array($x-$xmarg,$y+$height-$ymarg,$x+$width,$y+$height-$ymarg, - $x+$width,$y-$ymarg,$x-$xmarg,$y-$ymarg); - $this->SetTextAlign($h,$v); - - $this->SetAngle($olda); - $this->lastx = $oldx; - $this->lasty = $oldy; - - return $bb; - } - - // Draw text with a box around it. This time the box will be rotated - // with the text. The previous method will just make a larger enough non-rotated - // box to hold the text inside. - function StrokeBoxedText2($x,$y,$txt,$dir=0,$fcolor="white",$bcolor="black", - $shadowcolor=false,$paragraph_align="left", - $xmarg=6,$ymarg=4,$cornerradius=0,$dropwidth=3) { - - // This version of boxed text will stroke a rotated box round the text - // thta will follow the angle of the text. - // This has two implications: - // 1) This methos will only support TTF fonts - // 2) The only two alignment that makes sense are centered or baselined - - if( $this->font_family <= FF_FONT2+1 ) { - JpGraphError::RaiseL(25131);//StrokeBoxedText2() Only support TTF fonts and not built in bitmap fonts - } - - $oldx = $this->lastx; - $oldy = $this->lasty; - $dir = $this->NormAngle($dir); - - if( !is_numeric($dir) ) { - if( $dir=="h" ) $dir=0; - elseif( $dir=="v" ) $dir=90; - else JpGraphError::RaiseL(25090,$dir);//(" Unknown direction specified in call to StrokeBoxedText() [$dir]"); - } - - $width=$this->GetTextWidth($txt,0) + 2*$xmarg; - $height=$this->GetTextHeight($txt,0) + 2*$ymarg ; - $rect_width=$this->GetBBoxWidth($txt,$dir) ; - $rect_height=$this->GetBBoxHeight($txt,$dir) ; - - $baseline_offset = $this->bbox_cache[1]-1; - - if( $this->text_halign=="center" ) { - if( $dir >= 0 && $dir <= 90 ) { - - $x -= $rect_width/2; - $x += sin($dir*M_PI/180)*$height; - $y += $rect_height/2; - - } elseif( $dir >= 270 && $dir <= 360 ) { - - $x -= $rect_width/2; - $y -= $rect_height/2; - $y += cos($dir*M_PI/180)*$height; - - } elseif( $dir >= 90 && $dir <= 180 ) { - - $x += $rect_width/2; - $y += $rect_height/2; - $y += cos($dir*M_PI/180)*$height; - - } - else { - // $dir > 180 && $dir < 270 - $x += $rect_width/2; - $x += sin($dir*M_PI/180)*$height; - $y -= $rect_height/2; - } - } - - // Rotate the box around this point - $this->SetCenter($x,$y); - $olda = $this->SetAngle(-$dir); - - // We need to use adjusted coordinats for the box to be able - // to draw the box below the baseline. This cannot be done before since - // the rotating point must be the original x,y since that is arounbf the - // point where the text will rotate and we cannot change this since - // that is where the GD/GreeType will rotate the text - - - // For smaller <14pt font we need to do some additional - // adjustments to make it look good - if( $this->font_size < 14 ) { - $x -= 2; - $y += 2; - } - else { - // $y += $baseline_offset; - } - - if( $shadowcolor ) { - $this->PushColor($shadowcolor); - $this->FilledRectangle($x-$xmarg+$dropwidth,$y+$ymarg+$dropwidth-$height, - $x+$width+$dropwidth,$y+$ymarg+$dropwidth); - //$cornerradius); - $this->PopColor(); - $this->PushColor($fcolor); - $this->FilledRectangle($x-$xmarg, $y+$ymarg-$height, - $x+$width, $y+$ymarg); - //$cornerradius); - $this->PopColor(); - $this->PushColor($bcolor); - $this->Rectangle($x-$xmarg,$y+$ymarg-$height, - $x+$width,$y+$ymarg); - //$cornerradius); - $this->PopColor(); - } - else { - if( $fcolor ) { - $oc=$this->current_color; - $this->SetColor($fcolor); - $this->FilledRectangle($x-$xmarg,$y+$ymarg-$height,$x+$width,$y+$ymarg);//,$cornerradius); - $this->current_color=$oc; - } - if( $bcolor ) { - $oc=$this->current_color; - $this->SetColor($bcolor); - $this->Rectangle($x-$xmarg,$y+$ymarg-$height,$x+$width,$y+$ymarg);//,$cornerradius); - $this->current_color=$oc; - } - } - - if( $this->font_size < 14 ) { - $x += 2; - $y -= 2; - } - else { - - // Restore the original y before we stroke the text - // $y -= $baseline_offset; - - } - - $this->SetCenter(0,0); - $this->SetAngle($olda); - - $h=$this->text_halign; - $v=$this->text_valign; - if( $this->text_halign == 'center') { - $this->SetTextAlign('center','basepoint'); - } - else { - $this->SetTextAlign('basepoint','basepoint'); - } - - $debug=false; - $this->StrokeText($x, $y, $txt, $dir, $paragraph_align,$debug); - - $bb = array($x-$xmarg, $y+$height-$ymarg, - $x+$width, $y+$height-$ymarg, - $x+$width, $y-$ymarg, - $x-$xmarg, $y-$ymarg); - - $this->SetTextAlign($h,$v); - $this->SetAngle($olda); - - $this->lastx = $oldx; - $this->lasty = $oldy; - - return $bb; - } - - // Set text alignment - function SetTextAlign($halign,$valign="bottom") { - $this->text_halign=$halign; - $this->text_valign=$valign; - } - - function _StrokeBuiltinFont($x,$y,$txt,$dir,$paragraph_align,&$aBoundingBox,$aDebug=false) { - - if( is_numeric($dir) && $dir!=90 && $dir!=0) - JpGraphError::RaiseL(25091);//(" Internal font does not support drawing text at arbitrary angle. Use TTF fonts instead."); - - $h=$this->GetTextHeight($txt); - $fh=$this->GetFontHeight(); - $w=$this->GetTextWidth($txt); - - if( $this->text_halign=="right") { - $x -= $dir==0 ? $w : $h; - } - elseif( $this->text_halign=="center" ) { - // For center we subtract 1 pixel since this makes the middle - // be prefectly in the middle - $x -= $dir==0 ? $w/2-1 : $h/2; - } - if( $this->text_valign=="top" ) { - $y += $dir==0 ? $h : $w; - } - elseif( $this->text_valign=="center" ) { - $y += $dir==0 ? $h/2 : $w/2; - } - - if( $dir==90 ) { - imagestringup($this->img,$this->font_family,$x,$y,$txt,$this->current_color); - $aBoundingBox = array(round($x),round($y),round($x),round($y-$w),round($x+$h),round($y-$w),round($x+$h),round($y)); - if( $aDebug ) { - // Draw bounding box - $this->PushColor('green'); - $this->Polygon($aBoundingBox,true); - $this->PopColor(); - } - } - else { - if( preg_match('/\n/',$txt) ) { - $tmp = preg_split('/\n/',$txt); - for($i=0; $i < count($tmp); ++$i) { - $w1 = $this->GetTextWidth($tmp[$i]); - if( $paragraph_align=="left" ) { - imagestring($this->img,$this->font_family,$x,$y-$h+1+$i*$fh,$tmp[$i],$this->current_color); - } - elseif( $paragraph_align=="right" ) { - imagestring($this->img,$this->font_family,$x+($w-$w1),$y-$h+1+$i*$fh,$tmp[$i],$this->current_color); - } - else { - imagestring($this->img,$this->font_family,$x+$w/2-$w1/2,$y-$h+1+$i*$fh,$tmp[$i],$this->current_color); - } - } - } - else { - //Put the text - imagestring($this->img,$this->font_family,$x,$y-$h+1,$txt,$this->current_color); - } - if( $aDebug ) { - // Draw the bounding rectangle and the bounding box - $p1 = array(round($x),round($y),round($x),round($y-$h),round($x+$w),round($y-$h),round($x+$w),round($y)); - - // Draw bounding box - $this->PushColor('green'); - $this->Polygon($p1,true); - $this->PopColor(); - - } - $aBoundingBox=array(round($x),round($y),round($x),round($y-$h),round($x+$w),round($y-$h),round($x+$w),round($y)); - } - } - - function AddTxtCR($aTxt) { - // If the user has just specified a '\n' - // instead of '\n\t' we have to add '\r' since - // the width will be too muchy otherwise since when - // we print we stroke the individually lines by hand. - $e = explode("\n",$aTxt); - $n = count($e); - for($i=0; $i<$n; ++$i) { - $e[$i]=str_replace("\r","",$e[$i]); - } - return implode("\n\r",$e); - } - - function NormAngle($a) { - // Normalize angle in degrees - // Normalize angle to be between 0-360 - while( $a > 360 ) - $a -= 360; - while( $a < -360 ) - $a += 360; - if( $a < 0 ) - $a = 360 + $a; - return $a; - } - - function imagettfbbox_fixed($size, $angle, $fontfile, $text) { - - - if( ! USE_LIBRARY_IMAGETTFBBOX ) { - - $bbox = @imagettfbbox($size, $angle, $fontfile, $text); - if( $bbox === false ) { - JpGraphError::RaiseL(25092,$this->font_file); - //("There is either a configuration problem with TrueType or a problem reading font file (".$this->font_file."). Make sure file exists and is in a readable place for the HTTP process. (If 'basedir' restriction is enabled in PHP then the font file must be located in the document root.). It might also be a wrongly installed FreeType library. Try uppgrading to at least FreeType 2.1.13 and recompile GD with the correct setup so it can find the new FT library."); - } - $this->bbox_cache = $bbox; - return $bbox; - } - - // The built in imagettfbbox is buggy for angles != 0 so - // we calculate this manually by getting the bounding box at - // angle = 0 and then rotate the bounding box manually - $bbox = @imagettfbbox($size, 0, $fontfile, $text); - if( $bbox === false ) { - JpGraphError::RaiseL(25092,$this->font_file); - //("There is either a configuration problem with TrueType or a problem reading font file (".$this->font_file."). Make sure file exists and is in a readable place for the HTTP process. (If 'basedir' restriction is enabled in PHP then the font file must be located in the document root.). It might also be a wrongly installed FreeType library. Try uppgrading to at least FreeType 2.1.13 and recompile GD with the correct setup so it can find the new FT library."); - } - - $angle = $this->NormAngle($angle); - - $a = $angle*M_PI/180; - $ca = cos($a); - $sa = sin($a); - $ret = array(); - - // We always add 1 pixel to the left since the left edge of the bounding - // box is sometimes coinciding with the first pixel of the text - //$bbox[0] -= 1; - //$bbox[6] -= 1; - - // For roatated text we need to add extra width for rotated - // text since the kerning and stroking of the TTF is not the same as for - // text at a 0 degree angle - - if( $angle > 0.001 && abs($angle-360) > 0.001 ) { - $h = abs($bbox[7]-$bbox[1]); - $w = abs($bbox[2]-$bbox[0]); - - $bbox[0] -= 2; - $bbox[6] -= 2; - // The width is underestimated so compensate for that - $bbox[2] += round($w*0.06); - $bbox[4] += round($w*0.06); - - // and we also need to compensate with increased height - $bbox[5] -= round($h*0.1); - $bbox[7] -= round($h*0.1); - - if( $angle > 90 ) { - // For angles > 90 we also need to extend the height further down - // by the baseline since that is also one more problem - $bbox[1] += round($h*0.15); - $bbox[3] += round($h*0.15); - - // and also make it slighty less height - $bbox[7] += round($h*0.05); - $bbox[5] += round($h*0.05); - - // And we need to move the box slightly top the rright (from a tetx perspective) - $bbox[0] += round($w*0.02); - $bbox[6] += round($w*0.02); - - if( $angle > 180 ) { - // And we need to move the box slightly to the left (from a text perspective) - $bbox[0] -= round($w*0.02); - $bbox[6] -= round($w*0.02); - $bbox[2] -= round($w*0.02); - $bbox[4] -= round($w*0.02); - - } - - } - for($i = 0; $i < 7; $i += 2) { - $ret[$i] = round($bbox[$i] * $ca + $bbox[$i+1] * $sa); - $ret[$i+1] = round($bbox[$i+1] * $ca - $bbox[$i] * $sa); - } - $this->bbox_cache = $ret; - return $ret; - } - else { - $this->bbox_cache = $bbox; - return $bbox; - } - } - - // Deprecated - function GetTTFBBox($aTxt,$aAngle=0) { - $bbox = $this->imagettfbbox_fixed($this->font_size,$aAngle,$this->font_file,$aTxt); - return $bbox; - } - - function GetBBoxTTF($aTxt,$aAngle=0) { - // Normalize the bounding box to become a minimum - // enscribing rectangle - - $aTxt = $this->AddTxtCR($aTxt); - - if( !is_readable($this->font_file) ) { - JpGraphError::RaiseL(25093,$this->font_file); - //('Can not read font file ('.$this->font_file.') in call to Image::GetBBoxTTF. Please make sure that you have set a font before calling this method and that the font is installed in the TTF directory.'); - } - $bbox = $this->imagettfbbox_fixed($this->font_size,$aAngle,$this->font_file,$aTxt); - - if( $aAngle==0 ) return $bbox; - - if( $aAngle >= 0 ) { - if( $aAngle <= 90 ) { //<=0 - $bbox = array($bbox[6],$bbox[1],$bbox[2],$bbox[1], - $bbox[2],$bbox[5],$bbox[6],$bbox[5]); - } - elseif( $aAngle <= 180 ) { //<= 2 - $bbox = array($bbox[4],$bbox[7],$bbox[0],$bbox[7], - $bbox[0],$bbox[3],$bbox[4],$bbox[3]); - } - elseif( $aAngle <= 270 ) { //<= 3 - $bbox = array($bbox[2],$bbox[5],$bbox[6],$bbox[5], - $bbox[6],$bbox[1],$bbox[2],$bbox[1]); - } - else { - $bbox = array($bbox[0],$bbox[3],$bbox[4],$bbox[3], - $bbox[4],$bbox[7],$bbox[0],$bbox[7]); - } - } - elseif( $aAngle < 0 ) { - if( $aAngle <= -270 ) { // <= -3 - $bbox = array($bbox[6],$bbox[1],$bbox[2],$bbox[1], - $bbox[2],$bbox[5],$bbox[6],$bbox[5]); - } - elseif( $aAngle <= -180 ) { // <= -2 - $bbox = array($bbox[0],$bbox[3],$bbox[4],$bbox[3], - $bbox[4],$bbox[7],$bbox[0],$bbox[7]); - } - elseif( $aAngle <= -90 ) { // <= -1 - $bbox = array($bbox[2],$bbox[5],$bbox[6],$bbox[5], - $bbox[6],$bbox[1],$bbox[2],$bbox[1]); - } - else { - $bbox = array($bbox[0],$bbox[3],$bbox[4],$bbox[3], - $bbox[4],$bbox[7],$bbox[0],$bbox[7]); - } - } - return $bbox; - } - - function GetBBoxHeight($aTxt,$aAngle=0) { - $box = $this->GetBBoxTTF($aTxt,$aAngle); - return abs($box[7]-$box[1]); - } - - function GetBBoxWidth($aTxt,$aAngle=0) { - $box = $this->GetBBoxTTF($aTxt,$aAngle); - return $box[2]-$box[0]+1; - } - - - function _StrokeTTF($x,$y,$txt,$dir,$paragraph_align,&$aBoundingBox,$debug=false) { - - // Setup default inter line margin for paragraphs to be - // 3% of the font height. - $ConstLineSpacing = 0.03 ; - - // Remember the anchor point before adjustment - if( $debug ) { - $ox=$x; - $oy=$y; - } - - if( !preg_match('/\n/',$txt) || ($dir>0 && preg_match('/\n/',$txt)) ) { - // Format a single line - - $txt = $this->AddTxtCR($txt); - $bbox=$this->GetBBoxTTF($txt,$dir); - $width = $this->GetBBoxWidth($txt,$dir); - $height = $this->GetBBoxHeight($txt,$dir); - - // The special alignment "basepoint" is mostly used internally - // in the library. This will put the anchor position at the left - // basepoint of the tetx. This is the default anchor point for - // TTF text. - - if( $this->text_valign != 'basepoint' ) { - // Align x,y ot lower left corner of bbox - - - if( $this->text_halign=='right' ) { - $x -= $width; - $x -= $bbox[0]; - } - elseif( $this->text_halign=='center' ) { - $x -= $width/2; - $x -= $bbox[0]; - } - elseif( $this->text_halign=='baseline' ) { - // This is only support for text at 90 degree !! - // Do nothing the text is drawn at baseline by default - } - - if( $this->text_valign=='top' ) { - $y -= $bbox[1]; // Adjust to bottom of text - $y += $height; - } - elseif( $this->text_valign=='center' ) { - $y -= $bbox[1]; // Adjust to bottom of text - $y += $height/2; - } - elseif( $this->text_valign=='baseline' ) { - // This is only support for text at 0 degree !! - // Do nothing the text is drawn at baseline by default - } - } - ImageTTFText ($this->img, $this->font_size, $dir, $x, $y, - $this->current_color,$this->font_file,$txt); - - // Calculate and return the co-ordinates for the bounding box - $box = $this->imagettfbbox_fixed($this->font_size,$dir,$this->font_file,$txt); - $p1 = array(); - - for($i=0; $i < 4; ++$i) { - $p1[] = round($box[$i*2]+$x); - $p1[] = round($box[$i*2+1]+$y); - } - $aBoundingBox = $p1; - - // Debugging code to highlight the bonding box and bounding rectangle - // For text at 0 degrees the bounding box and bounding rectangle are the - // same - if( $debug ) { - // Draw the bounding rectangle and the bounding box - - $p = array(); - $p1 = array(); - - for($i=0; $i < 4; ++$i) { - $p[] = $bbox[$i*2]+$x ; - $p[] = $bbox[$i*2+1]+$y; - $p1[] = $box[$i*2]+$x ; - $p1[] = $box[$i*2+1]+$y ; - } - - // Draw bounding box - $this->PushColor('green'); - $this->Polygon($p1,true); - $this->PopColor(); - - // Draw bounding rectangle - $this->PushColor('darkgreen'); - $this->Polygon($p,true); - $this->PopColor(); - - // Draw a cross at the anchor point - $this->PushColor('red'); - $this->Line($ox-15,$oy,$ox+15,$oy); - $this->Line($ox,$oy-15,$ox,$oy+15); - $this->PopColor(); - } - } - else { - // Format a text paragraph - $fh=$this->GetFontHeight(); - - // Line margin is 25% of font height - $linemargin=round($fh*$ConstLineSpacing); - $fh += $linemargin; - $w=$this->GetTextWidth($txt); - - $y -= $linemargin/2; - $tmp = preg_split('/\n/',$txt); - $nl = count($tmp); - $h = $nl * $fh; - - if( $this->text_halign=='right') { - $x -= $dir==0 ? $w : $h; - } - elseif( $this->text_halign=='center' ) { - $x -= $dir==0 ? $w/2 : $h/2; - } - - if( $this->text_valign=='top' ) { - $y += $dir==0 ? $h : $w; - } - elseif( $this->text_valign=='center' ) { - $y += $dir==0 ? $h/2 : $w/2; - } - - // Here comes a tricky bit. - // Since we have to give the position for the string at the - // baseline this means thaht text will move slightly up - // and down depending on any of it's character descend below - // the baseline, for example a 'g'. To adjust the Y-position - // we therefore adjust the text with the baseline Y-offset - // as used for the current font and size. This will keep the - // baseline at a fixed positoned disregarding the actual - // characters in the string. - $standardbox = $this->GetTTFBBox('Gg',$dir); - $yadj = $standardbox[1]; - $xadj = $standardbox[0]; - $aBoundingBox = array(); - for($i=0; $i < $nl; ++$i) { - $wl = $this->GetTextWidth($tmp[$i]); - $bbox = $this->GetTTFBBox($tmp[$i],$dir); - if( $paragraph_align=='left' ) { - $xl = $x; - } - elseif( $paragraph_align=='right' ) { - $xl = $x + ($w-$wl); - } - else { - // Center - $xl = $x + $w/2 - $wl/2 ; - } - - // In theory we should adjust with full pre-lead to get the lines - // lined up but this doesn't look good so therfore we only adjust with - // half th pre-lead - $xl -= $bbox[0]/2; - $yl = $y - $yadj; - //$xl = $xl- $xadj; - ImageTTFText($this->img, $this->font_size, $dir, $xl, $yl-($h-$fh)+$fh*$i, - $this->current_color,$this->font_file,$tmp[$i]); - - // echo "xl=$xl,".$tmp[$i]."
        "; - if( $debug ) { - // Draw the bounding rectangle around each line - $box=@ImageTTFBBox($this->font_size,$dir,$this->font_file,$tmp[$i]); - $p = array(); - for($j=0; $j < 4; ++$j) { - $p[] = $bbox[$j*2]+$xl; - $p[] = $bbox[$j*2+1]+$yl-($h-$fh)+$fh*$i; - } - - // Draw bounding rectangle - $this->PushColor('darkgreen'); - $this->Polygon($p,true); - $this->PopColor(); - } - } - - // Get the bounding box - $bbox = $this->GetBBoxTTF($txt,$dir); - for($j=0; $j < 4; ++$j) { - $bbox[$j*2]+= round($x); - $bbox[$j*2+1]+= round($y - ($h-$fh) - $yadj); - } - $aBoundingBox = $bbox; - - if( $debug ) { - // Draw a cross at the anchor point - $this->PushColor('red'); - $this->Line($ox-25,$oy,$ox+25,$oy); - $this->Line($ox,$oy-25,$ox,$oy+25); - $this->PopColor(); - } - - } - } - - function StrokeText($x,$y,$txt,$dir=0,$paragraph_align="left",$debug=false) { - - $x = round($x); - $y = round($y); - - // Do special language encoding - $txt = $this->langconv->Convert($txt,$this->font_family); - - if( !is_numeric($dir) ) { - JpGraphError::RaiseL(25094);//(" Direction for text most be given as an angle between 0 and 90."); - } - - if( $this->font_family >= FF_FONT0 && $this->font_family <= FF_FONT2+1) { - $this->_StrokeBuiltinFont($x,$y,$txt,$dir,$paragraph_align,$boundingbox,$debug); - } - elseif( $this->font_family >= _FIRST_FONT && $this->font_family <= _LAST_FONT) { - $this->_StrokeTTF($x,$y,$txt,$dir,$paragraph_align,$boundingbox,$debug); - } - else { - JpGraphError::RaiseL(25095);//(" Unknown font font family specification. "); - } - return $boundingbox; - } - - function SetMargin($lm,$rm,$tm,$bm) { - $this->left_margin=$lm; - $this->right_margin=$rm; - $this->top_margin=$tm; - $this->bottom_margin=$bm; - $this->plotwidth=$this->width - $this->left_margin-$this->right_margin ; - $this->plotheight=$this->height - $this->top_margin-$this->bottom_margin ; - if( $this->width > 0 && $this->height > 0 ) { - if( $this->plotwidth < 0 || $this->plotheight < 0 ) { - JpGraphError::RaiseL(25130, $this->plotwidth, $this->plotheight); - //JpGraphError::raise("To small plot area. ($lm,$rm,$tm,$bm : $this->plotwidth x $this->plotheight). With the given image size and margins there is to little space left for the plot. Increase the plot size or reduce the margins."); - } - } - } - - function SetTransparent($color) { - imagecolortransparent ($this->img,$this->rgb->allocate($color)); - } - - function SetColor($color,$aAlpha=0) { - $this->current_color_name = $color; - $this->current_color=$this->rgb->allocate($color,$aAlpha); - if( $this->current_color == -1 ) { - $tc=imagecolorstotal($this->img); - JpGraphError::RaiseL(25096); - //("Can't allocate any more colors. Image has already allocated maximum of $tc colors. This might happen if you have anti-aliasing turned on together with a background image or perhaps gradient fill since this requires many, many colors. Try to turn off anti-aliasing. If there is still a problem try downgrading the quality of the background image to use a smaller pallete to leave some entries for your graphs. You should try to limit the number of colors in your background image to 64. If there is still problem set the constant DEFINE(\"USE_APPROX_COLORS\",true); in jpgraph.php This will use approximative colors when the palette is full. Unfortunately there is not much JpGraph can do about this since the palette size is a limitation of current graphic format and what the underlying GD library suppports."); - } - return $this->current_color; - } - - function PushColor($color) { - if( $color != "" ) { - $this->colorstack[$this->colorstackidx]=$this->current_color_name; - $this->colorstack[$this->colorstackidx+1]=$this->current_color; - $this->colorstackidx+=2; - $this->SetColor($color); - } - else { - JpGraphError::RaiseL(25097);//("Color specified as empty string in PushColor()."); - } - } - - function PopColor() { - if( $this->colorstackidx < 1 ) { - JpGraphError::RaiseL(25098);//(" Negative Color stack index. Unmatched call to PopColor()"); - } - $this->current_color=$this->colorstack[--$this->colorstackidx]; - $this->current_color_name=$this->colorstack[--$this->colorstackidx]; - } - - - function SetLineWeight($weight) { - $old = $this->line_weight; - imagesetthickness($this->img,$weight); - $this->line_weight = $weight; - return $old; - } - - function SetStartPoint($x,$y) { - $this->lastx=round($x); - $this->lasty=round($y); - } - - function Arc($cx,$cy,$w,$h,$s,$e) { - // GD Arc doesn't like negative angles - while( $s < 0) $s += 360; - while( $e < 0) $e += 360; - imagearc($this->img,round($cx),round($cy),round($w),round($h),$s,$e,$this->current_color); - } - - function FilledArc($xc,$yc,$w,$h,$s,$e,$style='') { - $s = round($s); - $e = round($e); - while( $s < 0 ) $s += 360; - while( $e < 0 ) $e += 360; - if( $style=='' ) - $style=IMG_ARC_PIE; - if( abs($s-$e) > 0 ) { - imagefilledarc($this->img,round($xc),round($yc),round($w),round($h),$s,$e,$this->current_color,$style); - } - } - - function FilledCakeSlice($cx,$cy,$w,$h,$s,$e) { - $this->CakeSlice($cx,$cy,$w,$h,$s,$e,$this->current_color_name); - } - - function CakeSlice($xc,$yc,$w,$h,$s,$e,$fillcolor="",$arccolor="") { - $s = round($s); $e = round($e); - $w = round($w); $h = round($h); - $xc = round($xc); $yc = round($yc); - if( $s == $e ) { - // A full circle. We draw this a plain circle - $this->PushColor($fillcolor); - imagefilledellipse($this->img,$xc,$yc,2*$w,2*$h,$this->current_color); - - // If antialiasing is used then we often don't have any color no the surrounding - // arc. So, we need to check for this special case so we don't send an empty - // color to the push function. In this case we use the fill color for the arc as well - if( $arccolor != '' ) { - $this->PopColor(); - $this->PushColor($arccolor); - } - imageellipse($this->img,$xc,$yc,2*$w,2*$h,$this->current_color); - $this->Line($xc,$yc,cos($s*M_PI/180)*$w+$xc,$yc+sin($s*M_PI/180)*$h); - $this->PopColor(); - } - else { - $this->PushColor($fillcolor); - $this->FilledArc($xc,$yc,2*$w,2*$h,$s,$e); - $this->PopColor(); - if( $arccolor != "" ) { - $this->PushColor($arccolor); - // We add 2 pixels to make the Arc() better aligned with - // the filled arc. - imagefilledarc($this->img,$xc,$yc,2*$w,2*$h,$s,$e,$this->current_color,IMG_ARC_NOFILL | IMG_ARC_EDGED ) ; - $this->PopColor(); - } - } - } - - function Ellipse($xc,$yc,$w,$h) { - $this->Arc($xc,$yc,$w,$h,0,360); - } - - function Circle($xc,$yc,$r) { - imageellipse($this->img,round($xc),round($yc),$r*2,$r*2,$this->current_color); - } - - function FilledCircle($xc,$yc,$r) { - imagefilledellipse($this->img,round($xc),round($yc),2*$r,2*$r,$this->current_color); - } - - // Linear Color InterPolation - function lip($f,$t,$p) { - $p = round($p,1); - $r = $f[0] + ($t[0]-$f[0])*$p; - $g = $f[1] + ($t[1]-$f[1])*$p; - $b = $f[2] + ($t[2]-$f[2])*$p; - return array($r,$g,$b); - } - - // Set line style dashed, dotted etc - function SetLineStyle($s) { - if( is_numeric($s) ) { - if( $s<1 || $s>4 ) { - JpGraphError::RaiseL(25101,$s);//(" Illegal numeric argument to SetLineStyle(): ($s)"); - } - } - elseif( is_string($s) ) { - if( $s == "solid" ) $s=1; - elseif( $s == "dotted" ) $s=2; - elseif( $s == "dashed" ) $s=3; - elseif( $s == "longdashed" ) $s=4; - else { - JpGraphError::RaiseL(25102,$s);//(" Illegal string argument to SetLineStyle(): $s"); - } - } - else { - JpGraphError::RaiseL(25103,$s);//(" Illegal argument to SetLineStyle $s"); - } - $old = $this->line_style; - $this->line_style=$s; - return $old; - } - - // Same as Line but take the line_style into account - function StyleLine($x1,$y1,$x2,$y2,$aStyle='') { - if( $this->line_weight <= 0 ) return; - - if( $aStyle === '' ) { - $aStyle = $this->line_style; - } - - // Add error check since dashed line will only work if anti-alias is disabled - // this is a limitation in GD - - if( $aStyle == 1 ) { - // Solid style. We can handle anti-aliasing for this - $this->Line($x1,$y1,$x2,$y2); - } - else { - // Since the GD routines doesn't handle AA for styled line - // we have no option than to turn it off to get any lines at - // all if the weight > 1 - $oldaa = $this->GetAntiAliasing(); - if( $oldaa && $this->line_weight > 1 ) { - $this->SetAntiAliasing(false); - } - - switch( $aStyle ) { - case 2: // Dotted - $this->DashedLine($x1,$y1,$x2,$y2,2,6); - break; - case 3: // Dashed - $this->DashedLine($x1,$y1,$x2,$y2,5,9); - break; - case 4: // Longdashes - $this->DashedLine($x1,$y1,$x2,$y2,9,13); - break; - default: - JpGraphError::RaiseL(25104,$this->line_style);//(" Unknown line style: $this->line_style "); - break; - } - if( $oldaa ) { - $this->SetAntiAliasing(true); - } - } - } - - function DashedLine($x1,$y1,$x2,$y2,$dash_length=1,$dash_space=4) { - - if( $this->line_weight <= 0 ) return; - - // Add error check to make sure anti-alias is not enabled. - // Dashed line does not work with anti-alias enabled. This - // is a limitation in GD. - if( $this->use_anti_aliasing ) { - JpGraphError::RaiseL(25129); // Anti-alias can not be used with dashed lines. Please disable anti-alias or use solid lines. - } - - - $x1 = round($x1); - $x2 = round($x2); - $y1 = round($y1); - $y2 = round($y2); - - $style = array_fill(0,$dash_length,$this->current_color); - $style = array_pad($style,$dash_space,IMG_COLOR_TRANSPARENT); - imagesetstyle($this->img, $style); - imageline($this->img, $x1, $y1, $x2, $y2, IMG_COLOR_STYLED); - $this->lastx = $x2; - $this->lasty = $y2; - } - - function Line($x1,$y1,$x2,$y2) { - - if( $this->line_weight <= 0 ) return; - - $x1 = round($x1); - $x2 = round($x2); - $y1 = round($y1); - $y2 = round($y2); - - imageline($this->img,$x1,$y1,$x2,$y2,$this->current_color); - $this->lastx=$x2; - $this->lasty=$y2; - } - - function Polygon($p,$closed=FALSE,$fast=FALSE) { - - if( $this->line_weight <= 0 ) return; - - $n=count($p); - $oldx = $p[0]; - $oldy = $p[1]; - if( $fast ) { - for( $i=2; $i < $n; $i+=2 ) { - imageline($this->img,$oldx,$oldy,$p[$i],$p[$i+1],$this->current_color); - $oldx = $p[$i]; - $oldy = $p[$i+1]; - } - if( $closed ) { - imageline($this->img,$p[$n*2-2],$p[$n*2-1],$p[0],$p[1],$this->current_color); - } - } - else { - for( $i=2; $i < $n; $i+=2 ) { - $this->StyleLine($oldx,$oldy,$p[$i],$p[$i+1]); - $oldx = $p[$i]; - $oldy = $p[$i+1]; - } - if( $closed ) { - $this->StyleLine($oldx,$oldy,$p[0],$p[1]); - } - } - } - - function FilledPolygon($pts) { - $n=count($pts); - if( $n == 0 ) { - JpGraphError::RaiseL(25105);//('NULL data specified for a filled polygon. Check that your data is not NULL.'); - } - for($i=0; $i < $n; ++$i) { - $pts[$i] = round($pts[$i]); - } - $old = $this->line_weight; - imagesetthickness($this->img,1); - imagefilledpolygon($this->img,$pts,count($pts)/2,$this->current_color); - $this->line_weight = $old; - imagesetthickness($this->img,$old); - } - - function Rectangle($xl,$yu,$xr,$yl) { - $this->Polygon(array($xl,$yu,$xr,$yu,$xr,$yl,$xl,$yl,$xl,$yu)); - } - - function FilledRectangle($xl,$yu,$xr,$yl) { - $this->FilledPolygon(array($xl,$yu,$xr,$yu,$xr,$yl,$xl,$yl)); - } - - function FilledRectangle2($xl,$yu,$xr,$yl,$color1,$color2,$style=1) { - // Fill a rectangle with lines of two colors - if( $style===1 ) { - // Horizontal stripe - if( $yl < $yu ) { - $t = $yl; $yl=$yu; $yu=$t; - } - for( $y=$yu; $y <= $yl; ++$y) { - $this->SetColor($color1); - $this->Line($xl,$y,$xr,$y); - ++$y; - $this->SetColor($color2); - $this->Line($xl,$y,$xr,$y); - } - } - else { - if( $xl < $xl ) { - $t = $xl; $xl=$xr; $xr=$t; - } - for( $x=$xl; $x <= $xr; ++$x) { - $this->SetColor($color1); - $this->Line($x,$yu,$x,$yl); - ++$x; - $this->SetColor($color2); - $this->Line($x,$yu,$x,$yl); - } - } - } - - function ShadowRectangle($xl,$yu,$xr,$yl,$fcolor=false,$shadow_width=4,$shadow_color='darkgray',$useAlpha=true) { - // This is complicated by the fact that we must also handle the case where - // the reactangle has no fill color - $xl = floor($xl); - $yu = floor($yu); - $xr = floor($xr); - $yl = floor($yl); - $this->PushColor($shadow_color); - $shadowAlpha=0; - $this->SetLineWeight(1); - $this->SetLineStyle('solid'); - $basecolor = $this->rgb->Color($shadow_color); - $shadow_color = array($basecolor[0],$basecolor[1],$basecolor[2],); - for( $i=0; $i < $shadow_width; ++$i ) { - $this->SetColor($shadow_color,$shadowAlpha); - $this->Line($xr-$shadow_width+$i, $yu+$shadow_width, - $xr-$shadow_width+$i, $yl-$shadow_width-1+$i); - $this->Line($xl+$shadow_width, $yl-$shadow_width+$i, - $xr-$shadow_width+$i, $yl-$shadow_width+$i); - if( $useAlpha ) $shadowAlpha += 1.0/$shadow_width; - } - - $this->PopColor(); - if( $fcolor==false ) { - $this->Rectangle($xl,$yu,$xr-$shadow_width-1,$yl-$shadow_width-1); - } - else { - $this->PushColor($fcolor); - $this->FilledRectangle($xl,$yu,$xr-$shadow_width-1,$yl-$shadow_width-1); - $this->PopColor(); - $this->Rectangle($xl,$yu,$xr-$shadow_width-1,$yl-$shadow_width-1); - } - } - - function FilledRoundedRectangle($xt,$yt,$xr,$yl,$r=5) { - if( $r==0 ) { - $this->FilledRectangle($xt,$yt,$xr,$yl); - return; - } - - // To avoid overlapping fillings (which will look strange - // when alphablending is enabled) we have no choice but - // to fill the five distinct areas one by one. - - // Center square - $this->FilledRectangle($xt+$r,$yt+$r,$xr-$r,$yl-$r); - // Top band - $this->FilledRectangle($xt+$r,$yt,$xr-$r,$yt+$r); - // Bottom band - $this->FilledRectangle($xt+$r,$yl-$r,$xr-$r,$yl); - // Left band - $this->FilledRectangle($xt,$yt+$r,$xt+$r,$yl-$r); - // Right band - $this->FilledRectangle($xr-$r,$yt+$r,$xr,$yl-$r); - - // Topleft & Topright arc - $this->FilledArc($xt+$r,$yt+$r,$r*2,$r*2,180,270); - $this->FilledArc($xr-$r,$yt+$r,$r*2,$r*2,270,360); - - // Bottomleft & Bottom right arc - $this->FilledArc($xt+$r,$yl-$r,$r*2,$r*2,90,180); - $this->FilledArc($xr-$r,$yl-$r,$r*2,$r*2,0,90); - - } - - function RoundedRectangle($xt,$yt,$xr,$yl,$r=5) { - - if( $r==0 ) { - $this->Rectangle($xt,$yt,$xr,$yl); - return; - } - - // Top & Bottom line - $this->Line($xt+$r,$yt,$xr-$r,$yt); - $this->Line($xt+$r,$yl,$xr-$r,$yl); - - // Left & Right line - $this->Line($xt,$yt+$r,$xt,$yl-$r); - $this->Line($xr,$yt+$r,$xr,$yl-$r); - - // Topleft & Topright arc - $this->Arc($xt+$r,$yt+$r,$r*2,$r*2,180,270); - $this->Arc($xr-$r,$yt+$r,$r*2,$r*2,270,360); - - // Bottomleft & Bottomright arc - $this->Arc($xt+$r,$yl-$r,$r*2,$r*2,90,180); - $this->Arc($xr-$r,$yl-$r,$r*2,$r*2,0,90); - } - - function FilledBevel($x1,$y1,$x2,$y2,$depth=2,$color1='white@0.4',$color2='darkgray@0.4') { - $this->FilledRectangle($x1,$y1,$x2,$y2); - $this->Bevel($x1,$y1,$x2,$y2,$depth,$color1,$color2); - } - - function Bevel($x1,$y1,$x2,$y2,$depth=2,$color1='white@0.4',$color2='black@0.5') { - $this->PushColor($color1); - for( $i=0; $i < $depth; ++$i ) { - $this->Line($x1+$i,$y1+$i,$x1+$i,$y2-$i); - $this->Line($x1+$i,$y1+$i,$x2-$i,$y1+$i); - } - $this->PopColor(); - - $this->PushColor($color2); - for( $i=0; $i < $depth; ++$i ) { - $this->Line($x1+$i,$y2-$i,$x2-$i,$y2-$i); - $this->Line($x2-$i,$y1+$i,$x2-$i,$y2-$i-1); - } - $this->PopColor(); - } - - function StyleLineTo($x,$y) { - $this->StyleLine($this->lastx,$this->lasty,$x,$y); - $this->lastx=$x; - $this->lasty=$y; - } - - function LineTo($x,$y) { - $this->Line($this->lastx,$this->lasty,$x,$y); - $this->lastx=$x; - $this->lasty=$y; - } - - function Point($x,$y) { - imagesetpixel($this->img,round($x),round($y),$this->current_color); - } - - function Fill($x,$y) { - imagefill($this->img,round($x),round($y),$this->current_color); - } - - function FillToBorder($x,$y,$aBordColor) { - $bc = $this->rgb->allocate($aBordColor); - if( $bc == -1 ) { - JpGraphError::RaiseL(25106);//('Image::FillToBorder : Can not allocate more colors'); - } - imagefilltoborder($this->img,round($x),round($y),$bc,$this->current_color); - } - - function SetExpired($aFlg=true) { - $this->expired = $aFlg; - } - - // Generate image header - function Headers() { - - // In case we are running from the command line with the client version of - // PHP we can't send any headers. - $sapi = php_sapi_name(); - if( $sapi == 'cli' ) return; - - // These parameters are set by headers_sent() but they might cause - // an undefined variable error unless they are initilized - $file=''; - $lineno=''; - if( headers_sent($file,$lineno) ) { - $file=basename($file); - $t = new ErrMsgText(); - $msg = $t->Get(10,$file,$lineno); - die($msg); - } - - if ($this->expired) { - header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); - header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT"); - header("Cache-Control: no-cache, must-revalidate"); - header("Pragma: no-cache"); - } - header("Content-type: image/$this->img_format"); - } - - // Adjust image quality for formats that allow this - function SetQuality($q) { - $this->quality = $q; - } - - // Stream image to browser or to file - function Stream($aFile="") { - $func="image".$this->img_format; - if( $this->img_format=="jpeg" && $this->quality != null ) { - $res = @$func($this->img,$aFile,$this->quality); - } - else { - if( $aFile != "" ) { - $res = @$func($this->img,$aFile); - if( !$res ) { - JpGraphError::RaiseL(25107,$aFile);//("Can't write to file '$aFile'. Check that the process running PHP has enough permission."); - } - } - else { - $res = @$func($this->img); - if( !$res ) { - JpGraphError::RaiseL(25108);//("Can't stream image. This is most likely due to a faulty PHP/GD setup. Try to recompile PHP and use the built-in GD library that comes with PHP."); - } - - } - } - } - - // Clear resources used by image (this is normally not used since all resources are/should be - // returned when the script terminates - function Destroy() { - imagedestroy($this->img); - } - - // Specify image format. Note depending on your installation - // of PHP not all formats may be supported. - function SetImgFormat($aFormat,$aQuality=75) { - $this->quality = $aQuality; - $aFormat = strtolower($aFormat); - $tst = true; - $supported = imagetypes(); - if( $aFormat=="auto" ) { - if( $supported & IMG_PNG ) $this->img_format="png"; - elseif( $supported & IMG_JPG ) $this->img_format="jpeg"; - elseif( $supported & IMG_GIF ) $this->img_format="gif"; - elseif( $supported & IMG_WBMP ) $this->img_format="wbmp"; - elseif( $supported & IMG_XPM ) $this->img_format="xpm"; - else { - JpGraphError::RaiseL(25109);//("Your PHP (and GD-lib) installation does not appear to support any known graphic formats. You need to first make sure GD is compiled as a module to PHP. If you also want to use JPEG images you must get the JPEG library. Please see the PHP docs for details."); - } - return true; - } - else { - if( $aFormat=="jpeg" || $aFormat=="png" || $aFormat=="gif" ) { - if( $aFormat=="jpeg" && !($supported & IMG_JPG) ) $tst=false; - elseif( $aFormat=="png" && !($supported & IMG_PNG) ) $tst=false; - elseif( $aFormat=="gif" && !($supported & IMG_GIF) ) $tst=false; - elseif( $aFormat=="wbmp" && !($supported & IMG_WBMP) ) $tst=false; - elseif( $aFormat=="xpm" && !($supported & IMG_XPM) ) $tst=false; - else { - $this->img_format=$aFormat; - return true; - } - } - else { - $tst=false; - } - if( !$tst ) { - JpGraphError::RaiseL(25110,$aFormat);//(" Your PHP installation does not support the chosen graphic format: $aFormat"); - } - } - } -} // CLASS - -//=================================================== -// CLASS RotImage -// Description: Exactly as Image but draws the image at -// a specified angle around a specified rotation point. -//=================================================== -class RotImage extends Image { - public $a=0; - public $dx=0,$dy=0,$transx=0,$transy=0; - private $m=array(); - - function __construct($aWidth,$aHeight,$a=0,$aFormat=DEFAULT_GFORMAT,$aSetAutoMargin=true) { - parent::__construct($aWidth,$aHeight,$aFormat,$aSetAutoMargin); - $this->dx=$this->left_margin+$this->plotwidth/2; - $this->dy=$this->top_margin+$this->plotheight/2; - $this->SetAngle($a); - } - - function SetCenter($dx,$dy) { - $old_dx = $this->dx; - $old_dy = $this->dy; - $this->dx=$dx; - $this->dy=$dy; - $this->SetAngle($this->a); - return array($old_dx,$old_dy); - } - - function SetTranslation($dx,$dy) { - $old = array($this->transx,$this->transy); - $this->transx = $dx; - $this->transy = $dy; - return $old; - } - - function UpdateRotMatrice() { - $a = $this->a; - $a *= M_PI/180; - $sa=sin($a); $ca=cos($a); - // Create the rotation matrix - $this->m[0][0] = $ca; - $this->m[0][1] = -$sa; - $this->m[0][2] = $this->dx*(1-$ca) + $sa*$this->dy ; - $this->m[1][0] = $sa; - $this->m[1][1] = $ca; - $this->m[1][2] = $this->dy*(1-$ca) - $sa*$this->dx ; - } - - function SetAngle($a) { - $tmp = $this->a; - $this->a = $a; - $this->UpdateRotMatrice(); - return $tmp; - } - - function Circle($xc,$yc,$r) { - list($xc,$yc) = $this->Rotate($xc,$yc); - parent::Circle($xc,$yc,$r); - } - - function FilledCircle($xc,$yc,$r) { - list($xc,$yc) = $this->Rotate($xc,$yc); - parent::FilledCircle($xc,$yc,$r); - } - - - function Arc($xc,$yc,$w,$h,$s,$e) { - list($xc,$yc) = $this->Rotate($xc,$yc); - $s += $this->a; - $e += $this->a; - parent::Arc($xc,$yc,$w,$h,$s,$e); - } - - function FilledArc($xc,$yc,$w,$h,$s,$e,$style='') { - list($xc,$yc) = $this->Rotate($xc,$yc); - $s += $this->a; - $e += $this->a; - parent::FilledArc($xc,$yc,$w,$h,$s,$e); - } - - function SetMargin($lm,$rm,$tm,$bm) { - parent::SetMargin($lm,$rm,$tm,$bm); - $this->dx=$this->left_margin+$this->plotwidth/2; - $this->dy=$this->top_margin+$this->plotheight/2; - $this->UpdateRotMatrice(); - } - - function Rotate($x,$y) { - // Optimization. Ignore rotation if Angle==0 || Angle==360 - if( $this->a == 0 || $this->a == 360 ) { - return array($x + $this->transx, $y + $this->transy ); - } - else { - $x1=round($this->m[0][0]*$x + $this->m[0][1]*$y,1) + $this->m[0][2] + $this->transx; - $y1=round($this->m[1][0]*$x + $this->m[1][1]*$y,1) + $this->m[1][2] + $this->transy; - return array($x1,$y1); - } - } - - function CopyMerge($fromImg,$toX,$toY,$fromX,$fromY,$toWidth,$toHeight,$fromWidth=-1,$fromHeight=-1,$aMix=100) { - list($toX,$toY) = $this->Rotate($toX,$toY); - parent::CopyMerge($fromImg,$toX,$toY,$fromX,$fromY,$toWidth,$toHeight,$fromWidth,$fromHeight,$aMix); - - } - - function ArrRotate($pnts) { - $n = count($pnts)-1; - for($i=0; $i < $n; $i+=2) { - list ($x,$y) = $this->Rotate($pnts[$i],$pnts[$i+1]); - $pnts[$i] = $x; $pnts[$i+1] = $y; - } - return $pnts; - } - - function DashedLine($x1,$y1,$x2,$y2,$dash_length=1,$dash_space=4) { - list($x1,$y1) = $this->Rotate($x1,$y1); - list($x2,$y2) = $this->Rotate($x2,$y2); - parent::DashedLine($x1,$y1,$x2,$y2,$dash_length,$dash_space); - } - - function Line($x1,$y1,$x2,$y2) { - list($x1,$y1) = $this->Rotate($x1,$y1); - list($x2,$y2) = $this->Rotate($x2,$y2); - parent::Line($x1,$y1,$x2,$y2); - } - - function Rectangle($x1,$y1,$x2,$y2) { - // Rectangle uses Line() so it will be rotated through that call - parent::Rectangle($x1,$y1,$x2,$y2); - } - - function FilledRectangle($x1,$y1,$x2,$y2) { - if( $y1==$y2 || $x1==$x2 ) - $this->Line($x1,$y1,$x2,$y2); - else - $this->FilledPolygon(array($x1,$y1,$x2,$y1,$x2,$y2,$x1,$y2)); - } - - function Polygon($pnts,$closed=FALSE,$fast=FALSE) { - // Polygon uses Line() so it will be rotated through that call unless - // fast drawing routines are used in which case a rotate is needed - if( $fast ) { - parent::Polygon($this->ArrRotate($pnts)); - } - else { - parent::Polygon($pnts,$closed,$fast); - } - } - - function FilledPolygon($pnts) { - parent::FilledPolygon($this->ArrRotate($pnts)); - } - - function Point($x,$y) { - list($xp,$yp) = $this->Rotate($x,$y); - parent::Point($xp,$yp); - } - - function StrokeText($x,$y,$txt,$dir=0,$paragraph_align="left",$debug=false) { - list($xp,$yp) = $this->Rotate($x,$y); - return parent::StrokeText($xp,$yp,$txt,$dir,$paragraph_align,$debug); - } -} - -//======================================================================= -// CLASS ImgStreamCache -// Description: Handle caching of graphs to files. All image output goes -// through this class -//======================================================================= -class ImgStreamCache { - private $cache_dir, $timeout=0; // Infinite timeout - //--------------- - // CONSTRUCTOR - function __construct($aCacheDir=CACHE_DIR) { - $this->cache_dir = $aCacheDir; - } - - //--------------- - // PUBLIC METHODS - - // Specify a timeout (in minutes) for the file. If the file is older then the - // timeout value it will be overwritten with a newer version. - // If timeout is set to 0 this is the same as infinite large timeout and if - // timeout is set to -1 this is the same as infinite small timeout - function SetTimeout($aTimeout) { - $this->timeout=$aTimeout; - } - - // Output image to browser and also write it to the cache - function PutAndStream($aImage,$aCacheFileName,$aInline,$aStrokeFileName) { - - // Check if we should always stroke the image to a file - if( _FORCE_IMGTOFILE ) { - $aStrokeFileName = _FORCE_IMGDIR.GenImgName(); - } - - if( $aStrokeFileName != '' ) { - - if( $aStrokeFileName == 'auto' ) { - $aStrokeFileName = GenImgName(); - } - - if( file_exists($aStrokeFileName) ) { - - // Wait for lock (to make sure no readers are trying to access the image) - $fd = fopen($aStrokeFileName,'w'); - $lock = flock($fd, LOCK_EX); - - // Since the image write routines only accepts a filename which must not - // exist we need to delete the old file first - if( !@unlink($aStrokeFileName) ) { - $lock = flock($fd, LOCK_UN); - JpGraphError::RaiseL(25111,$aStrokeFileName); - //(" Can't delete cached image $aStrokeFileName. Permission problem?"); - } - $aImage->Stream($aStrokeFileName); - $lock = flock($fd, LOCK_UN); - fclose($fd); - - } - else { - $aImage->Stream($aStrokeFileName); - } - - return; - } - - if( $aCacheFileName != '' && USE_CACHE) { - - $aCacheFileName = $this->cache_dir . $aCacheFileName; - if( file_exists($aCacheFileName) ) { - if( !$aInline ) { - // If we are generating image off-line (just writing to the cache) - // and the file exists and is still valid (no timeout) - // then do nothing, just return. - $diff=time()-filemtime($aCacheFileName); - if( $diff < 0 ) { - JpGraphError::RaiseL(25112,$aCacheFileName); - //(" Cached imagefile ($aCacheFileName) has file date in the future!!"); - } - if( $this->timeout>0 && ($diff <= $this->timeout*60) ) return; - } - - // Wait for lock (to make sure no readers are trying to access the image) - $fd = fopen($aCacheFileName,'w'); - $lock = flock($fd, LOCK_EX); - - if( !@unlink($aCacheFileName) ) { - $lock = flock($fd, LOCK_UN); - JpGraphError::RaiseL(25113,$aStrokeFileName); - //(" Can't delete cached image $aStrokeFileName. Permission problem?"); - } - $aImage->Stream($aCacheFileName); - $lock = flock($fd, LOCK_UN); - fclose($fd); - - } - else { - $this->MakeDirs(dirname($aCacheFileName)); - if( !is_writeable(dirname($aCacheFileName)) ) { - JpGraphError::RaiseL(25114,$aCacheFileName); - //('PHP has not enough permissions to write to the cache file '.$aCacheFileName.'. Please make sure that the user running PHP has write permission for this file if you wan to use the cache system with JpGraph.'); - } - $aImage->Stream($aCacheFileName); - } - - $res=true; - // Set group to specified - if( CACHE_FILE_GROUP != '' ) { - $res = @chgrp($aCacheFileName,CACHE_FILE_GROUP); - } - if( CACHE_FILE_MOD != '' ) { - $res = @chmod($aCacheFileName,CACHE_FILE_MOD); - } - if( !$res ) { - JpGraphError::RaiseL(25115,$aStrokeFileName); - //(" Can't set permission for cached image $aStrokeFileName. Permission problem?"); - } - - $aImage->Destroy(); - if( $aInline ) { - if ($fh = @fopen($aCacheFileName, "rb") ) { - $aImage->Headers(); - fpassthru($fh); - return; - } - else { - JpGraphError::RaiseL(25116,$aFile);//(" Cant open file from cache [$aFile]"); - } - } - } - elseif( $aInline ) { - $aImage->Headers(); - $aImage->Stream(); - return; - } - } - - function IsValid($aCacheFileName) { - $aCacheFileName = $this->cache_dir.$aCacheFileName; - if ( USE_CACHE && file_exists($aCacheFileName) ) { - $diff=time()-filemtime($aCacheFileName); - if( $this->timeout>0 && ($diff > $this->timeout*60) ) { - return false; - } - else { - return true; - } - } - else { - return false; - } - } - - function StreamImgFile($aImage,$aCacheFileName) { - $aCacheFileName = $this->cache_dir.$aCacheFileName; - if ( $fh = @fopen($aCacheFileName, 'rb') ) { - $lock = flock($fh, LOCK_SH); - $aImage->Headers(); - fpassthru($fh); - $lock = flock($fh, LOCK_UN); - fclose($fh); - return true; - } - else { - JpGraphError::RaiseL(25117,$aCacheFileName);//(" Can't open cached image \"$aCacheFileName\" for reading."); - } - } - - // Check if a given image is in cache and in that case - // pass it directly on to web browser. Return false if the - // image file doesn't exist or exists but is to old - function GetAndStream($aImage,$aCacheFileName) { - if( $this->Isvalid($aCacheFileName) ) { - $this->StreamImgFile($aImage,$aCacheFileName); - } - else { - return false; - } - } - - //--------------- - // PRIVATE METHODS - // Create all necessary directories in a path - function MakeDirs($aFile) { - $dirs = array(); - // In order to better work when open_basedir is enabled - // we do not create directories in the root path - while ( $aFile != '/' && !(file_exists($aFile)) ) { - $dirs[] = $aFile.'/'; - $aFile = dirname($aFile); - } - for ($i = sizeof($dirs)-1; $i>=0; $i--) { - if(! @mkdir($dirs[$i],0777) ) { - JpGraphError::RaiseL(25118,$aFile);//(" Can't create directory $aFile. Make sure PHP has write permission to this directory."); - } - // We also specify mode here after we have changed group. - // This is necessary if Apache user doesn't belong the - // default group and hence can't specify group permission - // in the previous mkdir() call - if( CACHE_FILE_GROUP != "" ) { - $res=true; - $res =@chgrp($dirs[$i],CACHE_FILE_GROUP); - $res = @chmod($dirs[$i],0777); - if( !$res ) { - JpGraphError::RaiseL(25119,$aFile);//(" Can't set permissions for $aFile. Permission problems?"); - } - } - } - return true; - } -} // CLASS Cache - -?> diff --git a/html/lib/jpgraph/imgdata_balls.inc.php b/html/lib/jpgraph/imgdata_balls.inc.php deleted file mode 100644 index 651c51a67f..0000000000 --- a/html/lib/jpgraph/imgdata_balls.inc.php +++ /dev/null @@ -1,1085 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -//======================================================================= -// File: IMGDATA_ROUNDBALLS.INC -// Description: Base64 encoded images for small round markers -// Created: 2003-03-20 -// Ver: $Id: imgdata_balls.inc.php 1106 2009-02-22 20:16:35Z ljp $ -// -// Copyright (c) Aditus Consulting. All rights reserved. -//======================================================================== - -class ImgData_Balls extends ImgData { - protected $name = 'Round Balls'; - protected $an = array(MARK_IMG_LBALL => 'imgdata_large', - MARK_IMG_MBALL => 'imgdata_small', - MARK_IMG_SBALL => 'imgdata_xsmall', - MARK_IMG_BALL => 'imgdata_xsmall'); - protected $colors,$index,$maxidx; - private $colors_1 = array('blue','lightblue','brown','darkgreen', - 'green','purple','red','gray','yellow','silver','gray'); - private $index_1 = array('blue'=>9,'lightblue'=>1,'brown'=>6,'darkgreen'=>7, - 'green'=>8,'purple'=>4,'red'=>0,'gray'=>5,'silver'=>3,'yellow'=>2); - private $maxidx_1 = 9 ; - - private $colors_2 = array('blue','bluegreen','brown','cyan', - 'darkgray','greengray','gray','green', - 'greenblue','lightblue','lightred', - 'purple','red','white','yellow'); - - - private $index_2 = array('blue'=>9,'bluegreen'=>13,'brown'=>8,'cyan'=>12, - 'darkgray'=>5,'greengray'=>6,'gray'=>2,'green'=>10, - 'greenblue'=>3,'lightblue'=>1,'lightred'=>14, - 'purple'=>7,'red'=>0,'white'=>11,'yellow'=>4); - - private $maxidx_2 = 14 ; - - - private $colors_3 = array('bluegreen','cyan','darkgray','greengray', - 'gray','graypurple','green','greenblue','lightblue', - 'lightred','navy','orange','purple','red','yellow'); - - private $index_3 = array('bluegreen'=>1,'cyan'=>11,'darkgray'=>14,'greengray'=>10, - 'gray'=>3,'graypurple'=>4,'green'=>9,'greenblue'=>7, - 'lightblue'=>13,'lightred'=>0,'navy'=>2,'orange'=>12, - 'purple'=>8,'red'=>5,'yellow'=>6); - private $maxidx_3 = 14 ; - - protected $imgdata_large, $imgdata_small, $imgdata_xsmall ; - - - function GetImg($aMark,$aIdx) { - switch( $aMark ) { - case MARK_IMG_SBALL: - case MARK_IMG_BALL: - $this->colors = $this->colors_3; - $this->index = $this->index_3 ; - $this->maxidx = $this->maxidx_3 ; - break; - case MARK_IMG_MBALL: - $this->colors = $this->colors_2; - $this->index = $this->index_2 ; - $this->maxidx = $this->maxidx_2 ; - break; - default: - $this->colors = $this->colors_1; - $this->index = $this->index_1 ; - $this->maxidx = $this->maxidx_1 ; - break; - } - return parent::GetImg($aMark,$aIdx); - } - - function __construct() { - - //========================================================== - // File: bl_red.png - //========================================================== - $this->imgdata_large[0][0]= 1072 ; - $this->imgdata_large[0][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAAByF'. - 'BMVEX/////////xsb/vb3/lIz/hIT/e3v/c3P/c2v/a2v/Y2P/'. - 'UlL/Skr/SkL/Qjn/MTH/MSn/KSn/ISH/IRj/GBj/GBD/EBD/EA'. - 'j/CAj/CAD/AAD3QkL3MTH3KSn3KSH3GBj3EBD3CAj3AAD1zMzv'. - 'QkLvISHvIRjvGBjvEBDvEAjvAADnUlLnSkrnMTnnKSnnIRjnGB'. - 'DnEBDnCAjnAADec3PeSkreISHeGBjeGBDeEAjWhITWa2vWUlLW'. - 'SkrWISnWGBjWEBDWEAjWCAjWAADOnp7Oa2vOGCHOGBjOGBDOEB'. - 'DOCAjOAADJrq7Gt7fGGBjGEBDGCAjGAADEpKS/v7+9QkK9GBC9'. - 'EBC9CAi9AAC1e3u1a2u1Skq1KSm1EBC1CAi1AACtEBCtCBCtCA'. - 'itAACngYGlCAilAACghIScOTmcCAicAACYgYGUGAiUCAiUAAiU'. - 'AACMKSmMEACMAACEa2uEGAiEAAB7GBh7CAB7AABzOTlzGBBzCA'. - 'BzAABrSkprOTlrGBhrAABjOTljAABaQkJaOTlaCABaAABSKSlS'. - 'GBhSAABKKSlKGBhKAABCGBhCCABCAAA5CAA5AAAxCAAxAAApCA'. - 'ApAAAhAAAYAACc9eRyAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgF'. - 'HUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkRFD'. - 'UHLytKAAAB4UlEQVR4nGNgIAK4mGjrmNq6BmFIWMmISUpKSmk5'. - 'B8ZEokj4qoiLiQCBgqald3xaBpKMj6y4sLCQkJCIvIaFV0RaUR'. - 'lCSk5cWEiAn19ASN7QwisuraihHiajKyEixM/NwckjoKrvEACU'. - 'qumpg7pAUlREiJdNmZmLT9/cMzwps7Smc3I2WEpGUkxYkJuFiY'. - 'lTxszePzY1v7Shc2oX2D+K4iLCgjzsrOw8embuYUmZeTVtPVOn'. - 'gqSslYAOF+Ln4ZHWtXMPTcjMrWno7J82rRgoZWOsqaCgrqaqqm'. - 'fn5peQmlsK1DR52vRaoFSIs5GRoYG5ub27n19CYm5pdVPnxKnT'. - 'pjWDpLydnZwcHTz8QxMSEnJLgDL9U6dNnQ6Sio4PDAgICA+PTU'. - 'zNzSkph8hADIxKS46Pj0tKTc3MLSksqWrtmQySAjuDIT8rKy0r'. - 'Kz+vtLSmur6jb9JUIJgGdjxDQUVRUVFpaUVNQ1NrZ9+kKVOmTZ'. - 'k6vR0sldJUAwQNTU2dnX0TgOJTQLrSIYFY2dPW1NbW2TNxwtQp'. - 'U6ZMmjJt2rRGWNB3TO7vnzh5MsgSoB6gy7sREdY7bRrQEDAGOb'. - 'wXOQW0TJsOEpwClmxBTTbZ7UDVIPkp7dkYaYqhuLa5trYYUxwL'. - 'AADzm6uekAAcXAAAAABJRU5ErkJggg==' ; - - //========================================================== - // File: bl_bluegreen.png - //========================================================== - $this->imgdata_large[1][0]= 1368 ; - $this->imgdata_large[1][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAABm'. - 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'. - 'B3RJTUUH0wMMFi8hE9b2uAAABOVJREFUeNq9lk2sJFUVx3+3qv'. - 'tW95t57zFvhiFxmCFRUJRoNCQiJARMhiFx/Igxii5goTG6ZDAu'. - '/EhcSCIrTAgLEiKsJ8ywABNZEMJXEDYCukAmjgjzBkK/j35V1d'. - '333FtV97io97pfzwxfG86qcu/N+Z3zP+fcW/Apmfk4hx57+R/6'. - 'Rqmc9ykhsWjlsUngAA1fXIQ7b73pI/186IGHnn9dH/8frC8v4I'. - 'PiG53uaerR4GmKkv31mB8cyfjd946ZTwR66qVX9OTWIi8UKUv9'. - 'BOrZXpYZvFeiBvzI0fgSUSFKwbVG+Pl1V3HH0VvNR4KeeukV/f'. - 'PmMmdHhst76aXD64AbeVQ9bjNHaiGOC2o3wLrAb2/4LL/84ffn'. - 'fCdzkOdayKpLppBemrBsU5Y1Zdmm9LJdGU6E/t4M24Q26jRDRL'. - 'j3mdc49cSTekFsMzs5XuTsyLDUNSDQ25NwKOly9YIl22MYhJr/'. - 'uoDtBBoT0CxBRGYOAhibIaOCe//2MpfM6KHnX9cXipSlbkKWmS'. - 'nk9iv38J0jixw7vJfrTMYBOvhSoQHJBS09ANELloAGDxW8tfoW'. - 'J+5/UC8CPS0LU7r3SpYarr7M8rmFjMPLXT6/33L4si7Z2GCrQC'. - '+0ctlOaNs9DReV8vSLr85ndPLpZ/WNvHW+01kAVFBOGvJx0wYg'. - 'Sp47RIQ4Emwa8FGJXlDxSCFo5YlVgAo2hwPue/hRndboTV3EW2'. - 'Wp3k6wBp8q56QiWzecW6vwQfnPRkAWhFgILnq08jQ+R2nlUzzN'. - 'uES9Q7Vd+9fba7NmWJW61db2247qACmcjxXr45psYphsFGSLBu'. - 'kIajxqtjNwHkvAjQt0sg3crhPA2+fPz0CuyNFOghsGsr19mnFg'. - 'DGwrRm8UoAtNmQPQtRXDgdC4HImCFEKcCE0oieUWUYq2LtbiGp'. - 'mBQmppfIkjw45DK0QNNkvQ0jMBtPL0UnDRM1rN+cxKwzvOo2NP'. - 'tykR9a1kfpZNDLMG6QDYJqCTBvUe1+uxs+YKyPoGrTwY2HhvC4'. - 'CDWQd5d4xNApNQEEMgjgLdUCLBQ5cprL/trwNwKG2IUmDqDFd5'. - 'sr5BWrlxuSdLDFEFlqAzXGc4zFjupqh6uqYihpxJcEgp026l2w'. - '7wFUv7Z6AvrfRo/n0OYzPwIKE3HUKAJg2otMBiElnsF7wngis9'. - '3ZDjNnLi7huCWUZfueZKTu/M0V3HvmkOFDVxVKDG04ScejSgW5'. - 'V0q5JYFEghuDLHlTmToqDeGOCKIVtrW9hsdmXufEcNLPSXuPHa'. - 'a+bvuh9df5AH/v5PDFmbWQC3Mx+TVvfGVTRB2CodNgT2JBX003'. - 'aANZAYS/BxCv32TV/l2C03G7jgmfjGiT/qmeEmibEYm7XzAO2k'. - 'A+pbgHhBgydqu54YO5eRiLCy7yDvPP6Xqf+5Z+Lu277OYuOpiw'. - 'H15oBmlNOMcmK5RbP+PrEscGU+DSAxdg4CICIkxnLP8aNz63Og'. - 'H3/rdvOb795GVhuaYo0oBc3GGrEsUPVTwO6a7LYd+X51x3Hu/t'. - 'lP5tS65FN+6okn9U+n/sqb596dTvhOF+02myXTmkQNrOw7yD3H'. - 'j14E+UDQjp24/0E9/eKrbA4HH3aMK1b2ccvXvswjv//1J/s5ud'. - 'Due/hRPfP+OmfOrk7vrn7a48ihA3zh8CH+8Iuffiw/n4r9H1ZZ'. - '0zz7G56hAAAAAElFTkSuQmCC' ; - - //========================================================== - // File: bl_yellow.png - //========================================================== - $this->imgdata_large[2][0]= 1101 ; - $this->imgdata_large[2][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAAB2l'. - 'BMVEX//////////+///+f//9b//8b//73//7X//63//6X//5T/'. - '/4z//4T//3P//2v//1r//0r//0L//zH//yn//yH//xj//xD//w'. - 'j//wD/90L/9zn/9zH/9xj/9xD/9wj/9wD39yn37zn37zH37yH3'. - '7xD37wj37wDv70Lv50rv50Lv5znv5yHv5xjv5wjv5wDn51Ln5x'. - 'Dn3jHn3iHn3hjn3hDn3gje3oze3nPe3lLe1oze1nPe1lLe1ine'. - '1iHe1hje1hDe1gje1gDW1qXW1mvWzqXWzkLWzhjWzhDWzgjWzg'. - 'DOzrXOzq3OzpzOzgDOxkrOxinOxhjOxhDOxgjOxgDGxqXGxnvG'. - 'xmvGvRjGvRDGvQjGvQDFxbnAvr6/v7+9vaW9vZS9vQi9vQC9tR'. - 'C9tQi9tQC7u7W1tZS1tXu1tTG1tQi1rRC1rQi1rQCtrYytrSGt'. - 'rQitrQCtpYStpSGtpQitpQClpYSlpXulpQClnBClnAilnACcnG'. - 'ucnAicnACclAiclACUlFqUlCmUlAiUlACUjFKUjAiUjACMjFKM'. - 'jEqMjACMhACEhACEewB7ezF7exB7ewB7cwBzcylzcwBzaxBzaw'. - 'BraxhrawhrawBrYxBrYwBjYwBjWgBaWgBaUgCXBwRMAAAAAXRS'. - 'TlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAd'. - 'LdfvwAAAAHdElNRQfTAwkRFBKiJZ4hAAAB7ElEQVR4nI3S+1vS'. - 'UBgHcB67WJmIMWAVdDHEDLBC6Go0slj3Ft0m9RRBWQEmFZFDEM'. - 'Qgt0EMFBY7p/+198hj1kM/9N1+++x73rOd6XT/kStnTx4fPzd9'. - 'uwfOjFhomj7smAhwj/6Cm2O0xUwy6g7cCL99uCW3jtBmE7lsdr'. - 'fvejgpzP7uEDFRRoqy2k8xQPnypo2BUMP6waF9Vpf3ciiSzErL'. - 'XTkPc0zDe3bsHDAcc00yoVgqL3UWN2iENpspff+2vn6D0+NnZ9'. - '6lC5K6RuSqBTZn1O/a3rd7v/MSez+WyIpVFX8GuuCA9SjD4N6B'. - 'oRNTfo5PCAVR0fBXoIuOQzab1XjwwNHx00GOj8/nKtV1DdeArk'. - '24R+0ul9PjmbrHPYl+EipyU0OoQSjg8/m83kl/MMhx0fjCkqio'. - 'SMOE7t4JMAzDsizH81AqSdW2hroLPg4/CEF4PhKNx98vlevrbY'. - 'QQXgV6kXwVfjkTiSXmhYVcSa7DIE1DOENe7GM6lUym0l+EXKks'. - 'K20VAeH2M0JvVgrZfL5Qqkiy0lRVaMBd7H7EZUmsiJJcrTdVja'. - 'wGpdbTLj3/3qwrUOjAfGgg4LnNA5tdQx14Hm00QFBm65hfNzAm'. - '+yIFhFtzuj+z2MI/MQn6Uez5pz4Ua41G7VumB/6RX4zMr1TKBr'. - 'SXAAAAAElFTkSuQmCC' ; - - //========================================================== - // File: bl_silver.png - //========================================================== - $this->imgdata_large[3][0]= 1481 ; - $this->imgdata_large[3][1]= - 'iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAMAAAAM7l6QAAADAF'. - 'BMVEUAAADOzs7Gxsa9vb21tbXOxsbOzsbGzsb3///O1ta1vb2c'. - 'paVSWlpKWlpSY2ve5+97hIze7/9aY2vO5/9zhJRaa3tSY3PGzt'. - 'aMlJxrc3tja3NKUlpCSlK1vcZze4RSWmPW5/+Upb3G3v9zhJxS'. - 'Y3t7jKVaa4TO3veltc6ElK1re5Rjc4ycpbV7hJRaY3M5QlLn7/'. - '/Gzt6lrb2EjJzO3v9ja3vG1ve9zu+1xueltdacrc6UpcaMnL1C'. - 'SlqElLV7jK1zhKVre5zW3u/O1ue1vc6ttcaMlKVze4xrc4RSWm'. - 'tKUmPG1v+9zve1xu+tveeltd6crdbe5/+9xt6cpb17hJxaY3s5'. - 'QlrW3vfO1u/Gzue1vdattc6lrcaUnLWMlK2EjKVze5Rrc4xja4'. - 'RSWnNKUmtCSmO9xuecpcZ7hKVaY4TW3v/O1vfGzu+1vd6ttdal'. - 'rc69xu+UnL2MlLWEjK1ze5xrc5R7hK1ja4zO1v+1veettd6lrd'. - 'aMlL3Gzv/39//W1t7Gxs61tb29vcatrbWlpa2cnKWUlJyEhIx7'. - 'e4TW1ufGxta1tcZSUlqcnK3W1u+UlKW9vda1tc57e4ytrcalpb'. - '1ra3vOzu9jY3OUlK29vd6MjKWEhJxaWmtSUmNzc4xKSlpjY3tK'. - 'SmNCQlqUjJzOxs7///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'. - 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'. - 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'. - 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'. - 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'. - 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'. - 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'. - 'AAAAAAAAAAAAAAAAAAAAAAAAD///9fnkWVAAAAAnRSTlP/AOW3'. - 'MEoAAAABYktHRP+lB/LFAAAACXBIWXMAAABFAAAARQBP+QatAA'. - 'AB/klEQVR42mNgxAsYqCdd3+lcb4hLmj8wMMvEu8DCMqYbU9op'. - 'UEFB2MTb26eyysomFl06XEEhUCHLpAKo2z/fujikEUVaXUFBMB'. - 'BouLePuV+VVWGRciIXknSEsImCQd3//xwmPr65llaFcSFJHkjS'. - '3iYmWUDZ//8NfCr989NjNUMSUyTg0jneSiaCINn/gmlVQM12qg'. - 'lJnp5waTMTE5NAkCyHWZW/lXWNfUlikmdYK0zax7siS4EDKJtd'. - 'mQeU1XRwLBdLkRGASucWmGVnZ4dnhZvn5lmm29iVOWpnJqcuko'. - 'JKR1Wm5eTkRKYF5eblp9sU2ZeUJiV7zbfVg0pH56UFBQXNjIqK'. - 'jgkujItX1koKTVmYajsdKu2qETVhwgSXiUDZ2Bn9xqUeoZ5e0t'. - 'LzYYZ3B092ndjtOnmKTmycW1s7SHa+l5dtB8zlccE6RlN0dGbM'. - 'mDVbd5KupNBcL6+F82XgHouLj5vRP2PWLGNdd4+ppnxe8tJec6'. - 'XnNsKkm0uVQ5RDRHQTPTym68nPlZbvkfYCexsa5rpJ2qXa5Umm'. - 'ocmec3m8vHjmSs+fgxyhC5JDQ8WSPT2lvbzm8vDIe0nbtiBLN8'. - '8BigNdu1B6Lsje+fPbUFMLi5TMfGmvHi/puUAv23q2YCTFNqH5'. - 'MvPnSwPh3HasCbm3XUpv+nS5VtrkEkwAANSTpGHdye9PAAAASn'. - 'RFWHRzaWduYXR1cmUANGJkODkyYmE4MWZhNTk4MTIyNDJjNjUx'. - 'NzZhY2UxMDAzOGFhZjdhZWIyNzliNTM2ZGFmZDlkM2RiNDU3Zm'. - 'NlNT9CliMAAAAASUVORK5CYII=' ; - - //========================================================== - // File: bl_purple.png - //========================================================== - $this->imgdata_large[4][0]= 1149 ; - $this->imgdata_large[4][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAACAV'. - 'BMVEX/////////7///5///1v//xv//rf//pf//lP//jP//hP//'. - 'c///a///Wv//Wvf/Uv//Sv//Qv//Qvf/Off/Mf//Kf//If//If'. - 'f/GP//GPf/EP//EPf/CP//CPf/CO//AP//APf3Oe/3Kff3Ke/3'. - 'Ie/3GO/3EO/3AO/vSu/vSufvOefvMefvIefvGOfvEOfvCOfvAO'. - 'fnUufnSufnMd7nId7nGN7nGNbnEN7nCN7nAN7ejN7ejNbec97e'. - 'c9beUtbeQtbeIdbeGNbeENbeCNbeANbWpdbWa9bWQs7WGM7WEM'. - '7WCM7WAM7Otc7Orc7OnM7OSsbOIb3OGMbOEMbOCMbOAM7OAMbG'. - 'pcbGnMbGe8bGa8bGKbXGEL3GCL3GAL3FucXBu73AvsC/v7+9pb'. - '29Ka29GLW9ELW9CLW9AL29ALW5rrm1lLW1e7W1MbW1GKW1EK21'. - 'CLW1CK21AK2tjK2thKWtMaWtIaWtGJytCK2tCKWtAK2tAKWlhK'. - 'Wle6WlEJylCJylAKWlAJyca5ycGJScEJScCJScAJycAJSUWpSU'. - 'UoyUKZSUEIyUCIyUAJSUAIyMUoyMSoyMIYSMEISMCISMAIyMAI'. - 'SECHuEAISEAHt7MXt7EHt7CHt7AHt7AHNzKXNzEGtzAHNzAGtr'. - 'GGtrEGNrCGtrAGtrAGNjCFpjAGNjAFpaAFpaAFIpZn4bAAAAAX'. - 'RSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsS'. - 'AdLdfvwAAAAHdElNRQfTAwkRFB0ymoOwAAAB9UlEQVR4nGNgIA'. - 'K42hhqGtm5+WFIWClKycvLK6gbuARGoEj4aMjLSElISUir6Tt7'. - 'x+aEIWR8leQlwEBSTc/CK7awLguuR0lGQkJMVFRUTFJVzwko1d'. - 'oFk9OQl5IQE+Dh5hVR0TV3CkkvbJgyASJjDZIR5GBl5eRX0TH1'. - 'DEqrbJ2ypBEspSgvJSXKw8bMxMavbOLoGZNf1TZlybw4oIyfLN'. - 'BxotxsLEzsQiaOHkFpBQ2905esrAZK2SpIAaUEuDm5+LTNPAKj'. - 'C+pbps1evrIDKGWnLictKSkuLKyoZQyUya9o7Z2+YMXKGUApew'. - 'M9PTVdXR0TEwf3wOjUirruafOXL18xFyjl72Kpb25qaurg4REU'. - 'EFVe2zJ5zpLlK1aCpbydnZ2dnDwDA6NTopLLeiZNXbB8BcTAyP'. - 'TQ0JDg4KCY1NS83JKmiVOBepYvX9UPlAovzEiPSU/LLyior2vq'. - 'mjZr3vLlIF01IC+XVhUWFlZW1Lc290ycOGfxohVATSsXx4Oksn'. - 'vaWlsb2tq6J0+bM2/RohVA81asbIcEYueU3t7JU6ZNnwNyGkhm'. - '+cp5CRCppJnzZ8+ZM3/JUogECBbBIixr8Yqly8FCy8F6ltUgoj'. - 'lz7sqVK2ByK+cVMSCDxoUrwWDVysXt8WhJKqG4Y8bcuTP6qrGk'. - 'QwwAABiMu7T4HMi4AAAAAElFTkSuQmCC' ; - - //========================================================== - // File: bl_gray.png - //========================================================== - $this->imgdata_large[5][0]= 905 ; - $this->imgdata_large[5][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAABO1'. - 'BMVEX////////3///39/fv7+/e5+fW3t7Wzs7WxsbG1tbGzsbG'. - 'xsbDxMS/v7++wMC+v7+9zsa9xsa9vb29tbW9ra29pa24uLi1xs'. - 'a1vb21tbWxtrattbWmpqalra2cra2cpaWcnJycjIyUpaWUnJyU'. - 'lJSUjIyMnJyMnJSMlJSMlIyMjJSMjIyElJSElIyEjIyEhIR7jI'. - 'x7hIR7hHt7e3t7e3N7e2tzhIRze3tze3Nzc3Nre3trc3Nrc2tr'. - 'a2tjc3Njc2tja3Nja2tjY2NjWlpaa2taY2taY2NaY1paWlpaUl'. - 'JSY2NSY1pSWlpSWlJSUlJSUkpKWlpKWlJKUlpKUlJKUkpKSkpK'. - 'SkJCUlJCUkJCSkpCSkJCQkI5Sko5QkI5Qjk5OUI5OTkxQkIxOT'. - 'kxMTkxMTEpMTEhMTEhKSkYISEpy7AFAAAAAXRSTlMAQObYZgAA'. - 'AAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdE'. - 'lNRQfTAwkRFQfW40uLAAABx0lEQVR4nI3SbXfSMBQA4NV3nce5'. - 'TecAHUywRMHSgFuBCFsQUqwBS1OsWQh0GTj//y8wZUzdwQ/efM'. - 'tzcm/uuXdj4z9ic/PR9k4qk1qDnf0X2/uZzKt8GaRvSubg4LVp'. - 'mkWzCGAT/i3Zsm2XNQHLsm2n2937LaaNnGoJFAEo27B50qN0ay'. - 'Wg26lXsw8fP8nmzcJb2CbsnF5JmmCE8ncN404KvLfsYwd7/MdV'. - 'Pdgl/VbKMIzbuwVgVZw2JlSKJTVJ3609vWUY957lgAUd1KNcqr'. - 'yWnOcOPn8q7d5/8PywAqsOOiVDrn42NFk+HQ7dVuXNYeFdBTpN'. - 'nY5JdZl8xI5Y+HXYaTVqEDp1hAnRohZM03EUjMdhn5wghOoNnD'. - 'wSK7KiiDPqEtz+iD4ctdyAifNYzUnScBSxwPd6GLfRURW7Ay5i'. - 'pS5bmrY8348C5vvUI+TLiIVSJrVA0heK/GDkJxYMRoyfCSmk4s'. - 'uWc3yic/oBo4yF374LGQs5Xw0GyQljI8bYmEsxVUoKxa6HMpAT'. - 'vgyhU2mR8uU1pXmsa8ezqb6U4mwWF/5MeY8uLtQ0nmmQ8UWYvb'. - 'EcJaYWar7QhztrO5Wr4Q4hDbAG/4hfTAF2iCiWrCEAAAAASUVO'. - 'RK5CYII=' ; - - //========================================================== - // File: bl_brown.png - //========================================================== - $this->imgdata_large[6][0]= 1053 ; - $this->imgdata_large[6][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAABoV'. - 'BMVEX////Gzs7GvbXGrZTGpXu9nHO1nHO1nIy9taXGxs7GtaXO'. - 'nHPGlFrGjEq9hEq1hEqte0Klczmcazmce1KtnIzGxsbGvb3OlF'. - 'LOlFq9hFKte0qcc0KUYzGEWimMc1K9ta3OnGvOnGPWnGO9jFq9'. - 'jFKlc0KUazmMYzl7UilzUjGtpZzGxr3GnGPWpWvepXO1hFJ7Wj'. - 'FrSiFjUjG1ra3GnHPvxpT/5733zpythFKUa0KEYzlzUilaOSF7'. - 'Wjm9jErvvYz/99b///f/78bnrYS1hFqle0p7UjFrSiljQiFCMR'. - 'iMhHO9lGvGjFLWnGv/3q3////erXuthEqlc0paQiFKMRhSQin/'. - '1qX/997//++cc0pjSilaQilKORhCKRiclIy9pYzGlGPntYT33q'. - '3vvZSEWjlSOSE5KRB7c2O1lHutczmthFqte1JrWkqtjGtCKRBa'. - 'SjmljGuca0KMYzGMaznOztaclISUYzmEWjFKOSF7a1qEYzFaSi'. - 'GUjISEa0pKOSm9vb2llIxaQhg5IQiEc2tzY0paORilnJy1raVS'. - 'OSljUkJjWkKTpvQWAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHU'. - 'gAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkREiei'. - 'zP2EAAAB9UlEQVR4nGWS/VfSUBjHL5QluhhBxtwyWcCus5Blpm'. - 'wDC4ONaWXCyBi7RMZmpQ2Bypm9W/byV3cHHo/W88s95/s5z/d5'. - 'uwCcCh/4L3zAf+bs0NC588On9QAYGSUuBINk6GI4cmnsBLk8Go'. - '1SFEGMkzRzZeLq5JE8FvDHouw1lqXiCZJOcnCKnx4AcP0GBqmZ'. - 'mRgRT9MMB4Wbs7cGSXNRik3dnp9fiMUzNCNKgpzN9bsaWaQo9s'. - '7dfH7pXiFTZCBU1JK27LmtBO8TDx7mV1eXHqXXyiIUFLWiVzHx'. - 'BxcJIvV4/cn6wkqmWOOwmVE3UQOAp6HxRKL5bGPj+VwhUhalFq'. - '8alm5vAt+LlySZTsebzcKrraIIW4JqZC3N3ga+1+EQTZKZta1M'. - 'pCZCSeDViqVrThsEdsLJZLJYLpZrHVGScrKBvTQNtQHY6XIM02'. - 'E6Ik7odRW1Dzy3N28n3kGuB3tQagm7UMBFXI/sATAs7L5vdbEs'. - '8Lycm923NB0j5wMe6KOsKIIyxcuqauxbrmlqyEWfPmPy5assY1'. - 'U1SvWKZWom9nK/HfQ3+v2HYZSMStayTNN0PYKqg11P1nWsWq7u'. - '4gJeY8g9PLrddNXRdW8Iryv86I3ja/9s26gvukhDdvUQnIjlKr'. - 'IdZCNH+3Xw779qbG63f//ZOzb6C4+ofdbzERrSAAAAAElFTkSu'. - 'QmCC' ; - - //========================================================== - // File: bl_darkgreen.png - //========================================================== - $this->imgdata_large[7][0]= 1113 ; - $this->imgdata_large[7][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAAB2l'. - 'BMVEX////////3///v///n/+/e99bW/+/W99bO786/v7++vr69'. - '/96999a7wb24vbu1/9a1zqW1u7itxrWosq6l772l1qWlxrWlxq'. - '2lva2cxpSU562U3q2UxqWUvaWUpZyM77WM57WMvYyMtZyMrZyM'. - 'pZSMnJSEvZyEtYyErZSElIx7zpR7xpx7xpR7vZR7jIRz1pRzxp'. - 'RzjIRrzpRrzoxrxoxrtYRrrYxrrXtrpYRrhHNjzoxjxoxjxoRj'. - 'vYRjtYRjrXtjpXtjlGNje2tazoxazoRaxoxaxoRavYRatYRatX'. - 'tarXtapXNanHNajFpae2tSzoRSxoRSvXtStXtSrXtSrXNSpXNS'. - 'nHNSnGtSlGtSlGNSjGtSjGNKvXtKtXNKrXNKpWtKnGtKlGNKjG'. - 'NKhGNKhFJKc1pKa1JCrWtCpWtCnGtClGNCjGNCjFpChFpCe1JC'. - 'a1JCY1I5pWs5nGM5lGM5jFo5hFo5e1o5c0o5WkoxjFoxhFoxhF'. - 'Ixe1Ixc1Ixc0oxa0ophFIpe0opc0opa0opa0IpY0IpWkIpWjkp'. - 'UkIpUjkhc0oha0IhY0IhWjkhWjEhUjkhUjEhSjEhSikhQjEhQi'. - 'kYWjkYSjEYSikYQjEYQikQSikQQikQQiEQOSExf8saAAAAAXRS'. - 'TlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAd'. - 'LdfvwAAAAHdElNRQfTAwkRFCaDkWqUAAAB+ElEQVR4nI3S+1vS'. - 'UBgHcGZlPV0ks/vFrmQWFimJjiwiYUJWjFBWFhClyZCy5hLrwA'. - 'x2EIwJC1w7zf2vnU0re+iHvs9++7x7zznvORbLf+TA6ct9fYMX'. - 'jrfAUYefpp+/iM1ykxf/lmuhUZ/PTwXC8dml5Wcd23o5H5Mk6b'. - '5NUU8icXbhS67rNzn9JDnguOEYGQtEEtwC+Crs3RJ76P5A/znr'. - 'vsNX7wQnEiwHCtK7TTkW8rvdZ9uJtvZTLkxpHhSrP66bNEj7/P'. - '3WNoLYeeSWQQCIpe9lQw7RNEU5rDsIYtcJ14Nocg7kRUlBNkxn'. - 'YmGKcp7cv3vPwR7XOJPmc0VYU3Sv0e9NOBAYG7Hbz/cMjTMveZ'. - 'CHkqxuTBv0PhYJB4N3XR6PJ5rMAPMnpGUxDX1IxSeMTEaZp1OZ'. - 'nGAIQiYtsalUIhFlmGTy3sO3AizJCKn6DKYryxzHsWyaneMzr6'. - 'cWxRVZVlFTe4SpE3zm+U/4+whyiwJcWVMQNr3XONirVWAklxcE'. - 'EdbqchPhjhVzGpeqhUKhWBQhLElr9fo3pDaQPrw5xOl1CGG1JE'. - 'k1uYEBIVkrb02+o6RItfq6rBhbw/tuINT96766KhuqYpY3UFPF'. - 'BbY/19yZ1XF1U0UNBa9T7rZsz80K0jWk6bpWGW55UzbvTHZ+3t'. - 'vbAv/IT+K1uCmhIrKJAAAAAElFTkSuQmCC' ; - - //========================================================== - // File: bl_green.png - //========================================================== - $this->imgdata_large[8][0]= 1484 ; - $this->imgdata_large[8][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAABm'. - 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'. - 'B3RJTUUH0wMMFjM4kcoDJQAABVlJREFUeNq9ll2MJFUVx3/11V'. - 'Vd/TE9vU0v4zLDwJIF16jBqLAPhsRXEiDqg0QTJiQSjcSNvCzw'. - 'sBEDDxizhvAAxBgf1oR9QF9NiE9ESFZkQyZB5WtddmdnZ3qqqr'. - 'uqbt367Cofqu3ZZpWVaDzJfbkf53//55z/PVdZXV3l/2H6f7Lp'. - '5VdOV/4Nb+GmHpUeA7AdBNxc3kafNb73jRPK9Xwon8ToxVefqU'. - 'b91wibH5EkCQBCizFihTSviHUHR0hWws9xe3wvJ7/7nPKpgX5y'. - '9oFqt3eOgWniRBoAbUBGGqZUibSYaeoT2B5bnkdaSA6793Cv/S'. - 'QPPbihXBfo5VdOV+8dfgnvwAU62YH5fCZ12sDujFkwyegCqTrB'. - 'iUOKTOJKj8jr88jS8zy6cXwBTP048nuHX0I0nDlIp7RpTG7kM0'. - 'sdyAYsTVukUuWGhlWHMq0ITL92lnUp9R1Obz/GmTNnqn9bDD8/'. - '+0D1oX0O0zQZZDYCsK2j3Gl9jQqDfHiei8GfiKVLlsZkJaBAN1'. - '0i6PgwUbB0GxG5/PrtE/xLRr959Znqw9452oVNI+jiJhnr1pe4'. - 'k29zB1/nFr5Kj7tpt1YYhJ0FJ7nUYbcJQBgahN2MzeCP/OipR6'. - 'prgN6Qr6ELFQFUWoRpNVjlKwxZB8DCpE+PtfEKqV1cUzxpVudu'. - 'GTBHA5Y1g99e+dUio9O/P1Vpq+/WE5GGjDSMoAtAQjrf3C52IP'. - 'QxpY4WK2hpReka9Gfrhqgz0bACRoCWjDh56kQ1z9FeuUUQxVhK'. - 'B92sD1VahM+bAJgcoJhGjP/6Ln8rAgDiRCVRKiIzxMkkodBJ85'. - 'im1IlEHbE4k1xyNveL4YP8HarmGJIOpqyjeQmfNHmTvnqZTWBt'. - 'vIJXpPwlukJSuSTKGK3pEwtJmiX00ZlInTyNscImO6XBITvH1c'. - '8vVt2OucdKvIyeKRTNCivsEMgcpg6taYs30nfq0Gqg6hOSSFJ4'. - 'BSnJPht0IqEjWmOGocEI6F0J94F0qaL6BntTF0MtUfweKQKAPU'. - 'Wwp4OcVnQAmVb0p9DLOzjEhEKnGRmoRc7EzRGlwA6NujAKG4yP'. - '6Sjwc4aVznZ7DK0xXdkDoJf0kGmFBniFBOBGcZSCCSKd0IwN0k'. - 'IS+QZWCGVZex4BnUxya3+Zt9iugQbcRFpIAtuHvAZulPUdLhUJ'. - 'RqegI3WcqaSXddlT3idsWMSRRGkEtNwmyTifAwyBo7LP+11J0e'. - '7tM7pZOYblHkBLcqZ5LcYtw6Wbd4CM3SpE9foYZsIHoqDKCrbz'. - 'mLSQtPwmuhXgtBLs0GBdbXOhFGB7WBKO2F8GXt9/VO97Ya3atF'. - '7nUHnwGjGGQqcPxFEdFqURkEidiZszAERoYIsGju1hq21kWee3'. - 'bw15+8WpsvAy3K1+i3JkkhZyPpxxjjPOsfOYiZ+TFhLPzQnHOU'. - 'tpzGB2dgA4tscIkKIx19Cxg/fPL7vQJu47eXt1VvsDK8pwPueZ'. - 'PuZoQMOqhRoJHSs0kKLBWjvjYinmeQGw1TaX1RFdfZ3LMzYLjA'. - 'C++dkn6AaH2Nobk6cxEzdnuG0TdC8zvdJkN0hqkFkO/jwL0fxa'. - 'so8sBcuFzQ+/+MRC+BeAHnpwQzn++ee5KT9Eshuy46dcKAXm32'. - '0uzPQhS4GttkH2GQID2Wc0Y4LtAbDxhZ/x5A+e/uTG9+jGceXH'. - '9/ySnnIXnUzOxXe1038mW3ZynNmam4yYWkO+f9cv+Oljz16/lV'. - '9tDz/9nerc1hm8ZEScSRK7VvtYl1i1dklsOKyvc+zg/bzw1O8+'. - '/efkajt56kR1ydlEJBc5H46xzbrJ3dY9wrB7hGcff+6/+279L+'. - '0fHxyiE8XMLl4AAAAASUVORK5CYII=' ; - - //========================================================== - // File: bl_blue.png - //========================================================== - $this->imgdata_large[9][0]= 1169 ; - $this->imgdata_large[9][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAACEF'. - 'BMVEX/////////7//35//v1v/exv/Wvf/Wrf/Wpf/Orf+/v7+9'. - 'tc69jP+9hP+5ucW1tc6tlP+rq7Wlpdalpcalpb2cnM6cnMacc/'. - '+cWv+UlLWUjN6UjK2Uc/+Ma/+MUv+EhKWEa/+EQvd7e8Z7e7V7'. - 'e6V7c957Wv9za9Zza8ZzSv9ra5xrSv9rOf9rMe9jUudjQv9jOe'. - '9aWpRaUt5aUpRaSu9aSudSUoxSSs5SSoxSMf9KQtZKOfdKMedK'. - 'Kf9KKe9CKf9CKb1CKa1CIfdCIedCId45MXs5Kfc5If85Iec5Id'. - 'Y5GP8xMbUxMXsxKc4xKZQxIf8xGP8xGO8xGN4xGNYxGL0xGK0p'. - 'KXMpIYwpGP8pGO8pGOcpGNYpGM4pEP8pEPcpEOcpEN4pENYpEM'. - 'YpEL0hGKUhEP8hEPchEO8hEOchEN4hENYhEM4hEMYhELUhCP8h'. - 'CO8hCN4YGJwYGGsYEL0YEK0YEHMYCN4YCM4YCMYYCL0YCKUYAP'. - '8QEJQQEIwQEHsQEGsQCM4QCLUQCK0QCKUQCJwQCJQQCIwQCHMQ'. - 'CGsQAP8QAPcQAO8QAOcQAN4QANYQAM4QAMYQAL0QALUQAKUQAJ'. - 'QQAIQICGsICGMIAO8IANYIAL0IALUIAK0IAKUIAJwIAJQIAIwI'. - 'AIQIAHsIAHMIAGsIAGMAAN4AAMYAAK0AAJQAAIwAAIQAAHMAAG'. - 'sAAGMAAFrR1dDlAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'. - 'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkRFRPMOZ'. - '/2AAAB+klEQVR4nGNgIAIIqeqZmBqpi2JISNml5lVXV3d198Yo'. - 'oUjwm1SnxsbGRsSm5ZfNXO4tjCTjVh0ABhFx6QV9E1Y0S8JkuN'. - '3yAgLc7W3t/QPi4jPKJ8ye1yoIlTKpjvVy15eVUbN0i4zKLJ8w'. - 'ae6qcKgLqmMj3PUFWFl5NJ0CExLLJzbNW7BWCyxlXR0ba6/Axs'. - 'zELmfnkRBT0QiSKgXJCOflxUbYy3KyMHEoOrtEZ1c2TZ6/cMl6'. - 'eaCUamdsbIC7tjgPr4SBS3BMMVDTwkXr1hsDpYy6UmMj/O0tdX'. - 'QNbDxjknJLWqYsXLx0vStQynxGflpkZGCgs7Onp29SbtNkoMy6'. - 'pevCgFJWy3oyMuKjgoKCPWNCvEuqWhcsWrJ06XqQlPnMvrKyrM'. - 'TomJjkZAfHlNa2qdOWrlu63gcopbG8v7+hvLwip7g4JdSxsLZu'. - '8dKlS9ettwBKic2eNXHChIkTG5tKqgpr2uo6loLAehWQx0LnzJ'. - '49p6mpeXLLlNq6RUvqly6dvnR9Bx9ISnnlvLmT582bMr9t4aL2'. - '+vrp60GaDCGB6Ld6wfwFCxYCJZYsXQ+SmL6+FBryInVrFi1atH'. - 'jJkqVQsH6pNCzCJNvXrQW6CmQJREYFEc2CYevXrwMLAyXXl0oz'. - 'IAOt0vVQUGSIkabkDV3DwlzNVDAksAAAfUbNQRCwr88AAAAASU'. - 'VORK5CYII=' ; - - //========================================================== - // File: bs_red.png - //========================================================== - $this->imgdata_small[0][0]= 437 ; - $this->imgdata_small[0][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAk1'. - 'BMVEX////////GxsbGra3/xsbOhITWhIT/hIT/e3v/c3P/a2vG'. - 'UlK1SkrOUlL/Y2PWUlLGSkrnUlLeSkrnSkr/SkqEGBj/KSmlGB'. - 'jeGBjvGBj3GBj/EBD/CAj/AAD3AADvAADnAADeAADWAADOAADG'. - 'AAC9AAC1AACtAAClAACcAACUAACMAACEAAB7AABzAABrAABjAA'. - 'BuukXBAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZ'. - 'cwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkUGDNEMgOYAAAAm0'. - 'lEQVR4nI3Q3RKCIBAFYGZMy9RKzX7MVUAUlQTe/+kS0K49d3wD'. - '7JlFaG+CvIR3FvzPXgpLatxevVVS+Jzv0BDGk/UJwOkQ1ph2g/'. - 'Ct5ACX4wNT1o/zzUoJUFUGBiGfVnDTYGJgmrWy8iKEtp0Bpd2d'. - 'jLGu56MB7f4JOOfDJAwoNwslk/jOUi+Jts6RVNrC1hkhPy50Ef'. - 'u79/ADQMQSGQ8bBywAAAAASUVORK5CYII=' ; - - - //========================================================== - // File: bs_lightblue.png - //========================================================== - $this->imgdata_small[1][0]= 657 ; - $this->imgdata_small[1][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAABVl'. - 'BMVEX////////d///AwMC7wcS08P+y+P+xxdCwxM+uws2twMur'. - 'vsinzNynytylzuKhyN6e5v6d5P+d1fOcwNWcu8ub4f+at8iZ3v'. - '+ZvdGY2/yW2f+VscGU1vuT1fqTr72Sx+SSxeKR0fWRz/GPz/OP'. - 'rr+OyeqMy+6Myu2LyeyKxueJudSGw+SGorGDvt+Cvd6CvN2Aud'. - 'p+uNd+t9Z9tdV8tdR8tNN6sc94r813rct2q8h0qcZ0qMVzp8Rx'. - 'o8Bwor5tn7ptnrptnrlsnbhqmbRpmbNpi51ol7Flkqtkkqtkka'. - 'pjj6hijaRhjaZgi6NfiqJfiaFdh55bhJtag5pZgphYgJZYf5VX'. - 'cn9Ve5FSeI1RdopRdYlQdYlPc4dPcoZPcoVNcINLboBLbH9GZn'. - 'hGZXdFZHZEY3RDYnJCXW4/W2s/WWg+Wmo7VmU7VGM7U2E6VGM6'. - 'VGI5UV82T1wGxheQAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHU'. - 'gAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkUGTok'. - '9Yp9AAAAtElEQVR4nGNgIBaw8wkpKghzwvksPAKiUsraprYiLF'. - 'ARXkE2JiZ1PXMHXzGIAIekOFBE08TGLTCOCyzCLyvDxsZqZOnk'. - 'E56kAhaRV9NQUjW2tPcMjs9wBYsY6Oobmlk7egRGpxZmgkW0zC'. - '2s7Jy9giKT8gohaiQcnVzc/UNjkrMLCyHmcHr7BYREJKTlFxbm'. - 'QOxiEIuKTUzJKgQCaZibpdOzQfwCOZibGRi4dcJyw3S4iQ4HAL'. - 'qvIlIAMH7YAAAAAElFTkSuQmCC' ; - - //========================================================== - // File: bs_gray.png - //========================================================== - $this->imgdata_small[2][0]= 550 ; - $this->imgdata_small[2][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABEAAAAQCAMAAADH72RtAAABI1'. - 'BMVEX///8AAAD8EAD8IAD8NAD8RAD8VAAYGBi/v7+goKCCgoJk'. - 'ZGRGRkb8yAD83AD87AD8/AD4+ADo+ADY+ADI+AC0+ACk+ACU+A'. - 'CE+AB0/ABk/ABU/ABE/AAw/AAg/AAQ/AAA/AAA+AAA6BAA2CAA'. - 'yDQAtEQApFQAlGQAhHQAdIgAZJgAVKgARLgAMMgAINwAEOwAAP'. - 'wAAPgIAPAQAOgYAOAkANgsANA0AMg8AMBEALhMALBUAKhcAKBo'. - 'AJhwAJB4AIiAAID////4+Pjy8vLs7Ozm5ubg4ODa2trT09PNzc'. - '3Hx8fBwcG7u7u1tbWurq6oqKiioqKcnJyWlpaQkJCJiYmDg4N9'. - 'fX13d3dxcXFra2tkZGReXl5YWFhSUlJMTExGRkZAQEA1BLn4AA'. - 'AAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIA'. - 'AAsSAdLdfvwAAAAHdElNRQfTAwkUGiIctEHoAAAAfElEQVR4nI'. - '2N2xKDIAwF+bZ2kAa8cNFosBD//yvKWGh9dN+yk9kjxH28R7ze'. - 'wzBOYSX6CaNB927Z9qZ66KTSNmBM7UU9Hx2c5qjmJaWCaV5j4t'. - 'o1ANr40sn5a+x4biElrqHgrXMeac/c1nEpFHG0LSFoo/jO/BeF'. - 'lJnFbT58ayUf0BpA8wAAAABJRU5ErkJggg==' ; - - //========================================================== - // File: bs_greenblue.png - //========================================================== - $this->imgdata_small[3][0]= 503 ; - $this->imgdata_small[3][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAxl'. - 'BMVEX///////+/v79znJQhSkJ7raU5hHtjraVKnJRCjIRClIyU'. - '9++E595avbVaxr2/v7+ctbWcvb17nJxrjIx7paUxQkK9//+Mvb'. - '17ra2Evb17tbVCY2MQGBiU5+ec9/eM5+d71tZanJxjra1rvb1j'. - 'tbVSnJxara1rzs5jxsZKlJRChIQpUlIhQkJatbVSpaU5c3MxY2'. - 'MYMTEQISFavb1Sra1KnJxCjIw5e3sxa2spWlpClJQhSkoYOTkp'. - 'Y2MhUlIQKSkIGBgQMTH+e30mAAAAAXRSTlMAQObYZgAAAAFiS0'. - 'dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfT'. - 'AwkUGTIqLgJPAAAAqklEQVR4nI2QVxOCMBCEM6Mi2OiCvSslJB'. - 'CUoqjn//9TYgCfubf9Zu9uZxFqO+rscO7b6l/LljMZX29J2pNr'. - 'YjmX4ZaIEs2NeiWO19NNacl8rHAyD4LR6jjw6PMRdTjZE0JOiU'. - 'dDv2ALTlzRvSdCCfAHGCc7yRPSrAQRQOWxKc3C/IUjBlDdUcM8'. - '97vFGwBY9QsZGBc/A4DWZNbeXIPWZEZI0c2lqSute/gCO9MXGY'. - '4/IOkAAAAASUVORK5CYII=' ; - - //========================================================== - // File: bs_yellow.png - //========================================================== - $this->imgdata_small[4][0]= 507 ; - $this->imgdata_small[4][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAzF'. - 'BMVEX///////+/v79zYwCMewDOxoTWzoTezkr/5wj/5wDnzgDe'. - 'xgC1pQCtnACllACcjACUhABjWgDGvVK1rUrOxlLGvUqEexilnB'. - 'jv3hj35xj/7wj/7wD35wDv3gDn1gDezgDWxgDOvQDGtQC9rQCE'. - 'ewB7cwBzawBrYwDWzlLn3lLe1krn3kre1hi9tQC1rQCtpQClnA'. - 'CclACUjACMhAD/9wC/v7///8bOzoT//4T//3v//3P//2v//2Pn'. - '50r//0r//yn39xj//xD//wBjYwDO8noaAAAAAXRSTlMAQObYZg'. - 'AAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAH'. - 'dElNRQfTAwkUGSDZl3MHAAAAqElEQVR4nI3QWRNDMBAA4My09E'. - 'IF1SME0VT1okXvM/3//6kEfbZv+81eswA0DfHxRpOV+M+zkDGG'. - 'rL63zCoJ2ef2RLZDIqNqYexyvFrY9ePkxGWdpvfzC7tEGtIRly'. - 'nqzboFKMlizAXbNnZyiFUKAy4bZ+B6W0lRaQDLmg4h/k7eFwDL'. - 'OWIky8qhXUBQ7gKGmsxpC+ah1TdriwByqG8GQNDNr6kLjf/wAx'. - 'KgEq+FpPbfAAAAAElFTkSuQmCC' ; - - //========================================================== - // File: bs_darkgray.png - //========================================================== - $this->imgdata_small[5][0]= 611 ; - $this->imgdata_small[5][1]= - 'iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAMAAAAMCGV4AAABJl'. - 'BMVEX////////o8v/f6O7W4OnR3PXL1OTL0evEyLvCzePAwMC/'. - 'v7a8wsq7t7C1xum1vtS1q6GzopmyxeKsrsOqvNWoq7anvN+nsb'. - 'qhrcGgqbGfpq6cp7+bqMuVmJKRm7yPlKKMnL6FkKWFipOEkLSE'. - 'j6qEhoqAiaB+jqd8haF7hZR4iJt4g5l3hZl2gIt2cod1hJVzeY'. - 'VzboJvhp9sfJJsb41peY1pd5xpdoVod4xndI5lcHxka4BjcYVg'. - 'Z3BfboFbb4lbZnZbYntaZ4laZYVZV3JYYWpXX3JWWm5VX4RVW2'. - 'NUYX9SXHxPWn5OVFxNWWtNVXVMVWFKV3xHUGZGU3dGTldFSlxE'. - 'Sk9ESXBCRlNBS3k/SGs/RU4+R1k9R2U6RFU2PUg0PEQxNU0ECL'. - 'QWAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAA'. - 'CxIAAAsSAdLdfvwAAAAHdElNRQfTAwkUGQmbJetrAAAAtklEQV'. - 'R4nGNgwAK4JZTNNOWlYDxhMT4ZDTOzQE1uMF9CiJWVU0LbxDlS'. - 'G8QVF+FnZ2KRNHAIiPUHaZGSlmZj5lH19A1KjLUA8lXU5MWllF'. - 'yjo30TYr2BfG19G11b37CEeN84H38gX1HbwTUkOjo+zjfG3hLI'. - 'l1exCvCNCwnxjfMz0gTyRdXNHXx9fUNCQu2MwU6SN3ZwD42LCH'. - 'W30IK4T8vUJSAkNMhDiwPqYiktXWN9JZj7UQAAjWEfhlG+kScA'. - 'AAAASUVORK5CYII=' ; - - - //========================================================== - // File: bs_darkgreen.png - //========================================================== - $this->imgdata_small[6][0]= 666 ; - $this->imgdata_small[6][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAABX1'. - 'BMVEX////////l/+nAwMC86r+8wb28wby8wLy78sCzw7SywrSx'. - 'wLKwvrGuvK+syK+ryq2rx62n36ym3aumxKmk2qij0Keh16ahva'. - 'Og1aSguKKe06KeuaCetZ+d0KGdtZ+bz6Cay56ZyZ2Zwp2Zr5qZ'. - 'rpqYwJuXyZuXrJmVw5mUxZiTxJeTw5eTq5WRwJWPtJKOvZKKuI'. - '6Kt42Kn4yJt42ItIuGsomFsYmEsIiEr4eDr4eBrIR/qoN+qIJ8'. - 'poB7pH56o356on14nnt2nXl0mndzmnZzmXZymHVwlXNvlHJukn'. - 'FtiHBqjm1qjW1oi2toiWpniWplh2hlhmdkhWdig2VggGNgf2Je'. - 'fmFdfGBde19bbl1aeFxXdFpWclhVclhVcVdUcFZTb1VSbVRQal'. - 'JPaVFKY0xKYkxJYUtIYEpHX0lEWkZCWERCV0NCVkM/U0A+U0A+'. - 'UUA+UEA9Uj89UT48Tj45TDvewfrHAAAAAXRSTlMAQObYZgAAAA'. - 'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'. - 'RQfTAwkUGRjxlcuZAAAAtElEQVR4nGNgIBZw8osqqIpzw/msfI'. - 'IiUmr6lo6SbFARASEOJiYtQ2uXADmIAJeEGFBE18LBMySBBywi'. - 'LC/LwcFiZuvmH5WiAxZR0tRW1DC3dfYJS8zyAouYGBibWtm7+o'. - 'TEpZfkgEX0rG3snNx9Q2NSCksgaqRd3Ty8gyLiU/NKSiDmcPsF'. - 'BodHJ2UUlZTkQ+xikIlNSE7LLgECZagL2VQyc0H8YnV2uD94jS'. - 'ILIo14iQ4HALarJBNwbJVNAAAAAElFTkSuQmCC' ; - - //========================================================== - // File: bs_purple.png - //========================================================== - $this->imgdata_small[7][0]= 447 ; - $this->imgdata_small[7][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAnF'. - 'BMVEX///////+/v7/Gvca9rb3Grcb/xv+1hLWte629hL21e7XG'. - 'hMbWhNbOe87We9b/hP//e/97OXv/c///a///Y/+cOZz/Sv/WOd'. - 'bnOefvOe//Kf9jCGNrCGv/EP//CP/nCOf/AP/3APfvAO/nAOfe'. - 'AN7WANbOAM7GAMa9AL21ALWtAK2lAKWcAJyUAJSMAIyEAIR7AH'. - 'tzAHNrAGtjAGPP1sZnAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgF'. - 'HUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkUGS'. - 'o5QpoZAAAAnElEQVR4nI3Q2xJDMBAG4MyQokWrZz3oSkJISJH3'. - 'f7dK0Gv/Xb7J7vyzCK0NjtPsHuH/2wlhTE7LnTNLCO/TFQjjIp'. - 'hHAA6bY06LSqppMAY47x+04HXTba2kAFlmQKr+YuVDCGUG2k6/'. - 'rNwYK8rKwKCnPxHnVS0aA3rag4UQslUGhrlk0Kpv1+sx3tLZ6w'. - 'dtYemMkOsnz8R3V9/hB87DEu2Wos5+AAAAAElFTkSuQmCC' ; - - - //========================================================== - // File: bs_brown.png - //========================================================== - $this->imgdata_small[8][0]= 677 ; - $this->imgdata_small[8][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAABaF'. - 'BMVEX//////////8X/3oD/3nj/1HX/0Gr/xGP/rkv/gBf+iS/2'. - 'bAL1agDxaQDuZwDrZwLpZQDmZQLlZADjcx7gZATeYQDdZgraXw'. - 'DZXwHYXgDXiEvXZAvUjlfUXwXTjVfTbR7ShUvRbR7RWwDMWQDL'. - 'WADKooLKWADJoYLJgkvHWATGoILFn4LFgEvFVgDEZx7EVQDDt6'. - '/DVQDCt6/CnoLChlfCVADAwMC+hFe+UgC8UgC6UQC4gVe4UAC3'. - 'gVe3UAC1gFe1eUu1TwC1TgCzTgCwTQKuTACrSgCqSgCpSgCpSQ'. - 'CodEulSACkRwCiRgCdRACcRACaQwCYQgCWQgKVQQCVQACUQACS'. - 'UR6RPwCOPgCNPQCLPACKPACJOwCEOQCBOAB+NwB9NgB8NgB7NQ'. - 'B6NwJ4NAB3RR52MwB0MgBuLwBtLwBsLwBqLgBpLQBkLQJiKgBh'. - 'KgBgKwRcKABbKQJbJwBaKQRaJwBYKAJVJQDZvdIYAAAAAXRSTl'. - 'MAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLd'. - 'fvwAAAAHdElNRQfTAwkUGho0tvl2AAAAtklEQVR4nGNgIBaoSg'. - 'mLKGpowfkGMty8AqJKpi4mRlAROR5ONg4JFUv3YHOIgDo/HwsT'. - 'q6yps29EsjZYREFIkJ2ZS9/OMzA20wEsIi8uKSZtaOPmH5WSFw'. - 'YW0VRW07Vw8vCLSMguLwCL6FlaObp6B0TGZxSXQ9TouHv6+IXG'. - 'JGYWlpdDzNEKCgmPjkvLKS0vL4LYxWAen5SelV8OBNZQFxrZ5h'. - 'aC+GX2MDczMBh7pZakehkTHQ4AA0Am/jsB5gkAAAAASUVORK5C'. - 'YII=' ; - - //========================================================== - // File: bs_blue.png - //========================================================== - $this->imgdata_small[9][0]= 436 ; - $this->imgdata_small[9][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAk1'. - 'BMVEX///////+/v7+trcbGxv+EhM6EhNaEhP97e/9zc/9ra/9S'. - 'UsZKSrVSUs5jY/9SUtZKSsZSUudKSt5KSudKSv8YGIQpKf8YGK'. - 'UYGN4YGO8YGPcQEP8ICP8AAP8AAPcAAO8AAOcAAN4AANYAAM4A'. - 'AMYAAL0AALUAAK0AAKUAAJwAAJQAAIwAAIQAAHsAAHMAAGsAAG'. - 'ONFkFbAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZ'. - 'cwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkUGhNNakHSAAAAmk'. - 'lEQVR4nI3P2xKCIBAGYGfM6SBWo1nauIqogaDA+z9dK9Lhrv47'. - 'vtl/2A2CfxNlJRRp9IETYGraJeEb7ocLNKznia8A7Db7umWDUG'. - 'sxAzhurxRHxok4KQGqCuEhlL45oU1D2w5BztY4KRhj/bCAsetM'. - '2uObjwvY8/oX50JItYDxSyZSTrO2mNhvGMbaWAevnbFIcpuTr7'. - 't+5AkyfBIKSJHdSQAAAABJRU5ErkJggg==' ; - - //========================================================== - // File: bs_green.png - //========================================================== - $this->imgdata_small[10][0]= 452 ; - $this->imgdata_small[10][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAn1'. - 'BMVEX///////+/v7+/v7/G/8aUxpSMvYyUzpSMzoyM1oxarVqE'. - '/4R7/3tavVpKnEpaxlpz/3Nr/2tKtUpj/2Na51pKzkpK1kpK50'. - 'pK/0oYcxgp/ykYlBgY3hgY7xgY9xgQ/xAI/wgA/wAA9wAA7wAA'. - '5wAA3gAA1gAAzgAAxgAAvQAAtQAArQAApQAAnAAAlAAAjAAAhA'. - 'AAewAAcwAAawAAYwA0tyxUAAAAAXRSTlMAQObYZgAAAAFiS0dE'. - 'AIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAw'. - 'kUGgW5vvSDAAAAnklEQVR4nI3QSxKCMAwA0M4gqCgoiiJ+kEAL'. - 'LQUq0PufzX7ENdnlJZNkgtDS2CYZvK6bf+7EoKLA9cH5SQzv6A'. - 'YloTywsAbYr44FrlgrXCMJwHl3xxVtuuFkJAPIcw2tGB9GcFli'. - 'oqEf5GTkSUhVMw2TtD0XSlnDOw3SznE5520vNEi7CwW9+Ayjyq'. - 'U/3+yPuq5gvhkhL0xlGnqL//AFf14UIh4mkEkAAAAASUVORK5C'. - 'YII=' ; - - - //========================================================== - // File: bs_white.png - //========================================================== - $this->imgdata_small[11][0]= 480 ; - $this->imgdata_small[11][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABEAAAAQCAYAAADwMZRfAAAABm'. - 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'. - 'B3RJTUUH0wMLFTsY/ewvBQAAAW1JREFUeJytkz2u4jAUhT/jic'. - 'gfBUKiZhE0bIKeVbCWrIKenp6eDiGlCEEEBArIxvzGU4xeZjLk'. - 'jWb05lRXuvbx+exr4bouX1Xjyw7Atz81F4uFBYjjGIDhcCjq1o'. - 'k6nN1uZwFerxfP55Msy1itVmRZBsB4PK6YveHkeW5d18XzPIIg'. - 'wPd9Wq0WnU6HMAxJkoQoiuynOIfDwUopkVIihKAoCgAcx6Hdbm'. - 'OMIU1T5vN55eBKEikljUYDIX6kFUKU9e8aDAZlmjcca+1b7TgO'. - '1+uVy+VS9nzfr8e53++VzdZaiqIgz3OMMWitOZ/PaK0JgqDeRC'. - 'mF53lIKYGfr3O73TDGoJQiTVO01nS73XqT4/FIs9kkCAIej0eZ'. - 'brPZEMcxSZKgtQZgMpmIWpN+vy+m06n1PK9yTx8Gy+WS/X5Pr9'. - 'er9GuHLYoiG4YhSilOpxPr9Zrtdlti/JriU5MPjUYjq7UuEWaz'. - '2d+P/b/qv/zi75oetJcv7QQXAAAAAElFTkSuQmCC' ; - - - //========================================================== - // File: bs_cyan.png - //========================================================== - $this->imgdata_small[12][0]= 633 ; - $this->imgdata_small[12][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAABPl'. - 'BMVEX////////F///AwMCvxsaC1NSC0dGCz8+CzMyA//94//91'. - '//9q//9j//9X4uJX09NXz89Xx8dXxMRL//9L5uZL3d1L2NhLxs'. - 'ZLt7cv//8e9fUe8fEe7u4e398epqYehoYX//8L+PgK//8F9fUE'. - '/v4E5+cEb28EZ2cC//8C/v4C/f0CzMwCrq4Cjo4CdXUCaWkCZW'. - 'UB/PwA//8A/f0A+/sA8/MA7e0A7OwA6+sA5eUA5OQA4uIA4eEA'. - '3NwA2toA2NgA1dUA09MA0tIA0NAAysoAxsYAxcUAxMQAv78Avr'. - '4AvLwAtrYAtbUAs7MAsLAAra0Aq6sAqKgApaUApKQAoqIAoKAA'. - 'n58AmpoAlZUAk5MAkpIAkJAAj48AjIwAiYkAh4cAf38AfX0Ae3'. - 'sAenoAcnIAcHAAa2sAaWkAaGgAYmIUPEuTAAAAAXRSTlMAQObY'. - 'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'. - 'AHdElNRQfTAwkUGQDi+VPPAAAAtElEQVR4nGNgIBawikipyIiy'. - 'wfksfJpGRkamNtr8LFARPiMFHmFDcztXfwGoFi0jLiZuZRtnry'. - 'BddrCIiJEGL6eklYO7X3iCOFhE2thESdHawdUnJDZFDiyiamZh'. - 'aevk5h0UlZSpBhaRtbN3dPHwDY5MSM+EqBFzc/f0DgiLTkjLzI'. - 'SYw6bjHxgaEZeckZmpD7GLQSAqJj4xNRMIBGFuFtRLA/ENhGBu'. - 'ZmDgkJBXl5fgIDocAAKcINaFePT4AAAAAElFTkSuQmCC' ; - - //========================================================== - // File: bs_bluegreen.png - //========================================================== - $this->imgdata_small[13][0]= 493 ; - $this->imgdata_small[13][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAvV'. - 'BMVEX///////+/v79j//855/8x3v851v9Spb1C1v8AOUqEtcZK'. - 'lK1StdYxzv8hxv8AY4QASmNSlK1KpcZKtd4YQlIYnM4YrecIvf'. - '8AtfcAre8AjL0AhLUAc5wAa5QAWnsAQloAKTkAGCFKhJxKrdYY'. - 'jL0Ypd4Atf8ArfcApecAnN4AlM4AjMYAe60Ac6UAY4wAUnNSnL'. - '0AlNYAWoQASmsAOVIAITGEtc4YWnsAUnsAMUqtvcaErcYAKUIA'. - 'GCkAECHUyVh/AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAA'. - 'AJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkUGxNUcXCT'. - 'AAAAqUlEQVR4nI2Q1xKCMBREM2NHLCCogAGCjd6SqLT8/2cZKT'. - '6zb3tm987OBWCsXoejp8rC35fi4+l6gXFZlD0Rz6fZ1tdDmKR9'. - 'RdOmkzmP7DDpilfX3SzvRgQ/Vr1uiZplfsCBiVf03RJd140wgj'. - 'kmNqMtuYXcxyYmNWJdRoYwzpM9qRvGujuCmSR7q7ARY00/MiWk'. - 'sCnjkobNEm1+HknDZgAqR0GKU43+wxdu2hYzbsHU6AAAAABJRU'. - '5ErkJggg==' ; - - //========================================================== - // File: bs_lightred.png - //========================================================== - $this->imgdata_small[14][0]= 532 ; - $this->imgdata_small[14][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAA3l'. - 'BMVEX///////+/v7/Gvb0hGBj/5///3v//zu//1u//xucpGCG9'. - 'nK21lKVSQkp7Wms5KTExISlaOUpjQlIhEBj/tdbOhKXnrcbGjK'. - 'Wla4TetcbGnK2EWmv/rc73pcZ7UmOcY3vOpbW1jJzenLW9e5Rz'. - 'Slq1c4xrQlJSOULGhJz/pcb3nL2chIzOnK33rcbelK3WjKWMWm'. - 'vGe5SEUmM5ISnOtb3GrbXerb3vpb2ca3v/rcaUY3POhJxCKTF7'. - 'SlrWnK21e4ytc4TvnLXnlK2la3taOUK1lJxrSlLGhJRjQkpSMT'. - 'lw+q2nAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZ'. - 'cwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkUGjoP2Nm+AAAAr0'. - 'lEQVR4nGNgIBaYiOk62imYwPnMkiIyso76yhJSzFARMxkRNk49'. - 'a3t5OW6oFk1LVkYOfWUHKxUXiEYzLS12DnN3VXkjIRtFsIiSk5'. - '6evqGqhYGKugAfWMRa1FpD2UHeQEXQRlgALCJur+rgbCUNFOAS'. - 'hqjRkZe3MpBTcwEKCEPMMTGSs3Xz8OQHCnBBHckt6OJpIyAMBD'. - 'wwN/MYc4H4LK4wNzMwmGrzcvFqmxIdDgDiHRT6VVQkrAAAAABJ'. - 'RU5ErkJggg==' ; - - //========================================================== - // File: bxs_lightred.png - //========================================================== - $this->imgdata_xsmall[0][0]= 432 ; - $this->imgdata_xsmall[0][1]= - 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAA3l'. - 'BMVEX///////+/v7/Gvb0hGBj/5///3v//zu//1u//xucpGCG9'. - 'nK21lKVSQkp7Wms5KTExISlaOUpjQlIhEBj/tdbOhKXnrcbGjK'. - 'Wla4TetcbGnK2EWmv/rc73pcZ7UmOcY3vOpbW1jJzenLW9e5Rz'. - 'Slq1c4xrQlJSOULGhJz/pcb3nL2chIzOnK33rcbelK3WjKWMWm'. - 'vGe5SEUmM5ISnOtb3GrbXerb3vpb2ca3v/rcaUY3POhJxCKTF7'. - 'SlrWnK21e4ytc4TvnLXnlK2la3taOUK1lJxrSlLGhJRjQkpSMT'. - 'lw+q2nAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZ'. - 'cwAACxEAAAsRAX9kX5EAAAAHdElNRQfTAwkUKBOgGhWjAAAAS0'. - 'lEQVR4nGNgQAEmunYmEJaMCKe1vBxYzJKVQ9lKBSSupKdnaKGi'. - 'zgdkiqs6WKnYcIGYJnK2HvzCwmCNgi42wsLCECNMeXlNUY0HAL'. - 'DaB7Du8MiEAAAAAElFTkSuQmCC' ; - - //========================================================== - // File: bxs_bluegreen.png - //========================================================== - $this->imgdata_xsmall[1][0]= 397 ; - $this->imgdata_xsmall[1][1]= - 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAAvV'. - 'BMVEX///////+/v79j//855/8x3v851v9Spb1C1v8AOUqEtcZK'. - 'lK1StdYxzv8hxv8AY4QASmNSlK1KpcZKtd4YQlIYnM4YrecIvf'. - '8AtfcAre8AjL0AhLUAc5wAa5QAWnsAQloAKTkAGCFKhJxKrdYY'. - 'jL0Ypd4Atf8ArfcApecAnN4AlM4AjMYAe60Ac6UAY4wAUnNSnL'. - '0AlNYAWoQASmsAOVIAITGEtc4YWnsAUnsAMUqtvcaErcYAKUIA'. - 'GCkAECHUyVh/AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAA'. - 'AJcEhZcwAACxEAAAsRAX9kX5EAAAAHdElNRQfTAwkUKDVyF5Be'. - 'AAAASUlEQVR4nGNgQAFmYqJcEJaEOJ+UrD5YTJKFTZrfGCQuaq'. - 'glLWvMaQ5kqujo6hnbKIKYXPr68gp2dmCNJiZAlh3ECGsREWtU'. - '4wF1kwdpAHfnSwAAAABJRU5ErkJggg==' ; - - //========================================================== - // File: bxs_navy.png - //========================================================== - $this->imgdata_xsmall[2][0]= 353 ; - $this->imgdata_xsmall[2][1]= - 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAAk1'. - 'BMVEX///////+/v7+trcbGxv+EhM6EhNaEhP97e/9zc/9ra/9S'. - 'UsZKSrVSUs5jY/9SUtZKSsZSUudKSt5KSudKSv8YGIQpKf8YGK'. - 'UYGN4YGO8YGPcQEP8ICP8AAP8AAPcAAO8AAOcAAN4AANYAAM4A'. - 'AMYAAL0AALUAAK0AAKUAAJwAAJQAAIwAAIQAAHsAAHMAAGsAAG'. - 'ONFkFbAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZ'. - 'cwAACxEAAAsRAX9kX5EAAAAHdElNRQfTAwkUJxXO4axZAAAAR0'. - 'lEQVR4nGNgQAGskhKsEJaslIi8ijpYTJaDU1FVAyQuKSujoKKh'. - 'LQ5kSigpqWro6oOYrOoaWroGBmCNWiCWAdQwUVFWVOMBOp4GCJ'. - 's5S60AAAAASUVORK5CYII=' ; - - //========================================================== - // File: bxs_gray.png - //========================================================== - $this->imgdata_xsmall[3][0]= 492 ; - $this->imgdata_xsmall[3][1]= - 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAABI1'. - 'BMVEX///8AAAD8EAD8IAD8NAD8RAD8VAAYGBi/v7+goKCCgoJk'. - 'ZGRGRkb8yAD83AD87AD8/AD4+ADo+ADY+ADI+AC0+ACk+ACU+A'. - 'CE+AB0/ABk/ABU/ABE/AAw/AAg/AAQ/AAA/AAA+AAA6BAA2CAA'. - 'yDQAtEQApFQAlGQAhHQAdIgAZJgAVKgARLgAMMgAINwAEOwAAP'. - 'wAAPgIAPAQAOgYAOAkANgsANA0AMg8AMBEALhMALBUAKhcAKBo'. - 'AJhwAJB4AIiAAID////4+Pjy8vLs7Ozm5ubg4ODa2trT09PNzc'. - '3Hx8fBwcG7u7u1tbWurq6oqKiioqKcnJyWlpaQkJCJiYmDg4N9'. - 'fX13d3dxcXFra2tkZGReXl5YWFhSUlJMTExGRkZAQEA1BLn4AA'. - 'AAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxEA'. - 'AAsRAX9kX5EAAAAHdElNRQfTAwkUKC74clmyAAAAQklEQVR4nG'. - 'NgQAVBYVCGt5dXYEQ0mOnp5h4QFgVmeri6+4dHxYMVeHoFRUTH'. - 'gTUFBIZBWAwMkZEx8bFQM2Lj0UwHANc/DV6yq/BiAAAAAElFTk'. - 'SuQmCC' ; - - //========================================================== - // File: bxs_graypurple.png - //========================================================== - $this->imgdata_xsmall[4][0]= 542 ; - $this->imgdata_xsmall[4][1]= - 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAABSl'. - 'BMVEX////////11P/MqdvKrNfAwMC+u7+9u7+4rr24lsi3rby3'. - 'lMe1rLq1o720q7i0oL20ksSzoryyqbaykMGxlb2wkL+vnbiujb'. - '2sjLuri7qpl7GoirWoibenmK2mla6mjLKmhrSllauki7CjhrCj'. - 'hLGihLChg6+ggq2fkqadkKOcfqqai6Gag6WYe6WXeqSWeaOTd6'. - 'CTd5+Rdp6RdZ6RdZ2Qg5eOc5qMcpiLcZeJb5WIbpOHbZKGbJGE'. - 'a4+CaY2AZ4t/Z4p/Zop/Zol+Zol7ZIZ6Y4V5YoR1ZH11X391Xn'. - '9zXX1yXXtxXHtvWnluWXhsV3VqVnNpVXJoVHFnU3BmUm9jUGth'. - 'VGdgTmheTGZcS2RcSmRaSWJYR19XRl5SQllRQlhQQVdPQFZOP1'. - 'VLPlFJO09IPE5IOk5FOEtEN0lDOEpDOElDNklCNkc/M0XhbrfD'. - 'AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACx'. - 'EAAAsRAX9kX5EAAAAHdElNRQfTAwkUKCgREfyHAAAATUlEQVR4'. - 'nGNgQAEcIko8EBY3M5Ougy+IxSXMwmTsFsAHZMqrSRvZB0W7A5'. - 'k6FlYugXEZICaPr394Um4uSAFDRFRCbm4uxAihsDAhVOMBHT0L'. - 'hkeRpo8AAAAASUVORK5CYII=' ; - - //========================================================== - // File: bxs_red.png - //========================================================== - $this->imgdata_xsmall[5][0]= 357 ; - $this->imgdata_xsmall[5][1]= - 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAAk1'. - 'BMVEX////////GxsbGra3/xsbOhITWhIT/hIT/e3v/c3P/a2vG'. - 'UlK1SkrOUlL/Y2PWUlLGSkrnUlLeSkrnSkr/SkqEGBj/KSmlGB'. - 'jeGBjvGBj3GBj/EBD/CAj/AAD3AADvAADnAADeAADWAADOAADG'. - 'AAC9AAC1AACtAAClAACcAACUAACMAACEAAB7AABzAABrAABjAA'. - 'BuukXBAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZ'. - 'cwAACxEAAAsRAX9kX5EAAAAHdElNRQfTAwkUIyjy5SVMAAAAS0'. - 'lEQVR4nGNgQAFsUpJsEJastIi8ijpYTJaDU0FVgxXIlJKVUVDR'. - '0BYHMiUUlVQ1dPVBTDZ1dS1dAwOQAgYtbSDLAGIEq6goK6rxAD'. - 'yXBg73lwGUAAAAAElFTkSuQmCC' ; - - //========================================================== - // File: bxs_yellow.png - //========================================================== - $this->imgdata_xsmall[6][0]= 414 ; - $this->imgdata_xsmall[6][1]= - 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAAzF'. - 'BMVEX///////+/v79zYwCMewDOxoTWzoTezkr/5wj/5wDnzgDe'. - 'xgC1pQCtnACllACcjACUhABjWgDGvVK1rUrOxlLGvUqEexilnB'. - 'jv3hj35xj/7wj/7wD35wDv3gDn1gDezgDWxgDOvQDGtQC9rQCE'. - 'ewB7cwBzawBrYwDWzlLn3lLe1krn3kre1hi9tQC1rQCtpQClnA'. - 'CclACUjACMhAD/9wC/v7///8bOzoT//4T//3v//3P//2v//2Pn'. - '50r//0r//yn39xj//xD//wBjYwDO8noaAAAAAXRSTlMAQObYZg'. - 'AAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAAH'. - 'dElNRQfTAwkUIzoBXFQEAAAAS0lEQVR4nGNgQAFsDhJsEJaTo5'. - '2skj5YzMnSSk7ZwBzIlOSUklPiMxYHMnW4FXT5VNVBTDZeXiNV'. - 'QUGQAgYBYyBLEGIEq5gYK6rxAH4kBmHBaMQQAAAAAElFTkSuQm'. - 'CC' ; - - //========================================================== - // File: bxs_greenblue.png - //========================================================== - $this->imgdata_xsmall[7][0]= 410 ; - $this->imgdata_xsmall[7][1]= - 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAAxl'. - 'BMVEX///////+/v79znJQhSkJ7raU5hHtjraVKnJRCjIRClIyU'. - '9++E595avbVaxr2/v7+ctbWcvb17nJxrjIx7paUxQkK9//+Mvb'. - '17ra2Evb17tbVCY2MQGBiU5+ec9/eM5+d71tZanJxjra1rvb1j'. - 'tbVSnJxara1rzs5jxsZKlJRChIQpUlIhQkJatbVSpaU5c3MxY2'. - 'MYMTEQISFavb1Sra1KnJxCjIw5e3sxa2spWlpClJQhSkoYOTkp'. - 'Y2MhUlIQKSkIGBgQMTH+e30mAAAAAXRSTlMAQObYZgAAAAFiS0'. - 'dEAIgFHUgAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAAHdElNRQfT'. - 'AwkUJy5/6kV9AAAATUlEQVR4nGNgQAGCyuyCEJaGugKHviVYzF'. - 'hO3sxCWwDIVNLTM9PXtpEGMhW12Cy0DR1ATEFLSxZ7BweQAgYd'. - 'HUMHBweIEQKiogKoxgMAo/4H5AfSehsAAAAASUVORK5CYII=' ; - - //========================================================== - // File: bxs_purple.png - //========================================================== - $this->imgdata_xsmall[8][0]= 364 ; - $this->imgdata_xsmall[8][1]= - 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAAnF'. - 'BMVEX///////+/v7/Gvca9rb3Grcb/xv+1hLWte629hL21e7XG'. - 'hMbWhNbOe87We9b/hP//e/97OXv/c///a///Y/+cOZz/Sv/WOd'. - 'bnOefvOe//Kf9jCGNrCGv/EP//CP/nCOf/AP/3APfvAO/nAOfe'. - 'AN7WANbOAM7GAMa9AL21ALWtAK2lAKWcAJyUAJSMAIyEAIR7AH'. - 'tzAHNrAGtjAGPP1sZnAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgF'. - 'HUgAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAAHdElNRQfTAwkUIj'. - 'mBTjT/AAAASUlEQVR4nGNgQAGskhKsEJaCrJiSuhZYTEFASFlD'. - 'GyQuqSCnrK6tJwpkiquoamgbGIGYrFpaugbGxmCNunpAljHECB'. - 'ZBQRZU4wFSMAZsXeM71AAAAABJRU5ErkJggg==' ; - - //========================================================== - // File: bxs_green.png - //========================================================== - $this->imgdata_xsmall[9][0]= 370 ; - $this->imgdata_xsmall[9][1]= - 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAAn1'. - 'BMVEX///////+/v7+/v7/G/8aUxpSMvYyUzpSMzoyM1oxarVqE'. - '/4R7/3tavVpKnEpaxlpz/3Nr/2tKtUpj/2Na51pKzkpK1kpK50'. - 'pK/0oYcxgp/ykYlBgY3hgY7xgY9xgQ/xAI/wgA/wAA9wAA7wAA'. - '5wAA3gAA1gAAzgAAxgAAvQAAtQAArQAApQAAnAAAlAAAjAAAhA'. - 'AAewAAcwAAawAAYwA0tyxUAAAAAXRSTlMAQObYZgAAAAFiS0dE'. - 'AIgFHUgAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAAHdElNRQfTAw'. - 'kUKBrZxq0HAAAATElEQVR4nGNgQAGccrIcEJaivISyhjaIxa7I'. - 'I6CiqcMKZMopKqho6OhLA5kyqmqaOobGICartraeoYkJSAGDnj'. - '6QZQIxgk1Skg3VeABlVgbItqEBUwAAAABJRU5ErkJggg==' ; - - //========================================================== - // File: bxs_darkgreen.png - //========================================================== - $this->imgdata_xsmall[10][0]= 563 ; - $this->imgdata_xsmall[10][1]= - 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAABX1'. - 'BMVEX////////l/+nAwMC86r+8wb28wby8wLy78sCzw7SywrSx'. - 'wLKwvrGuvK+syK+ryq2rx62n36ym3aumxKmk2qij0Keh16ahva'. - 'Og1aSguKKe06KeuaCetZ+d0KGdtZ+bz6Cay56ZyZ2Zwp2Zr5qZ'. - 'rpqYwJuXyZuXrJmVw5mUxZiTxJeTw5eTq5WRwJWPtJKOvZKKuI'. - '6Kt42Kn4yJt42ItIuGsomFsYmEsIiEr4eDr4eBrIR/qoN+qIJ8'. - 'poB7pH56o356on14nnt2nXl0mndzmnZzmXZymHVwlXNvlHJukn'. - 'FtiHBqjm1qjW1oi2toiWpniWplh2hlhmdkhWdig2VggGNgf2Je'. - 'fmFdfGBde19bbl1aeFxXdFpWclhVclhVcVdUcFZTb1VSbVRQal'. - 'JPaVFKY0xKYkxJYUtIYEpHX0lEWkZCWERCV0NCVkM/U0A+U0A+'. - 'UUA+UEA9Uj89UT48Tj45TDvewfrHAAAAAXRSTlMAQObYZgAAAA'. - 'FiS0dEAIgFHUgAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAAHdElN'. - 'RQfTAwkUKCFozUQjAAAATUlEQVR4nGNgQAGcoqrcEJYQB5OhSw'. - 'CIxSXGwWThGcIDZCppK5o7hyV6AZl6NnbuoSmFICZ3YHB0RkkJ'. - 'SAFDbEJaSUkJxAjeyEheVOMBQj4MOEkWew4AAAAASUVORK5CYI'. - 'I=' ; - - //========================================================== - // File: bxs_cyan.png - //========================================================== - $this->imgdata_xsmall[11][0]= 530 ; - $this->imgdata_xsmall[11][1]= - 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAABPl'. - 'BMVEX////////F///AwMCvxsaC1NSC0dGCz8+CzMyA//94//91'. - '//9q//9j//9X4uJX09NXz89Xx8dXxMRL//9L5uZL3d1L2NhLxs'. - 'ZLt7cv//8e9fUe8fEe7u4e398epqYehoYX//8L+PgK//8F9fUE'. - '/v4E5+cEb28EZ2cC//8C/v4C/f0CzMwCrq4Cjo4CdXUCaWkCZW'. - 'UB/PwA//8A/f0A+/sA8/MA7e0A7OwA6+sA5eUA5OQA4uIA4eEA'. - '3NwA2toA2NgA1dUA09MA0tIA0NAAysoAxsYAxcUAxMQAv78Avr'. - '4AvLwAtrYAtbUAs7MAsLAAra0Aq6sAqKgApaUApKQAoqIAoKAA'. - 'n58AmpoAlZUAk5MAkpIAkJAAj48AjIwAiYkAh4cAf38AfX0Ae3'. - 'sAenoAcnIAcHAAa2sAaWkAaGgAYmIUPEuTAAAAAXRSTlMAQObY'. - 'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxEAAAsRAX9kX5EAAA'. - 'AHdElNRQfTAwkUKQFKuFWqAAAATUlEQVR4nGNgQAGsUjJsEJaR'. - 'grC5qz9YzIiL28YriB3IlDZRsnYNiZUDMmXtHT2CE9JBTDb/wI'. - 'jkzEyQAoaomMTMzEyIERzy8hyoxgMAN2MLVPW0f4gAAAAASUVO'. - 'RK5CYII=' ; - - //========================================================== - // File: bxs_orange.png - //========================================================== - $this->imgdata_xsmall[12][0]= 572 ; - $this->imgdata_xsmall[12][1]= - 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAABaF'. - 'BMVEX//////////8X/3oD/3nj/1HX/0Gr/xGP/rkv/gBf+iS/2'. - 'bAL1agDxaQDuZwDrZwLpZQDmZQLlZADjcx7gZATeYQDdZgraXw'. - 'DZXwHYXgDXiEvXZAvUjlfUXwXTjVfTbR7ShUvRbR7RWwDMWQDL'. - 'WADKooLKWADJoYLJgkvHWATGoILFn4LFgEvFVgDEZx7EVQDDt6'. - '/DVQDCt6/CnoLChlfCVADAwMC+hFe+UgC8UgC6UQC4gVe4UAC3'. - 'gVe3UAC1gFe1eUu1TwC1TgCzTgCwTQKuTACrSgCqSgCpSgCpSQ'. - 'CodEulSACkRwCiRgCdRACcRACaQwCYQgCWQgKVQQCVQACUQACS'. - 'UR6RPwCOPgCNPQCLPACKPACJOwCEOQCBOAB+NwB9NgB8NgB7NQ'. - 'B6NwJ4NAB3RR52MwB0MgBuLwBtLwBsLwBqLgBpLQBkLQJiKgBh'. - 'KgBgKwRcKABbKQJbJwBaKQRaJwBYKAJVJQDZvdIYAAAAAXRSTl'. - 'MAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxEAAAsRAX9k'. - 'X5EAAAAHdElNRQfTAwkUJBSSy88MAAAATUlEQVR4nGNgQAGqwo'. - 'paEBYPJ4eKezCIpc7HwmrqG6ENZMpLihm6RaWEAZl6Vo7ekRnF'. - 'IKZWSHhcTnk5SAFDfFJWeXk5xAjj1FRjVOMBeFwNcWYSLjsAAA'. - 'AASUVORK5CYII=' ; - - //========================================================== - // File: bxs_lightblue.png - //========================================================== - $this->imgdata_xsmall[13][0]= 554 ; - $this->imgdata_xsmall[13][1]= - 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAABVl'. - 'BMVEX////////d///AwMC7wcS08P+y+P+xxdCwxM+uws2twMur'. - 'vsinzNynytylzuKhyN6e5v6d5P+d1fOcwNWcu8ub4f+at8iZ3v'. - '+ZvdGY2/yW2f+VscGU1vuT1fqTr72Sx+SSxeKR0fWRz/GPz/OP'. - 'rr+OyeqMy+6Myu2LyeyKxueJudSGw+SGorGDvt+Cvd6CvN2Aud'. - 'p+uNd+t9Z9tdV8tdR8tNN6sc94r813rct2q8h0qcZ0qMVzp8Rx'. - 'o8Bwor5tn7ptnrptnrlsnbhqmbRpmbNpi51ol7Flkqtkkqtkka'. - 'pjj6hijaRhjaZgi6NfiqJfiaFdh55bhJtag5pZgphYgJZYf5VX'. - 'cn9Ve5FSeI1RdopRdYlQdYlPc4dPcoZPcoVNcINLboBLbH9GZn'. - 'hGZXdFZHZEY3RDYnJCXW4/W2s/WWg+Wmo7VmU7VGM7U2E6VGM6'. - 'VGI5UV82T1wGxheQAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHU'. - 'gAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAAHdElNRQfTAwkUJziL'. - 'PvAsAAAATUlEQVR4nGNgQAHsQgqcEJYgG5Oegy+IxSHOxmTiFs'. - 'gFZMprKBnbB8e7AplaFlbOQUl5ICanX0BEWmEhSAFDVGxKYWEh'. - 'xAjusDBuVOMBJO8LrFHRAykAAAAASUVORK5CYII=' ; - - //========================================================== - // File: bxs_darkgray.png - //========================================================== - $this->imgdata_xsmall[14][0]= 574 ; - $this->imgdata_xsmall[14][1]= - 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABm'. - 'JLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAAsRAAALEQF/ZF+RAAAB'. - 'iElEQVR42k3QPU8TYRwA8P//ebkXrgdIColXRAOEkJqbaExMut'. - 'DBhE1GNjYHPg+DG6ODiU6QOLjVxITBcFKBYCstlAC2Bz17fe76'. - 'vLD6+wg/1FpTRFR5lpaub/u1eGBGaAT4HneD4OlXx7avtDYUjT'. - 'HQabd2Ti8e3vVSKzxrtHS32wIpFVldno22Nqvvg2Bhl0gp/aNm'. - 'vJ3qqXAtLIva+ks1H0wqlSXi4+d6+OFTfRsAfHJx2d1od24rZP'. - 'xP2HzopINr1mkesX7ccojqif0v9crxWXODZTno3+dNGA7uWLsd'. - 'mUYU4fHJCViMG9umLBmM4L6fagZGg9QKfjZ+Qfy3C3G/B3mugF'. - 'IHHNcDf64E3KJALApk2p8CSolUUqLjFkyxOGMsTtFyJ+Wz57NQ'. - '8DghS4sLB0svioeZZo7nPhFoUKZDIVFbglkTTnl5/rC8snjAkJ'. - 'Bk/XV5LxHC/v7tR8jzTFPbg8LENK9WX0Vv31T2AEmCSmlKCCoh'. - 'ROnP1U1tPFYjJBRcbtzSf+GPsFTAQBq1n4AAAABKdEVYdHNpZ2'. - '5hdHVyZQBiYzYyMDIyNjgwYThjODMyMmUxNjk0NWUzZjljOGFh'. - 'N2VmZWFhMjA4OTE2ZjkwOTdhZWE1MzYyMjk0MWRkM2I5EqaPDA'. - 'AAAABJRU5ErkJggg==' ; - } -} - -?> \ No newline at end of file diff --git a/html/lib/jpgraph/imgdata_bevels.inc.php b/html/lib/jpgraph/imgdata_bevels.inc.php deleted file mode 100644 index 2dab45fc55..0000000000 --- a/html/lib/jpgraph/imgdata_bevels.inc.php +++ /dev/null @@ -1,128 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -//======================================================================= -// File: IMGDATA_BEVELS.INC -// Description: Base64 encoded images for round bevels -// Created: 2003-03-20 -// Ver: $Id: imgdata_bevels.inc.php 1106 2009-02-22 20:16:35Z ljp $ -// -// Copyright (c) Aditus Consulting. All rights reserved. -//======================================================================== - -class ImgData_Bevels extends ImgData { - protected $name = 'Round Bevels'; - protected $an = array(MARK_IMG_BEVEL => 'imgdata'); - - protected $colors = array('green','purple','orange','red','yellow'); - protected $index = array('green'=>1,'purple'=>4,'orange'=>2,'red'=>0,'yellow'=>3); - protected $maxidx = 4 ; - - protected $imgdata ; - - function __construct() { - //========================================================== - // File: bullets_balls_red_013.png - //========================================================== - $this->imgdata[0][0]= 337 ; - $this->imgdata[0][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'. - 'BMVEX////////27t/f3+LFwcmNxMuxm62DmqKth1VpZmIWg6fv'. - 'HCa7K0BwMEytCjFnIyUlEBg9vhQvAAAAAXRSTlMAQObYZgAAAA'. - 'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'. - 'RQfTAxcBNhk+pYJVAAAAl0lEQVR4nE2Q2xLDIAgFHUWBKJf//9'. - 'oekmbafVDZARRbK/pYTKP9WNcNv64zzUdd9BjmrgnsVXRNSzO3'. - 'CJ5ahdhy0XKQkxld1kxb45j7dp0x2lBNOyVgQpMaoadX7Hs7zr'. - 'P1yKj47DKBnKaBKiSAkNss7O6PkMx6kIgYXISQJpcZCqdY6KR+'. - 'J1PkS5Xob/h7MNz8x6D3fz5DKQjpkZOBYAAAAABJRU5ErkJggg'. - '==' ; - - //========================================================== - // File: bullets_balls_green_013.png - //========================================================== - $this->imgdata[1][0]= 344 ; - $this->imgdata[1][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'. - 'BMVEX////////27t/e3+K3vriUub/Dm18j4xc3ob10k0ItqQlU'. - 'e5JBmwpxY1ENaKBgUh0iHgwsSre9AAAAAXRSTlMAQObYZgAAAA'. - 'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'. - 'RQfTAxcBNTfJXtxZAAAAnklEQVR4nE2QWY4EMQhDUVhSIRC4/2'. - 'kbaqLp9p+f2AxAayAzDfiK9znPORuvH0x8Ss9z6I9sHp6tcxE9'. - 'nLmWmebmt5F5p2AR0+C9AWpLBjXRaZsCAT3SqklVp0YkAWaGtd'. - 'c5Z41/STYpPzW7BjyiRrwkVmQto/Cw9tNEMvsgcekyCyFPboIu'. - 'IsuXiKffYB4NK4r/h6d4g9HPPwCR7i8+GscIiiaonUAAAAAASU'. - 'VORK5CYII=' ; - - //========================================================== - // File: bullets_balls_oy_035.png - //========================================================== - $this->imgdata[2][0]= 341 ; - $this->imgdata[2][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'. - 'BMVEX////////27t/f3+K5tbqNwcjnkjXjbxR2i5anfEoNkbis'. - 'PBxpU0sZbZejKgdqIRIlERIwYtkYAAAAAXRSTlMAQObYZgAAAA'. - 'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'. - 'RQfTAxcBNgK0wEu5AAAAm0lEQVR4nE3QVxIEIQgEUErAgTHA/U'. - '+7zbipf9RXgoGo0liMmX6RdSPLPtZM9F4LuuSIaZtZWffiU6Iz'. - 'Y8SOMF0NogBj30ioGRGLZgiPvce1TbIRz6oBQEbOFGK0rIoxrn'. - '5hDomMA1cfGRCaRVhjS3gkzheM+4HtnlkXcvdZhWG4qZawewe6'. - '9Jnz/TKLB/ML6HUepn//QczazuwFO/0Ivpolhi4AAAAASUVORK'. - '5CYII=' ; - - //========================================================== - // File: bullets_balls_oy_036.png - //========================================================== - $this->imgdata[3][0]= 340 ; - $this->imgdata[3][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'. - 'BMVEX////////27t/e3+LO3hfYzz65ubiNwci6uQ12ipadgVGa'. - 'fwsNkbhnVkcaZ5dwSA8lFg7CEepmAAAAAXRSTlMAQObYZgAAAA'. - 'FiS0dEAIgFHUgAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAAHdElN'. - 'RQfTAxcCBySi1nevAAAAjElEQVR4nFXPWw7EIAgFUNMoCMhj/6'. - 'staKczc/2RkwjS2glQ+w3YytgXCXCZpRo8gJdGxZadJws13CUP'. - '4SZI4MYiUxypeiGGw1XShVBTNN9kLXP2GRrZPFvKgd7z/sqGGV'. - '7C7r7r3l09alYN3iA8Yn+ImdVrNoEeSRqJPAaHfhZzLYwXstdZ'. - 'rP3n2bvdAI4INwtihiwAAAAASUVORK5CYII=' ; - - //========================================================== - // File: bullets_balls_pp_019.png - //========================================================== - $this->imgdata[4][0]= 334 ; - $this->imgdata[4][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'. - 'BMVEX////+/v7i4eO/w8eHxcvKroNVormtfkjrMN2BeXQrepPc'. - 'Esy4IL+OFaR7F25LHF8mFRh5XXtUAAAAAXRSTlMAQObYZgAAAA'. - 'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'. - 'RQfTAxcBNgkjEpIxAAAAlElEQVR4nE2QAQ7FIAhDDTAVndL7n3'. - 'ZV/7JfEwMvFIWUlkTMVNInbVv5ZeJqG7Smh2QTBwJBpsdizAZP'. - '5NyW0awhK8kYodnZxS6ECvPRp2sI+y7PBv1mN02KH7h77QCJ8D'. - '4VvY5NUgEmCwj6ZMzHtJRgRSXwC1gfcqJJH0GBnSnK1kUQ72DY'. - 'CPBv+MCS/e0jib77eQAJxwiEWm7hFwAAAABJRU5ErkJggg==' ; - - } -} - - -?> \ No newline at end of file diff --git a/html/lib/jpgraph/imgdata_diamonds.inc.php b/html/lib/jpgraph/imgdata_diamonds.inc.php deleted file mode 100644 index c911a97031..0000000000 --- a/html/lib/jpgraph/imgdata_diamonds.inc.php +++ /dev/null @@ -1,201 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -//======================================================================= -// File: IMGDATA_DIAMONDS.INC -// Description: Base64 encoded images for diamonds -// Created: 2003-03-20 -// Ver: $Id: imgdata_diamonds.inc.php 1106 2009-02-22 20:16:35Z ljp $ -// -// Copyright (c) Aditus Consulting. All rights reserved. -//======================================================================== - -class ImgData_Diamonds extends ImgData { - protected $name = 'Diamonds'; - protected $an = array(MARK_IMG_DIAMOND =>'imgdata'); - protected $colors = array('lightblue','darkblue','gray', - 'blue','pink','purple','red','yellow'); - protected $index = array('lightblue' =>7,'darkblue'=>2,'gray'=>6, - 'blue'=>4,'pink'=>1,'purple'=>5,'red'=>0,'yellow'=>3); - - protected $maxidx = 7 ; - protected $imgdata ; - - function __construct() { - //========================================================== - // File: diam_red.png - //========================================================== - $this->imgdata[0][0]= 668 ; - $this->imgdata[0][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA/F'. - 'BMVEX///////+cAAD/AADOAABjAABrAADWGBjOCAj/CAj/GBj/'. - 'EBCcCAiMOTl7KSl7ISFzGBilGBjOEBBrCAjv5+eMQkK1QkKtMT'. - 'GtKSnWKSn/KSlzEBCcEBDexsb/tbXOe3ucWlqcUlKUSkr/e3vn'. - 'a2u9UlL/a2uEMTHeUlLeSkqtOTn/UlL/SkrWOTn/QkL/OTmlIS'. - 'H/MTH/ISH39/f/9/f35+fezs7/5+fvzs7WtbXOra3nvb3/zs7G'. - 'nJzvtbXGlJTepaW9jIy1hITWlJS1e3uta2ulY2P/lJTnhITne3'. - 'vGY2O9Wlr/c3PeY2O1Skr/Y2P/WlreQkLWISGlEBCglEUaAAAA'. - 'AXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAA'. - 'sSAdLdfvwAAAAHdElNRQfTAwsWEw5WI4qnAAABGUlEQVR4nHXQ'. - '1XLDMBAFUKUCM1NiO8zcpIxpp8z0//9SWY7b2LHv6EU6s1qtAN'. - 'iMBAojLPkigpJvogKC4pxDuQipjanlICXof1RQDkYEF21mKIfg'. - '/GGKtjAmOKt9oSyuCU7OhyiDCQnjowGfRnooCJIkiWJvv8NxnG'. - 'nyNAwFcekvZpPP3mu7Vrp8fOq8DYbTyjdnAvBj7Jbd7nP95urs'. - '+MC2D6unF+Cu0VJULQBAlsOQuueN3Hrp2nGUvqppemBZ0aU7Se'. - 'SXvYZFMKaLJn7MH3btJmZEMEmGSOreqy0SI/4ffo3uiUOYEACy'. - 'OFopmNWlP5uZd9uPWmUoxvK9ilO9NtBo6mS7KkZD0fOJYqgGBU'. - 'S/T7OKCAA9tfsFOicXcbxt29cAAAAASUVORK5CYII=' ; - - //========================================================== - // File: diam_pink.png - //========================================================== - $this->imgdata[1][0]= 262 ; - $this->imgdata[1][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl'. - 'BMVEX///+AgID/M5n/Zpn/zMz/mZn1xELhAAAAAXRSTlMAQObY'. - 'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'. - 'AHdElNRQfTAwsWEi3tX8qUAAAAbUlEQVR4nFXJwQ3AMAhDUdRm'. - 'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8'. - '6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R'. - 'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg'. - '==' ; - - //========================================================== - // File: diam_blue.png - //========================================================== - $this->imgdata[2][0]= 662 ; - $this->imgdata[2][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA+V'. - 'BMVEX///+AgIAAAJwAAP8AAM4AAGMAAGsQEP8YGHMQEHMYGP8Q'. - 'EKUICJwICM5KSpQxMYQpKXsYGNYQEM4ICGsICP97e85aWpw5OY'. - 'xSUv85ObVCQt4xMa0pKa0hIaUpKf+9vd6EhLVra+dzc/9SUr1r'. - 'a/9aWt5SUt5CQrVaWv9KSv8hIXs5Of8xMf8pKdYhIdYYGKUhIf'. - '/Ozs739//v7/fn5+/v7//n5/fW1ufOzufOzu/W1v+trc69veel'. - 'pc6trd6UlMa9vf+MjL21tfe1tf+UlNZzc61ra6Wlpf+EhOeMjP'. - '9ra8ZSUpyEhP9CQoxKSrVCQv85Od4xMdYQENZnJhlWAAAAAXRS'. - 'TlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAd'. - 'LdfvwAAAAHdElNRQfTAwsWEx3Snct5AAABFklEQVR4nHXR5XbD'. - 'IBgGYM6AuHsaqbvOfeuknev9X8xISbplSd5/8JyXwwcA/I0AKm'. - 'PFchVBdvKNKggKQx2VIoRwMZihMiQE49YUlWBCcPL0hYq4ITh+'. - 'qKECUoLDZWqoQNA766F/mJHlHXblPJJNiyURhM5eU9cNw5BlmS'. - 'IrLOLxhzfotF7vwO2j3ez2ap/TmW4AIM7DoN9+tu+vLk6Pdg9O'. - '6ufXjfXLm6pxPACSJIpRFAa+/26DhuK6qjbiON40k0N3skjOvm'. - 'NijBmchF5mi+1jhQqDmWyIzPp1hUlrv8On5l+6mMm1tigFNyrt'. - '5R97g+FKKyGKkTNKesXPJTZXOFIrUoKiypcTQVHjK4g8H2dWEQ'. - 'B8bvUDLSQXSr41rmEAAAAASUVORK5CYII=' ; - - //========================================================== - // File: diam_yellow.png - //========================================================== - $this->imgdata[3][0]= 262 ; - $this->imgdata[3][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl'. - 'BMVEX///+AgIBmMwCZZgD/zADMmQD/QLMZAAAAAXRSTlMAQObY'. - 'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'. - 'AHdElNRQfTAwsWEwcv/zIDAAAAbUlEQVR4nFXJwQ3AMAhDUdRm'. - 'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8'. - '6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R'. - 'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg'. - '==' ; - - //========================================================== - // File: diam_lightblue.png - //========================================================== - $this->imgdata[4][0]= 671 ; - $this->imgdata[4][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA/1'. - 'BMVEX///+AgIAAnP8A//8Azv8AY/8Aa/8I//8Y1v8Izv8Y//8Q'. - '//8InP8Qzv8Ypf85jP8he/8Yc/8Ia/8pe/8p//8p1v9Ctf8xrf'. - '8prf8QnP8Qc/9CjP+1//97//9r//9S//9K//9C//85//8x//8h'. - '//9r5/9K3v9S3v851v97zv9Svf85rf8hpf/G3v9SnP9anP9KlP'. - '8xhP/n7//v7+f3///n///O//+U//9z//9j//9a//975/9C3v8h'. - '1v+E5/+17/9j3v/O7//n9/+95/+l3v9jxv+U1v8Qpf9avf9Ktf'. - '+Uxv+11v97tf9rrf+cxv+Mvf9jpf+tzv+Etf/O3v/39/8Akkxr'. - 'AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACx'. - 'IAAAsSAdLdfvwAAAAHdElNRQfTAwsWEiHk6Ya/AAABGUlEQVR4'. - 'nHXQ13KDMBAF0J2o0E01GHDvJa7p3em95/+/JQJMYjDc0Yt0Zr'. - 'VaAaxHgtxwbSGPkGQpOIeQ2ORxJiJmNWYZyAhZR0WcgQGhViU0'. - 'nEGoedDHGxgRapRPcRpXhOr7XZzCmLjaXk9IIjvkOEmSRLG62+'. - 'F5XlEElhA5sW21GvXj6mGlDBfnJ51lr9svnvEKwH1hu2QPbwd3'. - 'N9eXVzuL7/Hn29frdKaamgcgy67L3HFG9gDefV+dm5qme4YRXL'. - 'oVR374mRqUELZYosf84XAxISFRQuMh4rrH8YxGSP6HX6H97NNQ'. - 'KEAaR08qCeuSnx2a8zIPWqUowtKHSRK91rAw0elmVYQFVc8mhq'. - '7p5RD7Ps3IIwA9sfsFxFUX6eZ4Zh4AAAAASUVORK5CYII=' ; - - //========================================================== - // File: diam_purple.png - //========================================================== - $this->imgdata[5][0]= 657 ; - $this->imgdata[5][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA/F'. - 'BMVEX///////8xAP/OAP+cAP9jAP9rAP+cCP85CP/OEP9SKf/O'. - 'CP9CEP9zGP9rCP+lGP/WOf/WIf9KIf9jOf+MQv+EMf97If9zEP'. - '+1Sv+lIf/ne//eUv/na//n5//Oxv/Wzv+chP9zUv97Wv9rQv9a'. - 'Mf9KGP/v5/+te/97Kf+9Y/+tOf+tKf+lEP/vtf/WMf/WKf/v7+'. - 'f39/+tnP+9rf9rSv9jQv9CGP+ljP+EY//Gtf+tlP+Ma/9zSv/e'. - 'zv+UUv+9lP+cWv+lY/+cUv+MOf+EKf+UQv/Opf/OhP/Ga/+1Qv'. - '/Oe/+9Uv/ntf/eWv/eSv/WGP/3zv/vlP/WEP//9/+pL4oHAAAA'. - 'AXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAA'. - 'sSAdLdfvwAAAAHdElNRQfTAwsWEjX+M1LCAAABDklEQVR4nHXQ'. - '1bLDIBAGYFqIEW+ksbr7cXd3ff93OUCamdOE/Mxw882yywLwPz'. - '+gNKotlRFUVnNUQlCxTMRFCKEdE+MgpJaEiIOU4DKaoSIygtb3'. - 'FBUQrm3xjPK4JvXjK0A5hFniYSBtIilQVYUm+X0KTVNiYah+2q'. - 'ulFb8nUbSovD2+TCavwXQWmnMA6ro+di+uR5cPzfPhVqPV3N1p'. - 'n3b3+rimAWAYhP3xnXd7P6oc9vadPsa1wYEs00dFQRAFehlX21'. - '25Sg9NOgwF5jeNTjVL9om0TjDc1lmeCKZ17nFPzhPtSRt6J06R'. - 'WKUoeG3MoXRa/wjLHGLodwZcotPqjsYngnWslRBZH91hWTbpD2'. - 'EdF1ECWW1SAAAAAElFTkSuQmCC' ; - - //========================================================== - // File: diam_gray.png - //========================================================== - $this->imgdata[6][0]= 262 ; - $this->imgdata[6][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl'. - 'BMVEX//////wAzMzNmZmbMzMyZmZlq4Qo5AAAAAXRSTlMAQObY'. - 'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'. - 'AHdElNRQfTAwsWExZFTxLxAAAAbUlEQVR4nFXJwQ3AMAhDUdRm'. - 'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8'. - '6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R'. - 'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg'. - '==' ; - - //========================================================== - // File: diam_blgr.png - //========================================================== - $this->imgdata[7][0]= 262 ; - $this->imgdata[7][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl'. - 'BMVEX///+AgIBmzP9m///M//+Z//8hMmBVAAAAAXRSTlMAQObY'. - 'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'. - 'AHdElNRQfTAwsWEwCxm6egAAAAbUlEQVR4nFXJwQ3AMAhDUdRm'. - 'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8'. - '6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R'. - 'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg'. - '==' ; - } -} - -?> \ No newline at end of file diff --git a/html/lib/jpgraph/imgdata_pushpins.inc.php b/html/lib/jpgraph/imgdata_pushpins.inc.php deleted file mode 100644 index f15d115e25..0000000000 --- a/html/lib/jpgraph/imgdata_pushpins.inc.php +++ /dev/null @@ -1,541 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -//======================================================================= -// File: IMGDATA_PUSHPINS.INC -// Description: Base64 encoded images for pushpins -// Created: 2003-03-20 -// Ver: $Id: imgdata_pushpins.inc.php 1106 2009-02-22 20:16:35Z ljp $ -// -// Copyright (c) Aditus Consulting. All rights reserved. -//======================================================================== - -class ImgData_PushPins extends ImgData { - protected $name = 'Push pins'; - protected $an = array(MARK_IMG_PUSHPIN => 'imgdata_small', - MARK_IMG_SPUSHPIN => 'imgdata_small', - MARK_IMG_LPUSHPIN => 'imgdata_large'); - - protected $colors = array('blue','green','orange','pink','red'); - protected $index = array('red' => 0, 'orange' => 1, 'pink' => 2, 'blue' => 3, 'green' => 4 ) ; - protected $maxidx = 4 ; - protected $imgdata_large, $imgdata_small ; - - function __construct() { - - // The anchor should be where the needle "hits" the paper - // (bottom left corner) - $this->anchor_x = 0; - $this->anchor_y = 1; - - //========================================================== - // File: ppl_red.png - //========================================================== - $this->imgdata_large[0][0]= 2490 ; - $this->imgdata_large[0][1]= - 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABm'. - 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'. - 'B3RJTUUH0wMKBh4Ryh89CgAACUdJREFUeJy9mNtTFFcexz+/7p'. - '4Lw1wZJKDGCAwmDAqUySamcCq1ed6k9mn3UfMP7F+1T3nYqn2J'. - 'lZdoDEjpbq0KG8EBFBFBEJye6Zmenkv32Ydu5GYiUMmeqq6uqT'. - '6Xz3zP73aOcIKmAQkIFyD3N/jrBPwlKjLQEglVlJKyUjR3u7cc'. - 'WLoP3/4dvv03LNrQ8I6x1rFbDML9kOmHvh7IRHU9JKmUSG8vpF'. - 'IoXX/TV0AiEM5A5jT0noFMFMJHXUt/d5f9TUAbhtQ3cPFruDog'. - '8klHMnmO0dGYe/myOJGINEwTz3F2higFXgy8PpAkOC+h8hoaCt'. - '4ppHFcQAWSgOQlyI/p+lUjmRxWAwNJd3xca/f34yoFi4tgmjtD'. - 'NIFkJ4xcgBCgVqEBFJ9DqcZea/gNAAVEg7AOGYnHe9XoaJd3+X'. - 'LISSSwnz6lsbKCZ9sHh4UVdBkwdA6cPwNnIfJPmC3Ctgft3wwQ'. - 'QPkvTZJJnbExzfvsM2nMzVG7e5fG48d4lnXwTwEYCjJxuHQBog'. - 'BHUfKkgAIIhiGk06hTp/Dm5qS1uYlXLvtWd4gPgIiCrAEcVckT'. - 'Ab5p7TaYJrK1hQaEenrwSiVfQdc91P0kSp7Ii89D5ksY/kAkLy'. - 'IZXFdXkQjS1YUSEbdcRu168V6+HTUNIKJDRwdE+sBIQmP9Ld59'. - 'bEBA3of4F/D+uXb7rGaaCSmXI3pPj64PDaHCYfEqFVSjgWo2D2'. - '73XlJNQTgCyQykIuBWoNKEeh1aLXBPBCggGdBOgxZVSjoajVhH'. - 'o5HWlIpq4bCQSgm9vXhK4ZZKh5SUYygp4J1EQVUD9xlU18BJQD'. - 'bUbJ5T5XJStyxN9fSI099P3baxV1dRloW2h2ivx/yakg2ot6F1'. - 'EkCa4G1D+zVEq5ArKTWM42Q6HUczQV7U66w9e0ZpdRXlOIQ5vF'. - 'VHUXILKify4jiEzkOqC3peQMoBQymFlMt4Dx6wUSxSsm2UZXEK'. - 'P30QvOUt8/2Sd78CdWwFDTA+gsw3cOlPcPUD+CQB52oQ21RKXM'. - 'eRhGXhOg7VoKrx8KuS4ygZhVg3ZI8FGIfwR9BVgAtfwxdXdP3L'. - '86nUR91dXelNXTeWWy10paQHX602YAP1ADASAL7LJvFtMpOCc0'. - 'cG3FHuGlz6Gr4YEpnoTCbzsdHRbOzy5RCRiLRMk5rjyOtAimwA'. - 'U4U3SurBN/0wnAASBCVDIKpB4kiAB5Ub0/UvO9LpPAMDGfn005'. - 'AxPCzxep3Q6iqPLUseBoufCZRsAE6g5g5kKIDfKUj3wnpAG8QB'. - '/Z1OIqANQuI65AtwNScyYXR2XlAXL2YZHzcklRKWl5GVFXFtGx'. - 'MoAiV/EQaAGH6BUQNWgQpwFngv+Ca8KUAQEBcwgTJHyMV7679R'. - 'XS8YqdSI6u/PMD5ukMtJY3GR2uQkr5aXeWVZOEALmA8WsIAxfL'. - 'd0goVLAdCOd+/YpgqeVtBv4yiA++q/RKKXixe7GB8PSyoljcVF'. - 'yg8fyubyMpulEk2lyAIfAAvAC+B+oOQFoAt/+0rAejB/EzjNri'. - 'vvqNnCd64jxcE39V8spnP+vMbAgDSePKE2NcXm06dslMuUlcID'. - 'TuFvqwXMBU8N39bGgRR+ki0Dz4L5DSAe9NGD7zq+6kcN1L6H2b'. - 'ao5WWaQHllRTafPmWrVMJUimoAQrBYJFjQwre7B6A8YAi8LCgD'. - '5DVo6/hbb/iHK1KggvFeD3hHziQKEMuiNTNDbXGRTdtmw7Iwla'. - 'KGH0oqwbscLOoG46rAY6AOzRhY74PT6QuUKEN4PegXxd/yEDTT'. - 'YMWOk+oEaLkuFdNk0zTZwjfkavDUArXWgGXgFb4dEShXhfYqlI'. - 'ow3w9rg3B6ED60IOOA5oEYQBrcpG+mj9bg0VG8GMJhVDZLyzAo'. - 'VSq8rFYxXXefcjVgG9+uisDrXUCApoKSBcUHMBmHhfcgNwhtD3'. - 'q9IG6Lr15b4OUTmPwBJt8JqGuapp05o0mhoHnptLQfPsR+8IBK'. - 'uYyNH3yr+B77LHheA3tK1Ta+IrMeTL2C6Xl48TOsNWDDgAz7s5'. - '/r+krP/eddCsbj8fDQ4GBm9MqVvvRXX2VULBayRGRzaYn1SoWa'. - 'UjgB4PIB5QK4ZgBXBKaAHxQsrED1H7CRgCUPwgHZDqACmhWwXv'. - '2aDRqGYeRyufS169cvThQKV88PDuYbW1vJ5VRK+5euqxWlPMdX'. - 'SRqgreHbZGN3ijfKBXBTAeh2Fdwi2MofshP/dvKwCmKhp4m83Y'. - 'vj8Xg4l8tlCoXC0MTExMTFkZE/1m37wvLGRvKRacoD1209E7Fc'. - 'pZwYREOQqEJ4z3HskHLsz4AoXykPIBSN0t3dTTQafROoHdumXC'. - '4fjoMiog0ODiauX7+eLxQKV3O53ETdti88nJnJ3rl505ifmWm3'. - 'arWSodR8GNbycDoNHy5C5jFold1k8d+DyvELNwg93d18/vnn9P'. - 'X1oes6nufx/Plz7t+/fxhQKSWJRCI5NjaWHxkZKdj1+sjSwkJm'. - '+uZN/dZ337VqCwullGUVdZjsgIUC5LqhrUPvCugWuApeApPAzY'. - 'PKHWyaphGNRunt7WVwcBARwfM8Ojo6sCzrMKBhGLphGFEF2Wq1'. - '2jc7M5OZ/vHH0MPbt93awkJJmeZsC6ZaMK3DCwvWdNioQUb5B6'. - 'AdBR+9SzkAz/NwHIeXL18iIui6TjgcJplMMjY2th8wHo+Hh4aG'. - 'MsPDw6fddru7+Phxx51bt/RbN260qwsLpZhlFZsw9QJ+2Pbrga'. - 'oJG2FY2oKwuTtVEz9uV34NbqdtbW0xPT1NNBoF4MyZM1y5coWu'. - 'rq5dQBHRcrlc4tq1a/l8Pj9RMs38ndu3Ez//9JNXLRZNyuXZJk'. - 'xVYKoExQpsK/+IaAuYb7no8zjC/R+A4zisrq7u+53NZjl16tQ+'. - 'QIlEIslsNpuPRCJXZ2dnh2/duNFRW1oy07a96MKd575yxRqU1B'. - '5vPMpF5HHa1tYW9+7do7Ozc/eQpZTSQ6FQt1Lq8pMnT/5w7969'. - 'nuLcXE1rNufO9fRMhlKpOyvt9qPtVmvb25fFfvvWbrepVCqHwo'. - 'xaX19vff/996ZhGC8qlkW9Wt1Onz073fXxxz+6MB+9e9dUjuO+'. - '7ebq9wLdB9hoNCrr6+s/4wf3FCJW3fPmTZhXsNWCprjuW66Dfr'. - '928KAfBhJAEgiJSLuzs7OSTqctoFkqlZRt26j/I+L/AGjPTN4d'. - 'Nqn4AAAAAElFTkSuQmCC' ; - - //========================================================== - // File: ppl_orange.png - //========================================================== - $this->imgdata_large[1][0]= 2753 ; - $this->imgdata_large[1][1]= - 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABm'. - 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'. - 'B3RJTUUH0wMLFQ0VCkHCzQAACk5JREFUeJytmGtzG0d2hp8zNw'. - 'AEcRdJ6EJK9FL0CqZUm9jWbkwq3vhDstl8dmLvz8rP2H8Q75ZT'. - 'pkRfpLgqsS6WIFEKGYkiSBCDO+banQ8DUpRWEkklXQUUqlCDfv'. - 'rp857pgfAOQ4AMOJdg4R/hX96Hf06bvDc5iT07i8yeg8ksiIAI'. - '4TBi/ds9/vivD/njapNHvRBfHXMu410AM+BUoVSF05NQsi1sO4'. - '8402AXwLQTuP31OAZO2aG0MEn14iSlnI1z3LnMk8IZYJyBwjIs'. - '/TWsVIWPJkvMFS4zMfMhUp5BsoCpAAEBLYKaMFGn00jBxnvu02'. - '35+JHmSJEnBpQEcPo38MmCxd/nS9Ry71Ga/g1W9a8gn0GsHkgA'. - '6DGjxkqb5CoO+YxF3A3p+jGjQUzoK+L/V0ADzFMwtSR8eLbAr8'. - 'uXOTf9NzhTc0geSLUQcYHgYEH786RMg0zWJHV2Aitv4x/HpHVS'. - 'QA2YBqTTGIUq5qkPMWaWkVwPnPtAA/BevmZcjxaaUtHh8pJJGu'. - 'DpCB9FvT7A7YT7S3p5vFMNzmWo/O0MSx/Ms3TqI8r59zFTfUQe'. - 'I7SBODE3tnfoIxYnNHligwik0zAzDdVpyKbA8sff5YAeMEwgkV'. - 'cufQeTJzZoCsaFLKXPTnNpoUTNsSgJmNoGsuNQjIDwYD2HlnZy'. - 'k++yxTKXZfKTU8zOpjhneeQYkorSmGERtIlICBKRbLX+y98YN3'. - 'ADcNIm+bJD4U3pPnmbEaRgYVRTGBkDSSsmxKfY7ZLuDJA4hdjl'. - 'JEgyBB2SJOvQ9RzTpNKoEwNq0CNFvOXR3/HxMgYVPObaz8kPmh'. - 'hkEWMatAfRONGGvLizyOE9P8KkpwhPDAgQKJQbELUD0oOIhbbH'. - 'JeVTmowxjAgZutB5AoOngA+2DdYrcTyOyYZP9+QpBvI29vwEhb'. - 'It042BVQgDy9KTMfkwQG1A9ACCLlgBBGUwxxoc52WDh2ATyEPp'. - '1hoaPvrEBh0Dq5an9OUsl/9hylk5b5c+mowLc4E2Jtw4Eoljyf'. - 'ogA/AGEAagNRjGyUxOmEycyVA5EWDBxrmUp3ytLIv/NJP69Goh'. - '+9mFydIvS5PZYkvH1oY/RFtKymlwBFQAgQd+kAA6qSQ8pvn2mp'. - 'SkJkuVFHPHBnQMrEt5Sl+e4/Lvp51PF1PF5Xy6WMvOWZXMom8z'. - 'OZTQ8+j5sbQiMEwopsCIwRtBGIJSCdzbTGo9NimkDcgdC7Bg49'. - 'TG5n4/nfr0Si77WdYp1YzyZEkWPdteaEnB7pPqBTxuIf/VgciE'. - 'SgasCPwh+GNIkaNNag1RiPge5pEhMQVjfoLcF+eoXSvbKxedwn'. - 'LKzC3KWbOi5/sW5a44/SHFUSgVA7SCzRG0AvA9mPOgFIETgu4n'. - 'Ww0wNQWFAqRSL6D2ZQYBdDrQ7R7jXiwgRcvIL02makuTmWtpM/'. - '+BlLMl5vuWzLVEuwH6oYnR1KS8kJINGXMM2YdfRlALoQoQQKeb'. - 'bDVwoMdxQMaLCwLo96HZTF5HbrEhmOftianfZisfzueKv7ZmrX'. - 'MsjhxKXZGBjzyeEHmSE3oWiggtyVGmE8DTIXTC5NxgAxOAGUM8'. - 'fun9mnSSLQ/CxNzOTgJ3LIMgoGwkKBiiMyaVviHVkdCO4FEKNv'. - 'LQzWBYHfITPa4UBVM0LR/WB7ARJsdDDTjA6deYFIFUOimJ3d0E'. - 'sNdLavYYgBpthqKcjiiJRO8K6CK0CsJTjfQAGaJtD9vQFAxNNQ'. - '1FB0yBAfA8gdMAIagLoCVAen0M00zMOTYShNDtoHs9CAIUoI4E'. - '1IBihCdNhsMhsj6NuV7BCC2IBpBqQaaFOENCCeiEsO1BO4RQgy'. - 'I5Hm4k4oIU9MrgZSAdBeTabZz+ODxKQRRBFBJo6IUc51anYRQo'. - 'dto+24FNxYCiaWKkQsj00KkO4gxRRkAngJ868M0u3OkkM+hxQA'. - 'cQ7YD7GO5XYSsPZybh/TCkFIYY+kWniTW4Q7jXgHvHMhiRpmuW'. - 'ca08GZkkZ/nY6TZMNhCnf2CuPoDVJvxpB+q9BHA8Ag1uH+oP4c'. - 'YEPCzDwmzSLquShHW/E0YRbG/BjZtw40hAy7aNzJlzRn75E6N0'. - 'qiwTzafI7kOU3gWrhzZC2iHcbsPqLlxvJnCt4KC1RYAL3I5hzY'. - 'Xv/huePYCtITQMKEnyB4KQvMURuJvw889HGSwUCs7CwkLpo6tX'. - 'Ty/+7nel6VLGDn/8N9m+eZuo1UP8iNhLau6b3RfmOsHBGTUYw9'. - 'WBNeDrGB4+h/4qNLKwTnLbHj9CJw/6GoIh9Jpvq0HHcayFhYXi'. - 'l3/4w9LK8vLKexfma3G/mb/3n1njTivS7tNQaaU1grQDjJ868D'. - 'Axx6vmxnBrY9C9IcSbSXbavNjb/S3eN6/0m1JcKBScixcvllZW'. - 'Vi6uLC8v12q1v/M8b/HxVjP//YYr32yE4dYWvShO0ogi14xwxq'. - 'F4rbnxZ3cMjtpvEEeMvwA0TdOYn5/PffHFF7Vr166tvPeLXyx7'. - 'nrd4+/btyg/frFo//Xgncnd67qCn78earQqcmYD3fSi1wPCTSV'. - '3gzqvm9uFOMl5nUAqFQn5paal26dKla57vf7D+6FHph9VV88af'. - 'vgq79bo70e3VT2l9A3hYg4UiRALVHTCHSZvYBm4A//6quf8zoG'. - '3bpuM4acMwKr1+//SDe/dK31+/bv90/Xrcq9fduNW6rbVeC+E7'. - 'gWdD2DKg4UEpBmPcm10RuScida31ntb62HAigoigDw6Gh0axWH'. - 'QWFhZKi4uLZ+I4PrVer2e+u37dXPvqq6hbr7tOp1NXWq89h6/b'. - '8FBB34WGBesdcPrj38lkMkGlUuml0+mu53nR3t4eo9HoSLhMJk'. - 'OlUiGdTuN5Hq7rvgA0TdO4cOFC7vPPP6/VarXldqdTu7m2lrv7'. - '7beq++BBO263b/tKrfWSXlbvwJ6CuAtDgTYiaBFMw6BSqfDxxx'. - '+rarWqGo0GN2/eZGtrC6XenAkRoVKpcPXqVWZmZmg0Gty6desF'. - 'oIhIOp3Ol8vlmmVZK3fv3Lm09uc/Zwbr653ccPgoNIzvnmn99Z'. - '7W9QG46lAaM5mM2l95GIYUi0VOnz7N7OwsWmsymQzyuse5Q8Mw'. - 'DNLpNDMzM5w/f/7A6AGgUkoajYa9urpayOXzUz/fvZutr68Pim'. - 'F4/2y1+n2o9Q/ru7uPesPhXnyo4A+vfHp6mmazybNnz9jZ2UFr'. - 'TbPZJAhe+8/aS0Mphed5NBoNABqNBqPR6MWBVWstvu/nnj9/Pv'. - 'vo0aPq5uZmPBgM/qcwPf39xV/9ajU1M3Nvq9PZaw8GoT50PjdN'. - 'k6mpKa5cucL58+eJ45j19XWePHnCzs4OnudhmiaWZRGGIVH05r'. - 'yEYYjrumxubrKxsfFyDQJ6NBp1Pc+7C4jWumBaVm+kVL2l1H2l'. - '1G6otS+H6V6z8u3tbVzXpdFooJRicXGRqakptre3uXXr1ltrcT'. - 'Qa8ezZszemWAE9rfUdYBOwtVLRbrPZ+48ff+wDvuu6Sr3MB4Dr'. - 'uty6desgfa1WC3iRyrNnz4pSSmezWUzTfGtYtNYcdvC/9sMlgP'. - 'n5N4cAAAAASUVORK5CYII=' ; - - //========================================================== - // File: ppl_pink.png - //========================================================== - $this->imgdata_large[2][0]= 2779 ; - $this->imgdata_large[2][1]= - 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABm'. - 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'. - 'B3RJTUUH0wMLFQolY9lkpgAACmhJREFUeJy9mOtzFNl5h5+3b9'. - 'Mz0kzPBWmEVtIiWYhIiC0HCDhB8lb8ISk7nzdZ5+/zJ/8BTmpT'. - '660CZLwG1pVFgBkgGIHECEaa+/T9nHzQCCQuRpCNz6mp6g893U'. - '8/c37ve3qEjxiC4OA4n/Lp/EUu/tsMM/+aEWduVBx7WhdkShcY'. - 'xUH2zo0Dwod/5N6vf8V//PoGdx8M8EOFPtK9jI8BdHCcMuVSmf'. - 'LxHLmSZdm2U8xIbmKETDGDZZnIy4dBbCynyGhphurEDBOlHFnn'. - 'qPcyPxTOwDCOccw7w5nlBRZWylI+ny/mZ6rL1dzUZ5/IWGZU3D'. - 'ZIOMQDDaJcHDVGWUbJBi9odVr0QoVSPzigIEaZ8vgSS/8wZU3/'. - 'k1fylipz5dLM2WlrZqHKaGCKbEbontq3KAKWQyZfZKTgYqc9Bp'. - '2I2PcJ4ogk/UEBQcwipbFZmT13vDBx8fhnE1Ofnp9yJopFyT3X'. - 'yANfks0QHSQMDaL37pOxMLIu2UyVkjVKLjyKSeuD8dAYCFkso1'. - 'gYMaeWJ40T56cl8yAi/O4FSa2P6kYczIDsgVpAqcDImZPMuAB1'. - 'dkLQtcc8a/bwox8IUHAxZVxGZMouSLVYwKuMkD5IxN+JSdsRJB'. - 'pexuTVgYYM6EoGmxkmg3/hEhNUMr/hd7dqbOzExMn/GRDAxWZc'. - 'j3I8HiXfMjF2FQowKw7pjoN6E/Llw/GBJj8qxVOMlX4ipxc/lY'. - 'kl2zBLkmrTcEzMkoNoRLVidLi/9g+Z3I+1xRHX5EcAihxnbPRv'. - 'OTU9kZSmpKPy9FTGrLimPZ1H+UiyGaF67w6n7E1DwMngFDxGvc'. - 'w70v0xZUby5IxjlIyMssUJrJwVWkXBdbXvSvwEibcSdKCAFI16'. - '4/sc0SRo9cGAGq1DwvQFzV6DVuBiV4zYnlEts6A2TSPcSiXoxo'. - 'QqJCEEFMbQ2b69o5qMiOOPqIMQkagu/aSL7waE8101WFShLjk9'. - 'yxgEvjRUiyYd+gwAjY2J9VpXfZ/JEXLhDp3OR6U4T97+hEnPwx'. - 'tv4HsRjy2tTQSFzQgDUnwSLBQRI+x1ZgcH87Vcv4SF19Kt0ezS'. - '1h9s0Ma25pgr/YJfnLnEysok0+ezjM6EBLldGqKIJYuDRhOQEJ'. - 'Oih8X9Q0xmcXNjlCofBJgn78wxVz7L2YWf8tPPz1hnfjbjzfxN'. - 'qVwutq2etZXUQSXikcXGIgUiUkJSDIQMJgYGJsaB3c7b1qQ4GZ'. - 'xSkdGZIwMeNLfK6uezMnvJK3pLxeVixfvMsyVjSNSO6IV9adPG'. - 'AArkEEz8oUkFmBjYGO80qfd6pCWIayD59wIKcsjcKqufn7JO/S'. - 'xfyi+5c24pey5rZ09mJRNkiDdT/tzbkBr3SYkpMYpgEaIJSYhI'. - 'kSOY1GhilAQk5ntDIojxCZ/kf87Pl85xbuWEnLiUy+cW3NNuJX'. - 'MmY5meKf6mT7wZS+THdOjxlG06tIlIOMZxchSxcFFEGAwAGGME'. - 'jwyZYSnWL3cXWiIUbUI6hO/vxXuFOV84ycmlBWthNeflTjuzTi'. - 'lzJmM5s46Ej0J63/ZoPmoy6PYxtYVNhmfs0mbAND1mmKVMBY1L'. - 'mxA1LN7WgXQbCApNhKJHRIM+DQbv7yQGhjnJ5NgFuXBuxpu5mD'. - 'udm3LPuY7pmZLUE6L1SIJaIPFuDAqyw9lnwDYv6NFHkWJh4ZDB'. - 'wCBFD3uMxsTAwcBAiElpE/KcPg36dIiOvpsRxDCyhmlP2YY9ZU'. - 'v8NMb/1id+FGO0DTztkSXLOONUqeITsMkW2zwnJEIDFhYGx+A1'. - 'kwK4mASkvKDPc3p0iYhRRwYUhZLUTyV6Eu0t4s1Y4kcx6W6KaM'. - 'EZThcXH59RRhGEgIAddnBwNEBKqqpUtWBIF22YDIhJsbEkJqFN'. - 'qLtERHs7GnUkwISEQAf0uj30bY39PzbiC6qrDu2cExJ69Nhhhz'. - '59UlIUipCQOnVi4sjG7ubJBy6um0C+he/0iDHQKIQERYyKFLqr'. - 'SI/W6kJCnvOcrWSLSquC1/Jw9Ks3R0FQKHr0uMc9bnCDGjX69A'. - 'H0XlcJkibN5jOe/alCZStHbjJL9lSMLkXExvCXRiDV6GZEeGeX'. - '3TvvBVQoEjfBL/v0rT75Th7VU5C8gktI6NLlMY+5yU3WWGODDf'. - 'r098tHpNFNH7/2lKdXXdz7efLzVaqJIBOCmK8AJUlI6g0aV+9y'. - '9+p7AR3bMQpTBWPy7yeN6fy0jNwewfpvC9Xe+3kFoUuXe9zj5n'. - 'BusEGHjh6GIAGawC2FWuvSvbbF1maFylZAsC1ISZADBiVNSJrP'. - 'eX73MY//skHP85z5+fnSxQsXj//4n39cmnPn7LbZlsajBmEnBL'. - '1nuEGDG9x4aa5Ldz+h0RCuBqwBv1Wo+7vs9r7n++0MmYeAM+zB'. - '+61EK1QUEnbbtN+9Bh3Hsebn54u//PdfLq9eWl2ZnZ1dSnaSwu'. - 'Pin40b9g3doKE0WoNIl65xj3v75njd3BBubQi6ExKmDWkMRKSl'. - 'tSbVKQcMao1Go5Ugb0+x53nOyZMnSysrKydXLq1cWlxa/McgCB'. - 'Yev3hU+GPrD3I5/q94k3pXYQY58q6B5Bs0HB//neaGx00gyWaz'. - 'VCoV7bquCoKAnZ0dfN/f03egLGj0m3XQNE1jdnY2/+WXXy6trq'. - '6uzP3oR5eCIFi4detW5feXL1vr679Let37zVB3/mQytjXJwmSB'. - 'wikHp9ShY0RESqObwPrr5oBERKhUKly4cIFqtUq9XufmzZtsbW'. - '2hXvuDwTTNtxZq8TyvsLy8vLS4uLgahOHphw8elL69fNlc++qr'. - 'uFOrNXPddm1cczVL5f5P+Lv5MuOJgTGxwYbZpZsCdeAq8M1Bcw'. - 'CGYeC6LtVqlRMnTjAyMkKn0yGXyx0N0LZt03Ec1zCMSrfXO37v'. - 'zp3S769csb+/ciXt1mrNdHf3ltZ6Lca8ZpJsduhtCdb2gEFJoQ'. - 'xADYHuHDS3f32lFEEQUK/XGRkZoVAocP78eZaXl9FaI/Jq25Uk'. - 'yWHAYrHozM/PlxYWFibTND32sFbLXrtyxVz76qukXas1M61WTW'. - 'm99gx+20TdN9jqtfjP7QzOwwYNp037Zd0DukDnIByA1pqdnR2+'. - '++472u02Z8+eZWJiAsMwDsEBRNGBzYJpmsaJEyfyX3zxxdLS0t'. - 'KlVqu1dP3q1cLta9ekU6u1dat1J9b6Sk9kraV1rYXegW7apDYw'. - 'kFY6fPc4MNTw88bwfZ/NzU2UUnieRxAEiAiGcXiXfcigiIjruo'. - 'VyubxkWdbK7fX1xWvffFMInjzBM82uMT5+p++6V1UUrSe7u03t'. - '+8lezlKt3gHyl0aSJDQaDa5fv876+vo+w6FzDq1BpZRsb2/bly'. - '9f9vL5/Njdu3fzG0+eMJHNxsfn532vXN5NPG/7abPZal6/Hvfe'. - 'kroPHfsm98f7AHW9Xo+//vrrlmVZm71+37QNw3JnZ9PK4uJGpV'. - 'pt4Dh+vLGhsrmcfv1iHzu01m89HjIdCon2fb8TBMHtvYeRUn50'. - '1Oj4vqp3Ok1f5LYSadfr9dQfDN642P/XeF2DA+SBAuA4jkOhUK'. - 'BQKESO43S11p3BYBDt7u4y+CtB/i/q7jp1GMiw2AAAAABJRU5E'. - 'rkJggg==' ; - - //========================================================== - // File: ppl_blue.png - //========================================================== - $this->imgdata_large[3][0]= 2284 ; - $this->imgdata_large[3][1]= - 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABm'. - 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'. - 'B3RJTUUH0wMLFRAiTZAL3gAACHlJREFUeJy9mGtv29YZgJ9zKF'. - 'F3y/Q9jh05tuQkarKgbYasde0UBdZgwNou/Vqga/sD9mP2B4a1'. - 'BbZ9atFPxb5sqOtmXbI19bqsluPYiR3HN90vFEWRZx/IJI5zqa'. - 'x0OwBBSgR5Hj7v+55zSEFXTUgIJyA9C6/9RsjMjAyFIxxJCDc7'. - 'iBqKgyZACGg3G2x9+xXf/fG33P3mC9qNKsp1O+1JdkEnQTdgIO'. - 'ttCSMUi8gj072MnugllAyB9G8rBGi6RsToJTF6iuRoFi1kHKZf'. - '7fB8Iggj0/Dy23D2dakNTR3JDsXPvzstxmZGRMER1EwHhQAEgE'. - 'CLhIkPD6InY9S3djGLJVBtQP1Qb4HDAyoJYQOOZkPx49nhTH9i'. - '7MUBGT7egxkJgd70wZS/CUkoZtA/fRoE1DZ2ACiv52ibReCp4e'. - '7CIEHomxDiuVdGTqUnf/ZeOjR8fpiVXZul5ZrY3bWwbdcLr/dA'. - 'AAIpAwQjUWIjQ+g9HZvswiCgBVF9/SI6OSLGzo0i+oLi6+Utbq'. - '+bKEftgwOE/0Ohocf66M+cBjo22U2RQLIHMhmYnvaOpR9S8bSU'. - 'UqCURGpRkuMZMm9cIvPGJZLj0yBjT2LprkiSkykx9cuXIhOnUs'. - 'm+QNC2XdG02ggBTcvFabsPWwTPpBAChSCgh4kYBpoeplWp47Qs'. - '7EYDt21xINzd5GCAxLExRl89Z+nHjpbKMmjbmkgfDzI0JEW53K'. - 'Jaa6NcAOEX8v52uJzsBlAS6u0hcnTIccPRqhWPCUcLD+s1EaUp'. - 'HCEhEMCyHNpt9SjgIU12A6iw6xb123vYhaaKjB9tlgMD5X+uBp'. - 'zdkpg6azA8EaNQtKlVba+Xez4eCntnJrsDdFsW5nYFpxlFN846'. - 'DXe8utkM4mhi+EgQmjYbS2WqexZKk6BpjwJ2YlK5VjeA3pNDiH'. - 'YjRWPzPE7tmBo8EWwGhkXx+z3uXL7D3rU97LIF8RBEAl6lK/Uo'. - '6JNM1rZ2aTcr3eUgIQOGTgbdwXMGyRejenLYTvQGbAdRuetSud'. - 'OivVuFZgtCEgICghICnZoMhmlVTPR49LCAEkQUhk/B7KXe0MWf'. - 'nxj8xVR/cDheK14WZmtVMJSBnlGoN6FmQq0FLfdwJgORKPHRo/'. - 'Snzx4G0F/FjJ4KiOdmjPCrrx8bffnMybMv9MQGNG3rzlVqtR1B'. - 'sh/CYXCD4Aag1oCW7ZnUOjSp6WFi/QNEB8Y7BfTNjZyCmUvJ0I'. - 'XXT47MTp98Ybon9VZCk8cVazfqlNargsY34G7ByAlIjkHd9CCr'. - 'LbBdiHViUgiECuDKYCdz8b2cywREdiYZOj8zNnLuzOTzx6ODp+'. - 'OaGaqwVzBFqz0Idhz2loE7YEwBLaAJLQcKbW8qjAcBF5Jh0AMP'. - 'IOHe6kxgtb3UMO2OxkF//ffK28nQqxfvm3szrtnDVa799Qb/+v'. - 'NtsbNSpm3tAv8B+w7Ub0FhAyoBcMPec9oK6raXk48ziQBXQcmC'. - 'pT3YqHa0mpEBkTR6wz/Jjo2cy04+fzwxdDquNfQKO7sFUbpu0c'. - 'wp3JoAYsA42Bbkl4GCryUNDEM7Avm6Z/CgSYBWG8pNuFuDu1Wo'. - 'tjoxKIJGeHIiM/jmK9NnX5ycuJQMtUcqXPvLDTa+qIie4hAJ1U'. - 'vdrmO2HaDfB931twJgAn1A4lGT96obPHPLBbhVgUoTHHWo9aAA'. - 'JVAKpyKEmQNzWRENAsL18ycKjAFN/9gCNvzLB/390MMmE7pnDi'. - 'Bvwt0K5Jv3O+0oB22nJ1Vvjb/UMhOpcKknqN1OiMB2DNHU2G5s'. - 'sVndpGJVcZXjX1IAlvw9PmhRQcOFPhsSDkiBrQR1G7brgs0a7D'. - 'ag3FK4rguqBXarI4Nt1SJv5gls7TEWtJDRBO2GwnIs8maevFnA'. - 'Gx6awLZvzeTBu4kFbLigijC47pscpx0xyDfkvtUEnlarCDtrUC'. - 't2HGIhvPHVdVwqjTIrxRU2a5uUrYoP0QZ2gMvACl7+3V/LuKDq'. - 'sJuDy597516+CEezIHXv7vcgXQu2l+Bvn8He9Y4AE4kgk5P9DE'. - 'R6aFdq5Et5Nit3yTf3m9sBcsAN3+D98c0Fit5JawE25r1zg1Fo'. - '5B8GFD7g+nVYnu8EUEop9XTa0N/9dUbqcphP/rDJzbUClVbpgR'. - 'y2fXM3fND95qj75J8AC6BWPINfVSBieK+x+6cS5UCzCLu3oFV9'. - 'GqCMx2NGOp2Znpv7aXZudsool3T5J/179sxVlHJ4kGPrP2COBX'. - '/7DmiApWCjxIMXpYNznYuXM+6TAKWUMppOZzLvv//ery5cuDCT'. - 'SqVS336bCwr1JfAPB9r+2KAFwJS+OcETzZHz/7v3etl6ipz77X'. - 'GAMh6PG+l0OjM3NzczOzs3k0pNnFlbW43+e/GKtMqrblSsF03V'. - 'WHcJA0PjIAzvg9JTze2H67g9DjAwOTmZ+uCDD96anZ2dnZiYmF'. - '5dW41++Lvfa1fnr7qllVK9103mXNTnJgPA+YugsvB3HTaEl+Qs'. - 'AZ/yeHPPDCiTyaRx5syZbGoilV1dW00szC9oV+avusuLy0Xd0X'. - 'MgFkDM+zkYBZEHV8f7wwKu84zmngQoNU0LaZoWUa4K31y5qX/8'. - '4cfyyvwVN5/L10NOKNeg8UmDxoKF5Vfj1xXAgD0JrgAcvBDfel'. - 'a4g4AykUgY6XR6emJiIru2ttZXq9S0K19eUcuLy8WQE8o5OAsN'. - 'Ggsmpl+NpoL1g9X4UBU+C9xDgEKIwNTUVOqdd955M9mbnJ3/cj'. - '6Vu5aTheXCQXNdVeMzAwJSCGEA2XKpnF1cXIzlFnOVhJPIKdR+'. - 'c88ctq4AlVKsrKzw0UcfKcC5uXqzXnNqSzb2pwLxOHP/l7Z/BN'. - 'eB01LKt4HTrusKvGr8jB+hGn8MQAkYQMrfw4Nq/MFPtf+rdvDb'. - 'k8QL+/5Z4Uepxm7bfwHuTAVUWpWaqAAAAABJRU5ErkJggg==' ; - - //========================================================== - // File: ppl_green.png - //========================================================== - $this->imgdata_large[4][0]= 2854 ; - $this->imgdata_large[4][1]= - 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABm'. - 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'. - 'B3RJTUUH0wMLFQ4hANhluwAACrNJREFUeJytmF1zE1eagJ+3u9'. - 'XdkvUty2AbmLEtEzDBgZ0UpDBOalNTUzU3czl7tct/2n+wt3M/'. - 'NVM12SSTQQSyW2TA+QAJQogtYYFtyfrqL3WfvWj5g8AEjzfvhS'. - 'SXjk8//Zz3Pf3qCMcJAWxMKlT4kH+jwu/FknnJSUItKFHzCrKA'. - 'BggBQx5ziz/wn/yBz3hED4/oaJfSjgVoYjJJgTLTZCjohp7IGT'. - 'k5aZ4kb+bRTR30Q7djj8f/kpPMUSCFedRL6W8e8qMQNE6S4xpv'. - 'c5HrTPFubiJ3ZnlyOXV59rJYU5Z00h1c3d0brxAiUkScRijisk'. - '6XLTyiN3s8HuAJpniXa/q8/pt8Or+0kF8oXJm5YiydWcIpOrJu'. - 'rjOQwd54AQwsMpTJYhPSoYuLQ58An/DnBQSdImXO8avsTPbqpc'. - 'lLp67OXDVzMznZLGxSs2qyIRu4at8gKHQEC50kE1icxqCAdxST'. - 'xjEA44tqaJlERl8uLWvvnX5PHuQfcCdxh5qq0aX76vj4WgWyXO'. - 'QiNgBP8IAaddr08X8+wHFmJSQhBbPAZGoSZSt5wQs6qoNC7UEd'. - '4AEoLIQSCaCCy78Dv8Tiv1hjjW1CRj8XIAgEKqDtt9keboMJZa'. - 'vMjuzQVd3Xr9prTJo+GF/jKZea95R25Lxs8jg5qFGiwDnOS0mW'. - 'NE0rjNRIt3WbklUCA9mV3Zdz8OBT/JfCQLB0SKYVVjGFYSfx/E'. - '26ow4e6uDujlPFQpE0FU6P8qNTHdXJdEdda0qf0itWBVM3pa/3'. - 'ccUlIECJet0cAJoeYk5EZCeS5IwEoerSxccJBwRqFFf38QCTaO'. - 'TRVFKJm3NTbtLNSyh2IkhIXsvLCesEGNCWdmwyruSD/z9kUlRc'. - '3bqNlSxhJNJ43p5JITrOEis8Qtr0cXEpU/JT/pmO18n2vb42pU'. - '3JnDnHMBqyPlpnoAaxhr2llv1ZUBqEGlqYwDQMsskMOcMgVL3Y'. - 'ZOQTHAcQQiIGjHCwCaiovjrv4hbcpKuJJjIcDHm685RGr4GLCx'. - 'YHkAcrLoAoDSLBiAQrMkjqybHJCbxgh+7xAC1MpsgzwRwD3qHL'. - 'WyTIBdlAa6u2rHfXaew06PV78ZZjAwleNnkolECoH5i090wOcY'. - '+TgwYzFHiPi1zkOkXexeAMASnVU+LiyiA1wFUuaqggACLizeWw'. - 'ycMzyssmVYKkbpGyC5T+OUALk2mKLHKWf+ED/az+YW42d66YL+'. - 'aNrmEEzQCFEnKw368EgEvcN1m80eTIQIt0TFOjMJHkzNEBBYPp'. - 'sblf8QHzrORO5JaWZ5ZLl6cuJyyxpNPv4PZdoT+GyIxBfI5uUg'. - 'eJMCwP2/bIHO1JEudcgUUWOceKNq99mCvnzs5PzRcuTV4y5mRO'. - 'SMIjo47z5S7a94oQCNKgJsZwO7D/IDNg3/LLhRNXt4JohBb4aG'. - '82GLdXcf93mQ+Y43r2RHZp+cRy6cqJK4l8MS+tdItaqiYtc0Mm'. - 'QpfJARh98HYh9IiXVcaAo58wGb+LBAjbSPgCOcoSa0wzxXtc08'. - '/pv8mfyL+9MLVQvDJ1JVHJV6SZbFI1qtTsB+KlehRtRTGE8Afo'. - 'P4DRcAxiEudhAHjjzz+ubgX4oHowakHQOlqzICQwyVPITGVOXi'. - 'xfLF6aumzmczl5lHzMff2+fCdPaGttEkXoLQAO9B7C6EugPYby'. - 'gVPjGXc5eIbNAJPjGwiAbaAJUQv8wVG7GROkJFpyOqn/ovgLba'. - '44L0+sDaraXb6jzq7aBQWjBOyUoHcaopOgmaA3IRyNDZnA1HjO'. - 'HSBkr7eEFDAEngHrQCf+/s2A8cSiSkqcKUeeTjwFy2Jd78t3+L'. - 'TR4itIiBLwLQhzkJyB5Cx4HXDaENVQCBAQcRqFIHTRaBIvuYXg'. - 'AdsouuNxEL0ZUBHnSQp66R73zYfUtQ6OytKT8RckQAJQoLtgO5'. - 'BJgj0D/WfgdyHaAHx8THoUcbGx8ciwhUl3bDEiToURPooeI7pH'. - 'MziK9Yd9nU5a6GgKjOH41vsgI4hAcyC5AZkapF+AoYNrjjsuhx'. - 'FbtPmeB5ykyQQzTPAWAQWC8S9oAI0QRRuPb9jkmyMZNAOTklvC'. - 'GGYZaFkGmkVAh8h4DtKFMIBunG+pB5B5AIkGBDsQ+qBiL20caj'. - 'zhJknq5KlgMkLjJHJos4kYEbFJi5vc5eYbATVN02bNWe19+32t'. - 'aJWlFm3wbf8Rz5NbDFJdlOFBF/g7cBf0JkrbBb+F6j1DOduEkU'. - '8bWCOiSofPWadBnSZDWmgUkEMGhZCINut8S/0NBtPptFlZrBSu'. - 'vnt1+ndnflfIp9OJ/279Ubbbd+lP7KBKPoEBsgnqLph/BRzwdS'. - 'LnBUFvHcfdpRsGPAGqwMco6jynz+e0SPKYCHMfLX5VKHwcenR+'. - 'Igd1XTcqlUr+xn/cePv91fevzy8sLO2OtrOpWkqL7gXKSAVRdh'. - 'ZFEmEXoYkwBNqovoc/3GHH3aUR+jwC1oD/AWrANi4hGwyBzqEG'. - 'Vvb77Dgi0eT1VZzJZMxKpVJYXV1dXF1dXVm6sPSvruue3Xzcyj'. - '6/syvDzwj0lNazK6Fj5LFCRZouZpBABj6jXouu3+Np6HNvDHaf'. - 'g91t74msbMuOJicnSSaTKKUQEUQEpRSO69But1/dB0VEm5uby9'. - 'y4cWNpdXX1+sLCworrume//PuXpeqnVeOban0U1PW2kcx+O9L7'. - 'Te9sUB4lWFR9SqNtNGcHx+/RDD2+Am4D94CnQA8OjjlEhMnyJC'. - 'srK8zOzu7BiYioMAzZ2Njg9u3brwIqpSSXy2WXl5eXLly4sOo4'. - 'zoV6vV6oflrVP/7Tx8Hmw1Zb6ydqmpWp7ha8h4O3gjOhzVANmF'. - 'XPMNQWvdDnCXCXuHR+APqH4fbCtm2mp6eZn59H13WJuYXRaKSU'. - 'UiSTyVcBdV3XDcOwRaTU7/en19bWCn/79G+JL/76RbhZ22y7u+'. - '6ahl71nPDz/nO17m7wAxlabFOihy4+DvAcqAMbPzZ3OFzX5dmz'. - 'Z2iahoiosUUVhiGNRgPHcV4GzGQy5uLiYuH8+fMzo9FoslarJW'. - '9+elP75E+fBJu1zY7qqpqBUW3T/niohnVvy+1zm5aVtp+WE2XT'. - 'nrHFzbjh1tYLz3XdPjD4R3BKKba2tqhWq4dzUO3noBPn4H5PKy'. - 'LaO++8U7hx48byhQsXVne7u6tf3/v64t3P7mbq9+odt+OuaWi3'. - 'PLxbW2ytubjbQCgiMnt6VlaurWgz0zM0m02q1WrUaDSUUuqI56'. - 'ivDxE5MCgiYllWtlwuL5mmufLV/a/O/uXPf9Ff1F+80Lv6Yx29'. - '2qHzyZBh3cdvc7gaTZuZkzPh/Py8ACqVSv1/uPZDKXUAGEWRtF'. - 'qtxEcffZTL5XLF+2v39fqjeivshA/TpP83JLwzYFBzcA4370Cc'. - 'S81nTRBUs9lkOByi1GuOPI4Rh3+26JZlnSkWi781DOPXvV4v3+'. - '/2G0R8kSBxB/jew+tERK+c49m2TblcxrZtXNfl+fPneJ6HZVmU'. - 'y2VJJpNyaJ9TSinlOA5bW1u4rntkQA0oAG8D54gb9W3ianxM3A'. - 'e/cn73U3Hq1Cm5du2aPjs7a+ztcSIShmE4ajQa6tatWzQajZ+0'. - 'fbiKI+It4SvijVUj7kL2qvGfgkskEqTTaZmcnDROnTplJhIJTU'. - 'QiwPd9P/Q8T6XTaQzDIAiCfzjP/wFVfszuFqdHXgAAAABJRU5E'. - 'rkJggg==' ; - - - //========================================================== - // File: pp_red.png - //========================================================== - $this->imgdata_small[0][0]= 384 ; - $this->imgdata_small[0][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABm'. - 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAAA'. - 'B3RJTUUH0wMJFhouFobZrQAAAQ1JREFUeJyV1dFtwyAQBuD/og'. - 'xQdYxa8gRY6hJ0jK6QdohMkTEuE5wUj5ERen05IoLvID7Jkn2G'. - 'j8MgTMyMXqRlUQBYq9ydmaL2h1cwqD7l30t+L1iwlbYFRegY7I'. - 'SHjkEifGg4ww3aBa/l4+9AhxWWr/dLhEunXUGHq6yGniw3QkOw'. - '3jJ7UBd82n/VVAlAtvsfp98lAj2sAJOhU4AeQ7DC1ubVBODWDJ'. - 'TtCsEWa6u5M1NeFs1NzgdtuhHGtj+9Q2IDppQUAL6Cyrlz0gDN'. - 'ohSMiJCt861672EiAhEhESG3woJ9V9OKTkwRKbdqz4cHmFLSFg'. - 's69+LvAZKdeZ/n89uLnd2g0S+gjd5g8zzjH5Y/eLLi+NPEAAAA'. - 'AElFTkSuQmCC' ; - - //========================================================== - // File: pp_orange.png - //========================================================== - $this->imgdata_small[1][0]= 403 ; - $this->imgdata_small[1][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABm'. - 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAAA'. - 'B3RJTUUH0wMJFhwAnApz5AAAASBJREFUeJyN1dFthDAMBuDf7S'. - '3BCm2VCRKpS4QxbhikW6IewzcBqm6Fm6JyH7iEEByCn5AJH38g'. - 'BBIRHNUzBAWAGNfe/SrUGv92CtNt309BrfFdMGPjvt9CD8Fyml'. - 'ZZaDchRgA/59FDMD18pvNoNyHxMnUmgLmPHoJ+CqqfMaNAH22C'. - 'fgqKRwR+GRpxGjXBEiuXDBWQhTK3plxijyWWvtKVS5KNG1xM8I'. - 'OBr7geV1WupDqpmTAPKjCqLhxk/z0PImQmjKrAuI6vMXlhFroD'. - 'vfdqITXWqg2YMSJEAFcReoag6UXU2DzPG8w5t09YYsAyLWvHrL'. - 'HUy6D3XmvMAAhAay8kAJpBosX4vt0G4+4Jam6s6Rz1fgFG0ncA'. - 'f3XfOQcA+Acv5IUSdQw9hgAAAABJRU5ErkJggg==' ; - - //========================================================== - // File: pp_pink.png - //========================================================== - $this->imgdata_small[2][0]= 419 ; - $this->imgdata_small[2][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABm'. - 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAAA'. - 'B3RJTUUH0wMJFhsQzvz1RwAAATBJREFUeJyd1MFthDAQheF/oi'. - 'gF+JYWQKICkCJRA1vGtrDbxFbhGvY0HVjCLeS2BeTiHFgTB2wg'. - 'eRISstCnmcG2qCpbuXf3ADBQzWsPfZfS9y9HsEu4/Fo33Wf4Fx'. - 'gxL3a1XkI3wbTNXHLoboVeLFUYDqObYBy+Fw/Uh9DdCmtOwIjF'. - 'YvG76CZoOhNGRmpO8zz30CJoOhMAqlDxFzQLppgXj2XaNlP7FF'. - 'GLL7ccMYCBgZERgCvXLBrfi2DEclmiKZwFY4tp6sW26bVfnede'. - 'e5Hc5dC2bUgrXGKqWrwcXnNYDjmCrcCIiQgDcFYV05kQ8SXmnB'. - 'NgPiVN06wrTDGAhz5EWY/FOccTk+cTnHM/YNu2YYllgFxCWuUM'. - 'ikzGx+2Gc+4N+CoJW8n+5a2UKm2aBoBvGA6L7wfl8aoAAAAASU'. - 'VORK5CYII=' ; - - - //========================================================== - // File: pp_blue.png - //========================================================== - $this->imgdata_small[3][0]= 883 ; - $this->imgdata_small[3][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAACi1'. - 'BMVEX///8AAAAAADMAAGYAAJkAAMwAAP8zAAAzADMzAGYzAJkz'. - 'AMwzAP9mAABmADNmAGZmAJlmAMxmAP+ZAACZADOZAGaZAJmZAM'. - 'yZAP/MAADMADPMAGbMAJnMAMzMAP//AAD/ADP/AGb/AJn/AMz/'. - 'AP8AMwAAMzMAM2YAM5kAM8wAM/8zMwAzMzMzM2YzM5kzM8wzM/'. - '9mMwBmMzNmM2ZmM5lmM8xmM/+ZMwCZMzOZM2aZM5mZM8yZM//M'. - 'MwDMMzPMM2bMM5nMM8zMM///MwD/MzP/M2b/M5n/M8z/M/8AZg'. - 'AAZjMAZmYAZpkAZswAZv8zZgAzZjMzZmYzZpkzZswzZv9mZgBm'. - 'ZjNmZmZmZplmZsxmZv+ZZgCZZjOZZmaZZpmZZsyZZv/MZgDMZj'. - 'PMZmbMZpnMZszMZv//ZgD/ZjP/Zmb/Zpn/Zsz/Zv8AmQAAmTMA'. - 'mWYAmZkAmcwAmf8zmQAzmTMzmWYzmZkzmcwzmf9mmQBmmTNmmW'. - 'ZmmZlmmcxmmf+ZmQCZmTOZmWaZmZmZmcyZmf/MmQDMmTPMmWbM'. - 'mZnMmczMmf//mQD/mTP/mWb/mZn/mcz/mf8AzAAAzDMAzGYAzJ'. - 'kAzMwAzP8zzAAzzDMzzGYzzJkzzMwzzP9mzABmzDNmzGZmzJlm'. - 'zMxmzP+ZzACZzDOZzGaZzJmZzMyZzP/MzADMzDPMzGbMzJnMzM'. - 'zMzP//zAD/zDP/zGb/zJn/zMz/zP8A/wAA/zMA/2YA/5kA/8wA'. - '//8z/wAz/zMz/2Yz/5kz/8wz//9m/wBm/zNm/2Zm/5lm/8xm//'. - '+Z/wCZ/zOZ/2aZ/5mZ/8yZ///M/wDM/zPM/2bM/5nM/8zM////'. - '/wD//zP//2b//5n//8z///9jJVUgAAAAAXRSTlMAQObYZgAAAA'. - 'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'. - 'RQfTAwkWGTNerea3AAAAYUlEQVR4nHXNwQ3AIAxDUUfyoROxRZ'. - 'icARin0EBTIP3Hp1gBRqSqYo0seqjZpnngojlWBir5+b8o06lM'. - 'ha5uFKEpDZulV8l52axhVzqaCdxQp32qVSSwC1wN3fYiw7b76w'. - 'bN4SMue4/KbwAAAABJRU5ErkJggg==' ; - - //========================================================== - // File: pp_green.png - //========================================================== - $this->imgdata_small[4][0]= 447 ; - $this->imgdata_small[4][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABm'. - 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAAA'. - 'B3RJTUUH0wMJFhkLdq9eKQAAAUxJREFUeJyN1LFVwzAQxvH/8f'. - 'IeDS0FLKABlN6eIwPYAzCHB0gWYI2jj+i1ABUTQN4TRSQ7iiWZ'. - 'qxLn9Mt9ydmiqrSq930AYFiu6YdKrf/hP1gYQn6960PxwBaYMG'. - 'E9UA3dBFtVQjdBOQmBakLennK0CapRwbZRZ3N0O/IeEsqp3HKL'. - 'Smtt5pUZgTPg4gdDud+6xoS97wM2rsxxmRSoTgoVcMZsXJkBho'. - 'SmKqCuOuEtls6nmGMFPTUmxBKx/MeyNfQGLoOOiC2ddsxb1Kzv'. - 'ZzUqu5IXbGDvBJf+hDisi77qFSuhq7Xpuu66TyJLRGbsXVUPxV'. - 'SxsgkzDMt0mKT3/RcjL8C5hHnvJToXY0xYRZ4xnVKsV/S+a8YA'. - 'AvCb3s9g13UhYj+TTo93B3fApRV1FVlEAD6H42DjN9/WvzDYuJ'. - 'dL5b1/ji+/IX8EGWP4AwRii8PdFHTqAAAAAElFTkSuQmCC' ; - } -} - -?> \ No newline at end of file diff --git a/html/lib/jpgraph/imgdata_squares.inc.php b/html/lib/jpgraph/imgdata_squares.inc.php deleted file mode 100644 index 3d25b3d2eb..0000000000 --- a/html/lib/jpgraph/imgdata_squares.inc.php +++ /dev/null @@ -1,174 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -//======================================================================= -// File: IMGDATA_SQUARES.INC -// Description: Base64 encoded images for squares -// Created: 2003-03-20 -// Ver: $Id: imgdata_squares.inc.php 1106 2009-02-22 20:16:35Z ljp $ -// -// Copyright (c) Aditus Consulting. All rights reserved. -//======================================================================== - -class ImgData_Squares extends ImgData { - protected $name = 'Squares'; - protected $an = array(MARK_IMG_SQUARE =>'imgdata'); - - protected $colors = array('bluegreen','blue','green', - 'lightblue','orange','purple','red','yellow'); - protected $index = array('bluegreen' =>2,'blue'=>5,'green'=>6, - 'lightblue'=>0,'orange'=>7,'purple'=>4,'red'=>3,'yellow'=>1); - protected $maxidx = 7 ; - protected $imgdata ; - - function __construct() { - //========================================================== - //sq_lblue.png - //========================================================== - $this->imgdata[0][0]= 362 ; - $this->imgdata[0][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAIAAADZrBkAAAAABm'. - 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'. - 'B3RJTUUH0wMLFgojiPx/ygAAAPdJREFUeNpj/P377+kzHx89/c'. - 'VAHNBQ5VBX52HavPWWjg6nnDQbkXoUFTnnL7zD9PPXrz17HxCj'. - 'E6Jn6fL7H7/+ZWJgYCBGJ7IeBgYGJogofp1oehDa8OjE1IOiDa'. - 'tOrHoYGBhY0NwD0enirMDAwMDFxYRVD7ptyDrNTAU0NXix6sGu'. - 'jYGBgZOT9e/f/0xMjFyczFgVsGAKCfBza2kKzpl3hIuT1c9Xb/'. - 'PW58/foKchJqx6tmy98vbjj8cvPm/afMnXW1JShA2fNmQ9EBFc'. - 'Opnw6MGjkwm/Hlw6mQjqwaqTiRg9mDoZv//4M2/+UYJ64EBWgj'. - 'cm2hwA8l24oNDl+DMAAAAASUVORK5CYII=' ; - - //========================================================== - //sq_yellow.png - //========================================================== - $this->imgdata[1][0]= 338 ; - $this->imgdata[1][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAWl'. - 'BMVEX////+/+H+/9/9/9v8/8P8/8H8/7v8/7n6/4P5/335/3n5'. - '/3X4/1f4/1P3/031/w30/wn0/wPt+ADp9ADm8ADk7gDc5gDa5A'. - 'DL1ADFzgCwuACqsgClrABzeAC9M0MzAAAAAWJLR0QAiAUdSAAA'. - 'AAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9MDCxYEDlOgDj'. - 'EAAAB+SURBVHjaVcpbCsQgDEDRGERGKopjDa2a/W9zfLWj9/Nw'. - 'Ac21ZRBOtZlRN9ApzSYFaDUj79KIorRDbJNO9bN/GUSh2ZRJFJ'. - 'S18iorURBiyksO8buT0zkfYaUqzI91ckfhWhoGXTLzsDjI68Sz'. - 'pGMjrzPzauA/iXk1AtykmvgBC8UcWUdc9HkAAAAASUVORK5CYI'. - 'I=' ; - - //========================================================== - //sq_blgr.png - //========================================================== - $this->imgdata[2][0]= 347 ; - $this->imgdata[2][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAZl'. - 'BMVEX////0+vv0+vrz+fry+frv+Png7e/d7e/a6+zY6+250tSz'. - '0tSyztCtztGM0NWIz9SDzdNfsLVcrrRZrbJOp61MpqtIr7dHn6'. - 'RErrZArLQ6q7M2g4kygYcsp68npa4ctr8QZ20JnqepKsl4AAAA'. - 'AWJLR0QAiAUdSAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU'. - '1FB9MDCxYEByp8tpUAAAB7SURBVHjaVcjRFoIgDADQWZpWJpjY'. - 'MsnG//9kzIFn3McLzfArDA3MndFjrhvgfDHFBEB9pt0CVzwrY3'. - 'n2yicjhY4vTSp0nbXtN+hCV53SHDWe61dZY+/9463r2XuifHAM'. - '0SoH+6xEcovUlCfefeFSIwfTTQ3fB+pi4lV/bTIgvmaA7a0AAA'. - 'AASUVORK5CYII=' ; - - //========================================================== - //sq_red.png - //========================================================== - $this->imgdata[3][0]= 324 ; - $this->imgdata[3][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAXV'. - 'BMVEX////++Pn99/j99ff99fb98/X98/T98PL55uj43+P24+bw'. - 'kKPvjaHviJ3teJHpxMnoL2Pjs73WW3rWNljVWXnUVnbUK1DTJk'. - '3SUHPOBz/KQmmxPVmuOFasNFOeIkWVka/fAAAAAWJLR0QAiAUd'. - 'SAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9MDCxYEHd'. - 'ceT+8AAABtSURBVHjaVchbAkMwEAXQq6i3VrQiQfa/zDYTw8z5'. - 'PCjGt9JVWFt1XWPh1fWNdfDy+tq6WPfRUPENNKnSnXNWPB4uv2'. - 'b54nSZ8jHrMtOxvWZZZtpD4KP6xLkO9/AhzhaCOMhJh68cOjzV'. - '/K/4Ac2cG+nBcaRuAAAAAElFTkSuQmCC' ; - - //========================================================== - //sq_pink.png - //========================================================== - $this->imgdata[4][0]= 445 ; - $this->imgdata[4][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAApV'. - 'BMVEX////6+Pz69/v49Pr38/r17/jr4+/l3Onj2efh1ua/L+i+'. - 'q8m+Lue9Lua8qsS8LuW8LeS7pca5LOG4LN+2Y9O2YNW1ZdO1Kt'. - 'y0atC0aNGzb82zbc6zKtuzKdqycsuwa8qtJtOISZ2GRpuFN6GE'. - 'NqCDQpmCMZ+BPpd/LJ1/K519S5B9Jpx9Jpt9JZt6RY11BJZ1BJ'. - 'V0BJV0BJRzBJNvNoRtIoJUEmdZ/XbrAAAAAWJLR0QAiAUdSAAA'. - 'AAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9MDCxYDF3iKMD'. - 'YAAACeSURBVHjaVczbEoIgGARgCiMtrexoWpaa2FHUgvd/tH4Y'. - 'BnEvv9ldhNPradPnnGBUTtPDzMRPSIF46SaBoR25dYjz3I20Lb'. - 'ek6BgQz73Il7KKpSgCO0pTHU0886J1sCe0ZYbALjGhjFnEM2es'. - 'VhZVI4d+B1QtfnV47ywCEaKeP/p7JdLejSYt0j6NIiOq1wJZIs'. - 'QTDA0ELHwhPBCwyR/Cni9cOmzJtwAAAABJRU5ErkJggg==' ; - - //========================================================== - //sq_blue.png - //========================================================== - $this->imgdata[5][0]= 283 ; - $this->imgdata[5][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAQl'. - 'BMVEX////4+fz39/z19vvy8vru7/ni4+7g4fHW1ue8vteXmt6B'. - 'hdhiZ7FQVaZETcxCSJo1Oq4zNoMjKakhJHcKFaMEC2jRVYdWAA'. - 'AAAWJLR0QAiAUdSAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0'. - 'SU1FB9MDCxYDN0PkEP4AAABfSURBVHjaVchHAoAgDATAVcCCIF'. - 'j4/1elJEjmOFDHKVgDv4iz640gLs+LMF6ZUv/VqcXXplU7Gqpy'. - 'PFzBT5qml9NzlOX259riWHlS4kOffviHD8PQYZx2EFMPRkw+9Q'. - 'FSnRPeWEDzKAAAAABJRU5ErkJggg==' ; - - //========================================================== - //sq_green.png - //========================================================== - $this->imgdata[6][0]= 325 ; - $this->imgdata[6][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAXV'. - 'BMVEX////2+vX1+vX1+fT0+fPz+PPx9/Dv9u7u9e3h7uHe697a'. - '6dnO2s3I1sa10LOvza2ay5aEwYBWlE9TqE5Tkk1RkEpMrUJMg0'. - 'hKiUNGpEFBojw8oTcsbScaYBMWlwmMT0NtAAAAAWJLR0QAiAUd'. - 'SAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9MDCxYEFd'. - 'nFx90AAABuSURBVHjaVc9HAoAgDADB2HuJWLDx/2cKBITscW4L'. - '5byzMIWtZobNDZIZtrcCGZsRQ8GwvRSRNxIiMuysODKG3alikl'. - 'ueOPlpKTLBaRmOZxQxaXlfb5ZWI9om4WntrXiDSJzp7SBkwMQa'. - 'FEy0VR/NAB2kNuj7rgAAAABJRU5ErkJggg==' ; - - //========================================================== - //sq_orange.png - //========================================================== - $this->imgdata[7][0]= 321 ; - $this->imgdata[7][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAUV'. - 'BMVEX/////8+n/8uf/8OP/59H/5Mv/zqH/zJ3/ypv/yJf/vYH/'. - 'u33/uXn/n0n/nUX/m0H/lzn/ljf/lDP/kS3/kCv/iR//hxv/fg'. - 'n/fAX/eQDYZgDW6ia5AAAAAWJLR0QAiAUdSAAAAAlwSFlzAAAL'. - 'EgAACxIB0t1+/AAAAAd0SU1FB9MDCxYEJIgbx+cAAAB2SURBVH'. - 'jaVczRCoQwDETRbLAWLZSGUA35/w/dVI0283i4DODew3YESmWW'. - 'kg5gWkoQAe6TleUQI/66Sy7i56+kLk7cht2N0+hcnJgQu0SqiC'. - '1SzSIbzWSi6gavqJ63wSduRi2f+kwyD5rEukwCdZ1kGAMGMfv9'. - 'AbWuGMOr5COSAAAAAElFTkSuQmCC' ; - } -} - -?> diff --git a/html/lib/jpgraph/imgdata_stars.inc.php b/html/lib/jpgraph/imgdata_stars.inc.php deleted file mode 100644 index 44d638ef10..0000000000 --- a/html/lib/jpgraph/imgdata_stars.inc.php +++ /dev/null @@ -1,168 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -//======================================================================= -// File: IMGDATA_STARS.INC -// Description: Base64 encoded images for stars -// Created: 2003-03-20 -// Ver: $Id: imgdata_stars.inc.php 1106 2009-02-22 20:16:35Z ljp $ -// -// Copyright (c) Aditus Consulting. All rights reserved. -//======================================================================== - - -class ImgData_Stars extends ImgData { - protected $name = 'Stars'; - protected $an = array(MARK_IMG_STAR => 'imgdata'); - - protected $colors = array('bluegreen','lightblue','purple','blue','green','pink','red','yellow'); - protected $index = array('bluegreen'=>3,'lightblue'=>4,'purple'=>1, - 'blue'=>5,'green'=>0,'pink'=>7,'red'=>2,'yellow'=>6); - protected $maxidx = 7 ; - protected $imgdata ; - - function __construct() { - //========================================================== - // File: bstar_green_001.png - //========================================================== - $this->imgdata[0][0]= 329 ; - $this->imgdata[0][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAAUV'. - 'BMVEX///////+/v7+83rqcyY2Q/4R7/15y/1tp/05p/0lg/zdX'. - '/zdX/zVV/zdO/zFJ9TFJvDFD4yg+8Bw+3iU68hwurhYotxYosx'. - 'YokBoTfwANgQFUp7DWAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgF'. - 'HUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJj'. - 'CRyxgTAAAAcUlEQVR4nH3MSw6AIAwEUBL/IKBWwXL/g0pLojUS'. - 'ZzGLl8ko9Zumhr5iy66/GH0dp49llNPB5sTotDY5PVuLG6tnM9'. - 'CVKSIe1joSgPsAKSuANNaENFQvTAGzmheSkUpMBWeJZwqBT8wo'. - 'hmysD4bnnPsC/x8ItUdGPfAAAAAASUVORK5CYII=' ; - //========================================================== - // File: bstar_blred.png - //========================================================== - $this->imgdata[1][0]= 325 ; - $this->imgdata[1][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'. - 'BMVEX///+/v79uRJ6jWPOSUtKrb+ejWO+gWPaGTruJTr6rZvF2'. - 'RqC2ocqdVuCeV+egV/GsnLuIXL66rMSpcOyATbipY/OdWOp+VK'. - 'aTU9WhV+yJKBoLAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'. - 'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJwynv1'. - 'XVAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'. - 'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'. - 'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'. - 'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ; - - //========================================================== - // File: bstar_red_001.png - //========================================================== - $this->imgdata[2][0]= 325 ; - $this->imgdata[2][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'. - 'BMVEX///+/v7+eRFHzWG3SUmHnb37vWGr2WHG7Tlm+TljxZneg'. - 'Rk3KoaXgVmXnV2nxV227nJ++XGzErK3scIS4TVzzY3fqWG2mVF'. - 'zVU2PsV2rJFw9VAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'. - 'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJzCI0C'. - 'lSAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'. - 'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'. - 'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'. - 'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ; - - //========================================================== - // File: bstar_blgr_001.png - //========================================================== - $this->imgdata[3][0]= 325 ; - $this->imgdata[3][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'. - 'BMVEX///+/v79Ehp5Yx/NSq9Jvw+dYwu9YzfZOmbtOmb5myPFG'. - 'gqChvcpWteBXvedXxvGcsbtcpb6su8RwzOxNmrhjyvNYwupUjK'. - 'ZTr9VXwOyJhmWNAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'. - 'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJTC65k'. - 'vQAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'. - 'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'. - 'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'. - 'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ; - - //========================================================== - // File: bstar_blgr_002.png - //========================================================== - $this->imgdata[4][0]= 325 ; - $this->imgdata[4][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'. - 'BMVEX///+/v79EnpxY8/FS0dJv5+dY7+9Y9vBOubtOur5m8fFG'. - 'nKChycpW3uBX5+ZX8e2curtcvrqswsRw7OdNuLZj8/BY6udUpK'. - 'ZT1dRX7OtNkrW5AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'. - 'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJgXHeN'. - 'wwAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'. - 'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'. - 'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'. - 'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ; - - //========================================================== - // File: bstar_blue_001.png - //========================================================== - $this->imgdata[5][0]= 325 ; - $this->imgdata[5][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'. - 'BMVEX///+/v79EY55Yi/NSetJvledYiO9YkPZOb7tObr5mkvFG'. - 'X6ChrcpWgOBXhedXi/Gcpbtcf76sssRwnOxNcbhjk/NYiepUbK'. - 'ZTfdVXh+ynNEzzAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'. - 'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJhStyP'. - 'zCAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'. - 'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'. - 'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'. - 'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ; - - //========================================================== - // File: bstar_oy_007.png - //========================================================== - $this->imgdata[6][0]= 325 ; - $this->imgdata[6][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'. - 'BMVEX///+/v7+ejUTz11jSvVLn02/v1lj21li7q06+r07x2mag'. - 'lUbKxKHgy1bnz1fx1Ve7t5y+qlzEwqzs03C4pE3z2WPqz1imml'. - 'TVv1Ps01dGRjeyAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'. - 'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJjsGGc'. - 'GbAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'. - 'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'. - 'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'. - 'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ; - - //========================================================== - // File: bstar_lred.png - //========================================================== - $this->imgdata[7][0]= 325 ; - $this->imgdata[7][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'. - 'BMVEX///+/v7+eRJPzWN3SUr7nb9TvWNj2WOS7Tqi+TqnxZtyg'. - 'Ro/KocPgVsjnV9LxV927nLa+XLTErL7scN24TarzY9/qWNemVJ'. - 'jVU8LsV9VCwcc9AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'. - 'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJxi9ZY'. - 'GoAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'. - 'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'. - 'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'. - 'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ; - } -} - -?> \ No newline at end of file diff --git a/html/lib/jpgraph/jpg-config.inc.php b/html/lib/jpgraph/jpg-config.inc.php deleted file mode 100644 index f7ce5b7f6b..0000000000 --- a/html/lib/jpgraph/jpg-config.inc.php +++ /dev/null @@ -1,156 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -//======================================================================= -// File: JPG-CONFIG.INC -// Description: Configuration file for JpGraph library -// Created: 2004-03-27 -// Ver: $Id: jpg-config.inc.php 1871 2009-09-29 05:56:39Z ljp $ -// -// Copyright (c) Aditus Consulting. All rights reserved. -//======================================================================== - - -//------------------------------------------------------------------------ -// Directories for cache and font directory. -// -// CACHE_DIR: -// The full absolute name of the directory to be used to store the -// cached image files. This directory will not be used if the USE_CACHE -// define (further down) is false. If you enable the cache please note that -// this directory MUST be readable and writable for the process running PHP. -// Must end with '/' -// -// TTF_DIR: -// Directory where TTF fonts can be found. Must end with '/' -// -// The default values used if these defines are left commented out are: -// -// UNIX: -// CACHE_DIR /tmp/jpgraph_cache/ -// TTF_DIR /usr/share/fonts/truetype/ -// MBTTF_DIR /usr/share/fonts/truetype/ -// -// WINDOWS: -// CACHE_DIR $SERVER_TEMP/jpgraph_cache/ -// TTF_DIR $SERVER_SYSTEMROOT/fonts/ -// MBTTF_DIR $SERVER_SYSTEMROOT/fonts/ -// -//------------------------------------------------------------------------ -// define('CACHE_DIR','/tmp/jpgraph_cache/'); -// define('TTF_DIR','/usr/share/fonts/truetype/'); -// define('MBTTF_DIR','/usr/share/fonts/truetype/'); - -//------------------------------------------------------------------------- -// Cache directory specification for use with CSIM graphs that are -// using the cache. -// The directory must be the filesysystem name as seen by PHP -// and the 'http' version must be the same directory but as -// seen by the HTTP server relative to the 'htdocs' ddirectory. -// If a relative path is specified it is taken to be relative from where -// the image script is executed. -// Note: The default setting is to create a subdirectory in the -// directory from where the image script is executed and store all files -// there. As ususal this directory must be writeable by the PHP process. -define('CSIMCACHE_DIR','csimcache/'); -define('CSIMCACHE_HTTP_DIR','csimcache/'); - -//------------------------------------------------------------------------ -// Various JpGraph Settings. Adjust accordingly to your -// preferences. Note that cache functionality is turned off by -// default (Enable by setting USE_CACHE to true) -//------------------------------------------------------------------------ - -// Deafult locale for error messages. -// This defaults to English = 'en' -define('DEFAULT_ERR_LOCALE','en'); - -// Deafult graphic format set to 'auto' which will automatically -// choose the best available format in the order png,gif,jpeg -// (The supported format depends on what your PHP installation supports) -define('DEFAULT_GFORMAT','auto'); - -// Should the cache be used at all? By setting this to false no -// files will be generated in the cache directory. -// The difference from READ_CACHE being that setting READ_CACHE to -// false will still create the image in the cache directory -// just not use it. By setting USE_CACHE=false no files will even -// be generated in the cache directory. -define('USE_CACHE',false); - -// Should we try to find an image in the cache before generating it? -// Set this define to false to bypass the reading of the cache and always -// regenerate the image. Note that even if reading the cache is -// disabled the cached will still be updated with the newly generated -// image. Set also 'USE_CACHE' below. -define('READ_CACHE',true); - -// Determine if the error handler should be image based or purely -// text based. Image based makes it easier since the script will -// always return an image even in case of errors. -define('USE_IMAGE_ERROR_HANDLER',true); - -// Should the library examine the global php_errmsg string and convert -// any error in it to a graphical representation. This is handy for the -// occasions when, for example, header files cannot be found and this results -// in the graph not being created and just a 'red-cross' image would be seen. -// This should be turned off for a production site. -define('CATCH_PHPERRMSG',true); - -// Determine if the library should also setup the default PHP -// error handler to generate a graphic error mesage. This is useful -// during development to be able to see the error message as an image -// instead as a 'red-cross' in a page where an image is expected. -define('INSTALL_PHP_ERR_HANDLER',false); - -// Should usage of deprecated functions and parameters give a fatal error? -// (Useful to check if code is future proof.) -define('ERR_DEPRECATED',true); - -// The builtin GD function imagettfbbox() fuction which calculates the bounding box for -// text using TTF fonts is buggy. By setting this define to true the library -// uses its own compensation for this bug. However this will give a -// slightly different visual apparance than not using this compensation. -// Enabling this compensation will in general give text a bit more space to more -// truly reflect the actual bounding box which is a bit larger than what the -// GD function thinks. -define('USE_LIBRARY_IMAGETTFBBOX',true); - -//------------------------------------------------------------------------ -// The following constants should rarely have to be changed ! -//------------------------------------------------------------------------ - -// What group should the cached file belong to -// (Set to '' will give the default group for the 'PHP-user') -// Please note that the Apache user must be a member of the -// specified group since otherwise it is impossible for Apache -// to set the specified group. -define('CACHE_FILE_GROUP','www'); - -// What permissions should the cached file have -// (Set to '' will give the default persmissions for the 'PHP-user') -define('CACHE_FILE_MOD',0664); - -?> diff --git a/html/lib/jpgraph/jpgraph.php b/html/lib/jpgraph/jpgraph.php deleted file mode 100644 index 0eba4e3190..0000000000 --- a/html/lib/jpgraph/jpgraph.php +++ /dev/null @@ -1,5420 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -//======================================================================= -// File: JPGRAPH.PHP -// Description: PHP Graph Plotting library. Base module. -// Created: 2001-01-08 -// Ver: $Id: jpgraph.php 1924 2010-01-11 14:03:26Z ljp $ -// -// Copyright (c) Aditus Consulting. All rights reserved. -//======================================================================== - -require_once('jpg-config.inc.php'); -require_once('jpgraph_gradient.php'); -require_once('jpgraph_errhandler.inc.php'); -require_once('jpgraph_ttf.inc.php'); -require_once('jpgraph_rgb.inc.php'); -require_once('jpgraph_text.inc.php'); -require_once('jpgraph_legend.inc.php'); -require_once('gd_image.inc.php'); - -// Version info -define('JPG_VERSION','3.0.7'); - -// Minimum required PHP version -define('MIN_PHPVERSION','5.1.0'); - -// Special file name to indicate that we only want to calc -// the image map in the call to Graph::Stroke() used -// internally from the GetHTMLCSIM() method. -define('_CSIM_SPECIALFILE','_csim_special_'); - -// HTTP GET argument that is used with image map -// to indicate to the script to just generate the image -// and not the full CSIM HTML page. -define('_CSIM_DISPLAY','_jpg_csimd'); - -// Special filename for Graph::Stroke(). If this filename is given -// then the image will NOT be streamed to browser of file. Instead the -// Stroke call will return the handler for the created GD image. -define('_IMG_HANDLER','__handle'); - -// Special filename for Graph::Stroke(). If this filename is given -// the image will be stroked to a file with a name based on the script name. -define('_IMG_AUTO','auto'); - -// Tick density -define("TICKD_DENSE",1); -define("TICKD_NORMAL",2); -define("TICKD_SPARSE",3); -define("TICKD_VERYSPARSE",4); - -// Side for ticks and labels. -define("SIDE_LEFT",-1); -define("SIDE_RIGHT",1); -define("SIDE_DOWN",-1); -define("SIDE_BOTTOM",-1); -define("SIDE_UP",1); -define("SIDE_TOP",1); - -// Legend type stacked vertical or horizontal -define("LEGEND_VERT",0); -define("LEGEND_HOR",1); - -// Mark types for plot marks -define("MARK_SQUARE",1); -define("MARK_UTRIANGLE",2); -define("MARK_DTRIANGLE",3); -define("MARK_DIAMOND",4); -define("MARK_CIRCLE",5); -define("MARK_FILLEDCIRCLE",6); -define("MARK_CROSS",7); -define("MARK_STAR",8); -define("MARK_X",9); -define("MARK_LEFTTRIANGLE",10); -define("MARK_RIGHTTRIANGLE",11); -define("MARK_FLASH",12); -define("MARK_IMG",13); -define("MARK_FLAG1",14); -define("MARK_FLAG2",15); -define("MARK_FLAG3",16); -define("MARK_FLAG4",17); - -// Builtin images -define("MARK_IMG_PUSHPIN",50); -define("MARK_IMG_SPUSHPIN",50); -define("MARK_IMG_LPUSHPIN",51); -define("MARK_IMG_DIAMOND",52); -define("MARK_IMG_SQUARE",53); -define("MARK_IMG_STAR",54); -define("MARK_IMG_BALL",55); -define("MARK_IMG_SBALL",55); -define("MARK_IMG_MBALL",56); -define("MARK_IMG_LBALL",57); -define("MARK_IMG_BEVEL",58); - -// Inline defines -define("INLINE_YES",1); -define("INLINE_NO",0); - -// Format for background images -define("BGIMG_FILLPLOT",1); -define("BGIMG_FILLFRAME",2); -define("BGIMG_COPY",3); -define("BGIMG_CENTER",4); -define("BGIMG_FREE",5); - -// Depth of objects -define("DEPTH_BACK",0); -define("DEPTH_FRONT",1); - -// Direction -define("VERTICAL",1); -define("HORIZONTAL",0); - -// Axis styles for scientific style axis -define('AXSTYLE_SIMPLE',1); -define('AXSTYLE_BOXIN',2); -define('AXSTYLE_BOXOUT',3); -define('AXSTYLE_YBOXIN',4); -define('AXSTYLE_YBOXOUT',5); - -// Style for title backgrounds -define('TITLEBKG_STYLE1',1); -define('TITLEBKG_STYLE2',2); -define('TITLEBKG_STYLE3',3); -define('TITLEBKG_FRAME_NONE',0); -define('TITLEBKG_FRAME_FULL',1); -define('TITLEBKG_FRAME_BOTTOM',2); -define('TITLEBKG_FRAME_BEVEL',3); -define('TITLEBKG_FILLSTYLE_HSTRIPED',1); -define('TITLEBKG_FILLSTYLE_VSTRIPED',2); -define('TITLEBKG_FILLSTYLE_SOLID',3); - -// Styles for axis labels background -define('LABELBKG_NONE',0); -define('LABELBKG_XAXIS',1); -define('LABELBKG_YAXIS',2); -define('LABELBKG_XAXISFULL',3); -define('LABELBKG_YAXISFULL',4); -define('LABELBKG_XYFULL',5); -define('LABELBKG_XY',6); - - -// Style for background gradient fills -define('BGRAD_FRAME',1); -define('BGRAD_MARGIN',2); -define('BGRAD_PLOT',3); - -// Width of tab titles -define('TABTITLE_WIDTHFIT',0); -define('TABTITLE_WIDTHFULL',-1); - -// Defines for 3D skew directions -define('SKEW3D_UP',0); -define('SKEW3D_DOWN',1); -define('SKEW3D_LEFT',2); -define('SKEW3D_RIGHT',3); - -// For internal use only -define("_JPG_DEBUG",false); -define("_FORCE_IMGTOFILE",false); -define("_FORCE_IMGDIR",'/tmp/jpgimg/'); - -// -// Automatic settings of path for cache and font directory -// if they have not been previously specified -// -if(USE_CACHE) { - if (!defined('CACHE_DIR')) { - if ( strstr( PHP_OS, 'WIN') ) { - if( empty($_SERVER['TEMP']) ) { - $t = new ErrMsgText(); - $msg = $t->Get(11,$file,$lineno); - die($msg); - } - else { - define('CACHE_DIR', $_SERVER['TEMP'] . '/'); - } - } else { - define('CACHE_DIR','/tmp/jpgraph_cache/'); - } - } -} -elseif( !defined('CACHE_DIR') ) { - define('CACHE_DIR', ''); -} - -// -// Setup path for western/latin TTF fonts -// -if (!defined('TTF_DIR')) { - if (strstr( PHP_OS, 'WIN') ) { - $sroot = getenv('SystemRoot'); - if( empty($sroot) ) { - $t = new ErrMsgText(); - $msg = $t->Get(12,$file,$lineno); - die($msg); - } - else { - define('TTF_DIR', $sroot.'/fonts/'); - } - } else { - define('TTF_DIR','/usr/share/fonts/truetype/'); - } -} - -// -// Setup path for MultiByte TTF fonts (japanese, chinese etc.) -// -if (!defined('MBTTF_DIR')) { - if (strstr( PHP_OS, 'WIN') ) { - $sroot = getenv('SystemRoot'); - if( empty($sroot) ) { - $t = new ErrMsgText(); - $msg = $t->Get(12,$file,$lineno); - die($msg); - } - else { - define('MBTTF_DIR', $sroot.'/fonts/'); - } - } else { - define('MBTTF_DIR','/usr/share/fonts/truetype/'); - } -} - -/* - * Check minimum PHP version - * @author f0o - * @copyright 2015 f0o, LibreNMS - * @license GPL - * @package LibreNMS - * @subpackage Billing - */ -function CheckPHPVersion($aMinVersion) { - return version_compare(PHP_VERSION, $aMinVersion, '>='); -} - -// -// Make sure PHP version is high enough -// -if( !CheckPHPVersion(MIN_PHPVERSION) ) { - JpGraphError::RaiseL(13,PHP_VERSION,MIN_PHPVERSION); - die(); -} - -// -// Make GD sanity check -// -if( !function_exists("imagetypes") || !function_exists('imagecreatefromstring') ) { - JpGraphError::RaiseL(25001); - //("This PHP installation is not configured with the GD library. Please recompile PHP with GD support to run JpGraph. (Neither function imagetypes() nor imagecreatefromstring() does exist)"); -} - -// -// Setup PHP error handler -// -function _phpErrorHandler($errno,$errmsg,$filename, $linenum, $vars) { - // Respect current error level - if( $errno & error_reporting() ) { - JpGraphError::RaiseL(25003,basename($filename),$linenum,$errmsg); - } -} - -if( INSTALL_PHP_ERR_HANDLER ) { - set_error_handler("_phpErrorHandler"); -} - -// -// Check if there were any warnings, perhaps some wrong includes by the user. In this -// case we raise it immediately since otherwise the image will not show and makes -// debugging difficult. This is controlled by the user setting CATCH_PHPERRMSG -// -if( isset($GLOBALS['php_errormsg']) && CATCH_PHPERRMSG && !preg_match('/|Deprecated|/i', $GLOBALS['php_errormsg']) ) { - JpGraphError::RaiseL(25004,$GLOBALS['php_errormsg']); -} - -// Useful mathematical function -function sign($a) {return $a >= 0 ? 1 : -1;} - -// -// Utility function to generate an image name based on the filename we -// are running from and assuming we use auto detection of graphic format -// (top level), i.e it is safe to call this function -// from a script that uses JpGraph -// -function GenImgName() { - // Determine what format we should use when we save the images - $supported = imagetypes(); - if( $supported & IMG_PNG ) $img_format="png"; - elseif( $supported & IMG_GIF ) $img_format="gif"; - elseif( $supported & IMG_JPG ) $img_format="jpeg"; - elseif( $supported & IMG_WBMP ) $img_format="wbmp"; - elseif( $supported & IMG_XPM ) $img_format="xpm"; - - - if( !isset($_SERVER['PHP_SELF']) ) { - JpGraphError::RaiseL(25005); - //(" Can't access PHP_SELF, PHP global variable. You can't run PHP from command line if you want to use the 'auto' naming of cache or image files."); - } - $fname = basename($_SERVER['PHP_SELF']); - if( !empty($_SERVER['QUERY_STRING']) ) { - $q = @$_SERVER['QUERY_STRING']; - $fname .= '_'.preg_replace("/\W/", "_", $q).'.'.$img_format; - } - else { - $fname = substr($fname,0,strlen($fname)-4).'.'.$img_format; - } - return $fname; -} - -//=================================================== -// CLASS JpgTimer -// Description: General timing utility class to handle -// time measurement of generating graphs. Multiple -// timers can be started. -//=================================================== -class JpgTimer { - private $start, $idx; - - function __construct() { - $this->idx=0; - } - - // Push a new timer start on stack - function Push() { - list($ms,$s)=explode(" ",microtime()); - $this->start[$this->idx++]=floor($ms*1000) + 1000*$s; - } - - // Pop the latest timer start and return the diff with the - // current time - function Pop() { - assert($this->idx>0); - list($ms,$s)=explode(" ",microtime()); - $etime=floor($ms*1000) + (1000*$s); - $this->idx--; - return $etime-$this->start[$this->idx]; - } -} // Class - -//=================================================== -// CLASS DateLocale -// Description: Hold localized text used in dates -//=================================================== -class DateLocale { - - public $iLocale = 'C'; // environmental locale be used by default - private $iDayAbb = null, $iShortDay = null, $iShortMonth = null, $iMonthName = null; - - function __construct() { - settype($this->iDayAbb, 'array'); - settype($this->iShortDay, 'array'); - settype($this->iShortMonth, 'array'); - settype($this->iMonthName, 'array'); - $this->Set('C'); - } - - function Set($aLocale) { - if ( in_array($aLocale, array_keys($this->iDayAbb)) ){ - $this->iLocale = $aLocale; - return TRUE; // already cached nothing else to do! - } - - $pLocale = setlocale(LC_TIME, 0); // get current locale for LC_TIME - - if (is_array($aLocale)) { - foreach ($aLocale as $loc) { - $res = @setlocale(LC_TIME, $loc); - if ( $res ) { - $aLocale = $loc; - break; - } - } - } - else { - $res = @setlocale(LC_TIME, $aLocale); - } - - if ( ! $res ) { - JpGraphError::RaiseL(25007,$aLocale); - //("You are trying to use the locale ($aLocale) which your PHP installation does not support. Hint: Use '' to indicate the default locale for this geographic region."); - return FALSE; - } - - $this->iLocale = $aLocale; - for( $i = 0, $ofs = 0 - strftime('%w'); $i < 7; $i++, $ofs++ ) { - $day = strftime('%a', strtotime("$ofs day")); - $day[0] = strtoupper($day[0]); - $this->iDayAbb[$aLocale][]= $day[0]; - $this->iShortDay[$aLocale][]= $day; - } - - for($i=1; $i<=12; ++$i) { - list($short ,$full) = explode('|', strftime("%b|%B",strtotime("2001-$i-01"))); - $this->iShortMonth[$aLocale][] = ucfirst($short); - $this->iMonthName [$aLocale][] = ucfirst($full); - } - - setlocale(LC_TIME, $pLocale); - - return TRUE; - } - - - function GetDayAbb() { - return $this->iDayAbb[$this->iLocale]; - } - - function GetShortDay() { - return $this->iShortDay[$this->iLocale]; - } - - function GetShortMonth() { - return $this->iShortMonth[$this->iLocale]; - } - - function GetShortMonthName($aNbr) { - return $this->iShortMonth[$this->iLocale][$aNbr]; - } - - function GetLongMonthName($aNbr) { - return $this->iMonthName[$this->iLocale][$aNbr]; - } - - function GetMonth() { - return $this->iMonthName[$this->iLocale]; - } -} - -// Global object handlers -$gDateLocale = new DateLocale(); -$gJpgDateLocale = new DateLocale(); - -//======================================================= -// CLASS Footer -// Description: Encapsulates the footer line in the Graph -//======================================================= -class Footer { - public $iLeftMargin = 3, $iRightMargin = 3, $iBottomMargin = 3 ; - public $left,$center,$right; - private $iTimer=null, $itimerpoststring=''; - - function __construct() { - $this->left = new Text(); - $this->left->ParagraphAlign('left'); - $this->center = new Text(); - $this->center->ParagraphAlign('center'); - $this->right = new Text(); - $this->right->ParagraphAlign('right'); - } - - function SetTimer($aTimer,$aTimerPostString='') { - $this->iTimer = $aTimer; - $this->itimerpoststring = $aTimerPostString; - } - - function SetMargin($aLeft=3,$aRight=3,$aBottom=3) { - $this->iLeftMargin = $aLeft; - $this->iRightMargin = $aRight; - $this->iBottomMargin = $aBottom; - } - - function Stroke($aImg) { - $y = $aImg->height - $this->iBottomMargin; - $x = $this->iLeftMargin; - $this->left->Align('left','bottom'); - $this->left->Stroke($aImg,$x,$y); - - $x = ($aImg->width - $this->iLeftMargin - $this->iRightMargin)/2; - $this->center->Align('center','bottom'); - $this->center->Stroke($aImg,$x,$y); - - $x = $aImg->width - $this->iRightMargin; - $this->right->Align('right','bottom'); - if( $this->iTimer != null ) { - $this->right->Set( $this->right->t . sprintf('%.3f',$this->iTimer->Pop()/1000.0) . $this->itimerpoststring ); - } - $this->right->Stroke($aImg,$x,$y); - } -} - - -//=================================================== -// CLASS Graph -// Description: Main class to handle graphs -//=================================================== -class Graph { - public $cache=null; // Cache object (singleton) - public $img=null; // Img object (singleton) - public $plots=array(); // Array of all plot object in the graph (for Y 1 axis) - public $y2plots=array(); // Array of all plot object in the graph (for Y 2 axis) - public $ynplots=array(); - public $xscale=null; // X Scale object (could be instance of LinearScale or LogScale - public $yscale=null,$y2scale=null, $ynscale=array(); - public $iIcons = array(); // Array of Icons to add to - public $cache_name; // File name to be used for the current graph in the cache directory - public $xgrid=null; // X Grid object (linear or logarithmic) - public $ygrid=null,$y2grid=null; //dito for Y - public $doframe=true,$frame_color='black', $frame_weight=1; // Frame around graph - public $boxed=false, $box_color='black', $box_weight=1; // Box around plot area - public $doshadow=false,$shadow_width=4,$shadow_color='gray@0.5'; // Shadow for graph - public $xaxis=null; // X-axis (instane of Axis class) - public $yaxis=null, $y2axis=null, $ynaxis=array(); // Y axis (instance of Axis class) - public $margin_color=array(230,230,230); // Margin color of graph - public $plotarea_color=array(255,255,255); // Plot area color - public $title,$subtitle,$subsubtitle; // Title and subtitle(s) text object - public $axtype="linlin"; // Type of axis - public $xtick_factor,$ytick_factor; // Factor to determine the maximum number of ticks depending on the plot width - public $texts=null, $y2texts=null; // Text object to ge shown in the graph - public $lines=null, $y2lines=null; - public $bands=null, $y2bands=null; - public $text_scale_off=0, $text_scale_abscenteroff=-1; // Text scale in fractions and for centering bars - public $background_image='',$background_image_type=-1,$background_image_format="png"; - public $background_image_bright=0,$background_image_contr=0,$background_image_sat=0; - public $background_image_xpos=0,$background_image_ypos=0; - public $image_bright=0, $image_contr=0, $image_sat=0; - public $inline; - public $showcsim=0,$csimcolor="red";//debug stuff, draw the csim boundaris on the image if <>0 - public $grid_depth=DEPTH_BACK; // Draw grid under all plots as default - public $iAxisStyle = AXSTYLE_SIMPLE; - public $iCSIMdisplay=false,$iHasStroked = false; - public $footer; - public $csimcachename = '', $csimcachetimeout = 0, $iCSIMImgAlt=''; - public $iDoClipping = false; - public $y2orderback=true; - public $tabtitle; - public $bkg_gradtype=-1,$bkg_gradstyle=BGRAD_MARGIN; - public $bkg_gradfrom='navy', $bkg_gradto='silver'; - public $plot_gradtype=-1,$plot_gradstyle=BGRAD_MARGIN; - public $plot_gradfrom='silver', $plot_gradto='navy'; - - public $titlebackground = false; - public $titlebackground_color = 'lightblue', - $titlebackground_style = 1, - $titlebackground_framecolor = 'blue', - $titlebackground_framestyle = 2, - $titlebackground_frameweight = 1, - $titlebackground_bevelheight = 3 ; - public $titlebkg_fillstyle=TITLEBKG_FILLSTYLE_SOLID; - public $titlebkg_scolor1='black',$titlebkg_scolor2='white'; - public $framebevel = false, $framebeveldepth = 2 ; - public $framebevelborder = false, $framebevelbordercolor='black'; - public $framebevelcolor1='white@0.4', $framebevelcolor2='black@0.4'; - public $background_image_mix=100; - public $background_cflag = ''; - public $background_cflag_type = BGIMG_FILLPLOT; - public $background_cflag_mix = 100; - public $iImgTrans=false, - $iImgTransHorizon = 100,$iImgTransSkewDist=150, - $iImgTransDirection = 1, $iImgTransMinSize = true, - $iImgTransFillColor='white',$iImgTransHighQ=false, - $iImgTransBorder=false,$iImgTransHorizonPos=0.5; - public $legend; - protected $iYAxisDeltaPos=50; - protected $iIconDepth=DEPTH_BACK; - protected $iAxisLblBgType = 0, - $iXAxisLblBgFillColor = 'lightgray', $iXAxisLblBgColor = 'black', - $iYAxisLblBgFillColor = 'lightgray', $iYAxisLblBgColor = 'black'; - protected $iTables=NULL; - - // aWIdth Width in pixels of image - // aHeight Height in pixels of image - // aCachedName Name for image file in cache directory - // aTimeOut Timeout in minutes for image in cache - // aInline If true the image is streamed back in the call to Stroke() - // If false the image is just created in the cache - function __construct($aWidth=300,$aHeight=200,$aCachedName='',$aTimeout=0,$aInline=true) { - - if( !is_numeric($aWidth) || !is_numeric($aHeight) ) { - JpGraphError::RaiseL(25008);//('Image width/height argument in Graph::Graph() must be numeric'); - } - - // Automatically generate the image file name based on the name of the script that - // generates the graph - if( $aCachedName == 'auto' ) { - $aCachedName=GenImgName(); - } - - // Should the image be streamed back to the browser or only to the cache? - $this->inline=$aInline; - - $this->img = new RotImage($aWidth,$aHeight); - $this->cache = new ImgStreamCache(); - - // Window doesn't like '?' in the file name so replace it with an '_' - $aCachedName = str_replace("?","_",$aCachedName); - $this->SetupCache($aCachedName, $aTimeout); - - $this->title = new Text(); - $this->title->ParagraphAlign('center'); - $this->title->SetFont(FF_FONT2,FS_BOLD); - $this->title->SetMargin(5); - $this->title->SetAlign('center'); - - $this->subtitle = new Text(); - $this->subtitle->ParagraphAlign('center'); - $this->subtitle->SetMargin(3); - $this->subtitle->SetAlign('center'); - - $this->subsubtitle = new Text(); - $this->subsubtitle->ParagraphAlign('center'); - $this->subsubtitle->SetMargin(3); - $this->subsubtitle->SetAlign('center'); - - $this->legend = new Legend(); - $this->footer = new Footer(); - - // If the cached version exist just read it directly from the - // cache, stream it back to browser and exit - if( $aCachedName!='' && READ_CACHE && $aInline ) { - if( $this->cache->GetAndStream($this->img,$aCachedName) ) { - exit(); - } - } - - $this->SetTickDensity(); // Normal density - - $this->tabtitle = new GraphTabTitle(); - } - - function SetupCache($aFilename,$aTimeout=60) { - $this->cache_name = $aFilename; - $this->cache->SetTimeOut($aTimeout); - } - - // Enable final image perspective transformation - function Set3DPerspective($aDir=1,$aHorizon=100,$aSkewDist=120,$aQuality=false,$aFillColor='#FFFFFF',$aBorder=false,$aMinSize=true,$aHorizonPos=0.5) { - $this->iImgTrans = true; - $this->iImgTransHorizon = $aHorizon; - $this->iImgTransSkewDist= $aSkewDist; - $this->iImgTransDirection = $aDir; - $this->iImgTransMinSize = $aMinSize; - $this->iImgTransFillColor=$aFillColor; - $this->iImgTransHighQ=$aQuality; - $this->iImgTransBorder=$aBorder; - $this->iImgTransHorizonPos=$aHorizonPos; - } - - function SetUserFont($aNormal,$aBold='',$aItalic='',$aBoldIt='') { - $this->img->ttf->SetUserFont($aNormal,$aBold,$aItalic,$aBoldIt); - } - - function SetUserFont1($aNormal,$aBold='',$aItalic='',$aBoldIt='') { - $this->img->ttf->SetUserFont1($aNormal,$aBold,$aItalic,$aBoldIt); - } - - function SetUserFont2($aNormal,$aBold='',$aItalic='',$aBoldIt='') { - $this->img->ttf->SetUserFont2($aNormal,$aBold,$aItalic,$aBoldIt); - } - - function SetUserFont3($aNormal,$aBold='',$aItalic='',$aBoldIt='') { - $this->img->ttf->SetUserFont3($aNormal,$aBold,$aItalic,$aBoldIt); - } - - // Set Image format and optional quality - function SetImgFormat($aFormat,$aQuality=75) { - $this->img->SetImgFormat($aFormat,$aQuality); - } - - // Should the grid be in front or back of the plot? - function SetGridDepth($aDepth) { - $this->grid_depth=$aDepth; - } - - function SetIconDepth($aDepth) { - $this->iIconDepth=$aDepth; - } - - // Specify graph angle 0-360 degrees. - function SetAngle($aAngle) { - $this->img->SetAngle($aAngle); - } - - function SetAlphaBlending($aFlg=true) { - $this->img->SetAlphaBlending($aFlg); - } - - // Shortcut to image margin - function SetMargin($lm,$rm,$tm,$bm) { - $this->img->SetMargin($lm,$rm,$tm,$bm); - } - - function SetY2OrderBack($aBack=true) { - $this->y2orderback = $aBack; - } - - // Rotate the graph 90 degrees and set the margin - // when we have done a 90 degree rotation - function Set90AndMargin($lm=0,$rm=0,$tm=0,$bm=0) { - $lm = $lm ==0 ? floor(0.2 * $this->img->width) : $lm ; - $rm = $rm ==0 ? floor(0.1 * $this->img->width) : $rm ; - $tm = $tm ==0 ? floor(0.2 * $this->img->height) : $tm ; - $bm = $bm ==0 ? floor(0.1 * $this->img->height) : $bm ; - - $adj = ($this->img->height - $this->img->width)/2; - $this->img->SetMargin($tm-$adj,$bm-$adj,$rm+$adj,$lm+$adj); - $this->img->SetCenter(floor($this->img->width/2),floor($this->img->height/2)); - $this->SetAngle(90); - if( empty($this->yaxis) || empty($this->xaxis) ) { - JpgraphError::RaiseL(25009);//('You must specify what scale to use with a call to Graph::SetScale()'); - } - $this->xaxis->SetLabelAlign('right','center'); - $this->yaxis->SetLabelAlign('center','bottom'); - } - - function SetClipping($aFlg=true) { - $this->iDoClipping = $aFlg ; - } - - // Add a plot object to the graph - function Add($aPlot) { - if( $aPlot == null ) { - JpGraphError::RaiseL(25010);//("Graph::Add() You tried to add a null plot to the graph."); - } - if( is_array($aPlot) && count($aPlot) > 0 ) { - $cl = $aPlot[0]; - } - else { - $cl = $aPlot; - } - - if( $cl instanceof Text ) $this->AddText($aPlot); - elseif( class_exists('PlotLine',false) && ($cl instanceof PlotLine) ) $this->AddLine($aPlot); - elseif( class_exists('PlotBand',false) && ($cl instanceof PlotBand) ) $this->AddBand($aPlot); - elseif( class_exists('IconPlot',false) && ($cl instanceof IconPlot) ) $this->AddIcon($aPlot); - elseif( class_exists('GTextTable',false) && ($cl instanceof GTextTable) ) $this->AddTable($aPlot); - else { - if( is_array($aPlot) ) { - $this->plots = array_merge($this->plots,$aPlot); - } - else { - $this->plots[] = $aPlot; - } - } - } - - function AddTable($aTable) { - if( is_array($aTable) ) { - for($i=0; $i < count($aTable); ++$i ) { - $this->iTables[]=$aTable[$i]; - } - } - else { - $this->iTables[] = $aTable ; - } - } - - function AddIcon($aIcon) { - if( is_array($aIcon) ) { - for($i=0; $i < count($aIcon); ++$i ) { - $this->iIcons[]=$aIcon[$i]; - } - } - else { - $this->iIcons[] = $aIcon ; - } - } - - // Add plot to second Y-scale - function AddY2($aPlot) { - if( $aPlot == null ) { - JpGraphError::RaiseL(25011);//("Graph::AddY2() You tried to add a null plot to the graph."); - } - - if( is_array($aPlot) && count($aPlot) > 0 ) { - $cl = $aPlot[0]; - } - else { - $cl = $aPlot; - } - - if( $cl instanceof Text ) { - $this->AddText($aPlot,true); - } - elseif( class_exists('PlotLine',false) && ($cl instanceof PlotLine) ) { - $this->AddLine($aPlot,true); - } - elseif( class_exists('PlotBand',false) && ($cl instanceof PlotBand) ) { - $this->AddBand($aPlot,true); - } - else { - $this->y2plots[] = $aPlot; - } - } - - // Add plot to the extra Y-axises - function AddY($aN,$aPlot) { - - if( $aPlot == null ) { - JpGraphError::RaiseL(25012);//("Graph::AddYN() You tried to add a null plot to the graph."); - } - - if( is_array($aPlot) && count($aPlot) > 0 ) { - $cl = $aPlot[0]; - } - else { - $cl = $aPlot; - } - - if( ($cl instanceof Text) || - (class_exists('PlotLine',false) && ($cl instanceof PlotLine)) || - (class_exists('PlotBand',false) && ($cl instanceof PlotBand)) ) { - JpGraph::RaiseL(25013);//('You can only add standard plots to multiple Y-axis'); - } - else { - $this->ynplots[$aN][] = $aPlot; - } - } - - // Add text object to the graph - function AddText($aTxt,$aToY2=false) { - if( $aTxt == null ) { - JpGraphError::RaiseL(25014);//("Graph::AddText() You tried to add a null text to the graph."); - } - if( $aToY2 ) { - if( is_array($aTxt) ) { - for($i=0; $i < count($aTxt); ++$i ) { - $this->y2texts[]=$aTxt[$i]; - } - } - else { - $this->y2texts[] = $aTxt; - } - } - else { - if( is_array($aTxt) ) { - for($i=0; $i < count($aTxt); ++$i ) { - $this->texts[]=$aTxt[$i]; - } - } - else { - $this->texts[] = $aTxt; - } - } - } - - // Add a line object (class PlotLine) to the graph - function AddLine($aLine,$aToY2=false) { - if( $aLine == null ) { - JpGraphError::RaiseL(25015);//("Graph::AddLine() You tried to add a null line to the graph."); - } - - if( $aToY2 ) { - if( is_array($aLine) ) { - for($i=0; $i < count($aLine); ++$i ) { - //$this->y2lines[]=$aLine[$i]; - $this->y2plots[]=$aLine[$i]; - } - } - else { - //$this->y2lines[] = $aLine; - $this->y2plots[]=$aLine; - } - } - else { - if( is_array($aLine) ) { - for($i=0; $ilines[]=$aLine[$i]; - $this->plots[]=$aLine[$i]; - } - } - else { - //$this->lines[] = $aLine; - $this->plots[] = $aLine; - } - } - } - - // Add vertical or horizontal band - function AddBand($aBand,$aToY2=false) { - if( $aBand == null ) { - JpGraphError::RaiseL(25016);//(" Graph::AddBand() You tried to add a null band to the graph."); - } - - if( $aToY2 ) { - if( is_array($aBand) ) { - for($i=0; $i < count($aBand); ++$i ) { - $this->y2bands[] = $aBand[$i]; - } - } - else { - $this->y2bands[] = $aBand; - } - } - else { - if( is_array($aBand) ) { - for($i=0; $i < count($aBand); ++$i ) { - $this->bands[] = $aBand[$i]; - } - } - else { - $this->bands[] = $aBand; - } - } - } - - function SetPlotGradient($aFrom='navy',$aTo='silver',$aGradType=2) { - $this->plot_gradtype=$aGradType; - $this->plot_gradfrom = $aFrom; - $this->plot_gradto = $aTo; - } - - function SetBackgroundGradient($aFrom='navy',$aTo='silver',$aGradType=2,$aStyle=BGRAD_FRAME) { - $this->bkg_gradtype=$aGradType; - $this->bkg_gradstyle=$aStyle; - $this->bkg_gradfrom = $aFrom; - $this->bkg_gradto = $aTo; - } - - // Set a country flag in the background - function SetBackgroundCFlag($aName,$aBgType=BGIMG_FILLPLOT,$aMix=100) { - $this->background_cflag = $aName; - $this->background_cflag_type = $aBgType; - $this->background_cflag_mix = $aMix; - } - - // Alias for the above method - function SetBackgroundCountryFlag($aName,$aBgType=BGIMG_FILLPLOT,$aMix=100) { - $this->background_cflag = $aName; - $this->background_cflag_type = $aBgType; - $this->background_cflag_mix = $aMix; - } - - - // Specify a background image - function SetBackgroundImage($aFileName,$aBgType=BGIMG_FILLPLOT,$aImgFormat='auto') { - - // Get extension to determine image type - if( $aImgFormat == 'auto' ) { - $e = explode('.',$aFileName); - if( !$e ) { - JpGraphError::RaiseL(25018,$aFileName);//('Incorrect file name for Graph::SetBackgroundImage() : '.$aFileName.' Must have a valid image extension (jpg,gif,png) when using autodetection of image type'); - } - - $valid_formats = array('png', 'jpg', 'gif'); - $aImgFormat = strtolower($e[count($e)-1]); - if ($aImgFormat == 'jpeg') { - $aImgFormat = 'jpg'; - } - elseif (!in_array($aImgFormat, $valid_formats) ) { - JpGraphError::RaiseL(25019,$aImgFormat);//('Unknown file extension ($aImgFormat) in Graph::SetBackgroundImage() for filename: '.$aFileName); - } - } - - $this->background_image = $aFileName; - $this->background_image_type=$aBgType; - $this->background_image_format=$aImgFormat; - } - - function SetBackgroundImageMix($aMix) { - $this->background_image_mix = $aMix ; - } - - // Adjust background image position - function SetBackgroundImagePos($aXpos,$aYpos) { - $this->background_image_xpos = $aXpos ; - $this->background_image_ypos = $aYpos ; - } - - // Specify axis style (boxed or single) - function SetAxisStyle($aStyle) { - $this->iAxisStyle = $aStyle ; - } - - // Set a frame around the plot area - function SetBox($aDrawPlotFrame=true,$aPlotFrameColor=array(0,0,0),$aPlotFrameWeight=1) { - $this->boxed = $aDrawPlotFrame; - $this->box_weight = $aPlotFrameWeight; - $this->box_color = $aPlotFrameColor; - } - - // Specify color for the plotarea (not the margins) - function SetColor($aColor) { - $this->plotarea_color=$aColor; - } - - // Specify color for the margins (all areas outside the plotarea) - function SetMarginColor($aColor) { - $this->margin_color=$aColor; - } - - // Set a frame around the entire image - function SetFrame($aDrawImgFrame=true,$aImgFrameColor=array(0,0,0),$aImgFrameWeight=1) { - $this->doframe = $aDrawImgFrame; - $this->frame_color = $aImgFrameColor; - $this->frame_weight = $aImgFrameWeight; - } - - function SetFrameBevel($aDepth=3,$aBorder=false,$aBorderColor='black',$aColor1='white@0.4',$aColor2='darkgray@0.4',$aFlg=true) { - $this->framebevel = $aFlg ; - $this->framebeveldepth = $aDepth ; - $this->framebevelborder = $aBorder ; - $this->framebevelbordercolor = $aBorderColor ; - $this->framebevelcolor1 = $aColor1 ; - $this->framebevelcolor2 = $aColor2 ; - - $this->doshadow = false ; - } - - // Set the shadow around the whole image - function SetShadow($aShowShadow=true,$aShadowWidth=5,$aShadowColor='darkgray') { - $this->doshadow = $aShowShadow; - $this->shadow_color = $aShadowColor; - $this->shadow_width = $aShadowWidth; - $this->footer->iBottomMargin += $aShadowWidth; - $this->footer->iRightMargin += $aShadowWidth; - } - - // Specify x,y scale. Note that if you manually specify the scale - // you must also specify the tick distance with a call to Ticks::Set() - function SetScale($aAxisType,$aYMin=1,$aYMax=1,$aXMin=1,$aXMax=1) { - $this->axtype = $aAxisType; - - if( $aYMax < $aYMin || $aXMax < $aXMin ) { - JpGraphError::RaiseL(25020);//('Graph::SetScale(): Specified Max value must be larger than the specified Min value.'); - } - - $yt=substr($aAxisType,-3,3); - if( $yt == 'lin' ) { - $this->yscale = new LinearScale($aYMin,$aYMax); - } - elseif( $yt == 'int' ) { - $this->yscale = new LinearScale($aYMin,$aYMax); - $this->yscale->SetIntScale(); - } - elseif( $yt == 'log' ) { - $this->yscale = new LogScale($aYMin,$aYMax); - } - else { - JpGraphError::RaiseL(25021,$aAxisType);//("Unknown scale specification for Y-scale. ($aAxisType)"); - } - - $xt=substr($aAxisType,0,3); - if( $xt == 'lin' || $xt == 'tex' ) { - $this->xscale = new LinearScale($aXMin,$aXMax,'x'); - $this->xscale->textscale = ($xt == 'tex'); - } - elseif( $xt == 'int' ) { - $this->xscale = new LinearScale($aXMin,$aXMax,'x'); - $this->xscale->SetIntScale(); - } - elseif( $xt == 'dat' ) { - $this->xscale = new DateScale($aXMin,$aXMax,'x'); - } - elseif( $xt == 'log' ) { - $this->xscale = new LogScale($aXMin,$aXMax,'x'); - } - else { - JpGraphError::RaiseL(25022,$aAxisType);//(" Unknown scale specification for X-scale. ($aAxisType)"); - } - - $this->xaxis = new Axis($this->img,$this->xscale); - $this->yaxis = new Axis($this->img,$this->yscale); - $this->xgrid = new Grid($this->xaxis); - $this->ygrid = new Grid($this->yaxis); - $this->ygrid->Show(); - } - - // Specify secondary Y scale - function SetY2Scale($aAxisType='lin',$aY2Min=1,$aY2Max=1) { - if( $aAxisType == 'lin' ) { - $this->y2scale = new LinearScale($aY2Min,$aY2Max); - } - elseif( $aAxisType == 'int' ) { - $this->y2scale = new LinearScale($aY2Min,$aY2Max); - $this->y2scale->SetIntScale(); - } - elseif( $aAxisType == 'log' ) { - $this->y2scale = new LogScale($aY2Min,$aY2Max); - } - else { - JpGraphError::RaiseL(25023,$aAxisType);//("JpGraph: Unsupported Y2 axis type: $aAxisType\nMust be one of (lin,log,int)"); - } - - $this->y2axis = new Axis($this->img,$this->y2scale); - $this->y2axis->scale->ticks->SetDirection(SIDE_LEFT); - $this->y2axis->SetLabelSide(SIDE_RIGHT); - $this->y2axis->SetPos('max'); - $this->y2axis->SetTitleSide(SIDE_RIGHT); - - // Deafult position is the max x-value - $this->y2grid = new Grid($this->y2axis); - } - - // Set the delta position (in pixels) between the multiple Y-axis - function SetYDeltaDist($aDist) { - $this->iYAxisDeltaPos = $aDist; - } - - // Specify secondary Y scale - function SetYScale($aN,$aAxisType="lin",$aYMin=1,$aYMax=1) { - - if( $aAxisType == 'lin' ) { - $this->ynscale[$aN] = new LinearScale($aYMin,$aYMax); - } - elseif( $aAxisType == 'int' ) { - $this->ynscale[$aN] = new LinearScale($aYMin,$aYMax); - $this->ynscale[$aN]->SetIntScale(); - } - elseif( $aAxisType == 'log' ) { - $this->ynscale[$aN] = new LogScale($aYMin,$aYMax); - } - else { - JpGraphError::RaiseL(25024,$aAxisType);//("JpGraph: Unsupported Y axis type: $aAxisType\nMust be one of (lin,log,int)"); - } - - $this->ynaxis[$aN] = new Axis($this->img,$this->ynscale[$aN]); - $this->ynaxis[$aN]->scale->ticks->SetDirection(SIDE_LEFT); - $this->ynaxis[$aN]->SetLabelSide(SIDE_RIGHT); - } - - // Specify density of ticks when autoscaling 'normal', 'dense', 'sparse', 'verysparse' - // The dividing factor have been determined heuristically according to my aesthetic - // sense (or lack off) y.m.m.v ! - function SetTickDensity($aYDensity=TICKD_NORMAL,$aXDensity=TICKD_NORMAL) { - $this->xtick_factor=30; - $this->ytick_factor=25; - switch( $aYDensity ) { - case TICKD_DENSE: - $this->ytick_factor=12; - break; - case TICKD_NORMAL: - $this->ytick_factor=25; - break; - case TICKD_SPARSE: - $this->ytick_factor=40; - break; - case TICKD_VERYSPARSE: - $this->ytick_factor=100; - break; - default: - JpGraphError::RaiseL(25025,$densy);//("JpGraph: Unsupported Tick density: $densy"); - } - switch( $aXDensity ) { - case TICKD_DENSE: - $this->xtick_factor=15; - break; - case TICKD_NORMAL: - $this->xtick_factor=30; - break; - case TICKD_SPARSE: - $this->xtick_factor=45; - break; - case TICKD_VERYSPARSE: - $this->xtick_factor=60; - break; - default: - JpGraphError::RaiseL(25025,$densx);//("JpGraph: Unsupported Tick density: $densx"); - } - } - - - // Get a string of all image map areas - function GetCSIMareas() { - if( !$this->iHasStroked ) { - $this->Stroke(_CSIM_SPECIALFILE); - } - - $csim = $this->title->GetCSIMAreas(); - $csim .= $this->subtitle->GetCSIMAreas(); - $csim .= $this->subsubtitle->GetCSIMAreas(); - $csim .= $this->legend->GetCSIMAreas(); - - if( $this->y2axis != NULL ) { - $csim .= $this->y2axis->title->GetCSIMAreas(); - } - - if( $this->texts != null ) { - $n = count($this->texts); - for($i=0; $i < $n; ++$i ) { - $csim .= $this->texts[$i]->GetCSIMAreas(); - } - } - - if( $this->y2texts != null && $this->y2scale != null ) { - $n = count($this->y2texts); - for($i=0; $i < $n; ++$i ) { - $csim .= $this->y2texts[$i]->GetCSIMAreas(); - } - } - - if( $this->yaxis != null && $this->xaxis != null ) { - $csim .= $this->yaxis->title->GetCSIMAreas(); - $csim .= $this->xaxis->title->GetCSIMAreas(); - } - - $n = count($this->plots); - for( $i=0; $i < $n; ++$i ) { - $csim .= $this->plots[$i]->GetCSIMareas(); - } - - $n = count($this->y2plots); - for( $i=0; $i < $n; ++$i ) { - $csim .= $this->y2plots[$i]->GetCSIMareas(); - } - - $n = count($this->ynaxis); - for( $i=0; $i < $n; ++$i ) { - $m = count($this->ynplots[$i]); - for($j=0; $j < $m; ++$j ) { - $csim .= $this->ynplots[$i][$j]->GetCSIMareas(); - } - } - - $n = count($this->iTables); - for( $i=0; $i < $n; ++$i ) { - $csim .= $this->iTables[$i]->GetCSIMareas(); - } - - return $csim; - } - - // Get a complete .. tag for the final image map - function GetHTMLImageMap($aMapName) { - $im = "\n"; - $im .= $this->GetCSIMareas(); - $im .= ""; - return $im; - } - - function CheckCSIMCache($aCacheName,$aTimeOut=60) { - global $_SERVER; - - if( $aCacheName=='auto' ) { - $aCacheName=basename($_SERVER['PHP_SELF']); - } - - $urlarg = $this->GetURLArguments(); - $this->csimcachename = CSIMCACHE_DIR.$aCacheName.$urlarg; - $this->csimcachetimeout = $aTimeOut; - - // First determine if we need to check for a cached version - // This differs from the standard cache in the sense that the - // image and CSIM map HTML file is written relative to the directory - // the script executes in and not the specified cache directory. - // The reason for this is that the cache directory is not necessarily - // accessible from the HTTP server. - if( $this->csimcachename != '' ) { - $dir = dirname($this->csimcachename); - $base = basename($this->csimcachename); - $base = strtok($base,'.'); - $suffix = strtok('.'); - $basecsim = $dir.'/'.$base.'?'.$urlarg.'_csim_.html'; - $baseimg = $dir.'/'.$base.'?'.$urlarg.'.'.$this->img->img_format; - - $timedout=false; - // Does it exist at all ? - - if( file_exists($basecsim) && file_exists($baseimg) ) { - // Check that it hasn't timed out - $diff=time()-filemtime($basecsim); - if( $this->csimcachetimeout>0 && ($diff > $this->csimcachetimeout*60) ) { - $timedout=true; - @unlink($basecsim); - @unlink($baseimg); - } - else { - if ($fh = @fopen($basecsim, "r")) { - fpassthru($fh); - return true; - } - else { - JpGraphError::RaiseL(25027,$basecsim);//(" Can't open cached CSIM \"$basecsim\" for reading."); - } - } - } - } - return false; - } - - // Build the argument string to be used with the csim images - static function GetURLArguments($aAddRecursiveBlocker=false) { - - if( $aAddRecursiveBlocker ) { - // This is a JPGRAPH internal defined that prevents - // us from recursively coming here again - $urlarg = _CSIM_DISPLAY.'=1'; - } - - // Now reconstruct any user URL argument - reset($_GET); - while( list($key,$value) = each($_GET) ) { - if( is_array($value) ) { - foreach ( $value as $k => $v ) { - $urlarg .= '&'.$key.'%5B'.$k.'%5D='.urlencode($v); - } - } - else { - $urlarg .= '&'.$key.'='.urlencode($value); - } - } - - // It's not ideal to convert POST argument to GET arguments - // but there is little else we can do. One idea for the - // future might be recreate the POST header in case. - reset($_POST); - while( list($key,$value) = each($_POST) ) { - if( is_array($value) ) { - foreach ( $value as $k => $v ) { - $urlarg .= '&'.$key.'%5B'.$k.'%5D='.urlencode($v); - } - } - else { - $urlarg .= '&'.$key.'='.urlencode($value); - } - } - - return $urlarg; - } - - function SetCSIMImgAlt($aAlt) { - $this->iCSIMImgAlt = $aAlt; - } - - function StrokeCSIM($aScriptName='auto',$aCSIMName='',$aBorder=0) { - if( $aCSIMName=='' ) { - // create a random map name - srand ((double) microtime() * 1000000); - $r = rand(0,100000); - $aCSIMName='__mapname'.$r.'__'; - } - - if( $aScriptName=='auto' ) { - $aScriptName=basename($_SERVER['PHP_SELF']); - } - - $urlarg = $this->GetURLArguments(true); - - if( empty($_GET[_CSIM_DISPLAY]) ) { - // First determine if we need to check for a cached version - // This differs from the standard cache in the sense that the - // image and CSIM map HTML file is written relative to the directory - // the script executes in and not the specified cache directory. - // The reason for this is that the cache directory is not necessarily - // accessible from the HTTP server. - if( $this->csimcachename != '' ) { - $dir = dirname($this->csimcachename); - $base = basename($this->csimcachename); - $base = strtok($base,'.'); - $suffix = strtok('.'); - $basecsim = $dir.'/'.$base.'?'.$urlarg.'_csim_.html'; - $baseimg = $base.'?'.$urlarg.'.'.$this->img->img_format; - - // Check that apache can write to directory specified - - if( file_exists($dir) && !is_writeable($dir) ) { - JpgraphError::RaiseL(25028,$dir);//('Apache/PHP does not have permission to write to the CSIM cache directory ('.$dir.'). Check permissions.'); - } - - // Make sure directory exists - $this->cache->MakeDirs($dir); - - // Write the image file - $this->Stroke(CSIMCACHE_DIR.$baseimg); - - // Construct wrapper HTML and write to file and send it back to browser - - // In the src URL we must replace the '?' with its encoding to prevent the arguments - // to be converted to real arguments. - $tmp = str_replace('?','%3f',$baseimg); - $htmlwrap = $this->GetHTMLImageMap($aCSIMName)."\n". - 'img->width.'" height="'.$this->img->height."\" alt=\"".$this->iCSIMImgAlt."\" />\n"; - - if($fh = @fopen($basecsim,'w') ) { - fwrite($fh,$htmlwrap); - fclose($fh); - echo $htmlwrap; - } - else { - JpGraphError::RaiseL(25029,$basecsim);//(" Can't write CSIM \"$basecsim\" for writing. Check free space and permissions."); - } - } - else { - - if( $aScriptName=='' ) { - JpGraphError::RaiseL(25030);//('Missing script name in call to StrokeCSIM(). You must specify the name of the actual image script as the first parameter to StrokeCSIM().'); - } - echo $this->GetHTMLImageMap($aCSIMName) . $this->GetCSIMImgHTML($aCSIMName, $aScriptName, $aBorder); - } - } - else { - $this->Stroke(); - } - } - - function StrokeCSIMImage() { - if( @$_GET[_CSIM_DISPLAY] == 1 ) { - $this->Stroke(); - } - } - - function GetCSIMImgHTML($aCSIMName, $aScriptName='auto', $aBorder=0 ) { - if( $aScriptName=='auto' ) { - $aScriptName=basename($_SERVER['PHP_SELF']); - } - $urlarg = $this->GetURLArguments(true); - return "\"".$this-iCSIMImgAlt."\" />\n"; - } - - function GetTextsYMinMax($aY2=false) { - if( $aY2 ) { - $txts = $this->y2texts; - } - else { - $txts = $this->texts; - } - $n = count($txts); - $min=null; - $max=null; - for( $i=0; $i < $n; ++$i ) { - if( $txts[$i]->iScalePosY !== null && $txts[$i]->iScalePosX !== null ) { - if( $min === null ) { - $min = $max = $txts[$i]->iScalePosY ; - } - else { - $min = min($min,$txts[$i]->iScalePosY); - $max = max($max,$txts[$i]->iScalePosY); - } - } - } - if( $min !== null ) { - return array($min,$max); - } - else { - return null; - } - } - - function GetTextsXMinMax($aY2=false) { - if( $aY2 ) { - $txts = $this->y2texts; - } - else { - $txts = $this->texts; - } - $n = count($txts); - $min=null; - $max=null; - for( $i=0; $i < $n; ++$i ) { - if( $txts[$i]->iScalePosY !== null && $txts[$i]->iScalePosX !== null ) { - if( $min === null ) { - $min = $max = $txts[$i]->iScalePosX ; - } - else { - $min = min($min,$txts[$i]->iScalePosX); - $max = max($max,$txts[$i]->iScalePosX); - } - } - } - if( $min !== null ) { - return array($min,$max); - } - else { - return null; - } - } - - function GetXMinMax() { - - list($min,$ymin) = $this->plots[0]->Min(); - list($max,$ymax) = $this->plots[0]->Max(); - - $i=0; - // Some plots, e.g. PlotLine should not affect the scale - // and will return (null,null). We should ignore those - // values. - while( ($min===null || $max === null) && ($i < count($this->plots)-1) ) { - ++$i; - list($min,$ymin) = $this->plots[$i]->Min(); - list($max,$ymax) = $this->plots[$i]->Max(); - } - - foreach( $this->plots as $p ) { - list($xmin,$ymin) = $p->Min(); - list($xmax,$ymax) = $p->Max(); - - if( $xmin !== null && $xmax !== null ) { - $min = Min($xmin,$min); - $max = Max($xmax,$max); - } - } - - if( $this->y2axis != null ) { - foreach( $this->y2plots as $p ) { - list($xmin,$ymin) = $p->Min(); - list($xmax,$ymax) = $p->Max(); - $min = Min($xmin,$min); - $max = Max($xmax,$max); - } - } - - $n = count($this->ynaxis); - for( $i=0; $i < $n; ++$i ) { - if( $this->ynaxis[$i] != null) { - foreach( $this->ynplots[$i] as $p ) { - list($xmin,$ymin) = $p->Min(); - list($xmax,$ymax) = $p->Max(); - $min = Min($xmin,$min); - $max = Max($xmax,$max); - } - } - } - return array($min,$max); - } - - function AdjustMarginsForTitles() { - $totrequired = ($this->title->t != '' ? $this->title->GetTextHeight($this->img) + $this->title->margin + 5 : 0 ) + - ($this->subtitle->t != '' ? $this->subtitle->GetTextHeight($this->img) + $this->subtitle->margin + 5 : 0 ) + - ($this->subsubtitle->t != '' ? $this->subsubtitle->GetTextHeight($this->img) + $this->subsubtitle->margin + 5 : 0 ) ; - - $btotrequired = 0; - if($this->xaxis != null && !$this->xaxis->hide && !$this->xaxis->hide_labels ) { - // Minimum bottom margin - if( $this->xaxis->title->t != '' ) { - if( $this->img->a == 90 ) { - $btotrequired = $this->yaxis->title->GetTextHeight($this->img) + 7 ; - } - else { - $btotrequired = $this->xaxis->title->GetTextHeight($this->img) + 7 ; - } - } - else { - $btotrequired = 0; - } - - if( $this->img->a == 90 ) { - $this->img->SetFont($this->yaxis->font_family,$this->yaxis->font_style, - $this->yaxis->font_size); - $lh = $this->img->GetTextHeight('Mg',$this->yaxis->label_angle); - } - else { - $this->img->SetFont($this->xaxis->font_family,$this->xaxis->font_style, - $this->xaxis->font_size); - $lh = $this->img->GetTextHeight('Mg',$this->xaxis->label_angle); - } - - $btotrequired += $lh + 6; - } - - if( $this->img->a == 90 ) { - // DO Nothing. It gets too messy to do this properly for 90 deg... - } - else{ - if( $this->img->top_margin < $totrequired ) { - $this->SetMargin($this->img->left_margin,$this->img->right_margin, - $totrequired,$this->img->bottom_margin); - } - if( $this->img->bottom_margin < $btotrequired ) { - $this->SetMargin($this->img->left_margin,$this->img->right_margin, - $this->img->top_margin,$btotrequired); - } - } - } - - function StrokeStore($aStrokeFileName) { - // Get the handler to prevent the library from sending the - // image to the browser - $ih = $this->Stroke(_IMG_HANDLER); - - // Stroke it to a file - $this->img->Stream($aStrokeFileName); - - // Send it back to browser - $this->img->Headers(); - $this->img->Stream(); - } - - function doAutoscaleXAxis() { - //Check if we should autoscale x-axis - if( !$this->xscale->IsSpecified() ) { - if( substr($this->axtype,0,4) == "text" ) { - $max=0; - $n = count($this->plots); - for($i=0; $i < $n; ++$i ) { - $p = $this->plots[$i]; - // We need some unfortunate sub class knowledge here in order - // to increase number of data points in case it is a line plot - // which has the barcenter set. If not it could mean that the - // last point of the data is outside the scale since the barcenter - // settings means that we will shift the entire plot half a tick step - // to the right in oder to align with the center of the bars. - if( class_exists('BarPlot',false) ) { - $cl = strtolower(get_class($p)); - if( (class_exists('BarPlot',false) && ($p instanceof BarPlot)) || empty($p->barcenter) ) { - $max=max($max,$p->numpoints-1); - } - else { - $max=max($max,$p->numpoints); - } - } - else { - if( empty($p->barcenter) ) { - $max=max($max,$p->numpoints-1); - } - else { - $max=max($max,$p->numpoints); - } - } - } - $min=0; - if( $this->y2axis != null ) { - foreach( $this->y2plots as $p ) { - $max=max($max,$p->numpoints-1); - } - } - $n = count($this->ynaxis); - for( $i=0; $i < $n; ++$i ) { - if( $this->ynaxis[$i] != null) { - foreach( $this->ynplots[$i] as $p ) { - $max=max($max,$p->numpoints-1); - } - } - } - - $this->xscale->Update($this->img,$min,$max); - $this->xscale->ticks->Set($this->xaxis->tick_step,1); - $this->xscale->ticks->SupressMinorTickMarks(); - } - else { - list($min,$max) = $this->GetXMinMax(); - - $lres = $this->GetLinesXMinMax($this->lines); - if( $lres ) { - list($linmin,$linmax) = $lres ; - $min = min($min,$linmin); - $max = max($max,$linmax); - } - - $lres = $this->GetLinesXMinMax($this->y2lines); - if( $lres ) { - list($linmin,$linmax) = $lres ; - $min = min($min,$linmin); - $max = max($max,$linmax); - } - - $tres = $this->GetTextsXMinMax(); - if( $tres ) { - list($tmin,$tmax) = $tres ; - $min = min($min,$tmin); - $max = max($max,$tmax); - } - - $tres = $this->GetTextsXMinMax(true); - if( $tres ) { - list($tmin,$tmax) = $tres ; - $min = min($min,$tmin); - $max = max($max,$tmax); - } - - $this->xscale->AutoScale($this->img,$min,$max,round($this->img->plotwidth/$this->xtick_factor)); - } - - //Adjust position of y-axis and y2-axis to minimum/maximum of x-scale - if( !is_numeric($this->yaxis->pos) && !is_string($this->yaxis->pos) ) { - $this->yaxis->SetPos($this->xscale->GetMinVal()); - } - } - elseif( $this->xscale->IsSpecified() && - ( $this->xscale->auto_ticks || !$this->xscale->ticks->IsSpecified()) ) { - // The tick calculation will use the user suplied min/max values to determine - // the ticks. If auto_ticks is false the exact user specifed min and max - // values will be used for the scale. - // If auto_ticks is true then the scale might be slightly adjusted - // so that the min and max values falls on an even major step. - $min = $this->xscale->scale[0]; - $max = $this->xscale->scale[1]; - $this->xscale->AutoScale($this->img,$min,$max,round($this->img->plotwidth/$this->xtick_factor),false); - - // Now make sure we show enough precision to accurate display the - // labels. If this is not done then the user might end up with - // a scale that might actually start with, say 13.5, butdue to rounding - // the scale label will ony show 14. - if( abs(floor($min)-$min) > 0 ) { - - // If the user has set a format then we bail out - if( $this->xscale->ticks->label_formatstr == '' && $this->xscale->ticks->label_dateformatstr == '' ) { - $this->xscale->ticks->precision = abs( floor(log10( abs(floor($min)-$min))) )+1; - } - } - } - - // Position the optional Y2 and Yn axis to the rightmost position of the x-axis - if( $this->y2axis != null ) { - if( !is_numeric($this->y2axis->pos) && !is_string($this->y2axis->pos) ) { - $this->y2axis->SetPos($this->xscale->GetMaxVal()); - } - $this->y2axis->SetTitleSide(SIDE_RIGHT); - } - - $n = count($this->ynaxis); - $nY2adj = $this->y2axis != null ? $this->iYAxisDeltaPos : 0; - for( $i=0; $i < $n; ++$i ) { - if( $this->ynaxis[$i] != null ) { - if( !is_numeric($this->ynaxis[$i]->pos) && !is_string($this->ynaxis[$i]->pos) ) { - $this->ynaxis[$i]->SetPos($this->xscale->GetMaxVal()); - $this->ynaxis[$i]->SetPosAbsDelta($i*$this->iYAxisDeltaPos + $nY2adj); - } - $this->ynaxis[$i]->SetTitleSide(SIDE_RIGHT); - } - } - } - - - function doAutoScaleYnAxis() { - - if( $this->y2scale != null) { - if( !$this->y2scale->IsSpecified() && count($this->y2plots)>0 ) { - list($min,$max) = $this->GetPlotsYMinMax($this->y2plots); - - $lres = $this->GetLinesYMinMax($this->y2lines); - if( is_array($lres) ) { - list($linmin,$linmax) = $lres ; - $min = min($min,$linmin); - $max = max($max,$linmax); - } - $tres = $this->GetTextsYMinMax(true); - if( is_array($tres) ) { - list($tmin,$tmax) = $tres ; - $min = min($min,$tmin); - $max = max($max,$tmax); - } - $this->y2scale->AutoScale($this->img,$min,$max,$this->img->plotheight/$this->ytick_factor); - } - elseif( $this->y2scale->IsSpecified() && ( $this->y2scale->auto_ticks || !$this->y2scale->ticks->IsSpecified()) ) { - // The tick calculation will use the user suplied min/max values to determine - // the ticks. If auto_ticks is false the exact user specifed min and max - // values will be used for the scale. - // If auto_ticks is true then the scale might be slightly adjusted - // so that the min and max values falls on an even major step. - $min = $this->y2scale->scale[0]; - $max = $this->y2scale->scale[1]; - $this->y2scale->AutoScale($this->img,$min,$max, - $this->img->plotheight/$this->ytick_factor, - $this->y2scale->auto_ticks); - - // Now make sure we show enough precision to accurate display the - // labels. If this is not done then the user might end up with - // a scale that might actually start with, say 13.5, butdue to rounding - // the scale label will ony show 14. - if( abs(floor($min)-$min) > 0 ) { - // If the user has set a format then we bail out - if( $this->y2scale->ticks->label_formatstr == '' && $this->y2scale->ticks->label_dateformatstr == '' ) { - $this->y2scale->ticks->precision = abs( floor(log10( abs(floor($min)-$min))) )+1; - } - } - - } - } - - - // - // Autoscale the extra Y-axises - // - $n = count($this->ynaxis); - for( $i=0; $i < $n; ++$i ) { - if( $this->ynscale[$i] != null) { - if( !$this->ynscale[$i]->IsSpecified() && count($this->ynplots[$i])>0 ) { - list($min,$max) = $this->GetPlotsYMinMax($this->ynplots[$i]); - $this->ynscale[$i]->AutoScale($this->img,$min,$max,$this->img->plotheight/$this->ytick_factor); - } - elseif( $this->ynscale[$i]->IsSpecified() && ( $this->ynscale[$i]->auto_ticks || !$this->ynscale[$i]->ticks->IsSpecified()) ) { - // The tick calculation will use the user suplied min/max values to determine - // the ticks. If auto_ticks is false the exact user specifed min and max - // values will be used for the scale. - // If auto_ticks is true then the scale might be slightly adjusted - // so that the min and max values falls on an even major step. - $min = $this->ynscale[$i]->scale[0]; - $max = $this->ynscale[$i]->scale[1]; - $this->ynscale[$i]->AutoScale($this->img,$min,$max, - $this->img->plotheight/$this->ytick_factor, - $this->ynscale[$i]->auto_ticks); - - // Now make sure we show enough precision to accurate display the - // labels. If this is not done then the user might end up with - // a scale that might actually start with, say 13.5, butdue to rounding - // the scale label will ony show 14. - if( abs(floor($min)-$min) > 0 ) { - // If the user has set a format then we bail out - if( $this->ynscale[$i]->ticks->label_formatstr == '' && $this->ynscale[$i]->ticks->label_dateformatstr == '' ) { - $this->ynscale[$i]->ticks->precision = abs( floor(log10( abs(floor($min)-$min))) )+1; - } - } - } - } - } - } - - function doAutoScaleYAxis() { - - //Check if we should autoscale y-axis - if( !$this->yscale->IsSpecified() && count($this->plots)>0 ) { - list($min,$max) = $this->GetPlotsYMinMax($this->plots); - $lres = $this->GetLinesYMinMax($this->lines); - if( is_array($lres) ) { - list($linmin,$linmax) = $lres ; - $min = min($min,$linmin); - $max = max($max,$linmax); - } - $tres = $this->GetTextsYMinMax(); - if( is_array($tres) ) { - list($tmin,$tmax) = $tres ; - $min = min($min,$tmin); - $max = max($max,$tmax); - } - $this->yscale->AutoScale($this->img,$min,$max, - $this->img->plotheight/$this->ytick_factor); - } - elseif( $this->yscale->IsSpecified() && ( $this->yscale->auto_ticks || !$this->yscale->ticks->IsSpecified()) ) { - // The tick calculation will use the user suplied min/max values to determine - // the ticks. If auto_ticks is false the exact user specifed min and max - // values will be used for the scale. - // If auto_ticks is true then the scale might be slightly adjusted - // so that the min and max values falls on an even major step. - $min = $this->yscale->scale[0]; - $max = $this->yscale->scale[1]; - $this->yscale->AutoScale($this->img,$min,$max, - $this->img->plotheight/$this->ytick_factor, - $this->yscale->auto_ticks); - - // Now make sure we show enough precision to accurate display the - // labels. If this is not done then the user might end up with - // a scale that might actually start with, say 13.5, butdue to rounding - // the scale label will ony show 14. - if( abs(floor($min)-$min) > 0 ) { - - // If the user has set a format then we bail out - if( $this->yscale->ticks->label_formatstr == '' && $this->yscale->ticks->label_dateformatstr == '' ) { - $this->yscale->ticks->precision = abs( floor(log10( abs(floor($min)-$min))) )+1; - } - } - } - - } - - function InitScaleConstants() { - // Setup scale constants - if( $this->yscale ) $this->yscale->InitConstants($this->img); - if( $this->xscale ) $this->xscale->InitConstants($this->img); - if( $this->y2scale ) $this->y2scale->InitConstants($this->img); - - $n=count($this->ynscale); - for($i=0; $i < $n; ++$i) { - if( $this->ynscale[$i] ) { - $this->ynscale[$i]->InitConstants($this->img); - } - } - } - - function doPrestrokeAdjustments() { - - // Do any pre-stroke adjustment that is needed by the different plot types - // (i.e bar plots want's to add an offset to the x-labels etc) - for($i=0; $i < count($this->plots) ; ++$i ) { - $this->plots[$i]->PreStrokeAdjust($this); - $this->plots[$i]->DoLegend($this); - } - - // Any plots on the second Y scale? - if( $this->y2scale != null ) { - for($i=0; $iy2plots) ; ++$i ) { - $this->y2plots[$i]->PreStrokeAdjust($this); - $this->y2plots[$i]->DoLegend($this); - } - } - - // Any plots on the extra Y axises? - $n = count($this->ynaxis); - for($i=0; $i<$n ; ++$i ) { - if( $this->ynplots == null || $this->ynplots[$i] == null) { - JpGraphError::RaiseL(25032,$i);//("No plots for Y-axis nbr:$i"); - } - $m = count($this->ynplots[$i]); - for($j=0; $j < $m; ++$j ) { - $this->ynplots[$i][$j]->PreStrokeAdjust($this); - $this->ynplots[$i][$j]->DoLegend($this); - } - } - } - - function StrokeBands($aDepth,$aCSIM) { - // Stroke bands - if( $this->bands != null && !$aCSIM) { - for($i=0; $i < count($this->bands); ++$i) { - // Stroke all bands that asks to be in the background - if( $this->bands[$i]->depth == $aDepth ) { - $this->bands[$i]->Stroke($this->img,$this->xscale,$this->yscale); - } - } - } - - if( $this->y2bands != null && $this->y2scale != null && !$aCSIM ) { - for($i=0; $i < count($this->y2bands); ++$i) { - // Stroke all bands that asks to be in the foreground - if( $this->y2bands[$i]->depth == $aDepth ) { - $this->y2bands[$i]->Stroke($this->img,$this->xscale,$this->y2scale); - } - } - } - } - - - // Stroke the graph - // $aStrokeFileName If != "" the image will be written to this file and NOT - // streamed back to the browser - function Stroke($aStrokeFileName='') { - - // Fist make a sanity check that user has specified a scale - if( empty($this->yscale) ) { - JpGraphError::RaiseL(25031);//('You must specify what scale to use with a call to Graph::SetScale().'); - } - - // Start by adjusting the margin so that potential titles will fit. - $this->AdjustMarginsForTitles(); - - // Give the plot a chance to do any scale adjuments the individual plots - // wants to do. Right now this is only used by the contour plot to set scale - // limits - for($i=0; $i < count($this->plots) ; ++$i ) { - $this->plots[$i]->PreScaleSetup($this); - } - - // Init scale constants that are used to calculate the transformation from - // world to pixel coordinates - $this->InitScaleConstants(); - - // If the filename is the predefined value = '_csim_special_' - // we assume that the call to stroke only needs to do enough - // to correctly generate the CSIM maps. - // We use this variable to skip things we don't strictly need - // to do to generate the image map to improve performance - // a best we can. Therefor you will see a lot of tests !$_csim in the - // code below. - $_csim = ($aStrokeFileName===_CSIM_SPECIALFILE); - - // If we are called the second time (perhaps the user has called GetHTMLImageMap() - // himself then the legends have alsready been populated once in order to get the - // CSIM coordinats. Since we do not want the legends to be populated a second time - // we clear the legends - $this->legend->Clear(); - - // We need to know if we have stroked the plot in the - // GetCSIMareas. Otherwise the CSIM hasn't been generated - // and in the case of GetCSIM called before stroke to generate - // CSIM without storing an image to disk GetCSIM must call Stroke. - $this->iHasStroked = true; - - // Setup pre-stroked adjustments and Legends - $this->doPrestrokeAdjustments(); - - // Bail out if any of the Y-axis not been specified and - // has no plots. (This means it is impossible to do autoscaling and - // no other scale was given so we can't possible draw anything). If you use manual - // scaling you also have to supply the tick steps as well. - if( (!$this->yscale->IsSpecified() && count($this->plots)==0) || - ($this->y2scale!=null && !$this->y2scale->IsSpecified() && count($this->y2plots)==0) ) { - //$e = "n=".count($this->y2plots)."\n"; - // $e = "Can't draw unspecified Y-scale.
        \nYou have either:
        \n"; - // $e .= "1. Specified an Y axis for autoscaling but have not supplied any plots
        \n"; - // $e .= "2. Specified a scale manually but have forgot to specify the tick steps"; - JpGraphError::RaiseL(25026); - } - - // Bail out if no plots and no specified X-scale - if( (!$this->xscale->IsSpecified() && count($this->plots)==0 && count($this->y2plots)==0) ) { - JpGraphError::RaiseL(25034);//("JpGraph: Can't draw unspecified X-scale.
        No plots.
        "); - } - - // Autoscale the normal Y-axis - $this->doAutoScaleYAxis(); - - // Autoscale all additiopnal y-axis - $this->doAutoScaleYnAxis(); - - // Autoscale the regular x-axis and position the y-axis properly - $this->doAutoScaleXAxis(); - - // If we have a negative values and x-axis position is at 0 - // we need to supress the first and possible the last tick since - // they will be drawn on top of the y-axis (and possible y2 axis) - // The test below might seem strange the reasone being that if - // the user hasn't specified a value for position this will not - // be set until we do the stroke for the axis so as of now it - // is undefined. - // For X-text scale we ignore all this since the tick are usually - // much further in and not close to the Y-axis. Hence the test - // for 'text' - if( ($this->yaxis->pos==$this->xscale->GetMinVal() || (is_string($this->yaxis->pos) && $this->yaxis->pos=='min')) && - !is_numeric($this->xaxis->pos) && $this->yscale->GetMinVal() < 0 && - substr($this->axtype,0,4) != 'text' && $this->xaxis->pos != 'min' ) { - - //$this->yscale->ticks->SupressZeroLabel(false); - $this->xscale->ticks->SupressFirst(); - if( $this->y2axis != null ) { - $this->xscale->ticks->SupressLast(); - } - } - elseif( !is_numeric($this->yaxis->pos) && $this->yaxis->pos=='max' ) { - $this->xscale->ticks->SupressLast(); - } - - if( !$_csim ) { - $this->StrokePlotArea(); - if( $this->iIconDepth == DEPTH_BACK ) { - $this->StrokeIcons(); - } - } - $this->StrokeAxis(false); - - // Stroke colored bands - $this->StrokeBands(DEPTH_BACK,$_csim); - - if( $this->grid_depth == DEPTH_BACK && !$_csim) { - $this->ygrid->Stroke(); - $this->xgrid->Stroke(); - } - - // Stroke Y2-axis - if( $this->y2axis != null && !$_csim) { - $this->y2axis->Stroke($this->xscale); - $this->y2grid->Stroke(); - } - - // Stroke yn-axis - $n = count($this->ynaxis); - for( $i=0; $i < $n; ++$i ) { - $this->ynaxis[$i]->Stroke($this->xscale); - } - - $oldoff=$this->xscale->off; - if( substr($this->axtype,0,4) == 'text' ) { - if( $this->text_scale_abscenteroff > -1 ) { - // For a text scale the scale factor is the number of pixel per step. - // Hence we can use the scale factor as a substitute for number of pixels - // per major scale step and use that in order to adjust the offset so that - // an object of width "abscenteroff" becomes centered. - $this->xscale->off += round($this->xscale->scale_factor/2)-round($this->text_scale_abscenteroff/2); - } - else { - $this->xscale->off += ceil($this->xscale->scale_factor*$this->text_scale_off*$this->xscale->ticks->minor_step); - } - } - - if( $this->iDoClipping ) { - $oldimage = $this->img->CloneCanvasH(); - } - - if( ! $this->y2orderback ) { - // Stroke all plots for Y1 axis - for($i=0; $i < count($this->plots); ++$i) { - $this->plots[$i]->Stroke($this->img,$this->xscale,$this->yscale); - $this->plots[$i]->StrokeMargin($this->img); - } - } - - // Stroke all plots for Y2 axis - if( $this->y2scale != null ) { - for($i=0; $i< count($this->y2plots); ++$i ) { - $this->y2plots[$i]->Stroke($this->img,$this->xscale,$this->y2scale); - } - } - - if( $this->y2orderback ) { - // Stroke all plots for Y1 axis - for($i=0; $i < count($this->plots); ++$i) { - $this->plots[$i]->Stroke($this->img,$this->xscale,$this->yscale); - $this->plots[$i]->StrokeMargin($this->img); - } - } - - $n = count($this->ynaxis); - for( $i=0; $i < $n; ++$i ) { - $m = count($this->ynplots[$i]); - for( $j=0; $j < $m; ++$j ) { - $this->ynplots[$i][$j]->Stroke($this->img,$this->xscale,$this->ynscale[$i]); - $this->ynplots[$i][$j]->StrokeMargin($this->img); - } - } - - if( $this->iIconDepth == DEPTH_FRONT) { - $this->StrokeIcons(); - } - - if( $this->iDoClipping ) { - // Clipping only supports graphs at 0 and 90 degrees - if( $this->img->a == 0 ) { - $this->img->CopyCanvasH($oldimage,$this->img->img, - $this->img->left_margin,$this->img->top_margin, - $this->img->left_margin,$this->img->top_margin, - $this->img->plotwidth+1,$this->img->plotheight); - } - elseif( $this->img->a == 90 ) { - $adj = ($this->img->height - $this->img->width)/2; - $this->img->CopyCanvasH($oldimage,$this->img->img, - $this->img->bottom_margin-$adj,$this->img->left_margin+$adj, - $this->img->bottom_margin-$adj,$this->img->left_margin+$adj, - $this->img->plotheight+1,$this->img->plotwidth); - } - else { - JpGraphError::RaiseL(25035,$this->img->a);//('You have enabled clipping. Cliping is only supported for graphs at 0 or 90 degrees rotation. Please adjust you current angle (='.$this->img->a.' degrees) or disable clipping.'); - } - $this->img->Destroy(); - $this->img->SetCanvasH($oldimage); - } - - $this->xscale->off=$oldoff; - - if( $this->grid_depth == DEPTH_FRONT && !$_csim ) { - $this->ygrid->Stroke(); - $this->xgrid->Stroke(); - } - - // Stroke colored bands - $this->StrokeBands(DEPTH_FRONT,$_csim); - - // Finally draw the axis again since some plots may have nagged - // the axis in the edges. - if( !$_csim ) { - $this->StrokeAxis(); - } - - if( $this->y2scale != null && !$_csim ) { - $this->y2axis->Stroke($this->xscale,false); - } - - if( !$_csim ) { - $this->StrokePlotBox(); - } - - // The titles and legends never gets rotated so make sure - // that the angle is 0 before stroking them - $aa = $this->img->SetAngle(0); - $this->StrokeTitles(); - $this->footer->Stroke($this->img); - $this->legend->Stroke($this->img); - $this->img->SetAngle($aa); - $this->StrokeTexts(); - $this->StrokeTables(); - - if( !$_csim ) { - - $this->img->SetAngle($aa); - - // Draw an outline around the image map - if(_JPG_DEBUG) { - $this->DisplayClientSideaImageMapAreas(); - } - - // Should we do any final image transformation - if( $this->iImgTrans ) { - if( !class_exists('ImgTrans',false) ) { - require_once('jpgraph_imgtrans.php'); - //JpGraphError::Raise('In order to use image transformation you must include the file jpgraph_imgtrans.php in your script.'); - } - - $tform = new ImgTrans($this->img->img); - $this->img->img = $tform->Skew3D($this->iImgTransHorizon,$this->iImgTransSkewDist, - $this->iImgTransDirection,$this->iImgTransHighQ, - $this->iImgTransMinSize,$this->iImgTransFillColor, - $this->iImgTransBorder); - } - - // If the filename is given as the special "__handle" - // then the image handler is returned and the image is NOT - // streamed back - if( $aStrokeFileName == _IMG_HANDLER ) { - return $this->img->img; - } - else { - // Finally stream the generated picture - $this->cache->PutAndStream($this->img,$this->cache_name,$this->inline,$aStrokeFileName); - } - } - } - - function SetAxisLabelBackground($aType,$aXFColor='lightgray',$aXColor='black',$aYFColor='lightgray',$aYColor='black') { - $this->iAxisLblBgType = $aType; - $this->iXAxisLblBgFillColor = $aXFColor; - $this->iXAxisLblBgColor = $aXColor; - $this->iYAxisLblBgFillColor = $aYFColor; - $this->iYAxisLblBgColor = $aYColor; - } - - function StrokeAxisLabelBackground() { - // Types - // 0 = No background - // 1 = Only X-labels, length of axis - // 2 = Only Y-labels, length of axis - // 3 = As 1 but extends to width of graph - // 4 = As 2 but extends to height of graph - // 5 = Combination of 3 & 4 - // 6 = Combination of 1 & 2 - - $t = $this->iAxisLblBgType ; - if( $t < 1 ) return; - - // Stroke optional X-axis label background color - if( $t == 1 || $t == 3 || $t == 5 || $t == 6 ) { - $this->img->PushColor($this->iXAxisLblBgFillColor); - if( $t == 1 || $t == 6 ) { - $xl = $this->img->left_margin; - $yu = $this->img->height - $this->img->bottom_margin + 1; - $xr = $this->img->width - $this->img->right_margin ; - $yl = $this->img->height-1-$this->frame_weight; - } - else { // t==3 || t==5 - $xl = $this->frame_weight; - $yu = $this->img->height - $this->img->bottom_margin + 1; - $xr = $this->img->width - 1 - $this->frame_weight; - $yl = $this->img->height-1-$this->frame_weight; - } - - $this->img->FilledRectangle($xl,$yu,$xr,$yl); - $this->img->PopColor(); - - // Check if we should add the vertical lines at left and right edge - if( $this->iXAxisLblBgColor !== '' ) { - // Hardcode to one pixel wide - $this->img->SetLineWeight(1); - $this->img->PushColor($this->iXAxisLblBgColor); - if( $t == 1 || $t == 6 ) { - $this->img->Line($xl,$yu,$xl,$yl); - $this->img->Line($xr,$yu,$xr,$yl); - } - else { - $xl = $this->img->width - $this->img->right_margin ; - $this->img->Line($xl,$yu-1,$xr,$yu-1); - } - $this->img->PopColor(); - } - } - - if( $t == 2 || $t == 4 || $t == 5 || $t == 6 ) { - $this->img->PushColor($this->iYAxisLblBgFillColor); - if( $t == 2 || $t == 6 ) { - $xl = $this->frame_weight; - $yu = $this->frame_weight+$this->img->top_margin; - $xr = $this->img->left_margin - 1; - $yl = $this->img->height - $this->img->bottom_margin + 1; - } - else { - $xl = $this->frame_weight; - $yu = $this->frame_weight; - $xr = $this->img->left_margin - 1; - $yl = $this->img->height-1-$this->frame_weight; - } - - $this->img->FilledRectangle($xl,$yu,$xr,$yl); - $this->img->PopColor(); - - // Check if we should add the vertical lines at left and right edge - if( $this->iXAxisLblBgColor !== '' ) { - $this->img->PushColor($this->iXAxisLblBgColor); - if( $t == 2 || $t == 6 ) { - $this->img->Line($xl,$yu-1,$xr,$yu-1); - $this->img->Line($xl,$yl-1,$xr,$yl-1); - } - else { - $this->img->Line($xr+1,$yu,$xr+1,$this->img->top_margin); - } - $this->img->PopColor(); - } - - } - } - - function StrokeAxis($aStrokeLabels=true) { - - if( $aStrokeLabels ) { - $this->StrokeAxisLabelBackground(); - } - - // Stroke axis - if( $this->iAxisStyle != AXSTYLE_SIMPLE ) { - switch( $this->iAxisStyle ) { - case AXSTYLE_BOXIN : - $toppos = SIDE_DOWN; - $bottompos = SIDE_UP; - $leftpos = SIDE_RIGHT; - $rightpos = SIDE_LEFT; - break; - case AXSTYLE_BOXOUT : - $toppos = SIDE_UP; - $bottompos = SIDE_DOWN; - $leftpos = SIDE_LEFT; - $rightpos = SIDE_RIGHT; - break; - case AXSTYLE_YBOXIN: - $toppos = FALSE; - $bottompos = SIDE_UP; - $leftpos = SIDE_RIGHT; - $rightpos = SIDE_LEFT; - break; - case AXSTYLE_YBOXOUT: - $toppos = FALSE; - $bottompos = SIDE_DOWN; - $leftpos = SIDE_LEFT; - $rightpos = SIDE_RIGHT; - break; - default: - JpGRaphError::RaiseL(25036,$this->iAxisStyle); //('Unknown AxisStyle() : '.$this->iAxisStyle); - break; - } - - // By default we hide the first label so it doesn't cross the - // Y-axis in case the positon hasn't been set by the user. - // However, if we use a box we always want the first value - // displayed so we make sure it will be displayed. - $this->xscale->ticks->SupressFirst(false); - - // Now draw the bottom X-axis - $this->xaxis->SetPos('min'); - $this->xaxis->SetLabelSide(SIDE_DOWN); - $this->xaxis->scale->ticks->SetSide($bottompos); - $this->xaxis->Stroke($this->yscale,$aStrokeLabels); - - if( $toppos !== FALSE ) { - // We also want a top X-axis - $this->xaxis = $this->xaxis; - $this->xaxis->SetPos('max'); - $this->xaxis->SetLabelSide(SIDE_UP); - // No title for the top X-axis - if( $aStrokeLabels ) { - $this->xaxis->title->Set(''); - } - $this->xaxis->scale->ticks->SetSide($toppos); - $this->xaxis->Stroke($this->yscale,$aStrokeLabels); - } - - // Stroke the left Y-axis - $this->yaxis->SetPos('min'); - $this->yaxis->SetLabelSide(SIDE_LEFT); - $this->yaxis->scale->ticks->SetSide($leftpos); - $this->yaxis->Stroke($this->xscale,$aStrokeLabels); - - // Stroke the right Y-axis - $this->yaxis->SetPos('max'); - // No title for the right side - if( $aStrokeLabels ) { - $this->yaxis->title->Set(''); - } - $this->yaxis->SetLabelSide(SIDE_RIGHT); - $this->yaxis->scale->ticks->SetSide($rightpos); - $this->yaxis->Stroke($this->xscale,$aStrokeLabels); - } - else { - $this->xaxis->Stroke($this->yscale,$aStrokeLabels); - $this->yaxis->Stroke($this->xscale,$aStrokeLabels); - } - } - - - // Private helper function for backgound image - static function LoadBkgImage($aImgFormat='',$aFile='',$aImgStr='') { - if( $aImgStr != '' ) { - return Image::CreateFromString($aImgStr); - } - - // Remove case sensitivity and setup appropriate function to create image - // Get file extension. This should be the LAST '.' separated part of the filename - $e = explode('.',$aFile); - $ext = strtolower($e[count($e)-1]); - if ($ext == "jpeg") { - $ext = "jpg"; - } - - if( trim($ext) == '' ) { - $ext = 'png'; // Assume PNG if no extension specified - } - - if( $aImgFormat == '' ) { - $imgtag = $ext; - } - else { - $imgtag = $aImgFormat; - } - - $supported = imagetypes(); - if( ( $ext == 'jpg' && !($supported & IMG_JPG) ) || - ( $ext == 'gif' && !($supported & IMG_GIF) ) || - ( $ext == 'png' && !($supported & IMG_PNG) ) || - ( $ext == 'bmp' && !($supported & IMG_WBMP) ) || - ( $ext == 'xpm' && !($supported & IMG_XPM) ) ) { - - JpGraphError::RaiseL(25037,$aFile);//('The image format of your background image ('.$aFile.') is not supported in your system configuration. '); - } - - - if( $imgtag == "jpg" || $imgtag == "jpeg") { - $f = "imagecreatefromjpeg"; - $imgtag = "jpg"; - } - else { - $f = "imagecreatefrom".$imgtag; - } - - // Compare specified image type and file extension - if( $imgtag != $ext ) { - //$t = "Background image seems to be of different type (has different file extension) than specified imagetype. Specified: '".$aImgFormat."'File: '".$aFile."'"; - JpGraphError::RaiseL(25038, $aImgFormat, $aFile); - } - - $img = @$f($aFile); - if( !$img ) { - JpGraphError::RaiseL(25039,$aFile);//(" Can't read background image: '".$aFile."'"); - } - return $img; - } - - function StrokePlotGrad() { - if( $this->plot_gradtype < 0 ) - return; - - $grad = new Gradient($this->img); - $xl = $this->img->left_margin; - $yt = $this->img->top_margin; - $xr = $xl + $this->img->plotwidth+1 ; - $yb = $yt + $this->img->plotheight ; - $grad->FilledRectangle($xl,$yt,$xr,$yb,$this->plot_gradfrom,$this->plot_gradto,$this->plot_gradtype); - - } - - function StrokeBackgroundGrad() { - if( $this->bkg_gradtype < 0 ) - return; - - $grad = new Gradient($this->img); - if( $this->bkg_gradstyle == BGRAD_PLOT ) { - $xl = $this->img->left_margin; - $yt = $this->img->top_margin; - $xr = $xl + $this->img->plotwidth+1 ; - $yb = $yt + $this->img->plotheight ; - $grad->FilledRectangle($xl,$yt,$xr,$yb,$this->bkg_gradfrom,$this->bkg_gradto,$this->bkg_gradtype); - } - else { - $xl = 0; - $yt = 0; - $xr = $xl + $this->img->width - 1; - $yb = $yt + $this->img->height - 1 ; - if( $this->doshadow ) { - $xr -= $this->shadow_width; - $yb -= $this->shadow_width; - } - if( $this->doframe ) { - $yt += $this->frame_weight; - $yb -= $this->frame_weight; - $xl += $this->frame_weight; - $xr -= $this->frame_weight; - } - $aa = $this->img->SetAngle(0); - $grad->FilledRectangle($xl,$yt,$xr,$yb,$this->bkg_gradfrom,$this->bkg_gradto,$this->bkg_gradtype); - $aa = $this->img->SetAngle($aa); - } - } - - function StrokeFrameBackground() { - if( $this->background_image != '' && $this->background_cflag != '' ) { - JpGraphError::RaiseL(25040);//('It is not possible to specify both a background image and a background country flag.'); - } - if( $this->background_image != '' ) { - $bkgimg = $this->LoadBkgImage($this->background_image_format,$this->background_image); - } - elseif( $this->background_cflag != '' ) { - if( ! class_exists('FlagImages',false) ) { - JpGraphError::RaiseL(25041);//('In order to use Country flags as backgrounds you must include the "jpgraph_flags.php" file.'); - } - $fobj = new FlagImages(FLAGSIZE4); - $dummy=''; - $bkgimg = $fobj->GetImgByName($this->background_cflag,$dummy); - $this->background_image_mix = $this->background_cflag_mix; - $this->background_image_type = $this->background_cflag_type; - } - else { - return ; - } - - $bw = ImageSX($bkgimg); - $bh = ImageSY($bkgimg); - - // No matter what the angle is we always stroke the image and frame - // assuming it is 0 degree - $aa = $this->img->SetAngle(0); - - switch( $this->background_image_type ) { - case BGIMG_FILLPLOT: // Resize to just fill the plotarea - $this->FillMarginArea(); - $this->StrokeFrame(); - // Special case to hande 90 degree rotated graph corectly - if( $aa == 90 ) { - $this->img->SetAngle(90); - $this->FillPlotArea(); - $aa = $this->img->SetAngle(0); - $adj = ($this->img->height - $this->img->width)/2; - $this->img->CopyMerge($bkgimg, - $this->img->bottom_margin-$adj,$this->img->left_margin+$adj, - 0,0, - $this->img->plotheight+1,$this->img->plotwidth, - $bw,$bh,$this->background_image_mix); - } - else { - $this->FillPlotArea(); - $this->img->CopyMerge($bkgimg, - $this->img->left_margin,$this->img->top_margin+1, - 0,0,$this->img->plotwidth+1,$this->img->plotheight, - $bw,$bh,$this->background_image_mix); - } - break; - case BGIMG_FILLFRAME: // Fill the whole area from upper left corner, resize to just fit - $hadj=0; $vadj=0; - if( $this->doshadow ) { - $hadj = $this->shadow_width; - $vadj = $this->shadow_width; - } - $this->FillMarginArea(); - $this->FillPlotArea(); - $this->img->CopyMerge($bkgimg,0,0,0,0,$this->img->width-$hadj,$this->img->height-$vadj, - $bw,$bh,$this->background_image_mix); - $this->StrokeFrame(); - break; - case BGIMG_COPY: // Just copy the image from left corner, no resizing - $this->FillMarginArea(); - $this->FillPlotArea(); - $this->img->CopyMerge($bkgimg,0,0,0,0,$bw,$bh, - $bw,$bh,$this->background_image_mix); - $this->StrokeFrame(); - break; - case BGIMG_CENTER: // Center original image in the plot area - $this->FillMarginArea(); - $this->FillPlotArea(); - $centerx = round($this->img->plotwidth/2+$this->img->left_margin-$bw/2); - $centery = round($this->img->plotheight/2+$this->img->top_margin-$bh/2); - $this->img->CopyMerge($bkgimg,$centerx,$centery,0,0,$bw,$bh, - $bw,$bh,$this->background_image_mix); - $this->StrokeFrame(); - break; - case BGIMG_FREE: // Just copy the image to the specified location - $this->img->CopyMerge($bkgimg, - $this->background_image_xpos,$this->background_image_ypos, - 0,0,$bw,$bh,$bw,$bh,$this->background_image_mix); - $this->StrokeFrame(); // New - break; - default: - JpGraphError::RaiseL(25042);//(" Unknown background image layout"); - } - $this->img->SetAngle($aa); - } - - // Private - // Draw a frame around the image - function StrokeFrame() { - if( !$this->doframe ) return; - - if( $this->background_image_type <= 1 && ($this->bkg_gradtype < 0 || ($this->bkg_gradtype > 0 && $this->bkg_gradstyle==BGRAD_PLOT)) ) { - $c = $this->margin_color; - } - else { - $c = false; - } - - if( $this->doshadow ) { - $this->img->SetColor($this->frame_color); - $this->img->ShadowRectangle(0,0,$this->img->width,$this->img->height, - $c,$this->shadow_width,$this->shadow_color); - } - elseif( $this->framebevel ) { - if( $c ) { - $this->img->SetColor($this->margin_color); - $this->img->FilledRectangle(0,0,$this->img->width-1,$this->img->height-1); - } - $this->img->Bevel(1,1,$this->img->width-2,$this->img->height-2, - $this->framebeveldepth, - $this->framebevelcolor1,$this->framebevelcolor2); - if( $this->framebevelborder ) { - $this->img->SetColor($this->framebevelbordercolor); - $this->img->Rectangle(0,0,$this->img->width-1,$this->img->height-1); - } - } - else { - $this->img->SetLineWeight($this->frame_weight); - if( $c ) { - $this->img->SetColor($this->margin_color); - $this->img->FilledRectangle(0,0,$this->img->width-1,$this->img->height-1); - } - $this->img->SetColor($this->frame_color); - $this->img->Rectangle(0,0,$this->img->width-1,$this->img->height-1); - } - } - - function FillMarginArea() { - $hadj=0; $vadj=0; - if( $this->doshadow ) { - $hadj = $this->shadow_width; - $vadj = $this->shadow_width; - } - - $this->img->SetColor($this->margin_color); - // $this->img->FilledRectangle(0,0,$this->img->width-1-$hadj,$this->img->height-1-$vadj); - - $this->img->FilledRectangle(0,0,$this->img->width-1-$hadj,$this->img->top_margin); - $this->img->FilledRectangle(0,$this->img->top_margin,$this->img->left_margin,$this->img->height-1-$hadj); - $this->img->FilledRectangle($this->img->left_margin+1, - $this->img->height-$this->img->bottom_margin, - $this->img->width-1-$hadj, - $this->img->height-1-$hadj); - $this->img->FilledRectangle($this->img->width-$this->img->right_margin, - $this->img->top_margin+1, - $this->img->width-1-$hadj, - $this->img->height-$this->img->bottom_margin-1); - } - - function FillPlotArea() { - $this->img->PushColor($this->plotarea_color); - $this->img->FilledRectangle($this->img->left_margin, - $this->img->top_margin, - $this->img->width-$this->img->right_margin, - $this->img->height-$this->img->bottom_margin); - $this->img->PopColor(); - } - - // Stroke the plot area with either a solid color or a background image - function StrokePlotArea() { - // Note: To be consistent we really should take a possible shadow - // into account. However, that causes some problem for the LinearScale class - // since in the current design it does not have any links to class Graph which - // means it has no way of compensating for the adjusted plotarea in case of a - // shadow. So, until I redesign LinearScale we can't compensate for this. - // So just set the two adjustment parameters to zero for now. - $boxadj = 0; //$this->doframe ? $this->frame_weight : 0 ; - $adj = 0; //$this->doshadow ? $this->shadow_width : 0 ; - - if( $this->background_image != '' || $this->background_cflag != '' ) { - $this->StrokeFrameBackground(); - } - else { - $aa = $this->img->SetAngle(0); - $this->StrokeFrame(); - $aa = $this->img->SetAngle($aa); - $this->StrokeBackgroundGrad(); - if( $this->bkg_gradtype < 0 || ($this->bkg_gradtype > 0 && $this->bkg_gradstyle==BGRAD_MARGIN) ) { - $this->FillPlotArea(); - } - $this->StrokePlotGrad(); - } - } - - function StrokeIcons() { - $n = count($this->iIcons); - for( $i=0; $i < $n; ++$i ) { - $this->iIcons[$i]->StrokeWithScale($this->img,$this->xscale,$this->yscale); - } - } - - function StrokePlotBox() { - // Should we draw a box around the plot area? - if( $this->boxed ) { - $this->img->SetLineWeight(1); - $this->img->SetLineStyle('solid'); - $this->img->SetColor($this->box_color); - for($i=0; $i < $this->box_weight; ++$i ) { - $this->img->Rectangle( - $this->img->left_margin-$i,$this->img->top_margin-$i, - $this->img->width-$this->img->right_margin+$i, - $this->img->height-$this->img->bottom_margin+$i); - } - } - } - - function SetTitleBackgroundFillStyle($aStyle,$aColor1='black',$aColor2='white') { - $this->titlebkg_fillstyle = $aStyle; - $this->titlebkg_scolor1 = $aColor1; - $this->titlebkg_scolor2 = $aColor2; - } - - function SetTitleBackground($aBackColor='gray', $aStyle=TITLEBKG_STYLE1, $aFrameStyle=TITLEBKG_FRAME_NONE, $aFrameColor='black', $aFrameWeight=1, $aBevelHeight=3, $aEnable=true) { - $this->titlebackground = $aEnable; - $this->titlebackground_color = $aBackColor; - $this->titlebackground_style = $aStyle; - $this->titlebackground_framecolor = $aFrameColor; - $this->titlebackground_framestyle = $aFrameStyle; - $this->titlebackground_frameweight = $aFrameWeight; - $this->titlebackground_bevelheight = $aBevelHeight ; - } - - - function StrokeTitles() { - - $margin=3; - - if( $this->titlebackground ) { - // Find out height - $this->title->margin += 2 ; - $h = $this->title->GetTextHeight($this->img)+$this->title->margin+$margin; - if( $this->subtitle->t != '' && !$this->subtitle->hide ) { - $h += $this->subtitle->GetTextHeight($this->img)+$margin+ - $this->subtitle->margin; - $h += 2; - } - if( $this->subsubtitle->t != '' && !$this->subsubtitle->hide ) { - $h += $this->subsubtitle->GetTextHeight($this->img)+$margin+ - $this->subsubtitle->margin; - $h += 2; - } - $this->img->PushColor($this->titlebackground_color); - if( $this->titlebackground_style === TITLEBKG_STYLE1 ) { - // Inside the frame - if( $this->framebevel ) { - $x1 = $y1 = $this->framebeveldepth + 1 ; - $x2 = $this->img->width - $this->framebeveldepth - 2 ; - $this->title->margin += $this->framebeveldepth + 1 ; - $h += $y1 ; - $h += 2; - } - else { - $x1 = $y1 = $this->frame_weight; - $x2 = $this->img->width - $this->frame_weight-1; - } - } - elseif( $this->titlebackground_style === TITLEBKG_STYLE2 ) { - // Cover the frame as well - $x1 = $y1 = 0; - $x2 = $this->img->width - 1 ; - } - elseif( $this->titlebackground_style === TITLEBKG_STYLE3 ) { - // Cover the frame as well (the difference is that - // for style==3 a bevel frame border is on top - // of the title background) - $x1 = $y1 = 0; - $x2 = $this->img->width - 1 ; - $h += $this->framebeveldepth ; - $this->title->margin += $this->framebeveldepth ; - } - else { - JpGraphError::RaiseL(25043);//('Unknown title background style.'); - } - - if( $this->titlebackground_framestyle === 3 ) { - $h += $this->titlebackground_bevelheight*2 + 1 ; - $this->title->margin += $this->titlebackground_bevelheight ; - } - - if( $this->doshadow ) { - $x2 -= $this->shadow_width ; - } - - $indent=0; - if( $this->titlebackground_framestyle == TITLEBKG_FRAME_BEVEL ) { - $indent = $this->titlebackground_bevelheight; - } - - if( $this->titlebkg_fillstyle==TITLEBKG_FILLSTYLE_HSTRIPED ) { - $this->img->FilledRectangle2($x1+$indent,$y1+$indent,$x2-$indent,$h-$indent, - $this->titlebkg_scolor1, - $this->titlebkg_scolor2); - } - elseif( $this->titlebkg_fillstyle==TITLEBKG_FILLSTYLE_VSTRIPED ) { - $this->img->FilledRectangle2($x1+$indent,$y1+$indent,$x2-$indent,$h-$indent, - $this->titlebkg_scolor1, - $this->titlebkg_scolor2,2); - } - else { - // Solid fill - $this->img->FilledRectangle($x1,$y1,$x2,$h); - } - $this->img->PopColor(); - - $this->img->PushColor($this->titlebackground_framecolor); - $this->img->SetLineWeight($this->titlebackground_frameweight); - if( $this->titlebackground_framestyle == TITLEBKG_FRAME_FULL ) { - // Frame background - $this->img->Rectangle($x1,$y1,$x2,$h); - } - elseif( $this->titlebackground_framestyle == TITLEBKG_FRAME_BOTTOM ) { - // Bottom line only - $this->img->Line($x1,$h,$x2,$h); - } - elseif( $this->titlebackground_framestyle == TITLEBKG_FRAME_BEVEL ) { - $this->img->Bevel($x1,$y1,$x2,$h,$this->titlebackground_bevelheight); - } - $this->img->PopColor(); - - // This is clumsy. But we neeed to stroke the whole graph frame if it is - // set to bevel to get the bevel shading on top of the text background - if( $this->framebevel && $this->doframe && $this->titlebackground_style === 3 ) { - $this->img->Bevel(1,1,$this->img->width-2,$this->img->height-2, - $this->framebeveldepth, - $this->framebevelcolor1,$this->framebevelcolor2); - if( $this->framebevelborder ) { - $this->img->SetColor($this->framebevelbordercolor); - $this->img->Rectangle(0,0,$this->img->width-1,$this->img->height-1); - } - } - } - - // Stroke title - $y = $this->title->margin; - if( $this->title->halign == 'center' ) { - $this->title->Center(0,$this->img->width,$y); - } - elseif( $this->title->halign == 'left' ) { - $this->title->SetPos($this->title->margin+2,$y); - } - elseif( $this->title->halign == 'right' ) { - $indent = 0; - if( $this->doshadow ) { - $indent = $this->shadow_width+2; - } - $this->title->SetPos($this->img->width-$this->title->margin-$indent,$y,'right'); - } - $this->title->Stroke($this->img); - - // ... and subtitle - $y += $this->title->GetTextHeight($this->img) + $margin + $this->subtitle->margin; - if( $this->subtitle->halign == 'center' ) { - $this->subtitle->Center(0,$this->img->width,$y); - } - elseif( $this->subtitle->halign == 'left' ) { - $this->subtitle->SetPos($this->subtitle->margin+2,$y); - } - elseif( $this->subtitle->halign == 'right' ) { - $indent = 0; - if( $this->doshadow ) - $indent = $this->shadow_width+2; - $this->subtitle->SetPos($this->img->width-$this->subtitle->margin-$indent,$y,'right'); - } - $this->subtitle->Stroke($this->img); - - // ... and subsubtitle - $y += $this->subtitle->GetTextHeight($this->img) + $margin + $this->subsubtitle->margin; - if( $this->subsubtitle->halign == 'center' ) { - $this->subsubtitle->Center(0,$this->img->width,$y); - } - elseif( $this->subsubtitle->halign == 'left' ) { - $this->subsubtitle->SetPos($this->subsubtitle->margin+2,$y); - } - elseif( $this->subsubtitle->halign == 'right' ) { - $indent = 0; - if( $this->doshadow ) - $indent = $this->shadow_width+2; - $this->subsubtitle->SetPos($this->img->width-$this->subsubtitle->margin-$indent,$y,'right'); - } - $this->subsubtitle->Stroke($this->img); - - // ... and fancy title - $this->tabtitle->Stroke($this->img); - - } - - function StrokeTexts() { - // Stroke any user added text objects - if( $this->texts != null ) { - for($i=0; $i < count($this->texts); ++$i) { - $this->texts[$i]->StrokeWithScale($this->img,$this->xscale,$this->yscale); - } - } - - if( $this->y2texts != null && $this->y2scale != null ) { - for($i=0; $i < count($this->y2texts); ++$i) { - $this->y2texts[$i]->StrokeWithScale($this->img,$this->xscale,$this->y2scale); - } - } - - } - - function StrokeTables() { - if( $this->iTables != null ) { - $n = count($this->iTables); - for( $i=0; $i < $n; ++$i ) { - $this->iTables[$i]->StrokeWithScale($this->img,$this->xscale,$this->yscale); - } - } - } - - function DisplayClientSideaImageMapAreas() { - // Debug stuff - display the outline of the image map areas - $csim=''; - foreach ($this->plots as $p) { - $csim.= $p->GetCSIMareas(); - } - $csim .= $this->legend->GetCSIMareas(); - if (preg_match_all("/area shape=\"(\w+)\" coords=\"([0-9\, ]+)\"/", $csim, $coords)) { - $this->img->SetColor($this->csimcolor); - $n = count($coords[0]); - for ($i=0; $i < $n; $i++) { - if ( $coords[1][$i] == 'poly' ) { - preg_match_all('/\s*([0-9]+)\s*,\s*([0-9]+)\s*,*/',$coords[2][$i],$pts); - $this->img->SetStartPoint($pts[1][count($pts[0])-1],$pts[2][count($pts[0])-1]); - $m = count($pts[0]); - for ($j=0; $j < $m; $j++) { - $this->img->LineTo($pts[1][$j],$pts[2][$j]); - } - } elseif ( $coords[1][$i] == 'rect' ) { - $pts = preg_split('/,/', $coords[2][$i]); - $this->img->SetStartPoint($pts[0],$pts[1]); - $this->img->LineTo($pts[2],$pts[1]); - $this->img->LineTo($pts[2],$pts[3]); - $this->img->LineTo($pts[0],$pts[3]); - $this->img->LineTo($pts[0],$pts[1]); - } - } - } - } - - // Text scale offset in world coordinates - function SetTextScaleOff($aOff) { - $this->text_scale_off = $aOff; - $this->xscale->text_scale_off = $aOff; - } - - // Text width of bar to be centered in absolute pixels - function SetTextScaleAbsCenterOff($aOff) { - $this->text_scale_abscenteroff = $aOff; - } - - // Get Y min and max values for added lines - function GetLinesYMinMax( $aLines ) { - $n = count($aLines); - if( $n == 0 ) return false; - $min = $aLines[0]->scaleposition ; - $max = $min ; - $flg = false; - for( $i=0; $i < $n; ++$i ) { - if( $aLines[$i]->direction == HORIZONTAL ) { - $flg = true ; - $v = $aLines[$i]->scaleposition ; - if( $min > $v ) $min = $v ; - if( $max < $v ) $max = $v ; - } - } - return $flg ? array($min,$max) : false ; - } - - // Get X min and max values for added lines - function GetLinesXMinMax( $aLines ) { - $n = count($aLines); - if( $n == 0 ) return false ; - $min = $aLines[0]->scaleposition ; - $max = $min ; - $flg = false; - for( $i=0; $i < $n; ++$i ) { - if( $aLines[$i]->direction == VERTICAL ) { - $flg = true ; - $v = $aLines[$i]->scaleposition ; - if( $min > $v ) $min = $v ; - if( $max < $v ) $max = $v ; - } - } - return $flg ? array($min,$max) : false ; - } - - // Get min and max values for all included plots - function GetPlotsYMinMax($aPlots) { - $n = count($aPlots); - $i=0; - do { - list($xmax,$max) = $aPlots[$i]->Max(); - } while( ++$i < $n && !is_numeric($max) ); - - $i=0; - do { - list($xmin,$min) = $aPlots[$i]->Min(); - } while( ++$i < $n && !is_numeric($min) ); - - if( !is_numeric($min) || !is_numeric($max) ) { - JpGraphError::RaiseL(25044);//('Cannot use autoscaling since it is impossible to determine a valid min/max value of the Y-axis (only null values).'); - } - - for($i=0; $i < $n; ++$i ) { - list($xmax,$ymax)=$aPlots[$i]->Max(); - list($xmin,$ymin)=$aPlots[$i]->Min(); - if (is_numeric($ymax)) $max=max($max,$ymax); - if (is_numeric($ymin)) $min=min($min,$ymin); - } - if( $min == '' ) $min = 0; - if( $max == '' ) $max = 0; - if( $min == 0 && $max == 0 ) { - // Special case if all values are 0 - $min=0;$max=1; - } - return array($min,$max); - } - -} // Class - -//=================================================== -// CLASS LineProperty -// Description: Holds properties for a line -//=================================================== -class LineProperty { - public $iWeight=1, $iColor='black', $iStyle='solid', $iShow=true; - - function __construct($aWeight=1,$aColor='black',$aStyle='solid') { - $this->iWeight = $aWeight; - $this->iColor = $aColor; - $this->iStyle = $aStyle; - } - - function SetColor($aColor) { - $this->iColor = $aColor; - } - - function SetWeight($aWeight) { - $this->iWeight = $aWeight; - } - - function SetStyle($aStyle) { - $this->iStyle = $aStyle; - } - - function Show($aShow=true) { - $this->iShow=$aShow; - } - - function Stroke($aImg,$aX1,$aY1,$aX2,$aY2) { - if( $this->iShow ) { - $aImg->PushColor($this->iColor); - $oldls = $aImg->line_style; - $oldlw = $aImg->line_weight; - $aImg->SetLineWeight($this->iWeight); - $aImg->SetLineStyle($this->iStyle); - $aImg->StyleLine($aX1,$aY1,$aX2,$aY2); - $aImg->PopColor($this->iColor); - $aImg->line_style = $oldls; - $aImg->line_weight = $oldlw; - - } - } -} - -//=================================================== -// CLASS GraphTabTitle -// Description: Draw "tab" titles on top of graphs -//=================================================== -class GraphTabTitle extends Text{ - private $corner = 6 , $posx = 7, $posy = 4; - private $fillcolor='lightyellow',$bordercolor='black'; - private $align = 'left', $width=TABTITLE_WIDTHFIT; - function __construct() { - $this->t = ''; - $this->font_style = FS_BOLD; - $this->hide = true; - $this->color = 'darkred'; - } - - function SetColor($aTxtColor,$aFillColor='lightyellow',$aBorderColor='black') { - $this->color = $aTxtColor; - $this->fillcolor = $aFillColor; - $this->bordercolor = $aBorderColor; - } - - function SetFillColor($aFillColor) { - $this->fillcolor = $aFillColor; - } - - function SetTabAlign($aAlign) { - $this->align = $aAlign; - } - - function SetWidth($aWidth) { - $this->width = $aWidth ; - } - - function Set($t) { - $this->t = $t; - $this->hide = false; - } - - function SetCorner($aD) { - $this->corner = $aD ; - } - - function Stroke($aImg,$aDummy1=null,$aDummy2=null) { - if( $this->hide ) - return; - $this->boxed = false; - $w = $this->GetWidth($aImg) + 2*$this->posx; - $h = $this->GetTextHeight($aImg) + 2*$this->posy; - - $x = $aImg->left_margin; - $y = $aImg->top_margin; - - if( $this->width === TABTITLE_WIDTHFIT ) { - if( $this->align == 'left' ) { - $p = array($x, $y, - $x, $y-$h+$this->corner, - $x + $this->corner,$y-$h, - $x + $w - $this->corner, $y-$h, - $x + $w, $y-$h+$this->corner, - $x + $w, $y); - } - elseif( $this->align == 'center' ) { - $x += round($aImg->plotwidth/2) - round($w/2); - $p = array($x, $y, - $x, $y-$h+$this->corner, - $x + $this->corner, $y-$h, - $x + $w - $this->corner, $y-$h, - $x + $w, $y-$h+$this->corner, - $x + $w, $y); - } - else { - $x += $aImg->plotwidth -$w; - $p = array($x, $y, - $x, $y-$h+$this->corner, - $x + $this->corner,$y-$h, - $x + $w - $this->corner, $y-$h, - $x + $w, $y-$h+$this->corner, - $x + $w, $y); - } - } - else { - if( $this->width === TABTITLE_WIDTHFULL ) { - $w = $aImg->plotwidth ; - } - else { - $w = $this->width ; - } - - // Make the tab fit the width of the plot area - $p = array($x, $y, - $x, $y-$h+$this->corner, - $x + $this->corner,$y-$h, - $x + $w - $this->corner, $y-$h, - $x + $w, $y-$h+$this->corner, - $x + $w, $y); - - } - if( $this->halign == 'left' ) { - $aImg->SetTextAlign('left','bottom'); - $x += $this->posx; - $y -= $this->posy; - } - elseif( $this->halign == 'center' ) { - $aImg->SetTextAlign('center','bottom'); - $x += $w/2; - $y -= $this->posy; - } - else { - $aImg->SetTextAlign('right','bottom'); - $x += $w - $this->posx; - $y -= $this->posy; - } - - $aImg->SetColor($this->fillcolor); - $aImg->FilledPolygon($p); - - $aImg->SetColor($this->bordercolor); - $aImg->Polygon($p,true); - - $aImg->SetColor($this->color); - $aImg->SetFont($this->font_family,$this->font_style,$this->font_size); - $aImg->StrokeText($x,$y,$this->t,0,'center'); - } - -} - -//=================================================== -// CLASS SuperScriptText -// Description: Format a superscript text -//=================================================== -class SuperScriptText extends Text { - private $iSuper=''; - private $sfont_family='',$sfont_style='',$sfont_size=8; - private $iSuperMargin=2,$iVertOverlap=4,$iSuperScale=0.65; - private $iSDir=0; - private $iSimple=false; - - function __construct($aTxt='',$aSuper='',$aXAbsPos=0,$aYAbsPos=0) { - parent::__construct($aTxt,$aXAbsPos,$aYAbsPos); - $this->iSuper = $aSuper; - } - - function FromReal($aVal,$aPrecision=2) { - // Convert a floating point number to scientific notation - $neg=1.0; - if( $aVal < 0 ) { - $neg = -1.0; - $aVal = -$aVal; - } - - $l = floor(log10($aVal)); - $a = sprintf("%0.".$aPrecision."f",round($aVal / pow(10,$l),$aPrecision)); - $a *= $neg; - if( $this->iSimple && ($a == 1 || $a==-1) ) $a = ''; - - if( $a != '' ) { - $this->t = $a.' * 10'; - } - else { - if( $neg == 1 ) { - $this->t = '10'; - } - else { - $this->t = '-10'; - } - } - $this->iSuper = $l; - } - - function Set($aTxt,$aSuper='') { - $this->t = $aTxt; - $this->iSuper = $aSuper; - } - - function SetSuperFont($aFontFam,$aFontStyle=FS_NORMAL,$aFontSize=8) { - $this->sfont_family = $aFontFam; - $this->sfont_style = $aFontStyle; - $this->sfont_size = $aFontSize; - } - - // Total width of text - function GetWidth($aImg) { - $aImg->SetFont($this->font_family,$this->font_style,$this->font_size); - $w = $aImg->GetTextWidth($this->t); - $aImg->SetFont($this->sfont_family,$this->sfont_style,$this->sfont_size); - $w += $aImg->GetTextWidth($this->iSuper); - $w += $this->iSuperMargin; - return $w; - } - - // Hight of font (approximate the height of the text) - function GetFontHeight($aImg) { - $aImg->SetFont($this->font_family,$this->font_style,$this->font_size); - $h = $aImg->GetFontHeight(); - $aImg->SetFont($this->sfont_family,$this->sfont_style,$this->sfont_size); - $h += $aImg->GetFontHeight(); - return $h; - } - - // Hight of text - function GetTextHeight($aImg) { - $aImg->SetFont($this->font_family,$this->font_style,$this->font_size); - $h = $aImg->GetTextHeight($this->t); - $aImg->SetFont($this->sfont_family,$this->sfont_style,$this->sfont_size); - $h += $aImg->GetTextHeight($this->iSuper); - return $h; - } - - function Stroke($aImg,$ax=-1,$ay=-1) { - - // To position the super script correctly we need different - // cases to handle the alignmewnt specified since that will - // determine how we can interpret the x,y coordinates - - $w = parent::GetWidth($aImg); - $h = parent::GetTextHeight($aImg); - switch( $this->valign ) { - case 'top': - $sy = $this->y; - break; - case 'center': - $sy = $this->y - $h/2; - break; - case 'bottom': - $sy = $this->y - $h; - break; - default: - JpGraphError::RaiseL(25052);//('PANIC: Internal error in SuperScript::Stroke(). Unknown vertical alignment for text'); - break; - } - - switch( $this->halign ) { - case 'left': - $sx = $this->x + $w; - break; - case 'center': - $sx = $this->x + $w/2; - break; - case 'right': - $sx = $this->x; - break; - default: - JpGraphError::RaiseL(25053);//('PANIC: Internal error in SuperScript::Stroke(). Unknown horizontal alignment for text'); - break; - } - - $sx += $this->iSuperMargin; - $sy += $this->iVertOverlap; - - // Should we automatically determine the font or - // has the user specified it explicetly? - if( $this->sfont_family == '' ) { - if( $this->font_family <= FF_FONT2 ) { - if( $this->font_family == FF_FONT0 ) { - $sff = FF_FONT0; - } - elseif( $this->font_family == FF_FONT1 ) { - if( $this->font_style == FS_NORMAL ) { - $sff = FF_FONT0; - } - else { - $sff = FF_FONT1; - } - } - else { - $sff = FF_FONT1; - } - $sfs = $this->font_style; - $sfz = $this->font_size; - } - else { - // TTF fonts - $sff = $this->font_family; - $sfs = $this->font_style; - $sfz = floor($this->font_size*$this->iSuperScale); - if( $sfz < 8 ) $sfz = 8; - } - $this->sfont_family = $sff; - $this->sfont_style = $sfs; - $this->sfont_size = $sfz; - } - else { - $sff = $this->sfont_family; - $sfs = $this->sfont_style; - $sfz = $this->sfont_size; - } - - parent::Stroke($aImg,$ax,$ay); - - // For the builtin fonts we need to reduce the margins - // since the bounding bx reported for the builtin fonts - // are much larger than for the TTF fonts. - if( $sff <= FF_FONT2 ) { - $sx -= 2; - $sy += 3; - } - - $aImg->SetTextAlign('left','bottom'); - $aImg->SetFont($sff,$sfs,$sfz); - $aImg->PushColor($this->color); - $aImg->StrokeText($sx,$sy,$this->iSuper,$this->iSDir,'left'); - $aImg->PopColor(); - } -} - - -//=================================================== -// CLASS Grid -// Description: responsible for drawing grid lines in graph -//=================================================== -class Grid { - protected $img; - protected $scale; - protected $majorcolor='#DDDDDD',$minorcolor='#EEEEEE'; - protected $majortype='solid',$minortype='solid'; - protected $show=false, $showMinor=false,$majorweight=1,$minorweight=1; - protected $fill=false,$fillcolor=array('#EFEFEF','#BBCCFF'); - - function __construct($aAxis) { - $this->scale = $aAxis->scale; - $this->img = $aAxis->img; - } - - function SetColor($aMajColor,$aMinColor=false) { - $this->majorcolor=$aMajColor; - if( $aMinColor === false ) { - $aMinColor = $aMajColor ; - } - $this->minorcolor = $aMinColor; - } - - function SetWeight($aMajorWeight,$aMinorWeight=1) { - $this->majorweight=$aMajorWeight; - $this->minorweight=$aMinorWeight; - } - - // Specify if grid should be dashed, dotted or solid - function SetLineStyle($aMajorType,$aMinorType='solid') { - $this->majortype = $aMajorType; - $this->minortype = $aMinorType; - } - - function SetStyle($aMajorType,$aMinorType='solid') { - $this->SetLineStyle($aMajorType,$aMinorType); - } - - // Decide if both major and minor grid should be displayed - function Show($aShowMajor=true,$aShowMinor=false) { - $this->show=$aShowMajor; - $this->showMinor=$aShowMinor; - } - - function SetFill($aFlg=true,$aColor1='lightgray',$aColor2='lightblue') { - $this->fill = $aFlg; - $this->fillcolor = array( $aColor1, $aColor2 ); - } - - // Display the grid - function Stroke() { - if( $this->showMinor && !$this->scale->textscale ) { - $this->DoStroke($this->scale->ticks->ticks_pos,$this->minortype,$this->minorcolor,$this->minorweight); - $this->DoStroke($this->scale->ticks->maj_ticks_pos,$this->majortype,$this->majorcolor,$this->majorweight); - } - else { - $this->DoStroke($this->scale->ticks->maj_ticks_pos,$this->majortype,$this->majorcolor,$this->majorweight); - } - } - - //-------------- - // Private methods - // Draw the grid - function DoStroke($aTicksPos,$aType,$aColor,$aWeight) { - if( !$this->show ) return; - $nbrgrids = count($aTicksPos); - - if( $this->scale->type == 'y' ) { - $xl=$this->img->left_margin; - $xr=$this->img->width-$this->img->right_margin; - - if( $this->fill ) { - // Draw filled areas - $y2 = $aTicksPos[0]; - $i=1; - while( $i < $nbrgrids ) { - $y1 = $y2; - $y2 = $aTicksPos[$i++]; - $this->img->SetColor($this->fillcolor[$i & 1]); - $this->img->FilledRectangle($xl,$y1,$xr,$y2); - } - } - - $this->img->SetColor($aColor); - $this->img->SetLineWeight($aWeight); - - // Draw grid lines - switch( $aType ) { - case 'solid': $style = LINESTYLE_SOLID; break; - case 'dotted': $style = LINESTYLE_DOTTED; break; - case 'dashed': $style = LINESTYLE_DASHED; break; - case 'longdashed': $style = LINESTYLE_LONGDASH; break; - default: - $style = LINESTYLE_SOLID; break; - } - - for($i=0; $i < $nbrgrids; ++$i) { - $y=$aTicksPos[$i]; - $this->img->StyleLine($xl,$y,$xr,$y,$style); - } - } - elseif( $this->scale->type == 'x' ) { - $yu=$this->img->top_margin; - $yl=$this->img->height-$this->img->bottom_margin; - $limit=$this->img->width-$this->img->right_margin; - - if( $this->fill ) { - // Draw filled areas - $x2 = $aTicksPos[0]; - $i=1; - while( $i < $nbrgrids ) { - $x1 = $x2; - $x2 = min($aTicksPos[$i++],$limit) ; - $this->img->SetColor($this->fillcolor[$i & 1]); - $this->img->FilledRectangle($x1,$yu,$x2,$yl); - } - } - - $this->img->SetColor($aColor); - $this->img->SetLineWeight($aWeight); - - // We must also test for limit since we might have - // an offset and the number of ticks is calculated with - // assumption offset==0 so we might end up drawing one - // to many gridlines - $i=0; - $x=$aTicksPos[$i]; - while( $iimg->Line($x,$yl,$x,$yu); - elseif( $aType == 'dotted' ) $this->img->DashedLine($x,$yl,$x,$yu,1,6); - elseif( $aType == 'dashed' ) $this->img->DashedLine($x,$yl,$x,$yu,2,4); - elseif( $aType == 'longdashed' ) $this->img->DashedLine($x,$yl,$x,$yu,8,6); - ++$i; - } - } - else { - JpGraphError::RaiseL(25054,$this->scale->type);//('Internal error: Unknown grid axis ['.$this->scale->type.']'); - } - return true; - } -} // Class - -//=================================================== -// CLASS Axis -// Description: Defines X and Y axis. Notes that at the -// moment the code is not really good since the axis on -// several occasion must know wheter it's an X or Y axis. -// This was a design decision to make the code easier to -// follow. -//=================================================== -class AxisPrototype { - public $scale=null; - public $img=null; - public $hide=false,$hide_labels=false; - public $title=null; - public $font_family=FF_FONT1,$font_style=FS_NORMAL,$font_size=12,$label_angle=0; - public $tick_step=1; - public $pos = false; - public $ticks_label = array(); - - protected $weight=1; - protected $color=array(0,0,0),$label_color=array(0,0,0); - protected $ticks_label_colors=null; - protected $show_first_label=true,$show_last_label=true; - protected $label_step=1; // Used by a text axis to specify what multiple of major steps - // should be labeled. - protected $labelPos=0; // Which side of the axis should the labels be? - protected $title_adjust,$title_margin,$title_side=SIDE_LEFT; - protected $tick_label_margin=5; - protected $label_halign = '',$label_valign = '', $label_para_align='left'; - protected $hide_line=false; - protected $iDeltaAbsPos=0; - - function __construct($img,$aScale,$color = array(0,0,0)) { - $this->img = $img; - $this->scale = $aScale; - $this->color = $color; - $this->title=new Text(''); - - if( $aScale->type == 'y' ) { - $this->title_margin = 25; - $this->title_adjust = 'middle'; - $this->title->SetOrientation(90); - $this->tick_label_margin=7; - $this->labelPos=SIDE_LEFT; - } - else { - $this->title_margin = 5; - $this->title_adjust = 'high'; - $this->title->SetOrientation(0); - $this->tick_label_margin=5; - $this->labelPos=SIDE_DOWN; - $this->title_side=SIDE_DOWN; - } - } - - function SetLabelFormat($aFormStr) { - $this->scale->ticks->SetLabelFormat($aFormStr); - } - - function SetLabelFormatString($aFormStr,$aDate=false) { - $this->scale->ticks->SetLabelFormat($aFormStr,$aDate); - } - - function SetLabelFormatCallback($aFuncName) { - $this->scale->ticks->SetFormatCallback($aFuncName); - } - - function SetLabelAlign($aHAlign,$aVAlign='top',$aParagraphAlign='left') { - $this->label_halign = $aHAlign; - $this->label_valign = $aVAlign; - $this->label_para_align = $aParagraphAlign; - } - - // Don't display the first label - function HideFirstTickLabel($aShow=false) { - $this->show_first_label=$aShow; - } - - function HideLastTickLabel($aShow=false) { - $this->show_last_label=$aShow; - } - - // Manually specify the major and (optional) minor tick position and labels - function SetTickPositions($aMajPos,$aMinPos=NULL,$aLabels=NULL) { - $this->scale->ticks->SetTickPositions($aMajPos,$aMinPos,$aLabels); - } - - // Manually specify major tick positions and optional labels - function SetMajTickPositions($aMajPos,$aLabels=NULL) { - $this->scale->ticks->SetTickPositions($aMajPos,NULL,$aLabels); - } - - // Hide minor or major tick marks - function HideTicks($aHideMinor=true,$aHideMajor=true) { - $this->scale->ticks->SupressMinorTickMarks($aHideMinor); - $this->scale->ticks->SupressTickMarks($aHideMajor); - } - - // Hide zero label - function HideZeroLabel($aFlag=true) { - $this->scale->ticks->SupressZeroLabel(); - } - - function HideFirstLastLabel() { - // The two first calls to ticks method will supress - // automatically generated scale values. However, that - // will not affect manually specified value, e.g text-scales. - // therefor we also make a kludge here to supress manually - // specified scale labels. - $this->scale->ticks->SupressLast(); - $this->scale->ticks->SupressFirst(); - $this->show_first_label = false; - $this->show_last_label = false; - } - - // Hide the axis - function Hide($aHide=true) { - $this->hide=$aHide; - } - - // Hide the actual axis-line, but still print the labels - function HideLine($aHide=true) { - $this->hide_line = $aHide; - } - - function HideLabels($aHide=true) { - $this->hide_labels = $aHide; - } - - // Weight of axis - function SetWeight($aWeight) { - $this->weight = $aWeight; - } - - // Axis color - function SetColor($aColor,$aLabelColor=false) { - $this->color = $aColor; - if( !$aLabelColor ) $this->label_color = $aColor; - else $this->label_color = $aLabelColor; - } - - // Title on axis - function SetTitle($aTitle,$aAdjustAlign='high') { - $this->title->Set($aTitle); - $this->title_adjust=$aAdjustAlign; - } - - // Specify distance from the axis - function SetTitleMargin($aMargin) { - $this->title_margin=$aMargin; - } - - // Which side of the axis should the axis title be? - function SetTitleSide($aSideOfAxis) { - $this->title_side = $aSideOfAxis; - } - - function SetTickSide($aDir) { - $this->scale->ticks->SetSide($aDir); - } - - function SetTickSize($aMajSize,$aMinSize=3) { - $this->scale->ticks->SetSize($aMajSize,$aMinSize=3); - } - - // Specify text labels for the ticks. One label for each data point - function SetTickLabels($aLabelArray,$aLabelColorArray=null) { - $this->ticks_label = $aLabelArray; - $this->ticks_label_colors = $aLabelColorArray; - } - - function SetLabelMargin($aMargin) { - $this->tick_label_margin=$aMargin; - } - - // Specify that every $step of the ticks should be displayed starting - // at $start - function SetTextTickInterval($aStep,$aStart=0) { - $this->scale->ticks->SetTextLabelStart($aStart); - $this->tick_step=$aStep; - } - - // Specify that every $step tick mark should have a label - // should be displayed starting - function SetTextLabelInterval($aStep) { - if( $aStep < 1 ) { - JpGraphError::RaiseL(25058);//(" Text label interval must be specified >= 1."); - } - $this->label_step=$aStep; - } - - function SetLabelSide($aSidePos) { - $this->labelPos=$aSidePos; - } - - // Set the font - function SetFont($aFamily,$aStyle=FS_NORMAL,$aSize=10) { - $this->font_family = $aFamily; - $this->font_style = $aStyle; - $this->font_size = $aSize; - } - - // Position for axis line on the "other" scale - function SetPos($aPosOnOtherScale) { - $this->pos=$aPosOnOtherScale; - } - - // Set the position of the axis to be X-pixels delta to the right - // of the max X-position (used to position the multiple Y-axis) - function SetPosAbsDelta($aDelta) { - $this->iDeltaAbsPos=$aDelta; - } - - // Specify the angle for the tick labels - function SetLabelAngle($aAngle) { - $this->label_angle = $aAngle; - } - -} // Class - - -//=================================================== -// CLASS Axis -// Description: Defines X and Y axis. Notes that at the -// moment the code is not really good since the axis on -// several occasion must know wheter it's an X or Y axis. -// This was a design decision to make the code easier to -// follow. -//=================================================== -class Axis extends AxisPrototype { - - function __construct($img,$aScale,$color='black') { - parent::__construct($img,$aScale,$color); - } - - // Stroke the axis. - function Stroke($aOtherAxisScale,$aStrokeLabels=true) { - if( $this->hide ) - return; - if( is_numeric($this->pos) ) { - $pos=$aOtherAxisScale->Translate($this->pos); - } - else { // Default to minimum of other scale if pos not set - if( ($aOtherAxisScale->GetMinVal() >= 0 && $this->pos==false) || $this->pos == 'min' ) { - $pos = $aOtherAxisScale->scale_abs[0]; - } - elseif($this->pos == "max") { - $pos = $aOtherAxisScale->scale_abs[1]; - } - else { // If negative set x-axis at 0 - $this->pos=0; - $pos=$aOtherAxisScale->Translate(0); - } - } - $pos += $this->iDeltaAbsPos; - $this->img->SetLineWeight($this->weight); - $this->img->SetColor($this->color); - $this->img->SetFont($this->font_family,$this->font_style,$this->font_size); - if( $this->scale->type == "x" ) { - if( !$this->hide_line ) { - $this->img->FilledRectangle($this->img->left_margin,$pos,$this->img->width-$this->img->right_margin,$pos+$this->weight-1); - } - if( $this->title_side == SIDE_DOWN ) { - $y = $pos + $this->img->GetFontHeight() + $this->title_margin + $this->title->margin; - $yalign = 'top'; - } - else { - $y = $pos - $this->img->GetFontHeight() - $this->title_margin - $this->title->margin; - $yalign = 'bottom'; - } - - if( $this->title_adjust=='high' ) { - $this->title->SetPos($this->img->width-$this->img->right_margin,$y,'right',$yalign); - } - elseif( $this->title_adjust=='middle' || $this->title_adjust=='center' ) { - $this->title->SetPos(($this->img->width-$this->img->left_margin-$this->img->right_margin)/2+$this->img->left_margin,$y,'center',$yalign); - } - elseif($this->title_adjust=='low') { - $this->title->SetPos($this->img->left_margin,$y,'left',$yalign); - } - else { - JpGraphError::RaiseL(25060,$this->title_adjust);//('Unknown alignment specified for X-axis title. ('.$this->title_adjust.')'); - } - } - elseif( $this->scale->type == "y" ) { - // Add line weight to the height of the axis since - // the x-axis could have a width>1 and we want the axis to fit nicely together. - if( !$this->hide_line ) { - $this->img->FilledRectangle($pos-$this->weight+1,$this->img->top_margin,$pos,$this->img->height-$this->img->bottom_margin+$this->weight-1); - } - $x=$pos ; - if( $this->title_side == SIDE_LEFT ) { - $x -= $this->title_margin; - $x -= $this->title->margin; - $halign = 'right'; - } - else { - $x += $this->title_margin; - $x += $this->title->margin; - $halign = 'left'; - } - // If the user has manually specified an hor. align - // then we override the automatic settings with this - // specifed setting. Since default is 'left' we compare - // with that. (This means a manually set 'left' align - // will have no effect.) - if( $this->title->halign != 'left' ) { - $halign = $this->title->halign; - } - if( $this->title_adjust == 'high' ) { - $this->title->SetPos($x,$this->img->top_margin,$halign,'top'); - } - elseif($this->title_adjust=='middle' || $this->title_adjust=='center') { - $this->title->SetPos($x,($this->img->height-$this->img->top_margin-$this->img->bottom_margin)/2+$this->img->top_margin,$halign,"center"); - } - elseif($this->title_adjust=='low') { - $this->title->SetPos($x,$this->img->height-$this->img->bottom_margin,$halign,'bottom'); - } - else { - JpGraphError::RaiseL(25061,$this->title_adjust);//('Unknown alignment specified for Y-axis title. ('.$this->title_adjust.')'); - } - } - $this->scale->ticks->Stroke($this->img,$this->scale,$pos); - if( $aStrokeLabels ) { - if( !$this->hide_labels ) { - $this->StrokeLabels($pos); - } - $this->title->Stroke($this->img); - } - } - - //--------------- - // PRIVATE METHODS - // Draw all the tick labels on major tick marks - function StrokeLabels($aPos,$aMinor=false,$aAbsLabel=false) { - - if( is_array($this->label_color) && count($this->label_color) > 3 ) { - $this->ticks_label_colors = $this->label_color; - $this->img->SetColor($this->label_color[0]); - } - else { - $this->img->SetColor($this->label_color); - } - $this->img->SetFont($this->font_family,$this->font_style,$this->font_size); - $yoff=$this->img->GetFontHeight()/2; - - // Only draw labels at major tick marks - $nbr = count($this->scale->ticks->maj_ticks_label); - - // We have the option to not-display the very first mark - // (Usefull when the first label might interfere with another - // axis.) - $i = $this->show_first_label ? 0 : 1 ; - if( !$this->show_last_label ) { - --$nbr; - } - // Now run through all labels making sure we don't overshoot the end - // of the scale. - $ncolor=0; - if( isset($this->ticks_label_colors) ) { - $ncolor=count($this->ticks_label_colors); - } - while( $i < $nbr ) { - // $tpos holds the absolute text position for the label - $tpos=$this->scale->ticks->maj_ticklabels_pos[$i]; - - // Note. the $limit is only used for the x axis since we - // might otherwise overshoot if the scale has been centered - // This is due to us "loosing" the last tick mark if we center. - if( $this->scale->type == 'x' && $tpos > $this->img->width-$this->img->right_margin+1 ) { - return; - } - // we only draw every $label_step label - if( ($i % $this->label_step)==0 ) { - - // Set specific label color if specified - if( $ncolor > 0 ) { - $this->img->SetColor($this->ticks_label_colors[$i % $ncolor]); - } - - // If the label has been specified use that and in other case - // just label the mark with the actual scale value - $m=$this->scale->ticks->GetMajor(); - - // ticks_label has an entry for each data point and is the array - // that holds the labels set by the user. If the user hasn't - // specified any values we use whats in the automatically asigned - // labels in the maj_ticks_label - if( isset($this->ticks_label[$i*$m]) ) { - $label=$this->ticks_label[$i*$m]; - } - else { - if( $aAbsLabel ) { - $label=abs($this->scale->ticks->maj_ticks_label[$i]); - } - else { - $label=$this->scale->ticks->maj_ticks_label[$i]; - } - - // We number the scale from 1 and not from 0 so increase by one - if( $this->scale->textscale && - $this->scale->ticks->label_formfunc == '' && - ! $this->scale->ticks->HaveManualLabels() ) { - - ++$label; - - } - } - - if( $this->scale->type == "x" ) { - if( $this->labelPos == SIDE_DOWN ) { - if( $this->label_angle==0 || $this->label_angle==90 ) { - if( $this->label_halign=='' && $this->label_valign=='') { - $this->img->SetTextAlign('center','top'); - } - else { - $this->img->SetTextAlign($this->label_halign,$this->label_valign); - } - - } - else { - if( $this->label_halign=='' && $this->label_valign=='') { - $this->img->SetTextAlign("right","top"); - } - else { - $this->img->SetTextAlign($this->label_halign,$this->label_valign); - } - } - $this->img->StrokeText($tpos,$aPos+$this->tick_label_margin,$label, - $this->label_angle,$this->label_para_align); - } - else { - if( $this->label_angle==0 || $this->label_angle==90 ) { - if( $this->label_halign=='' && $this->label_valign=='') { - $this->img->SetTextAlign("center","bottom"); - } - else { - $this->img->SetTextAlign($this->label_halign,$this->label_valign); - } - } - else { - if( $this->label_halign=='' && $this->label_valign=='') { - $this->img->SetTextAlign("right","bottom"); - } - else { - $this->img->SetTextAlign($this->label_halign,$this->label_valign); - } - } - $this->img->StrokeText($tpos,$aPos-$this->tick_label_margin-1,$label, - $this->label_angle,$this->label_para_align); - } - } - else { - // scale->type == "y" - //if( $this->label_angle!=0 ) - //JpGraphError::Raise(" Labels at an angle are not supported on Y-axis"); - if( $this->labelPos == SIDE_LEFT ) { // To the left of y-axis - if( $this->label_halign=='' && $this->label_valign=='') { - $this->img->SetTextAlign("right","center"); - } - else { - $this->img->SetTextAlign($this->label_halign,$this->label_valign); - } - $this->img->StrokeText($aPos-$this->tick_label_margin,$tpos,$label,$this->label_angle,$this->label_para_align); - } - else { // To the right of the y-axis - if( $this->label_halign=='' && $this->label_valign=='') { - $this->img->SetTextAlign("left","center"); - } - else { - $this->img->SetTextAlign($this->label_halign,$this->label_valign); - } - $this->img->StrokeText($aPos+$this->tick_label_margin,$tpos,$label,$this->label_angle,$this->label_para_align); - } - } - } - ++$i; - } - } - -} - - -//=================================================== -// CLASS Ticks -// Description: Abstract base class for drawing linear and logarithmic -// tick marks on axis -//=================================================== -class Ticks { - public $label_formatstr=''; // C-style format string to use for labels - public $label_formfunc=''; - public $label_dateformatstr=''; - public $direction=1; // Should ticks be in(=1) the plot area or outside (=-1) - public $supress_last=false,$supress_tickmarks=false,$supress_minor_tickmarks=false; - public $maj_ticks_pos = array(), $maj_ticklabels_pos = array(), - $ticks_pos = array(), $maj_ticks_label = array(); - public $precision; - - protected $minor_abs_size=3, $major_abs_size=5; - protected $scale; - protected $is_set=false; - protected $supress_zerolabel=false,$supress_first=false; - protected $mincolor='',$majcolor=''; - protected $weight=1; - protected $label_usedateformat=FALSE; - - function __construct($aScale) { - $this->scale=$aScale; - $this->precision = -1; - } - - // Set format string for automatic labels - function SetLabelFormat($aFormatString,$aDate=FALSE) { - $this->label_formatstr=$aFormatString; - $this->label_usedateformat=$aDate; - } - - function SetLabelDateFormat($aFormatString) { - $this->label_dateformatstr=$aFormatString; - } - - function SetFormatCallback($aCallbackFuncName) { - $this->label_formfunc = $aCallbackFuncName; - } - - // Don't display the first zero label - function SupressZeroLabel($aFlag=true) { - $this->supress_zerolabel=$aFlag; - } - - // Don't display minor tick marks - function SupressMinorTickMarks($aHide=true) { - $this->supress_minor_tickmarks=$aHide; - } - - // Don't display major tick marks - function SupressTickMarks($aHide=true) { - $this->supress_tickmarks=$aHide; - } - - // Hide the first tick mark - function SupressFirst($aHide=true) { - $this->supress_first=$aHide; - } - - // Hide the last tick mark - function SupressLast($aHide=true) { - $this->supress_last=$aHide; - } - - // Size (in pixels) of minor tick marks - function GetMinTickAbsSize() { - return $this->minor_abs_size; - } - - // Size (in pixels) of major tick marks - function GetMajTickAbsSize() { - return $this->major_abs_size; - } - - function SetSize($aMajSize,$aMinSize=3) { - $this->major_abs_size = $aMajSize; - $this->minor_abs_size = $aMinSize; - } - - // Have the ticks been specified - function IsSpecified() { - return $this->is_set; - } - - function SetSide($aSide) { - $this->direction=$aSide; - } - - // Which side of the axis should the ticks be on - function SetDirection($aSide=SIDE_RIGHT) { - $this->direction=$aSide; - } - - // Set colors for major and minor tick marks - function SetMarkColor($aMajorColor,$aMinorColor='') { - $this->SetColor($aMajorColor,$aMinorColor); - } - - function SetColor($aMajorColor,$aMinorColor='') { - $this->majcolor=$aMajorColor; - - // If not specified use same as major - if( $aMinorColor == '' ) { - $this->mincolor=$aMajorColor; - } - else { - $this->mincolor=$aMinorColor; - } - } - - function SetWeight($aWeight) { - $this->weight=$aWeight; - } - -} // Class - -//=================================================== -// CLASS LinearTicks -// Description: Draw linear ticks on axis -//=================================================== -class LinearTicks extends Ticks { - public $minor_step=1, $major_step=2; - public $xlabel_offset=0,$xtick_offset=0; - private $label_offset=0; // What offset should the displayed label have - // i.e should we display 0,1,2 or 1,2,3,4 or 2,3,4 etc - private $text_label_start=0; - private $iManualTickPos = NULL, $iManualMinTickPos = NULL, $iManualTickLabels = NULL; - private $iAdjustForDST = false; // If a date falls within the DST period add one hour to the diaplyed time - - function __construct() { - $this->precision = -1; - } - - // Return major step size in world coordinates - function GetMajor() { - return $this->major_step; - } - - // Return minor step size in world coordinates - function GetMinor() { - return $this->minor_step; - } - - // Set Minor and Major ticks (in world coordinates) - function Set($aMajStep,$aMinStep=false) { - if( $aMinStep==false ) { - $aMinStep=$aMajStep; - } - - if( $aMajStep <= 0 || $aMinStep <= 0 ) { - JpGraphError::RaiseL(25064); - //(" Minor or major step size is 0. Check that you haven't got an accidental SetTextTicks(0) in your code. If this is not the case you might have stumbled upon a bug in JpGraph. Please report this and if possible include the data that caused the problem."); - } - - $this->major_step=$aMajStep; - $this->minor_step=$aMinStep; - $this->is_set = true; - } - - function SetMajTickPositions($aMajPos,$aLabels=NULL) { - $this->SetTickPositions($aMajPos,NULL,$aLabels); - } - - function SetTickPositions($aMajPos,$aMinPos=NULL,$aLabels=NULL) { - if( !is_array($aMajPos) || ($aMinPos!==NULL && !is_array($aMinPos)) ) { - JpGraphError::RaiseL(25065);//('Tick positions must be specifued as an array()'); - return; - } - $n=count($aMajPos); - if( is_array($aLabels) && (count($aLabels) != $n) ) { - JpGraphError::RaiseL(25066);//('When manually specifying tick positions and labels the number of labels must be the same as the number of specified ticks.'); - } - $this->iManualTickPos = $aMajPos; - $this->iManualMinTickPos = $aMinPos; - $this->iManualTickLabels = $aLabels; - } - - function HaveManualLabels() { - return count($this->iManualTickLabels) > 0; - } - - // Specify all the tick positions manually and possible also the exact labels - function _doManualTickPos($aScale) { - $n=count($this->iManualTickPos); - $m=count($this->iManualMinTickPos); - $doLbl=count($this->iManualTickLabels) > 0; - - $this->maj_ticks_pos = array(); - $this->maj_ticklabels_pos = array(); - $this->ticks_pos = array(); - - // Now loop through the supplied positions and translate them to screen coordinates - // and store them in the maj_label_positions - $minScale = $aScale->scale[0]; - $maxScale = $aScale->scale[1]; - $j=0; - for($i=0; $i < $n ; ++$i ) { - // First make sure that the first tick is not lower than the lower scale value - if( !isset($this->iManualTickPos[$i]) || $this->iManualTickPos[$i] < $minScale || $this->iManualTickPos[$i] > $maxScale) { - continue; - } - - $this->maj_ticks_pos[$j] = $aScale->Translate($this->iManualTickPos[$i]); - $this->maj_ticklabels_pos[$j] = $this->maj_ticks_pos[$j]; - - // Set the minor tick marks the same as major if not specified - if( $m <= 0 ) { - $this->ticks_pos[$j] = $this->maj_ticks_pos[$j]; - } - if( $doLbl ) { - $this->maj_ticks_label[$j] = $this->iManualTickLabels[$i]; - } - else { - $this->maj_ticks_label[$j]=$this->_doLabelFormat($this->iManualTickPos[$i],$i,$n); - } - ++$j; - } - - // Some sanity check - if( count($this->maj_ticks_pos) < 2 ) { - JpGraphError::RaiseL(25067);//('Your manually specified scale and ticks is not correct. The scale seems to be too small to hold any of the specified tickl marks.'); - } - - // Setup the minor tick marks - $j=0; - for($i=0; $i < $m; ++$i ) { - if( empty($this->iManualMinTickPos[$i]) || $this->iManualMinTickPos[$i] < $minScale || $this->iManualMinTickPos[$i] > $maxScale) { - continue; - } - $this->ticks_pos[$j] = $aScale->Translate($this->iManualMinTickPos[$i]); - ++$j; - } - } - - function _doAutoTickPos($aScale) { - $maj_step_abs = $aScale->scale_factor*$this->major_step; - $min_step_abs = $aScale->scale_factor*$this->minor_step; - - if( $min_step_abs==0 || $maj_step_abs==0 ) { - JpGraphError::RaiseL(25068);//("A plot has an illegal scale. This could for example be that you are trying to use text autoscaling to draw a line plot with only one point or that the plot area is too small. It could also be that no input data value is numeric (perhaps only '-' or 'x')"); - } - // We need to make this an int since comparing it below - // with the result from round() can give wrong result, such that - // (40 < 40) == TRUE !!! - $limit = (int)$aScale->scale_abs[1]; - - if( $aScale->textscale ) { - // This can only be true for a X-scale (horizontal) - // Define ticks for a text scale. This is slightly different from a - // normal linear type of scale since the position might be adjusted - // and the labels start at on - $label = (float)$aScale->GetMinVal()+$this->text_label_start+$this->label_offset; - $start_abs=$aScale->scale_factor*$this->text_label_start; - $nbrmajticks=round(($aScale->GetMaxVal()-$aScale->GetMinVal()-$this->text_label_start )/$this->major_step)+1; - - $x = $aScale->scale_abs[0]+$start_abs+$this->xlabel_offset*$min_step_abs; - for( $i=0; $label <= $aScale->GetMaxVal()+$this->label_offset; ++$i ) { - // Apply format to label - $this->maj_ticks_label[$i]=$this->_doLabelFormat($label,$i,$nbrmajticks); - $label+=$this->major_step; - - // The x-position of the tick marks can be different from the labels. - // Note that we record the tick position (not the label) so that the grid - // happen upon tick marks and not labels. - $xtick=$aScale->scale_abs[0]+$start_abs+$this->xtick_offset*$min_step_abs+$i*$maj_step_abs; - $this->maj_ticks_pos[$i]=$xtick; - $this->maj_ticklabels_pos[$i] = round($x); - $x += $maj_step_abs; - } - } - else { - $label = $aScale->GetMinVal(); - $abs_pos = $aScale->scale_abs[0]; - $j=0; $i=0; - $step = round($maj_step_abs/$min_step_abs); - if( $aScale->type == "x" ) { - // For a normal linear type of scale the major ticks will always be multiples - // of the minor ticks. In order to avoid any rounding issues the major ticks are - // defined as every "step" minor ticks and not calculated separately - $nbrmajticks=round(($aScale->GetMaxVal()-$aScale->GetMinVal()-$this->text_label_start )/$this->major_step)+1; - while( round($abs_pos) <= $limit ) { - $this->ticks_pos[] = round($abs_pos); - $this->ticks_label[] = $label; - if( $step== 0 || $i % $step == 0 && $j < $nbrmajticks ) { - $this->maj_ticks_pos[$j] = round($abs_pos); - $this->maj_ticklabels_pos[$j] = round($abs_pos); - $this->maj_ticks_label[$j]=$this->_doLabelFormat($label,$j,$nbrmajticks); - ++$j; - } - ++$i; - $abs_pos += $min_step_abs; - $label+=$this->minor_step; - } - } - elseif( $aScale->type == "y" ) { - $nbrmajticks=round(($aScale->GetMaxVal()-$aScale->GetMinVal())/$this->major_step)+1; - while( round($abs_pos) >= $limit ) { - $this->ticks_pos[$i] = round($abs_pos); - $this->ticks_label[$i]=$label; - if( $step== 0 || $i % $step == 0 && $j < $nbrmajticks) { - $this->maj_ticks_pos[$j] = round($abs_pos); - $this->maj_ticklabels_pos[$j] = round($abs_pos); - $this->maj_ticks_label[$j]=$this->_doLabelFormat($label,$j,$nbrmajticks); - ++$j; - } - ++$i; - $abs_pos += $min_step_abs; - $label += $this->minor_step; - } - } - } - } - - function AdjustForDST($aFlg=true) { - $this->iAdjustForDST = $aFlg; - } - - - function _doLabelFormat($aVal,$aIdx,$aNbrTicks) { - - // If precision hasn't been specified set it to a sensible value - if( $this->precision==-1 ) { - $t = log10($this->minor_step); - if( $t > 0 ) { - $precision = 0; - } - else { - $precision = -floor($t); - } - } - else { - $precision = $this->precision; - } - - if( $this->label_formfunc != '' ) { - $f=$this->label_formfunc; - if( $this->label_formatstr == '' ) { - $l = call_user_func($f,$aVal); - } - else { - $l = sprintf($this->label_formatstr, call_user_func($f,$aVal)); - } - } - elseif( $this->label_formatstr != '' || $this->label_dateformatstr != '' ) { - if( $this->label_usedateformat ) { - // Adjust the value to take daylight savings into account - if (date("I",$aVal)==1 && $this->iAdjustForDST ) { - // DST - $aVal+=3600; - } - - $l = date($this->label_formatstr,$aVal); - if( $this->label_formatstr == 'W' ) { - // If we use week formatting then add a single 'w' in front of the - // week number to differentiate it from dates - $l = 'w'.$l; - } - } - else { - if( $this->label_dateformatstr !== '' ) { - // Adjust the value to take daylight savings into account - if (date("I",$aVal)==1 && $this->iAdjustForDST ) { - // DST - $aVal+=3600; - } - - $l = date($this->label_dateformatstr,$aVal); - if( $this->label_formatstr == 'W' ) { - // If we use week formatting then add a single 'w' in front of the - // week number to differentiate it from dates - $l = 'w'.$l; - } - } - else { - $l = sprintf($this->label_formatstr,$aVal); - } - } - } - else { - $l = sprintf('%01.'.$precision.'f',round($aVal,$precision)); - } - - if( ($this->supress_zerolabel && $l==0) || ($this->supress_first && $aIdx==0) || ($this->supress_last && $aIdx==$aNbrTicks-1) ) { - $l=''; - } - return $l; - } - - // Stroke ticks on either X or Y axis - function _StrokeTicks($aImg,$aScale,$aPos) { - $hor = $aScale->type == 'x'; - $aImg->SetLineWeight($this->weight); - - // We need to make this an int since comparing it below - // with the result from round() can give wrong result, such that - // (40 < 40) == TRUE !!! - $limit = (int)$aScale->scale_abs[1]; - - // A text scale doesn't have any minor ticks - if( !$aScale->textscale ) { - // Stroke minor ticks - $yu = $aPos - $this->direction*$this->GetMinTickAbsSize(); - $xr = $aPos + $this->direction*$this->GetMinTickAbsSize(); - $n = count($this->ticks_pos); - for($i=0; $i < $n; ++$i ) { - if( !$this->supress_tickmarks && !$this->supress_minor_tickmarks) { - if( $this->mincolor != '') { - $aImg->PushColor($this->mincolor); - } - if( $hor ) { - //if( $this->ticks_pos[$i] <= $limit ) - $aImg->Line($this->ticks_pos[$i],$aPos,$this->ticks_pos[$i],$yu); - } - else { - //if( $this->ticks_pos[$i] >= $limit ) - $aImg->Line($aPos,$this->ticks_pos[$i],$xr,$this->ticks_pos[$i]); - } - if( $this->mincolor != '' ) { - $aImg->PopColor(); - } - } - } - } - - // Stroke major ticks - $yu = $aPos - $this->direction*$this->GetMajTickAbsSize(); - $xr = $aPos + $this->direction*$this->GetMajTickAbsSize(); - $nbrmajticks=round(($aScale->GetMaxVal()-$aScale->GetMinVal()-$this->text_label_start )/$this->major_step)+1; - $n = count($this->maj_ticks_pos); - for($i=0; $i < $n ; ++$i ) { - if(!($this->xtick_offset > 0 && $i==$nbrmajticks-1) && !$this->supress_tickmarks) { - if( $this->majcolor != '') { - $aImg->PushColor($this->majcolor); - } - if( $hor ) { - //if( $this->maj_ticks_pos[$i] <= $limit ) - $aImg->Line($this->maj_ticks_pos[$i],$aPos,$this->maj_ticks_pos[$i],$yu); - } - else { - //if( $this->maj_ticks_pos[$i] >= $limit ) - $aImg->Line($aPos,$this->maj_ticks_pos[$i],$xr,$this->maj_ticks_pos[$i]); - } - if( $this->majcolor != '') { - $aImg->PopColor(); - } - } - } - - } - - // Draw linear ticks - function Stroke($aImg,$aScale,$aPos) { - if( $this->iManualTickPos != NULL ) { - $this->_doManualTickPos($aScale); - } - else { - $this->_doAutoTickPos($aScale); - } - $this->_StrokeTicks($aImg,$aScale,$aPos, $aScale->type == 'x' ); - } - - //--------------- - // PRIVATE METHODS - // Spoecify the offset of the displayed tick mark with the tick "space" - // Legal values for $o is [0,1] used to adjust where the tick marks and label - // should be positioned within the major tick-size - // $lo specifies the label offset and $to specifies the tick offset - // this comes in handy for example in bar graphs where we wont no offset for the - // tick but have the labels displayed halfway under the bars. - function SetXLabelOffset($aLabelOff,$aTickOff=-1) { - $this->xlabel_offset=$aLabelOff; - if( $aTickOff==-1 ) { - // Same as label offset - $this->xtick_offset=$aLabelOff; - } - else { - $this->xtick_offset=$aTickOff; - } - if( $aLabelOff>0 ) { - $this->SupressLast(); // The last tick wont fit - } - } - - // Which tick label should we start with? - function SetTextLabelStart($aTextLabelOff) { - $this->text_label_start=$aTextLabelOff; - } - -} // Class - -//=================================================== -// CLASS LinearScale -// Description: Handle linear scaling between screen and world -//=================================================== -class LinearScale { - public $textscale=false; // Just a flag to let the Plot class find out if - // we are a textscale or not. This is a cludge since - // this information is available in Graph::axtype but - // we don't have access to the graph object in the Plots - // stroke method. So we let graph store the status here - // when the linear scale is created. A real cludge... - public $type; // is this x or y scale ? - public $ticks=null; // Store ticks - public $text_scale_off = 0; - public $scale_abs=array(0,0); - public $scale_factor; // Scale factor between world and screen - public $off; // Offset between image edge and plot area - public $scale=array(0,0); - public $name = 'lin'; - public $auto_ticks=false; // When using manual scale should the ticks be automatically set? - public $world_abs_size; // Plot area size in pixels (Needed public in jpgraph_radar.php) - public $world_size; // Plot area size in world coordinates - public $intscale=false; // Restrict autoscale to integers - protected $autoscale_min=false; // Forced minimum value, auto determine max - protected $autoscale_max=false; // Forced maximum value, auto determine min - private $gracetop=0,$gracebottom=0; - - function __construct($aMin=0,$aMax=0,$aType='y') { - assert($aType=='x' || $aType=='y' ); - assert($aMin<=$aMax); - - $this->type=$aType; - $this->scale=array($aMin,$aMax); - $this->world_size=$aMax-$aMin; - $this->ticks = new LinearTicks(); - } - - // Check if scale is set or if we should autoscale - // We should do this is either scale or ticks has not been set - function IsSpecified() { - if( $this->GetMinVal()==$this->GetMaxVal() ) { // Scale not set - return false; - } - return true; - } - - // Set the minimum data value when the autoscaling is used. - // Usefull if you want a fix minimum (like 0) but have an - // automatic maximum - function SetAutoMin($aMin) { - $this->autoscale_min=$aMin; - } - - // Set the minimum data value when the autoscaling is used. - // Usefull if you want a fix minimum (like 0) but have an - // automatic maximum - function SetAutoMax($aMax) { - $this->autoscale_max=$aMax; - } - - // If the user manually specifies a scale should the ticks - // still be set automatically? - function SetAutoTicks($aFlag=true) { - $this->auto_ticks = $aFlag; - } - - // Specify scale "grace" value (top and bottom) - function SetGrace($aGraceTop,$aGraceBottom=0) { - if( $aGraceTop<0 || $aGraceBottom < 0 ) { - JpGraphError::RaiseL(25069);//(" Grace must be larger then 0"); - } - $this->gracetop=$aGraceTop; - $this->gracebottom=$aGraceBottom; - } - - // Get the minimum value in the scale - function GetMinVal() { - return $this->scale[0]; - } - - // get maximum value for scale - function GetMaxVal() { - return $this->scale[1]; - } - - // Specify a new min/max value for sclae - function Update($aImg,$aMin,$aMax) { - $this->scale=array($aMin,$aMax); - $this->world_size=$aMax-$aMin; - $this->InitConstants($aImg); - } - - // Translate between world and screen - function Translate($aCoord) { - if( !is_numeric($aCoord) ) { - if( $aCoord != '' && $aCoord != '-' && $aCoord != 'x' ) { - JpGraphError::RaiseL(25070);//('Your data contains non-numeric values.'); - } - return 0; - } - else { - return round($this->off+($aCoord - $this->scale[0]) * $this->scale_factor); - } - } - - // Relative translate (don't include offset) usefull when we just want - // to know the relative position (in pixels) on the axis - function RelTranslate($aCoord) { - if( !is_numeric($aCoord) ) { - if( $aCoord != '' && $aCoord != '-' && $aCoord != 'x' ) { - JpGraphError::RaiseL(25070);//('Your data contains non-numeric values.'); - } - return 0; - } - else { - return ($aCoord - $this->scale[0]) * $this->scale_factor; - } - } - - // Restrict autoscaling to only use integers - function SetIntScale($aIntScale=true) { - $this->intscale=$aIntScale; - } - - // Calculate an integer autoscale - function IntAutoScale($img,$min,$max,$maxsteps,$majend=true) { - // Make sure limits are integers - $min=floor($min); - $max=ceil($max); - if( abs($min-$max)==0 ) { - --$min; ++$max; - } - $maxsteps = floor($maxsteps); - - $gracetop=round(($this->gracetop/100.0)*abs($max-$min)); - $gracebottom=round(($this->gracebottom/100.0)*abs($max-$min)); - if( is_numeric($this->autoscale_min) ) { - $min = ceil($this->autoscale_min); - if( $min >= $max ) { - JpGraphError::RaiseL(25071);//('You have specified a min value with SetAutoMin() which is larger than the maximum value used for the scale. This is not possible.'); - } - } - - if( is_numeric($this->autoscale_max) ) { - $max = ceil($this->autoscale_max); - if( $min >= $max ) { - JpGraphError::RaiseL(25072);//('You have specified a max value with SetAutoMax() which is smaller than the miminum value used for the scale. This is not possible.'); - } - } - - if( abs($min-$max ) == 0 ) { - ++$max; - --$min; - } - - $min -= $gracebottom; - $max += $gracetop; - - // First get tickmarks as multiples of 1, 10, ... - if( $majend ) { - list($num1steps,$adj1min,$adj1max,$maj1step) = $this->IntCalcTicks($maxsteps,$min,$max,1); - } - else { - $adj1min = $min; - $adj1max = $max; - list($num1steps,$maj1step) = $this->IntCalcTicksFreeze($maxsteps,$min,$max,1); - } - - if( abs($min-$max) > 2 ) { - // Then get tick marks as 2:s 2, 20, ... - if( $majend ) { - list($num2steps,$adj2min,$adj2max,$maj2step) = $this->IntCalcTicks($maxsteps,$min,$max,5); - } - else { - $adj2min = $min; - $adj2max = $max; - list($num2steps,$maj2step) = $this->IntCalcTicksFreeze($maxsteps,$min,$max,5); - } - } - else { - $num2steps = 10000; // Dummy high value so we don't choose this - } - - if( abs($min-$max) > 5 ) { - // Then get tickmarks as 5:s 5, 50, 500, ... - if( $majend ) { - list($num5steps,$adj5min,$adj5max,$maj5step) = $this->IntCalcTicks($maxsteps,$min,$max,2); - } - else { - $adj5min = $min; - $adj5max = $max; - list($num5steps,$maj5step) = $this->IntCalcTicksFreeze($maxsteps,$min,$max,2); - } - } - else { - $num5steps = 10000; // Dummy high value so we don't choose this - } - - // Check to see whichof 1:s, 2:s or 5:s fit better with - // the requested number of major ticks - $match1=abs($num1steps-$maxsteps); - $match2=abs($num2steps-$maxsteps); - if( !empty($maj5step) && $maj5step > 1 ) { - $match5=abs($num5steps-$maxsteps); - } - else { - $match5=10000; // Dummy high value - } - - // Compare these three values and see which is the closest match - // We use a 0.6 weight to gravitate towards multiple of 5:s - if( $match1 < $match2 ) { - if( $match1 < $match5 ) $r=1; - else $r=3; - } - else { - if( $match2 < $match5 ) $r=2; - else $r=3; - } - // Minsteps are always the same as maxsteps for integer scale - switch( $r ) { - case 1: - $this->ticks->Set($maj1step,$maj1step); - $this->Update($img,$adj1min,$adj1max); - break; - case 2: - $this->ticks->Set($maj2step,$maj2step); - $this->Update($img,$adj2min,$adj2max); - break; - case 3: - $this->ticks->Set($maj5step,$maj5step); - $this->Update($img,$adj5min,$adj5max); - break; - default: - JpGraphError::RaiseL(25073,$r);//('Internal error. Integer scale algorithm comparison out of bound (r=$r)'); - } - } - - - // Calculate autoscale. Used if user hasn't given a scale and ticks - // $maxsteps is the maximum number of major tickmarks allowed. - function AutoScale($img,$min,$max,$maxsteps,$majend=true) { - - if( !is_numeric($min) || !is_numeric($max) ) { - JpGraphError::Raise(25044); - } - - if( $this->intscale ) { - $this->IntAutoScale($img,$min,$max,$maxsteps,$majend); - return; - } - if( abs($min-$max) < 0.00001 ) { - // We need some difference to be able to autoscale - // make it 5% above and 5% below value - if( $min==0 && $max==0 ) { // Special case - $min=-1; $max=1; - } - else { - $delta = (abs($max)+abs($min))*0.005; - $min -= $delta; - $max += $delta; - } - } - - $gracetop=($this->gracetop/100.0)*abs($max-$min); - $gracebottom=($this->gracebottom/100.0)*abs($max-$min); - if( is_numeric($this->autoscale_min) ) { - $min = $this->autoscale_min; - if( $min >= $max ) { - JpGraphError::RaiseL(25071);//('You have specified a min value with SetAutoMin() which is larger than the maximum value used for the scale. This is not possible.'); - } - if( abs($min-$max ) < 0.001 ) { - $max *= 1.2; - } - } - - if( is_numeric($this->autoscale_max) ) { - $max = $this->autoscale_max; - if( $min >= $max ) { - JpGraphError::RaiseL(25072);//('You have specified a max value with SetAutoMax() which is smaller than the miminum value used for the scale. This is not possible.'); - } - if( abs($min-$max ) < 0.001 ) { - $min *= 0.8; - } - } - - $min -= $gracebottom; - $max += $gracetop; - - // First get tickmarks as multiples of 0.1, 1, 10, ... - if( $majend ) { - list($num1steps,$adj1min,$adj1max,$min1step,$maj1step) = $this->CalcTicks($maxsteps,$min,$max,1,2); - } - else { - $adj1min=$min; - $adj1max=$max; - list($num1steps,$min1step,$maj1step) = $this->CalcTicksFreeze($maxsteps,$min,$max,1,2,false); - } - - // Then get tick marks as 2:s 0.2, 2, 20, ... - if( $majend ) { - list($num2steps,$adj2min,$adj2max,$min2step,$maj2step) = $this->CalcTicks($maxsteps,$min,$max,5,2); - } - else { - $adj2min=$min; - $adj2max=$max; - list($num2steps,$min2step,$maj2step) = $this->CalcTicksFreeze($maxsteps,$min,$max,5,2,false); - } - - // Then get tickmarks as 5:s 0.05, 0.5, 5, 50, ... - if( $majend ) { - list($num5steps,$adj5min,$adj5max,$min5step,$maj5step) = $this->CalcTicks($maxsteps,$min,$max,2,5); - } - else { - $adj5min=$min; - $adj5max=$max; - list($num5steps,$min5step,$maj5step) = $this->CalcTicksFreeze($maxsteps,$min,$max,2,5,false); - } - - // Check to see whichof 1:s, 2:s or 5:s fit better with - // the requested number of major ticks - $match1=abs($num1steps-$maxsteps); - $match2=abs($num2steps-$maxsteps); - $match5=abs($num5steps-$maxsteps); - - // Compare these three values and see which is the closest match - // We use a 0.8 weight to gravitate towards multiple of 5:s - $r=$this->MatchMin3($match1,$match2,$match5,0.8); - switch( $r ) { - case 1: - $this->Update($img,$adj1min,$adj1max); - $this->ticks->Set($maj1step,$min1step); - break; - case 2: - $this->Update($img,$adj2min,$adj2max); - $this->ticks->Set($maj2step,$min2step); - break; - case 3: - $this->Update($img,$adj5min,$adj5max); - $this->ticks->Set($maj5step,$min5step); - break; - } - } - - //--------------- - // PRIVATE METHODS - - // This method recalculates all constants that are depending on the - // margins in the image. If the margins in the image are changed - // this method should be called for every scale that is registred with - // that image. Should really be installed as an observer of that image. - function InitConstants($img) { - if( $this->type=='x' ) { - $this->world_abs_size=$img->width - $img->left_margin - $img->right_margin; - $this->off=$img->left_margin; - $this->scale_factor = 0; - if( $this->world_size > 0 ) { - $this->scale_factor=$this->world_abs_size/($this->world_size*1.0); - } - } - else { // y scale - $this->world_abs_size=$img->height - $img->top_margin - $img->bottom_margin; - $this->off=$img->top_margin+$this->world_abs_size; - $this->scale_factor = 0; - if( $this->world_size > 0 ) { - $this->scale_factor=-$this->world_abs_size/($this->world_size*1.0); - } - } - $size = $this->world_size * $this->scale_factor; - $this->scale_abs=array($this->off,$this->off + $size); - } - - // Initialize the conversion constants for this scale - // This tries to pre-calculate as much as possible to speed up the - // actual conversion (with Translate()) later on - // $start =scale start in absolute pixels (for x-scale this is an y-position - // and for an y-scale this is an x-position - // $len =absolute length in pixels of scale - function SetConstants($aStart,$aLen) { - $this->world_abs_size=$aLen; - $this->off=$aStart; - - if( $this->world_size<=0 ) { - // This should never ever happen !! - JpGraphError::RaiseL(25074); - //("You have unfortunately stumbled upon a bug in JpGraph. It seems like the scale range is ".$this->world_size." [for ".$this->type." scale]
        Please report Bug #01 to jpgraph@aditus.nu and include the script that gave this error. This problem could potentially be caused by trying to use \"illegal\" values in the input data arrays (like trying to send in strings or only NULL values) which causes the autoscaling to fail."); - } - - // scale_factor = number of pixels per world unit - $this->scale_factor=$this->world_abs_size/($this->world_size*1.0); - - // scale_abs = start and end points of scale in absolute pixels - $this->scale_abs=array($this->off,$this->off+$this->world_size*$this->scale_factor); - } - - - // Calculate number of ticks steps with a specific division - // $a is the divisor of 10**x to generate the first maj tick intervall - // $a=1, $b=2 give major ticks with multiple of 10, ...,0.1,1,10,... - // $a=5, $b=2 give major ticks with multiple of 2:s ...,0.2,2,20,... - // $a=2, $b=5 give major ticks with multiple of 5:s ...,0.5,5,50,... - // We return a vector of - // [$numsteps,$adjmin,$adjmax,$minstep,$majstep] - // If $majend==true then the first and last marks on the axis will be major - // labeled tick marks otherwise it will be adjusted to the closest min tick mark - function CalcTicks($maxsteps,$min,$max,$a,$b,$majend=true) { - $diff=$max-$min; - if( $diff==0 ) { - $ld=0; - } - else { - $ld=floor(log10($diff)); - } - - // Gravitate min towards zero if we are close - if( $min>0 && $min < pow(10,$ld) ) $min=0; - - //$majstep=pow(10,$ld-1)/$a; - $majstep=pow(10,$ld)/$a; - $minstep=$majstep/$b; - - $adjmax=ceil($max/$minstep)*$minstep; - $adjmin=floor($min/$minstep)*$minstep; - $adjdiff = $adjmax-$adjmin; - $numsteps=$adjdiff/$majstep; - - while( $numsteps>$maxsteps ) { - $majstep=pow(10,$ld)/$a; - $numsteps=$adjdiff/$majstep; - ++$ld; - } - - $minstep=$majstep/$b; - $adjmin=floor($min/$minstep)*$minstep; - $adjdiff = $adjmax-$adjmin; - if( $majend ) { - $adjmin = floor($min/$majstep)*$majstep; - $adjdiff = $adjmax-$adjmin; - $adjmax = ceil($adjdiff/$majstep)*$majstep+$adjmin; - } - else { - $adjmax=ceil($max/$minstep)*$minstep; - } - - return array($numsteps,$adjmin,$adjmax,$minstep,$majstep); - } - - function CalcTicksFreeze($maxsteps,$min,$max,$a,$b) { - // Same as CalcTicks but don't adjust min/max values - $diff=$max-$min; - if( $diff==0 ) { - $ld=0; - } - else { - $ld=floor(log10($diff)); - } - - //$majstep=pow(10,$ld-1)/$a; - $majstep=pow(10,$ld)/$a; - $minstep=$majstep/$b; - $numsteps=floor($diff/$majstep); - - while( $numsteps > $maxsteps ) { - $majstep=pow(10,$ld)/$a; - $numsteps=floor($diff/$majstep); - ++$ld; - } - $minstep=$majstep/$b; - return array($numsteps,$minstep,$majstep); - } - - - function IntCalcTicks($maxsteps,$min,$max,$a,$majend=true) { - $diff=$max-$min; - if( $diff==0 ) { - JpGraphError::RaiseL(25075);//('Can\'t automatically determine ticks since min==max.'); - } - else { - $ld=floor(log10($diff)); - } - - // Gravitate min towards zero if we are close - if( $min>0 && $min < pow(10,$ld) ) { - $min=0; - } - if( $ld == 0 ) { - $ld=1; - } - if( $a == 1 ) { - $majstep = 1; - } - else { - $majstep=pow(10,$ld)/$a; - } - $adjmax=ceil($max/$majstep)*$majstep; - - $adjmin=floor($min/$majstep)*$majstep; - $adjdiff = $adjmax-$adjmin; - $numsteps=$adjdiff/$majstep; - while( $numsteps>$maxsteps ) { - $majstep=pow(10,$ld)/$a; - $numsteps=$adjdiff/$majstep; - ++$ld; - } - - $adjmin=floor($min/$majstep)*$majstep; - $adjdiff = $adjmax-$adjmin; - if( $majend ) { - $adjmin = floor($min/$majstep)*$majstep; - $adjdiff = $adjmax-$adjmin; - $adjmax = ceil($adjdiff/$majstep)*$majstep+$adjmin; - } - else { - $adjmax=ceil($max/$majstep)*$majstep; - } - - return array($numsteps,$adjmin,$adjmax,$majstep); - } - - - function IntCalcTicksFreeze($maxsteps,$min,$max,$a) { - // Same as IntCalcTick but don't change min/max values - $diff=$max-$min; - if( $diff==0 ) { - JpGraphError::RaiseL(25075);//('Can\'t automatically determine ticks since min==max.'); - } - else { - $ld=floor(log10($diff)); - } - if( $ld == 0 ) { - $ld=1; - } - if( $a == 1 ) { - $majstep = 1; - } - else { - $majstep=pow(10,$ld)/$a; - } - - $numsteps=floor($diff/$majstep); - while( $numsteps > $maxsteps ) { - $majstep=pow(10,$ld)/$a; - $numsteps=floor($diff/$majstep); - ++$ld; - } - - return array($numsteps,$majstep); - } - - // Determine the minimum of three values witha weight for last value - function MatchMin3($a,$b,$c,$weight) { - if( $a < $b ) { - if( $a < ($c*$weight) ) { - return 1; // $a smallest - } - else { - return 3; // $c smallest - } - } - elseif( $b < ($c*$weight) ) { - return 2; // $b smallest - } - return 3; // $c smallest - } -} // Class - - -//=================================================== -// CLASS DisplayValue -// Description: Used to print data values at data points -//=================================================== -class DisplayValue { - public $margin=5; - public $show=false; - public $valign='',$halign='center'; - public $format='%.1f',$negformat=''; - private $ff=FF_FONT1,$fs=FS_NORMAL,$fsize=10; - private $iFormCallback=''; - private $angle=0; - private $color='navy',$negcolor=''; - private $iHideZero=false; - public $txt=null; - - function __construct() { - $this->txt = new Text(); - } - - function Show($aFlag=true) { - $this->show=$aFlag; - } - - function SetColor($aColor,$aNegcolor='') { - $this->color = $aColor; - $this->negcolor = $aNegcolor; - } - - function SetFont($aFontFamily,$aFontStyle=FS_NORMAL,$aFontSize=10) { - $this->ff=$aFontFamily; - $this->fs=$aFontStyle; - $this->fsize=$aFontSize; - } - - function ApplyFont($aImg) { - $aImg->SetFont($this->ff,$this->fs,$this->fsize); - } - - function SetMargin($aMargin) { - $this->margin = $aMargin; - } - - function SetAngle($aAngle) { - $this->angle = $aAngle; - } - - function SetAlign($aHAlign,$aVAlign='') { - $this->halign = $aHAlign; - $this->valign = $aVAlign; - } - - function SetFormat($aFormat,$aNegFormat='') { - $this->format= $aFormat; - $this->negformat= $aNegFormat; - } - - function SetFormatCallback($aFunc) { - $this->iFormCallback = $aFunc; - } - - function HideZero($aFlag=true) { - $this->iHideZero=$aFlag; - } - - function Stroke($img,$aVal,$x,$y) { - - if( $this->show ) - { - if( $this->negformat=='' ) { - $this->negformat=$this->format; - } - if( $this->negcolor=='' ) { - $this->negcolor=$this->color; - } - - if( $aVal===NULL || (is_string($aVal) && ($aVal=='' || $aVal=='-' || $aVal=='x' ) ) ) { - return; - } - - if( is_numeric($aVal) && $aVal==0 && $this->iHideZero ) { - return; - } - - // Since the value is used in different cirumstances we need to check what - // kind of formatting we shall use. For example, to display values in a line - // graph we simply display the formatted value, but in the case where the user - // has already specified a text string we don't fo anything. - if( $this->iFormCallback != '' ) { - $f = $this->iFormCallback; - $sval = call_user_func($f,$aVal); - } - elseif( is_numeric($aVal) ) { - if( $aVal >= 0 ) { - $sval=sprintf($this->format,$aVal); - } - else { - $sval=sprintf($this->negformat,$aVal); - } - } - else { - $sval=$aVal; - } - - $y = $y-sign($aVal)*$this->margin; - - $this->txt->Set($sval); - $this->txt->SetPos($x,$y); - $this->txt->SetFont($this->ff,$this->fs,$this->fsize); - if( $this->valign == '' ) { - if( $aVal >= 0 ) { - $valign = "bottom"; - } - else { - $valign = "top"; - } - } - else { - $valign = $this->valign; - } - $this->txt->Align($this->halign,$valign); - - $this->txt->SetOrientation($this->angle); - if( $aVal > 0 ) { - $this->txt->SetColor($this->color); - } - else { - $this->txt->SetColor($this->negcolor); - } - $this->txt->Stroke($img); - } - } -} - -//=================================================== -// CLASS Plot -// Description: Abstract base class for all concrete plot classes -//=================================================== -class Plot { - public $numpoints=0; - public $value; - public $legend=''; - public $coords=array(); - public $color='black'; - public $hidelegend=false; - public $line_weight=1; - public $csimtargets=array(),$csimwintargets=array(); // Array of targets for CSIM - public $csimareas=''; // Resultant CSIM area tags - public $csimalts=null; // ALT:s for corresponding target - public $legendcsimtarget='',$legendcsimwintarget=''; - public $legendcsimalt=''; - protected $weight=1; - protected $center=false; - - function __construct($aDatay,$aDatax=false) { - $this->numpoints = count($aDatay); - if( $this->numpoints==0 ) { - JpGraphError::RaiseL(25121);//("Empty input data array specified for plot. Must have at least one data point."); - } - $this->coords[0]=$aDatay; - if( is_array($aDatax) ) { - $this->coords[1]=$aDatax; - $n = count($aDatax); - for( $i=0; $i < $n; ++$i ) { - if( !is_numeric($aDatax[$i]) ) { - JpGraphError::RaiseL(25070); - } - } - } - $this->value = new DisplayValue(); - } - - // Stroke the plot - // "virtual" function which must be implemented by - // the subclasses - function Stroke($aImg,$aXScale,$aYScale) { - JpGraphError::RaiseL(25122);//("JpGraph: Stroke() must be implemented by concrete subclass to class Plot"); - } - - function HideLegend($f=true) { - $this->hidelegend = $f; - } - - function DoLegend($graph) { - if( !$this->hidelegend ) - $this->Legend($graph); - } - - function StrokeDataValue($img,$aVal,$x,$y) { - $this->value->Stroke($img,$aVal,$x,$y); - } - - // Set href targets for CSIM - function SetCSIMTargets($aTargets,$aAlts='',$aWinTargets='') { - $this->csimtargets=$aTargets; - $this->csimwintargets=$aWinTargets; - $this->csimalts=$aAlts; - } - - // Get all created areas - function GetCSIMareas() { - return $this->csimareas; - } - - // "Virtual" function which gets called before any scale - // or axis are stroked used to do any plot specific adjustment - function PreStrokeAdjust($aGraph) { - if( substr($aGraph->axtype,0,4) == "text" && (isset($this->coords[1])) ) { - JpGraphError::RaiseL(25123);//("JpGraph: You can't use a text X-scale with specified X-coords. Use a \"int\" or \"lin\" scale instead."); - } - return true; - } - - // Virtual function to the the concrete plot class to make any changes to the graph - // and scale before the stroke process begins - function PreScaleSetup($aGraph) { - // Empty - } - - // Get minimum values in plot - function Min() { - if( isset($this->coords[1]) ) { - $x=$this->coords[1]; - } - else { - $x=''; - } - if( $x != '' && count($x) > 0 ) { - $xm=min($x); - } - else { - $xm=0; - } - $y=$this->coords[0]; - $cnt = count($y); - if( $cnt > 0 ) { - $i=0; - while( $i<$cnt && !is_numeric($ym=$y[$i]) ) { - $i++; - } - while( $i < $cnt) { - if( is_numeric($y[$i]) ) { - $ym=min($ym,$y[$i]); - } - ++$i; - } - } - else { - $ym=''; - } - return array($xm,$ym); - } - - // Get maximum value in plot - function Max() { - if( isset($this->coords[1]) ) { - $x=$this->coords[1]; - } - else { - $x=''; - } - - if( $x!='' && count($x) > 0 ) { - $xm=max($x); - } - else { - $xm = $this->numpoints-1; - } - $y=$this->coords[0]; - if( count($y) > 0 ) { - $cnt = count($y); - $i=0; - while( $i<$cnt && !is_numeric($ym=$y[$i]) ) { - $i++; - } - while( $i < $cnt ) { - if( is_numeric($y[$i]) ) { - $ym=max($ym,$y[$i]); - } - ++$i; - } - } - else { - $ym=''; - } - return array($xm,$ym); - } - - function SetColor($aColor) { - $this->color=$aColor; - } - - function SetLegend($aLegend,$aCSIM='',$aCSIMAlt='',$aCSIMWinTarget='') { - $this->legend = $aLegend; - $this->legendcsimtarget = $aCSIM; - $this->legendcsimwintarget = $aCSIMWinTarget; - $this->legendcsimalt = $aCSIMAlt; - } - - function SetWeight($aWeight) { - $this->weight=$aWeight; - } - - function SetLineWeight($aWeight=1) { - $this->line_weight=$aWeight; - } - - function SetCenter($aCenter=true) { - $this->center = $aCenter; - } - - // This method gets called by Graph class to plot anything that should go - // into the margin after the margin color has been set. - function StrokeMargin($aImg) { - return true; - } - - // Framework function the chance for each plot class to set a legend - function Legend($aGraph) { - if( $this->legend != '' ) { - $aGraph->legend->Add($this->legend,$this->color,'',0,$this->legendcsimtarget,$this->legendcsimalt,$this->legendcsimwintarget); - } - } - -} // Class - - -// Provide a deterministic list of new colors whenever the getColor() method -// is called. Used to automatically set colors of plots. -class ColorFactory { - - static private $iIdx = 0; - static private $iColorList = array( - 'black', - 'blue', - 'orange', - 'darkgreen', - 'red', - 'AntiqueWhite3', - 'aquamarine3', - 'azure4', - 'brown', - 'cadetblue3', - 'chartreuse4', - 'chocolate', - 'darkblue', - 'darkgoldenrod3', - 'darkorchid3', - 'darksalmon', - 'darkseagreen4', - 'deepskyblue2', - 'dodgerblue4', - 'gold3', - 'hotpink', - 'lawngreen', - 'lightcoral', - 'lightpink3', - 'lightseagreen', - 'lightslateblue', - 'mediumpurple', - 'olivedrab', - 'orangered1', - 'peru', - 'slategray', - 'yellow4', - 'springgreen2'); - static private $iNum = 33; - - static function getColor() { - if( ColorFactory::$iIdx >= ColorFactory::$iNum ) - ColorFactory::$iIdx = 0; - return ColorFactory::$iColorList[ColorFactory::$iIdx++]; - } - -} - -// -?> diff --git a/html/lib/jpgraph/jpgraph_antispam-digits.php b/html/lib/jpgraph/jpgraph_antispam-digits.php deleted file mode 100644 index c032353d68..0000000000 --- a/html/lib/jpgraph/jpgraph_antispam-digits.php +++ /dev/null @@ -1,229 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -//======================================================================= -// File: JPGRAPH_ANTISPAM.PHP -// Description: Genarate anti-spam challenge -// Created: 2004-10-07 -// Ver: $Id: jpgraph_antispam-digits.php 1106 2009-02-22 20:16:35Z ljp $ -// -// Copyright (c) Aditus Consulting. All rights reserved. -//======================================================================== - -class HandDigits { - public $digits = array(); - public $iHeight=30, $iWidth=30; - - function __construct() { - //========================================================== - // d6-small.jpg - //========================================================== - $this->digits['6'][0]= 645 ; - $this->digits['6'][1]= - '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. - 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. - 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAEBAAMBAAAAAAAAAAAAAAAABgMEBwX/xAAvEAABAwMC'. - 'BAQEBwAAAAAAAAABAgMEAAURBiESIjFRBxMUQRUWMmFTYnGRkrHC/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAEC/8QAFhEBAQEAAAAA'. - 'AAAAAAAAAAAAAAER/9oADAMBAAIRAxEAPwDslwiR3oDku8ONttsAvDiVyMcO/ET7ke5/aoOz6k1Vr5htNjW7a7M1yO3NTQU9JUDu'. - 'GgrlSn8xyf6p4gXaHJvNps9/mKZtSkGdMjRwpfqAFBLLACRlZUrJONsI2717No1lbZ10kx7XGnRpKWQ/6GVGMfzEJ5VFIVtsOH6e'. - 'wyKVhYsia0y22pLThSkJK1uniVgdThOM0ol+StIUhpopIyCFq3H8aUVCwnG3PGe4Rp6fLXJtMdyM0ojcIWvIz3HFnAPfrWTXb6GN'. - 'WaLXDwZjVz8pKEfhuIUFg/bAz9sVJ61nt61mxJFslLtq7e5yPqiBT4UDklKw4MDpt+u+9bFiu9riXNu83R+fcr6tohuQ5HQhmK37'. - 'paaC8DruScmg6X8KkjZEhbaB9KEyFYSOw26Uqd+e7Qerl5z74DY/1SomP//Z' ; - - //========================================================== - // d2-small.jpg - //========================================================== - $this->digits['2'][0]= 606 ; - $this->digits['2'][1]= - '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. - 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. - 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEQMBIgACEQEDEQH/xAAYAAEBAQEBAAAAAAAAAAAAAAAFAAQHAv/EACsQAAEDBAEC'. - 'BAYDAAAAAAAAAAIBAwQABQYRIRIxQVFhcQcTFSJSU5GU0f/EABcBAAMBAAAAAAAAAAAAAAAAAAECAwT/xAAZEQACAwEAAAAAAAAA'. - 'AAAAAAAAARESUUH/2gAMAwEAAhEDEQA/AOqXm/Q8dxmOL4PPSnCSNFixx6nXnkXgRT3Te17JWbGsveueSyLZdbPItNxOKLzTLjou'. - 'gYCSoSoY8ISKSbFeUrzkdlnTL1YshskiErkQnFEZaF8kkdBBVdjyi6RNL5+9F486eS/ECVkcBtDt1vZcho5viS8ZCp9C9tAIAm/F'. - 'VoPRU+HRtJ5JVRP1kP0PfwP+1VKrHBMliXG4Nw8VgE4xGkuqk2S1wTUNEVdIvgpL9iL6KtNxY7WOwo9tt0RCitj0sR2uCbFPPzH1'. - '7+6rRuSRcljMBMsUy2tky045KOawZk5xtEFBJEROO3hx61kh2rPCIX3MhsyC4QmfTbC6lH8dq5212qwkiG5H6Y/9R2qm+ofxqqsL'. - 'DLZ6f//Z' ; - - //========================================================== - // d9-small.jpg - //========================================================== - $this->digits['9'][0]= 680 ; - $this->digits['9'][1]= - '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. - 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. - 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABAUGBwP/xAArEAABAwMD'. - 'AgYBBQAAAAAAAAABAgMEBQYRABIhE1EUIjEzQUIHMlJhcdH/xAAWAQEBAQAAAAAAAAAAAAAAAAACAQD/xAAYEQEAAwEAAAAAAAAA'. - 'AAAAAAAAAREhQf/aAAwDAQACEQMRAD8AkK7brF6X7XpMeGoKhFMLEeT4ZUheEhanF4OcZ2pTgDykk92bZpdCsi7aezLjxkIPUZiV'. - 'RSCy8hah7EkZ27yM7V+iscal5bE22Lon1qNDmSKROd8Sl+Ix1lMOlIS4HGgQpbStoUCnlJz8HmsXtW3Lst2rmBAelLMRRekOwnYz'. - 'Edls9QKKnOVLyk7UgcbzzrdBthqEJJwZbAI4x1U/7o1TaFa9lG36aXaZTy54VrcXUgrzsGdx+T30aNydweqVw1GS87T6Lb86Q4ha'. - 'my/IAYjZBx+snKk99oOQMf1AViE65SY348hzFy6hPKnqtKz7DC1lbqyPrvJKUJ7H+M6Wrt3InP7o1brFNp4bCDGhxGAsqz69VSiQ'. - 'ORwBxrrQ7itm1ac7Hp0WoGTIc3PSn0pccdcP2WorycfA1RaRHjxosZqOyhtDTSAhCf2gDAGjVHTd9sKSCumynFEZK1tIJUe58/ro'. - '1V1//9k=' ; - - //========================================================== - // d5-small.jpg - //========================================================== - $this->digits['5'][0]= 632 ; - $this->digits['5'][1]= - '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. - 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. - 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABgIFBwT/xAAoEAABAwME'. - 'AQQCAwAAAAAAAAABAgMEBQYRABIhIkEUMVFhBxNCgaH/xAAVAQEBAAAAAAAAAAAAAAAAAAAAAv/EABcRAQEBAQAAAAAAAAAAAAAA'. - 'AAABEUH/2gAMAwEAAhEDEQA/ANGvW4YVOeiRX5b4mv5Sin05IdlupPKdo/j2SO3+6TbPNQvOsTVz33KRT4csR3YUF7Dsh5OSFvug'. - 'kqG4FPBxnjxpvvi4KZb1pTpU+QwxUi2Y7ZIAefUk5ATxnB9/gbtL/wCH1UpuhPUlZlMVaQ0mS8zJjqZOPfc2TwpIUonI9tw40R1r'. - 'WNGq/wBdJR1XT3lqHBUnGCfkfWjRWs1ve249erQqQYjOtN1FqPUpCXQ4WIzQSsJwT0UpRwQPG0nzqyuNHobjsl9kBuWqoOoXtT1/'. - 'WppZcA8lKRj64HxqU+3KpAr6plElRVKef3S4E0K9O8pLXVzKcqSsJAB9wSAca6bSoNXeuA1+5pEV+SGFNU1iKVFqI0Vdx2AJUeoz'. - '8DGlTDwG3CAf3q/pI0ah6MDhLz6U+EpXwPoaNMU//9k=' ; - - //========================================================== - // d1-small.jpg - //========================================================== - $this->digits['1'][0]= 646 ; - $this->digits['1'][1]= - '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. - 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. - 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEwMBIgACEQEDEQH/xAAZAAADAAMAAAAAAAAAAAAAAAAABQYCBAf/xAApEAACAQMD'. - 'AwQBBQAAAAAAAAABAgMEBREABiESMUEHEyJRkSNCYXGB/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAEC/8QAFxEBAQEBAAAAAAAAAAAA'. - 'AAAAAAEREv/aAAwDAQACEQMRAD8A6jdd4WLbstILnc4Uq0VoWpkJknb6IjXLHJUePOlez923fcW4r1SxWlqC2UbdKirQif3Xw3yA'. - 'OFAGT09/kO3OmV3a20MFRf6lIYPcpy7yRRAzgxjIy2M8YwcdiBzpX6d22VNvUlTXsFkuwkrKqNSfnK7F8OTzwrAY+l5zoxKskudN'. - 'EgQPUT9PBkWF3DH+1GPxo1mLnRoAqF2VRgGOFmX/AAgY/GjRUP6hVMFv2FuFqUvUGrpDFJMBnpdyF5bsAQew7Hxzp6LZNT0yQ1DI'. - 'wp0QCFBhD0jCsfLZHxbx5xxpTuvb1+v9PV7Ztk9roLPLCjmSSN3mX5ZwqjCgZX7PfWxDQb2in96pv9qq46aTE0bW4x9ceAWAYPwS'. - 'PsYzoixgmheBGjIVcYCnjp/jHjHbRpe1JLn9OnopE/a0ykvjwDx47aNMXqP/2Q==' ; - - //========================================================== - // d8-small.jpg - //========================================================== - $this->digits['8'][0]= 694 ; - $this->digits['8'][1]= - '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. - 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. - 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AFQMBIgACEQEDEQH/xAAYAAADAQEAAAAAAAAAAAAAAAAABgcEBf/EACsQAAEDAwMD'. - 'AwMFAAAAAAAAAAECAwQFBhEAEiEUMVEHE0EVYYEiIzJCsf/EABYBAQEBAAAAAAAAAAAAAAAAAAIAAf/EABcRAQEBAQAAAAAAAAAA'. - 'AAAAAAABERL/2gAMAwEAAhEDEQA/AKL6gVVUa0i1T5QjvTprUJMlxW4R9zgQXe/AH+kaWrntqlWjaq7gpcmotXAw82ht9yY4tch8'. - 'uAFC0k7VBXPGMY51ruiaue+bThIj+7NbWqS+7HDxajFf6AlB/k44o8ZOABk4xkL0X0tZiojKrlRuGRJjugqldSlKGf6t7BuUQe3J'. - '44xxxrA1a4KVJipLidri8uLHgqOcfjOPxo0o2hdDvS1CmV2Yl6fS5ioipIQR1CAlKkLKR2UUqAI8g6NRSwuuyHab6s1ufLI/Zai7'. - 'UBJOxhTS0+6B32pWSFH4CidOdWU0ukLiN1BLr0zG5Sdm3GRvcPhIT858DvjXNrVsSLnm/VIdTXS6tTnFsxZTSN3jchaTwps+O/z9'. - 'tcBVq3hIX0tYqlIiQHdy5CqRHKHXEjAOMgBKjnvyRk4xrQa7OiGt1K5biYZL8SoVEpjOqkFsONtJCNwASeCQrn7aNUKnQYtLp7EC'. - 'EylmLHQltptPZKQOBo1FzH//2Q==' ; - - //========================================================== - // d4-small.jpg - //========================================================== - $this->digits['4'][0]= 643 ; - $this->digits['4'][1]= - '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. - 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. - 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAYAAADAQEAAAAAAAAAAAAAAAAABAYHAv/EAC0QAAIBAwQA'. - 'BAMJAAAAAAAAAAECAwQFEQAGEiETFDFBUmGBByIjUVNxobHR/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAIB/8QAGBEBAAMBAAAAAAAA'. - 'AAAAAAAAAAERIVH/2gAMAwEAAhEDEQA/ANjM00Nxmt1xiWW31CZp5uJwoAAaOQ/n7qfcZHqO5my3q5XX7R6ijiqnNut9u4NyJ4yv'. - 'JJyjYr8Xhrn5g599J7x3ulBNU7Zo7dXXXcLQ8kURYi4epYtkALjOePv1nUvbLvV7P3BZm3DR3eh88Kp7pVzBZI6iUhGWRRGWwE44'. - 'HX3V+uiL1uHgt+vL/H+aNJQ3CSeCOaFqSaJ1DJKs/TqRkMOvQjvRorHE4pRDLNWLGlRHGUeYIORXs9e5B7OP31E0fmdyb/t0DJ4Q'. - '27bfx3YZzPUIoAAz7IpOD6cuxq0uNumqLfVNDOqXBoZEjnZcqhIPXH4c46+WkdoWOltu3IDDLLLVVR83UVcuPEmmcZZ2/rHoAANG'. - 'GI7KIY1ijoLeEQBVCwIoAHpgY6Hy0aZe7mJ2jeHLKcEhusj6aNKgzr//2Q==' ; - - //========================================================== - // d7-small.jpg - //========================================================== - $this->digits['7'][0]= 658 ; - $this->digits['7'][1]= - '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. - 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. - 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABgEFBwT/xAAuEAABAwIE'. - 'BAQGAwAAAAAAAAABAgMEBREABiExEhMiQSMyUXEHFBclVJFhk9L/xAAXAQADAQAAAAAAAAAAAAAAAAAAAQID/8QAGREBAQEAAwAA'. - 'AAAAAAAAAAAAAAEREiFR/9oADAMBAAIRAxEAPwDXq9mCjZeQ05VZ5ZST4bfEpa3VdglCbqUe+g9MZ5Uq7V8415WXoMSdQ6etgSps'. - '19wpkCMDZKUpv0FZvbi1NzpYasMDLDUbMVXrtQdbeeU23xLWkj5RlLYK0J7anW9gbAjCzkOtsVSUJUdtc6dVZK51UeaFm4LKbhpC'. - 'l7EhIFkDW974GbRI2XorUVls1OTdKAOqUpR0Hc3198GITQ6k+hLwrEpoODiDenRfW23bBicg78JXxPpD0mgVOW5PAivNNpahsPW5'. - '8xxQaSVkboQnhsnYm5OHqDGp1IpsalMKjMsMIC3+XZKbJFth62/QOEfMOZqZXp9JcKZTcGmTky3meSi7xQklI81vMR+sXIz/AEgp'. - 'Q0qPNu6ea8Q2jqtbp8+2w9h/OKORc/cpHjt1dDSHOtLZ4ekHW23bBjj+o9H/AB539aP94MG0+L//2Q==' ; - - //========================================================== - // d3-small.jpg - //========================================================== - $this->digits['3'][0]= 662 ; - $this->digits['3'][1]= - '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. - 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. - 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABAUGBwL/xAArEAABBAED'. - 'AwMDBQEAAAAAAAABAgMEBREABhIhMUEiMmETFZEHFkJDUdH/xAAWAQEBAQAAAAAAAAAAAAAAAAABAAL/xAAYEQEBAQEBAAAAAAAA'. - 'AAAAAAAAEQExQf/aAAwDAQACEQMRAD8A0vclruBdk3VVLLUNssGRJsZSCtqOjlgJAHvcOD6c4HnOdIbcttw1W5P29cFEhuawqTXS'. - 'VsJjnCMBxKkJJx7goAde+ceJfdNxU0UNlyymyXHi6kxWUNl1S3EnkAEIHX2nv86qtTuZr9Q9+1VhRsOoYpYcgSVyAE/TdewkJxnK'. - 'sBCjkdPGpnOtFMd3PqsXgfOAgD8Y0aX+11H9rDDjn8lr9yj5J+dGqsqxaw6Cc9cQZU4Sp7zTJsIrKlcUEKwhSin1JABI45GUjqOu'. - 'lbOvjbc3Ts9ynjGCy445UuFLYRzbWgrT6fhSCQSMDke+pew2zYVly/d7YchNqkMJZnQpgV9J8IzwWFJyUrAJHYgjvpLbu37G5nR7'. - 'vck5C3YRKYEOEVJZj8kjKypXqWvirjk9h+dB9i4faa89TDZUfKlIyT8k+To10a6KTkpcJ/0vL/7o0TS//9k=' ; - } -} - -class AntiSpam { - - var $iNumber=''; - - function __construct($aNumber='') { - $this->iNumber = $aNumber; - } - - function Rand($aLen) { - $d=''; - for($i=0; $i < $aLen; ++$i) { - $d .= rand(1,9); - } - $this->iNumber = $d; - return $d; - } - - function Stroke() { - - $n=strlen($this->iNumber); - for($i=0; $i < $n; ++$i ) { - if( !is_numeric($this->iNumber[$i]) || $this->iNumber[$i]==0 ) { - return false; - } - } - - $dd = new HandDigits(); - $n = strlen($this->iNumber); - $img = @imagecreatetruecolor($n*$dd->iWidth, $dd->iHeight); - if( $img < 1 ) { - return false; - } - $start=0; - for($i=0; $i < $n; ++$i ) { - $size = $dd->digits[$this->iNumber[$i]][0]; - $dimg = imagecreatefromstring(base64_decode($dd->digits[$this->iNumber[$i]][1])); - imagecopy($img,$dimg,$start,0,0,0,imagesx($dimg), $dd->iHeight); - $start += imagesx($dimg); - } - $resimg = @imagecreatetruecolor($start+4, $dd->iHeight+4); - if( $resimg < 1 ) { - return false; - } - imagecopy($resimg,$img,2,2,0,0,$start, $dd->iHeight); - header("Content-type: image/jpeg"); - imagejpeg($resimg); - return true; - } -} - -?> diff --git a/html/lib/jpgraph/jpgraph_antispam.php b/html/lib/jpgraph/jpgraph_antispam.php deleted file mode 100644 index ed2b1737ee..0000000000 --- a/html/lib/jpgraph/jpgraph_antispam.php +++ /dev/null @@ -1,639 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -//======================================================================= -// File: JPGRAPH_ANTISPAM.PHP -// Description: Genarate anti-spam challenge -// Created: 2004-10-07 -// Ver: $Id: jpgraph_antispam.php 1106 2009-02-22 20:16:35Z ljp $ -// -// Copyright (c) Aditus Consulting. All rights reserved. -//======================================================================== - -class HandDigits { - public $chars = array(); - public $iHeight=30, $iWidth=30; - - function __construct() { - - //========================================================== - // lj-small.jpg - //========================================================== - $this->chars['j'][0]= 658 ; - $this->chars['j'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. -'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjL/wAARCAAeABUDASIAAhEBAxEB/8QAGAAAAwEBAAAAAAAAAAAAAAAAAAUGBAf/xAAsEAACAQMDAwMBCQAAAAAAAAAB'. -'AgMEBREAEjEGIUEUUXGBBxMVIiNSYWKC/8QAFgEBAQEAAAAAAAAAAAAAAAAAAwEC/8QAGhEAAwADAQAAAAAAAAAAAAAAAAECERIh'. -'Mv/aAAwDAQACEQMRAD8A6veK2st8zRWSyV1dUBfvHaGVI4hknsS7AFv4AyM57ayWbqeS+11xtT2etttwo4YqhEqnQs5bcAfyk4AZ'. -'SOeD441TKRTyingUBG4/ah8j684+dSFzh/BvtaslejMUu9DPQTDnLx4lQ/ONw1TGBm0jdRWqguEMghEisWilgDmNs4Ze+MEEEH40'. -'aUVFTa7JeLjRXu4GjhmnNbSfqFQVlA3rkckOjH/Q99Glmkl0C/Q06pvsvT9vttXHDF6T1KrWbs5gRgQJM+FDlQxPhjpF1XcVq+qe'. -'jEoKiOecXBqh2TDDYIXLKuP6549xk8auI6aJqV45oknWdNswkAIkGMYIxjGO2NR1F0LZY5qkWqkS1xrM0M8lMSJpY+TGrnJiQ577'. -'cEgeNHhi7D3qC3UN69M8tIakRhgrh9o748+eNGtcCiKjjpkQKlMTEg3ZwoxtHHtgfTRpYXArvp//2Q==' ; - - //========================================================== - // lf-small.jpg - //========================================================== - $this->chars['f'][0]= 633 ; - $this->chars['f'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. -'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjL/wAARCAAeABcDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAQFBgcC/8QAKxAAAgEDAwMCBQUAAAAAAAAA'. -'AQIDBBEhAAUGEjFBEyIHFFFhoRUzYnGS/8QAFQEBAQAAAAAAAAAAAAAAAAAAAQP/xAAaEQACAwEBAAAAAAAAAAAAAAAAAQIRMRIh'. -'/9oADAMBAAIRAxEAPwDcnmLoIkiSYsouC3tA++O2lU9WkqVjJ+YdhZLsQI/4/YfQm50kZP0vbmaCSU0SRNIH6sghb9INs3t38dvp'. -'akUuz8x5DwdN5peS1jV1dSipSiVUigIcdQjQ26lIB/c6r3F86SZpE/zCFJaqsihQNhRgdj3Jyfxo0jDSbXHt9Oph9RAoV3qJGltY'. -'HDOxyb/nRpV0D3RXle21m48XraOk3IUSemUaV4g4Zc9ShcDtgff+tQfwvjq34Dtku7buamFqeJKemCCMxKFsEJU+/FrX8d76sEHG'. -'aNItzr4usVNdG3S0rmRYAVwEUmyjyQLZ11x7aF4zs9DQOyzml29I2cLa/pixIHi99DFCtU9dFuLIaijo9qiYPmR2mZmB9thgAHOD'. -'4+mjUrURyrUNMZFEkkIOFuFAbsP9d/OjVIQ6Vh4tP//Z' ; - - //========================================================== - // lb-small.jpg - //========================================================== - $this->chars['b'][0]= 645 ; - $this->chars['b'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. -'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjL/wAARCAAeABUDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAYCAwUH/8QAKxAAAQMDAwMDAwUAAAAAAAAA'. -'AQIDBAAFEQYSIRMxUSJBYQcVI2JxgqHw/8QAFQEBAQAAAAAAAAAAAAAAAAAAAQL/xAAYEQEBAQEBAAAAAAAAAAAAAAAAATERYf/a'. -'AAwDAQACEQMRAD8A6H95mxNYwLXcX+pCuilSLXJ6YSplaUELjqxwe4IJ5PIPamJ2V0bPcS7+NxCX1cHggAnIP+xSd9RyzHh2m7FQ'. -'Q1CvMNQWTjCt+HFD+PB/Y1fI1PL1HFFt0zaGblFdJQ9cJjpZiqPJUlBAKnPcEpGB5NNRKdrOl1NlgiQol4R2w4Sc5VtGf7opZteo'. -'LhdorjUSM5FnQnlR50NeHQysYxtVxlJHIPgjtRRD3xkaghs6juumdHz4+Y7RVPnt59K2mk7W+fcKWsZ7djTXMkW+xMP3GRJjwIEN'. -'HTG/CWx5wPY8AADx2NYk3SL9wukvUjGobnBkORksIbjdMANozgEqSo8qJPGO/wAVO36IsjUmBIfZfuM7epZk3F9UhSSk5O0K9Kcq'. -'8AcU3UzFuhUSBFud6nRXoz96mqmJZWg7m2dqUNhWBwdqQSP1UU5c/FFCn//Z' ; - - //========================================================== - // d6-small.jpg - //========================================================== - $this->chars['6'][0]= 645 ; - $this->chars['6'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. -'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAEBAAMBAAAAAAAAAAAAAAAABgMEBwX/xAAvEAABAwMC'. -'BAQEBwAAAAAAAAABAgMEAAURBiESIjFRBxMUQRUWMmFTYnGRkrHC/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAEC/8QAFhEBAQEAAAAA'. -'AAAAAAAAAAAAAAER/9oADAMBAAIRAxEAPwDslwiR3oDku8ONttsAvDiVyMcO/ET7ke5/aoOz6k1Vr5htNjW7a7M1yO3NTQU9JUDu'. -'GgrlSn8xyf6p4gXaHJvNps9/mKZtSkGdMjRwpfqAFBLLACRlZUrJONsI2717No1lbZ10kx7XGnRpKWQ/6GVGMfzEJ5VFIVtsOH6e'. -'wyKVhYsia0y22pLThSkJK1uniVgdThOM0ol+StIUhpopIyCFq3H8aUVCwnG3PGe4Rp6fLXJtMdyM0ojcIWvIz3HFnAPfrWTXb6GN'. -'WaLXDwZjVz8pKEfhuIUFg/bAz9sVJ61nt61mxJFslLtq7e5yPqiBT4UDklKw4MDpt+u+9bFiu9riXNu83R+fcr6tohuQ5HQhmK37'. -'paaC8DruScmg6X8KkjZEhbaB9KEyFYSOw26Uqd+e7Qerl5z74DY/1SomP//Z' ; - - //========================================================== - // lx-small.jpg - //========================================================== - $this->chars['x'][0]= 650 ; - $this->chars['x'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. -'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjL/wAARCAAeABMDASIAAhEBAxEB/8QAGAAAAwEBAAAAAAAAAAAAAAAAAAUHBgj/xAApEAABAwMDAwQCAwAAAAAAAAAB'. -'AgMEBQYRACFBBxIxFCJRgRNxkcHw/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAH/xAAWEQEBAQAAAAAAAAAAAAAAAAAAEQH/2gAMAwEA'. -'AhEDEQA/AH9t3pKvO14UykVARa/HfAlxlDKXR24V2p3z7RlPwdtMep91uWdRGHWELjuTFFtLvcC4SNznnH+21O7ttiodOq1BvC0E'. -'p9I0lSX2kgqCSklK+5PKCMAng6zV2XRO6u3lSIURtbDRShltlZHa0tW7q/0MeTwnjxq1Jiw2xc9xTLbhSVU5iaXUFfqFFILgJOCd'. -'9Gt3SXabR6REpkL8yo0RpLCFNx1qBCRjOQMHxo0pEr6o3um2LVYpMEpTVqg25lHn08dfcB9kEgfZ1LIFDuawqZRb7aQlLTzqglsg'. -'9wQdveOEqBIB425xqhQuk8qo9UKlPrlRblw2ZBeCSVKW6CcoSrI2AGOT41SKzT4dYtmdS5bIXDZhNoWgbZJ94x8AYT/GkM03oNUc'. -'uKgwqtTZDTMOU0FttqRkoHggnPkEEHRrkJ6t1SlSHYUOc6zHaWrsbQrATk5/vRqK/9k=' ; - - //========================================================== - // d2-small.jpg - //========================================================== - $this->chars['2'][0]= 606 ; - $this->chars['2'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. -'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEQMBIgACEQEDEQH/xAAYAAEBAQEBAAAAAAAAAAAAAAAFAAQHAv/EACsQAAEDBAEC'. -'BAYDAAAAAAAAAAIBAwQABQYRIRIxQVFhcQcTFSJSU5GU0f/EABcBAAMBAAAAAAAAAAAAAAAAAAECAwT/xAAZEQACAwEAAAAAAAAA'. -'AAAAAAAAARESUUH/2gAMAwEAAhEDEQA/AOqXm/Q8dxmOL4PPSnCSNFixx6nXnkXgRT3Te17JWbGsveueSyLZdbPItNxOKLzTLjou'. -'gYCSoSoY8ISKSbFeUrzkdlnTL1YshskiErkQnFEZaF8kkdBBVdjyi6RNL5+9F486eS/ECVkcBtDt1vZcho5viS8ZCp9C9tAIAm/F'. -'VoPRU+HRtJ5JVRP1kP0PfwP+1VKrHBMliXG4Nw8VgE4xGkuqk2S1wTUNEVdIvgpL9iL6KtNxY7WOwo9tt0RCitj0sR2uCbFPPzH1'. -'7+6rRuSRcljMBMsUy2tky045KOawZk5xtEFBJEROO3hx61kh2rPCIX3MhsyC4QmfTbC6lH8dq5212qwkiG5H6Y/9R2qm+ofxqqsL'. -'DLZ6f//Z' ; - - //========================================================== - // lm-small.jpg - //========================================================== - $this->chars['m'][0]= 649 ; - $this->chars['m'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. -'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjL/wAARCAAeABcDASIAAhEBAxEB/8QAGgAAAgMBAQAAAAAAAAAAAAAAAAcDBAUCBv/EAC0QAAICAQMCBAMJAAAAAAAA'. -'AAECAwQRAAUSBiETMVFhB2KhFSIyQVJxgZHB/8QAFgEBAQEAAAAAAAAAAAAAAAAAAgED/8QAGREBAQEAAwAAAAAAAAAAAAAAAQAR'. -'EiEx/9oADAMBAAIRAxEAPwB0MI2lIdgI0Cly3kFXLEn2zx1FDdp7rbpbjUtRWKio3hyxOGQllJzkegX66rQ2qW87Zuk9S5FNVmru'. -'iywyBhjDKTkeXfSr+GRfYtq2KAO32b1BGxAZu0dyJ2DKPTxY1wPddVszycUq2Golq8jRWbcnJWwCVGMjz+VQP50atxMtm2ZUOY4l'. -'4qfUnBP0x/Z0amy4jJm10Tt2yddWasFmfaRfdrlG3UcgArnxKzJ+Fu4DqCMkcgNem2DoWav8PLfTm+FPEkuSNTnqueS5bnHIv6CG'. -'LNjJwM99bm67NB1Ht89KSxNXnr2hNDbiUc47K4KyD2GQMfmMjUnS+7vuIktTqPCaaWCqAMMojPFyw8hyYMQBnAwNJHYGXPTsW9VN'. -'jg2zf50W9zk524GAEihuz+xbIOD82jW5TkjtRPZkTkJ+4VgDhQfuj/f3OjUxl1f/2Q==' ; - - //========================================================== - // lt-small.jpg - //========================================================== - $this->chars['t'][0]= 648 ; - $this->chars['t'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. -'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjL/wAARCAAeABcDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAQDBQYH/8QAJxAAAQMDAgYDAQEAAAAAAAAA'. -'AQIDBAUGEQASEyExQVFhIjJxFSP/xAAWAQEBAQAAAAAAAAAAAAAAAAABAAP/xAAZEQADAQEBAAAAAAAAAAAAAAAAAREhMUH/2gAM'. -'AwEAAhEDEQA/AO4BLEiEy7uG4IGxxs5IOOx76wd2XYidSp1HoD70240gcNNPbDyI6wQQpaz8E9MczkdhqtbsKYLieDk6WLKmZmmL'. -'Hk7AHVkbkLI+RQc7uRxgkfr1tx2rGu6VbToLVKkhU+kbugGf9WfaknCk5ycaX0zmaa+3JkqvW/CmzojsB9xoF6OoFK0r6HOcEDI0'. -'aefTuKX5ScMdC14HYq8n12zo1DEUcKTGg1Z+hyBwoPBVIiA/VQyOIgedhUCB4WMfXSV3UufVLcTUIqVf26K6mXDbPVRRzKT54iMg'. -'+zjtq6mtsyJjclxpKlUhSXEbkgkqWnBx4+J5e/zU0pZemPvJJQzEPDfQOrwwFY9AZ5eeYPLV6FwhoFYZuigxpkJeIjqAeIoAk9wA'. -'D46EnuD+6Nc1smDNrTlRkxqtMo1vzKhIdYgU9YDqVpISrLhHxSSd21I0aYyqP//Z' ; - - //========================================================== - // li-small.jpg - //========================================================== - $this->chars['i'][0]= 639 ; - $this->chars['i'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. -'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjL/wAARCAAeABYDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAABwAGBP/EACcQAAEEAQMEAgIDAAAAAAAAAAEC'. -'AwQRBQAGEiExQVEHExSBFWFx/8QAFgEBAQEAAAAAAAAAAAAAAAAAAgMB/8QAGBEBAQEBAQAAAAAAAAAAAAAAAAECMRH/2gAMAwEA'. -'AhEDEQA/AE7c+5M9BeRG29t1WUfKFFYW+GvrI7WD3B9g140YD5T36rcErDjbUR6dCBdejsKUpxITXI2FUrooCh70yvxzHyIlMvuK'. -'eVSH7IKEpJoKqu/ahddLryR/aMiO187bsmrWShhp1AZS2XHHrWhNJrzdf7f7GiVcHk3sptmHkJcJ2DIftS2FrKlJPXudWuLGYeQp'. -'t2fmEIckqIZaaKuSGG0lQ4gduRoFRHQ9AOgs2lOJbk9aSUlpjGvAWeSVH2VKq/2dFPw3IjyJe8s281ct3I9UoHJXGiQkD2STrSZ7'. -'Yf8AOl7JTdw5eOCz0jw3+LbYCfA9nz71msb8KMxoTGTw+5srjsipAdDqFBQBIuiOl6KrdYyJMyTCshlw2G3Fr/HiNqNNAqJJUoGl'. -'KND+h47km1bZwsvCbYYjycxIyK1qDv2yEi0hQviK8atKDcy9j//Z' ; - - - //========================================================== - // lp-small.jpg - //========================================================== - $this->chars['p'][0]= 700 ; - $this->chars['p'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. -'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjL/wAARCAAeABcDASIAAhEBAxEB/8QAGgAAAQUBAAAAAAAAAAAAAAAAAAECBAUGB//EAC8QAAEDAwMCBAMJAAAAAAAA'. -'AAECAwQFESEABhIiMRMVUWEHFEEWIzIzcYGRocH/xAAWAQEBAQAAAAAAAAAAAAAAAAADAgH/xAAcEQACAgIDAAAAAAAAAAAAAAAA'. -'AQIxAxESIUH/2gAMAwEAAhEDEQA/AOh703xG21DMeOyqoVNDjSzERiwU6Ep5qtZNycA97HTF13d33KWtmlt9xwkLl1NkXVxIuQgK'. -'wLj+hqBvel0qmbR8GnR22nJNZiLeeKr8nDIT1OLJucX+uPbWom7iocRpafOac5MX1ALltp/Cbi+cJH++utdh+WVNL3PNdNYpdWgx'. -'Y0qmLZSrwJJcQoOJ5XKlJFu4HbJOjVbt+V5nu7eopNRivqcdhK+bFnWwA1Y2AOcgjvj9dGlxy0g5y0xd+hNXoG24C4obizq3HZUh'. -'YHqtRHD06bG/8a0MbbG1mqekxaBSGmgkrcdcitlLfrckZIz7DUatbeFak0tyRLUwzT5vmiGm0cufEkFBJItfkD+59tKmiO12atFa'. -'eQukO3ejUxgENqTcfnE5WbkHiOnJ76N2IqI1DibabptS+zkZhtp90F2Y0S026EkAFK/qL46cXv65NVZDfxHmVCK4DE2/RX/lRFbA'. -'C5LwAyq2EtpHZI7mxPYDRqoctdESimz/2Q==' ; - - //========================================================== - // le-small.jpg - //========================================================== - $this->chars['e'][0]= 700 ; - $this->chars['e'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. -'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjL/wAARCAAeABgDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAYEBQcB/8QAKhAAAQMCBAUEAwEAAAAAAAAA'. -'AgEDBAURAAYSIQciMTJBE0JRYRQVFoH/xAAXAQEBAQEAAAAAAAAAAAAAAAAAAgED/8QAGREAAwEBAQAAAAAAAAAAAAAAAAERAjFB'. -'/9oADAMBAAIRAxEAPwDTszvhEYCoS80BTm2bCjQRwdAzVe2yopkpJtpRUVfjEIc4V2oMerByg5Ji30oMyS3GeMunK0upfnu09MdJ'. -'p2scTmWnnGfx6HThktgLfKj7xEOqyr7QBbL41LhBzpxbcOru0LKDLdSnOHoaltNqSC4qWL0x9xbJYum69caczSaHmGmTmpDUYn4l'. -'UiqjkynzAVtwV23Ud+X4Ibpa2DCPkjhfUaRO/p8yzpb+YHhUmhbev6ZEll1lvqK3jt2XrbBgp6HVwsK3THpfEubGSoOUyFMpbJmL'. -'Deh6SgOGKti57EuY6l62JMWdJy7k3hg1LkOozEbVm7suQSkTiKtkEfP1pH664Za/QItccgI4bseTHdNxiXHLQ8yVl7V32XyioqL5'. -'TGc1ng6eYs0idczXUZscBBABWgEhEtfKNuUezwPnBhEuj8X2M21z9BR6NUX211Kk/UKKAjuhkPhL7XVf8vtgw7UPJlEyrDWFSYLb'. -'LBNF6qrzG6t0spEu6+fpL7YMXhUndp//2Q==' ; - - //========================================================== - // la-small.jpg - //========================================================== - $this->chars['a'][0]= 730 ; - $this->chars['a'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. -'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjL/wAARCAAeABoDASIAAhEBAxEB/8QAGAABAAMBAAAAAAAAAAAAAAAABgMEBwX/xAAvEAABAwIFAQcCBwAAAAAAAAAB'. -'AgMEBREAEiExQQYHFBUiUXGBE2EyQkNSgpHh/8QAFwEBAQEBAAAAAAAAAAAAAAAAAAMBAv/EABkRAAMBAQEAAAAAAAAAAAAAAAAB'. -'IQIRMf/aAAwDAQACEQMRAD8AfdQ1pxjqZMSn0mRUZRYDaklJCE3OawO2ttTxY4hl07qFMVs1Ku02kpPnRGhsAqz8W9T9wDjozq6o'. -'Q1lDrcZLGVcmUoZg0obpufxK3Ftt9ccqB1GgBcmLSqtVEqOZcr6ARm/kbXHt7DEtc7WTJKTJqEWvRKfLqL9QplSjuPtGVYOJKBrm'. -'t+U+n94WGStZzNypmRWqckUKTbixy6jAfxPxHtCgKqFNlU5huK6pLMndSlegG4J45N8aKmTMKQRBsCNMzwB+RbHWHGEAZlPZX2hx'. -'qZIC34ygZoYUbB50JSkFXFhZR9BrpheR4fIbQ6gvurJ7q02bIQTuAOAN8x40HAxRr3TrNRpBmSHVt1KMlTyJTCsqkKAPlSf28W+c'. -'UGaD1c9HSR1HFUh9tJU45EBcAtcC9+P9wqbg8IAto9o81yputrVGpiUkgHKkqUTZI32+cKm1z1tIUgPBBAKQ4UBQH3uL3xmXSXep'. -'HVDtXStE5K5jlPU7PF3Q41+okJFkjgC+3OuNSYiSzHaLtRcW4UDMpLYSCbakDW3thhum5p//2Q==' ; - - //========================================================== - // d9-small.jpg - //========================================================== - $this->chars['9'][0]= 680 ; - $this->chars['9'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. -'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABAUGBwP/xAArEAABAwMD'. -'AgYBBQAAAAAAAAABAgMEBQYRABIhE1EUIjEzQUIHMlJhcdH/xAAWAQEBAQAAAAAAAAAAAAAAAAACAQD/xAAYEQEAAwEAAAAAAAAA'. -'AAAAAAAAAREhQf/aAAwDAQACEQMRAD8AkK7brF6X7XpMeGoKhFMLEeT4ZUheEhanF4OcZ2pTgDykk92bZpdCsi7aezLjxkIPUZiV'. -'RSCy8hah7EkZ27yM7V+iscal5bE22Lon1qNDmSKROd8Sl+Ix1lMOlIS4HGgQpbStoUCnlJz8HmsXtW3Lst2rmBAelLMRRekOwnYz'. -'Edls9QKKnOVLyk7UgcbzzrdBthqEJJwZbAI4x1U/7o1TaFa9lG36aXaZTy54VrcXUgrzsGdx+T30aNydweqVw1GS87T6Lb86Q4ha'. -'my/IAYjZBx+snKk99oOQMf1AViE65SY348hzFy6hPKnqtKz7DC1lbqyPrvJKUJ7H+M6Wrt3InP7o1brFNp4bCDGhxGAsqz69VSiQ'. -'ORwBxrrQ7itm1ac7Hp0WoGTIc3PSn0pccdcP2WorycfA1RaRHjxosZqOyhtDTSAhCf2gDAGjVHTd9sKSCumynFEZK1tIJUe58/ro'. -'1V1//9k=' ; - - //========================================================== - // d5-small.jpg - //========================================================== - $this->chars['5'][0]= 632 ; - $this->chars['5'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. -'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABgIFBwT/xAAoEAABAwME'. -'AQQCAwAAAAAAAAABAgMEBQYRABIhIkEUMVFhBxNCgaH/xAAVAQEBAAAAAAAAAAAAAAAAAAAAAv/EABcRAQEBAQAAAAAAAAAAAAAA'. -'AAABEUH/2gAMAwEAAhEDEQA/ANGvW4YVOeiRX5b4mv5Sin05IdlupPKdo/j2SO3+6TbPNQvOsTVz33KRT4csR3YUF7Dsh5OSFvug'. -'kqG4FPBxnjxpvvi4KZb1pTpU+QwxUi2Y7ZIAefUk5ATxnB9/gbtL/wCH1UpuhPUlZlMVaQ0mS8zJjqZOPfc2TwpIUonI9tw40R1r'. -'WNGq/wBdJR1XT3lqHBUnGCfkfWjRWs1ve249erQqQYjOtN1FqPUpCXQ4WIzQSsJwT0UpRwQPG0nzqyuNHobjsl9kBuWqoOoXtT1/'. -'WppZcA8lKRj64HxqU+3KpAr6plElRVKef3S4E0K9O8pLXVzKcqSsJAB9wSAca6bSoNXeuA1+5pEV+SGFNU1iKVFqI0Vdx2AJUeoz'. -'8DGlTDwG3CAf3q/pI0ah6MDhLz6U+EpXwPoaNMU//9k=' ; - - //========================================================== - // d1-small.jpg - //========================================================== - $this->chars['1'][0]= 646 ; - $this->chars['1'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. -'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEwMBIgACEQEDEQH/xAAZAAADAAMAAAAAAAAAAAAAAAAABQYCBAf/xAApEAACAQMD'. -'AwQBBQAAAAAAAAABAgMEBREABiESMUEHEyJRkSNCYXGB/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAEC/8QAFxEBAQEBAAAAAAAAAAAA'. -'AAAAAAEREv/aAAwDAQACEQMRAD8A6jdd4WLbstILnc4Uq0VoWpkJknb6IjXLHJUePOlez923fcW4r1SxWlqC2UbdKirQif3Xw3yA'. -'OFAGT09/kO3OmV3a20MFRf6lIYPcpy7yRRAzgxjIy2M8YwcdiBzpX6d22VNvUlTXsFkuwkrKqNSfnK7F8OTzwrAY+l5zoxKskudN'. -'EgQPUT9PBkWF3DH+1GPxo1mLnRoAqF2VRgGOFmX/AAgY/GjRUP6hVMFv2FuFqUvUGrpDFJMBnpdyF5bsAQew7Hxzp6LZNT0yQ1DI'. -'wp0QCFBhD0jCsfLZHxbx5xxpTuvb1+v9PV7Ztk9roLPLCjmSSN3mX5ZwqjCgZX7PfWxDQb2in96pv9qq46aTE0bW4x9ceAWAYPwS'. -'PsYzoixgmheBGjIVcYCnjp/jHjHbRpe1JLn9OnopE/a0ykvjwDx47aNMXqP/2Q==' ; - - //========================================================== - // ll-small.jpg - //========================================================== - $this->chars['l'][0]= 626 ; - $this->chars['l'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. -'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjL/wAARCAAeABcDASIAAhEBAxEB/8QAGAAAAgMAAAAAAAAAAAAAAAAAAAYEBQf/xAArEAACAQIFAwIGAwAAAAAAAAAB'. -'AgMEEQAFBhIhFEFREzEHFSIyYcFxgZH/xAAXAQEAAwAAAAAAAAAAAAAAAAACAAED/8QAGhEAAwEAAwAAAAAAAAAAAAAAAAECMREh'. -'Qf/aAAwDAQACEQMRAD8A15Zfm1VURj1Fp5AqLKv3OARcL4W5Nzx+MLWjdRz5hqXU6TSb6OCr6WghiQbrJ91gOTy1yT5xZ55myZFk'. -'Gb5ozX6Ondm28XYqpQDwu7jEH4c5S2UaDy4xxrLmlUDWzk8XaQ3O49hbj+RiB85HNg8Ee3aqwIqhDuux7G/HHbvzgxEqaWOvy09R'. -'O0o3hjdQoUji20g+fY3wYSM6pJ4Ylr7V+Zz5PSaezHTlTRNWzxySSxt6q1MSkH6AOT2Fu3Aw7RfF/T9DEkLUeawuF2mKSgdWQj2/'. -'q3+fnDZDlqRZzQGaOGcpTOaeR1u8R+ncN3gj94so2jNWHeMNNKzorEX2qp9v3imNPoRE1zpjUtZ09HJmYq5lury0benZeTww23t3'. -'Ivgw+T0yRRyyxIqNfkLcA8jt7YMKcBWn/9k=' ; - - - //========================================================== - // ls-small.jpg - //========================================================== - $this->chars['s'][0]= 701 ; - $this->chars['s'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. -'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjL/wAARCAAeABQDASIAAhEBAxEB/8QAGgAAAgMBAQAAAAAAAAAAAAAAAAMCBAUGB//EACwQAAEEAQIFAgUFAAAAAAAA'. -'AAECAwQFEQAGEhMUITEiYQcjQVFxFRZCUoH/xAAWAQEBAQAAAAAAAAAAAAAAAAADAgH/xAAZEQADAQEBAAAAAAAAAAAAAAAAAQIR'. -'EiH/2gAMAwEAAhEDEQA/APWZMhmFXSJU+SGmWFiQtAWMJQAnJUr8Z+w/OuQk71uZnMsqnbjy9s8st9UMCQ6kZJdZaIHEkZ/JHceN'. -'N3HtizuY1JLrG48yLBSC9UTFKQiY4nACir+wAOOMEe2rm2bTbzlqtE1MyBuZAPybpw85KSfDRJ4Cg+Pl/wC61hJeGjV31VuuKqwr'. -'LGU+whZZK+Rw+oYJAyj3GjS4dZFpZVkqPLktdfMXNcaU2kBC1BIITkdx6c599GlnvPAa3TL2vNvU76n0063acr3YSLCEjpUpUQtW'. -'Dhf14SMEnOc57aZ8Tegm7dbrEQGZt1PeTDgc1PEW3FeXAvyAkZVkeMDOm2G3f3O7Cl/qEuqkQg4lp6CRxraWfUlRUD24kZA741Ko'. -'2k1HvlT3ri2sLOCgtsyJz6XEtBwZPAgJAGQMHUNPWKqWItsqh0UCFVyLeKhyLHQ2TMdHNVj+RKlAnJyfto1FW2ahgjrq6LYTFjjf'. -'lymUOLdWfJyoHA+gA7AAAaNPE3ysJdLT/9k=' ; - - //========================================================== - // lh-small.jpg - //========================================================== - $this->chars['h'][0]= 677 ; - $this->chars['h'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. -'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjL/wAARCAAeABUDASIAAhEBAxEB/8QAGgAAAQUBAAAAAAAAAAAAAAAAAAIDBAUGB//EACwQAAIBAwMCBQIHAAAAAAAA'. -'AAECAwQFEQAGEiExExQiQVEVggcyU2GRocH/xAAXAQADAQAAAAAAAAAAAAAAAAAAAwQB/8QAGhEBAQEAAwEAAAAAAAAAAAAAAQAC'. -'AyEyMf/aAAwDAQACEQMRAD8A6DZb95q9bmpK6ieOCzNHJTxmE+NMhQ5fr1fLq3Ejvkak2e7ipiFsqb3R0m4qkPPJRiRXenU9VjKE'. -'5JVcA9R7nWc3/BUbfoKTdO3VRXhpjbZ2D8Rwk6RyZH6chB+46m7i2hDYtgA2ePlV2VkuKysoLzzRnlIScZJZeeevvjtrX7LK2rp7'. -'tTwwJ9WjhILDrTKnIdMEDl2+P80aVdJZb1QW+vgqENLPH4sBCDLIwUgnOf4GjVvDnLgUk79T81voqjb8NnuUx8pVRCiEaYUSuynl'. -'jHU9mOfnOoOx6hqz8PrbNdfEkMUXg1LSM3rKOUywJ7YAJ1ZTWmSpvdvlaVTDSUzJAhH5ZJBgv0x2RSAPlz21WXqoet3ba9nuW8n4'. -'Jr6qTPqnUNxSM/f6mPvxA9zqJnExTbR+h0nkhVu1uE8j0UBRQ9PGxBKFjnkAScdsDp10a0lc7z0tI7Y5YYN+5GAf7GjVXF4Icj3f'. -'/9k=' ; - - - //========================================================== - // ld-small.jpg - //========================================================== - $this->chars['d'][0]= 681 ; - $this->chars['d'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. -'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjL/wAARCAAeABcDASIAAhEBAxEB/8QAGAAAAwEBAAAAAAAAAAAAAAAAAAQFBgH/xAAsEAABAwMEAAQFBQAAAAAAAAAB'. -'AgMEBQYRABIhMQcTI0EUMlFhkRgicaGx/8QAFgEBAQEAAAAAAAAAAAAAAAAAAgEA/8QAGBEBAQEBAQAAAAAAAAAAAAAAAAECETH/'. -'2gAMAwEAAhEDEQA/ALUhp6h3W/X63UlypbhCY0WMjLqGzwDtPCfv/WtealNpVInuVBBqCogcdbU36YUkAkJWVHG8YPXBxxzxqPcN'. -'YtWyWnIlUeW05VEOAvrCnnSkftK1H5lKJPHsMDoDUWq+KdrSbIqsalVsImiEtLUZ2MU71bcYJWkhZ/36ayLHhi/IXZVOmzKqp5uU'. -'688hTyjuGVEFJKvoQesD86NL2jGZp1EoLDSmk+ZAQ8d7oPzp3YGesFWMfxo1YGvSzLsT9QExVX8phTlMaFOExAJIBGQjJwCcL+/e'. -'rd+W7GuO0Kw05CQ6+ww69Gfdb2kFIKk7DgEkjgnr86rXRa9HuyP8LV4SH0sIBbWFFDiFEgDaocgdkjo8ccay0qw7ut5nyrcviQqC'. -'slsRKo0HwlODkBRzxj2AGoXTtpzIdQ8MbffUChz4NCPRaClAo9Mn6c7T3o13wytmo0K05VIqkiPJbizFiMWs4CTgnIIHOST796NL'. -'Ia1JX//Z' ; - - //========================================================== - // d8-small.jpg - //========================================================== - $this->chars['8'][0]= 694 ; - $this->chars['8'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. -'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AFQMBIgACEQEDEQH/xAAYAAADAQEAAAAAAAAAAAAAAAAABgcEBf/EACsQAAEDAwMD'. -'AwMFAAAAAAAAAAECAwQFBhEAEiEUMVEHE0EVYYEiIzJCsf/EABYBAQEBAAAAAAAAAAAAAAAAAAIAAf/EABcRAQEBAQAAAAAAAAAA'. -'AAAAAAABERL/2gAMAwEAAhEDEQA/AKL6gVVUa0i1T5QjvTprUJMlxW4R9zgQXe/AH+kaWrntqlWjaq7gpcmotXAw82ht9yY4tch8'. -'uAFC0k7VBXPGMY51ruiaue+bThIj+7NbWqS+7HDxajFf6AlB/k44o8ZOABk4xkL0X0tZiojKrlRuGRJjugqldSlKGf6t7BuUQe3J'. -'44xxxrA1a4KVJipLidri8uLHgqOcfjOPxo0o2hdDvS1CmV2Yl6fS5ioipIQR1CAlKkLKR2UUqAI8g6NRSwuuyHab6s1ufLI/Zai7'. -'UBJOxhTS0+6B32pWSFH4CidOdWU0ukLiN1BLr0zG5Sdm3GRvcPhIT858DvjXNrVsSLnm/VIdTXS6tTnFsxZTSN3jchaTwps+O/z9'. -'tcBVq3hIX0tYqlIiQHdy5CqRHKHXEjAOMgBKjnvyRk4xrQa7OiGt1K5biYZL8SoVEpjOqkFsONtJCNwASeCQrn7aNUKnQYtLp7EC'. -'EylmLHQltptPZKQOBo1FzH//2Q==' ; - - //========================================================== - // lz-small.jpg - //========================================================== - $this->chars['z'][0]= 690 ; - $this->chars['z'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. -'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjL/wAARCAAeABYDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAABgAHA//EACsQAAEDAwQBAwIHAAAAAAAAAAEC'. -'AwQFESEABhIxBxMiQVFxCCM0UmGRof/EABYBAQEBAAAAAAAAAAAAAAAAAAECAP/EABgRAAMBAQAAAAAAAAAAAAAAAAABEVEC/9oA'. -'DAMBAAIRAxEAPwBTWfLu1KXXZDbM4uewNvLajlwhaCbBAwDe5uehYd3xm6t6bi3jvulwqc7KgxXZZeYQLNLeF73WRg4HEdgfzrSa'. -'P45pNEkznITDc9ypLShtyWhJDJyXC2qxJHZvjoZOjyVv1v8AESt6FFS4ijxvTLbawEApSccrYHJf0+OtJMQ2rNXk7GZMufJgJjTH'. -'Un9M4qzxT7hyCiThIyRnPXWrRvyLElVBUF6vlhl0lwRYCFKcQhAtyWpVhyWTx+w++rUvp4EWjOvbniUOnVatcS43BYDbJSPZyIBw'. -'ejclIx+3Wa+J63T6DQanuGszI0eZVJJV60p0Jum5GEi6le7l0PjvSjyRsaTvJqI1BqhhR46ksuMrQVJcUSEoUbHNr/7o7C8L7eiz'. -'4lLlyJk2cEqW+6V+m0AE9ISLnsj5+O9UhsFK92bZZqb9SRu9p2c4A0OCEqDbYAJSlJwAVZv3fBvbFrg/462btlhuS1RG5nL8pYkq'. -'KrnsKH06I/rVrQKkf//Z' ; - - //========================================================== - // d4-small.jpg - //========================================================== - $this->chars['4'][0]= 643 ; - $this->chars['4'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. -'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAYAAADAQEAAAAAAAAAAAAAAAAABAYHAv/EAC0QAAIBAwQA'. -'BAMJAAAAAAAAAAECAwQFEQAGEiETFDFBUmGBByIjUVNxobHR/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAIB/8QAGBEBAAMBAAAAAAAA'. -'AAAAAAAAAAERIVH/2gAMAwEAAhEDEQA/ANjM00Nxmt1xiWW31CZp5uJwoAAaOQ/n7qfcZHqO5my3q5XX7R6ijiqnNut9u4NyJ4yv'. -'JJyjYr8Xhrn5g599J7x3ulBNU7Zo7dXXXcLQ8kURYi4epYtkALjOePv1nUvbLvV7P3BZm3DR3eh88Kp7pVzBZI6iUhGWRRGWwE44'. -'HX3V+uiL1uHgt+vL/H+aNJQ3CSeCOaFqSaJ1DJKs/TqRkMOvQjvRorHE4pRDLNWLGlRHGUeYIORXs9e5B7OP31E0fmdyb/t0DJ4Q'. -'27bfx3YZzPUIoAAz7IpOD6cuxq0uNumqLfVNDOqXBoZEjnZcqhIPXH4c46+WkdoWOltu3IDDLLLVVR83UVcuPEmmcZZ2/rHoAANG'. -'GI7KIY1ijoLeEQBVCwIoAHpgY6Hy0aZe7mJ2jeHLKcEhusj6aNKgzr//2Q==' ; - - //========================================================== - // lv-small.jpg - //========================================================== - $this->chars['v'][0]= 648 ; - $this->chars['v'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. -'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjL/wAARCAAeABQDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAQDBQYH/8QAKBAAAQQBAwMEAgMAAAAAAAAA'. -'AQIDBBEFAAYhEzFBEhQiYQdRFTKB/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAEC/8QAFxEBAQEBAAAAAAAAAAAAAAAAAAERIf/aAAwD'. -'AQACEQMRAD8A6Ngt1SZ4yrYgrecgTFsFJA9aGwAUrUaF2D2Avjzq6CIjiBPkB9bwQVIkIYIDae/wq+P9N+dY4SGMf+Txlev7KBmY'. -'PoadKRy4zxSgRxaTwO/x09u7KPYnasmHjlsyFZZXt4K23ezjvBpNGgLUrvXfVZyLLbWambiwEbKvvxYAkeotNlIJW2FEJWb7WBda'. -'NSQI0fHYyJjkrjKRDZQwnpQ1vgBIr+w8+a+9GocZr8iKkuY1eXhsKH8U8iZE9BHz6ZHUc48UfSPqzqH3kfeO9kTTDQYGGietpTaO'. -'shyW6AocpHNIrv8AvWzk9BUSdPdYS4BcRlomkhIV6KP0VE39V+tU2wdlRMHtZUB8NuTQ+51X27+Kr46ZPIAFV540D8zeLsJ5LMHa'. -'ubmMBCVJdjx0pRyLoWR4I8aNIQ8BvZMNtMTeUcsptKfc4tC1gAkCyFC+K0aJtf/Z' ; - - //========================================================== - // lk-small.jpg - //========================================================== - $this->chars['k'][0]= 680 ; - $this->chars['k'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. -'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjL/wAARCAAeABUDASIAAhEBAxEB/8QAGQAAAwEBAQAAAAAAAAAAAAAAAAUGBAMH/8QALhAAAQMDAwIEBAcAAAAAAAAA'. -'AQIDBAUREgAGITFBEyIyYQcVUYEUIzNicZHx/8QAFgEBAQEAAAAAAAAAAAAAAAAAAwEE/8QAGxEAAwACAwAAAAAAAAAAAAAAAAEC'. -'AxESMeH/2gAMAwEAAhEDEQA/APVK/V36dU6NSJDTT8esPLiqfK8S2cCoeTkKvZQ6jm2ldSqKqbu+OgMOvSX3m4UBrLnDlbqiefKl'. -'Nzz2x1m+IwNP27CkJQ7JkR6rCkMJbP5jp8S2CPfkgD6H+dJ6Ca0nerr+64rTNSqMYrg+C9mmOwhVpDfsuxSbi97DmybaoZeQ5jTl'. -'PEp18JTIfeW3kq3ly4H26aNZqvTWZsjFcZTsVtSg0G8Rio+vr2vb7g6NLPRnuXy8F+8kl+obUh4KXJdqSJJQnohlkZqJPYBXh3P+'. -'a4b5Hyp6k1bO7sOotPyXkj9NlwFl0ewstJA9ifrqkVSmET4csoS7UTHXFQ+6SQlskKUMb/tH9ddLVUmS7DqdBqD7U6OsqfS46jzl'. -'hQ5bXb1K9Scuybdxo2OTu92dwSZkWn0Sb8viQWyn8Qq5D6ifSLd0BIv7q0arTBRSKPToMZbi2GWylsvLK148Wue/XRrRjxOpT2R2'. -'k9aP/9k=' ; - - //========================================================== - // lr-small.jpg - //========================================================== - $this->chars['r'][0]= 681 ; - $this->chars['r'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. -'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjL/wAARCAAeABYDASIAAhEBAxEB/8QAGgAAAgIDAAAAAAAAAAAAAAAAAAYCBQMEB//EAC4QAAICAQIFAgMJAQAAAAAA'. -'AAECAwQRBQYAEiExQQdRFGFxEyIyM0JSYoGC8P/EABYBAQEBAAAAAAAAAAAAAAAAAAEAAv/EABcRAQEBAQAAAAAAAAAAAAAAAAAB'. -'EUH/2gAMAwEAAhEDEQA/AOs0ZdETU54Gt1INSmlPJEsyo7J+jlXPUYBPY9c+eE/dO9tY0a7ren6BVrW7VJTZtW5kZkjXkBSIKveQ'. -'gHp0AAJ4w+q2hVdT2Md0h46+saS4mr3EUK0gWTAB+vQj2PboeL/ZVOqmhaZVjkFmxdC6tctt3tM2G5/7bAx4C4+qxiWwd3prWzKe'. -'r3IBAth5OYxozKsgc8y4GTgnJB9uncdTi6tXq2140rRVM13JMEMAVAg7sMdBjJB/18uDgRO9R2Oo6FX2vShkFzURFUq1whIj+8DI'. -'7EdAFjXv7MeNb0kuStsFEmIaajZaos2fy2Q4VGH7SGxn+Rzw9yMLOm/FzRhZazmOTkP4grYyD3B8j2PTyeFfZ+z7G3BeSS8lmprl'. -'2K2qcnK0Z5S8gPjrgAY8cNEWmq7u23pEos6/Zji+Kd0rLLGWwseA3joeZj/w4OET1g0vlmrWV+ydFnkUxSgsvM4V+YYIwfHz6cHB'. -'ZeKZ1//Z' ; - - //========================================================== - // lg-small.jpg - //========================================================== - $this->chars['g'][0]= 655 ; - $this->chars['g'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. -'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjL/wAARCAAeABQDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAQCBQYH/8QAJxAAAQQBAwQCAgMAAAAAAAAA'. -'AQIDBBEFAAYhBxIxQRNhcYEiQlH/xAAYAQACAwAAAAAAAAAAAAAAAAACAwABBP/EABkRAAMBAQEAAAAAAAAAAAAAAAABAhEhIv/a'. -'AAwDAQACEQMRAD8AayO4t6bq3hmMHtxyLi4OKeKH5jyASiiQCCQeTRNAeB61FrBb+jTGpLO+BMW24EFMhkhpQru8m7B/H70x09Yi'. -'q3nv/vLfwpnJ7UNkqSRbngf2ofWkpXV7brymC2malLfagurjW0aHk89xPJ9cX9aprURHWbYEaMHHEBfwpv8AnXPk+/8AdGqGJOxO'. -'4YbOSxK4y4boIStUWysgkEmxY54r60aOI8oTV9MHtjJwunPUbO46WWo0HLlD8KY4goboFVoquOVEVwLT963WdnxYfT6ZJyz0JvHm'. -'KvtaSkW4tYNVSqKiTwB+fw5n9sY/cuOXCzDDcluyW3Ckd7V+0n0eNZTH9DdouFalHIOJBUhtDki0pNV3UALo81ehG6IdKjPZ6d47'. -'4ywltanVJvuJI+RQs/sHRqy2r003JhsImEc/CUyhxRZBjKV2oJ8eRXNmufPnRo1WIz3DdNn/2Q==' ; - - //========================================================== - // lc-small.jpg - //========================================================== - $this->chars['c'][0]= 629 ; - $this->chars['c'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. -'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjL/wAARCAAeABcDASIAAhEBAxEB/8QAGQAAAwEBAQAAAAAAAAAAAAAAAAUGBwID/8QALRAAAgICAQIEBAYDAAAAAAAA'. -'AQIDBAURACExBhIiQRMVUWEHMkJScYFykaH/xAAWAQEBAQAAAAAAAAAAAAAAAAABAgP/xAAXEQEBAQEAAAAAAAAAAAAAAAAAATER'. -'/9oADAMBAAIRAxEAPwDcoGkmiT4Q8kWvzuPU38D2/v8A1zwrCFayq1qTaFk2H7aJHt05MeMvENzC4upDWkjW9kJXiricAJCigvJN'. -'IB1IVQT5frrv24twPgunk6a288crbklUSJNNdnSTZ2STHHqOP/Eb17njdZtAoqwEvrEiGVyG117/AG6HhyV8H1sljMldoxXTksGC'. -'zV7M0oaWGQOVeGQ92I6EMR22D11w4LmEPjaOL51iL8ssc9Z69zHtZkYCGGeQK0ez2UEoU39wCeX1S/LLiEt+mPSbMLxsGVv2kEjR'. -'305xkaEV/GTULMUT1LD/AAGh8gIZS2jv+vpybb8NMIb0dVLWYWgiiU0vmMphOj6V0TvQI3rfsON1E6dYjGtisa0F1mAWR2NhG0WZ'. -'3Ls3TqNs5Hc9h23w49NWL9K+Q/VD5T/zhwPH/9k=' ; - - //========================================================== - // d7-small.jpg - //========================================================== - $this->chars['7'][0]= 658 ; - $this->chars['7'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. -'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABgEFBwT/xAAuEAABAwIE'. -'BAQGAwAAAAAAAAABAgMEBREABiExEhMiQSMyUXEHFBclVJFhk9L/xAAXAQADAQAAAAAAAAAAAAAAAAAAAQID/8QAGREBAQEAAwAA'. -'AAAAAAAAAAAAAAEREiFR/9oADAMBAAIRAxEAPwDXq9mCjZeQ05VZ5ZST4bfEpa3VdglCbqUe+g9MZ5Uq7V8415WXoMSdQ6etgSps'. -'19wpkCMDZKUpv0FZvbi1NzpYasMDLDUbMVXrtQdbeeU23xLWkj5RlLYK0J7anW9gbAjCzkOtsVSUJUdtc6dVZK51UeaFm4LKbhpC'. -'l7EhIFkDW974GbRI2XorUVls1OTdKAOqUpR0Hc3198GITQ6k+hLwrEpoODiDenRfW23bBicg78JXxPpD0mgVOW5PAivNNpahsPW5'. -'8xxQaSVkboQnhsnYm5OHqDGp1IpsalMKjMsMIC3+XZKbJFth62/QOEfMOZqZXp9JcKZTcGmTky3meSi7xQklI81vMR+sXIz/AEgp'. -'Q0qPNu6ea8Q2jqtbp8+2w9h/OKORc/cpHjt1dDSHOtLZ4ekHW23bBjj+o9H/AB539aP94MG0+L//2Q==' ; - - //========================================================== - // ly-small.jpg - //========================================================== - $this->chars['y'][0]= 672 ; - $this->chars['y'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. -'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjL/wAARCAAeABQDASIAAhEBAxEB/8QAGAAAAwEBAAAAAAAAAAAAAAAAAAQGBQf/xAArEAABAwMEAQIFBQAAAAAAAAAB'. -'AgMEBREhAAYSEzEHIhQkQVGxQmFxgaH/xAAWAQEBAQAAAAAAAAAAAAAAAAADAQL/xAAeEQEAAgEEAwAAAAAAAAAAAAABABECAxIh'. -'MUGR8P/aAAwDAQACEQMRAD8Ar3tys07dVHohemz5dWQ7fk91MsA3IIRY8rkKFySceTqw3JVV0KhyKw+0C1CQp9aUOFSiAk4AIAvn'. -'76xtz0ioVvbcJ6msx2JtOfZmw1PKI5LQcJNh7UqBKcn6+NRfqPu6s1fYc6GxSJsRfWDUVSGA22ygEckJWSexRNgOP0udXzDKOJ0I'. -'yo62mHm25Sy80l1Z4lSgpQvZRGLgWwPGjTjbchyLH+Ejx22EtJSgO8kki3kADA/nOjWjGzv73CyQZjUWNVp7bNSrj7qJDqflqUlQ'. -'DMds24l3HvcNr3Pi9gME6T9WWVsemdYWswwC2lPta4m5WMA3OdUExCmozUJD6g84ntMjrHIFBTdQz5yLDx/WDNytpwW6nAkViqVe'. -'uvmXdlme6n4dCwlRBKEgA2tj99QG7Ilncp5QqpU31PMsJ6x7A32f6SPxo0hPVCD45oVyKf0MtgeT97/nRrO7UOCFla3tn//Z' ; - - //========================================================== - // d3-small.jpg - //========================================================== - $this->chars['3'][0]= 662 ; - $this->chars['3'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. -'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABAUGBwL/xAArEAABBAED'. -'AwMDBQEAAAAAAAABAgMEBREABhIhMUEiMmETFZEHFkJDUdH/xAAWAQEBAQAAAAAAAAAAAAAAAAABAAL/xAAYEQEBAQEBAAAAAAAA'. -'AAAAAAAAEQExQf/aAAwDAQACEQMRAD8A0vclruBdk3VVLLUNssGRJsZSCtqOjlgJAHvcOD6c4HnOdIbcttw1W5P29cFEhuawqTXS'. -'VsJjnCMBxKkJJx7goAde+ceJfdNxU0UNlyymyXHi6kxWUNl1S3EnkAEIHX2nv86qtTuZr9Q9+1VhRsOoYpYcgSVyAE/TdewkJxnK'. -'sBCjkdPGpnOtFMd3PqsXgfOAgD8Y0aX+11H9rDDjn8lr9yj5J+dGqsqxaw6Cc9cQZU4Sp7zTJsIrKlcUEKwhSin1JABI45GUjqOu'. -'lbOvjbc3Ts9ynjGCy445UuFLYRzbWgrT6fhSCQSMDke+pew2zYVly/d7YchNqkMJZnQpgV9J8IzwWFJyUrAJHYgjvpLbu37G5nR7'. -'vck5C3YRKYEOEVJZj8kjKypXqWvirjk9h+dB9i4faa89TDZUfKlIyT8k+To10a6KTkpcJ/0vL/7o0TS//9k=' ; - - //========================================================== - // ln-small.jpg - //========================================================== - $this->chars['n'][0]= 643 ; - $this->chars['n'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. -'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjL/wAARCAAeABQDASIAAhEBAxEB/8QAGwAAAgEFAAAAAAAAAAAAAAAAAAYCAQMEBQf/xAAtEAACAQMCBAUCBwAAAAAA'. -'AAABAgMEBREAIQYSE0EHIjFRcWGRIzIzQoGCwf/EABYBAQEBAAAAAAAAAAAAAAAAAAMEAP/EABkRAQEBAQEBAAAAAAAAAAAAAAEA'. -'AhEhUf/aAAwDAQACEQMRAD8A6FR3p7v4oV9rlkMQsjL00RyOss0KkFxnDcrc2PbI1NOJKyTjW+W5OmKeA0UEJx5meRZS2/8AUfbS'. -'LVGS1+K16vCzfiR3GmoqqXGyxz06hWPsFlVMfOmq1iNvE69KjBYo3oJMZ3GKeYYPxg/fW+xzZX1FLQyxwSTcpWNceu4G3+aNSmpY'. -'qmQzzwh2k8yhv2r2H23/AJ0aoy+EWh7I1ntacR3PxDtEzhjWy0wkkIwYmanU5GO6sNh7rrU8AVdTceNbhDXxNHUQvS0tZ3DzwxVA'. -'fB7hj59/XJ08cPWaKj4gvlwSQiG7dCboqvLy9NOmQT9SM7ayJrBa6K5V91hjlWorp4JGUOAglRSiMMDb82/vgaBGTpVvtNUVtyJg'. -'5+WNAh5ZCu/r2+dGrgq0pi0DhmlRsSSAfqMd+b6ZyNu3po1Rk1yNBe3/2Q==' ; - - //========================================================== - // lu-small.jpg - //========================================================== - $this->chars['u'][0]= 671 ; - $this->chars['u'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. -'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjL/wAARCAAeABcDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAYDBAUH/8QAJRAAAQQBAwQDAQEAAAAAAAAA'. -'AQIDBBEFAAYhBxMxYRJBURSB/8QAFgEBAQEAAAAAAAAAAAAAAAAAAQAD/8QAGhEBAQEAAwEAAAAAAAAAAAAAAQARITFBAv/aAAwD'. -'AQACEQMRAD8A6dLkQmJzu3WVtHIqjf0duKFNuBr5UTQ45F1R8/XI1PMmsYoJyjhS9iI7BKHeKjkXZVXqhyLHP+rrHeR1pZlx1W1M'. -'wTiW0ukkrS28nn5fV2SPPFfurHUKQhzYG7pLYKEfyBhaSOS7dG/YCki/uvWn3LPDOJrwa4kyEzOYeakqkpC3Hk0bNePQHgDRpchY'. -'leIZwzUWauKtuPctTSUlCAUmrBHIKuAPV/ujQsmHdm7hya43UbbD3ZVElOQJsdTS6IQaQUqBHCk8E2Pocgam6oYwObHy0Zm0oi45'. -'T1KBPdpV2f0pom/1Ws7cmPazu98Ltvcq3VzRHfehz8a4pirFEKRZo8eQT+eCdWYfS/b+WYnxpbuVcDRMdHcyTqg2fiAfiLoi+Rf+'. -'jT7Xc74HtOYnHyUOh8yWUvKeHhy0CiPVUAPoDRrm+OeznTva6lzsyMjCYbbaiNJjJSWElagD5tRpNUSALFeNGoOCH7Bv/9k=' ; - - //========================================================== - // lw-small.jpg - //========================================================== - $this->chars['w'][0]= 673 ; - $this->chars['w'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. -'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjL/wAARCAAeABcDASIAAhEBAxEB/8QAGAAAAgMAAAAAAAAAAAAAAAAAAAYDBAX/xAAtEAACAQMDAgMHBQAAAAAAAAAB'. -'AgMEBREABhIhMRMUQRUiIzJRYZEWNIGx0f/EABYBAQEBAAAAAAAAAAAAAAAAAAABA//EABoRAAICAwAAAAAAAAAAAAAAAAABERIh'. -'MVH/2gAMAwEAAhEDEQA/AHXbV13ZLu6t2/uaa1JijWopVp4XUTKSAXRyc+6ehBGeoPbTSlwpql0K3GneqpZViqUhI5JzGMEZJGeh'. -'GlXfaFILDf7FQzXC426rDLTojs8sLqVkXBGcfKf40twWbdWzZY75R0s90ul3jPtKjVMJDNn4DDp8iEhW+wJ1WZG2KWt3Lv26U1tv'. -'92o7PaYkgYUbqVepYlmUBlIwqnB++O2jTDt/bBtth9jcpvEWNGqalZQryTlmeR8jPct6+mNGmRC4a1U13htzVFItB5nA/cyOUVfp'. -'7oz/ALqitJulYJKuqvFsppHALLFb3cp9FBaXr+O51bq0q6i38KK5PDVAAxSzU6SIpz3Kjjn8jUFoS7uFmut1gq17xLFQ+DxOccj8'. -'Rsn+tVpiyJnqv09YfOXu5AycgZZQEhBZjgDBOOgwO/po0sttWHdNzqLruioa4UwmdaC3kYp4IwSvJlBHKQ4OSe3po0qxM6P/2Q==' ; - - //========================================================== - // lq-small.jpg - //========================================================== - $this->chars['q'][0]= 671 ; - $this->chars['q'][1]= -'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. -'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. -'MjIyMjIyMjL/wAARCAAeABQDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAcDBAUG/8QAKRAAAQQBBAICAQQDAAAAAAAA'. -'AQIDBBEFAAYSIQcxIlETCBQVgSNBYf/EABUBAQEAAAAAAAAAAAAAAAAAAAAB/8QAFhEBAQEAAAAAAAAAAAAAAAAAAAER/9oADAMB'. -'AAIRAxEAPwDT3H5Qz+O3LN2vtrF/y86NYLzzVlAABJITQPv2a/17vXMboz3lDEYWPuafNx7CFrS03+2jpK2bs0CUkUa7pRvrUu63'. -'sr438yv7pLEo4XIK5Kcji0uJUkckm+uQUOVH6GsnyJv7A5vaJwuFdkONLmolgONFH4vioKRXYqyCADXvRMh0yspmZ4jyIEtDTK47'. -'aiA0lQUopBJBI/7X9aNT7amRo228e3a31iO3yUzCcdSPiKAIFdCho0TIswZ7GQlO/hlRxBooih1YXzAoKUkX0LPEBX110dJ7zbuv'. -'AORpO04cIpmxH23FSEIRwKuNnsdk0o31702XhFMKbuRUZJWP8LTQ6HBCuIB+iVWSR2BXuqK93/hDlvGzEphmG3Ml5JpDi1I7TzNA'. -'BYFlPafY+/7LBiv1CYDH4iFDOGySlMR22lFP4wCUpANfL11o1r4bxXlWMNEaE/bqlIbCFl/ANPK5Do/M0VDr2Rf3o0TX/9k=' ; - - - - } -} - -class AntiSpam { - - private $iData=''; - private $iDD=null; - - function __construct($aData='') { - $this->iData = $aData; - $this->iDD = new HandDigits(); - } - - function Set($aData) { - $this->iData = $aData; - } - - function Rand($aLen) { - $d=''; - for($i=0; $i < $aLen; ++$i) { - if( rand(0,9) < 6 ) { - // Digits - $d .= chr( ord('1') + rand(0,8) ); - } - else { - // Letters - do { - $offset = rand(0,25); - } while ( $offset==14 ); - $d .= chr( ord('a') + $offset ); - } - } - $this->iData = $d; - return $d; - } - - function Stroke() { - - $n=strlen($this->iData); - if( $n==0 ) { - return false; - } - - for($i=0; $i < $n; ++$i ) { - if( $this->iData[$i]==='0' || strtolower($this->iData[$i])==='o') { - return false; - } - } - - $img = @imagecreatetruecolor($n*$this->iDD->iWidth, $this->iDD->iHeight); - if( $img < 1 ) { - return false; - } - - $start=0; - for($i=0; $i < $n; ++$i ) { - $dimg = imagecreatefromstring(base64_decode($this->iDD->chars[strtolower($this->iData[$i])][1])); - imagecopy($img,$dimg,$start,0,0,0,imagesx($dimg), $this->iDD->iHeight); - $start += imagesx($dimg); - } - $resimg = @imagecreatetruecolor($start+4, $this->iDD->iHeight+4); - if( $resimg < 1 ) { - return false; - } - - imagecopy($resimg,$img,2,2,0,0,$start, $this->iDD->iHeight); - header("Content-type: image/jpeg"); - imagejpeg($resimg); - return true; - } -} - -?> diff --git a/html/lib/jpgraph/jpgraph_bar.php b/html/lib/jpgraph/jpgraph_bar.php deleted file mode 100644 index 0f77e8444a..0000000000 --- a/html/lib/jpgraph/jpgraph_bar.php +++ /dev/null @@ -1,1160 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -/*======================================================================= - // File: JPGRAPH_BAR.PHP - // Description: Bar plot extension for JpGraph - // Created: 2001-01-08 - // Ver: $Id: jpgraph_bar.php 1905 2009-10-06 18:00:21Z ljp $ - // - // Copyright (c) Aditus Consulting. All rights reserved. - //======================================================================== - */ - -require_once('jpgraph_plotband.php'); - -// Pattern for Bars -DEFINE('PATTERN_DIAG1',1); -DEFINE('PATTERN_DIAG2',2); -DEFINE('PATTERN_DIAG3',3); -DEFINE('PATTERN_DIAG4',4); -DEFINE('PATTERN_CROSS1',5); -DEFINE('PATTERN_CROSS2',6); -DEFINE('PATTERN_CROSS3',7); -DEFINE('PATTERN_CROSS4',8); -DEFINE('PATTERN_STRIPE1',9); -DEFINE('PATTERN_STRIPE2',10); - -//=================================================== -// CLASS BarPlot -// Description: Main code to produce a bar plot -//=================================================== -class BarPlot extends Plot { - public $fill=false,$fill_color="lightblue"; // Default is to fill with light blue - public $iPattern=-1,$iPatternDensity=80,$iPatternColor='black'; - public $valuepos='top'; - public $grad=false,$grad_style=1; - public $grad_fromcolor=array(50,50,200),$grad_tocolor=array(255,255,255); - public $ymin=0; - protected $width=0.4; // in percent of major ticks - protected $abswidth=-1; // Width in absolute pixels - protected $ybase=0; // Bars start at 0 - protected $align="center"; - protected $bar_shadow=false; - protected $bar_shadow_color="black"; - protected $bar_shadow_hsize=3,$bar_shadow_vsize=3; - - //--------------- - // CONSTRUCTOR - function __construct($datay,$datax=false) { - parent::__construct($datay,$datax); - ++$this->numpoints; - } - - //--------------- - // PUBLIC METHODS - - // Set a drop shadow for the bar (or rather an "up-right" shadow) - function SetShadow($aColor="black",$aHSize=3,$aVSize=3,$aShow=true) { - $this->bar_shadow=$aShow; - $this->bar_shadow_color=$aColor; - $this->bar_shadow_vsize=$aVSize; - $this->bar_shadow_hsize=$aHSize; - - // Adjust the value margin to compensate for shadow - $this->value->margin += $aVSize; - } - - // DEPRECATED use SetYBase instead - function SetYMin($aYStartValue) { - //die("JpGraph Error: Deprecated function SetYMin. Use SetYBase() instead."); - $this->ybase=$aYStartValue; - } - - // Specify the base value for the bars - function SetYBase($aYStartValue) { - $this->ybase=$aYStartValue; - } - - // The method will take the specified pattern anre - // return a pattern index that corresponds to the original - // patterm being rotated 90 degreees. This is needed when plottin - // Horizontal bars - function RotatePattern($aPat,$aRotate=true) { - $rotate = array(1 => 2, 2 => 1, 3 => 3, 4 => 5, 5 => 4, 6 => 6, 7 => 7, 8 => 8); - if( $aRotate ) { - return $rotate[$aPat]; - } - else { - return $aPat; - } - } - - function Legend($graph) { - if( $this->grad && $this->legend!="" && !$this->fill ) { - $color=array($this->grad_fromcolor,$this->grad_tocolor); - // In order to differentiate between gradients and cooors specified as an RGB triple - $graph->legend->Add($this->legend,$color,"",-$this->grad_style, - $this->legendcsimtarget,$this->legendcsimalt,$this->legendcsimwintarget); - } - elseif( $this->legend!="" && ($this->iPattern > -1 || is_array($this->iPattern)) ) { - if( is_array($this->iPattern) ) { - $p1 = $this->RotatePattern( $this->iPattern[0], $graph->img->a == 90 ); - $p2 = $this->iPatternColor[0]; - $p3 = $this->iPatternDensity[0]; - } - else { - $p1 = $this->RotatePattern( $this->iPattern, $graph->img->a == 90 ); - $p2 = $this->iPatternColor; - $p3 = $this->iPatternDensity; - } - if( $p3 < 90 ) $p3 += 5; - $color = array($p1,$p2,$p3,$this->fill_color); - // A kludge: Too mark that we add a pattern we use a type value of < 100 - $graph->legend->Add($this->legend,$color,"",-101, - $this->legendcsimtarget,$this->legendcsimalt,$this->legendcsimwintarget); - } - elseif( $this->fill_color && $this->legend!="" ) { - if( is_array($this->fill_color) ) { - $graph->legend->Add($this->legend,$this->fill_color[0],"",0, - $this->legendcsimtarget,$this->legendcsimalt,$this->legendcsimwintarget); - } - else { - $graph->legend->Add($this->legend,$this->fill_color,"",0, - $this->legendcsimtarget,$this->legendcsimalt,$this->legendcsimwintarget); - } - } - } - - // Gets called before any axis are stroked - function PreStrokeAdjust($graph) { - parent::PreStrokeAdjust($graph); - - // If we are using a log Y-scale we want the base to be at the - // minimum Y-value unless the user have specifically set some other - // value than the default. - if( substr($graph->axtype,-3,3)=="log" && $this->ybase==0 ) - $this->ybase = $graph->yaxis->scale->GetMinVal(); - - // For a "text" X-axis scale we will adjust the - // display of the bars a little bit. - if( substr($graph->axtype,0,3)=="tex" ) { - // Position the ticks between the bars - $graph->xaxis->scale->ticks->SetXLabelOffset(0.5,0); - - // Center the bars - if( $this->abswidth > -1 ) { - $graph->SetTextScaleAbsCenterOff($this->abswidth); - } - else { - if( $this->align == "center" ) - $graph->SetTextScaleOff(0.5-$this->width/2); - elseif( $this->align == "right" ) - $graph->SetTextScaleOff(1-$this->width); - } - } - elseif( ($this instanceof AccBarPlot) || ($this instanceof GroupBarPlot) ) { - // We only set an absolute width for linear and int scale - // for text scale the width will be set to a fraction of - // the majstep width. - if( $this->abswidth == -1 ) { - // Not set - // set width to a visuable sensible default - $this->abswidth = $graph->img->plotwidth/(2*$this->numpoints); - } - } - } - - function Min() { - $m = parent::Min(); - if( $m[1] >= $this->ybase ) $m[1] = $this->ybase; - return $m; - } - - function Max() { - $m = parent::Max(); - if( $m[1] <= $this->ybase ) $m[1] = $this->ybase; - return $m; - } - - // Specify width as fractions of the major stepo size - function SetWidth($aWidth) { - if( $aWidth > 1 ) { - // Interpret this as absolute width - $this->abswidth=$aWidth; - } - else { - $this->width=$aWidth; - } - } - - // Specify width in absolute pixels. If specified this - // overrides SetWidth() - function SetAbsWidth($aWidth) { - $this->abswidth=$aWidth; - } - - function SetAlign($aAlign) { - $this->align=$aAlign; - } - - function SetNoFill() { - $this->grad = false; - $this->fill_color=false; - $this->fill=false; - } - - function SetFillColor($aColor) { - // Do an extra error check if the color is specified as an RGB array triple - // In that case convert it to a hex string since it will otherwise be - // interpretated as an array of colors for each individual bar. - - $aColor = RGB::tryHexConversion($aColor); - $this->fill = true ; - $this->fill_color=$aColor; - - } - - function SetFillGradient($aFromColor,$aToColor=null,$aStyle=null) { - $this->grad = true; - $this->grad_fromcolor = $aFromColor; - $this->grad_tocolor = $aToColor; - $this->grad_style = $aStyle; - } - - function SetValuePos($aPos) { - $this->valuepos = $aPos; - } - - function SetPattern($aPattern, $aColor='black'){ - if( is_array($aPattern) ) { - $n = count($aPattern); - $this->iPattern = array(); - $this->iPatternDensity = array(); - if( is_array($aColor) ) { - $this->iPatternColor = array(); - if( count($aColor) != $n ) { - JpGraphError::RaiseL(2001);//('NUmber of colors is not the same as the number of patterns in BarPlot::SetPattern()'); - } - } - else { - $this->iPatternColor = $aColor; - } - for( $i=0; $i < $n; ++$i ) { - $this->_SetPatternHelper($aPattern[$i], $this->iPattern[$i], $this->iPatternDensity[$i]); - if( is_array($aColor) ) { - $this->iPatternColor[$i] = $aColor[$i]; - } - } - } - else { - $this->_SetPatternHelper($aPattern, $this->iPattern, $this->iPatternDensity); - $this->iPatternColor = $aColor; - } - } - - function _SetPatternHelper($aPattern, &$aPatternValue, &$aDensity){ - switch( $aPattern ) { - case PATTERN_DIAG1: - $aPatternValue= 1; - $aDensity = 92; - break; - case PATTERN_DIAG2: - $aPatternValue= 1; - $aDensity = 78; - break; - case PATTERN_DIAG3: - $aPatternValue= 2; - $aDensity = 92; - break; - case PATTERN_DIAG4: - $aPatternValue= 2; - $aDensity = 78; - break; - case PATTERN_CROSS1: - $aPatternValue= 8; - $aDensity = 90; - break; - case PATTERN_CROSS2: - $aPatternValue= 8; - $aDensity = 78; - break; - case PATTERN_CROSS3: - $aPatternValue= 8; - $aDensity = 65; - break; - case PATTERN_CROSS4: - $aPatternValue= 7; - $aDensity = 90; - break; - case PATTERN_STRIPE1: - $aPatternValue= 5; - $aDensity = 94; - break; - case PATTERN_STRIPE2: - $aPatternValue= 5; - $aDensity = 85; - break; - default: - JpGraphError::RaiseL(2002); - //('Unknown pattern specified in call to BarPlot::SetPattern()'); - } - } - - function Stroke($img,$xscale,$yscale) { - - $numpoints = count($this->coords[0]); - if( isset($this->coords[1]) ) { - if( count($this->coords[1])!=$numpoints ) { - JpGraphError::RaiseL(2003,count($this->coords[1]),$numpoints); - //"Number of X and Y points are not equal. Number of X-points:".count($this->coords[1])."Number of Y-points:$numpoints"); - } - else { - $exist_x = true; - } - } - else { - $exist_x = false; - } - - - $numbars=count($this->coords[0]); - - // Use GetMinVal() instead of scale[0] directly since in the case - // of log scale we get a correct value. Log scales will have negative - // values for values < 1 while still not representing negative numbers. - if( $yscale->GetMinVal() >= 0 ) - $zp=$yscale->scale_abs[0]; - else { - $zp=$yscale->Translate(0); - } - - if( $this->abswidth > -1 ) { - $abswidth=$this->abswidth; - } - else { - $abswidth=round($this->width*$xscale->scale_factor,0); - } - - // Count pontetial pattern array to avoid doing the count for each iteration - if( is_array($this->iPattern) ) { - $np = count($this->iPattern); - } - - $grad = null; - for($i=0; $i < $numbars; ++$i) { - - // If value is NULL, or 0 then don't draw a bar at all - if ($this->coords[0][$i] === null || $this->coords[0][$i] === '' ) - continue; - - if( $exist_x ) { - $x=$this->coords[1][$i]; - } - else { - $x=$i; - } - - $x=$xscale->Translate($x); - - // Comment Note: This confuses the positioning when using acc together with - // grouped bars. Workaround for fixing #191 - /* - if( !$xscale->textscale ) { - if($this->align=="center") - $x -= $abswidth/2; - elseif($this->align=="right") - $x -= $abswidth; - } - */ - // Stroke fill color and fill gradient - $pts=array( - $x,$zp, - $x,$yscale->Translate($this->coords[0][$i]), - $x+$abswidth,$yscale->Translate($this->coords[0][$i]), - $x+$abswidth,$zp); - if( $this->grad ) { - if( $grad === null ) { - $grad = new Gradient($img); - } - if( is_array($this->grad_fromcolor) ) { - // The first argument (grad_fromcolor) can be either an array or a single color. If it is an array - // then we have two choices. It can either a) be a single color specified as an RGB triple or it can be - // an array to specify both (from, to style) for each individual bar. The way to know the difference is - // to investgate the first element. If this element is an integer [0,255] then we assume it is an RGB - // triple. - $ng = count($this->grad_fromcolor); - if( $ng === 3 ) { - if( is_numeric($this->grad_fromcolor[0]) && $this->grad_fromcolor[0] > 0 && $this->grad_fromcolor[0] < 256 ) { - // RGB Triple - $fromcolor = $this->grad_fromcolor; - $tocolor = $this->grad_tocolor; - $style = $this->grad_style; - } - else { - $fromcolor = $this->grad_fromcolor[$i % $ng][0]; - $tocolor = $this->grad_fromcolor[$i % $ng][1]; - $style = $this->grad_fromcolor[$i % $ng][2]; - } - } - else { - $fromcolor = $this->grad_fromcolor[$i % $ng][0]; - $tocolor = $this->grad_fromcolor[$i % $ng][1]; - $style = $this->grad_fromcolor[$i % $ng][2]; - } - $grad->FilledRectangle($pts[2],$pts[3], - $pts[6],$pts[7], - $fromcolor,$tocolor,$style); - } - else { - $grad->FilledRectangle($pts[2],$pts[3], - $pts[6],$pts[7], - $this->grad_fromcolor,$this->grad_tocolor,$this->grad_style); - } - } - elseif( !empty($this->fill_color) ) { - if(is_array($this->fill_color)) { - $img->PushColor($this->fill_color[$i % count($this->fill_color)]); - } else { - $img->PushColor($this->fill_color); - } - $img->FilledPolygon($pts); - $img->PopColor(); - } - - - // Remember value of this bar - $val=$this->coords[0][$i]; - - if( !empty($val) && !is_numeric($val) ) { - JpGraphError::RaiseL(2004,$i,$val); - //'All values for a barplot must be numeric. You have specified value['.$i.'] == \''.$val.'\''); - } - - // Determine the shadow - if( $this->bar_shadow && $val != 0) { - - $ssh = $this->bar_shadow_hsize; - $ssv = $this->bar_shadow_vsize; - // Create points to create a "upper-right" shadow - if( $val > 0 ) { - $sp[0]=$pts[6]; $sp[1]=$pts[7]; - $sp[2]=$pts[4]; $sp[3]=$pts[5]; - $sp[4]=$pts[2]; $sp[5]=$pts[3]; - $sp[6]=$pts[2]+$ssh; $sp[7]=$pts[3]-$ssv; - $sp[8]=$pts[4]+$ssh; $sp[9]=$pts[5]-$ssv; - $sp[10]=$pts[6]+$ssh; $sp[11]=$pts[7]-$ssv; - } - elseif( $val < 0 ) { - $sp[0]=$pts[4]; $sp[1]=$pts[5]; - $sp[2]=$pts[6]; $sp[3]=$pts[7]; - $sp[4]=$pts[0]; $sp[5]=$pts[1]; - $sp[6]=$pts[0]+$ssh; $sp[7]=$pts[1]-$ssv; - $sp[8]=$pts[6]+$ssh; $sp[9]=$pts[7]-$ssv; - $sp[10]=$pts[4]+$ssh; $sp[11]=$pts[5]-$ssv; - } - if( is_array($this->bar_shadow_color) ) { - $numcolors = count($this->bar_shadow_color); - if( $numcolors == 0 ) { - JpGraphError::RaiseL(2005);//('You have specified an empty array for shadow colors in the bar plot.'); - } - $img->PushColor($this->bar_shadow_color[$i % $numcolors]); - } - else { - $img->PushColor($this->bar_shadow_color); - } - $img->FilledPolygon($sp); - $img->PopColor(); - } - - // Stroke the pattern - if( is_array($this->iPattern) ) { - $f = new RectPatternFactory(); - if( is_array($this->iPatternColor) ) { - $pcolor = $this->iPatternColor[$i % $np]; - } - else { - $pcolor = $this->iPatternColor; - } - $prect = $f->Create($this->iPattern[$i % $np],$pcolor,1); - $prect->SetDensity($this->iPatternDensity[$i % $np]); - - if( $val < 0 ) { - $rx = $pts[0]; - $ry = $pts[1]; - } - else { - $rx = $pts[2]; - $ry = $pts[3]; - } - $width = abs($pts[4]-$pts[0])+1; - $height = abs($pts[1]-$pts[3])+1; - $prect->SetPos(new Rectangle($rx,$ry,$width,$height)); - $prect->Stroke($img); - } - else { - if( $this->iPattern > -1 ) { - $f = new RectPatternFactory(); - $prect = $f->Create($this->iPattern,$this->iPatternColor,1); - $prect->SetDensity($this->iPatternDensity); - if( $val < 0 ) { - $rx = $pts[0]; - $ry = $pts[1]; - } - else { - $rx = $pts[2]; - $ry = $pts[3]; - } - $width = abs($pts[4]-$pts[0])+1; - $height = abs($pts[1]-$pts[3])+1; - $prect->SetPos(new Rectangle($rx,$ry,$width,$height)); - $prect->Stroke($img); - } - } - - // Stroke the outline of the bar - if( is_array($this->color) ) { - $img->SetColor($this->color[$i % count($this->color)]); - } - else { - $img->SetColor($this->color); - } - - $pts[] = $pts[0]; - $pts[] = $pts[1]; - - if( $this->weight > 0 ) { - $img->SetLineWeight($this->weight); - $img->Polygon($pts); - } - - // Determine how to best position the values of the individual bars - $x=$pts[2]+($pts[4]-$pts[2])/2; - $this->value->SetMargin(5); - - if( $this->valuepos=='top' ) { - $y=$pts[3]; - if( $img->a === 90 ) { - if( $val < 0 ) { - $this->value->SetAlign('right','center'); - } - else { - $this->value->SetAlign('left','center'); - } - - } - else { - if( $val < 0 ) { - $this->value->SetMargin(-5); - $y=$pts[1]; - $this->value->SetAlign('center','bottom'); - } - else { - $this->value->SetAlign('center','bottom'); - } - - } - $this->value->Stroke($img,$val,$x,$y); - } - elseif( $this->valuepos=='max' ) { - $y=$pts[3]; - if( $img->a === 90 ) { - if( $val < 0 ) - $this->value->SetAlign('left','center'); - else - $this->value->SetAlign('right','center'); - } - else { - if( $val < 0 ) { - $this->value->SetAlign('center','bottom'); - } - else { - $this->value->SetAlign('center','top'); - } - } - $this->value->SetMargin(-5); - $this->value->Stroke($img,$val,$x,$y); - } - elseif( $this->valuepos=='center' ) { - $y = ($pts[3] + $pts[1])/2; - $this->value->SetAlign('center','center'); - $this->value->SetMargin(0); - $this->value->Stroke($img,$val,$x,$y); - } - elseif( $this->valuepos=='bottom' || $this->valuepos=='min' ) { - $y=$pts[1]; - if( $img->a === 90 ) { - if( $val < 0 ) - $this->value->SetAlign('right','center'); - else - $this->value->SetAlign('left','center'); - } - $this->value->SetMargin(3); - $this->value->Stroke($img,$val,$x,$y); - } - else { - JpGraphError::RaiseL(2006,$this->valuepos); - //'Unknown position for values on bars :'.$this->valuepos); - } - // Create the client side image map - $rpts = $img->ArrRotate($pts); - $csimcoord=round($rpts[0]).", ".round($rpts[1]); - for( $j=1; $j < 4; ++$j){ - $csimcoord .= ", ".round($rpts[2*$j]).", ".round($rpts[2*$j+1]); - } - if( !empty($this->csimtargets[$i]) ) { - $this->csimareas .= 'csimareas .= " href=\"".htmlentities($this->csimtargets[$i])."\""; - - if( !empty($this->csimwintargets[$i]) ) { - $this->csimareas .= " target=\"".$this->csimwintargets[$i]."\" "; - } - - $sval=''; - if( !empty($this->csimalts[$i]) ) { - $sval=sprintf($this->csimalts[$i],$this->coords[0][$i]); - $this->csimareas .= " title=\"$sval\" alt=\"$sval\" "; - } - $this->csimareas .= " />\n"; - } - } - return true; - } -} // Class - -//=================================================== -// CLASS GroupBarPlot -// Description: Produce grouped bar plots -//=================================================== -class GroupBarPlot extends BarPlot { - private $plots, $nbrplots=0; - //--------------- - // CONSTRUCTOR - function __construct($plots) { - $this->width=0.7; - $this->plots = $plots; - $this->nbrplots = count($plots); - if( $this->nbrplots < 1 ) { - JpGraphError::RaiseL(2007);//('Cannot create GroupBarPlot from empty plot array.'); - } - for($i=0; $i < $this->nbrplots; ++$i ) { - if( empty($this->plots[$i]) || !isset($this->plots[$i]) ) { - JpGraphError::RaiseL(2008,$i);//("Group bar plot element nbr $i is undefined or empty."); - } - } - $this->numpoints = $plots[0]->numpoints; - $this->width=0.7; - } - - //--------------- - // PUBLIC METHODS - function Legend($graph) { - $n = count($this->plots); - for($i=0; $i < $n; ++$i) { - $c = get_class($this->plots[$i]); - if( !($this->plots[$i] instanceof BarPlot) ) { - JpGraphError::RaiseL(2009,$c); - //('One of the objects submitted to GroupBar is not a BarPlot. Make sure that you create the Group Bar plot from an array of BarPlot or AccBarPlot objects. (Class = '.$c.')'); - } - $this->plots[$i]->DoLegend($graph); - } - } - - function Min() { - list($xmin,$ymin) = $this->plots[0]->Min(); - $n = count($this->plots); - for($i=0; $i < $n; ++$i) { - list($xm,$ym) = $this->plots[$i]->Min(); - $xmin = max($xmin,$xm); - $ymin = min($ymin,$ym); - } - return array($xmin,$ymin); - } - - function Max() { - list($xmax,$ymax) = $this->plots[0]->Max(); - $n = count($this->plots); - for($i=0; $i < $n; ++$i) { - list($xm,$ym) = $this->plots[$i]->Max(); - $xmax = max($xmax,$xm); - $ymax = max($ymax,$ym); - } - return array($xmax,$ymax); - } - - function GetCSIMareas() { - $n = count($this->plots); - $csimareas=''; - for($i=0; $i < $n; ++$i) { - $csimareas .= $this->plots[$i]->csimareas; - } - return $csimareas; - } - - // Stroke all the bars next to each other - function Stroke($img,$xscale,$yscale) { - $tmp=$xscale->off; - $n = count($this->plots); - $subwidth = $this->width/$this->nbrplots ; - - for( $i=0; $i < $n; ++$i ) { - $this->plots[$i]->ymin=$this->ybase; - $this->plots[$i]->SetWidth($subwidth); - - // If the client have used SetTextTickInterval() then - // major_step will be > 1 and the positioning will fail. - // If we assume it is always one the positioning will work - // fine with a text scale but this will not work with - // arbitrary linear scale - $xscale->off = $tmp+$i*round($xscale->scale_factor* $subwidth); - $this->plots[$i]->Stroke($img,$xscale,$yscale); - } - $xscale->off=$tmp; - } -} // Class - -//=================================================== -// CLASS AccBarPlot -// Description: Produce accumulated bar plots -//=================================================== -class AccBarPlot extends BarPlot { - private $plots=null,$nbrplots=0; - //--------------- - // CONSTRUCTOR - function __construct($plots) { - $this->plots = $plots; - $this->nbrplots = count($plots); - if( $this->nbrplots < 1 ) { - JpGraphError::RaiseL(2010);//('Cannot create AccBarPlot from empty plot array.'); - } - for($i=0; $i < $this->nbrplots; ++$i ) { - if( empty($this->plots[$i]) || !isset($this->plots[$i]) ) { - JpGraphError::RaiseL(2011,$i);//("Acc bar plot element nbr $i is undefined or empty."); - } - } - - // We can only allow individual plost which do not have specified X-positions - for($i=0; $i < $this->nbrplots; ++$i ) { - if( !empty($this->plots[$i]->coords[1]) ) { - JpGraphError::RaiseL(2015); - //'Individual bar plots in an AccBarPlot or GroupBarPlot can not have specified X-positions.'); - } - } - - // Use 0 weight by default which means that the individual bar - // weights will be used per part n the accumulated bar - $this->SetWeight(0); - - $this->numpoints = $plots[0]->numpoints; - $this->value = new DisplayValue(); - } - - //--------------- - // PUBLIC METHODS - function Legend($graph) { - $n = count($this->plots); - for( $i=$n-1; $i >= 0; --$i ) { - $c = get_class($this->plots[$i]); - if( !($this->plots[$i] instanceof BarPlot) ) { - JpGraphError::RaiseL(2012,$c); - //('One of the objects submitted to AccBar is not a BarPlot. Make sure that you create the AccBar plot from an array of BarPlot objects.(Class='.$c.')'); - } - $this->plots[$i]->DoLegend($graph); - } - } - - function Max() { - list($xmax) = $this->plots[0]->Max(); - $nmax=0; - for($i=0; $i < count($this->plots); ++$i) { - $n = count($this->plots[$i]->coords[0]); - $nmax = max($nmax,$n); - list($x) = $this->plots[$i]->Max(); - $xmax = max($xmax,$x); - } - for( $i = 0; $i < $nmax; $i++ ) { - // Get y-value for bar $i by adding the - // individual bars from all the plots added. - // It would be wrong to just add the - // individual plots max y-value since that - // would in most cases give to large y-value. - $y=0; - if( !isset($this->plots[0]->coords[0][$i]) ) { - JpGraphError::RaiseL(2014); - } - if( $this->plots[0]->coords[0][$i] > 0 ) - $y=$this->plots[0]->coords[0][$i]; - for( $j = 1; $j < $this->nbrplots; $j++ ) { - if( !isset($this->plots[$j]->coords[0][$i]) ) { - JpGraphError::RaiseL(2014); - } - if( $this->plots[$j]->coords[0][$i] > 0 ) - $y += $this->plots[$j]->coords[0][$i]; - } - $ymax[$i] = $y; - } - $ymax = max($ymax); - - // Bar always start at baseline - if( $ymax <= $this->ybase ) - $ymax = $this->ybase; - return array($xmax,$ymax); - } - - function Min() { - $nmax=0; - list($xmin,$ysetmin) = $this->plots[0]->Min(); - for($i=0; $i < count($this->plots); ++$i) { - $n = count($this->plots[$i]->coords[0]); - $nmax = max($nmax,$n); - list($x,$y) = $this->plots[$i]->Min(); - $xmin = Min($xmin,$x); - $ysetmin = Min($y,$ysetmin); - } - for( $i = 0; $i < $nmax; $i++ ) { - // Get y-value for bar $i by adding the - // individual bars from all the plots added. - // It would be wrong to just add the - // individual plots max y-value since that - // would in most cases give to large y-value. - $y=0; - if( $this->plots[0]->coords[0][$i] < 0 ) - $y=$this->plots[0]->coords[0][$i]; - for( $j = 1; $j < $this->nbrplots; $j++ ) { - if( $this->plots[$j]->coords[0][$i] < 0 ) - $y += $this->plots[ $j ]->coords[0][$i]; - } - $ymin[$i] = $y; - } - $ymin = Min($ysetmin,Min($ymin)); - // Bar always start at baseline - if( $ymin >= $this->ybase ) - $ymin = $this->ybase; - return array($xmin,$ymin); - } - - // Stroke acc bar plot - function Stroke($img,$xscale,$yscale) { - $pattern=NULL; - $img->SetLineWeight($this->weight); - $grad=null; - for($i=0; $i < $this->numpoints-1; $i++) { - $accy = 0; - $accy_neg = 0; - for($j=0; $j < $this->nbrplots; ++$j ) { - $img->SetColor($this->plots[$j]->color); - - if ( $this->plots[$j]->coords[0][$i] >= 0) { - $yt=$yscale->Translate($this->plots[$j]->coords[0][$i]+$accy); - $accyt=$yscale->Translate($accy); - $accy+=$this->plots[$j]->coords[0][$i]; - } - else { - //if ( $this->plots[$j]->coords[0][$i] < 0 || $accy_neg < 0 ) { - $yt=$yscale->Translate($this->plots[$j]->coords[0][$i]+$accy_neg); - $accyt=$yscale->Translate($accy_neg); - $accy_neg+=$this->plots[$j]->coords[0][$i]; - } - - $xt=$xscale->Translate($i); - - if( $this->abswidth > -1 ) { - $abswidth=$this->abswidth; - } - else { - $abswidth=round($this->width*$xscale->scale_factor,0); - } - - $pts=array($xt,$accyt,$xt,$yt,$xt+$abswidth,$yt,$xt+$abswidth,$accyt); - - if( $this->bar_shadow ) { - $ssh = $this->bar_shadow_hsize; - $ssv = $this->bar_shadow_vsize; - - // We must also differ if we are a positive or negative bar. - if( $j === 0 ) { - // This gets extra complicated since we have to - // see all plots to see if we are negative. It could - // for example be that all plots are 0 until the very - // last one. We therefore need to save the initial setup - // for both the negative and positive case - - // In case the final bar is positive - $sp[0]=$pts[6]+1; $sp[1]=$pts[7]; - $sp[2]=$pts[6]+$ssh; $sp[3]=$pts[7]-$ssv; - - // In case the final bar is negative - $nsp[0]=$pts[0]; $nsp[1]=$pts[1]; - $nsp[2]=$pts[0]+$ssh; $nsp[3]=$pts[1]-$ssv; - $nsp[4]=$pts[6]+$ssh; $nsp[5]=$pts[7]-$ssv; - $nsp[10]=$pts[6]+1; $nsp[11]=$pts[7]; - } - - if( $j === $this->nbrplots-1 ) { - // If this is the last plot of the bar and - // the total value is larger than 0 then we - // add the shadow. - if( is_array($this->bar_shadow_color) ) { - $numcolors = count($this->bar_shadow_color); - if( $numcolors == 0 ) { - JpGraphError::RaiseL(2013);//('You have specified an empty array for shadow colors in the bar plot.'); - } - $img->PushColor($this->bar_shadow_color[$i % $numcolors]); - } - else { - $img->PushColor($this->bar_shadow_color); - } - - if( $accy > 0 ) { - $sp[4]=$pts[4]+$ssh; $sp[5]=$pts[5]-$ssv; - $sp[6]=$pts[2]+$ssh; $sp[7]=$pts[3]-$ssv; - $sp[8]=$pts[2]; $sp[9]=$pts[3]-1; - $sp[10]=$pts[4]+1; $sp[11]=$pts[5]; - $img->FilledPolygon($sp,4); - } - elseif( $accy_neg < 0 ) { - $nsp[6]=$pts[4]+$ssh; $nsp[7]=$pts[5]-$ssv; - $nsp[8]=$pts[4]+1; $nsp[9]=$pts[5]; - $img->FilledPolygon($nsp,4); - } - $img->PopColor(); - } - } - - - // If value is NULL or 0, then don't draw a bar at all - if ($this->plots[$j]->coords[0][$i] == 0 ) continue; - - if( $this->plots[$j]->grad ) { - if( $grad === null ) { - $grad = new Gradient($img); - } - if( is_array($this->plots[$j]->grad_fromcolor) ) { - // The first argument (grad_fromcolor) can be either an array or a single color. If it is an array - // then we have two choices. It can either a) be a single color specified as an RGB triple or it can be - // an array to specify both (from, to style) for each individual bar. The way to know the difference is - // to investgate the first element. If this element is an integer [0,255] then we assume it is an RGB - // triple. - $ng = count($this->plots[$j]->grad_fromcolor); - if( $ng === 3 ) { - if( is_numeric($this->plots[$j]->grad_fromcolor[0]) && $this->plots[$j]->grad_fromcolor[0] > 0 && - $this->plots[$j]->grad_fromcolor[0] < 256 ) { - // RGB Triple - $fromcolor = $this->plots[$j]->grad_fromcolor; - $tocolor = $this->plots[$j]->grad_tocolor; - $style = $this->plots[$j]->grad_style; - } - else { - $fromcolor = $this->plots[$j]->grad_fromcolor[$i % $ng][0]; - $tocolor = $this->plots[$j]->grad_fromcolor[$i % $ng][1]; - $style = $this->plots[$j]->grad_fromcolor[$i % $ng][2]; - } - } - else { - $fromcolor = $this->plots[$j]->grad_fromcolor[$i % $ng][0]; - $tocolor = $this->plots[$j]->grad_fromcolor[$i % $ng][1]; - $style = $this->plots[$j]->grad_fromcolor[$i % $ng][2]; - } - $grad->FilledRectangle($pts[2],$pts[3], - $pts[6],$pts[7], - $fromcolor,$tocolor,$style); - } - else { - $grad->FilledRectangle($pts[2],$pts[3], - $pts[6],$pts[7], - $this->plots[$j]->grad_fromcolor, - $this->plots[$j]->grad_tocolor, - $this->plots[$j]->grad_style); - } - } else { - if (is_array($this->plots[$j]->fill_color) ) { - $numcolors = count($this->plots[$j]->fill_color); - $fillcolor = $this->plots[$j]->fill_color[$i % $numcolors]; - // If the bar is specified to be non filled then the fill color is false - if( $fillcolor !== false ) { - $img->SetColor($this->plots[$j]->fill_color[$i % $numcolors]); - } - } - else { - $fillcolor = $this->plots[$j]->fill_color; - if( $fillcolor !== false ) { - $img->SetColor($this->plots[$j]->fill_color); - } - } - if( $fillcolor !== false ) { - $img->FilledPolygon($pts); - } - } - - $img->SetColor($this->plots[$j]->color); - - // Stroke the pattern - if( $this->plots[$j]->iPattern > -1 ) { - if( $pattern===NULL ) { - $pattern = new RectPatternFactory(); - } - - $prect = $pattern->Create($this->plots[$j]->iPattern,$this->plots[$j]->iPatternColor,1); - $prect->SetDensity($this->plots[$j]->iPatternDensity); - if( $this->plots[$j]->coords[0][$i] < 0 ) { - $rx = $pts[0]; - $ry = $pts[1]; - } - else { - $rx = $pts[2]; - $ry = $pts[3]; - } - $width = abs($pts[4]-$pts[0])+1; - $height = abs($pts[1]-$pts[3])+1; - $prect->SetPos(new Rectangle($rx,$ry,$width,$height)); - $prect->Stroke($img); - } - - - // CSIM array - - if( $i < count($this->plots[$j]->csimtargets) ) { - // Create the client side image map - $rpts = $img->ArrRotate($pts); - $csimcoord=round($rpts[0]).", ".round($rpts[1]); - for( $k=1; $k < 4; ++$k){ - $csimcoord .= ", ".round($rpts[2*$k]).", ".round($rpts[2*$k+1]); - } - if( ! empty($this->plots[$j]->csimtargets[$i]) ) { - $this->csimareas.= 'csimareas.= " href=\"".$this->plots[$j]->csimtargets[$i]."\" "; - - if( ! empty($this->plots[$j]->csimwintargets[$i]) ) { - $this->csimareas.= " target=\"".$this->plots[$j]->csimwintargets[$i]."\" "; - } - - $sval=''; - if( !empty($this->plots[$j]->csimalts[$i]) ) { - $sval=sprintf($this->plots[$j]->csimalts[$i],$this->plots[$j]->coords[0][$i]); - $this->csimareas .= " title=\"$sval\" "; - } - $this->csimareas .= " alt=\"$sval\" />\n"; - } - } - - $pts[] = $pts[0]; - $pts[] = $pts[1]; - $img->SetLineWeight($this->plots[$j]->weight); - $img->Polygon($pts); - $img->SetLineWeight(1); - } - - // Daw potential bar around the entire accbar bar - if( $this->weight > 0 ) { - $y=$yscale->Translate(0); - $img->SetColor($this->color); - $img->SetLineWeight($this->weight); - $img->Rectangle($pts[0],$y,$pts[6],$pts[5]); - } - - // Draw labels for each acc.bar - - $x=$pts[2]+($pts[4]-$pts[2])/2; - if($this->bar_shadow) $x += $ssh; - - // First stroke the accumulated value for the entire bar - // This value is always placed at the top/bottom of the bars - if( $accy_neg < 0 ) { - $y=$yscale->Translate($accy_neg); - $this->value->Stroke($img,$accy_neg,$x,$y); - } - else { - $y=$yscale->Translate($accy); - $this->value->Stroke($img,$accy,$x,$y); - } - - $accy = 0; - $accy_neg = 0; - for($j=0; $j < $this->nbrplots; ++$j ) { - - // We don't print 0 values in an accumulated bar plot - if( $this->plots[$j]->coords[0][$i] == 0 ) continue; - - if ($this->plots[$j]->coords[0][$i] > 0) { - $yt=$yscale->Translate($this->plots[$j]->coords[0][$i]+$accy); - $accyt=$yscale->Translate($accy); - if( $this->plots[$j]->valuepos=='center' ) { - $y = $accyt-($accyt-$yt)/2; - } - elseif( $this->plots[$j]->valuepos=='bottom' ) { - $y = $accyt; - } - else { // top or max - $y = $accyt-($accyt-$yt); - } - $accy+=$this->plots[$j]->coords[0][$i]; - if( $this->plots[$j]->valuepos=='center' ) { - $this->plots[$j]->value->SetAlign("center","center"); - $this->plots[$j]->value->SetMargin(0); - } - elseif( $this->plots[$j]->valuepos=='bottom' ) { - $this->plots[$j]->value->SetAlign('center','bottom'); - $this->plots[$j]->value->SetMargin(2); - } - else { - $this->plots[$j]->value->SetAlign('center','top'); - $this->plots[$j]->value->SetMargin(1); - } - } else { - $yt=$yscale->Translate($this->plots[$j]->coords[0][$i]+$accy_neg); - $accyt=$yscale->Translate($accy_neg); - $accy_neg+=$this->plots[$j]->coords[0][$i]; - if( $this->plots[$j]->valuepos=='center' ) { - $y = $accyt-($accyt-$yt)/2; - } - elseif( $this->plots[$j]->valuepos=='bottom' ) { - $y = $accyt; - } - else { - $y = $accyt-($accyt-$yt); - } - if( $this->plots[$j]->valuepos=='center' ) { - $this->plots[$j]->value->SetAlign("center","center"); - $this->plots[$j]->value->SetMargin(0); - } - elseif( $this->plots[$j]->valuepos=='bottom' ) { - $this->plots[$j]->value->SetAlign('center',$j==0 ? 'bottom':'top'); - $this->plots[$j]->value->SetMargin(-2); - } - else { - $this->plots[$j]->value->SetAlign('center','bottom'); - $this->plots[$j]->value->SetMargin(-1); - } - } - $this->plots[$j]->value->Stroke($img,$this->plots[$j]->coords[0][$i],$x,$y); - } - - } - return true; - } -} // Class - -/* EOF */ -?> diff --git a/html/lib/jpgraph/jpgraph_canvas.php b/html/lib/jpgraph/jpgraph_canvas.php deleted file mode 100644 index f6e23e47e6..0000000000 --- a/html/lib/jpgraph/jpgraph_canvas.php +++ /dev/null @@ -1,119 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -/*======================================================================= - // File: JPGRAPH_CANVAS.PHP - // Description: Canvas drawing extension for JpGraph - // Created: 2001-01-08 - // Ver: $Id: jpgraph_canvas.php 1923 2010-01-11 13:48:49Z ljp $ - // - // Copyright (c) Aditus Consulting. All rights reserved. - //======================================================================== - */ - -//=================================================== -// CLASS CanvasGraph -// Description: Creates a simple canvas graph which -// might be used together with the basic Image drawing -// primitives. Useful to auickoly produce some arbitrary -// graphic which benefits from all the functionality in the -// graph liek caching for example. -//=================================================== -class CanvasGraph extends Graph { - //--------------- - // CONSTRUCTOR - function __construct($aWidth=300,$aHeight=200,$aCachedName="",$timeout=0,$inline=1) { - parent::__construct($aWidth,$aHeight,$aCachedName,$timeout,$inline); - } - - //--------------- - // PUBLIC METHODS - - function InitFrame() { - $this->StrokePlotArea(); - } - - // Method description - function Stroke($aStrokeFileName="") { - if( $this->texts != null ) { - for($i=0; $i < count($this->texts); ++$i) { - $this->texts[$i]->Stroke($this->img); - } - } - if( $this->iTables !== null ) { - for($i=0; $i < count($this->iTables); ++$i) { - $this->iTables[$i]->Stroke($this->img); - } - } - $this->StrokeTitles(); - - // If the filename is the predefined value = '_csim_special_' - // we assume that the call to stroke only needs to do enough - // to correctly generate the CSIM maps. - // We use this variable to skip things we don't strictly need - // to do to generate the image map to improve performance - // a best we can. Therefor you will see a lot of tests !$_csim in the - // code below. - $_csim = ($aStrokeFileName===_CSIM_SPECIALFILE); - - // We need to know if we have stroked the plot in the - // GetCSIMareas. Otherwise the CSIM hasn't been generated - // and in the case of GetCSIM called before stroke to generate - // CSIM without storing an image to disk GetCSIM must call Stroke. - $this->iHasStroked = true; - - if( !$_csim ) { - - // Should we do any final image transformation - if( $this->iImgTrans ) { - if( !class_exists('ImgTrans',false) ) { - require_once('jpgraph_imgtrans.php'); - } - - $tform = new ImgTrans($this->img->img); - $this->img->img = $tform->Skew3D($this->iImgTransHorizon,$this->iImgTransSkewDist, - $this->iImgTransDirection,$this->iImgTransHighQ, - $this->iImgTransMinSize,$this->iImgTransFillColor, - $this->iImgTransBorder); - } - - - // If the filename is given as the special _IMG_HANDLER - // then the image handler is returned and the image is NOT - // streamed back - if( $aStrokeFileName == _IMG_HANDLER ) { - return $this->img->img; - } - else { - // Finally stream the generated picture - $this->cache->PutAndStream($this->img,$this->cache_name,$this->inline,$aStrokeFileName); - return true; - } - } - } -} // Class - -/* EOF */ -?> \ No newline at end of file diff --git a/html/lib/jpgraph/jpgraph_canvtools.php b/html/lib/jpgraph/jpgraph_canvtools.php deleted file mode 100644 index ff8e010f54..0000000000 --- a/html/lib/jpgraph/jpgraph_canvtools.php +++ /dev/null @@ -1,547 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -/*======================================================================= - // File: JPGRAPH_CANVTOOLS.PHP - // Description: Some utilities for text and shape drawing on a canvas - // Created: 2002-08-23 - // Ver: $Id: jpgraph_canvtools.php 1857 2009-09-28 14:38:14Z ljp $ - // - // Copyright (c) Aditus Consulting. All rights reserved. - //======================================================================== - */ - -define('CORNER_TOPLEFT',0); -define('CORNER_TOPRIGHT',1); -define('CORNER_BOTTOMRIGHT',2); -define('CORNER_BOTTOMLEFT',3); - - -//=================================================== -// CLASS CanvasScale -// Description: Define a scale for canvas so we -// can abstract away with absolute pixels -//=================================================== - -class CanvasScale { - private $g; - private $w,$h; - private $ixmin=0,$ixmax=10,$iymin=0,$iymax=10; - - function __construct($graph,$xmin=0,$xmax=10,$ymin=0,$ymax=10) { - $this->g = $graph; - $this->w = $graph->img->width; - $this->h = $graph->img->height; - $this->ixmin = $xmin; - $this->ixmax = $xmax; - $this->iymin = $ymin; - $this->iymax = $ymax; - } - - function Set($xmin=0,$xmax=10,$ymin=0,$ymax=10) { - $this->ixmin = $xmin; - $this->ixmax = $xmax; - $this->iymin = $ymin; - $this->iymax = $ymax; - } - - function Get() { - return array($this->ixmin,$this->ixmax,$this->iymin,$this->iymax); - } - - function Translate($x,$y) { - $xp = round(($x-$this->ixmin)/($this->ixmax - $this->ixmin) * $this->w); - $yp = round(($y-$this->iymin)/($this->iymax - $this->iymin) * $this->h); - return array($xp,$yp); - } - - function TranslateX($x) { - $xp = round(($x-$this->ixmin)/($this->ixmax - $this->ixmin) * $this->w); - return $xp; - } - - function TranslateY($y) { - $yp = round(($y-$this->iymin)/($this->iymax - $this->iymin) * $this->h); - return $yp; - } - -} - - -//=================================================== -// CLASS Shape -// Description: Methods to draw shapes on canvas -//=================================================== -class Shape { - private $img,$scale; - - function __construct($aGraph,$scale) { - $this->img = $aGraph->img; - $this->img->SetColor('black'); - $this->scale = $scale; - } - - function SetColor($aColor) { - $this->img->SetColor($aColor); - } - - function Line($x1,$y1,$x2,$y2) { - list($x1,$y1) = $this->scale->Translate($x1,$y1); - list($x2,$y2) = $this->scale->Translate($x2,$y2); - $this->img->Line($x1,$y1,$x2,$y2); - } - - function SetLineWeight($aWeight) { - $this->img->SetLineWeight($aWeight); - } - - function Polygon($p,$aClosed=false) { - $n=count($p); - for($i=0; $i < $n; $i+=2 ) { - $p[$i] = $this->scale->TranslateX($p[$i]); - $p[$i+1] = $this->scale->TranslateY($p[$i+1]); - } - $this->img->Polygon($p,$aClosed); - } - - function FilledPolygon($p) { - $n=count($p); - for($i=0; $i < $n; $i+=2 ) { - $p[$i] = $this->scale->TranslateX($p[$i]); - $p[$i+1] = $this->scale->TranslateY($p[$i+1]); - } - $this->img->FilledPolygon($p); - } - - - // Draw a bezier curve with defining points in the $aPnts array - // using $aSteps steps. - // 0=x0, 1=y0 - // 2=x1, 3=y1 - // 4=x2, 5=y2 - // 6=x3, 7=y3 - function Bezier($p,$aSteps=40) { - $x0 = $p[0]; - $y0 = $p[1]; - // Calculate coefficients - $cx = 3*($p[2]-$p[0]); - $bx = 3*($p[4]-$p[2])-$cx; - $ax = $p[6]-$p[0]-$cx-$bx; - $cy = 3*($p[3]-$p[1]); - $by = 3*($p[5]-$p[3])-$cy; - $ay = $p[7]-$p[1]-$cy-$by; - - // Step size - $delta = 1.0/$aSteps; - - $x_old = $x0; - $y_old = $y0; - for($t=$delta; $t<=1.0; $t+=$delta) { - $tt = $t*$t; $ttt=$tt*$t; - $x = $ax*$ttt + $bx*$tt + $cx*$t + $x0; - $y = $ay*$ttt + $by*$tt + $cy*$t + $y0; - $this->Line($x_old,$y_old,$x,$y); - $x_old = $x; - $y_old = $y; - } - $this->Line($x_old,$y_old,$p[6],$p[7]); - } - - function Rectangle($x1,$y1,$x2,$y2) { - list($x1,$y1) = $this->scale->Translate($x1,$y1); - list($x2,$y2) = $this->scale->Translate($x2,$y2); - $this->img->Rectangle($x1,$y1,$x2,$y2); - } - - function FilledRectangle($x1,$y1,$x2,$y2) { - list($x1,$y1) = $this->scale->Translate($x1,$y1); - list($x2,$y2) = $this->scale->Translate($x2,$y2); - $this->img->FilledRectangle($x1,$y1,$x2,$y2); - } - - function Circle($x1,$y1,$r) { - list($x1,$y1) = $this->scale->Translate($x1,$y1); - if( $r >= 0 ) - $r = $this->scale->TranslateX($r); - else - $r = -$r; - $this->img->Circle($x1,$y1,$r); - } - - function FilledCircle($x1,$y1,$r) { - list($x1,$y1) = $this->scale->Translate($x1,$y1); - if( $r >= 0 ) - $r = $this->scale->TranslateX($r); - else - $r = -$r; - $this->img->FilledCircle($x1,$y1,$r); - } - - function RoundedRectangle($x1,$y1,$x2,$y2,$r=null) { - list($x1,$y1) = $this->scale->Translate($x1,$y1); - list($x2,$y2) = $this->scale->Translate($x2,$y2); - - if( $r == null ) - $r = 5; - elseif( $r >= 0 ) - $r = $this->scale->TranslateX($r); - else - $r = -$r; - $this->img->RoundedRectangle($x1,$y1,$x2,$y2,$r); - } - - function FilledRoundedRectangle($x1,$y1,$x2,$y2,$r=null) { - list($x1,$y1) = $this->scale->Translate($x1,$y1); - list($x2,$y2) = $this->scale->Translate($x2,$y2); - - if( $r == null ) - $r = 5; - elseif( $r > 0 ) - $r = $this->scale->TranslateX($r); - else - $r = -$r; - $this->img->FilledRoundedRectangle($x1,$y1,$x2,$y2,$r); - } - - function ShadowRectangle($x1,$y1,$x2,$y2,$fcolor=false,$shadow_width=null,$shadow_color=array(102,102,102)) { - list($x1,$y1) = $this->scale->Translate($x1,$y1); - list($x2,$y2) = $this->scale->Translate($x2,$y2); - if( $shadow_width == null ) - $shadow_width=4; - else - $shadow_width=$this->scale->TranslateX($shadow_width); - $this->img->ShadowRectangle($x1,$y1,$x2,$y2,$fcolor,$shadow_width,$shadow_color); - } - - function SetTextAlign($halign,$valign="bottom") { - $this->img->SetTextAlign($halign,$valign="bottom"); - } - - function StrokeText($x1,$y1,$txt,$dir=0,$paragraph_align="left") { - list($x1,$y1) = $this->scale->Translate($x1,$y1); - $this->img->StrokeText($x1,$y1,$txt,$dir,$paragraph_align); - } - - // A rounded rectangle where one of the corner has been moved "into" the - // rectangle 'iw' width and 'ih' height. Corners: - // 0=Top left, 1=top right, 2=bottom right, 3=bottom left - function IndentedRectangle($xt,$yt,$w,$h,$iw=0,$ih=0,$aCorner=3,$aFillColor="",$r=4) { - - list($xt,$yt) = $this->scale->Translate($xt,$yt); - list($w,$h) = $this->scale->Translate($w,$h); - list($iw,$ih) = $this->scale->Translate($iw,$ih); - - $xr = $xt + $w - 0; - $yl = $yt + $h - 0; - - switch( $aCorner ) { - case 0: // Upper left - - // Bottom line, left & right arc - $this->img->Line($xt+$r,$yl,$xr-$r,$yl); - $this->img->Arc($xt+$r,$yl-$r,$r*2,$r*2,90,180); - $this->img->Arc($xr-$r,$yl-$r,$r*2,$r*2,0,90); - - // Right line, Top right arc - $this->img->Line($xr,$yt+$r,$xr,$yl-$r); - $this->img->Arc($xr-$r,$yt+$r,$r*2,$r*2,270,360); - - // Top line, Top left arc - $this->img->Line($xt+$iw+$r,$yt,$xr-$r,$yt); - $this->img->Arc($xt+$iw+$r,$yt+$r,$r*2,$r*2,180,270); - - // Left line - $this->img->Line($xt,$yt+$ih+$r,$xt,$yl-$r); - - // Indent horizontal, Lower left arc - $this->img->Line($xt+$r,$yt+$ih,$xt+$iw-$r,$yt+$ih); - $this->img->Arc($xt+$r,$yt+$ih+$r,$r*2,$r*2,180,270); - - // Indent vertical, Indent arc - $this->img->Line($xt+$iw,$yt+$r,$xt+$iw,$yt+$ih-$r); - $this->img->Arc($xt+$iw-$r,$yt+$ih-$r,$r*2,$r*2,0,90); - - if( $aFillColor != '' ) { - $bc = $this->img->current_color_name; - $this->img->PushColor($aFillColor); - $this->img->FillToBorder($xr-$r,$yl-$r,$bc); - $this->img->PopColor(); - } - - break; - - case 1: // Upper right - - // Bottom line, left & right arc - $this->img->Line($xt+$r,$yl,$xr-$r,$yl); - $this->img->Arc($xt+$r,$yl-$r,$r*2,$r*2,90,180); - $this->img->Arc($xr-$r,$yl-$r,$r*2,$r*2,0,90); - - // Left line, Top left arc - $this->img->Line($xt,$yt+$r,$xt,$yl-$r); - $this->img->Arc($xt+$r,$yt+$r,$r*2,$r*2,180,270); - - // Top line, Top right arc - $this->img->Line($xt+$r,$yt,$xr-$iw-$r,$yt); - $this->img->Arc($xr-$iw-$r,$yt+$r,$r*2,$r*2,270,360); - - // Right line - $this->img->Line($xr,$yt+$ih+$r,$xr,$yl-$r); - - // Indent horizontal, Lower right arc - $this->img->Line($xr-$iw+$r,$yt+$ih,$xr-$r,$yt+$ih); - $this->img->Arc($xr-$r,$yt+$ih+$r,$r*2,$r*2,270,360); - - // Indent vertical, Indent arc - $this->img->Line($xr-$iw,$yt+$r,$xr-$iw,$yt+$ih-$r); - $this->img->Arc($xr-$iw+$r,$yt+$ih-$r,$r*2,$r*2,90,180); - - if( $aFillColor != '' ) { - $bc = $this->img->current_color_name; - $this->img->PushColor($aFillColor); - $this->img->FillToBorder($xt+$r,$yl-$r,$bc); - $this->img->PopColor(); - } - - break; - - case 2: // Lower right - // Top line, Top left & Top right arc - $this->img->Line($xt+$r,$yt,$xr-$r,$yt); - $this->img->Arc($xt+$r,$yt+$r,$r*2,$r*2,180,270); - $this->img->Arc($xr-$r,$yt+$r,$r*2,$r*2,270,360); - - // Left line, Bottom left arc - $this->img->Line($xt,$yt+$r,$xt,$yl-$r); - $this->img->Arc($xt+$r,$yl-$r,$r*2,$r*2,90,180); - - // Bottom line, Bottom right arc - $this->img->Line($xt+$r,$yl,$xr-$iw-$r,$yl); - $this->img->Arc($xr-$iw-$r,$yl-$r,$r*2,$r*2,0,90); - - // Right line - $this->img->Line($xr,$yt+$r,$xr,$yl-$ih-$r); - - // Indent horizontal, Lower right arc - $this->img->Line($xr-$r,$yl-$ih,$xr-$iw+$r,$yl-$ih); - $this->img->Arc($xr-$r,$yl-$ih-$r,$r*2,$r*2,0,90); - - // Indent vertical, Indent arc - $this->img->Line($xr-$iw,$yl-$r,$xr-$iw,$yl-$ih+$r); - $this->img->Arc($xr-$iw+$r,$yl-$ih+$r,$r*2,$r*2,180,270); - - if( $aFillColor != '' ) { - $bc = $this->img->current_color_name; - $this->img->PushColor($aFillColor); - $this->img->FillToBorder($xt+$r,$yt+$r,$bc); - $this->img->PopColor(); - } - - break; - - case 3: // Lower left - // Top line, Top left & Top right arc - $this->img->Line($xt+$r,$yt,$xr-$r,$yt); - $this->img->Arc($xt+$r,$yt+$r,$r*2,$r*2,180,270); - $this->img->Arc($xr-$r,$yt+$r,$r*2,$r*2,270,360); - - // Right line, Bottom right arc - $this->img->Line($xr,$yt+$r,$xr,$yl-$r); - $this->img->Arc($xr-$r,$yl-$r,$r*2,$r*2,0,90); - - // Bottom line, Bottom left arc - $this->img->Line($xt+$iw+$r,$yl,$xr-$r,$yl); - $this->img->Arc($xt+$iw+$r,$yl-$r,$r*2,$r*2,90,180); - - // Left line - $this->img->Line($xt,$yt+$r,$xt,$yl-$ih-$r); - - // Indent horizontal, Lower left arc - $this->img->Line($xt+$r,$yl-$ih,$xt+$iw-$r,$yl-$ih); - $this->img->Arc($xt+$r,$yl-$ih-$r,$r*2,$r*2,90,180); - - // Indent vertical, Indent arc - $this->img->Line($xt+$iw,$yl-$ih+$r,$xt+$iw,$yl-$r); - $this->img->Arc($xt+$iw-$r,$yl-$ih+$r,$r*2,$r*2,270,360); - - if( $aFillColor != '' ) { - $bc = $this->img->current_color_name; - $this->img->PushColor($aFillColor); - $this->img->FillToBorder($xr-$r,$yt+$r,$bc); - $this->img->PopColor(); - } - - break; - } - } -} - - -//=================================================== -// CLASS RectangleText -// Description: Draws a text paragraph inside a -// rounded, possible filled, rectangle. -//=================================================== -class CanvasRectangleText { - private $ix,$iy,$iw,$ih,$ir=4; - private $iTxt,$iColor='black',$iFillColor='',$iFontColor='black'; - private $iParaAlign='center'; - private $iAutoBoxMargin=5; - private $iShadowWidth=3,$iShadowColor=''; - - function __construct($aTxt='',$xl=0,$yt=0,$w=0,$h=0) { - $this->iTxt = new Text($aTxt); - $this->ix = $xl; - $this->iy = $yt; - $this->iw = $w; - $this->ih = $h; - } - - function SetShadow($aColor='gray',$aWidth=3) { - $this->iShadowColor = $aColor; - $this->iShadowWidth = $aWidth; - } - - function SetFont($FontFam,$aFontStyle,$aFontSize=12) { - $this->iTxt->SetFont($FontFam,$aFontStyle,$aFontSize); - } - - function SetTxt($aTxt) { - $this->iTxt->Set($aTxt); - } - - function ParagraphAlign($aParaAlign) { - $this->iParaAlign = $aParaAlign; - } - - function SetFillColor($aFillColor) { - $this->iFillColor = $aFillColor; - } - - function SetAutoMargin($aMargin) { - $this->iAutoBoxMargin=$aMargin; - } - - function SetColor($aColor) { - $this->iColor = $aColor; - } - - function SetFontColor($aColor) { - $this->iFontColor = $aColor; - } - - function SetPos($xl=0,$yt=0,$w=0,$h=0) { - $this->ix = $xl; - $this->iy = $yt; - $this->iw = $w; - $this->ih = $h; - } - - function Pos($xl=0,$yt=0,$w=0,$h=0) { - $this->ix = $xl; - $this->iy = $yt; - $this->iw = $w; - $this->ih = $h; - } - - function Set($aTxt,$xl,$yt,$w=0,$h=0) { - $this->iTxt->Set($aTxt); - $this->ix = $xl; - $this->iy = $yt; - $this->iw = $w; - $this->ih = $h; - } - - function SetCornerRadius($aRad=5) { - $this->ir = $aRad; - } - - function Stroke($aImg,$scale) { - - // If coordinates are specifed as negative this means we should - // treat them as abolsute (pixels) coordinates - if( $this->ix > 0 ) { - $this->ix = $scale->TranslateX($this->ix) ; - } - else { - $this->ix = -$this->ix; - } - - if( $this->iy > 0 ) { - $this->iy = $scale->TranslateY($this->iy) ; - } - else { - $this->iy = -$this->iy; - } - - list($this->iw,$this->ih) = $scale->Translate($this->iw,$this->ih) ; - - if( $this->iw == 0 ) - $this->iw = round($this->iTxt->GetWidth($aImg) + $this->iAutoBoxMargin); - if( $this->ih == 0 ) { - $this->ih = round($this->iTxt->GetTextHeight($aImg) + $this->iAutoBoxMargin); - } - - if( $this->iShadowColor != '' ) { - $aImg->PushColor($this->iShadowColor); - $aImg->FilledRoundedRectangle($this->ix+$this->iShadowWidth, - $this->iy+$this->iShadowWidth, - $this->ix+$this->iw-1+$this->iShadowWidth, - $this->iy+$this->ih-1+$this->iShadowWidth, - $this->ir); - $aImg->PopColor(); - } - - if( $this->iFillColor != '' ) { - $aImg->PushColor($this->iFillColor); - $aImg->FilledRoundedRectangle($this->ix,$this->iy, - $this->ix+$this->iw-1, - $this->iy+$this->ih-1, - $this->ir); - $aImg->PopColor(); - } - - if( $this->iColor != '' ) { - $aImg->PushColor($this->iColor); - $aImg->RoundedRectangle($this->ix,$this->iy, - $this->ix+$this->iw-1, - $this->iy+$this->ih-1, - $this->ir); - $aImg->PopColor(); - } - - $this->iTxt->Align('center','center'); - $this->iTxt->ParagraphAlign($this->iParaAlign); - $this->iTxt->SetColor($this->iFontColor); - $this->iTxt->Stroke($aImg, $this->ix+$this->iw/2, $this->iy+$this->ih/2); - - return array($this->iw, $this->ih); - - } - -} - - -?> \ No newline at end of file diff --git a/html/lib/jpgraph/jpgraph_contour.php b/html/lib/jpgraph/jpgraph_contour.php deleted file mode 100644 index 148eda9d8f..0000000000 --- a/html/lib/jpgraph/jpgraph_contour.php +++ /dev/null @@ -1,611 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -/*======================================================================= -// File: JPGRAPH_CONTOUR.PHP -// Description: Contour plot -// Created: 2009-03-08 -// Ver: $Id: jpgraph_contour.php 1870 2009-09-29 04:24:18Z ljp $ -// -// Copyright (c) Aditus Consulting. All rights reserved. -//======================================================================== -*/ -require_once('jpgraph_meshinterpolate.inc.php'); -define('HORIZ_EDGE',0); -define('VERT_EDGE',1); - -/** - * This class encapsulates the core contour plot algorithm. It will find the path - * of the specified isobars in the data matrix specified. It is assumed that the - * data matrix models an equspaced X-Y mesh of datavalues corresponding to the Z - * values. - * - */ -class Contour { - - private $dataPoints = array(); - private $nbrCols=0,$nbrRows=0; - private $horizEdges = array(), $vertEdges=array(); - private $isobarValues = array(); - private $stack = null; - private $isobarCoord = array(); - private $nbrIsobars = 10, $isobarColors = array(); - private $invert = true; - private $highcontrast = false, $highcontrastbw = false; - - /** - * Create a new contour level "algorithm machine". - * @param $aMatrix The values to find the contour from - * @param $aIsobars Mixed. If integer it determines the number of isobars to be used. The levels are determined - * automatically as equdistance between the min and max value of the matrice. - * If $aIsobars is an array then this is interpretated as an array of values to be used as isobars in the - * contour plot. - * @return an instance of the contour algorithm - */ - function __construct($aMatrix,$aIsobars=10, $aColors=null) { - - $this->nbrRows = count($aMatrix); - $this->nbrCols = count($aMatrix[0]); - $this->dataPoints = $aMatrix; - - if( is_array($aIsobars) ) { - // use the isobar values supplied - $this->nbrIsobars = count($aIsobars); - $this->isobarValues = $aIsobars; - } - else { - // Determine the isobar values automatically - $this->nbrIsobars = $aIsobars; - list($min,$max) = $this->getMinMaxVal(); - $stepSize = ($max-$min) / $aIsobars ; - $isobar = $min+$stepSize/2; - for ($i = 0; $i < $aIsobars; $i++) { - $this->isobarValues[$i] = $isobar; - $isobar += $stepSize; - } - } - - if( $aColors !== null && count($aColors) > 0 ) { - - if( !is_array($aColors) ) { - JpGraphError::RaiseL(28001); - //'Third argument to Contour must be an array of colors.' - } - - if( count($aColors) != count($this->isobarValues) ) { - JpGraphError::RaiseL(28002); - //'Number of colors must equal the number of isobar lines specified'; - } - - $this->isobarColors = $aColors; - } - } - - /** - * Flip the plot around the Y-coordinate. This has the same affect as flipping the input - * data matrice - * - * @param $aFlg If true the the vertice in input data matrice position (0,0) corresponds to the top left - * corner of teh plot otherwise it will correspond to the bottom left corner (a horizontal flip) - */ - function SetInvert($aFlg=true) { - $this->invert = $aFlg; - } - - /** - * Find the min and max values in the data matrice - * - * @return array(min_value,max_value) - */ - function getMinMaxVal() { - $min = $this->dataPoints[0][0]; - $max = $this->dataPoints[0][0]; - for ($i = 0; $i < $this->nbrRows; $i++) { - if( ($mi=min($this->dataPoints[$i])) < $min ) $min = $mi; - if( ($ma=max($this->dataPoints[$i])) > $max ) $max = $ma; - } - return array($min,$max); - } - - /** - * Reset the two matrices that keeps track on where the isobars crosses the - * horizontal and vertical edges - */ - function resetEdgeMatrices() { - for ($k = 0; $k < 2; $k++) { - for ($i = 0; $i <= $this->nbrRows; $i++) { - for ($j = 0; $j <= $this->nbrCols; $j++) { - $this->edges[$k][$i][$j] = false; - } - } - } - } - - /** - * Determine if the specified isobar crosses the horizontal edge specified by its row and column - * - * @param $aRow Row index of edge to be checked - * @param $aCol Col index of edge to be checked - * @param $aIsobar Isobar value - * @return true if the isobar is crossing this edge - */ - function isobarHCrossing($aRow,$aCol,$aIsobar) { - - if( $aCol >= $this->nbrCols-1 ) { - JpGraphError::RaiseL(28003,$aCol); - //'ContourPlot Internal Error: isobarHCrossing: Coloumn index too large (%d)' - } - if( $aRow >= $this->nbrRows ) { - JpGraphError::RaiseL(28004,$aRow); - //'ContourPlot Internal Error: isobarHCrossing: Row index too large (%d)' - } - - $v1 = $this->dataPoints[$aRow][$aCol]; - $v2 = $this->dataPoints[$aRow][$aCol+1]; - - return ($aIsobar-$v1)*($aIsobar-$v2) < 0 ; - - } - - /** - * Determine if the specified isobar crosses the vertical edge specified by its row and column - * - * @param $aRow Row index of edge to be checked - * @param $aCol Col index of edge to be checked - * @param $aIsobar Isobar value - * @return true if the isobar is crossing this edge - */ - function isobarVCrossing($aRow,$aCol,$aIsobar) { - - if( $aRow >= $this->nbrRows-1) { - JpGraphError::RaiseL(28005,$aRow); - //'isobarVCrossing: Row index too large - } - if( $aCol >= $this->nbrCols ) { - JpGraphError::RaiseL(28006,$aCol); - //'isobarVCrossing: Col index too large - } - - $v1 = $this->dataPoints[$aRow][$aCol]; - $v2 = $this->dataPoints[$aRow+1][$aCol]; - - return ($aIsobar-$v1)*($aIsobar-$v2) < 0 ; - - } - - /** - * Determine all edges, horizontal and vertical that the specified isobar crosses. The crossings - * are recorded in the two edge matrices. - * - * @param $aIsobar The value of the isobar to be checked - */ - function determineIsobarEdgeCrossings($aIsobar) { - - $ib = $this->isobarValues[$aIsobar]; - - for ($i = 0; $i < $this->nbrRows-1; $i++) { - for ($j = 0; $j < $this->nbrCols-1; $j++) { - $this->edges[HORIZ_EDGE][$i][$j] = $this->isobarHCrossing($i,$j,$ib); - $this->edges[VERT_EDGE][$i][$j] = $this->isobarVCrossing($i,$j,$ib); - } - } - - // We now have the bottom and rightmost edges unsearched - for ($i = 0; $i < $this->nbrRows-1; $i++) { - $this->edges[VERT_EDGE][$i][$j] = $this->isobarVCrossing($i,$this->nbrCols-1,$ib); - } - for ($j = 0; $j < $this->nbrCols-1; $j++) { - $this->edges[HORIZ_EDGE][$i][$j] = $this->isobarHCrossing($this->nbrRows-1,$j,$ib); - } - - } - - /** - * Return the normalized coordinates for the crossing of the specified edge with the specified - * isobar- The crossing is simpy detrmined with a linear interpolation between the two vertices - * on each side of the edge and the value of the isobar - * - * @param $aRow Row of edge - * @param $aCol Column of edge - * @param $aEdgeDir Determine if this is a horizontal or vertical edge - * @param $ib The isobar value - * @return unknown_type - */ - function getCrossingCoord($aRow,$aCol,$aEdgeDir,$aIsobarVal) { - - // In order to avoid numerical problem when two vertices are very close - // we have to check and avoid dividing by close to zero denumerator. - if( $aEdgeDir == HORIZ_EDGE ) { - $d = abs($this->dataPoints[$aRow][$aCol] - $this->dataPoints[$aRow][$aCol+1]); - if( $d > 0.001 ) { - $xcoord = $aCol + abs($aIsobarVal - $this->dataPoints[$aRow][$aCol]) / $d; - } - else { - $xcoord = $aCol; - } - $ycoord = $aRow; - } - else { - $d = abs($this->dataPoints[$aRow][$aCol] - $this->dataPoints[$aRow+1][$aCol]); - if( $d > 0.001 ) { - $ycoord = $aRow + abs($aIsobarVal - $this->dataPoints[$aRow][$aCol]) / $d; - } - else { - $ycoord = $aRow; - } - $xcoord = $aCol; - } - if( $this->invert ) { - $ycoord = $this->nbrRows-1 - $ycoord; - } - return array($xcoord,$ycoord); - - } - - /** - * In order to avoid all kinds of unpleasent extra checks and complex boundary - * controls for the degenerated case where the contour levels exactly crosses - * one of the vertices we add a very small delta (0.1%) to the data point value. - * This has no visible affect but it makes the code sooooo much cleaner. - * - */ - function adjustDataPointValues() { - - $ni = count($this->isobarValues); - for ($k = 0; $k < $ni; $k++) { - $ib = $this->isobarValues[$k]; - for ($row = 0 ; $row < $this->nbrRows-1; ++$row) { - for ($col = 0 ; $col < $this->nbrCols-1; ++$col ) { - if( abs($this->dataPoints[$row][$col] - $ib) < 0.0001 ) { - $this->dataPoints[$row][$col] += $this->dataPoints[$row][$col]*0.001; - } - } - } - } - - } - - /** - * @param $aFlg - * @param $aBW - * @return unknown_type - */ - function UseHighContrastColor($aFlg=true,$aBW=false) { - $this->highcontrast = $aFlg; - $this->highcontrastbw = $aBW; - } - - /** - * Calculate suitable colors for each defined isobar - * - */ - function CalculateColors() { - if ( $this->highcontrast ) { - if ( $this->highcontrastbw ) { - for ($ib = 0; $ib < $this->nbrIsobars; $ib++) { - $this->isobarColors[$ib] = 'black'; - } - } - else { - // Use only blue/red scale - $step = round(255/($this->nbrIsobars-1)); - for ($ib = 0; $ib < $this->nbrIsobars; $ib++) { - $this->isobarColors[$ib] = array($ib*$step, 50, 255-$ib*$step); - } - } - } - else { - $n = $this->nbrIsobars; - $v = 0; $step = 1 / ($this->nbrIsobars-1); - for ($ib = 0; $ib < $this->nbrIsobars; $ib++) { - $this->isobarColors[$ib] = RGB::GetSpectrum($v); - $v += $step; - } - } - } - - /** - * This is where the main work is done. For each isobar the crossing of the edges are determined - * and then each cell is analyzed to find the 0, 2 or 4 crossings. Then the normalized coordinate - * for the crossings are determined and pushed on to the isobar stack. When the method is finished - * the $isobarCoord will hold one arrayfor each isobar where all the line segments that makes - * up the contour plot are stored. - * - * @return array( $isobarCoord, $isobarValues, $isobarColors ) - */ - function getIsobars() { - - $this->adjustDataPointValues(); - - for ($isobar = 0; $isobar < $this->nbrIsobars; $isobar++) { - - $ib = $this->isobarValues[$isobar]; - $this->resetEdgeMatrices(); - $this->determineIsobarEdgeCrossings($isobar); - $this->isobarCoord[$isobar] = array(); - - $ncoord = 0; - - for ($row = 0 ; $row < $this->nbrRows-1; ++$row) { - for ($col = 0 ; $col < $this->nbrCols-1; ++$col ) { - - // Find out how many crossings around the edges - $n = 0; - if ( $this->edges[HORIZ_EDGE][$row][$col] ) $neigh[$n++] = array($row, $col, HORIZ_EDGE); - if ( $this->edges[HORIZ_EDGE][$row+1][$col] ) $neigh[$n++] = array($row+1,$col, HORIZ_EDGE); - if ( $this->edges[VERT_EDGE][$row][$col] ) $neigh[$n++] = array($row, $col, VERT_EDGE); - if ( $this->edges[VERT_EDGE][$row][$col+1] ) $neigh[$n++] = array($row, $col+1,VERT_EDGE); - - if ( $n == 2 ) { - $n1=0; $n2=1; - $this->isobarCoord[$isobar][$ncoord++] = array( - $this->getCrossingCoord($neigh[$n1][0],$neigh[$n1][1],$neigh[$n1][2],$ib), - $this->getCrossingCoord($neigh[$n2][0],$neigh[$n2][1],$neigh[$n2][2],$ib) ); - } - elseif ( $n == 4 ) { - // We must determine how to connect the edges either northwest->southeast or - // northeast->southwest. We do that by calculating the imaginary middle value of - // the cell by averaging the for corners. This will compared with the value of the - // top left corner will help determine the orientation of the ridge/creek - $midval = ($this->dataPoints[$row][$col]+$this->dataPoints[$row][$col+1]+$this->dataPoints[$row+1][$col]+$this->dataPoints[$row+1][$col+1])/4; - $v = $this->dataPoints[$row][$col]; - if( $midval == $ib ) { - // Orientation "+" - $n1=0; $n2=1; $n3=2; $n4=3; - } elseif ( ($midval > $ib && $v > $ib) || ($midval < $ib && $v < $ib) ) { - // Orientation of ridge/valley = "\" - $n1=0; $n2=3; $n3=2; $n4=1; - } elseif ( ($midval > $ib && $v < $ib) || ($midval < $ib && $v > $ib) ) { - // Orientation of ridge/valley = "/" - $n1=0; $n2=2; $n3=3; $n4=1; - } - - $this->isobarCoord[$isobar][$ncoord++] = array( - $this->getCrossingCoord($neigh[$n1][0],$neigh[$n1][1],$neigh[$n1][2],$ib), - $this->getCrossingCoord($neigh[$n2][0],$neigh[$n2][1],$neigh[$n2][2],$ib) ); - - $this->isobarCoord[$isobar][$ncoord++] = array( - $this->getCrossingCoord($neigh[$n3][0],$neigh[$n3][1],$neigh[$n3][2],$ib), - $this->getCrossingCoord($neigh[$n4][0],$neigh[$n4][1],$neigh[$n4][2],$ib) ); - - } - } - } - } - - if( count($this->isobarColors) == 0 ) { - // No manually specified colors. Calculate them automatically. - $this->CalculateColors(); - } - return array( $this->isobarCoord, $this->isobarValues, $this->isobarColors ); - } -} - - -/** - * This class represent a plotting of a contour outline of data given as a X-Y matrice - * - */ -class ContourPlot extends Plot { - - private $contour, $contourCoord, $contourVal, $contourColor; - private $nbrCountours = 0 ; - private $dataMatrix = array(); - private $invertLegend = false; - private $interpFactor = 1; - private $flipData = false; - private $isobar = 10; - private $showLegend = false; - private $highcontrast = false, $highcontrastbw = false; - private $manualIsobarColors = array(); - - /** - * Construct a contour plotting algorithm. The end result of the algorithm is a sequence of - * line segments for each isobar given as two vertices. - * - * @param $aDataMatrix The Z-data to be used - * @param $aIsobar A mixed variable, if it is an integer then this specified the number of isobars to use. - * The values of the isobars are automatically detrmined to be equ-spaced between the min/max value of the - * data. If it is an array then it explicetely gives the isobar values - * @param $aInvert By default the matrice with row index 0 corresponds to Y-value 0, i.e. in the bottom of - * the plot. If this argument is true then the row with the highest index in the matrice corresponds to - * Y-value 0. In affect flipping the matrice around an imaginary horizontal axis. - * @param $aHighContrast Use high contrast colors (blue/red:ish) - * @param $aHighContrastBW Use only black colors for contours - * @return an instance of the contour plot algorithm - */ - function __construct($aDataMatrix, $aIsobar=10, $aFactor=1, $aInvert=false, $aIsobarColors=array()) { - - $this->dataMatrix = $aDataMatrix; - $this->flipData = $aInvert; - $this->isobar = $aIsobar; - $this->interpFactor = $aFactor; - - if ( $this->interpFactor > 1 ) { - - if( $this->interpFactor > 5 ) { - JpGraphError::RaiseL(28007);// ContourPlot interpolation factor is too large (>5) - } - - $ip = new MeshInterpolate(); - $this->dataMatrix = $ip->Linear($this->dataMatrix, $this->interpFactor); - } - - $this->contour = new Contour($this->dataMatrix,$this->isobar,$aIsobarColors); - - if( is_array($aIsobar) ) - $this->nbrContours = count($aIsobar); - else - $this->nbrContours = $aIsobar; - } - - - /** - * Flipe the data around the center - * - * @param $aFlg - * - */ - function SetInvert($aFlg=true) { - $this->flipData = $aFlg; - } - - /** - * Set the colors for the isobar lines - * - * @param $aColorArray - * - */ - function SetIsobarColors($aColorArray) { - $this->manualIsobarColors = $aColorArray; - } - - /** - * Show the legend - * - * @param $aFlg true if the legend should be shown - * - */ - function ShowLegend($aFlg=true) { - $this->showLegend = $aFlg; - } - - - /** - * @param $aFlg true if the legend should start with the lowest isobar on top - * @return unknown_type - */ - function Invertlegend($aFlg=true) { - $this->invertLegend = $aFlg; - } - - /* Internal method. Give the min value to be used for the scaling - * - */ - function Min() { - return array(0,0); - } - - /* Internal method. Give the max value to be used for the scaling - * - */ - function Max() { - return array(count($this->dataMatrix[0])-1,count($this->dataMatrix)-1); - } - - /** - * Internal ramewrok method to setup the legend to be used for this plot. - * @param $aGraph The parent graph class - */ - function Legend($aGraph) { - - if( ! $this->showLegend ) - return; - - if( $this->invertLegend ) { - for ($i = 0; $i < $this->nbrContours; $i++) { - $aGraph->legend->Add(sprintf('%.1f',$this->contourVal[$i]), $this->contourColor[$i]); - } - } - else { - for ($i = $this->nbrContours-1; $i >= 0 ; $i--) { - $aGraph->legend->Add(sprintf('%.1f',$this->contourVal[$i]), $this->contourColor[$i]); - } - } - } - - - /** - * Framework function which gets called before the Stroke() method is called - * - * @see Plot#PreScaleSetup($aGraph) - * - */ - function PreScaleSetup($aGraph) { - $xn = count($this->dataMatrix[0])-1; - $yn = count($this->dataMatrix)-1; - - $aGraph->xaxis->scale->Update($aGraph->img,0,$xn); - $aGraph->yaxis->scale->Update($aGraph->img,0,$yn); - - $this->contour->SetInvert($this->flipData); - list($this->contourCoord,$this->contourVal,$this->contourColor) = $this->contour->getIsobars(); - } - - /** - * Use high contrast color schema - * - * @param $aFlg True, to use high contrast color - * @param $aBW True, Use only black and white color schema - */ - function UseHighContrastColor($aFlg=true,$aBW=false) { - $this->highcontrast = $aFlg; - $this->highcontrastbw = $aBW; - $this->contour->UseHighContrastColor($this->highcontrast,$this->highcontrastbw); - } - - /** - * Internal method. Stroke the contour plot to the graph - * - * @param $img Image handler - * @param $xscale Instance of the xscale to use - * @param $yscale Instance of the yscale to use - */ - function Stroke($img,$xscale,$yscale) { - - if( count($this->manualIsobarColors) > 0 ) { - $this->contourColor = $this->manualIsobarColors; - if( count($this->manualIsobarColors) != $this->nbrContours ) { - JpGraphError::RaiseL(28002); - } - } - - $img->SetLineWeight($this->line_weight); - - for ($c = 0; $c < $this->nbrContours; $c++) { - - $img->SetColor( $this->contourColor[$c] ); - - $n = count($this->contourCoord[$c]); - $i = 0; - while ( $i < $n ) { - list($x1,$y1) = $this->contourCoord[$c][$i][0]; - $x1t = $xscale->Translate($x1); - $y1t = $yscale->Translate($y1); - - list($x2,$y2) = $this->contourCoord[$c][$i++][1]; - $x2t = $xscale->Translate($x2); - $y2t = $yscale->Translate($y2); - - $img->Line($x1t,$y1t,$x2t,$y2t); - } - - } - } - -} - -// EOF -?> diff --git a/html/lib/jpgraph/jpgraph_date.php b/html/lib/jpgraph/jpgraph_date.php deleted file mode 100644 index 0fe00b4148..0000000000 --- a/html/lib/jpgraph/jpgraph_date.php +++ /dev/null @@ -1,523 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -/*======================================================================= - // File: JPGRAPH_DATE.PHP - // Description: Classes to handle Date scaling - // Created: 2005-05-02 - // Ver: $Id: jpgraph_date.php 1106 2009-02-22 20:16:35Z ljp $ - // - // Copyright (c) Aditus Consulting. All rights reserved. - //======================================================================== - */ - -define('HOURADJ_1',0+30); -define('HOURADJ_2',1+30); -define('HOURADJ_3',2+30); -define('HOURADJ_4',3+30); -define('HOURADJ_6',4+30); -define('HOURADJ_12',5+30); - -define('MINADJ_1',0+20); -define('MINADJ_5',1+20); -define('MINADJ_10',2+20); -define('MINADJ_15',3+20); -define('MINADJ_30',4+20); - -define('SECADJ_1',0); -define('SECADJ_5',1); -define('SECADJ_10',2); -define('SECADJ_15',3); -define('SECADJ_30',4); - - -define('YEARADJ_1',0+30); -define('YEARADJ_2',1+30); -define('YEARADJ_5',2+30); - -define('MONTHADJ_1',0+20); -define('MONTHADJ_6',1+20); - -define('DAYADJ_1',0); -define('DAYADJ_WEEK',1); -define('DAYADJ_7',1); - -define('SECPERYEAR',31536000); -define('SECPERDAY',86400); -define('SECPERHOUR',3600); -define('SECPERMIN',60); - - -class DateScale extends LinearScale { - private $date_format = ''; - private $iStartAlign = false, $iEndAlign = false; - private $iStartTimeAlign = false, $iEndTimeAlign = false; - - //--------------- - // CONSTRUCTOR - function __construct($aMin=0,$aMax=0,$aType='x') { - assert($aType=="x"); - assert($aMin<=$aMax); - - $this->type=$aType; - $this->scale=array($aMin,$aMax); - $this->world_size=$aMax-$aMin; - $this->ticks = new LinearTicks(); - $this->intscale=true; - } - - - //------------------------------------------------------------------------------------------ - // Utility Function AdjDate() - // Description: Will round a given time stamp to an even year, month or day - // argument. - //------------------------------------------------------------------------------------------ - - function AdjDate($aTime,$aRound=0,$aYearType=false,$aMonthType=false,$aDayType=false) { - $y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime); - $h=0;$i=0;$s=0; - if( $aYearType !== false ) { - $yearAdj = array(0=>1, 1=>2, 2=>5); - if( $aRound == 0 ) { - $y = floor($y/$yearAdj[$aYearType])*$yearAdj[$aYearType]; - } - else { - ++$y; - $y = ceil($y/$yearAdj[$aYearType])*$yearAdj[$aYearType]; - } - $m=1;$d=1; - } - elseif( $aMonthType !== false ) { - $monthAdj = array(0=>1, 1=>6); - if( $aRound == 0 ) { - $m = floor($m/$monthAdj[$aMonthType])*$monthAdj[$aMonthType]; - $d=1; - } - else { - ++$m; - $m = ceil($m/$monthAdj[$aMonthType])*$monthAdj[$aMonthType]; - $d=1; - } - } - elseif( $aDayType !== false ) { - if( $aDayType == 0 ) { - if( $aRound == 1 ) { - //++$d; - $h=23;$i=59;$s=59; - } - } - else { - // Adjust to an even week boundary. - $w = (int)date('w',$aTime); // Day of week 0=Sun, 6=Sat - if( true ) { // Adjust to start on Mon - if( $w==0 ) $w=6; - else --$w; - } - if( $aRound == 0 ) { - $d -= $w; - } - else { - $d += (7-$w); - $h=23;$i=59;$s=59; - } - } - } - return mktime($h,$i,$s,$m,$d,$y); - - } - - //------------------------------------------------------------------------------------------ - // Wrapper for AdjDate that will round a timestamp to an even date rounding - // it downwards. - //------------------------------------------------------------------------------------------ - function AdjStartDate($aTime,$aYearType=false,$aMonthType=false,$aDayType=false) { - return $this->AdjDate($aTime,0,$aYearType,$aMonthType,$aDayType); - } - - //------------------------------------------------------------------------------------------ - // Wrapper for AdjDate that will round a timestamp to an even date rounding - // it upwards - //------------------------------------------------------------------------------------------ - function AdjEndDate($aTime,$aYearType=false,$aMonthType=false,$aDayType=false) { - return $this->AdjDate($aTime,1,$aYearType,$aMonthType,$aDayType); - } - - //------------------------------------------------------------------------------------------ - // Utility Function AdjTime() - // Description: Will round a given time stamp to an even time according to - // argument. - //------------------------------------------------------------------------------------------ - - function AdjTime($aTime,$aRound=0,$aHourType=false,$aMinType=false,$aSecType=false) { - $y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime); - $h = (int)date('H',$aTime); $i = (int)date('i',$aTime); $s = (int)date('s',$aTime); - if( $aHourType !== false ) { - $aHourType %= 6; - $hourAdj = array(0=>1, 1=>2, 2=>3, 3=>4, 4=>6, 5=>12); - if( $aRound == 0 ) - $h = floor($h/$hourAdj[$aHourType])*$hourAdj[$aHourType]; - else { - if( ($h % $hourAdj[$aHourType]==0) && ($i > 0 || $s > 0) ) { - $h++; - } - $h = ceil($h/$hourAdj[$aHourType])*$hourAdj[$aHourType]; - if( $h >= 24 ) { - $aTime += 86400; - $y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime); - $h -= 24; - } - } - $i=0;$s=0; - } - elseif( $aMinType !== false ) { - $aMinType %= 5; - $minAdj = array(0=>1, 1=>5, 2=>10, 3=>15, 4=>30); - if( $aRound == 0 ) { - $i = floor($i/$minAdj[$aMinType])*$minAdj[$aMinType]; - } - else { - if( ($i % $minAdj[$aMinType]==0) && $s > 0 ) { - $i++; - } - $i = ceil($i/$minAdj[$aMinType])*$minAdj[$aMinType]; - if( $i >= 60) { - $aTime += 3600; - $y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime); - $h = (int)date('H',$aTime); $i = 0; - } - } - $s=0; - } - elseif( $aSecType !== false ) { - $aSecType %= 5; - $secAdj = array(0=>1, 1=>5, 2=>10, 3=>15, 4=>30); - if( $aRound == 0 ) { - $s = floor($s/$secAdj[$aSecType])*$secAdj[$aSecType]; - } - else { - $s = ceil($s/$secAdj[$aSecType]*1.0)*$secAdj[$aSecType]; - if( $s >= 60) { - $s=0; - $aTime += 60; - $y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime); - $h = (int)date('H',$aTime); $i = (int)date('i',$aTime); - } - } - } - return mktime($h,$i,$s,$m,$d,$y); - } - - //------------------------------------------------------------------------------------------ - // Wrapper for AdjTime that will round a timestamp to an even time rounding - // it downwards. - // Example: AdjStartTime(mktime(18,27,13,2,22,2005),false,2) => 18:20 - //------------------------------------------------------------------------------------------ - function AdjStartTime($aTime,$aHourType=false,$aMinType=false,$aSecType=false) { - return $this->AdjTime($aTime,0,$aHourType,$aMinType,$aSecType); - } - - //------------------------------------------------------------------------------------------ - // Wrapper for AdjTime that will round a timestamp to an even time rounding - // it upwards - // Example: AdjEndTime(mktime(18,27,13,2,22,2005),false,2) => 18:30 - //------------------------------------------------------------------------------------------ - function AdjEndTime($aTime,$aHourType=false,$aMinType=false,$aSecType=false) { - return $this->AdjTime($aTime,1,$aHourType,$aMinType,$aSecType); - } - - //------------------------------------------------------------------------------------------ - // DateAutoScale - // Autoscale a date axis given start and end time - // Returns an array ($start,$end,$major,$minor,$format) - //------------------------------------------------------------------------------------------ - function DoDateAutoScale($aStartTime,$aEndTime,$aDensity=0,$aAdjust=true) { - // Format of array - // array ( Decision point, array( array( Major-scale-step-array ), - // array( Minor-scale-step-array ), - // array( 0=date-adjust, 1=time-adjust, adjustment-alignment) ) - // - $scalePoints = - array( - /* Intervall larger than 10 years */ - SECPERYEAR*10,array(array(SECPERYEAR*5,SECPERYEAR*2), - array(SECPERYEAR), - array(0,YEARADJ_1, 0,YEARADJ_1) ), - - /* Intervall larger than 2 years */ - SECPERYEAR*2,array(array(SECPERYEAR),array(SECPERYEAR), - array(0,YEARADJ_1) ), - - /* Intervall larger than 90 days (approx 3 month) */ - SECPERDAY*90,array(array(SECPERDAY*30,SECPERDAY*14,SECPERDAY*7,SECPERDAY), - array(SECPERDAY*5,SECPERDAY*7,SECPERDAY,SECPERDAY), - array(0,MONTHADJ_1, 0,DAYADJ_WEEK, 0,DAYADJ_1, 0,DAYADJ_1)), - - /* Intervall larger than 30 days (approx 1 month) */ - SECPERDAY*30,array(array(SECPERDAY*14,SECPERDAY*7,SECPERDAY*2, SECPERDAY), - array(SECPERDAY,SECPERDAY,SECPERDAY,SECPERDAY), - array(0,DAYADJ_WEEK, 0,DAYADJ_1, 0,DAYADJ_1, 0,DAYADJ_1)), - - /* Intervall larger than 7 days */ - SECPERDAY*7,array(array(SECPERDAY,SECPERHOUR*12,SECPERHOUR*6,SECPERHOUR*2), - array(SECPERHOUR*6,SECPERHOUR*3,SECPERHOUR,SECPERHOUR), - array(0,DAYADJ_1, 1,HOURADJ_12, 1,HOURADJ_6, 1,HOURADJ_1)), - - /* Intervall larger than 1 day */ - SECPERDAY,array(array(SECPERDAY,SECPERHOUR*12,SECPERHOUR*6,SECPERHOUR*2,SECPERHOUR), - array(SECPERHOUR*6,SECPERHOUR*2,SECPERHOUR,SECPERHOUR,SECPERHOUR), - array(1,HOURADJ_12, 1,HOURADJ_6, 1,HOURADJ_1, 1,HOURADJ_1)), - - /* Intervall larger than 12 hours */ - SECPERHOUR*12,array(array(SECPERHOUR*2,SECPERHOUR,SECPERMIN*30,900,600), - array(1800,1800,900,300,300), - array(1,HOURADJ_1, 1,MINADJ_30, 1,MINADJ_15, 1,MINADJ_10, 1,MINADJ_5) ), - - /* Intervall larger than 2 hours */ - SECPERHOUR*2,array(array(SECPERHOUR,SECPERMIN*30,900,600,300), - array(1800,900,300,120,60), - array(1,HOURADJ_1, 1,MINADJ_30, 1,MINADJ_15, 1,MINADJ_10, 1,MINADJ_5) ), - - /* Intervall larger than 1 hours */ - SECPERHOUR,array(array(SECPERMIN*30,900,600,300),array(900,300,120,60), - array(1,MINADJ_30, 1,MINADJ_15, 1,MINADJ_10, 1,MINADJ_5) ), - - /* Intervall larger than 30 min */ - SECPERMIN*30,array(array(SECPERMIN*15,SECPERMIN*10,SECPERMIN*5,SECPERMIN), - array(300,300,60,10), - array(1,MINADJ_15, 1,MINADJ_10, 1,MINADJ_5, 1,MINADJ_1)), - - /* Intervall larger than 1 min */ - SECPERMIN,array(array(SECPERMIN,15,10,5), - array(15,5,2,1), - array(1,MINADJ_1, 1,SECADJ_15, 1,SECADJ_10, 1,SECADJ_5)), - - /* Intervall larger than 10 sec */ - 10,array(array(5,2), - array(1,1), - array(1,SECADJ_5, 1,SECADJ_1)), - - /* Intervall larger than 1 sec */ - 1,array(array(1), - array(1), - array(1,SECADJ_1)), - ); - - $ns = count($scalePoints); - // Establish major and minor scale units for the date scale - $diff = $aEndTime - $aStartTime; - if( $diff < 1 ) return false; - $done=false; - $i=0; - while( ! $done ) { - if( $diff > $scalePoints[2*$i] ) { - // Get major and minor scale for this intervall - $scaleSteps = $scalePoints[2*$i+1]; - $major = $scaleSteps[0][min($aDensity,count($scaleSteps[0])-1)]; - // Try to find out which minor step looks best - $minor = $scaleSteps[1][min($aDensity,count($scaleSteps[1])-1)]; - if( $aAdjust ) { - // Find out how we should align the start and end timestamps - $idx = 2*min($aDensity,floor(count($scaleSteps[2])/2)-1); - if( $scaleSteps[2][$idx] === 0 ) { - // Use date adjustment - $adj = $scaleSteps[2][$idx+1]; - if( $adj >= 30 ) { - $start = $this->AdjStartDate($aStartTime,$adj-30); - $end = $this->AdjEndDate($aEndTime,$adj-30); - } - elseif( $adj >= 20 ) { - $start = $this->AdjStartDate($aStartTime,false,$adj-20); - $end = $this->AdjEndDate($aEndTime,false,$adj-20); - } - else { - $start = $this->AdjStartDate($aStartTime,false,false,$adj); - $end = $this->AdjEndDate($aEndTime,false,false,$adj); - // We add 1 second for date adjustment to make sure we end on 00:00 the following day - // This makes the final major tick be srawn when we step day-by-day instead of ending - // on xx:59:59 which would not draw the final major tick - $end++; - } - } - else { - // Use time adjustment - $adj = $scaleSteps[2][$idx+1]; - if( $adj >= 30 ) { - $start = $this->AdjStartTime($aStartTime,$adj-30); - $end = $this->AdjEndTime($aEndTime,$adj-30); - } - elseif( $adj >= 20 ) { - $start = $this->AdjStartTime($aStartTime,false,$adj-20); - $end = $this->AdjEndTime($aEndTime,false,$adj-20); - } - else { - $start = $this->AdjStartTime($aStartTime,false,false,$adj); - $end = $this->AdjEndTime($aEndTime,false,false,$adj); - } - } - } - // If the overall date span is larger than 1 day ten we show date - $format = ''; - if( ($end-$start) > SECPERDAY ) { - $format = 'Y-m-d '; - } - // If the major step is less than 1 day we need to whow hours + min - if( $major < SECPERDAY ) { - $format .= 'H:i'; - } - // If the major step is less than 1 min we need to show sec - if( $major < 60 ) { - $format .= ':s'; - } - $done=true; - } - ++$i; - } - return array($start,$end,$major,$minor,$format); - } - - // Overrides the automatic determined date format. Must be a valid date() format string - function SetDateFormat($aFormat) { - $this->date_format = $aFormat; - $this->ticks->SetLabelDateFormat($this->date_format); - } - - function AdjustForDST($aFlg=true) { - $this->ticks->AdjustForDST($aFlg); - } - - - function SetDateAlign($aStartAlign,$aEndAlign=false) { - if( $aEndAlign === false ) { - $aEndAlign=$aStartAlign; - } - $this->iStartAlign = $aStartAlign; - $this->iEndAlign = $aEndAlign; - } - - function SetTimeAlign($aStartAlign,$aEndAlign=false) { - if( $aEndAlign === false ) { - $aEndAlign=$aStartAlign; - } - $this->iStartTimeAlign = $aStartAlign; - $this->iEndTimeAlign = $aEndAlign; - } - - - function AutoScale($img,$aStartTime,$aEndTime,$aNumSteps,$_adummy=false) { - // We need to have one dummy argument to make the signature of AutoScale() - // identical to LinearScale::AutoScale - if( $aStartTime == $aEndTime ) { - // Special case when we only have one data point. - // Create a small artifical intervall to do the autoscaling - $aStartTime -= 10; - $aEndTime += 10; - } - $done=false; - $i=0; - while( ! $done && $i < 5) { - list($adjstart,$adjend,$maj,$min,$format) = $this->DoDateAutoScale($aStartTime,$aEndTime,$i); - $n = floor(($adjend-$adjstart)/$maj); - if( $n * 1.7 > $aNumSteps ) { - $done=true; - } - $i++; - } - - /* - if( 0 ) { // DEBUG - echo " Start =".date("Y-m-d H:i:s",$aStartTime)."
        "; - echo " End =".date("Y-m-d H:i:s",$aEndTime)."
        "; - echo "Adj Start =".date("Y-m-d H:i:s",$adjstart)."
        "; - echo "Adj End =".date("Y-m-d H:i:s",$adjend)."

        "; - echo "Major = $maj s, ".floor($maj/60)."min, ".floor($maj/3600)."h, ".floor($maj/86400)."day
        "; - echo "Min = $min s, ".floor($min/60)."min, ".floor($min/3600)."h, ".floor($min/86400)."day
        "; - echo "Format=$format

        "; - } - */ - - if( $this->iStartTimeAlign !== false && $this->iStartAlign !== false ) { - JpGraphError::RaiseL(3001); - //('It is only possible to use either SetDateAlign() or SetTimeAlign() but not both'); - } - - if( $this->iStartTimeAlign !== false ) { - if( $this->iStartTimeAlign >= 30 ) { - $adjstart = $this->AdjStartTime($aStartTime,$this->iStartTimeAlign-30); - } - elseif( $this->iStartTimeAlign >= 20 ) { - $adjstart = $this->AdjStartTime($aStartTime,false,$this->iStartTimeAlign-20); - } - else { - $adjstart = $this->AdjStartTime($aStartTime,false,false,$this->iStartTimeAlign); - } - } - if( $this->iEndTimeAlign !== false ) { - if( $this->iEndTimeAlign >= 30 ) { - $adjend = $this->AdjEndTime($aEndTime,$this->iEndTimeAlign-30); - } - elseif( $this->iEndTimeAlign >= 20 ) { - $adjend = $this->AdjEndTime($aEndTime,false,$this->iEndTimeAlign-20); - } - else { - $adjend = $this->AdjEndTime($aEndTime,false,false,$this->iEndTimeAlign); - } - } - - - - if( $this->iStartAlign !== false ) { - if( $this->iStartAlign >= 30 ) { - $adjstart = $this->AdjStartDate($aStartTime,$this->iStartAlign-30); - } - elseif( $this->iStartAlign >= 20 ) { - $adjstart = $this->AdjStartDate($aStartTime,false,$this->iStartAlign-20); - } - else { - $adjstart = $this->AdjStartDate($aStartTime,false,false,$this->iStartAlign); - } - } - if( $this->iEndAlign !== false ) { - if( $this->iEndAlign >= 30 ) { - $adjend = $this->AdjEndDate($aEndTime,$this->iEndAlign-30); - } - elseif( $this->iEndAlign >= 20 ) { - $adjend = $this->AdjEndDate($aEndTime,false,$this->iEndAlign-20); - } - else { - $adjend = $this->AdjEndDate($aEndTime,false,false,$this->iEndAlign); - } - } - $this->Update($img,$adjstart,$adjend); - if( ! $this->ticks->IsSpecified() ) - $this->ticks->Set($maj,$min); - if( $this->date_format == '' ) - $this->ticks->SetLabelDateFormat($format); - else - $this->ticks->SetLabelDateFormat($this->date_format); - } -} - - -?> diff --git a/html/lib/jpgraph/jpgraph_errhandler.inc.php b/html/lib/jpgraph/jpgraph_errhandler.inc.php deleted file mode 100644 index e325e8ffc0..0000000000 --- a/html/lib/jpgraph/jpgraph_errhandler.inc.php +++ /dev/null @@ -1,392 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -//======================================================================= -// File: JPGRAPH_ERRHANDLER.PHP -// Description: Error handler class together with handling of localized -// error messages. All localized error messages are stored -// in a separate file under the "lang/" subdirectory. -// Created: 2006-09-24 -// Ver: $Id: jpgraph_errhandler.inc.php 1920 2009-12-08 10:02:26Z ljp $ -// -// Copyright 2006 (c) Aditus Consulting. All rights reserved. -//======================================================================== - -if( !defined('DEFAULT_ERR_LOCALE') ) { - define('DEFAULT_ERR_LOCALE','en'); -} - -if( !defined('USE_IMAGE_ERROR_HANDLER') ) { - define('USE_IMAGE_ERROR_HANDLER',true); -} - -GLOBAL $__jpg_err_locale ; -$__jpg_err_locale = DEFAULT_ERR_LOCALE; - -class ErrMsgText { - private $lt=NULL; - function __construct() { - GLOBAL $__jpg_err_locale; - $file = 'lang/'.$__jpg_err_locale.'.inc.php'; - - // If the chosen locale doesn't exist try english - if( !file_exists(dirname(__FILE__).'/'.$file) ) { - $__jpg_err_locale = 'en'; - } - - $file = 'lang/'.$__jpg_err_locale.'.inc.php'; - if( !file_exists(dirname(__FILE__).'/'.$file) ) { - die('Chosen locale file ("'.$file.'") for error messages does not exist or is not readable for the PHP process. Please make sure that the file exists and that the file permissions are such that the PHP process is allowed to read this file.'); - } - require($file); - $this->lt = $_jpg_messages; - } - - function Get($errnbr,$a1=null,$a2=null,$a3=null,$a4=null,$a5=null) { - GLOBAL $__jpg_err_locale; - if( !isset($this->lt[$errnbr]) ) { - return 'Internal error: The specified error message ('.$errnbr.') does not exist in the chosen locale ('.$__jpg_err_locale.')'; - } - $ea = $this->lt[$errnbr]; - $j=0; - if( $a1 !== null ) { - $argv[$j++] = $a1; - if( $a2 !== null ) { - $argv[$j++] = $a2; - if( $a3 !== null ) { - $argv[$j++] = $a3; - if( $a4 !== null ) { - $argv[$j++] = $a4; - if( $a5 !== null ) { - $argv[$j++] = $a5; - } - } - } - } - } - $numargs = $j; - if( $ea[1] != $numargs ) { - // Error message argument count do not match. - // Just return the error message without arguments. - return $ea[0]; - } - switch( $numargs ) { - case 1: - $msg = sprintf($ea[0],$argv[0]); - break; - case 2: - $msg = sprintf($ea[0],$argv[0],$argv[1]); - break; - case 3: - $msg = sprintf($ea[0],$argv[0],$argv[1],$argv[2]); - break; - case 4: - $msg = sprintf($ea[0],$argv[0],$argv[1],$argv[2],$argv[3]); - break; - case 5: - $msg = sprintf($ea[0],$argv[0],$argv[1],$argv[2],$argv[3],$argv[4]); - break; - case 0: - default: - $msg = sprintf($ea[0]); - break; - } - return $msg; - } -} - -// -// A wrapper class that is used to access the specified error object -// (to hide the global error parameter and avoid having a GLOBAL directive -// in all methods. -// -class JpGraphError { - private static $__iImgFlg = true; - private static $__iLogFile = ''; - private static $__iTitle = 'JpGraph Error: '; - public static function Raise($aMsg,$aHalt=true){ - throw new JpGraphException($aMsg); - } - public static function SetErrLocale($aLoc) { - GLOBAL $__jpg_err_locale ; - $__jpg_err_locale = $aLoc; - } - public static function RaiseL($errnbr,$a1=null,$a2=null,$a3=null,$a4=null,$a5=null) { - throw new JpGraphExceptionL($errnbr,$a1,$a2,$a3,$a4,$a5); - } - public static function SetImageFlag($aFlg=true) { - self::$__iImgFlg = $aFlg; - } - public static function GetImageFlag() { - return self::$__iImgFlg; - } - public static function SetLogFile($aFile) { - self::$__iLogFile = $aFile; - } - public static function GetLogFile() { - return self::$__iLogFile; - } - public static function SetTitle($aTitle) { - self::$__iTitle = $aTitle; - } - public static function GetTitle() { - return self::$__iTitle; - } -} - -class JpGraphException extends Exception { - // Redefine the exception so message isn't optional - public function __construct($message, $code = 0) { - // make sure everything is assigned properly - parent::__construct($message, $code); - } - // custom string representation of object - public function _toString() { - return __CLASS__ . ": [{$this->code}]: {$this->message} at " . basename($this->getFile()) . ":" . $this->getLine() . "\n" . $this->getTraceAsString() . "\n"; - } - // custom representation of error as an image - public function Stroke() { - if( JpGraphError::GetImageFlag() ) { - $errobj = new JpGraphErrObjectImg(); - $errobj->SetTitle(JpGraphError::GetTitle()); - } - else { - $errobj = new JpGraphErrObject(); - $errobj->SetTitle(JpGraphError::GetTitle()); - $errobj->SetStrokeDest(JpGraphError::GetLogFile()); - } - $errobj->Raise($this->getMessage()); - } - static public function defaultHandler(Exception $exception) { - global $__jpg_OldHandler; - if( $exception instanceof JpGraphException ) { - $exception->Stroke(); - } - else { - // Restore old handler - if( $__jpg_OldHandler !== NULL ) { - set_exception_handler($__jpg_OldHandler); - } - throw $exception; - } - } -} - -class JpGraphExceptionL extends JpGraphException { - // Redefine the exception so message isn't optional - public function __construct($errcode,$a1=null,$a2=null,$a3=null,$a4=null,$a5=null) { - // make sure everything is assigned properly - $errtxt = new ErrMsgText(); - JpGraphError::SetTitle('JpGraph Error: '.$errcode); - parent::__construct($errtxt->Get($errcode,$a1,$a2,$a3,$a4,$a5), 0); - } -} - -// Setup the default handler -global $__jpg_OldHandler; -$__jpg_OldHandler = set_exception_handler(array('JpGraphException','defaultHandler')); - -// -// First of all set up a default error handler -// - -//============================================================= -// The default trivial text error handler. -//============================================================= -class JpGraphErrObject { - - protected $iTitle = "JpGraph error: "; - protected $iDest = false; - - - function __construct() { - // Empty. Reserved for future use - } - - function SetTitle($aTitle) { - $this->iTitle = $aTitle; - } - - function SetStrokeDest($aDest) { - $this->iDest = $aDest; - } - - // If aHalt is true then execution can't continue. Typical used for fatal errors - function Raise($aMsg,$aHalt=false) { - if( $this->iDest != '' ) { - if( $this->iDest == 'syslog' ) { - error_log($this->iTitle.$aMsg); - } - else { - $str = '['.date('r').'] '.$this->iTitle.$aMsg."\n"; - $f = @fopen($this->iDest,'a'); - if( $f ) { - @fwrite($f,$str); - @fclose($f); - } - } - } - else { - $aMsg = $this->iTitle.$aMsg; - // Check SAPI and if we are called from the command line - // send the error to STDERR instead - if( PHP_SAPI == 'cli' ) { - fwrite(STDERR,$aMsg); - } - else { - echo $aMsg; - } - } - if( $aHalt ) - exit(1); - } -} - -//============================================================== -// An image based error handler -//============================================================== -class JpGraphErrObjectImg extends JpGraphErrObject { - - function __construct() { - parent::__construct(); - // Empty. Reserved for future use - } - - function Raise($aMsg,$aHalt=true) { - $img_iconerror = - 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAAAaV'. - 'BMVEX//////2Xy8mLl5V/Z2VvMzFi/v1WyslKlpU+ZmUyMjEh/'. - 'f0VyckJlZT9YWDxMTDjAwMDy8sLl5bnY2K/MzKW/v5yyspKlpY'. - 'iYmH+MjHY/PzV/f2xycmJlZVlZWU9MTEXY2Ms/PzwyMjLFTjea'. - 'AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACx'. - 'IAAAsSAdLdfvwAAAAHdElNRQfTBgISOCqusfs5AAABLUlEQVR4'. - '2tWV3XKCMBBGWfkranCIVClKLd/7P2Q3QsgCxjDTq+6FE2cPH+'. - 'xJ0Ogn2lQbsT+Wrs+buAZAV4W5T6Bs0YXBBwpKgEuIu+JERAX6'. - 'wM2rHjmDdEITmsQEEmWADgZm6rAjhXsoMGY9B/NZBwJzBvn+e3'. - 'wHntCAJdGu9SviwIwoZVDxPB9+Rc0TSEbQr0j3SA1gwdSn6Db0'. - '6Tm1KfV6yzWGQO7zdpvyKLKBDmRFjzeB3LYgK7r6A/noDAfjtS'. - 'IXaIzbJSv6WgUebTMV4EoRB8a2mQiQjgtF91HdKDKZ1gtFtQjk'. - 'YcWaR5OKOhkYt+ZsTFdJRfPAApOpQYJTNHvCRSJR6SJngQadfc'. - 'vd69OLMddVOPCGVnmrFD8bVYd3JXfxXPtLR/+mtv59/ALWiiMx'. - 'qL72fwAAAABJRU5ErkJggg==' ; - - - if( function_exists("imagetypes") ) { - $supported = imagetypes(); - } else { - $supported = 0; - } - - if( !function_exists('imagecreatefromstring') ) { - $supported = 0; - } - - if( ob_get_length() || headers_sent() || !($supported & IMG_PNG) ) { - // Special case for headers already sent or that the installation doesn't support - // the PNG format (which the error icon is encoded in). - // Dont return an image since it can't be displayed - die($this->iTitle.' '.$aMsg); - } - - $aMsg = wordwrap($aMsg,55); - $lines = substr_count($aMsg,"\n"); - - // Create the error icon GD - $erricon = Image::CreateFromString(base64_decode($img_iconerror)); - - // Create an image that contains the error text. - $w=400; - $h=100 + 15*max(0,$lines-3); - - $img = new Image($w,$h); - - - // Drop shadow - $img->SetColor("gray"); - $img->FilledRectangle(5,5,$w-1,$h-1,10); - $img->SetColor("gray:0.7"); - $img->FilledRectangle(5,5,$w-3,$h-3,10); - - // Window background - $img->SetColor("lightblue"); - $img->FilledRectangle(1,1,$w-5,$h-5); - $img->CopyCanvasH($img->img,$erricon,5,30,0,0,40,40); - - // Window border - $img->SetColor("black"); - $img->Rectangle(1,1,$w-5,$h-5); - $img->Rectangle(0,0,$w-4,$h-4); - - // Window top row - $img->SetColor("darkred"); - for($y=3; $y < 18; $y += 2 ) - $img->Line(1,$y,$w-6,$y); - - // "White shadow" - $img->SetColor("white"); - - // Left window edge - $img->Line(2,2,2,$h-5); - $img->Line(2,2,$w-6,2); - - // "Gray button shadow" - $img->SetColor("darkgray"); - - // Gray window shadow - $img->Line(2,$h-6,$w-5,$h-6); - $img->Line(3,$h-7,$w-5,$h-7); - - // Window title - $m = floor($w/2-5); - $l = 110; - $img->SetColor("lightgray:1.3"); - $img->FilledRectangle($m-$l,2,$m+$l,16); - - // Stroke text - $img->SetColor("darkred"); - $img->SetFont(FF_FONT2,FS_BOLD); - $img->StrokeText($m-90,15,$this->iTitle); - $img->SetColor("black"); - $img->SetFont(FF_FONT1,FS_NORMAL); - $txt = new Text($aMsg,52,25); - $txt->Align("left","top"); - $txt->Stroke($img); - if ($this->iDest) { - $img->Stream($this->iDest); - } else { - $img->Headers(); - $img->Stream(); - } - if( $aHalt ) - die(); - } -} - - - -if( ! USE_IMAGE_ERROR_HANDLER ) { - JpGraphError::SetImageFlag(false); -} -?> diff --git a/html/lib/jpgraph/jpgraph_error.php b/html/lib/jpgraph/jpgraph_error.php deleted file mode 100644 index 87f9ce8006..0000000000 --- a/html/lib/jpgraph/jpgraph_error.php +++ /dev/null @@ -1,181 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -/*======================================================================= - // File: JPGRAPH_ERROR.PHP - // Description: Error plot extension for JpGraph - // Created: 2001-01-08 - // Ver: $Id: jpgraph_error.php 1106 2009-02-22 20:16:35Z ljp $ - // - // Copyright (c) Aditus Consulting. All rights reserved. - //======================================================================== - */ - -//=================================================== -// CLASS ErrorPlot -// Description: Error plot with min/max value for -// each datapoint -//=================================================== -class ErrorPlot extends Plot { - private $errwidth=2; - - //--------------- - // CONSTRUCTOR - function __construct($datay,$datax=false) { - parent::__construct($datay,$datax); - $this->numpoints /= 2; - } - //--------------- - // PUBLIC METHODS - - // Gets called before any axis are stroked - function PreStrokeAdjust($graph) { - if( $this->center ) { - $a=0.5; $b=0.5; - ++$this->numpoints; - } else { - $a=0; $b=0; - } - $graph->xaxis->scale->ticks->SetXLabelOffset($a); - $graph->SetTextScaleOff($b); - //$graph->xaxis->scale->ticks->SupressMinorTickMarks(); - } - - // Method description - function Stroke($img,$xscale,$yscale) { - $numpoints=count($this->coords[0])/2; - $img->SetColor($this->color); - $img->SetLineWeight($this->weight); - - if( isset($this->coords[1]) ) { - if( count($this->coords[1])!=$numpoints ) - JpGraphError::RaiseL(2003,count($this->coords[1]),$numpoints); - //("Number of X and Y points are not equal. Number of X-points:".count($this->coords[1])." Number of Y-points:$numpoints"); - else - $exist_x = true; - } - else - $exist_x = false; - - for( $i=0; $i<$numpoints; ++$i) { - if( $exist_x ) - $x=$this->coords[1][$i]; - else - $x=$i; - - if( !is_numeric($x) || - !is_numeric($this->coords[0][$i*2]) || !is_numeric($this->coords[0][$i*2+1]) ) { - continue; - } - - $xt = $xscale->Translate($x); - $yt1 = $yscale->Translate($this->coords[0][$i*2]); - $yt2 = $yscale->Translate($this->coords[0][$i*2+1]); - $img->Line($xt,$yt1,$xt,$yt2); - $img->Line($xt-$this->errwidth,$yt1,$xt+$this->errwidth,$yt1); - $img->Line($xt-$this->errwidth,$yt2,$xt+$this->errwidth,$yt2); - } - return true; - } -} // Class - - -//=================================================== -// CLASS ErrorLinePlot -// Description: Combine a line and error plot -// THIS IS A DEPRECATED PLOT TYPE JUST KEPT FOR -// BACKWARD COMPATIBILITY -//=================================================== -class ErrorLinePlot extends ErrorPlot { - public $line=null; - //--------------- - // CONSTRUCTOR - function __construct($datay,$datax=false) { - parent::__construct($datay,$datax); - // Calculate line coordinates as the average of the error limits - $n = count($datay); - for($i=0; $i < $n; $i+=2 ) { - $ly[]=($datay[$i]+$datay[$i+1])/2; - } - $this->line=new LinePlot($ly,$datax); - } - - //--------------- - // PUBLIC METHODS - function Legend($graph) { - if( $this->legend != "" ) - $graph->legend->Add($this->legend,$this->color); - $this->line->Legend($graph); - } - - function Stroke($img,$xscale,$yscale) { - parent::Stroke($img,$xscale,$yscale); - $this->line->Stroke($img,$xscale,$yscale); - } -} // Class - - -//=================================================== -// CLASS LineErrorPlot -// Description: Combine a line and error plot -//=================================================== -class LineErrorPlot extends ErrorPlot { - public $line=null; - //--------------- - // CONSTRUCTOR - // Data is (val, errdeltamin, errdeltamax) - function __construct($datay,$datax=false) { - $ly=array(); $ey=array(); - $n = count($datay); - if( $n % 3 != 0 ) { - JpGraphError::RaiseL(4002); - //('Error in input data to LineErrorPlot. Number of data points must be a multiple of 3'); - } - for($i=0; $i < $n; $i+=3 ) { - $ly[]=$datay[$i]; - $ey[]=$datay[$i]+$datay[$i+1]; - $ey[]=$datay[$i]+$datay[$i+2]; - } - parent::__construct($ey,$datax); - $this->line=new LinePlot($ly,$datax); - } - - //--------------- - // PUBLIC METHODS - function Legend($graph) { - if( $this->legend != "" ) - $graph->legend->Add($this->legend,$this->color); - $this->line->Legend($graph); - } - - function Stroke($img,$xscale,$yscale) { - parent::Stroke($img,$xscale,$yscale); - $this->line->Stroke($img,$xscale,$yscale); - } -} // Class - - -/* EOF */ -?> \ No newline at end of file diff --git a/html/lib/jpgraph/jpgraph_flags.php b/html/lib/jpgraph/jpgraph_flags.php deleted file mode 100644 index 6a55fd2933..0000000000 --- a/html/lib/jpgraph/jpgraph_flags.php +++ /dev/null @@ -1,400 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -//======================================================================= -// File: JPGRAPH_FLAGS.PHP -// Description: Class Jpfile. Handles plotmarks -// Created: 2003-06-28 -// Ver: $Id: jpgraph_flags.php 1106 2009-02-22 20:16:35Z ljp $ -// -// Copyright (c) Aditus Consulting. All rights reserved. -//======================================================================== - -//------------------------------------------------------------ -// Defines for the different basic sizes of flags -//------------------------------------------------------------ -DEFINE('FLAGSIZE1',1); -DEFINE('FLAGSIZE2',2); -DEFINE('FLAGSIZE3',3); -DEFINE('FLAGSIZE4',4); - -class FlagImages { - - public $iCountryNameMap = array( - 'Afghanistan' => 'afgh', - 'Republic of Angola' => 'agla', - 'Republic of Albania' => 'alba', - 'Alderney' => 'alde', - 'Democratic and Popular Republic of Algeria' => 'alge', - 'Territory of American Samoa' => 'amsa', - 'Principality of Andorra' => 'andr', - 'British Overseas Territory of Anguilla' => 'angu', - 'Antarctica' => 'anta', - 'Argentine Republic' => 'arge', - 'League of Arab States' => 'arle', - 'Republic of Armenia' => 'arme', - 'Aruba' => 'arub', - 'Commonwealth of Australia' => 'astl', - 'Republic of Austria' => 'aust', - 'Azerbaijani Republic' => 'azer', - 'Bangladesh' => 'bngl', - 'British Antarctic Territory' => 'bant', - 'Kingdom of Belgium' => 'belg', - 'British Overseas Territory of Bermuda' => 'berm', - 'Commonwealth of the Bahamas' => 'bhms', - 'Kingdom of Bahrain' => 'bhrn', - 'Republic of Belarus' => 'blru', - 'Republic of Bolivia' => 'blva', - 'Belize' => 'blze', - 'Republic of Benin' => 'bnin', - 'Republic of Botswana' => 'bots', - 'Federative Republic of Brazil' => 'braz', - 'Barbados' => 'brbd', - 'British Indian Ocean Territory' => 'brin', - 'Brunei Darussalam' => 'brun', - 'Republic of Burkina' => 'bufa', - 'Republic of Bulgaria' => 'bulg', - 'Republic of Burundi' => 'buru', - 'Overseas Territory of the British Virgin Islands' => 'bvis', - 'Central African Republic' => 'cafr', - 'Kingdom of Cambodia' => 'camb', - 'Republic of Cameroon' => 'came', - 'Dominion of Canada' => 'cana', - 'Caribbean Community' => 'cari', - 'Republic of Cape Verde' => 'cave', - 'Republic of Chad' => 'chad', - 'Republic of Chile' => 'chil', - 'Peoples Republic of China' => 'chin', - 'Territory of Christmas Island' => 'chms', - 'Commonwealth of Independent States' => 'cins', - 'Cook Islands' => 'ckis', - 'Republic of Colombia' => 'clmb', - 'Territory of Cocos Islands' => 'cois', - 'Commonwealth' => 'comn', - 'Union of the Comoros' => 'como', - 'Republic of the Congo' => 'cong', - 'Republic of Costa Rica' => 'corc', - 'Republic of Croatia' => 'croa', - 'Republic of Cuba' => 'cuba', - 'British Overseas Territory of the Cayman Islands' => 'cyis', - 'Republic of Cyprus' => 'cypr', - 'The Czech Republic' => 'czec', - 'Kingdom of Denmark' => 'denm', - 'Republic of Djibouti' => 'djib', - 'Commonwealth of Dominica' => 'domn', - 'Dominican Republic' => 'dore', - 'Republic of Ecuador' => 'ecua', - 'Arab Republic of Egypt' => 'egyp', - 'Republic of El Salvador' => 'elsa', - 'England' => 'engl', - 'Republic of Equatorial Guinea' => 'eqgu', - 'State of Eritrea' => 'erit', - 'Republic of Estonia' => 'estn', - 'Ethiopia' => 'ethp', - 'European Union' => 'euun', - 'British Overseas Territory of the Falkland Islands' => 'fais', - 'International Federation of Vexillological Associations' => 'fiav', - 'Republic of Fiji' => 'fiji', - 'Republic of Finland' => 'finl', - 'Territory of French Polynesia' => 'fpol', - 'French Republic' => 'fran', - 'Overseas Department of French Guiana' => 'frgu', - 'Gabonese Republic' => 'gabn', - 'Republic of the Gambia' => 'gamb', - 'Republic of Georgia' => 'geor', - 'Federal Republic of Germany' => 'germ', - 'Republic of Ghana' => 'ghan', - 'Gibraltar' => 'gibr', - 'Hellenic Republic' => 'grec', - 'State of Grenada' => 'gren', - 'Overseas Department of Guadeloupe' => 'guad', - 'Territory of Guam' => 'guam', - 'Republic of Guatemala' => 'guat', - 'The Bailiwick of Guernsey' => 'guer', - 'Republic of Guinea' => 'guin', - 'Republic of Haiti' => 'hait', - 'Hong Kong Special Administrative Region' => 'hokn', - 'Republic of Honduras' => 'hond', - 'Republic of Hungary' => 'hung', - 'Republic of Iceland' => 'icel', - 'International Committee of the Red Cross' => 'icrc', - 'Republic of India' => 'inda', - 'Republic of Indonesia' => 'indn', - 'Republic of Iraq' => 'iraq', - 'Republic of Ireland' => 'irel', - 'Organization of the Islamic Conference' => 'isco', - 'Isle of Man' => 'isma', - 'State of Israel' => 'isra', - 'Italian Republic' => 'ital', - 'Jamaica' => 'jama', - 'Japan' => 'japa', - 'The Bailiwick of Jersey' => 'jers', - 'Hashemite Kingdom of Jordan' => 'jord', - 'Republic of Kazakhstan' => 'kazk', - 'Republic of Kenya' => 'keny', - 'Republic of Kiribati' => 'kirb', - 'State of Kuwait' => 'kuwa', - 'Kyrgyz Republic' => 'kyrg', - 'Republic of Latvia' => 'latv', - 'Lebanese Republic' => 'leba', - 'Kingdom of Lesotho' => 'lest', - 'Republic of Liberia' => 'libe', - 'Principality of Liechtenstein' => 'liec', - 'Republic of Lithuania' => 'lith', - 'Grand Duchy of Luxembourg' => 'luxe', - 'Macao Special Administrative Region' => 'maca', - 'Republic of Macedonia' => 'mace', - 'Republic of Madagascar' => 'mada', - 'Republic of the Marshall Islands' => 'mais', - 'Republic of Mali' => 'mali', - 'Federation of Malaysia' => 'mals', - 'Republic of Malta' => 'malt', - 'Republic of Malawi' => 'malw', - 'Overseas Department of Martinique' => 'mart', - 'Islamic Republic of Mauritania' => 'maur', - 'Territorial Collectivity of Mayotte' => 'mayt', - 'United Mexican States' => 'mexc', - 'Federated States of Micronesia' => 'micr', - 'Midway Islands' => 'miis', - 'Republic of Moldova' => 'mold', - 'Principality of Monaco' => 'mona', - 'Republic of Mongolia' => 'mong', - 'British Overseas Territory of Montserrat' => 'mont', - 'Kingdom of Morocco' => 'morc', - 'Republic of Mozambique' => 'moza', - 'Republic of Mauritius' => 'mrts', - 'Union of Myanmar' => 'myan', - 'Republic of Namibia' => 'namb', - 'North Atlantic Treaty Organization' => 'nato', - 'Republic of Nauru' => 'naur', - 'Turkish Republic of Northern Cyprus' => 'ncyp', - 'Netherlands Antilles' => 'nean', - 'Kingdom of Nepal' => 'nepa', - 'Kingdom of the Netherlands' => 'neth', - 'Territory of Norfolk Island' => 'nfis', - 'Federal Republic of Nigeria' => 'ngra', - 'Republic of Nicaragua' => 'nica', - 'Republic of Niger' => 'nigr', - 'Niue' => 'niue', - 'Commonwealth of the Northern Mariana Islands' => 'nmar', - 'Province of Northern Ireland' => 'noir', - 'Nordic Council' => 'nord', - 'Kingdom of Norway' => 'norw', - 'Territory of New Caledonia and Dependencies' => 'nwca', - 'New Zealand' => 'nwze', - 'Organization of American States' => 'oast', - 'Organization of African Unity' => 'oaun', - 'International Olympic Committee' => 'olym', - 'Sultanate of Oman' => 'oman', - 'Islamic Republic of Pakistan' => 'paks', - 'Republic of Palau' => 'pala', - 'Independent State of Papua New Guinea' => 'pang', - 'Republic of Paraguay' => 'para', - 'Republic of Peru' => 'peru', - 'Republic of the Philippines' => 'phil', - 'British Overseas Territory of the Pitcairn Islands' => 'piis', - 'Republic of Poland' => 'pola', - 'Republic of Portugal' => 'port', - 'Commonwealth of Puerto Rico' => 'purc', - 'State of Qatar' => 'qata', - 'Russian Federation' => 'russ', - 'Romania' => 'rmna', - 'Republic of Rwanda' => 'rwan', - 'Kingdom of Saudi Arabia' => 'saar', - 'Republic of San Marino' => 'sama', - 'Nordic Sami Conference' => 'sami', - 'Sark' => 'sark', - 'Scotland' => 'scot', - 'Principality of Seborga' => 'sebo', - 'Republic of Serbia' => 'serb', - 'Republic of Sierra Leone' => 'sile', - 'Republic of Singapore' => 'sing', - 'Republic of Korea' => 'skor', - 'Republic of Slovenia' => 'slva', - 'Somali Republic' => 'smla', - 'Republic of Somaliland' => 'smld', - 'Republic of South Africa' => 'soaf', - 'Solomon Islands' => 'sois', - 'Kingdom of Spain' => 'span', - 'Secretariat of the Pacific Community' => 'spco', - 'Democratic Socialist Republic of Sri Lanka' => 'srla', - 'Saint Lucia' => 'stlu', - 'Republic of the Sudan' => 'suda', - 'Republic of Suriname' => 'surn', - 'Slovak Republic' => 'svka', - 'Kingdom of Sweden' => 'swdn', - 'Swiss Confederation' => 'swit', - 'Syrian Arab Republic' => 'syra', - 'Kingdom of Swaziland' => 'szld', - 'Republic of China' => 'taiw', - 'Taiwan' => 'taiw', - 'Republic of Tajikistan' => 'tajk', - 'United Republic of Tanzania' => 'tanz', - 'Kingdom of Thailand' => 'thal', - 'Autonomous Region of Tibet' => 'tibe', - 'Turkmenistan' => 'tkst', - 'Togolese Republic' => 'togo', - 'Tokelau' => 'toke', - 'Kingdom of Tonga' => 'tong', - 'Tristan da Cunha' => 'trdc', - 'Tromelin' => 'tris', - 'Republic of Tunisia' => 'tuns', - 'Republic of Turkey' => 'turk', - 'Tuvalu' => 'tuva', - 'United Arab Emirates' => 'uaem', - 'Republic of Uganda' => 'ugan', - 'Ukraine' => 'ukrn', - 'United Kingdom of Great Britain' => 'unkg', - 'United Nations' => 'unna', - 'United States of America' => 'unst', - 'Oriental Republic of Uruguay' => 'urgy', - 'Virgin Islands of the United States' => 'usvs', - 'Republic of Uzbekistan' => 'uzbk', - 'State of the Vatican City' => 'vacy', - 'Republic of Vanuatu' => 'vant', - 'Bolivarian Republic of Venezuela' => 'venz', - 'Republic of Yemen' => 'yemn', - 'Democratic Republic of Congo' => 'zare', - 'Republic of Zimbabwe' => 'zbwe' ) ; - - - private $iFlagCount = -1; - private $iFlagSetMap = array( - FLAGSIZE1 => 'flags_thumb35x35', - FLAGSIZE2 => 'flags_thumb60x60', - FLAGSIZE3 => 'flags_thumb100x100', - FLAGSIZE4 => 'flags' - ); - - private $iFlagData ; - private $iOrdIdx=array(); - - function __construct($aSize=FLAGSIZE1) { - switch($aSize) { - case FLAGSIZE1 : - case FLAGSIZE2 : - case FLAGSIZE3 : - case FLAGSIZE4 : - $file = dirname(__FILE__).'/'.$this->iFlagSetMap[$aSize].'.dat'; - $fp = fopen($file,'rb'); - $rawdata = fread($fp,filesize($file)); - $this->iFlagData = unserialize($rawdata); - break; - default: - JpGraphError::RaiseL(5001,$aSize); - //('Unknown flag size. ('.$aSize.')'); - } - $this->iFlagCount = count($this->iCountryNameMap); - } - - function GetNum() { - return $this->iFlagCount; - } - - function GetImgByName($aName,&$outFullName) { - $idx = $this->GetIdxByName($aName,$outFullName); - return $this->GetImgByIdx($idx); - } - - function GetImgByIdx($aIdx) { - if( array_key_exists($aIdx,$this->iFlagData) ) { - $d = $this->iFlagData[$aIdx][1]; - return Image::CreateFromString($d); - } - else { - JpGraphError::RaiseL(5002,$aIdx); - //("Flag index \"�$aIdx\" does not exist."); - } - } - - function GetIdxByOrdinal($aOrd,&$outFullName) { - $aOrd--; - $n = count($this->iOrdIdx); - if( $n == 0 ) { - reset($this->iCountryNameMap); - $this->iOrdIdx=array(); - $i=0; - while( list($key,$val) = each($this->iCountryNameMap) ) { - $this->iOrdIdx[$i++] = array($val,$key); - } - $tmp=$this->iOrdIdx[$aOrd]; - $outFullName = $tmp[1]; - return $tmp[0]; - - } - elseif( $aOrd >= 0 && $aOrd < $n ) { - $tmp=$this->iOrdIdx[$aOrd]; - $outFullName = $tmp[1]; - return $tmp[0]; - } - else { - JpGraphError::RaiseL(5003,$aOrd); - //('Invalid ordinal number specified for flag index.'); - } - } - - function GetIdxByName($aName,&$outFullName) { - - if( is_integer($aName) ) { - $idx = $this->GetIdxByOrdinal($aName,$outFullName); - return $idx; - } - - $found=false; - $aName = strtolower($aName); - $nlen = strlen($aName); - reset($this->iCountryNameMap); - // Start by trying to match exact index name - while( list($key,$val) = each($this->iCountryNameMap) ) { - if( $nlen == strlen($val) && $val == $aName ) { - $found=true; - break; - } - } - if( !$found ) { - reset($this->iCountryNameMap); - // If the exact index doesn't work try a (partial) full name - while( list($key,$val) = each($this->iCountryNameMap) ) { - if( strpos(strtolower($key), $aName) !== false ) { - $found=true; - break; - } - } - } - if( $found ) { - $outFullName = $key; - return $val; - } - else { - JpGraphError::RaiseL(5004,$aName); - //("The (partial) country name \"$aName\" does not have a cooresponding flag image. The flag may still exist but under another name, e.g. insted of \"usa\" try \"united states\"."); - } - } -} - - - - -?> diff --git a/html/lib/jpgraph/jpgraph_gantt.php b/html/lib/jpgraph/jpgraph_gantt.php deleted file mode 100644 index 635c17612b..0000000000 --- a/html/lib/jpgraph/jpgraph_gantt.php +++ /dev/null @@ -1,3979 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -/*======================================================================= - // File: JPGRAPH_GANTT.PHP - // Description: JpGraph Gantt plot extension - // Created: 2001-11-12 - // Ver: $Id: jpgraph_gantt.php 1809 2009-09-09 13:07:33Z ljp $ - // - // Copyright (c) Aditus Consulting. All rights reserved. - //======================================================================== - */ - -require_once('jpgraph_plotband.php'); -require_once('jpgraph_iconplot.php'); -require_once('jpgraph_plotmark.inc.php'); - -// Maximum size for Automatic Gantt chart -define('MAX_GANTTIMG_SIZE_W',8000); -define('MAX_GANTTIMG_SIZE_H',5000); - -// Scale Header types -define("GANTT_HDAY",1); -define("GANTT_HWEEK",2); -define("GANTT_HMONTH",4); -define("GANTT_HYEAR",8); -define("GANTT_HHOUR",16); -define("GANTT_HMIN",32); - -// Bar patterns -define("GANTT_RDIAG",BAND_RDIAG); // Right diagonal lines -define("GANTT_LDIAG",BAND_LDIAG); // Left diagonal lines -define("GANTT_SOLID",BAND_SOLID); // Solid one color -define("GANTT_VLINE",BAND_VLINE); // Vertical lines -define("GANTT_HLINE",BAND_HLINE); // Horizontal lines -define("GANTT_3DPLANE",BAND_3DPLANE); // "3D" Plane -define("GANTT_HVCROSS",BAND_HVCROSS); // Vertical/Hor crosses -define("GANTT_DIAGCROSS",BAND_DIAGCROSS); // Diagonal crosses - -// Conversion constant -define("SECPERDAY",3600*24); - -// Locales. ONLY KEPT FOR BACKWARDS COMPATIBILITY -// You should use the proper locale strings directly -// from now on. -define("LOCALE_EN","en_UK"); -define("LOCALE_SV","sv_SE"); - -// Layout of bars -define("GANTT_EVEN",1); -define("GANTT_FROMTOP",2); - -// Style for minute header -define("MINUTESTYLE_MM",0); // 15 -define("MINUTESTYLE_CUSTOM",2); // Custom format - - -// Style for hour header -define("HOURSTYLE_HM24",0); // 13:10 -define("HOURSTYLE_HMAMPM",1); // 1:10pm -define("HOURSTYLE_H24",2); // 13 -define("HOURSTYLE_HAMPM",3); // 1pm -define("HOURSTYLE_CUSTOM",4); // User defined - -// Style for day header -define("DAYSTYLE_ONELETTER",0); // "M" -define("DAYSTYLE_LONG",1); // "Monday" -define("DAYSTYLE_LONGDAYDATE1",2); // "Monday 23 Jun" -define("DAYSTYLE_LONGDAYDATE2",3); // "Monday 23 Jun 2003" -define("DAYSTYLE_SHORT",4); // "Mon" -define("DAYSTYLE_SHORTDAYDATE1",5); // "Mon 23/6" -define("DAYSTYLE_SHORTDAYDATE2",6); // "Mon 23 Jun" -define("DAYSTYLE_SHORTDAYDATE3",7); // "Mon 23" -define("DAYSTYLE_SHORTDATE1",8); // "23/6" -define("DAYSTYLE_SHORTDATE2",9); // "23 Jun" -define("DAYSTYLE_SHORTDATE3",10); // "Mon 23" -define("DAYSTYLE_SHORTDATE4",11); // "23" -define("DAYSTYLE_CUSTOM",12); // "M" - -// Styles for week header -define("WEEKSTYLE_WNBR",0); -define("WEEKSTYLE_FIRSTDAY",1); -define("WEEKSTYLE_FIRSTDAY2",2); -define("WEEKSTYLE_FIRSTDAYWNBR",3); -define("WEEKSTYLE_FIRSTDAY2WNBR",4); - -// Styles for month header -define("MONTHSTYLE_SHORTNAME",0); -define("MONTHSTYLE_LONGNAME",1); -define("MONTHSTYLE_LONGNAMEYEAR2",2); -define("MONTHSTYLE_SHORTNAMEYEAR2",3); -define("MONTHSTYLE_LONGNAMEYEAR4",4); -define("MONTHSTYLE_SHORTNAMEYEAR4",5); -define("MONTHSTYLE_FIRSTLETTER",6); - - -// Types of constrain links -define('CONSTRAIN_STARTSTART',0); -define('CONSTRAIN_STARTEND',1); -define('CONSTRAIN_ENDSTART',2); -define('CONSTRAIN_ENDEND',3); - -// Arrow direction for constrain links -define('ARROW_DOWN',0); -define('ARROW_UP',1); -define('ARROW_LEFT',2); -define('ARROW_RIGHT',3); - -// Arrow type for constrain type -define('ARROWT_SOLID',0); -define('ARROWT_OPEN',1); - -// Arrow size for constrain lines -define('ARROW_S1',0); -define('ARROW_S2',1); -define('ARROW_S3',2); -define('ARROW_S4',3); -define('ARROW_S5',4); - -// Activity types for use with utility method CreateSimple() -define('ACTYPE_NORMAL',0); -define('ACTYPE_GROUP',1); -define('ACTYPE_MILESTONE',2); - -define('ACTINFO_3D',1); -define('ACTINFO_2D',0); - - -// Check if array_fill() exists -if (!function_exists('array_fill')) { - function array_fill($iStart, $iLen, $vValue) { - $aResult = array(); - for ($iCount = $iStart; $iCount < $iLen + $iStart; $iCount++) { - $aResult[$iCount] = $vValue; - } - return $aResult; - } -} - -//=================================================== -// CLASS GanttActivityInfo -// Description: -//=================================================== -class GanttActivityInfo { - public $iShow=true; - public $iLeftColMargin=4,$iRightColMargin=1,$iTopColMargin=1,$iBottomColMargin=3; - public $vgrid = null; - private $iColor='black'; - private $iBackgroundColor='lightgray'; - private $iFFamily=FF_FONT1,$iFStyle=FS_NORMAL,$iFSize=10,$iFontColor='black'; - private $iTitles=array(); - private $iWidth=array(),$iHeight=-1; - private $iTopHeaderMargin = 4; - private $iStyle=1; - private $iHeaderAlign='center'; - - function __construct() { - $this->vgrid = new LineProperty(); - } - - function Hide($aF=true) { - $this->iShow=!$aF; - } - - function Show($aF=true) { - $this->iShow=$aF; - } - - // Specify font - function SetFont($aFFamily,$aFStyle=FS_NORMAL,$aFSize=10) { - $this->iFFamily = $aFFamily; - $this->iFStyle = $aFStyle; - $this->iFSize = $aFSize; - } - - function SetStyle($aStyle) { - $this->iStyle = $aStyle; - } - - function SetColumnMargin($aLeft,$aRight) { - $this->iLeftColMargin = $aLeft; - $this->iRightColMargin = $aRight; - } - - function SetFontColor($aFontColor) { - $this->iFontColor = $aFontColor; - } - - function SetColor($aColor) { - $this->iColor = $aColor; - } - - function SetBackgroundColor($aColor) { - $this->iBackgroundColor = $aColor; - } - - function SetColTitles($aTitles,$aWidth=null) { - $this->iTitles = $aTitles; - $this->iWidth = $aWidth; - } - - function SetMinColWidth($aWidths) { - $n = min(count($this->iTitles),count($aWidths)); - for($i=0; $i < $n; ++$i ) { - if( !empty($aWidths[$i]) ) { - if( empty($this->iWidth[$i]) ) { - $this->iWidth[$i] = $aWidths[$i]; - } - else { - $this->iWidth[$i] = max($this->iWidth[$i],$aWidths[$i]); - } - } - } - } - - function GetWidth($aImg) { - $txt = new TextProperty(); - $txt->SetFont($this->iFFamily,$this->iFStyle,$this->iFSize); - $n = count($this->iTitles) ; - $rm=$this->iRightColMargin; - $w = 0; - for($h=0, $i=0; $i < $n; ++$i ) { - $w += $this->iLeftColMargin; - $txt->Set($this->iTitles[$i]); - if( !empty($this->iWidth[$i]) ) { - $w1 = max($txt->GetWidth($aImg)+$rm,$this->iWidth[$i]); - } - else { - $w1 = $txt->GetWidth($aImg)+$rm; - } - $this->iWidth[$i] = $w1; - $w += $w1; - $h = max($h,$txt->GetHeight($aImg)); - } - $this->iHeight = $h+$this->iTopHeaderMargin; - $txt=''; - return $w; - } - - function GetColStart($aImg,&$aStart,$aAddLeftMargin=false) { - $n = count($this->iTitles) ; - $adj = $aAddLeftMargin ? $this->iLeftColMargin : 0; - $aStart=array($aImg->left_margin+$adj); - for( $i=1; $i < $n; ++$i ) { - $aStart[$i] = $aStart[$i-1]+$this->iLeftColMargin+$this->iWidth[$i-1]; - } - } - - // Adjust headers left, right or centered - function SetHeaderAlign($aAlign) { - $this->iHeaderAlign=$aAlign; - } - - function Stroke($aImg,$aXLeft,$aYTop,$aXRight,$aYBottom,$aUseTextHeight=false) { - - if( !$this->iShow ) return; - - $txt = new TextProperty(); - $txt->SetFont($this->iFFamily,$this->iFStyle,$this->iFSize); - $txt->SetColor($this->iFontColor); - $txt->SetAlign($this->iHeaderAlign,'top'); - $n=count($this->iTitles); - - if( $n == 0 ) - return; - - $x = $aXLeft; - $h = $this->iHeight; - $yTop = $aUseTextHeight ? $aYBottom-$h-$this->iTopColMargin-$this->iBottomColMargin : $aYTop ; - - if( $h < 0 ) { - JpGraphError::RaiseL(6001); - //('Internal error. Height for ActivityTitles is < 0'); - } - - $aImg->SetLineWeight(1); - // Set background color - $aImg->SetColor($this->iBackgroundColor); - $aImg->FilledRectangle($aXLeft,$yTop,$aXRight,$aYBottom-1); - - if( $this->iStyle == 1 ) { - // Make a 3D effect - $aImg->SetColor('white'); - $aImg->Line($aXLeft,$yTop+1,$aXRight,$yTop+1); - } - - for($i=0; $i < $n; ++$i ) { - if( $this->iStyle == 1 ) { - // Make a 3D effect - $aImg->SetColor('white'); - $aImg->Line($x+1,$yTop,$x+1,$aYBottom); - } - $x += $this->iLeftColMargin; - $txt->Set($this->iTitles[$i]); - - // Adjust the text anchor position according to the choosen alignment - $xp = $x; - if( $this->iHeaderAlign == 'center' ) { - $xp = (($x-$this->iLeftColMargin)+($x+$this->iWidth[$i]))/2; - } - elseif( $this->iHeaderAlign == 'right' ) { - $xp = $x +$this->iWidth[$i]-$this->iRightColMargin; - } - - $txt->Stroke($aImg,$xp,$yTop+$this->iTopHeaderMargin); - $x += $this->iWidth[$i]; - if( $i < $n-1 ) { - $aImg->SetColor($this->iColor); - $aImg->Line($x,$yTop,$x,$aYBottom); - } - } - - $aImg->SetColor($this->iColor); - $aImg->Line($aXLeft,$yTop, $aXRight,$yTop); - - // Stroke vertical column dividers - $cols=array(); - $this->GetColStart($aImg,$cols); - $n=count($cols); - for( $i=1; $i < $n; ++$i ) { - $this->vgrid->Stroke($aImg,$cols[$i],$aYBottom,$cols[$i], - $aImg->height - $aImg->bottom_margin); - } - } -} - - -//=================================================== -// CLASS GanttGraph -// Description: Main class to handle gantt graphs -//=================================================== -class GanttGraph extends Graph { - public $scale; // Public accessible - public $hgrid=null; - private $iObj=array(); // Gantt objects - private $iLabelHMarginFactor=0.2; // 10% margin on each side of the labels - private $iLabelVMarginFactor=0.4; // 40% margin on top and bottom of label - private $iLayout=GANTT_FROMTOP; // Could also be GANTT_EVEN - private $iSimpleFont = FF_FONT1,$iSimpleFontSize=11; - private $iSimpleStyle=GANTT_RDIAG,$iSimpleColor='yellow',$iSimpleBkgColor='red'; - private $iSimpleProgressBkgColor='gray',$iSimpleProgressColor='darkgreen'; - private $iSimpleProgressStyle=GANTT_SOLID; - private $iZoomFactor = 1.0; - //--------------- - // CONSTRUCTOR - // Create a new gantt graph - function __construct($aWidth=0,$aHeight=0,$aCachedName="",$aTimeOut=0,$aInline=true) { - - // Backward compatibility - if( $aWidth == -1 ) $aWidth=0; - if( $aHeight == -1 ) $aHeight=0; - - if( $aWidth< 0 || $aHeight < 0 ) { - JpgraphError::RaiseL(6002); - //("You can't specify negative sizes for Gantt graph dimensions. Use 0 to indicate that you want the library to automatically determine a dimension."); - } - parent::__construct($aWidth,$aHeight,$aCachedName,$aTimeOut,$aInline); - $this->scale = new GanttScale($this->img); - - // Default margins - $this->img->SetMargin(15,17,25,15); - - $this->hgrid = new HorizontalGridLine(); - - $this->scale->ShowHeaders(GANTT_HWEEK|GANTT_HDAY); - $this->SetBox(); - } - - //--------------- - // PUBLIC METHODS - - // - - function SetSimpleFont($aFont,$aSize) { - $this->iSimpleFont = $aFont; - $this->iSimpleFontSize = $aSize; - } - - function SetSimpleStyle($aBand,$aColor,$aBkgColor) { - $this->iSimpleStyle = $aBand; - $this->iSimpleColor = $aColor; - $this->iSimpleBkgColor = $aBkgColor; - } - - // A utility function to help create basic Gantt charts - function CreateSimple($data,$constrains=array(),$progress=array()) { - $num = count($data); - for( $i=0; $i < $num; ++$i) { - switch( $data[$i][1] ) { - case ACTYPE_GROUP: - // Create a slightly smaller height bar since the - // "wings" at the end will make it look taller - $a = new GanttBar($data[$i][0],$data[$i][2],$data[$i][3],$data[$i][4],'',8); - $a->title->SetFont($this->iSimpleFont,FS_BOLD,$this->iSimpleFontSize); - $a->rightMark->Show(); - $a->rightMark->SetType(MARK_RIGHTTRIANGLE); - $a->rightMark->SetWidth(8); - $a->rightMark->SetColor('black'); - $a->rightMark->SetFillColor('black'); - - $a->leftMark->Show(); - $a->leftMark->SetType(MARK_LEFTTRIANGLE); - $a->leftMark->SetWidth(8); - $a->leftMark->SetColor('black'); - $a->leftMark->SetFillColor('black'); - - $a->SetPattern(BAND_SOLID,'black'); - $csimpos = 6; - break; - - case ACTYPE_NORMAL: - $a = new GanttBar($data[$i][0],$data[$i][2],$data[$i][3],$data[$i][4],'',10); - $a->title->SetFont($this->iSimpleFont,FS_NORMAL,$this->iSimpleFontSize); - $a->SetPattern($this->iSimpleStyle,$this->iSimpleColor); - $a->SetFillColor($this->iSimpleBkgColor); - // Check if this activity should have a constrain line - $n = count($constrains); - for( $j=0; $j < $n; ++$j ) { - if( empty($constrains[$j]) || (count($constrains[$j]) != 3) ) { - JpGraphError::RaiseL(6003,$j); - //("Invalid format for Constrain parameter at index=$j in CreateSimple(). Parameter must start with index 0 and contain arrays of (Row,Constrain-To,Constrain-Type)"); - } - if( $constrains[$j][0]==$data[$i][0] ) { - $a->SetConstrain($constrains[$j][1],$constrains[$j][2],'black',ARROW_S2,ARROWT_SOLID); - } - } - - // Check if this activity have a progress bar - $n = count($progress); - for( $j=0; $j < $n; ++$j ) { - - if( empty($progress[$j]) || (count($progress[$j]) != 2) ) { - JpGraphError::RaiseL(6004,$j); - //("Invalid format for Progress parameter at index=$j in CreateSimple(). Parameter must start with index 0 and contain arrays of (Row,Progress)"); - } - if( $progress[$j][0]==$data[$i][0] ) { - $a->progress->Set($progress[$j][1]); - $a->progress->SetPattern($this->iSimpleProgressStyle, - $this->iSimpleProgressColor); - $a->progress->SetFillColor($this->iSimpleProgressBkgColor); - //$a->progress->SetPattern($progress[$j][2],$progress[$j][3]); - break; - } - } - $csimpos = 6; - break; - - case ACTYPE_MILESTONE: - $a = new MileStone($data[$i][0],$data[$i][2],$data[$i][3]); - $a->title->SetFont($this->iSimpleFont,FS_NORMAL,$this->iSimpleFontSize); - $a->caption->SetFont($this->iSimpleFont,FS_NORMAL,$this->iSimpleFontSize); - $csimpos = 5; - break; - default: - die('Unknown activity type'); - break; - } - - // Setup caption - $a->caption->Set($data[$i][$csimpos-1]); - - // Check if this activity should have a CSIM target�? - if( !empty($data[$i][$csimpos]) ) { - $a->SetCSIMTarget($data[$i][$csimpos]); - $a->SetCSIMAlt($data[$i][$csimpos+1]); - } - if( !empty($data[$i][$csimpos+2]) ) { - $a->title->SetCSIMTarget($data[$i][$csimpos+2]); - $a->title->SetCSIMAlt($data[$i][$csimpos+3]); - } - - $this->Add($a); - } - } - - // Set user specified scale zoom factor when auto sizing is used - function SetZoomFactor($aZoom) { - $this->iZoomFactor = $aZoom; - } - - - // Set what headers should be shown - function ShowHeaders($aFlg) { - $this->scale->ShowHeaders($aFlg); - } - - // Specify the fraction of the font height that should be added - // as vertical margin - function SetLabelVMarginFactor($aVal) { - $this->iLabelVMarginFactor = $aVal; - } - - // Synonym to the method above - function SetVMarginFactor($aVal) { - $this->iLabelVMarginFactor = $aVal; - } - - - // Add a new Gantt object - function Add($aObject) { - if( is_array($aObject) && count($aObject) > 0 ) { - $cl = $aObject[0]; - if( class_exists('IconPlot',false) && ($cl instanceof IconPlot) ) { - $this->AddIcon($aObject); - } - elseif( class_exists('Text',false) && ($cl instanceof Text) ) { - $this->AddText($aObject); - } - else { - $n = count($aObject); - for($i=0; $i < $n; ++$i) - $this->iObj[] = $aObject[$i]; - } - } - else { - if( class_exists('IconPlot',false) && ($aObject instanceof IconPlot) ) { - $this->AddIcon($aObject); - } - elseif( class_exists('Text',false) && ($aObject instanceof Text) ) { - $this->AddText($aObject); - } - else { - $this->iObj[] = $aObject; - } - } - } - - function StrokeTexts() { - // Stroke any user added text objects - if( $this->texts != null ) { - $n = count($this->texts); - for($i=0; $i < $n; ++$i) { - if( $this->texts[$i]->iScalePosX !== null && $this->texts[$i]->iScalePosY !== null ) { - $x = $this->scale->TranslateDate($this->texts[$i]->iScalePosX); - $y = $this->scale->TranslateVertPos($this->texts[$i]->iScalePosY); - $y -= $this->scale->GetVertSpacing()/2; - } - else { - $x = $y = null; - } - $this->texts[$i]->Stroke($this->img,$x,$y); - } - } - } - - // Override inherit method from Graph and give a warning message - function SetScale($aAxisType,$aYMin=1,$aYMax=1,$aXMin=1,$aXMax=1) { - JpGraphError::RaiseL(6005); - //("SetScale() is not meaningfull with Gantt charts."); - } - - // Specify the date range for Gantt graphs (if this is not set it will be - // automtically determined from the input data) - function SetDateRange($aStart,$aEnd) { - // Adjust the start and end so that the indicate the - // begining and end of respective start and end days - if( strpos($aStart,':') === false ) - $aStart = date('Y-m-d 00:00',strtotime($aStart)); - if( strpos($aEnd,':') === false ) - $aEnd = date('Y-m-d 23:59',strtotime($aEnd)); - $this->scale->SetRange($aStart,$aEnd); - } - - // Get the maximum width of the activity titles columns for the bars - // The name is lightly misleading since we from now on can have - // multiple columns in the label section. When this was first written - // it only supported a single label, hence the name. - function GetMaxLabelWidth() { - $m=10; - if( $this->iObj != null ) { - $marg = $this->scale->actinfo->iLeftColMargin+$this->scale->actinfo->iRightColMargin; - $n = count($this->iObj); - for($i=0; $i < $n; ++$i) { - if( !empty($this->iObj[$i]->title) ) { - if( $this->iObj[$i]->title->HasTabs() ) { - list($tot,$w) = $this->iObj[$i]->title->GetWidth($this->img,true); - $m=max($m,$tot); - } - else - $m=max($m,$this->iObj[$i]->title->GetWidth($this->img)); - } - } - } - return $m; - } - - // Get the maximum height of the titles for the bars - function GetMaxLabelHeight() { - $m=10; - if( $this->iObj != null ) { - $n = count($this->iObj); - // We can not include the title of GnttVLine since that title is stroked at the bottom - // of the Gantt bar and not in the activity title columns - for($i=0; $i < $n; ++$i) { - if( !empty($this->iObj[$i]->title) && !($this->iObj[$i] instanceof GanttVLine) ) { - $m=max($m,$this->iObj[$i]->title->GetHeight($this->img)); - } - } - } - return $m; - } - - function GetMaxBarAbsHeight() { - $m=0; - if( $this->iObj != null ) { - $m = $this->iObj[0]->GetAbsHeight($this->img); - $n = count($this->iObj); - for($i=1; $i < $n; ++$i) { - $m=max($m,$this->iObj[$i]->GetAbsHeight($this->img)); - } - } - return $m; - } - - // Get the maximum used line number (vertical position) for bars - function GetBarMaxLineNumber() { - $m=1; - if( $this->iObj != null ) { - $m = $this->iObj[0]->GetLineNbr(); - $n = count($this->iObj); - for($i=1; $i < $n; ++$i) { - $m=max($m,$this->iObj[$i]->GetLineNbr()); - } - } - return $m; - } - - // Get the minumum and maximum used dates for all bars - function GetBarMinMax() { - $start = 0 ; - $n = count($this->iObj); - while( $start < $n && $this->iObj[$start]->GetMaxDate() === false ) - ++$start; - if( $start >= $n ) { - JpgraphError::RaiseL(6006); - //('Cannot autoscale Gantt chart. No dated activities exist. [GetBarMinMax() start >= n]'); - } - - $max=$this->scale->NormalizeDate($this->iObj[$start]->GetMaxDate()); - $min=$this->scale->NormalizeDate($this->iObj[$start]->GetMinDate()); - - for($i=$start+1; $i < $n; ++$i) { - $rmax = $this->scale->NormalizeDate($this->iObj[$i]->GetMaxDate()); - if( $rmax != false ) - $max=Max($max,$rmax); - $rmin = $this->scale->NormalizeDate($this->iObj[$i]->GetMinDate()); - if( $rmin != false ) - $min=Min($min,$rmin); - } - $minDate = date("Y-m-d",$min); - $min = strtotime($minDate); - $maxDate = date("Y-m-d 23:59",$max); - $max = strtotime($maxDate); - return array($min,$max); - } - - // Create a new auto sized canvas if the user hasn't specified a size - // The size is determined by what scale the user has choosen and hence - // the minimum width needed to display the headers. Some margins are - // also added to make it better looking. - function AutoSize() { - - if( $this->img->img == null ) { - // The predefined left, right, top, bottom margins. - // Note that the top margin might incease depending on - // the title. - $hadj = $vadj = 0; - if( $this->doshadow ) { - $hadj = $this->shadow_width; - $vadj = $this->shadow_width+5; - } - - $lm = $this->img->left_margin; - $rm = $this->img->right_margin +$hadj; - $rm += 2 ; - $tm = $this->img->top_margin; - $bm = $this->img->bottom_margin + $vadj; - $bm += 2; - - // If there are any added GanttVLine we must make sure that the - // bottom margin is wide enough to hold a title. - $n = count($this->iObj); - for($i=0; $i < $n; ++$i) { - if( $this->iObj[$i] instanceof GanttVLine ) { - $bm = max($bm,$this->iObj[$i]->title->GetHeight($this->img)+10); - } - } - - // First find out the height - $n=$this->GetBarMaxLineNumber()+1; - $m=max($this->GetMaxLabelHeight(),$this->GetMaxBarAbsHeight()); - $height=$n*((1+$this->iLabelVMarginFactor)*$m); - - // Add the height of the scale titles - $h=$this->scale->GetHeaderHeight(); - $height += $h; - - // Calculate the top margin needed for title and subtitle - if( $this->title->t != "" ) { - $tm += $this->title->GetFontHeight($this->img); - } - if( $this->subtitle->t != "" ) { - $tm += $this->subtitle->GetFontHeight($this->img); - } - - // ...and then take the bottom and top plot margins into account - $height += $tm + $bm + $this->scale->iTopPlotMargin + $this->scale->iBottomPlotMargin; - // Now find the minimum width for the chart required - - // If day scale or smaller is shown then we use the day font width - // as the base size unit. - // If only weeks or above is displayed we use a modified unit to - // get a smaller image. - if( $this->scale->IsDisplayHour() || $this->scale->IsDisplayMinute() ) { - // Add 2 pixel margin on each side - $fw=$this->scale->day->GetFontWidth($this->img)+4; - } - elseif( $this->scale->IsDisplayWeek() ) { - $fw = 8; - } - elseif( $this->scale->IsDisplayMonth() ) { - $fw = 4; - } - else { - $fw = 2; - } - - $nd=$this->scale->GetNumberOfDays(); - - if( $this->scale->IsDisplayDay() ) { - // If the days are displayed we also need to figure out - // how much space each day's title will require. - switch( $this->scale->day->iStyle ) { - case DAYSTYLE_LONG : - $txt = "Monday"; - break; - case DAYSTYLE_LONGDAYDATE1 : - $txt = "Monday 23 Jun"; - break; - case DAYSTYLE_LONGDAYDATE2 : - $txt = "Monday 23 Jun 2003"; - break; - case DAYSTYLE_SHORT : - $txt = "Mon"; - break; - case DAYSTYLE_SHORTDAYDATE1 : - $txt = "Mon 23/6"; - break; - case DAYSTYLE_SHORTDAYDATE2 : - $txt = "Mon 23 Jun"; - break; - case DAYSTYLE_SHORTDAYDATE3 : - $txt = "Mon 23"; - break; - case DAYSTYLE_SHORTDATE1 : - $txt = "23/6"; - break; - case DAYSTYLE_SHORTDATE2 : - $txt = "23 Jun"; - break; - case DAYSTYLE_SHORTDATE3 : - $txt = "Mon 23"; - break; - case DAYSTYLE_SHORTDATE4 : - $txt = "88"; - break; - case DAYSTYLE_CUSTOM : - $txt = date($this->scale->day->iLabelFormStr,strtotime('2003-12-20 18:00')); - break; - case DAYSTYLE_ONELETTER : - default: - $txt = "M"; - break; - } - $fw = $this->scale->day->GetStrWidth($this->img,$txt)+6; - } - - // If we have hours enabled we must make sure that each day has enough - // space to fit the number of hours to be displayed. - if( $this->scale->IsDisplayHour() ) { - // Depending on what format the user has choose we need different amount - // of space. We therefore create a typical string for the choosen format - // and determine the length of that string. - switch( $this->scale->hour->iStyle ) { - case HOURSTYLE_HMAMPM: - $txt = '12:00pm'; - break; - case HOURSTYLE_H24: - // 13 - $txt = '24'; - break; - case HOURSTYLE_HAMPM: - $txt = '12pm'; - break; - case HOURSTYLE_CUSTOM: - $txt = date($this->scale->hour->iLabelFormStr,strtotime('2003-12-20 18:00')); - break; - case HOURSTYLE_HM24: - default: - $txt = '24:00'; - break; - } - - $hfw = $this->scale->hour->GetStrWidth($this->img,$txt)+6; - $mw = $hfw; - if( $this->scale->IsDisplayMinute() ) { - // Depending on what format the user has choose we need different amount - // of space. We therefore create a typical string for the choosen format - // and determine the length of that string. - switch( $this->scale->minute->iStyle ) { - case HOURSTYLE_CUSTOM: - $txt2 = date($this->scale->minute->iLabelFormStr,strtotime('2005-05-15 18:55')); - break; - case MINUTESTYLE_MM: - default: - $txt2 = '15'; - break; - } - - $mfw = $this->scale->minute->GetStrWidth($this->img,$txt2)+6; - $n2 = ceil(60 / $this->scale->minute->GetIntervall() ); - $mw = $n2 * $mfw; - } - $hfw = $hfw < $mw ? $mw : $hfw ; - $n = ceil(24*60 / $this->scale->TimeToMinutes($this->scale->hour->GetIntervall()) ); - $hw = $n * $hfw; - $fw = $fw < $hw ? $hw : $fw ; - } - - // We need to repeat this code block here as well. - // THIS iS NOT A MISTAKE ! - // We really need it since we need to adjust for minutes both in the case - // where hour scale is shown and when it is not shown. - - if( $this->scale->IsDisplayMinute() ) { - // Depending on what format the user has choose we need different amount - // of space. We therefore create a typical string for the choosen format - // and determine the length of that string. - switch( $this->scale->minute->iStyle ) { - case HOURSTYLE_CUSTOM: - $txt = date($this->scale->minute->iLabelFormStr,strtotime('2005-05-15 18:55')); - break; - case MINUTESTYLE_MM: - default: - $txt = '15'; - break; - } - - $mfw = $this->scale->minute->GetStrWidth($this->img,$txt)+6; - $n = ceil(60 / $this->scale->TimeToMinutes($this->scale->minute->GetIntervall()) ); - $mw = $n * $mfw; - $fw = $fw < $mw ? $mw : $fw ; - } - - // If we display week we must make sure that 7*$fw is enough - // to fit up to 10 characters of the week font (if the week is enabled) - if( $this->scale->IsDisplayWeek() ) { - // Depending on what format the user has choose we need different amount - // of space - $fsw = strlen($this->scale->week->iLabelFormStr); - if( $this->scale->week->iStyle==WEEKSTYLE_FIRSTDAY2WNBR ) { - $fsw += 8; - } - elseif( $this->scale->week->iStyle==WEEKSTYLE_FIRSTDAYWNBR ) { - $fsw += 7; - } - else { - $fsw += 4; - } - - $ww = $fsw*$this->scale->week->GetFontWidth($this->img); - if( 7*$fw < $ww ) { - $fw = ceil($ww/7); - } - } - - if( !$this->scale->IsDisplayDay() && !$this->scale->IsDisplayHour() && - !( ($this->scale->week->iStyle==WEEKSTYLE_FIRSTDAYWNBR || - $this->scale->week->iStyle==WEEKSTYLE_FIRSTDAY2WNBR) && $this->scale->IsDisplayWeek() ) ) { - // If we don't display the individual days we can shrink the - // scale a little bit. This is a little bit pragmatic at the - // moment and should be re-written to take into account - // a) What scales exactly are shown and - // b) what format do they use so we know how wide we need to - // make each scale text space at minimum. - $fw /= 2; - if( !$this->scale->IsDisplayWeek() ) { - $fw /= 1.8; - } - } - - $cw = $this->GetMaxActInfoColWidth() ; - $this->scale->actinfo->SetMinColWidth($cw); - if( $this->img->width <= 0 ) { - // Now determine the width for the activity titles column - - // Firdst find out the maximum width of each object column - $titlewidth = max(max($this->GetMaxLabelWidth(), - $this->scale->tableTitle->GetWidth($this->img)), - $this->scale->actinfo->GetWidth($this->img)); - - // Add the width of the vertivcal divider line - $titlewidth += $this->scale->divider->iWeight*2; - - // Adjust the width by the user specified zoom factor - $fw *= $this->iZoomFactor; - - // Now get the total width taking - // titlewidth, left and rigt margin, dayfont size - // into account - $width = $titlewidth + $nd*$fw + $lm+$rm; - } - else { - $width = $this->img->width; - } - - $width = round($width); - $height = round($height); - // Make a sanity check on image size - if( $width > MAX_GANTTIMG_SIZE_W || $height > MAX_GANTTIMG_SIZE_H ) { - JpgraphError::RaiseL(6007,$width,$height); - //("Sanity check for automatic Gantt chart size failed. Either the width (=$width) or height (=$height) is larger than MAX_GANTTIMG_SIZE. This could potentially be caused by a wrong date in one of the activities."); - } - $this->img->CreateImgCanvas($width,$height); - $this->img->SetMargin($lm,$rm,$tm,$bm); - } - } - - // Return an array width the maximum width for each activity - // column. This is used when we autosize the columns where we need - // to find out the maximum width of each column. In order to do that we - // must walk through all the objects, sigh... - function GetMaxActInfoColWidth() { - $n = count($this->iObj); - if( $n == 0 ) return; - $w = array(); - $m = $this->scale->actinfo->iLeftColMargin + $this->scale->actinfo->iRightColMargin; - - for( $i=0; $i < $n; ++$i ) { - $tmp = $this->iObj[$i]->title->GetColWidth($this->img,$m); - $nn = count($tmp); - for( $j=0; $j < $nn; ++$j ) { - if( empty($w[$j]) ) - $w[$j] = $tmp[$j]; - else - $w[$j] = max($w[$j],$tmp[$j]); - } - } - return $w; - } - - // Stroke the gantt chart - function Stroke($aStrokeFileName="") { - - // If the filename is the predefined value = '_csim_special_' - // we assume that the call to stroke only needs to do enough - // to correctly generate the CSIM maps. - // We use this variable to skip things we don't strictly need - // to do to generate the image map to improve performance - // a best we can. Therefor you will see a lot of tests !$_csim in the - // code below. - $_csim = ($aStrokeFileName===_CSIM_SPECIALFILE); - - // Should we autoscale dates? - - if( !$this->scale->IsRangeSet() ) { - list($min,$max) = $this->GetBarMinMax(); - $this->scale->SetRange($min,$max); - } - - $this->scale->AdjustStartEndDay(); - - // Check if we should autoscale the image - $this->AutoSize(); - - // Should we start from the top or just spread the bars out even over the - // available height - $this->scale->SetVertLayout($this->iLayout); - if( $this->iLayout == GANTT_FROMTOP ) { - $maxheight=max($this->GetMaxLabelHeight(),$this->GetMaxBarAbsHeight()); - $this->scale->SetVertSpacing($maxheight*(1+$this->iLabelVMarginFactor)); - } - // If it hasn't been set find out the maximum line number - if( $this->scale->iVertLines == -1 ) - $this->scale->iVertLines = $this->GetBarMaxLineNumber()+1; - - $maxwidth=max($this->scale->actinfo->GetWidth($this->img), - max($this->GetMaxLabelWidth(), - $this->scale->tableTitle->GetWidth($this->img))); - - $this->scale->SetLabelWidth($maxwidth+$this->scale->divider->iWeight);//*(1+$this->iLabelHMarginFactor)); - - if( !$_csim ) { - $this->StrokePlotArea(); - if( $this->iIconDepth == DEPTH_BACK ) { - $this->StrokeIcons(); - } - } - - $this->scale->Stroke(); - - if( !$_csim ) { - // Due to a minor off by 1 bug we need to temporarily adjust the margin - $this->img->right_margin--; - $this->StrokePlotBox(); - $this->img->right_margin++; - } - - // Stroke Grid line - $this->hgrid->Stroke($this->img,$this->scale); - - $n = count($this->iObj); - for($i=0; $i < $n; ++$i) { - //$this->iObj[$i]->SetLabelLeftMargin(round($maxwidth*$this->iLabelHMarginFactor/2)); - $this->iObj[$i]->Stroke($this->img,$this->scale); - } - - $this->StrokeTitles(); - - if( !$_csim ) { - $this->StrokeConstrains(); - $this->footer->Stroke($this->img); - - - if( $this->iIconDepth == DEPTH_FRONT) { - $this->StrokeIcons(); - } - - // Stroke all added user texts - $this->StrokeTexts(); - - // Should we do any final image transformation - if( $this->iImgTrans ) { - if( !class_exists('ImgTrans',false) ) { - require_once('jpgraph_imgtrans.php'); - } - - $tform = new ImgTrans($this->img->img); - $this->img->img = $tform->Skew3D($this->iImgTransHorizon,$this->iImgTransSkewDist, - $this->iImgTransDirection,$this->iImgTransHighQ, - $this->iImgTransMinSize,$this->iImgTransFillColor, - $this->iImgTransBorder); - } - - - // If the filename is given as the special "__handle" - // then the image handler is returned and the image is NOT - // streamed back - if( $aStrokeFileName == _IMG_HANDLER ) { - return $this->img->img; - } - else { - // Finally stream the generated picture - $this->cache->PutAndStream($this->img,$this->cache_name,$this->inline, - $aStrokeFileName); - } - } - } - - function StrokeConstrains() { - $n = count($this->iObj); - - // Stroke all constrains - for($i=0; $i < $n; ++$i) { - - // Some gantt objects may not have constraints associated with them - // for example we can add IconPlots which doesn't have this property. - if( empty($this->iObj[$i]->constraints) ) continue; - - $numConstrains = count($this->iObj[$i]->constraints); - - for( $k = 0; $k < $numConstrains; $k++ ) { - $vpos = $this->iObj[$i]->constraints[$k]->iConstrainRow; - if( $vpos >= 0 ) { - $c1 = $this->iObj[$i]->iConstrainPos; - - // Find out which object is on the target row - $targetobj = -1; - for( $j=0; $j < $n && $targetobj == -1; ++$j ) { - if( $this->iObj[$j]->iVPos == $vpos ) { - $targetobj = $j; - } - } - if( $targetobj == -1 ) { - JpGraphError::RaiseL(6008,$this->iObj[$i]->iVPos,$vpos); - //('You have specifed a constrain from row='.$this->iObj[$i]->iVPos.' to row='.$vpos.' which does not have any activity.'); - } - $c2 = $this->iObj[$targetobj]->iConstrainPos; - if( count($c1) == 4 && count($c2 ) == 4) { - switch( $this->iObj[$i]->constraints[$k]->iConstrainType ) { - case CONSTRAIN_ENDSTART: - if( $c1[1] < $c2[1] ) { - $link = new GanttLink($c1[2],$c1[3],$c2[0],$c2[1]); - } - else { - $link = new GanttLink($c1[2],$c1[1],$c2[0],$c2[3]); - } - $link->SetPath(3); - break; - case CONSTRAIN_STARTEND: - if( $c1[1] < $c2[1] ) { - $link = new GanttLink($c1[0],$c1[3],$c2[2],$c2[1]); - } - else { - $link = new GanttLink($c1[0],$c1[1],$c2[2],$c2[3]); - } - $link->SetPath(0); - break; - case CONSTRAIN_ENDEND: - if( $c1[1] < $c2[1] ) { - $link = new GanttLink($c1[2],$c1[3],$c2[2],$c2[1]); - } - else { - $link = new GanttLink($c1[2],$c1[1],$c2[2],$c2[3]); - } - $link->SetPath(1); - break; - case CONSTRAIN_STARTSTART: - if( $c1[1] < $c2[1] ) { - $link = new GanttLink($c1[0],$c1[3],$c2[0],$c2[1]); - } - else { - $link = new GanttLink($c1[0],$c1[1],$c2[0],$c2[3]); - } - $link->SetPath(3); - break; - default: - JpGraphError::RaiseL(6009,$this->iObj[$i]->iVPos,$vpos); - //('Unknown constrain type specified from row='.$this->iObj[$i]->iVPos.' to row='.$vpos); - break; - } - - $link->SetColor($this->iObj[$i]->constraints[$k]->iConstrainColor); - $link->SetArrow($this->iObj[$i]->constraints[$k]->iConstrainArrowSize, - $this->iObj[$i]->constraints[$k]->iConstrainArrowType); - - $link->Stroke($this->img); - } - } - } - } - } - - function GetCSIMAreas() { - if( !$this->iHasStroked ) - $this->Stroke(_CSIM_SPECIALFILE); - - $csim = $this->title->GetCSIMAreas(); - $csim .= $this->subtitle->GetCSIMAreas(); - $csim .= $this->subsubtitle->GetCSIMAreas(); - - $n = count($this->iObj); - for( $i=$n-1; $i >= 0; --$i ) - $csim .= $this->iObj[$i]->GetCSIMArea(); - return $csim; - } -} - -//=================================================== -// CLASS PredefIcons -// Description: Predefined icons for use with Gantt charts -//=================================================== -define('GICON_WARNINGRED',0); -define('GICON_TEXT',1); -define('GICON_ENDCONS',2); -define('GICON_MAIL',3); -define('GICON_STARTCONS',4); -define('GICON_CALC',5); -define('GICON_MAGNIFIER',6); -define('GICON_LOCK',7); -define('GICON_STOP',8); -define('GICON_WARNINGYELLOW',9); -define('GICON_FOLDEROPEN',10); -define('GICON_FOLDER',11); -define('GICON_TEXTIMPORTANT',12); - -class PredefIcons { - private $iBuiltinIcon = null, $iLen = -1 ; - - function GetLen() { - return $this->iLen ; - } - - function GetImg($aIdx) { - if( $aIdx < 0 || $aIdx >= $this->iLen ) { - JpGraphError::RaiseL(6010,$aIdx); - //('Illegal icon index for Gantt builtin icon ['.$aIdx.']'); - } - return Image::CreateFromString(base64_decode($this->iBuiltinIcon[$aIdx][1])); - } - - function __construct() { - //========================================================== - // warning.png - //========================================================== - $this->iBuiltinIcon[0][0]= 1043 ; - $this->iBuiltinIcon[0][1]= - 'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAAA'. - 'B3RJTUUH0wgKFSgilWPhUQAAA6BJREFUeNrtl91rHFUYh5/3zMx+Z5JNUoOamCZNaqTZ6IWIkqRiQWmi1IDetHfeiCiltgXBP8AL'. - '0SIUxf/AvfRSBS9EKILFFqyIH9CEmFZtPqrBJLs7c+b1YneT3WTTbNsUFPLCcAbmzPt73o9zzgzs2Z793231UOdv3w9k9Z2uzOdA'. - '5+2+79yNeL7Hl7hw7oeixRMZ6PJM26W18DNAm/Vh7lR8fqh97NmMF11es1iFpMATqdirwMNA/J4DpIzkr5YsAF1PO6gIMYHRdPwl'. - 'oO2elmB+qH3sm7XozbkgYvy8SzYnZPtcblyM6I+5z3jQ+0vJfgpEu56BfI9vUkbyi2HZd1QJoeWRiAjBd4SDCW8SSAOy6wBHMzF7'. - 'YdV2A+ROuvRPLfHoiSU0EMY/cDAIhxJeGngKaN1VgHyPL7NBxI1K9P4QxBzw3K1zJ/zkG8B9uwaQ7/HNsRZv9kohBGD0o7JqMYS/'. - '/ynPidQw/LrBiPBcS/yFCT95DvB2BWAy4575PaQbQKW+tPd3GCItu2odKI++YxiKu0d26oWmAD7paZU/rLz37VqIijD2YbnzNBBE'. - 'IBHf8K8qjL7vYhCGErEU8CTg3xXAeMp96GrJEqkyXkm9Bhui1xfsunjdGhcYLq+IzjsGmBt5YH/cmJkFq6gIqlon3u4LxdKGuCIo'. - 'Qu41g0E41po+2R33Xt5uz9kRIB2UTle7PnfKrROP1HD4sRjZlq0lzhwoZ6rDNeTi3nEg1si/7FT7kYQbXS6E5E65tA5uRF9tutq0'. - 'K/VwAF+/FbIYWt6+tjQM/AqUms7A4Wy6d7YSfSNxgMmzi0ycWWworio4QJvj4LpuL5BqugTnXzzqJsJwurrlNhJXFaavW67NRw3F'. - 'q+aJcCQVe9fzvJGmAY7/dPH0gi0f64OveGxa+usCuQMeZ0+kt8BVrX+qPO9Bzx0MgqBvs+a2PfDdYIf+WAjXU1ub4tqNaPPzRs8A'. - 'blrli+WVn79cXn0cWKl+tGx7HLc7pu3CSmnfitL+l1UihAhwjFkPQev4K/fSABjBM8JCaFuurJU+rgW41SroA8aNMVNAFtgHJCsn'. - 'XGy/58QVxAC9MccJtZ5kIzNlW440WrJ2ea4YPA9cAooA7i0A/gS+iqLoOpB1HOegqrYB3UBmJrAtQAJwpwPr1Ry92wVlgZsiYlW1'. - 'uX1gU36dymgqYxJIJJNJT1W9QqHgNwFQBGYqo94OwHZQUuPD7ACglSvc+5n5T9m/wfJJX4U9qzEAAAAASUVORK5CYII=' ; - - //========================================================== - // edit.png - //========================================================== - $this->iBuiltinIcon[1][0]= 959 ; - $this->iBuiltinIcon[1][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAFgAWABY9j+ZuwAAAAlwSFlz'. - 'AAALEAAACxABrSO9dQAAAAd0SU1FB9AKDAwbIEXOA6AAAAM8SURBVHicpdRPaBxlHMbx76ZvsmOTmm1dsEqQSIIsEmGVBAQjivEQ'. - 'PAUJngpWsAWlBw8egpQepKwplN4ULEG9CjkEyUFKlSJrWTG0IU51pCsdYW2ncUPjdtp9Z+f3vuNhu8nKbmhaf5cZeGc+PO8zf1Lc'. - 'm0KhkACICCKCMeaBjiLC0tLSnjNvPmuOHRpH0TZTU1M8zBi9wakzn7OFTs5sw8YYACYmJrre7HkeuVyu69qPF77hlT1XmZ0eQ03O'. - 'wOLJTvhBx1rLz18VmJ0eY+jVd2FxDkKXnvYLHgb97OgLzE4ON9Hzc1B1QaQzsed5O0Lta3Ec89OnR5h5McfQ+Mw2qgQUnfBOPbZ3'. - 'bK3l+xOvMT0+3ERLp5FNF6UEjcL32+DdVmGt5WLhDYYPZrbRqreFumXwql0S3w9tnDvLWD5PZigPpdOwuYpSCo3C8wU3UHxQdHbf'. - 'cZIkNM6dxcnlUM4k1eUFMlUPpUADbpkttFarHe6oYqeOr6yt4RzMQHYUcUsQVtGicHDwKprViuLDkkOtVnsHCHZVRVy/zcj1i5Af'. - 'h8AjdIts+hUcGcYPK3iBtKM3gD/uAzf/AdY2mmmVgy6X8YNNKmGIvyloPcB8SUin07RQ4EZHFdsdG0wkJEnEaHAJxvKEpSLeaokV'. - 'r4zWmhUZYLlY4b1D03y5eIEWCtS7vsciAgiIxkQRabWOrlQor66y4pUphoJb1jiO4uO5o0S3q6RSqVbiOmC7VCEgAhLSaDQ48dH7'. - 'vD46REY0iysegSjKQciRt99ib7qXwX0O+pG4teM6YKHLB9JMq4mTmF9/+AKA4wvLZByH7OgYL7+UY2qvw/7Bfg5kHiXjJFyv3CGO'. - 'Y1rof+BW4t/XLiPG0DCGr79d4XzRxRnIMn98huXSTYyJ6et1UNYQhRvcinpJq86H3wGPPPM0iBDd+QffD1g4eZjLvuG7S1Wef26E'. - 'J7L7eSx7gAHVg7V3MSbi6m/r93baBd6qQjerAJg/9Ql/XrvG0ON1+vv7GH3qSfY5fahUnSTpwZgIEQesaVXRPbHRG/xyJSAxMYlp'. - 'EOm71HUINiY7mGb95l/8jZCyQmJjMDGJjUmsdCROtZ0n/P/Z8v4Fs2MTUUf7vYoAAAAASUVORK5CYII=' ; - - //========================================================== - // endconstrain.png - //========================================================== - $this->iBuiltinIcon[2][0]= 666 ; - $this->iBuiltinIcon[2][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlz'. - 'AAALDwAACw8BkvkDpQAAAAd0SU1FB9ALEREILkh0+eQAAAIXSURBVHictZU9aFNRFMd/N81HX77aptJUWmp1LHRpIcWhg5sIDlUQ'. - 'LAXB4t7RRUpwEhy7iQ46CCIoSHcl0CFaoVARU2MFMYktadLXJNok7x2HtCExvuYFmnO4w/3gx+Gc/z1HKRTdMEdXqHbB/sgc/sic'. - 'nDoYAI8XwDa8o1RMLT+2hAsigtTvbIGVqhX46szUifBGswUeCPgAGB7QeLk0X4Ork+HOxo1VgSqGASjMqkn8W4r4vVtEgI/RRQEL'. - 'vaoGD85cl5V3nySR/S1mxWxab7f35PnntNyMJeRr9kCMqiHTy09EoeToLwggx6ymiMOD/VwcD7Oa/MHkcIiQx026WGYto5P/U+ZZ'. - '7gD0QwDuT5z9N3LrVPi0Xs543eQPKkRzaS54eviJIp4tMFQFMllAWN2qcRZHBnixNM8NYD162xq8u7ePSQ+GX2Pjwxc2dB2cLtB8'. - '7GgamCb0anBYBeChMtl8855CarclxU1gvViiUK4w2OMkNDnGeJ8bt9fH90yOnOkCwLFTwhzykhvtYzOWoBBbY//R3dbaNTYhf2RO'. - 'QpeuUMzv188MlwuHy0H13HnE48UzMcL0WAtUHX8OxZHoG1URiFw7rnLLCswuSPD1ulze/iWjT2PSf+dBXRFtVVGIvzqph0pQL7VE'. - 'avXYaXXxPwsnt0imdttCocMmZBdK7YU9D8wuNOW0nXc6QWzPsSa5naZ1beb9BbGB6dxGtMnXAAAAAElFTkSuQmCC' ; - - //========================================================== - // mail.png - //========================================================== - $this->iBuiltinIcon[3][0]= 1122 ; - $this->iBuiltinIcon[3][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlz'. - 'AAALEAAACxABrSO9dQAAAAd0SU1FB9AJHAMfFvL9OU8AAAPfSURBVHictZRdaBRXFMd/987H7tbNx8aYtGCrEexDsOBDaKHFxirb'. - 'h0qhsiY0ykppKq1osI99C4H2WSiFFMHWUhXBrjRi0uCmtSEUGgP1QWqhWjGkoW7M1kTX3WRn5p4+TJJNGolQ6IXDnDtz+N0z/3PP'. - 'UWBIpdpYa23b9g09PZ2kUrOrvmUyGVKp1Ao/mUyi56YnVgWfO/P1CihAd/dJMpmaNROIRq8BkM1m0bH6TasC3j6QXgFdXI+DR6PR'. - 'JX/Pno8B+KLnMKqlpUU8z8MYs2RBEDzWf9J+0RcRbMdxGBsbw/fmCXwPMUEYID4iAVp8wIRmDIHMo4yHSIBSASKC+CWE0C/PF9jU'. - '3B6Cp+4M07C5FUtKGNvGwQJctPgIsgD2wRhEIqAMGB+UQYkHJgYYZD7P1HwVlmWhHcfhyk83KeRGUW4t6CgoG5SNUS4KBWgQDUov'. - '7AGlwYASBVqH0Bk49dXpCviVV3dw/tI1Bvr7kMIIlh0NYUpjlF0BAYvcxSXmEVLKceHSCJm+PnbueBHbtkNwTXUNBzo6aGpq4sSZ'. - 'GwT5H7BsF6Wdf1GWHQAoM0upeI9PT1yioS7B7tdaSdSuw7KsUGMAy7HYsmUztTW1nMwM0txssX1rlHjjS5jy/Uq2YkK/eJuLl6/z'. - 'x+1xkslW6mrixGIODx8EFSlEBC0+tmXT0NhA2763iEUjnLv4C8XpUbSbAB1mKkGJ3J83Od77HW5EszvZSqK2iljMIeJaRGNuJePF'. - '6mspY7BJ1DXwQnCd2fxGRq5OUCz8xt72dyhMZcn++Cu3xu9SKhdp2b4ZHWnAtTSxmIWlhcIjlksR3lNBYzlxZsb7+f7ne+xtSzOd'. - 'u83szH1OnThOPp/n+a0beeP1l4mvq+PU2Qyd+5PY1RuwlAqLYFaBfbTbyPSdfgaH77A//QF4f1O/vpr6RJyq+C5Kc/M8FbFxXItY'. - 'xOHDrvfo/fxLDnbsJBp5BowBReVWYAzabeTh5ABDw7cWoNNL3YYYNtSv57lnn6Z+Qx01VeuIuBa2DV1HD3H63BAPZu4u1WGpeLHq'. - 'Rh7+NcjA0O+0p4+CNwXigwnbWlQQdpuEpli+n+PIkcOc//YKuckJJFh2K2anrjFw+QZt6S6kPImIF/b+cqAJD1LihWAxC61twBTo'. - 'fPcQF/oGsVW5ovHQlavs2/8+uYnRVSOUgHAmmAClBIOBwKC0gPjhIRgEIX2wg7NnwpZW3d3d4vs+vu8TBMGK51rvPM9b8hdteZxd'. - 'LBbVR8feJDs0Rlv6GFKeXJ21rNRXESxMPR+CBUl0nN7PjtO+dye7Up/8v1I88bf/ixT/AO1/hZsqW+C6AAAAAElFTkSuQmCC' ; - - //========================================================== - // startconstrain.png - //========================================================== - $this->iBuiltinIcon[4][0]= 725 ; - $this->iBuiltinIcon[4][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlz'. - 'AAALDgAACw4BQL7hQQAAAAd0SU1FB9ALEREICJp5fBkAAAJSSURBVHic3dS9a1NRGMfx77kxtS+xqS9FG6p1ER3qVJpBQUUc3CRU'. - 'BwURVLB1EAuKIP0THJQiiNRJBK3iJl18AyeltRZa0bbaJMbUNmlNSm5e7s25j0NqpSSmyag/OMM9POdzDuflwn8djz8gClVRrVEV'. - 'ur4Bl1FTNSzLrSS6vbml0jUUwSXj8Qfk3PkLtLW2AeBIybmrgz3+gFzpucjlE4f4btuFTuWuCF5XDr3a3UPf6cM8GQvxzbsRAJdh'. - 'ScfxSywml5j7mVypN0eGEJ0tebIre+zxB6Tv7jPReS2hREpOvpmUXU+H5eC913JnNCSRVE60pUVbWoZjprR39Yq70bdqj4pW7PEH'. - '5FpvL9e79jOTTHM7ssDL6CJZ08LbvAGnrpZg2mI2Z/MlZfN8IkxuSwu4V9+WIrj7zFlOHfXzKrLIi2SGh5ECKjnNVNxkQEc55vOw'. - 'rb6O8JLFdHyJ+ayFElUeHvjwkfteL/V7fKTSkFvIQE4DoLI2Mz/muTkTApcBKIwaN8pwIUrKw+ajWwDknAO0d/r4zFaMuRS63sWm'. - 'RoOdm+vRIriUYjKexrQV+t1o0YEVwfZSVJmD/dIABJuO0LG3lRFx0GOfiAELE9OgCrfU0XnIp5FwGLEy5WEAOxlR5uN+ARhP7GN3'. - '5w7Gv4bQI2+xpt4jjv2nWBmIlcExE2vDAHYioszBZXw6CPE4ADoWVHmd/tuwlZR9eXYyoszBfpiNQqaAOU5+TXRN+DeeenADPT9b'. - 'EVgKVsutKPl0TGWGhwofoquaoKK4apsq/tH/e/kFwBMXLgAEKK4AAAAASUVORK5CYII=' ; - - //========================================================== - // calc.png - //========================================================== - $this->iBuiltinIcon[5][0]= 589 ; - $this->iBuiltinIcon[5][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAA4AIwBbgMF12wAAAAlwSFlz'. - 'AAALEQAACxEBf2RfkQAAAAd0SU1FB9AHBxQeFsqn0wQAAAHKSURBVHicnZWff+RAGIef3U/gcOEgUAgUCgcLhYXCwsHBQeGgUDgs'. - 'FgMHB4VA/4Bg4XChWFgIFIqBwkJhsRAYeOGF+TQHmWSTTbKd9pU37/x45jvfTDITXEynAbdWKVQB0NazcVm0alcL4rJaRVzm+w/e'. - '3iwAkzbYRcnnYgI04GCvsxxSPabYaEdt2Ra6D0atcvvvDmyrMWBX1zPq2ircP/Tk98DiJtjV/fim6ziOCL6dDHZNhxQ3arIMsox4'. - 'vejleL2Ay9+jaw6A+4OSICG2cacGKhsGxg+CxeqAQS0Y7BYJvowq7iGMOhXHEfzpvpQkA9bLKgOgWKt+4Lo1mM9hs9m17QNsJ70P'. - 'Fjc/O52joogoX8MZKiBiAFxd9Z1vcj9wfSpUlDRNMcYQxzFpmnJ0FPH8nDe1MQaWSz9woQpWSZKEojDkeaWoKAyr1tlu+s48wfVx'. - 'u7n5i7jthmGIiEGcT+36PP+gFeJrxWLhb0UA/lb4ggGs1T0rZs0zwM/ZjNfilcIY5tutPxgOW3F6dUX464LrKILLiw+A7WErrl+2'. - 'rABG1EL/BilZP8DjU2uR4U+2E49P1Z8QJmNXUzl24A9GBT0IruCfi86d9x+D12RGzt+pNAAAAABJRU5ErkJggg==' ; - - //========================================================== - // mag.png - //========================================================== - $this->iBuiltinIcon[6][0]= 1415 ; - $this->iBuiltinIcon[6][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlz'. - 'AAALDAAACwwBP0AiyAAAAAd0SU1FB9ALDxEWDY6Ul+UAAAUESURBVHicdZVrbFRFGIafsyyF0nalV1R6WiggaAptlzsr1OgEogmC'. - '0IgoBAsBgkIrBAPEhBj/AP6xRTCUFEwRI4jcgsitXMrFCJptJWvBNpXYbbXtbtttt6e7e86ec/yxadlCfZPJZDIz73zzzjfvR2VL'. - 'F7U+hf0HD2JduIzTFy6SlJRkPtkcDgdCCE65OxFC8NPV6wghyM7OptankJ2dzbSC5QghEEIgCSHog9PpNAF27dlN6miZuPgElB4/'. - 'nmY3O7ZtByA1NVUCkGWZweD1eklJScESTbqxuIjrd+/x6uIl5M19hSy7nfGOeUxf+g7VjU1sKi7C4/GYsiyz7tAJAD4/cRaA1tZW'. - 'AHIPnECUVGD1+/3U19ebG4uLeHf1akamjsIwoVnVCOvQEdLoVILYYmMo3PIxSBJflpSaDX5FAmju1QAYv/8k/s8+wLVxOU0jR2LZ'. - '8sMFAApWrCApbRRDrRZirBYSLBKaoRPQw3SFernf2sav7T0Ubt4KwL4FMwF4Vu8FoHBCKgCzDhwHwLIhZ7y5a89u4m2JhA0wTdDC'. - 'OrphEjJMNElCHxKDEjaobmvlfo/Krj27CQQCJsCGJW8C0KXqAMxMiosQA8hZWcTFx9OsaniDKh1qmG7VoFsL0x0K06kbeAMhWpRe'. - '/KpG+gwHAKUnz7Dz3BUMw6DK18nuw99wt0Nh6VdHI8RJicmETQgFg7SFwjSrGv+oKp6ghldV6dZ0ugJBlF6FmCESQ2w2AIqXLsan'. - 'BrFYLJTnTCBrdBqveeopWZiPFaBHUegJhegMqGgxEkHDwB/UaQ9rdIV06v0+TD2EEQjQFtAY0dsNgNvt5sialQAIIXh7wQKuVf6J'. - 'gTsSccPDWlQstClBGjr9eHpVWvUQncEwdYEedF8noQ4vmYmpZMTH0nTvDn25vLbrNmu7bvfnsYEbAMnhcPDgwQPzUo2LJusw/mhp'. - 'QwlHNO0KBAnoIfxtrcQMT2De1Mm891wyUzNlUlJSpIyMDBobGzlzr5rFM/Koq6vrP8ASGxsLwPmKcvIShjPGZiPOakE3VFB8hHwd'. - 'vJAxhrk5L7Ly+RQuH/sWgPdXrwFg/6HDFBUsIj09nehfbAWwPWOT9n5RYhqGwarNWxkRM5TRCfF4U1PQsDDJFk9uYhwXvzvKjm3b'. - 'KSsro3DJInNW5RXp7u2bAKSlpeH1esnPz6eqqgqLpmmcr3Fht9ulfaV7mZk1Bs+lM6T1djM9fhg5egDPpTNMy5TZsW07kydPYdWM'. - 'aXx96ixOp9O8cfUa80srmDpjOgAulytiQqZpMnvObLbt/JTtHxXj9/tRVdU0DGOAufRpevPDTeac0hJyc3NxOOawfv161lVWS6eX'. - 'z+9/UOCxu1VWVvaTRGv16NFfjB2bNeAQp9NpTpmSM4DcbrdL0WsGDKLRR+52uwe1yP8jb2lpYfikyY9t80n03UCWZeaXVjw1f+zs'. - 'Oen+/d+pqanhzp2fKSsrw+l0mi6XiyPl5ZGITdN8fAVJwjRNJEmi1qfw1kw7siyTnJxMe3s71dXV3GpoZO64DG41NPJylvxU5D/e'. - 'qJKsfWQD9IkaZ2RmUvr9aV4aGYcQgjfO3aWoYBF5eXm4ewIsu/CbdPz1aWb0/p1bNoOrQxlUiuiaFo3c3FyEEOx9+C9CCD6paaTW'. - 'p/TXyYkTJ0Xe59jf7QOyAKDWp/QXxcFQ61P4pT3ShBBcvnUHIQTjxmX19/8BCeVg+/GPpskAAAAASUVORK5CYII=' ; - - //========================================================== - // lock.png - //========================================================== - $this->iBuiltinIcon[7][0]= 963 ; - $this->iBuiltinIcon[7][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlz'. - 'AAALCwAACwsBbQSEtwAAAAd0SU1FB9AKAw0XDmwMOwIAAANASURBVHic7ZXfS1t3GMY/3+PprI7aisvo2YU6h6ATA8JW4rrlsF4U'. - 'qiAsF9mhl0N2cYTRy9G/wptAYWPD9iJtRy5asDe7cYFmyjaXOLaMImOrmkRrjL9yTmIS3120JybWQgfb3R74wuc8Lzw858vLOUpE'. - 'OK6pqSm2trbY39+nu7tbPHYch7m5OcLhMIA67kWj0aMQEWk6tm17rNm2LSIie3t7ksvlJJ1OSyqVkls3Z8SyLMnlcqTTaVKpFLdu'. - 'zmBZVj1HeY2VUti2TSQSQSml2bZdi0QirK2tMT09zerqKtlslqGhISYnJ4nHv2N+foFsNquOe9FotLlxOBwmk8lgWRbhcFgymYxY'. - 'liUi0mqaJoAuIi2macrdO7fFsizx3to0Te7euV1vrXtXEgqFmJmZYWVlhXK5LB4/U9kwDL784kYV0A3DYHd3m4sXRymXywKoRi8U'. - 'Ch01DgQCJBIJLMsiEAhIIpHw2uLz+eqtYrEYIqKZpimxWEyCwaCMjY01zYPBIJpXqVQqsby8TLVabWKA/v5+RkZGMAyDrq4ulFKH'. - 'HsfjcWZnZ+ns7KTRqwcnk0mKxSKFQqGJlVKtruuSTCYB6O3trW9UI/v9/iZPB/j8s2HOnX0FgHfeXpeffnzK+fWf+fijvhLs0PtG'. - 'D/n1OJ9+MsrlSwb3733DwMCAt1EyPj6uACYmJp56168NU6nUqFSE9nZdPE7+WqC/r4NKTagcCJVqDaUUB5VDAA4Pa9x7sMLlSwan'. - 'WjRmv13D7/erpaWlo604qOp88OF7LC48rPNosMq5Th+Dgxd4/XyA1rbzADi7j8jnf2P++wdcvSr8MJ/i8eomAKlUqn41OsDAQDeD'. - 'g++yuPCwzm/2vU8+n2a7sMFfj79mp7BBuVzioFSiXHJx3SKuW2Rzy0Up9dxnQVvODALQerqNRn4ZKe0Mvtc6TpzpmqbxalcY9Ato'. - '2v06t515C73YQftZB9GLnDrt4LoujuPgOA4Ui+C6yOpXJwZrJ7r/gv4P/u+D9W7fLxTz+1ScQxrZ3atRLaVxdjbY2d184R6/sLHe'. - 'opHP7/Do90Ua+WWUyezzZHObP/7cfX54/dowE1d66s8TV3oE+Mfn+L/zb4XmHPjRG9YjAAAAAElFTkSuQmCC' ; - - //========================================================== - // stop.png - //========================================================== - $this->iBuiltinIcon[8][0]= 889 ; - $this->iBuiltinIcon[8][1]= - 'iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlz'. - 'AAALDwAACw8BkvkDpQAAAAd0SU1FB9AJDwEvNyD6M/0AAAL2SURBVHic1ZTLaxVnGIefb2bO5OScHJN4oWrFNqcUJYoUEgU3/Qf6'. - 'F7gwCkIrvdBLUtqqiLhSg9bgBduFSHZdiG5ctkJ3xRDbUFwUmghNzBDanPGMkzOX79LFJGPMOSd204U/+Bbzvd/78F4H/ieJdoad'. - 'pZKxRFszAI/DcP0HazXY22v+HB01kee1PA/v3zfnjx4xgGnHcNZe7OvuNj+cOEF1ZATv5nUA4jhBSgmADCVWo8Ge2Of9wb18P/G7'. - 'oUXmYi30zqlTVEdGWLh1g2D6MYlKkXGE0Vl8aa2GEB149+4xXSzyoOIw/mimiZV/DPb25pFOj13A9gOMEChhUEqhVYqWKUk9QAUp'. - 'sT/P4s8PmKlUmNhQaIJbkDVqBbpw6wZ2zUc4Nm+ePku5p4eOrgpueQOFUoVCVxcD4+N07dpF9+5tVJeWGPBjhvr7WF1zC8ASgtcP'. - 'H8a7eZ1odh4sh50nzwCw9ZNh3M4Stutiu0X2nB/LyjZ6lcIbVTpdQU/jWVPzLADM8+ZGBRdtC7wrF/O7bR99iu26VL86iU4SAH4b'. - 'Po5d6AQhstMSvGyI4wS5FJBKSRwnzF8byx/u+PjzzMF1mfryQ1K/jnCahqp1xEopjFLoNEFJSRJHzF799gWHqa+/QKcSUXBI609f'. - 'Al5W4teQSiHDOipNUKnMI13RvnOXAIEKQixvGWya98SC560MFwPiqEG86JM8q79Q06lvhnOndy5/B6GPCUOMUu3BQgg8z0M3GmBZ'. - 'iGJn3v2VmsqnfzNx7FDueODuj8ROCFpjtG5TCmOYv32bJ09msP0ISydMfnAUgF8/O45RAA6WTPjlvXcB+Gn7FuRf/zAnNX6x3ARe'. - 'PSdmqL+P/YHkwMGDOGWDZTlQcNBRhPEComgB/YeHfq2InF1kLlXUOkpMbio1bd7aATRD/X0M1lPeSlM2vt2X1XBZjZnpLG2tmZO6'. - 'LbQVOIcP+HG2UauH3xgwBqOz9Cc3l1tC24Fz+MvUDroeGNb5if9H/1dM/wLPCYMw9fryKgAAAABJRU5ErkJggg==' ; - - //========================================================== - // error.png - //========================================================== - $this->iBuiltinIcon[9][0]= 541 ; - $this->iBuiltinIcon[9][1]= - 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAAAaVBMVEX//////2Xy8mLl5V/Z2VvMzFi/v1WyslKlpU+ZmUyMjEh/'. - 'f0VyckJlZT9YWDxMTDjAwMDy8sLl5bnY2K/MzKW/v5yyspKlpYiYmH+MjHY/PzV/f2xycmJlZVlZWU9MTEXY2Ms/PzwyMjLFTjea'. - 'AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTCAkUMSj9wWSOAAABLUlEQVR4'. - '2s2U3ZKCMAxGjfzJanFAXFkUle/9H9JUKA1gKTN7Yy6YMjl+kNPK5rlZVSuxf1ZRnlZxFYAm93NnIKvR+MEHUgqBXx93wZGIUrSe'. - 'h+ctEgbpiMo3iQ4kioHCGxir/ZYUbr7AgPXs9bX0BCYM8vN/cPe8oQYzom3tVsSBMVHEoOJ5dm5F1RsIe9CtqGgRacCAkUvRtevT'. - 'e2pd6vOWF+gCuc/brcuhyARakBU9FgK5bUBWdHEH8tHpDsZnRTZQGzdLVvQ3CzyYZiTAmSIODEwzFCAdJopuvbpeZDisJ4pKEcjD'. - 'ijWPJhU1MjCo9dkYfiUVjQNTDKY6CVbR6A0niUSZjRwFanR0l9i/TyvGnFdqwStq5axMfDbyBksld/FUumvxS/Bd9VyJvQDWiiMx'. - 'iOsCHgAAAABJRU5ErkJggg==' ; - - //========================================================== - // openfolder.png - //========================================================== - $this->iBuiltinIcon[10][0]= 2040 ; - $this->iBuiltinIcon[10][1]= - 'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAZiS0dEANAAtwClFht71AAAAAlwSFlz'. - 'AAALEAAACxABrSO9dQAAAAd0SU1FB9AKDQ4RIXMeaLcAAAd1SURBVHicxZd7jBXVHcc/58zcvTNzH8vusqw8FsTsKiCUUh5WBZXG'. - 'GkOptmqwNWsWLKXFGlEpzZI0AWNKSy0WhDS22gJKtWlTsSRqzYIuLGB2WVvDIwQMZQMsy2OFfdzde+/OnHP6x907vJaFpjb9JZM5'. - 'c85Mfp/f9/s7Jxn4P4e41gtSyp78WGvtfdEAcqDFYUOH9HS0NhGk9tPb/ilSyp789UUB2AMuqhQy3Uzm7HGkE6W3dTNZMRI3EcWO'. - 'jf9ClLmWBT3dzW8jUsevWHCG3UpWl+IkHSxnbDh/Mcz12NevBcuWXTmf6TjnXvJ88gDmVB3pw3+nt3UzHa1NqMzBS2zqPLGFjtMN'. - 'ZNr3XdW+qyqwZcFk76HX/tHWfuQvyO4W7qhaHwL8efkMRlRUpPv7rqD0RrJ+FgAjLy1a20OIxZJEEuNCRfIApj+om4bGM3u2/sYU'. - '9J41d8973f3Dhg1pISTV1dXXBRNJxPGFCzhou+DCQrScZOkktNaeDZjamgeZ9MgiYmVDccvHhjAzJw0NTh8/alyZMaVJicp0iTHj'. - 'JpgNv38tjWUhhGROdbUL9W5/MH5XCkjlcibi+KIop5LVHLKEu8A/f4r286doa9pGrGwYAAsfqbbH3b8MgO/Nqgy6WvdbbXHMkEFJ'. - '4xUOMVEvaTZu3BgmvF4Yk4hz9rO/Ulr5cE9owae/rcGxohSOuiWkC2IjcIqKyPZm+OmCH7GhoZEF077EEzVVweAbJ+riEeO0Ey8y'. - 'UubqOHn0AOgMwvf59txnBrSp9dgxKmf/+kIP1NY8SFk0jh5ajmNHAWg5b2E5EexojGHjbiVRMoRMNs0LC+Yz46vTuH3enN7BI8fr'. - 'qFdo0BoVZNC9aVSQ4fNjBzEmQJiARxb+/AqYPMAVB5FsPU5v37g9OxgLhe14ZM5/ju052E6MNZvf5pmHHuLmmWOkEysxUtpGAtme'. - 'dtHTflJkezqQto3jFRnLssyf1jydxiiM7zNnye/c3ZsqLu2BN5fcMfzrv/hby1tPzmRUoihcTJ87CwQI2yLtDcIqsIjYUf51qBlf'. - 'OnScOSrdQUOMURkiXsLUzJnvbGhoBGDHH5cGyZLhOpYoNl5hqYnYEXOu5fDl9eYAHntx98n8hFHZcPHUuTSxSASAeK/CGIOxJJ0f'. - 'bOGNPU280dgkq6Y2yu8vfjCIlwwzr+/ZQ/PHO0gOLuO5qsftDQ2NbN+4OCgqG6WTxWVaq6zpF+DiSHWnicdylp3r6aZTWthIOrNp'. - 'ktHcvBu0sHX1Sm6ozB3B42d90zZA9bQp7PvgPSzXZfnqX/HS4DKKK2+x69Y/HURs26iBAN5ccsfw7774UcumF37C6f07KSt2OHji'. - 'DEUJD0tISjyPrrSPlAKvN0JP/U4O1NfjuhG2rvklN1SOpfXwftpbTqAyKRrff5fb7rs9V1R7m4wlz2ihA3HpmXflUWyOH2umpLiY'. - 'ui3v8M+6bWzfsRNbSgqkxaCkiy0simMuEWEhpcRzIhQWOIAh6tiAwS4owInFiTou5dOnMnl2NR++ujBwXEc9terD6M43nrj6LgAB'. - 'QnDPA9/irtkP8JRS7Hr/3T6YekDQ1pEiEXOwpUVJzCVlZZFS4mZtkpEo9ChAkDp/jtLMBACy6S4RiQghLyv5cgBRPnKUOX6smUGF'. - 'hSil0MYw9d77mPy1e5mnFE3batm3czvb6nYgEJztSFGU9LCRlMRdUjIH0+lnEMIwPNXD3NumoVJnrMCJaiciMUZfvQnz4QcBSvV1'. - 'vjE5GK358t0zmXDnDB79saLpo20c+aSRD+t25JTp7GZQwsEWFiVxl6hlUf/WO9z32CxmL1rOe6u/I2KuwGhzLQCB7/sYY9Bah3el'. - 'FKbvrrVm4vS7GH/7ncx+chEHGz7myCeNbPtoO0JI2jq78WIRLGkzsqs7V5SfFV5EovXACoiqqsfNpk2vo5VCWtYFBfoU0VoTBAFa'. - 'a7TRaK2p+MoURk+cxMzq+Rzbv49DDbuo27UTW9h0dedssPxuK+kIfN8XxhgDYPVXf2Fh4XKtFIl4AiklAlBKAYRKKK36wHIweTCt'. - 'NfHiEkaOn8j0+7/BmDFjaT30GbHywSxcuZkpFfFg+m1jjZ/NmnVvNfRvwd69e8WBA/uNFAIh4JVXXmHsmDHE4vEQQgjQ2lxQIm9N'. - 'nz35q3BEOZOHzaG2thaA4mRU+L29It+IV21CpbRQfeMFC35gRB/M2rVrubnyZmLxWJhECBEmz/eHyo/7lMlH3LFFujsthNFCCGOu'. - '+WNyeUgpjSVzMKtWraKyshLPdcPEeYWCIEBdpIxSivr6eta8vI7d6+cGnhdV06pe1QP+F/QXWmuRL+jZZ58LlVmxYgUVFRV4rhtu'. - '4TzMxXAA6XRaRAtsYUkx8I/JtSJQOlSwpmZpCLN8+fPcdNNoHMfB9/0QJgRoP295TlR7UVv8xxZcHMuWIZ9/Hn35vG3JEGZpzVJG'. - 'jx5N1IlitKahsZE1L69j69qHgx+urFX/lQL9JYdLlfnZihUhzOLFi8N3Ml1dthOxVH/f/8/CtqSJ2JaJ2JZ59J7RPsC/AViJsQS/'. - 'dBntAAAAAElFTkSuQmCC' ; - - //========================================================== - // folder.png - //========================================================== - $this->iBuiltinIcon[11][0]= 1824 ; - $this->iBuiltinIcon[11][1]= - 'iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAYAAAA6RwvCAAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlz'. - 'AAALEAAACxABrSO9dQAAAAd0SU1FB9ECAQgFFyd9cRUAAAadSURBVHiczdhvbBP3Hcfx9/2xfefEOA5JoCNNnIT8AdtZmYBETJsI'. - '6+jQOlQihT1AYgytqzZpD1atfyYqlT1h0lRpT7aRJ4NQpRvZGELVuo5Ua9jEJDIETQsNQyPBsUJMWGPnj//e+e72wNg4xElMR6ed'. - 'ZNln3933dZ/f93f6yfB/sgmrHdDV1WXlPg8NDZUDScD8LFFFEZZlWYZhWMFg0Orq6sq/gDJAfFy1iiZy9OjrVnj4JzQ1rMWqfxm/'. - '309jYyNtbW0kEgnu3bvH4cOH88c/jqSKQl4/XGkd+eVtAN46up1LH92ktqYS++ZX8Pv9NDQ0sGnTJlKpFOFwmO7u7vy5IyMjeVRd'. - 'XV1+WEOh0IrY4pDnq6wXX/sTiCJaMkFZdRNqxefoe7VtCSqXVDqdZnZ2ltraWkzTpKqqijt3JpFlG7dvj7NzZ1f++qFQyA3EClHL'. - 'Ql743nFkhxPDtJAd5eTaYSVUfX09lZWVlJWVIUnSg7sVQMBCUcu4ceMGe/bsIRQK1QAzOcyykIM9P0KyudAyCWyqG8nhwqa4SkLt'. - '3r0bVVVxu924XC40TUOWZUQxe97CwgIdHR2LMHIxSCaVInVvFElxE0vMY1Pd2NUKJMWNTXHlUfF//4vETJCelwbpFm3MjP2dt37x'. - 'AlN+PzU1NViWRSwW4+7du3g8HjweD4qi5EFAJzAExIpCANbooxhplfB0FJvTg6xWIqsVRVF6MopkU3FXPcnkJxGU0VEAdF2noqKC'. - 'W3/8DpnqLjzep2lubsblcjE8PExHR8fboVDID9xYFpLBDpJF0jDQIncQpWlkm31FlFLtp9PfyuW/vYQj1kPSuRW/38+lj27S2Q7v'. - '/aWXUBVUffVNtm3blivVCEwsC5Eyc5iiApEpDEAXMqQdldhSiWVQHjJagud+8Fuexck/zv+K82dfoSbSCsDe75/km+4GVPd6+l5t'. - '4zJHcqVUYN2yEEtZQDCSJCueRAYsPY49HsFIZVG6p25JUumFafT4DKJN4amtT7Nz38sk5+5A70HMtEYyMkFiZhxzjQ/poXrLQrRU'. - 'DFGEeFpAlkQkm4pRiCpIKodKzk0T/2QMh+piPjxKZPwiSkUtu/b9mNnJEWS7E8nhAmvpM60oJDkXJxqNozxRRUxPIesispBBlsXV'. - 'UaKEFo8gzoaJhz8s2lOmrpUG+WBhJ9/60g+Z+fDXTAXfxllRjl1VkO0OFATsYhYliiK21ZKKhhHnFveUqSdKgwAEOp7F2v51vvw8'. - 'XH7/N1wd/BlTweuUV65BdtgfoLTSkipsdD3tRi0VYpommUwGwzDwdT5HYEc3giAwcvH3jLz3BlPB67jWeZBEKYsSBWwpHZtNKo4q'. - 'aHTDsJeeiGEYWJaFZVmYpommaRiGQdPnv0bb1m8gSRL/vPIOV979aR4lmAJ2p4qCgCxksNuKJ6VNpx4NYhgGpmkuQhmGQTqdxjAM'. - 'qr2d7HtxEEEQuH1tkKvvvkF44tqDnrIcKJKAPf1g+LAUElq8dIiu60sApmnm93Pfzc7OYhgGrie+wFe++ztcLhcT1wf54PzPCU9c'. - 'w7XWjWS3IdsdOAUBWZAxrRJnTQ6SG5bce2FCpmkughmGQSqVYm5uDtnj44sH38TtdhP6+Dwf//V4ttHXrkGURZJaic8RgHQ6jWma'. - 'SJKUL5RLKNfIOczDKF3XSSaTRCIRhLJWntp3nGfWrSMxc5OLf3iNP4+68T9Ub9nF76lTpxgfHycajZJKpdA0LZ9GbjYV7hcDWZaF'. - 'pmnMz88Ti8UYunSLmu1HFi2aVkxkaGjINTY2ttDb24vX6+XQoUNs3ryZ8vJyIDu1BUFYkkxhgxeiWlpaOHPmDE1NTdTX1xe98eWG'. - 'JnF/9dQZCoXUYDA4AOD1ejlw4ACtra2Ul5fniwmCkEcUJiUIAoFAgL6+Pnw+H21tbfT39z8SxCS7hHsfWH9/8dL4MKqnp4eWlhac'. - 'TmcekEvMNE2am5s5ceIEgUCA9vZ2Tp48ic/nY3j4UsmQHCYOjJHtpeBKqL1799Lc3IzT6UTXdRobGxkYGKC9vZ3W1tZ8Ko86NJ8a'. - 'tXHjRo4dO8bp06fZsmULGzZsoL+/n0AggNfr5ezZs/8VpGTU5OSkc//+/acBfD4f1dXV7Nq1i4aGBs6dO4fP5+Pq1SuPBbIiyjTN'. - 'RUnV1dUNXLhwAa/Xy44dO4jFYgBEo9FFF1r134BPuYlk16LrAYXsAlmtq6sbKDwoFAp9m+ykuP5ZQVZF3f8tCdwCov8LyHIoAANI'. - 'AXf/A1TI0XCDh7OWAAAAAElFTkSuQmCC' ; - - //========================================================== - // file_important.png - //========================================================== - $this->iBuiltinIcon[12][0]= 1785 ; - $this->iBuiltinIcon[12][1]= - 'iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAYAAAA6RwvCAAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlz'. - 'AAALDwAACw8BkvkDpQAAAAd0SU1FB9ECDAcjDeD3lKsAAAZ2SURBVHicrZhPaFzHHcc/897s7lutJCsr2VHsOHWMk0MPbsBUrcnF'. - 'OFRdSo6FNhdB6SGHlpDmYtJCDyoxyKe6EBxKQkt7KKL0T6ABo0NbciqigtC6PhWKI2NFqqxdSd7V2/dmftPDvPd212t55dCBYfbN'. - 'zpvfZ77z+/1mdhUjytWrV93Hf/24eD5z9gwiMlDjOKbb7dLtdhER2u02u7u73Lp1CxEZBw4AeZwdNQqkMd9wbziFGINJUt6rRbz5'. - '1ptUq1XK5TJBEAAUMHt7e+zu7gKwvLzMysoKwAng/uNg9CgQgFKlgg1DUJ67Vqtx6tQpZmdniaIIpRTOOZRSdDoddnZ2aLfbLC8v'. - 's7S0xJUrV7ZGwQSj1PhhfRodVdDlMrpc5vup5Z2fvMPdu3fZ29vDWjvwztjYGPV6nVqtRqVS4dKlSywtLQFsAdOH2XwsCEApg3jl'. - 'w98Rak2gvYjNZpNms0mSJDjnHgkDMDc3dySYQ0Ea8w139YUX0OUKulzyg7UmCEO+l1huvHuDra0t9vf3h1TJYSqVypFhHquIrlQI'. - 'S5qv/uIDAC7/4bcEQYAKvK+0Wq1DVQGIoog7d+4cCeaRII35hrt+8SsEOkRlUaEyR0UpFIrXHxyMVKVUKnHv3r0jwRwaNelBjBjL'. - 'Sz/7KYuLiwAsLi7y4z/9kY9e+TpkCuSqjI+Po7XuAWeKXLt2DWNMUZMkwRjDhQsXWFtbK6JpCCT3jfQgxomPtPX19YHWicM5x3c2'. - '73Pj3Ru8/aO3mZqaolKpoHVvyuvXr/Ppnf/Q7uzz380NPtu4y/qnG+ztd1hfX2dtbQ3gIvDnRyqSxl1UoPjyz98D4PTp0wPtq39Z'. - '4fdzLxegrVaLVqvF5OQkYRgWqpRKJZ77wvNsbW1RG5tgfKLOTH2G7Z1twqBQrgrMDvhInjfSOCY5iIv+hYWFgRZArEWsZWF941Bf'. - 'SdMUgMnJCWpjVU4cn+HUyePM1Gc4+fRUPkzBI5w1jbukcczLv/5l0XfmzJmBFuCba38r/CRXpT+CrDUoZ0jjB4RYonJAOYRobJKT'. - 'z5zgqfqxAbsFSH6mpHFM2qdGXh4VnoViD6mSJF2cTQeqDqBaKVHWmonJCWpZjhkC6anR5WsffTgwaHV1FaUUq6urA/2v3f5k4LnV'. - 'arG9tUn3oI2YBCcWHYAxMVYs1qZEZY2SFB2aYZDGfMN9d7uJiWPSeFiNo5Rclc3NTXZbO6RpF7EJVixYA9agwwDnUiqlEPdQ3imi'. - 'Jo27BGHIt/7x9yEjc3Nzh27Na7c/4TdffKl4bja3ae5MUIu0T/HOEIaOpJt4gwoSsVTK4SBIY77hFtY3ABBjBiZ90rKwvsH77/+K'. - 't37wOhO1iPpTk4SBw1mLsz6CnKQ4l3qV+kE+t9XHlNZOk+bUJLVIE1VCcIJWQmJ6qjj30NbcXLkZMt8YPig+Z3n1G5fZ39/j/vY2'. - '9ckqZT2Ochbn0p4qNkU/dDfUADdXbh4HXgRO4zNdEU0XL1784PLly5w9e7Z4SazFOfGrEotDcOKrcoJPmrYIXf/Zop3QNd1skuGt'. - 'cUAb2MgAxvHZTgFUq1Wmp6eZnZ0F8JlTjDduDThBnDeECEoJtbGIp6enqEblzCcEZ1PECU4yVRiOGgd0gc+AB0CZvkv1sWPHOHfu'. - 'HOfPn8da41cpkkltEBEPJhYnBkTQJcdYVKGkgRxCfBsq5xXNgAa2Bn+hjTOgHEKBP8pzRUxykIH4ifLJRTJAl+UMBJzPHQ6bfe/f'. - 'cWIzPxlUpD+zugzIZtVk1d8znBAqRxgoQuVQgSJQ3h9C5QhDRYgjUILCAzlnEdsHYTKfMTEBcP7F54YUGVmc2GLlIn6ve6v0ahSt'. - '8X25TzjJ+rIx1grKpQPWR4LkGVVsMgghvS0qjPdvm5OeceOTWA5Evo2mFzkjQfL7hZPUy5yvvF/uPFQL3+nbDmsLCEmT3sTmCTNr'. - 'rogT6yFsOix3ftw7OwQhkvSU6CuinhCk0+kAkFoBazEEICHaHHiPVmU0gnUp4EAc1mYrF0EBVpwPi34VrBkwPxKk3W5ju/e5/c+d'. - 'bGUHIAIuydTIE5zfc5Wr4lJcahHnHTP3CVGm78DrgY38N+DEibp7dmYKdAQmBh1hjEFjis+9CTWYGK21H6PxPyOI0DobYwzZF/z7'. - '7jadTvJtYG0kCD7lfwl49ijgT1gc0AH+dZSJA/xB+Mz/GSIvFoj/B7H1mAd8CO/zAAAAAElFTkSuQmCC' ; - - $this->iLen = count($this->iBuiltinIcon); - } -} - -//=================================================== -// Global cache for builtin images -//=================================================== -$_gPredefIcons = new PredefIcons(); - -//=================================================== -// CLASS IconImage -// Description: Holds properties for an icon image -//=================================================== -class IconImage { - private $iGDImage=null; - private $iWidth,$iHeight; - private $ixalign='left',$iyalign='center'; - private $iScale=1.0; - - function __construct($aIcon,$aScale=1) { - GLOBAL $_gPredefIcons ; - if( is_string($aIcon) ) { - $this->iGDImage = Graph::LoadBkgImage('',$aIcon); - } - elseif( is_integer($aIcon) ) { - // Builtin image - $this->iGDImage = $_gPredefIcons->GetImg($aIcon); - } - else { - JpGraphError::RaiseL(6011); - //('Argument to IconImage must be string or integer'); - } - $this->iScale = $aScale; - $this->iWidth = Image::GetWidth($this->iGDImage); - $this->iHeight = Image::GetHeight($this->iGDImage); - } - - function GetWidth() { - return round($this->iScale*$this->iWidth); - } - - function GetHeight() { - return round($this->iScale*$this->iHeight); - } - - function SetAlign($aX='left',$aY='center') { - $this->ixalign = $aX; - $this->iyalign = $aY; - } - - function Stroke($aImg,$x,$y) { - - if( $this->ixalign == 'right' ) { - $x -= $this->iWidth; - } - elseif( $this->ixalign == 'center' ) { - $x -= round($this->iWidth/2*$this->iScale); - } - - if( $this->iyalign == 'bottom' ) { - $y -= $this->iHeight; - } - elseif( $this->iyalign == 'center' ) { - $y -= round($this->iHeight/2*$this->iScale); - } - - $aImg->Copy($this->iGDImage, - $x,$y,0,0, - round($this->iWidth*$this->iScale),round($this->iHeight*$this->iScale), - $this->iWidth,$this->iHeight); - } -} - - -//=================================================== -// CLASS TextProperty -// Description: Holds properties for a text -//=================================================== -class TextProperty { - public $iShow=true; - public $csimtarget='',$csimwintarget='',$csimalt=''; - private $iFFamily=FF_FONT1,$iFStyle=FS_NORMAL,$iFSize=10; - private $iFontArray=array(); - private $iColor="black"; - private $iText=""; - private $iHAlign="left",$iVAlign="bottom"; - - //--------------- - // CONSTRUCTOR - function __construct($aTxt='') { - $this->iText = $aTxt; - } - - //--------------- - // PUBLIC METHODS - function Set($aTxt) { - $this->iText = $aTxt; - } - - function SetCSIMTarget($aTarget,$aAltText='',$aWinTarget='') { - if( is_string($aTarget) ) - $aTarget = array($aTarget); - $this->csimtarget=$aTarget; - - if( is_string($aWinTarget) ) - $aWinTarget = array($aWinTarget); - $this->csimwintarget=$aWinTarget; - - if( is_string($aAltText) ) - $aAltText = array($aAltText); - $this->csimalt=$aAltText; - - } - - function SetCSIMAlt($aAltText) { - if( is_string($aAltText) ) - $aAltText = array($aAltText); - $this->csimalt=$aAltText; - } - - // Set text color - function SetColor($aColor) { - $this->iColor = $aColor; - } - - function HasTabs() { - if( is_string($this->iText) ) { - return substr_count($this->iText,"\t") > 0; - } - elseif( is_array($this->iText) ) { - return false; - } - } - - // Get number of tabs in string - function GetNbrTabs() { - if( is_string($this->iText) ) { - return substr_count($this->iText,"\t") ; - } - else{ - return 0; - } - } - - // Set alignment - function Align($aHAlign,$aVAlign="bottom") { - $this->iHAlign=$aHAlign; - $this->iVAlign=$aVAlign; - } - - // Synonym - function SetAlign($aHAlign,$aVAlign="bottom") { - $this->iHAlign=$aHAlign; - $this->iVAlign=$aVAlign; - } - - // Specify font - function SetFont($aFFamily,$aFStyle=FS_NORMAL,$aFSize=10) { - $this->iFFamily = $aFFamily; - $this->iFStyle = $aFStyle; - $this->iFSize = $aFSize; - } - - function SetColumnFonts($aFontArray) { - if( !is_array($aFontArray) || count($aFontArray[0]) != 3 ) { - JpGraphError::RaiseL(6033); - // 'Array of fonts must contain arrays with 3 elements, i.e. (Family, Style, Size)' - } - $this->iFontArray = $aFontArray; - } - - - function IsColumns() { - return is_array($this->iText) ; - } - - // Get width of text. If text contains several columns separated by - // tabs then return both the total width as well as an array with a - // width for each column. - function GetWidth($aImg,$aUseTabs=false,$aTabExtraMargin=1.1) { - $extra_margin=4; - $aImg->SetFont($this->iFFamily,$this->iFStyle,$this->iFSize); - if( is_string($this->iText) ) { - if( strlen($this->iText) == 0 ) return 0; - $tmp = preg_split('/\t/',$this->iText); - if( count($tmp) <= 1 || !$aUseTabs ) { - $w = $aImg->GetTextWidth($this->iText); - return $w + 2*$extra_margin; - } - else { - $tot=0; - $n = count($tmp); - for($i=0; $i < $n; ++$i) { - $res[$i] = $aImg->GetTextWidth($tmp[$i]); - $tot += $res[$i]*$aTabExtraMargin; - } - return array(round($tot),$res); - } - } - elseif( is_object($this->iText) ) { - // A single icon - return $this->iText->GetWidth()+2*$extra_margin; - } - elseif( is_array($this->iText) ) { - // Must be an array of texts. In this case we return the sum of the - // length + a fixed margin of 4 pixels on each text string - $n = count($this->iText); - $nf = count($this->iFontArray); - for( $i=0, $w=0; $i < $n; ++$i ) { - if( $i < $nf ) { - $aImg->SetFont($this->iFontArray[$i][0],$this->iFontArray[$i][1],$this->iFontArray[$i][2]); - } - else { - $aImg->SetFont($this->iFFamily,$this->iFStyle,$this->iFSize); - } - $tmp = $this->iText[$i]; - if( is_string($tmp) ) { - $w += $aImg->GetTextWidth($tmp)+$extra_margin; - } - else { - if( is_object($tmp) === false ) { - JpGraphError::RaiseL(6012); - } - $w += $tmp->GetWidth()+$extra_margin; - } - } - return $w; - } - else { - JpGraphError::RaiseL(6012); - } - } - - // for the case where we have multiple columns this function returns the width of each - // column individually. If there is no columns just return the width of the single - // column as an array of one - function GetColWidth($aImg,$aMargin=0) { - $aImg->SetFont($this->iFFamily,$this->iFStyle,$this->iFSize); - if( is_array($this->iText) ) { - $n = count($this->iText); - $nf = count($this->iFontArray); - for( $i=0, $w=array(); $i < $n; ++$i ) { - $tmp = $this->iText[$i]; - if( is_string($tmp) ) { - if( $i < $nf ) { - $aImg->SetFont($this->iFontArray[$i][0],$this->iFontArray[$i][1],$this->iFontArray[$i][2]); - } - else { - $aImg->SetFont($this->iFFamily,$this->iFStyle,$this->iFSize); - } - $w[$i] = $aImg->GetTextWidth($tmp)+$aMargin; - } - else { - if( is_object($tmp) === false ) { - JpGraphError::RaiseL(6012); - } - $w[$i] = $tmp->GetWidth()+$aMargin; - } - } - return $w; - } - else { - return array($this->GetWidth($aImg)); - } - } - - // Get total height of text - function GetHeight($aImg) { - $nf = count($this->iFontArray); - $maxheight = -1; - - if( $nf > 0 ) { - // We have to find out the largest font and take that one as the - // height of the row - for($i=0; $i < $nf; ++$i ) { - $aImg->SetFont($this->iFontArray[$i][0],$this->iFontArray[$i][1],$this->iFontArray[$i][2]); - $height = $aImg->GetFontHeight(); - $maxheight = max($height,$maxheight); - } - } - - $aImg->SetFont($this->iFFamily,$this->iFStyle,$this->iFSize); - $height = $aImg->GetFontHeight(); - $maxheight = max($height,$maxheight); - return $maxheight; - } - - // Unhide/hide the text - function Show($aShow=true) { - $this->iShow=$aShow; - } - - // Stroke text at (x,y) coordinates. If the text contains tabs then the - // x parameter should be an array of positions to be used for each successive - // tab mark. If no array is supplied then the tabs will be ignored. - function Stroke($aImg,$aX,$aY) { - if( $this->iShow ) { - $aImg->SetColor($this->iColor); - $aImg->SetFont($this->iFFamily,$this->iFStyle,$this->iFSize); - $aImg->SetTextAlign($this->iHAlign,$this->iVAlign); - if( $this->GetNbrTabs() < 1 ) { - if( is_string($this->iText) ) { - if( is_array($aX) ) $aX=$aX[0]; - if( is_array($aY) ) $aY=$aY[0]; - $aImg->StrokeText($aX,$aY,$this->iText); - } - elseif( is_array($this->iText) && ($n = count($this->iText)) > 0 ) { - $ax = is_array($aX) ; - $ay = is_array($aY) ; - if( $ax && $ay ) { - // Nothing; both are already arrays - } - elseif( $ax ) { - $aY = array_fill(0,$n,$aY); - } - elseif( $ay ) { - $aX = array_fill(0,$n,$aX); - } - else { - $aX = array_fill(0,$n,$aX); - $aY = array_fill(0,$n,$aY); - } - $n = min($n, count($aX) ) ; - $n = min($n, count($aY) ) ; - for($i=0; $i < $n; ++$i ) { - $tmp = $this->iText[$i]; - if( is_object($tmp) ) { - $tmp->Stroke($aImg,$aX[$i],$aY[$i]); - } - else { - if( $i < count($this->iFontArray) ) { - $font = $this->iFontArray[$i]; - $aImg->SetFont($font[0],$font[1],$font[2]); - } - else { - $aImg->SetFont($this->iFFamily,$this->iFStyle,$this->iFSize); - } - $aImg->StrokeText($aX[$i],$aY[$i],str_replace("\t"," ",$tmp)); - } - } - } - } - else { - $tmp = preg_split('/\t/',$this->iText); - $n = min(count($tmp),count($aX)); - for($i=0; $i < $n; ++$i) { - if( $i < count($this->iFontArray) ) { - $font = $this->iFontArray[$i]; - $aImg->SetFont($font[0],$font[1],$font[2]); - } - else { - $aImg->SetFont($this->iFFamily,$this->iFStyle,$this->iFSize); - } - $aImg->StrokeText($aX[$i],$aY,$tmp[$i]); - } - } - } - } -} - -//=================================================== -// CLASS HeaderProperty -// Description: Data encapsulating class to hold property -// for each type of the scale headers -//=================================================== -class HeaderProperty { - public $grid; - public $iShowLabels=true,$iShowGrid=true; - public $iTitleVertMargin=3,$iFFamily=FF_FONT0,$iFStyle=FS_NORMAL,$iFSize=8; - public $iStyle=0; - public $iFrameColor="black",$iFrameWeight=1; - public $iBackgroundColor="white"; - public $iWeekendBackgroundColor="lightgray",$iSundayTextColor="red"; // these are only used with day scale - public $iTextColor="black"; - public $iLabelFormStr="%d"; - public $iIntervall = 1; - - //--------------- - // CONSTRUCTOR - function __construct() { - $this->grid = new LineProperty(); - } - - //--------------- - // PUBLIC METHODS - function Show($aShow=true) { - $this->iShowLabels = $aShow; - } - - function SetIntervall($aInt) { - $this->iIntervall = $aInt; - } - - function SetInterval($aInt) { - $this->iIntervall = $aInt; - } - - function GetIntervall() { - return $this->iIntervall ; - } - - function SetFont($aFFamily,$aFStyle=FS_NORMAL,$aFSize=10) { - $this->iFFamily = $aFFamily; - $this->iFStyle = $aFStyle; - $this->iFSize = $aFSize; - } - - function SetFontColor($aColor) { - $this->iTextColor = $aColor; - } - - function GetFontHeight($aImg) { - $aImg->SetFont($this->iFFamily,$this->iFStyle,$this->iFSize); - return $aImg->GetFontHeight(); - } - - function GetFontWidth($aImg) { - $aImg->SetFont($this->iFFamily,$this->iFStyle,$this->iFSize); - return $aImg->GetFontWidth(); - } - - function GetStrWidth($aImg,$aStr) { - $aImg->SetFont($this->iFFamily,$this->iFStyle,$this->iFSize); - return $aImg->GetTextWidth($aStr); - } - - function SetStyle($aStyle) { - $this->iStyle = $aStyle; - } - - function SetBackgroundColor($aColor) { - $this->iBackgroundColor=$aColor; - } - - function SetFrameWeight($aWeight) { - $this->iFrameWeight=$aWeight; - } - - function SetFrameColor($aColor) { - $this->iFrameColor=$aColor; - } - - // Only used by day scale - function SetWeekendColor($aColor) { - $this->iWeekendBackgroundColor=$aColor; - } - - // Only used by day scale - function SetSundayFontColor($aColor) { - $this->iSundayTextColor=$aColor; - } - - function SetTitleVertMargin($aMargin) { - $this->iTitleVertMargin=$aMargin; - } - - function SetLabelFormatString($aStr) { - $this->iLabelFormStr=$aStr; - } - - function SetFormatString($aStr) { - $this->SetLabelFormatString($aStr); - } - - -} - -//=================================================== -// CLASS GanttScale -// Description: Responsible for calculating and showing -// the scale in a gantt chart. This includes providing methods for -// converting dates to position in the chart as well as stroking the -// date headers (days, week, etc). -//=================================================== -class GanttScale { - public $minute,$hour,$day,$week,$month,$year; - public $divider,$dividerh,$tableTitle; - public $iStartDate=-1,$iEndDate=-1; - // Number of gantt bar position (n.b not necessariliy the same as the number of bars) - // we could have on bar in position 1, and one bar in position 5 then there are two - // bars but the number of bar positions is 5 - public $actinfo; - public $iTopPlotMargin=10,$iBottomPlotMargin=15; - public $iVertLines=-1; - public $iVertHeaderSize=-1; - // The width of the labels (defaults to the widest of all labels) - private $iLabelWidth; - // Out image to stroke the scale to - private $iImg; - private $iTableHeaderBackgroundColor="white",$iTableHeaderFrameColor="black"; - private $iTableHeaderFrameWeight=1; - private $iAvailableHeight=-1,$iVertSpacing=-1; - private $iDateLocale; - private $iVertLayout=GANTT_EVEN; - private $iUsePlotWeekendBackground=true; - private $iWeekStart = 1; // Default to have weekends start on Monday - - //--------------- - // CONSTRUCTOR - function __construct($aImg) { - $this->iImg = $aImg; - $this->iDateLocale = new DateLocale(); - - $this->minute = new HeaderProperty(); - $this->minute->SetIntervall(15); - $this->minute->SetLabelFormatString('i'); - $this->minute->SetFont(FF_FONT0); - $this->minute->grid->SetColor("gray"); - - $this->hour = new HeaderProperty(); - $this->hour->SetFont(FF_FONT0); - $this->hour->SetIntervall(6); - $this->hour->SetStyle(HOURSTYLE_HM24); - $this->hour->SetLabelFormatString('H:i'); - $this->hour->grid->SetColor("gray"); - - $this->day = new HeaderProperty(); - $this->day->grid->SetColor("gray"); - $this->day->SetLabelFormatString('l'); - - $this->week = new HeaderProperty(); - $this->week->SetLabelFormatString("w%d"); - $this->week->SetFont(FF_FONT1); - - $this->month = new HeaderProperty(); - $this->month->SetFont(FF_FONT1,FS_BOLD); - - $this->year = new HeaderProperty(); - $this->year->SetFont(FF_FONT1,FS_BOLD); - - $this->divider=new LineProperty(); - $this->dividerh=new LineProperty(); - $this->dividerh->SetWeight(2); - $this->divider->SetWeight(6); - $this->divider->SetColor('gray'); - $this->divider->SetStyle('fancy'); - - $this->tableTitle=new TextProperty(); - $this->tableTitle->Show(false); - $this->actinfo = new GanttActivityInfo(); - } - - //--------------- - // PUBLIC METHODS - // Specify what headers should be visible - function ShowHeaders($aFlg) { - $this->day->Show($aFlg & GANTT_HDAY); - $this->week->Show($aFlg & GANTT_HWEEK); - $this->month->Show($aFlg & GANTT_HMONTH); - $this->year->Show($aFlg & GANTT_HYEAR); - $this->hour->Show($aFlg & GANTT_HHOUR); - $this->minute->Show($aFlg & GANTT_HMIN); - - // Make some default settings of gridlines whihc makes sense - if( $aFlg & GANTT_HWEEK ) { - $this->month->grid->Show(false); - $this->year->grid->Show(false); - } - if( $aFlg & GANTT_HHOUR ) { - $this->day->grid->SetColor("black"); - } - } - - // Should the weekend background stretch all the way down in the plotarea - function UseWeekendBackground($aShow) { - $this->iUsePlotWeekendBackground = $aShow; - } - - // Have a range been specified? - function IsRangeSet() { - return $this->iStartDate!=-1 && $this->iEndDate!=-1; - } - - // Should the layout be from top or even? - function SetVertLayout($aLayout) { - $this->iVertLayout = $aLayout; - } - - // Which locale should be used? - function SetDateLocale($aLocale) { - $this->iDateLocale->Set($aLocale); - } - - // Number of days we are showing - function GetNumberOfDays() { - return round(($this->iEndDate-$this->iStartDate)/SECPERDAY); - } - - // The width of the actual plot area - function GetPlotWidth() { - $img=$this->iImg; - return $img->width - $img->left_margin - $img->right_margin; - } - - // Specify the width of the titles(labels) for the activities - // (This is by default set to the minimum width enought for the - // widest title) - function SetLabelWidth($aLabelWidth) { - $this->iLabelWidth=$aLabelWidth; - } - - // Which day should the week start? - // 0==Sun, 1==Monday, 2==Tuesday etc - function SetWeekStart($aStartDay) { - $this->iWeekStart = $aStartDay % 7; - - //Recalculate the startday since this will change the week start - $this->SetRange($this->iStartDate,$this->iEndDate); - } - - // Do we show min scale? - function IsDisplayMinute() { - return $this->minute->iShowLabels; - } - - // Do we show day scale? - function IsDisplayHour() { - return $this->hour->iShowLabels; - } - - - // Do we show day scale? - function IsDisplayDay() { - return $this->day->iShowLabels; - } - - // Do we show week scale? - function IsDisplayWeek() { - return $this->week->iShowLabels; - } - - // Do we show month scale? - function IsDisplayMonth() { - return $this->month->iShowLabels; - } - - // Do we show year scale? - function IsDisplayYear() { - return $this->year->iShowLabels; - } - - // Specify spacing (in percent of bar height) between activity bars - function SetVertSpacing($aSpacing) { - $this->iVertSpacing = $aSpacing; - } - - // Specify scale min and max date either as timestamp or as date strings - // Always round to the nearest week boundary - function SetRange($aMin,$aMax) { - $this->iStartDate = $this->NormalizeDate($aMin); - $this->iEndDate = $this->NormalizeDate($aMax); - } - - - // Adjust the start and end date so they fit to beginning/ending - // of the week taking the specified week start day into account. - function AdjustStartEndDay() { - - if( !($this->IsDisplayYear() ||$this->IsDisplayMonth() || $this->IsDisplayWeek()) ) { - // Don't adjust - return; - } - - // Get day in week for start and ending date (Sun==0) - $ds=strftime("%w",$this->iStartDate); - $de=strftime("%w",$this->iEndDate); - - // We want to start on iWeekStart day. But first we subtract a week - // if the startdate is "behind" the day the week start at. - // This way we ensure that the given start date is always included - // in the range. If we don't do this the nearest correct weekday in the week - // to start at might be later than the start date. - if( $ds < $this->iWeekStart ) - $d = strtotime('-7 day',$this->iStartDate); - else - $d = $this->iStartDate; - $adjdate = strtotime(($this->iWeekStart-$ds).' day',$d /*$this->iStartDate*/ ); - $this->iStartDate = $adjdate; - - // We want to end on the last day of the week - $preferredEndDay = ($this->iWeekStart+6)%7; - if( $preferredEndDay != $de ) { - // Solve equivalence eq: $de + x ~ $preferredDay (mod 7) - $adj = (7+($preferredEndDay - $de)) % 7; - $adjdate = strtotime("+$adj day",$this->iEndDate); - $this->iEndDate = $adjdate; - } - } - - // Specify background for the table title area (upper left corner of the table) - function SetTableTitleBackground($aColor) { - $this->iTableHeaderBackgroundColor = $aColor; - } - - /////////////////////////////////////// - // PRIVATE Methods - - // Determine the height of all the scale headers combined - function GetHeaderHeight() { - $img=$this->iImg; - $height=1; - if( $this->minute->iShowLabels ) { - $height += $this->minute->GetFontHeight($img); - $height += $this->minute->iTitleVertMargin; - } - if( $this->hour->iShowLabels ) { - $height += $this->hour->GetFontHeight($img); - $height += $this->hour->iTitleVertMargin; - } - if( $this->day->iShowLabels ) { - $height += $this->day->GetFontHeight($img); - $height += $this->day->iTitleVertMargin; - } - if( $this->week->iShowLabels ) { - $height += $this->week->GetFontHeight($img); - $height += $this->week->iTitleVertMargin; - } - if( $this->month->iShowLabels ) { - $height += $this->month->GetFontHeight($img); - $height += $this->month->iTitleVertMargin; - } - if( $this->year->iShowLabels ) { - $height += $this->year->GetFontHeight($img); - $height += $this->year->iTitleVertMargin; - } - return $height; - } - - // Get width (in pixels) for a single day - function GetDayWidth() { - return ($this->GetPlotWidth()-$this->iLabelWidth+1)/$this->GetNumberOfDays(); - } - - // Get width (in pixels) for a single hour - function GetHourWidth() { - return $this->GetDayWidth() / 24 ; - } - - function GetMinuteWidth() { - return $this->GetHourWidth() / 60 ; - } - - // Nuber of days in a year - function GetNumDaysInYear($aYear) { - if( $this->IsLeap($aYear) ) - return 366; - else - return 365; - } - - // Get week number - function GetWeekNbr($aDate,$aSunStart=true) { - // We can't use the internal strftime() since it gets the weeknumber - // wrong since it doesn't follow ISO on all systems since this is - // system linrary dependent. - // Even worse is that this works differently if we are on a Windows - // or UNIX box (it even differs between UNIX boxes how strftime() - // is natively implemented) - // - // Credit to Nicolas Hoizey for this elegant - // version of Week Nbr calculation. - - $day = $this->NormalizeDate($aDate); - if( $aSunStart ) - $day += 60*60*24; - - /*------------------------------------------------------------------------- - According to ISO-8601 : - "Week 01 of a year is per definition the first week that has the Thursday in this year, - which is equivalent to the week that contains the fourth day of January. - In other words, the first week of a new year is the week that has the majority of its - days in the new year." - - Be carefull, with PHP, -3 % 7 = -3, instead of 4 !!! - - day of year = date("z", $day) + 1 - offset to thursday = 3 - (date("w", $day) + 6) % 7 - first thursday of year = 1 + (11 - date("w", mktime(0, 0, 0, 1, 1, date("Y", $day)))) % 7 - week number = (thursday's day of year - first thursday's day of year) / 7 + 1 - ---------------------------------------------------------------------------*/ - - $thursday = $day + 60 * 60 * 24 * (3 - (date("w", $day) + 6) % 7); // take week's thursday - $week = 1 + (date("z", $thursday) - (11 - date("w", mktime(0, 0, 0, 1, 1, date("Y", $thursday)))) % 7) / 7; - - return $week; - } - - // Is year a leap year? - function IsLeap($aYear) { - // Is the year a leap year? - //$year = 0+date("Y",$aDate); - if( $aYear % 4 == 0) - if( !($aYear % 100 == 0) || ($aYear % 400 == 0) ) - return true; - return false; - } - - // Get current year - function GetYear($aDate) { - return 0+Date("Y",$aDate); - } - - // Return number of days in a year - function GetNumDaysInMonth($aMonth,$aYear) { - $days=array(31,28,31,30,31,30,31,31,30,31,30,31); - $daysl=array(31,29,31,30,31,30,31,31,30,31,30,31); - if( $this->IsLeap($aYear)) - return $daysl[$aMonth]; - else - return $days[$aMonth]; - } - - // Get day in month - function GetMonthDayNbr($aDate) { - return 0+strftime("%d",$aDate); - } - - // Get day in year - function GetYearDayNbr($aDate) { - return 0+strftime("%j",$aDate); - } - - // Get month number - function GetMonthNbr($aDate) { - return 0+strftime("%m",$aDate); - } - - // Translate a date to screen coordinates (horizontal scale) - function TranslateDate($aDate) { - // - // In order to handle the problem with Daylight savings time - // the scale written with equal number of seconds per day beginning - // with the start date. This means that we "cement" the state of - // DST as it is in the start date. If later the scale includes the - // switchover date (depends on the locale) we need to adjust back - // if the date we try to translate has a different DST status since - // we would otherwise be off by one hour. - $aDate = $this->NormalizeDate($aDate); - $tmp = localtime($aDate); - $cloc = $tmp[8]; - $tmp = localtime($this->iStartDate); - $sloc = $tmp[8]; - $offset = 0; - if( $sloc != $cloc) { - if( $sloc ) - $offset = 3600; - else - $offset = -3600; - } - $img=$this->iImg; - return ($aDate-$this->iStartDate-$offset)/SECPERDAY*$this->GetDayWidth()+$img->left_margin+$this->iLabelWidth;; - } - - // Get screen coordinatesz for the vertical position for a bar - function TranslateVertPos($aPos,$atTop=false) { - $img=$this->iImg; - if( $aPos > $this->iVertLines ) - JpGraphError::RaiseL(6015,$aPos); - // 'Illegal vertical position %d' - if( $this->iVertLayout == GANTT_EVEN ) { - // Position the top bar at 1 vert spacing from the scale - $pos = round($img->top_margin + $this->iVertHeaderSize + ($aPos+1)*$this->iVertSpacing); - } - else { - // position the top bar at 1/2 a vert spacing from the scale - $pos = round($img->top_margin + $this->iVertHeaderSize + $this->iTopPlotMargin + ($aPos+1)*$this->iVertSpacing); - } - - if( $atTop ) - $pos -= $this->iVertSpacing; - - return $pos; - } - - // What is the vertical spacing? - function GetVertSpacing() { - return $this->iVertSpacing; - } - - // Convert a date to timestamp - function NormalizeDate($aDate) { - if( $aDate === false ) return false; - if( is_string($aDate) ) { - $t = strtotime($aDate); - if( $t === FALSE || $t === -1 ) { - JpGraphError::RaiseL(6016,$aDate); - //("Date string ($aDate) specified for Gantt activity can not be interpretated. Please make sure it is a valid time string, e.g. 2005-04-23 13:30"); - } - return $t; - } - elseif( is_int($aDate) || is_float($aDate) ) - return $aDate; - else - JpGraphError::RaiseL(6017,$aDate); - //Unknown date format in GanttScale ($aDate)."); - } - - - // Convert a time string to minutes - - function TimeToMinutes($aTimeString) { - // Split in hours and minutes - $pos=strpos($aTimeString,':'); - $minint=60; - if( $pos === false ) { - $hourint = $aTimeString; - $minint = 0; - } - else { - $hourint = floor(substr($aTimeString,0,$pos)); - $minint = floor(substr($aTimeString,$pos+1)); - } - $minint += 60 * $hourint; - return $minint; - } - - // Stroke the day scale (including gridlines) - function StrokeMinutes($aYCoord,$getHeight=false) { - $img=$this->iImg; - $xt=$img->left_margin+$this->iLabelWidth; - $yt=$aYCoord+$img->top_margin; - if( $this->minute->iShowLabels ) { - $img->SetFont($this->minute->iFFamily,$this->minute->iFStyle,$this->minute->iFSize); - $yb = $yt + $img->GetFontHeight() + - $this->minute->iTitleVertMargin + $this->minute->iFrameWeight; - if( $getHeight ) { - return $yb - $img->top_margin; - } - $xb = $img->width-$img->right_margin+1; - $img->SetColor($this->minute->iBackgroundColor); - $img->FilledRectangle($xt,$yt,$xb,$yb); - - $x = $xt; - $img->SetTextAlign("center"); - $day = date('w',$this->iStartDate); - $minint = $this->minute->GetIntervall() ; - - if( 60 % $minint !== 0 ) { - JpGraphError::RaiseL(6018,$minint); - //'Intervall for minutes must divide the hour evenly, e.g. 1,5,10,12,15,20,30 etc You have specified an intervall of '.$minint.' minutes.'); - } - - - $n = 60 / $minint; - $datestamp = $this->iStartDate; - $width = $this->GetHourWidth() / $n ; - if( $width < 8 ) { - // TO small width to draw minute scale - JpGraphError::RaiseL(6019,$width); - //('The available width ('.$width.') for minutes are to small for this scale to be displayed. Please use auto-sizing or increase the width of the graph.'); - } - - $nh = ceil(24*60 / $this->TimeToMinutes($this->hour->GetIntervall()) ); - $nd = $this->GetNumberOfDays(); - // Convert to intervall to seconds - $minint *= 60; - for($j=0; $j < $nd; ++$j, $day += 1, $day %= 7) { - for( $k=0; $k < $nh; ++$k ) { - for($i=0; $i < $n ;++$i, $x+=$width, $datestamp += $minint ) { - if( $day==6 || $day==0 ) { - - $img->PushColor($this->day->iWeekendBackgroundColor); - if( $this->iUsePlotWeekendBackground ) - $img->FilledRectangle($x,$yt+$this->day->iFrameWeight,$x+$width,$img->height-$img->bottom_margin); - else - $img->FilledRectangle($x,$yt+$this->day->iFrameWeight,$x+$width,$yb-$this->day->iFrameWeight); - $img->PopColor(); - - } - - if( $day==0 ) - $img->SetColor($this->day->iSundayTextColor); - else - $img->SetColor($this->day->iTextColor); - - switch( $this->minute->iStyle ) { - case MINUTESTYLE_CUSTOM: - $txt = date($this->minute->iLabelFormStr,$datestamp); - break; - case MINUTESTYLE_MM: - default: - // 15 - $txt = date('i',$datestamp); - break; - } - $img->StrokeText(round($x+$width/2),round($yb-$this->minute->iTitleVertMargin),$txt); - - // Fix a rounding problem the wrong way .. - // If we also have hour scale then don't draw the firsta or last - // gridline since that will be overwritten by the hour scale gridline if such exists. - // However, due to the propagation of rounding of the 'x+=width' term in the loop - // this might sometimes be one pixel of so we fix this by not drawing it. - // The proper way to fix it would be to re-calculate the scale for each step and - // not using the additive term. - if( !(($i == $n || $i==0) && $this->hour->iShowLabels && $this->hour->grid->iShow) ) { - $img->SetColor($this->minute->grid->iColor); - $img->SetLineWeight($this->minute->grid->iWeight); - $img->Line($x,$yt,$x,$yb); - $this->minute->grid->Stroke($img,$x,$yb,$x,$img->height-$img->bottom_margin); - } - } - } - } - $img->SetColor($this->minute->iFrameColor); - $img->SetLineWeight($this->minute->iFrameWeight); - $img->Rectangle($xt,$yt,$xb,$yb); - return $yb - $img->top_margin; - } - return $aYCoord; - } - - // Stroke the day scale (including gridlines) - function StrokeHours($aYCoord,$getHeight=false) { - $img=$this->iImg; - $xt=$img->left_margin+$this->iLabelWidth; - $yt=$aYCoord+$img->top_margin; - if( $this->hour->iShowLabels ) { - $img->SetFont($this->hour->iFFamily,$this->hour->iFStyle,$this->hour->iFSize); - $yb = $yt + $img->GetFontHeight() + - $this->hour->iTitleVertMargin + $this->hour->iFrameWeight; - if( $getHeight ) { - return $yb - $img->top_margin; - } - $xb = $img->width-$img->right_margin+1; - $img->SetColor($this->hour->iBackgroundColor); - $img->FilledRectangle($xt,$yt,$xb,$yb); - - $x = $xt; - $img->SetTextAlign("center"); - $tmp = $this->hour->GetIntervall() ; - $minint = $this->TimeToMinutes($tmp); - if( 1440 % $minint !== 0 ) { - JpGraphError::RaiseL(6020,$tmp); - //('Intervall for hours must divide the day evenly, e.g. 0:30, 1:00, 1:30, 4:00 etc. You have specified an intervall of '.$tmp); - } - - $n = ceil(24*60 / $minint ); - $datestamp = $this->iStartDate; - $day = date('w',$this->iStartDate); - $doback = !$this->minute->iShowLabels; - $width = $this->GetDayWidth() / $n ; - for($j=0; $j < $this->GetNumberOfDays(); ++$j, $day += 1,$day %= 7) { - for($i=0; $i < $n ;++$i, $x+=$width) { - if( $day==6 || $day==0 ) { - - $img->PushColor($this->day->iWeekendBackgroundColor); - if( $this->iUsePlotWeekendBackground && $doback ) - $img->FilledRectangle($x,$yt+$this->day->iFrameWeight,$x+$width,$img->height-$img->bottom_margin); - else - $img->FilledRectangle($x,$yt+$this->day->iFrameWeight,$x+$width,$yb-$this->day->iFrameWeight); - $img->PopColor(); - - } - - if( $day==0 ) - $img->SetColor($this->day->iSundayTextColor); - else - $img->SetColor($this->day->iTextColor); - - switch( $this->hour->iStyle ) { - case HOURSTYLE_HMAMPM: - // 1:35pm - $txt = date('g:ia',$datestamp); - break; - case HOURSTYLE_H24: - // 13 - $txt = date('H',$datestamp); - break; - case HOURSTYLE_HAMPM: - $txt = date('ga',$datestamp); - break; - case HOURSTYLE_CUSTOM: - $txt = date($this->hour->iLabelFormStr,$datestamp); - break; - case HOURSTYLE_HM24: - default: - $txt = date('H:i',$datestamp); - break; - } - $img->StrokeText(round($x+$width/2),round($yb-$this->hour->iTitleVertMargin),$txt); - $img->SetColor($this->hour->grid->iColor); - $img->SetLineWeight($this->hour->grid->iWeight); - $img->Line($x,$yt,$x,$yb); - $this->hour->grid->Stroke($img,$x,$yb,$x,$img->height-$img->bottom_margin); - //$datestamp += $minint*60 - $datestamp = mktime(date('H',$datestamp),date('i',$datestamp)+$minint,0, - date("m",$datestamp),date("d",$datestamp)+1,date("Y",$datestamp)); - - } - } - $img->SetColor($this->hour->iFrameColor); - $img->SetLineWeight($this->hour->iFrameWeight); - $img->Rectangle($xt,$yt,$xb,$yb); - return $yb - $img->top_margin; - } - return $aYCoord; - } - - - // Stroke the day scale (including gridlines) - function StrokeDays($aYCoord,$getHeight=false) { - $img=$this->iImg; - $daywidth=$this->GetDayWidth(); - $xt=$img->left_margin+$this->iLabelWidth; - $yt=$aYCoord+$img->top_margin; - if( $this->day->iShowLabels ) { - $img->SetFont($this->day->iFFamily,$this->day->iFStyle,$this->day->iFSize); - $yb=$yt + $img->GetFontHeight() + $this->day->iTitleVertMargin + $this->day->iFrameWeight; - if( $getHeight ) { - return $yb - $img->top_margin; - } - $xb=$img->width-$img->right_margin+1; - $img->SetColor($this->day->iBackgroundColor); - $img->FilledRectangle($xt,$yt,$xb,$yb); - - $x = $xt; - $img->SetTextAlign("center"); - $day = date('w',$this->iStartDate); - $datestamp = $this->iStartDate; - - $doback = !($this->hour->iShowLabels || $this->minute->iShowLabels); - - setlocale(LC_TIME,$this->iDateLocale->iLocale); - - for($i=0; $i < $this->GetNumberOfDays(); ++$i, $x+=$daywidth, $day += 1,$day %= 7) { - if( $day==6 || $day==0 ) { - $img->SetColor($this->day->iWeekendBackgroundColor); - if( $this->iUsePlotWeekendBackground && $doback) - $img->FilledRectangle($x,$yt+$this->day->iFrameWeight, - $x+$daywidth,$img->height-$img->bottom_margin); - else - $img->FilledRectangle($x,$yt+$this->day->iFrameWeight, - $x+$daywidth,$yb-$this->day->iFrameWeight); - } - - $mn = strftime('%m',$datestamp); - if( $mn[0]=='0' ) - $mn = $mn[1]; - - switch( $this->day->iStyle ) { - case DAYSTYLE_LONG: - // "Monday" - $txt = strftime('%A',$datestamp); - break; - case DAYSTYLE_SHORT: - // "Mon" - $txt = strftime('%a',$datestamp); - break; - case DAYSTYLE_SHORTDAYDATE1: - // "Mon 23/6" - $txt = strftime('%a %d/'.$mn,$datestamp); - break; - case DAYSTYLE_SHORTDAYDATE2: - // "Mon 23 Jun" - $txt = strftime('%a %d %b',$datestamp); - break; - case DAYSTYLE_SHORTDAYDATE3: - // "Mon 23 Jun 2003" - $txt = strftime('%a %d %b %Y',$datestamp); - break; - case DAYSTYLE_LONGDAYDATE1: - // "Monday 23 Jun" - $txt = strftime('%A %d %b',$datestamp); - break; - case DAYSTYLE_LONGDAYDATE2: - // "Monday 23 Jun 2003" - $txt = strftime('%A %d %b %Y',$datestamp); - break; - case DAYSTYLE_SHORTDATE1: - // "23/6" - $txt = strftime('%d/'.$mn,$datestamp); - break; - case DAYSTYLE_SHORTDATE2: - // "23 Jun" - $txt = strftime('%d %b',$datestamp); - break; - case DAYSTYLE_SHORTDATE3: - // "Mon 23" - $txt = strftime('%a %d',$datestamp); - break; - case DAYSTYLE_SHORTDATE4: - // "23" - $txt = strftime('%d',$datestamp); - break; - case DAYSTYLE_CUSTOM: - // Custom format - $txt = strftime($this->day->iLabelFormStr,$datestamp); - break; - case DAYSTYLE_ONELETTER: - default: - // "M" - $txt = strftime('%A',$datestamp); - $txt = strtoupper($txt[0]); - break; - } - - if( $day==0 ) - $img->SetColor($this->day->iSundayTextColor); - else - $img->SetColor($this->day->iTextColor); - $img->StrokeText(round($x+$daywidth/2+1), - round($yb-$this->day->iTitleVertMargin),$txt); - $img->SetColor($this->day->grid->iColor); - $img->SetLineWeight($this->day->grid->iWeight); - $img->Line($x,$yt,$x,$yb); - $this->day->grid->Stroke($img,$x,$yb,$x,$img->height-$img->bottom_margin); - $datestamp = mktime(0,0,0,date("m",$datestamp),date("d",$datestamp)+1,date("Y",$datestamp)); - //$datestamp += SECPERDAY; - - } - $img->SetColor($this->day->iFrameColor); - $img->SetLineWeight($this->day->iFrameWeight); - $img->Rectangle($xt,$yt,$xb,$yb); - return $yb - $img->top_margin; - } - return $aYCoord; - } - - // Stroke week header and grid - function StrokeWeeks($aYCoord,$getHeight=false) { - if( $this->week->iShowLabels ) { - $img=$this->iImg; - $yt=$aYCoord+$img->top_margin; - $img->SetFont($this->week->iFFamily,$this->week->iFStyle,$this->week->iFSize); - $yb=$yt + $img->GetFontHeight() + $this->week->iTitleVertMargin + $this->week->iFrameWeight; - - if( $getHeight ) { - return $yb - $img->top_margin; - } - - $xt=$img->left_margin+$this->iLabelWidth; - $weekwidth=$this->GetDayWidth()*7; - $wdays=$this->iDateLocale->GetDayAbb(); - $xb=$img->width-$img->right_margin+1; - $week = $this->iStartDate; - $weeknbr=$this->GetWeekNbr($week); - $img->SetColor($this->week->iBackgroundColor); - $img->FilledRectangle($xt,$yt,$xb,$yb); - $img->SetColor($this->week->grid->iColor); - $x = $xt; - if( $this->week->iStyle==WEEKSTYLE_WNBR ) { - $img->SetTextAlign("center"); - $txtOffset = $weekwidth/2+1; - } - elseif( $this->week->iStyle==WEEKSTYLE_FIRSTDAY || - $this->week->iStyle==WEEKSTYLE_FIRSTDAY2 || - $this->week->iStyle==WEEKSTYLE_FIRSTDAYWNBR || - $this->week->iStyle==WEEKSTYLE_FIRSTDAY2WNBR ) { - $img->SetTextAlign("left"); - $txtOffset = 3; - } - else { - JpGraphError::RaiseL(6021); - //("Unknown formatting style for week."); - } - - for($i=0; $i<$this->GetNumberOfDays()/7; ++$i, $x+=$weekwidth) { - $img->PushColor($this->week->iTextColor); - - if( $this->week->iStyle==WEEKSTYLE_WNBR ) - $txt = sprintf($this->week->iLabelFormStr,$weeknbr); - elseif( $this->week->iStyle==WEEKSTYLE_FIRSTDAY || - $this->week->iStyle==WEEKSTYLE_FIRSTDAYWNBR ) - $txt = date("j/n",$week); - elseif( $this->week->iStyle==WEEKSTYLE_FIRSTDAY2 || - $this->week->iStyle==WEEKSTYLE_FIRSTDAY2WNBR ) { - $monthnbr = date("n",$week)-1; - $shortmonth = $this->iDateLocale->GetShortMonthName($monthnbr); - $txt = Date("j",$week)." ".$shortmonth; - } - - if( $this->week->iStyle==WEEKSTYLE_FIRSTDAYWNBR || - $this->week->iStyle==WEEKSTYLE_FIRSTDAY2WNBR ) { - $w = sprintf($this->week->iLabelFormStr,$weeknbr); - $txt .= ' '.$w; - } - - $img->StrokeText(round($x+$txtOffset), - round($yb-$this->week->iTitleVertMargin),$txt); - - $week = strtotime('+7 day',$week); - $weeknbr = $this->GetWeekNbr($week); - $img->PopColor(); - $img->SetLineWeight($this->week->grid->iWeight); - $img->Line($x,$yt,$x,$yb); - $this->week->grid->Stroke($img,$x,$yb,$x,$img->height-$img->bottom_margin); - } - $img->SetColor($this->week->iFrameColor); - $img->SetLineWeight($this->week->iFrameWeight); - $img->Rectangle($xt,$yt,$xb,$yb); - return $yb-$img->top_margin; - } - return $aYCoord; - } - - // Format the mont scale header string - function GetMonthLabel($aMonthNbr,$year) { - $sn = $this->iDateLocale->GetShortMonthName($aMonthNbr); - $ln = $this->iDateLocale->GetLongMonthName($aMonthNbr); - switch($this->month->iStyle) { - case MONTHSTYLE_SHORTNAME: - $m=$sn; - break; - case MONTHSTYLE_LONGNAME: - $m=$ln; - break; - case MONTHSTYLE_SHORTNAMEYEAR2: - $m=$sn." '".substr("".$year,2); - break; - case MONTHSTYLE_SHORTNAMEYEAR4: - $m=$sn." ".$year; - break; - case MONTHSTYLE_LONGNAMEYEAR2: - $m=$ln." '".substr("".$year,2); - break; - case MONTHSTYLE_LONGNAMEYEAR4: - $m=$ln." ".$year; - break; - case MONTHSTYLE_FIRSTLETTER: - $m=$sn[0]; - break; - } - return $m; - } - - // Stroke month scale and gridlines - function StrokeMonths($aYCoord,$getHeight=false) { - if( $this->month->iShowLabels ) { - $img=$this->iImg; - $img->SetFont($this->month->iFFamily,$this->month->iFStyle,$this->month->iFSize); - $yt=$aYCoord+$img->top_margin; - $yb=$yt + $img->GetFontHeight() + $this->month->iTitleVertMargin + $this->month->iFrameWeight; - if( $getHeight ) { - return $yb - $img->top_margin; - } - $monthnbr = $this->GetMonthNbr($this->iStartDate)-1; - $xt=$img->left_margin+$this->iLabelWidth; - $xb=$img->width-$img->right_margin+1; - - $img->SetColor($this->month->iBackgroundColor); - $img->FilledRectangle($xt,$yt,$xb,$yb); - - $img->SetLineWeight($this->month->grid->iWeight); - $img->SetColor($this->month->iTextColor); - $year = 0+strftime("%Y",$this->iStartDate); - $img->SetTextAlign("center"); - if( $this->GetMonthNbr($this->iStartDate) == $this->GetMonthNbr($this->iEndDate) - && $this->GetYear($this->iStartDate)==$this->GetYear($this->iEndDate) ) { - $monthwidth=$this->GetDayWidth()*($this->GetMonthDayNbr($this->iEndDate) - $this->GetMonthDayNbr($this->iStartDate) + 1); - } - else { - $monthwidth=$this->GetDayWidth()*($this->GetNumDaysInMonth($monthnbr,$year)-$this->GetMonthDayNbr($this->iStartDate)+1); - } - // Is it enough space to stroke the first month? - $monthName = $this->GetMonthLabel($monthnbr,$year); - if( $monthwidth >= 1.2*$img->GetTextWidth($monthName) ) { - $img->SetColor($this->month->iTextColor); - $img->StrokeText(round($xt+$monthwidth/2+1), - round($yb-$this->month->iTitleVertMargin), - $monthName); - } - $x = $xt + $monthwidth; - while( $x < $xb ) { - $img->SetColor($this->month->grid->iColor); - $img->Line($x,$yt,$x,$yb); - $this->month->grid->Stroke($img,$x,$yb,$x,$img->height-$img->bottom_margin); - $monthnbr++; - if( $monthnbr==12 ) { - $monthnbr=0; - $year++; - } - $monthName = $this->GetMonthLabel($monthnbr,$year); - $monthwidth=$this->GetDayWidth()*$this->GetNumDaysInMonth($monthnbr,$year); - if( $x + $monthwidth < $xb ) - $w = $monthwidth; - else - $w = $xb-$x; - if( $w >= 1.2*$img->GetTextWidth($monthName) ) { - $img->SetColor($this->month->iTextColor); - $img->StrokeText(round($x+$w/2+1), - round($yb-$this->month->iTitleVertMargin),$monthName); - } - $x += $monthwidth; - } - $img->SetColor($this->month->iFrameColor); - $img->SetLineWeight($this->month->iFrameWeight); - $img->Rectangle($xt,$yt,$xb,$yb); - return $yb-$img->top_margin; - } - return $aYCoord; - } - - // Stroke year scale and gridlines - function StrokeYears($aYCoord,$getHeight=false) { - if( $this->year->iShowLabels ) { - $img=$this->iImg; - $yt=$aYCoord+$img->top_margin; - $img->SetFont($this->year->iFFamily,$this->year->iFStyle,$this->year->iFSize); - $yb=$yt + $img->GetFontHeight() + $this->year->iTitleVertMargin + $this->year->iFrameWeight; - - if( $getHeight ) { - return $yb - $img->top_margin; - } - - $xb=$img->width-$img->right_margin+1; - $xt=$img->left_margin+$this->iLabelWidth; - $year = $this->GetYear($this->iStartDate); - $img->SetColor($this->year->iBackgroundColor); - $img->FilledRectangle($xt,$yt,$xb,$yb); - $img->SetLineWeight($this->year->grid->iWeight); - $img->SetTextAlign("center"); - if( $year == $this->GetYear($this->iEndDate) ) - $yearwidth=$this->GetDayWidth()*($this->GetYearDayNbr($this->iEndDate)-$this->GetYearDayNbr($this->iStartDate)+1); - else - $yearwidth=$this->GetDayWidth()*($this->GetNumDaysInYear($year)-$this->GetYearDayNbr($this->iStartDate)+1); - - // The space for a year must be at least 20% bigger than the actual text - // so we allow 10% margin on each side - if( $yearwidth >= 1.20*$img->GetTextWidth("".$year) ) { - $img->SetColor($this->year->iTextColor); - $img->StrokeText(round($xt+$yearwidth/2+1), - round($yb-$this->year->iTitleVertMargin), - $year); - } - $x = $xt + $yearwidth; - while( $x < $xb ) { - $img->SetColor($this->year->grid->iColor); - $img->Line($x,$yt,$x,$yb); - $this->year->grid->Stroke($img,$x,$yb,$x,$img->height-$img->bottom_margin); - $year += 1; - $yearwidth=$this->GetDayWidth()*$this->GetNumDaysInYear($year); - if( $x + $yearwidth < $xb ) - $w = $yearwidth; - else - $w = $xb-$x; - if( $w >= 1.2*$img->GetTextWidth("".$year) ) { - $img->SetColor($this->year->iTextColor); - $img->StrokeText(round($x+$w/2+1), - round($yb-$this->year->iTitleVertMargin), - $year); - } - $x += $yearwidth; - } - $img->SetColor($this->year->iFrameColor); - $img->SetLineWeight($this->year->iFrameWeight); - $img->Rectangle($xt,$yt,$xb,$yb); - return $yb-$img->top_margin; - } - return $aYCoord; - } - - // Stroke table title (upper left corner) - function StrokeTableHeaders($aYBottom) { - $img=$this->iImg; - $xt=$img->left_margin; - $yt=$img->top_margin; - $xb=$xt+$this->iLabelWidth; - $yb=$aYBottom+$img->top_margin; - - if( $this->tableTitle->iShow ) { - $img->SetColor($this->iTableHeaderBackgroundColor); - $img->FilledRectangle($xt,$yt,$xb,$yb); - $this->tableTitle->Align("center","top"); - $this->tableTitle->Stroke($img,$xt+($xb-$xt)/2+1,$yt+2); - $img->SetColor($this->iTableHeaderFrameColor); - $img->SetLineWeight($this->iTableHeaderFrameWeight); - $img->Rectangle($xt,$yt,$xb,$yb); - } - - $this->actinfo->Stroke($img,$xt,$yt,$xb,$yb,$this->tableTitle->iShow); - - - // Draw the horizontal dividing line - $this->dividerh->Stroke($img,$xt,$yb,$img->width-$img->right_margin,$yb); - - // Draw the vertical dividing line - // We do the width "manually" since we want the line only to grow - // to the left - $fancy = $this->divider->iStyle == 'fancy' ; - if( $fancy ) { - $this->divider->iStyle = 'solid'; - } - - $tmp = $this->divider->iWeight; - $this->divider->iWeight=1; - $y = $img->height-$img->bottom_margin; - for($i=0; $i < $tmp; ++$i ) { - $this->divider->Stroke($img,$xb-$i,$yt,$xb-$i,$y); - } - - // Should we draw "fancy" divider - if( $fancy ) { - $img->SetLineWeight(1); - $img->SetColor($this->iTableHeaderFrameColor); - $img->Line($xb,$yt,$xb,$y); - $img->Line($xb-$tmp+1,$yt,$xb-$tmp+1,$y); - $img->SetColor('white'); - $img->Line($xb-$tmp+2,$yt,$xb-$tmp+2,$y); - } - } - - // Main entry point to stroke scale - function Stroke() { - if( !$this->IsRangeSet() ) { - JpGraphError::RaiseL(6022); - //("Gantt scale has not been specified."); - } - $img=$this->iImg; - - // If minutes are displayed then hour interval must be 1 - if( $this->IsDisplayMinute() && $this->hour->GetIntervall() > 1 ) { - JpGraphError::RaiseL(6023); - //('If you display both hour and minutes the hour intervall must be 1 (Otherwise it doesn\' make sense to display minutes).'); - } - - // Stroke all headers. As argument we supply the offset from the - // top which depends on any previous headers - - // First find out the height of each header - $offy=$this->StrokeYears(0,true); - $offm=$this->StrokeMonths($offy,true); - $offw=$this->StrokeWeeks($offm,true); - $offd=$this->StrokeDays($offw,true); - $offh=$this->StrokeHours($offd,true); - $offmin=$this->StrokeMinutes($offh,true); - - - // ... then we can stroke them in the "backwards order to ensure that - // the larger scale gridlines is stroked over the smaller scale gridline - $this->StrokeMinutes($offh); - $this->StrokeHours($offd); - $this->StrokeDays($offw); - $this->StrokeWeeks($offm); - $this->StrokeMonths($offy); - $this->StrokeYears(0); - - // Now when we now the oaverall size of the scale headers - // we can stroke the overall table headers - $this->StrokeTableHeaders($offmin); - - // Now we can calculate the correct scaling factor for each vertical position - $this->iAvailableHeight = $img->height - $img->top_margin - $img->bottom_margin - $offd; - - $this->iVertHeaderSize = $offmin; - if( $this->iVertSpacing == -1 ) - $this->iVertSpacing = $this->iAvailableHeight / $this->iVertLines; - } -} - - -//=================================================== -// CLASS GanttConstraint -// Just a structure to store all the values for a constraint -//=================================================== -class GanttConstraint { - public $iConstrainRow; - public $iConstrainType; - public $iConstrainColor; - public $iConstrainArrowSize; - public $iConstrainArrowType; - - //--------------- - // CONSTRUCTOR - function __construct($aRow,$aType,$aColor,$aArrowSize,$aArrowType){ - $this->iConstrainType = $aType; - $this->iConstrainRow = $aRow; - $this->iConstrainColor=$aColor; - $this->iConstrainArrowSize=$aArrowSize; - $this->iConstrainArrowType=$aArrowType; - } -} - - -//=================================================== -// CLASS GanttPlotObject -// The common signature for a Gantt object -//=================================================== -class GanttPlotObject { - public $title,$caption; - public $csimarea='',$csimtarget='',$csimwintarget='',$csimalt=''; - public $constraints = array(); - public $iCaptionMargin=5; - public $iConstrainPos=array(); - protected $iStart=""; // Start date - public $iVPos=0; // Vertical position - protected $iLabelLeftMargin=2; // Title margin - - function __construct() { - $this->title = new TextProperty(); - $this->title->Align('left','center'); - $this->caption = new TextProperty(); - } - - function GetCSIMArea() { - return $this->csimarea; - } - - function SetCSIMTarget($aTarget,$aAlt='',$aWinTarget='') { - if( !is_string($aTarget) ) { - $tv = substr(var_export($aTarget,true),0,40); - JpGraphError::RaiseL(6024,$tv); - //('CSIM Target must be specified as a string.'."\nStart of target is:\n$tv"); - } - if( !is_string($aAlt) ) { - $tv = substr(var_export($aAlt,true),0,40); - JpGraphError::RaiseL(6025,$tv); - //('CSIM Alt text must be specified as a string.'."\nStart of alt text is:\n$tv"); - } - - $this->csimtarget=$aTarget; - $this->csimwintarget=$aWinTarget; - $this->csimalt=$aAlt; - } - - function SetCSIMAlt($aAlt) { - if( !is_string($aAlt) ) { - $tv = substr(var_export($aAlt,true),0,40); - JpGraphError::RaiseL(6025,$tv); - //('CSIM Alt text must be specified as a string.'."\nStart of alt text is:\n$tv"); - } - $this->csimalt=$aAlt; - } - - function SetConstrain($aRow,$aType,$aColor='black',$aArrowSize=ARROW_S2,$aArrowType=ARROWT_SOLID) { - $this->constraints[] = new GanttConstraint($aRow, $aType, $aColor, $aArrowSize, $aArrowType); - } - - function SetConstrainPos($xt,$yt,$xb,$yb) { - $this->iConstrainPos = array($xt,$yt,$xb,$yb); - } - - function GetMinDate() { - return $this->iStart; - } - - function GetMaxDate() { - return $this->iStart; - } - - function SetCaptionMargin($aMarg) { - $this->iCaptionMargin=$aMarg; - } - - function GetAbsHeight($aImg) { - return 0; - } - - function GetLineNbr() { - return $this->iVPos; - } - - function SetLabelLeftMargin($aOff) { - $this->iLabelLeftMargin=$aOff; - } - - function StrokeActInfo($aImg,$aScale,$aYPos) { - $cols=array(); - $aScale->actinfo->GetColStart($aImg,$cols,true); - $this->title->Stroke($aImg,$cols,$aYPos); - } -} - -//=================================================== -// CLASS Progress -// Holds parameters for the progress indicator -// displyed within a bar -//=================================================== -class Progress { - public $iProgress=-1; - public $iPattern=GANTT_SOLID; - public $iColor="black", $iFillColor='black'; - public $iDensity=98, $iHeight=0.65; - - function Set($aProg) { - if( $aProg < 0.0 || $aProg > 1.0 ) { - JpGraphError::RaiseL(6027); - //("Progress value must in range [0, 1]"); - } - $this->iProgress = $aProg; - } - - function SetPattern($aPattern,$aColor="blue",$aDensity=98) { - $this->iPattern = $aPattern; - $this->iColor = $aColor; - $this->iDensity = $aDensity; - } - - function SetFillColor($aColor) { - $this->iFillColor = $aColor; - } - - function SetHeight($aHeight) { - $this->iHeight = $aHeight; - } -} - -define('GANTT_HGRID1',0); -define('GANTT_HGRID2',1); - -//=================================================== -// CLASS HorizontalGridLine -// Responsible for drawinf horizontal gridlines and filled alternatibg rows -//=================================================== -class HorizontalGridLine { - private $iGraph=NULL; - private $iRowColor1 = '', $iRowColor2 = ''; - private $iShow=false; - private $line=null; - private $iStart=0; // 0=from left margin, 1=just along header - - function __construct() { - $this->line = new LineProperty(); - $this->line->SetColor('gray@0.4'); - $this->line->SetStyle('dashed'); - } - - function Show($aShow=true) { - $this->iShow = $aShow; - } - - function SetRowFillColor($aColor1,$aColor2='') { - $this->iRowColor1 = $aColor1; - $this->iRowColor2 = $aColor2; - } - - function SetStart($aStart) { - $this->iStart = $aStart; - } - - function Stroke($aImg,$aScale) { - - if( ! $this->iShow ) return; - - // Get horizontal width of line - /* - $limst = $aScale->iStartDate; - $limen = $aScale->iEndDate; - $xt = round($aScale->TranslateDate($aScale->iStartDate)); - $xb = round($aScale->TranslateDate($limen)); - */ - - if( $this->iStart === 0 ) { - $xt = $aImg->left_margin-1; - } - else { - $xt = round($aScale->TranslateDate($aScale->iStartDate))+1; - } - - $xb = $aImg->width-$aImg->right_margin; - - $yt = round($aScale->TranslateVertPos(0)); - $yb = round($aScale->TranslateVertPos(1)); - $height = $yb - $yt; - - // Loop around for all lines in the chart - for($i=0; $i < $aScale->iVertLines; ++$i ) { - $yb = $yt - $height; - $this->line->Stroke($aImg,$xt,$yb,$xb,$yb); - if( $this->iRowColor1 !== '' ) { - if( $i % 2 == 0 ) { - $aImg->PushColor($this->iRowColor1); - $aImg->FilledRectangle($xt,$yt,$xb,$yb); - $aImg->PopColor(); - } - elseif( $this->iRowColor2 !== '' ) { - $aImg->PushColor($this->iRowColor2); - $aImg->FilledRectangle($xt,$yt,$xb,$yb); - $aImg->PopColor(); - } - } - $yt = round($aScale->TranslateVertPos($i+1)); - } - $yb = $yt - $height; - $this->line->Stroke($aImg,$xt,$yb,$xb,$yb); - } -} - - -//=================================================== -// CLASS GanttBar -// Responsible for formatting individual gantt bars -//=================================================== -class GanttBar extends GanttPlotObject { - public $progress; - public $leftMark,$rightMark; - private $iEnd; - private $iHeightFactor=0.5; - private $iFillColor="white",$iFrameColor="black"; - private $iShadow=false,$iShadowColor="darkgray",$iShadowWidth=1,$iShadowFrame="black"; - private $iPattern=GANTT_RDIAG,$iPatternColor="blue",$iPatternDensity=95; - private $iBreakStyle=false, $iBreakLineStyle='dotted',$iBreakLineWeight=1; - //--------------- - // CONSTRUCTOR - function __construct($aPos,$aLabel,$aStart,$aEnd,$aCaption="",$aHeightFactor=0.6) { - parent::__construct(); - $this->iStart = $aStart; - // Is the end date given as a date or as number of days added to start date? - if( is_string($aEnd) ) { - // If end date has been specified without a time we will asssume - // end date is at the end of that date - if( strpos($aEnd,':') === false ) { - $this->iEnd = strtotime($aEnd)+SECPERDAY-1; - } - else { - $this->iEnd = $aEnd; - } - } - elseif(is_int($aEnd) || is_float($aEnd) ) { - $this->iEnd = strtotime($aStart)+round($aEnd*SECPERDAY); - } - $this->iVPos = $aPos; - $this->iHeightFactor = $aHeightFactor; - $this->title->Set($aLabel); - $this->caption = new TextProperty($aCaption); - $this->caption->Align("left","center"); - $this->leftMark =new PlotMark(); - $this->leftMark->Hide(); - $this->rightMark=new PlotMark(); - $this->rightMark->Hide(); - $this->progress = new Progress(); - } - - //--------------- - // PUBLIC METHODS - function SetShadow($aShadow=true,$aColor="gray") { - $this->iShadow=$aShadow; - $this->iShadowColor=$aColor; - } - - function SetBreakStyle($aFlg=true,$aLineStyle='dotted',$aLineWeight=1) { - $this->iBreakStyle = $aFlg; - $this->iBreakLineStyle = $aLineStyle; - $this->iBreakLineWeight = $aLineWeight; - } - - function GetMaxDate() { - return $this->iEnd; - } - - function SetHeight($aHeight) { - $this->iHeightFactor = $aHeight; - } - - function SetColor($aColor) { - $this->iFrameColor = $aColor; - } - - function SetFillColor($aColor) { - $this->iFillColor = $aColor; - } - - function GetAbsHeight($aImg) { - if( is_int($this->iHeightFactor) || $this->leftMark->show || $this->rightMark->show ) { - $m=-1; - if( is_int($this->iHeightFactor) ) - $m = $this->iHeightFactor; - if( $this->leftMark->show ) - $m = max($m,$this->leftMark->width*2); - if( $this->rightMark->show ) - $m = max($m,$this->rightMark->width*2); - return $m; - } - else - return -1; - } - - function SetPattern($aPattern,$aColor="blue",$aDensity=95) { - $this->iPattern = $aPattern; - $this->iPatternColor = $aColor; - $this->iPatternDensity = $aDensity; - } - - function Stroke($aImg,$aScale) { - $factory = new RectPatternFactory(); - $prect = $factory->Create($this->iPattern,$this->iPatternColor); - $prect->SetDensity($this->iPatternDensity); - - // If height factor is specified as a float between 0,1 then we take it as meaning - // percetage of the scale width between horizontal line. - // If it is an integer > 1 we take it to mean the absolute height in pixels - if( $this->iHeightFactor > -0.0 && $this->iHeightFactor <= 1.1) - $vs = $aScale->GetVertSpacing()*$this->iHeightFactor; - elseif(is_int($this->iHeightFactor) && $this->iHeightFactor>2 && $this->iHeightFactor < 200 ) - $vs = $this->iHeightFactor; - else { - JpGraphError::RaiseL(6028,$this->iHeightFactor); - // ("Specified height (".$this->iHeightFactor.") for gantt bar is out of range."); - } - - // Clip date to min max dates to show - $st = $aScale->NormalizeDate($this->iStart); - $en = $aScale->NormalizeDate($this->iEnd); - - $limst = max($st,$aScale->iStartDate); - $limen = min($en,$aScale->iEndDate); - - $xt = round($aScale->TranslateDate($limst)); - $xb = round($aScale->TranslateDate($limen)); - $yt = round($aScale->TranslateVertPos($this->iVPos)-$vs-($aScale->GetVertSpacing()/2-$vs/2)); - $yb = round($aScale->TranslateVertPos($this->iVPos)-($aScale->GetVertSpacing()/2-$vs/2)); - $middle = round($yt+($yb-$yt)/2); - $this->StrokeActInfo($aImg,$aScale,$middle); - - // CSIM for title - if( ! empty($this->title->csimtarget) ) { - $colwidth = $this->title->GetColWidth($aImg); - $colstarts=array(); - $aScale->actinfo->GetColStart($aImg,$colstarts,true); - $n = min(count($colwidth),count($this->title->csimtarget)); - for( $i=0; $i < $n; ++$i ) { - $title_xt = $colstarts[$i]; - $title_xb = $title_xt + $colwidth[$i]; - $coords = "$title_xt,$yt,$title_xb,$yt,$title_xb,$yb,$title_xt,$yb"; - - if( ! empty($this->title->csimtarget[$i]) ) { - $this->csimarea .= "title->csimtarget[$i]."\""; - - if( ! empty($this->title->csimwintarget[$i]) ) { - $this->csimarea .= "target=\"".$this->title->csimwintarget[$i]."\" "; - } - - if( ! empty($this->title->csimalt[$i]) ) { - $tmp = $this->title->csimalt[$i]; - $this->csimarea .= " title=\"$tmp\" alt=\"$tmp\" "; - } - $this->csimarea .= " />\n"; - } - } - } - - // Check if the bar is totally outside the current scale range - if( $en < $aScale->iStartDate || $st > $aScale->iEndDate ) - return; - - - // Remember the positions for the bar - $this->SetConstrainPos($xt,$yt,$xb,$yb); - - - - $prect->ShowFrame(false); - $prect->SetBackground($this->iFillColor); - if( $this->iBreakStyle ) { - $aImg->SetColor($this->iFrameColor); - $olds = $aImg->SetLineStyle($this->iBreakLineStyle); - $oldw = $aImg->SetLineWeight($this->iBreakLineWeight); - $aImg->StyleLine($xt,$yt,$xb,$yt); - $aImg->StyleLine($xt,$yb,$xb,$yb); - $aImg->SetLineStyle($olds); - $aImg->SetLineWeight($oldw); - } - else { - if( $this->iShadow ) { - $aImg->SetColor($this->iFrameColor); - $aImg->ShadowRectangle($xt,$yt,$xb,$yb,$this->iFillColor,$this->iShadowWidth,$this->iShadowColor); - $prect->SetPos(new Rectangle($xt+1,$yt+1,$xb-$xt-$this->iShadowWidth-2,$yb-$yt-$this->iShadowWidth-2)); - $prect->Stroke($aImg); - } - else { - $prect->SetPos(new Rectangle($xt,$yt,$xb-$xt+1,$yb-$yt+1)); - $prect->Stroke($aImg); - $aImg->SetColor($this->iFrameColor); - $aImg->Rectangle($xt,$yt,$xb,$yb); - } - } - // CSIM for bar - if( ! empty($this->csimtarget) ) { - - $coords = "$xt,$yt,$xb,$yt,$xb,$yb,$xt,$yb"; - $this->csimarea .= "csimtarget."\""; - - if( !empty($this->csimwintarget) ) { - $this->csimarea .= " target=\"".$this->csimwintarget."\" "; - } - - if( $this->csimalt != '' ) { - $tmp = $this->csimalt; - $this->csimarea .= " title=\"$tmp\" alt=\"$tmp\" "; - } - $this->csimarea .= " />\n"; - } - - // Draw progress bar inside activity bar - if( $this->progress->iProgress > 0 ) { - - $xtp = $aScale->TranslateDate($st); - $xbp = $aScale->TranslateDate($en); - $len = ($xbp-$xtp)*$this->progress->iProgress; - - $endpos = $xtp+$len; - if( $endpos > $xt ) { - - // Take away the length of the progress that is not visible (before the start date) - $len -= ($xt-$xtp); - - // Is the the progress bar visible after the start date? - if( $xtp < $xt ) - $xtp = $xt; - - // Make sure that the progess bar doesn't extend over the end date - if( $xtp+$len-1 > $xb ) - $len = $xb - $xtp ; - - $prog = $factory->Create($this->progress->iPattern,$this->progress->iColor); - $prog->SetDensity($this->progress->iDensity); - $prog->SetBackground($this->progress->iFillColor); - $barheight = ($yb-$yt+1); - if( $this->iShadow ) - $barheight -= $this->iShadowWidth; - $progressheight = floor($barheight*$this->progress->iHeight); - $marg = ceil(($barheight-$progressheight)/2); - $pos = new Rectangle($xtp,$yt + $marg, $len,$barheight-2*$marg); - $prog->SetPos($pos); - $prog->Stroke($aImg); - } - } - - // We don't plot the end mark if the bar has been capped - if( $limst == $st ) { - $y = $middle; - // We treat the RIGHT and LEFT triangle mark a little bi - // special so that these marks are placed right under the - // bar. - if( $this->leftMark->GetType() == MARK_LEFTTRIANGLE ) { - $y = $yb ; - } - $this->leftMark->Stroke($aImg,$xt,$y); - } - if( $limen == $en ) { - $y = $middle; - // We treat the RIGHT and LEFT triangle mark a little bi - // special so that these marks are placed right under the - // bar. - if( $this->rightMark->GetType() == MARK_RIGHTTRIANGLE ) { - $y = $yb ; - } - $this->rightMark->Stroke($aImg,$xb,$y); - - $margin = $this->iCaptionMargin; - if( $this->rightMark->show ) - $margin += $this->rightMark->GetWidth(); - $this->caption->Stroke($aImg,$xb+$margin,$middle); - } - } -} - -//=================================================== -// CLASS MileStone -// Responsible for formatting individual milestones -//=================================================== -class MileStone extends GanttPlotObject { - public $mark; - - //--------------- - // CONSTRUCTOR - function __construct($aVPos,$aLabel,$aDate,$aCaption="") { - GanttPlotObject::__construct(); - $this->caption->Set($aCaption); - $this->caption->Align("left","center"); - $this->caption->SetFont(FF_FONT1,FS_BOLD); - $this->title->Set($aLabel); - $this->title->SetColor("darkred"); - $this->mark = new PlotMark(); - $this->mark->SetWidth(10); - $this->mark->SetType(MARK_DIAMOND); - $this->mark->SetColor("darkred"); - $this->mark->SetFillColor("darkred"); - $this->iVPos = $aVPos; - $this->iStart = $aDate; - } - - //--------------- - // PUBLIC METHODS - - function GetAbsHeight($aImg) { - return max($this->title->GetHeight($aImg),$this->mark->GetWidth()); - } - - function Stroke($aImg,$aScale) { - // Put the mark in the middle at the middle of the day - $d = $aScale->NormalizeDate($this->iStart)+SECPERDAY/2; - $x = $aScale->TranslateDate($d); - $y = $aScale->TranslateVertPos($this->iVPos)-($aScale->GetVertSpacing()/2); - - $this->StrokeActInfo($aImg,$aScale,$y); - - // CSIM for title - if( ! empty($this->title->csimtarget) ) { - - $yt = round($y - $this->title->GetHeight($aImg)/2); - $yb = round($y + $this->title->GetHeight($aImg)/2); - - $colwidth = $this->title->GetColWidth($aImg); - $colstarts=array(); - $aScale->actinfo->GetColStart($aImg,$colstarts,true); - $n = min(count($colwidth),count($this->title->csimtarget)); - for( $i=0; $i < $n; ++$i ) { - $title_xt = $colstarts[$i]; - $title_xb = $title_xt + $colwidth[$i]; - $coords = "$title_xt,$yt,$title_xb,$yt,$title_xb,$yb,$title_xt,$yb"; - - if( !empty($this->title->csimtarget[$i]) ) { - - $this->csimarea .= "title->csimtarget[$i]."\""; - - if( !empty($this->title->csimwintarget[$i]) ) { - $this->csimarea .= "target=\"".$this->title->csimwintarget[$i]."\""; - } - - if( ! empty($this->title->csimalt[$i]) ) { - $tmp = $this->title->csimalt[$i]; - $this->csimarea .= " title=\"$tmp\" alt=\"$tmp\" "; - } - $this->csimarea .= " />\n"; - } - } - } - - if( $d < $aScale->iStartDate || $d > $aScale->iEndDate ) - return; - - // Remember the coordinates for any constrains linking to - // this milestone - $w = $this->mark->GetWidth()/2; - $this->SetConstrainPos($x,round($y-$w),$x,round($y+$w)); - - // Setup CSIM - if( $this->csimtarget != '' ) { - $this->mark->SetCSIMTarget( $this->csimtarget ); - $this->mark->SetCSIMAlt( $this->csimalt ); - } - - $this->mark->Stroke($aImg,$x,$y); - $this->caption->Stroke($aImg,$x+$this->mark->width/2+$this->iCaptionMargin,$y); - - $this->csimarea .= $this->mark->GetCSIMAreas(); - } -} - - -//=================================================== -// CLASS GanttVLine -// Responsible for formatting individual milestones -//=================================================== - -class TextPropertyBelow extends TextProperty { - function __construct($aTxt='') { - parent::__construct($aTxt); - } - - function GetColWidth($aImg,$aMargin=0) { - // Since we are not stroking the title in the columns - // but rather under the graph we want this to return 0. - return array(0); - } -} - -class GanttVLine extends GanttPlotObject { - - private $iLine,$title_margin=3, $iDayOffset=0.5; - private $iStartRow = -1, $iEndRow = -1; - - //--------------- - // CONSTRUCTOR - function __construct($aDate,$aTitle="",$aColor="darkred",$aWeight=2,$aStyle="solid") { - GanttPlotObject::__construct(); - $this->iLine = new LineProperty(); - $this->iLine->SetColor($aColor); - $this->iLine->SetWeight($aWeight); - $this->iLine->SetStyle($aStyle); - $this->iStart = $aDate; - $this->title = new TextPropertyBelow(); - $this->title->Set($aTitle); - } - - //--------------- - // PUBLIC METHODS - - // Set start and end rows for the VLine. By default the entire heigh of the - // Gantt chart is used - function SetRowSpan($aStart, $aEnd=-1) { - $this->iStartRow = $aStart; - $this->iEndRow = $aEnd; - } - - function SetDayOffset($aOff=0.5) { - if( $aOff < 0.0 || $aOff > 1.0 ) { - JpGraphError::RaiseL(6029); - //("Offset for vertical line must be in range [0,1]"); - } - $this->iDayOffset = $aOff; - } - - function SetTitleMargin($aMarg) { - $this->title_margin = $aMarg; - } - - function SetWeight($aWeight) { - $this->iLine->SetWeight($aWeight); - } - - function Stroke($aImg,$aScale) { - $d = $aScale->NormalizeDate($this->iStart); - if( $d < $aScale->iStartDate || $d > $aScale->iEndDate ) - return; - if($this->iDayOffset != 0.0) - $d += 24*60*60*$this->iDayOffset; - $x = $aScale->TranslateDate($d);//d=1006858800, - - if( $this->iStartRow > -1 ) { - $y1 = $aScale->TranslateVertPos($this->iStartRow,true) ; - } - else { - $y1 = $aScale->iVertHeaderSize+$aImg->top_margin; - } - - if( $this->iEndRow > -1 ) { - $y2 = $aScale->TranslateVertPos($this->iEndRow); - } - else { - $y2 = $aImg->height - $aImg->bottom_margin; - } - - $this->iLine->Stroke($aImg,$x,$y1,$x,$y2); - $this->title->Align("center","top"); - $this->title->Stroke($aImg,$x,$y2+$this->title_margin); - } -} - -//=================================================== -// CLASS LinkArrow -// Handles the drawing of a an arrow -//=================================================== -class LinkArrow { - private $ix,$iy; - private $isizespec = array( - array(2,3),array(3,5),array(3,8),array(6,15),array(8,22)); - private $iDirection=ARROW_DOWN,$iType=ARROWT_SOLID,$iSize=ARROW_S2; - private $iColor='black'; - - function __construct($x,$y,$aDirection,$aType=ARROWT_SOLID,$aSize=ARROW_S2) { - $this->iDirection = $aDirection; - $this->iType = $aType; - $this->iSize = $aSize; - $this->ix = $x; - $this->iy = $y; - } - - function SetColor($aColor) { - $this->iColor = $aColor; - } - - function SetSize($aSize) { - $this->iSize = $aSize; - } - - function SetType($aType) { - $this->iType = $aType; - } - - function Stroke($aImg) { - list($dx,$dy) = $this->isizespec[$this->iSize]; - $x = $this->ix; - $y = $this->iy; - switch ( $this->iDirection ) { - case ARROW_DOWN: - $c = array($x,$y,$x-$dx,$y-$dy,$x+$dx,$y-$dy,$x,$y); - break; - case ARROW_UP: - $c = array($x,$y,$x-$dx,$y+$dy,$x+$dx,$y+$dy,$x,$y); - break; - case ARROW_LEFT: - $c = array($x,$y,$x+$dy,$y-$dx,$x+$dy,$y+$dx,$x,$y); - break; - case ARROW_RIGHT: - $c = array($x,$y,$x-$dy,$y-$dx,$x-$dy,$y+$dx,$x,$y); - break; - default: - JpGraphError::RaiseL(6030); - //('Unknown arrow direction for link.'); - die(); - break; - } - $aImg->SetColor($this->iColor); - switch( $this->iType ) { - case ARROWT_SOLID: - $aImg->FilledPolygon($c); - break; - case ARROWT_OPEN: - $aImg->Polygon($c); - break; - default: - JpGraphError::RaiseL(6031); - //('Unknown arrow type for link.'); - die(); - break; - } - } -} - -//=================================================== -// CLASS GanttLink -// Handles the drawing of a link line between 2 points -//=================================================== - -class GanttLink { - private $ix1,$ix2,$iy1,$iy2; - private $iPathType=2,$iPathExtend=15; - private $iColor='black',$iWeight=1; - private $iArrowSize=ARROW_S2,$iArrowType=ARROWT_SOLID; - - function __construct($x1=0,$y1=0,$x2=0,$y2=0) { - $this->ix1 = $x1; - $this->ix2 = $x2; - $this->iy1 = $y1; - $this->iy2 = $y2; - } - - function SetPos($x1,$y1,$x2,$y2) { - $this->ix1 = $x1; - $this->ix2 = $x2; - $this->iy1 = $y1; - $this->iy2 = $y2; - } - - function SetPath($aPath) { - $this->iPathType = $aPath; - } - - function SetColor($aColor) { - $this->iColor = $aColor; - } - - function SetArrow($aSize,$aType=ARROWT_SOLID) { - $this->iArrowSize = $aSize; - $this->iArrowType = $aType; - } - - function SetWeight($aWeight) { - $this->iWeight = $aWeight; - } - - function Stroke($aImg) { - // The way the path for the arrow is constructed is partly based - // on some heuristics. This is not an exact science but draws the - // path in a way that, for me, makes esthetic sence. For example - // if the start and end activities are very close we make a small - // detour to endter the target horixontally. If there are more - // space between axctivities then no suh detour is made and the - // target is "hit" directly vertical. I have tried to keep this - // simple. no doubt this could become almost infinitive complex - // and have some real AI. Feel free to modify this. - // This will no-doubt be tweaked as times go by. One design aim - // is to avoid having the user choose what types of arrow - // he wants. - - // The arrow is drawn between (x1,y1) to (x2,y2) - $x1 = $this->ix1 ; - $x2 = $this->ix2 ; - $y1 = $this->iy1 ; - $y2 = $this->iy2 ; - - // Depending on if the target is below or above we have to - // handle thi different. - if( $y2 > $y1 ) { - $arrowtype = ARROW_DOWN; - $midy = round(($y2-$y1)/2+$y1); - if( $x2 > $x1 ) { - switch ( $this->iPathType ) { - case 0: - $c = array($x1,$y1,$x1,$midy,$x2,$midy,$x2,$y2); - break; - case 1: - case 2: - case 3: - $c = array($x1,$y1,$x2,$y1,$x2,$y2); - break; - default: - JpGraphError::RaiseL(6032,$this->iPathType); - //('Internal error: Unknown path type (='.$this->iPathType .') specified for link.'); - exit(1); - break; - } - } - else { - switch ( $this->iPathType ) { - case 0: - case 1: - $c = array($x1,$y1,$x1,$midy,$x2,$midy,$x2,$y2); - break; - case 2: - // Always extend out horizontally a bit from the first point - // If we draw a link back in time (end to start) and the bars - // are very close we also change the path so it comes in from - // the left on the activity - $c = array($x1,$y1,$x1+$this->iPathExtend,$y1, - $x1+$this->iPathExtend,$midy, - $x2,$midy,$x2,$y2); - break; - case 3: - if( $y2-$midy < 6 ) { - $c = array($x1,$y1,$x1,$midy, - $x2-$this->iPathExtend,$midy, - $x2-$this->iPathExtend,$y2, - $x2,$y2); - $arrowtype = ARROW_RIGHT; - } - else { - $c = array($x1,$y1,$x1,$midy,$x2,$midy,$x2,$y2); - } - break; - default: - JpGraphError::RaiseL(6032,$this->iPathType); - //('Internal error: Unknown path type specified for link.'); - exit(1); - break; - } - } - $arrow = new LinkArrow($x2,$y2,$arrowtype); - } - else { - // Y2 < Y1 - $arrowtype = ARROW_UP; - $midy = round(($y1-$y2)/2+$y2); - if( $x2 > $x1 ) { - switch ( $this->iPathType ) { - case 0: - case 1: - $c = array($x1,$y1,$x1,$midy,$x2,$midy,$x2,$y2); - break; - case 3: - if( $midy-$y2 < 8 ) { - $arrowtype = ARROW_RIGHT; - $c = array($x1,$y1,$x1,$y2,$x2,$y2); - } - else { - $c = array($x1,$y1,$x1,$midy,$x2,$midy,$x2,$y2); - } - break; - default: - JpGraphError::RaiseL(6032,$this->iPathType); - //('Internal error: Unknown path type specified for link.'); - break; - } - } - else { - switch ( $this->iPathType ) { - case 0: - case 1: - $c = array($x1,$y1,$x1,$midy,$x2,$midy,$x2,$y2); - break; - case 2: - // Always extend out horizontally a bit from the first point - $c = array($x1,$y1,$x1+$this->iPathExtend,$y1, - $x1+$this->iPathExtend,$midy, - $x2,$midy,$x2,$y2); - break; - case 3: - if( $midy-$y2 < 16 ) { - $arrowtype = ARROW_RIGHT; - $c = array($x1,$y1,$x1,$midy,$x2-$this->iPathExtend,$midy, - $x2-$this->iPathExtend,$y2, - $x2,$y2); - } - else { - $c = array($x1,$y1,$x1,$midy,$x2,$midy,$x2,$y2); - } - break; - default: - JpGraphError::RaiseL(6032,$this->iPathType); - //('Internal error: Unknown path type specified for link.'); - break; - } - } - $arrow = new LinkArrow($x2,$y2,$arrowtype); - } - $aImg->SetColor($this->iColor); - $aImg->SetLineWeight($this->iWeight); - $aImg->Polygon($c); - $aImg->SetLineWeight(1); - $arrow->SetColor($this->iColor); - $arrow->SetSize($this->iArrowSize); - $arrow->SetType($this->iArrowType); - $arrow->Stroke($aImg); - } -} - -// -?> diff --git a/html/lib/jpgraph/jpgraph_gb2312.php b/html/lib/jpgraph/jpgraph_gb2312.php deleted file mode 100644 index 0f272ac8f0..0000000000 --- a/html/lib/jpgraph/jpgraph_gb2312.php +++ /dev/null @@ -1,1576 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -//======================================================================= -// File: JPGRAPH_GB2312.PHP -// Description: Chinese font conversions -// Created: 2003-05-30 -// Ver: $Id: jpgraph_gb2312.php 1106 2009-02-22 20:16:35Z ljp $ -// -// Copyright (c) Aditus Consulting. All rights reserved. -//======================================================================== - - -class GB2312toUTF8 { - // -------------------------------------------------------------------- - // This code table is used to translate GB2312 code (key) to - // it's corresponding Unicode value (data) - // -------------------------------------------------------------------- - private $codetable = array( - 8481 => 12288, 8482 => 12289, 8483 => 12290, 8484 => 12539, 8485 => 713, - 8486 => 711, 8487 => 168, 8488 => 12291, 8489 => 12293, 8490 => 8213, - 8491 => 65374, 8492 => 8214, 8493 => 8230, 8494 => 8216, 8495 => 8217, - 8496 => 8220, 8497 => 8221, 8498 => 12308, 8499 => 12309, 8500 => 12296, - 8501 => 12297, 8502 => 12298, 8503 => 12299, 8504 => 12300, 8505 => 12301, - 8506 => 12302, 8507 => 12303, 8508 => 12310, 8509 => 12311, 8510 => 12304, - 8511 => 12305, 8512 => 177, 8513 => 215, 8514 => 247, 8515 => 8758, - 8516 => 8743, 8517 => 8744, 8518 => 8721, 8519 => 8719, 8520 => 8746, - 8521 => 8745, 8522 => 8712, 8523 => 8759, 8524 => 8730, 8525 => 8869, - 8526 => 8741, 8527 => 8736, 8528 => 8978, 8529 => 8857, 8530 => 8747, - 8531 => 8750, 8532 => 8801, 8533 => 8780, 8534 => 8776, 8535 => 8765, - 8536 => 8733, 8537 => 8800, 8538 => 8814, 8539 => 8815, 8540 => 8804, - 8541 => 8805, 8542 => 8734, 8543 => 8757, 8544 => 8756, 8545 => 9794, - 8546 => 9792, 8547 => 176, 8548 => 8242, 8549 => 8243, 8550 => 8451, - 8551 => 65284, 8552 => 164, 8553 => 65504, 8554 => 65505, 8555 => 8240, - 8556 => 167, 8557 => 8470, 8558 => 9734, 8559 => 9733, 8560 => 9675, - 8561 => 9679, 8562 => 9678, 8563 => 9671, 8564 => 9670, 8565 => 9633, - 8566 => 9632, 8567 => 9651, 8568 => 9650, 8569 => 8251, 8570 => 8594, - 8571 => 8592, 8572 => 8593, 8573 => 8595, 8574 => 12307, 8753 => 9352, - 8754 => 9353, 8755 => 9354, 8756 => 9355, 8757 => 9356, 8758 => 9357, - 8759 => 9358, 8760 => 9359, 8761 => 9360, 8762 => 9361, 8763 => 9362, - 8764 => 9363, 8765 => 9364, 8766 => 9365, 8767 => 9366, 8768 => 9367, - 8769 => 9368, 8770 => 9369, 8771 => 9370, 8772 => 9371, 8773 => 9332, - 8774 => 9333, 8775 => 9334, 8776 => 9335, 8777 => 9336, 8778 => 9337, - 8779 => 9338, 8780 => 9339, 8781 => 9340, 8782 => 9341, 8783 => 9342, - 8784 => 9343, 8785 => 9344, 8786 => 9345, 8787 => 9346, 8788 => 9347, - 8789 => 9348, 8790 => 9349, 8791 => 9350, 8792 => 9351, 8793 => 9312, - 8794 => 9313, 8795 => 9314, 8796 => 9315, 8797 => 9316, 8798 => 9317, - 8799 => 9318, 8800 => 9319, 8801 => 9320, 8802 => 9321, 8805 => 12832, - 8806 => 12833, 8807 => 12834, 8808 => 12835, 8809 => 12836, 8810 => 12837, - 8811 => 12838, 8812 => 12839, 8813 => 12840, 8814 => 12841, 8817 => 8544, - 8818 => 8545, 8819 => 8546, 8820 => 8547, 8821 => 8548, 8822 => 8549, - 8823 => 8550, 8824 => 8551, 8825 => 8552, 8826 => 8553, 8827 => 8554, - 8828 => 8555, 8993 => 65281, 8994 => 65282, 8995 => 65283, 8996 => 65509, - 8997 => 65285, 8998 => 65286, 8999 => 65287, 9000 => 65288, 9001 => 65289, - 9002 => 65290, 9003 => 65291, 9004 => 65292, 9005 => 65293, 9006 => 65294, - 9007 => 65295, 9008 => 65296, 9009 => 65297, 9010 => 65298, 9011 => 65299, - 9012 => 65300, 9013 => 65301, 9014 => 65302, 9015 => 65303, 9016 => 65304, - 9017 => 65305, 9018 => 65306, 9019 => 65307, 9020 => 65308, 9021 => 65309, - 9022 => 65310, 9023 => 65311, 9024 => 65312, 9025 => 65313, 9026 => 65314, - 9027 => 65315, 9028 => 65316, 9029 => 65317, 9030 => 65318, 9031 => 65319, - 9032 => 65320, 9033 => 65321, 9034 => 65322, 9035 => 65323, 9036 => 65324, - 9037 => 65325, 9038 => 65326, 9039 => 65327, 9040 => 65328, 9041 => 65329, - 9042 => 65330, 9043 => 65331, 9044 => 65332, 9045 => 65333, 9046 => 65334, - 9047 => 65335, 9048 => 65336, 9049 => 65337, 9050 => 65338, 9051 => 65339, - 9052 => 65340, 9053 => 65341, 9054 => 65342, 9055 => 65343, 9056 => 65344, - 9057 => 65345, 9058 => 65346, 9059 => 65347, 9060 => 65348, 9061 => 65349, - 9062 => 65350, 9063 => 65351, 9064 => 65352, 9065 => 65353, 9066 => 65354, - 9067 => 65355, 9068 => 65356, 9069 => 65357, 9070 => 65358, 9071 => 65359, - 9072 => 65360, 9073 => 65361, 9074 => 65362, 9075 => 65363, 9076 => 65364, - 9077 => 65365, 9078 => 65366, 9079 => 65367, 9080 => 65368, 9081 => 65369, - 9082 => 65370, 9083 => 65371, 9084 => 65372, 9085 => 65373, 9086 => 65507, - 9249 => 12353, 9250 => 12354, 9251 => 12355, 9252 => 12356, 9253 => 12357, - 9254 => 12358, 9255 => 12359, 9256 => 12360, 9257 => 12361, 9258 => 12362, - 9259 => 12363, 9260 => 12364, 9261 => 12365, 9262 => 12366, 9263 => 12367, - 9264 => 12368, 9265 => 12369, 9266 => 12370, 9267 => 12371, 9268 => 12372, - 9269 => 12373, 9270 => 12374, 9271 => 12375, 9272 => 12376, 9273 => 12377, - 9274 => 12378, 9275 => 12379, 9276 => 12380, 9277 => 12381, 9278 => 12382, - 9279 => 12383, 9280 => 12384, 9281 => 12385, 9282 => 12386, 9283 => 12387, - 9284 => 12388, 9285 => 12389, 9286 => 12390, 9287 => 12391, 9288 => 12392, - 9289 => 12393, 9290 => 12394, 9291 => 12395, 9292 => 12396, 9293 => 12397, - 9294 => 12398, 9295 => 12399, 9296 => 12400, 9297 => 12401, 9298 => 12402, - 9299 => 12403, 9300 => 12404, 9301 => 12405, 9302 => 12406, 9303 => 12407, - 9304 => 12408, 9305 => 12409, 9306 => 12410, 9307 => 12411, 9308 => 12412, - 9309 => 12413, 9310 => 12414, 9311 => 12415, 9312 => 12416, 9313 => 12417, - 9314 => 12418, 9315 => 12419, 9316 => 12420, 9317 => 12421, 9318 => 12422, - 9319 => 12423, 9320 => 12424, 9321 => 12425, 9322 => 12426, 9323 => 12427, - 9324 => 12428, 9325 => 12429, 9326 => 12430, 9327 => 12431, 9328 => 12432, - 9329 => 12433, 9330 => 12434, 9331 => 12435, 9505 => 12449, 9506 => 12450, - 9507 => 12451, 9508 => 12452, 9509 => 12453, 9510 => 12454, 9511 => 12455, - 9512 => 12456, 9513 => 12457, 9514 => 12458, 9515 => 12459, 9516 => 12460, - 9517 => 12461, 9518 => 12462, 9519 => 12463, 9520 => 12464, 9521 => 12465, - 9522 => 12466, 9523 => 12467, 9524 => 12468, 9525 => 12469, 9526 => 12470, - 9527 => 12471, 9528 => 12472, 9529 => 12473, 9530 => 12474, 9531 => 12475, - 9532 => 12476, 9533 => 12477, 9534 => 12478, 9535 => 12479, 9536 => 12480, - 9537 => 12481, 9538 => 12482, 9539 => 12483, 9540 => 12484, 9541 => 12485, - 9542 => 12486, 9543 => 12487, 9544 => 12488, 9545 => 12489, 9546 => 12490, - 9547 => 12491, 9548 => 12492, 9549 => 12493, 9550 => 12494, 9551 => 12495, - 9552 => 12496, 9553 => 12497, 9554 => 12498, 9555 => 12499, 9556 => 12500, - 9557 => 12501, 9558 => 12502, 9559 => 12503, 9560 => 12504, 9561 => 12505, - 9562 => 12506, 9563 => 12507, 9564 => 12508, 9565 => 12509, 9566 => 12510, - 9567 => 12511, 9568 => 12512, 9569 => 12513, 9570 => 12514, 9571 => 12515, - 9572 => 12516, 9573 => 12517, 9574 => 12518, 9575 => 12519, 9576 => 12520, - 9577 => 12521, 9578 => 12522, 9579 => 12523, 9580 => 12524, 9581 => 12525, - 9582 => 12526, 9583 => 12527, 9584 => 12528, 9585 => 12529, 9586 => 12530, - 9587 => 12531, 9588 => 12532, 9589 => 12533, 9590 => 12534, 9761 => 913, - 9762 => 914, 9763 => 915, 9764 => 916, 9765 => 917, 9766 => 918, - 9767 => 919, 9768 => 920, 9769 => 921, 9770 => 922, 9771 => 923, - 9772 => 924, 9773 => 925, 9774 => 926, 9775 => 927, 9776 => 928, - 9777 => 929, 9778 => 931, 9779 => 932, 9780 => 933, 9781 => 934, - 9782 => 935, 9783 => 936, 9784 => 937, 9793 => 945, 9794 => 946, - 9795 => 947, 9796 => 948, 9797 => 949, 9798 => 950, 9799 => 951, - 9800 => 952, 9801 => 953, 9802 => 954, 9803 => 955, 9804 => 956, - 9805 => 957, 9806 => 958, 9807 => 959, 9808 => 960, 9809 => 961, - 9810 => 963, 9811 => 964, 9812 => 965, 9813 => 966, 9814 => 967, - 9815 => 968, 9816 => 969, 10017 => 1040, 10018 => 1041, 10019 => 1042, - 10020 => 1043, 10021 => 1044, 10022 => 1045, 10023 => 1025, 10024 => 1046, - 10025 => 1047, 10026 => 1048, 10027 => 1049, 10028 => 1050, 10029 => 1051, - 10030 => 1052, 10031 => 1053, 10032 => 1054, 10033 => 1055, 10034 => 1056, - 10035 => 1057, 10036 => 1058, 10037 => 1059, 10038 => 1060, 10039 => 1061, - 10040 => 1062, 10041 => 1063, 10042 => 1064, 10043 => 1065, 10044 => 1066, - 10045 => 1067, 10046 => 1068, 10047 => 1069, 10048 => 1070, 10049 => 1071, - 10065 => 1072, 10066 => 1073, 10067 => 1074, 10068 => 1075, 10069 => 1076, - 10070 => 1077, 10071 => 1105, 10072 => 1078, 10073 => 1079, 10074 => 1080, - 10075 => 1081, 10076 => 1082, 10077 => 1083, 10078 => 1084, 10079 => 1085, - 10080 => 1086, 10081 => 1087, 10082 => 1088, 10083 => 1089, 10084 => 1090, - 10085 => 1091, 10086 => 1092, 10087 => 1093, 10088 => 1094, 10089 => 1095, - 10090 => 1096, 10091 => 1097, 10092 => 1098, 10093 => 1099, 10094 => 1100, - 10095 => 1101, 10096 => 1102, 10097 => 1103, 10273 => 257, 10274 => 225, - 10275 => 462, 10276 => 224, 10277 => 275, 10278 => 233, 10279 => 283, - 10280 => 232, 10281 => 299, 10282 => 237, 10283 => 464, 10284 => 236, - 10285 => 333, 10286 => 243, 10287 => 466, 10288 => 242, 10289 => 363, - 10290 => 250, 10291 => 468, 10292 => 249, 10293 => 470, 10294 => 472, - 10295 => 474, 10296 => 476, 10297 => 252, 10298 => 234, 10309 => 12549, - 10310 => 12550, 10311 => 12551, 10312 => 12552, 10313 => 12553, 10314 => 12554, - 10315 => 12555, 10316 => 12556, 10317 => 12557, 10318 => 12558, 10319 => 12559, - 10320 => 12560, 10321 => 12561, 10322 => 12562, 10323 => 12563, 10324 => 12564, - 10325 => 12565, 10326 => 12566, 10327 => 12567, 10328 => 12568, 10329 => 12569, - 10330 => 12570, 10331 => 12571, 10332 => 12572, 10333 => 12573, 10334 => 12574, - 10335 => 12575, 10336 => 12576, 10337 => 12577, 10338 => 12578, 10339 => 12579, - 10340 => 12580, 10341 => 12581, 10342 => 12582, 10343 => 12583, 10344 => 12584, - 10345 => 12585, 10532 => 9472, 10533 => 9473, 10534 => 9474, 10535 => 9475, - 10536 => 9476, 10537 => 9477, 10538 => 9478, 10539 => 9479, 10540 => 9480, - 10541 => 9481, 10542 => 9482, 10543 => 9483, 10544 => 9484, 10545 => 9485, - 10546 => 9486, 10547 => 9487, 10548 => 9488, 10549 => 9489, 10550 => 9490, - 10551 => 9491, 10552 => 9492, 10553 => 9493, 10554 => 9494, 10555 => 9495, - 10556 => 9496, 10557 => 9497, 10558 => 9498, 10559 => 9499, 10560 => 9500, - 10561 => 9501, 10562 => 9502, 10563 => 9503, 10564 => 9504, 10565 => 9505, - 10566 => 9506, 10567 => 9507, 10568 => 9508, 10569 => 9509, 10570 => 9510, - 10571 => 9511, 10572 => 9512, 10573 => 9513, 10574 => 9514, 10575 => 9515, - 10576 => 9516, 10577 => 9517, 10578 => 9518, 10579 => 9519, 10580 => 9520, - 10581 => 9521, 10582 => 9522, 10583 => 9523, 10584 => 9524, 10585 => 9525, - 10586 => 9526, 10587 => 9527, 10588 => 9528, 10589 => 9529, 10590 => 9530, - 10591 => 9531, 10592 => 9532, 10593 => 9533, 10594 => 9534, 10595 => 9535, - 10596 => 9536, 10597 => 9537, 10598 => 9538, 10599 => 9539, 10600 => 9540, - 10601 => 9541, 10602 => 9542, 10603 => 9543, 10604 => 9544, 10605 => 9545, - 10606 => 9546, 10607 => 9547, 12321 => 21834, 12322 => 38463, 12323 => 22467, - 12324 => 25384, 12325 => 21710, 12326 => 21769, 12327 => 21696, 12328 => 30353, - 12329 => 30284, 12330 => 34108, 12331 => 30702, 12332 => 33406, 12333 => 30861, - 12334 => 29233, 12335 => 38552, 12336 => 38797, 12337 => 27688, 12338 => 23433, - 12339 => 20474, 12340 => 25353, 12341 => 26263, 12342 => 23736, 12343 => 33018, - 12344 => 26696, 12345 => 32942, 12346 => 26114, 12347 => 30414, 12348 => 20985, - 12349 => 25942, 12350 => 29100, 12351 => 32753, 12352 => 34948, 12353 => 20658, - 12354 => 22885, 12355 => 25034, 12356 => 28595, 12357 => 33453, 12358 => 25420, - 12359 => 25170, 12360 => 21485, 12361 => 21543, 12362 => 31494, 12363 => 20843, - 12364 => 30116, 12365 => 24052, 12366 => 25300, 12367 => 36299, 12368 => 38774, - 12369 => 25226, 12370 => 32793, 12371 => 22365, 12372 => 38712, 12373 => 32610, - 12374 => 29240, 12375 => 30333, 12376 => 26575, 12377 => 30334, 12378 => 25670, - 12379 => 20336, 12380 => 36133, 12381 => 25308, 12382 => 31255, 12383 => 26001, - 12384 => 29677, 12385 => 25644, 12386 => 25203, 12387 => 33324, 12388 => 39041, - 12389 => 26495, 12390 => 29256, 12391 => 25198, 12392 => 25292, 12393 => 20276, - 12394 => 29923, 12395 => 21322, 12396 => 21150, 12397 => 32458, 12398 => 37030, - 12399 => 24110, 12400 => 26758, 12401 => 27036, 12402 => 33152, 12403 => 32465, - 12404 => 26834, 12405 => 30917, 12406 => 34444, 12407 => 38225, 12408 => 20621, - 12409 => 35876, 12410 => 33502, 12411 => 32990, 12412 => 21253, 12413 => 35090, - 12414 => 21093, 12577 => 34180, 12578 => 38649, 12579 => 20445, 12580 => 22561, - 12581 => 39281, 12582 => 23453, 12583 => 25265, 12584 => 25253, 12585 => 26292, - 12586 => 35961, 12587 => 40077, 12588 => 29190, 12589 => 26479, 12590 => 30865, - 12591 => 24754, 12592 => 21329, 12593 => 21271, 12594 => 36744, 12595 => 32972, - 12596 => 36125, 12597 => 38049, 12598 => 20493, 12599 => 29384, 12600 => 22791, - 12601 => 24811, 12602 => 28953, 12603 => 34987, 12604 => 22868, 12605 => 33519, - 12606 => 26412, 12607 => 31528, 12608 => 23849, 12609 => 32503, 12610 => 29997, - 12611 => 27893, 12612 => 36454, 12613 => 36856, 12614 => 36924, 12615 => 40763, - 12616 => 27604, 12617 => 37145, 12618 => 31508, 12619 => 24444, 12620 => 30887, - 12621 => 34006, 12622 => 34109, 12623 => 27605, 12624 => 27609, 12625 => 27606, - 12626 => 24065, 12627 => 24199, 12628 => 30201, 12629 => 38381, 12630 => 25949, - 12631 => 24330, 12632 => 24517, 12633 => 36767, 12634 => 22721, 12635 => 33218, - 12636 => 36991, 12637 => 38491, 12638 => 38829, 12639 => 36793, 12640 => 32534, - 12641 => 36140, 12642 => 25153, 12643 => 20415, 12644 => 21464, 12645 => 21342, - 12646 => 36776, 12647 => 36777, 12648 => 36779, 12649 => 36941, 12650 => 26631, - 12651 => 24426, 12652 => 33176, 12653 => 34920, 12654 => 40150, 12655 => 24971, - 12656 => 21035, 12657 => 30250, 12658 => 24428, 12659 => 25996, 12660 => 28626, - 12661 => 28392, 12662 => 23486, 12663 => 25672, 12664 => 20853, 12665 => 20912, - 12666 => 26564, 12667 => 19993, 12668 => 31177, 12669 => 39292, 12670 => 28851, - 12833 => 30149, 12834 => 24182, 12835 => 29627, 12836 => 33760, 12837 => 25773, - 12838 => 25320, 12839 => 38069, 12840 => 27874, 12841 => 21338, 12842 => 21187, - 12843 => 25615, 12844 => 38082, 12845 => 31636, 12846 => 20271, 12847 => 24091, - 12848 => 33334, 12849 => 33046, 12850 => 33162, 12851 => 28196, 12852 => 27850, - 12853 => 39539, 12854 => 25429, 12855 => 21340, 12856 => 21754, 12857 => 34917, - 12858 => 22496, 12859 => 19981, 12860 => 24067, 12861 => 27493, 12862 => 31807, - 12863 => 37096, 12864 => 24598, 12865 => 25830, 12866 => 29468, 12867 => 35009, - 12868 => 26448, 12869 => 25165, 12870 => 36130, 12871 => 30572, 12872 => 36393, - 12873 => 37319, 12874 => 24425, 12875 => 33756, 12876 => 34081, 12877 => 39184, - 12878 => 21442, 12879 => 34453, 12880 => 27531, 12881 => 24813, 12882 => 24808, - 12883 => 28799, 12884 => 33485, 12885 => 33329, 12886 => 20179, 12887 => 27815, - 12888 => 34255, 12889 => 25805, 12890 => 31961, 12891 => 27133, 12892 => 26361, - 12893 => 33609, 12894 => 21397, 12895 => 31574, 12896 => 20391, 12897 => 20876, - 12898 => 27979, 12899 => 23618, 12900 => 36461, 12901 => 25554, 12902 => 21449, - 12903 => 33580, 12904 => 33590, 12905 => 26597, 12906 => 30900, 12907 => 25661, - 12908 => 23519, 12909 => 23700, 12910 => 24046, 12911 => 35815, 12912 => 25286, - 12913 => 26612, 12914 => 35962, 12915 => 25600, 12916 => 25530, 12917 => 34633, - 12918 => 39307, 12919 => 35863, 12920 => 32544, 12921 => 38130, 12922 => 20135, - 12923 => 38416, 12924 => 39076, 12925 => 26124, 12926 => 29462, 13089 => 22330, - 13090 => 23581, 13091 => 24120, 13092 => 38271, 13093 => 20607, 13094 => 32928, - 13095 => 21378, 13096 => 25950, 13097 => 30021, 13098 => 21809, 13099 => 20513, - 13100 => 36229, 13101 => 25220, 13102 => 38046, 13103 => 26397, 13104 => 22066, - 13105 => 28526, 13106 => 24034, 13107 => 21557, 13108 => 28818, 13109 => 36710, - 13110 => 25199, 13111 => 25764, 13112 => 25507, 13113 => 24443, 13114 => 28552, - 13115 => 37108, 13116 => 33251, 13117 => 36784, 13118 => 23576, 13119 => 26216, - 13120 => 24561, 13121 => 27785, 13122 => 38472, 13123 => 36225, 13124 => 34924, - 13125 => 25745, 13126 => 31216, 13127 => 22478, 13128 => 27225, 13129 => 25104, - 13130 => 21576, 13131 => 20056, 13132 => 31243, 13133 => 24809, 13134 => 28548, - 13135 => 35802, 13136 => 25215, 13137 => 36894, 13138 => 39563, 13139 => 31204, - 13140 => 21507, 13141 => 30196, 13142 => 25345, 13143 => 21273, 13144 => 27744, - 13145 => 36831, 13146 => 24347, 13147 => 39536, 13148 => 32827, 13149 => 40831, - 13150 => 20360, 13151 => 23610, 13152 => 36196, 13153 => 32709, 13154 => 26021, - 13155 => 28861, 13156 => 20805, 13157 => 20914, 13158 => 34411, 13159 => 23815, - 13160 => 23456, 13161 => 25277, 13162 => 37228, 13163 => 30068, 13164 => 36364, - 13165 => 31264, 13166 => 24833, 13167 => 31609, 13168 => 20167, 13169 => 32504, - 13170 => 30597, 13171 => 19985, 13172 => 33261, 13173 => 21021, 13174 => 20986, - 13175 => 27249, 13176 => 21416, 13177 => 36487, 13178 => 38148, 13179 => 38607, - 13180 => 28353, 13181 => 38500, 13182 => 26970, 13345 => 30784, 13346 => 20648, - 13347 => 30679, 13348 => 25616, 13349 => 35302, 13350 => 22788, 13351 => 25571, - 13352 => 24029, 13353 => 31359, 13354 => 26941, 13355 => 20256, 13356 => 33337, - 13357 => 21912, 13358 => 20018, 13359 => 30126, 13360 => 31383, 13361 => 24162, - 13362 => 24202, 13363 => 38383, 13364 => 21019, 13365 => 21561, 13366 => 28810, - 13367 => 25462, 13368 => 38180, 13369 => 22402, 13370 => 26149, 13371 => 26943, - 13372 => 37255, 13373 => 21767, 13374 => 28147, 13375 => 32431, 13376 => 34850, - 13377 => 25139, 13378 => 32496, 13379 => 30133, 13380 => 33576, 13381 => 30913, - 13382 => 38604, 13383 => 36766, 13384 => 24904, 13385 => 29943, 13386 => 35789, - 13387 => 27492, 13388 => 21050, 13389 => 36176, 13390 => 27425, 13391 => 32874, - 13392 => 33905, 13393 => 22257, 13394 => 21254, 13395 => 20174, 13396 => 19995, - 13397 => 20945, 13398 => 31895, 13399 => 37259, 13400 => 31751, 13401 => 20419, - 13402 => 36479, 13403 => 31713, 13404 => 31388, 13405 => 25703, 13406 => 23828, - 13407 => 20652, 13408 => 33030, 13409 => 30209, 13410 => 31929, 13411 => 28140, - 13412 => 32736, 13413 => 26449, 13414 => 23384, 13415 => 23544, 13416 => 30923, - 13417 => 25774, 13418 => 25619, 13419 => 25514, 13420 => 25387, 13421 => 38169, - 13422 => 25645, 13423 => 36798, 13424 => 31572, 13425 => 30249, 13426 => 25171, - 13427 => 22823, 13428 => 21574, 13429 => 27513, 13430 => 20643, 13431 => 25140, - 13432 => 24102, 13433 => 27526, 13434 => 20195, 13435 => 36151, 13436 => 34955, - 13437 => 24453, 13438 => 36910, 13601 => 24608, 13602 => 32829, 13603 => 25285, - 13604 => 20025, 13605 => 21333, 13606 => 37112, 13607 => 25528, 13608 => 32966, - 13609 => 26086, 13610 => 27694, 13611 => 20294, 13612 => 24814, 13613 => 28129, - 13614 => 35806, 13615 => 24377, 13616 => 34507, 13617 => 24403, 13618 => 25377, - 13619 => 20826, 13620 => 33633, 13621 => 26723, 13622 => 20992, 13623 => 25443, - 13624 => 36424, 13625 => 20498, 13626 => 23707, 13627 => 31095, 13628 => 23548, - 13629 => 21040, 13630 => 31291, 13631 => 24764, 13632 => 36947, 13633 => 30423, - 13634 => 24503, 13635 => 24471, 13636 => 30340, 13637 => 36460, 13638 => 28783, - 13639 => 30331, 13640 => 31561, 13641 => 30634, 13642 => 20979, 13643 => 37011, - 13644 => 22564, 13645 => 20302, 13646 => 28404, 13647 => 36842, 13648 => 25932, - 13649 => 31515, 13650 => 29380, 13651 => 28068, 13652 => 32735, 13653 => 23265, - 13654 => 25269, 13655 => 24213, 13656 => 22320, 13657 => 33922, 13658 => 31532, - 13659 => 24093, 13660 => 24351, 13661 => 36882, 13662 => 32532, 13663 => 39072, - 13664 => 25474, 13665 => 28359, 13666 => 30872, 13667 => 28857, 13668 => 20856, - 13669 => 38747, 13670 => 22443, 13671 => 30005, 13672 => 20291, 13673 => 30008, - 13674 => 24215, 13675 => 24806, 13676 => 22880, 13677 => 28096, 13678 => 27583, - 13679 => 30857, 13680 => 21500, 13681 => 38613, 13682 => 20939, 13683 => 20993, - 13684 => 25481, 13685 => 21514, 13686 => 38035, 13687 => 35843, 13688 => 36300, - 13689 => 29241, 13690 => 30879, 13691 => 34678, 13692 => 36845, 13693 => 35853, - 13694 => 21472, 13857 => 19969, 13858 => 30447, 13859 => 21486, 13860 => 38025, - 13861 => 39030, 13862 => 40718, 13863 => 38189, 13864 => 23450, 13865 => 35746, - 13866 => 20002, 13867 => 19996, 13868 => 20908, 13869 => 33891, 13870 => 25026, - 13871 => 21160, 13872 => 26635, 13873 => 20375, 13874 => 24683, 13875 => 20923, - 13876 => 27934, 13877 => 20828, 13878 => 25238, 13879 => 26007, 13880 => 38497, - 13881 => 35910, 13882 => 36887, 13883 => 30168, 13884 => 37117, 13885 => 30563, - 13886 => 27602, 13887 => 29322, 13888 => 29420, 13889 => 35835, 13890 => 22581, - 13891 => 30585, 13892 => 36172, 13893 => 26460, 13894 => 38208, 13895 => 32922, - 13896 => 24230, 13897 => 28193, 13898 => 22930, 13899 => 31471, 13900 => 30701, - 13901 => 38203, 13902 => 27573, 13903 => 26029, 13904 => 32526, 13905 => 22534, - 13906 => 20817, 13907 => 38431, 13908 => 23545, 13909 => 22697, 13910 => 21544, - 13911 => 36466, 13912 => 25958, 13913 => 39039, 13914 => 22244, 13915 => 38045, - 13916 => 30462, 13917 => 36929, 13918 => 25479, 13919 => 21702, 13920 => 22810, - 13921 => 22842, 13922 => 22427, 13923 => 36530, 13924 => 26421, 13925 => 36346, - 13926 => 33333, 13927 => 21057, 13928 => 24816, 13929 => 22549, 13930 => 34558, - 13931 => 23784, 13932 => 40517, 13933 => 20420, 13934 => 39069, 13935 => 35769, - 13936 => 23077, 13937 => 24694, 13938 => 21380, 13939 => 25212, 13940 => 36943, - 13941 => 37122, 13942 => 39295, 13943 => 24681, 13944 => 32780, 13945 => 20799, - 13946 => 32819, 13947 => 23572, 13948 => 39285, 13949 => 27953, 13950 => 20108, - 14113 => 36144, 14114 => 21457, 14115 => 32602, 14116 => 31567, 14117 => 20240, - 14118 => 20047, 14119 => 38400, 14120 => 27861, 14121 => 29648, 14122 => 34281, - 14123 => 24070, 14124 => 30058, 14125 => 32763, 14126 => 27146, 14127 => 30718, - 14128 => 38034, 14129 => 32321, 14130 => 20961, 14131 => 28902, 14132 => 21453, - 14133 => 36820, 14134 => 33539, 14135 => 36137, 14136 => 29359, 14137 => 39277, - 14138 => 27867, 14139 => 22346, 14140 => 33459, 14141 => 26041, 14142 => 32938, - 14143 => 25151, 14144 => 38450, 14145 => 22952, 14146 => 20223, 14147 => 35775, - 14148 => 32442, 14149 => 25918, 14150 => 33778, 14151 => 38750, 14152 => 21857, - 14153 => 39134, 14154 => 32933, 14155 => 21290, 14156 => 35837, 14157 => 21536, - 14158 => 32954, 14159 => 24223, 14160 => 27832, 14161 => 36153, 14162 => 33452, - 14163 => 37210, 14164 => 21545, 14165 => 27675, 14166 => 20998, 14167 => 32439, - 14168 => 22367, 14169 => 28954, 14170 => 27774, 14171 => 31881, 14172 => 22859, - 14173 => 20221, 14174 => 24575, 14175 => 24868, 14176 => 31914, 14177 => 20016, - 14178 => 23553, 14179 => 26539, 14180 => 34562, 14181 => 23792, 14182 => 38155, - 14183 => 39118, 14184 => 30127, 14185 => 28925, 14186 => 36898, 14187 => 20911, - 14188 => 32541, 14189 => 35773, 14190 => 22857, 14191 => 20964, 14192 => 20315, - 14193 => 21542, 14194 => 22827, 14195 => 25975, 14196 => 32932, 14197 => 23413, - 14198 => 25206, 14199 => 25282, 14200 => 36752, 14201 => 24133, 14202 => 27679, - 14203 => 31526, 14204 => 20239, 14205 => 20440, 14206 => 26381, 14369 => 28014, - 14370 => 28074, 14371 => 31119, 14372 => 34993, 14373 => 24343, 14374 => 29995, - 14375 => 25242, 14376 => 36741, 14377 => 20463, 14378 => 37340, 14379 => 26023, - 14380 => 33071, 14381 => 33105, 14382 => 24220, 14383 => 33104, 14384 => 36212, - 14385 => 21103, 14386 => 35206, 14387 => 36171, 14388 => 22797, 14389 => 20613, - 14390 => 20184, 14391 => 38428, 14392 => 29238, 14393 => 33145, 14394 => 36127, - 14395 => 23500, 14396 => 35747, 14397 => 38468, 14398 => 22919, 14399 => 32538, - 14400 => 21648, 14401 => 22134, 14402 => 22030, 14403 => 35813, 14404 => 25913, - 14405 => 27010, 14406 => 38041, 14407 => 30422, 14408 => 28297, 14409 => 24178, - 14410 => 29976, 14411 => 26438, 14412 => 26577, 14413 => 31487, 14414 => 32925, - 14415 => 36214, 14416 => 24863, 14417 => 31174, 14418 => 25954, 14419 => 36195, - 14420 => 20872, 14421 => 21018, 14422 => 38050, 14423 => 32568, 14424 => 32923, - 14425 => 32434, 14426 => 23703, 14427 => 28207, 14428 => 26464, 14429 => 31705, - 14430 => 30347, 14431 => 39640, 14432 => 33167, 14433 => 32660, 14434 => 31957, - 14435 => 25630, 14436 => 38224, 14437 => 31295, 14438 => 21578, 14439 => 21733, - 14440 => 27468, 14441 => 25601, 14442 => 25096, 14443 => 40509, 14444 => 33011, - 14445 => 30105, 14446 => 21106, 14447 => 38761, 14448 => 33883, 14449 => 26684, - 14450 => 34532, 14451 => 38401, 14452 => 38548, 14453 => 38124, 14454 => 20010, - 14455 => 21508, 14456 => 32473, 14457 => 26681, 14458 => 36319, 14459 => 32789, - 14460 => 26356, 14461 => 24218, 14462 => 32697, 14625 => 22466, 14626 => 32831, - 14627 => 26775, 14628 => 24037, 14629 => 25915, 14630 => 21151, 14631 => 24685, - 14632 => 40858, 14633 => 20379, 14634 => 36524, 14635 => 20844, 14636 => 23467, - 14637 => 24339, 14638 => 24041, 14639 => 27742, 14640 => 25329, 14641 => 36129, - 14642 => 20849, 14643 => 38057, 14644 => 21246, 14645 => 27807, 14646 => 33503, - 14647 => 29399, 14648 => 22434, 14649 => 26500, 14650 => 36141, 14651 => 22815, - 14652 => 36764, 14653 => 33735, 14654 => 21653, 14655 => 31629, 14656 => 20272, - 14657 => 27837, 14658 => 23396, 14659 => 22993, 14660 => 40723, 14661 => 21476, - 14662 => 34506, 14663 => 39592, 14664 => 35895, 14665 => 32929, 14666 => 25925, - 14667 => 39038, 14668 => 22266, 14669 => 38599, 14670 => 21038, 14671 => 29916, - 14672 => 21072, 14673 => 23521, 14674 => 25346, 14675 => 35074, 14676 => 20054, - 14677 => 25296, 14678 => 24618, 14679 => 26874, 14680 => 20851, 14681 => 23448, - 14682 => 20896, 14683 => 35266, 14684 => 31649, 14685 => 39302, 14686 => 32592, - 14687 => 24815, 14688 => 28748, 14689 => 36143, 14690 => 20809, 14691 => 24191, - 14692 => 36891, 14693 => 29808, 14694 => 35268, 14695 => 22317, 14696 => 30789, - 14697 => 24402, 14698 => 40863, 14699 => 38394, 14700 => 36712, 14701 => 39740, - 14702 => 35809, 14703 => 30328, 14704 => 26690, 14705 => 26588, 14706 => 36330, - 14707 => 36149, 14708 => 21053, 14709 => 36746, 14710 => 28378, 14711 => 26829, - 14712 => 38149, 14713 => 37101, 14714 => 22269, 14715 => 26524, 14716 => 35065, - 14717 => 36807, 14718 => 21704, 14881 => 39608, 14882 => 23401, 14883 => 28023, - 14884 => 27686, 14885 => 20133, 14886 => 23475, 14887 => 39559, 14888 => 37219, - 14889 => 25000, 14890 => 37039, 14891 => 38889, 14892 => 21547, 14893 => 28085, - 14894 => 23506, 14895 => 20989, 14896 => 21898, 14897 => 32597, 14898 => 32752, - 14899 => 25788, 14900 => 25421, 14901 => 26097, 14902 => 25022, 14903 => 24717, - 14904 => 28938, 14905 => 27735, 14906 => 27721, 14907 => 22831, 14908 => 26477, - 14909 => 33322, 14910 => 22741, 14911 => 22158, 14912 => 35946, 14913 => 27627, - 14914 => 37085, 14915 => 22909, 14916 => 32791, 14917 => 21495, 14918 => 28009, - 14919 => 21621, 14920 => 21917, 14921 => 33655, 14922 => 33743, 14923 => 26680, - 14924 => 31166, 14925 => 21644, 14926 => 20309, 14927 => 21512, 14928 => 30418, - 14929 => 35977, 14930 => 38402, 14931 => 27827, 14932 => 28088, 14933 => 36203, - 14934 => 35088, 14935 => 40548, 14936 => 36154, 14937 => 22079, 14938 => 40657, - 14939 => 30165, 14940 => 24456, 14941 => 29408, 14942 => 24680, 14943 => 21756, - 14944 => 20136, 14945 => 27178, 14946 => 34913, 14947 => 24658, 14948 => 36720, - 14949 => 21700, 14950 => 28888, 14951 => 34425, 14952 => 40511, 14953 => 27946, - 14954 => 23439, 14955 => 24344, 14956 => 32418, 14957 => 21897, 14958 => 20399, - 14959 => 29492, 14960 => 21564, 14961 => 21402, 14962 => 20505, 14963 => 21518, - 14964 => 21628, 14965 => 20046, 14966 => 24573, 14967 => 29786, 14968 => 22774, - 14969 => 33899, 14970 => 32993, 14971 => 34676, 14972 => 29392, 14973 => 31946, - 14974 => 28246, 15137 => 24359, 15138 => 34382, 15139 => 21804, 15140 => 25252, - 15141 => 20114, 15142 => 27818, 15143 => 25143, 15144 => 33457, 15145 => 21719, - 15146 => 21326, 15147 => 29502, 15148 => 28369, 15149 => 30011, 15150 => 21010, - 15151 => 21270, 15152 => 35805, 15153 => 27088, 15154 => 24458, 15155 => 24576, - 15156 => 28142, 15157 => 22351, 15158 => 27426, 15159 => 29615, 15160 => 26707, - 15161 => 36824, 15162 => 32531, 15163 => 25442, 15164 => 24739, 15165 => 21796, - 15166 => 30186, 15167 => 35938, 15168 => 28949, 15169 => 28067, 15170 => 23462, - 15171 => 24187, 15172 => 33618, 15173 => 24908, 15174 => 40644, 15175 => 30970, - 15176 => 34647, 15177 => 31783, 15178 => 30343, 15179 => 20976, 15180 => 24822, - 15181 => 29004, 15182 => 26179, 15183 => 24140, 15184 => 24653, 15185 => 35854, - 15186 => 28784, 15187 => 25381, 15188 => 36745, 15189 => 24509, 15190 => 24674, - 15191 => 34516, 15192 => 22238, 15193 => 27585, 15194 => 24724, 15195 => 24935, - 15196 => 21321, 15197 => 24800, 15198 => 26214, 15199 => 36159, 15200 => 31229, - 15201 => 20250, 15202 => 28905, 15203 => 27719, 15204 => 35763, 15205 => 35826, - 15206 => 32472, 15207 => 33636, 15208 => 26127, 15209 => 23130, 15210 => 39746, - 15211 => 27985, 15212 => 28151, 15213 => 35905, 15214 => 27963, 15215 => 20249, - 15216 => 28779, 15217 => 33719, 15218 => 25110, 15219 => 24785, 15220 => 38669, - 15221 => 36135, 15222 => 31096, 15223 => 20987, 15224 => 22334, 15225 => 22522, - 15226 => 26426, 15227 => 30072, 15228 => 31293, 15229 => 31215, 15230 => 31637, - 15393 => 32908, 15394 => 39269, 15395 => 36857, 15396 => 28608, 15397 => 35749, - 15398 => 40481, 15399 => 23020, 15400 => 32489, 15401 => 32521, 15402 => 21513, - 15403 => 26497, 15404 => 26840, 15405 => 36753, 15406 => 31821, 15407 => 38598, - 15408 => 21450, 15409 => 24613, 15410 => 30142, 15411 => 27762, 15412 => 21363, - 15413 => 23241, 15414 => 32423, 15415 => 25380, 15416 => 20960, 15417 => 33034, - 15418 => 24049, 15419 => 34015, 15420 => 25216, 15421 => 20864, 15422 => 23395, - 15423 => 20238, 15424 => 31085, 15425 => 21058, 15426 => 24760, 15427 => 27982, - 15428 => 23492, 15429 => 23490, 15430 => 35745, 15431 => 35760, 15432 => 26082, - 15433 => 24524, 15434 => 38469, 15435 => 22931, 15436 => 32487, 15437 => 32426, - 15438 => 22025, 15439 => 26551, 15440 => 22841, 15441 => 20339, 15442 => 23478, - 15443 => 21152, 15444 => 33626, 15445 => 39050, 15446 => 36158, 15447 => 30002, - 15448 => 38078, 15449 => 20551, 15450 => 31292, 15451 => 20215, 15452 => 26550, - 15453 => 39550, 15454 => 23233, 15455 => 27516, 15456 => 30417, 15457 => 22362, - 15458 => 23574, 15459 => 31546, 15460 => 38388, 15461 => 29006, 15462 => 20860, - 15463 => 32937, 15464 => 33392, 15465 => 22904, 15466 => 32516, 15467 => 33575, - 15468 => 26816, 15469 => 26604, 15470 => 30897, 15471 => 30839, 15472 => 25315, - 15473 => 25441, 15474 => 31616, 15475 => 20461, 15476 => 21098, 15477 => 20943, - 15478 => 33616, 15479 => 27099, 15480 => 37492, 15481 => 36341, 15482 => 36145, - 15483 => 35265, 15484 => 38190, 15485 => 31661, 15486 => 20214, 15649 => 20581, - 15650 => 33328, 15651 => 21073, 15652 => 39279, 15653 => 28176, 15654 => 28293, - 15655 => 28071, 15656 => 24314, 15657 => 20725, 15658 => 23004, 15659 => 23558, - 15660 => 27974, 15661 => 27743, 15662 => 30086, 15663 => 33931, 15664 => 26728, - 15665 => 22870, 15666 => 35762, 15667 => 21280, 15668 => 37233, 15669 => 38477, - 15670 => 34121, 15671 => 26898, 15672 => 30977, 15673 => 28966, 15674 => 33014, - 15675 => 20132, 15676 => 37066, 15677 => 27975, 15678 => 39556, 15679 => 23047, - 15680 => 22204, 15681 => 25605, 15682 => 38128, 15683 => 30699, 15684 => 20389, - 15685 => 33050, 15686 => 29409, 15687 => 35282, 15688 => 39290, 15689 => 32564, - 15690 => 32478, 15691 => 21119, 15692 => 25945, 15693 => 37237, 15694 => 36735, - 15695 => 36739, 15696 => 21483, 15697 => 31382, 15698 => 25581, 15699 => 25509, - 15700 => 30342, 15701 => 31224, 15702 => 34903, 15703 => 38454, 15704 => 25130, - 15705 => 21163, 15706 => 33410, 15707 => 26708, 15708 => 26480, 15709 => 25463, - 15710 => 30571, 15711 => 31469, 15712 => 27905, 15713 => 32467, 15714 => 35299, - 15715 => 22992, 15716 => 25106, 15717 => 34249, 15718 => 33445, 15719 => 30028, - 15720 => 20511, 15721 => 20171, 15722 => 30117, 15723 => 35819, 15724 => 23626, - 15725 => 24062, 15726 => 31563, 15727 => 26020, 15728 => 37329, 15729 => 20170, - 15730 => 27941, 15731 => 35167, 15732 => 32039, 15733 => 38182, 15734 => 20165, - 15735 => 35880, 15736 => 36827, 15737 => 38771, 15738 => 26187, 15739 => 31105, - 15740 => 36817, 15741 => 28908, 15742 => 28024, 15905 => 23613, 15906 => 21170, - 15907 => 33606, 15908 => 20834, 15909 => 33550, 15910 => 30555, 15911 => 26230, - 15912 => 40120, 15913 => 20140, 15914 => 24778, 15915 => 31934, 15916 => 31923, - 15917 => 32463, 15918 => 20117, 15919 => 35686, 15920 => 26223, 15921 => 39048, - 15922 => 38745, 15923 => 22659, 15924 => 25964, 15925 => 38236, 15926 => 24452, - 15927 => 30153, 15928 => 38742, 15929 => 31455, 15930 => 31454, 15931 => 20928, - 15932 => 28847, 15933 => 31384, 15934 => 25578, 15935 => 31350, 15936 => 32416, - 15937 => 29590, 15938 => 38893, 15939 => 20037, 15940 => 28792, 15941 => 20061, - 15942 => 37202, 15943 => 21417, 15944 => 25937, 15945 => 26087, 15946 => 33276, - 15947 => 33285, 15948 => 21646, 15949 => 23601, 15950 => 30106, 15951 => 38816, - 15952 => 25304, 15953 => 29401, 15954 => 30141, 15955 => 23621, 15956 => 39545, - 15957 => 33738, 15958 => 23616, 15959 => 21632, 15960 => 30697, 15961 => 20030, - 15962 => 27822, 15963 => 32858, 15964 => 25298, 15965 => 25454, 15966 => 24040, - 15967 => 20855, 15968 => 36317, 15969 => 36382, 15970 => 38191, 15971 => 20465, - 15972 => 21477, 15973 => 24807, 15974 => 28844, 15975 => 21095, 15976 => 25424, - 15977 => 40515, 15978 => 23071, 15979 => 20518, 15980 => 30519, 15981 => 21367, - 15982 => 32482, 15983 => 25733, 15984 => 25899, 15985 => 25225, 15986 => 25496, - 15987 => 20500, 15988 => 29237, 15989 => 35273, 15990 => 20915, 15991 => 35776, - 15992 => 32477, 15993 => 22343, 15994 => 33740, 15995 => 38055, 15996 => 20891, - 15997 => 21531, 15998 => 23803, 16161 => 20426, 16162 => 31459, 16163 => 27994, - 16164 => 37089, 16165 => 39567, 16166 => 21888, 16167 => 21654, 16168 => 21345, - 16169 => 21679, 16170 => 24320, 16171 => 25577, 16172 => 26999, 16173 => 20975, - 16174 => 24936, 16175 => 21002, 16176 => 22570, 16177 => 21208, 16178 => 22350, - 16179 => 30733, 16180 => 30475, 16181 => 24247, 16182 => 24951, 16183 => 31968, - 16184 => 25179, 16185 => 25239, 16186 => 20130, 16187 => 28821, 16188 => 32771, - 16189 => 25335, 16190 => 28900, 16191 => 38752, 16192 => 22391, 16193 => 33499, - 16194 => 26607, 16195 => 26869, 16196 => 30933, 16197 => 39063, 16198 => 31185, - 16199 => 22771, 16200 => 21683, 16201 => 21487, 16202 => 28212, 16203 => 20811, - 16204 => 21051, 16205 => 23458, 16206 => 35838, 16207 => 32943, 16208 => 21827, - 16209 => 22438, 16210 => 24691, 16211 => 22353, 16212 => 21549, 16213 => 31354, - 16214 => 24656, 16215 => 23380, 16216 => 25511, 16217 => 25248, 16218 => 21475, - 16219 => 25187, 16220 => 23495, 16221 => 26543, 16222 => 21741, 16223 => 31391, - 16224 => 33510, 16225 => 37239, 16226 => 24211, 16227 => 35044, 16228 => 22840, - 16229 => 22446, 16230 => 25358, 16231 => 36328, 16232 => 33007, 16233 => 22359, - 16234 => 31607, 16235 => 20393, 16236 => 24555, 16237 => 23485, 16238 => 27454, - 16239 => 21281, 16240 => 31568, 16241 => 29378, 16242 => 26694, 16243 => 30719, - 16244 => 30518, 16245 => 26103, 16246 => 20917, 16247 => 20111, 16248 => 30420, - 16249 => 23743, 16250 => 31397, 16251 => 33909, 16252 => 22862, 16253 => 39745, - 16254 => 20608, 16417 => 39304, 16418 => 24871, 16419 => 28291, 16420 => 22372, - 16421 => 26118, 16422 => 25414, 16423 => 22256, 16424 => 25324, 16425 => 25193, - 16426 => 24275, 16427 => 38420, 16428 => 22403, 16429 => 25289, 16430 => 21895, - 16431 => 34593, 16432 => 33098, 16433 => 36771, 16434 => 21862, 16435 => 33713, - 16436 => 26469, 16437 => 36182, 16438 => 34013, 16439 => 23146, 16440 => 26639, - 16441 => 25318, 16442 => 31726, 16443 => 38417, 16444 => 20848, 16445 => 28572, - 16446 => 35888, 16447 => 25597, 16448 => 35272, 16449 => 25042, 16450 => 32518, - 16451 => 28866, 16452 => 28389, 16453 => 29701, 16454 => 27028, 16455 => 29436, - 16456 => 24266, 16457 => 37070, 16458 => 26391, 16459 => 28010, 16460 => 25438, - 16461 => 21171, 16462 => 29282, 16463 => 32769, 16464 => 20332, 16465 => 23013, - 16466 => 37226, 16467 => 28889, 16468 => 28061, 16469 => 21202, 16470 => 20048, - 16471 => 38647, 16472 => 38253, 16473 => 34174, 16474 => 30922, 16475 => 32047, - 16476 => 20769, 16477 => 22418, 16478 => 25794, 16479 => 32907, 16480 => 31867, - 16481 => 27882, 16482 => 26865, 16483 => 26974, 16484 => 20919, 16485 => 21400, - 16486 => 26792, 16487 => 29313, 16488 => 40654, 16489 => 31729, 16490 => 29432, - 16491 => 31163, 16492 => 28435, 16493 => 29702, 16494 => 26446, 16495 => 37324, - 16496 => 40100, 16497 => 31036, 16498 => 33673, 16499 => 33620, 16500 => 21519, - 16501 => 26647, 16502 => 20029, 16503 => 21385, 16504 => 21169, 16505 => 30782, - 16506 => 21382, 16507 => 21033, 16508 => 20616, 16509 => 20363, 16510 => 20432, - 16673 => 30178, 16674 => 31435, 16675 => 31890, 16676 => 27813, 16677 => 38582, - 16678 => 21147, 16679 => 29827, 16680 => 21737, 16681 => 20457, 16682 => 32852, - 16683 => 33714, 16684 => 36830, 16685 => 38256, 16686 => 24265, 16687 => 24604, - 16688 => 28063, 16689 => 24088, 16690 => 25947, 16691 => 33080, 16692 => 38142, - 16693 => 24651, 16694 => 28860, 16695 => 32451, 16696 => 31918, 16697 => 20937, - 16698 => 26753, 16699 => 31921, 16700 => 33391, 16701 => 20004, 16702 => 36742, - 16703 => 37327, 16704 => 26238, 16705 => 20142, 16706 => 35845, 16707 => 25769, - 16708 => 32842, 16709 => 20698, 16710 => 30103, 16711 => 29134, 16712 => 23525, - 16713 => 36797, 16714 => 28518, 16715 => 20102, 16716 => 25730, 16717 => 38243, - 16718 => 24278, 16719 => 26009, 16720 => 21015, 16721 => 35010, 16722 => 28872, - 16723 => 21155, 16724 => 29454, 16725 => 29747, 16726 => 26519, 16727 => 30967, - 16728 => 38678, 16729 => 20020, 16730 => 37051, 16731 => 40158, 16732 => 28107, - 16733 => 20955, 16734 => 36161, 16735 => 21533, 16736 => 25294, 16737 => 29618, - 16738 => 33777, 16739 => 38646, 16740 => 40836, 16741 => 38083, 16742 => 20278, - 16743 => 32666, 16744 => 20940, 16745 => 28789, 16746 => 38517, 16747 => 23725, - 16748 => 39046, 16749 => 21478, 16750 => 20196, 16751 => 28316, 16752 => 29705, - 16753 => 27060, 16754 => 30827, 16755 => 39311, 16756 => 30041, 16757 => 21016, - 16758 => 30244, 16759 => 27969, 16760 => 26611, 16761 => 20845, 16762 => 40857, - 16763 => 32843, 16764 => 21657, 16765 => 31548, 16766 => 31423, 16929 => 38534, - 16930 => 22404, 16931 => 25314, 16932 => 38471, 16933 => 27004, 16934 => 23044, - 16935 => 25602, 16936 => 31699, 16937 => 28431, 16938 => 38475, 16939 => 33446, - 16940 => 21346, 16941 => 39045, 16942 => 24208, 16943 => 28809, 16944 => 25523, - 16945 => 21348, 16946 => 34383, 16947 => 40065, 16948 => 40595, 16949 => 30860, - 16950 => 38706, 16951 => 36335, 16952 => 36162, 16953 => 40575, 16954 => 28510, - 16955 => 31108, 16956 => 24405, 16957 => 38470, 16958 => 25134, 16959 => 39540, - 16960 => 21525, 16961 => 38109, 16962 => 20387, 16963 => 26053, 16964 => 23653, - 16965 => 23649, 16966 => 32533, 16967 => 34385, 16968 => 27695, 16969 => 24459, - 16970 => 29575, 16971 => 28388, 16972 => 32511, 16973 => 23782, 16974 => 25371, - 16975 => 23402, 16976 => 28390, 16977 => 21365, 16978 => 20081, 16979 => 25504, - 16980 => 30053, 16981 => 25249, 16982 => 36718, 16983 => 20262, 16984 => 20177, - 16985 => 27814, 16986 => 32438, 16987 => 35770, 16988 => 33821, 16989 => 34746, - 16990 => 32599, 16991 => 36923, 16992 => 38179, 16993 => 31657, 16994 => 39585, - 16995 => 35064, 16996 => 33853, 16997 => 27931, 16998 => 39558, 16999 => 32476, - 17000 => 22920, 17001 => 40635, 17002 => 29595, 17003 => 30721, 17004 => 34434, - 17005 => 39532, 17006 => 39554, 17007 => 22043, 17008 => 21527, 17009 => 22475, - 17010 => 20080, 17011 => 40614, 17012 => 21334, 17013 => 36808, 17014 => 33033, - 17015 => 30610, 17016 => 39314, 17017 => 34542, 17018 => 28385, 17019 => 34067, - 17020 => 26364, 17021 => 24930, 17022 => 28459, 17185 => 35881, 17186 => 33426, - 17187 => 33579, 17188 => 30450, 17189 => 27667, 17190 => 24537, 17191 => 33725, - 17192 => 29483, 17193 => 33541, 17194 => 38170, 17195 => 27611, 17196 => 30683, - 17197 => 38086, 17198 => 21359, 17199 => 33538, 17200 => 20882, 17201 => 24125, - 17202 => 35980, 17203 => 36152, 17204 => 20040, 17205 => 29611, 17206 => 26522, - 17207 => 26757, 17208 => 37238, 17209 => 38665, 17210 => 29028, 17211 => 27809, - 17212 => 30473, 17213 => 23186, 17214 => 38209, 17215 => 27599, 17216 => 32654, - 17217 => 26151, 17218 => 23504, 17219 => 22969, 17220 => 23194, 17221 => 38376, - 17222 => 38391, 17223 => 20204, 17224 => 33804, 17225 => 33945, 17226 => 27308, - 17227 => 30431, 17228 => 38192, 17229 => 29467, 17230 => 26790, 17231 => 23391, - 17232 => 30511, 17233 => 37274, 17234 => 38753, 17235 => 31964, 17236 => 36855, - 17237 => 35868, 17238 => 24357, 17239 => 31859, 17240 => 31192, 17241 => 35269, - 17242 => 27852, 17243 => 34588, 17244 => 23494, 17245 => 24130, 17246 => 26825, - 17247 => 30496, 17248 => 32501, 17249 => 20885, 17250 => 20813, 17251 => 21193, - 17252 => 23081, 17253 => 32517, 17254 => 38754, 17255 => 33495, 17256 => 25551, - 17257 => 30596, 17258 => 34256, 17259 => 31186, 17260 => 28218, 17261 => 24217, - 17262 => 22937, 17263 => 34065, 17264 => 28781, 17265 => 27665, 17266 => 25279, - 17267 => 30399, 17268 => 25935, 17269 => 24751, 17270 => 38397, 17271 => 26126, - 17272 => 34719, 17273 => 40483, 17274 => 38125, 17275 => 21517, 17276 => 21629, - 17277 => 35884, 17278 => 25720, 17441 => 25721, 17442 => 34321, 17443 => 27169, - 17444 => 33180, 17445 => 30952, 17446 => 25705, 17447 => 39764, 17448 => 25273, - 17449 => 26411, 17450 => 33707, 17451 => 22696, 17452 => 40664, 17453 => 27819, - 17454 => 28448, 17455 => 23518, 17456 => 38476, 17457 => 35851, 17458 => 29279, - 17459 => 26576, 17460 => 25287, 17461 => 29281, 17462 => 20137, 17463 => 22982, - 17464 => 27597, 17465 => 22675, 17466 => 26286, 17467 => 24149, 17468 => 21215, - 17469 => 24917, 17470 => 26408, 17471 => 30446, 17472 => 30566, 17473 => 29287, - 17474 => 31302, 17475 => 25343, 17476 => 21738, 17477 => 21584, 17478 => 38048, - 17479 => 37027, 17480 => 23068, 17481 => 32435, 17482 => 27670, 17483 => 20035, - 17484 => 22902, 17485 => 32784, 17486 => 22856, 17487 => 21335, 17488 => 30007, - 17489 => 38590, 17490 => 22218, 17491 => 25376, 17492 => 33041, 17493 => 24700, - 17494 => 38393, 17495 => 28118, 17496 => 21602, 17497 => 39297, 17498 => 20869, - 17499 => 23273, 17500 => 33021, 17501 => 22958, 17502 => 38675, 17503 => 20522, - 17504 => 27877, 17505 => 23612, 17506 => 25311, 17507 => 20320, 17508 => 21311, - 17509 => 33147, 17510 => 36870, 17511 => 28346, 17512 => 34091, 17513 => 25288, - 17514 => 24180, 17515 => 30910, 17516 => 25781, 17517 => 25467, 17518 => 24565, - 17519 => 23064, 17520 => 37247, 17521 => 40479, 17522 => 23615, 17523 => 25423, - 17524 => 32834, 17525 => 23421, 17526 => 21870, 17527 => 38218, 17528 => 38221, - 17529 => 28037, 17530 => 24744, 17531 => 26592, 17532 => 29406, 17533 => 20957, - 17534 => 23425, 17697 => 25319, 17698 => 27870, 17699 => 29275, 17700 => 25197, - 17701 => 38062, 17702 => 32445, 17703 => 33043, 17704 => 27987, 17705 => 20892, - 17706 => 24324, 17707 => 22900, 17708 => 21162, 17709 => 24594, 17710 => 22899, - 17711 => 26262, 17712 => 34384, 17713 => 30111, 17714 => 25386, 17715 => 25062, - 17716 => 31983, 17717 => 35834, 17718 => 21734, 17719 => 27431, 17720 => 40485, - 17721 => 27572, 17722 => 34261, 17723 => 21589, 17724 => 20598, 17725 => 27812, - 17726 => 21866, 17727 => 36276, 17728 => 29228, 17729 => 24085, 17730 => 24597, - 17731 => 29750, 17732 => 25293, 17733 => 25490, 17734 => 29260, 17735 => 24472, - 17736 => 28227, 17737 => 27966, 17738 => 25856, 17739 => 28504, 17740 => 30424, - 17741 => 30928, 17742 => 30460, 17743 => 30036, 17744 => 21028, 17745 => 21467, - 17746 => 20051, 17747 => 24222, 17748 => 26049, 17749 => 32810, 17750 => 32982, - 17751 => 25243, 17752 => 21638, 17753 => 21032, 17754 => 28846, 17755 => 34957, - 17756 => 36305, 17757 => 27873, 17758 => 21624, 17759 => 32986, 17760 => 22521, - 17761 => 35060, 17762 => 36180, 17763 => 38506, 17764 => 37197, 17765 => 20329, - 17766 => 27803, 17767 => 21943, 17768 => 30406, 17769 => 30768, 17770 => 25256, - 17771 => 28921, 17772 => 28558, 17773 => 24429, 17774 => 34028, 17775 => 26842, - 17776 => 30844, 17777 => 31735, 17778 => 33192, 17779 => 26379, 17780 => 40527, - 17781 => 25447, 17782 => 30896, 17783 => 22383, 17784 => 30738, 17785 => 38713, - 17786 => 25209, 17787 => 25259, 17788 => 21128, 17789 => 29749, 17790 => 27607, - 17953 => 21860, 17954 => 33086, 17955 => 30130, 17956 => 30382, 17957 => 21305, - 17958 => 30174, 17959 => 20731, 17960 => 23617, 17961 => 35692, 17962 => 31687, - 17963 => 20559, 17964 => 29255, 17965 => 39575, 17966 => 39128, 17967 => 28418, - 17968 => 29922, 17969 => 31080, 17970 => 25735, 17971 => 30629, 17972 => 25340, - 17973 => 39057, 17974 => 36139, 17975 => 21697, 17976 => 32856, 17977 => 20050, - 17978 => 22378, 17979 => 33529, 17980 => 33805, 17981 => 24179, 17982 => 20973, - 17983 => 29942, 17984 => 35780, 17985 => 23631, 17986 => 22369, 17987 => 27900, - 17988 => 39047, 17989 => 23110, 17990 => 30772, 17991 => 39748, 17992 => 36843, - 17993 => 31893, 17994 => 21078, 17995 => 25169, 17996 => 38138, 17997 => 20166, - 17998 => 33670, 17999 => 33889, 18000 => 33769, 18001 => 33970, 18002 => 22484, - 18003 => 26420, 18004 => 22275, 18005 => 26222, 18006 => 28006, 18007 => 35889, - 18008 => 26333, 18009 => 28689, 18010 => 26399, 18011 => 27450, 18012 => 26646, - 18013 => 25114, 18014 => 22971, 18015 => 19971, 18016 => 20932, 18017 => 28422, - 18018 => 26578, 18019 => 27791, 18020 => 20854, 18021 => 26827, 18022 => 22855, - 18023 => 27495, 18024 => 30054, 18025 => 23822, 18026 => 33040, 18027 => 40784, - 18028 => 26071, 18029 => 31048, 18030 => 31041, 18031 => 39569, 18032 => 36215, - 18033 => 23682, 18034 => 20062, 18035 => 20225, 18036 => 21551, 18037 => 22865, - 18038 => 30732, 18039 => 22120, 18040 => 27668, 18041 => 36804, 18042 => 24323, - 18043 => 27773, 18044 => 27875, 18045 => 35755, 18046 => 25488, 18209 => 24688, - 18210 => 27965, 18211 => 29301, 18212 => 25190, 18213 => 38030, 18214 => 38085, - 18215 => 21315, 18216 => 36801, 18217 => 31614, 18218 => 20191, 18219 => 35878, - 18220 => 20094, 18221 => 40660, 18222 => 38065, 18223 => 38067, 18224 => 21069, - 18225 => 28508, 18226 => 36963, 18227 => 27973, 18228 => 35892, 18229 => 22545, - 18230 => 23884, 18231 => 27424, 18232 => 27465, 18233 => 26538, 18234 => 21595, - 18235 => 33108, 18236 => 32652, 18237 => 22681, 18238 => 34103, 18239 => 24378, - 18240 => 25250, 18241 => 27207, 18242 => 38201, 18243 => 25970, 18244 => 24708, - 18245 => 26725, 18246 => 30631, 18247 => 20052, 18248 => 20392, 18249 => 24039, - 18250 => 38808, 18251 => 25772, 18252 => 32728, 18253 => 23789, 18254 => 20431, - 18255 => 31373, 18256 => 20999, 18257 => 33540, 18258 => 19988, 18259 => 24623, - 18260 => 31363, 18261 => 38054, 18262 => 20405, 18263 => 20146, 18264 => 31206, - 18265 => 29748, 18266 => 21220, 18267 => 33465, 18268 => 25810, 18269 => 31165, - 18270 => 23517, 18271 => 27777, 18272 => 38738, 18273 => 36731, 18274 => 27682, - 18275 => 20542, 18276 => 21375, 18277 => 28165, 18278 => 25806, 18279 => 26228, - 18280 => 27696, 18281 => 24773, 18282 => 39031, 18283 => 35831, 18284 => 24198, - 18285 => 29756, 18286 => 31351, 18287 => 31179, 18288 => 19992, 18289 => 37041, - 18290 => 29699, 18291 => 27714, 18292 => 22234, 18293 => 37195, 18294 => 27845, - 18295 => 36235, 18296 => 21306, 18297 => 34502, 18298 => 26354, 18299 => 36527, - 18300 => 23624, 18301 => 39537, 18302 => 28192, 18465 => 21462, 18466 => 23094, - 18467 => 40843, 18468 => 36259, 18469 => 21435, 18470 => 22280, 18471 => 39079, - 18472 => 26435, 18473 => 37275, 18474 => 27849, 18475 => 20840, 18476 => 30154, - 18477 => 25331, 18478 => 29356, 18479 => 21048, 18480 => 21149, 18481 => 32570, - 18482 => 28820, 18483 => 30264, 18484 => 21364, 18485 => 40522, 18486 => 27063, - 18487 => 30830, 18488 => 38592, 18489 => 35033, 18490 => 32676, 18491 => 28982, - 18492 => 29123, 18493 => 20873, 18494 => 26579, 18495 => 29924, 18496 => 22756, - 18497 => 25880, 18498 => 22199, 18499 => 35753, 18500 => 39286, 18501 => 25200, - 18502 => 32469, 18503 => 24825, 18504 => 28909, 18505 => 22764, 18506 => 20161, - 18507 => 20154, 18508 => 24525, 18509 => 38887, 18510 => 20219, 18511 => 35748, - 18512 => 20995, 18513 => 22922, 18514 => 32427, 18515 => 25172, 18516 => 20173, - 18517 => 26085, 18518 => 25102, 18519 => 33592, 18520 => 33993, 18521 => 33635, - 18522 => 34701, 18523 => 29076, 18524 => 28342, 18525 => 23481, 18526 => 32466, - 18527 => 20887, 18528 => 25545, 18529 => 26580, 18530 => 32905, 18531 => 33593, - 18532 => 34837, 18533 => 20754, 18534 => 23418, 18535 => 22914, 18536 => 36785, - 18537 => 20083, 18538 => 27741, 18539 => 20837, 18540 => 35109, 18541 => 36719, - 18542 => 38446, 18543 => 34122, 18544 => 29790, 18545 => 38160, 18546 => 38384, - 18547 => 28070, 18548 => 33509, 18549 => 24369, 18550 => 25746, 18551 => 27922, - 18552 => 33832, 18553 => 33134, 18554 => 40131, 18555 => 22622, 18556 => 36187, - 18557 => 19977, 18558 => 21441, 18721 => 20254, 18722 => 25955, 18723 => 26705, - 18724 => 21971, 18725 => 20007, 18726 => 25620, 18727 => 39578, 18728 => 25195, - 18729 => 23234, 18730 => 29791, 18731 => 33394, 18732 => 28073, 18733 => 26862, - 18734 => 20711, 18735 => 33678, 18736 => 30722, 18737 => 26432, 18738 => 21049, - 18739 => 27801, 18740 => 32433, 18741 => 20667, 18742 => 21861, 18743 => 29022, - 18744 => 31579, 18745 => 26194, 18746 => 29642, 18747 => 33515, 18748 => 26441, - 18749 => 23665, 18750 => 21024, 18751 => 29053, 18752 => 34923, 18753 => 38378, - 18754 => 38485, 18755 => 25797, 18756 => 36193, 18757 => 33203, 18758 => 21892, - 18759 => 27733, 18760 => 25159, 18761 => 32558, 18762 => 22674, 18763 => 20260, - 18764 => 21830, 18765 => 36175, 18766 => 26188, 18767 => 19978, 18768 => 23578, - 18769 => 35059, 18770 => 26786, 18771 => 25422, 18772 => 31245, 18773 => 28903, - 18774 => 33421, 18775 => 21242, 18776 => 38902, 18777 => 23569, 18778 => 21736, - 18779 => 37045, 18780 => 32461, 18781 => 22882, 18782 => 36170, 18783 => 34503, - 18784 => 33292, 18785 => 33293, 18786 => 36198, 18787 => 25668, 18788 => 23556, - 18789 => 24913, 18790 => 28041, 18791 => 31038, 18792 => 35774, 18793 => 30775, - 18794 => 30003, 18795 => 21627, 18796 => 20280, 18797 => 36523, 18798 => 28145, - 18799 => 23072, 18800 => 32453, 18801 => 31070, 18802 => 27784, 18803 => 23457, - 18804 => 23158, 18805 => 29978, 18806 => 32958, 18807 => 24910, 18808 => 28183, - 18809 => 22768, 18810 => 29983, 18811 => 29989, 18812 => 29298, 18813 => 21319, - 18814 => 32499, 18977 => 30465, 18978 => 30427, 18979 => 21097, 18980 => 32988, - 18981 => 22307, 18982 => 24072, 18983 => 22833, 18984 => 29422, 18985 => 26045, - 18986 => 28287, 18987 => 35799, 18988 => 23608, 18989 => 34417, 18990 => 21313, - 18991 => 30707, 18992 => 25342, 18993 => 26102, 18994 => 20160, 18995 => 39135, - 18996 => 34432, 18997 => 23454, 18998 => 35782, 18999 => 21490, 19000 => 30690, - 19001 => 20351, 19002 => 23630, 19003 => 39542, 19004 => 22987, 19005 => 24335, - 19006 => 31034, 19007 => 22763, 19008 => 19990, 19009 => 26623, 19010 => 20107, - 19011 => 25325, 19012 => 35475, 19013 => 36893, 19014 => 21183, 19015 => 26159, - 19016 => 21980, 19017 => 22124, 19018 => 36866, 19019 => 20181, 19020 => 20365, - 19021 => 37322, 19022 => 39280, 19023 => 27663, 19024 => 24066, 19025 => 24643, - 19026 => 23460, 19027 => 35270, 19028 => 35797, 19029 => 25910, 19030 => 25163, - 19031 => 39318, 19032 => 23432, 19033 => 23551, 19034 => 25480, 19035 => 21806, - 19036 => 21463, 19037 => 30246, 19038 => 20861, 19039 => 34092, 19040 => 26530, - 19041 => 26803, 19042 => 27530, 19043 => 25234, 19044 => 36755, 19045 => 21460, - 19046 => 33298, 19047 => 28113, 19048 => 30095, 19049 => 20070, 19050 => 36174, - 19051 => 23408, 19052 => 29087, 19053 => 34223, 19054 => 26257, 19055 => 26329, - 19056 => 32626, 19057 => 34560, 19058 => 40653, 19059 => 40736, 19060 => 23646, - 19061 => 26415, 19062 => 36848, 19063 => 26641, 19064 => 26463, 19065 => 25101, - 19066 => 31446, 19067 => 22661, 19068 => 24246, 19069 => 25968, 19070 => 28465, - 19233 => 24661, 19234 => 21047, 19235 => 32781, 19236 => 25684, 19237 => 34928, - 19238 => 29993, 19239 => 24069, 19240 => 26643, 19241 => 25332, 19242 => 38684, - 19243 => 21452, 19244 => 29245, 19245 => 35841, 19246 => 27700, 19247 => 30561, - 19248 => 31246, 19249 => 21550, 19250 => 30636, 19251 => 39034, 19252 => 33308, - 19253 => 35828, 19254 => 30805, 19255 => 26388, 19256 => 28865, 19257 => 26031, - 19258 => 25749, 19259 => 22070, 19260 => 24605, 19261 => 31169, 19262 => 21496, - 19263 => 19997, 19264 => 27515, 19265 => 32902, 19266 => 23546, 19267 => 21987, - 19268 => 22235, 19269 => 20282, 19270 => 20284, 19271 => 39282, 19272 => 24051, - 19273 => 26494, 19274 => 32824, 19275 => 24578, 19276 => 39042, 19277 => 36865, - 19278 => 23435, 19279 => 35772, 19280 => 35829, 19281 => 25628, 19282 => 33368, - 19283 => 25822, 19284 => 22013, 19285 => 33487, 19286 => 37221, 19287 => 20439, - 19288 => 32032, 19289 => 36895, 19290 => 31903, 19291 => 20723, 19292 => 22609, - 19293 => 28335, 19294 => 23487, 19295 => 35785, 19296 => 32899, 19297 => 37240, - 19298 => 33948, 19299 => 31639, 19300 => 34429, 19301 => 38539, 19302 => 38543, - 19303 => 32485, 19304 => 39635, 19305 => 30862, 19306 => 23681, 19307 => 31319, - 19308 => 36930, 19309 => 38567, 19310 => 31071, 19311 => 23385, 19312 => 25439, - 19313 => 31499, 19314 => 34001, 19315 => 26797, 19316 => 21766, 19317 => 32553, - 19318 => 29712, 19319 => 32034, 19320 => 38145, 19321 => 25152, 19322 => 22604, - 19323 => 20182, 19324 => 23427, 19325 => 22905, 19326 => 22612, 19489 => 29549, - 19490 => 25374, 19491 => 36427, 19492 => 36367, 19493 => 32974, 19494 => 33492, - 19495 => 25260, 19496 => 21488, 19497 => 27888, 19498 => 37214, 19499 => 22826, - 19500 => 24577, 19501 => 27760, 19502 => 22349, 19503 => 25674, 19504 => 36138, - 19505 => 30251, 19506 => 28393, 19507 => 22363, 19508 => 27264, 19509 => 30192, - 19510 => 28525, 19511 => 35885, 19512 => 35848, 19513 => 22374, 19514 => 27631, - 19515 => 34962, 19516 => 30899, 19517 => 25506, 19518 => 21497, 19519 => 28845, - 19520 => 27748, 19521 => 22616, 19522 => 25642, 19523 => 22530, 19524 => 26848, - 19525 => 33179, 19526 => 21776, 19527 => 31958, 19528 => 20504, 19529 => 36538, - 19530 => 28108, 19531 => 36255, 19532 => 28907, 19533 => 25487, 19534 => 28059, - 19535 => 28372, 19536 => 32486, 19537 => 33796, 19538 => 26691, 19539 => 36867, - 19540 => 28120, 19541 => 38518, 19542 => 35752, 19543 => 22871, 19544 => 29305, - 19545 => 34276, 19546 => 33150, 19547 => 30140, 19548 => 35466, 19549 => 26799, - 19550 => 21076, 19551 => 36386, 19552 => 38161, 19553 => 25552, 19554 => 39064, - 19555 => 36420, 19556 => 21884, 19557 => 20307, 19558 => 26367, 19559 => 22159, - 19560 => 24789, 19561 => 28053, 19562 => 21059, 19563 => 23625, 19564 => 22825, - 19565 => 28155, 19566 => 22635, 19567 => 30000, 19568 => 29980, 19569 => 24684, - 19570 => 33300, 19571 => 33094, 19572 => 25361, 19573 => 26465, 19574 => 36834, - 19575 => 30522, 19576 => 36339, 19577 => 36148, 19578 => 38081, 19579 => 24086, - 19580 => 21381, 19581 => 21548, 19582 => 28867, 19745 => 27712, 19746 => 24311, - 19747 => 20572, 19748 => 20141, 19749 => 24237, 19750 => 25402, 19751 => 33351, - 19752 => 36890, 19753 => 26704, 19754 => 37230, 19755 => 30643, 19756 => 21516, - 19757 => 38108, 19758 => 24420, 19759 => 31461, 19760 => 26742, 19761 => 25413, - 19762 => 31570, 19763 => 32479, 19764 => 30171, 19765 => 20599, 19766 => 25237, - 19767 => 22836, 19768 => 36879, 19769 => 20984, 19770 => 31171, 19771 => 31361, - 19772 => 22270, 19773 => 24466, 19774 => 36884, 19775 => 28034, 19776 => 23648, - 19777 => 22303, 19778 => 21520, 19779 => 20820, 19780 => 28237, 19781 => 22242, - 19782 => 25512, 19783 => 39059, 19784 => 33151, 19785 => 34581, 19786 => 35114, - 19787 => 36864, 19788 => 21534, 19789 => 23663, 19790 => 33216, 19791 => 25302, - 19792 => 25176, 19793 => 33073, 19794 => 40501, 19795 => 38464, 19796 => 39534, - 19797 => 39548, 19798 => 26925, 19799 => 22949, 19800 => 25299, 19801 => 21822, - 19802 => 25366, 19803 => 21703, 19804 => 34521, 19805 => 27964, 19806 => 23043, - 19807 => 29926, 19808 => 34972, 19809 => 27498, 19810 => 22806, 19811 => 35916, - 19812 => 24367, 19813 => 28286, 19814 => 29609, 19815 => 39037, 19816 => 20024, - 19817 => 28919, 19818 => 23436, 19819 => 30871, 19820 => 25405, 19821 => 26202, - 19822 => 30358, 19823 => 24779, 19824 => 23451, 19825 => 23113, 19826 => 19975, - 19827 => 33109, 19828 => 27754, 19829 => 29579, 19830 => 20129, 19831 => 26505, - 19832 => 32593, 19833 => 24448, 19834 => 26106, 19835 => 26395, 19836 => 24536, - 19837 => 22916, 19838 => 23041, 20001 => 24013, 20002 => 24494, 20003 => 21361, - 20004 => 38886, 20005 => 36829, 20006 => 26693, 20007 => 22260, 20008 => 21807, - 20009 => 24799, 20010 => 20026, 20011 => 28493, 20012 => 32500, 20013 => 33479, - 20014 => 33806, 20015 => 22996, 20016 => 20255, 20017 => 20266, 20018 => 23614, - 20019 => 32428, 20020 => 26410, 20021 => 34074, 20022 => 21619, 20023 => 30031, - 20024 => 32963, 20025 => 21890, 20026 => 39759, 20027 => 20301, 20028 => 28205, - 20029 => 35859, 20030 => 23561, 20031 => 24944, 20032 => 21355, 20033 => 30239, - 20034 => 28201, 20035 => 34442, 20036 => 25991, 20037 => 38395, 20038 => 32441, - 20039 => 21563, 20040 => 31283, 20041 => 32010, 20042 => 38382, 20043 => 21985, - 20044 => 32705, 20045 => 29934, 20046 => 25373, 20047 => 34583, 20048 => 28065, - 20049 => 31389, 20050 => 25105, 20051 => 26017, 20052 => 21351, 20053 => 25569, - 20054 => 27779, 20055 => 24043, 20056 => 21596, 20057 => 38056, 20058 => 20044, - 20059 => 27745, 20060 => 35820, 20061 => 23627, 20062 => 26080, 20063 => 33436, - 20064 => 26791, 20065 => 21566, 20066 => 21556, 20067 => 27595, 20068 => 27494, - 20069 => 20116, 20070 => 25410, 20071 => 21320, 20072 => 33310, 20073 => 20237, - 20074 => 20398, 20075 => 22366, 20076 => 25098, 20077 => 38654, 20078 => 26212, - 20079 => 29289, 20080 => 21247, 20081 => 21153, 20082 => 24735, 20083 => 35823, - 20084 => 26132, 20085 => 29081, 20086 => 26512, 20087 => 35199, 20088 => 30802, - 20089 => 30717, 20090 => 26224, 20091 => 22075, 20092 => 21560, 20093 => 38177, - 20094 => 29306, 20257 => 31232, 20258 => 24687, 20259 => 24076, 20260 => 24713, - 20261 => 33181, 20262 => 22805, 20263 => 24796, 20264 => 29060, 20265 => 28911, - 20266 => 28330, 20267 => 27728, 20268 => 29312, 20269 => 27268, 20270 => 34989, - 20271 => 24109, 20272 => 20064, 20273 => 23219, 20274 => 21916, 20275 => 38115, - 20276 => 27927, 20277 => 31995, 20278 => 38553, 20279 => 25103, 20280 => 32454, - 20281 => 30606, 20282 => 34430, 20283 => 21283, 20284 => 38686, 20285 => 36758, - 20286 => 26247, 20287 => 23777, 20288 => 20384, 20289 => 29421, 20290 => 19979, - 20291 => 21414, 20292 => 22799, 20293 => 21523, 20294 => 25472, 20295 => 38184, - 20296 => 20808, 20297 => 20185, 20298 => 40092, 20299 => 32420, 20300 => 21688, - 20301 => 36132, 20302 => 34900, 20303 => 33335, 20304 => 38386, 20305 => 28046, - 20306 => 24358, 20307 => 23244, 20308 => 26174, 20309 => 38505, 20310 => 29616, - 20311 => 29486, 20312 => 21439, 20313 => 33146, 20314 => 39301, 20315 => 32673, - 20316 => 23466, 20317 => 38519, 20318 => 38480, 20319 => 32447, 20320 => 30456, - 20321 => 21410, 20322 => 38262, 20323 => 39321, 20324 => 31665, 20325 => 35140, - 20326 => 28248, 20327 => 20065, 20328 => 32724, 20329 => 31077, 20330 => 35814, - 20331 => 24819, 20332 => 21709, 20333 => 20139, 20334 => 39033, 20335 => 24055, - 20336 => 27233, 20337 => 20687, 20338 => 21521, 20339 => 35937, 20340 => 33831, - 20341 => 30813, 20342 => 38660, 20343 => 21066, 20344 => 21742, 20345 => 22179, - 20346 => 38144, 20347 => 28040, 20348 => 23477, 20349 => 28102, 20350 => 26195, - 20513 => 23567, 20514 => 23389, 20515 => 26657, 20516 => 32918, 20517 => 21880, - 20518 => 31505, 20519 => 25928, 20520 => 26964, 20521 => 20123, 20522 => 27463, - 20523 => 34638, 20524 => 38795, 20525 => 21327, 20526 => 25375, 20527 => 25658, - 20528 => 37034, 20529 => 26012, 20530 => 32961, 20531 => 35856, 20532 => 20889, - 20533 => 26800, 20534 => 21368, 20535 => 34809, 20536 => 25032, 20537 => 27844, - 20538 => 27899, 20539 => 35874, 20540 => 23633, 20541 => 34218, 20542 => 33455, - 20543 => 38156, 20544 => 27427, 20545 => 36763, 20546 => 26032, 20547 => 24571, - 20548 => 24515, 20549 => 20449, 20550 => 34885, 20551 => 26143, 20552 => 33125, - 20553 => 29481, 20554 => 24826, 20555 => 20852, 20556 => 21009, 20557 => 22411, - 20558 => 24418, 20559 => 37026, 20560 => 34892, 20561 => 37266, 20562 => 24184, - 20563 => 26447, 20564 => 24615, 20565 => 22995, 20566 => 20804, 20567 => 20982, - 20568 => 33016, 20569 => 21256, 20570 => 27769, 20571 => 38596, 20572 => 29066, - 20573 => 20241, 20574 => 20462, 20575 => 32670, 20576 => 26429, 20577 => 21957, - 20578 => 38152, 20579 => 31168, 20580 => 34966, 20581 => 32483, 20582 => 22687, - 20583 => 25100, 20584 => 38656, 20585 => 34394, 20586 => 22040, 20587 => 39035, - 20588 => 24464, 20589 => 35768, 20590 => 33988, 20591 => 37207, 20592 => 21465, - 20593 => 26093, 20594 => 24207, 20595 => 30044, 20596 => 24676, 20597 => 32110, - 20598 => 23167, 20599 => 32490, 20600 => 32493, 20601 => 36713, 20602 => 21927, - 20603 => 23459, 20604 => 24748, 20605 => 26059, 20606 => 29572, 20769 => 36873, - 20770 => 30307, 20771 => 30505, 20772 => 32474, 20773 => 38772, 20774 => 34203, - 20775 => 23398, 20776 => 31348, 20777 => 38634, 20778 => 34880, 20779 => 21195, - 20780 => 29071, 20781 => 24490, 20782 => 26092, 20783 => 35810, 20784 => 23547, - 20785 => 39535, 20786 => 24033, 20787 => 27529, 20788 => 27739, 20789 => 35757, - 20790 => 35759, 20791 => 36874, 20792 => 36805, 20793 => 21387, 20794 => 25276, - 20795 => 40486, 20796 => 40493, 20797 => 21568, 20798 => 20011, 20799 => 33469, - 20800 => 29273, 20801 => 34460, 20802 => 23830, 20803 => 34905, 20804 => 28079, - 20805 => 38597, 20806 => 21713, 20807 => 20122, 20808 => 35766, 20809 => 28937, - 20810 => 21693, 20811 => 38409, 20812 => 28895, 20813 => 28153, 20814 => 30416, - 20815 => 20005, 20816 => 30740, 20817 => 34578, 20818 => 23721, 20819 => 24310, - 20820 => 35328, 20821 => 39068, 20822 => 38414, 20823 => 28814, 20824 => 27839, - 20825 => 22852, 20826 => 25513, 20827 => 30524, 20828 => 34893, 20829 => 28436, - 20830 => 33395, 20831 => 22576, 20832 => 29141, 20833 => 21388, 20834 => 30746, - 20835 => 38593, 20836 => 21761, 20837 => 24422, 20838 => 28976, 20839 => 23476, - 20840 => 35866, 20841 => 39564, 20842 => 27523, 20843 => 22830, 20844 => 40495, - 20845 => 31207, 20846 => 26472, 20847 => 25196, 20848 => 20335, 20849 => 30113, - 20850 => 32650, 20851 => 27915, 20852 => 38451, 20853 => 27687, 20854 => 20208, - 20855 => 30162, 20856 => 20859, 20857 => 26679, 20858 => 28478, 20859 => 36992, - 20860 => 33136, 20861 => 22934, 20862 => 29814, 21025 => 25671, 21026 => 23591, - 21027 => 36965, 21028 => 31377, 21029 => 35875, 21030 => 23002, 21031 => 21676, - 21032 => 33280, 21033 => 33647, 21034 => 35201, 21035 => 32768, 21036 => 26928, - 21037 => 22094, 21038 => 32822, 21039 => 29239, 21040 => 37326, 21041 => 20918, - 21042 => 20063, 21043 => 39029, 21044 => 25494, 21045 => 19994, 21046 => 21494, - 21047 => 26355, 21048 => 33099, 21049 => 22812, 21050 => 28082, 21051 => 19968, - 21052 => 22777, 21053 => 21307, 21054 => 25558, 21055 => 38129, 21056 => 20381, - 21057 => 20234, 21058 => 34915, 21059 => 39056, 21060 => 22839, 21061 => 36951, - 21062 => 31227, 21063 => 20202, 21064 => 33008, 21065 => 30097, 21066 => 27778, - 21067 => 23452, 21068 => 23016, 21069 => 24413, 21070 => 26885, 21071 => 34433, - 21072 => 20506, 21073 => 24050, 21074 => 20057, 21075 => 30691, 21076 => 20197, - 21077 => 33402, 21078 => 25233, 21079 => 26131, 21080 => 37009, 21081 => 23673, - 21082 => 20159, 21083 => 24441, 21084 => 33222, 21085 => 36920, 21086 => 32900, - 21087 => 30123, 21088 => 20134, 21089 => 35028, 21090 => 24847, 21091 => 27589, - 21092 => 24518, 21093 => 20041, 21094 => 30410, 21095 => 28322, 21096 => 35811, - 21097 => 35758, 21098 => 35850, 21099 => 35793, 21100 => 24322, 21101 => 32764, - 21102 => 32716, 21103 => 32462, 21104 => 33589, 21105 => 33643, 21106 => 22240, - 21107 => 27575, 21108 => 38899, 21109 => 38452, 21110 => 23035, 21111 => 21535, - 21112 => 38134, 21113 => 28139, 21114 => 23493, 21115 => 39278, 21116 => 23609, - 21117 => 24341, 21118 => 38544, 21281 => 21360, 21282 => 33521, 21283 => 27185, - 21284 => 23156, 21285 => 40560, 21286 => 24212, 21287 => 32552, 21288 => 33721, - 21289 => 33828, 21290 => 33829, 21291 => 33639, 21292 => 34631, 21293 => 36814, - 21294 => 36194, 21295 => 30408, 21296 => 24433, 21297 => 39062, 21298 => 30828, - 21299 => 26144, 21300 => 21727, 21301 => 25317, 21302 => 20323, 21303 => 33219, - 21304 => 30152, 21305 => 24248, 21306 => 38605, 21307 => 36362, 21308 => 34553, - 21309 => 21647, 21310 => 27891, 21311 => 28044, 21312 => 27704, 21313 => 24703, - 21314 => 21191, 21315 => 29992, 21316 => 24189, 21317 => 20248, 21318 => 24736, - 21319 => 24551, 21320 => 23588, 21321 => 30001, 21322 => 37038, 21323 => 38080, - 21324 => 29369, 21325 => 27833, 21326 => 28216, 21327 => 37193, 21328 => 26377, - 21329 => 21451, 21330 => 21491, 21331 => 20305, 21332 => 37321, 21333 => 35825, - 21334 => 21448, 21335 => 24188, 21336 => 36802, 21337 => 28132, 21338 => 20110, - 21339 => 30402, 21340 => 27014, 21341 => 34398, 21342 => 24858, 21343 => 33286, - 21344 => 20313, 21345 => 20446, 21346 => 36926, 21347 => 40060, 21348 => 24841, - 21349 => 28189, 21350 => 28180, 21351 => 38533, 21352 => 20104, 21353 => 23089, - 21354 => 38632, 21355 => 19982, 21356 => 23679, 21357 => 31161, 21358 => 23431, - 21359 => 35821, 21360 => 32701, 21361 => 29577, 21362 => 22495, 21363 => 33419, - 21364 => 37057, 21365 => 21505, 21366 => 36935, 21367 => 21947, 21368 => 23786, - 21369 => 24481, 21370 => 24840, 21371 => 27442, 21372 => 29425, 21373 => 32946, - 21374 => 35465, 21537 => 28020, 21538 => 23507, 21539 => 35029, 21540 => 39044, - 21541 => 35947, 21542 => 39533, 21543 => 40499, 21544 => 28170, 21545 => 20900, - 21546 => 20803, 21547 => 22435, 21548 => 34945, 21549 => 21407, 21550 => 25588, - 21551 => 36757, 21552 => 22253, 21553 => 21592, 21554 => 22278, 21555 => 29503, - 21556 => 28304, 21557 => 32536, 21558 => 36828, 21559 => 33489, 21560 => 24895, - 21561 => 24616, 21562 => 38498, 21563 => 26352, 21564 => 32422, 21565 => 36234, - 21566 => 36291, 21567 => 38053, 21568 => 23731, 21569 => 31908, 21570 => 26376, - 21571 => 24742, 21572 => 38405, 21573 => 32792, 21574 => 20113, 21575 => 37095, - 21576 => 21248, 21577 => 38504, 21578 => 20801, 21579 => 36816, 21580 => 34164, - 21581 => 37213, 21582 => 26197, 21583 => 38901, 21584 => 23381, 21585 => 21277, - 21586 => 30776, 21587 => 26434, 21588 => 26685, 21589 => 21705, 21590 => 28798, - 21591 => 23472, 21592 => 36733, 21593 => 20877, 21594 => 22312, 21595 => 21681, - 21596 => 25874, 21597 => 26242, 21598 => 36190, 21599 => 36163, 21600 => 33039, - 21601 => 33900, 21602 => 36973, 21603 => 31967, 21604 => 20991, 21605 => 34299, - 21606 => 26531, 21607 => 26089, 21608 => 28577, 21609 => 34468, 21610 => 36481, - 21611 => 22122, 21612 => 36896, 21613 => 30338, 21614 => 28790, 21615 => 29157, - 21616 => 36131, 21617 => 25321, 21618 => 21017, 21619 => 27901, 21620 => 36156, - 21621 => 24590, 21622 => 22686, 21623 => 24974, 21624 => 26366, 21625 => 36192, - 21626 => 25166, 21627 => 21939, 21628 => 28195, 21629 => 26413, 21630 => 36711, - 21793 => 38113, 21794 => 38392, 21795 => 30504, 21796 => 26629, 21797 => 27048, - 21798 => 21643, 21799 => 20045, 21800 => 28856, 21801 => 35784, 21802 => 25688, - 21803 => 25995, 21804 => 23429, 21805 => 31364, 21806 => 20538, 21807 => 23528, - 21808 => 30651, 21809 => 27617, 21810 => 35449, 21811 => 31896, 21812 => 27838, - 21813 => 30415, 21814 => 26025, 21815 => 36759, 21816 => 23853, 21817 => 23637, - 21818 => 34360, 21819 => 26632, 21820 => 21344, 21821 => 25112, 21822 => 31449, - 21823 => 28251, 21824 => 32509, 21825 => 27167, 21826 => 31456, 21827 => 24432, - 21828 => 28467, 21829 => 24352, 21830 => 25484, 21831 => 28072, 21832 => 26454, - 21833 => 19976, 21834 => 24080, 21835 => 36134, 21836 => 20183, 21837 => 32960, - 21838 => 30260, 21839 => 38556, 21840 => 25307, 21841 => 26157, 21842 => 25214, - 21843 => 27836, 21844 => 36213, 21845 => 29031, 21846 => 32617, 21847 => 20806, - 21848 => 32903, 21849 => 21484, 21850 => 36974, 21851 => 25240, 21852 => 21746, - 21853 => 34544, 21854 => 36761, 21855 => 32773, 21856 => 38167, 21857 => 34071, - 21858 => 36825, 21859 => 27993, 21860 => 29645, 21861 => 26015, 21862 => 30495, - 21863 => 29956, 21864 => 30759, 21865 => 33275, 21866 => 36126, 21867 => 38024, - 21868 => 20390, 21869 => 26517, 21870 => 30137, 21871 => 35786, 21872 => 38663, - 21873 => 25391, 21874 => 38215, 21875 => 38453, 21876 => 33976, 21877 => 25379, - 21878 => 30529, 21879 => 24449, 21880 => 29424, 21881 => 20105, 21882 => 24596, - 21883 => 25972, 21884 => 25327, 21885 => 27491, 21886 => 25919, 22049 => 24103, - 22050 => 30151, 22051 => 37073, 22052 => 35777, 22053 => 33437, 22054 => 26525, - 22055 => 25903, 22056 => 21553, 22057 => 34584, 22058 => 30693, 22059 => 32930, - 22060 => 33026, 22061 => 27713, 22062 => 20043, 22063 => 32455, 22064 => 32844, - 22065 => 30452, 22066 => 26893, 22067 => 27542, 22068 => 25191, 22069 => 20540, - 22070 => 20356, 22071 => 22336, 22072 => 25351, 22073 => 27490, 22074 => 36286, - 22075 => 21482, 22076 => 26088, 22077 => 32440, 22078 => 24535, 22079 => 25370, - 22080 => 25527, 22081 => 33267, 22082 => 33268, 22083 => 32622, 22084 => 24092, - 22085 => 23769, 22086 => 21046, 22087 => 26234, 22088 => 31209, 22089 => 31258, - 22090 => 36136, 22091 => 28825, 22092 => 30164, 22093 => 28382, 22094 => 27835, - 22095 => 31378, 22096 => 20013, 22097 => 30405, 22098 => 24544, 22099 => 38047, - 22100 => 34935, 22101 => 32456, 22102 => 31181, 22103 => 32959, 22104 => 37325, - 22105 => 20210, 22106 => 20247, 22107 => 33311, 22108 => 21608, 22109 => 24030, - 22110 => 27954, 22111 => 35788, 22112 => 31909, 22113 => 36724, 22114 => 32920, - 22115 => 24090, 22116 => 21650, 22117 => 30385, 22118 => 23449, 22119 => 26172, - 22120 => 39588, 22121 => 29664, 22122 => 26666, 22123 => 34523, 22124 => 26417, - 22125 => 29482, 22126 => 35832, 22127 => 35803, 22128 => 36880, 22129 => 31481, - 22130 => 28891, 22131 => 29038, 22132 => 25284, 22133 => 30633, 22134 => 22065, - 22135 => 20027, 22136 => 33879, 22137 => 26609, 22138 => 21161, 22139 => 34496, - 22140 => 36142, 22141 => 38136, 22142 => 31569, 22305 => 20303, 22306 => 27880, - 22307 => 31069, 22308 => 39547, 22309 => 25235, 22310 => 29226, 22311 => 25341, - 22312 => 19987, 22313 => 30742, 22314 => 36716, 22315 => 25776, 22316 => 36186, - 22317 => 31686, 22318 => 26729, 22319 => 24196, 22320 => 35013, 22321 => 22918, - 22322 => 25758, 22323 => 22766, 22324 => 29366, 22325 => 26894, 22326 => 38181, - 22327 => 36861, 22328 => 36184, 22329 => 22368, 22330 => 32512, 22331 => 35846, - 22332 => 20934, 22333 => 25417, 22334 => 25305, 22335 => 21331, 22336 => 26700, - 22337 => 29730, 22338 => 33537, 22339 => 37196, 22340 => 21828, 22341 => 30528, - 22342 => 28796, 22343 => 27978, 22344 => 20857, 22345 => 21672, 22346 => 36164, - 22347 => 23039, 22348 => 28363, 22349 => 28100, 22350 => 23388, 22351 => 32043, - 22352 => 20180, 22353 => 31869, 22354 => 28371, 22355 => 23376, 22356 => 33258, - 22357 => 28173, 22358 => 23383, 22359 => 39683, 22360 => 26837, 22361 => 36394, - 22362 => 23447, 22363 => 32508, 22364 => 24635, 22365 => 32437, 22366 => 37049, - 22367 => 36208, 22368 => 22863, 22369 => 25549, 22370 => 31199, 22371 => 36275, - 22372 => 21330, 22373 => 26063, 22374 => 31062, 22375 => 35781, 22376 => 38459, - 22377 => 32452, 22378 => 38075, 22379 => 32386, 22380 => 22068, 22381 => 37257, - 22382 => 26368, 22383 => 32618, 22384 => 23562, 22385 => 36981, 22386 => 26152, - 22387 => 24038, 22388 => 20304, 22389 => 26590, 22390 => 20570, 22391 => 20316, - 22392 => 22352, 22393 => 24231, 22561 => 20109, 22562 => 19980, 22563 => 20800, - 22564 => 19984, 22565 => 24319, 22566 => 21317, 22567 => 19989, 22568 => 20120, - 22569 => 19998, 22570 => 39730, 22571 => 23404, 22572 => 22121, 22573 => 20008, - 22574 => 31162, 22575 => 20031, 22576 => 21269, 22577 => 20039, 22578 => 22829, - 22579 => 29243, 22580 => 21358, 22581 => 27664, 22582 => 22239, 22583 => 32996, - 22584 => 39319, 22585 => 27603, 22586 => 30590, 22587 => 40727, 22588 => 20022, - 22589 => 20127, 22590 => 40720, 22591 => 20060, 22592 => 20073, 22593 => 20115, - 22594 => 33416, 22595 => 23387, 22596 => 21868, 22597 => 22031, 22598 => 20164, - 22599 => 21389, 22600 => 21405, 22601 => 21411, 22602 => 21413, 22603 => 21422, - 22604 => 38757, 22605 => 36189, 22606 => 21274, 22607 => 21493, 22608 => 21286, - 22609 => 21294, 22610 => 21310, 22611 => 36188, 22612 => 21350, 22613 => 21347, - 22614 => 20994, 22615 => 21000, 22616 => 21006, 22617 => 21037, 22618 => 21043, - 22619 => 21055, 22620 => 21056, 22621 => 21068, 22622 => 21086, 22623 => 21089, - 22624 => 21084, 22625 => 33967, 22626 => 21117, 22627 => 21122, 22628 => 21121, - 22629 => 21136, 22630 => 21139, 22631 => 20866, 22632 => 32596, 22633 => 20155, - 22634 => 20163, 22635 => 20169, 22636 => 20162, 22637 => 20200, 22638 => 20193, - 22639 => 20203, 22640 => 20190, 22641 => 20251, 22642 => 20211, 22643 => 20258, - 22644 => 20324, 22645 => 20213, 22646 => 20261, 22647 => 20263, 22648 => 20233, - 22649 => 20267, 22650 => 20318, 22651 => 20327, 22652 => 25912, 22653 => 20314, - 22654 => 20317, 22817 => 20319, 22818 => 20311, 22819 => 20274, 22820 => 20285, - 22821 => 20342, 22822 => 20340, 22823 => 20369, 22824 => 20361, 22825 => 20355, - 22826 => 20367, 22827 => 20350, 22828 => 20347, 22829 => 20394, 22830 => 20348, - 22831 => 20396, 22832 => 20372, 22833 => 20454, 22834 => 20456, 22835 => 20458, - 22836 => 20421, 22837 => 20442, 22838 => 20451, 22839 => 20444, 22840 => 20433, - 22841 => 20447, 22842 => 20472, 22843 => 20521, 22844 => 20556, 22845 => 20467, - 22846 => 20524, 22847 => 20495, 22848 => 20526, 22849 => 20525, 22850 => 20478, - 22851 => 20508, 22852 => 20492, 22853 => 20517, 22854 => 20520, 22855 => 20606, - 22856 => 20547, 22857 => 20565, 22858 => 20552, 22859 => 20558, 22860 => 20588, - 22861 => 20603, 22862 => 20645, 22863 => 20647, 22864 => 20649, 22865 => 20666, - 22866 => 20694, 22867 => 20742, 22868 => 20717, 22869 => 20716, 22870 => 20710, - 22871 => 20718, 22872 => 20743, 22873 => 20747, 22874 => 20189, 22875 => 27709, - 22876 => 20312, 22877 => 20325, 22878 => 20430, 22879 => 40864, 22880 => 27718, - 22881 => 31860, 22882 => 20846, 22883 => 24061, 22884 => 40649, 22885 => 39320, - 22886 => 20865, 22887 => 22804, 22888 => 21241, 22889 => 21261, 22890 => 35335, - 22891 => 21264, 22892 => 20971, 22893 => 22809, 22894 => 20821, 22895 => 20128, - 22896 => 20822, 22897 => 20147, 22898 => 34926, 22899 => 34980, 22900 => 20149, - 22901 => 33044, 22902 => 35026, 22903 => 31104, 22904 => 23348, 22905 => 34819, - 22906 => 32696, 22907 => 20907, 22908 => 20913, 22909 => 20925, 22910 => 20924, - 23073 => 20935, 23074 => 20886, 23075 => 20898, 23076 => 20901, 23077 => 35744, - 23078 => 35750, 23079 => 35751, 23080 => 35754, 23081 => 35764, 23082 => 35765, - 23083 => 35767, 23084 => 35778, 23085 => 35779, 23086 => 35787, 23087 => 35791, - 23088 => 35790, 23089 => 35794, 23090 => 35795, 23091 => 35796, 23092 => 35798, - 23093 => 35800, 23094 => 35801, 23095 => 35804, 23096 => 35807, 23097 => 35808, - 23098 => 35812, 23099 => 35816, 23100 => 35817, 23101 => 35822, 23102 => 35824, - 23103 => 35827, 23104 => 35830, 23105 => 35833, 23106 => 35836, 23107 => 35839, - 23108 => 35840, 23109 => 35842, 23110 => 35844, 23111 => 35847, 23112 => 35852, - 23113 => 35855, 23114 => 35857, 23115 => 35858, 23116 => 35860, 23117 => 35861, - 23118 => 35862, 23119 => 35865, 23120 => 35867, 23121 => 35864, 23122 => 35869, - 23123 => 35871, 23124 => 35872, 23125 => 35873, 23126 => 35877, 23127 => 35879, - 23128 => 35882, 23129 => 35883, 23130 => 35886, 23131 => 35887, 23132 => 35890, - 23133 => 35891, 23134 => 35893, 23135 => 35894, 23136 => 21353, 23137 => 21370, - 23138 => 38429, 23139 => 38434, 23140 => 38433, 23141 => 38449, 23142 => 38442, - 23143 => 38461, 23144 => 38460, 23145 => 38466, 23146 => 38473, 23147 => 38484, - 23148 => 38495, 23149 => 38503, 23150 => 38508, 23151 => 38514, 23152 => 38516, - 23153 => 38536, 23154 => 38541, 23155 => 38551, 23156 => 38576, 23157 => 37015, - 23158 => 37019, 23159 => 37021, 23160 => 37017, 23161 => 37036, 23162 => 37025, - 23163 => 37044, 23164 => 37043, 23165 => 37046, 23166 => 37050, 23329 => 37048, - 23330 => 37040, 23331 => 37071, 23332 => 37061, 23333 => 37054, 23334 => 37072, - 23335 => 37060, 23336 => 37063, 23337 => 37075, 23338 => 37094, 23339 => 37090, - 23340 => 37084, 23341 => 37079, 23342 => 37083, 23343 => 37099, 23344 => 37103, - 23345 => 37118, 23346 => 37124, 23347 => 37154, 23348 => 37150, 23349 => 37155, - 23350 => 37169, 23351 => 37167, 23352 => 37177, 23353 => 37187, 23354 => 37190, - 23355 => 21005, 23356 => 22850, 23357 => 21154, 23358 => 21164, 23359 => 21165, - 23360 => 21182, 23361 => 21759, 23362 => 21200, 23363 => 21206, 23364 => 21232, - 23365 => 21471, 23366 => 29166, 23367 => 30669, 23368 => 24308, 23369 => 20981, - 23370 => 20988, 23371 => 39727, 23372 => 21430, 23373 => 24321, 23374 => 30042, - 23375 => 24047, 23376 => 22348, 23377 => 22441, 23378 => 22433, 23379 => 22654, - 23380 => 22716, 23381 => 22725, 23382 => 22737, 23383 => 22313, 23384 => 22316, - 23385 => 22314, 23386 => 22323, 23387 => 22329, 23388 => 22318, 23389 => 22319, - 23390 => 22364, 23391 => 22331, 23392 => 22338, 23393 => 22377, 23394 => 22405, - 23395 => 22379, 23396 => 22406, 23397 => 22396, 23398 => 22395, 23399 => 22376, - 23400 => 22381, 23401 => 22390, 23402 => 22387, 23403 => 22445, 23404 => 22436, - 23405 => 22412, 23406 => 22450, 23407 => 22479, 23408 => 22439, 23409 => 22452, - 23410 => 22419, 23411 => 22432, 23412 => 22485, 23413 => 22488, 23414 => 22490, - 23415 => 22489, 23416 => 22482, 23417 => 22456, 23418 => 22516, 23419 => 22511, - 23420 => 22520, 23421 => 22500, 23422 => 22493, 23585 => 22539, 23586 => 22541, - 23587 => 22525, 23588 => 22509, 23589 => 22528, 23590 => 22558, 23591 => 22553, - 23592 => 22596, 23593 => 22560, 23594 => 22629, 23595 => 22636, 23596 => 22657, - 23597 => 22665, 23598 => 22682, 23599 => 22656, 23600 => 39336, 23601 => 40729, - 23602 => 25087, 23603 => 33401, 23604 => 33405, 23605 => 33407, 23606 => 33423, - 23607 => 33418, 23608 => 33448, 23609 => 33412, 23610 => 33422, 23611 => 33425, - 23612 => 33431, 23613 => 33433, 23614 => 33451, 23615 => 33464, 23616 => 33470, - 23617 => 33456, 23618 => 33480, 23619 => 33482, 23620 => 33507, 23621 => 33432, - 23622 => 33463, 23623 => 33454, 23624 => 33483, 23625 => 33484, 23626 => 33473, - 23627 => 33449, 23628 => 33460, 23629 => 33441, 23630 => 33450, 23631 => 33439, - 23632 => 33476, 23633 => 33486, 23634 => 33444, 23635 => 33505, 23636 => 33545, - 23637 => 33527, 23638 => 33508, 23639 => 33551, 23640 => 33543, 23641 => 33500, - 23642 => 33524, 23643 => 33490, 23644 => 33496, 23645 => 33548, 23646 => 33531, - 23647 => 33491, 23648 => 33553, 23649 => 33562, 23650 => 33542, 23651 => 33556, - 23652 => 33557, 23653 => 33504, 23654 => 33493, 23655 => 33564, 23656 => 33617, - 23657 => 33627, 23658 => 33628, 23659 => 33544, 23660 => 33682, 23661 => 33596, - 23662 => 33588, 23663 => 33585, 23664 => 33691, 23665 => 33630, 23666 => 33583, - 23667 => 33615, 23668 => 33607, 23669 => 33603, 23670 => 33631, 23671 => 33600, - 23672 => 33559, 23673 => 33632, 23674 => 33581, 23675 => 33594, 23676 => 33587, - 23677 => 33638, 23678 => 33637, 23841 => 33640, 23842 => 33563, 23843 => 33641, - 23844 => 33644, 23845 => 33642, 23846 => 33645, 23847 => 33646, 23848 => 33712, - 23849 => 33656, 23850 => 33715, 23851 => 33716, 23852 => 33696, 23853 => 33706, - 23854 => 33683, 23855 => 33692, 23856 => 33669, 23857 => 33660, 23858 => 33718, - 23859 => 33705, 23860 => 33661, 23861 => 33720, 23862 => 33659, 23863 => 33688, - 23864 => 33694, 23865 => 33704, 23866 => 33722, 23867 => 33724, 23868 => 33729, - 23869 => 33793, 23870 => 33765, 23871 => 33752, 23872 => 22535, 23873 => 33816, - 23874 => 33803, 23875 => 33757, 23876 => 33789, 23877 => 33750, 23878 => 33820, - 23879 => 33848, 23880 => 33809, 23881 => 33798, 23882 => 33748, 23883 => 33759, - 23884 => 33807, 23885 => 33795, 23886 => 33784, 23887 => 33785, 23888 => 33770, - 23889 => 33733, 23890 => 33728, 23891 => 33830, 23892 => 33776, 23893 => 33761, - 23894 => 33884, 23895 => 33873, 23896 => 33882, 23897 => 33881, 23898 => 33907, - 23899 => 33927, 23900 => 33928, 23901 => 33914, 23902 => 33929, 23903 => 33912, - 23904 => 33852, 23905 => 33862, 23906 => 33897, 23907 => 33910, 23908 => 33932, - 23909 => 33934, 23910 => 33841, 23911 => 33901, 23912 => 33985, 23913 => 33997, - 23914 => 34000, 23915 => 34022, 23916 => 33981, 23917 => 34003, 23918 => 33994, - 23919 => 33983, 23920 => 33978, 23921 => 34016, 23922 => 33953, 23923 => 33977, - 23924 => 33972, 23925 => 33943, 23926 => 34021, 23927 => 34019, 23928 => 34060, - 23929 => 29965, 23930 => 34104, 23931 => 34032, 23932 => 34105, 23933 => 34079, - 23934 => 34106, 24097 => 34134, 24098 => 34107, 24099 => 34047, 24100 => 34044, - 24101 => 34137, 24102 => 34120, 24103 => 34152, 24104 => 34148, 24105 => 34142, - 24106 => 34170, 24107 => 30626, 24108 => 34115, 24109 => 34162, 24110 => 34171, - 24111 => 34212, 24112 => 34216, 24113 => 34183, 24114 => 34191, 24115 => 34169, - 24116 => 34222, 24117 => 34204, 24118 => 34181, 24119 => 34233, 24120 => 34231, - 24121 => 34224, 24122 => 34259, 24123 => 34241, 24124 => 34268, 24125 => 34303, - 24126 => 34343, 24127 => 34309, 24128 => 34345, 24129 => 34326, 24130 => 34364, - 24131 => 24318, 24132 => 24328, 24133 => 22844, 24134 => 22849, 24135 => 32823, - 24136 => 22869, 24137 => 22874, 24138 => 22872, 24139 => 21263, 24140 => 23586, - 24141 => 23589, 24142 => 23596, 24143 => 23604, 24144 => 25164, 24145 => 25194, - 24146 => 25247, 24147 => 25275, 24148 => 25290, 24149 => 25306, 24150 => 25303, - 24151 => 25326, 24152 => 25378, 24153 => 25334, 24154 => 25401, 24155 => 25419, - 24156 => 25411, 24157 => 25517, 24158 => 25590, 24159 => 25457, 24160 => 25466, - 24161 => 25486, 24162 => 25524, 24163 => 25453, 24164 => 25516, 24165 => 25482, - 24166 => 25449, 24167 => 25518, 24168 => 25532, 24169 => 25586, 24170 => 25592, - 24171 => 25568, 24172 => 25599, 24173 => 25540, 24174 => 25566, 24175 => 25550, - 24176 => 25682, 24177 => 25542, 24178 => 25534, 24179 => 25669, 24180 => 25665, - 24181 => 25611, 24182 => 25627, 24183 => 25632, 24184 => 25612, 24185 => 25638, - 24186 => 25633, 24187 => 25694, 24188 => 25732, 24189 => 25709, 24190 => 25750, - 24353 => 25722, 24354 => 25783, 24355 => 25784, 24356 => 25753, 24357 => 25786, - 24358 => 25792, 24359 => 25808, 24360 => 25815, 24361 => 25828, 24362 => 25826, - 24363 => 25865, 24364 => 25893, 24365 => 25902, 24366 => 24331, 24367 => 24530, - 24368 => 29977, 24369 => 24337, 24370 => 21343, 24371 => 21489, 24372 => 21501, - 24373 => 21481, 24374 => 21480, 24375 => 21499, 24376 => 21522, 24377 => 21526, - 24378 => 21510, 24379 => 21579, 24380 => 21586, 24381 => 21587, 24382 => 21588, - 24383 => 21590, 24384 => 21571, 24385 => 21537, 24386 => 21591, 24387 => 21593, - 24388 => 21539, 24389 => 21554, 24390 => 21634, 24391 => 21652, 24392 => 21623, - 24393 => 21617, 24394 => 21604, 24395 => 21658, 24396 => 21659, 24397 => 21636, - 24398 => 21622, 24399 => 21606, 24400 => 21661, 24401 => 21712, 24402 => 21677, - 24403 => 21698, 24404 => 21684, 24405 => 21714, 24406 => 21671, 24407 => 21670, - 24408 => 21715, 24409 => 21716, 24410 => 21618, 24411 => 21667, 24412 => 21717, - 24413 => 21691, 24414 => 21695, 24415 => 21708, 24416 => 21721, 24417 => 21722, - 24418 => 21724, 24419 => 21673, 24420 => 21674, 24421 => 21668, 24422 => 21725, - 24423 => 21711, 24424 => 21726, 24425 => 21787, 24426 => 21735, 24427 => 21792, - 24428 => 21757, 24429 => 21780, 24430 => 21747, 24431 => 21794, 24432 => 21795, - 24433 => 21775, 24434 => 21777, 24435 => 21799, 24436 => 21802, 24437 => 21863, - 24438 => 21903, 24439 => 21941, 24440 => 21833, 24441 => 21869, 24442 => 21825, - 24443 => 21845, 24444 => 21823, 24445 => 21840, 24446 => 21820, 24609 => 21815, - 24610 => 21846, 24611 => 21877, 24612 => 21878, 24613 => 21879, 24614 => 21811, - 24615 => 21808, 24616 => 21852, 24617 => 21899, 24618 => 21970, 24619 => 21891, - 24620 => 21937, 24621 => 21945, 24622 => 21896, 24623 => 21889, 24624 => 21919, - 24625 => 21886, 24626 => 21974, 24627 => 21905, 24628 => 21883, 24629 => 21983, - 24630 => 21949, 24631 => 21950, 24632 => 21908, 24633 => 21913, 24634 => 21994, - 24635 => 22007, 24636 => 21961, 24637 => 22047, 24638 => 21969, 24639 => 21995, - 24640 => 21996, 24641 => 21972, 24642 => 21990, 24643 => 21981, 24644 => 21956, - 24645 => 21999, 24646 => 21989, 24647 => 22002, 24648 => 22003, 24649 => 21964, - 24650 => 21965, 24651 => 21992, 24652 => 22005, 24653 => 21988, 24654 => 36756, - 24655 => 22046, 24656 => 22024, 24657 => 22028, 24658 => 22017, 24659 => 22052, - 24660 => 22051, 24661 => 22014, 24662 => 22016, 24663 => 22055, 24664 => 22061, - 24665 => 22104, 24666 => 22073, 24667 => 22103, 24668 => 22060, 24669 => 22093, - 24670 => 22114, 24671 => 22105, 24672 => 22108, 24673 => 22092, 24674 => 22100, - 24675 => 22150, 24676 => 22116, 24677 => 22129, 24678 => 22123, 24679 => 22139, - 24680 => 22140, 24681 => 22149, 24682 => 22163, 24683 => 22191, 24684 => 22228, - 24685 => 22231, 24686 => 22237, 24687 => 22241, 24688 => 22261, 24689 => 22251, - 24690 => 22265, 24691 => 22271, 24692 => 22276, 24693 => 22282, 24694 => 22281, - 24695 => 22300, 24696 => 24079, 24697 => 24089, 24698 => 24084, 24699 => 24081, - 24700 => 24113, 24701 => 24123, 24702 => 24124, 24865 => 24119, 24866 => 24132, - 24867 => 24148, 24868 => 24155, 24869 => 24158, 24870 => 24161, 24871 => 23692, - 24872 => 23674, 24873 => 23693, 24874 => 23696, 24875 => 23702, 24876 => 23688, - 24877 => 23704, 24878 => 23705, 24879 => 23697, 24880 => 23706, 24881 => 23708, - 24882 => 23733, 24883 => 23714, 24884 => 23741, 24885 => 23724, 24886 => 23723, - 24887 => 23729, 24888 => 23715, 24889 => 23745, 24890 => 23735, 24891 => 23748, - 24892 => 23762, 24893 => 23780, 24894 => 23755, 24895 => 23781, 24896 => 23810, - 24897 => 23811, 24898 => 23847, 24899 => 23846, 24900 => 23854, 24901 => 23844, - 24902 => 23838, 24903 => 23814, 24904 => 23835, 24905 => 23896, 24906 => 23870, - 24907 => 23860, 24908 => 23869, 24909 => 23916, 24910 => 23899, 24911 => 23919, - 24912 => 23901, 24913 => 23915, 24914 => 23883, 24915 => 23882, 24916 => 23913, - 24917 => 23924, 24918 => 23938, 24919 => 23961, 24920 => 23965, 24921 => 35955, - 24922 => 23991, 24923 => 24005, 24924 => 24435, 24925 => 24439, 24926 => 24450, - 24927 => 24455, 24928 => 24457, 24929 => 24460, 24930 => 24469, 24931 => 24473, - 24932 => 24476, 24933 => 24488, 24934 => 24493, 24935 => 24501, 24936 => 24508, - 24937 => 34914, 24938 => 24417, 24939 => 29357, 24940 => 29360, 24941 => 29364, - 24942 => 29367, 24943 => 29368, 24944 => 29379, 24945 => 29377, 24946 => 29390, - 24947 => 29389, 24948 => 29394, 24949 => 29416, 24950 => 29423, 24951 => 29417, - 24952 => 29426, 24953 => 29428, 24954 => 29431, 24955 => 29441, 24956 => 29427, - 24957 => 29443, 24958 => 29434, 25121 => 29435, 25122 => 29463, 25123 => 29459, - 25124 => 29473, 25125 => 29450, 25126 => 29470, 25127 => 29469, 25128 => 29461, - 25129 => 29474, 25130 => 29497, 25131 => 29477, 25132 => 29484, 25133 => 29496, - 25134 => 29489, 25135 => 29520, 25136 => 29517, 25137 => 29527, 25138 => 29536, - 25139 => 29548, 25140 => 29551, 25141 => 29566, 25142 => 33307, 25143 => 22821, - 25144 => 39143, 25145 => 22820, 25146 => 22786, 25147 => 39267, 25148 => 39271, - 25149 => 39272, 25150 => 39273, 25151 => 39274, 25152 => 39275, 25153 => 39276, - 25154 => 39284, 25155 => 39287, 25156 => 39293, 25157 => 39296, 25158 => 39300, - 25159 => 39303, 25160 => 39306, 25161 => 39309, 25162 => 39312, 25163 => 39313, - 25164 => 39315, 25165 => 39316, 25166 => 39317, 25167 => 24192, 25168 => 24209, - 25169 => 24203, 25170 => 24214, 25171 => 24229, 25172 => 24224, 25173 => 24249, - 25174 => 24245, 25175 => 24254, 25176 => 24243, 25177 => 36179, 25178 => 24274, - 25179 => 24273, 25180 => 24283, 25181 => 24296, 25182 => 24298, 25183 => 33210, - 25184 => 24516, 25185 => 24521, 25186 => 24534, 25187 => 24527, 25188 => 24579, - 25189 => 24558, 25190 => 24580, 25191 => 24545, 25192 => 24548, 25193 => 24574, - 25194 => 24581, 25195 => 24582, 25196 => 24554, 25197 => 24557, 25198 => 24568, - 25199 => 24601, 25200 => 24629, 25201 => 24614, 25202 => 24603, 25203 => 24591, - 25204 => 24589, 25205 => 24617, 25206 => 24619, 25207 => 24586, 25208 => 24639, - 25209 => 24609, 25210 => 24696, 25211 => 24697, 25212 => 24699, 25213 => 24698, - 25214 => 24642, 25377 => 24682, 25378 => 24701, 25379 => 24726, 25380 => 24730, - 25381 => 24749, 25382 => 24733, 25383 => 24707, 25384 => 24722, 25385 => 24716, - 25386 => 24731, 25387 => 24812, 25388 => 24763, 25389 => 24753, 25390 => 24797, - 25391 => 24792, 25392 => 24774, 25393 => 24794, 25394 => 24756, 25395 => 24864, - 25396 => 24870, 25397 => 24853, 25398 => 24867, 25399 => 24820, 25400 => 24832, - 25401 => 24846, 25402 => 24875, 25403 => 24906, 25404 => 24949, 25405 => 25004, - 25406 => 24980, 25407 => 24999, 25408 => 25015, 25409 => 25044, 25410 => 25077, - 25411 => 24541, 25412 => 38579, 25413 => 38377, 25414 => 38379, 25415 => 38385, - 25416 => 38387, 25417 => 38389, 25418 => 38390, 25419 => 38396, 25420 => 38398, - 25421 => 38403, 25422 => 38404, 25423 => 38406, 25424 => 38408, 25425 => 38410, - 25426 => 38411, 25427 => 38412, 25428 => 38413, 25429 => 38415, 25430 => 38418, - 25431 => 38421, 25432 => 38422, 25433 => 38423, 25434 => 38425, 25435 => 38426, - 25436 => 20012, 25437 => 29247, 25438 => 25109, 25439 => 27701, 25440 => 27732, - 25441 => 27740, 25442 => 27722, 25443 => 27811, 25444 => 27781, 25445 => 27792, - 25446 => 27796, 25447 => 27788, 25448 => 27752, 25449 => 27753, 25450 => 27764, - 25451 => 27766, 25452 => 27782, 25453 => 27817, 25454 => 27856, 25455 => 27860, - 25456 => 27821, 25457 => 27895, 25458 => 27896, 25459 => 27889, 25460 => 27863, - 25461 => 27826, 25462 => 27872, 25463 => 27862, 25464 => 27898, 25465 => 27883, - 25466 => 27886, 25467 => 27825, 25468 => 27859, 25469 => 27887, 25470 => 27902, - 25633 => 27961, 25634 => 27943, 25635 => 27916, 25636 => 27971, 25637 => 27976, - 25638 => 27911, 25639 => 27908, 25640 => 27929, 25641 => 27918, 25642 => 27947, - 25643 => 27981, 25644 => 27950, 25645 => 27957, 25646 => 27930, 25647 => 27983, - 25648 => 27986, 25649 => 27988, 25650 => 27955, 25651 => 28049, 25652 => 28015, - 25653 => 28062, 25654 => 28064, 25655 => 27998, 25656 => 28051, 25657 => 28052, - 25658 => 27996, 25659 => 28000, 25660 => 28028, 25661 => 28003, 25662 => 28186, - 25663 => 28103, 25664 => 28101, 25665 => 28126, 25666 => 28174, 25667 => 28095, - 25668 => 28128, 25669 => 28177, 25670 => 28134, 25671 => 28125, 25672 => 28121, - 25673 => 28182, 25674 => 28075, 25675 => 28172, 25676 => 28078, 25677 => 28203, - 25678 => 28270, 25679 => 28238, 25680 => 28267, 25681 => 28338, 25682 => 28255, - 25683 => 28294, 25684 => 28243, 25685 => 28244, 25686 => 28210, 25687 => 28197, - 25688 => 28228, 25689 => 28383, 25690 => 28337, 25691 => 28312, 25692 => 28384, - 25693 => 28461, 25694 => 28386, 25695 => 28325, 25696 => 28327, 25697 => 28349, - 25698 => 28347, 25699 => 28343, 25700 => 28375, 25701 => 28340, 25702 => 28367, - 25703 => 28303, 25704 => 28354, 25705 => 28319, 25706 => 28514, 25707 => 28486, - 25708 => 28487, 25709 => 28452, 25710 => 28437, 25711 => 28409, 25712 => 28463, - 25713 => 28470, 25714 => 28491, 25715 => 28532, 25716 => 28458, 25717 => 28425, - 25718 => 28457, 25719 => 28553, 25720 => 28557, 25721 => 28556, 25722 => 28536, - 25723 => 28530, 25724 => 28540, 25725 => 28538, 25726 => 28625, 25889 => 28617, - 25890 => 28583, 25891 => 28601, 25892 => 28598, 25893 => 28610, 25894 => 28641, - 25895 => 28654, 25896 => 28638, 25897 => 28640, 25898 => 28655, 25899 => 28698, - 25900 => 28707, 25901 => 28699, 25902 => 28729, 25903 => 28725, 25904 => 28751, - 25905 => 28766, 25906 => 23424, 25907 => 23428, 25908 => 23445, 25909 => 23443, - 25910 => 23461, 25911 => 23480, 25912 => 29999, 25913 => 39582, 25914 => 25652, - 25915 => 23524, 25916 => 23534, 25917 => 35120, 25918 => 23536, 25919 => 36423, - 25920 => 35591, 25921 => 36790, 25922 => 36819, 25923 => 36821, 25924 => 36837, - 25925 => 36846, 25926 => 36836, 25927 => 36841, 25928 => 36838, 25929 => 36851, - 25930 => 36840, 25931 => 36869, 25932 => 36868, 25933 => 36875, 25934 => 36902, - 25935 => 36881, 25936 => 36877, 25937 => 36886, 25938 => 36897, 25939 => 36917, - 25940 => 36918, 25941 => 36909, 25942 => 36911, 25943 => 36932, 25944 => 36945, - 25945 => 36946, 25946 => 36944, 25947 => 36968, 25948 => 36952, 25949 => 36962, - 25950 => 36955, 25951 => 26297, 25952 => 36980, 25953 => 36989, 25954 => 36994, - 25955 => 37000, 25956 => 36995, 25957 => 37003, 25958 => 24400, 25959 => 24407, - 25960 => 24406, 25961 => 24408, 25962 => 23611, 25963 => 21675, 25964 => 23632, - 25965 => 23641, 25966 => 23409, 25967 => 23651, 25968 => 23654, 25969 => 32700, - 25970 => 24362, 25971 => 24361, 25972 => 24365, 25973 => 33396, 25974 => 24380, - 25975 => 39739, 25976 => 23662, 25977 => 22913, 25978 => 22915, 25979 => 22925, - 25980 => 22953, 25981 => 22954, 25982 => 22947, 26145 => 22935, 26146 => 22986, - 26147 => 22955, 26148 => 22942, 26149 => 22948, 26150 => 22994, 26151 => 22962, - 26152 => 22959, 26153 => 22999, 26154 => 22974, 26155 => 23045, 26156 => 23046, - 26157 => 23005, 26158 => 23048, 26159 => 23011, 26160 => 23000, 26161 => 23033, - 26162 => 23052, 26163 => 23049, 26164 => 23090, 26165 => 23092, 26166 => 23057, - 26167 => 23075, 26168 => 23059, 26169 => 23104, 26170 => 23143, 26171 => 23114, - 26172 => 23125, 26173 => 23100, 26174 => 23138, 26175 => 23157, 26176 => 33004, - 26177 => 23210, 26178 => 23195, 26179 => 23159, 26180 => 23162, 26181 => 23230, - 26182 => 23275, 26183 => 23218, 26184 => 23250, 26185 => 23252, 26186 => 23224, - 26187 => 23264, 26188 => 23267, 26189 => 23281, 26190 => 23254, 26191 => 23270, - 26192 => 23256, 26193 => 23260, 26194 => 23305, 26195 => 23319, 26196 => 23318, - 26197 => 23346, 26198 => 23351, 26199 => 23360, 26200 => 23573, 26201 => 23580, - 26202 => 23386, 26203 => 23397, 26204 => 23411, 26205 => 23377, 26206 => 23379, - 26207 => 23394, 26208 => 39541, 26209 => 39543, 26210 => 39544, 26211 => 39546, - 26212 => 39551, 26213 => 39549, 26214 => 39552, 26215 => 39553, 26216 => 39557, - 26217 => 39560, 26218 => 39562, 26219 => 39568, 26220 => 39570, 26221 => 39571, - 26222 => 39574, 26223 => 39576, 26224 => 39579, 26225 => 39580, 26226 => 39581, - 26227 => 39583, 26228 => 39584, 26229 => 39586, 26230 => 39587, 26231 => 39589, - 26232 => 39591, 26233 => 32415, 26234 => 32417, 26235 => 32419, 26236 => 32421, - 26237 => 32424, 26238 => 32425, 26401 => 32429, 26402 => 32432, 26403 => 32446, - 26404 => 32448, 26405 => 32449, 26406 => 32450, 26407 => 32457, 26408 => 32459, - 26409 => 32460, 26410 => 32464, 26411 => 32468, 26412 => 32471, 26413 => 32475, - 26414 => 32480, 26415 => 32481, 26416 => 32488, 26417 => 32491, 26418 => 32494, - 26419 => 32495, 26420 => 32497, 26421 => 32498, 26422 => 32525, 26423 => 32502, - 26424 => 32506, 26425 => 32507, 26426 => 32510, 26427 => 32513, 26428 => 32514, - 26429 => 32515, 26430 => 32519, 26431 => 32520, 26432 => 32523, 26433 => 32524, - 26434 => 32527, 26435 => 32529, 26436 => 32530, 26437 => 32535, 26438 => 32537, - 26439 => 32540, 26440 => 32539, 26441 => 32543, 26442 => 32545, 26443 => 32546, - 26444 => 32547, 26445 => 32548, 26446 => 32549, 26447 => 32550, 26448 => 32551, - 26449 => 32554, 26450 => 32555, 26451 => 32556, 26452 => 32557, 26453 => 32559, - 26454 => 32560, 26455 => 32561, 26456 => 32562, 26457 => 32563, 26458 => 32565, - 26459 => 24186, 26460 => 30079, 26461 => 24027, 26462 => 30014, 26463 => 37013, - 26464 => 29582, 26465 => 29585, 26466 => 29614, 26467 => 29602, 26468 => 29599, - 26469 => 29647, 26470 => 29634, 26471 => 29649, 26472 => 29623, 26473 => 29619, - 26474 => 29632, 26475 => 29641, 26476 => 29640, 26477 => 29669, 26478 => 29657, - 26479 => 39036, 26480 => 29706, 26481 => 29673, 26482 => 29671, 26483 => 29662, - 26484 => 29626, 26485 => 29682, 26486 => 29711, 26487 => 29738, 26488 => 29787, - 26489 => 29734, 26490 => 29733, 26491 => 29736, 26492 => 29744, 26493 => 29742, - 26494 => 29740, 26657 => 29723, 26658 => 29722, 26659 => 29761, 26660 => 29788, - 26661 => 29783, 26662 => 29781, 26663 => 29785, 26664 => 29815, 26665 => 29805, - 26666 => 29822, 26667 => 29852, 26668 => 29838, 26669 => 29824, 26670 => 29825, - 26671 => 29831, 26672 => 29835, 26673 => 29854, 26674 => 29864, 26675 => 29865, - 26676 => 29840, 26677 => 29863, 26678 => 29906, 26679 => 29882, 26680 => 38890, - 26681 => 38891, 26682 => 38892, 26683 => 26444, 26684 => 26451, 26685 => 26462, - 26686 => 26440, 26687 => 26473, 26688 => 26533, 26689 => 26503, 26690 => 26474, - 26691 => 26483, 26692 => 26520, 26693 => 26535, 26694 => 26485, 26695 => 26536, - 26696 => 26526, 26697 => 26541, 26698 => 26507, 26699 => 26487, 26700 => 26492, - 26701 => 26608, 26702 => 26633, 26703 => 26584, 26704 => 26634, 26705 => 26601, - 26706 => 26544, 26707 => 26636, 26708 => 26585, 26709 => 26549, 26710 => 26586, - 26711 => 26547, 26712 => 26589, 26713 => 26624, 26714 => 26563, 26715 => 26552, - 26716 => 26594, 26717 => 26638, 26718 => 26561, 26719 => 26621, 26720 => 26674, - 26721 => 26675, 26722 => 26720, 26723 => 26721, 26724 => 26702, 26725 => 26722, - 26726 => 26692, 26727 => 26724, 26728 => 26755, 26729 => 26653, 26730 => 26709, - 26731 => 26726, 26732 => 26689, 26733 => 26727, 26734 => 26688, 26735 => 26686, - 26736 => 26698, 26737 => 26697, 26738 => 26665, 26739 => 26805, 26740 => 26767, - 26741 => 26740, 26742 => 26743, 26743 => 26771, 26744 => 26731, 26745 => 26818, - 26746 => 26990, 26747 => 26876, 26748 => 26911, 26749 => 26912, 26750 => 26873, - 26913 => 26916, 26914 => 26864, 26915 => 26891, 26916 => 26881, 26917 => 26967, - 26918 => 26851, 26919 => 26896, 26920 => 26993, 26921 => 26937, 26922 => 26976, - 26923 => 26946, 26924 => 26973, 26925 => 27012, 26926 => 26987, 26927 => 27008, - 26928 => 27032, 26929 => 27000, 26930 => 26932, 26931 => 27084, 26932 => 27015, - 26933 => 27016, 26934 => 27086, 26935 => 27017, 26936 => 26982, 26937 => 26979, - 26938 => 27001, 26939 => 27035, 26940 => 27047, 26941 => 27067, 26942 => 27051, - 26943 => 27053, 26944 => 27092, 26945 => 27057, 26946 => 27073, 26947 => 27082, - 26948 => 27103, 26949 => 27029, 26950 => 27104, 26951 => 27021, 26952 => 27135, - 26953 => 27183, 26954 => 27117, 26955 => 27159, 26956 => 27160, 26957 => 27237, - 26958 => 27122, 26959 => 27204, 26960 => 27198, 26961 => 27296, 26962 => 27216, - 26963 => 27227, 26964 => 27189, 26965 => 27278, 26966 => 27257, 26967 => 27197, - 26968 => 27176, 26969 => 27224, 26970 => 27260, 26971 => 27281, 26972 => 27280, - 26973 => 27305, 26974 => 27287, 26975 => 27307, 26976 => 29495, 26977 => 29522, - 26978 => 27521, 26979 => 27522, 26980 => 27527, 26981 => 27524, 26982 => 27538, - 26983 => 27539, 26984 => 27533, 26985 => 27546, 26986 => 27547, 26987 => 27553, - 26988 => 27562, 26989 => 36715, 26990 => 36717, 26991 => 36721, 26992 => 36722, - 26993 => 36723, 26994 => 36725, 26995 => 36726, 26996 => 36728, 26997 => 36727, - 26998 => 36729, 26999 => 36730, 27000 => 36732, 27001 => 36734, 27002 => 36737, - 27003 => 36738, 27004 => 36740, 27005 => 36743, 27006 => 36747, 27169 => 36749, - 27170 => 36750, 27171 => 36751, 27172 => 36760, 27173 => 36762, 27174 => 36558, - 27175 => 25099, 27176 => 25111, 27177 => 25115, 27178 => 25119, 27179 => 25122, - 27180 => 25121, 27181 => 25125, 27182 => 25124, 27183 => 25132, 27184 => 33255, - 27185 => 29935, 27186 => 29940, 27187 => 29951, 27188 => 29967, 27189 => 29969, - 27190 => 29971, 27191 => 25908, 27192 => 26094, 27193 => 26095, 27194 => 26096, - 27195 => 26122, 27196 => 26137, 27197 => 26482, 27198 => 26115, 27199 => 26133, - 27200 => 26112, 27201 => 28805, 27202 => 26359, 27203 => 26141, 27204 => 26164, - 27205 => 26161, 27206 => 26166, 27207 => 26165, 27208 => 32774, 27209 => 26207, - 27210 => 26196, 27211 => 26177, 27212 => 26191, 27213 => 26198, 27214 => 26209, - 27215 => 26199, 27216 => 26231, 27217 => 26244, 27218 => 26252, 27219 => 26279, - 27220 => 26269, 27221 => 26302, 27222 => 26331, 27223 => 26332, 27224 => 26342, - 27225 => 26345, 27226 => 36146, 27227 => 36147, 27228 => 36150, 27229 => 36155, - 27230 => 36157, 27231 => 36160, 27232 => 36165, 27233 => 36166, 27234 => 36168, - 27235 => 36169, 27236 => 36167, 27237 => 36173, 27238 => 36181, 27239 => 36185, - 27240 => 35271, 27241 => 35274, 27242 => 35275, 27243 => 35276, 27244 => 35278, - 27245 => 35279, 27246 => 35280, 27247 => 35281, 27248 => 29294, 27249 => 29343, - 27250 => 29277, 27251 => 29286, 27252 => 29295, 27253 => 29310, 27254 => 29311, - 27255 => 29316, 27256 => 29323, 27257 => 29325, 27258 => 29327, 27259 => 29330, - 27260 => 25352, 27261 => 25394, 27262 => 25520, 27425 => 25663, 27426 => 25816, - 27427 => 32772, 27428 => 27626, 27429 => 27635, 27430 => 27645, 27431 => 27637, - 27432 => 27641, 27433 => 27653, 27434 => 27655, 27435 => 27654, 27436 => 27661, - 27437 => 27669, 27438 => 27672, 27439 => 27673, 27440 => 27674, 27441 => 27681, - 27442 => 27689, 27443 => 27684, 27444 => 27690, 27445 => 27698, 27446 => 25909, - 27447 => 25941, 27448 => 25963, 27449 => 29261, 27450 => 29266, 27451 => 29270, - 27452 => 29232, 27453 => 34402, 27454 => 21014, 27455 => 32927, 27456 => 32924, - 27457 => 32915, 27458 => 32956, 27459 => 26378, 27460 => 32957, 27461 => 32945, - 27462 => 32939, 27463 => 32941, 27464 => 32948, 27465 => 32951, 27466 => 32999, - 27467 => 33000, 27468 => 33001, 27469 => 33002, 27470 => 32987, 27471 => 32962, - 27472 => 32964, 27473 => 32985, 27474 => 32973, 27475 => 32983, 27476 => 26384, - 27477 => 32989, 27478 => 33003, 27479 => 33009, 27480 => 33012, 27481 => 33005, - 27482 => 33037, 27483 => 33038, 27484 => 33010, 27485 => 33020, 27486 => 26389, - 27487 => 33042, 27488 => 35930, 27489 => 33078, 27490 => 33054, 27491 => 33068, - 27492 => 33048, 27493 => 33074, 27494 => 33096, 27495 => 33100, 27496 => 33107, - 27497 => 33140, 27498 => 33113, 27499 => 33114, 27500 => 33137, 27501 => 33120, - 27502 => 33129, 27503 => 33148, 27504 => 33149, 27505 => 33133, 27506 => 33127, - 27507 => 22605, 27508 => 23221, 27509 => 33160, 27510 => 33154, 27511 => 33169, - 27512 => 28373, 27513 => 33187, 27514 => 33194, 27515 => 33228, 27516 => 26406, - 27517 => 33226, 27518 => 33211, 27681 => 33217, 27682 => 33190, 27683 => 27428, - 27684 => 27447, 27685 => 27449, 27686 => 27459, 27687 => 27462, 27688 => 27481, - 27689 => 39121, 27690 => 39122, 27691 => 39123, 27692 => 39125, 27693 => 39129, - 27694 => 39130, 27695 => 27571, 27696 => 24384, 27697 => 27586, 27698 => 35315, - 27699 => 26000, 27700 => 40785, 27701 => 26003, 27702 => 26044, 27703 => 26054, - 27704 => 26052, 27705 => 26051, 27706 => 26060, 27707 => 26062, 27708 => 26066, - 27709 => 26070, 27710 => 28800, 27711 => 28828, 27712 => 28822, 27713 => 28829, - 27714 => 28859, 27715 => 28864, 27716 => 28855, 27717 => 28843, 27718 => 28849, - 27719 => 28904, 27720 => 28874, 27721 => 28944, 27722 => 28947, 27723 => 28950, - 27724 => 28975, 27725 => 28977, 27726 => 29043, 27727 => 29020, 27728 => 29032, - 27729 => 28997, 27730 => 29042, 27731 => 29002, 27732 => 29048, 27733 => 29050, - 27734 => 29080, 27735 => 29107, 27736 => 29109, 27737 => 29096, 27738 => 29088, - 27739 => 29152, 27740 => 29140, 27741 => 29159, 27742 => 29177, 27743 => 29213, - 27744 => 29224, 27745 => 28780, 27746 => 28952, 27747 => 29030, 27748 => 29113, - 27749 => 25150, 27750 => 25149, 27751 => 25155, 27752 => 25160, 27753 => 25161, - 27754 => 31035, 27755 => 31040, 27756 => 31046, 27757 => 31049, 27758 => 31067, - 27759 => 31068, 27760 => 31059, 27761 => 31066, 27762 => 31074, 27763 => 31063, - 27764 => 31072, 27765 => 31087, 27766 => 31079, 27767 => 31098, 27768 => 31109, - 27769 => 31114, 27770 => 31130, 27771 => 31143, 27772 => 31155, 27773 => 24529, - 27774 => 24528, 27937 => 24636, 27938 => 24669, 27939 => 24666, 27940 => 24679, - 27941 => 24641, 27942 => 24665, 27943 => 24675, 27944 => 24747, 27945 => 24838, - 27946 => 24845, 27947 => 24925, 27948 => 25001, 27949 => 24989, 27950 => 25035, - 27951 => 25041, 27952 => 25094, 27953 => 32896, 27954 => 32895, 27955 => 27795, - 27956 => 27894, 27957 => 28156, 27958 => 30710, 27959 => 30712, 27960 => 30720, - 27961 => 30729, 27962 => 30743, 27963 => 30744, 27964 => 30737, 27965 => 26027, - 27966 => 30765, 27967 => 30748, 27968 => 30749, 27969 => 30777, 27970 => 30778, - 27971 => 30779, 27972 => 30751, 27973 => 30780, 27974 => 30757, 27975 => 30764, - 27976 => 30755, 27977 => 30761, 27978 => 30798, 27979 => 30829, 27980 => 30806, - 27981 => 30807, 27982 => 30758, 27983 => 30800, 27984 => 30791, 27985 => 30796, - 27986 => 30826, 27987 => 30875, 27988 => 30867, 27989 => 30874, 27990 => 30855, - 27991 => 30876, 27992 => 30881, 27993 => 30883, 27994 => 30898, 27995 => 30905, - 27996 => 30885, 27997 => 30932, 27998 => 30937, 27999 => 30921, 28000 => 30956, - 28001 => 30962, 28002 => 30981, 28003 => 30964, 28004 => 30995, 28005 => 31012, - 28006 => 31006, 28007 => 31028, 28008 => 40859, 28009 => 40697, 28010 => 40699, - 28011 => 40700, 28012 => 30449, 28013 => 30468, 28014 => 30477, 28015 => 30457, - 28016 => 30471, 28017 => 30472, 28018 => 30490, 28019 => 30498, 28020 => 30489, - 28021 => 30509, 28022 => 30502, 28023 => 30517, 28024 => 30520, 28025 => 30544, - 28026 => 30545, 28027 => 30535, 28028 => 30531, 28029 => 30554, 28030 => 30568, - 28193 => 30562, 28194 => 30565, 28195 => 30591, 28196 => 30605, 28197 => 30589, - 28198 => 30592, 28199 => 30604, 28200 => 30609, 28201 => 30623, 28202 => 30624, - 28203 => 30640, 28204 => 30645, 28205 => 30653, 28206 => 30010, 28207 => 30016, - 28208 => 30030, 28209 => 30027, 28210 => 30024, 28211 => 30043, 28212 => 30066, - 28213 => 30073, 28214 => 30083, 28215 => 32600, 28216 => 32609, 28217 => 32607, - 28218 => 35400, 28219 => 32616, 28220 => 32628, 28221 => 32625, 28222 => 32633, - 28223 => 32641, 28224 => 32638, 28225 => 30413, 28226 => 30437, 28227 => 34866, - 28228 => 38021, 28229 => 38022, 28230 => 38023, 28231 => 38027, 28232 => 38026, - 28233 => 38028, 28234 => 38029, 28235 => 38031, 28236 => 38032, 28237 => 38036, - 28238 => 38039, 28239 => 38037, 28240 => 38042, 28241 => 38043, 28242 => 38044, - 28243 => 38051, 28244 => 38052, 28245 => 38059, 28246 => 38058, 28247 => 38061, - 28248 => 38060, 28249 => 38063, 28250 => 38064, 28251 => 38066, 28252 => 38068, - 28253 => 38070, 28254 => 38071, 28255 => 38072, 28256 => 38073, 28257 => 38074, - 28258 => 38076, 28259 => 38077, 28260 => 38079, 28261 => 38084, 28262 => 38088, - 28263 => 38089, 28264 => 38090, 28265 => 38091, 28266 => 38092, 28267 => 38093, - 28268 => 38094, 28269 => 38096, 28270 => 38097, 28271 => 38098, 28272 => 38101, - 28273 => 38102, 28274 => 38103, 28275 => 38105, 28276 => 38104, 28277 => 38107, - 28278 => 38110, 28279 => 38111, 28280 => 38112, 28281 => 38114, 28282 => 38116, - 28283 => 38117, 28284 => 38119, 28285 => 38120, 28286 => 38122, 28449 => 38121, - 28450 => 38123, 28451 => 38126, 28452 => 38127, 28453 => 38131, 28454 => 38132, - 28455 => 38133, 28456 => 38135, 28457 => 38137, 28458 => 38140, 28459 => 38141, - 28460 => 38143, 28461 => 38147, 28462 => 38146, 28463 => 38150, 28464 => 38151, - 28465 => 38153, 28466 => 38154, 28467 => 38157, 28468 => 38158, 28469 => 38159, - 28470 => 38162, 28471 => 38163, 28472 => 38164, 28473 => 38165, 28474 => 38166, - 28475 => 38168, 28476 => 38171, 28477 => 38173, 28478 => 38174, 28479 => 38175, - 28480 => 38178, 28481 => 38186, 28482 => 38187, 28483 => 38185, 28484 => 38188, - 28485 => 38193, 28486 => 38194, 28487 => 38196, 28488 => 38198, 28489 => 38199, - 28490 => 38200, 28491 => 38204, 28492 => 38206, 28493 => 38207, 28494 => 38210, - 28495 => 38197, 28496 => 38212, 28497 => 38213, 28498 => 38214, 28499 => 38217, - 28500 => 38220, 28501 => 38222, 28502 => 38223, 28503 => 38226, 28504 => 38227, - 28505 => 38228, 28506 => 38230, 28507 => 38231, 28508 => 38232, 28509 => 38233, - 28510 => 38235, 28511 => 38238, 28512 => 38239, 28513 => 38237, 28514 => 38241, - 28515 => 38242, 28516 => 38244, 28517 => 38245, 28518 => 38246, 28519 => 38247, - 28520 => 38248, 28521 => 38249, 28522 => 38250, 28523 => 38251, 28524 => 38252, - 28525 => 38255, 28526 => 38257, 28527 => 38258, 28528 => 38259, 28529 => 38202, - 28530 => 30695, 28531 => 30700, 28532 => 38601, 28533 => 31189, 28534 => 31213, - 28535 => 31203, 28536 => 31211, 28537 => 31238, 28538 => 23879, 28539 => 31235, - 28540 => 31234, 28541 => 31262, 28542 => 31252, 28705 => 31289, 28706 => 31287, - 28707 => 31313, 28708 => 40655, 28709 => 39333, 28710 => 31344, 28711 => 30344, - 28712 => 30350, 28713 => 30355, 28714 => 30361, 28715 => 30372, 28716 => 29918, - 28717 => 29920, 28718 => 29996, 28719 => 40480, 28720 => 40482, 28721 => 40488, - 28722 => 40489, 28723 => 40490, 28724 => 40491, 28725 => 40492, 28726 => 40498, - 28727 => 40497, 28728 => 40502, 28729 => 40504, 28730 => 40503, 28731 => 40505, - 28732 => 40506, 28733 => 40510, 28734 => 40513, 28735 => 40514, 28736 => 40516, - 28737 => 40518, 28738 => 40519, 28739 => 40520, 28740 => 40521, 28741 => 40523, - 28742 => 40524, 28743 => 40526, 28744 => 40529, 28745 => 40533, 28746 => 40535, - 28747 => 40538, 28748 => 40539, 28749 => 40540, 28750 => 40542, 28751 => 40547, - 28752 => 40550, 28753 => 40551, 28754 => 40552, 28755 => 40553, 28756 => 40554, - 28757 => 40555, 28758 => 40556, 28759 => 40561, 28760 => 40557, 28761 => 40563, - 28762 => 30098, 28763 => 30100, 28764 => 30102, 28765 => 30112, 28766 => 30109, - 28767 => 30124, 28768 => 30115, 28769 => 30131, 28770 => 30132, 28771 => 30136, - 28772 => 30148, 28773 => 30129, 28774 => 30128, 28775 => 30147, 28776 => 30146, - 28777 => 30166, 28778 => 30157, 28779 => 30179, 28780 => 30184, 28781 => 30182, - 28782 => 30180, 28783 => 30187, 28784 => 30183, 28785 => 30211, 28786 => 30193, - 28787 => 30204, 28788 => 30207, 28789 => 30224, 28790 => 30208, 28791 => 30213, - 28792 => 30220, 28793 => 30231, 28794 => 30218, 28795 => 30245, 28796 => 30232, - 28797 => 30229, 28798 => 30233, 28961 => 30235, 28962 => 30268, 28963 => 30242, - 28964 => 30240, 28965 => 30272, 28966 => 30253, 28967 => 30256, 28968 => 30271, - 28969 => 30261, 28970 => 30275, 28971 => 30270, 28972 => 30259, 28973 => 30285, - 28974 => 30302, 28975 => 30292, 28976 => 30300, 28977 => 30294, 28978 => 30315, - 28979 => 30319, 28980 => 32714, 28981 => 31462, 28982 => 31352, 28983 => 31353, - 28984 => 31360, 28985 => 31366, 28986 => 31368, 28987 => 31381, 28988 => 31398, - 28989 => 31392, 28990 => 31404, 28991 => 31400, 28992 => 31405, 28993 => 31411, - 28994 => 34916, 28995 => 34921, 28996 => 34930, 28997 => 34941, 28998 => 34943, - 28999 => 34946, 29000 => 34978, 29001 => 35014, 29002 => 34999, 29003 => 35004, - 29004 => 35017, 29005 => 35042, 29006 => 35022, 29007 => 35043, 29008 => 35045, - 29009 => 35057, 29010 => 35098, 29011 => 35068, 29012 => 35048, 29013 => 35070, - 29014 => 35056, 29015 => 35105, 29016 => 35097, 29017 => 35091, 29018 => 35099, - 29019 => 35082, 29020 => 35124, 29021 => 35115, 29022 => 35126, 29023 => 35137, - 29024 => 35174, 29025 => 35195, 29026 => 30091, 29027 => 32997, 29028 => 30386, - 29029 => 30388, 29030 => 30684, 29031 => 32786, 29032 => 32788, 29033 => 32790, - 29034 => 32796, 29035 => 32800, 29036 => 32802, 29037 => 32805, 29038 => 32806, - 29039 => 32807, 29040 => 32809, 29041 => 32808, 29042 => 32817, 29043 => 32779, - 29044 => 32821, 29045 => 32835, 29046 => 32838, 29047 => 32845, 29048 => 32850, - 29049 => 32873, 29050 => 32881, 29051 => 35203, 29052 => 39032, 29053 => 39040, - 29054 => 39043, 29217 => 39049, 29218 => 39052, 29219 => 39053, 29220 => 39055, - 29221 => 39060, 29222 => 39066, 29223 => 39067, 29224 => 39070, 29225 => 39071, - 29226 => 39073, 29227 => 39074, 29228 => 39077, 29229 => 39078, 29230 => 34381, - 29231 => 34388, 29232 => 34412, 29233 => 34414, 29234 => 34431, 29235 => 34426, - 29236 => 34428, 29237 => 34427, 29238 => 34472, 29239 => 34445, 29240 => 34443, - 29241 => 34476, 29242 => 34461, 29243 => 34471, 29244 => 34467, 29245 => 34474, - 29246 => 34451, 29247 => 34473, 29248 => 34486, 29249 => 34500, 29250 => 34485, - 29251 => 34510, 29252 => 34480, 29253 => 34490, 29254 => 34481, 29255 => 34479, - 29256 => 34505, 29257 => 34511, 29258 => 34484, 29259 => 34537, 29260 => 34545, - 29261 => 34546, 29262 => 34541, 29263 => 34547, 29264 => 34512, 29265 => 34579, - 29266 => 34526, 29267 => 34548, 29268 => 34527, 29269 => 34520, 29270 => 34513, - 29271 => 34563, 29272 => 34567, 29273 => 34552, 29274 => 34568, 29275 => 34570, - 29276 => 34573, 29277 => 34569, 29278 => 34595, 29279 => 34619, 29280 => 34590, - 29281 => 34597, 29282 => 34606, 29283 => 34586, 29284 => 34622, 29285 => 34632, - 29286 => 34612, 29287 => 34609, 29288 => 34601, 29289 => 34615, 29290 => 34623, - 29291 => 34690, 29292 => 34594, 29293 => 34685, 29294 => 34686, 29295 => 34683, - 29296 => 34656, 29297 => 34672, 29298 => 34636, 29299 => 34670, 29300 => 34699, - 29301 => 34643, 29302 => 34659, 29303 => 34684, 29304 => 34660, 29305 => 34649, - 29306 => 34661, 29307 => 34707, 29308 => 34735, 29309 => 34728, 29310 => 34770, - 29473 => 34758, 29474 => 34696, 29475 => 34693, 29476 => 34733, 29477 => 34711, - 29478 => 34691, 29479 => 34731, 29480 => 34789, 29481 => 34732, 29482 => 34741, - 29483 => 34739, 29484 => 34763, 29485 => 34771, 29486 => 34749, 29487 => 34769, - 29488 => 34752, 29489 => 34762, 29490 => 34779, 29491 => 34794, 29492 => 34784, - 29493 => 34798, 29494 => 34838, 29495 => 34835, 29496 => 34814, 29497 => 34826, - 29498 => 34843, 29499 => 34849, 29500 => 34873, 29501 => 34876, 29502 => 32566, - 29503 => 32578, 29504 => 32580, 29505 => 32581, 29506 => 33296, 29507 => 31482, - 29508 => 31485, 29509 => 31496, 29510 => 31491, 29511 => 31492, 29512 => 31509, - 29513 => 31498, 29514 => 31531, 29515 => 31503, 29516 => 31559, 29517 => 31544, - 29518 => 31530, 29519 => 31513, 29520 => 31534, 29521 => 31537, 29522 => 31520, - 29523 => 31525, 29524 => 31524, 29525 => 31539, 29526 => 31550, 29527 => 31518, - 29528 => 31576, 29529 => 31578, 29530 => 31557, 29531 => 31605, 29532 => 31564, - 29533 => 31581, 29534 => 31584, 29535 => 31598, 29536 => 31611, 29537 => 31586, - 29538 => 31602, 29539 => 31601, 29540 => 31632, 29541 => 31654, 29542 => 31655, - 29543 => 31672, 29544 => 31660, 29545 => 31645, 29546 => 31656, 29547 => 31621, - 29548 => 31658, 29549 => 31644, 29550 => 31650, 29551 => 31659, 29552 => 31668, - 29553 => 31697, 29554 => 31681, 29555 => 31692, 29556 => 31709, 29557 => 31706, - 29558 => 31717, 29559 => 31718, 29560 => 31722, 29561 => 31756, 29562 => 31742, - 29563 => 31740, 29564 => 31759, 29565 => 31766, 29566 => 31755, 29729 => 31775, - 29730 => 31786, 29731 => 31782, 29732 => 31800, 29733 => 31809, 29734 => 31808, - 29735 => 33278, 29736 => 33281, 29737 => 33282, 29738 => 33284, 29739 => 33260, - 29740 => 34884, 29741 => 33313, 29742 => 33314, 29743 => 33315, 29744 => 33325, - 29745 => 33327, 29746 => 33320, 29747 => 33323, 29748 => 33336, 29749 => 33339, - 29750 => 33331, 29751 => 33332, 29752 => 33342, 29753 => 33348, 29754 => 33353, - 29755 => 33355, 29756 => 33359, 29757 => 33370, 29758 => 33375, 29759 => 33384, - 29760 => 34942, 29761 => 34949, 29762 => 34952, 29763 => 35032, 29764 => 35039, - 29765 => 35166, 29766 => 32669, 29767 => 32671, 29768 => 32679, 29769 => 32687, - 29770 => 32688, 29771 => 32690, 29772 => 31868, 29773 => 25929, 29774 => 31889, - 29775 => 31901, 29776 => 31900, 29777 => 31902, 29778 => 31906, 29779 => 31922, - 29780 => 31932, 29781 => 31933, 29782 => 31937, 29783 => 31943, 29784 => 31948, - 29785 => 31949, 29786 => 31944, 29787 => 31941, 29788 => 31959, 29789 => 31976, - 29790 => 33390, 29791 => 26280, 29792 => 32703, 29793 => 32718, 29794 => 32725, - 29795 => 32741, 29796 => 32737, 29797 => 32742, 29798 => 32745, 29799 => 32750, - 29800 => 32755, 29801 => 31992, 29802 => 32119, 29803 => 32166, 29804 => 32174, - 29805 => 32327, 29806 => 32411, 29807 => 40632, 29808 => 40628, 29809 => 36211, - 29810 => 36228, 29811 => 36244, 29812 => 36241, 29813 => 36273, 29814 => 36199, - 29815 => 36205, 29816 => 35911, 29817 => 35913, 29818 => 37194, 29819 => 37200, - 29820 => 37198, 29821 => 37199, 29822 => 37220, 29985 => 37218, 29986 => 37217, - 29987 => 37232, 29988 => 37225, 29989 => 37231, 29990 => 37245, 29991 => 37246, - 29992 => 37234, 29993 => 37236, 29994 => 37241, 29995 => 37260, 29996 => 37253, - 29997 => 37264, 29998 => 37261, 29999 => 37265, 30000 => 37282, 30001 => 37283, - 30002 => 37290, 30003 => 37293, 30004 => 37294, 30005 => 37295, 30006 => 37301, - 30007 => 37300, 30008 => 37306, 30009 => 35925, 30010 => 40574, 30011 => 36280, - 30012 => 36331, 30013 => 36357, 30014 => 36441, 30015 => 36457, 30016 => 36277, - 30017 => 36287, 30018 => 36284, 30019 => 36282, 30020 => 36292, 30021 => 36310, - 30022 => 36311, 30023 => 36314, 30024 => 36318, 30025 => 36302, 30026 => 36303, - 30027 => 36315, 30028 => 36294, 30029 => 36332, 30030 => 36343, 30031 => 36344, - 30032 => 36323, 30033 => 36345, 30034 => 36347, 30035 => 36324, 30036 => 36361, - 30037 => 36349, 30038 => 36372, 30039 => 36381, 30040 => 36383, 30041 => 36396, - 30042 => 36398, 30043 => 36387, 30044 => 36399, 30045 => 36410, 30046 => 36416, - 30047 => 36409, 30048 => 36405, 30049 => 36413, 30050 => 36401, 30051 => 36425, - 30052 => 36417, 30053 => 36418, 30054 => 36433, 30055 => 36434, 30056 => 36426, - 30057 => 36464, 30058 => 36470, 30059 => 36476, 30060 => 36463, 30061 => 36468, - 30062 => 36485, 30063 => 36495, 30064 => 36500, 30065 => 36496, 30066 => 36508, - 30067 => 36510, 30068 => 35960, 30069 => 35970, 30070 => 35978, 30071 => 35973, - 30072 => 35992, 30073 => 35988, 30074 => 26011, 30075 => 35286, 30076 => 35294, - 30077 => 35290, 30078 => 35292, 30241 => 35301, 30242 => 35307, 30243 => 35311, - 30244 => 35390, 30245 => 35622, 30246 => 38739, 30247 => 38633, 30248 => 38643, - 30249 => 38639, 30250 => 38662, 30251 => 38657, 30252 => 38664, 30253 => 38671, - 30254 => 38670, 30255 => 38698, 30256 => 38701, 30257 => 38704, 30258 => 38718, - 30259 => 40832, 30260 => 40835, 30261 => 40837, 30262 => 40838, 30263 => 40839, - 30264 => 40840, 30265 => 40841, 30266 => 40842, 30267 => 40844, 30268 => 40702, - 30269 => 40715, 30270 => 40717, 30271 => 38585, 30272 => 38588, 30273 => 38589, - 30274 => 38606, 30275 => 38610, 30276 => 30655, 30277 => 38624, 30278 => 37518, - 30279 => 37550, 30280 => 37576, 30281 => 37694, 30282 => 37738, 30283 => 37834, - 30284 => 37775, 30285 => 37950, 30286 => 37995, 30287 => 40063, 30288 => 40066, - 30289 => 40069, 30290 => 40070, 30291 => 40071, 30292 => 40072, 30293 => 31267, - 30294 => 40075, 30295 => 40078, 30296 => 40080, 30297 => 40081, 30298 => 40082, - 30299 => 40084, 30300 => 40085, 30301 => 40090, 30302 => 40091, 30303 => 40094, - 30304 => 40095, 30305 => 40096, 30306 => 40097, 30307 => 40098, 30308 => 40099, - 30309 => 40101, 30310 => 40102, 30311 => 40103, 30312 => 40104, 30313 => 40105, - 30314 => 40107, 30315 => 40109, 30316 => 40110, 30317 => 40112, 30318 => 40113, - 30319 => 40114, 30320 => 40115, 30321 => 40116, 30322 => 40117, 30323 => 40118, - 30324 => 40119, 30325 => 40122, 30326 => 40123, 30327 => 40124, 30328 => 40125, - 30329 => 40132, 30330 => 40133, 30331 => 40134, 30332 => 40135, 30333 => 40138, - 30334 => 40139, 30497 => 40140, 30498 => 40141, 30499 => 40142, 30500 => 40143, - 30501 => 40144, 30502 => 40147, 30503 => 40148, 30504 => 40149, 30505 => 40151, - 30506 => 40152, 30507 => 40153, 30508 => 40156, 30509 => 40157, 30510 => 40159, - 30511 => 40162, 30512 => 38780, 30513 => 38789, 30514 => 38801, 30515 => 38802, - 30516 => 38804, 30517 => 38831, 30518 => 38827, 30519 => 38819, 30520 => 38834, - 30521 => 38836, 30522 => 39601, 30523 => 39600, 30524 => 39607, 30525 => 40536, - 30526 => 39606, 30527 => 39610, 30528 => 39612, 30529 => 39617, 30530 => 39616, - 30531 => 39621, 30532 => 39618, 30533 => 39627, 30534 => 39628, 30535 => 39633, - 30536 => 39749, 30537 => 39747, 30538 => 39751, 30539 => 39753, 30540 => 39752, - 30541 => 39757, 30542 => 39761, 30543 => 39144, 30544 => 39181, 30545 => 39214, - 30546 => 39253, 30547 => 39252, 30548 => 39647, 30549 => 39649, 30550 => 39654, - 30551 => 39663, 30552 => 39659, 30553 => 39675, 30554 => 39661, 30555 => 39673, - 30556 => 39688, 30557 => 39695, 30558 => 39699, 30559 => 39711, 30560 => 39715, - 30561 => 40637, 30562 => 40638, 30563 => 32315, 30564 => 40578, 30565 => 40583, - 30566 => 40584, 30567 => 40587, 30568 => 40594, 30569 => 37846, 30570 => 40605, - 30571 => 40607, 30572 => 40667, 30573 => 40668, 30574 => 40669, 30575 => 40672, - 30576 => 40671, 30577 => 40674, 30578 => 40681, 30579 => 40679, 30580 => 40677, - 30581 => 40682, 30582 => 40687, 30583 => 40738, 30584 => 40748, 30585 => 40751, - 30586 => 40761, 30587 => 40759, 30588 => 40765, 30589 => 40766, 30590 => 40772, - 0 => 0 ); - - function gb2utf8($gb) { - if( !trim($gb) ) return $gb; - $utf8=''; - while($gb) { - if( ord(substr($gb,0,1)) > 127 ) { - $t=substr($gb,0,2); - $gb=substr($gb,2); - $utf8 .= $this->u2utf8($this->codetable[hexdec(bin2hex($t))-0x8080]); - } - else { - $t=substr($gb,0,1); - $gb=substr($gb,1); - $utf8 .= $this->u2utf8($t); - } - } - return $utf8; - } - - function u2utf8($c) { - $str=''; - if ($c < 0x80) { - $str.=$c; - } - else if ($c < 0x800) { - $str.=chr(0xC0 | $c>>6); - $str.=chr(0x80 | $c & 0x3F); - } - else if ($c < 0x10000) { - $str.=chr(0xE0 | $c>>12); - $str.=chr(0x80 | $c>>6 & 0x3F); - $str.=chr(0x80 | $c & 0x3F); - } - else if ($c < 0x200000) { - $str.=chr(0xF0 | $c>>18); - $str.=chr(0x80 | $c>>12 & 0x3F); - $str.=chr(0x80 | $c>>6 & 0x3F); - $str.=chr(0x80 | $c & 0x3F); - } - return $str; - } - -} // END Class - -?> diff --git a/html/lib/jpgraph/jpgraph_gradient.php b/html/lib/jpgraph/jpgraph_gradient.php deleted file mode 100644 index ff299877dd..0000000000 --- a/html/lib/jpgraph/jpgraph_gradient.php +++ /dev/null @@ -1,458 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -/*======================================================================= - // File: JPGRAPH_GRADIENT.PHP - // Description: Create a color gradient - // Created: 2003-02-01 - // Ver: $Id: jpgraph_gradient.php 1761 2009-08-01 08:31:28Z ljp $ - // - // Copyright (c) Aditus Consulting. All rights reserved. - //======================================================================== - */ - -// Styles for gradient color fill -define("GRAD_VER",1); -define("GRAD_VERT",1); -define("GRAD_HOR",2); -define("GRAD_MIDHOR",3); -define("GRAD_MIDVER",4); -define("GRAD_CENTER",5); -define("GRAD_WIDE_MIDVER",6); -define("GRAD_WIDE_MIDHOR",7); -define("GRAD_LEFT_REFLECTION",8); -define("GRAD_RIGHT_REFLECTION",9); -define("GRAD_RAISED_PANEL",10); -define("GRAD_DIAGONAL",11); - -//=================================================== -// CLASS Gradient -// Description: Handles gradient fills. This is to be -// considered a "friend" class of Class Image. -//=================================================== -class Gradient { - private $img=null, $numcolors=100; - //--------------- - // CONSTRUCTOR - function __construct(&$img) { - $this->img = $img; - } - - - function SetNumColors($aNum) { - $this->numcolors=$aNum; - } - //--------------- - // PUBLIC METHODS - // Produce a gradient filled rectangle with a smooth transition between - // two colors. - // ($xl,$yt) Top left corner - // ($xr,$yb) Bottom right - // $from_color Starting color in gradient - // $to_color End color in the gradient - // $style Which way is the gradient oriented? - function FilledRectangle($xl,$yt,$xr,$yb,$from_color,$to_color,$style=1) { - $this->img->SetLineWeight(1); - switch( $style ) { - case GRAD_VER: - $steps = ceil(abs($xr-$xl)+1); - $delta = $xr>=$xl ? 1 : -1; - $this->GetColArray($from_color,$to_color,$steps,$colors,$this->numcolors); - for( $i=0, $x=$xl; $i < $steps; ++$i ) { - $this->img->current_color = $colors[$i]; - $this->img->Line($x,$yt,$x,$yb); - $x += $delta; - } - break; - - case GRAD_HOR: - $steps = ceil(abs($yb-$yt)+1); - $delta = $yb >= $yt ? 1 : -1; - $this->GetColArray($from_color,$to_color,$steps,$colors,$this->numcolors); - for($i=0,$y=$yt; $i < $steps; ++$i) { - $this->img->current_color = $colors[$i]; - $this->img->Line($xl,$y,$xr,$y); - $y += $delta; - } - break; - - case GRAD_MIDHOR: - $steps = ceil(abs($yb-$yt)/2); - $delta = $yb >= $yt ? 1 : -1; - $this->GetColArray($from_color,$to_color,$steps,$colors,$this->numcolors); - for($y=$yt, $i=0; $i < $steps; ++$i) { - $this->img->current_color = $colors[$i]; - $this->img->Line($xl,$y,$xr,$y); - $y += $delta; - } - --$i; - if( abs($yb-$yt) % 2 == 1 ) { - --$steps; - } - for($j=0; $j < $steps; ++$j, --$i) { - $this->img->current_color = $colors[$i]; - $this->img->Line($xl,$y,$xr,$y); - $y += $delta; - } - $this->img->Line($xl,$y,$xr,$y); - break; - - case GRAD_MIDVER: - $steps = ceil(abs($xr-$xl)/2); - $delta = $xr>=$xl ? 1 : -1; - $this->GetColArray($from_color,$to_color,$steps,$colors,$this->numcolors); - for($x=$xl, $i=0; $i < $steps; ++$i) { - $this->img->current_color = $colors[$i]; - $this->img->Line($x,$yb,$x,$yt); - $x += $delta; - } - --$i; - if( abs($xr-$xl) % 2 == 1 ) { - --$steps; - } - for($j=0; $j < $steps; ++$j, --$i) { - $this->img->current_color = $colors[$i]; - $this->img->Line($x,$yb,$x,$yt); - $x += $delta; - } - $this->img->Line($x,$yb,$x,$yt); - break; - - case GRAD_WIDE_MIDVER: - $diff = ceil(abs($xr-$xl)); - $steps = floor(abs($diff)/3); - $firststep = $diff - 2*$steps ; - $delta = $xr >= $xl ? 1 : -1; - $this->GetColArray($from_color,$to_color,$firststep,$colors,$this->numcolors); - for($x=$xl, $i=0; $i < $firststep; ++$i) { - $this->img->current_color = $colors[$i]; - $this->img->Line($x,$yb,$x,$yt); - $x += $delta; - } - --$i; - $this->img->current_color = $colors[$i]; - for($j=0; $j< $steps; ++$j) { - $this->img->Line($x,$yb,$x,$yt); - $x += $delta; - } - - for($j=0; $j < $steps; ++$j, --$i) { - $this->img->current_color = $colors[$i]; - $this->img->Line($x,$yb,$x,$yt); - $x += $delta; - } - break; - - case GRAD_WIDE_MIDHOR: - $diff = ceil(abs($yb-$yt)); - $steps = floor(abs($diff)/3); - $firststep = $diff - 2*$steps ; - $delta = $yb >= $yt? 1 : -1; - $this->GetColArray($from_color,$to_color,$firststep,$colors,$this->numcolors); - for($y=$yt, $i=0; $i < $firststep; ++$i) { - $this->img->current_color = $colors[$i]; - $this->img->Line($xl,$y,$xr,$y); - $y += $delta; - } - --$i; - $this->img->current_color = $colors[$i]; - for($j=0; $j < $steps; ++$j) { - $this->img->Line($xl,$y,$xr,$y); - $y += $delta; - } - for($j=0; $j < $steps; ++$j, --$i) { - $this->img->current_color = $colors[$i]; - $this->img->Line($xl,$y,$xr,$y); - $y += $delta; - } - break; - - case GRAD_LEFT_REFLECTION: - $steps1 = ceil(0.3*abs($xr-$xl)); - $delta = $xr>=$xl ? 1 : -1; - - $from_color = $this->img->rgb->Color($from_color); - $adj = 1.4; - $m = ($adj-1.0)*(255-min(255,min($from_color[0],min($from_color[1],$from_color[2])))); - $from_color2 = array(min(255,$from_color[0]+$m), - min(255,$from_color[1]+$m), min(255,$from_color[2]+$m)); - - $this->GetColArray($from_color2,$to_color,$steps1,$colors,$this->numcolors); - $n = count($colors); - for($x=$xl, $i=0; $i < $steps1 && $i < $n; ++$i) { - $this->img->current_color = $colors[$i]; - $this->img->Line($x,$yb,$x,$yt); - $x += $delta; - } - $steps2 = max(1,ceil(0.08*abs($xr-$xl))); - $this->img->SetColor($to_color); - for($j=0; $j< $steps2; ++$j) { - $this->img->Line($x,$yb,$x,$yt); - $x += $delta; - } - $steps = abs($xr-$xl)-$steps1-$steps2; - $this->GetColArray($to_color,$from_color,$steps,$colors,$this->numcolors); - $n = count($colors); - for($i=0; $i < $steps && $i < $n; ++$i) { - $this->img->current_color = $colors[$i]; - $this->img->Line($x,$yb,$x,$yt); - $x += $delta; - } - break; - - case GRAD_RIGHT_REFLECTION: - $steps1 = ceil(0.7*abs($xr-$xl)); - $delta = $xr>=$xl ? 1 : -1; - - $this->GetColArray($from_color,$to_color,$steps1,$colors,$this->numcolors); - $n = count($colors); - for($x=$xl, $i=0; $i < $steps1 && $i < $n; ++$i) { - $this->img->current_color = $colors[$i]; - $this->img->Line($x,$yb,$x,$yt); - $x += $delta; - } - $steps2 = max(1,ceil(0.08*abs($xr-$xl))); - $this->img->SetColor($to_color); - for($j=0; $j< $steps2; ++$j) { - $this->img->Line($x,$yb,$x,$yt); - $x += $delta; - } - - $from_color = $this->img->rgb->Color($from_color); - $adj = 1.4; - $m = ($adj-1.0)*(255-min(255,min($from_color[0],min($from_color[1],$from_color[2])))); - $from_color = array(min(255,$from_color[0]+$m), - min(255,$from_color[1]+$m), min(255,$from_color[2]+$m)); - - $steps = abs($xr-$xl)-$steps1-$steps2; - $this->GetColArray($to_color,$from_color,$steps,$colors,$this->numcolors); - $n = count($colors); - for($i=0; $i < $steps && $i < $n; ++$i) { - $this->img->current_color = $colors[$i]; - $this->img->Line($x,$yb,$x,$yt); - $x += $delta; - } - break; - - case GRAD_CENTER: - $steps = ceil(min(($yb-$yt)+1,($xr-$xl)+1)/2); - $this->GetColArray($from_color,$to_color,$steps,$colors,$this->numcolors); - $dx = ($xr-$xl)/2; - $dy = ($yb-$yt)/2; - $x=$xl;$y=$yt;$x2=$xr;$y2=$yb; - $n = count($colors); - for($x=$xl, $i=0; $x < $xl+$dx && $y < $yt+$dy && $i < $n; ++$x, ++$y, --$x2, --$y2, ++$i) { - $this->img->current_color = $colors[$i]; - $this->img->Rectangle($x,$y,$x2,$y2); - } - $this->img->Line($x,$y,$x2,$y2); - break; - - case GRAD_RAISED_PANEL: - // right to left - $steps1 = $xr-$xl; - $delta = $xr>=$xl ? 1 : -1; - $this->GetColArray($to_color,$from_color,$steps1,$colors,$this->numcolors); - $n = count($colors); - for($x=$xl, $i=0; $i < $steps1 && $i < $n; ++$i) { - $this->img->current_color = $colors[$i]; - $this->img->Line($x,$yb,$x,$yt); - $x += $delta; - } - - // left to right - $xr -= 3; - $xl += 3; - $yb -= 3; - $yt += 3; - $steps2 = $xr-$xl; - $delta = $xr>=$xl ? 1 : -1; - for($x=$xl, $j=$steps2; $j >= 0; --$j) { - $this->img->current_color = $colors[$j]; - $this->img->Line($x,$yb,$x,$yt); - $x += $delta; - } - break; - - case GRAD_DIAGONAL: - // use the longer dimension to determine the required number of steps. - // first loop draws from one corner to the mid-diagonal and the second - // loop draws from the mid-diagonal to the opposing corner. - if($xr-$xl > $yb - $yt) { - // width is greater than height -> use x-dimension for steps - $steps = $xr-$xl; - $delta = $xr>=$xl ? 1 : -1; - $this->GetColArray($from_color,$to_color,$steps*2,$colors,$this->numcolors); - $n = count($colors); - - for($x=$xl, $i=0; $i < $steps && $i < $n; ++$i) { - $this->img->current_color = $colors[$i]; - $y = $yt+($i/$steps)*($yb-$yt)*$delta; - $this->img->Line($x,$yt,$xl,$y); - $x += $delta; - } - - for($x=$xl, $i = 0; $i < $steps && $i < $n; ++$i) { - $this->img->current_color = $colors[$steps+$i]; - $y = $yt+($i/$steps)*($yb-$yt)*$delta; - $this->img->Line($x,$yb,$xr,$y); - $x += $delta; - } - } else { - // height is greater than width -> use y-dimension for steps - $steps = $yb-$yt; - $delta = $yb>=$yt ? 1 : -1; - $this->GetColArray($from_color,$to_color,$steps*2,$colors,$this->numcolors); - $n = count($colors); - - for($y=$yt, $i=0; $i < $steps && $i < $n; ++$i) { - $this->img->current_color = $colors[$i]; - $x = $xl+($i/$steps)*($xr-$xl)*$delta; - $this->img->Line($x,$yt,$xl,$y); - $y += $delta; - } - - for($y=$yt, $i = 0; $i < $steps && $i < $n; ++$i) { - $this->img->current_color = $colors[$steps+$i]; - $x = $xl+($i/$steps)*($xr-$xl)*$delta; - $this->img->Line($x,$yb,$xr,$y); - $x += $delta; - } - - } - break; - - default: - JpGraphError::RaiseL(7001,$style); - //("Unknown gradient style (=$style)."); - break; - } - } - - // Fill a special case of a polygon with a flat bottom - // with a gradient. Can be used for filled line plots. - // Please note that this is NOT a generic gradient polygon fill - // routine. It assumes that the bottom is flat (like a drawing - // of a mountain) - function FilledFlatPolygon($pts,$from_color,$to_color) { - if( count($pts) == 0 ) return; - - $maxy=$pts[1]; - $miny=$pts[1]; - $n = count($pts) ; - for( $i=0, $idx=0; $i < $n; $i += 2) { - $x = round($pts[$i]); - $y = round($pts[$i+1]); - $miny = min($miny,$y); - $maxy = max($maxy,$y); - } - - $colors = array(); - $this->GetColArray($from_color,$to_color,abs($maxy-$miny)+1,$colors,$this->numcolors); - for($i=$miny, $idx=0; $i <= $maxy; ++$i ) { - $colmap[$i] = $colors[$idx++]; - } - - $n = count($pts)/2 ; - $idx = 0 ; - while( $idx < $n-1 ) { - $p1 = array(round($pts[$idx*2]),round($pts[$idx*2+1])); - $p2 = array(round($pts[++$idx*2]),round($pts[$idx*2+1])); - - // Find the largest rectangle we can fill - $y = max($p1[1],$p2[1]) ; - for($yy=$maxy; $yy > $y; --$yy) { - $this->img->current_color = $colmap[$yy]; - $this->img->Line($p1[0],$yy,$p2[0]-1,$yy); - } - - if( $p1[1] == $p2[1] ) { - continue; - } - - // Fill the rest using lines (slow...) - $slope = ($p2[0]-$p1[0])/($p1[1]-$p2[1]); - $x1 = $p1[0]; - $x2 = $p2[0]-1; - $start = $y; - if( $p1[1] > $p2[1] ) { - while( $y >= $p2[1] ) { - $x1=$slope*($start-$y)+$p1[0]; - $this->img->current_color = $colmap[$y]; - $this->img->Line($x1,$y,$x2,$y); - --$y; - } - } - else { - while( $y >= $p1[1] ) { - $x2=$p2[0]+$slope*($start-$y); - $this->img->current_color = $colmap[$y]; - $this->img->Line($x1,$y,$x2,$y); - --$y; - } - } - } - } - - //--------------- - // PRIVATE METHODS - // Add to the image color map the necessary colors to do the transition - // between the two colors using $numcolors intermediate colors - function GetColArray($from_color,$to_color,$arr_size,&$colors,$numcols=100) { - if( $arr_size==0 ) { - return; - } - - // If color is given as text get it's corresponding r,g,b values - $from_color = $this->img->rgb->Color($from_color); - $to_color = $this->img->rgb->Color($to_color); - - $rdelta=($to_color[0]-$from_color[0])/$numcols; - $gdelta=($to_color[1]-$from_color[1])/$numcols; - $bdelta=($to_color[2]-$from_color[2])/$numcols; - $colorsperstep = $numcols/$arr_size; - $prevcolnum = -1; - $from_alpha = $from_color[3]; - $to_alpha = $to_color[3]; - $adelta = ( $to_alpha - $from_alpha ) / $numcols ; - for ($i=0; $i < $arr_size; ++$i) { - $colnum = floor($colorsperstep*$i); - if ( $colnum == $prevcolnum ) { - $colors[$i] = $colidx; - } - else { - $r = floor($from_color[0] + $colnum*$rdelta); - $g = floor($from_color[1] + $colnum*$gdelta); - $b = floor($from_color[2] + $colnum*$bdelta); - $alpha = $from_alpha + $colnum*$adelta; - $colidx = $this->img->rgb->Allocate(sprintf("#%02x%02x%02x",$r,$g,$b),$alpha); - $colors[$i] = $colidx; - } - $prevcolnum = $colnum; - } - } -} // Class - -?> diff --git a/html/lib/jpgraph/jpgraph_iconplot.php b/html/lib/jpgraph/jpgraph_iconplot.php deleted file mode 100644 index f43cf36962..0000000000 --- a/html/lib/jpgraph/jpgraph_iconplot.php +++ /dev/null @@ -1,214 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -//======================================================================= -// File: JPGRAPH_ICONPLOT.PHP -// Description: Extension module to add icons to plots -// Created: 2004-02-18 -// Ver: $Id: jpgraph_iconplot.php 1404 2009-06-28 15:25:41Z ljp $ -// -// Copyright (c) Aditus Consulting. All rights reserved. -//======================================================================== - - -//=================================================== -// CLASS IconPlot -// Description: Make it possible to add a (small) image -// to the graph -//=================================================== -class IconPlot { - public $iX=0,$iY=0,$iScale=1.0,$iMix=100; - private $iHorAnchor='left',$iVertAnchor='top'; - private $iFile=''; - private $iAnchors = array('left','right','top','bottom','center'); - private $iCountryFlag='',$iCountryStdSize=3; - private $iScalePosY=null,$iScalePosX=null; - private $iImgString=''; - - - function __construct($aFile="",$aX=0,$aY=0,$aScale=1.0,$aMix=100) { - $this->iFile = $aFile; - $this->iX=$aX; - $this->iY=$aY; - $this->iScale= $aScale; - if( $aMix < 0 || $aMix > 100 ) { - JpGraphError::RaiseL(8001); //('Mix value for icon must be between 0 and 100.'); - } - $this->iMix = $aMix ; - } - - function SetCountryFlag($aFlag,$aX=0,$aY=0,$aScale=1.0,$aMix=100,$aStdSize=3) { - $this->iCountryFlag = $aFlag; - $this->iX=$aX; - $this->iY=$aY; - $this->iScale= $aScale; - if( $aMix < 0 || $aMix > 100 ) { - JpGraphError::RaiseL(8001);//'Mix value for icon must be between 0 and 100.'); - } - $this->iMix = $aMix; - $this->iCountryStdSize = $aStdSize; - } - - function SetPos($aX,$aY) { - $this->iX=$aX; - $this->iY=$aY; - } - - function CreateFromString($aStr) { - $this->iImgString = $aStr; - } - - function SetScalePos($aX,$aY) { - $this->iScalePosX = $aX; - $this->iScalePosY = $aY; - } - - function SetScale($aScale) { - $this->iScale = $aScale; - } - - function SetMix($aMix) { - if( $aMix < 0 || $aMix > 100 ) { - JpGraphError::RaiseL(8001);//('Mix value for icon must be between 0 and 100.'); - } - $this->iMix = $aMix ; - } - - function SetAnchor($aXAnchor='left',$aYAnchor='center') { - if( !in_array($aXAnchor,$this->iAnchors) || - !in_array($aYAnchor,$this->iAnchors) ) { - JpGraphError::RaiseL(8002);//("Anchor position for icons must be one of 'top', 'bottom', 'left', 'right' or 'center'"); - } - $this->iHorAnchor=$aXAnchor; - $this->iVertAnchor=$aYAnchor; - } - - function PreStrokeAdjust($aGraph) { - // Nothing to do ... - } - - function DoLegend($aGraph) { - // Nothing to do ... - } - - function Max() { - return array(false,false); - } - - - // The next four function are framework function tht gets called - // from Gantt and is not menaiungfull in the context of Icons but - // they must be implemented to avoid errors. - function GetMaxDate() { return false; } - function GetMinDate() { return false; } - function GetLineNbr() { return 0; } - function GetAbsHeight() {return 0; } - - - function Min() { - return array(false,false); - } - - function StrokeMargin(&$aImg) { - return true; - } - - function Stroke($aImg,$axscale=null,$ayscale=null) { - $this->StrokeWithScale($aImg,$axscale,$ayscale); - } - - function StrokeWithScale($aImg,$axscale,$ayscale) { - if( $this->iScalePosX === null || $this->iScalePosY === null || - $axscale === null || $ayscale === null ) { - $this->_Stroke($aImg); - } - else { - $this->_Stroke($aImg, - round($axscale->Translate($this->iScalePosX)), - round($ayscale->Translate($this->iScalePosY))); - } - } - - function GetWidthHeight() { - $dummy=0; - return $this->_Stroke($dummy,null,null,true); - } - - function _Stroke($aImg,$x=null,$y=null,$aReturnWidthHeight=false) { - if( $this->iFile != '' && $this->iCountryFlag != '' ) { - JpGraphError::RaiseL(8003);//('It is not possible to specify both an image file and a country flag for the same icon.'); - } - if( $this->iFile != '' ) { - $gdimg = Graph::LoadBkgImage('',$this->iFile); - } - elseif( $this->iImgString != '') { - $gdimg = Image::CreateFromString($this->iImgString); - } - - else { - if( ! class_exists('FlagImages',false) ) { - JpGraphError::RaiseL(8004);//('In order to use Country flags as icons you must include the "jpgraph_flags.php" file.'); - } - $fobj = new FlagImages($this->iCountryStdSize); - $dummy=''; - $gdimg = $fobj->GetImgByName($this->iCountryFlag,$dummy); - } - - $iconw = imagesx($gdimg); - $iconh = imagesy($gdimg); - - if( $aReturnWidthHeight ) { - return array(round($iconw*$this->iScale),round($iconh*$this->iScale)); - } - - if( $x !== null && $y !== null ) { - $this->iX = $x; $this->iY = $y; - } - if( $this->iX >= 0 && $this->iX <= 1.0 ) { - $w = imagesx($aImg->img); - $this->iX = round($w*$this->iX); - } - if( $this->iY >= 0 && $this->iY <= 1.0 ) { - $h = imagesy($aImg->img); - $this->iY = round($h*$this->iY); - } - - if( $this->iHorAnchor == 'center' ) - $this->iX -= round($iconw*$this->iScale/2); - if( $this->iHorAnchor == 'right' ) - $this->iX -= round($iconw*$this->iScale); - if( $this->iVertAnchor == 'center' ) - $this->iY -= round($iconh*$this->iScale/2); - if( $this->iVertAnchor == 'bottom' ) - $this->iY -= round($iconh*$this->iScale); - - $aImg->CopyMerge($gdimg,$this->iX,$this->iY,0,0, - round($iconw*$this->iScale),round($iconh*$this->iScale), - $iconw,$iconh, - $this->iMix); - } -} - -?> diff --git a/html/lib/jpgraph/jpgraph_imgtrans.php b/html/lib/jpgraph/jpgraph_imgtrans.php deleted file mode 100644 index 4d966d5751..0000000000 --- a/html/lib/jpgraph/jpgraph_imgtrans.php +++ /dev/null @@ -1,247 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -//======================================================================= -// File: JPGRAPH_IMGTRANS.PHP -// Description: Extension for JpGraph to do some simple img transformations -// Created: 2003-09-06 -// Ver: $Id: jpgraph_imgtrans.php 1106 2009-02-22 20:16:35Z ljp $ -// -// Copyright (c) Aditus Consulting. All rights reserved. -//======================================================================== - -//------------------------------------------------------------------------ -// Class ImgTrans -// Perform some simple image transformations. -//------------------------------------------------------------------------ -class ImgTrans { - private $gdImg=null; - - function __construct($aGdImg) { - // Constructor - $this->gdImg = $aGdImg; - } - - // -------------------------------------------------------------------- - // _TransVert3D() and _TransHor3D() are helper methods to - // Skew3D(). - // -------------------------------------------------------------------- - function _TransVert3D($aGdImg,$aHorizon=100,$aSkewDist=120,$aDir=SKEW3D_DOWN,$aMinSize=true,$aFillColor='#FFFFFF',$aQuality=false,$aBorder=false,$aHorizonPos=0.5) { - - - // Parameter check - if( $aHorizonPos < 0 || $aHorizonPos > 1.0 ) { - JpGraphError::RaiseL(9001); - //("Value for image transformation out of bounds.\nVanishing point on horizon must be specified as a value between 0 and 1."); - } - - $w = imagesx($aGdImg); - $h = imagesy($aGdImg); - - // Create new image - $ww = $w; - if( $aMinSize ) - $hh = ceil($h * $aHorizon / ($aSkewDist+$h)); - else - $hh = $h; - - $newgdh = imagecreatetruecolor($ww,$hh); - $crgb = new RGB( $newgdh ); - $fillColor = $crgb->Allocate($aFillColor); - imagefilledrectangle($newgdh,0,0,$ww-1,$hh-1,$fillColor); - - if( $aBorder ) { - $colidx = $crgb->Allocate($aBorder); - imagerectangle($newgdh,0,0,$ww-1,$hh-1,$colidx); - } - - $mid = round($w * $aHorizonPos); - - $last=$h; - for($y=0; $y < $h; ++$y) { - - $yp = $h-$y-1; - $yt = floor($yp * $aHorizon / ($aSkewDist + $yp)); - - if( !$aQuality ) { - if( $last <= $yt ) continue ; - $last = $yt; - } - - for($x=0; $x < $w; ++$x) { - $xt = ($x-$mid) * $aSkewDist / ($aSkewDist + $yp); - if( $aDir == SKEW3D_UP ) - $rgb = imagecolorat($aGdImg,$x,$h-$y-1); - else - $rgb = imagecolorat($aGdImg,$x,$y); - $r = ($rgb >> 16) & 0xFF; - $g = ($rgb >> 8) & 0xFF; - $b = $rgb & 0xFF; - $colidx = imagecolorallocate($newgdh,$r,$g,$b); - $xt = round($xt+$mid); - if( $aDir == SKEW3D_UP ) { - $syt = $yt; - } - else { - $syt = $hh-$yt-1; - } - - if( !empty($set[$yt]) ) { - $nrgb = imagecolorat($newgdh,$xt,$syt); - $nr = ($nrgb >> 16) & 0xFF; - $ng = ($nrgb >> 8) & 0xFF; - $nb = $nrgb & 0xFF; - $colidx = imagecolorallocate($newgdh,floor(($r+$nr)/2), - floor(($g+$ng)/2),floor(($b+$nb)/2)); - } - - imagesetpixel($newgdh,$xt,$syt,$colidx); - } - - $set[$yt] = true; - } - - return $newgdh; - } - - // -------------------------------------------------------------------- - // _TransVert3D() and _TransHor3D() are helper methods to - // Skew3D(). - // -------------------------------------------------------------------- - function _TransHor3D($aGdImg,$aHorizon=100,$aSkewDist=120,$aDir=SKEW3D_LEFT,$aMinSize=true,$aFillColor='#FFFFFF',$aQuality=false,$aBorder=false,$aHorizonPos=0.5) { - - $w = imagesx($aGdImg); - $h = imagesy($aGdImg); - - // Create new image - $hh = $h; - if( $aMinSize ) - $ww = ceil($w * $aHorizon / ($aSkewDist+$w)); - else - $ww = $w; - - $newgdh = imagecreatetruecolor($ww,$hh); - $crgb = new RGB( $newgdh ); - $fillColor = $crgb->Allocate($aFillColor); - imagefilledrectangle($newgdh,0,0,$ww-1,$hh-1,$fillColor); - - if( $aBorder ) { - $colidx = $crgb->Allocate($aBorder); - imagerectangle($newgdh,0,0,$ww-1,$hh-1,$colidx); - } - - $mid = round($h * $aHorizonPos); - - $last = -1; - for($x=0; $x < $w-1; ++$x) { - $xt = floor($x * $aHorizon / ($aSkewDist + $x)); - if( !$aQuality ) { - if( $last >= $xt ) continue ; - $last = $xt; - } - - for($y=0; $y < $h; ++$y) { - $yp = $h-$y-1; - $yt = ($yp-$mid) * $aSkewDist / ($aSkewDist + $x); - - if( $aDir == SKEW3D_RIGHT ) - $rgb = imagecolorat($aGdImg,$w-$x-1,$y); - else - $rgb = imagecolorat($aGdImg,$x,$y); - $r = ($rgb >> 16) & 0xFF; - $g = ($rgb >> 8) & 0xFF; - $b = $rgb & 0xFF; - $colidx = imagecolorallocate($newgdh,$r,$g,$b); - $yt = floor($hh-$yt-$mid-1); - if( $aDir == SKEW3D_RIGHT ) { - $sxt = $ww-$xt-1; - } - else - $sxt = $xt ; - - if( !empty($set[$xt]) ) { - $nrgb = imagecolorat($newgdh,$sxt,$yt); - $nr = ($nrgb >> 16) & 0xFF; - $ng = ($nrgb >> 8) & 0xFF; - $nb = $nrgb & 0xFF; - $colidx = imagecolorallocate($newgdh,floor(($r+$nr)/2), - floor(($g+$ng)/2),floor(($b+$nb)/2)); - } - imagesetpixel($newgdh,$sxt,$yt,$colidx); - } - - $set[$xt] = true; - } - - return $newgdh; - } - - // -------------------------------------------------------------------- - // Skew image for the apperance of a 3D effect - // This transforms an image into a 3D-skewed version - // of the image. The transformation is specified by giving the height - // of the artificial horizon and specifying a "skew" factor which - // is the distance on the horizon line between the point of - // convergence and perspective line. - // - // The function returns the GD handle of the transformed image - // leaving the original image untouched. - // - // Parameters: - // * $aGdImg, GD handle to the image to be transformed - // * $aHorizon, Distance to the horizon - // * $aSkewDist, Distance from the horizon point of convergence - // on the horizon line to the perspective points. A larger - // value will fore-shorten the image more - // * $aDir, parameter specifies type of convergence. This of this - // as the walls in a room you are looking at. This specifies if the - // image should be applied on the left,right,top or bottom walls. - // * $aMinSize, true=make the new image just as big as needed, - // false = keep the image the same size as the original image - // * $aFillColor, Background fill color in the image - // * $aHiQuality, true=performa some interpolation that improves - // the image quality but at the expense of performace. Enabling - // high quality will have a dramatic effect on the time it takes - // to transform an image. - // * $aBorder, if set to anything besides false this will draw a - // a border of the speciied color around the image - // -------------------------------------------------------------------- - function Skew3D($aHorizon=120,$aSkewDist=150,$aDir=SKEW3D_DOWN,$aHiQuality=false,$aMinSize=true,$aFillColor='#FFFFFF',$aBorder=false) { - return $this->_Skew3D($this->gdImg,$aHorizon,$aSkewDist,$aDir,$aHiQuality, - $aMinSize,$aFillColor,$aBorder); - } - - function _Skew3D($aGdImg,$aHorizon=120,$aSkewDist=150,$aDir=SKEW3D_DOWN,$aHiQuality=false,$aMinSize=true,$aFillColor='#FFFFFF',$aBorder=false) { - if( $aDir == SKEW3D_DOWN || $aDir == SKEW3D_UP ) - return $this->_TransVert3D($aGdImg,$aHorizon,$aSkewDist,$aDir,$aMinSize,$aFillColor,$aHiQuality,$aBorder); - else - return $this->_TransHor3D($aGdImg,$aHorizon,$aSkewDist,$aDir,$aMinSize,$aFillColor,$aHiQuality,$aBorder); - - } - -} - - -?> \ No newline at end of file diff --git a/html/lib/jpgraph/jpgraph_led.php b/html/lib/jpgraph/jpgraph_led.php deleted file mode 100644 index accc5b69be..0000000000 --- a/html/lib/jpgraph/jpgraph_led.php +++ /dev/null @@ -1,335 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -//======================================================================= -// File: JPGRAPH_LED.PHP -// Description: Module to generate Dotted LED-like digits -// Created: 2006-11-26 -// Ver: $Id: jpgraph_led.php 1674 2009-07-22 19:42:23Z ljp $ -// -// Copyright 2006 (c) Aditus Consulting. All rights reserved. -// -// Changed: 2007-08-06 by Alexander Kurochkin (inspector@list.ru) -//======================================================================== - -// Constants for color schema -DEFINE('LEDC_RED', 0); -DEFINE('LEDC_GREEN', 1); -DEFINE('LEDC_BLUE', 2); -DEFINE('LEDC_YELLOW', 3); -DEFINE('LEDC_GRAY', 4); -DEFINE('LEDC_CHOCOLATE', 5); -DEFINE('LEDC_PERU', 6); -DEFINE('LEDC_GOLDENROD', 7); -DEFINE('LEDC_KHAKI', 8); -DEFINE('LEDC_OLIVE', 9); -DEFINE('LEDC_LIMEGREEN', 10); -DEFINE('LEDC_FORESTGREEN', 11); -DEFINE('LEDC_TEAL', 12); -DEFINE('LEDC_STEELBLUE', 13); -DEFINE('LEDC_NAVY', 14); -DEFINE('LEDC_INVERTGRAY', 15); - -// Check that mb_strlen() is available -if( ! function_exists('mb_strlen') ) { - JpGraphError::RaiseL(25500); - //'Multibyte strings must be enabled in the PHP installation in order to run the LED module - // so that the function mb_strlen() is available. See PHP documentation for more information.' -} - -//======================================================================== -// CLASS DigitalLED74 -// Description: -// Construct a number as an image that looks like LED numbers in a -// 7x4 digital matrix -//======================================================================== -class DigitalLED74 -{ - private $iLED_X = 4, $iLED_Y=7, - - // fg-up, fg-down, bg - $iColorSchema = array( - LEDC_RED => array('red','darkred:0.9','red:0.3'),// 0 - LEDC_GREEN => array('green','darkgreen','green:0.3'),// 1 - LEDC_BLUE => array('lightblue:0.9','darkblue:0.85','darkblue:0.7'),// 2 - LEDC_YELLOW => array('yellow','yellow:0.4','yellow:0.3'),// 3 - LEDC_GRAY => array('gray:1.4','darkgray:0.85','darkgray:0.7'), - LEDC_CHOCOLATE => array('chocolate','chocolate:0.7','chocolate:0.5'), - LEDC_PERU => array('peru:0.95','peru:0.6','peru:0.5'), - LEDC_GOLDENROD => array('goldenrod','goldenrod:0.6','goldenrod:0.5'), - LEDC_KHAKI => array('khaki:0.7','khaki:0.4','khaki:0.3'), - LEDC_OLIVE => array('#808000','#808000:0.7','#808000:0.6'), - LEDC_LIMEGREEN => array('limegreen:0.9','limegreen:0.5','limegreen:0.4'), - LEDC_FORESTGREEN => array('forestgreen','forestgreen:0.7','forestgreen:0.5'), - LEDC_TEAL => array('teal','teal:0.7','teal:0.5'), - LEDC_STEELBLUE => array('steelblue','steelblue:0.65','steelblue:0.5'), - LEDC_NAVY => array('navy:1.3','navy:0.95','navy:0.8'),//14 - LEDC_INVERTGRAY => array('darkgray','lightgray:1.5','white')//15 - ), - - /* Each line of the character is encoded as a 4 bit value - 0 ____ - 1 ___x - 2 __x_ - 3 __xx - 4 _x__ - 5 _x_x - 6 _xx_ - 7 _xxx - 8 x___ - 9 x__x - 10 x_x_ - 11 x_xx - 12 xx__ - 13 xx_x - 14 xxx_ - 15 xxxx - */ - - $iLEDSpec = array( - 0 => array(6,9,11,15,13,9,6), - 1 => array(2,6,10,2,2,2,2), - 2 => array(6,9,1,2,4,8,15), - 3 => array(6,9,1,6,1,9,6), - 4 => array(1,3,5,9,15,1,1), - 5 => array(15,8,8,14,1,9,6), - 6 => array(6,8,8,14,9,9,6), - 7 => array(15,1,1,2,4,4,4), - 8 => array(6,9,9,6,9,9,6), - 9 => array(6,9,9,7,1,1,6), - '!' => array(4,4,4,4,4,0,4), - '?' => array(6,9,1,2,2,0,2), - '#' => array(0,9,15,9,15,9,0), - '@' => array(6,9,11,11,10,9,6), - '-' => array(0,0,0,15,0,0,0), - '_' => array(0,0,0,0,0,0,15), - '=' => array(0,0,15,0,15,0,0), - '+' => array(0,0,4,14,4,0,0), - '|' => array(4,4,4,4,4,4,4), //vertical line, used for simulate rus 'Ы' - ',' => array(0,0,0,0,0,12,4), - '.' => array(0,0,0,0,0,12,12), - ':' => array(12,12,0,0,0,12,12), - ';' => array(12,12,0,0,0,12,4), - '[' => array(3,2,2,2,2,2,3), - ']' => array(12,4,4,4,4,4,12), - '(' => array(1,2,2,2,2,2,1), - ')' => array(8,4,4,4,4,4,8), - '{' => array(3,2,2,6,2,2,3), - '}' => array(12,4,4,6,4,4,12), - '<' => array(1,2,4,8,4,2,1), - '>' => array(8,4,2,1,2,4,8), - '*' => array(9,6,15,6,9,0,0), - '"' => array(10,10,0,0,0,0,0), - '\'' => array(4,4,0,0,0,0,0), - '`' => array(4,2,0,0,0,0,0), - '~' => array(13,11,0,0,0,0,0), - '^' => array(4,10,0,0,0,0,0), - '\\' => array(8,8,4,6,2,1,1), - '/' => array(1,1,2,6,4,8,8), - '%' => array(1,9,2,6,4,9,8), - '&' => array(0,4,10,4,11,10,5), - '$' => array(2,7,8,6,1,14,4), - ' ' => array(0,0,0,0,0,0,0), - '•' => array(0,0,6,6,0,0,0), //149 - '°' => array(14,10,14,0,0,0,0), //176 - '†' => array(4,4,14,4,4,4,4), //134 - '‡' => array(4,4,14,4,14,4,4), //135 - '±' => array(0,4,14,4,0,14,0), //177 - '‰' => array(0,4,2,15,2,4,0), //137 show right arrow - 'â„¢' => array(0,2,4,15,4,2,0), //156 show left arrow - 'ÐŽ' => array(0,0,8,8,0,0,0), //159 show small hi-stick - that need for simulate rus 'Ф' - "\t" => array(8,8,8,0,0,0,0), //show hi-stick - that need for simulate rus 'У' - "\r" => array(8,8,8,8,8,8,8), //vertical line - that need for simulate 'M', 'W' and rus 'Ðœ','Ш' ,'Щ' - "\n" => array(15,15,15,15,15,15,15), //fill up - that need for simulate rus 'Ж' - "Ò" => array(10,5,10,5,10,5,10), //chess - "µ" => array(15,0,15,0,15,0,15), //4 horizontal lines - // latin - 'A' => array(6,9,9,15,9,9,9), - 'B' => array(14,9,9,14,9,9,14), - 'C' => array(6,9,8,8,8,9,6), - 'D' => array(14,9,9,9,9,9,14), - 'E' => array(15,8,8,14,8,8,15), - 'F' => array(15,8,8,14,8,8,8), - 'G' => array(6,9,8,8,11,9,6), - 'H' => array(9,9,9,15,9,9,9), - 'I' => array(14,4,4,4,4,4,14), - 'J' => array(15,1,1,1,1,9,6), - 'K' => array(8,9,10,12,12,10,9), - 'L' => array(8,8,8,8,8,8,15), - 'M' => array(8,13,10,8,8,8,8),// need to add \r - 'N' => array(9,9,13,11,9,9,9), - 'O' => array(6,9,9,9,9,9,6), - 'P' => array(14,9,9,14,8,8,8), - 'Q' => array(6,9,9,9,13,11,6), - 'R' => array(14,9,9,14,12,10,9), - 'S' => array(6,9,8,6,1,9,6), - 'T' => array(14,4,4,4,4,4,4), - 'U' => array(9,9,9,9,9,9,6), - 'V' => array(0,0,0,10,10,10,4), - 'W' => array(8,8,8,8,10,13,8),// need to add \r - 'X' => array(9,9,6,6,6,9,9), - 'Y' => array(10,10,10,10,4,4,4), - 'Z' => array(15,1,2,6,4,8,15), - // russian utf-8 - 'Ð' => array(6,9,9,15,9,9,9), - 'Б' => array(14,8,8,14,9,9,14), - 'Ð’' => array(14,9,9,14,9,9,14), - 'Г' => array(15,8,8,8,8,8,8), - 'Д' => array(14,9,9,9,9,9,14), - 'Е' => array(15,8,8,14,8,8,15), - 'Ð' => array(6,15,8,14,8,8,15), - //Ж is combine: >\n< - 'З' => array(6,9,1,2,1,9,6), - 'И' => array(9,9,9,11,13,9,9), - 'Й' => array(13,9,9,11,13,9,9), - 'К' => array(9,10,12,10,9,9,9), - 'Л' => array(7,9,9,9,9,9,9), - 'Ðœ' => array(8,13,10,8,8,8,8),// need to add \r - 'Ð' => array(9,9,9,15,9,9,9), - 'О' => array(6,9,9,9,9,9,6), - 'П' => array(15,9,9,9,9,9,9), - 'Р' => array(14,9,9,14,8,8,8), - 'С' => array(6,9,8,8,8,9,6), - 'Т' => array(14,4,4,4,4,4,4), - 'У' => array(9,9,9,7,1,9,6), - 'Ф' => array(2,7,10,10,7,2,2),// need to add ÐŽ - 'Ð¥' => array(9,9,6,6,6,9,9), - 'Ц' => array(10,10,10,10,10,15,1), - 'Ч' => array(9,9,9,7,1,1,1), - 'Ш' => array(10,10,10,10,10,10,15),// \r - 'Щ' => array(10,10,10,10,10,15,0),// need to add \r - 'Ъ' => array(12,4,4,6,5,5,6), - 'Ы' => array(8,8,8,14,9,9,14),// need to add | - 'Ь' => array(8,8,8,14,9,9,14), - 'Э' => array(6,9,1,7,1,9,6), - 'Ю' => array(2,2,2,3,2,2,2),// need to add O - 'Я' => array(7,9,9,7,3,5,9) - ), - - $iSuperSampling = 3, $iMarg = 1, $iRad = 4; - - function __construct($aRadius = 2, $aMargin= 0.6) { - $this->iRad = $aRadius; - $this->iMarg = $aMargin; - } - - function SetSupersampling($aSuperSampling = 2) { - $this->iSuperSampling = $aSuperSampling; - } - - function _GetLED($aLedIdx, $aColor = 0) { - $width= $this->iLED_X*$this->iRad*2 + ($this->iLED_X+1)*$this->iMarg + $this->iRad ; - $height= $this->iLED_Y*$this->iRad*2 + ($this->iLED_Y)*$this->iMarg + $this->iRad * 2; - - // Adjust radious for supersampling - $rad = $this->iRad * $this->iSuperSampling; - - // Margin in between "Led" dots - $marg = $this->iMarg * $this->iSuperSampling; - - $swidth = $width*$this->iSuperSampling; - $sheight = $height*$this->iSuperSampling; - - $simg = new RotImage($swidth, $sheight, 0, DEFAULT_GFORMAT, false); - $simg->SetColor($this->iColorSchema[$aColor][2]); - $simg->FilledRectangle(0, 0, $swidth-1, $sheight-1); - - if( array_key_exists($aLedIdx, $this->iLEDSpec) ) { - $d = $this->iLEDSpec[$aLedIdx]; - } - else { - $d = array(0,0,0,0,0,0,0); - } - - for($r = 0; $r < 7; ++$r) { - $dr = $d[$r]; - for($c = 0; $c < 4; ++$c) { - if( ($dr & pow(2,3-$c)) !== 0 ) { - $color = $this->iColorSchema[$aColor][0]; - } - else { - $color = $this->iColorSchema[$aColor][1]; - } - - $x = 2*$rad*$c+$rad + ($c+1)*$marg + $rad ; - $y = 2*$rad*$r+$rad + ($r+1)*$marg + $rad ; - - $simg->SetColor($color); - $simg->FilledCircle($x,$y,$rad); - } - } - - $img = new Image($width, $height, DEFAULT_GFORMAT, false); - $img->Copy($simg->img, 0, 0, 0, 0, $width, $height, $swidth, $sheight); - $simg->Destroy(); - unset($simg); - return $img; - } - - - function Stroke($aValStr, $aColor = 0, $aFileName = '') { - $this->StrokeNumber($aValStr, $aColor, $aFileName); - } - - - function StrokeNumber($aValStr, $aColor = 0, $aFileName = '') { - if( $aColor < 0 || $aColor >= sizeof($this->iColorSchema) ) { - $aColor = 0; - } - - if(($n = mb_strlen($aValStr,'utf8')) == 0) { - $aValStr = ' '; - $n = 1; - } - - for($i = 0; $i < $n; ++$i) { - $d = mb_substr($aValStr, $i, 1, 'utf8'); - if( ctype_digit($d) ) { - $d = (int)$d; - } - else { - $d = strtoupper($d); - } - $digit_img[$i] = $this->_GetLED($d, $aColor); - } - - $w = imagesx($digit_img[0]->img); - $h = imagesy($digit_img[0]->img); - - $number_img = new Image($w*$n, $h, DEFAULT_GFORMAT, false); - - for($i = 0; $i < $n; ++$i) { - $number_img->Copy($digit_img[$i]->img, $i*$w, 0, 0, 0, $w, $h, $w, $h); - } - - if( $aFileName != '' ) { - $number_img->Stream($aFileName); - } else { - $number_img->Headers(); - $number_img->Stream(); - } - } -} -?> diff --git a/html/lib/jpgraph/jpgraph_legend.inc.php b/html/lib/jpgraph/jpgraph_legend.inc.php deleted file mode 100644 index 9705edcc28..0000000000 --- a/html/lib/jpgraph/jpgraph_legend.inc.php +++ /dev/null @@ -1,508 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -//======================================================================= -// File: JPGRAPH_LEGEND.INC.PHP -// Description: Class to handle the legend box in the graph that gives -// names on the data series. The number of rows and columns -// in the legend are user specifyable. -// Created: 2001-01-08 (Refactored to separate file 2008-08-01) -// Ver: $Id: jpgraph_legend.inc.php 1926 2010-01-11 16:33:07Z ljp $ -// -// Copyright (c) Aditus Consulting. All rights reserved. -//======================================================================== - -DEFINE('_DEFAULT_LPM_SIZE',8); // Default Legend Plot Mark size - - -//=================================================== -// CLASS Legend -// Description: Responsible for drawing the box containing -// all the legend text for the graph -//=================================================== - -class Legend { - public $txtcol=array(); - public $font_family=FF_FONT1,$font_style=FS_NORMAL,$font_size=12; - private $color=array(0,0,0); // Default fram color - private $fill_color=array(235,235,235); // Default fill color - private $shadow=true; // Shadow around legend "box" - private $shadow_color='darkgray'; - private $mark_abs_hsize=_DEFAULT_LPM_SIZE,$mark_abs_vsize=_DEFAULT_LPM_SIZE; - private $xmargin=10,$ymargin=0,$shadow_width=2; - private $xlmargin=4; - private $ylinespacing=5; - - // We need a separate margin since the baseline of the last text would coincide with the bottom otherwise - private $ybottom_margin = 8; - - private $xpos=0.05, $ypos=0.15, $xabspos=-1, $yabspos=-1; - private $halign="right", $valign="top"; - private $font_color='black'; - private $hide=false,$layout_n=1; - private $weight=1,$frameweight=1; - private $csimareas=''; - private $reverse = false ; - private $bkg_gradtype=-1, $bkg_gradfrom='lightgray', $bkg_gradto='gray'; - - //--------------- - // CONSTRUCTOR - function __construct() { - // Empty - } - //--------------- - // PUBLIC METHODS - function Hide($aHide=true) { - $this->hide=$aHide; - } - - function SetHColMargin($aXMarg) { - $this->xmargin = $aXMarg; - } - - function SetVColMargin($aSpacing) { - $this->ylinespacing = $aSpacing ; - } - - function SetLeftMargin($aXMarg) { - $this->xlmargin = $aXMarg; - } - - // Synonym - function SetLineSpacing($aSpacing) { - $this->ylinespacing = $aSpacing ; - } - - function SetShadow($aShow='gray',$aWidth=4) { - if( is_string($aShow) ) { - $this->shadow_color = $aShow; - $this->shadow=true; - } - else { - $this->shadow = $aShow; - } - $this->shadow_width = $aWidth; - } - - function SetMarkAbsSize($aSize) { - $this->mark_abs_vsize = $aSize ; - $this->mark_abs_hsize = $aSize ; - } - - function SetMarkAbsVSize($aSize) { - $this->mark_abs_vsize = $aSize ; - } - - function SetMarkAbsHSize($aSize) { - $this->mark_abs_hsize = $aSize ; - } - - function SetLineWeight($aWeight) { - $this->weight = $aWeight; - } - - function SetFrameWeight($aWeight) { - $this->frameweight = $aWeight; - } - - function SetLayout($aDirection=LEGEND_VERT) { - $this->layout_n = $aDirection==LEGEND_VERT ? 1 : 99 ; - } - - function SetColumns($aCols) { - $this->layout_n = $aCols ; - } - - function SetReverse($f=true) { - $this->reverse = $f ; - } - - // Set color on frame around box - function SetColor($aFontColor,$aColor='black') { - $this->font_color=$aFontColor; - $this->color=$aColor; - } - - function SetFont($aFamily,$aStyle=FS_NORMAL,$aSize=10) { - $this->font_family = $aFamily; - $this->font_style = $aStyle; - $this->font_size = $aSize; - } - - function SetPos($aX,$aY,$aHAlign='right',$aVAlign='top') { - $this->Pos($aX,$aY,$aHAlign,$aVAlign); - } - - function SetAbsPos($aX,$aY,$aHAlign='right',$aVAlign='top') { - $this->xabspos=$aX; - $this->yabspos=$aY; - $this->halign=$aHAlign; - $this->valign=$aVAlign; - } - - function Pos($aX,$aY,$aHAlign='right',$aVAlign='top') { - if( !($aX<1 && $aY<1) ) { - JpGraphError::RaiseL(25120);//(" Position for legend must be given as percentage in range 0-1"); - } - $this->xpos=$aX; - $this->ypos=$aY; - $this->halign=$aHAlign; - $this->valign=$aVAlign; - } - - function SetFillColor($aColor) { - $this->fill_color=$aColor; - } - - function Clear() { - $this->txtcol = array(); - } - - function Add($aTxt,$aColor,$aPlotmark='',$aLinestyle=0,$csimtarget='',$csimalt='',$csimwintarget='') { - $this->txtcol[]=array($aTxt,$aColor,$aPlotmark,$aLinestyle,$csimtarget,$csimalt,$csimwintarget); - } - - function GetCSIMAreas() { - return $this->csimareas; - } - - function SetBackgroundGradient($aFrom='navy',$aTo='silver',$aGradType=2) { - $this->bkg_gradtype=$aGradType; - $this->bkg_gradfrom = $aFrom; - $this->bkg_gradto = $aTo; - } - - function Stroke($aImg) { - // Constant - $fillBoxFrameWeight=1; - - if( $this->hide ) return; - - $aImg->SetFont($this->font_family,$this->font_style,$this->font_size); - - if( $this->reverse ) { - $this->txtcol = array_reverse($this->txtcol); - } - - $n=count($this->txtcol); - if( $n == 0 ) return; - - // Find out the max width and height of each column to be able - // to size the legend box. - $numcolumns = ($n > $this->layout_n ? $this->layout_n : $n); - for( $i=0; $i < $numcolumns; ++$i ) { - $colwidth[$i] = $aImg->GetTextWidth($this->txtcol[$i][0]) + - 2*$this->xmargin + 2*$this->mark_abs_hsize; - $colheight[$i] = 0; - - } - - // Find our maximum height in each row - $rows = 0 ; $rowheight[0] = 0; - for( $i=0; $i < $n; ++$i ) { - $h = max($this->mark_abs_vsize,$aImg->GetTextHeight($this->txtcol[$i][0]))+$this->ylinespacing; - - // Makes sure we always have a minimum of 1/4 (1/2 on each side) of the mark as space - // between two vertical legend entries - //$h = round(max($h,$this->mark_abs_vsize+$this->ymargin)); - //echo "Textheight #$i: tetxheight=".$aImg->GetTextHeight($this->txtcol[$i][0]).', '; - //echo "h=$h ({$this->mark_abs_vsize},{$this->ymargin})
        "; - if( $i % $numcolumns == 0 ) { - $rows++; - $rowheight[$rows-1] = 0; - } - $rowheight[$rows-1] = max($rowheight[$rows-1],$h); - } - - $abs_height = 0; - for( $i=0; $i < $rows; ++$i ) { - $abs_height += $rowheight[$i] ; - } - - // Make sure that the height is at least as high as mark size + ymargin - $abs_height = max($abs_height,$this->mark_abs_vsize); - $abs_height += $this->ybottom_margin; - - // Find out the maximum width in each column - for( $i=$numcolumns; $i < $n; ++$i ) { - $colwidth[$i % $numcolumns] = max( - $aImg->GetTextWidth($this->txtcol[$i][0])+2*$this->xmargin+2*$this->mark_abs_hsize, - $colwidth[$i % $numcolumns]); - } - - // Get the total width - $mtw = 0; - for( $i=0; $i < $numcolumns; ++$i ) { - $mtw += $colwidth[$i] ; - } - - // remove the last rows interpace margin (since there is no next row) - $abs_height -= $this->ylinespacing; - - - // Find out maximum width we need for legend box - $abs_width = $mtw+$this->xlmargin+($numcolumns-1)*$this->mark_abs_hsize; - - if( $this->xabspos === -1 && $this->yabspos === -1 ) { - $this->xabspos = $this->xpos*$aImg->width ; - $this->yabspos = $this->ypos*$aImg->height ; - } - - // Positioning of the legend box - if( $this->halign == 'left' ) { - $xp = $this->xabspos; - } - elseif( $this->halign == 'center' ) { - $xp = $this->xabspos - $abs_width/2; - } - else { - $xp = $aImg->width - $this->xabspos - $abs_width; - } - - $yp=$this->yabspos; - if( $this->valign == 'center' ) { - $yp-=$abs_height/2; - } - elseif( $this->valign == 'bottom' ) { - $yp-=$abs_height; - } - - // Stroke legend box - $aImg->SetColor($this->color); - $aImg->SetLineWeight($this->frameweight); - $aImg->SetLineStyle('solid'); - - if( $this->shadow ) { - $aImg->ShadowRectangle($xp,$yp, - $xp+$abs_width+$this->shadow_width+2, - $yp+$abs_height+$this->shadow_width+2, - $this->fill_color,$this->shadow_width+2,$this->shadow_color); - } - else { - $aImg->SetColor($this->fill_color); - $aImg->FilledRectangle($xp,$yp,$xp+$abs_width,$yp+$abs_height); - $aImg->SetColor($this->color); - $aImg->Rectangle($xp,$yp,$xp+$abs_width,$yp+$abs_height); - } - - if( $this->bkg_gradtype >= 0 ) { - $grad = new Gradient($aImg); - $grad->FilledRectangle($xp+1, $yp+1, - $xp+$abs_width-3, $yp+$abs_height-3, - $this->bkg_gradfrom, $this->bkg_gradto, - $this->bkg_gradtype); - } - - // x1,y1 is the position for the legend marker + text - // The vertical position is the baseline position for the text - // and every marker is adjusted acording to that. - - // For multiline texts this get more complicated. - - $x1 = $xp + $this->xlmargin; - $y1 = $yp + $rowheight[0] - $this->ylinespacing + 2 ; // The ymargin is included in rowheight - - // Now, y1 is the bottom vertical position of the first legend, i.e if - // the legend has multiple lines it is the bottom line. - - $grad = new Gradient($aImg); - $patternFactory = null; - - // Now stroke each legend in turn - // Each plot has added the following information to the legend - // p[0] = Legend text - // p[1] = Color, - // p[2] = For markers a reference to the PlotMark object - // p[3] = For lines the line style, for gradient the negative gradient style - // p[4] = CSIM target - // p[5] = CSIM Alt text - $i = 1 ; $row = 0; - foreach($this->txtcol as $p) { - - // STROKE DEBUG BOX - if( _JPG_DEBUG ) { - $aImg->SetLineWeight(1); - $aImg->SetColor('red'); - $aImg->SetLineStyle('solid'); - $aImg->Rectangle($x1,$y1,$xp+$abs_width-1,$y1-$rowheight[$row]); - } - - $aImg->SetLineWeight($this->weight); - $x1 = round($x1)+1; // We add one to not collide with the border - $y1=round($y1); - - // This is the center offset up from the baseline which is - // considered the "center" of the marks. This gets slightly complicated since - // we need to consider if the text is a multiline paragraph or if it is only - // a single line. The reason is that for single line the y1 corresponds to the baseline - // and that is fine. However for a multiline paragraph there is no single baseline - // and in that case the y1 corresponds to the lowest y for the bounding box. In that - // case we center the mark in the middle of the paragraph - if( !preg_match('/\n/',$p[0]) ) { - // Single line - $marky = ceil($y1-$this->mark_abs_vsize/2)-1; - } else { - // Paragraph - $marky = $y1 - $aImg->GetTextHeight($p[0])/2; - - // echo "y1=$y1, p[o]={$p[0]}, marky=$marky
        "; - } - - //echo "
        Mark #$i: marky=$marky
        "; - - $x1 += $this->mark_abs_hsize; - - if ( !empty($p[2]) && $p[2]->GetType() > -1 ) { - - - // Make a plot mark legend. This is constructed with a mark which - // is run through with a line - - // First construct a bit of the line that looks exactly like the - // line in the plot - $aImg->SetColor($p[1]); - if( is_string($p[3]) || $p[3]>0 ) { - $aImg->SetLineStyle($p[3]); - $aImg->StyleLine($x1-$this->mark_abs_hsize,$marky,$x1+$this->mark_abs_hsize,$marky); - } - - // Stroke a mark with the standard size - // (As long as it is not an image mark ) - if( $p[2]->GetType() != MARK_IMG ) { - - // Clear any user callbacks since we ont want them called for - // the legend marks - $p[2]->iFormatCallback = ''; - $p[2]->iFormatCallback2 = ''; - - // Since size for circles is specified as the radius - // this means that we must half the size to make the total - // width behave as the other marks - if( $p[2]->GetType() == MARK_FILLEDCIRCLE || $p[2]->GetType() == MARK_CIRCLE ) { - $p[2]->SetSize(min($this->mark_abs_vsize,$this->mark_abs_hsize)/2); - $p[2]->Stroke($aImg,$x1,$marky); - } - else { - $p[2]->SetSize(min($this->mark_abs_vsize,$this->mark_abs_hsize)); - $p[2]->Stroke($aImg,$x1,$marky); - } - } - } - elseif ( !empty($p[2]) && (is_string($p[3]) || $p[3]>0 ) ) { - // Draw a styled line - $aImg->SetColor($p[1]); - $aImg->SetLineStyle($p[3]); - $aImg->StyleLine($x1-$this->mark_abs_hsize,$marky,$x1+$this->mark_abs_hsize,$marky); - $aImg->StyleLine($x1-$this->mark_abs_hsize,$marky+1,$x1+$this->mark_abs_hsize,$marky+1); - } - else { - // Draw a colored box - $color = $p[1] ; - - // We make boxes slightly larger to better show - $boxsize = max($this->mark_abs_vsize,$this->mark_abs_hsize) + 2 ; - - $ym = $marky-ceil($boxsize/2) ; // Marker y-coordinate - - // We either need to plot a gradient or a - // pattern. To differentiate we use a kludge. - // Patterns have a p[3] value of < -100 - if( $p[3] < -100 ) { - // p[1][0] == iPattern, p[1][1] == iPatternColor, p[1][2] == iPatternDensity - if( $patternFactory == null ) { - $patternFactory = new RectPatternFactory(); - } - $prect = $patternFactory->Create($p[1][0],$p[1][1],1); - $prect->SetBackground($p[1][3]); - $prect->SetDensity($p[1][2]+1); - $prect->SetPos(new Rectangle($x1,$ym,$boxsize,$boxsize)); - $prect->Stroke($aImg); - $prect=null; - } - else { - if( is_array($color) && count($color)==2 ) { - // The client want a gradient color - $grad->FilledRectangle($x1-$boxsize/2,$ym, - $x1+$boxsize/2,$ym+$boxsize, - $color[0],$color[1],-$p[3]); - } - else { - $aImg->SetColor($p[1]); - $aImg->FilledRectangle($x1-$boxsize/2,$ym, - $x1+$boxsize/2,$ym+$boxsize); - } - $aImg->SetColor($this->color); - $aImg->SetLineWeight($fillBoxFrameWeight); - $aImg->Rectangle($x1-$boxsize/2,$ym, - $x1+$boxsize/2,$ym+$boxsize); - } - } - $aImg->SetColor($this->font_color); - $aImg->SetFont($this->font_family,$this->font_style,$this->font_size); - $aImg->SetTextAlign('left','baseline'); - - $debug=false; - $aImg->StrokeText($x1+$this->mark_abs_hsize+$this->xmargin,$y1,$p[0], - 0,'left',$debug); - - // Add CSIM for Legend if defined - if( !empty($p[4]) ) { - - $xs = $x1 - $this->mark_abs_hsize ; - $ys = $y1 + 1 ; - $xe = $x1 + $aImg->GetTextWidth($p[0]) + $this->mark_abs_hsize + $this->xmargin ; - $ye = $y1-$rowheight[$row]+1; - $coords = "$xs,$ys,$xe,$y1,$xe,$ye,$xs,$ye"; - if( ! empty($p[4]) ) { - $this->csimareas .= "csimareas .= " target=\"".$p[6]."\""; - } - - if( !empty($p[5]) ) { - $tmp=sprintf($p[5],$p[0]); - $this->csimareas .= " title=\"$tmp\" alt=\"$tmp\" "; - } - $this->csimareas .= " />\n"; - } - } - - if( $i >= $this->layout_n ) { - $x1 = $xp+$this->xlmargin; - $row++; - if( !empty($rowheight[$row]) ) - $y1 += $rowheight[$row]; - $i = 1; - } - else { - $x1 += $colwidth[($i-1) % $numcolumns] ; - ++$i; - } - } - } -} // Class - -?> diff --git a/html/lib/jpgraph/jpgraph_line.php b/html/lib/jpgraph/jpgraph_line.php deleted file mode 100644 index 1a1d0c6661..0000000000 --- a/html/lib/jpgraph/jpgraph_line.php +++ /dev/null @@ -1,706 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -/*======================================================================= - // File: JPGRAPH_LINE.PHP - // Description: Line plot extension for JpGraph - // Created: 2001-01-08 - // Ver: $Id: jpgraph_line.php 1921 2009-12-11 11:46:39Z ljp $ - // - // Copyright (c) Aditus Consulting. All rights reserved. - //======================================================================== - */ - -require_once ('jpgraph_plotmark.inc.php'); - -// constants for the (filled) area -DEFINE("LP_AREA_FILLED", true); -DEFINE("LP_AREA_NOT_FILLED", false); -DEFINE("LP_AREA_BORDER",false); -DEFINE("LP_AREA_NO_BORDER",true); - -//=================================================== -// CLASS LinePlot -// Description: -//=================================================== -class LinePlot extends Plot{ - public $mark=null; - protected $filled=false; - protected $fill_color='blue'; - protected $step_style=false, $center=false; - protected $line_style=1; // Default to solid - protected $filledAreas = array(); // array of arrays(with min,max,col,filled in them) - public $barcenter=false; // When we mix line and bar. Should we center the line in the bar. - protected $fillFromMin = false, $fillFromMax = false; - protected $fillgrad=false,$fillgrad_fromcolor='navy',$fillgrad_tocolor='silver',$fillgrad_numcolors=100; - protected $iFastStroke=false; - - //--------------- - // CONSTRUCTOR - function __construct($datay,$datax=false) { - parent::__construct($datay,$datax); - $this->mark = new PlotMark() ; - $this->color = ColorFactory::getColor(); - $this->fill_color = $this->color; - } - //--------------- - // PUBLIC METHODS - - function SetFilled($aFlg=true) { - $this->filled = $aFlg; - } - - function SetBarCenter($aFlag=true) { - $this->barcenter=$aFlag; - } - - function SetStyle($aStyle) { - $this->line_style=$aStyle; - } - - function SetStepStyle($aFlag=true) { - $this->step_style = $aFlag; - } - - function SetColor($aColor) { - parent::SetColor($aColor); - } - - function SetFillFromYMin($f=true) { - $this->fillFromMin = $f ; - } - - function SetFillFromYMax($f=true) { - $this->fillFromMax = $f ; - } - - function SetFillColor($aColor,$aFilled=true) { - //$this->color = $aColor; - $this->fill_color=$aColor; - $this->filled=$aFilled; - } - - function SetFillGradient($aFromColor,$aToColor,$aNumColors=100,$aFilled=true) { - $this->fillgrad_fromcolor = $aFromColor; - $this->fillgrad_tocolor = $aToColor; - $this->fillgrad_numcolors = $aNumColors; - $this->filled = $aFilled; - $this->fillgrad = true; - } - - function Legend($graph) { - if( $this->legend!="" ) { - if( $this->filled && !$this->fillgrad ) { - $graph->legend->Add($this->legend, - $this->fill_color,$this->mark,0, - $this->legendcsimtarget,$this->legendcsimalt,$this->legendcsimwintarget); - } - elseif( $this->fillgrad ) { - $color=array($this->fillgrad_fromcolor,$this->fillgrad_tocolor); - // In order to differentiate between gradients and cooors specified as an RGB triple - $graph->legend->Add($this->legend,$color,"",-2 /* -GRAD_HOR */, - $this->legendcsimtarget,$this->legendcsimalt,$this->legendcsimwintarget); - } else { - $graph->legend->Add($this->legend, - $this->color,$this->mark,$this->line_style, - $this->legendcsimtarget,$this->legendcsimalt,$this->legendcsimwintarget); - } - } - } - - function AddArea($aMin=0,$aMax=0,$aFilled=LP_AREA_NOT_FILLED,$aColor="gray9",$aBorder=LP_AREA_BORDER) { - if($aMin > $aMax) { - // swap - $tmp = $aMin; - $aMin = $aMax; - $aMax = $tmp; - } - $this->filledAreas[] = array($aMin,$aMax,$aColor,$aFilled,$aBorder); - } - - // Gets called before any axis are stroked - function PreStrokeAdjust($graph) { - - // If another plot type have already adjusted the - // offset we don't touch it. - // (We check for empty in case the scale is a log scale - // and hence doesn't contain any xlabel_offset) - if( empty($graph->xaxis->scale->ticks->xlabel_offset) || $graph->xaxis->scale->ticks->xlabel_offset == 0 ) { - if( $this->center ) { - ++$this->numpoints; - $a=0.5; $b=0.5; - } else { - $a=0; $b=0; - } - $graph->xaxis->scale->ticks->SetXLabelOffset($a); - $graph->SetTextScaleOff($b); - //$graph->xaxis->scale->ticks->SupressMinorTickMarks(); - } - } - - function SetFastStroke($aFlg=true) { - $this->iFastStroke = $aFlg; - } - - function FastStroke($img,$xscale,$yscale,$aStartPoint=0,$exist_x=true) { - // An optimized stroke for many data points with no extra - // features but 60% faster. You can't have values or line styles, or null - // values in plots. - $numpoints=count($this->coords[0]); - if( $this->barcenter ) { - $textadj = 0.5-$xscale->text_scale_off; - } - else { - $textadj = 0; - } - - $img->SetColor($this->color); - $img->SetLineWeight($this->weight); - $pnts=$aStartPoint; - while( $pnts < $numpoints ) { - if( $exist_x ) { - $x=$this->coords[1][$pnts]; - } - else { - $x=$pnts+$textadj; - } - $xt = $xscale->Translate($x); - $y=$this->coords[0][$pnts]; - $yt = $yscale->Translate($y); - if( is_numeric($y) ) { - $cord[] = $xt; - $cord[] = $yt; - } - elseif( $y == '-' && $pnts > 0 ) { - // Just ignore - } - else { - JpGraphError::RaiseL(10002);//('Plot too complicated for fast line Stroke. Use standard Stroke()'); - } - ++$pnts; - } // WHILE - - $img->Polygon($cord,false,true); - } - - function Stroke($img,$xscale,$yscale) { - $idx=0; - $numpoints=count($this->coords[0]); - if( isset($this->coords[1]) ) { - if( count($this->coords[1])!=$numpoints ) { - JpGraphError::RaiseL(2003,count($this->coords[1]),$numpoints); - //("Number of X and Y points are not equal. Number of X-points:".count($this->coords[1])." Number of Y-points:$numpoints"); - } - else { - $exist_x = true; - } - } - else { - $exist_x = false; - } - - if( $this->barcenter ) { - $textadj = 0.5-$xscale->text_scale_off; - } - else { - $textadj = 0; - } - - // Find the first numeric data point - $startpoint=0; - while( $startpoint < $numpoints && !is_numeric($this->coords[0][$startpoint]) ) { - ++$startpoint; - } - - // Bail out if no data points - if( $startpoint == $numpoints ) return; - - if( $this->iFastStroke ) { - $this->FastStroke($img,$xscale,$yscale,$startpoint,$exist_x); - return; - } - - if( $exist_x ) { - $xs=$this->coords[1][$startpoint]; - } - else { - $xs= $textadj+$startpoint; - } - - $img->SetStartPoint($xscale->Translate($xs), - $yscale->Translate($this->coords[0][$startpoint])); - - if( $this->filled ) { - if( $this->fillFromMax ) { - //$max = $yscale->GetMaxVal(); - $cord[$idx++] = $xscale->Translate($xs); - $cord[$idx++] = $yscale->scale_abs[1]; - } - else { - $min = $yscale->GetMinVal(); - if( $min > 0 || $this->fillFromMin ) { - $fillmin = $yscale->scale_abs[0];//Translate($min); - } - else { - $fillmin = $yscale->Translate(0); - } - - $cord[$idx++] = $xscale->Translate($xs); - $cord[$idx++] = $fillmin; - } - } - $xt = $xscale->Translate($xs); - $yt = $yscale->Translate($this->coords[0][$startpoint]); - $cord[$idx++] = $xt; - $cord[$idx++] = $yt; - $yt_old = $yt; - $xt_old = $xt; - $y_old = $this->coords[0][$startpoint]; - - $this->value->Stroke($img,$this->coords[0][$startpoint],$xt,$yt); - - $img->SetColor($this->color); - $img->SetLineWeight($this->weight); - $img->SetLineStyle($this->line_style); - $pnts=$startpoint+1; - $firstnonumeric = false; - - - while( $pnts < $numpoints ) { - - if( $exist_x ) { - $x=$this->coords[1][$pnts]; - } - else { - $x=$pnts+$textadj; - } - $xt = $xscale->Translate($x); - $yt = $yscale->Translate($this->coords[0][$pnts]); - - $y=$this->coords[0][$pnts]; - if( $this->step_style ) { - // To handle null values within step style we need to record the - // first non numeric value so we know from where to start if the - // non value is '-'. - if( is_numeric($y) ) { - $firstnonumeric = false; - if( is_numeric($y_old) ) { - $img->StyleLine($xt_old,$yt_old,$xt,$yt_old); - $img->StyleLine($xt,$yt_old,$xt,$yt); - } - elseif( $y_old == '-' ) { - $img->StyleLine($xt_first,$yt_first,$xt,$yt_first); - $img->StyleLine($xt,$yt_first,$xt,$yt); - } - else { - $yt_old = $yt; - $xt_old = $xt; - } - $cord[$idx++] = $xt; - $cord[$idx++] = $yt_old; - $cord[$idx++] = $xt; - $cord[$idx++] = $yt; - } - elseif( $firstnonumeric==false ) { - $firstnonumeric = true; - $yt_first = $yt_old; - $xt_first = $xt_old; - } - } - else { - $tmp1=$y; - $prev=$this->coords[0][$pnts-1]; - if( $tmp1==='' || $tmp1===NULL || $tmp1==='X' ) $tmp1 = 'x'; - if( $prev==='' || $prev===null || $prev==='X' ) $prev = 'x'; - - if( is_numeric($y) || (is_string($y) && $y != '-') ) { - if( is_numeric($y) && (is_numeric($prev) || $prev === '-' ) ) { - $img->StyleLineTo($xt,$yt); - } - else { - $img->SetStartPoint($xt,$yt); - } - } - if( $this->filled && $tmp1 !== '-' ) { - if( $tmp1 === 'x' ) { - $cord[$idx++] = $cord[$idx-3]; - $cord[$idx++] = $fillmin; - } - elseif( $prev === 'x' ) { - $cord[$idx++] = $xt; - $cord[$idx++] = $fillmin; - $cord[$idx++] = $xt; - $cord[$idx++] = $yt; - } - else { - $cord[$idx++] = $xt; - $cord[$idx++] = $yt; - } - } - else { - if( is_numeric($tmp1) && (is_numeric($prev) || $prev === '-' ) ) { - $cord[$idx++] = $xt; - $cord[$idx++] = $yt; - } - } - } - $yt_old = $yt; - $xt_old = $xt; - $y_old = $y; - - $this->StrokeDataValue($img,$this->coords[0][$pnts],$xt,$yt); - - ++$pnts; - } - - if( $this->filled ) { - $cord[$idx++] = $xt; - if( $this->fillFromMax ) { - $cord[$idx++] = $yscale->scale_abs[1]; - } - else { - if( $min > 0 || $this->fillFromMin ) { - $cord[$idx++] = $yscale->Translate($min); - } - else { - $cord[$idx++] = $yscale->Translate(0); - } - } - if( $this->fillgrad ) { - $img->SetLineWeight(1); - $grad = new Gradient($img); - $grad->SetNumColors($this->fillgrad_numcolors); - $grad->FilledFlatPolygon($cord,$this->fillgrad_fromcolor,$this->fillgrad_tocolor); - $img->SetLineWeight($this->weight); - } - else { - $img->SetColor($this->fill_color); - $img->FilledPolygon($cord); - } - if( $this->weight > 0 ) { - $img->SetLineWeight($this->weight); - $img->SetColor($this->color); - // Remove first and last coordinate before drawing the line - // sine we otherwise get the vertical start and end lines which - // doesn't look appropriate - $img->Polygon(array_slice($cord,2,count($cord)-4)); - } - } - - if(!empty($this->filledAreas)) { - - $minY = $yscale->Translate($yscale->GetMinVal()); - $factor = ($this->step_style ? 4 : 2); - - for($i = 0; $i < sizeof($this->filledAreas); ++$i) { - // go through all filled area elements ordered by insertion - // fill polygon array - $areaCoords[] = $cord[$this->filledAreas[$i][0] * $factor]; - $areaCoords[] = $minY; - - $areaCoords = - array_merge($areaCoords, - array_slice($cord, - $this->filledAreas[$i][0] * $factor, - ($this->filledAreas[$i][1] - $this->filledAreas[$i][0] + ($this->step_style ? 0 : 1)) * $factor)); - $areaCoords[] = $areaCoords[sizeof($areaCoords)-2]; // last x - $areaCoords[] = $minY; // last y - - if($this->filledAreas[$i][3]) { - $img->SetColor($this->filledAreas[$i][2]); - $img->FilledPolygon($areaCoords); - $img->SetColor($this->color); - } - // Check if we should draw the frame. - // If not we still re-draw the line since it might have been - // partially overwritten by the filled area and it doesn't look - // very good. - if( $this->filledAreas[$i][4] ) { - $img->Polygon($areaCoords); - } - else { - $img->Polygon($cord); - } - - $areaCoords = array(); - } - } - - if( $this->mark->type == -1 || $this->mark->show == false ) - return; - - for( $pnts=0; $pnts<$numpoints; ++$pnts) { - - if( $exist_x ) { - $x=$this->coords[1][$pnts]; - } - else { - $x=$pnts+$textadj; - } - $xt = $xscale->Translate($x); - $yt = $yscale->Translate($this->coords[0][$pnts]); - - if( is_numeric($this->coords[0][$pnts]) ) { - if( !empty($this->csimtargets[$pnts]) ) { - if( !empty($this->csimwintargets[$pnts]) ) { - $this->mark->SetCSIMTarget($this->csimtargets[$pnts],$this->csimwintargets[$pnts]); - } - else { - $this->mark->SetCSIMTarget($this->csimtargets[$pnts]); - } - $this->mark->SetCSIMAlt($this->csimalts[$pnts]); - } - if( $exist_x ) { - $x=$this->coords[1][$pnts]; - } - else { - $x=$pnts; - } - $this->mark->SetCSIMAltVal($this->coords[0][$pnts],$x); - $this->mark->Stroke($img,$xt,$yt); - $this->csimareas .= $this->mark->GetCSIMAreas(); - } - } - } -} // Class - - -//=================================================== -// CLASS AccLinePlot -// Description: -//=================================================== -class AccLinePlot extends Plot { - protected $plots=null,$nbrplots=0; - private $iStartEndZero=true; - //--------------- - // CONSTRUCTOR - function __construct($plots) { - $this->plots = $plots; - $this->nbrplots = count($plots); - $this->numpoints = $plots[0]->numpoints; - - // Verify that all plots have the same number of data points - for( $i=1; $i < $this->nbrplots; ++$i ) { - if( $plots[$i]->numpoints != $this->numpoints ) { - JpGraphError::RaiseL(10003);//('Each plot in an accumulated lineplot must have the same number of data points',0) - } - } - - for($i=0; $i < $this->nbrplots; ++$i ) { - $this->LineInterpolate($this->plots[$i]->coords[0]); - } - } - - //--------------- - // PUBLIC METHODS - function Legend($graph) { - foreach( $this->plots as $p ) { - $p->DoLegend($graph); - } - } - - function Max() { - list($xmax) = $this->plots[0]->Max(); - $nmax=0; - $n = count($this->plots); - for($i=0; $i < $n; ++$i) { - $nc = count($this->plots[$i]->coords[0]); - $nmax = max($nmax,$nc); - list($x) = $this->plots[$i]->Max(); - $xmax = Max($xmax,$x); - } - for( $i = 0; $i < $nmax; $i++ ) { - // Get y-value for line $i by adding the - // individual bars from all the plots added. - // It would be wrong to just add the - // individual plots max y-value since that - // would in most cases give to large y-value. - $y=$this->plots[0]->coords[0][$i]; - for( $j = 1; $j < $this->nbrplots; $j++ ) { - $y += $this->plots[ $j ]->coords[0][$i]; - } - $ymax[$i] = $y; - } - $ymax = max($ymax); - return array($xmax,$ymax); - } - - function Min() { - $nmax=0; - list($xmin,$ysetmin) = $this->plots[0]->Min(); - $n = count($this->plots); - for($i=0; $i < $n; ++$i) { - $nc = count($this->plots[$i]->coords[0]); - $nmax = max($nmax,$nc); - list($x,$y) = $this->plots[$i]->Min(); - $xmin = Min($xmin,$x); - $ysetmin = Min($y,$ysetmin); - } - for( $i = 0; $i < $nmax; $i++ ) { - // Get y-value for line $i by adding the - // individual bars from all the plots added. - // It would be wrong to just add the - // individual plots min y-value since that - // would in most cases give to small y-value. - $y=$this->plots[0]->coords[0][$i]; - for( $j = 1; $j < $this->nbrplots; $j++ ) { - $y += $this->plots[ $j ]->coords[0][$i]; - } - $ymin[$i] = $y; - } - $ymin = Min($ysetmin,Min($ymin)); - return array($xmin,$ymin); - } - - // Gets called before any axis are stroked - function PreStrokeAdjust($graph) { - - // If another plot type have already adjusted the - // offset we don't touch it. - // (We check for empty in case the scale is a log scale - // and hence doesn't contain any xlabel_offset) - - if( empty($graph->xaxis->scale->ticks->xlabel_offset) || - $graph->xaxis->scale->ticks->xlabel_offset == 0 ) { - if( $this->center ) { - ++$this->numpoints; - $a=0.5; $b=0.5; - } else { - $a=0; $b=0; - } - $graph->xaxis->scale->ticks->SetXLabelOffset($a); - $graph->SetTextScaleOff($b); - $graph->xaxis->scale->ticks->SupressMinorTickMarks(); - } - - } - - function SetInterpolateMode($aIntMode) { - $this->iStartEndZero=$aIntMode; - } - - // Replace all '-' with an interpolated value. We use straightforward - // linear interpolation. If the data starts with one or several '-' they - // will be replaced by the the first valid data point - function LineInterpolate(&$aData) { - - $n=count($aData); - $i=0; - - // If first point is undefined we will set it to the same as the first - // valid data - if( $aData[$i]==='-' ) { - // Find the first valid data - while( $i < $n && $aData[$i]==='-' ) { - ++$i; - } - if( $i < $n ) { - for($j=0; $j < $i; ++$j ) { - if( $this->iStartEndZero ) - $aData[$i] = 0; - else - $aData[$j] = $aData[$i]; - } - } - else { - // All '-' => Error - return false; - } - } - - while($i < $n) { - while( $i < $n && $aData[$i] !== '-' ) { - ++$i; - } - if( $i < $n ) { - $pstart=$i-1; - - // Now see how long this segment of '-' are - while( $i < $n && $aData[$i] === '-' ) { - ++$i; - } - if( $i < $n ) { - $pend=$i; - $size=$pend-$pstart; - $k=($aData[$pend]-$aData[$pstart])/$size; - // Replace the segment of '-' with a linear interpolated value. - for($j=1; $j < $size; ++$j ) { - $aData[$pstart+$j] = $aData[$pstart] + $j*$k ; - } - } - else { - // There are no valid end point. The '-' goes all the way to the end - // In that case we just set all the remaining values the the same as the - // last valid data point. - for( $j=$pstart+1; $j < $n; ++$j ) - if( $this->iStartEndZero ) { - $aData[$j] = 0; - } - else { - $aData[$j] = $aData[$pstart] ; - } - } - } - } - return true; - } - - // To avoid duplicate of line drawing code here we just - // change the y-values for each plot and then restore it - // after we have made the stroke. We must do this copy since - // it wouldn't be possible to create an acc line plot - // with the same graphs, i.e AccLinePlot(array($pl,$pl,$pl)); - // since this method would have a side effect. - function Stroke($img,$xscale,$yscale) { - $img->SetLineWeight($this->weight); - $this->numpoints = count($this->plots[0]->coords[0]); - // Allocate array - $coords[$this->nbrplots][$this->numpoints]=0; - for($i=0; $i<$this->numpoints; $i++) { - $coords[0][$i]=$this->plots[0]->coords[0][$i]; - $accy=$coords[0][$i]; - for($j=1; $j<$this->nbrplots; ++$j ) { - $coords[$j][$i] = $this->plots[$j]->coords[0][$i]+$accy; - $accy = $coords[$j][$i]; - } - } - for($j=$this->nbrplots-1; $j>=0; --$j) { - $p=$this->plots[$j]; - for( $i=0; $i<$this->numpoints; ++$i) { - $tmp[$i]=$p->coords[0][$i]; - $p->coords[0][$i]=$coords[$j][$i]; - } - $p->Stroke($img,$xscale,$yscale); - for( $i=0; $i<$this->numpoints; ++$i) { - $p->coords[0][$i]=$tmp[$i]; - } - $p->coords[0][]=$tmp; - } - } -} // Class - - -/* EOF */ -?> diff --git a/html/lib/jpgraph/jpgraph_log.php b/html/lib/jpgraph/jpgraph_log.php deleted file mode 100644 index eaa8e9eb69..0000000000 --- a/html/lib/jpgraph/jpgraph_log.php +++ /dev/null @@ -1,329 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -/*======================================================================= - // File: JPGRAPH_LOG.PHP - // Description: Log scale plot extension for JpGraph - // Created: 2001-01-08 - // Ver: $Id: jpgraph_log.php 1106 2009-02-22 20:16:35Z ljp $ - // - // Copyright (c) Aditus Consulting. All rights reserved. - //======================================================================== - */ - -DEFINE('LOGLABELS_PLAIN',0); -DEFINE('LOGLABELS_MAGNITUDE',1); - -//=================================================== -// CLASS LogScale -// Description: Logarithmic scale between world and screen -//=================================================== -class LogScale extends LinearScale { - //--------------- - // CONSTRUCTOR - - // Log scale is specified using the log of min and max - function __construct($min,$max,$type="y") { - parent::__construct($min,$max,$type); - $this->ticks = new LogTicks(); - $this->name = 'log'; - } - - //---------------- - // PUBLIC METHODS - - // Translate between world and screen - function Translate($a) { - if( !is_numeric($a) ) { - if( $a != '' && $a != '-' && $a != 'x' ) { - JpGraphError::RaiseL(11001); - // ('Your data contains non-numeric values.'); - } - return 1; - } - if( $a < 0 ) { - JpGraphError::RaiseL(11002); - //("Negative data values can not be used in a log scale."); - exit(1); - } - if( $a==0 ) $a=1; - $a=log10($a); - return ceil($this->off + ($a*1.0 - $this->scale[0]) * $this->scale_factor); - } - - // Relative translate (don't include offset) usefull when we just want - // to know the relative position (in pixels) on the axis - function RelTranslate($a) { - if( !is_numeric($a) ) { - if( $a != '' && $a != '-' && $a != 'x' ) { - JpGraphError::RaiseL(11001); - //('Your data contains non-numeric values.'); - } - return 1; - } - if( $a==0 ) { - $a=1; - } - $a=log10($a); - return round(($a*1.0 - $this->scale[0]) * $this->scale_factor); - } - - // Use bcpow() for increased precision - function GetMinVal() { - if( function_exists("bcpow") ) { - return round(bcpow(10,$this->scale[0],15),14); - } - else { - return round(pow(10,$this->scale[0]),14); - } - } - - function GetMaxVal() { - if( function_exists("bcpow") ) { - return round(bcpow(10,$this->scale[1],15),14); - } - else { - return round(pow(10,$this->scale[1]),14); - } - } - - // Logarithmic autoscaling is much simplier since we just - // set the min and max to logs of the min and max values. - // Note that for log autoscale the "maxstep" the fourth argument - // isn't used. This is just included to give the method the same - // signature as the linear counterpart. - function AutoScale($img,$min,$max,$maxsteps,$majend=true) { - if( $min==0 ) $min=1; - - if( $max <= 0 ) { - JpGraphError::RaiseL(11004); - //('Scale error for logarithmic scale. You have a problem with your data values. The max value must be greater than 0. It is mathematically impossible to have 0 in a logarithmic scale.'); - } - if( is_numeric($this->autoscale_min) ) { - $smin = round($this->autoscale_min); - $smax = ceil(log10($max)); - if( $min >= $max ) { - JpGraphError::RaiseL(25071);//('You have specified a min value with SetAutoMin() which is larger than the maximum value used for the scale. This is not possible.'); - } - } - else { - $smin = floor(log10($min)); - if( is_numeric($this->autoscale_max) ) { - $smax = round($this->autoscale_max); - if( $smin >= $smax ) { - JpGraphError::RaiseL(25072);//('You have specified a max value with SetAutoMax() which is smaller than the miminum value used for the scale. This is not possible.'); - } - } - else - $smax = ceil(log10($max)); - } - - $this->Update($img,$smin,$smax); - } - //--------------- - // PRIVATE METHODS -} // Class - -//=================================================== -// CLASS LogTicks -// Description: -//=================================================== -class LogTicks extends Ticks{ - private $label_logtype=LOGLABELS_MAGNITUDE; - private $ticklabels_pos = array(); - //--------------- - // CONSTRUCTOR - function __construct() { - } - //--------------- - // PUBLIC METHODS - function IsSpecified() { - return true; - } - - function SetLabelLogType($aType) { - $this->label_logtype = $aType; - } - - // For log scale it's meaningless to speak about a major step - // We just return -1 to make the framework happy (specifically - // StrokeLabels() ) - function GetMajor() { - return -1; - } - - function SetTextLabelStart($aStart) { - JpGraphError::RaiseL(11005); - //('Specifying tick interval for a logarithmic scale is undefined. Remove any calls to SetTextLabelStart() or SetTextTickInterval() on the logarithmic scale.'); - } - - function SetXLabelOffset($dummy) { - // For log scales we dont care about XLabel offset - } - - // Draw ticks on image "img" using scale "scale". The axis absolute - // position in the image is specified in pos, i.e. for an x-axis - // it specifies the absolute y-coord and for Y-ticks it specified the - // absolute x-position. - function Stroke($img,$scale,$pos) { - $start = $scale->GetMinVal(); - $limit = $scale->GetMaxVal(); - $nextMajor = 10*$start; - $step = $nextMajor / 10.0; - - - $img->SetLineWeight($this->weight); - - if( $scale->type == "y" ) { - // member direction specified if the ticks should be on - // left or right side. - $a=$pos + $this->direction*$this->GetMinTickAbsSize(); - $a2=$pos + $this->direction*$this->GetMajTickAbsSize(); - - $count=1; - $this->maj_ticks_pos[0]=$scale->Translate($start); - $this->maj_ticklabels_pos[0]=$scale->Translate($start); - if( $this->supress_first ) - $this->maj_ticks_label[0]=""; - else { - if( $this->label_formfunc != '' ) { - $f = $this->label_formfunc; - $this->maj_ticks_label[0]=call_user_func($f,$start); - } - elseif( $this->label_logtype == LOGLABELS_PLAIN ) { - $this->maj_ticks_label[0]=$start; - } - else { - $this->maj_ticks_label[0]='10^'.round(log10($start)); - } - } - $i=1; - for($y=$start; $y<=$limit; $y+=$step,++$count ) { - $ys=$scale->Translate($y); - $this->ticks_pos[]=$ys; - $this->ticklabels_pos[]=$ys; - if( $count % 10 == 0 ) { - if( !$this->supress_tickmarks ) { - if( $this->majcolor!="" ) { - $img->PushColor($this->majcolor); - $img->Line($pos,$ys,$a2,$ys); - $img->PopColor(); - } - else { - $img->Line($pos,$ys,$a2,$ys); - } - } - - $this->maj_ticks_pos[$i]=$ys; - $this->maj_ticklabels_pos[$i]=$ys; - - if( $this->label_formfunc != '' ) { - $f = $this->label_formfunc; - $this->maj_ticks_label[$i]=call_user_func($f,$nextMajor); - } - elseif( $this->label_logtype == 0 ) { - $this->maj_ticks_label[$i]=$nextMajor; - } - else { - $this->maj_ticks_label[$i]='10^'.round(log10($nextMajor)); - } - ++$i; - $nextMajor *= 10; - $step *= 10; - $count=1; - } - else { - if( !$this->supress_tickmarks && !$this->supress_minor_tickmarks) { - if( $this->mincolor!="" ) { - $img->PushColor($this->mincolor); - } - $img->Line($pos,$ys,$a,$ys); - if( $this->mincolor!="" ) { - $img->PopColor(); - } - } - } - } - } - else { - $a=$pos - $this->direction*$this->GetMinTickAbsSize(); - $a2=$pos - $this->direction*$this->GetMajTickAbsSize(); - $count=1; - $this->maj_ticks_pos[0]=$scale->Translate($start); - $this->maj_ticklabels_pos[0]=$scale->Translate($start); - if( $this->supress_first ) { - $this->maj_ticks_label[0]=""; - } - else { - if( $this->label_formfunc != '' ) { - $f = $this->label_formfunc; - $this->maj_ticks_label[0]=call_user_func($f,$start); - } - elseif( $this->label_logtype == 0 ) { - $this->maj_ticks_label[0]=$start; - } - else { - $this->maj_ticks_label[0]='10^'.round(log10($start)); - } - } - $i=1; - for($x=$start; $x<=$limit; $x+=$step,++$count ) { - $xs=$scale->Translate($x); - $this->ticks_pos[]=$xs; - $this->ticklabels_pos[]=$xs; - if( $count % 10 == 0 ) { - if( !$this->supress_tickmarks ) { - $img->Line($xs,$pos,$xs,$a2); - } - $this->maj_ticks_pos[$i]=$xs; - $this->maj_ticklabels_pos[$i]=$xs; - - if( $this->label_formfunc != '' ) { - $f = $this->label_formfunc; - $this->maj_ticks_label[$i]=call_user_func($f,$nextMajor); - } - elseif( $this->label_logtype == 0 ) { - $this->maj_ticks_label[$i]=$nextMajor; - } - else { - $this->maj_ticks_label[$i]='10^'.round(log10($nextMajor)); - } - ++$i; - $nextMajor *= 10; - $step *= 10; - $count=1; - } - else { - if( !$this->supress_tickmarks && !$this->supress_minor_tickmarks) { - $img->Line($xs,$pos,$xs,$a); - } - } - } - } - return true; - } -} // Class -/* EOF */ -?> diff --git a/html/lib/jpgraph/jpgraph_meshinterpolate.inc.php b/html/lib/jpgraph/jpgraph_meshinterpolate.inc.php deleted file mode 100644 index 0aea48b38d..0000000000 --- a/html/lib/jpgraph/jpgraph_meshinterpolate.inc.php +++ /dev/null @@ -1,129 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -/*======================================================================= -// File: JPGRAPH_MESHINTERPOLATE.INC.PHP -// Description: Utility class to do mesh linear interpolation of a matrix -// Created: 2009-03-09 -// Ver: $Id: jpgraph_meshinterpolate.inc.php 1709 2009-07-30 08:00:08Z ljp $ -// -// Copyright (c) Aditus Consulting. All rights reserved. -//======================================================================== -*/ - -/** -* Utility function to do linear mesh interpolation -* @param $aDat Matrix to interpolate -* @param $aFactor Interpolation factor -*/ -function doMeshInterpolate( &$aData, $aFactor ) { - $m = new MeshInterpolate(); - $aData = $m->Linear($aData,$aFactor); -} - -/** - * Utility class to interpolate a given data matrix - * - */ -class MeshInterpolate { - private $data = array(); - - /** - * Calculate the mid points of the given rectangle which has its top left - * corner at $row,$col. The $aFactordecides how many spliots should be done. - * i.e. how many more divisions should be done recursively - * - * @param $row Top left corner of square to work with - * @param $col Top left corner of square to work with - * $param $aFactor In how many subsquare should we split this square. A value of 1 indicates that no action - */ - function IntSquare( $aRow, $aCol, $aFactor ) { - if ( $aFactor <= 1 ) - return; - - $step = pow( 2, $aFactor-1 ); - - $v0 = $this->data[$aRow][$aCol]; - $v1 = $this->data[$aRow][$aCol + $step]; - $v2 = $this->data[$aRow + $step][$aCol]; - $v3 = $this->data[$aRow + $step][$aCol + $step]; - - $this->data[$aRow][$aCol + $step / 2] = ( $v0 + $v1 ) / 2; - $this->data[$aRow + $step / 2][$aCol] = ( $v0 + $v2 ) / 2; - $this->data[$aRow + $step][$aCol + $step / 2] = ( $v2 + $v3 ) / 2; - $this->data[$aRow + $step / 2][$aCol + $step] = ( $v1 + $v3 ) / 2; - $this->data[$aRow + $step / 2][$aCol + $step / 2] = ( $v0 + $v1 + $v2 + $v3 ) / 4; - - $this->IntSquare( $aRow, $aCol, $aFactor-1 ); - $this->IntSquare( $aRow, $aCol + $step / 2, $aFactor-1 ); - $this->IntSquare( $aRow + $step / 2, $aCol, $aFactor-1 ); - $this->IntSquare( $aRow + $step / 2, $aCol + $step / 2, $aFactor-1 ); - } - - /** - * Interpolate values in a matrice so that the total number of data points - * in vert and horizontal axis are $aIntNbr more. For example $aIntNbr=2 will - * make the data matrice have tiwce as many vertical and horizontal dta points. - * - * Note: This will blow up the matrcide in memory size in the order of $aInNbr^2 - * - * @param $ &$aData The original data matricde - * @param $aInNbr Interpolation factor - * @return the interpolated matrice - */ - function Linear( &$aData, $aIntFactor ) { - $step = pow( 2, $aIntFactor-1 ); - - $orig_cols = count( $aData[0] ); - $orig_rows = count( $aData ); - // Number of new columns/rows - // N = (a-1) * 2^(f-1) + 1 - $p = pow( 2, $aIntFactor-1 ); - $new_cols = $p * ( $orig_cols - 1 ) + 1; - $new_rows = $p * ( $orig_rows - 1 ) + 1; - - $this->data = array_fill( 0, $new_rows, array_fill( 0, $new_cols, 0 ) ); - // Initialize the new matrix with the values that we know - for ( $i = 0; $i < $new_rows; $i++ ) { - for ( $j = 0; $j < $new_cols; $j++ ) { - $v = 0 ; - if ( ( $i % $step == 0 ) && ( $j % $step == 0 ) ) { - $v = $aData[$i / $step][$j / $step]; - } - $this->data[$i][$j] = $v; - } - } - - for ( $i = 0; $i < $new_rows-1; $i += $step ) { - for ( $j = 0; $j < $new_cols-1; $j += $step ) { - $this->IntSquare( $i, $j, $aIntFactor ); - } - } - - return $this->data; - } -} - -?> diff --git a/html/lib/jpgraph/jpgraph_mgraph.php b/html/lib/jpgraph/jpgraph_mgraph.php deleted file mode 100644 index ae92210e72..0000000000 --- a/html/lib/jpgraph/jpgraph_mgraph.php +++ /dev/null @@ -1,369 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -/*======================================================================= - // File: JPGRAPH_MGRAPH.PHP - // Description: Class to handle multiple graphs in the same image - // Created: 2006-01-15 - // Ver: $Id: jpgraph_mgraph.php 1770 2009-08-17 06:10:22Z ljp $ - // - // Copyright (c) Aditus Consulting. All rights reserved. - //======================================================================== - */ - -//============================================================================= -// CLASS MGraph -// Description: Create a container image that can hold several graph -//============================================================================= -class MGraph { - - public $title = null, $subtitle = null, $subsubtitle = null; - - protected $img=NULL; - protected $iCnt=0,$iGraphs = array(); // image_handle, x, y, fx, fy, sizex, sizey - protected $iFillColor='white', $iCurrentColor=0; - protected $lm=4,$rm=4,$tm=4,$bm=4; - protected $iDoFrame = FALSE, $iFrameColor = 'black', $iFrameWeight = 1; - protected $iLineWeight = 1; - protected $expired=false; - protected $cache=null,$cache_name = '',$inline=true; - protected $image_format='png',$image_quality=75; - protected $iWidth=NULL,$iHeight=NULL; - protected $background_image='',$background_image_center=true, - $backround_image_format='',$background_image_mix=100, - $background_image_y=NULL, $background_image_x=NULL; - private $doshadow=false, $shadow_width=4, $shadow_color='gray@0.5'; - public $footer; - - - // Create a new instane of the combined graph - function __construct($aWidth=NULL,$aHeight=NULL,$aCachedName='',$aTimeOut=0,$aInline=true) { - $this->iWidth = $aWidth; - $this->iHeight = $aHeight; - - // If the cached version exist just read it directly from the - // cache, stream it back to browser and exit - if( $aCachedName!='' && READ_CACHE && $aInline ) { - $this->cache = new ImgStreamCache(); - $this->cache->SetTimeOut($aTimeOut); - $image = new Image(); - if( $this->cache->GetAndStream($image,$aCachedName) ) { - exit(); - } - } - $this->inline = $aInline; - $this->cache_name = $aCachedName; - - $this->title = new Text(); - $this->title->ParagraphAlign('center'); - $this->title->SetFont(FF_FONT2,FS_BOLD); - $this->title->SetMargin(3); - $this->title->SetAlign('center'); - - $this->subtitle = new Text(); - $this->subtitle->ParagraphAlign('center'); - $this->subtitle->SetFont(FF_FONT1,FS_BOLD); - $this->subtitle->SetMargin(3); - $this->subtitle->SetAlign('center'); - - $this->subsubtitle = new Text(); - $this->subsubtitle->ParagraphAlign('center'); - $this->subsubtitle->SetFont(FF_FONT1,FS_NORMAL); - $this->subsubtitle->SetMargin(3); - $this->subsubtitle->SetAlign('center'); - - $this->footer = new Footer(); - - } - - // Specify background fill color for the combined graph - function SetFillColor($aColor) { - $this->iFillColor = $aColor; - } - - // Add a frame around the combined graph - function SetFrame($aFlg,$aColor='black',$aWeight=1) { - $this->iDoFrame = $aFlg; - $this->iFrameColor = $aColor; - $this->iFrameWeight = $aWeight; - } - - // Specify a background image blend - function SetBackgroundImageMix($aMix) { - $this->background_image_mix = $aMix ; - } - - // Specify a background image - function SetBackgroundImage($aFileName,$aCenter_aX=NULL,$aY=NULL) { - // Second argument can be either a boolean value or - // a numeric - $aCenter=TRUE; - $aX=NULL; - - if( is_numeric($aCenter_aX) ) { - $aX=$aCenter_aX; - } - - // Get extension to determine image type - $e = explode('.',$aFileName); - if( !$e ) { - JpGraphError::RaiseL(12002,$aFileName); - //('Incorrect file name for MGraph::SetBackgroundImage() : '.$aFileName.' Must have a valid image extension (jpg,gif,png) when using autodetection of image type'); - } - - $valid_formats = array('png', 'jpg', 'gif'); - $aImgFormat = strtolower($e[count($e)-1]); - if ($aImgFormat == 'jpeg') { - $aImgFormat = 'jpg'; - } - elseif (!in_array($aImgFormat, $valid_formats) ) { - JpGraphError::RaiseL(12003,$aImgFormat,$aFileName); - //('Unknown file extension ($aImgFormat) in MGraph::SetBackgroundImage() for filename: '.$aFileName); - } - - $this->background_image = $aFileName; - $this->background_image_center=$aCenter; - $this->background_image_format=$aImgFormat; - $this->background_image_x = $aX; - $this->background_image_y = $aY; - } - - function _strokeBackgroundImage() { - if( $this->background_image == '' ) return; - - $bkgimg = Graph::LoadBkgImage('',$this->background_image); - - // Background width & Heoght - $bw = imagesx($bkgimg); - $bh = imagesy($bkgimg); - - // Canvas width and height - $cw = imagesx($this->img); - $ch = imagesy($this->img); - - if( $this->doshadow ) { - $cw -= $this->shadow_width; - $ch -= $this->shadow_width; - } - - if( $this->background_image_x === NULL || $this->background_image_y === NULL ) { - if( $this->background_image_center ) { - // Center original image in the plot area - $x = round($cw/2-$bw/2); $y = round($ch/2-$bh/2); - } - else { - // Just copy the image from left corner, no resizing - $x=0; $y=0; - } - } - else { - $x = $this->background_image_x; - $y = $this->background_image_y; - } - imagecopymerge($this->img,$bkgimg,$x,$y,0,0,$bw,$bh,$this->background_image_mix); - } - - function AddMix($aGraph,$x=0,$y=0,$mix=100,$fx=0,$fy=0,$w=0,$h=0) { - $this->_gdImgHandle($aGraph->Stroke( _IMG_HANDLER),$x,$y,$fx=0,$fy=0,$w,$h,$mix); - } - - function Add($aGraph,$x=0,$y=0,$fx=0,$fy=0,$w=0,$h=0) { - $this->_gdImgHandle($aGraph->Stroke( _IMG_HANDLER),$x,$y,$fx=0,$fy=0,$w,$h); - } - - function _gdImgHandle($agdCanvas,$x,$y,$fx=0,$fy=0,$w=0,$h=0,$mix=100) { - if( $w == 0 ) { - $w = @imagesx($agdCanvas); - } - if( $w === NULL ) { - JpGraphError::RaiseL(12007); - //('Argument to MGraph::Add() is not a valid GD image handle.'); - return; - } - if( $h == 0 ) { - $h = @imagesy($agdCanvas); - } - $this->iGraphs[$this->iCnt++] = array($agdCanvas,$x,$y,$fx,$fy,$w,$h,$mix); - } - - function SetMargin($lm,$rm,$tm,$bm) { - $this->lm = $lm; - $this->rm = $rm; - $this->tm = $tm; - $this->bm = $bm; - } - - function SetExpired($aFlg=true) { - $this->expired = $aFlg; - } - - function SetImgFormat($aFormat,$aQuality=75) { - $this->image_format = $aFormat; - $this->image_quality = $aQuality; - } - - // Set the shadow around the whole image - function SetShadow($aShowShadow=true,$aShadowWidth=4,$aShadowColor='gray@0.3') { - $this->doshadow = $aShowShadow; - $this->shadow_color = $aShadowColor; - $this->shadow_width = $aShadowWidth; - $this->footer->iBottomMargin += $aShadowWidth; - $this->footer->iRightMargin += $aShadowWidth; - } - - function StrokeTitle($image,$w,$h) { - // Stroke title - if( $this->title->t !== '' ) { - - $margin = 3; - - $y = $this->title->margin; - if( $this->title->halign == 'center' ) { - $this->title->Center(0,$w,$y); - } - elseif( $this->title->halign == 'left' ) { - $this->title->SetPos($this->title->margin+2,$y); - } - elseif( $this->title->halign == 'right' ) { - $indent = 0; - if( $this->doshadow ) { - $indent = $this->shadow_width+2; - } - $this->title->SetPos($w-$this->title->margin-$indent,$y,'right'); - } - $this->title->Stroke($image); - - // ... and subtitle - $y += $this->title->GetTextHeight($image) + $margin + $this->subtitle->margin; - if( $this->subtitle->halign == 'center' ) { - $this->subtitle->Center(0,$w,$y); - } - elseif( $this->subtitle->halign == 'left' ) { - $this->subtitle->SetPos($this->subtitle->margin+2,$y); - } - elseif( $this->subtitle->halign == 'right' ) { - $indent = 0; - if( $this->doshadow ) { - $indent = $this->shadow_width+2; - } - $this->subtitle->SetPos($this->img->width-$this->subtitle->margin-$indent,$y,'right'); - } - $this->subtitle->Stroke($image); - - // ... and subsubtitle - $y += $this->subtitle->GetTextHeight($image) + $margin + $this->subsubtitle->margin; - if( $this->subsubtitle->halign == 'center' ) { - $this->subsubtitle->Center(0,$w,$y); - } - elseif( $this->subsubtitle->halign == 'left' ) { - $this->subsubtitle->SetPos($this->subsubtitle->margin+2,$y); - } - elseif( $this->subsubtitle->halign == 'right' ) { - $indent = 0; - if( $this->doshadow ) { - $indent = $this->shadow_width+2; - } - $this->subsubtitle->SetPos($w-$this->subsubtitle->margin-$indent,$y,'right'); - } - $this->subsubtitle->Stroke($image); - - } - } - - function Stroke($aFileName='') { - // Find out the necessary size for the container image - $w=0; $h=0; - for($i=0; $i < $this->iCnt; ++$i ) { - $maxw = $this->iGraphs[$i][1]+$this->iGraphs[$i][5]; - $maxh = $this->iGraphs[$i][2]+$this->iGraphs[$i][6]; - $w = max( $w, $maxw ); - $h = max( $h, $maxh ); - } - $w += $this->lm+$this->rm; - $h += $this->tm+$this->bm; - - // User specified width,height overrides - if( $this->iWidth !== NULL && $this->iWidth !== 0 ) $w = $this->iWidth; - if( $this->iHeight!== NULL && $this->iHeight !== 0) $h = $this->iHeight; - - if( $this->doshadow ) { - $w += $this->shadow_width; - $h += $this->shadow_width; - } - - $image = new Image($w,$h); - $image->SetImgFormat( $this->image_format,$this->image_quality); - - if( $this->doshadow ) { - $image->SetColor($this->iFrameColor); - $image->ShadowRectangle(0,0,$w-1,$h-1,$this->iFillColor,$this->shadow_width,$this->shadow_color); - $w -= $this->shadow_width; - $h -= $this->shadow_width; - } - else { - $image->SetColor($this->iFillColor); - $image->FilledRectangle(0,0,$w-1,$h-1); - } - $image->SetExpired($this->expired); - - $this->img = $image->img; - $this->_strokeBackgroundImage(); - - if( $this->iDoFrame && ! $this->doshadow ) { - $image->SetColor($this->iFrameColor); - $image->SetLineWeight($this->iFrameWeight); - $image->Rectangle(0,0,$w-1,$h-1); - } - - // Copy all sub graphs to the container - for($i=0; $i < $this->iCnt; ++$i ) { - $image->CopyMerge($this->iGraphs[$i][0], - $this->iGraphs[$i][1]+$this->lm,$this->iGraphs[$i][2]+$this->tm, - $this->iGraphs[$i][3],$this->iGraphs[$i][4], - $this->iGraphs[$i][5],$this->iGraphs[$i][6], - -1,-1, /* Full from width and height */ - $this->iGraphs[$i][7]); - - - } - - $this->StrokeTitle($image,$w,$h); - $this->footer->Stroke($image); - - // Output image - if( $aFileName == _IMG_HANDLER ) { - return $image->img; - } - else { - //Finally stream the generated picture - $this->cache = new ImgStreamCache(); - $this->cache->PutAndStream($image,$this->cache_name,$this->inline,$aFileName); - } - } -} - -// EOF - -?> diff --git a/html/lib/jpgraph/jpgraph_pie.php b/html/lib/jpgraph/jpgraph_pie.php deleted file mode 100644 index 2b5872d635..0000000000 --- a/html/lib/jpgraph/jpgraph_pie.php +++ /dev/null @@ -1,1486 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -/*======================================================================= - // File: JPGRAPH_PIE.PHP - // Description: Pie plot extension for JpGraph - // Created: 2001-02-14 - // Ver: $Id: jpgraph_pie.php 1926 2010-01-11 16:33:07Z ljp $ - // - // Copyright (c) Aditus Consulting. All rights reserved. - //======================================================================== - */ - - -// Defines for PiePlot::SetLabelType() -define("PIE_VALUE_ABS",1); -define("PIE_VALUE_PER",0); -define("PIE_VALUE_PERCENTAGE",0); -define("PIE_VALUE_ADJPERCENTAGE",2); -define("PIE_VALUE_ADJPER",2); - -//=================================================== -// CLASS PiePlot -// Description: Draws a pie plot -//=================================================== -class PiePlot { - public $posx=0.5,$posy=0.5; - protected $radius=0.3; - protected $explode_radius=array(),$explode_all=false,$explode_r=20; - protected $labels=null, $legends=null; - protected $csimtargets=null,$csimwintargets=null; // Array of targets for CSIM - protected $csimareas=''; // Generated CSIM text - protected $csimalts=null; // ALT tags for corresponding target - protected $data=null; - public $title; - protected $startangle=0; - protected $weight=1, $color="black"; - protected $legend_margin=6,$show_labels=true; - protected $themearr = array( - "earth" => array(136,34,40,45,46,62,63,134,74,10,120,136,141,168,180,77,209,218,346,395,89,430), - "pastel" => array(27,415,128,59,66,79,105,110,42,147,152,230,236,240,331,337,405,38), - "water" => array(8,370,24,40,335,56,213,237,268,14,326,387,10,388), - "sand" => array(27,168,34,170,19,50,65,72,131,209,46,393)); - protected $theme="earth"; - protected $setslicecolors=array(); - protected $labeltype=0; // Default to percentage - protected $pie_border=true,$pie_interior_border=true; - public $value; - protected $ishadowcolor='',$ishadowdrop=4; - protected $ilabelposadj=1; - protected $legendcsimtargets = array(),$legendcsimwintargets = array(); - protected $legendcsimalts = array(); - protected $adjusted_data = array(); - public $guideline = null; - protected $guidelinemargin=10,$iShowGuideLineForSingle = false; - protected $iGuideLineCurve = false,$iGuideVFactor=1.4,$iGuideLineRFactor=0.8; - protected $la = array(); // Holds the exact angle for each label - - //--------------- - // CONSTRUCTOR - function __construct($data) { - $this->data = array_reverse($data); - $this->title = new Text(""); - $this->title->SetFont(FF_FONT1,FS_BOLD); - $this->value = new DisplayValue(); - $this->value->Show(); - $this->value->SetFormat('%.1f%%'); - $this->guideline = new LineProperty(); - } - - //--------------- - // PUBLIC METHODS - function SetCenter($x,$y=0.5) { - $this->posx = $x; - $this->posy = $y; - } - - // Enable guideline and set drwaing policy - function SetGuideLines($aFlg=true,$aCurved=true,$aAlways=false) { - $this->guideline->Show($aFlg); - $this->iShowGuideLineForSingle = $aAlways; - $this->iGuideLineCurve = $aCurved; - } - - // Adjuste the distance between labels and labels and pie - function SetGuideLinesAdjust($aVFactor,$aRFactor=0.8) { - $this->iGuideVFactor=$aVFactor; - $this->iGuideLineRFactor=$aRFactor; - } - - function SetColor($aColor) { - $this->color = $aColor; - } - - function SetSliceColors($aColors) { - $this->setslicecolors = $aColors; - } - - function SetShadow($aColor='darkgray',$aDropWidth=4) { - $this->ishadowcolor = $aColor; - $this->ishadowdrop = $aDropWidth; - } - - function SetCSIMTargets($aTargets,$aAlts='',$aWinTargets='') { - $this->csimtargets=array_reverse($aTargets); - if( is_array($aWinTargets) ) - $this->csimwintargets=array_reverse($aWinTargets); - if( is_array($aAlts) ) - $this->csimalts=array_reverse($aAlts); - } - - function GetCSIMareas() { - return $this->csimareas; - } - - function AddSliceToCSIM($i,$xc,$yc,$radius,$sa,$ea) { - //Slice number, ellipse centre (x,y), height, width, start angle, end angle - while( $sa > 2*M_PI ) $sa = $sa - 2*M_PI; - while( $ea > 2*M_PI ) $ea = $ea - 2*M_PI; - - $sa = 2*M_PI - $sa; - $ea = 2*M_PI - $ea; - - // Special case when we have only one slice since then both start and end - // angle will be == 0 - if( abs($sa - $ea) < 0.0001 ) { - $sa=2*M_PI; $ea=0; - } - - //add coordinates of the centre to the map - $xc = floor($xc);$yc=floor($yc); - $coords = "$xc, $yc"; - - //add coordinates of the first point on the arc to the map - $xp = floor(($radius*cos($ea))+$xc); - $yp = floor($yc-$radius*sin($ea)); - $coords.= ", $xp, $yp"; - - //add coordinates every 0.2 radians - $a=$ea+0.2; - - // If we cross the 360-limit with a slice we need to handle - // the fact that end angle is smaller than start - if( $sa < $ea ) { - while ($a <= 2*M_PI) { - $xp = floor($radius*cos($a)+$xc); - $yp = floor($yc-$radius*sin($a)); - $coords.= ", $xp, $yp"; - $a += 0.2; - } - $a -= 2*M_PI; - } - - - while ($a < $sa) { - $xp = floor($radius*cos($a)+$xc); - $yp = floor($yc-$radius*sin($a)); - $coords.= ", $xp, $yp"; - $a += 0.2; - } - - //Add the last point on the arc - $xp = floor($radius*cos($sa)+$xc); - $yp = floor($yc-$radius*sin($sa)); - $coords.= ", $xp, $yp"; - if( !empty($this->csimtargets[$i]) ) { - $this->csimareas .= "csimtargets[$i]."\""; - $tmp=""; - if( !empty($this->csimwintargets[$i]) ) { - $this->csimareas .= " target=\"".$this->csimwintargets[$i]."\" "; - } - if( !empty($this->csimalts[$i]) ) { - $tmp=sprintf($this->csimalts[$i],$this->data[$i]); - $this->csimareas .= " title=\"$tmp\" alt=\"$tmp\" "; - } - $this->csimareas .= " />\n"; - } - } - - - function SetTheme($aTheme) { - if( in_array($aTheme,array_keys($this->themearr)) ) - $this->theme = $aTheme; - else - JpGraphError::RaiseL(15001,$aTheme);//("PiePLot::SetTheme() Unknown theme: $aTheme"); - } - - function ExplodeSlice($e,$radius=20) { - if( ! is_integer($e) ) - JpGraphError::RaiseL(15002);//('Argument to PiePlot::ExplodeSlice() must be an integer'); - $this->explode_radius[$e]=$radius; - } - - function ExplodeAll($radius=20) { - $this->explode_all=true; - $this->explode_r = $radius; - } - - function Explode($aExplodeArr) { - if( !is_array($aExplodeArr) ) { - JpGraphError::RaiseL(15003); - //("Argument to PiePlot::Explode() must be an array with integer distances."); - } - $this->explode_radius = $aExplodeArr; - } - - function SetStartAngle($aStart) { - if( $aStart < 0 || $aStart > 360 ) { - JpGraphError::RaiseL(15004);//('Slice start angle must be between 0 and 360 degrees.'); - } - if( $aStart == 0 ) { - $this->startangle = 0; - } - else { - $this->startangle = 360-$aStart; - $this->startangle *= M_PI/180; - } - } - - // Size in percentage - function SetSize($aSize) { - if( ($aSize>0 && $aSize<=0.5) || ($aSize>10 && $aSize<1000) ) - $this->radius = $aSize; - else - JpGraphError::RaiseL(15006); - //("PiePlot::SetSize() Radius for pie must either be specified as a fraction [0, 0.5] of the size of the image or as an absolute size in pixels in the range [10, 1000]"); - } - - // Set label arrays - function SetLegends($aLegend) { - $this->legends = $aLegend; - } - - // Set text labels for slices - function SetLabels($aLabels,$aLblPosAdj="auto") { - $this->labels = array_reverse($aLabels); - $this->ilabelposadj=$aLblPosAdj; - } - - function SetLabelPos($aLblPosAdj) { - $this->ilabelposadj=$aLblPosAdj; - } - - // Should we display actual value or percentage? - function SetLabelType($aType) { - if( $aType < 0 || $aType > 2 ) - JpGraphError::RaiseL(15008,$aType); - //("PiePlot::SetLabelType() Type for pie plots must be 0 or 1 (not $t)."); - $this->labeltype = $aType; - } - - // Deprecated. - function SetValueType($aType) { - $this->SetLabelType($aType); - } - - // Should the circle around a pie plot be displayed - function ShowBorder($exterior=true,$interior=true) { - $this->pie_border = $exterior; - $this->pie_interior_border = $interior; - } - - // Setup the legends - function Legend($graph) { - $colors = array_keys($graph->img->rgb->rgb_table); - sort($colors); - $ta=$this->themearr[$this->theme]; - $n = count($this->data); - - if( $this->setslicecolors==null ) { - $numcolors=count($ta); - if( class_exists('PiePlot3D',false) && ($this instanceof PiePlot3D) ) { - $ta = array_reverse(array_slice($ta,0,$n)); - } - } - else { - $this->setslicecolors = array_slice($this->setslicecolors,0,$n); - $numcolors=count($this->setslicecolors); - if( $graph->pieaa && !($this instanceof PiePlot3D) ) { - $this->setslicecolors = array_reverse($this->setslicecolors); - } - } - - $sum=0; - for($i=0; $i < $n; ++$i) - $sum += $this->data[$i]; - - // Bail out with error if the sum is 0 - if( $sum==0 ) - JpGraphError::RaiseL(15009);//("Illegal pie plot. Sum of all data is zero for Pie!"); - - // Make sure we don't plot more values than data points - // (in case the user added more legends than data points) - $n = min(count($this->legends),count($this->data)); - if( $this->legends != "" ) { - $this->legends = array_reverse(array_slice($this->legends,0,$n)); - } - for( $i=$n-1; $i >= 0; --$i ) { - $l = $this->legends[$i]; - // Replace possible format with actual values - if( count($this->csimalts) > $i ) { - $fmt = $this->csimalts[$i]; - } - else { - $fmt = "%d"; // Deafult Alt if no other has been specified - } - if( $this->labeltype==0 ) { - $l = sprintf($l,100*$this->data[$i]/$sum); - $alt = sprintf($fmt,$this->data[$i]); - - } - elseif( $this->labeltype == 1) { - $l = sprintf($l,$this->data[$i]); - $alt = sprintf($fmt,$this->data[$i]); - - } - else { - $l = sprintf($l,$this->adjusted_data[$i]); - $alt = sprintf($fmt,$this->adjusted_data[$i]); - } - - if( empty($this->csimwintargets[$i]) ) { - $wintarg = ''; - } - else { - $wintarg = $this->csimwintargets[$i]; - } - - if( $this->setslicecolors==null ) { - $graph->legend->Add($l,$colors[$ta[$i%$numcolors]],"",0,$this->csimtargets[$i],$alt,$wintarg); - } - else { - $graph->legend->Add($l,$this->setslicecolors[$i%$numcolors],"",0,$this->csimtargets[$i],$alt,$wintarg); - } - } - } - - // Adjust the rounded percetage value so that the sum of - // of the pie slices are always 100% - // Using the Hare/Niemeyer method - function AdjPercentage($aData,$aPrec=0) { - $mul=100; - if( $aPrec > 0 && $aPrec < 3 ) { - if( $aPrec == 1 ) - $mul=1000; - else - $mul=10000; - } - - $tmp = array(); - $result = array(); - $quote_sum=0; - $n = count($aData) ; - for( $i=0, $sum=0; $i < $n; ++$i ) - $sum+=$aData[$i]; - foreach($aData as $index => $value) { - $tmp_percentage=$value/$sum*$mul; - $result[$index]=floor($tmp_percentage); - $tmp[$index]=$tmp_percentage-$result[$index]; - $quote_sum+=$result[$index]; - } - if( $quote_sum == $mul) { - if( $mul > 100 ) { - $tmp = $mul / 100; - for( $i=0; $i < $n; ++$i ) { - $result[$i] /= $tmp ; - } - } - return $result; - } - arsort($tmp,SORT_NUMERIC); - reset($tmp); - for($i=0; $i < $mul-$quote_sum; $i++) - { - $result[key($tmp)]++; - next($tmp); - } - if( $mul > 100 ) { - $tmp = $mul / 100; - for( $i=0; $i < $n; ++$i ) { - $result[$i] /= $tmp ; - } - } - return $result; - } - - - function Stroke($img,$aaoption=0) { - // aaoption is used to handle antialias - // aaoption == 0 a normal pie - // aaoption == 1 just the body - // aaoption == 2 just the values - - // Explode scaling. If anti alias we scale the image - // twice and we also need to scale the exploding distance - $expscale = $aaoption === 1 ? 2 : 1; - - if( $this->labeltype == 2 ) { - // Adjust the data so that it will add up to 100% - $this->adjusted_data = $this->AdjPercentage($this->data); - } - - $colors = array_keys($img->rgb->rgb_table); - sort($colors); - $ta=$this->themearr[$this->theme]; - $n = count($this->data); - - if( $this->setslicecolors==null ) { - $numcolors=count($ta); - } - else { - // We need to create an array of colors as long as the data - // since we need to reverse it to get the colors in the right order - $numcolors=count($this->setslicecolors); - $i = 2*$numcolors; - while( $n > $i ) { - $this->setslicecolors = array_merge($this->setslicecolors,$this->setslicecolors); - $i += $n; - } - $tt = array_slice($this->setslicecolors,0,$n % $numcolors); - $this->setslicecolors = array_merge($this->setslicecolors,$tt); - $this->setslicecolors = array_reverse($this->setslicecolors); - } - - // Draw the slices - $sum=0; - for($i=0; $i < $n; ++$i) - $sum += $this->data[$i]; - - // Bail out with error if the sum is 0 - if( $sum==0 ) { - JpGraphError::RaiseL(15009);//("Sum of all data is 0 for Pie."); - } - - // Set up the pie-circle - if( $this->radius <= 1 ) { - $radius = floor($this->radius*min($img->width,$img->height)); - } - else { - $radius = $aaoption === 1 ? $this->radius*2 : $this->radius; - } - - if( $this->posx <= 1 && $this->posx > 0 ) { - $xc = round($this->posx*$img->width); - } - else { - $xc = $this->posx ; - } - - if( $this->posy <= 1 && $this->posy > 0 ) { - $yc = round($this->posy*$img->height); - } - else { - $yc = $this->posy ; - } - - $n = count($this->data); - - if( $this->explode_all ) { - for($i=0; $i < $n; ++$i) { - $this->explode_radius[$i]=$this->explode_r; - } - } - - // If we have a shadow and not just drawing the labels - if( $this->ishadowcolor != "" && $aaoption !== 2) { - $accsum=0; - $angle2 = $this->startangle; - $img->SetColor($this->ishadowcolor); - for($i=0; $sum > 0 && $i < $n; ++$i) { - $j = $n-$i-1; - $d = $this->data[$i]; - $angle1 = $angle2; - $accsum += $d; - $angle2 = $this->startangle+2*M_PI*$accsum/$sum; - if( empty($this->explode_radius[$j]) ) { - $this->explode_radius[$j]=0; - } - - if( $d < 0.00001 ) continue; - - $la = 2*M_PI - (abs($angle2-$angle1)/2.0+$angle1); - - $xcm = $xc + $this->explode_radius[$j]*cos($la)*$expscale; - $ycm = $yc - $this->explode_radius[$j]*sin($la)*$expscale; - - $xcm += $this->ishadowdrop*$expscale; - $ycm += $this->ishadowdrop*$expscale; - - $_sa = round($angle1*180/M_PI); - $_ea = round($angle2*180/M_PI); - - // The CakeSlice method draws a full circle in case of start angle = end angle - // for pie slices we don't want this behaviour unless we only have one - // slice in the pie in case it is the wanted behaviour - if( $_ea-$_sa > 0.1 || $n==1 ) { - $img->CakeSlice($xcm,$ycm,$radius-1,$radius-1, - $angle1*180/M_PI,$angle2*180/M_PI,$this->ishadowcolor); - } - } - } - - //-------------------------------------------------------------------------------- - // This is the main loop to draw each cake slice - //-------------------------------------------------------------------------------- - - // Set up the accumulated sum, start angle for first slice and border color - $accsum=0; - $angle2 = $this->startangle; - $img->SetColor($this->color); - - // Loop though all the slices if there is a pie to draw (sum>0) - // There are n slices in total - for($i=0; $sum>0 && $i < $n; ++$i) { - - // $j is the actual index used for the slice - $j = $n-$i-1; - - // Make sure we havea valid distance to explode the slice - if( empty($this->explode_radius[$j]) ) { - $this->explode_radius[$j]=0; - } - - // The actual numeric value for the slice - $d = $this->data[$i]; - - $angle1 = $angle2; - - // Accumlate the sum - $accsum += $d; - - // The new angle when we add the "size" of this slice - // angle1 is then the start and angle2 the end of this slice - $angle2 = $this->NormAngle($this->startangle+2*M_PI*$accsum/$sum); - - // We avoid some trouble by not allowing end angle to be 0, in that case - // we translate to 360 - - // la is used to hold the label angle, which is centered on the slice - if( $angle2 < 0.0001 && $angle1 > 0.0001 ) { - $this->la[$i] = 2*M_PI - (abs(2*M_PI-$angle1)/2.0+$angle1); - } - elseif( $angle1 > $angle2 ) { - // The case where the slice crosses the 3 a'clock line - // Remember that the slices are counted clockwise and - // labels are counted counter clockwise so we need to revert with 2 PI - $this->la[$i] = 2*M_PI-$this->NormAngle($angle1 + ((2*M_PI - $angle1)+$angle2)/2); - } - else { - $this->la[$i] = 2*M_PI - (abs($angle2-$angle1)/2.0+$angle1); - } - - // Too avoid rounding problems we skip the slice if it is too small - if( $d < 0.00001 ) continue; - - // If the user has specified an array of colors for each slice then use - // that a color otherwise use the theme array (ta) of colors - if( $this->setslicecolors==null ) { - $slicecolor=$colors[$ta[$i%$numcolors]]; - } - else { - $slicecolor=$this->setslicecolors[$i%$numcolors]; - } - -// $_sa = round($angle1*180/M_PI); -// $_ea = round($angle2*180/M_PI); -// $_la = round($this->la[$i]*180/M_PI); -// echo "Slice#$i: ang1=$_sa , ang2=$_ea, la=$_la, color=$slicecolor
        "; - - - // If we have enabled antialias then we don't draw any border so - // make the bordedr color the same as the slice color - if( $this->pie_interior_border && $aaoption===0 ) { - $img->SetColor($this->color); - } - else { - $img->SetColor($slicecolor); - } - $arccolor = $this->pie_border && $aaoption===0 ? $this->color : ""; - - // Calculate the x,y coordinates for the base of this slice taking - // the exploded distance into account. Here we use the mid angle as the - // ray of extension and we have the mid angle handy as it is also the - // label angle - $xcm = $xc + $this->explode_radius[$j]*cos($this->la[$i])*$expscale; - $ycm = $yc - $this->explode_radius[$j]*sin($this->la[$i])*$expscale; - - // If we are not just drawing the labels then draw this cake slice - if( $aaoption !== 2 ) { - - $_sa = round($angle1*180/M_PI); - $_ea = round($angle2*180/M_PI); - $_la = round($this->la[$i]*180/M_PI); - //echo "[$i] sa=$_sa, ea=$_ea, la[$i]=$_la, (color=$slicecolor)
        "; - - // The CakeSlice method draws a full circle in case of start angle = end angle - // for pie slices we want this in case the slice have a value larger than 99% of the - // total sum - if( abs($_ea-$_sa) >= 1 || $d == $sum ) { - $img->CakeSlice($xcm,$ycm,$radius-1,$radius-1,$_sa,$_ea,$slicecolor,$arccolor); - } - } - - // If the CSIM is used then make sure we register a CSIM area for this slice as well - if( $this->csimtargets && $aaoption !== 1 ) { - $this->AddSliceToCSIM($i,$xcm,$ycm,$radius,$angle1,$angle2); - } - } - - // Format the titles for each slice - if( $aaoption !== 2 ) { - for( $i=0; $i < $n; ++$i) { - if( $this->labeltype==0 ) { - if( $sum != 0 ) - $l = 100.0*$this->data[$i]/$sum; - else - $l = 0.0; - } - elseif( $this->labeltype==1 ) { - $l = $this->data[$i]*1.0; - } - else { - $l = $this->adjusted_data[$i]; - } - if( isset($this->labels[$i]) && is_string($this->labels[$i]) ) - $this->labels[$i]=sprintf($this->labels[$i],$l); - else - $this->labels[$i]=$l; - } - } - - if( $this->value->show && $aaoption !== 1 ) { - $this->StrokeAllLabels($img,$xc,$yc,$radius); - } - - // Adjust title position - if( $aaoption !== 1 ) { - $this->title->SetPos($xc, - $yc-$this->title->GetFontHeight($img)-$radius-$this->title->margin, - "center","bottom"); - $this->title->Stroke($img); - } - - } - - //--------------- - // PRIVATE METHODS - - function NormAngle($a) { - while( $a < 0 ) $a += 2*M_PI; - while( $a > 2*M_PI ) $a -= 2*M_PI; - return $a; - } - - function Quadrant($a) { - $a=$this->NormAngle($a); - if( $a > 0 && $a <= M_PI/2 ) - return 0; - if( $a > M_PI/2 && $a <= M_PI ) - return 1; - if( $a > M_PI && $a <= 1.5*M_PI ) - return 2; - if( $a > 1.5*M_PI ) - return 3; - } - - function StrokeGuideLabels($img,$xc,$yc,$radius) { - $n = count($this->labels); - - //----------------------------------------------------------------------- - // Step 1 of the algorithm is to construct a number of clusters - // a cluster is defined as all slices within the same quadrant (almost) - // that has an angular distance less than the treshold - //----------------------------------------------------------------------- - $tresh_hold=25 * M_PI/180; // 25 degrees difference to be in a cluster - $incluster=false; // flag if we are currently in a cluster or not - $clusters = array(); // array of clusters - $cidx=-1; // running cluster index - - // Go through all the labels and construct a number of clusters - for($i=0; $i < $n-1; ++$i) { - // Calc the angle distance between two consecutive slices - $a1=$this->la[$i]; - $a2=$this->la[$i+1]; - $q1 = $this->Quadrant($a1); - $q2 = $this->Quadrant($a2); - $diff = abs($a1-$a2); - if( $diff < $tresh_hold ) { - if( $incluster ) { - $clusters[$cidx][1]++; - // Each cluster can only cover one quadrant - // Do we cross a quadrant ( and must break the cluster) - if( $q1 != $q2 ) { - // If we cross a quadrant boundary we normally start a - // new cluster. However we need to take the 12'a clock - // and 6'a clock positions into a special consideration. - // Case 1: WE go from q=1 to q=2 if the last slice on - // the cluster for q=1 is close to 12'a clock and the - // first slice in q=0 is small we extend the previous - // cluster - if( $q1 == 1 && $q2 == 0 && $a2 > (90-15)*M_PI/180 ) { - if( $i < $n-2 ) { - $a3 = $this->la[$i+2]; - // If there isn't a cluster coming up with the next-next slice - // we extend the previous cluster to cover this slice as well - if( abs($a3-$a2) >= $tresh_hold ) { - $clusters[$cidx][1]++; - $i++; - } - } - } - elseif( $q1 == 3 && $q2 == 2 && $a2 > (270-15)*M_PI/180 ) { - if( $i < $n-2 ) { - $a3 = $this->la[$i+2]; - // If there isn't a cluster coming up with the next-next slice - // we extend the previous cluster to cover this slice as well - if( abs($a3-$a2) >= $tresh_hold ) { - $clusters[$cidx][1]++; - $i++; - } - } - } - - if( $q1==2 && $q2==1 && $a2 > (180-15)*M_PI/180 ) { - $clusters[$cidx][1]++; - $i++; - } - - $incluster = false; - } - } - elseif( $q1 == $q2) { - $incluster = true; - // Now we have a special case for quadrant 0. If we previously - // have a cluster of one in quadrant 0 we just extend that - // cluster. If we don't do this then we risk that the label - // for the cluster of one will cross the guide-line - if( $q1 == 0 && $cidx > -1 && - $clusters[$cidx][1] == 1 && - $this->Quadrant($this->la[$clusters[$cidx][0]]) == 0 ) { - $clusters[$cidx][1]++; - } - else { - $cidx++; - $clusters[$cidx][0] = $i; - $clusters[$cidx][1] = 1; - } - } - else { - // Create a "cluster" of one since we are just crossing - // a quadrant - $cidx++; - $clusters[$cidx][0] = $i; - $clusters[$cidx][1] = 1; - } - } - else { - if( $incluster ) { - // Add the last slice - $clusters[$cidx][1]++; - $incluster = false; - } - else { // Create a "cluster" of one - $cidx++; - $clusters[$cidx][0] = $i; - $clusters[$cidx][1] = 1; - } - } - } - // Handle the very last slice - if( $incluster ) { - $clusters[$cidx][1]++; - } - else { // Create a "cluster" of one - $cidx++; - $clusters[$cidx][0] = $i; - $clusters[$cidx][1] = 1; - } - - /* - if( true ) { - // Debug printout in labels - for( $i=0; $i <= $cidx; ++$i ) { - for( $j=0; $j < $clusters[$i][1]; ++$j ) { - $a = $this->la[$clusters[$i][0]+$j]; - $aa = round($a*180/M_PI); - $q = $this->Quadrant($a); - $this->labels[$clusters[$i][0]+$j]="[$q:$aa] $i:$j"; - } - } - } - */ - - //----------------------------------------------------------------------- - // Step 2 of the algorithm is use the clusters and draw the labels - // and guidelines - //----------------------------------------------------------------------- - - // We use the font height as the base factor for how far we need to - // spread the labels in the Y-direction. - $this->value->ApplyFont($img); - $fh = $img->GetFontHeight(); - $origvstep=$fh*$this->iGuideVFactor; - $this->value->SetMargin(0); - - // Number of clusters found - $nc = count($clusters); - - // Walk through all the clusters - for($i=0; $i < $nc; ++$i) { - - // Start angle and number of slices in this cluster - $csize = $clusters[$i][1]; - $a = $this->la[$clusters[$i][0]]; - $q = $this->Quadrant($a); - - // Now set up the start and end conditions to make sure that - // in each cluster we walk through the all the slices starting with the slice - // closest to the equator. Since all slices are numbered clockwise from "3'a clock" - // we have different conditions depending on in which quadrant the slice lies within. - if( $q == 0 ) { - $start = $csize-1; $idx = $start; $step = -1; $vstep = -$origvstep; - } - elseif( $q == 1 ) { - $start = 0; $idx = $start; $step = 1; $vstep = -$origvstep; - } - elseif( $q == 2 ) { - $start = $csize-1; $idx = $start; $step = -1; $vstep = $origvstep; - } - elseif( $q == 3 ) { - $start = 0; $idx = $start; $step = 1; $vstep = $origvstep; - } - - // Walk through all slices within this cluster - for($j=0; $j < $csize; ++$j) { - // Now adjust the position of the labels in each cluster starting - // with the slice that is closest to the equator of the pie - $a = $this->la[$clusters[$i][0]+$idx]; - - // Guide line start in the center of the arc of the slice - $r = $radius+$this->explode_radius[$n-1-($clusters[$i][0]+$idx)]; - $x = round($r*cos($a)+$xc); - $y = round($yc-$r*sin($a)); - - // The distance from the arc depends on chosen font and the "R-Factor" - $r += $fh*$this->iGuideLineRFactor; - - // Should the labels be placed curved along the pie or in straight columns - // outside the pie? - if( $this->iGuideLineCurve ) - $xt=round($r*cos($a)+$xc); - - // If this is the first slice in the cluster we need some first time - // proessing - if( $idx == $start ) { - if( ! $this->iGuideLineCurve ) - $xt=round($r*cos($a)+$xc); - $yt=round($yc-$r*sin($a)); - - // Some special consideration in case this cluster starts - // in quadrant 1 or 3 very close to the "equator" (< 20 degrees) - // and the previous clusters last slice is within the tolerance. - // In that case we add a font height to this labels Y-position - // so it doesn't collide with - // the slice in the previous cluster - $prevcluster = ($i + ($nc-1) ) % $nc; - $previdx=$clusters[$prevcluster][0]+$clusters[$prevcluster][1]-1; - if( $q == 1 && $a > 160*M_PI/180 ) { - // Get the angle for the previous clusters last slice - $diff = abs($a-$this->la[$previdx]); - if( $diff < $tresh_hold ) { - $yt -= $fh; - } - } - elseif( $q == 3 && $a > 340*M_PI/180 ) { - // We need to subtract 360 to compare angle distance between - // q=0 and q=3 - $diff = abs($a-$this->la[$previdx]-360*M_PI/180); - if( $diff < $tresh_hold ) { - $yt += $fh; - } - } - - } - else { - // The step is at minimum $vstep but if the slices are relatively large - // we make sure that we add at least a step that corresponds to the vertical - // distance between the centers at the arc on the slice - $prev_a = $this->la[$clusters[$i][0]+($idx-$step)]; - $dy = abs($radius*(sin($a)-sin($prev_a))*1.2); - if( $vstep > 0 ) - $yt += max($vstep,$dy); - else - $yt += min($vstep,-$dy); - } - - $label = $this->labels[$clusters[$i][0]+$idx]; - - if( $csize == 1 ) { - // A "meta" cluster with only one slice - $r = $radius+$this->explode_radius[$n-1-($clusters[$i][0]+$idx)]; - $rr = $r+$img->GetFontHeight()/2; - $xt=round($rr*cos($a)+$xc); - $yt=round($yc-$rr*sin($a)); - $this->StrokeLabel($label,$img,$xc,$yc,$a,$r); - if( $this->iShowGuideLineForSingle ) - $this->guideline->Stroke($img,$x,$y,$xt,$yt); - } - else { - $this->guideline->Stroke($img,$x,$y,$xt,$yt); - if( $q==1 || $q==2 ) { - // Left side of Pie - $this->guideline->Stroke($img,$xt,$yt,$xt-$this->guidelinemargin,$yt); - $lbladj = -$this->guidelinemargin-5; - $this->value->halign = "right"; - $this->value->valign = "center"; - } - else { - // Right side of pie - $this->guideline->Stroke($img,$xt,$yt,$xt+$this->guidelinemargin,$yt); - $lbladj = $this->guidelinemargin+5; - $this->value->halign = "left"; - $this->value->valign = "center"; - } - $this->value->Stroke($img,$label,$xt+$lbladj,$yt); - } - - // Udate idx to point to next slice in the cluster to process - $idx += $step; - } - } - } - - function StrokeAllLabels($img,$xc,$yc,$radius) { - // First normalize all angles for labels - $n = count($this->la); - for($i=0; $i < $n; ++$i) { - $this->la[$i] = $this->NormAngle($this->la[$i]); - } - if( $this->guideline->iShow ) { - $this->StrokeGuideLabels($img,$xc,$yc,$radius); - } - else { - $n = count($this->labels); - for($i=0; $i < $n; ++$i) { - $this->StrokeLabel($this->labels[$i],$img,$xc,$yc, - $this->la[$i], - $radius + $this->explode_radius[$n-1-$i]); - } - } - } - - // Position the labels of each slice - function StrokeLabel($label,$img,$xc,$yc,$a,$r) { - - // Default value - if( $this->ilabelposadj === 'auto' ) - $this->ilabelposadj = 0.65; - - // We position the values diferently depending on if they are inside - // or outside the pie - if( $this->ilabelposadj < 1.0 ) { - - $this->value->SetAlign('center','center'); - $this->value->margin = 0; - - $xt=round($this->ilabelposadj*$r*cos($a)+$xc); - $yt=round($yc-$this->ilabelposadj*$r*sin($a)); - - $this->value->Stroke($img,$label,$xt,$yt); - } - else { - - $this->value->halign = "left"; - $this->value->valign = "top"; - $this->value->margin = 0; - - // Position the axis title. - // dx, dy is the offset from the top left corner of the bounding box that sorrounds the text - // that intersects with the extension of the corresponding axis. The code looks a little - // bit messy but this is really the only way of having a reasonable position of the - // axis titles. - $this->value->ApplyFont($img); - $h=$img->GetTextHeight($label); - // For numeric values the format of the display value - // must be taken into account - if( is_numeric($label) ) { - if( $label > 0 ) - $w=$img->GetTextWidth(sprintf($this->value->format,$label)); - else - $w=$img->GetTextWidth(sprintf($this->value->negformat,$label)); - } - else - $w=$img->GetTextWidth($label); - - if( $this->ilabelposadj > 1.0 && $this->ilabelposadj < 5.0) { - $r *= $this->ilabelposadj; - } - - $r += $img->GetFontHeight()/1.5; - - $xt=round($r*cos($a)+$xc); - $yt=round($yc-$r*sin($a)); - - // Normalize angle - while( $a < 0 ) $a += 2*M_PI; - while( $a > 2*M_PI ) $a -= 2*M_PI; - - if( $a>=7*M_PI/4 || $a <= M_PI/4 ) $dx=0; - if( $a>=M_PI/4 && $a <= 3*M_PI/4 ) $dx=($a-M_PI/4)*2/M_PI; - if( $a>=3*M_PI/4 && $a <= 5*M_PI/4 ) $dx=1; - if( $a>=5*M_PI/4 && $a <= 7*M_PI/4 ) $dx=(1-($a-M_PI*5/4)*2/M_PI); - - if( $a>=7*M_PI/4 ) $dy=(($a-M_PI)-3*M_PI/4)*2/M_PI; - if( $a<=M_PI/4 ) $dy=(1-$a*2/M_PI); - if( $a>=M_PI/4 && $a <= 3*M_PI/4 ) $dy=1; - if( $a>=3*M_PI/4 && $a <= 5*M_PI/4 ) $dy=(1-($a-3*M_PI/4)*2/M_PI); - if( $a>=5*M_PI/4 && $a <= 7*M_PI/4 ) $dy=0; - - $this->value->Stroke($img,$label,$xt-$dx*$w,$yt-$dy*$h); - } - } -} // Class - - -//=================================================== -// CLASS PiePlotC -// Description: Same as a normal pie plot but with a -// filled circle in the center -//=================================================== -class PiePlotC extends PiePlot { - private $imidsize=0.5; // Fraction of total width - private $imidcolor='white'; - public $midtitle=''; - private $middlecsimtarget='',$middlecsimwintarget='',$middlecsimalt=''; - - function __construct($data,$aCenterTitle='') { - parent::__construct($data); - $this->midtitle = new Text(); - $this->midtitle->ParagraphAlign('center'); - } - - function SetMid($aTitle,$aColor='white',$aSize=0.5) { - $this->midtitle->Set($aTitle); - - $this->imidsize = $aSize ; - $this->imidcolor = $aColor ; - } - - function SetMidTitle($aTitle) { - $this->midtitle->Set($aTitle); - } - - function SetMidSize($aSize) { - $this->imidsize = $aSize ; - } - - function SetMidColor($aColor) { - $this->imidcolor = $aColor ; - } - - function SetMidCSIM($aTarget,$aAlt='',$aWinTarget='') { - $this->middlecsimtarget = $aTarget; - $this->middlecsimwintarget = $aWinTarget; - $this->middlecsimalt = $aAlt; - } - - function AddSliceToCSIM($i,$xc,$yc,$radius,$sa,$ea) { - //Slice number, ellipse centre (x,y), radius, start angle, end angle - while( $sa > 2*M_PI ) $sa = $sa - 2*M_PI; - while( $ea > 2*M_PI ) $ea = $ea - 2*M_PI; - - $sa = 2*M_PI - $sa; - $ea = 2*M_PI - $ea; - - // Special case when we have only one slice since then both start and end - // angle will be == 0 - if( abs($sa - $ea) < 0.0001 ) { - $sa=2*M_PI; $ea=0; - } - - // Add inner circle first point - $xp = floor(($this->imidsize*$radius*cos($ea))+$xc); - $yp = floor($yc-($this->imidsize*$radius*sin($ea))); - $coords = "$xp, $yp"; - - //add coordinates every 0.25 radians - $a=$ea+0.25; - - // If we cross the 360-limit with a slice we need to handle - // the fact that end angle is smaller than start - if( $sa < $ea ) { - while ($a <= 2*M_PI) { - $xp = floor($radius*cos($a)+$xc); - $yp = floor($yc-$radius*sin($a)); - $coords.= ", $xp, $yp"; - $a += 0.25; - } - $a -= 2*M_PI; - } - - while ($a < $sa) { - $xp = floor(($this->imidsize*$radius*cos($a)+$xc)); - $yp = floor($yc-($this->imidsize*$radius*sin($a))); - $coords.= ", $xp, $yp"; - $a += 0.25; - } - - // Make sure we end at the last point - $xp = floor(($this->imidsize*$radius*cos($sa)+$xc)); - $yp = floor($yc-($this->imidsize*$radius*sin($sa))); - $coords.= ", $xp, $yp"; - - // Straight line to outer circle - $xp = floor($radius*cos($sa)+$xc); - $yp = floor($yc-$radius*sin($sa)); - $coords.= ", $xp, $yp"; - - //add coordinates every 0.25 radians - $a=$sa - 0.25; - while ($a > $ea) { - $xp = floor($radius*cos($a)+$xc); - $yp = floor($yc-$radius*sin($a)); - $coords.= ", $xp, $yp"; - $a -= 0.25; - } - - //Add the last point on the arc - $xp = floor($radius*cos($ea)+$xc); - $yp = floor($yc-$radius*sin($ea)); - $coords.= ", $xp, $yp"; - - // Close the arc - $xp = floor(($this->imidsize*$radius*cos($ea))+$xc); - $yp = floor($yc-($this->imidsize*$radius*sin($ea))); - $coords .= ", $xp, $yp"; - - if( !empty($this->csimtargets[$i]) ) { - $this->csimareas .= "csimtargets[$i]."\""; - if( !empty($this->csimwintargets[$i]) ) { - $this->csimareas .= " target=\"".$this->csimwintargets[$i]."\" "; - } - if( !empty($this->csimalts[$i]) ) { - $tmp=sprintf($this->csimalts[$i],$this->data[$i]); - $this->csimareas .= " title=\"$tmp\" alt=\"$tmp\" "; - } - $this->csimareas .= " />\n"; - } - } - - - function Stroke($img,$aaoption=0) { - - // Stroke the pie but don't stroke values - $tmp = $this->value->show; - $this->value->show = false; - parent::Stroke($img,$aaoption); - $this->value->show = $tmp; - - $xc = round($this->posx*$img->width); - $yc = round($this->posy*$img->height); - - $radius = floor($this->radius * min($img->width,$img->height)) ; - - - if( $this->imidsize > 0 && $aaoption !== 2 ) { - - if( $this->ishadowcolor != "" ) { - $img->SetColor($this->ishadowcolor); - $img->FilledCircle($xc+$this->ishadowdrop,$yc+$this->ishadowdrop, - round($radius*$this->imidsize)); - } - - $img->SetColor($this->imidcolor); - $img->FilledCircle($xc,$yc,round($radius*$this->imidsize)); - - if( $this->pie_border && $aaoption === 0 ) { - $img->SetColor($this->color); - $img->Circle($xc,$yc,round($radius*$this->imidsize)); - } - - if( !empty($this->middlecsimtarget) ) - $this->AddMiddleCSIM($xc,$yc,round($radius*$this->imidsize)); - - } - - if( $this->value->show && $aaoption !== 1) { - $this->StrokeAllLabels($img,$xc,$yc,$radius); - $this->midtitle->SetPos($xc,$yc,'center','center'); - $this->midtitle->Stroke($img); - } - - } - - function AddMiddleCSIM($xc,$yc,$r) { - $xc=round($xc);$yc=round($yc);$r=round($r); - $this->csimareas .= "middlecsimtarget."\""; - if( !empty($this->middlecsimwintarget) ) { - $this->csimareas .= " target=\"".$this->middlecsimwintarget."\""; - } - if( !empty($this->middlecsimalt) ) { - $tmp = $this->middlecsimalt; - $this->csimareas .= " title=\"$tmp\" alt=\"$tmp\" "; - } - $this->csimareas .= " />\n"; - } - - function StrokeLabel($label,$img,$xc,$yc,$a,$r) { - - if( $this->ilabelposadj === 'auto' ) - $this->ilabelposadj = (1-$this->imidsize)/2+$this->imidsize; - - parent::StrokeLabel($label,$img,$xc,$yc,$a,$r); - - } - -} - - -//=================================================== -// CLASS PieGraph -// Description: -//=================================================== -class PieGraph extends Graph { - private $posx, $posy, $radius; - private $legends=array(); - public $plots=array(); - public $pieaa = false ; - //--------------- - // CONSTRUCTOR - function __construct($width=300,$height=200,$cachedName="",$timeout=0,$inline=1) { - parent::__construct($width,$height,$cachedName,$timeout,$inline); - $this->posx=$width/2; - $this->posy=$height/2; - $this->SetColor(array(255,255,255)); - } - - //--------------- - // PUBLIC METHODS - function Add($aObj) { - - if( is_array($aObj) && count($aObj) > 0 ) - $cl = $aObj[0]; - else - $cl = $aObj; - - if( $cl instanceof Text ) - $this->AddText($aObj); - elseif( class_exists('IconPlot',false) && ($cl instanceof IconPlot) ) - $this->AddIcon($aObj); - else { - if( is_array($aObj) ) { - $n = count($aObj); - for($i=0; $i < $n; ++$i ) { - $this->plots[] = $aObj[$i]; - } - } - else { - $this->plots[] = $aObj; - } - } - } - - function SetAntiAliasing($aFlg=true) { - $this->pieaa = $aFlg; - } - - function SetColor($c) { - $this->SetMarginColor($c); - } - - - function DisplayCSIMAreas() { - $csim=""; - foreach($this->plots as $p ) { - $csim .= $p->GetCSIMareas(); - } - - $csim.= $this->legend->GetCSIMareas(); - if (preg_match_all("/area shape=\"(\w+)\" coords=\"([0-9\, ]+)\"/", $csim, $coords)) { - $this->img->SetColor($this->csimcolor); - $n = count($coords[0]); - for ($i=0; $i < $n; $i++) { - if ($coords[1][$i]=="poly") { - preg_match_all('/\s*([0-9]+)\s*,\s*([0-9]+)\s*,*/',$coords[2][$i],$pts); - $this->img->SetStartPoint($pts[1][count($pts[0])-1],$pts[2][count($pts[0])-1]); - $m = count($pts[0]); - for ($j=0; $j < $m; $j++) { - $this->img->LineTo($pts[1][$j],$pts[2][$j]); - } - } else if ($coords[1][$i]=="rect") { - $pts = preg_split('/,/', $coords[2][$i]); - $this->img->SetStartPoint($pts[0],$pts[1]); - $this->img->LineTo($pts[2],$pts[1]); - $this->img->LineTo($pts[2],$pts[3]); - $this->img->LineTo($pts[0],$pts[3]); - $this->img->LineTo($pts[0],$pts[1]); - - } - } - } - } - - // Method description - function Stroke($aStrokeFileName="") { - // If the filename is the predefined value = '_csim_special_' - // we assume that the call to stroke only needs to do enough - // to correctly generate the CSIM maps. - // We use this variable to skip things we don't strictly need - // to do to generate the image map to improve performance - // a best we can. Therefor you will see a lot of tests !$_csim in the - // code below. - $_csim = ($aStrokeFileName===_CSIM_SPECIALFILE); - - // If we are called the second time (perhaps the user has called GetHTMLImageMap() - // himself then the legends have alsready been populated once in order to get the - // CSIM coordinats. Since we do not want the legends to be populated a second time - // we clear the legends - $this->legend->Clear(); - - // We need to know if we have stroked the plot in the - // GetCSIMareas. Otherwise the CSIM hasn't been generated - // and in the case of GetCSIM called before stroke to generate - // CSIM without storing an image to disk GetCSIM must call Stroke. - $this->iHasStroked = true; - - $n = count($this->plots); - - if( $this->pieaa ) { - - if( !$_csim ) { - if( $this->background_image != "" ) { - $this->StrokeFrameBackground(); - } - else { - $this->StrokeFrame(); - $this->StrokeBackgroundGrad(); - } - } - - - $w = $this->img->width; - $h = $this->img->height; - $oldimg = $this->img->img; - - $this->img->CreateImgCanvas(2*$w,2*$h); - - $this->img->SetColor( $this->margin_color ); - $this->img->FilledRectangle(0,0,2*$w-1,2*$h-1); - - // Make all icons *2 i size since we will be scaling down the - // imahe to do the anti aliasing - $ni = count($this->iIcons); - for($i=0; $i < $ni; ++$i) { - $this->iIcons[$i]->iScale *= 2 ; - if( $this->iIcons[$i]->iX > 1 ) - $this->iIcons[$i]->iX *= 2 ; - if( $this->iIcons[$i]->iY > 1 ) - $this->iIcons[$i]->iY *= 2 ; - } - - $this->StrokeIcons(); - - for($i=0; $i < $n; ++$i) { - if( $this->plots[$i]->posx > 1 ) - $this->plots[$i]->posx *= 2 ; - if( $this->plots[$i]->posy > 1 ) - $this->plots[$i]->posy *= 2 ; - - $this->plots[$i]->Stroke($this->img,1); - - if( $this->plots[$i]->posx > 1 ) - $this->plots[$i]->posx /= 2 ; - if( $this->plots[$i]->posy > 1 ) - $this->plots[$i]->posy /= 2 ; - } - - $indent = $this->doframe ? ($this->frame_weight + ($this->doshadow ? $this->shadow_width : 0 )) : 0 ; - $indent += $this->framebevel ? $this->framebeveldepth + 1 : 0 ; - $this->img->CopyCanvasH($oldimg,$this->img->img,$indent,$indent,$indent,$indent, - $w-2*$indent,$h-2*$indent,2*($w-$indent),2*($h-$indent)); - - $this->img->img = $oldimg ; - $this->img->width = $w ; - $this->img->height = $h ; - - for($i=0; $i < $n; ++$i) { - $this->plots[$i]->Stroke($this->img,2); // Stroke labels - $this->plots[$i]->Legend($this); - } - - } - else { - - if( !$_csim ) { - if( $this->background_image != "" ) { - $this->StrokeFrameBackground(); - } - else { - $this->StrokeFrame(); - $this->StrokeBackgroundGrad(); - } - } - - $this->StrokeIcons(); - - for($i=0; $i < $n; ++$i) { - $this->plots[$i]->Stroke($this->img); - $this->plots[$i]->Legend($this); - } - } - - $this->legend->Stroke($this->img); - $this->footer->Stroke($this->img); - $this->StrokeTitles(); - - if( !$_csim ) { - - // Stroke texts - if( $this->texts != null ) { - $n = count($this->texts); - for($i=0; $i < $n; ++$i ) { - $this->texts[$i]->Stroke($this->img); - } - } - - if( _JPG_DEBUG ) { - $this->DisplayCSIMAreas(); - } - - // Should we do any final image transformation - if( $this->iImgTrans ) { - if( !class_exists('ImgTrans',false) ) { - require_once('jpgraph_imgtrans.php'); - //JpGraphError::Raise('In order to use image transformation you must include the file jpgraph_imgtrans.php in your script.'); - } - - $tform = new ImgTrans($this->img->img); - $this->img->img = $tform->Skew3D($this->iImgTransHorizon,$this->iImgTransSkewDist, - $this->iImgTransDirection,$this->iImgTransHighQ, - $this->iImgTransMinSize,$this->iImgTransFillColor, - $this->iImgTransBorder); - } - - - // If the filename is given as the special "__handle" - // then the image handler is returned and the image is NOT - // streamed back - if( $aStrokeFileName == _IMG_HANDLER ) { - return $this->img->img; - } - else { - // Finally stream the generated picture - $this->cache->PutAndStream($this->img,$this->cache_name,$this->inline, - $aStrokeFileName); - } - } - } -} // Class - -/* EOF */ -?> diff --git a/html/lib/jpgraph/jpgraph_pie3d.php b/html/lib/jpgraph/jpgraph_pie3d.php deleted file mode 100644 index 2c01e25fa4..0000000000 --- a/html/lib/jpgraph/jpgraph_pie3d.php +++ /dev/null @@ -1,957 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -/*======================================================================= - // File: JPGRAPH_PIE3D.PHP - // Description: 3D Pie plot extension for JpGraph - // Created: 2001-03-24 - // Ver: $Id: jpgraph_pie3d.php 1329 2009-06-20 19:23:30Z ljp $ - // - // Copyright (c) Aditus Consulting. All rights reserved. - //======================================================================== - */ - -//=================================================== -// CLASS PiePlot3D -// Description: Plots a 3D pie with a specified projection -// angle between 20 and 70 degrees. -//=================================================== -class PiePlot3D extends PiePlot { - private $labelhintcolor="red",$showlabelhint=true; - private $angle=50; - private $edgecolor="", $edgeweight=1; - private $iThickness=false; - - //--------------- - // CONSTRUCTOR - function __construct($data) { - $this->radius = 0.5; - $this->data = $data; - $this->title = new Text(""); - $this->title->SetFont(FF_FONT1,FS_BOLD); - $this->value = new DisplayValue(); - $this->value->Show(); - $this->value->SetFormat('%.0f%%'); - } - - //--------------- - // PUBLIC METHODS - - // Set label arrays - function SetLegends($aLegend) { - $this->legends = array_reverse(array_slice($aLegend,0,count($this->data))); - } - - function SetSliceColors($aColors) { - $this->setslicecolors = $aColors; - } - - function Legend($aGraph) { - parent::Legend($aGraph); - $aGraph->legend->txtcol = array_reverse($aGraph->legend->txtcol); - } - - function SetCSIMTargets($aTargets,$aAlts='',$aWinTargets='') { - $this->csimtargets = $aTargets; - $this->csimwintargets = $aWinTargets; - $this->csimalts = $aAlts; - } - - // Should the slices be separated by a line? If color is specified as "" no line - // will be used to separate pie slices. - function SetEdge($aColor='black',$aWeight=1) { - $this->edgecolor = $aColor; - $this->edgeweight = $aWeight; - } - - // Specify projection angle for 3D in degrees - // Must be between 20 and 70 degrees - function SetAngle($a) { - if( $a<5 || $a>90 ) { - JpGraphError::RaiseL(14002); - //("PiePlot3D::SetAngle() 3D Pie projection angle must be between 5 and 85 degrees."); - } - else { - $this->angle = $a; - } - } - - function Add3DSliceToCSIM($i,$xc,$yc,$height,$width,$thick,$sa,$ea) { //Slice number, ellipse centre (x,y), height, width, start angle, end angle - - $sa *= M_PI/180; - $ea *= M_PI/180; - - //add coordinates of the centre to the map - $coords = "$xc, $yc"; - - //add coordinates of the first point on the arc to the map - $xp = floor($width*cos($sa)/2+$xc); - $yp = floor($yc-$height*sin($sa)/2); - $coords.= ", $xp, $yp"; - - //If on the front half, add the thickness offset - if ($sa >= M_PI && $sa <= 2*M_PI*1.01) { - $yp = floor($yp+$thick); - $coords.= ", $xp, $yp"; - } - - //add coordinates every 0.2 radians - $a=$sa+0.2; - while ($a<$ea) { - $xp = floor($width*cos($a)/2+$xc); - if ($a >= M_PI && $a <= 2*M_PI*1.01) { - $yp = floor($yc-($height*sin($a)/2)+$thick); - } else { - $yp = floor($yc-$height*sin($a)/2); - } - $coords.= ", $xp, $yp"; - $a += 0.2; - } - - //Add the last point on the arc - $xp = floor($width*cos($ea)/2+$xc); - $yp = floor($yc-$height*sin($ea)/2); - - - if ($ea >= M_PI && $ea <= 2*M_PI*1.01) { - $coords.= ", $xp, ".floor($yp+$thick); - } - $coords.= ", $xp, $yp"; - $alt=''; - - if( !empty($this->csimtargets[$i]) ) { - $this->csimareas .= "csimtargets[$i]."\""; - - if( !empty($this->csimwintargets[$i]) ) { - $this->csimareas .= " target=\"".$this->csimwintargets[$i]."\" "; - } - - if( !empty($this->csimalts[$i]) ) { - $tmp=sprintf($this->csimalts[$i],$this->data[$i]); - $this->csimareas .= "alt=\"$tmp\" title=\"$tmp\" "; - } - $this->csimareas .= " />\n"; - } - - } - - function SetLabels($aLabels,$aLblPosAdj="auto") { - $this->labels = $aLabels; - $this->ilabelposadj=$aLblPosAdj; - } - - - // Distance from the pie to the labels - function SetLabelMargin($m) { - $this->value->SetMargin($m); - } - - // Show a thin line from the pie to the label for a specific slice - function ShowLabelHint($f=true) { - $this->showlabelhint=$f; - } - - // Set color of hint line to label for each slice - function SetLabelHintColor($c) { - $this->labelhintcolor=$c; - } - - function SetHeight($aHeight) { - $this->iThickness = $aHeight; - } - - - // Normalize Angle between 0-360 - function NormAngle($a) { - // Normalize anle to 0 to 2M_PI - // - if( $a > 0 ) { - while($a > 360) $a -= 360; - } - else { - while($a < 0) $a += 360; - } - if( $a < 0 ) - $a = 360 + $a; - - if( $a == 360 ) $a=0; - return $a; - } - - - - // Draw one 3D pie slice at position ($xc,$yc) with height $z - function Pie3DSlice($img,$xc,$yc,$w,$h,$sa,$ea,$z,$fillcolor,$shadow=0.65) { - - // Due to the way the 3D Pie algorithm works we are - // guaranteed that any slice we get into this method - // belongs to either the left or right side of the - // pie ellipse. Hence, no slice will cross 90 or 270 - // point. - if( ($sa < 90 && $ea > 90) || ( ($sa > 90 && $sa < 270) && $ea > 270) ) { - JpGraphError::RaiseL(14003);//('Internal assertion failed. Pie3D::Pie3DSlice'); - exit(1); - } - - $p[] = array(); - - // Setup pre-calculated values - $rsa = $sa/180*M_PI; // to Rad - $rea = $ea/180*M_PI; // to Rad - $sinsa = sin($rsa); - $cossa = cos($rsa); - $sinea = sin($rea); - $cosea = cos($rea); - - // p[] is the points for the overall slice and - // pt[] is the points for the top pie - - // Angular step when approximating the arc with a polygon train. - $step = 0.05; - - if( $sa >= 270 ) { - if( $ea > 360 || ($ea > 0 && $ea <= 90) ) { - if( $ea > 0 && $ea <= 90 ) { - // Adjust angle to simplify conditions in loops - $rea += 2*M_PI; - } - - $p = array($xc,$yc,$xc,$yc+$z, - $xc+$w*$cossa,$z+$yc-$h*$sinsa); - $pt = array($xc,$yc,$xc+$w*$cossa,$yc-$h*$sinsa); - - for( $a=$rsa; $a < 2*M_PI; $a += $step ) { - $tca = cos($a); - $tsa = sin($a); - $p[] = $xc+$w*$tca; - $p[] = $z+$yc-$h*$tsa; - $pt[] = $xc+$w*$tca; - $pt[] = $yc-$h*$tsa; - } - - $pt[] = $xc+$w; - $pt[] = $yc; - - $p[] = $xc+$w; - $p[] = $z+$yc; - $p[] = $xc+$w; - $p[] = $yc; - $p[] = $xc; - $p[] = $yc; - - for( $a=2*M_PI+$step; $a < $rea; $a += $step ) { - $pt[] = $xc + $w*cos($a); - $pt[] = $yc - $h*sin($a); - } - - $pt[] = $xc+$w*$cosea; - $pt[] = $yc-$h*$sinea; - $pt[] = $xc; - $pt[] = $yc; - - } - else { - $p = array($xc,$yc,$xc,$yc+$z, - $xc+$w*$cossa,$z+$yc-$h*$sinsa); - $pt = array($xc,$yc,$xc+$w*$cossa,$yc-$h*$sinsa); - - $rea = $rea == 0.0 ? 2*M_PI : $rea; - for( $a=$rsa; $a < $rea; $a += $step ) { - $tca = cos($a); - $tsa = sin($a); - $p[] = $xc+$w*$tca; - $p[] = $z+$yc-$h*$tsa; - $pt[] = $xc+$w*$tca; - $pt[] = $yc-$h*$tsa; - } - - $pt[] = $xc+$w*$cosea; - $pt[] = $yc-$h*$sinea; - $pt[] = $xc; - $pt[] = $yc; - - $p[] = $xc+$w*$cosea; - $p[] = $z+$yc-$h*$sinea; - $p[] = $xc+$w*$cosea; - $p[] = $yc-$h*$sinea; - $p[] = $xc; - $p[] = $yc; - } - } - elseif( $sa >= 180 ) { - $p = array($xc,$yc,$xc,$yc+$z,$xc+$w*$cosea,$z+$yc-$h*$sinea); - $pt = array($xc,$yc,$xc+$w*$cosea,$yc-$h*$sinea); - - for( $a=$rea; $a>$rsa; $a -= $step ) { - $tca = cos($a); - $tsa = sin($a); - $p[] = $xc+$w*$tca; - $p[] = $z+$yc-$h*$tsa; - $pt[] = $xc+$w*$tca; - $pt[] = $yc-$h*$tsa; - } - - $pt[] = $xc+$w*$cossa; - $pt[] = $yc-$h*$sinsa; - $pt[] = $xc; - $pt[] = $yc; - - $p[] = $xc+$w*$cossa; - $p[] = $z+$yc-$h*$sinsa; - $p[] = $xc+$w*$cossa; - $p[] = $yc-$h*$sinsa; - $p[] = $xc; - $p[] = $yc; - - } - elseif( $sa >= 90 ) { - if( $ea > 180 ) { - $p = array($xc,$yc,$xc,$yc+$z,$xc+$w*$cosea,$z+$yc-$h*$sinea); - $pt = array($xc,$yc,$xc+$w*$cosea,$yc-$h*$sinea); - - for( $a=$rea; $a > M_PI; $a -= $step ) { - $tca = cos($a); - $tsa = sin($a); - $p[] = $xc+$w*$tca; - $p[] = $z + $yc - $h*$tsa; - $pt[] = $xc+$w*$tca; - $pt[] = $yc-$h*$tsa; - } - - $p[] = $xc-$w; - $p[] = $z+$yc; - $p[] = $xc-$w; - $p[] = $yc; - $p[] = $xc; - $p[] = $yc; - - $pt[] = $xc-$w; - $pt[] = $z+$yc; - $pt[] = $xc-$w; - $pt[] = $yc; - - for( $a=M_PI-$step; $a > $rsa; $a -= $step ) { - $pt[] = $xc + $w*cos($a); - $pt[] = $yc - $h*sin($a); - } - - $pt[] = $xc+$w*$cossa; - $pt[] = $yc-$h*$sinsa; - $pt[] = $xc; - $pt[] = $yc; - - } - else { // $sa >= 90 && $ea <= 180 - $p = array($xc,$yc,$xc,$yc+$z, - $xc+$w*$cosea,$z+$yc-$h*$sinea, - $xc+$w*$cosea,$yc-$h*$sinea, - $xc,$yc); - - $pt = array($xc,$yc,$xc+$w*$cosea,$yc-$h*$sinea); - - for( $a=$rea; $a>$rsa; $a -= $step ) { - $pt[] = $xc + $w*cos($a); - $pt[] = $yc - $h*sin($a); - } - - $pt[] = $xc+$w*$cossa; - $pt[] = $yc-$h*$sinsa; - $pt[] = $xc; - $pt[] = $yc; - - } - } - else { // sa > 0 && ea < 90 - - $p = array($xc,$yc,$xc,$yc+$z, - $xc+$w*$cossa,$z+$yc-$h*$sinsa, - $xc+$w*$cossa,$yc-$h*$sinsa, - $xc,$yc); - - $pt = array($xc,$yc,$xc+$w*$cossa,$yc-$h*$sinsa); - - for( $a=$rsa; $a < $rea; $a += $step ) { - $pt[] = $xc + $w*cos($a); - $pt[] = $yc - $h*sin($a); - } - - $pt[] = $xc+$w*$cosea; - $pt[] = $yc-$h*$sinea; - $pt[] = $xc; - $pt[] = $yc; - } - - $img->PushColor($fillcolor.":".$shadow); - $img->FilledPolygon($p); - $img->PopColor(); - - $img->PushColor($fillcolor); - $img->FilledPolygon($pt); - $img->PopColor(); - } - - function SetStartAngle($aStart) { - if( $aStart < 0 || $aStart > 360 ) { - JpGraphError::RaiseL(14004);//('Slice start angle must be between 0 and 360 degrees.'); - } - $this->startangle = $aStart; - } - - // Draw a 3D Pie - function Pie3D($aaoption,$img,$data,$colors,$xc,$yc,$d,$angle,$z, - $shadow=0.65,$startangle=0,$edgecolor="",$edgeweight=1) { - - //--------------------------------------------------------------------------- - // As usual the algorithm get more complicated than I originally - // envisioned. I believe that this is as simple as it is possible - // to do it with the features I want. It's a good exercise to start - // thinking on how to do this to convince your self that all this - // is really needed for the general case. - // - // The algorithm two draw 3D pies without "real 3D" is done in - // two steps. - // First imagine the pie cut in half through a thought line between - // 12'a clock and 6'a clock. It now easy to imagine that we can plot - // the individual slices for each half by starting with the topmost - // pie slice and continue down to 6'a clock. - // - // In the algortithm this is done in three principal steps - // Step 1. Do the knife cut to ensure by splitting slices that extends - // over the cut line. This is done by splitting the original slices into - // upto 3 subslices. - // Step 2. Find the top slice for each half - // Step 3. Draw the slices from top to bottom - // - // The thing that slightly complicates this scheme with all the - // angle comparisons below is that we can have an arbitrary start - // angle so we must take into account the different equivalence classes. - // For the same reason we must walk through the angle array in a - // modulo fashion. - // - // Limitations of algorithm: - // * A small exploded slice which crosses the 270 degree point - // will get slightly nagged close to the center due to the fact that - // we print the slices in Z-order and that the slice left part - // get printed first and might get slightly nagged by a larger - // slice on the right side just before the right part of the small - // slice. Not a major problem though. - //--------------------------------------------------------------------------- - - - // Determine the height of the ellippse which gives an - // indication of the inclination angle - $h = ($angle/90.0)*$d; - $sum = 0; - for($i=0; $ilabeltype == 2 ) { - $this->adjusted_data = $this->AdjPercentage($data); - } - - // Setup the start - $accsum = 0; - $a = $startangle; - $a = $this->NormAngle($a); - - // - // Step 1 . Split all slices that crosses 90 or 270 - // - $idx=0; - $adjexplode=array(); - $numcolors = count($colors); - for($i=0; $iexplode_radius[$i]) ) { - $this->explode_radius[$i]=0; - } - - $expscale=1; - if( $aaoption == 1 ) { - $expscale=2; - } - - $la = $a + $da/2; - $explode = array( $xc + $this->explode_radius[$i]*cos($la*M_PI/180)*$expscale, - $yc - $this->explode_radius[$i]*sin($la*M_PI/180) * ($h/$d) *$expscale ); - $adjexplode[$idx] = $explode; - $labeldata[$i] = array($la,$explode[0],$explode[1]); - $originalangles[$i] = array($a,$a+$da); - - $ne = $this->NormAngle($a+$da); - if( $da <= 180 ) { - // If the slice size is <= 90 it can at maximum cut across - // one boundary (either 90 or 270) where it needs to be split - $split=-1; // no split - if( ($da<=90 && ($a <= 90 && $ne > 90)) || - (($da <= 180 && $da >90) && (($a < 90 || $a >= 270) && $ne > 90)) ) { - $split = 90; - } - elseif( ($da<=90 && ($a <= 270 && $ne > 270)) || - (($da<=180 && $da>90) && ($a >= 90 && $a < 270 && ($a+$da) > 270 )) ) { - $split = 270; - } - if( $split > 0 ) { // split in two - $angles[$idx] = array($a,$split); - $adjcolors[$idx] = $colors[$i % $numcolors]; - $adjexplode[$idx] = $explode; - $angles[++$idx] = array($split,$ne); - $adjcolors[$idx] = $colors[$i % $numcolors]; - $adjexplode[$idx] = $explode; - } - else { // no split - $angles[$idx] = array($a,$ne); - $adjcolors[$idx] = $colors[$i % $numcolors]; - $adjexplode[$idx] = $explode; - } - } - else { - // da>180 - // Slice may, depending on position, cross one or two - // bonudaries - - if( $a < 90 ) $split = 90; - elseif( $a <= 270 ) $split = 270; - else $split = 90; - - $angles[$idx] = array($a,$split); - $adjcolors[$idx] = $colors[$i % $numcolors]; - $adjexplode[$idx] = $explode; - //if( $a+$da > 360-$split ) { - // For slices larger than 270 degrees we might cross - // another boundary as well. This means that we must - // split the slice further. The comparison gets a little - // bit complicated since we must take into accound that - // a pie might have a startangle >0 and hence a slice might - // wrap around the 0 angle. - // Three cases: - // a) Slice starts before 90 and hence gets a split=90, but - // we must also check if we need to split at 270 - // b) Slice starts after 90 but before 270 and slices - // crosses 90 (after a wrap around of 0) - // c) If start is > 270 (hence the firstr split is at 90) - // and the slice is so large that it goes all the way - // around 270. - if( ($a < 90 && ($a+$da > 270)) || ($a > 90 && $a<=270 && ($a+$da>360+90) ) || ($a > 270 && $this->NormAngle($a+$da)>270) ) { - $angles[++$idx] = array($split,360-$split); - $adjcolors[$idx] = $colors[$i % $numcolors]; - $adjexplode[$idx] = $explode; - $angles[++$idx] = array(360-$split,$ne); - $adjcolors[$idx] = $colors[$i % $numcolors]; - $adjexplode[$idx] = $explode; - } - else { - // Just a simple split to the previous decided - // angle. - $angles[++$idx] = array($split,$ne); - $adjcolors[$idx] = $colors[$i % $numcolors]; - $adjexplode[$idx] = $explode; - } - } - $a += $da; - $a = $this->NormAngle($a); - } - - // Total number of slices - $n = count($angles); - - for($i=0; $i<$n; ++$i) { - list($dbgs,$dbge) = $angles[$i]; - } - - // - // Step 2. Find start index (first pie that starts in upper left quadrant) - // - $minval = $angles[0][0]; - $min = 0; - for( $i=0; $i<$n; ++$i ) { - if( $angles[$i][0] < $minval ) { - $minval = $angles[$i][0]; - $min = $i; - } - } - $j = $min; - $cnt = 0; - while( $angles[$j][1] <= 90 ) { - $j++; - if( $j>=$n) { - $j=0; - } - if( $cnt > $n ) { - JpGraphError::RaiseL(14005); - //("Pie3D Internal error (#1). Trying to wrap twice when looking for start index"); - } - ++$cnt; - } - $start = $j; - - // - // Step 3. Print slices in z-order - // - $cnt = 0; - - // First stroke all the slices between 90 and 270 (left half circle) - // counterclockwise - - while( $angles[$j][0] < 270 && $aaoption !== 2 ) { - - list($x,$y) = $adjexplode[$j]; - - $this->Pie3DSlice($img,$x,$y,$d,$h,$angles[$j][0],$angles[$j][1], - $z,$adjcolors[$j],$shadow); - - $last = array($x,$y,$j); - - $j++; - if( $j >= $n ) $j=0; - if( $cnt > $n ) { - JpGraphError::RaiseL(14006); - //("Pie3D Internal Error: Z-Sorting algorithm for 3D Pies is not working properly (2). Trying to wrap twice while stroking."); - } - ++$cnt; - } - - $slice_left = $n-$cnt; - $j=$start-1; - if($j<0) $j=$n-1; - $cnt = 0; - - // The stroke all slices from 90 to -90 (right half circle) - // clockwise - while( $cnt < $slice_left && $aaoption !== 2 ) { - - list($x,$y) = $adjexplode[$j]; - - $this->Pie3DSlice($img,$x,$y,$d,$h,$angles[$j][0],$angles[$j][1], - $z,$adjcolors[$j],$shadow); - $j--; - if( $cnt > $n ) { - JpGraphError::RaiseL(14006); - //("Pie3D Internal Error: Z-Sorting algorithm for 3D Pies is not working properly (2). Trying to wrap twice while stroking."); - } - if($j<0) $j=$n-1; - $cnt++; - } - - // Now do a special thing. Stroke the last slice on the left - // halfcircle one more time. This is needed in the case where - // the slice close to 270 have been exploded. In that case the - // part of the slice close to the center of the pie might be - // slightly nagged. - if( $aaoption !== 2 ) - $this->Pie3DSlice($img,$last[0],$last[1],$d,$h,$angles[$last[2]][0], - $angles[$last[2]][1],$z,$adjcolors[$last[2]],$shadow); - - - if( $aaoption !== 1 ) { - // Now print possible labels and add csim - $this->value->ApplyFont($img); - $margin = $img->GetFontHeight()/2 + $this->value->margin ; - for($i=0; $i < count($data); ++$i ) { - $la = $labeldata[$i][0]; - $x = $labeldata[$i][1] + cos($la*M_PI/180)*($d+$margin)*$this->ilabelposadj; - $y = $labeldata[$i][2] - sin($la*M_PI/180)*($h+$margin)*$this->ilabelposadj; - if( $this->ilabelposadj >= 1.0 ) { - if( $la > 180 && $la < 360 ) $y += $z; - } - if( $this->labeltype == 0 ) { - if( $sum > 0 ) $l = 100*$data[$i]/$sum; - else $l = 0; - } - elseif( $this->labeltype == 1 ) { - $l = $data[$i]; - } - else { - $l = $this->adjusted_data[$i]; - } - if( isset($this->labels[$i]) && is_string($this->labels[$i]) ) { - $l=sprintf($this->labels[$i],$l); - } - - $this->StrokeLabels($l,$img,$labeldata[$i][0]*M_PI/180,$x,$y,$z); - - $this->Add3DSliceToCSIM($i,$labeldata[$i][1],$labeldata[$i][2],$h*2,$d*2,$z, - $originalangles[$i][0],$originalangles[$i][1]); - } - } - - // - // Finally add potential lines in pie - // - - if( $edgecolor=="" || $aaoption !== 0 ) return; - - $accsum = 0; - $a = $startangle; - $a = $this->NormAngle($a); - - $a *= M_PI/180.0; - - $idx=0; - $img->PushColor($edgecolor); - $img->SetLineWeight($edgeweight); - - $fulledge = true; - for($i=0; $i < count($data) && $fulledge; ++$i ) { - if( empty($this->explode_radius[$i]) ) { - $this->explode_radius[$i]=0; - } - if( $this->explode_radius[$i] > 0 ) { - $fulledge = false; - } - } - - - for($i=0; $i < count($data); ++$i, ++$idx ) { - - $da = $data[$i]/$sum * 2*M_PI; - $this->StrokeFullSliceFrame($img,$xc,$yc,$a,$a+$da,$d,$h,$z,$edgecolor, - $this->explode_radius[$i],$fulledge); - $a += $da; - } - $img->PopColor(); - } - - function StrokeFullSliceFrame($img,$xc,$yc,$sa,$ea,$w,$h,$z,$edgecolor,$exploderadius,$fulledge) { - $step = 0.02; - - if( $exploderadius > 0 ) { - $la = ($sa+$ea)/2; - $xc += $exploderadius*cos($la); - $yc -= $exploderadius*sin($la) * ($h/$w) ; - - } - - $p = array($xc,$yc,$xc+$w*cos($sa),$yc-$h*sin($sa)); - - for($a=$sa; $a < $ea; $a += $step ) { - $p[] = $xc + $w*cos($a); - $p[] = $yc - $h*sin($a); - } - - $p[] = $xc+$w*cos($ea); - $p[] = $yc-$h*sin($ea); - $p[] = $xc; - $p[] = $yc; - - $img->SetColor($edgecolor); - $img->Polygon($p); - - // Unfortunately we can't really draw the full edge around the whole of - // of the slice if any of the slices are exploded. The reason is that - // this algorithm is to simply. There are cases where the edges will - // "overwrite" other slices when they have been exploded. - // Doing the full, proper 3D hidden lines stiff is actually quite - // tricky. So for exploded pies we only draw the top edge. Not perfect - // but the "real" solution is much more complicated. - if( $fulledge && !( $sa > 0 && $sa < M_PI && $ea < M_PI) ) { - - if($sa < M_PI && $ea > M_PI) { - $sa = M_PI; - } - - if($sa < 2*M_PI && (($ea >= 2*M_PI) || ($ea > 0 && $ea < $sa ) ) ) { - $ea = 2*M_PI; - } - - if( $sa >= M_PI && $ea <= 2*M_PI ) { - $p = array($xc + $w*cos($sa),$yc - $h*sin($sa), - $xc + $w*cos($sa),$z + $yc - $h*sin($sa)); - - for($a=$sa+$step; $a < $ea; $a += $step ) { - $p[] = $xc + $w*cos($a); - $p[] = $z + $yc - $h*sin($a); - } - $p[] = $xc + $w*cos($ea); - $p[] = $z + $yc - $h*sin($ea); - $p[] = $xc + $w*cos($ea); - $p[] = $yc - $h*sin($ea); - $img->SetColor($edgecolor); - $img->Polygon($p); - } - } - } - - function Stroke($img,$aaoption=0) { - $n = count($this->data); - - // If user hasn't set the colors use the theme array - if( $this->setslicecolors==null ) { - $colors = array_keys($img->rgb->rgb_table); - sort($colors); - $idx_a=$this->themearr[$this->theme]; - $ca = array(); - $m = count($idx_a); - for($i=0; $i < $m; ++$i) { - $ca[$i] = $colors[$idx_a[$i]]; - } - $ca = array_reverse(array_slice($ca,0,$n)); - } - else { - $ca = $this->setslicecolors; - } - - - if( $this->posx <= 1 && $this->posx > 0 ) { - $xc = round($this->posx*$img->width); - } - else { - $xc = $this->posx ; - } - - if( $this->posy <= 1 && $this->posy > 0 ) { - $yc = round($this->posy*$img->height); - } - else { - $yc = $this->posy ; - } - - if( $this->radius <= 1 ) { - $width = floor($this->radius*min($img->width,$img->height)); - // Make sure that the pie doesn't overflow the image border - // The 0.9 factor is simply an extra margin to leave some space - // between the pie an the border of the image. - $width = min($width,min($xc*0.9,($yc*90/$this->angle-$width/4)*0.9)); - } - else { - $width = $this->radius * ($aaoption === 1 ? 2 : 1 ) ; - } - - // Add a sanity check for width - if( $width < 1 ) { - JpGraphError::RaiseL(14007);//("Width for 3D Pie is 0. Specify a size > 0"); - } - - // Establish a thickness. By default the thickness is a fifth of the - // pie slice width (=pie radius) but since the perspective depends - // on the inclination angle we use some heuristics to make the edge - // slightly thicker the less the angle. - - // Has user specified an absolute thickness? In that case use - // that instead - - if( $this->iThickness ) { - $thick = $this->iThickness; - $thick *= ($aaoption === 1 ? 2 : 1 ); - } - else { - $thick = $width/12; - } - $a = $this->angle; - - if( $a <= 30 ) $thick *= 1.6; - elseif( $a <= 40 ) $thick *= 1.4; - elseif( $a <= 50 ) $thick *= 1.2; - elseif( $a <= 60 ) $thick *= 1.0; - elseif( $a <= 70 ) $thick *= 0.8; - elseif( $a <= 80 ) $thick *= 0.7; - else $thick *= 0.6; - - $thick = floor($thick); - - if( $this->explode_all ) { - for($i=0; $i < $n; ++$i) - $this->explode_radius[$i]=$this->explode_r; - } - - $this->Pie3D($aaoption,$img,$this->data, $ca, $xc, $yc, $width, $this->angle, - $thick, 0.65, $this->startangle, $this->edgecolor, $this->edgeweight); - - // Adjust title position - if( $aaoption != 1 ) { - $this->title->SetPos($xc,$yc-$this->title->GetFontHeight($img)-$width/2-$this->title->margin, "center","bottom"); - $this->title->Stroke($img); - } - } - - //--------------- - // PRIVATE METHODS - - // Position the labels of each slice - function StrokeLabels($label,$img,$a,$xp,$yp,$z) { - $this->value->halign="left"; - $this->value->valign="top"; - - // Position the axis title. - // dx, dy is the offset from the top left corner of the bounding box that sorrounds the text - // that intersects with the extension of the corresponding axis. The code looks a little - // bit messy but this is really the only way of having a reasonable position of the - // axis titles. - $this->value->ApplyFont($img); - $h=$img->GetTextHeight($label); - // For numeric values the format of the display value - // must be taken into account - if( is_numeric($label) ) { - if( $label >= 0 ) { - $w=$img->GetTextWidth(sprintf($this->value->format,$label)); - } - else { - $w=$img->GetTextWidth(sprintf($this->value->negformat,$label)); - } - } - else { - $w=$img->GetTextWidth($label); - } - - while( $a > 2*M_PI ) { - $a -= 2*M_PI; - } - - if( $a>=7*M_PI/4 || $a <= M_PI/4 ) $dx=0; - if( $a>=M_PI/4 && $a <= 3*M_PI/4 ) $dx=($a-M_PI/4)*2/M_PI; - if( $a>=3*M_PI/4 && $a <= 5*M_PI/4 ) $dx=1; - if( $a>=5*M_PI/4 && $a <= 7*M_PI/4 ) $dx=(1-($a-M_PI*5/4)*2/M_PI); - - if( $a>=7*M_PI/4 ) $dy=(($a-M_PI)-3*M_PI/4)*2/M_PI; - if( $a<=M_PI/4 ) $dy=(1-$a*2/M_PI); - if( $a>=M_PI/4 && $a <= 3*M_PI/4 ) $dy=1; - if( $a>=3*M_PI/4 && $a <= 5*M_PI/4 ) $dy=(1-($a-3*M_PI/4)*2/M_PI); - if( $a>=5*M_PI/4 && $a <= 7*M_PI/4 ) $dy=0; - - $x = round($xp-$dx*$w); - $y = round($yp-$dy*$h); - - // Mark anchor point for debugging - /* - $img->SetColor('red'); - $img->Line($xp-10,$yp,$xp+10,$yp); - $img->Line($xp,$yp-10,$xp,$yp+10); - */ - - $oldmargin = $this->value->margin; - $this->value->margin=0; - $this->value->Stroke($img,$label,$x,$y); - $this->value->margin=$oldmargin; - - } -} // Class - -/* EOF */ -?> diff --git a/html/lib/jpgraph/jpgraph_plotband.php b/html/lib/jpgraph/jpgraph_plotband.php deleted file mode 100644 index 3e7ae3ffee..0000000000 --- a/html/lib/jpgraph/jpgraph_plotband.php +++ /dev/null @@ -1,659 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -//======================================================================= -// File: JPGRAPH_PLOTBAND.PHP -// Description: PHP4 Graph Plotting library. Extension module. -// Created: 2004-02-18 -// Ver: $Id: jpgraph_plotband.php 1106 2009-02-22 20:16:35Z ljp $ -// -// Copyright (c) Aditus Consulting. All rights reserved. -//======================================================================== - -// Constants for types of static bands in plot area -define("BAND_RDIAG",1); // Right diagonal lines -define("BAND_LDIAG",2); // Left diagonal lines -define("BAND_SOLID",3); // Solid one color -define("BAND_VLINE",4); // Vertical lines -define("BAND_HLINE",5); // Horizontal lines -define("BAND_3DPLANE",6); // "3D" Plane -define("BAND_HVCROSS",7); // Vertical/Hor crosses -define("BAND_DIAGCROSS",8); // Diagonal crosses - - -// Utility class to hold coordinates for a rectangle -class Rectangle { - public $x,$y,$w,$h; - public $xe, $ye; - function __construct($aX,$aY,$aWidth,$aHeight) { - $this->x=$aX; - $this->y=$aY; - $this->w=$aWidth; - $this->h=$aHeight; - $this->xe=$aX+$aWidth-1; - $this->ye=$aY+$aHeight-1; - } -} - -//===================================================================== -// Class RectPattern -// Base class for pattern hierarchi that is used to display patterned -// bands on the graph. Any subclass that doesn't override Stroke() -// must at least implement method DoPattern($aImg) which is responsible -// for drawing the pattern onto the graph. -//===================================================================== -class RectPattern { - protected $color; - protected $weight; - protected $rect=null; - protected $doframe=true; - protected $linespacing; // Line spacing in pixels - protected $iBackgroundColor=-1; // Default is no background fill - - function __construct($aColor,$aWeight=1) { - $this->color = $aColor; - $this->weight = $aWeight; - } - - function SetBackground($aBackgroundColor) { - $this->iBackgroundColor=$aBackgroundColor; - } - - function SetPos($aRect) { - $this->rect = $aRect; - } - - function ShowFrame($aShow=true) { - $this->doframe=$aShow; - } - - function SetDensity($aDens) { - if( $aDens < 1 || $aDens > 100 ) - JpGraphError::RaiseL(16001,$aDens); - //(" Desity for pattern must be between 1 and 100. (You tried $aDens)"); - // 1% corresponds to linespacing=50 - // 100 % corresponds to linespacing 1 - $this->linespacing = floor(((100-$aDens)/100.0)*50)+1; - - } - - function Stroke($aImg) { - if( $this->rect == null ) - JpGraphError::RaiseL(16002); - //(" No positions specified for pattern."); - - if( !(is_numeric($this->iBackgroundColor) && $this->iBackgroundColor==-1) ) { - $aImg->SetColor($this->iBackgroundColor); - $aImg->FilledRectangle($this->rect->x,$this->rect->y,$this->rect->xe,$this->rect->ye); - } - - $aImg->SetColor($this->color); - $aImg->SetLineWeight($this->weight); - - // Virtual function implemented by subclass - $this->DoPattern($aImg); - - // Frame around the pattern area - if( $this->doframe ) - $aImg->Rectangle($this->rect->x,$this->rect->y,$this->rect->xe,$this->rect->ye); - } - -} - - -//===================================================================== -// Class RectPatternSolid -// Implements a solid band -//===================================================================== -class RectPatternSolid extends RectPattern { - - function __construct($aColor="black",$aWeight=1) { - parent::__construct($aColor,$aWeight); - } - - function DoPattern($aImg) { - $aImg->SetColor($this->color); - $aImg->FilledRectangle($this->rect->x,$this->rect->y, - $this->rect->xe,$this->rect->ye); - } -} - -//===================================================================== -// Class RectPatternHor -// Implements horizontal line pattern -//===================================================================== -class RectPatternHor extends RectPattern { - - function __construct($aColor="black",$aWeight=1,$aLineSpacing=7) { - parent::__construct($aColor,$aWeight); - $this->linespacing = $aLineSpacing; - } - - function DoPattern($aImg) { - $x0 = $this->rect->x; - $x1 = $this->rect->xe; - $y = $this->rect->y; - while( $y < $this->rect->ye ) { - $aImg->Line($x0,$y,$x1,$y); - $y += $this->linespacing; - } - } -} - -//===================================================================== -// Class RectPatternVert -// Implements vertical line pattern -//===================================================================== -class RectPatternVert extends RectPattern { - - function __construct($aColor="black",$aWeight=1,$aLineSpacing=7) { - parent::__construct($aColor,$aWeight); - $this->linespacing = $aLineSpacing; - } - - //-------------------- - // Private methods - // - function DoPattern($aImg) { - $x = $this->rect->x; - $y0 = $this->rect->y; - $y1 = $this->rect->ye; - while( $x < $this->rect->xe ) { - $aImg->Line($x,$y0,$x,$y1); - $x += $this->linespacing; - } - } -} - - -//===================================================================== -// Class RectPatternRDiag -// Implements right diagonal pattern -//===================================================================== -class RectPatternRDiag extends RectPattern { - - function __construct($aColor="black",$aWeight=1,$aLineSpacing=12) { - parent::__construct($aColor,$aWeight); - $this->linespacing = $aLineSpacing; - } - - function DoPattern($aImg) { - // -------------------- - // | / / / / /| - // |/ / / / / | - // | / / / / | - // -------------------- - $xe = $this->rect->xe; - $ye = $this->rect->ye; - $x0 = $this->rect->x + round($this->linespacing/2); - $y0 = $this->rect->y; - $x1 = $this->rect->x; - $y1 = $this->rect->y + round($this->linespacing/2); - - while($x0<=$xe && $y1<=$ye) { - $aImg->Line($x0,$y0,$x1,$y1); - $x0 += $this->linespacing; - $y1 += $this->linespacing; - } - - if( $xe-$x1 > $ye-$y0 ) { - // Width larger than height - $x1 = $this->rect->x + ($y1-$ye); - $y1 = $ye; - $y0 = $this->rect->y; - while( $x0 <= $xe ) { - $aImg->Line($x0,$y0,$x1,$y1); - $x0 += $this->linespacing; - $x1 += $this->linespacing; - } - - $y0=$this->rect->y + ($x0-$xe); - $x0=$xe; - } - else { - // Height larger than width - $diff = $x0-$xe; - $y0 = $diff+$this->rect->y; - $x0 = $xe; - $x1 = $this->rect->x; - while( $y1 <= $ye ) { - $aImg->Line($x0,$y0,$x1,$y1); - $y1 += $this->linespacing; - $y0 += $this->linespacing; - } - - $diff = $y1-$ye; - $y1 = $ye; - $x1 = $diff + $this->rect->x; - } - - while( $y0 <= $ye ) { - $aImg->Line($x0,$y0,$x1,$y1); - $y0 += $this->linespacing; - $x1 += $this->linespacing; - } - } -} - -//===================================================================== -// Class RectPatternLDiag -// Implements left diagonal pattern -//===================================================================== -class RectPatternLDiag extends RectPattern { - - function __construct($aColor="black",$aWeight=1,$aLineSpacing=12) { - $this->linespacing = $aLineSpacing; - parent::__construct($aColor,$aWeight); - } - - function DoPattern($aImg) { - // -------------------- - // |\ \ \ \ \ | - // | \ \ \ \ \| - // | \ \ \ \ | - // |------------------| - $xe = $this->rect->xe; - $ye = $this->rect->ye; - $x0 = $this->rect->x + round($this->linespacing/2); - $y0 = $this->rect->ye; - $x1 = $this->rect->x; - $y1 = $this->rect->ye - round($this->linespacing/2); - - while($x0<=$xe && $y1>=$this->rect->y) { - $aImg->Line($x0,$y0,$x1,$y1); - $x0 += $this->linespacing; - $y1 -= $this->linespacing; - } - if( $xe-$x1 > $ye-$this->rect->y ) { - // Width larger than height - $x1 = $this->rect->x + ($this->rect->y-$y1); - $y0=$ye; $y1=$this->rect->y; - while( $x0 <= $xe ) { - $aImg->Line($x0,$y0,$x1,$y1); - $x0 += $this->linespacing; - $x1 += $this->linespacing; - } - - $y0=$this->rect->ye - ($x0-$xe); - $x0=$xe; - } - else { - // Height larger than width - $diff = $x0-$xe; - $y0 = $ye-$diff; - $x0 = $xe; - while( $y1 >= $this->rect->y ) { - $aImg->Line($x0,$y0,$x1,$y1); - $y0 -= $this->linespacing; - $y1 -= $this->linespacing; - } - $diff = $this->rect->y - $y1; - $x1 = $this->rect->x + $diff; - $y1 = $this->rect->y; - } - while( $y0 >= $this->rect->y ) { - $aImg->Line($x0,$y0,$x1,$y1); - $y0 -= $this->linespacing; - $x1 += $this->linespacing; - } - } -} - -//===================================================================== -// Class RectPattern3DPlane -// Implements "3D" plane pattern -//===================================================================== -class RectPattern3DPlane extends RectPattern { - private $alpha=50; // Parameter that specifies the distance - // to "simulated" horizon in pixel from the - // top of the band. Specifies how fast the lines - // converge. - - function __construct($aColor="black",$aWeight=1) { - parent::__construct($aColor,$aWeight); - $this->SetDensity(10); // Slightly larger default - } - - function SetHorizon($aHorizon) { - $this->alpha=$aHorizon; - } - - function DoPattern($aImg) { - // "Fake" a nice 3D grid-effect. - $x0 = $this->rect->x + $this->rect->w/2; - $y0 = $this->rect->y; - $x1 = $x0; - $y1 = $this->rect->ye; - $x0_right = $x0; - $x1_right = $x1; - - // BTW "apa" means monkey in Swedish but is really a shortform for - // "alpha+a" which was the labels I used on paper when I derived the - // geometric to get the 3D perspective right. - // $apa is the height of the bounding rectangle plus the distance to the - // artifical horizon (alpha) - $apa = $this->rect->h + $this->alpha; - - // Three cases and three loops - // 1) The endpoint of the line ends on the bottom line - // 2) The endpoint ends on the side - // 3) Horizontal lines - - // Endpoint falls on bottom line - $middle=$this->rect->x + $this->rect->w/2; - $dist=$this->linespacing; - $factor=$this->alpha /($apa); - while($x1>$this->rect->x) { - $aImg->Line($x0,$y0,$x1,$y1); - $aImg->Line($x0_right,$y0,$x1_right,$y1); - $x1 = $middle - $dist; - $x0 = $middle - $dist * $factor; - $x1_right = $middle + $dist; - $x0_right = $middle + $dist * $factor; - $dist += $this->linespacing; - } - - // Endpoint falls on sides - $dist -= $this->linespacing; - $d=$this->rect->w/2; - $c = $apa - $d*$apa/$dist; - while( $x0>$this->rect->x ) { - $aImg->Line($x0,$y0,$this->rect->x,$this->rect->ye-$c); - $aImg->Line($x0_right,$y0,$this->rect->xe,$this->rect->ye-$c); - $dist += $this->linespacing; - $x0 = $middle - $dist * $factor; - $x1 = $middle - $dist; - $x0_right = $middle + $dist * $factor; - $c = $apa - $d*$apa/$dist; - } - - // Horizontal lines - // They need some serious consideration since they are a function - // of perspective depth (alpha) and density (linespacing) - $x0=$this->rect->x; - $x1=$this->rect->xe; - $y=$this->rect->ye; - - // The first line is drawn directly. Makes the loop below slightly - // more readable. - $aImg->Line($x0,$y,$x1,$y); - $hls = $this->linespacing; - - // A correction factor for vertical "brick" line spacing to account for - // a) the difference in number of pixels hor vs vert - // b) visual apperance to make the first layer of "bricks" look more - // square. - $vls = $this->linespacing*0.6; - - $ds = $hls*($apa-$vls)/$apa; - // Get the slope for the "perspective line" going from bottom right - // corner to top left corner of the "first" brick. - - // Uncomment the following lines if you want to get a visual understanding - // of what this helpline does. BTW this mimics the way you would get the - // perspective right when drawing on paper. - /* - $x0 = $middle; - $y0 = $this->rect->ye; - $len=floor(($this->rect->ye-$this->rect->y)/$vls); - $x1 = $middle+round($len*$ds); - $y1 = $this->rect->ye-$len*$vls; - $aImg->PushColor("red"); - $aImg->Line($x0,$y0,$x1,$y1); - $aImg->PopColor(); - */ - - $y -= $vls; - $k=($this->rect->ye-($this->rect->ye-$vls))/($middle-($middle-$ds)); - $dist = $hls; - while( $y>$this->rect->y ) { - $aImg->Line($this->rect->x,$y,$this->rect->xe,$y); - $adj = $k*$dist/(1+$dist*$k/$apa); - if( $adj < 2 ) $adj=1; - $y = $this->rect->ye - round($adj); - $dist += $hls; - } - } -} - -//===================================================================== -// Class RectPatternCross -// Vert/Hor crosses -//===================================================================== -class RectPatternCross extends RectPattern { - private $vert=null; - private $hor=null; - function __construct($aColor="black",$aWeight=1) { - parent::__construct($aColor,$aWeight); - $this->vert = new RectPatternVert($aColor,$aWeight); - $this->hor = new RectPatternHor($aColor,$aWeight); - } - - function SetOrder($aDepth) { - $this->vert->SetOrder($aDepth); - $this->hor->SetOrder($aDepth); - } - - function SetPos($aRect) { - parent::SetPos($aRect); - $this->vert->SetPos($aRect); - $this->hor->SetPos($aRect); - } - - function SetDensity($aDens) { - $this->vert->SetDensity($aDens); - $this->hor->SetDensity($aDens); - } - - function DoPattern($aImg) { - $this->vert->DoPattern($aImg); - $this->hor->DoPattern($aImg); - } -} - -//===================================================================== -// Class RectPatternDiagCross -// Vert/Hor crosses -//===================================================================== - -class RectPatternDiagCross extends RectPattern { - private $left=null; - private $right=null; - function __construct($aColor="black",$aWeight=1) { - parent::__construct($aColor,$aWeight); - $this->right = new RectPatternRDiag($aColor,$aWeight); - $this->left = new RectPatternLDiag($aColor,$aWeight); - } - - function SetOrder($aDepth) { - $this->left->SetOrder($aDepth); - $this->right->SetOrder($aDepth); - } - - function SetPos($aRect) { - parent::SetPos($aRect); - $this->left->SetPos($aRect); - $this->right->SetPos($aRect); - } - - function SetDensity($aDens) { - $this->left->SetDensity($aDens); - $this->right->SetDensity($aDens); - } - - function DoPattern($aImg) { - $this->left->DoPattern($aImg); - $this->right->DoPattern($aImg); - } - -} - -//===================================================================== -// Class RectPatternFactory -// Factory class for rectangular pattern -//===================================================================== -class RectPatternFactory { - function __construct() { - // Empty - } - function Create($aPattern,$aColor,$aWeight=1) { - switch($aPattern) { - case BAND_RDIAG: - $obj = new RectPatternRDiag($aColor,$aWeight); - break; - case BAND_LDIAG: - $obj = new RectPatternLDiag($aColor,$aWeight); - break; - case BAND_SOLID: - $obj = new RectPatternSolid($aColor,$aWeight); - break; - case BAND_VLINE: - $obj = new RectPatternVert($aColor,$aWeight); - break; - case BAND_HLINE: - $obj = new RectPatternHor($aColor,$aWeight); - break; - case BAND_3DPLANE: - $obj = new RectPattern3DPlane($aColor,$aWeight); - break; - case BAND_HVCROSS: - $obj = new RectPatternCross($aColor,$aWeight); - break; - case BAND_DIAGCROSS: - $obj = new RectPatternDiagCross($aColor,$aWeight); - break; - default: - JpGraphError::RaiseL(16003,$aPattern); - //(" Unknown pattern specification ($aPattern)"); - } - return $obj; - } -} - - -//===================================================================== -// Class PlotBand -// Factory class which is used by the client. -// It is responsible for factoring the corresponding pattern -// concrete class. -//===================================================================== -class PlotBand { - public $depth; // Determine if band should be over or under the plots - private $prect=null; - private $dir, $min, $max; - - function __construct($aDir,$aPattern,$aMin,$aMax,$aColor="black",$aWeight=1,$aDepth=DEPTH_BACK) { - $f = new RectPatternFactory(); - $this->prect = $f->Create($aPattern,$aColor,$aWeight); - if( is_numeric($aMin) && is_numeric($aMax) && ($aMin > $aMax) ) - JpGraphError::RaiseL(16004); - //('Min value for plotband is larger than specified max value. Please correct.'); - $this->dir = $aDir; - $this->min = $aMin; - $this->max = $aMax; - $this->depth=$aDepth; - } - - // Set position. aRect contains absolute image coordinates - function SetPos($aRect) { - assert( $this->prect != null ) ; - $this->prect->SetPos($aRect); - } - - function ShowFrame($aFlag=true) { - $this->prect->ShowFrame($aFlag); - } - - // Set z-order. In front of pplot or in the back - function SetOrder($aDepth) { - $this->depth=$aDepth; - } - - function SetDensity($aDens) { - $this->prect->SetDensity($aDens); - } - - function GetDir() { - return $this->dir; - } - - function GetMin() { - return $this->min; - } - - function GetMax() { - return $this->max; - } - - function PreStrokeAdjust($aGraph) { - // Nothing to do - } - - // Display band - function Stroke($aImg,$aXScale,$aYScale) { - assert( $this->prect != null ) ; - if( $this->dir == HORIZONTAL ) { - if( $this->min === 'min' ) $this->min = $aYScale->GetMinVal(); - if( $this->max === 'max' ) $this->max = $aYScale->GetMaxVal(); - - // Only draw the bar if it actually appears in the range - if ($this->min < $aYScale->GetMaxVal() && $this->max > $aYScale->GetMinVal()) { - - // Trucate to limit of axis - $this->min = max($this->min, $aYScale->GetMinVal()); - $this->max = min($this->max, $aYScale->GetMaxVal()); - - $x=$aXScale->scale_abs[0]; - $y=$aYScale->Translate($this->max); - $width=$aXScale->scale_abs[1]-$aXScale->scale_abs[0]+1; - $height=abs($y-$aYScale->Translate($this->min))+1; - $this->prect->SetPos(new Rectangle($x,$y,$width,$height)); - $this->prect->Stroke($aImg); - } - } - else { // VERTICAL - if( $this->min === 'min' ) $this->min = $aXScale->GetMinVal(); - if( $this->max === 'max' ) $this->max = $aXScale->GetMaxVal(); - - // Only draw the bar if it actually appears in the range - if ($this->min < $aXScale->GetMaxVal() && $this->max > $aXScale->GetMinVal()) { - - // Trucate to limit of axis - $this->min = max($this->min, $aXScale->GetMinVal()); - $this->max = min($this->max, $aXScale->GetMaxVal()); - - $y=$aYScale->scale_abs[1]; - $x=$aXScale->Translate($this->min); - $height=abs($aYScale->scale_abs[1]-$aYScale->scale_abs[0]); - $width=abs($x-$aXScale->Translate($this->max)); - $this->prect->SetPos(new Rectangle($x,$y,$width,$height)); - $this->prect->Stroke($aImg); - } - } - } -} - - -?> diff --git a/html/lib/jpgraph/jpgraph_plotline.php b/html/lib/jpgraph/jpgraph_plotline.php deleted file mode 100644 index 13a203197c..0000000000 --- a/html/lib/jpgraph/jpgraph_plotline.php +++ /dev/null @@ -1,162 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -/*======================================================================= - // File: JPGRAPH_PLOTLINE.PHP - // Description: PlotLine extension for JpGraph - // Created: 2009-03-24 - // Ver: $Id: jpgraph_plotline.php 1881 2009-10-01 10:28:12Z ljp $ - // - // CLASS PlotLine - // Data container class to hold properties for a static - // line that is drawn directly in the plot area. - // Useful to add static borders inside a plot to show for example set-values - // - // Copyright (c) Aditus Consulting. All rights reserved. - //======================================================================== - */ - -class PlotLine { - public $scaleposition, $direction=-1; - protected $weight=1; - protected $color = 'black'; - private $legend='',$hidelegend=false, $legendcsimtarget='', $legendcsimalt='',$legendcsimwintarget=''; - private $iLineStyle='solid'; - public $numpoints=0; // Needed since the framework expects this property - - function __construct($aDir=HORIZONTAL,$aPos=0,$aColor='black',$aWeight=1) { - $this->direction = $aDir; - $this->color=$aColor; - $this->weight=$aWeight; - $this->scaleposition=$aPos; - } - - function SetLegend($aLegend,$aCSIM='',$aCSIMAlt='',$aCSIMWinTarget='') { - $this->legend = $aLegend; - $this->legendcsimtarget = $aCSIM; - $this->legendcsimwintarget = $aCSIMWinTarget; - $this->legendcsimalt = $aCSIMAlt; - } - - function HideLegend($f=true) { - $this->hidelegend = $f; - } - - function SetPosition($aScalePosition) { - $this->scaleposition=$aScalePosition; - } - - function SetDirection($aDir) { - $this->direction = $aDir; - } - - function SetColor($aColor) { - $this->color=$aColor; - } - - function SetWeight($aWeight) { - $this->weight=$aWeight; - } - - function SetLineStyle($aStyle) { - $this->iLineStyle = $aStyle; - } - - //--------------- - // PRIVATE METHODS - - function DoLegend($graph) { - if( !$this->hidelegend ) $this->Legend($graph); - } - - // Framework function the chance for each plot class to set a legend - function Legend($aGraph) { - if( $this->legend != '' ) { - $dummyPlotMark = new PlotMark(); - $lineStyle = 1; - $aGraph->legend->Add($this->legend,$this->color,$dummyPlotMark,$lineStyle, - $this->legendcsimtarget,$this->legendcsimalt,$this->legendcsimwintarget); - } - } - - function PreStrokeAdjust($aGraph) { - // Nothing to do - } - - // Called by framework to allow the object to draw - // optional information in the margin area - function StrokeMargin($aImg) { - // Nothing to do - } - - // Framework function to allow the object to adjust the scale - function PrescaleSetup($aGraph) { - // Nothing to do - } - - function Min() { - return array(null,null); - } - - function Max() { - return array(null,null); - } - - function _Stroke($aImg,$aMinX,$aMinY,$aMaxX,$aMaxY,$aXPos,$aYPos) { - $aImg->SetColor($this->color); - $aImg->SetLineWeight($this->weight); - $oldStyle = $aImg->SetLineStyle($this->iLineStyle); - if( $this->direction == VERTICAL ) { - $ymin_abs = $aMinY; - $ymax_abs = $aMaxY; - $xpos_abs = $aXPos; - $aImg->StyleLine($xpos_abs, $ymin_abs, $xpos_abs, $ymax_abs); - } - elseif( $this->direction == HORIZONTAL ) { - $xmin_abs = $aMinX; - $xmax_abs = $aMaxX; - $ypos_abs = $aYPos; - $aImg->StyleLine($xmin_abs, $ypos_abs, $xmax_abs, $ypos_abs); - } - else { - JpGraphError::RaiseL(25125);//(" Illegal direction for static line"); - } - $aImg->SetLineStyle($oldStyle); - } - - function Stroke($aImg,$aXScale,$aYScale) { - $this->_Stroke($aImg, - $aImg->left_margin, - $aYScale->Translate($aYScale->GetMinVal()), - $aImg->width-$aImg->right_margin, - $aYScale->Translate($aYScale->GetMaxVal()), - $aXScale->Translate($this->scaleposition), - $aYScale->Translate($this->scaleposition) - ); - } -} - - -?> \ No newline at end of file diff --git a/html/lib/jpgraph/jpgraph_plotmark.inc.php b/html/lib/jpgraph/jpgraph_plotmark.inc.php deleted file mode 100644 index c602b65cce..0000000000 --- a/html/lib/jpgraph/jpgraph_plotmark.inc.php +++ /dev/null @@ -1,528 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -//======================================================================= -// File: JPGRAPH_PLOTMARK.PHP -// Description: Class file. Handles plotmarks -// Created: 2003-03-21 -// Ver: $Id: jpgraph_plotmark.inc.php 1106 2009-02-22 20:16:35Z ljp $ -// -// Copyright (c) Aditus Consulting. All rights reserved. -//======================================================================== - - -//=================================================== -// CLASS PlotMark -// Description: Handles the plot marks in graphs -//=================================================== - -class PlotMark { - public $title, $show=true; - public $type,$weight=1; - public $iFormatCallback="", $iFormatCallback2=""; - public $fill_color="blue"; - public $color="black", $width=4; - private $yvalue,$xvalue='',$csimtarget,$csimwintarget='',$csimalt,$csimareas; - private $markimg='',$iScale=1.0; - private $oldfilename='',$iFileName=''; - private $imgdata_balls = null; - private $imgdata_diamonds = null; - private $imgdata_squares = null; - private $imgdata_bevels = null; - private $imgdata_stars = null; - private $imgdata_pushpins = null; - - //-------------- - // CONSTRUCTOR - function __construct() { - $this->title = new Text(); - $this->title->Hide(); - $this->csimareas = ''; - $this->type=-1; - } - //--------------- - // PUBLIC METHODS - function SetType($aType,$aFileName='',$aScale=1.0) { - $this->type = $aType; - if( $aType == MARK_IMG && $aFileName=='' ) { - JpGraphError::RaiseL(23003);//('A filename must be specified if you set the mark type to MARK_IMG.'); - } - $this->iFileName = $aFileName; - $this->iScale = $aScale; - } - - function SetCallback($aFunc) { - $this->iFormatCallback = $aFunc; - } - - function SetCallbackYX($aFunc) { - $this->iFormatCallback2 = $aFunc; - } - - function GetType() { - return $this->type; - } - - function SetColor($aColor) { - $this->color=$aColor; - } - - function SetFillColor($aFillColor) { - $this->fill_color = $aFillColor; - } - - function SetWeight($aWeight) { - $this->weight = $aWeight; - } - - // Synonym for SetWidth() - function SetSize($aWidth) { - $this->width=$aWidth; - } - - function SetWidth($aWidth) { - $this->width=$aWidth; - } - - function SetDefaultWidth() { - switch( $this->type ) { - case MARK_CIRCLE: - case MARK_FILLEDCIRCLE: - $this->width=4; - break; - default: - $this->width=7; - } - } - - function GetWidth() { - return $this->width; - } - - function Hide($aHide=true) { - $this->show = !$aHide; - } - - function Show($aShow=true) { - $this->show = $aShow; - } - - function SetCSIMAltVal($aY,$aX='') { - $this->yvalue=$aY; - $this->xvalue=$aX; - } - - function SetCSIMTarget($aTarget,$aWinTarget='') { - $this->csimtarget=$aTarget; - $this->csimwintarget=$aWinTarget; - } - - function SetCSIMAlt($aAlt) { - $this->csimalt=$aAlt; - } - - function GetCSIMAreas(){ - return $this->csimareas; - } - - function AddCSIMPoly($aPts) { - $coords = round($aPts[0]).", ".round($aPts[1]); - $n = count($aPts)/2; - for( $i=1; $i < $n; ++$i){ - $coords .= ", ".round($aPts[2*$i]).", ".round($aPts[2*$i+1]); - } - $this->csimareas=""; - if( !empty($this->csimtarget) ) { - $this->csimareas .= "csimtarget)."\""; - - if( !empty($this->csimwintarget) ) { - $this->csimareas .= " target=\"".$this->csimwintarget."\" "; - } - - if( !empty($this->csimalt) ) { - $tmp=sprintf($this->csimalt,$this->yvalue,$this->xvalue); - $this->csimareas .= " title=\"$tmp\" alt=\"$tmp\""; - } - $this->csimareas .= " />\n"; - } - } - - function AddCSIMCircle($x,$y,$r) { - $x = round($x); $y=round($y); $r=round($r); - $this->csimareas=""; - if( !empty($this->csimtarget) ) { - $this->csimareas .= "csimtarget)."\""; - - if( !empty($this->csimwintarget) ) { - $this->csimareas .= " target=\"".$this->csimwintarget."\" "; - } - - if( !empty($this->csimalt) ) { - $tmp=sprintf($this->csimalt,$this->yvalue,$this->xvalue); - $this->csimareas .= " title=\"$tmp\" alt=\"$tmp\" "; - } - $this->csimareas .= " />\n"; - } - } - - function Stroke($img,$x,$y) { - if( !$this->show ) return; - - if( $this->iFormatCallback != '' || $this->iFormatCallback2 != '' ) { - - if( $this->iFormatCallback != '' ) { - $f = $this->iFormatCallback; - list($width,$color,$fcolor) = call_user_func($f,$this->yvalue); - $filename = $this->iFileName; - $imgscale = $this->iScale; - } - else { - $f = $this->iFormatCallback2; - list($width,$color,$fcolor,$filename,$imgscale) = call_user_func($f,$this->yvalue,$this->xvalue); - if( $filename=="" ) $filename = $this->iFileName; - if( $imgscale=="" ) $imgscale = $this->iScale; - } - - if( $width=="" ) $width = $this->width; - if( $color=="" ) $color = $this->color; - if( $fcolor=="" ) $fcolor = $this->fill_color; - - } - else { - $fcolor = $this->fill_color; - $color = $this->color; - $width = $this->width; - $filename = $this->iFileName; - $imgscale = $this->iScale; - } - - if( $this->type == MARK_IMG || - ($this->type >= MARK_FLAG1 && $this->type <= MARK_FLAG4 ) || - $this->type >= MARK_IMG_PUSHPIN ) { - - // Note: For the builtin images we use the "filename" parameter - // to denote the color - $anchor_x = 0.5; - $anchor_y = 0.5; - switch( $this->type ) { - case MARK_FLAG1: - case MARK_FLAG2: - case MARK_FLAG3: - case MARK_FLAG4: - $this->markimg = FlagCache::GetFlagImgByName($this->type-MARK_FLAG1+1,$filename); - break; - - case MARK_IMG : - // Load an image and use that as a marker - // Small optimization, if we have already read an image don't - // waste time reading it again. - if( $this->markimg == '' || !($this->oldfilename === $filename) ) { - $this->markimg = Graph::LoadBkgImage('',$filename); - $this->oldfilename = $filename ; - } - break; - - case MARK_IMG_PUSHPIN: - case MARK_IMG_SPUSHPIN: - case MARK_IMG_LPUSHPIN: - if( $this->imgdata_pushpins == null ) { - require_once 'imgdata_pushpins.inc.php'; - $this->imgdata_pushpins = new ImgData_PushPins(); - } - $this->markimg = $this->imgdata_pushpins->GetImg($this->type,$filename); - list($anchor_x,$anchor_y) = $this->imgdata_pushpins->GetAnchor(); - break; - - case MARK_IMG_SQUARE: - if( $this->imgdata_squares == null ) { - require_once 'imgdata_squares.inc.php'; - $this->imgdata_squares = new ImgData_Squares(); - } - $this->markimg = $this->imgdata_squares->GetImg($this->type,$filename); - list($anchor_x,$anchor_y) = $this->imgdata_squares->GetAnchor(); - break; - - case MARK_IMG_STAR: - if( $this->imgdata_stars == null ) { - require_once 'imgdata_stars.inc.php'; - $this->imgdata_stars = new ImgData_Stars(); - } - $this->markimg = $this->imgdata_stars->GetImg($this->type,$filename); - list($anchor_x,$anchor_y) = $this->imgdata_stars->GetAnchor(); - break; - - case MARK_IMG_BEVEL: - if( $this->imgdata_bevels == null ) { - require_once 'imgdata_bevels.inc.php'; - $this->imgdata_bevels = new ImgData_Bevels(); - } - $this->markimg = $this->imgdata_bevels->GetImg($this->type,$filename); - list($anchor_x,$anchor_y) = $this->imgdata_bevels->GetAnchor(); - break; - - case MARK_IMG_DIAMOND: - if( $this->imgdata_diamonds == null ) { - require_once 'imgdata_diamonds.inc.php'; - $this->imgdata_diamonds = new ImgData_Diamonds(); - } - $this->markimg = $this->imgdata_diamonds->GetImg($this->type,$filename); - list($anchor_x,$anchor_y) = $this->imgdata_diamonds->GetAnchor(); - break; - - case MARK_IMG_BALL: - case MARK_IMG_SBALL: - case MARK_IMG_MBALL: - case MARK_IMG_LBALL: - if( $this->imgdata_balls == null ) { - require_once 'imgdata_balls.inc.php'; - $this->imgdata_balls = new ImgData_Balls(); - } - $this->markimg = $this->imgdata_balls->GetImg($this->type,$filename); - list($anchor_x,$anchor_y) = $this->imgdata_balls->GetAnchor(); - break; - } - - $w = $img->GetWidth($this->markimg); - $h = $img->GetHeight($this->markimg); - - $dw = round($imgscale * $w ); - $dh = round($imgscale * $h ); - - // Do potential rotation - list($x,$y) = $img->Rotate($x,$y); - - $dx = round($x-$dw*$anchor_x); - $dy = round($y-$dh*$anchor_y); - - $this->width = max($dx,$dy); - - $img->Copy($this->markimg,$dx,$dy,0,0,$dw,$dh,$w,$h); - if( !empty($this->csimtarget) ) { - $this->csimareas = "csimtarget)."\""; - - if( !empty($this->csimwintarget) ) { - $this->csimareas .= " target=\"".$this->csimwintarget."\" "; - } - - if( !empty($this->csimalt) ) { - $tmp=sprintf($this->csimalt,$this->yvalue,$this->xvalue); - $this->csimareas .= " title=\"$tmp\" alt=\"$tmp\" "; - } - $this->csimareas .= " />\n"; - } - - // Stroke title - $this->title->Align("center","top"); - $this->title->Stroke($img,$x,$y+round($dh/2)); - return; - } - - $weight = $this->weight; - $dx=round($width/2,0); - $dy=round($width/2,0); - $pts=0; - - switch( $this->type ) { - case MARK_SQUARE: - $c[]=$x-$dx;$c[]=$y-$dy; - $c[]=$x+$dx;$c[]=$y-$dy; - $c[]=$x+$dx;$c[]=$y+$dy; - $c[]=$x-$dx;$c[]=$y+$dy; - $c[]=$x-$dx;$c[]=$y-$dy; - $pts=5; - break; - case MARK_UTRIANGLE: - ++$dx;++$dy; - $c[]=$x-$dx;$c[]=$y+0.87*$dy; // tan(60)/2*$dx - $c[]=$x;$c[]=$y-0.87*$dy; - $c[]=$x+$dx;$c[]=$y+0.87*$dy; - $c[]=$x-$dx;$c[]=$y+0.87*$dy; // tan(60)/2*$dx - $pts=4; - break; - case MARK_DTRIANGLE: - ++$dx;++$dy; - $c[]=$x;$c[]=$y+0.87*$dy; // tan(60)/2*$dx - $c[]=$x-$dx;$c[]=$y-0.87*$dy; - $c[]=$x+$dx;$c[]=$y-0.87*$dy; - $c[]=$x;$c[]=$y+0.87*$dy; // tan(60)/2*$dx - $pts=4; - break; - case MARK_DIAMOND: - $c[]=$x;$c[]=$y+$dy; - $c[]=$x-$dx;$c[]=$y; - $c[]=$x;$c[]=$y-$dy; - $c[]=$x+$dx;$c[]=$y; - $c[]=$x;$c[]=$y+$dy; - $pts=5; - break; - case MARK_LEFTTRIANGLE: - $c[]=$x;$c[]=$y; - $c[]=$x;$c[]=$y+2*$dy; - $c[]=$x+$dx*2;$c[]=$y; - $c[]=$x;$c[]=$y; - $pts=4; - break; - case MARK_RIGHTTRIANGLE: - $c[]=$x-$dx*2;$c[]=$y; - $c[]=$x;$c[]=$y+2*$dy; - $c[]=$x;$c[]=$y; - $c[]=$x-$dx*2;$c[]=$y; - $pts=4; - break; - case MARK_FLASH: - $dy *= 2; - $c[]=$x+$dx/2; $c[]=$y-$dy; - $c[]=$x-$dx+$dx/2; $c[]=$y+$dy*0.7-$dy; - $c[]=$x+$dx/2; $c[]=$y+$dy*1.3-$dy; - $c[]=$x-$dx+$dx/2; $c[]=$y+2*$dy-$dy; - $img->SetLineWeight($weight); - $img->SetColor($color); - $img->Polygon($c); - $img->SetLineWeight(1); - $this->AddCSIMPoly($c); - break; - } - - if( $pts>0 ) { - $this->AddCSIMPoly($c); - $img->SetLineWeight($weight); - $img->SetColor($fcolor); - $img->FilledPolygon($c); - $img->SetColor($color); - $img->Polygon($c); - $img->SetLineWeight(1); - } - elseif( $this->type==MARK_CIRCLE ) { - $img->SetColor($color); - $img->Circle($x,$y,$width); - $this->AddCSIMCircle($x,$y,$width); - } - elseif( $this->type==MARK_FILLEDCIRCLE ) { - $img->SetColor($fcolor); - $img->FilledCircle($x,$y,$width); - $img->SetColor($color); - $img->Circle($x,$y,$width); - $this->AddCSIMCircle($x,$y,$width); - } - elseif( $this->type==MARK_CROSS ) { - // Oversize by a pixel to match the X - $img->SetColor($color); - $img->SetLineWeight($weight); - $img->Line($x,$y+$dy+1,$x,$y-$dy-1); - $img->Line($x-$dx-1,$y,$x+$dx+1,$y); - $this->AddCSIMCircle($x,$y,$dx); - } - elseif( $this->type==MARK_X ) { - $img->SetColor($color); - $img->SetLineWeight($weight); - $img->Line($x+$dx,$y+$dy,$x-$dx,$y-$dy); - $img->Line($x-$dx,$y+$dy,$x+$dx,$y-$dy); - $this->AddCSIMCircle($x,$y,$dx+$dy); - } - elseif( $this->type==MARK_STAR ) { - $img->SetColor($color); - $img->SetLineWeight($weight); - $img->Line($x+$dx,$y+$dy,$x-$dx,$y-$dy); - $img->Line($x-$dx,$y+$dy,$x+$dx,$y-$dy); - // Oversize by a pixel to match the X - $img->Line($x,$y+$dy+1,$x,$y-$dy-1); - $img->Line($x-$dx-1,$y,$x+$dx+1,$y); - $this->AddCSIMCircle($x,$y,$dx+$dy); - } - - // Stroke title - $this->title->Align("center","center"); - $this->title->Stroke($img,$x,$y); - } -} // Class - - - -//======================================================================== -// CLASS ImgData -// Description: Base class for all image data classes that contains the -// real image data. -//======================================================================== -class ImgData { - protected $name = ''; // Each subclass gives a name - protected $an = array(); // Data array names - protected $colors = array(); // Available colors - protected $index = array(); // Index for colors - protected $maxidx = 0 ; // Max color index - protected $anchor_x=0.5, $anchor_y=0.5 ; // Where is the center of the image - - function __construct() { - // Empty - } - - // Create a GD image from the data and return a GD handle - function GetImg($aMark,$aIdx) { - $n = $this->an[$aMark]; - if( is_string($aIdx) ) { - if( !in_array($aIdx,$this->colors) ) { - JpGraphError::RaiseL(23001,$this->name,$aIdx);//('This marker "'.($this->name).'" does not exist in color: '.$aIdx); - } - $idx = $this->index[$aIdx]; - } - elseif( !is_integer($aIdx) || - (is_integer($aIdx) && $aIdx > $this->maxidx ) ) { - JpGraphError::RaiseL(23002,$this->name);//('Mark color index too large for marker "'.($this->name).'"'); - } - else - $idx = $aIdx ; - return Image::CreateFromString(base64_decode($this->{$n}[$idx][1])); - } - - function GetAnchor() { - return array($this->anchor_x,$this->anchor_y); - } -} - - -// Keep a global flag cache to reduce memory usage -$_gFlagCache=array( -1 => null, -2 => null, -3 => null, -4 => null, -); -// Only supposed to b called as statics -class FlagCache { - - static function GetFlagImgByName($aSize,$aName) { - global $_gFlagCache; - require_once('jpgraph_flags.php'); - if( $_gFlagCache[$aSize] === null ) { - $_gFlagCache[$aSize] = new FlagImages($aSize); - } - $f = $_gFlagCache[$aSize]; - $idx = $f->GetIdxByName($aName,$aFullName); - return $f->GetImgByIdx($idx); - } -} - -?> \ No newline at end of file diff --git a/html/lib/jpgraph/jpgraph_polar.php b/html/lib/jpgraph/jpgraph_polar.php deleted file mode 100644 index 6d70e6233d..0000000000 --- a/html/lib/jpgraph/jpgraph_polar.php +++ /dev/null @@ -1,921 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -/*======================================================================= - // File: JPGRAPH_POLAR.PHP - // Description: Polar plot extension for JpGraph - // Created: 2003-02-02 - // Ver: $Id: jpgraph_polar.php 1796 2009-09-07 09:37:19Z ljp $ - // - // Copyright (c) Aditus Consulting. All rights reserved. - //======================================================================== - */ - -require_once ('jpgraph_plotmark.inc.php'); -require_once "jpgraph_log.php"; - - -define('POLAR_360',1); -define('POLAR_180',2); - -// -// Note. Don't attempt to make sense of this code. -// In order not to have to be able to inherit the scaling code -// from the main graph package we have had to make some "tricks" since -// the original scaling and axis was not designed to do what is -// required here. -// There were two option. 1: Re-implement everything and get a clean design -// and 2: do some "small" trickery and be able to inherit most of -// the functionlity from the main graph package. -// We choose 2: here in order to save some time. -// - -//-------------------------------------------------------------------------- -// class PolarPlot -//-------------------------------------------------------------------------- -class PolarPlot { - public $line_style='solid',$mark; - public $legendcsimtarget=''; - public $legendcsimalt=''; - public $legend=""; - public $csimtargets=array(); // Array of targets for CSIM - public $csimareas=""; // Resultant CSIM area tags - public $csimalts=null; // ALT:s for corresponding target - public $scale=null; - private $numpoints=0; - private $iColor='navy',$iFillColor=''; - private $iLineWeight=1; - private $coord=null; - - function __construct($aData) { - $n = count($aData); - if( $n & 1 ) { - JpGraphError::RaiseL(17001); - //('Polar plots must have an even number of data point. Each data point is a tuple (angle,radius).'); - } - $this->numpoints = $n/2; - $this->coord = $aData; - $this->mark = new PlotMark(); - } - - function SetWeight($aWeight) { - $this->iLineWeight = $aWeight; - } - - function SetColor($aColor){ - $this->iColor = $aColor; - } - - function SetFillColor($aColor){ - $this->iFillColor = $aColor; - } - - function Max() { - $m = $this->coord[1]; - $i=1; - while( $i < $this->numpoints ) { - $m = max($m,$this->coord[2*$i+1]); - ++$i; - } - return $m; - } - // Set href targets for CSIM - function SetCSIMTargets($aTargets,$aAlts=null) { - $this->csimtargets=$aTargets; - $this->csimalts=$aAlts; - } - - // Get all created areas - function GetCSIMareas() { - return $this->csimareas; - } - - function SetLegend($aLegend,$aCSIM="",$aCSIMAlt="") { - $this->legend = $aLegend; - $this->legendcsimtarget = $aCSIM; - $this->legendcsimalt = $aCSIMAlt; - } - - // Private methods - - function Legend($aGraph) { - $color = $this->iColor ; - if( $this->legend != "" ) { - if( $this->iFillColor!='' ) { - $color = $this->iFillColor; - $aGraph->legend->Add($this->legend,$color,$this->mark,0, - $this->legendcsimtarget,$this->legendcsimalt); - } - else { - $aGraph->legend->Add($this->legend,$color,$this->mark,$this->line_style, - $this->legendcsimtarget,$this->legendcsimalt); - } - } - } - - function Stroke($img,$scale) { - - $i=0; - $p=array(); - $this->csimareas=''; - while($i < $this->numpoints) { - list($x1,$y1) = $scale->PTranslate($this->coord[2*$i],$this->coord[2*$i+1]); - $p[2*$i] = $x1; - $p[2*$i+1] = $y1; - - if( isset($this->csimtargets[$i]) ) { - $this->mark->SetCSIMTarget($this->csimtargets[$i]); - $this->mark->SetCSIMAlt($this->csimalts[$i]); - $this->mark->SetCSIMAltVal($this->coord[2*$i], $this->coord[2*$i+1]); - $this->mark->Stroke($img,$x1,$y1); - $this->csimareas .= $this->mark->GetCSIMAreas(); - } - else { - $this->mark->Stroke($img,$x1,$y1); - } - - ++$i; - } - - if( $this->iFillColor != '' ) { - $img->SetColor($this->iFillColor); - $img->FilledPolygon($p); - } - $img->SetLineWeight($this->iLineWeight); - $img->SetColor($this->iColor); - $img->Polygon($p,$this->iFillColor!=''); - } -} - -//-------------------------------------------------------------------------- -// class PolarAxis -//-------------------------------------------------------------------------- -class PolarAxis extends Axis { - private $angle_step=15,$angle_color='lightgray',$angle_label_color='black'; - private $angle_fontfam=FF_FONT1,$angle_fontstyle=FS_NORMAL,$angle_fontsize=10; - private $angle_fontcolor = 'navy'; - private $gridminor_color='lightgray',$gridmajor_color='lightgray'; - private $show_minor_grid = false, $show_major_grid = true ; - private $show_angle_mark=true, $show_angle_grid=true, $show_angle_label=true; - private $angle_tick_len=3, $angle_tick_len2=3, $angle_tick_color='black'; - private $show_angle_tick=true; - private $radius_tick_color='black'; - - function __construct($img,$aScale) { - parent::__construct($img,$aScale); - } - - function ShowAngleDegreeMark($aFlg=true) { - $this->show_angle_mark = $aFlg; - } - - function SetAngleStep($aStep) { - $this->angle_step=$aStep; - } - - function HideTicks($aFlg=true,$aAngleFlg=true) { - parent::HideTicks($aFlg,$aFlg); - $this->show_angle_tick = !$aAngleFlg; - } - - function ShowAngleLabel($aFlg=true) { - $this->show_angle_label = $aFlg; - } - - function ShowGrid($aMajor=true,$aMinor=false,$aAngle=true) { - $this->show_minor_grid = $aMinor; - $this->show_major_grid = $aMajor; - $this->show_angle_grid = $aAngle ; - } - - function SetAngleFont($aFontFam,$aFontStyle=FS_NORMAL,$aFontSize=10) { - $this->angle_fontfam = $aFontFam; - $this->angle_fontstyle = $aFontStyle; - $this->angle_fontsize = $aFontSize; - } - - function SetColor($aColor,$aRadColor='',$aAngleColor='') { - if( $aAngleColor == '' ) - $aAngleColor=$aColor; - parent::SetColor($aColor,$aRadColor); - $this->angle_fontcolor = $aAngleColor; - } - - function SetGridColor($aMajorColor,$aMinorColor='',$aAngleColor='') { - if( $aMinorColor == '' ) - $aMinorColor = $aMajorColor; - if( $aAngleColor == '' ) - $aAngleColor = $aMajorColor; - - $this->gridminor_color = $aMinorColor; - $this->gridmajor_color = $aMajorColor; - $this->angle_color = $aAngleColor; - } - - function SetTickColors($aRadColor,$aAngleColor='') { - $this->radius_tick_color = $aRadColor; - $this->angle_tick_color = $aAngleColor; - } - - // Private methods - function StrokeGrid($pos) { - $x = round($this->img->left_margin + $this->img->plotwidth/2); - $this->scale->ticks->Stroke($this->img,$this->scale,$pos); - - // Stroke the minor arcs - $pmin = array(); - $p = $this->scale->ticks->ticks_pos; - $n = count($p); - $i = 0; - $this->img->SetColor($this->gridminor_color); - while( $i < $n ) { - $r = $p[$i]-$x+1; - $pmin[]=$r; - if( $this->show_minor_grid ) { - $this->img->Circle($x,$pos,$r); - } - $i++; - } - - $limit = max($this->img->plotwidth,$this->img->plotheight)*1.4 ; - while( $r < $limit ) { - $off = $r; - $i=1; - $r = $off + round($p[$i]-$x+1); - while( $r < $limit && $i < $n ) { - $r = $off+$p[$i]-$x; - $pmin[]=$r; - if( $this->show_minor_grid ) { - $this->img->Circle($x,$pos,$r); - } - $i++; - } - } - - // Stroke the major arcs - if( $this->show_major_grid ) { - // First determine how many minor step on - // every major step. We have recorded the minor radius - // in pmin and use these values. This is done in order - // to avoid rounding errors if we were to recalculate the - // different major radius. - $pmaj = $this->scale->ticks->maj_ticks_pos; - $p = $this->scale->ticks->ticks_pos; - if( $this->scale->name == 'lin' ) { - $step=round(($pmaj[1] - $pmaj[0])/($p[1] - $p[0])); - } - else { - $step=9; - } - $n = round(count($pmin)/$step); - $i = 0; - $this->img->SetColor($this->gridmajor_color); - $limit = max($this->img->plotwidth,$this->img->plotheight)*1.4 ; - $off = $r; - $i=0; - $r = $pmin[$i*$step]; - while( $r < $limit && $i < $n ) { - $r = $pmin[$i*$step]; - $this->img->Circle($x,$pos,$r); - $i++; - } - } - - // Draw angles - if( $this->show_angle_grid ) { - $this->img->SetColor($this->angle_color); - $d = max($this->img->plotheight,$this->img->plotwidth)*1.4 ; - $a = 0; - $p = $this->scale->ticks->ticks_pos; - $start_radius = $p[1]-$x; - while( $a < 360 ) { - if( $a == 90 || $a == 270 ) { - // Make sure there are no rounding problem with - // exactly vertical lines - $this->img->Line($x+$start_radius*cos($a/180*M_PI)+1, - $pos-$start_radius*sin($a/180*M_PI), - $x+$start_radius*cos($a/180*M_PI)+1, - $pos-$d*sin($a/180*M_PI)); - - } - else { - $this->img->Line($x+$start_radius*cos($a/180*M_PI)+1, - $pos-$start_radius*sin($a/180*M_PI), - $x+$d*cos($a/180*M_PI), - $pos-$d*sin($a/180*M_PI)); - } - $a += $this->angle_step; - } - } - } - - function StrokeAngleLabels($pos,$type) { - - if( !$this->show_angle_label ) - return; - - $x0 = round($this->img->left_margin+$this->img->plotwidth/2)+1; - - $d = max($this->img->plotwidth,$this->img->plotheight)*1.42; - $a = $this->angle_step; - $t = new Text(); - $t->SetColor($this->angle_fontcolor); - $t->SetFont($this->angle_fontfam,$this->angle_fontstyle,$this->angle_fontsize); - $xright = $this->img->width - $this->img->right_margin; - $ytop = $this->img->top_margin; - $xleft = $this->img->left_margin; - $ybottom = $this->img->height - $this->img->bottom_margin; - $ha = 'left'; - $va = 'center'; - $w = $this->img->plotwidth/2; - $h = $this->img->plotheight/2; - $xt = $x0; $yt = $pos; - $margin=5; - - $tl = $this->angle_tick_len ; // Outer len - $tl2 = $this->angle_tick_len2 ; // Interior len - - $this->img->SetColor($this->angle_tick_color); - $rot90 = $this->img->a == 90 ; - - if( $type == POLAR_360 ) { - - // Corner angles of the four corners - $ca1 = atan($h/$w)/M_PI*180; - $ca2 = 180-$ca1; - $ca3 = $ca1+180; - $ca4 = 360-$ca1; - $end = 360; - - while( $a < $end ) { - $ca = cos($a/180*M_PI); - $sa = sin($a/180*M_PI); - $x = $d*$ca; - $y = $d*$sa; - $xt=1000;$yt=1000; - if( $a <= $ca1 || $a >= $ca4 ) { - $yt = $pos - $w * $y/$x; - $xt = $xright + $margin; - if( $rot90 ) { - $ha = 'center'; - $va = 'top'; - } - else { - $ha = 'left'; - $va = 'center'; - } - $x1=$xright-$tl2; $x2=$xright+$tl; - $y1=$y2=$yt; - } - elseif( $a > $ca1 && $a < $ca2 ) { - $xt = $x0 + $h * $x/$y; - $yt = $ytop - $margin; - if( $rot90 ) { - $ha = 'left'; - $va = 'center'; - } - else { - $ha = 'center'; - $va = 'bottom'; - } - $y1=$ytop+$tl2;$y2=$ytop-$tl; - $x1=$x2=$xt; - } - elseif( $a >= $ca2 && $a <= $ca3 ) { - $yt = $pos + $w * $y/$x; - $xt = $xleft - $margin; - if( $rot90 ) { - $ha = 'center'; - $va = 'bottom'; - } - else { - $ha = 'right'; - $va = 'center'; - } - $x1=$xleft+$tl2;$x2=$xleft-$tl; - $y1=$y2=$yt; - } - else { - $xt = $x0 - $h * $x/$y; - $yt = $ybottom + $margin; - if( $rot90 ) { - $ha = 'right'; - $va = 'center'; - } - else { - $ha = 'center'; - $va = 'top'; - } - $y1=$ybottom-$tl2;$y2=$ybottom+$tl; - $x1=$x2=$xt; - } - if( $a != 0 && $a != 180 ) { - $t->Align($ha,$va); - if( $this->scale->clockwise ) { - $t->Set(360-$a); - } - else { - $t->Set($a); - } - if( $this->show_angle_mark && $t->font_family > 4 ) { - $a .= SymChar::Get('degree'); - } - $t->Stroke($this->img,$xt,$yt); - if( $this->show_angle_tick ) { - $this->img->Line($x1,$y1,$x2,$y2); - } - } - $a += $this->angle_step; - } - } - else { - // POLAR_HALF - $ca1 = atan($h/$w*2)/M_PI*180; - $ca2 = 180-$ca1; - $end = 180; - while( $a < $end ) { - $ca = cos($a/180*M_PI); - $sa = sin($a/180*M_PI); - $x = $d*$ca; - $y = $d*$sa; - if( $a <= $ca1 ) { - $yt = $pos - $w * $y/$x; - $xt = $xright + $margin; - if( $rot90 ) { - $ha = 'center'; - $va = 'top'; - } - else { - $ha = 'left'; - $va = 'center'; - } - $x1=$xright-$tl2; $x2=$xright+$tl; - $y1=$y2=$yt; - } - elseif( $a > $ca1 && $a < $ca2 ) { - $xt = $x0 + 2*$h * $x/$y; - $yt = $ytop - $margin; - if( $rot90 ) { - $ha = 'left'; - $va = 'center'; - } - else { - $ha = 'center'; - $va = 'bottom'; - } - $y1=$ytop+$tl2;$y2=$ytop-$tl; - $x1=$x2=$xt; - } - elseif( $a >= $ca2 ) { - $yt = $pos + $w * $y/$x; - $xt = $xleft - $margin; - if( $rot90 ) { - $ha = 'center'; - $va = 'bottom'; - } - else { - $ha = 'right'; - $va = 'center'; - } - $x1=$xleft+$tl2;$x2=$xleft-$tl; - $y1=$y2=$yt; - } - $t->Align($ha,$va); - if( $this->show_angle_mark && $t->font_family > 4 ) { - $a .= SymChar::Get('degree'); - } - $t->Set($a); - $t->Stroke($this->img,$xt,$yt); - if( $this->show_angle_tick ) { - $this->img->Line($x1,$y1,$x2,$y2); - } - $a += $this->angle_step; - } - } - } - - function Stroke($pos,$dummy=true) { - - $this->img->SetLineWeight($this->weight); - $this->img->SetColor($this->color); - $this->img->SetFont($this->font_family,$this->font_style,$this->font_size); - if( !$this->hide_line ) { - $this->img->FilledRectangle($this->img->left_margin,$pos, - $this->img->width-$this->img->right_margin, - $pos+$this->weight-1); - } - $y=$pos+$this->img->GetFontHeight()+$this->title_margin+$this->title->margin; - if( $this->title_adjust=="high" ) { - $this->title->SetPos($this->img->width-$this->img->right_margin,$y,"right","top"); - } - elseif( $this->title_adjust=="middle" || $this->title_adjust=="center" ) { - $this->title->SetPos(($this->img->width-$this->img->left_margin-$this->img->right_margin)/2+$this->img->left_margin, - $y,"center","top"); - } - elseif($this->title_adjust=="low") { - $this->title->SetPos($this->img->left_margin,$y,"left","top"); - } - else { - JpGraphError::RaiseL(17002,$this->title_adjust); - //('Unknown alignment specified for X-axis title. ('.$this->title_adjust.')'); - } - - - if (!$this->hide_labels) { - $this->StrokeLabels($pos,false); - } - $this->img->SetColor($this->radius_tick_color); - $this->scale->ticks->Stroke($this->img,$this->scale,$pos); - - // - // Mirror the positions for the left side of the scale - // - $mid = 2*($this->img->left_margin+$this->img->plotwidth/2); - $n = count($this->scale->ticks->ticks_pos); - $i=0; - while( $i < $n ) { - $this->scale->ticks->ticks_pos[$i] = - $mid-$this->scale->ticks->ticks_pos[$i] ; - ++$i; - } - - $n = count($this->scale->ticks->maj_ticks_pos); - $i=0; - while( $i < $n ) { - $this->scale->ticks->maj_ticks_pos[$i] = - $mid-$this->scale->ticks->maj_ticks_pos[$i] ; - ++$i; - } - - $n = count($this->scale->ticks->maj_ticklabels_pos); - $i=1; - while( $i < $n ) { - $this->scale->ticks->maj_ticklabels_pos[$i] = - $mid-$this->scale->ticks->maj_ticklabels_pos[$i] ; - ++$i; - } - - // Draw the left side of the scale - $n = count($this->scale->ticks->ticks_pos); - $yu = $pos - $this->scale->ticks->direction*$this->scale->ticks->GetMinTickAbsSize(); - - - // Minor ticks - if( ! $this->scale->ticks->supress_minor_tickmarks ) { - $i=1; - while( $i < $n/2 ) { - $x = round($this->scale->ticks->ticks_pos[$i]) ; - $this->img->Line($x,$pos,$x,$yu); - ++$i; - } - } - - $n = count($this->scale->ticks->maj_ticks_pos); - $yu = $pos - $this->scale->ticks->direction*$this->scale->ticks->GetMajTickAbsSize(); - - - // Major ticks - if( ! $this->scale->ticks->supress_tickmarks ) { - $i=1; - while( $i < $n/2 ) { - $x = round($this->scale->ticks->maj_ticks_pos[$i]) ; - $this->img->Line($x,$pos,$x,$yu); - ++$i; - } - } - if (!$this->hide_labels) { - $this->StrokeLabels($pos,false); - } - $this->title->Stroke($this->img); - } -} - -class PolarScale extends LinearScale { - private $graph; - public $clockwise=false; - - function __construct($aMax,$graph,$aClockwise) { - parent::__construct(0,$aMax,'x'); - $this->graph = $graph; - $this->clockwise = $aClockwise; - } - - function SetClockwise($aFlg) { - $this->clockwise = $aFlg; - } - - function _Translate($v) { - return parent::Translate($v); - } - - function PTranslate($aAngle,$aRad) { - - $m = $this->scale[1]; - $w = $this->graph->img->plotwidth/2; - $aRad = $aRad/$m*$w; - - $a = $aAngle/180 * M_PI; - if( $this->clockwise ) { - $a = 2*M_PI-$a; - } - - $x = cos($a) * $aRad; - $y = sin($a) * $aRad; - - $x += $this->_Translate(0); - - if( $this->graph->iType == POLAR_360 ) { - $y = ($this->graph->img->top_margin + $this->graph->img->plotheight/2) - $y; - } - else { - $y = ($this->graph->img->top_margin + $this->graph->img->plotheight) - $y; - } - return array($x,$y); - } -} - -class PolarLogScale extends LogScale { - private $graph; - public $clockwise=false; - - function __construct($aMax,$graph,$aClockwise=false) { - parent::__construct(0,$aMax,'x'); - $this->graph = $graph; - $this->ticks->SetLabelLogType(LOGLABELS_MAGNITUDE); - $this->clockwise = $aClockwise; - - } - - function SetClockwise($aFlg) { - $this->clockwise = $aFlg; - } - - function PTranslate($aAngle,$aRad) { - - if( $aRad == 0 ) - $aRad = 1; - $aRad = log10($aRad); - $m = $this->scale[1]; - $w = $this->graph->img->plotwidth/2; - $aRad = $aRad/$m*$w; - - $a = $aAngle/180 * M_PI; - if( $this->clockwise ) { - $a = 2*M_PI-$a; - } - - $x = cos( $a ) * $aRad; - $y = sin( $a ) * $aRad; - - $x += $w+$this->graph->img->left_margin;//$this->_Translate(0); - if( $this->graph->iType == POLAR_360 ) { - $y = ($this->graph->img->top_margin + $this->graph->img->plotheight/2) - $y; - } - else { - $y = ($this->graph->img->top_margin + $this->graph->img->plotheight) - $y; - } - return array($x,$y); - } -} - -class PolarGraph extends Graph { - public $scale; - public $axis; - public $iType=POLAR_360; - private $iClockwise=false; - - function __construct($aWidth=300,$aHeight=200,$aCachedName="",$aTimeOut=0,$aInline=true) { - parent::__construct($aWidth,$aHeight,$aCachedName,$aTimeOut,$aInline) ; - $this->SetDensity(TICKD_DENSE); - $this->SetBox(); - $this->SetMarginColor('white'); - } - - function SetDensity($aDense) { - $this->SetTickDensity(TICKD_NORMAL,$aDense); - } - - function SetClockwise($aFlg) { - $this->scale->SetClockwise($aFlg); - } - - function Set90AndMargin($lm=0,$rm=0,$tm=0,$bm=0) { - $adj = ($this->img->height - $this->img->width)/2; - $this->SetAngle(90); - $lm2 = -$adj + ($lm-$rm+$tm+$bm)/2; - $rm2 = -$adj + (-$lm+$rm+$tm+$bm)/2; - $tm2 = $adj + ($tm-$bm+$lm+$rm)/2; - $bm2 = $adj + (-$tm+$bm+$lm+$rm)/2; - $this->SetMargin($lm2, $rm2, $tm2, $bm2); - $this->axis->SetLabelAlign('right','center'); - } - - function SetScale($aScale,$rmax=0,$dummy1=1,$dummy2=1,$dummy3=1) { - if( $aScale == 'lin' ) { - $this->scale = new PolarScale($rmax,$this,$this->iClockwise); - } - elseif( $aScale == 'log' ) { - $this->scale = new PolarLogScale($rmax,$this,$this->iClockwise); - } - else { - JpGraphError::RaiseL(17004);//('Unknown scale type for polar graph. Must be "lin" or "log"'); - } - - $this->axis = new PolarAxis($this->img,$this->scale); - $this->SetMargin(40,40,50,40); - } - - function SetType($aType) { - $this->iType = $aType; - } - - function SetPlotSize($w,$h) { - $this->SetMargin(($this->img->width-$w)/2,($this->img->width-$w)/2, - ($this->img->height-$h)/2,($this->img->height-$h)/2); - } - - // Private methods - function GetPlotsMax() { - $n = count($this->plots); - $m = $this->plots[0]->Max(); - $i=1; - while($i < $n) { - $m = max($this->plots[$i]->Max(),$m); - ++$i; - } - return $m; - } - - function Stroke($aStrokeFileName="") { - - // Start by adjusting the margin so that potential titles will fit. - $this->AdjustMarginsForTitles(); - - // If the filename is the predefined value = '_csim_special_' - // we assume that the call to stroke only needs to do enough - // to correctly generate the CSIM maps. - // We use this variable to skip things we don't strictly need - // to do to generate the image map to improve performance - // a best we can. Therefor you will see a lot of tests !$_csim in the - // code below. - $_csim = ($aStrokeFileName===_CSIM_SPECIALFILE); - - // We need to know if we have stroked the plot in the - // GetCSIMareas. Otherwise the CSIM hasn't been generated - // and in the case of GetCSIM called before stroke to generate - // CSIM without storing an image to disk GetCSIM must call Stroke. - $this->iHasStroked = true; - - //Check if we should autoscale axis - if( !$this->scale->IsSpecified() && count($this->plots)>0 ) { - $max = $this->GetPlotsMax(); - $t1 = $this->img->plotwidth; - $this->img->plotwidth /= 2; - $t2 = $this->img->left_margin; - $this->img->left_margin += $this->img->plotwidth+1; - $this->scale->AutoScale($this->img,0,$max, - $this->img->plotwidth/$this->xtick_factor/2); - $this->img->plotwidth = $t1; - $this->img->left_margin = $t2; - } - else { - // The tick calculation will use the user suplied min/max values to determine - // the ticks. If auto_ticks is false the exact user specifed min and max - // values will be used for the scale. - // If auto_ticks is true then the scale might be slightly adjusted - // so that the min and max values falls on an even major step. - //$min = 0; - $max = $this->scale->scale[1]; - $t1 = $this->img->plotwidth; - $this->img->plotwidth /= 2; - $t2 = $this->img->left_margin; - $this->img->left_margin += $this->img->plotwidth+1; - $this->scale->AutoScale($this->img,0,$max, - $this->img->plotwidth/$this->xtick_factor/2); - $this->img->plotwidth = $t1; - $this->img->left_margin = $t2; - } - - if( $this->iType == POLAR_180 ) { - $pos = $this->img->height - $this->img->bottom_margin; - } - else { - $pos = $this->img->plotheight/2 + $this->img->top_margin; - } - - if( !$_csim ) { - $this->StrokePlotArea(); - } - - $this->iDoClipping = true; - - if( $this->iDoClipping ) { - $oldimage = $this->img->CloneCanvasH(); - } - - if( !$_csim ) { - $this->axis->StrokeGrid($pos); - } - - // Stroke all plots for Y1 axis - for($i=0; $i < count($this->plots); ++$i) { - $this->plots[$i]->Stroke($this->img,$this->scale); - } - - - if( $this->iDoClipping ) { - // Clipping only supports graphs at 0 and 90 degrees - if( $this->img->a == 0 ) { - $this->img->CopyCanvasH($oldimage,$this->img->img, - $this->img->left_margin,$this->img->top_margin, - $this->img->left_margin,$this->img->top_margin, - $this->img->plotwidth+1,$this->img->plotheight+1); - } - elseif( $this->img->a == 90 ) { - $adj1 = round(($this->img->height - $this->img->width)/2); - $adj2 = round(($this->img->width - $this->img->height)/2); - $lm = $this->img->left_margin; - $rm = $this->img->right_margin; - $tm = $this->img->top_margin; - $bm = $this->img->bottom_margin; - $this->img->CopyCanvasH($oldimage,$this->img->img, - $adj2 + round(($lm-$rm+$tm+$bm)/2), - $adj1 + round(($tm-$bm+$lm+$rm)/2), - $adj2 + round(($lm-$rm+$tm+$bm)/2), - $adj1 + round(($tm-$bm+$lm+$rm)/2), - $this->img->plotheight+1, - $this->img->plotwidth+1); - } - $this->img->Destroy(); - $this->img->SetCanvasH($oldimage); - } - - if( !$_csim ) { - $this->axis->Stroke($pos); - $this->axis->StrokeAngleLabels($pos,$this->iType); - } - - if( !$_csim ) { - $this->StrokePlotBox(); - $this->footer->Stroke($this->img); - - // The titles and legends never gets rotated so make sure - // that the angle is 0 before stroking them - $aa = $this->img->SetAngle(0); - $this->StrokeTitles(); - } - - for($i=0; $i < count($this->plots) ; ++$i ) { - $this->plots[$i]->Legend($this); - } - - $this->legend->Stroke($this->img); - - if( !$_csim ) { - - $this->StrokeTexts(); - $this->img->SetAngle($aa); - - // Draw an outline around the image map - if(_JPG_DEBUG) - $this->DisplayClientSideaImageMapAreas(); - - // If the filename is given as the special "__handle" - // then the image handler is returned and the image is NOT - // streamed back - if( $aStrokeFileName == _IMG_HANDLER ) { - return $this->img->img; - } - else { - // Finally stream the generated picture - $this->cache->PutAndStream($this->img,$this->cache_name,$this->inline,$aStrokeFileName); - } - } - } -} - - - -?> diff --git a/html/lib/jpgraph/jpgraph_radar.php b/html/lib/jpgraph/jpgraph_radar.php deleted file mode 100644 index ac9b6338e1..0000000000 --- a/html/lib/jpgraph/jpgraph_radar.php +++ /dev/null @@ -1,885 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -/*======================================================================= - // File: JPGRAPH_RADAR.PHP - // Description: Radar plot extension for JpGraph - // Created: 2001-02-04 - // Ver: $Id: jpgraph_radar.php 1783 2009-08-25 11:41:01Z ljp $ - // - // Copyright (c) Aditus Consulting. All rights reserved. - //======================================================================== - */ - -require_once('jpgraph_plotmark.inc.php'); - -//=================================================== -// CLASS RadarLogTicks -// Description: Logarithmic ticks -//=================================================== -class RadarLogTicks extends Ticks { - - function __construct() { - // Empty - } - - function Stroke($aImg,&$grid,$aPos,$aAxisAngle,$aScale,&$aMajPos,&$aMajLabel) { - $start = $aScale->GetMinVal(); - $limit = $aScale->GetMaxVal(); - $nextMajor = 10*$start; - $step = $nextMajor / 10.0; - $count=1; - - $ticklen_maj=5; - $dx_maj=round(sin($aAxisAngle)*$ticklen_maj); - $dy_maj=round(cos($aAxisAngle)*$ticklen_maj); - $ticklen_min=3; - $dx_min=round(sin($aAxisAngle)*$ticklen_min); - $dy_min=round(cos($aAxisAngle)*$ticklen_min); - - $aMajPos=array(); - $aMajLabel=array(); - - if( $this->supress_first ) { - $aMajLabel[] = ''; - } - else { - $aMajLabel[]=$start; - } - - $yr=$aScale->RelTranslate($start); - $xt=round($yr*cos($aAxisAngle))+$aScale->scale_abs[0]; - $yt=$aPos-round($yr*sin($aAxisAngle)); - $aMajPos[]=$xt+2*$dx_maj; - $aMajPos[]=$yt-$aImg->GetFontheight()/2; - $grid[]=$xt; - $grid[]=$yt; - - $aImg->SetLineWeight($this->weight); - - for($y=$start; $y<=$limit; $y+=$step,++$count ) { - $yr=$aScale->RelTranslate($y); - $xt=round($yr*cos($aAxisAngle))+$aScale->scale_abs[0]; - $yt=$aPos-round($yr*sin($aAxisAngle)); - if( $count % 10 == 0 ) { - $grid[]=$xt; - $grid[]=$yt; - $aMajPos[]=$xt+2*$dx_maj; - $aMajPos[]=$yt-$aImg->GetFontheight()/2; - if( !$this->supress_tickmarks ) { - if( $this->majcolor != '' ) { - $aImg->PushColor($this->majcolor); - } - $aImg->Line($xt+$dx_maj,$yt+$dy_maj,$xt-$dx_maj,$yt-$dy_maj); - if( $this->majcolor != '' ) { - $aImg->PopColor(); - } - } - if( $this->label_formfunc != '' ) { - $f=$this->label_formfunc; - $l = call_user_func($f,$nextMajor); - } - else { - $l = $nextMajor; - } - - $aMajLabel[]=$l; - $nextMajor *= 10; - $step *= 10; - $count=1; - } - else { - if( !$this->supress_minor_tickmarks ) { - if( $this->mincolor != '' ) { - $aImg->PushColor($this->mincolor); - } - $aImg->Line($xt+$dx_min,$yt+$dy_min,$xt-$dx_min,$yt-$dy_min); - if( $this->mincolor != '' ) { - $aImg->PopColor(); - } - } - } - } - } -} - -//=================================================== -// CLASS RadarLinear -// Description: Linear ticks -//=================================================== -class RadarLinearTicks extends Ticks { - - private $minor_step=1, $major_step=2; - private $xlabel_offset=0,$xtick_offset=0; - - function __construct() { - // Empty - } - - // Return major step size in world coordinates - function GetMajor() { - return $this->major_step; - } - - // Return minor step size in world coordinates - function GetMinor() { - return $this->minor_step; - } - - // Set Minor and Major ticks (in world coordinates) - function Set($aMajStep,$aMinStep=false) { - if( $aMinStep==false ) { - $aMinStep=$aMajStep; - } - - if( $aMajStep <= 0 || $aMinStep <= 0 ) { - JpGraphError::RaiseL(25064); - //JpGraphError::Raise(" Minor or major step size is 0. Check that you haven't got an accidental SetTextTicks(0) in your code. If this is not the case you might have stumbled upon a bug in JpGraph. Please report this and if possible include the data that caused the problem."); - } - - $this->major_step=$aMajStep; - $this->minor_step=$aMinStep; - $this->is_set = true; - } - - function Stroke($aImg,&$grid,$aPos,$aAxisAngle,$aScale,&$aMajPos,&$aMajLabel) { - // Prepare to draw linear ticks - $maj_step_abs = abs($aScale->scale_factor*$this->major_step); - $min_step_abs = abs($aScale->scale_factor*$this->minor_step); - $nbrmaj = round($aScale->world_abs_size/$maj_step_abs); - $nbrmin = round($aScale->world_abs_size/$min_step_abs); - $skip = round($nbrmin/$nbrmaj); // Don't draw minor on top of major - - // Draw major ticks - $ticklen2=$this->major_abs_size; - $dx=round(sin($aAxisAngle)*$ticklen2); - $dy=round(cos($aAxisAngle)*$ticklen2); - $label=$aScale->scale[0]+$this->major_step; - - $aImg->SetLineWeight($this->weight); - - $aMajPos = array(); - $aMajLabel = array(); - - for($i=1; $i<=$nbrmaj; ++$i) { - $xt=round($i*$maj_step_abs*cos($aAxisAngle))+$aScale->scale_abs[0]; - $yt=$aPos-round($i*$maj_step_abs*sin($aAxisAngle)); - - if( $this->label_formfunc != '' ) { - $f=$this->label_formfunc; - $l = call_user_func($f,$label); - } - else { - $l = $label; - } - - $aMajLabel[]=$l; - $label += $this->major_step; - $grid[]=$xt; - $grid[]=$yt; - $aMajPos[($i-1)*2]=$xt+2*$dx; - $aMajPos[($i-1)*2+1]=$yt-$aImg->GetFontheight()/2; - if( !$this->supress_tickmarks ) { - if( $this->majcolor != '' ) { - $aImg->PushColor($this->majcolor); - } - $aImg->Line($xt+$dx,$yt+$dy,$xt-$dx,$yt-$dy); - if( $this->majcolor != '' ) { - $aImg->PopColor(); - } - } - } - - // Draw minor ticks - $ticklen2=$this->minor_abs_size; - $dx=round(sin($aAxisAngle)*$ticklen2); - $dy=round(cos($aAxisAngle)*$ticklen2); - if( !$this->supress_tickmarks && !$this->supress_minor_tickmarks) { - if( $this->mincolor != '' ) { - $aImg->PushColor($this->mincolor); - } - for($i=1; $i<=$nbrmin; ++$i) { - if( ($i % $skip) == 0 ) { - continue; - } - $xt=round($i*$min_step_abs*cos($aAxisAngle))+$aScale->scale_abs[0]; - $yt=$aPos-round($i*$min_step_abs*sin($aAxisAngle)); - $aImg->Line($xt+$dx,$yt+$dy,$xt-$dx,$yt-$dy); - } - if( $this->mincolor != '' ) { - $aImg->PopColor(); - } - } - } -} - - -//=================================================== -// CLASS RadarAxis -// Description: Implements axis for the radar graph -//=================================================== -class RadarAxis extends AxisPrototype { - public $title=null; - private $title_color='navy'; - private $len=0; - - function __construct($img,$aScale,$color=array(0,0,0)) { - parent::__construct($img,$aScale,$color); - $this->len = $img->plotheight; - $this->title = new Text(); - $this->title->SetFont(FF_FONT1,FS_BOLD); - $this->color = array(0,0,0); - } - - // Stroke the axis - // $pos = Vertical position of axis - // $aAxisAngle = Axis angle - // $grid = Returns an array with positions used to draw the grid - // $lf = Label flag, TRUE if the axis should have labels - function Stroke($pos,$aAxisAngle,&$grid,$title,$lf) { - $this->img->SetColor($this->color); - - // Determine end points for the axis - $x=round($this->scale->world_abs_size*cos($aAxisAngle)+$this->scale->scale_abs[0]); - $y=round($pos-$this->scale->world_abs_size*sin($aAxisAngle)); - - // Draw axis - $this->img->SetColor($this->color); - $this->img->SetLineWeight($this->weight); - if( !$this->hide ) { - $this->img->Line($this->scale->scale_abs[0],$pos,$x,$y); - } - - $this->scale->ticks->Stroke($this->img,$grid,$pos,$aAxisAngle,$this->scale,$majpos,$majlabel); - $ncolor=0; - if( isset($this->ticks_label_colors) ) { - $ncolor=count($this->ticks_label_colors); - } - - // Draw labels - if( $lf && !$this->hide ) { - $this->img->SetFont($this->font_family,$this->font_style,$this->font_size); - $this->img->SetTextAlign('left','top'); - $this->img->SetColor($this->label_color); - - // majpos contains (x,y) coordinates for labels - if( ! $this->hide_labels ) { - $n = floor(count($majpos)/2); - for($i=0; $i < $n; ++$i) { - // Set specific label color if specified - if( $ncolor > 0 ) { - $this->img->SetColor($this->ticks_label_colors[$i % $ncolor]); - } - - if( $this->ticks_label != null && isset($this->ticks_label[$i]) ) { - $this->img->StrokeText($majpos[$i*2],$majpos[$i*2+1],$this->ticks_label[$i]); - } - else { - $this->img->StrokeText($majpos[$i*2],$majpos[$i*2+1],$majlabel[$i]); - } - } - } - } - $this->_StrokeAxisTitle($pos,$aAxisAngle,$title); - } - - function _StrokeAxisTitle($pos,$aAxisAngle,$title) { - $this->title->Set($title); - $marg=6+$this->title->margin; - $xt=round(($this->scale->world_abs_size+$marg)*cos($aAxisAngle)+$this->scale->scale_abs[0]); - $yt=round($pos-($this->scale->world_abs_size+$marg)*sin($aAxisAngle)); - - // Position the axis title. - // dx, dy is the offset from the top left corner of the bounding box that sorrounds the text - // that intersects with the extension of the corresponding axis. The code looks a little - // bit messy but this is really the only way of having a reasonable position of the - // axis titles. - if( $this->title->iWordwrap > 0 ) { - $title = wordwrap($title,$this->title->iWordwrap,"\n"); - } - - $h=$this->img->GetTextHeight($title)*1.2; - $w=$this->img->GetTextWidth($title)*1.2; - - while( $aAxisAngle > 2*M_PI ) - $aAxisAngle -= 2*M_PI; - - // Around 3 a'clock - if( $aAxisAngle>=7*M_PI/4 || $aAxisAngle <= M_PI/4 ) $dx=-0.15; // Small trimming to make the dist to the axis more even - - // Around 12 a'clock - if( $aAxisAngle>=M_PI/4 && $aAxisAngle <= 3*M_PI/4 ) $dx=($aAxisAngle-M_PI/4)*2/M_PI; - - // Around 9 a'clock - if( $aAxisAngle>=3*M_PI/4 && $aAxisAngle <= 5*M_PI/4 ) $dx=1; - - // Around 6 a'clock - if( $aAxisAngle>=5*M_PI/4 && $aAxisAngle <= 7*M_PI/4 ) $dx=(1-($aAxisAngle-M_PI*5/4)*2/M_PI); - - if( $aAxisAngle>=7*M_PI/4 ) $dy=(($aAxisAngle-M_PI)-3*M_PI/4)*2/M_PI; - if( $aAxisAngle<=M_PI/12 ) $dy=(0.5-$aAxisAngle*2/M_PI); - if( $aAxisAngle<=M_PI/4 && $aAxisAngle > M_PI/12) $dy=(1-$aAxisAngle*2/M_PI); - if( $aAxisAngle>=M_PI/4 && $aAxisAngle <= 3*M_PI/4 ) $dy=1; - if( $aAxisAngle>=3*M_PI/4 && $aAxisAngle <= 5*M_PI/4 ) $dy=(1-($aAxisAngle-3*M_PI/4)*2/M_PI); - if( $aAxisAngle>=5*M_PI/4 && $aAxisAngle <= 7*M_PI/4 ) $dy=0; - - if( !$this->hide ) { - $this->title->Stroke($this->img,$xt-$dx*$w,$yt-$dy*$h,$title); - } - } - -} // Class - - -//=================================================== -// CLASS RadarGrid -// Description: Draws grid for the radar graph -//=================================================== -class RadarGrid { //extends Grid { - private $type='solid'; - private $grid_color='#DDDDDD'; - private $show=false, $weight=1; - - function __construct() { - // Empty - } - - function SetColor($aMajColor) { - $this->grid_color = $aMajColor; - } - - function SetWeight($aWeight) { - $this->weight=$aWeight; - } - - // Specify if grid should be dashed, dotted or solid - function SetLineStyle($aType) { - $this->type = $aType; - } - - // Decide if both major and minor grid should be displayed - function Show($aShowMajor=true) { - $this->show=$aShowMajor; - } - - function Stroke($img,$grid) { - if( !$this->show ) { - return; - } - - $nbrticks = count($grid[0])/2; - $nbrpnts = count($grid); - $img->SetColor($this->grid_color); - $img->SetLineWeight($this->weight); - - for($i=0; $i<$nbrticks; ++$i) { - for($j=0; $j<$nbrpnts; ++$j) { - $pnts[$j*2]=$grid[$j][$i*2]; - $pnts[$j*2+1]=$grid[$j][$i*2+1]; - } - for($k=0; $k<$nbrpnts; ++$k ){ - $l=($k+1)%$nbrpnts; - if( $this->type == 'solid' ) - $img->Line($pnts[$k*2],$pnts[$k*2+1],$pnts[$l*2],$pnts[$l*2+1]); - elseif( $this->type == 'dotted' ) - $img->DashedLine($pnts[$k*2],$pnts[$k*2+1],$pnts[$l*2],$pnts[$l*2+1],1,6); - elseif( $this->type == 'dashed' ) - $img->DashedLine($pnts[$k*2],$pnts[$k*2+1],$pnts[$l*2],$pnts[$l*2+1],2,4); - elseif( $this->type == 'longdashed' ) - $img->DashedLine($pnts[$k*2],$pnts[$k*2+1],$pnts[$l*2],$pnts[$l*2+1],8,6); - } - $pnts=array(); - } - } -} // Class - - -//=================================================== -// CLASS RadarPlot -// Description: Plot a radarplot -//=================================================== -class RadarPlot { - public $mark=null; - public $legend=''; - public $legendcsimtarget=''; - public $legendcsimalt=''; - public $csimtargets=array(); // Array of targets for CSIM - public $csimareas=""; // Resultant CSIM area tags - public $csimalts=null; // ALT:s for corresponding target - private $data=array(); - private $fill=false, $fill_color=array(200,170,180); - private $color=array(0,0,0); - private $weight=1; - private $linestyle='solid'; - - //--------------- - // CONSTRUCTOR - function __construct($data) { - $this->data = $data; - $this->mark = new PlotMark(); - } - - function Min() { - return Min($this->data); - } - - function Max() { - return Max($this->data); - } - - function SetLegend($legend) { - $this->legend=$legend; - } - - function SetLineStyle($aStyle) { - $this->linestyle=$aStyle; - } - - function SetLineWeight($w) { - $this->weight=$w; - } - - function SetFillColor($aColor) { - $this->fill_color = $aColor; - $this->fill = true; - } - - function SetFill($f=true) { - $this->fill = $f; - } - - function SetColor($aColor,$aFillColor=false) { - $this->color = $aColor; - if( $aFillColor ) { - $this->SetFillColor($aFillColor); - $this->fill = true; - } - } - - // Set href targets for CSIM - function SetCSIMTargets($aTargets,$aAlts=null) { - $this->csimtargets=$aTargets; - $this->csimalts=$aAlts; - } - - // Get all created areas - function GetCSIMareas() { - return $this->csimareas; - } - - function Stroke($img, $pos, $scale, $startangle) { - $nbrpnts = count($this->data); - $astep=2*M_PI/$nbrpnts; - $a=$startangle; - - for($i=0; $i<$nbrpnts; ++$i) { - - // Rotate each non null point to the correct axis-angle - $cs=$scale->RelTranslate($this->data[$i]); - $x=round($cs*cos($a)+$scale->scale_abs[0]); - $y=round($pos-$cs*sin($a)); - - $pnts[$i*2]=$x; - $pnts[$i*2+1]=$y; - - // If the next point is null then we draw this polygon segment - // to the center, skip the next and draw the next segment from - // the center up to the point on the axis with the first non-null - // value and continues from that point. Some additoinal logic is necessary - // to handle the boundary conditions - if( $i < $nbrpnts-1 ) { - if( is_null($this->data[$i+1]) ) { - $cs = 0; - $x=round($cs*cos($a)+$scale->scale_abs[0]); - $y=round($pos-$cs*sin($a)); - $pnts[$i*2]=$x; - $pnts[$i*2+1]=$y; - $a += $astep; - } - } - - $a += $astep; - } - - if( $this->fill ) { - $img->SetColor($this->fill_color); - $img->FilledPolygon($pnts); - } - - $img->SetLineWeight($this->weight); - $img->SetColor($this->color); - $img->SetLineStyle($this->linestyle); - $pnts[] = $pnts[0]; - $pnts[] = $pnts[1]; - $img->Polygon($pnts); - $img->SetLineStyle('solid'); // Reset line style to default - - // Add plotmarks on top - if( $this->mark->show ) { - for($i=0; $i < $nbrpnts; ++$i) { - if( isset($this->csimtargets[$i]) ) { - $this->mark->SetCSIMTarget($this->csimtargets[$i]); - $this->mark->SetCSIMAlt($this->csimalts[$i]); - $this->mark->SetCSIMAltVal($pnts[$i*2], $pnts[$i*2+1]); - $this->mark->Stroke($img, $pnts[$i*2], $pnts[$i*2+1]); - $this->csimareas .= $this->mark->GetCSIMAreas(); - } - else { - $this->mark->Stroke($img,$pnts[$i*2],$pnts[$i*2+1]); - } - } - } - - } - - function GetCount() { - return count($this->data); - } - - function Legend($graph) { - if( $this->legend == '' ) { - return; - } - if( $this->fill ) { - $graph->legend->Add($this->legend,$this->fill_color,$this->mark); - } else { - $graph->legend->Add($this->legend,$this->color,$this->mark); - } - } - -} // Class - -//=================================================== -// CLASS RadarGraph -// Description: Main container for a radar graph -//=================================================== -class RadarGraph extends Graph { - public $grid,$axis=null; - private $posx,$posy; - private $len; - private $axis_title=null; - - function __construct($width=300,$height=200,$cachedName="",$timeout=0,$inline=1) { - parent::__construct($width,$height,$cachedName,$timeout,$inline); - $this->posx = $width/2; - $this->posy = $height/2; - $this->len = min($width,$height)*0.35; - $this->SetColor(array(255,255,255)); - $this->SetTickDensity(TICKD_NORMAL); - $this->SetScale('lin'); - $this->SetGridDepth(DEPTH_FRONT); - } - - function HideTickMarks($aFlag=true) { - $this->axis->scale->ticks->SupressTickMarks($aFlag); - } - - function ShowMinorTickmarks($aFlag=true) { - $this->yscale->ticks->SupressMinorTickMarks(!$aFlag); - } - - function SetScale($axtype,$ymin=1,$ymax=1,$dummy1=null,$dumy2=null) { - if( $axtype != 'lin' && $axtype != 'log' ) { - JpGraphError::RaiseL(18003,$axtype); - //("Illegal scale for radarplot ($axtype). Must be \"lin\" or \"log\""); - } - if( $axtype == 'lin' ) { - $this->yscale = new LinearScale($ymin,$ymax); - $this->yscale->ticks = new RadarLinearTicks(); - $this->yscale->ticks->SupressMinorTickMarks(); - } - elseif( $axtype == 'log' ) { - $this->yscale = new LogScale($ymin,$ymax); - $this->yscale->ticks = new RadarLogTicks(); - } - - $this->axis = new RadarAxis($this->img,$this->yscale); - $this->grid = new RadarGrid(); - } - - function SetSize($aSize) { - if( $aSize < 0.1 || $aSize>1 ) { - JpGraphError::RaiseL(18004,$aSize); - //("Radar Plot size must be between 0.1 and 1. (Your value=$s)"); - } - $this->len=min($this->img->width,$this->img->height)*$aSize/2; - } - - function SetPlotSize($aSize) { - $this->SetSize($aSize); - } - - function SetTickDensity($densy=TICKD_NORMAL,$dummy1=null) { - $this->ytick_factor=25; - switch( $densy ) { - case TICKD_DENSE: - $this->ytick_factor=12; - break; - case TICKD_NORMAL: - $this->ytick_factor=25; - break; - case TICKD_SPARSE: - $this->ytick_factor=40; - break; - case TICKD_VERYSPARSE: - $this->ytick_factor=70; - break; - default: - JpGraphError::RaiseL(18005,$densy); - //("RadarPlot Unsupported Tick density: $densy"); - } - } - - function SetPos($px,$py=0.5) { - $this->SetCenter($px,$py); - } - - function SetCenter($px,$py=0.5) { - if( $px >= 0 && $px <= 1 ) { - $this->posx = $this->img->width*$px; - } - else { - $this->posx = $px; - } - if( $py >= 0 && $py <= 1 ) { - $this->posy = $this->img->height*$py; - } - else { - $this->posy = $py; - } - } - - function SetColor($aColor) { - $this->SetMarginColor($aColor); - } - - function SetTitles($aTitleArray) { - $this->axis_title = $aTitleArray; - } - - function Add($aPlot) { - if( $aPlot == null ) { - JpGraphError::RaiseL(25010);//("Graph::Add() You tried to add a null plot to the graph."); - } - if( is_array($aPlot) && count($aPlot) > 0 ) { - $cl = $aPlot[0]; - } - else { - $cl = $aPlot; - } - - if( $cl instanceof Text ) $this->AddText($aPlot); - elseif( class_exists('IconPlot',false) && ($cl instanceof IconPlot) ) $this->AddIcon($aPlot); - else { - $this->plots[] = $aPlot; - } - } - - function GetPlotsYMinMax($aPlots) { - $min=$aPlots[0]->Min(); - $max=$aPlots[0]->Max(); - foreach( $this->plots as $p ) { - $max=max($max,$p->Max()); - $min=min($min,$p->Min()); - } - if( $min < 0 ) { - JpGraphError::RaiseL(18006,$min); - //("Minimum data $min (Radar plots should only be used when all data points > 0)"); - } - return array($min,$max); - } - - function StrokeIcons() { - if( $this->iIcons != null ) { - $n = count($this->iIcons); - for( $i=0; $i < $n; ++$i ) { - $this->iIcons[$i]->Stroke($this->img); - } - } - } - - function StrokeTexts() { - if( $this->texts != null ) { - $n = count($this->texts); - for( $i=0; $i < $n; ++$i ) { - $this->texts[$i]->Stroke($this->img); - } - } - } - - // Stroke the Radar graph - function Stroke($aStrokeFileName='') { - - // If the filename is the predefined value = '_csim_special_' - // we assume that the call to stroke only needs to do enough - // to correctly generate the CSIM maps. - // We use this variable to skip things we don't strictly need - // to do to generate the image map to improve performance - // a best we can. Therefor you will see a lot of tests !$_csim in the - // code below. - $_csim = ( $aStrokeFileName === _CSIM_SPECIALFILE ); - - // We need to know if we have stroked the plot in the - // GetCSIMareas. Otherwise the CSIM hasn't been generated - // and in the case of GetCSIM called before stroke to generate - // CSIM without storing an image to disk GetCSIM must call Stroke. - $this->iHasStroked = true; - - $n = count($this->plots); - // Set Y-scale - - if( !$this->yscale->IsSpecified() && count($this->plots) > 0 ) { - list($min,$max) = $this->GetPlotsYMinMax($this->plots); - $this->yscale->AutoScale($this->img,0,$max,$this->len/$this->ytick_factor); - } - elseif( $this->yscale->IsSpecified() && - ( $this->yscale->auto_ticks || !$this->yscale->ticks->IsSpecified()) ) { - - // The tick calculation will use the user suplied min/max values to determine - // the ticks. If auto_ticks is false the exact user specifed min and max - // values will be used for the scale. - // If auto_ticks is true then the scale might be slightly adjusted - // so that the min and max values falls on an even major step. - $min = $this->yscale->scale[0]; - $max = $this->yscale->scale[1]; - $this->yscale->AutoScale($this->img,$min,$max, - $this->len/$this->ytick_factor, - $this->yscale->auto_ticks); - } - - // Set start position end length of scale (in absolute pixels) - $this->yscale->SetConstants($this->posx,$this->len); - - // We need as many axis as there are data points - $nbrpnts=$this->plots[0]->GetCount(); - - // If we have no titles just number the axis 1,2,3,... - if( $this->axis_title==null ) { - for($i=0; $i < $nbrpnts; ++$i ) { - $this->axis_title[$i] = $i+1; - } - } - elseif( count($this->axis_title) < $nbrpnts) { - JpGraphError::RaiseL(18007); - // ("Number of titles does not match number of points in plot."); - } - for( $i=0; $i < $n; ++$i ) { - if( $nbrpnts != $this->plots[$i]->GetCount() ) { - JpGraphError::RaiseL(18008); - //("Each radar plot must have the same number of data points."); - } - } - - if( !$_csim ) { - if( $this->background_image != '' ) { - $this->StrokeFrameBackground(); - } - else { - $this->StrokeFrame(); - $this->StrokeBackgroundGrad(); - } - } - $astep=2*M_PI/$nbrpnts; - - if( !$_csim ) { - if( $this->iIconDepth == DEPTH_BACK ) { - $this->StrokeIcons(); - } - - - // Prepare legends - for($i=0; $i < $n; ++$i) { - $this->plots[$i]->Legend($this); - } - $this->legend->Stroke($this->img); - $this->footer->Stroke($this->img); - } - - if( !$_csim ) { - if( $this->grid_depth == DEPTH_BACK ) { - // Draw axis and grid - for( $i=0,$a=M_PI/2; $i < $nbrpnts; ++$i, $a += $astep ) { - $this->axis->Stroke($this->posy,$a,$grid[$i],$this->axis_title[$i],$i==0); - } - $this->grid->Stroke($this->img,$grid); - } - if( $this->iIconDepth == DEPTH_BACK ) { - $this->StrokeIcons(); - } - - } - - // Plot points - $a=M_PI/2; - for($i=0; $i < $n; ++$i ) { - $this->plots[$i]->Stroke($this->img, $this->posy, $this->yscale, $a); - } - - if( !$_csim ) { - if( $this->grid_depth != DEPTH_BACK ) { - // Draw axis and grid - for( $i=0,$a=M_PI/2; $i < $nbrpnts; ++$i, $a += $astep ) { - $this->axis->Stroke($this->posy,$a,$grid[$i],$this->axis_title[$i],$i==0); - } - $this->grid->Stroke($this->img,$grid); - } - - $this->StrokeTitles(); - $this->StrokeTexts(); - if( $this->iIconDepth == DEPTH_FRONT ) { - $this->StrokeIcons(); - } - } - - // Should we do any final image transformation - if( $this->iImgTrans && !$_csim ) { - if( !class_exists('ImgTrans',false) ) { - require_once('jpgraph_imgtrans.php'); - } - - $tform = new ImgTrans($this->img->img); - $this->img->img = $tform->Skew3D($this->iImgTransHorizon,$this->iImgTransSkewDist, - $this->iImgTransDirection,$this->iImgTransHighQ, - $this->iImgTransMinSize,$this->iImgTransFillColor, - $this->iImgTransBorder); - } - - if( !$_csim ) { - // If the filename is given as the special "__handle" - // then the image handler is returned and the image is NOT - // streamed back - if( $aStrokeFileName == _IMG_HANDLER ) { - return $this->img->img; - } - else { - // Finally stream the generated picture - $this->cache->PutAndStream($this->img,$this->cache_name,$this->inline,$aStrokeFileName); - } - } - } -} // Class - -/* EOF */ -?> diff --git a/html/lib/jpgraph/jpgraph_regstat.php b/html/lib/jpgraph/jpgraph_regstat.php deleted file mode 100644 index 933123947f..0000000000 --- a/html/lib/jpgraph/jpgraph_regstat.php +++ /dev/null @@ -1,239 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -/*======================================================================= - // File: JPGRAPH_REGSTAT.PHP - // Description: Regression and statistical analysis helper classes - // Created: 2002-12-01 - // Ver: $Id: jpgraph_regstat.php 1131 2009-03-11 20:08:24Z ljp $ - // - // Copyright (c) Aditus Consulting. All rights reserved. - //======================================================================== - */ - -//------------------------------------------------------------------------ -// CLASS Spline -// Create a new data array from an existing data array but with more points. -// The new points are interpolated using a cubic spline algorithm -//------------------------------------------------------------------------ -class Spline { - // 3:rd degree polynom approximation - - private $xdata,$ydata; // Data vectors - private $y2; // 2:nd derivate of ydata - private $n=0; - - function __construct($xdata,$ydata) { - $this->y2 = array(); - $this->xdata = $xdata; - $this->ydata = $ydata; - - $n = count($ydata); - $this->n = $n; - if( $this->n !== count($xdata) ) { - JpGraphError::RaiseL(19001); - //('Spline: Number of X and Y coordinates must be the same'); - } - - // Natural spline 2:derivate == 0 at endpoints - $this->y2[0] = 0.0; - $this->y2[$n-1] = 0.0; - $delta[0] = 0.0; - - // Calculate 2:nd derivate - for($i=1; $i < $n-1; ++$i) { - $d = ($xdata[$i+1]-$xdata[$i-1]); - if( $d == 0 ) { - JpGraphError::RaiseL(19002); - //('Invalid input data for spline. Two or more consecutive input X-values are equal. Each input X-value must differ since from a mathematical point of view it must be a one-to-one mapping, i.e. each X-value must correspond to exactly one Y-value.'); - } - $s = ($xdata[$i]-$xdata[$i-1])/$d; - $p = $s*$this->y2[$i-1]+2.0; - $this->y2[$i] = ($s-1.0)/$p; - $delta[$i] = ($ydata[$i+1]-$ydata[$i])/($xdata[$i+1]-$xdata[$i]) - - ($ydata[$i]-$ydata[$i-1])/($xdata[$i]-$xdata[$i-1]); - $delta[$i] = (6.0*$delta[$i]/($xdata[$i+1]-$xdata[$i-1])-$s*$delta[$i-1])/$p; - } - - // Backward substitution - for( $j=$n-2; $j >= 0; --$j ) { - $this->y2[$j] = $this->y2[$j]*$this->y2[$j+1] + $delta[$j]; - } - } - - // Return the two new data vectors - function Get($num=50) { - $n = $this->n ; - $step = ($this->xdata[$n-1]-$this->xdata[0]) / ($num-1); - $xnew=array(); - $ynew=array(); - $xnew[0] = $this->xdata[0]; - $ynew[0] = $this->ydata[0]; - for( $j=1; $j < $num; ++$j ) { - $xnew[$j] = $xnew[0]+$j*$step; - $ynew[$j] = $this->Interpolate($xnew[$j]); - } - return array($xnew,$ynew); - } - - // Return a single interpolated Y-value from an x value - function Interpolate($xpoint) { - - $max = $this->n-1; - $min = 0; - - // Binary search to find interval - while( $max-$min > 1 ) { - $k = ($max+$min) / 2; - if( $this->xdata[$k] > $xpoint ) - $max=$k; - else - $min=$k; - } - - // Each interval is interpolated by a 3:degree polynom function - $h = $this->xdata[$max]-$this->xdata[$min]; - - if( $h == 0 ) { - JpGraphError::RaiseL(19002); - //('Invalid input data for spline. Two or more consecutive input X-values are equal. Each input X-value must differ since from a mathematical point of view it must be a one-to-one mapping, i.e. each X-value must correspond to exactly one Y-value.'); - } - - - $a = ($this->xdata[$max]-$xpoint)/$h; - $b = ($xpoint-$this->xdata[$min])/$h; - return $a*$this->ydata[$min]+$b*$this->ydata[$max]+ - (($a*$a*$a-$a)*$this->y2[$min]+($b*$b*$b-$b)*$this->y2[$max])*($h*$h)/6.0; - } -} - -//------------------------------------------------------------------------ -// CLASS Bezier -// Create a new data array from a number of control points -//------------------------------------------------------------------------ -class Bezier { - /** - * @author Thomas Despoix, openXtrem company - * @license released under QPL - * @abstract Bezier interoplated point generation, - * computed from control points data sets, based on Paul Bourke algorithm : - * http://local.wasp.uwa.edu.au/~pbourke/geometry/bezier/index2.html - */ - private $datax = array(); - private $datay = array(); - private $n=0; - - function __construct($datax, $datay, $attraction_factor = 1) { - // Adding control point multiple time will raise their attraction power over the curve - $this->n = count($datax); - if( $this->n !== count($datay) ) { - JpGraphError::RaiseL(19003); - //('Bezier: Number of X and Y coordinates must be the same'); - } - $idx=0; - foreach($datax as $datumx) { - for ($i = 0; $i < $attraction_factor; $i++) { - $this->datax[$idx++] = $datumx; - } - } - $idx=0; - foreach($datay as $datumy) { - for ($i = 0; $i < $attraction_factor; $i++) { - $this->datay[$idx++] = $datumy; - } - } - $this->n *= $attraction_factor; - } - - /** - * Return a set of data points that specifies the bezier curve with $steps points - * @param $steps Number of new points to return - * @return array($datax, $datay) - */ - function Get($steps) { - $datax = array(); - $datay = array(); - for ($i = 0; $i < $steps; $i++) { - list($datumx, $datumy) = $this->GetPoint((double) $i / (double) $steps); - $datax[$i] = $datumx; - $datay[$i] = $datumy; - } - - $datax[] = end($this->datax); - $datay[] = end($this->datay); - - return array($datax, $datay); - } - - /** - * Return one point on the bezier curve. $mu is the position on the curve where $mu is in the - * range 0 $mu < 1 where 0 is tha start point and 1 is the end point. Note that every newly computed - * point depends on all the existing points - * - * @param $mu Position on the bezier curve - * @return array($x, $y) - */ - function GetPoint($mu) { - $n = $this->n - 1; - $k = 0; - $kn = 0; - $nn = 0; - $nkn = 0; - $blend = 0.0; - $newx = 0.0; - $newy = 0.0; - - $muk = 1.0; - $munk = (double) pow(1-$mu,(double) $n); - - for ($k = 0; $k <= $n; $k++) { - $nn = $n; - $kn = $k; - $nkn = $n - $k; - $blend = $muk * $munk; - $muk *= $mu; - $munk /= (1-$mu); - while ($nn >= 1) { - $blend *= $nn; - $nn--; - if ($kn > 1) { - $blend /= (double) $kn; - $kn--; - } - if ($nkn > 1) { - $blend /= (double) $nkn; - $nkn--; - } - } - $newx += $this->datax[$k] * $blend; - $newy += $this->datay[$k] * $blend; - } - - return array($newx, $newy); - } -} - -// EOF -?> diff --git a/html/lib/jpgraph/jpgraph_rgb.inc.php b/html/lib/jpgraph/jpgraph_rgb.inc.php deleted file mode 100644 index 974e0a300e..0000000000 --- a/html/lib/jpgraph/jpgraph_rgb.inc.php +++ /dev/null @@ -1,639 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -//======================================================================= -// File: JPGRAPH_RGB.INC.PHP -// Description: Class to handle RGb color space specification and -// named colors -// Created: 2001-01-08 (Refactored to separate file 2008-08-01) -// Ver: $Id: jpgraph_rgb.inc.php 1893 2009-10-02 23:15:25Z ljp $ -// -// Copyright (c) Aditus Consulting. All rights reserved. -//======================================================================== - - -/*=================================================== -// CLASS RGB -// Description: Color definitions as RGB triples -//=================================================== -*/ - -class RGB { - public $rgb_table; - public $img; - - function __construct($aImg=null) { - $this->img = $aImg; - - // Conversion array between color names and RGB - $this->rgb_table = array( - 'aqua'=> array(0,255,255), - 'lime'=> array(0,255,0), - 'teal'=> array(0,128,128), - 'whitesmoke'=>array(245,245,245), - 'gainsboro'=>array(220,220,220), - 'oldlace'=>array(253,245,230), - 'linen'=>array(250,240,230), - 'antiquewhite'=>array(250,235,215), - 'papayawhip'=>array(255,239,213), - 'blanchedalmond'=>array(255,235,205), - 'bisque'=>array(255,228,196), - 'peachpuff'=>array(255,218,185), - 'navajowhite'=>array(255,222,173), - 'moccasin'=>array(255,228,181), - 'cornsilk'=>array(255,248,220), - 'ivory'=>array(255,255,240), - 'lemonchiffon'=>array(255,250,205), - 'seashell'=>array(255,245,238), - 'mintcream'=>array(245,255,250), - 'azure'=>array(240,255,255), - 'aliceblue'=>array(240,248,255), - 'lavender'=>array(230,230,250), - 'lavenderblush'=>array(255,240,245), - 'mistyrose'=>array(255,228,225), - 'white'=>array(255,255,255), - 'black'=>array(0,0,0), - 'darkslategray'=>array(47,79,79), - 'dimgray'=>array(105,105,105), - 'slategray'=>array(112,128,144), - 'lightslategray'=>array(119,136,153), - 'gray'=>array(190,190,190), - 'lightgray'=>array(211,211,211), - 'midnightblue'=>array(25,25,112), - 'navy'=>array(0,0,128), - 'indigo'=>array(75,0,130), - 'electricindigo'=>array(102,0,255), - 'deepindigo'=>array(138,43,226), - 'pigmentindigo'=>array(75,0,130), - 'indigodye'=>array(0,65,106), - 'cornflowerblue'=>array(100,149,237), - 'darkslateblue'=>array(72,61,139), - 'slateblue'=>array(106,90,205), - 'mediumslateblue'=>array(123,104,238), - 'lightslateblue'=>array(132,112,255), - 'mediumblue'=>array(0,0,205), - 'royalblue'=>array(65,105,225), - 'blue'=>array(0,0,255), - 'dodgerblue'=>array(30,144,255), - 'deepskyblue'=>array(0,191,255), - 'skyblue'=>array(135,206,235), - 'lightskyblue'=>array(135,206,250), - 'steelblue'=>array(70,130,180), - 'lightred'=>array(211,167,168), - 'lightsteelblue'=>array(176,196,222), - 'lightblue'=>array(173,216,230), - 'powderblue'=>array(176,224,230), - 'paleturquoise'=>array(175,238,238), - 'darkturquoise'=>array(0,206,209), - 'mediumturquoise'=>array(72,209,204), - 'turquoise'=>array(64,224,208), - 'cyan'=>array(0,255,255), - 'lightcyan'=>array(224,255,255), - 'cadetblue'=>array(95,158,160), - 'mediumaquamarine'=>array(102,205,170), - 'aquamarine'=>array(127,255,212), - 'darkgreen'=>array(0,100,0), - 'darkolivegreen'=>array(85,107,47), - 'darkseagreen'=>array(143,188,143), - 'seagreen'=>array(46,139,87), - 'mediumseagreen'=>array(60,179,113), - 'lightseagreen'=>array(32,178,170), - 'palegreen'=>array(152,251,152), - 'springgreen'=>array(0,255,127), - 'lawngreen'=>array(124,252,0), - 'green'=>array(0,255,0), - 'chartreuse'=>array(127,255,0), - 'mediumspringgreen'=>array(0,250,154), - 'greenyellow'=>array(173,255,47), - 'limegreen'=>array(50,205,50), - 'yellowgreen'=>array(154,205,50), - 'forestgreen'=>array(34,139,34), - 'olivedrab'=>array(107,142,35), - 'darkkhaki'=>array(189,183,107), - 'khaki'=>array(240,230,140), - 'palegoldenrod'=>array(238,232,170), - 'lightgoldenrodyellow'=>array(250,250,210), - 'lightyellow'=>array(255,255,200), - 'yellow'=>array(255,255,0), - 'gold'=>array(255,215,0), - 'lightgoldenrod'=>array(238,221,130), - 'goldenrod'=>array(218,165,32), - 'darkgoldenrod'=>array(184,134,11), - 'rosybrown'=>array(188,143,143), - 'indianred'=>array(205,92,92), - 'saddlebrown'=>array(139,69,19), - 'sienna'=>array(160,82,45), - 'peru'=>array(205,133,63), - 'burlywood'=>array(222,184,135), - 'beige'=>array(245,245,220), - 'wheat'=>array(245,222,179), - 'sandybrown'=>array(244,164,96), - 'tan'=>array(210,180,140), - 'chocolate'=>array(210,105,30), - 'firebrick'=>array(178,34,34), - 'brown'=>array(165,42,42), - 'darksalmon'=>array(233,150,122), - 'salmon'=>array(250,128,114), - 'lightsalmon'=>array(255,160,122), - 'orange'=>array(255,165,0), - 'darkorange'=>array(255,140,0), - 'coral'=>array(255,127,80), - 'lightcoral'=>array(240,128,128), - 'tomato'=>array(255,99,71), - 'orangered'=>array(255,69,0), - 'red'=>array(255,0,0), - 'hotpink'=>array(255,105,180), - 'deeppink'=>array(255,20,147), - 'pink'=>array(255,192,203), - 'lightpink'=>array(255,182,193), - 'palevioletred'=>array(219,112,147), - 'maroon'=>array(176,48,96), - 'mediumvioletred'=>array(199,21,133), - 'violetred'=>array(208,32,144), - 'magenta'=>array(255,0,255), - 'violet'=>array(238,130,238), - 'plum'=>array(221,160,221), - 'orchid'=>array(218,112,214), - 'mediumorchid'=>array(186,85,211), - 'darkorchid'=>array(153,50,204), - 'darkviolet'=>array(148,0,211), - 'blueviolet'=>array(138,43,226), - 'purple'=>array(160,32,240), - 'mediumpurple'=>array(147,112,219), - 'thistle'=>array(216,191,216), - 'snow1'=>array(255,250,250), - 'snow2'=>array(238,233,233), - 'snow3'=>array(205,201,201), - 'snow4'=>array(139,137,137), - 'seashell1'=>array(255,245,238), - 'seashell2'=>array(238,229,222), - 'seashell3'=>array(205,197,191), - 'seashell4'=>array(139,134,130), - 'AntiqueWhite1'=>array(255,239,219), - 'AntiqueWhite2'=>array(238,223,204), - 'AntiqueWhite3'=>array(205,192,176), - 'AntiqueWhite4'=>array(139,131,120), - 'bisque1'=>array(255,228,196), - 'bisque2'=>array(238,213,183), - 'bisque3'=>array(205,183,158), - 'bisque4'=>array(139,125,107), - 'peachPuff1'=>array(255,218,185), - 'peachpuff2'=>array(238,203,173), - 'peachpuff3'=>array(205,175,149), - 'peachpuff4'=>array(139,119,101), - 'navajowhite1'=>array(255,222,173), - 'navajowhite2'=>array(238,207,161), - 'navajowhite3'=>array(205,179,139), - 'navajowhite4'=>array(139,121,94), - 'lemonchiffon1'=>array(255,250,205), - 'lemonchiffon2'=>array(238,233,191), - 'lemonchiffon3'=>array(205,201,165), - 'lemonchiffon4'=>array(139,137,112), - 'ivory1'=>array(255,255,240), - 'ivory2'=>array(238,238,224), - 'ivory3'=>array(205,205,193), - 'ivory4'=>array(139,139,131), - 'honeydew'=>array(193,205,193), - 'lavenderblush1'=>array(255,240,245), - 'lavenderblush2'=>array(238,224,229), - 'lavenderblush3'=>array(205,193,197), - 'lavenderblush4'=>array(139,131,134), - 'mistyrose1'=>array(255,228,225), - 'mistyrose2'=>array(238,213,210), - 'mistyrose3'=>array(205,183,181), - 'mistyrose4'=>array(139,125,123), - 'azure1'=>array(240,255,255), - 'azure2'=>array(224,238,238), - 'azure3'=>array(193,205,205), - 'azure4'=>array(131,139,139), - 'slateblue1'=>array(131,111,255), - 'slateblue2'=>array(122,103,238), - 'slateblue3'=>array(105,89,205), - 'slateblue4'=>array(71,60,139), - 'royalblue1'=>array(72,118,255), - 'royalblue2'=>array(67,110,238), - 'royalblue3'=>array(58,95,205), - 'royalblue4'=>array(39,64,139), - 'dodgerblue1'=>array(30,144,255), - 'dodgerblue2'=>array(28,134,238), - 'dodgerblue3'=>array(24,116,205), - 'dodgerblue4'=>array(16,78,139), - 'steelblue1'=>array(99,184,255), - 'steelblue2'=>array(92,172,238), - 'steelblue3'=>array(79,148,205), - 'steelblue4'=>array(54,100,139), - 'deepskyblue1'=>array(0,191,255), - 'deepskyblue2'=>array(0,178,238), - 'deepskyblue3'=>array(0,154,205), - 'deepskyblue4'=>array(0,104,139), - 'skyblue1'=>array(135,206,255), - 'skyblue2'=>array(126,192,238), - 'skyblue3'=>array(108,166,205), - 'skyblue4'=>array(74,112,139), - 'lightskyblue1'=>array(176,226,255), - 'lightskyblue2'=>array(164,211,238), - 'lightskyblue3'=>array(141,182,205), - 'lightskyblue4'=>array(96,123,139), - 'slategray1'=>array(198,226,255), - 'slategray2'=>array(185,211,238), - 'slategray3'=>array(159,182,205), - 'slategray4'=>array(108,123,139), - 'lightsteelblue1'=>array(202,225,255), - 'lightsteelblue2'=>array(188,210,238), - 'lightsteelblue3'=>array(162,181,205), - 'lightsteelblue4'=>array(110,123,139), - 'lightblue1'=>array(191,239,255), - 'lightblue2'=>array(178,223,238), - 'lightblue3'=>array(154,192,205), - 'lightblue4'=>array(104,131,139), - 'lightcyan1'=>array(224,255,255), - 'lightcyan2'=>array(209,238,238), - 'lightcyan3'=>array(180,205,205), - 'lightcyan4'=>array(122,139,139), - 'paleturquoise1'=>array(187,255,255), - 'paleturquoise2'=>array(174,238,238), - 'paleturquoise3'=>array(150,205,205), - 'paleturquoise4'=>array(102,139,139), - 'cadetblue1'=>array(152,245,255), - 'cadetblue2'=>array(142,229,238), - 'cadetblue3'=>array(122,197,205), - 'cadetblue4'=>array(83,134,139), - 'turquoise1'=>array(0,245,255), - 'turquoise2'=>array(0,229,238), - 'turquoise3'=>array(0,197,205), - 'turquoise4'=>array(0,134,139), - 'cyan1'=>array(0,255,255), - 'cyan2'=>array(0,238,238), - 'cyan3'=>array(0,205,205), - 'cyan4'=>array(0,139,139), - 'darkslategray1'=>array(151,255,255), - 'darkslategray2'=>array(141,238,238), - 'darkslategray3'=>array(121,205,205), - 'darkslategray4'=>array(82,139,139), - 'aquamarine1'=>array(127,255,212), - 'aquamarine2'=>array(118,238,198), - 'aquamarine3'=>array(102,205,170), - 'aquamarine4'=>array(69,139,116), - 'darkseagreen1'=>array(193,255,193), - 'darkseagreen2'=>array(180,238,180), - 'darkseagreen3'=>array(155,205,155), - 'darkseagreen4'=>array(105,139,105), - 'seagreen1'=>array(84,255,159), - 'seagreen2'=>array(78,238,148), - 'seagreen3'=>array(67,205,128), - 'seagreen4'=>array(46,139,87), - 'palegreen1'=>array(154,255,154), - 'palegreen2'=>array(144,238,144), - 'palegreen3'=>array(124,205,124), - 'palegreen4'=>array(84,139,84), - 'springgreen1'=>array(0,255,127), - 'springgreen2'=>array(0,238,118), - 'springgreen3'=>array(0,205,102), - 'springgreen4'=>array(0,139,69), - 'chartreuse1'=>array(127,255,0), - 'chartreuse2'=>array(118,238,0), - 'chartreuse3'=>array(102,205,0), - 'chartreuse4'=>array(69,139,0), - 'olivedrab1'=>array(192,255,62), - 'olivedrab2'=>array(179,238,58), - 'olivedrab3'=>array(154,205,50), - 'olivedrab4'=>array(105,139,34), - 'darkolivegreen1'=>array(202,255,112), - 'darkolivegreen2'=>array(188,238,104), - 'darkolivegreen3'=>array(162,205,90), - 'darkolivegreen4'=>array(110,139,61), - 'khaki1'=>array(255,246,143), - 'khaki2'=>array(238,230,133), - 'khaki3'=>array(205,198,115), - 'khaki4'=>array(139,134,78), - 'lightgoldenrod1'=>array(255,236,139), - 'lightgoldenrod2'=>array(238,220,130), - 'lightgoldenrod3'=>array(205,190,112), - 'lightgoldenrod4'=>array(139,129,76), - 'yellow1'=>array(255,255,0), - 'yellow2'=>array(238,238,0), - 'yellow3'=>array(205,205,0), - 'yellow4'=>array(139,139,0), - 'gold1'=>array(255,215,0), - 'gold2'=>array(238,201,0), - 'gold3'=>array(205,173,0), - 'gold4'=>array(139,117,0), - 'goldenrod1'=>array(255,193,37), - 'goldenrod2'=>array(238,180,34), - 'goldenrod3'=>array(205,155,29), - 'goldenrod4'=>array(139,105,20), - 'darkgoldenrod1'=>array(255,185,15), - 'darkgoldenrod2'=>array(238,173,14), - 'darkgoldenrod3'=>array(205,149,12), - 'darkgoldenrod4'=>array(139,101,8), - 'rosybrown1'=>array(255,193,193), - 'rosybrown2'=>array(238,180,180), - 'rosybrown3'=>array(205,155,155), - 'rosybrown4'=>array(139,105,105), - 'indianred1'=>array(255,106,106), - 'indianred2'=>array(238,99,99), - 'indianred3'=>array(205,85,85), - 'indianred4'=>array(139,58,58), - 'sienna1'=>array(255,130,71), - 'sienna2'=>array(238,121,66), - 'sienna3'=>array(205,104,57), - 'sienna4'=>array(139,71,38), - 'burlywood1'=>array(255,211,155), - 'burlywood2'=>array(238,197,145), - 'burlywood3'=>array(205,170,125), - 'burlywood4'=>array(139,115,85), - 'wheat1'=>array(255,231,186), - 'wheat2'=>array(238,216,174), - 'wheat3'=>array(205,186,150), - 'wheat4'=>array(139,126,102), - 'tan1'=>array(255,165,79), - 'tan2'=>array(238,154,73), - 'tan3'=>array(205,133,63), - 'tan4'=>array(139,90,43), - 'chocolate1'=>array(255,127,36), - 'chocolate2'=>array(238,118,33), - 'chocolate3'=>array(205,102,29), - 'chocolate4'=>array(139,69,19), - 'firebrick1'=>array(255,48,48), - 'firebrick2'=>array(238,44,44), - 'firebrick3'=>array(205,38,38), - 'firebrick4'=>array(139,26,26), - 'brown1'=>array(255,64,64), - 'brown2'=>array(238,59,59), - 'brown3'=>array(205,51,51), - 'brown4'=>array(139,35,35), - 'salmon1'=>array(255,140,105), - 'salmon2'=>array(238,130,98), - 'salmon3'=>array(205,112,84), - 'salmon4'=>array(139,76,57), - 'lightsalmon1'=>array(255,160,122), - 'lightsalmon2'=>array(238,149,114), - 'lightsalmon3'=>array(205,129,98), - 'lightsalmon4'=>array(139,87,66), - 'orange1'=>array(255,165,0), - 'orange2'=>array(238,154,0), - 'orange3'=>array(205,133,0), - 'orange4'=>array(139,90,0), - 'darkorange1'=>array(255,127,0), - 'darkorange2'=>array(238,118,0), - 'darkorange3'=>array(205,102,0), - 'darkorange4'=>array(139,69,0), - 'coral1'=>array(255,114,86), - 'coral2'=>array(238,106,80), - 'coral3'=>array(205,91,69), - 'coral4'=>array(139,62,47), - 'tomato1'=>array(255,99,71), - 'tomato2'=>array(238,92,66), - 'tomato3'=>array(205,79,57), - 'tomato4'=>array(139,54,38), - 'orangered1'=>array(255,69,0), - 'orangered2'=>array(238,64,0), - 'orangered3'=>array(205,55,0), - 'orangered4'=>array(139,37,0), - 'deeppink1'=>array(255,20,147), - 'deeppink2'=>array(238,18,137), - 'deeppink3'=>array(205,16,118), - 'deeppink4'=>array(139,10,80), - 'hotpink1'=>array(255,110,180), - 'hotpink2'=>array(238,106,167), - 'hotpink3'=>array(205,96,144), - 'hotpink4'=>array(139,58,98), - 'pink1'=>array(255,181,197), - 'pink2'=>array(238,169,184), - 'pink3'=>array(205,145,158), - 'pink4'=>array(139,99,108), - 'lightpink1'=>array(255,174,185), - 'lightpink2'=>array(238,162,173), - 'lightpink3'=>array(205,140,149), - 'lightpink4'=>array(139,95,101), - 'palevioletred1'=>array(255,130,171), - 'palevioletred2'=>array(238,121,159), - 'palevioletred3'=>array(205,104,137), - 'palevioletred4'=>array(139,71,93), - 'maroon1'=>array(255,52,179), - 'maroon2'=>array(238,48,167), - 'maroon3'=>array(205,41,144), - 'maroon4'=>array(139,28,98), - 'violetred1'=>array(255,62,150), - 'violetred2'=>array(238,58,140), - 'violetred3'=>array(205,50,120), - 'violetred4'=>array(139,34,82), - 'magenta1'=>array(255,0,255), - 'magenta2'=>array(238,0,238), - 'magenta3'=>array(205,0,205), - 'magenta4'=>array(139,0,139), - 'mediumred'=>array(140,34,34), - 'orchid1'=>array(255,131,250), - 'orchid2'=>array(238,122,233), - 'orchid3'=>array(205,105,201), - 'orchid4'=>array(139,71,137), - 'plum1'=>array(255,187,255), - 'plum2'=>array(238,174,238), - 'plum3'=>array(205,150,205), - 'plum4'=>array(139,102,139), - 'mediumorchid1'=>array(224,102,255), - 'mediumorchid2'=>array(209,95,238), - 'mediumorchid3'=>array(180,82,205), - 'mediumorchid4'=>array(122,55,139), - 'darkorchid1'=>array(191,62,255), - 'darkorchid2'=>array(178,58,238), - 'darkorchid3'=>array(154,50,205), - 'darkorchid4'=>array(104,34,139), - 'purple1'=>array(155,48,255), - 'purple2'=>array(145,44,238), - 'purple3'=>array(125,38,205), - 'purple4'=>array(85,26,139), - 'mediumpurple1'=>array(171,130,255), - 'mediumpurple2'=>array(159,121,238), - 'mediumpurple3'=>array(137,104,205), - 'mediumpurple4'=>array(93,71,139), - 'thistle1'=>array(255,225,255), - 'thistle2'=>array(238,210,238), - 'thistle3'=>array(205,181,205), - 'thistle4'=>array(139,123,139), - 'gray1'=>array(10,10,10), - 'gray2'=>array(40,40,30), - 'gray3'=>array(70,70,70), - 'gray4'=>array(100,100,100), - 'gray5'=>array(130,130,130), - 'gray6'=>array(160,160,160), - 'gray7'=>array(190,190,190), - 'gray8'=>array(210,210,210), - 'gray9'=>array(240,240,240), - 'darkgray'=>array(100,100,100), - 'darkblue'=>array(0,0,139), - 'darkcyan'=>array(0,139,139), - 'darkmagenta'=>array(139,0,139), - 'darkred'=>array(139,0,0), - 'silver'=>array(192, 192, 192), - 'eggplant'=>array(144,176,168), - 'lightgreen'=>array(144,238,144)); - } - - - //---------------- - // PUBLIC METHODS - // Colors can be specified as either - // 1. #xxxxxx HTML style - // 2. "colorname" as a named color - // 3. array(r,g,b) RGB triple - // This function translates this to a native RGB format and returns an - // RGB triple. - - function Color($aColor) { - if (is_string($aColor)) { - $matches = array(); - // this regex will parse a color string and fill the $matches array as such: - // 0: the full match if any - // 1: a hex string preceded by a hash, can be 3 characters (#fff) or 6 (#ffffff) (4 or 5 also accepted but...) - // 2,3,4: r,g,b values in hex if the first character of the string is # - // 5: all alpha-numeric characters at the beginning of the string if string does not start with # - // 6: alpha value prefixed by @ if supplied - // 7: alpha value with @ stripped - // 8: adjust value prefixed with : if supplied - // 9: adjust value with : stripped - $regex = '/(#([0-9a-fA-F]{1,2})([0-9a-fA-F]{1,2})([0-9a-fA-F]{1,2}))?([\w]+)?(@([\d\.,]+))?(:([\d\.,]+))?/'; - if(!preg_match($regex, $aColor, $matches)) { - JpGraphError::RaiseL(25078,$aColor);//(" Unknown color: $aColor"); - } - if(empty($matches[5])) { - $r = strlen($matches[2]) == 1 ? $matches[2].$matches[2] : $matches[2]; - $g = strlen($matches[3]) == 1 ? $matches[3].$matches[3] : $matches[3]; - $b = strlen($matches[4]) == 1 ? $matches[4].$matches[4] : $matches[4]; - $r = hexdec($r); - $g = hexdec($g); - $b = hexdec($b); - }else { - if(!isset($this->rgb_table[$matches[5]]) ) { - JpGraphError::RaiseL(25078,$aColor);//(" Unknown color: $aColor"); - } - $r = $this->rgb_table[$matches[5]][0]; - $g = $this->rgb_table[$matches[5]][1]; - $b = $this->rgb_table[$matches[5]][2]; - } - $alpha = isset($matches[7]) ? str_replace(',','.',$matches[7]) : 0; - $adj = isset($matches[9]) ? str_replace(',','.',$matches[9]) : 1.0; - - if( $adj < 0 ) { - JpGraphError::RaiseL(25077);//('Adjustment factor for color must be > 0'); - } - - // Scale adj so that an adj=2 always - // makes the color 100% white (i.e. 255,255,255. - // and adj=1 neutral and adj=0 black. - if( $adj == 1) { - return array($r,$g,$b,$alpha); - } - elseif( $adj > 1 ) { - $m = ($adj-1.0)*(255-min(255,min($r,min($g,$b)))); - return array(min(255,$r+$m), min(255,$g+$m), min(255,$b+$m),$alpha); - } - elseif( $adj < 1 ) { - $m = ($adj-1.0)*max(255,max($r,max($g,$b))); - return array(max(0,$r+$m), max(0,$g+$m), max(0,$b+$m),$alpha); - } - } elseif( is_array($aColor) ) { - if(!isset($aColor[3])) $aColor[3] = 0; - return $aColor; - } - else { - JpGraphError::RaiseL(25079,$aColor,count($aColor));//(" Unknown color specification: $aColor , size=".count($aColor)); - } - } - - // Compare two colors - // return true if equal - function Equal($aCol1,$aCol2) { - $c1 = $this->Color($aCol1); - $c2 = $this->Color($aCol2); - return $c1[0]==$c2[0] && $c1[1]==$c2[1] && $c1[2]==$c2[2] ; - } - - // Allocate a new color in the current image - // Return new color index, -1 if no more colors could be allocated - function Allocate($aColor,$aAlpha=0.0) { - list ($r, $g, $b, $a) = $this->color($aColor); - // If alpha is specified in the color string then this - // takes precedence over the second argument - if( $a > 0 ) { - $aAlpha = $a; - } - if( $aAlpha < 0 || $aAlpha > 1 ) { - JpGraphError::RaiseL(25080);//('Alpha parameter for color must be between 0.0 and 1.0'); - } - return imagecolorresolvealpha($this->img, $r, $g, $b, round($aAlpha * 127)); - } - - // Try to convert an array with three valid numbers to the corresponding hex array - // This is currenly only used in processing the colors for barplots in order to be able - // to handle the case where the color might be specified as an array of colros as well. - // In that case we must be able to find out if an array of values should be interpretated as - // a single color (specifeid as an RGB triple) - static function tryHexConversion($aColor) { - if( is_array( $aColor ) ) { - if( count( $aColor ) == 3 ) { - if( is_numeric($aColor[0]) && is_numeric($aColor[1]) && is_numeric($aColor[2]) ) { - if( ($aColor[0] >= 0 && $aColor[0] <= 255) && - ($aColor[1] >= 0 && $aColor[1] <= 255) && - ($aColor[2] >= 0 && $aColor[2] <= 255) ) { - return sprintf('#%02x%02x%02x',$aColor[0],$aColor[1],$aColor[2]); - } - } - } - } - return $aColor; - } - - // Return a RGB tripple corresponding to a position in the normal light spectrum - // The argumen values is in the range [0, 1] where a value of 0 correponds to blue and - // a value of 1 corresponds to red. Values in betwen is mapped to a linear interpolation - // of the constituting colors in the visible color spectra. - // The $aDynamicRange specified how much of the dynamic range we shold use - // a value of 1.0 give the full dyanmic range and a lower value give more dark - // colors. In the extreme of 0.0 then all colors will be black. - static function GetSpectrum($aVal,$aDynamicRange=1.0) { - if( $aVal < 0 || $aVal > 1.0001 ) { - return array(0,0,0); // Invalid case - just return black - } - - $sat = round(255*$aDynamicRange); - $a = 0.25; - if( $aVal <= 0.25 ) { - return array(0, round($sat*$aVal/$a), $sat); - } - elseif( $aVal <= 0.5 ) { - return array(0, $sat, round($sat-$sat*($aVal-0.25)/$a)); - } - elseif( $aVal <= 0.75 ) { - return array(round($sat*($aVal-0.5)/$a), $sat, 0); - } - else { - return array($sat, round($sat-$sat*($aVal-0.75)/$a), 0); - } - } - -} // Class - -?> diff --git a/html/lib/jpgraph/jpgraph_scatter.php b/html/lib/jpgraph/jpgraph_scatter.php deleted file mode 100644 index 8f7ea1ec92..0000000000 --- a/html/lib/jpgraph/jpgraph_scatter.php +++ /dev/null @@ -1,266 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -/*======================================================================= - // File: JPGRAPH_SCATTER.PHP - // Description: Scatter (and impuls) plot extension for JpGraph - // Created: 2001-02-11 - // Ver: $Id: jpgraph_scatter.php 1397 2009-06-27 21:34:14Z ljp $ - // - // Copyright (c) Aditus Consulting. All rights reserved. - //======================================================================== - */ -require_once ('jpgraph_plotmark.inc.php'); - -//=================================================== -// CLASS FieldArrow -// Description: Draw an arrow at (x,y) with angle a -//=================================================== -class FieldArrow { - public $iColor='black'; - public $iSize=10; // Length in pixels for arrow - public $iArrowSize = 2; - private $isizespec = array( - array(2,1),array(3,2),array(4,3),array(6,4),array(7,4),array(8,5),array(10,6),array(12,7),array(16,8),array(20,10) - ); - function __construct() { - // Empty - } - - function SetSize($aSize,$aArrowSize=2) { - $this->iSize = $aSize; - $this->iArrowSize = $aArrowSize; - } - - function SetColor($aColor) { - $this->iColor = $aColor; - } - - function Stroke($aImg,$x,$y,$a) { - // First rotate the center coordinates - list($x,$y) = $aImg->Rotate($x,$y); - - $old_origin = $aImg->SetCenter($x,$y); - $old_a = $aImg->a; - $aImg->SetAngle(-$a+$old_a); - - $dx = round($this->iSize/2); - $c = array($x-$dx,$y,$x+$dx,$y); - $x += $dx; - - list($dx,$dy) = $this->isizespec[$this->iArrowSize]; - $ca = array($x,$y,$x-$dx,$y-$dy,$x-$dx,$y+$dy,$x,$y); - - $aImg->SetColor($this->iColor); - $aImg->Polygon($c); - $aImg->FilledPolygon($ca); - - $aImg->SetCenter($old_origin[0],$old_origin[1]); - $aImg->SetAngle($old_a); - } -} - -//=================================================== -// CLASS FieldPlot -// Description: Render a field plot -//=================================================== -class FieldPlot extends Plot { - public $arrow = ''; - private $iAngles = array(); - private $iCallback = ''; - - function __construct($datay,$datax,$angles) { - if( (count($datax) != count($datay)) ) - JpGraphError::RaiseL(20001);//("Fieldplots must have equal number of X and Y points."); - if( (count($datax) != count($angles)) ) - JpGraphError::RaiseL(20002);//("Fieldplots must have an angle specified for each X and Y points."); - - $this->iAngles = $angles; - - parent::__construct($datay,$datax); - $this->value->SetAlign('center','center'); - $this->value->SetMargin(15); - - $this->arrow = new FieldArrow(); - } - - function SetCallback($aFunc) { - $this->iCallback = $aFunc; - } - - function Stroke($img,$xscale,$yscale) { - - // Remeber base color and size - $bc = $this->arrow->iColor; - $bs = $this->arrow->iSize; - $bas = $this->arrow->iArrowSize; - - for( $i=0; $i<$this->numpoints; ++$i ) { - // Skip null values - if( $this->coords[0][$i]==="" ) - continue; - - $f = $this->iCallback; - if( $f != "" ) { - list($cc,$cs,$cas) = call_user_func($f,$this->coords[1][$i],$this->coords[0][$i],$this->iAngles[$i]); - // Fall back on global data if the callback isn't set - if( $cc == "" ) $cc = $bc; - if( $cs == "" ) $cs = $bs; - if( $cas == "" ) $cas = $bas; - $this->arrow->SetColor($cc); - $this->arrow->SetSize($cs,$cas); - } - - $xt = $xscale->Translate($this->coords[1][$i]); - $yt = $yscale->Translate($this->coords[0][$i]); - - $this->arrow->Stroke($img,$xt,$yt,$this->iAngles[$i]); - $this->value->Stroke($img,$this->coords[0][$i],$xt,$yt); - } - } - - // Framework function - function Legend($aGraph) { - if( $this->legend != "" ) { - $aGraph->legend->Add($this->legend,$this->mark->fill_color,$this->mark,0, - $this->legendcsimtarget,$this->legendcsimalt,$this->legendcsimwintarget); - } - } -} - -//=================================================== -// CLASS ScatterPlot -// Description: Render X and Y plots -//=================================================== -class ScatterPlot extends Plot { - public $mark,$link; - private $impuls = false; - //--------------- - // CONSTRUCTOR - function __construct($datay,$datax=false) { - if( (count($datax) != count($datay)) && is_array($datax)) { - JpGraphError::RaiseL(20003);//("Scatterplot must have equal number of X and Y points."); - } - parent::__construct($datay,$datax); - $this->mark = new PlotMark(); - $this->mark->SetType(MARK_SQUARE); - $this->mark->SetColor($this->color); - $this->value->SetAlign('center','center'); - $this->value->SetMargin(0); - $this->link = new LineProperty(1,'black','solid'); - $this->link->iShow = false; - } - - //--------------- - // PUBLIC METHODS - function SetImpuls($f=true) { - $this->impuls = $f; - } - - function SetStem($f=true) { - $this->impuls = $f; - } - - // Combine the scatter plot points with a line - function SetLinkPoints($aFlag=true,$aColor="black",$aWeight=1,$aStyle='solid') { - $this->link->iShow = $aFlag; - $this->link->iColor = $aColor; - $this->link->iWeight = $aWeight; - $this->link->iStyle = $aStyle; - } - - function Stroke($img,$xscale,$yscale) { - - $ymin=$yscale->scale_abs[0]; - if( $yscale->scale[0] < 0 ) - $yzero=$yscale->Translate(0); - else - $yzero=$yscale->scale_abs[0]; - - $this->csimareas = ''; - for( $i=0; $i<$this->numpoints; ++$i ) { - - // Skip null values - if( $this->coords[0][$i]==='' || $this->coords[0][$i]==='-' || $this->coords[0][$i]==='x') - continue; - - if( isset($this->coords[1]) ) - $xt = $xscale->Translate($this->coords[1][$i]); - else - $xt = $xscale->Translate($i); - $yt = $yscale->Translate($this->coords[0][$i]); - - - if( $this->link->iShow && isset($yt_old) ) { - $img->SetColor($this->link->iColor); - $img->SetLineWeight($this->link->iWeight); - $old = $img->SetLineStyle($this->link->iStyle); - $img->StyleLine($xt_old,$yt_old,$xt,$yt); - $img->SetLineStyle($old); - } - - if( $this->impuls ) { - $img->SetColor($this->color); - $img->SetLineWeight($this->weight); - $img->Line($xt,$yzero,$xt,$yt); - } - - if( !empty($this->csimtargets[$i]) ) { - if( !empty($this->csimwintargets[$i]) ) { - $this->mark->SetCSIMTarget($this->csimtargets[$i],$this->csimwintargets[$i]); - } - else { - $this->mark->SetCSIMTarget($this->csimtargets[$i]); - } - $this->mark->SetCSIMAlt($this->csimalts[$i]); - } - - if( isset($this->coords[1]) ) { - $this->mark->SetCSIMAltVal($this->coords[0][$i],$this->coords[1][$i]); - } - else { - $this->mark->SetCSIMAltVal($this->coords[0][$i],$i); - } - - $this->mark->Stroke($img,$xt,$yt); - - $this->csimareas .= $this->mark->GetCSIMAreas(); - $this->value->Stroke($img,$this->coords[0][$i],$xt,$yt); - - $xt_old = $xt; - $yt_old = $yt; - } - } - - // Framework function - function Legend($aGraph) { - if( $this->legend != "" ) { - $aGraph->legend->Add($this->legend,$this->mark->fill_color,$this->mark,0, - $this->legendcsimtarget,$this->legendcsimalt,$this->legendcsimwintarget); - } - } -} // Class -/* EOF */ -?> \ No newline at end of file diff --git a/html/lib/jpgraph/jpgraph_stock.php b/html/lib/jpgraph/jpgraph_stock.php deleted file mode 100644 index 1c257b3c35..0000000000 --- a/html/lib/jpgraph/jpgraph_stock.php +++ /dev/null @@ -1,222 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -/*======================================================================= - // File: JPGRAPH_STOCK.PHP - // Description: Stock plot extension for JpGraph - // Created: 2003-01-27 - // Ver: $Id: jpgraph_stock.php 1364 2009-06-24 07:07:44Z ljp $ - // - // Copyright (c) Aditus Consulting. All rights reserved. - //======================================================================== - */ - -//=================================================== -// CLASS StockPlot -//=================================================== -class StockPlot extends Plot { - protected $iTupleSize = 4; - private $iWidth=9; - private $iEndLines=1; - private $iStockColor1='white',$iStockColor2='darkred',$iStockColor3='darkred'; - //--------------- - // CONSTRUCTOR - function __construct($datay,$datax=false) { - if( count($datay) % $this->iTupleSize ) { - JpGraphError::RaiseL(21001,$this->iTupleSize); - //('Data values for Stock charts must contain an even multiple of '.$this->iTupleSize.' data points.'); - } - parent::__construct($datay,$datax); - $this->numpoints /= $this->iTupleSize; - } - //--------------- - // PUBLIC METHODS - - function SetColor($aColor,$aColor1='white',$aColor2='darkred',$aColor3='darkred') { - $this->color = $aColor; - $this->iStockColor1 = $aColor1; - $this->iStockColor2 = $aColor2; - $this->iStockColor3 = $aColor3; - } - - function SetWidth($aWidth) { - // Make sure it's odd - $this->iWidth = 2*floor($aWidth/2)+1; - } - - function HideEndLines($aHide=true) { - $this->iEndLines = !$aHide; - } - - // Gets called before any axis are stroked - function PreStrokeAdjust($graph) { - if( $this->center ) { - $a=0.5; $b=0.5; - $this->numpoints++; - } else { - $a=0; $b=0; - } - $graph->xaxis->scale->ticks->SetXLabelOffset($a); - $graph->SetTextScaleOff($b); - } - - // Method description - function Stroke($img,$xscale,$yscale) { - $n=$this->numpoints; - if( $this->center ) $n--; - if( isset($this->coords[1]) ) { - if( count($this->coords[1])!=$n ) { - JpGraphError::RaiseL(2003,count($this->coords[1]),$n); - // ("Number of X and Y points are not equal. Number of X-points:".count($this->coords[1])." Number of Y-points:$numpoints"); - } - else { - $exist_x = true; - } - } - else { - $exist_x = false; - } - - if( $exist_x ) { - $xs=$this->coords[1][0]; - } - else { - $xs=0; - } - - $ts = $this->iTupleSize; - $this->csimareas = ''; - for( $i=0; $i<$n; ++$i) { - - //If value is NULL, then don't draw a bar at all - if ($this->coords[0][$i*$ts] === null) continue; - - if( $exist_x ) { - $x=$this->coords[1][$i]; - if ($x === null) continue; - } - else { - $x=$i; - } - $xt = $xscale->Translate($x); - - $neg = $this->coords[0][$i*$ts] > $this->coords[0][$i*$ts+1] ; - $yopen = $yscale->Translate($this->coords[0][$i*$ts]); - $yclose = $yscale->Translate($this->coords[0][$i*$ts+1]); - $ymin = $yscale->Translate($this->coords[0][$i*$ts+2]); - $ymax = $yscale->Translate($this->coords[0][$i*$ts+3]); - - $dx = floor($this->iWidth/2); - $xl = $xt - $dx; - $xr = $xt + $dx; - - if( $neg ) { - $img->SetColor($this->iStockColor3); - } - else { - $img->SetColor($this->iStockColor1); - } - $img->FilledRectangle($xl,$yopen,$xr,$yclose); - $img->SetLineWeight($this->weight); - if( $neg ) { - $img->SetColor($this->iStockColor2); - } - else { - $img->SetColor($this->color); - } - - $img->Rectangle($xl,$yopen,$xr,$yclose); - - if( $yopen < $yclose ) { - $ytop = $yopen ; - $ybottom = $yclose ; - } - else { - $ytop = $yclose ; - $ybottom = $yopen ; - } - $img->SetColor($this->color); - $img->Line($xt,$ytop,$xt,$ymax); - $img->Line($xt,$ybottom,$xt,$ymin); - - if( $this->iEndLines ) { - $img->Line($xl,$ymax,$xr,$ymax); - $img->Line($xl,$ymin,$xr,$ymin); - } - - // A chance for subclasses to add things to the bar - // for data point i - $this->ModBox($img,$xscale,$yscale,$i,$xl,$xr,$neg); - - // Setup image maps - if( !empty($this->csimtargets[$i]) ) { - $this->csimareas.= 'csimareas .= ' href="'.$this->csimtargets[$i].'"'; - if( !empty($this->csimalts[$i]) ) { - $sval=$this->csimalts[$i]; - $this->csimareas .= " title=\"$sval\" alt=\"$sval\" "; - } - $this->csimareas.= " />\n"; - } - } - return true; - } - - // A hook for subclasses to modify the plot - function ModBox($img,$xscale,$yscale,$i,$xl,$xr,$neg) {} - -} // Class - -//=================================================== -// CLASS BoxPlot -//=================================================== -class BoxPlot extends StockPlot { - private $iPColor='black',$iNColor='white'; - - function __construct($datay,$datax=false) { - $this->iTupleSize=5; - parent::__construct($datay,$datax); - } - - function SetMedianColor($aPos,$aNeg) { - $this->iPColor = $aPos; - $this->iNColor = $aNeg; - } - - function ModBox($img,$xscale,$yscale,$i,$xl,$xr,$neg) { - if( $neg ) - $img->SetColor($this->iNColor); - else - $img->SetColor($this->iPColor); - - $y = $yscale->Translate($this->coords[0][$i*5+4]); - $img->Line($xl,$y,$xr,$y); - } -} - -/* EOF */ -?> \ No newline at end of file diff --git a/html/lib/jpgraph/jpgraph_text.inc.php b/html/lib/jpgraph/jpgraph_text.inc.php deleted file mode 100644 index 6de7427e4b..0000000000 --- a/html/lib/jpgraph/jpgraph_text.inc.php +++ /dev/null @@ -1,326 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -//======================================================================= -// File: JPGRAPH_TEXT.INC.PHP -// Description: Class to handle text as object in the graph. -// The low level text layout engine is handled by the GD class -// Created: 2001-01-08 (Refactored to separate file 2008-08-01) -// Ver: $Id: jpgraph_text.inc.php 1844 2009-09-26 17:05:31Z ljp $ -// -// Copyright (c) Aditus Consulting. All rights reserved. -//======================================================================== - - -//=================================================== -// CLASS Text -// Description: Arbitrary text object that can be added to the graph -//=================================================== -class Text { - public $t,$margin=0; - public $x=0,$y=0,$halign="left",$valign="top",$color=array(0,0,0); - public $hide=false, $dir=0; - public $iScalePosY=null,$iScalePosX=null; - public $iWordwrap=0; - public $font_family=FF_FONT1,$font_style=FS_NORMAL,$font_size=12; - protected $boxed=false; // Should the text be boxed - protected $paragraph_align="left"; - protected $icornerradius=0,$ishadowwidth=3; - protected $fcolor='white',$bcolor='black',$shadow=false; - protected $iCSIMarea='',$iCSIMalt='',$iCSIMtarget='',$iCSIMWinTarget=''; - private $iBoxType = 1; // Which variant of filled box around text we want - - //--------------- - // CONSTRUCTOR - - // Create new text at absolute pixel coordinates - function __construct($aTxt="",$aXAbsPos=0,$aYAbsPos=0) { - if( ! is_string($aTxt) ) { - JpGraphError::RaiseL(25050);//('First argument to Text::Text() must be s atring.'); - } - $this->t = $aTxt; - $this->x = round($aXAbsPos); - $this->y = round($aYAbsPos); - $this->margin = 0; - } - //--------------- - // PUBLIC METHODS - // Set the string in the text object - function Set($aTxt) { - $this->t = $aTxt; - } - - // Alias for Pos() - function SetPos($aXAbsPos=0,$aYAbsPos=0,$aHAlign="left",$aVAlign="top") { - //$this->Pos($aXAbsPos,$aYAbsPos,$aHAlign,$aVAlign); - $this->x = $aXAbsPos; - $this->y = $aYAbsPos; - $this->halign = $aHAlign; - $this->valign = $aVAlign; - } - - function SetScalePos($aX,$aY) { - $this->iScalePosX = $aX; - $this->iScalePosY = $aY; - } - - // Specify alignment for the text - function Align($aHAlign,$aVAlign="top",$aParagraphAlign="") { - $this->halign = $aHAlign; - $this->valign = $aVAlign; - if( $aParagraphAlign != "" ) - $this->paragraph_align = $aParagraphAlign; - } - - // Alias - function SetAlign($aHAlign,$aVAlign="top",$aParagraphAlign="") { - $this->Align($aHAlign,$aVAlign,$aParagraphAlign); - } - - // Specifies the alignment for a multi line text - function ParagraphAlign($aAlign) { - $this->paragraph_align = $aAlign; - } - - // Specifies the alignment for a multi line text - function SetParagraphAlign($aAlign) { - $this->paragraph_align = $aAlign; - } - - function SetShadow($aShadowColor='gray',$aShadowWidth=3) { - $this->ishadowwidth=$aShadowWidth; - $this->shadow=$aShadowColor; - $this->boxed=true; - } - - function SetWordWrap($aCol) { - $this->iWordwrap = $aCol ; - } - - // Specify that the text should be boxed. fcolor=frame color, bcolor=border color, - // $shadow=drop shadow should be added around the text. - function SetBox($aFrameColor=array(255,255,255),$aBorderColor=array(0,0,0),$aShadowColor=false,$aCornerRadius=4,$aShadowWidth=3) { - if( $aFrameColor === false ) { - $this->boxed=false; - } - else { - $this->boxed=true; - } - $this->fcolor=$aFrameColor; - $this->bcolor=$aBorderColor; - // For backwards compatibility when shadow was just true or false - if( $aShadowColor === true ) { - $aShadowColor = 'gray'; - } - $this->shadow=$aShadowColor; - $this->icornerradius=$aCornerRadius; - $this->ishadowwidth=$aShadowWidth; - } - - function SetBox2($aFrameColor=array(255,255,255),$aBorderColor=array(0,0,0),$aShadowColor=false,$aCornerRadius=4,$aShadowWidth=3) { - $this->iBoxType=2; - $this->SetBox($aFrameColor,$aBorderColor,$aShadowColor,$aCornerRadius,$aShadowWidth); - } - - // Hide the text - function Hide($aHide=true) { - $this->hide=$aHide; - } - - // This looks ugly since it's not a very orthogonal design - // but I added this "inverse" of Hide() to harmonize - // with some classes which I designed more recently (especially) - // jpgraph_gantt - function Show($aShow=true) { - $this->hide=!$aShow; - } - - // Specify font - function SetFont($aFamily,$aStyle=FS_NORMAL,$aSize=10) { - $this->font_family=$aFamily; - $this->font_style=$aStyle; - $this->font_size=$aSize; - } - - // Center the text between $left and $right coordinates - function Center($aLeft,$aRight,$aYAbsPos=false) { - $this->x = $aLeft + ($aRight-$aLeft )/2; - $this->halign = "center"; - if( is_numeric($aYAbsPos) ) - $this->y = $aYAbsPos; - } - - // Set text color - function SetColor($aColor) { - $this->color = $aColor; - } - - function SetAngle($aAngle) { - $this->SetOrientation($aAngle); - } - - // Orientation of text. Note only TTF fonts can have an arbitrary angle - function SetOrientation($aDirection=0) { - if( is_numeric($aDirection) ) - $this->dir=$aDirection; - elseif( $aDirection=="h" ) - $this->dir = 0; - elseif( $aDirection=="v" ) - $this->dir = 90; - else - JpGraphError::RaiseL(25051);//(" Invalid direction specified for text."); - } - - // Total width of text - function GetWidth($aImg) { - $aImg->SetFont($this->font_family,$this->font_style,$this->font_size); - $w = $aImg->GetTextWidth($this->t,$this->dir); - return $w; - } - - // Hight of font - function GetFontHeight($aImg) { - $aImg->SetFont($this->font_family,$this->font_style,$this->font_size); - $h = $aImg->GetFontHeight(); - return $h; - - } - - function GetTextHeight($aImg) { - $aImg->SetFont($this->font_family,$this->font_style,$this->font_size); - $h = $aImg->GetTextHeight($this->t,$this->dir); - return $h; - } - - function GetHeight($aImg) { - // Synonym for GetTextHeight() - $aImg->SetFont($this->font_family,$this->font_style,$this->font_size); - $h = $aImg->GetTextHeight($this->t,$this->dir); - return $h; - } - - // Set the margin which will be interpretated differently depending - // on the context. - function SetMargin($aMarg) { - $this->margin = $aMarg; - } - - function StrokeWithScale($aImg,$axscale,$ayscale) { - if( $this->iScalePosX === null || $this->iScalePosY === null ) { - $this->Stroke($aImg); - } - else { - $this->Stroke($aImg, - round($axscale->Translate($this->iScalePosX)), - round($ayscale->Translate($this->iScalePosY))); - } - } - - function SetCSIMTarget($aURITarget,$aAlt='',$aWinTarget='') { - $this->iCSIMtarget = $aURITarget; - $this->iCSIMalt = $aAlt; - $this->iCSIMWinTarget = $aWinTarget; - } - - function GetCSIMareas() { - if( $this->iCSIMtarget !== '' ) { - return $this->iCSIMarea; - } - else { - return ''; - } - } - - // Display text in image - function Stroke($aImg,$x=null,$y=null) { - - if( $x !== null ) $this->x = round($x); - if( $y !== null ) $this->y = round($y); - - // Insert newlines - if( $this->iWordwrap > 0 ) { - $this->t = wordwrap($this->t,$this->iWordwrap,"\n"); - } - - // If position been given as a fraction of the image size - // calculate the absolute position - if( $this->x < 1 && $this->x > 0 ) $this->x *= $aImg->width; - if( $this->y < 1 && $this->y > 0 ) $this->y *= $aImg->height; - - $aImg->PushColor($this->color); - $aImg->SetFont($this->font_family,$this->font_style,$this->font_size); - $aImg->SetTextAlign($this->halign,$this->valign); - - if( $this->boxed ) { - if( $this->fcolor=="nofill" ) { - $this->fcolor=false; - } - - $oldweight=$aImg->SetLineWeight(1); - - if( $this->iBoxType == 2 && $this->font_family > FF_FONT2+2 ) { - - $bbox = $aImg->StrokeBoxedText2($this->x, $this->y, - $this->t, $this->dir, - $this->fcolor, - $this->bcolor, - $this->shadow, - $this->paragraph_align, - 2,4, - $this->icornerradius, - $this->ishadowwidth); - } - else { - $bbox = $aImg->StrokeBoxedText($this->x,$this->y,$this->t, - $this->dir,$this->fcolor,$this->bcolor,$this->shadow, - $this->paragraph_align,3,3,$this->icornerradius, - $this->ishadowwidth); - } - - $aImg->SetLineWeight($oldweight); - } - else { - $debug=false; - $bbox = $aImg->StrokeText($this->x,$this->y,$this->t,$this->dir,$this->paragraph_align,$debug); - } - - // Create CSIM targets - $coords = $bbox[0].','.$bbox[1].','.$bbox[2].','.$bbox[3].','.$bbox[4].','.$bbox[5].','.$bbox[6].','.$bbox[7]; - $this->iCSIMarea = "iCSIMtarget)."\" "; - if( trim($this->iCSIMalt) != '' ) { - $this->iCSIMarea .= " alt=\"".$this->iCSIMalt."\" "; - $this->iCSIMarea .= " title=\"".$this->iCSIMalt."\" "; - } - if( trim($this->iCSIMWinTarget) != '' ) { - $this->iCSIMarea .= " target=\"".$this->iCSIMWinTarget."\" "; - } - $this->iCSIMarea .= " />\n"; - - $aImg->PopColor($this->color); - } -} // Class - - -?> diff --git a/html/lib/jpgraph/jpgraph_ttf.inc.php b/html/lib/jpgraph/jpgraph_ttf.inc.php deleted file mode 100644 index 49e0b5cb2f..0000000000 --- a/html/lib/jpgraph/jpgraph_ttf.inc.php +++ /dev/null @@ -1,641 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -//======================================================================= -// File: jpgraph_ttf.inc.php -// Description: Handling of TTF fonts -// Created: 2006-11-19 -// Ver: $Id: jpgraph_ttf.inc.php 1858 2009-09-28 14:39:51Z ljp $ -// -// Copyright (c) Aditus Consulting. All rights reserved. -//======================================================================== - -// TTF Font families -define("FF_COURIER",10); -define("FF_VERDANA",11); -define("FF_TIMES",12); -define("FF_COMIC",14); -define("FF_ARIAL",15); -define("FF_GEORGIA",16); -define("FF_TREBUCHE",17); - -// Gnome Vera font -// Available from http://www.gnome.org/fonts/ -define("FF_VERA",18); -define("FF_VERAMONO",19); -define("FF_VERASERIF",20); - -// Chinese font -define("FF_SIMSUN",30); -define("FF_CHINESE",31); -define("FF_BIG5",32); - -// Japanese font -define("FF_MINCHO",40); -define("FF_PMINCHO",41); -define("FF_GOTHIC",42); -define("FF_PGOTHIC",43); - -// Hebrew fonts -define("FF_DAVID",44); -define("FF_MIRIAM",45); -define("FF_AHRON",46); - -// Dejavu-fonts http://sourceforge.net/projects/dejavu -define("FF_DV_SANSSERIF",47); -define("FF_DV_SERIF",48); -define("FF_DV_SANSSERIFMONO",49); -define("FF_DV_SERIFCOND",50); -define("FF_DV_SANSSERIFCOND",51); - -// Extra fonts -// Download fonts from -// http://www.webfontlist.com -// http://www.webpagepublicity.com/free-fonts.html -// http://www.fontonic.com/fonts.asp?width=d&offset=120 -// http://www.fontspace.com/category/famous - -// define("FF_SPEEDO",71); // This font is also known as Bauer (Used for development gauge fascia) -define("FF_DIGITAL",72); // Digital readout font -define("FF_COMPUTER",73); // The classic computer font -define("FF_CALCULATOR",74); // Triad font - -define("FF_USERFONT",90); -define("FF_USERFONT1",90); -define("FF_USERFONT2",91); -define("FF_USERFONT3",92); - -// Limits for fonts -define("_FIRST_FONT",10); -define("_LAST_FONT",99); - -// TTF Font styles -define("FS_NORMAL",9001); -define("FS_BOLD",9002); -define("FS_ITALIC",9003); -define("FS_BOLDIT",9004); -define("FS_BOLDITALIC",9004); - -//Definitions for internal font -define("FF_FONT0",1); -define("FF_FONT1",2); -define("FF_FONT2",4); - -//------------------------------------------------------------------------ -// Defines for font setup -//------------------------------------------------------------------------ - -// Actual name of the TTF file used together with FF_CHINESE aka FF_BIG5 -// This is the TTF file being used when the font family is specified as -// either FF_CHINESE or FF_BIG5 -define('CHINESE_TTF_FONT','bkai00mp.ttf'); - -// Special unicode greek language support -define("LANGUAGE_GREEK",false); - -// If you are setting this config to true the conversion of greek characters -// will assume that the input text is windows 1251 -define("GREEK_FROM_WINDOWS",false); - -// Special unicode cyrillic language support -define("LANGUAGE_CYRILLIC",false); - -// If you are setting this config to true the conversion -// will assume that the input text is windows 1251, if -// false it will assume koi8-r -define("CYRILLIC_FROM_WINDOWS",false); - -// The following constant is used to auto-detect -// whether cyrillic conversion is really necessary -// if enabled. Just replace 'windows-1251' with a variable -// containing the input character encoding string -// of your application calling jpgraph. -// A typical such string would be 'UTF-8' or 'utf-8'. -// The comparison is case-insensitive. -// If this charset is not a 'koi8-r' or 'windows-1251' -// derivate then no conversion is done. -// -// This constant can be very important in multi-user -// multi-language environments where a cyrillic conversion -// could be needed for some cyrillic people -// and resulting in just erraneous conversions -// for not-cyrillic language based people. -// -// Example: In the free project management -// software dotproject.net $locale_char_set is dynamically -// set by the language environment the user has chosen. -// -// Usage: define('LANGUAGE_CHARSET', $locale_char_set); -// -// where $locale_char_set is a GLOBAL (string) variable -// from the application including JpGraph. -// -define('LANGUAGE_CHARSET', null); - -// Japanese TrueType font used with FF_MINCHO, FF_PMINCHO, FF_GOTHIC, FF_PGOTHIC -// Standard fonts from Infomation-technology Promotion Agency (IPA) -// See http://mix-mplus-ipa.sourceforge.jp/ -define('MINCHO_TTF_FONT','ipam.ttf'); -define('PMINCHO_TTF_FONT','ipamp.ttf'); -define('GOTHIC_TTF_FONT','ipag.ttf'); -define('PGOTHIC_TTF_FONT','ipagp.ttf'); - -// Assume that Japanese text have been entered in EUC-JP encoding. -// If this define is true then conversion from EUC-JP to UTF8 is done -// automatically in the library using the mbstring module in PHP. -define('ASSUME_EUCJP_ENCODING',false); - - -//================================================================= -// CLASS LanguageConv -// Description: -// Converts various character encoding into proper -// UTF-8 depending on how the library have been configured and -// what font family is being used -//================================================================= -class LanguageConv { - private $g2312 = null ; - - function Convert($aTxt,$aFF) { - if( LANGUAGE_GREEK ) { - if( GREEK_FROM_WINDOWS ) { - $unistring = LanguageConv::gr_win2uni($aTxt); - } else { - $unistring = LanguageConv::gr_iso2uni($aTxt); - } - return $unistring; - } elseif( LANGUAGE_CYRILLIC ) { - if( CYRILLIC_FROM_WINDOWS && (!defined('LANGUAGE_CHARSET') || stristr(LANGUAGE_CHARSET, 'windows-1251')) ) { - $aTxt = convert_cyr_string($aTxt, "w", "k"); - } - if( !defined('LANGUAGE_CHARSET') || stristr(LANGUAGE_CHARSET, 'koi8-r') || stristr(LANGUAGE_CHARSET, 'windows-1251')) { - $isostring = convert_cyr_string($aTxt, "k", "i"); - $unistring = LanguageConv::iso2uni($isostring); - } - else { - $unistring = $aTxt; - } - return $unistring; - } - elseif( $aFF === FF_SIMSUN ) { - // Do Chinese conversion - if( $this->g2312 == null ) { - include_once 'jpgraph_gb2312.php' ; - $this->g2312 = new GB2312toUTF8(); - } - return $this->g2312->gb2utf8($aTxt); - } - elseif( $aFF === FF_BIG5 ) { - if( !function_exists('iconv') ) { - JpGraphError::RaiseL(25006); - //('Usage of FF_CHINESE (FF_BIG5) font family requires that your PHP setup has the iconv() function. By default this is not compiled into PHP (needs the "--width-iconv" when configured).'); - } - return iconv('BIG5','UTF-8',$aTxt); - } - elseif( ASSUME_EUCJP_ENCODING && - ($aFF == FF_MINCHO || $aFF == FF_GOTHIC || $aFF == FF_PMINCHO || $aFF == FF_PGOTHIC) ) { - if( !function_exists('mb_convert_encoding') ) { - JpGraphError::RaiseL(25127); - } - return mb_convert_encoding($aTxt, 'UTF-8','EUC-JP'); - } - elseif( $aFF == FF_DAVID || $aFF == FF_MIRIAM || $aFF == FF_AHRON ) { - return LanguageConv::heb_iso2uni($aTxt); - } - else - return $aTxt; - } - - // Translate iso encoding to unicode - public static function iso2uni ($isoline){ - $uniline=''; - for ($i=0; $i < strlen($isoline); $i++){ - $thischar=substr($isoline,$i,1); - $charcode=ord($thischar); - $uniline.=($charcode>175) ? "&#" . (1040+($charcode-176)). ";" : $thischar; - } - return $uniline; - } - - // Translate greek iso encoding to unicode - public static function gr_iso2uni ($isoline) { - $uniline=''; - for ($i=0; $i < strlen($isoline); $i++) { - $thischar=substr($isoline,$i,1); - $charcode=ord($thischar); - $uniline.=($charcode>179 && $charcode!=183 && $charcode!=187 && $charcode!=189) ? "&#" . (900+($charcode-180)). ";" : $thischar; - } - return $uniline; - } - - // Translate greek win encoding to unicode - public static function gr_win2uni ($winline) { - $uniline=''; - for ($i=0; $i < strlen($winline); $i++) { - $thischar=substr($winline,$i,1); - $charcode=ord($thischar); - if ($charcode==161 || $charcode==162) { - $uniline.="&#" . (740+$charcode). ";"; - } - else { - $uniline.=(($charcode>183 && $charcode!=187 && $charcode!=189) || $charcode==180) ? "&#" . (900+($charcode-180)). ";" : $thischar; - } - } - return $uniline; - } - - public static function heb_iso2uni($isoline) { - $isoline = hebrev($isoline); - $o = ''; - - $n = strlen($isoline); - for($i=0; $i < $n; $i++) { - $c=ord( substr($isoline,$i,1) ); - $o .= ($c > 223) && ($c < 251) ? '&#'.(1264+$c).';' : chr($c); - } - return utf8_encode($o); - } -} - -//============================================================= -// CLASS TTF -// Description: Handle TTF font names and mapping and loading of -// font files -//============================================================= -class TTF { - private $font_files,$style_names; - - function __construct() { - - // String names for font styles to be used in error messages - $this->style_names=array( - FS_NORMAL =>'normal', - FS_BOLD =>'bold', - FS_ITALIC =>'italic', - FS_BOLDITALIC =>'bolditalic'); - - // File names for available fonts - $this->font_files=array( - FF_COURIER => array(FS_NORMAL =>'cour.ttf', - FS_BOLD =>'courbd.ttf', - FS_ITALIC =>'couri.ttf', - FS_BOLDITALIC =>'courbi.ttf' ), - FF_GEORGIA => array(FS_NORMAL =>'georgia.ttf', - FS_BOLD =>'georgiab.ttf', - FS_ITALIC =>'georgiai.ttf', - FS_BOLDITALIC =>'' ), - FF_TREBUCHE =>array(FS_NORMAL =>'trebuc.ttf', - FS_BOLD =>'trebucbd.ttf', - FS_ITALIC =>'trebucit.ttf', - FS_BOLDITALIC =>'trebucbi.ttf' ), - FF_VERDANA => array(FS_NORMAL =>'verdana.ttf', - FS_BOLD =>'verdanab.ttf', - FS_ITALIC =>'verdanai.ttf', - FS_BOLDITALIC =>'' ), - FF_TIMES => array(FS_NORMAL =>'times.ttf', - FS_BOLD =>'timesbd.ttf', - FS_ITALIC =>'timesi.ttf', - FS_BOLDITALIC =>'timesbi.ttf' ), - FF_COMIC => array(FS_NORMAL =>'comic.ttf', - FS_BOLD =>'comicbd.ttf', - FS_ITALIC =>'', - FS_BOLDITALIC =>'' ), - FF_ARIAL => array(FS_NORMAL =>'arial.ttf', - FS_BOLD =>'arialbd.ttf', - FS_ITALIC =>'ariali.ttf', - FS_BOLDITALIC =>'arialbi.ttf' ) , - FF_VERA => array(FS_NORMAL =>'Vera.ttf', - FS_BOLD =>'VeraBd.ttf', - FS_ITALIC =>'VeraIt.ttf', - FS_BOLDITALIC =>'VeraBI.ttf' ), - FF_VERAMONO => array(FS_NORMAL =>'VeraMono.ttf', - FS_BOLD =>'VeraMoBd.ttf', - FS_ITALIC =>'VeraMoIt.ttf', - FS_BOLDITALIC =>'VeraMoBI.ttf' ), - FF_VERASERIF=> array(FS_NORMAL =>'VeraSe.ttf', - FS_BOLD =>'VeraSeBd.ttf', - FS_ITALIC =>'', - FS_BOLDITALIC =>'' ) , - - /* Chinese fonts */ - FF_SIMSUN => array( - FS_NORMAL =>'simsun.ttc', - FS_BOLD =>'simhei.ttf', - FS_ITALIC =>'', - FS_BOLDITALIC =>'' ), - FF_CHINESE => array( - FS_NORMAL =>CHINESE_TTF_FONT, - FS_BOLD =>'', - FS_ITALIC =>'', - FS_BOLDITALIC =>'' ), - FF_BIG5 => array( - FS_NORMAL =>CHINESE_TTF_FONT, - FS_BOLD =>'', - FS_ITALIC =>'', - FS_BOLDITALIC =>'' ), - - /* Japanese fonts */ - FF_MINCHO => array( - FS_NORMAL =>MINCHO_TTF_FONT, - FS_BOLD =>'', - FS_ITALIC =>'', - FS_BOLDITALIC =>'' ), - - FF_PMINCHO => array( - FS_NORMAL =>PMINCHO_TTF_FONT, - FS_BOLD =>'', - FS_ITALIC =>'', - FS_BOLDITALIC =>'' ), - - FF_GOTHIC => array( - FS_NORMAL =>GOTHIC_TTF_FONT, - FS_BOLD =>'', - FS_ITALIC =>'', - FS_BOLDITALIC =>'' ), - - FF_PGOTHIC => array( - FS_NORMAL =>PGOTHIC_TTF_FONT, - FS_BOLD =>'', - FS_ITALIC =>'', - FS_BOLDITALIC =>'' ), - - /* Hebrew fonts */ - FF_DAVID => array( - FS_NORMAL =>'DAVIDNEW.TTF', - FS_BOLD =>'', - FS_ITALIC =>'', - FS_BOLDITALIC =>'' ), - - FF_MIRIAM => array( - FS_NORMAL =>'MRIAMY.TTF', - FS_BOLD =>'', - FS_ITALIC =>'', - FS_BOLDITALIC =>'' ), - - FF_AHRON => array( - FS_NORMAL =>'ahronbd.ttf', - FS_BOLD =>'', - FS_ITALIC =>'', - FS_BOLDITALIC =>'' ), - - /* Misc fonts */ - FF_DIGITAL => array( - FS_NORMAL =>'DIGIRU__.TTF', - FS_BOLD =>'Digirtu_.ttf', - FS_ITALIC =>'Digir___.ttf', - FS_BOLDITALIC =>'DIGIRT__.TTF' ), - - /* This is an experimental font for the speedometer development - FF_SPEEDO => array( - FS_NORMAL =>'Speedo.ttf', - FS_BOLD =>'', - FS_ITALIC =>'', - FS_BOLDITALIC =>'' ), - */ - - FF_COMPUTER => array( - FS_NORMAL =>'COMPUTER.TTF', - FS_BOLD =>'', - FS_ITALIC =>'', - FS_BOLDITALIC =>'' ), - - FF_CALCULATOR => array( - FS_NORMAL =>'Triad_xs.ttf', - FS_BOLD =>'', - FS_ITALIC =>'', - FS_BOLDITALIC =>'' ), - - /* Dejavu fonts */ - FF_DV_SANSSERIF => array( - FS_NORMAL =>array('DejaVuSans.ttf'), - FS_BOLD =>array('DejaVuSans-Bold.ttf','DejaVuSansBold.ttf'), - FS_ITALIC =>array('DejaVuSans-Oblique.ttf','DejaVuSansOblique.ttf'), - FS_BOLDITALIC =>array('DejaVuSans-BoldOblique.ttf','DejaVuSansBoldOblique.ttf') ), - - FF_DV_SANSSERIFMONO => array( - FS_NORMAL =>array('DejaVuSansMono.ttf','DejaVuMonoSans.ttf'), - FS_BOLD =>array('DejaVuSansMono-Bold.ttf','DejaVuMonoSansBold.ttf'), - FS_ITALIC =>array('DejaVuSansMono-Oblique.ttf','DejaVuMonoSansOblique.ttf'), - FS_BOLDITALIC =>array('DejaVuSansMono-BoldOblique.ttf','DejaVuMonoSansBoldOblique.ttf') ), - - FF_DV_SANSSERIFCOND => array( - FS_NORMAL =>array('DejaVuSansCondensed.ttf','DejaVuCondensedSans.ttf'), - FS_BOLD =>array('DejaVuSansCondensed-Bold.ttf','DejaVuCondensedSansBold.ttf'), - FS_ITALIC =>array('DejaVuSansCondensed-Oblique.ttf','DejaVuCondensedSansOblique.ttf'), - FS_BOLDITALIC =>array('DejaVuSansCondensed-BoldOblique.ttf','DejaVuCondensedSansBoldOblique.ttf') ), - - FF_DV_SERIF => array( - FS_NORMAL =>array('DejaVuSerif.ttf'), - FS_BOLD =>array('DejaVuSerif-Bold.ttf','DejaVuSerifBold.ttf'), - FS_ITALIC =>array('DejaVuSerif-Italic.ttf','DejaVuSerifItalic.ttf'), - FS_BOLDITALIC =>array('DejaVuSerif-BoldItalic.ttf','DejaVuSerifBoldItalic.ttf') ), - - FF_DV_SERIFCOND => array( - FS_NORMAL =>array('DejaVuSerifCondensed.ttf','DejaVuCondensedSerif.ttf'), - FS_BOLD =>array('DejaVuSerifCondensed-Bold.ttf','DejaVuCondensedSerifBold.ttf'), - FS_ITALIC =>array('DejaVuSerifCondensed-Italic.ttf','DejaVuCondensedSerifItalic.ttf'), - FS_BOLDITALIC =>array('DejaVuSerifCondensed-BoldItalic.ttf','DejaVuCondensedSerifBoldItalic.ttf') ), - - - /* Placeholders for defined fonts */ - FF_USERFONT1 => array( - FS_NORMAL =>'', - FS_BOLD =>'', - FS_ITALIC =>'', - FS_BOLDITALIC =>'' ), - - FF_USERFONT2 => array( - FS_NORMAL =>'', - FS_BOLD =>'', - FS_ITALIC =>'', - FS_BOLDITALIC =>'' ), - - FF_USERFONT3 => array( - FS_NORMAL =>'', - FS_BOLD =>'', - FS_ITALIC =>'', - FS_BOLDITALIC =>'' ), - - ); - } - - //--------------- - // PUBLIC METHODS - // Create the TTF file from the font specification - function File($family,$style=FS_NORMAL) { - $fam = @$this->font_files[$family]; - if( !$fam ) { - JpGraphError::RaiseL(25046,$family);//("Specified TTF font family (id=$family) is unknown or does not exist. Please note that TTF fonts are not distributed with JpGraph for copyright reasons. You can find the MS TTF WEB-fonts (arial, courier etc) for download at http://corefonts.sourceforge.net/"); - } - $ff = @$fam[$style]; - - if( is_array($ff) ) { - // There are several optional file names. They are tried in order - // and the first one found is used - $n = count($ff); - } else { - $n = 1; - $ff = array($ff); - } - $i = 0; - do { - $f = $ff[$i]; - // All font families are guaranteed to have the normal style - - if( $f==='' ) - JpGraphError::RaiseL(25047,$this->style_names[$style],$this->font_files[$family][FS_NORMAL]);//('Style "'.$this->style_names[$style].'" is not available for font family '.$this->font_files[$family][FS_NORMAL].'.'); - if( !$f ) { - JpGraphError::RaiseL(25048,$fam);//("Unknown font style specification [$fam]."); - } - - if ($family >= FF_MINCHO && $family <= FF_PGOTHIC) { - $f = MBTTF_DIR.$f; - } else { - $f = TTF_DIR.$f; - } - ++$i; - } while( $i < $n && (file_exists($f) === false || is_readable($f) === false) ); - - if( !file_exists($f) ) { - JpGraphError::RaiseL(25049,$f);//("Font file \"$f\" is not readable or does not exist."); - } - return $f; - } - - function SetUserFont($aNormal,$aBold='',$aItalic='',$aBoldIt='') { - $this->font_files[FF_USERFONT] = - array(FS_NORMAL => $aNormal, - FS_BOLD => $aBold, - FS_ITALIC => $aItalic, - FS_BOLDITALIC => $aBoldIt ) ; - } - - function SetUserFont1($aNormal,$aBold='',$aItalic='',$aBoldIt='') { - $this->font_files[FF_USERFONT1] = - array(FS_NORMAL => $aNormal, - FS_BOLD => $aBold, - FS_ITALIC => $aItalic, - FS_BOLDITALIC => $aBoldIt ) ; - } - - function SetUserFont2($aNormal,$aBold='',$aItalic='',$aBoldIt='') { - $this->font_files[FF_USERFONT2] = - array(FS_NORMAL => $aNormal, - FS_BOLD => $aBold, - FS_ITALIC => $aItalic, - FS_BOLDITALIC => $aBoldIt ) ; - } - - function SetUserFont3($aNormal,$aBold='',$aItalic='',$aBoldIt='') { - $this->font_files[FF_USERFONT3] = - array(FS_NORMAL => $aNormal, - FS_BOLD => $aBold, - FS_ITALIC => $aItalic, - FS_BOLDITALIC => $aBoldIt ) ; - } - -} // Class - - -//============================================================================= -// CLASS SymChar -// Description: Code values for some commonly used characters that -// normally isn't available directly on the keyboard, for example -// mathematical and greek symbols. -//============================================================================= -class SymChar { - static function Get($aSymb,$aCapital=FALSE) { - $iSymbols = array( - /* Greek */ - array('alpha','03B1','0391'), - array('beta','03B2','0392'), - array('gamma','03B3','0393'), - array('delta','03B4','0394'), - array('epsilon','03B5','0395'), - array('zeta','03B6','0396'), - array('ny','03B7','0397'), - array('eta','03B8','0398'), - array('theta','03B8','0398'), - array('iota','03B9','0399'), - array('kappa','03BA','039A'), - array('lambda','03BB','039B'), - array('mu','03BC','039C'), - array('nu','03BD','039D'), - array('xi','03BE','039E'), - array('omicron','03BF','039F'), - array('pi','03C0','03A0'), - array('rho','03C1','03A1'), - array('sigma','03C3','03A3'), - array('tau','03C4','03A4'), - array('upsilon','03C5','03A5'), - array('phi','03C6','03A6'), - array('chi','03C7','03A7'), - array('psi','03C8','03A8'), - array('omega','03C9','03A9'), - /* Money */ - array('euro','20AC'), - array('yen','00A5'), - array('pound','20A4'), - /* Math */ - array('approx','2248'), - array('neq','2260'), - array('not','2310'), - array('def','2261'), - array('inf','221E'), - array('sqrt','221A'), - array('int','222B'), - /* Misc */ - array('copy','00A9'), - array('para','00A7'), - array('tm','2122'), /* Trademark symbol */ - array('rtm','00AE'), /* Registered trademark */ - array('degree','00b0'), - array('lte','2264'), /* Less than or equal */ - array('gte','2265'), /* Greater than or equal */ - - ); - - $n = count($iSymbols); - $i=0; - $found = false; - $aSymb = strtolower($aSymb); - while( $i < $n && !$found ) { - $found = $aSymb === $iSymbols[$i++][0]; - } - if( $found ) { - $ca = $iSymbols[--$i]; - if( $aCapital && count($ca)==3 ) - $s = $ca[2]; - else - $s = $ca[1]; - return sprintf('&#%04d;',hexdec($s)); - } - else - return ''; - } -} - - -?> diff --git a/html/lib/jpgraph/jpgraph_utils.inc.php b/html/lib/jpgraph/jpgraph_utils.inc.php deleted file mode 100644 index ca179c7e70..0000000000 --- a/html/lib/jpgraph/jpgraph_utils.inc.php +++ /dev/null @@ -1,709 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2016 Tony Murray - * @author Tony Murray - */ - -/*======================================================================= - // File: JPGRAPH_UTILS.INC - // Description: Collection of non-essential "nice to have" utilities - // Created: 2005-11-20 - // Ver: $Id: jpgraph_utils.inc.php 1777 2009-08-23 17:34:36Z ljp $ - // - // Copyright (c) Aditus Consulting. All rights reserved. - //======================================================================== - */ - -//=================================================== -// CLASS FuncGenerator -// Description: Utility class to help generate data for function plots. -// The class supports both parametric and regular functions. -//=================================================== -class FuncGenerator { - private $iFunc='',$iXFunc='',$iMin,$iMax,$iStepSize; - - function __construct($aFunc,$aXFunc='') { - $this->iFunc = $aFunc; - $this->iXFunc = $aXFunc; - } - - function E($aXMin,$aXMax,$aSteps=50) { - $this->iMin = $aXMin; - $this->iMax = $aXMax; - $this->iStepSize = ($aXMax-$aXMin)/$aSteps; - - if( $this->iXFunc != '' ) - $t = 'for($i='.$aXMin.'; $i<='.$aXMax.'; $i += '.$this->iStepSize.') {$ya[]='.$this->iFunc.';$xa[]='.$this->iXFunc.';}'; - elseif( $this->iFunc != '' ) - $t = 'for($x='.$aXMin.'; $x<='.$aXMax.'; $x += '.$this->iStepSize.') {$ya[]='.$this->iFunc.';$xa[]=$x;} $x='.$aXMax.';$ya[]='.$this->iFunc.';$xa[]=$x;'; - else - JpGraphError::RaiseL(24001);//('FuncGenerator : No function specified. '); - - @eval($t); - - // If there is an error in the function specifcation this is the only - // way we can discover that. - if( empty($xa) || empty($ya) ) - JpGraphError::RaiseL(24002);//('FuncGenerator : Syntax error in function specification '); - - return array($xa,$ya); - } -} - - -//============================================================================= -// CLASS DateScaleUtils -// Description: Help to create a manual date scale -//============================================================================= -define('DSUTILS_MONTH',1); // Major and minor ticks on a monthly basis -define('DSUTILS_MONTH1',1); // Major and minor ticks on a monthly basis -define('DSUTILS_MONTH2',2); // Major ticks on a bi-monthly basis -define('DSUTILS_MONTH3',3); // Major icks on a tri-monthly basis -define('DSUTILS_MONTH6',4); // Major on a six-monthly basis -define('DSUTILS_WEEK1',5); // Major ticks on a weekly basis -define('DSUTILS_WEEK2',6); // Major ticks on a bi-weekly basis -define('DSUTILS_WEEK4',7); // Major ticks on a quod-weekly basis -define('DSUTILS_DAY1',8); // Major ticks on a daily basis -define('DSUTILS_DAY2',9); // Major ticks on a bi-daily basis -define('DSUTILS_DAY4',10); // Major ticks on a qoud-daily basis -define('DSUTILS_YEAR1',11); // Major ticks on a yearly basis -define('DSUTILS_YEAR2',12); // Major ticks on a bi-yearly basis -define('DSUTILS_YEAR5',13); // Major ticks on a five-yearly basis - - -class DateScaleUtils { - public static $iMin=0, $iMax=0; - - private static $starthour,$startmonth, $startday, $startyear; - private static $endmonth, $endyear, $endday; - private static $tickPositions=array(),$minTickPositions=array(); - private static $iUseWeeks = true; - - static function UseWeekFormat($aFlg) { - self::$iUseWeeks = $aFlg; - } - - static function doYearly($aType,$aMinor=false) { - $i=0; $j=0; - $m = self::$startmonth; - $y = self::$startyear; - - if( self::$startday == 1 ) { - self::$tickPositions[$i++] = mktime(0,0,0,$m,1,$y); - } - ++$m; - - - switch( $aType ) { - case DSUTILS_YEAR1: - for($y=self::$startyear; $y <= self::$endyear; ++$y ) { - if( $aMinor ) { - while( $m <= 12 ) { - if( !($y == self::$endyear && $m > self::$endmonth) ) { - self::$minTickPositions[$j++] = mktime(0,0,0,$m,1,$y); - } - ++$m; - } - $m=1; - } - self::$tickPositions[$i++] = mktime(0,0,0,1,1,$y); - } - break; - case DSUTILS_YEAR2: - $y=self::$startyear; - while( $y <= self::$endyear ) { - self::$tickPositions[$i++] = mktime(0,0,0,1,1,$y); - for($k=0; $k < 1; ++$k ) { - ++$y; - if( $aMinor ) { - self::$minTickPositions[$j++] = mktime(0,0,0,1,1,$y); - } - } - ++$y; - } - break; - case DSUTILS_YEAR5: - $y=self::$startyear; - while( $y <= self::$endyear ) { - self::$tickPositions[$i++] = mktime(0,0,0,1,1,$y); - for($k=0; $k < 4; ++$k ) { - ++$y; - if( $aMinor ) { - self::$minTickPositions[$j++] = mktime(0,0,0,1,1,$y); - } - } - ++$y; - } - break; - } - } - - static function doDaily($aType,$aMinor=false) { - $m = self::$startmonth; - $y = self::$startyear; - $d = self::$startday; - $h = self::$starthour; - $i=0;$j=0; - - if( $h == 0 ) { - self::$tickPositions[$i++] = mktime(0,0,0,$m,$d,$y); - } - $t = mktime(0,0,0,$m,$d,$y); - - switch($aType) { - case DSUTILS_DAY1: - while( $t <= self::$iMax ) { - $t = strtotime('+1 day',$t); - self::$tickPositions[$i++] = $t; - if( $aMinor ) { - self::$minTickPositions[$j++] = strtotime('+12 hours',$t); - } - } - break; - case DSUTILS_DAY2: - while( $t <= self::$iMax ) { - $t = strtotime('+1 day',$t); - if( $aMinor ) { - self::$minTickPositions[$j++] = $t; - } - $t = strtotime('+1 day',$t); - self::$tickPositions[$i++] = $t; - } - break; - case DSUTILS_DAY4: - while( $t <= self::$iMax ) { - for($k=0; $k < 3; ++$k ) { - $t = strtotime('+1 day',$t); - if( $aMinor ) { - self::$minTickPositions[$j++] = $t; - } - } - $t = strtotime('+1 day',$t); - self::$tickPositions[$i++] = $t; - } - break; - } - } - - static function doWeekly($aType,$aMinor=false) { - $hpd = 3600*24; - $hpw = 3600*24*7; - // Find out week number of min date - $thursday = self::$iMin + $hpd * (3 - (date('w', self::$iMin) + 6) % 7); - $week = 1 + (date('z', $thursday) - (11 - date('w', mktime(0, 0, 0, 1, 1, date('Y', $thursday)))) % 7) / 7; - $daynumber = date('w',self::$iMin); - if( $daynumber == 0 ) $daynumber = 7; - $m = self::$startmonth; - $y = self::$startyear; - $d = self::$startday; - $i=0;$j=0; - // The assumption is that the weeks start on Monday. If the first day - // is later in the week then the first week tick has to be on the following - // week. - if( $daynumber == 1 ) { - self::$tickPositions[$i++] = mktime(0,0,0,$m,$d,$y); - $t = mktime(0,0,0,$m,$d,$y) + $hpw; - } - else { - $t = mktime(0,0,0,$m,$d,$y) + $hpd*(8-$daynumber); - } - - switch($aType) { - case DSUTILS_WEEK1: - $cnt=0; - break; - case DSUTILS_WEEK2: - $cnt=1; - break; - case DSUTILS_WEEK4: - $cnt=3; - break; - } - while( $t <= self::$iMax ) { - self::$tickPositions[$i++] = $t; - for($k=0; $k < $cnt; ++$k ) { - $t += $hpw; - if( $aMinor ) { - self::$minTickPositions[$j++] = $t; - } - } - $t += $hpw; - } - } - - static function doMonthly($aType,$aMinor=false) { - $monthcount=0; - $m = self::$startmonth; - $y = self::$startyear; - $i=0; $j=0; - - // Skip the first month label if it is before the startdate - if( self::$startday == 1 ) { - self::$tickPositions[$i++] = mktime(0,0,0,$m,1,$y); - $monthcount=1; - } - if( $aType == 1 ) { - if( self::$startday < 15 ) { - self::$minTickPositions[$j++] = mktime(0,0,0,$m,15,$y); - } - } - ++$m; - - // Loop through all the years included in the scale - for($y=self::$startyear; $y <= self::$endyear; ++$y ) { - // Loop through all the months. There are three cases to consider: - // 1. We are in the first year and must start with the startmonth - // 2. We are in the end year and we must stop at last month of the scale - // 3. A year in between where we run through all the 12 months - $stopmonth = $y == self::$endyear ? self::$endmonth : 12; - while( $m <= $stopmonth ) { - switch( $aType ) { - case DSUTILS_MONTH1: - // Set minor tick at the middle of the month - if( $aMinor ) { - if( $m <= $stopmonth ) { - if( !($y==self::$endyear && $m==$stopmonth && self::$endday < 15) ) - self::$minTickPositions[$j++] = mktime(0,0,0,$m,15,$y); - } - } - // Major at month - // Get timestamp of first hour of first day in each month - self::$tickPositions[$i++] = mktime(0,0,0,$m,1,$y); - - break; - case DSUTILS_MONTH2: - if( $aMinor ) { - // Set minor tick at start of each month - self::$minTickPositions[$j++] = mktime(0,0,0,$m,1,$y); - } - - // Major at every second month - // Get timestamp of first hour of first day in each month - if( $monthcount % 2 == 0 ) { - self::$tickPositions[$i++] = mktime(0,0,0,$m,1,$y); - } - break; - case DSUTILS_MONTH3: - if( $aMinor ) { - // Set minor tick at start of each month - self::$minTickPositions[$j++] = mktime(0,0,0,$m,1,$y); - } - // Major at every third month - // Get timestamp of first hour of first day in each month - if( $monthcount % 3 == 0 ) { - self::$tickPositions[$i++] = mktime(0,0,0,$m,1,$y); - } - break; - case DSUTILS_MONTH6: - if( $aMinor ) { - // Set minor tick at start of each month - self::$minTickPositions[$j++] = mktime(0,0,0,$m,1,$y); - } - // Major at every third month - // Get timestamp of first hour of first day in each month - if( $monthcount % 6 == 0 ) { - self::$tickPositions[$i++] = mktime(0,0,0,$m,1,$y); - } - break; - } - ++$m; - ++$monthcount; - } - $m=1; - } - - // For the case where all dates are within the same month - // we want to make sure we have at least two ticks on the scale - // since the scale want work properly otherwise - if(self::$startmonth == self::$endmonth && self::$startyear == self::$endyear && $aType==1 ) { - self::$tickPositions[$i++] = mktime(0 ,0 ,0, self::$startmonth + 1, 1, self::$startyear); - } - - return array(self::$tickPositions,self::$minTickPositions); - } - - static function GetTicks($aData,$aType=1,$aMinor=false,$aEndPoints=false) { - $n = count($aData); - return self::GetTicksFromMinMax($aData[0],$aData[$n-1],$aType,$aMinor,$aEndPoints); - } - - static function GetAutoTicks($aMin,$aMax,$aMaxTicks=10,$aMinor=false) { - $diff = $aMax - $aMin; - $spd = 3600*24; - $spw = $spd*7; - $spm = $spd*30; - $spy = $spd*352; - - if( self::$iUseWeeks ) - $w = 'W'; - else - $w = 'd M'; - - // Decision table for suitable scales - // First value: Main decision point - // Second value: Array of formatting depending on divisor for wanted max number of ticks. ,.. - $tt = array( - array($spw, array(1,DSUTILS_DAY1,'d M',2,DSUTILS_DAY2,'d M',-1,DSUTILS_DAY4,'d M')), - array($spm, array(1,DSUTILS_DAY1,'d M',2,DSUTILS_DAY2,'d M',4,DSUTILS_DAY4,'d M',7,DSUTILS_WEEK1,$w,-1,DSUTILS_WEEK2,$w)), - array($spy, array(1,DSUTILS_DAY1,'d M',2,DSUTILS_DAY2,'d M',4,DSUTILS_DAY4,'d M',7,DSUTILS_WEEK1,$w,14,DSUTILS_WEEK2,$w,30,DSUTILS_MONTH1,'M',60,DSUTILS_MONTH2,'M',-1,DSUTILS_MONTH3,'M')), - array(-1, array(30,DSUTILS_MONTH1,'M-Y',60,DSUTILS_MONTH2,'M-Y',90,DSUTILS_MONTH3,'M-Y',180,DSUTILS_MONTH6,'M-Y',352,DSUTILS_YEAR1,'Y',704,DSUTILS_YEAR2,'Y',-1,DSUTILS_YEAR5,'Y'))); - - $ntt = count($tt); - $nd = floor($diff/$spd); - for($i=0; $i < $ntt; ++$i ) { - if( $diff <= $tt[$i][0] || $i==$ntt-1) { - $t = $tt[$i][1]; - $n = count($t)/3; - for( $j=0; $j < $n; ++$j ) { - if( $nd/$t[3*$j] <= $aMaxTicks || $j==$n-1) { - $type = $t[3*$j+1]; - $fs = $t[3*$j+2]; - list($tickPositions,$minTickPositions) = self::GetTicksFromMinMax($aMin,$aMax,$type,$aMinor); - return array($fs,$tickPositions,$minTickPositions,$type); - } - } - } - } - } - - static function GetTicksFromMinMax($aMin,$aMax,$aType,$aMinor=false,$aEndPoints=false) { - self::$starthour = date('G',$aMin); - self::$startmonth = date('n',$aMin); - self::$startday = date('j',$aMin); - self::$startyear = date('Y',$aMin); - self::$endmonth = date('n',$aMax); - self::$endyear = date('Y',$aMax); - self::$endday = date('j',$aMax); - self::$iMin = $aMin; - self::$iMax = $aMax; - - if( $aType <= DSUTILS_MONTH6 ) { - self::doMonthly($aType,$aMinor); - } - elseif( $aType <= DSUTILS_WEEK4 ) { - self::doWeekly($aType,$aMinor); - } - elseif( $aType <= DSUTILS_DAY4 ) { - self::doDaily($aType,$aMinor); - } - elseif( $aType <= DSUTILS_YEAR5 ) { - self::doYearly($aType,$aMinor); - } - else { - JpGraphError::RaiseL(24003); - } - // put a label at the very left data pos - if( $aEndPoints ) { - $tickPositions[$i++] = $aData[0]; - } - - // put a label at the very right data pos - if( $aEndPoints ) { - $tickPositions[$i] = $aData[$n-1]; - } - - return array(self::$tickPositions,self::$minTickPositions); - } -} - -//============================================================================= -// Class ReadFileData -//============================================================================= -Class ReadFileData { - //---------------------------------------------------------------------------- - // Desciption: - // Read numeric data from a file. - // Each value should be separated by either a new line or by a specified - // separator character (default is ','). - // Before returning the data each value is converted to a proper float - // value. The routine is robust in the sense that non numeric data in the - // file will be discarded. - // - // Returns: - // The number of data values read on success, FALSE on failure - //---------------------------------------------------------------------------- - static function FromCSV($aFile,&$aData,$aSepChar=',',$aMaxLineLength=1024) { - $rh = @fopen($aFile,'r'); - if( $rh === false ) { - return false; - } - $tmp = array(); - $lineofdata = fgetcsv($rh, 1000, ','); - while ( $lineofdata !== FALSE) { - $tmp = array_merge($tmp,$lineofdata); - $lineofdata = fgetcsv($rh, $aMaxLineLength, $aSepChar); - } - fclose($rh); - - // Now make sure that all data is numeric. By default - // all data is read as strings - $n = count($tmp); - $aData = array(); - $cnt=0; - for($i=0; $i < $n; ++$i) { - if( $tmp[$i] !== "" ) { - $aData[$cnt++] = floatval($tmp[$i]); - } - } - return $cnt; - } - - //---------------------------------------------------------------------------- - // Desciption: - // Read numeric data from a file. - // Each value should be separated by either a new line or by a specified - // separator character (default is ','). - // Before returning the data each value is converted to a proper float - // value. The routine is robust in the sense that non numeric data in the - // file will be discarded. - // - // Options: - // 'separator' => ',', - // 'enclosure' => '"', - // 'readlength' => 1024, - // 'ignore_first' => false, - // 'first_as_key' => false - // 'escape' => '\', # PHP >= 5.3 only - // - // Returns: - // The number of lines read on success, FALSE on failure - //---------------------------------------------------------------------------- - static function FromCSV2($aFile, &$aData, $aOptions = array()) { - $aDefaults = array( - 'separator' => ',', - 'enclosure' => chr(34), - 'escape' => chr(92), - 'readlength' => 1024, - 'ignore_first' => false, - 'first_as_key' => false - ); - - $aOptions = array_merge( - $aDefaults, is_array($aOptions) ? $aOptions : array()); - - if( $aOptions['first_as_key'] ) { - $aOptions['ignore_first'] = true; - } - - $rh = @fopen($aFile, 'r'); - - if( $rh === false ) { - return false; - } - - $aData = array(); - $aLine = fgetcsv($rh, - $aOptions['readlength'], - $aOptions['separator'], - $aOptions['enclosure'] - /*, $aOptions['escape'] # PHP >= 5.3 only */ - ); - - // Use numeric array keys for the columns by default - // If specified use first lines values as assoc keys instead - $keys = array_keys($aLine); - if( $aOptions['first_as_key'] ) { - $keys = array_values($aLine); - } - - $num_lines = 0; - $num_cols = count($aLine); - - while ($aLine !== false) { - if( is_array($aLine) && count($aLine) != $num_cols ) { - JpGraphError::RaiseL(24004); - // 'ReadCSV2: Column count mismatch in %s line %d' - } - - // fgetcsv returns NULL for empty lines - if( !is_null($aLine) ) { - $num_lines++; - - if( !($aOptions['ignore_first'] && $num_lines == 1) && is_numeric($aLine[0]) ) { - for( $i = 0; $i < $num_cols; $i++ ) { - $aData[ $keys[$i] ][] = floatval($aLine[$i]); - } - } - } - - $aLine = fgetcsv($rh, - $aOptions['readlength'], - $aOptions['separator'], - $aOptions['enclosure'] - /*, $aOptions['escape'] # PHP >= 5.3 only*/ - ); - } - - fclose($rh); - - if( $aOptions['ignore_first'] ) { - $num_lines--; - } - - return $num_lines; - } - - // Read data from two columns in a plain text file - static function From2Col($aFile, $aCol1, $aCol2, $aSepChar=' ') { - $lines = @file($aFile,FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES); - if( $lines === false ) { - return false; - } - $s = '/[\s]+/'; - if( $aSepChar == ',' ) { - $s = '/[\s]*,[\s]*/'; - } - elseif( $aSepChar == ';' ) { - $s = '/[\s]*;[\s]*/'; - } - foreach( $lines as $line => $datarow ) { - $split = preg_split($s,$datarow); - $aCol1[] = floatval(trim($split[0])); - $aCol2[] = floatval(trim($split[1])); - } - - return count($lines); - } - - // Read data from one columns in a plain text file - static function From1Col($aFile, $aCol1) { - $lines = @file($aFile,FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES); - if( $lines === false ) { - return false; - } - foreach( $lines as $line => $datarow ) { - $aCol1[] = floatval(trim($datarow)); - } - - return count($lines); - } - - static function FromMatrix($aFile,$aSepChar=' ') { - $lines = @file($aFile,FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES); - if( $lines === false ) { - return false; - } - $mat = array(); - $reg = '/'.$aSepChar.'/'; - foreach( $lines as $line => $datarow ) { - $row = preg_split($reg,trim($datarow)); - foreach ($row as $key => $cell ) { - $row[$key] = floatval(trim($cell)); - } - $mat[] = $row; - } - return $mat; - } - - -} - -define('__LR_EPSILON', 1.0e-8); -//============================================================================= -// Class LinearRegression -//============================================================================= -class LinearRegression { - private $ix=array(),$iy=array(); - private $ib=0, $ia=0; - private $icalculated=false; - public $iDet=0, $iCorr=0, $iStdErr=0; - - public function __construct($aDataX,$aDataY) { - if( count($aDataX) !== count($aDataY) ) { - JpGraph::Raise('LinearRegression: X and Y data array must be of equal length.'); - } - $this->ix = $aDataX; - $this->iy = $aDataY; - } - - public function Calc() { - - $this->icalculated = true; - - $n = count($this->ix); - $sx2 = 0 ; - $sy2 = 0 ; - $sxy = 0 ; - $sx = 0 ; - $sy = 0 ; - - for( $i=0; $i < $n; ++$i ) { - $sx2 += $this->ix[$i] * $this->ix[$i]; - $sy2 += $this->iy[$i] * $this->iy[$i]; - $sxy += $this->ix[$i] * $this->iy[$i]; - $sx += $this->ix[$i]; - $sy += $this->iy[$i]; - } - - if( $n*$sx2 - $sx*$sx > __LR_EPSILON ) { - $this->ib = ($n*$sxy - $sx*$sy) / ( $n*$sx2 - $sx*$sx ); - $this->ia = ( $sy - $this->ib*$sx ) / $n; - - $sx = $this->ib * ( $sxy - $sx*$sy/$n ); - $sy2 = $sy2 - $sy*$sy/$n; - $sy = $sy2 - $sx; - - $this->iDet = $sx / $sy2; - $this->iCorr = sqrt($this->iDet); - if( $n > 2 ) { - $this->iStdErr = sqrt( $sy / ($n-2) ); - } - else { - $this->iStdErr = NAN ; - } - } - else { - $this->ib = 0; - $this->ia = 0; - } - - } - - public function GetAB() { - if( $this->icalculated == false ) - $this->Calc(); - return array($this->ia, $this->ib); - } - - public function GetStat() { - if( $this->icalculated == false ) - $this->Calc(); - return array($this->iStdErr, $this->iCorr, $this->iDet); - } - - public function GetY($aMinX, $aMaxX, $aStep=1) { - if( $this->icalculated == false ) - $this->Calc(); - - $yy = array(); - $i = 0; - for( $x=$aMinX; $x <= $aMaxX; $x += $aStep ) { - $xx[$i ] = $x; - $yy[$i++] = $this->ia + $this->ib * $x; - } - - return array($xx,$yy); - } - -} - -?> \ No newline at end of file diff --git a/html/lib/jpgraph/lang/de.inc.php b/html/lib/jpgraph/lang/de.inc.php deleted file mode 100644 index c92e5499d1..0000000000 --- a/html/lib/jpgraph/lang/de.inc.php +++ /dev/null @@ -1,542 +0,0 @@ -,) -$_jpg_messages = array( - -/* -** Headers wurden bereits gesendet - Fehler. Dies wird als HTML formatiert, weil es direkt als text zurueckgesendet wird -*/ -10 => array('
        JpGraph Fehler: -HTTP header wurden bereits gesendet.
        Fehler in der Datei %s in der Zeile %d.
        Erklärung:
        HTTP header wurden bereits zum Browser gesendet, wobei die Daten als Text gekennzeichnet wurden, bevor die Bibliothek die Chance hatte, seinen Bild-HTTP-Header zum Browser zu schicken. Dies verhindert, dass die Bibliothek Bilddaten zum Browser schicken kann (weil sie vom Browser als Text interpretiert würden und daher nur Mist dargestellt würde).

        Wahrscheinlich steht Text im Skript bevor Graph::Stroke() aufgerufen wird. Wenn dieser Text zum Browser gesendet wird, nimmt dieser an, dass die gesamten Daten aus Text bestehen. Such nach irgendwelchem Text, auch nach Leerzeichen und Zeilenumbrüchen, die eventuell bereits zum Browser gesendet wurden.

        Zum Beispiel ist ein oft auftretender Fehler, eine Leerzeile am Anfang der Datei oder vor Graph::Stroke() zu lassen."<?php".

        ',2), - -/* -** Setup Fehler -*/ -11 => array('Es wurde kein Pfad für CACHE_DIR angegeben. Bitte gib einen Pfad CACHE_DIR in der Datei jpg-config.inc an.',0), -12 => array('Es wurde kein Pfad für TTF_DIR angegeben und der Pfad kann nicht automatisch ermittelt werden. Bitte gib den Pfad in der Datei jpg-config.inc an.',0), -13 => array('The installed PHP version (%s) is not compatible with this release of the library. The library requires at least PHP version %s',2), - -/* -** jpgraph_bar -*/ - -2001 => array('Die Anzahl der Farben ist nicht gleich der Anzahl der Vorlagen in BarPlot::SetPattern().',0), -2002 => array('Unbekannte Vorlage im Aufruf von BarPlot::SetPattern().',0), -2003 => array('Anzahl der X- und Y-Koordinaten sind nicht identisch. Anzahl der X-Koordinaten: %d; Anzahl der Y-Koordinaten: %d.',2), -2004 => array('Alle Werte für ein Balkendiagramm (barplot) müssen numerisch sein. Du hast den Wert nr [%d] == %s angegeben.',2), -2005 => array('Du hast einen leeren Vektor für die Schattierungsfarben im Balkendiagramm (barplot) angegeben.',0), -2006 => array('Unbekannte Position für die Werte der Balken: %s.',1), -2007 => array('Kann GroupBarPlot nicht aus einem leeren Vektor erzeugen.',0), -2008 => array('GroupBarPlot Element nbr %d wurde nicht definiert oder ist leer.',0), -2009 => array('Eins der Objekte, das an GroupBar weitergegeben wurde ist kein Balkendiagramm (BarPlot). Versichere Dich, dass Du den GroupBarPlot aus einem Vektor von Balkendiagrammen (barplot) oder AccBarPlot-Objekten erzeugst. (Class = %s)',1), -2010 => array('Kann AccBarPlot nicht aus einem leeren Vektor erzeugen.',0), -2011 => array('AccBarPlot-Element nbr %d wurde nicht definiert oder ist leer.',1), -2012 => array('Eins der Objekte, das an AccBar weitergegeben wurde ist kein Balkendiagramm (barplot). Versichere Dich, dass Du den AccBar-Plot aus einem Vektor von Balkendiagrammen (barplot) erzeugst. (Class=%s)',1), -2013 => array('Du hast einen leeren Vektor für die Schattierungsfarben im Balkendiagramm (barplot) angegeben.',0), -2014 => array('Die Anzahl der Datenpunkte jeder Datenreihe in AccBarPlot muss gleich sein.',0), -2015 => array('Individual bar plots in an AccBarPlot or GroupBarPlot can not have specified X-coordinates',0), - - -/* -** jpgraph_date -*/ - -3001 => array('Es ist nur möglich, entweder SetDateAlign() oder SetTimeAlign() zu benutzen, nicht beides!',0), - -/* -** jpgraph_error -*/ - -4002 => array('Fehler bei den Eingabedaten von LineErrorPlot. Die Anzahl der Datenpunkte mus ein Mehrfaches von drei sein!',0), - -/* -** jpgraph_flags -*/ - -5001 => array('Unbekannte Flaggen-Größe (%d).',1), -5002 => array('Der Flaggen-Index %s existiert nicht.',1), -5003 => array('Es wurde eine ungültige Ordnungszahl (%d) für den Flaggen-Index angegeben.',1), -5004 => array('Der Landesname %s hat kein korrespondierendes Flaggenbild. Die Flagge mag existieren, abr eventuell unter einem anderen Namen, z.B. versuche "united states" statt "usa".',1), - - -/* -** jpgraph_gantt -*/ - -6001 => array('Interner Fehler. Die Höhe für ActivityTitles ist < 0.',0), -6002 => array('Es dürfen keine negativen Werte für die Gantt-Diagramm-Dimensionen angegeben werden. Verwende 0, wenn die Dimensionen automatisch ermittelt werden sollen.',0), -6003 => array('Ungültiges Format für den Bedingungs-Parameter bei Index=%d in CreateSimple(). Der Parameter muss bei index 0 starten und Vektoren in der Form (Row,Constrain-To,Constrain-Type) enthalten.',1), -6004 => array('Ungültiges Format für den Fortschritts-Parameter bei Index=%d in CreateSimple(). Der Parameter muss bei Index 0 starten und Vektoren in der Form (Row,Progress) enthalten.',1), -6005 => array('SetScale() ist nicht sinnvoll bei Gantt-Diagrammen.',0), -6006 => array('Das Gantt-Diagramm kann nicht automatisch skaliert werden. Es existieren keine Aktivitäten mit Termin. [GetBarMinMax() start >= n]',0), -6007 => array('Plausibiltätsprüfung für die automatische Gantt-Diagramm-Größe schlug fehl. Entweder die Breite (=%d) oder die Höhe (=%d) ist größer als MAX_GANTTIMG_SIZE. Dies kann möglicherweise durch einen falschen Wert bei einer Aktivität hervorgerufen worden sein.',2), -6008 => array('Du hast eine Bedingung angegeben von Reihe=%d bis Reihe=%d, die keine Aktivität hat.',2), -6009 => array('Unbekannter Bedingungstyp von Reihe=%d bis Reihe=%d',2), -6010 => array('Ungültiger Icon-Index für das eingebaute Gantt-Icon [%d]',1), -6011 => array('Argument für IconImage muss entweder ein String oder ein Integer sein.',0), -6012 => array('Unbekannter Typ bei der Gantt-Objekt-Title-Definition.',0), -6015 => array('Ungültige vertikale Position %d',1), -6016 => array('Der eingegebene Datums-String (%s) für eine Gantt-Aktivität kann nicht interpretiert werden. Versichere Dich, dass es ein gültiger Datumsstring ist, z.B. 2005-04-23 13:30',1), -6017 => array('Unbekannter Datumstyp in GanttScale (%s).',1), -6018 => array('Intervall für Minuten muss ein gerader Teiler einer Stunde sein, z.B. 1,5,10,12,15,20,30, etc. Du hast ein Intervall von %d Minuten angegeben.',1), -6019 => array('Die vorhandene Breite (%d) für die Minuten ist zu klein, um angezeigt zu werden. Bitte benutze die automatische Größenermittlung oder vergrößere die Breite des Diagramms.',1), -6020 => array('Das Intervall für die Stunden muss ein gerader Teiler eines Tages sein, z.B. 0:30, 1:00, 1:30, 4:00, etc. Du hast ein Intervall von %d eingegeben.',1), -6021 => array('Unbekanntes Format für die Woche.',0), -6022 => array('Die Gantt-Skala wurde nicht eingegeben.',0), -6023 => array('Wenn Du sowohl Stunden als auch Minuten anzeigen lassen willst, muss das Stunden-Interval gleich 1 sein (anderenfalls ist es nicht sinnvoll, Minuten anzeigen zu lassen).',0), -6024 => array('Das CSIM-Ziel muss als String angegeben werden. Der Start des Ziels ist: %d',1), -6025 => array('Der CSIM-Alt-Text muss als String angegeben werden. Der Beginn des Alt-Textes ist: %d',1), -6027 => array('Der Fortschrittswert muss im Bereich [0, 1] liegen.',0), -6028 => array('Die eingegebene Höhe (%d) für GanttBar ist nicht im zulässigen Bereich.',1), -6029 => array('Der Offset für die vertikale Linie muss im Bereich [0,1] sein.',0), -6030 => array('Unbekannte Pfeilrichtung für eine Verbindung.',0), -6031 => array('Unbekannter Pfeiltyp für eine Verbindung.',0), -6032 => array('Interner Fehler: Unbekannter Pfadtyp (=%d) für eine Verbindung.',1), -6033 => array('Array of fonts must contain arrays with 3 elements, i.e. (Family, Style, Size)',0), - -/* -** jpgraph_gradient -*/ - -7001 => array('Unbekannter Gradiententyp (=%d).',1), - -/* -** jpgraph_iconplot -*/ - -8001 => array('Der Mix-Wert für das Icon muss zwischen 0 und 100 sein.',0), -8002 => array('Die Ankerposition für Icons muss entweder "top", "bottom", "left", "right" oder "center" sein.',0), -8003 => array('Es ist nicht möglich, gleichzeitig ein Bild und eine Landesflagge für dasselbe Icon zu definieren',0), -8004 => array('Wenn Du Landesflaggen benutzen willst, musst Du die Datei "jpgraph_flags.php" hinzufügen (per include).',0), - -/* -** jpgraph_imgtrans -*/ - -9001 => array('Der Wert für die Bildtransformation ist außerhalb des zulässigen Bereichs. Der verschwindende Punkt am Horizont muss als Wert zwischen 0 und 1 angegeben werden.',0), - -/* -** jpgraph_lineplot -*/ - -10001 => array('Die Methode LinePlot::SetFilled() sollte nicht mehr benutzt werden. Benutze lieber SetFillColor()',0), -10002 => array('Der Plot ist zu kompliziert für FastLineStroke. Benutze lieber den StandardStroke()',0), -10003 => array('Each plot in an accumulated lineplot must have the same number of data points.',0), -/* -** jpgraph_log -*/ - -11001 => array('Deine Daten enthalten nicht-numerische Werte.',0), -11002 => array('Negative Werte können nicht für logarithmische Achsen verwendet werden.',0), -11003 => array('Deine Daten enthalten nicht-numerische Werte.',0), -11004 => array('Skalierungsfehler für die logarithmische Achse. Es gibt ein Problem mit den Daten der Achse. Der größte Wert muss größer sein als Null. Es ist mathematisch nicht möglich, einen Wert gleich Null in der Skala zu haben.',0), -11005 => array('Das Tick-Intervall für die logarithmische Achse ist nicht definiert. Lösche jeden Aufruf von SetTextLabelStart() oder SetTextTickInterval() bei der logarithmischen Achse.',0), - -/* -** jpgraph_mgraph -*/ - -12001 => array("Du benutzt GD 2.x und versuchst ein Nicht-Truecolor-Bild als Hintergrundbild zu benutzen. Um Hintergrundbilder mit GD 2.x zu benutzen, ist es notwendig Truecolor zu aktivieren, indem die USE_TRUECOLOR-Konstante auf TRUE gesetzt wird. Wegen eines Bugs in GD 2.0.1 ist die Qualität der Truetype-Schriften sehr schlecht, wenn man Truetype-Schriften mit Truecolor-Bildern verwendet.",0), -12002 => array('Ungültiger Dateiname für MGraph::SetBackgroundImage() : %s. Die Datei muss eine gültige Dateierweiterung haben (jpg,gif,png), wenn die automatische Typerkennung verwendet wird.',1), -12003 => array('Unbekannte Dateierweiterung (%s) in MGraph::SetBackgroundImage() für Dateiname: %s',2), -12004 => array('Das Bildformat des Hintergrundbildes (%s) wird von Deiner System-Konfiguration nicht unterstützt. ',1), -12005 => array('Das Hintergrundbild kann nicht gelesen werden: %s',1), -12006 => array('Es wurden ungültige Größen für Breite oder Höhe beim Erstellen des Bildes angegeben, (Breite=%d, Höhe=%d)',2), -12007 => array('Das Argument für MGraph::Add() ist nicht gültig für GD.',0), -12008 => array('Deine PHP- (und GD-lib-) Installation scheint keine bekannten Bildformate zu unterstützen.',0), -12009 => array('Deine PHP-Installation unterstützt das gewählte Bildformat nicht: %s',1), -12010 => array('Es konnte kein Bild als Datei %s erzeugt werden. Überprüfe, ob Du die entsprechenden Schreibrechte im aktuellen Verzeichnis hast.',1), -12011 => array('Es konnte kein Truecolor-Bild erzeugt werden. Überprüfe, ob Du wirklich die GD2-Bibliothek installiert hast.',0), -12012 => array('Es konnte kein Bild erzeugt werden. Überprüfe, ob Du wirklich die GD2-Bibliothek installiert hast.',0), - -/* -** jpgraph_pie3d -*/ - -14001 => array('Pie3D::ShowBorder(). Missbilligte Funktion. Benutze Pie3D::SetEdge(), um die Ecken der Tortenstücke zu kontrollieren.',0), -14002 => array('PiePlot3D::SetAngle() 3D-Torten-Projektionswinkel muss zwischen 5 und 85 Grad sein.',0), -14003 => array('Interne Festlegung schlug fehl. Pie3D::Pie3DSlice',0), -14004 => array('Tortenstück-Startwinkel muss zwischen 0 und 360 Grad sein.',0), -14005 => array('Pie3D Interner Fehler: Versuch, zweimal zu umhüllen bei der Suche nach dem Startindex.',0,), -14006 => array('Pie3D Interner Fehler: Z-Sortier-Algorithmus für 3D-Tortendiagramme funktioniert nicht einwandfrei (2). Versuch, zweimal zu umhüllen beim Erstellen des Bildes.',0), -14007 => array('Die Breite für das 3D-Tortendiagramm ist 0. Gib eine Breite > 0 an.',0), - -/* -** jpgraph_pie -*/ - -15001 => array('PiePLot::SetTheme() Unbekannter Stil: %s',1), -15002 => array('Argument für PiePlot::ExplodeSlice() muss ein Integer-Wert sein',0), -15003 => array('Argument für PiePlot::Explode() muss ein Vektor mit Integer-Werten sein.',0), -15004 => array('Tortenstück-Startwinkel muss zwischen 0 und 360 Grad sein.',0), -15005 => array('PiePlot::SetFont() sollte nicht mehr verwendet werden. Benutze stattdessen PiePlot->value->SetFont().',0), -15006 => array('PiePlot::SetSize() Radius für Tortendiagramm muss entweder als Bruch [0, 0.5] der Bildgröße oder als Absoluwert in Pixel im Bereich [10, 1000] angegeben werden.',0), -15007 => array('PiePlot::SetFontColor() sollte nicht mehr verwendet werden. Benutze stattdessen PiePlot->value->SetColor()..',0), -15008 => array('PiePlot::SetLabelType() der Typ für Tortendiagramme muss entweder 0 or 1 sein (nicht %d).',1), -15009 => array('Ungültiges Tortendiagramm. Die Summe aller Daten ist Null.',0), -15010 => array('Die Summe aller Daten ist Null.',0), -15011 => array('Um Bildtransformationen benutzen zu können, muss die Datei jpgraph_imgtrans.php eingefügt werden (per include).',0), - -/* -** jpgraph_plotband -*/ - -16001 => array('Die Dichte für das Pattern muss zwischen 1 und 100 sein. (Du hast %f eingegeben)',1), -16002 => array('Es wurde keine Position für das Pattern angegeben.',0), -16003 => array('Unbekannte Pattern-Definition (%d)',0), -16004 => array('Der Mindeswert für das PlotBand ist größer als der Maximalwert. Bitte korrigiere dies!',0), - - -/* -** jpgraph_polar -*/ - -17001 => array('PolarPlots müssen eine gerade Anzahl von Datenpunkten haben. Jeder Datenpunkt ist ein Tupel (Winkel, Radius).',0), -17002 => array('Unbekannte Ausrichtung für X-Achsen-Titel. (%s)',1), -//17003 => array('Set90AndMargin() wird für PolarGraph nicht unterstützt.',0), -17004 => array('Unbekannter Achsentyp für PolarGraph. Er muss entweder \'lin\' oder \'log\' sein.',0), - -/* -** jpgraph_radar -*/ - -18001 => array('ClientSideImageMaps werden für RadarPlots nicht unterstützt.',0), -18002 => array('RadarGraph::SupressTickMarks() sollte nicht mehr verwendet werden. Benutze stattdessen HideTickMarks().',0), -18003 => array('Ungültiger Achsentyp für RadarPlot (%s). Er muss entweder \'lin\' oder \'log\' sein.',1), -18004 => array('Die RadarPlot-Größe muss zwischen 0.1 und 1 sein. (Dein Wert=%f)',1), -18005 => array('RadarPlot: nicht unterstützte Tick-Dichte: %d',1), -18006 => array('Minimum Daten %f (RadarPlots sollten nur verwendet werden, wenn alle Datenpunkte einen Wert > 0 haben).',1), -18007 => array('Die Anzahl der Titel entspricht nicht der Anzahl der Datenpunkte.',0), -18008 => array('Jeder RadarPlot muss die gleiche Anzahl von Datenpunkten haben.',0), - -/* -** jpgraph_regstat -*/ - -19001 => array('Spline: Anzahl der X- und Y-Koordinaten muss gleich sein.',0), -19002 => array('Ungültige Dateneingabe für Spline. Zwei oder mehr aufeinanderfolgende X-Werte sind identisch. Jeder eigegebene X-Wert muss unterschiedlich sein, weil vom mathematischen Standpunkt ein Eins-zu-Eins-Mapping vorliegen muss, d.h. jeder X-Wert korrespondiert mit exakt einem Y-Wert.',0), -19003 => array('Bezier: Anzahl der X- und Y-Koordinaten muss gleich sein.',0), - -/* -** jpgraph_scatter -*/ - -20001 => array('Fieldplots müssen die gleiche Anzahl von X und Y Datenpunkten haben.',0), -20002 => array('Bei Fieldplots muss ein Winkel für jeden X und Y Datenpunkt angegeben werden.',0), -20003 => array('Scatterplots müssen die gleiche Anzahl von X- und Y-Datenpunkten haben.',0), - -/* -** jpgraph_stock -*/ - -21001 => array('Die Anzahl der Datenwerte für Stock-Charts müssen ein Mehrfaches von %d Datenpunkten sein.',1), - -/* -** jpgraph_plotmark -*/ - -23001 => array('Der Marker "%s" existiert nicht in der Farbe: %d',2), -23002 => array('Der Farb-Index ist zu hoch für den Marker "%s"',1), -23003 => array('Ein Dateiname muss angegeben werden, wenn Du den Marker-Typ auf MARK_IMG setzt.',0), - -/* -** jpgraph_utils -*/ - -24001 => array('FuncGenerator : Keine Funktion definiert. ',0), -24002 => array('FuncGenerator : Syntax-Fehler in der Funktionsdefinition ',0), -24003 => array('DateScaleUtils: Unknown tick type specified in call to GetTicks()',0), -24004 => array('ReadCSV2: Die anzahl der spalten fehler in %s reihe %d',2), -/* -** jpgraph -*/ - -25001 => array('Diese PHP-Installation ist nicht mit der GD-Bibliothek kompiliert. Bitte kompiliere PHP mit GD-Unterstützung neu, damit JpGraph funktioniert. (Weder die Funktion imagetypes() noch imagecreatefromstring() existiert!)',0), -25002 => array('Diese PHP-Installation scheint nicht die benötigte GD-Bibliothek zu unterstützen. Bitte schau in der PHP-Dokumentation nach, wie man die GD-Bibliothek installiert und aktiviert.',0), -25003 => array('Genereller PHP Fehler : Bei %s:%d : %s',3), -25004 => array('Genereller PHP Fehler : %s ',1), -25005 => array('PHP_SELF, die PHP-Global-Variable kann nicht ermittelt werden. PHP kann nicht von der Kommandozeile gestartet werden, wenn der Cache oder die Bilddateien automatisch benannt werden sollen.',0), -25006 => array('Die Benutzung der FF_CHINESE (FF_BIG5) Schriftfamilie benötigt die iconv() Funktion in Deiner PHP-Konfiguration. Dies wird nicht defaultmäßig in PHP kompiliert (benötigt "--width-iconv" bei der Konfiguration).',0), -25007 => array('Du versuchst das lokale (%s) zu verwenden, was von Deiner PHP-Installation nicht unterstützt wird. Hinweis: Benutze \'\', um das defaultmäßige Lokale für diese geographische Region festzulegen.',1), -25008 => array('Die Bild-Breite und Höhe in Graph::Graph() müssen numerisch sein',0), -25009 => array('Die Skalierung der Achsen muss angegeben werden mit Graph::SetScale()',0), - -25010 => array('Graph::Add() Du hast versucht, einen leeren Plot zum Graph hinzuzufügen.',0), -25011 => array('Graph::AddY2() Du hast versucht, einen leeren Plot zum Graph hinzuzufügen.',0), -25012 => array('Graph::AddYN() Du hast versucht, einen leeren Plot zum Graph hinzuzufügen.',0), -25013 => array('Es können nur Standard-Plots zu multiplen Y-Achsen hinzugefügt werden',0), -25014 => array('Graph::AddText() Du hast versucht, einen leeren Text zum Graph hinzuzufügen.',0), -25015 => array('Graph::AddLine() Du hast versucht, eine leere Linie zum Graph hinzuzufügen.',0), -25016 => array('Graph::AddBand() Du hast versucht, ein leeres Band zum Graph hinzuzufügen.',0), -25017 => array('Du benutzt GD 2.x und versuchst, ein Hintergrundbild in einem Truecolor-Bild zu verwenden. Um Hintergrundbilder mit GD 2.x zu verwenden, ist es notwendig, Truecolor zu aktivieren, indem die USE_TRUECOLOR-Konstante auf TRUE gesetzt wird. Wegen eines Bugs in GD 2.0.1 ist die Qualität der Schrift sehr schlecht, wenn Truetype-Schrift in Truecolor-Bildern verwendet werden.',0), -25018 => array('Falscher Dateiname für Graph::SetBackgroundImage() : "%s" muss eine gültige Dateinamenerweiterung (jpg,gif,png) haben, wenn die automatische Dateityperkennung verwenndet werden soll.',1), -25019 => array('Unbekannte Dateinamenerweiterung (%s) in Graph::SetBackgroundImage() für Dateiname: "%s"',2), - -25020 => array('Graph::SetScale(): Dar Maximalwert muss größer sein als der Mindestwert.',0), -25021 => array('Unbekannte Achsendefinition für die Y-Achse. (%s)',1), -25022 => array('Unbekannte Achsendefinition für die X-Achse. (%s)',1), -25023 => array('Nicht unterstützter Y2-Achsentyp: "%s" muss einer von (lin,log,int) sein.',1), -25024 => array('Nicht unterstützter X-Achsentyp: "%s" muss einer von (lin,log,int) sein.',1), -25025 => array('Nicht unterstützte Tick-Dichte: %d',1), -25026 => array('Nicht unterstützter Typ der nicht angegebenen Y-Achse. Du hast entweder: 1. einen Y-Achsentyp für automatisches Skalieren definiert, aber keine Plots angegeben. 2. eine Achse direkt definiert, aber vergessen, die Tick-Dichte zu festzulegen.',0), -25027 => array('Kann cached CSIM "%s" zum Lesen nicht öffnen.',1), -25028 => array('Apache/PHP hat keine Schreibrechte, in das CSIM-Cache-Verzeichnis (%s) zu schreiben. Überprüfe die Rechte.',1), -25029 => array('Kann nicht in das CSIM "%s" schreiben. Überprüfe die Schreibrechte und den freien Speicherplatz.',1), - -25030 => array('Fehlender Skriptname für StrokeCSIM(). Der Name des aktuellen Skriptes muss als erster Parameter von StrokeCSIM() angegeben werden.',0), -25031 => array('Der Achsentyp muss mittels Graph::SetScale() angegeben werden.',0), -25032 => array('Es existieren keine Plots für die Y-Achse nbr:%d',1), -25033 => array('',0), -25034 => array('Undefinierte X-Achse kann nicht gezeichnet werden. Es wurden keine Plots definiert.',0), -25035 => array('Du hast Clipping aktiviert. Clipping wird nur für Diagramme mit 0 oder 90 Grad Rotation unterstützt. Bitte verändere Deinen Rotationswinkel (=%d Grad) dementsprechend oder deaktiviere Clipping.',1), -25036 => array('Unbekannter Achsentyp AxisStyle() : %s',1), -25037 => array('Das Bildformat Deines Hintergrundbildes (%s) wird von Deiner System-Konfiguration nicht unterstützt. ',1), -25038 => array('Das Hintergrundbild scheint von einem anderen Typ (unterschiedliche Dateierweiterung) zu sein als der angegebene Typ. Angegebenen: %s; Datei: %s',2), -25039 => array('Hintergrundbild kann nicht gelesen werden: "%s"',1), - -25040 => array('Es ist nicht möglich, sowohl ein Hintergrundbild als auch eine Hintergrund-Landesflagge anzugeben.',0), -25041 => array('Um Landesflaggen als Hintergrund benutzen zu können, muss die Datei "jpgraph_flags.php" eingefügt werden (per include).',0), -25042 => array('Unbekanntes Hintergrundbild-Layout',0), -25043 => array('Unbekannter Titelhintergrund-Stil.',0), -25044 => array('Automatisches Skalieren kann nicht verwendet werden, weil es unmöglich ist, einen gültigen min/max Wert für die Y-Achse zu ermitteln (nur Null-Werte).',0), -25045 => array('Die Schriftfamilien FF_HANDWRT und FF_BOOK sind wegen Copyright-Problemen nicht mehr verfügbar. Diese Schriften können nicht mehr mit JpGraph verteilt werden. Bitte lade Dir Schriften von http://corefonts.sourceforge.net/ herunter.',0), -25046 => array('Angegebene TTF-Schriftfamilie (id=%d) ist unbekannt oder existiert nicht. Bitte merke Dir, dass TTF-Schriften wegen Copyright-Problemen nicht mit JpGraph mitgeliefert werden. Du findest MS-TTF-Internetschriften (arial, courier, etc.) zum Herunterladen unter http://corefonts.sourceforge.net/',1), -25047 => array('Stil %s ist nicht verfügbar für Schriftfamilie %s',2), -25048 => array('Unbekannte Schriftstildefinition [%s].',1), -25049 => array('Schriftdatei "%s" ist nicht lesbar oder existiert nicht.',1), - -25050 => array('Erstes Argument für Text::Text() muss ein String sein.',0), -25051 => array('Ungültige Richtung angegeben für Text.',0), -25052 => array('PANIK: Interner Fehler in SuperScript::Stroke(). Unbekannte vertikale Ausrichtung für Text.',0), -25053 => array('PANIK: Interner Fehler in SuperScript::Stroke(). Unbekannte horizontale Ausrichtung für Text.',0), -25054 => array('Interner Fehler: Unbekannte Grid-Achse %s',1), -25055 => array('Axis::SetTickDirection() sollte nicht mehr verwendet werden. Benutze stattdessen Axis::SetTickSide().',0), -25056 => array('SetTickLabelMargin() sollte nicht mehr verwendet werden. Benutze stattdessen Axis::SetLabelMargin().',0), -25057 => array('SetTextTicks() sollte nicht mehr verwendet werden. Benutze stattdessen SetTextTickInterval().',0), -25058 => array('TextLabelIntevall >= 1 muss angegeben werden.',0), -25059 => array('SetLabelPos() sollte nicht mehr verwendet werden. Benutze stattdessen Axis::SetLabelSide().',0), - -25060 => array('Unbekannte Ausrichtung angegeben für X-Achsentitel (%s).',1), -25061 => array('Unbekannte Ausrichtung angegeben für Y-Achsentitel (%s).',1), -25062 => array('Label unter einem Winkel werden für die Y-Achse nicht unterstützt.',0), -25063 => array('Ticks::SetPrecision() sollte nicht mehr verwendet werden. Benutze stattdessen Ticks::SetLabelFormat() (oder Ticks::SetFormatCallback()).',0), -25064 => array('Kleinere oder größere Schrittgröße ist 0. Überprüfe, ob Du fälschlicherweise SetTextTicks(0) in Deinem Skript hast. Wenn dies nicht der Fall ist, bist Du eventuell über einen Bug in JpGraph gestolpert. Bitte sende einen Report und füge den Code an, der den Fehler verursacht hat.',0), -25065 => array('Tick-Positionen müssen als array() angegeben werden',0), -25066 => array('Wenn die Tick-Positionen und -Label von Hand eingegeben werden, muss die Anzahl der Ticks und der Label gleich sein.',0), -25067 => array('Deine von Hand eingegebene Achse und Ticks sind nicht korrekt. Die Skala scheint zu klein zu sein für den Tickabstand.',0), -25068 => array('Ein Plot hat eine ungültige Achse. Dies kann beispielsweise der Fall sein, wenn Du automatisches Text-Skalieren verwendest, um ein Liniendiagramm zu zeichnen mit nur einem Datenpunkt, oder wenn die Bildfläche zu klein ist. Es kann auch der Fall sein, dass kein Datenpunkt einen numerischen Wert hat (vielleicht nur \'-\' oder \'x\').',0), -25069 => array('Grace muss größer sein als 0',0), - -25070 => array('Deine Daten enthalten nicht-numerische Werte.',0), -25071 => array('Du hast mit SetAutoMin() einen Mindestwert angegeben, der größer ist als der Maximalwert für die Achse. Dies ist nicht möglich.',0), -25072 => array('Du hast mit SetAutoMax() einen Maximalwert angegeben, der kleiner ist als der Minimalwert der Achse. Dies ist nicht möglich.',0), -25073 => array('Interner Fehler. Der Integer-Skalierungs-Algorithmus-Vergleich ist außerhalb der Grenzen (r=%f).',1), -25074 => array('Interner Fehler. Der Skalierungsbereich ist negativ (%f) [für %s Achse]. Dieses Problem könnte verursacht werden durch den Versuch, \'ungültige\' Werte in die Daten-Vektoren einzugeben (z.B. nur String- oder NULL-Werte), was beim automatischen Skalieren einen Fehler erzeugt.',2), -25075 => array('Die automatischen Ticks können nicht gesetzt werden, weil min==max.',0), -25077 => array('Einstellfaktor für die Farbe muss größer sein als 0',0), -25078 => array('Unbekannte Farbe: %s',1), -25079 => array('Unbekannte Farbdefinition: %s, Größe=%d',2), - -25080 => array('Der Alpha-Parameter für Farben muss zwischen 0.0 und 1.0 liegen.',0), -25081 => array('Das ausgewählte Grafikformat wird entweder nicht unterstützt oder ist unbekannt [%s]',1), -25082 => array('Es wurden ungültige Größen für Breite und Höhe beim Erstellen des Bildes definiert (Breite=%d, Höhe=%d).',2), -25083 => array('Es wurde eine ungültige Größe beim Kopieren des Bildes angegeben. Die Größe für das kopierte Bild wurde auf 1 Pixel oder weniger gesetzt.',0), -25084 => array('Fehler beim Erstellen eines temporären GD-Canvas. Möglicherweise liegt ein Arbeitsspeicherproblem vor.',0), -25085 => array('Ein Bild kann nicht aus dem angegebenen String erzeugt werden. Er ist entweder in einem nicht unterstützen Format oder er represäntiert ein kaputtes Bild.',0), -25086 => array('Du scheinst nur GD 1.x installiert zu haben. Um Alphablending zu aktivieren, ist GD 2.x oder höher notwendig. Bitte installiere GD 2.x oder versichere Dich, dass die Konstante USE_GD2 richtig gesetzt ist. Standardmäßig wird die installierte GD-Version automatisch erkannt. Ganz selten wird GD2 erkannt, obwohl nur GD1 installiert ist. Die Konstante USE_GD2 muss dann zu "false" gesetzt werden.',0), -25087 => array('Diese PHP-Version wurde ohne TTF-Unterstützung konfiguriert. PHP muss mit TTF-Unterstützung neu kompiliert und installiert werden.',0), -25088 => array('Die GD-Schriftunterstützung wurde falsch konfiguriert. Der Aufruf von imagefontwidth() ist fehlerhaft.',0), -25089 => array('Die GD-Schriftunterstützung wurde falsch konfiguriert. Der Aufruf von imagefontheight() ist fehlerhaft.',0), - -25090 => array('Unbekannte Richtung angegeben im Aufruf von StrokeBoxedText() [%s].',1), -25091 => array('Die interne Schrift untestützt das Schreiben von Text in einem beliebigen Winkel nicht. Benutze stattdessen TTF-Schriften.',0), -25092 => array('Es liegt entweder ein Konfigurationsproblem mit TrueType oder ein Problem beim Lesen der Schriftdatei "%s" vor. Versichere Dich, dass die Datei existiert und Leserechte und -pfad vergeben sind. (wenn \'basedir\' restriction in PHP aktiviert ist, muss die Schriftdatei im Dokumentwurzelverzeichnis abgelegt werden). Möglicherweise ist die FreeType-Bibliothek falsch installiert. Versuche, mindestens zur FreeType-Version 2.1.13 zu aktualisieren und kompiliere GD mit einem korrekten Setup neu, damit die FreeType-Bibliothek gefunden werden kann.',1), -25093 => array('Die Schriftdatei "%s" kann nicht gelesen werden beim Aufruf von Image::GetBBoxTTF. Bitte versichere Dich, dass die Schrift gesetzt wurde, bevor diese Methode aufgerufen wird, und dass die Schrift im TTF-Verzeichnis installiert ist.',1), -25094 => array('Die Textrichtung muss in einem Winkel zwischen 0 und 90 engegeben werden.',0), -25095 => array('Unbekannte Schriftfamilien-Definition. ',0), -25096 => array('Der Farbpalette können keine weiteren Farben zugewiesen werden. Dem Bild wurde bereits die größtmögliche Anzahl von Farben (%d) zugewiesen und die Palette ist voll. Verwende stattdessen ein TrueColor-Bild',0), -25097 => array('Eine Farbe wurde als leerer String im Aufruf von PushColor() angegegeben.',0), -25098 => array('Negativer Farbindex. Unpassender Aufruf von PopColor().',0), -25099 => array('Die Parameter für Helligkeit und Kontrast sind außerhalb des zulässigen Bereichs [-1,1]',0), - -25100 => array('Es liegt ein Problem mit der Farbpalette und dem GD-Setup vor. Bitte deaktiviere anti-aliasing oder verwende GD2 mit TrueColor. Wenn die GD2-Bibliothek installiert ist, versichere Dich, dass die Konstante USE_GD2 auf "true" gesetzt und TrueColor aktiviert ist.',0), -25101 => array('Ungültiges numerisches Argument für SetLineStyle(): (%d)',1), -25102 => array('Ungültiges String-Argument für SetLineStyle(): %s',1), -25103 => array('Ungültiges Argument für SetLineStyle %s',1), -25104 => array('Unbekannter Linientyp: %s',1), -25105 => array('Es wurden NULL-Daten für ein gefülltes Polygon angegeben. Sorge dafür, dass keine NULL-Daten angegeben werden.',0), -25106 => array('Image::FillToBorder : es können keine weiteren Farben zugewiesen werden.',0), -25107 => array('In Datei "%s" kann nicht geschrieben werden. Überprüfe die aktuellen Schreibrechte.',1), -25108 => array('Das Bild kann nicht gestreamt werden. Möglicherweise liegt ein Fehler im PHP/GD-Setup vor. Kompiliere PHP neu und verwende die eingebaute GD-Bibliothek, die mit PHP angeboten wird.',0), -25109 => array('Deine PHP- (und GD-lib-) Installation scheint keine bekannten Grafikformate zu unterstützen. Sorge zunächst dafür, dass GD als PHP-Modul kompiliert ist. Wenn Du außerdem JPEG-Bilder verwenden willst, musst Du die JPEG-Bibliothek installieren. Weitere Details sind in der PHP-Dokumentation zu finden.',0), - -25110 => array('Dein PHP-Installation unterstützt das gewählte Grafikformat nicht: %s',1), -25111 => array('Das gecachete Bild %s kann nicht gelöscht werden. Problem mit den Rechten?',1), -25112 => array('Das Datum der gecacheten Datei (%s) liegt in der Zukunft.',1), -25113 => array('Das gecachete Bild %s kann nicht gelöscht werden. Problem mit den Rechten?',1), -25114 => array('PHP hat nicht die erforderlichen Rechte, um in die Cache-Datei %s zu schreiben. Bitte versichere Dich, dass der Benutzer, der PHP anwendet, die entsprechenden Schreibrechte für die Datei hat, wenn Du das Cache-System in JPGraph verwenden willst.',1), -25115 => array('Berechtigung für gecachetes Bild %s kann nicht gesetzt werden. Problem mit den Rechten?',1), -25116 => array('Datei kann nicht aus dem Cache %s geöffnet werden',1), -25117 => array('Gecachetes Bild %s kann nicht zum Lesen geöffnet werden.',1), -25118 => array('Verzeichnis %s kann nicht angelegt werden. Versichere Dich, dass PHP die Schreibrechte in diesem Verzeichnis hat.',1), -25119 => array('Rechte für Datei %s können nicht gesetzt werden. Problem mit den Rechten?',1), - -25120 => array('Die Position für die Legende muss als Prozentwert im Bereich 0-1 angegeben werden.',0), -25121 => array('Eine leerer Datenvektor wurde für den Plot eingegeben. Es muss wenigstens ein Datenpunkt vorliegen.',0), -25122 => array('Stroke() muss als Subklasse der Klasse Plot definiert sein.',0), -25123 => array('Du kannst keine Text-X-Achse mit X-Koordinaten verwenden. Benutze stattdessen eine "int" oder "lin" Achse.',0), -25124 => array('Der Eingabedatenvektor mus aufeinanderfolgende Werte von 0 aufwärts beinhalten. Der angegebene Y-Vektor beginnt mit leeren Werten (NULL).',0), -25125 => array('Ungültige Richtung für statische Linie.',0), -25126 => array('Es kann kein TrueColor-Bild erzeugt werden. Überprüfe, ob die GD2-Bibliothek und PHP korrekt aufgesetzt wurden.',0), -25127 => array('The library has been configured for automatic encoding conversion of Japanese fonts. This requires that PHP has the mb_convert_encoding() function. Your PHP installation lacks this function (PHP needs the "--enable-mbstring" when compiled).',0), -25128 => array('The function imageantialias() is not available in your PHP installation. Use the GD version that comes with PHP and not the standalone version.',0), -25129 => array('Anti-alias can not be used with dashed lines. Please disable anti-alias or use solid lines.',0), -25130 => array('Too small plot area. (%d x %d). With the given image size and margins there is to little space left for the plot. Increase the plot size or reduce the margins.',2), - -25131 => array('StrokeBoxedText2() only supports TTF fonts and not built-in bitmap fonts.',0), - -/* -** jpgraph_led -*/ - -25500 => array('Multibyte strings must be enabled in the PHP installation in order to run the LED module so that the function mb_strlen() is available. See PHP documentation for more information.',0), - - -/* -**--------------------------------------------------------------------------------------------- -** Pro-version strings -**--------------------------------------------------------------------------------------------- -*/ - -/* -** jpgraph_table -*/ - -27001 => array('GTextTable: Ungültiges Argument für Set(). Das Array-Argument muss 2-- dimensional sein.',0), -27002 => array('GTextTable: Ungültiges Argument für Set()',0), -27003 => array('GTextTable: Falsche Anzahl von Argumenten für GTextTable::SetColor()',0), -27004 => array('GTextTable: Angegebener Zellenbereich, der verschmolzen werden soll, ist ungültig.',0), -27005 => array('GTextTable: Bereits verschmolzene Zellen im Bereich (%d,%d) bis (%d,%d) können nicht ein weiteres Mal verschmolzen werden.',4), -27006 => array('GTextTable: Spalten-Argument = %d liegt außerhalb der festgelegten Tabellengröße.',1), -27007 => array('GTextTable: Zeilen-Argument = %d liegt außerhalb der festgelegten Tabellengröße.',1), -27008 => array('GTextTable: Spalten- und Zeilengröße müssen zu den Dimensionen der Tabelle passen.',0), -27009 => array('GTextTable: Die Anzahl der Tabellenspalten oder -zeilen ist 0. Versichere Dich, dass die Methoden Init() oder Set() aufgerufen werden.',0), -27010 => array('GTextTable: Es wurde keine Ausrichtung beim Aufruf von SetAlign() angegeben.',0), -27011 => array('GTextTable: Es wurde eine unbekannte Ausrichtung beim Aufruf von SetAlign() abgegeben. Horizontal=%s, Vertikal=%s',2), -27012 => array('GTextTable: Interner Fehler. Es wurde ein ungültiges Argument festgeleget %s',1), -27013 => array('GTextTable: Das Argument für FormatNumber() muss ein String sein.',0), -27014 => array('GTextTable: Die Tabelle wurde weder mit einem Aufruf von Set() noch von Init() initialisiert.',0), -27015 => array('GTextTable: Der Zellenbildbedingungstyp muss entweder TIMG_WIDTH oder TIMG_HEIGHT sein.',0), - -/* -** jpgraph_windrose -*/ - -22001 => array('Die Gesamtsumme der prozentualen Anteile aller Windrosenarme darf 100%% nicht überschreiten!\n(Aktuell max: %d)',1), -22002 => array('Das Bild ist zu klein für eine Skala. Bitte vergrößere das Bild.',0), -22004 => array('Die Etikettendefinition für Windrosenrichtungen müssen 16 Werte haben (eine für jede Kompassrichtung).',0), -22005 => array('Der Linientyp für radiale Linien muss einer von ("solid","dotted","dashed","longdashed") sein.',0), -22006 => array('Es wurde ein ungültiger Windrosentyp angegeben.',0), -22007 => array('Es wurden zu wenig Werte für die Bereichslegende angegeben.',0), -22008 => array('Interner Fehler: Versuch, eine freie Windrose zu plotten, obwohl der Typ keine freie Windrose ist.',0), -22009 => array('Du hast die gleiche Richtung zweimal angegeben, einmal mit einem Winkel und einmal mit einer Kompassrichtung (%f Grad).',0), -22010 => array('Die Richtung muss entweder ein numerischer Wert sein oder eine der 16 Kompassrichtungen',0), -22011 => array('Der Windrosenindex muss ein numerischer oder Richtungswert sein. Du hast angegeben Index=%d',1), -22012 => array('Die radiale Achsendefinition für die Windrose enthält eine nicht aktivierte Richtung.',0), -22013 => array('Du hast dasselbe Look&Feel für die gleiche Kompassrichtung zweimal engegeben, einmal mit Text und einmal mit einem Index (Index=%d)',1), -22014 => array('Der Index für eine Kompassrichtung muss zwischen 0 und 15 sein.',0), -22015 => array('Du hast einen unbekannten Windrosenplottyp angegeben.',0), -22016 => array('Der Windrosenarmindex muss ein numerischer oder ein Richtungswert sein.',0), -22017 => array('Die Windrosendaten enthalten eine Richtung, die nicht aktiviert ist. Bitte berichtige, welche Label angezeigt werden sollen.',0), -22018 => array('Du hast für dieselbe Kompassrichtung zweimal Daten angegeben, einmal mit Text und einmal mit einem Index (Index=%d)',1), -22019 => array('Der Index für eine Richtung muss zwischen 0 und 15 sein. Winkel dürfen nicht für einen regelmäßigen Windplot angegeben werden, sondern entweder ein Index oder eine Kompassrichtung.',0), -22020 => array('Der Windrosenplot ist zu groß für die angegebene Bildgröße. Benutze entweder WindrosePlot::SetSize(), um den Plot kleiner zu machen oder vergrößere das Bild im ursprünglichen Aufruf von WindroseGraph().',0), -22021 => array('It is only possible to add Text, IconPlot or WindrosePlot to a Windrose Graph',0), - -/* -** jpgraph_odometer -*/ - -13001 => array('Unbekannter Nadeltypstil (%d).',1), -13002 => array('Ein Wert für das Odometer (%f) ist außerhalb des angegebenen Bereichs [%f,%f]',3), - -/* -** jpgraph_barcode -*/ - -1001 => array('Unbekannte Kodier-Specifikation: %s',1), -1002 => array('datenvalidierung schlug fehl. [%s] kann nicht mittels der Kodierung "%s" kodiert werden',2), -1003 => array('Interner Kodierfehler. Kodieren von %s ist nicht möglich in Code 128',1), -1004 => array('Interner barcode Fehler. Unbekannter UPC-E Kodiertyp: %s',1), -1005 => array('Interner Fehler. Das Textzeichen-Tupel (%s, %s) kann nicht im Code-128 Zeichensatz C kodiert werden.',2), -1006 => array('Interner Kodierfehler für CODE 128. Es wurde versucht, CTRL in CHARSET != A zu kodieren.',0), -1007 => array('Interner Kodierfehler für CODE 128. Es wurde versucht, DEL in CHARSET != B zu kodieren.',0), -1008 => array('Interner Kodierfehler für CODE 128. Es wurde versucht, kleine Buchstaben in CHARSET != B zu kodieren.',0), -1009 => array('Kodieren mittels CODE 93 wird noch nicht unterstützt.',0), -1010 => array('Kodieren mittels POSTNET wird noch nicht unterstützt.',0), -1011 => array('Nicht untrstütztes Barcode-Backend für den Typ %s',1), - -/* -** PDF417 -*/ - -26000 => array('PDF417: The PDF417 module requires that the PHP installation must support the function bcmod(). This is normally enabled at compile time. See documentation for more information.',0), -26001 => array('PDF417: Die Anzahl der Spalten muss zwischen 1 und 30 sein.',0), -26002 => array('PDF417: Der Fehler-Level muss zwischen 0 und 8 sein.',0), -26003 => array('PDF417: Ungültiges Format für Eingabedaten, um sie mit PDF417 zu kodieren.',0), -26004 => array('PDF417: die eigebenen Daten können nicht mit Fehler-Level %d und %d spalten kodiert werden, weil daraus zu viele Symbole oder mehr als 90 Zeilen resultieren.',2), -26005 => array('PDF417: Die Datei "%s" kann nicht zum Schreiben geöffnet werden.',1), -26006 => array('PDF417: Interner Fehler. Die Eingabedatendatei für PDF417-Cluster %d ist fehlerhaft.',1), -26007 => array('PDF417: Interner Fehler. GetPattern: Ungültiger Code-Wert %d (Zeile %d)',2), -26008 => array('PDF417: Interner Fehler. Modus wurde nicht in der Modusliste!! Modus %d',1), -26009 => array('PDF417: Kodierfehler: Ungültiges Zeichen. Zeichen kann nicht mit ASCII-Code %d kodiert werden.',1), -26010 => array('PDF417: Interner Fehler: Keine Eingabedaten beim Dekodieren.',0), -26011 => array('PDF417: Kodierfehler. Numerisches Kodieren bei nicht-numerischen Daten nicht möglich.',0), -26012 => array('PDF417: Interner Fehler. Es wurden für den Binary-Kompressor keine Daten zum Dekodieren eingegeben.',0), -26013 => array('PDF417: Interner Fehler. Checksum Fehler. Koeffiziententabellen sind fehlerhaft.',0), -26014 => array('PDF417: Interner Fehler. Es wurden keine Daten zum Berechnen von Kodewörtern eingegeben.',0), -26015 => array('PDF417: Interner Fehler. Ein Eintrag 0 in die Statusübertragungstabellen ist nicht NULL. Eintrag 1 = (%s)',1), -26016 => array('PDF417: Interner Fehler: Nichtregistrierter Statusübertragungsmodus beim Dekodieren.',0), - - -/* -** jpgraph_contour -*/ - -28001 => array('Dritten parameter fur Contour muss ein vector der fargen sind.',0), -28002 => array('Die anzahlen der farges jeder isobar linien muss gleich sein.',0), -28003 => array('ContourPlot Interner Fehler: isobarHCrossing: Spalten index ist zu hoch (%d)',1), -28004 => array('ContourPlot Interner Fehler: isobarHCrossing: Reihe index ist zu hoch (%d)',1), -28005 => array('ContourPlot Interner Fehler: isobarVCrossing: Reihe index ist zu hoch (%d)',1), -28006 => array('ContourPlot Interner Fehler: isobarVCrossing: Spalten index ist zu hoch (%d)',1), -28007 => array('ContourPlot. Interpolation faktor ist zu hoch (>5)',0), - - -/* - * jpgraph_matrix and colormap -*/ -29201 => array('Min range value must be less or equal to max range value for colormaps',0), -29202 => array('The distance between min and max value is too small for numerical precision',0), -29203 => array('Number of color quantification level must be at least %d',1), -29204 => array('Number of colors (%d) is invalid for this colormap. It must be a number that can be written as: %d + k*%d',3), -29205 => array('Colormap specification out of range. Must be an integer in range [0,%d]',1), -29206 => array('Invalid object added to MatrixGraph',0), -29207 => array('Empty input data specified for MatrixPlot',0), -29208 => array('Unknown side specifiction for matrix labels "%s"',1), -29209 => array('CSIM Target matrix must be the same size as the data matrix (csim=%d x %d, data=%d x %d)',4), -29210 => array('CSIM Target for matrix labels does not match the number of labels (csim=%d, labels=%d)',2), - -); - -?> diff --git a/html/lib/jpgraph/lang/en.inc.php b/html/lib/jpgraph/lang/en.inc.php deleted file mode 100644 index 3d0961dc3e..0000000000 --- a/html/lib/jpgraph/lang/en.inc.php +++ /dev/null @@ -1,536 +0,0 @@ -,) -$_jpg_messages = array( - -/* -** Headers already sent error. This is formatted as HTML different since this will be sent back directly as text -*/ -10 => array('
        JpGraph Error: -HTTP headers have already been sent.
        Caused by output from file %s at line %d.
        Explanation:
        HTTP headers have already been sent back to the browser indicating the data as text before the library got a chance to send it\'s image HTTP header to this browser. This makes it impossible for the library to send back image data to the browser (since that would be interpretated as text by the browser and show up as junk text).

        Most likely you have some text in your script before the call to Graph::Stroke(). If this texts gets sent back to the browser the browser will assume that all data is plain text. Look for any text, even spaces and newlines, that might have been sent back to the browser.

        For example it is a common mistake to leave a blank line before the opening "<?php".

        ',2), - -/* -** Setup errors -*/ -11 => array('No path specified for CACHE_DIR. Please specify CACHE_DIR manually in jpg-config.inc',0), -12 => array('No path specified for TTF_DIR and path can not be determined automatically. Please specify TTF_DIR manually (in jpg-config.inc).',0), -13 => array('The installed PHP version (%s) is not compatible with this release of the library. The library requires at least PHP version %s',2), - - -/* -** jpgraph_bar -*/ - -2001 => array('Number of colors is not the same as the number of patterns in BarPlot::SetPattern()',0), -2002 => array('Unknown pattern specified in call to BarPlot::SetPattern()',0), -2003 => array('Number of X and Y points are not equal. Number of X-points: %d Number of Y-points: %d',2), -2004 => array('All values for a barplot must be numeric. You have specified value nr [%d] == %s',2), -2005 => array('You have specified an empty array for shadow colors in the bar plot.',0), -2006 => array('Unknown position for values on bars : %s',1), -2007 => array('Cannot create GroupBarPlot from empty plot array.',0), -2008 => array('Group bar plot element nbr %d is undefined or empty.',0), -2009 => array('One of the objects submitted to GroupBar is not a BarPlot. Make sure that you create the GroupBar plot from an array of BarPlot or AccBarPlot objects. (Class = %s)',1), -2010 => array('Cannot create AccBarPlot from empty plot array.',0), -2011 => array('Acc bar plot element nbr %d is undefined or empty.',1), -2012 => array('One of the objects submitted to AccBar is not a BarPlot. Make sure that you create the AccBar plot from an array of BarPlot objects. (Class=%s)',1), -2013 => array('You have specified an empty array for shadow colors in the bar plot.',0), -2014 => array('Number of datapoints for each data set in accbarplot must be the same',0), -2015 => array('Individual bar plots in an AccBarPlot or GroupBarPlot can not have specified X-coordinates',0), - - -/* -** jpgraph_date -*/ - -3001 => array('It is only possible to use either SetDateAlign() or SetTimeAlign() but not both',0), - -/* -** jpgraph_error -*/ - -4002 => array('Error in input data to LineErrorPlot. Number of data points must be a multiple of 3',0), - -/* -** jpgraph_flags -*/ - -5001 => array('Unknown flag size (%d).',1), -5002 => array('Flag index %s does not exist.',1), -5003 => array('Invalid ordinal number (%d) specified for flag index.',1), -5004 => array('The (partial) country name %s does not have a corresponding flag image. The flag may still exist but under another name, e.g. instead of "usa" try "united states".',1), - - -/* -** jpgraph_gantt -*/ - -6001 => array('Internal error. Height for ActivityTitles is < 0',0), -6002 => array('You can\'t specify negative sizes for Gantt graph dimensions. Use 0 to indicate that you want the library to automatically determine a dimension.',0), -6003 => array('Invalid format for Constrain parameter at index=%d in CreateSimple(). Parameter must start with index 0 and contain arrays of (Row,Constrain-To,Constrain-Type)',1), -6004 => array('Invalid format for Progress parameter at index=%d in CreateSimple(). Parameter must start with index 0 and contain arrays of (Row,Progress)',1), -6005 => array('SetScale() is not meaningful with Gantt charts.',0), -6006 => array('Cannot autoscale Gantt chart. No dated activities exist. [GetBarMinMax() start >= n]',0), -6007 => array('Sanity check for automatic Gantt chart size failed. Either the width (=%d) or height (=%d) is larger than MAX_GANTTIMG_SIZE. This could potentially be caused by a wrong date in one of the activities.',2), -6008 => array('You have specified a constrain from row=%d to row=%d which does not have any activity',2), -6009 => array('Unknown constrain type specified from row=%d to row=%d',2), -6010 => array('Illegal icon index for Gantt builtin icon [%d]',1), -6011 => array('Argument to IconImage must be string or integer',0), -6012 => array('Unknown type in Gantt object title specification',0), -6015 => array('Illegal vertical position %d',1), -6016 => array('Date string (%s) specified for Gantt activity can not be interpretated. Please make sure it is a valid time string, e.g. 2005-04-23 13:30',1), -6017 => array('Unknown date format in GanttScale (%s).',1), -6018 => array('Interval for minutes must divide the hour evenly, e.g. 1,5,10,12,15,20,30 etc You have specified an interval of %d minutes.',1), -6019 => array('The available width (%d) for minutes are to small for this scale to be displayed. Please use auto-sizing or increase the width of the graph.',1), -6020 => array('Interval for hours must divide the day evenly, e.g. 0:30, 1:00, 1:30, 4:00 etc. You have specified an interval of %d',1), -6021 => array('Unknown formatting style for week.',0), -6022 => array('Gantt scale has not been specified.',0), -6023 => array('If you display both hour and minutes the hour interval must be 1 (Otherwise it doesn\'t make sense to display minutes).',0), -6024 => array('CSIM Target must be specified as a string. Start of target is: %d',1), -6025 => array('CSIM Alt text must be specified as a string. Start of alt text is: %d',1), -6027 => array('Progress value must in range [0, 1]',0), -6028 => array('Specified height (%d) for gantt bar is out of range.',1), -6029 => array('Offset for vertical line must be in range [0,1]',0), -6030 => array('Unknown arrow direction for link.',0), -6031 => array('Unknown arrow type for link.',0), -6032 => array('Internal error: Unknown path type (=%d) specified for link.',1), -6033 => array('Array of fonts must contain arrays with 3 elements, i.e. (Family, Style, Size)',0), - -/* -** jpgraph_gradient -*/ - -7001 => array('Unknown gradient style (=%d).',1), - -/* -** jpgraph_iconplot -*/ - -8001 => array('Mix value for icon must be between 0 and 100.',0), -8002 => array('Anchor position for icons must be one of "top", "bottom", "left", "right" or "center"',0), -8003 => array('It is not possible to specify both an image file and a country flag for the same icon.',0), -8004 => array('In order to use Country flags as icons you must include the "jpgraph_flags.php" file.',0), - -/* -** jpgraph_imgtrans -*/ - -9001 => array('Value for image transformation out of bounds. Vanishing point on horizon must be specified as a value between 0 and 1.',0), - -/* -** jpgraph_lineplot -*/ - -10001 => array('LinePlot::SetFilled() is deprecated. Use SetFillColor()',0), -10002 => array('Plot too complicated for fast line Stroke. Use standard Stroke()',0), -10003 => array('Each plot in an accumulated lineplot must have the same number of data points.',0), - -/* -** jpgraph_log -*/ - -11001 => array('Your data contains non-numeric values.',0), -11002 => array('Negative data values can not be used in a log scale.',0), -11003 => array('Your data contains non-numeric values.',0), -11004 => array('Scale error for logarithmic scale. You have a problem with your data values. The max value must be greater than 0. It is mathematically impossible to have 0 in a logarithmic scale.',0), -11005 => array('Specifying tick interval for a logarithmic scale is undefined. Remove any calls to SetTextLabelStart() or SetTextTickInterval() on the logarithmic scale.',0), - -/* -** jpgraph_mgraph -*/ - -12001 => array("You are using GD 2.x and are trying to use a background images on a non truecolor image. To use background images with GD 2.x it is necessary to enable truecolor by setting the USE_TRUECOLOR constant to TRUE. Due to a bug in GD 2.0.1 using any truetype fonts with truecolor images will result in very poor quality fonts.",0), -12002 => array('Incorrect file name for MGraph::SetBackgroundImage() : %s Must have a valid image extension (jpg,gif,png) when using auto detection of image type',1), -12003 => array('Unknown file extension (%s) in MGraph::SetBackgroundImage() for filename: %s',2), -12004 => array('The image format of your background image (%s) is not supported in your system configuration. ',1), -12005 => array('Can\'t read background image: %s',1), -12006 => array('Illegal sizes specified for width or height when creating an image, (width=%d, height=%d)',2), -12007 => array('Argument to MGraph::Add() is not a valid GD image handle.',0), -12008 => array('Your PHP (and GD-lib) installation does not appear to support any known graphic formats.',0), -12009 => array('Your PHP installation does not support the chosen graphic format: %s',1), -12010 => array('Can\'t create or stream image to file %s Check that PHP has enough permission to write a file to the current directory.',1), -12011 => array('Can\'t create truecolor image. Check that you really have GD2 library installed.',0), -12012 => array('Can\'t create image. Check that you really have GD2 library installed.',0), - -/* -** jpgraph_pie3d -*/ - -14001 => array('Pie3D::ShowBorder() . Deprecated function. Use Pie3D::SetEdge() to control the edges around slices.',0), -14002 => array('PiePlot3D::SetAngle() 3D Pie projection angle must be between 5 and 85 degrees.',0), -14003 => array('Internal assertion failed. Pie3D::Pie3DSlice',0), -14004 => array('Slice start angle must be between 0 and 360 degrees.',0), -14005 => array('Pie3D Internal error: Trying to wrap twice when looking for start index',0,), -14006 => array('Pie3D Internal Error: Z-Sorting algorithm for 3D Pies is not working properly (2). Trying to wrap twice while stroking.',0), -14007 => array('Width for 3D Pie is 0. Specify a size > 0',0), - -/* -** jpgraph_pie -*/ - -15001 => array('PiePLot::SetTheme() Unknown theme: %s',1), -15002 => array('Argument to PiePlot::ExplodeSlice() must be an integer',0), -15003 => array('Argument to PiePlot::Explode() must be an array with integer distances.',0), -15004 => array('Slice start angle must be between 0 and 360 degrees.',0), -15005 => array('PiePlot::SetFont() is deprecated. Use PiePlot->value->SetFont() instead.',0), -15006 => array('PiePlot::SetSize() Radius for pie must either be specified as a fraction [0, 0.5] of the size of the image or as an absolute size in pixels in the range [10, 1000]',0), -15007 => array('PiePlot::SetFontColor() is deprecated. Use PiePlot->value->SetColor() instead.',0), -15008 => array('PiePlot::SetLabelType() Type for pie plots must be 0 or 1 (not %d).',1), -15009 => array('Illegal pie plot. Sum of all data is zero for Pie Plot',0), -15010 => array('Sum of all data is 0 for Pie.',0), -15011 => array('In order to use image transformation you must include the file jpgraph_imgtrans.php in your script.',0), - -/* -** jpgraph_plotband -*/ - -16001 => array('Density for pattern must be between 1 and 100. (You tried %f)',1), -16002 => array('No positions specified for pattern.',0), -16003 => array('Unknown pattern specification (%d)',0), -16004 => array('Min value for plotband is larger than specified max value. Please correct.',0), - - -/* -** jpgraph_polar -*/ - -17001 => array('Polar plots must have an even number of data point. Each data point is a tuple (angle,radius).',0), -17002 => array('Unknown alignment specified for X-axis title. (%s)',1), -//17003 => array('Set90AndMargin() is not supported for polar graphs.',0), -17004 => array('Unknown scale type for polar graph. Must be "lin" or "log"',0), - -/* -** jpgraph_radar -*/ - -18001 => array('Client side image maps not supported for RadarPlots.',0), -18002 => array('RadarGraph::SupressTickMarks() is deprecated. Use HideTickMarks() instead.',0), -18003 => array('Illegal scale for radarplot (%s). Must be \'lin\' or \'log\'',1), -18004 => array('Radar Plot size must be between 0.1 and 1. (Your value=%f)',1), -18005 => array('RadarPlot Unsupported Tick density: %d',1), -18006 => array('Minimum data %f (Radar plots should only be used when all data points > 0)',1), -18007 => array('Number of titles does not match number of points in plot.',0), -18008 => array('Each radar plot must have the same number of data points.',0), - -/* -** jpgraph_regstat -*/ - -19001 => array('Spline: Number of X and Y coordinates must be the same',0), -19002 => array('Invalid input data for spline. Two or more consecutive input X-values are equal. Each input X-value must differ since from a mathematical point of view it must be a one-to-one mapping, i.e. each X-value must correspond to exactly one Y-value.',0), -19003 => array('Bezier: Number of X and Y coordinates must be the same',0), - -/* -** jpgraph_scatter -*/ - -20001 => array('Fieldplots must have equal number of X and Y points.',0), -20002 => array('Fieldplots must have an angle specified for each X and Y points.',0), -20003 => array('Scatterplot must have equal number of X and Y points.',0), - -/* -** jpgraph_stock -*/ - -21001 => array('Data values for Stock charts must contain an even multiple of %d data points.',1), - -/* -** jpgraph_plotmark -*/ - -23001 => array('This marker "%s" does not exist in color with index: %d',2), -23002 => array('Mark color index too large for marker "%s"',1), -23003 => array('A filename must be specified if you set the mark type to MARK_IMG.',0), - -/* -** jpgraph_utils -*/ - -24001 => array('FuncGenerator : No function specified. ',0), -24002 => array('FuncGenerator : Syntax error in function specification ',0), -24003 => array('DateScaleUtils: Unknown tick type specified in call to GetTicks()',0), -24004 => array('ReadCSV2: Column count mismatch in %s line %d',2), -/* -** jpgraph -*/ - -25001 => array('This PHP installation is not configured with the GD library. Please recompile PHP with GD support to run JpGraph. (Neither function imagetypes() nor imagecreatefromstring() does exist)',0), -25002 => array('Your PHP installation does not seem to have the required GD library. Please see the PHP documentation on how to install and enable the GD library.',0), -25003 => array('General PHP error : At %s:%d : %s',3), -25004 => array('General PHP error : %s ',1), -25005 => array('Can\'t access PHP_SELF, PHP global variable. You can\'t run PHP from command line if you want to use the \'auto\' naming of cache or image files.',0), -25006 => array('Usage of FF_CHINESE (FF_BIG5) font family requires that your PHP setup has the iconv() function. By default this is not compiled into PHP (needs the "--width-iconv" when configured).',0), -25007 => array('You are trying to use the locale (%s) which your PHP installation does not support. Hint: Use \'\' to indicate the default locale for this geographic region.',1), -25008 => array('Image width/height argument in Graph::Graph() must be numeric',0), -25009 => array('You must specify what scale to use with a call to Graph::SetScale()',0), - -25010 => array('Graph::Add() You tried to add a null plot to the graph.',0), -25011 => array('Graph::AddY2() You tried to add a null plot to the graph.',0), -25012 => array('Graph::AddYN() You tried to add a null plot to the graph.',0), -25013 => array('You can only add standard plots to multiple Y-axis',0), -25014 => array('Graph::AddText() You tried to add a null text to the graph.',0), -25015 => array('Graph::AddLine() You tried to add a null line to the graph.',0), -25016 => array('Graph::AddBand() You tried to add a null band to the graph.',0), -25017 => array('You are using GD 2.x and are trying to use a background images on a non truecolor image. To use background images with GD 2.x it is necessary to enable truecolor by setting the USE_TRUECOLOR constant to TRUE. Due to a bug in GD 2.0.1 using any truetype fonts with truecolor images will result in very poor quality fonts.',0), -25018 => array('Incorrect file name for Graph::SetBackgroundImage() : "%s" Must have a valid image extension (jpg,gif,png) when using auto detection of image type',1), -25019 => array('Unknown file extension (%s) in Graph::SetBackgroundImage() for filename: "%s"',2), - -25020 => array('Graph::SetScale(): Specified Max value must be larger than the specified Min value.',0), -25021 => array('Unknown scale specification for Y-scale. (%s)',1), -25022 => array('Unknown scale specification for X-scale. (%s)',1), -25023 => array('Unsupported Y2 axis type: "%s" Must be one of (lin,log,int)',1), -25024 => array('Unsupported Y axis type: "%s" Must be one of (lin,log,int)',1), -25025 => array('Unsupported Tick density: %d',1), -25026 => array('Can\'t draw unspecified Y-scale. You have either: 1. Specified an Y axis for auto scaling but have not supplied any plots. 2. Specified a scale manually but have forgot to specify the tick steps',0), -25027 => array('Can\'t open cached CSIM "%s" for reading.',1), -25028 => array('Apache/PHP does not have permission to write to the CSIM cache directory (%s). Check permissions.',1), -25029 => array('Can\'t write CSIM "%s" for writing. Check free space and permissions.',1), - -25030 => array('Missing script name in call to StrokeCSIM(). You must specify the name of the actual image script as the first parameter to StrokeCSIM().',0), -25031 => array('You must specify what scale to use with a call to Graph::SetScale().',0), -25032 => array('No plots for Y-axis nbr:%d',1), -25033 => array('',0), -25034 => array('Can\'t draw unspecified X-scale. No plots specified.',0), -25035 => array('You have enabled clipping. Clipping is only supported for graphs at 0 or 90 degrees rotation. Please adjust you current angle (=%d degrees) or disable clipping.',1), -25036 => array('Unknown AxisStyle() : %s',1), -25037 => array('The image format of your background image (%s) is not supported in your system configuration. ',1), -25038 => array('Background image seems to be of different type (has different file extension) than specified imagetype. Specified: %s File: %s',2), -25039 => array('Can\'t read background image: "%s"',1), - -25040 => array('It is not possible to specify both a background image and a background country flag.',0), -25041 => array('In order to use Country flags as backgrounds you must include the "jpgraph_flags.php" file.',0), -25042 => array('Unknown background image layout',0), -25043 => array('Unknown title background style.',0), -25044 => array('Cannot use auto scaling since it is impossible to determine a valid min/max value of the Y-axis (only null values).',0), -25045 => array('Font families FF_HANDWRT and FF_BOOK are no longer available due to copyright problem with these fonts. Fonts can no longer be distributed with JpGraph. Please download fonts from http://corefonts.sourceforge.net/',0), -25046 => array('Specified TTF font family (id=%d) is unknown or does not exist. Please note that TTF fonts are not distributed with JpGraph for copyright reasons. You can find the MS TTF WEB-fonts (arial, courier etc) for download at http://corefonts.sourceforge.net/',1), -25047 => array('Style %s is not available for font family %s',2), -25048 => array('Unknown font style specification [%s].',1), -25049 => array('Font file "%s" is not readable or does not exist.',1), - -25050 => array('First argument to Text::Text() must be a string.',0), -25051 => array('Invalid direction specified for text.',0), -25052 => array('PANIC: Internal error in SuperScript::Stroke(). Unknown vertical alignment for text',0), -25053 => array('PANIC: Internal error in SuperScript::Stroke(). Unknown horizontal alignment for text',0), -25054 => array('Internal error: Unknown grid axis %s',1), -25055 => array('Axis::SetTickDirection() is deprecated. Use Axis::SetTickSide() instead',0), -25056 => array('SetTickLabelMargin() is deprecated. Use Axis::SetLabelMargin() instead.',0), -25057 => array('SetTextTicks() is deprecated. Use SetTextTickInterval() instead.',0), -25058 => array('Text label interval must be specified >= 1.',0), -25059 => array('SetLabelPos() is deprecated. Use Axis::SetLabelSide() instead.',0), - -25060 => array('Unknown alignment specified for X-axis title. (%s)',1), -25061 => array('Unknown alignment specified for Y-axis title. (%s)',1), -25062 => array('Labels at an angle are not supported on Y-axis',0), -25063 => array('Ticks::SetPrecision() is deprecated. Use Ticks::SetLabelFormat() (or Ticks::SetFormatCallback()) instead',0), -25064 => array('Minor or major step size is 0. Check that you haven\'t got an accidental SetTextTicks(0) in your code. If this is not the case you might have stumbled upon a bug in JpGraph. Please report this and if possible include the data that caused the problem',0), -25065 => array('Tick positions must be specified as an array()',0), -25066 => array('When manually specifying tick positions and labels the number of labels must be the same as the number of specified ticks.',0), -25067 => array('Your manually specified scale and ticks is not correct. The scale seems to be too small to hold any of the specified tick marks.',0), -25068 => array('A plot has an illegal scale. This could for example be that you are trying to use text auto scaling to draw a line plot with only one point or that the plot area is too small. It could also be that no input data value is numeric (perhaps only \'-\' or \'x\')',0), -25069 => array('Grace must be larger then 0',0), -25070 => array('Either X or Y data arrays contains non-numeric values. Check that the data is really specified as numeric data and not as strings. It is an error to specify data for example as \'-2345.2\' (using quotes).',0), -25071 => array('You have specified a min value with SetAutoMin() which is larger than the maximum value used for the scale. This is not possible.',0), -25072 => array('You have specified a max value with SetAutoMax() which is smaller than the minimum value used for the scale. This is not possible.',0), -25073 => array('Internal error. Integer scale algorithm comparison out of bound (r=%f)',1), -25074 => array('Internal error. The scale range is negative (%f) [for %s scale] This problem could potentially be caused by trying to use \"illegal\" values in the input data arrays (like trying to send in strings or only NULL values) which causes the auto scaling to fail.',2), -25075 => array('Can\'t automatically determine ticks since min==max.',0), -25077 => array('Adjustment factor for color must be > 0',0), -25078 => array('Unknown color: %s',1), -25079 => array('Unknown color specification: %s, size=%d',2), - -25080 => array('Alpha parameter for color must be between 0.0 and 1.0',0), -25081 => array('Selected graphic format is either not supported or unknown [%s]',1), -25082 => array('Illegal sizes specified for width or height when creating an image, (width=%d, height=%d)',2), -25083 => array('Illegal image size when copying image. Size for copied to image is 1 pixel or less.',0), -25084 => array('Failed to create temporary GD canvas. Possible Out of memory problem.',0), -25085 => array('An image can not be created from the supplied string. It is either in a format not supported or the string is representing an corrupt image.',0), -25086 => array('You only seem to have GD 1.x installed. To enable Alphablending requires GD 2.x or higher. Please install GD or make sure the constant USE_GD2 is specified correctly to reflect your installation. By default it tries to auto detect what version of GD you have installed. On some very rare occasions it may falsely detect GD2 where only GD1 is installed. You must then set USE_GD2 to false.',0), -25087 => array('This PHP build has not been configured with TTF support. You need to recompile your PHP installation with FreeType support.',0), -25088 => array('You have a misconfigured GD font support. The call to imagefontwidth() fails.',0), -25089 => array('You have a misconfigured GD font support. The call to imagefontheight() fails.',0), - -25090 => array('Unknown direction specified in call to StrokeBoxedText() [%s]',1), -25091 => array('Internal font does not support drawing text at arbitrary angle. Use TTF fonts instead.',0), -25092 => array('There is either a configuration problem with TrueType or a problem reading font file "%s" Make sure file exists and is in a readable place for the HTTP process. (If \'basedir\' restriction is enabled in PHP then the font file must be located in the document root.). It might also be a wrongly installed FreeType library. Try upgrading to at least FreeType 2.1.13 and recompile GD with the correct setup so it can find the new FT library.',1), -25093 => array('Can not read font file "%s" in call to Image::GetBBoxTTF. Please make sure that you have set a font before calling this method and that the font is installed in the TTF directory.',1), -25094 => array('Direction for text most be given as an angle between 0 and 90.',0), -25095 => array('Unknown font font family specification. ',0), -25096 => array('Can\'t allocate any more colors in palette image. Image has already allocated maximum of %d colors and the palette is now full. Change to a truecolor image instead',0), -25097 => array('Color specified as empty string in PushColor().',0), -25098 => array('Negative Color stack index. Unmatched call to PopColor()',0), -25099 => array('Parameters for brightness and Contrast out of range [-1,1]',0), - -25100 => array('Problem with color palette and your GD setup. Please disable anti-aliasing or use GD2 with true-color. If you have GD2 library installed please make sure that you have set the USE_GD2 constant to true and truecolor is enabled.',0), -25101 => array('Illegal numeric argument to SetLineStyle(): (%d)',1), -25102 => array('Illegal string argument to SetLineStyle(): %s',1), -25103 => array('Illegal argument to SetLineStyle %s',1), -25104 => array('Unknown line style: %s',1), -25105 => array('NULL data specified for a filled polygon. Check that your data is not NULL.',0), -25106 => array('Image::FillToBorder : Can not allocate more colors',0), -25107 => array('Can\'t write to file "%s". Check that the process running PHP has enough permission.',1), -25108 => array('Can\'t stream image. This is most likely due to a faulty PHP/GD setup. Try to recompile PHP and use the built-in GD library that comes with PHP.',0), -25109 => array('Your PHP (and GD-lib) installation does not appear to support any known graphic formats. You need to first make sure GD is compiled as a module to PHP. If you also want to use JPEG images you must get the JPEG library. Please see the PHP docs for details.',0), - -25110 => array('Your PHP installation does not support the chosen graphic format: %s',1), -25111 => array('Can\'t delete cached image %s. Permission problem?',1), -25112 => array('Cached imagefile (%s) has file date in the future.',1), -25113 => array('Can\'t delete cached image "%s". Permission problem?',1), -25114 => array('PHP has not enough permissions to write to the cache file "%s". Please make sure that the user running PHP has write permission for this file if you wan to use the cache system with JpGraph.',1), -25115 => array('Can\'t set permission for cached image "%s". Permission problem?',1), -25116 => array('Cant open file from cache "%s"',1), -25117 => array('Can\'t open cached image "%s" for reading.',1), -25118 => array('Can\'t create directory "%s". Make sure PHP has write permission to this directory.',1), -25119 => array('Can\'t set permissions for "%s". Permission problems?',1), - -25120 => array('Position for legend must be given as percentage in range 0-1',0), -25121 => array('Empty input data array specified for plot. Must have at least one data point.',0), -25122 => array('Stroke() must be implemented by concrete subclass to class Plot',0), -25123 => array('You can\'t use a text X-scale with specified X-coords. Use a "int" or "lin" scale instead.',0), -25124 => array('The input data array must have consecutive values from position 0 and forward. The given y-array starts with empty values (NULL)',0), -25125 => array('Illegal direction for static line',0), -25126 => array('Can\'t create truecolor image. Check that the GD2 library is properly setup with PHP.',0), -25127 => array('The library has been configured for automatic encoding conversion of Japanese fonts. This requires that PHP has the mb_convert_encoding() function. Your PHP installation lacks this function (PHP needs the "--enable-mbstring" when compiled).',0), -25128 => array('The function imageantialias() is not available in your PHP installation. Use the GD version that comes with PHP and not the standalone version.',0), -25129 => array('Anti-alias can not be used with dashed lines. Please disable anti-alias or use solid lines.',0), -25130 => array('Too small plot area. (%d x %d). With the given image size and margins there is to little space left for the plot. Increase the plot size or reduce the margins.',2), - -25131 => array('StrokeBoxedText2() only supports TTF fonts and not built-in bitmap fonts.',0), - -/* -** jpgraph_led -*/ - -25500 => array('Multibyte strings must be enabled in the PHP installation in order to run the LED module so that the function mb_strlen() is available. See PHP documentation for more information.',0), - -/* -**--------------------------------------------------------------------------------------------- -** Pro-version strings -**--------------------------------------------------------------------------------------------- -*/ - -/* -** jpgraph_table -*/ - -27001 => array('GTextTable: Invalid argument to Set(). Array argument must be 2 dimensional',0), -27002 => array('GTextTable: Invalid argument to Set()',0), -27003 => array('GTextTable: Wrong number of arguments to GTextTable::SetColor()',0), -27004 => array('GTextTable: Specified cell range to be merged is not valid.',0), -27005 => array('GTextTable: Cannot merge already merged cells in the range: (%d,%d) to (%d,%d)',4), -27006 => array('GTextTable: Column argument = %d is outside specified table size.',1), -27007 => array('GTextTable: Row argument = %d is outside specified table size.',1), -27008 => array('GTextTable: Column and row size arrays must match the dimensions of the table',0), -27009 => array('GTextTable: Number of table columns or rows are 0. Make sure Init() or Set() is called.',0), -27010 => array('GTextTable: No alignment specified in call to SetAlign()',0), -27011 => array('GTextTable: Unknown alignment specified in SetAlign(). Horizontal=%s, Vertical=%s',2), -27012 => array('GTextTable: Internal error. Invalid alignment specified =%s',1), -27013 => array('GTextTable: Argument to FormatNumber() must be a string.',0), -27014 => array('GTextTable: Table is not initilaized with either a call to Set() or Init()',0), -27015 => array('GTextTable: Cell image constrain type must be TIMG_WIDTH or TIMG_HEIGHT',0), - -/* -** jpgraph_windrose -*/ - -22001 => array('Total percentage for all windrose legs in a windrose plot can not exceed 100%% !\n(Current max is: %d)',1), -22002 => array('Graph is too small to have a scale. Please make the graph larger.',0), -22004 => array('Label specification for windrose directions must have 16 values (one for each compass direction).',0), -22005 => array('Line style for radial lines must be on of ("solid","dotted","dashed","longdashed") ',0), -22006 => array('Illegal windrose type specified.',0), -22007 => array('To few values for the range legend.',0), -22008 => array('Internal error: Trying to plot free Windrose even though type is not a free windrose',0), -22009 => array('You have specified the same direction twice, once with an angle and once with a compass direction (%f degrees)',0), -22010 => array('Direction must either be a numeric value or one of the 16 compass directions',0), -22011 => array('Windrose index must be numeric or direction label. You have specified index=%d',1), -22012 => array('Windrose radial axis specification contains a direction which is not enabled.',0), -22013 => array('You have specified the look&feel for the same compass direction twice, once with text and once with index (Index=%d)',1), -22014 => array('Index for compass direction must be between 0 and 15.',0), -22015 => array('You have specified an undefined Windrose plot type.',0), -22016 => array('Windrose leg index must be numeric or direction label.',0), -22017 => array('Windrose data contains a direction which is not enabled. Please adjust what labels are displayed.',0), -22018 => array('You have specified data for the same compass direction twice, once with text and once with index (Index=%d)',1), -22019 => array('Index for direction must be between 0 and 15. You can\'t specify angles for a Regular Windplot, only index and compass directions.',0), -22020 => array('Windrose plot is too large to fit the specified Graph size. Please use WindrosePlot::SetSize() to make the plot smaller or increase the size of the Graph in the initial WindroseGraph() call.',0), -22021 => array('It is only possible to add Text, IconPlot or WindrosePlot to a Windrose Graph',0), -/* -** jpgraph_odometer -*/ - -13001 => array('Unknown needle style (%d).',1), -13002 => array('Value for odometer (%f) is outside specified scale [%f,%f]',3), - -/* -** jpgraph_barcode -*/ - -1001 => array('Unknown encoder specification: %s',1), -1002 => array('Data validation failed. Can\'t encode [%s] using encoding "%s"',2), -1003 => array('Internal encoding error. Trying to encode %s is not possible in Code 128',1), -1004 => array('Internal barcode error. Unknown UPC-E encoding type: %s',1), -1005 => array('Internal error. Can\'t encode character tuple (%s, %s) in Code-128 charset C',2), -1006 => array('Internal encoding error for CODE 128. Trying to encode control character in CHARSET != A',0), -1007 => array('Internal encoding error for CODE 128. Trying to encode DEL in CHARSET != B',0), -1008 => array('Internal encoding error for CODE 128. Trying to encode small letters in CHARSET != B',0), -1009 => array('Encoding using CODE 93 is not yet supported.',0), -1010 => array('Encoding using POSTNET is not yet supported.',0), -1011 => array('Non supported barcode backend for type %s',1), - -/* -** PDF417 -*/ -26000 => array('PDF417: The PDF417 module requires that the PHP installation must support the function bcmod(). This is normally enabled at compile time. See documentation for more information.',0), -26001 => array('PDF417: Number of Columns must be >= 1 and <= 30',0), -26002 => array('PDF417: Error level must be between 0 and 8',0), -26003 => array('PDF417: Invalid format for input data to encode with PDF417',0), -26004 => array('PDF417: Can\'t encode given data with error level %d and %d columns since it results in too many symbols or more than 90 rows.',2), -26005 => array('PDF417: Can\'t open file "%s" for writing',1), -26006 => array('PDF417: Internal error. Data files for PDF417 cluster %d is corrupted.',1), -26007 => array('PDF417: Internal error. GetPattern: Illegal Code Value = %d (row=%d)',2), -26008 => array('PDF417: Internal error. Mode not found in mode list!! mode=%d',1), -26009 => array('PDF417: Encode error: Illegal character. Can\'t encode character with ASCII code=%d',1), -26010 => array('PDF417: Internal error: No input data in decode.',0), -26011 => array('PDF417: Encoding error. Can\'t use numeric encoding on non-numeric data.',0), -26012 => array('PDF417: Internal error. No input data to decode for Binary compressor.',0), -26013 => array('PDF417: Internal error. Checksum error. Coefficient tables corrupted.',0), -26014 => array('PDF417: Internal error. No data to calculate codewords on.',0), -26015 => array('PDF417: Internal error. State transition table entry 0 is NULL. Entry 1 = (%s)',1), -26016 => array('PDF417: Internal error: Unrecognized state transition mode in decode.',0), - -/* -** jpgraph_contour -*/ - -28001 => array('Third argument to Contour must be an array of colors.',0), -28002 => array('Number of colors must equal the number of isobar lines specified',0), -28003 => array('ContourPlot Internal Error: isobarHCrossing: Coloumn index too large (%d)',1), -28004 => array('ContourPlot Internal Error: isobarHCrossing: Row index too large (%d)',1), -28005 => array('ContourPlot Internal Error: isobarVCrossing: Row index too large (%d)',1), -28006 => array('ContourPlot Internal Error: isobarVCrossing: Col index too large (%d)',1), -28007 => array('ContourPlot interpolation factor is too large (>5)',0), - -/* - * jpgraph_matrix and colormap -*/ -29201 => array('Min range value must be less or equal to max range value for colormaps',0), -29202 => array('The distance between min and max value is too small for numerical precision',0), -29203 => array('Number of color quantification level must be at least %d',1), -29204 => array('Number of colors (%d) is invalid for this colormap. It must be a number that can be written as: %d + k*%d',3), -29205 => array('Colormap specification out of range. Must be an integer in range [0,%d]',1), -29206 => array('Invalid object added to MatrixGraph',0), -29207 => array('Empty input data specified for MatrixPlot',0), -29208 => array('Unknown side specifiction for matrix labels "%s"',1), -29209 => array('CSIM Target matrix must be the same size as the data matrix (csim=%d x %d, data=%d x %d)',4), -29210 => array('CSIM Target for matrix labels does not match the number of labels (csim=%d, labels=%d)',2), - -); - -?> diff --git a/html/lib/jpgraph/lang/prod.inc.php b/html/lib/jpgraph/lang/prod.inc.php deleted file mode 100644 index 8b376473be..0000000000 --- a/html/lib/jpgraph/lang/prod.inc.php +++ /dev/null @@ -1,383 +0,0 @@ -,) -$_jpg_messages = array( - -/* -** Headers already sent error. This is formatted as HTML different since this will be sent back directly as text -*/ -10 => array('
        JpGraph Error: -HTTP headers have already been sent.
        Caused by output from file %s at line %d.
        Explanation:
        HTTP headers have already been sent back to the browser indicating the data as text before the library got a chance to send it\'s image HTTP header to this browser. This makes it impossible for the library to send back image data to the browser (since that would be interpretated as text by the browser and show up as junk text).

        Most likely you have some text in your script before the call to Graph::Stroke(). If this texts gets sent back to the browser the browser will assume that all data is plain text. Look for any text, even spaces and newlines, that might have been sent back to the browser.

        For example it is a common mistake to leave a blank line before the opening "<?php".

        ',2), - - -11 => array(DEFAULT_ERROR_MESSAGE.'11',0), -12 => array(DEFAULT_ERROR_MESSAGE.'12',0), -13 => array(DEFAULT_ERROR_MESSAGE.'13',0), -2001 => array(DEFAULT_ERROR_MESSAGE.'2001',0), -2002 => array(DEFAULT_ERROR_MESSAGE.'2002',0), -2003 => array(DEFAULT_ERROR_MESSAGE.'2003',0), -2004 => array(DEFAULT_ERROR_MESSAGE.'2004',0), -2005 => array(DEFAULT_ERROR_MESSAGE.'2005',0), -2006 => array(DEFAULT_ERROR_MESSAGE.'2006',0), -2007 => array(DEFAULT_ERROR_MESSAGE.'2007',0), -2008 => array(DEFAULT_ERROR_MESSAGE.'2008',0), -2009 => array(DEFAULT_ERROR_MESSAGE.'2009',0), -2010 => array(DEFAULT_ERROR_MESSAGE.'2010',0), -2011 => array(DEFAULT_ERROR_MESSAGE.'2011',0), -2012 => array(DEFAULT_ERROR_MESSAGE.'2012',0), -2013 => array(DEFAULT_ERROR_MESSAGE.'2013',0), -2014 => array(DEFAULT_ERROR_MESSAGE.'2014',0), -3001 => array(DEFAULT_ERROR_MESSAGE.'3001',0), -4002 => array(DEFAULT_ERROR_MESSAGE.'4002',0), -5001 => array(DEFAULT_ERROR_MESSAGE.'5001',0), -5002 => array(DEFAULT_ERROR_MESSAGE.'5002',0), -5003 => array(DEFAULT_ERROR_MESSAGE.'5003',0), -5004 => array(DEFAULT_ERROR_MESSAGE.'5004',0), -6001 => array(DEFAULT_ERROR_MESSAGE.'6001',0), -6002 => array(DEFAULT_ERROR_MESSAGE.'6002',0), -6003 => array(DEFAULT_ERROR_MESSAGE.'6003',0), -6004 => array(DEFAULT_ERROR_MESSAGE.'6004',0), -6005 => array(DEFAULT_ERROR_MESSAGE.'6005',0), -6006 => array(DEFAULT_ERROR_MESSAGE.'6006',0), -6007 => array(DEFAULT_ERROR_MESSAGE.'6007',0), -6008 => array(DEFAULT_ERROR_MESSAGE.'6008',0), -6009 => array(DEFAULT_ERROR_MESSAGE.'6009',0), -6010 => array(DEFAULT_ERROR_MESSAGE.'6010',0), -6011 => array(DEFAULT_ERROR_MESSAGE.'6011',0), -6012 => array(DEFAULT_ERROR_MESSAGE.'6012',0), -6015 => array(DEFAULT_ERROR_MESSAGE.'6015',0), -6016 => array(DEFAULT_ERROR_MESSAGE.'6016',0), -6017 => array(DEFAULT_ERROR_MESSAGE.'6017',0), -6018 => array(DEFAULT_ERROR_MESSAGE.'6018',0), -6019 => array(DEFAULT_ERROR_MESSAGE.'6019',0), -6020 => array(DEFAULT_ERROR_MESSAGE.'6020',0), -6021 => array(DEFAULT_ERROR_MESSAGE.'6021',0), -6022 => array(DEFAULT_ERROR_MESSAGE.'6022',0), -6023 => array(DEFAULT_ERROR_MESSAGE.'6023',0), -6024 => array(DEFAULT_ERROR_MESSAGE.'6024',0), -6025 => array(DEFAULT_ERROR_MESSAGE.'6025',0), -6027 => array(DEFAULT_ERROR_MESSAGE.'6027',0), -6028 => array(DEFAULT_ERROR_MESSAGE.'6028',0), -6029 => array(DEFAULT_ERROR_MESSAGE.'6029',0), -6030 => array(DEFAULT_ERROR_MESSAGE.'6030',0), -6031 => array(DEFAULT_ERROR_MESSAGE.'6031',0), -6032 => array(DEFAULT_ERROR_MESSAGE.'6032',0), -6033 => array(DEFAULT_ERROR_MESSAGE.'6033',0), -7001 => array(DEFAULT_ERROR_MESSAGE.'7001',0), -8001 => array(DEFAULT_ERROR_MESSAGE.'8001',0), -8002 => array(DEFAULT_ERROR_MESSAGE.'8002',0), -8003 => array(DEFAULT_ERROR_MESSAGE.'8003',0), -8004 => array(DEFAULT_ERROR_MESSAGE.'8004',0), -9001 => array(DEFAULT_ERROR_MESSAGE.'9001',0), -10001 => array(DEFAULT_ERROR_MESSAGE.'10001',0), -10002 => array(DEFAULT_ERROR_MESSAGE.'10002',0), -10003 => array(DEFAULT_ERROR_MESSAGE.'10003',0), -11001 => array(DEFAULT_ERROR_MESSAGE.'11001',0), -11002 => array(DEFAULT_ERROR_MESSAGE.'11002',0), -11003 => array(DEFAULT_ERROR_MESSAGE.'11003',0), -11004 => array(DEFAULT_ERROR_MESSAGE.'11004',0), -11005 => array(DEFAULT_ERROR_MESSAGE.'11005',0), -12001 => array(DEFAULT_ERROR_MESSAGE.'12001',0), -12002 => array(DEFAULT_ERROR_MESSAGE.'12002',0), -12003 => array(DEFAULT_ERROR_MESSAGE.'12003',0), -12004 => array(DEFAULT_ERROR_MESSAGE.'12004',0), -12005 => array(DEFAULT_ERROR_MESSAGE.'12005',0), -12006 => array(DEFAULT_ERROR_MESSAGE.'12006',0), -12007 => array(DEFAULT_ERROR_MESSAGE.'12007',0), -12008 => array(DEFAULT_ERROR_MESSAGE.'12008',0), -12009 => array(DEFAULT_ERROR_MESSAGE.'12009',0), -12010 => array(DEFAULT_ERROR_MESSAGE.'12010',0), -12011 => array(DEFAULT_ERROR_MESSAGE.'12011',0), -12012 => array(DEFAULT_ERROR_MESSAGE.'12012',0), -14001 => array(DEFAULT_ERROR_MESSAGE.'14001',0), -14002 => array(DEFAULT_ERROR_MESSAGE.'14002',0), -14003 => array(DEFAULT_ERROR_MESSAGE.'14003',0), -14004 => array(DEFAULT_ERROR_MESSAGE.'14004',0), -14005 => array(DEFAULT_ERROR_MESSAGE.'14005',0), -14006 => array(DEFAULT_ERROR_MESSAGE.'14006',0), -14007 => array(DEFAULT_ERROR_MESSAGE.'14007',0), -15001 => array(DEFAULT_ERROR_MESSAGE.'15001',0), -15002 => array(DEFAULT_ERROR_MESSAGE.'15002',0), -15003 => array(DEFAULT_ERROR_MESSAGE.'15003',0), -15004 => array(DEFAULT_ERROR_MESSAGE.'15004',0), -15005 => array(DEFAULT_ERROR_MESSAGE.'15005',0), -15006 => array(DEFAULT_ERROR_MESSAGE.'15006',0), -15007 => array(DEFAULT_ERROR_MESSAGE.'15007',0), -15008 => array(DEFAULT_ERROR_MESSAGE.'15008',0), -15009 => array(DEFAULT_ERROR_MESSAGE.'15009',0), -15010 => array(DEFAULT_ERROR_MESSAGE.'15010',0), -15011 => array(DEFAULT_ERROR_MESSAGE.'15011',0), -16001 => array(DEFAULT_ERROR_MESSAGE.'16001',0), -16002 => array(DEFAULT_ERROR_MESSAGE.'16002',0), -16003 => array(DEFAULT_ERROR_MESSAGE.'16003',0), -16004 => array(DEFAULT_ERROR_MESSAGE.'16004',0), -17001 => array(DEFAULT_ERROR_MESSAGE.'17001',0), -17002 => array(DEFAULT_ERROR_MESSAGE.'17002',0), -17004 => array(DEFAULT_ERROR_MESSAGE.'17004',0), -18001 => array(DEFAULT_ERROR_MESSAGE.'18001',0), -18002 => array(DEFAULT_ERROR_MESSAGE.'18002',0), -18003 => array(DEFAULT_ERROR_MESSAGE.'18003',0), -18004 => array(DEFAULT_ERROR_MESSAGE.'18004',0), -18005 => array(DEFAULT_ERROR_MESSAGE.'18005',0), -18006 => array(DEFAULT_ERROR_MESSAGE.'18006',0), -18007 => array(DEFAULT_ERROR_MESSAGE.'18007',0), -18008 => array(DEFAULT_ERROR_MESSAGE.'18008',0), -19001 => array(DEFAULT_ERROR_MESSAGE.'19001',0), -19002 => array(DEFAULT_ERROR_MESSAGE.'19002',0), -19003 => array(DEFAULT_ERROR_MESSAGE.'19003',0), -20001 => array(DEFAULT_ERROR_MESSAGE.'20001',0), -20002 => array(DEFAULT_ERROR_MESSAGE.'20002',0), -20003 => array(DEFAULT_ERROR_MESSAGE.'20003',0), -21001 => array(DEFAULT_ERROR_MESSAGE.'21001',0), -23001 => array(DEFAULT_ERROR_MESSAGE.'23001',0), -23002 => array(DEFAULT_ERROR_MESSAGE.'23002',0), -23003 => array(DEFAULT_ERROR_MESSAGE.'23003',0), -24001 => array(DEFAULT_ERROR_MESSAGE.'24001',0), -24002 => array(DEFAULT_ERROR_MESSAGE.'24002',0), -24003 => array(DEFAULT_ERROR_MESSAGE.'24003',0), -24004 => array(DEFAULT_ERROR_MESSAGE.'24004',0), -25001 => array(DEFAULT_ERROR_MESSAGE.'25001',0), -25002 => array(DEFAULT_ERROR_MESSAGE.'25002',0), -25003 => array(DEFAULT_ERROR_MESSAGE.'25003',0), -25004 => array(DEFAULT_ERROR_MESSAGE.'25004',0), -25005 => array(DEFAULT_ERROR_MESSAGE.'25005',0), -25006 => array(DEFAULT_ERROR_MESSAGE.'25006',0), -25007 => array(DEFAULT_ERROR_MESSAGE.'25007',0), -25008 => array(DEFAULT_ERROR_MESSAGE.'25008',0), -25009 => array(DEFAULT_ERROR_MESSAGE.'25009',0), -25010 => array(DEFAULT_ERROR_MESSAGE.'25010',0), -25011 => array(DEFAULT_ERROR_MESSAGE.'25011',0), -25012 => array(DEFAULT_ERROR_MESSAGE.'25012',0), -25013 => array(DEFAULT_ERROR_MESSAGE.'25013',0), -25014 => array(DEFAULT_ERROR_MESSAGE.'25014',0), -25015 => array(DEFAULT_ERROR_MESSAGE.'25015',0), -25016 => array(DEFAULT_ERROR_MESSAGE.'25016',0), -25017 => array(DEFAULT_ERROR_MESSAGE.'25017',0), -25018 => array(DEFAULT_ERROR_MESSAGE.'25018',0), -25019 => array(DEFAULT_ERROR_MESSAGE.'25019',0), -25020 => array(DEFAULT_ERROR_MESSAGE.'25020',0), -25021 => array(DEFAULT_ERROR_MESSAGE.'25021',0), -25022 => array(DEFAULT_ERROR_MESSAGE.'25022',0), -25023 => array(DEFAULT_ERROR_MESSAGE.'25023',0), -25024 => array(DEFAULT_ERROR_MESSAGE.'25024',0), -25025 => array(DEFAULT_ERROR_MESSAGE.'25025',0), -25026 => array(DEFAULT_ERROR_MESSAGE.'25026',0), -25027 => array(DEFAULT_ERROR_MESSAGE.'25027',0), -25028 => array(DEFAULT_ERROR_MESSAGE.'25028',0), -25029 => array(DEFAULT_ERROR_MESSAGE.'25029',0), -25030 => array(DEFAULT_ERROR_MESSAGE.'25030',0), -25031 => array(DEFAULT_ERROR_MESSAGE.'25031',0), -25032 => array(DEFAULT_ERROR_MESSAGE.'25032',0), -25033 => array(DEFAULT_ERROR_MESSAGE.'25033',0), -25034 => array(DEFAULT_ERROR_MESSAGE.'25034',0), -25035 => array(DEFAULT_ERROR_MESSAGE.'25035',0), -25036 => array(DEFAULT_ERROR_MESSAGE.'25036',0), -25037 => array(DEFAULT_ERROR_MESSAGE.'25037',0), -25038 => array(DEFAULT_ERROR_MESSAGE.'25038',0), -25039 => array(DEFAULT_ERROR_MESSAGE.'25039',0), -25040 => array(DEFAULT_ERROR_MESSAGE.'25040',0), -25041 => array(DEFAULT_ERROR_MESSAGE.'25041',0), -25042 => array(DEFAULT_ERROR_MESSAGE.'25042',0), -25043 => array(DEFAULT_ERROR_MESSAGE.'25043',0), -25044 => array(DEFAULT_ERROR_MESSAGE.'25044',0), -25045 => array(DEFAULT_ERROR_MESSAGE.'25045',0), -25046 => array(DEFAULT_ERROR_MESSAGE.'25046',0), -25047 => array(DEFAULT_ERROR_MESSAGE.'25047',0), -25048 => array(DEFAULT_ERROR_MESSAGE.'25048',0), -25049 => array(DEFAULT_ERROR_MESSAGE.'25049',0), -25050 => array(DEFAULT_ERROR_MESSAGE.'25050',0), -25051 => array(DEFAULT_ERROR_MESSAGE.'25051',0), -25052 => array(DEFAULT_ERROR_MESSAGE.'25052',0), -25053 => array(DEFAULT_ERROR_MESSAGE.'25053',0), -25054 => array(DEFAULT_ERROR_MESSAGE.'25054',0), -25055 => array(DEFAULT_ERROR_MESSAGE.'25055',0), -25056 => array(DEFAULT_ERROR_MESSAGE.'25056',0), -25057 => array(DEFAULT_ERROR_MESSAGE.'25057',0), -25058 => array(DEFAULT_ERROR_MESSAGE.'25058',0), -25059 => array(DEFAULT_ERROR_MESSAGE.'25059',0), -25060 => array(DEFAULT_ERROR_MESSAGE.'25060',0), -25061 => array(DEFAULT_ERROR_MESSAGE.'25061',0), -25062 => array(DEFAULT_ERROR_MESSAGE.'25062',0), -25063 => array(DEFAULT_ERROR_MESSAGE.'25063',0), -25064 => array(DEFAULT_ERROR_MESSAGE.'25064',0), -25065 => array(DEFAULT_ERROR_MESSAGE.'25065',0), -25066 => array(DEFAULT_ERROR_MESSAGE.'25066',0), -25067 => array(DEFAULT_ERROR_MESSAGE.'25067',0), -25068 => array(DEFAULT_ERROR_MESSAGE.'25068',0), -25069 => array(DEFAULT_ERROR_MESSAGE.'25069',0), -25070 => array(DEFAULT_ERROR_MESSAGE.'25070',0), -25071 => array(DEFAULT_ERROR_MESSAGE.'25071',0), -25072 => array(DEFAULT_ERROR_MESSAGE.'25072',0), -25073 => array(DEFAULT_ERROR_MESSAGE.'25073',0), -25074 => array(DEFAULT_ERROR_MESSAGE.'25074',0), -25075 => array(DEFAULT_ERROR_MESSAGE.'25075',0), -25077 => array(DEFAULT_ERROR_MESSAGE.'25077',0), -25078 => array(DEFAULT_ERROR_MESSAGE.'25078',0), -25079 => array(DEFAULT_ERROR_MESSAGE.'25079',0), -25080 => array(DEFAULT_ERROR_MESSAGE.'25080',0), -25081 => array(DEFAULT_ERROR_MESSAGE.'25081',0), -25082 => array(DEFAULT_ERROR_MESSAGE.'25082',0), -25083 => array(DEFAULT_ERROR_MESSAGE.'25083',0), -25084 => array(DEFAULT_ERROR_MESSAGE.'25084',0), -25085 => array(DEFAULT_ERROR_MESSAGE.'25085',0), -25086 => array(DEFAULT_ERROR_MESSAGE.'25086',0), -25087 => array(DEFAULT_ERROR_MESSAGE.'25087',0), -25088 => array(DEFAULT_ERROR_MESSAGE.'25088',0), -25089 => array(DEFAULT_ERROR_MESSAGE.'25089',0), -25090 => array(DEFAULT_ERROR_MESSAGE.'25090',0), -25091 => array(DEFAULT_ERROR_MESSAGE.'25091',0), -25092 => array(DEFAULT_ERROR_MESSAGE.'25092',0), -25093 => array(DEFAULT_ERROR_MESSAGE.'25093',0), -25094 => array(DEFAULT_ERROR_MESSAGE.'25094',0), -25095 => array(DEFAULT_ERROR_MESSAGE.'25095',0), -25096 => array(DEFAULT_ERROR_MESSAGE.'25096',0), -25097 => array(DEFAULT_ERROR_MESSAGE.'25097',0), -25098 => array(DEFAULT_ERROR_MESSAGE.'25098',0), -25099 => array(DEFAULT_ERROR_MESSAGE.'25099',0), -25100 => array(DEFAULT_ERROR_MESSAGE.'25100',0), -25101 => array(DEFAULT_ERROR_MESSAGE.'25101',0), -25102 => array(DEFAULT_ERROR_MESSAGE.'25102',0), -25103 => array(DEFAULT_ERROR_MESSAGE.'25103',0), -25104 => array(DEFAULT_ERROR_MESSAGE.'25104',0), -25105 => array(DEFAULT_ERROR_MESSAGE.'25105',0), -25106 => array(DEFAULT_ERROR_MESSAGE.'25106',0), -25107 => array(DEFAULT_ERROR_MESSAGE.'25107',0), -25108 => array(DEFAULT_ERROR_MESSAGE.'25108',0), -25109 => array(DEFAULT_ERROR_MESSAGE.'25109',0), -25110 => array(DEFAULT_ERROR_MESSAGE.'25110',0), -25111 => array(DEFAULT_ERROR_MESSAGE.'25111',0), -25112 => array(DEFAULT_ERROR_MESSAGE.'25112',0), -25113 => array(DEFAULT_ERROR_MESSAGE.'25113',0), -25114 => array(DEFAULT_ERROR_MESSAGE.'25114',0), -25115 => array(DEFAULT_ERROR_MESSAGE.'25115',0), -25116 => array(DEFAULT_ERROR_MESSAGE.'25116',0), -25117 => array(DEFAULT_ERROR_MESSAGE.'25117',0), -25118 => array(DEFAULT_ERROR_MESSAGE.'25118',0), -25119 => array(DEFAULT_ERROR_MESSAGE.'25119',0), -25120 => array(DEFAULT_ERROR_MESSAGE.'25120',0), -25121 => array(DEFAULT_ERROR_MESSAGE.'25121',0), -25122 => array(DEFAULT_ERROR_MESSAGE.'25122',0), -25123 => array(DEFAULT_ERROR_MESSAGE.'25123',0), -25124 => array(DEFAULT_ERROR_MESSAGE.'25124',0), -25125 => array(DEFAULT_ERROR_MESSAGE.'25125',0), -25126 => array(DEFAULT_ERROR_MESSAGE.'25126',0), -25127 => array(DEFAULT_ERROR_MESSAGE.'25127',0), -25128 => array(DEFAULT_ERROR_MESSAGE.'25128',0), -25129 => array(DEFAULT_ERROR_MESSAGE.'25129',0), -25130 => array(DEFAULT_ERROR_MESSAGE.'25130',0), -25131 => array(DEFAULT_ERROR_MESSAGE.'25131',0), -25500 => array(DEFAULT_ERROR_MESSAGE.'25500',0), -24003 => array(DEFAULT_ERROR_MESSAGE.'24003',0), -24004 => array(DEFAULT_ERROR_MESSAGE.'24004',0), -24005 => array(DEFAULT_ERROR_MESSAGE.'24005',0), -24006 => array(DEFAULT_ERROR_MESSAGE.'24006',0), -24007 => array(DEFAULT_ERROR_MESSAGE.'24007',0), -24008 => array(DEFAULT_ERROR_MESSAGE.'24008',0), -24009 => array(DEFAULT_ERROR_MESSAGE.'24009',0), -24010 => array(DEFAULT_ERROR_MESSAGE.'24010',0), -24011 => array(DEFAULT_ERROR_MESSAGE.'24011',0), -24012 => array(DEFAULT_ERROR_MESSAGE.'24012',0), -24013 => array(DEFAULT_ERROR_MESSAGE.'24013',0), -24014 => array(DEFAULT_ERROR_MESSAGE.'24014',0), -24015 => array(DEFAULT_ERROR_MESSAGE.'24015',0), -22001 => array(DEFAULT_ERROR_MESSAGE.'22001',0), -22002 => array(DEFAULT_ERROR_MESSAGE.'22002',0), -22004 => array(DEFAULT_ERROR_MESSAGE.'22004',0), -22005 => array(DEFAULT_ERROR_MESSAGE.'22005',0), -22006 => array(DEFAULT_ERROR_MESSAGE.'22006',0), -22007 => array(DEFAULT_ERROR_MESSAGE.'22007',0), -22008 => array(DEFAULT_ERROR_MESSAGE.'22008',0), -22009 => array(DEFAULT_ERROR_MESSAGE.'22009',0), -22010 => array(DEFAULT_ERROR_MESSAGE.'22010',0), -22011 => array(DEFAULT_ERROR_MESSAGE.'22011',0), -22012 => array(DEFAULT_ERROR_MESSAGE.'22012',0), -22013 => array(DEFAULT_ERROR_MESSAGE.'22013',0), -22014 => array(DEFAULT_ERROR_MESSAGE.'22014',0), -22015 => array(DEFAULT_ERROR_MESSAGE.'22015',0), -22016 => array(DEFAULT_ERROR_MESSAGE.'22016',0), -22017 => array(DEFAULT_ERROR_MESSAGE.'22017',0), -22018 => array(DEFAULT_ERROR_MESSAGE.'22018',0), -22019 => array(DEFAULT_ERROR_MESSAGE.'22019',0), -22020 => array(DEFAULT_ERROR_MESSAGE.'22020',0), -13001 => array(DEFAULT_ERROR_MESSAGE.'13001',0), -13002 => array(DEFAULT_ERROR_MESSAGE.'13002',0), -1001 => array(DEFAULT_ERROR_MESSAGE.'1001',0), -1002 => array(DEFAULT_ERROR_MESSAGE.'1002',0), -1003 => array(DEFAULT_ERROR_MESSAGE.'1003',0), -1004 => array(DEFAULT_ERROR_MESSAGE.'1004',0), -1005 => array(DEFAULT_ERROR_MESSAGE.'1005',0), -1006 => array(DEFAULT_ERROR_MESSAGE.'1006',0), -1007 => array(DEFAULT_ERROR_MESSAGE.'1007',0), -1008 => array(DEFAULT_ERROR_MESSAGE.'1008',0), -1009 => array(DEFAULT_ERROR_MESSAGE.'1009',0), -1010 => array(DEFAULT_ERROR_MESSAGE.'1010',0), -1011 => array(DEFAULT_ERROR_MESSAGE.'1011',0), -26000 => array(DEFAULT_ERROR_MESSAGE.'26000',0), -26001 => array(DEFAULT_ERROR_MESSAGE.'26001',0), -26002 => array(DEFAULT_ERROR_MESSAGE.'26002',0), -26003 => array(DEFAULT_ERROR_MESSAGE.'26003',0), -26004 => array(DEFAULT_ERROR_MESSAGE.'26004',0), -26005 => array(DEFAULT_ERROR_MESSAGE.'26005',0), -26006 => array(DEFAULT_ERROR_MESSAGE.'26006',0), -26007 => array(DEFAULT_ERROR_MESSAGE.'26007',0), -26008 => array(DEFAULT_ERROR_MESSAGE.'26008',0), -26009 => array(DEFAULT_ERROR_MESSAGE.'26009',0), -26010 => array(DEFAULT_ERROR_MESSAGE.'26010',0), -26011 => array(DEFAULT_ERROR_MESSAGE.'26011',0), -26012 => array(DEFAULT_ERROR_MESSAGE.'26012',0), -26013 => array(DEFAULT_ERROR_MESSAGE.'26013',0), -26014 => array(DEFAULT_ERROR_MESSAGE.'26014',0), -26015 => array(DEFAULT_ERROR_MESSAGE.'26015',0), -26016 => array(DEFAULT_ERROR_MESSAGE.'26016',0), - -27001 => array(DEFAULT_ERROR_MESSAGE.'27001',0), -27002 => array(DEFAULT_ERROR_MESSAGE.'27002',0), -27003 => array(DEFAULT_ERROR_MESSAGE.'27003',0), -27004 => array(DEFAULT_ERROR_MESSAGE.'27004',0), -27005 => array(DEFAULT_ERROR_MESSAGE.'27005',0), -27006 => array(DEFAULT_ERROR_MESSAGE.'27006',0), -27007 => array(DEFAULT_ERROR_MESSAGE.'27007',0), -27008 => array(DEFAULT_ERROR_MESSAGE.'27008',0), -27009 => array(DEFAULT_ERROR_MESSAGE.'27009',0), -27010 => array(DEFAULT_ERROR_MESSAGE.'27010',0), -27011 => array(DEFAULT_ERROR_MESSAGE.'27011',0), -27012 => array(DEFAULT_ERROR_MESSAGE.'27012',0), -27013 => array(DEFAULT_ERROR_MESSAGE.'27013',0), -27014 => array(DEFAULT_ERROR_MESSAGE.'27014',0), -27015 => array(DEFAULT_ERROR_MESSAGE.'27015',0), - -28001 => array(DEFAULT_ERROR_MESSAGE.'28001',0), -28002 => array(DEFAULT_ERROR_MESSAGE.'28002',0), -28003 => array(DEFAULT_ERROR_MESSAGE.'28003',0), -28004 => array(DEFAULT_ERROR_MESSAGE.'28004',0), -28005 => array(DEFAULT_ERROR_MESSAGE.'28005',0), -28006 => array(DEFAULT_ERROR_MESSAGE.'28006',0), -28007 => array(DEFAULT_ERROR_MESSAGE.'28007',0), - -29201 => array(DEFAULT_ERROR_MESSAGE.'28001',0), -29202 => array(DEFAULT_ERROR_MESSAGE.'28002',0), -29203 => array(DEFAULT_ERROR_MESSAGE.'28003',0), -29204 => array(DEFAULT_ERROR_MESSAGE.'28004',0), -29205 => array(DEFAULT_ERROR_MESSAGE.'28005',0), -29206 => array(DEFAULT_ERROR_MESSAGE.'28006',0), -29207 => array(DEFAULT_ERROR_MESSAGE.'28007',0), -29208 => array(DEFAULT_ERROR_MESSAGE.'28008',0), -29209 => array(DEFAULT_ERROR_MESSAGE.'28009',0), -29210 => array(DEFAULT_ERROR_MESSAGE.'28010',0), - -); - -?> diff --git a/html/lib/tcpdf/CHANGELOG.TXT b/html/lib/tcpdf/CHANGELOG.TXT deleted file mode 100644 index 2cfb85ae6a..0000000000 --- a/html/lib/tcpdf/CHANGELOG.TXT +++ /dev/null @@ -1,2922 +0,0 @@ -6.2.6 (2015-01-28) - - Bug #1008 "UTC offset sing breaks PDF/A-1b compliance" was fixed. - -6.2.5 (2015-01-24) - - Bug #1019 "$this in static context" was fixed. - - Bug #1015 "Infinite loop in getIndirectObject method of parser" was fixed. - -6.2.4 (2015-01-08) - - fix warning related to empty K_PATH_URL. - - fix error when a $table_colwidths key is not set. - -6.2.3 (2014-12-18) - - New comment. - - Moved the K_PATH_IMAGES definition in tcpdf_autoconfig. - -6.2.2 (2014-12-18) - - Fixed mispelled words. - - Fixed version number. - -6.2.1 (2014-12-18) - - The constant K_TCPDF_THROW_EXCEPTION_ERROR is now set to false in the default configuration file. - - An issue with the _destroy() method was fixed. - -6.2.0 (2014-12-10) - - Bug #1005 "Security Report, LFI posting internal files externally abusing default parameter" was fixed. - - Static methods serializeTCPDFtagParameters() and unserializeTCPDFtagParameters() were moved as non static to the main TCPDF class (see changes in example n. 49). - - Deprecated methods were removed, please use the equivalents defined in other classes (i.e. TCPDF_STATIC and TCPDF_FONTS). - - The constant K_TCPDF_CALLS_IN_HTML is now set by default to FALSE. - - DLE, DLX and DLP page format was added. - - Page format are now defined as a public property in TCPDF_STATIC. - -6.1.1 (2014-12-09) - - Fixed bug with the register_shutdown_function(). - -6.1.0 (2014-12-07) - - The method TCPDF_STATIC::getRandomSeed() was improved. - - The disk caching feature was removed. - - Bug #1003 "Backslashes become duplicated in table, using WriteHTML" was fixed. - - Bug #1002 "SVG radialGradient within non-square Rect" was fixed. - -6.0.099 (2014-11-15) - - Added basic support for nested SVG images (adapted PR from SamMousa). - - A bug related to setGDImageTransparency() was fixed (thanks to Maarten Boerema). - -6.0.098 (2014-11-08) - - Bug item #996 "getCharBBox($char) returns incorrect results for TTF glyphs without outlines" was fixed. - - Bug item #991 "Text problem with SVG" was fixed (only the font style part). - -6.0.097 (2014-10-20) - - Bug item #988 "hyphenateText - charmin parameter not work" was fixed. - - New 1D barcode method to print pre-formatted IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200. - -6.0.096 (2014-10-06) - - Bug item #982 "Display style is not inherited in SVG" was fixed. - - Bug item #984 "Double quote url in CSS" was fixed. - -6.0.095 (2014-10-02) - - Bug item #979 "New Timezone option overwriting current timezone" was fixed. - -6.0.094 (2014-09-30) - - Bug item #978 "Variable Undefined: $cborder" was fixed. - -6.0.093 (2014-09-02) - - Security fix: some serialize/unserialize methods were replaced with json_encode/json_decode to avoid a potential object injection with user supplied content. Thanks to ownCloud Inc. for reporting this issue. - - K_TIMEZONE constant was added to the default configuration to suppress date-time warnings. - -6.0.092 (2014-09-01) - - Bug item #956 "Monospaced fonts are not alignd at the baseline" was fixed. - - Bug item #964 "Problem when changing font size" was fixed. - - Bug item #969 "ImageSVG with radialGradient problem" was fixed. - - sRGB.icc file was replaced with the one from the Debian package icc-profiles-free (2.0.1+dfsg-1) - -6.0.091 (2014-08-13) - - Issue #325"Division by zero when css fontsize equals 0" was fixed. - -6.0.090 (2014-08-08) - - Starting from this version TCPDF is also available in GitHub at https://github.com/tecnickcom/TCPDF - - Function getmypid() was removed for better compatibility with shared hosting environments. - - Support for pulling SVG stroke opacity value from RGBa color was mergeg [adf006]. - - Bug item #951 "HTML Table within TCPDF columns doesnt flow correctly on page break ..." was fixed. - -6.0.089 (2014-07-16) - - Bug item #948 "bottom line of rowspan cell not work correctly" was fixed. - -6.0.088 (2014-07-09) - - Bug item #946 "Case sensitive type check causes broken match for SVG" was fixed. - - Bug item #945 "Imagick load doesn't account for passed data string " was fixed. - -6.0.087 (2014-06-25) - - A bug affecting fitcell option in Multicell was fixed. - -6.0.086 (2014-06-20) - - Bug item #938 "Hyphenation-dash extends outside of cell" was fixed (collateral effect). - -6.0.085 (2014-06-19) - - Some example images were replaced. - - A race condition bug was fixed. - - Bug item #938 "Hyphenation-dash extends outside of cell" was fixed. - -6.0.084 (2014-06-13) - - A bug related to MultiCell fitcell feature was fixed. - - Bug item #931 "Documentation error for setPageFormat()" was fixed. - -6.0.083 (2014-05-29) - - Bug item #928 "setHtmlVSpace with HR element" was fixed. - -6.0.082 (2014-05-23) - - Bug item #926 "test statement instead of assignment used in tcpdf_fonts.php" was fixed. - - Bug item #925 "924 transparent images bug" was fixed. - -6.0.081 (2014-05-22) - - Bug item #922 "writehtml tables thead repeating" was fixed. - - Patch #71 "External and internal links, local and remote" wa applied. - -6.0.080 (2014-05-20) - - Bug item #921 "Fatal error in hyphenateText() function" was fixed. - - Bug item #923 "Automatic Hyphenation error" was fixed. - - Patch #70 "Augument TCPDFBarcode classes with ability to return raw png image data" was applied. - -6.0.079 (2014-05-19) - - Patch item #69 "Named destinations, HTML internal and external links" was merged. - - Bug item #920 "hyphenateText() should not hyphenate the content of style-tags in HTML mode" was fixed. - - Image method now trigs an error in case the cache is now writeable. - - Fixed issue with layer default status. - -6.0.078 (2014-05-12) - - A warning issue in addTTFfont() method was fixed. - - Fonts were updated to include cbbox metrics. - -6.0.077 (2014-05-06) - - A Datamatrix barcode bug was fixed. - -6.0.076 (2014-05-06) - - A bug in Datamatrix Base256 encoding was fixed. - - Merged fix for SVG use/clip-gradient. - - Now it is possible to prefix a page number in Link methods with the * character to avoid been changed when adding/deleting/moving pages (see example_045.php). - -6.0.075 (2014-05-05) - - Bug #917 "Using realtive Units like ex or em for images distort output in HTML mode" was fixed. - -6.0.074 (2014-05-03) - - Part of Bug #917 "Using realtive Units like ex or em for images distort output in HTML mode" was fixed. - - Bug #915 "Problem with SVG Image using Radial Gradients" was fixed. - -6.0.073 (2014-04-29) - - Bug #913 "Possible bug with line-height" was fixed. - - Bug #914 "MultiCell and FitCell" was fixed. - - Bug #915 "Problem with SVG Image using Radial Gradients" was fixed. - -6.0.072 (2014-04-27) - - Deprecated curly braces substring syntax was replaced with square braces. - -6.0.071 (2014-04-25) - - Bug #911 "error with buffered png pics" was fixed. - -6.0.070 (2014-04-24) - - Bug #910 "An SVG image is being cut off (with clipping mask) when you use align options" was fixed. - -6.0.069 (2014-04-24) - - Datamatrix Base256 encoding was fixed. - -6.0.068 (2014-04-22) - - Some Datamatrix barcode bugs were fixed. - -6.0.067 (2014-04-21) - - startLayer() method signature was changed to include a new "lock" parameter. - -6.0.066 (2014-04-20) - - Bug #908 "Linebreak is not considered when getting length of the next string" was fixed. - -6.0.065 (2014-04-10) - - Bug #905 "RGB percentage color bug in convertHTMLColorToDec()" was fixed. - -6.0.064 (2014-04-07) - - Header and Footer fonts are now set by default. - - Bug #904 "PDF corrupted" was fixed. - -6.0.063 (2014-04-03) - - Method TCPDF_IMAGES::_parsepng() was fixed to support transparency in Indexed images. - -6.0.062 (2014-03-02) - - The method startLayer() now accepts the NULL value for the $print parameter to not set the print layer option. - -6.0.061 (2014-02-18) - - Bug #893 "Parsing error on streamed xref for secured pdf" was fixed. - -6.0.060 (2014-02-16) - - Bug #891 "Error on parsing hexa fields" was fixed. - - Bug #892 "Parsing pdf with trailing space at start" was fixed. - -6.0.059 (2014-02-03) - - SVG 'use' support was imporved. - -6.0.058 (2014-01-31) - - Bug #886 "Bugs with SVG using and " was fixed. - -6.0.057 (2014-01-26) - - Bug #883 "Parsing error" was fixed. - -6.0.056 (2014-01-25) - - The automatic cache folder selection now works also with some restricted hosting environments. - - CSS text-transform property is now supported (requires the multibyte string library for php) - see examle n. 061 (Thanks to Walter Ferraz). - - Bug #884 "Parsing error prev tag looking for" was fixed. - -6.0.055 (2014-01-15) - - Bug #880 "Error detecting hX tags (h1,h2..)" was fixed - - Bug #879 "Thead on the second page inherits style of previous tr" was fixed - -6.0.054 (2014-01-13) - - Bug #877 "Parenteses causing corrupt text" was fixed. - -6.0.053 (2014-01-03) - - Bug #876 "Cell padding should not be multiplied with number of lines in getStringHeight" was fixed. - - Patch #68 "Empty img src attribute leads to access of uninitialized string offset" was applied. - -6.0.052 (2013-12-12) - - Bug #871 "Datamatrix coding" was fixed. - -6.0.051 (2013-12-02) - - cbbox array values in addTTFfont() were converted to integers. - -6.0.050 (2013-12-01) - - The method getNumLines() was extended to support hyphenation. - - The CSS property line-height now supports non percentage values. - -6.0.050 (2013-11-27) - - A bug related to PNG images was fixed. - -6.0.048 (2013-11-24) - - SVG vars are now reset in ImageSVG() method. - -6.0.047 (2013-11-19) - - SVG support was extended to support some nested defs. - -6.0.046 (2013-11-17) - - preg_replace_callback functions were replaced to improve memory performances. - -6.0.045 (2013-11-17) - - Bug #862 "Parsing error on flate filter" was fixed. - -6.0.044 (2013-11-10) - - Bug #857 "Undefined offset error" was fixed. - - The uniord method now uses a static cache to improve performances (thanks to Mathieu Masseboeuf for the sugegstion). - - Two bugs in the TCPDF_FONTS class were fixed. - -6.0.043 (2013-10-29) - - Bug #854 "CSS instruction display" was fixed. - -6.0.042 (2013-10-25) - - Bug #852 "CMYK Colors Bug" was fixed. - -6.0.041 (2013-10-21) - - Bug #851 "Problem with images in PDF. PHP timing out" was fixed. - -6.0.040 (2013-10-20) - - Bug #849 "SVG import bug" was fixed. - -6.0.039 (2013-10-13) - - Bug #843 "Wrong call in parser" was fixed. - - Bug #844 "Wrong object type named" was fixed. - - Bug #845 "Parsing error on obj ref prefixed by '000000'" was fixed. - -6.0.038 (2013-10-06) - - Bug #841 "Division by zero warning at writeHTML a

      1. tag" was fixed. - -6.0.037 (2013-09-30) - - Method getAllSpotColors() was added to return all spot colors. - - Method colorRegistrationBar() was extended to automatically print all spot colors and support individual spot colors. - - The method registrationMarkCMYK() was added to print a registration mark for CMYK colors. - - A bug related to page groups was fixed. - - Gradient() method now supports CMYK equivalents of spot colors. - - Example n. 56 was updated. - -6.0.036 (2013-09-29) - - Methods for registration bars and crop marks were extended to support registration color (see example n. 56). - - New default spot colors were added to tcpdf_colors.php, including the 'All' and 'None' special registration colors. - -6.0.035 (2013-09-25) - - TCPDF_PARSER class was improved. - -6.0.034 (2013-09-24) - - Bug #839 "Error in xref parsing in mixed newline chars" was fixed. - -6.0.033 (2013-09-23) - - Bug fix related to PNG image transparency using GD library. - -6.0.032 (2013-09-23) - - Bug #838 "Fatal error when imagick cannot handle the image, even though GD is available and can" was fixed. - -6.0.031 (2013-09-18) - - Bug #836 "Optional EOL marker before endstream" was fixed. - - Some additional controls were added to avoid "division by zero" error with badly formatted input. - -6.0.030 (2013-09-17) - - Bug #835 "PDF417 and Cyrilic simbols" was fixed. - -6.0.029 (2013-09-15) - - Constants K_TCPDF_PARSER_THROW_EXCEPTION_ERROR and K_TCPDF_PARSER_IGNORE_DECODING_ERRORS where removed in favor of a new configuration array in the TCPDF_PARSER class. - - The TCPDF_PARSER class can now be configured using the new $cfg parameter. - -6.0.028 (2013-09-15) - - A debug print_r was removed form tcpdf_parser.php. - - TCPDF_FILTERS class now throws an exception in case of error. - - TCPDF_PARSER class now throws an exception in case of error unless you define the constant K_TCPDF_PARSER_THROW_EXCEPTION_ERROR to false. - - The constant K_TCPDF_PARSER_IGNORE_DECODING_ERRORS can be set to tru eto ignore decoding errors on TCPDF_PARSER. - -6.0.027 (2013-09-14) - - A bug in tcpdf_parser wen parsing hexadecimal strings was fixed. - - A bug in tcpdf_parser wen looking for statxref was fixed. - - A bug on RC4 encryption was fixed. - -6.0.026 (2013-09-14) - - A bug in tcpdf_parser wen decoding streams was fixed. - -6.0.025 (2013-09-04) - - A pregSplit() bug was fixed. - - Improved content loading from URLs. - - Improved font path loading. - -6.0.024 (2013-09-02) - - Bug #826 "addEmptySignatureAppearance issue" was fixed. - -6.0.023 (2013-08-05) - - GNU Freefont fonts were updated. - - Licensing and copyright information about fonts were improved. - - PNG image support was improved. - -6.0.022 (2013-08-02) - - fixing initialization problem for signature_appearance property. - -6.0.021 (2013-07-18) - - The bug caused by the preg_split function on some PHP 5.2.x versions was fixed. - -6.0.020 (2013-06-04) - - The method addTTFfont() was fixed (Bug item #813 Undefined offset). - -6.0.019 (2013-06-04) - - The magic constant __DIR__ was replaced with dirname(__FILE__) for php 5.2 compatibility. - - The exceptions raised by file_exists() function were suppressed. - -6.0.018 (2013-05-19) - - The barcode examples were changed to automatically search for the barcode class path (in case the examples directory is not installed under the TCPDF root). - -6.0.017 (2013-05-16) - - The command line tool tcpdf_addfont.php was improved. - - The php logic was removed from configuration files that now contains only constant defines. - - The tcpdf_autoconfig.php file was added to automatically set missing configuration values. - -6.0.016 (2013-05-15) - - The tcpdf_addfont.php tool was improved (thanks to Remi Collet). - - Constant K_PATH_IMAGES is now automatically set in configuration file. - -6.0.015 (2013-05-14) - - Some unused vars were removed from AddFont() method. - - Some directories were moved inside the examples directory. - - All examples were updated to reflect the new default structure. - - Source code were clean-up up to be more compatible with system packaging. - - Files encodings and permissions were reset. - - The command line tool tcpdf_addfont.php was added on the tools directory. - -6.0.014 (2013-04-13) - - The signature of addTTFfont() method includes a new parameter to link existing fonts instead of copying and compressing them. - -6.0.013 (2013-04-10) - - Add support for SVG dx and dy text/tspan attributes. - - replace require() with require_once(). - - fix some minor typos on documentation. - - fix a problem when deleting all pages. - -6.0.012 (2013-04-24) - - An error condition in addHtmlLink() method was fixed (bug #799). - -6.0.011 (2013-04-22) - - Minor documentation changes. - -6.0.010 (2013-04-03) - - The method Rect() was fixed to print borders correctly. - -6.0.009 (2013-04-02) - - Adding back some files that were not properly committed on the latest release. - -6.0.008 (2013-04-01) - - Duplicated encoding maps was removed from tcpdf_font_data.php. - - Fixing bug on AddTTFFont(). - -6.0.007 (2013-03-29) - - HTML/CSS font size conversion were improved. - -6.0.006 (2013-03-27) - - Bug related to SVG and EPS files on xobjects were fixed. - -6.0.005 (2013-03-26) - - Default font path was fixed. - -6.0.004 (2013-03-21) - - Return value of addTTFfont() method was fixed. - -6.0.003 (2013-03-20) - - A bug related to non-unicode mode was fixed. - -6.0.002 (2013-03-18) - - _getFIXED call on tcpdf_fonts.php was fixed. - -6.0.001 (2013-03-18) - - Fixed $uni_type call on tcpdf.php. - -6.0.000 (2013-03-17) - - IMPORTANT: PHP4 support has been removed starting from this version. - - Several TCPDF methods and vars were moved to new class files: tcpdf_static.php, tcpdf_colors.php, tcpdf_images.php, tcpdf_font_data.php, tcpdf_fonts.php. - - Files htmlcolors.php, spotcolors.php, unicode_data.php and ecodings_maps.php were removed. - - Barcode classes were renamed and new barcode examples were added. - - Class TCPDF_PARSER was improved. - -******************************************************************************** - -5.9.209 (2013-03-15) - - Image method was improved. - -5.9.208 (2013-03-15) - - objclone function was patched to support old imagick extensions. - - tcpdf_parser was improved to support Cross-Reference Streams and large streams. - -5.9.207 (2013-03-04) - - Datamatrix class was fixed (a debug echo was removed). - -5.9.206 (2013-02-22) - - Bug item #754 "PNG with alpha channel becomes gray scale" was fixed. - - Minor documentation fixes. - -5.9.205 (2013-02-06) - - The constant K_TCPDF_THROW_EXCEPTION_ERROR was added on configuration file to change the behavior of Error() method. - - PDF417 barcode bug was fixed. - -5.9.204 (2013-01-23) - - The method Bookmark() was extended to include named destinations, URLs, internal links or embedded files (see example n. 15). - - automatic path calculation on configuration file was fixed. - - Error() method was extended to throw new Exception if PHP > 5. - -5.9.203 (2013-01-22) - - Horizontal position of radiobuttons and checkboxes was adjusted. - -5.9.202 (2012-12-16) - - Vertical space problem after table was fixed. - -5.9.201 (2012-12-10) - - First 256 chars are now always included on font subset to overcome a problem reported on the forum. - -5.9.200 (2012-12-05) - - Bug item #768 "Rowspan with Pagebreak error" was fixed. - - Page regions now works also with limited MultiCell() cells. - -5.9.199 (2012-11-29) - - Internal setImageBuffer() method was improved. - -5.9.198 (2012-11-19) - - Datamatrix EDIFACT mode was fixed. - -5.9.197 (2012-11-06) - - Bug item #756 "TCPDF 5.9.196 shows line on top of all PDFs" was fixed. - -5.9.196 (2012-11-02) - - Several methods were improved to avoid output when the context is out of page. - - Bug item #755 "remove cached files before unsetting" was fixed. - -5.9.195 (2012-10-24) - - Method _putfonts() was improved. - -5.9.194 (2012-10-23) - - Text alignment on TextField() method was fixed. - -5.9.193 (2012-09-25) - - Support for named destinations on HTML links was added (i.e.: link to named destination). - -5.9.192 (2012-09-24) - - A problem on the releasing process was fixed. - -5.9.191 (2012-09-24) - - SVG image naow support svg and eps images. - -5.9.190 (2012-09-23) - - "page" word translation is now set to empty if not defined. - - Tooltip feature was added on the radiobutton annotation. - -5.9.189 (2012-09-18) - - Bug item #3568969 "ini_get safe_mode error" was fixed. - -5.9.188 (2012-09-15) - - A datamatrix barcode bug was fixed. - -5.9.187 (2012-09-14) - - Subset feature was extended to include the first 256 characters. - -5.9.186 (2012-09-13) - - barcodes.php file was resynced. - - Methods SetAbsX, SetAbsY, SetAbsXY where added to set the absolute pointer coordinates. - - Method getCharBBox were added to get single character bounding box. - - Signature of addTTFfont method was changed ($addcbbox parameter was added). - -5.9.185 (2012-09-12) - - Method _putfontwidths() was fixed. - -5.9.184 (2012-09-11) - - A problem with EAN barcodes was fixed. - -5.9.183 (2012-09-07) - - A problem with font names normalization was fixed. - -5.9.182 (2012-09-05) - - Bug item #3564982 "Infinite loop in Write() method" was fixed. - -5.9.181 (2012-08-31) - - composer.json file was added. - - Bug item #3563369 "Cached images are not unlinked some time" was fixed. - -5.9.180 (2012-08-22) - - Bug item #3560493 "Problems with nested cells in HTML" was fixed. - -5.9.179 (2012-08-04) - - SVG 'use' tag was fixed for 'circle' and 'ellipse' shift problem. - - Alpha status is now correctly stored and restored by getGraphicVars() and SetGraphicVars() methods. - -5.9.178 (2012-08-02) - - SVG 'use' tag was fixed for 'circle' and 'ellipse'. - -5.9.177 (2012-08-02) - - An additional control on annotations was fixed. - -5.9.176 (2012-07-25) - - A bug related to stroke width was fixed. - - A problem related to font spacing in HTML was fixed. - -5.9.175 (2012-07-25) - - The problem of missing letter on hyphen break was fixed. - -5.9.174 (2012-07-25) - - The problem of wrong filename when downloading PDF from an Android device was fixed. - - The method setHeaderData() was extended to set text and line color for header (see example n. 1). - - The method setFooterData() was added to set text and line color for footer (see example n. 1). - - The methods setTextShadow() and getTextShadow() were added to set text shadows (see example n. 1). - - The GetCharWidth() method was fixed for negative character spacing. - - A 'none' border mode is now correctly recognized. - - Break on hyphen problem was fixed. - -5.9.173 (2012-07-23) - - Some additional control wher added on barcode methods. - - The option CURLOPT_FOLLOWLOCATION on Image method is now disabled if PHP safe_mode is on or open_basedir is set. - - Method Bookmark() was extended to include X parameter. - - Method setDestination() was extended to include X parameter. - - A problem with Thai language was fixed. - -5.9.172 (2012-07-02) - - A PNG color profile issue was fixed. - -5.9.171 (2012-07-01) - - Some SVG rendering problems were fixed. - -5.9.170 (2012-06-27) - - Bug #3538227 "Numerous errors inserting shared images" was fixed. - -5.9.169 (2012-06-25) - - Some SVG rendering problems were fixed. - -5.9.168 (2012-06-22) - - Thai language rendering was fixed. - -5.9.167 (2012-06-22) - - Thai language rendering was fixed and improved. - - Method isCharDefined() was improved. - - Protected method replaceChar() was added. - - Font "kerning" word was corrected to "tracking". - -5.9.166 (2012-06-21) - - Array to string conversion on file_id creation was fixed. - - Thai language rendering was fixed (thanks to Atsawin Chaowanakritsanakul). - -5.9.165 (2012-06-07) - - Some HTML form related bugs were fixed. - -5.9.164 (2012-06-06) - - A bug introduced on the latest release was fixed. - -5.9.163 (2012-06-05) - - Method getGDgamma() was changed. - - Rendering performances of PNG images with alpha channel were improved. - -5.9.162 (2012-05-11) - - A bug related to long text on TD cells was fixed. - -5.9.161 (2012-05-09) - - A bug on XREF table was fixed (Bug ID: 3525051). - - Deprecated Imagick:clone was replaced. - - Method objclone() was fixed for PHP4. - -5.9.160 (2012-05-03) - - A bug on tcpdf_parser.php was fixed. - -5.9.159 (2012-04-30) - - Barcode classes were updated to fix PNG export Bug (ID: 3522291). - -5.9.158 (2012-04-22) - - Some SVG-related bugs were fixed. - -5.9.157 (2012-04-16) - - Some SVG-related bugs were fixed. - -5.9.156 (2012-04-10) - - Bug item #3515885 "TOC and booklet: left and right page exchanged". - - SetAutoPageBreak(false) now works also in multicolumn mode. - -5.9.155 (2012-04-02) - - Bug item #3512596 "font import problems" was fixed. - - Method addTTFfont() was modified to extract only specified Platform ID and Encoding ID (check the source code documentation). - - All fonts were updated. - - Bug item #3513867 "booklet and setHeaderTemplateAutoreset: header shifted left" was fixed. - - Bug item #3513749 "TCPDF Superscript/Subscript" was fixed. - -5.9.154 (2012-03-29) - - A debug echo was removed. - -5.9.153 (2012-03-28) - - A bug on font conversion was fixed. - - All fonts were updated. - - Method isCharDefined() was added to find if a character is defined on the selected font. - - Method replaceMissingChars() was added to automatically replace missing chars on selected font. - - SetFont() method was fixed. - -5.9.152 (2012-03-23) - - The following overprint methods were added: setOverprint(), getOverprint(). - - Signature of setAlpha() method was changed and method getAlpha() was added. - - stroke-opacity support was added on SVG. - - The following date methods were added: setDocCreationTimestamp(), setDocModificationTimestamp(), getDocCreationTimestamp(), getDocModificationTimestamp(), getFormattedDate(), getTimestamp(). - - Signature of _datestring() method was changed. - - Method getFontBBox() was added. - - Method setPageBoxTypes() was aded. - -5.9.151 (2012-03-22) - - Bug item #3509889 "Transform() distorts PDF" was fixed. - - Precision of real number were extended. - - ComboBox and ListBox methods were fixed. - - Bulgarian language file was added. - - addTOC() method was improved to include bookmark color and font style. - -5.9.150 (2012-03-16) - - A bug related to form fields in PDF/A mode was fixed. - -5.9.149 (2012-02-21) - - Bug item #3489933 "SVG Parser treats tspan like text" was fixed. - -5.9.148 (2012-02-17) - - Bug item #3488600 "Multiple radiobutton sets get first set value" was fixed. - -5.9.147 (2012-02-14) - - A problem with SVG gradients has been fixed. - -5.9.146 (2012-02-12) - - Bug item #3486880 "$filehash undefine error" was fixed. - - The default font is now the one specified at PDF_FONT_NAME_MAIN constant. - -5.9.145 (2012-01-28) - - Japanese language file was added. - - TCPDF license and README.TXT files were updated. - -5.9.144 (2012-01-12) - - HTML output on barcode classes was improved. - -5.9.143 (2012-01-08) - - Bug item #3471057 "setCreator() has no effect" was fixed. - -5.9.142 (2011-12-23) - - Source code documentation was updated. - -5.9.141 (2011-12-14) - - Some minor bugs were fixed. - -5.9.140 (2011-12-13) - - SVG now supports embedded images encoded as base64. - -5.9.139 (2011-12-11) - - Spot color methods were fixed. - -5.9.138 (2011-12-10) - - cropMark() method was improved (check source code documentation). - - Example n. 56 was updated. - - Bug item #3452390 "Check Box still not ticked when set to true" was fixed. - -5.9.137 (2011-12-01) - - Bug item #3447005 "Background color and border of Form Elements is printed" was fixed. - - Color support for Form elements was improved. - -5.9.136 (2011-11-27) - - Bug item #3443387 "SetMargins with keep option does not work for top margin" was fixed. - -5.9.135 (2011-11-04) - - Bug item #3433406 "Double keywords in description" was fixed. - -5.9.134 (2011-10-29) - - The default value for $defcol parameter on convertHTMLColorToDec() method was fixed. - - Deafult HTTP headers were changed to avoid browser caching. - - Some deprecated syntax were replaced. - -5.9.133 (2011-10-26) - - Bug item #3428446 "copyPage method not working when diskcache enabled" was fixed. - -5.9.132 (2011-10-20) - - Bug item #3426167 "bug in function convertHTMLColorToDec()" was fixed. - -5.9.131 (2011-10-13) - - An error message was added to ImagePngAlpha() method. - -5.9.130 (2011-10-12) - - Now you can set image data strings on HTML img tag by encoding the image binary data in this way: $imgsrc = '@'.base64_encode($imgdata); - -5.9.129 (2011-10-07) - - Core fonts metrics was fixed (replace all helvetica and times php files on fonts folder). - - Form fields support was improved and some problems were fixed (check the example n. 14). - - Bug item #3420249 "Issue with booklet and MultiCell" was fixed. - -5.9.128 (2011-10-06) - - Method addTTFfont() was improved (check the source code documentation). - - Method setExtraXMP() to set custom XMP data was added. - -5.9.127 (2011-10-04) - - Readonly mode option was activated for radiobuttons. - -5.9.126 (2011-10-03) - - Bug item #3417989 "Graphics State operator in form XObject fails to render" was fixed. - - Xobjects problems with transparency, gradients and spot colors were fixed. - -5.9.125 (2011-10-03) - - Support for 8-digit CMYK hexadecimal color representation was added (to be used with XHTML and SVG). - - Spot colors support was improved (check example n. 37). - - Color methods were improved. - -5.9.124 (2011-10-02) - - Core fonts were updated. - -5.9.123 (2011-10-02) - - The method addTTFfont() wad added to automatically convert TTF fonts (check the new fonts guide at http://www.tcpdf.org). - - Old font utils were removed. - - All fonts were updated and new arabic fonts were added (almohanad were removed and replaced by aefurat and aealarabiya). - - The file unicode_data.php was updated. - - The file encodings_maps.php was added. - - PDF/A files are now compressed to save space. - - XHTML input form fields now support text-alignment attribute. - -5.9.122 (2011-09-29) - - PDF/A-1b compliance was improved to pass some online testing. - -5.9.121 (2011-09-28) - - This version includes support for PDF/A-1b format (the class constructor signature was changed - see example n. 65). - - Method setSRGBmode() was added to force sRGB_IEC61966-2.1 black scaled ICC color profile for the whole document (file sRGB.icc was added). - - 14 new fonts were added to allow embedding core fonts (for PDF/A compliance). - - Font utils were fixed. - -5.9.120 (2011-09-22) - - This version includes a fix for _getTrueTypeFontSubset() method. - -5.9.119 (2011-09-19) - - This version includes a fix for extra page numbering on TOC. - -5.9.118 (2011-09-17) - - This version includes some changes that allows you to add a bookmark for a page that do not exist. - -5.9.117 (2011-09-15) - - TCPDFBarcode and TCPDF2DBarcode classes were extended to include a method for exporting barcodes as PNG images. - -5.9.116 (2011-09-14) - - Datamatrix class was improved and documentation was fixed. - -5.9.115 (2011-09-13) - - Datamatrix ECC200 barcode support was added (a new datamatrix.php file was added) - check example n. 50. - - getBarcodeHTML() method was added on TCPDFBarcode and TCPDF2DBarcode classes to return an HTML representation of the barcode. - - cURL options on Image() method were improved. - - A bug on write2DBarcode() was fixed. - -5.9.114 (2011-09-04) - - A bug related to column position was fixed. - -5.9.113 (2011-08-24) - - This release include two new experimental files for parsing an existing PDF document (the integration with TCPDF is under development). - -5.9.112 (2011-08-18) - - A newline character was added after the 'trailer' keyword for compatibility with some parsers. - - Support for layers was improved. - -5.9.111 (2011-08-17) - - Barcode CODE 39 default gap was restored at 1. - -5.9.110 (2011-08-17) - - Barcode CODE 39 was fixed. - -5.9.109 (2011-08-12) - - Method getNumLines() was fixed. - - A bug related to page break in multi-column mode was fixed. - -5.9.108 (2011-08-09) - - A bug on PHP4 version was fixed. - -5.9.107 (2011-08-08) - - This version includes a minor bugfix. - -5.9.106 (2011-08-04) - - This version includes transparency groups: check the new parameter on startTemplate() method and example 62. - -5.9.105 (2011-08-04) - - Bug item #3386153 "Check Box not ticked when set to true" was fixed. - -5.9.104 (2011-08-01) - - Bug item #3383698 "imagemagick, resize and dpi" was fixed. - -5.9.103 (2011-07-16) - - Alignment of XHTML lines was improved. - - Spell of the "length" word was fixed. - -5.9.102 (2011-07-13) - - Methods startLayer() and endLayer() were added to support arbitrary PDF layers. - - Some improvements/fixes for images were added (thanks to Brendan Abbott). - -5.9.101 (2011-07-07) - - Support for JPEG and PNG ICC Color Profiles was added. - - Method addEmptySignatureAppearance() was added to add empty signature fields (see example n. 52). - - Bug item #3354332 "Strange line spacing with reduced font-size in writeHTML" was fixed. - -5.9.100 (2011-06-29) - - An SVG bug has been fixed. - -5.9.099 (2011-06-27) - - Bug item #3335045 "Font freesans seems somehow corrupted in footer" was fixed. - -5.9.098 (2011-06-23) - - The Named Destination feature was fixed. - -5.9.097 (2011-06-23) - - The method setHtmlVSpace() now can be used also for tags: div, li, br, dt and dd. - - The Named Destination feature was added (check the example n. 15) - thanks to Christian Deligant. - -5.9.096 (2011-06-19) - - Bug item #3322234 "Surrogate pairs codes in arrUTF8ToUTF16BE" was fixed. - -5.9.095 (2011-06-18) - - Numbers alignment for Table-Of-Content methods was improved and fixed. - - Font subsetting was fixed to include all parts of composite fonts. - -5.9.094 (2011-06-17) - - Bug item #3317898 "Page Group numbering broken in 5.9.093" was fixed. - -5.9.093 (2011-06-16) - - Method setStartingPageNumber() was added to set starting page number (for automatic page numbering). - -5.9.092 (2011-06-15) - - Method _putpages() was improved. - - Bug item #3316678 "Memory overflow when use Rotate and SetAutoPageBreak" was fixed. - - Right alignment of page numbers was improved. - -5.9.090 (2011-06-14) - - Methods AliasNbPages() and AliasNumPage() were re-added as deprecated for backward compatibility. - -5.9.089 (2011-06-13) - - Example n. 8 was updated. - - Method sendOutputData() was changed to remove default compression (it was incompatible with some server settings). - - Bugs related to page group numbers were fixed. - - Method copyPage() was fixed. - - Method Image() was improved to include support for alternative and external images. - -5.9.088 (2011-06-01) - - Method getAutoPageBreak() was added (see example n. 51). - - Example n. 51 (full page background) was updated. - -5.9.087 (2011-06-01) - - Method sendOutputData() was improved to include deflate encoding. - - Barcode classes on PHP 4 version were fixed. - -5.9.086 (2011-05-31) - - Font files were updated (the ones on the previous release were broken). - - The script fonts/utils/makeallttffonts.php was updated and fixed. - - Output() method was improved to use compression when available. - -5.9.085 (2011-05-31) - - TCPDFBarcode class (barcodes.php) now includes getBarcodeSVG() and getBarcodeSVGcode() methods to get SVG image representation of the barcode. - - TCPDF2DBarcode class (2dbarcodes.php) now includes getBarcodeSVG() and getBarcodeSVGcode() methods to get SVG image representation of the barcode. - -5.9.084 (2011-05-29) - - Font files were updated. - - The file fonts/utils/makeallttffonts.php was updated. - - Bug item# 3308774 "Problems with font subsetting" was fixed. - -5.9.083 (2011-05-24) - - Bug item #3308387 "line height & SetCellHeightRatio" was fixed. - -5.9.082 (2011-05-22) - - Bug item #3305592 "Setting fill color <> text color breaks text clipping" was fixed. - -5.9.081 (2011-05-18) - - Method resetHeaderTemplate() was added to reset the xobject template used by Header() method. - - Method setHeaderTemplateAutoreset() was added to automatically reset the xobject template used by Header() method at each page. - -5.9.080 (2011-05-17) - - A problem related to file path calculation for images was fixed. - - A problem related to unsuppressed getimagesize() error was fixed. - -5.9.079 (2011-05-16) - - Footer() method was changed to use C128 barcode as default (instead of the previous C128B). - -5.9.078 (2011-05-12) - - Bug item #3300878 "wrong rendering for html bullet list in some case" was fixed. - - Bug item #3301017 "Emphasized vs. font-weight" was fixed. - - Barcode Code 128 was improved to include AUTO mode (automatically switch between A, B and C modes). - - Examples n. 27 and 49 were updated. - -5.9.077 (2011-05-07) - - Bug item #3298591 "error code93" was fixed. - - SetLineStyle() function was improved. - -5.9.076 (2011-05-06) - - Bug item #3298264 "codebar 93 error" was fixed. - -5.9.075 (2011-05-02) - - Table header alignment when using WriteHTMLCell() or MultiCell() was fixed. - -5.9.074 (2011-04-28) - - Bug item #3294306 "CSS classes not work in table section" was fixed. - -5.9.073 (2011-04-27) - - A bug related to character entities on HTML cells was fixed. - -5.9.072 (2011-04-26) - - Method resetColumns() was added to remove multiple columns and reset page margins (example n. 10 was updated). - -5.9.071 (2011-04-19) - - Bug #3288574 "
        trouble" was fixed. - -5.9.069 (2011-04-19) - - Bug #3288763 "HTML-Table: non-breaking table rows: Bug" was fixed. - -5.9.068 (2011-04-15) - - Bookmark, addTOC and addHTMLTOC methods were improved to include font style and color (Examples 15, 49 and 59 were updated). - - Default $_SERVER['DOCUMENT_ROOT'] value on tcpdf_config.php file was changed. - -5.9.067 (2011-04-10) - - Performances were drastically improved (PDF documents are now created more quickly). - -5.9.066 (2011-04-09) - - A bug related to digital signature + encryption was fixed. - - A bug related to encryption + xobject templates was fixed. - -5.9.065 (2011-04-08) - - Bug item #3280512 "Text encoding iso-8859-2 crashes" was fixed. - -5.9.064 (2011-04-05) - - A bug related to character entities on HTML cells was fixed. - -5.9.063 (2011-04-01) - - Bug item #3267235 "WriteHTML() and image that doesn't fit on the page" was fixed. - -5.9.062 (2011-03-23) - - Bug item #3232650 "Using Write if there are pageRegions active creates error" was fixed. - - Bug item #3221891 "text input borders" was fixed. - - Bug item #3228958 "Adobe Reader 9.4.2 crash" was fixed. - -5.9.061 (2011-03-15) - - Bug item #3213488 "wrong function call in function Write" was fixed. - - Bug item #3203007 "list element with black background" was fixed. - -5.9.060 (2011-03-08) - - addTOC() method was fixed for text alignment problems. - -5.9.059 (2011-02-27) - - Default Header() method was improved to reduce document size. - -5.9.058 (2011-02-25) - - Image() method was improved to cache images with transparency layers (thanks to Korneliusz Jarzębski for reporting this problem). - -5.9.057 (2011-02-24) - - A problem with image caching system was fixed (thanks to Korneliusz Jarzębski for reporting this problem). - -5.9.056 (2011-02-22) - - A bug on fixHTMLCode() method was fixed. - - Automatic line break for HTML was fixed. - -5.9.055 (2011-02-17) - - Another bug related to HTML table page break was fixed. - -5.9.054 (2011-02-16) - - A bug related to HTML table page break was fixed. - -5.9.053 (2011-02-16) - - Support for HTML attribute display="none" was added. - -5.9.052 (2011-02-15) - - A bug related to HTML automatic newlines was fixed. - -5.9.051 (2011-02-12) - - "Commas at beginning of new lines" problem was fixed. - -5.9.050 (2011-02-11) - - Bug #3177606 "SVG Bar chart error" was fixed. - -5.9.049 (2011-02-03) - - Bug #3170777 "TCPDF creates a new page after a single line in writeHTML" was fixed. - -5.9.048 (2011-02-02) - - No changes. Just released to override previous release that was not uploaded correctly. - -5.9.047 (2011-01-28) - - Bug #3167115 "PDF error in (example 48)" was fixed (was introduced in 5.8.046). - -5.9.046 (2011-01-18) - - PDF view/print layers are now automatically turned off if not used (see setVisibility() method). - -5.9.045 (2011-01-17) - - HTML list support were improved. - -5.9.044 (2011-01-15) - - Bug #3158422 "writeHTMLCell Loop" was fixed. - - Some HTML image alignment problems were fixed. - -5.9.043 (2011-01-14) - - Bug #3158178 "PHP Notice" was fixed. - - Bug #3158193 "Endless loop in writeHTML" was fixed. - - Bug #3157764 "SVG Pie chart incorrectly rendered2". - -5.9.042 (2011-01-14) - - Some problems of the PHP4 version were fixed. - -5.9.041 (2011-01-13) - - A problem with SVG elliptical arc path was fixed (ref. bug #3156574). - - A problem related to font weight on HTML table headers was fixed. - -5.9.040 (2011-01-12) - - A bug related to empty pages after table was fixed. - -5.9.039 (2011-01-12) - - Bug item #3155759 "openssl_random_pseudo_bytes() slow under Windows" was fixed. - -5.9.038 (2011-01-11) - - Minor bugs were fixed. - -5.9.037 (2011-01-09) - - An alignment problem for HTML texts was fixed. - -5.9.036 (2011-01-07) - - A bug related to HTML tables on header was fixed. - -5.9.035 (2011-01-03) - - A problem related to HTML table border alignment was fixed. - - Bug #2996366 "FastCGI and Header Problems" was fixed. - -5.9.034 (2010-12-19) - - DejaVu and GNU Free fonts were updated. - -5.9.033 (2010-12-18) - - Source code documetnation was improved. - -5.9.032 (2010-12-18) - - Default font stretching and spacing values are now inherited by HTML methods. - -5.9.031 (2010-12-16) - - Source code documentation errors were fixed. - -5.9.030 (2010-12-16) - - Several source code documentation errors were fixed. - - Source code style was changed for Doxygen. - - Source code documentation was moved online to http://www.tcpdf.org - -5.9.029 (2010-12-04) - - The $fitbox parameter on Image() method was extended to specify image alignment inside the box (check the example n. 9). - -5.9.028 (2010-12-03) - - Font utils makefont.php and makeallttffonts.php were updated. - -5.9.027 (2010-12-01) - - Spot Colors are now better integrated with HTML mode. - - Method SetDocInfoUnicode() was added to turn on/off Unicode mode for document information dictionary (meta tags) - check the example n. 19. - -5.9.026 (2010-12-01) - - A problem with mixed text directions on HTML was fixed. - -5.9.025 (2010-12-01) - - The AddSpotColor() now automatically fills the spotcolor array (defined on spotcolors.php file). - -5.9.024 (2010-11-30) - - Bug item #3123612 "SVG not use gradientTransform in percentage mode" was fixed. - -5.9.023 (2010-11-25) - - A potential bug on SVG transcoder was fixed. - -5.9.022 (2010-11-21) - - Method ImageEPS includes support for EPS/AI Spot colors. - - Method ImageEPS includes a new parameter $fixoutvals to remove values outside the bounding box. - -5.9.021 (2010-11-20) - - Support for custom bullet points images was added (check the example n.6) - - Examples n. 6 and 61 were update (check the comments inside). - -5.9.020 (2010-11-19) - - A problem related to additional page when using multicolumn mode was fixed. - -5.9.019 (2010-11-19) - - An SVG bug was fixed. - - ImageSVG() and ImageEPS() methods now accepts image data streams (put the string on the $file parameter preceded by '@' character). - - Option 'E' was added to the $dest parameter of Output() method to return the document as base64 mime multi-part email attachment (RFC 2045). - -5.9.018 (2010-11-19) - - An SVG bug was fixed. - -5.9.017 (2010-11-16) - - Tagline color was set to transparent. - - The method fixHTMLCode() was added to automatically clean up HTML code (requires HTML Tidy). - -5.9.016 (2010-11-16) - - Bug item #3109705 "list item page break hanging bullet" was fixed. - -5.9.015 (2010-11-16) - - Bug item affecting QRCode was fixed. - - Some bugs affecting HTML lists were fixed. - - ImageSVG() and fitBlock() methods were improved to handle some SVG problems. - - Some problems with PHP4 compatibility were fixed. - -5.9.014 (2010-11-15) - - Bug item #3109464 "QRCode error" was fixed. - -5.9.013 (2010-11-15) - - Bug item #3109257 "Problem with interlaced GIFs and PNGs" was fixed. - - Image function now accepts image data streams (check example n. 9). - -5.9.012 (2010-11-12) - - Method getTCPDFVersion() was added. - - PDF_PRODUCER constant was removed. - - Method convertHTMLColorToDec() was improved. - - HTML colors now support spot color names defined on the new spotcolors.php file. - - The default method Header() was improved to support SVG and EPS/AI images. - - A bug on SVG importer was fixed. - -5.9.011 (2010-11-02) - - Bug item #3101486 "Bug Fix for image loading" was fixed. - -5.9.010 (2010-10-27) - - Support for CSS properties 'border-spacing' and 'padding' for tables were added. - - Several language files were added. - -5.9.009 (2010-10-21) - - HTML text alignment was improved to include the case of RTL text on LTR direction and LTR text on RTL direction. - -5.9.008 (2010-10-21) - - Bug item #3091502 "Bookmark oddity" was fixed. - - HTML internal links now accepts page number and Y position. - - The method write1DBarcode() was improved to accept separate horizontal and vertical padding (see example n. 27). - -5.9.007 (2010-10-20) - - Method adjustCellPadding() was fixed to handle bad input. - -5.9.006 (2010-10-19) - - Support for AES 256 bit encryption was added (see example n. 16). - - Method getNumLines() was fixed for the empty string case. - -5.9.005 (2010-10-18) - - Method addPageRegion() was changed to accept regions starting exactly from the top of the page. - -5.9.004 (2010-10-18) - - A bug related to annotations was fixed. - - The file unicode_data.php was canged to encapsulate all data in a class. - - The file htmlcolors.php was changed to remove the global variable. - -5.9.003 (2010-10-15) - - Support for no-write page regions was added. Check the example n. 64 and new methods setPageRegions(), addPageRegion(), getPageRegions(), removePageRegion(). - - A bug on Right-To-Left alignment was fixed. - -5.9.002 (2010-10-08) - - Cell method was improved to preserve the font stretching and spacing values when using the $stretch parameter (see example n. 4). - -5.9.001 (2010-10-07) - - The problem of blank page for nobr table higher than a single page was fixed. - -5.9.000 (2010-10-06) - - Support for text stretching and spacing (tracking) was added, see example n. 63 and methods setFontStretching(), getFontStretching(), setFontSpacing(), getFontSpacing(). - - Support for CSS properties 'font-stretch' and 'letter-spacing' was added (see example n. 63). - - The cMargin state was replaced by cell_padding array that can be set/get using setCellPadding() and getCellPadding() methods. - - Methods getCellPaddings() and setCellPaddings() were added to fine tune cell paddings (see example n. 5). - - Methods getCellMargins() and setCellMargins() were added to fine tune cell margins (see example n. 5). - - Method write1DBarcode() was improved to permit custom labels (see example n. 27). - - Method ImagePngAlpha() now includes support for ImageMagick to improve performances. - - XObject Template support was extended to support Multicell(), writeHTML() and writeHTMLCell() methods. - - The signature of getNumLines() and getStringHeight() methods is changed. - - Example n. 57 was updated. - -// ------------------------------------------------------------------- - -5.8.034 (2010-09-27) - - A bug related to SetFont on XObject templates was fixed. - -5.8.033 (2010-09-25) - - A problem with Footer() and multiple columns was fixed. - -5.8.032 (2010-09-22) - - Bug #3073165 "Issues with changes to addHTMLVertSpace()" was fixed. - -5.8.031 (2010-09-20) - - Bug #3071961 "Spaces in HTML" was fixed. - -5.8.030 (2010-09-17) - - SVG support was improved and some bugs were fixed. - -5.8.029 (2010-09-16) - - A problem with HTML borders was fixed. - -5.8.028 (2010-09-13) - - Bug #3065224 "mcrypt_create_iv error on TCPDF 5.8.027 on PHP 5.3.2" was fixed. - -5.8.027 (2010-09-13) - - Bug #3065118 "mcrypt_decrypt error on TCPDF 5.8.026 on PHP 5.3.2" was fixed. - -5.8.026 (2010-09-13) - - A bug on addHTMLTOC() method was fixed. Note: be sure that the #TOC_PAGE_NUMBER# template has enough width to be printed correctly. - -5.8.025 (2010-09-09) - - Bug #3062692 "Textarea inside a table" was fixed. - -5.8.024 (2010-09-08) - - Bug #3062005 "Undefined variable: ann_obj_id" was fixed. - -5.8.023 (2010-08-31) - - Forms bug added on version 5.8.019 was fixed. - -5.8.022 (2010-08-31) - - Bug #3056632 "SVG rendered vertically flipped" was fixed. - -5.8.021 (2010-08-30) - - A new CID-0 'chinese' font was added for traditional Chinese. - - Bug #3054287 'Inner tags are ignored due to "align" attribute' was fixed. - -5.8.020 (2010-08-26) - - CSS "catch-all" class selector is now supported. - -5.8.019 (2010-08-26) - - XObject Templates now includes support for links and annotations. - - A problem related to link alignment on cell was fixed. - - A problem related to SVG styles was fixed. - -5.8.018 (2010-08-25) - - Method getNumberOfColumns() was added. - - A problem related to table header was fixed. - - Method getSVGTransformMatrix() was fixed to apply SVG transformations in the correct order. - - SVG support was improved and several bugs were fixed. - -5.8.017 (2010-08-25) - - This version includes support for XObject Templates (see the new example n. 62). - - Methods starttemplate(), endTemplate() and printTemplate() were added (see the new example n. 62). - -5.8.016 (2010-08-24) - - Alignment problem on write2DBarcode was fixed. - -5.8.015 (2010-08-24) - - A problem arose with the latest bugfix was fixed. - -5.8.014 (2010-08-23) - - Method _getxobjectdict() was added for better compatibility with external extensions. - - A bug related to radiobuttons was fixed. - - Bug #3051509 "new line after punctuation marks" was fixed (partially). - -5.8.013 (2010-08-23) - - SVG support for 'direction' property was added. - - A problem on default width calculation for linear barcodes was fixed. - - New option was added to write1DBarcode() method to improve alignments (see example n. 27). - - Bug #3050896 "Nested HTML tables: styles are not applied" was fixed. - - Method _putresourcedict() was improved to include external XObject templates. - -5.8.012 (2010-08-22) - - Support for SVG 'text-anchor' property was added. - -5.8.011 (2010-08-21) - - Method write1DBarcode() was improved to be backward compatible (check the new example n. 27). - - Support for CSS width and height properties on images were added. - -5.8.010 (2010-08-20) - - Documentation of unhtmlentities() was fixed. - - The 'fitwidth' option was added and border color problem was fixed on write1DBarcode() method (check the example n. 27). - -5.8.009 (2010-08-20) - - Internal object numbering was improved. - - Some errors in object encryption were fixed. - -5.8.008 (2010-08-19) - - Method write1DBarcode() was changed, check the example n. 27. - - Method Footer() was changed to account for barcode changes. - - Automatic calculation of K_PATH_URL constant was fixed on configuration file. - - Method setEqualColumns() was fixed for $width=0 case. - - Method AddTOC() was fixed for multipage and multicolumn modes. - - Better support for SVG "font-family" property. - - A problem on default Page Zoom mode was fixed. - - Several Annotation bugs were fixed. - -5.8.007 (2010-08-18) - - A bug affecting HTML tables was fixed. - - Bug #3047500 "SVG not rendering paths properly" was fixed. - -5.8.006 (2010-08-17) - - A bug affecting HTML table nesting was fixed. - -5.8.005 (2010-08-17) - - A bug affecting the HTML 'select' tag in certain conditions was fixed. - -5.8.004 (2010-08-17) - - Better support for HTML "font-family" property. - - A bug related to HTML multicolumn was fixed. - -5.8.003 (2010-08-16) - - Better support for HTML "font-family" property. - -5.8.002 (2010-08-14) - - HTML alignments were improved - - IMPORTANT: Default regular expression to find spaces has been changed to exclude the non-breaking-space (160 DEC- A0 HEX). If you are using setSpacesRE() method, please read the new documentation. - - Example n. 1 was updated. - -5.8.001 (2010-08-12) - - Bug #3043650 "subsetchars incorrectly cached" was fixed. - -5.8.000 (2010-08-11) - - A control to avoid bookmarking page 0 was added. - - addTOC() method now includes support for multicolumn mode. - - Support for tables in multicolumn mode was improved. - - Example n.10 was updated. - - All trimming functions were replaced with stringLeftTrim(), stringRightTrim() and stringTrim(). - - HTML alignments were improved. - ------------------------------------------------------------- - -5.7.003 (2010-08-08) - - Bug #3041263 "php source ending is bad" was fixed (all PHP files were updated, including fonts). - -5.7.002 (2010-08-06) - - Methods copyPage(), movePage() and deletePage() were changed to account for internal markings. - -5.7.001 (2010-08-05) - - Bug #3040105 "Broken PDF when using TOC (example 45)" was fixed. - -5.7.000 (2010-08-03) - - CSS borders are now supported for HTML tables and other block tags (see example n. 61); - - Cell borders were improved (see example n. 57); - - Minor bugs were fixed. - ------------------------------------------------------------- - -5.6.000 (2010-07-31) - - A bug with object IDs was fixes. - - Performances were improved. - ------------------------------------------------------------- - -5.5.015 (2010-07-29) - - Automatic fix for unclosed self-closing tag. - - Support for deprecated 's' and 'strike' tags was added. - - Empty list items problem was fixed. - -5.5.014 (2010-07-15) - - Support for external images was improved. - -5.5.013 (2010-07-14) - - Bug #3029338 "FI and FO output destination filename bug" was fixed (previous fix was wrong). - -5.5.012 (2010-07-14) - - Bug #3029310 "Font baseline inconsistencies with line-height and font-size" was fixed. - - Bug #3029338 "FI and FO output destination filename bug" was fixed. - -5.5.011 (2010-07-09) - - Support for multiple CSS classes was added. - - The method getColumn() was added to return the current column number. - - Some regular Expressions were fixed to be more compatible with UTF-8. - -5.5.010 (2010-07-06) - - Bug item #3025772 "Borders in all image functions are still flawed" was fixed. - -5.5.009 (2010-07-05) - - A problem related to last page footer was fixed. - - Image alignments and fit-on-page features were improved. - -5.5.008 (2010-07-02) - - A problem on table header alignment in booklet mode was fixed. - - Default graphic vars are now applied for setHeader(); - -5.5.007 (2010-07-02) - - Attribute "readonly" was added to input and textarea form fields. - - Vertical alignment feature was added on MultiCell() method only for simple text mode (see example n. 5). - - Text-Fit feature was added on MultiCell() method only for simple text mode (see example n. 5). - -5.5.006 (2010-06-29) - - getStringHeight() and getNumLines() methods were fixed. - -5.5.005 (2010-06-28) - - Bug #3022170 "getFontDescent() does not return correct descent value" was fixed. - - Some problems with multicolumn mode were fixed. - -5.5.004 (2010-06-27) - - Bug #3021803 "SVG Border" was fixed. - -5.5.003 (2010-06-26) - - On Write() method, blank lines at the beginning of a page or column are now automatically removed. - -5.5.002 (2010-06-24) - - ToUnicode Identity-H name was replaced with a full CMap (to avoid preflight syntax error). - - Bug #3020638 "str_split() not available in php4" was fixed. - - Bug #3020665 "file_get_contents() too many parameters for php4" was fixed. - -5.5.001 (2010-06-23) - - A problem on image streams was fixed. - -5.5.000 (2010-06-22) - - Several PDF syntax errors (and related bugs) were fixed. - - Bug #3019090 "/Length values are wrong if AES encryption is used" was fixed. - ------------------------------------------------------------- - -5.4.003 (2010-06-19) - - A problem related to page boxes was fixed. - - Bug #3016920 "Font subsetting issues when editing pdf" was partially fixed (Note that flattening transparency layers is currently incompatible with TrueTypeUnicode fonts). - -5.4.002 (2010-06-18) - - A problem related with setProtection() method was fixed. - -5.4.001 (2010-06-18) - - A problem related with setProtection() method was fixed. - -5.4.000 (2010-06-18) - - The method setSignatureAppearance() was added, check the example n. 52. - - Several problems related to font subsetting were fixed. - ------------------------------------------------------------- - -5.3.010 (2010-06-15) - - Previous release was corrupted. - -5.3.009 (2010-06-15) - - Bug #3015934 "Bullets don't display correctly" was fixed. - -5.3.008 (2010-06-13) - - This version fixes some problems of SVG rasterization. - -5.3.007 (2010-06-13) - - This version improves SVG support. - -5.3.006 (2010-06-10) - - This version includes a change in uniqid calls for backward compatibility with PHP4. - -5.3.005 (2010-06-09) - - The method getPageSizeFromFormat() was changed to include all standard page formats (includes 281 page formats + variation). - -5.3.004 (2010-06-08) - - Bug #3013291 "HTML table cell width" was fixed. - - Bug #3013294 "HTML table cell alignment" was fixed. - - The columns widths of HTML tables are now inherited from the first row. - -5.3.003 (2010-06-08) - - Bug #3013102 "HTML table header misaligned after page break" was fixed. - -5.3.002 (2010-06-07) - - The methods setFontSubsetting() and setFontSubsetting() were added to control the default font subsetting mode (see example n. 1). - - Bug #3012596 "Whitespace should not appeared after use Thai top characters" was fixed. - - Examples n. 1, 14, and 54 were updated. - -5.3.001 (2010-06-06) - - Barcode PDF417 was improved to support Macro Code Blocks (see example n. 50). - -5.3.000 (2010-06-05) - - License was changed to GNU-LGPLv3 (see the updated LICENSE.TXT file). - - PDF417 barcode support was added (check the example n. 50). - - The method write2DBarcode() was improved (some parameters were added and other changed - check example n. 50). - ------------------------------------------------------------- - -5.2.000 (2010-06-02) - - IMPORTANT: Support for font subsetting was added by default to reduce the size of documents using large unicode font files. - If you embed the whole font in the PDF, the person on the other end can make changes to it even if he didn't have your font. - If you subset the font, file size of the PDF will be smaller but the person who receives your PDF would need to have your same font in order to make changes to your PDF. - - The signature of the SetFont() and AddFont() methods were changed to include the font subsetting option (subsetting is applied by default). - - Examples 14 and 54 were updated. - ------------------------------------------------------------- - -5.1.002 (2010-05-27) - - Bug #3007818 "SetAutoPageBreak fails with MultiCell" was fixed. - - A bug related to MultiCell() minimun height was fixed. - -5.1.001 (2010-05-26) - - The problem of blank page after table was fixed. - -5.1.000 (2010-05-25) - - This version includes support for CSS (Cascading Style Sheets) (see example n. 61). - - The convertHTMLColorToDec() method was improved. - ------------------------------------------------------------- - -5.0.014 (2010-05-21) - - A problem on color and style of HTML links was fixed. - - A bug relative to gradients was fixed. - - The getStringHeight() method was added and getNumLines() method was improved. - - All examples were updated. - -5.0.013 (2010-05-19) - - A bug related to page-breaks and table cells was fixed. - -5.0.012 (2010-05-19) - - Page orientation bug was fixed. - - The access to method setPageFormat() was changed to 'protected' because it is not intended to be directly called. - -5.0.011 (2010-05-19) - - Page orientation bug was fixed. - - Bug #3003966 "Multiple columns and nested lists" was fixed. - -5.0.010 (2010-05-17) - - The methods setPageFormat(), setPageOrientation() and related methods were extended to include page boxes, page rotations and page transitions. - - The method setPageBoxes() was added to set page boundaries (MediaBox, CropBox, BleedBox, TrimBox, ArtBox); - - A bug relative to underline, overline and linethrough was fixed. - -5.0.009 (2010-05-16) - - Bug #3002381 "Multiple columns and nested lists" was fixed. - -5.0.008 (2010-05-15) - - Bug "Columns WriteHTML and Justification" was fixed. - -5.0.007 (2010-05-14) - - Bug #3001347 "Bug when using WriteHTML with setEqualColumns()" was fixed. - - Bug #3001505 "problem with sup and sub tags at the beginning of a line" was fixed. - -5.0.006 (2010-05-13) - - Length of hr tag was fixed. - - An error on 2d barcode method was fixed. - -5.0.005 (2010-05-12) - - WARNING: The logic of permissions on the SetProtection() method has been inverted and extended (see example 16). Now you have to specify the features you want to block. - - SetProtection() method was extended to support RSA and AES 128 encryption and public-keys (see example 16). - - Bug #2999489 "setEqualColumns() and TOC uses wrong columns" was fixed (see the example 10). - -5.0.004 (2010-05-10) - - HTML line alignment when using sub and sup tags was fixed. - -5.0.003 (2010-05-07) - - Horizontal alignment was fixed for images and barcodes. Now the X coordinate is always relative to the left margin. Use GetAbsX() instead of GetX() to get the X relative to left margin. - - Header() method was changed to account for new image alignment rules. - -5.0.002 (2010-05-06) - - Bookmark() and related methods were fixed to accept HTML code. - - A problem on HTML links was fixed. - -5.0.001 (2010-05-06) - - Protected method _putstream was re-added for backward compatibility. - - The following method were added to display HTML Table Of Content (see example n. 59): - addTOCPage(), endTOCPage(), addHTMLTOC(). - -5.0.000 (2010-05-05) - - Method ImageSVG() was added to embedd SVG images (see example n. 58). Note that not all SVG images are supported. - - Method setRasterizeVectorImages() was added to enable/disable rasterization for vector images via ImageMagick library. - - Method RoundedRectXY() was added. - - Method PieSectorXY() was added. - - Gradient() method is now public and support new features. - - Shading to transparency is now supported. - - Image alignments were fixed. - - Support for dynamic images were improved. - - PDF_IMAGE_SCALE_RATIO has been changed to 1.25 for better compatibility with SVG. - - RAW and RAW2 modes were added to 2D Barcodes (see example n. 50). - - Automatic padding feature was added on barcodes (see examples n. 27 and 50). - - Bug #2995003 "Reproduced thead bug" was fixed. - - The Output() method now accepts FI and FD destinations to save the document on server before sending it to the client. - - Ellipse() method was improved and fixed (see page 2 of example n. 12). - ------------------------------------------------------------- - -4.9.018 (2010-04-21) - - Bug item #2990356 "Current font size not respected with more than two HTML

        " was fixed. - -4.9.017 (2010-04-21) - - Bug item #2990224 "Different behaviour for equivalent HTML strings" was fixed. - - Bug item #2990314 "Dash is not appearing with SHY character" was fixed. - -4.9.016 (2010-04-20) - - An error on htmlcolors.php was fixed. - - getImageFileType() method was improved. - - GIF images with transparency are now better supported. - - Automatic page orientation was improved. - -4.9.015 (2010-04-20) - - A new method copyPage() was added to clone pages (see example n. 44). - - Support for text overline was added. - - Underline and linethrough methods were fixed. - - Bug #2989058 "SHY character causes unnecessary word-wrapping" was fixed. - -4.9.014 (2010-04-18) - - Bug item #2988845 was fixed. - -4.9.013 (2010-04-15) - - Image() and ImageEPS() methods were fixed and improved; $fitonpage parameter was added. - -4.9.012 (2010-04-12) - - The hyphenateText() method was added to automatically hyphenate text (see example n. 46). - -4.9.011 (2010-04-07) - - Vertical alignments for Cell() method were improved (see example n. 57). - -4.9.010 (2010-04-06) - - Signature of Cell() method now includes new parameters for vertical alignment (see example n. 57). - - Text() method was extended to include all Cell() parameters. - - HTML line alignment procedure was changed to fix some bugs. - -4.9.009 (2010-04-05) - - Text() method was fixed for backward compatibility. - -4.9.008 (2010-04-03) - - Additional line space after table header was removed. - - Support for HTML lists in multicolumn mode was added. - - The method setTextRenderingMode() was added to set text rendering modes (see the example n. 26). - - The following HTML attributes were added to set text rendering modes (see the example n. 26): stroke, strokecolor, fill. - -4.9.007 (2010-04-03) - - Font Descent computation was fixed (patch #2981441). - -4.9.006 (2010-04-02) - - The constant K_TCPDF_CALLS_IN_HTML was added on configuration file to enable/disable the ability to call TCPDF methods in HTML. - - The usage of tcpdf tag in HTML mode was changed to remove the possible security flaw offered by the eval() function (thanks to Matthias Hecker for spotting this security problem). See the new example n. 49 for further information. - -4.9.005 (2010-04-01) - - Bug# 2980354 "Wrong File attachment description with security" was fixed. - - Several problems with HTML line alignment were fixed. - - The constant K_THAI_TOPCHAR was added on configuration file to enable/disable the special procedure used to avoid the overlappind of symbols on Thai language. - - A problem with font name directory was fixed. - - A bug on _destroy() method was fixed. - -4.9.004 (2010-03-31) - - Patch #979681 "GetCharWidth - default character width" was applied (bugfix). - -4.9.003 (2010-03-30) - - Problem of first
        on multiple columns was fixed. - - HTML line alignment was fixed. - - A QR-code bug was fixed. - -4.9.002 (2010-03-29) - - Patch #2978349 "$ignore_min_height is ignored in function Cell()" was applied. - - Bug #2978607 "2D Barcodes are wrong" was fixed. - - A problem with HTML block tags was fixed. - - Artificial italic for CID-0 fonts was added. - - Several multicolumn bugs were fixed. - - Support for HTML tables on multicolumn was added. - -4.9.001 (2010-03-28) - - QR Code minor bug was fixed. - - Multicolumn mode was added (see the new example n. 10). - - The following methods were added: setEqualColumns(), setColumnsArray(), selectColumn(). - - Thai diacritics support were changed (note that this is incompatible with html justification). - -4.9.000 (2010-03-27) - - QR Code (2D barcode) support was added (see example n. 50). - - The following methods were added to print crop and registration marks (see example n. 56): colorRegistrationBar(), cropMark(), registrationMark(). - - Limited support for CSS line-height property was added. - - Gradient method now supports Gray, RGB and CMYK space color. - - Example n. 51 was updated. - - Vertical alignment of font inside cell was fixed. - - Support for multiple Thai diacritics was added. - - Bug item #2974929 "Duplicate case values" was fixed. - - Bug item #2976729 "File attachment not working with security" was fixed. - ------------------------------------------------------------- - -4.8.039 (2010-03-20) - - Problems related to custom locale settings were fixed. - - Problems related to HTML on Header and Footer were fixed. - -4.8.038 (2010-03-13) - - Various bugs related to page-break in HTML mode were fixed. - - Bug item #2968974 "Another

        pagebreak problem" was fixed. - - Bug item #2969276 "justification problem" was fixed. - - Bug item #2969289 "bug when using justified text and custom headers" was fixed. - - Images are now automatically resized to be contained on the page. - - Some HTML line alignments were fixed. - - Signature of AddPage() and SetMargins() methods were changed to include an option to set default page margins. - -4.8.037 (2010-03-03) - - Bug item #2962068 was fixed. - - Bug item #2967017 "Problems with and pagebreaks" was fixed. - - Bug item #2967023 "table header lost with pagebreak" was fixed. - - Bug item #2967032 "Header lost with nested tables" was fixed. - -4.8.036 (2010-02-24) - - Automatic page break for HTML images was improved. - - Example 10 was updated. - - Japanese was removed from example 8 because the freeserif font doesn't contain japanese (you can display it using arialunicid0 font). - -4.8.035 (2010-02-23) - - Automatic page break for HTML images was added. - - Support for multicolumn HTML was added (example 10 was updated). - -4.8.034 (2010-02-17) - - Language files were updated. - -4.8.033 (2010-02-12) - - A bug related to protection mode with links was fixed. - -4.8.032 (2010-02-04) - - A bug related to $maxh parameter on Write() and MultiCell() was fixed. - - Support for body tag was added. - -4.8.031 (2010-01-30) - - Bug item #2941589 "paragraph justify not working on some non-C locales" was fixed. - -4.8.030 (2010-01-27) - - Some text alignment cases were fixed. - -4.8.029 (2010-01-27) - - Bug item #2941057 "TOC Error in PDF File Output" was fixed. - - Some text alignment cases were fixed. - -4.8.028 (2010-01-26) - - Text alignment for RTL mode was fixed. - -4.8.027 (2010-01-25) - - Bug item #2938412 "Table related problems - thead, nobr, table width" was fixed. - -4.8.026 (2010-01-19) - - The misspelled word "length" was replaced with "length" in some variables and comments. - -4.8.025 (2010-01-18) - - addExtGState() method was improved to reuse existing ExtGState objects. - -4.8.024 (2010-01-15) - - Justification mode for HTML was fixed (Bug item #2932470). - -4.8.023 (2010-01-15) - - Bug item #2932470 "Some HTML entities breaks justification" was fixed. - -4.8.022 (2010-01-14) - - Source code documentation was fixed. - -4.8.021 (2010-01-03) - - A Bug relative to Table Of Content index was fixed. - -4.8.020 (2009-12-21) - - Bug item #2918545 "Display problem of the first row of a table with larger font" was fixed. - - A Bug relative to table rowspan mode was fixed. - -4.8.019 (2009-12-16) - - Bug item #2915684 "Image size" was fixed. - - Bug item #2914995 "Image jpeg quality" was fixed. - - The signature of the Image() method was changed (check the documentation for the $resize parameter). - -4.8.018 (2009-12-15) - - Bug item #2914352 "write error" was fixed. - -4.8.017 (2009-11-27) - - THEAD problem when table is used on header/footer was fixed. - - A first line alignment on HTML justification was fixed. - - Method getImageFileType() was added. - - Images with unknown extension and type are now supported via ImageMagick PHP extension. - -4.8.016 (2009-11-21) - - Document Information Dictionary was fixed. - - CSS attributes 'page-break-before', 'page-break-after' and 'page-break-inside' are now supported. - - Problem of unclosed last page was fixed. - - Problem of 'thead' unnecessarily repeated on the next page was fixed. - -4.8.015 (2009-11-20) - - A problem with some PNG transparency images was fixed. - - Bug #2900762 "Sort issues in Bookmarks" was fixed. - - Text justification was fixed for various modes: underline, strikeout and background. - -4.8.014 (2009-11-04) - - Bug item #2891316 "writeHTML, underlining replacing spaces" was fixed. - - The handling of temporary RTL text direction mode was fixed. - -4.8.013 (2009-10-26) - - Bug item #2884729 "Problem with word-wrap and hyphen" was fixed. - -4.8.012 (2009-10-23) - - Table cell alignments for RTL booklet mode were fixed. - - Images and barcode alignments for booklet mode were fixed. - -4.8.011 (2009-10-22) - - DejaVu fonts were updated to latest version. - -4.8.010 (2009-10-21) - - Bookmark for TOC page was added. - - Signature of addTOC() method is changed. - - Bookmarks are now automatically sorted by page and Y position. - - Example n. 45 was updated. - - Example n. 55 was added to display all charactes available on core fonts. - -4.8.009 (2009-09-30) - - Compatibility with PHP 5.3 was improved. - - All examples were updated. - - Index file for examples was added. - -4.8.008 (2009-09-29) - - Example 49 was updated. - - Underline and linethrough now works with cell stretching mode. - -4.8.007 (2009-09-23) - - Infinite loop problem caused by nobr attribute was fixed. - -4.8.006 (2009-09-23) - - Bug item #2864522 "No images if DOCUMENT_ROOT=='/'" was fixed. - - Support for text-indent CSS attribute was added. - - Method rollbackTransaction() was changed to support self-reassignment of previous object (check source code documentation). - - Support for the HTML "nobr" attribute was added to avoid splitting a table or a table row on two pages (i.e.: ...). - -4.8.005 (2009-09-17) - - A bug relative to multiple transformations and annotations was fixed. - -4.8.004 (2009-09-16) - - A bug on _putannotsrefs() method was fixed. - -4.8.003 (2009-09-15) - - Bug item #2858754 "Division by zero" was fixed. - - A bug relative to HTML list items was fixed. - - A bug relative to form fields on multiple pages was fixed. - - PolyLine() method was added (see example n. 12). - - Signature of Polygon() method was changed. - -4.8.002 (2009-09-12) - - A problem related to CID-0 fonts offset was fixed: if the $cw[1] entry on the CID-0 font file is not defined, then a CID keys offset is introduced. - -4.8.001 (2009-09-09) - - The appearance streams (AP) for anotations form fields was fixed (see examples n. 14 and 54). - - Radiobuttons were fixed. - -4.8.000 (2009-09-07) - - This version includes some support for Forms fields (see example n. 14) and XHTML forms (see example n. 54). - - The following methods were changed to work without JavaScript: TextField(), RadioButton(), ListBox(), ComboBox(), CheckBox(), Button(). - - Support for Widget annotations was improved. - - Alignment of annotation objects was fixed (examples 36 and 41 were updated). - - addJavascriptObject() method was added. - - Signature of Image() method was changed. - - htmlcolors.php file was updated. - ------------------------------------------------------------- - -4.7.003 (2009-09-03) - - Support for TCPDF methods on HTML was improved (see example n. 49). - -4.7.002 (2009-09-02) - - Bug item #2848892 "writeHTML + table: Gaps between rows" was fixed. - - JavaScript support was fixed (see example n. 53). - -4.7.001 (2009-08-30) - - The Polygon() and Arrow() methods were fixed and improved (see example n. 12). - -4.7.000 (2009-08-29) - - This is a major release. - - Some procedures were internally optimized. - - The problem of mixed signature and annotations was fixed (example n. 52). - -4.6.030 (2009-08-29) - - IMPORTANT: percentages on table cell widths are now relative to the full table width (as in standard HTML). - - Various minor bugs were fixed. - - Example n. 52 (digital signature) was updated. - -4.6.029 (2009-08-26) - - PHP4 version was fixed. - -4.6.028 (2009-08-25) - - Signature algorithm was finally fixed (see example n. 52). - -4.6.027 (2009-08-24) - - TCPDF now supports unembedded TrueTypeUnicode Fonts (just comment the $file entry on the fonts' php file. - -4.6.026 (2009-08-21) - - Bug #2841693 "Problem with MultiCell and ishtml and justification" was fixed. - - Signature functions were improved but not yet fixed (tcpdf.crt and example n. 52 were updated). - -4.6.025 (2009-08-17) - - Carriage returns (\r) were removed from source code. - - Problem related to set_magic_quotes_runtime() depracated was fixed. - -4.6.024 (2009-08-07) - - Bug item #2833556 "justification using other units than mm" was fixed. - - Documentation was fixed/updated. - -4.6.023 (2009-08-02) - - Bug item #2830537 "MirrorH can show mask for transparent PNGs" was fixed. - -4.6.022 (2009-07-24) - - A bug relative to single line printing when using WriteHTMLCell() was fixed. - - Signature support were improved but is still experimental. - - Fonts Free and Dejavu were updated to latest versions. - -4.6.021 (2009-07-20) - - Bug item #2824015 "XHTML Ampersand & in hyperlink bug" was fixed. - - Bug item #2824036 "Image as hyperlink in table, text displaced at page break" was fixed. - - Links alignment on justified text was fixed. - - Unicode "\u" modifier was added to re_spaces variable by default. - -4.6.020 (2009-07-16) - - Bug item #2821921 "issue in example 18" was fixed. - - Signature of SetRTL() method was changed. - -4.6.019 (2009-07-13) - - Bug item #2820703 "xref table broken" was fixed. - -4.6.018 (2009-07-10) - - Bug item #2819319 "Text over text" was fixed. - - Method Arrow() was added to print graphic arrows (example 12 was updated). - -4.6.017 (2009-07-05) - - Bug item #2816079 "Example 48 not working" was fixed. - - The signature of the checkPageBreak() was changed. The parameter $addpage was added to turn off the automatic page creation. - -4.6.016 (2009-06-16) - - Method setSpacesRE() was added to set the regular expression used for detecting withespaces or word separators. If you are using chinese, try: setSpacesRE('/[\s\p{Z}\p{Lo}]/');, otherwise you can use setSpacesRE('/[\s\p{Z}]/'); - - The method _putinfo() now automatically fills the metadata with '?' in case of empty string. - -4.6.015 (2009-06-11) - - Bug #2804667 "word wrap bug" was fixed. - -4.6.014 (2009-06-04) - - Bug #2800931 "Table thead tag bug" was fixed. - - A bug related to
         tag was fixed.
        -
        -4.6.013 (2009-05-28)
        -	- List bullets position was fixed for RTL languages.
        -
        -4.6.012 (2009-05-23)
        -	- setUserRights() method doesn't work anymore unless you call the setSignature() method with the Adobe private key!
        -
        -4.6.011 (2009-05-18)
        -	- Signature of the Image() method was changed to include the new $fitbox parameter (see source code documentation).
        -
        -4.6.010 (2009-05-17)
        -	- Image() method was improved: now is possible to specify the maximum dimensions for a constraint box defined by $w and $h parameters, and setting the $resize parameter to null.
        -	-  tag indent problem was fixed.
        -	- $y parameter was added to checkPageBreak() method.
        -	- Bug n. 2791773 "writeHTML" was fixed.
        -
        -4.6.009 (2009-05-13)
        -	- xref table for embedded files was fixed.
        -
        -4.6.008 (2009-05-07)
        -	- setSignature() method was improved (but is still experimental).
        -	- Example n. 52 was added.
        -
        -4.6.007 (2009-05-05)
        -	- Bug #2786685 "writeHtmlCell and 
        in custom footer" was fixed. - - Table header repeating bug was fixed. - - Some newlines and tabs are now automatically removed from HTML strings. - -4.6.006 (2009-04-28) - - Support for "..." was added. - - By default TCPDF requires PCRE Unicode support turned on but now works also without it (with limited ability to detect some Unicode blank spaces). - -4.6.005 (2009-04-25) - - Points (pt) conversion in getHTMLUnitToUnits() was fixed. - - Default tcpdf.pem certificate file was added. - - Experimental support for signing document was added but it is not yet completed (some help is needed - I think that the calculation of the ByteRange is OK and the problem is on the signature calculation). - -4.6.004 (2009-04-23) - - Method deletePage() was added to delete pages (see example n. 44). - -4.6.003 (2009-04-21) - - The caching mechanism of the UTF8StringToArray() method was fixed. - -4.6.002 (2009-04-20) - - Documentation of rollbackTransaction() method was fixed. - - The setImageScale() and getImageScale() methods now set and get the adjusting parameter used by pixelsToUnits() method. - - HTML images now support other units of measure than pixels (getHTMLUnitToUnits() is now used instead of pixelsToUnits()). - - WARNING: PDF_IMAGE_SCALE_RATIO has been changed by default to 1. - -4.6.001 (2009-04-17) - - Spaces between HTML block tags are now automatically removed. - - The bug related to cMargin changes between tables was fixed. - -4.6.000 (2009-04-16) - - WARNING: THIS VERSION CHANGES THE BEHAVIOUR OF $x and $y parameters for several TCPDF methods: - zero coordinates for $x and $y are now valid coordinates; - set $x and $y as empty strings to get the current value. - - Some error caused by 'empty' function were fixed. - - Default color for convertHTMLColorToDec() method was changed to white and the return value for invalid color is false. - - HTML on footer bug was fixed. - - The following examples were fixed: 5,7,10,17,19,20,21,33,42,43. - -4.5.043 (2009-04-15) - - Barcode class (barcode.php) was extended to include new linear barcode types (see example n. 27): - C39 : CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9 - C39+ : CODE 39 with checksum - C39E : CODE 39 EXTENDED - C39E+ : CODE 39 EXTENDED + CHECKSUM - C93 : CODE 93 - USS-93 - S25 : Standard 2 of 5 - S25+ : Standard 2 of 5 + CHECKSUM - I25 : Interleaved 2 of 5 - I25+ : Interleaved 2 of 5 + CHECKSUM - C128A : CODE 128 A - C128B : CODE 128 B - C128C : CODE 128 C - EAN2 : 2-Digits UPC-Based Extension - EAN5 : 5-Digits UPC-Based Extension - EAN8 : EAN 8 - EAN13 : EAN 13 - UPCA : UPC-A - UPCE : UPC-E - MSI : MSI (Variation of Plessey code) - MSI+ : MSI + CHECKSUM (modulo 11) - POSTNET : POSTNET - PLANET : PLANET - RMS4CC : RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code) - KIX : KIX (Klant index - Customer index) - IMB: Intelligent Mail Barcode - Onecode - USPS-B-3200 (NOTE: requires BCMath PHP extension) - CODABAR : CODABAR - CODE11 : CODE 11 - PHARMA : PHARMACODE - PHARMA2T : PHARMACODE TWO-TRACKS - -4.5.042 (2009-04-15) - - Method Write() was fixed for the strings containing only zero value. - -4.5.041 (2009-04-14) - - Barcode methods were fixed. - -4.5.040 (2009-04-14) - - Method Write() was fixed to handle empty strings. - -4.5.039 (2009-04-11) - - Support for linear barcodes was extended (see example n. 27 and barcodes.php documentation). - -4.5.038 (2009-04-10) - - Write() method was improved to support separators for Japanese, Korean, Chinese Traditional and Chinese Simplified. - -4.5.037 (2009-04-09) - - General performances were improved. - - The signature of the method utf8Bidi() was changed. - - The method UniArrSubString() was added. - - Experimental support for 2D barcodes were added (see example n. 50 and 2dbarcodes.php class). - -4.5.036 (2009-04-03) - - TCPDF methods can be called inside the HTML code (see example n. 49). - - All tag attributes, such as

        must be enclosed within double quotes. - -4.5.035 (2009-03-28) - - Bug #2717436 "writeHTML rowspan problem (continued)" was fixed. - - Bug #2719090 "writeHTML fix follow up" was fixed. - - The method _putuserrights() was changed to avoid Adobe Reader 9.1 crash. This broken the 'trick' that was used to display forms in Acrobat Reader. - -4.5.034 (2009-03-27) - - Bug #2716914 "Bug writeHTML of a table in body and footer related with pb" was fixed. - - Bug #2717056 ] "writeHTML problem when setting tr style" was fixed. - - The signature of the Cell() method was changed. - -4.5.033 (2009-03-27) - - The support for rowspan/colspan on HTML tables was improved (see example n. 48). - -4.5.032 (2009-03-23) - - setPrintFooter(false) bug was fixed. - -4.5.031 (2009-03-20) - - Table header support was extended to multiple pages. - -4.5.030 (2009-03-20) - - thead tag is now supported on HTML tables (header rows are repeated after page breaks). - - The startTransaction() was improved to autocommit. - - List bullets now uses the foreground color (putHtmlListBullet()). - -4.5.029 (2009-03-19) - - The following methods were added to UNDO commands (see example 47): startTransaction(), commitTransaction(), rollbackTransaction(). - - All examples were updated. - -4.5.028 (2009-03-18) - - Bug #2690945 "List Bugs" was fixed. - - HTML text alignment on lists was fixed. - - The constant PDF_FONT_MONOSPACED was added to the configuration file to define the default monospaced font. - - The following methods were fixed: getPageWidth(), getPageHeight(), getBreakMargin(). - - All examples were updated. - -4.5.027 (2009-03-16) - - Method getPageDimensions() was added to get page dimensions. - - The signature of the following methos were changed: getPageWidth(), getPageHeight(), getBreakMargin(). - - _parsepng() method was fixed for PNG URL images (fread bug). - -4.5.026 (2009-03-11) - - Bug #2681793 affecting URL images with spaces was fixed. - -4.5.025 (2009-03-10) - - A small bug affecting hyphenation support was fixed. - - The method SetDefaultMonospacedFont() was added to define the default monospaced font. - -4.5.024 (2009-03-07) - - The bug #2666493 was fixed "Footer corrupts document". - -4.5.023 (2009-03-06) - - The bug #2666688 was fixed "Rowspan in tables". - -4.5.022 (2009-03-05) - - The bug #2659676 was fixed "refer to #2157099 test 4 < BR > problem still not fixed". - - addTOC() function bug was fixed. - -4.5.020 (2009-03-03) - - The following bug was fixed: "function removeSHY corrupts unicode". - -4.5.019 (2009-02-28) - - The problem of decimal separator using different locale was fixed. - - The text hyphenation is now supported (see example n. 46). - -4.5.018 (2009-02-26) - - The _destroy() method was added to unset all class variables and frees memory. - - Now it's possible to call Output() method multiple times. - -4.5.017 (2009-02-24) - - A minor bug that raises a PHP warning was fixed. - -4.5.016 (2009-02-24) - - Bug item #2631200 "getNumLines() counts wrong" was fixed. - - Multiple attachments bug was fixed. - - All class variables are now cleared on Output() for memory otpimization. - -4.5.015 (2009-02-18) - - Bug item #2612553 "function Write() must not break a line on   character" was fixed. - -4.5.014 (2009-02-13) - - Bug item #2595015 "POSTNET Barcode Checksum Error" was fixed (on barcode.php). - - Pagebreak bug for barcode was fixed. - -4.5.013 (2009-02-12) - - border attribute is now supported on HTML images (only accepts the same values accepted by Cell()). - -4.5.012 (2009-02-12) - - An error on image border feature was fixed. - -4.5.011 (2009-02-12) - - HTML links for images are now supported. - - height attribute is now supported on HTML cells. - - $border parameter was added to Image() and ImageEps() methods. - - The method getNumLines() was added to estimate the number of lines required for the specified text. - -4.5.010 (2009-01-29) - - Bug n. 2546108 "BarCode Y position" was fixed. - -4.5.009 (2009-01-26) - - Bug n. 2538094 "Empty pdf file created" was fixed. - -4.5.008 (2009-01-26) - - setPage() method was fixed to correctly restore graphic states. - - Source code was cleaned up for performances. - -4.5.007 (2009-01-24) - - checkPageBreak() and write1DBarcode() methods were fixed. - - Source code was cleaned up for performances. - - barcodes.php was updated. - -4.5.006 (2009-01-23) - - getHTMLUnitToPoints() method was replaced by getHTMLUnitToUnits() to fix HTML units bugs. - -4.5.005 (2009-01-23) - - Page closing bug was fixed. - -4.5.004 (2009-01-21) - - The access of convertHTMLColorToDec() method was changed to public - - Fixed bug on UL tag. - -4.5.003 (2009-01-19) - - Fonts on different folders are now supported. - -4.5.002 (2009-01-07) - - addTOC() function was improved (see example n. 45). - -4.5.001 (2009-01-04) - - The signature of startPageGroup() function was changed. - - Method Footer() was improved to automatically print page or page-group number (see example n. 23). - - Protected method formatTOCPageNumber() was added to customize the format of page numbers on the Table Of Content. - - The signature of addTOC() was changed to include the font used for page numbers. - -4.5.000 (2009-01-03) - - A new $diskcache parameter was added to class constructor to enable disk caching and reduce RAM memory usage (see example n. 43). - - The method movePageTo() was added to move pages to previous positions (see example n. 44). - - The methods getAliasNumPage() and getPageNumGroupAlias() were added to get the alias for page number (needed when using movepageTo()). - - The methods addTOC() was added to print a Table Of Content (see example n. 45). - - Imagick class constant was removed for better compatibility with PHP4. - - All existing examples were updated and new examples were added. - -4.4.009 (2008-12-29) - - Examples 1 and 35 were fixed. - -4.4.008 (2008-12-28) - - Bug #2472169 "Unordered bullet size not adjusted for unit type" was fixed. - -4.4.007 (2008-12-23) - - Bug #2459935 "no unit conversion for header line" was fixed. - - Example n. 42 for image alpha channel was added. - - All examples were updated. - -4.4.006 (2008-12-11) - - Method setLIsymbol() was changed to reflect latest changes in HTML list handling. - -4.4.005 (2008-12-10) - - Bug item #2413870 "ordered list override value" was fixed. - -4.4.004 (2008-12-10) - - The protected method getHTMLUnitToPoints() was added to accept various HTML units of measure (em, ex, px, in, cm, mm, pt, pc, %). - - The method intToRoman() was added to convert integer number to Roman representation. - - Support fot HTML lists was improved: the CSS property list-style-type is now supported. - -4.4.003 (2008-12-09) - - Bug item #2412147 "Warning on line 3367" was fixed. - - Method setHtmlLinksStyle() was added to set default HTML link colors and font style. - - Method addHtmlLink() was changed to use color and style defined on the inline CSS. - -4.4.002 (2008-12-09) - - Borders on Multicell() were fixed. - - Problem of Multicell() on Header function (Bug item #2407579) was fixed. - - Problem on graphics tranformations applied to Multicell() was fixed. - - Support for ImageMagick was added. - - Width calculation for nested tables was fixed. - -4.4.001 (2008-12-08) - - Some missing core fonts were added on fonts directory. - - CID0 fonts rendering was fixed. - - HTML support was improved (

         and  tags are now supported).
        -	- Bug item #2406022 "Left padding bug in MultiCell with maxh" was fixed.
        -
        -4.4.000 (2008-12-07)
        -	- File attachments are now supported (see example n. 41).
        -	- Font functions were optimized to reduce document size.
        -	- makefont.php was updated.
        -	- Linux binaries were added on /fonts/utils
        -	- All fonts were updated.
        -	- $autopadding parameter was added to Multicell() to disable automatic padding features.
        -	- $maxh parameter was added to Multicell() and Write() to set a maximum height.
        -
        -4.3.009 (2008-12-05)
        -	- Bug item #2392989 (Custom header + setlinewidth + cell border bug) was fixed.
        -
        -4.3.008 (2008-12-05)
        -	- Bug item #2390566 "rect bug" was fixed.
        -	- File path was fixed for font embedded files.
        -	- SetFont() method signature was changed to include the font filename.
        -	- Some font-related methods were improved.
        -	- Methods getFontFamily() and getFontStyle() were added.
        -
        -4.3.007 (2008-12-03)
        -	- PNG alpha channel is now supported (GD library is required).
        -	- AddFont() function now support custom font file path on $file parameter.
        -	- The default width variable ($dw) is now always defined for any font.
        -	- The 'Style' attribute on CID-0 fonts was removed because of protection bug.
        -
        -4.3.006 (2008-12-01)
        -	- A regular expression on getHtmlDomArray() to find HTML tags was fixed.
        -
        -4.3.005 (2008-11-25)
        -	- makefont.php was fixed.
        -	- Bug item #2339877 was fixed (false loop condition detected on WriteHTML()).
        -	- Bug item #2336733 was fixed (lasth value update on Multicell() when border and fill are disabled).
        -	- Bug item #2342303 was fixed (automatic page-break on Image() and ImageEPS()).
        -
        -4.3.004 (2008-11-19)
        -	- Function _textstring() was fixed (bug 2309051).
        -	- All examples were updated.
        -
        -4.3.003 (2008-11-18)
        -	- CID-0 font bug was fixed.
        -	- Some functions were optimized.
        -	- Function getGroupPageNoFormatted() was added.
        -	- Example n. 23 was updated.
        -
        -4.3.002 (2008-11-17)
        -	- Bug item #2305518 "CID-0 font don't work with encryption" was fixed.
        -
        -4.3.001 (2008-11-17)
        -	- Bug item #2300007 "download mimetype pdf" was fixed.
        -	- Double quotes were replaced by single quotes to improve PHP performances.
        -	- A bug relative to HTML cell borders was fixed.
        -
        -4.3.000 (2008-11-14)
        -	- The function setOpenCell() was added to set the top/bottom cell sides to be open or closed when the cell cross the page.
        -	- A bug relative to list items indentation was fixed.
        -	- A bug relative to borders on HTML tables and Multicell was fixed.
        -	- A bug relative to rowspanned cells was fixed.
        -	- A bug relative to html images across pages was fixed.
        -
        -4.2.009 (2008-11-13)
        -	- Spaces between li tags are now automatically removed.
        -
        -4.2.008 (2008-11-12)
        -	- A bug relative to fill color on next page was fixed.
        -
        -4.2.007 (2008-11-12)
        -	- The function setListIndentWidth() was added to set custom indentation widht for HTML lists.
        -
        -4.2.006 (2008-11-06)
        -	- A bug relative to HTML justification was fixed.
        -
        -4.2.005 (2008-11-06)
        -	- A bug relative to HTML justification was fixed.
        -	- The methods formatPageNumber() and PageNoFormatted() were added to format page numbers.
        -	- Default Footer() method was changed to use PageNoFormatted() instead of PageNo().
        -	- Example 6 was updated.
        -
        -4.2.004 (2008-11-04)
        -	- Bug item n. 2217039 "filename handling improvement" was fixed.
        -
        -4.2.003 (2008-10-31)
        -	- Font style bug was fixed.
        -
        -4.2.002 (2008-10-31)
        -	- Bug item #2210922 (htm element br not work) was fixed.
        -	- Write() function was improved to support margin changes.
        -
        -4.2.001 (2008-10-30)
        -	- setHtmlVSpace($tagvs) function was added to set custom vertical spaces for HTML tags.
        -	- writeHTML() function now support margin changes during execution.
        -	- Signature of addHTMLVertSpace() function is changed.
        -
        -4.2.000 (2008-10-29)
        -	- htmlcolors.php was changed to support class-loaders.
        -	- ImageEps() function was improved in performances.
        -	- Signature of Link() And Annotation() functions were changed.
        -	- (Bug item #2198926) Links and Annotations alignment were fixed (support for geometric tranformations was added).
        -	- rowspan mode for HTML table cells was improved and fixed.
        -	- Booklet mode for double-sided pages was added; see SetBooklet() function and example n. 40.
        -	- lastPage() signature is changed.
        -	- Signature of Write() function is changed.
        -	- Some HTML justification problems were fixed.
        -	- Some functions were fixed to better support RTL mode.
        -	- Example n. 10 was changed to support RTL mode.
        -	- All examples were updated.
        -
        -4.1.004 (2008-10-23)
        -	- unicode_data.php was changed to support class-loaders.
        -	- Bug item #2186040/2 (writeHTML margin problem) was fixed.
        -
        -4.1.003 (2008-10-22)
        -	- Bug item #2185399 was fixed (rowspan and page break).
        -	- Bugs item #2186040 was fixed (writeHTML margin problem).
        -	- Newline after table was removed.
        -
        -4.1.002 (2008-10-21)
        -	- Bug item #2184525 was fixed (rowspan on HTML cell).
        -
        -4.1.001 (2008-10-21)
        -	- Support for "start" attribute was added to HTML ordered list.
        -	- unicode_data.php file was changed to include UTF-8 to ASCII table.
        -	- Some functions were modified to better support UTF-8 extensions to core fonts.
        -	- Support for images on HTML lists was improved.
        -	- Examples n. 1 and 6 were updated.
        -
        -4.1.000 (2008-10-18)
        -	- Page-break bug using HTML content was fixed.
        -	- The "false" parameter was reintroduced to class_exists function on PHP5 version to avoid autoload.
        -	- addHtmlLink() function was improved to support internal links (i.e.: link to page 23).
        -	- Justification alignment is now supported on HTML (see example n. 39).
        -	- example_006.php was updated.
        -
        -4.0.033 (2008-10-13)
        -	- Bug n. 2157099 was fixed.
        -	- SetX() and SetY() functions were improved.
        -	- SetY() includes a new parameter to avoid the X reset.
        -
        -4.0.032 (2008-10-10)
        -	- Bug n. 2156926 was fixed (bold, italic, underlined, linethrough).
        -	- setStyle() method was removed.
        -	- Configuration file was changed to use helvetica (non-unicode) font by default.
        -	- The use of mixed font types was improved.
        -	- All examples were updated.
        -
        -4.0.031 (2008-10-09)
        -	- _putannots() and _putbookmarks() links alignments were fixed.
        -
        -4.0.030 (2008-10-07)
        -	- _putbookmarks() function was fixed.
        -	- _putannots() was fixed to include internal links.
        -
        -4.0.029 (2008-09-27)
        -	- Infinite loop bug was fixed [Bug item #130309].
        -	- Multicell() problem on Header() was fixed.
        -
        -4.0.028 (2008-09-26)
        -	- setLIsymbol() was added to set the LI symbol used on UL lists.
        -	- Missing $padding and $encryption_key variables declarations were added [Bug item #2129058].
        -
        -4.0.027 (2008-09-19)
        -	- Bug #2118588 "Undefined offset in tcpdf.php on line 9581" was fixed.
        -	- arailunicid0.php font was updated.
        -	- The problem of javascript form fields duplication after saving was fixed.
        -
        -4.0.026 (2008-09-17)
        -	- convertHTMLColorToDec() function was improved to support rgb(RR,GG,BB) notation.
        -	- The following inline CSS attributes are now supported: text-decoration, color, background-color and font-size names: xx-small, x-small, small, medium, large, x-large, xx-large
        -	- Example n. 6 was updated.
        -
        -4.0.025 (2008-09-15)
        -	- _putcidfont0 function was improved to include CJK fonts (Chinese, Japanese, Korean, CJK, Asian fonts) without embedding.
        -	- arialunicid0 font was added (see the new example n. 38).
        -	- The following Unicode to CID-0 tables were added on fonts folder: uni2cid_ak12.php, uni2cid_aj16.php, uni2cid_ag15.php, uni2cid_ac15.php.
        -
        -4.0.024 (2008-09-12)
        -	- "stripos" function was replaced with "strpos + strtolower" for backward compatibility with PHP4.
        -	- support for Spot Colors were added. Check the new example n. 37 and the following new functions:
        -		AddSpotColor()
        -		SetDrawSpotColor()
        -		SetFillSpotColor()
        -		SetTextSpotColor()
        -		_putspotcolors()
        -	- Bookmark() function was improved to fix wrong levels.
        -	- $lasth changes after header/footer calls were fixed.
        -
        -4.0.023 (2008-09-05)
        -	- Some HTML related problems were fixed.
        -	- Image alignment on HTML was changed, now it always defaults to the normal mode (see example_006.php).
        -
        -4.0.022 (2008-08-28)
        -	- Line height on HTML was fixed.
        -	- Image inside an HTML cell problem was fixed.
        -	- A new "zarbold" persian font was added.
        -
        -4.0.021 (2008-08-24)
        -	- HTTP headers were fixed on Output function().
        -	- getAliasNbPages() and getPageGroupAlias() functions were changed to support non-unicode fonts on unicode documents.
        -	- Function Write() was fixed.
        -	- The problem of additional vertical spaces on HTML was fixed.
        -	- The problem of frame around HTML links was fixed.
        -
        -4.0.020 (2008-08-15)
        -	- "[2052259] WriteHTML  & " bug was fixed.
        -
        -4.0.019 (2008-08-13)
        -	- "Rowspan on first cell" bug was fixed.
        -
        -4.0.018 (2008-08-08)
        -	- Default cellpadding for HTML tables was fixed.
        -	- Annotation() function was added to support some PDF annotations (see example_036.php and section 8.4 of PDF reference 1.7).
        -	- HTML links are now correclty shifted during line alignments.
        -	- function getAliasNbPages() was added and Footer() was updated.
        -	- RowSpan mode for HTML tables was fixed.
        -	- Bugs item #2043610 "Multiple sizes vertical align wrong" was fixed.
        -	- ImageEPS() function was improved and RTL alignment was fixed (see example_032.php).
        -
        -4.0.017 (2008-08-05)
        -	- Missing CNZ and CEO style modes were added to Rect() function.
        -	- Fonts utils were updated to include support for OpenType fonts.
        -	- getLastH() function was added.
        -
        -4.0.016 (2008-07-30)
        -	- setPageMark() function was added. This function must be called after calling Image() function for a background image.
        -
        -4.0.015 (2008-07-29)
        -	- Some functions were changed to support different page formats (see example_028.php).
        -	- The signature of setPage() function is changed.
        -
        -4.0.014 (2008-07-29)
        -	- K_PATH_MAIN calculation on tcpdf_config.php was fixed.
        -	- HTML support for EPS/AI images was added (see example_006.php).
        -	- Bugs item #2030807 "Truncated text on multipage html fields" was fixed.
        -	- PDF header bug was fixed.
        -	- helvetica was added as default font family.
        -	- Stroke mode was fixed on Text function.
        -	- several minor bugs were fixed.
        -
        -4.0.013 (2008-07-27)
        -	- Bugs item #2027799 " Big spaces between lines after page break" was fixed.
        -	- K_PATH_MAIN calculation on tcpdf_config.php was changed.
        -	- Function setVisibility() was fixed to avoid the "Incorrect PDEObject type" error message.
        -
        -4.0.012 (2008-07-24)
        -	- Addpage(), Header() and Footer() functions were changed to simplify the implementation of external header/footer functions.
        -	- The following functions were added:
        -			setHeader()
        -			setFooter()
        -			getImageRBX()
        -			getImageRBY()
        -			getCellHeightRatio()
        -			getHeaderFont()
        -			getFooterFont()
        -			getRTL()
        -			getBarcode()
        -			getHeaderData()
        -			getHeaderMargin()
        -			getFooterMargin()
        -
        -4.0.011 (2008-07-23)
        -	- Font support was improved.
        -	- The folder /fonts/utils contains new utilities and instructions for embedd font files.
        -	- Documentation was updated.
        -
        -4.0.010 (2008-07-22)
        -	- HTML tables were fixed to work across pages.
        -	- Header() and Footer() functions were updated to preserve previous settings.
        -	- example_035.php was added.
        -
        -4.0.009 (2008-07-21)
        -	- UTF8StringToArray() function was fixed for non-unicode mode.
        -
        -4.0.008 (2008-07-21)
        -	- Barcodes alignment was fixed (see example_027.php).
        -	- unicode_data.php was updated.
        -	- Arabic shaping for "Zero-Width Non-Joiner" character (U+200C) was fixed.
        -
        -4.0.007 (2008-07-18)
        -	- str_split was replaced by preg_split for compatibility with PHP4 version.
        -	- Clipping mode was added to all graphic functions by using parameter $style = "CNZ" or "CEO" (see example_034.php).
        -
        -4.0.006 (2008-07-16)
        -	- HTML rowspan bug was fixed.
        -	- Line style for MultiCell() was fixed.
        -	- WriteHTML() function was improved.
        -	- CODE128C barcode was fixed (barcodes.php).
        -
        -4.0.005 (2008-07-11)
        -	- Bug [2015715] "PHP Error/Warning" was fixed.
        -
        -4.0.004 (2008-07-09)
        -	- HTML cell internal padding was fixed.
        -
        -4.0.003 (2008-07-08)
        -	- Removed URL encoding when F option is selected on Output() function.
        -	- fixed some minor bugs in html tables.
        -
        -4.0.002 (2008-07-07)
        -	- Bug [2000861] was still unfixed and has been fixed.
        -
        -4.0.001 (2008-07-05)
        -	- Bug [2000861] was fixed.
        -
        -4.0.000 (2008-07-03)
        -	- THIS IS A MAIN RELEASE THAT INCLUDES SEVERAL NEW FEATURES AND BUGFIXES
        -	- Signature fo SetTextColor() and SetFillColor() functions was changed (parameter $storeprev was removed).
        -	- HTML support was completely rewritten and improved (see example 6).
        -	- Alignments parameters were fixed.
        -	- Functions GetArrStringWidth() and GetStringWidth() now include font parameters.
        -	- Fonts support was improved.
        -	- All core fonts were replaced and moved to fonts/ directory.
        -	- The following functions were added: getMargins(), getFontSize(), getFontSizePt().
        -	- File config/tcpdf_config_old.php was renamed tcpdf_config_alt.php and updated.
        -	- Multicell and WriteHTMLCell fill function was fixed.
        -	- Several minor bugs were fixed.
        -	- barcodes.php was updated.
        -	- All examples were updated.
        -
        -------------------------------------------------------------
        -
        -3.1.001 (2008-06-13)
        -	- Bug [1992515] "K_PATH_FONTS default value wrong" was fixed.
        -	- Vera font was removed, DejaVu font and Free fonts were updated.
        -	- Image handling was improved.
        -	- All examples were updated.
        -
        -3.1.000 (2008-06-11)
        -	- setPDFVersion() was added to change the default PDF version (currently 1.7).
        -	- setViewerPreferences() was added to control the way the document is to be presented on the screen or printed (see example 29).
        -	- SetDisplayMode() signature was changed (new options were added).
        -	- LinearGradient(), RadialGradient(), CoonsPatchMesh() functions were added to print various color gradients (see example 30).
        -	- PieSector() function was added to render render pie charts (see example 31).
        -	- ImageEps() was added to display EPS and AI images with limited support (see example 32).
        -	- writeBarcode() function is now depracated, a new write1DBarcode() function was added. The barcode directory was removed and a new barcodes.php file was added.
        -	- The new write1DBarcode() function support more barcodes and do not need the GD library (see example 027). All barcodes are directly written to PDF using graphic functions.
        -	- HTML lists were improved and could be nested (you may now represent trees).
        -	- AddFont() bug was fixed.
        -	- _putfonts() bug was fixed.
        -	- graphics functions were fixed.
        -	- unicode_data.php file was updated (fixed).
        -	- almohanad font was updated.
        -	- example 18 was updated (Farsi and Arabic languages).
        -	- source code cleanup.
        -	- All examples were updated and new examples were added.
        -
        -3.0.015 (2008-06-06)
        -	- AddPage() function signature is changed to include page format.
        -	- example 28 was added to show page format changes.
        -	- setPageUnit() function was added to change the page units of measure.
        -	- setPageFormat() function was added to change the page format and orientation between pages.
        -	- setPageOrientation() function was added to change the page orientation.
        -	- Arabic font shaping was fixed for laa letter and square boxes (see the example 18).
        -
        -3.0.014 (2008-06-04)
        -	- Arabic font shaping was fixed.
        -	- setDefaultTableColumns() function was added.
        -	- $cell_height_ratio variable was added.
        -	- setCellHeightRatio() function was added to define the default height of cell repect font height.
        -
        -3.0.013 (2008-06-03)
        -	- Multicell height parameter was fixed.
        -	- Arabic font shaping was improved.
        -	- unicode_data.php was updated.
        -
        -3.0.012 (2008-05-30)
        -	- K_PATH_MAIN and K_PATH_URL constants are now automatically set on config file.
        -	- DOCUMENT_ROOT constant was fixed for IIS Webserver (config file was updated).
        -	- Arabic font shaping was improved.
        -	- TranslateY() function was fixed (bug [1977962]).
        -	- setVisibility() function was fixed.
        -	- writeBarcode() function was fixed to scale using $xref parameter.
        -	- All examples were updated.
        -
        -3.0.011 (2008-05-23)
        -	- CMYK color support was added to all graphic functions.
        -	- HTML table support was improved:
        -	  -- now it's possible to include additional html tags inside a cell;
        -	  -- colspan attribute was added.
        -	- example 006 was updated.
        -
        -3.0.010 (2008-05-21)
        -	- fixed $laa_array inclusion on utf8Bidi() function.
        -
        -3.0.009 (2008-05-20)
        -	- unicode_data.php was updated.
        -	- Arabic laa letter problem was fixed.
        -
        -3.0.008 (2008-05-12)
        -	- Arabic support was fixed and improved (unicode_data.php was updated).
        -	- Polycurve() function was added to draw a poly-Bezier curve.
        -	- list items alignment was fixed.
        -	- example 6 was updated.
        -
        -3.0.007 (2008-05-06)
        -	- Arabic support was fixed and improved.
        -	- AlMohanad (arabic) font was added.
        -	- C128 barcode bugs were fixed.
        -
        -3.0.006 (2008-04-21)
        -	- Condition to check negative width values was added.
        -
        -3.0.005 (2008-04-18)
        -	- back-Slash character escape was fixed on writeHTML() function.
        -	- Exampe 6 was updated.
        -
        -3.0.004 (2008-04-11)
        -	- Bug [1939304] (Right to Left Issue) was fixed.
        -
        -3.0.003 (2008-04-07)
        -	- Bug [1934523](Words between HTML tags in cell not kept on one line) was fixed.
        -	- "face" attribute of "font" tag is now fully supported.
        -
        -3.0.002 (2008-04-01)
        -	- Write() functions now return the number of cells and not the number of lines.
        -	- TCPDF is released under LGPL 2.1, or any later version.
        -
        -3.0.001 (2008-05-28)
        -	- _legacyparsejpeg() and _legacyparsepng() were renamed _parsejpeg() and _parsepng().
        -	- function writeBarcode() was fixed.
        -	- all examples were updated.
        -	- example 27 was added to show various barcodes.
        -
        -3.0.000 (2008-03-27)
        -	- private function pixelsToMillimeters() was changed to public function pixelsToUnits() to fix html image size bug.
        -	- Image-related functions were rewritten.
        -	- resize parameter was added to Image() signature to reduce the image size and fit width and height (see example 9).
        -	- TCPDF now supports all images supported by GD library: GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM.
        -	- CMYK support was added to SetDrawColor(), SetFillColor(), SetTextColor() (see example 22).
        -	- Page Groups were added (see example 23).
        -	- setVisibility() function was added to restrict the rendering of some elements to screen or printout (see example 24).
        -	- All private variables and functions were changed to protected.
        -	- setAlpha() function was added to give transparency support for all objects (see example 25).
        -	- Clipping and stroke modes were added to Text() function (see example 26).
        -	- All examples were moved to "examples" directory.
        -	- function setJPEGQuality() was added to set the JPEG image comrpession (see example 9).
        -
        -2.9.000 (2008-03-26)
        -	- htmlcolors.php file was added to include html colors.
        -	- Support for HTML color names and three-digit hexadecimal color codes was added.
        -	- private function convertColorHexToDec() was renamed convertHTMLColorToDec().
        -	- color and bgcolor attributes are now supported on all HTML tags (color nesting is also supported).
        -	- Write() function were fixed.
        -	- example_006.php was updated.
        -	- private function setUserRights() was added to release user rights on Acrobat Reader (this allows to display forms, see example 14)
        -
        -2.8.000 (2008-03-20)
        -	- Private variables were changed to protected.
        -	- Function Write() was fixed and improved.
        -	- Support for dl, dt, dd, del HTML tags was introduced.
        -	- Line-trought mode was added for HTML and text.
        -	- Text vertical alignment on cells were fixed.
        -	- Examples were updated to reflect changes.
        -
        -2.7.002 (2008-03-13)
        -	- Bug "[1912142] Encrypted PDF created/modified date" was fixed.
        -
        -2.7.001 (2008-03-10)
        -	- Cell justification was fixed for non-unicode mode.
        -
        -2.7.000 (2008-03-09)
        -	- Cell() stretching mode 4 (forced character spacing) was fixed.
        -	- writeHTMLCell() now uses Multicell() to write.
        -	- Multicell() has a new parameter $ishtml to act as writeHTMLCell().
        -	- Write() speed was improved for non-arabic strings.
        -	- Example n. 20 was changed.
        -
        -2.6.000 (2008-03-07)
        -	- various alignments bugs were fixed.
        -
        -2.5.000 (2008-03-07)
        -	- Several bugs were fixed.
        -	- example_019.php was added to test non-unicode mode using old fonts.
        -
        -2.4.000 (2008-03-06)
        -	- RTL support was deeply improved.
        -	- GetStringWidth() was fixed to support RTL languages.
        -	- Text() RTL alignment was fixed.
        -	- Some functions were added: GetArrStringWidth(), GetCharWidth(), uniord(), utf8Bidi().
        -	- example_018.php was added and test_unicode.php was removed.
        -
        -2.3.000 (2008-03-05)
        -	- MultiCell() signature is changed. Now support multiple columns across pages (see example_017).
        -	- Write() signature is changed. Now support the cell mode to be used with MultiCell.
        -	- Header() and Footer() were changed.
        -	- The following functions were added: UTF8ArrSubString() and unichr().
        -	- Examples were updated to reflect last changes.
        -
        -2.2.004 (2008-03-04)
        -	- Several examples were added.
        -	- AddPage() Header() and Footer() were fixed.
        -	- Documentation is now available on http://www.tcpdf.org
        -
        -2.2.003 (2008-03-03)
        -	- [1894853] Performance of MultiCell() was improved.
        -	- RadioButton and ListBox functions were added.
        -	- javascript form functions were rewritten and properties names are changed. The properties function supported by form fields are listed on Possible values are listed on http://www.adobe.com/devnet/acrobat/pdfs/js_developer_guide.pdf.
        -
        -2.2.002 (2008-02-28)
        -	- [1900495] html images path was fixed.
        -	- Legacy image functions were reintroduced to allow PNG and JPEG support without GD library.
        -
        -2.2.001 (2008-02-16)
        -	- The bug "[1894700] bug with replace relative path" was fixed
        -	- Justification was fixed
        -
        -2.2.000 (2008-02-12)
        -	- fixed javascript bug introduced with latest release
        -
        -2.1.002 (2008-02-12)
        -	- Justify function was fixed on PHP4 version.
        -	- Bookmank function was added ([1578250] Table of contents).
        -	- Javascript and Form fields support was added ([1796359] Form fields).
        -
        -2.1.001 (2008-02-10)
        -	- The bug "[1885776] Race Condition in function justitfy" was fixed.
        -	- The bug "[1890217] xpdf complains that pdf is incorrect" was fixed.
        -
        -2.1.000 (2008-01-07)
        -	- FPDF_FONTPATH constant was changed to K_PATH_FONTS on config file
        -	- Bidirectional Algorithm to correctly reverse bidirectional languages was added.
        -	- SetLeftMargin, SetTopMargin, SetRightMargin functions were fixed.
        -	- SetCellPadding function was added.
        -	- writeHTML was updated with new parameters.
        -	- Text function was fixed.
        -	- MultiCell function was fixed, now works also across multiple pages.
        -	- Line width was fixed on Header and Footer functions and 
        tag. - - "GetImageSize" was renamed "getimagesize". - - Document version was changed from 1.3 to 1.5. - - _begindoc() function was fixed. - - ChangeDate was fixed and ModDate was added. - - The following functions were added: - setPage() : Move pointer to the specified document page. - getPage() : Get current document page number. - lastpage() : Reset pointer to the last document page. - getNumPages() : Get the total number of inserted pages. - GetNumChars() : count the number of (UTF-8) characters in a string. - - $stretch parameter was added to Cell() function to fit text on cell: - 0 = disabled - 1 = horizontal scaling only if necessary - 2 = forced horizontal scaling - 3 = character spacing only if necessary - 4 = forced character spacing - - Line function was fixed for RTL. - - Graphic transformation functions were added [1811158]: - StartTransform() - StopTransform() - ScaleX() - ScaleY() - ScaleXY() - Scale() - MirrorH() - MirrorV() - MirrorP() - MirrorL() - TranslateX() - TranslateY() - Translate() - Rotate() - SkewX() - SkewY() - Skew() - - Graphic function were added/updated [1688549]: - SetLineStyle() - _outPoint() - _outLine() - _outRect() - _outCurve() - Line() - Rect() - Curve - Ellipse - Circle - Polygon - RegularPolygon - -2.0.000 (2008-01-04) - - RTL (Right-To-Left) languages support was added. Language direction is set using the $l['a_meta_dir'] setting on /configure/language/xxx.php language files. - - setRTL($enable) method was added to manually enable/disable the RTL text direction. - - The attribute "dir" was added to support custom text direction on HTML tags. Possible values are: ltr - for Left-To-Right and RTL for Right-To-Left. - - RC4 40bit encryption was added. Check the SetProtection method. - - [1815213] Improved image support for GIF, JPEG, PNG formats. - - [1800094] Attribute "value" was added to ordered list items
      2. . - - Image function now has a new "align" parameter that indicates the alignment of the pointer next to image insertion and relative to image height. The value can be: - T: top-right for LTR or top-left for RTL - M: middle-right for LTR or middle-left for RTL - B: bottom-right for LTR or bottom-left for RTL - N: next line - - Attribute "align" was added to html tag to set the above image "align" parameter. Possible values are: - top: top-right for LTR or top-left for RTL - middle: middle-right for LTR or middle-left for RTL - bottom: bottom-right for LTR or bottom-left for RTL - - [1798103] newline was added after , and

        tages. - - [1816393] Documentation was updated. - - 'ln' parameter was fixed on writeHTMLCell. Now it's possible to print two or more columns across several pages; - - The method lastPage() was added to move the pointer on the last page; - ------------------------------------------------------------- - -1.53.0.TC034 (2007-07-30) - - fixed htmlentities conversion. - - MultiCell() function returns the number of cells. - -1.53.0.TC033 (2007-07-30) - - fixed bug 1762550: case sensitive for font files - - NOTE: all fonts files names must be in lowercase! - -1.53.0.TC032 (2007-07-27) - - setLastH method was added to resolve bug 1689071. - - all fonts names were converted in lowercase (bug 1713005). - - bug 1740954 was fixed. - - justification was added as Cell option. - -1.53.0.TC031 (2007-03-20) - - ToUnicode CMap were added on _puttruetypeunicode function. Now you may search and copy unicode text. - -1.53.0.TC030 (2007-03-06) - - fixed bug on PHP4 version. - -1.53.0.TC029 (2007-03-06) - - DejaVu Fonts were added. - -1.53.0.TC028 (2007-03-03) - - MultiCell function signature were changed: the $ln parameter were added. Check documentation for further information. - - Greek language were added on example sentences. - - setPrintHeader() and setPrintFooter() functions were added to enable or disable page header and footer. - -1.53.0.TC027 (2006-12-14) - - $attr['face'] bug were fixed. - - K_TCPDF_EXTERNAL_CONFIG control where introduced on /config/tcpdf_config.php to use external configuration files. - -1.53.0.TC026 (2006-10-28) - - writeHTML function call were fixed on examples. - -1.53.0.TC025 (2006-10-27) - - Bugs item #1421290 were fixed (0D - 0A substitution in some characters) - - Bugs item #1573174 were fixed (MultiCell documentation) - -1.53.0.TC024 (2006-09-26) - - getPageHeight() function were fixed (bug 1543476). - - fixed missing breaks on closedHTMLTagHandler function (bug 1535263). - - fixed extra spaces on Write function (bug 1535262). - -1.53.0.TC023 (2006-08-04) - - paths to barcode directory were fixed. - - documentation were updated. - -1.53.0.TC022 (2006-07-16) - - fixed bug: [ 1516858 ] Probs with PHP autoloader and class_exists() - -1.53.0.TC021 (2006-07-01) - - HTML attributes with whitespaces are now supported (thanks to Nelson Benitez for his support) - -1.53.0.TC020 (2006-06-23) - - code cleanup - -1.53.0.TC019 (2006-05-21) - - fixed and closing tags - -1.53.0.TC018 (2006-05-18) - - fixed font names bug - -1.53.0.TC017 (2006-05-18) - - the TTF2UFM utility to convert True Type fonts for TCPDF were included on fonts folder. - - new free unicode fonts were included on /fonts/freefont. - - test_unicode.php example were exended. - - parameter $fill were added on Write, writeHTML and writeHTMLCell functions. - - documentation were updated. - -1.53.0.TC016 (2006-03-09) - - fixed closing tag on html parser. - -1.53.0.TC016 (2005-08-28) - - fpdf.php and tcpdf.php files were joined in one single class (you can still extend TCPDF with your own class). - - fixed problem when mb_internal_encoding is set. - -1.53.0.TC014 (2005-05-29) - - fixed WriteHTMLCell new page issue. - -1.53.0.TC013 (2005-05-29) - - fixed WriteHTMLCell across pages. - -1.53.0.TC012 (2005-05-29) - - font color attribute bug were fixed. - -1.53.0.TC011 (2005-03-31) - - SetFont function were fixed (thank Sjaak Lauwers for bug notice). - -1.53.0.TC010 (2005-03-22) - - the html functions were improved (thanks to Manfred Vervuert for bug reporting). - -1.53.0.TC009 (2005-03-19) - - a wrong reference to convertColorHexToDec were fixed. - -1.53.0.TC008 (2005-02-07) - - removed some extra bytes from PHP files. - -1.53.0.TC007 (2005-01-08) - - fill attribute were removed from writeHTMLCell method. - -1.53.0.TC006 (2005-01-08) - - the documentation were updated. - -1.53.0.TC005 (2005-01-05) - - Steven Wittens's unicode methods were removed. - - All unicode methods were rewritten from scratch. - - TCPDF is now licensed as LGPL. - -1.53.0.TC004 (2005-01-04) - - this changelog were added. - - removed commercial fonts for licensing issue. - - Bitstream Vera Fonts were added (http://www.bitstream.com/font_rendering/products/dev_fonts/vera.html). - - Now the AddFont and SetFont functions returns the basic font if the styled version do not exist. - -EOF -------------------------------------------------------- diff --git a/html/lib/tcpdf/README.TXT b/html/lib/tcpdf/README.TXT deleted file mode 100644 index d051393caa..0000000000 --- a/html/lib/tcpdf/README.TXT +++ /dev/null @@ -1,115 +0,0 @@ -TCPDF - README -============================================================ - -I WISH TO IMPROVE AND EXPAND TCPDF BUT I NEED YOUR SUPPORT. -PLEASE MAKE A DONATION: -http://sourceforge.net/donate/index.php?group_id=128076 - ------------------------------------------------------------- - -Name: TCPDF -Version: 6.2.6 -Release date: 2015-01-28 -Author: Nicola Asuni - -Copyright (c) 2002-2015: - Nicola Asuni - Tecnick.com LTD - www.tecnick.com - -URLs: - http://www.tcpdf.org - http://www.sourceforge.net/projects/tcpdf - -Description: - TCPDF is a PHP class for generating PDF files on-the-fly without requiring external extensions. - This library includes also a class to extract data from existing PDF documents and - classes to generate 1D and 2D barcodes in various formats. - -Main Features: - * no external libraries are required for the basic functions; - * all standard page formats, custom page formats, custom margins and units of measure; - * UTF-8 Unicode and Right-To-Left languages; - * TrueTypeUnicode, OpenTypeUnicode v1, TrueType, OpenType v1, Type1 and CID-0 fonts; - * font subsetting; - * methods to publish some XHTML + CSS code, Javascript and Forms; - * images, graphic (geometric figures) and transformation methods; - * supports JPEG, PNG and SVG images natively, all images supported by GD (GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM) and all images supported via ImagMagick (http: www.imagemagick.org/www/formats.html) - * 1D and 2D barcodes: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extension, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index - Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS, Datamatrix, QR-Code, PDF417; - * JPEG and PNG ICC profiles, Grayscale, RGB, CMYK, Spot Colors and Transparencies; - * automatic page header and footer management; - * document encryption up to 256 bit and digital signature certifications; - * transactions to UNDO commands; - * PDF annotations, including links, text and file attachments; - * text rendering modes (fill, stroke and clipping); - * multiple columns mode; - * no-write page regions; - * bookmarks, named destinations and table of content; - * text hyphenation; - * text stretching and spacing (tracking); - * automatic page break, line break and text alignments including justification; - * automatic page numbering and page groups; - * move and delete pages; - * page compression (requires php-zlib extension); - * XOBject Templates; - * Layers and object visibility. - * PDF/A-1b support. - -Installation (full instructions on http: www.tcpdf.org): - 1. copy the folder on your Web server - 2. set your installation path and other parameters on the config/tcpdf_config.php - 3. call the examples/example_001.php page with your browser to see an example - -Source Code Documentation: - http://www.tcpdf.org - -Additional Documentation: - http://www.tcpdf.org - -License: - Copyright (C) 2002-2014 Nicola Asuni - Tecnick.com LTD - - TCPDF is free software: you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - TCPDF is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the License - along with TCPDF. If not, see - . - - See LICENSE.TXT file for more information. - -Third party fonts: - - This library may include third party font files released with different licenses. - - All the PHP files on the fonts directory are subject to the general TCPDF license (GNU-LGPLv3), - they do not contain any binary data but just a description of the general properties of a particular font. - These files can be also generated on the fly using the font utilities and TCPDF methods. - - All the original binary TTF font files have been renamed for compatibility with TCPDF and compressed using the gzcompress PHP function that uses the ZLIB data format (.z files). - - The binary files (.z) that begins with the prefix "free" have been extracted from the GNU FreeFont collection (GNU-GPLv3). - The binary files (.z) that begins with the prefix "pdfa" have been derived from the GNU FreeFont, so they are subject to the same license. - For the details of Copyright, License and other information, please check the files inside the directory fonts/freefont-20120503 - Link : http://www.gnu.org/software/freefont/ - - The binary files (.z) that begins with the prefix "dejavu" have been extracted from the DejaVu fonts 2.33 (Bitstream) collection. - For the details of Copyright, License and other information, please check the files inside the directory fonts/dejavu-fonts-ttf-2.33 - Link : http://dejavu-fonts.org - - The binary files (.z) that begins with the prefix "ae" have been extracted from the Arabeyes.org collection (GNU-GPLv2). - Link : http://projects.arabeyes.org/ - -ICC profile: - TCPDF includes the sRGB.icc profile from the icc-profiles-free Debian package: - https://packages.debian.org/source/stable/icc-profiles-free - - -============================================================ diff --git a/html/lib/tcpdf/include/barcodes/qrcode.php b/html/lib/tcpdf/include/barcodes/qrcode.php deleted file mode 100644 index 3127fe6873..0000000000 --- a/html/lib/tcpdf/include/barcodes/qrcode.php +++ /dev/null @@ -1,2866 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// DESCRIPTION : -// -// Class to create QR-code arrays for TCPDF class. -// QR Code symbol is a 2D barcode that can be scanned by -// handy terminals such as a mobile phone with CCD. -// The capacity of QR Code is up to 7000 digits or 4000 -// characters, and has high robustness. -// This class supports QR Code model 2, described in -// JIS (Japanese Industrial Standards) X0510:2004 -// or ISO/IEC 18004. -// Currently the following features are not supported: -// ECI and FNC1 mode, Micro QR Code, QR Code model 1, -// Structured mode. -// -// This class is derived from the following projects: -// --------------------------------------------------------- -// "PHP QR Code encoder" -// License: GNU-LGPLv3 -// Copyright (C) 2010 by Dominik Dzienia -// http://phpqrcode.sourceforge.net/ -// https://sourceforge.net/projects/phpqrcode/ -// -// The "PHP QR Code encoder" is based on -// "C libqrencode library" (ver. 3.1.1) -// License: GNU-LGPL 2.1 -// Copyright (C) 2006-2010 by Kentaro Fukuchi -// http://megaui.net/fukuchi/works/qrencode/index.en.html -// -// Reed-Solomon code encoder is written by Phil Karn, KA9Q. -// Copyright (C) 2002-2006 Phil Karn, KA9Q -// -// QR Code is registered trademark of DENSO WAVE INCORPORATED -// http://www.denso-wave.com/qrcode/index-e.html -// --------------------------------------------------------- -//============================================================+ - -/** - * @file - * Class to create QR-code arrays for TCPDF class. - * QR Code symbol is a 2D barcode that can be scanned by handy terminals such as a mobile phone with CCD. - * The capacity of QR Code is up to 7000 digits or 4000 characters, and has high robustness. - * This class supports QR Code model 2, described in JIS (Japanese Industrial Standards) X0510:2004 or ISO/IEC 18004. - * Currently the following features are not supported: ECI and FNC1 mode, Micro QR Code, QR Code model 1, Structured mode. - * - * This class is derived from "PHP QR Code encoder" by Dominik Dzienia (http://phpqrcode.sourceforge.net/) based on "libqrencode C library 3.1.1." by Kentaro Fukuchi (http://megaui.net/fukuchi/works/qrencode/index.en.html), contains Reed-Solomon code written by Phil Karn, KA9Q. QR Code is registered trademark of DENSO WAVE INCORPORATED (http://www.denso-wave.com/qrcode/index-e.html). - * Please read comments on this class source file for full copyright and license information. - * - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.0.010 - */ - -// definitions -if (!defined('QRCODEDEFS')) { - - /** - * Indicate that definitions for this class are set - */ - define('QRCODEDEFS', true); - - // ----------------------------------------------------- - - // Encoding modes (characters which can be encoded in QRcode) - - /** - * Encoding mode - */ - define('QR_MODE_NL', -1); - - /** - * Encoding mode numeric (0-9). 3 characters are encoded to 10bit length. In theory, 7089 characters or less can be stored in a QRcode. - */ - define('QR_MODE_NM', 0); - - /** - * Encoding mode alphanumeric (0-9A-Z $%*+-./:) 45characters. 2 characters are encoded to 11bit length. In theory, 4296 characters or less can be stored in a QRcode. - */ - define('QR_MODE_AN', 1); - - /** - * Encoding mode 8bit byte data. In theory, 2953 characters or less can be stored in a QRcode. - */ - define('QR_MODE_8B', 2); - - /** - * Encoding mode KANJI. A KANJI character (multibyte character) is encoded to 13bit length. In theory, 1817 characters or less can be stored in a QRcode. - */ - define('QR_MODE_KJ', 3); - - /** - * Encoding mode STRUCTURED (currently unsupported) - */ - define('QR_MODE_ST', 4); - - // ----------------------------------------------------- - - // Levels of error correction. - // QRcode has a function of an error correcting for miss reading that white is black. - // Error correcting is defined in 4 level as below. - - /** - * Error correction level L : About 7% or less errors can be corrected. - */ - define('QR_ECLEVEL_L', 0); - - /** - * Error correction level M : About 15% or less errors can be corrected. - */ - define('QR_ECLEVEL_M', 1); - - /** - * Error correction level Q : About 25% or less errors can be corrected. - */ - define('QR_ECLEVEL_Q', 2); - - /** - * Error correction level H : About 30% or less errors can be corrected. - */ - define('QR_ECLEVEL_H', 3); - - // ----------------------------------------------------- - - // Version. Size of QRcode is defined as version. - // Version is from 1 to 40. - // Version 1 is 21*21 matrix. And 4 modules increases whenever 1 version increases. - // So version 40 is 177*177 matrix. - - /** - * Maximum QR Code version. - */ - define('QRSPEC_VERSION_MAX', 40); - - /** - * Maximum matrix size for maximum version (version 40 is 177*177 matrix). - */ - define('QRSPEC_WIDTH_MAX', 177); - - // ----------------------------------------------------- - - /** - * Matrix index to get width from $capacity array. - */ - define('QRCAP_WIDTH', 0); - - /** - * Matrix index to get number of words from $capacity array. - */ - define('QRCAP_WORDS', 1); - - /** - * Matrix index to get remainder from $capacity array. - */ - define('QRCAP_REMINDER', 2); - - /** - * Matrix index to get error correction level from $capacity array. - */ - define('QRCAP_EC', 3); - - // ----------------------------------------------------- - - // Structure (currently usupported) - - /** - * Number of header bits for structured mode - */ - define('STRUCTURE_HEADER_BITS', 20); - - /** - * Max number of symbols for structured mode - */ - define('MAX_STRUCTURED_SYMBOLS', 16); - - // ----------------------------------------------------- - - // Masks - - /** - * Down point base value for case 1 mask pattern (concatenation of same color in a line or a column) - */ - define('N1', 3); - - /** - * Down point base value for case 2 mask pattern (module block of same color) - */ - define('N2', 3); - - /** - * Down point base value for case 3 mask pattern (1:1:3:1:1(dark:bright:dark:bright:dark)pattern in a line or a column) - */ - define('N3', 40); - - /** - * Down point base value for case 4 mask pattern (ration of dark modules in whole) - */ - define('N4', 10); - - // ----------------------------------------------------- - - // Optimization settings - - /** - * if true, estimates best mask (spec. default, but extremally slow; set to false to significant performance boost but (propably) worst quality code - */ - define('QR_FIND_BEST_MASK', true); - - /** - * if false, checks all masks available, otherwise value tells count of masks need to be checked, mask id are got randomly - */ - define('QR_FIND_FROM_RANDOM', 2); - - /** - * when QR_FIND_BEST_MASK === false - */ - define('QR_DEFAULT_MASK', 2); - - // ----------------------------------------------------- - -} // end of definitions - -// #*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*# - -// for compatibility with PHP4 -if (!function_exists('str_split')) { - /** - * Convert a string to an array (needed for PHP4 compatibility) - * @param $string (string) The input string. - * @param $split_length (int) Maximum length of the chunk. - * @return If the optional split_length parameter is specified, the returned array will be broken down into chunks with each being split_length in length, otherwise each chunk will be one character in length. FALSE is returned if split_length is less than 1. If the split_length length exceeds the length of string , the entire string is returned as the first (and only) array element. - */ - function str_split($string, $split_length=1) { - if ((strlen($string) > $split_length) OR (!$split_length)) { - do { - $c = strlen($string); - $parts[] = substr($string, 0, $split_length); - $string = substr($string, $split_length); - } while ($string !== false); - } else { - $parts = array($string); - } - return $parts; - } -} - -// ##################################################### - -/** - * @class QRcode - * Class to create QR-code arrays for TCPDF class. - * QR Code symbol is a 2D barcode that can be scanned by handy terminals such as a mobile phone with CCD. - * The capacity of QR Code is up to 7000 digits or 4000 characters, and has high robustness. - * This class supports QR Code model 2, described in JIS (Japanese Industrial Standards) X0510:2004 or ISO/IEC 18004. - * Currently the following features are not supported: ECI and FNC1 mode, Micro QR Code, QR Code model 1, Structured mode. - * - * This class is derived from "PHP QR Code encoder" by Dominik Dzienia (http://phpqrcode.sourceforge.net/) based on "libqrencode C library 3.1.1." by Kentaro Fukuchi (http://megaui.net/fukuchi/works/qrencode/index.en.html), contains Reed-Solomon code written by Phil Karn, KA9Q. QR Code is registered trademark of DENSO WAVE INCORPORATED (http://www.denso-wave.com/qrcode/index-e.html). - * Please read comments on this class source file for full copyright and license information. - * - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.0.010 - */ -class QRcode { - - /** - * Barcode array to be returned which is readable by TCPDF. - * @protected - */ - protected $barcode_array = array(); - - /** - * QR code version. Size of QRcode is defined as version. Version is from 1 to 40. Version 1 is 21*21 matrix. And 4 modules increases whenever 1 version increases. So version 40 is 177*177 matrix. - * @protected - */ - protected $version = 0; - - /** - * Levels of error correction. See definitions for possible values. - * @protected - */ - protected $level = QR_ECLEVEL_L; - - /** - * Encoding mode. - * @protected - */ - protected $hint = QR_MODE_8B; - - /** - * Boolean flag, if true the input string will be converted to uppercase. - * @protected - */ - protected $casesensitive = true; - - /** - * Structured QR code (not supported yet). - * @protected - */ - protected $structured = 0; - - /** - * Mask data. - * @protected - */ - protected $data; - - // FrameFiller - - /** - * Width. - * @protected - */ - protected $width; - - /** - * Frame. - * @protected - */ - protected $frame; - - /** - * X position of bit. - * @protected - */ - protected $x; - - /** - * Y position of bit. - * @protected - */ - protected $y; - - /** - * Direction. - * @protected - */ - protected $dir; - - /** - * Single bit value. - * @protected - */ - protected $bit; - - // ---- QRrawcode ---- - - /** - * Data code. - * @protected - */ - protected $datacode = array(); - - /** - * Error correction code. - * @protected - */ - protected $ecccode = array(); - - /** - * Blocks. - * @protected - */ - protected $blocks; - - /** - * Reed-Solomon blocks. - * @protected - */ - protected $rsblocks = array(); //of RSblock - - /** - * Counter. - * @protected - */ - protected $count; - - /** - * Data length. - * @protected - */ - protected $dataLength; - - /** - * Error correction length. - * @protected - */ - protected $eccLength; - - /** - * Value b1. - * @protected - */ - protected $b1; - - // ---- QRmask ---- - - /** - * Run length. - * @protected - */ - protected $runLength = array(); - - // ---- QRsplit ---- - - /** - * Input data string. - * @protected - */ - protected $dataStr = ''; - - /** - * Input items. - * @protected - */ - protected $items; - - // Reed-Solomon items - - /** - * Reed-Solomon items. - * @protected - */ - protected $rsitems = array(); - - /** - * Array of frames. - * @protected - */ - protected $frames = array(); - - /** - * Alphabet-numeric convesion table. - * @protected - */ - protected $anTable = array( - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // - 36, -1, -1, -1, 37, 38, -1, -1, -1, -1, 39, 40, -1, 41, 42, 43, // - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 44, -1, -1, -1, -1, -1, // - -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, // - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, // - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 // - ); - - /** - * Array Table of the capacity of symbols. - * See Table 1 (pp.13) and Table 12-16 (pp.30-36), JIS X0510:2004. - * @protected - */ - protected $capacity = array( - array( 0, 0, 0, array( 0, 0, 0, 0)), // - array( 21, 26, 0, array( 7, 10, 13, 17)), // 1 - array( 25, 44, 7, array( 10, 16, 22, 28)), // - array( 29, 70, 7, array( 15, 26, 36, 44)), // - array( 33, 100, 7, array( 20, 36, 52, 64)), // - array( 37, 134, 7, array( 26, 48, 72, 88)), // 5 - array( 41, 172, 7, array( 36, 64, 96, 112)), // - array( 45, 196, 0, array( 40, 72, 108, 130)), // - array( 49, 242, 0, array( 48, 88, 132, 156)), // - array( 53, 292, 0, array( 60, 110, 160, 192)), // - array( 57, 346, 0, array( 72, 130, 192, 224)), // 10 - array( 61, 404, 0, array( 80, 150, 224, 264)), // - array( 65, 466, 0, array( 96, 176, 260, 308)), // - array( 69, 532, 0, array( 104, 198, 288, 352)), // - array( 73, 581, 3, array( 120, 216, 320, 384)), // - array( 77, 655, 3, array( 132, 240, 360, 432)), // 15 - array( 81, 733, 3, array( 144, 280, 408, 480)), // - array( 85, 815, 3, array( 168, 308, 448, 532)), // - array( 89, 901, 3, array( 180, 338, 504, 588)), // - array( 93, 991, 3, array( 196, 364, 546, 650)), // - array( 97, 1085, 3, array( 224, 416, 600, 700)), // 20 - array(101, 1156, 4, array( 224, 442, 644, 750)), // - array(105, 1258, 4, array( 252, 476, 690, 816)), // - array(109, 1364, 4, array( 270, 504, 750, 900)), // - array(113, 1474, 4, array( 300, 560, 810, 960)), // - array(117, 1588, 4, array( 312, 588, 870, 1050)), // 25 - array(121, 1706, 4, array( 336, 644, 952, 1110)), // - array(125, 1828, 4, array( 360, 700, 1020, 1200)), // - array(129, 1921, 3, array( 390, 728, 1050, 1260)), // - array(133, 2051, 3, array( 420, 784, 1140, 1350)), // - array(137, 2185, 3, array( 450, 812, 1200, 1440)), // 30 - array(141, 2323, 3, array( 480, 868, 1290, 1530)), // - array(145, 2465, 3, array( 510, 924, 1350, 1620)), // - array(149, 2611, 3, array( 540, 980, 1440, 1710)), // - array(153, 2761, 3, array( 570, 1036, 1530, 1800)), // - array(157, 2876, 0, array( 570, 1064, 1590, 1890)), // 35 - array(161, 3034, 0, array( 600, 1120, 1680, 1980)), // - array(165, 3196, 0, array( 630, 1204, 1770, 2100)), // - array(169, 3362, 0, array( 660, 1260, 1860, 2220)), // - array(173, 3532, 0, array( 720, 1316, 1950, 2310)), // - array(177, 3706, 0, array( 750, 1372, 2040, 2430)) // 40 - ); - - /** - * Array Length indicator. - * @protected - */ - protected $lengthTableBits = array( - array(10, 12, 14), - array( 9, 11, 13), - array( 8, 16, 16), - array( 8, 10, 12) - ); - - /** - * Array Table of the error correction code (Reed-Solomon block). - * See Table 12-16 (pp.30-36), JIS X0510:2004. - * @protected - */ - protected $eccTable = array( - array(array( 0, 0), array( 0, 0), array( 0, 0), array( 0, 0)), // - array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), // 1 - array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), // - array(array( 1, 0), array( 1, 0), array( 2, 0), array( 2, 0)), // - array(array( 1, 0), array( 2, 0), array( 2, 0), array( 4, 0)), // - array(array( 1, 0), array( 2, 0), array( 2, 2), array( 2, 2)), // 5 - array(array( 2, 0), array( 4, 0), array( 4, 0), array( 4, 0)), // - array(array( 2, 0), array( 4, 0), array( 2, 4), array( 4, 1)), // - array(array( 2, 0), array( 2, 2), array( 4, 2), array( 4, 2)), // - array(array( 2, 0), array( 3, 2), array( 4, 4), array( 4, 4)), // - array(array( 2, 2), array( 4, 1), array( 6, 2), array( 6, 2)), // 10 - array(array( 4, 0), array( 1, 4), array( 4, 4), array( 3, 8)), // - array(array( 2, 2), array( 6, 2), array( 4, 6), array( 7, 4)), // - array(array( 4, 0), array( 8, 1), array( 8, 4), array(12, 4)), // - array(array( 3, 1), array( 4, 5), array(11, 5), array(11, 5)), // - array(array( 5, 1), array( 5, 5), array( 5, 7), array(11, 7)), // 15 - array(array( 5, 1), array( 7, 3), array(15, 2), array( 3, 13)), // - array(array( 1, 5), array(10, 1), array( 1, 15), array( 2, 17)), // - array(array( 5, 1), array( 9, 4), array(17, 1), array( 2, 19)), // - array(array( 3, 4), array( 3, 11), array(17, 4), array( 9, 16)), // - array(array( 3, 5), array( 3, 13), array(15, 5), array(15, 10)), // 20 - array(array( 4, 4), array(17, 0), array(17, 6), array(19, 6)), // - array(array( 2, 7), array(17, 0), array( 7, 16), array(34, 0)), // - array(array( 4, 5), array( 4, 14), array(11, 14), array(16, 14)), // - array(array( 6, 4), array( 6, 14), array(11, 16), array(30, 2)), // - array(array( 8, 4), array( 8, 13), array( 7, 22), array(22, 13)), // 25 - array(array(10, 2), array(19, 4), array(28, 6), array(33, 4)), // - array(array( 8, 4), array(22, 3), array( 8, 26), array(12, 28)), // - array(array( 3, 10), array( 3, 23), array( 4, 31), array(11, 31)), // - array(array( 7, 7), array(21, 7), array( 1, 37), array(19, 26)), // - array(array( 5, 10), array(19, 10), array(15, 25), array(23, 25)), // 30 - array(array(13, 3), array( 2, 29), array(42, 1), array(23, 28)), // - array(array(17, 0), array(10, 23), array(10, 35), array(19, 35)), // - array(array(17, 1), array(14, 21), array(29, 19), array(11, 46)), // - array(array(13, 6), array(14, 23), array(44, 7), array(59, 1)), // - array(array(12, 7), array(12, 26), array(39, 14), array(22, 41)), // 35 - array(array( 6, 14), array( 6, 34), array(46, 10), array( 2, 64)), // - array(array(17, 4), array(29, 14), array(49, 10), array(24, 46)), // - array(array( 4, 18), array(13, 32), array(48, 14), array(42, 32)), // - array(array(20, 4), array(40, 7), array(43, 22), array(10, 67)), // - array(array(19, 6), array(18, 31), array(34, 34), array(20, 61)) // 40 - ); - - /** - * Array Positions of alignment patterns. - * This array includes only the second and the third position of the alignment patterns. Rest of them can be calculated from the distance between them. - * See Table 1 in Appendix E (pp.71) of JIS X0510:2004. - * @protected - */ - protected $alignmentPattern = array( - array( 0, 0), - array( 0, 0), array(18, 0), array(22, 0), array(26, 0), array(30, 0), // 1- 5 - array(34, 0), array(22, 38), array(24, 42), array(26, 46), array(28, 50), // 6-10 - array(30, 54), array(32, 58), array(34, 62), array(26, 46), array(26, 48), // 11-15 - array(26, 50), array(30, 54), array(30, 56), array(30, 58), array(34, 62), // 16-20 - array(28, 50), array(26, 50), array(30, 54), array(28, 54), array(32, 58), // 21-25 - array(30, 58), array(34, 62), array(26, 50), array(30, 54), array(26, 52), // 26-30 - array(30, 56), array(34, 60), array(30, 58), array(34, 62), array(30, 54), // 31-35 - array(24, 50), array(28, 54), array(32, 58), array(26, 54), array(30, 58) // 35-40 - ); - - /** - * Array Version information pattern (BCH coded). - * See Table 1 in Appendix D (pp.68) of JIS X0510:2004. - * size: [QRSPEC_VERSION_MAX - 6] - * @protected - */ - protected $versionPattern = array( - 0x07c94, 0x085bc, 0x09a99, 0x0a4d3, 0x0bbf6, 0x0c762, 0x0d847, 0x0e60d, // - 0x0f928, 0x10b78, 0x1145d, 0x12a17, 0x13532, 0x149a6, 0x15683, 0x168c9, // - 0x177ec, 0x18ec4, 0x191e1, 0x1afab, 0x1b08e, 0x1cc1a, 0x1d33f, 0x1ed75, // - 0x1f250, 0x209d5, 0x216f0, 0x228ba, 0x2379f, 0x24b0b, 0x2542e, 0x26a64, // - 0x27541, 0x28c69 - ); - - /** - * Array Format information - * @protected - */ - protected $formatInfo = array( - array(0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976), // - array(0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0), // - array(0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed), // - array(0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b) // - ); - - - // ------------------------------------------------- - // ------------------------------------------------- - - - /** - * This is the class constructor. - * Creates a QRcode object - * @param $code (string) code to represent using QRcode - * @param $eclevel (string) error level:
        • L : About 7% or less errors can be corrected.
        • M : About 15% or less errors can be corrected.
        • Q : About 25% or less errors can be corrected.
        • H : About 30% or less errors can be corrected.
        - * @public - * @since 1.0.000 - */ - public function __construct($code, $eclevel = 'L') { - $barcode_array = array(); - if ((is_null($code)) OR ($code == '\0') OR ($code == '')) { - return false; - } - // set error correction level - $this->level = array_search($eclevel, array('L', 'M', 'Q', 'H')); - if ($this->level === false) { - $this->level = QR_ECLEVEL_L; - } - if (($this->hint != QR_MODE_8B) AND ($this->hint != QR_MODE_KJ)) { - return false; - } - if (($this->version < 0) OR ($this->version > QRSPEC_VERSION_MAX)) { - return false; - } - $this->items = array(); - $this->encodeString($code); - if (is_null($this->data)) { - return false; - } - $qrTab = $this->binarize($this->data); - $size = count($qrTab); - $barcode_array['num_rows'] = $size; - $barcode_array['num_cols'] = $size; - $barcode_array['bcode'] = array(); - foreach ($qrTab as $line) { - $arrAdd = array(); - foreach (str_split($line) as $char) { - $arrAdd[] = ($char=='1')?1:0; - } - $barcode_array['bcode'][] = $arrAdd; - } - $this->barcode_array = $barcode_array; - } - - /** - * Returns a barcode array which is readable by TCPDF - * @return array barcode array readable by TCPDF; - * @public - */ - public function getBarcodeArray() { - return $this->barcode_array; - } - - /** - * Convert the frame in binary form - * @param $frame (array) array to binarize - * @return array frame in binary form - */ - protected function binarize($frame) { - $len = count($frame); - // the frame is square (width = height) - foreach ($frame as &$frameLine) { - for ($i=0; $i<$len; $i++) { - $frameLine[$i] = (ord($frameLine[$i])&1)?'1':'0'; - } - } - return $frame; - } - - /** - * Encode the input string to QR code - * @param $string (string) input string to encode - */ - protected function encodeString($string) { - $this->dataStr = $string; - if (!$this->casesensitive) { - $this->toUpper(); - } - $ret = $this->splitString(); - if ($ret < 0) { - return NULL; - } - $this->encodeMask(-1); - } - - /** - * Encode mask - * @param $mask (int) masking mode - */ - protected function encodeMask($mask) { - $spec = array(0, 0, 0, 0, 0); - $this->datacode = $this->getByteStream($this->items); - if (is_null($this->datacode)) { - return NULL; - } - $spec = $this->getEccSpec($this->version, $this->level, $spec); - $this->b1 = $this->rsBlockNum1($spec); - $this->dataLength = $this->rsDataLength($spec); - $this->eccLength = $this->rsEccLength($spec); - $this->ecccode = array_fill(0, $this->eccLength, 0); - $this->blocks = $this->rsBlockNum($spec); - $ret = $this->init($spec); - if ($ret < 0) { - return NULL; - } - $this->count = 0; - $this->width = $this->getWidth($this->version); - $this->frame = $this->newFrame($this->version); - $this->x = $this->width - 1; - $this->y = $this->width - 1; - $this->dir = -1; - $this->bit = -1; - // inteleaved data and ecc codes - for ($i=0; $i < ($this->dataLength + $this->eccLength); $i++) { - $code = $this->getCode(); - $bit = 0x80; - for ($j=0; $j<8; $j++) { - $addr = $this->getNextPosition(); - $this->setFrameAt($addr, 0x02 | (($bit & $code) != 0)); - $bit = $bit >> 1; - } - } - // remainder bits - $j = $this->getRemainder($this->version); - for ($i=0; $i<$j; $i++) { - $addr = $this->getNextPosition(); - $this->setFrameAt($addr, 0x02); - } - // masking - $this->runLength = array_fill(0, QRSPEC_WIDTH_MAX + 1, 0); - if ($mask < 0) { - if (QR_FIND_BEST_MASK) { - $masked = $this->mask($this->width, $this->frame, $this->level); - } else { - $masked = $this->makeMask($this->width, $this->frame, (intval(QR_DEFAULT_MASK) % 8), $this->level); - } - } else { - $masked = $this->makeMask($this->width, $this->frame, $mask, $this->level); - } - if ($masked == NULL) { - return NULL; - } - $this->data = $masked; - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // FrameFiller - - /** - * Set frame value at specified position - * @param $at (array) x,y position - * @param $val (int) value of the character to set - */ - protected function setFrameAt($at, $val) { - $this->frame[$at['y']][$at['x']] = chr($val); - } - - /** - * Get frame value at specified position - * @param $at (array) x,y position - * @return value at specified position - */ - protected function getFrameAt($at) { - return ord($this->frame[$at['y']][$at['x']]); - } - - /** - * Return the next frame position - * @return array of x,y coordinates - */ - protected function getNextPosition() { - do { - if ($this->bit == -1) { - $this->bit = 0; - return array('x'=>$this->x, 'y'=>$this->y); - } - $x = $this->x; - $y = $this->y; - $w = $this->width; - if ($this->bit == 0) { - $x--; - $this->bit++; - } else { - $x++; - $y += $this->dir; - $this->bit--; - } - if ($this->dir < 0) { - if ($y < 0) { - $y = 0; - $x -= 2; - $this->dir = 1; - if ($x == 6) { - $x--; - $y = 9; - } - } - } else { - if ($y == $w) { - $y = $w - 1; - $x -= 2; - $this->dir = -1; - if ($x == 6) { - $x--; - $y -= 8; - } - } - } - if (($x < 0) OR ($y < 0)) { - return NULL; - } - $this->x = $x; - $this->y = $y; - } while(ord($this->frame[$y][$x]) & 0x80); - return array('x'=>$x, 'y'=>$y); - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRrawcode - - /** - * Initialize code. - * @param $spec (array) array of ECC specification - * @return 0 in case of success, -1 in case of error - */ - protected function init($spec) { - $dl = $this->rsDataCodes1($spec); - $el = $this->rsEccCodes1($spec); - $rs = $this->init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); - $blockNo = 0; - $dataPos = 0; - $eccPos = 0; - $endfor = $this->rsBlockNum1($spec); - for ($i=0; $i < $endfor; ++$i) { - $ecc = array_slice($this->ecccode, $eccPos); - $this->rsblocks[$blockNo] = array(); - $this->rsblocks[$blockNo]['dataLength'] = $dl; - $this->rsblocks[$blockNo]['data'] = array_slice($this->datacode, $dataPos); - $this->rsblocks[$blockNo]['eccLength'] = $el; - $ecc = $this->encode_rs_char($rs, $this->rsblocks[$blockNo]['data'], $ecc); - $this->rsblocks[$blockNo]['ecc'] = $ecc; - $this->ecccode = array_merge(array_slice($this->ecccode,0, $eccPos), $ecc); - $dataPos += $dl; - $eccPos += $el; - $blockNo++; - } - if ($this->rsBlockNum2($spec) == 0) { - return 0; - } - $dl = $this->rsDataCodes2($spec); - $el = $this->rsEccCodes2($spec); - $rs = $this->init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); - if ($rs == NULL) { - return -1; - } - $endfor = $this->rsBlockNum2($spec); - for ($i=0; $i < $endfor; ++$i) { - $ecc = array_slice($this->ecccode, $eccPos); - $this->rsblocks[$blockNo] = array(); - $this->rsblocks[$blockNo]['dataLength'] = $dl; - $this->rsblocks[$blockNo]['data'] = array_slice($this->datacode, $dataPos); - $this->rsblocks[$blockNo]['eccLength'] = $el; - $ecc = $this->encode_rs_char($rs, $this->rsblocks[$blockNo]['data'], $ecc); - $this->rsblocks[$blockNo]['ecc'] = $ecc; - $this->ecccode = array_merge(array_slice($this->ecccode, 0, $eccPos), $ecc); - $dataPos += $dl; - $eccPos += $el; - $blockNo++; - } - return 0; - } - - /** - * Return Reed-Solomon block code. - * @return array rsblocks - */ - protected function getCode() { - if ($this->count < $this->dataLength) { - $row = $this->count % $this->blocks; - $col = $this->count / $this->blocks; - if ($col >= $this->rsblocks[0]['dataLength']) { - $row += $this->b1; - } - $ret = $this->rsblocks[$row]['data'][$col]; - } elseif ($this->count < $this->dataLength + $this->eccLength) { - $row = ($this->count - $this->dataLength) % $this->blocks; - $col = ($this->count - $this->dataLength) / $this->blocks; - $ret = $this->rsblocks[$row]['ecc'][$col]; - } else { - return 0; - } - $this->count++; - return $ret; - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRmask - - /** - * Write Format Information on frame and returns the number of black bits - * @param $width (int) frame width - * @param $frame (array) frame - * @param $mask (array) masking mode - * @param $level (int) error correction level - * @return int blacks - */ - protected function writeFormatInformation($width, &$frame, $mask, $level) { - $blacks = 0; - $format = $this->getFormatInfo($mask, $level); - for ($i=0; $i<8; ++$i) { - if ($format & 1) { - $blacks += 2; - $v = 0x85; - } else { - $v = 0x84; - } - $frame[8][$width - 1 - $i] = chr($v); - if ($i < 6) { - $frame[$i][8] = chr($v); - } else { - $frame[$i + 1][8] = chr($v); - } - $format = $format >> 1; - } - for ($i=0; $i<7; ++$i) { - if ($format & 1) { - $blacks += 2; - $v = 0x85; - } else { - $v = 0x84; - } - $frame[$width - 7 + $i][8] = chr($v); - if ($i == 0) { - $frame[8][7] = chr($v); - } else { - $frame[8][6 - $i] = chr($v); - } - $format = $format >> 1; - } - return $blacks; - } - - /** - * mask0 - * @param $x (int) X position - * @param $y (int) Y position - * @return int mask - */ - protected function mask0($x, $y) { - return ($x + $y) & 1; - } - - /** - * mask1 - * @param $x (int) X position - * @param $y (int) Y position - * @return int mask - */ - protected function mask1($x, $y) { - return ($y & 1); - } - - /** - * mask2 - * @param $x (int) X position - * @param $y (int) Y position - * @return int mask - */ - protected function mask2($x, $y) { - return ($x % 3); - } - - /** - * mask3 - * @param $x (int) X position - * @param $y (int) Y position - * @return int mask - */ - protected function mask3($x, $y) { - return ($x + $y) % 3; - } - - /** - * mask4 - * @param $x (int) X position - * @param $y (int) Y position - * @return int mask - */ - protected function mask4($x, $y) { - return (((int)($y / 2)) + ((int)($x / 3))) & 1; - } - - /** - * mask5 - * @param $x (int) X position - * @param $y (int) Y position - * @return int mask - */ - protected function mask5($x, $y) { - return (($x * $y) & 1) + ($x * $y) % 3; - } - - /** - * mask6 - * @param $x (int) X position - * @param $y (int) Y position - * @return int mask - */ - protected function mask6($x, $y) { - return ((($x * $y) & 1) + ($x * $y) % 3) & 1; - } - - /** - * mask7 - * @param $x (int) X position - * @param $y (int) Y position - * @return int mask - */ - protected function mask7($x, $y) { - return ((($x * $y) % 3) + (($x + $y) & 1)) & 1; - } - - /** - * Return bitmask - * @param $maskNo (int) mask number - * @param $width (int) width - * @param $frame (array) frame - * @return array bitmask - */ - protected function generateMaskNo($maskNo, $width, $frame) { - $bitMask = array_fill(0, $width, array_fill(0, $width, 0)); - for ($y=0; $y<$width; ++$y) { - for ($x=0; $x<$width; ++$x) { - if (ord($frame[$y][$x]) & 0x80) { - $bitMask[$y][$x] = 0; - } else { - $maskFunc = call_user_func(array($this, 'mask'.$maskNo), $x, $y); - $bitMask[$y][$x] = ($maskFunc == 0)?1:0; - } - } - } - return $bitMask; - } - - /** - * makeMaskNo - * @param $maskNo (int) - * @param $width (int) - * @param $s (int) - * @param $d (int) - * @param $maskGenOnly (boolean) - * @return int b - */ - protected function makeMaskNo($maskNo, $width, $s, &$d, $maskGenOnly=false) { - $b = 0; - $bitMask = array(); - $bitMask = $this->generateMaskNo($maskNo, $width, $s, $d); - if ($maskGenOnly) { - return; - } - $d = $s; - for ($y=0; $y<$width; ++$y) { - for ($x=0; $x<$width; ++$x) { - if ($bitMask[$y][$x] == 1) { - $d[$y][$x] = chr(ord($s[$y][$x]) ^ ((int)($bitMask[$y][$x]))); - } - $b += (int)(ord($d[$y][$x]) & 1); - } - } - return $b; - } - - /** - * makeMask - * @param $width (int) - * @param $frame (array) - * @param $maskNo (int) - * @param $level (int) - * @return array mask - */ - protected function makeMask($width, $frame, $maskNo, $level) { - $masked = array_fill(0, $width, str_repeat("\0", $width)); - $this->makeMaskNo($maskNo, $width, $frame, $masked); - $this->writeFormatInformation($width, $masked, $maskNo, $level); - return $masked; - } - - /** - * calcN1N3 - * @param $length (int) - * @return int demerit - */ - protected function calcN1N3($length) { - $demerit = 0; - for ($i=0; $i<$length; ++$i) { - if ($this->runLength[$i] >= 5) { - $demerit += (N1 + ($this->runLength[$i] - 5)); - } - if ($i & 1) { - if (($i >= 3) AND ($i < ($length-2)) AND ($this->runLength[$i] % 3 == 0)) { - $fact = (int)($this->runLength[$i] / 3); - if (($this->runLength[$i-2] == $fact) - AND ($this->runLength[$i-1] == $fact) - AND ($this->runLength[$i+1] == $fact) - AND ($this->runLength[$i+2] == $fact)) { - if (($this->runLength[$i-3] < 0) OR ($this->runLength[$i-3] >= (4 * $fact))) { - $demerit += N3; - } elseif ((($i+3) >= $length) OR ($this->runLength[$i+3] >= (4 * $fact))) { - $demerit += N3; - } - } - } - } - } - return $demerit; - } - - /** - * evaluateSymbol - * @param $width (int) - * @param $frame (array) - * @return int demerit - */ - protected function evaluateSymbol($width, $frame) { - $head = 0; - $demerit = 0; - for ($y=0; $y<$width; ++$y) { - $head = 0; - $this->runLength[0] = 1; - $frameY = $frame[$y]; - if ($y > 0) { - $frameYM = $frame[$y-1]; - } - for ($x=0; $x<$width; ++$x) { - if (($x > 0) AND ($y > 0)) { - $b22 = ord($frameY[$x]) & ord($frameY[$x-1]) & ord($frameYM[$x]) & ord($frameYM[$x-1]); - $w22 = ord($frameY[$x]) | ord($frameY[$x-1]) | ord($frameYM[$x]) | ord($frameYM[$x-1]); - if (($b22 | ($w22 ^ 1)) & 1) { - $demerit += N2; - } - } - if (($x == 0) AND (ord($frameY[$x]) & 1)) { - $this->runLength[0] = -1; - $head = 1; - $this->runLength[$head] = 1; - } elseif ($x > 0) { - if ((ord($frameY[$x]) ^ ord($frameY[$x-1])) & 1) { - $head++; - $this->runLength[$head] = 1; - } else { - $this->runLength[$head]++; - } - } - } - $demerit += $this->calcN1N3($head+1); - } - for ($x=0; $x<$width; ++$x) { - $head = 0; - $this->runLength[0] = 1; - for ($y=0; $y<$width; ++$y) { - if (($y == 0) AND (ord($frame[$y][$x]) & 1)) { - $this->runLength[0] = -1; - $head = 1; - $this->runLength[$head] = 1; - } elseif ($y > 0) { - if ((ord($frame[$y][$x]) ^ ord($frame[$y-1][$x])) & 1) { - $head++; - $this->runLength[$head] = 1; - } else { - $this->runLength[$head]++; - } - } - } - $demerit += $this->calcN1N3($head+1); - } - return $demerit; - } - - /** - * mask - * @param $width (int) - * @param $frame (array) - * @param $level (int) - * @return array best mask - */ - protected function mask($width, $frame, $level) { - $minDemerit = PHP_INT_MAX; - $bestMaskNum = 0; - $bestMask = array(); - $checked_masks = array(0, 1, 2, 3, 4, 5, 6, 7); - if (QR_FIND_FROM_RANDOM !== false) { - $howManuOut = 8 - (QR_FIND_FROM_RANDOM % 9); - for ($i = 0; $i < $howManuOut; ++$i) { - $remPos = rand (0, count($checked_masks)-1); - unset($checked_masks[$remPos]); - $checked_masks = array_values($checked_masks); - } - } - $bestMask = $frame; - foreach ($checked_masks as $i) { - $mask = array_fill(0, $width, str_repeat("\0", $width)); - $demerit = 0; - $blacks = 0; - $blacks = $this->makeMaskNo($i, $width, $frame, $mask); - $blacks += $this->writeFormatInformation($width, $mask, $i, $level); - $blacks = (int)(100 * $blacks / ($width * $width)); - $demerit = (int)((int)(abs($blacks - 50) / 5) * N4); - $demerit += $this->evaluateSymbol($width, $mask); - if ($demerit < $minDemerit) { - $minDemerit = $demerit; - $bestMask = $mask; - $bestMaskNum = $i; - } - } - return $bestMask; - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRsplit - - /** - * Return true if the character at specified position is a number - * @param $str (string) string - * @param $pos (int) characted position - * @return boolean true of false - */ - protected function isdigitat($str, $pos) { - if ($pos >= strlen($str)) { - return false; - } - return ((ord($str[$pos]) >= ord('0'))&&(ord($str[$pos]) <= ord('9'))); - } - - /** - * Return true if the character at specified position is an alphanumeric character - * @param $str (string) string - * @param $pos (int) characted position - * @return boolean true of false - */ - protected function isalnumat($str, $pos) { - if ($pos >= strlen($str)) { - return false; - } - return ($this->lookAnTable(ord($str[$pos])) >= 0); - } - - /** - * identifyMode - * @param $pos (int) - * @return int mode - */ - protected function identifyMode($pos) { - if ($pos >= strlen($this->dataStr)) { - return QR_MODE_NL; - } - $c = $this->dataStr[$pos]; - if ($this->isdigitat($this->dataStr, $pos)) { - return QR_MODE_NM; - } elseif ($this->isalnumat($this->dataStr, $pos)) { - return QR_MODE_AN; - } elseif ($this->hint == QR_MODE_KJ) { - if ($pos+1 < strlen($this->dataStr)) { - $d = $this->dataStr[$pos+1]; - $word = (ord($c) << 8) | ord($d); - if (($word >= 0x8140 && $word <= 0x9ffc) OR ($word >= 0xe040 && $word <= 0xebbf)) { - return QR_MODE_KJ; - } - } - } - return QR_MODE_8B; - } - - /** - * eatNum - * @return int run - */ - protected function eatNum() { - $ln = $this->lengthIndicator(QR_MODE_NM, $this->version); - $p = 0; - while($this->isdigitat($this->dataStr, $p)) { - $p++; - } - $run = $p; - $mode = $this->identifyMode($p); - if ($mode == QR_MODE_8B) { - $dif = $this->estimateBitsModeNum($run) + 4 + $ln - + $this->estimateBitsMode8(1) // + 4 + l8 - - $this->estimateBitsMode8($run + 1); // - 4 - l8 - if ($dif > 0) { - return $this->eat8(); - } - } - if ($mode == QR_MODE_AN) { - $dif = $this->estimateBitsModeNum($run) + 4 + $ln - + $this->estimateBitsModeAn(1) // + 4 + la - - $this->estimateBitsModeAn($run + 1);// - 4 - la - if ($dif > 0) { - return $this->eatAn(); - } - } - $this->items = $this->appendNewInputItem($this->items, QR_MODE_NM, $run, str_split($this->dataStr)); - return $run; - } - - /** - * eatAn - * @return int run - */ - protected function eatAn() { - $la = $this->lengthIndicator(QR_MODE_AN, $this->version); - $ln = $this->lengthIndicator(QR_MODE_NM, $this->version); - $p =1 ; - while($this->isalnumat($this->dataStr, $p)) { - if ($this->isdigitat($this->dataStr, $p)) { - $q = $p; - while($this->isdigitat($this->dataStr, $q)) { - $q++; - } - $dif = $this->estimateBitsModeAn($p) // + 4 + la - + $this->estimateBitsModeNum($q - $p) + 4 + $ln - - $this->estimateBitsModeAn($q); // - 4 - la - if ($dif < 0) { - break; - } else { - $p = $q; - } - } else { - $p++; - } - } - $run = $p; - if (!$this->isalnumat($this->dataStr, $p)) { - $dif = $this->estimateBitsModeAn($run) + 4 + $la - + $this->estimateBitsMode8(1) // + 4 + l8 - - $this->estimateBitsMode8($run + 1); // - 4 - l8 - if ($dif > 0) { - return $this->eat8(); - } - } - $this->items = $this->appendNewInputItem($this->items, QR_MODE_AN, $run, str_split($this->dataStr)); - return $run; - } - - /** - * eatKanji - * @return int run - */ - protected function eatKanji() { - $p = 0; - while($this->identifyMode($p) == QR_MODE_KJ) { - $p += 2; - } - $this->items = $this->appendNewInputItem($this->items, QR_MODE_KJ, $p, str_split($this->dataStr)); - return $run; - } - - /** - * eat8 - * @return int run - */ - protected function eat8() { - $la = $this->lengthIndicator(QR_MODE_AN, $this->version); - $ln = $this->lengthIndicator(QR_MODE_NM, $this->version); - $p = 1; - $dataStrLen = strlen($this->dataStr); - while($p < $dataStrLen) { - $mode = $this->identifyMode($p); - if ($mode == QR_MODE_KJ) { - break; - } - if ($mode == QR_MODE_NM) { - $q = $p; - while($this->isdigitat($this->dataStr, $q)) { - $q++; - } - $dif = $this->estimateBitsMode8($p) // + 4 + l8 - + $this->estimateBitsModeNum($q - $p) + 4 + $ln - - $this->estimateBitsMode8($q); // - 4 - l8 - if ($dif < 0) { - break; - } else { - $p = $q; - } - } elseif ($mode == QR_MODE_AN) { - $q = $p; - while($this->isalnumat($this->dataStr, $q)) { - $q++; - } - $dif = $this->estimateBitsMode8($p) // + 4 + l8 - + $this->estimateBitsModeAn($q - $p) + 4 + $la - - $this->estimateBitsMode8($q); // - 4 - l8 - if ($dif < 0) { - break; - } else { - $p = $q; - } - } else { - $p++; - } - } - $run = $p; - $this->items = $this->appendNewInputItem($this->items, QR_MODE_8B, $run, str_split($this->dataStr)); - return $run; - } - - /** - * splitString - * @return (int) - */ - protected function splitString() { - while (strlen($this->dataStr) > 0) { - $mode = $this->identifyMode(0); - switch ($mode) { - case QR_MODE_NM: { - $length = $this->eatNum(); - break; - } - case QR_MODE_AN: { - $length = $this->eatAn(); - break; - } - case QR_MODE_KJ: { - if ($hint == QR_MODE_KJ) { - $length = $this->eatKanji(); - } else { - $length = $this->eat8(); - } - break; - } - default: { - $length = $this->eat8(); - break; - } - } - if ($length == 0) { - return 0; - } - if ($length < 0) { - return -1; - } - $this->dataStr = substr($this->dataStr, $length); - } - return 0; - } - - /** - * toUpper - */ - protected function toUpper() { - $stringLen = strlen($this->dataStr); - $p = 0; - while ($p < $stringLen) { - $mode = $this->identifyMode(substr($this->dataStr, $p), $this->hint); - if ($mode == QR_MODE_KJ) { - $p += 2; - } else { - if ((ord($this->dataStr[$p]) >= ord('a')) AND (ord($this->dataStr[$p]) <= ord('z'))) { - $this->dataStr[$p] = chr(ord($this->dataStr[$p]) - 32); - } - $p++; - } - } - return $this->dataStr; - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRinputItem - - /** - * newInputItem - * @param $mode (int) - * @param $size (int) - * @param $data (array) - * @param $bstream (array) - * @return array input item - */ - protected function newInputItem($mode, $size, $data, $bstream=null) { - $setData = array_slice($data, 0, $size); - if (count($setData) < $size) { - $setData = array_merge($setData, array_fill(0, ($size - count($setData)), 0)); - } - if (!$this->check($mode, $size, $setData)) { - return NULL; - } - $inputitem = array(); - $inputitem['mode'] = $mode; - $inputitem['size'] = $size; - $inputitem['data'] = $setData; - $inputitem['bstream'] = $bstream; - return $inputitem; - } - - /** - * encodeModeNum - * @param $inputitem (array) - * @param $version (int) - * @return array input item - */ - protected function encodeModeNum($inputitem, $version) { - $words = (int)($inputitem['size'] / 3); - $inputitem['bstream'] = array(); - $val = 0x1; - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, $val); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], $this->lengthIndicator(QR_MODE_NM, $version), $inputitem['size']); - for ($i=0; $i < $words; ++$i) { - $val = (ord($inputitem['data'][$i*3 ]) - ord('0')) * 100; - $val += (ord($inputitem['data'][$i*3+1]) - ord('0')) * 10; - $val += (ord($inputitem['data'][$i*3+2]) - ord('0')); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 10, $val); - } - if ($inputitem['size'] - $words * 3 == 1) { - $val = ord($inputitem['data'][$words*3]) - ord('0'); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, $val); - } elseif (($inputitem['size'] - ($words * 3)) == 2) { - $val = (ord($inputitem['data'][$words*3 ]) - ord('0')) * 10; - $val += (ord($inputitem['data'][$words*3+1]) - ord('0')); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 7, $val); - } - return $inputitem; - } - - /** - * encodeModeAn - * @param $inputitem (array) - * @param $version (int) - * @return array input item - */ - protected function encodeModeAn($inputitem, $version) { - $words = (int)($inputitem['size'] / 2); - $inputitem['bstream'] = array(); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, 0x02); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], $this->lengthIndicator(QR_MODE_AN, $version), $inputitem['size']); - for ($i=0; $i < $words; ++$i) { - $val = (int)($this->lookAnTable(ord($inputitem['data'][$i*2])) * 45); - $val += (int)($this->lookAnTable(ord($inputitem['data'][($i*2)+1]))); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 11, $val); - } - if ($inputitem['size'] & 1) { - $val = $this->lookAnTable(ord($inputitem['data'][($words * 2)])); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 6, $val); - } - return $inputitem; - } - - /** - * encodeMode8 - * @param $inputitem (array) - * @param $version (int) - * @return array input item - */ - protected function encodeMode8($inputitem, $version) { - $inputitem['bstream'] = array(); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, 0x4); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], $this->lengthIndicator(QR_MODE_8B, $version), $inputitem['size']); - for ($i=0; $i < $inputitem['size']; ++$i) { - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 8, ord($inputitem['data'][$i])); - } - return $inputitem; - } - - /** - * encodeModeKanji - * @param $inputitem (array) - * @param $version (int) - * @return array input item - */ - protected function encodeModeKanji($inputitem, $version) { - $inputitem['bstream'] = array(); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, 0x8); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], $this->lengthIndicator(QR_MODE_KJ, $version), (int)($inputitem['size'] / 2)); - for ($i=0; $i<$inputitem['size']; $i+=2) { - $val = (ord($inputitem['data'][$i]) << 8) | ord($inputitem['data'][$i+1]); - if ($val <= 0x9ffc) { - $val -= 0x8140; - } else { - $val -= 0xc140; - } - $h = ($val >> 8) * 0xc0; - $val = ($val & 0xff) + $h; - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 13, $val); - } - return $inputitem; - } - - /** - * encodeModeStructure - * @param $inputitem (array) - * @return array input item - */ - protected function encodeModeStructure($inputitem) { - $inputitem['bstream'] = array(); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, 0x03); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, ord($inputitem['data'][1]) - 1); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, ord($inputitem['data'][0]) - 1); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 8, ord($inputitem['data'][2])); - return $inputitem; - } - - /** - * encodeBitStream - * @param $inputitem (array) - * @param $version (int) - * @return array input item - */ - protected function encodeBitStream($inputitem, $version) { - $inputitem['bstream'] = array(); - $words = $this->maximumWords($inputitem['mode'], $version); - if ($inputitem['size'] > $words) { - $st1 = $this->newInputItem($inputitem['mode'], $words, $inputitem['data']); - $st2 = $this->newInputItem($inputitem['mode'], $inputitem['size'] - $words, array_slice($inputitem['data'], $words)); - $st1 = $this->encodeBitStream($st1, $version); - $st2 = $this->encodeBitStream($st2, $version); - $inputitem['bstream'] = array(); - $inputitem['bstream'] = $this->appendBitstream($inputitem['bstream'], $st1['bstream']); - $inputitem['bstream'] = $this->appendBitstream($inputitem['bstream'], $st2['bstream']); - } else { - switch($inputitem['mode']) { - case QR_MODE_NM: { - $inputitem = $this->encodeModeNum($inputitem, $version); - break; - } - case QR_MODE_AN: { - $inputitem = $this->encodeModeAn($inputitem, $version); - break; - } - case QR_MODE_8B: { - $inputitem = $this->encodeMode8($inputitem, $version); - break; - } - case QR_MODE_KJ: { - $inputitem = $this->encodeModeKanji($inputitem, $version); - break; - } - case QR_MODE_ST: { - $inputitem = $this->encodeModeStructure($inputitem); - break; - } - default: { - break; - } - } - } - return $inputitem; - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRinput - - /** - * Append data to an input object. - * The data is copied and appended to the input object. - * @param $items (arrray) input items - * @param $mode (int) encoding mode. - * @param $size (int) size of data (byte). - * @param $data (array) array of input data. - * @return items - * - */ - protected function appendNewInputItem($items, $mode, $size, $data) { - $newitem = $this->newInputItem($mode, $size, $data); - if (!empty($newitem)) { - $items[] = $newitem; - } - return $items; - } - - /** - * insertStructuredAppendHeader - * @param $items (array) - * @param $size (int) - * @param $index (int) - * @param $parity (int) - * @return array items - */ - protected function insertStructuredAppendHeader($items, $size, $index, $parity) { - if ($size > MAX_STRUCTURED_SYMBOLS) { - return -1; - } - if (($index <= 0) OR ($index > MAX_STRUCTURED_SYMBOLS)) { - return -1; - } - $buf = array($size, $index, $parity); - $entry = $this->newInputItem(QR_MODE_ST, 3, buf); - array_unshift($items, $entry); - return $items; - } - - /** - * calcParity - * @param $items (array) - * @return int parity - */ - protected function calcParity($items) { - $parity = 0; - foreach ($items as $item) { - if ($item['mode'] != QR_MODE_ST) { - for ($i=$item['size']-1; $i>=0; --$i) { - $parity ^= $item['data'][$i]; - } - } - } - return $parity; - } - - /** - * checkModeNum - * @param $size (int) - * @param $data (array) - * @return boolean true or false - */ - protected function checkModeNum($size, $data) { - for ($i=0; $i<$size; ++$i) { - if ((ord($data[$i]) < ord('0')) OR (ord($data[$i]) > ord('9'))){ - return false; - } - } - return true; - } - - /** - * Look up the alphabet-numeric convesion table (see JIS X0510:2004, pp.19). - * @param $c (int) character value - * @return value - */ - protected function lookAnTable($c) { - return (($c > 127)?-1:$this->anTable[$c]); - } - - /** - * checkModeAn - * @param $size (int) - * @param $data (array) - * @return boolean true or false - */ - protected function checkModeAn($size, $data) { - for ($i=0; $i<$size; ++$i) { - if ($this->lookAnTable(ord($data[$i])) == -1) { - return false; - } - } - return true; - } - - /** - * estimateBitsModeNum - * @param $size (int) - * @return int number of bits - */ - protected function estimateBitsModeNum($size) { - $w = (int)($size / 3); - $bits = ($w * 10); - switch($size - ($w * 3)) { - case 1: { - $bits += 4; - break; - } - case 2: { - $bits += 7; - break; - } - } - return $bits; - } - - /** - * estimateBitsModeAn - * @param $size (int) - * @return int number of bits - */ - protected function estimateBitsModeAn($size) { - $bits = (int)($size * 5.5); // (size / 2 ) * 11 - if ($size & 1) { - $bits += 6; - } - return $bits; - } - - /** - * estimateBitsMode8 - * @param $size (int) - * @return int number of bits - */ - protected function estimateBitsMode8($size) { - return (int)($size * 8); - } - - /** - * estimateBitsModeKanji - * @param $size (int) - * @return int number of bits - */ - protected function estimateBitsModeKanji($size) { - return (int)($size * 6.5); // (size / 2 ) * 13 - } - - /** - * checkModeKanji - * @param $size (int) - * @param $data (array) - * @return boolean true or false - */ - protected function checkModeKanji($size, $data) { - if ($size & 1) { - return false; - } - for ($i=0; $i<$size; $i+=2) { - $val = (ord($data[$i]) << 8) | ord($data[$i+1]); - if (($val < 0x8140) OR (($val > 0x9ffc) AND ($val < 0xe040)) OR ($val > 0xebbf)) { - return false; - } - } - return true; - } - - /** - * Validate the input data. - * @param $mode (int) encoding mode. - * @param $size (int) size of data (byte). - * @param $data (array) data to validate - * @return boolean true in case of valid data, false otherwise - */ - protected function check($mode, $size, $data) { - if ($size <= 0) { - return false; - } - switch($mode) { - case QR_MODE_NM: { - return $this->checkModeNum($size, $data); - } - case QR_MODE_AN: { - return $this->checkModeAn($size, $data); - } - case QR_MODE_KJ: { - return $this->checkModeKanji($size, $data); - } - case QR_MODE_8B: { - return true; - } - case QR_MODE_ST: { - return true; - } - default: { - break; - } - } - return false; - } - - /** - * estimateBitStreamSize - * @param $items (array) - * @param $version (int) - * @return int bits - */ - protected function estimateBitStreamSize($items, $version) { - $bits = 0; - if ($version == 0) { - $version = 1; - } - foreach ($items as $item) { - switch($item['mode']) { - case QR_MODE_NM: { - $bits = $this->estimateBitsModeNum($item['size']); - break; - } - case QR_MODE_AN: { - $bits = $this->estimateBitsModeAn($item['size']); - break; - } - case QR_MODE_8B: { - $bits = $this->estimateBitsMode8($item['size']); - break; - } - case QR_MODE_KJ: { - $bits = $this->estimateBitsModeKanji($item['size']); - break; - } - case QR_MODE_ST: { - return STRUCTURE_HEADER_BITS; - } - default: { - return 0; - } - } - $l = $this->lengthIndicator($item['mode'], $version); - $m = 1 << $l; - $num = (int)(($item['size'] + $m - 1) / $m); - $bits += $num * (4 + $l); - } - return $bits; - } - - /** - * estimateVersion - * @param $items (array) - * @return int version - */ - protected function estimateVersion($items) { - $version = 0; - $prev = 0; - do { - $prev = $version; - $bits = $this->estimateBitStreamSize($items, $prev); - $version = $this->getMinimumVersion((int)(($bits + 7) / 8), $this->level); - if ($version < 0) { - return -1; - } - } while ($version > $prev); - return $version; - } - - /** - * lengthOfCode - * @param $mode (int) - * @param $version (int) - * @param $bits (int) - * @return int size - */ - protected function lengthOfCode($mode, $version, $bits) { - $payload = $bits - 4 - $this->lengthIndicator($mode, $version); - switch($mode) { - case QR_MODE_NM: { - $chunks = (int)($payload / 10); - $remain = $payload - $chunks * 10; - $size = $chunks * 3; - if ($remain >= 7) { - $size += 2; - } elseif ($remain >= 4) { - $size += 1; - } - break; - } - case QR_MODE_AN: { - $chunks = (int)($payload / 11); - $remain = $payload - $chunks * 11; - $size = $chunks * 2; - if ($remain >= 6) { - ++$size; - } - break; - } - case QR_MODE_8B: { - $size = (int)($payload / 8); - break; - } - case QR_MODE_KJ: { - $size = (int)(($payload / 13) * 2); - break; - } - case QR_MODE_ST: { - $size = (int)($payload / 8); - break; - } - default: { - $size = 0; - break; - } - } - $maxsize = $this->maximumWords($mode, $version); - if ($size < 0) { - $size = 0; - } - if ($size > $maxsize) { - $size = $maxsize; - } - return $size; - } - - /** - * createBitStream - * @param $items (array) - * @return array of items and total bits - */ - protected function createBitStream($items) { - $total = 0; - foreach ($items as $key => $item) { - $items[$key] = $this->encodeBitStream($item, $this->version); - $bits = count($items[$key]['bstream']); - $total += $bits; - } - return array($items, $total); - } - - /** - * convertData - * @param $items (array) - * @return array items - */ - protected function convertData($items) { - $ver = $this->estimateVersion($items); - if ($ver > $this->version) { - $this->version = $ver; - } - while (true) { - $cbs = $this->createBitStream($items); - $items = $cbs[0]; - $bits = $cbs[1]; - if ($bits < 0) { - return -1; - } - $ver = $this->getMinimumVersion((int)(($bits + 7) / 8), $this->level); - if ($ver < 0) { - return -1; - } elseif ($ver > $this->version) { - $this->version = $ver; - } else { - break; - } - } - return $items; - } - - /** - * Append Padding Bit to bitstream - * @param $bstream (array) - * @return array bitstream - */ - protected function appendPaddingBit($bstream) { - if (is_null($bstream)) { - return null; - } - $bits = count($bstream); - $maxwords = $this->getDataLength($this->version, $this->level); - $maxbits = $maxwords * 8; - if ($maxbits == $bits) { - return $bstream; - } - if ($maxbits - $bits < 5) { - return $this->appendNum($bstream, $maxbits - $bits, 0); - } - $bits += 4; - $words = (int)(($bits + 7) / 8); - $padding = array(); - $padding = $this->appendNum($padding, $words * 8 - $bits + 4, 0); - $padlen = $maxwords - $words; - if ($padlen > 0) { - $padbuf = array(); - for ($i=0; $i<$padlen; ++$i) { - $padbuf[$i] = ($i&1)?0x11:0xec; - } - $padding = $this->appendBytes($padding, $padlen, $padbuf); - } - return $this->appendBitstream($bstream, $padding); - } - - /** - * mergeBitStream - * @param $items (array) items - * @return array bitstream - */ - protected function mergeBitStream($items) { - $items = $this->convertData($items); - if (!is_array($items)) { - return null; - } - $bstream = array(); - foreach ($items as $item) { - $bstream = $this->appendBitstream($bstream, $item['bstream']); - } - return $bstream; - } - - /** - * Returns a stream of bits. - * @param $items (int) - * @return array padded merged byte stream - */ - protected function getBitStream($items) { - $bstream = $this->mergeBitStream($items); - return $this->appendPaddingBit($bstream); - } - - /** - * Pack all bit streams padding bits into a byte array. - * @param $items (int) - * @return array padded merged byte stream - */ - protected function getByteStream($items) { - $bstream = $this->getBitStream($items); - return $this->bitstreamToByte($bstream); - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRbitstream - - /** - * Return an array with zeros - * @param $setLength (int) array size - * @return array - */ - protected function allocate($setLength) { - return array_fill(0, $setLength, 0); - } - - /** - * Return new bitstream from number - * @param $bits (int) number of bits - * @param $num (int) number - * @return array bitstream - */ - protected function newFromNum($bits, $num) { - $bstream = $this->allocate($bits); - $mask = 1 << ($bits - 1); - for ($i=0; $i<$bits; ++$i) { - if ($num & $mask) { - $bstream[$i] = 1; - } else { - $bstream[$i] = 0; - } - $mask = $mask >> 1; - } - return $bstream; - } - - /** - * Return new bitstream from bytes - * @param $size (int) size - * @param $data (array) bytes - * @return array bitstream - */ - protected function newFromBytes($size, $data) { - $bstream = $this->allocate($size * 8); - $p=0; - for ($i=0; $i<$size; ++$i) { - $mask = 0x80; - for ($j=0; $j<8; ++$j) { - if ($data[$i] & $mask) { - $bstream[$p] = 1; - } else { - $bstream[$p] = 0; - } - $p++; - $mask = $mask >> 1; - } - } - return $bstream; - } - - /** - * Append one bitstream to another - * @param $bitstream (array) original bitstream - * @param $append (array) bitstream to append - * @return array bitstream - */ - protected function appendBitstream($bitstream, $append) { - if ((!is_array($append)) OR (count($append) == 0)) { - return $bitstream; - } - if (count($bitstream) == 0) { - return $append; - } - return array_values(array_merge($bitstream, $append)); - } - - /** - * Append one bitstream created from number to another - * @param $bitstream (array) original bitstream - * @param $bits (int) number of bits - * @param $num (int) number - * @return array bitstream - */ - protected function appendNum($bitstream, $bits, $num) { - if ($bits == 0) { - return 0; - } - $b = $this->newFromNum($bits, $num); - return $this->appendBitstream($bitstream, $b); - } - - /** - * Append one bitstream created from bytes to another - * @param $bitstream (array) original bitstream - * @param $size (int) size - * @param $data (array) bytes - * @return array bitstream - */ - protected function appendBytes($bitstream, $size, $data) { - if ($size == 0) { - return 0; - } - $b = $this->newFromBytes($size, $data); - return $this->appendBitstream($bitstream, $b); - } - - /** - * Convert bitstream to bytes - * @param $bstream (array) original bitstream - * @return array of bytes - */ - protected function bitstreamToByte($bstream) { - if (is_null($bstream)) { - return null; - } - $size = count($bstream); - if ($size == 0) { - return array(); - } - $data = array_fill(0, (int)(($size + 7) / 8), 0); - $bytes = (int)($size / 8); - $p = 0; - for ($i=0; $i<$bytes; $i++) { - $v = 0; - for ($j=0; $j<8; $j++) { - $v = $v << 1; - $v |= $bstream[$p]; - $p++; - } - $data[$i] = $v; - } - if ($size & 7) { - $v = 0; - for ($j=0; $j<($size & 7); $j++) { - $v = $v << 1; - $v |= $bstream[$p]; - $p++; - } - $data[$bytes] = $v; - } - return $data; - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRspec - - /** - * Replace a value on the array at the specified position - * @param $srctab (array) - * @param $x (int) X position - * @param $y (int) Y position - * @param $repl (string) value to replace - * @param $replLen (int) length of the repl string - * @return array srctab - */ - protected function qrstrset($srctab, $x, $y, $repl, $replLen=false) { - $srctab[$y] = substr_replace($srctab[$y], ($replLen !== false)?substr($repl,0,$replLen):$repl, $x, ($replLen !== false)?$replLen:strlen($repl)); - return $srctab; - } - - /** - * Return maximum data code length (bytes) for the version. - * @param $version (int) version - * @param $level (int) error correction level - * @return int maximum size (bytes) - */ - protected function getDataLength($version, $level) { - return $this->capacity[$version][QRCAP_WORDS] - $this->capacity[$version][QRCAP_EC][$level]; - } - - /** - * Return maximum error correction code length (bytes) for the version. - * @param $version (int) version - * @param $level (int) error correction level - * @return int ECC size (bytes) - */ - protected function getECCLength($version, $level){ - return $this->capacity[$version][QRCAP_EC][$level]; - } - - /** - * Return the width of the symbol for the version. - * @param $version (int) version - * @return int width - */ - protected function getWidth($version) { - return $this->capacity[$version][QRCAP_WIDTH]; - } - - /** - * Return the numer of remainder bits. - * @param $version (int) version - * @return int number of remainder bits - */ - protected function getRemainder($version) { - return $this->capacity[$version][QRCAP_REMINDER]; - } - - /** - * Return a version number that satisfies the input code length. - * @param $size (int) input code length (bytes) - * @param $level (int) error correction level - * @return int version number - */ - protected function getMinimumVersion($size, $level) { - for ($i = 1; $i <= QRSPEC_VERSION_MAX; ++$i) { - $words = ($this->capacity[$i][QRCAP_WORDS] - $this->capacity[$i][QRCAP_EC][$level]); - if ($words >= $size) { - return $i; - } - } - // the size of input data is greater than QR capacity, try to lover the error correction mode - return -1; - } - - /** - * Return the size of length indicator for the mode and version. - * @param $mode (int) encoding mode - * @param $version (int) version - * @return int the size of the appropriate length indicator (bits). - */ - protected function lengthIndicator($mode, $version) { - if ($mode == QR_MODE_ST) { - return 0; - } - if ($version <= 9) { - $l = 0; - } elseif ($version <= 26) { - $l = 1; - } else { - $l = 2; - } - return $this->lengthTableBits[$mode][$l]; - } - - /** - * Return the maximum length for the mode and version. - * @param $mode (int) encoding mode - * @param $version (int) version - * @return int the maximum length (bytes) - */ - protected function maximumWords($mode, $version) { - if ($mode == QR_MODE_ST) { - return 3; - } - if ($version <= 9) { - $l = 0; - } else if ($version <= 26) { - $l = 1; - } else { - $l = 2; - } - $bits = $this->lengthTableBits[$mode][$l]; - $words = (1 << $bits) - 1; - if ($mode == QR_MODE_KJ) { - $words *= 2; // the number of bytes is required - } - return $words; - } - - /** - * Return an array of ECC specification. - * @param $version (int) version - * @param $level (int) error correction level - * @param $spec (array) an array of ECC specification contains as following: {# of type1 blocks, # of data code, # of ecc code, # of type2 blocks, # of data code} - * @return array spec - */ - protected function getEccSpec($version, $level, $spec) { - if (count($spec) < 5) { - $spec = array(0, 0, 0, 0, 0); - } - $b1 = $this->eccTable[$version][$level][0]; - $b2 = $this->eccTable[$version][$level][1]; - $data = $this->getDataLength($version, $level); - $ecc = $this->getECCLength($version, $level); - if ($b2 == 0) { - $spec[0] = $b1; - $spec[1] = (int)($data / $b1); - $spec[2] = (int)($ecc / $b1); - $spec[3] = 0; - $spec[4] = 0; - } else { - $spec[0] = $b1; - $spec[1] = (int)($data / ($b1 + $b2)); - $spec[2] = (int)($ecc / ($b1 + $b2)); - $spec[3] = $b2; - $spec[4] = $spec[1] + 1; - } - return $spec; - } - - /** - * Put an alignment marker. - * @param $frame (array) frame - * @param $ox (int) X center coordinate of the pattern - * @param $oy (int) Y center coordinate of the pattern - * @return array frame - */ - protected function putAlignmentMarker($frame, $ox, $oy) { - $finder = array( - "\xa1\xa1\xa1\xa1\xa1", - "\xa1\xa0\xa0\xa0\xa1", - "\xa1\xa0\xa1\xa0\xa1", - "\xa1\xa0\xa0\xa0\xa1", - "\xa1\xa1\xa1\xa1\xa1" - ); - $yStart = $oy - 2; - $xStart = $ox - 2; - for ($y=0; $y < 5; $y++) { - $frame = $this->qrstrset($frame, $xStart, $yStart+$y, $finder[$y]); - } - return $frame; - } - - /** - * Put an alignment pattern. - * @param $version (int) version - * @param $frame (array) frame - * @param $width (int) width - * @return array frame - */ - protected function putAlignmentPattern($version, $frame, $width) { - if ($version < 2) { - return $frame; - } - $d = $this->alignmentPattern[$version][1] - $this->alignmentPattern[$version][0]; - if ($d < 0) { - $w = 2; - } else { - $w = (int)(($width - $this->alignmentPattern[$version][0]) / $d + 2); - } - if ($w * $w - 3 == 1) { - $x = $this->alignmentPattern[$version][0]; - $y = $this->alignmentPattern[$version][0]; - $frame = $this->putAlignmentMarker($frame, $x, $y); - return $frame; - } - $cx = $this->alignmentPattern[$version][0]; - $wo = $w - 1; - for ($x=1; $x < $wo; ++$x) { - $frame = $this->putAlignmentMarker($frame, 6, $cx); - $frame = $this->putAlignmentMarker($frame, $cx, 6); - $cx += $d; - } - $cy = $this->alignmentPattern[$version][0]; - for ($y=0; $y < $wo; ++$y) { - $cx = $this->alignmentPattern[$version][0]; - for ($x=0; $x < $wo; ++$x) { - $frame = $this->putAlignmentMarker($frame, $cx, $cy); - $cx += $d; - } - $cy += $d; - } - return $frame; - } - - /** - * Return BCH encoded version information pattern that is used for the symbol of version 7 or greater. Use lower 18 bits. - * @param $version (int) version - * @return BCH encoded version information pattern - */ - protected function getVersionPattern($version) { - if (($version < 7) OR ($version > QRSPEC_VERSION_MAX)) { - return 0; - } - return $this->versionPattern[($version - 7)]; - } - - /** - * Return BCH encoded format information pattern. - * @param $mask (array) - * @param $level (int) error correction level - * @return BCH encoded format information pattern - */ - protected function getFormatInfo($mask, $level) { - if (($mask < 0) OR ($mask > 7)) { - return 0; - } - if (($level < 0) OR ($level > 3)) { - return 0; - } - return $this->formatInfo[$level][$mask]; - } - - /** - * Put a finder pattern. - * @param $frame (array) frame - * @param $ox (int) X center coordinate of the pattern - * @param $oy (int) Y center coordinate of the pattern - * @return array frame - */ - protected function putFinderPattern($frame, $ox, $oy) { - $finder = array( - "\xc1\xc1\xc1\xc1\xc1\xc1\xc1", - "\xc1\xc0\xc0\xc0\xc0\xc0\xc1", - "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", - "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", - "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", - "\xc1\xc0\xc0\xc0\xc0\xc0\xc1", - "\xc1\xc1\xc1\xc1\xc1\xc1\xc1" - ); - for ($y=0; $y < 7; $y++) { - $frame = $this->qrstrset($frame, $ox, ($oy + $y), $finder[$y]); - } - return $frame; - } - - /** - * Return a copy of initialized frame. - * @param $version (int) version - * @return Array of unsigned char. - */ - protected function createFrame($version) { - $width = $this->capacity[$version][QRCAP_WIDTH]; - $frameLine = str_repeat ("\0", $width); - $frame = array_fill(0, $width, $frameLine); - // Finder pattern - $frame = $this->putFinderPattern($frame, 0, 0); - $frame = $this->putFinderPattern($frame, $width - 7, 0); - $frame = $this->putFinderPattern($frame, 0, $width - 7); - // Separator - $yOffset = $width - 7; - for ($y=0; $y < 7; ++$y) { - $frame[$y][7] = "\xc0"; - $frame[$y][$width - 8] = "\xc0"; - $frame[$yOffset][7] = "\xc0"; - ++$yOffset; - } - $setPattern = str_repeat("\xc0", 8); - $frame = $this->qrstrset($frame, 0, 7, $setPattern); - $frame = $this->qrstrset($frame, $width-8, 7, $setPattern); - $frame = $this->qrstrset($frame, 0, $width - 8, $setPattern); - // Format info - $setPattern = str_repeat("\x84", 9); - $frame = $this->qrstrset($frame, 0, 8, $setPattern); - $frame = $this->qrstrset($frame, $width - 8, 8, $setPattern, 8); - $yOffset = $width - 8; - for ($y=0; $y < 8; ++$y,++$yOffset) { - $frame[$y][8] = "\x84"; - $frame[$yOffset][8] = "\x84"; - } - // Timing pattern - $wo = $width - 15; - for ($i=1; $i < $wo; ++$i) { - $frame[6][7+$i] = chr(0x90 | ($i & 1)); - $frame[7+$i][6] = chr(0x90 | ($i & 1)); - } - // Alignment pattern - $frame = $this->putAlignmentPattern($version, $frame, $width); - // Version information - if ($version >= 7) { - $vinf = $this->getVersionPattern($version); - $v = $vinf; - for ($x=0; $x<6; ++$x) { - for ($y=0; $y<3; ++$y) { - $frame[($width - 11)+$y][$x] = chr(0x88 | ($v & 1)); - $v = $v >> 1; - } - } - $v = $vinf; - for ($y=0; $y<6; ++$y) { - for ($x=0; $x<3; ++$x) { - $frame[$y][$x+($width - 11)] = chr(0x88 | ($v & 1)); - $v = $v >> 1; - } - } - } - // and a little bit... - $frame[$width - 8][8] = "\x81"; - return $frame; - } - - /** - * Set new frame for the specified version. - * @param $version (int) version - * @return Array of unsigned char. - */ - protected function newFrame($version) { - if (($version < 1) OR ($version > QRSPEC_VERSION_MAX)) { - return NULL; - } - if (!isset($this->frames[$version])) { - $this->frames[$version] = $this->createFrame($version); - } - if (is_null($this->frames[$version])) { - return NULL; - } - return $this->frames[$version]; - } - - /** - * Return block number 0 - * @param $spec (array) - * @return int value - */ - protected function rsBlockNum($spec) { - return ($spec[0] + $spec[3]); - } - - /** - * Return block number 1 - * @param $spec (array) - * @return int value - */ - protected function rsBlockNum1($spec) { - return $spec[0]; - } - - /** - * Return data codes 1 - * @param $spec (array) - * @return int value - */ - protected function rsDataCodes1($spec) { - return $spec[1]; - } - - /** - * Return ecc codes 1 - * @param $spec (array) - * @return int value - */ - protected function rsEccCodes1($spec) { - return $spec[2]; - } - - /** - * Return block number 2 - * @param $spec (array) - * @return int value - */ - protected function rsBlockNum2($spec) { - return $spec[3]; - } - - /** - * Return data codes 2 - * @param $spec (array) - * @return int value - */ - protected function rsDataCodes2($spec) { - return $spec[4]; - } - - /** - * Return ecc codes 2 - * @param $spec (array) - * @return int value - */ - protected function rsEccCodes2($spec) { - return $spec[2]; - } - - /** - * Return data length - * @param $spec (array) - * @return int value - */ - protected function rsDataLength($spec) { - return ($spec[0] * $spec[1]) + ($spec[3] * $spec[4]); - } - - /** - * Return ecc length - * @param $spec (array) - * @return int value - */ - protected function rsEccLength($spec) { - return ($spec[0] + $spec[3]) * $spec[2]; - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRrs - - /** - * Initialize a Reed-Solomon codec and add it to existing rsitems - * @param $symsize (int) symbol size, bits - * @param $gfpoly (int) Field generator polynomial coefficients - * @param $fcr (int) first root of RS code generator polynomial, index form - * @param $prim (int) primitive element to generate polynomial roots - * @param $nroots (int) RS code generator polynomial degree (number of roots) - * @param $pad (int) padding bytes at front of shortened block - * @return array Array of RS values:
        • mm = Bits per symbol;
        • nn = Symbols per block;
        • alpha_to = log lookup table array;
        • index_of = Antilog lookup table array;
        • genpoly = Generator polynomial array;
        • nroots = Number of generator;
        • roots = number of parity symbols;
        • fcr = First consecutive root, index form;
        • prim = Primitive element, index form;
        • iprim = prim-th root of 1, index form;
        • pad = Padding bytes in shortened block;
        • gfpoly
        . - */ - protected function init_rs($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) { - foreach ($this->rsitems as $rs) { - if (($rs['pad'] != $pad) OR ($rs['nroots'] != $nroots) OR ($rs['mm'] != $symsize) - OR ($rs['gfpoly'] != $gfpoly) OR ($rs['fcr'] != $fcr) OR ($rs['prim'] != $prim)) { - continue; - } - return $rs; - } - $rs = $this->init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad); - array_unshift($this->rsitems, $rs); - return $rs; - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRrsItem - - /** - * modnn - * @param $rs (array) RS values - * @param $x (int) X position - * @return int X osition - */ - protected function modnn($rs, $x) { - while ($x >= $rs['nn']) { - $x -= $rs['nn']; - $x = ($x >> $rs['mm']) + ($x & $rs['nn']); - } - return $x; - } - - /** - * Initialize a Reed-Solomon codec and returns an array of values. - * @param $symsize (int) symbol size, bits - * @param $gfpoly (int) Field generator polynomial coefficients - * @param $fcr (int) first root of RS code generator polynomial, index form - * @param $prim (int) primitive element to generate polynomial roots - * @param $nroots (int) RS code generator polynomial degree (number of roots) - * @param $pad (int) padding bytes at front of shortened block - * @return array Array of RS values:
        • mm = Bits per symbol;
        • nn = Symbols per block;
        • alpha_to = log lookup table array;
        • index_of = Antilog lookup table array;
        • genpoly = Generator polynomial array;
        • nroots = Number of generator;
        • roots = number of parity symbols;
        • fcr = First consecutive root, index form;
        • prim = Primitive element, index form;
        • iprim = prim-th root of 1, index form;
        • pad = Padding bytes in shortened block;
        • gfpoly
        . - */ - protected function init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) { - // Based on Reed solomon encoder by Phil Karn, KA9Q (GNU-LGPLv2) - $rs = null; - // Check parameter ranges - if (($symsize < 0) OR ($symsize > 8)) { - return $rs; - } - if (($fcr < 0) OR ($fcr >= (1<<$symsize))) { - return $rs; - } - if (($prim <= 0) OR ($prim >= (1<<$symsize))) { - return $rs; - } - if (($nroots < 0) OR ($nroots >= (1<<$symsize))) { - return $rs; - } - if (($pad < 0) OR ($pad >= ((1<<$symsize) -1 - $nroots))) { - return $rs; - } - $rs = array(); - $rs['mm'] = $symsize; - $rs['nn'] = (1 << $symsize) - 1; - $rs['pad'] = $pad; - $rs['alpha_to'] = array_fill(0, ($rs['nn'] + 1), 0); - $rs['index_of'] = array_fill(0, ($rs['nn'] + 1), 0); - // PHP style macro replacement ;) - $NN =& $rs['nn']; - $A0 =& $NN; - // Generate Galois field lookup tables - $rs['index_of'][0] = $A0; // log(zero) = -inf - $rs['alpha_to'][$A0] = 0; // alpha**-inf = 0 - $sr = 1; - for ($i=0; $i<$rs['nn']; ++$i) { - $rs['index_of'][$sr] = $i; - $rs['alpha_to'][$i] = $sr; - $sr <<= 1; - if ($sr & (1 << $symsize)) { - $sr ^= $gfpoly; - } - $sr &= $rs['nn']; - } - if ($sr != 1) { - // field generator polynomial is not primitive! - return NULL; - } - // Form RS code generator polynomial from its roots - $rs['genpoly'] = array_fill(0, ($nroots + 1), 0); - $rs['fcr'] = $fcr; - $rs['prim'] = $prim; - $rs['nroots'] = $nroots; - $rs['gfpoly'] = $gfpoly; - // Find prim-th root of 1, used in decoding - for ($iprim=1; ($iprim % $prim) != 0; $iprim += $rs['nn']) { - ; // intentional empty-body loop! - } - $rs['iprim'] = (int)($iprim / $prim); - $rs['genpoly'][0] = 1; - for ($i = 0,$root=$fcr*$prim; $i < $nroots; $i++, $root += $prim) { - $rs['genpoly'][$i+1] = 1; - // Multiply rs->genpoly[] by @**(root + x) - for ($j = $i; $j > 0; --$j) { - if ($rs['genpoly'][$j] != 0) { - $rs['genpoly'][$j] = $rs['genpoly'][$j-1] ^ $rs['alpha_to'][$this->modnn($rs, $rs['index_of'][$rs['genpoly'][$j]] + $root)]; - } else { - $rs['genpoly'][$j] = $rs['genpoly'][$j-1]; - } - } - // rs->genpoly[0] can never be zero - $rs['genpoly'][0] = $rs['alpha_to'][$this->modnn($rs, $rs['index_of'][$rs['genpoly'][0]] + $root)]; - } - // convert rs->genpoly[] to index form for quicker encoding - for ($i = 0; $i <= $nroots; ++$i) { - $rs['genpoly'][$i] = $rs['index_of'][$rs['genpoly'][$i]]; - } - return $rs; - } - - /** - * Encode a Reed-Solomon codec and returns the parity array - * @param $rs (array) RS values - * @param $data (array) data - * @param $parity (array) parity - * @return parity array - */ - protected function encode_rs_char($rs, $data, $parity) { - $MM =& $rs['mm']; // bits per symbol - $NN =& $rs['nn']; // the total number of symbols in a RS block - $ALPHA_TO =& $rs['alpha_to']; // the address of an array of NN elements to convert Galois field elements in index (log) form to polynomial form - $INDEX_OF =& $rs['index_of']; // the address of an array of NN elements to convert Galois field elements in polynomial form to index (log) form - $GENPOLY =& $rs['genpoly']; // an array of NROOTS+1 elements containing the generator polynomial in index form - $NROOTS =& $rs['nroots']; // the number of roots in the RS code generator polynomial, which is the same as the number of parity symbols in a block - $FCR =& $rs['fcr']; // first consecutive root, index form - $PRIM =& $rs['prim']; // primitive element, index form - $IPRIM =& $rs['iprim']; // prim-th root of 1, index form - $PAD =& $rs['pad']; // the number of pad symbols in a block - $A0 =& $NN; - $parity = array_fill(0, $NROOTS, 0); - for ($i=0; $i < ($NN - $NROOTS - $PAD); $i++) { - $feedback = $INDEX_OF[$data[$i] ^ $parity[0]]; - if ($feedback != $A0) { - // feedback term is non-zero - // This line is unnecessary when GENPOLY[NROOTS] is unity, as it must - // always be for the polynomials constructed by init_rs() - $feedback = $this->modnn($rs, $NN - $GENPOLY[$NROOTS] + $feedback); - for ($j=1; $j < $NROOTS; ++$j) { - $parity[$j] ^= $ALPHA_TO[$this->modnn($rs, $feedback + $GENPOLY[($NROOTS - $j)])]; - } - } - // Shift - array_shift($parity); - if ($feedback != $A0) { - array_push($parity, $ALPHA_TO[$this->modnn($rs, $feedback + $GENPOLY[0])]); - } else { - array_push($parity, 0); - } - } - return $parity; - } - -} // end QRcode class - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/html/lib/tcpdf/include/sRGB.icc b/html/lib/tcpdf/include/sRGB.icc deleted file mode 100644 index 1d8f7419c3..0000000000 Binary files a/html/lib/tcpdf/include/sRGB.icc and /dev/null differ diff --git a/html/lib/tcpdf/include/tcpdf_fonts.php b/html/lib/tcpdf/include/tcpdf_fonts.php deleted file mode 100644 index 0a19f33014..0000000000 --- a/html/lib/tcpdf/include/tcpdf_fonts.php +++ /dev/null @@ -1,2591 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// Description :Font methods for TCPDF library. -// -//============================================================+ - -/** - * @file - * Unicode data and font methods for TCPDF library. - * @author Nicola Asuni - * @package com.tecnick.tcpdf - */ - -/** - * @class TCPDF_FONTS - * Font methods for TCPDF library. - * @package com.tecnick.tcpdf - * @version 1.1.0 - * @author Nicola Asuni - info@tecnick.com - */ -class TCPDF_FONTS { - - /** - * Static cache used for speed up uniord performances - * @protected - */ - protected static $cache_uniord = array(); - - /** - * Convert and add the selected TrueType or Type1 font to the fonts folder (that must be writeable). - * @param $fontfile (string) Font file (full path). - * @param $fonttype (string) Font type. Leave empty for autodetect mode. Valid values are: TrueTypeUnicode, TrueType, Type1, CID0JP = CID-0 Japanese, CID0KR = CID-0 Korean, CID0CS = CID-0 Chinese Simplified, CID0CT = CID-0 Chinese Traditional. - * @param $enc (string) Name of the encoding table to use. Leave empty for default mode. Omit this parameter for TrueType Unicode and symbolic fonts like Symbol or ZapfDingBats. - * @param $flags (int) Unsigned 32-bit integer containing flags specifying various characteristics of the font (PDF32000:2008 - 9.8.2 Font Descriptor Flags): +1 for fixed font; +4 for symbol or +32 for non-symbol; +64 for italic. Fixed and Italic mode are generally autodetected so you have to set it to 32 = non-symbolic font (default) or 4 = symbolic font. - * @param $outpath (string) Output path for generated font files (must be writeable by the web server). Leave empty for default font folder. - * @param $platid (int) Platform ID for CMAP table to extract (when building a Unicode font for Windows this value should be 3, for Macintosh should be 1). - * @param $encid (int) Encoding ID for CMAP table to extract (when building a Unicode font for Windows this value should be 1, for Macintosh should be 0). When Platform ID is 3, legal values for Encoding ID are: 0=Symbol, 1=Unicode, 2=ShiftJIS, 3=PRC, 4=Big5, 5=Wansung, 6=Johab, 7=Reserved, 8=Reserved, 9=Reserved, 10=UCS-4. - * @param $addcbbox (boolean) If true includes the character bounding box information on the php font file. - * @param $link (boolean) If true link to system font instead of copying the font data (not transportable) - Note: do not work with Type1 fonts. - * @return (string) TCPDF font name or boolean false in case of error. - * @author Nicola Asuni - * @since 5.9.123 (2010-09-30) - * @public static - */ - public static function addTTFfont($fontfile, $fonttype='', $enc='', $flags=32, $outpath='', $platid=3, $encid=1, $addcbbox=false, $link=false) { - if (!file_exists($fontfile)) { - // Could not find file - return false; - } - // font metrics - $fmetric = array(); - // build new font name for TCPDF compatibility - $font_path_parts = pathinfo($fontfile); - if (!isset($font_path_parts['filename'])) { - $font_path_parts['filename'] = substr($font_path_parts['basename'], 0, -(strlen($font_path_parts['extension']) + 1)); - } - $font_name = strtolower($font_path_parts['filename']); - $font_name = preg_replace('/[^a-z0-9_]/', '', $font_name); - $search = array('bold', 'oblique', 'italic', 'regular'); - $replace = array('b', 'i', 'i', ''); - $font_name = str_replace($search, $replace, $font_name); - if (empty($font_name)) { - // set generic name - $font_name = 'tcpdffont'; - } - // set output path - if (empty($outpath)) { - $outpath = self::_getfontpath(); - } - // check if this font already exist - if (@file_exists($outpath.$font_name.'.php')) { - // this font already exist (delete it from fonts folder to rebuild it) - return $font_name; - } - $fmetric['file'] = $font_name; - $fmetric['ctg'] = $font_name.'.ctg.z'; - // get font data - $font = file_get_contents($fontfile); - $fmetric['originalsize'] = strlen($font); - // autodetect font type - if (empty($fonttype)) { - if (TCPDF_STATIC::_getULONG($font, 0) == 0x10000) { - // True Type (Unicode or not) - $fonttype = 'TrueTypeUnicode'; - } elseif (substr($font, 0, 4) == 'OTTO') { - // Open Type (Unicode or not) - //Unsupported font format: OpenType with CFF data - return false; - } else { - // Type 1 - $fonttype = 'Type1'; - } - } - // set font type - switch ($fonttype) { - case 'CID0CT': - case 'CID0CS': - case 'CID0KR': - case 'CID0JP': { - $fmetric['type'] = 'cidfont0'; - break; - } - case 'Type1': { - $fmetric['type'] = 'Type1'; - if (empty($enc) AND (($flags & 4) == 0)) { - $enc = 'cp1252'; - } - break; - } - case 'TrueType': { - $fmetric['type'] = 'TrueType'; - break; - } - case 'TrueTypeUnicode': - default: { - $fmetric['type'] = 'TrueTypeUnicode'; - break; - } - } - // set encoding maps (if any) - $fmetric['enc'] = preg_replace('/[^A-Za-z0-9_\-]/', '', $enc); - $fmetric['diff'] = ''; - if (($fmetric['type'] == 'TrueType') OR ($fmetric['type'] == 'Type1')) { - if (!empty($enc) AND ($enc != 'cp1252') AND isset(TCPDF_FONT_DATA::$encmap[$enc])) { - // build differences from reference encoding - $enc_ref = TCPDF_FONT_DATA::$encmap['cp1252']; - $enc_target = TCPDF_FONT_DATA::$encmap[$enc]; - $last = 0; - for ($i = 32; $i <= 255; ++$i) { - if ($enc_target != $enc_ref[$i]) { - if ($i != ($last + 1)) { - $fmetric['diff'] .= $i.' '; - } - $last = $i; - $fmetric['diff'] .= '/'.$enc_target[$i].' '; - } - } - } - } - // parse the font by type - if ($fmetric['type'] == 'Type1') { - // ---------- TYPE 1 ---------- - // read first segment - $a = unpack('Cmarker/Ctype/Vsize', substr($font, 0, 6)); - if ($a['marker'] != 128) { - // Font file is not a valid binary Type1 - return false; - } - $fmetric['size1'] = $a['size']; - $data = substr($font, 6, $fmetric['size1']); - // read second segment - $a = unpack('Cmarker/Ctype/Vsize', substr($font, (6 + $fmetric['size1']), 6)); - if ($a['marker'] != 128) { - // Font file is not a valid binary Type1 - return false; - } - $fmetric['size2'] = $a['size']; - $encrypted = substr($font, (12 + $fmetric['size1']), $fmetric['size2']); - $data .= $encrypted; - // store compressed font - $fmetric['file'] .= '.z'; - $fp = TCPDF_STATIC::fopenLocal($outpath.$fmetric['file'], 'wb'); - fwrite($fp, gzcompress($data)); - fclose($fp); - // get font info - $fmetric['Flags'] = $flags; - preg_match ('#/FullName[\s]*\(([^\)]*)#', $font, $matches); - $fmetric['name'] = preg_replace('/[^a-zA-Z0-9_\-]/', '', $matches[1]); - preg_match('#/FontBBox[\s]*{([^}]*)#', $font, $matches); - $fmetric['bbox'] = trim($matches[1]); - $bv = explode(' ', $fmetric['bbox']); - $fmetric['Ascent'] = intval($bv[3]); - $fmetric['Descent'] = intval($bv[1]); - preg_match('#/ItalicAngle[\s]*([0-9\+\-]*)#', $font, $matches); - $fmetric['italicAngle'] = intval($matches[1]); - if ($fmetric['italicAngle'] != 0) { - $fmetric['Flags'] |= 64; - } - preg_match('#/UnderlinePosition[\s]*([0-9\+\-]*)#', $font, $matches); - $fmetric['underlinePosition'] = intval($matches[1]); - preg_match('#/UnderlineThickness[\s]*([0-9\+\-]*)#', $font, $matches); - $fmetric['underlineThickness'] = intval($matches[1]); - preg_match('#/isFixedPitch[\s]*([^\s]*)#', $font, $matches); - if ($matches[1] == 'true') { - $fmetric['Flags'] |= 1; - } - // get internal map - $imap = array(); - if (preg_match_all('#dup[\s]([0-9]+)[\s]*/([^\s]*)[\s]put#sU', $font, $fmap, PREG_SET_ORDER) > 0) { - foreach ($fmap as $v) { - $imap[$v[2]] = $v[1]; - } - } - // decrypt eexec encrypted part - $r = 55665; // eexec encryption constant - $c1 = 52845; - $c2 = 22719; - $elen = strlen($encrypted); - $eplain = ''; - for ($i = 0; $i < $elen; ++$i) { - $chr = ord($encrypted[$i]); - $eplain .= chr($chr ^ ($r >> 8)); - $r = ((($chr + $r) * $c1 + $c2) % 65536); - } - if (preg_match('#/ForceBold[\s]*([^\s]*)#', $eplain, $matches) > 0) { - if ($matches[1] == 'true') { - $fmetric['Flags'] |= 0x40000; - } - } - if (preg_match('#/StdVW[\s]*\[([^\]]*)#', $eplain, $matches) > 0) { - $fmetric['StemV'] = intval($matches[1]); - } else { - $fmetric['StemV'] = 70; - } - if (preg_match('#/StdHW[\s]*\[([^\]]*)#', $eplain, $matches) > 0) { - $fmetric['StemH'] = intval($matches[1]); - } else { - $fmetric['StemH'] = 30; - } - if (preg_match('#/BlueValues[\s]*\[([^\]]*)#', $eplain, $matches) > 0) { - $bv = explode(' ', $matches[1]); - if (count($bv) >= 6) { - $v1 = intval($bv[2]); - $v2 = intval($bv[4]); - if ($v1 <= $v2) { - $fmetric['XHeight'] = $v1; - $fmetric['CapHeight'] = $v2; - } else { - $fmetric['XHeight'] = $v2; - $fmetric['CapHeight'] = $v1; - } - } else { - $fmetric['XHeight'] = 450; - $fmetric['CapHeight'] = 700; - } - } else { - $fmetric['XHeight'] = 450; - $fmetric['CapHeight'] = 700; - } - // get the number of random bytes at the beginning of charstrings - if (preg_match('#/lenIV[\s]*([0-9]*)#', $eplain, $matches) > 0) { - $lenIV = intval($matches[1]); - } else { - $lenIV = 4; - } - $fmetric['Leading'] = 0; - // get charstring data - $eplain = substr($eplain, (strpos($eplain, '/CharStrings') + 1)); - preg_match_all('#/([A-Za-z0-9\.]*)[\s][0-9]+[\s]RD[\s](.*)[\s]ND#sU', $eplain, $matches, PREG_SET_ORDER); - if (!empty($enc) AND isset(TCPDF_FONT_DATA::$encmap[$enc])) { - $enc_map = TCPDF_FONT_DATA::$encmap[$enc]; - } else { - $enc_map = false; - } - $fmetric['cw'] = ''; - $fmetric['MaxWidth'] = 0; - $cwidths = array(); - foreach ($matches as $k => $v) { - $cid = 0; - if (isset($imap[$v[1]])) { - $cid = $imap[$v[1]]; - } elseif ($enc_map !== false) { - $cid = array_search($v[1], $enc_map); - if ($cid === false) { - $cid = 0; - } elseif ($cid > 1000) { - $cid -= 1000; - } - } - // decrypt charstring encrypted part - $r = 4330; // charstring encryption constant - $c1 = 52845; - $c2 = 22719; - $cd = $v[2]; - $clen = strlen($cd); - $ccom = array(); - for ($i = 0; $i < $clen; ++$i) { - $chr = ord($cd[$i]); - $ccom[] = ($chr ^ ($r >> 8)); - $r = ((($chr + $r) * $c1 + $c2) % 65536); - } - // decode numbers - $cdec = array(); - $ck = 0; - $i = $lenIV; - while ($i < $clen) { - if ($ccom[$i] < 32) { - $cdec[$ck] = $ccom[$i]; - if (($ck > 0) AND ($cdec[$ck] == 13)) { - // hsbw command: update width - $cwidths[$cid] = $cdec[($ck - 1)]; - } - ++$i; - } elseif (($ccom[$i] >= 32) AND ($ccom[$i] <= 246)) { - $cdec[$ck] = ($ccom[$i] - 139); - ++$i; - } elseif (($ccom[$i] >= 247) AND ($ccom[$i] <= 250)) { - $cdec[$ck] = ((($ccom[$i] - 247) * 256) + $ccom[($i + 1)] + 108); - $i += 2; - } elseif (($ccom[$i] >= 251) AND ($ccom[$i] <= 254)) { - $cdec[$ck] = ((-($ccom[$i] - 251) * 256) - $ccom[($i + 1)] - 108); - $i += 2; - } elseif ($ccom[$i] == 255) { - $sval = chr($ccom[($i + 1)]).chr($ccom[($i + 2)]).chr($ccom[($i + 3)]).chr($ccom[($i + 4)]); - $vsval = unpack('li', $sval); - $cdec[$ck] = $vsval['i']; - $i += 5; - } - ++$ck; - } - } // end for each matches - $fmetric['MissingWidth'] = $cwidths[0]; - $fmetric['MaxWidth'] = $fmetric['MissingWidth']; - $fmetric['AvgWidth'] = 0; - // set chars widths - for ($cid = 0; $cid <= 255; ++$cid) { - if (isset($cwidths[$cid])) { - if ($cwidths[$cid] > $fmetric['MaxWidth']) { - $fmetric['MaxWidth'] = $cwidths[$cid]; - } - $fmetric['AvgWidth'] += $cwidths[$cid]; - $fmetric['cw'] .= ','.$cid.'=>'.$cwidths[$cid]; - } else { - $fmetric['cw'] .= ','.$cid.'=>'.$fmetric['MissingWidth']; - } - } - $fmetric['AvgWidth'] = round($fmetric['AvgWidth'] / count($cwidths)); - } else { - // ---------- TRUE TYPE ---------- - $offset = 0; // offset position of the font data - if (TCPDF_STATIC::_getULONG($font, $offset) != 0x10000) { - // sfnt version must be 0x00010000 for TrueType version 1.0. - return false; - } - if ($fmetric['type'] != 'cidfont0') { - if ($link) { - // creates a symbolic link to the existing font - symlink($fontfile, $outpath.$fmetric['file']); - } else { - // store compressed font - $fmetric['file'] .= '.z'; - $fp = TCPDF_STATIC::fopenLocal($outpath.$fmetric['file'], 'wb'); - fwrite($fp, gzcompress($font)); - fclose($fp); - } - } - $offset += 4; - // get number of tables - $numTables = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - // skip searchRange, entrySelector and rangeShift - $offset += 6; - // tables array - $table = array(); - // ---------- get tables ---------- - for ($i = 0; $i < $numTables; ++$i) { - // get table info - $tag = substr($font, $offset, 4); - $offset += 4; - $table[$tag] = array(); - $table[$tag]['checkSum'] = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - $table[$tag]['offset'] = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - $table[$tag]['length'] = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - } - // check magicNumber - $offset = $table['head']['offset'] + 12; - if (TCPDF_STATIC::_getULONG($font, $offset) != 0x5F0F3CF5) { - // magicNumber must be 0x5F0F3CF5 - return false; - } - $offset += 4; - $offset += 2; // skip flags - // get FUnits - $fmetric['unitsPerEm'] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - // units ratio constant - $urk = (1000 / $fmetric['unitsPerEm']); - $offset += 16; // skip created, modified - $xMin = round(TCPDF_STATIC::_getFWORD($font, $offset) * $urk); - $offset += 2; - $yMin = round(TCPDF_STATIC::_getFWORD($font, $offset) * $urk); - $offset += 2; - $xMax = round(TCPDF_STATIC::_getFWORD($font, $offset) * $urk); - $offset += 2; - $yMax = round(TCPDF_STATIC::_getFWORD($font, $offset) * $urk); - $offset += 2; - $fmetric['bbox'] = ''.$xMin.' '.$yMin.' '.$xMax.' '.$yMax.''; - $macStyle = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - // PDF font flags - $fmetric['Flags'] = $flags; - if (($macStyle & 2) == 2) { - // italic flag - $fmetric['Flags'] |= 64; - } - // get offset mode (indexToLocFormat : 0 = short, 1 = long) - $offset = $table['head']['offset'] + 50; - $short_offset = (TCPDF_STATIC::_getSHORT($font, $offset) == 0); - $offset += 2; - // get the offsets to the locations of the glyphs in the font, relative to the beginning of the glyphData table - $indexToLoc = array(); - $offset = $table['loca']['offset']; - if ($short_offset) { - // short version - $tot_num_glyphs = floor($table['loca']['length'] / 2); // numGlyphs + 1 - for ($i = 0; $i < $tot_num_glyphs; ++$i) { - $indexToLoc[$i] = TCPDF_STATIC::_getUSHORT($font, $offset) * 2; - if (isset($indexToLoc[($i - 1)]) && ($indexToLoc[$i] == $indexToLoc[($i - 1)])) { - // the last glyph didn't have an outline - unset($indexToLoc[($i - 1)]); - } - $offset += 2; - } - } else { - // long version - $tot_num_glyphs = floor($table['loca']['length'] / 4); // numGlyphs + 1 - for ($i = 0; $i < $tot_num_glyphs; ++$i) { - $indexToLoc[$i] = TCPDF_STATIC::_getULONG($font, $offset); - if (isset($indexToLoc[($i - 1)]) && ($indexToLoc[$i] == $indexToLoc[($i - 1)])) { - // the last glyph didn't have an outline - unset($indexToLoc[($i - 1)]); - } - $offset += 4; - } - } - // get glyphs indexes of chars from cmap table - $offset = $table['cmap']['offset'] + 2; - $numEncodingTables = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $encodingTables = array(); - for ($i = 0; $i < $numEncodingTables; ++$i) { - $encodingTables[$i]['platformID'] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $encodingTables[$i]['encodingID'] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $encodingTables[$i]['offset'] = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - } - // ---------- get os/2 metrics ---------- - $offset = $table['OS/2']['offset']; - $offset += 2; // skip version - // xAvgCharWidth - $fmetric['AvgWidth'] = round(TCPDF_STATIC::_getFWORD($font, $offset) * $urk); - $offset += 2; - // usWeightClass - $usWeightClass = round(TCPDF_STATIC::_getUFWORD($font, $offset) * $urk); - // estimate StemV and StemH (400 = usWeightClass for Normal - Regular font) - $fmetric['StemV'] = round((70 * $usWeightClass) / 400); - $fmetric['StemH'] = round((30 * $usWeightClass) / 400); - $offset += 2; - $offset += 2; // usWidthClass - $fsType = TCPDF_STATIC::_getSHORT($font, $offset); - $offset += 2; - if ($fsType == 2) { - // This Font cannot be modified, embedded or exchanged in any manner without first obtaining permission of the legal owner. - return false; - } - // ---------- get font name ---------- - $fmetric['name'] = ''; - $offset = $table['name']['offset']; - $offset += 2; // skip Format selector (=0). - // Number of NameRecords that follow n. - $numNameRecords = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - // Offset to start of string storage (from start of table). - $stringStorageOffset = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - for ($i = 0; $i < $numNameRecords; ++$i) { - $offset += 6; // skip Platform ID, Platform-specific encoding ID, Language ID. - // Name ID. - $nameID = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - if ($nameID == 6) { - // String length (in bytes). - $stringLength = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - // String offset from start of storage area (in bytes). - $stringOffset = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $offset = ($table['name']['offset'] + $stringStorageOffset + $stringOffset); - $fmetric['name'] = substr($font, $offset, $stringLength); - $fmetric['name'] = preg_replace('/[^a-zA-Z0-9_\-]/', '', $fmetric['name']); - break; - } else { - $offset += 4; // skip String length, String offset - } - } - if (empty($fmetric['name'])) { - $fmetric['name'] = $font_name; - } - // ---------- get post data ---------- - $offset = $table['post']['offset']; - $offset += 4; // skip Format Type - $fmetric['italicAngle'] = TCPDF_STATIC::_getFIXED($font, $offset); - $offset += 4; - $fmetric['underlinePosition'] = round(TCPDF_STATIC::_getFWORD($font, $offset) * $urk); - $offset += 2; - $fmetric['underlineThickness'] = round(TCPDF_STATIC::_getFWORD($font, $offset) * $urk); - $offset += 2; - $isFixedPitch = (TCPDF_STATIC::_getULONG($font, $offset) == 0) ? false : true; - $offset += 2; - if ($isFixedPitch) { - $fmetric['Flags'] |= 1; - } - // ---------- get hhea data ---------- - $offset = $table['hhea']['offset']; - $offset += 4; // skip Table version number - // Ascender - $fmetric['Ascent'] = round(TCPDF_STATIC::_getFWORD($font, $offset) * $urk); - $offset += 2; - // Descender - $fmetric['Descent'] = round(TCPDF_STATIC::_getFWORD($font, $offset) * $urk); - $offset += 2; - // LineGap - $fmetric['Leading'] = round(TCPDF_STATIC::_getFWORD($font, $offset) * $urk); - $offset += 2; - // advanceWidthMax - $fmetric['MaxWidth'] = round(TCPDF_STATIC::_getUFWORD($font, $offset) * $urk); - $offset += 2; - $offset += 22; // skip some values - // get the number of hMetric entries in hmtx table - $numberOfHMetrics = TCPDF_STATIC::_getUSHORT($font, $offset); - // ---------- get maxp data ---------- - $offset = $table['maxp']['offset']; - $offset += 4; // skip Table version number - // get the the number of glyphs in the font. - $numGlyphs = TCPDF_STATIC::_getUSHORT($font, $offset); - // ---------- get CIDToGIDMap ---------- - $ctg = array(); - foreach ($encodingTables as $enctable) { - // get only specified Platform ID and Encoding ID - if (($enctable['platformID'] == $platid) AND ($enctable['encodingID'] == $encid)) { - $offset = $table['cmap']['offset'] + $enctable['offset']; - $format = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - switch ($format) { - case 0: { // Format 0: Byte encoding table - $offset += 4; // skip length and version/language - for ($c = 0; $c < 256; ++$c) { - $g = TCPDF_STATIC::_getBYTE($font, $offset); - $ctg[$c] = $g; - ++$offset; - } - break; - } - case 2: { // Format 2: High-byte mapping through table - $offset += 4; // skip length and version/language - $numSubHeaders = 0; - for ($i = 0; $i < 256; ++$i) { - // Array that maps high bytes to subHeaders: value is subHeader index * 8. - $subHeaderKeys[$i] = (TCPDF_STATIC::_getUSHORT($font, $offset) / 8); - $offset += 2; - if ($numSubHeaders < $subHeaderKeys[$i]) { - $numSubHeaders = $subHeaderKeys[$i]; - } - } - // the number of subHeaders is equal to the max of subHeaderKeys + 1 - ++$numSubHeaders; - // read subHeader structures - $subHeaders = array(); - $numGlyphIndexArray = 0; - for ($k = 0; $k < $numSubHeaders; ++$k) { - $subHeaders[$k]['firstCode'] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $subHeaders[$k]['entryCount'] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $subHeaders[$k]['idDelta'] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $subHeaders[$k]['idRangeOffset'] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $subHeaders[$k]['idRangeOffset'] -= (2 + (($numSubHeaders - $k - 1) * 8)); - $subHeaders[$k]['idRangeOffset'] /= 2; - $numGlyphIndexArray += $subHeaders[$k]['entryCount']; - } - for ($k = 0; $k < $numGlyphIndexArray; ++$k) { - $glyphIndexArray[$k] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - } - for ($i = 0; $i < 256; ++$i) { - $k = $subHeaderKeys[$i]; - if ($k == 0) { - // one byte code - $c = $i; - $g = $glyphIndexArray[0]; - $ctg[$c] = $g; - } else { - // two bytes code - $start_byte = $subHeaders[$k]['firstCode']; - $end_byte = $start_byte + $subHeaders[$k]['entryCount']; - for ($j = $start_byte; $j < $end_byte; ++$j) { - // combine high and low bytes - $c = (($i << 8) + $j); - $idRangeOffset = ($subHeaders[$k]['idRangeOffset'] + $j - $subHeaders[$k]['firstCode']); - $g = ($glyphIndexArray[$idRangeOffset] + $subHeaders[$k]['idDelta']) % 65536; - if ($g < 0) { - $g = 0; - } - $ctg[$c] = $g; - } - } - } - break; - } - case 4: { // Format 4: Segment mapping to delta values - $length = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $offset += 2; // skip version/language - $segCount = floor(TCPDF_STATIC::_getUSHORT($font, $offset) / 2); - $offset += 2; - $offset += 6; // skip searchRange, entrySelector, rangeShift - $endCount = array(); // array of end character codes for each segment - for ($k = 0; $k < $segCount; ++$k) { - $endCount[$k] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - } - $offset += 2; // skip reservedPad - $startCount = array(); // array of start character codes for each segment - for ($k = 0; $k < $segCount; ++$k) { - $startCount[$k] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - } - $idDelta = array(); // delta for all character codes in segment - for ($k = 0; $k < $segCount; ++$k) { - $idDelta[$k] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - } - $idRangeOffset = array(); // Offsets into glyphIdArray or 0 - for ($k = 0; $k < $segCount; ++$k) { - $idRangeOffset[$k] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - } - $gidlen = (floor($length / 2) - 8 - (4 * $segCount)); - $glyphIdArray = array(); // glyph index array - for ($k = 0; $k < $gidlen; ++$k) { - $glyphIdArray[$k] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - } - for ($k = 0; $k < $segCount; ++$k) { - for ($c = $startCount[$k]; $c <= $endCount[$k]; ++$c) { - if ($idRangeOffset[$k] == 0) { - $g = ($idDelta[$k] + $c) % 65536; - } else { - $gid = (floor($idRangeOffset[$k] / 2) + ($c - $startCount[$k]) - ($segCount - $k)); - $g = ($glyphIdArray[$gid] + $idDelta[$k]) % 65536; - } - if ($g < 0) { - $g = 0; - } - $ctg[$c] = $g; - } - } - break; - } - case 6: { // Format 6: Trimmed table mapping - $offset += 4; // skip length and version/language - $firstCode = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $entryCount = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - for ($k = 0; $k < $entryCount; ++$k) { - $c = ($k + $firstCode); - $g = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $ctg[$c] = $g; - } - break; - } - case 8: { // Format 8: Mixed 16-bit and 32-bit coverage - $offset += 10; // skip reserved, length and version/language - for ($k = 0; $k < 8192; ++$k) { - $is32[$k] = TCPDF_STATIC::_getBYTE($font, $offset); - ++$offset; - } - $nGroups = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - for ($i = 0; $i < $nGroups; ++$i) { - $startCharCode = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - $endCharCode = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - $startGlyphID = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - for ($k = $startCharCode; $k <= $endCharCode; ++$k) { - $is32idx = floor($c / 8); - if ((isset($is32[$is32idx])) AND (($is32[$is32idx] & (1 << (7 - ($c % 8)))) == 0)) { - $c = $k; - } else { - // 32 bit format - // convert to decimal (http://www.unicode.org/faq//utf_bom.html#utf16-4) - //LEAD_OFFSET = (0xD800 - (0x10000 >> 10)) = 55232 - //SURROGATE_OFFSET = (0x10000 - (0xD800 << 10) - 0xDC00) = -56613888 - $c = ((55232 + ($k >> 10)) << 10) + (0xDC00 + ($k & 0x3FF)) -56613888; - } - $ctg[$c] = 0; - ++$startGlyphID; - } - } - break; - } - case 10: { // Format 10: Trimmed array - $offset += 10; // skip reserved, length and version/language - $startCharCode = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - $numChars = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - for ($k = 0; $k < $numChars; ++$k) { - $c = ($k + $startCharCode); - $g = TCPDF_STATIC::_getUSHORT($font, $offset); - $ctg[$c] = $g; - $offset += 2; - } - break; - } - case 12: { // Format 12: Segmented coverage - $offset += 10; // skip length and version/language - $nGroups = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - for ($k = 0; $k < $nGroups; ++$k) { - $startCharCode = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - $endCharCode = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - $startGlyphCode = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - for ($c = $startCharCode; $c <= $endCharCode; ++$c) { - $ctg[$c] = $startGlyphCode; - ++$startGlyphCode; - } - } - break; - } - case 13: { // Format 13: Many-to-one range mappings - // to be implemented ... - break; - } - case 14: { // Format 14: Unicode Variation Sequences - // to be implemented ... - break; - } - } - } - } - if (!isset($ctg[0])) { - $ctg[0] = 0; - } - // get xHeight (height of x) - $offset = ($table['glyf']['offset'] + $indexToLoc[$ctg[120]] + 4); - $yMin = TCPDF_STATIC::_getFWORD($font, $offset); - $offset += 4; - $yMax = TCPDF_STATIC::_getFWORD($font, $offset); - $offset += 2; - $fmetric['XHeight'] = round(($yMax - $yMin) * $urk); - // get CapHeight (height of H) - $offset = ($table['glyf']['offset'] + $indexToLoc[$ctg[72]] + 4); - $yMin = TCPDF_STATIC::_getFWORD($font, $offset); - $offset += 4; - $yMax = TCPDF_STATIC::_getFWORD($font, $offset); - $offset += 2; - $fmetric['CapHeight'] = round(($yMax - $yMin) * $urk); - // ceate widths array - $cw = array(); - $offset = $table['hmtx']['offset']; - for ($i = 0 ; $i < $numberOfHMetrics; ++$i) { - $cw[$i] = round(TCPDF_STATIC::_getUFWORD($font, $offset) * $urk); - $offset += 4; // skip lsb - } - if ($numberOfHMetrics < $numGlyphs) { - // fill missing widths with the last value - $cw = array_pad($cw, $numGlyphs, $cw[($numberOfHMetrics - 1)]); - } - $fmetric['MissingWidth'] = $cw[0]; - $fmetric['cw'] = ''; - $fmetric['cbbox'] = ''; - for ($cid = 0; $cid <= 65535; ++$cid) { - if (isset($ctg[$cid])) { - if (isset($cw[$ctg[$cid]])) { - $fmetric['cw'] .= ','.$cid.'=>'.$cw[$ctg[$cid]]; - } - if ($addcbbox AND isset($indexToLoc[$ctg[$cid]])) { - $offset = ($table['glyf']['offset'] + $indexToLoc[$ctg[$cid]]); - $xMin = round(TCPDF_STATIC::_getFWORD($font, $offset + 2) * $urk); - $yMin = round(TCPDF_STATIC::_getFWORD($font, $offset + 4) * $urk); - $xMax = round(TCPDF_STATIC::_getFWORD($font, $offset + 6) * $urk); - $yMax = round(TCPDF_STATIC::_getFWORD($font, $offset + 8) * $urk); - $fmetric['cbbox'] .= ','.$cid.'=>array('.$xMin.','.$yMin.','.$xMax.','.$yMax.')'; - } - } - } - } // end of true type - if (($fmetric['type'] == 'TrueTypeUnicode') AND (count($ctg) == 256)) { - $fmetric['type'] = 'TrueType'; - } - // ---------- create php font file ---------- - $pfile = '<'.'?'.'php'."\n"; - $pfile .= '// TCPDF FONT FILE DESCRIPTION'."\n"; - $pfile .= '$type=\''.$fmetric['type'].'\';'."\n"; - $pfile .= '$name=\''.$fmetric['name'].'\';'."\n"; - $pfile .= '$up='.$fmetric['underlinePosition'].';'."\n"; - $pfile .= '$ut='.$fmetric['underlineThickness'].';'."\n"; - if ($fmetric['MissingWidth'] > 0) { - $pfile .= '$dw='.$fmetric['MissingWidth'].';'."\n"; - } else { - $pfile .= '$dw='.$fmetric['AvgWidth'].';'."\n"; - } - $pfile .= '$diff=\''.$fmetric['diff'].'\';'."\n"; - if ($fmetric['type'] == 'Type1') { - // Type 1 - $pfile .= '$enc=\''.$fmetric['enc'].'\';'."\n"; - $pfile .= '$file=\''.$fmetric['file'].'\';'."\n"; - $pfile .= '$size1='.$fmetric['size1'].';'."\n"; - $pfile .= '$size2='.$fmetric['size2'].';'."\n"; - } else { - $pfile .= '$originalsize='.$fmetric['originalsize'].';'."\n"; - if ($fmetric['type'] == 'cidfont0') { - // CID-0 - switch ($fonttype) { - case 'CID0JP': { - $pfile .= '// Japanese'."\n"; - $pfile .= '$enc=\'UniJIS-UTF16-H\';'."\n"; - $pfile .= '$cidinfo=array(\'Registry\'=>\'Adobe\', \'Ordering\'=>\'Japan1\',\'Supplement\'=>5);'."\n"; - $pfile .= 'include(dirname(__FILE__).\'/uni2cid_aj16.php\');'."\n"; - break; - } - case 'CID0KR': { - $pfile .= '// Korean'."\n"; - $pfile .= '$enc=\'UniKS-UTF16-H\';'."\n"; - $pfile .= '$cidinfo=array(\'Registry\'=>\'Adobe\', \'Ordering\'=>\'Korea1\',\'Supplement\'=>0);'."\n"; - $pfile .= 'include(dirname(__FILE__).\'/uni2cid_ak12.php\');'."\n"; - break; - } - case 'CID0CS': { - $pfile .= '// Chinese Simplified'."\n"; - $pfile .= '$enc=\'UniGB-UTF16-H\';'."\n"; - $pfile .= '$cidinfo=array(\'Registry\'=>\'Adobe\', \'Ordering\'=>\'GB1\',\'Supplement\'=>2);'."\n"; - $pfile .= 'include(dirname(__FILE__).\'/uni2cid_ag15.php\');'."\n"; - break; - } - case 'CID0CT': - default: { - $pfile .= '// Chinese Traditional'."\n"; - $pfile .= '$enc=\'UniCNS-UTF16-H\';'."\n"; - $pfile .= '$cidinfo=array(\'Registry\'=>\'Adobe\', \'Ordering\'=>\'CNS1\',\'Supplement\'=>0);'."\n"; - $pfile .= 'include(dirname(__FILE__).\'/uni2cid_aj16.php\');'."\n"; - break; - } - } - } else { - // TrueType - $pfile .= '$enc=\''.$fmetric['enc'].'\';'."\n"; - $pfile .= '$file=\''.$fmetric['file'].'\';'."\n"; - $pfile .= '$ctg=\''.$fmetric['ctg'].'\';'."\n"; - // create CIDToGIDMap - $cidtogidmap = str_pad('', 131072, "\x00"); // (256 * 256 * 2) = 131072 - foreach ($ctg as $cid => $gid) { - $cidtogidmap = self::updateCIDtoGIDmap($cidtogidmap, $cid, $ctg[$cid]); - } - // store compressed CIDToGIDMap - $fp = TCPDF_STATIC::fopenLocal($outpath.$fmetric['ctg'], 'wb'); - fwrite($fp, gzcompress($cidtogidmap)); - fclose($fp); - } - } - $pfile .= '$desc=array('; - $pfile .= '\'Flags\'=>'.$fmetric['Flags'].','; - $pfile .= '\'FontBBox\'=>\'['.$fmetric['bbox'].']\','; - $pfile .= '\'ItalicAngle\'=>'.$fmetric['italicAngle'].','; - $pfile .= '\'Ascent\'=>'.$fmetric['Ascent'].','; - $pfile .= '\'Descent\'=>'.$fmetric['Descent'].','; - $pfile .= '\'Leading\'=>'.$fmetric['Leading'].','; - $pfile .= '\'CapHeight\'=>'.$fmetric['CapHeight'].','; - $pfile .= '\'XHeight\'=>'.$fmetric['XHeight'].','; - $pfile .= '\'StemV\'=>'.$fmetric['StemV'].','; - $pfile .= '\'StemH\'=>'.$fmetric['StemH'].','; - $pfile .= '\'AvgWidth\'=>'.$fmetric['AvgWidth'].','; - $pfile .= '\'MaxWidth\'=>'.$fmetric['MaxWidth'].','; - $pfile .= '\'MissingWidth\'=>'.$fmetric['MissingWidth'].''; - $pfile .= ');'."\n"; - if (!empty($fmetric['cbbox'])) { - $pfile .= '$cbbox=array('.substr($fmetric['cbbox'], 1).');'."\n"; - } - $pfile .= '$cw=array('.substr($fmetric['cw'], 1).');'."\n"; - $pfile .= '// --- EOF ---'."\n"; - // store file - $fp = TCPDF_STATIC::fopenLocal($outpath.$font_name.'.php', 'w'); - fwrite($fp, $pfile); - fclose($fp); - // return TCPDF font name - return $font_name; - } - - /** - * Returs the checksum of a TTF table. - * @param $table (string) table to check - * @param $length (int) length of table in bytes - * @return int checksum - * @author Nicola Asuni - * @since 5.2.000 (2010-06-02) - * @public static - */ - public static function _getTTFtableChecksum($table, $length) { - $sum = 0; - $tlen = ($length / 4); - $offset = 0; - for ($i = 0; $i < $tlen; ++$i) { - $v = unpack('Ni', substr($table, $offset, 4)); - $sum += $v['i']; - $offset += 4; - } - $sum = unpack('Ni', pack('N', $sum)); - return $sum['i']; - } - - /** - * Returns a subset of the TrueType font data without the unused glyphs. - * @param $font (string) TrueType font data. - * @param $subsetchars (array) Array of used characters (the glyphs to keep). - * @return (string) A subset of TrueType font data without the unused glyphs. - * @author Nicola Asuni - * @since 5.2.000 (2010-06-02) - * @public static - */ - public static function _getTrueTypeFontSubset($font, $subsetchars) { - ksort($subsetchars); - $offset = 0; // offset position of the font data - if (TCPDF_STATIC::_getULONG($font, $offset) != 0x10000) { - // sfnt version must be 0x00010000 for TrueType version 1.0. - return $font; - } - $offset += 4; - // get number of tables - $numTables = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - // skip searchRange, entrySelector and rangeShift - $offset += 6; - // tables array - $table = array(); - // for each table - for ($i = 0; $i < $numTables; ++$i) { - // get table info - $tag = substr($font, $offset, 4); - $offset += 4; - $table[$tag] = array(); - $table[$tag]['checkSum'] = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - $table[$tag]['offset'] = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - $table[$tag]['length'] = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - } - // check magicNumber - $offset = $table['head']['offset'] + 12; - if (TCPDF_STATIC::_getULONG($font, $offset) != 0x5F0F3CF5) { - // magicNumber must be 0x5F0F3CF5 - return $font; - } - $offset += 4; - // get offset mode (indexToLocFormat : 0 = short, 1 = long) - $offset = $table['head']['offset'] + 50; - $short_offset = (TCPDF_STATIC::_getSHORT($font, $offset) == 0); - $offset += 2; - // get the offsets to the locations of the glyphs in the font, relative to the beginning of the glyphData table - $indexToLoc = array(); - $offset = $table['loca']['offset']; - if ($short_offset) { - // short version - $tot_num_glyphs = floor($table['loca']['length'] / 2); // numGlyphs + 1 - for ($i = 0; $i < $tot_num_glyphs; ++$i) { - $indexToLoc[$i] = TCPDF_STATIC::_getUSHORT($font, $offset) * 2; - $offset += 2; - } - } else { - // long version - $tot_num_glyphs = ($table['loca']['length'] / 4); // numGlyphs + 1 - for ($i = 0; $i < $tot_num_glyphs; ++$i) { - $indexToLoc[$i] = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - } - } - // get glyphs indexes of chars from cmap table - $subsetglyphs = array(); // glyph IDs on key - $subsetglyphs[0] = true; // character codes that do not correspond to any glyph in the font should be mapped to glyph index 0 - $offset = $table['cmap']['offset'] + 2; - $numEncodingTables = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $encodingTables = array(); - for ($i = 0; $i < $numEncodingTables; ++$i) { - $encodingTables[$i]['platformID'] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $encodingTables[$i]['encodingID'] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $encodingTables[$i]['offset'] = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - } - foreach ($encodingTables as $enctable) { - // get all platforms and encodings - $offset = $table['cmap']['offset'] + $enctable['offset']; - $format = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - switch ($format) { - case 0: { // Format 0: Byte encoding table - $offset += 4; // skip length and version/language - for ($c = 0; $c < 256; ++$c) { - if (isset($subsetchars[$c])) { - $g = TCPDF_STATIC::_getBYTE($font, $offset); - $subsetglyphs[$g] = true; - } - ++$offset; - } - break; - } - case 2: { // Format 2: High-byte mapping through table - $offset += 4; // skip length and version/language - $numSubHeaders = 0; - for ($i = 0; $i < 256; ++$i) { - // Array that maps high bytes to subHeaders: value is subHeader index * 8. - $subHeaderKeys[$i] = (TCPDF_STATIC::_getUSHORT($font, $offset) / 8); - $offset += 2; - if ($numSubHeaders < $subHeaderKeys[$i]) { - $numSubHeaders = $subHeaderKeys[$i]; - } - } - // the number of subHeaders is equal to the max of subHeaderKeys + 1 - ++$numSubHeaders; - // read subHeader structures - $subHeaders = array(); - $numGlyphIndexArray = 0; - for ($k = 0; $k < $numSubHeaders; ++$k) { - $subHeaders[$k]['firstCode'] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $subHeaders[$k]['entryCount'] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $subHeaders[$k]['idDelta'] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $subHeaders[$k]['idRangeOffset'] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $subHeaders[$k]['idRangeOffset'] -= (2 + (($numSubHeaders - $k - 1) * 8)); - $subHeaders[$k]['idRangeOffset'] /= 2; - $numGlyphIndexArray += $subHeaders[$k]['entryCount']; - } - for ($k = 0; $k < $numGlyphIndexArray; ++$k) { - $glyphIndexArray[$k] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - } - for ($i = 0; $i < 256; ++$i) { - $k = $subHeaderKeys[$i]; - if ($k == 0) { - // one byte code - $c = $i; - if (isset($subsetchars[$c])) { - $g = $glyphIndexArray[0]; - $subsetglyphs[$g] = true; - } - } else { - // two bytes code - $start_byte = $subHeaders[$k]['firstCode']; - $end_byte = $start_byte + $subHeaders[$k]['entryCount']; - for ($j = $start_byte; $j < $end_byte; ++$j) { - // combine high and low bytes - $c = (($i << 8) + $j); - if (isset($subsetchars[$c])) { - $idRangeOffset = ($subHeaders[$k]['idRangeOffset'] + $j - $subHeaders[$k]['firstCode']); - $g = ($glyphIndexArray[$idRangeOffset] + $subHeaders[$k]['idDelta']) % 65536; - if ($g < 0) { - $g = 0; - } - $subsetglyphs[$g] = true; - } - } - } - } - break; - } - case 4: { // Format 4: Segment mapping to delta values - $length = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $offset += 2; // skip version/language - $segCount = floor(TCPDF_STATIC::_getUSHORT($font, $offset) / 2); - $offset += 2; - $offset += 6; // skip searchRange, entrySelector, rangeShift - $endCount = array(); // array of end character codes for each segment - for ($k = 0; $k < $segCount; ++$k) { - $endCount[$k] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - } - $offset += 2; // skip reservedPad - $startCount = array(); // array of start character codes for each segment - for ($k = 0; $k < $segCount; ++$k) { - $startCount[$k] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - } - $idDelta = array(); // delta for all character codes in segment - for ($k = 0; $k < $segCount; ++$k) { - $idDelta[$k] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - } - $idRangeOffset = array(); // Offsets into glyphIdArray or 0 - for ($k = 0; $k < $segCount; ++$k) { - $idRangeOffset[$k] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - } - $gidlen = (floor($length / 2) - 8 - (4 * $segCount)); - $glyphIdArray = array(); // glyph index array - for ($k = 0; $k < $gidlen; ++$k) { - $glyphIdArray[$k] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - } - for ($k = 0; $k < $segCount; ++$k) { - for ($c = $startCount[$k]; $c <= $endCount[$k]; ++$c) { - if (isset($subsetchars[$c])) { - if ($idRangeOffset[$k] == 0) { - $g = ($idDelta[$k] + $c) % 65536; - } else { - $gid = (floor($idRangeOffset[$k] / 2) + ($c - $startCount[$k]) - ($segCount - $k)); - $g = ($glyphIdArray[$gid] + $idDelta[$k]) % 65536; - } - if ($g < 0) { - $g = 0; - } - $subsetglyphs[$g] = true; - } - } - } - break; - } - case 6: { // Format 6: Trimmed table mapping - $offset += 4; // skip length and version/language - $firstCode = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $entryCount = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - for ($k = 0; $k < $entryCount; ++$k) { - $c = ($k + $firstCode); - if (isset($subsetchars[$c])) { - $g = TCPDF_STATIC::_getUSHORT($font, $offset); - $subsetglyphs[$g] = true; - } - $offset += 2; - } - break; - } - case 8: { // Format 8: Mixed 16-bit and 32-bit coverage - $offset += 10; // skip reserved, length and version/language - for ($k = 0; $k < 8192; ++$k) { - $is32[$k] = TCPDF_STATIC::_getBYTE($font, $offset); - ++$offset; - } - $nGroups = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - for ($i = 0; $i < $nGroups; ++$i) { - $startCharCode = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - $endCharCode = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - $startGlyphID = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - for ($k = $startCharCode; $k <= $endCharCode; ++$k) { - $is32idx = floor($c / 8); - if ((isset($is32[$is32idx])) AND (($is32[$is32idx] & (1 << (7 - ($c % 8)))) == 0)) { - $c = $k; - } else { - // 32 bit format - // convert to decimal (http://www.unicode.org/faq//utf_bom.html#utf16-4) - //LEAD_OFFSET = (0xD800 - (0x10000 >> 10)) = 55232 - //SURROGATE_OFFSET = (0x10000 - (0xD800 << 10) - 0xDC00) = -56613888 - $c = ((55232 + ($k >> 10)) << 10) + (0xDC00 + ($k & 0x3FF)) -56613888; - } - if (isset($subsetchars[$c])) { - $subsetglyphs[$startGlyphID] = true; - } - ++$startGlyphID; - } - } - break; - } - case 10: { // Format 10: Trimmed array - $offset += 10; // skip reserved, length and version/language - $startCharCode = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - $numChars = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - for ($k = 0; $k < $numChars; ++$k) { - $c = ($k + $startCharCode); - if (isset($subsetchars[$c])) { - $g = TCPDF_STATIC::_getUSHORT($font, $offset); - $subsetglyphs[$g] = true; - } - $offset += 2; - } - break; - } - case 12: { // Format 12: Segmented coverage - $offset += 10; // skip length and version/language - $nGroups = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - for ($k = 0; $k < $nGroups; ++$k) { - $startCharCode = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - $endCharCode = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - $startGlyphCode = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - for ($c = $startCharCode; $c <= $endCharCode; ++$c) { - if (isset($subsetchars[$c])) { - $subsetglyphs[$startGlyphCode] = true; - } - ++$startGlyphCode; - } - } - break; - } - case 13: { // Format 13: Many-to-one range mappings - // to be implemented ... - break; - } - case 14: { // Format 14: Unicode Variation Sequences - // to be implemented ... - break; - } - } - } - // include all parts of composite glyphs - $new_sga = $subsetglyphs; - while (!empty($new_sga)) { - $sga = $new_sga; - $new_sga = array(); - foreach ($sga as $key => $val) { - if (isset($indexToLoc[$key])) { - $offset = ($table['glyf']['offset'] + $indexToLoc[$key]); - $numberOfContours = TCPDF_STATIC::_getSHORT($font, $offset); - $offset += 2; - if ($numberOfContours < 0) { // composite glyph - $offset += 8; // skip xMin, yMin, xMax, yMax - do { - $flags = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $glyphIndex = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - if (!isset($subsetglyphs[$glyphIndex])) { - // add missing glyphs - $new_sga[$glyphIndex] = true; - } - // skip some bytes by case - if ($flags & 1) { - $offset += 4; - } else { - $offset += 2; - } - if ($flags & 8) { - $offset += 2; - } elseif ($flags & 64) { - $offset += 4; - } elseif ($flags & 128) { - $offset += 8; - } - } while ($flags & 32); - } - } - } - $subsetglyphs += $new_sga; - } - // sort glyphs by key (and remove duplicates) - ksort($subsetglyphs); - // build new glyf and loca tables - $glyf = ''; - $loca = ''; - $offset = 0; - $glyf_offset = $table['glyf']['offset']; - for ($i = 0; $i < $tot_num_glyphs; ++$i) { - if (isset($subsetglyphs[$i])) { - $length = ($indexToLoc[($i + 1)] - $indexToLoc[$i]); - $glyf .= substr($font, ($glyf_offset + $indexToLoc[$i]), $length); - } else { - $length = 0; - } - if ($short_offset) { - $loca .= pack('n', floor($offset / 2)); - } else { - $loca .= pack('N', $offset); - } - $offset += $length; - } - // array of table names to preserve (loca and glyf tables will be added later) - // the cmap table is not needed and shall not be present, since the mapping from character codes to glyph descriptions is provided separately - $table_names = array ('head', 'hhea', 'hmtx', 'maxp', 'cvt ', 'fpgm', 'prep'); // minimum required table names - // get the tables to preserve - $offset = 12; - foreach ($table as $tag => $val) { - if (in_array($tag, $table_names)) { - $table[$tag]['data'] = substr($font, $table[$tag]['offset'], $table[$tag]['length']); - if ($tag == 'head') { - // set the checkSumAdjustment to 0 - $table[$tag]['data'] = substr($table[$tag]['data'], 0, 8)."\x0\x0\x0\x0".substr($table[$tag]['data'], 12); - } - $pad = 4 - ($table[$tag]['length'] % 4); - if ($pad != 4) { - // the length of a table must be a multiple of four bytes - $table[$tag]['length'] += $pad; - $table[$tag]['data'] .= str_repeat("\x0", $pad); - } - $table[$tag]['offset'] = $offset; - $offset += $table[$tag]['length']; - // check sum is not changed (so keep the following line commented) - //$table[$tag]['checkSum'] = self::_getTTFtableChecksum($table[$tag]['data'], $table[$tag]['length']); - } else { - unset($table[$tag]); - } - } - // add loca - $table['loca']['data'] = $loca; - $table['loca']['length'] = strlen($loca); - $pad = 4 - ($table['loca']['length'] % 4); - if ($pad != 4) { - // the length of a table must be a multiple of four bytes - $table['loca']['length'] += $pad; - $table['loca']['data'] .= str_repeat("\x0", $pad); - } - $table['loca']['offset'] = $offset; - $table['loca']['checkSum'] = self::_getTTFtableChecksum($table['loca']['data'], $table['loca']['length']); - $offset += $table['loca']['length']; - // add glyf - $table['glyf']['data'] = $glyf; - $table['glyf']['length'] = strlen($glyf); - $pad = 4 - ($table['glyf']['length'] % 4); - if ($pad != 4) { - // the length of a table must be a multiple of four bytes - $table['glyf']['length'] += $pad; - $table['glyf']['data'] .= str_repeat("\x0", $pad); - } - $table['glyf']['offset'] = $offset; - $table['glyf']['checkSum'] = self::_getTTFtableChecksum($table['glyf']['data'], $table['glyf']['length']); - // rebuild font - $font = ''; - $font .= pack('N', 0x10000); // sfnt version - $numTables = count($table); - $font .= pack('n', $numTables); // numTables - $entrySelector = floor(log($numTables, 2)); - $searchRange = pow(2, $entrySelector) * 16; - $rangeShift = ($numTables * 16) - $searchRange; - $font .= pack('n', $searchRange); // searchRange - $font .= pack('n', $entrySelector); // entrySelector - $font .= pack('n', $rangeShift); // rangeShift - $offset = ($numTables * 16); - foreach ($table as $tag => $data) { - $font .= $tag; // tag - $font .= pack('N', $data['checkSum']); // checkSum - $font .= pack('N', ($data['offset'] + $offset)); // offset - $font .= pack('N', $data['length']); // length - } - foreach ($table as $data) { - $font .= $data['data']; - } - // set checkSumAdjustment on head table - $checkSumAdjustment = 0xB1B0AFBA - self::_getTTFtableChecksum($font, strlen($font)); - $font = substr($font, 0, $table['head']['offset'] + 8).pack('N', $checkSumAdjustment).substr($font, $table['head']['offset'] + 12); - return $font; - } - - /** - * Outputs font widths - * @param $font (array) font data - * @param $cidoffset (int) offset for CID values - * @return PDF command string for font widths - * @author Nicola Asuni - * @since 4.4.000 (2008-12-07) - * @public static - */ - public static function _putfontwidths($font, $cidoffset=0) { - ksort($font['cw']); - $rangeid = 0; - $range = array(); - $prevcid = -2; - $prevwidth = -1; - $interval = false; - // for each character - foreach ($font['cw'] as $cid => $width) { - $cid -= $cidoffset; - if ($font['subset'] AND (!isset($font['subsetchars'][$cid]))) { - // ignore the unused characters (font subsetting) - continue; - } - if ($width != $font['dw']) { - if ($cid == ($prevcid + 1)) { - // consecutive CID - if ($width == $prevwidth) { - if ($width == $range[$rangeid][0]) { - $range[$rangeid][] = $width; - } else { - array_pop($range[$rangeid]); - // new range - $rangeid = $prevcid; - $range[$rangeid] = array(); - $range[$rangeid][] = $prevwidth; - $range[$rangeid][] = $width; - } - $interval = true; - $range[$rangeid]['interval'] = true; - } else { - if ($interval) { - // new range - $rangeid = $cid; - $range[$rangeid] = array(); - $range[$rangeid][] = $width; - } else { - $range[$rangeid][] = $width; - } - $interval = false; - } - } else { - // new range - $rangeid = $cid; - $range[$rangeid] = array(); - $range[$rangeid][] = $width; - $interval = false; - } - $prevcid = $cid; - $prevwidth = $width; - } - } - // optimize ranges - $prevk = -1; - $nextk = -1; - $prevint = false; - foreach ($range as $k => $ws) { - $cws = count($ws); - if (($k == $nextk) AND (!$prevint) AND ((!isset($ws['interval'])) OR ($cws < 4))) { - if (isset($range[$k]['interval'])) { - unset($range[$k]['interval']); - } - $range[$prevk] = array_merge($range[$prevk], $range[$k]); - unset($range[$k]); - } else { - $prevk = $k; - } - $nextk = $k + $cws; - if (isset($ws['interval'])) { - if ($cws > 3) { - $prevint = true; - } else { - $prevint = false; - } - if (isset($range[$k]['interval'])) { - unset($range[$k]['interval']); - } - --$nextk; - } else { - $prevint = false; - } - } - // output data - $w = ''; - foreach ($range as $k => $ws) { - if (count(array_count_values($ws)) == 1) { - // interval mode is more compact - $w .= ' '.$k.' '.($k + count($ws) - 1).' '.$ws[0]; - } else { - // range mode - $w .= ' '.$k.' [ '.implode(' ', $ws).' ]'; - } - } - return '/W ['.$w.' ]'; - } - - /** - * Returns the unicode caracter specified by the value - * @param $c (int) UTF-8 value - * @param $unicode (boolean) True if we are in unicode mode, false otherwise. - * @return Returns the specified character. - * @since 2.3.000 (2008-03-05) - * @public static - */ - public static function unichr($c, $unicode=true) { - if (!$unicode) { - return chr($c); - } elseif ($c <= 0x7F) { - // one byte - return chr($c); - } elseif ($c <= 0x7FF) { - // two bytes - return chr(0xC0 | $c >> 6).chr(0x80 | $c & 0x3F); - } elseif ($c <= 0xFFFF) { - // three bytes - return chr(0xE0 | $c >> 12).chr(0x80 | $c >> 6 & 0x3F).chr(0x80 | $c & 0x3F); - } elseif ($c <= 0x10FFFF) { - // four bytes - return chr(0xF0 | $c >> 18).chr(0x80 | $c >> 12 & 0x3F).chr(0x80 | $c >> 6 & 0x3F).chr(0x80 | $c & 0x3F); - } else { - return ''; - } - } - - /** - * Returns the unicode caracter specified by UTF-8 value - * @param $c (int) UTF-8 value - * @return Returns the specified character. - * @public static - */ - public static function unichrUnicode($c) { - return self::unichr($c, true); - } - - /** - * Returns the unicode caracter specified by ASCII value - * @param $c (int) UTF-8 value - * @return Returns the specified character. - * @public static - */ - public static function unichrASCII($c) { - return self::unichr($c, false); - } - - /** - * Converts array of UTF-8 characters to UTF16-BE string.
        - * Based on: http://www.faqs.org/rfcs/rfc2781.html - *
        -	 *   Encoding UTF-16:
        -	 *
        -	 *   Encoding of a single character from an ISO 10646 character value to
        -	 *    UTF-16 proceeds as follows. Let U be the character number, no greater
        -	 *    than 0x10FFFF.
        -	 *
        -	 *    1) If U < 0x10000, encode U as a 16-bit unsigned integer and
        -	 *       terminate.
        -	 *
        -	 *    2) Let U' = U - 0x10000. Because U is less than or equal to 0x10FFFF,
        -	 *       U' must be less than or equal to 0xFFFFF. That is, U' can be
        -	 *       represented in 20 bits.
        -	 *
        -	 *    3) Initialize two 16-bit unsigned integers, W1 and W2, to 0xD800 and
        -	 *       0xDC00, respectively. These integers each have 10 bits free to
        -	 *       encode the character value, for a total of 20 bits.
        -	 *
        -	 *    4) Assign the 10 high-order bits of the 20-bit U' to the 10 low-order
        -	 *       bits of W1 and the 10 low-order bits of U' to the 10 low-order
        -	 *       bits of W2. Terminate.
        -	 *
        -	 *    Graphically, steps 2 through 4 look like:
        -	 *    U' = yyyyyyyyyyxxxxxxxxxx
        -	 *    W1 = 110110yyyyyyyyyy
        -	 *    W2 = 110111xxxxxxxxxx
        -	 * 
        - * @param $unicode (array) array containing UTF-8 unicode values - * @param $setbom (boolean) if true set the Byte Order Mark (BOM = 0xFEFF) - * @return string - * @protected - * @author Nicola Asuni - * @since 2.1.000 (2008-01-08) - * @public static - */ - public static function arrUTF8ToUTF16BE($unicode, $setbom=false) { - $outstr = ''; // string to be returned - if ($setbom) { - $outstr .= "\xFE\xFF"; // Byte Order Mark (BOM) - } - foreach ($unicode as $char) { - if ($char == 0x200b) { - // skip Unicode Character 'ZERO WIDTH SPACE' (DEC:8203, U+200B) - } elseif ($char == 0xFFFD) { - $outstr .= "\xFF\xFD"; // replacement character - } elseif ($char < 0x10000) { - $outstr .= chr($char >> 0x08); - $outstr .= chr($char & 0xFF); - } else { - $char -= 0x10000; - $w1 = 0xD800 | ($char >> 0x0a); - $w2 = 0xDC00 | ($char & 0x3FF); - $outstr .= chr($w1 >> 0x08); - $outstr .= chr($w1 & 0xFF); - $outstr .= chr($w2 >> 0x08); - $outstr .= chr($w2 & 0xFF); - } - } - return $outstr; - } - - /** - * Convert an array of UTF8 values to array of unicode characters - * @param $ta (array) The input array of UTF8 values. - * @param $isunicode (boolean) True for Unicode mode, false otherwise. - * @return Return array of unicode characters - * @since 4.5.037 (2009-04-07) - * @public static - */ - public static function UTF8ArrayToUniArray($ta, $isunicode=true) { - if ($isunicode) { - return array_map(array('TCPDF_FONTS', 'unichrUnicode'), $ta); - } - return array_map(array('TCPDF_FONTS', 'unichrASCII'), $ta); - } - - /** - * Extract a slice of the $strarr array and return it as string. - * @param $strarr (string) The input array of characters. - * @param $start (int) the starting element of $strarr. - * @param $end (int) first element that will not be returned. - * @param $unicode (boolean) True if we are in unicode mode, false otherwise. - * @return Return part of a string - * @public static - */ - public static function UTF8ArrSubString($strarr, $start='', $end='', $unicode=true) { - if (strlen($start) == 0) { - $start = 0; - } - if (strlen($end) == 0) { - $end = count($strarr); - } - $string = ''; - for ($i = $start; $i < $end; ++$i) { - $string .= self::unichr($strarr[$i], $unicode); - } - return $string; - } - - /** - * Extract a slice of the $uniarr array and return it as string. - * @param $uniarr (string) The input array of characters. - * @param $start (int) the starting element of $strarr. - * @param $end (int) first element that will not be returned. - * @return Return part of a string - * @since 4.5.037 (2009-04-07) - * @public static - */ - public static function UniArrSubString($uniarr, $start='', $end='') { - if (strlen($start) == 0) { - $start = 0; - } - if (strlen($end) == 0) { - $end = count($uniarr); - } - $string = ''; - for ($i=$start; $i < $end; ++$i) { - $string .= $uniarr[$i]; - } - return $string; - } - - /** - * Update the CIDToGIDMap string with a new value. - * @param $map (string) CIDToGIDMap. - * @param $cid (int) CID value. - * @param $gid (int) GID value. - * @return (string) CIDToGIDMap. - * @author Nicola Asuni - * @since 5.9.123 (2011-09-29) - * @public static - */ - public static function updateCIDtoGIDmap($map, $cid, $gid) { - if (($cid >= 0) AND ($cid <= 0xFFFF) AND ($gid >= 0)) { - if ($gid > 0xFFFF) { - $gid -= 0x10000; - } - $map[($cid * 2)] = chr($gid >> 8); - $map[(($cid * 2) + 1)] = chr($gid & 0xFF); - } - return $map; - } - - /** - * Return fonts path - * @return string - * @public static - */ - public static function _getfontpath() { - if (!defined('K_PATH_FONTS') AND is_dir($fdir = realpath(dirname(__FILE__).'/../fonts'))) { - if (substr($fdir, -1) != '/') { - $fdir .= '/'; - } - define('K_PATH_FONTS', $fdir); - } - return defined('K_PATH_FONTS') ? K_PATH_FONTS : ''; - } - - /** - * Return font full path - * @param $file (string) Font file name. - * @param $fontdir (string) Font directory (set to false fto search on default directories) - * @return string Font full path or empty string - * @author Nicola Asuni - * @since 6.0.025 - * @public static - */ - public static function getFontFullPath($file, $fontdir=false) { - $fontfile = ''; - // search files on various directories - if (($fontdir !== false) AND @file_exists($fontdir.$file)) { - $fontfile = $fontdir.$file; - } elseif (@file_exists(self::_getfontpath().$file)) { - $fontfile = self::_getfontpath().$file; - } elseif (@file_exists($file)) { - $fontfile = $file; - } - return $fontfile; - } - - /** - * Converts UTF-8 characters array to array of Latin1 characters array
        - * @param $unicode (array) array containing UTF-8 unicode values - * @return array - * @author Nicola Asuni - * @since 4.8.023 (2010-01-15) - * @public static - */ - public static function UTF8ArrToLatin1Arr($unicode) { - $outarr = array(); // array to be returned - foreach ($unicode as $char) { - if ($char < 256) { - $outarr[] = $char; - } elseif (array_key_exists($char, TCPDF_FONT_DATA::$uni_utf8tolatin)) { - // map from UTF-8 - $outarr[] = TCPDF_FONT_DATA::$uni_utf8tolatin[$char]; - } elseif ($char == 0xFFFD) { - // skip - } else { - $outarr[] = 63; // '?' character - } - } - return $outarr; - } - - /** - * Converts UTF-8 characters array to array of Latin1 string
        - * @param $unicode (array) array containing UTF-8 unicode values - * @return array - * @author Nicola Asuni - * @since 4.8.023 (2010-01-15) - * @public static - */ - public static function UTF8ArrToLatin1($unicode) { - $outstr = ''; // string to be returned - foreach ($unicode as $char) { - if ($char < 256) { - $outstr .= chr($char); - } elseif (array_key_exists($char, TCPDF_FONT_DATA::$uni_utf8tolatin)) { - // map from UTF-8 - $outstr .= chr(TCPDF_FONT_DATA::$uni_utf8tolatin[$char]); - } elseif ($char == 0xFFFD) { - // skip - } else { - $outstr .= '?'; - } - } - return $outstr; - } - - /** - * Converts UTF-8 character to integer value.
        - * Uses the getUniord() method if the value is not cached. - * @param $uch (string) character string to process. - * @return integer Unicode value - * @public static - */ - public static function uniord($uch) { - if (!isset(self::$cache_uniord[$uch])) { - self::$cache_uniord[$uch] = self::getUniord($uch); - } - return self::$cache_uniord[$uch]; - } - - /** - * Converts UTF-8 character to integer value.
        - * Invalid byte sequences will be replaced with 0xFFFD (replacement character)
        - * Based on: http://www.faqs.org/rfcs/rfc3629.html - *
        -	 *    Char. number range  |        UTF-8 octet sequence
        -	 *       (hexadecimal)    |              (binary)
        -	 *    --------------------+-----------------------------------------------
        -	 *    0000 0000-0000 007F | 0xxxxxxx
        -	 *    0000 0080-0000 07FF | 110xxxxx 10xxxxxx
        -	 *    0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx
        -	 *    0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
        -	 *    ---------------------------------------------------------------------
        -	 *
        -	 *   ABFN notation:
        -	 *   ---------------------------------------------------------------------
        -	 *   UTF8-octets = *( UTF8-char )
        -	 *   UTF8-char   = UTF8-1 / UTF8-2 / UTF8-3 / UTF8-4
        -	 *   UTF8-1      = %x00-7F
        -	 *   UTF8-2      = %xC2-DF UTF8-tail
        -	 *
        -	 *   UTF8-3      = %xE0 %xA0-BF UTF8-tail / %xE1-EC 2( UTF8-tail ) /
        -	 *                 %xED %x80-9F UTF8-tail / %xEE-EF 2( UTF8-tail )
        -	 *   UTF8-4      = %xF0 %x90-BF 2( UTF8-tail ) / %xF1-F3 3( UTF8-tail ) /
        -	 *                 %xF4 %x80-8F 2( UTF8-tail )
        -	 *   UTF8-tail   = %x80-BF
        -	 *   ---------------------------------------------------------------------
        -	 * 
        - * @param $uch (string) character string to process. - * @return integer Unicode value - * @author Nicola Asuni - * @public static - */ - public static function getUniord($uch) { - if (function_exists('mb_convert_encoding')) { - list(, $char) = @unpack('N', mb_convert_encoding($uch, 'UCS-4BE', 'UTF-8')); - if ($char >= 0) { - return $char; - } - } - $bytes = array(); // array containing single character byte sequences - $countbytes = 0; - $numbytes = 1; // number of octetc needed to represent the UTF-8 character - $length = strlen($uch); - for ($i = 0; $i < $length; ++$i) { - $char = ord($uch[$i]); // get one string character at time - if ($countbytes == 0) { // get starting octect - if ($char <= 0x7F) { - return $char; // use the character "as is" because is ASCII - } elseif (($char >> 0x05) == 0x06) { // 2 bytes character (0x06 = 110 BIN) - $bytes[] = ($char - 0xC0) << 0x06; - ++$countbytes; - $numbytes = 2; - } elseif (($char >> 0x04) == 0x0E) { // 3 bytes character (0x0E = 1110 BIN) - $bytes[] = ($char - 0xE0) << 0x0C; - ++$countbytes; - $numbytes = 3; - } elseif (($char >> 0x03) == 0x1E) { // 4 bytes character (0x1E = 11110 BIN) - $bytes[] = ($char - 0xF0) << 0x12; - ++$countbytes; - $numbytes = 4; - } else { - // use replacement character for other invalid sequences - return 0xFFFD; - } - } elseif (($char >> 0x06) == 0x02) { // bytes 2, 3 and 4 must start with 0x02 = 10 BIN - $bytes[] = $char - 0x80; - ++$countbytes; - if ($countbytes == $numbytes) { - // compose UTF-8 bytes to a single unicode value - $char = $bytes[0]; - for ($j = 1; $j < $numbytes; ++$j) { - $char += ($bytes[$j] << (($numbytes - $j - 1) * 0x06)); - } - if ((($char >= 0xD800) AND ($char <= 0xDFFF)) OR ($char >= 0x10FFFF)) { - // The definition of UTF-8 prohibits encoding character numbers between - // U+D800 and U+DFFF, which are reserved for use with the UTF-16 - // encoding form (as surrogate pairs) and do not directly represent - // characters. - return 0xFFFD; // use replacement character - } else { - return $char; - } - } - } else { - // use replacement character for other invalid sequences - return 0xFFFD; - } - } - return 0xFFFD; - } - - /** - * Converts UTF-8 strings to codepoints array.
        - * Invalid byte sequences will be replaced with 0xFFFD (replacement character)
        - * @param $str (string) string to process. - * @param $isunicode (boolean) True when the documetn is in Unicode mode, false otherwise. - * @param $currentfont (array) Reference to current font array. - * @return array containing codepoints (UTF-8 characters values) - * @author Nicola Asuni - * @public static - */ - public static function UTF8StringToArray($str, $isunicode=true, &$currentfont) { - if ($isunicode) { - // requires PCRE unicode support turned on - $chars = TCPDF_STATIC::pregSplit('//','u', $str, -1, PREG_SPLIT_NO_EMPTY); - $carr = array_map(array('TCPDF_FONTS', 'uniord'), $chars); - } else { - $chars = str_split($str); - $carr = array_map('ord', $chars); - } - $currentfont['subsetchars'] += array_fill_keys($carr, true); - return $carr; - } - - /** - * Converts UTF-8 strings to Latin1 when using the standard 14 core fonts.
        - * @param $str (string) string to process. - * @param $isunicode (boolean) True when the documetn is in Unicode mode, false otherwise. - * @param $currentfont (array) Reference to current font array. - * @return string - * @since 3.2.000 (2008-06-23) - * @public static - */ - public static function UTF8ToLatin1($str, $isunicode=true, &$currentfont) { - $unicode = self::UTF8StringToArray($str, $isunicode, $currentfont); // array containing UTF-8 unicode values - return self::UTF8ArrToLatin1($unicode); - } - - /** - * Converts UTF-8 strings to UTF16-BE.
        - * @param $str (string) string to process. - * @param $setbom (boolean) if true set the Byte Order Mark (BOM = 0xFEFF) - * @param $isunicode (boolean) True when the documetn is in Unicode mode, false otherwise. - * @param $currentfont (array) Reference to current font array. - * @return string - * @author Nicola Asuni - * @since 1.53.0.TC005 (2005-01-05) - * @public static - */ - public static function UTF8ToUTF16BE($str, $setbom=false, $isunicode=true, &$currentfont) { - if (!$isunicode) { - return $str; // string is not in unicode - } - $unicode = self::UTF8StringToArray($str, $isunicode, $currentfont); // array containing UTF-8 unicode values - return self::arrUTF8ToUTF16BE($unicode, $setbom); - } - - /** - * Reverse the RLT substrings using the Bidirectional Algorithm (http://unicode.org/reports/tr9/). - * @param $str (string) string to manipulate. - * @param $setbom (bool) if true set the Byte Order Mark (BOM = 0xFEFF) - * @param $forcertl (bool) if true forces RTL text direction - * @param $isunicode (boolean) True if the document is in Unicode mode, false otherwise. - * @param $currentfont (array) Reference to current font array. - * @return string - * @author Nicola Asuni - * @since 2.1.000 (2008-01-08) - * @public static - */ - public static function utf8StrRev($str, $setbom=false, $forcertl=false, $isunicode=true, &$currentfont) { - return self::utf8StrArrRev(self::UTF8StringToArray($str, $isunicode, $currentfont), $str, $setbom, $forcertl, $isunicode, $currentfont); - } - - /** - * Reverse the RLT substrings array using the Bidirectional Algorithm (http://unicode.org/reports/tr9/). - * @param $arr (array) array of unicode values. - * @param $str (string) string to manipulate (or empty value). - * @param $setbom (bool) if true set the Byte Order Mark (BOM = 0xFEFF) - * @param $forcertl (bool) if true forces RTL text direction - * @param $isunicode (boolean) True if the document is in Unicode mode, false otherwise. - * @param $currentfont (array) Reference to current font array. - * @return string - * @author Nicola Asuni - * @since 4.9.000 (2010-03-27) - * @public static - */ - public static function utf8StrArrRev($arr, $str='', $setbom=false, $forcertl=false, $isunicode=true, &$currentfont) { - return self::arrUTF8ToUTF16BE(self::utf8Bidi($arr, $str, $forcertl, $isunicode, $currentfont), $setbom); - } - - /** - * Reverse the RLT substrings using the Bidirectional Algorithm (http://unicode.org/reports/tr9/). - * @param $ta (array) array of characters composing the string. - * @param $str (string) string to process - * @param $forcertl (bool) if 'R' forces RTL, if 'L' forces LTR - * @param $isunicode (boolean) True if the document is in Unicode mode, false otherwise. - * @param $currentfont (array) Reference to current font array. - * @return array of unicode chars - * @author Nicola Asuni - * @since 2.4.000 (2008-03-06) - * @public static - */ - public static function utf8Bidi($ta, $str='', $forcertl=false, $isunicode=true, &$currentfont) { - // paragraph embedding level - $pel = 0; - // max level - $maxlevel = 0; - if (TCPDF_STATIC::empty_string($str)) { - // create string from array - $str = self::UTF8ArrSubString($ta, '', '', $isunicode); - } - // check if string contains arabic text - if (preg_match(TCPDF_FONT_DATA::$uni_RE_PATTERN_ARABIC, $str)) { - $arabic = true; - } else { - $arabic = false; - } - // check if string contains RTL text - if (!($forcertl OR $arabic OR preg_match(TCPDF_FONT_DATA::$uni_RE_PATTERN_RTL, $str))) { - return $ta; - } - - // get number of chars - $numchars = count($ta); - - if ($forcertl == 'R') { - $pel = 1; - } elseif ($forcertl == 'L') { - $pel = 0; - } else { - // P2. In each paragraph, find the first character of type L, AL, or R. - // P3. If a character is found in P2 and it is of type AL or R, then set the paragraph embedding level to one; otherwise, set it to zero. - for ($i=0; $i < $numchars; ++$i) { - $type = TCPDF_FONT_DATA::$uni_type[$ta[$i]]; - if ($type == 'L') { - $pel = 0; - break; - } elseif (($type == 'AL') OR ($type == 'R')) { - $pel = 1; - break; - } - } - } - - // Current Embedding Level - $cel = $pel; - // directional override status - $dos = 'N'; - $remember = array(); - // start-of-level-run - $sor = $pel % 2 ? 'R' : 'L'; - $eor = $sor; - - // Array of characters data - $chardata = Array(); - - // X1. Begin by setting the current embedding level to the paragraph embedding level. Set the directional override status to neutral. Process each character iteratively, applying rules X2 through X9. Only embedding levels from 0 to 61 are valid in this phase. - // In the resolution of levels in rules I1 and I2, the maximum embedding level of 62 can be reached. - for ($i=0; $i < $numchars; ++$i) { - if ($ta[$i] == TCPDF_FONT_DATA::$uni_RLE) { - // X2. With each RLE, compute the least greater odd embedding level. - // a. If this new level would be valid, then this embedding code is valid. Remember (push) the current embedding level and override status. Reset the current level to this new level, and reset the override status to neutral. - // b. If the new level would not be valid, then this code is invalid. Do not change the current level or override status. - $next_level = $cel + ($cel % 2) + 1; - if ($next_level < 62) { - $remember[] = array('num' => TCPDF_FONT_DATA::$uni_RLE, 'cel' => $cel, 'dos' => $dos); - $cel = $next_level; - $dos = 'N'; - $sor = $eor; - $eor = $cel % 2 ? 'R' : 'L'; - } - } elseif ($ta[$i] == TCPDF_FONT_DATA::$uni_LRE) { - // X3. With each LRE, compute the least greater even embedding level. - // a. If this new level would be valid, then this embedding code is valid. Remember (push) the current embedding level and override status. Reset the current level to this new level, and reset the override status to neutral. - // b. If the new level would not be valid, then this code is invalid. Do not change the current level or override status. - $next_level = $cel + 2 - ($cel % 2); - if ( $next_level < 62 ) { - $remember[] = array('num' => TCPDF_FONT_DATA::$uni_LRE, 'cel' => $cel, 'dos' => $dos); - $cel = $next_level; - $dos = 'N'; - $sor = $eor; - $eor = $cel % 2 ? 'R' : 'L'; - } - } elseif ($ta[$i] == TCPDF_FONT_DATA::$uni_RLO) { - // X4. With each RLO, compute the least greater odd embedding level. - // a. If this new level would be valid, then this embedding code is valid. Remember (push) the current embedding level and override status. Reset the current level to this new level, and reset the override status to right-to-left. - // b. If the new level would not be valid, then this code is invalid. Do not change the current level or override status. - $next_level = $cel + ($cel % 2) + 1; - if ($next_level < 62) { - $remember[] = array('num' => TCPDF_FONT_DATA::$uni_RLO, 'cel' => $cel, 'dos' => $dos); - $cel = $next_level; - $dos = 'R'; - $sor = $eor; - $eor = $cel % 2 ? 'R' : 'L'; - } - } elseif ($ta[$i] == TCPDF_FONT_DATA::$uni_LRO) { - // X5. With each LRO, compute the least greater even embedding level. - // a. If this new level would be valid, then this embedding code is valid. Remember (push) the current embedding level and override status. Reset the current level to this new level, and reset the override status to left-to-right. - // b. If the new level would not be valid, then this code is invalid. Do not change the current level or override status. - $next_level = $cel + 2 - ($cel % 2); - if ( $next_level < 62 ) { - $remember[] = array('num' => TCPDF_FONT_DATA::$uni_LRO, 'cel' => $cel, 'dos' => $dos); - $cel = $next_level; - $dos = 'L'; - $sor = $eor; - $eor = $cel % 2 ? 'R' : 'L'; - } - } elseif ($ta[$i] == TCPDF_FONT_DATA::$uni_PDF) { - // X7. With each PDF, determine the matching embedding or override code. If there was a valid matching code, restore (pop) the last remembered (pushed) embedding level and directional override. - if (count($remember)) { - $last = count($remember ) - 1; - if (($remember[$last]['num'] == TCPDF_FONT_DATA::$uni_RLE) OR - ($remember[$last]['num'] == TCPDF_FONT_DATA::$uni_LRE) OR - ($remember[$last]['num'] == TCPDF_FONT_DATA::$uni_RLO) OR - ($remember[$last]['num'] == TCPDF_FONT_DATA::$uni_LRO)) { - $match = array_pop($remember); - $cel = $match['cel']; - $dos = $match['dos']; - $sor = $eor; - $eor = ($cel > $match['cel'] ? $cel : $match['cel']) % 2 ? 'R' : 'L'; - } - } - } elseif (($ta[$i] != TCPDF_FONT_DATA::$uni_RLE) AND - ($ta[$i] != TCPDF_FONT_DATA::$uni_LRE) AND - ($ta[$i] != TCPDF_FONT_DATA::$uni_RLO) AND - ($ta[$i] != TCPDF_FONT_DATA::$uni_LRO) AND - ($ta[$i] != TCPDF_FONT_DATA::$uni_PDF)) { - // X6. For all types besides RLE, LRE, RLO, LRO, and PDF: - // a. Set the level of the current character to the current embedding level. - // b. Whenever the directional override status is not neutral, reset the current character type to the directional override status. - if ($dos != 'N') { - $chardir = $dos; - } else { - if (isset(TCPDF_FONT_DATA::$uni_type[$ta[$i]])) { - $chardir = TCPDF_FONT_DATA::$uni_type[$ta[$i]]; - } else { - $chardir = 'L'; - } - } - // stores string characters and other information - $chardata[] = array('char' => $ta[$i], 'level' => $cel, 'type' => $chardir, 'sor' => $sor, 'eor' => $eor); - } - } // end for each char - - // X8. All explicit directional embeddings and overrides are completely terminated at the end of each paragraph. Paragraph separators are not included in the embedding. - // X9. Remove all RLE, LRE, RLO, LRO, PDF, and BN codes. - // X10. The remaining rules are applied to each run of characters at the same level. For each run, determine the start-of-level-run (sor) and end-of-level-run (eor) type, either L or R. This depends on the higher of the two levels on either side of the boundary (at the start or end of the paragraph, the level of the 'other' run is the base embedding level). If the higher level is odd, the type is R; otherwise, it is L. - - // 3.3.3 Resolving Weak Types - // Weak types are now resolved one level run at a time. At level run boundaries where the type of the character on the other side of the boundary is required, the type assigned to sor or eor is used. - // Nonspacing marks are now resolved based on the previous characters. - $numchars = count($chardata); - - // W1. Examine each nonspacing mark (NSM) in the level run, and change the type of the NSM to the type of the previous character. If the NSM is at the start of the level run, it will get the type of sor. - $prevlevel = -1; // track level changes - $levcount = 0; // counts consecutive chars at the same level - for ($i=0; $i < $numchars; ++$i) { - if ($chardata[$i]['type'] == 'NSM') { - if ($levcount) { - $chardata[$i]['type'] = $chardata[$i]['sor']; - } elseif ($i > 0) { - $chardata[$i]['type'] = $chardata[($i-1)]['type']; - } - } - if ($chardata[$i]['level'] != $prevlevel) { - $levcount = 0; - } else { - ++$levcount; - } - $prevlevel = $chardata[$i]['level']; - } - - // W2. Search backward from each instance of a European number until the first strong type (R, L, AL, or sor) is found. If an AL is found, change the type of the European number to Arabic number. - $prevlevel = -1; - $levcount = 0; - for ($i=0; $i < $numchars; ++$i) { - if ($chardata[$i]['char'] == 'EN') { - for ($j=$levcount; $j >= 0; $j--) { - if ($chardata[$j]['type'] == 'AL') { - $chardata[$i]['type'] = 'AN'; - } elseif (($chardata[$j]['type'] == 'L') OR ($chardata[$j]['type'] == 'R')) { - break; - } - } - } - if ($chardata[$i]['level'] != $prevlevel) { - $levcount = 0; - } else { - ++$levcount; - } - $prevlevel = $chardata[$i]['level']; - } - - // W3. Change all ALs to R. - for ($i=0; $i < $numchars; ++$i) { - if ($chardata[$i]['type'] == 'AL') { - $chardata[$i]['type'] = 'R'; - } - } - - // W4. A single European separator between two European numbers changes to a European number. A single common separator between two numbers of the same type changes to that type. - $prevlevel = -1; - $levcount = 0; - for ($i=0; $i < $numchars; ++$i) { - if (($levcount > 0) AND (($i+1) < $numchars) AND ($chardata[($i+1)]['level'] == $prevlevel)) { - if (($chardata[$i]['type'] == 'ES') AND ($chardata[($i-1)]['type'] == 'EN') AND ($chardata[($i+1)]['type'] == 'EN')) { - $chardata[$i]['type'] = 'EN'; - } elseif (($chardata[$i]['type'] == 'CS') AND ($chardata[($i-1)]['type'] == 'EN') AND ($chardata[($i+1)]['type'] == 'EN')) { - $chardata[$i]['type'] = 'EN'; - } elseif (($chardata[$i]['type'] == 'CS') AND ($chardata[($i-1)]['type'] == 'AN') AND ($chardata[($i+1)]['type'] == 'AN')) { - $chardata[$i]['type'] = 'AN'; - } - } - if ($chardata[$i]['level'] != $prevlevel) { - $levcount = 0; - } else { - ++$levcount; - } - $prevlevel = $chardata[$i]['level']; - } - - // W5. A sequence of European terminators adjacent to European numbers changes to all European numbers. - $prevlevel = -1; - $levcount = 0; - for ($i=0; $i < $numchars; ++$i) { - if ($chardata[$i]['type'] == 'ET') { - if (($levcount > 0) AND ($chardata[($i-1)]['type'] == 'EN')) { - $chardata[$i]['type'] = 'EN'; - } else { - $j = $i+1; - while (($j < $numchars) AND ($chardata[$j]['level'] == $prevlevel)) { - if ($chardata[$j]['type'] == 'EN') { - $chardata[$i]['type'] = 'EN'; - break; - } elseif ($chardata[$j]['type'] != 'ET') { - break; - } - ++$j; - } - } - } - if ($chardata[$i]['level'] != $prevlevel) { - $levcount = 0; - } else { - ++$levcount; - } - $prevlevel = $chardata[$i]['level']; - } - - // W6. Otherwise, separators and terminators change to Other Neutral. - $prevlevel = -1; - $levcount = 0; - for ($i=0; $i < $numchars; ++$i) { - if (($chardata[$i]['type'] == 'ET') OR ($chardata[$i]['type'] == 'ES') OR ($chardata[$i]['type'] == 'CS')) { - $chardata[$i]['type'] = 'ON'; - } - if ($chardata[$i]['level'] != $prevlevel) { - $levcount = 0; - } else { - ++$levcount; - } - $prevlevel = $chardata[$i]['level']; - } - - //W7. Search backward from each instance of a European number until the first strong type (R, L, or sor) is found. If an L is found, then change the type of the European number to L. - $prevlevel = -1; - $levcount = 0; - for ($i=0; $i < $numchars; ++$i) { - if ($chardata[$i]['char'] == 'EN') { - for ($j=$levcount; $j >= 0; $j--) { - if ($chardata[$j]['type'] == 'L') { - $chardata[$i]['type'] = 'L'; - } elseif ($chardata[$j]['type'] == 'R') { - break; - } - } - } - if ($chardata[$i]['level'] != $prevlevel) { - $levcount = 0; - } else { - ++$levcount; - } - $prevlevel = $chardata[$i]['level']; - } - - // N1. A sequence of neutrals takes the direction of the surrounding strong text if the text on both sides has the same direction. European and Arabic numbers act as if they were R in terms of their influence on neutrals. Start-of-level-run (sor) and end-of-level-run (eor) are used at level run boundaries. - $prevlevel = -1; - $levcount = 0; - for ($i=0; $i < $numchars; ++$i) { - if (($levcount > 0) AND (($i+1) < $numchars) AND ($chardata[($i+1)]['level'] == $prevlevel)) { - if (($chardata[$i]['type'] == 'N') AND ($chardata[($i-1)]['type'] == 'L') AND ($chardata[($i+1)]['type'] == 'L')) { - $chardata[$i]['type'] = 'L'; - } elseif (($chardata[$i]['type'] == 'N') AND - (($chardata[($i-1)]['type'] == 'R') OR ($chardata[($i-1)]['type'] == 'EN') OR ($chardata[($i-1)]['type'] == 'AN')) AND - (($chardata[($i+1)]['type'] == 'R') OR ($chardata[($i+1)]['type'] == 'EN') OR ($chardata[($i+1)]['type'] == 'AN'))) { - $chardata[$i]['type'] = 'R'; - } elseif ($chardata[$i]['type'] == 'N') { - // N2. Any remaining neutrals take the embedding direction - $chardata[$i]['type'] = $chardata[$i]['sor']; - } - } elseif (($levcount == 0) AND (($i+1) < $numchars) AND ($chardata[($i+1)]['level'] == $prevlevel)) { - // first char - if (($chardata[$i]['type'] == 'N') AND ($chardata[$i]['sor'] == 'L') AND ($chardata[($i+1)]['type'] == 'L')) { - $chardata[$i]['type'] = 'L'; - } elseif (($chardata[$i]['type'] == 'N') AND - (($chardata[$i]['sor'] == 'R') OR ($chardata[$i]['sor'] == 'EN') OR ($chardata[$i]['sor'] == 'AN')) AND - (($chardata[($i+1)]['type'] == 'R') OR ($chardata[($i+1)]['type'] == 'EN') OR ($chardata[($i+1)]['type'] == 'AN'))) { - $chardata[$i]['type'] = 'R'; - } elseif ($chardata[$i]['type'] == 'N') { - // N2. Any remaining neutrals take the embedding direction - $chardata[$i]['type'] = $chardata[$i]['sor']; - } - } elseif (($levcount > 0) AND ((($i+1) == $numchars) OR (($i+1) < $numchars) AND ($chardata[($i+1)]['level'] != $prevlevel))) { - //last char - if (($chardata[$i]['type'] == 'N') AND ($chardata[($i-1)]['type'] == 'L') AND ($chardata[$i]['eor'] == 'L')) { - $chardata[$i]['type'] = 'L'; - } elseif (($chardata[$i]['type'] == 'N') AND - (($chardata[($i-1)]['type'] == 'R') OR ($chardata[($i-1)]['type'] == 'EN') OR ($chardata[($i-1)]['type'] == 'AN')) AND - (($chardata[$i]['eor'] == 'R') OR ($chardata[$i]['eor'] == 'EN') OR ($chardata[$i]['eor'] == 'AN'))) { - $chardata[$i]['type'] = 'R'; - } elseif ($chardata[$i]['type'] == 'N') { - // N2. Any remaining neutrals take the embedding direction - $chardata[$i]['type'] = $chardata[$i]['sor']; - } - } elseif ($chardata[$i]['type'] == 'N') { - // N2. Any remaining neutrals take the embedding direction - $chardata[$i]['type'] = $chardata[$i]['sor']; - } - if ($chardata[$i]['level'] != $prevlevel) { - $levcount = 0; - } else { - ++$levcount; - } - $prevlevel = $chardata[$i]['level']; - } - - // I1. For all characters with an even (left-to-right) embedding direction, those of type R go up one level and those of type AN or EN go up two levels. - // I2. For all characters with an odd (right-to-left) embedding direction, those of type L, EN or AN go up one level. - for ($i=0; $i < $numchars; ++$i) { - $odd = $chardata[$i]['level'] % 2; - if ($odd) { - if (($chardata[$i]['type'] == 'L') OR ($chardata[$i]['type'] == 'AN') OR ($chardata[$i]['type'] == 'EN')) { - $chardata[$i]['level'] += 1; - } - } else { - if ($chardata[$i]['type'] == 'R') { - $chardata[$i]['level'] += 1; - } elseif (($chardata[$i]['type'] == 'AN') OR ($chardata[$i]['type'] == 'EN')) { - $chardata[$i]['level'] += 2; - } - } - $maxlevel = max($chardata[$i]['level'],$maxlevel); - } - - // L1. On each line, reset the embedding level of the following characters to the paragraph embedding level: - // 1. Segment separators, - // 2. Paragraph separators, - // 3. Any sequence of whitespace characters preceding a segment separator or paragraph separator, and - // 4. Any sequence of white space characters at the end of the line. - for ($i=0; $i < $numchars; ++$i) { - if (($chardata[$i]['type'] == 'B') OR ($chardata[$i]['type'] == 'S')) { - $chardata[$i]['level'] = $pel; - } elseif ($chardata[$i]['type'] == 'WS') { - $j = $i+1; - while ($j < $numchars) { - if ((($chardata[$j]['type'] == 'B') OR ($chardata[$j]['type'] == 'S')) OR - (($j == ($numchars-1)) AND ($chardata[$j]['type'] == 'WS'))) { - $chardata[$i]['level'] = $pel; - break; - } elseif ($chardata[$j]['type'] != 'WS') { - break; - } - ++$j; - } - } - } - - // Arabic Shaping - // Cursively connected scripts, such as Arabic or Syriac, require the selection of positional character shapes that depend on adjacent characters. Shaping is logically applied after the Bidirectional Algorithm is used and is limited to characters within the same directional run. - if ($arabic) { - $endedletter = array(1569,1570,1571,1572,1573,1575,1577,1583,1584,1585,1586,1608,1688); - $alfletter = array(1570,1571,1573,1575); - $chardata2 = $chardata; - $laaletter = false; - $charAL = array(); - $x = 0; - for ($i=0; $i < $numchars; ++$i) { - if ((TCPDF_FONT_DATA::$uni_type[$chardata[$i]['char']] == 'AL') OR ($chardata[$i]['char'] == 32) OR ($chardata[$i]['char'] == 8204)) { - $charAL[$x] = $chardata[$i]; - $charAL[$x]['i'] = $i; - $chardata[$i]['x'] = $x; - ++$x; - } - } - $numAL = $x; - for ($i=0; $i < $numchars; ++$i) { - $thischar = $chardata[$i]; - if ($i > 0) { - $prevchar = $chardata[($i-1)]; - } else { - $prevchar = false; - } - if (($i+1) < $numchars) { - $nextchar = $chardata[($i+1)]; - } else { - $nextchar = false; - } - if (TCPDF_FONT_DATA::$uni_type[$thischar['char']] == 'AL') { - $x = $thischar['x']; - if ($x > 0) { - $prevchar = $charAL[($x-1)]; - } else { - $prevchar = false; - } - if (($x+1) < $numAL) { - $nextchar = $charAL[($x+1)]; - } else { - $nextchar = false; - } - // if laa letter - if (($prevchar !== false) AND ($prevchar['char'] == 1604) AND (in_array($thischar['char'], $alfletter))) { - $arabicarr = TCPDF_FONT_DATA::$uni_laa_array; - $laaletter = true; - if ($x > 1) { - $prevchar = $charAL[($x-2)]; - } else { - $prevchar = false; - } - } else { - $arabicarr = TCPDF_FONT_DATA::$uni_arabicsubst; - $laaletter = false; - } - if (($prevchar !== false) AND ($nextchar !== false) AND - ((TCPDF_FONT_DATA::$uni_type[$prevchar['char']] == 'AL') OR (TCPDF_FONT_DATA::$uni_type[$prevchar['char']] == 'NSM')) AND - ((TCPDF_FONT_DATA::$uni_type[$nextchar['char']] == 'AL') OR (TCPDF_FONT_DATA::$uni_type[$nextchar['char']] == 'NSM')) AND - ($prevchar['type'] == $thischar['type']) AND - ($nextchar['type'] == $thischar['type']) AND - ($nextchar['char'] != 1567)) { - if (in_array($prevchar['char'], $endedletter)) { - if (isset($arabicarr[$thischar['char']][2])) { - // initial - $chardata2[$i]['char'] = $arabicarr[$thischar['char']][2]; - } - } else { - if (isset($arabicarr[$thischar['char']][3])) { - // medial - $chardata2[$i]['char'] = $arabicarr[$thischar['char']][3]; - } - } - } elseif (($nextchar !== false) AND - ((TCPDF_FONT_DATA::$uni_type[$nextchar['char']] == 'AL') OR (TCPDF_FONT_DATA::$uni_type[$nextchar['char']] == 'NSM')) AND - ($nextchar['type'] == $thischar['type']) AND - ($nextchar['char'] != 1567)) { - if (isset($arabicarr[$chardata[$i]['char']][2])) { - // initial - $chardata2[$i]['char'] = $arabicarr[$thischar['char']][2]; - } - } elseif ((($prevchar !== false) AND - ((TCPDF_FONT_DATA::$uni_type[$prevchar['char']] == 'AL') OR (TCPDF_FONT_DATA::$uni_type[$prevchar['char']] == 'NSM')) AND - ($prevchar['type'] == $thischar['type'])) OR - (($nextchar !== false) AND ($nextchar['char'] == 1567))) { - // final - if (($i > 1) AND ($thischar['char'] == 1607) AND - ($chardata[$i-1]['char'] == 1604) AND - ($chardata[$i-2]['char'] == 1604)) { - //Allah Word - // mark characters to delete with false - $chardata2[$i-2]['char'] = false; - $chardata2[$i-1]['char'] = false; - $chardata2[$i]['char'] = 65010; - } else { - if (($prevchar !== false) AND in_array($prevchar['char'], $endedletter)) { - if (isset($arabicarr[$thischar['char']][0])) { - // isolated - $chardata2[$i]['char'] = $arabicarr[$thischar['char']][0]; - } - } else { - if (isset($arabicarr[$thischar['char']][1])) { - // final - $chardata2[$i]['char'] = $arabicarr[$thischar['char']][1]; - } - } - } - } elseif (isset($arabicarr[$thischar['char']][0])) { - // isolated - $chardata2[$i]['char'] = $arabicarr[$thischar['char']][0]; - } - // if laa letter - if ($laaletter) { - // mark characters to delete with false - $chardata2[($charAL[($x-1)]['i'])]['char'] = false; - } - } // end if AL (Arabic Letter) - } // end for each char - /* - * Combining characters that can occur with Arabic Shadda (0651 HEX, 1617 DEC) are replaced. - * Putting the combining mark and shadda in the same glyph allows us to avoid the two marks overlapping each other in an illegible manner. - */ - for ($i = 0; $i < ($numchars-1); ++$i) { - if (($chardata2[$i]['char'] == 1617) AND (isset(TCPDF_FONT_DATA::$uni_diacritics[($chardata2[$i+1]['char'])]))) { - // check if the subtitution font is defined on current font - if (isset($currentfont['cw'][(TCPDF_FONT_DATA::$uni_diacritics[($chardata2[$i+1]['char'])])])) { - $chardata2[$i]['char'] = false; - $chardata2[$i+1]['char'] = TCPDF_FONT_DATA::$uni_diacritics[($chardata2[$i+1]['char'])]; - } - } - } - // remove marked characters - foreach ($chardata2 as $key => $value) { - if ($value['char'] === false) { - unset($chardata2[$key]); - } - } - $chardata = array_values($chardata2); - $numchars = count($chardata); - unset($chardata2); - unset($arabicarr); - unset($laaletter); - unset($charAL); - } - - // L2. From the highest level found in the text to the lowest odd level on each line, including intermediate levels not actually present in the text, reverse any contiguous sequence of characters that are at that level or higher. - for ($j=$maxlevel; $j > 0; $j--) { - $ordarray = Array(); - $revarr = Array(); - $onlevel = false; - for ($i=0; $i < $numchars; ++$i) { - if ($chardata[$i]['level'] >= $j) { - $onlevel = true; - if (isset(TCPDF_FONT_DATA::$uni_mirror[$chardata[$i]['char']])) { - // L4. A character is depicted by a mirrored glyph if and only if (a) the resolved directionality of that character is R, and (b) the Bidi_Mirrored property value of that character is true. - $chardata[$i]['char'] = TCPDF_FONT_DATA::$uni_mirror[$chardata[$i]['char']]; - } - $revarr[] = $chardata[$i]; - } else { - if ($onlevel) { - $revarr = array_reverse($revarr); - $ordarray = array_merge($ordarray, $revarr); - $revarr = Array(); - $onlevel = false; - } - $ordarray[] = $chardata[$i]; - } - } - if ($onlevel) { - $revarr = array_reverse($revarr); - $ordarray = array_merge($ordarray, $revarr); - } - $chardata = $ordarray; - } - $ordarray = array(); - foreach ($chardata as $cd) { - $ordarray[] = $cd['char']; - // store char values for subsetting - $currentfont['subsetchars'][$cd['char']] = true; - } - return $ordarray; - } - - /** - * Get a reference font size. - * @param $size (string) String containing font size value. - * @param $refsize (float) Reference font size in points. - * @return float value in points - * @public static - */ - public static function getFontRefSize($size, $refsize=12) { - switch ($size) { - case 'xx-small': { - $size = ($refsize - 4); - break; - } - case 'x-small': { - $size = ($refsize - 3); - break; - } - case 'small': { - $size = ($refsize - 2); - break; - } - case 'medium': { - $size = $refsize; - break; - } - case 'large': { - $size = ($refsize + 2); - break; - } - case 'x-large': { - $size = ($refsize + 4); - break; - } - case 'xx-large': { - $size = ($refsize + 6); - break; - } - case 'smaller': { - $size = ($refsize - 3); - break; - } - case 'larger': { - $size = ($refsize + 3); - break; - } - } - return $size; - } - -} // END OF TCPDF_FONTS CLASS - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/html/lib/tcpdf/include/tcpdf_images.php b/html/lib/tcpdf/include/tcpdf_images.php deleted file mode 100644 index c7ae9bd967..0000000000 --- a/html/lib/tcpdf/include/tcpdf_images.php +++ /dev/null @@ -1,355 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// Description : -// Static image methods used by the TCPDF class. -// -//============================================================+ - -/** - * @file - * This is a PHP class that contains static image methods for the TCPDF class.
        - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.0.005 - */ - -/** - * @class TCPDF_IMAGES - * Static image methods used by the TCPDF class. - * @package com.tecnick.tcpdf - * @brief PHP class for generating PDF documents without requiring external extensions. - * @version 1.0.005 - * @author Nicola Asuni - info@tecnick.com - */ -class TCPDF_IMAGES { - - /** - * Array of hinheritable SVG properties. - * @since 5.0.000 (2010-05-02) - * @public static - */ - public static $svginheritprop = array('clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cursor', 'direction', 'display', 'fill', 'fill-opacity', 'fill-rule', 'font', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'image-rendering', 'kerning', 'letter-spacing', 'marker', 'marker-end', 'marker-mid', 'marker-start', 'pointer-events', 'shape-rendering', 'stroke', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-rendering', 'visibility', 'word-spacing', 'writing-mode'); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** - * Return the image type given the file name or array returned by getimagesize() function. - * @param $imgfile (string) image file name - * @param $iminfo (array) array of image information returned by getimagesize() function. - * @return string image type - * @since 4.8.017 (2009-11-27) - * @public static - */ - public static function getImageFileType($imgfile, $iminfo=array()) { - $type = ''; - if (isset($iminfo['mime']) AND !empty($iminfo['mime'])) { - $mime = explode('/', $iminfo['mime']); - if ((count($mime) > 1) AND ($mime[0] == 'image') AND (!empty($mime[1]))) { - $type = strtolower(trim($mime[1])); - } - } - if (empty($type)) { - $fileinfo = pathinfo($imgfile); - if (isset($fileinfo['extension']) AND (!TCPDF_STATIC::empty_string($fileinfo['extension']))) { - $type = strtolower(trim($fileinfo['extension'])); - } - } - if ($type == 'jpg') { - $type = 'jpeg'; - } - return $type; - } - - /** - * Set the transparency for the given GD image. - * @param $new_image (image) GD image object - * @param $image (image) GD image object. - * return GD image object. - * @since 4.9.016 (2010-04-20) - * @public static - */ - public static function setGDImageTransparency($new_image, $image) { - // default transparency color (white) - $tcol = array('red' => 255, 'green' => 255, 'blue' => 255); - // transparency index - $tid = imagecolortransparent($image); - $palletsize = imagecolorstotal($image); - if (($tid >= 0) AND ($tid < $palletsize)) { - // get the colors for the transparency index - $tcol = imagecolorsforindex($image, $tid); - } - $tid = imagecolorallocate($new_image, $tcol['red'], $tcol['green'], $tcol['blue']); - imagefill($new_image, 0, 0, $tid); - imagecolortransparent($new_image, $tid); - return $new_image; - } - - /** - * Convert the loaded image to a PNG and then return a structure for the PDF creator. - * This function requires GD library and write access to the directory defined on K_PATH_CACHE constant. - * @param $image (image) Image object. - * @param $tempfile (string) Temporary file name. - * return image PNG image object. - * @since 4.9.016 (2010-04-20) - * @public static - */ - public static function _toPNG($image, $tempfile) { - // turn off interlaced mode - imageinterlace($image, 0); - // create temporary PNG image - imagepng($image, $tempfile); - // remove image from memory - imagedestroy($image); - // get PNG image data - $retvars = self::_parsepng($tempfile); - // tidy up by removing temporary image - unlink($tempfile); - return $retvars; - } - - /** - * Convert the loaded image to a JPEG and then return a structure for the PDF creator. - * This function requires GD library and write access to the directory defined on K_PATH_CACHE constant. - * @param $image (image) Image object. - * @param $quality (int) JPEG quality. - * @param $tempfile (string) Temporary file name. - * return image JPEG image object. - * @public static - */ - public static function _toJPEG($image, $quality, $tempfile) { - imagejpeg($image, $tempfile, $quality); - imagedestroy($image); - $retvars = self::_parsejpeg($tempfile); - // tidy up by removing temporary image - unlink($tempfile); - return $retvars; - } - - /** - * Extract info from a JPEG file without using the GD library. - * @param $file (string) image file to parse - * @return array structure containing the image data - * @public static - */ - public static function _parsejpeg($file) { - $a = getimagesize($file); - if (empty($a)) { - //Missing or incorrect image file - return false; - } - if ($a[2] != 2) { - // Not a JPEG file - return false; - } - // bits per pixel - $bpc = isset($a['bits']) ? intval($a['bits']) : 8; - // number of image channels - if (!isset($a['channels'])) { - $channels = 3; - } else { - $channels = intval($a['channels']); - } - // default colour space - switch ($channels) { - case 1: { - $colspace = 'DeviceGray'; - break; - } - case 3: { - $colspace = 'DeviceRGB'; - break; - } - case 4: { - $colspace = 'DeviceCMYK'; - break; - } - default: { - $channels = 3; - $colspace = 'DeviceRGB'; - break; - } - } - // get file content - $data = file_get_contents($file); - // check for embedded ICC profile - $icc = array(); - $offset = 0; - while (($pos = strpos($data, "ICC_PROFILE\0", $offset)) !== false) { - // get ICC sequence length - $length = (TCPDF_STATIC::_getUSHORT($data, ($pos - 2)) - 16); - // marker sequence number - $msn = max(1, ord($data[($pos + 12)])); - // number of markers (total of APP2 used) - $nom = max(1, ord($data[($pos + 13)])); - // get sequence segment - $icc[($msn - 1)] = substr($data, ($pos + 14), $length); - // move forward to next sequence - $offset = ($pos + 14 + $length); - } - // order and compact ICC segments - if (count($icc) > 0) { - ksort($icc); - $icc = implode('', $icc); - if ((ord($icc[36]) != 0x61) OR (ord($icc[37]) != 0x63) OR (ord($icc[38]) != 0x73) OR (ord($icc[39]) != 0x70)) { - // invalid ICC profile - $icc = false; - } - } else { - $icc = false; - } - return array('w' => $a[0], 'h' => $a[1], 'ch' => $channels, 'icc' => $icc, 'cs' => $colspace, 'bpc' => $bpc, 'f' => 'DCTDecode', 'data' => $data); - } - - /** - * Extract info from a PNG file without using the GD library. - * @param $file (string) image file to parse - * @return array structure containing the image data - * @public static - */ - public static function _parsepng($file) { - $f = @fopen($file, 'rb'); - if ($f === false) { - // Can't open image file - return false; - } - //Check signature - if (fread($f, 8) != chr(137).'PNG'.chr(13).chr(10).chr(26).chr(10)) { - // Not a PNG file - return false; - } - //Read header chunk - fread($f, 4); - if (fread($f, 4) != 'IHDR') { - //Incorrect PNG file - return false; - } - $w = TCPDF_STATIC::_freadint($f); - $h = TCPDF_STATIC::_freadint($f); - $bpc = ord(fread($f, 1)); - $ct = ord(fread($f, 1)); - if ($ct == 0) { - $colspace = 'DeviceGray'; - } elseif ($ct == 2) { - $colspace = 'DeviceRGB'; - } elseif ($ct == 3) { - $colspace = 'Indexed'; - } else { - // alpha channel - fclose($f); - return 'pngalpha'; - } - if (ord(fread($f, 1)) != 0) { - // Unknown compression method - fclose($f); - return false; - } - if (ord(fread($f, 1)) != 0) { - // Unknown filter method - fclose($f); - return false; - } - if (ord(fread($f, 1)) != 0) { - // Interlacing not supported - fclose($f); - return false; - } - fread($f, 4); - $channels = ($ct == 2 ? 3 : 1); - $parms = '/DecodeParms << /Predictor 15 /Colors '.$channels.' /BitsPerComponent '.$bpc.' /Columns '.$w.' >>'; - //Scan chunks looking for palette, transparency and image data - $pal = ''; - $trns = ''; - $data = ''; - $icc = false; - do { - $n = TCPDF_STATIC::_freadint($f); - $type = fread($f, 4); - if ($type == 'PLTE') { - // read palette - $pal = TCPDF_STATIC::rfread($f, $n); - fread($f, 4); - } elseif ($type == 'tRNS') { - // read transparency info - $t = TCPDF_STATIC::rfread($f, $n); - if ($ct == 0) { // DeviceGray - $trns = array(ord($t[1])); - } elseif ($ct == 2) { // DeviceRGB - $trns = array(ord($t[1]), ord($t[3]), ord($t[5])); - } else { // Indexed - if ($n > 0) { - $trns = array(); - for ($i = 0; $i < $n; ++ $i) { - $trns[] = ord($t{$i}); - } - } - } - fread($f, 4); - } elseif ($type == 'IDAT') { - // read image data block - $data .= TCPDF_STATIC::rfread($f, $n); - fread($f, 4); - } elseif ($type == 'iCCP') { - // skip profile name - $len = 0; - while ((ord(fread($f, 1)) != 0) AND ($len < 80)) { - ++$len; - } - // get compression method - if (ord(fread($f, 1)) != 0) { - // Unknown filter method - fclose($f); - return false; - } - // read ICC Color Profile - $icc = TCPDF_STATIC::rfread($f, ($n - $len - 2)); - // decompress profile - $icc = gzuncompress($icc); - fread($f, 4); - } elseif ($type == 'IEND') { - break; - } else { - TCPDF_STATIC::rfread($f, $n + 4); - } - } while ($n); - if (($colspace == 'Indexed') AND (empty($pal))) { - // Missing palette - fclose($f); - return false; - } - fclose($f); - return array('w' => $w, 'h' => $h, 'ch' => $channels, 'icc' => $icc, 'cs' => $colspace, 'bpc' => $bpc, 'f' => 'FlateDecode', 'parms' => $parms, 'pal' => $pal, 'trns' => $trns, 'data' => $data); - } - -} // END OF TCPDF_IMAGES CLASS - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/html/lib/tcpdf/include/tcpdf_static.php b/html/lib/tcpdf/include/tcpdf_static.php deleted file mode 100644 index e947832d24..0000000000 --- a/html/lib/tcpdf/include/tcpdf_static.php +++ /dev/null @@ -1,2528 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// Description : -// Static methods used by the TCPDF class. -// -//============================================================+ - -/** - * @file - * This is a PHP class that contains static methods for the TCPDF class.
        - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.1.2 - */ - -/** - * @class TCPDF_STATIC - * Static methods used by the TCPDF class. - * @package com.tecnick.tcpdf - * @brief PHP class for generating PDF documents without requiring external extensions. - * @version 1.1.1 - * @author Nicola Asuni - info@tecnick.com - */ -class TCPDF_STATIC { - - /** - * Current TCPDF version. - * @private static - */ - private static $tcpdf_version = '6.2.6'; - - /** - * String alias for total number of pages. - * @public static - */ - public static $alias_tot_pages = '{:ptp:}'; - - /** - * String alias for page number. - * @public static - */ - public static $alias_num_page = '{:pnp:}'; - - /** - * String alias for total number of pages in a single group. - * @public static - */ - public static $alias_group_tot_pages = '{:ptg:}'; - - /** - * String alias for group page number. - * @public static - */ - public static $alias_group_num_page = '{:png:}'; - - /** - * String alias for right shift compensation used to correctly align page numbers on the right. - * @public static - */ - public static $alias_right_shift = '{rsc:'; - - /** - * Encryption padding string. - * @public static - */ - public static $enc_padding = "\x28\xBF\x4E\x5E\x4E\x75\x8A\x41\x64\x00\x4E\x56\xFF\xFA\x01\x08\x2E\x2E\x00\xB6\xD0\x68\x3E\x80\x2F\x0C\xA9\xFE\x64\x53\x69\x7A"; - - /** - * ByteRange placemark used during digital signature process. - * @since 4.6.028 (2009-08-25) - * @public static - */ - public static $byterange_string = '/ByteRange[0 ********** ********** **********]'; - - /** - * Array page boxes names - * @public static - */ - public static $pageboxes = array('MediaBox', 'CropBox', 'BleedBox', 'TrimBox', 'ArtBox'); - - /** - * Array of page formats - * measures are calculated in this way: (inches * 72) or (millimeters * 72 / 25.4) - * @public static - */ - public static $page_formats = array( - // ISO 216 A Series + 2 SIS 014711 extensions - 'A0' => array( 2383.937, 3370.394), // = ( 841 x 1189 ) mm = ( 33.11 x 46.81 ) in - 'A1' => array( 1683.780, 2383.937), // = ( 594 x 841 ) mm = ( 23.39 x 33.11 ) in - 'A2' => array( 1190.551, 1683.780), // = ( 420 x 594 ) mm = ( 16.54 x 23.39 ) in - 'A3' => array( 841.890, 1190.551), // = ( 297 x 420 ) mm = ( 11.69 x 16.54 ) in - 'A4' => array( 595.276, 841.890), // = ( 210 x 297 ) mm = ( 8.27 x 11.69 ) in - 'A5' => array( 419.528, 595.276), // = ( 148 x 210 ) mm = ( 5.83 x 8.27 ) in - 'A6' => array( 297.638, 419.528), // = ( 105 x 148 ) mm = ( 4.13 x 5.83 ) in - 'A7' => array( 209.764, 297.638), // = ( 74 x 105 ) mm = ( 2.91 x 4.13 ) in - 'A8' => array( 147.402, 209.764), // = ( 52 x 74 ) mm = ( 2.05 x 2.91 ) in - 'A9' => array( 104.882, 147.402), // = ( 37 x 52 ) mm = ( 1.46 x 2.05 ) in - 'A10' => array( 73.701, 104.882), // = ( 26 x 37 ) mm = ( 1.02 x 1.46 ) in - 'A11' => array( 51.024, 73.701), // = ( 18 x 26 ) mm = ( 0.71 x 1.02 ) in - 'A12' => array( 36.850, 51.024), // = ( 13 x 18 ) mm = ( 0.51 x 0.71 ) in - // ISO 216 B Series + 2 SIS 014711 extensions - 'B0' => array( 2834.646, 4008.189), // = ( 1000 x 1414 ) mm = ( 39.37 x 55.67 ) in - 'B1' => array( 2004.094, 2834.646), // = ( 707 x 1000 ) mm = ( 27.83 x 39.37 ) in - 'B2' => array( 1417.323, 2004.094), // = ( 500 x 707 ) mm = ( 19.69 x 27.83 ) in - 'B3' => array( 1000.630, 1417.323), // = ( 353 x 500 ) mm = ( 13.90 x 19.69 ) in - 'B4' => array( 708.661, 1000.630), // = ( 250 x 353 ) mm = ( 9.84 x 13.90 ) in - 'B5' => array( 498.898, 708.661), // = ( 176 x 250 ) mm = ( 6.93 x 9.84 ) in - 'B6' => array( 354.331, 498.898), // = ( 125 x 176 ) mm = ( 4.92 x 6.93 ) in - 'B7' => array( 249.449, 354.331), // = ( 88 x 125 ) mm = ( 3.46 x 4.92 ) in - 'B8' => array( 175.748, 249.449), // = ( 62 x 88 ) mm = ( 2.44 x 3.46 ) in - 'B9' => array( 124.724, 175.748), // = ( 44 x 62 ) mm = ( 1.73 x 2.44 ) in - 'B10' => array( 87.874, 124.724), // = ( 31 x 44 ) mm = ( 1.22 x 1.73 ) in - 'B11' => array( 62.362, 87.874), // = ( 22 x 31 ) mm = ( 0.87 x 1.22 ) in - 'B12' => array( 42.520, 62.362), // = ( 15 x 22 ) mm = ( 0.59 x 0.87 ) in - // ISO 216 C Series + 2 SIS 014711 extensions + 5 EXTENSION - 'C0' => array( 2599.370, 3676.535), // = ( 917 x 1297 ) mm = ( 36.10 x 51.06 ) in - 'C1' => array( 1836.850, 2599.370), // = ( 648 x 917 ) mm = ( 25.51 x 36.10 ) in - 'C2' => array( 1298.268, 1836.850), // = ( 458 x 648 ) mm = ( 18.03 x 25.51 ) in - 'C3' => array( 918.425, 1298.268), // = ( 324 x 458 ) mm = ( 12.76 x 18.03 ) in - 'C4' => array( 649.134, 918.425), // = ( 229 x 324 ) mm = ( 9.02 x 12.76 ) in - 'C5' => array( 459.213, 649.134), // = ( 162 x 229 ) mm = ( 6.38 x 9.02 ) in - 'C6' => array( 323.150, 459.213), // = ( 114 x 162 ) mm = ( 4.49 x 6.38 ) in - 'C7' => array( 229.606, 323.150), // = ( 81 x 114 ) mm = ( 3.19 x 4.49 ) in - 'C8' => array( 161.575, 229.606), // = ( 57 x 81 ) mm = ( 2.24 x 3.19 ) in - 'C9' => array( 113.386, 161.575), // = ( 40 x 57 ) mm = ( 1.57 x 2.24 ) in - 'C10' => array( 79.370, 113.386), // = ( 28 x 40 ) mm = ( 1.10 x 1.57 ) in - 'C11' => array( 56.693, 79.370), // = ( 20 x 28 ) mm = ( 0.79 x 1.10 ) in - 'C12' => array( 39.685, 56.693), // = ( 14 x 20 ) mm = ( 0.55 x 0.79 ) in - 'C76' => array( 229.606, 459.213), // = ( 81 x 162 ) mm = ( 3.19 x 6.38 ) in - 'DL' => array( 311.811, 623.622), // = ( 110 x 220 ) mm = ( 4.33 x 8.66 ) in - 'DLE' => array( 323.150, 637.795), // = ( 114 x 225 ) mm = ( 4.49 x 8.86 ) in - 'DLX' => array( 340.158, 666.142), // = ( 120 x 235 ) mm = ( 4.72 x 9.25 ) in - 'DLP' => array( 280.630, 595.276), // = ( 99 x 210 ) mm = ( 3.90 x 8.27 ) in (1/3 A4) - // SIS 014711 E Series - 'E0' => array( 2491.654, 3517.795), // = ( 879 x 1241 ) mm = ( 34.61 x 48.86 ) in - 'E1' => array( 1757.480, 2491.654), // = ( 620 x 879 ) mm = ( 24.41 x 34.61 ) in - 'E2' => array( 1247.244, 1757.480), // = ( 440 x 620 ) mm = ( 17.32 x 24.41 ) in - 'E3' => array( 878.740, 1247.244), // = ( 310 x 440 ) mm = ( 12.20 x 17.32 ) in - 'E4' => array( 623.622, 878.740), // = ( 220 x 310 ) mm = ( 8.66 x 12.20 ) in - 'E5' => array( 439.370, 623.622), // = ( 155 x 220 ) mm = ( 6.10 x 8.66 ) in - 'E6' => array( 311.811, 439.370), // = ( 110 x 155 ) mm = ( 4.33 x 6.10 ) in - 'E7' => array( 221.102, 311.811), // = ( 78 x 110 ) mm = ( 3.07 x 4.33 ) in - 'E8' => array( 155.906, 221.102), // = ( 55 x 78 ) mm = ( 2.17 x 3.07 ) in - 'E9' => array( 110.551, 155.906), // = ( 39 x 55 ) mm = ( 1.54 x 2.17 ) in - 'E10' => array( 76.535, 110.551), // = ( 27 x 39 ) mm = ( 1.06 x 1.54 ) in - 'E11' => array( 53.858, 76.535), // = ( 19 x 27 ) mm = ( 0.75 x 1.06 ) in - 'E12' => array( 36.850, 53.858), // = ( 13 x 19 ) mm = ( 0.51 x 0.75 ) in - // SIS 014711 G Series - 'G0' => array( 2715.591, 3838.110), // = ( 958 x 1354 ) mm = ( 37.72 x 53.31 ) in - 'G1' => array( 1919.055, 2715.591), // = ( 677 x 958 ) mm = ( 26.65 x 37.72 ) in - 'G2' => array( 1357.795, 1919.055), // = ( 479 x 677 ) mm = ( 18.86 x 26.65 ) in - 'G3' => array( 958.110, 1357.795), // = ( 338 x 479 ) mm = ( 13.31 x 18.86 ) in - 'G4' => array( 677.480, 958.110), // = ( 239 x 338 ) mm = ( 9.41 x 13.31 ) in - 'G5' => array( 479.055, 677.480), // = ( 169 x 239 ) mm = ( 6.65 x 9.41 ) in - 'G6' => array( 337.323, 479.055), // = ( 119 x 169 ) mm = ( 4.69 x 6.65 ) in - 'G7' => array( 238.110, 337.323), // = ( 84 x 119 ) mm = ( 3.31 x 4.69 ) in - 'G8' => array( 167.244, 238.110), // = ( 59 x 84 ) mm = ( 2.32 x 3.31 ) in - 'G9' => array( 119.055, 167.244), // = ( 42 x 59 ) mm = ( 1.65 x 2.32 ) in - 'G10' => array( 82.205, 119.055), // = ( 29 x 42 ) mm = ( 1.14 x 1.65 ) in - 'G11' => array( 59.528, 82.205), // = ( 21 x 29 ) mm = ( 0.83 x 1.14 ) in - 'G12' => array( 39.685, 59.528), // = ( 14 x 21 ) mm = ( 0.55 x 0.83 ) in - // ISO Press - 'RA0' => array( 2437.795, 3458.268), // = ( 860 x 1220 ) mm = ( 33.86 x 48.03 ) in - 'RA1' => array( 1729.134, 2437.795), // = ( 610 x 860 ) mm = ( 24.02 x 33.86 ) in - 'RA2' => array( 1218.898, 1729.134), // = ( 430 x 610 ) mm = ( 16.93 x 24.02 ) in - 'RA3' => array( 864.567, 1218.898), // = ( 305 x 430 ) mm = ( 12.01 x 16.93 ) in - 'RA4' => array( 609.449, 864.567), // = ( 215 x 305 ) mm = ( 8.46 x 12.01 ) in - 'SRA0' => array( 2551.181, 3628.346), // = ( 900 x 1280 ) mm = ( 35.43 x 50.39 ) in - 'SRA1' => array( 1814.173, 2551.181), // = ( 640 x 900 ) mm = ( 25.20 x 35.43 ) in - 'SRA2' => array( 1275.591, 1814.173), // = ( 450 x 640 ) mm = ( 17.72 x 25.20 ) in - 'SRA3' => array( 907.087, 1275.591), // = ( 320 x 450 ) mm = ( 12.60 x 17.72 ) in - 'SRA4' => array( 637.795, 907.087), // = ( 225 x 320 ) mm = ( 8.86 x 12.60 ) in - // German DIN 476 - '4A0' => array( 4767.874, 6740.787), // = ( 1682 x 2378 ) mm = ( 66.22 x 93.62 ) in - '2A0' => array( 3370.394, 4767.874), // = ( 1189 x 1682 ) mm = ( 46.81 x 66.22 ) in - // Variations on the ISO Standard - 'A2_EXTRA' => array( 1261.417, 1754.646), // = ( 445 x 619 ) mm = ( 17.52 x 24.37 ) in - 'A3+' => array( 932.598, 1369.134), // = ( 329 x 483 ) mm = ( 12.95 x 19.02 ) in - 'A3_EXTRA' => array( 912.756, 1261.417), // = ( 322 x 445 ) mm = ( 12.68 x 17.52 ) in - 'A3_SUPER' => array( 864.567, 1440.000), // = ( 305 x 508 ) mm = ( 12.01 x 20.00 ) in - 'SUPER_A3' => array( 864.567, 1380.472), // = ( 305 x 487 ) mm = ( 12.01 x 19.17 ) in - 'A4_EXTRA' => array( 666.142, 912.756), // = ( 235 x 322 ) mm = ( 9.25 x 12.68 ) in - 'A4_SUPER' => array( 649.134, 912.756), // = ( 229 x 322 ) mm = ( 9.02 x 12.68 ) in - 'SUPER_A4' => array( 643.465, 1009.134), // = ( 227 x 356 ) mm = ( 8.94 x 14.02 ) in - 'A4_LONG' => array( 595.276, 986.457), // = ( 210 x 348 ) mm = ( 8.27 x 13.70 ) in - 'F4' => array( 595.276, 935.433), // = ( 210 x 330 ) mm = ( 8.27 x 12.99 ) in - 'SO_B5_EXTRA' => array( 572.598, 782.362), // = ( 202 x 276 ) mm = ( 7.95 x 10.87 ) in - 'A5_EXTRA' => array( 490.394, 666.142), // = ( 173 x 235 ) mm = ( 6.81 x 9.25 ) in - // ANSI Series - 'ANSI_E' => array( 2448.000, 3168.000), // = ( 864 x 1118 ) mm = ( 34.00 x 44.00 ) in - 'ANSI_D' => array( 1584.000, 2448.000), // = ( 559 x 864 ) mm = ( 22.00 x 34.00 ) in - 'ANSI_C' => array( 1224.000, 1584.000), // = ( 432 x 559 ) mm = ( 17.00 x 22.00 ) in - 'ANSI_B' => array( 792.000, 1224.000), // = ( 279 x 432 ) mm = ( 11.00 x 17.00 ) in - 'ANSI_A' => array( 612.000, 792.000), // = ( 216 x 279 ) mm = ( 8.50 x 11.00 ) in - // Traditional 'Loose' North American Paper Sizes - 'USLEDGER' => array( 1224.000, 792.000), // = ( 432 x 279 ) mm = ( 17.00 x 11.00 ) in - 'LEDGER' => array( 1224.000, 792.000), // = ( 432 x 279 ) mm = ( 17.00 x 11.00 ) in - 'ORGANIZERK' => array( 792.000, 1224.000), // = ( 279 x 432 ) mm = ( 11.00 x 17.00 ) in - 'BIBLE' => array( 792.000, 1224.000), // = ( 279 x 432 ) mm = ( 11.00 x 17.00 ) in - 'USTABLOID' => array( 792.000, 1224.000), // = ( 279 x 432 ) mm = ( 11.00 x 17.00 ) in - 'TABLOID' => array( 792.000, 1224.000), // = ( 279 x 432 ) mm = ( 11.00 x 17.00 ) in - 'ORGANIZERM' => array( 612.000, 792.000), // = ( 216 x 279 ) mm = ( 8.50 x 11.00 ) in - 'USLETTER' => array( 612.000, 792.000), // = ( 216 x 279 ) mm = ( 8.50 x 11.00 ) in - 'LETTER' => array( 612.000, 792.000), // = ( 216 x 279 ) mm = ( 8.50 x 11.00 ) in - 'USLEGAL' => array( 612.000, 1008.000), // = ( 216 x 356 ) mm = ( 8.50 x 14.00 ) in - 'LEGAL' => array( 612.000, 1008.000), // = ( 216 x 356 ) mm = ( 8.50 x 14.00 ) in - 'GOVERNMENTLETTER' => array( 576.000, 756.000), // = ( 203 x 267 ) mm = ( 8.00 x 10.50 ) in - 'GLETTER' => array( 576.000, 756.000), // = ( 203 x 267 ) mm = ( 8.00 x 10.50 ) in - 'JUNIORLEGAL' => array( 576.000, 360.000), // = ( 203 x 127 ) mm = ( 8.00 x 5.00 ) in - 'JLEGAL' => array( 576.000, 360.000), // = ( 203 x 127 ) mm = ( 8.00 x 5.00 ) in - // Other North American Paper Sizes - 'QUADDEMY' => array( 2520.000, 3240.000), // = ( 889 x 1143 ) mm = ( 35.00 x 45.00 ) in - 'SUPER_B' => array( 936.000, 1368.000), // = ( 330 x 483 ) mm = ( 13.00 x 19.00 ) in - 'QUARTO' => array( 648.000, 792.000), // = ( 229 x 279 ) mm = ( 9.00 x 11.00 ) in - 'GOVERNMENTLEGAL' => array( 612.000, 936.000), // = ( 216 x 330 ) mm = ( 8.50 x 13.00 ) in - 'FOLIO' => array( 612.000, 936.000), // = ( 216 x 330 ) mm = ( 8.50 x 13.00 ) in - 'MONARCH' => array( 522.000, 756.000), // = ( 184 x 267 ) mm = ( 7.25 x 10.50 ) in - 'EXECUTIVE' => array( 522.000, 756.000), // = ( 184 x 267 ) mm = ( 7.25 x 10.50 ) in - 'ORGANIZERL' => array( 396.000, 612.000), // = ( 140 x 216 ) mm = ( 5.50 x 8.50 ) in - 'STATEMENT' => array( 396.000, 612.000), // = ( 140 x 216 ) mm = ( 5.50 x 8.50 ) in - 'MEMO' => array( 396.000, 612.000), // = ( 140 x 216 ) mm = ( 5.50 x 8.50 ) in - 'FOOLSCAP' => array( 595.440, 936.000), // = ( 210 x 330 ) mm = ( 8.27 x 13.00 ) in - 'COMPACT' => array( 306.000, 486.000), // = ( 108 x 171 ) mm = ( 4.25 x 6.75 ) in - 'ORGANIZERJ' => array( 198.000, 360.000), // = ( 70 x 127 ) mm = ( 2.75 x 5.00 ) in - // Canadian standard CAN 2-9.60M - 'P1' => array( 1587.402, 2437.795), // = ( 560 x 860 ) mm = ( 22.05 x 33.86 ) in - 'P2' => array( 1218.898, 1587.402), // = ( 430 x 560 ) mm = ( 16.93 x 22.05 ) in - 'P3' => array( 793.701, 1218.898), // = ( 280 x 430 ) mm = ( 11.02 x 16.93 ) in - 'P4' => array( 609.449, 793.701), // = ( 215 x 280 ) mm = ( 8.46 x 11.02 ) in - 'P5' => array( 396.850, 609.449), // = ( 140 x 215 ) mm = ( 5.51 x 8.46 ) in - 'P6' => array( 303.307, 396.850), // = ( 107 x 140 ) mm = ( 4.21 x 5.51 ) in - // North American Architectural Sizes - 'ARCH_E' => array( 2592.000, 3456.000), // = ( 914 x 1219 ) mm = ( 36.00 x 48.00 ) in - 'ARCH_E1' => array( 2160.000, 3024.000), // = ( 762 x 1067 ) mm = ( 30.00 x 42.00 ) in - 'ARCH_D' => array( 1728.000, 2592.000), // = ( 610 x 914 ) mm = ( 24.00 x 36.00 ) in - 'BROADSHEET' => array( 1296.000, 1728.000), // = ( 457 x 610 ) mm = ( 18.00 x 24.00 ) in - 'ARCH_C' => array( 1296.000, 1728.000), // = ( 457 x 610 ) mm = ( 18.00 x 24.00 ) in - 'ARCH_B' => array( 864.000, 1296.000), // = ( 305 x 457 ) mm = ( 12.00 x 18.00 ) in - 'ARCH_A' => array( 648.000, 864.000), // = ( 229 x 305 ) mm = ( 9.00 x 12.00 ) in - // -- North American Envelope Sizes - // - Announcement Envelopes - 'ANNENV_A2' => array( 314.640, 414.000), // = ( 111 x 146 ) mm = ( 4.37 x 5.75 ) in - 'ANNENV_A6' => array( 342.000, 468.000), // = ( 121 x 165 ) mm = ( 4.75 x 6.50 ) in - 'ANNENV_A7' => array( 378.000, 522.000), // = ( 133 x 184 ) mm = ( 5.25 x 7.25 ) in - 'ANNENV_A8' => array( 396.000, 584.640), // = ( 140 x 206 ) mm = ( 5.50 x 8.12 ) in - 'ANNENV_A10' => array( 450.000, 692.640), // = ( 159 x 244 ) mm = ( 6.25 x 9.62 ) in - 'ANNENV_SLIM' => array( 278.640, 638.640), // = ( 98 x 225 ) mm = ( 3.87 x 8.87 ) in - // - Commercial Envelopes - 'COMMENV_N6_1/4' => array( 252.000, 432.000), // = ( 89 x 152 ) mm = ( 3.50 x 6.00 ) in - 'COMMENV_N6_3/4' => array( 260.640, 468.000), // = ( 92 x 165 ) mm = ( 3.62 x 6.50 ) in - 'COMMENV_N8' => array( 278.640, 540.000), // = ( 98 x 191 ) mm = ( 3.87 x 7.50 ) in - 'COMMENV_N9' => array( 278.640, 638.640), // = ( 98 x 225 ) mm = ( 3.87 x 8.87 ) in - 'COMMENV_N10' => array( 296.640, 684.000), // = ( 105 x 241 ) mm = ( 4.12 x 9.50 ) in - 'COMMENV_N11' => array( 324.000, 746.640), // = ( 114 x 263 ) mm = ( 4.50 x 10.37 ) in - 'COMMENV_N12' => array( 342.000, 792.000), // = ( 121 x 279 ) mm = ( 4.75 x 11.00 ) in - 'COMMENV_N14' => array( 360.000, 828.000), // = ( 127 x 292 ) mm = ( 5.00 x 11.50 ) in - // - Catalogue Envelopes - 'CATENV_N1' => array( 432.000, 648.000), // = ( 152 x 229 ) mm = ( 6.00 x 9.00 ) in - 'CATENV_N1_3/4' => array( 468.000, 684.000), // = ( 165 x 241 ) mm = ( 6.50 x 9.50 ) in - 'CATENV_N2' => array( 468.000, 720.000), // = ( 165 x 254 ) mm = ( 6.50 x 10.00 ) in - 'CATENV_N3' => array( 504.000, 720.000), // = ( 178 x 254 ) mm = ( 7.00 x 10.00 ) in - 'CATENV_N6' => array( 540.000, 756.000), // = ( 191 x 267 ) mm = ( 7.50 x 10.50 ) in - 'CATENV_N7' => array( 576.000, 792.000), // = ( 203 x 279 ) mm = ( 8.00 x 11.00 ) in - 'CATENV_N8' => array( 594.000, 810.000), // = ( 210 x 286 ) mm = ( 8.25 x 11.25 ) in - 'CATENV_N9_1/2' => array( 612.000, 756.000), // = ( 216 x 267 ) mm = ( 8.50 x 10.50 ) in - 'CATENV_N9_3/4' => array( 630.000, 810.000), // = ( 222 x 286 ) mm = ( 8.75 x 11.25 ) in - 'CATENV_N10_1/2' => array( 648.000, 864.000), // = ( 229 x 305 ) mm = ( 9.00 x 12.00 ) in - 'CATENV_N12_1/2' => array( 684.000, 900.000), // = ( 241 x 318 ) mm = ( 9.50 x 12.50 ) in - 'CATENV_N13_1/2' => array( 720.000, 936.000), // = ( 254 x 330 ) mm = ( 10.00 x 13.00 ) in - 'CATENV_N14_1/4' => array( 810.000, 882.000), // = ( 286 x 311 ) mm = ( 11.25 x 12.25 ) in - 'CATENV_N14_1/2' => array( 828.000, 1044.000), // = ( 292 x 368 ) mm = ( 11.50 x 14.50 ) in - // Japanese (JIS P 0138-61) Standard B-Series - 'JIS_B0' => array( 2919.685, 4127.244), // = ( 1030 x 1456 ) mm = ( 40.55 x 57.32 ) in - 'JIS_B1' => array( 2063.622, 2919.685), // = ( 728 x 1030 ) mm = ( 28.66 x 40.55 ) in - 'JIS_B2' => array( 1459.843, 2063.622), // = ( 515 x 728 ) mm = ( 20.28 x 28.66 ) in - 'JIS_B3' => array( 1031.811, 1459.843), // = ( 364 x 515 ) mm = ( 14.33 x 20.28 ) in - 'JIS_B4' => array( 728.504, 1031.811), // = ( 257 x 364 ) mm = ( 10.12 x 14.33 ) in - 'JIS_B5' => array( 515.906, 728.504), // = ( 182 x 257 ) mm = ( 7.17 x 10.12 ) in - 'JIS_B6' => array( 362.835, 515.906), // = ( 128 x 182 ) mm = ( 5.04 x 7.17 ) in - 'JIS_B7' => array( 257.953, 362.835), // = ( 91 x 128 ) mm = ( 3.58 x 5.04 ) in - 'JIS_B8' => array( 181.417, 257.953), // = ( 64 x 91 ) mm = ( 2.52 x 3.58 ) in - 'JIS_B9' => array( 127.559, 181.417), // = ( 45 x 64 ) mm = ( 1.77 x 2.52 ) in - 'JIS_B10' => array( 90.709, 127.559), // = ( 32 x 45 ) mm = ( 1.26 x 1.77 ) in - 'JIS_B11' => array( 62.362, 90.709), // = ( 22 x 32 ) mm = ( 0.87 x 1.26 ) in - 'JIS_B12' => array( 45.354, 62.362), // = ( 16 x 22 ) mm = ( 0.63 x 0.87 ) in - // PA Series - 'PA0' => array( 2381.102, 3174.803), // = ( 840 x 1120 ) mm = ( 33.07 x 44.09 ) in - 'PA1' => array( 1587.402, 2381.102), // = ( 560 x 840 ) mm = ( 22.05 x 33.07 ) in - 'PA2' => array( 1190.551, 1587.402), // = ( 420 x 560 ) mm = ( 16.54 x 22.05 ) in - 'PA3' => array( 793.701, 1190.551), // = ( 280 x 420 ) mm = ( 11.02 x 16.54 ) in - 'PA4' => array( 595.276, 793.701), // = ( 210 x 280 ) mm = ( 8.27 x 11.02 ) in - 'PA5' => array( 396.850, 595.276), // = ( 140 x 210 ) mm = ( 5.51 x 8.27 ) in - 'PA6' => array( 297.638, 396.850), // = ( 105 x 140 ) mm = ( 4.13 x 5.51 ) in - 'PA7' => array( 198.425, 297.638), // = ( 70 x 105 ) mm = ( 2.76 x 4.13 ) in - 'PA8' => array( 147.402, 198.425), // = ( 52 x 70 ) mm = ( 2.05 x 2.76 ) in - 'PA9' => array( 99.213, 147.402), // = ( 35 x 52 ) mm = ( 1.38 x 2.05 ) in - 'PA10' => array( 73.701, 99.213), // = ( 26 x 35 ) mm = ( 1.02 x 1.38 ) in - // Standard Photographic Print Sizes - 'PASSPORT_PHOTO' => array( 99.213, 127.559), // = ( 35 x 45 ) mm = ( 1.38 x 1.77 ) in - 'E' => array( 233.858, 340.157), // = ( 82 x 120 ) mm = ( 3.25 x 4.72 ) in - 'L' => array( 252.283, 360.000), // = ( 89 x 127 ) mm = ( 3.50 x 5.00 ) in - '3R' => array( 252.283, 360.000), // = ( 89 x 127 ) mm = ( 3.50 x 5.00 ) in - 'KG' => array( 289.134, 430.866), // = ( 102 x 152 ) mm = ( 4.02 x 5.98 ) in - '4R' => array( 289.134, 430.866), // = ( 102 x 152 ) mm = ( 4.02 x 5.98 ) in - '4D' => array( 340.157, 430.866), // = ( 120 x 152 ) mm = ( 4.72 x 5.98 ) in - '2L' => array( 360.000, 504.567), // = ( 127 x 178 ) mm = ( 5.00 x 7.01 ) in - '5R' => array( 360.000, 504.567), // = ( 127 x 178 ) mm = ( 5.00 x 7.01 ) in - '8P' => array( 430.866, 575.433), // = ( 152 x 203 ) mm = ( 5.98 x 7.99 ) in - '6R' => array( 430.866, 575.433), // = ( 152 x 203 ) mm = ( 5.98 x 7.99 ) in - '6P' => array( 575.433, 720.000), // = ( 203 x 254 ) mm = ( 7.99 x 10.00 ) in - '8R' => array( 575.433, 720.000), // = ( 203 x 254 ) mm = ( 7.99 x 10.00 ) in - '6PW' => array( 575.433, 864.567), // = ( 203 x 305 ) mm = ( 7.99 x 12.01 ) in - 'S8R' => array( 575.433, 864.567), // = ( 203 x 305 ) mm = ( 7.99 x 12.01 ) in - '4P' => array( 720.000, 864.567), // = ( 254 x 305 ) mm = ( 10.00 x 12.01 ) in - '10R' => array( 720.000, 864.567), // = ( 254 x 305 ) mm = ( 10.00 x 12.01 ) in - '4PW' => array( 720.000, 1080.000), // = ( 254 x 381 ) mm = ( 10.00 x 15.00 ) in - 'S10R' => array( 720.000, 1080.000), // = ( 254 x 381 ) mm = ( 10.00 x 15.00 ) in - '11R' => array( 790.866, 1009.134), // = ( 279 x 356 ) mm = ( 10.98 x 14.02 ) in - 'S11R' => array( 790.866, 1224.567), // = ( 279 x 432 ) mm = ( 10.98 x 17.01 ) in - '12R' => array( 864.567, 1080.000), // = ( 305 x 381 ) mm = ( 12.01 x 15.00 ) in - 'S12R' => array( 864.567, 1292.598), // = ( 305 x 456 ) mm = ( 12.01 x 17.95 ) in - // Common Newspaper Sizes - 'NEWSPAPER_BROADSHEET' => array( 2125.984, 1700.787), // = ( 750 x 600 ) mm = ( 29.53 x 23.62 ) in - 'NEWSPAPER_BERLINER' => array( 1332.283, 892.913), // = ( 470 x 315 ) mm = ( 18.50 x 12.40 ) in - 'NEWSPAPER_TABLOID' => array( 1218.898, 793.701), // = ( 430 x 280 ) mm = ( 16.93 x 11.02 ) in - 'NEWSPAPER_COMPACT' => array( 1218.898, 793.701), // = ( 430 x 280 ) mm = ( 16.93 x 11.02 ) in - // Business Cards - 'CREDIT_CARD' => array( 153.014, 242.646), // = ( 54 x 86 ) mm = ( 2.13 x 3.37 ) in - 'BUSINESS_CARD' => array( 153.014, 242.646), // = ( 54 x 86 ) mm = ( 2.13 x 3.37 ) in - 'BUSINESS_CARD_ISO7810' => array( 153.014, 242.646), // = ( 54 x 86 ) mm = ( 2.13 x 3.37 ) in - 'BUSINESS_CARD_ISO216' => array( 147.402, 209.764), // = ( 52 x 74 ) mm = ( 2.05 x 2.91 ) in - 'BUSINESS_CARD_IT' => array( 155.906, 240.945), // = ( 55 x 85 ) mm = ( 2.17 x 3.35 ) in - 'BUSINESS_CARD_UK' => array( 155.906, 240.945), // = ( 55 x 85 ) mm = ( 2.17 x 3.35 ) in - 'BUSINESS_CARD_FR' => array( 155.906, 240.945), // = ( 55 x 85 ) mm = ( 2.17 x 3.35 ) in - 'BUSINESS_CARD_DE' => array( 155.906, 240.945), // = ( 55 x 85 ) mm = ( 2.17 x 3.35 ) in - 'BUSINESS_CARD_ES' => array( 155.906, 240.945), // = ( 55 x 85 ) mm = ( 2.17 x 3.35 ) in - 'BUSINESS_CARD_CA' => array( 144.567, 252.283), // = ( 51 x 89 ) mm = ( 2.01 x 3.50 ) in - 'BUSINESS_CARD_US' => array( 144.567, 252.283), // = ( 51 x 89 ) mm = ( 2.01 x 3.50 ) in - 'BUSINESS_CARD_JP' => array( 155.906, 257.953), // = ( 55 x 91 ) mm = ( 2.17 x 3.58 ) in - 'BUSINESS_CARD_HK' => array( 153.071, 255.118), // = ( 54 x 90 ) mm = ( 2.13 x 3.54 ) in - 'BUSINESS_CARD_AU' => array( 155.906, 255.118), // = ( 55 x 90 ) mm = ( 2.17 x 3.54 ) in - 'BUSINESS_CARD_DK' => array( 155.906, 255.118), // = ( 55 x 90 ) mm = ( 2.17 x 3.54 ) in - 'BUSINESS_CARD_SE' => array( 155.906, 255.118), // = ( 55 x 90 ) mm = ( 2.17 x 3.54 ) in - 'BUSINESS_CARD_RU' => array( 141.732, 255.118), // = ( 50 x 90 ) mm = ( 1.97 x 3.54 ) in - 'BUSINESS_CARD_CZ' => array( 141.732, 255.118), // = ( 50 x 90 ) mm = ( 1.97 x 3.54 ) in - 'BUSINESS_CARD_FI' => array( 141.732, 255.118), // = ( 50 x 90 ) mm = ( 1.97 x 3.54 ) in - 'BUSINESS_CARD_HU' => array( 141.732, 255.118), // = ( 50 x 90 ) mm = ( 1.97 x 3.54 ) in - 'BUSINESS_CARD_IL' => array( 141.732, 255.118), // = ( 50 x 90 ) mm = ( 1.97 x 3.54 ) in - // Billboards - '4SHEET' => array( 2880.000, 4320.000), // = ( 1016 x 1524 ) mm = ( 40.00 x 60.00 ) in - '6SHEET' => array( 3401.575, 5102.362), // = ( 1200 x 1800 ) mm = ( 47.24 x 70.87 ) in - '12SHEET' => array( 8640.000, 4320.000), // = ( 3048 x 1524 ) mm = (120.00 x 60.00 ) in - '16SHEET' => array( 5760.000, 8640.000), // = ( 2032 x 3048 ) mm = ( 80.00 x 120.00) in - '32SHEET' => array(11520.000, 8640.000), // = ( 4064 x 3048 ) mm = (160.00 x 120.00) in - '48SHEET' => array(17280.000, 8640.000), // = ( 6096 x 3048 ) mm = (240.00 x 120.00) in - '64SHEET' => array(23040.000, 8640.000), // = ( 8128 x 3048 ) mm = (320.00 x 120.00) in - '96SHEET' => array(34560.000, 8640.000), // = (12192 x 3048 ) mm = (480.00 x 120.00) in - // -- Old European Sizes - // - Old Imperial English Sizes - 'EN_EMPEROR' => array( 3456.000, 5184.000), // = ( 1219 x 1829 ) mm = ( 48.00 x 72.00 ) in - 'EN_ANTIQUARIAN' => array( 2232.000, 3816.000), // = ( 787 x 1346 ) mm = ( 31.00 x 53.00 ) in - 'EN_GRAND_EAGLE' => array( 2070.000, 3024.000), // = ( 730 x 1067 ) mm = ( 28.75 x 42.00 ) in - 'EN_DOUBLE_ELEPHANT' => array( 1926.000, 2880.000), // = ( 679 x 1016 ) mm = ( 26.75 x 40.00 ) in - 'EN_ATLAS' => array( 1872.000, 2448.000), // = ( 660 x 864 ) mm = ( 26.00 x 34.00 ) in - 'EN_COLOMBIER' => array( 1692.000, 2484.000), // = ( 597 x 876 ) mm = ( 23.50 x 34.50 ) in - 'EN_ELEPHANT' => array( 1656.000, 2016.000), // = ( 584 x 711 ) mm = ( 23.00 x 28.00 ) in - 'EN_DOUBLE_DEMY' => array( 1620.000, 2556.000), // = ( 572 x 902 ) mm = ( 22.50 x 35.50 ) in - 'EN_IMPERIAL' => array( 1584.000, 2160.000), // = ( 559 x 762 ) mm = ( 22.00 x 30.00 ) in - 'EN_PRINCESS' => array( 1548.000, 2016.000), // = ( 546 x 711 ) mm = ( 21.50 x 28.00 ) in - 'EN_CARTRIDGE' => array( 1512.000, 1872.000), // = ( 533 x 660 ) mm = ( 21.00 x 26.00 ) in - 'EN_DOUBLE_LARGE_POST' => array( 1512.000, 2376.000), // = ( 533 x 838 ) mm = ( 21.00 x 33.00 ) in - 'EN_ROYAL' => array( 1440.000, 1800.000), // = ( 508 x 635 ) mm = ( 20.00 x 25.00 ) in - 'EN_SHEET' => array( 1404.000, 1692.000), // = ( 495 x 597 ) mm = ( 19.50 x 23.50 ) in - 'EN_HALF_POST' => array( 1404.000, 1692.000), // = ( 495 x 597 ) mm = ( 19.50 x 23.50 ) in - 'EN_SUPER_ROYAL' => array( 1368.000, 1944.000), // = ( 483 x 686 ) mm = ( 19.00 x 27.00 ) in - 'EN_DOUBLE_POST' => array( 1368.000, 2196.000), // = ( 483 x 775 ) mm = ( 19.00 x 30.50 ) in - 'EN_MEDIUM' => array( 1260.000, 1656.000), // = ( 445 x 584 ) mm = ( 17.50 x 23.00 ) in - 'EN_DEMY' => array( 1260.000, 1620.000), // = ( 445 x 572 ) mm = ( 17.50 x 22.50 ) in - 'EN_LARGE_POST' => array( 1188.000, 1512.000), // = ( 419 x 533 ) mm = ( 16.50 x 21.00 ) in - 'EN_COPY_DRAUGHT' => array( 1152.000, 1440.000), // = ( 406 x 508 ) mm = ( 16.00 x 20.00 ) in - 'EN_POST' => array( 1116.000, 1386.000), // = ( 394 x 489 ) mm = ( 15.50 x 19.25 ) in - 'EN_CROWN' => array( 1080.000, 1440.000), // = ( 381 x 508 ) mm = ( 15.00 x 20.00 ) in - 'EN_PINCHED_POST' => array( 1062.000, 1332.000), // = ( 375 x 470 ) mm = ( 14.75 x 18.50 ) in - 'EN_BRIEF' => array( 972.000, 1152.000), // = ( 343 x 406 ) mm = ( 13.50 x 16.00 ) in - 'EN_FOOLSCAP' => array( 972.000, 1224.000), // = ( 343 x 432 ) mm = ( 13.50 x 17.00 ) in - 'EN_SMALL_FOOLSCAP' => array( 954.000, 1188.000), // = ( 337 x 419 ) mm = ( 13.25 x 16.50 ) in - 'EN_POTT' => array( 900.000, 1080.000), // = ( 318 x 381 ) mm = ( 12.50 x 15.00 ) in - // - Old Imperial Belgian Sizes - 'BE_GRAND_AIGLE' => array( 1984.252, 2948.031), // = ( 700 x 1040 ) mm = ( 27.56 x 40.94 ) in - 'BE_COLOMBIER' => array( 1757.480, 2409.449), // = ( 620 x 850 ) mm = ( 24.41 x 33.46 ) in - 'BE_DOUBLE_CARRE' => array( 1757.480, 2607.874), // = ( 620 x 920 ) mm = ( 24.41 x 36.22 ) in - 'BE_ELEPHANT' => array( 1746.142, 2182.677), // = ( 616 x 770 ) mm = ( 24.25 x 30.31 ) in - 'BE_PETIT_AIGLE' => array( 1700.787, 2381.102), // = ( 600 x 840 ) mm = ( 23.62 x 33.07 ) in - 'BE_GRAND_JESUS' => array( 1559.055, 2069.291), // = ( 550 x 730 ) mm = ( 21.65 x 28.74 ) in - 'BE_JESUS' => array( 1530.709, 2069.291), // = ( 540 x 730 ) mm = ( 21.26 x 28.74 ) in - 'BE_RAISIN' => array( 1417.323, 1842.520), // = ( 500 x 650 ) mm = ( 19.69 x 25.59 ) in - 'BE_GRAND_MEDIAN' => array( 1303.937, 1714.961), // = ( 460 x 605 ) mm = ( 18.11 x 23.82 ) in - 'BE_DOUBLE_POSTE' => array( 1233.071, 1601.575), // = ( 435 x 565 ) mm = ( 17.13 x 22.24 ) in - 'BE_COQUILLE' => array( 1218.898, 1587.402), // = ( 430 x 560 ) mm = ( 16.93 x 22.05 ) in - 'BE_PETIT_MEDIAN' => array( 1176.378, 1502.362), // = ( 415 x 530 ) mm = ( 16.34 x 20.87 ) in - 'BE_RUCHE' => array( 1020.472, 1303.937), // = ( 360 x 460 ) mm = ( 14.17 x 18.11 ) in - 'BE_PROPATRIA' => array( 977.953, 1218.898), // = ( 345 x 430 ) mm = ( 13.58 x 16.93 ) in - 'BE_LYS' => array( 898.583, 1125.354), // = ( 317 x 397 ) mm = ( 12.48 x 15.63 ) in - 'BE_POT' => array( 870.236, 1088.504), // = ( 307 x 384 ) mm = ( 12.09 x 15.12 ) in - 'BE_ROSETTE' => array( 765.354, 983.622), // = ( 270 x 347 ) mm = ( 10.63 x 13.66 ) in - // - Old Imperial French Sizes - 'FR_UNIVERS' => array( 2834.646, 3685.039), // = ( 1000 x 1300 ) mm = ( 39.37 x 51.18 ) in - 'FR_DOUBLE_COLOMBIER' => array( 2551.181, 3571.654), // = ( 900 x 1260 ) mm = ( 35.43 x 49.61 ) in - 'FR_GRANDE_MONDE' => array( 2551.181, 3571.654), // = ( 900 x 1260 ) mm = ( 35.43 x 49.61 ) in - 'FR_DOUBLE_SOLEIL' => array( 2267.717, 3401.575), // = ( 800 x 1200 ) mm = ( 31.50 x 47.24 ) in - 'FR_DOUBLE_JESUS' => array( 2154.331, 3174.803), // = ( 760 x 1120 ) mm = ( 29.92 x 44.09 ) in - 'FR_GRAND_AIGLE' => array( 2125.984, 3004.724), // = ( 750 x 1060 ) mm = ( 29.53 x 41.73 ) in - 'FR_PETIT_AIGLE' => array( 1984.252, 2664.567), // = ( 700 x 940 ) mm = ( 27.56 x 37.01 ) in - 'FR_DOUBLE_RAISIN' => array( 1842.520, 2834.646), // = ( 650 x 1000 ) mm = ( 25.59 x 39.37 ) in - 'FR_JOURNAL' => array( 1842.520, 2664.567), // = ( 650 x 940 ) mm = ( 25.59 x 37.01 ) in - 'FR_COLOMBIER_AFFICHE' => array( 1785.827, 2551.181), // = ( 630 x 900 ) mm = ( 24.80 x 35.43 ) in - 'FR_DOUBLE_CAVALIER' => array( 1757.480, 2607.874), // = ( 620 x 920 ) mm = ( 24.41 x 36.22 ) in - 'FR_CLOCHE' => array( 1700.787, 2267.717), // = ( 600 x 800 ) mm = ( 23.62 x 31.50 ) in - 'FR_SOLEIL' => array( 1700.787, 2267.717), // = ( 600 x 800 ) mm = ( 23.62 x 31.50 ) in - 'FR_DOUBLE_CARRE' => array( 1587.402, 2551.181), // = ( 560 x 900 ) mm = ( 22.05 x 35.43 ) in - 'FR_DOUBLE_COQUILLE' => array( 1587.402, 2494.488), // = ( 560 x 880 ) mm = ( 22.05 x 34.65 ) in - 'FR_JESUS' => array( 1587.402, 2154.331), // = ( 560 x 760 ) mm = ( 22.05 x 29.92 ) in - 'FR_RAISIN' => array( 1417.323, 1842.520), // = ( 500 x 650 ) mm = ( 19.69 x 25.59 ) in - 'FR_CAVALIER' => array( 1303.937, 1757.480), // = ( 460 x 620 ) mm = ( 18.11 x 24.41 ) in - 'FR_DOUBLE_COURONNE' => array( 1303.937, 2040.945), // = ( 460 x 720 ) mm = ( 18.11 x 28.35 ) in - 'FR_CARRE' => array( 1275.591, 1587.402), // = ( 450 x 560 ) mm = ( 17.72 x 22.05 ) in - 'FR_COQUILLE' => array( 1247.244, 1587.402), // = ( 440 x 560 ) mm = ( 17.32 x 22.05 ) in - 'FR_DOUBLE_TELLIERE' => array( 1247.244, 1927.559), // = ( 440 x 680 ) mm = ( 17.32 x 26.77 ) in - 'FR_DOUBLE_CLOCHE' => array( 1133.858, 1700.787), // = ( 400 x 600 ) mm = ( 15.75 x 23.62 ) in - 'FR_DOUBLE_POT' => array( 1133.858, 1757.480), // = ( 400 x 620 ) mm = ( 15.75 x 24.41 ) in - 'FR_ECU' => array( 1133.858, 1474.016), // = ( 400 x 520 ) mm = ( 15.75 x 20.47 ) in - 'FR_COURONNE' => array( 1020.472, 1303.937), // = ( 360 x 460 ) mm = ( 14.17 x 18.11 ) in - 'FR_TELLIERE' => array( 963.780, 1247.244), // = ( 340 x 440 ) mm = ( 13.39 x 17.32 ) in - 'FR_POT' => array( 878.740, 1133.858), // = ( 310 x 400 ) mm = ( 12.20 x 15.75 ) in - ); - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** - * Return the current TCPDF version. - * @return TCPDF version string - * @since 5.9.012 (2010-11-10) - * @public static - */ - public static function getTCPDFVersion() { - return self::$tcpdf_version; - } - - /** - * Return the current TCPDF producer. - * @return TCPDF producer string - * @since 6.0.000 (2013-03-16) - * @public static - */ - public static function getTCPDFProducer() { - return "\x54\x43\x50\x44\x46\x20".self::getTCPDFVersion()."\x20\x28\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x74\x63\x70\x64\x66\x2e\x6f\x72\x67\x29"; - } - - /** - * Sets the current active configuration setting of magic_quotes_runtime (if the set_magic_quotes_runtime function exist) - * @param $mqr (boolean) FALSE for off, TRUE for on. - * @since 4.6.025 (2009-08-17) - * @public static - */ - public static function set_mqr($mqr) { - if (!defined('PHP_VERSION_ID')) { - $version = PHP_VERSION; - define('PHP_VERSION_ID', (($version[0] * 10000) + ($version[2] * 100) + $version[4])); - } - if (PHP_VERSION_ID < 50300) { - @set_magic_quotes_runtime($mqr); - } - } - - /** - * Gets the current active configuration setting of magic_quotes_runtime (if the get_magic_quotes_runtime function exist) - * @return Returns 0 if magic quotes runtime is off or get_magic_quotes_runtime doesn't exist, 1 otherwise. - * @since 4.6.025 (2009-08-17) - * @public static - */ - public static function get_mqr() { - if (!defined('PHP_VERSION_ID')) { - $version = PHP_VERSION; - define('PHP_VERSION_ID', (($version[0] * 10000) + ($version[2] * 100) + $version[4])); - } - if (PHP_VERSION_ID < 50300) { - return @get_magic_quotes_runtime(); - } - return 0; - } - - /** - * Get page dimensions from format name. - * @param $format (mixed) The format name @see self::$page_format
          - * @return array containing page width and height in points - * @since 5.0.010 (2010-05-17) - * @public static - */ - public static function getPageSizeFromFormat($format) { - if (isset(self::$page_formats[$format])) { - return self::$page_formats[$format]; - } - return self::$page_formats['A4']; - } - - /** - * Set page boundaries. - * @param $page (int) page number - * @param $type (string) valid values are:
          • 'MediaBox' : the boundaries of the physical medium on which the page shall be displayed or printed;
          • 'CropBox' : the visible region of default user space;
          • 'BleedBox' : the region to which the contents of the page shall be clipped when output in a production environment;
          • 'TrimBox' : the intended dimensions of the finished page after trimming;
          • 'ArtBox' : the page's meaningful content (including potential white space).
          - * @param $llx (float) lower-left x coordinate in user units. - * @param $lly (float) lower-left y coordinate in user units. - * @param $urx (float) upper-right x coordinate in user units. - * @param $ury (float) upper-right y coordinate in user units. - * @param $points (boolean) If true uses user units as unit of measure, otherwise uses PDF points. - * @param $k (float) Scale factor (number of points in user unit). - * @param $pagedim (array) Array of page dimensions. - * @return pagedim array of page dimensions. - * @since 5.0.010 (2010-05-17) - * @public static - */ - public static function setPageBoxes($page, $type, $llx, $lly, $urx, $ury, $points=false, $k, $pagedim=array()) { - if (!isset($pagedim[$page])) { - // initialize array - $pagedim[$page] = array(); - } - if (!in_array($type, self::$pageboxes)) { - return; - } - if ($points) { - $k = 1; - } - $pagedim[$page][$type]['llx'] = ($llx * $k); - $pagedim[$page][$type]['lly'] = ($lly * $k); - $pagedim[$page][$type]['urx'] = ($urx * $k); - $pagedim[$page][$type]['ury'] = ($ury * $k); - return $pagedim; - } - - /** - * Swap X and Y coordinates of page boxes (change page boxes orientation). - * @param $page (int) page number - * @param $pagedim (array) Array of page dimensions. - * @return pagedim array of page dimensions. - * @since 5.0.010 (2010-05-17) - * @public static - */ - public static function swapPageBoxCoordinates($page, $pagedim) { - foreach (self::$pageboxes as $type) { - // swap X and Y coordinates - if (isset($pagedim[$page][$type])) { - $tmp = $pagedim[$page][$type]['llx']; - $pagedim[$page][$type]['llx'] = $pagedim[$page][$type]['lly']; - $pagedim[$page][$type]['lly'] = $tmp; - $tmp = $pagedim[$page][$type]['urx']; - $pagedim[$page][$type]['urx'] = $pagedim[$page][$type]['ury']; - $pagedim[$page][$type]['ury'] = $tmp; - } - } - return $pagedim; - } - - /** - * Get the canonical page layout mode. - * @param $layout (string) The page layout. Possible values are:
          • SinglePage Display one page at a time
          • OneColumn Display the pages in one column
          • TwoColumnLeft Display the pages in two columns, with odd-numbered pages on the left
          • TwoColumnRight Display the pages in two columns, with odd-numbered pages on the right
          • TwoPageLeft (PDF 1.5) Display the pages two at a time, with odd-numbered pages on the left
          • TwoPageRight (PDF 1.5) Display the pages two at a time, with odd-numbered pages on the right
          - * @return (string) Canonical page layout name. - * @public static - */ - public static function getPageLayoutMode($layout='SinglePage') { - switch ($layout) { - case 'default': - case 'single': - case 'SinglePage': { - $layout_mode = 'SinglePage'; - break; - } - case 'continuous': - case 'OneColumn': { - $layout_mode = 'OneColumn'; - break; - } - case 'two': - case 'TwoColumnLeft': { - $layout_mode = 'TwoColumnLeft'; - break; - } - case 'TwoColumnRight': { - $layout_mode = 'TwoColumnRight'; - break; - } - case 'TwoPageLeft': { - $layout_mode = 'TwoPageLeft'; - break; - } - case 'TwoPageRight': { - $layout_mode = 'TwoPageRight'; - break; - } - default: { - $layout_mode = 'SinglePage'; - } - } - return $layout_mode; - } - - /** - * Get the canonical page layout mode. - * @param $mode (string) A name object specifying how the document should be displayed when opened:
          • UseNone Neither document outline nor thumbnail images visible
          • UseOutlines Document outline visible
          • UseThumbs Thumbnail images visible
          • FullScreen Full-screen mode, with no menu bar, window controls, or any other window visible
          • UseOC (PDF 1.5) Optional content group panel visible
          • UseAttachments (PDF 1.6) Attachments panel visible
          - * @return (string) Canonical page mode name. - * @public static - */ - public static function getPageMode($mode='UseNone') { - switch ($mode) { - case 'UseNone': { - $page_mode = 'UseNone'; - break; - } - case 'UseOutlines': { - $page_mode = 'UseOutlines'; - break; - } - case 'UseThumbs': { - $page_mode = 'UseThumbs'; - break; - } - case 'FullScreen': { - $page_mode = 'FullScreen'; - break; - } - case 'UseOC': { - $page_mode = 'UseOC'; - break; - } - case '': { - $page_mode = 'UseAttachments'; - break; - } - default: { - $page_mode = 'UseNone'; - } - } - return $page_mode; - } - - /** - * Check if the URL exist. - * @param $url (string) URL to check. - * @return Boolean true if the URl exist, false otherwise. - * @since 5.9.204 (2013-01-28) - * @public static - */ - public static function isValidURL($url) { - $headers = @get_headers($url); - return (strpos($headers[0], '200') !== false); - } - - /** - * Removes SHY characters from text. - * Unicode Data:
            - *
          • Name : SOFT HYPHEN, commonly abbreviated as SHY
          • - *
          • HTML Entity (decimal): "&#173;"
          • - *
          • HTML Entity (hex): "&#xad;"
          • - *
          • HTML Entity (named): "&shy;"
          • - *
          • How to type in Microsoft Windows: [Alt +00AD] or [Alt 0173]
          • - *
          • UTF-8 (hex): 0xC2 0xAD (c2ad)
          • - *
          • UTF-8 character: chr(194).chr(173)
          • - *
          - * @param $txt (string) input string - * @param $unicode (boolean) True if we are in unicode mode, false otherwise. - * @return string without SHY characters. - * @since (4.5.019) 2009-02-28 - * @public static - */ - public static function removeSHY($txt='', $unicode=true) { - $txt = preg_replace('/([\\xc2]{1}[\\xad]{1})/', '', $txt); - if (!$unicode) { - $txt = preg_replace('/([\\xad]{1})/', '', $txt); - } - return $txt; - } - - - /** - * Get the border mode accounting for multicell position (opens bottom side of multicell crossing pages) - * @param $brd (mixed) Indicates if borders must be drawn around the cell block. The value can be a number:
          • 0: no border (default)
          • 1: frame
          or a string containing some or all of the following characters (in any order):
          • L: left
          • T: top
          • R: right
          • B: bottom
          or an array of line styles for each border group: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) - * @param $position (string) multicell position: 'start', 'middle', 'end' - * @param $opencell (boolean) True when the cell is left open at the page bottom, false otherwise. - * @return border mode array - * @since 4.4.002 (2008-12-09) - * @public static - */ - public static function getBorderMode($brd, $position='start', $opencell=true) { - if ((!$opencell) OR empty($brd)) { - return $brd; - } - if ($brd == 1) { - $brd = 'LTRB'; - } - if (is_string($brd)) { - // convert string to array - $slen = strlen($brd); - $newbrd = array(); - for ($i = 0; $i < $slen; ++$i) { - $newbrd[$brd[$i]] = array('cap' => 'square', 'join' => 'miter'); - } - $brd = $newbrd; - } - foreach ($brd as $border => $style) { - switch ($position) { - case 'start': { - if (strpos($border, 'B') !== false) { - // remove bottom line - $newkey = str_replace('B', '', $border); - if (strlen($newkey) > 0) { - $brd[$newkey] = $style; - } - unset($brd[$border]); - } - break; - } - case 'middle': { - if (strpos($border, 'B') !== false) { - // remove bottom line - $newkey = str_replace('B', '', $border); - if (strlen($newkey) > 0) { - $brd[$newkey] = $style; - } - unset($brd[$border]); - $border = $newkey; - } - if (strpos($border, 'T') !== false) { - // remove bottom line - $newkey = str_replace('T', '', $border); - if (strlen($newkey) > 0) { - $brd[$newkey] = $style; - } - unset($brd[$border]); - } - break; - } - case 'end': { - if (strpos($border, 'T') !== false) { - // remove bottom line - $newkey = str_replace('T', '', $border); - if (strlen($newkey) > 0) { - $brd[$newkey] = $style; - } - unset($brd[$border]); - } - break; - } - } - } - return $brd; - } - - /** - * Determine whether a string is empty. - * @param $str (string) string to be checked - * @return boolean true if string is empty - * @since 4.5.044 (2009-04-16) - * @public static - */ - public static function empty_string($str) { - return (is_null($str) OR (is_string($str) AND (strlen($str) == 0))); - } - - /** - * Returns a temporary filename for caching object on filesystem. - * @param $type (string) Type of file (name of the subdir on the tcpdf cache folder). - * @param $file_id (string) TCPDF file_id. - * @return string filename. - * @since 4.5.000 (2008-12-31) - * @public static - */ - public static function getObjFilename($type='tmp', $file_id='') { - return tempnam(K_PATH_CACHE, '__tcpdf_'.$file_id.'_'.$type.'_'.md5(TCPDF_STATIC::getRandomSeed()).'_'); - } - - /** - * Add "\" before "\", "(" and ")" - * @param $s (string) string to escape. - * @return string escaped string. - * @public static - */ - public static function _escape($s) { - // the chr(13) substitution fixes the Bugs item #1421290. - return strtr($s, array(')' => '\\)', '(' => '\\(', '\\' => '\\\\', chr(13) => '\r')); - } - - /** - * Escape some special characters (< > &) for XML output. - * @param $str (string) Input string to convert. - * @return converted string - * @since 5.9.121 (2011-09-28) - * @public static - */ - public static function _escapeXML($str) { - $replaceTable = array("\0" => '', '&' => '&', '<' => '<', '>' => '>'); - $str = strtr($str, $replaceTable); - return $str; - } - - /** - * Creates a copy of a class object - * @param $object (object) class object to be cloned - * @return cloned object - * @since 4.5.029 (2009-03-19) - * @public static - */ - public static function objclone($object) { - if (($object instanceof Imagick) AND (version_compare(phpversion('imagick'), '3.0.1') !== 1)) { - // on the versions after 3.0.1 the clone() method was deprecated in favour of clone keyword - return @$object->clone(); - } - return @clone($object); - } - - /** - * Output input data and compress it if possible. - * @param $data (string) Data to output. - * @param $length (int) Data length in bytes. - * @since 5.9.086 - * @public static - */ - public static function sendOutputData($data, $length) { - if (!isset($_SERVER['HTTP_ACCEPT_ENCODING']) OR empty($_SERVER['HTTP_ACCEPT_ENCODING'])) { - // the content length may vary if the server is using compression - header('Content-Length: '.$length); - } - echo $data; - } - - /** - * Replace page number aliases with number. - * @param $page (string) Page content. - * @param $replace (array) Array of replacements (array keys are replacement strings, values are alias arrays). - * @param $diff (int) If passed, this will be set to the total char number difference between alias and replacements. - * @return replaced page content and updated $diff parameter as array. - * @public static - */ - public static function replacePageNumAliases($page, $replace, $diff=0) { - foreach ($replace as $rep) { - foreach ($rep[3] as $a) { - if (strpos($page, $a) !== false) { - $page = str_replace($a, $rep[0], $page); - $diff += ($rep[2] - $rep[1]); - } - } - } - return array($page, $diff); - } - - /** - * Returns timestamp in seconds from formatted date-time. - * @param $date (string) Formatted date-time. - * @return int seconds. - * @since 5.9.152 (2012-03-23) - * @public static - */ - public static function getTimestamp($date) { - if (($date[0] == 'D') AND ($date[1] == ':')) { - // remove date prefix if present - $date = substr($date, 2); - } - return strtotime($date); - } - - /** - * Returns a formatted date-time. - * @param $time (int) Time in seconds. - * @return string escaped date string. - * @since 5.9.152 (2012-03-23) - * @public static - */ - public static function getFormattedDate($time) { - return substr_replace(date('YmdHisO', intval($time)), '\'', (0 - 2), 0).'\''; - } - - /** - * Get ULONG from string (Big Endian 32-bit unsigned integer). - * @param $str (string) string from where to extract value - * @param $offset (int) point from where to read the data - * @return int 32 bit value - * @author Nicola Asuni - * @since 5.2.000 (2010-06-02) - * @public static - */ - public static function _getULONG($str, $offset) { - $v = unpack('Ni', substr($str, $offset, 4)); - return $v['i']; - } - - /** - * Get USHORT from string (Big Endian 16-bit unsigned integer). - * @param $str (string) string from where to extract value - * @param $offset (int) point from where to read the data - * @return int 16 bit value - * @author Nicola Asuni - * @since 5.2.000 (2010-06-02) - * @public static - */ - public static function _getUSHORT($str, $offset) { - $v = unpack('ni', substr($str, $offset, 2)); - return $v['i']; - } - - /** - * Get SHORT from string (Big Endian 16-bit signed integer). - * @param $str (string) String from where to extract value. - * @param $offset (int) Point from where to read the data. - * @return int 16 bit value - * @author Nicola Asuni - * @since 5.2.000 (2010-06-02) - * @public static - */ - public static function _getSHORT($str, $offset) { - $v = unpack('si', substr($str, $offset, 2)); - return $v['i']; - } - - /** - * Get FWORD from string (Big Endian 16-bit signed integer). - * @param $str (string) String from where to extract value. - * @param $offset (int) Point from where to read the data. - * @return int 16 bit value - * @author Nicola Asuni - * @since 5.9.123 (2011-09-30) - * @public static - */ - public static function _getFWORD($str, $offset) { - $v = self::_getUSHORT($str, $offset); - if ($v > 0x7fff) { - $v -= 0x10000; - } - return $v; - } - - /** - * Get UFWORD from string (Big Endian 16-bit unsigned integer). - * @param $str (string) string from where to extract value - * @param $offset (int) point from where to read the data - * @return int 16 bit value - * @author Nicola Asuni - * @since 5.9.123 (2011-09-30) - * @public static - */ - public static function _getUFWORD($str, $offset) { - $v = self::_getUSHORT($str, $offset); - return $v; - } - - /** - * Get FIXED from string (32-bit signed fixed-point number (16.16). - * @param $str (string) string from where to extract value - * @param $offset (int) point from where to read the data - * @return int 16 bit value - * @author Nicola Asuni - * @since 5.9.123 (2011-09-30) - * @public static - */ - public static function _getFIXED($str, $offset) { - // mantissa - $m = self::_getFWORD($str, $offset); - // fraction - $f = self::_getUSHORT($str, ($offset + 2)); - $v = floatval(''.$m.'.'.$f.''); - return $v; - } - - /** - * Get BYTE from string (8-bit unsigned integer). - * @param $str (string) String from where to extract value. - * @param $offset (int) Point from where to read the data. - * @return int 8 bit value - * @author Nicola Asuni - * @since 5.2.000 (2010-06-02) - * @public static - */ - public static function _getBYTE($str, $offset) { - $v = unpack('Ci', substr($str, $offset, 1)); - return $v['i']; - } - /** - * Binary-safe and URL-safe file read. - * Reads up to length bytes from the file pointer referenced by handle. Reading stops as soon as one of the following conditions is met: length bytes have been read; EOF (end of file) is reached. - * @param $handle (resource) - * @param $length (int) - * @return Returns the read string or FALSE in case of error. - * @author Nicola Asuni - * @since 4.5.027 (2009-03-16) - * @public static - */ - public static function rfread($handle, $length) { - $data = fread($handle, $length); - if ($data === false) { - return false; - } - $rest = ($length - strlen($data)); - if ($rest > 0) { - $data .= self::rfread($handle, $rest); - } - return $data; - } - - /** - * Read a 4-byte (32 bit) integer from file. - * @param $f (string) file name. - * @return 4-byte integer - * @public static - */ - public static function _freadint($f) { - $a = unpack('Ni', fread($f, 4)); - return $a['i']; - } - - /** - * Returns a string containing random data to be used as a seed for encryption methods. - * @param $seed (string) starting seed value - * @return string containing random data - * @author Nicola Asuni - * @since 5.9.006 (2010-10-19) - * @public static - */ - public static function getRandomSeed($seed='') { - $rnd = uniqid(rand().microtime(true), true); - if (function_exists('posix_getpid')) { - $rnd .= posix_getpid(); - } - if (function_exists('openssl_random_pseudo_bytes') AND (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN')) { - // this is not used on windows systems because it is very slow for a know bug - $rnd .= openssl_random_pseudo_bytes(512); - } else { - for ($i = 0; $i < 23; ++$i) { - $rnd .= uniqid('', true); - } - } - return $rnd.$seed.__FILE__.serialize($_SERVER).microtime(true); - } - - /** - * Encrypts a string using MD5 and returns it's value as a binary string. - * @param $str (string) input string - * @return String MD5 encrypted binary string - * @since 2.0.000 (2008-01-02) - * @public static - */ - public static function _md5_16($str) { - return pack('H*', md5($str)); - } - - /** - * Returns the input text exrypted using AES algorithm and the specified key. - * This method requires mcrypt. - * @param $key (string) encryption key - * @param $text (String) input text to be encrypted - * @return String encrypted text - * @author Nicola Asuni - * @since 5.0.005 (2010-05-11) - * @public static - */ - public static function _AES($key, $text) { - // padding (RFC 2898, PKCS #5: Password-Based Cryptography Specification Version 2.0) - $padding = 16 - (strlen($text) % 16); - $text .= str_repeat(chr($padding), $padding); - $iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC), MCRYPT_RAND); - $text = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $text, MCRYPT_MODE_CBC, $iv); - $text = $iv.$text; - return $text; - } - - /** - * Returns the input text encrypted using RC4 algorithm and the specified key. - * RC4 is the standard encryption algorithm used in PDF format - * @param $key (string) Encryption key. - * @param $text (String) Input text to be encrypted. - * @param $last_enc_key (String) Reference to last RC4 key encrypted. - * @param $last_enc_key_c (String) Reference to last RC4 computed key. - * @return String encrypted text - * @since 2.0.000 (2008-01-02) - * @author Klemen Vodopivec, Nicola Asuni - * @public static - */ - public static function _RC4($key, $text, &$last_enc_key, &$last_enc_key_c) { - if (function_exists('mcrypt_encrypt') AND ($out = @mcrypt_encrypt(MCRYPT_ARCFOUR, $key, $text, MCRYPT_MODE_STREAM, ''))) { - // try to use mcrypt function if exist - return $out; - } - if ($last_enc_key != $key) { - $k = str_repeat($key, ((256 / strlen($key)) + 1)); - $rc4 = range(0, 255); - $j = 0; - for ($i = 0; $i < 256; ++$i) { - $t = $rc4[$i]; - $j = ($j + $t + ord($k[$i])) % 256; - $rc4[$i] = $rc4[$j]; - $rc4[$j] = $t; - } - $last_enc_key = $key; - $last_enc_key_c = $rc4; - } else { - $rc4 = $last_enc_key_c; - } - $len = strlen($text); - $a = 0; - $b = 0; - $out = ''; - for ($i = 0; $i < $len; ++$i) { - $a = ($a + 1) % 256; - $t = $rc4[$a]; - $b = ($b + $t) % 256; - $rc4[$a] = $rc4[$b]; - $rc4[$b] = $t; - $k = $rc4[($rc4[$a] + $rc4[$b]) % 256]; - $out .= chr(ord($text[$i]) ^ $k); - } - return $out; - } - - /** - * Return the permission code used on encryption (P value). - * @param $permissions (Array) the set of permissions (specify the ones you want to block). - * @param $mode (int) encryption strength: 0 = RC4 40 bit; 1 = RC4 128 bit; 2 = AES 128 bit; 3 = AES 256 bit. - * @since 5.0.005 (2010-05-12) - * @author Nicola Asuni - * @public static - */ - public static function getUserPermissionCode($permissions, $mode=0) { - $options = array( - 'owner' => 2, // bit 2 -- inverted logic: cleared by default - 'print' => 4, // bit 3 - 'modify' => 8, // bit 4 - 'copy' => 16, // bit 5 - 'annot-forms' => 32, // bit 6 - 'fill-forms' => 256, // bit 9 - 'extract' => 512, // bit 10 - 'assemble' => 1024,// bit 11 - 'print-high' => 2048 // bit 12 - ); - $protection = 2147422012; // 32 bit: (01111111 11111111 00001111 00111100) - foreach ($permissions as $permission) { - if (isset($options[$permission])) { - if (($mode > 0) OR ($options[$permission] <= 32)) { - // set only valid permissions - if ($options[$permission] == 2) { - // the logic for bit 2 is inverted (cleared by default) - $protection += $options[$permission]; - } else { - $protection -= $options[$permission]; - } - } - } - } - return $protection; - } - - /** - * Convert hexadecimal string to string - * @param $bs (string) byte-string to convert - * @return String - * @since 5.0.005 (2010-05-12) - * @author Nicola Asuni - * @public static - */ - public static function convertHexStringToString($bs) { - $string = ''; // string to be returned - $bslength = strlen($bs); - if (($bslength % 2) != 0) { - // padding - $bs .= '0'; - ++$bslength; - } - for ($i = 0; $i < $bslength; $i += 2) { - $string .= chr(hexdec($bs[$i].$bs[($i + 1)])); - } - return $string; - } - - /** - * Convert string to hexadecimal string (byte string) - * @param $s (string) string to convert - * @return byte string - * @since 5.0.010 (2010-05-17) - * @author Nicola Asuni - * @public static - */ - public static function convertStringToHexString($s) { - $bs = ''; - $chars = preg_split('//', $s, -1, PREG_SPLIT_NO_EMPTY); - foreach ($chars as $c) { - $bs .= sprintf('%02s', dechex(ord($c))); - } - return $bs; - } - - /** - * Convert encryption P value to a string of bytes, low-order byte first. - * @param $protection (string) 32bit encryption permission value (P value) - * @return String - * @since 5.0.005 (2010-05-12) - * @author Nicola Asuni - * @public static - */ - public static function getEncPermissionsString($protection) { - $binprot = sprintf('%032b', $protection); - $str = chr(bindec(substr($binprot, 24, 8))); - $str .= chr(bindec(substr($binprot, 16, 8))); - $str .= chr(bindec(substr($binprot, 8, 8))); - $str .= chr(bindec(substr($binprot, 0, 8))); - return $str; - } - - /** - * Encode a name object. - * @param $name (string) Name object to encode. - * @return (string) Encoded name object. - * @author Nicola Asuni - * @since 5.9.097 (2011-06-23) - * @public static - */ - public static function encodeNameObject($name) { - $escname = ''; - $length = strlen($name); - for ($i = 0; $i < $length; ++$i) { - $chr = $name[$i]; - if (preg_match('/[0-9a-zA-Z#_=-]/', $chr) == 1) { - $escname .= $chr; - } else { - $escname .= sprintf('#%02X', ord($chr)); - } - } - return $escname; - } - - /** - * Convert JavaScript form fields properties array to Annotation Properties array. - * @param $prop (array) javascript field properties. Possible values are described on official Javascript for Acrobat API reference. - * @param $spot_colors (array) Reference to spot colors array. - * @param $rtl (boolean) True if in Right-To-Left text direction mode, false otherwise. - * @return array of annotation properties - * @author Nicola Asuni - * @since 4.8.000 (2009-09-06) - * @public static - */ - public static function getAnnotOptFromJSProp($prop, &$spot_colors, $rtl=false) { - if (isset($prop['aopt']) AND is_array($prop['aopt'])) { - // the annotation options area lready defined - return $prop['aopt']; - } - $opt = array(); // value to be returned - // alignment: Controls how the text is laid out within the text field. - if (isset($prop['alignment'])) { - switch ($prop['alignment']) { - case 'left': { - $opt['q'] = 0; - break; - } - case 'center': { - $opt['q'] = 1; - break; - } - case 'right': { - $opt['q'] = 2; - break; - } - default: { - $opt['q'] = ($rtl)?2:0; - break; - } - } - } - // lineWidth: Specifies the thickness of the border when stroking the perimeter of a field's rectangle. - if (isset($prop['lineWidth'])) { - $linewidth = intval($prop['lineWidth']); - } else { - $linewidth = 1; - } - // borderStyle: The border style for a field. - if (isset($prop['borderStyle'])) { - switch ($prop['borderStyle']) { - case 'border.d': - case 'dashed': { - $opt['border'] = array(0, 0, $linewidth, array(3, 2)); - $opt['bs'] = array('w'=>$linewidth, 's'=>'D', 'd'=>array(3, 2)); - break; - } - case 'border.b': - case 'beveled': { - $opt['border'] = array(0, 0, $linewidth); - $opt['bs'] = array('w'=>$linewidth, 's'=>'B'); - break; - } - case 'border.i': - case 'inset': { - $opt['border'] = array(0, 0, $linewidth); - $opt['bs'] = array('w'=>$linewidth, 's'=>'I'); - break; - } - case 'border.u': - case 'underline': { - $opt['border'] = array(0, 0, $linewidth); - $opt['bs'] = array('w'=>$linewidth, 's'=>'U'); - break; - } - case 'border.s': - case 'solid': { - $opt['border'] = array(0, 0, $linewidth); - $opt['bs'] = array('w'=>$linewidth, 's'=>'S'); - break; - } - default: { - break; - } - } - } - if (isset($prop['border']) AND is_array($prop['border'])) { - $opt['border'] = $prop['border']; - } - if (!isset($opt['mk'])) { - $opt['mk'] = array(); - } - if (!isset($opt['mk']['if'])) { - $opt['mk']['if'] = array(); - } - $opt['mk']['if']['a'] = array(0.5, 0.5); - // buttonAlignX: Controls how space is distributed from the left of the button face with respect to the icon. - if (isset($prop['buttonAlignX'])) { - $opt['mk']['if']['a'][0] = $prop['buttonAlignX']; - } - // buttonAlignY: Controls how unused space is distributed from the bottom of the button face with respect to the icon. - if (isset($prop['buttonAlignY'])) { - $opt['mk']['if']['a'][1] = $prop['buttonAlignY']; - } - // buttonFitBounds: If true, the extent to which the icon may be scaled is set to the bounds of the button field. - if (isset($prop['buttonFitBounds']) AND ($prop['buttonFitBounds'] == 'true')) { - $opt['mk']['if']['fb'] = true; - } - // buttonScaleHow: Controls how the icon is scaled (if necessary) to fit inside the button face. - if (isset($prop['buttonScaleHow'])) { - switch ($prop['buttonScaleHow']) { - case 'scaleHow.proportional': { - $opt['mk']['if']['s'] = 'P'; - break; - } - case 'scaleHow.anamorphic': { - $opt['mk']['if']['s'] = 'A'; - break; - } - } - } - // buttonScaleWhen: Controls when an icon is scaled to fit inside the button face. - if (isset($prop['buttonScaleWhen'])) { - switch ($prop['buttonScaleWhen']) { - case 'scaleWhen.always': { - $opt['mk']['if']['sw'] = 'A'; - break; - } - case 'scaleWhen.never': { - $opt['mk']['if']['sw'] = 'N'; - break; - } - case 'scaleWhen.tooBig': { - $opt['mk']['if']['sw'] = 'B'; - break; - } - case 'scaleWhen.tooSmall': { - $opt['mk']['if']['sw'] = 'S'; - break; - } - } - } - // buttonPosition: Controls how the text and the icon of the button are positioned with respect to each other within the button face. - if (isset($prop['buttonPosition'])) { - switch ($prop['buttonPosition']) { - case 0: - case 'position.textOnly': { - $opt['mk']['tp'] = 0; - break; - } - case 1: - case 'position.iconOnly': { - $opt['mk']['tp'] = 1; - break; - } - case 2: - case 'position.iconTextV': { - $opt['mk']['tp'] = 2; - break; - } - case 3: - case 'position.textIconV': { - $opt['mk']['tp'] = 3; - break; - } - case 4: - case 'position.iconTextH': { - $opt['mk']['tp'] = 4; - break; - } - case 5: - case 'position.textIconH': { - $opt['mk']['tp'] = 5; - break; - } - case 6: - case 'position.overlay': { - $opt['mk']['tp'] = 6; - break; - } - } - } - // fillColor: Specifies the background color for a field. - if (isset($prop['fillColor'])) { - if (is_array($prop['fillColor'])) { - $opt['mk']['bg'] = $prop['fillColor']; - } else { - $opt['mk']['bg'] = TCPDF_COLORS::convertHTMLColorToDec($prop['fillColor'], $spot_colors); - } - } - // strokeColor: Specifies the stroke color for a field that is used to stroke the rectangle of the field with a line as large as the line width. - if (isset($prop['strokeColor'])) { - if (is_array($prop['strokeColor'])) { - $opt['mk']['bc'] = $prop['strokeColor']; - } else { - $opt['mk']['bc'] = TCPDF_COLORS::convertHTMLColorToDec($prop['strokeColor'], $spot_colors); - } - } - // rotation: The rotation of a widget in counterclockwise increments. - if (isset($prop['rotation'])) { - $opt['mk']['r'] = $prop['rotation']; - } - // charLimit: Limits the number of characters that a user can type into a text field. - if (isset($prop['charLimit'])) { - $opt['maxlen'] = intval($prop['charLimit']); - } - if (!isset($ff)) { - $ff = 0; // default value - } - // readonly: The read-only characteristic of a field. If a field is read-only, the user can see the field but cannot change it. - if (isset($prop['readonly']) AND ($prop['readonly'] == 'true')) { - $ff += 1 << 0; - } - // required: Specifies whether a field requires a value. - if (isset($prop['required']) AND ($prop['required'] == 'true')) { - $ff += 1 << 1; - } - // multiline: Controls how text is wrapped within the field. - if (isset($prop['multiline']) AND ($prop['multiline'] == 'true')) { - $ff += 1 << 12; - } - // password: Specifies whether the field should display asterisks when data is entered in the field. - if (isset($prop['password']) AND ($prop['password'] == 'true')) { - $ff += 1 << 13; - } - // NoToggleToOff: If set, exactly one radio button shall be selected at all times; selecting the currently selected button has no effect. - if (isset($prop['NoToggleToOff']) AND ($prop['NoToggleToOff'] == 'true')) { - $ff += 1 << 14; - } - // Radio: If set, the field is a set of radio buttons. - if (isset($prop['Radio']) AND ($prop['Radio'] == 'true')) { - $ff += 1 << 15; - } - // Pushbutton: If set, the field is a pushbutton that does not retain a permanent value. - if (isset($prop['Pushbutton']) AND ($prop['Pushbutton'] == 'true')) { - $ff += 1 << 16; - } - // Combo: If set, the field is a combo box; if clear, the field is a list box. - if (isset($prop['Combo']) AND ($prop['Combo'] == 'true')) { - $ff += 1 << 17; - } - // editable: Controls whether a combo box is editable. - if (isset($prop['editable']) AND ($prop['editable'] == 'true')) { - $ff += 1 << 18; - } - // Sort: If set, the field's option items shall be sorted alphabetically. - if (isset($prop['Sort']) AND ($prop['Sort'] == 'true')) { - $ff += 1 << 19; - } - // fileSelect: If true, sets the file-select flag in the Options tab of the text field (Field is Used for File Selection). - if (isset($prop['fileSelect']) AND ($prop['fileSelect'] == 'true')) { - $ff += 1 << 20; - } - // multipleSelection: If true, indicates that a list box allows a multiple selection of items. - if (isset($prop['multipleSelection']) AND ($prop['multipleSelection'] == 'true')) { - $ff += 1 << 21; - } - // doNotSpellCheck: If true, spell checking is not performed on this editable text field. - if (isset($prop['doNotSpellCheck']) AND ($prop['doNotSpellCheck'] == 'true')) { - $ff += 1 << 22; - } - // doNotScroll: If true, the text field does not scroll and the user, therefore, is limited by the rectangular region designed for the field. - if (isset($prop['doNotScroll']) AND ($prop['doNotScroll'] == 'true')) { - $ff += 1 << 23; - } - // comb: If set to true, the field background is drawn as series of boxes (one for each character in the value of the field) and each character of the content is drawn within those boxes. The number of boxes drawn is determined from the charLimit property. It applies only to text fields. The setter will also raise if any of the following field properties are also set multiline, password, and fileSelect. A side-effect of setting this property is that the doNotScroll property is also set. - if (isset($prop['comb']) AND ($prop['comb'] == 'true')) { - $ff += 1 << 24; - } - // radiosInUnison: If false, even if a group of radio buttons have the same name and export value, they behave in a mutually exclusive fashion, like HTML radio buttons. - if (isset($prop['radiosInUnison']) AND ($prop['radiosInUnison'] == 'true')) { - $ff += 1 << 25; - } - // richText: If true, the field allows rich text formatting. - if (isset($prop['richText']) AND ($prop['richText'] == 'true')) { - $ff += 1 << 25; - } - // commitOnSelChange: Controls whether a field value is committed after a selection change. - if (isset($prop['commitOnSelChange']) AND ($prop['commitOnSelChange'] == 'true')) { - $ff += 1 << 26; - } - $opt['ff'] = $ff; - // defaultValue: The default value of a field - that is, the value that the field is set to when the form is reset. - if (isset($prop['defaultValue'])) { - $opt['dv'] = $prop['defaultValue']; - } - $f = 4; // default value for annotation flags - // readonly: The read-only characteristic of a field. If a field is read-only, the user can see the field but cannot change it. - if (isset($prop['readonly']) AND ($prop['readonly'] == 'true')) { - $f += 1 << 6; - } - // display: Controls whether the field is hidden or visible on screen and in print. - if (isset($prop['display'])) { - if ($prop['display'] == 'display.visible') { - // - } elseif ($prop['display'] == 'display.hidden') { - $f += 1 << 1; - } elseif ($prop['display'] == 'display.noPrint') { - $f -= 1 << 2; - } elseif ($prop['display'] == 'display.noView') { - $f += 1 << 5; - } - } - $opt['f'] = $f; - // currentValueIndices: Reads and writes single or multiple values of a list box or combo box. - if (isset($prop['currentValueIndices']) AND is_array($prop['currentValueIndices'])) { - $opt['i'] = $prop['currentValueIndices']; - } - // value: The value of the field data that the user has entered. - if (isset($prop['value'])) { - if (is_array($prop['value'])) { - $opt['opt'] = array(); - foreach ($prop['value'] AS $key => $optval) { - // exportValues: An array of strings representing the export values for the field. - if (isset($prop['exportValues'][$key])) { - $opt['opt'][$key] = array($prop['exportValues'][$key], $prop['value'][$key]); - } else { - $opt['opt'][$key] = $prop['value'][$key]; - } - } - } else { - $opt['v'] = $prop['value']; - } - } - // richValue: This property specifies the text contents and formatting of a rich text field. - if (isset($prop['richValue'])) { - $opt['rv'] = $prop['richValue']; - } - // submitName: If nonempty, used during form submission instead of name. Only applicable if submitting in HTML format (that is, URL-encoded). - if (isset($prop['submitName'])) { - $opt['tm'] = $prop['submitName']; - } - // name: Fully qualified field name. - if (isset($prop['name'])) { - $opt['t'] = $prop['name']; - } - // userName: The user name (short description string) of the field. - if (isset($prop['userName'])) { - $opt['tu'] = $prop['userName']; - } - // highlight: Defines how a button reacts when a user clicks it. - if (isset($prop['highlight'])) { - switch ($prop['highlight']) { - case 'none': - case 'highlight.n': { - $opt['h'] = 'N'; - break; - } - case 'invert': - case 'highlight.i': { - $opt['h'] = 'i'; - break; - } - case 'push': - case 'highlight.p': { - $opt['h'] = 'P'; - break; - } - case 'outline': - case 'highlight.o': { - $opt['h'] = 'O'; - break; - } - } - } - // Unsupported options: - // - calcOrderIndex: Changes the calculation order of fields in the document. - // - delay: Delays the redrawing of a field's appearance. - // - defaultStyle: This property defines the default style attributes for the form field. - // - style: Allows the user to set the glyph style of a check box or radio button. - // - textColor, textFont, textSize - return $opt; - } - - /** - * Format the page numbers. - * This method can be overriden for custom formats. - * @param $num (int) page number - * @since 4.2.005 (2008-11-06) - * @public static - */ - public static function formatPageNumber($num) { - return number_format((float)$num, 0, '', '.'); - } - - /** - * Format the page numbers on the Table Of Content. - * This method can be overriden for custom formats. - * @param $num (int) page number - * @since 4.5.001 (2009-01-04) - * @see addTOC(), addHTMLTOC() - * @public static - */ - public static function formatTOCPageNumber($num) { - return number_format((float)$num, 0, '', '.'); - } - - /** - * Extracts the CSS properties from a CSS string. - * @param $cssdata (string) string containing CSS definitions. - * @return An array where the keys are the CSS selectors and the values are the CSS properties. - * @author Nicola Asuni - * @since 5.1.000 (2010-05-25) - * @public static - */ - public static function extractCSSproperties($cssdata) { - if (empty($cssdata)) { - return array(); - } - // remove comments - $cssdata = preg_replace('/\/\*[^\*]*\*\//', '', $cssdata); - // remove newlines and multiple spaces - $cssdata = preg_replace('/[\s]+/', ' ', $cssdata); - // remove some spaces - $cssdata = preg_replace('/[\s]*([;:\{\}]{1})[\s]*/', '\\1', $cssdata); - // remove empty blocks - $cssdata = preg_replace('/([^\}\{]+)\{\}/', '', $cssdata); - // replace media type parenthesis - $cssdata = preg_replace('/@media[\s]+([^\{]*)\{/i', '@media \\1§', $cssdata); - $cssdata = preg_replace('/\}\}/si', '}§', $cssdata); - // trim string - $cssdata = trim($cssdata); - // find media blocks (all, braille, embossed, handheld, print, projection, screen, speech, tty, tv) - $cssblocks = array(); - $matches = array(); - if (preg_match_all('/@media[\s]+([^\§]*)§([^§]*)§/i', $cssdata, $matches) > 0) { - foreach ($matches[1] as $key => $type) { - $cssblocks[$type] = $matches[2][$key]; - } - // remove media blocks - $cssdata = preg_replace('/@media[\s]+([^\§]*)§([^§]*)§/i', '', $cssdata); - } - // keep 'all' and 'print' media, other media types are discarded - if (isset($cssblocks['all']) AND !empty($cssblocks['all'])) { - $cssdata .= $cssblocks['all']; - } - if (isset($cssblocks['print']) AND !empty($cssblocks['print'])) { - $cssdata .= $cssblocks['print']; - } - // reset css blocks array - $cssblocks = array(); - $matches = array(); - // explode css data string into array - if (substr($cssdata, -1) == '}') { - // remove last parethesis - $cssdata = substr($cssdata, 0, -1); - } - $matches = explode('}', $cssdata); - foreach ($matches as $key => $block) { - // index 0 contains the CSS selector, index 1 contains CSS properties - $cssblocks[$key] = explode('{', $block); - if (!isset($cssblocks[$key][1])) { - // remove empty definitions - unset($cssblocks[$key]); - } - } - // split groups of selectors (comma-separated list of selectors) - foreach ($cssblocks as $key => $block) { - if (strpos($block[0], ',') > 0) { - $selectors = explode(',', $block[0]); - foreach ($selectors as $sel) { - $cssblocks[] = array(0 => trim($sel), 1 => $block[1]); - } - unset($cssblocks[$key]); - } - } - // covert array to selector => properties - $cssdata = array(); - foreach ($cssblocks as $block) { - $selector = $block[0]; - // calculate selector's specificity - $matches = array(); - $a = 0; // the declaration is not from is a 'style' attribute - $b = intval(preg_match_all('/[\#]/', $selector, $matches)); // number of ID attributes - $c = intval(preg_match_all('/[\[\.]/', $selector, $matches)); // number of other attributes - $c += intval(preg_match_all('/[\:]link|visited|hover|active|focus|target|lang|enabled|disabled|checked|indeterminate|root|nth|first|last|only|empty|contains|not/i', $selector, $matches)); // number of pseudo-classes - $d = intval(preg_match_all('/[\>\+\~\s]{1}[a-zA-Z0-9]+/', ' '.$selector, $matches)); // number of element names - $d += intval(preg_match_all('/[\:][\:]/', $selector, $matches)); // number of pseudo-elements - $specificity = $a.$b.$c.$d; - // add specificity to the beginning of the selector - $cssdata[$specificity.' '.$selector] = $block[1]; - } - // sort selectors alphabetically to account for specificity - ksort($cssdata, SORT_STRING); - // return array - return $cssdata; - } - - /** - * Cleanup HTML code (requires HTML Tidy library). - * @param $html (string) htmlcode to fix - * @param $default_css (string) CSS commands to add - * @param $tagvs (array) parameters for setHtmlVSpace method - * @param $tidy_options (array) options for tidy_parse_string function - * @param $tagvspaces (array) Array of vertical spaces for tags. - * @return string XHTML code cleaned up - * @author Nicola Asuni - * @since 5.9.017 (2010-11-16) - * @see setHtmlVSpace() - * @public static - */ - public static function fixHTMLCode($html, $default_css='', $tagvs='', $tidy_options='', &$tagvspaces) { - // configure parameters for HTML Tidy - if ($tidy_options === '') { - $tidy_options = array ( - 'clean' => 1, - 'drop-empty-paras' => 0, - 'drop-proprietary-attributes' => 1, - 'fix-backslash' => 1, - 'hide-comments' => 1, - 'join-styles' => 1, - 'lower-literals' => 1, - 'merge-divs' => 1, - 'merge-spans' => 1, - 'output-xhtml' => 1, - 'word-2000' => 1, - 'wrap' => 0, - 'output-bom' => 0, - //'char-encoding' => 'utf8', - //'input-encoding' => 'utf8', - //'output-encoding' => 'utf8' - ); - } - // clean up the HTML code - $tidy = tidy_parse_string($html, $tidy_options); - // fix the HTML - $tidy->cleanRepair(); - // get the CSS part - $tidy_head = tidy_get_head($tidy); - $css = $tidy_head->value; - $css = preg_replace('/]+)>/ims', ''; - // get the body part - $tidy_body = tidy_get_body($tidy); - $html = $tidy_body->value; - // fix some self-closing tags - $html = str_replace('
          ', '
          ', $html); - // remove some empty tag blocks - $html = preg_replace('/]*)><\/div>/', '', $html); - $html = preg_replace('/]*)><\/p>/', '', $html); - if ($tagvs !== '') { - // set vertical space for some XHTML tags - $tagvspaces = $tagvs; - } - // return the cleaned XHTML code + CSS - return $css.$html; - } - - /** - * Returns true if the CSS selector is valid for the selected HTML tag - * @param $dom (array) array of HTML tags and properties - * @param $key (int) key of the current HTML tag - * @param $selector (string) CSS selector string - * @return true if the selector is valid, false otherwise - * @since 5.1.000 (2010-05-25) - * @public static - */ - public static function isValidCSSSelectorForTag($dom, $key, $selector) { - $valid = false; // value to be returned - $tag = $dom[$key]['value']; - $class = array(); - if (isset($dom[$key]['attribute']['class']) AND !empty($dom[$key]['attribute']['class'])) { - $class = explode(' ', strtolower($dom[$key]['attribute']['class'])); - } - $id = ''; - if (isset($dom[$key]['attribute']['id']) AND !empty($dom[$key]['attribute']['id'])) { - $id = strtolower($dom[$key]['attribute']['id']); - } - $selector = preg_replace('/([\>\+\~\s]{1})([\.]{1})([^\>\+\~\s]*)/si', '\\1*.\\3', $selector); - $matches = array(); - if (preg_match_all('/([\>\+\~\s]{1})([a-zA-Z0-9\*]+)([^\>\+\~\s]*)/si', $selector, $matches, PREG_PATTERN_ORDER | PREG_OFFSET_CAPTURE) > 0) { - $parentop = array_pop($matches[1]); - $operator = $parentop[0]; - $offset = $parentop[1]; - $lasttag = array_pop($matches[2]); - $lasttag = strtolower(trim($lasttag[0])); - if (($lasttag == '*') OR ($lasttag == $tag)) { - // the last element on selector is our tag or 'any tag' - $attrib = array_pop($matches[3]); - $attrib = strtolower(trim($attrib[0])); - if (!empty($attrib)) { - // check if matches class, id, attribute, pseudo-class or pseudo-element - switch ($attrib[0]) { - case '.': { // class - if (in_array(substr($attrib, 1), $class)) { - $valid = true; - } - break; - } - case '#': { // ID - if (substr($attrib, 1) == $id) { - $valid = true; - } - break; - } - case '[': { // attribute - $attrmatch = array(); - if (preg_match('/\[([a-zA-Z0-9]*)[\s]*([\~\^\$\*\|\=]*)[\s]*["]?([^"\]]*)["]?\]/i', $attrib, $attrmatch) > 0) { - $att = strtolower($attrmatch[1]); - $val = $attrmatch[3]; - if (isset($dom[$key]['attribute'][$att])) { - switch ($attrmatch[2]) { - case '=': { - if ($dom[$key]['attribute'][$att] == $val) { - $valid = true; - } - break; - } - case '~=': { - if (in_array($val, explode(' ', $dom[$key]['attribute'][$att]))) { - $valid = true; - } - break; - } - case '^=': { - if ($val == substr($dom[$key]['attribute'][$att], 0, strlen($val))) { - $valid = true; - } - break; - } - case '$=': { - if ($val == substr($dom[$key]['attribute'][$att], -strlen($val))) { - $valid = true; - } - break; - } - case '*=': { - if (strpos($dom[$key]['attribute'][$att], $val) !== false) { - $valid = true; - } - break; - } - case '|=': { - if ($dom[$key]['attribute'][$att] == $val) { - $valid = true; - } elseif (preg_match('/'.$val.'[\-]{1}/i', $dom[$key]['attribute'][$att]) > 0) { - $valid = true; - } - break; - } - default: { - $valid = true; - } - } - } - } - break; - } - case ':': { // pseudo-class or pseudo-element - if ($attrib[1] == ':') { // pseudo-element - // pseudo-elements are not supported! - // (::first-line, ::first-letter, ::before, ::after) - } else { // pseudo-class - // pseudo-classes are not supported! - // (:root, :nth-child(n), :nth-last-child(n), :nth-of-type(n), :nth-last-of-type(n), :first-child, :last-child, :first-of-type, :last-of-type, :only-child, :only-of-type, :empty, :link, :visited, :active, :hover, :focus, :target, :lang(fr), :enabled, :disabled, :checked) - } - break; - } - } // end of switch - } else { - $valid = true; - } - if ($valid AND ($offset > 0)) { - $valid = false; - // check remaining selector part - $selector = substr($selector, 0, $offset); - switch ($operator) { - case ' ': { // descendant of an element - while ($dom[$key]['parent'] > 0) { - if (self::isValidCSSSelectorForTag($dom, $dom[$key]['parent'], $selector)) { - $valid = true; - break; - } else { - $key = $dom[$key]['parent']; - } - } - break; - } - case '>': { // child of an element - $valid = self::isValidCSSSelectorForTag($dom, $dom[$key]['parent'], $selector); - break; - } - case '+': { // immediately preceded by an element - for ($i = ($key - 1); $i > $dom[$key]['parent']; --$i) { - if ($dom[$i]['tag'] AND $dom[$i]['opening']) { - $valid = self::isValidCSSSelectorForTag($dom, $i, $selector); - break; - } - } - break; - } - case '~': { // preceded by an element - for ($i = ($key - 1); $i > $dom[$key]['parent']; --$i) { - if ($dom[$i]['tag'] AND $dom[$i]['opening']) { - if (self::isValidCSSSelectorForTag($dom, $i, $selector)) { - break; - } - } - } - break; - } - } - } - } - } - return $valid; - } - - /** - * Returns the styles array that apply for the selected HTML tag. - * @param $dom (array) array of HTML tags and properties - * @param $key (int) key of the current HTML tag - * @param $css (array) array of CSS properties - * @return array containing CSS properties - * @since 5.1.000 (2010-05-25) - * @public static - */ - public static function getCSSdataArray($dom, $key, $css) { - $cssarray = array(); // style to be returned - // get parent CSS selectors - $selectors = array(); - if (isset($dom[($dom[$key]['parent'])]['csssel'])) { - $selectors = $dom[($dom[$key]['parent'])]['csssel']; - } - // get all styles that apply - foreach($css as $selector => $style) { - $pos = strpos($selector, ' '); - // get specificity - $specificity = substr($selector, 0, $pos); - // remove specificity - $selector = substr($selector, $pos); - // check if this selector apply to current tag - if (self::isValidCSSSelectorForTag($dom, $key, $selector)) { - if (!in_array($selector, $selectors)) { - // add style if not already added on parent selector - $cssarray[] = array('k' => $selector, 's' => $specificity, 'c' => $style); - $selectors[] = $selector; - } - } - } - if (isset($dom[$key]['attribute']['style'])) { - // attach inline style (latest properties have high priority) - $cssarray[] = array('k' => '', 's' => '1000', 'c' => $dom[$key]['attribute']['style']); - } - // order the css array to account for specificity - $cssordered = array(); - foreach ($cssarray as $key => $val) { - $skey = sprintf('%04d', $key); - $cssordered[$val['s'].'_'.$skey] = $val; - } - // sort selectors alphabetically to account for specificity - ksort($cssordered, SORT_STRING); - return array($selectors, $cssordered); - } - - /** - * Compact CSS data array into single string. - * @param $css (array) array of CSS properties - * @return string containing merged CSS properties - * @since 5.9.070 (2011-04-19) - * @public static - */ - public static function getTagStyleFromCSSarray($css) { - $tagstyle = ''; // value to be returned - foreach ($css as $style) { - // split single css commands - $csscmds = explode(';', $style['c']); - foreach ($csscmds as $cmd) { - if (!empty($cmd)) { - $pos = strpos($cmd, ':'); - if ($pos !== false) { - $cmd = substr($cmd, 0, ($pos + 1)); - if (strpos($tagstyle, $cmd) !== false) { - // remove duplicate commands (last commands have high priority) - $tagstyle = preg_replace('/'.$cmd.'[^;]+/i', '', $tagstyle); - } - } - } - } - $tagstyle .= ';'.$style['c']; - } - // remove multiple semicolons - $tagstyle = preg_replace('/[;]+/', ';', $tagstyle); - return $tagstyle; - } - - /** - * Returns the Roman representation of an integer number - * @param $number (int) number to convert - * @return string roman representation of the specified number - * @since 4.4.004 (2008-12-10) - * @public static - */ - public static function intToRoman($number) { - $roman = ''; - while ($number >= 1000) { - $roman .= 'M'; - $number -= 1000; - } - while ($number >= 900) { - $roman .= 'CM'; - $number -= 900; - } - while ($number >= 500) { - $roman .= 'D'; - $number -= 500; - } - while ($number >= 400) { - $roman .= 'CD'; - $number -= 400; - } - while ($number >= 100) { - $roman .= 'C'; - $number -= 100; - } - while ($number >= 90) { - $roman .= 'XC'; - $number -= 90; - } - while ($number >= 50) { - $roman .= 'L'; - $number -= 50; - } - while ($number >= 40) { - $roman .= 'XL'; - $number -= 40; - } - while ($number >= 10) { - $roman .= 'X'; - $number -= 10; - } - while ($number >= 9) { - $roman .= 'IX'; - $number -= 9; - } - while ($number >= 5) { - $roman .= 'V'; - $number -= 5; - } - while ($number >= 4) { - $roman .= 'IV'; - $number -= 4; - } - while ($number >= 1) { - $roman .= 'I'; - --$number; - } - return $roman; - } - - /** - * Find position of last occurrence of a substring in a string - * @param $haystack (string) The string to search in. - * @param $needle (string) substring to search. - * @param $offset (int) May be specified to begin searching an arbitrary number of characters into the string. - * @return Returns the position where the needle exists. Returns FALSE if the needle was not found. - * @since 4.8.038 (2010-03-13) - * @public static - */ - public static function revstrpos($haystack, $needle, $offset = 0) { - $length = strlen($haystack); - $offset = ($offset > 0)?($length - $offset):abs($offset); - $pos = strpos(strrev($haystack), strrev($needle), $offset); - return ($pos === false)?false:($length - $pos - strlen($needle)); - } - - /** - * Returns an array of hyphenation patterns. - * @param $file (string) TEX file containing hypenation patterns. TEX pattrns can be downloaded from http://www.ctan.org/tex-archive/language/hyph-utf8/tex/generic/hyph-utf8/patterns/ - * @return array of hyphenation patterns - * @author Nicola Asuni - * @since 4.9.012 (2010-04-12) - * @public static - */ - public static function getHyphenPatternsFromTEX($file) { - // TEX patterns are available at: - // http://www.ctan.org/tex-archive/language/hyph-utf8/tex/generic/hyph-utf8/patterns/ - $data = file_get_contents($file); - $patterns = array(); - // remove comments - $data = preg_replace('/\%[^\n]*/', '', $data); - // extract the patterns part - preg_match('/\\\\patterns\{([^\}]*)\}/i', $data, $matches); - $data = trim(substr($matches[0], 10, -1)); - // extract each pattern - $patterns_array = preg_split('/[\s]+/', $data); - // create new language array of patterns - $patterns = array(); - foreach($patterns_array as $val) { - if (!TCPDF_STATIC::empty_string($val)) { - $val = trim($val); - $val = str_replace('\'', '\\\'', $val); - $key = preg_replace('/[0-9]+/', '', $val); - $patterns[$key] = $val; - } - } - return $patterns; - } - - /** - * Get the Path-Painting Operators. - * @param $style (string) Style of rendering. Possible values are: - *
            - *
          • S or D: Stroke the path.
          • - *
          • s or d: Close and stroke the path.
          • - *
          • f or F: Fill the path, using the nonzero winding number rule to determine the region to fill.
          • - *
          • f* or F*: Fill the path, using the even-odd rule to determine the region to fill.
          • - *
          • B or FD or DF: Fill and then stroke the path, using the nonzero winding number rule to determine the region to fill.
          • - *
          • B* or F*D or DF*: Fill and then stroke the path, using the even-odd rule to determine the region to fill.
          • - *
          • b or fd or df: Close, fill, and then stroke the path, using the nonzero winding number rule to determine the region to fill.
          • - *
          • b or f*d or df*: Close, fill, and then stroke the path, using the even-odd rule to determine the region to fill.
          • - *
          • CNZ: Clipping mode using the even-odd rule to determine which regions lie inside the clipping path.
          • - *
          • CEO: Clipping mode using the nonzero winding number rule to determine which regions lie inside the clipping path
          • - *
          • n: End the path object without filling or stroking it.
          • - *
          - * @param $default (string) default style - * @author Nicola Asuni - * @since 5.0.000 (2010-04-30) - * @public static - */ - public static function getPathPaintOperator($style, $default='S') { - $op = ''; - switch($style) { - case 'S': - case 'D': { - $op = 'S'; - break; - } - case 's': - case 'd': { - $op = 's'; - break; - } - case 'f': - case 'F': { - $op = 'f'; - break; - } - case 'f*': - case 'F*': { - $op = 'f*'; - break; - } - case 'B': - case 'FD': - case 'DF': { - $op = 'B'; - break; - } - case 'B*': - case 'F*D': - case 'DF*': { - $op = 'B*'; - break; - } - case 'b': - case 'fd': - case 'df': { - $op = 'b'; - break; - } - case 'b*': - case 'f*d': - case 'df*': { - $op = 'b*'; - break; - } - case 'CNZ': { - $op = 'W n'; - break; - } - case 'CEO': { - $op = 'W* n'; - break; - } - case 'n': { - $op = 'n'; - break; - } - default: { - if (!empty($default)) { - $op = self::getPathPaintOperator($default, ''); - } else { - $op = ''; - } - } - } - return $op; - } - - /** - * Get the product of two SVG tranformation matrices - * @param $ta (array) first SVG tranformation matrix - * @param $tb (array) second SVG tranformation matrix - * @return transformation array - * @author Nicola Asuni - * @since 5.0.000 (2010-05-02) - * @public static - */ - public static function getTransformationMatrixProduct($ta, $tb) { - $tm = array(); - $tm[0] = ($ta[0] * $tb[0]) + ($ta[2] * $tb[1]); - $tm[1] = ($ta[1] * $tb[0]) + ($ta[3] * $tb[1]); - $tm[2] = ($ta[0] * $tb[2]) + ($ta[2] * $tb[3]); - $tm[3] = ($ta[1] * $tb[2]) + ($ta[3] * $tb[3]); - $tm[4] = ($ta[0] * $tb[4]) + ($ta[2] * $tb[5]) + $ta[4]; - $tm[5] = ($ta[1] * $tb[4]) + ($ta[3] * $tb[5]) + $ta[5]; - return $tm; - } - - /** - * Get the tranformation matrix from SVG transform attribute - * @param $attribute (string) transformation - * @return array of transformations - * @author Nicola Asuni - * @since 5.0.000 (2010-05-02) - * @public static - */ - public static function getSVGTransformMatrix($attribute) { - // identity matrix - $tm = array(1, 0, 0, 1, 0, 0); - $transform = array(); - if (preg_match_all('/(matrix|translate|scale|rotate|skewX|skewY)[\s]*\(([^\)]+)\)/si', $attribute, $transform, PREG_SET_ORDER) > 0) { - foreach ($transform as $key => $data) { - if (!empty($data[2])) { - $a = 1; - $b = 0; - $c = 0; - $d = 1; - $e = 0; - $f = 0; - $regs = array(); - switch ($data[1]) { - case 'matrix': { - if (preg_match('/([a-z0-9\-\.]+)[\,\s]+([a-z0-9\-\.]+)[\,\s]+([a-z0-9\-\.]+)[\,\s]+([a-z0-9\-\.]+)[\,\s]+([a-z0-9\-\.]+)[\,\s]+([a-z0-9\-\.]+)/si', $data[2], $regs)) { - $a = $regs[1]; - $b = $regs[2]; - $c = $regs[3]; - $d = $regs[4]; - $e = $regs[5]; - $f = $regs[6]; - } - break; - } - case 'translate': { - if (preg_match('/([a-z0-9\-\.]+)[\,\s]+([a-z0-9\-\.]+)/si', $data[2], $regs)) { - $e = $regs[1]; - $f = $regs[2]; - } elseif (preg_match('/([a-z0-9\-\.]+)/si', $data[2], $regs)) { - $e = $regs[1]; - } - break; - } - case 'scale': { - if (preg_match('/([a-z0-9\-\.]+)[\,\s]+([a-z0-9\-\.]+)/si', $data[2], $regs)) { - $a = $regs[1]; - $d = $regs[2]; - } elseif (preg_match('/([a-z0-9\-\.]+)/si', $data[2], $regs)) { - $a = $regs[1]; - $d = $a; - } - break; - } - case 'rotate': { - if (preg_match('/([0-9\-\.]+)[\,\s]+([a-z0-9\-\.]+)[\,\s]+([a-z0-9\-\.]+)/si', $data[2], $regs)) { - $ang = deg2rad($regs[1]); - $x = $regs[2]; - $y = $regs[3]; - $a = cos($ang); - $b = sin($ang); - $c = -$b; - $d = $a; - $e = ($x * (1 - $a)) - ($y * $c); - $f = ($y * (1 - $d)) - ($x * $b); - } elseif (preg_match('/([0-9\-\.]+)/si', $data[2], $regs)) { - $ang = deg2rad($regs[1]); - $a = cos($ang); - $b = sin($ang); - $c = -$b; - $d = $a; - $e = 0; - $f = 0; - } - break; - } - case 'skewX': { - if (preg_match('/([0-9\-\.]+)/si', $data[2], $regs)) { - $c = tan(deg2rad($regs[1])); - } - break; - } - case 'skewY': { - if (preg_match('/([0-9\-\.]+)/si', $data[2], $regs)) { - $b = tan(deg2rad($regs[1])); - } - break; - } - } - $tm = self::getTransformationMatrixProduct($tm, array($a, $b, $c, $d, $e, $f)); - } - } - } - return $tm; - } - - /** - * Returns the angle in radiants between two vectors - * @param $x1 (int) X coordinate of first vector point - * @param $y1 (int) Y coordinate of first vector point - * @param $x2 (int) X coordinate of second vector point - * @param $y2 (int) Y coordinate of second vector point - * @author Nicola Asuni - * @since 5.0.000 (2010-05-04) - * @public static - */ - public static function getVectorsAngle($x1, $y1, $x2, $y2) { - $dprod = ($x1 * $x2) + ($y1 * $y2); - $dist1 = sqrt(($x1 * $x1) + ($y1 * $y1)); - $dist2 = sqrt(($x2 * $x2) + ($y2 * $y2)); - $angle = acos($dprod / ($dist1 * $dist2)); - if (is_nan($angle)) { - $angle = M_PI; - } - if ((($x1 * $y2) - ($x2 * $y1)) < 0) { - $angle *= -1; - } - return $angle; - } - - /** - * Split string by a regular expression. - * This is a wrapper for the preg_split function to avoid the bug: https://bugs.php.net/bug.php?id=45850 - * @param $pattern (string) The regular expression pattern to search for without the modifiers, as a string. - * @param $modifiers (string) The modifiers part of the pattern, - * @param $subject (string) The input string. - * @param $limit (int) If specified, then only substrings up to limit are returned with the rest of the string being placed in the last substring. A limit of -1, 0 or NULL means "no limit" and, as is standard across PHP, you can use NULL to skip to the flags parameter. - * @param $flags (int) The flags as specified on the preg_split PHP function. - * @return Returns an array containing substrings of subject split along boundaries matched by pattern.modifier - * @author Nicola Asuni - * @since 6.0.023 - * @public static - */ - public static function pregSplit($pattern, $modifiers, $subject, $limit=NULL, $flags=NULL) { - // the bug only happens on PHP 5.2 when using the u modifier - if ((strpos($modifiers, 'u') === FALSE) OR (count(preg_split('//u', "\n\t", -1, PREG_SPLIT_NO_EMPTY)) == 2)) { - return preg_split($pattern.$modifiers, $subject, $limit, $flags); - } - // preg_split is bugged - try alternative solution - $ret = array(); - while (($nl = strpos($subject, "\n")) !== FALSE) { - $ret = array_merge($ret, preg_split($pattern.$modifiers, substr($subject, 0, $nl), $limit, $flags)); - $ret[] = "\n"; - $subject = substr($subject, ($nl + 1)); - } - if (strlen($subject) > 0) { - $ret = array_merge($ret, preg_split($pattern.$modifiers, $subject, $limit, $flags)); - } - return $ret; - } - - /** - * Wrapper to use fopen only with local files - * @param filename (string) Name of the file to open - * @param $mode (string) - * @return Returns a file pointer resource on success, or FALSE on error. - * @public static - */ - public static function fopenLocal($filename, $mode) { - if (strpos($filename, '://') === false) { - $filename = 'file://'.$filename; - } elseif (strpos($filename, 'file://') !== 0) { - return false; - } - return fopen($filename, $mode); - } - - /** - * Reads entire file into a string. - * The file can be also an URL. - * @param $file (string) Name of the file or URL to read. - * @return The function returns the read data or FALSE on failure. - * @author Nicola Asuni - * @since 6.0.025 - * @public static - */ - public static function fileGetContents($file) { - //$file = html_entity_decode($file); - // array of possible alternative paths/URLs - $alt = array($file); - // replace URL relative path with full real server path - if ((strlen($file) > 1) - AND ($file[0] == '/') - AND ($file[1] != '/') - AND !empty($_SERVER['DOCUMENT_ROOT']) - AND ($_SERVER['DOCUMENT_ROOT'] != '/')) { - $findroot = strpos($file, $_SERVER['DOCUMENT_ROOT']); - if (($findroot === false) OR ($findroot > 1)) { - if (substr($_SERVER['DOCUMENT_ROOT'], -1) == '/') { - $tmp = substr($_SERVER['DOCUMENT_ROOT'], 0, -1).$file; - } else { - $tmp = $_SERVER['DOCUMENT_ROOT'].$file; - } - $alt[] = htmlspecialchars_decode(urldecode($tmp)); - } - } - // URL mode - $url = $file; - // check for missing protocol - if (preg_match('%^/{2}%', $url)) { - if (preg_match('%^([^:]+:)//%i', K_PATH_URL, $match)) { - $url = $match[1].str_replace(' ', '%20', $url); - $alt[] = $url; - } - } - $urldata = @parse_url($url); - if (!isset($urldata['query']) OR (strlen($urldata['query']) <= 0)) { - if (K_PATH_URL AND (strpos($url, K_PATH_URL) === 0)) { - // convert URL to full server path - $tmp = str_replace(K_PATH_URL, K_PATH_MAIN, $url); - $tmp = htmlspecialchars_decode(urldecode($tmp)); - $alt[] = $tmp; - } - } - if (isset($_SERVER['SCRIPT_URI'])) { - $urldata = @parse_url($_SERVER['SCRIPT_URI']); - $alt[] = $urldata['scheme'].'://'.$urldata['host'].(($file[0] == '/') ? '' : '/').$file; - } - foreach ($alt as $f) { - $ret = @file_get_contents($f); - if (($ret === FALSE) - AND !ini_get('allow_url_fopen') - AND function_exists('curl_init') - AND preg_match('%^(https?|ftp)://%', $f)) { - // try to get remote file data using cURL - $cs = curl_init(); // curl session - curl_setopt($cs, CURLOPT_URL, $f); - curl_setopt($cs, CURLOPT_BINARYTRANSFER, true); - curl_setopt($cs, CURLOPT_FAILONERROR, true); - curl_setopt($cs, CURLOPT_RETURNTRANSFER, true); - if ((ini_get('open_basedir') == '') AND (!ini_get('safe_mode'))) { - curl_setopt($cs, CURLOPT_FOLLOWLOCATION, true); - } - curl_setopt($cs, CURLOPT_CONNECTTIMEOUT, 5); - curl_setopt($cs, CURLOPT_TIMEOUT, 30); - curl_setopt($cs, CURLOPT_SSL_VERIFYPEER, false); - curl_setopt($cs, CURLOPT_SSL_VERIFYHOST, false); - curl_setopt($cs, CURLOPT_USERAGENT, 'TCPDF'); - $ret = curl_exec($cs); - curl_close($cs); - } - if ($ret !== FALSE) { - break; - } - } - return $ret; - } - -} // END OF TCPDF_STATIC CLASS - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/html/lib/tcpdf/tcpdf.php b/html/lib/tcpdf/tcpdf.php deleted file mode 100644 index b31e58bb2c..0000000000 --- a/html/lib/tcpdf/tcpdf.php +++ /dev/null @@ -1,24478 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// Description : -// This is a PHP class for generating PDF documents without requiring external extensions. -// -// NOTE: -// This class was originally derived in 2002 from the Public -// Domain FPDF class by Olivier Plathey (http://www.fpdf.org), -// but now is almost entirely rewritten and contains thousands of -// new lines of code and hundreds new features. -// -// Main features: -// * no external libraries are required for the basic functions; -// * all standard page formats, custom page formats, custom margins and units of measure; -// * UTF-8 Unicode and Right-To-Left languages; -// * TrueTypeUnicode, TrueType, Type1 and CID-0 fonts; -// * font subsetting; -// * methods to publish some XHTML + CSS code, Javascript and Forms; -// * images, graphic (geometric figures) and transformation methods; -// * supports JPEG, PNG and SVG images natively, all images supported by GD (GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM) and all images supported via ImagMagick (http://www.imagemagick.org/www/formats.html) -// * 1D and 2D barcodes: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extension, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index - Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS, Datamatrix, QR-Code, PDF417; -// * JPEG and PNG ICC profiles, Grayscale, RGB, CMYK, Spot Colors and Transparencies; -// * automatic page header and footer management; -// * document encryption up to 256 bit and digital signature certifications; -// * transactions to UNDO commands; -// * PDF annotations, including links, text and file attachments; -// * text rendering modes (fill, stroke and clipping); -// * multiple columns mode; -// * no-write page regions; -// * bookmarks, named destinations and table of content; -// * text hyphenation; -// * text stretching and spacing (tracking); -// * automatic page break, line break and text alignments including justification; -// * automatic page numbering and page groups; -// * move and delete pages; -// * page compression (requires php-zlib extension); -// * XOBject Templates; -// * Layers and object visibility. -// * PDF/A-1b support -//============================================================+ - -/** - * @file - * This is a PHP class for generating PDF documents without requiring external extensions.
          - * TCPDF project (http://www.tcpdf.org) was originally derived in 2002 from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org), but now is almost entirely rewritten.
          - *

          TCPDF main features are:

          - *
            - *
          • no external libraries are required for the basic functions;
          • - *
          • all standard page formats, custom page formats, custom margins and units of measure;
          • - *
          • UTF-8 Unicode and Right-To-Left languages;
          • - *
          • TrueTypeUnicode, TrueType, Type1 and CID-0 fonts;
          • - *
          • font subsetting;
          • - *
          • methods to publish some XHTML + CSS code, Javascript and Forms;
          • - *
          • images, graphic (geometric figures) and transformation methods; - *
          • supports JPEG, PNG and SVG images natively, all images supported by GD (GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM) and all images supported via ImagMagick (http://www.imagemagick.org/www/formats.html)
          • - *
          • 1D and 2D barcodes: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extension, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index - Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS, Datamatrix, QR-Code, PDF417;
          • - *
          • JPEG and PNG ICC profiles, Grayscale, RGB, CMYK, Spot Colors and Transparencies;
          • - *
          • automatic page header and footer management;
          • - *
          • document encryption up to 256 bit and digital signature certifications;
          • - *
          • transactions to UNDO commands;
          • - *
          • PDF annotations, including links, text and file attachments;
          • - *
          • text rendering modes (fill, stroke and clipping);
          • - *
          • multiple columns mode;
          • - *
          • no-write page regions;
          • - *
          • bookmarks, named destinations and table of content;
          • - *
          • text hyphenation;
          • - *
          • text stretching and spacing (tracking);
          • - *
          • automatic page break, line break and text alignments including justification;
          • - *
          • automatic page numbering and page groups;
          • - *
          • move and delete pages;
          • - *
          • page compression (requires php-zlib extension);
          • - *
          • XOBject Templates;
          • - *
          • Layers and object visibility;
          • - *
          • PDF/A-1b support.
          • - *
          - * Tools to encode your unicode fonts are on fonts/utils directory.

          - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 6.2.6 - */ - -// TCPDF configuration -require_once(dirname(__FILE__).'/tcpdf_autoconfig.php'); -// TCPDF static font methods and data -require_once(dirname(__FILE__).'/include/tcpdf_font_data.php'); -// TCPDF static font methods and data -require_once(dirname(__FILE__).'/include/tcpdf_fonts.php'); -// TCPDF static color methods and data -require_once(dirname(__FILE__).'/include/tcpdf_colors.php'); -// TCPDF static image methods and data -require_once(dirname(__FILE__).'/include/tcpdf_images.php'); -// TCPDF static methods and data -require_once(dirname(__FILE__).'/include/tcpdf_static.php'); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -/** - * @class TCPDF - * PHP class for generating PDF documents without requiring external extensions. - * TCPDF project (http://www.tcpdf.org) has been originally derived in 2002 from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org), but now is almost entirely rewritten.
          - * @package com.tecnick.tcpdf - * @brief PHP class for generating PDF documents without requiring external extensions. - * @version 6.2.6 - * @author Nicola Asuni - info@tecnick.com - */ -class TCPDF { - - // Protected properties - - /** - * Current page number. - * @protected - */ - protected $page; - - /** - * Current object number. - * @protected - */ - protected $n; - - /** - * Array of object offsets. - * @protected - */ - protected $offsets = array(); - - /** - * Array of object IDs for each page. - * @protected - */ - protected $pageobjects = array(); - - /** - * Buffer holding in-memory PDF. - * @protected - */ - protected $buffer; - - /** - * Array containing pages. - * @protected - */ - protected $pages = array(); - - /** - * Current document state. - * @protected - */ - protected $state; - - /** - * Compression flag. - * @protected - */ - protected $compress; - - /** - * Current page orientation (P = Portrait, L = Landscape). - * @protected - */ - protected $CurOrientation; - - /** - * Page dimensions. - * @protected - */ - protected $pagedim = array(); - - /** - * Scale factor (number of points in user unit). - * @protected - */ - protected $k; - - /** - * Width of page format in points. - * @protected - */ - protected $fwPt; - - /** - * Height of page format in points. - * @protected - */ - protected $fhPt; - - /** - * Current width of page in points. - * @protected - */ - protected $wPt; - - /** - * Current height of page in points. - * @protected - */ - protected $hPt; - - /** - * Current width of page in user unit. - * @protected - */ - protected $w; - - /** - * Current height of page in user unit. - * @protected - */ - protected $h; - - /** - * Left margin. - * @protected - */ - protected $lMargin; - - /** - * Right margin. - * @protected - */ - protected $rMargin; - - /** - * Cell left margin (used by regions). - * @protected - */ - protected $clMargin; - - /** - * Cell right margin (used by regions). - * @protected - */ - protected $crMargin; - - /** - * Top margin. - * @protected - */ - protected $tMargin; - - /** - * Page break margin. - * @protected - */ - protected $bMargin; - - /** - * Array of cell internal paddings ('T' => top, 'R' => right, 'B' => bottom, 'L' => left). - * @since 5.9.000 (2010-10-03) - * @protected - */ - protected $cell_padding = array('T' => 0, 'R' => 0, 'B' => 0, 'L' => 0); - - /** - * Array of cell margins ('T' => top, 'R' => right, 'B' => bottom, 'L' => left). - * @since 5.9.000 (2010-10-04) - * @protected - */ - protected $cell_margin = array('T' => 0, 'R' => 0, 'B' => 0, 'L' => 0); - - /** - * Current horizontal position in user unit for cell positioning. - * @protected - */ - protected $x; - - /** - * Current vertical position in user unit for cell positioning. - * @protected - */ - protected $y; - - /** - * Height of last cell printed. - * @protected - */ - protected $lasth; - - /** - * Line width in user unit. - * @protected - */ - protected $LineWidth; - - /** - * Array of standard font names. - * @protected - */ - protected $CoreFonts; - - /** - * Array of used fonts. - * @protected - */ - protected $fonts = array(); - - /** - * Array of font files. - * @protected - */ - protected $FontFiles = array(); - - /** - * Array of encoding differences. - * @protected - */ - protected $diffs = array(); - - /** - * Array of used images. - * @protected - */ - protected $images = array(); - - /** - * Depth of the svg tag, to keep track if the svg tag is a subtag or the root tag. - * @protected - */ - protected $svg_tag_depth = 0; - - /** - * Array of Annotations in pages. - * @protected - */ - protected $PageAnnots = array(); - - /** - * Array of internal links. - * @protected - */ - protected $links = array(); - - /** - * Current font family. - * @protected - */ - protected $FontFamily; - - /** - * Current font style. - * @protected - */ - protected $FontStyle; - - /** - * Current font ascent (distance between font top and baseline). - * @protected - * @since 2.8.000 (2007-03-29) - */ - protected $FontAscent; - - /** - * Current font descent (distance between font bottom and baseline). - * @protected - * @since 2.8.000 (2007-03-29) - */ - protected $FontDescent; - - /** - * Underlining flag. - * @protected - */ - protected $underline; - - /** - * Overlining flag. - * @protected - */ - protected $overline; - - /** - * Current font info. - * @protected - */ - protected $CurrentFont; - - /** - * Current font size in points. - * @protected - */ - protected $FontSizePt; - - /** - * Current font size in user unit. - * @protected - */ - protected $FontSize; - - /** - * Commands for drawing color. - * @protected - */ - protected $DrawColor; - - /** - * Commands for filling color. - * @protected - */ - protected $FillColor; - - /** - * Commands for text color. - * @protected - */ - protected $TextColor; - - /** - * Indicates whether fill and text colors are different. - * @protected - */ - protected $ColorFlag; - - /** - * Automatic page breaking. - * @protected - */ - protected $AutoPageBreak; - - /** - * Threshold used to trigger page breaks. - * @protected - */ - protected $PageBreakTrigger; - - /** - * Flag set when processing page header. - * @protected - */ - protected $InHeader = false; - - /** - * Flag set when processing page footer. - * @protected - */ - protected $InFooter = false; - - /** - * Zoom display mode. - * @protected - */ - protected $ZoomMode; - - /** - * Layout display mode. - * @protected - */ - protected $LayoutMode; - - /** - * If true set the document information dictionary in Unicode. - * @protected - */ - protected $docinfounicode = true; - - /** - * Document title. - * @protected - */ - protected $title = ''; - - /** - * Document subject. - * @protected - */ - protected $subject = ''; - - /** - * Document author. - * @protected - */ - protected $author = ''; - - /** - * Document keywords. - * @protected - */ - protected $keywords = ''; - - /** - * Document creator. - * @protected - */ - protected $creator = ''; - - /** - * Starting page number. - * @protected - */ - protected $starting_page_number = 1; - - /** - * The right-bottom (or left-bottom for RTL) corner X coordinate of last inserted image. - * @since 2002-07-31 - * @author Nicola Asuni - * @protected - */ - protected $img_rb_x; - - /** - * The right-bottom corner Y coordinate of last inserted image. - * @since 2002-07-31 - * @author Nicola Asuni - * @protected - */ - protected $img_rb_y; - - /** - * Adjusting factor to convert pixels to user units. - * @since 2004-06-14 - * @author Nicola Asuni - * @protected - */ - protected $imgscale = 1; - - /** - * Boolean flag set to true when the input text is unicode (require unicode fonts). - * @since 2005-01-02 - * @author Nicola Asuni - * @protected - */ - protected $isunicode = false; - - /** - * PDF version. - * @since 1.5.3 - * @protected - */ - protected $PDFVersion = '1.7'; - - /** - * ID of the stored default header template (-1 = not set). - * @protected - */ - protected $header_xobjid = false; - - /** - * If true reset the Header Xobject template at each page - * @protected - */ - protected $header_xobj_autoreset = false; - - /** - * Minimum distance between header and top page margin. - * @protected - */ - protected $header_margin; - - /** - * Minimum distance between footer and bottom page margin. - * @protected - */ - protected $footer_margin; - - /** - * Original left margin value. - * @protected - * @since 1.53.0.TC013 - */ - protected $original_lMargin; - - /** - * Original right margin value. - * @protected - * @since 1.53.0.TC013 - */ - protected $original_rMargin; - - /** - * Default font used on page header. - * @protected - */ - protected $header_font; - - /** - * Default font used on page footer. - * @protected - */ - protected $footer_font; - - /** - * Language templates. - * @protected - */ - protected $l; - - /** - * Barcode to print on page footer (only if set). - * @protected - */ - protected $barcode = false; - - /** - * Boolean flag to print/hide page header. - * @protected - */ - protected $print_header = true; - - /** - * Boolean flag to print/hide page footer. - * @protected - */ - protected $print_footer = true; - - /** - * Header image logo. - * @protected - */ - protected $header_logo = ''; - - /** - * Width of header image logo in user units. - * @protected - */ - protected $header_logo_width = 30; - - /** - * Title to be printed on default page header. - * @protected - */ - protected $header_title = ''; - - /** - * String to pring on page header after title. - * @protected - */ - protected $header_string = ''; - - /** - * Color for header text (RGB array). - * @since 5.9.174 (2012-07-25) - * @protected - */ - protected $header_text_color = array(0,0,0); - - /** - * Color for header line (RGB array). - * @since 5.9.174 (2012-07-25) - * @protected - */ - protected $header_line_color = array(0,0,0); - - /** - * Color for footer text (RGB array). - * @since 5.9.174 (2012-07-25) - * @protected - */ - protected $footer_text_color = array(0,0,0); - - /** - * Color for footer line (RGB array). - * @since 5.9.174 (2012-07-25) - * @protected - */ - protected $footer_line_color = array(0,0,0); - - /** - * Text shadow data array. - * @since 5.9.174 (2012-07-25) - * @protected - */ - protected $txtshadow = array('enabled'=>false, 'depth_w'=>0, 'depth_h'=>0, 'color'=>false, 'opacity'=>1, 'blend_mode'=>'Normal'); - - /** - * Default number of columns for html table. - * @protected - */ - protected $default_table_columns = 4; - - // variables for html parser - - /** - * HTML PARSER: array to store current link and rendering styles. - * @protected - */ - protected $HREF = array(); - - /** - * List of available fonts on filesystem. - * @protected - */ - protected $fontlist = array(); - - /** - * Current foreground color. - * @protected - */ - protected $fgcolor; - - /** - * HTML PARSER: array of boolean values, true in case of ordered list (OL), false otherwise. - * @protected - */ - protected $listordered = array(); - - /** - * HTML PARSER: array count list items on nested lists. - * @protected - */ - protected $listcount = array(); - - /** - * HTML PARSER: current list nesting level. - * @protected - */ - protected $listnum = 0; - - /** - * HTML PARSER: indent amount for lists. - * @protected - */ - protected $listindent = 0; - - /** - * HTML PARSER: current list indententation level. - * @protected - */ - protected $listindentlevel = 0; - - /** - * Current background color. - * @protected - */ - protected $bgcolor; - - /** - * Temporary font size in points. - * @protected - */ - protected $tempfontsize = 10; - - /** - * Spacer string for LI tags. - * @protected - */ - protected $lispacer = ''; - - /** - * Default encoding. - * @protected - * @since 1.53.0.TC010 - */ - protected $encoding = 'UTF-8'; - - /** - * PHP internal encoding. - * @protected - * @since 1.53.0.TC016 - */ - protected $internal_encoding; - - /** - * Boolean flag to indicate if the document language is Right-To-Left. - * @protected - * @since 2.0.000 - */ - protected $rtl = false; - - /** - * Boolean flag used to force RTL or LTR string direction. - * @protected - * @since 2.0.000 - */ - protected $tmprtl = false; - - // --- Variables used for document encryption: - - /** - * IBoolean flag indicating whether document is protected. - * @protected - * @since 2.0.000 (2008-01-02) - */ - protected $encrypted; - - /** - * Array containing encryption settings. - * @protected - * @since 5.0.005 (2010-05-11) - */ - protected $encryptdata = array(); - - /** - * Last RC4 key encrypted (cached for optimisation). - * @protected - * @since 2.0.000 (2008-01-02) - */ - protected $last_enc_key; - - /** - * Last RC4 computed key. - * @protected - * @since 2.0.000 (2008-01-02) - */ - protected $last_enc_key_c; - - /** - * File ID (used on document trailer). - * @protected - * @since 5.0.005 (2010-05-12) - */ - protected $file_id; - - // --- bookmark --- - - /** - * Outlines for bookmark. - * @protected - * @since 2.1.002 (2008-02-12) - */ - protected $outlines = array(); - - /** - * Outline root for bookmark. - * @protected - * @since 2.1.002 (2008-02-12) - */ - protected $OutlineRoot; - - // --- javascript and form --- - - /** - * Javascript code. - * @protected - * @since 2.1.002 (2008-02-12) - */ - protected $javascript = ''; - - /** - * Javascript counter. - * @protected - * @since 2.1.002 (2008-02-12) - */ - protected $n_js; - - /** - * line through state - * @protected - * @since 2.8.000 (2008-03-19) - */ - protected $linethrough; - - /** - * Array with additional document-wide usage rights for the document. - * @protected - * @since 5.8.014 (2010-08-23) - */ - protected $ur = array(); - - /** - * DPI (Dot Per Inch) Document Resolution (do not change). - * @protected - * @since 3.0.000 (2008-03-27) - */ - protected $dpi = 72; - - /** - * Array of page numbers were a new page group was started (the page numbers are the keys of the array). - * @protected - * @since 3.0.000 (2008-03-27) - */ - protected $newpagegroup = array(); - - /** - * Array that contains the number of pages in each page group. - * @protected - * @since 3.0.000 (2008-03-27) - */ - protected $pagegroups = array(); - - /** - * Current page group number. - * @protected - * @since 3.0.000 (2008-03-27) - */ - protected $currpagegroup = 0; - - /** - * Array of transparency objects and parameters. - * @protected - * @since 3.0.000 (2008-03-27) - */ - protected $extgstates; - - /** - * Set the default JPEG compression quality (1-100). - * @protected - * @since 3.0.000 (2008-03-27) - */ - protected $jpeg_quality; - - /** - * Default cell height ratio. - * @protected - * @since 3.0.014 (2008-05-23) - */ - protected $cell_height_ratio = K_CELL_HEIGHT_RATIO; - - /** - * PDF viewer preferences. - * @protected - * @since 3.1.000 (2008-06-09) - */ - protected $viewer_preferences; - - /** - * A name object specifying how the document should be displayed when opened. - * @protected - * @since 3.1.000 (2008-06-09) - */ - protected $PageMode; - - /** - * Array for storing gradient information. - * @protected - * @since 3.1.000 (2008-06-09) - */ - protected $gradients = array(); - - /** - * Array used to store positions inside the pages buffer (keys are the page numbers). - * @protected - * @since 3.2.000 (2008-06-26) - */ - protected $intmrk = array(); - - /** - * Array used to store positions inside the pages buffer (keys are the page numbers). - * @protected - * @since 5.7.000 (2010-08-03) - */ - protected $bordermrk = array(); - - /** - * Array used to store page positions to track empty pages (keys are the page numbers). - * @protected - * @since 5.8.007 (2010-08-18) - */ - protected $emptypagemrk = array(); - - /** - * Array used to store content positions inside the pages buffer (keys are the page numbers). - * @protected - * @since 4.6.021 (2009-07-20) - */ - protected $cntmrk = array(); - - /** - * Array used to store footer positions of each page. - * @protected - * @since 3.2.000 (2008-07-01) - */ - protected $footerpos = array(); - - /** - * Array used to store footer length of each page. - * @protected - * @since 4.0.014 (2008-07-29) - */ - protected $footerlen = array(); - - /** - * Boolean flag to indicate if a new line is created. - * @protected - * @since 3.2.000 (2008-07-01) - */ - protected $newline = true; - - /** - * End position of the latest inserted line. - * @protected - * @since 3.2.000 (2008-07-01) - */ - protected $endlinex = 0; - - /** - * PDF string for width value of the last line. - * @protected - * @since 4.0.006 (2008-07-16) - */ - protected $linestyleWidth = ''; - - /** - * PDF string for CAP value of the last line. - * @protected - * @since 4.0.006 (2008-07-16) - */ - protected $linestyleCap = '0 J'; - - /** - * PDF string for join value of the last line. - * @protected - * @since 4.0.006 (2008-07-16) - */ - protected $linestyleJoin = '0 j'; - - /** - * PDF string for dash value of the last line. - * @protected - * @since 4.0.006 (2008-07-16) - */ - protected $linestyleDash = '[] 0 d'; - - /** - * Boolean flag to indicate if marked-content sequence is open. - * @protected - * @since 4.0.013 (2008-07-28) - */ - protected $openMarkedContent = false; - - /** - * Count the latest inserted vertical spaces on HTML. - * @protected - * @since 4.0.021 (2008-08-24) - */ - protected $htmlvspace = 0; - - /** - * Array of Spot colors. - * @protected - * @since 4.0.024 (2008-09-12) - */ - protected $spot_colors = array(); - - /** - * Symbol used for HTML unordered list items. - * @protected - * @since 4.0.028 (2008-09-26) - */ - protected $lisymbol = ''; - - /** - * String used to mark the beginning and end of EPS image blocks. - * @protected - * @since 4.1.000 (2008-10-18) - */ - protected $epsmarker = 'x#!#EPS#!#x'; - - /** - * Array of transformation matrix. - * @protected - * @since 4.2.000 (2008-10-29) - */ - protected $transfmatrix = array(); - - /** - * Current key for transformation matrix. - * @protected - * @since 4.8.005 (2009-09-17) - */ - protected $transfmatrix_key = 0; - - /** - * Booklet mode for double-sided pages. - * @protected - * @since 4.2.000 (2008-10-29) - */ - protected $booklet = false; - - /** - * Epsilon value used for float calculations. - * @protected - * @since 4.2.000 (2008-10-29) - */ - protected $feps = 0.005; - - /** - * Array used for custom vertical spaces for HTML tags. - * @protected - * @since 4.2.001 (2008-10-30) - */ - protected $tagvspaces = array(); - - /** - * HTML PARSER: custom indent amount for lists. Negative value means disabled. - * @protected - * @since 4.2.007 (2008-11-12) - */ - protected $customlistindent = -1; - - /** - * Boolean flag to indicate if the border of the cell sides that cross the page should be removed. - * @protected - * @since 4.2.010 (2008-11-14) - */ - protected $opencell = true; - - /** - * Array of files to embedd. - * @protected - * @since 4.4.000 (2008-12-07) - */ - protected $embeddedfiles = array(); - - /** - * Boolean flag to indicate if we are inside a PRE tag. - * @protected - * @since 4.4.001 (2008-12-08) - */ - protected $premode = false; - - /** - * Array used to store positions of graphics transformation blocks inside the page buffer. - * keys are the page numbers - * @protected - * @since 4.4.002 (2008-12-09) - */ - protected $transfmrk = array(); - - /** - * Default color for html links. - * @protected - * @since 4.4.003 (2008-12-09) - */ - protected $htmlLinkColorArray = array(0, 0, 255); - - /** - * Default font style to add to html links. - * @protected - * @since 4.4.003 (2008-12-09) - */ - protected $htmlLinkFontStyle = 'U'; - - /** - * Counts the number of pages. - * @protected - * @since 4.5.000 (2008-12-31) - */ - protected $numpages = 0; - - /** - * Array containing page lengths in bytes. - * @protected - * @since 4.5.000 (2008-12-31) - */ - protected $pagelen = array(); - - /** - * Counts the number of pages. - * @protected - * @since 4.5.000 (2008-12-31) - */ - protected $numimages = 0; - - /** - * Store the image keys. - * @protected - * @since 4.5.000 (2008-12-31) - */ - protected $imagekeys = array(); - - /** - * Length of the buffer in bytes. - * @protected - * @since 4.5.000 (2008-12-31) - */ - protected $bufferlen = 0; - - /** - * Counts the number of fonts. - * @protected - * @since 4.5.000 (2009-01-02) - */ - protected $numfonts = 0; - - /** - * Store the font keys. - * @protected - * @since 4.5.000 (2009-01-02) - */ - protected $fontkeys = array(); - - /** - * Store the font object IDs. - * @protected - * @since 4.8.001 (2009-09-09) - */ - protected $font_obj_ids = array(); - - /** - * Store the fage status (true when opened, false when closed). - * @protected - * @since 4.5.000 (2009-01-02) - */ - protected $pageopen = array(); - - /** - * Default monospace font. - * @protected - * @since 4.5.025 (2009-03-10) - */ - protected $default_monospaced_font = 'courier'; - - /** - * Cloned copy of the current class object. - * @protected - * @since 4.5.029 (2009-03-19) - */ - protected $objcopy; - - /** - * Array used to store the lengths of cache files. - * @protected - * @since 4.5.029 (2009-03-19) - */ - protected $cache_file_length = array(); - - /** - * Table header content to be repeated on each new page. - * @protected - * @since 4.5.030 (2009-03-20) - */ - protected $thead = ''; - - /** - * Margins used for table header. - * @protected - * @since 4.5.030 (2009-03-20) - */ - protected $theadMargins = array(); - - /** - * Boolean flag to enable document digital signature. - * @protected - * @since 4.6.005 (2009-04-24) - */ - protected $sign = false; - - /** - * Digital signature data. - * @protected - * @since 4.6.005 (2009-04-24) - */ - protected $signature_data = array(); - - /** - * Digital signature max length. - * @protected - * @since 4.6.005 (2009-04-24) - */ - protected $signature_max_length = 11742; - - /** - * Data for digital signature appearance. - * @protected - * @since 5.3.011 (2010-06-16) - */ - protected $signature_appearance = array('page' => 1, 'rect' => '0 0 0 0'); - - /** - * Array of empty digital signature appearances. - * @protected - * @since 5.9.101 (2011-07-06) - */ - protected $empty_signature_appearance = array(); - - /** - * Boolean flag to enable document timestamping with TSA. - * @protected - * @since 6.0.085 (2014-06-19) - */ - protected $tsa_timestamp = false; - - /** - * Timestamping data. - * @protected - * @since 6.0.085 (2014-06-19) - */ - protected $tsa_data = array(); - - /** - * Regular expression used to find blank characters (required for word-wrapping). - * @protected - * @since 4.6.006 (2009-04-28) - */ - protected $re_spaces = '/[^\S\xa0]/'; - - /** - * Array of $re_spaces parts. - * @protected - * @since 5.5.011 (2010-07-09) - */ - protected $re_space = array('p' => '[^\S\xa0]', 'm' => ''); - - /** - * Digital signature object ID. - * @protected - * @since 4.6.022 (2009-06-23) - */ - protected $sig_obj_id = 0; - - /** - * ID of page objects. - * @protected - * @since 4.7.000 (2009-08-29) - */ - protected $page_obj_id = array(); - - /** - * List of form annotations IDs. - * @protected - * @since 4.8.000 (2009-09-07) - */ - protected $form_obj_id = array(); - - /** - * Deafult Javascript field properties. Possible values are described on official Javascript for Acrobat API reference. Annotation options can be directly specified using the 'aopt' entry. - * @protected - * @since 4.8.000 (2009-09-07) - */ - protected $default_form_prop = array('lineWidth'=>1, 'borderStyle'=>'solid', 'fillColor'=>array(255, 255, 255), 'strokeColor'=>array(128, 128, 128)); - - /** - * Javascript objects array. - * @protected - * @since 4.8.000 (2009-09-07) - */ - protected $js_objects = array(); - - /** - * Current form action (used during XHTML rendering). - * @protected - * @since 4.8.000 (2009-09-07) - */ - protected $form_action = ''; - - /** - * Current form encryption type (used during XHTML rendering). - * @protected - * @since 4.8.000 (2009-09-07) - */ - protected $form_enctype = 'application/x-www-form-urlencoded'; - - /** - * Current method to submit forms. - * @protected - * @since 4.8.000 (2009-09-07) - */ - protected $form_mode = 'post'; - - /** - * List of fonts used on form fields (fontname => fontkey). - * @protected - * @since 4.8.001 (2009-09-09) - */ - protected $annotation_fonts = array(); - - /** - * List of radio buttons parent objects. - * @protected - * @since 4.8.001 (2009-09-09) - */ - protected $radiobutton_groups = array(); - - /** - * List of radio group objects IDs. - * @protected - * @since 4.8.001 (2009-09-09) - */ - protected $radio_groups = array(); - - /** - * Text indentation value (used for text-indent CSS attribute). - * @protected - * @since 4.8.006 (2009-09-23) - */ - protected $textindent = 0; - - /** - * Store page number when startTransaction() is called. - * @protected - * @since 4.8.006 (2009-09-23) - */ - protected $start_transaction_page = 0; - - /** - * Store Y position when startTransaction() is called. - * @protected - * @since 4.9.001 (2010-03-28) - */ - protected $start_transaction_y = 0; - - /** - * True when we are printing the thead section on a new page. - * @protected - * @since 4.8.027 (2010-01-25) - */ - protected $inthead = false; - - /** - * Array of column measures (width, space, starting Y position). - * @protected - * @since 4.9.001 (2010-03-28) - */ - protected $columns = array(); - - /** - * Number of colums. - * @protected - * @since 4.9.001 (2010-03-28) - */ - protected $num_columns = 1; - - /** - * Current column number. - * @protected - * @since 4.9.001 (2010-03-28) - */ - protected $current_column = 0; - - /** - * Starting page for columns. - * @protected - * @since 4.9.001 (2010-03-28) - */ - protected $column_start_page = 0; - - /** - * Maximum page and column selected. - * @protected - * @since 5.8.000 (2010-08-11) - */ - protected $maxselcol = array('page' => 0, 'column' => 0); - - /** - * Array of: X difference between table cell x start and starting page margin, cellspacing, cellpadding. - * @protected - * @since 5.8.000 (2010-08-11) - */ - protected $colxshift = array('x' => 0, 's' => array('H' => 0, 'V' => 0), 'p' => array('L' => 0, 'T' => 0, 'R' => 0, 'B' => 0)); - - /** - * Text rendering mode: 0 = Fill text; 1 = Stroke text; 2 = Fill, then stroke text; 3 = Neither fill nor stroke text (invisible); 4 = Fill text and add to path for clipping; 5 = Stroke text and add to path for clipping; 6 = Fill, then stroke text and add to path for clipping; 7 = Add text to path for clipping. - * @protected - * @since 4.9.008 (2010-04-03) - */ - protected $textrendermode = 0; - - /** - * Text stroke width in doc units. - * @protected - * @since 4.9.008 (2010-04-03) - */ - protected $textstrokewidth = 0; - - /** - * Current stroke color. - * @protected - * @since 4.9.008 (2010-04-03) - */ - protected $strokecolor; - - /** - * Default unit of measure for document. - * @protected - * @since 5.0.000 (2010-04-22) - */ - protected $pdfunit = 'mm'; - - /** - * Boolean flag true when we are on TOC (Table Of Content) page. - * @protected - */ - protected $tocpage = false; - - /** - * Boolean flag: if true convert vector images (SVG, EPS) to raster image using GD or ImageMagick library. - * @protected - * @since 5.0.000 (2010-04-26) - */ - protected $rasterize_vector_images = false; - - /** - * Boolean flag: if true enables font subsetting by default. - * @protected - * @since 5.3.002 (2010-06-07) - */ - protected $font_subsetting = true; - - /** - * Array of default graphic settings. - * @protected - * @since 5.5.008 (2010-07-02) - */ - protected $default_graphic_vars = array(); - - /** - * Array of XObjects. - * @protected - * @since 5.8.014 (2010-08-23) - */ - protected $xobjects = array(); - - /** - * Boolean value true when we are inside an XObject. - * @protected - * @since 5.8.017 (2010-08-24) - */ - protected $inxobj = false; - - /** - * Current XObject ID. - * @protected - * @since 5.8.017 (2010-08-24) - */ - protected $xobjid = ''; - - /** - * Percentage of character stretching. - * @protected - * @since 5.9.000 (2010-09-29) - */ - protected $font_stretching = 100; - - /** - * Increases or decreases the space between characters in a text by the specified amount (tracking). - * @protected - * @since 5.9.000 (2010-09-29) - */ - protected $font_spacing = 0; - - /** - * Array of no-write regions. - * ('page' => page number or empy for current page, 'xt' => X top, 'yt' => Y top, 'xb' => X bottom, 'yb' => Y bottom, 'side' => page side 'L' = left or 'R' = right) - * @protected - * @since 5.9.003 (2010-10-14) - */ - protected $page_regions = array(); - - /** - * Boolean value true when page region check is active. - * @protected - */ - protected $check_page_regions = true; - - /** - * Array of PDF layers data. - * @protected - * @since 5.9.102 (2011-07-13) - */ - protected $pdflayers = array(); - - /** - * A dictionary of names and corresponding destinations (Dests key on document Catalog). - * @protected - * @since 5.9.097 (2011-06-23) - */ - protected $dests = array(); - - /** - * Object ID for Named Destinations - * @protected - * @since 5.9.097 (2011-06-23) - */ - protected $n_dests; - - /** - * Embedded Files Names - * @protected - * @since 5.9.204 (2013-01-23) - */ - protected $efnames = array(); - - /** - * Directory used for the last SVG image. - * @protected - * @since 5.0.000 (2010-05-05) - */ - protected $svgdir = ''; - - /** - * Deafult unit of measure for SVG. - * @protected - * @since 5.0.000 (2010-05-02) - */ - protected $svgunit = 'px'; - - /** - * Array of SVG gradients. - * @protected - * @since 5.0.000 (2010-05-02) - */ - protected $svggradients = array(); - - /** - * ID of last SVG gradient. - * @protected - * @since 5.0.000 (2010-05-02) - */ - protected $svggradientid = 0; - - /** - * Boolean value true when in SVG defs group. - * @protected - * @since 5.0.000 (2010-05-02) - */ - protected $svgdefsmode = false; - - /** - * Array of SVG defs. - * @protected - * @since 5.0.000 (2010-05-02) - */ - protected $svgdefs = array(); - - /** - * Boolean value true when in SVG clipPath tag. - * @protected - * @since 5.0.000 (2010-04-26) - */ - protected $svgclipmode = false; - - /** - * Array of SVG clipPath commands. - * @protected - * @since 5.0.000 (2010-05-02) - */ - protected $svgclippaths = array(); - - /** - * Array of SVG clipPath tranformation matrix. - * @protected - * @since 5.8.022 (2010-08-31) - */ - protected $svgcliptm = array(); - - /** - * ID of last SVG clipPath. - * @protected - * @since 5.0.000 (2010-05-02) - */ - protected $svgclipid = 0; - - /** - * SVG text. - * @protected - * @since 5.0.000 (2010-05-02) - */ - protected $svgtext = ''; - - /** - * SVG text properties. - * @protected - * @since 5.8.013 (2010-08-23) - */ - protected $svgtextmode = array(); - - /** - * Array of SVG properties. - * @protected - * @since 5.0.000 (2010-05-02) - */ - protected $svgstyles = array(array( - 'alignment-baseline' => 'auto', - 'baseline-shift' => 'baseline', - 'clip' => 'auto', - 'clip-path' => 'none', - 'clip-rule' => 'nonzero', - 'color' => 'black', - 'color-interpolation' => 'sRGB', - 'color-interpolation-filters' => 'linearRGB', - 'color-profile' => 'auto', - 'color-rendering' => 'auto', - 'cursor' => 'auto', - 'direction' => 'ltr', - 'display' => 'inline', - 'dominant-baseline' => 'auto', - 'enable-background' => 'accumulate', - 'fill' => 'black', - 'fill-opacity' => 1, - 'fill-rule' => 'nonzero', - 'filter' => 'none', - 'flood-color' => 'black', - 'flood-opacity' => 1, - 'font' => '', - 'font-family' => 'helvetica', - 'font-size' => 'medium', - 'font-size-adjust' => 'none', - 'font-stretch' => 'normal', - 'font-style' => 'normal', - 'font-variant' => 'normal', - 'font-weight' => 'normal', - 'glyph-orientation-horizontal' => '0deg', - 'glyph-orientation-vertical' => 'auto', - 'image-rendering' => 'auto', - 'kerning' => 'auto', - 'letter-spacing' => 'normal', - 'lighting-color' => 'white', - 'marker' => '', - 'marker-end' => 'none', - 'marker-mid' => 'none', - 'marker-start' => 'none', - 'mask' => 'none', - 'opacity' => 1, - 'overflow' => 'auto', - 'pointer-events' => 'visiblePainted', - 'shape-rendering' => 'auto', - 'stop-color' => 'black', - 'stop-opacity' => 1, - 'stroke' => 'none', - 'stroke-dasharray' => 'none', - 'stroke-dashoffset' => 0, - 'stroke-linecap' => 'butt', - 'stroke-linejoin' => 'miter', - 'stroke-miterlimit' => 4, - 'stroke-opacity' => 1, - 'stroke-width' => 1, - 'text-anchor' => 'start', - 'text-decoration' => 'none', - 'text-rendering' => 'auto', - 'unicode-bidi' => 'normal', - 'visibility' => 'visible', - 'word-spacing' => 'normal', - 'writing-mode' => 'lr-tb', - 'text-color' => 'black', - 'transfmatrix' => array(1, 0, 0, 1, 0, 0) - )); - - /** - * If true force sRGB color profile for all document. - * @protected - * @since 5.9.121 (2011-09-28) - */ - protected $force_srgb = false; - - /** - * If true set the document to PDF/A mode. - * @protected - * @since 5.9.121 (2011-09-27) - */ - protected $pdfa_mode = false; - - /** - * Document creation date-time - * @protected - * @since 5.9.152 (2012-03-22) - */ - protected $doc_creation_timestamp; - - /** - * Document modification date-time - * @protected - * @since 5.9.152 (2012-03-22) - */ - protected $doc_modification_timestamp; - - /** - * Custom XMP data. - * @protected - * @since 5.9.128 (2011-10-06) - */ - protected $custom_xmp = ''; - - /** - * Overprint mode array. - * (Check the "Entries in a Graphics State Parameter Dictionary" on PDF 32000-1:2008). - * @protected - * @since 5.9.152 (2012-03-23) - */ - protected $overprint = array('OP' => false, 'op' => false, 'OPM' => 0); - - /** - * Alpha mode array. - * (Check the "Entries in a Graphics State Parameter Dictionary" on PDF 32000-1:2008). - * @protected - * @since 5.9.152 (2012-03-23) - */ - protected $alpha = array('CA' => 1, 'ca' => 1, 'BM' => '/Normal', 'AIS' => false); - - /** - * Define the page boundaries boxes to be set on document. - * @protected - * @since 5.9.152 (2012-03-23) - */ - protected $page_boxes = array('MediaBox', 'CropBox', 'BleedBox', 'TrimBox', 'ArtBox'); - - /** - * If true print TCPDF meta link. - * @protected - * @since 5.9.152 (2012-03-23) - */ - protected $tcpdflink = true; - - /** - * Cache array for computed GD gamma values. - * @protected - * @since 5.9.1632 (2012-06-05) - */ - protected $gdgammacache = array(); - - //------------------------------------------------------------ - // METHODS - //------------------------------------------------------------ - - /** - * This is the class constructor. - * It allows to set up the page format, the orientation and the measure unit used in all the methods (except for the font sizes). - * - * IMPORTANT: Please note that this method sets the mb_internal_encoding to ASCII, so if you are using the mbstring module functions with TCPDF you need to correctly set/unset the mb_internal_encoding when needed. - * - * @param $orientation (string) page orientation. Possible values are (case insensitive):
          • P or Portrait (default)
          • L or Landscape
          • '' (empty string) for automatic orientation
          - * @param $unit (string) User measure unit. Possible values are:
          • pt: point
          • mm: millimeter (default)
          • cm: centimeter
          • in: inch

          A point equals 1/72 of inch, that is to say about 0.35 mm (an inch being 2.54 cm). This is a very common unit in typography; font sizes are expressed in that unit. - * @param $format (mixed) The format used for pages. It can be either: one of the string values specified at getPageSizeFromFormat() or an array of parameters specified at setPageFormat(). - * @param $unicode (boolean) TRUE means that the input text is unicode (default = true) - * @param $encoding (string) Charset encoding (used only when converting back html entities); default is UTF-8. - * @param $diskcache (boolean) DEPRECATED FEATURE - * @param $pdfa (boolean) If TRUE set the document to PDF/A mode. - * @public - * @see getPageSizeFromFormat(), setPageFormat() - */ - public function __construct($orientation='P', $unit='mm', $format='A4', $unicode=true, $encoding='UTF-8', $diskcache=false, $pdfa=false) { - /* Set internal character encoding to ASCII */ - if (function_exists('mb_internal_encoding') AND mb_internal_encoding()) { - $this->internal_encoding = mb_internal_encoding(); - mb_internal_encoding('ASCII'); - } - // set file ID for trailer - $serformat = (is_array($format) ? json_encode($format) : $format); - $this->file_id = md5(TCPDF_STATIC::getRandomSeed('TCPDF'.$orientation.$unit.$serformat.$encoding)); - $this->font_obj_ids = array(); - $this->page_obj_id = array(); - $this->form_obj_id = array(); - // set pdf/a mode - $this->pdfa_mode = $pdfa; - $this->force_srgb = false; - // set language direction - $this->rtl = false; - $this->tmprtl = false; - // some checks - $this->_dochecks(); - // initialization of properties - $this->isunicode = $unicode; - $this->page = 0; - $this->transfmrk[0] = array(); - $this->pagedim = array(); - $this->n = 2; - $this->buffer = ''; - $this->pages = array(); - $this->state = 0; - $this->fonts = array(); - $this->FontFiles = array(); - $this->diffs = array(); - $this->images = array(); - $this->links = array(); - $this->gradients = array(); - $this->InFooter = false; - $this->lasth = 0; - $this->FontFamily = defined('PDF_FONT_NAME_MAIN')?PDF_FONT_NAME_MAIN:'helvetica'; - $this->FontStyle = ''; - $this->FontSizePt = 12; - $this->underline = false; - $this->overline = false; - $this->linethrough = false; - $this->DrawColor = '0 G'; - $this->FillColor = '0 g'; - $this->TextColor = '0 g'; - $this->ColorFlag = false; - $this->pdflayers = array(); - // encryption values - $this->encrypted = false; - $this->last_enc_key = ''; - // standard Unicode fonts - $this->CoreFonts = array( - 'courier'=>'Courier', - 'courierB'=>'Courier-Bold', - 'courierI'=>'Courier-Oblique', - 'courierBI'=>'Courier-BoldOblique', - 'helvetica'=>'Helvetica', - 'helveticaB'=>'Helvetica-Bold', - 'helveticaI'=>'Helvetica-Oblique', - 'helveticaBI'=>'Helvetica-BoldOblique', - 'times'=>'Times-Roman', - 'timesB'=>'Times-Bold', - 'timesI'=>'Times-Italic', - 'timesBI'=>'Times-BoldItalic', - 'symbol'=>'Symbol', - 'zapfdingbats'=>'ZapfDingbats' - ); - // set scale factor - $this->setPageUnit($unit); - // set page format and orientation - $this->setPageFormat($format, $orientation); - // page margins (1 cm) - $margin = 28.35 / $this->k; - $this->SetMargins($margin, $margin); - $this->clMargin = $this->lMargin; - $this->crMargin = $this->rMargin; - // internal cell padding - $cpadding = $margin / 10; - $this->setCellPaddings($cpadding, 0, $cpadding, 0); - // cell margins - $this->setCellMargins(0, 0, 0, 0); - // line width (0.2 mm) - $this->LineWidth = 0.57 / $this->k; - $this->linestyleWidth = sprintf('%F w', ($this->LineWidth * $this->k)); - $this->linestyleCap = '0 J'; - $this->linestyleJoin = '0 j'; - $this->linestyleDash = '[] 0 d'; - // automatic page break - $this->SetAutoPageBreak(true, (2 * $margin)); - // full width display mode - $this->SetDisplayMode('fullwidth'); - // compression - $this->SetCompression(); - // set default PDF version number - $this->setPDFVersion(); - $this->tcpdflink = true; - $this->encoding = $encoding; - $this->HREF = array(); - $this->getFontsList(); - $this->fgcolor = array('R' => 0, 'G' => 0, 'B' => 0); - $this->strokecolor = array('R' => 0, 'G' => 0, 'B' => 0); - $this->bgcolor = array('R' => 255, 'G' => 255, 'B' => 255); - $this->extgstates = array(); - $this->setTextShadow(); - // signature - $this->sign = false; - $this->tsa_timestamp = false; - $this->tsa_data = array(); - $this->signature_appearance = array('page' => 1, 'rect' => '0 0 0 0', 'name' => 'Signature'); - $this->empty_signature_appearance = array(); - // user's rights - $this->ur['enabled'] = false; - $this->ur['document'] = '/FullSave'; - $this->ur['annots'] = '/Create/Delete/Modify/Copy/Import/Export'; - $this->ur['form'] = '/Add/Delete/FillIn/Import/Export/SubmitStandalone/SpawnTemplate'; - $this->ur['signature'] = '/Modify'; - $this->ur['ef'] = '/Create/Delete/Modify/Import'; - $this->ur['formex'] = ''; - // set default JPEG quality - $this->jpeg_quality = 75; - // initialize some settings - TCPDF_FONTS::utf8Bidi(array(''), '', false, $this->isunicode, $this->CurrentFont); - // set default font - $this->SetFont($this->FontFamily, $this->FontStyle, $this->FontSizePt); - $this->setHeaderFont(array($this->FontFamily, $this->FontStyle, $this->FontSizePt)); - $this->setFooterFont(array($this->FontFamily, $this->FontStyle, $this->FontSizePt)); - // check if PCRE Unicode support is enabled - if ($this->isunicode AND (@preg_match('/\pL/u', 'a') == 1)) { - // PCRE unicode support is turned ON - // \s : any whitespace character - // \p{Z} : any separator - // \p{Lo} : Unicode letter or ideograph that does not have lowercase and uppercase variants. Is used to chunk chinese words. - // \xa0 : Unicode Character 'NO-BREAK SPACE' (U+00A0) - //$this->setSpacesRE('/(?!\xa0)[\s\p{Z}\p{Lo}]/u'); - $this->setSpacesRE('/(?!\xa0)[\s\p{Z}]/u'); - } else { - // PCRE unicode support is turned OFF - $this->setSpacesRE('/[^\S\xa0]/'); - } - $this->default_form_prop = array('lineWidth'=>1, 'borderStyle'=>'solid', 'fillColor'=>array(255, 255, 255), 'strokeColor'=>array(128, 128, 128)); - // set document creation and modification timestamp - $this->doc_creation_timestamp = time(); - $this->doc_modification_timestamp = $this->doc_creation_timestamp; - // get default graphic vars - $this->default_graphic_vars = $this->getGraphicVars(); - $this->header_xobj_autoreset = false; - $this->custom_xmp = ''; - // Call cleanup method after script execution finishes or exit() is called. - // NOTE: This will not be executed if the process is killed with a SIGTERM or SIGKILL signal. - register_shutdown_function(array($this, '_destroy'), true); - } - - /** - * Default destructor. - * @public - * @since 1.53.0.TC016 - */ - public function __destruct() { - // restore internal encoding - if (isset($this->internal_encoding) AND !empty($this->internal_encoding)) { - mb_internal_encoding($this->internal_encoding); - } - // cleanup - $this->_destroy(true); - } - - /** - * Set the units of measure for the document. - * @param $unit (string) User measure unit. Possible values are:
          • pt: point
          • mm: millimeter (default)
          • cm: centimeter
          • in: inch

          A point equals 1/72 of inch, that is to say about 0.35 mm (an inch being 2.54 cm). This is a very common unit in typography; font sizes are expressed in that unit. - * @public - * @since 3.0.015 (2008-06-06) - */ - public function setPageUnit($unit) { - $unit = strtolower($unit); - //Set scale factor - switch ($unit) { - // points - case 'px': - case 'pt': { - $this->k = 1; - break; - } - // millimeters - case 'mm': { - $this->k = $this->dpi / 25.4; - break; - } - // centimeters - case 'cm': { - $this->k = $this->dpi / 2.54; - break; - } - // inches - case 'in': { - $this->k = $this->dpi; - break; - } - // unsupported unit - default : { - $this->Error('Incorrect unit: '.$unit); - break; - } - } - $this->pdfunit = $unit; - if (isset($this->CurOrientation)) { - $this->setPageOrientation($this->CurOrientation); - } - } - - /** - * Change the format of the current page - * @param $format (mixed) The format used for pages. It can be either: one of the string values specified at getPageSizeFromFormat() documentation or an array of two numbers (width, height) or an array containing the following measures and options:
            - *
          • ['format'] = page format name (one of the above);
          • - *
          • ['Rotate'] : The number of degrees by which the page shall be rotated clockwise when displayed or printed. The value shall be a multiple of 90.
          • - *
          • ['PZ'] : The page's preferred zoom (magnification) factor.
          • - *
          • ['MediaBox'] : the boundaries of the physical medium on which the page shall be displayed or printed:
          • - *
          • ['MediaBox']['llx'] : lower-left x coordinate
          • - *
          • ['MediaBox']['lly'] : lower-left y coordinate
          • - *
          • ['MediaBox']['urx'] : upper-right x coordinate
          • - *
          • ['MediaBox']['ury'] : upper-right y coordinate
          • - *
          • ['CropBox'] : the visible region of default user space:
          • - *
          • ['CropBox']['llx'] : lower-left x coordinate
          • - *
          • ['CropBox']['lly'] : lower-left y coordinate
          • - *
          • ['CropBox']['urx'] : upper-right x coordinate
          • - *
          • ['CropBox']['ury'] : upper-right y coordinate
          • - *
          • ['BleedBox'] : the region to which the contents of the page shall be clipped when output in a production environment:
          • - *
          • ['BleedBox']['llx'] : lower-left x coordinate
          • - *
          • ['BleedBox']['lly'] : lower-left y coordinate
          • - *
          • ['BleedBox']['urx'] : upper-right x coordinate
          • - *
          • ['BleedBox']['ury'] : upper-right y coordinate
          • - *
          • ['TrimBox'] : the intended dimensions of the finished page after trimming:
          • - *
          • ['TrimBox']['llx'] : lower-left x coordinate
          • - *
          • ['TrimBox']['lly'] : lower-left y coordinate
          • - *
          • ['TrimBox']['urx'] : upper-right x coordinate
          • - *
          • ['TrimBox']['ury'] : upper-right y coordinate
          • - *
          • ['ArtBox'] : the extent of the page's meaningful content:
          • - *
          • ['ArtBox']['llx'] : lower-left x coordinate
          • - *
          • ['ArtBox']['lly'] : lower-left y coordinate
          • - *
          • ['ArtBox']['urx'] : upper-right x coordinate
          • - *
          • ['ArtBox']['ury'] : upper-right y coordinate
          • - *
          • ['BoxColorInfo'] :specify the colours and other visual characteristics that should be used in displaying guidelines on the screen for each of the possible page boundaries other than the MediaBox:
          • - *
          • ['BoxColorInfo'][BOXTYPE]['C'] : an array of three numbers in the range 0-255, representing the components in the DeviceRGB colour space.
          • - *
          • ['BoxColorInfo'][BOXTYPE]['W'] : the guideline width in default user units
          • - *
          • ['BoxColorInfo'][BOXTYPE]['S'] : the guideline style: S = Solid; D = Dashed
          • - *
          • ['BoxColorInfo'][BOXTYPE]['D'] : dash array defining a pattern of dashes and gaps to be used in drawing dashed guidelines
          • - *
          • ['trans'] : the style and duration of the visual transition to use when moving from another page to the given page during a presentation
          • - *
          • ['trans']['Dur'] : The page's display duration (also called its advance timing): the maximum length of time, in seconds, that the page shall be displayed during presentations before the viewer application shall automatically advance to the next page.
          • - *
          • ['trans']['S'] : transition style : Split, Blinds, Box, Wipe, Dissolve, Glitter, R, Fly, Push, Cover, Uncover, Fade
          • - *
          • ['trans']['D'] : The duration of the transition effect, in seconds.
          • - *
          • ['trans']['Dm'] : (Split and Blinds transition styles only) The dimension in which the specified transition effect shall occur: H = Horizontal, V = Vertical. Default value: H.
          • - *
          • ['trans']['M'] : (Split, Box and Fly transition styles only) The direction of motion for the specified transition effect: I = Inward from the edges of the page, O = Outward from the center of the pageDefault value: I.
          • - *
          • ['trans']['Di'] : (Wipe, Glitter, Fly, Cover, Uncover and Push transition styles only) The direction in which the specified transition effect shall moves, expressed in degrees counterclockwise starting from a left-to-right direction. If the value is a number, it shall be one of: 0 = Left to right, 90 = Bottom to top (Wipe only), 180 = Right to left (Wipe only), 270 = Top to bottom, 315 = Top-left to bottom-right (Glitter only). If the value is a name, it shall be None, which is relevant only for the Fly transition when the value of SS is not 1.0. Default value: 0.
          • - *
          • ['trans']['SS'] : (Fly transition style only) The starting or ending scale at which the changes shall be drawn. If M specifies an inward transition, the scale of the changes drawn shall progress from SS to 1.0 over the course of the transition. If M specifies an outward transition, the scale of the changes drawn shall progress from 1.0 to SS over the course of the transition. Default: 1.0.
          • - *
          • ['trans']['B'] : (Fly transition style only) If true, the area that shall be flown in is rectangular and opaque. Default: false.
          • - *
          - * @param $orientation (string) page orientation. Possible values are (case insensitive):
            - *
          • P or Portrait (default)
          • - *
          • L or Landscape
          • - *
          • '' (empty string) for automatic orientation
          • - *
          - * @protected - * @since 3.0.015 (2008-06-06) - * @see getPageSizeFromFormat() - */ - protected function setPageFormat($format, $orientation='P') { - if (!empty($format) AND isset($this->pagedim[$this->page])) { - // remove inherited values - unset($this->pagedim[$this->page]); - } - if (is_string($format)) { - // get page measures from format name - $pf = TCPDF_STATIC::getPageSizeFromFormat($format); - $this->fwPt = $pf[0]; - $this->fhPt = $pf[1]; - } else { - // the boundaries of the physical medium on which the page shall be displayed or printed - if (isset($format['MediaBox'])) { - $this->pagedim = TCPDF_STATIC::setPageBoxes($this->page, 'MediaBox', $format['MediaBox']['llx'], $format['MediaBox']['lly'], $format['MediaBox']['urx'], $format['MediaBox']['ury'], false, $this->k, $this->pagedim); - $this->fwPt = (($format['MediaBox']['urx'] - $format['MediaBox']['llx']) * $this->k); - $this->fhPt = (($format['MediaBox']['ury'] - $format['MediaBox']['lly']) * $this->k); - } else { - if (isset($format[0]) AND is_numeric($format[0]) AND isset($format[1]) AND is_numeric($format[1])) { - $pf = array(($format[0] * $this->k), ($format[1] * $this->k)); - } else { - if (!isset($format['format'])) { - // default value - $format['format'] = 'A4'; - } - $pf = TCPDF_STATIC::getPageSizeFromFormat($format['format']); - } - $this->fwPt = $pf[0]; - $this->fhPt = $pf[1]; - $this->pagedim = TCPDF_STATIC::setPageBoxes($this->page, 'MediaBox', 0, 0, $this->fwPt, $this->fhPt, true, $this->k, $this->pagedim); - } - // the visible region of default user space - if (isset($format['CropBox'])) { - $this->pagedim = TCPDF_STATIC::setPageBoxes($this->page, 'CropBox', $format['CropBox']['llx'], $format['CropBox']['lly'], $format['CropBox']['urx'], $format['CropBox']['ury'], false, $this->k, $this->pagedim); - } - // the region to which the contents of the page shall be clipped when output in a production environment - if (isset($format['BleedBox'])) { - $this->pagedim = TCPDF_STATIC::setPageBoxes($this->page, 'BleedBox', $format['BleedBox']['llx'], $format['BleedBox']['lly'], $format['BleedBox']['urx'], $format['BleedBox']['ury'], false, $this->k, $this->pagedim); - } - // the intended dimensions of the finished page after trimming - if (isset($format['TrimBox'])) { - $this->pagedim = TCPDF_STATIC::setPageBoxes($this->page, 'TrimBox', $format['TrimBox']['llx'], $format['TrimBox']['lly'], $format['TrimBox']['urx'], $format['TrimBox']['ury'], false, $this->k, $this->pagedim); - } - // the page's meaningful content (including potential white space) - if (isset($format['ArtBox'])) { - $this->pagedim = TCPDF_STATIC::setPageBoxes($this->page, 'ArtBox', $format['ArtBox']['llx'], $format['ArtBox']['lly'], $format['ArtBox']['urx'], $format['ArtBox']['ury'], false, $this->k, $this->pagedim); - } - // specify the colours and other visual characteristics that should be used in displaying guidelines on the screen for the various page boundaries - if (isset($format['BoxColorInfo'])) { - $this->pagedim[$this->page]['BoxColorInfo'] = $format['BoxColorInfo']; - } - if (isset($format['Rotate']) AND (($format['Rotate'] % 90) == 0)) { - // The number of degrees by which the page shall be rotated clockwise when displayed or printed. The value shall be a multiple of 90. - $this->pagedim[$this->page]['Rotate'] = intval($format['Rotate']); - } - if (isset($format['PZ'])) { - // The page's preferred zoom (magnification) factor - $this->pagedim[$this->page]['PZ'] = floatval($format['PZ']); - } - if (isset($format['trans'])) { - // The style and duration of the visual transition to use when moving from another page to the given page during a presentation - if (isset($format['trans']['Dur'])) { - // The page's display duration - $this->pagedim[$this->page]['trans']['Dur'] = floatval($format['trans']['Dur']); - } - $stansition_styles = array('Split', 'Blinds', 'Box', 'Wipe', 'Dissolve', 'Glitter', 'R', 'Fly', 'Push', 'Cover', 'Uncover', 'Fade'); - if (isset($format['trans']['S']) AND in_array($format['trans']['S'], $stansition_styles)) { - // The transition style that shall be used when moving to this page from another during a presentation - $this->pagedim[$this->page]['trans']['S'] = $format['trans']['S']; - $valid_effect = array('Split', 'Blinds'); - $valid_vals = array('H', 'V'); - if (isset($format['trans']['Dm']) AND in_array($format['trans']['S'], $valid_effect) AND in_array($format['trans']['Dm'], $valid_vals)) { - $this->pagedim[$this->page]['trans']['Dm'] = $format['trans']['Dm']; - } - $valid_effect = array('Split', 'Box', 'Fly'); - $valid_vals = array('I', 'O'); - if (isset($format['trans']['M']) AND in_array($format['trans']['S'], $valid_effect) AND in_array($format['trans']['M'], $valid_vals)) { - $this->pagedim[$this->page]['trans']['M'] = $format['trans']['M']; - } - $valid_effect = array('Wipe', 'Glitter', 'Fly', 'Cover', 'Uncover', 'Push'); - if (isset($format['trans']['Di']) AND in_array($format['trans']['S'], $valid_effect)) { - if (((($format['trans']['Di'] == 90) OR ($format['trans']['Di'] == 180)) AND ($format['trans']['S'] == 'Wipe')) - OR (($format['trans']['Di'] == 315) AND ($format['trans']['S'] == 'Glitter')) - OR (($format['trans']['Di'] == 0) OR ($format['trans']['Di'] == 270))) { - $this->pagedim[$this->page]['trans']['Di'] = intval($format['trans']['Di']); - } - } - if (isset($format['trans']['SS']) AND ($format['trans']['S'] == 'Fly')) { - $this->pagedim[$this->page]['trans']['SS'] = floatval($format['trans']['SS']); - } - if (isset($format['trans']['B']) AND ($format['trans']['B'] === true) AND ($format['trans']['S'] == 'Fly')) { - $this->pagedim[$this->page]['trans']['B'] = 'true'; - } - } else { - $this->pagedim[$this->page]['trans']['S'] = 'R'; - } - if (isset($format['trans']['D'])) { - // The duration of the transition effect, in seconds - $this->pagedim[$this->page]['trans']['D'] = floatval($format['trans']['D']); - } else { - $this->pagedim[$this->page]['trans']['D'] = 1; - } - } - } - $this->setPageOrientation($orientation); - } - - /** - * Set page orientation. - * @param $orientation (string) page orientation. Possible values are (case insensitive):
          • P or Portrait (default)
          • L or Landscape
          • '' (empty string) for automatic orientation
          - * @param $autopagebreak (boolean) Boolean indicating if auto-page-break mode should be on or off. - * @param $bottommargin (float) bottom margin of the page. - * @public - * @since 3.0.015 (2008-06-06) - */ - public function setPageOrientation($orientation, $autopagebreak='', $bottommargin='') { - if (!isset($this->pagedim[$this->page]['MediaBox'])) { - // the boundaries of the physical medium on which the page shall be displayed or printed - $this->pagedim = TCPDF_STATIC::setPageBoxes($this->page, 'MediaBox', 0, 0, $this->fwPt, $this->fhPt, true, $this->k, $this->pagedim); - } - if (!isset($this->pagedim[$this->page]['CropBox'])) { - // the visible region of default user space - $this->pagedim = TCPDF_STATIC::setPageBoxes($this->page, 'CropBox', $this->pagedim[$this->page]['MediaBox']['llx'], $this->pagedim[$this->page]['MediaBox']['lly'], $this->pagedim[$this->page]['MediaBox']['urx'], $this->pagedim[$this->page]['MediaBox']['ury'], true, $this->k, $this->pagedim); - } - if (!isset($this->pagedim[$this->page]['BleedBox'])) { - // the region to which the contents of the page shall be clipped when output in a production environment - $this->pagedim = TCPDF_STATIC::setPageBoxes($this->page, 'BleedBox', $this->pagedim[$this->page]['CropBox']['llx'], $this->pagedim[$this->page]['CropBox']['lly'], $this->pagedim[$this->page]['CropBox']['urx'], $this->pagedim[$this->page]['CropBox']['ury'], true, $this->k, $this->pagedim); - } - if (!isset($this->pagedim[$this->page]['TrimBox'])) { - // the intended dimensions of the finished page after trimming - $this->pagedim = TCPDF_STATIC::setPageBoxes($this->page, 'TrimBox', $this->pagedim[$this->page]['CropBox']['llx'], $this->pagedim[$this->page]['CropBox']['lly'], $this->pagedim[$this->page]['CropBox']['urx'], $this->pagedim[$this->page]['CropBox']['ury'], true, $this->k, $this->pagedim); - } - if (!isset($this->pagedim[$this->page]['ArtBox'])) { - // the page's meaningful content (including potential white space) - $this->pagedim = TCPDF_STATIC::setPageBoxes($this->page, 'ArtBox', $this->pagedim[$this->page]['CropBox']['llx'], $this->pagedim[$this->page]['CropBox']['lly'], $this->pagedim[$this->page]['CropBox']['urx'], $this->pagedim[$this->page]['CropBox']['ury'], true, $this->k, $this->pagedim); - } - if (!isset($this->pagedim[$this->page]['Rotate'])) { - // The number of degrees by which the page shall be rotated clockwise when displayed or printed. The value shall be a multiple of 90. - $this->pagedim[$this->page]['Rotate'] = 0; - } - if (!isset($this->pagedim[$this->page]['PZ'])) { - // The page's preferred zoom (magnification) factor - $this->pagedim[$this->page]['PZ'] = 1; - } - if ($this->fwPt > $this->fhPt) { - // landscape - $default_orientation = 'L'; - } else { - // portrait - $default_orientation = 'P'; - } - $valid_orientations = array('P', 'L'); - if (empty($orientation)) { - $orientation = $default_orientation; - } else { - $orientation = strtoupper($orientation[0]); - } - if (in_array($orientation, $valid_orientations) AND ($orientation != $default_orientation)) { - $this->CurOrientation = $orientation; - $this->wPt = $this->fhPt; - $this->hPt = $this->fwPt; - } else { - $this->CurOrientation = $default_orientation; - $this->wPt = $this->fwPt; - $this->hPt = $this->fhPt; - } - if ((abs($this->pagedim[$this->page]['MediaBox']['urx'] - $this->hPt) < $this->feps) AND (abs($this->pagedim[$this->page]['MediaBox']['ury'] - $this->wPt) < $this->feps)){ - // swap X and Y coordinates (change page orientation) - $this->pagedim = TCPDF_STATIC::swapPageBoxCoordinates($this->page, $this->pagedim); - } - $this->w = ($this->wPt / $this->k); - $this->h = ($this->hPt / $this->k); - if (TCPDF_STATIC::empty_string($autopagebreak)) { - if (isset($this->AutoPageBreak)) { - $autopagebreak = $this->AutoPageBreak; - } else { - $autopagebreak = true; - } - } - if (TCPDF_STATIC::empty_string($bottommargin)) { - if (isset($this->bMargin)) { - $bottommargin = $this->bMargin; - } else { - // default value = 2 cm - $bottommargin = 2 * 28.35 / $this->k; - } - } - $this->SetAutoPageBreak($autopagebreak, $bottommargin); - // store page dimensions - $this->pagedim[$this->page]['w'] = $this->wPt; - $this->pagedim[$this->page]['h'] = $this->hPt; - $this->pagedim[$this->page]['wk'] = $this->w; - $this->pagedim[$this->page]['hk'] = $this->h; - $this->pagedim[$this->page]['tm'] = $this->tMargin; - $this->pagedim[$this->page]['bm'] = $bottommargin; - $this->pagedim[$this->page]['lm'] = $this->lMargin; - $this->pagedim[$this->page]['rm'] = $this->rMargin; - $this->pagedim[$this->page]['pb'] = $autopagebreak; - $this->pagedim[$this->page]['or'] = $this->CurOrientation; - $this->pagedim[$this->page]['olm'] = $this->original_lMargin; - $this->pagedim[$this->page]['orm'] = $this->original_rMargin; - } - - /** - * Set regular expression to detect withespaces or word separators. - * The pattern delimiter must be the forward-slash character "/". - * Some example patterns are: - *
          -	 * Non-Unicode or missing PCRE unicode support: "/[^\S\xa0]/"
          -	 * Unicode and PCRE unicode support: "/(?!\xa0)[\s\p{Z}]/u"
          -	 * Unicode and PCRE unicode support in Chinese mode: "/(?!\xa0)[\s\p{Z}\p{Lo}]/u"
          -	 * if PCRE unicode support is turned ON ("\P" is the negate class of "\p"):
          -	 *      \s     : any whitespace character
          -	 *      \p{Z}  : any separator
          -	 *      \p{Lo} : Unicode letter or ideograph that does not have lowercase and uppercase variants. Is used to chunk chinese words.
          -	 *      \xa0   : Unicode Character 'NO-BREAK SPACE' (U+00A0)
          -	 * 
          - * @param $re (string) regular expression (leave empty for default). - * @public - * @since 4.6.016 (2009-06-15) - */ - public function setSpacesRE($re='/[^\S\xa0]/') { - $this->re_spaces = $re; - $re_parts = explode('/', $re); - // get pattern parts - $this->re_space = array(); - if (isset($re_parts[1]) AND !empty($re_parts[1])) { - $this->re_space['p'] = $re_parts[1]; - } else { - $this->re_space['p'] = '[\s]'; - } - // set pattern modifiers - if (isset($re_parts[2]) AND !empty($re_parts[2])) { - $this->re_space['m'] = $re_parts[2]; - } else { - $this->re_space['m'] = ''; - } - } - - /** - * Enable or disable Right-To-Left language mode - * @param $enable (Boolean) if true enable Right-To-Left language mode. - * @param $resetx (Boolean) if true reset the X position on direction change. - * @public - * @since 2.0.000 (2008-01-03) - */ - public function setRTL($enable, $resetx=true) { - $enable = $enable ? true : false; - $resetx = ($resetx AND ($enable != $this->rtl)); - $this->rtl = $enable; - $this->tmprtl = false; - if ($resetx) { - $this->Ln(0); - } - } - - /** - * Return the RTL status - * @return boolean - * @public - * @since 4.0.012 (2008-07-24) - */ - public function getRTL() { - return $this->rtl; - } - - /** - * Force temporary RTL language direction - * @param $mode (mixed) can be false, 'L' for LTR or 'R' for RTL - * @public - * @since 2.1.000 (2008-01-09) - */ - public function setTempRTL($mode) { - $newmode = false; - switch (strtoupper($mode)) { - case 'LTR': - case 'L': { - if ($this->rtl) { - $newmode = 'L'; - } - break; - } - case 'RTL': - case 'R': { - if (!$this->rtl) { - $newmode = 'R'; - } - break; - } - case false: - default: { - $newmode = false; - break; - } - } - $this->tmprtl = $newmode; - } - - /** - * Return the current temporary RTL status - * @return boolean - * @public - * @since 4.8.014 (2009-11-04) - */ - public function isRTLTextDir() { - return ($this->rtl OR ($this->tmprtl == 'R')); - } - - /** - * Set the last cell height. - * @param $h (float) cell height. - * @author Nicola Asuni - * @public - * @since 1.53.0.TC034 - */ - public function setLastH($h) { - $this->lasth = $h; - } - - /** - * Return the cell height - * @param $fontsize (int) Font size in internal units - * @param $padding (boolean) If true add cell padding - * @public - */ - public function getCellHeight($fontsize, $padding=TRUE) { - $height = ($fontsize * $this->cell_height_ratio); - if ($padding) { - $height += ($this->cell_padding['T'] + $this->cell_padding['B']); - } - return round($height, 6); - } - - /** - * Reset the last cell height. - * @public - * @since 5.9.000 (2010-10-03) - */ - public function resetLastH() { - $this->lasth = $this->getCellHeight($this->FontSize); - } - - /** - * Get the last cell height. - * @return last cell height - * @public - * @since 4.0.017 (2008-08-05) - */ - public function getLastH() { - return $this->lasth; - } - - /** - * Set the adjusting factor to convert pixels to user units. - * @param $scale (float) adjusting factor to convert pixels to user units. - * @author Nicola Asuni - * @public - * @since 1.5.2 - */ - public function setImageScale($scale) { - $this->imgscale = $scale; - } - - /** - * Returns the adjusting factor to convert pixels to user units. - * @return float adjusting factor to convert pixels to user units. - * @author Nicola Asuni - * @public - * @since 1.5.2 - */ - public function getImageScale() { - return $this->imgscale; - } - - /** - * Returns an array of page dimensions: - *
          • $this->pagedim[$this->page]['w'] = page width in points
          • $this->pagedim[$this->page]['h'] = height in points
          • $this->pagedim[$this->page]['wk'] = page width in user units
          • $this->pagedim[$this->page]['hk'] = page height in user units
          • $this->pagedim[$this->page]['tm'] = top margin
          • $this->pagedim[$this->page]['bm'] = bottom margin
          • $this->pagedim[$this->page]['lm'] = left margin
          • $this->pagedim[$this->page]['rm'] = right margin
          • $this->pagedim[$this->page]['pb'] = auto page break
          • $this->pagedim[$this->page]['or'] = page orientation
          • $this->pagedim[$this->page]['olm'] = original left margin
          • $this->pagedim[$this->page]['orm'] = original right margin
          • $this->pagedim[$this->page]['Rotate'] = The number of degrees by which the page shall be rotated clockwise when displayed or printed. The value shall be a multiple of 90.
          • $this->pagedim[$this->page]['PZ'] = The page's preferred zoom (magnification) factor.
          • $this->pagedim[$this->page]['trans'] : the style and duration of the visual transition to use when moving from another page to the given page during a presentation
            • $this->pagedim[$this->page]['trans']['Dur'] = The page's display duration (also called its advance timing): the maximum length of time, in seconds, that the page shall be displayed during presentations before the viewer application shall automatically advance to the next page.
            • $this->pagedim[$this->page]['trans']['S'] = transition style : Split, Blinds, Box, Wipe, Dissolve, Glitter, R, Fly, Push, Cover, Uncover, Fade
            • $this->pagedim[$this->page]['trans']['D'] = The duration of the transition effect, in seconds.
            • $this->pagedim[$this->page]['trans']['Dm'] = (Split and Blinds transition styles only) The dimension in which the specified transition effect shall occur: H = Horizontal, V = Vertical. Default value: H.
            • $this->pagedim[$this->page]['trans']['M'] = (Split, Box and Fly transition styles only) The direction of motion for the specified transition effect: I = Inward from the edges of the page, O = Outward from the center of the pageDefault value: I.
            • $this->pagedim[$this->page]['trans']['Di'] = (Wipe, Glitter, Fly, Cover, Uncover and Push transition styles only) The direction in which the specified transition effect shall moves, expressed in degrees counterclockwise starting from a left-to-right direction. If the value is a number, it shall be one of: 0 = Left to right, 90 = Bottom to top (Wipe only), 180 = Right to left (Wipe only), 270 = Top to bottom, 315 = Top-left to bottom-right (Glitter only). If the value is a name, it shall be None, which is relevant only for the Fly transition when the value of SS is not 1.0. Default value: 0.
            • $this->pagedim[$this->page]['trans']['SS'] = (Fly transition style only) The starting or ending scale at which the changes shall be drawn. If M specifies an inward transition, the scale of the changes drawn shall progress from SS to 1.0 over the course of the transition. If M specifies an outward transition, the scale of the changes drawn shall progress from 1.0 to SS over the course of the transition. Default: 1.0.
            • $this->pagedim[$this->page]['trans']['B'] = (Fly transition style only) If true, the area that shall be flown in is rectangular and opaque. Default: false.
          • $this->pagedim[$this->page]['MediaBox'] : the boundaries of the physical medium on which the page shall be displayed or printed
            • $this->pagedim[$this->page]['MediaBox']['llx'] = lower-left x coordinate in points
            • $this->pagedim[$this->page]['MediaBox']['lly'] = lower-left y coordinate in points
            • $this->pagedim[$this->page]['MediaBox']['urx'] = upper-right x coordinate in points
            • $this->pagedim[$this->page]['MediaBox']['ury'] = upper-right y coordinate in points
          • $this->pagedim[$this->page]['CropBox'] : the visible region of default user space
            • $this->pagedim[$this->page]['CropBox']['llx'] = lower-left x coordinate in points
            • $this->pagedim[$this->page]['CropBox']['lly'] = lower-left y coordinate in points
            • $this->pagedim[$this->page]['CropBox']['urx'] = upper-right x coordinate in points
            • $this->pagedim[$this->page]['CropBox']['ury'] = upper-right y coordinate in points
          • $this->pagedim[$this->page]['BleedBox'] : the region to which the contents of the page shall be clipped when output in a production environment
            • $this->pagedim[$this->page]['BleedBox']['llx'] = lower-left x coordinate in points
            • $this->pagedim[$this->page]['BleedBox']['lly'] = lower-left y coordinate in points
            • $this->pagedim[$this->page]['BleedBox']['urx'] = upper-right x coordinate in points
            • $this->pagedim[$this->page]['BleedBox']['ury'] = upper-right y coordinate in points
          • $this->pagedim[$this->page]['TrimBox'] : the intended dimensions of the finished page after trimming
            • $this->pagedim[$this->page]['TrimBox']['llx'] = lower-left x coordinate in points
            • $this->pagedim[$this->page]['TrimBox']['lly'] = lower-left y coordinate in points
            • $this->pagedim[$this->page]['TrimBox']['urx'] = upper-right x coordinate in points
            • $this->pagedim[$this->page]['TrimBox']['ury'] = upper-right y coordinate in points
          • $this->pagedim[$this->page]['ArtBox'] : the extent of the page's meaningful content
            • $this->pagedim[$this->page]['ArtBox']['llx'] = lower-left x coordinate in points
            • $this->pagedim[$this->page]['ArtBox']['lly'] = lower-left y coordinate in points
            • $this->pagedim[$this->page]['ArtBox']['urx'] = upper-right x coordinate in points
            • $this->pagedim[$this->page]['ArtBox']['ury'] = upper-right y coordinate in points
          - * @param $pagenum (int) page number (empty = current page) - * @return array of page dimensions. - * @author Nicola Asuni - * @public - * @since 4.5.027 (2009-03-16) - */ - public function getPageDimensions($pagenum='') { - if (empty($pagenum)) { - $pagenum = $this->page; - } - return $this->pagedim[$pagenum]; - } - - /** - * Returns the page width in units. - * @param $pagenum (int) page number (empty = current page) - * @return int page width. - * @author Nicola Asuni - * @public - * @since 1.5.2 - * @see getPageDimensions() - */ - public function getPageWidth($pagenum='') { - if (empty($pagenum)) { - return $this->w; - } - return $this->pagedim[$pagenum]['w']; - } - - /** - * Returns the page height in units. - * @param $pagenum (int) page number (empty = current page) - * @return int page height. - * @author Nicola Asuni - * @public - * @since 1.5.2 - * @see getPageDimensions() - */ - public function getPageHeight($pagenum='') { - if (empty($pagenum)) { - return $this->h; - } - return $this->pagedim[$pagenum]['h']; - } - - /** - * Returns the page break margin. - * @param $pagenum (int) page number (empty = current page) - * @return int page break margin. - * @author Nicola Asuni - * @public - * @since 1.5.2 - * @see getPageDimensions() - */ - public function getBreakMargin($pagenum='') { - if (empty($pagenum)) { - return $this->bMargin; - } - return $this->pagedim[$pagenum]['bm']; - } - - /** - * Returns the scale factor (number of points in user unit). - * @return int scale factor. - * @author Nicola Asuni - * @public - * @since 1.5.2 - */ - public function getScaleFactor() { - return $this->k; - } - - /** - * Defines the left, top and right margins. - * @param $left (float) Left margin. - * @param $top (float) Top margin. - * @param $right (float) Right margin. Default value is the left one. - * @param $keepmargins (boolean) if true overwrites the default page margins - * @public - * @since 1.0 - * @see SetLeftMargin(), SetTopMargin(), SetRightMargin(), SetAutoPageBreak() - */ - public function SetMargins($left, $top, $right=-1, $keepmargins=false) { - //Set left, top and right margins - $this->lMargin = $left; - $this->tMargin = $top; - if ($right == -1) { - $right = $left; - } - $this->rMargin = $right; - if ($keepmargins) { - // overwrite original values - $this->original_lMargin = $this->lMargin; - $this->original_rMargin = $this->rMargin; - } - } - - /** - * Defines the left margin. The method can be called before creating the first page. If the current abscissa gets out of page, it is brought back to the margin. - * @param $margin (float) The margin. - * @public - * @since 1.4 - * @see SetTopMargin(), SetRightMargin(), SetAutoPageBreak(), SetMargins() - */ - public function SetLeftMargin($margin) { - //Set left margin - $this->lMargin = $margin; - if (($this->page > 0) AND ($this->x < $margin)) { - $this->x = $margin; - } - } - - /** - * Defines the top margin. The method can be called before creating the first page. - * @param $margin (float) The margin. - * @public - * @since 1.5 - * @see SetLeftMargin(), SetRightMargin(), SetAutoPageBreak(), SetMargins() - */ - public function SetTopMargin($margin) { - //Set top margin - $this->tMargin = $margin; - if (($this->page > 0) AND ($this->y < $margin)) { - $this->y = $margin; - } - } - - /** - * Defines the right margin. The method can be called before creating the first page. - * @param $margin (float) The margin. - * @public - * @since 1.5 - * @see SetLeftMargin(), SetTopMargin(), SetAutoPageBreak(), SetMargins() - */ - public function SetRightMargin($margin) { - $this->rMargin = $margin; - if (($this->page > 0) AND ($this->x > ($this->w - $margin))) { - $this->x = $this->w - $margin; - } - } - - /** - * Set the same internal Cell padding for top, right, bottom, left- - * @param $pad (float) internal padding. - * @public - * @since 2.1.000 (2008-01-09) - * @see getCellPaddings(), setCellPaddings() - */ - public function SetCellPadding($pad) { - if ($pad >= 0) { - $this->cell_padding['L'] = $pad; - $this->cell_padding['T'] = $pad; - $this->cell_padding['R'] = $pad; - $this->cell_padding['B'] = $pad; - } - } - - /** - * Set the internal Cell paddings. - * @param $left (float) left padding - * @param $top (float) top padding - * @param $right (float) right padding - * @param $bottom (float) bottom padding - * @public - * @since 5.9.000 (2010-10-03) - * @see getCellPaddings(), SetCellPadding() - */ - public function setCellPaddings($left='', $top='', $right='', $bottom='') { - if (($left !== '') AND ($left >= 0)) { - $this->cell_padding['L'] = $left; - } - if (($top !== '') AND ($top >= 0)) { - $this->cell_padding['T'] = $top; - } - if (($right !== '') AND ($right >= 0)) { - $this->cell_padding['R'] = $right; - } - if (($bottom !== '') AND ($bottom >= 0)) { - $this->cell_padding['B'] = $bottom; - } - } - - /** - * Get the internal Cell padding array. - * @return array of padding values - * @public - * @since 5.9.000 (2010-10-03) - * @see setCellPaddings(), SetCellPadding() - */ - public function getCellPaddings() { - return $this->cell_padding; - } - - /** - * Set the internal Cell margins. - * @param $left (float) left margin - * @param $top (float) top margin - * @param $right (float) right margin - * @param $bottom (float) bottom margin - * @public - * @since 5.9.000 (2010-10-03) - * @see getCellMargins() - */ - public function setCellMargins($left='', $top='', $right='', $bottom='') { - if (($left !== '') AND ($left >= 0)) { - $this->cell_margin['L'] = $left; - } - if (($top !== '') AND ($top >= 0)) { - $this->cell_margin['T'] = $top; - } - if (($right !== '') AND ($right >= 0)) { - $this->cell_margin['R'] = $right; - } - if (($bottom !== '') AND ($bottom >= 0)) { - $this->cell_margin['B'] = $bottom; - } - } - - /** - * Get the internal Cell margin array. - * @return array of margin values - * @public - * @since 5.9.000 (2010-10-03) - * @see setCellMargins() - */ - public function getCellMargins() { - return $this->cell_margin; - } - - /** - * Adjust the internal Cell padding array to take account of the line width. - * @param $brd (mixed) Indicates if borders must be drawn around the cell. The value can be a number:
          • 0: no border (default)
          • 1: frame
          or a string containing some or all of the following characters (in any order):
          • L: left
          • T: top
          • R: right
          • B: bottom
          or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) - * @return array of adjustments - * @public - * @since 5.9.000 (2010-10-03) - */ - protected function adjustCellPadding($brd=0) { - if (empty($brd)) { - return; - } - if (is_string($brd)) { - // convert string to array - $slen = strlen($brd); - $newbrd = array(); - for ($i = 0; $i < $slen; ++$i) { - $newbrd[$brd[$i]] = true; - } - $brd = $newbrd; - } elseif (($brd === 1) OR ($brd === true) OR (is_numeric($brd) AND (intval($brd) > 0))) { - $brd = array('LRTB' => true); - } - if (!is_array($brd)) { - return; - } - // store current cell padding - $cp = $this->cell_padding; - // select border mode - if (isset($brd['mode'])) { - $mode = $brd['mode']; - unset($brd['mode']); - } else { - $mode = 'normal'; - } - // process borders - foreach ($brd as $border => $style) { - $line_width = $this->LineWidth; - if (is_array($style) AND isset($style['width'])) { - // get border width - $line_width = $style['width']; - } - $adj = 0; // line width inside the cell - switch ($mode) { - case 'ext': { - $adj = 0; - break; - } - case 'int': { - $adj = $line_width; - break; - } - case 'normal': - default: { - $adj = ($line_width / 2); - break; - } - } - // correct internal cell padding if required to avoid overlap between text and lines - if ((strpos($border,'T') !== false) AND ($this->cell_padding['T'] < $adj)) { - $this->cell_padding['T'] = $adj; - } - if ((strpos($border,'R') !== false) AND ($this->cell_padding['R'] < $adj)) { - $this->cell_padding['R'] = $adj; - } - if ((strpos($border,'B') !== false) AND ($this->cell_padding['B'] < $adj)) { - $this->cell_padding['B'] = $adj; - } - if ((strpos($border,'L') !== false) AND ($this->cell_padding['L'] < $adj)) { - $this->cell_padding['L'] = $adj; - } - } - return array('T' => ($this->cell_padding['T'] - $cp['T']), 'R' => ($this->cell_padding['R'] - $cp['R']), 'B' => ($this->cell_padding['B'] - $cp['B']), 'L' => ($this->cell_padding['L'] - $cp['L'])); - } - - /** - * Enables or disables the automatic page breaking mode. When enabling, the second parameter is the distance from the bottom of the page that defines the triggering limit. By default, the mode is on and the margin is 2 cm. - * @param $auto (boolean) Boolean indicating if mode should be on or off. - * @param $margin (float) Distance from the bottom of the page. - * @public - * @since 1.0 - * @see Cell(), MultiCell(), AcceptPageBreak() - */ - public function SetAutoPageBreak($auto, $margin=0) { - $this->AutoPageBreak = $auto ? true : false; - $this->bMargin = $margin; - $this->PageBreakTrigger = $this->h - $margin; - } - - /** - * Return the auto-page-break mode (true or false). - * @return boolean auto-page-break mode - * @public - * @since 5.9.088 - */ - public function getAutoPageBreak() { - return $this->AutoPageBreak; - } - - /** - * Defines the way the document is to be displayed by the viewer. - * @param $zoom (mixed) The zoom to use. It can be one of the following string values or a number indicating the zooming factor to use.
          • fullpage: displays the entire page on screen
          • fullwidth: uses maximum width of window
          • real: uses real size (equivalent to 100% zoom)
          • default: uses viewer default mode
          - * @param $layout (string) The page layout. Possible values are:
          • SinglePage Display one page at a time
          • OneColumn Display the pages in one column
          • TwoColumnLeft Display the pages in two columns, with odd-numbered pages on the left
          • TwoColumnRight Display the pages in two columns, with odd-numbered pages on the right
          • TwoPageLeft (PDF 1.5) Display the pages two at a time, with odd-numbered pages on the left
          • TwoPageRight (PDF 1.5) Display the pages two at a time, with odd-numbered pages on the right
          - * @param $mode (string) A name object specifying how the document should be displayed when opened:
          • UseNone Neither document outline nor thumbnail images visible
          • UseOutlines Document outline visible
          • UseThumbs Thumbnail images visible
          • FullScreen Full-screen mode, with no menu bar, window controls, or any other window visible
          • UseOC (PDF 1.5) Optional content group panel visible
          • UseAttachments (PDF 1.6) Attachments panel visible
          - * @public - * @since 1.2 - */ - public function SetDisplayMode($zoom, $layout='SinglePage', $mode='UseNone') { - if (($zoom == 'fullpage') OR ($zoom == 'fullwidth') OR ($zoom == 'real') OR ($zoom == 'default') OR (!is_string($zoom))) { - $this->ZoomMode = $zoom; - } else { - $this->Error('Incorrect zoom display mode: '.$zoom); - } - $this->LayoutMode = TCPDF_STATIC::getPageLayoutMode($layout); - $this->PageMode = TCPDF_STATIC::getPageMode($mode); - } - - /** - * Activates or deactivates page compression. When activated, the internal representation of each page is compressed, which leads to a compression ratio of about 2 for the resulting document. Compression is on by default. - * Note: the Zlib extension is required for this feature. If not present, compression will be turned off. - * @param $compress (boolean) Boolean indicating if compression must be enabled. - * @public - * @since 1.4 - */ - public function SetCompression($compress=true) { - if (function_exists('gzcompress')) { - $this->compress = $compress ? true : false; - } else { - $this->compress = false; - } - } - - /** - * Set flag to force sRGB_IEC61966-2.1 black scaled ICC color profile for the whole document. - * @param $mode (boolean) If true force sRGB output intent. - * @public - * @since 5.9.121 (2011-09-28) - */ - public function setSRGBmode($mode=false) { - $this->force_srgb = $mode ? true : false; - } - - /** - * Turn on/off Unicode mode for document information dictionary (meta tags). - * This has effect only when unicode mode is set to false. - * @param $unicode (boolean) if true set the meta information in Unicode - * @since 5.9.027 (2010-12-01) - * @public - */ - public function SetDocInfoUnicode($unicode=true) { - $this->docinfounicode = $unicode ? true : false; - } - - /** - * Defines the title of the document. - * @param $title (string) The title. - * @public - * @since 1.2 - * @see SetAuthor(), SetCreator(), SetKeywords(), SetSubject() - */ - public function SetTitle($title) { - $this->title = $title; - } - - /** - * Defines the subject of the document. - * @param $subject (string) The subject. - * @public - * @since 1.2 - * @see SetAuthor(), SetCreator(), SetKeywords(), SetTitle() - */ - public function SetSubject($subject) { - $this->subject = $subject; - } - - /** - * Defines the author of the document. - * @param $author (string) The name of the author. - * @public - * @since 1.2 - * @see SetCreator(), SetKeywords(), SetSubject(), SetTitle() - */ - public function SetAuthor($author) { - $this->author = $author; - } - - /** - * Associates keywords with the document, generally in the form 'keyword1 keyword2 ...'. - * @param $keywords (string) The list of keywords. - * @public - * @since 1.2 - * @see SetAuthor(), SetCreator(), SetSubject(), SetTitle() - */ - public function SetKeywords($keywords) { - $this->keywords = $keywords; - } - - /** - * Defines the creator of the document. This is typically the name of the application that generates the PDF. - * @param $creator (string) The name of the creator. - * @public - * @since 1.2 - * @see SetAuthor(), SetKeywords(), SetSubject(), SetTitle() - */ - public function SetCreator($creator) { - $this->creator = $creator; - } - - /** - * Throw an exception or print an error message and die if the K_TCPDF_PARSER_THROW_EXCEPTION_ERROR constant is set to true. - * @param $msg (string) The error message - * @public - * @since 1.0 - */ - public function Error($msg) { - // unset all class variables - $this->_destroy(true); - if (defined('K_TCPDF_THROW_EXCEPTION_ERROR') AND !K_TCPDF_THROW_EXCEPTION_ERROR) { - die('TCPDF ERROR: '.$msg); - } else { - throw new Exception('TCPDF ERROR: '.$msg); - } - } - - /** - * This method begins the generation of the PDF document. - * It is not necessary to call it explicitly because AddPage() does it automatically. - * Note: no page is created by this method - * @public - * @since 1.0 - * @see AddPage(), Close() - */ - public function Open() { - $this->state = 1; - } - - /** - * Terminates the PDF document. - * It is not necessary to call this method explicitly because Output() does it automatically. - * If the document contains no page, AddPage() is called to prevent from getting an invalid document. - * @public - * @since 1.0 - * @see Open(), Output() - */ - public function Close() { - if ($this->state == 3) { - return; - } - if ($this->page == 0) { - $this->AddPage(); - } - $this->endLayer(); - if ($this->tcpdflink) { - // save current graphic settings - $gvars = $this->getGraphicVars(); - $this->setEqualColumns(); - $this->lastpage(true); - $this->SetAutoPageBreak(false); - $this->x = 0; - $this->y = $this->h - (1 / $this->k); - $this->lMargin = 0; - $this->_outSaveGraphicsState(); - $font = defined('PDF_FONT_NAME_MAIN')?PDF_FONT_NAME_MAIN:'helvetica'; - $this->SetFont($font, '', 1); - $this->setTextRenderingMode(0, false, false); - $msg = "\x50\x6f\x77\x65\x72\x65\x64\x20\x62\x79\x20\x54\x43\x50\x44\x46\x20\x28\x77\x77\x77\x2e\x74\x63\x70\x64\x66\x2e\x6f\x72\x67\x29"; - $lnk = "\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x74\x63\x70\x64\x66\x2e\x6f\x72\x67"; - $this->Cell(0, 0, $msg, 0, 0, 'L', 0, $lnk, 0, false, 'D', 'B'); - $this->_outRestoreGraphicsState(); - // restore graphic settings - $this->setGraphicVars($gvars); - } - // close page - $this->endPage(); - // close document - $this->_enddoc(); - // unset all class variables (except critical ones) - $this->_destroy(false); - } - - /** - * Move pointer at the specified document page and update page dimensions. - * @param $pnum (int) page number (1 ... numpages) - * @param $resetmargins (boolean) if true reset left, right, top margins and Y position. - * @public - * @since 2.1.000 (2008-01-07) - * @see getPage(), lastpage(), getNumPages() - */ - public function setPage($pnum, $resetmargins=false) { - if (($pnum == $this->page) AND ($this->state == 2)) { - return; - } - if (($pnum > 0) AND ($pnum <= $this->numpages)) { - $this->state = 2; - // save current graphic settings - //$gvars = $this->getGraphicVars(); - $oldpage = $this->page; - $this->page = $pnum; - $this->wPt = $this->pagedim[$this->page]['w']; - $this->hPt = $this->pagedim[$this->page]['h']; - $this->w = $this->pagedim[$this->page]['wk']; - $this->h = $this->pagedim[$this->page]['hk']; - $this->tMargin = $this->pagedim[$this->page]['tm']; - $this->bMargin = $this->pagedim[$this->page]['bm']; - $this->original_lMargin = $this->pagedim[$this->page]['olm']; - $this->original_rMargin = $this->pagedim[$this->page]['orm']; - $this->AutoPageBreak = $this->pagedim[$this->page]['pb']; - $this->CurOrientation = $this->pagedim[$this->page]['or']; - $this->SetAutoPageBreak($this->AutoPageBreak, $this->bMargin); - // restore graphic settings - //$this->setGraphicVars($gvars); - if ($resetmargins) { - $this->lMargin = $this->pagedim[$this->page]['olm']; - $this->rMargin = $this->pagedim[$this->page]['orm']; - $this->SetY($this->tMargin); - } else { - // account for booklet mode - if ($this->pagedim[$this->page]['olm'] != $this->pagedim[$oldpage]['olm']) { - $deltam = $this->pagedim[$this->page]['olm'] - $this->pagedim[$this->page]['orm']; - $this->lMargin += $deltam; - $this->rMargin -= $deltam; - } - } - } else { - $this->Error('Wrong page number on setPage() function: '.$pnum); - } - } - - /** - * Reset pointer to the last document page. - * @param $resetmargins (boolean) if true reset left, right, top margins and Y position. - * @public - * @since 2.0.000 (2008-01-04) - * @see setPage(), getPage(), getNumPages() - */ - public function lastPage($resetmargins=false) { - $this->setPage($this->getNumPages(), $resetmargins); - } - - /** - * Get current document page number. - * @return int page number - * @public - * @since 2.1.000 (2008-01-07) - * @see setPage(), lastpage(), getNumPages() - */ - public function getPage() { - return $this->page; - } - - /** - * Get the total number of insered pages. - * @return int number of pages - * @public - * @since 2.1.000 (2008-01-07) - * @see setPage(), getPage(), lastpage() - */ - public function getNumPages() { - return $this->numpages; - } - - /** - * Adds a new TOC (Table Of Content) page to the document. - * @param $orientation (string) page orientation. - * @param $format (mixed) The format used for pages. It can be either: one of the string values specified at getPageSizeFromFormat() or an array of parameters specified at setPageFormat(). - * @param $keepmargins (boolean) if true overwrites the default page margins with the current margins - * @public - * @since 5.0.001 (2010-05-06) - * @see AddPage(), startPage(), endPage(), endTOCPage() - */ - public function addTOCPage($orientation='', $format='', $keepmargins=false) { - $this->AddPage($orientation, $format, $keepmargins, true); - } - - /** - * Terminate the current TOC (Table Of Content) page - * @public - * @since 5.0.001 (2010-05-06) - * @see AddPage(), startPage(), endPage(), addTOCPage() - */ - public function endTOCPage() { - $this->endPage(true); - } - - /** - * Adds a new page to the document. If a page is already present, the Footer() method is called first to output the footer (if enabled). Then the page is added, the current position set to the top-left corner according to the left and top margins (or top-right if in RTL mode), and Header() is called to display the header (if enabled). - * The origin of the coordinate system is at the top-left corner (or top-right for RTL) and increasing ordinates go downwards. - * @param $orientation (string) page orientation. Possible values are (case insensitive):
          • P or PORTRAIT (default)
          • L or LANDSCAPE
          - * @param $format (mixed) The format used for pages. It can be either: one of the string values specified at getPageSizeFromFormat() or an array of parameters specified at setPageFormat(). - * @param $keepmargins (boolean) if true overwrites the default page margins with the current margins - * @param $tocpage (boolean) if true set the tocpage state to true (the added page will be used to display Table Of Content). - * @public - * @since 1.0 - * @see startPage(), endPage(), addTOCPage(), endTOCPage(), getPageSizeFromFormat(), setPageFormat() - */ - public function AddPage($orientation='', $format='', $keepmargins=false, $tocpage=false) { - if ($this->inxobj) { - // we are inside an XObject template - return; - } - if (!isset($this->original_lMargin) OR $keepmargins) { - $this->original_lMargin = $this->lMargin; - } - if (!isset($this->original_rMargin) OR $keepmargins) { - $this->original_rMargin = $this->rMargin; - } - // terminate previous page - $this->endPage(); - // start new page - $this->startPage($orientation, $format, $tocpage); - } - - /** - * Terminate the current page - * @param $tocpage (boolean) if true set the tocpage state to false (end the page used to display Table Of Content). - * @public - * @since 4.2.010 (2008-11-14) - * @see AddPage(), startPage(), addTOCPage(), endTOCPage() - */ - public function endPage($tocpage=false) { - // check if page is already closed - if (($this->page == 0) OR ($this->numpages > $this->page) OR (!$this->pageopen[$this->page])) { - return; - } - // print page footer - $this->setFooter(); - // close page - $this->_endpage(); - // mark page as closed - $this->pageopen[$this->page] = false; - if ($tocpage) { - $this->tocpage = false; - } - } - - /** - * Starts a new page to the document. The page must be closed using the endPage() function. - * The origin of the coordinate system is at the top-left corner and increasing ordinates go downwards. - * @param $orientation (string) page orientation. Possible values are (case insensitive):
          • P or PORTRAIT (default)
          • L or LANDSCAPE
          - * @param $format (mixed) The format used for pages. It can be either: one of the string values specified at getPageSizeFromFormat() or an array of parameters specified at setPageFormat(). - * @param $tocpage (boolean) if true the page is designated to contain the Table-Of-Content. - * @since 4.2.010 (2008-11-14) - * @see AddPage(), endPage(), addTOCPage(), endTOCPage(), getPageSizeFromFormat(), setPageFormat() - * @public - */ - public function startPage($orientation='', $format='', $tocpage=false) { - if ($tocpage) { - $this->tocpage = true; - } - // move page numbers of documents to be attached - if ($this->tocpage) { - // move reference to unexistent pages (used for page attachments) - // adjust outlines - $tmpoutlines = $this->outlines; - foreach ($tmpoutlines as $key => $outline) { - if (!$outline['f'] AND ($outline['p'] > $this->numpages)) { - $this->outlines[$key]['p'] = ($outline['p'] + 1); - } - } - // adjust dests - $tmpdests = $this->dests; - foreach ($tmpdests as $key => $dest) { - if (!$dest['f'] AND ($dest['p'] > $this->numpages)) { - $this->dests[$key]['p'] = ($dest['p'] + 1); - } - } - // adjust links - $tmplinks = $this->links; - foreach ($tmplinks as $key => $link) { - if (!$link['f'] AND ($link['p'] > $this->numpages)) { - $this->links[$key]['p'] = ($link['p'] + 1); - } - } - } - if ($this->numpages > $this->page) { - // this page has been already added - $this->setPage($this->page + 1); - $this->SetY($this->tMargin); - return; - } - // start a new page - if ($this->state == 0) { - $this->Open(); - } - ++$this->numpages; - $this->swapMargins($this->booklet); - // save current graphic settings - $gvars = $this->getGraphicVars(); - // start new page - $this->_beginpage($orientation, $format); - // mark page as open - $this->pageopen[$this->page] = true; - // restore graphic settings - $this->setGraphicVars($gvars); - // mark this point - $this->setPageMark(); - // print page header - $this->setHeader(); - // restore graphic settings - $this->setGraphicVars($gvars); - // mark this point - $this->setPageMark(); - // print table header (if any) - $this->setTableHeader(); - // set mark for empty page check - $this->emptypagemrk[$this->page]= $this->pagelen[$this->page]; - } - - /** - * Set start-writing mark on current page stream used to put borders and fills. - * Borders and fills are always created after content and inserted on the position marked by this method. - * This function must be called after calling Image() function for a background image. - * Background images must be always inserted before calling Multicell() or WriteHTMLCell() or WriteHTML() functions. - * @public - * @since 4.0.016 (2008-07-30) - */ - public function setPageMark() { - $this->intmrk[$this->page] = $this->pagelen[$this->page]; - $this->bordermrk[$this->page] = $this->intmrk[$this->page]; - $this->setContentMark(); - } - - /** - * Set start-writing mark on selected page. - * Borders and fills are always created after content and inserted on the position marked by this method. - * @param $page (int) page number (default is the current page) - * @protected - * @since 4.6.021 (2009-07-20) - */ - protected function setContentMark($page=0) { - if ($page <= 0) { - $page = $this->page; - } - if (isset($this->footerlen[$page])) { - $this->cntmrk[$page] = $this->pagelen[$page] - $this->footerlen[$page]; - } else { - $this->cntmrk[$page] = $this->pagelen[$page]; - } - } - - /** - * Set header data. - * @param $ln (string) header image logo - * @param $lw (string) header image logo width in mm - * @param $ht (string) string to print as title on document header - * @param $hs (string) string to print on document header - * @param $tc (array) RGB array color for text. - * @param $lc (array) RGB array color for line. - * @public - */ - public function setHeaderData($ln='', $lw=0, $ht='', $hs='', $tc=array(0,0,0), $lc=array(0,0,0)) { - $this->header_logo = $ln; - $this->header_logo_width = $lw; - $this->header_title = $ht; - $this->header_string = $hs; - $this->header_text_color = $tc; - $this->header_line_color = $lc; - } - - /** - * Set footer data. - * @param $tc (array) RGB array color for text. - * @param $lc (array) RGB array color for line. - * @public - */ - public function setFooterData($tc=array(0,0,0), $lc=array(0,0,0)) { - $this->footer_text_color = $tc; - $this->footer_line_color = $lc; - } - - /** - * Returns header data: - *
          • $ret['logo'] = logo image
          • $ret['logo_width'] = width of the image logo in user units
          • $ret['title'] = header title
          • $ret['string'] = header description string
          - * @return array() - * @public - * @since 4.0.012 (2008-07-24) - */ - public function getHeaderData() { - $ret = array(); - $ret['logo'] = $this->header_logo; - $ret['logo_width'] = $this->header_logo_width; - $ret['title'] = $this->header_title; - $ret['string'] = $this->header_string; - $ret['text_color'] = $this->header_text_color; - $ret['line_color'] = $this->header_line_color; - return $ret; - } - - /** - * Set header margin. - * (minimum distance between header and top page margin) - * @param $hm (int) distance in user units - * @public - */ - public function setHeaderMargin($hm=10) { - $this->header_margin = $hm; - } - - /** - * Returns header margin in user units. - * @return float - * @since 4.0.012 (2008-07-24) - * @public - */ - public function getHeaderMargin() { - return $this->header_margin; - } - - /** - * Set footer margin. - * (minimum distance between footer and bottom page margin) - * @param $fm (int) distance in user units - * @public - */ - public function setFooterMargin($fm=10) { - $this->footer_margin = $fm; - } - - /** - * Returns footer margin in user units. - * @return float - * @since 4.0.012 (2008-07-24) - * @public - */ - public function getFooterMargin() { - return $this->footer_margin; - } - /** - * Set a flag to print page header. - * @param $val (boolean) set to true to print the page header (default), false otherwise. - * @public - */ - public function setPrintHeader($val=true) { - $this->print_header = $val ? true : false; - } - - /** - * Set a flag to print page footer. - * @param $val (boolean) set to true to print the page footer (default), false otherwise. - * @public - */ - public function setPrintFooter($val=true) { - $this->print_footer = $val ? true : false; - } - - /** - * Return the right-bottom (or left-bottom for RTL) corner X coordinate of last inserted image - * @return float - * @public - */ - public function getImageRBX() { - return $this->img_rb_x; - } - - /** - * Return the right-bottom (or left-bottom for RTL) corner Y coordinate of last inserted image - * @return float - * @public - */ - public function getImageRBY() { - return $this->img_rb_y; - } - - /** - * Reset the xobject template used by Header() method. - * @public - */ - public function resetHeaderTemplate() { - $this->header_xobjid = false; - } - - /** - * Set a flag to automatically reset the xobject template used by Header() method at each page. - * @param $val (boolean) set to true to reset Header xobject template at each page, false otherwise. - * @public - */ - public function setHeaderTemplateAutoreset($val=true) { - $this->header_xobj_autoreset = $val ? true : false; - } - - /** - * This method is used to render the page header. - * It is automatically called by AddPage() and could be overwritten in your own inherited class. - * @public - */ - public function Header() { - if ($this->header_xobjid === false) { - // start a new XObject Template - $this->header_xobjid = $this->startTemplate($this->w, $this->tMargin); - $headerfont = $this->getHeaderFont(); - $headerdata = $this->getHeaderData(); - $this->y = $this->header_margin; - if ($this->rtl) { - $this->x = $this->w - $this->original_rMargin; - } else { - $this->x = $this->original_lMargin; - } - if (($headerdata['logo']) AND ($headerdata['logo'] != K_BLANK_IMAGE)) { - $imgtype = TCPDF_IMAGES::getImageFileType(K_PATH_IMAGES.$headerdata['logo']); - if (($imgtype == 'eps') OR ($imgtype == 'ai')) { - $this->ImageEps(K_PATH_IMAGES.$headerdata['logo'], '', '', $headerdata['logo_width']); - } elseif ($imgtype == 'svg') { - $this->ImageSVG(K_PATH_IMAGES.$headerdata['logo'], '', '', $headerdata['logo_width']); - } else { - $this->Image(K_PATH_IMAGES.$headerdata['logo'], '', '', $headerdata['logo_width']); - } - $imgy = $this->getImageRBY(); - } else { - $imgy = $this->y; - } - $cell_height = $this->getCellHeight($headerfont[2] / $this->k); - // set starting margin for text data cell - if ($this->getRTL()) { - $header_x = $this->original_rMargin + ($headerdata['logo_width'] * 1.1); - } else { - $header_x = $this->original_lMargin + ($headerdata['logo_width'] * 1.1); - } - $cw = $this->w - $this->original_lMargin - $this->original_rMargin - ($headerdata['logo_width'] * 1.1); - $this->SetTextColorArray($this->header_text_color); - // header title - $this->SetFont($headerfont[0], 'B', $headerfont[2] + 1); - $this->SetX($header_x); - $this->Cell($cw, $cell_height, $headerdata['title'], 0, 1, '', 0, '', 0); - // header string - $this->SetFont($headerfont[0], $headerfont[1], $headerfont[2]); - $this->SetX($header_x); - $this->MultiCell($cw, $cell_height, $headerdata['string'], 0, '', 0, 1, '', '', true, 0, false, true, 0, 'T', false); - // print an ending header line - $this->SetLineStyle(array('width' => 0.85 / $this->k, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => $headerdata['line_color'])); - $this->SetY((2.835 / $this->k) + max($imgy, $this->y)); - if ($this->rtl) { - $this->SetX($this->original_rMargin); - } else { - $this->SetX($this->original_lMargin); - } - $this->Cell(($this->w - $this->original_lMargin - $this->original_rMargin), 0, '', 'T', 0, 'C'); - $this->endTemplate(); - } - // print header template - $x = 0; - $dx = 0; - if (!$this->header_xobj_autoreset AND $this->booklet AND (($this->page % 2) == 0)) { - // adjust margins for booklet mode - $dx = ($this->original_lMargin - $this->original_rMargin); - } - if ($this->rtl) { - $x = $this->w + $dx; - } else { - $x = 0 + $dx; - } - $this->printTemplate($this->header_xobjid, $x, 0, 0, 0, '', '', false); - if ($this->header_xobj_autoreset) { - // reset header xobject template at each page - $this->header_xobjid = false; - } - } - - /** - * This method is used to render the page footer. - * It is automatically called by AddPage() and could be overwritten in your own inherited class. - * @public - */ - public function Footer() { - $cur_y = $this->y; - $this->SetTextColorArray($this->footer_text_color); - //set style for cell border - $line_width = (0.85 / $this->k); - $this->SetLineStyle(array('width' => $line_width, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => $this->footer_line_color)); - //print document barcode - $barcode = $this->getBarcode(); - if (!empty($barcode)) { - $this->Ln($line_width); - $barcode_width = round(($this->w - $this->original_lMargin - $this->original_rMargin) / 3); - $style = array( - 'position' => $this->rtl?'R':'L', - 'align' => $this->rtl?'R':'L', - 'stretch' => false, - 'fitwidth' => true, - 'cellfitalign' => '', - 'border' => false, - 'padding' => 0, - 'fgcolor' => array(0,0,0), - 'bgcolor' => false, - 'text' => false - ); - $this->write1DBarcode($barcode, 'C128', '', $cur_y + $line_width, '', (($this->footer_margin / 3) - $line_width), 0.3, $style, ''); - } - $w_page = isset($this->l['w_page']) ? $this->l['w_page'].' ' : ''; - if (empty($this->pagegroups)) { - $pagenumtxt = $w_page.$this->getAliasNumPage().' / '.$this->getAliasNbPages(); - } else { - $pagenumtxt = $w_page.$this->getPageNumGroupAlias().' / '.$this->getPageGroupAlias(); - } - $this->SetY($cur_y); - //Print page number - if ($this->getRTL()) { - $this->SetX($this->original_rMargin); - $this->Cell(0, 0, $pagenumtxt, 'T', 0, 'L'); - } else { - $this->SetX($this->original_lMargin); - $this->Cell(0, 0, $this->getAliasRightShift().$pagenumtxt, 'T', 0, 'R'); - } - } - - /** - * This method is used to render the page header. - * @protected - * @since 4.0.012 (2008-07-24) - */ - protected function setHeader() { - if (!$this->print_header OR ($this->state != 2)) { - return; - } - $this->InHeader = true; - $this->setGraphicVars($this->default_graphic_vars); - $temp_thead = $this->thead; - $temp_theadMargins = $this->theadMargins; - $lasth = $this->lasth; - $newline = $this->newline; - $this->_outSaveGraphicsState(); - $this->rMargin = $this->original_rMargin; - $this->lMargin = $this->original_lMargin; - $this->SetCellPadding(0); - //set current position - if ($this->rtl) { - $this->SetXY($this->original_rMargin, $this->header_margin); - } else { - $this->SetXY($this->original_lMargin, $this->header_margin); - } - $this->SetFont($this->header_font[0], $this->header_font[1], $this->header_font[2]); - $this->Header(); - //restore position - if ($this->rtl) { - $this->SetXY($this->original_rMargin, $this->tMargin); - } else { - $this->SetXY($this->original_lMargin, $this->tMargin); - } - $this->_outRestoreGraphicsState(); - $this->lasth = $lasth; - $this->thead = $temp_thead; - $this->theadMargins = $temp_theadMargins; - $this->newline = $newline; - $this->InHeader = false; - } - - /** - * This method is used to render the page footer. - * @protected - * @since 4.0.012 (2008-07-24) - */ - protected function setFooter() { - if ($this->state != 2) { - return; - } - $this->InFooter = true; - // save current graphic settings - $gvars = $this->getGraphicVars(); - // mark this point - $this->footerpos[$this->page] = $this->pagelen[$this->page]; - $this->_out("\n"); - if ($this->print_footer) { - $this->setGraphicVars($this->default_graphic_vars); - $this->current_column = 0; - $this->num_columns = 1; - $temp_thead = $this->thead; - $temp_theadMargins = $this->theadMargins; - $lasth = $this->lasth; - $this->_outSaveGraphicsState(); - $this->rMargin = $this->original_rMargin; - $this->lMargin = $this->original_lMargin; - $this->SetCellPadding(0); - //set current position - $footer_y = $this->h - $this->footer_margin; - if ($this->rtl) { - $this->SetXY($this->original_rMargin, $footer_y); - } else { - $this->SetXY($this->original_lMargin, $footer_y); - } - $this->SetFont($this->footer_font[0], $this->footer_font[1], $this->footer_font[2]); - $this->Footer(); - //restore position - if ($this->rtl) { - $this->SetXY($this->original_rMargin, $this->tMargin); - } else { - $this->SetXY($this->original_lMargin, $this->tMargin); - } - $this->_outRestoreGraphicsState(); - $this->lasth = $lasth; - $this->thead = $temp_thead; - $this->theadMargins = $temp_theadMargins; - } - // restore graphic settings - $this->setGraphicVars($gvars); - $this->current_column = $gvars['current_column']; - $this->num_columns = $gvars['num_columns']; - // calculate footer length - $this->footerlen[$this->page] = $this->pagelen[$this->page] - $this->footerpos[$this->page] + 1; - $this->InFooter = false; - } - - /** - * Check if we are on the page body (excluding page header and footer). - * @return true if we are not in page header nor in page footer, false otherwise. - * @protected - * @since 5.9.091 (2011-06-15) - */ - protected function inPageBody() { - return (($this->InHeader === false) AND ($this->InFooter === false)); - } - - /** - * This method is used to render the table header on new page (if any). - * @protected - * @since 4.5.030 (2009-03-25) - */ - protected function setTableHeader() { - if ($this->num_columns > 1) { - // multi column mode - return; - } - if (isset($this->theadMargins['top'])) { - // restore the original top-margin - $this->tMargin = $this->theadMargins['top']; - $this->pagedim[$this->page]['tm'] = $this->tMargin; - $this->y = $this->tMargin; - } - if (!TCPDF_STATIC::empty_string($this->thead) AND (!$this->inthead)) { - // set margins - $prev_lMargin = $this->lMargin; - $prev_rMargin = $this->rMargin; - $prev_cell_padding = $this->cell_padding; - $this->lMargin = $this->theadMargins['lmargin'] + ($this->pagedim[$this->page]['olm'] - $this->pagedim[$this->theadMargins['page']]['olm']); - $this->rMargin = $this->theadMargins['rmargin'] + ($this->pagedim[$this->page]['orm'] - $this->pagedim[$this->theadMargins['page']]['orm']); - $this->cell_padding = $this->theadMargins['cell_padding']; - if ($this->rtl) { - $this->x = $this->w - $this->rMargin; - } else { - $this->x = $this->lMargin; - } - // account for special "cell" mode - if ($this->theadMargins['cell']) { - if ($this->rtl) { - $this->x -= $this->cell_padding['R']; - } else { - $this->x += $this->cell_padding['L']; - } - } - $gvars = $this->getGraphicVars(); - if (!empty($this->theadMargins['gvars'])) { - // set the correct graphic style - $this->setGraphicVars($this->theadMargins['gvars']); - $this->rMargin = $gvars['rMargin']; - $this->lMargin = $gvars['lMargin']; - } - // print table header - $this->writeHTML($this->thead, false, false, false, false, ''); - $this->setGraphicVars($gvars); - // set new top margin to skip the table headers - if (!isset($this->theadMargins['top'])) { - $this->theadMargins['top'] = $this->tMargin; - } - // store end of header position - if (!isset($this->columns[0]['th'])) { - $this->columns[0]['th'] = array(); - } - $this->columns[0]['th']['\''.$this->page.'\''] = $this->y; - $this->tMargin = $this->y; - $this->pagedim[$this->page]['tm'] = $this->tMargin; - $this->lasth = 0; - $this->lMargin = $prev_lMargin; - $this->rMargin = $prev_rMargin; - $this->cell_padding = $prev_cell_padding; - } - } - - /** - * Returns the current page number. - * @return int page number - * @public - * @since 1.0 - * @see getAliasNbPages() - */ - public function PageNo() { - return $this->page; - } - - /** - * Returns the array of spot colors. - * @return (array) Spot colors array. - * @public - * @since 6.0.038 (2013-09-30) - */ - public function getAllSpotColors() { - return $this->spot_colors; - } - - /** - * Defines a new spot color. - * It can be expressed in RGB components or gray scale. - * The method can be called before the first page is created and the value is retained from page to page. - * @param $name (string) Full name of the spot color. - * @param $c (float) Cyan color for CMYK. Value between 0 and 100. - * @param $m (float) Magenta color for CMYK. Value between 0 and 100. - * @param $y (float) Yellow color for CMYK. Value between 0 and 100. - * @param $k (float) Key (Black) color for CMYK. Value between 0 and 100. - * @public - * @since 4.0.024 (2008-09-12) - * @see SetDrawSpotColor(), SetFillSpotColor(), SetTextSpotColor() - */ - public function AddSpotColor($name, $c, $m, $y, $k) { - if (!isset($this->spot_colors[$name])) { - $i = (1 + count($this->spot_colors)); - $this->spot_colors[$name] = array('C' => $c, 'M' => $m, 'Y' => $y, 'K' => $k, 'name' => $name, 'i' => $i); - } - } - - /** - * Set the spot color for the specified type ('draw', 'fill', 'text'). - * @param $type (string) Type of object affected by this color: ('draw', 'fill', 'text'). - * @param $name (string) Name of the spot color. - * @param $tint (float) Intensity of the color (from 0 to 100 ; 100 = full intensity by default). - * @return (string) PDF color command. - * @public - * @since 5.9.125 (2011-10-03) - */ - public function setSpotColor($type, $name, $tint=100) { - $spotcolor = TCPDF_COLORS::getSpotColor($name, $this->spot_colors); - if ($spotcolor === false) { - $this->Error('Undefined spot color: '.$name.', you must add it using the AddSpotColor() method.'); - } - $tint = (max(0, min(100, $tint)) / 100); - $pdfcolor = sprintf('/CS%d ', $this->spot_colors[$name]['i']); - switch ($type) { - case 'draw': { - $pdfcolor .= sprintf('CS %F SCN', $tint); - $this->DrawColor = $pdfcolor; - $this->strokecolor = $spotcolor; - break; - } - case 'fill': { - $pdfcolor .= sprintf('cs %F scn', $tint); - $this->FillColor = $pdfcolor; - $this->bgcolor = $spotcolor; - break; - } - case 'text': { - $pdfcolor .= sprintf('cs %F scn', $tint); - $this->TextColor = $pdfcolor; - $this->fgcolor = $spotcolor; - break; - } - } - $this->ColorFlag = ($this->FillColor != $this->TextColor); - if ($this->state == 2) { - $this->_out($pdfcolor); - } - if ($this->inxobj) { - // we are inside an XObject template - $this->xobjects[$this->xobjid]['spot_colors'][$name] = $this->spot_colors[$name]; - } - return $pdfcolor; - } - - /** - * Defines the spot color used for all drawing operations (lines, rectangles and cell borders). - * @param $name (string) Name of the spot color. - * @param $tint (float) Intensity of the color (from 0 to 100 ; 100 = full intensity by default). - * @public - * @since 4.0.024 (2008-09-12) - * @see AddSpotColor(), SetFillSpotColor(), SetTextSpotColor() - */ - public function SetDrawSpotColor($name, $tint=100) { - $this->setSpotColor('draw', $name, $tint); - } - - /** - * Defines the spot color used for all filling operations (filled rectangles and cell backgrounds). - * @param $name (string) Name of the spot color. - * @param $tint (float) Intensity of the color (from 0 to 100 ; 100 = full intensity by default). - * @public - * @since 4.0.024 (2008-09-12) - * @see AddSpotColor(), SetDrawSpotColor(), SetTextSpotColor() - */ - public function SetFillSpotColor($name, $tint=100) { - $this->setSpotColor('fill', $name, $tint); - } - - /** - * Defines the spot color used for text. - * @param $name (string) Name of the spot color. - * @param $tint (int) Intensity of the color (from 0 to 100 ; 100 = full intensity by default). - * @public - * @since 4.0.024 (2008-09-12) - * @see AddSpotColor(), SetDrawSpotColor(), SetFillSpotColor() - */ - public function SetTextSpotColor($name, $tint=100) { - $this->setSpotColor('text', $name, $tint); - } - - /** - * Set the color array for the specified type ('draw', 'fill', 'text'). - * It can be expressed in RGB, CMYK or GRAY SCALE components. - * The method can be called before the first page is created and the value is retained from page to page. - * @param $type (string) Type of object affected by this color: ('draw', 'fill', 'text'). - * @param $color (array) Array of colors (1=gray, 3=RGB, 4=CMYK or 5=spotcolor=CMYK+name values). - * @param $ret (boolean) If true do not send the PDF command. - * @return (string) The PDF command or empty string. - * @public - * @since 3.1.000 (2008-06-11) - */ - public function setColorArray($type, $color, $ret=false) { - if (is_array($color)) { - $color = array_values($color); - // component: grey, RGB red or CMYK cyan - $c = isset($color[0]) ? $color[0] : -1; - // component: RGB green or CMYK magenta - $m = isset($color[1]) ? $color[1] : -1; - // component: RGB blue or CMYK yellow - $y = isset($color[2]) ? $color[2] : -1; - // component: CMYK black - $k = isset($color[3]) ? $color[3] : -1; - // color name - $name = isset($color[4]) ? $color[4] : ''; - if ($c >= 0) { - return $this->setColor($type, $c, $m, $y, $k, $ret, $name); - } - } - return ''; - } - - /** - * Defines the color used for all drawing operations (lines, rectangles and cell borders). - * It can be expressed in RGB, CMYK or GRAY SCALE components. - * The method can be called before the first page is created and the value is retained from page to page. - * @param $color (array) Array of colors (1, 3 or 4 values). - * @param $ret (boolean) If true do not send the PDF command. - * @return string the PDF command - * @public - * @since 3.1.000 (2008-06-11) - * @see SetDrawColor() - */ - public function SetDrawColorArray($color, $ret=false) { - return $this->setColorArray('draw', $color, $ret); - } - - /** - * Defines the color used for all filling operations (filled rectangles and cell backgrounds). - * It can be expressed in RGB, CMYK or GRAY SCALE components. - * The method can be called before the first page is created and the value is retained from page to page. - * @param $color (array) Array of colors (1, 3 or 4 values). - * @param $ret (boolean) If true do not send the PDF command. - * @public - * @since 3.1.000 (2008-6-11) - * @see SetFillColor() - */ - public function SetFillColorArray($color, $ret=false) { - return $this->setColorArray('fill', $color, $ret); - } - - /** - * Defines the color used for text. It can be expressed in RGB components or gray scale. - * The method can be called before the first page is created and the value is retained from page to page. - * @param $color (array) Array of colors (1, 3 or 4 values). - * @param $ret (boolean) If true do not send the PDF command. - * @public - * @since 3.1.000 (2008-6-11) - * @see SetFillColor() - */ - public function SetTextColorArray($color, $ret=false) { - return $this->setColorArray('text', $color, $ret); - } - - /** - * Defines the color used by the specified type ('draw', 'fill', 'text'). - * @param $type (string) Type of object affected by this color: ('draw', 'fill', 'text'). - * @param $col1 (float) GRAY level for single color, or Red color for RGB (0-255), or CYAN color for CMYK (0-100). - * @param $col2 (float) GREEN color for RGB (0-255), or MAGENTA color for CMYK (0-100). - * @param $col3 (float) BLUE color for RGB (0-255), or YELLOW color for CMYK (0-100). - * @param $col4 (float) KEY (BLACK) color for CMYK (0-100). - * @param $ret (boolean) If true do not send the command. - * @param $name (string) spot color name (if any) - * @return (string) The PDF command or empty string. - * @public - * @since 5.9.125 (2011-10-03) - */ - public function setColor($type, $col1=0, $col2=-1, $col3=-1, $col4=-1, $ret=false, $name='') { - // set default values - if (!is_numeric($col1)) { - $col1 = 0; - } - if (!is_numeric($col2)) { - $col2 = -1; - } - if (!is_numeric($col3)) { - $col3 = -1; - } - if (!is_numeric($col4)) { - $col4 = -1; - } - // set color by case - $suffix = ''; - if (($col2 == -1) AND ($col3 == -1) AND ($col4 == -1)) { - // Grey scale - $col1 = max(0, min(255, $col1)); - $intcolor = array('G' => $col1); - $pdfcolor = sprintf('%F ', ($col1 / 255)); - $suffix = 'g'; - } elseif ($col4 == -1) { - // RGB - $col1 = max(0, min(255, $col1)); - $col2 = max(0, min(255, $col2)); - $col3 = max(0, min(255, $col3)); - $intcolor = array('R' => $col1, 'G' => $col2, 'B' => $col3); - $pdfcolor = sprintf('%F %F %F ', ($col1 / 255), ($col2 / 255), ($col3 / 255)); - $suffix = 'rg'; - } else { - $col1 = max(0, min(100, $col1)); - $col2 = max(0, min(100, $col2)); - $col3 = max(0, min(100, $col3)); - $col4 = max(0, min(100, $col4)); - if (empty($name)) { - // CMYK - $intcolor = array('C' => $col1, 'M' => $col2, 'Y' => $col3, 'K' => $col4); - $pdfcolor = sprintf('%F %F %F %F ', ($col1 / 100), ($col2 / 100), ($col3 / 100), ($col4 / 100)); - $suffix = 'k'; - } else { - // SPOT COLOR - $intcolor = array('C' => $col1, 'M' => $col2, 'Y' => $col3, 'K' => $col4, 'name' => $name); - $this->AddSpotColor($name, $col1, $col2, $col3, $col4); - $pdfcolor = $this->setSpotColor($type, $name, 100); - } - } - switch ($type) { - case 'draw': { - $pdfcolor .= strtoupper($suffix); - $this->DrawColor = $pdfcolor; - $this->strokecolor = $intcolor; - break; - } - case 'fill': { - $pdfcolor .= $suffix; - $this->FillColor = $pdfcolor; - $this->bgcolor = $intcolor; - break; - } - case 'text': { - $pdfcolor .= $suffix; - $this->TextColor = $pdfcolor; - $this->fgcolor = $intcolor; - break; - } - } - $this->ColorFlag = ($this->FillColor != $this->TextColor); - if (($type != 'text') AND ($this->state == 2)) { - if (!$ret) { - $this->_out($pdfcolor); - } - return $pdfcolor; - } - return ''; - } - - /** - * Defines the color used for all drawing operations (lines, rectangles and cell borders). It can be expressed in RGB components or gray scale. The method can be called before the first page is created and the value is retained from page to page. - * @param $col1 (float) GRAY level for single color, or Red color for RGB (0-255), or CYAN color for CMYK (0-100). - * @param $col2 (float) GREEN color for RGB (0-255), or MAGENTA color for CMYK (0-100). - * @param $col3 (float) BLUE color for RGB (0-255), or YELLOW color for CMYK (0-100). - * @param $col4 (float) KEY (BLACK) color for CMYK (0-100). - * @param $ret (boolean) If true do not send the command. - * @param $name (string) spot color name (if any) - * @return string the PDF command - * @public - * @since 1.3 - * @see SetDrawColorArray(), SetFillColor(), SetTextColor(), Line(), Rect(), Cell(), MultiCell() - */ - public function SetDrawColor($col1=0, $col2=-1, $col3=-1, $col4=-1, $ret=false, $name='') { - return $this->setColor('draw', $col1, $col2, $col3, $col4, $ret, $name); - } - - /** - * Defines the color used for all filling operations (filled rectangles and cell backgrounds). It can be expressed in RGB components or gray scale. The method can be called before the first page is created and the value is retained from page to page. - * @param $col1 (float) GRAY level for single color, or Red color for RGB (0-255), or CYAN color for CMYK (0-100). - * @param $col2 (float) GREEN color for RGB (0-255), or MAGENTA color for CMYK (0-100). - * @param $col3 (float) BLUE color for RGB (0-255), or YELLOW color for CMYK (0-100). - * @param $col4 (float) KEY (BLACK) color for CMYK (0-100). - * @param $ret (boolean) If true do not send the command. - * @param $name (string) Spot color name (if any). - * @return (string) The PDF command. - * @public - * @since 1.3 - * @see SetFillColorArray(), SetDrawColor(), SetTextColor(), Rect(), Cell(), MultiCell() - */ - public function SetFillColor($col1=0, $col2=-1, $col3=-1, $col4=-1, $ret=false, $name='') { - return $this->setColor('fill', $col1, $col2, $col3, $col4, $ret, $name); - } - - /** - * Defines the color used for text. It can be expressed in RGB components or gray scale. The method can be called before the first page is created and the value is retained from page to page. - * @param $col1 (float) GRAY level for single color, or Red color for RGB (0-255), or CYAN color for CMYK (0-100). - * @param $col2 (float) GREEN color for RGB (0-255), or MAGENTA color for CMYK (0-100). - * @param $col3 (float) BLUE color for RGB (0-255), or YELLOW color for CMYK (0-100). - * @param $col4 (float) KEY (BLACK) color for CMYK (0-100). - * @param $ret (boolean) If true do not send the command. - * @param $name (string) Spot color name (if any). - * @return (string) Empty string. - * @public - * @since 1.3 - * @see SetTextColorArray(), SetDrawColor(), SetFillColor(), Text(), Cell(), MultiCell() - */ - public function SetTextColor($col1=0, $col2=-1, $col3=-1, $col4=-1, $ret=false, $name='') { - return $this->setColor('text', $col1, $col2, $col3, $col4, $ret, $name); - } - - /** - * Returns the length of a string in user unit. A font must be selected.
          - * @param $s (string) The string whose length is to be computed - * @param $fontname (string) Family font. It can be either a name defined by AddFont() or one of the standard families. It is also possible to pass an empty string, in that case, the current family is retained. - * @param $fontstyle (string) Font style. Possible values are (case insensitive):
          • empty string: regular
          • B: bold
          • I: italic
          • U: underline
          • D: line-through
          • O: overline
          or any combination. The default value is regular. - * @param $fontsize (float) Font size in points. The default value is the current size. - * @param $getarray (boolean) if true returns an array of characters widths, if false returns the total length. - * @return mixed int total string length or array of characted widths - * @author Nicola Asuni - * @public - * @since 1.2 - */ - public function GetStringWidth($s, $fontname='', $fontstyle='', $fontsize=0, $getarray=false) { - return $this->GetArrStringWidth(TCPDF_FONTS::utf8Bidi(TCPDF_FONTS::UTF8StringToArray($s, $this->isunicode, $this->CurrentFont), $s, $this->tmprtl, $this->isunicode, $this->CurrentFont), $fontname, $fontstyle, $fontsize, $getarray); - } - - /** - * Returns the string length of an array of chars in user unit or an array of characters widths. A font must be selected.
          - * @param $sa (string) The array of chars whose total length is to be computed - * @param $fontname (string) Family font. It can be either a name defined by AddFont() or one of the standard families. It is also possible to pass an empty string, in that case, the current family is retained. - * @param $fontstyle (string) Font style. Possible values are (case insensitive):
          • empty string: regular
          • B: bold
          • I: italic
          • U: underline
          • D: line through
          • O: overline
          or any combination. The default value is regular. - * @param $fontsize (float) Font size in points. The default value is the current size. - * @param $getarray (boolean) if true returns an array of characters widths, if false returns the total length. - * @return mixed int total string length or array of characted widths - * @author Nicola Asuni - * @public - * @since 2.4.000 (2008-03-06) - */ - public function GetArrStringWidth($sa, $fontname='', $fontstyle='', $fontsize=0, $getarray=false) { - // store current values - if (!TCPDF_STATIC::empty_string($fontname)) { - $prev_FontFamily = $this->FontFamily; - $prev_FontStyle = $this->FontStyle; - $prev_FontSizePt = $this->FontSizePt; - $this->SetFont($fontname, $fontstyle, $fontsize, '', 'default', false); - } - // convert UTF-8 array to Latin1 if required - if ($this->isunicode AND (!$this->isUnicodeFont())) { - $sa = TCPDF_FONTS::UTF8ArrToLatin1Arr($sa); - } - $w = 0; // total width - $wa = array(); // array of characters widths - foreach ($sa as $ck => $char) { - // character width - $cw = $this->GetCharWidth($char, isset($sa[($ck + 1)])); - $wa[] = $cw; - $w += $cw; - } - // restore previous values - if (!TCPDF_STATIC::empty_string($fontname)) { - $this->SetFont($prev_FontFamily, $prev_FontStyle, $prev_FontSizePt, '', 'default', false); - } - if ($getarray) { - return $wa; - } - return $w; - } - - /** - * Returns the length of the char in user unit for the current font considering current stretching and spacing (tracking). - * @param $char (int) The char code whose length is to be returned - * @param $notlast (boolean) If false ignore the font-spacing. - * @return float char width - * @author Nicola Asuni - * @public - * @since 2.4.000 (2008-03-06) - */ - public function GetCharWidth($char, $notlast=true) { - // get raw width - $chw = $this->getRawCharWidth($char); - if (($this->font_spacing < 0) OR (($this->font_spacing > 0) AND $notlast)) { - // increase/decrease font spacing - $chw += $this->font_spacing; - } - if ($this->font_stretching != 100) { - // fixed stretching mode - $chw *= ($this->font_stretching / 100); - } - return $chw; - } - - /** - * Returns the length of the char in user unit for the current font. - * @param $char (int) The char code whose length is to be returned - * @return float char width - * @author Nicola Asuni - * @public - * @since 5.9.000 (2010-09-28) - */ - public function getRawCharWidth($char) { - if ($char == 173) { - // SHY character will not be printed - return (0); - } - if (isset($this->CurrentFont['cw'][$char])) { - $w = $this->CurrentFont['cw'][$char]; - } elseif (isset($this->CurrentFont['dw'])) { - // default width - $w = $this->CurrentFont['dw']; - } elseif (isset($this->CurrentFont['cw'][32])) { - // default width - $w = $this->CurrentFont['cw'][32]; - } else { - $w = 600; - } - return $this->getAbsFontMeasure($w); - } - - /** - * Returns the numbero of characters in a string. - * @param $s (string) The input string. - * @return int number of characters - * @public - * @since 2.0.0001 (2008-01-07) - */ - public function GetNumChars($s) { - if ($this->isUnicodeFont()) { - return count(TCPDF_FONTS::UTF8StringToArray($s, $this->isunicode, $this->CurrentFont)); - } - return strlen($s); - } - - /** - * Fill the list of available fonts ($this->fontlist). - * @protected - * @since 4.0.013 (2008-07-28) - */ - protected function getFontsList() { - if (($fontsdir = opendir(TCPDF_FONTS::_getfontpath())) !== false) { - while (($file = readdir($fontsdir)) !== false) { - if (substr($file, -4) == '.php') { - array_push($this->fontlist, strtolower(basename($file, '.php'))); - } - } - closedir($fontsdir); - } - } - - /** - * Imports a TrueType, Type1, core, or CID0 font and makes it available. - * It is necessary to generate a font definition file first (read /fonts/utils/README.TXT). - * The definition file (and the font file itself when embedding) must be present either in the current directory or in the one indicated by K_PATH_FONTS if the constant is defined. If it could not be found, the error "Could not include font definition file" is generated. - * @param $family (string) Font family. The name can be chosen arbitrarily. If it is a standard family name, it will override the corresponding font. - * @param $style (string) Font style. Possible values are (case insensitive):
          • empty string: regular (default)
          • B: bold
          • I: italic
          • BI or IB: bold italic
          - * @param $fontfile (string) The font definition file. By default, the name is built from the family and style, in lower case with no spaces. - * @return array containing the font data, or false in case of error. - * @param $subset (mixed) if true embedd only a subset of the font (stores only the information related to the used characters); if false embedd full font; if 'default' uses the default value set using setFontSubsetting(). This option is valid only for TrueTypeUnicode fonts. If you want to enable users to change the document, set this parameter to false. If you subset the font, the person who receives your PDF would need to have your same font in order to make changes to your PDF. The file size of the PDF would also be smaller because you are embedding only part of a font. - * @public - * @since 1.5 - * @see SetFont(), setFontSubsetting() - */ - public function AddFont($family, $style='', $fontfile='', $subset='default') { - if ($subset === 'default') { - $subset = $this->font_subsetting; - } - if ($this->pdfa_mode) { - $subset = false; - } - if (TCPDF_STATIC::empty_string($family)) { - if (!TCPDF_STATIC::empty_string($this->FontFamily)) { - $family = $this->FontFamily; - } else { - $this->Error('Empty font family'); - } - } - // move embedded styles on $style - if (substr($family, -1) == 'I') { - $style .= 'I'; - $family = substr($family, 0, -1); - } - if (substr($family, -1) == 'B') { - $style .= 'B'; - $family = substr($family, 0, -1); - } - // normalize family name - $family = strtolower($family); - if ((!$this->isunicode) AND ($family == 'arial')) { - $family = 'helvetica'; - } - if (($family == 'symbol') OR ($family == 'zapfdingbats')) { - $style = ''; - } - if ($this->pdfa_mode AND (isset($this->CoreFonts[$family]))) { - // all fonts must be embedded - $family = 'pdfa'.$family; - } - $tempstyle = strtoupper($style); - $style = ''; - // underline - if (strpos($tempstyle, 'U') !== false) { - $this->underline = true; - } else { - $this->underline = false; - } - // line-through (deleted) - if (strpos($tempstyle, 'D') !== false) { - $this->linethrough = true; - } else { - $this->linethrough = false; - } - // overline - if (strpos($tempstyle, 'O') !== false) { - $this->overline = true; - } else { - $this->overline = false; - } - // bold - if (strpos($tempstyle, 'B') !== false) { - $style .= 'B'; - } - // oblique - if (strpos($tempstyle, 'I') !== false) { - $style .= 'I'; - } - $bistyle = $style; - $fontkey = $family.$style; - $font_style = $style.($this->underline ? 'U' : '').($this->linethrough ? 'D' : '').($this->overline ? 'O' : ''); - $fontdata = array('fontkey' => $fontkey, 'family' => $family, 'style' => $font_style); - // check if the font has been already added - $fb = $this->getFontBuffer($fontkey); - if ($fb !== false) { - if ($this->inxobj) { - // we are inside an XObject template - $this->xobjects[$this->xobjid]['fonts'][$fontkey] = $fb['i']; - } - return $fontdata; - } - // get specified font directory (if any) - $fontdir = false; - if (!TCPDF_STATIC::empty_string($fontfile)) { - $fontdir = dirname($fontfile); - if (TCPDF_STATIC::empty_string($fontdir) OR ($fontdir == '.')) { - $fontdir = ''; - } else { - $fontdir .= '/'; - } - } - // true when the font style variation is missing - $missing_style = false; - // search and include font file - if (TCPDF_STATIC::empty_string($fontfile) OR (!@file_exists($fontfile))) { - // build a standard filenames for specified font - $tmp_fontfile = str_replace(' ', '', $family).strtolower($style).'.php'; - $fontfile = TCPDF_FONTS::getFontFullPath($tmp_fontfile, $fontdir); - if (TCPDF_STATIC::empty_string($fontfile)) { - $missing_style = true; - // try to remove the style part - $tmp_fontfile = str_replace(' ', '', $family).'.php'; - $fontfile = TCPDF_FONTS::getFontFullPath($tmp_fontfile, $fontdir); - } - } - // include font file - if (!TCPDF_STATIC::empty_string($fontfile) AND (@file_exists($fontfile))) { - include($fontfile); - } else { - $this->Error('Could not include font definition file: '.$family.''); - } - // check font parameters - if ((!isset($type)) OR (!isset($cw))) { - $this->Error('The font definition file has a bad format: '.$fontfile.''); - } - // SET default parameters - if (!isset($file) OR TCPDF_STATIC::empty_string($file)) { - $file = ''; - } - if (!isset($enc) OR TCPDF_STATIC::empty_string($enc)) { - $enc = ''; - } - if (!isset($cidinfo) OR TCPDF_STATIC::empty_string($cidinfo)) { - $cidinfo = array('Registry'=>'Adobe', 'Ordering'=>'Identity', 'Supplement'=>0); - $cidinfo['uni2cid'] = array(); - } - if (!isset($ctg) OR TCPDF_STATIC::empty_string($ctg)) { - $ctg = ''; - } - if (!isset($desc) OR TCPDF_STATIC::empty_string($desc)) { - $desc = array(); - } - if (!isset($up) OR TCPDF_STATIC::empty_string($up)) { - $up = -100; - } - if (!isset($ut) OR TCPDF_STATIC::empty_string($ut)) { - $ut = 50; - } - if (!isset($cw) OR TCPDF_STATIC::empty_string($cw)) { - $cw = array(); - } - if (!isset($dw) OR TCPDF_STATIC::empty_string($dw)) { - // set default width - if (isset($desc['MissingWidth']) AND ($desc['MissingWidth'] > 0)) { - $dw = $desc['MissingWidth']; - } elseif (isset($cw[32])) { - $dw = $cw[32]; - } else { - $dw = 600; - } - } - ++$this->numfonts; - if ($type == 'core') { - $name = $this->CoreFonts[$fontkey]; - $subset = false; - } elseif (($type == 'TrueType') OR ($type == 'Type1')) { - $subset = false; - } elseif ($type == 'TrueTypeUnicode') { - $enc = 'Identity-H'; - } elseif ($type == 'cidfont0') { - if ($this->pdfa_mode) { - $this->Error('All fonts must be embedded in PDF/A mode!'); - } - } else { - $this->Error('Unknow font type: '.$type.''); - } - // set name if unset - if (!isset($name) OR empty($name)) { - $name = $fontkey; - } - // create artificial font style variations if missing (only works with non-embedded fonts) - if (($type != 'core') AND $missing_style) { - // style variations - $styles = array('' => '', 'B' => ',Bold', 'I' => ',Italic', 'BI' => ',BoldItalic'); - $name .= $styles[$bistyle]; - // artificial bold - if (strpos($bistyle, 'B') !== false) { - if (isset($desc['StemV'])) { - // from normal to bold - $desc['StemV'] = round($desc['StemV'] * 1.75); - } else { - // bold - $desc['StemV'] = 123; - } - } - // artificial italic - if (strpos($bistyle, 'I') !== false) { - if (isset($desc['ItalicAngle'])) { - $desc['ItalicAngle'] -= 11; - } else { - $desc['ItalicAngle'] = -11; - } - if (isset($desc['Flags'])) { - $desc['Flags'] |= 64; //bit 7 - } else { - $desc['Flags'] = 64; - } - } - } - // check if the array of characters bounding boxes is defined - if (!isset($cbbox)) { - $cbbox = array(); - } - // initialize subsetchars - $subsetchars = array_fill(0, 255, true); - $this->setFontBuffer($fontkey, array('fontkey' => $fontkey, 'i' => $this->numfonts, 'type' => $type, 'name' => $name, 'desc' => $desc, 'up' => $up, 'ut' => $ut, 'cw' => $cw, 'cbbox' => $cbbox, 'dw' => $dw, 'enc' => $enc, 'cidinfo' => $cidinfo, 'file' => $file, 'ctg' => $ctg, 'subset' => $subset, 'subsetchars' => $subsetchars)); - if ($this->inxobj) { - // we are inside an XObject template - $this->xobjects[$this->xobjid]['fonts'][$fontkey] = $this->numfonts; - } - if (isset($diff) AND (!empty($diff))) { - //Search existing encodings - $d = 0; - $nb = count($this->diffs); - for ($i=1; $i <= $nb; ++$i) { - if ($this->diffs[$i] == $diff) { - $d = $i; - break; - } - } - if ($d == 0) { - $d = $nb + 1; - $this->diffs[$d] = $diff; - } - $this->setFontSubBuffer($fontkey, 'diff', $d); - } - if (!TCPDF_STATIC::empty_string($file)) { - if (!isset($this->FontFiles[$file])) { - if ((strcasecmp($type,'TrueType') == 0) OR (strcasecmp($type, 'TrueTypeUnicode') == 0)) { - $this->FontFiles[$file] = array('length1' => $originalsize, 'fontdir' => $fontdir, 'subset' => $subset, 'fontkeys' => array($fontkey)); - } elseif ($type != 'core') { - $this->FontFiles[$file] = array('length1' => $size1, 'length2' => $size2, 'fontdir' => $fontdir, 'subset' => $subset, 'fontkeys' => array($fontkey)); - } - } else { - // update fontkeys that are sharing this font file - $this->FontFiles[$file]['subset'] = ($this->FontFiles[$file]['subset'] AND $subset); - if (!in_array($fontkey, $this->FontFiles[$file]['fontkeys'])) { - $this->FontFiles[$file]['fontkeys'][] = $fontkey; - } - } - } - return $fontdata; - } - - /** - * Sets the font used to print character strings. - * The font can be either a standard one or a font added via the AddFont() method. Standard fonts use Windows encoding cp1252 (Western Europe). - * The method can be called before the first page is created and the font is retained from page to page. - * If you just wish to change the current font size, it is simpler to call SetFontSize(). - * Note: for the standard fonts, the font metric files must be accessible. There are three possibilities for this:
          • They are in the current directory (the one where the running script lies)
          • They are in one of the directories defined by the include_path parameter
          • They are in the directory defined by the K_PATH_FONTS constant

          - * @param $family (string) Family font. It can be either a name defined by AddFont() or one of the standard Type1 families (case insensitive):
          • times (Times-Roman)
          • timesb (Times-Bold)
          • timesi (Times-Italic)
          • timesbi (Times-BoldItalic)
          • helvetica (Helvetica)
          • helveticab (Helvetica-Bold)
          • helveticai (Helvetica-Oblique)
          • helveticabi (Helvetica-BoldOblique)
          • courier (Courier)
          • courierb (Courier-Bold)
          • courieri (Courier-Oblique)
          • courierbi (Courier-BoldOblique)
          • symbol (Symbol)
          • zapfdingbats (ZapfDingbats)
          It is also possible to pass an empty string. In that case, the current family is retained. - * @param $style (string) Font style. Possible values are (case insensitive):
          • empty string: regular
          • B: bold
          • I: italic
          • U: underline
          • D: line through
          • O: overline
          or any combination. The default value is regular. Bold and italic styles do not apply to Symbol and ZapfDingbats basic fonts or other fonts when not defined. - * @param $size (float) Font size in points. The default value is the current size. If no size has been specified since the beginning of the document, the value taken is 12 - * @param $fontfile (string) The font definition file. By default, the name is built from the family and style, in lower case with no spaces. - * @param $subset (mixed) if true embedd only a subset of the font (stores only the information related to the used characters); if false embedd full font; if 'default' uses the default value set using setFontSubsetting(). This option is valid only for TrueTypeUnicode fonts. If you want to enable users to change the document, set this parameter to false. If you subset the font, the person who receives your PDF would need to have your same font in order to make changes to your PDF. The file size of the PDF would also be smaller because you are embedding only part of a font. - * @param $out (boolean) if true output the font size command, otherwise only set the font properties. - * @author Nicola Asuni - * @public - * @since 1.0 - * @see AddFont(), SetFontSize() - */ - public function SetFont($family, $style='', $size=null, $fontfile='', $subset='default', $out=true) { - //Select a font; size given in points - if ($size === null) { - $size = $this->FontSizePt; - } - if ($size < 0) { - $size = 0; - } - // try to add font (if not already added) - $fontdata = $this->AddFont($family, $style, $fontfile, $subset); - $this->FontFamily = $fontdata['family']; - $this->FontStyle = $fontdata['style']; - if (isset($this->CurrentFont['fontkey']) AND isset($this->CurrentFont['subsetchars'])) { - // save subset chars of the previous font - $this->setFontSubBuffer($this->CurrentFont['fontkey'], 'subsetchars', $this->CurrentFont['subsetchars']); - } - $this->CurrentFont = $this->getFontBuffer($fontdata['fontkey']); - $this->SetFontSize($size, $out); - } - - /** - * Defines the size of the current font. - * @param $size (float) The font size in points. - * @param $out (boolean) if true output the font size command, otherwise only set the font properties. - * @public - * @since 1.0 - * @see SetFont() - */ - public function SetFontSize($size, $out=true) { - // font size in points - $this->FontSizePt = $size; - // font size in user units - $this->FontSize = $size / $this->k; - // calculate some font metrics - if (isset($this->CurrentFont['desc']['FontBBox'])) { - $bbox = explode(' ', substr($this->CurrentFont['desc']['FontBBox'], 1, -1)); - $font_height = ((intval($bbox[3]) - intval($bbox[1])) * $size / 1000); - } else { - $font_height = $size * 1.219; - } - if (isset($this->CurrentFont['desc']['Ascent']) AND ($this->CurrentFont['desc']['Ascent'] > 0)) { - $font_ascent = ($this->CurrentFont['desc']['Ascent'] * $size / 1000); - } - if (isset($this->CurrentFont['desc']['Descent']) AND ($this->CurrentFont['desc']['Descent'] <= 0)) { - $font_descent = (- $this->CurrentFont['desc']['Descent'] * $size / 1000); - } - if (!isset($font_ascent) AND !isset($font_descent)) { - // core font - $font_ascent = 0.76 * $font_height; - $font_descent = $font_height - $font_ascent; - } elseif (!isset($font_descent)) { - $font_descent = $font_height - $font_ascent; - } elseif (!isset($font_ascent)) { - $font_ascent = $font_height - $font_descent; - } - $this->FontAscent = ($font_ascent / $this->k); - $this->FontDescent = ($font_descent / $this->k); - if ($out AND ($this->page > 0) AND (isset($this->CurrentFont['i'])) AND ($this->state == 2)) { - $this->_out(sprintf('BT /F%d %F Tf ET', $this->CurrentFont['i'], $this->FontSizePt)); - } - } - - /** - * Returns the bounding box of the current font in user units. - * @return array - * @public - * @since 5.9.152 (2012-03-23) - */ - public function getFontBBox() { - $fbbox = array(); - if (isset($this->CurrentFont['desc']['FontBBox'])) { - $tmpbbox = explode(' ', substr($this->CurrentFont['desc']['FontBBox'], 1, -1)); - $fbbox = array_map(array($this,'getAbsFontMeasure'), $tmpbbox); - } else { - // Find max width - if (isset($this->CurrentFont['desc']['MaxWidth'])) { - $maxw = $this->getAbsFontMeasure(intval($this->CurrentFont['desc']['MaxWidth'])); - } else { - $maxw = 0; - if (isset($this->CurrentFont['desc']['MissingWidth'])) { - $maxw = max($maxw, $this->CurrentFont['desc']['MissingWidth']); - } - if (isset($this->CurrentFont['desc']['AvgWidth'])) { - $maxw = max($maxw, $this->CurrentFont['desc']['AvgWidth']); - } - if (isset($this->CurrentFont['dw'])) { - $maxw = max($maxw, $this->CurrentFont['dw']); - } - foreach ($this->CurrentFont['cw'] as $char => $w) { - $maxw = max($maxw, $w); - } - if ($maxw == 0) { - $maxw = 600; - } - $maxw = $this->getAbsFontMeasure($maxw); - } - $fbbox = array(0, (0 - $this->FontDescent), $maxw, $this->FontAscent); - } - return $fbbox; - } - - /** - * Convert a relative font measure into absolute value. - * @param $s (int) Font measure. - * @return float Absolute measure. - * @since 5.9.186 (2012-09-13) - */ - public function getAbsFontMeasure($s) { - return ($s * $this->FontSize / 1000); - } - - /** - * Returns the glyph bounding box of the specified character in the current font in user units. - * @param $char (int) Input character code. - * @return mixed array(xMin, yMin, xMax, yMax) or FALSE if not defined. - * @since 5.9.186 (2012-09-13) - */ - public function getCharBBox($char) { - $c = intval($char); - if (isset($this->CurrentFont['cw'][$c])) { - // glyph is defined ... use zero width & height for glyphs without outlines - $result = array(0,0,0,0); - if (isset($this->CurrentFont['cbbox'][$c])) { - $result = $this->CurrentFont['cbbox'][$c]; - } - return array_map(array($this,'getAbsFontMeasure'), $result); - } - return false; - } - - /** - * Return the font descent value - * @param $font (string) font name - * @param $style (string) font style - * @param $size (float) The size (in points) - * @return int font descent - * @public - * @author Nicola Asuni - * @since 4.9.003 (2010-03-30) - */ - public function getFontDescent($font, $style='', $size=0) { - $fontdata = $this->AddFont($font, $style); - $fontinfo = $this->getFontBuffer($fontdata['fontkey']); - if (isset($fontinfo['desc']['Descent']) AND ($fontinfo['desc']['Descent'] <= 0)) { - $descent = (- $fontinfo['desc']['Descent'] * $size / 1000); - } else { - $descent = (1.219 * 0.24 * $size); - } - return ($descent / $this->k); - } - - /** - * Return the font ascent value. - * @param $font (string) font name - * @param $style (string) font style - * @param $size (float) The size (in points) - * @return int font ascent - * @public - * @author Nicola Asuni - * @since 4.9.003 (2010-03-30) - */ - public function getFontAscent($font, $style='', $size=0) { - $fontdata = $this->AddFont($font, $style); - $fontinfo = $this->getFontBuffer($fontdata['fontkey']); - if (isset($fontinfo['desc']['Ascent']) AND ($fontinfo['desc']['Ascent'] > 0)) { - $ascent = ($fontinfo['desc']['Ascent'] * $size / 1000); - } else { - $ascent = 1.219 * 0.76 * $size; - } - return ($ascent / $this->k); - } - - /** - * Return true in the character is present in the specified font. - * @param $char (mixed) Character to check (integer value or string) - * @param $font (string) Font name (family name). - * @param $style (string) Font style. - * @return (boolean) true if the char is defined, false otherwise. - * @public - * @since 5.9.153 (2012-03-28) - */ - public function isCharDefined($char, $font='', $style='') { - if (is_string($char)) { - // get character code - $char = TCPDF_FONTS::UTF8StringToArray($char, $this->isunicode, $this->CurrentFont); - $char = $char[0]; - } - if (TCPDF_STATIC::empty_string($font)) { - if (TCPDF_STATIC::empty_string($style)) { - return (isset($this->CurrentFont['cw'][intval($char)])); - } - $font = $this->FontFamily; - } - $fontdata = $this->AddFont($font, $style); - $fontinfo = $this->getFontBuffer($fontdata['fontkey']); - return (isset($fontinfo['cw'][intval($char)])); - } - - /** - * Replace missing font characters on selected font with specified substitutions. - * @param $text (string) Text to process. - * @param $font (string) Font name (family name). - * @param $style (string) Font style. - * @param $subs (array) Array of possible character substitutions. The key is the character to check (integer value) and the value is a single intege value or an array of possible substitutes. - * @return (string) Processed text. - * @public - * @since 5.9.153 (2012-03-28) - */ - public function replaceMissingChars($text, $font='', $style='', $subs=array()) { - if (empty($subs)) { - return $text; - } - if (TCPDF_STATIC::empty_string($font)) { - $font = $this->FontFamily; - } - $fontdata = $this->AddFont($font, $style); - $fontinfo = $this->getFontBuffer($fontdata['fontkey']); - $uniarr = TCPDF_FONTS::UTF8StringToArray($text, $this->isunicode, $this->CurrentFont); - foreach ($uniarr as $k => $chr) { - if (!isset($fontinfo['cw'][$chr])) { - // this character is missing on the selected font - if (isset($subs[$chr])) { - // we have available substitutions - if (is_array($subs[$chr])) { - foreach($subs[$chr] as $s) { - if (isset($fontinfo['cw'][$s])) { - $uniarr[$k] = $s; - break; - } - } - } elseif (isset($fontinfo['cw'][$subs[$chr]])) { - $uniarr[$k] = $subs[$chr]; - } - } - } - } - return TCPDF_FONTS::UniArrSubString(TCPDF_FONTS::UTF8ArrayToUniArray($uniarr, $this->isunicode)); - } - - /** - * Defines the default monospaced font. - * @param $font (string) Font name. - * @public - * @since 4.5.025 - */ - public function SetDefaultMonospacedFont($font) { - $this->default_monospaced_font = $font; - } - - /** - * Creates a new internal link and returns its identifier. An internal link is a clickable area which directs to another place within the document.
          - * The identifier can then be passed to Cell(), Write(), Image() or Link(). The destination is defined with SetLink(). - * @public - * @since 1.5 - * @see Cell(), Write(), Image(), Link(), SetLink() - */ - public function AddLink() { - // create a new internal link - $n = count($this->links) + 1; - $this->links[$n] = array('p' => 0, 'y' => 0, 'f' => false); - return $n; - } - - /** - * Defines the page and position a link points to. - * @param $link (int) The link identifier returned by AddLink() - * @param $y (float) Ordinate of target position; -1 indicates the current position. The default value is 0 (top of page) - * @param $page (int) Number of target page; -1 indicates the current page (default value). If you prefix a page number with the * character, then this page will not be changed when adding/deleting/moving pages. - * @public - * @since 1.5 - * @see AddLink() - */ - public function SetLink($link, $y=0, $page=-1) { - $fixed = false; - if (!empty($page) AND ($page[0] == '*')) { - $page = intval(substr($page, 1)); - // this page number will not be changed when moving/add/deleting pages - $fixed = true; - } - if ($page < 0) { - $page = $this->page; - } - if ($y == -1) { - $y = $this->y; - } - $this->links[$link] = array('p' => $page, 'y' => $y, 'f' => $fixed); - } - - /** - * Puts a link on a rectangular area of the page. - * Text or image links are generally put via Cell(), Write() or Image(), but this method can be useful for instance to define a clickable area inside an image. - * @param $x (float) Abscissa of the upper-left corner of the rectangle - * @param $y (float) Ordinate of the upper-left corner of the rectangle - * @param $w (float) Width of the rectangle - * @param $h (float) Height of the rectangle - * @param $link (mixed) URL or identifier returned by AddLink() - * @param $spaces (int) number of spaces on the text to link - * @public - * @since 1.5 - * @see AddLink(), Annotation(), Cell(), Write(), Image() - */ - public function Link($x, $y, $w, $h, $link, $spaces=0) { - $this->Annotation($x, $y, $w, $h, $link, array('Subtype'=>'Link'), $spaces); - } - - /** - * Puts a markup annotation on a rectangular area of the page. - * !!!!THE ANNOTATION SUPPORT IS NOT YET FULLY IMPLEMENTED !!!! - * @param $x (float) Abscissa of the upper-left corner of the rectangle - * @param $y (float) Ordinate of the upper-left corner of the rectangle - * @param $w (float) Width of the rectangle - * @param $h (float) Height of the rectangle - * @param $text (string) annotation text or alternate content - * @param $opt (array) array of options (see section 8.4 of PDF reference 1.7). - * @param $spaces (int) number of spaces on the text to link - * @public - * @since 4.0.018 (2008-08-06) - */ - public function Annotation($x, $y, $w, $h, $text, $opt=array('Subtype'=>'Text'), $spaces=0) { - if ($this->inxobj) { - // store parameters for later use on template - $this->xobjects[$this->xobjid]['annotations'][] = array('x' => $x, 'y' => $y, 'w' => $w, 'h' => $h, 'text' => $text, 'opt' => $opt, 'spaces' => $spaces); - return; - } - if ($x === '') { - $x = $this->x; - } - if ($y === '') { - $y = $this->y; - } - // check page for no-write regions and adapt page margins if necessary - list($x, $y) = $this->checkPageRegions($h, $x, $y); - // recalculate coordinates to account for graphic transformations - if (isset($this->transfmatrix) AND !empty($this->transfmatrix)) { - for ($i=$this->transfmatrix_key; $i > 0; --$i) { - $maxid = count($this->transfmatrix[$i]) - 1; - for ($j=$maxid; $j >= 0; --$j) { - $ctm = $this->transfmatrix[$i][$j]; - if (isset($ctm['a'])) { - $x = $x * $this->k; - $y = ($this->h - $y) * $this->k; - $w = $w * $this->k; - $h = $h * $this->k; - // top left - $xt = $x; - $yt = $y; - $x1 = ($ctm['a'] * $xt) + ($ctm['c'] * $yt) + $ctm['e']; - $y1 = ($ctm['b'] * $xt) + ($ctm['d'] * $yt) + $ctm['f']; - // top right - $xt = $x + $w; - $yt = $y; - $x2 = ($ctm['a'] * $xt) + ($ctm['c'] * $yt) + $ctm['e']; - $y2 = ($ctm['b'] * $xt) + ($ctm['d'] * $yt) + $ctm['f']; - // bottom left - $xt = $x; - $yt = $y - $h; - $x3 = ($ctm['a'] * $xt) + ($ctm['c'] * $yt) + $ctm['e']; - $y3 = ($ctm['b'] * $xt) + ($ctm['d'] * $yt) + $ctm['f']; - // bottom right - $xt = $x + $w; - $yt = $y - $h; - $x4 = ($ctm['a'] * $xt) + ($ctm['c'] * $yt) + $ctm['e']; - $y4 = ($ctm['b'] * $xt) + ($ctm['d'] * $yt) + $ctm['f']; - // new coordinates (rectangle area) - $x = min($x1, $x2, $x3, $x4); - $y = max($y1, $y2, $y3, $y4); - $w = (max($x1, $x2, $x3, $x4) - $x) / $this->k; - $h = ($y - min($y1, $y2, $y3, $y4)) / $this->k; - $x = $x / $this->k; - $y = $this->h - ($y / $this->k); - } - } - } - } - if ($this->page <= 0) { - $page = 1; - } else { - $page = $this->page; - } - if (!isset($this->PageAnnots[$page])) { - $this->PageAnnots[$page] = array(); - } - $this->PageAnnots[$page][] = array('n' => ++$this->n, 'x' => $x, 'y' => $y, 'w' => $w, 'h' => $h, 'txt' => $text, 'opt' => $opt, 'numspaces' => $spaces); - if (!$this->pdfa_mode) { - if ((($opt['Subtype'] == 'FileAttachment') OR ($opt['Subtype'] == 'Sound')) AND (!TCPDF_STATIC::empty_string($opt['FS'])) - AND (@file_exists($opt['FS']) OR TCPDF_STATIC::isValidURL($opt['FS'])) - AND (!isset($this->embeddedfiles[basename($opt['FS'])]))) { - $this->embeddedfiles[basename($opt['FS'])] = array('f' => ++$this->n, 'n' => ++$this->n, 'file' => $opt['FS']); - } - } - // Add widgets annotation's icons - if (isset($opt['mk']['i']) AND @file_exists($opt['mk']['i'])) { - $this->Image($opt['mk']['i'], '', '', 10, 10, '', '', '', false, 300, '', false, false, 0, false, true); - } - if (isset($opt['mk']['ri']) AND @file_exists($opt['mk']['ri'])) { - $this->Image($opt['mk']['ri'], '', '', 0, 0, '', '', '', false, 300, '', false, false, 0, false, true); - } - if (isset($opt['mk']['ix']) AND @file_exists($opt['mk']['ix'])) { - $this->Image($opt['mk']['ix'], '', '', 0, 0, '', '', '', false, 300, '', false, false, 0, false, true); - } - } - - /** - * Embedd the attached files. - * @since 4.4.000 (2008-12-07) - * @protected - * @see Annotation() - */ - protected function _putEmbeddedFiles() { - if ($this->pdfa_mode) { - // embedded files are not allowed in PDF/A mode - return; - } - reset($this->embeddedfiles); - foreach ($this->embeddedfiles as $filename => $filedata) { - $data = TCPDF_STATIC::fileGetContents($filedata['file']); - if ($data !== FALSE) { - $rawsize = strlen($data); - if ($rawsize > 0) { - // update name tree - $this->efnames[$filename] = $filedata['f'].' 0 R'; - // embedded file specification object - $out = $this->_getobj($filedata['f'])."\n"; - $out .= '<_datastring($filename, $filedata['f']).' /EF <> >>'; - $out .= "\n".'endobj'; - $this->_out($out); - // embedded file object - $filter = ''; - if ($this->compress) { - $data = gzcompress($data); - $filter = ' /Filter /FlateDecode'; - } - $stream = $this->_getrawstream($data, $filedata['n']); - $out = $this->_getobj($filedata['n'])."\n"; - $out .= '<< /Type /EmbeddedFile'.$filter.' /Length '.strlen($stream).' /Params <> >>'; - $out .= ' stream'."\n".$stream."\n".'endstream'; - $out .= "\n".'endobj'; - $this->_out($out); - } - } - } - } - - /** - * Prints a text cell at the specified position. - * This method allows to place a string precisely on the page. - * @param $x (float) Abscissa of the cell origin - * @param $y (float) Ordinate of the cell origin - * @param $txt (string) String to print - * @param $fstroke (int) outline size in user units (false = disable) - * @param $fclip (boolean) if true activate clipping mode (you must call StartTransform() before this function and StopTransform() to stop the clipping tranformation). - * @param $ffill (boolean) if true fills the text - * @param $border (mixed) Indicates if borders must be drawn around the cell. The value can be a number:
          • 0: no border (default)
          • 1: frame
          or a string containing some or all of the following characters (in any order):
          • L: left
          • T: top
          • R: right
          • B: bottom
          or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) - * @param $ln (int) Indicates where the current position should go after the call. Possible values are:
          • 0: to the right (or left for RTL languages)
          • 1: to the beginning of the next line
          • 2: below
          Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: 0. - * @param $align (string) Allows to center or align the text. Possible values are:
          • L or empty string: left align (default value)
          • C: center
          • R: right align
          • J: justify
          - * @param $fill (boolean) Indicates if the cell background must be painted (true) or transparent (false). - * @param $link (mixed) URL or identifier returned by AddLink(). - * @param $stretch (int) font stretch mode:
          • 0 = disabled
          • 1 = horizontal scaling only if text is larger than cell width
          • 2 = forced horizontal scaling to fit cell width
          • 3 = character spacing only if text is larger than cell width
          • 4 = forced character spacing to fit cell width
          General font stretching and scaling values will be preserved when possible. - * @param $ignore_min_height (boolean) if true ignore automatic minimum height value. - * @param $calign (string) cell vertical alignment relative to the specified Y value. Possible values are:
          • T : cell top
          • A : font top
          • L : font baseline
          • D : font bottom
          • B : cell bottom
          - * @param $valign (string) text vertical alignment inside the cell. Possible values are:
          • T : top
          • C : center
          • B : bottom
          - * @param $rtloff (boolean) if true uses the page top-left corner as origin of axis for $x and $y initial position. - * @public - * @since 1.0 - * @see Cell(), Write(), MultiCell(), WriteHTML(), WriteHTMLCell() - */ - public function Text($x, $y, $txt, $fstroke=false, $fclip=false, $ffill=true, $border=0, $ln=0, $align='', $fill=false, $link='', $stretch=0, $ignore_min_height=false, $calign='T', $valign='M', $rtloff=false) { - $textrendermode = $this->textrendermode; - $textstrokewidth = $this->textstrokewidth; - $this->setTextRenderingMode($fstroke, $ffill, $fclip); - $this->SetXY($x, $y, $rtloff); - $this->Cell(0, 0, $txt, $border, $ln, $align, $fill, $link, $stretch, $ignore_min_height, $calign, $valign); - // restore previous rendering mode - $this->textrendermode = $textrendermode; - $this->textstrokewidth = $textstrokewidth; - } - - /** - * Whenever a page break condition is met, the method is called, and the break is issued or not depending on the returned value. - * The default implementation returns a value according to the mode selected by SetAutoPageBreak().
          - * This method is called automatically and should not be called directly by the application. - * @return boolean - * @public - * @since 1.4 - * @see SetAutoPageBreak() - */ - public function AcceptPageBreak() { - if ($this->num_columns > 1) { - // multi column mode - if ($this->current_column < ($this->num_columns - 1)) { - // go to next column - $this->selectColumn($this->current_column + 1); - } elseif ($this->AutoPageBreak) { - // add a new page - $this->AddPage(); - // set first column - $this->selectColumn(0); - } - // avoid page breaking from checkPageBreak() - return false; - } - return $this->AutoPageBreak; - } - - /** - * Add page if needed. - * @param $h (float) Cell height. Default value: 0. - * @param $y (mixed) starting y position, leave empty for current position. - * @param $addpage (boolean) if true add a page, otherwise only return the true/false state - * @return boolean true in case of page break, false otherwise. - * @since 3.2.000 (2008-07-01) - * @protected - */ - protected function checkPageBreak($h=0, $y='', $addpage=true) { - if (TCPDF_STATIC::empty_string($y)) { - $y = $this->y; - } - $current_page = $this->page; - if ((($y + $h) > $this->PageBreakTrigger) AND ($this->inPageBody()) AND ($this->AcceptPageBreak())) { - if ($addpage) { - //Automatic page break - $x = $this->x; - $this->AddPage($this->CurOrientation); - $this->y = $this->tMargin; - $oldpage = $this->page - 1; - if ($this->rtl) { - if ($this->pagedim[$this->page]['orm'] != $this->pagedim[$oldpage]['orm']) { - $this->x = $x - ($this->pagedim[$this->page]['orm'] - $this->pagedim[$oldpage]['orm']); - } else { - $this->x = $x; - } - } else { - if ($this->pagedim[$this->page]['olm'] != $this->pagedim[$oldpage]['olm']) { - $this->x = $x + ($this->pagedim[$this->page]['olm'] - $this->pagedim[$oldpage]['olm']); - } else { - $this->x = $x; - } - } - } - return true; - } - if ($current_page != $this->page) { - // account for columns mode - return true; - } - return false; - } - - /** - * Prints a cell (rectangular area) with optional borders, background color and character string. The upper-left corner of the cell corresponds to the current position. The text can be aligned or centered. After the call, the current position moves to the right or to the next line. It is possible to put a link on the text.
          - * If automatic page breaking is enabled and the cell goes beyond the limit, a page break is done before outputting. - * @param $w (float) Cell width. If 0, the cell extends up to the right margin. - * @param $h (float) Cell height. Default value: 0. - * @param $txt (string) String to print. Default value: empty string. - * @param $border (mixed) Indicates if borders must be drawn around the cell. The value can be a number:
          • 0: no border (default)
          • 1: frame
          or a string containing some or all of the following characters (in any order):
          • L: left
          • T: top
          • R: right
          • B: bottom
          or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) - * @param $ln (int) Indicates where the current position should go after the call. Possible values are:
          • 0: to the right (or left for RTL languages)
          • 1: to the beginning of the next line
          • 2: below
          Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: 0. - * @param $align (string) Allows to center or align the text. Possible values are:
          • L or empty string: left align (default value)
          • C: center
          • R: right align
          • J: justify
          - * @param $fill (boolean) Indicates if the cell background must be painted (true) or transparent (false). - * @param $link (mixed) URL or identifier returned by AddLink(). - * @param $stretch (int) font stretch mode:
          • 0 = disabled
          • 1 = horizontal scaling only if text is larger than cell width
          • 2 = forced horizontal scaling to fit cell width
          • 3 = character spacing only if text is larger than cell width
          • 4 = forced character spacing to fit cell width
          General font stretching and scaling values will be preserved when possible. - * @param $ignore_min_height (boolean) if true ignore automatic minimum height value. - * @param $calign (string) cell vertical alignment relative to the specified Y value. Possible values are:
          • T : cell top
          • C : center
          • B : cell bottom
          • A : font top
          • L : font baseline
          • D : font bottom
          - * @param $valign (string) text vertical alignment inside the cell. Possible values are:
          • T : top
          • C : center
          • B : bottom
          - * @public - * @since 1.0 - * @see SetFont(), SetDrawColor(), SetFillColor(), SetTextColor(), SetLineWidth(), AddLink(), Ln(), MultiCell(), Write(), SetAutoPageBreak() - */ - public function Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='', $stretch=0, $ignore_min_height=false, $calign='T', $valign='M') { - $prev_cell_margin = $this->cell_margin; - $prev_cell_padding = $this->cell_padding; - $this->adjustCellPadding($border); - if (!$ignore_min_height) { - $min_cell_height = $this->getCellHeight($this->FontSize); - if ($h < $min_cell_height) { - $h = $min_cell_height; - } - } - $this->checkPageBreak($h + $this->cell_margin['T'] + $this->cell_margin['B']); - // apply text shadow if enabled - if ($this->txtshadow['enabled']) { - // save data - $x = $this->x; - $y = $this->y; - $bc = $this->bgcolor; - $fc = $this->fgcolor; - $sc = $this->strokecolor; - $alpha = $this->alpha; - // print shadow - $this->x += $this->txtshadow['depth_w']; - $this->y += $this->txtshadow['depth_h']; - $this->SetFillColorArray($this->txtshadow['color']); - $this->SetTextColorArray($this->txtshadow['color']); - $this->SetDrawColorArray($this->txtshadow['color']); - if ($this->txtshadow['opacity'] != $alpha['CA']) { - $this->setAlpha($this->txtshadow['opacity'], $this->txtshadow['blend_mode']); - } - if ($this->state == 2) { - $this->_out($this->getCellCode($w, $h, $txt, $border, $ln, $align, $fill, $link, $stretch, true, $calign, $valign)); - } - //restore data - $this->x = $x; - $this->y = $y; - $this->SetFillColorArray($bc); - $this->SetTextColorArray($fc); - $this->SetDrawColorArray($sc); - if ($this->txtshadow['opacity'] != $alpha['CA']) { - $this->setAlpha($alpha['CA'], $alpha['BM'], $alpha['ca'], $alpha['AIS']); - } - } - if ($this->state == 2) { - $this->_out($this->getCellCode($w, $h, $txt, $border, $ln, $align, $fill, $link, $stretch, true, $calign, $valign)); - } - $this->cell_padding = $prev_cell_padding; - $this->cell_margin = $prev_cell_margin; - } - - /** - * Returns the PDF string code to print a cell (rectangular area) with optional borders, background color and character string. The upper-left corner of the cell corresponds to the current position. The text can be aligned or centered. After the call, the current position moves to the right or to the next line. It is possible to put a link on the text.
          - * If automatic page breaking is enabled and the cell goes beyond the limit, a page break is done before outputting. - * @param $w (float) Cell width. If 0, the cell extends up to the right margin. - * @param $h (float) Cell height. Default value: 0. - * @param $txt (string) String to print. Default value: empty string. - * @param $border (mixed) Indicates if borders must be drawn around the cell. The value can be a number:
          • 0: no border (default)
          • 1: frame
          or a string containing some or all of the following characters (in any order):
          • L: left
          • T: top
          • R: right
          • B: bottom
          or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) - * @param $ln (int) Indicates where the current position should go after the call. Possible values are:
          • 0: to the right (or left for RTL languages)
          • 1: to the beginning of the next line
          • 2: below
          Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: 0. - * @param $align (string) Allows to center or align the text. Possible values are:
          • L or empty string: left align (default value)
          • C: center
          • R: right align
          • J: justify
          - * @param $fill (boolean) Indicates if the cell background must be painted (true) or transparent (false). - * @param $link (mixed) URL or identifier returned by AddLink(). - * @param $stretch (int) font stretch mode:
          • 0 = disabled
          • 1 = horizontal scaling only if text is larger than cell width
          • 2 = forced horizontal scaling to fit cell width
          • 3 = character spacing only if text is larger than cell width
          • 4 = forced character spacing to fit cell width
          General font stretching and scaling values will be preserved when possible. - * @param $ignore_min_height (boolean) if true ignore automatic minimum height value. - * @param $calign (string) cell vertical alignment relative to the specified Y value. Possible values are:
          • T : cell top
          • C : center
          • B : cell bottom
          • A : font top
          • L : font baseline
          • D : font bottom
          - * @param $valign (string) text vertical alignment inside the cell. Possible values are:
          • T : top
          • M : middle
          • B : bottom
          - * @return string containing cell code - * @protected - * @since 1.0 - * @see Cell() - */ - protected function getCellCode($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='', $stretch=0, $ignore_min_height=false, $calign='T', $valign='M') { - // replace 'NO-BREAK SPACE' (U+00A0) character with a simple space - $txt = str_replace(TCPDF_FONTS::unichr(160, $this->isunicode), ' ', $txt); - $prev_cell_margin = $this->cell_margin; - $prev_cell_padding = $this->cell_padding; - $txt = TCPDF_STATIC::removeSHY($txt, $this->isunicode); - $rs = ''; //string to be returned - $this->adjustCellPadding($border); - if (!$ignore_min_height) { - $min_cell_height = $this->getCellHeight($this->FontSize); - if ($h < $min_cell_height) { - $h = $min_cell_height; - } - } - $k = $this->k; - // check page for no-write regions and adapt page margins if necessary - list($this->x, $this->y) = $this->checkPageRegions($h, $this->x, $this->y); - if ($this->rtl) { - $x = $this->x - $this->cell_margin['R']; - } else { - $x = $this->x + $this->cell_margin['L']; - } - $y = $this->y + $this->cell_margin['T']; - $prev_font_stretching = $this->font_stretching; - $prev_font_spacing = $this->font_spacing; - // cell vertical alignment - switch ($calign) { - case 'A': { - // font top - switch ($valign) { - case 'T': { - // top - $y -= $this->cell_padding['T']; - break; - } - case 'B': { - // bottom - $y -= ($h - $this->cell_padding['B'] - $this->FontAscent - $this->FontDescent); - break; - } - default: - case 'C': - case 'M': { - // center - $y -= (($h - $this->FontAscent - $this->FontDescent) / 2); - break; - } - } - break; - } - case 'L': { - // font baseline - switch ($valign) { - case 'T': { - // top - $y -= ($this->cell_padding['T'] + $this->FontAscent); - break; - } - case 'B': { - // bottom - $y -= ($h - $this->cell_padding['B'] - $this->FontDescent); - break; - } - default: - case 'C': - case 'M': { - // center - $y -= (($h + $this->FontAscent - $this->FontDescent) / 2); - break; - } - } - break; - } - case 'D': { - // font bottom - switch ($valign) { - case 'T': { - // top - $y -= ($this->cell_padding['T'] + $this->FontAscent + $this->FontDescent); - break; - } - case 'B': { - // bottom - $y -= ($h - $this->cell_padding['B']); - break; - } - default: - case 'C': - case 'M': { - // center - $y -= (($h + $this->FontAscent + $this->FontDescent) / 2); - break; - } - } - break; - } - case 'B': { - // cell bottom - $y -= $h; - break; - } - case 'C': - case 'M': { - // cell center - $y -= ($h / 2); - break; - } - default: - case 'T': { - // cell top - break; - } - } - // text vertical alignment - switch ($valign) { - case 'T': { - // top - $yt = $y + $this->cell_padding['T']; - break; - } - case 'B': { - // bottom - $yt = $y + $h - $this->cell_padding['B'] - $this->FontAscent - $this->FontDescent; - break; - } - default: - case 'C': - case 'M': { - // center - $yt = $y + (($h - $this->FontAscent - $this->FontDescent) / 2); - break; - } - } - $basefonty = $yt + $this->FontAscent; - if (TCPDF_STATIC::empty_string($w) OR ($w <= 0)) { - if ($this->rtl) { - $w = $x - $this->lMargin; - } else { - $w = $this->w - $this->rMargin - $x; - } - } - $s = ''; - // fill and borders - if (is_string($border) AND (strlen($border) == 4)) { - // full border - $border = 1; - } - if ($fill OR ($border == 1)) { - if ($fill) { - $op = ($border == 1) ? 'B' : 'f'; - } else { - $op = 'S'; - } - if ($this->rtl) { - $xk = (($x - $w) * $k); - } else { - $xk = ($x * $k); - } - $s .= sprintf('%F %F %F %F re %s ', $xk, (($this->h - $y) * $k), ($w * $k), (-$h * $k), $op); - } - // draw borders - $s .= $this->getCellBorder($x, $y, $w, $h, $border); - if ($txt != '') { - $txt2 = $txt; - if ($this->isunicode) { - if (($this->CurrentFont['type'] == 'core') OR ($this->CurrentFont['type'] == 'TrueType') OR ($this->CurrentFont['type'] == 'Type1')) { - $txt2 = TCPDF_FONTS::UTF8ToLatin1($txt2, $this->isunicode, $this->CurrentFont); - } else { - $unicode = TCPDF_FONTS::UTF8StringToArray($txt, $this->isunicode, $this->CurrentFont); // array of UTF-8 unicode values - $unicode = TCPDF_FONTS::utf8Bidi($unicode, '', $this->tmprtl, $this->isunicode, $this->CurrentFont); - // replace thai chars (if any) - if (defined('K_THAI_TOPCHARS') AND (K_THAI_TOPCHARS == true)) { - // number of chars - $numchars = count($unicode); - // po pla, for far, for fan - $longtail = array(0x0e1b, 0x0e1d, 0x0e1f); - // do chada, to patak - $lowtail = array(0x0e0e, 0x0e0f); - // mai hun arkad, sara i, sara ii, sara ue, sara uee - $upvowel = array(0x0e31, 0x0e34, 0x0e35, 0x0e36, 0x0e37); - // mai ek, mai tho, mai tri, mai chattawa, karan - $tonemark = array(0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c); - // sara u, sara uu, pinthu - $lowvowel = array(0x0e38, 0x0e39, 0x0e3a); - $output = array(); - for ($i = 0; $i < $numchars; $i++) { - if (($unicode[$i] >= 0x0e00) && ($unicode[$i] <= 0x0e5b)) { - $ch0 = $unicode[$i]; - $ch1 = ($i > 0) ? $unicode[($i - 1)] : 0; - $ch2 = ($i > 1) ? $unicode[($i - 2)] : 0; - $chn = ($i < ($numchars - 1)) ? $unicode[($i + 1)] : 0; - if (in_array($ch0, $tonemark)) { - if ($chn == 0x0e33) { - // sara um - if (in_array($ch1, $longtail)) { - // tonemark at upper left - $output[] = $this->replaceChar($ch0, (0xf713 + $ch0 - 0x0e48)); - } else { - // tonemark at upper right (normal position) - $output[] = $ch0; - } - } elseif (in_array($ch1, $longtail) OR (in_array($ch2, $longtail) AND in_array($ch1, $lowvowel))) { - // tonemark at lower left - $output[] = $this->replaceChar($ch0, (0xf705 + $ch0 - 0x0e48)); - } elseif (in_array($ch1, $upvowel)) { - if (in_array($ch2, $longtail)) { - // tonemark at upper left - $output[] = $this->replaceChar($ch0, (0xf713 + $ch0 - 0x0e48)); - } else { - // tonemark at upper right (normal position) - $output[] = $ch0; - } - } else { - // tonemark at lower right - $output[] = $this->replaceChar($ch0, (0xf70a + $ch0 - 0x0e48)); - } - } elseif (($ch0 == 0x0e33) AND (in_array($ch1, $longtail) OR (in_array($ch2, $longtail) AND in_array($ch1, $tonemark)))) { - // add lower left nikhahit and sara aa - if ($this->isCharDefined(0xf711) AND $this->isCharDefined(0x0e32)) { - $output[] = 0xf711; - $this->CurrentFont['subsetchars'][0xf711] = true; - $output[] = 0x0e32; - $this->CurrentFont['subsetchars'][0x0e32] = true; - } else { - $output[] = $ch0; - } - } elseif (in_array($ch1, $longtail)) { - if ($ch0 == 0x0e31) { - // lower left mai hun arkad - $output[] = $this->replaceChar($ch0, 0xf710); - } elseif (in_array($ch0, $upvowel)) { - // lower left - $output[] = $this->replaceChar($ch0, (0xf701 + $ch0 - 0x0e34)); - } elseif ($ch0 == 0x0e47) { - // lower left mai tai koo - $output[] = $this->replaceChar($ch0, 0xf712); - } else { - // normal character - $output[] = $ch0; - } - } elseif (in_array($ch1, $lowtail) AND in_array($ch0, $lowvowel)) { - // lower vowel - $output[] = $this->replaceChar($ch0, (0xf718 + $ch0 - 0x0e38)); - } elseif (($ch0 == 0x0e0d) AND in_array($chn, $lowvowel)) { - // yo ying without lower part - $output[] = $this->replaceChar($ch0, 0xf70f); - } elseif (($ch0 == 0x0e10) AND in_array($chn, $lowvowel)) { - // tho santan without lower part - $output[] = $this->replaceChar($ch0, 0xf700); - } else { - $output[] = $ch0; - } - } else { - // non-thai character - $output[] = $unicode[$i]; - } - } - $unicode = $output; - // update font subsetchars - $this->setFontSubBuffer($this->CurrentFont['fontkey'], 'subsetchars', $this->CurrentFont['subsetchars']); - } // end of K_THAI_TOPCHARS - $txt2 = TCPDF_FONTS::arrUTF8ToUTF16BE($unicode, false); - } - } - $txt2 = TCPDF_STATIC::_escape($txt2); - // get current text width (considering general font stretching and spacing) - $txwidth = $this->GetStringWidth($txt); - $width = $txwidth; - // check for stretch mode - if ($stretch > 0) { - // calculate ratio between cell width and text width - if ($width <= 0) { - $ratio = 1; - } else { - $ratio = (($w - $this->cell_padding['L'] - $this->cell_padding['R']) / $width); - } - // check if stretching is required - if (($ratio < 1) OR (($ratio > 1) AND (($stretch % 2) == 0))) { - // the text will be stretched to fit cell width - if ($stretch > 2) { - // set new character spacing - $this->font_spacing += ($w - $this->cell_padding['L'] - $this->cell_padding['R'] - $width) / (max(($this->GetNumChars($txt) - 1), 1) * ($this->font_stretching / 100)); - } else { - // set new horizontal stretching - $this->font_stretching *= $ratio; - } - // recalculate text width (the text fills the entire cell) - $width = $w - $this->cell_padding['L'] - $this->cell_padding['R']; - // reset alignment - $align = ''; - } - } - if ($this->font_stretching != 100) { - // apply font stretching - $rs .= sprintf('BT %F Tz ET ', $this->font_stretching); - } - if ($this->font_spacing != 0) { - // increase/decrease font spacing - $rs .= sprintf('BT %F Tc ET ', ($this->font_spacing * $this->k)); - } - if ($this->ColorFlag AND ($this->textrendermode < 4)) { - $s .= 'q '.$this->TextColor.' '; - } - // rendering mode - $s .= sprintf('BT %d Tr %F w ET ', $this->textrendermode, ($this->textstrokewidth * $this->k)); - // count number of spaces - $ns = substr_count($txt, chr(32)); - // Justification - $spacewidth = 0; - if (($align == 'J') AND ($ns > 0)) { - if ($this->isUnicodeFont()) { - // get string width without spaces - $width = $this->GetStringWidth(str_replace(' ', '', $txt)); - // calculate average space width - $spacewidth = -1000 * ($w - $width - $this->cell_padding['L'] - $this->cell_padding['R']) / ($ns?$ns:1) / ($this->FontSize?$this->FontSize:1); - if ($this->font_stretching != 100) { - // word spacing is affected by stretching - $spacewidth /= ($this->font_stretching / 100); - } - // set word position to be used with TJ operator - $txt2 = str_replace(chr(0).chr(32), ') '.sprintf('%F', $spacewidth).' (', $txt2); - $unicode_justification = true; - } else { - // get string width - $width = $txwidth; - // new space width - $spacewidth = (($w - $width - $this->cell_padding['L'] - $this->cell_padding['R']) / ($ns?$ns:1)) * $this->k; - if ($this->font_stretching != 100) { - // word spacing (Tw) is affected by stretching - $spacewidth /= ($this->font_stretching / 100); - } - // set word spacing - $rs .= sprintf('BT %F Tw ET ', $spacewidth); - } - $width = $w - $this->cell_padding['L'] - $this->cell_padding['R']; - } - // replace carriage return characters - $txt2 = str_replace("\r", ' ', $txt2); - switch ($align) { - case 'C': { - $dx = ($w - $width) / 2; - break; - } - case 'R': { - if ($this->rtl) { - $dx = $this->cell_padding['R']; - } else { - $dx = $w - $width - $this->cell_padding['R']; - } - break; - } - case 'L': { - if ($this->rtl) { - $dx = $w - $width - $this->cell_padding['L']; - } else { - $dx = $this->cell_padding['L']; - } - break; - } - case 'J': - default: { - if ($this->rtl) { - $dx = $this->cell_padding['R']; - } else { - $dx = $this->cell_padding['L']; - } - break; - } - } - if ($this->rtl) { - $xdx = $x - $dx - $width; - } else { - $xdx = $x + $dx; - } - $xdk = $xdx * $k; - // print text - $s .= sprintf('BT %F %F Td [(%s)] TJ ET', $xdk, (($this->h - $basefonty) * $k), $txt2); - if (isset($uniblock)) { - // print overlapping characters as separate string - $xshift = 0; // horizontal shift - $ty = (($this->h - $basefonty + (0.2 * $this->FontSize)) * $k); - $spw = (($w - $txwidth - $this->cell_padding['L'] - $this->cell_padding['R']) / ($ns?$ns:1)); - foreach ($uniblock as $uk => $uniarr) { - if (($uk % 2) == 0) { - // x space to skip - if ($spacewidth != 0) { - // justification shift - $xshift += (count(array_keys($uniarr, 32)) * $spw); - } - $xshift += $this->GetArrStringWidth($uniarr); // + shift justification - } else { - // character to print - $topchr = TCPDF_FONTS::arrUTF8ToUTF16BE($uniarr, false); - $topchr = TCPDF_STATIC::_escape($topchr); - $s .= sprintf(' BT %F %F Td [(%s)] TJ ET', ($xdk + ($xshift * $k)), $ty, $topchr); - } - } - } - if ($this->underline) { - $s .= ' '.$this->_dounderlinew($xdx, $basefonty, $width); - } - if ($this->linethrough) { - $s .= ' '.$this->_dolinethroughw($xdx, $basefonty, $width); - } - if ($this->overline) { - $s .= ' '.$this->_dooverlinew($xdx, $basefonty, $width); - } - if ($this->ColorFlag AND ($this->textrendermode < 4)) { - $s .= ' Q'; - } - if ($link) { - $this->Link($xdx, $yt, $width, ($this->FontAscent + $this->FontDescent), $link, $ns); - } - } - // output cell - if ($s) { - // output cell - $rs .= $s; - if ($this->font_spacing != 0) { - // reset font spacing mode - $rs .= ' BT 0 Tc ET'; - } - if ($this->font_stretching != 100) { - // reset font stretching mode - $rs .= ' BT 100 Tz ET'; - } - } - // reset word spacing - if (!$this->isUnicodeFont() AND ($align == 'J')) { - $rs .= ' BT 0 Tw ET'; - } - // reset stretching and spacing - $this->font_stretching = $prev_font_stretching; - $this->font_spacing = $prev_font_spacing; - $this->lasth = $h; - if ($ln > 0) { - //Go to the beginning of the next line - $this->y = $y + $h + $this->cell_margin['B']; - if ($ln == 1) { - if ($this->rtl) { - $this->x = $this->w - $this->rMargin; - } else { - $this->x = $this->lMargin; - } - } - } else { - // go left or right by case - if ($this->rtl) { - $this->x = $x - $w - $this->cell_margin['L']; - } else { - $this->x = $x + $w + $this->cell_margin['R']; - } - } - $gstyles = ''.$this->linestyleWidth.' '.$this->linestyleCap.' '.$this->linestyleJoin.' '.$this->linestyleDash.' '.$this->DrawColor.' '.$this->FillColor."\n"; - $rs = $gstyles.$rs; - $this->cell_padding = $prev_cell_padding; - $this->cell_margin = $prev_cell_margin; - return $rs; - } - - /** - * Replace a char if is defined on the current font. - * @param $oldchar (int) Integer code (unicode) of the character to replace. - * @param $newchar (int) Integer code (unicode) of the new character. - * @return int the replaced char or the old char in case the new char i not defined - * @protected - * @since 5.9.167 (2012-06-22) - */ - protected function replaceChar($oldchar, $newchar) { - if ($this->isCharDefined($newchar)) { - // add the new char on the subset list - $this->CurrentFont['subsetchars'][$newchar] = true; - // return the new character - return $newchar; - } - // return the old char - return $oldchar; - } - - /** - * Returns the code to draw the cell border - * @param $x (float) X coordinate. - * @param $y (float) Y coordinate. - * @param $w (float) Cell width. - * @param $h (float) Cell height. - * @param $brd (mixed) Indicates if borders must be drawn around the cell. The value can be a number:
          • 0: no border (default)
          • 1: frame
          or a string containing some or all of the following characters (in any order):
          • L: left
          • T: top
          • R: right
          • B: bottom
          or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) - * @return string containing cell border code - * @protected - * @see SetLineStyle() - * @since 5.7.000 (2010-08-02) - */ - protected function getCellBorder($x, $y, $w, $h, $brd) { - $s = ''; // string to be returned - if (empty($brd)) { - return $s; - } - if ($brd == 1) { - $brd = array('LRTB' => true); - } - // calculate coordinates for border - $k = $this->k; - if ($this->rtl) { - $xeL = ($x - $w) * $k; - $xeR = $x * $k; - } else { - $xeL = $x * $k; - $xeR = ($x + $w) * $k; - } - $yeL = (($this->h - ($y + $h)) * $k); - $yeT = (($this->h - $y) * $k); - $xeT = $xeL; - $xeB = $xeR; - $yeR = $yeT; - $yeB = $yeL; - if (is_string($brd)) { - // convert string to array - $slen = strlen($brd); - $newbrd = array(); - for ($i = 0; $i < $slen; ++$i) { - $newbrd[$brd[$i]] = array('cap' => 'square', 'join' => 'miter'); - } - $brd = $newbrd; - } - if (isset($brd['mode'])) { - $mode = $brd['mode']; - unset($brd['mode']); - } else { - $mode = 'normal'; - } - foreach ($brd as $border => $style) { - if (is_array($style) AND !empty($style)) { - // apply border style - $prev_style = $this->linestyleWidth.' '.$this->linestyleCap.' '.$this->linestyleJoin.' '.$this->linestyleDash.' '.$this->DrawColor.' '; - $s .= $this->SetLineStyle($style, true)."\n"; - } - switch ($mode) { - case 'ext': { - $off = (($this->LineWidth / 2) * $k); - $xL = $xeL - $off; - $xR = $xeR + $off; - $yT = $yeT + $off; - $yL = $yeL - $off; - $xT = $xL; - $xB = $xR; - $yR = $yT; - $yB = $yL; - $w += $this->LineWidth; - $h += $this->LineWidth; - break; - } - case 'int': { - $off = ($this->LineWidth / 2) * $k; - $xL = $xeL + $off; - $xR = $xeR - $off; - $yT = $yeT - $off; - $yL = $yeL + $off; - $xT = $xL; - $xB = $xR; - $yR = $yT; - $yB = $yL; - $w -= $this->LineWidth; - $h -= $this->LineWidth; - break; - } - case 'normal': - default: { - $xL = $xeL; - $xT = $xeT; - $xB = $xeB; - $xR = $xeR; - $yL = $yeL; - $yT = $yeT; - $yB = $yeB; - $yR = $yeR; - break; - } - } - // draw borders by case - if (strlen($border) == 4) { - $s .= sprintf('%F %F %F %F re S ', $xT, $yT, ($w * $k), (-$h * $k)); - } elseif (strlen($border) == 3) { - if (strpos($border,'B') === false) { // LTR - $s .= sprintf('%F %F m ', $xL, $yL); - $s .= sprintf('%F %F l ', $xT, $yT); - $s .= sprintf('%F %F l ', $xR, $yR); - $s .= sprintf('%F %F l ', $xB, $yB); - $s .= 'S '; - } elseif (strpos($border,'L') === false) { // TRB - $s .= sprintf('%F %F m ', $xT, $yT); - $s .= sprintf('%F %F l ', $xR, $yR); - $s .= sprintf('%F %F l ', $xB, $yB); - $s .= sprintf('%F %F l ', $xL, $yL); - $s .= 'S '; - } elseif (strpos($border,'T') === false) { // RBL - $s .= sprintf('%F %F m ', $xR, $yR); - $s .= sprintf('%F %F l ', $xB, $yB); - $s .= sprintf('%F %F l ', $xL, $yL); - $s .= sprintf('%F %F l ', $xT, $yT); - $s .= 'S '; - } elseif (strpos($border,'R') === false) { // BLT - $s .= sprintf('%F %F m ', $xB, $yB); - $s .= sprintf('%F %F l ', $xL, $yL); - $s .= sprintf('%F %F l ', $xT, $yT); - $s .= sprintf('%F %F l ', $xR, $yR); - $s .= 'S '; - } - } elseif (strlen($border) == 2) { - if ((strpos($border,'L') !== false) AND (strpos($border,'T') !== false)) { // LT - $s .= sprintf('%F %F m ', $xL, $yL); - $s .= sprintf('%F %F l ', $xT, $yT); - $s .= sprintf('%F %F l ', $xR, $yR); - $s .= 'S '; - } elseif ((strpos($border,'T') !== false) AND (strpos($border,'R') !== false)) { // TR - $s .= sprintf('%F %F m ', $xT, $yT); - $s .= sprintf('%F %F l ', $xR, $yR); - $s .= sprintf('%F %F l ', $xB, $yB); - $s .= 'S '; - } elseif ((strpos($border,'R') !== false) AND (strpos($border,'B') !== false)) { // RB - $s .= sprintf('%F %F m ', $xR, $yR); - $s .= sprintf('%F %F l ', $xB, $yB); - $s .= sprintf('%F %F l ', $xL, $yL); - $s .= 'S '; - } elseif ((strpos($border,'B') !== false) AND (strpos($border,'L') !== false)) { // BL - $s .= sprintf('%F %F m ', $xB, $yB); - $s .= sprintf('%F %F l ', $xL, $yL); - $s .= sprintf('%F %F l ', $xT, $yT); - $s .= 'S '; - } elseif ((strpos($border,'L') !== false) AND (strpos($border,'R') !== false)) { // LR - $s .= sprintf('%F %F m ', $xL, $yL); - $s .= sprintf('%F %F l ', $xT, $yT); - $s .= 'S '; - $s .= sprintf('%F %F m ', $xR, $yR); - $s .= sprintf('%F %F l ', $xB, $yB); - $s .= 'S '; - } elseif ((strpos($border,'T') !== false) AND (strpos($border,'B') !== false)) { // TB - $s .= sprintf('%F %F m ', $xT, $yT); - $s .= sprintf('%F %F l ', $xR, $yR); - $s .= 'S '; - $s .= sprintf('%F %F m ', $xB, $yB); - $s .= sprintf('%F %F l ', $xL, $yL); - $s .= 'S '; - } - } else { // strlen($border) == 1 - if (strpos($border,'L') !== false) { // L - $s .= sprintf('%F %F m ', $xL, $yL); - $s .= sprintf('%F %F l ', $xT, $yT); - $s .= 'S '; - } elseif (strpos($border,'T') !== false) { // T - $s .= sprintf('%F %F m ', $xT, $yT); - $s .= sprintf('%F %F l ', $xR, $yR); - $s .= 'S '; - } elseif (strpos($border,'R') !== false) { // R - $s .= sprintf('%F %F m ', $xR, $yR); - $s .= sprintf('%F %F l ', $xB, $yB); - $s .= 'S '; - } elseif (strpos($border,'B') !== false) { // B - $s .= sprintf('%F %F m ', $xB, $yB); - $s .= sprintf('%F %F l ', $xL, $yL); - $s .= 'S '; - } - } - if (is_array($style) AND !empty($style)) { - // reset border style to previous value - $s .= "\n".$this->linestyleWidth.' '.$this->linestyleCap.' '.$this->linestyleJoin.' '.$this->linestyleDash.' '.$this->DrawColor."\n"; - } - } - return $s; - } - - /** - * This method allows printing text with line breaks. - * They can be automatic (as soon as the text reaches the right border of the cell) or explicit (via the \n character). As many cells as necessary are output, one below the other.
          - * Text can be aligned, centered or justified. The cell block can be framed and the background painted. - * @param $w (float) Width of cells. If 0, they extend up to the right margin of the page. - * @param $h (float) Cell minimum height. The cell extends automatically if needed. - * @param $txt (string) String to print - * @param $border (mixed) Indicates if borders must be drawn around the cell. The value can be a number:
          • 0: no border (default)
          • 1: frame
          or a string containing some or all of the following characters (in any order):
          • L: left
          • T: top
          • R: right
          • B: bottom
          or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) - * @param $align (string) Allows to center or align the text. Possible values are:
          • L or empty string: left align
          • C: center
          • R: right align
          • J: justification (default value when $ishtml=false)
          - * @param $fill (boolean) Indicates if the cell background must be painted (true) or transparent (false). - * @param $ln (int) Indicates where the current position should go after the call. Possible values are:
          • 0: to the right
          • 1: to the beginning of the next line [DEFAULT]
          • 2: below
          - * @param $x (float) x position in user units - * @param $y (float) y position in user units - * @param $reseth (boolean) if true reset the last cell height (default true). - * @param $stretch (int) font stretch mode:
          • 0 = disabled
          • 1 = horizontal scaling only if text is larger than cell width
          • 2 = forced horizontal scaling to fit cell width
          • 3 = character spacing only if text is larger than cell width
          • 4 = forced character spacing to fit cell width
          General font stretching and scaling values will be preserved when possible. - * @param $ishtml (boolean) INTERNAL USE ONLY -- set to true if $txt is HTML content (default = false). Never set this parameter to true, use instead writeHTMLCell() or writeHTML() methods. - * @param $autopadding (boolean) if true, uses internal padding and automatically adjust it to account for line width. - * @param $maxh (float) maximum height. It should be >= $h and less then remaining space to the bottom of the page, or 0 for disable this feature. This feature works only when $ishtml=false. - * @param $valign (string) Vertical alignment of text (requires $maxh = $h > 0). Possible values are:
          • T: TOP
          • M: middle
          • B: bottom
          . This feature works only when $ishtml=false and the cell must fit in a single page. - * @param $fitcell (boolean) if true attempt to fit all the text within the cell by reducing the font size (do not work in HTML mode). $maxh must be greater than 0 and wqual to $h. - * @return int Return the number of cells or 1 for html mode. - * @public - * @since 1.3 - * @see SetFont(), SetDrawColor(), SetFillColor(), SetTextColor(), SetLineWidth(), Cell(), Write(), SetAutoPageBreak() - */ - public function MultiCell($w, $h, $txt, $border=0, $align='J', $fill=false, $ln=1, $x='', $y='', $reseth=true, $stretch=0, $ishtml=false, $autopadding=true, $maxh=0, $valign='T', $fitcell=false) { - $prev_cell_margin = $this->cell_margin; - $prev_cell_padding = $this->cell_padding; - // adjust internal padding - $this->adjustCellPadding($border); - $mc_padding = $this->cell_padding; - $mc_margin = $this->cell_margin; - $this->cell_padding['T'] = 0; - $this->cell_padding['B'] = 0; - $this->setCellMargins(0, 0, 0, 0); - if (TCPDF_STATIC::empty_string($this->lasth) OR $reseth) { - // reset row height - $this->resetLastH(); - } - if (!TCPDF_STATIC::empty_string($y)) { - $this->SetY($y); - } else { - $y = $this->GetY(); - } - $resth = 0; - if (($h > 0) AND $this->inPageBody() AND (($y + $h + $mc_margin['T'] + $mc_margin['B']) > $this->PageBreakTrigger)) { - // spit cell in more pages/columns - $newh = ($this->PageBreakTrigger - $y); - $resth = ($h - $newh); // cell to be printed on the next page/column - $h = $newh; - } - // get current page number - $startpage = $this->page; - // get current column - $startcolumn = $this->current_column; - if (!TCPDF_STATIC::empty_string($x)) { - $this->SetX($x); - } else { - $x = $this->GetX(); - } - // check page for no-write regions and adapt page margins if necessary - list($x, $y) = $this->checkPageRegions(0, $x, $y); - // apply margins - $oy = $y + $mc_margin['T']; - if ($this->rtl) { - $ox = ($this->w - $x - $mc_margin['R']); - } else { - $ox = ($x + $mc_margin['L']); - } - $this->x = $ox; - $this->y = $oy; - // set width - if (TCPDF_STATIC::empty_string($w) OR ($w <= 0)) { - if ($this->rtl) { - $w = ($this->x - $this->lMargin - $mc_margin['L']); - } else { - $w = ($this->w - $this->x - $this->rMargin - $mc_margin['R']); - } - } - // store original margin values - $lMargin = $this->lMargin; - $rMargin = $this->rMargin; - if ($this->rtl) { - $this->rMargin = ($this->w - $this->x); - $this->lMargin = ($this->x - $w); - } else { - $this->lMargin = ($this->x); - $this->rMargin = ($this->w - $this->x - $w); - } - $this->clMargin = $this->lMargin; - $this->crMargin = $this->rMargin; - if ($autopadding) { - // add top padding - $this->y += $mc_padding['T']; - } - if ($ishtml) { // ******* Write HTML text - $this->writeHTML($txt, true, false, $reseth, true, $align); - $nl = 1; - } else { // ******* Write simple text - $prev_FontSizePt = $this->FontSizePt; - if ($fitcell) { - // ajust height values - $tobottom = ($this->h - $this->y - $this->bMargin - $this->cell_padding['T'] - $this->cell_padding['B']); - $h = $maxh = max(min($h, $tobottom), min($maxh, $tobottom)); - } - // vertical alignment - if ($maxh > 0) { - // get text height - $text_height = $this->getStringHeight($w, $txt, $reseth, $autopadding, $mc_padding, $border); - if ($fitcell AND ($text_height > $maxh) AND ($this->FontSizePt > 1)) { - // try to reduce font size to fit text on cell (use a quick search algorithm) - $fmin = 1; - $fmax = $this->FontSizePt; - $diff_epsilon = (1 / $this->k); // one point (min resolution) - $maxit = (2 * min(100, max(10, intval($fmax)))); // max number of iterations - while ($maxit >= 0) { - $fmid = (($fmax + $fmin) / 2); - $this->SetFontSize($fmid, false); - $this->resetLastH(); - $text_height = $this->getStringHeight($w, $txt, $reseth, $autopadding, $mc_padding, $border); - $diff = ($maxh - $text_height); - if ($diff >= 0) { - if ($diff <= $diff_epsilon) { - break; - } - $fmin = $fmid; - } else { - $fmax = $fmid; - } - --$maxit; - } - if ($maxit < 0) { - // premature exit, we get the minimum font value to fit the cell - $this->SetFontSize($fmin); - $this->resetLastH(); - $text_height = $this->getStringHeight($w, $txt, $reseth, $autopadding, $mc_padding, $border); - } else { - $this->SetFontSize($fmid); - $this->resetLastH(); - } - } - if ($text_height < $maxh) { - if ($valign == 'M') { - // text vertically centered - $this->y += (($maxh - $text_height) / 2); - } elseif ($valign == 'B') { - // text vertically aligned on bottom - $this->y += ($maxh - $text_height); - } - } - } - $nl = $this->Write($this->lasth, $txt, '', 0, $align, true, $stretch, false, true, $maxh, 0, $mc_margin); - if ($fitcell) { - // restore font size - $this->SetFontSize($prev_FontSizePt); - } - } - if ($autopadding) { - // add bottom padding - $this->y += $mc_padding['B']; - } - // Get end-of-text Y position - $currentY = $this->y; - // get latest page number - $endpage = $this->page; - if ($resth > 0) { - $skip = ($endpage - $startpage); - $tmpresth = $resth; - while ($tmpresth > 0) { - if ($skip <= 0) { - // add a page (or trig AcceptPageBreak() for multicolumn mode) - $this->checkPageBreak($this->PageBreakTrigger + 1); - } - if ($this->num_columns > 1) { - $tmpresth -= ($this->h - $this->y - $this->bMargin); - } else { - $tmpresth -= ($this->h - $this->tMargin - $this->bMargin); - } - --$skip; - } - $currentY = $this->y; - $endpage = $this->page; - } - // get latest column - $endcolumn = $this->current_column; - if ($this->num_columns == 0) { - $this->num_columns = 1; - } - // disable page regions check - $check_page_regions = $this->check_page_regions; - $this->check_page_regions = false; - // get border modes - $border_start = TCPDF_STATIC::getBorderMode($border, $position='start', $this->opencell); - $border_end = TCPDF_STATIC::getBorderMode($border, $position='end', $this->opencell); - $border_middle = TCPDF_STATIC::getBorderMode($border, $position='middle', $this->opencell); - // design borders around HTML cells. - for ($page = $startpage; $page <= $endpage; ++$page) { // for each page - $ccode = ''; - $this->setPage($page); - if ($this->num_columns < 2) { - // single-column mode - $this->SetX($x); - $this->y = $this->tMargin; - } - // account for margin changes - if ($page > $startpage) { - if (($this->rtl) AND ($this->pagedim[$page]['orm'] != $this->pagedim[$startpage]['orm'])) { - $this->x -= ($this->pagedim[$page]['orm'] - $this->pagedim[$startpage]['orm']); - } elseif ((!$this->rtl) AND ($this->pagedim[$page]['olm'] != $this->pagedim[$startpage]['olm'])) { - $this->x += ($this->pagedim[$page]['olm'] - $this->pagedim[$startpage]['olm']); - } - } - if ($startpage == $endpage) { - // single page - for ($column = $startcolumn; $column <= $endcolumn; ++$column) { // for each column - $this->selectColumn($column); - if ($this->rtl) { - $this->x -= $mc_margin['R']; - } else { - $this->x += $mc_margin['L']; - } - if ($startcolumn == $endcolumn) { // single column - $cborder = $border; - $h = max($h, ($currentY - $oy)); - $this->y = $oy; - } elseif ($column == $startcolumn) { // first column - $cborder = $border_start; - $this->y = $oy; - $h = $this->h - $this->y - $this->bMargin; - } elseif ($column == $endcolumn) { // end column - $cborder = $border_end; - $h = $currentY - $this->y; - if ($resth > $h) { - $h = $resth; - } - } else { // middle column - $cborder = $border_middle; - $h = $this->h - $this->y - $this->bMargin; - $resth -= $h; - } - $ccode .= $this->getCellCode($w, $h, '', $cborder, 1, '', $fill, '', 0, true)."\n"; - } // end for each column - } elseif ($page == $startpage) { // first page - for ($column = $startcolumn; $column < $this->num_columns; ++$column) { // for each column - $this->selectColumn($column); - if ($this->rtl) { - $this->x -= $mc_margin['R']; - } else { - $this->x += $mc_margin['L']; - } - if ($column == $startcolumn) { // first column - $cborder = $border_start; - $this->y = $oy; - $h = $this->h - $this->y - $this->bMargin; - } else { // middle column - $cborder = $border_middle; - $h = $this->h - $this->y - $this->bMargin; - $resth -= $h; - } - $ccode .= $this->getCellCode($w, $h, '', $cborder, 1, '', $fill, '', 0, true)."\n"; - } // end for each column - } elseif ($page == $endpage) { // last page - for ($column = 0; $column <= $endcolumn; ++$column) { // for each column - $this->selectColumn($column); - if ($this->rtl) { - $this->x -= $mc_margin['R']; - } else { - $this->x += $mc_margin['L']; - } - if ($column == $endcolumn) { - // end column - $cborder = $border_end; - $h = $currentY - $this->y; - if ($resth > $h) { - $h = $resth; - } - } else { - // middle column - $cborder = $border_middle; - $h = $this->h - $this->y - $this->bMargin; - $resth -= $h; - } - $ccode .= $this->getCellCode($w, $h, '', $cborder, 1, '', $fill, '', 0, true)."\n"; - } // end for each column - } else { // middle page - for ($column = 0; $column < $this->num_columns; ++$column) { // for each column - $this->selectColumn($column); - if ($this->rtl) { - $this->x -= $mc_margin['R']; - } else { - $this->x += $mc_margin['L']; - } - $cborder = $border_middle; - $h = $this->h - $this->y - $this->bMargin; - $resth -= $h; - $ccode .= $this->getCellCode($w, $h, '', $cborder, 1, '', $fill, '', 0, true)."\n"; - } // end for each column - } - if ($cborder OR $fill) { - $offsetlen = strlen($ccode); - // draw border and fill - if ($this->inxobj) { - // we are inside an XObject template - if (end($this->xobjects[$this->xobjid]['transfmrk']) !== false) { - $pagemarkkey = key($this->xobjects[$this->xobjid]['transfmrk']); - $pagemark = $this->xobjects[$this->xobjid]['transfmrk'][$pagemarkkey]; - $this->xobjects[$this->xobjid]['transfmrk'][$pagemarkkey] += $offsetlen; - } else { - $pagemark = $this->xobjects[$this->xobjid]['intmrk']; - $this->xobjects[$this->xobjid]['intmrk'] += $offsetlen; - } - $pagebuff = $this->xobjects[$this->xobjid]['outdata']; - $pstart = substr($pagebuff, 0, $pagemark); - $pend = substr($pagebuff, $pagemark); - $this->xobjects[$this->xobjid]['outdata'] = $pstart.$ccode.$pend; - } else { - if (end($this->transfmrk[$this->page]) !== false) { - $pagemarkkey = key($this->transfmrk[$this->page]); - $pagemark = $this->transfmrk[$this->page][$pagemarkkey]; - $this->transfmrk[$this->page][$pagemarkkey] += $offsetlen; - } elseif ($this->InFooter) { - $pagemark = $this->footerpos[$this->page]; - $this->footerpos[$this->page] += $offsetlen; - } else { - $pagemark = $this->intmrk[$this->page]; - $this->intmrk[$this->page] += $offsetlen; - } - $pagebuff = $this->getPageBuffer($this->page); - $pstart = substr($pagebuff, 0, $pagemark); - $pend = substr($pagebuff, $pagemark); - $this->setPageBuffer($this->page, $pstart.$ccode.$pend); - } - } - } // end for each page - // restore page regions check - $this->check_page_regions = $check_page_regions; - // Get end-of-cell Y position - $currentY = $this->GetY(); - // restore previous values - if ($this->num_columns > 1) { - $this->selectColumn(); - } else { - // restore original margins - $this->lMargin = $lMargin; - $this->rMargin = $rMargin; - if ($this->page > $startpage) { - // check for margin variations between pages (i.e. booklet mode) - $dl = ($this->pagedim[$this->page]['olm'] - $this->pagedim[$startpage]['olm']); - $dr = ($this->pagedim[$this->page]['orm'] - $this->pagedim[$startpage]['orm']); - if (($dl != 0) OR ($dr != 0)) { - $this->lMargin += $dl; - $this->rMargin += $dr; - } - } - } - if ($ln > 0) { - //Go to the beginning of the next line - $this->SetY($currentY + $mc_margin['B']); - if ($ln == 2) { - $this->SetX($x + $w + $mc_margin['L'] + $mc_margin['R']); - } - } else { - // go left or right by case - $this->setPage($startpage); - $this->y = $y; - $this->SetX($x + $w + $mc_margin['L'] + $mc_margin['R']); - } - $this->setContentMark(); - $this->cell_padding = $prev_cell_padding; - $this->cell_margin = $prev_cell_margin; - $this->clMargin = $this->lMargin; - $this->crMargin = $this->rMargin; - return $nl; - } - - /** - * This method return the estimated number of lines for print a simple text string using Multicell() method. - * @param $txt (string) String for calculating his height - * @param $w (float) Width of cells. If 0, they extend up to the right margin of the page. - * @param $reseth (boolean) if true reset the last cell height (default false). - * @param $autopadding (boolean) if true, uses internal padding and automatically adjust it to account for line width (default true). - * @param $cellpadding (float) Internal cell padding, if empty uses default cell padding. - * @param $border (mixed) Indicates if borders must be drawn around the cell. The value can be a number:
          • 0: no border (default)
          • 1: frame
          or a string containing some or all of the following characters (in any order):
          • L: left
          • T: top
          • R: right
          • B: bottom
          or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) - * @return float Return the minimal height needed for multicell method for printing the $txt param. - * @author Alexander Escalona Fern\E1ndez, Nicola Asuni - * @public - * @since 4.5.011 - */ - public function getNumLines($txt, $w=0, $reseth=false, $autopadding=true, $cellpadding='', $border=0) { - if ($txt === NULL) { - return 0; - } - if ($txt === '') { - // empty string - return 1; - } - // adjust internal padding - $prev_cell_padding = $this->cell_padding; - $prev_lasth = $this->lasth; - if (is_array($cellpadding)) { - $this->cell_padding = $cellpadding; - } - $this->adjustCellPadding($border); - if (TCPDF_STATIC::empty_string($w) OR ($w <= 0)) { - if ($this->rtl) { - $w = $this->x - $this->lMargin; - } else { - $w = $this->w - $this->rMargin - $this->x; - } - } - $wmax = $w - $this->cell_padding['L'] - $this->cell_padding['R']; - if ($reseth) { - // reset row height - $this->resetLastH(); - } - $lines = 1; - $sum = 0; - $chars = TCPDF_FONTS::utf8Bidi(TCPDF_FONTS::UTF8StringToArray($txt, $this->isunicode, $this->CurrentFont), $txt, $this->tmprtl, $this->isunicode, $this->CurrentFont); - $charsWidth = $this->GetArrStringWidth($chars, '', '', 0, true); - $length = count($chars); - $lastSeparator = -1; - for ($i = 0; $i < $length; ++$i) { - $c = $chars[$i]; - $charWidth = $charsWidth[$i]; - if (($c != 160) - AND (($c == 173) - OR preg_match($this->re_spaces, TCPDF_FONTS::unichr($c, $this->isunicode)) - OR (($c == 45) - AND ($i > 0) AND ($i < ($length - 1)) - AND @preg_match('/[\p{L}]/'.$this->re_space['m'], TCPDF_FONTS::unichr($chars[($i - 1)], $this->isunicode)) - AND @preg_match('/[\p{L}]/'.$this->re_space['m'], TCPDF_FONTS::unichr($chars[($i + 1)], $this->isunicode)) - ) - ) - ) { - $lastSeparator = $i; - } - if ((($sum + $charWidth) > $wmax) OR ($c == 10)) { - ++$lines; - if ($c == 10) { - $lastSeparator = -1; - $sum = 0; - } elseif ($lastSeparator != -1) { - $i = $lastSeparator; - $lastSeparator = -1; - $sum = 0; - } else { - $sum = $charWidth; - } - } else { - $sum += $charWidth; - } - } - if ($chars[($length - 1)] == 10) { - --$lines; - } - $this->cell_padding = $prev_cell_padding; - $this->lasth = $prev_lasth; - return $lines; - } - - /** - * This method return the estimated height needed for printing a simple text string using the Multicell() method. - * Generally, if you want to know the exact height for a block of content you can use the following alternative technique: - * @pre - * // store current object - * $pdf->startTransaction(); - * // store starting values - * $start_y = $pdf->GetY(); - * $start_page = $pdf->getPage(); - * // call your printing functions with your parameters - * // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * $pdf->MultiCell($w=0, $h=0, $txt, $border=1, $align='L', $fill=false, $ln=1, $x='', $y='', $reseth=true, $stretch=0, $ishtml=false, $autopadding=true, $maxh=0); - * // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * // get the new Y - * $end_y = $pdf->GetY(); - * $end_page = $pdf->getPage(); - * // calculate height - * $height = 0; - * if ($end_page == $start_page) { - * $height = $end_y - $start_y; - * } else { - * for ($page=$start_page; $page <= $end_page; ++$page) { - * $this->setPage($page); - * if ($page == $start_page) { - * // first page - * $height = $this->h - $start_y - $this->bMargin; - * } elseif ($page == $end_page) { - * // last page - * $height = $end_y - $this->tMargin; - * } else { - * $height = $this->h - $this->tMargin - $this->bMargin; - * } - * } - * } - * // restore previous object - * $pdf = $pdf->rollbackTransaction(); - * - * @param $w (float) Width of cells. If 0, they extend up to the right margin of the page. - * @param $txt (string) String for calculating his height - * @param $reseth (boolean) if true reset the last cell height (default false). - * @param $autopadding (boolean) if true, uses internal padding and automatically adjust it to account for line width (default true). - * @param $cellpadding (float) Internal cell padding, if empty uses default cell padding. - * @param $border (mixed) Indicates if borders must be drawn around the cell. The value can be a number:
          • 0: no border (default)
          • 1: frame
          or a string containing some or all of the following characters (in any order):
          • L: left
          • T: top
          • R: right
          • B: bottom
          or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) - * @return float Return the minimal height needed for multicell method for printing the $txt param. - * @author Nicola Asuni, Alexander Escalona Fern\E1ndez - * @public - */ - public function getStringHeight($w, $txt, $reseth=false, $autopadding=true, $cellpadding='', $border=0) { - // adjust internal padding - $prev_cell_padding = $this->cell_padding; - $prev_lasth = $this->lasth; - if (is_array($cellpadding)) { - $this->cell_padding = $cellpadding; - } - $this->adjustCellPadding($border); - $lines = $this->getNumLines($txt, $w, $reseth, $autopadding, $cellpadding, $border); - $height = $this->getCellHeight(($lines * $this->FontSize), $autopadding); - $this->cell_padding = $prev_cell_padding; - $this->lasth = $prev_lasth; - return $height; - } - - /** - * This method prints text from the current position.
          - * @param $h (float) Line height - * @param $txt (string) String to print - * @param $link (mixed) URL or identifier returned by AddLink() - * @param $fill (boolean) Indicates if the cell background must be painted (true) or transparent (false). - * @param $align (string) Allows to center or align the text. Possible values are:
          • L or empty string: left align (default value)
          • C: center
          • R: right align
          • J: justify
          - * @param $ln (boolean) if true set cursor at the bottom of the line, otherwise set cursor at the top of the line. - * @param $stretch (int) font stretch mode:
          • 0 = disabled
          • 1 = horizontal scaling only if text is larger than cell width
          • 2 = forced horizontal scaling to fit cell width
          • 3 = character spacing only if text is larger than cell width
          • 4 = forced character spacing to fit cell width
          General font stretching and scaling values will be preserved when possible. - * @param $firstline (boolean) if true prints only the first line and return the remaining string. - * @param $firstblock (boolean) if true the string is the starting of a line. - * @param $maxh (float) maximum height. It should be >= $h and less then remaining space to the bottom of the page, or 0 for disable this feature. - * @param $wadj (float) first line width will be reduced by this amount (used in HTML mode). - * @param $margin (array) margin array of the parent container - * @return mixed Return the number of cells or the remaining string if $firstline = true. - * @public - * @since 1.5 - */ - public function Write($h, $txt, $link='', $fill=false, $align='', $ln=false, $stretch=0, $firstline=false, $firstblock=false, $maxh=0, $wadj=0, $margin='') { - // check page for no-write regions and adapt page margins if necessary - list($this->x, $this->y) = $this->checkPageRegions($h, $this->x, $this->y); - if (strlen($txt) == 0) { - // fix empty text - $txt = ' '; - } - if ($margin === '') { - // set default margins - $margin = $this->cell_margin; - } - // remove carriage returns - $s = str_replace("\r", '', $txt); - // check if string contains arabic text - if (preg_match(TCPDF_FONT_DATA::$uni_RE_PATTERN_ARABIC, $s)) { - $arabic = true; - } else { - $arabic = false; - } - // check if string contains RTL text - if ($arabic OR ($this->tmprtl == 'R') OR preg_match(TCPDF_FONT_DATA::$uni_RE_PATTERN_RTL, $s)) { - $rtlmode = true; - } else { - $rtlmode = false; - } - // get a char width - $chrwidth = $this->GetCharWidth(46); // dot character - // get array of unicode values - $chars = TCPDF_FONTS::UTF8StringToArray($s, $this->isunicode, $this->CurrentFont); - // calculate maximum width for a single character on string - $chrw = $this->GetArrStringWidth($chars, '', '', 0, true); - array_walk($chrw, array($this, 'getRawCharWidth')); - $maxchwidth = max($chrw); - // get array of chars - $uchars = TCPDF_FONTS::UTF8ArrayToUniArray($chars, $this->isunicode); - // get the number of characters - $nb = count($chars); - // replacement for SHY character (minus symbol) - $shy_replacement = 45; - $shy_replacement_char = TCPDF_FONTS::unichr($shy_replacement, $this->isunicode); - // widht for SHY replacement - $shy_replacement_width = $this->GetCharWidth($shy_replacement); - // page width - $pw = $w = $this->w - $this->lMargin - $this->rMargin; - // calculate remaining line width ($w) - if ($this->rtl) { - $w = $this->x - $this->lMargin; - } else { - $w = $this->w - $this->rMargin - $this->x; - } - // max column width - $wmax = ($w - $wadj); - if (!$firstline) { - $wmax -= ($this->cell_padding['L'] + $this->cell_padding['R']); - } - if ((!$firstline) AND (($chrwidth > $wmax) OR ($maxchwidth > $wmax))) { - // the maximum width character do not fit on column - return ''; - } - // minimum row height - $row_height = max($h, $this->getCellHeight($this->FontSize)); - // max Y - $maxy = $this->y + $maxh - max($row_height, $h); - $start_page = $this->page; - $i = 0; // character position - $j = 0; // current starting position - $sep = -1; // position of the last blank space - $prevsep = $sep; // previous separator - $shy = false; // true if the last blank is a soft hypen (SHY) - $prevshy = $shy; // previous shy mode - $l = 0; // current string length - $nl = 0; //number of lines - $linebreak = false; - $pc = 0; // previous character - // for each character - while ($i < $nb) { - if (($maxh > 0) AND ($this->y > $maxy) ) { - break; - } - //Get the current character - $c = $chars[$i]; - if ($c == 10) { // 10 = "\n" = new line - //Explicit line break - if ($align == 'J') { - if ($this->rtl) { - $talign = 'R'; - } else { - $talign = 'L'; - } - } else { - $talign = $align; - } - $tmpstr = TCPDF_FONTS::UniArrSubString($uchars, $j, $i); - if ($firstline) { - $startx = $this->x; - $tmparr = array_slice($chars, $j, ($i - $j)); - if ($rtlmode) { - $tmparr = TCPDF_FONTS::utf8Bidi($tmparr, $tmpstr, $this->tmprtl, $this->isunicode, $this->CurrentFont); - } - $linew = $this->GetArrStringWidth($tmparr); - unset($tmparr); - if ($this->rtl) { - $this->endlinex = $startx - $linew; - } else { - $this->endlinex = $startx + $linew; - } - $w = $linew; - $tmpcellpadding = $this->cell_padding; - if ($maxh == 0) { - $this->SetCellPadding(0); - } - } - if ($firstblock AND $this->isRTLTextDir()) { - $tmpstr = $this->stringRightTrim($tmpstr); - } - // Skip newlines at the beginning of a page or column - if (!empty($tmpstr) OR ($this->y < ($this->PageBreakTrigger - $row_height))) { - $this->Cell($w, $h, $tmpstr, 0, 1, $talign, $fill, $link, $stretch); - } - unset($tmpstr); - if ($firstline) { - $this->cell_padding = $tmpcellpadding; - return (TCPDF_FONTS::UniArrSubString($uchars, $i)); - } - ++$nl; - $j = $i + 1; - $l = 0; - $sep = -1; - $prevsep = $sep; - $shy = false; - // account for margin changes - if ((($this->y + $this->lasth) > $this->PageBreakTrigger) AND ($this->inPageBody())) { - $this->AcceptPageBreak(); - if ($this->rtl) { - $this->x -= $margin['R']; - } else { - $this->x += $margin['L']; - } - $this->lMargin += $margin['L']; - $this->rMargin += $margin['R']; - } - $w = $this->getRemainingWidth(); - $wmax = ($w - $this->cell_padding['L'] - $this->cell_padding['R']); - } else { - // 160 is the non-breaking space. - // 173 is SHY (Soft Hypen). - // \p{Z} or \p{Separator}: any kind of Unicode whitespace or invisible separator. - // \p{Lo} or \p{Other_Letter}: a Unicode letter or ideograph that does not have lowercase and uppercase variants. - // \p{Lo} is needed because Chinese characters are packed next to each other without spaces in between. - if (($c != 160) - AND (($c == 173) - OR preg_match($this->re_spaces, TCPDF_FONTS::unichr($c, $this->isunicode)) - OR (($c == 45) - AND ($i < ($nb - 1)) - AND @preg_match('/[\p{L}]/'.$this->re_space['m'], TCPDF_FONTS::unichr($pc, $this->isunicode)) - AND @preg_match('/[\p{L}]/'.$this->re_space['m'], TCPDF_FONTS::unichr($chars[($i + 1)], $this->isunicode)) - ) - ) - ) { - // update last blank space position - $prevsep = $sep; - $sep = $i; - // check if is a SHY - if (($c == 173) OR ($c == 45)) { - $prevshy = $shy; - $shy = true; - if ($pc == 45) { - $tmp_shy_replacement_width = 0; - $tmp_shy_replacement_char = ''; - } else { - $tmp_shy_replacement_width = $shy_replacement_width; - $tmp_shy_replacement_char = $shy_replacement_char; - } - } else { - $shy = false; - } - } - // update string length - if ($this->isUnicodeFont() AND ($arabic)) { - // with bidirectional algorithm some chars may be changed affecting the line length - // *** very slow *** - $l = $this->GetArrStringWidth(TCPDF_FONTS::utf8Bidi(array_slice($chars, $j, ($i - $j)), '', $this->tmprtl, $this->isunicode, $this->CurrentFont)); - } else { - $l += $this->GetCharWidth($c); - } - if (($l > $wmax) OR (($c == 173) AND (($l + $tmp_shy_replacement_width) >= $wmax))) { - if (($c == 173) AND (($l + $tmp_shy_replacement_width) > $wmax)) { - $sep = $prevsep; - $shy = $prevshy; - } - // we have reached the end of column - if ($sep == -1) { - // check if the line was already started - if (($this->rtl AND ($this->x <= ($this->w - $this->rMargin - $this->cell_padding['R'] - $margin['R'] - $chrwidth))) - OR ((!$this->rtl) AND ($this->x >= ($this->lMargin + $this->cell_padding['L'] + $margin['L'] + $chrwidth)))) { - // print a void cell and go to next line - $this->Cell($w, $h, '', 0, 1); - $linebreak = true; - if ($firstline) { - return (TCPDF_FONTS::UniArrSubString($uchars, $j)); - } - } else { - // truncate the word because do not fit on column - $tmpstr = TCPDF_FONTS::UniArrSubString($uchars, $j, $i); - if ($firstline) { - $startx = $this->x; - $tmparr = array_slice($chars, $j, ($i - $j)); - if ($rtlmode) { - $tmparr = TCPDF_FONTS::utf8Bidi($tmparr, $tmpstr, $this->tmprtl, $this->isunicode, $this->CurrentFont); - } - $linew = $this->GetArrStringWidth($tmparr); - unset($tmparr); - if ($this->rtl) { - $this->endlinex = $startx - $linew; - } else { - $this->endlinex = $startx + $linew; - } - $w = $linew; - $tmpcellpadding = $this->cell_padding; - if ($maxh == 0) { - $this->SetCellPadding(0); - } - } - if ($firstblock AND $this->isRTLTextDir()) { - $tmpstr = $this->stringRightTrim($tmpstr); - } - $this->Cell($w, $h, $tmpstr, 0, 1, $align, $fill, $link, $stretch); - unset($tmpstr); - if ($firstline) { - $this->cell_padding = $tmpcellpadding; - return (TCPDF_FONTS::UniArrSubString($uchars, $i)); - } - $j = $i; - --$i; - } - } else { - // word wrapping - if ($this->rtl AND (!$firstblock) AND ($sep < $i)) { - $endspace = 1; - } else { - $endspace = 0; - } - // check the length of the next string - $strrest = TCPDF_FONTS::UniArrSubString($uchars, ($sep + $endspace)); - $nextstr = TCPDF_STATIC::pregSplit('/'.$this->re_space['p'].'/', $this->re_space['m'], $this->stringTrim($strrest)); - if (isset($nextstr[0]) AND ($this->GetStringWidth($nextstr[0]) > $pw)) { - // truncate the word because do not fit on a full page width - $tmpstr = TCPDF_FONTS::UniArrSubString($uchars, $j, $i); - if ($firstline) { - $startx = $this->x; - $tmparr = array_slice($chars, $j, ($i - $j)); - if ($rtlmode) { - $tmparr = TCPDF_FONTS::utf8Bidi($tmparr, $tmpstr, $this->tmprtl, $this->isunicode, $this->CurrentFont); - } - $linew = $this->GetArrStringWidth($tmparr); - unset($tmparr); - if ($this->rtl) { - $this->endlinex = ($startx - $linew); - } else { - $this->endlinex = ($startx + $linew); - } - $w = $linew; - $tmpcellpadding = $this->cell_padding; - if ($maxh == 0) { - $this->SetCellPadding(0); - } - } - if ($firstblock AND $this->isRTLTextDir()) { - $tmpstr = $this->stringRightTrim($tmpstr); - } - $this->Cell($w, $h, $tmpstr, 0, 1, $align, $fill, $link, $stretch); - unset($tmpstr); - if ($firstline) { - $this->cell_padding = $tmpcellpadding; - return (TCPDF_FONTS::UniArrSubString($uchars, $i)); - } - $j = $i; - --$i; - } else { - // word wrapping - if ($shy) { - // add hypen (minus symbol) at the end of the line - $shy_width = $tmp_shy_replacement_width; - if ($this->rtl) { - $shy_char_left = $tmp_shy_replacement_char; - $shy_char_right = ''; - } else { - $shy_char_left = ''; - $shy_char_right = $tmp_shy_replacement_char; - } - } else { - $shy_width = 0; - $shy_char_left = ''; - $shy_char_right = ''; - } - $tmpstr = TCPDF_FONTS::UniArrSubString($uchars, $j, ($sep + $endspace)); - if ($firstline) { - $startx = $this->x; - $tmparr = array_slice($chars, $j, (($sep + $endspace) - $j)); - if ($rtlmode) { - $tmparr = TCPDF_FONTS::utf8Bidi($tmparr, $tmpstr, $this->tmprtl, $this->isunicode, $this->CurrentFont); - } - $linew = $this->GetArrStringWidth($tmparr); - unset($tmparr); - if ($this->rtl) { - $this->endlinex = $startx - $linew - $shy_width; - } else { - $this->endlinex = $startx + $linew + $shy_width; - } - $w = $linew; - $tmpcellpadding = $this->cell_padding; - if ($maxh == 0) { - $this->SetCellPadding(0); - } - } - // print the line - if ($firstblock AND $this->isRTLTextDir()) { - $tmpstr = $this->stringRightTrim($tmpstr); - } - $this->Cell($w, $h, $shy_char_left.$tmpstr.$shy_char_right, 0, 1, $align, $fill, $link, $stretch); - unset($tmpstr); - if ($firstline) { - if ($chars[$sep] == 45) { - $endspace += 1; - } - // return the remaining text - $this->cell_padding = $tmpcellpadding; - return (TCPDF_FONTS::UniArrSubString($uchars, ($sep + $endspace))); - } - $i = $sep; - $sep = -1; - $shy = false; - $j = ($i + 1); - } - } - // account for margin changes - if ((($this->y + $this->lasth) > $this->PageBreakTrigger) AND ($this->inPageBody())) { - $this->AcceptPageBreak(); - if ($this->rtl) { - $this->x -= $margin['R']; - } else { - $this->x += $margin['L']; - } - $this->lMargin += $margin['L']; - $this->rMargin += $margin['R']; - } - $w = $this->getRemainingWidth(); - $wmax = $w - $this->cell_padding['L'] - $this->cell_padding['R']; - if ($linebreak) { - $linebreak = false; - } else { - ++$nl; - $l = 0; - } - } - } - // save last character - $pc = $c; - ++$i; - } // end while i < nb - // print last substring (if any) - if ($l > 0) { - switch ($align) { - case 'J': - case 'C': { - $w = $w; - break; - } - case 'L': { - if ($this->rtl) { - $w = $w; - } else { - $w = $l; - } - break; - } - case 'R': { - if ($this->rtl) { - $w = $l; - } else { - $w = $w; - } - break; - } - default: { - $w = $l; - break; - } - } - $tmpstr = TCPDF_FONTS::UniArrSubString($uchars, $j, $nb); - if ($firstline) { - $startx = $this->x; - $tmparr = array_slice($chars, $j, ($nb - $j)); - if ($rtlmode) { - $tmparr = TCPDF_FONTS::utf8Bidi($tmparr, $tmpstr, $this->tmprtl, $this->isunicode, $this->CurrentFont); - } - $linew = $this->GetArrStringWidth($tmparr); - unset($tmparr); - if ($this->rtl) { - $this->endlinex = $startx - $linew; - } else { - $this->endlinex = $startx + $linew; - } - $w = $linew; - $tmpcellpadding = $this->cell_padding; - if ($maxh == 0) { - $this->SetCellPadding(0); - } - } - if ($firstblock AND $this->isRTLTextDir()) { - $tmpstr = $this->stringRightTrim($tmpstr); - } - $this->Cell($w, $h, $tmpstr, 0, $ln, $align, $fill, $link, $stretch); - unset($tmpstr); - if ($firstline) { - $this->cell_padding = $tmpcellpadding; - return (TCPDF_FONTS::UniArrSubString($uchars, $nb)); - } - ++$nl; - } - if ($firstline) { - return ''; - } - return $nl; - } - - /** - * Returns the remaining width between the current position and margins. - * @return int Return the remaining width - * @protected - */ - protected function getRemainingWidth() { - list($this->x, $this->y) = $this->checkPageRegions(0, $this->x, $this->y); - if ($this->rtl) { - return ($this->x - $this->lMargin); - } else { - return ($this->w - $this->rMargin - $this->x); - } - } - - /** - * Set the block dimensions accounting for page breaks and page/column fitting - * @param $w (float) width - * @param $h (float) height - * @param $x (float) X coordinate - * @param $y (float) Y coodiante - * @param $fitonpage (boolean) if true the block is resized to not exceed page dimensions. - * @return array($w, $h, $x, $y) - * @protected - * @since 5.5.009 (2010-07-05) - */ - protected function fitBlock($w, $h, $x, $y, $fitonpage=false) { - if ($w <= 0) { - // set maximum width - $w = ($this->w - $this->lMargin - $this->rMargin); - if ($w <= 0) { - $w = 1; - } - } - if ($h <= 0) { - // set maximum height - $h = ($this->PageBreakTrigger - $this->tMargin); - if ($h <= 0) { - $h = 1; - } - } - // resize the block to be vertically contained on a single page or single column - if ($fitonpage OR $this->AutoPageBreak) { - $ratio_wh = ($w / $h); - if ($h > ($this->PageBreakTrigger - $this->tMargin)) { - $h = $this->PageBreakTrigger - $this->tMargin; - $w = ($h * $ratio_wh); - } - // resize the block to be horizontally contained on a single page or single column - if ($fitonpage) { - $maxw = ($this->w - $this->lMargin - $this->rMargin); - if ($w > $maxw) { - $w = $maxw; - $h = ($w / $ratio_wh); - } - } - } - // Check whether we need a new page or new column first as this does not fit - $prev_x = $this->x; - $prev_y = $this->y; - if ($this->checkPageBreak($h, $y) OR ($this->y < $prev_y)) { - $y = $this->y; - if ($this->rtl) { - $x += ($prev_x - $this->x); - } else { - $x += ($this->x - $prev_x); - } - $this->newline = true; - } - // resize the block to be contained on the remaining available page or column space - if ($fitonpage) { - $ratio_wh = ($w / $h); - if (($y + $h) > $this->PageBreakTrigger) { - $h = $this->PageBreakTrigger - $y; - $w = ($h * $ratio_wh); - } - if ((!$this->rtl) AND (($x + $w) > ($this->w - $this->rMargin))) { - $w = $this->w - $this->rMargin - $x; - $h = ($w / $ratio_wh); - } elseif (($this->rtl) AND (($x - $w) < ($this->lMargin))) { - $w = $x - $this->lMargin; - $h = ($w / $ratio_wh); - } - } - return array($w, $h, $x, $y); - } - - /** - * Puts an image in the page. - * The upper-left corner must be given. - * The dimensions can be specified in different ways:
            - *
          • explicit width and height (expressed in user unit)
          • - *
          • one explicit dimension, the other being calculated automatically in order to keep the original proportions
          • - *
          • no explicit dimension, in which case the image is put at 72 dpi
          - * Supported formats are JPEG and PNG images whitout GD library and all images supported by GD: GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM; - * The format can be specified explicitly or inferred from the file extension.
          - * It is possible to put a link on the image.
          - * Remark: if an image is used several times, only one copy will be embedded in the file.
          - * @param $file (string) Name of the file containing the image or a '@' character followed by the image data string. To link an image without embedding it on the document, set an asterisk character before the URL (i.e.: '*http://www.example.com/image.jpg'). - * @param $x (float) Abscissa of the upper-left corner (LTR) or upper-right corner (RTL). - * @param $y (float) Ordinate of the upper-left corner (LTR) or upper-right corner (RTL). - * @param $w (float) Width of the image in the page. If not specified or equal to zero, it is automatically calculated. - * @param $h (float) Height of the image in the page. If not specified or equal to zero, it is automatically calculated. - * @param $type (string) Image format. Possible values are (case insensitive): JPEG and PNG (whitout GD library) and all images supported by GD: GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM;. If not specified, the type is inferred from the file extension. - * @param $link (mixed) URL or identifier returned by AddLink(). - * @param $align (string) Indicates the alignment of the pointer next to image insertion relative to image height. The value can be:
          • T: top-right for LTR or top-left for RTL
          • M: middle-right for LTR or middle-left for RTL
          • B: bottom-right for LTR or bottom-left for RTL
          • N: next line
          - * @param $resize (mixed) If true resize (reduce) the image to fit $w and $h (requires GD or ImageMagick library); if false do not resize; if 2 force resize in all cases (upscaling and downscaling). - * @param $dpi (int) dot-per-inch resolution used on resize - * @param $palign (string) Allows to center or align the image on the current line. Possible values are:
          • L : left align
          • C : center
          • R : right align
          • '' : empty string : left for LTR or right for RTL
          - * @param $ismask (boolean) true if this image is a mask, false otherwise - * @param $imgmask (mixed) image object returned by this function or false - * @param $border (mixed) Indicates if borders must be drawn around the cell. The value can be a number:
          • 0: no border (default)
          • 1: frame
          or a string containing some or all of the following characters (in any order):
          • L: left
          • T: top
          • R: right
          • B: bottom
          or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) - * @param $fitbox (mixed) If not false scale image dimensions proportionally to fit within the ($w, $h) box. $fitbox can be true or a 2 characters string indicating the image alignment inside the box. The first character indicate the horizontal alignment (L = left, C = center, R = right) the second character indicate the vertical algnment (T = top, M = middle, B = bottom). - * @param $hidden (boolean) If true do not display the image. - * @param $fitonpage (boolean) If true the image is resized to not exceed page dimensions. - * @param $alt (boolean) If true the image will be added as alternative and not directly printed (the ID of the image will be returned). - * @param $altimgs (array) Array of alternate images IDs. Each alternative image must be an array with two values: an integer representing the image ID (the value returned by the Image method) and a boolean value to indicate if the image is the default for printing. - * @return image information - * @public - * @since 1.1 - */ - public function Image($file, $x='', $y='', $w=0, $h=0, $type='', $link='', $align='', $resize=false, $dpi=300, $palign='', $ismask=false, $imgmask=false, $border=0, $fitbox=false, $hidden=false, $fitonpage=false, $alt=false, $altimgs=array()) { - if ($this->state != 2) { - return; - } - if (strcmp($x, '') === 0) { - $x = $this->x; - } - if (strcmp($y, '') === 0) { - $y = $this->y; - } - // check page for no-write regions and adapt page margins if necessary - list($x, $y) = $this->checkPageRegions($h, $x, $y); - $exurl = ''; // external streams - $imsize = FALSE; - // check if we are passing an image as file or string - if ($file[0] === '@') { - // image from string - $imgdata = substr($file, 1); - } else { // image file - if ($file[0] === '*') { - // image as external stream - $file = substr($file, 1); - $exurl = $file; - } - // check if is a local file - if (!@file_exists($file)) { - // try to encode spaces on filename - $tfile = str_replace(' ', '%20', $file); - if (@file_exists($tfile)) { - $file = $tfile; - } - } - if (($imsize = @getimagesize($file)) === FALSE) { - if (in_array($file, $this->imagekeys)) { - // get existing image data - $info = $this->getImageBuffer($file); - $imsize = array($info['w'], $info['h']); - } elseif (strpos($file, '__tcpdf_'.$this->file_id.'_img') === FALSE) { - $imgdata = TCPDF_STATIC::fileGetContents($file); - } - } - } - if (!empty($imgdata)) { - // copy image to cache - $original_file = $file; - $file = TCPDF_STATIC::getObjFilename('img', $this->file_id); - $fp = TCPDF_STATIC::fopenLocal($file, 'w'); - if (!$fp) { - $this->Error('Unable to write file: '.$file); - } - fwrite($fp, $imgdata); - fclose($fp); - unset($imgdata); - $imsize = @getimagesize($file); - if ($imsize === FALSE) { - unlink($file); - $file = $original_file; - } - } - if ($imsize === FALSE) { - if (($w > 0) AND ($h > 0)) { - // get measures from specified data - $pw = $this->getHTMLUnitToUnits($w, 0, $this->pdfunit, true) * $this->imgscale * $this->k; - $ph = $this->getHTMLUnitToUnits($h, 0, $this->pdfunit, true) * $this->imgscale * $this->k; - $imsize = array($pw, $ph); - } else { - $this->Error('[Image] Unable to get the size of the image: '.$file); - } - } - // file hash - $filehash = md5($file); - // get original image width and height in pixels - list($pixw, $pixh) = $imsize; - // calculate image width and height on document - if (($w <= 0) AND ($h <= 0)) { - // convert image size to document unit - $w = $this->pixelsToUnits($pixw); - $h = $this->pixelsToUnits($pixh); - } elseif ($w <= 0) { - $w = $h * $pixw / $pixh; - } elseif ($h <= 0) { - $h = $w * $pixh / $pixw; - } elseif (($fitbox !== false) AND ($w > 0) AND ($h > 0)) { - if (strlen($fitbox) !== 2) { - // set default alignment - $fitbox = '--'; - } - // scale image dimensions proportionally to fit within the ($w, $h) box - if ((($w * $pixh) / ($h * $pixw)) < 1) { - // store current height - $oldh = $h; - // calculate new height - $h = $w * $pixh / $pixw; - // height difference - $hdiff = ($oldh - $h); - // vertical alignment - switch (strtoupper($fitbox[1])) { - case 'T': { - break; - } - case 'M': { - $y += ($hdiff / 2); - break; - } - case 'B': { - $y += $hdiff; - break; - } - } - } else { - // store current width - $oldw = $w; - // calculate new width - $w = $h * $pixw / $pixh; - // width difference - $wdiff = ($oldw - $w); - // horizontal alignment - switch (strtoupper($fitbox[0])) { - case 'L': { - if ($this->rtl) { - $x -= $wdiff; - } - break; - } - case 'C': { - if ($this->rtl) { - $x -= ($wdiff / 2); - } else { - $x += ($wdiff / 2); - } - break; - } - case 'R': { - if (!$this->rtl) { - $x += $wdiff; - } - break; - } - } - } - } - // fit the image on available space - list($w, $h, $x, $y) = $this->fitBlock($w, $h, $x, $y, $fitonpage); - // calculate new minimum dimensions in pixels - $neww = round($w * $this->k * $dpi / $this->dpi); - $newh = round($h * $this->k * $dpi / $this->dpi); - // check if resize is necessary (resize is used only to reduce the image) - $newsize = ($neww * $newh); - $pixsize = ($pixw * $pixh); - if (intval($resize) == 2) { - $resize = true; - } elseif ($newsize >= $pixsize) { - $resize = false; - } - // check if image has been already added on document - $newimage = true; - if (in_array($file, $this->imagekeys)) { - $newimage = false; - // get existing image data - $info = $this->getImageBuffer($file); - if (strpos($file, '__tcpdf_'.$this->file_id.'_imgmask_') === FALSE) { - // check if the newer image is larger - $oldsize = ($info['w'] * $info['h']); - if ((($oldsize < $newsize) AND ($resize)) OR (($oldsize < $pixsize) AND (!$resize))) { - $newimage = true; - } - } - } elseif (($ismask === false) AND ($imgmask === false) AND (strpos($file, '__tcpdf_'.$this->file_id.'_imgmask_') === FALSE)) { - // create temp image file (without alpha channel) - $tempfile_plain = K_PATH_CACHE.'__tcpdf_'.$this->file_id.'_imgmask_plain_'.$filehash; - // create temp alpha file - $tempfile_alpha = K_PATH_CACHE.'__tcpdf_'.$this->file_id.'_imgmask_alpha_'.$filehash; - // check for cached images - if (in_array($tempfile_plain, $this->imagekeys)) { - // get existing image data - $info = $this->getImageBuffer($tempfile_plain); - // check if the newer image is larger - $oldsize = ($info['w'] * $info['h']); - if ((($oldsize < $newsize) AND ($resize)) OR (($oldsize < $pixsize) AND (!$resize))) { - $newimage = true; - } else { - $newimage = false; - // embed mask image - $imgmask = $this->Image($tempfile_alpha, $x, $y, $w, $h, 'PNG', '', '', $resize, $dpi, '', true, false); - // embed image, masked with previously embedded mask - return $this->Image($tempfile_plain, $x, $y, $w, $h, $type, $link, $align, $resize, $dpi, $palign, false, $imgmask); - } - } - } - if ($newimage) { - //First use of image, get info - $type = strtolower($type); - if ($type == '') { - $type = TCPDF_IMAGES::getImageFileType($file, $imsize); - } elseif ($type == 'jpg') { - $type = 'jpeg'; - } - $mqr = TCPDF_STATIC::get_mqr(); - TCPDF_STATIC::set_mqr(false); - // Specific image handlers (defined on TCPDF_IMAGES CLASS) - $mtd = '_parse'.$type; - // GD image handler function - $gdfunction = 'imagecreatefrom'.$type; - $info = false; - if ((method_exists('TCPDF_IMAGES', $mtd)) AND (!($resize AND (function_exists($gdfunction) OR extension_loaded('imagick'))))) { - // TCPDF image functions - $info = TCPDF_IMAGES::$mtd($file); - if (($ismask === false) AND ($imgmask === false) AND (strpos($file, '__tcpdf_'.$this->file_id.'_imgmask_') === FALSE) - AND (($info === 'pngalpha') OR (isset($info['trns']) AND !empty($info['trns'])))) { - return $this->ImagePngAlpha($file, $x, $y, $pixw, $pixh, $w, $h, 'PNG', $link, $align, $resize, $dpi, $palign, $filehash); - } - } - if (($info === false) AND function_exists($gdfunction)) { - try { - // GD library - $img = $gdfunction($file); - if ($img !== false) { - if ($resize) { - $imgr = imagecreatetruecolor($neww, $newh); - if (($type == 'gif') OR ($type == 'png')) { - $imgr = TCPDF_IMAGES::setGDImageTransparency($imgr, $img); - } - imagecopyresampled($imgr, $img, 0, 0, 0, 0, $neww, $newh, $pixw, $pixh); - $img = $imgr; - } - if (($type == 'gif') OR ($type == 'png')) { - $info = TCPDF_IMAGES::_toPNG($img, TCPDF_STATIC::getObjFilename('img', $this->file_id)); - } else { - $info = TCPDF_IMAGES::_toJPEG($img, $this->jpeg_quality, TCPDF_STATIC::getObjFilename('img', $this->file_id)); - } - } - } catch(Exception $e) { - $info = false; - } - } - if (($info === false) AND extension_loaded('imagick')) { - try { - // ImageMagick library - $img = new Imagick(); - if ($type == 'svg') { - if ($file[0] === '@') { - // image from string - $svgimg = substr($file, 1); - } else { - // get SVG file content - $svgimg = TCPDF_STATIC::fileGetContents($file); - } - if ($svgimg !== FALSE) { - // get width and height - $regs = array(); - if (preg_match('/]*)>/si', $svgimg, $regs)) { - $svgtag = $regs[1]; - $tmp = array(); - if (preg_match('/[\s]+width[\s]*=[\s]*"([^"]*)"/si', $svgtag, $tmp)) { - $ow = $this->getHTMLUnitToUnits($tmp[1], 1, $this->svgunit, false); - $owu = sprintf('%F', ($ow * $dpi / 72)).$this->pdfunit; - $svgtag = preg_replace('/[\s]+width[\s]*=[\s]*"[^"]*"/si', ' width="'.$owu.'"', $svgtag, 1); - } else { - $ow = $w; - } - $tmp = array(); - if (preg_match('/[\s]+height[\s]*=[\s]*"([^"]*)"/si', $svgtag, $tmp)) { - $oh = $this->getHTMLUnitToUnits($tmp[1], 1, $this->svgunit, false); - $ohu = sprintf('%F', ($oh * $dpi / 72)).$this->pdfunit; - $svgtag = preg_replace('/[\s]+height[\s]*=[\s]*"[^"]*"/si', ' height="'.$ohu.'"', $svgtag, 1); - } else { - $oh = $h; - } - $tmp = array(); - if (!preg_match('/[\s]+viewBox[\s]*=[\s]*"[\s]*([0-9\.]+)[\s]+([0-9\.]+)[\s]+([0-9\.]+)[\s]+([0-9\.]+)[\s]*"/si', $svgtag, $tmp)) { - $vbw = ($ow * $this->imgscale * $this->k); - $vbh = ($oh * $this->imgscale * $this->k); - $vbox = sprintf(' viewBox="0 0 %F %F" ', $vbw, $vbh); - $svgtag = $vbox.$svgtag; - } - $svgimg = preg_replace('/]*)>/si', '', $svgimg, 1); - } - $img->readImageBlob($svgimg); - } - } else { - $img->readImage($file); - } - if ($resize) { - $img->resizeImage($neww, $newh, 10, 1, false); - } - $img->setCompressionQuality($this->jpeg_quality); - $img->setImageFormat('jpeg'); - $tempname = TCPDF_STATIC::getObjFilename('img', $this->file_id); - $img->writeImage($tempname); - $info = TCPDF_IMAGES::_parsejpeg($tempname); - unlink($tempname); - $img->destroy(); - } catch(Exception $e) { - $info = false; - } - } - if ($info === false) { - // unable to process image - return; - } - TCPDF_STATIC::set_mqr($mqr); - if ($ismask) { - // force grayscale - $info['cs'] = 'DeviceGray'; - } - if ($imgmask !== false) { - $info['masked'] = $imgmask; - } - if (!empty($exurl)) { - $info['exurl'] = $exurl; - } - // array of alternative images - $info['altimgs'] = $altimgs; - // add image to document - $info['i'] = $this->setImageBuffer($file, $info); - } - // set alignment - $this->img_rb_y = $y + $h; - // set alignment - if ($this->rtl) { - if ($palign == 'L') { - $ximg = $this->lMargin; - } elseif ($palign == 'C') { - $ximg = ($this->w + $this->lMargin - $this->rMargin - $w) / 2; - } elseif ($palign == 'R') { - $ximg = $this->w - $this->rMargin - $w; - } else { - $ximg = $x - $w; - } - $this->img_rb_x = $ximg; - } else { - if ($palign == 'L') { - $ximg = $this->lMargin; - } elseif ($palign == 'C') { - $ximg = ($this->w + $this->lMargin - $this->rMargin - $w) / 2; - } elseif ($palign == 'R') { - $ximg = $this->w - $this->rMargin - $w; - } else { - $ximg = $x; - } - $this->img_rb_x = $ximg + $w; - } - if ($ismask OR $hidden) { - // image is not displayed - return $info['i']; - } - $xkimg = $ximg * $this->k; - if (!$alt) { - // only non-alternative immages will be set - $this->_out(sprintf('q %F 0 0 %F %F %F cm /I%u Do Q', ($w * $this->k), ($h * $this->k), $xkimg, (($this->h - ($y + $h)) * $this->k), $info['i'])); - } - if (!empty($border)) { - $bx = $this->x; - $by = $this->y; - $this->x = $ximg; - if ($this->rtl) { - $this->x += $w; - } - $this->y = $y; - $this->Cell($w, $h, '', $border, 0, '', 0, '', 0, true); - $this->x = $bx; - $this->y = $by; - } - if ($link) { - $this->Link($ximg, $y, $w, $h, $link, 0); - } - // set pointer to align the next text/objects - switch($align) { - case 'T': { - $this->y = $y; - $this->x = $this->img_rb_x; - break; - } - case 'M': { - $this->y = $y + round($h/2); - $this->x = $this->img_rb_x; - break; - } - case 'B': { - $this->y = $this->img_rb_y; - $this->x = $this->img_rb_x; - break; - } - case 'N': { - $this->SetY($this->img_rb_y); - break; - } - default:{ - break; - } - } - $this->endlinex = $this->img_rb_x; - if ($this->inxobj) { - // we are inside an XObject template - $this->xobjects[$this->xobjid]['images'][] = $info['i']; - } - return $info['i']; - } - - /** - * Extract info from a PNG image with alpha channel using the Imagick or GD library. - * @param $file (string) Name of the file containing the image. - * @param $x (float) Abscissa of the upper-left corner. - * @param $y (float) Ordinate of the upper-left corner. - * @param $wpx (float) Original width of the image in pixels. - * @param $hpx (float) original height of the image in pixels. - * @param $w (float) Width of the image in the page. If not specified or equal to zero, it is automatically calculated. - * @param $h (float) Height of the image in the page. If not specified or equal to zero, it is automatically calculated. - * @param $type (string) Image format. Possible values are (case insensitive): JPEG and PNG (whitout GD library) and all images supported by GD: GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM;. If not specified, the type is inferred from the file extension. - * @param $link (mixed) URL or identifier returned by AddLink(). - * @param $align (string) Indicates the alignment of the pointer next to image insertion relative to image height. The value can be:
          • T: top-right for LTR or top-left for RTL
          • M: middle-right for LTR or middle-left for RTL
          • B: bottom-right for LTR or bottom-left for RTL
          • N: next line
          - * @param $resize (boolean) If true resize (reduce) the image to fit $w and $h (requires GD library). - * @param $dpi (int) dot-per-inch resolution used on resize - * @param $palign (string) Allows to center or align the image on the current line. Possible values are:
          • L : left align
          • C : center
          • R : right align
          • '' : empty string : left for LTR or right for RTL
          - * @param $filehash (string) File hash used to build unique file names. - * @author Nicola Asuni - * @protected - * @since 4.3.007 (2008-12-04) - * @see Image() - */ - protected function ImagePngAlpha($file, $x, $y, $wpx, $hpx, $w, $h, $type, $link, $align, $resize, $dpi, $palign, $filehash='') { - // create temp images - if (empty($filehash)) { - $filehash = md5($file); - } - // create temp image file (without alpha channel) - $tempfile_plain = K_PATH_CACHE.'__tcpdf_'.$this->file_id.'_imgmask_plain_'.$filehash; - // create temp alpha file - $tempfile_alpha = K_PATH_CACHE.'__tcpdf_'.$this->file_id.'_imgmask_alpha_'.$filehash; - $parsed = false; - $parse_error = ''; - // ImageMagick extension - if (($parsed === false) AND extension_loaded('imagick')) { - try { - // ImageMagick library - $img = new Imagick(); - $img->readImage($file); - // clone image object - $imga = TCPDF_STATIC::objclone($img); - // extract alpha channel - if (method_exists($img, 'setImageAlphaChannel') AND defined('Imagick::ALPHACHANNEL_EXTRACT')) { - $img->setImageAlphaChannel(Imagick::ALPHACHANNEL_EXTRACT); - } else { - $img->separateImageChannel(8); // 8 = (imagick::CHANNEL_ALPHA | imagick::CHANNEL_OPACITY | imagick::CHANNEL_MATTE); - $img->negateImage(true); - } - $img->setImageFormat('png'); - $img->writeImage($tempfile_alpha); - // remove alpha channel - if (method_exists($imga, 'setImageMatte')) { - $imga->setImageMatte(false); - } else { - $imga->separateImageChannel(39); // 39 = (imagick::CHANNEL_ALL & ~(imagick::CHANNEL_ALPHA | imagick::CHANNEL_OPACITY | imagick::CHANNEL_MATTE)); - } - $imga->setImageFormat('png'); - $imga->writeImage($tempfile_plain); - $parsed = true; - } catch (Exception $e) { - // Imagemagick fails, try with GD - $parse_error = 'Imagick library error: '.$e->getMessage(); - } - } - // GD extension - if (($parsed === false) AND function_exists('imagecreatefrompng')) { - try { - // generate images - $img = imagecreatefrompng($file); - $imgalpha = imagecreate($wpx, $hpx); - // generate gray scale palette (0 -> 255) - for ($c = 0; $c < 256; ++$c) { - ImageColorAllocate($imgalpha, $c, $c, $c); - } - // extract alpha channel - for ($xpx = 0; $xpx < $wpx; ++$xpx) { - for ($ypx = 0; $ypx < $hpx; ++$ypx) { - $color = imagecolorat($img, $xpx, $ypx); - // get and correct gamma color - $alpha = $this->getGDgamma($img, $color); - imagesetpixel($imgalpha, $xpx, $ypx, $alpha); - } - } - imagepng($imgalpha, $tempfile_alpha); - imagedestroy($imgalpha); - // extract image without alpha channel - $imgplain = imagecreatetruecolor($wpx, $hpx); - imagecopy($imgplain, $img, 0, 0, 0, 0, $wpx, $hpx); - imagepng($imgplain, $tempfile_plain); - imagedestroy($imgplain); - $parsed = true; - } catch (Exception $e) { - // GD fails - $parse_error = 'GD library error: '.$e->getMessage(); - } - } - if ($parsed === false) { - if (empty($parse_error)) { - $this->Error('TCPDF requires the Imagick or GD extension to handle PNG images with alpha channel.'); - } else { - $this->Error($parse_error); - } - } - // embed mask image - $imgmask = $this->Image($tempfile_alpha, $x, $y, $w, $h, 'PNG', '', '', $resize, $dpi, '', true, false); - // embed image, masked with previously embedded mask - $this->Image($tempfile_plain, $x, $y, $w, $h, $type, $link, $align, $resize, $dpi, $palign, false, $imgmask); - } - - /** - * Get the GD-corrected PNG gamma value from alpha color - * @param $img (int) GD image Resource ID. - * @param $c (int) alpha color - * @protected - * @since 4.3.007 (2008-12-04) - */ - protected function getGDgamma($img, $c) { - if (!isset($this->gdgammacache['#'.$c])) { - $colors = imagecolorsforindex($img, $c); - // GD alpha is only 7 bit (0 -> 127) - $this->gdgammacache['#'.$c] = (((127 - $colors['alpha']) / 127) * 255); - // correct gamma - $this->gdgammacache['#'.$c] = (pow(($this->gdgammacache['#'.$c] / 255), 2.2) * 255); - // store the latest values on cache to improve performances - if (count($this->gdgammacache) > 8) { - // remove one element from the cache array - array_shift($this->gdgammacache); - } - } - return $this->gdgammacache['#'.$c]; - } - - /** - * Performs a line break. - * The current abscissa goes back to the left margin and the ordinate increases by the amount passed in parameter. - * @param $h (float) The height of the break. By default, the value equals the height of the last printed cell. - * @param $cell (boolean) if true add the current left (or right o for RTL) padding to the X coordinate - * @public - * @since 1.0 - * @see Cell() - */ - public function Ln($h='', $cell=false) { - if (($this->num_columns > 1) AND ($this->y == $this->columns[$this->current_column]['y']) AND isset($this->columns[$this->current_column]['x']) AND ($this->x == $this->columns[$this->current_column]['x'])) { - // revove vertical space from the top of the column - return; - } - if ($cell) { - if ($this->rtl) { - $cellpadding = $this->cell_padding['R']; - } else { - $cellpadding = $this->cell_padding['L']; - } - } else { - $cellpadding = 0; - } - if ($this->rtl) { - $this->x = $this->w - $this->rMargin - $cellpadding; - } else { - $this->x = $this->lMargin + $cellpadding; - } - if (is_string($h)) { - $h = $this->lasth; - } - $this->y += $h; - $this->newline = true; - } - - /** - * Returns the relative X value of current position. - * The value is relative to the left border for LTR languages and to the right border for RTL languages. - * @return float - * @public - * @since 1.2 - * @see SetX(), GetY(), SetY() - */ - public function GetX() { - //Get x position - if ($this->rtl) { - return ($this->w - $this->x); - } else { - return $this->x; - } - } - - /** - * Returns the absolute X value of current position. - * @return float - * @public - * @since 1.2 - * @see SetX(), GetY(), SetY() - */ - public function GetAbsX() { - return $this->x; - } - - /** - * Returns the ordinate of the current position. - * @return float - * @public - * @since 1.0 - * @see SetY(), GetX(), SetX() - */ - public function GetY() { - return $this->y; - } - - /** - * Defines the abscissa of the current position. - * If the passed value is negative, it is relative to the right of the page (or left if language is RTL). - * @param $x (float) The value of the abscissa in user units. - * @param $rtloff (boolean) if true always uses the page top-left corner as origin of axis. - * @public - * @since 1.2 - * @see GetX(), GetY(), SetY(), SetXY() - */ - public function SetX($x, $rtloff=false) { - $x = floatval($x); - if (!$rtloff AND $this->rtl) { - if ($x >= 0) { - $this->x = $this->w - $x; - } else { - $this->x = abs($x); - } - } else { - if ($x >= 0) { - $this->x = $x; - } else { - $this->x = $this->w + $x; - } - } - if ($this->x < 0) { - $this->x = 0; - } - if ($this->x > $this->w) { - $this->x = $this->w; - } - } - - /** - * Moves the current abscissa back to the left margin and sets the ordinate. - * If the passed value is negative, it is relative to the bottom of the page. - * @param $y (float) The value of the ordinate in user units. - * @param $resetx (bool) if true (default) reset the X position. - * @param $rtloff (boolean) if true always uses the page top-left corner as origin of axis. - * @public - * @since 1.0 - * @see GetX(), GetY(), SetY(), SetXY() - */ - public function SetY($y, $resetx=true, $rtloff=false) { - $y = floatval($y); - if ($resetx) { - //reset x - if (!$rtloff AND $this->rtl) { - $this->x = $this->w - $this->rMargin; - } else { - $this->x = $this->lMargin; - } - } - if ($y >= 0) { - $this->y = $y; - } else { - $this->y = $this->h + $y; - } - if ($this->y < 0) { - $this->y = 0; - } - if ($this->y > $this->h) { - $this->y = $this->h; - } - } - - /** - * Defines the abscissa and ordinate of the current position. - * If the passed values are negative, they are relative respectively to the right and bottom of the page. - * @param $x (float) The value of the abscissa. - * @param $y (float) The value of the ordinate. - * @param $rtloff (boolean) if true always uses the page top-left corner as origin of axis. - * @public - * @since 1.2 - * @see SetX(), SetY() - */ - public function SetXY($x, $y, $rtloff=false) { - $this->SetY($y, false, $rtloff); - $this->SetX($x, $rtloff); - } - - /** - * Set the absolute X coordinate of the current pointer. - * @param $x (float) The value of the abscissa in user units. - * @public - * @since 5.9.186 (2012-09-13) - * @see setAbsX(), setAbsY(), SetAbsXY() - */ - public function SetAbsX($x) { - $this->x = floatval($x); - } - - /** - * Set the absolute Y coordinate of the current pointer. - * @param $y (float) (float) The value of the ordinate in user units. - * @public - * @since 5.9.186 (2012-09-13) - * @see setAbsX(), setAbsY(), SetAbsXY() - */ - public function SetAbsY($y) { - $this->y = floatval($y); - } - - /** - * Set the absolute X and Y coordinates of the current pointer. - * @param $x (float) The value of the abscissa in user units. - * @param $y (float) (float) The value of the ordinate in user units. - * @public - * @since 5.9.186 (2012-09-13) - * @see setAbsX(), setAbsY(), SetAbsXY() - */ - public function SetAbsXY($x, $y) { - $this->SetAbsX($x); - $this->SetAbsY($y); - } - - /** - * Send the document to a given destination: string, local file or browser. - * In the last case, the plug-in may be used (if present) or a download ("Save as" dialog box) may be forced.
          - * The method first calls Close() if necessary to terminate the document. - * @param $name (string) The name of the file when saved. Note that special characters are removed and blanks characters are replaced with the underscore character. - * @param $dest (string) Destination where to send the document. It can take one of the following values:
          • I: send the file inline to the browser (default). The plug-in is used if available. The name given by name is used when one selects the "Save as" option on the link generating the PDF.
          • D: send to the browser and force a file download with the name given by name.
          • F: save to a local server file with the name given by name.
          • S: return the document as a string (name is ignored).
          • FI: equivalent to F + I option
          • FD: equivalent to F + D option
          • E: return the document as base64 mime multi-part email attachment (RFC 2045)
          - * @return string - * @public - * @since 1.0 - * @see Close() - */ - public function Output($name='doc.pdf', $dest='I') { - //Output PDF to some destination - //Finish document if necessary - if ($this->state < 3) { - $this->Close(); - } - //Normalize parameters - if (is_bool($dest)) { - $dest = $dest ? 'D' : 'F'; - } - $dest = strtoupper($dest); - if ($dest[0] != 'F') { - $name = preg_replace('/[\s]+/', '_', $name); - $name = preg_replace('/[^a-zA-Z0-9_\.-]/', '', $name); - } - if ($this->sign) { - // *** apply digital signature to the document *** - // get the document content - $pdfdoc = $this->getBuffer(); - // remove last newline - $pdfdoc = substr($pdfdoc, 0, -1); - // remove filler space - $byterange_string_len = strlen(TCPDF_STATIC::$byterange_string); - // define the ByteRange - $byte_range = array(); - $byte_range[0] = 0; - $byte_range[1] = strpos($pdfdoc, TCPDF_STATIC::$byterange_string) + $byterange_string_len + 10; - $byte_range[2] = $byte_range[1] + $this->signature_max_length + 2; - $byte_range[3] = strlen($pdfdoc) - $byte_range[2]; - $pdfdoc = substr($pdfdoc, 0, $byte_range[1]).substr($pdfdoc, $byte_range[2]); - // replace the ByteRange - $byterange = sprintf('/ByteRange[0 %u %u %u]', $byte_range[1], $byte_range[2], $byte_range[3]); - $byterange .= str_repeat(' ', ($byterange_string_len - strlen($byterange))); - $pdfdoc = str_replace(TCPDF_STATIC::$byterange_string, $byterange, $pdfdoc); - // write the document to a temporary folder - $tempdoc = TCPDF_STATIC::getObjFilename('doc', $this->file_id); - $f = TCPDF_STATIC::fopenLocal($tempdoc, 'wb'); - if (!$f) { - $this->Error('Unable to create temporary file: '.$tempdoc); - } - $pdfdoc_length = strlen($pdfdoc); - fwrite($f, $pdfdoc, $pdfdoc_length); - fclose($f); - // get digital signature via openssl library - $tempsign = TCPDF_STATIC::getObjFilename('sig', $this->file_id); - if (empty($this->signature_data['extracerts'])) { - openssl_pkcs7_sign($tempdoc, $tempsign, $this->signature_data['signcert'], array($this->signature_data['privkey'], $this->signature_data['password']), array(), PKCS7_BINARY | PKCS7_DETACHED); - } else { - openssl_pkcs7_sign($tempdoc, $tempsign, $this->signature_data['signcert'], array($this->signature_data['privkey'], $this->signature_data['password']), array(), PKCS7_BINARY | PKCS7_DETACHED, $this->signature_data['extracerts']); - } - // read signature - $signature = file_get_contents($tempsign); - // extract signature - $signature = substr($signature, $pdfdoc_length); - $signature = substr($signature, (strpos($signature, "%%EOF\n\n------") + 13)); - $tmparr = explode("\n\n", $signature); - $signature = $tmparr[1]; - // decode signature - $signature = base64_decode(trim($signature)); - // add TSA timestamp to signature - $signature = $this->applyTSA($signature); - // convert signature to hex - $signature = current(unpack('H*', $signature)); - $signature = str_pad($signature, $this->signature_max_length, '0'); - // Add signature to the document - $this->buffer = substr($pdfdoc, 0, $byte_range[1]).'<'.$signature.'>'.substr($pdfdoc, $byte_range[1]); - $this->bufferlen = strlen($this->buffer); - } - switch($dest) { - case 'I': { - // Send PDF to the standard output - if (ob_get_contents()) { - $this->Error('Some data has already been output, can\'t send PDF file'); - } - if (php_sapi_name() != 'cli') { - // send output to a browser - header('Content-Type: application/pdf'); - if (headers_sent()) { - $this->Error('Some data has already been output to browser, can\'t send PDF file'); - } - header('Cache-Control: private, must-revalidate, post-check=0, pre-check=0, max-age=1'); - //header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1 - header('Pragma: public'); - header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past - header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); - header('Content-Disposition: inline; filename="'.basename($name).'"'); - TCPDF_STATIC::sendOutputData($this->getBuffer(), $this->bufferlen); - } else { - echo $this->getBuffer(); - } - break; - } - case 'D': { - // download PDF as file - if (ob_get_contents()) { - $this->Error('Some data has already been output, can\'t send PDF file'); - } - header('Content-Description: File Transfer'); - if (headers_sent()) { - $this->Error('Some data has already been output to browser, can\'t send PDF file'); - } - header('Cache-Control: private, must-revalidate, post-check=0, pre-check=0, max-age=1'); - //header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1 - header('Pragma: public'); - header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past - header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); - // force download dialog - if (strpos(php_sapi_name(), 'cgi') === false) { - header('Content-Type: application/force-download'); - header('Content-Type: application/octet-stream', false); - header('Content-Type: application/download', false); - header('Content-Type: application/pdf', false); - } else { - header('Content-Type: application/pdf'); - } - // use the Content-Disposition header to supply a recommended filename - header('Content-Disposition: attachment; filename="'.basename($name).'"'); - header('Content-Transfer-Encoding: binary'); - TCPDF_STATIC::sendOutputData($this->getBuffer(), $this->bufferlen); - break; - } - case 'F': - case 'FI': - case 'FD': { - // save PDF to a local file - $f = TCPDF_STATIC::fopenLocal($name, 'wb'); - if (!$f) { - $this->Error('Unable to create output file: '.$name); - } - fwrite($f, $this->getBuffer(), $this->bufferlen); - fclose($f); - if ($dest == 'FI') { - // send headers to browser - header('Content-Type: application/pdf'); - header('Cache-Control: private, must-revalidate, post-check=0, pre-check=0, max-age=1'); - //header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1 - header('Pragma: public'); - header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past - header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); - header('Content-Disposition: inline; filename="'.basename($name).'"'); - TCPDF_STATIC::sendOutputData(file_get_contents($name), filesize($name)); - } elseif ($dest == 'FD') { - // send headers to browser - if (ob_get_contents()) { - $this->Error('Some data has already been output, can\'t send PDF file'); - } - header('Content-Description: File Transfer'); - if (headers_sent()) { - $this->Error('Some data has already been output to browser, can\'t send PDF file'); - } - header('Cache-Control: private, must-revalidate, post-check=0, pre-check=0, max-age=1'); - header('Pragma: public'); - header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past - header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); - // force download dialog - if (strpos(php_sapi_name(), 'cgi') === false) { - header('Content-Type: application/force-download'); - header('Content-Type: application/octet-stream', false); - header('Content-Type: application/download', false); - header('Content-Type: application/pdf', false); - } else { - header('Content-Type: application/pdf'); - } - // use the Content-Disposition header to supply a recommended filename - header('Content-Disposition: attachment; filename="'.basename($name).'"'); - header('Content-Transfer-Encoding: binary'); - TCPDF_STATIC::sendOutputData(file_get_contents($name), filesize($name)); - } - break; - } - case 'E': { - // return PDF as base64 mime multi-part email attachment (RFC 2045) - $retval = 'Content-Type: application/pdf;'."\r\n"; - $retval .= ' name="'.$name.'"'."\r\n"; - $retval .= 'Content-Transfer-Encoding: base64'."\r\n"; - $retval .= 'Content-Disposition: attachment;'."\r\n"; - $retval .= ' filename="'.$name.'"'."\r\n\r\n"; - $retval .= chunk_split(base64_encode($this->getBuffer()), 76, "\r\n"); - return $retval; - } - case 'S': { - // returns PDF as a string - return $this->getBuffer(); - } - default: { - $this->Error('Incorrect output destination: '.$dest); - } - } - return ''; - } - - /** - * Unset all class variables except the following critical variables. - * @param $destroyall (boolean) if true destroys all class variables, otherwise preserves critical variables. - * @param $preserve_objcopy (boolean) if true preserves the objcopy variable - * @public - * @since 4.5.016 (2009-02-24) - */ - public function _destroy($destroyall=false, $preserve_objcopy=false) { - if ($destroyall AND !$preserve_objcopy) { - // remove all temporary files - $tmpfiles = glob(K_PATH_CACHE.'__tcpdf_'.$this->file_id.'_*'); - if (!empty($tmpfiles)) { - array_map('unlink', $tmpfiles); - } - } - $preserve = array( - 'file_id', - 'internal_encoding', - 'state', - 'bufferlen', - 'buffer', - 'cached_files', - 'sign', - 'signature_data', - 'signature_max_length', - 'byterange_string', - 'tsa_timestamp', - 'tsa_data' - ); - foreach (array_keys(get_object_vars($this)) as $val) { - if ($destroyall OR !in_array($val, $preserve)) { - if ((!$preserve_objcopy OR ($val != 'objcopy')) AND ($val != 'file_id') AND isset($this->$val)) { - unset($this->$val); - } - } - } - } - - /** - * Check for locale-related bug - * @protected - */ - protected function _dochecks() { - //Check for locale-related bug - if (1.1 == 1) { - $this->Error('Don\'t alter the locale before including class file'); - } - //Check for decimal separator - if (sprintf('%.1F', 1.0) != '1.0') { - setlocale(LC_NUMERIC, 'C'); - } - } - - /** - * Return an array containing variations for the basic page number alias. - * @param $a (string) Base alias. - * @return array of page number aliases - * @protected - */ - protected function getInternalPageNumberAliases($a= '') { - $alias = array(); - // build array of Unicode + ASCII variants (the order is important) - $alias = array('u' => array(), 'a' => array()); - $u = '{'.$a.'}'; - $alias['u'][] = TCPDF_STATIC::_escape($u); - if ($this->isunicode) { - $alias['u'][] = TCPDF_STATIC::_escape(TCPDF_FONTS::UTF8ToLatin1($u, $this->isunicode, $this->CurrentFont)); - $alias['u'][] = TCPDF_STATIC::_escape(TCPDF_FONTS::utf8StrRev($u, false, $this->tmprtl, $this->isunicode, $this->CurrentFont)); - $alias['a'][] = TCPDF_STATIC::_escape(TCPDF_FONTS::UTF8ToLatin1($a, $this->isunicode, $this->CurrentFont)); - $alias['a'][] = TCPDF_STATIC::_escape(TCPDF_FONTS::utf8StrRev($a, false, $this->tmprtl, $this->isunicode, $this->CurrentFont)); - } - $alias['a'][] = TCPDF_STATIC::_escape($a); - return $alias; - } - - /** - * Return an array containing all internal page aliases. - * @return array of page number aliases - * @protected - */ - protected function getAllInternalPageNumberAliases() { - $basic_alias = array(TCPDF_STATIC::$alias_tot_pages, TCPDF_STATIC::$alias_num_page, TCPDF_STATIC::$alias_group_tot_pages, TCPDF_STATIC::$alias_group_num_page, TCPDF_STATIC::$alias_right_shift); - $pnalias = array(); - foreach($basic_alias as $k => $a) { - $pnalias[$k] = $this->getInternalPageNumberAliases($a); - } - return $pnalias; - } - - /** - * Replace right shift page number aliases with spaces to correct right alignment. - * This works perfectly only when using monospaced fonts. - * @param $page (string) Page content. - * @param $aliases (array) Array of page aliases. - * @param $diff (int) initial difference to add. - * @return replaced page content. - * @protected - */ - protected function replaceRightShiftPageNumAliases($page, $aliases, $diff) { - foreach ($aliases as $type => $alias) { - foreach ($alias as $a) { - // find position of compensation factor - $startnum = (strpos($a, ':') + 1); - $a = substr($a, 0, $startnum); - if (($pos = strpos($page, $a)) !== false) { - // end of alias - $endnum = strpos($page, '}', $pos); - // string to be replaced - $aa = substr($page, $pos, ($endnum - $pos + 1)); - // get compensation factor - $ratio = substr($page, ($pos + $startnum), ($endnum - $pos - $startnum)); - $ratio = preg_replace('/[^0-9\.]/', '', $ratio); - $ratio = floatval($ratio); - if ($type == 'u') { - $chrdiff = floor(($diff + 12) * $ratio); - $shift = str_repeat(' ', $chrdiff); - $shift = TCPDF_FONTS::UTF8ToUTF16BE($shift, false, $this->isunicode, $this->CurrentFont); - } else { - $chrdiff = floor(($diff + 11) * $ratio); - $shift = str_repeat(' ', $chrdiff); - } - $page = str_replace($aa, $shift, $page); - } - } - } - return $page; - } - - /** - * Set page boxes to be included on page descriptions. - * @param $boxes (array) Array of page boxes to set on document: ('MediaBox', 'CropBox', 'BleedBox', 'TrimBox', 'ArtBox'). - * @protected - */ - protected function setPageBoxTypes($boxes) { - $this->page_boxes = array(); - foreach ($boxes as $box) { - if (in_array($box, TCPDF_STATIC::$pageboxes)) { - $this->page_boxes[] = $box; - } - } - } - - /** - * Output pages (and replace page number aliases). - * @protected - */ - protected function _putpages() { - $filter = ($this->compress) ? '/Filter /FlateDecode ' : ''; - // get internal aliases for page numbers - $pnalias = $this->getAllInternalPageNumberAliases(); - $num_pages = $this->numpages; - $ptpa = TCPDF_STATIC::formatPageNumber(($this->starting_page_number + $num_pages - 1)); - $ptpu = TCPDF_FONTS::UTF8ToUTF16BE($ptpa, false, $this->isunicode, $this->CurrentFont); - $ptp_num_chars = $this->GetNumChars($ptpa); - $pagegroupnum = 0; - $groupnum = 0; - $ptgu = 1; - $ptga = 1; - $ptg_num_chars = 1; - for ($n = 1; $n <= $num_pages; ++$n) { - // get current page - $temppage = $this->getPageBuffer($n); - $pagelen = strlen($temppage); - // set replacements for total pages number - $pnpa = TCPDF_STATIC::formatPageNumber(($this->starting_page_number + $n - 1)); - $pnpu = TCPDF_FONTS::UTF8ToUTF16BE($pnpa, false, $this->isunicode, $this->CurrentFont); - $pnp_num_chars = $this->GetNumChars($pnpa); - $pdiff = 0; // difference used for right shift alignment of page numbers - $gdiff = 0; // difference used for right shift alignment of page group numbers - if (!empty($this->pagegroups)) { - if (isset($this->newpagegroup[$n])) { - $pagegroupnum = 0; - ++$groupnum; - $ptga = TCPDF_STATIC::formatPageNumber($this->pagegroups[$groupnum]); - $ptgu = TCPDF_FONTS::UTF8ToUTF16BE($ptga, false, $this->isunicode, $this->CurrentFont); - $ptg_num_chars = $this->GetNumChars($ptga); - } - ++$pagegroupnum; - $pnga = TCPDF_STATIC::formatPageNumber($pagegroupnum); - $pngu = TCPDF_FONTS::UTF8ToUTF16BE($pnga, false, $this->isunicode, $this->CurrentFont); - $png_num_chars = $this->GetNumChars($pnga); - // replace page numbers - $replace = array(); - $replace[] = array($ptgu, $ptg_num_chars, 9, $pnalias[2]['u']); - $replace[] = array($ptga, $ptg_num_chars, 7, $pnalias[2]['a']); - $replace[] = array($pngu, $png_num_chars, 9, $pnalias[3]['u']); - $replace[] = array($pnga, $png_num_chars, 7, $pnalias[3]['a']); - list($temppage, $gdiff) = TCPDF_STATIC::replacePageNumAliases($temppage, $replace, $gdiff); - } - // replace page numbers - $replace = array(); - $replace[] = array($ptpu, $ptp_num_chars, 9, $pnalias[0]['u']); - $replace[] = array($ptpa, $ptp_num_chars, 7, $pnalias[0]['a']); - $replace[] = array($pnpu, $pnp_num_chars, 9, $pnalias[1]['u']); - $replace[] = array($pnpa, $pnp_num_chars, 7, $pnalias[1]['a']); - list($temppage, $pdiff) = TCPDF_STATIC::replacePageNumAliases($temppage, $replace, $pdiff); - // replace right shift alias - $temppage = $this->replaceRightShiftPageNumAliases($temppage, $pnalias[4], max($pdiff, $gdiff)); - // replace EPS marker - $temppage = str_replace($this->epsmarker, '', $temppage); - //Page - $this->page_obj_id[$n] = $this->_newobj(); - $out = '<<'; - $out .= ' /Type /Page'; - $out .= ' /Parent 1 0 R'; - if (empty($this->signature_data['approval']) OR ($this->signature_data['approval'] != 'A')) { - $out .= ' /LastModified '.$this->_datestring(0, $this->doc_modification_timestamp); - } - $out .= ' /Resources 2 0 R'; - foreach ($this->page_boxes as $box) { - $out .= ' /'.$box; - $out .= sprintf(' [%F %F %F %F]', $this->pagedim[$n][$box]['llx'], $this->pagedim[$n][$box]['lly'], $this->pagedim[$n][$box]['urx'], $this->pagedim[$n][$box]['ury']); - } - if (isset($this->pagedim[$n]['BoxColorInfo']) AND !empty($this->pagedim[$n]['BoxColorInfo'])) { - $out .= ' /BoxColorInfo <<'; - foreach ($this->page_boxes as $box) { - if (isset($this->pagedim[$n]['BoxColorInfo'][$box])) { - $out .= ' /'.$box.' <<'; - if (isset($this->pagedim[$n]['BoxColorInfo'][$box]['C'])) { - $color = $this->pagedim[$n]['BoxColorInfo'][$box]['C']; - $out .= ' /C ['; - $out .= sprintf(' %F %F %F', ($color[0] / 255), ($color[1] / 255), ($color[2] / 255)); - $out .= ' ]'; - } - if (isset($this->pagedim[$n]['BoxColorInfo'][$box]['W'])) { - $out .= ' /W '.($this->pagedim[$n]['BoxColorInfo'][$box]['W'] * $this->k); - } - if (isset($this->pagedim[$n]['BoxColorInfo'][$box]['S'])) { - $out .= ' /S /'.$this->pagedim[$n]['BoxColorInfo'][$box]['S']; - } - if (isset($this->pagedim[$n]['BoxColorInfo'][$box]['D'])) { - $dashes = $this->pagedim[$n]['BoxColorInfo'][$box]['D']; - $out .= ' /D ['; - foreach ($dashes as $dash) { - $out .= sprintf(' %F', ($dash * $this->k)); - } - $out .= ' ]'; - } - $out .= ' >>'; - } - } - $out .= ' >>'; - } - $out .= ' /Contents '.($this->n + 1).' 0 R'; - $out .= ' /Rotate '.$this->pagedim[$n]['Rotate']; - if (!$this->pdfa_mode) { - $out .= ' /Group << /Type /Group /S /Transparency /CS /DeviceRGB >>'; - } - if (isset($this->pagedim[$n]['trans']) AND !empty($this->pagedim[$n]['trans'])) { - // page transitions - if (isset($this->pagedim[$n]['trans']['Dur'])) { - $out .= ' /Dur '.$this->pagedim[$n]['trans']['Dur']; - } - $out .= ' /Trans <<'; - $out .= ' /Type /Trans'; - if (isset($this->pagedim[$n]['trans']['S'])) { - $out .= ' /S /'.$this->pagedim[$n]['trans']['S']; - } - if (isset($this->pagedim[$n]['trans']['D'])) { - $out .= ' /D '.$this->pagedim[$n]['trans']['D']; - } - if (isset($this->pagedim[$n]['trans']['Dm'])) { - $out .= ' /Dm /'.$this->pagedim[$n]['trans']['Dm']; - } - if (isset($this->pagedim[$n]['trans']['M'])) { - $out .= ' /M /'.$this->pagedim[$n]['trans']['M']; - } - if (isset($this->pagedim[$n]['trans']['Di'])) { - $out .= ' /Di '.$this->pagedim[$n]['trans']['Di']; - } - if (isset($this->pagedim[$n]['trans']['SS'])) { - $out .= ' /SS '.$this->pagedim[$n]['trans']['SS']; - } - if (isset($this->pagedim[$n]['trans']['B'])) { - $out .= ' /B '.$this->pagedim[$n]['trans']['B']; - } - $out .= ' >>'; - } - $out .= $this->_getannotsrefs($n); - $out .= ' /PZ '.$this->pagedim[$n]['PZ']; - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - //Page content - $p = ($this->compress) ? gzcompress($temppage) : $temppage; - $this->_newobj(); - $p = $this->_getrawstream($p); - $this->_out('<<'.$filter.'/Length '.strlen($p).'>> stream'."\n".$p."\n".'endstream'."\n".'endobj'); - } - //Pages root - $out = $this->_getobj(1)."\n"; - $out .= '<< /Type /Pages /Kids ['; - foreach($this->page_obj_id as $page_obj) { - $out .= ' '.$page_obj.' 0 R'; - } - $out .= ' ] /Count '.$num_pages.' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - } - - /** - * Get references to page annotations. - * @param $n (int) page number - * @return string - * @protected - * @author Nicola Asuni - * @since 5.0.010 (2010-05-17) - */ - protected function _getannotsrefs($n) { - if (!(isset($this->PageAnnots[$n]) OR ($this->sign AND isset($this->signature_data['cert_type'])))) { - return ''; - } - $out = ' /Annots ['; - if (isset($this->PageAnnots[$n])) { - foreach ($this->PageAnnots[$n] as $key => $val) { - if (!in_array($val['n'], $this->radio_groups)) { - $out .= ' '.$val['n'].' 0 R'; - } - } - // add radiobutton groups - if (isset($this->radiobutton_groups[$n])) { - foreach ($this->radiobutton_groups[$n] as $key => $data) { - if (isset($data['n'])) { - $out .= ' '.$data['n'].' 0 R'; - } - } - } - } - if ($this->sign AND ($n == $this->signature_appearance['page']) AND isset($this->signature_data['cert_type'])) { - // set reference for signature object - $out .= ' '.$this->sig_obj_id.' 0 R'; - } - if (!empty($this->empty_signature_appearance)) { - foreach ($this->empty_signature_appearance as $esa) { - if ($esa['page'] == $n) { - // set reference for empty signature objects - $out .= ' '.$esa['objid'].' 0 R'; - } - } - } - $out .= ' ]'; - return $out; - } - - /** - * Output annotations objects for all pages. - * !!! THIS METHOD IS NOT YET COMPLETED !!! - * See section 12.5 of PDF 32000_2008 reference. - * @protected - * @author Nicola Asuni - * @since 4.0.018 (2008-08-06) - */ - protected function _putannotsobjs() { - // reset object counter - for ($n=1; $n <= $this->numpages; ++$n) { - if (isset($this->PageAnnots[$n])) { - // set page annotations - foreach ($this->PageAnnots[$n] as $key => $pl) { - $annot_obj_id = $this->PageAnnots[$n][$key]['n']; - // create annotation object for grouping radiobuttons - if (isset($this->radiobutton_groups[$n][$pl['txt']]) AND is_array($this->radiobutton_groups[$n][$pl['txt']])) { - $radio_button_obj_id = $this->radiobutton_groups[$n][$pl['txt']]['n']; - $annots = '<<'; - $annots .= ' /Type /Annot'; - $annots .= ' /Subtype /Widget'; - $annots .= ' /Rect [0 0 0 0]'; - if ($this->radiobutton_groups[$n][$pl['txt']]['#readonly#']) { - // read only - $annots .= ' /F 68'; - $annots .= ' /Ff 49153'; - } else { - $annots .= ' /F 4'; // default print for PDF/A - $annots .= ' /Ff 49152'; - } - $annots .= ' /T '.$this->_datastring($pl['txt'], $radio_button_obj_id); - if (isset($pl['opt']['tu']) AND is_string($pl['opt']['tu'])) { - $annots .= ' /TU '.$this->_datastring($pl['opt']['tu'], $radio_button_obj_id); - } - $annots .= ' /FT /Btn'; - $annots .= ' /Kids ['; - $defval = ''; - foreach ($this->radiobutton_groups[$n][$pl['txt']] as $key => $data) { - if (isset($data['kid'])) { - $annots .= ' '.$data['kid'].' 0 R'; - if ($data['def'] !== 'Off') { - $defval = $data['def']; - } - } - } - $annots .= ' ]'; - if (!empty($defval)) { - $annots .= ' /V /'.$defval; - } - $annots .= ' >>'; - $this->_out($this->_getobj($radio_button_obj_id)."\n".$annots."\n".'endobj'); - $this->form_obj_id[] = $radio_button_obj_id; - // store object id to be used on Parent entry of Kids - $this->radiobutton_groups[$n][$pl['txt']] = $radio_button_obj_id; - } - $formfield = false; - $pl['opt'] = array_change_key_case($pl['opt'], CASE_LOWER); - $a = $pl['x'] * $this->k; - $b = $this->pagedim[$n]['h'] - (($pl['y'] + $pl['h']) * $this->k); - $c = $pl['w'] * $this->k; - $d = $pl['h'] * $this->k; - $rect = sprintf('%F %F %F %F', $a, $b, $a+$c, $b+$d); - // create new annotation object - $annots = '<_textstring($pl['txt'], $annot_obj_id); - $annots .= ' /P '.$this->page_obj_id[$n].' 0 R'; - $annots .= ' /NM '.$this->_datastring(sprintf('%04u-%04u', $n, $key), $annot_obj_id); - $annots .= ' /M '.$this->_datestring($annot_obj_id, $this->doc_modification_timestamp); - if (isset($pl['opt']['f'])) { - $fval = 0; - if (is_array($pl['opt']['f'])) { - foreach ($pl['opt']['f'] as $f) { - switch (strtolower($f)) { - case 'invisible': { - $fval += 1 << 0; - break; - } - case 'hidden': { - $fval += 1 << 1; - break; - } - case 'print': { - $fval += 1 << 2; - break; - } - case 'nozoom': { - $fval += 1 << 3; - break; - } - case 'norotate': { - $fval += 1 << 4; - break; - } - case 'noview': { - $fval += 1 << 5; - break; - } - case 'readonly': { - $fval += 1 << 6; - break; - } - case 'locked': { - $fval += 1 << 8; - break; - } - case 'togglenoview': { - $fval += 1 << 9; - break; - } - case 'lockedcontents': { - $fval += 1 << 10; - break; - } - default: { - break; - } - } - } - } else { - $fval = intval($pl['opt']['f']); - } - } else { - $fval = 4; - } - if ($this->pdfa_mode) { - // force print flag for PDF/A mode - $fval |= 4; - } - $annots .= ' /F '.intval($fval); - if (isset($pl['opt']['as']) AND is_string($pl['opt']['as'])) { - $annots .= ' /AS /'.$pl['opt']['as']; - } - if (isset($pl['opt']['ap'])) { - // appearance stream - $annots .= ' /AP <<'; - if (is_array($pl['opt']['ap'])) { - foreach ($pl['opt']['ap'] as $apmode => $apdef) { - // $apmode can be: n = normal; r = rollover; d = down; - $annots .= ' /'.strtoupper($apmode); - if (is_array($apdef)) { - $annots .= ' <<'; - foreach ($apdef as $apstate => $stream) { - // reference to XObject that define the appearance for this mode-state - $apsobjid = $this->_putAPXObject($c, $d, $stream); - $annots .= ' /'.$apstate.' '.$apsobjid.' 0 R'; - } - $annots .= ' >>'; - } else { - // reference to XObject that define the appearance for this mode - $apsobjid = $this->_putAPXObject($c, $d, $apdef); - $annots .= ' '.$apsobjid.' 0 R'; - } - } - } else { - $annots .= $pl['opt']['ap']; - } - $annots .= ' >>'; - } - if (isset($pl['opt']['bs']) AND (is_array($pl['opt']['bs']))) { - $annots .= ' /BS <<'; - $annots .= ' /Type /Border'; - if (isset($pl['opt']['bs']['w'])) { - $annots .= ' /W '.intval($pl['opt']['bs']['w']); - } - $bstyles = array('S', 'D', 'B', 'I', 'U'); - if (isset($pl['opt']['bs']['s']) AND in_array($pl['opt']['bs']['s'], $bstyles)) { - $annots .= ' /S /'.$pl['opt']['bs']['s']; - } - if (isset($pl['opt']['bs']['d']) AND (is_array($pl['opt']['bs']['d']))) { - $annots .= ' /D ['; - foreach ($pl['opt']['bs']['d'] as $cord) { - $annots .= ' '.intval($cord); - } - $annots .= ']'; - } - $annots .= ' >>'; - } else { - $annots .= ' /Border ['; - if (isset($pl['opt']['border']) AND (count($pl['opt']['border']) >= 3)) { - $annots .= intval($pl['opt']['border'][0]).' '; - $annots .= intval($pl['opt']['border'][1]).' '; - $annots .= intval($pl['opt']['border'][2]); - if (isset($pl['opt']['border'][3]) AND is_array($pl['opt']['border'][3])) { - $annots .= ' ['; - foreach ($pl['opt']['border'][3] as $dash) { - $annots .= intval($dash).' '; - } - $annots .= ']'; - } - } else { - $annots .= '0 0 0'; - } - $annots .= ']'; - } - if (isset($pl['opt']['be']) AND (is_array($pl['opt']['be']))) { - $annots .= ' /BE <<'; - $bstyles = array('S', 'C'); - if (isset($pl['opt']['be']['s']) AND in_array($pl['opt']['be']['s'], $bstyles)) { - $annots .= ' /S /'.$pl['opt']['bs']['s']; - } else { - $annots .= ' /S /S'; - } - if (isset($pl['opt']['be']['i']) AND ($pl['opt']['be']['i'] >= 0) AND ($pl['opt']['be']['i'] <= 2)) { - $annots .= ' /I '.sprintf(' %F', $pl['opt']['be']['i']); - } - $annots .= '>>'; - } - if (isset($pl['opt']['c']) AND (is_array($pl['opt']['c'])) AND !empty($pl['opt']['c'])) { - $annots .= ' /C '.TCPDF_COLORS::getColorStringFromArray($pl['opt']['c']); - } - //$annots .= ' /StructParent '; - //$annots .= ' /OC '; - $markups = array('text', 'freetext', 'line', 'square', 'circle', 'polygon', 'polyline', 'highlight', 'underline', 'squiggly', 'strikeout', 'stamp', 'caret', 'ink', 'fileattachment', 'sound'); - if (in_array(strtolower($pl['opt']['subtype']), $markups)) { - // this is a markup type - if (isset($pl['opt']['t']) AND is_string($pl['opt']['t'])) { - $annots .= ' /T '.$this->_textstring($pl['opt']['t'], $annot_obj_id); - } - //$annots .= ' /Popup '; - if (isset($pl['opt']['ca'])) { - $annots .= ' /CA '.sprintf('%F', floatval($pl['opt']['ca'])); - } - if (isset($pl['opt']['rc'])) { - $annots .= ' /RC '.$this->_textstring($pl['opt']['rc'], $annot_obj_id); - } - $annots .= ' /CreationDate '.$this->_datestring($annot_obj_id, $this->doc_creation_timestamp); - //$annots .= ' /IRT '; - if (isset($pl['opt']['subj'])) { - $annots .= ' /Subj '.$this->_textstring($pl['opt']['subj'], $annot_obj_id); - } - //$annots .= ' /RT '; - //$annots .= ' /IT '; - //$annots .= ' /ExData '; - } - $lineendings = array('Square', 'Circle', 'Diamond', 'OpenArrow', 'ClosedArrow', 'None', 'Butt', 'ROpenArrow', 'RClosedArrow', 'Slash'); - // Annotation types - switch (strtolower($pl['opt']['subtype'])) { - case 'text': { - if (isset($pl['opt']['open'])) { - $annots .= ' /Open '. (strtolower($pl['opt']['open']) == 'true' ? 'true' : 'false'); - } - $iconsapp = array('Comment', 'Help', 'Insert', 'Key', 'NewParagraph', 'Note', 'Paragraph'); - if (isset($pl['opt']['name']) AND in_array($pl['opt']['name'], $iconsapp)) { - $annots .= ' /Name /'.$pl['opt']['name']; - } else { - $annots .= ' /Name /Note'; - } - $statemodels = array('Marked', 'Review'); - if (isset($pl['opt']['statemodel']) AND in_array($pl['opt']['statemodel'], $statemodels)) { - $annots .= ' /StateModel /'.$pl['opt']['statemodel']; - } else { - $pl['opt']['statemodel'] = 'Marked'; - $annots .= ' /StateModel /'.$pl['opt']['statemodel']; - } - if ($pl['opt']['statemodel'] == 'Marked') { - $states = array('Accepted', 'Unmarked'); - } else { - $states = array('Accepted', 'Rejected', 'Cancelled', 'Completed', 'None'); - } - if (isset($pl['opt']['state']) AND in_array($pl['opt']['state'], $states)) { - $annots .= ' /State /'.$pl['opt']['state']; - } else { - if ($pl['opt']['statemodel'] == 'Marked') { - $annots .= ' /State /Unmarked'; - } else { - $annots .= ' /State /None'; - } - } - break; - } - case 'link': { - if (is_string($pl['txt'])) { - if ($pl['txt'][0] == '#') { - // internal destination - $annots .= ' /Dest /'.TCPDF_STATIC::encodeNameObject(substr($pl['txt'], 1)); - } elseif ($pl['txt'][0] == '%') { - // embedded PDF file - $filename = basename(substr($pl['txt'], 1)); - $annots .= ' /A << /S /GoToE /D [0 /Fit] /NewWindow true /T << /R /C /P '.($n - 1).' /A '.$this->embeddedfiles[$filename]['a'].' >> >>'; - } elseif ($pl['txt'][0] == '*') { - // embedded generic file - $filename = basename(substr($pl['txt'], 1)); - $jsa = 'var D=event.target.doc;var MyData=D.dataObjects;for (var i in MyData) if (MyData[i].path=="'.$filename.'") D.exportDataObject( { cName : MyData[i].name, nLaunch : 2});'; - $annots .= ' /A << /S /JavaScript /JS '.$this->_textstring($jsa, $annot_obj_id).'>>'; - } else { - $parsedUrl = parse_url($pl['txt']); - if (empty($parsedUrl['scheme']) AND (strtolower(substr($parsedUrl['path'], -4)) == '.pdf')) { - // relative link to a PDF file - $dest = '[0 /Fit]'; // default page 0 - if (!empty($parsedUrl['fragment'])) { - // check for named destination - $tmp = explode('=', $parsedUrl['fragment']); - $dest = '('.((count($tmp) == 2) ? $tmp[1] : $tmp[0]).')'; - } - $annots .= ' /A <_datastring($this->unhtmlentities($parsedUrl['path']), $annot_obj_id).' /NewWindow true>>'; - } else { - // external URI link - $annots .= ' /A <_datastring($this->unhtmlentities($pl['txt']), $annot_obj_id).'>>'; - } - } - } elseif (isset($this->links[$pl['txt']])) { - // internal link ID - $l = $this->links[$pl['txt']]; - if (isset($this->page_obj_id[($l['p'])])) { - $annots .= sprintf(' /Dest [%u 0 R /XYZ 0 %F null]', $this->page_obj_id[($l['p'])], ($this->pagedim[$l['p']]['h'] - ($l['y'] * $this->k))); - } - } - $hmodes = array('N', 'I', 'O', 'P'); - if (isset($pl['opt']['h']) AND in_array($pl['opt']['h'], $hmodes)) { - $annots .= ' /H /'.$pl['opt']['h']; - } else { - $annots .= ' /H /I'; - } - //$annots .= ' /PA '; - //$annots .= ' /Quadpoints '; - break; - } - case 'freetext': { - if (isset($pl['opt']['da']) AND !empty($pl['opt']['da'])) { - $annots .= ' /DA ('.$pl['opt']['da'].')'; - } - if (isset($pl['opt']['q']) AND ($pl['opt']['q'] >= 0) AND ($pl['opt']['q'] <= 2)) { - $annots .= ' /Q '.intval($pl['opt']['q']); - } - if (isset($pl['opt']['rc'])) { - $annots .= ' /RC '.$this->_textstring($pl['opt']['rc'], $annot_obj_id); - } - if (isset($pl['opt']['ds'])) { - $annots .= ' /DS '.$this->_textstring($pl['opt']['ds'], $annot_obj_id); - } - if (isset($pl['opt']['cl']) AND is_array($pl['opt']['cl'])) { - $annots .= ' /CL ['; - foreach ($pl['opt']['cl'] as $cl) { - $annots .= sprintf('%F ', $cl * $this->k); - } - $annots .= ']'; - } - $tfit = array('FreeText', 'FreeTextCallout', 'FreeTextTypeWriter'); - if (isset($pl['opt']['it']) AND in_array($pl['opt']['it'], $tfit)) { - $annots .= ' /IT /'.$pl['opt']['it']; - } - if (isset($pl['opt']['rd']) AND is_array($pl['opt']['rd'])) { - $l = $pl['opt']['rd'][0] * $this->k; - $r = $pl['opt']['rd'][1] * $this->k; - $t = $pl['opt']['rd'][2] * $this->k; - $b = $pl['opt']['rd'][3] * $this->k; - $annots .= ' /RD ['.sprintf('%F %F %F %F', $l, $r, $t, $b).']'; - } - if (isset($pl['opt']['le']) AND in_array($pl['opt']['le'], $lineendings)) { - $annots .= ' /LE /'.$pl['opt']['le']; - } - break; - } - case 'line': { - break; - } - case 'square': { - break; - } - case 'circle': { - break; - } - case 'polygon': { - break; - } - case 'polyline': { - break; - } - case 'highlight': { - break; - } - case 'underline': { - break; - } - case 'squiggly': { - break; - } - case 'strikeout': { - break; - } - case 'stamp': { - break; - } - case 'caret': { - break; - } - case 'ink': { - break; - } - case 'popup': { - break; - } - case 'fileattachment': { - if ($this->pdfa_mode) { - // embedded files are not allowed in PDF/A mode - break; - } - if (!isset($pl['opt']['fs'])) { - break; - } - $filename = basename($pl['opt']['fs']); - if (isset($this->embeddedfiles[$filename]['f'])) { - $annots .= ' /FS '.$this->embeddedfiles[$filename]['f'].' 0 R'; - $iconsapp = array('Graph', 'Paperclip', 'PushPin', 'Tag'); - if (isset($pl['opt']['name']) AND in_array($pl['opt']['name'], $iconsapp)) { - $annots .= ' /Name /'.$pl['opt']['name']; - } else { - $annots .= ' /Name /PushPin'; - } - // index (zero-based) of the annotation in the Annots array of this page - $this->embeddedfiles[$filename]['a'] = $key; - } - break; - } - case 'sound': { - if (!isset($pl['opt']['fs'])) { - break; - } - $filename = basename($pl['opt']['fs']); - if (isset($this->embeddedfiles[$filename]['f'])) { - // ... TO BE COMPLETED ... - // /R /C /B /E /CO /CP - $annots .= ' /Sound '.$this->embeddedfiles[$filename]['f'].' 0 R'; - $iconsapp = array('Speaker', 'Mic'); - if (isset($pl['opt']['name']) AND in_array($pl['opt']['name'], $iconsapp)) { - $annots .= ' /Name /'.$pl['opt']['name']; - } else { - $annots .= ' /Name /Speaker'; - } - } - break; - } - case 'movie': { - break; - } - case 'widget': { - $hmode = array('N', 'I', 'O', 'P', 'T'); - if (isset($pl['opt']['h']) AND in_array($pl['opt']['h'], $hmode)) { - $annots .= ' /H /'.$pl['opt']['h']; - } - if (isset($pl['opt']['mk']) AND (is_array($pl['opt']['mk'])) AND !empty($pl['opt']['mk'])) { - $annots .= ' /MK <<'; - if (isset($pl['opt']['mk']['r'])) { - $annots .= ' /R '.$pl['opt']['mk']['r']; - } - if (isset($pl['opt']['mk']['bc']) AND (is_array($pl['opt']['mk']['bc']))) { - $annots .= ' /BC '.TCPDF_COLORS::getColorStringFromArray($pl['opt']['mk']['bc']); - } - if (isset($pl['opt']['mk']['bg']) AND (is_array($pl['opt']['mk']['bg']))) { - $annots .= ' /BG '.TCPDF_COLORS::getColorStringFromArray($pl['opt']['mk']['bg']); - } - if (isset($pl['opt']['mk']['ca'])) { - $annots .= ' /CA '.$pl['opt']['mk']['ca']; - } - if (isset($pl['opt']['mk']['rc'])) { - $annots .= ' /RC '.$pl['opt']['mk']['rc']; - } - if (isset($pl['opt']['mk']['ac'])) { - $annots .= ' /AC '.$pl['opt']['mk']['ac']; - } - if (isset($pl['opt']['mk']['i'])) { - $info = $this->getImageBuffer($pl['opt']['mk']['i']); - if ($info !== false) { - $annots .= ' /I '.$info['n'].' 0 R'; - } - } - if (isset($pl['opt']['mk']['ri'])) { - $info = $this->getImageBuffer($pl['opt']['mk']['ri']); - if ($info !== false) { - $annots .= ' /RI '.$info['n'].' 0 R'; - } - } - if (isset($pl['opt']['mk']['ix'])) { - $info = $this->getImageBuffer($pl['opt']['mk']['ix']); - if ($info !== false) { - $annots .= ' /IX '.$info['n'].' 0 R'; - } - } - if (isset($pl['opt']['mk']['if']) AND (is_array($pl['opt']['mk']['if'])) AND !empty($pl['opt']['mk']['if'])) { - $annots .= ' /IF <<'; - $if_sw = array('A', 'B', 'S', 'N'); - if (isset($pl['opt']['mk']['if']['sw']) AND in_array($pl['opt']['mk']['if']['sw'], $if_sw)) { - $annots .= ' /SW /'.$pl['opt']['mk']['if']['sw']; - } - $if_s = array('A', 'P'); - if (isset($pl['opt']['mk']['if']['s']) AND in_array($pl['opt']['mk']['if']['s'], $if_s)) { - $annots .= ' /S /'.$pl['opt']['mk']['if']['s']; - } - if (isset($pl['opt']['mk']['if']['a']) AND (is_array($pl['opt']['mk']['if']['a'])) AND !empty($pl['opt']['mk']['if']['a'])) { - $annots .= sprintf(' /A [%F %F]', $pl['opt']['mk']['if']['a'][0], $pl['opt']['mk']['if']['a'][1]); - } - if (isset($pl['opt']['mk']['if']['fb']) AND ($pl['opt']['mk']['if']['fb'])) { - $annots .= ' /FB true'; - } - $annots .= '>>'; - } - if (isset($pl['opt']['mk']['tp']) AND ($pl['opt']['mk']['tp'] >= 0) AND ($pl['opt']['mk']['tp'] <= 6)) { - $annots .= ' /TP '.intval($pl['opt']['mk']['tp']); - } - $annots .= '>>'; - } // end MK - // --- Entries for field dictionaries --- - if (isset($this->radiobutton_groups[$n][$pl['txt']])) { - // set parent - $annots .= ' /Parent '.$this->radiobutton_groups[$n][$pl['txt']].' 0 R'; - } - if (isset($pl['opt']['t']) AND is_string($pl['opt']['t'])) { - $annots .= ' /T '.$this->_datastring($pl['opt']['t'], $annot_obj_id); - } - if (isset($pl['opt']['tu']) AND is_string($pl['opt']['tu'])) { - $annots .= ' /TU '.$this->_datastring($pl['opt']['tu'], $annot_obj_id); - } - if (isset($pl['opt']['tm']) AND is_string($pl['opt']['tm'])) { - $annots .= ' /TM '.$this->_datastring($pl['opt']['tm'], $annot_obj_id); - } - if (isset($pl['opt']['ff'])) { - if (is_array($pl['opt']['ff'])) { - // array of bit settings - $flag = 0; - foreach($pl['opt']['ff'] as $val) { - $flag += 1 << ($val - 1); - } - } else { - $flag = intval($pl['opt']['ff']); - } - $annots .= ' /Ff '.$flag; - } - if (isset($pl['opt']['maxlen'])) { - $annots .= ' /MaxLen '.intval($pl['opt']['maxlen']); - } - if (isset($pl['opt']['v'])) { - $annots .= ' /V'; - if (is_array($pl['opt']['v'])) { - foreach ($pl['opt']['v'] AS $optval) { - if (is_float($optval)) { - $optval = sprintf('%F', $optval); - } - $annots .= ' '.$optval; - } - } else { - $annots .= ' '.$this->_textstring($pl['opt']['v'], $annot_obj_id); - } - } - if (isset($pl['opt']['dv'])) { - $annots .= ' /DV'; - if (is_array($pl['opt']['dv'])) { - foreach ($pl['opt']['dv'] AS $optval) { - if (is_float($optval)) { - $optval = sprintf('%F', $optval); - } - $annots .= ' '.$optval; - } - } else { - $annots .= ' '.$this->_textstring($pl['opt']['dv'], $annot_obj_id); - } - } - if (isset($pl['opt']['rv'])) { - $annots .= ' /RV'; - if (is_array($pl['opt']['rv'])) { - foreach ($pl['opt']['rv'] AS $optval) { - if (is_float($optval)) { - $optval = sprintf('%F', $optval); - } - $annots .= ' '.$optval; - } - } else { - $annots .= ' '.$this->_textstring($pl['opt']['rv'], $annot_obj_id); - } - } - if (isset($pl['opt']['a']) AND !empty($pl['opt']['a'])) { - $annots .= ' /A << '.$pl['opt']['a'].' >>'; - } - if (isset($pl['opt']['aa']) AND !empty($pl['opt']['aa'])) { - $annots .= ' /AA << '.$pl['opt']['aa'].' >>'; - } - if (isset($pl['opt']['da']) AND !empty($pl['opt']['da'])) { - $annots .= ' /DA ('.$pl['opt']['da'].')'; - } - if (isset($pl['opt']['q']) AND ($pl['opt']['q'] >= 0) AND ($pl['opt']['q'] <= 2)) { - $annots .= ' /Q '.intval($pl['opt']['q']); - } - if (isset($pl['opt']['opt']) AND (is_array($pl['opt']['opt'])) AND !empty($pl['opt']['opt'])) { - $annots .= ' /Opt ['; - foreach($pl['opt']['opt'] AS $copt) { - if (is_array($copt)) { - $annots .= ' ['.$this->_textstring($copt[0], $annot_obj_id).' '.$this->_textstring($copt[1], $annot_obj_id).']'; - } else { - $annots .= ' '.$this->_textstring($copt, $annot_obj_id); - } - } - $annots .= ']'; - } - if (isset($pl['opt']['ti'])) { - $annots .= ' /TI '.intval($pl['opt']['ti']); - } - if (isset($pl['opt']['i']) AND (is_array($pl['opt']['i'])) AND !empty($pl['opt']['i'])) { - $annots .= ' /I ['; - foreach($pl['opt']['i'] AS $copt) { - $annots .= intval($copt).' '; - } - $annots .= ']'; - } - break; - } - case 'screen': { - break; - } - case 'printermark': { - break; - } - case 'trapnet': { - break; - } - case 'watermark': { - break; - } - case '3d': { - break; - } - default: { - break; - } - } - $annots .= '>>'; - // create new annotation object - $this->_out($this->_getobj($annot_obj_id)."\n".$annots."\n".'endobj'); - if ($formfield AND !isset($this->radiobutton_groups[$n][$pl['txt']])) { - // store reference of form object - $this->form_obj_id[] = $annot_obj_id; - } - } - } - } // end for each page - } - - /** - * Put appearance streams XObject used to define annotation's appearance states. - * @param $w (int) annotation width - * @param $h (int) annotation height - * @param $stream (string) appearance stream - * @return int object ID - * @protected - * @since 4.8.001 (2009-09-09) - */ - protected function _putAPXObject($w=0, $h=0, $stream='') { - $stream = trim($stream); - $out = $this->_getobj()."\n"; - $this->xobjects['AX'.$this->n] = array('n' => $this->n); - $out .= '<<'; - $out .= ' /Type /XObject'; - $out .= ' /Subtype /Form'; - $out .= ' /FormType 1'; - if ($this->compress) { - $stream = gzcompress($stream); - $out .= ' /Filter /FlateDecode'; - } - $rect = sprintf('%F %F', $w, $h); - $out .= ' /BBox [0 0 '.$rect.']'; - $out .= ' /Matrix [1 0 0 1 0 0]'; - $out .= ' /Resources 2 0 R'; - $stream = $this->_getrawstream($stream); - $out .= ' /Length '.strlen($stream); - $out .= ' >>'; - $out .= ' stream'."\n".$stream."\n".'endstream'; - $out .= "\n".'endobj'; - $this->_out($out); - return $this->n; - } - - /** - * Output fonts. - * @author Nicola Asuni - * @protected - */ - protected function _putfonts() { - $nf = $this->n; - foreach ($this->diffs as $diff) { - //Encodings - $this->_newobj(); - $this->_out('<< /Type /Encoding /BaseEncoding /WinAnsiEncoding /Differences ['.$diff.'] >>'."\n".'endobj'); - } - $mqr = TCPDF_STATIC::get_mqr(); - TCPDF_STATIC::set_mqr(false); - foreach ($this->FontFiles as $file => $info) { - // search and get font file to embedd - $fontfile = TCPDF_FONTS::getFontFullPath($file, $info['fontdir']); - if (!TCPDF_STATIC::empty_string($fontfile)) { - $font = file_get_contents($fontfile); - $compressed = (substr($file, -2) == '.z'); - if ((!$compressed) AND (isset($info['length2']))) { - $header = (ord($font[0]) == 128); - if ($header) { - // strip first binary header - $font = substr($font, 6); - } - if ($header AND (ord($font[$info['length1']]) == 128)) { - // strip second binary header - $font = substr($font, 0, $info['length1']).substr($font, ($info['length1'] + 6)); - } - } elseif ($info['subset'] AND ((!$compressed) OR ($compressed AND function_exists('gzcompress')))) { - if ($compressed) { - // uncompress font - $font = gzuncompress($font); - } - // merge subset characters - $subsetchars = array(); // used chars - foreach ($info['fontkeys'] as $fontkey) { - $fontinfo = $this->getFontBuffer($fontkey); - $subsetchars += $fontinfo['subsetchars']; - } - // rebuild a font subset - $font = TCPDF_FONTS::_getTrueTypeFontSubset($font, $subsetchars); - // calculate new font length - $info['length1'] = strlen($font); - if ($compressed) { - // recompress font - $font = gzcompress($font); - } - } - $this->_newobj(); - $this->FontFiles[$file]['n'] = $this->n; - $stream = $this->_getrawstream($font); - $out = '<< /Length '.strlen($stream); - if ($compressed) { - $out .= ' /Filter /FlateDecode'; - } - $out .= ' /Length1 '.$info['length1']; - if (isset($info['length2'])) { - $out .= ' /Length2 '.$info['length2'].' /Length3 0'; - } - $out .= ' >>'; - $out .= ' stream'."\n".$stream."\n".'endstream'; - $out .= "\n".'endobj'; - $this->_out($out); - } - } - TCPDF_STATIC::set_mqr($mqr); - foreach ($this->fontkeys as $k) { - //Font objects - $font = $this->getFontBuffer($k); - $type = $font['type']; - $name = $font['name']; - if ($type == 'core') { - // standard core font - $out = $this->_getobj($this->font_obj_ids[$k])."\n"; - $out .= '<annotation_fonts[$k] = $font['i']; - } - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - } elseif (($type == 'Type1') OR ($type == 'TrueType')) { - // additional Type1 or TrueType font - $out = $this->_getobj($this->font_obj_ids[$k])."\n"; - $out .= '<n + 1).' 0 R'; - $out .= ' /FontDescriptor '.($this->n + 2).' 0 R'; - if ($font['enc']) { - if (isset($font['diff'])) { - $out .= ' /Encoding '.($nf + $font['diff']).' 0 R'; - } else { - $out .= ' /Encoding /WinAnsiEncoding'; - } - } - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - // Widths - $this->_newobj(); - $s = '['; - for ($i = 32; $i < 256; ++$i) { - if (isset($font['cw'][$i])) { - $s .= $font['cw'][$i].' '; - } else { - $s .= $font['dw'].' '; - } - } - $s .= ']'; - $s .= "\n".'endobj'; - $this->_out($s); - //Descriptor - $this->_newobj(); - $s = '< $fdv) { - if (is_float($fdv)) { - $fdv = sprintf('%F', $fdv); - } - $s .= ' /'.$fdk.' '.$fdv.''; - } - if (!TCPDF_STATIC::empty_string($font['file'])) { - $s .= ' /FontFile'.($type == 'Type1' ? '' : '2').' '.$this->FontFiles[$font['file']]['n'].' 0 R'; - } - $s .= '>>'; - $s .= "\n".'endobj'; - $this->_out($s); - } else { - // additional types - $mtd = '_put'.strtolower($type); - if (!method_exists($this, $mtd)) { - $this->Error('Unsupported font type: '.$type); - } - $this->$mtd($font); - } - } - } - - /** - * Adds unicode fonts.
          - * Based on PDF Reference 1.3 (section 5) - * @param $font (array) font data - * @protected - * @author Nicola Asuni - * @since 1.52.0.TC005 (2005-01-05) - */ - protected function _puttruetypeunicode($font) { - $fontname = ''; - if ($font['subset']) { - // change name for font subsetting - $subtag = sprintf('%06u', $font['i']); - $subtag = strtr($subtag, '0123456789', 'ABCDEFGHIJ'); - $fontname .= $subtag.'+'; - } - $fontname .= $font['name']; - // Type0 Font - // A composite font composed of other fonts, organized hierarchically - $out = $this->_getobj($this->font_obj_ids[$font['fontkey']])."\n"; - $out .= '<< /Type /Font'; - $out .= ' /Subtype /Type0'; - $out .= ' /BaseFont /'.$fontname; - $out .= ' /Name /F'.$font['i']; - $out .= ' /Encoding /'.$font['enc']; - $out .= ' /ToUnicode '.($this->n + 1).' 0 R'; - $out .= ' /DescendantFonts ['.($this->n + 2).' 0 R]'; - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - // ToUnicode map for Identity-H - $stream = TCPDF_FONT_DATA::$uni_identity_h; - // ToUnicode Object - $this->_newobj(); - $stream = ($this->compress) ? gzcompress($stream) : $stream; - $filter = ($this->compress) ? '/Filter /FlateDecode ' : ''; - $stream = $this->_getrawstream($stream); - $this->_out('<<'.$filter.'/Length '.strlen($stream).'>> stream'."\n".$stream."\n".'endstream'."\n".'endobj'); - // CIDFontType2 - // A CIDFont whose glyph descriptions are based on TrueType font technology - $oid = $this->_newobj(); - $out = '<< /Type /Font'; - $out .= ' /Subtype /CIDFontType2'; - $out .= ' /BaseFont /'.$fontname; - // A dictionary containing entries that define the character collection of the CIDFont. - $cidinfo = '/Registry '.$this->_datastring($font['cidinfo']['Registry'], $oid); - $cidinfo .= ' /Ordering '.$this->_datastring($font['cidinfo']['Ordering'], $oid); - $cidinfo .= ' /Supplement '.$font['cidinfo']['Supplement']; - $out .= ' /CIDSystemInfo << '.$cidinfo.' >>'; - $out .= ' /FontDescriptor '.($this->n + 1).' 0 R'; - $out .= ' /DW '.$font['dw']; // default width - $out .= "\n".TCPDF_FONTS::_putfontwidths($font, 0); - if (isset($font['ctg']) AND (!TCPDF_STATIC::empty_string($font['ctg']))) { - $out .= "\n".'/CIDToGIDMap '.($this->n + 2).' 0 R'; - } - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - // Font descriptor - // A font descriptor describing the CIDFont default metrics other than its glyph widths - $this->_newobj(); - $out = '<< /Type /FontDescriptor'; - $out .= ' /FontName /'.$fontname; - foreach ($font['desc'] as $key => $value) { - if (is_float($value)) { - $value = sprintf('%F', $value); - } - $out .= ' /'.$key.' '.$value; - } - $fontdir = false; - if (!TCPDF_STATIC::empty_string($font['file'])) { - // A stream containing a TrueType font - $out .= ' /FontFile2 '.$this->FontFiles[$font['file']]['n'].' 0 R'; - $fontdir = $this->FontFiles[$font['file']]['fontdir']; - } - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - if (isset($font['ctg']) AND (!TCPDF_STATIC::empty_string($font['ctg']))) { - $this->_newobj(); - // Embed CIDToGIDMap - // A specification of the mapping from CIDs to glyph indices - // search and get CTG font file to embedd - $ctgfile = strtolower($font['ctg']); - // search and get ctg font file to embedd - $fontfile = TCPDF_FONTS::getFontFullPath($ctgfile, $fontdir); - if (TCPDF_STATIC::empty_string($fontfile)) { - $this->Error('Font file not found: '.$ctgfile); - } - $stream = $this->_getrawstream(file_get_contents($fontfile)); - $out = '<< /Length '.strlen($stream).''; - if (substr($fontfile, -2) == '.z') { // check file extension - // Decompresses data encoded using the public-domain - // zlib/deflate compression method, reproducing the - // original text or binary data - $out .= ' /Filter /FlateDecode'; - } - $out .= ' >>'; - $out .= ' stream'."\n".$stream."\n".'endstream'; - $out .= "\n".'endobj'; - $this->_out($out); - } - } - - /** - * Output CID-0 fonts. - * A Type 0 CIDFont contains glyph descriptions based on the Adobe Type 1 font format - * @param $font (array) font data - * @protected - * @author Andrew Whitehead, Nicola Asuni, Yukihiro Nakadaira - * @since 3.2.000 (2008-06-23) - */ - protected function _putcidfont0($font) { - $cidoffset = 0; - if (!isset($font['cw'][1])) { - $cidoffset = 31; - } - if (isset($font['cidinfo']['uni2cid'])) { - // convert unicode to cid. - $uni2cid = $font['cidinfo']['uni2cid']; - $cw = array(); - foreach ($font['cw'] as $uni => $width) { - if (isset($uni2cid[$uni])) { - $cw[($uni2cid[$uni] + $cidoffset)] = $width; - } elseif ($uni < 256) { - $cw[$uni] = $width; - } // else unknown character - } - $font = array_merge($font, array('cw' => $cw)); - } - $name = $font['name']; - $enc = $font['enc']; - if ($enc) { - $longname = $name.'-'.$enc; - } else { - $longname = $name; - } - $out = $this->_getobj($this->font_obj_ids[$font['fontkey']])."\n"; - $out .= '<n + 1).' 0 R]'; - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - $oid = $this->_newobj(); - $out = '<_datastring($font['cidinfo']['Registry'], $oid); - $cidinfo .= ' /Ordering '.$this->_datastring($font['cidinfo']['Ordering'], $oid); - $cidinfo .= ' /Supplement '.$font['cidinfo']['Supplement']; - $out .= ' /CIDSystemInfo <<'.$cidinfo.'>>'; - $out .= ' /FontDescriptor '.($this->n + 1).' 0 R'; - $out .= ' /DW '.$font['dw']; - $out .= "\n".TCPDF_FONTS::_putfontwidths($font, $cidoffset); - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - $this->_newobj(); - $s = '< $v) { - if ($k != 'Style') { - if (is_float($v)) { - $v = sprintf('%F', $v); - } - $s .= ' /'.$k.' '.$v.''; - } - } - $s .= '>>'; - $s .= "\n".'endobj'; - $this->_out($s); - } - - /** - * Output images. - * @protected - */ - protected function _putimages() { - $filter = ($this->compress) ? '/Filter /FlateDecode ' : ''; - foreach ($this->imagekeys as $file) { - $info = $this->getImageBuffer($file); - // set object for alternate images array - if ((!$this->pdfa_mode) AND isset($info['altimgs']) AND !empty($info['altimgs'])) { - $altoid = $this->_newobj(); - $out = '['; - foreach ($info['altimgs'] as $altimage) { - if (isset($this->xobjects['I'.$altimage[0]]['n'])) { - $out .= ' << /Image '.$this->xobjects['I'.$altimage[0]]['n'].' 0 R'; - $out .= ' /DefaultForPrinting'; - if ($altimage[1] === true) { - $out .= ' true'; - } else { - $out .= ' false'; - } - $out .= ' >>'; - } - } - $out .= ' ]'; - $out .= "\n".'endobj'; - $this->_out($out); - } - // set image object - $oid = $this->_newobj(); - $this->xobjects['I'.$info['i']] = array('n' => $oid); - $this->setImageSubBuffer($file, 'n', $this->n); - $out = '<n - 1).' 0 R'; - } - // set color space - $icc = false; - if (isset($info['icc']) AND ($info['icc'] !== false)) { - // ICC Colour Space - $icc = true; - $out .= ' /ColorSpace [/ICCBased '.($this->n + 1).' 0 R]'; - } elseif ($info['cs'] == 'Indexed') { - // Indexed Colour Space - $out .= ' /ColorSpace [/Indexed /DeviceRGB '.((strlen($info['pal']) / 3) - 1).' '.($this->n + 1).' 0 R]'; - } else { - // Device Colour Space - $out .= ' /ColorSpace /'.$info['cs']; - } - if ($info['cs'] == 'DeviceCMYK') { - $out .= ' /Decode [1 0 1 0 1 0 1 0]'; - } - $out .= ' /BitsPerComponent '.$info['bpc']; - if (isset($altoid) AND ($altoid > 0)) { - // reference to alternate images dictionary - $out .= ' /Alternates '.$altoid.' 0 R'; - } - if (isset($info['exurl']) AND !empty($info['exurl'])) { - // external stream - $out .= ' /Length 0'; - $out .= ' /F << /FS /URL /F '.$this->_datastring($info['exurl'], $oid).' >>'; - if (isset($info['f'])) { - $out .= ' /FFilter /'.$info['f']; - } - $out .= ' >>'; - $out .= ' stream'."\n".'endstream'; - } else { - if (isset($info['f'])) { - $out .= ' /Filter /'.$info['f']; - } - if (isset($info['parms'])) { - $out .= ' '.$info['parms']; - } - if (isset($info['trns']) AND is_array($info['trns'])) { - $trns = ''; - $count_info = count($info['trns']); - if ($info['cs'] == 'Indexed') { - $maxval =(pow(2, $info['bpc']) - 1); - for ($i = 0; $i < $count_info; ++$i) { - if (($info['trns'][$i] != 0) AND ($info['trns'][$i] != $maxval)) { - // this is not a binary type mask @TODO: create a SMask - $trns = ''; - break; - } elseif (empty($trns) AND ($info['trns'][$i] == 0)) { - // store the first fully transparent value - $trns .= $i.' '.$i.' '; - } - } - } else { - // grayscale or RGB - for ($i = 0; $i < $count_info; ++$i) { - if ($info['trns'][$i] == 0) { - $trns .= $info['trns'][$i].' '.$info['trns'][$i].' '; - } - } - } - // Colour Key Masking - if (!empty($trns)) { - $out .= ' /Mask ['.$trns.']'; - } - } - $stream = $this->_getrawstream($info['data']); - $out .= ' /Length '.strlen($stream).' >>'; - $out .= ' stream'."\n".$stream."\n".'endstream'; - } - $out .= "\n".'endobj'; - $this->_out($out); - if ($icc) { - // ICC colour profile - $this->_newobj(); - $icc = ($this->compress) ? gzcompress($info['icc']) : $info['icc']; - $icc = $this->_getrawstream($icc); - $this->_out('<> stream'."\n".$icc."\n".'endstream'."\n".'endobj'); - } elseif ($info['cs'] == 'Indexed') { - // colour palette - $this->_newobj(); - $pal = ($this->compress) ? gzcompress($info['pal']) : $info['pal']; - $pal = $this->_getrawstream($pal); - $this->_out('<<'.$filter.'/Length '.strlen($pal).'>> stream'."\n".$pal."\n".'endstream'."\n".'endobj'); - } - } - } - - /** - * Output Form XObjects Templates. - * @author Nicola Asuni - * @since 5.8.017 (2010-08-24) - * @protected - * @see startTemplate(), endTemplate(), printTemplate() - */ - protected function _putxobjects() { - foreach ($this->xobjects as $key => $data) { - if (isset($data['outdata'])) { - $stream = str_replace($this->epsmarker, '', trim($data['outdata'])); - $out = $this->_getobj($data['n'])."\n"; - $out .= '<<'; - $out .= ' /Type /XObject'; - $out .= ' /Subtype /Form'; - $out .= ' /FormType 1'; - if ($this->compress) { - $stream = gzcompress($stream); - $out .= ' /Filter /FlateDecode'; - } - $out .= sprintf(' /BBox [%F %F %F %F]', ($data['x'] * $this->k), (-$data['y'] * $this->k), (($data['w'] + $data['x']) * $this->k), (($data['h'] - $data['y']) * $this->k)); - $out .= ' /Matrix [1 0 0 1 0 0]'; - $out .= ' /Resources <<'; - $out .= ' /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]'; - if (!$this->pdfa_mode) { - // transparency - if (isset($data['extgstates']) AND !empty($data['extgstates'])) { - $out .= ' /ExtGState <<'; - foreach ($data['extgstates'] as $k => $extgstate) { - if (isset($this->extgstates[$k]['name'])) { - $out .= ' /'.$this->extgstates[$k]['name']; - } else { - $out .= ' /GS'.$k; - } - $out .= ' '.$this->extgstates[$k]['n'].' 0 R'; - } - $out .= ' >>'; - } - if (isset($data['gradients']) AND !empty($data['gradients'])) { - $gp = ''; - $gs = ''; - foreach ($data['gradients'] as $id => $grad) { - // gradient patterns - $gp .= ' /p'.$id.' '.$this->gradients[$id]['pattern'].' 0 R'; - // gradient shadings - $gs .= ' /Sh'.$id.' '.$this->gradients[$id]['id'].' 0 R'; - } - $out .= ' /Pattern <<'.$gp.' >>'; - $out .= ' /Shading <<'.$gs.' >>'; - } - } - // spot colors - if (isset($data['spot_colors']) AND !empty($data['spot_colors'])) { - $out .= ' /ColorSpace <<'; - foreach ($data['spot_colors'] as $name => $color) { - $out .= ' /CS'.$color['i'].' '.$this->spot_colors[$name]['n'].' 0 R'; - } - $out .= ' >>'; - } - // fonts - if (!empty($data['fonts'])) { - $out .= ' /Font <<'; - foreach ($data['fonts'] as $fontkey => $fontid) { - $out .= ' /F'.$fontid.' '.$this->font_obj_ids[$fontkey].' 0 R'; - } - $out .= ' >>'; - } - // images or nested xobjects - if (!empty($data['images']) OR !empty($data['xobjects'])) { - $out .= ' /XObject <<'; - foreach ($data['images'] as $imgid) { - $out .= ' /I'.$imgid.' '.$this->xobjects['I'.$imgid]['n'].' 0 R'; - } - foreach ($data['xobjects'] as $sub_id => $sub_objid) { - $out .= ' /'.$sub_id.' '.$sub_objid['n'].' 0 R'; - } - $out .= ' >>'; - } - $out .= ' >>'; //end resources - if (isset($data['group']) AND ($data['group'] !== false)) { - // set transparency group - $out .= ' /Group << /Type /Group /S /Transparency'; - if (is_array($data['group'])) { - if (isset($data['group']['CS']) AND !empty($data['group']['CS'])) { - $out .= ' /CS /'.$data['group']['CS']; - } - if (isset($data['group']['I'])) { - $out .= ' /I /'.($data['group']['I']===true?'true':'false'); - } - if (isset($data['group']['K'])) { - $out .= ' /K /'.($data['group']['K']===true?'true':'false'); - } - } - $out .= ' >>'; - } - $stream = $this->_getrawstream($stream, $data['n']); - $out .= ' /Length '.strlen($stream); - $out .= ' >>'; - $out .= ' stream'."\n".$stream."\n".'endstream'; - $out .= "\n".'endobj'; - $this->_out($out); - } - } - } - - /** - * Output Spot Colors Resources. - * @protected - * @since 4.0.024 (2008-09-12) - */ - protected function _putspotcolors() { - foreach ($this->spot_colors as $name => $color) { - $this->_newobj(); - $this->spot_colors[$name]['n'] = $this->n; - $out = '[/Separation /'.str_replace(' ', '#20', $name); - $out .= ' /DeviceCMYK <<'; - $out .= ' /Range [0 1 0 1 0 1 0 1] /C0 [0 0 0 0]'; - $out .= ' '.sprintf('/C1 [%F %F %F %F] ', ($color['C'] / 100), ($color['M'] / 100), ($color['Y'] / 100), ($color['K'] / 100)); - $out .= ' /FunctionType 2 /Domain [0 1] /N 1>>]'; - $out .= "\n".'endobj'; - $this->_out($out); - } - } - - /** - * Return XObjects Dictionary. - * @return string XObjects dictionary - * @protected - * @since 5.8.014 (2010-08-23) - */ - protected function _getxobjectdict() { - $out = ''; - foreach ($this->xobjects as $id => $objid) { - $out .= ' /'.$id.' '.$objid['n'].' 0 R'; - } - return $out; - } - - /** - * Output Resources Dictionary. - * @protected - */ - protected function _putresourcedict() { - $out = $this->_getobj(2)."\n"; - $out .= '<< /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]'; - $out .= ' /Font <<'; - foreach ($this->fontkeys as $fontkey) { - $font = $this->getFontBuffer($fontkey); - $out .= ' /F'.$font['i'].' '.$font['n'].' 0 R'; - } - $out .= ' >>'; - $out .= ' /XObject <<'; - $out .= $this->_getxobjectdict(); - $out .= ' >>'; - // layers - if (!empty($this->pdflayers)) { - $out .= ' /Properties <<'; - foreach ($this->pdflayers as $layer) { - $out .= ' /'.$layer['layer'].' '.$layer['objid'].' 0 R'; - } - $out .= ' >>'; - } - if (!$this->pdfa_mode) { - // transparency - if (isset($this->extgstates) AND !empty($this->extgstates)) { - $out .= ' /ExtGState <<'; - foreach ($this->extgstates as $k => $extgstate) { - if (isset($extgstate['name'])) { - $out .= ' /'.$extgstate['name']; - } else { - $out .= ' /GS'.$k; - } - $out .= ' '.$extgstate['n'].' 0 R'; - } - $out .= ' >>'; - } - if (isset($this->gradients) AND !empty($this->gradients)) { - $gp = ''; - $gs = ''; - foreach ($this->gradients as $id => $grad) { - // gradient patterns - $gp .= ' /p'.$id.' '.$grad['pattern'].' 0 R'; - // gradient shadings - $gs .= ' /Sh'.$id.' '.$grad['id'].' 0 R'; - } - $out .= ' /Pattern <<'.$gp.' >>'; - $out .= ' /Shading <<'.$gs.' >>'; - } - } - // spot colors - if (isset($this->spot_colors) AND !empty($this->spot_colors)) { - $out .= ' /ColorSpace <<'; - foreach ($this->spot_colors as $color) { - $out .= ' /CS'.$color['i'].' '.$color['n'].' 0 R'; - } - $out .= ' >>'; - } - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - } - - /** - * Output Resources. - * @protected - */ - protected function _putresources() { - $this->_putextgstates(); - $this->_putocg(); - $this->_putfonts(); - $this->_putimages(); - $this->_putspotcolors(); - $this->_putshaders(); - $this->_putxobjects(); - $this->_putresourcedict(); - $this->_putdests(); - $this->_putEmbeddedFiles(); - $this->_putannotsobjs(); - $this->_putjavascript(); - $this->_putbookmarks(); - $this->_putencryption(); - } - - /** - * Adds some Metadata information (Document Information Dictionary) - * (see Chapter 14.3.3 Document Information Dictionary of PDF32000_2008.pdf Reference) - * @return int object id - * @protected - */ - protected function _putinfo() { - $oid = $this->_newobj(); - $out = '<<'; - // store current isunicode value - $prev_isunicode = $this->isunicode; - if ($this->docinfounicode) { - $this->isunicode = true; - } - if (!TCPDF_STATIC::empty_string($this->title)) { - // The document's title. - $out .= ' /Title '.$this->_textstring($this->title, $oid); - } - if (!TCPDF_STATIC::empty_string($this->author)) { - // The name of the person who created the document. - $out .= ' /Author '.$this->_textstring($this->author, $oid); - } - if (!TCPDF_STATIC::empty_string($this->subject)) { - // The subject of the document. - $out .= ' /Subject '.$this->_textstring($this->subject, $oid); - } - if (!TCPDF_STATIC::empty_string($this->keywords)) { - // Keywords associated with the document. - $out .= ' /Keywords '.$this->_textstring($this->keywords, $oid); - } - if (!TCPDF_STATIC::empty_string($this->creator)) { - // If the document was converted to PDF from another format, the name of the conforming product that created the original document from which it was converted. - $out .= ' /Creator '.$this->_textstring($this->creator, $oid); - } - // restore previous isunicode value - $this->isunicode = $prev_isunicode; - // default producer - $out .= ' /Producer '.$this->_textstring(TCPDF_STATIC::getTCPDFProducer(), $oid); - // The date and time the document was created, in human-readable form - $out .= ' /CreationDate '.$this->_datestring(0, $this->doc_creation_timestamp); - // The date and time the document was most recently modified, in human-readable form - $out .= ' /ModDate '.$this->_datestring(0, $this->doc_modification_timestamp); - // A name object indicating whether the document has been modified to include trapping information - $out .= ' /Trapped /False'; - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - return $oid; - } - - /** - * Set additional XMP data to be added on the default XMP data just before the end of "x:xmpmeta" tag. - * IMPORTANT: This data is added as-is without controls, so you have to validate your data before using this method! - * @param $xmp (string) Custom XMP data. - * @since 5.9.128 (2011-10-06) - * @public - */ - public function setExtraXMP($xmp) { - $this->custom_xmp = $xmp; - } - - /** - * Put XMP data object and return ID. - * @return (int) The object ID. - * @since 5.9.121 (2011-09-28) - * @protected - */ - protected function _putXMP() { - $oid = $this->_newobj(); - // store current isunicode value - $prev_isunicode = $this->isunicode; - $this->isunicode = true; - $prev_encrypted = $this->encrypted; - $this->encrypted = false; - // set XMP data - $xmp = 'isunicode).'" id="W5M0MpCehiHzreSzNTczkc9d"?>'."\n"; - $xmp .= ''."\n"; - $xmp .= "\t".''."\n"; - $xmp .= "\t\t".''."\n"; - $xmp .= "\t\t\t".'application/pdf'."\n"; - $xmp .= "\t\t\t".''."\n"; - $xmp .= "\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t".''.TCPDF_STATIC::_escapeXML($this->title).''."\n"; - $xmp .= "\t\t\t\t".''."\n"; - $xmp .= "\t\t\t".''."\n"; - $xmp .= "\t\t\t".''."\n"; - $xmp .= "\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t".''.TCPDF_STATIC::_escapeXML($this->author).''."\n"; - $xmp .= "\t\t\t\t".''."\n"; - $xmp .= "\t\t\t".''."\n"; - $xmp .= "\t\t\t".''."\n"; - $xmp .= "\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t".''.TCPDF_STATIC::_escapeXML($this->subject).''."\n"; - $xmp .= "\t\t\t\t".''."\n"; - $xmp .= "\t\t\t".''."\n"; - $xmp .= "\t\t\t".''."\n"; - $xmp .= "\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t".''.TCPDF_STATIC::_escapeXML($this->keywords).''."\n"; - $xmp .= "\t\t\t\t".''."\n"; - $xmp .= "\t\t\t".''."\n"; - $xmp .= "\t\t".''."\n"; - // convert doc creation date format - $dcdate = TCPDF_STATIC::getFormattedDate($this->doc_creation_timestamp); - $doccreationdate = substr($dcdate, 0, 4).'-'.substr($dcdate, 4, 2).'-'.substr($dcdate, 6, 2); - $doccreationdate .= 'T'.substr($dcdate, 8, 2).':'.substr($dcdate, 10, 2).':'.substr($dcdate, 12, 2); - $doccreationdate .= substr($dcdate, 14, 3).':'.substr($dcdate, 18, 2); - $doccreationdate = TCPDF_STATIC::_escapeXML($doccreationdate); - // convert doc modification date format - $dmdate = TCPDF_STATIC::getFormattedDate($this->doc_modification_timestamp); - $docmoddate = substr($dmdate, 0, 4).'-'.substr($dmdate, 4, 2).'-'.substr($dmdate, 6, 2); - $docmoddate .= 'T'.substr($dmdate, 8, 2).':'.substr($dmdate, 10, 2).':'.substr($dmdate, 12, 2); - $docmoddate .= substr($dmdate, 14, 3).':'.substr($dmdate, 18, 2); - $docmoddate = TCPDF_STATIC::_escapeXML($docmoddate); - $xmp .= "\t\t".''."\n"; - $xmp .= "\t\t\t".''.$doccreationdate.''."\n"; - $xmp .= "\t\t\t".''.$this->creator.''."\n"; - $xmp .= "\t\t\t".''.$docmoddate.''."\n"; - $xmp .= "\t\t\t".''.$doccreationdate.''."\n"; - $xmp .= "\t\t".''."\n"; - $xmp .= "\t\t".''."\n"; - $xmp .= "\t\t\t".''.TCPDF_STATIC::_escapeXML($this->keywords).''."\n"; - $xmp .= "\t\t\t".''.TCPDF_STATIC::_escapeXML(TCPDF_STATIC::getTCPDFProducer()).''."\n"; - $xmp .= "\t\t".''."\n"; - $xmp .= "\t\t".''."\n"; - $uuid = 'uuid:'.substr($this->file_id, 0, 8).'-'.substr($this->file_id, 8, 4).'-'.substr($this->file_id, 12, 4).'-'.substr($this->file_id, 16, 4).'-'.substr($this->file_id, 20, 12); - $xmp .= "\t\t\t".''.$uuid.''."\n"; - $xmp .= "\t\t\t".''.$uuid.''."\n"; - $xmp .= "\t\t".''."\n"; - if ($this->pdfa_mode) { - $xmp .= "\t\t".''."\n"; - $xmp .= "\t\t\t".'1'."\n"; - $xmp .= "\t\t\t".'B'."\n"; - $xmp .= "\t\t".''."\n"; - } - // XMP extension schemas - $xmp .= "\t\t".''."\n"; - $xmp .= "\t\t\t".''."\n"; - $xmp .= "\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t".'http://ns.adobe.com/pdf/1.3/'."\n"; - $xmp .= "\t\t\t\t\t\t".'pdf'."\n"; - $xmp .= "\t\t\t\t\t\t".'Adobe PDF Schema'."\n"; - $xmp .= "\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t".'http://ns.adobe.com/xap/1.0/mm/'."\n"; - $xmp .= "\t\t\t\t\t\t".'xmpMM'."\n"; - $xmp .= "\t\t\t\t\t\t".'XMP Media Management Schema'."\n"; - $xmp .= "\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'internal'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'UUID based identifier for specific incarnation of a document'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'InstanceID'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'URI'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t".'http://www.aiim.org/pdfa/ns/id/'."\n"; - $xmp .= "\t\t\t\t\t\t".'pdfaid'."\n"; - $xmp .= "\t\t\t\t\t\t".'PDF/A ID Schema'."\n"; - $xmp .= "\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'internal'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'Part of PDF/A standard'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'part'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'Integer'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'internal'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'Amendment of PDF/A standard'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'amd'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'Text'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'internal'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'Conformance level of PDF/A standard'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'conformance'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'Text'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t".''."\n"; - $xmp .= "\t\t\t".''."\n"; - $xmp .= "\t\t".''."\n"; - $xmp .= "\t".''."\n"; - $xmp .= $this->custom_xmp; - $xmp .= ''."\n"; - $xmp .= ''; - $out = '<< /Type /Metadata /Subtype /XML /Length '.strlen($xmp).' >> stream'."\n".$xmp."\n".'endstream'."\n".'endobj'; - // restore previous isunicode value - $this->isunicode = $prev_isunicode; - $this->encrypted = $prev_encrypted; - $this->_out($out); - return $oid; - } - - /** - * Output Catalog. - * @return int object id - * @protected - */ - protected function _putcatalog() { - // put XMP - $xmpobj = $this->_putXMP(); - // if required, add standard sRGB_IEC61966-2.1 blackscaled ICC colour profile - if ($this->pdfa_mode OR $this->force_srgb) { - $iccobj = $this->_newobj(); - $icc = file_get_contents(dirname(__FILE__).'/include/sRGB.icc'); - $filter = ''; - if ($this->compress) { - $filter = ' /Filter /FlateDecode'; - $icc = gzcompress($icc); - } - $icc = $this->_getrawstream($icc); - $this->_out('<> stream'."\n".$icc."\n".'endstream'."\n".'endobj'); - } - // start catalog - $oid = $this->_newobj(); - $out = '<< /Type /Catalog'; - $out .= ' /Version /'.$this->PDFVersion; - //$out .= ' /Extensions <<>>'; - $out .= ' /Pages 1 0 R'; - //$out .= ' /PageLabels ' //...; - $out .= ' /Names <<'; - if ((!$this->pdfa_mode) AND !empty($this->n_js)) { - $out .= ' /JavaScript '.$this->n_js; - } - if (!empty($this->efnames)) { - $out .= ' /EmbeddedFiles <efnames AS $fn => $fref) { - $out .= ' '.$this->_datastring($fn).' '.$fref; - } - $out .= ' ]>>'; - } - $out .= ' >>'; - if (!empty($this->dests)) { - $out .= ' /Dests '.($this->n_dests).' 0 R'; - } - $out .= $this->_putviewerpreferences(); - if (isset($this->LayoutMode) AND (!TCPDF_STATIC::empty_string($this->LayoutMode))) { - $out .= ' /PageLayout /'.$this->LayoutMode; - } - if (isset($this->PageMode) AND (!TCPDF_STATIC::empty_string($this->PageMode))) { - $out .= ' /PageMode /'.$this->PageMode; - } - if (count($this->outlines) > 0) { - $out .= ' /Outlines '.$this->OutlineRoot.' 0 R'; - $out .= ' /PageMode /UseOutlines'; - } - //$out .= ' /Threads []'; - if ($this->ZoomMode == 'fullpage') { - $out .= ' /OpenAction ['.$this->page_obj_id[1].' 0 R /Fit]'; - } elseif ($this->ZoomMode == 'fullwidth') { - $out .= ' /OpenAction ['.$this->page_obj_id[1].' 0 R /FitH null]'; - } elseif ($this->ZoomMode == 'real') { - $out .= ' /OpenAction ['.$this->page_obj_id[1].' 0 R /XYZ null null 1]'; - } elseif (!is_string($this->ZoomMode)) { - $out .= sprintf(' /OpenAction ['.$this->page_obj_id[1].' 0 R /XYZ null null %F]', ($this->ZoomMode / 100)); - } - //$out .= ' /AA <<>>'; - //$out .= ' /URI <<>>'; - $out .= ' /Metadata '.$xmpobj.' 0 R'; - //$out .= ' /StructTreeRoot <<>>'; - //$out .= ' /MarkInfo <<>>'; - if (isset($this->l['a_meta_language'])) { - $out .= ' /Lang '.$this->_textstring($this->l['a_meta_language'], $oid); - } - //$out .= ' /SpiderInfo <<>>'; - // set OutputIntent to sRGB IEC61966-2.1 if required - if ($this->pdfa_mode OR $this->force_srgb) { - $out .= ' /OutputIntents [<<'; - $out .= ' /Type /OutputIntent'; - $out .= ' /S /GTS_PDFA1'; - $out .= ' /OutputCondition '.$this->_textstring('sRGB IEC61966-2.1', $oid); - $out .= ' /OutputConditionIdentifier '.$this->_textstring('sRGB IEC61966-2.1', $oid); - $out .= ' /RegistryName '.$this->_textstring('http://www.color.org', $oid); - $out .= ' /Info '.$this->_textstring('sRGB IEC61966-2.1', $oid); - $out .= ' /DestOutputProfile '.$iccobj.' 0 R'; - $out .= ' >>]'; - } - //$out .= ' /PieceInfo <<>>'; - if (!empty($this->pdflayers)) { - $lyrobjs = ''; - $lyrobjs_off = ''; - $lyrobjs_lock = ''; - foreach ($this->pdflayers as $layer) { - $layer_obj_ref = ' '.$layer['objid'].' 0 R'; - $lyrobjs .= $layer_obj_ref; - if ($layer['view'] === false) { - $lyrobjs_off .= $layer_obj_ref; - } - if ($layer['lock']) { - $lyrobjs_lock .= $layer_obj_ref; - } - } - $out .= ' /OCProperties << /OCGs ['.$lyrobjs.']'; - $out .= ' /D <<'; - $out .= ' /Name '.$this->_textstring('Layers', $oid); - $out .= ' /Creator '.$this->_textstring('TCPDF', $oid); - $out .= ' /BaseState /ON'; - $out .= ' /OFF ['.$lyrobjs_off.']'; - $out .= ' /Locked ['.$lyrobjs_lock.']'; - $out .= ' /Intent /View'; - $out .= ' /AS ['; - $out .= ' << /Event /Print /OCGs ['.$lyrobjs.'] /Category [/Print] >>'; - $out .= ' << /Event /View /OCGs ['.$lyrobjs.'] /Category [/View] >>'; - $out .= ' ]'; - $out .= ' /Order ['.$lyrobjs.']'; - $out .= ' /ListMode /AllPages'; - //$out .= ' /RBGroups ['..']'; - //$out .= ' /Locked ['..']'; - $out .= ' >>'; - $out .= ' >>'; - } - // AcroForm - if (!empty($this->form_obj_id) - OR ($this->sign AND isset($this->signature_data['cert_type'])) - OR !empty($this->empty_signature_appearance)) { - $out .= ' /AcroForm <<'; - $objrefs = ''; - if ($this->sign AND isset($this->signature_data['cert_type'])) { - // set reference for signature object - $objrefs .= $this->sig_obj_id.' 0 R'; - } - if (!empty($this->empty_signature_appearance)) { - foreach ($this->empty_signature_appearance as $esa) { - // set reference for empty signature objects - $objrefs .= ' '.$esa['objid'].' 0 R'; - } - } - if (!empty($this->form_obj_id)) { - foreach($this->form_obj_id as $objid) { - $objrefs .= ' '.$objid.' 0 R'; - } - } - $out .= ' /Fields ['.$objrefs.']'; - // It's better to turn off this value and set the appearance stream for each annotation (/AP) to avoid conflicts with signature fields. - if (empty($this->signature_data['approval']) OR ($this->signature_data['approval'] != 'A')) { - $out .= ' /NeedAppearances false'; - } - if ($this->sign AND isset($this->signature_data['cert_type'])) { - if ($this->signature_data['cert_type'] > 0) { - $out .= ' /SigFlags 3'; - } else { - $out .= ' /SigFlags 1'; - } - } - //$out .= ' /CO '; - if (isset($this->annotation_fonts) AND !empty($this->annotation_fonts)) { - $out .= ' /DR <<'; - $out .= ' /Font <<'; - foreach ($this->annotation_fonts as $fontkey => $fontid) { - $out .= ' /F'.$fontid.' '.$this->font_obj_ids[$fontkey].' 0 R'; - } - $out .= ' >> >>'; - } - $font = $this->getFontBuffer('helvetica'); - $out .= ' /DA (/F'.$font['i'].' 0 Tf 0 g)'; - $out .= ' /Q '.(($this->rtl)?'2':'0'); - //$out .= ' /XFA '; - $out .= ' >>'; - // signatures - if ($this->sign AND isset($this->signature_data['cert_type']) - AND (empty($this->signature_data['approval']) OR ($this->signature_data['approval'] != 'A'))) { - if ($this->signature_data['cert_type'] > 0) { - $out .= ' /Perms << /DocMDP '.($this->sig_obj_id + 1).' 0 R >>'; - } else { - $out .= ' /Perms << /UR3 '.($this->sig_obj_id + 1).' 0 R >>'; - } - } - } - //$out .= ' /Legal <<>>'; - //$out .= ' /Requirements []'; - //$out .= ' /Collection <<>>'; - //$out .= ' /NeedsRendering true'; - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - return $oid; - } - - /** - * Output viewer preferences. - * @return string for viewer preferences - * @author Nicola asuni - * @since 3.1.000 (2008-06-09) - * @protected - */ - protected function _putviewerpreferences() { - $vp = $this->viewer_preferences; - $out = ' /ViewerPreferences <<'; - if ($this->rtl) { - $out .= ' /Direction /R2L'; - } else { - $out .= ' /Direction /L2R'; - } - if (isset($vp['HideToolbar']) AND ($vp['HideToolbar'])) { - $out .= ' /HideToolbar true'; - } - if (isset($vp['HideMenubar']) AND ($vp['HideMenubar'])) { - $out .= ' /HideMenubar true'; - } - if (isset($vp['HideWindowUI']) AND ($vp['HideWindowUI'])) { - $out .= ' /HideWindowUI true'; - } - if (isset($vp['FitWindow']) AND ($vp['FitWindow'])) { - $out .= ' /FitWindow true'; - } - if (isset($vp['CenterWindow']) AND ($vp['CenterWindow'])) { - $out .= ' /CenterWindow true'; - } - if (isset($vp['DisplayDocTitle']) AND ($vp['DisplayDocTitle'])) { - $out .= ' /DisplayDocTitle true'; - } - if (isset($vp['NonFullScreenPageMode'])) { - $out .= ' /NonFullScreenPageMode /'.$vp['NonFullScreenPageMode']; - } - if (isset($vp['ViewArea'])) { - $out .= ' /ViewArea /'.$vp['ViewArea']; - } - if (isset($vp['ViewClip'])) { - $out .= ' /ViewClip /'.$vp['ViewClip']; - } - if (isset($vp['PrintArea'])) { - $out .= ' /PrintArea /'.$vp['PrintArea']; - } - if (isset($vp['PrintClip'])) { - $out .= ' /PrintClip /'.$vp['PrintClip']; - } - if (isset($vp['PrintScaling'])) { - $out .= ' /PrintScaling /'.$vp['PrintScaling']; - } - if (isset($vp['Duplex']) AND (!TCPDF_STATIC::empty_string($vp['Duplex']))) { - $out .= ' /Duplex /'.$vp['Duplex']; - } - if (isset($vp['PickTrayByPDFSize'])) { - if ($vp['PickTrayByPDFSize']) { - $out .= ' /PickTrayByPDFSize true'; - } else { - $out .= ' /PickTrayByPDFSize false'; - } - } - if (isset($vp['PrintPageRange'])) { - $PrintPageRangeNum = ''; - foreach ($vp['PrintPageRange'] as $k => $v) { - $PrintPageRangeNum .= ' '.($v - 1).''; - } - $out .= ' /PrintPageRange ['.substr($PrintPageRangeNum,1).']'; - } - if (isset($vp['NumCopies'])) { - $out .= ' /NumCopies '.intval($vp['NumCopies']); - } - $out .= ' >>'; - return $out; - } - - /** - * Output PDF File Header (7.5.2). - * @protected - */ - protected function _putheader() { - $this->_out('%PDF-'.$this->PDFVersion); - $this->_out('%'.chr(0xe2).chr(0xe3).chr(0xcf).chr(0xd3)); - } - - /** - * Output end of document (EOF). - * @protected - */ - protected function _enddoc() { - if (isset($this->CurrentFont['fontkey']) AND isset($this->CurrentFont['subsetchars'])) { - // save subset chars of the previous font - $this->setFontSubBuffer($this->CurrentFont['fontkey'], 'subsetchars', $this->CurrentFont['subsetchars']); - } - $this->state = 1; - $this->_putheader(); - $this->_putpages(); - $this->_putresources(); - // empty signature fields - if (!empty($this->empty_signature_appearance)) { - foreach ($this->empty_signature_appearance as $key => $esa) { - // widget annotation for empty signature - $out = $this->_getobj($esa['objid'])."\n"; - $out .= '<< /Type /Annot'; - $out .= ' /Subtype /Widget'; - $out .= ' /Rect ['.$esa['rect'].']'; - $out .= ' /P '.$this->page_obj_id[($esa['page'])].' 0 R'; // link to signature appearance page - $out .= ' /F 4'; - $out .= ' /FT /Sig'; - $signame = $esa['name'].sprintf(' [%03d]', ($key + 1)); - $out .= ' /T '.$this->_textstring($signame, $esa['objid']); - $out .= ' /Ff 0'; - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - } - } - // Signature - if ($this->sign AND isset($this->signature_data['cert_type'])) { - // widget annotation for signature - $out = $this->_getobj($this->sig_obj_id)."\n"; - $out .= '<< /Type /Annot'; - $out .= ' /Subtype /Widget'; - $out .= ' /Rect ['.$this->signature_appearance['rect'].']'; - $out .= ' /P '.$this->page_obj_id[($this->signature_appearance['page'])].' 0 R'; // link to signature appearance page - $out .= ' /F 4'; - $out .= ' /FT /Sig'; - $out .= ' /T '.$this->_textstring($this->signature_appearance['name'], $this->sig_obj_id); - $out .= ' /Ff 0'; - $out .= ' /V '.($this->sig_obj_id + 1).' 0 R'; - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - // signature - $this->_putsignature(); - } - // Info - $objid_info = $this->_putinfo(); - // Catalog - $objid_catalog = $this->_putcatalog(); - // Cross-ref - $o = $this->bufferlen; - // XREF section - $this->_out('xref'); - $this->_out('0 '.($this->n + 1)); - $this->_out('0000000000 65535 f '); - $freegen = ($this->n + 2); - for ($i=1; $i <= $this->n; ++$i) { - if (!isset($this->offsets[$i]) AND ($i > 1)) { - $this->_out(sprintf('0000000000 %05d f ', $freegen)); - ++$freegen; - } else { - $this->_out(sprintf('%010d 00000 n ', $this->offsets[$i])); - } - } - // TRAILER - $out = 'trailer'."\n"; - $out .= '<<'; - $out .= ' /Size '.($this->n + 1); - $out .= ' /Root '.$objid_catalog.' 0 R'; - $out .= ' /Info '.$objid_info.' 0 R'; - if ($this->encrypted) { - $out .= ' /Encrypt '.$this->encryptdata['objid'].' 0 R'; - } - $out .= ' /ID [ <'.$this->file_id.'> <'.$this->file_id.'> ]'; - $out .= ' >>'; - $this->_out($out); - $this->_out('startxref'); - $this->_out($o); - $this->_out('%%EOF'); - $this->state = 3; // end-of-doc - } - - /** - * Initialize a new page. - * @param $orientation (string) page orientation. Possible values are (case insensitive):
          • P or PORTRAIT (default)
          • L or LANDSCAPE
          - * @param $format (mixed) The format used for pages. It can be either: one of the string values specified at getPageSizeFromFormat() or an array of parameters specified at setPageFormat(). - * @protected - * @see getPageSizeFromFormat(), setPageFormat() - */ - protected function _beginpage($orientation='', $format='') { - ++$this->page; - $this->pageobjects[$this->page] = array(); - $this->setPageBuffer($this->page, ''); - // initialize array for graphics tranformation positions inside a page buffer - $this->transfmrk[$this->page] = array(); - $this->state = 2; - if (TCPDF_STATIC::empty_string($orientation)) { - if (isset($this->CurOrientation)) { - $orientation = $this->CurOrientation; - } elseif ($this->fwPt > $this->fhPt) { - // landscape - $orientation = 'L'; - } else { - // portrait - $orientation = 'P'; - } - } - if (TCPDF_STATIC::empty_string($format)) { - $this->pagedim[$this->page] = $this->pagedim[($this->page - 1)]; - $this->setPageOrientation($orientation); - } else { - $this->setPageFormat($format, $orientation); - } - if ($this->rtl) { - $this->x = $this->w - $this->rMargin; - } else { - $this->x = $this->lMargin; - } - $this->y = $this->tMargin; - if (isset($this->newpagegroup[$this->page])) { - // start a new group - $this->currpagegroup = $this->newpagegroup[$this->page]; - $this->pagegroups[$this->currpagegroup] = 1; - } elseif (isset($this->currpagegroup) AND ($this->currpagegroup > 0)) { - ++$this->pagegroups[$this->currpagegroup]; - } - } - - /** - * Mark end of page. - * @protected - */ - protected function _endpage() { - $this->setVisibility('all'); - $this->state = 1; - } - - /** - * Begin a new object and return the object number. - * @return int object number - * @protected - */ - protected function _newobj() { - $this->_out($this->_getobj()); - return $this->n; - } - - /** - * Return the starting object string for the selected object ID. - * @param $objid (int) Object ID (leave empty to get a new ID). - * @return string the starting object string - * @protected - * @since 5.8.009 (2010-08-20) - */ - protected function _getobj($objid='') { - if ($objid === '') { - ++$this->n; - $objid = $this->n; - } - $this->offsets[$objid] = $this->bufferlen; - $this->pageobjects[$this->page][] = $objid; - return $objid.' 0 obj'; - } - - /** - * Underline text. - * @param $x (int) X coordinate - * @param $y (int) Y coordinate - * @param $txt (string) text to underline - * @protected - */ - protected function _dounderline($x, $y, $txt) { - $w = $this->GetStringWidth($txt); - return $this->_dounderlinew($x, $y, $w); - } - - /** - * Underline for rectangular text area. - * @param $x (int) X coordinate - * @param $y (int) Y coordinate - * @param $w (int) width to underline - * @protected - * @since 4.8.008 (2009-09-29) - */ - protected function _dounderlinew($x, $y, $w) { - $linew = - $this->CurrentFont['ut'] / 1000 * $this->FontSizePt; - return sprintf('%F %F %F %F re f', $x * $this->k, ((($this->h - $y) * $this->k) + $linew), $w * $this->k, $linew); - } - - /** - * Line through text. - * @param $x (int) X coordinate - * @param $y (int) Y coordinate - * @param $txt (string) text to linethrough - * @protected - */ - protected function _dolinethrough($x, $y, $txt) { - $w = $this->GetStringWidth($txt); - return $this->_dolinethroughw($x, $y, $w); - } - - /** - * Line through for rectangular text area. - * @param $x (int) X coordinate - * @param $y (int) Y coordinate - * @param $w (int) line length (width) - * @protected - * @since 4.9.008 (2009-09-29) - */ - protected function _dolinethroughw($x, $y, $w) { - $linew = - $this->CurrentFont['ut'] / 1000 * $this->FontSizePt; - return sprintf('%F %F %F %F re f', $x * $this->k, ((($this->h - $y) * $this->k) + $linew + ($this->FontSizePt / 3)), $w * $this->k, $linew); - } - - /** - * Overline text. - * @param $x (int) X coordinate - * @param $y (int) Y coordinate - * @param $txt (string) text to overline - * @protected - * @since 4.9.015 (2010-04-19) - */ - protected function _dooverline($x, $y, $txt) { - $w = $this->GetStringWidth($txt); - return $this->_dooverlinew($x, $y, $w); - } - - /** - * Overline for rectangular text area. - * @param $x (int) X coordinate - * @param $y (int) Y coordinate - * @param $w (int) width to overline - * @protected - * @since 4.9.015 (2010-04-19) - */ - protected function _dooverlinew($x, $y, $w) { - $linew = - $this->CurrentFont['ut'] / 1000 * $this->FontSizePt; - return sprintf('%F %F %F %F re f', $x * $this->k, (($this->h - $y + $this->FontAscent) * $this->k) - $linew, $w * $this->k, $linew); - - } - - /** - * Format a data string for meta information - * @param $s (string) data string to escape. - * @param $n (int) object ID - * @return string escaped string. - * @protected - */ - protected function _datastring($s, $n=0) { - if ($n == 0) { - $n = $this->n; - } - $s = $this->_encrypt_data($n, $s); - return '('. TCPDF_STATIC::_escape($s).')'; - } - - /** - * Set the document creation timestamp - * @param $time (mixed) Document creation timestamp in seconds or date-time string. - * @public - * @since 5.9.152 (2012-03-23) - */ - public function setDocCreationTimestamp($time) { - if (is_string($time)) { - $time = TCPDF_STATIC::getTimestamp($time); - } - $this->doc_creation_timestamp = intval($time); - } - - /** - * Set the document modification timestamp - * @param $time (mixed) Document modification timestamp in seconds or date-time string. - * @public - * @since 5.9.152 (2012-03-23) - */ - public function setDocModificationTimestamp($time) { - if (is_string($time)) { - $time = TCPDF_STATIC::getTimestamp($time); - } - $this->doc_modification_timestamp = intval($time); - } - - /** - * Returns document creation timestamp in seconds. - * @return (int) Creation timestamp in seconds. - * @public - * @since 5.9.152 (2012-03-23) - */ - public function getDocCreationTimestamp() { - return $this->doc_creation_timestamp; - } - - /** - * Returns document modification timestamp in seconds. - * @return (int) Modfication timestamp in seconds. - * @public - * @since 5.9.152 (2012-03-23) - */ - public function getDocModificationTimestamp() { - return $this->doc_modification_timestamp; - } - - /** - * Returns a formatted date for meta information - * @param $n (int) Object ID. - * @param $timestamp (int) Timestamp to convert. - * @return string escaped date string. - * @protected - * @since 4.6.028 (2009-08-25) - */ - protected function _datestring($n=0, $timestamp=0) { - if ((empty($timestamp)) OR ($timestamp < 0)) { - $timestamp = $this->doc_creation_timestamp; - } - return $this->_datastring('D:'.TCPDF_STATIC::getFormattedDate($timestamp), $n); - } - - /** - * Format a text string for meta information - * @param $s (string) string to escape. - * @param $n (int) object ID - * @return string escaped string. - * @protected - */ - protected function _textstring($s, $n=0) { - if ($this->isunicode) { - //Convert string to UTF-16BE - $s = TCPDF_FONTS::UTF8ToUTF16BE($s, true, $this->isunicode, $this->CurrentFont); - } - return $this->_datastring($s, $n); - } - - /** - * get raw output stream. - * @param $s (string) string to output. - * @param $n (int) object reference for encryption mode - * @protected - * @author Nicola Asuni - * @since 5.5.000 (2010-06-22) - */ - protected function _getrawstream($s, $n=0) { - if ($n <= 0) { - // default to current object - $n = $this->n; - } - return $this->_encrypt_data($n, $s); - } - - /** - * Output a string to the document. - * @param $s (string) string to output. - * @protected - */ - protected function _out($s) { - if ($this->state == 2) { - if ($this->inxobj) { - // we are inside an XObject template - $this->xobjects[$this->xobjid]['outdata'] .= $s."\n"; - } elseif ((!$this->InFooter) AND isset($this->footerlen[$this->page]) AND ($this->footerlen[$this->page] > 0)) { - // puts data before page footer - $pagebuff = $this->getPageBuffer($this->page); - $page = substr($pagebuff, 0, -$this->footerlen[$this->page]); - $footer = substr($pagebuff, -$this->footerlen[$this->page]); - $this->setPageBuffer($this->page, $page.$s."\n".$footer); - // update footer position - $this->footerpos[$this->page] += strlen($s."\n"); - } else { - // set page data - $this->setPageBuffer($this->page, $s."\n", true); - } - } elseif ($this->state > 0) { - // set general data - $this->setBuffer($s."\n"); - } - } - - /** - * Set header font. - * @param $font (array) Array describing the basic font parameters: (family, style, size). - * @public - * @since 1.1 - */ - public function setHeaderFont($font) { - $this->header_font = $font; - } - - /** - * Get header font. - * @return array() Array describing the basic font parameters: (family, style, size). - * @public - * @since 4.0.012 (2008-07-24) - */ - public function getHeaderFont() { - return $this->header_font; - } - - /** - * Set footer font. - * @param $font (array) Array describing the basic font parameters: (family, style, size). - * @public - * @since 1.1 - */ - public function setFooterFont($font) { - $this->footer_font = $font; - } - - /** - * Get Footer font. - * @return array() Array describing the basic font parameters: (family, style, size). - * @public - * @since 4.0.012 (2008-07-24) - */ - public function getFooterFont() { - return $this->footer_font; - } - - /** - * Set language array. - * @param $language (array) - * @public - * @since 1.1 - */ - public function setLanguageArray($language) { - $this->l = $language; - if (isset($this->l['a_meta_dir'])) { - $this->rtl = $this->l['a_meta_dir']=='rtl' ? true : false; - } else { - $this->rtl = false; - } - } - - /** - * Returns the PDF data. - * @public - */ - public function getPDFData() { - if ($this->state < 3) { - $this->Close(); - } - return $this->buffer; - } - - /** - * Output anchor link. - * @param $url (string) link URL or internal link (i.e.: <a href="#23,4.5">link to page 23 at 4.5 Y position</a>) - * @param $name (string) link name - * @param $fill (boolean) Indicates if the cell background must be painted (true) or transparent (false). - * @param $firstline (boolean) if true prints only the first line and return the remaining string. - * @param $color (array) array of RGB text color - * @param $style (string) font style (U, D, B, I) - * @param $firstblock (boolean) if true the string is the starting of a line. - * @return the number of cells used or the remaining text if $firstline = true; - * @public - */ - public function addHtmlLink($url, $name, $fill=false, $firstline=false, $color='', $style=-1, $firstblock=false) { - if (isset($url[1]) AND ($url[0] == '#')) { - // convert url to internal link - $lnkdata = explode(',', $url); - if (isset($lnkdata[0]) ) { - $page = substr($lnkdata[0], 1); - if (isset($lnkdata[1]) AND (strlen($lnkdata[1]) > 0)) { - $lnky = floatval($lnkdata[1]); - } else { - $lnky = 0; - } - $url = $this->AddLink(); - $this->SetLink($url, $lnky, $page); - } - } - // store current settings - $prevcolor = $this->fgcolor; - $prevstyle = $this->FontStyle; - if (empty($color)) { - $this->SetTextColorArray($this->htmlLinkColorArray); - } else { - $this->SetTextColorArray($color); - } - if ($style == -1) { - $this->SetFont('', $this->FontStyle.$this->htmlLinkFontStyle); - } else { - $this->SetFont('', $this->FontStyle.$style); - } - $ret = $this->Write($this->lasth, $name, $url, $fill, '', false, 0, $firstline, $firstblock, 0); - // restore settings - $this->SetFont('', $prevstyle); - $this->SetTextColorArray($prevcolor); - return $ret; - } - - /** - * Converts pixels to User's Units. - * @param $px (int) pixels - * @return float value in user's unit - * @public - * @see setImageScale(), getImageScale() - */ - public function pixelsToUnits($px) { - return ($px / ($this->imgscale * $this->k)); - } - - /** - * Reverse function for htmlentities. - * Convert entities in UTF-8. - * @param $text_to_convert (string) Text to convert. - * @return string converted text string - * @public - */ - public function unhtmlentities($text_to_convert) { - return @html_entity_decode($text_to_convert, ENT_QUOTES, $this->encoding); - } - - // ENCRYPTION METHODS ---------------------------------- - - /** - * Compute encryption key depending on object number where the encrypted data is stored. - * This is used for all strings and streams without crypt filter specifier. - * @param $n (int) object number - * @return int object key - * @protected - * @author Nicola Asuni - * @since 2.0.000 (2008-01-02) - */ - protected function _objectkey($n) { - $objkey = $this->encryptdata['key'].pack('VXxx', $n); - if ($this->encryptdata['mode'] == 2) { // AES-128 - // AES padding - $objkey .= "\x73\x41\x6C\x54"; // sAlT - } - $objkey = substr(TCPDF_STATIC::_md5_16($objkey), 0, (($this->encryptdata['Length'] / 8) + 5)); - $objkey = substr($objkey, 0, 16); - return $objkey; - } - - /** - * Encrypt the input string. - * @param $n (int) object number - * @param $s (string) data string to encrypt - * @return encrypted string - * @protected - * @author Nicola Asuni - * @since 5.0.005 (2010-05-11) - */ - protected function _encrypt_data($n, $s) { - if (!$this->encrypted) { - return $s; - } - switch ($this->encryptdata['mode']) { - case 0: // RC4-40 - case 1: { // RC4-128 - $s = TCPDF_STATIC::_RC4($this->_objectkey($n), $s, $this->last_enc_key, $this->last_enc_key_c); - break; - } - case 2: { // AES-128 - $s = TCPDF_STATIC::_AES($this->_objectkey($n), $s); - break; - } - case 3: { // AES-256 - $s = TCPDF_STATIC::_AES($this->encryptdata['key'], $s); - break; - } - } - return $s; - } - - /** - * Put encryption on PDF document. - * @protected - * @author Nicola Asuni - * @since 2.0.000 (2008-01-02) - */ - protected function _putencryption() { - if (!$this->encrypted) { - return; - } - $this->encryptdata['objid'] = $this->_newobj(); - $out = '<<'; - if (!isset($this->encryptdata['Filter']) OR empty($this->encryptdata['Filter'])) { - $this->encryptdata['Filter'] = 'Standard'; - } - $out .= ' /Filter /'.$this->encryptdata['Filter']; - if (isset($this->encryptdata['SubFilter']) AND !empty($this->encryptdata['SubFilter'])) { - $out .= ' /SubFilter /'.$this->encryptdata['SubFilter']; - } - if (!isset($this->encryptdata['V']) OR empty($this->encryptdata['V'])) { - $this->encryptdata['V'] = 1; - } - // V is a code specifying the algorithm to be used in encrypting and decrypting the document - $out .= ' /V '.$this->encryptdata['V']; - if (isset($this->encryptdata['Length']) AND !empty($this->encryptdata['Length'])) { - // The length of the encryption key, in bits. The value shall be a multiple of 8, in the range 40 to 256 - $out .= ' /Length '.$this->encryptdata['Length']; - } else { - $out .= ' /Length 40'; - } - if ($this->encryptdata['V'] >= 4) { - if (!isset($this->encryptdata['StmF']) OR empty($this->encryptdata['StmF'])) { - $this->encryptdata['StmF'] = 'Identity'; - } - if (!isset($this->encryptdata['StrF']) OR empty($this->encryptdata['StrF'])) { - // The name of the crypt filter that shall be used when decrypting all strings in the document. - $this->encryptdata['StrF'] = 'Identity'; - } - // A dictionary whose keys shall be crypt filter names and whose values shall be the corresponding crypt filter dictionaries. - if (isset($this->encryptdata['CF']) AND !empty($this->encryptdata['CF'])) { - $out .= ' /CF <<'; - $out .= ' /'.$this->encryptdata['StmF'].' <<'; - $out .= ' /Type /CryptFilter'; - if (isset($this->encryptdata['CF']['CFM']) AND !empty($this->encryptdata['CF']['CFM'])) { - // The method used - $out .= ' /CFM /'.$this->encryptdata['CF']['CFM']; - if ($this->encryptdata['pubkey']) { - $out .= ' /Recipients ['; - foreach ($this->encryptdata['Recipients'] as $rec) { - $out .= ' <'.$rec.'>'; - } - $out .= ' ]'; - if (isset($this->encryptdata['CF']['EncryptMetadata']) AND (!$this->encryptdata['CF']['EncryptMetadata'])) { - $out .= ' /EncryptMetadata false'; - } else { - $out .= ' /EncryptMetadata true'; - } - } - } else { - $out .= ' /CFM /None'; - } - if (isset($this->encryptdata['CF']['AuthEvent']) AND !empty($this->encryptdata['CF']['AuthEvent'])) { - // The event to be used to trigger the authorization that is required to access encryption keys used by this filter. - $out .= ' /AuthEvent /'.$this->encryptdata['CF']['AuthEvent']; - } else { - $out .= ' /AuthEvent /DocOpen'; - } - if (isset($this->encryptdata['CF']['Length']) AND !empty($this->encryptdata['CF']['Length'])) { - // The bit length of the encryption key. - $out .= ' /Length '.$this->encryptdata['CF']['Length']; - } - $out .= ' >> >>'; - } - // The name of the crypt filter that shall be used by default when decrypting streams. - $out .= ' /StmF /'.$this->encryptdata['StmF']; - // The name of the crypt filter that shall be used when decrypting all strings in the document. - $out .= ' /StrF /'.$this->encryptdata['StrF']; - if (isset($this->encryptdata['EFF']) AND !empty($this->encryptdata['EFF'])) { - // The name of the crypt filter that shall be used when encrypting embedded file streams that do not have their own crypt filter specifier. - $out .= ' /EFF /'.$this->encryptdata['']; - } - } - // Additional encryption dictionary entries for the standard security handler - if ($this->encryptdata['pubkey']) { - if (($this->encryptdata['V'] < 4) AND isset($this->encryptdata['Recipients']) AND !empty($this->encryptdata['Recipients'])) { - $out .= ' /Recipients ['; - foreach ($this->encryptdata['Recipients'] as $rec) { - $out .= ' <'.$rec.'>'; - } - $out .= ' ]'; - } - } else { - $out .= ' /R'; - if ($this->encryptdata['V'] == 5) { // AES-256 - $out .= ' 5'; - $out .= ' /OE ('.TCPDF_STATIC::_escape($this->encryptdata['OE']).')'; - $out .= ' /UE ('.TCPDF_STATIC::_escape($this->encryptdata['UE']).')'; - $out .= ' /Perms ('.TCPDF_STATIC::_escape($this->encryptdata['perms']).')'; - } elseif ($this->encryptdata['V'] == 4) { // AES-128 - $out .= ' 4'; - } elseif ($this->encryptdata['V'] < 2) { // RC-40 - $out .= ' 2'; - } else { // RC-128 - $out .= ' 3'; - } - $out .= ' /O ('.TCPDF_STATIC::_escape($this->encryptdata['O']).')'; - $out .= ' /U ('.TCPDF_STATIC::_escape($this->encryptdata['U']).')'; - $out .= ' /P '.$this->encryptdata['P']; - if (isset($this->encryptdata['EncryptMetadata']) AND (!$this->encryptdata['EncryptMetadata'])) { - $out .= ' /EncryptMetadata false'; - } else { - $out .= ' /EncryptMetadata true'; - } - } - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - } - - /** - * Compute U value (used for encryption) - * @return string U value - * @protected - * @since 2.0.000 (2008-01-02) - * @author Nicola Asuni - */ - protected function _Uvalue() { - if ($this->encryptdata['mode'] == 0) { // RC4-40 - return TCPDF_STATIC::_RC4($this->encryptdata['key'], TCPDF_STATIC::$enc_padding, $this->last_enc_key, $this->last_enc_key_c); - } elseif ($this->encryptdata['mode'] < 3) { // RC4-128, AES-128 - $tmp = TCPDF_STATIC::_md5_16(TCPDF_STATIC::$enc_padding.$this->encryptdata['fileid']); - $enc = TCPDF_STATIC::_RC4($this->encryptdata['key'], $tmp, $this->last_enc_key, $this->last_enc_key_c); - $len = strlen($tmp); - for ($i = 1; $i <= 19; ++$i) { - $ek = ''; - for ($j = 0; $j < $len; ++$j) { - $ek .= chr(ord($this->encryptdata['key'][$j]) ^ $i); - } - $enc = TCPDF_STATIC::_RC4($ek, $enc, $this->last_enc_key, $this->last_enc_key_c); - } - $enc .= str_repeat("\x00", 16); - return substr($enc, 0, 32); - } elseif ($this->encryptdata['mode'] == 3) { // AES-256 - $seed = TCPDF_STATIC::_md5_16(TCPDF_STATIC::getRandomSeed()); - // User Validation Salt - $this->encryptdata['UVS'] = substr($seed, 0, 8); - // User Key Salt - $this->encryptdata['UKS'] = substr($seed, 8, 16); - return hash('sha256', $this->encryptdata['user_password'].$this->encryptdata['UVS'], true).$this->encryptdata['UVS'].$this->encryptdata['UKS']; - } - } - - /** - * Compute UE value (used for encryption) - * @return string UE value - * @protected - * @since 5.9.006 (2010-10-19) - * @author Nicola Asuni - */ - protected function _UEvalue() { - $hashkey = hash('sha256', $this->encryptdata['user_password'].$this->encryptdata['UKS'], true); - $iv = str_repeat("\x00", mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC)); - return mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $hashkey, $this->encryptdata['key'], MCRYPT_MODE_CBC, $iv); - } - - /** - * Compute O value (used for encryption) - * @return string O value - * @protected - * @since 2.0.000 (2008-01-02) - * @author Nicola Asuni - */ - protected function _Ovalue() { - if ($this->encryptdata['mode'] < 3) { // RC4-40, RC4-128, AES-128 - $tmp = TCPDF_STATIC::_md5_16($this->encryptdata['owner_password']); - if ($this->encryptdata['mode'] > 0) { - for ($i = 0; $i < 50; ++$i) { - $tmp = TCPDF_STATIC::_md5_16($tmp); - } - } - $owner_key = substr($tmp, 0, ($this->encryptdata['Length'] / 8)); - $enc = TCPDF_STATIC::_RC4($owner_key, $this->encryptdata['user_password'], $this->last_enc_key, $this->last_enc_key_c); - if ($this->encryptdata['mode'] > 0) { - $len = strlen($owner_key); - for ($i = 1; $i <= 19; ++$i) { - $ek = ''; - for ($j = 0; $j < $len; ++$j) { - $ek .= chr(ord($owner_key[$j]) ^ $i); - } - $enc = TCPDF_STATIC::_RC4($ek, $enc, $this->last_enc_key, $this->last_enc_key_c); - } - } - return $enc; - } elseif ($this->encryptdata['mode'] == 3) { // AES-256 - $seed = TCPDF_STATIC::_md5_16(TCPDF_STATIC::getRandomSeed()); - // Owner Validation Salt - $this->encryptdata['OVS'] = substr($seed, 0, 8); - // Owner Key Salt - $this->encryptdata['OKS'] = substr($seed, 8, 16); - return hash('sha256', $this->encryptdata['owner_password'].$this->encryptdata['OVS'].$this->encryptdata['U'], true).$this->encryptdata['OVS'].$this->encryptdata['OKS']; - } - } - - /** - * Compute OE value (used for encryption) - * @return string OE value - * @protected - * @since 5.9.006 (2010-10-19) - * @author Nicola Asuni - */ - protected function _OEvalue() { - $hashkey = hash('sha256', $this->encryptdata['owner_password'].$this->encryptdata['OKS'].$this->encryptdata['U'], true); - $iv = str_repeat("\x00", mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC)); - return mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $hashkey, $this->encryptdata['key'], MCRYPT_MODE_CBC, $iv); - } - - /** - * Convert password for AES-256 encryption mode - * @param $password (string) password - * @return string password - * @protected - * @since 5.9.006 (2010-10-19) - * @author Nicola Asuni - */ - protected function _fixAES256Password($password) { - $psw = ''; // password to be returned - $psw_array = TCPDF_FONTS::utf8Bidi(TCPDF_FONTS::UTF8StringToArray($password, $this->isunicode, $this->CurrentFont), $password, $this->rtl, $this->isunicode, $this->CurrentFont); - foreach ($psw_array as $c) { - $psw .= TCPDF_FONTS::unichr($c, $this->isunicode); - } - return substr($psw, 0, 127); - } - - /** - * Compute encryption key - * @protected - * @since 2.0.000 (2008-01-02) - * @author Nicola Asuni - */ - protected function _generateencryptionkey() { - $keybytelen = ($this->encryptdata['Length'] / 8); - if (!$this->encryptdata['pubkey']) { // standard mode - if ($this->encryptdata['mode'] == 3) { // AES-256 - // generate 256 bit random key - $this->encryptdata['key'] = substr(hash('sha256', TCPDF_STATIC::getRandomSeed(), true), 0, $keybytelen); - // truncate passwords - $this->encryptdata['user_password'] = $this->_fixAES256Password($this->encryptdata['user_password']); - $this->encryptdata['owner_password'] = $this->_fixAES256Password($this->encryptdata['owner_password']); - // Compute U value - $this->encryptdata['U'] = $this->_Uvalue(); - // Compute UE value - $this->encryptdata['UE'] = $this->_UEvalue(); - // Compute O value - $this->encryptdata['O'] = $this->_Ovalue(); - // Compute OE value - $this->encryptdata['OE'] = $this->_OEvalue(); - // Compute P value - $this->encryptdata['P'] = $this->encryptdata['protection']; - // Computing the encryption dictionary's Perms (permissions) value - $perms = TCPDF_STATIC::getEncPermissionsString($this->encryptdata['protection']); // bytes 0-3 - $perms .= chr(255).chr(255).chr(255).chr(255); // bytes 4-7 - if (isset($this->encryptdata['CF']['EncryptMetadata']) AND (!$this->encryptdata['CF']['EncryptMetadata'])) { // byte 8 - $perms .= 'F'; - } else { - $perms .= 'T'; - } - $perms .= 'adb'; // bytes 9-11 - $perms .= 'nick'; // bytes 12-15 - $iv = str_repeat("\x00", mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB)); - $this->encryptdata['perms'] = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $this->encryptdata['key'], $perms, MCRYPT_MODE_ECB, $iv); - } else { // RC4-40, RC4-128, AES-128 - // Pad passwords - $this->encryptdata['user_password'] = substr($this->encryptdata['user_password'].TCPDF_STATIC::$enc_padding, 0, 32); - $this->encryptdata['owner_password'] = substr($this->encryptdata['owner_password'].TCPDF_STATIC::$enc_padding, 0, 32); - // Compute O value - $this->encryptdata['O'] = $this->_Ovalue(); - // get default permissions (reverse byte order) - $permissions = TCPDF_STATIC::getEncPermissionsString($this->encryptdata['protection']); - // Compute encryption key - $tmp = TCPDF_STATIC::_md5_16($this->encryptdata['user_password'].$this->encryptdata['O'].$permissions.$this->encryptdata['fileid']); - if ($this->encryptdata['mode'] > 0) { - for ($i = 0; $i < 50; ++$i) { - $tmp = TCPDF_STATIC::_md5_16(substr($tmp, 0, $keybytelen)); - } - } - $this->encryptdata['key'] = substr($tmp, 0, $keybytelen); - // Compute U value - $this->encryptdata['U'] = $this->_Uvalue(); - // Compute P value - $this->encryptdata['P'] = $this->encryptdata['protection']; - } - } else { // Public-Key mode - // random 20-byte seed - $seed = sha1(TCPDF_STATIC::getRandomSeed(), true); - $recipient_bytes = ''; - foreach ($this->encryptdata['pubkeys'] as $pubkey) { - // for each public certificate - if (isset($pubkey['p'])) { - $pkprotection = TCPDF_STATIC::getUserPermissionCode($pubkey['p'], $this->encryptdata['mode']); - } else { - $pkprotection = $this->encryptdata['protection']; - } - // get default permissions (reverse byte order) - $pkpermissions = TCPDF_STATIC::getEncPermissionsString($pkprotection); - // envelope data - $envelope = $seed.$pkpermissions; - // write the envelope data to a temporary file - $tempkeyfile = TCPDF_STATIC::getObjFilename('key', $this->file_id); - $f = TCPDF_STATIC::fopenLocal($tempkeyfile, 'wb'); - if (!$f) { - $this->Error('Unable to create temporary key file: '.$tempkeyfile); - } - $envelope_length = strlen($envelope); - fwrite($f, $envelope, $envelope_length); - fclose($f); - $tempencfile = TCPDF_STATIC::getObjFilename('enc', $this->file_id); - if (!openssl_pkcs7_encrypt($tempkeyfile, $tempencfile, $pubkey['c'], array(), PKCS7_BINARY | PKCS7_DETACHED)) { - $this->Error('Unable to encrypt the file: '.$tempkeyfile); - } - // read encryption signature - $signature = file_get_contents($tempencfile, false, null, $envelope_length); - // extract signature - $signature = substr($signature, strpos($signature, 'Content-Disposition')); - $tmparr = explode("\n\n", $signature); - $signature = trim($tmparr[1]); - unset($tmparr); - // decode signature - $signature = base64_decode($signature); - // convert signature to hex - $hexsignature = current(unpack('H*', $signature)); - // store signature on recipients array - $this->encryptdata['Recipients'][] = $hexsignature; - // The bytes of each item in the Recipients array of PKCS#7 objects in the order in which they appear in the array - $recipient_bytes .= $signature; - } - // calculate encryption key - if ($this->encryptdata['mode'] == 3) { // AES-256 - $this->encryptdata['key'] = substr(hash('sha256', $seed.$recipient_bytes, true), 0, $keybytelen); - } else { // RC4-40, RC4-128, AES-128 - $this->encryptdata['key'] = substr(sha1($seed.$recipient_bytes, true), 0, $keybytelen); - } - } - } - - /** - * Set document protection - * Remark: the protection against modification is for people who have the full Acrobat product. - * If you don't set any password, the document will open as usual. If you set a user password, the PDF viewer will ask for it before displaying the document. The master password, if different from the user one, can be used to get full access. - * Note: protecting a document requires to encrypt it, which increases the processing time a lot. This can cause a PHP time-out in some cases, especially if the document contains images or fonts. - * @param $permissions (Array) the set of permissions (specify the ones you want to block):
          • print : Print the document;
          • modify : Modify the contents of the document by operations other than those controlled by 'fill-forms', 'extract' and 'assemble';
          • copy : Copy or otherwise extract text and graphics from the document;
          • annot-forms : Add or modify text annotations, fill in interactive form fields, and, if 'modify' is also set, create or modify interactive form fields (including signature fields);
          • fill-forms : Fill in existing interactive form fields (including signature fields), even if 'annot-forms' is not specified;
          • extract : Extract text and graphics (in support of accessibility to users with disabilities or for other purposes);
          • assemble : Assemble the document (insert, rotate, or delete pages and create bookmarks or thumbnail images), even if 'modify' is not set;
          • print-high : Print the document to a representation from which a faithful digital copy of the PDF content could be generated. When this is not set, printing is limited to a low-level representation of the appearance, possibly of degraded quality.
          • owner : (inverted logic - only for public-key) when set permits change of encryption and enables all other permissions.
          - * @param $user_pass (String) user password. Empty by default. - * @param $owner_pass (String) owner password. If not specified, a random value is used. - * @param $mode (int) encryption strength: 0 = RC4 40 bit; 1 = RC4 128 bit; 2 = AES 128 bit; 3 = AES 256 bit. - * @param $pubkeys (String) array of recipients containing public-key certificates ('c') and permissions ('p'). For example: array(array('c' => 'file://../examples/data/cert/tcpdf.crt', 'p' => array('print'))) - * @public - * @since 2.0.000 (2008-01-02) - * @author Nicola Asuni - */ - public function SetProtection($permissions=array('print', 'modify', 'copy', 'annot-forms', 'fill-forms', 'extract', 'assemble', 'print-high'), $user_pass='', $owner_pass=null, $mode=0, $pubkeys=null) { - if ($this->pdfa_mode) { - // encryption is not allowed in PDF/A mode - return; - } - $this->encryptdata['protection'] = TCPDF_STATIC::getUserPermissionCode($permissions, $mode); - if (($pubkeys !== null) AND (is_array($pubkeys))) { - // public-key mode - $this->encryptdata['pubkeys'] = $pubkeys; - if ($mode == 0) { - // public-Key Security requires at least 128 bit - $mode = 1; - } - if (!function_exists('openssl_pkcs7_encrypt')) { - $this->Error('Public-Key Security requires openssl library.'); - } - // Set Public-Key filter (available are: Entrust.PPKEF, Adobe.PPKLite, Adobe.PubSec) - $this->encryptdata['pubkey'] = true; - $this->encryptdata['Filter'] = 'Adobe.PubSec'; - $this->encryptdata['StmF'] = 'DefaultCryptFilter'; - $this->encryptdata['StrF'] = 'DefaultCryptFilter'; - } else { - // standard mode (password mode) - $this->encryptdata['pubkey'] = false; - $this->encryptdata['Filter'] = 'Standard'; - $this->encryptdata['StmF'] = 'StdCF'; - $this->encryptdata['StrF'] = 'StdCF'; - } - if ($mode > 1) { // AES - if (!extension_loaded('mcrypt')) { - $this->Error('AES encryption requires mcrypt library (http://www.php.net/manual/en/mcrypt.requirements.php).'); - } - if (mcrypt_get_cipher_name(MCRYPT_RIJNDAEL_128) === false) { - $this->Error('AES encryption requires MCRYPT_RIJNDAEL_128 cypher.'); - } - if (($mode == 3) AND !function_exists('hash')) { - // the Hash extension requires no external libraries and is enabled by default as of PHP 5.1.2. - $this->Error('AES 256 encryption requires HASH Message Digest Framework (http://www.php.net/manual/en/book.hash.php).'); - } - } - if ($owner_pass === null) { - $owner_pass = md5(TCPDF_STATIC::getRandomSeed()); - } - $this->encryptdata['user_password'] = $user_pass; - $this->encryptdata['owner_password'] = $owner_pass; - $this->encryptdata['mode'] = $mode; - switch ($mode) { - case 0: { // RC4 40 bit - $this->encryptdata['V'] = 1; - $this->encryptdata['Length'] = 40; - $this->encryptdata['CF']['CFM'] = 'V2'; - break; - } - case 1: { // RC4 128 bit - $this->encryptdata['V'] = 2; - $this->encryptdata['Length'] = 128; - $this->encryptdata['CF']['CFM'] = 'V2'; - if ($this->encryptdata['pubkey']) { - $this->encryptdata['SubFilter'] = 'adbe.pkcs7.s4'; - $this->encryptdata['Recipients'] = array(); - } - break; - } - case 2: { // AES 128 bit - $this->encryptdata['V'] = 4; - $this->encryptdata['Length'] = 128; - $this->encryptdata['CF']['CFM'] = 'AESV2'; - $this->encryptdata['CF']['Length'] = 128; - if ($this->encryptdata['pubkey']) { - $this->encryptdata['SubFilter'] = 'adbe.pkcs7.s5'; - $this->encryptdata['Recipients'] = array(); - } - break; - } - case 3: { // AES 256 bit - $this->encryptdata['V'] = 5; - $this->encryptdata['Length'] = 256; - $this->encryptdata['CF']['CFM'] = 'AESV3'; - $this->encryptdata['CF']['Length'] = 256; - if ($this->encryptdata['pubkey']) { - $this->encryptdata['SubFilter'] = 'adbe.pkcs7.s5'; - $this->encryptdata['Recipients'] = array(); - } - break; - } - } - $this->encrypted = true; - $this->encryptdata['fileid'] = TCPDF_STATIC::convertHexStringToString($this->file_id); - $this->_generateencryptionkey(); - } - - // END OF ENCRYPTION FUNCTIONS ------------------------- - - // START TRANSFORMATIONS SECTION ----------------------- - - /** - * Starts a 2D tranformation saving current graphic state. - * This function must be called before scaling, mirroring, translation, rotation and skewing. - * Use StartTransform() before, and StopTransform() after the transformations to restore the normal behavior. - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function StartTransform() { - if ($this->state != 2) { - return; - } - $this->_outSaveGraphicsState(); - if ($this->inxobj) { - // we are inside an XObject template - $this->xobjects[$this->xobjid]['transfmrk'][] = strlen($this->xobjects[$this->xobjid]['outdata']); - } else { - $this->transfmrk[$this->page][] = $this->pagelen[$this->page]; - } - ++$this->transfmatrix_key; - $this->transfmatrix[$this->transfmatrix_key] = array(); - } - - /** - * Stops a 2D tranformation restoring previous graphic state. - * This function must be called after scaling, mirroring, translation, rotation and skewing. - * Use StartTransform() before, and StopTransform() after the transformations to restore the normal behavior. - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function StopTransform() { - if ($this->state != 2) { - return; - } - $this->_outRestoreGraphicsState(); - if (isset($this->transfmatrix[$this->transfmatrix_key])) { - array_pop($this->transfmatrix[$this->transfmatrix_key]); - --$this->transfmatrix_key; - } - if ($this->inxobj) { - // we are inside an XObject template - array_pop($this->xobjects[$this->xobjid]['transfmrk']); - } else { - array_pop($this->transfmrk[$this->page]); - } - } - /** - * Horizontal Scaling. - * @param $s_x (float) scaling factor for width as percent. 0 is not allowed. - * @param $x (int) abscissa of the scaling center. Default is current x position - * @param $y (int) ordinate of the scaling center. Default is current y position - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function ScaleX($s_x, $x='', $y='') { - $this->Scale($s_x, 100, $x, $y); - } - - /** - * Vertical Scaling. - * @param $s_y (float) scaling factor for height as percent. 0 is not allowed. - * @param $x (int) abscissa of the scaling center. Default is current x position - * @param $y (int) ordinate of the scaling center. Default is current y position - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function ScaleY($s_y, $x='', $y='') { - $this->Scale(100, $s_y, $x, $y); - } - - /** - * Vertical and horizontal proportional Scaling. - * @param $s (float) scaling factor for width and height as percent. 0 is not allowed. - * @param $x (int) abscissa of the scaling center. Default is current x position - * @param $y (int) ordinate of the scaling center. Default is current y position - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function ScaleXY($s, $x='', $y='') { - $this->Scale($s, $s, $x, $y); - } - - /** - * Vertical and horizontal non-proportional Scaling. - * @param $s_x (float) scaling factor for width as percent. 0 is not allowed. - * @param $s_y (float) scaling factor for height as percent. 0 is not allowed. - * @param $x (int) abscissa of the scaling center. Default is current x position - * @param $y (int) ordinate of the scaling center. Default is current y position - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function Scale($s_x, $s_y, $x='', $y='') { - if ($x === '') { - $x = $this->x; - } - if ($y === '') { - $y = $this->y; - } - if (($s_x == 0) OR ($s_y == 0)) { - $this->Error('Please do not use values equal to zero for scaling'); - } - $y = ($this->h - $y) * $this->k; - $x *= $this->k; - //calculate elements of transformation matrix - $s_x /= 100; - $s_y /= 100; - $tm = array(); - $tm[0] = $s_x; - $tm[1] = 0; - $tm[2] = 0; - $tm[3] = $s_y; - $tm[4] = $x * (1 - $s_x); - $tm[5] = $y * (1 - $s_y); - //scale the coordinate system - $this->Transform($tm); - } - - /** - * Horizontal Mirroring. - * @param $x (int) abscissa of the point. Default is current x position - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function MirrorH($x='') { - $this->Scale(-100, 100, $x); - } - - /** - * Verical Mirroring. - * @param $y (int) ordinate of the point. Default is current y position - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function MirrorV($y='') { - $this->Scale(100, -100, '', $y); - } - - /** - * Point reflection mirroring. - * @param $x (int) abscissa of the point. Default is current x position - * @param $y (int) ordinate of the point. Default is current y position - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function MirrorP($x='',$y='') { - $this->Scale(-100, -100, $x, $y); - } - - /** - * Reflection against a straight line through point (x, y) with the gradient angle (angle). - * @param $angle (float) gradient angle of the straight line. Default is 0 (horizontal line). - * @param $x (int) abscissa of the point. Default is current x position - * @param $y (int) ordinate of the point. Default is current y position - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function MirrorL($angle=0, $x='',$y='') { - $this->Scale(-100, 100, $x, $y); - $this->Rotate(-2*($angle-90), $x, $y); - } - - /** - * Translate graphic object horizontally. - * @param $t_x (int) movement to the right (or left for RTL) - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function TranslateX($t_x) { - $this->Translate($t_x, 0); - } - - /** - * Translate graphic object vertically. - * @param $t_y (int) movement to the bottom - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function TranslateY($t_y) { - $this->Translate(0, $t_y); - } - - /** - * Translate graphic object horizontally and vertically. - * @param $t_x (int) movement to the right - * @param $t_y (int) movement to the bottom - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function Translate($t_x, $t_y) { - //calculate elements of transformation matrix - $tm = array(); - $tm[0] = 1; - $tm[1] = 0; - $tm[2] = 0; - $tm[3] = 1; - $tm[4] = $t_x * $this->k; - $tm[5] = -$t_y * $this->k; - //translate the coordinate system - $this->Transform($tm); - } - - /** - * Rotate object. - * @param $angle (float) angle in degrees for counter-clockwise rotation - * @param $x (int) abscissa of the rotation center. Default is current x position - * @param $y (int) ordinate of the rotation center. Default is current y position - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function Rotate($angle, $x='', $y='') { - if ($x === '') { - $x = $this->x; - } - if ($y === '') { - $y = $this->y; - } - $y = ($this->h - $y) * $this->k; - $x *= $this->k; - //calculate elements of transformation matrix - $tm = array(); - $tm[0] = cos(deg2rad($angle)); - $tm[1] = sin(deg2rad($angle)); - $tm[2] = -$tm[1]; - $tm[3] = $tm[0]; - $tm[4] = $x + ($tm[1] * $y) - ($tm[0] * $x); - $tm[5] = $y - ($tm[0] * $y) - ($tm[1] * $x); - //rotate the coordinate system around ($x,$y) - $this->Transform($tm); - } - - /** - * Skew horizontally. - * @param $angle_x (float) angle in degrees between -90 (skew to the left) and 90 (skew to the right) - * @param $x (int) abscissa of the skewing center. default is current x position - * @param $y (int) ordinate of the skewing center. default is current y position - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function SkewX($angle_x, $x='', $y='') { - $this->Skew($angle_x, 0, $x, $y); - } - - /** - * Skew vertically. - * @param $angle_y (float) angle in degrees between -90 (skew to the bottom) and 90 (skew to the top) - * @param $x (int) abscissa of the skewing center. default is current x position - * @param $y (int) ordinate of the skewing center. default is current y position - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function SkewY($angle_y, $x='', $y='') { - $this->Skew(0, $angle_y, $x, $y); - } - - /** - * Skew. - * @param $angle_x (float) angle in degrees between -90 (skew to the left) and 90 (skew to the right) - * @param $angle_y (float) angle in degrees between -90 (skew to the bottom) and 90 (skew to the top) - * @param $x (int) abscissa of the skewing center. default is current x position - * @param $y (int) ordinate of the skewing center. default is current y position - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function Skew($angle_x, $angle_y, $x='', $y='') { - if ($x === '') { - $x = $this->x; - } - if ($y === '') { - $y = $this->y; - } - if (($angle_x <= -90) OR ($angle_x >= 90) OR ($angle_y <= -90) OR ($angle_y >= 90)) { - $this->Error('Please use values between -90 and +90 degrees for Skewing.'); - } - $x *= $this->k; - $y = ($this->h - $y) * $this->k; - //calculate elements of transformation matrix - $tm = array(); - $tm[0] = 1; - $tm[1] = tan(deg2rad($angle_y)); - $tm[2] = tan(deg2rad($angle_x)); - $tm[3] = 1; - $tm[4] = -$tm[2] * $y; - $tm[5] = -$tm[1] * $x; - //skew the coordinate system - $this->Transform($tm); - } - - /** - * Apply graphic transformations. - * @param $tm (array) transformation matrix - * @protected - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - protected function Transform($tm) { - if ($this->state != 2) { - return; - } - $this->_out(sprintf('%F %F %F %F %F %F cm', $tm[0], $tm[1], $tm[2], $tm[3], $tm[4], $tm[5])); - // add tranformation matrix - $this->transfmatrix[$this->transfmatrix_key][] = array('a' => $tm[0], 'b' => $tm[1], 'c' => $tm[2], 'd' => $tm[3], 'e' => $tm[4], 'f' => $tm[5]); - // update transformation mark - if ($this->inxobj) { - // we are inside an XObject template - if (end($this->xobjects[$this->xobjid]['transfmrk']) !== false) { - $key = key($this->xobjects[$this->xobjid]['transfmrk']); - $this->xobjects[$this->xobjid]['transfmrk'][$key] = strlen($this->xobjects[$this->xobjid]['outdata']); - } - } elseif (end($this->transfmrk[$this->page]) !== false) { - $key = key($this->transfmrk[$this->page]); - $this->transfmrk[$this->page][$key] = $this->pagelen[$this->page]; - } - } - - // END TRANSFORMATIONS SECTION ------------------------- - - // START GRAPHIC FUNCTIONS SECTION --------------------- - // The following section is based on the code provided by David Hernandez Sanz - - /** - * Defines the line width. By default, the value equals 0.2 mm. The method can be called before the first page is created and the value is retained from page to page. - * @param $width (float) The width. - * @public - * @since 1.0 - * @see Line(), Rect(), Cell(), MultiCell() - */ - public function SetLineWidth($width) { - //Set line width - $this->LineWidth = $width; - $this->linestyleWidth = sprintf('%F w', ($width * $this->k)); - if ($this->state == 2) { - $this->_out($this->linestyleWidth); - } - } - - /** - * Returns the current the line width. - * @return int Line width - * @public - * @since 2.1.000 (2008-01-07) - * @see Line(), SetLineWidth() - */ - public function GetLineWidth() { - return $this->LineWidth; - } - - /** - * Set line style. - * @param $style (array) Line style. Array with keys among the following: - *
            - *
          • width (float): Width of the line in user units.
          • - *
          • cap (string): Type of cap to put on the line. Possible values are: - * butt, round, square. The difference between "square" and "butt" is that - * "square" projects a flat end past the end of the line.
          • - *
          • join (string): Type of join. Possible values are: miter, round, - * bevel.
          • - *
          • dash (mixed): Dash pattern. Is 0 (without dash) or string with - * series of length values, which are the lengths of the on and off dashes. - * For example: "2" represents 2 on, 2 off, 2 on, 2 off, ...; "2,1" is 2 on, - * 1 off, 2 on, 1 off, ...
          • - *
          • phase (integer): Modifier on the dash pattern which is used to shift - * the point at which the pattern starts.
          • - *
          • color (array): Draw color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K) or array(C,M,Y,K,SpotColorName).
          • - *
          - * @param $ret (boolean) if true do not send the command. - * @return string the PDF command - * @public - * @since 2.1.000 (2008-01-08) - */ - public function SetLineStyle($style, $ret=false) { - $s = ''; // string to be returned - if (!is_array($style)) { - return; - } - if (isset($style['width'])) { - $this->LineWidth = $style['width']; - $this->linestyleWidth = sprintf('%F w', ($style['width'] * $this->k)); - $s .= $this->linestyleWidth.' '; - } - if (isset($style['cap'])) { - $ca = array('butt' => 0, 'round'=> 1, 'square' => 2); - if (isset($ca[$style['cap']])) { - $this->linestyleCap = $ca[$style['cap']].' J'; - $s .= $this->linestyleCap.' '; - } - } - if (isset($style['join'])) { - $ja = array('miter' => 0, 'round' => 1, 'bevel' => 2); - if (isset($ja[$style['join']])) { - $this->linestyleJoin = $ja[$style['join']].' j'; - $s .= $this->linestyleJoin.' '; - } - } - if (isset($style['dash'])) { - $dash_string = ''; - if ($style['dash']) { - if (preg_match('/^.+,/', $style['dash']) > 0) { - $tab = explode(',', $style['dash']); - } else { - $tab = array($style['dash']); - } - $dash_string = ''; - foreach ($tab as $i => $v) { - if ($i) { - $dash_string .= ' '; - } - $dash_string .= sprintf('%F', $v); - } - } - if (!isset($style['phase']) OR !$style['dash']) { - $style['phase'] = 0; - } - $this->linestyleDash = sprintf('[%s] %F d', $dash_string, $style['phase']); - $s .= $this->linestyleDash.' '; - } - if (isset($style['color'])) { - $s .= $this->SetDrawColorArray($style['color'], true).' '; - } - if (!$ret AND ($this->state == 2)) { - $this->_out($s); - } - return $s; - } - - /** - * Begin a new subpath by moving the current point to coordinates (x, y), omitting any connecting line segment. - * @param $x (float) Abscissa of point. - * @param $y (float) Ordinate of point. - * @protected - * @since 2.1.000 (2008-01-08) - */ - protected function _outPoint($x, $y) { - if ($this->state == 2) { - $this->_out(sprintf('%F %F m', ($x * $this->k), (($this->h - $y) * $this->k))); - } - } - - /** - * Append a straight line segment from the current point to the point (x, y). - * The new current point shall be (x, y). - * @param $x (float) Abscissa of end point. - * @param $y (float) Ordinate of end point. - * @protected - * @since 2.1.000 (2008-01-08) - */ - protected function _outLine($x, $y) { - if ($this->state == 2) { - $this->_out(sprintf('%F %F l', ($x * $this->k), (($this->h - $y) * $this->k))); - } - } - - /** - * Append a rectangle to the current path as a complete subpath, with lower-left corner (x, y) and dimensions widthand height in user space. - * @param $x (float) Abscissa of upper-left corner. - * @param $y (float) Ordinate of upper-left corner. - * @param $w (float) Width. - * @param $h (float) Height. - * @param $op (string) options - * @protected - * @since 2.1.000 (2008-01-08) - */ - protected function _outRect($x, $y, $w, $h, $op) { - if ($this->state == 2) { - $this->_out(sprintf('%F %F %F %F re %s', ($x * $this->k), (($this->h - $y) * $this->k), ($w * $this->k), (-$h * $this->k), $op)); - } - } - - /** - * Append a cubic Bezier curve to the current path. The curve shall extend from the current point to the point (x3, y3), using (x1, y1) and (x2, y2) as the Bezier control points. - * The new current point shall be (x3, y3). - * @param $x1 (float) Abscissa of control point 1. - * @param $y1 (float) Ordinate of control point 1. - * @param $x2 (float) Abscissa of control point 2. - * @param $y2 (float) Ordinate of control point 2. - * @param $x3 (float) Abscissa of end point. - * @param $y3 (float) Ordinate of end point. - * @protected - * @since 2.1.000 (2008-01-08) - */ - protected function _outCurve($x1, $y1, $x2, $y2, $x3, $y3) { - if ($this->state == 2) { - $this->_out(sprintf('%F %F %F %F %F %F c', ($x1 * $this->k), (($this->h - $y1) * $this->k), ($x2 * $this->k), (($this->h - $y2) * $this->k), ($x3 * $this->k), (($this->h - $y3) * $this->k))); - } - } - - /** - * Append a cubic Bezier curve to the current path. The curve shall extend from the current point to the point (x3, y3), using the current point and (x2, y2) as the Bezier control points. - * The new current point shall be (x3, y3). - * @param $x2 (float) Abscissa of control point 2. - * @param $y2 (float) Ordinate of control point 2. - * @param $x3 (float) Abscissa of end point. - * @param $y3 (float) Ordinate of end point. - * @protected - * @since 4.9.019 (2010-04-26) - */ - protected function _outCurveV($x2, $y2, $x3, $y3) { - if ($this->state == 2) { - $this->_out(sprintf('%F %F %F %F v', ($x2 * $this->k), (($this->h - $y2) * $this->k), ($x3 * $this->k), (($this->h - $y3) * $this->k))); - } - } - - /** - * Append a cubic Bezier curve to the current path. The curve shall extend from the current point to the point (x3, y3), using (x1, y1) and (x3, y3) as the Bezier control points. - * The new current point shall be (x3, y3). - * @param $x1 (float) Abscissa of control point 1. - * @param $y1 (float) Ordinate of control point 1. - * @param $x3 (float) Abscissa of end point. - * @param $y3 (float) Ordinate of end point. - * @protected - * @since 2.1.000 (2008-01-08) - */ - protected function _outCurveY($x1, $y1, $x3, $y3) { - if ($this->state == 2) { - $this->_out(sprintf('%F %F %F %F y', ($x1 * $this->k), (($this->h - $y1) * $this->k), ($x3 * $this->k), (($this->h - $y3) * $this->k))); - } - } - - /** - * Draws a line between two points. - * @param $x1 (float) Abscissa of first point. - * @param $y1 (float) Ordinate of first point. - * @param $x2 (float) Abscissa of second point. - * @param $y2 (float) Ordinate of second point. - * @param $style (array) Line style. Array like for SetLineStyle(). Default value: default line style (empty array). - * @public - * @since 1.0 - * @see SetLineWidth(), SetDrawColor(), SetLineStyle() - */ - public function Line($x1, $y1, $x2, $y2, $style=array()) { - if ($this->state != 2) { - return; - } - if (is_array($style)) { - $this->SetLineStyle($style); - } - $this->_outPoint($x1, $y1); - $this->_outLine($x2, $y2); - $this->_out('S'); - } - - /** - * Draws a rectangle. - * @param $x (float) Abscissa of upper-left corner. - * @param $y (float) Ordinate of upper-left corner. - * @param $w (float) Width. - * @param $h (float) Height. - * @param $style (string) Style of rendering. See the getPathPaintOperator() function for more information. - * @param $border_style (array) Border style of rectangle. Array with keys among the following: - *
            - *
          • all: Line style of all borders. Array like for SetLineStyle().
          • - *
          • L, T, R, B or combinations: Line style of left, top, right or bottom border. Array like for SetLineStyle().
          • - *
          - * If a key is not present or is null, the correspondent border is not drawn. Default value: default line style (empty array). - * @param $fill_color (array) Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K) or array(C,M,Y,K,SpotColorName). Default value: default color (empty array). - * @public - * @since 1.0 - * @see SetLineStyle() - */ - public function Rect($x, $y, $w, $h, $style='', $border_style=array(), $fill_color=array()) { - if ($this->state != 2) { - return; - } - if (empty($style)) { - $style = 'S'; - } - if (!(strpos($style, 'F') === false) AND !empty($fill_color)) { - // set background color - $this->SetFillColorArray($fill_color); - } - if (!empty($border_style)) { - if (isset($border_style['all']) AND !empty($border_style['all'])) { - //set global style for border - $this->SetLineStyle($border_style['all']); - $border_style = array(); - } else { - // remove stroke operator from style - $opnostroke = array('S' => '', 'D' => '', 's' => '', 'd' => '', 'B' => 'F', 'FD' => 'F', 'DF' => 'F', 'B*' => 'F*', 'F*D' => 'F*', 'DF*' => 'F*', 'b' => 'f', 'fd' => 'f', 'df' => 'f', 'b*' => 'f*', 'f*d' => 'f*', 'df*' => 'f*' ); - if (isset($opnostroke[$style])) { - $style = $opnostroke[$style]; - } - } - } - if (!empty($style)) { - $op = TCPDF_STATIC::getPathPaintOperator($style); - $this->_outRect($x, $y, $w, $h, $op); - } - if (!empty($border_style)) { - $border_style2 = array(); - foreach ($border_style as $line => $value) { - $length = strlen($line); - for ($i = 0; $i < $length; ++$i) { - $border_style2[$line[$i]] = $value; - } - } - $border_style = $border_style2; - if (isset($border_style['L']) AND $border_style['L']) { - $this->Line($x, $y, $x, $y + $h, $border_style['L']); - } - if (isset($border_style['T']) AND $border_style['T']) { - $this->Line($x, $y, $x + $w, $y, $border_style['T']); - } - if (isset($border_style['R']) AND $border_style['R']) { - $this->Line($x + $w, $y, $x + $w, $y + $h, $border_style['R']); - } - if (isset($border_style['B']) AND $border_style['B']) { - $this->Line($x, $y + $h, $x + $w, $y + $h, $border_style['B']); - } - } - } - - /** - * Draws a Bezier curve. - * The Bezier curve is a tangent to the line between the control points at - * either end of the curve. - * @param $x0 (float) Abscissa of start point. - * @param $y0 (float) Ordinate of start point. - * @param $x1 (float) Abscissa of control point 1. - * @param $y1 (float) Ordinate of control point 1. - * @param $x2 (float) Abscissa of control point 2. - * @param $y2 (float) Ordinate of control point 2. - * @param $x3 (float) Abscissa of end point. - * @param $y3 (float) Ordinate of end point. - * @param $style (string) Style of rendering. See the getPathPaintOperator() function for more information. - * @param $line_style (array) Line style of curve. Array like for SetLineStyle(). Default value: default line style (empty array). - * @param $fill_color (array) Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K) or array(C,M,Y,K,SpotColorName). Default value: default color (empty array). - * @public - * @see SetLineStyle() - * @since 2.1.000 (2008-01-08) - */ - public function Curve($x0, $y0, $x1, $y1, $x2, $y2, $x3, $y3, $style='', $line_style=array(), $fill_color=array()) { - if ($this->state != 2) { - return; - } - if (!(false === strpos($style, 'F')) AND isset($fill_color)) { - $this->SetFillColorArray($fill_color); - } - $op = TCPDF_STATIC::getPathPaintOperator($style); - if ($line_style) { - $this->SetLineStyle($line_style); - } - $this->_outPoint($x0, $y0); - $this->_outCurve($x1, $y1, $x2, $y2, $x3, $y3); - $this->_out($op); - } - - /** - * Draws a poly-Bezier curve. - * Each Bezier curve segment is a tangent to the line between the control points at - * either end of the curve. - * @param $x0 (float) Abscissa of start point. - * @param $y0 (float) Ordinate of start point. - * @param $segments (float) An array of bezier descriptions. Format: array(x1, y1, x2, y2, x3, y3). - * @param $style (string) Style of rendering. See the getPathPaintOperator() function for more information. - * @param $line_style (array) Line style of curve. Array like for SetLineStyle(). Default value: default line style (empty array). - * @param $fill_color (array) Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K) or array(C,M,Y,K,SpotColorName). Default value: default color (empty array). - * @public - * @see SetLineStyle() - * @since 3.0008 (2008-05-12) - */ - public function Polycurve($x0, $y0, $segments, $style='', $line_style=array(), $fill_color=array()) { - if ($this->state != 2) { - return; - } - if (!(false === strpos($style, 'F')) AND isset($fill_color)) { - $this->SetFillColorArray($fill_color); - } - $op = TCPDF_STATIC::getPathPaintOperator($style); - if ($op == 'f') { - $line_style = array(); - } - if ($line_style) { - $this->SetLineStyle($line_style); - } - $this->_outPoint($x0, $y0); - foreach ($segments as $segment) { - list($x1, $y1, $x2, $y2, $x3, $y3) = $segment; - $this->_outCurve($x1, $y1, $x2, $y2, $x3, $y3); - } - $this->_out($op); - } - - /** - * Draws an ellipse. - * An ellipse is formed from n Bezier curves. - * @param $x0 (float) Abscissa of center point. - * @param $y0 (float) Ordinate of center point. - * @param $rx (float) Horizontal radius. - * @param $ry (float) Vertical radius (if ry = 0 then is a circle, see Circle()). Default value: 0. - * @param $angle: (float) Angle oriented (anti-clockwise). Default value: 0. - * @param $astart: (float) Angle start of draw line. Default value: 0. - * @param $afinish: (float) Angle finish of draw line. Default value: 360. - * @param $style (string) Style of rendering. See the getPathPaintOperator() function for more information. - * @param $line_style (array) Line style of ellipse. Array like for SetLineStyle(). Default value: default line style (empty array). - * @param $fill_color (array) Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K) or array(C,M,Y,K,SpotColorName). Default value: default color (empty array). - * @param $nc (integer) Number of curves used to draw a 90 degrees portion of ellipse. - * @author Nicola Asuni - * @public - * @since 2.1.000 (2008-01-08) - */ - public function Ellipse($x0, $y0, $rx, $ry='', $angle=0, $astart=0, $afinish=360, $style='', $line_style=array(), $fill_color=array(), $nc=2) { - if ($this->state != 2) { - return; - } - if (TCPDF_STATIC::empty_string($ry) OR ($ry == 0)) { - $ry = $rx; - } - if (!(false === strpos($style, 'F')) AND isset($fill_color)) { - $this->SetFillColorArray($fill_color); - } - $op = TCPDF_STATIC::getPathPaintOperator($style); - if ($op == 'f') { - $line_style = array(); - } - if ($line_style) { - $this->SetLineStyle($line_style); - } - $this->_outellipticalarc($x0, $y0, $rx, $ry, $angle, $astart, $afinish, false, $nc, true, true, false); - $this->_out($op); - } - - /** - * Append an elliptical arc to the current path. - * An ellipse is formed from n Bezier curves. - * @param $xc (float) Abscissa of center point. - * @param $yc (float) Ordinate of center point. - * @param $rx (float) Horizontal radius. - * @param $ry (float) Vertical radius (if ry = 0 then is a circle, see Circle()). Default value: 0. - * @param $xang: (float) Angle between the X-axis and the major axis of the ellipse. Default value: 0. - * @param $angs: (float) Angle start of draw line. Default value: 0. - * @param $angf: (float) Angle finish of draw line. Default value: 360. - * @param $pie (boolean) if true do not mark the border point (used to draw pie sectors). - * @param $nc (integer) Number of curves used to draw a 90 degrees portion of ellipse. - * @param $startpoint (boolean) if true output a starting point. - * @param $ccw (boolean) if true draws in counter-clockwise. - * @param $svg (boolean) if true the angles are in svg mode (already calculated). - * @return array bounding box coordinates (x min, y min, x max, y max) - * @author Nicola Asuni - * @protected - * @since 4.9.019 (2010-04-26) - */ - protected function _outellipticalarc($xc, $yc, $rx, $ry, $xang=0, $angs=0, $angf=360, $pie=false, $nc=2, $startpoint=true, $ccw=true, $svg=false) { - if (($rx <= 0) OR ($ry < 0)) { - return; - } - $k = $this->k; - if ($nc < 2) { - $nc = 2; - } - $xmin = 2147483647; - $ymin = 2147483647; - $xmax = 0; - $ymax = 0; - if ($pie) { - // center of the arc - $this->_outPoint($xc, $yc); - } - $xang = deg2rad((float) $xang); - $angs = deg2rad((float) $angs); - $angf = deg2rad((float) $angf); - if ($svg) { - $as = $angs; - $af = $angf; - } else { - $as = atan2((sin($angs) / $ry), (cos($angs) / $rx)); - $af = atan2((sin($angf) / $ry), (cos($angf) / $rx)); - } - if ($as < 0) { - $as += (2 * M_PI); - } - if ($af < 0) { - $af += (2 * M_PI); - } - if ($ccw AND ($as > $af)) { - // reverse rotation - $as -= (2 * M_PI); - } elseif (!$ccw AND ($as < $af)) { - // reverse rotation - $af -= (2 * M_PI); - } - $total_angle = ($af - $as); - if ($nc < 2) { - $nc = 2; - } - // total arcs to draw - $nc *= (2 * abs($total_angle) / M_PI); - $nc = round($nc) + 1; - // angle of each arc - $arcang = ($total_angle / $nc); - // center point in PDF coordinates - $x0 = $xc; - $y0 = ($this->h - $yc); - // starting angle - $ang = $as; - $alpha = sin($arcang) * ((sqrt(4 + (3 * pow(tan(($arcang) / 2), 2))) - 1) / 3); - $cos_xang = cos($xang); - $sin_xang = sin($xang); - $cos_ang = cos($ang); - $sin_ang = sin($ang); - // first arc point - $px1 = $x0 + ($rx * $cos_xang * $cos_ang) - ($ry * $sin_xang * $sin_ang); - $py1 = $y0 + ($rx * $sin_xang * $cos_ang) + ($ry * $cos_xang * $sin_ang); - // first Bezier control point - $qx1 = ($alpha * ((-$rx * $cos_xang * $sin_ang) - ($ry * $sin_xang * $cos_ang))); - $qy1 = ($alpha * ((-$rx * $sin_xang * $sin_ang) + ($ry * $cos_xang * $cos_ang))); - if ($pie) { - // line from center to arc starting point - $this->_outLine($px1, $this->h - $py1); - } elseif ($startpoint) { - // arc starting point - $this->_outPoint($px1, $this->h - $py1); - } - // draw arcs - for ($i = 1; $i <= $nc; ++$i) { - // starting angle - $ang = $as + ($i * $arcang); - if ($i == $nc) { - $ang = $af; - } - $cos_ang = cos($ang); - $sin_ang = sin($ang); - // second arc point - $px2 = $x0 + ($rx * $cos_xang * $cos_ang) - ($ry * $sin_xang * $sin_ang); - $py2 = $y0 + ($rx * $sin_xang * $cos_ang) + ($ry * $cos_xang * $sin_ang); - // second Bezier control point - $qx2 = ($alpha * ((-$rx * $cos_xang * $sin_ang) - ($ry * $sin_xang * $cos_ang))); - $qy2 = ($alpha * ((-$rx * $sin_xang * $sin_ang) + ($ry * $cos_xang * $cos_ang))); - // draw arc - $cx1 = ($px1 + $qx1); - $cy1 = ($this->h - ($py1 + $qy1)); - $cx2 = ($px2 - $qx2); - $cy2 = ($this->h - ($py2 - $qy2)); - $cx3 = $px2; - $cy3 = ($this->h - $py2); - $this->_outCurve($cx1, $cy1, $cx2, $cy2, $cx3, $cy3); - // get bounding box coordinates - $xmin = min($xmin, $cx1, $cx2, $cx3); - $ymin = min($ymin, $cy1, $cy2, $cy3); - $xmax = max($xmax, $cx1, $cx2, $cx3); - $ymax = max($ymax, $cy1, $cy2, $cy3); - // move to next point - $px1 = $px2; - $py1 = $py2; - $qx1 = $qx2; - $qy1 = $qy2; - } - if ($pie) { - $this->_outLine($xc, $yc); - // get bounding box coordinates - $xmin = min($xmin, $xc); - $ymin = min($ymin, $yc); - $xmax = max($xmax, $xc); - $ymax = max($ymax, $yc); - } - return array($xmin, $ymin, $xmax, $ymax); - } - - /** - * Draws a circle. - * A circle is formed from n Bezier curves. - * @param $x0 (float) Abscissa of center point. - * @param $y0 (float) Ordinate of center point. - * @param $r (float) Radius. - * @param $angstr: (float) Angle start of draw line. Default value: 0. - * @param $angend: (float) Angle finish of draw line. Default value: 360. - * @param $style (string) Style of rendering. See the getPathPaintOperator() function for more information. - * @param $line_style (array) Line style of circle. Array like for SetLineStyle(). Default value: default line style (empty array). - * @param $fill_color (array) Fill color. Format: array(red, green, blue). Default value: default color (empty array). - * @param $nc (integer) Number of curves used to draw a 90 degrees portion of circle. - * @public - * @since 2.1.000 (2008-01-08) - */ - public function Circle($x0, $y0, $r, $angstr=0, $angend=360, $style='', $line_style=array(), $fill_color=array(), $nc=2) { - $this->Ellipse($x0, $y0, $r, $r, 0, $angstr, $angend, $style, $line_style, $fill_color, $nc); - } - - /** - * Draws a polygonal line - * @param $p (array) Points 0 to ($np - 1). Array with values (x0, y0, x1, y1,..., x(np-1), y(np - 1)) - * @param $style (string) Style of rendering. See the getPathPaintOperator() function for more information. - * @param $line_style (array) Line style of polygon. Array with keys among the following: - *
            - *
          • all: Line style of all lines. Array like for SetLineStyle().
          • - *
          • 0 to ($np - 1): Line style of each line. Array like for SetLineStyle().
          • - *
          - * If a key is not present or is null, not draws the line. Default value is default line style (empty array). - * @param $fill_color (array) Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K) or array(C,M,Y,K,SpotColorName). Default value: default color (empty array). - * @since 4.8.003 (2009-09-15) - * @public - */ - public function PolyLine($p, $style='', $line_style=array(), $fill_color=array()) { - $this->Polygon($p, $style, $line_style, $fill_color, false); - } - - /** - * Draws a polygon. - * @param $p (array) Points 0 to ($np - 1). Array with values (x0, y0, x1, y1,..., x(np-1), y(np - 1)) - * @param $style (string) Style of rendering. See the getPathPaintOperator() function for more information. - * @param $line_style (array) Line style of polygon. Array with keys among the following: - *
            - *
          • all: Line style of all lines. Array like for SetLineStyle().
          • - *
          • 0 to ($np - 1): Line style of each line. Array like for SetLineStyle().
          • - *
          - * If a key is not present or is null, not draws the line. Default value is default line style (empty array). - * @param $fill_color (array) Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K) or array(C,M,Y,K,SpotColorName). Default value: default color (empty array). - * @param $closed (boolean) if true the polygon is closes, otherwise will remain open - * @public - * @since 2.1.000 (2008-01-08) - */ - public function Polygon($p, $style='', $line_style=array(), $fill_color=array(), $closed=true) { - if ($this->state != 2) { - return; - } - $nc = count($p); // number of coordinates - $np = $nc / 2; // number of points - if ($closed) { - // close polygon by adding the first 2 points at the end (one line) - for ($i = 0; $i < 4; ++$i) { - $p[$nc + $i] = $p[$i]; - } - // copy style for the last added line - if (isset($line_style[0])) { - $line_style[$np] = $line_style[0]; - } - $nc += 4; - } - if (!(false === strpos($style, 'F')) AND isset($fill_color)) { - $this->SetFillColorArray($fill_color); - } - $op = TCPDF_STATIC::getPathPaintOperator($style); - if ($op == 'f') { - $line_style = array(); - } - $draw = true; - if ($line_style) { - if (isset($line_style['all'])) { - $this->SetLineStyle($line_style['all']); - } else { - $draw = false; - if ($op == 'B') { - // draw fill - $op = 'f'; - $this->_outPoint($p[0], $p[1]); - for ($i = 2; $i < $nc; $i = $i + 2) { - $this->_outLine($p[$i], $p[$i + 1]); - } - $this->_out($op); - } - // draw outline - $this->_outPoint($p[0], $p[1]); - for ($i = 2; $i < $nc; $i = $i + 2) { - $line_num = ($i / 2) - 1; - if (isset($line_style[$line_num])) { - if ($line_style[$line_num] != 0) { - if (is_array($line_style[$line_num])) { - $this->_out('S'); - $this->SetLineStyle($line_style[$line_num]); - $this->_outPoint($p[$i - 2], $p[$i - 1]); - $this->_outLine($p[$i], $p[$i + 1]); - $this->_out('S'); - $this->_outPoint($p[$i], $p[$i + 1]); - } else { - $this->_outLine($p[$i], $p[$i + 1]); - } - } - } else { - $this->_outLine($p[$i], $p[$i + 1]); - } - } - $this->_out($op); - } - } - if ($draw) { - $this->_outPoint($p[0], $p[1]); - for ($i = 2; $i < $nc; $i = $i + 2) { - $this->_outLine($p[$i], $p[$i + 1]); - } - $this->_out($op); - } - } - - /** - * Draws a regular polygon. - * @param $x0 (float) Abscissa of center point. - * @param $y0 (float) Ordinate of center point. - * @param $r: (float) Radius of inscribed circle. - * @param $ns (integer) Number of sides. - * @param $angle (float) Angle oriented (anti-clockwise). Default value: 0. - * @param $draw_circle (boolean) Draw inscribed circle or not. Default value: false. - * @param $style (string) Style of rendering. See the getPathPaintOperator() function for more information. - * @param $line_style (array) Line style of polygon sides. Array with keys among the following: - *
            - *
          • all: Line style of all sides. Array like for SetLineStyle().
          • - *
          • 0 to ($ns - 1): Line style of each side. Array like for SetLineStyle().
          • - *
          - * If a key is not present or is null, not draws the side. Default value is default line style (empty array). - * @param $fill_color (array) Fill color. Format: array(red, green, blue). Default value: default color (empty array). - * @param $circle_style (string) Style of rendering of inscribed circle (if draws). Possible values are: - *
            - *
          • D or empty string: Draw (default).
          • - *
          • F: Fill.
          • - *
          • DF or FD: Draw and fill.
          • - *
          • CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).
          • - *
          • CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).
          • - *
          - * @param $circle_outLine_style (array) Line style of inscribed circle (if draws). Array like for SetLineStyle(). Default value: default line style (empty array). - * @param $circle_fill_color (array) Fill color of inscribed circle (if draws). Format: array(red, green, blue). Default value: default color (empty array). - * @public - * @since 2.1.000 (2008-01-08) - */ - public function RegularPolygon($x0, $y0, $r, $ns, $angle=0, $draw_circle=false, $style='', $line_style=array(), $fill_color=array(), $circle_style='', $circle_outLine_style=array(), $circle_fill_color=array()) { - if (3 > $ns) { - $ns = 3; - } - if ($draw_circle) { - $this->Circle($x0, $y0, $r, 0, 360, $circle_style, $circle_outLine_style, $circle_fill_color); - } - $p = array(); - for ($i = 0; $i < $ns; ++$i) { - $a = $angle + ($i * 360 / $ns); - $a_rad = deg2rad((float) $a); - $p[] = $x0 + ($r * sin($a_rad)); - $p[] = $y0 + ($r * cos($a_rad)); - } - $this->Polygon($p, $style, $line_style, $fill_color); - } - - /** - * Draws a star polygon - * @param $x0 (float) Abscissa of center point. - * @param $y0 (float) Ordinate of center point. - * @param $r (float) Radius of inscribed circle. - * @param $nv (integer) Number of vertices. - * @param $ng (integer) Number of gap (if ($ng % $nv = 1) then is a regular polygon). - * @param $angle: (float) Angle oriented (anti-clockwise). Default value: 0. - * @param $draw_circle: (boolean) Draw inscribed circle or not. Default value is false. - * @param $style (string) Style of rendering. See the getPathPaintOperator() function for more information. - * @param $line_style (array) Line style of polygon sides. Array with keys among the following: - *
            - *
          • all: Line style of all sides. Array like for - * SetLineStyle().
          • - *
          • 0 to (n - 1): Line style of each side. Array like for SetLineStyle().
          • - *
          - * If a key is not present or is null, not draws the side. Default value is default line style (empty array). - * @param $fill_color (array) Fill color. Format: array(red, green, blue). Default value: default color (empty array). - * @param $circle_style (string) Style of rendering of inscribed circle (if draws). Possible values are: - *
            - *
          • D or empty string: Draw (default).
          • - *
          • F: Fill.
          • - *
          • DF or FD: Draw and fill.
          • - *
          • CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).
          • - *
          • CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).
          • - *
          - * @param $circle_outLine_style (array) Line style of inscribed circle (if draws). Array like for SetLineStyle(). Default value: default line style (empty array). - * @param $circle_fill_color (array) Fill color of inscribed circle (if draws). Format: array(red, green, blue). Default value: default color (empty array). - * @public - * @since 2.1.000 (2008-01-08) - */ - public function StarPolygon($x0, $y0, $r, $nv, $ng, $angle=0, $draw_circle=false, $style='', $line_style=array(), $fill_color=array(), $circle_style='', $circle_outLine_style=array(), $circle_fill_color=array()) { - if ($nv < 2) { - $nv = 2; - } - if ($draw_circle) { - $this->Circle($x0, $y0, $r, 0, 360, $circle_style, $circle_outLine_style, $circle_fill_color); - } - $p2 = array(); - $visited = array(); - for ($i = 0; $i < $nv; ++$i) { - $a = $angle + ($i * 360 / $nv); - $a_rad = deg2rad((float) $a); - $p2[] = $x0 + ($r * sin($a_rad)); - $p2[] = $y0 + ($r * cos($a_rad)); - $visited[] = false; - } - $p = array(); - $i = 0; - do { - $p[] = $p2[$i * 2]; - $p[] = $p2[($i * 2) + 1]; - $visited[$i] = true; - $i += $ng; - $i %= $nv; - } while (!$visited[$i]); - $this->Polygon($p, $style, $line_style, $fill_color); - } - - /** - * Draws a rounded rectangle. - * @param $x (float) Abscissa of upper-left corner. - * @param $y (float) Ordinate of upper-left corner. - * @param $w (float) Width. - * @param $h (float) Height. - * @param $r (float) the radius of the circle used to round off the corners of the rectangle. - * @param $round_corner (string) Draws rounded corner or not. String with a 0 (not rounded i-corner) or 1 (rounded i-corner) in i-position. Positions are, in order and begin to 0: top right, bottom right, bottom left and top left. Default value: all rounded corner ("1111"). - * @param $style (string) Style of rendering. See the getPathPaintOperator() function for more information. - * @param $border_style (array) Border style of rectangle. Array like for SetLineStyle(). Default value: default line style (empty array). - * @param $fill_color (array) Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K) or array(C,M,Y,K,SpotColorName). Default value: default color (empty array). - * @public - * @since 2.1.000 (2008-01-08) - */ - public function RoundedRect($x, $y, $w, $h, $r, $round_corner='1111', $style='', $border_style=array(), $fill_color=array()) { - $this->RoundedRectXY($x, $y, $w, $h, $r, $r, $round_corner, $style, $border_style, $fill_color); - } - - /** - * Draws a rounded rectangle. - * @param $x (float) Abscissa of upper-left corner. - * @param $y (float) Ordinate of upper-left corner. - * @param $w (float) Width. - * @param $h (float) Height. - * @param $rx (float) the x-axis radius of the ellipse used to round off the corners of the rectangle. - * @param $ry (float) the y-axis radius of the ellipse used to round off the corners of the rectangle. - * @param $round_corner (string) Draws rounded corner or not. String with a 0 (not rounded i-corner) or 1 (rounded i-corner) in i-position. Positions are, in order and begin to 0: top right, bottom right, bottom left and top left. Default value: all rounded corner ("1111"). - * @param $style (string) Style of rendering. See the getPathPaintOperator() function for more information. - * @param $border_style (array) Border style of rectangle. Array like for SetLineStyle(). Default value: default line style (empty array). - * @param $fill_color (array) Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K) or array(C,M,Y,K,SpotColorName). Default value: default color (empty array). - * @public - * @since 4.9.019 (2010-04-22) - */ - public function RoundedRectXY($x, $y, $w, $h, $rx, $ry, $round_corner='1111', $style='', $border_style=array(), $fill_color=array()) { - if ($this->state != 2) { - return; - } - if (($round_corner == '0000') OR (($rx == $ry) AND ($rx == 0))) { - // Not rounded - $this->Rect($x, $y, $w, $h, $style, $border_style, $fill_color); - return; - } - // Rounded - if (!(false === strpos($style, 'F')) AND isset($fill_color)) { - $this->SetFillColorArray($fill_color); - } - $op = TCPDF_STATIC::getPathPaintOperator($style); - if ($op == 'f') { - $border_style = array(); - } - if ($border_style) { - $this->SetLineStyle($border_style); - } - $MyArc = 4 / 3 * (sqrt(2) - 1); - $this->_outPoint($x + $rx, $y); - $xc = $x + $w - $rx; - $yc = $y + $ry; - $this->_outLine($xc, $y); - if ($round_corner[0]) { - $this->_outCurve($xc + ($rx * $MyArc), $yc - $ry, $xc + $rx, $yc - ($ry * $MyArc), $xc + $rx, $yc); - } else { - $this->_outLine($x + $w, $y); - } - $xc = $x + $w - $rx; - $yc = $y + $h - $ry; - $this->_outLine($x + $w, $yc); - if ($round_corner[1]) { - $this->_outCurve($xc + $rx, $yc + ($ry * $MyArc), $xc + ($rx * $MyArc), $yc + $ry, $xc, $yc + $ry); - } else { - $this->_outLine($x + $w, $y + $h); - } - $xc = $x + $rx; - $yc = $y + $h - $ry; - $this->_outLine($xc, $y + $h); - if ($round_corner[2]) { - $this->_outCurve($xc - ($rx * $MyArc), $yc + $ry, $xc - $rx, $yc + ($ry * $MyArc), $xc - $rx, $yc); - } else { - $this->_outLine($x, $y + $h); - } - $xc = $x + $rx; - $yc = $y + $ry; - $this->_outLine($x, $yc); - if ($round_corner[3]) { - $this->_outCurve($xc - $rx, $yc - ($ry * $MyArc), $xc - ($rx * $MyArc), $yc - $ry, $xc, $yc - $ry); - } else { - $this->_outLine($x, $y); - $this->_outLine($x + $rx, $y); - } - $this->_out($op); - } - - /** - * Draws a grahic arrow. - * @param $x0 (float) Abscissa of first point. - * @param $y0 (float) Ordinate of first point. - * @param $x1 (float) Abscissa of second point. - * @param $y1 (float) Ordinate of second point. - * @param $head_style (int) (0 = draw only arrowhead arms, 1 = draw closed arrowhead, but no fill, 2 = closed and filled arrowhead, 3 = filled arrowhead) - * @param $arm_size (float) length of arrowhead arms - * @param $arm_angle (int) angle between an arm and the shaft - * @author Piotr Galecki, Nicola Asuni, Andy Meier - * @since 4.6.018 (2009-07-10) - */ - public function Arrow($x0, $y0, $x1, $y1, $head_style=0, $arm_size=5, $arm_angle=15) { - // getting arrow direction angle - // 0 deg angle is when both arms go along X axis. angle grows clockwise. - $dir_angle = atan2(($y0 - $y1), ($x0 - $x1)); - if ($dir_angle < 0) { - $dir_angle += (2 * M_PI); - } - $arm_angle = deg2rad($arm_angle); - $sx1 = $x1; - $sy1 = $y1; - if ($head_style > 0) { - // calculate the stopping point for the arrow shaft - $sx1 = $x1 + (($arm_size - $this->LineWidth) * cos($dir_angle)); - $sy1 = $y1 + (($arm_size - $this->LineWidth) * sin($dir_angle)); - } - // main arrow line / shaft - $this->Line($x0, $y0, $sx1, $sy1); - // left arrowhead arm tip - $x2L = $x1 + ($arm_size * cos($dir_angle + $arm_angle)); - $y2L = $y1 + ($arm_size * sin($dir_angle + $arm_angle)); - // right arrowhead arm tip - $x2R = $x1 + ($arm_size * cos($dir_angle - $arm_angle)); - $y2R = $y1 + ($arm_size * sin($dir_angle - $arm_angle)); - $mode = 'D'; - $style = array(); - switch ($head_style) { - case 0: { - // draw only arrowhead arms - $mode = 'D'; - $style = array(1, 1, 0); - break; - } - case 1: { - // draw closed arrowhead, but no fill - $mode = 'D'; - break; - } - case 2: { - // closed and filled arrowhead - $mode = 'DF'; - break; - } - case 3: { - // filled arrowhead - $mode = 'F'; - break; - } - } - $this->Polygon(array($x2L, $y2L, $x1, $y1, $x2R, $y2R), $mode, $style, array()); - } - - // END GRAPHIC FUNCTIONS SECTION ----------------------- - - /** - * Add a Named Destination. - * NOTE: destination names are unique, so only last entry will be saved. - * @param $name (string) Destination name. - * @param $y (float) Y position in user units of the destiantion on the selected page (default = -1 = current position; 0 = page start;). - * @param $page (int|string) Target page number (leave empty for current page). If you prefix a page number with the * character, then this page will not be changed when adding/deleting/moving pages. - * @param $x (float) X position in user units of the destiantion on the selected page (default = -1 = current position;). - * @return (string) Stripped named destination identifier or false in case of error. - * @public - * @author Christian Deligant, Nicola Asuni - * @since 5.9.097 (2011-06-23) - */ - public function setDestination($name, $y=-1, $page='', $x=-1) { - // remove unsupported characters - $name = TCPDF_STATIC::encodeNameObject($name); - if (TCPDF_STATIC::empty_string($name)) { - return false; - } - if ($y == -1) { - $y = $this->GetY(); - } elseif ($y < 0) { - $y = 0; - } elseif ($y > $this->h) { - $y = $this->h; - } - if ($x == -1) { - $x = $this->GetX(); - } elseif ($x < 0) { - $x = 0; - } elseif ($x > $this->w) { - $x = $this->w; - } - $fixed = false; - if (!empty($page) AND ($page[0] == '*')) { - $page = intval(substr($page, 1)); - // this page number will not be changed when moving/add/deleting pages - $fixed = true; - } - if (empty($page)) { - $page = $this->PageNo(); - if (empty($page)) { - return; - } - } - $this->dests[$name] = array('x' => $x, 'y' => $y, 'p' => $page, 'f' => $fixed); - return $name; - } - - /** - * Return the Named Destination array. - * @return (array) Named Destination array. - * @public - * @author Nicola Asuni - * @since 5.9.097 (2011-06-23) - */ - public function getDestination() { - return $this->dests; - } - - /** - * Insert Named Destinations. - * @protected - * @author Johannes G\FCntert, Nicola Asuni - * @since 5.9.098 (2011-06-23) - */ - protected function _putdests() { - if (empty($this->dests)) { - return; - } - $this->n_dests = $this->_newobj(); - $out = ' <<'; - foreach($this->dests as $name => $o) { - $out .= ' /'.$name.' '.sprintf('[%u 0 R /XYZ %F %F null]', $this->page_obj_id[($o['p'])], ($o['x'] * $this->k), ($this->pagedim[$o['p']]['h'] - ($o['y'] * $this->k))); - } - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - } - - /** - * Adds a bookmark - alias for Bookmark(). - * @param $txt (string) Bookmark description. - * @param $level (int) Bookmark level (minimum value is 0). - * @param $y (float) Y position in user units of the bookmark on the selected page (default = -1 = current position; 0 = page start;). - * @param $page (int|string) Target page number (leave empty for current page). If you prefix a page number with the * character, then this page will not be changed when adding/deleting/moving pages. - * @param $style (string) Font style: B = Bold, I = Italic, BI = Bold + Italic. - * @param $color (array) RGB color array (values from 0 to 255). - * @param $x (float) X position in user units of the bookmark on the selected page (default = -1 = current position;). - * @param $link (mixed) URL, or numerical link ID, or named destination (# character followed by the destination name), or embedded file (* character followed by the file name). - * @public - */ - public function setBookmark($txt, $level=0, $y=-1, $page='', $style='', $color=array(0,0,0), $x=-1, $link='') { - $this->Bookmark($txt, $level, $y, $page, $style, $color, $x, $link); - } - - /** - * Adds a bookmark. - * @param $txt (string) Bookmark description. - * @param $level (int) Bookmark level (minimum value is 0). - * @param $y (float) Y position in user units of the bookmark on the selected page (default = -1 = current position; 0 = page start;). - * @param $page (int|string) Target page number (leave empty for current page). If you prefix a page number with the * character, then this page will not be changed when adding/deleting/moving pages. - * @param $style (string) Font style: B = Bold, I = Italic, BI = Bold + Italic. - * @param $color (array) RGB color array (values from 0 to 255). - * @param $x (float) X position in user units of the bookmark on the selected page (default = -1 = current position;). - * @param $link (mixed) URL, or numerical link ID, or named destination (# character followed by the destination name), or embedded file (* character followed by the file name). - * @public - * @since 2.1.002 (2008-02-12) - */ - public function Bookmark($txt, $level=0, $y=-1, $page='', $style='', $color=array(0,0,0), $x=-1, $link='') { - if ($level < 0) { - $level = 0; - } - if (isset($this->outlines[0])) { - $lastoutline = end($this->outlines); - $maxlevel = $lastoutline['l'] + 1; - } else { - $maxlevel = 0; - } - if ($level > $maxlevel) { - $level = $maxlevel; - } - if ($y == -1) { - $y = $this->GetY(); - } elseif ($y < 0) { - $y = 0; - } elseif ($y > $this->h) { - $y = $this->h; - } - if ($x == -1) { - $x = $this->GetX(); - } elseif ($x < 0) { - $x = 0; - } elseif ($x > $this->w) { - $x = $this->w; - } - $fixed = false; - if (!empty($page) AND ($page[0] == '*')) { - $page = intval(substr($page, 1)); - // this page number will not be changed when moving/add/deleting pages - $fixed = true; - } - if (empty($page)) { - $page = $this->PageNo(); - if (empty($page)) { - return; - } - } - $this->outlines[] = array('t' => $txt, 'l' => $level, 'x' => $x, 'y' => $y, 'p' => $page, 'f' => $fixed, 's' => strtoupper($style), 'c' => $color, 'u' => $link); - } - - /** - * Sort bookmarks for page and key. - * @protected - * @since 5.9.119 (2011-09-19) - */ - protected function sortBookmarks() { - // get sorting columns - $outline_p = array(); - $outline_y = array(); - foreach ($this->outlines as $key => $row) { - $outline_p[$key] = $row['p']; - $outline_k[$key] = $key; - } - // sort outlines by page and original position - array_multisort($outline_p, SORT_NUMERIC, SORT_ASC, $outline_k, SORT_NUMERIC, SORT_ASC, $this->outlines); - } - - /** - * Create a bookmark PDF string. - * @protected - * @author Olivier Plathey, Nicola Asuni - * @since 2.1.002 (2008-02-12) - */ - protected function _putbookmarks() { - $nb = count($this->outlines); - if ($nb == 0) { - return; - } - // sort bookmarks - $this->sortBookmarks(); - $lru = array(); - $level = 0; - foreach ($this->outlines as $i => $o) { - if ($o['l'] > 0) { - $parent = $lru[($o['l'] - 1)]; - //Set parent and last pointers - $this->outlines[$i]['parent'] = $parent; - $this->outlines[$parent]['last'] = $i; - if ($o['l'] > $level) { - //Level increasing: set first pointer - $this->outlines[$parent]['first'] = $i; - } - } else { - $this->outlines[$i]['parent'] = $nb; - } - if (($o['l'] <= $level) AND ($i > 0)) { - //Set prev and next pointers - $prev = $lru[$o['l']]; - $this->outlines[$prev]['next'] = $i; - $this->outlines[$i]['prev'] = $prev; - } - $lru[$o['l']] = $i; - $level = $o['l']; - } - //Outline items - $n = $this->n + 1; - $nltags = '/|<\/(blockquote|dd|dl|div|dt|h1|h2|h3|h4|h5|h6|hr|li|ol|p|pre|ul|tcpdf|table|tr|td)>/si'; - foreach ($this->outlines as $i => $o) { - $oid = $this->_newobj(); - // covert HTML title to string - $title = preg_replace($nltags, "\n", $o['t']); - $title = preg_replace("/[\r]+/si", '', $title); - $title = preg_replace("/[\n]+/si", "\n", $title); - $title = strip_tags($title); - $title = $this->stringTrim($title); - $out = '<_textstring($title, $oid); - $out .= ' /Parent '.($n + $o['parent']).' 0 R'; - if (isset($o['prev'])) { - $out .= ' /Prev '.($n + $o['prev']).' 0 R'; - } - if (isset($o['next'])) { - $out .= ' /Next '.($n + $o['next']).' 0 R'; - } - if (isset($o['first'])) { - $out .= ' /First '.($n + $o['first']).' 0 R'; - } - if (isset($o['last'])) { - $out .= ' /Last '.($n + $o['last']).' 0 R'; - } - if (isset($o['u']) AND !empty($o['u'])) { - // link - if (is_string($o['u'])) { - if ($o['u'][0] == '#') { - // internal destination - $out .= ' /Dest /'.TCPDF_STATIC::encodeNameObject(substr($o['u'], 1)); - } elseif ($o['u'][0] == '%') { - // embedded PDF file - $filename = basename(substr($o['u'], 1)); - $out .= ' /A <embeddedfiles[$filename]['a'].' >> >>'; - } elseif ($o['u'][0] == '*') { - // embedded generic file - $filename = basename(substr($o['u'], 1)); - $jsa = 'var D=event.target.doc;var MyData=D.dataObjects;for (var i in MyData) if (MyData[i].path=="'.$filename.'") D.exportDataObject( { cName : MyData[i].name, nLaunch : 2});'; - $out .= ' /A <_textstring($jsa, $oid).'>>'; - } else { - // external URI link - $out .= ' /A <_datastring($this->unhtmlentities($o['u']), $oid).'>>'; - } - } elseif (isset($this->links[$o['u']])) { - // internal link ID - $l = $this->links[$o['u']]; - if (isset($this->page_obj_id[($l['p'])])) { - $out .= sprintf(' /Dest [%u 0 R /XYZ 0 %F null]', $this->page_obj_id[($l['p'])], ($this->pagedim[$l['p']]['h'] - ($l['y'] * $this->k))); - } - } - } elseif (isset($this->page_obj_id[($o['p'])])) { - // link to a page - $out .= ' '.sprintf('/Dest [%u 0 R /XYZ %F %F null]', $this->page_obj_id[($o['p'])], ($o['x'] * $this->k), ($this->pagedim[$o['p']]['h'] - ($o['y'] * $this->k))); - } - // set font style - $style = 0; - if (!empty($o['s'])) { - // bold - if (strpos($o['s'], 'B') !== false) { - $style |= 2; - } - // oblique - if (strpos($o['s'], 'I') !== false) { - $style |= 1; - } - } - $out .= sprintf(' /F %d', $style); - // set bookmark color - if (isset($o['c']) AND is_array($o['c']) AND (count($o['c']) == 3)) { - $color = array_values($o['c']); - $out .= sprintf(' /C [%F %F %F]', ($color[0] / 255), ($color[1] / 255), ($color[2] / 255)); - } else { - // black - $out .= ' /C [0.0 0.0 0.0]'; - } - $out .= ' /Count 0'; // normally closed item - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - } - //Outline root - $this->OutlineRoot = $this->_newobj(); - $this->_out('<< /Type /Outlines /First '.$n.' 0 R /Last '.($n + $lru[0]).' 0 R >>'."\n".'endobj'); - } - - // --- JAVASCRIPT ------------------------------------------------------ - - /** - * Adds a javascript - * @param $script (string) Javascript code - * @public - * @author Johannes G\FCntert, Nicola Asuni - * @since 2.1.002 (2008-02-12) - */ - public function IncludeJS($script) { - $this->javascript .= $script; - } - - /** - * Adds a javascript object and return object ID - * @param $script (string) Javascript code - * @param $onload (boolean) if true executes this object when opening the document - * @return int internal object ID - * @public - * @author Nicola Asuni - * @since 4.8.000 (2009-09-07) - */ - public function addJavascriptObject($script, $onload=false) { - if ($this->pdfa_mode) { - // javascript is not allowed in PDF/A mode - return false; - } - ++$this->n; - $this->js_objects[$this->n] = array('n' => $this->n, 'js' => $script, 'onload' => $onload); - return $this->n; - } - - /** - * Create a javascript PDF string. - * @protected - * @author Johannes G\FCntert, Nicola Asuni - * @since 2.1.002 (2008-02-12) - */ - protected function _putjavascript() { - if ($this->pdfa_mode OR (empty($this->javascript) AND empty($this->js_objects))) { - return; - } - if (strpos($this->javascript, 'this.addField') > 0) { - if (!$this->ur['enabled']) { - //$this->setUserRights(); - } - // the following two lines are used to avoid form fields duplication after saving - // The addField method only works when releasing user rights (UR3) - $jsa = sprintf("ftcpdfdocsaved=this.addField('%s','%s',%d,[%F,%F,%F,%F]);", 'tcpdfdocsaved', 'text', 0, 0, 1, 0, 1); - $jsb = "getField('tcpdfdocsaved').value='saved';"; - $this->javascript = $jsa."\n".$this->javascript."\n".$jsb; - } - // name tree for javascript - $this->n_js = '<< /Names ['; - if (!empty($this->javascript)) { - $this->n_js .= ' (EmbeddedJS) '.($this->n + 1).' 0 R'; - } - if (!empty($this->js_objects)) { - foreach ($this->js_objects as $key => $val) { - if ($val['onload']) { - $this->n_js .= ' (JS'.$key.') '.$key.' 0 R'; - } - } - } - $this->n_js .= ' ] >>'; - // default Javascript object - if (!empty($this->javascript)) { - $obj_id = $this->_newobj(); - $out = '<< /S /JavaScript'; - $out .= ' /JS '.$this->_textstring($this->javascript, $obj_id); - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - } - // additional Javascript objects - if (!empty($this->js_objects)) { - foreach ($this->js_objects as $key => $val) { - $out = $this->_getobj($key)."\n".' << /S /JavaScript /JS '.$this->_textstring($val['js'], $key).' >>'."\n".'endobj'; - $this->_out($out); - } - } - } - - /** - * Adds a javascript form field. - * @param $type (string) field type - * @param $name (string) field name - * @param $x (int) horizontal position - * @param $y (int) vertical position - * @param $w (int) width - * @param $h (int) height - * @param $prop (array) javascript field properties. Possible values are described on official Javascript for Acrobat API reference. - * @protected - * @author Denis Van Nuffelen, Nicola Asuni - * @since 2.1.002 (2008-02-12) - */ - protected function _addfield($type, $name, $x, $y, $w, $h, $prop) { - if ($this->rtl) { - $x = $x - $w; - } - // the followind avoid fields duplication after saving the document - $this->javascript .= "if (getField('tcpdfdocsaved').value != 'saved') {"; - $k = $this->k; - $this->javascript .= sprintf("f".$name."=this.addField('%s','%s',%u,[%F,%F,%F,%F]);", $name, $type, $this->PageNo()-1, $x*$k, ($this->h-$y)*$k+1, ($x+$w)*$k, ($this->h-$y-$h)*$k+1)."\n"; - $this->javascript .= 'f'.$name.'.textSize='.$this->FontSizePt.";\n"; - while (list($key, $val) = each($prop)) { - if (strcmp(substr($key, -5), 'Color') == 0) { - $val = TCPDF_COLORS::_JScolor($val); - } else { - $val = "'".$val."'"; - } - $this->javascript .= 'f'.$name.'.'.$key.'='.$val.";\n"; - } - if ($this->rtl) { - $this->x -= $w; - } else { - $this->x += $w; - } - $this->javascript .= '}'; - } - - // --- FORM FIELDS ----------------------------------------------------- - - - - /** - * Set default properties for form fields. - * @param $prop (array) javascript field properties. Possible values are described on official Javascript for Acrobat API reference. - * @public - * @author Nicola Asuni - * @since 4.8.000 (2009-09-06) - */ - public function setFormDefaultProp($prop=array()) { - $this->default_form_prop = $prop; - } - - /** - * Return the default properties for form fields. - * @return array $prop javascript field properties. Possible values are described on official Javascript for Acrobat API reference. - * @public - * @author Nicola Asuni - * @since 4.8.000 (2009-09-06) - */ - public function getFormDefaultProp() { - return $this->default_form_prop; - } - - /** - * Creates a text field - * @param $name (string) field name - * @param $w (float) Width of the rectangle - * @param $h (float) Height of the rectangle - * @param $prop (array) javascript field properties. Possible values are described on official Javascript for Acrobat API reference. - * @param $opt (array) annotation parameters. Possible values are described on official PDF32000_2008 reference. - * @param $x (float) Abscissa of the upper-left corner of the rectangle - * @param $y (float) Ordinate of the upper-left corner of the rectangle - * @param $js (boolean) if true put the field using JavaScript (requires Acrobat Writer to be rendered). - * @public - * @author Nicola Asuni - * @since 4.8.000 (2009-09-07) - */ - public function TextField($name, $w, $h, $prop=array(), $opt=array(), $x='', $y='', $js=false) { - if ($x === '') { - $x = $this->x; - } - if ($y === '') { - $y = $this->y; - } - // check page for no-write regions and adapt page margins if necessary - list($x, $y) = $this->checkPageRegions($h, $x, $y); - if ($js) { - $this->_addfield('text', $name, $x, $y, $w, $h, $prop); - return; - } - // get default style - $prop = array_merge($this->getFormDefaultProp(), $prop); - // get annotation data - $popt = TCPDF_STATIC::getAnnotOptFromJSProp($prop, $this->spot_colors, $this->rtl); - // set default appearance stream - $this->annotation_fonts[$this->CurrentFont['fontkey']] = $this->CurrentFont['i']; - $fontstyle = sprintf('/F%d %F Tf %s', $this->CurrentFont['i'], $this->FontSizePt, $this->TextColor); - $popt['da'] = $fontstyle; - // build appearance stream - $popt['ap'] = array(); - $popt['ap']['n'] = '/Tx BMC q '.$fontstyle.' '; - $text = ''; - if (isset($prop['value']) AND !empty($prop['value'])) { - $text = $prop['value']; - } elseif (isset($opt['v']) AND !empty($opt['v'])) { - $text = $opt['v']; - } - $tmpid = $this->startTemplate($w, $h, false); - $align = ''; - if (isset($popt['q'])) { - switch ($popt['q']) { - case 0: { - $align = 'L'; - break; - } - case 1: { - $align = 'C'; - break; - } - case 2: { - $align = 'R'; - break; - } - default: { - $align = ''; - break; - } - } - } - $this->MultiCell($w, $h, $text, 0, $align, false, 0, 0, 0, true, 0, false, true, 0, 'T', false); - $this->endTemplate(); - --$this->n; - $popt['ap']['n'] .= $this->xobjects[$tmpid]['outdata']; - unset($this->xobjects[$tmpid]); - $popt['ap']['n'] .= 'Q EMC'; - // merge options - $opt = array_merge($popt, $opt); - // remove some conflicting options - unset($opt['bs']); - // set remaining annotation data - $opt['Subtype'] = 'Widget'; - $opt['ft'] = 'Tx'; - $opt['t'] = $name; - // Additional annotation's parameters (check _putannotsobj() method): - //$opt['f'] - //$opt['as'] - //$opt['bs'] - //$opt['be'] - //$opt['c'] - //$opt['border'] - //$opt['h'] - //$opt['mk']; - //$opt['mk']['r'] - //$opt['mk']['bc']; - //$opt['mk']['bg']; - unset($opt['mk']['ca']); - unset($opt['mk']['rc']); - unset($opt['mk']['ac']); - unset($opt['mk']['i']); - unset($opt['mk']['ri']); - unset($opt['mk']['ix']); - unset($opt['mk']['if']); - //$opt['mk']['if']['sw']; - //$opt['mk']['if']['s']; - //$opt['mk']['if']['a']; - //$opt['mk']['if']['fb']; - unset($opt['mk']['tp']); - //$opt['tu'] - //$opt['tm'] - //$opt['ff'] - //$opt['v'] - //$opt['dv'] - //$opt['a'] - //$opt['aa'] - //$opt['q'] - $this->Annotation($x, $y, $w, $h, $name, $opt, 0); - if ($this->rtl) { - $this->x -= $w; - } else { - $this->x += $w; - } - } - - /** - * Creates a RadioButton field. - * @param $name (string) Field name. - * @param $w (int) Width of the radio button. - * @param $prop (array) Javascript field properties. Possible values are described on official Javascript for Acrobat API reference. - * @param $opt (array) Annotation parameters. Possible values are described on official PDF32000_2008 reference. - * @param $onvalue (string) Value to be returned if selected. - * @param $checked (boolean) Define the initial state. - * @param $x (float) Abscissa of the upper-left corner of the rectangle - * @param $y (float) Ordinate of the upper-left corner of the rectangle - * @param $js (boolean) If true put the field using JavaScript (requires Acrobat Writer to be rendered). - * @public - * @author Nicola Asuni - * @since 4.8.000 (2009-09-07) - */ - public function RadioButton($name, $w, $prop=array(), $opt=array(), $onvalue='On', $checked=false, $x='', $y='', $js=false) { - if ($x === '') { - $x = $this->x; - } - if ($y === '') { - $y = $this->y; - } - // check page for no-write regions and adapt page margins if necessary - list($x, $y) = $this->checkPageRegions($w, $x, $y); - if ($js) { - $this->_addfield('radiobutton', $name, $x, $y, $w, $w, $prop); - return; - } - if (TCPDF_STATIC::empty_string($onvalue)) { - $onvalue = 'On'; - } - if ($checked) { - $defval = $onvalue; - } else { - $defval = 'Off'; - } - // set font - $font = 'zapfdingbats'; - if ($this->pdfa_mode) { - // all fonts must be embedded - $font = 'pdfa'.$font; - } - $this->AddFont($font); - $tmpfont = $this->getFontBuffer($font); - // set data for parent group - if (!isset($this->radiobutton_groups[$this->page])) { - $this->radiobutton_groups[$this->page] = array(); - } - if (!isset($this->radiobutton_groups[$this->page][$name])) { - $this->radiobutton_groups[$this->page][$name] = array(); - ++$this->n; - $this->radiobutton_groups[$this->page][$name]['n'] = $this->n; - $this->radio_groups[] = $this->n; - } - $kid = ($this->n + 1); - // save object ID to be added on Kids entry on parent object - $this->radiobutton_groups[$this->page][$name][] = array('kid' => $kid, 'def' => $defval); - // get default style - $prop = array_merge($this->getFormDefaultProp(), $prop); - $prop['NoToggleToOff'] = 'true'; - $prop['Radio'] = 'true'; - $prop['borderStyle'] = 'inset'; - // get annotation data - $popt = TCPDF_STATIC::getAnnotOptFromJSProp($prop, $this->spot_colors, $this->rtl); - // set additional default options - $this->annotation_fonts[$tmpfont['fontkey']] = $tmpfont['i']; - $fontstyle = sprintf('/F%d %F Tf %s', $tmpfont['i'], $this->FontSizePt, $this->TextColor); - $popt['da'] = $fontstyle; - // build appearance stream - $popt['ap'] = array(); - $popt['ap']['n'] = array(); - $fx = ((($w - $this->getAbsFontMeasure($tmpfont['cw'][108])) / 2) * $this->k); - $fy = (($w - ((($tmpfont['desc']['Ascent'] - $tmpfont['desc']['Descent']) * $this->FontSizePt / 1000) / $this->k)) * $this->k); - $popt['ap']['n'][$onvalue] = sprintf('q %s BT /F%d %F Tf %F %F Td ('.chr(108).') Tj ET Q', $this->TextColor, $tmpfont['i'], $this->FontSizePt, $fx, $fy); - $popt['ap']['n']['Off'] = sprintf('q %s BT /F%d %F Tf %F %F Td ('.chr(109).') Tj ET Q', $this->TextColor, $tmpfont['i'], $this->FontSizePt, $fx, $fy); - if (!isset($popt['mk'])) { - $popt['mk'] = array(); - } - $popt['mk']['ca'] = '(l)'; - // merge options - $opt = array_merge($popt, $opt); - // set remaining annotation data - $opt['Subtype'] = 'Widget'; - $opt['ft'] = 'Btn'; - if ($checked) { - $opt['v'] = array('/'.$onvalue); - $opt['as'] = $onvalue; - } else { - $opt['as'] = 'Off'; - } - // store readonly flag - if (!isset($this->radiobutton_groups[$this->page][$name]['#readonly#'])) { - $this->radiobutton_groups[$this->page][$name]['#readonly#'] = false; - } - $this->radiobutton_groups[$this->page][$name]['#readonly#'] |= ($opt['f'] & 64); - $this->Annotation($x, $y, $w, $w, $name, $opt, 0); - if ($this->rtl) { - $this->x -= $w; - } else { - $this->x += $w; - } - } - - /** - * Creates a List-box field - * @param $name (string) field name - * @param $w (int) width - * @param $h (int) height - * @param $values (array) array containing the list of values. - * @param $prop (array) javascript field properties. Possible values are described on official Javascript for Acrobat API reference. - * @param $opt (array) annotation parameters. Possible values are described on official PDF32000_2008 reference. - * @param $x (float) Abscissa of the upper-left corner of the rectangle - * @param $y (float) Ordinate of the upper-left corner of the rectangle - * @param $js (boolean) if true put the field using JavaScript (requires Acrobat Writer to be rendered). - * @public - * @author Nicola Asuni - * @since 4.8.000 (2009-09-07) - */ - public function ListBox($name, $w, $h, $values, $prop=array(), $opt=array(), $x='', $y='', $js=false) { - if ($x === '') { - $x = $this->x; - } - if ($y === '') { - $y = $this->y; - } - // check page for no-write regions and adapt page margins if necessary - list($x, $y) = $this->checkPageRegions($h, $x, $y); - if ($js) { - $this->_addfield('listbox', $name, $x, $y, $w, $h, $prop); - $s = ''; - foreach ($values as $value) { - if (is_array($value)) { - $s .= ',[\''.addslashes($value[1]).'\',\''.addslashes($value[0]).'\']'; - } else { - $s .= ',[\''.addslashes($value).'\',\''.addslashes($value).'\']'; - } - } - $this->javascript .= 'f'.$name.'.setItems('.substr($s, 1).');'."\n"; - return; - } - // get default style - $prop = array_merge($this->getFormDefaultProp(), $prop); - // get annotation data - $popt = TCPDF_STATIC::getAnnotOptFromJSProp($prop, $this->spot_colors, $this->rtl); - // set additional default values - $this->annotation_fonts[$this->CurrentFont['fontkey']] = $this->CurrentFont['i']; - $fontstyle = sprintf('/F%d %F Tf %s', $this->CurrentFont['i'], $this->FontSizePt, $this->TextColor); - $popt['da'] = $fontstyle; - // build appearance stream - $popt['ap'] = array(); - $popt['ap']['n'] = '/Tx BMC q '.$fontstyle.' '; - $text = ''; - foreach($values as $item) { - if (is_array($item)) { - $text .= $item[1]."\n"; - } else { - $text .= $item."\n"; - } - } - $tmpid = $this->startTemplate($w, $h, false); - $this->MultiCell($w, $h, $text, 0, '', false, 0, 0, 0, true, 0, false, true, 0, 'T', false); - $this->endTemplate(); - --$this->n; - $popt['ap']['n'] .= $this->xobjects[$tmpid]['outdata']; - unset($this->xobjects[$tmpid]); - $popt['ap']['n'] .= 'Q EMC'; - // merge options - $opt = array_merge($popt, $opt); - // set remaining annotation data - $opt['Subtype'] = 'Widget'; - $opt['ft'] = 'Ch'; - $opt['t'] = $name; - $opt['opt'] = $values; - unset($opt['mk']['ca']); - unset($opt['mk']['rc']); - unset($opt['mk']['ac']); - unset($opt['mk']['i']); - unset($opt['mk']['ri']); - unset($opt['mk']['ix']); - unset($opt['mk']['if']); - unset($opt['mk']['tp']); - $this->Annotation($x, $y, $w, $h, $name, $opt, 0); - if ($this->rtl) { - $this->x -= $w; - } else { - $this->x += $w; - } - } - - /** - * Creates a Combo-box field - * @param $name (string) field name - * @param $w (int) width - * @param $h (int) height - * @param $values (array) array containing the list of values. - * @param $prop (array) javascript field properties. Possible values are described on official Javascript for Acrobat API reference. - * @param $opt (array) annotation parameters. Possible values are described on official PDF32000_2008 reference. - * @param $x (float) Abscissa of the upper-left corner of the rectangle - * @param $y (float) Ordinate of the upper-left corner of the rectangle - * @param $js (boolean) if true put the field using JavaScript (requires Acrobat Writer to be rendered). - * @public - * @author Nicola Asuni - * @since 4.8.000 (2009-09-07) - */ - public function ComboBox($name, $w, $h, $values, $prop=array(), $opt=array(), $x='', $y='', $js=false) { - if ($x === '') { - $x = $this->x; - } - if ($y === '') { - $y = $this->y; - } - // check page for no-write regions and adapt page margins if necessary - list($x, $y) = $this->checkPageRegions($h, $x, $y); - if ($js) { - $this->_addfield('combobox', $name, $x, $y, $w, $h, $prop); - $s = ''; - foreach ($values as $value) { - if (is_array($value)) { - $s .= ',[\''.addslashes($value[1]).'\',\''.addslashes($value[0]).'\']'; - } else { - $s .= ',[\''.addslashes($value).'\',\''.addslashes($value).'\']'; - } - } - $this->javascript .= 'f'.$name.'.setItems('.substr($s, 1).');'."\n"; - return; - } - // get default style - $prop = array_merge($this->getFormDefaultProp(), $prop); - $prop['Combo'] = true; - // get annotation data - $popt = TCPDF_STATIC::getAnnotOptFromJSProp($prop, $this->spot_colors, $this->rtl); - // set additional default options - $this->annotation_fonts[$this->CurrentFont['fontkey']] = $this->CurrentFont['i']; - $fontstyle = sprintf('/F%d %F Tf %s', $this->CurrentFont['i'], $this->FontSizePt, $this->TextColor); - $popt['da'] = $fontstyle; - // build appearance stream - $popt['ap'] = array(); - $popt['ap']['n'] = '/Tx BMC q '.$fontstyle.' '; - $text = ''; - foreach($values as $item) { - if (is_array($item)) { - $text .= $item[1]."\n"; - } else { - $text .= $item."\n"; - } - } - $tmpid = $this->startTemplate($w, $h, false); - $this->MultiCell($w, $h, $text, 0, '', false, 0, 0, 0, true, 0, false, true, 0, 'T', false); - $this->endTemplate(); - --$this->n; - $popt['ap']['n'] .= $this->xobjects[$tmpid]['outdata']; - unset($this->xobjects[$tmpid]); - $popt['ap']['n'] .= 'Q EMC'; - // merge options - $opt = array_merge($popt, $opt); - // set remaining annotation data - $opt['Subtype'] = 'Widget'; - $opt['ft'] = 'Ch'; - $opt['t'] = $name; - $opt['opt'] = $values; - unset($opt['mk']['ca']); - unset($opt['mk']['rc']); - unset($opt['mk']['ac']); - unset($opt['mk']['i']); - unset($opt['mk']['ri']); - unset($opt['mk']['ix']); - unset($opt['mk']['if']); - unset($opt['mk']['tp']); - $this->Annotation($x, $y, $w, $h, $name, $opt, 0); - if ($this->rtl) { - $this->x -= $w; - } else { - $this->x += $w; - } - } - - /** - * Creates a CheckBox field - * @param $name (string) field name - * @param $w (int) width - * @param $checked (boolean) define the initial state. - * @param $prop (array) javascript field properties. Possible values are described on official Javascript for Acrobat API reference. - * @param $opt (array) annotation parameters. Possible values are described on official PDF32000_2008 reference. - * @param $onvalue (string) value to be returned if selected. - * @param $x (float) Abscissa of the upper-left corner of the rectangle - * @param $y (float) Ordinate of the upper-left corner of the rectangle - * @param $js (boolean) if true put the field using JavaScript (requires Acrobat Writer to be rendered). - * @public - * @author Nicola Asuni - * @since 4.8.000 (2009-09-07) - */ - public function CheckBox($name, $w, $checked=false, $prop=array(), $opt=array(), $onvalue='Yes', $x='', $y='', $js=false) { - if ($x === '') { - $x = $this->x; - } - if ($y === '') { - $y = $this->y; - } - // check page for no-write regions and adapt page margins if necessary - list($x, $y) = $this->checkPageRegions($w, $x, $y); - if ($js) { - $this->_addfield('checkbox', $name, $x, $y, $w, $w, $prop); - return; - } - if (!isset($prop['value'])) { - $prop['value'] = array('Yes'); - } - // get default style - $prop = array_merge($this->getFormDefaultProp(), $prop); - $prop['borderStyle'] = 'inset'; - // get annotation data - $popt = TCPDF_STATIC::getAnnotOptFromJSProp($prop, $this->spot_colors, $this->rtl); - // set additional default options - $font = 'zapfdingbats'; - if ($this->pdfa_mode) { - // all fonts must be embedded - $font = 'pdfa'.$font; - } - $this->AddFont($font); - $tmpfont = $this->getFontBuffer($font); - $this->annotation_fonts[$tmpfont['fontkey']] = $tmpfont['i']; - $fontstyle = sprintf('/F%d %F Tf %s', $tmpfont['i'], $this->FontSizePt, $this->TextColor); - $popt['da'] = $fontstyle; - // build appearance stream - $popt['ap'] = array(); - $popt['ap']['n'] = array(); - $fx = ((($w - $this->getAbsFontMeasure($tmpfont['cw'][110])) / 2) * $this->k); - $fy = (($w - ((($tmpfont['desc']['Ascent'] - $tmpfont['desc']['Descent']) * $this->FontSizePt / 1000) / $this->k)) * $this->k); - $popt['ap']['n']['Yes'] = sprintf('q %s BT /F%d %F Tf %F %F Td ('.chr(110).') Tj ET Q', $this->TextColor, $tmpfont['i'], $this->FontSizePt, $fx, $fy); - $popt['ap']['n']['Off'] = sprintf('q %s BT /F%d %F Tf %F %F Td ('.chr(111).') Tj ET Q', $this->TextColor, $tmpfont['i'], $this->FontSizePt, $fx, $fy); - // merge options - $opt = array_merge($popt, $opt); - // set remaining annotation data - $opt['Subtype'] = 'Widget'; - $opt['ft'] = 'Btn'; - $opt['t'] = $name; - if (TCPDF_STATIC::empty_string($onvalue)) { - $onvalue = 'Yes'; - } - $opt['opt'] = array($onvalue); - if ($checked) { - $opt['v'] = array('/Yes'); - $opt['as'] = 'Yes'; - } else { - $opt['v'] = array('/Off'); - $opt['as'] = 'Off'; - } - $this->Annotation($x, $y, $w, $w, $name, $opt, 0); - if ($this->rtl) { - $this->x -= $w; - } else { - $this->x += $w; - } - } - - /** - * Creates a button field - * @param $name (string) field name - * @param $w (int) width - * @param $h (int) height - * @param $caption (string) caption. - * @param $action (mixed) action triggered by pressing the button. Use a string to specify a javascript action. Use an array to specify a form action options as on section 12.7.5 of PDF32000_2008. - * @param $prop (array) javascript field properties. Possible values are described on official Javascript for Acrobat API reference. - * @param $opt (array) annotation parameters. Possible values are described on official PDF32000_2008 reference. - * @param $x (float) Abscissa of the upper-left corner of the rectangle - * @param $y (float) Ordinate of the upper-left corner of the rectangle - * @param $js (boolean) if true put the field using JavaScript (requires Acrobat Writer to be rendered). - * @public - * @author Nicola Asuni - * @since 4.8.000 (2009-09-07) - */ - public function Button($name, $w, $h, $caption, $action, $prop=array(), $opt=array(), $x='', $y='', $js=false) { - if ($x === '') { - $x = $this->x; - } - if ($y === '') { - $y = $this->y; - } - // check page for no-write regions and adapt page margins if necessary - list($x, $y) = $this->checkPageRegions($h, $x, $y); - if ($js) { - $this->_addfield('button', $name, $this->x, $this->y, $w, $h, $prop); - $this->javascript .= 'f'.$name.".buttonSetCaption('".addslashes($caption)."');\n"; - $this->javascript .= 'f'.$name.".setAction('MouseUp','".addslashes($action)."');\n"; - $this->javascript .= 'f'.$name.".highlight='push';\n"; - $this->javascript .= 'f'.$name.".print=false;\n"; - return; - } - // get default style - $prop = array_merge($this->getFormDefaultProp(), $prop); - $prop['Pushbutton'] = 'true'; - $prop['highlight'] = 'push'; - $prop['display'] = 'display.noPrint'; - // get annotation data - $popt = TCPDF_STATIC::getAnnotOptFromJSProp($prop, $this->spot_colors, $this->rtl); - $this->annotation_fonts[$this->CurrentFont['fontkey']] = $this->CurrentFont['i']; - $fontstyle = sprintf('/F%d %F Tf %s', $this->CurrentFont['i'], $this->FontSizePt, $this->TextColor); - $popt['da'] = $fontstyle; - // build appearance stream - $popt['ap'] = array(); - $popt['ap']['n'] = '/Tx BMC q '.$fontstyle.' '; - $tmpid = $this->startTemplate($w, $h, false); - $bw = (2 / $this->k); // border width - $border = array( - 'L' => array('width' => $bw, 'cap' => 'square', 'join' => 'miter', 'dash' => 0, 'color' => array(231)), - 'R' => array('width' => $bw, 'cap' => 'square', 'join' => 'miter', 'dash' => 0, 'color' => array(51)), - 'T' => array('width' => $bw, 'cap' => 'square', 'join' => 'miter', 'dash' => 0, 'color' => array(231)), - 'B' => array('width' => $bw, 'cap' => 'square', 'join' => 'miter', 'dash' => 0, 'color' => array(51))); - $this->SetFillColor(204); - $this->Cell($w, $h, $caption, $border, 0, 'C', true, '', 1, false, 'T', 'M'); - $this->endTemplate(); - --$this->n; - $popt['ap']['n'] .= $this->xobjects[$tmpid]['outdata']; - unset($this->xobjects[$tmpid]); - $popt['ap']['n'] .= 'Q EMC'; - // set additional default options - if (!isset($popt['mk'])) { - $popt['mk'] = array(); - } - $ann_obj_id = ($this->n + 1); - if (!empty($action) AND !is_array($action)) { - $ann_obj_id = ($this->n + 2); - } - $popt['mk']['ca'] = $this->_textstring($caption, $ann_obj_id); - $popt['mk']['rc'] = $this->_textstring($caption, $ann_obj_id); - $popt['mk']['ac'] = $this->_textstring($caption, $ann_obj_id); - // merge options - $opt = array_merge($popt, $opt); - // set remaining annotation data - $opt['Subtype'] = 'Widget'; - $opt['ft'] = 'Btn'; - $opt['t'] = $caption; - $opt['v'] = $name; - if (!empty($action)) { - if (is_array($action)) { - // form action options as on section 12.7.5 of PDF32000_2008. - $opt['aa'] = '/D <<'; - $bmode = array('SubmitForm', 'ResetForm', 'ImportData'); - foreach ($action AS $key => $val) { - if (($key == 'S') AND in_array($val, $bmode)) { - $opt['aa'] .= ' /S /'.$val; - } elseif (($key == 'F') AND (!empty($val))) { - $opt['aa'] .= ' /F '.$this->_datastring($val, $ann_obj_id); - } elseif (($key == 'Fields') AND is_array($val) AND !empty($val)) { - $opt['aa'] .= ' /Fields ['; - foreach ($val AS $field) { - $opt['aa'] .= ' '.$this->_textstring($field, $ann_obj_id); - } - $opt['aa'] .= ']'; - } elseif (($key == 'Flags')) { - $ff = 0; - if (is_array($val)) { - foreach ($val AS $flag) { - switch ($flag) { - case 'Include/Exclude': { - $ff += 1 << 0; - break; - } - case 'IncludeNoValueFields': { - $ff += 1 << 1; - break; - } - case 'ExportFormat': { - $ff += 1 << 2; - break; - } - case 'GetMethod': { - $ff += 1 << 3; - break; - } - case 'SubmitCoordinates': { - $ff += 1 << 4; - break; - } - case 'XFDF': { - $ff += 1 << 5; - break; - } - case 'IncludeAppendSaves': { - $ff += 1 << 6; - break; - } - case 'IncludeAnnotations': { - $ff += 1 << 7; - break; - } - case 'SubmitPDF': { - $ff += 1 << 8; - break; - } - case 'CanonicalFormat': { - $ff += 1 << 9; - break; - } - case 'ExclNonUserAnnots': { - $ff += 1 << 10; - break; - } - case 'ExclFKey': { - $ff += 1 << 11; - break; - } - case 'EmbedForm': { - $ff += 1 << 13; - break; - } - } - } - } else { - $ff = intval($val); - } - $opt['aa'] .= ' /Flags '.$ff; - } - } - $opt['aa'] .= ' >>'; - } else { - // Javascript action or raw action command - $js_obj_id = $this->addJavascriptObject($action); - $opt['aa'] = '/D '.$js_obj_id.' 0 R'; - } - } - $this->Annotation($x, $y, $w, $h, $name, $opt, 0); - if ($this->rtl) { - $this->x -= $w; - } else { - $this->x += $w; - } - } - - // --- END FORMS FIELDS ------------------------------------------------ - - /** - * Add certification signature (DocMDP or UR3) - * You can set only one signature type - * @protected - * @author Nicola Asuni - * @since 4.6.008 (2009-05-07) - */ - protected function _putsignature() { - if ((!$this->sign) OR (!isset($this->signature_data['cert_type']))) { - return; - } - $sigobjid = ($this->sig_obj_id + 1); - $out = $this->_getobj($sigobjid)."\n"; - $out .= '<< /Type /Sig'; - $out .= ' /Filter /Adobe.PPKLite'; - $out .= ' /SubFilter /adbe.pkcs7.detached'; - $out .= ' '.TCPDF_STATIC::$byterange_string; - $out .= ' /Contents<'.str_repeat('0', $this->signature_max_length).'>'; - if (empty($this->signature_data['approval']) OR ($this->signature_data['approval'] != 'A')) { - $out .= ' /Reference ['; // array of signature reference dictionaries - $out .= ' << /Type /SigRef'; - if ($this->signature_data['cert_type'] > 0) { - $out .= ' /TransformMethod /DocMDP'; - $out .= ' /TransformParams <<'; - $out .= ' /Type /TransformParams'; - $out .= ' /P '.$this->signature_data['cert_type']; - $out .= ' /V /1.2'; - } else { - $out .= ' /TransformMethod /UR3'; - $out .= ' /TransformParams <<'; - $out .= ' /Type /TransformParams'; - $out .= ' /V /2.2'; - if (!TCPDF_STATIC::empty_string($this->ur['document'])) { - $out .= ' /Document['.$this->ur['document'].']'; - } - if (!TCPDF_STATIC::empty_string($this->ur['form'])) { - $out .= ' /Form['.$this->ur['form'].']'; - } - if (!TCPDF_STATIC::empty_string($this->ur['signature'])) { - $out .= ' /Signature['.$this->ur['signature'].']'; - } - if (!TCPDF_STATIC::empty_string($this->ur['annots'])) { - $out .= ' /Annots['.$this->ur['annots'].']'; - } - if (!TCPDF_STATIC::empty_string($this->ur['ef'])) { - $out .= ' /EF['.$this->ur['ef'].']'; - } - if (!TCPDF_STATIC::empty_string($this->ur['formex'])) { - $out .= ' /FormEX['.$this->ur['formex'].']'; - } - } - $out .= ' >>'; // close TransformParams - // optional digest data (values must be calculated and replaced later) - //$out .= ' /Data ********** 0 R'; - //$out .= ' /DigestMethod/MD5'; - //$out .= ' /DigestLocation[********** 34]'; - //$out .= ' /DigestValue<********************************>'; - $out .= ' >>'; - $out .= ' ]'; // end of reference - } - if (isset($this->signature_data['info']['Name']) AND !TCPDF_STATIC::empty_string($this->signature_data['info']['Name'])) { - $out .= ' /Name '.$this->_textstring($this->signature_data['info']['Name'], $sigobjid); - } - if (isset($this->signature_data['info']['Location']) AND !TCPDF_STATIC::empty_string($this->signature_data['info']['Location'])) { - $out .= ' /Location '.$this->_textstring($this->signature_data['info']['Location'], $sigobjid); - } - if (isset($this->signature_data['info']['Reason']) AND !TCPDF_STATIC::empty_string($this->signature_data['info']['Reason'])) { - $out .= ' /Reason '.$this->_textstring($this->signature_data['info']['Reason'], $sigobjid); - } - if (isset($this->signature_data['info']['ContactInfo']) AND !TCPDF_STATIC::empty_string($this->signature_data['info']['ContactInfo'])) { - $out .= ' /ContactInfo '.$this->_textstring($this->signature_data['info']['ContactInfo'], $sigobjid); - } - $out .= ' /M '.$this->_datestring($sigobjid, $this->doc_modification_timestamp); - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - } - - /** - * Set User's Rights for PDF Reader - * WARNING: This is experimental and currently do not work. - * Check the PDF Reference 8.7.1 Transform Methods, - * Table 8.105 Entries in the UR transform parameters dictionary - * @param $enable (boolean) if true enable user's rights on PDF reader - * @param $document (string) Names specifying additional document-wide usage rights for the document. The only defined value is "/FullSave", which permits a user to save the document along with modified form and/or annotation data. - * @param $annots (string) Names specifying additional annotation-related usage rights for the document. Valid names in PDF 1.5 and later are /Create/Delete/Modify/Copy/Import/Export, which permit the user to perform the named operation on annotations. - * @param $form (string) Names specifying additional form-field-related usage rights for the document. Valid names are: /Add/Delete/FillIn/Import/Export/SubmitStandalone/SpawnTemplate - * @param $signature (string) Names specifying additional signature-related usage rights for the document. The only defined value is /Modify, which permits a user to apply a digital signature to an existing signature form field or clear a signed signature form field. - * @param $ef (string) Names specifying additional usage rights for named embedded files in the document. Valid names are /Create/Delete/Modify/Import, which permit the user to perform the named operation on named embedded files - Names specifying additional embedded-files-related usage rights for the document. - * @param $formex (string) Names specifying additional form-field-related usage rights. The only valid name is BarcodePlaintext, which permits text form field data to be encoded as a plaintext two-dimensional barcode. - * @public - * @author Nicola Asuni - * @since 2.9.000 (2008-03-26) - */ - public function setUserRights( - $enable=true, - $document='/FullSave', - $annots='/Create/Delete/Modify/Copy/Import/Export', - $form='/Add/Delete/FillIn/Import/Export/SubmitStandalone/SpawnTemplate', - $signature='/Modify', - $ef='/Create/Delete/Modify/Import', - $formex='') { - $this->ur['enabled'] = $enable; - $this->ur['document'] = $document; - $this->ur['annots'] = $annots; - $this->ur['form'] = $form; - $this->ur['signature'] = $signature; - $this->ur['ef'] = $ef; - $this->ur['formex'] = $formex; - if (!$this->sign) { - $this->setSignature('', '', '', '', 0, array()); - } - } - - /** - * Enable document signature (requires the OpenSSL Library). - * The digital signature improve document authenticity and integrity and allows o enable extra features on Acrobat Reader. - * To create self-signed signature: openssl req -x509 -nodes -days 365000 -newkey rsa:1024 -keyout tcpdf.crt -out tcpdf.crt - * To export crt to p12: openssl pkcs12 -export -in tcpdf.crt -out tcpdf.p12 - * To convert pfx certificate to pem: openssl pkcs12 -in tcpdf.pfx -out tcpdf.crt -nodes - * @param $signing_cert (mixed) signing certificate (string or filename prefixed with 'file://') - * @param $private_key (mixed) private key (string or filename prefixed with 'file://') - * @param $private_key_password (string) password - * @param $extracerts (string) specifies the name of a file containing a bunch of extra certificates to include in the signature which can for example be used to help the recipient to verify the certificate that you used. - * @param $cert_type (int) The access permissions granted for this document. Valid values shall be: 1 = No changes to the document shall be permitted; any change to the document shall invalidate the signature; 2 = Permitted changes shall be filling in forms, instantiating page templates, and signing; other changes shall invalidate the signature; 3 = Permitted changes shall be the same as for 2, as well as annotation creation, deletion, and modification; other changes shall invalidate the signature. - * @param $info (array) array of option information: Name, Location, Reason, ContactInfo. - * @param $approval (string) Enable approval signature eg. for PDF incremental update - * @public - * @author Nicola Asuni - * @since 4.6.005 (2009-04-24) - */ - public function setSignature($signing_cert='', $private_key='', $private_key_password='', $extracerts='', $cert_type=2, $info=array(), $approval='') { - // to create self-signed signature: openssl req -x509 -nodes -days 365000 -newkey rsa:1024 -keyout tcpdf.crt -out tcpdf.crt - // to export crt to p12: openssl pkcs12 -export -in tcpdf.crt -out tcpdf.p12 - // to convert pfx certificate to pem: openssl - // OpenSSL> pkcs12 -in -out -nodes - $this->sign = true; - ++$this->n; - $this->sig_obj_id = $this->n; // signature widget - ++$this->n; // signature object ($this->sig_obj_id + 1) - $this->signature_data = array(); - if (strlen($signing_cert) == 0) { - $this->Error('Please provide a certificate file and password!'); - } - if (strlen($private_key) == 0) { - $private_key = $signing_cert; - } - $this->signature_data['signcert'] = $signing_cert; - $this->signature_data['privkey'] = $private_key; - $this->signature_data['password'] = $private_key_password; - $this->signature_data['extracerts'] = $extracerts; - $this->signature_data['cert_type'] = $cert_type; - $this->signature_data['info'] = $info; - $this->signature_data['approval'] = $approval; - } - - /** - * Set the digital signature appearance (a cliccable rectangle area to get signature properties) - * @param $x (float) Abscissa of the upper-left corner. - * @param $y (float) Ordinate of the upper-left corner. - * @param $w (float) Width of the signature area. - * @param $h (float) Height of the signature area. - * @param $page (int) option page number (if < 0 the current page is used). - * @param $name (string) Name of the signature. - * @public - * @author Nicola Asuni - * @since 5.3.011 (2010-06-17) - */ - public function setSignatureAppearance($x=0, $y=0, $w=0, $h=0, $page=-1, $name='') { - $this->signature_appearance = $this->getSignatureAppearanceArray($x, $y, $w, $h, $page, $name); - } - - /** - * Add an empty digital signature appearance (a cliccable rectangle area to get signature properties) - * @param $x (float) Abscissa of the upper-left corner. - * @param $y (float) Ordinate of the upper-left corner. - * @param $w (float) Width of the signature area. - * @param $h (float) Height of the signature area. - * @param $page (int) option page number (if < 0 the current page is used). - * @param $name (string) Name of the signature. - * @public - * @author Nicola Asuni - * @since 5.9.101 (2011-07-06) - */ - public function addEmptySignatureAppearance($x=0, $y=0, $w=0, $h=0, $page=-1, $name='') { - ++$this->n; - $this->empty_signature_appearance[] = array('objid' => $this->n) + $this->getSignatureAppearanceArray($x, $y, $w, $h, $page, $name); - } - - /** - * Get the array that defines the signature appearance (page and rectangle coordinates). - * @param $x (float) Abscissa of the upper-left corner. - * @param $y (float) Ordinate of the upper-left corner. - * @param $w (float) Width of the signature area. - * @param $h (float) Height of the signature area. - * @param $page (int) option page number (if < 0 the current page is used). - * @param $name (string) Name of the signature. - * @return (array) Array defining page and rectangle coordinates of signature appearance. - * @protected - * @author Nicola Asuni - * @since 5.9.101 (2011-07-06) - */ - protected function getSignatureAppearanceArray($x=0, $y=0, $w=0, $h=0, $page=-1, $name='') { - $sigapp = array(); - if (($page < 1) OR ($page > $this->numpages)) { - $sigapp['page'] = $this->page; - } else { - $sigapp['page'] = intval($page); - } - if (empty($name)) { - $sigapp['name'] = 'Signature'; - } else { - $sigapp['name'] = $name; - } - $a = $x * $this->k; - $b = $this->pagedim[($sigapp['page'])]['h'] - (($y + $h) * $this->k); - $c = $w * $this->k; - $d = $h * $this->k; - $sigapp['rect'] = sprintf('%F %F %F %F', $a, $b, ($a + $c), ($b + $d)); - return $sigapp; - } - - /** - * Enable document timestamping (requires the OpenSSL Library). - * The trusted timestamping improve document security that means that no one should be able to change the document once it has been recorded. - * Use with digital signature only! - * @param $tsa_host (string) Time Stamping Authority (TSA) server (prefixed with 'https://') - * @param $tsa_username (string) Specifies the username for TSA authorization (optional) OR specifies the TSA authorization PEM file (see: example_66.php, optional) - * @param $tsa_password (string) Specifies the password for TSA authorization (optional) - * @param $tsa_cert (string) Specifies the location of TSA certificate for authorization (optional for cURL) - * @public - * @author Richard Stockinger - * @since 6.0.090 (2014-06-16) - */ - public function setTimeStamp($tsa_host='', $tsa_username='', $tsa_password='', $tsa_cert='') { - $this->tsa_data = array(); - if (!function_exists('curl_init')) { - $this->Error('Please enable cURL PHP extension!'); - } - if (strlen($tsa_host) == 0) { - $this->Error('Please specify the host of Time Stamping Authority (TSA)!'); - } - $this->tsa_data['tsa_host'] = $tsa_host; - if (is_file($tsa_username)) { - $this->tsa_data['tsa_auth'] = $tsa_username; - } else { - $this->tsa_data['tsa_username'] = $tsa_username; - } - $this->tsa_data['tsa_password'] = $tsa_password; - $this->tsa_data['tsa_cert'] = $tsa_cert; - $this->tsa_timestamp = true; - } - - /** - * NOT YET IMPLEMENTED - * Request TSA for a timestamp - * @param $signature (string) Digital signature as binary string - * @return (string) Timestamped digital signature - * @protected - * @author Richard Stockinger - * @since 6.0.090 (2014-06-16) - */ - protected function applyTSA($signature) { - if (!$this->tsa_timestamp) { - return $signature; - } - //@TODO: implement this feature - return $signature; - } - - /** - * Create a new page group. - * NOTE: call this function before calling AddPage() - * @param $page (int) starting group page (leave empty for next page). - * @public - * @since 3.0.000 (2008-03-27) - */ - public function startPageGroup($page='') { - if (empty($page)) { - $page = $this->page + 1; - } - $this->newpagegroup[$page] = sizeof($this->newpagegroup) + 1; - } - - /** - * Set the starting page number. - * @param $num (int) Starting page number. - * @since 5.9.093 (2011-06-16) - * @public - */ - public function setStartingPageNumber($num=1) { - $this->starting_page_number = max(0, intval($num)); - } - - /** - * Returns the string alias used right align page numbers. - * If the current font is unicode type, the returned string wil contain an additional open curly brace. - * @return string - * @since 5.9.099 (2011-06-27) - * @public - */ - public function getAliasRightShift() { - // calculate aproximatively the ratio between widths of aliases and replacements. - $ref = '{'.TCPDF_STATIC::$alias_right_shift.'}{'.TCPDF_STATIC::$alias_tot_pages.'}{'.TCPDF_STATIC::$alias_num_page.'}'; - $rep = str_repeat(' ', $this->GetNumChars($ref)); - $wrep = $this->GetStringWidth($rep); - if ($wrep > 0) { - $wdiff = max(1, ($this->GetStringWidth($ref) / $wrep)); - } else { - $wdiff = 1; - } - $sdiff = sprintf('%F', $wdiff); - $alias = TCPDF_STATIC::$alias_right_shift.$sdiff.'}'; - if ($this->isUnicodeFont()) { - $alias = '{'.$alias; - } - return $alias; - } - - /** - * Returns the string alias used for the total number of pages. - * If the current font is unicode type, the returned string is surrounded by additional curly braces. - * This alias will be replaced by the total number of pages in the document. - * @return string - * @since 4.0.018 (2008-08-08) - * @public - */ - public function getAliasNbPages() { - if ($this->isUnicodeFont()) { - return '{'.TCPDF_STATIC::$alias_tot_pages.'}'; - } - return TCPDF_STATIC::$alias_tot_pages; - } - - /** - * Returns the string alias used for the page number. - * If the current font is unicode type, the returned string is surrounded by additional curly braces. - * This alias will be replaced by the page number. - * @return string - * @since 4.5.000 (2009-01-02) - * @public - */ - public function getAliasNumPage() { - if ($this->isUnicodeFont()) { - return '{'.TCPDF_STATIC::$alias_num_page.'}'; - } - return TCPDF_STATIC::$alias_num_page; - } - - /** - * Return the alias for the total number of pages in the current page group. - * If the current font is unicode type, the returned string is surrounded by additional curly braces. - * This alias will be replaced by the total number of pages in this group. - * @return alias of the current page group - * @public - * @since 3.0.000 (2008-03-27) - */ - public function getPageGroupAlias() { - if ($this->isUnicodeFont()) { - return '{'.TCPDF_STATIC::$alias_group_tot_pages.'}'; - } - return TCPDF_STATIC::$alias_group_tot_pages; - } - - /** - * Return the alias for the page number on the current page group. - * If the current font is unicode type, the returned string is surrounded by additional curly braces. - * This alias will be replaced by the page number (relative to the belonging group). - * @return alias of the current page group - * @public - * @since 4.5.000 (2009-01-02) - */ - public function getPageNumGroupAlias() { - if ($this->isUnicodeFont()) { - return '{'.TCPDF_STATIC::$alias_group_num_page.'}'; - } - return TCPDF_STATIC::$alias_group_num_page; - } - - /** - * Return the current page in the group. - * @return current page in the group - * @public - * @since 3.0.000 (2008-03-27) - */ - public function getGroupPageNo() { - return $this->pagegroups[$this->currpagegroup]; - } - - /** - * Returns the current group page number formatted as a string. - * @public - * @since 4.3.003 (2008-11-18) - * @see PaneNo(), formatPageNumber() - */ - public function getGroupPageNoFormatted() { - return TCPDF_STATIC::formatPageNumber($this->getGroupPageNo()); - } - - /** - * Returns the current page number formatted as a string. - * @public - * @since 4.2.005 (2008-11-06) - * @see PaneNo(), formatPageNumber() - */ - public function PageNoFormatted() { - return TCPDF_STATIC::formatPageNumber($this->PageNo()); - } - - /** - * Put pdf layers. - * @protected - * @since 3.0.000 (2008-03-27) - */ - protected function _putocg() { - if (empty($this->pdflayers)) { - return; - } - foreach ($this->pdflayers as $key => $layer) { - $this->pdflayers[$key]['objid'] = $this->_newobj(); - $out = '<< /Type /OCG'; - $out .= ' /Name '.$this->_textstring($layer['name'], $this->pdflayers[$key]['objid']); - $out .= ' /Usage <<'; - if (isset($layer['print']) AND ($layer['print'] !== NULL)) { - $out .= ' /Print <>'; - } - $out .= ' /View <>'; - $out .= ' >> >>'; - $out .= "\n".'endobj'; - $this->_out($out); - } - } - - /** - * Start a new pdf layer. - * @param $name (string) Layer name (only a-z letters and numbers). Leave empty for automatic name. - * @param $print (boolean|null) Set to TRUE to print this layer, FALSE to not print and NULL to not set this option - * @param $view (boolean) Set to true to view this layer. - * @param $lock (boolean) If true lock the layer - * @public - * @since 5.9.102 (2011-07-13) - */ - public function startLayer($name='', $print=true, $view=true, $lock=true) { - if ($this->state != 2) { - return; - } - $layer = sprintf('LYR%03d', (count($this->pdflayers) + 1)); - if (empty($name)) { - $name = $layer; - } else { - $name = preg_replace('/[^a-zA-Z0-9_\-]/', '', $name); - } - $this->pdflayers[] = array('layer' => $layer, 'name' => $name, 'print' => $print, 'view' => $view, 'lock' => $lock); - $this->openMarkedContent = true; - $this->_out('/OC /'.$layer.' BDC'); - } - - /** - * End the current PDF layer. - * @public - * @since 5.9.102 (2011-07-13) - */ - public function endLayer() { - if ($this->state != 2) { - return; - } - if ($this->openMarkedContent) { - // close existing open marked-content layer - $this->_out('EMC'); - $this->openMarkedContent = false; - } - } - - /** - * Set the visibility of the successive elements. - * This can be useful, for instance, to put a background - * image or color that will show on screen but won't print. - * @param $v (string) visibility mode. Legal values are: all, print, screen or view. - * @public - * @since 3.0.000 (2008-03-27) - */ - public function setVisibility($v) { - if ($this->state != 2) { - return; - } - $this->endLayer(); - switch($v) { - case 'print': { - $this->startLayer('Print', true, false); - break; - } - case 'view': - case 'screen': { - $this->startLayer('View', false, true); - break; - } - case 'all': { - $this->_out(''); - break; - } - default: { - $this->Error('Incorrect visibility: '.$v); - break; - } - } - } - - /** - * Add transparency parameters to the current extgstate - * @param $parms (array) parameters - * @return the number of extgstates - * @protected - * @since 3.0.000 (2008-03-27) - */ - protected function addExtGState($parms) { - if ($this->pdfa_mode) { - // transparencies are not allowed in PDF/A mode - return; - } - // check if this ExtGState already exist - foreach ($this->extgstates as $i => $ext) { - if ($ext['parms'] == $parms) { - if ($this->inxobj) { - // we are inside an XObject template - $this->xobjects[$this->xobjid]['extgstates'][$i] = $ext; - } - // return reference to existing ExtGState - return $i; - } - } - $n = (count($this->extgstates) + 1); - $this->extgstates[$n] = array('parms' => $parms); - if ($this->inxobj) { - // we are inside an XObject template - $this->xobjects[$this->xobjid]['extgstates'][$n] = $this->extgstates[$n]; - } - return $n; - } - - /** - * Add an extgstate - * @param $gs (array) extgstate - * @protected - * @since 3.0.000 (2008-03-27) - */ - protected function setExtGState($gs) { - if ($this->pdfa_mode OR ($this->state != 2)) { - // transparency is not allowed in PDF/A mode - return; - } - $this->_out(sprintf('/GS%d gs', $gs)); - } - - /** - * Put extgstates for object transparency - * @protected - * @since 3.0.000 (2008-03-27) - */ - protected function _putextgstates() { - foreach ($this->extgstates as $i => $ext) { - $this->extgstates[$i]['n'] = $this->_newobj(); - $out = '<< /Type /ExtGState'; - foreach ($ext['parms'] as $k => $v) { - if (is_float($v)) { - $v = sprintf('%F', $v); - } elseif ($v === true) { - $v = 'true'; - } elseif ($v === false) { - $v = 'false'; - } - $out .= ' /'.$k.' '.$v; - } - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - } - } - - /** - * Set overprint mode for stroking (OP) and non-stroking (op) painting operations. - * (Check the "Entries in a Graphics State Parameter Dictionary" on PDF 32000-1:2008). - * @param $stroking (boolean) If true apply overprint for stroking operations. - * @param $nonstroking (boolean) If true apply overprint for painting operations other than stroking. - * @param $mode (integer) Overprint mode: (0 = each source colour component value replaces the value previously painted for the corresponding device colorant; 1 = a tint value of 0.0 for a source colour component shall leave the corresponding component of the previously painted colour unchanged). - * @public - * @since 5.9.152 (2012-03-23) - */ - public function setOverprint($stroking=true, $nonstroking='', $mode=0) { - if ($this->state != 2) { - return; - } - $stroking = $stroking ? true : false; - if (TCPDF_STATIC::empty_string($nonstroking)) { - // default value if not set - $nonstroking = $stroking; - } else { - $nonstroking = $nonstroking ? true : false; - } - if (($mode != 0) AND ($mode != 1)) { - $mode = 0; - } - $this->overprint = array('OP' => $stroking, 'op' => $nonstroking, 'OPM' => $mode); - $gs = $this->addExtGState($this->overprint); - $this->setExtGState($gs); - } - - /** - * Get the overprint mode array (OP, op, OPM). - * (Check the "Entries in a Graphics State Parameter Dictionary" on PDF 32000-1:2008). - * @return array. - * @public - * @since 5.9.152 (2012-03-23) - */ - public function getOverprint() { - return $this->overprint; - } - - /** - * Set alpha for stroking (CA) and non-stroking (ca) operations. - * @param $stroking (float) Alpha value for stroking operations: real value from 0 (transparent) to 1 (opaque). - * @param $bm (string) blend mode, one of the following: Normal, Multiply, Screen, Overlay, Darken, Lighten, ColorDodge, ColorBurn, HardLight, SoftLight, Difference, Exclusion, Hue, Saturation, Color, Luminosity - * @param $nonstroking (float) Alpha value for non-stroking operations: real value from 0 (transparent) to 1 (opaque). - * @param $ais (boolean) - * @public - * @since 3.0.000 (2008-03-27) - */ - public function setAlpha($stroking=1, $bm='Normal', $nonstroking='', $ais=false) { - if ($this->pdfa_mode) { - // transparency is not allowed in PDF/A mode - return; - } - $stroking = floatval($stroking); - if (TCPDF_STATIC::empty_string($nonstroking)) { - // default value if not set - $nonstroking = $stroking; - } else { - $nonstroking = floatval($nonstroking); - } - if ($bm[0] == '/') { - // remove trailing slash - $bm = substr($bm, 1); - } - if (!in_array($bm, array('Normal', 'Multiply', 'Screen', 'Overlay', 'Darken', 'Lighten', 'ColorDodge', 'ColorBurn', 'HardLight', 'SoftLight', 'Difference', 'Exclusion', 'Hue', 'Saturation', 'Color', 'Luminosity'))) { - $bm = 'Normal'; - } - $ais = $ais ? true : false; - $this->alpha = array('CA' => $stroking, 'ca' => $nonstroking, 'BM' => '/'.$bm, 'AIS' => $ais); - $gs = $this->addExtGState($this->alpha); - $this->setExtGState($gs); - } - - /** - * Get the alpha mode array (CA, ca, BM, AIS). - * (Check the "Entries in a Graphics State Parameter Dictionary" on PDF 32000-1:2008). - * @return array. - * @public - * @since 5.9.152 (2012-03-23) - */ - public function getAlpha() { - return $this->alpha; - } - - /** - * Set the default JPEG compression quality (1-100) - * @param $quality (int) JPEG quality, integer between 1 and 100 - * @public - * @since 3.0.000 (2008-03-27) - */ - public function setJPEGQuality($quality) { - if (($quality < 1) OR ($quality > 100)) { - $quality = 75; - } - $this->jpeg_quality = intval($quality); - } - - /** - * Set the default number of columns in a row for HTML tables. - * @param $cols (int) number of columns - * @public - * @since 3.0.014 (2008-06-04) - */ - public function setDefaultTableColumns($cols=4) { - $this->default_table_columns = intval($cols); - } - - /** - * Set the height of the cell (line height) respect the font height. - * @param $h (int) cell proportion respect font height (typical value = 1.25). - * @public - * @since 3.0.014 (2008-06-04) - */ - public function setCellHeightRatio($h) { - $this->cell_height_ratio = $h; - } - - /** - * return the height of cell repect font height. - * @public - * @since 4.0.012 (2008-07-24) - */ - public function getCellHeightRatio() { - return $this->cell_height_ratio; - } - - /** - * Set the PDF version (check PDF reference for valid values). - * @param $version (string) PDF document version. - * @public - * @since 3.1.000 (2008-06-09) - */ - public function setPDFVersion($version='1.7') { - if ($this->pdfa_mode) { - // PDF/A mode - $this->PDFVersion = '1.4'; - } else { - $this->PDFVersion = $version; - } - } - - /** - * Set the viewer preferences dictionary controlling the way the document is to be presented on the screen or in print. - * (see Section 8.1 of PDF reference, "Viewer Preferences"). - *
          • HideToolbar boolean (Optional) A flag specifying whether to hide the viewer application's tool bars when the document is active. Default value: false.
          • HideMenubar boolean (Optional) A flag specifying whether to hide the viewer application's menu bar when the document is active. Default value: false.
          • HideWindowUI boolean (Optional) A flag specifying whether to hide user interface elements in the document's window (such as scroll bars and navigation controls), leaving only the document's contents displayed. Default value: false.
          • FitWindow boolean (Optional) A flag specifying whether to resize the document's window to fit the size of the first displayed page. Default value: false.
          • CenterWindow boolean (Optional) A flag specifying whether to position the document's window in the center of the screen. Default value: false.
          • DisplayDocTitle boolean (Optional; PDF 1.4) A flag specifying whether the window's title bar should display the document title taken from the Title entry of the document information dictionary (see Section 10.2.1, "Document Information Dictionary"). If false, the title bar should instead display the name of the PDF file containing the document. Default value: false.
          • NonFullScreenPageMode name (Optional) The document's page mode, specifying how to display the document on exiting full-screen mode:
            • UseNone Neither document outline nor thumbnail images visible
            • UseOutlines Document outline visible
            • UseThumbs Thumbnail images visible
            • UseOC Optional content group panel visible
            This entry is meaningful only if the value of the PageMode entry in the catalog dictionary (see Section 3.6.1, "Document Catalog") is FullScreen; it is ignored otherwise. Default value: UseNone.
          • ViewArea name (Optional; PDF 1.4) The name of the page boundary representing the area of a page to be displayed when viewing the document on the screen. Valid values are (see Section 10.10.1, "Page Boundaries").:
            • MediaBox
            • CropBox (default)
            • BleedBox
            • TrimBox
            • ArtBox
          • ViewClip name (Optional; PDF 1.4) The name of the page boundary to which the contents of a page are to be clipped when viewing the document on the screen. Valid values are (see Section 10.10.1, "Page Boundaries").:
            • MediaBox
            • CropBox (default)
            • BleedBox
            • TrimBox
            • ArtBox
          • PrintArea name (Optional; PDF 1.4) The name of the page boundary representing the area of a page to be rendered when printing the document. Valid values are (see Section 10.10.1, "Page Boundaries").:
            • MediaBox
            • CropBox (default)
            • BleedBox
            • TrimBox
            • ArtBox
          • PrintClip name (Optional; PDF 1.4) The name of the page boundary to which the contents of a page are to be clipped when printing the document. Valid values are (see Section 10.10.1, "Page Boundaries").:
            • MediaBox
            • CropBox (default)
            • BleedBox
            • TrimBox
            • ArtBox
          • PrintScaling name (Optional; PDF 1.6) The page scaling option to be selected when a print dialog is displayed for this document. Valid values are:
            • None, which indicates that the print dialog should reflect no page scaling
            • AppDefault (default), which indicates that applications should use the current print scaling
          • Duplex name (Optional; PDF 1.7) The paper handling option to use when printing the file from the print dialog. The following values are valid:
            • Simplex - Print single-sided
            • DuplexFlipShortEdge - Duplex and flip on the short edge of the sheet
            • DuplexFlipLongEdge - Duplex and flip on the long edge of the sheet
            Default value: none
          • PickTrayByPDFSize boolean (Optional; PDF 1.7) A flag specifying whether the PDF page size is used to select the input paper tray. This setting influences only the preset values used to populate the print dialog presented by a PDF viewer application. If PickTrayByPDFSize is true, the check box in the print dialog associated with input paper tray is checked. Note: This setting has no effect on Mac OS systems, which do not provide the ability to pick the input tray by size.
          • PrintPageRange array (Optional; PDF 1.7) The page numbers used to initialize the print dialog box when the file is printed. The first page of the PDF file is denoted by 1. Each pair consists of the first and last pages in the sub-range. An odd number of integers causes this entry to be ignored. Negative numbers cause the entire array to be ignored. Default value: as defined by PDF viewer application
          • NumCopies integer (Optional; PDF 1.7) The number of copies to be printed when the print dialog is opened for this file. Supported values are the integers 2 through 5. Values outside this range are ignored. Default value: as defined by PDF viewer application, but typically 1
          - * @param $preferences (array) array of options. - * @author Nicola Asuni - * @public - * @since 3.1.000 (2008-06-09) - */ - public function setViewerPreferences($preferences) { - $this->viewer_preferences = $preferences; - } - - /** - * Paints color transition registration bars - * @param $x (float) abscissa of the top left corner of the rectangle. - * @param $y (float) ordinate of the top left corner of the rectangle. - * @param $w (float) width of the rectangle. - * @param $h (float) height of the rectangle. - * @param $transition (boolean) if true prints tcolor transitions to white. - * @param $vertical (boolean) if true prints bar vertically. - * @param $colors (string) colors to print separated by comma. Valid values are: A,W,R,G,B,C,M,Y,K,RGB,CMYK,ALL,ALLSPOT,. Where: A = grayscale black, W = grayscale white, R = RGB red, G RGB green, B RGB blue, C = CMYK cyan, M = CMYK magenta, Y = CMYK yellow, K = CMYK key/black, RGB = RGB registration color, CMYK = CMYK registration color, ALL = Spot registration color, ALLSPOT = print all defined spot colors, = name of the spot color to print. - * @author Nicola Asuni - * @since 4.9.000 (2010-03-26) - * @public - */ - public function colorRegistrationBar($x, $y, $w, $h, $transition=true, $vertical=false, $colors='A,R,G,B,C,M,Y,K') { - if (strpos($colors, 'ALLSPOT') !== false) { - // expand spot colors - $spot_colors = ''; - foreach ($this->spot_colors as $spot_color_name => $v) { - $spot_colors .= ','.$spot_color_name; - } - if (!empty($spot_colors)) { - $spot_colors = substr($spot_colors, 1); - $colors = str_replace('ALLSPOT', $spot_colors, $colors); - } else { - $colors = str_replace('ALLSPOT', 'NONE', $colors); - } - } - $bars = explode(',', $colors); - $numbars = count($bars); // number of bars to print - if ($numbars <= 0) { - return; - } - // set bar measures - if ($vertical) { - $coords = array(0, 0, 0, 1); - $wb = $w / $numbars; // bar width - $hb = $h; // bar height - $xd = $wb; // delta x - $yd = 0; // delta y - } else { - $coords = array(1, 0, 0, 0); - $wb = $w; // bar width - $hb = $h / $numbars; // bar height - $xd = 0; // delta x - $yd = $hb; // delta y - } - $xb = $x; - $yb = $y; - foreach ($bars as $col) { - switch ($col) { - // set transition colors - case 'A': { // BLACK (GRAYSCALE) - $col_a = array(255); - $col_b = array(0); - break; - } - case 'W': { // WHITE (GRAYSCALE) - $col_a = array(0); - $col_b = array(255); - break; - } - case 'R': { // RED (RGB) - $col_a = array(255,255,255); - $col_b = array(255,0,0); - break; - } - case 'G': { // GREEN (RGB) - $col_a = array(255,255,255); - $col_b = array(0,255,0); - break; - } - case 'B': { // BLUE (RGB) - $col_a = array(255,255,255); - $col_b = array(0,0,255); - break; - } - case 'C': { // CYAN (CMYK) - $col_a = array(0,0,0,0); - $col_b = array(100,0,0,0); - break; - } - case 'M': { // MAGENTA (CMYK) - $col_a = array(0,0,0,0); - $col_b = array(0,100,0,0); - break; - } - case 'Y': { // YELLOW (CMYK) - $col_a = array(0,0,0,0); - $col_b = array(0,0,100,0); - break; - } - case 'K': { // KEY - BLACK (CMYK) - $col_a = array(0,0,0,0); - $col_b = array(0,0,0,100); - break; - } - case 'RGB': { // BLACK REGISTRATION (RGB) - $col_a = array(255,255,255); - $col_b = array(0,0,0); - break; - } - case 'CMYK': { // BLACK REGISTRATION (CMYK) - $col_a = array(0,0,0,0); - $col_b = array(100,100,100,100); - break; - } - case 'ALL': { // SPOT COLOR REGISTRATION - $col_a = array(0,0,0,0,'None'); - $col_b = array(100,100,100,100,'All'); - break; - } - case 'NONE': { // SKIP THIS COLOR - $col_a = array(0,0,0,0,'None'); - $col_b = array(0,0,0,0,'None'); - break; - } - default: { // SPECIFIC SPOT COLOR NAME - $col_a = array(0,0,0,0,'None'); - $col_b = TCPDF_COLORS::getSpotColor($col, $this->spot_colors); - if ($col_b === false) { - // in case of error defaults to the registration color - $col_b = array(100,100,100,100,'All'); - } - break; - } - } - if ($col != 'NONE') { - if ($transition) { - // color gradient - $this->LinearGradient($xb, $yb, $wb, $hb, $col_a, $col_b, $coords); - } else { - $this->SetFillColorArray($col_b); - // colored rectangle - $this->Rect($xb, $yb, $wb, $hb, 'F', array()); - } - $xb += $xd; - $yb += $yd; - } - } - } - - /** - * Paints crop marks. - * @param $x (float) abscissa of the crop mark center. - * @param $y (float) ordinate of the crop mark center. - * @param $w (float) width of the crop mark. - * @param $h (float) height of the crop mark. - * @param $type (string) type of crop mark, one symbol per type separated by comma: T = TOP, F = BOTTOM, L = LEFT, R = RIGHT, TL = A = TOP-LEFT, TR = B = TOP-RIGHT, BL = C = BOTTOM-LEFT, BR = D = BOTTOM-RIGHT. - * @param $color (array) crop mark color (default spot registration color). - * @author Nicola Asuni - * @since 4.9.000 (2010-03-26) - * @public - */ - public function cropMark($x, $y, $w, $h, $type='T,R,B,L', $color=array(100,100,100,100,'All')) { - $this->SetLineStyle(array('width' => (0.5 / $this->k), 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => $color)); - $type = strtoupper($type); - $type = preg_replace('/[^A-Z\-\,]*/', '', $type); - // split type in single components - $type = str_replace('-', ',', $type); - $type = str_replace('TL', 'T,L', $type); - $type = str_replace('TR', 'T,R', $type); - $type = str_replace('BL', 'F,L', $type); - $type = str_replace('BR', 'F,R', $type); - $type = str_replace('A', 'T,L', $type); - $type = str_replace('B', 'T,R', $type); - $type = str_replace('T,RO', 'BO', $type); - $type = str_replace('C', 'F,L', $type); - $type = str_replace('D', 'F,R', $type); - $crops = explode(',', strtoupper($type)); - // remove duplicates - $crops = array_unique($crops); - $dw = ($w / 4); // horizontal space to leave before the intersection point - $dh = ($h / 4); // vertical space to leave before the intersection point - foreach ($crops as $crop) { - switch ($crop) { - case 'T': - case 'TOP': { - $x1 = $x; - $y1 = ($y - $h); - $x2 = $x; - $y2 = ($y - $dh); - break; - } - case 'F': - case 'BOTTOM': { - $x1 = $x; - $y1 = ($y + $dh); - $x2 = $x; - $y2 = ($y + $h); - break; - } - case 'L': - case 'LEFT': { - $x1 = ($x - $w); - $y1 = $y; - $x2 = ($x - $dw); - $y2 = $y; - break; - } - case 'R': - case 'RIGHT': { - $x1 = ($x + $dw); - $y1 = $y; - $x2 = ($x + $w); - $y2 = $y; - break; - } - } - $this->Line($x1, $y1, $x2, $y2); - } - } - - /** - * Paints a registration mark - * @param $x (float) abscissa of the registration mark center. - * @param $y (float) ordinate of the registration mark center. - * @param $r (float) radius of the crop mark. - * @param $double (boolean) if true print two concentric crop marks. - * @param $cola (array) crop mark color (default spot registration color 'All'). - * @param $colb (array) second crop mark color (default spot registration color 'None'). - * @author Nicola Asuni - * @since 4.9.000 (2010-03-26) - * @public - */ - public function registrationMark($x, $y, $r, $double=false, $cola=array(100,100,100,100,'All'), $colb=array(0,0,0,0,'None')) { - $line_style = array('width' => max((0.5 / $this->k),($r / 30)), 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => $cola); - $this->SetFillColorArray($cola); - $this->PieSector($x, $y, $r, 90, 180, 'F'); - $this->PieSector($x, $y, $r, 270, 360, 'F'); - $this->Circle($x, $y, $r, 0, 360, 'C', $line_style, array(), 8); - if ($double) { - $ri = $r * 0.5; - $this->SetFillColorArray($colb); - $this->PieSector($x, $y, $ri, 90, 180, 'F'); - $this->PieSector($x, $y, $ri, 270, 360, 'F'); - $this->SetFillColorArray($cola); - $this->PieSector($x, $y, $ri, 0, 90, 'F'); - $this->PieSector($x, $y, $ri, 180, 270, 'F'); - $this->Circle($x, $y, $ri, 0, 360, 'C', $line_style, array(), 8); - } - } - - /** - * Paints a CMYK registration mark - * @param $x (float) abscissa of the registration mark center. - * @param $y (float) ordinate of the registration mark center. - * @param $r (float) radius of the crop mark. - * @author Nicola Asuni - * @since 6.0.038 (2013-09-30) - * @public - */ - public function registrationMarkCMYK($x, $y, $r) { - // line width - $lw = max((0.5 / $this->k),($r / 8)); - // internal radius - $ri = ($r * 0.6); - // external radius - $re = ($r * 1.3); - // Cyan - $this->SetFillColorArray(array(100,0,0,0)); - $this->PieSector($x, $y, $ri, 270, 360, 'F'); - // Magenta - $this->SetFillColorArray(array(0,100,0,0)); - $this->PieSector($x, $y, $ri, 0, 90, 'F'); - // Yellow - $this->SetFillColorArray(array(0,0,100,0)); - $this->PieSector($x, $y, $ri, 90, 180, 'F'); - // Key - black - $this->SetFillColorArray(array(0,0,0,100)); - $this->PieSector($x, $y, $ri, 180, 270, 'F'); - // registration color - $line_style = array('width' => $lw, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(100,100,100,100,'All')); - $this->SetFillColorArray(array(100,100,100,100,'All')); - // external circle - $this->Circle($x, $y, $r, 0, 360, 'C', $line_style, array(), 8); - // cross lines - $this->Line($x, ($y - $re), $x, ($y - $ri)); - $this->Line($x, ($y + $ri), $x, ($y + $re)); - $this->Line(($x - $re), $y, ($x - $ri), $y); - $this->Line(($x + $ri), $y, ($x + $re), $y); - } - - /** - * Paints a linear colour gradient. - * @param $x (float) abscissa of the top left corner of the rectangle. - * @param $y (float) ordinate of the top left corner of the rectangle. - * @param $w (float) width of the rectangle. - * @param $h (float) height of the rectangle. - * @param $col1 (array) first color (Grayscale, RGB or CMYK components). - * @param $col2 (array) second color (Grayscale, RGB or CMYK components). - * @param $coords (array) array of the form (x1, y1, x2, y2) which defines the gradient vector (see linear_gradient_coords.jpg). The default value is from left to right (x1=0, y1=0, x2=1, y2=0). - * @author Andreas W\FCrmser, Nicola Asuni - * @since 3.1.000 (2008-06-09) - * @public - */ - public function LinearGradient($x, $y, $w, $h, $col1=array(), $col2=array(), $coords=array(0,0,1,0)) { - $this->Clip($x, $y, $w, $h); - $this->Gradient(2, $coords, array(array('color' => $col1, 'offset' => 0, 'exponent' => 1), array('color' => $col2, 'offset' => 1, 'exponent' => 1)), array(), false); - } - - /** - * Paints a radial colour gradient. - * @param $x (float) abscissa of the top left corner of the rectangle. - * @param $y (float) ordinate of the top left corner of the rectangle. - * @param $w (float) width of the rectangle. - * @param $h (float) height of the rectangle. - * @param $col1 (array) first color (Grayscale, RGB or CMYK components). - * @param $col2 (array) second color (Grayscale, RGB or CMYK components). - * @param $coords (array) array of the form (fx, fy, cx, cy, r) where (fx, fy) is the starting point of the gradient with color1, (cx, cy) is the center of the circle with color2, and r is the radius of the circle (see radial_gradient_coords.jpg). (fx, fy) should be inside the circle, otherwise some areas will not be defined. - * @author Andreas W\FCrmser, Nicola Asuni - * @since 3.1.000 (2008-06-09) - * @public - */ - public function RadialGradient($x, $y, $w, $h, $col1=array(), $col2=array(), $coords=array(0.5,0.5,0.5,0.5,1)) { - $this->Clip($x, $y, $w, $h); - $this->Gradient(3, $coords, array(array('color' => $col1, 'offset' => 0, 'exponent' => 1), array('color' => $col2, 'offset' => 1, 'exponent' => 1)), array(), false); - } - - /** - * Paints a coons patch mesh. - * @param $x (float) abscissa of the top left corner of the rectangle. - * @param $y (float) ordinate of the top left corner of the rectangle. - * @param $w (float) width of the rectangle. - * @param $h (float) height of the rectangle. - * @param $col1 (array) first color (lower left corner) (RGB components). - * @param $col2 (array) second color (lower right corner) (RGB components). - * @param $col3 (array) third color (upper right corner) (RGB components). - * @param $col4 (array) fourth color (upper left corner) (RGB components). - * @param $coords (array)
          • for one patch mesh: array(float x1, float y1, .... float x12, float y12): 12 pairs of coordinates (normally from 0 to 1) which specify the Bezier control points that define the patch. First pair is the lower left edge point, next is its right control point (control point 2). Then the other points are defined in the order: control point 1, edge point, control point 2 going counter-clockwise around the patch. Last (x12, y12) is the first edge point's left control point (control point 1).
          • for two or more patch meshes: array[number of patches]: arrays with the following keys for each patch: f: where to put that patch (0 = first patch, 1, 2, 3 = right, top and left of precedent patch - I didn't figure this out completely - just try and error ;-) points: 12 pairs of coordinates of the Bezier control points as above for the first patch, 8 pairs of coordinates for the following patches, ignoring the coordinates already defined by the precedent patch (I also didn't figure out the order of these - also: try and see what's happening) colors: must be 4 colors for the first patch, 2 colors for the following patches
          - * @param $coords_min (array) minimum value used by the coordinates. If a coordinate's value is smaller than this it will be cut to coords_min. default: 0 - * @param $coords_max (array) maximum value used by the coordinates. If a coordinate's value is greater than this it will be cut to coords_max. default: 1 - * @param $antialias (boolean) A flag indicating whether to filter the shading function to prevent aliasing artifacts. - * @author Andreas W\FCrmser, Nicola Asuni - * @since 3.1.000 (2008-06-09) - * @public - */ - public function CoonsPatchMesh($x, $y, $w, $h, $col1=array(), $col2=array(), $col3=array(), $col4=array(), $coords=array(0.00,0.0,0.33,0.00,0.67,0.00,1.00,0.00,1.00,0.33,1.00,0.67,1.00,1.00,0.67,1.00,0.33,1.00,0.00,1.00,0.00,0.67,0.00,0.33), $coords_min=0, $coords_max=1, $antialias=false) { - if ($this->pdfa_mode OR ($this->state != 2)) { - return; - } - $this->Clip($x, $y, $w, $h); - $n = count($this->gradients) + 1; - $this->gradients[$n] = array(); - $this->gradients[$n]['type'] = 6; //coons patch mesh - $this->gradients[$n]['coords'] = array(); - $this->gradients[$n]['antialias'] = $antialias; - $this->gradients[$n]['colors'] = array(); - $this->gradients[$n]['transparency'] = false; - //check the coords array if it is the simple array or the multi patch array - if (!isset($coords[0]['f'])) { - //simple array -> convert to multi patch array - if (!isset($col1[1])) { - $col1[1] = $col1[2] = $col1[0]; - } - if (!isset($col2[1])) { - $col2[1] = $col2[2] = $col2[0]; - } - if (!isset($col3[1])) { - $col3[1] = $col3[2] = $col3[0]; - } - if (!isset($col4[1])) { - $col4[1] = $col4[2] = $col4[0]; - } - $patch_array[0]['f'] = 0; - $patch_array[0]['points'] = $coords; - $patch_array[0]['colors'][0]['r'] = $col1[0]; - $patch_array[0]['colors'][0]['g'] = $col1[1]; - $patch_array[0]['colors'][0]['b'] = $col1[2]; - $patch_array[0]['colors'][1]['r'] = $col2[0]; - $patch_array[0]['colors'][1]['g'] = $col2[1]; - $patch_array[0]['colors'][1]['b'] = $col2[2]; - $patch_array[0]['colors'][2]['r'] = $col3[0]; - $patch_array[0]['colors'][2]['g'] = $col3[1]; - $patch_array[0]['colors'][2]['b'] = $col3[2]; - $patch_array[0]['colors'][3]['r'] = $col4[0]; - $patch_array[0]['colors'][3]['g'] = $col4[1]; - $patch_array[0]['colors'][3]['b'] = $col4[2]; - } else { - //multi patch array - $patch_array = $coords; - } - $bpcd = 65535; //16 bits per coordinate - //build the data stream - $this->gradients[$n]['stream'] = ''; - $count_patch = count($patch_array); - for ($i=0; $i < $count_patch; ++$i) { - $this->gradients[$n]['stream'] .= chr($patch_array[$i]['f']); //start with the edge flag as 8 bit - $count_points = count($patch_array[$i]['points']); - for ($j=0; $j < $count_points; ++$j) { - //each point as 16 bit - $patch_array[$i]['points'][$j] = (($patch_array[$i]['points'][$j] - $coords_min) / ($coords_max - $coords_min)) * $bpcd; - if ($patch_array[$i]['points'][$j] < 0) { - $patch_array[$i]['points'][$j] = 0; - } - if ($patch_array[$i]['points'][$j] > $bpcd) { - $patch_array[$i]['points'][$j] = $bpcd; - } - $this->gradients[$n]['stream'] .= chr(floor($patch_array[$i]['points'][$j] / 256)); - $this->gradients[$n]['stream'] .= chr(floor($patch_array[$i]['points'][$j] % 256)); - } - $count_cols = count($patch_array[$i]['colors']); - for ($j=0; $j < $count_cols; ++$j) { - //each color component as 8 bit - $this->gradients[$n]['stream'] .= chr($patch_array[$i]['colors'][$j]['r']); - $this->gradients[$n]['stream'] .= chr($patch_array[$i]['colors'][$j]['g']); - $this->gradients[$n]['stream'] .= chr($patch_array[$i]['colors'][$j]['b']); - } - } - //paint the gradient - $this->_out('/Sh'.$n.' sh'); - //restore previous Graphic State - $this->_outRestoreGraphicsState(); - if ($this->inxobj) { - // we are inside an XObject template - $this->xobjects[$this->xobjid]['gradients'][$n] = $this->gradients[$n]; - } - } - - /** - * Set a rectangular clipping area. - * @param $x (float) abscissa of the top left corner of the rectangle (or top right corner for RTL mode). - * @param $y (float) ordinate of the top left corner of the rectangle. - * @param $w (float) width of the rectangle. - * @param $h (float) height of the rectangle. - * @author Andreas W\FCrmser, Nicola Asuni - * @since 3.1.000 (2008-06-09) - * @protected - */ - protected function Clip($x, $y, $w, $h) { - if ($this->state != 2) { - return; - } - if ($this->rtl) { - $x = $this->w - $x - $w; - } - //save current Graphic State - $s = 'q'; - //set clipping area - $s .= sprintf(' %F %F %F %F re W n', $x*$this->k, ($this->h-$y)*$this->k, $w*$this->k, -$h*$this->k); - //set up transformation matrix for gradient - $s .= sprintf(' %F 0 0 %F %F %F cm', $w*$this->k, $h*$this->k, $x*$this->k, ($this->h-($y+$h))*$this->k); - $this->_out($s); - } - - /** - * Output gradient. - * @param $type (int) type of gradient (1 Function-based shading; 2 Axial shading; 3 Radial shading; 4 Free-form Gouraud-shaded triangle mesh; 5 Lattice-form Gouraud-shaded triangle mesh; 6 Coons patch mesh; 7 Tensor-product patch mesh). (Not all types are currently supported) - * @param $coords (array) array of coordinates. - * @param $stops (array) array gradient color components: color = array of GRAY, RGB or CMYK color components; offset = (0 to 1) represents a location along the gradient vector; exponent = exponent of the exponential interpolation function (default = 1). - * @param $background (array) An array of colour components appropriate to the colour space, specifying a single background colour value. - * @param $antialias (boolean) A flag indicating whether to filter the shading function to prevent aliasing artifacts. - * @author Nicola Asuni - * @since 3.1.000 (2008-06-09) - * @public - */ - public function Gradient($type, $coords, $stops, $background=array(), $antialias=false) { - if ($this->pdfa_mode OR ($this->state != 2)) { - return; - } - $n = count($this->gradients) + 1; - $this->gradients[$n] = array(); - $this->gradients[$n]['type'] = $type; - $this->gradients[$n]['coords'] = $coords; - $this->gradients[$n]['antialias'] = $antialias; - $this->gradients[$n]['colors'] = array(); - $this->gradients[$n]['transparency'] = false; - // color space - $numcolspace = count($stops[0]['color']); - $bcolor = array_values($background); - switch($numcolspace) { - case 5: // SPOT - case 4: { // CMYK - $this->gradients[$n]['colspace'] = 'DeviceCMYK'; - if (!empty($background)) { - $this->gradients[$n]['background'] = sprintf('%F %F %F %F', $bcolor[0]/100, $bcolor[1]/100, $bcolor[2]/100, $bcolor[3]/100); - } - break; - } - case 3: { // RGB - $this->gradients[$n]['colspace'] = 'DeviceRGB'; - if (!empty($background)) { - $this->gradients[$n]['background'] = sprintf('%F %F %F', $bcolor[0]/255, $bcolor[1]/255, $bcolor[2]/255); - } - break; - } - case 1: { // GRAY SCALE - $this->gradients[$n]['colspace'] = 'DeviceGray'; - if (!empty($background)) { - $this->gradients[$n]['background'] = sprintf('%F', $bcolor[0]/255); - } - break; - } - } - $num_stops = count($stops); - $last_stop_id = $num_stops - 1; - foreach ($stops as $key => $stop) { - $this->gradients[$n]['colors'][$key] = array(); - // offset represents a location along the gradient vector - if (isset($stop['offset'])) { - $this->gradients[$n]['colors'][$key]['offset'] = $stop['offset']; - } else { - if ($key == 0) { - $this->gradients[$n]['colors'][$key]['offset'] = 0; - } elseif ($key == $last_stop_id) { - $this->gradients[$n]['colors'][$key]['offset'] = 1; - } else { - $offsetstep = (1 - $this->gradients[$n]['colors'][($key - 1)]['offset']) / ($num_stops - $key); - $this->gradients[$n]['colors'][$key]['offset'] = $this->gradients[$n]['colors'][($key - 1)]['offset'] + $offsetstep; - } - } - if (isset($stop['opacity'])) { - $this->gradients[$n]['colors'][$key]['opacity'] = $stop['opacity']; - if ((!$this->pdfa_mode) AND ($stop['opacity'] < 1)) { - $this->gradients[$n]['transparency'] = true; - } - } else { - $this->gradients[$n]['colors'][$key]['opacity'] = 1; - } - // exponent for the exponential interpolation function - if (isset($stop['exponent'])) { - $this->gradients[$n]['colors'][$key]['exponent'] = $stop['exponent']; - } else { - $this->gradients[$n]['colors'][$key]['exponent'] = 1; - } - // set colors - $color = array_values($stop['color']); - switch($numcolspace) { - case 5: // SPOT - case 4: { // CMYK - $this->gradients[$n]['colors'][$key]['color'] = sprintf('%F %F %F %F', $color[0]/100, $color[1]/100, $color[2]/100, $color[3]/100); - break; - } - case 3: { // RGB - $this->gradients[$n]['colors'][$key]['color'] = sprintf('%F %F %F', $color[0]/255, $color[1]/255, $color[2]/255); - break; - } - case 1: { // GRAY SCALE - $this->gradients[$n]['colors'][$key]['color'] = sprintf('%F', $color[0]/255); - break; - } - } - } - if ($this->gradients[$n]['transparency']) { - // paint luminosity gradient - $this->_out('/TGS'.$n.' gs'); - } - //paint the gradient - $this->_out('/Sh'.$n.' sh'); - //restore previous Graphic State - $this->_outRestoreGraphicsState(); - if ($this->inxobj) { - // we are inside an XObject template - $this->xobjects[$this->xobjid]['gradients'][$n] = $this->gradients[$n]; - } - } - - /** - * Output gradient shaders. - * @author Nicola Asuni - * @since 3.1.000 (2008-06-09) - * @protected - */ - function _putshaders() { - if ($this->pdfa_mode) { - return; - } - $idt = count($this->gradients); //index for transparency gradients - foreach ($this->gradients as $id => $grad) { - if (($grad['type'] == 2) OR ($grad['type'] == 3)) { - $fc = $this->_newobj(); - $out = '<<'; - $out .= ' /FunctionType 3'; - $out .= ' /Domain [0 1]'; - $functions = ''; - $bounds = ''; - $encode = ''; - $i = 1; - $num_cols = count($grad['colors']); - $lastcols = $num_cols - 1; - for ($i = 1; $i < $num_cols; ++$i) { - $functions .= ($fc + $i).' 0 R '; - if ($i < $lastcols) { - $bounds .= sprintf('%F ', $grad['colors'][$i]['offset']); - } - $encode .= '0 1 '; - } - $out .= ' /Functions ['.trim($functions).']'; - $out .= ' /Bounds ['.trim($bounds).']'; - $out .= ' /Encode ['.trim($encode).']'; - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - for ($i = 1; $i < $num_cols; ++$i) { - $this->_newobj(); - $out = '<<'; - $out .= ' /FunctionType 2'; - $out .= ' /Domain [0 1]'; - $out .= ' /C0 ['.$grad['colors'][($i - 1)]['color'].']'; - $out .= ' /C1 ['.$grad['colors'][$i]['color'].']'; - $out .= ' /N '.$grad['colors'][$i]['exponent']; - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - } - // set transparency functions - if ($grad['transparency']) { - $ft = $this->_newobj(); - $out = '<<'; - $out .= ' /FunctionType 3'; - $out .= ' /Domain [0 1]'; - $functions = ''; - $i = 1; - $num_cols = count($grad['colors']); - for ($i = 1; $i < $num_cols; ++$i) { - $functions .= ($ft + $i).' 0 R '; - } - $out .= ' /Functions ['.trim($functions).']'; - $out .= ' /Bounds ['.trim($bounds).']'; - $out .= ' /Encode ['.trim($encode).']'; - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - for ($i = 1; $i < $num_cols; ++$i) { - $this->_newobj(); - $out = '<<'; - $out .= ' /FunctionType 2'; - $out .= ' /Domain [0 1]'; - $out .= ' /C0 ['.$grad['colors'][($i - 1)]['opacity'].']'; - $out .= ' /C1 ['.$grad['colors'][$i]['opacity'].']'; - $out .= ' /N '.$grad['colors'][$i]['exponent']; - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - } - } - } - // set shading object - $this->_newobj(); - $out = '<< /ShadingType '.$grad['type']; - if (isset($grad['colspace'])) { - $out .= ' /ColorSpace /'.$grad['colspace']; - } else { - $out .= ' /ColorSpace /DeviceRGB'; - } - if (isset($grad['background']) AND !empty($grad['background'])) { - $out .= ' /Background ['.$grad['background'].']'; - } - if (isset($grad['antialias']) AND ($grad['antialias'] === true)) { - $out .= ' /AntiAlias true'; - } - if ($grad['type'] == 2) { - $out .= ' '.sprintf('/Coords [%F %F %F %F]', $grad['coords'][0], $grad['coords'][1], $grad['coords'][2], $grad['coords'][3]); - $out .= ' /Domain [0 1]'; - $out .= ' /Function '.$fc.' 0 R'; - $out .= ' /Extend [true true]'; - $out .= ' >>'; - } elseif ($grad['type'] == 3) { - //x0, y0, r0, x1, y1, r1 - //at this this time radius of inner circle is 0 - $out .= ' '.sprintf('/Coords [%F %F 0 %F %F %F]', $grad['coords'][0], $grad['coords'][1], $grad['coords'][2], $grad['coords'][3], $grad['coords'][4]); - $out .= ' /Domain [0 1]'; - $out .= ' /Function '.$fc.' 0 R'; - $out .= ' /Extend [true true]'; - $out .= ' >>'; - } elseif ($grad['type'] == 6) { - $out .= ' /BitsPerCoordinate 16'; - $out .= ' /BitsPerComponent 8'; - $out .= ' /Decode[0 1 0 1 0 1 0 1 0 1]'; - $out .= ' /BitsPerFlag 8'; - $stream = $this->_getrawstream($grad['stream']); - $out .= ' /Length '.strlen($stream); - $out .= ' >>'; - $out .= ' stream'."\n".$stream."\n".'endstream'; - } - $out .= "\n".'endobj'; - $this->_out($out); - if ($grad['transparency']) { - $shading_transparency = preg_replace('/\/ColorSpace \/[^\s]+/si', '/ColorSpace /DeviceGray', $out); - $shading_transparency = preg_replace('/\/Function [0-9]+ /si', '/Function '.$ft.' ', $shading_transparency); - } - $this->gradients[$id]['id'] = $this->n; - // set pattern object - $this->_newobj(); - $out = '<< /Type /Pattern /PatternType 2'; - $out .= ' /Shading '.$this->gradients[$id]['id'].' 0 R'; - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - $this->gradients[$id]['pattern'] = $this->n; - // set shading and pattern for transparency mask - if ($grad['transparency']) { - // luminosity pattern - $idgs = $id + $idt; - $this->_newobj(); - $this->_out($shading_transparency); - $this->gradients[$idgs]['id'] = $this->n; - $this->_newobj(); - $out = '<< /Type /Pattern /PatternType 2'; - $out .= ' /Shading '.$this->gradients[$idgs]['id'].' 0 R'; - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - $this->gradients[$idgs]['pattern'] = $this->n; - // luminosity XObject - $oid = $this->_newobj(); - $this->xobjects['LX'.$oid] = array('n' => $oid); - $filter = ''; - $stream = 'q /a0 gs /Pattern cs /p'.$idgs.' scn 0 0 '.$this->wPt.' '.$this->hPt.' re f Q'; - if ($this->compress) { - $filter = ' /Filter /FlateDecode'; - $stream = gzcompress($stream); - } - $stream = $this->_getrawstream($stream); - $out = '<< /Type /XObject /Subtype /Form /FormType 1'.$filter; - $out .= ' /Length '.strlen($stream); - $rect = sprintf('%F %F', $this->wPt, $this->hPt); - $out .= ' /BBox [0 0 '.$rect.']'; - $out .= ' /Group << /Type /Group /S /Transparency /CS /DeviceGray >>'; - $out .= ' /Resources <<'; - $out .= ' /ExtGState << /a0 << /ca 1 /CA 1 >> >>'; - $out .= ' /Pattern << /p'.$idgs.' '.$this->gradients[$idgs]['pattern'].' 0 R >>'; - $out .= ' >>'; - $out .= ' >> '; - $out .= ' stream'."\n".$stream."\n".'endstream'; - $out .= "\n".'endobj'; - $this->_out($out); - // SMask - $this->_newobj(); - $out = '<< /Type /Mask /S /Luminosity /G '.($this->n - 1).' 0 R >>'."\n".'endobj'; - $this->_out($out); - // ExtGState - $this->_newobj(); - $out = '<< /Type /ExtGState /SMask '.($this->n - 1).' 0 R /AIS false >>'."\n".'endobj'; - $this->_out($out); - $this->extgstates[] = array('n' => $this->n, 'name' => 'TGS'.$id); - } - } - } - - /** - * Draw the sector of a circle. - * It can be used for instance to render pie charts. - * @param $xc (float) abscissa of the center. - * @param $yc (float) ordinate of the center. - * @param $r (float) radius. - * @param $a (float) start angle (in degrees). - * @param $b (float) end angle (in degrees). - * @param $style (string) Style of rendering. See the getPathPaintOperator() function for more information. - * @param $cw: (float) indicates whether to go clockwise (default: true). - * @param $o: (float) origin of angles (0 for 3 o'clock, 90 for noon, 180 for 9 o'clock, 270 for 6 o'clock). Default: 90. - * @author Maxime Delorme, Nicola Asuni - * @since 3.1.000 (2008-06-09) - * @public - */ - public function PieSector($xc, $yc, $r, $a, $b, $style='FD', $cw=true, $o=90) { - $this->PieSectorXY($xc, $yc, $r, $r, $a, $b, $style, $cw, $o); - } - - /** - * Draw the sector of an ellipse. - * It can be used for instance to render pie charts. - * @param $xc (float) abscissa of the center. - * @param $yc (float) ordinate of the center. - * @param $rx (float) the x-axis radius. - * @param $ry (float) the y-axis radius. - * @param $a (float) start angle (in degrees). - * @param $b (float) end angle (in degrees). - * @param $style (string) Style of rendering. See the getPathPaintOperator() function for more information. - * @param $cw: (float) indicates whether to go clockwise. - * @param $o: (float) origin of angles (0 for 3 o'clock, 90 for noon, 180 for 9 o'clock, 270 for 6 o'clock). - * @param $nc (integer) Number of curves used to draw a 90 degrees portion of arc. - * @author Maxime Delorme, Nicola Asuni - * @since 3.1.000 (2008-06-09) - * @public - */ - public function PieSectorXY($xc, $yc, $rx, $ry, $a, $b, $style='FD', $cw=false, $o=0, $nc=2) { - if ($this->state != 2) { - return; - } - if ($this->rtl) { - $xc = ($this->w - $xc); - } - $op = TCPDF_STATIC::getPathPaintOperator($style); - if ($op == 'f') { - $line_style = array(); - } - if ($cw) { - $d = $b; - $b = (360 - $a + $o); - $a = (360 - $d + $o); - } else { - $b += $o; - $a += $o; - } - $this->_outellipticalarc($xc, $yc, $rx, $ry, 0, $a, $b, true, $nc); - $this->_out($op); - } - - /** - * Embed vector-based Adobe Illustrator (AI) or AI-compatible EPS files. - * NOTE: EPS is not yet fully implemented, use the setRasterizeVectorImages() method to enable/disable rasterization of vector images using ImageMagick library. - * Only vector drawing is supported, not text or bitmap. - * Although the script was successfully tested with various AI format versions, best results are probably achieved with files that were exported in the AI3 format (tested with Illustrator CS2, Freehand MX and Photoshop CS2). - * @param $file (string) Name of the file containing the image or a '@' character followed by the EPS/AI data string. - * @param $x (float) Abscissa of the upper-left corner. - * @param $y (float) Ordinate of the upper-left corner. - * @param $w (float) Width of the image in the page. If not specified or equal to zero, it is automatically calculated. - * @param $h (float) Height of the image in the page. If not specified or equal to zero, it is automatically calculated. - * @param $link (mixed) URL or identifier returned by AddLink(). - * @param $useBoundingBox (boolean) specifies whether to position the bounding box (true) or the complete canvas (false) at location (x,y). Default value is true. - * @param $align (string) Indicates the alignment of the pointer next to image insertion relative to image height. The value can be:
          • T: top-right for LTR or top-left for RTL
          • M: middle-right for LTR or middle-left for RTL
          • B: bottom-right for LTR or bottom-left for RTL
          • N: next line
          - * @param $palign (string) Allows to center or align the image on the current line. Possible values are:
          • L : left align
          • C : center
          • R : right align
          • '' : empty string : left for LTR or right for RTL
          - * @param $border (mixed) Indicates if borders must be drawn around the cell. The value can be a number:
          • 0: no border (default)
          • 1: frame
          or a string containing some or all of the following characters (in any order):
          • L: left
          • T: top
          • R: right
          • B: bottom
          or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) - * @param $fitonpage (boolean) if true the image is resized to not exceed page dimensions. - * @param $fixoutvals (boolean) if true remove values outside the bounding box. - * @author Valentin Schmidt, Nicola Asuni - * @since 3.1.000 (2008-06-09) - * @public - */ - public function ImageEps($file, $x='', $y='', $w=0, $h=0, $link='', $useBoundingBox=true, $align='', $palign='', $border=0, $fitonpage=false, $fixoutvals=false) { - if ($this->state != 2) { - return; - } - if ($this->rasterize_vector_images AND ($w > 0) AND ($h > 0)) { - // convert EPS to raster image using GD or ImageMagick libraries - return $this->Image($file, $x, $y, $w, $h, 'EPS', $link, $align, true, 300, $palign, false, false, $border, false, false, $fitonpage); - } - if ($x === '') { - $x = $this->x; - } - if ($y === '') { - $y = $this->y; - } - // check page for no-write regions and adapt page margins if necessary - list($x, $y) = $this->checkPageRegions($h, $x, $y); - $k = $this->k; - if ($file[0] === '@') { // image from string - $data = substr($file, 1); - } else { // EPS/AI file - $data = TCPDF_STATIC::fileGetContents($file); - } - if ($data === FALSE) { - $this->Error('EPS file not found: '.$file); - } - $regs = array(); - // EPS/AI compatibility check (only checks files created by Adobe Illustrator!) - preg_match("/%%Creator:([^\r\n]+)/", $data, $regs); # find Creator - if (count($regs) > 1) { - $version_str = trim($regs[1]); # e.g. "Adobe Illustrator(R) 8.0" - if (strpos($version_str, 'Adobe Illustrator') !== false) { - $versexp = explode(' ', $version_str); - $version = (float)array_pop($versexp); - if ($version >= 9) { - $this->Error('This version of Adobe Illustrator file is not supported: '.$file); - } - } - } - // strip binary bytes in front of PS-header - $start = strpos($data, '%!PS-Adobe'); - if ($start > 0) { - $data = substr($data, $start); - } - // find BoundingBox params - preg_match("/%%BoundingBox:([^\r\n]+)/", $data, $regs); - if (count($regs) > 1) { - list($x1, $y1, $x2, $y2) = explode(' ', trim($regs[1])); - } else { - $this->Error('No BoundingBox found in EPS/AI file: '.$file); - } - $start = strpos($data, '%%EndSetup'); - if ($start === false) { - $start = strpos($data, '%%EndProlog'); - } - if ($start === false) { - $start = strpos($data, '%%BoundingBox'); - } - $data = substr($data, $start); - $end = strpos($data, '%%PageTrailer'); - if ($end===false) { - $end = strpos($data, 'showpage'); - } - if ($end) { - $data = substr($data, 0, $end); - } - // calculate image width and height on document - if (($w <= 0) AND ($h <= 0)) { - $w = ($x2 - $x1) / $k; - $h = ($y2 - $y1) / $k; - } elseif ($w <= 0) { - $w = ($x2-$x1) / $k * ($h / (($y2 - $y1) / $k)); - } elseif ($h <= 0) { - $h = ($y2 - $y1) / $k * ($w / (($x2 - $x1) / $k)); - } - // fit the image on available space - list($w, $h, $x, $y) = $this->fitBlock($w, $h, $x, $y, $fitonpage); - if ($this->rasterize_vector_images) { - // convert EPS to raster image using GD or ImageMagick libraries - return $this->Image($file, $x, $y, $w, $h, 'EPS', $link, $align, true, 300, $palign, false, false, $border, false, false, $fitonpage); - } - // set scaling factors - $scale_x = $w / (($x2 - $x1) / $k); - $scale_y = $h / (($y2 - $y1) / $k); - // set alignment - $this->img_rb_y = $y + $h; - // set alignment - if ($this->rtl) { - if ($palign == 'L') { - $ximg = $this->lMargin; - } elseif ($palign == 'C') { - $ximg = ($this->w + $this->lMargin - $this->rMargin - $w) / 2; - } elseif ($palign == 'R') { - $ximg = $this->w - $this->rMargin - $w; - } else { - $ximg = $x - $w; - } - $this->img_rb_x = $ximg; - } else { - if ($palign == 'L') { - $ximg = $this->lMargin; - } elseif ($palign == 'C') { - $ximg = ($this->w + $this->lMargin - $this->rMargin - $w) / 2; - } elseif ($palign == 'R') { - $ximg = $this->w - $this->rMargin - $w; - } else { - $ximg = $x; - } - $this->img_rb_x = $ximg + $w; - } - if ($useBoundingBox) { - $dx = $ximg * $k - $x1; - $dy = $y * $k - $y1; - } else { - $dx = $ximg * $k; - $dy = $y * $k; - } - // save the current graphic state - $this->_out('q'.$this->epsmarker); - // translate - $this->_out(sprintf('%F %F %F %F %F %F cm', 1, 0, 0, 1, $dx, $dy + ($this->hPt - (2 * $y * $k) - ($y2 - $y1)))); - // scale - if (isset($scale_x)) { - $this->_out(sprintf('%F %F %F %F %F %F cm', $scale_x, 0, 0, $scale_y, $x1 * (1 - $scale_x), $y2 * (1 - $scale_y))); - } - // handle pc/unix/mac line endings - $lines = preg_split('/[\r\n]+/si', $data, -1, PREG_SPLIT_NO_EMPTY); - $u=0; - $cnt = count($lines); - for ($i=0; $i < $cnt; ++$i) { - $line = $lines[$i]; - if (($line == '') OR ($line[0] == '%')) { - continue; - } - $len = strlen($line); - // check for spot color names - $color_name = ''; - if (strcasecmp('x', substr(trim($line), -1)) == 0) { - if (preg_match('/\([^\)]*\)/', $line, $matches) > 0) { - // extract spot color name - $color_name = $matches[0]; - // remove color name from string - $line = str_replace(' '.$color_name, '', $line); - // remove pharentesis from color name - $color_name = substr($color_name, 1, -1); - } - } - $chunks = explode(' ', $line); - $cmd = trim(array_pop($chunks)); - // RGB - if (($cmd == 'Xa') OR ($cmd == 'XA')) { - $b = array_pop($chunks); - $g = array_pop($chunks); - $r = array_pop($chunks); - $this->_out(''.$r.' '.$g.' '.$b.' '.($cmd=='Xa'?'rg':'RG')); //substr($line, 0, -2).'rg' -> in EPS (AI8): c m y k r g b rg! - continue; - } - $skip = false; - if ($fixoutvals) { - // check for values outside the bounding box - switch ($cmd) { - case 'm': - case 'l': - case 'L': { - // skip values outside bounding box - foreach ($chunks as $key => $val) { - if ((($key % 2) == 0) AND (($val < $x1) OR ($val > $x2))) { - $skip = true; - } elseif ((($key % 2) != 0) AND (($val < $y1) OR ($val > $y2))) { - $skip = true; - } - } - } - } - } - switch ($cmd) { - case 'm': - case 'l': - case 'v': - case 'y': - case 'c': - case 'k': - case 'K': - case 'g': - case 'G': - case 's': - case 'S': - case 'J': - case 'j': - case 'w': - case 'M': - case 'd': - case 'n': { - if ($skip) { - break; - } - $this->_out($line); - break; - } - case 'x': {// custom fill color - if (empty($color_name)) { - // CMYK color - list($col_c, $col_m, $col_y, $col_k) = $chunks; - $this->_out(''.$col_c.' '.$col_m.' '.$col_y.' '.$col_k.' k'); - } else { - // Spot Color (CMYK + tint) - list($col_c, $col_m, $col_y, $col_k, $col_t) = $chunks; - $this->AddSpotColor($color_name, ($col_c * 100), ($col_m * 100), ($col_y * 100), ($col_k * 100)); - $color_cmd = sprintf('/CS%d cs %F scn', $this->spot_colors[$color_name]['i'], (1 - $col_t)); - $this->_out($color_cmd); - } - break; - } - case 'X': { // custom stroke color - if (empty($color_name)) { - // CMYK color - list($col_c, $col_m, $col_y, $col_k) = $chunks; - $this->_out(''.$col_c.' '.$col_m.' '.$col_y.' '.$col_k.' K'); - } else { - // Spot Color (CMYK + tint) - list($col_c, $col_m, $col_y, $col_k, $col_t) = $chunks; - $this->AddSpotColor($color_name, ($col_c * 100), ($col_m * 100), ($col_y * 100), ($col_k * 100)); - $color_cmd = sprintf('/CS%d CS %F SCN', $this->spot_colors[$color_name]['i'], (1 - $col_t)); - $this->_out($color_cmd); - } - break; - } - case 'Y': - case 'N': - case 'V': - case 'L': - case 'C': { - if ($skip) { - break; - } - $line[($len - 1)] = strtolower($cmd); - $this->_out($line); - break; - } - case 'b': - case 'B': { - $this->_out($cmd . '*'); - break; - } - case 'f': - case 'F': { - if ($u > 0) { - $isU = false; - $max = min(($i + 5), $cnt); - for ($j = ($i + 1); $j < $max; ++$j) { - $isU = ($isU OR (($lines[$j] == 'U') OR ($lines[$j] == '*U'))); - } - if ($isU) { - $this->_out('f*'); - } - } else { - $this->_out('f*'); - } - break; - } - case '*u': { - ++$u; - break; - } - case '*U': { - --$u; - break; - } - } - } - // restore previous graphic state - $this->_out($this->epsmarker.'Q'); - if (!empty($border)) { - $bx = $this->x; - $by = $this->y; - $this->x = $ximg; - if ($this->rtl) { - $this->x += $w; - } - $this->y = $y; - $this->Cell($w, $h, '', $border, 0, '', 0, '', 0, true); - $this->x = $bx; - $this->y = $by; - } - if ($link) { - $this->Link($ximg, $y, $w, $h, $link, 0); - } - // set pointer to align the next text/objects - switch($align) { - case 'T':{ - $this->y = $y; - $this->x = $this->img_rb_x; - break; - } - case 'M':{ - $this->y = $y + round($h/2); - $this->x = $this->img_rb_x; - break; - } - case 'B':{ - $this->y = $this->img_rb_y; - $this->x = $this->img_rb_x; - break; - } - case 'N':{ - $this->SetY($this->img_rb_y); - break; - } - default:{ - break; - } - } - $this->endlinex = $this->img_rb_x; - } - - /** - * Set document barcode. - * @param $bc (string) barcode - * @public - */ - public function setBarcode($bc='') { - $this->barcode = $bc; - } - - /** - * Get current barcode. - * @return string - * @public - * @since 4.0.012 (2008-07-24) - */ - public function getBarcode() { - return $this->barcode; - } - - /** - * Print a Linear Barcode. - * @param $code (string) code to print - * @param $type (string) type of barcode (see tcpdf_barcodes_1d.php for supported formats). - * @param $x (int) x position in user units (empty string = current x position) - * @param $y (int) y position in user units (empty string = current y position) - * @param $w (int) width in user units (empty string = remaining page width) - * @param $h (int) height in user units (empty string = remaining page height) - * @param $xres (float) width of the smallest bar in user units (empty string = default value = 0.4mm) - * @param $style (array) array of options:
            - *
          • boolean $style['border'] if true prints a border
          • - *
          • int $style['padding'] padding to leave around the barcode in user units (set to 'auto' for automatic padding)
          • - *
          • int $style['hpadding'] horizontal padding in user units (set to 'auto' for automatic padding)
          • - *
          • int $style['vpadding'] vertical padding in user units (set to 'auto' for automatic padding)
          • - *
          • array $style['fgcolor'] color array for bars and text
          • - *
          • mixed $style['bgcolor'] color array for background (set to false for transparent)
          • - *
          • boolean $style['text'] if true prints text below the barcode
          • - *
          • string $style['label'] override default label
          • - *
          • string $style['font'] font name for text
          • int $style['fontsize'] font size for text
          • - *
          • int $style['stretchtext']: 0 = disabled; 1 = horizontal scaling only if necessary; 2 = forced horizontal scaling; 3 = character spacing only if necessary; 4 = forced character spacing.
          • - *
          • string $style['position'] horizontal position of the containing barcode cell on the page: L = left margin; C = center; R = right margin.
          • - *
          • string $style['align'] horizontal position of the barcode on the containing rectangle: L = left; C = center; R = right.
          • - *
          • string $style['stretch'] if true stretch the barcode to best fit the available width, otherwise uses $xres resolution for a single bar.
          • - *
          • string $style['fitwidth'] if true reduce the width to fit the barcode width + padding. When this option is enabled the 'stretch' option is automatically disabled.
          • - *
          • string $style['cellfitalign'] this option works only when 'fitwidth' is true and 'position' is unset or empty. Set the horizontal position of the containing barcode cell inside the specified rectangle: L = left; C = center; R = right.
          - * @param $align (string) Indicates the alignment of the pointer next to barcode insertion relative to barcode height. The value can be:
          • T: top-right for LTR or top-left for RTL
          • M: middle-right for LTR or middle-left for RTL
          • B: bottom-right for LTR or bottom-left for RTL
          • N: next line
          - * @author Nicola Asuni - * @since 3.1.000 (2008-06-09) - * @public - */ - public function write1DBarcode($code, $type, $x='', $y='', $w='', $h='', $xres='', $style='', $align='') { - if (TCPDF_STATIC::empty_string(trim($code))) { - return; - } - require_once(dirname(__FILE__).'/tcpdf_barcodes_1d.php'); - // save current graphic settings - $gvars = $this->getGraphicVars(); - // create new barcode object - $barcodeobj = new TCPDFBarcode($code, $type); - $arrcode = $barcodeobj->getBarcodeArray(); - if (($arrcode === false) OR empty($arrcode) OR ($arrcode['maxw'] <= 0)) { - $this->Error('Error in 1D barcode string'); - } - if ($arrcode['maxh'] <= 0) { - $arrcode['maxh'] = 1; - } - // set default values - if (!isset($style['position'])) { - $style['position'] = ''; - } elseif ($style['position'] == 'S') { - // keep this for backward compatibility - $style['position'] = ''; - $style['stretch'] = true; - } - if (!isset($style['fitwidth'])) { - if (!isset($style['stretch'])) { - $style['fitwidth'] = true; - } else { - $style['fitwidth'] = false; - } - } - if ($style['fitwidth']) { - // disable stretch - $style['stretch'] = false; - } - if (!isset($style['stretch'])) { - if (($w === '') OR ($w <= 0)) { - $style['stretch'] = false; - } else { - $style['stretch'] = true; - } - } - if (!isset($style['fgcolor'])) { - $style['fgcolor'] = array(0,0,0); // default black - } - if (!isset($style['bgcolor'])) { - $style['bgcolor'] = false; // default transparent - } - if (!isset($style['border'])) { - $style['border'] = false; - } - $fontsize = 0; - if (!isset($style['text'])) { - $style['text'] = false; - } - if ($style['text'] AND isset($style['font'])) { - if (isset($style['fontsize'])) { - $fontsize = $style['fontsize']; - } - $this->SetFont($style['font'], '', $fontsize); - } - if (!isset($style['stretchtext'])) { - $style['stretchtext'] = 4; - } - if ($x === '') { - $x = $this->x; - } - if ($y === '') { - $y = $this->y; - } - // check page for no-write regions and adapt page margins if necessary - list($x, $y) = $this->checkPageRegions($h, $x, $y); - if (($w === '') OR ($w <= 0)) { - if ($this->rtl) { - $w = $x - $this->lMargin; - } else { - $w = $this->w - $this->rMargin - $x; - } - } - // padding - if (!isset($style['padding'])) { - $padding = 0; - } elseif ($style['padding'] === 'auto') { - $padding = 10 * ($w / ($arrcode['maxw'] + 20)); - } else { - $padding = floatval($style['padding']); - } - // horizontal padding - if (!isset($style['hpadding'])) { - $hpadding = $padding; - } elseif ($style['hpadding'] === 'auto') { - $hpadding = 10 * ($w / ($arrcode['maxw'] + 20)); - } else { - $hpadding = floatval($style['hpadding']); - } - // vertical padding - if (!isset($style['vpadding'])) { - $vpadding = $padding; - } elseif ($style['vpadding'] === 'auto') { - $vpadding = ($hpadding / 2); - } else { - $vpadding = floatval($style['vpadding']); - } - // calculate xres (single bar width) - $max_xres = ($w - (2 * $hpadding)) / $arrcode['maxw']; - if ($style['stretch']) { - $xres = $max_xres; - } else { - if (TCPDF_STATIC::empty_string($xres)) { - $xres = (0.141 * $this->k); // default bar width = 0.4 mm - } - if ($xres > $max_xres) { - // correct xres to fit on $w - $xres = $max_xres; - } - if ((isset($style['padding']) AND ($style['padding'] === 'auto')) - OR (isset($style['hpadding']) AND ($style['hpadding'] === 'auto'))) { - $hpadding = 10 * $xres; - if (isset($style['vpadding']) AND ($style['vpadding'] === 'auto')) { - $vpadding = ($hpadding / 2); - } - } - } - if ($style['fitwidth']) { - $wold = $w; - $w = (($arrcode['maxw'] * $xres) + (2 * $hpadding)); - if (isset($style['cellfitalign'])) { - switch ($style['cellfitalign']) { - case 'L': { - if ($this->rtl) { - $x -= ($wold - $w); - } - break; - } - case 'R': { - if (!$this->rtl) { - $x += ($wold - $w); - } - break; - } - case 'C': { - if ($this->rtl) { - $x -= (($wold - $w) / 2); - } else { - $x += (($wold - $w) / 2); - } - break; - } - default : { - break; - } - } - } - } - $text_height = $this->getCellHeight($fontsize / $this->k); - // height - if (($h === '') OR ($h <= 0)) { - // set default height - $h = (($arrcode['maxw'] * $xres) / 3) + (2 * $vpadding) + $text_height; - } - $barh = $h - $text_height - (2 * $vpadding); - if ($barh <=0) { - // try to reduce font or padding to fit barcode on available height - if ($text_height > $h) { - $fontsize = (($h * $this->k) / (4 * $this->cell_height_ratio)); - $text_height = $this->getCellHeight($fontsize / $this->k); - $this->SetFont($style['font'], '', $fontsize); - } - if ($vpadding > 0) { - $vpadding = (($h - $text_height) / 4); - } - $barh = $h - $text_height - (2 * $vpadding); - } - // fit the barcode on available space - list($w, $h, $x, $y) = $this->fitBlock($w, $h, $x, $y, false); - // set alignment - $this->img_rb_y = $y + $h; - // set alignment - if ($this->rtl) { - if ($style['position'] == 'L') { - $xpos = $this->lMargin; - } elseif ($style['position'] == 'C') { - $xpos = ($this->w + $this->lMargin - $this->rMargin - $w) / 2; - } elseif ($style['position'] == 'R') { - $xpos = $this->w - $this->rMargin - $w; - } else { - $xpos = $x - $w; - } - $this->img_rb_x = $xpos; - } else { - if ($style['position'] == 'L') { - $xpos = $this->lMargin; - } elseif ($style['position'] == 'C') { - $xpos = ($this->w + $this->lMargin - $this->rMargin - $w) / 2; - } elseif ($style['position'] == 'R') { - $xpos = $this->w - $this->rMargin - $w; - } else { - $xpos = $x; - } - $this->img_rb_x = $xpos + $w; - } - $xpos_rect = $xpos; - if (!isset($style['align'])) { - $style['align'] = 'C'; - } - switch ($style['align']) { - case 'L': { - $xpos = $xpos_rect + $hpadding; - break; - } - case 'R': { - $xpos = $xpos_rect + ($w - ($arrcode['maxw'] * $xres)) - $hpadding; - break; - } - case 'C': - default : { - $xpos = $xpos_rect + (($w - ($arrcode['maxw'] * $xres)) / 2); - break; - } - } - $xpos_text = $xpos; - // barcode is always printed in LTR direction - $tempRTL = $this->rtl; - $this->rtl = false; - // print background color - if ($style['bgcolor']) { - $this->Rect($xpos_rect, $y, $w, $h, $style['border'] ? 'DF' : 'F', '', $style['bgcolor']); - } elseif ($style['border']) { - $this->Rect($xpos_rect, $y, $w, $h, 'D'); - } - // set foreground color - $this->SetDrawColorArray($style['fgcolor']); - $this->SetTextColorArray($style['fgcolor']); - // print bars - foreach ($arrcode['bcode'] as $k => $v) { - $bw = ($v['w'] * $xres); - if ($v['t']) { - // draw a vertical bar - $ypos = $y + $vpadding + ($v['p'] * $barh / $arrcode['maxh']); - $this->Rect($xpos, $ypos, $bw, ($v['h'] * $barh / $arrcode['maxh']), 'F', array(), $style['fgcolor']); - } - $xpos += $bw; - } - // print text - if ($style['text']) { - if (isset($style['label']) AND !TCPDF_STATIC::empty_string($style['label'])) { - $label = $style['label']; - } else { - $label = $code; - } - $txtwidth = ($arrcode['maxw'] * $xres); - if ($this->GetStringWidth($label) > $txtwidth) { - $style['stretchtext'] = 2; - } - // print text - $this->x = $xpos_text; - $this->y = $y + $vpadding + $barh; - $cellpadding = $this->cell_padding; - $this->SetCellPadding(0); - $this->Cell($txtwidth, '', $label, 0, 0, 'C', false, '', $style['stretchtext'], false, 'T', 'T'); - $this->cell_padding = $cellpadding; - } - // restore original direction - $this->rtl = $tempRTL; - // restore previous settings - $this->setGraphicVars($gvars); - // set pointer to align the next text/objects - switch($align) { - case 'T':{ - $this->y = $y; - $this->x = $this->img_rb_x; - break; - } - case 'M':{ - $this->y = $y + round($h / 2); - $this->x = $this->img_rb_x; - break; - } - case 'B':{ - $this->y = $this->img_rb_y; - $this->x = $this->img_rb_x; - break; - } - case 'N':{ - $this->SetY($this->img_rb_y); - break; - } - default:{ - break; - } - } - $this->endlinex = $this->img_rb_x; - } - - /** - * Print 2D Barcode. - * @param $code (string) code to print - * @param $type (string) type of barcode (see tcpdf_barcodes_2d.php for supported formats). - * @param $x (int) x position in user units - * @param $y (int) y position in user units - * @param $w (int) width in user units - * @param $h (int) height in user units - * @param $style (array) array of options:
            - *
          • boolean $style['border'] if true prints a border around the barcode
          • - *
          • int $style['padding'] padding to leave around the barcode in barcode units (set to 'auto' for automatic padding)
          • - *
          • int $style['hpadding'] horizontal padding in barcode units (set to 'auto' for automatic padding)
          • - *
          • int $style['vpadding'] vertical padding in barcode units (set to 'auto' for automatic padding)
          • - *
          • int $style['module_width'] width of a single module in points
          • - *
          • int $style['module_height'] height of a single module in points
          • - *
          • array $style['fgcolor'] color array for bars and text
          • - *
          • mixed $style['bgcolor'] color array for background or false for transparent
          • - *
          • string $style['position'] barcode position on the page: L = left margin; C = center; R = right margin; S = stretch
          • $style['module_width'] width of a single module in points
          • - *
          • $style['module_height'] height of a single module in points
          - * @param $align (string) Indicates the alignment of the pointer next to barcode insertion relative to barcode height. The value can be:
          • T: top-right for LTR or top-left for RTL
          • M: middle-right for LTR or middle-left for RTL
          • B: bottom-right for LTR or bottom-left for RTL
          • N: next line
          - * @param $distort (boolean) if true distort the barcode to fit width and height, otherwise preserve aspect ratio - * @author Nicola Asuni - * @since 4.5.037 (2009-04-07) - * @public - */ - public function write2DBarcode($code, $type, $x='', $y='', $w='', $h='', $style='', $align='', $distort=false) { - if (TCPDF_STATIC::empty_string(trim($code))) { - return; - } - require_once(dirname(__FILE__).'/tcpdf_barcodes_2d.php'); - // save current graphic settings - $gvars = $this->getGraphicVars(); - // create new barcode object - $barcodeobj = new TCPDF2DBarcode($code, $type); - $arrcode = $barcodeobj->getBarcodeArray(); - if (($arrcode === false) OR empty($arrcode) OR !isset($arrcode['num_rows']) OR ($arrcode['num_rows'] == 0) OR !isset($arrcode['num_cols']) OR ($arrcode['num_cols'] == 0)) { - $this->Error('Error in 2D barcode string'); - } - // set default values - if (!isset($style['position'])) { - $style['position'] = ''; - } - if (!isset($style['fgcolor'])) { - $style['fgcolor'] = array(0,0,0); // default black - } - if (!isset($style['bgcolor'])) { - $style['bgcolor'] = false; // default transparent - } - if (!isset($style['border'])) { - $style['border'] = false; - } - // padding - if (!isset($style['padding'])) { - $style['padding'] = 0; - } elseif ($style['padding'] === 'auto') { - $style['padding'] = 4; - } - if (!isset($style['hpadding'])) { - $style['hpadding'] = $style['padding']; - } elseif ($style['hpadding'] === 'auto') { - $style['hpadding'] = 4; - } - if (!isset($style['vpadding'])) { - $style['vpadding'] = $style['padding']; - } elseif ($style['vpadding'] === 'auto') { - $style['vpadding'] = 4; - } - $hpad = (2 * $style['hpadding']); - $vpad = (2 * $style['vpadding']); - // cell (module) dimension - if (!isset($style['module_width'])) { - $style['module_width'] = 1; // width of a single module in points - } - if (!isset($style['module_height'])) { - $style['module_height'] = 1; // height of a single module in points - } - if ($x === '') { - $x = $this->x; - } - if ($y === '') { - $y = $this->y; - } - // check page for no-write regions and adapt page margins if necessary - list($x, $y) = $this->checkPageRegions($h, $x, $y); - // number of barcode columns and rows - $rows = $arrcode['num_rows']; - $cols = $arrcode['num_cols']; - if (($rows <= 0) || ($cols <= 0)){ - $this->Error('Error in 2D barcode string'); - } - // module width and height - $mw = $style['module_width']; - $mh = $style['module_height']; - if (($mw <= 0) OR ($mh <= 0)) { - $this->Error('Error in 2D barcode string'); - } - // get max dimensions - if ($this->rtl) { - $maxw = $x - $this->lMargin; - } else { - $maxw = $this->w - $this->rMargin - $x; - } - $maxh = ($this->h - $this->tMargin - $this->bMargin); - $ratioHW = ((($rows * $mh) + $hpad) / (($cols * $mw) + $vpad)); - $ratioWH = ((($cols * $mw) + $vpad) / (($rows * $mh) + $hpad)); - if (!$distort) { - if (($maxw * $ratioHW) > $maxh) { - $maxw = $maxh * $ratioWH; - } - if (($maxh * $ratioWH) > $maxw) { - $maxh = $maxw * $ratioHW; - } - } - // set maximum dimensions - if ($w > $maxw) { - $w = $maxw; - } - if ($h > $maxh) { - $h = $maxh; - } - // set dimensions - if ((($w === '') OR ($w <= 0)) AND (($h === '') OR ($h <= 0))) { - $w = ($cols + $hpad) * ($mw / $this->k); - $h = ($rows + $vpad) * ($mh / $this->k); - } elseif (($w === '') OR ($w <= 0)) { - $w = $h * $ratioWH; - } elseif (($h === '') OR ($h <= 0)) { - $h = $w * $ratioHW; - } - // barcode size (excluding padding) - $bw = ($w * $cols) / ($cols + $hpad); - $bh = ($h * $rows) / ($rows + $vpad); - // dimension of single barcode cell unit - $cw = $bw / $cols; - $ch = $bh / $rows; - if (!$distort) { - if (($cw / $ch) > ($mw / $mh)) { - // correct horizontal distortion - $cw = $ch * $mw / $mh; - $bw = $cw * $cols; - $style['hpadding'] = ($w - $bw) / (2 * $cw); - } else { - // correct vertical distortion - $ch = $cw * $mh / $mw; - $bh = $ch * $rows; - $style['vpadding'] = ($h - $bh) / (2 * $ch); - } - } - // fit the barcode on available space - list($w, $h, $x, $y) = $this->fitBlock($w, $h, $x, $y, false); - // set alignment - $this->img_rb_y = $y + $h; - // set alignment - if ($this->rtl) { - if ($style['position'] == 'L') { - $xpos = $this->lMargin; - } elseif ($style['position'] == 'C') { - $xpos = ($this->w + $this->lMargin - $this->rMargin - $w) / 2; - } elseif ($style['position'] == 'R') { - $xpos = $this->w - $this->rMargin - $w; - } else { - $xpos = $x - $w; - } - $this->img_rb_x = $xpos; - } else { - if ($style['position'] == 'L') { - $xpos = $this->lMargin; - } elseif ($style['position'] == 'C') { - $xpos = ($this->w + $this->lMargin - $this->rMargin - $w) / 2; - } elseif ($style['position'] == 'R') { - $xpos = $this->w - $this->rMargin - $w; - } else { - $xpos = $x; - } - $this->img_rb_x = $xpos + $w; - } - $xstart = $xpos + ($style['hpadding'] * $cw); - $ystart = $y + ($style['vpadding'] * $ch); - // barcode is always printed in LTR direction - $tempRTL = $this->rtl; - $this->rtl = false; - // print background color - if ($style['bgcolor']) { - $this->Rect($xpos, $y, $w, $h, $style['border'] ? 'DF' : 'F', '', $style['bgcolor']); - } elseif ($style['border']) { - $this->Rect($xpos, $y, $w, $h, 'D'); - } - // set foreground color - $this->SetDrawColorArray($style['fgcolor']); - // print barcode cells - // for each row - for ($r = 0; $r < $rows; ++$r) { - $xr = $xstart; - // for each column - for ($c = 0; $c < $cols; ++$c) { - if ($arrcode['bcode'][$r][$c] == 1) { - // draw a single barcode cell - $this->Rect($xr, $ystart, $cw, $ch, 'F', array(), $style['fgcolor']); - } - $xr += $cw; - } - $ystart += $ch; - } - // restore original direction - $this->rtl = $tempRTL; - // restore previous settings - $this->setGraphicVars($gvars); - // set pointer to align the next text/objects - switch($align) { - case 'T':{ - $this->y = $y; - $this->x = $this->img_rb_x; - break; - } - case 'M':{ - $this->y = $y + round($h/2); - $this->x = $this->img_rb_x; - break; - } - case 'B':{ - $this->y = $this->img_rb_y; - $this->x = $this->img_rb_x; - break; - } - case 'N':{ - $this->SetY($this->img_rb_y); - break; - } - default:{ - break; - } - } - $this->endlinex = $this->img_rb_x; - } - - /** - * Returns an array containing current margins: - *
            -
          • $ret['left'] = left margin
          • -
          • $ret['right'] = right margin
          • -
          • $ret['top'] = top margin
          • -
          • $ret['bottom'] = bottom margin
          • -
          • $ret['header'] = header margin
          • -
          • $ret['footer'] = footer margin
          • -
          • $ret['cell'] = cell padding array
          • -
          • $ret['padding_left'] = cell left padding
          • -
          • $ret['padding_top'] = cell top padding
          • -
          • $ret['padding_right'] = cell right padding
          • -
          • $ret['padding_bottom'] = cell bottom padding
          • - *
          - * @return array containing all margins measures - * @public - * @since 3.2.000 (2008-06-23) - */ - public function getMargins() { - $ret = array( - 'left' => $this->lMargin, - 'right' => $this->rMargin, - 'top' => $this->tMargin, - 'bottom' => $this->bMargin, - 'header' => $this->header_margin, - 'footer' => $this->footer_margin, - 'cell' => $this->cell_padding, - 'padding_left' => $this->cell_padding['L'], - 'padding_top' => $this->cell_padding['T'], - 'padding_right' => $this->cell_padding['R'], - 'padding_bottom' => $this->cell_padding['B'] - ); - return $ret; - } - - /** - * Returns an array containing original margins: - *
            -
          • $ret['left'] = left margin
          • -
          • $ret['right'] = right margin
          • - *
          - * @return array containing all margins measures - * @public - * @since 4.0.012 (2008-07-24) - */ - public function getOriginalMargins() { - $ret = array( - 'left' => $this->original_lMargin, - 'right' => $this->original_rMargin - ); - return $ret; - } - - /** - * Returns the current font size. - * @return current font size - * @public - * @since 3.2.000 (2008-06-23) - */ - public function getFontSize() { - return $this->FontSize; - } - - /** - * Returns the current font size in points unit. - * @return current font size in points unit - * @public - * @since 3.2.000 (2008-06-23) - */ - public function getFontSizePt() { - return $this->FontSizePt; - } - - /** - * Returns the current font family name. - * @return string current font family name - * @public - * @since 4.3.008 (2008-12-05) - */ - public function getFontFamily() { - return $this->FontFamily; - } - - /** - * Returns the current font style. - * @return string current font style - * @public - * @since 4.3.008 (2008-12-05) - */ - public function getFontStyle() { - return $this->FontStyle; - } - - /** - * Cleanup HTML code (requires HTML Tidy library). - * @param $html (string) htmlcode to fix - * @param $default_css (string) CSS commands to add - * @param $tagvs (array) parameters for setHtmlVSpace method - * @param $tidy_options (array) options for tidy_parse_string function - * @return string XHTML code cleaned up - * @author Nicola Asuni - * @public - * @since 5.9.017 (2010-11-16) - * @see setHtmlVSpace() - */ - public function fixHTMLCode($html, $default_css='', $tagvs='', $tidy_options='') { - return TCPDF_STATIC::fixHTMLCode($html, $default_css, $tagvs, $tidy_options, $this->tagvspaces); - } - - /** - * Returns the border width from CSS property - * @param $width (string) border width - * @return int with in user units - * @protected - * @since 5.7.000 (2010-08-02) - */ - protected function getCSSBorderWidth($width) { - if ($width == 'thin') { - $width = (2 / $this->k); - } elseif ($width == 'medium') { - $width = (4 / $this->k); - } elseif ($width == 'thick') { - $width = (6 / $this->k); - } else { - $width = $this->getHTMLUnitToUnits($width, 1, 'px', false); - } - return $width; - } - - /** - * Returns the border dash style from CSS property - * @param $style (string) border style to convert - * @return int sash style (return -1 in case of none or hidden border) - * @protected - * @since 5.7.000 (2010-08-02) - */ - protected function getCSSBorderDashStyle($style) { - switch (strtolower($style)) { - case 'none': - case 'hidden': { - $dash = -1; - break; - } - case 'dotted': { - $dash = 1; - break; - } - case 'dashed': { - $dash = 3; - break; - } - case 'double': - case 'groove': - case 'ridge': - case 'inset': - case 'outset': - case 'solid': - default: { - $dash = 0; - break; - } - } - return $dash; - } - - /** - * Returns the border style array from CSS border properties - * @param $cssborder (string) border properties - * @return array containing border properties - * @protected - * @since 5.7.000 (2010-08-02) - */ - protected function getCSSBorderStyle($cssborder) { - $bprop = preg_split('/[\s]+/', trim($cssborder)); - $border = array(); // value to be returned - switch (count($bprop)) { - case 3: { - $width = $bprop[0]; - $style = $bprop[1]; - $color = $bprop[2]; - break; - } - case 2: { - $width = 'medium'; - $style = $bprop[0]; - $color = $bprop[1]; - break; - } - case 1: { - $width = 'medium'; - $style = $bprop[0]; - $color = 'black'; - break; - } - default: { - $width = 'medium'; - $style = 'solid'; - $color = 'black'; - break; - } - } - if ($style == 'none') { - return array(); - } - $border['cap'] = 'square'; - $border['join'] = 'miter'; - $border['dash'] = $this->getCSSBorderDashStyle($style); - if ($border['dash'] < 0) { - return array(); - } - $border['width'] = $this->getCSSBorderWidth($width); - $border['color'] = TCPDF_COLORS::convertHTMLColorToDec($color, $this->spot_colors); - return $border; - } - - /** - * Get the internal Cell padding from CSS attribute. - * @param $csspadding (string) padding properties - * @param $width (float) width of the containing element - * @return array of cell paddings - * @public - * @since 5.9.000 (2010-10-04) - */ - public function getCSSPadding($csspadding, $width=0) { - $padding = preg_split('/[\s]+/', trim($csspadding)); - $cell_padding = array(); // value to be returned - switch (count($padding)) { - case 4: { - $cell_padding['T'] = $padding[0]; - $cell_padding['R'] = $padding[1]; - $cell_padding['B'] = $padding[2]; - $cell_padding['L'] = $padding[3]; - break; - } - case 3: { - $cell_padding['T'] = $padding[0]; - $cell_padding['R'] = $padding[1]; - $cell_padding['B'] = $padding[2]; - $cell_padding['L'] = $padding[1]; - break; - } - case 2: { - $cell_padding['T'] = $padding[0]; - $cell_padding['R'] = $padding[1]; - $cell_padding['B'] = $padding[0]; - $cell_padding['L'] = $padding[1]; - break; - } - case 1: { - $cell_padding['T'] = $padding[0]; - $cell_padding['R'] = $padding[0]; - $cell_padding['B'] = $padding[0]; - $cell_padding['L'] = $padding[0]; - break; - } - default: { - return $this->cell_padding; - } - } - if ($width == 0) { - $width = $this->w - $this->lMargin - $this->rMargin; - } - $cell_padding['T'] = $this->getHTMLUnitToUnits($cell_padding['T'], $width, 'px', false); - $cell_padding['R'] = $this->getHTMLUnitToUnits($cell_padding['R'], $width, 'px', false); - $cell_padding['B'] = $this->getHTMLUnitToUnits($cell_padding['B'], $width, 'px', false); - $cell_padding['L'] = $this->getHTMLUnitToUnits($cell_padding['L'], $width, 'px', false); - return $cell_padding; - } - - /** - * Get the internal Cell margin from CSS attribute. - * @param $cssmargin (string) margin properties - * @param $width (float) width of the containing element - * @return array of cell margins - * @public - * @since 5.9.000 (2010-10-04) - */ - public function getCSSMargin($cssmargin, $width=0) { - $margin = preg_split('/[\s]+/', trim($cssmargin)); - $cell_margin = array(); // value to be returned - switch (count($margin)) { - case 4: { - $cell_margin['T'] = $margin[0]; - $cell_margin['R'] = $margin[1]; - $cell_margin['B'] = $margin[2]; - $cell_margin['L'] = $margin[3]; - break; - } - case 3: { - $cell_margin['T'] = $margin[0]; - $cell_margin['R'] = $margin[1]; - $cell_margin['B'] = $margin[2]; - $cell_margin['L'] = $margin[1]; - break; - } - case 2: { - $cell_margin['T'] = $margin[0]; - $cell_margin['R'] = $margin[1]; - $cell_margin['B'] = $margin[0]; - $cell_margin['L'] = $margin[1]; - break; - } - case 1: { - $cell_margin['T'] = $margin[0]; - $cell_margin['R'] = $margin[0]; - $cell_margin['B'] = $margin[0]; - $cell_margin['L'] = $margin[0]; - break; - } - default: { - return $this->cell_margin; - } - } - if ($width == 0) { - $width = $this->w - $this->lMargin - $this->rMargin; - } - $cell_margin['T'] = $this->getHTMLUnitToUnits(str_replace('auto', '0', $cell_margin['T']), $width, 'px', false); - $cell_margin['R'] = $this->getHTMLUnitToUnits(str_replace('auto', '0', $cell_margin['R']), $width, 'px', false); - $cell_margin['B'] = $this->getHTMLUnitToUnits(str_replace('auto', '0', $cell_margin['B']), $width, 'px', false); - $cell_margin['L'] = $this->getHTMLUnitToUnits(str_replace('auto', '0', $cell_margin['L']), $width, 'px', false); - return $cell_margin; - } - - /** - * Get the border-spacing from CSS attribute. - * @param $cssbspace (string) border-spacing CSS properties - * @param $width (float) width of the containing element - * @return array of border spacings - * @public - * @since 5.9.010 (2010-10-27) - */ - public function getCSSBorderMargin($cssbspace, $width=0) { - $space = preg_split('/[\s]+/', trim($cssbspace)); - $border_spacing = array(); // value to be returned - switch (count($space)) { - case 2: { - $border_spacing['H'] = $space[0]; - $border_spacing['V'] = $space[1]; - break; - } - case 1: { - $border_spacing['H'] = $space[0]; - $border_spacing['V'] = $space[0]; - break; - } - default: { - return array('H' => 0, 'V' => 0); - } - } - if ($width == 0) { - $width = $this->w - $this->lMargin - $this->rMargin; - } - $border_spacing['H'] = $this->getHTMLUnitToUnits($border_spacing['H'], $width, 'px', false); - $border_spacing['V'] = $this->getHTMLUnitToUnits($border_spacing['V'], $width, 'px', false); - return $border_spacing; - } - - /** - * Returns the letter-spacing value from CSS value - * @param $spacing (string) letter-spacing value - * @param $parent (float) font spacing (tracking) value of the parent element - * @return float quantity to increases or decreases the space between characters in a text. - * @protected - * @since 5.9.000 (2010-10-02) - */ - protected function getCSSFontSpacing($spacing, $parent=0) { - $val = 0; // value to be returned - $spacing = trim($spacing); - switch ($spacing) { - case 'normal': { - $val = 0; - break; - } - case 'inherit': { - if ($parent == 'normal') { - $val = 0; - } else { - $val = $parent; - } - break; - } - default: { - $val = $this->getHTMLUnitToUnits($spacing, 0, 'px', false); - } - } - return $val; - } - - /** - * Returns the percentage of font stretching from CSS value - * @param $stretch (string) stretch mode - * @param $parent (float) stretch value of the parent element - * @return float font stretching percentage - * @protected - * @since 5.9.000 (2010-10-02) - */ - protected function getCSSFontStretching($stretch, $parent=100) { - $val = 100; // value to be returned - $stretch = trim($stretch); - switch ($stretch) { - case 'ultra-condensed': { - $val = 40; - break; - } - case 'extra-condensed': { - $val = 55; - break; - } - case 'condensed': { - $val = 70; - break; - } - case 'semi-condensed': { - $val = 85; - break; - } - case 'normal': { - $val = 100; - break; - } - case 'semi-expanded': { - $val = 115; - break; - } - case 'expanded': { - $val = 130; - break; - } - case 'extra-expanded': { - $val = 145; - break; - } - case 'ultra-expanded': { - $val = 160; - break; - } - case 'wider': { - $val = ($parent + 10); - break; - } - case 'narrower': { - $val = ($parent - 10); - break; - } - case 'inherit': { - if ($parent == 'normal') { - $val = 100; - } else { - $val = $parent; - } - break; - } - default: { - $val = $this->getHTMLUnitToUnits($stretch, 100, '%', false); - } - } - return $val; - } - - /** - * Convert HTML string containing font size value to points - * @param $val (string) String containing font size value and unit. - * @param $refsize (float) Reference font size in points. - * @param $parent_size (float) Parent font size in points. - * @param $defaultunit (string) Default unit (can be one of the following: %, em, ex, px, in, mm, pc, pt). - * @return float value in points - * @public - */ - public function getHTMLFontUnits($val, $refsize=12, $parent_size=12, $defaultunit='pt') { - $refsize = TCPDF_FONTS::getFontRefSize($refsize); - $parent_size = TCPDF_FONTS::getFontRefSize($parent_size, $refsize); - switch ($val) { - case 'xx-small': { - $size = ($refsize - 4); - break; - } - case 'x-small': { - $size = ($refsize - 3); - break; - } - case 'small': { - $size = ($refsize - 2); - break; - } - case 'medium': { - $size = $refsize; - break; - } - case 'large': { - $size = ($refsize + 2); - break; - } - case 'x-large': { - $size = ($refsize + 4); - break; - } - case 'xx-large': { - $size = ($refsize + 6); - break; - } - case 'smaller': { - $size = ($parent_size - 3); - break; - } - case 'larger': { - $size = ($parent_size + 3); - break; - } - default: { - $size = $this->getHTMLUnitToUnits($val, $parent_size, $defaultunit, true); - } - } - return $size; - } - - /** - * Returns the HTML DOM array. - * @param $html (string) html code - * @return array - * @protected - * @since 3.2.000 (2008-06-20) - */ - protected function getHtmlDomArray($html) { - // array of CSS styles ( selector => properties). - $css = array(); - // get CSS array defined at previous call - $matches = array(); - if (preg_match_all('/([^\<]*)<\/cssarray>/isU', $html, $matches) > 0) { - if (isset($matches[1][0])) { - $css = array_merge($css, json_decode($this->unhtmlentities($matches[1][0]), true)); - } - $html = preg_replace('/(.*?)<\/cssarray>/isU', '', $html); - } - // extract external CSS files - $matches = array(); - if (preg_match_all('/]*)>/isU', $html, $matches) > 0) { - foreach ($matches[1] as $key => $link) { - $type = array(); - if (preg_match('/type[\s]*=[\s]*"text\/css"/', $link, $type)) { - $type = array(); - preg_match('/media[\s]*=[\s]*"([^"]*)"/', $link, $type); - // get 'all' and 'print' media, other media types are discarded - // (all, braille, embossed, handheld, print, projection, screen, speech, tty, tv) - if (empty($type) OR (isset($type[1]) AND (($type[1] == 'all') OR ($type[1] == 'print')))) { - $type = array(); - if (preg_match('/href[\s]*=[\s]*"([^"]*)"/', $link, $type) > 0) { - // read CSS data file - $cssdata = TCPDF_STATIC::fileGetContents(trim($type[1])); - if (($cssdata !== FALSE) AND (strlen($cssdata) > 0)) { - $css = array_merge($css, TCPDF_STATIC::extractCSSproperties($cssdata)); - } - } - } - } - } - } - // extract style tags - $matches = array(); - if (preg_match_all('/]*)>([^\<]*)<\/style>/isU', $html, $matches) > 0) { - foreach ($matches[1] as $key => $media) { - $type = array(); - preg_match('/media[\s]*=[\s]*"([^"]*)"/', $media, $type); - // get 'all' and 'print' media, other media types are discarded - // (all, braille, embossed, handheld, print, projection, screen, speech, tty, tv) - if (empty($type) OR (isset($type[1]) AND (($type[1] == 'all') OR ($type[1] == 'print')))) { - $cssdata = $matches[2][$key]; - $css = array_merge($css, TCPDF_STATIC::extractCSSproperties($cssdata)); - } - } - } - // create a special tag to contain the CSS array (used for table content) - $csstagarray = ''.htmlentities(json_encode($css)).''; - // remove head and style blocks - $html = preg_replace('/]*)>(.*?)<\/head>/siU', '', $html); - $html = preg_replace('/]*)>([^\<]*)<\/style>/isU', '', $html); - // define block tags - $blocktags = array('blockquote','br','dd','dl','div','dt','h1','h2','h3','h4','h5','h6','hr','li','ol','p','pre','ul','tcpdf','table','tr','td'); - // define self-closing tags - $selfclosingtags = array('area','base','basefont','br','hr','input','img','link','meta'); - // remove all unsupported tags (the line below lists all supported tags) - $html = strip_tags($html, '




      3. ', $offset)) !== false) { - $html_a = substr($html, 0, $offset); - $html_b = substr($html, $offset, ($pos - $offset + 11)); - while (preg_match("']*)>(.*?)\n(.*?)'si", $html_b)) { - // preserve newlines on 'si", "\\2\\3", $html_b); - $html_b = preg_replace("']*)>(.*?)[\"](.*?)'si", "\\2''\\3", $html_b); - } - $html = $html_a.$html_b.substr($html, $pos + 11); - $offset = strlen($html_a.$html_b); - } - $html = preg_replace('/([\s]*)', $html); - $offset = 0; - while (($offset < strlen($html)) AND ($pos = strpos($html, '', $offset)) !== false) { - $html_a = substr($html, 0, $offset); - $html_b = substr($html, $offset, ($pos - $offset + 9)); - while (preg_match("']*)>(.*?)'si", $html_b)) { - $html_b = preg_replace("']*)>(.*?)'si", "\\2#!TaB!#\\4#!NwL!#", $html_b); - $html_b = preg_replace("']*)>(.*?)'si", "\\2#!NwL!#", $html_b); - } - $html = $html_a.$html_b.substr($html, $pos + 9); - $offset = strlen($html_a.$html_b); - } - if (preg_match("']*)>'si", "'si", "\" />", $html); - } - $html = str_replace("\n", ' ', $html); - // restore textarea newlines - $html = str_replace('', "\n", $html); - // remove extra spaces from code - $html = preg_replace('/[\s]+<\/(table|tr|ul|ol|dl)>/', '', $html); - $html = preg_replace('/'.$this->re_space['p'].'+<\/(td|th|li|dt|dd)>/'.$this->re_space['m'], '', $html); - $html = preg_replace('/[\s]+<(tr|td|th|li|dt|dd)/', '<\\1', $html); - $html = preg_replace('/'.$this->re_space['p'].'+<(ul|ol|dl|br)/'.$this->re_space['m'], '<\\1', $html); - $html = preg_replace('/<\/(table|tr|td|th|blockquote|dd|dt|dl|div|dt|h1|h2|h3|h4|h5|h6|hr|li|ol|ul|p)>[\s]+<', $html); - $html = preg_replace('/<\/(td|th)>/', '', $html); - $html = preg_replace('/<\/table>([\s]*)/', '
        ', $html); - $html = preg_replace('/'.$this->re_space['p'].'+re_space['m'], chr(32).']*)>[\s]+([^\<])/xi', ' \\2', $html); - $html = preg_replace('/]*)>/xi', '', $html); - $html = preg_replace('/]*)>([^\<]*)<\/textarea>/xi', '', $html); - $html = preg_replace('/]*)><\/li>/', ' 
      4. ', $html); - $html = preg_replace('/]*)>'.$this->re_space['p'].'*re_space['m'], ' \/]*)>[\s]/', '<\\1> ', $html); // preserve some spaces - $html = preg_replace('/[\s]<\/([^\>]*)>/', ' ', $html); // preserve some spaces - $html = preg_replace('//', '', $html); // fix sub/sup alignment - $html = preg_replace('/'.$this->re_space['p'].'+/'.$this->re_space['m'], chr(32), $html); // replace multiple spaces with a single space - // trim string - $html = $this->stringTrim($html); - // fix br tag after li - $html = preg_replace('/
      5. ]*)>/', '
      6. ', $html); - // fix first image tag alignment - $html = preg_replace('/^
        FontFamily; - $dom[$key]['fontstyle'] = $this->FontStyle; - $dom[$key]['fontsize'] = $this->FontSizePt; - $dom[$key]['font-stretch'] = $this->font_stretching; - $dom[$key]['letter-spacing'] = $this->font_spacing; - $dom[$key]['stroke'] = $this->textstrokewidth; - $dom[$key]['fill'] = (($this->textrendermode % 2) == 0); - $dom[$key]['clip'] = ($this->textrendermode > 3); - $dom[$key]['line-height'] = $this->cell_height_ratio; - $dom[$key]['bgcolor'] = false; - $dom[$key]['fgcolor'] = $this->fgcolor; // color - $dom[$key]['strokecolor'] = $this->strokecolor; - $dom[$key]['align'] = ''; - $dom[$key]['listtype'] = ''; - $dom[$key]['text-indent'] = 0; - $dom[$key]['text-transform'] = ''; - $dom[$key]['border'] = array(); - $dom[$key]['dir'] = $this->rtl?'rtl':'ltr'; - $thead = false; // true when we are inside the THEAD tag - ++$key; - $level = array(); - array_push($level, 0); // root - while ($elkey < $maxel) { - $dom[$key] = array(); - $element = $a[$elkey]; - $dom[$key]['elkey'] = $elkey; - if (preg_match($tagpattern, $element)) { - // html tag - $element = substr($element, 1, -1); - // get tag name - preg_match('/[\/]?([a-zA-Z0-9]*)/', $element, $tag); - $tagname = strtolower($tag[1]); - // check if we are inside a table header - if ($tagname == 'thead') { - if ($element[0] == '/') { - $thead = false; - } else { - $thead = true; - } - ++$elkey; - continue; - } - $dom[$key]['tag'] = true; - $dom[$key]['value'] = $tagname; - if (in_array($dom[$key]['value'], $blocktags)) { - $dom[$key]['block'] = true; - } else { - $dom[$key]['block'] = false; - } - if ($element[0] == '/') { - // *** closing html tag - $dom[$key]['opening'] = false; - $dom[$key]['parent'] = end($level); - array_pop($level); - $dom[$key]['hide'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['hide']; - $dom[$key]['fontname'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['fontname']; - $dom[$key]['fontstyle'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['fontstyle']; - $dom[$key]['fontsize'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['fontsize']; - $dom[$key]['font-stretch'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['font-stretch']; - $dom[$key]['letter-spacing'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['letter-spacing']; - $dom[$key]['stroke'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['stroke']; - $dom[$key]['fill'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['fill']; - $dom[$key]['clip'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['clip']; - $dom[$key]['line-height'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['line-height']; - $dom[$key]['bgcolor'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['bgcolor']; - $dom[$key]['fgcolor'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['fgcolor']; - $dom[$key]['strokecolor'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['strokecolor']; - $dom[$key]['align'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['align']; - $dom[$key]['text-transform'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['text-transform']; - $dom[$key]['dir'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['dir']; - if (isset($dom[($dom[($dom[$key]['parent'])]['parent'])]['listtype'])) { - $dom[$key]['listtype'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['listtype']; - } - // set the number of columns in table tag - if (($dom[$key]['value'] == 'tr') AND (!isset($dom[($dom[($dom[$key]['parent'])]['parent'])]['cols']))) { - $dom[($dom[($dom[$key]['parent'])]['parent'])]['cols'] = $dom[($dom[$key]['parent'])]['cols']; - } - if (($dom[$key]['value'] == 'td') OR ($dom[$key]['value'] == 'th')) { - $dom[($dom[$key]['parent'])]['content'] = $csstagarray; - for ($i = ($dom[$key]['parent'] + 1); $i < $key; ++$i) { - $dom[($dom[$key]['parent'])]['content'] .= stripslashes($a[$dom[$i]['elkey']]); - } - $key = $i; - // mark nested tables - $dom[($dom[$key]['parent'])]['content'] = str_replace('', '', $dom[($dom[$key]['parent'])]['content']); - $dom[($dom[$key]['parent'])]['content'] = str_replace('', '', $dom[($dom[$key]['parent'])]['content']); - } - // store header rows on a new table - if (($dom[$key]['value'] == 'tr') AND ($dom[($dom[$key]['parent'])]['thead'] === true)) { - if (TCPDF_STATIC::empty_string($dom[($dom[($dom[$key]['parent'])]['parent'])]['thead'])) { - $dom[($dom[($dom[$key]['parent'])]['parent'])]['thead'] = $csstagarray.$a[$dom[($dom[($dom[$key]['parent'])]['parent'])]['elkey']]; - } - for ($i = $dom[$key]['parent']; $i <= $key; ++$i) { - $dom[($dom[($dom[$key]['parent'])]['parent'])]['thead'] .= $a[$dom[$i]['elkey']]; - } - if (!isset($dom[($dom[$key]['parent'])]['attribute'])) { - $dom[($dom[$key]['parent'])]['attribute'] = array(); - } - // header elements must be always contained in a single page - $dom[($dom[$key]['parent'])]['attribute']['nobr'] = 'true'; - } - if (($dom[$key]['value'] == 'table') AND (!TCPDF_STATIC::empty_string($dom[($dom[$key]['parent'])]['thead']))) { - // remove the nobr attributes from the table header - $dom[($dom[$key]['parent'])]['thead'] = str_replace(' nobr="true"', '', $dom[($dom[$key]['parent'])]['thead']); - $dom[($dom[$key]['parent'])]['thead'] .= ''; - } - } else { - // *** opening or self-closing html tag - $dom[$key]['opening'] = true; - $dom[$key]['parent'] = end($level); - if ((substr($element, -1, 1) == '/') OR (in_array($dom[$key]['value'], $selfclosingtags))) { - // self-closing tag - $dom[$key]['self'] = true; - } else { - // opening tag - array_push($level, $key); - $dom[$key]['self'] = false; - } - // copy some values from parent - $parentkey = 0; - if ($key > 0) { - $parentkey = $dom[$key]['parent']; - $dom[$key]['hide'] = $dom[$parentkey]['hide']; - $dom[$key]['fontname'] = $dom[$parentkey]['fontname']; - $dom[$key]['fontstyle'] = $dom[$parentkey]['fontstyle']; - $dom[$key]['fontsize'] = $dom[$parentkey]['fontsize']; - $dom[$key]['font-stretch'] = $dom[$parentkey]['font-stretch']; - $dom[$key]['letter-spacing'] = $dom[$parentkey]['letter-spacing']; - $dom[$key]['stroke'] = $dom[$parentkey]['stroke']; - $dom[$key]['fill'] = $dom[$parentkey]['fill']; - $dom[$key]['clip'] = $dom[$parentkey]['clip']; - $dom[$key]['line-height'] = $dom[$parentkey]['line-height']; - $dom[$key]['bgcolor'] = $dom[$parentkey]['bgcolor']; - $dom[$key]['fgcolor'] = $dom[$parentkey]['fgcolor']; - $dom[$key]['strokecolor'] = $dom[$parentkey]['strokecolor']; - $dom[$key]['align'] = $dom[$parentkey]['align']; - $dom[$key]['listtype'] = $dom[$parentkey]['listtype']; - $dom[$key]['text-indent'] = $dom[$parentkey]['text-indent']; - $dom[$key]['text-transform'] = $dom[$parentkey]['text-transform']; - $dom[$key]['border'] = array(); - $dom[$key]['dir'] = $dom[$parentkey]['dir']; - } - // get attributes - preg_match_all('/([^=\s]*)[\s]*=[\s]*"([^"]*)"/', $element, $attr_array, PREG_PATTERN_ORDER); - $dom[$key]['attribute'] = array(); // reset attribute array - while (list($id, $name) = each($attr_array[1])) { - $dom[$key]['attribute'][strtolower($name)] = $attr_array[2][$id]; - } - if (!empty($css)) { - // merge CSS style to current style - list($dom[$key]['csssel'], $dom[$key]['cssdata']) = TCPDF_STATIC::getCSSdataArray($dom, $key, $css); - $dom[$key]['attribute']['style'] = TCPDF_STATIC::getTagStyleFromCSSarray($dom[$key]['cssdata']); - } - // split style attributes - if (isset($dom[$key]['attribute']['style']) AND !empty($dom[$key]['attribute']['style'])) { - // get style attributes - preg_match_all('/([^;:\s]*):([^;]*)/', $dom[$key]['attribute']['style'], $style_array, PREG_PATTERN_ORDER); - $dom[$key]['style'] = array(); // reset style attribute array - while (list($id, $name) = each($style_array[1])) { - // in case of duplicate attribute the last replace the previous - $dom[$key]['style'][strtolower($name)] = trim($style_array[2][$id]); - } - // --- get some style attributes --- - // text direction - if (isset($dom[$key]['style']['direction'])) { - $dom[$key]['dir'] = $dom[$key]['style']['direction']; - } - // display - if (isset($dom[$key]['style']['display'])) { - $dom[$key]['hide'] = (trim(strtolower($dom[$key]['style']['display'])) == 'none'); - } - // font family - if (isset($dom[$key]['style']['font-family'])) { - $dom[$key]['fontname'] = $this->getFontFamilyName($dom[$key]['style']['font-family']); - } - // list-style-type - if (isset($dom[$key]['style']['list-style-type'])) { - $dom[$key]['listtype'] = trim(strtolower($dom[$key]['style']['list-style-type'])); - if ($dom[$key]['listtype'] == 'inherit') { - $dom[$key]['listtype'] = $dom[$parentkey]['listtype']; - } - } - // text-indent - if (isset($dom[$key]['style']['text-indent'])) { - $dom[$key]['text-indent'] = $this->getHTMLUnitToUnits($dom[$key]['style']['text-indent']); - if ($dom[$key]['text-indent'] == 'inherit') { - $dom[$key]['text-indent'] = $dom[$parentkey]['text-indent']; - } - } - // text-transform - if (isset($dom[$key]['style']['text-transform'])) { - $dom[$key]['text-transform'] = $dom[$key]['style']['text-transform']; - } - // font size - if (isset($dom[$key]['style']['font-size'])) { - $fsize = trim($dom[$key]['style']['font-size']); - $dom[$key]['fontsize'] = $this->getHTMLFontUnits($fsize, $dom[0]['fontsize'], $dom[$parentkey]['fontsize'], 'pt'); - } - // font-stretch - if (isset($dom[$key]['style']['font-stretch'])) { - $dom[$key]['font-stretch'] = $this->getCSSFontStretching($dom[$key]['style']['font-stretch'], $dom[$parentkey]['font-stretch']); - } - // letter-spacing - if (isset($dom[$key]['style']['letter-spacing'])) { - $dom[$key]['letter-spacing'] = $this->getCSSFontSpacing($dom[$key]['style']['letter-spacing'], $dom[$parentkey]['letter-spacing']); - } - // line-height (internally is the cell height ratio) - if (isset($dom[$key]['style']['line-height'])) { - $lineheight = trim($dom[$key]['style']['line-height']); - switch ($lineheight) { - // A normal line height. This is default - case 'normal': { - $dom[$key]['line-height'] = $dom[0]['line-height']; - break; - } - case 'inherit': { - $dom[$key]['line-height'] = $dom[$parentkey]['line-height']; - } - default: { - if (is_numeric($lineheight)) { - // convert to percentage of font height - $lineheight = ($lineheight * 100).'%'; - } - $dom[$key]['line-height'] = $this->getHTMLUnitToUnits($lineheight, 1, '%', true); - if (substr($lineheight, -1) !== '%') { - if ($dom[$key]['fontsize'] <= 0) { - $dom[$key]['line-height'] = 1; - } else { - $dom[$key]['line-height'] = (($dom[$key]['line-height'] - $this->cell_padding['T'] - $this->cell_padding['B']) / $dom[$key]['fontsize']); - } - } - } - } - } - // font style - if (isset($dom[$key]['style']['font-weight'])) { - if (strtolower($dom[$key]['style']['font-weight'][0]) == 'n') { - if (strpos($dom[$key]['fontstyle'], 'B') !== false) { - $dom[$key]['fontstyle'] = str_replace('B', '', $dom[$key]['fontstyle']); - } - } elseif (strtolower($dom[$key]['style']['font-weight'][0]) == 'b') { - $dom[$key]['fontstyle'] .= 'B'; - } - } - if (isset($dom[$key]['style']['font-style']) AND (strtolower($dom[$key]['style']['font-style'][0]) == 'i')) { - $dom[$key]['fontstyle'] .= 'I'; - } - // font color - if (isset($dom[$key]['style']['color']) AND (!TCPDF_STATIC::empty_string($dom[$key]['style']['color']))) { - $dom[$key]['fgcolor'] = TCPDF_COLORS::convertHTMLColorToDec($dom[$key]['style']['color'], $this->spot_colors); - } elseif ($dom[$key]['value'] == 'a') { - $dom[$key]['fgcolor'] = $this->htmlLinkColorArray; - } - // background color - if (isset($dom[$key]['style']['background-color']) AND (!TCPDF_STATIC::empty_string($dom[$key]['style']['background-color']))) { - $dom[$key]['bgcolor'] = TCPDF_COLORS::convertHTMLColorToDec($dom[$key]['style']['background-color'], $this->spot_colors); - } - // text-decoration - if (isset($dom[$key]['style']['text-decoration'])) { - $decors = explode(' ', strtolower($dom[$key]['style']['text-decoration'])); - foreach ($decors as $dec) { - $dec = trim($dec); - if (!TCPDF_STATIC::empty_string($dec)) { - if ($dec[0] == 'u') { - // underline - $dom[$key]['fontstyle'] .= 'U'; - } elseif ($dec[0] == 'l') { - // line-through - $dom[$key]['fontstyle'] .= 'D'; - } elseif ($dec[0] == 'o') { - // overline - $dom[$key]['fontstyle'] .= 'O'; - } - } - } - } elseif ($dom[$key]['value'] == 'a') { - $dom[$key]['fontstyle'] = $this->htmlLinkFontStyle; - } - // check for width attribute - if (isset($dom[$key]['style']['width'])) { - $dom[$key]['width'] = $dom[$key]['style']['width']; - } - // check for height attribute - if (isset($dom[$key]['style']['height'])) { - $dom[$key]['height'] = $dom[$key]['style']['height']; - } - // check for text alignment - if (isset($dom[$key]['style']['text-align'])) { - $dom[$key]['align'] = strtoupper($dom[$key]['style']['text-align'][0]); - } - // check for CSS border properties - if (isset($dom[$key]['style']['border'])) { - $borderstyle = $this->getCSSBorderStyle($dom[$key]['style']['border']); - if (!empty($borderstyle)) { - $dom[$key]['border']['LTRB'] = $borderstyle; - } - } - if (isset($dom[$key]['style']['border-color'])) { - $brd_colors = preg_split('/[\s]+/', trim($dom[$key]['style']['border-color'])); - if (isset($brd_colors[3])) { - $dom[$key]['border']['L']['color'] = TCPDF_COLORS::convertHTMLColorToDec($brd_colors[3], $this->spot_colors); - } - if (isset($brd_colors[1])) { - $dom[$key]['border']['R']['color'] = TCPDF_COLORS::convertHTMLColorToDec($brd_colors[1], $this->spot_colors); - } - if (isset($brd_colors[0])) { - $dom[$key]['border']['T']['color'] = TCPDF_COLORS::convertHTMLColorToDec($brd_colors[0], $this->spot_colors); - } - if (isset($brd_colors[2])) { - $dom[$key]['border']['B']['color'] = TCPDF_COLORS::convertHTMLColorToDec($brd_colors[2], $this->spot_colors); - } - } - if (isset($dom[$key]['style']['border-width'])) { - $brd_widths = preg_split('/[\s]+/', trim($dom[$key]['style']['border-width'])); - if (isset($brd_widths[3])) { - $dom[$key]['border']['L']['width'] = $this->getCSSBorderWidth($brd_widths[3]); - } - if (isset($brd_widths[1])) { - $dom[$key]['border']['R']['width'] = $this->getCSSBorderWidth($brd_widths[1]); - } - if (isset($brd_widths[0])) { - $dom[$key]['border']['T']['width'] = $this->getCSSBorderWidth($brd_widths[0]); - } - if (isset($brd_widths[2])) { - $dom[$key]['border']['B']['width'] = $this->getCSSBorderWidth($brd_widths[2]); - } - } - if (isset($dom[$key]['style']['border-style'])) { - $brd_styles = preg_split('/[\s]+/', trim($dom[$key]['style']['border-style'])); - if (isset($brd_styles[3]) AND ($brd_styles[3]!='none')) { - $dom[$key]['border']['L']['cap'] = 'square'; - $dom[$key]['border']['L']['join'] = 'miter'; - $dom[$key]['border']['L']['dash'] = $this->getCSSBorderDashStyle($brd_styles[3]); - if ($dom[$key]['border']['L']['dash'] < 0) { - $dom[$key]['border']['L'] = array(); - } - } - if (isset($brd_styles[1])) { - $dom[$key]['border']['R']['cap'] = 'square'; - $dom[$key]['border']['R']['join'] = 'miter'; - $dom[$key]['border']['R']['dash'] = $this->getCSSBorderDashStyle($brd_styles[1]); - if ($dom[$key]['border']['R']['dash'] < 0) { - $dom[$key]['border']['R'] = array(); - } - } - if (isset($brd_styles[0])) { - $dom[$key]['border']['T']['cap'] = 'square'; - $dom[$key]['border']['T']['join'] = 'miter'; - $dom[$key]['border']['T']['dash'] = $this->getCSSBorderDashStyle($brd_styles[0]); - if ($dom[$key]['border']['T']['dash'] < 0) { - $dom[$key]['border']['T'] = array(); - } - } - if (isset($brd_styles[2])) { - $dom[$key]['border']['B']['cap'] = 'square'; - $dom[$key]['border']['B']['join'] = 'miter'; - $dom[$key]['border']['B']['dash'] = $this->getCSSBorderDashStyle($brd_styles[2]); - if ($dom[$key]['border']['B']['dash'] < 0) { - $dom[$key]['border']['B'] = array(); - } - } - } - $cellside = array('L' => 'left', 'R' => 'right', 'T' => 'top', 'B' => 'bottom'); - foreach ($cellside as $bsk => $bsv) { - if (isset($dom[$key]['style']['border-'.$bsv])) { - $borderstyle = $this->getCSSBorderStyle($dom[$key]['style']['border-'.$bsv]); - if (!empty($borderstyle)) { - $dom[$key]['border'][$bsk] = $borderstyle; - } - } - if (isset($dom[$key]['style']['border-'.$bsv.'-color'])) { - $dom[$key]['border'][$bsk]['color'] = TCPDF_COLORS::convertHTMLColorToDec($dom[$key]['style']['border-'.$bsv.'-color'], $this->spot_colors); - } - if (isset($dom[$key]['style']['border-'.$bsv.'-width'])) { - $dom[$key]['border'][$bsk]['width'] = $this->getCSSBorderWidth($dom[$key]['style']['border-'.$bsv.'-width']); - } - if (isset($dom[$key]['style']['border-'.$bsv.'-style'])) { - $dom[$key]['border'][$bsk]['dash'] = $this->getCSSBorderDashStyle($dom[$key]['style']['border-'.$bsv.'-style']); - if ($dom[$key]['border'][$bsk]['dash'] < 0) { - $dom[$key]['border'][$bsk] = array(); - } - } - } - // check for CSS padding properties - if (isset($dom[$key]['style']['padding'])) { - $dom[$key]['padding'] = $this->getCSSPadding($dom[$key]['style']['padding']); - } else { - $dom[$key]['padding'] = $this->cell_padding; - } - foreach ($cellside as $psk => $psv) { - if (isset($dom[$key]['style']['padding-'.$psv])) { - $dom[$key]['padding'][$psk] = $this->getHTMLUnitToUnits($dom[$key]['style']['padding-'.$psv], 0, 'px', false); - } - } - // check for CSS margin properties - if (isset($dom[$key]['style']['margin'])) { - $dom[$key]['margin'] = $this->getCSSMargin($dom[$key]['style']['margin']); - } else { - $dom[$key]['margin'] = $this->cell_margin; - } - foreach ($cellside as $psk => $psv) { - if (isset($dom[$key]['style']['margin-'.$psv])) { - $dom[$key]['margin'][$psk] = $this->getHTMLUnitToUnits(str_replace('auto', '0', $dom[$key]['style']['margin-'.$psv]), 0, 'px', false); - } - } - // check for CSS border-spacing properties - if (isset($dom[$key]['style']['border-spacing'])) { - $dom[$key]['border-spacing'] = $this->getCSSBorderMargin($dom[$key]['style']['border-spacing']); - } - // page-break-inside - if (isset($dom[$key]['style']['page-break-inside']) AND ($dom[$key]['style']['page-break-inside'] == 'avoid')) { - $dom[$key]['attribute']['nobr'] = 'true'; - } - // page-break-before - if (isset($dom[$key]['style']['page-break-before'])) { - if ($dom[$key]['style']['page-break-before'] == 'always') { - $dom[$key]['attribute']['pagebreak'] = 'true'; - } elseif ($dom[$key]['style']['page-break-before'] == 'left') { - $dom[$key]['attribute']['pagebreak'] = 'left'; - } elseif ($dom[$key]['style']['page-break-before'] == 'right') { - $dom[$key]['attribute']['pagebreak'] = 'right'; - } - } - // page-break-after - if (isset($dom[$key]['style']['page-break-after'])) { - if ($dom[$key]['style']['page-break-after'] == 'always') { - $dom[$key]['attribute']['pagebreakafter'] = 'true'; - } elseif ($dom[$key]['style']['page-break-after'] == 'left') { - $dom[$key]['attribute']['pagebreakafter'] = 'left'; - } elseif ($dom[$key]['style']['page-break-after'] == 'right') { - $dom[$key]['attribute']['pagebreakafter'] = 'right'; - } - } - } - if (isset($dom[$key]['attribute']['display'])) { - $dom[$key]['hide'] = (trim(strtolower($dom[$key]['attribute']['display'])) == 'none'); - } - if (isset($dom[$key]['attribute']['border']) AND ($dom[$key]['attribute']['border'] != 0)) { - $borderstyle = $this->getCSSBorderStyle($dom[$key]['attribute']['border'].' solid black'); - if (!empty($borderstyle)) { - $dom[$key]['border']['LTRB'] = $borderstyle; - } - } - // check for font tag - if ($dom[$key]['value'] == 'font') { - // font family - if (isset($dom[$key]['attribute']['face'])) { - $dom[$key]['fontname'] = $this->getFontFamilyName($dom[$key]['attribute']['face']); - } - // font size - if (isset($dom[$key]['attribute']['size'])) { - if ($key > 0) { - if ($dom[$key]['attribute']['size'][0] == '+') { - $dom[$key]['fontsize'] = $dom[($dom[$key]['parent'])]['fontsize'] + intval(substr($dom[$key]['attribute']['size'], 1)); - } elseif ($dom[$key]['attribute']['size'][0] == '-') { - $dom[$key]['fontsize'] = $dom[($dom[$key]['parent'])]['fontsize'] - intval(substr($dom[$key]['attribute']['size'], 1)); - } else { - $dom[$key]['fontsize'] = intval($dom[$key]['attribute']['size']); - } - } else { - $dom[$key]['fontsize'] = intval($dom[$key]['attribute']['size']); - } - } - } - // force natural alignment for lists - if ((($dom[$key]['value'] == 'ul') OR ($dom[$key]['value'] == 'ol') OR ($dom[$key]['value'] == 'dl')) - AND (!isset($dom[$key]['align']) OR TCPDF_STATIC::empty_string($dom[$key]['align']) OR ($dom[$key]['align'] != 'J'))) { - if ($this->rtl) { - $dom[$key]['align'] = 'R'; - } else { - $dom[$key]['align'] = 'L'; - } - } - if (($dom[$key]['value'] == 'small') OR ($dom[$key]['value'] == 'sup') OR ($dom[$key]['value'] == 'sub')) { - if (!isset($dom[$key]['attribute']['size']) AND !isset($dom[$key]['style']['font-size'])) { - $dom[$key]['fontsize'] = $dom[$key]['fontsize'] * K_SMALL_RATIO; - } - } - if (($dom[$key]['value'] == 'strong') OR ($dom[$key]['value'] == 'b')) { - $dom[$key]['fontstyle'] .= 'B'; - } - if (($dom[$key]['value'] == 'em') OR ($dom[$key]['value'] == 'i')) { - $dom[$key]['fontstyle'] .= 'I'; - } - if ($dom[$key]['value'] == 'u') { - $dom[$key]['fontstyle'] .= 'U'; - } - if (($dom[$key]['value'] == 'del') OR ($dom[$key]['value'] == 's') OR ($dom[$key]['value'] == 'strike')) { - $dom[$key]['fontstyle'] .= 'D'; - } - if (!isset($dom[$key]['style']['text-decoration']) AND ($dom[$key]['value'] == 'a')) { - $dom[$key]['fontstyle'] = $this->htmlLinkFontStyle; - } - if (($dom[$key]['value'] == 'pre') OR ($dom[$key]['value'] == 'tt')) { - $dom[$key]['fontname'] = $this->default_monospaced_font; - } - if (!empty($dom[$key]['value']) AND ($dom[$key]['value'][0] == 'h') AND (intval($dom[$key]['value']{1}) > 0) AND (intval($dom[$key]['value']{1}) < 7)) { - // headings h1, h2, h3, h4, h5, h6 - if (!isset($dom[$key]['attribute']['size']) AND !isset($dom[$key]['style']['font-size'])) { - $headsize = (4 - intval($dom[$key]['value']{1})) * 2; - $dom[$key]['fontsize'] = $dom[0]['fontsize'] + $headsize; - } - if (!isset($dom[$key]['style']['font-weight'])) { - $dom[$key]['fontstyle'] .= 'B'; - } - } - if (($dom[$key]['value'] == 'table')) { - $dom[$key]['rows'] = 0; // number of rows - $dom[$key]['trids'] = array(); // IDs of TR elements - $dom[$key]['thead'] = ''; // table header rows - } - if (($dom[$key]['value'] == 'tr')) { - $dom[$key]['cols'] = 0; - if ($thead) { - $dom[$key]['thead'] = true; - // rows on thead block are printed as a separate table - } else { - $dom[$key]['thead'] = false; - // store the number of rows on table element - ++$dom[($dom[$key]['parent'])]['rows']; - // store the TR elements IDs on table element - array_push($dom[($dom[$key]['parent'])]['trids'], $key); - } - } - if (($dom[$key]['value'] == 'th') OR ($dom[$key]['value'] == 'td')) { - if (isset($dom[$key]['attribute']['colspan'])) { - $colspan = intval($dom[$key]['attribute']['colspan']); - } else { - $colspan = 1; - } - $dom[$key]['attribute']['colspan'] = $colspan; - $dom[($dom[$key]['parent'])]['cols'] += $colspan; - } - // text direction - if (isset($dom[$key]['attribute']['dir'])) { - $dom[$key]['dir'] = $dom[$key]['attribute']['dir']; - } - // set foreground color attribute - if (isset($dom[$key]['attribute']['color']) AND (!TCPDF_STATIC::empty_string($dom[$key]['attribute']['color']))) { - $dom[$key]['fgcolor'] = TCPDF_COLORS::convertHTMLColorToDec($dom[$key]['attribute']['color'], $this->spot_colors); - } elseif (!isset($dom[$key]['style']['color']) AND ($dom[$key]['value'] == 'a')) { - $dom[$key]['fgcolor'] = $this->htmlLinkColorArray; - } - // set background color attribute - if (isset($dom[$key]['attribute']['bgcolor']) AND (!TCPDF_STATIC::empty_string($dom[$key]['attribute']['bgcolor']))) { - $dom[$key]['bgcolor'] = TCPDF_COLORS::convertHTMLColorToDec($dom[$key]['attribute']['bgcolor'], $this->spot_colors); - } - // set stroke color attribute - if (isset($dom[$key]['attribute']['strokecolor']) AND (!TCPDF_STATIC::empty_string($dom[$key]['attribute']['strokecolor']))) { - $dom[$key]['strokecolor'] = TCPDF_COLORS::convertHTMLColorToDec($dom[$key]['attribute']['strokecolor'], $this->spot_colors); - } - // check for width attribute - if (isset($dom[$key]['attribute']['width'])) { - $dom[$key]['width'] = $dom[$key]['attribute']['width']; - } - // check for height attribute - if (isset($dom[$key]['attribute']['height'])) { - $dom[$key]['height'] = $dom[$key]['attribute']['height']; - } - // check for text alignment - if (isset($dom[$key]['attribute']['align']) AND (!TCPDF_STATIC::empty_string($dom[$key]['attribute']['align'])) AND ($dom[$key]['value'] !== 'img')) { - $dom[$key]['align'] = strtoupper($dom[$key]['attribute']['align'][0]); - } - // check for text rendering mode (the following attributes do not exist in HTML) - if (isset($dom[$key]['attribute']['stroke'])) { - // font stroke width - $dom[$key]['stroke'] = $this->getHTMLUnitToUnits($dom[$key]['attribute']['stroke'], $dom[$key]['fontsize'], 'pt', true); - } - if (isset($dom[$key]['attribute']['fill'])) { - // font fill - if ($dom[$key]['attribute']['fill'] == 'true') { - $dom[$key]['fill'] = true; - } else { - $dom[$key]['fill'] = false; - } - } - if (isset($dom[$key]['attribute']['clip'])) { - // clipping mode - if ($dom[$key]['attribute']['clip'] == 'true') { - $dom[$key]['clip'] = true; - } else { - $dom[$key]['clip'] = false; - } - } - } // end opening tag - } else { - // text - $dom[$key]['tag'] = false; - $dom[$key]['block'] = false; - $dom[$key]['parent'] = end($level); - $dom[$key]['dir'] = $dom[$dom[$key]['parent']]['dir']; - if (!empty($dom[$dom[$key]['parent']]['text-transform'])) { - // text-transform for unicode requires mb_convert_case (Multibyte String Functions) - if (function_exists('mb_convert_case')) { - $ttm = array('capitalize' => MB_CASE_TITLE, 'uppercase' => MB_CASE_UPPER, 'lowercase' => MB_CASE_LOWER); - if (isset($ttm[$dom[$dom[$key]['parent']]['text-transform']])) { - $element = mb_convert_case($element, $ttm[$dom[$dom[$key]['parent']]['text-transform']], $this->encoding); - } - } elseif (!$this->isunicode) { - switch ($dom[$dom[$key]['parent']]['text-transform']) { - case 'capitalize': { - $element = ucwords(strtolower($element)); - break; - } - case 'uppercase': { - $element = strtoupper($element); - break; - } - case 'lowercase': { - $element = strtolower($element); - break; - } - } - } - } - $dom[$key]['value'] = stripslashes($this->unhtmlentities($element)); - } - ++$elkey; - ++$key; - } - return $dom; - } - - /** - * Returns the string used to find spaces - * @return string - * @protected - * @author Nicola Asuni - * @since 4.8.024 (2010-01-15) - */ - protected function getSpaceString() { - $spacestr = chr(32); - if ($this->isUnicodeFont()) { - $spacestr = chr(0).chr(32); - } - return $spacestr; - } - - /** - * Return an hash code used to ensure that the serialized data has been generated by this TCPDF instance. - * @param $data (string) serialized data - * @return string - * @public static - */ - protected function getHashForTCPDFtagParams($data) { - return md5(strlen($data).$this->file_id.$data); - } - - /** - * Serialize an array of parameters to be used with TCPDF tag in HTML code. - * @param $data (array) parameters array - * @return string containing serialized data - * @public static - */ - public function serializeTCPDFtagParameters($data) { - $encoded = urlencode(json_encode($data)); - return $this->getHashForTCPDFtagParams($encoded).$encoded; - } - - /** - * Unserialize parameters to be used with TCPDF tag in HTML code. - * @param $data (string) serialized data - * @return array containing unserialized data - * @protected static - */ - protected function unserializeTCPDFtagParameters($data) { - $hash = substr($data, 0, 32); - $encoded = substr($data, 32); - if ($hash != $this->getHashForTCPDFtagParams($encoded)) { - $this->Error('Invalid parameters'); - } - return json_decode(urldecode($encoded), true); - } - - /** - * Prints a cell (rectangular area) with optional borders, background color and html text string. - * The upper-left corner of the cell corresponds to the current position. After the call, the current position moves to the right or to the next line.
        - * If automatic page breaking is enabled and the cell goes beyond the limit, a page break is done before outputting. - * IMPORTANT: The HTML must be well formatted - try to clean-up it using an application like HTML-Tidy before submitting. - * Supported tags are: a, b, blockquote, br, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, img, li, ol, p, pre, small, span, strong, sub, sup, table, tcpdf, td, th, thead, tr, tt, u, ul - * NOTE: all the HTML attributes must be enclosed in double-quote. - * @param $w (float) Cell width. If 0, the cell extends up to the right margin. - * @param $h (float) Cell minimum height. The cell extends automatically if needed. - * @param $x (float) upper-left corner X coordinate - * @param $y (float) upper-left corner Y coordinate - * @param $html (string) html text to print. Default value: empty string. - * @param $border (mixed) Indicates if borders must be drawn around the cell. The value can be a number:
        • 0: no border (default)
        • 1: frame
        or a string containing some or all of the following characters (in any order):
        • L: left
        • T: top
        • R: right
        • B: bottom
        or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) - * @param $ln (int) Indicates where the current position should go after the call. Possible values are:
        • 0: to the right (or left for RTL language)
        • 1: to the beginning of the next line
        • 2: below
        -Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: 0. - * @param $fill (boolean) Indicates if the cell background must be painted (true) or transparent (false). - * @param $reseth (boolean) if true reset the last cell height (default true). - * @param $align (string) Allows to center or align the text. Possible values are:
        • L : left align
        • C : center
        • R : right align
        • '' : empty string : left for LTR or right for RTL
        - * @param $autopadding (boolean) if true, uses internal padding and automatically adjust it to account for line width. - * @see Multicell(), writeHTML() - * @public - */ - public function writeHTMLCell($w, $h, $x, $y, $html='', $border=0, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true) { - return $this->MultiCell($w, $h, $html, $border, $align, $fill, $ln, $x, $y, $reseth, 0, true, $autopadding, 0, 'T', false); - } - - /** - * Allows to preserve some HTML formatting (limited support).
        - * IMPORTANT: The HTML must be well formatted - try to clean-up it using an application like HTML-Tidy before submitting. - * Supported tags are: a, b, blockquote, br, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, img, li, ol, p, pre, small, span, strong, sub, sup, table, tcpdf, td, th, thead, tr, tt, u, ul - * NOTE: all the HTML attributes must be enclosed in double-quote. - * @param $html (string) text to display - * @param $ln (boolean) if true add a new line after text (default = true) - * @param $fill (boolean) Indicates if the background must be painted (true) or transparent (false). - * @param $reseth (boolean) if true reset the last cell height (default false). - * @param $cell (boolean) if true add the current left (or right for RTL) padding to each Write (default false). - * @param $align (string) Allows to center or align the text. Possible values are:
        • L : left align
        • C : center
        • R : right align
        • '' : empty string : left for LTR or right for RTL
        - * @public - */ - public function writeHTML($html, $ln=true, $fill=false, $reseth=false, $cell=false, $align='') { - $gvars = $this->getGraphicVars(); - // store current values - $prev_cell_margin = $this->cell_margin; - $prev_cell_padding = $this->cell_padding; - $prevPage = $this->page; - $prevlMargin = $this->lMargin; - $prevrMargin = $this->rMargin; - $curfontname = $this->FontFamily; - $curfontstyle = $this->FontStyle; - $curfontsize = $this->FontSizePt; - $curfontascent = $this->getFontAscent($curfontname, $curfontstyle, $curfontsize); - $curfontdescent = $this->getFontDescent($curfontname, $curfontstyle, $curfontsize); - $curfontstretcing = $this->font_stretching; - $curfonttracking = $this->font_spacing; - $this->newline = true; - $newline = true; - $startlinepage = $this->page; - $minstartliney = $this->y; - $maxbottomliney = 0; - $startlinex = $this->x; - $startliney = $this->y; - $yshift = 0; - $loop = 0; - $curpos = 0; - $this_method_vars = array(); - $undo = false; - $fontaligned = false; - $reverse_dir = false; // true when the text direction is reversed - $this->premode = false; - if ($this->inxobj) { - // we are inside an XObject template - $pask = count($this->xobjects[$this->xobjid]['annotations']); - } elseif (isset($this->PageAnnots[$this->page])) { - $pask = count($this->PageAnnots[$this->page]); - } else { - $pask = 0; - } - if ($this->inxobj) { - // we are inside an XObject template - $startlinepos = strlen($this->xobjects[$this->xobjid]['outdata']); - } elseif (!$this->InFooter) { - if (isset($this->footerlen[$this->page])) { - $this->footerpos[$this->page] = $this->pagelen[$this->page] - $this->footerlen[$this->page]; - } else { - $this->footerpos[$this->page] = $this->pagelen[$this->page]; - } - $startlinepos = $this->footerpos[$this->page]; - } else { - // we are inside the footer - $startlinepos = $this->pagelen[$this->page]; - } - $lalign = $align; - $plalign = $align; - if ($this->rtl) { - $w = $this->x - $this->lMargin; - } else { - $w = $this->w - $this->rMargin - $this->x; - } - $w -= ($this->cell_padding['L'] + $this->cell_padding['R']); - if ($cell) { - if ($this->rtl) { - $this->x -= $this->cell_padding['R']; - $this->lMargin += $this->cell_padding['R']; - } else { - $this->x += $this->cell_padding['L']; - $this->rMargin += $this->cell_padding['L']; - } - } - if ($this->customlistindent >= 0) { - $this->listindent = $this->customlistindent; - } else { - $this->listindent = $this->GetStringWidth('000000'); - } - $this->listindentlevel = 0; - // save previous states - $prev_cell_height_ratio = $this->cell_height_ratio; - $prev_listnum = $this->listnum; - $prev_listordered = $this->listordered; - $prev_listcount = $this->listcount; - $prev_lispacer = $this->lispacer; - $this->listnum = 0; - $this->listordered = array(); - $this->listcount = array(); - $this->lispacer = ''; - if ((TCPDF_STATIC::empty_string($this->lasth)) OR ($reseth)) { - // reset row height - $this->resetLastH(); - } - $dom = $this->getHtmlDomArray($html); - $maxel = count($dom); - $key = 0; - while ($key < $maxel) { - if ($dom[$key]['tag'] AND $dom[$key]['opening'] AND $dom[$key]['hide']) { - // store the node key - $hidden_node_key = $key; - if ($dom[$key]['self']) { - // skip just this self-closing tag - ++$key; - } else { - // skip this and all children tags - while (($key < $maxel) AND (!$dom[$key]['tag'] OR $dom[$key]['opening'] OR ($dom[$key]['parent'] != $hidden_node_key))) { - // skip hidden objects - ++$key; - } - ++$key; - } - } - if ($dom[$key]['tag'] AND isset($dom[$key]['attribute']['pagebreak'])) { - // check for pagebreak - if (($dom[$key]['attribute']['pagebreak'] == 'true') OR ($dom[$key]['attribute']['pagebreak'] == 'left') OR ($dom[$key]['attribute']['pagebreak'] == 'right')) { - // add a page (or trig AcceptPageBreak() for multicolumn mode) - $this->checkPageBreak($this->PageBreakTrigger + 1); - $this->htmlvspace = ($this->PageBreakTrigger + 1); - } - if ((($dom[$key]['attribute']['pagebreak'] == 'left') AND (((!$this->rtl) AND (($this->page % 2) == 0)) OR (($this->rtl) AND (($this->page % 2) != 0)))) - OR (($dom[$key]['attribute']['pagebreak'] == 'right') AND (((!$this->rtl) AND (($this->page % 2) != 0)) OR (($this->rtl) AND (($this->page % 2) == 0))))) { - // add a page (or trig AcceptPageBreak() for multicolumn mode) - $this->checkPageBreak($this->PageBreakTrigger + 1); - $this->htmlvspace = ($this->PageBreakTrigger + 1); - } - } - if ($dom[$key]['tag'] AND $dom[$key]['opening'] AND isset($dom[$key]['attribute']['nobr']) AND ($dom[$key]['attribute']['nobr'] == 'true')) { - if (isset($dom[($dom[$key]['parent'])]['attribute']['nobr']) AND ($dom[($dom[$key]['parent'])]['attribute']['nobr'] == 'true')) { - $dom[$key]['attribute']['nobr'] = false; - } else { - // store current object - $this->startTransaction(); - // save this method vars - $this_method_vars['html'] = $html; - $this_method_vars['ln'] = $ln; - $this_method_vars['fill'] = $fill; - $this_method_vars['reseth'] = $reseth; - $this_method_vars['cell'] = $cell; - $this_method_vars['align'] = $align; - $this_method_vars['gvars'] = $gvars; - $this_method_vars['prevPage'] = $prevPage; - $this_method_vars['prev_cell_margin'] = $prev_cell_margin; - $this_method_vars['prev_cell_padding'] = $prev_cell_padding; - $this_method_vars['prevlMargin'] = $prevlMargin; - $this_method_vars['prevrMargin'] = $prevrMargin; - $this_method_vars['curfontname'] = $curfontname; - $this_method_vars['curfontstyle'] = $curfontstyle; - $this_method_vars['curfontsize'] = $curfontsize; - $this_method_vars['curfontascent'] = $curfontascent; - $this_method_vars['curfontdescent'] = $curfontdescent; - $this_method_vars['curfontstretcing'] = $curfontstretcing; - $this_method_vars['curfonttracking'] = $curfonttracking; - $this_method_vars['minstartliney'] = $minstartliney; - $this_method_vars['maxbottomliney'] = $maxbottomliney; - $this_method_vars['yshift'] = $yshift; - $this_method_vars['startlinepage'] = $startlinepage; - $this_method_vars['startlinepos'] = $startlinepos; - $this_method_vars['startlinex'] = $startlinex; - $this_method_vars['startliney'] = $startliney; - $this_method_vars['newline'] = $newline; - $this_method_vars['loop'] = $loop; - $this_method_vars['curpos'] = $curpos; - $this_method_vars['pask'] = $pask; - $this_method_vars['lalign'] = $lalign; - $this_method_vars['plalign'] = $plalign; - $this_method_vars['w'] = $w; - $this_method_vars['prev_cell_height_ratio'] = $prev_cell_height_ratio; - $this_method_vars['prev_listnum'] = $prev_listnum; - $this_method_vars['prev_listordered'] = $prev_listordered; - $this_method_vars['prev_listcount'] = $prev_listcount; - $this_method_vars['prev_lispacer'] = $prev_lispacer; - $this_method_vars['fontaligned'] = $fontaligned; - $this_method_vars['key'] = $key; - $this_method_vars['dom'] = $dom; - } - } - // print THEAD block - if (($dom[$key]['value'] == 'tr') AND isset($dom[$key]['thead']) AND $dom[$key]['thead']) { - if (isset($dom[$key]['parent']) AND isset($dom[$dom[$key]['parent']]['thead']) AND !TCPDF_STATIC::empty_string($dom[$dom[$key]['parent']]['thead'])) { - $this->inthead = true; - // print table header (thead) - $this->writeHTML($this->thead, false, false, false, false, ''); - // check if we are on a new page or on a new column - if (($this->y < $this->start_transaction_y) OR ($this->checkPageBreak($this->lasth, '', false))) { - // we are on a new page or on a new column and the total object height is less than the available vertical space. - // restore previous object - $this->rollbackTransaction(true); - // restore previous values - foreach ($this_method_vars as $vkey => $vval) { - $$vkey = $vval; - } - // disable table header - $tmp_thead = $this->thead; - $this->thead = ''; - // add a page (or trig AcceptPageBreak() for multicolumn mode) - $pre_y = $this->y; - if ((!$this->checkPageBreak($this->PageBreakTrigger + 1)) AND ($this->y < $pre_y)) { - // fix for multicolumn mode - $startliney = $this->y; - } - $this->start_transaction_page = $this->page; - $this->start_transaction_y = $this->y; - // restore table header - $this->thead = $tmp_thead; - // fix table border properties - if (isset($dom[$dom[$key]['parent']]['attribute']['cellspacing'])) { - $tmp_cellspacing = $this->getHTMLUnitToUnits($dom[$dom[$key]['parent']]['attribute']['cellspacing'], 1, 'px'); - } elseif (isset($dom[$dom[$key]['parent']]['border-spacing'])) { - $tmp_cellspacing = $dom[$dom[$key]['parent']]['border-spacing']['V']; - } else { - $tmp_cellspacing = 0; - } - $dom[$dom[$key]['parent']]['borderposition']['page'] = $this->page; - $dom[$dom[$key]['parent']]['borderposition']['column'] = $this->current_column; - $dom[$dom[$key]['parent']]['borderposition']['y'] = $this->y + $tmp_cellspacing; - $xoffset = ($this->x - $dom[$dom[$key]['parent']]['borderposition']['x']); - $dom[$dom[$key]['parent']]['borderposition']['x'] += $xoffset; - $dom[$dom[$key]['parent']]['borderposition']['xmax'] += $xoffset; - // print table header (thead) - $this->writeHTML($this->thead, false, false, false, false, ''); - } - } - // move $key index forward to skip THEAD block - while ( ($key < $maxel) AND (!( - ($dom[$key]['tag'] AND $dom[$key]['opening'] AND ($dom[$key]['value'] == 'tr') AND (!isset($dom[$key]['thead']) OR !$dom[$key]['thead'])) - OR ($dom[$key]['tag'] AND (!$dom[$key]['opening']) AND ($dom[$key]['value'] == 'table'))) )) { - ++$key; - } - } - if ($dom[$key]['tag'] OR ($key == 0)) { - if ((($dom[$key]['value'] == 'table') OR ($dom[$key]['value'] == 'tr')) AND (isset($dom[$key]['align']))) { - $dom[$key]['align'] = ($this->rtl) ? 'R' : 'L'; - } - // vertically align image in line - if ((!$this->newline) AND ($dom[$key]['value'] == 'img') AND (isset($dom[$key]['height'])) AND ($dom[$key]['height'] > 0)) { - // get image height - $imgh = $this->getHTMLUnitToUnits($dom[$key]['height'], ($dom[$key]['fontsize'] / $this->k), 'px'); - $autolinebreak = false; - if (!empty($dom[$key]['width'])) { - $imgw = $this->getHTMLUnitToUnits($dom[$key]['width'], ($dom[$key]['fontsize'] / $this->k), 'px', false); - if (($imgw <= ($this->w - $this->lMargin - $this->rMargin - $this->cell_padding['L'] - $this->cell_padding['R'])) - AND ((($this->rtl) AND (($this->x - $imgw) < ($this->lMargin + $this->cell_padding['L']))) - OR ((!$this->rtl) AND (($this->x + $imgw) > ($this->w - $this->rMargin - $this->cell_padding['R']))))) { - // add automatic line break - $autolinebreak = true; - $this->Ln('', $cell); - if ((!$dom[($key-1)]['tag']) AND ($dom[($key-1)]['value'] == ' ')) { - // go back to evaluate this line break - --$key; - } - } - } - if (!$autolinebreak) { - if ($this->inPageBody()) { - $pre_y = $this->y; - // check for page break - if ((!$this->checkPageBreak($imgh)) AND ($this->y < $pre_y)) { - // fix for multicolumn mode - $startliney = $this->y; - } - } - if ($this->page > $startlinepage) { - // fix line splitted over two pages - if (isset($this->footerlen[$startlinepage])) { - $curpos = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage]; - } - // line to be moved one page forward - $pagebuff = $this->getPageBuffer($startlinepage); - $linebeg = substr($pagebuff, $startlinepos, ($curpos - $startlinepos)); - $tstart = substr($pagebuff, 0, $startlinepos); - $tend = substr($this->getPageBuffer($startlinepage), $curpos); - // remove line from previous page - $this->setPageBuffer($startlinepage, $tstart.''.$tend); - $pagebuff = $this->getPageBuffer($this->page); - $tstart = substr($pagebuff, 0, $this->cntmrk[$this->page]); - $tend = substr($pagebuff, $this->cntmrk[$this->page]); - // add line start to current page - $yshift = ($minstartliney - $this->y); - if ($fontaligned) { - $yshift += ($curfontsize / $this->k); - } - $try = sprintf('1 0 0 1 0 %F cm', ($yshift * $this->k)); - $this->setPageBuffer($this->page, $tstart."\nq\n".$try."\n".$linebeg."\nQ\n".$tend); - // shift the annotations and links - if (isset($this->PageAnnots[$this->page])) { - $next_pask = count($this->PageAnnots[$this->page]); - } else { - $next_pask = 0; - } - if (isset($this->PageAnnots[$startlinepage])) { - foreach ($this->PageAnnots[$startlinepage] as $pak => $pac) { - if ($pak >= $pask) { - $this->PageAnnots[$this->page][] = $pac; - unset($this->PageAnnots[$startlinepage][$pak]); - $npak = count($this->PageAnnots[$this->page]) - 1; - $this->PageAnnots[$this->page][$npak]['y'] -= $yshift; - } - } - } - $pask = $next_pask; - $startlinepos = $this->cntmrk[$this->page]; - $startlinepage = $this->page; - $startliney = $this->y; - $this->newline = false; - } - $this->y += ($this->getCellHeight($curfontsize / $this->k) - ($curfontdescent * $this->cell_height_ratio) - $imgh); - $minstartliney = min($this->y, $minstartliney); - $maxbottomliney = ($startliney + $this->getCellHeight($curfontsize / $this->k)); - } - } elseif (isset($dom[$key]['fontname']) OR isset($dom[$key]['fontstyle']) OR isset($dom[$key]['fontsize']) OR isset($dom[$key]['line-height'])) { - // account for different font size - $pfontname = $curfontname; - $pfontstyle = $curfontstyle; - $pfontsize = $curfontsize; - $fontname = (isset($dom[$key]['fontname']) ? $dom[$key]['fontname'] : $curfontname); - $fontstyle = (isset($dom[$key]['fontstyle']) ? $dom[$key]['fontstyle'] : $curfontstyle); - $fontsize = (isset($dom[$key]['fontsize']) ? $dom[$key]['fontsize'] : $curfontsize); - $fontascent = $this->getFontAscent($fontname, $fontstyle, $fontsize); - $fontdescent = $this->getFontDescent($fontname, $fontstyle, $fontsize); - if (($fontname != $curfontname) OR ($fontstyle != $curfontstyle) OR ($fontsize != $curfontsize) - OR ($this->cell_height_ratio != $dom[$key]['line-height']) - OR ($dom[$key]['tag'] AND $dom[$key]['opening'] AND ($dom[$key]['value'] == 'li')) ) { - if (($key < ($maxel - 1)) AND ( - ($dom[$key]['tag'] AND $dom[$key]['opening'] AND ($dom[$key]['value'] == 'li')) - OR ($this->cell_height_ratio != $dom[$key]['line-height']) - OR (!$this->newline AND is_numeric($fontsize) AND is_numeric($curfontsize) - AND ($fontsize >= 0) AND ($curfontsize >= 0) - AND (($fontsize != $curfontsize) OR ($fontstyle != $curfontstyle) OR ($fontname != $curfontname))) - )) { - if ($this->page > $startlinepage) { - // fix lines splitted over two pages - if (isset($this->footerlen[$startlinepage])) { - $curpos = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage]; - } - // line to be moved one page forward - $pagebuff = $this->getPageBuffer($startlinepage); - $linebeg = substr($pagebuff, $startlinepos, ($curpos - $startlinepos)); - $tstart = substr($pagebuff, 0, $startlinepos); - $tend = substr($this->getPageBuffer($startlinepage), $curpos); - // remove line start from previous page - $this->setPageBuffer($startlinepage, $tstart.''.$tend); - $pagebuff = $this->getPageBuffer($this->page); - $tstart = substr($pagebuff, 0, $this->cntmrk[$this->page]); - $tend = substr($pagebuff, $this->cntmrk[$this->page]); - // add line start to current page - $yshift = ($minstartliney - $this->y); - $try = sprintf('1 0 0 1 0 %F cm', ($yshift * $this->k)); - $this->setPageBuffer($this->page, $tstart."\nq\n".$try."\n".$linebeg."\nQ\n".$tend); - // shift the annotations and links - if (isset($this->PageAnnots[$this->page])) { - $next_pask = count($this->PageAnnots[$this->page]); - } else { - $next_pask = 0; - } - if (isset($this->PageAnnots[$startlinepage])) { - foreach ($this->PageAnnots[$startlinepage] as $pak => $pac) { - if ($pak >= $pask) { - $this->PageAnnots[$this->page][] = $pac; - unset($this->PageAnnots[$startlinepage][$pak]); - $npak = count($this->PageAnnots[$this->page]) - 1; - $this->PageAnnots[$this->page][$npak]['y'] -= $yshift; - } - } - } - $pask = $next_pask; - $startlinepos = $this->cntmrk[$this->page]; - $startlinepage = $this->page; - $startliney = $this->y; - } - if (!isset($dom[$key]['line-height'])) { - $dom[$key]['line-height'] = $this->cell_height_ratio; - } - if (!$dom[$key]['block']) { - if (!(isset($dom[($key + 1)]) AND $dom[($key + 1)]['tag'] AND (!$dom[($key + 1)]['opening']) AND ($dom[($key + 1)]['value'] != 'li') AND $dom[$key]['tag'] AND (!$dom[$key]['opening']))) { - $this->y += (((($curfontsize * $this->cell_height_ratio) - ($fontsize * $dom[$key]['line-height'])) / $this->k) + $curfontascent - $fontascent - $curfontdescent + $fontdescent) / 2; - } - if (($dom[$key]['value'] != 'sup') AND ($dom[$key]['value'] != 'sub')) { - $current_line_align_data = array($key, $minstartliney, $maxbottomliney); - if (isset($line_align_data) AND (($line_align_data[0] == ($key - 1)) OR (($line_align_data[0] == ($key - 2)) AND (isset($dom[($key - 1)])) AND (preg_match('/^([\s]+)$/', $dom[($key - 1)]['value']) > 0)))) { - $minstartliney = min($this->y, $line_align_data[1]); - $maxbottomliney = max(($this->y + $this->getCellHeight($fontsize / $this->k)), $line_align_data[2]); - } else { - $minstartliney = min($this->y, $minstartliney); - $maxbottomliney = max(($this->y + $this->getCellHeight($fontsize / $this->k)), $maxbottomliney); - } - $line_align_data = $current_line_align_data; - } - } - $this->cell_height_ratio = $dom[$key]['line-height']; - $fontaligned = true; - } - $this->SetFont($fontname, $fontstyle, $fontsize); - // reset row height - $this->resetLastH(); - $curfontname = $fontname; - $curfontstyle = $fontstyle; - $curfontsize = $fontsize; - $curfontascent = $fontascent; - $curfontdescent = $fontdescent; - } - } - // set text rendering mode - $textstroke = isset($dom[$key]['stroke']) ? $dom[$key]['stroke'] : $this->textstrokewidth; - $textfill = isset($dom[$key]['fill']) ? $dom[$key]['fill'] : (($this->textrendermode % 2) == 0); - $textclip = isset($dom[$key]['clip']) ? $dom[$key]['clip'] : ($this->textrendermode > 3); - $this->setTextRenderingMode($textstroke, $textfill, $textclip); - if (isset($dom[$key]['font-stretch']) AND ($dom[$key]['font-stretch'] !== false)) { - $this->setFontStretching($dom[$key]['font-stretch']); - } - if (isset($dom[$key]['letter-spacing']) AND ($dom[$key]['letter-spacing'] !== false)) { - $this->setFontSpacing($dom[$key]['letter-spacing']); - } - if (($plalign == 'J') AND $dom[$key]['block']) { - $plalign = ''; - } - // get current position on page buffer - $curpos = $this->pagelen[$startlinepage]; - if (isset($dom[$key]['bgcolor']) AND ($dom[$key]['bgcolor'] !== false)) { - $this->SetFillColorArray($dom[$key]['bgcolor']); - $wfill = true; - } else { - $wfill = $fill | false; - } - if (isset($dom[$key]['fgcolor']) AND ($dom[$key]['fgcolor'] !== false)) { - $this->SetTextColorArray($dom[$key]['fgcolor']); - } - if (isset($dom[$key]['strokecolor']) AND ($dom[$key]['strokecolor'] !== false)) { - $this->SetDrawColorArray($dom[$key]['strokecolor']); - } - if (isset($dom[$key]['align'])) { - $lalign = $dom[$key]['align']; - } - if (TCPDF_STATIC::empty_string($lalign)) { - $lalign = $align; - } - } - // align lines - if ($this->newline AND (strlen($dom[$key]['value']) > 0) AND ($dom[$key]['value'] != 'td') AND ($dom[$key]['value'] != 'th')) { - $newline = true; - $fontaligned = false; - // we are at the beginning of a new line - if (isset($startlinex)) { - $yshift = ($minstartliney - $startliney); - if (($yshift > 0) OR ($this->page > $startlinepage)) { - $yshift = 0; - } - $t_x = 0; - // the last line must be shifted to be aligned as requested - $linew = abs($this->endlinex - $startlinex); - if ($this->inxobj) { - // we are inside an XObject template - $pstart = substr($this->xobjects[$this->xobjid]['outdata'], 0, $startlinepos); - if (isset($opentagpos)) { - $midpos = $opentagpos; - } else { - $midpos = 0; - } - if ($midpos > 0) { - $pmid = substr($this->xobjects[$this->xobjid]['outdata'], $startlinepos, ($midpos - $startlinepos)); - $pend = substr($this->xobjects[$this->xobjid]['outdata'], $midpos); - } else { - $pmid = substr($this->xobjects[$this->xobjid]['outdata'], $startlinepos); - $pend = ''; - } - } else { - $pstart = substr($this->getPageBuffer($startlinepage), 0, $startlinepos); - if (isset($opentagpos) AND isset($this->footerlen[$startlinepage]) AND (!$this->InFooter)) { - $this->footerpos[$startlinepage] = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage]; - $midpos = min($opentagpos, $this->footerpos[$startlinepage]); - } elseif (isset($opentagpos)) { - $midpos = $opentagpos; - } elseif (isset($this->footerlen[$startlinepage]) AND (!$this->InFooter)) { - $this->footerpos[$startlinepage] = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage]; - $midpos = $this->footerpos[$startlinepage]; - } else { - $midpos = 0; - } - if ($midpos > 0) { - $pmid = substr($this->getPageBuffer($startlinepage), $startlinepos, ($midpos - $startlinepos)); - $pend = substr($this->getPageBuffer($startlinepage), $midpos); - } else { - $pmid = substr($this->getPageBuffer($startlinepage), $startlinepos); - $pend = ''; - } - } - if ((isset($plalign) AND ((($plalign == 'C') OR ($plalign == 'J') OR (($plalign == 'R') AND (!$this->rtl)) OR (($plalign == 'L') AND ($this->rtl)))))) { - // calculate shifting amount - $tw = $w; - if (($plalign == 'J') AND $this->isRTLTextDir() AND ($this->num_columns > 1)) { - $tw += $this->cell_padding['R']; - } - if ($this->lMargin != $prevlMargin) { - $tw += ($prevlMargin - $this->lMargin); - } - if ($this->rMargin != $prevrMargin) { - $tw += ($prevrMargin - $this->rMargin); - } - $one_space_width = $this->GetStringWidth(chr(32)); - $no = 0; // number of spaces on a line contained on a single block - if ($this->isRTLTextDir()) { // RTL - // remove left space if exist - $pos1 = TCPDF_STATIC::revstrpos($pmid, '[('); - if ($pos1 > 0) { - $pos1 = intval($pos1); - if ($this->isUnicodeFont()) { - $pos2 = intval(TCPDF_STATIC::revstrpos($pmid, '[('.chr(0).chr(32))); - $spacelen = 2; - } else { - $pos2 = intval(TCPDF_STATIC::revstrpos($pmid, '[('.chr(32))); - $spacelen = 1; - } - if ($pos1 == $pos2) { - $pmid = substr($pmid, 0, ($pos1 + 2)).substr($pmid, ($pos1 + 2 + $spacelen)); - if (substr($pmid, $pos1, 4) == '[()]') { - $linew -= $one_space_width; - } elseif ($pos1 == strpos($pmid, '[(')) { - $no = 1; - } - } - } - } else { // LTR - // remove right space if exist - $pos1 = TCPDF_STATIC::revstrpos($pmid, ')]'); - if ($pos1 > 0) { - $pos1 = intval($pos1); - if ($this->isUnicodeFont()) { - $pos2 = intval(TCPDF_STATIC::revstrpos($pmid, chr(0).chr(32).')]')) + 2; - $spacelen = 2; - } else { - $pos2 = intval(TCPDF_STATIC::revstrpos($pmid, chr(32).')]')) + 1; - $spacelen = 1; - } - if ($pos1 == $pos2) { - $pmid = substr($pmid, 0, ($pos1 - $spacelen)).substr($pmid, $pos1); - $linew -= $one_space_width; - } - } - } - $mdiff = ($tw - $linew); - if ($plalign == 'C') { - if ($this->rtl) { - $t_x = -($mdiff / 2); - } else { - $t_x = ($mdiff / 2); - } - } elseif ($plalign == 'R') { - // right alignment on LTR document - $t_x = $mdiff; - } elseif ($plalign == 'L') { - // left alignment on RTL document - $t_x = -$mdiff; - } elseif (($plalign == 'J') AND ($plalign == $lalign)) { - // Justification - if ($this->isRTLTextDir()) { - // align text on the left - $t_x = -$mdiff; - } - $ns = 0; // number of spaces - $pmidtemp = $pmid; - // escape special characters - $pmidtemp = preg_replace('/[\\\][\(]/x', '\\#!#OP#!#', $pmidtemp); - $pmidtemp = preg_replace('/[\\\][\)]/x', '\\#!#CP#!#', $pmidtemp); - // search spaces - if (preg_match_all('/\[\(([^\)]*)\)\]/x', $pmidtemp, $lnstring, PREG_PATTERN_ORDER)) { - $spacestr = $this->getSpaceString(); - $maxkk = count($lnstring[1]) - 1; - for ($kk=0; $kk <= $maxkk; ++$kk) { - // restore special characters - $lnstring[1][$kk] = str_replace('#!#OP#!#', '(', $lnstring[1][$kk]); - $lnstring[1][$kk] = str_replace('#!#CP#!#', ')', $lnstring[1][$kk]); - // store number of spaces on the strings - $lnstring[2][$kk] = substr_count($lnstring[1][$kk], $spacestr); - // count total spaces on line - $ns += $lnstring[2][$kk]; - $lnstring[3][$kk] = $ns; - } - if ($ns == 0) { - $ns = 1; - } - // calculate additional space to add to each existing space - $spacewidth = ($mdiff / ($ns - $no)) * $this->k; - if ($this->FontSize <= 0) { - $this->FontSize = 1; - } - $spacewidthu = -1000 * ($mdiff + (($ns + $no) * $one_space_width)) / $ns / $this->FontSize; - if ($this->font_spacing != 0) { - // fixed spacing mode - $osw = -1000 * $this->font_spacing / $this->FontSize; - $spacewidthu += $osw; - } - $nsmax = $ns; - $ns = 0; - reset($lnstring); - $offset = 0; - $strcount = 0; - $prev_epsposbeg = 0; - $textpos = 0; - if ($this->isRTLTextDir()) { - $textpos = $this->wPt; - } - while (preg_match('/([0-9\.\+\-]*)[\s](Td|cm|m|l|c|re)[\s]/x', $pmid, $strpiece, PREG_OFFSET_CAPTURE, $offset) == 1) { - // check if we are inside a string section '[( ... )]' - $stroffset = strpos($pmid, '[(', $offset); - if (($stroffset !== false) AND ($stroffset <= $strpiece[2][1])) { - // set offset to the end of string section - $offset = strpos($pmid, ')]', $stroffset); - while (($offset !== false) AND ($pmid[($offset - 1)] == '\\')) { - $offset = strpos($pmid, ')]', ($offset + 1)); - } - if ($offset === false) { - $this->Error('HTML Justification: malformed PDF code.'); - } - continue; - } - if ($this->isRTLTextDir()) { - $spacew = ($spacewidth * ($nsmax - $ns)); - } else { - $spacew = ($spacewidth * $ns); - } - $offset = $strpiece[2][1] + strlen($strpiece[2][0]); - $epsposend = strpos($pmid, $this->epsmarker.'Q', $offset); - if ($epsposend !== null) { - $epsposend += strlen($this->epsmarker.'Q'); - $epsposbeg = strpos($pmid, 'q'.$this->epsmarker, $offset); - if ($epsposbeg === null) { - $epsposbeg = strpos($pmid, 'q'.$this->epsmarker, ($prev_epsposbeg - 6)); - $prev_epsposbeg = $epsposbeg; - } - if (($epsposbeg > 0) AND ($epsposend > 0) AND ($offset > $epsposbeg) AND ($offset < $epsposend)) { - // shift EPS images - $trx = sprintf('1 0 0 1 %F 0 cm', $spacew); - $pmid_b = substr($pmid, 0, $epsposbeg); - $pmid_m = substr($pmid, $epsposbeg, ($epsposend - $epsposbeg)); - $pmid_e = substr($pmid, $epsposend); - $pmid = $pmid_b."\nq\n".$trx."\n".$pmid_m."\nQ\n".$pmid_e; - $offset = $epsposend; - continue; - } - } - $currentxpos = 0; - // shift blocks of code - switch ($strpiece[2][0]) { - case 'Td': - case 'cm': - case 'm': - case 'l': { - // get current X position - preg_match('/([0-9\.\+\-]*)[\s]('.$strpiece[1][0].')[\s]('.$strpiece[2][0].')([\s]*)/x', $pmid, $xmatches); - if (!isset($xmatches[1])) { - break; - } - $currentxpos = $xmatches[1]; - $textpos = $currentxpos; - if (($strcount <= $maxkk) AND ($strpiece[2][0] == 'Td')) { - $ns = $lnstring[3][$strcount]; - if ($this->isRTLTextDir()) { - $spacew = ($spacewidth * ($nsmax - $ns)); - } - ++$strcount; - } - // justify block - if (preg_match('/([0-9\.\+\-]*)[\s]('.$strpiece[1][0].')[\s]('.$strpiece[2][0].')([\s]*)/x', $pmid, $pmatch) == 1) { - $newpmid = sprintf('%F',(floatval($pmatch[1]) + $spacew)).' '.$pmatch[2].' x*#!#*x'.$pmatch[3].$pmatch[4]; - $pmid = str_replace($pmatch[0], $newpmid, $pmid); - unset($pmatch, $newpmid); - } - break; - } - case 're': { - // justify block - if (!TCPDF_STATIC::empty_string($this->lispacer)) { - $this->lispacer = ''; - continue; - } - preg_match('/([0-9\.\+\-]*)[\s]([0-9\.\+\-]*)[\s]([0-9\.\+\-]*)[\s]('.$strpiece[1][0].')[\s](re)([\s]*)/x', $pmid, $xmatches); - if (!isset($xmatches[1])) { - break; - } - $currentxpos = $xmatches[1]; - $x_diff = 0; - $w_diff = 0; - if ($this->isRTLTextDir()) { // RTL - if ($currentxpos < $textpos) { - $x_diff = ($spacewidth * ($nsmax - $lnstring[3][$strcount])); - $w_diff = ($spacewidth * $lnstring[2][$strcount]); - } else { - if ($strcount > 0) { - $x_diff = ($spacewidth * ($nsmax - $lnstring[3][($strcount - 1)])); - $w_diff = ($spacewidth * $lnstring[2][($strcount - 1)]); - } - } - } else { // LTR - if ($currentxpos > $textpos) { - if ($strcount > 0) { - $x_diff = ($spacewidth * $lnstring[3][($strcount - 1)]); - } - $w_diff = ($spacewidth * $lnstring[2][$strcount]); - } else { - if ($strcount > 1) { - $x_diff = ($spacewidth * $lnstring[3][($strcount - 2)]); - } - if ($strcount > 0) { - $w_diff = ($spacewidth * $lnstring[2][($strcount - 1)]); - } - } - } - if (preg_match('/('.$xmatches[1].')[\s]('.$xmatches[2].')[\s]('.$xmatches[3].')[\s]('.$strpiece[1][0].')[\s](re)([\s]*)/x', $pmid, $pmatch) == 1) { - $newx = sprintf('%F',(floatval($pmatch[1]) + $x_diff)); - $neww = sprintf('%F',(floatval($pmatch[3]) + $w_diff)); - $newpmid = $newx.' '.$pmatch[2].' '.$neww.' '.$pmatch[4].' x*#!#*x'.$pmatch[5].$pmatch[6]; - $pmid = str_replace($pmatch[0], $newpmid, $pmid); - unset($pmatch, $newpmid, $newx, $neww); - } - break; - } - case 'c': { - // get current X position - preg_match('/([0-9\.\+\-]*)[\s]([0-9\.\+\-]*)[\s]([0-9\.\+\-]*)[\s]([0-9\.\+\-]*)[\s]([0-9\.\+\-]*)[\s]('.$strpiece[1][0].')[\s](c)([\s]*)/x', $pmid, $xmatches); - if (!isset($xmatches[1])) { - break; - } - $currentxpos = $xmatches[1]; - // justify block - if (preg_match('/('.$xmatches[1].')[\s]('.$xmatches[2].')[\s]('.$xmatches[3].')[\s]('.$xmatches[4].')[\s]('.$xmatches[5].')[\s]('.$strpiece[1][0].')[\s](c)([\s]*)/x', $pmid, $pmatch) == 1) { - $newx1 = sprintf('%F',(floatval($pmatch[1]) + $spacew)); - $newx2 = sprintf('%F',(floatval($pmatch[3]) + $spacew)); - $newx3 = sprintf('%F',(floatval($pmatch[5]) + $spacew)); - $newpmid = $newx1.' '.$pmatch[2].' '.$newx2.' '.$pmatch[4].' '.$newx3.' '.$pmatch[6].' x*#!#*x'.$pmatch[7].$pmatch[8]; - $pmid = str_replace($pmatch[0], $newpmid, $pmid); - unset($pmatch, $newpmid, $newx1, $newx2, $newx3); - } - break; - } - } - // shift the annotations and links - $cxpos = ($currentxpos / $this->k); - $lmpos = ($this->lMargin + $this->cell_padding['L'] + $this->feps); - if ($this->inxobj) { - // we are inside an XObject template - foreach ($this->xobjects[$this->xobjid]['annotations'] as $pak => $pac) { - if (($pac['y'] >= $minstartliney) AND (($pac['x'] * $this->k) >= ($currentxpos - $this->feps)) AND (($pac['x'] * $this->k) <= ($currentxpos + $this->feps))) { - if ($cxpos > $lmpos) { - $this->xobjects[$this->xobjid]['annotations'][$pak]['x'] += ($spacew / $this->k); - $this->xobjects[$this->xobjid]['annotations'][$pak]['w'] += (($spacewidth * $pac['numspaces']) / $this->k); - } else { - $this->xobjects[$this->xobjid]['annotations'][$pak]['w'] += (($spacewidth * $pac['numspaces']) / $this->k); - } - break; - } - } - } elseif (isset($this->PageAnnots[$this->page])) { - foreach ($this->PageAnnots[$this->page] as $pak => $pac) { - if (($pac['y'] >= $minstartliney) AND (($pac['x'] * $this->k) >= ($currentxpos - $this->feps)) AND (($pac['x'] * $this->k) <= ($currentxpos + $this->feps))) { - if ($cxpos > $lmpos) { - $this->PageAnnots[$this->page][$pak]['x'] += ($spacew / $this->k); - $this->PageAnnots[$this->page][$pak]['w'] += (($spacewidth * $pac['numspaces']) / $this->k); - } else { - $this->PageAnnots[$this->page][$pak]['w'] += (($spacewidth * $pac['numspaces']) / $this->k); - } - break; - } - } - } - } // end of while - // remove markers - $pmid = str_replace('x*#!#*x', '', $pmid); - if ($this->isUnicodeFont()) { - // multibyte characters - $spacew = $spacewidthu; - if ($this->font_stretching != 100) { - // word spacing is affected by stretching - $spacew /= ($this->font_stretching / 100); - } - // escape special characters - $pos = 0; - $pmid = preg_replace('/[\\\][\(]/x', '\\#!#OP#!#', $pmid); - $pmid = preg_replace('/[\\\][\)]/x', '\\#!#CP#!#', $pmid); - if (preg_match_all('/\[\(([^\)]*)\)\]/x', $pmid, $pamatch) > 0) { - foreach($pamatch[0] as $pk => $pmatch) { - $replace = $pamatch[1][$pk]; - $replace = str_replace('#!#OP#!#', '(', $replace); - $replace = str_replace('#!#CP#!#', ')', $replace); - $newpmid = '[('.str_replace(chr(0).chr(32), ') '.sprintf('%F', $spacew).' (', $replace).')]'; - $pos = strpos($pmid, $pmatch, $pos); - if ($pos !== FALSE) { - $pmid = substr_replace($pmid, $newpmid, $pos, strlen($pmatch)); - } - ++$pos; - } - unset($pamatch); - } - if ($this->inxobj) { - // we are inside an XObject template - $this->xobjects[$this->xobjid]['outdata'] = $pstart."\n".$pmid."\n".$pend; - } else { - $this->setPageBuffer($startlinepage, $pstart."\n".$pmid."\n".$pend); - } - $endlinepos = strlen($pstart."\n".$pmid."\n"); - } else { - // non-unicode (single-byte characters) - if ($this->font_stretching != 100) { - // word spacing (Tw) is affected by stretching - $spacewidth /= ($this->font_stretching / 100); - } - $rs = sprintf('%F Tw', $spacewidth); - $pmid = preg_replace("/\[\(/x", $rs.' [(', $pmid); - if ($this->inxobj) { - // we are inside an XObject template - $this->xobjects[$this->xobjid]['outdata'] = $pstart."\n".$pmid."\nBT 0 Tw ET\n".$pend; - } else { - $this->setPageBuffer($startlinepage, $pstart."\n".$pmid."\nBT 0 Tw ET\n".$pend); - } - $endlinepos = strlen($pstart."\n".$pmid."\nBT 0 Tw ET\n"); - } - } - } // end of J - } // end if $startlinex - if (($t_x != 0) OR ($yshift < 0)) { - // shift the line - $trx = sprintf('1 0 0 1 %F %F cm', ($t_x * $this->k), ($yshift * $this->k)); - $pstart .= "\nq\n".$trx."\n".$pmid."\nQ\n"; - $endlinepos = strlen($pstart); - if ($this->inxobj) { - // we are inside an XObject template - $this->xobjects[$this->xobjid]['outdata'] = $pstart.$pend; - foreach ($this->xobjects[$this->xobjid]['annotations'] as $pak => $pac) { - if ($pak >= $pask) { - $this->xobjects[$this->xobjid]['annotations'][$pak]['x'] += $t_x; - $this->xobjects[$this->xobjid]['annotations'][$pak]['y'] -= $yshift; - } - } - } else { - $this->setPageBuffer($startlinepage, $pstart.$pend); - // shift the annotations and links - if (isset($this->PageAnnots[$this->page])) { - foreach ($this->PageAnnots[$this->page] as $pak => $pac) { - if ($pak >= $pask) { - $this->PageAnnots[$this->page][$pak]['x'] += $t_x; - $this->PageAnnots[$this->page][$pak]['y'] -= $yshift; - } - } - } - } - $this->y -= $yshift; - } - } - $pbrk = $this->checkPageBreak($this->lasth); - $this->newline = false; - $startlinex = $this->x; - $startliney = $this->y; - if ($dom[$dom[$key]['parent']]['value'] == 'sup') { - $startliney -= ((0.3 * $this->FontSizePt) / $this->k); - } elseif ($dom[$dom[$key]['parent']]['value'] == 'sub') { - $startliney -= (($this->FontSizePt / 0.7) / $this->k); - } else { - $minstartliney = $startliney; - $maxbottomliney = ($this->y + $this->getCellHeight($fontsize / $this->k)); - } - $startlinepage = $this->page; - if (isset($endlinepos) AND (!$pbrk)) { - $startlinepos = $endlinepos; - } else { - if ($this->inxobj) { - // we are inside an XObject template - $startlinepos = strlen($this->xobjects[$this->xobjid]['outdata']); - } elseif (!$this->InFooter) { - if (isset($this->footerlen[$this->page])) { - $this->footerpos[$this->page] = $this->pagelen[$this->page] - $this->footerlen[$this->page]; - } else { - $this->footerpos[$this->page] = $this->pagelen[$this->page]; - } - $startlinepos = $this->footerpos[$this->page]; - } else { - $startlinepos = $this->pagelen[$this->page]; - } - } - unset($endlinepos); - $plalign = $lalign; - if (isset($this->PageAnnots[$this->page])) { - $pask = count($this->PageAnnots[$this->page]); - } else { - $pask = 0; - } - if (!($dom[$key]['tag'] AND !$dom[$key]['opening'] AND ($dom[$key]['value'] == 'table') - AND (isset($this->emptypagemrk[$this->page])) - AND ($this->emptypagemrk[$this->page] == $this->pagelen[$this->page]))) { - $this->SetFont($fontname, $fontstyle, $fontsize); - if ($wfill) { - $this->SetFillColorArray($this->bgcolor); - } - } - } // end newline - if (isset($opentagpos)) { - unset($opentagpos); - } - if ($dom[$key]['tag']) { - if ($dom[$key]['opening']) { - // get text indentation (if any) - if (isset($dom[$key]['text-indent']) AND $dom[$key]['block']) { - $this->textindent = $dom[$key]['text-indent']; - $this->newline = true; - } - // table - if (($dom[$key]['value'] == 'table') AND isset($dom[$key]['cols']) AND ($dom[$key]['cols'] > 0)) { - // available page width - if ($this->rtl) { - $wtmp = $this->x - $this->lMargin; - } else { - $wtmp = $this->w - $this->rMargin - $this->x; - } - // get cell spacing - if (isset($dom[$key]['attribute']['cellspacing'])) { - $clsp = $this->getHTMLUnitToUnits($dom[$key]['attribute']['cellspacing'], 1, 'px'); - $cellspacing = array('H' => $clsp, 'V' => $clsp); - } elseif (isset($dom[$key]['border-spacing'])) { - $cellspacing = $dom[$key]['border-spacing']; - } else { - $cellspacing = array('H' => 0, 'V' => 0); - } - // table width - if (isset($dom[$key]['width'])) { - $table_width = $this->getHTMLUnitToUnits($dom[$key]['width'], $wtmp, 'px'); - } else { - $table_width = $wtmp; - } - $table_width -= (2 * $cellspacing['H']); - if (!$this->inthead) { - $this->y += $cellspacing['V']; - } - if ($this->rtl) { - $cellspacingx = -$cellspacing['H']; - } else { - $cellspacingx = $cellspacing['H']; - } - // total table width without cellspaces - $table_columns_width = ($table_width - ($cellspacing['H'] * ($dom[$key]['cols'] - 1))); - // minimum column width - $table_min_column_width = ($table_columns_width / $dom[$key]['cols']); - // array of custom column widths - $table_colwidths = array_fill(0, $dom[$key]['cols'], $table_min_column_width); - } - // table row - if ($dom[$key]['value'] == 'tr') { - // reset column counter - $colid = 0; - } - // table cell - if (($dom[$key]['value'] == 'td') OR ($dom[$key]['value'] == 'th')) { - $trid = $dom[$key]['parent']; - $table_el = $dom[$trid]['parent']; - if (!isset($dom[$table_el]['cols'])) { - $dom[$table_el]['cols'] = $dom[$trid]['cols']; - } - // store border info - $tdborder = 0; - if (isset($dom[$key]['border']) AND !empty($dom[$key]['border'])) { - $tdborder = $dom[$key]['border']; - } - $colspan = intval($dom[$key]['attribute']['colspan']); - if ($colspan <= 0) { - $colspan = 1; - } - $old_cell_padding = $this->cell_padding; - if (isset($dom[($dom[$trid]['parent'])]['attribute']['cellpadding'])) { - $crclpd = $this->getHTMLUnitToUnits($dom[($dom[$trid]['parent'])]['attribute']['cellpadding'], 1, 'px'); - $current_cell_padding = array('L' => $crclpd, 'T' => $crclpd, 'R' => $crclpd, 'B' => $crclpd); - } elseif (isset($dom[($dom[$trid]['parent'])]['padding'])) { - $current_cell_padding = $dom[($dom[$trid]['parent'])]['padding']; - } else { - $current_cell_padding = array('L' => 0, 'T' => 0, 'R' => 0, 'B' => 0); - } - $this->cell_padding = $current_cell_padding; - if (isset($dom[$key]['height'])) { - // minimum cell height - $cellh = $this->getHTMLUnitToUnits($dom[$key]['height'], 0, 'px'); - } else { - $cellh = 0; - } - if (isset($dom[$key]['content'])) { - $cell_content = $dom[$key]['content']; - } else { - $cell_content = ' '; - } - $tagtype = $dom[$key]['value']; - $parentid = $key; - while (($key < $maxel) AND (!(($dom[$key]['tag']) AND (!$dom[$key]['opening']) AND ($dom[$key]['value'] == $tagtype) AND ($dom[$key]['parent'] == $parentid)))) { - // move $key index forward - ++$key; - } - if (!isset($dom[$trid]['startpage'])) { - $dom[$trid]['startpage'] = $this->page; - } else { - $this->setPage($dom[$trid]['startpage']); - } - if (!isset($dom[$trid]['startcolumn'])) { - $dom[$trid]['startcolumn'] = $this->current_column; - } elseif ($this->current_column != $dom[$trid]['startcolumn']) { - $tmpx = $this->x; - $this->selectColumn($dom[$trid]['startcolumn']); - $this->x = $tmpx; - } - if (!isset($dom[$trid]['starty'])) { - $dom[$trid]['starty'] = $this->y; - } else { - $this->y = $dom[$trid]['starty']; - } - if (!isset($dom[$trid]['startx'])) { - $dom[$trid]['startx'] = $this->x; - $this->x += $cellspacingx; - } else { - $this->x += ($cellspacingx / 2); - } - if (isset($dom[$parentid]['attribute']['rowspan'])) { - $rowspan = intval($dom[$parentid]['attribute']['rowspan']); - } else { - $rowspan = 1; - } - // skip row-spanned cells started on the previous rows - if (isset($dom[$table_el]['rowspans'])) { - $rsk = 0; - $rskmax = count($dom[$table_el]['rowspans']); - while ($rsk < $rskmax) { - $trwsp = $dom[$table_el]['rowspans'][$rsk]; - $rsstartx = $trwsp['startx']; - $rsendx = $trwsp['endx']; - // account for margin changes - if ($trwsp['startpage'] < $this->page) { - if (($this->rtl) AND ($this->pagedim[$this->page]['orm'] != $this->pagedim[$trwsp['startpage']]['orm'])) { - $dl = ($this->pagedim[$this->page]['orm'] - $this->pagedim[$trwsp['startpage']]['orm']); - $rsstartx -= $dl; - $rsendx -= $dl; - } elseif ((!$this->rtl) AND ($this->pagedim[$this->page]['olm'] != $this->pagedim[$trwsp['startpage']]['olm'])) { - $dl = ($this->pagedim[$this->page]['olm'] - $this->pagedim[$trwsp['startpage']]['olm']); - $rsstartx += $dl; - $rsendx += $dl; - } - } - if (($trwsp['rowspan'] > 0) - AND ($rsstartx > ($this->x - $cellspacing['H'] - $current_cell_padding['L'] - $this->feps)) - AND ($rsstartx < ($this->x + $cellspacing['H'] + $current_cell_padding['R'] + $this->feps)) - AND (($trwsp['starty'] < ($this->y - $this->feps)) OR ($trwsp['startpage'] < $this->page) OR ($trwsp['startcolumn'] < $this->current_column))) { - // set the starting X position of the current cell - $this->x = $rsendx + $cellspacingx; - // increment column indicator - $colid += $trwsp['colspan']; - if (($trwsp['rowspan'] == 1) - AND (isset($dom[$trid]['endy'])) - AND (isset($dom[$trid]['endpage'])) - AND (isset($dom[$trid]['endcolumn'])) - AND ($trwsp['endpage'] == $dom[$trid]['endpage']) - AND ($trwsp['endcolumn'] == $dom[$trid]['endcolumn'])) { - // set ending Y position for row - $dom[$table_el]['rowspans'][$rsk]['endy'] = max($dom[$trid]['endy'], $trwsp['endy']); - $dom[$trid]['endy'] = $dom[$table_el]['rowspans'][$rsk]['endy']; - } - $rsk = 0; - } else { - ++$rsk; - } - } - } - if (isset($dom[$parentid]['width'])) { - // user specified width - $cellw = $this->getHTMLUnitToUnits($dom[$parentid]['width'], $table_columns_width, 'px'); - $tmpcw = ($cellw / $colspan); - for ($i = 0; $i < $colspan; ++$i) { - $table_colwidths[($colid + $i)] = $tmpcw; - } - } else { - // inherit column width - $cellw = 0; - for ($i = 0; $i < $colspan; ++$i) { - $cellw += (isset($table_colwidths[($colid + $i)]) ? $table_colwidths[($colid + $i)] : 0); - } - } - $cellw += (($colspan - 1) * $cellspacing['H']); - // increment column indicator - $colid += $colspan; - // add rowspan information to table element - if ($rowspan > 1) { - $trsid = array_push($dom[$table_el]['rowspans'], array('trid' => $trid, 'rowspan' => $rowspan, 'mrowspan' => $rowspan, 'colspan' => $colspan, 'startpage' => $this->page, 'startcolumn' => $this->current_column, 'startx' => $this->x, 'starty' => $this->y)); - } - $cellid = array_push($dom[$trid]['cellpos'], array('startx' => $this->x)); - if ($rowspan > 1) { - $dom[$trid]['cellpos'][($cellid - 1)]['rowspanid'] = ($trsid - 1); - } - // push background colors - if (isset($dom[$parentid]['bgcolor']) AND ($dom[$parentid]['bgcolor'] !== false)) { - $dom[$trid]['cellpos'][($cellid - 1)]['bgcolor'] = $dom[$parentid]['bgcolor']; - } - // store border info - if (isset($tdborder) AND !empty($tdborder)) { - $dom[$trid]['cellpos'][($cellid - 1)]['border'] = $tdborder; - } - $prevLastH = $this->lasth; - // store some info for multicolumn mode - if ($this->rtl) { - $this->colxshift['x'] = $this->w - $this->x - $this->rMargin; - } else { - $this->colxshift['x'] = $this->x - $this->lMargin; - } - $this->colxshift['s'] = $cellspacing; - $this->colxshift['p'] = $current_cell_padding; - // ****** write the cell content ****** - $this->MultiCell($cellw, $cellh, $cell_content, false, $lalign, false, 2, '', '', true, 0, true, true, 0, 'T', false); - // restore some values - $this->colxshift = array('x' => 0, 's' => array('H' => 0, 'V' => 0), 'p' => array('L' => 0, 'T' => 0, 'R' => 0, 'B' => 0)); - $this->lasth = $prevLastH; - $this->cell_padding = $old_cell_padding; - $dom[$trid]['cellpos'][($cellid - 1)]['endx'] = $this->x; - // update the end of row position - if ($rowspan <= 1) { - if (isset($dom[$trid]['endy'])) { - if (($this->page == $dom[$trid]['endpage']) AND ($this->current_column == $dom[$trid]['endcolumn'])) { - $dom[$trid]['endy'] = max($this->y, $dom[$trid]['endy']); - } elseif (($this->page > $dom[$trid]['endpage']) OR ($this->current_column > $dom[$trid]['endcolumn'])) { - $dom[$trid]['endy'] = $this->y; - } - } else { - $dom[$trid]['endy'] = $this->y; - } - if (isset($dom[$trid]['endpage'])) { - $dom[$trid]['endpage'] = max($this->page, $dom[$trid]['endpage']); - } else { - $dom[$trid]['endpage'] = $this->page; - } - if (isset($dom[$trid]['endcolumn'])) { - $dom[$trid]['endcolumn'] = max($this->current_column, $dom[$trid]['endcolumn']); - } else { - $dom[$trid]['endcolumn'] = $this->current_column; - } - } else { - // account for row-spanned cells - $dom[$table_el]['rowspans'][($trsid - 1)]['endx'] = $this->x; - $dom[$table_el]['rowspans'][($trsid - 1)]['endy'] = $this->y; - $dom[$table_el]['rowspans'][($trsid - 1)]['endpage'] = $this->page; - $dom[$table_el]['rowspans'][($trsid - 1)]['endcolumn'] = $this->current_column; - } - if (isset($dom[$table_el]['rowspans'])) { - // update endy and endpage on rowspanned cells - foreach ($dom[$table_el]['rowspans'] as $k => $trwsp) { - if ($trwsp['rowspan'] > 0) { - if (isset($dom[$trid]['endpage'])) { - if (($trwsp['endpage'] == $dom[$trid]['endpage']) AND ($trwsp['endcolumn'] == $dom[$trid]['endcolumn'])) { - $dom[$table_el]['rowspans'][$k]['endy'] = max($dom[$trid]['endy'], $trwsp['endy']); - } elseif (($trwsp['endpage'] < $dom[$trid]['endpage']) OR ($trwsp['endcolumn'] < $dom[$trid]['endcolumn'])) { - $dom[$table_el]['rowspans'][$k]['endy'] = $dom[$trid]['endy']; - $dom[$table_el]['rowspans'][$k]['endpage'] = $dom[$trid]['endpage']; - $dom[$table_el]['rowspans'][$k]['endcolumn'] = $dom[$trid]['endcolumn']; - } else { - $dom[$trid]['endy'] = $this->pagedim[$dom[$trid]['endpage']]['hk'] - $this->pagedim[$dom[$trid]['endpage']]['bm']; - } - } - } - } - } - $this->x += ($cellspacingx / 2); - } else { - // opening tag (or self-closing tag) - if (!isset($opentagpos)) { - if ($this->inxobj) { - // we are inside an XObject template - $opentagpos = strlen($this->xobjects[$this->xobjid]['outdata']); - } elseif (!$this->InFooter) { - if (isset($this->footerlen[$this->page])) { - $this->footerpos[$this->page] = $this->pagelen[$this->page] - $this->footerlen[$this->page]; - } else { - $this->footerpos[$this->page] = $this->pagelen[$this->page]; - } - $opentagpos = $this->footerpos[$this->page]; - } - } - $dom = $this->openHTMLTagHandler($dom, $key, $cell); - } - } else { // closing tag - $prev_numpages = $this->numpages; - $old_bordermrk = $this->bordermrk[$this->page]; - $dom = $this->closeHTMLTagHandler($dom, $key, $cell, $maxbottomliney); - if ($this->bordermrk[$this->page] > $old_bordermrk) { - $startlinepos += ($this->bordermrk[$this->page] - $old_bordermrk); - } - if ($prev_numpages > $this->numpages) { - $startlinepage = $this->page; - } - } - } elseif (strlen($dom[$key]['value']) > 0) { - // print list-item - if (!TCPDF_STATIC::empty_string($this->lispacer) AND ($this->lispacer != '^')) { - $this->SetFont($pfontname, $pfontstyle, $pfontsize); - $this->resetLastH(); - $minstartliney = $this->y; - $maxbottomliney = ($startliney + $this->getCellHeight($this->FontSize)); - if (is_numeric($pfontsize) AND ($pfontsize > 0)) { - $this->putHtmlListBullet($this->listnum, $this->lispacer, $pfontsize); - } - $this->SetFont($curfontname, $curfontstyle, $curfontsize); - $this->resetLastH(); - if (is_numeric($pfontsize) AND ($pfontsize > 0) AND is_numeric($curfontsize) AND ($curfontsize > 0) AND ($pfontsize != $curfontsize)) { - $pfontascent = $this->getFontAscent($pfontname, $pfontstyle, $pfontsize); - $pfontdescent = $this->getFontDescent($pfontname, $pfontstyle, $pfontsize); - $this->y += ($this->getCellHeight(($pfontsize - $curfontsize) / $this->k) + $pfontascent - $curfontascent - $pfontdescent + $curfontdescent) / 2; - $minstartliney = min($this->y, $minstartliney); - $maxbottomliney = max(($this->y + $this->getCellHeight($pfontsize / $this->k)), $maxbottomliney); - } - } - // text - $this->htmlvspace = 0; - if ((!$this->premode) AND $this->isRTLTextDir()) { - // reverse spaces order - $lsp = ''; // left spaces - $rsp = ''; // right spaces - if (preg_match('/^('.$this->re_space['p'].'+)/'.$this->re_space['m'], $dom[$key]['value'], $matches)) { - $lsp = $matches[1]; - } - if (preg_match('/('.$this->re_space['p'].'+)$/'.$this->re_space['m'], $dom[$key]['value'], $matches)) { - $rsp = $matches[1]; - } - $dom[$key]['value'] = $rsp.$this->stringTrim($dom[$key]['value']).$lsp; - } - if ($newline) { - if (!$this->premode) { - $prelen = strlen($dom[$key]['value']); - if ($this->isRTLTextDir()) { - // right trim except non-breaking space - $dom[$key]['value'] = $this->stringRightTrim($dom[$key]['value']); - } else { - // left trim except non-breaking space - $dom[$key]['value'] = $this->stringLeftTrim($dom[$key]['value']); - } - $postlen = strlen($dom[$key]['value']); - if (($postlen == 0) AND ($prelen > 0)) { - $dom[$key]['trimmed_space'] = true; - } - } - $newline = false; - $firstblock = true; - } else { - $firstblock = false; - // replace empty multiple spaces string with a single space - $dom[$key]['value'] = preg_replace('/^'.$this->re_space['p'].'+$/'.$this->re_space['m'], chr(32), $dom[$key]['value']); - } - $strrest = ''; - if ($this->rtl) { - $this->x -= $this->textindent; - } else { - $this->x += $this->textindent; - } - if (!isset($dom[$key]['trimmed_space']) OR !$dom[$key]['trimmed_space']) { - $strlinelen = $this->GetStringWidth($dom[$key]['value']); - if (!empty($this->HREF) AND (isset($this->HREF['url']))) { - // HTML
        Link - $hrefcolor = ''; - if (isset($dom[($dom[$key]['parent'])]['fgcolor']) AND ($dom[($dom[$key]['parent'])]['fgcolor'] !== false)) { - $hrefcolor = $dom[($dom[$key]['parent'])]['fgcolor']; - } - $hrefstyle = -1; - if (isset($dom[($dom[$key]['parent'])]['fontstyle']) AND ($dom[($dom[$key]['parent'])]['fontstyle'] !== false)) { - $hrefstyle = $dom[($dom[$key]['parent'])]['fontstyle']; - } - $strrest = $this->addHtmlLink($this->HREF['url'], $dom[$key]['value'], $wfill, true, $hrefcolor, $hrefstyle, true); - } else { - $wadj = 0; // space to leave for block continuity - if ($this->rtl) { - $cwa = ($this->x - $this->lMargin); - } else { - $cwa = ($this->w - $this->rMargin - $this->x); - } - if (($strlinelen < $cwa) AND (isset($dom[($key + 1)])) AND ($dom[($key + 1)]['tag']) AND (!$dom[($key + 1)]['block'])) { - // check the next text blocks for continuity - $nkey = ($key + 1); - $write_block = true; - $same_textdir = true; - $tmp_fontname = $this->FontFamily; - $tmp_fontstyle = $this->FontStyle; - $tmp_fontsize = $this->FontSizePt; - while ($write_block AND isset($dom[$nkey])) { - if ($dom[$nkey]['tag']) { - if ($dom[$nkey]['block']) { - // end of block - $write_block = false; - } - $tmp_fontname = isset($dom[$nkey]['fontname']) ? $dom[$nkey]['fontname'] : $this->FontFamily; - $tmp_fontstyle = isset($dom[$nkey]['fontstyle']) ? $dom[$nkey]['fontstyle'] : $this->FontStyle; - $tmp_fontsize = isset($dom[$nkey]['fontsize']) ? $dom[$nkey]['fontsize'] : $this->FontSizePt; - $same_textdir = ($dom[$nkey]['dir'] == $dom[$key]['dir']); - } else { - $nextstr = TCPDF_STATIC::pregSplit('/'.$this->re_space['p'].'+/', $this->re_space['m'], $dom[$nkey]['value']); - if (isset($nextstr[0]) AND $same_textdir) { - $wadj += $this->GetStringWidth($nextstr[0], $tmp_fontname, $tmp_fontstyle, $tmp_fontsize); - if (isset($nextstr[1])) { - $write_block = false; - } - } - } - ++$nkey; - } - } - if (($wadj > 0) AND (($strlinelen + $wadj) >= $cwa)) { - $wadj = 0; - $nextstr = TCPDF_STATIC::pregSplit('/'.$this->re_space['p'].'/', $this->re_space['m'], $dom[$key]['value']); - $numblks = count($nextstr); - if ($numblks > 1) { - // try to split on blank spaces - $wadj = ($cwa - $strlinelen + $this->GetStringWidth($nextstr[($numblks - 1)])); - } else { - // set the entire block on new line - $wadj = $this->GetStringWidth($nextstr[0]); - } - } - // check for reversed text direction - if (($wadj > 0) AND (($this->rtl AND ($this->tmprtl === 'L')) OR (!$this->rtl AND ($this->tmprtl === 'R')))) { - // LTR text on RTL direction or RTL text on LTR direction - $reverse_dir = true; - $this->rtl = !$this->rtl; - $revshift = ($strlinelen + $wadj + 0.000001); // add little quantity for rounding problems - if ($this->rtl) { - $this->x += $revshift; - } else { - $this->x -= $revshift; - } - $xws = $this->x; - } - // ****** write only until the end of the line and get the rest ****** - $strrest = $this->Write($this->lasth, $dom[$key]['value'], '', $wfill, '', false, 0, true, $firstblock, 0, $wadj); - // restore default direction - if ($reverse_dir AND ($wadj == 0)) { - $this->x = $xws; - $this->rtl = !$this->rtl; - $reverse_dir = false; - } - } - } - $this->textindent = 0; - if (strlen($strrest) > 0) { - // store the remaining string on the previous $key position - $this->newline = true; - if ($strrest == $dom[$key]['value']) { - // used to avoid infinite loop - ++$loop; - } else { - $loop = 0; - } - $dom[$key]['value'] = $strrest; - if ($cell) { - if ($this->rtl) { - $this->x -= $this->cell_padding['R']; - } else { - $this->x += $this->cell_padding['L']; - } - } - if ($loop < 3) { - --$key; - } - } else { - $loop = 0; - // add the positive font spacing of the last character (if any) - if ($this->font_spacing > 0) { - if ($this->rtl) { - $this->x -= $this->font_spacing; - } else { - $this->x += $this->font_spacing; - } - } - } - } - ++$key; - if (isset($dom[$key]['tag']) AND $dom[$key]['tag'] AND (!isset($dom[$key]['opening']) OR !$dom[$key]['opening']) AND isset($dom[($dom[$key]['parent'])]['attribute']['nobr']) AND ($dom[($dom[$key]['parent'])]['attribute']['nobr'] == 'true')) { - // check if we are on a new page or on a new column - if ((!$undo) AND (($this->y < $this->start_transaction_y) OR (($dom[$key]['value'] == 'tr') AND ($dom[($dom[$key]['parent'])]['endy'] < $this->start_transaction_y)))) { - // we are on a new page or on a new column and the total object height is less than the available vertical space. - // restore previous object - $this->rollbackTransaction(true); - // restore previous values - foreach ($this_method_vars as $vkey => $vval) { - $$vkey = $vval; - } - if (!empty($dom[$key]['thead'])) { - $this->inthead = true; - } - // add a page (or trig AcceptPageBreak() for multicolumn mode) - $pre_y = $this->y; - if ((!$this->checkPageBreak($this->PageBreakTrigger + 1)) AND ($this->y < $pre_y)) { - $startliney = $this->y; - } - $undo = true; // avoid infinite loop - } else { - $undo = false; - } - } - } // end for each $key - // align the last line - if (isset($startlinex)) { - $yshift = ($minstartliney - $startliney); - if (($yshift > 0) OR ($this->page > $startlinepage)) { - $yshift = 0; - } - $t_x = 0; - // the last line must be shifted to be aligned as requested - $linew = abs($this->endlinex - $startlinex); - if ($this->inxobj) { - // we are inside an XObject template - $pstart = substr($this->xobjects[$this->xobjid]['outdata'], 0, $startlinepos); - if (isset($opentagpos)) { - $midpos = $opentagpos; - } else { - $midpos = 0; - } - if ($midpos > 0) { - $pmid = substr($this->xobjects[$this->xobjid]['outdata'], $startlinepos, ($midpos - $startlinepos)); - $pend = substr($this->xobjects[$this->xobjid]['outdata'], $midpos); - } else { - $pmid = substr($this->xobjects[$this->xobjid]['outdata'], $startlinepos); - $pend = ''; - } - } else { - $pstart = substr($this->getPageBuffer($startlinepage), 0, $startlinepos); - if (isset($opentagpos) AND isset($this->footerlen[$startlinepage]) AND (!$this->InFooter)) { - $this->footerpos[$startlinepage] = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage]; - $midpos = min($opentagpos, $this->footerpos[$startlinepage]); - } elseif (isset($opentagpos)) { - $midpos = $opentagpos; - } elseif (isset($this->footerlen[$startlinepage]) AND (!$this->InFooter)) { - $this->footerpos[$startlinepage] = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage]; - $midpos = $this->footerpos[$startlinepage]; - } else { - $midpos = 0; - } - if ($midpos > 0) { - $pmid = substr($this->getPageBuffer($startlinepage), $startlinepos, ($midpos - $startlinepos)); - $pend = substr($this->getPageBuffer($startlinepage), $midpos); - } else { - $pmid = substr($this->getPageBuffer($startlinepage), $startlinepos); - $pend = ''; - } - } - if ((isset($plalign) AND ((($plalign == 'C') OR (($plalign == 'R') AND (!$this->rtl)) OR (($plalign == 'L') AND ($this->rtl)))))) { - // calculate shifting amount - $tw = $w; - if ($this->lMargin != $prevlMargin) { - $tw += ($prevlMargin - $this->lMargin); - } - if ($this->rMargin != $prevrMargin) { - $tw += ($prevrMargin - $this->rMargin); - } - $one_space_width = $this->GetStringWidth(chr(32)); - $no = 0; // number of spaces on a line contained on a single block - if ($this->isRTLTextDir()) { // RTL - // remove left space if exist - $pos1 = TCPDF_STATIC::revstrpos($pmid, '[('); - if ($pos1 > 0) { - $pos1 = intval($pos1); - if ($this->isUnicodeFont()) { - $pos2 = intval(TCPDF_STATIC::revstrpos($pmid, '[('.chr(0).chr(32))); - $spacelen = 2; - } else { - $pos2 = intval(TCPDF_STATIC::revstrpos($pmid, '[('.chr(32))); - $spacelen = 1; - } - if ($pos1 == $pos2) { - $pmid = substr($pmid, 0, ($pos1 + 2)).substr($pmid, ($pos1 + 2 + $spacelen)); - if (substr($pmid, $pos1, 4) == '[()]') { - $linew -= $one_space_width; - } elseif ($pos1 == strpos($pmid, '[(')) { - $no = 1; - } - } - } - } else { // LTR - // remove right space if exist - $pos1 = TCPDF_STATIC::revstrpos($pmid, ')]'); - if ($pos1 > 0) { - $pos1 = intval($pos1); - if ($this->isUnicodeFont()) { - $pos2 = intval(TCPDF_STATIC::revstrpos($pmid, chr(0).chr(32).')]')) + 2; - $spacelen = 2; - } else { - $pos2 = intval(TCPDF_STATIC::revstrpos($pmid, chr(32).')]')) + 1; - $spacelen = 1; - } - if ($pos1 == $pos2) { - $pmid = substr($pmid, 0, ($pos1 - $spacelen)).substr($pmid, $pos1); - $linew -= $one_space_width; - } - } - } - $mdiff = ($tw - $linew); - if ($plalign == 'C') { - if ($this->rtl) { - $t_x = -($mdiff / 2); - } else { - $t_x = ($mdiff / 2); - } - } elseif ($plalign == 'R') { - // right alignment on LTR document - $t_x = $mdiff; - } elseif ($plalign == 'L') { - // left alignment on RTL document - $t_x = -$mdiff; - } - } // end if startlinex - if (($t_x != 0) OR ($yshift < 0)) { - // shift the line - $trx = sprintf('1 0 0 1 %F %F cm', ($t_x * $this->k), ($yshift * $this->k)); - $pstart .= "\nq\n".$trx."\n".$pmid."\nQ\n"; - $endlinepos = strlen($pstart); - if ($this->inxobj) { - // we are inside an XObject template - $this->xobjects[$this->xobjid]['outdata'] = $pstart.$pend; - foreach ($this->xobjects[$this->xobjid]['annotations'] as $pak => $pac) { - if ($pak >= $pask) { - $this->xobjects[$this->xobjid]['annotations'][$pak]['x'] += $t_x; - $this->xobjects[$this->xobjid]['annotations'][$pak]['y'] -= $yshift; - } - } - } else { - $this->setPageBuffer($startlinepage, $pstart.$pend); - // shift the annotations and links - if (isset($this->PageAnnots[$this->page])) { - foreach ($this->PageAnnots[$this->page] as $pak => $pac) { - if ($pak >= $pask) { - $this->PageAnnots[$this->page][$pak]['x'] += $t_x; - $this->PageAnnots[$this->page][$pak]['y'] -= $yshift; - } - } - } - } - $this->y -= $yshift; - $yshift = 0; - } - } - // restore previous values - $this->setGraphicVars($gvars); - if ($this->num_columns > 1) { - $this->selectColumn(); - } elseif ($this->page > $prevPage) { - $this->lMargin = $this->pagedim[$this->page]['olm']; - $this->rMargin = $this->pagedim[$this->page]['orm']; - } - // restore previous list state - $this->cell_height_ratio = $prev_cell_height_ratio; - $this->listnum = $prev_listnum; - $this->listordered = $prev_listordered; - $this->listcount = $prev_listcount; - $this->lispacer = $prev_lispacer; - if ($ln AND (!($cell AND ($dom[$key-1]['value'] == 'table')))) { - $this->Ln($this->lasth); - if ($this->y < $maxbottomliney) { - $this->y = $maxbottomliney; - } - } - unset($dom); - } - - /** - * Process opening tags. - * @param $dom (array) html dom array - * @param $key (int) current element id - * @param $cell (boolean) if true add the default left (or right if RTL) padding to each new line (default false). - * @return $dom array - * @protected - */ - protected function openHTMLTagHandler($dom, $key, $cell) { - $tag = $dom[$key]; - $parent = $dom[($dom[$key]['parent'])]; - $firsttag = ($key == 1); - // check for text direction attribute - if (isset($tag['dir'])) { - $this->setTempRTL($tag['dir']); - } else { - $this->tmprtl = false; - } - if ($tag['block']) { - $hbz = 0; // distance from y to line bottom - $hb = 0; // vertical space between block tags - // calculate vertical space for block tags - if (isset($this->tagvspaces[$tag['value']][0]['h']) AND ($this->tagvspaces[$tag['value']][0]['h'] >= 0)) { - $cur_h = $this->tagvspaces[$tag['value']][0]['h']; - } elseif (isset($tag['fontsize'])) { - $cur_h = $this->getCellHeight($tag['fontsize'] / $this->k); - } else { - $cur_h = $this->getCellHeight($this->FontSize); - } - if (isset($this->tagvspaces[$tag['value']][0]['n'])) { - $on = $this->tagvspaces[$tag['value']][0]['n']; - } elseif (preg_match('/[h][0-9]/', $tag['value']) > 0) { - $on = 0.6; - } else { - $on = 1; - } - if ((!isset($this->tagvspaces[$tag['value']])) AND (in_array($tag['value'], array('div', 'dt', 'dd', 'li', 'br', 'hr')))) { - $hb = 0; - } else { - $hb = ($on * $cur_h); - } - if (($this->htmlvspace <= 0) AND ($on > 0)) { - if (isset($parent['fontsize'])) { - $hbz = (($parent['fontsize'] / $this->k) * $this->cell_height_ratio); - } else { - $hbz = $this->getCellHeight($this->FontSize); - } - } - if (isset($dom[($key - 1)]) AND ($dom[($key - 1)]['value'] == 'table')) { - // fix vertical space after table - $hbz = 0; - } - // closing vertical space - $hbc = 0; - if (isset($this->tagvspaces[$tag['value']][1]['h']) AND ($this->tagvspaces[$tag['value']][1]['h'] >= 0)) { - $pre_h = $this->tagvspaces[$tag['value']][1]['h']; - } elseif (isset($parent['fontsize'])) { - $pre_h = $this->getCellHeight($parent['fontsize'] / $this->k); - } else { - $pre_h = $this->getCellHeight($this->FontSize); - } - if (isset($this->tagvspaces[$tag['value']][1]['n'])) { - $cn = $this->tagvspaces[$tag['value']][1]['n']; - } elseif (preg_match('/[h][0-9]/', $tag['value']) > 0) { - $cn = 0.6; - } else { - $cn = 1; - } - if (isset($this->tagvspaces[$tag['value']][1])) { - $hbc = ($cn * $pre_h); - } - } - // Opening tag - switch($tag['value']) { - case 'table': { - $cp = 0; - $cs = 0; - $dom[$key]['rowspans'] = array(); - if (!isset($dom[$key]['attribute']['nested']) OR ($dom[$key]['attribute']['nested'] != 'true')) { - $this->htmlvspace = 0; - // set table header - if (!TCPDF_STATIC::empty_string($dom[$key]['thead'])) { - // set table header - $this->thead = $dom[$key]['thead']; - if (!isset($this->theadMargins) OR (empty($this->theadMargins))) { - $this->theadMargins = array(); - $this->theadMargins['cell_padding'] = $this->cell_padding; - $this->theadMargins['lmargin'] = $this->lMargin; - $this->theadMargins['rmargin'] = $this->rMargin; - $this->theadMargins['page'] = $this->page; - $this->theadMargins['cell'] = $cell; - $this->theadMargins['gvars'] = $this->getGraphicVars(); - } - } - } - // store current margins and page - $dom[$key]['old_cell_padding'] = $this->cell_padding; - if (isset($tag['attribute']['cellpadding'])) { - $pad = $this->getHTMLUnitToUnits($tag['attribute']['cellpadding'], 1, 'px'); - $this->SetCellPadding($pad); - } elseif (isset($tag['padding'])) { - $this->cell_padding = $tag['padding']; - } - if (isset($tag['attribute']['cellspacing'])) { - $cs = $this->getHTMLUnitToUnits($tag['attribute']['cellspacing'], 1, 'px'); - } elseif (isset($tag['border-spacing'])) { - $cs = $tag['border-spacing']['V']; - } - $prev_y = $this->y; - if ($this->checkPageBreak(((2 * $cp) + (2 * $cs) + $this->lasth), '', false) OR ($this->y < $prev_y)) { - $this->inthead = true; - // add a page (or trig AcceptPageBreak() for multicolumn mode) - $this->checkPageBreak($this->PageBreakTrigger + 1); - } - break; - } - case 'tr': { - // array of columns positions - $dom[$key]['cellpos'] = array(); - break; - } - case 'hr': { - if ((isset($tag['height'])) AND ($tag['height'] != '')) { - $hrHeight = $this->getHTMLUnitToUnits($tag['height'], 1, 'px'); - } else { - $hrHeight = $this->GetLineWidth(); - } - $this->addHTMLVertSpace($hbz, max($hb, ($hrHeight / 2)), $cell, $firsttag); - $x = $this->GetX(); - $y = $this->GetY(); - $wtmp = $this->w - $this->lMargin - $this->rMargin; - if ($cell) { - $wtmp -= ($this->cell_padding['L'] + $this->cell_padding['R']); - } - if ((isset($tag['width'])) AND ($tag['width'] != '')) { - $hrWidth = $this->getHTMLUnitToUnits($tag['width'], $wtmp, 'px'); - } else { - $hrWidth = $wtmp; - } - $prevlinewidth = $this->GetLineWidth(); - $this->SetLineWidth($hrHeight); - $this->Line($x, $y, $x + $hrWidth, $y); - $this->SetLineWidth($prevlinewidth); - $this->addHTMLVertSpace(max($hbc, ($hrHeight / 2)), 0, $cell, !isset($dom[($key + 1)])); - break; - } - case 'a': { - if (array_key_exists('href', $tag['attribute'])) { - $this->HREF['url'] = $tag['attribute']['href']; - } - break; - } - case 'img': { - if (!empty($tag['attribute']['src'])) { - if ($tag['attribute']['src'][0] === '@') { - // data stream - $tag['attribute']['src'] = '@'.base64_decode(substr($tag['attribute']['src'], 1)); - $type = ''; - } else { - // get image type - $type = TCPDF_IMAGES::getImageFileType($tag['attribute']['src']); - } - if (!isset($tag['width'])) { - $tag['width'] = 0; - } - if (!isset($tag['height'])) { - $tag['height'] = 0; - } - //if (!isset($tag['attribute']['align'])) { - // the only alignment supported is "bottom" - // further development is required for other modes. - $tag['attribute']['align'] = 'bottom'; - //} - switch($tag['attribute']['align']) { - case 'top': { - $align = 'T'; - break; - } - case 'middle': { - $align = 'M'; - break; - } - case 'bottom': { - $align = 'B'; - break; - } - default: { - $align = 'B'; - break; - } - } - $prevy = $this->y; - $xpos = $this->x; - $imglink = ''; - if (isset($this->HREF['url']) AND !TCPDF_STATIC::empty_string($this->HREF['url'])) { - $imglink = $this->HREF['url']; - if ($imglink[0] == '#') { - // convert url to internal link - $lnkdata = explode(',', $imglink); - if (isset($lnkdata[0])) { - $page = intval(substr($lnkdata[0], 1)); - if (empty($page) OR ($page <= 0)) { - $page = $this->page; - } - if (isset($lnkdata[1]) AND (strlen($lnkdata[1]) > 0)) { - $lnky = floatval($lnkdata[1]); - } else { - $lnky = 0; - } - $imglink = $this->AddLink(); - $this->SetLink($imglink, $lnky, $page); - } - } - } - $border = 0; - if (isset($tag['border']) AND !empty($tag['border'])) { - // currently only support 1 (frame) or a combination of 'LTRB' - $border = $tag['border']; - } - $iw = ''; - if (isset($tag['width'])) { - $iw = $this->getHTMLUnitToUnits($tag['width'], ($tag['fontsize'] / $this->k), 'px', false); - } - $ih = ''; - if (isset($tag['height'])) { - $ih = $this->getHTMLUnitToUnits($tag['height'], ($tag['fontsize'] / $this->k), 'px', false); - } - if (($type == 'eps') OR ($type == 'ai')) { - $this->ImageEps($tag['attribute']['src'], $xpos, $this->y, $iw, $ih, $imglink, true, $align, '', $border, true); - } elseif ($type == 'svg') { - $this->ImageSVG($tag['attribute']['src'], $xpos, $this->y, $iw, $ih, $imglink, $align, '', $border, true); - } else { - $this->Image($tag['attribute']['src'], $xpos, $this->y, $iw, $ih, '', $imglink, $align, false, 300, '', false, false, $border, false, false, true); - } - switch($align) { - case 'T': { - $this->y = $prevy; - break; - } - case 'M': { - $this->y = (($this->img_rb_y + $prevy - ($this->getCellHeight($tag['fontsize'] / $this->k))) / 2); - break; - } - case 'B': { - $this->y = $this->img_rb_y - ($this->getCellHeight($tag['fontsize'] / $this->k) - ($this->getFontDescent($tag['fontname'], $tag['fontstyle'], $tag['fontsize']) * $this->cell_height_ratio)); - break; - } - } - } - break; - } - case 'dl': { - ++$this->listnum; - if ($this->listnum == 1) { - $this->addHTMLVertSpace($hbz, $hb, $cell, $firsttag); - } else { - $this->addHTMLVertSpace(0, 0, $cell, $firsttag); - } - break; - } - case 'dt': { - $this->addHTMLVertSpace($hbz, $hb, $cell, $firsttag); - break; - } - case 'dd': { - if ($this->rtl) { - $this->rMargin += $this->listindent; - } else { - $this->lMargin += $this->listindent; - } - ++$this->listindentlevel; - $this->addHTMLVertSpace($hbz, $hb, $cell, $firsttag); - break; - } - case 'ul': - case 'ol': { - ++$this->listnum; - if ($tag['value'] == 'ol') { - $this->listordered[$this->listnum] = true; - } else { - $this->listordered[$this->listnum] = false; - } - if (isset($tag['attribute']['start'])) { - $this->listcount[$this->listnum] = intval($tag['attribute']['start']) - 1; - } else { - $this->listcount[$this->listnum] = 0; - } - if ($this->rtl) { - $this->rMargin += $this->listindent; - $this->x -= $this->listindent; - } else { - $this->lMargin += $this->listindent; - $this->x += $this->listindent; - } - ++$this->listindentlevel; - if ($this->listnum == 1) { - if ($key > 1) { - $this->addHTMLVertSpace($hbz, $hb, $cell, $firsttag); - } - } else { - $this->addHTMLVertSpace(0, 0, $cell, $firsttag); - } - break; - } - case 'li': { - if ($key > 2) { - $this->addHTMLVertSpace($hbz, $hb, $cell, $firsttag); - } - if ($this->listordered[$this->listnum]) { - // ordered item - if (isset($parent['attribute']['type']) AND !TCPDF_STATIC::empty_string($parent['attribute']['type'])) { - $this->lispacer = $parent['attribute']['type']; - } elseif (isset($parent['listtype']) AND !TCPDF_STATIC::empty_string($parent['listtype'])) { - $this->lispacer = $parent['listtype']; - } elseif (isset($this->lisymbol) AND !TCPDF_STATIC::empty_string($this->lisymbol)) { - $this->lispacer = $this->lisymbol; - } else { - $this->lispacer = '#'; - } - ++$this->listcount[$this->listnum]; - if (isset($tag['attribute']['value'])) { - $this->listcount[$this->listnum] = intval($tag['attribute']['value']); - } - } else { - // unordered item - if (isset($parent['attribute']['type']) AND !TCPDF_STATIC::empty_string($parent['attribute']['type'])) { - $this->lispacer = $parent['attribute']['type']; - } elseif (isset($parent['listtype']) AND !TCPDF_STATIC::empty_string($parent['listtype'])) { - $this->lispacer = $parent['listtype']; - } elseif (isset($this->lisymbol) AND !TCPDF_STATIC::empty_string($this->lisymbol)) { - $this->lispacer = $this->lisymbol; - } else { - $this->lispacer = '!'; - } - } - break; - } - case 'blockquote': { - if ($this->rtl) { - $this->rMargin += $this->listindent; - } else { - $this->lMargin += $this->listindent; - } - ++$this->listindentlevel; - $this->addHTMLVertSpace($hbz, $hb, $cell, $firsttag); - break; - } - case 'br': { - $this->addHTMLVertSpace($hbz, $hb, $cell, $firsttag); - break; - } - case 'div': { - $this->addHTMLVertSpace($hbz, $hb, $cell, $firsttag); - break; - } - case 'p': { - $this->addHTMLVertSpace($hbz, $hb, $cell, $firsttag); - break; - } - case 'pre': { - $this->addHTMLVertSpace($hbz, $hb, $cell, $firsttag); - $this->premode = true; - break; - } - case 'sup': { - $this->SetXY($this->GetX(), $this->GetY() - ((0.7 * $this->FontSizePt) / $this->k)); - break; - } - case 'sub': { - $this->SetXY($this->GetX(), $this->GetY() + ((0.3 * $this->FontSizePt) / $this->k)); - break; - } - case 'h1': - case 'h2': - case 'h3': - case 'h4': - case 'h5': - case 'h6': { - $this->addHTMLVertSpace($hbz, $hb, $cell, $firsttag); - break; - } - // Form fields (since 4.8.000 - 2009-09-07) - case 'form': { - if (isset($tag['attribute']['action'])) { - $this->form_action = $tag['attribute']['action']; - } else { - $this->Error('Please explicitly set action attribute path!'); - } - if (isset($tag['attribute']['enctype'])) { - $this->form_enctype = $tag['attribute']['enctype']; - } else { - $this->form_enctype = 'application/x-www-form-urlencoded'; - } - if (isset($tag['attribute']['method'])) { - $this->form_mode = $tag['attribute']['method']; - } else { - $this->form_mode = 'post'; - } - break; - } - case 'input': { - if (isset($tag['attribute']['name']) AND !TCPDF_STATIC::empty_string($tag['attribute']['name'])) { - $name = $tag['attribute']['name']; - } else { - break; - } - $prop = array(); - $opt = array(); - if (isset($tag['attribute']['readonly']) AND !TCPDF_STATIC::empty_string($tag['attribute']['readonly'])) { - $prop['readonly'] = true; - } - if (isset($tag['attribute']['value']) AND !TCPDF_STATIC::empty_string($tag['attribute']['value'])) { - $value = $tag['attribute']['value']; - } - if (isset($tag['attribute']['maxlength']) AND !TCPDF_STATIC::empty_string($tag['attribute']['maxlength'])) { - $opt['maxlen'] = intval($tag['attribute']['maxlength']); - } - $h = $this->getCellHeight($this->FontSize); - if (isset($tag['attribute']['size']) AND !TCPDF_STATIC::empty_string($tag['attribute']['size'])) { - $w = intval($tag['attribute']['size']) * $this->GetStringWidth(chr(32)) * 2; - } else { - $w = $h; - } - if (isset($tag['attribute']['checked']) AND (($tag['attribute']['checked'] == 'checked') OR ($tag['attribute']['checked'] == 'true'))) { - $checked = true; - } else { - $checked = false; - } - if (isset($tag['align'])) { - switch ($tag['align']) { - case 'C': { - $opt['q'] = 1; - break; - } - case 'R': { - $opt['q'] = 2; - break; - } - case 'L': - default: { - break; - } - } - } - switch ($tag['attribute']['type']) { - case 'text': { - if (isset($value)) { - $opt['v'] = $value; - } - $this->TextField($name, $w, $h, $prop, $opt, '', '', false); - break; - } - case 'password': { - if (isset($value)) { - $opt['v'] = $value; - } - $prop['password'] = 'true'; - $this->TextField($name, $w, $h, $prop, $opt, '', '', false); - break; - } - case 'checkbox': { - if (!isset($value)) { - break; - } - $this->CheckBox($name, $w, $checked, $prop, $opt, $value, '', '', false); - break; - } - case 'radio': { - if (!isset($value)) { - break; - } - $this->RadioButton($name, $w, $prop, $opt, $value, $checked, '', '', false); - break; - } - case 'submit': { - if (!isset($value)) { - $value = 'submit'; - } - $w = $this->GetStringWidth($value) * 1.5; - $h *= 1.6; - $prop = array('lineWidth'=>1, 'borderStyle'=>'beveled', 'fillColor'=>array(196, 196, 196), 'strokeColor'=>array(255, 255, 255)); - $action = array(); - $action['S'] = 'SubmitForm'; - $action['F'] = $this->form_action; - if ($this->form_enctype != 'FDF') { - $action['Flags'] = array('ExportFormat'); - } - if ($this->form_mode == 'get') { - $action['Flags'] = array('GetMethod'); - } - $this->Button($name, $w, $h, $value, $action, $prop, $opt, '', '', false); - break; - } - case 'reset': { - if (!isset($value)) { - $value = 'reset'; - } - $w = $this->GetStringWidth($value) * 1.5; - $h *= 1.6; - $prop = array('lineWidth'=>1, 'borderStyle'=>'beveled', 'fillColor'=>array(196, 196, 196), 'strokeColor'=>array(255, 255, 255)); - $this->Button($name, $w, $h, $value, array('S'=>'ResetForm'), $prop, $opt, '', '', false); - break; - } - case 'file': { - $prop['fileSelect'] = 'true'; - $this->TextField($name, $w, $h, $prop, $opt, '', '', false); - if (!isset($value)) { - $value = '*'; - } - $w = $this->GetStringWidth($value) * 2; - $h *= 1.2; - $prop = array('lineWidth'=>1, 'borderStyle'=>'beveled', 'fillColor'=>array(196, 196, 196), 'strokeColor'=>array(255, 255, 255)); - $jsaction = 'var f=this.getField(\''.$name.'\'); f.browseForFileToSubmit();'; - $this->Button('FB_'.$name, $w, $h, $value, $jsaction, $prop, $opt, '', '', false); - break; - } - case 'hidden': { - if (isset($value)) { - $opt['v'] = $value; - } - $opt['f'] = array('invisible', 'hidden'); - $this->TextField($name, 0, 0, $prop, $opt, '', '', false); - break; - } - case 'image': { - // THIS TYPE MUST BE FIXED - if (isset($tag['attribute']['src']) AND !TCPDF_STATIC::empty_string($tag['attribute']['src'])) { - $img = $tag['attribute']['src']; - } else { - break; - } - $value = 'img'; - //$opt['mk'] = array('i'=>$img, 'tp'=>1, 'if'=>array('sw'=>'A', 's'=>'A', 'fb'=>false)); - if (isset($tag['attribute']['onclick']) AND !empty($tag['attribute']['onclick'])) { - $jsaction = $tag['attribute']['onclick']; - } else { - $jsaction = ''; - } - $this->Button($name, $w, $h, $value, $jsaction, $prop, $opt, '', '', false); - break; - } - case 'button': { - if (!isset($value)) { - $value = ' '; - } - $w = $this->GetStringWidth($value) * 1.5; - $h *= 1.6; - $prop = array('lineWidth'=>1, 'borderStyle'=>'beveled', 'fillColor'=>array(196, 196, 196), 'strokeColor'=>array(255, 255, 255)); - if (isset($tag['attribute']['onclick']) AND !empty($tag['attribute']['onclick'])) { - $jsaction = $tag['attribute']['onclick']; - } else { - $jsaction = ''; - } - $this->Button($name, $w, $h, $value, $jsaction, $prop, $opt, '', '', false); - break; - } - } - break; - } - case 'textarea': { - $prop = array(); - $opt = array(); - if (isset($tag['attribute']['readonly']) AND !TCPDF_STATIC::empty_string($tag['attribute']['readonly'])) { - $prop['readonly'] = true; - } - if (isset($tag['attribute']['name']) AND !TCPDF_STATIC::empty_string($tag['attribute']['name'])) { - $name = $tag['attribute']['name']; - } else { - break; - } - if (isset($tag['attribute']['value']) AND !TCPDF_STATIC::empty_string($tag['attribute']['value'])) { - $opt['v'] = $tag['attribute']['value']; - } - if (isset($tag['attribute']['cols']) AND !TCPDF_STATIC::empty_string($tag['attribute']['cols'])) { - $w = intval($tag['attribute']['cols']) * $this->GetStringWidth(chr(32)) * 2; - } else { - $w = 40; - } - if (isset($tag['attribute']['rows']) AND !TCPDF_STATIC::empty_string($tag['attribute']['rows'])) { - $h = intval($tag['attribute']['rows']) * $this->getCellHeight($this->FontSize); - } else { - $h = 10; - } - $prop['multiline'] = 'true'; - $this->TextField($name, $w, $h, $prop, $opt, '', '', false); - break; - } - case 'select': { - $h = $this->getCellHeight($this->FontSize); - if (isset($tag['attribute']['size']) AND !TCPDF_STATIC::empty_string($tag['attribute']['size'])) { - $h *= ($tag['attribute']['size'] + 1); - } - $prop = array(); - $opt = array(); - if (isset($tag['attribute']['name']) AND !TCPDF_STATIC::empty_string($tag['attribute']['name'])) { - $name = $tag['attribute']['name']; - } else { - break; - } - $w = 0; - if (isset($tag['attribute']['opt']) AND !TCPDF_STATIC::empty_string($tag['attribute']['opt'])) { - $options = explode('#!NwL!#', $tag['attribute']['opt']); - $values = array(); - foreach ($options as $val) { - if (strpos($val, '#!TaB!#') !== false) { - $opts = explode('#!TaB!#', $val); - $values[] = $opts; - $w = max($w, $this->GetStringWidth($opts[1])); - } else { - $values[] = $val; - $w = max($w, $this->GetStringWidth($val)); - } - } - } else { - break; - } - $w *= 2; - if (isset($tag['attribute']['multiple']) AND ($tag['attribute']['multiple']='multiple')) { - $prop['multipleSelection'] = 'true'; - $this->ListBox($name, $w, $h, $values, $prop, $opt, '', '', false); - } else { - $this->ComboBox($name, $w, $h, $values, $prop, $opt, '', '', false); - } - break; - } - case 'tcpdf': { - if (defined('K_TCPDF_CALLS_IN_HTML') AND (K_TCPDF_CALLS_IN_HTML === true)) { - // Special tag used to call TCPDF methods - if (isset($tag['attribute']['method'])) { - $tcpdf_method = $tag['attribute']['method']; - if (method_exists($this, $tcpdf_method)) { - if (isset($tag['attribute']['params']) AND (!empty($tag['attribute']['params']))) { - $params = $this->unserializeTCPDFtagParameters($tag['attribute']['params']); - call_user_func_array(array($this, $tcpdf_method), $params); - } else { - $this->$tcpdf_method(); - } - $this->newline = true; - } - } - } - break; - } - default: { - break; - } - } - // define tags that support borders and background colors - $bordertags = array('blockquote','br','dd','dl','div','dt','h1','h2','h3','h4','h5','h6','hr','li','ol','p','pre','ul','tcpdf','table'); - if (in_array($tag['value'], $bordertags)) { - // set border - $dom[$key]['borderposition'] = $this->getBorderStartPosition(); - } - if ($dom[$key]['self'] AND isset($dom[$key]['attribute']['pagebreakafter'])) { - $pba = $dom[$key]['attribute']['pagebreakafter']; - // check for pagebreak - if (($pba == 'true') OR ($pba == 'left') OR ($pba == 'right')) { - // add a page (or trig AcceptPageBreak() for multicolumn mode) - $this->checkPageBreak($this->PageBreakTrigger + 1); - } - if ((($pba == 'left') AND (((!$this->rtl) AND (($this->page % 2) == 0)) OR (($this->rtl) AND (($this->page % 2) != 0)))) - OR (($pba == 'right') AND (((!$this->rtl) AND (($this->page % 2) != 0)) OR (($this->rtl) AND (($this->page % 2) == 0))))) { - // add a page (or trig AcceptPageBreak() for multicolumn mode) - $this->checkPageBreak($this->PageBreakTrigger + 1); - } - } - return $dom; - } - - /** - * Process closing tags. - * @param $dom (array) html dom array - * @param $key (int) current element id - * @param $cell (boolean) if true add the default left (or right if RTL) padding to each new line (default false). - * @param $maxbottomliney (int) maximum y value of current line - * @return $dom array - * @protected - */ - protected function closeHTMLTagHandler($dom, $key, $cell, $maxbottomliney=0) { - $tag = $dom[$key]; - $parent = $dom[($dom[$key]['parent'])]; - $lasttag = ((!isset($dom[($key + 1)])) OR ((!isset($dom[($key + 2)])) AND ($dom[($key + 1)]['value'] == 'marker'))); - $in_table_head = false; - // maximum x position (used to draw borders) - if ($this->rtl) { - $xmax = $this->w; - } else { - $xmax = 0; - } - if ($tag['block']) { - $hbz = 0; // distance from y to line bottom - $hb = 0; // vertical space between block tags - // calculate vertical space for block tags - if (isset($this->tagvspaces[$tag['value']][1]['h']) AND ($this->tagvspaces[$tag['value']][1]['h'] >= 0)) { - $pre_h = $this->tagvspaces[$tag['value']][1]['h']; - } elseif (isset($parent['fontsize'])) { - $pre_h = $this->getCellHeight($parent['fontsize'] / $this->k); - } else { - $pre_h = $this->getCellHeight($this->FontSize); - } - if (isset($this->tagvspaces[$tag['value']][1]['n'])) { - $cn = $this->tagvspaces[$tag['value']][1]['n']; - } elseif (preg_match('/[h][0-9]/', $tag['value']) > 0) { - $cn = 0.6; - } else { - $cn = 1; - } - if ((!isset($this->tagvspaces[$tag['value']])) AND ($tag['value'] == 'div')) { - $hb = 0; - } else { - $hb = ($cn * $pre_h); - } - if ($maxbottomliney > $this->PageBreakTrigger) { - $hbz = $this->getCellHeight($this->FontSize); - } elseif ($this->y < $maxbottomliney) { - $hbz = ($maxbottomliney - $this->y); - } - } - // Closing tag - switch($tag['value']) { - case 'tr': { - $table_el = $dom[($dom[$key]['parent'])]['parent']; - if (!isset($parent['endy'])) { - $dom[($dom[$key]['parent'])]['endy'] = $this->y; - $parent['endy'] = $this->y; - } - if (!isset($parent['endpage'])) { - $dom[($dom[$key]['parent'])]['endpage'] = $this->page; - $parent['endpage'] = $this->page; - } - if (!isset($parent['endcolumn'])) { - $dom[($dom[$key]['parent'])]['endcolumn'] = $this->current_column; - $parent['endcolumn'] = $this->current_column; - } - // update row-spanned cells - if (isset($dom[$table_el]['rowspans'])) { - foreach ($dom[$table_el]['rowspans'] as $k => $trwsp) { - $dom[$table_el]['rowspans'][$k]['rowspan'] -= 1; - if ($dom[$table_el]['rowspans'][$k]['rowspan'] == 0) { - if (($dom[$table_el]['rowspans'][$k]['endpage'] == $parent['endpage']) AND ($dom[$table_el]['rowspans'][$k]['endcolumn'] == $parent['endcolumn'])) { - $dom[($dom[$key]['parent'])]['endy'] = max($dom[$table_el]['rowspans'][$k]['endy'], $parent['endy']); - } elseif (($dom[$table_el]['rowspans'][$k]['endpage'] > $parent['endpage']) OR ($dom[$table_el]['rowspans'][$k]['endcolumn'] > $parent['endcolumn'])) { - $dom[($dom[$key]['parent'])]['endy'] = $dom[$table_el]['rowspans'][$k]['endy']; - $dom[($dom[$key]['parent'])]['endpage'] = $dom[$table_el]['rowspans'][$k]['endpage']; - $dom[($dom[$key]['parent'])]['endcolumn'] = $dom[$table_el]['rowspans'][$k]['endcolumn']; - } - } - } - // report new endy and endpage to the rowspanned cells - foreach ($dom[$table_el]['rowspans'] as $k => $trwsp) { - if ($dom[$table_el]['rowspans'][$k]['rowspan'] == 0) { - $dom[$table_el]['rowspans'][$k]['endpage'] = max($dom[$table_el]['rowspans'][$k]['endpage'], $dom[($dom[$key]['parent'])]['endpage']); - $dom[($dom[$key]['parent'])]['endpage'] = $dom[$table_el]['rowspans'][$k]['endpage']; - $dom[$table_el]['rowspans'][$k]['endcolumn'] = max($dom[$table_el]['rowspans'][$k]['endcolumn'], $dom[($dom[$key]['parent'])]['endcolumn']); - $dom[($dom[$key]['parent'])]['endcolumn'] = $dom[$table_el]['rowspans'][$k]['endcolumn']; - $dom[$table_el]['rowspans'][$k]['endy'] = max($dom[$table_el]['rowspans'][$k]['endy'], $dom[($dom[$key]['parent'])]['endy']); - $dom[($dom[$key]['parent'])]['endy'] = $dom[$table_el]['rowspans'][$k]['endy']; - } - } - // update remaining rowspanned cells - foreach ($dom[$table_el]['rowspans'] as $k => $trwsp) { - if ($dom[$table_el]['rowspans'][$k]['rowspan'] == 0) { - $dom[$table_el]['rowspans'][$k]['endpage'] = $dom[($dom[$key]['parent'])]['endpage']; - $dom[$table_el]['rowspans'][$k]['endcolumn'] = $dom[($dom[$key]['parent'])]['endcolumn']; - $dom[$table_el]['rowspans'][$k]['endy'] = $dom[($dom[$key]['parent'])]['endy']; - } - } - } - $prev_page = $this->page; - $this->setPage($dom[($dom[$key]['parent'])]['endpage']); - if ($this->num_columns > 1) { - if ((($this->current_column == 0) AND ($dom[($dom[$key]['parent'])]['endcolumn'] == ($this->num_columns - 1))) - OR (($this->current_column == $dom[($dom[$key]['parent'])]['endcolumn']) AND ($prev_page < $this->page))) { - // page jump - $this->selectColumn(0); - $dom[($dom[$key]['parent'])]['endcolumn'] = 0; - $dom[($dom[$key]['parent'])]['endy'] = $this->y; - } else { - $this->selectColumn($dom[($dom[$key]['parent'])]['endcolumn']); - $this->y = $dom[($dom[$key]['parent'])]['endy']; - } - } else { - $this->y = $dom[($dom[$key]['parent'])]['endy']; - } - if (isset($dom[$table_el]['attribute']['cellspacing'])) { - $this->y += $this->getHTMLUnitToUnits($dom[$table_el]['attribute']['cellspacing'], 1, 'px'); - } elseif (isset($dom[$table_el]['border-spacing'])) { - $this->y += $dom[$table_el]['border-spacing']['V']; - } - $this->Ln(0, $cell); - if ($this->current_column == $parent['startcolumn']) { - $this->x = $parent['startx']; - } - // account for booklet mode - if ($this->page > $parent['startpage']) { - if (($this->rtl) AND ($this->pagedim[$this->page]['orm'] != $this->pagedim[$parent['startpage']]['orm'])) { - $this->x -= ($this->pagedim[$this->page]['orm'] - $this->pagedim[$parent['startpage']]['orm']); - } elseif ((!$this->rtl) AND ($this->pagedim[$this->page]['olm'] != $this->pagedim[$parent['startpage']]['olm'])) { - $this->x += ($this->pagedim[$this->page]['olm'] - $this->pagedim[$parent['startpage']]['olm']); - } - } - break; - } - case 'tablehead': - // closing tag used for the thead part - $in_table_head = true; - $this->inthead = false; - case 'table': { - $table_el = $parent; - // set default border - if (isset($table_el['attribute']['border']) AND ($table_el['attribute']['border'] > 0)) { - // set default border - $border = array('LTRB' => array('width' => $this->getCSSBorderWidth($table_el['attribute']['border']), 'cap'=>'square', 'join'=>'miter', 'dash'=> 0, 'color'=>array(0,0,0))); - } else { - $border = 0; - } - $default_border = $border; - // fix bottom line alignment of last line before page break - foreach ($dom[($dom[$key]['parent'])]['trids'] as $j => $trkey) { - // update row-spanned cells - if (isset($dom[($dom[$key]['parent'])]['rowspans'])) { - foreach ($dom[($dom[$key]['parent'])]['rowspans'] as $k => $trwsp) { - if (isset($prevtrkey) AND ($trwsp['trid'] == $prevtrkey) AND ($trwsp['mrowspan'] > 0)) { - $dom[($dom[$key]['parent'])]['rowspans'][$k]['trid'] = $trkey; - } - if ($dom[($dom[$key]['parent'])]['rowspans'][$k]['trid'] == $trkey) { - $dom[($dom[$key]['parent'])]['rowspans'][$k]['mrowspan'] -= 1; - } - } - } - if (isset($prevtrkey) AND ($dom[$trkey]['startpage'] > $dom[$prevtrkey]['endpage'])) { - $pgendy = $this->pagedim[$dom[$prevtrkey]['endpage']]['hk'] - $this->pagedim[$dom[$prevtrkey]['endpage']]['bm']; - $dom[$prevtrkey]['endy'] = $pgendy; - // update row-spanned cells - if (isset($dom[($dom[$key]['parent'])]['rowspans'])) { - foreach ($dom[($dom[$key]['parent'])]['rowspans'] as $k => $trwsp) { - if (($trwsp['trid'] == $prevtrkey) AND ($trwsp['mrowspan'] >= 0) AND ($trwsp['endpage'] == $dom[$prevtrkey]['endpage'])) { - $dom[($dom[$key]['parent'])]['rowspans'][$k]['endy'] = $pgendy; - $dom[($dom[$key]['parent'])]['rowspans'][$k]['mrowspan'] = -1; - } - } - } - } - $prevtrkey = $trkey; - $table_el = $dom[($dom[$key]['parent'])]; - } - // for each row - if (count($table_el['trids']) > 0) { - unset($xmax); - } - foreach ($table_el['trids'] as $j => $trkey) { - $parent = $dom[$trkey]; - if (!isset($xmax)) { - $xmax = $parent['cellpos'][(count($parent['cellpos']) - 1)]['endx']; - } - // for each cell on the row - foreach ($parent['cellpos'] as $k => $cellpos) { - if (isset($cellpos['rowspanid']) AND ($cellpos['rowspanid'] >= 0)) { - $cellpos['startx'] = $table_el['rowspans'][($cellpos['rowspanid'])]['startx']; - $cellpos['endx'] = $table_el['rowspans'][($cellpos['rowspanid'])]['endx']; - $endy = $table_el['rowspans'][($cellpos['rowspanid'])]['endy']; - $startpage = $table_el['rowspans'][($cellpos['rowspanid'])]['startpage']; - $endpage = $table_el['rowspans'][($cellpos['rowspanid'])]['endpage']; - $startcolumn = $table_el['rowspans'][($cellpos['rowspanid'])]['startcolumn']; - $endcolumn = $table_el['rowspans'][($cellpos['rowspanid'])]['endcolumn']; - } else { - $endy = $parent['endy']; - $startpage = $parent['startpage']; - $endpage = $parent['endpage']; - $startcolumn = $parent['startcolumn']; - $endcolumn = $parent['endcolumn']; - } - if ($this->num_columns == 0) { - $this->num_columns = 1; - } - if (isset($cellpos['border'])) { - $border = $cellpos['border']; - } - if (isset($cellpos['bgcolor']) AND ($cellpos['bgcolor']) !== false) { - $this->SetFillColorArray($cellpos['bgcolor']); - $fill = true; - } else { - $fill = false; - } - $x = $cellpos['startx']; - $y = $parent['starty']; - $starty = $y; - $w = abs($cellpos['endx'] - $cellpos['startx']); - // get border modes - $border_start = TCPDF_STATIC::getBorderMode($border, $position='start', $this->opencell); - $border_end = TCPDF_STATIC::getBorderMode($border, $position='end', $this->opencell); - $border_middle = TCPDF_STATIC::getBorderMode($border, $position='middle', $this->opencell); - // design borders around HTML cells. - for ($page = $startpage; $page <= $endpage; ++$page) { // for each page - $ccode = ''; - $this->setPage($page); - if ($this->num_columns < 2) { - // single-column mode - $this->x = $x; - $this->y = $this->tMargin; - } - // account for margin changes - if ($page > $startpage) { - if (($this->rtl) AND ($this->pagedim[$page]['orm'] != $this->pagedim[$startpage]['orm'])) { - $this->x -= ($this->pagedim[$page]['orm'] - $this->pagedim[$startpage]['orm']); - } elseif ((!$this->rtl) AND ($this->pagedim[$page]['olm'] != $this->pagedim[$startpage]['olm'])) { - $this->x += ($this->pagedim[$page]['olm'] - $this->pagedim[$startpage]['olm']); - } - } - if ($startpage == $endpage) { // single page - $deltacol = 0; - $deltath = 0; - for ($column = $startcolumn; $column <= $endcolumn; ++$column) { // for each column - $this->selectColumn($column); - if ($startcolumn == $endcolumn) { // single column - $cborder = $border; - $h = $endy - $parent['starty']; - $this->y = $y; - $this->x = $x; - } elseif ($column == $startcolumn) { // first column - $cborder = $border_start; - $this->y = $starty; - $this->x = $x; - $h = $this->h - $this->y - $this->bMargin; - if ($this->rtl) { - $deltacol = $this->x + $this->rMargin - $this->w; - } else { - $deltacol = $this->x - $this->lMargin; - } - } elseif ($column == $endcolumn) { // end column - $cborder = $border_end; - if (isset($this->columns[$column]['th']['\''.$page.'\''])) { - $this->y = $this->columns[$column]['th']['\''.$page.'\'']; - } - $this->x += $deltacol; - $h = $endy - $this->y; - } else { // middle column - $cborder = $border_middle; - if (isset($this->columns[$column]['th']['\''.$page.'\''])) { - $this->y = $this->columns[$column]['th']['\''.$page.'\'']; - } - $this->x += $deltacol; - $h = $this->h - $this->y - $this->bMargin; - } - $ccode .= $this->getCellCode($w, $h, '', $cborder, 1, '', $fill, '', 0, true)."\n"; - } // end for each column - } elseif ($page == $startpage) { // first page - $deltacol = 0; - $deltath = 0; - for ($column = $startcolumn; $column < $this->num_columns; ++$column) { // for each column - $this->selectColumn($column); - if ($column == $startcolumn) { // first column - $cborder = $border_start; - $this->y = $starty; - $this->x = $x; - $h = $this->h - $this->y - $this->bMargin; - if ($this->rtl) { - $deltacol = $this->x + $this->rMargin - $this->w; - } else { - $deltacol = $this->x - $this->lMargin; - } - } else { // middle column - $cborder = $border_middle; - if (isset($this->columns[$column]['th']['\''.$page.'\''])) { - $this->y = $this->columns[$column]['th']['\''.$page.'\'']; - } - $this->x += $deltacol; - $h = $this->h - $this->y - $this->bMargin; - } - $ccode .= $this->getCellCode($w, $h, '', $cborder, 1, '', $fill, '', 0, true)."\n"; - } // end for each column - } elseif ($page == $endpage) { // last page - $deltacol = 0; - $deltath = 0; - for ($column = 0; $column <= $endcolumn; ++$column) { // for each column - $this->selectColumn($column); - if ($column == $endcolumn) { // end column - $cborder = $border_end; - if (isset($this->columns[$column]['th']['\''.$page.'\''])) { - $this->y = $this->columns[$column]['th']['\''.$page.'\'']; - } - $this->x += $deltacol; - $h = $endy - $this->y; - } else { // middle column - $cborder = $border_middle; - if (isset($this->columns[$column]['th']['\''.$page.'\''])) { - $this->y = $this->columns[$column]['th']['\''.$page.'\'']; - } - $this->x += $deltacol; - $h = $this->h - $this->y - $this->bMargin; - } - $ccode .= $this->getCellCode($w, $h, '', $cborder, 1, '', $fill, '', 0, true)."\n"; - } // end for each column - } else { // middle page - $deltacol = 0; - $deltath = 0; - for ($column = 0; $column < $this->num_columns; ++$column) { // for each column - $this->selectColumn($column); - $cborder = $border_middle; - if (isset($this->columns[$column]['th']['\''.$page.'\''])) { - $this->y = $this->columns[$column]['th']['\''.$page.'\'']; - } - $this->x += $deltacol; - $h = $this->h - $this->y - $this->bMargin; - $ccode .= $this->getCellCode($w, $h, '', $cborder, 1, '', $fill, '', 0, true)."\n"; - } // end for each column - } - if (!empty($cborder) OR !empty($fill)) { - $offsetlen = strlen($ccode); - // draw border and fill - if ($this->inxobj) { - // we are inside an XObject template - if (end($this->xobjects[$this->xobjid]['transfmrk']) !== false) { - $pagemarkkey = key($this->xobjects[$this->xobjid]['transfmrk']); - $pagemark = $this->xobjects[$this->xobjid]['transfmrk'][$pagemarkkey]; - $this->xobjects[$this->xobjid]['transfmrk'][$pagemarkkey] += $offsetlen; - } else { - $pagemark = $this->xobjects[$this->xobjid]['intmrk']; - $this->xobjects[$this->xobjid]['intmrk'] += $offsetlen; - } - $pagebuff = $this->xobjects[$this->xobjid]['outdata']; - $pstart = substr($pagebuff, 0, $pagemark); - $pend = substr($pagebuff, $pagemark); - $this->xobjects[$this->xobjid]['outdata'] = $pstart.$ccode.$pend; - } else { - // draw border and fill - if (end($this->transfmrk[$this->page]) !== false) { - $pagemarkkey = key($this->transfmrk[$this->page]); - $pagemark = $this->transfmrk[$this->page][$pagemarkkey]; - } elseif ($this->InFooter) { - $pagemark = $this->footerpos[$this->page]; - } else { - $pagemark = $this->intmrk[$this->page]; - } - $pagebuff = $this->getPageBuffer($this->page); - $pstart = substr($pagebuff, 0, $pagemark); - $pend = substr($pagebuff, $pagemark); - $this->setPageBuffer($this->page, $pstart.$ccode.$pend); - } - } - } // end for each page - // restore default border - $border = $default_border; - } // end for each cell on the row - if (isset($table_el['attribute']['cellspacing'])) { - $this->y += $this->getHTMLUnitToUnits($table_el['attribute']['cellspacing'], 1, 'px'); - } elseif (isset($table_el['border-spacing'])) { - $this->y += $table_el['border-spacing']['V']; - } - $this->Ln(0, $cell); - $this->x = $parent['startx']; - if ($endpage > $startpage) { - if (($this->rtl) AND ($this->pagedim[$endpage]['orm'] != $this->pagedim[$startpage]['orm'])) { - $this->x += ($this->pagedim[$endpage]['orm'] - $this->pagedim[$startpage]['orm']); - } elseif ((!$this->rtl) AND ($this->pagedim[$endpage]['olm'] != $this->pagedim[$startpage]['olm'])) { - $this->x += ($this->pagedim[$endpage]['olm'] - $this->pagedim[$startpage]['olm']); - } - } - } - if (!$in_table_head) { // we are not inside a thead section - $this->cell_padding = $table_el['old_cell_padding']; - // reset row height - $this->resetLastH(); - if (($this->page == ($this->numpages - 1)) AND ($this->pageopen[$this->numpages])) { - $plendiff = ($this->pagelen[$this->numpages] - $this->emptypagemrk[$this->numpages]); - if (($plendiff > 0) AND ($plendiff < 60)) { - $pagediff = substr($this->getPageBuffer($this->numpages), $this->emptypagemrk[$this->numpages], $plendiff); - if (substr($pagediff, 0, 5) == 'BT /F') { - // the difference is only a font setting - $plendiff = 0; - } - } - if ($plendiff == 0) { - // remove last blank page - $this->deletePage($this->numpages); - } - } - if (isset($this->theadMargins['top'])) { - // restore top margin - $this->tMargin = $this->theadMargins['top']; - } - if (!isset($table_el['attribute']['nested']) OR ($table_el['attribute']['nested'] != 'true')) { - // reset main table header - $this->thead = ''; - $this->theadMargins = array(); - $this->pagedim[$this->page]['tm'] = $this->tMargin; - } - } - $parent = $table_el; - break; - } - case 'a': { - $this->HREF = ''; - break; - } - case 'sup': { - $this->SetXY($this->GetX(), $this->GetY() + ((0.7 * $parent['fontsize']) / $this->k)); - break; - } - case 'sub': { - $this->SetXY($this->GetX(), $this->GetY() - ((0.3 * $parent['fontsize']) / $this->k)); - break; - } - case 'div': { - $this->addHTMLVertSpace($hbz, $hb, $cell, false, $lasttag); - break; - } - case 'blockquote': { - if ($this->rtl) { - $this->rMargin -= $this->listindent; - } else { - $this->lMargin -= $this->listindent; - } - --$this->listindentlevel; - $this->addHTMLVertSpace($hbz, $hb, $cell, false, $lasttag); - break; - } - case 'p': { - $this->addHTMLVertSpace($hbz, $hb, $cell, false, $lasttag); - break; - } - case 'pre': { - $this->addHTMLVertSpace($hbz, $hb, $cell, false, $lasttag); - $this->premode = false; - break; - } - case 'dl': { - --$this->listnum; - if ($this->listnum <= 0) { - $this->listnum = 0; - $this->addHTMLVertSpace($hbz, $hb, $cell, false, $lasttag); - } else { - $this->addHTMLVertSpace(0, 0, $cell, false, $lasttag); - } - $this->resetLastH(); - break; - } - case 'dt': { - $this->lispacer = ''; - $this->addHTMLVertSpace(0, 0, $cell, false, $lasttag); - break; - } - case 'dd': { - $this->lispacer = ''; - if ($this->rtl) { - $this->rMargin -= $this->listindent; - } else { - $this->lMargin -= $this->listindent; - } - --$this->listindentlevel; - $this->addHTMLVertSpace(0, 0, $cell, false, $lasttag); - break; - } - case 'ul': - case 'ol': { - --$this->listnum; - $this->lispacer = ''; - if ($this->rtl) { - $this->rMargin -= $this->listindent; - } else { - $this->lMargin -= $this->listindent; - } - --$this->listindentlevel; - if ($this->listnum <= 0) { - $this->listnum = 0; - $this->addHTMLVertSpace($hbz, $hb, $cell, false, $lasttag); - } else { - $this->addHTMLVertSpace(0, 0, $cell, false, $lasttag); - } - $this->resetLastH(); - break; - } - case 'li': { - $this->lispacer = ''; - $this->addHTMLVertSpace(0, 0, $cell, false, $lasttag); - break; - } - case 'h1': - case 'h2': - case 'h3': - case 'h4': - case 'h5': - case 'h6': { - $this->addHTMLVertSpace($hbz, $hb, $cell, false, $lasttag); - break; - } - // Form fields (since 4.8.000 - 2009-09-07) - case 'form': { - $this->form_action = ''; - $this->form_enctype = 'application/x-www-form-urlencoded'; - break; - } - default : { - break; - } - } - // draw border and background (if any) - $this->drawHTMLTagBorder($parent, $xmax); - if (isset($dom[($dom[$key]['parent'])]['attribute']['pagebreakafter'])) { - $pba = $dom[($dom[$key]['parent'])]['attribute']['pagebreakafter']; - // check for pagebreak - if (($pba == 'true') OR ($pba == 'left') OR ($pba == 'right')) { - // add a page (or trig AcceptPageBreak() for multicolumn mode) - $this->checkPageBreak($this->PageBreakTrigger + 1); - } - if ((($pba == 'left') AND (((!$this->rtl) AND (($this->page % 2) == 0)) OR (($this->rtl) AND (($this->page % 2) != 0)))) - OR (($pba == 'right') AND (((!$this->rtl) AND (($this->page % 2) != 0)) OR (($this->rtl) AND (($this->page % 2) == 0))))) { - // add a page (or trig AcceptPageBreak() for multicolumn mode) - $this->checkPageBreak($this->PageBreakTrigger + 1); - } - } - $this->tmprtl = false; - return $dom; - } - - /** - * Add vertical spaces if needed. - * @param $hbz (string) Distance between current y and line bottom. - * @param $hb (string) The height of the break. - * @param $cell (boolean) if true add the default left (or right if RTL) padding to each new line (default false). - * @param $firsttag (boolean) set to true when the tag is the first. - * @param $lasttag (boolean) set to true when the tag is the last. - * @protected - */ - protected function addHTMLVertSpace($hbz=0, $hb=0, $cell=false, $firsttag=false, $lasttag=false) { - if ($firsttag) { - $this->Ln(0, $cell); - $this->htmlvspace = 0; - return; - } - if ($lasttag) { - $this->Ln($hbz, $cell); - $this->htmlvspace = 0; - return; - } - if ($hb < $this->htmlvspace) { - $hd = 0; - } else { - $hd = $hb - $this->htmlvspace; - $this->htmlvspace = $hb; - } - $this->Ln(($hbz + $hd), $cell); - } - - /** - * Return the starting coordinates to draw an html border - * @return array containing top-left border coordinates - * @protected - * @since 5.7.000 (2010-08-03) - */ - protected function getBorderStartPosition() { - if ($this->rtl) { - $xmax = $this->lMargin; - } else { - $xmax = $this->w - $this->rMargin; - } - return array('page' => $this->page, 'column' => $this->current_column, 'x' => $this->x, 'y' => $this->y, 'xmax' => $xmax); - } - - /** - * Draw an HTML block border and fill - * @param $tag (array) array of tag properties. - * @param $xmax (int) end X coordinate for border. - * @protected - * @since 5.7.000 (2010-08-03) - */ - protected function drawHTMLTagBorder($tag, $xmax) { - if (!isset($tag['borderposition'])) { - // nothing to draw - return; - } - $prev_x = $this->x; - $prev_y = $this->y; - $prev_lasth = $this->lasth; - $border = 0; - $fill = false; - $this->lasth = 0; - if (isset($tag['border']) AND !empty($tag['border'])) { - // get border style - $border = $tag['border']; - if (!TCPDF_STATIC::empty_string($this->thead) AND (!$this->inthead)) { - // border for table header - $border = TCPDF_STATIC::getBorderMode($border, $position='middle', $this->opencell); - } - } - if (isset($tag['bgcolor']) AND ($tag['bgcolor'] !== false)) { - // get background color - $old_bgcolor = $this->bgcolor; - $this->SetFillColorArray($tag['bgcolor']); - $fill = true; - } - if (!$border AND !$fill) { - // nothing to draw - return; - } - if (isset($tag['attribute']['cellspacing'])) { - $clsp = $this->getHTMLUnitToUnits($tag['attribute']['cellspacing'], 1, 'px'); - $cellspacing = array('H' => $clsp, 'V' => $clsp); - } elseif (isset($tag['border-spacing'])) { - $cellspacing = $tag['border-spacing']; - } else { - $cellspacing = array('H' => 0, 'V' => 0); - } - if (($tag['value'] != 'table') AND (is_array($border)) AND (!empty($border))) { - // draw the border externally respect the sqare edge. - $border['mode'] = 'ext'; - } - if ($this->rtl) { - if ($xmax >= $tag['borderposition']['x']) { - $xmax = $tag['borderposition']['xmax']; - } - $w = ($tag['borderposition']['x'] - $xmax); - } else { - if ($xmax <= $tag['borderposition']['x']) { - $xmax = $tag['borderposition']['xmax']; - } - $w = ($xmax - $tag['borderposition']['x']); - } - if ($w <= 0) { - return; - } - $w += $cellspacing['H']; - $startpage = $tag['borderposition']['page']; - $startcolumn = $tag['borderposition']['column']; - $x = $tag['borderposition']['x']; - $y = $tag['borderposition']['y']; - $endpage = $this->page; - $starty = $tag['borderposition']['y'] - $cellspacing['V']; - $currentY = $this->y; - $this->x = $x; - // get latest column - $endcolumn = $this->current_column; - if ($this->num_columns == 0) { - $this->num_columns = 1; - } - // get border modes - $border_start = TCPDF_STATIC::getBorderMode($border, $position='start', $this->opencell); - $border_end = TCPDF_STATIC::getBorderMode($border, $position='end', $this->opencell); - $border_middle = TCPDF_STATIC::getBorderMode($border, $position='middle', $this->opencell); - // temporary disable page regions - $temp_page_regions = $this->page_regions; - $this->page_regions = array(); - // design borders around HTML cells. - for ($page = $startpage; $page <= $endpage; ++$page) { // for each page - $ccode = ''; - $this->setPage($page); - if ($this->num_columns < 2) { - // single-column mode - $this->x = $x; - $this->y = $this->tMargin; - } - // account for margin changes - if ($page > $startpage) { - if (($this->rtl) AND ($this->pagedim[$page]['orm'] != $this->pagedim[$startpage]['orm'])) { - $this->x -= ($this->pagedim[$page]['orm'] - $this->pagedim[$startpage]['orm']); - } elseif ((!$this->rtl) AND ($this->pagedim[$page]['olm'] != $this->pagedim[$startpage]['olm'])) { - $this->x += ($this->pagedim[$page]['olm'] - $this->pagedim[$startpage]['olm']); - } - } - if ($startpage == $endpage) { - // single page - for ($column = $startcolumn; $column <= $endcolumn; ++$column) { // for each column - $this->selectColumn($column); - if ($startcolumn == $endcolumn) { // single column - $cborder = $border; - $h = ($currentY - $y) + $cellspacing['V']; - $this->y = $starty; - } elseif ($column == $startcolumn) { // first column - $cborder = $border_start; - $this->y = $starty; - $h = $this->h - $this->y - $this->bMargin; - } elseif ($column == $endcolumn) { // end column - $cborder = $border_end; - $h = $currentY - $this->y; - } else { // middle column - $cborder = $border_middle; - $h = $this->h - $this->y - $this->bMargin; - } - $ccode .= $this->getCellCode($w, $h, '', $cborder, 1, '', $fill, '', 0, true)."\n"; - } // end for each column - } elseif ($page == $startpage) { // first page - for ($column = $startcolumn; $column < $this->num_columns; ++$column) { // for each column - $this->selectColumn($column); - if ($column == $startcolumn) { // first column - $cborder = $border_start; - $this->y = $starty; - $h = $this->h - $this->y - $this->bMargin; - } else { // middle column - $cborder = $border_middle; - $h = $this->h - $this->y - $this->bMargin; - } - $ccode .= $this->getCellCode($w, $h, '', $cborder, 1, '', $fill, '', 0, true)."\n"; - } // end for each column - } elseif ($page == $endpage) { // last page - for ($column = 0; $column <= $endcolumn; ++$column) { // for each column - $this->selectColumn($column); - if ($column == $endcolumn) { - // end column - $cborder = $border_end; - $h = $currentY - $this->y; - } else { - // middle column - $cborder = $border_middle; - $h = $this->h - $this->y - $this->bMargin; - } - $ccode .= $this->getCellCode($w, $h, '', $cborder, 1, '', $fill, '', 0, true)."\n"; - } // end for each column - } else { // middle page - for ($column = 0; $column < $this->num_columns; ++$column) { // for each column - $this->selectColumn($column); - $cborder = $border_middle; - $h = $this->h - $this->y - $this->bMargin; - $ccode .= $this->getCellCode($w, $h, '', $cborder, 1, '', $fill, '', 0, true)."\n"; - } // end for each column - } - if ($cborder OR $fill) { - $offsetlen = strlen($ccode); - // draw border and fill - if ($this->inxobj) { - // we are inside an XObject template - if (end($this->xobjects[$this->xobjid]['transfmrk']) !== false) { - $pagemarkkey = key($this->xobjects[$this->xobjid]['transfmrk']); - $pagemark = $this->xobjects[$this->xobjid]['transfmrk'][$pagemarkkey]; - $this->xobjects[$this->xobjid]['transfmrk'][$pagemarkkey] += $offsetlen; - } else { - $pagemark = $this->xobjects[$this->xobjid]['intmrk']; - $this->xobjects[$this->xobjid]['intmrk'] += $offsetlen; - } - $pagebuff = $this->xobjects[$this->xobjid]['outdata']; - $pstart = substr($pagebuff, 0, $pagemark); - $pend = substr($pagebuff, $pagemark); - $this->xobjects[$this->xobjid]['outdata'] = $pstart.$ccode.$pend; - } else { - if (end($this->transfmrk[$this->page]) !== false) { - $pagemarkkey = key($this->transfmrk[$this->page]); - $pagemark = $this->transfmrk[$this->page][$pagemarkkey]; - } elseif ($this->InFooter) { - $pagemark = $this->footerpos[$this->page]; - } else { - $pagemark = $this->intmrk[$this->page]; - } - $pagebuff = $this->getPageBuffer($this->page); - $pstart = substr($pagebuff, 0, $pagemark); - $pend = substr($pagebuff, $pagemark); - $this->setPageBuffer($this->page, $pstart.$ccode.$pend); - $this->bordermrk[$this->page] += $offsetlen; - $this->cntmrk[$this->page] += $offsetlen; - } - } - } // end for each page - // restore page regions - $this->page_regions = $temp_page_regions; - if (isset($old_bgcolor)) { - // restore background color - $this->SetFillColorArray($old_bgcolor); - } - // restore pointer position - $this->x = $prev_x; - $this->y = $prev_y; - $this->lasth = $prev_lasth; - } - - /** - * Set the default bullet to be used as LI bullet symbol - * @param $symbol (string) character or string to be used (legal values are: '' = automatic, '!' = auto bullet, '#' = auto numbering, 'disc', 'disc', 'circle', 'square', '1', 'decimal', 'decimal-leading-zero', 'i', 'lower-roman', 'I', 'upper-roman', 'a', 'lower-alpha', 'lower-latin', 'A', 'upper-alpha', 'upper-latin', 'lower-greek', 'img|type|width|height|image.ext') - * @public - * @since 4.0.028 (2008-09-26) - */ - public function setLIsymbol($symbol='!') { - // check for custom image symbol - if (substr($symbol, 0, 4) == 'img|') { - $this->lisymbol = $symbol; - return; - } - $symbol = strtolower($symbol); - $valid_symbols = array('!', '#', 'disc', 'circle', 'square', '1', 'decimal', 'decimal-leading-zero', 'i', 'lower-roman', 'I', 'upper-roman', 'a', 'lower-alpha', 'lower-latin', 'A', 'upper-alpha', 'upper-latin', 'lower-greek'); - if (in_array($symbol, $valid_symbols)) { - $this->lisymbol = $symbol; - } else { - $this->lisymbol = ''; - } - } - - /** - * Set the booklet mode for double-sided pages. - * @param $booklet (boolean) true set the booklet mode on, false otherwise. - * @param $inner (float) Inner page margin. - * @param $outer (float) Outer page margin. - * @public - * @since 4.2.000 (2008-10-29) - */ - public function SetBooklet($booklet=true, $inner=-1, $outer=-1) { - $this->booklet = $booklet; - if ($inner >= 0) { - $this->lMargin = $inner; - } - if ($outer >= 0) { - $this->rMargin = $outer; - } - } - - /** - * Swap the left and right margins. - * @param $reverse (boolean) if true swap left and right margins. - * @protected - * @since 4.2.000 (2008-10-29) - */ - protected function swapMargins($reverse=true) { - if ($reverse) { - // swap left and right margins - $mtemp = $this->original_lMargin; - $this->original_lMargin = $this->original_rMargin; - $this->original_rMargin = $mtemp; - $deltam = $this->original_lMargin - $this->original_rMargin; - $this->lMargin += $deltam; - $this->rMargin -= $deltam; - } - } - - /** - * Set the vertical spaces for HTML tags. - * The array must have the following structure (example): - * $tagvs = array('h1' => array(0 => array('h' => '', 'n' => 2), 1 => array('h' => 1.3, 'n' => 1))); - * The first array level contains the tag names, - * the second level contains 0 for opening tags or 1 for closing tags, - * the third level contains the vertical space unit (h) and the number spaces to add (n). - * If the h parameter is not specified, default values are used. - * @param $tagvs (array) array of tags and relative vertical spaces. - * @public - * @since 4.2.001 (2008-10-30) - */ - public function setHtmlVSpace($tagvs) { - $this->tagvspaces = $tagvs; - } - - /** - * Set custom width for list indentation. - * @param $width (float) width of the indentation. Use negative value to disable it. - * @public - * @since 4.2.007 (2008-11-12) - */ - public function setListIndentWidth($width) { - return $this->customlistindent = floatval($width); - } - - /** - * Set the top/bottom cell sides to be open or closed when the cell cross the page. - * @param $isopen (boolean) if true keeps the top/bottom border open for the cell sides that cross the page. - * @public - * @since 4.2.010 (2008-11-14) - */ - public function setOpenCell($isopen) { - $this->opencell = $isopen; - } - - /** - * Set the color and font style for HTML links. - * @param $color (array) RGB array of colors - * @param $fontstyle (string) additional font styles to add - * @public - * @since 4.4.003 (2008-12-09) - */ - public function setHtmlLinksStyle($color=array(0,0,255), $fontstyle='U') { - $this->htmlLinkColorArray = $color; - $this->htmlLinkFontStyle = $fontstyle; - } - - /** - * Convert HTML string containing value and unit of measure to user's units or points. - * @param $htmlval (string) String containing values and unit. - * @param $refsize (string) Reference value in points. - * @param $defaultunit (string) Default unit (can be one of the following: %, em, ex, px, in, mm, pc, pt). - * @param $points (boolean) If true returns points, otherwise returns value in user's units. - * @return float value in user's unit or point if $points=true - * @public - * @since 4.4.004 (2008-12-10) - */ - public function getHTMLUnitToUnits($htmlval, $refsize=1, $defaultunit='px', $points=false) { - $supportedunits = array('%', 'em', 'ex', 'px', 'in', 'cm', 'mm', 'pc', 'pt'); - $retval = 0; - $value = 0; - $unit = 'px'; - if ($points) { - $k = 1; - } else { - $k = $this->k; - } - if (in_array($defaultunit, $supportedunits)) { - $unit = $defaultunit; - } - if (is_numeric($htmlval)) { - $value = floatval($htmlval); - } elseif (preg_match('/([0-9\.\-\+]+)/', $htmlval, $mnum)) { - $value = floatval($mnum[1]); - if (preg_match('/([a-z%]+)/', $htmlval, $munit)) { - if (in_array($munit[1], $supportedunits)) { - $unit = $munit[1]; - } - } - } - switch ($unit) { - // percentage - case '%': { - $retval = (($value * $refsize) / 100); - break; - } - // relative-size - case 'em': { - $retval = ($value * $refsize); - break; - } - // height of lower case 'x' (about half the font-size) - case 'ex': { - $retval = ($value * ($refsize / 2)); - break; - } - // absolute-size - case 'in': { - $retval = (($value * $this->dpi) / $k); - break; - } - // centimeters - case 'cm': { - $retval = (($value / 2.54 * $this->dpi) / $k); - break; - } - // millimeters - case 'mm': { - $retval = (($value / 25.4 * $this->dpi) / $k); - break; - } - // one pica is 12 points - case 'pc': { - $retval = (($value * 12) / $k); - break; - } - // points - case 'pt': { - $retval = ($value / $k); - break; - } - // pixels - case 'px': { - $retval = $this->pixelsToUnits($value); - if ($points) { - $retval *= $this->k; - } - break; - } - } - return $retval; - } - - /** - * Output an HTML list bullet or ordered item symbol - * @param $listdepth (int) list nesting level - * @param $listtype (string) type of list - * @param $size (float) current font size - * @protected - * @since 4.4.004 (2008-12-10) - */ - protected function putHtmlListBullet($listdepth, $listtype='', $size=10) { - if ($this->state != 2) { - return; - } - $size /= $this->k; - $fill = ''; - $bgcolor = $this->bgcolor; - $color = $this->fgcolor; - $strokecolor = $this->strokecolor; - $width = 0; - $textitem = ''; - $tmpx = $this->x; - $lspace = $this->GetStringWidth(' '); - if ($listtype == '^') { - // special symbol used for avoid justification of rect bullet - $this->lispacer = ''; - return; - } elseif ($listtype == '!') { - // set default list type for unordered list - $deftypes = array('disc', 'circle', 'square'); - $listtype = $deftypes[($listdepth - 1) % 3]; - } elseif ($listtype == '#') { - // set default list type for ordered list - $listtype = 'decimal'; - } elseif (substr($listtype, 0, 4) == 'img|') { - // custom image type ('img|type|width|height|image.ext') - $img = explode('|', $listtype); - $listtype = 'img'; - } - switch ($listtype) { - // unordered types - case 'none': { - break; - } - case 'disc': { - $r = $size / 6; - $lspace += (2 * $r); - if ($this->rtl) { - $this->x += $lspace; - } else { - $this->x -= $lspace; - } - $this->Circle(($this->x + $r), ($this->y + ($this->lasth / 2)), $r, 0, 360, 'F', array(), $color, 8); - break; - } - case 'circle': { - $r = $size / 6; - $lspace += (2 * $r); - if ($this->rtl) { - $this->x += $lspace; - } else { - $this->x -= $lspace; - } - $prev_line_style = $this->linestyleWidth.' '.$this->linestyleCap.' '.$this->linestyleJoin.' '.$this->linestyleDash.' '.$this->DrawColor; - $new_line_style = array('width' => ($r / 3), 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'phase' => 0, 'color'=>$color); - $this->Circle(($this->x + $r), ($this->y + ($this->lasth / 2)), ($r * (1 - (1/6))), 0, 360, 'D', $new_line_style, array(), 8); - $this->_out($prev_line_style); // restore line settings - break; - } - case 'square': { - $l = $size / 3; - $lspace += $l; - if ($this->rtl) {; - $this->x += $lspace; - } else { - $this->x -= $lspace; - } - $this->Rect($this->x, ($this->y + (($this->lasth - $l) / 2)), $l, $l, 'F', array(), $color); - break; - } - case 'img': { - // 1=>type, 2=>width, 3=>height, 4=>image.ext - $lspace += $img[2]; - if ($this->rtl) {; - $this->x += $lspace; - } else { - $this->x -= $lspace; - } - $imgtype = strtolower($img[1]); - $prev_y = $this->y; - switch ($imgtype) { - case 'svg': { - $this->ImageSVG($img[4], $this->x, ($this->y + (($this->lasth - $img[3]) / 2)), $img[2], $img[3], '', 'T', '', 0, false); - break; - } - case 'ai': - case 'eps': { - $this->ImageEps($img[4], $this->x, ($this->y + (($this->lasth - $img[3]) / 2)), $img[2], $img[3], '', true, 'T', '', 0, false); - break; - } - default: { - $this->Image($img[4], $this->x, ($this->y + (($this->lasth - $img[3]) / 2)), $img[2], $img[3], $img[1], '', 'T', false, 300, '', false, false, 0, false, false, false); - break; - } - } - $this->y = $prev_y; - break; - } - // ordered types - // $this->listcount[$this->listnum]; - // $textitem - case '1': - case 'decimal': { - $textitem = $this->listcount[$this->listnum]; - break; - } - case 'decimal-leading-zero': { - $textitem = sprintf('%02d', $this->listcount[$this->listnum]); - break; - } - case 'i': - case 'lower-roman': { - $textitem = strtolower(TCPDF_STATIC::intToRoman($this->listcount[$this->listnum])); - break; - } - case 'I': - case 'upper-roman': { - $textitem = TCPDF_STATIC::intToRoman($this->listcount[$this->listnum]); - break; - } - case 'a': - case 'lower-alpha': - case 'lower-latin': { - $textitem = chr(97 + $this->listcount[$this->listnum] - 1); - break; - } - case 'A': - case 'upper-alpha': - case 'upper-latin': { - $textitem = chr(65 + $this->listcount[$this->listnum] - 1); - break; - } - case 'lower-greek': { - $textitem = TCPDF_FONTS::unichr((945 + $this->listcount[$this->listnum] - 1), $this->isunicode); - break; - } - /* - // Types to be implemented (special handling) - case 'hebrew': { - break; - } - case 'armenian': { - break; - } - case 'georgian': { - break; - } - case 'cjk-ideographic': { - break; - } - case 'hiragana': { - break; - } - case 'katakana': { - break; - } - case 'hiragana-iroha': { - break; - } - case 'katakana-iroha': { - break; - } - */ - default: { - $textitem = $this->listcount[$this->listnum]; - } - } - if (!TCPDF_STATIC::empty_string($textitem)) { - // Check whether we need a new page or new column - $prev_y = $this->y; - $h = $this->getCellHeight($this->FontSize); - if ($this->checkPageBreak($h) OR ($this->y < $prev_y)) { - $tmpx = $this->x; - } - // print ordered item - if ($this->rtl) { - $textitem = '.'.$textitem; - } else { - $textitem = $textitem.'.'; - } - $lspace += $this->GetStringWidth($textitem); - if ($this->rtl) { - $this->x += $lspace; - } else { - $this->x -= $lspace; - } - $this->Write($this->lasth, $textitem, '', false, '', false, 0, false); - } - $this->x = $tmpx; - $this->lispacer = '^'; - // restore colors - $this->SetFillColorArray($bgcolor); - $this->SetDrawColorArray($strokecolor); - $this->SettextColorArray($color); - } - - /** - * Returns current graphic variables as array. - * @return array of graphic variables - * @protected - * @since 4.2.010 (2008-11-14) - */ - protected function getGraphicVars() { - $grapvars = array( - 'FontFamily' => $this->FontFamily, - 'FontStyle' => $this->FontStyle, - 'FontSizePt' => $this->FontSizePt, - 'rMargin' => $this->rMargin, - 'lMargin' => $this->lMargin, - 'cell_padding' => $this->cell_padding, - 'cell_margin' => $this->cell_margin, - 'LineWidth' => $this->LineWidth, - 'linestyleWidth' => $this->linestyleWidth, - 'linestyleCap' => $this->linestyleCap, - 'linestyleJoin' => $this->linestyleJoin, - 'linestyleDash' => $this->linestyleDash, - 'textrendermode' => $this->textrendermode, - 'textstrokewidth' => $this->textstrokewidth, - 'DrawColor' => $this->DrawColor, - 'FillColor' => $this->FillColor, - 'TextColor' => $this->TextColor, - 'ColorFlag' => $this->ColorFlag, - 'bgcolor' => $this->bgcolor, - 'fgcolor' => $this->fgcolor, - 'htmlvspace' => $this->htmlvspace, - 'listindent' => $this->listindent, - 'listindentlevel' => $this->listindentlevel, - 'listnum' => $this->listnum, - 'listordered' => $this->listordered, - 'listcount' => $this->listcount, - 'lispacer' => $this->lispacer, - 'cell_height_ratio' => $this->cell_height_ratio, - 'font_stretching' => $this->font_stretching, - 'font_spacing' => $this->font_spacing, - 'alpha' => $this->alpha, - // extended - 'lasth' => $this->lasth, - 'tMargin' => $this->tMargin, - 'bMargin' => $this->bMargin, - 'AutoPageBreak' => $this->AutoPageBreak, - 'PageBreakTrigger' => $this->PageBreakTrigger, - 'x' => $this->x, - 'y' => $this->y, - 'w' => $this->w, - 'h' => $this->h, - 'wPt' => $this->wPt, - 'hPt' => $this->hPt, - 'fwPt' => $this->fwPt, - 'fhPt' => $this->fhPt, - 'page' => $this->page, - 'current_column' => $this->current_column, - 'num_columns' => $this->num_columns - ); - return $grapvars; - } - - /** - * Set graphic variables. - * @param $gvars (array) array of graphic variablesto restore - * @param $extended (boolean) if true restore extended graphic variables - * @protected - * @since 4.2.010 (2008-11-14) - */ - protected function setGraphicVars($gvars, $extended=false) { - if ($this->state != 2) { - return; - } - $this->FontFamily = $gvars['FontFamily']; - $this->FontStyle = $gvars['FontStyle']; - $this->FontSizePt = $gvars['FontSizePt']; - $this->rMargin = $gvars['rMargin']; - $this->lMargin = $gvars['lMargin']; - $this->cell_padding = $gvars['cell_padding']; - $this->cell_margin = $gvars['cell_margin']; - $this->LineWidth = $gvars['LineWidth']; - $this->linestyleWidth = $gvars['linestyleWidth']; - $this->linestyleCap = $gvars['linestyleCap']; - $this->linestyleJoin = $gvars['linestyleJoin']; - $this->linestyleDash = $gvars['linestyleDash']; - $this->textrendermode = $gvars['textrendermode']; - $this->textstrokewidth = $gvars['textstrokewidth']; - $this->DrawColor = $gvars['DrawColor']; - $this->FillColor = $gvars['FillColor']; - $this->TextColor = $gvars['TextColor']; - $this->ColorFlag = $gvars['ColorFlag']; - $this->bgcolor = $gvars['bgcolor']; - $this->fgcolor = $gvars['fgcolor']; - $this->htmlvspace = $gvars['htmlvspace']; - $this->listindent = $gvars['listindent']; - $this->listindentlevel = $gvars['listindentlevel']; - $this->listnum = $gvars['listnum']; - $this->listordered = $gvars['listordered']; - $this->listcount = $gvars['listcount']; - $this->lispacer = $gvars['lispacer']; - $this->cell_height_ratio = $gvars['cell_height_ratio']; - $this->font_stretching = $gvars['font_stretching']; - $this->font_spacing = $gvars['font_spacing']; - $this->alpha = $gvars['alpha']; - if ($extended) { - // restore extended values - $this->lasth = $gvars['lasth']; - $this->tMargin = $gvars['tMargin']; - $this->bMargin = $gvars['bMargin']; - $this->AutoPageBreak = $gvars['AutoPageBreak']; - $this->PageBreakTrigger = $gvars['PageBreakTrigger']; - $this->x = $gvars['x']; - $this->y = $gvars['y']; - $this->w = $gvars['w']; - $this->h = $gvars['h']; - $this->wPt = $gvars['wPt']; - $this->hPt = $gvars['hPt']; - $this->fwPt = $gvars['fwPt']; - $this->fhPt = $gvars['fhPt']; - $this->page = $gvars['page']; - $this->current_column = $gvars['current_column']; - $this->num_columns = $gvars['num_columns']; - } - $this->_out(''.$this->linestyleWidth.' '.$this->linestyleCap.' '.$this->linestyleJoin.' '.$this->linestyleDash.' '.$this->DrawColor.' '.$this->FillColor.''); - if (!TCPDF_STATIC::empty_string($this->FontFamily)) { - $this->SetFont($this->FontFamily, $this->FontStyle, $this->FontSizePt); - } - } - - /** - * Outputs the "save graphics state" operator 'q' - * @protected - */ - protected function _outSaveGraphicsState() { - $this->_out('q'); - } - - /** - * Outputs the "restore graphics state" operator 'Q' - * @protected - */ - protected function _outRestoreGraphicsState() { - $this->_out('Q'); - } - - /** - * Set buffer content (always append data). - * @param $data (string) data - * @protected - * @since 4.5.000 (2009-01-02) - */ - protected function setBuffer($data) { - $this->bufferlen += strlen($data); - $this->buffer .= $data; - } - - /** - * Replace the buffer content - * @param $data (string) data - * @protected - * @since 5.5.000 (2010-06-22) - */ - protected function replaceBuffer($data) { - $this->bufferlen = strlen($data); - $this->buffer = $data; - } - - /** - * Get buffer content. - * @return string buffer content - * @protected - * @since 4.5.000 (2009-01-02) - */ - protected function getBuffer() { - return $this->buffer; - } - - /** - * Set page buffer content. - * @param $page (int) page number - * @param $data (string) page data - * @param $append (boolean) if true append data, false replace. - * @protected - * @since 4.5.000 (2008-12-31) - */ - protected function setPageBuffer($page, $data, $append=false) { - if ($append) { - $this->pages[$page] .= $data; - } else { - $this->pages[$page] = $data; - } - if ($append AND isset($this->pagelen[$page])) { - $this->pagelen[$page] += strlen($data); - } else { - $this->pagelen[$page] = strlen($data); - } - } - - /** - * Get page buffer content. - * @param $page (int) page number - * @return string page buffer content or false in case of error - * @protected - * @since 4.5.000 (2008-12-31) - */ - protected function getPageBuffer($page) { - if (isset($this->pages[$page])) { - return $this->pages[$page]; - } - return false; - } - - /** - * Set image buffer content. - * @param $image (string) image key - * @param $data (array) image data - * @return int image index number - * @protected - * @since 4.5.000 (2008-12-31) - */ - protected function setImageBuffer($image, $data) { - if (($data['i'] = array_search($image, $this->imagekeys)) === FALSE) { - $this->imagekeys[$this->numimages] = $image; - $data['i'] = $this->numimages; - ++$this->numimages; - } - $this->images[$image] = $data; - return $data['i']; - } - - /** - * Set image buffer content for a specified sub-key. - * @param $image (string) image key - * @param $key (string) image sub-key - * @param $data (array) image data - * @protected - * @since 4.5.000 (2008-12-31) - */ - protected function setImageSubBuffer($image, $key, $data) { - if (!isset($this->images[$image])) { - $this->setImageBuffer($image, array()); - } - $this->images[$image][$key] = $data; - } - - /** - * Get image buffer content. - * @param $image (string) image key - * @return string image buffer content or false in case of error - * @protected - * @since 4.5.000 (2008-12-31) - */ - protected function getImageBuffer($image) { - if (isset($this->images[$image])) { - return $this->images[$image]; - } - return false; - } - - /** - * Set font buffer content. - * @param $font (string) font key - * @param $data (array) font data - * @protected - * @since 4.5.000 (2009-01-02) - */ - protected function setFontBuffer($font, $data) { - $this->fonts[$font] = $data; - if (!in_array($font, $this->fontkeys)) { - $this->fontkeys[] = $font; - // store object ID for current font - ++$this->n; - $this->font_obj_ids[$font] = $this->n; - $this->setFontSubBuffer($font, 'n', $this->n); - } - } - - /** - * Set font buffer content. - * @param $font (string) font key - * @param $key (string) font sub-key - * @param $data (array) font data - * @protected - * @since 4.5.000 (2009-01-02) - */ - protected function setFontSubBuffer($font, $key, $data) { - if (!isset($this->fonts[$font])) { - $this->setFontBuffer($font, array()); - } - $this->fonts[$font][$key] = $data; - } - - /** - * Get font buffer content. - * @param $font (string) font key - * @return string font buffer content or false in case of error - * @protected - * @since 4.5.000 (2009-01-02) - */ - protected function getFontBuffer($font) { - if (isset($this->fonts[$font])) { - return $this->fonts[$font]; - } - return false; - } - - /** - * Move a page to a previous position. - * @param $frompage (int) number of the source page - * @param $topage (int) number of the destination page (must be less than $frompage) - * @return true in case of success, false in case of error. - * @public - * @since 4.5.000 (2009-01-02) - */ - public function movePage($frompage, $topage) { - if (($frompage > $this->numpages) OR ($frompage <= $topage)) { - return false; - } - if ($frompage == $this->page) { - // close the page before moving it - $this->endPage(); - } - // move all page-related states - $tmppage = $this->getPageBuffer($frompage); - $tmppagedim = $this->pagedim[$frompage]; - $tmppagelen = $this->pagelen[$frompage]; - $tmpintmrk = $this->intmrk[$frompage]; - $tmpbordermrk = $this->bordermrk[$frompage]; - $tmpcntmrk = $this->cntmrk[$frompage]; - $tmppageobjects = $this->pageobjects[$frompage]; - if (isset($this->footerpos[$frompage])) { - $tmpfooterpos = $this->footerpos[$frompage]; - } - if (isset($this->footerlen[$frompage])) { - $tmpfooterlen = $this->footerlen[$frompage]; - } - if (isset($this->transfmrk[$frompage])) { - $tmptransfmrk = $this->transfmrk[$frompage]; - } - if (isset($this->PageAnnots[$frompage])) { - $tmpannots = $this->PageAnnots[$frompage]; - } - if (isset($this->newpagegroup) AND !empty($this->newpagegroup)) { - for ($i = $frompage; $i > $topage; --$i) { - if (isset($this->newpagegroup[$i]) AND (($i + $this->pagegroups[$this->newpagegroup[$i]]) > $frompage)) { - --$this->pagegroups[$this->newpagegroup[$i]]; - break; - } - } - for ($i = $topage; $i > 0; --$i) { - if (isset($this->newpagegroup[$i]) AND (($i + $this->pagegroups[$this->newpagegroup[$i]]) > $topage)) { - ++$this->pagegroups[$this->newpagegroup[$i]]; - break; - } - } - } - for ($i = $frompage; $i > $topage; --$i) { - $j = $i - 1; - // shift pages down - $this->setPageBuffer($i, $this->getPageBuffer($j)); - $this->pagedim[$i] = $this->pagedim[$j]; - $this->pagelen[$i] = $this->pagelen[$j]; - $this->intmrk[$i] = $this->intmrk[$j]; - $this->bordermrk[$i] = $this->bordermrk[$j]; - $this->cntmrk[$i] = $this->cntmrk[$j]; - $this->pageobjects[$i] = $this->pageobjects[$j]; - if (isset($this->footerpos[$j])) { - $this->footerpos[$i] = $this->footerpos[$j]; - } elseif (isset($this->footerpos[$i])) { - unset($this->footerpos[$i]); - } - if (isset($this->footerlen[$j])) { - $this->footerlen[$i] = $this->footerlen[$j]; - } elseif (isset($this->footerlen[$i])) { - unset($this->footerlen[$i]); - } - if (isset($this->transfmrk[$j])) { - $this->transfmrk[$i] = $this->transfmrk[$j]; - } elseif (isset($this->transfmrk[$i])) { - unset($this->transfmrk[$i]); - } - if (isset($this->PageAnnots[$j])) { - $this->PageAnnots[$i] = $this->PageAnnots[$j]; - } elseif (isset($this->PageAnnots[$i])) { - unset($this->PageAnnots[$i]); - } - if (isset($this->newpagegroup[$j])) { - $this->newpagegroup[$i] = $this->newpagegroup[$j]; - unset($this->newpagegroup[$j]); - } - if ($this->currpagegroup == $j) { - $this->currpagegroup = $i; - } - } - $this->setPageBuffer($topage, $tmppage); - $this->pagedim[$topage] = $tmppagedim; - $this->pagelen[$topage] = $tmppagelen; - $this->intmrk[$topage] = $tmpintmrk; - $this->bordermrk[$topage] = $tmpbordermrk; - $this->cntmrk[$topage] = $tmpcntmrk; - $this->pageobjects[$topage] = $tmppageobjects; - if (isset($tmpfooterpos)) { - $this->footerpos[$topage] = $tmpfooterpos; - } elseif (isset($this->footerpos[$topage])) { - unset($this->footerpos[$topage]); - } - if (isset($tmpfooterlen)) { - $this->footerlen[$topage] = $tmpfooterlen; - } elseif (isset($this->footerlen[$topage])) { - unset($this->footerlen[$topage]); - } - if (isset($tmptransfmrk)) { - $this->transfmrk[$topage] = $tmptransfmrk; - } elseif (isset($this->transfmrk[$topage])) { - unset($this->transfmrk[$topage]); - } - if (isset($tmpannots)) { - $this->PageAnnots[$topage] = $tmpannots; - } elseif (isset($this->PageAnnots[$topage])) { - unset($this->PageAnnots[$topage]); - } - // adjust outlines - $tmpoutlines = $this->outlines; - foreach ($tmpoutlines as $key => $outline) { - if (!$outline['f']) { - if (($outline['p'] >= $topage) AND ($outline['p'] < $frompage)) { - $this->outlines[$key]['p'] = ($outline['p'] + 1); - } elseif ($outline['p'] == $frompage) { - $this->outlines[$key]['p'] = $topage; - } - } - } - // adjust dests - $tmpdests = $this->dests; - foreach ($tmpdests as $key => $dest) { - if (!$dest['f']) { - if (($dest['p'] >= $topage) AND ($dest['p'] < $frompage)) { - $this->dests[$key]['p'] = ($dest['p'] + 1); - } elseif ($dest['p'] == $frompage) { - $this->dests[$key]['p'] = $topage; - } - } - } - // adjust links - $tmplinks = $this->links; - foreach ($tmplinks as $key => $link) { - if (!$link['f']) { - if (($link['p'] >= $topage) AND ($link['p'] < $frompage)) { - $this->links[$key]['p'] = ($link['p'] + 1); - } elseif ($link['p'] == $frompage) { - $this->links[$key]['p'] = $topage; - } - } - } - // adjust javascript - $jfrompage = $frompage; - $jtopage = $topage; - if (preg_match_all('/this\.addField\(\'([^\']*)\',\'([^\']*)\',([0-9]+)/', $this->javascript, $pamatch) > 0) { - foreach($pamatch[0] as $pk => $pmatch) { - $pagenum = intval($pamatch[3][$pk]) + 1; - if (($pagenum >= $jtopage) AND ($pagenum < $jfrompage)) { - $newpage = ($pagenum + 1); - } elseif ($pagenum == $jfrompage) { - $newpage = $jtopage; - } else { - $newpage = $pagenum; - } - --$newpage; - $newjs = "this.addField(\'".$pamatch[1][$pk]."\',\'".$pamatch[2][$pk]."\',".$newpage; - $this->javascript = str_replace($pmatch, $newjs, $this->javascript); - } - unset($pamatch); - } - // return to last page - $this->lastPage(true); - return true; - } - - /** - * Remove the specified page. - * @param $page (int) page to remove - * @return true in case of success, false in case of error. - * @public - * @since 4.6.004 (2009-04-23) - */ - public function deletePage($page) { - if (($page < 1) OR ($page > $this->numpages)) { - return false; - } - // delete current page - unset($this->pages[$page]); - unset($this->pagedim[$page]); - unset($this->pagelen[$page]); - unset($this->intmrk[$page]); - unset($this->bordermrk[$page]); - unset($this->cntmrk[$page]); - foreach ($this->pageobjects[$page] as $oid) { - if (isset($this->offsets[$oid])){ - unset($this->offsets[$oid]); - } - } - unset($this->pageobjects[$page]); - if (isset($this->footerpos[$page])) { - unset($this->footerpos[$page]); - } - if (isset($this->footerlen[$page])) { - unset($this->footerlen[$page]); - } - if (isset($this->transfmrk[$page])) { - unset($this->transfmrk[$page]); - } - if (isset($this->PageAnnots[$page])) { - unset($this->PageAnnots[$page]); - } - if (isset($this->newpagegroup) AND !empty($this->newpagegroup)) { - for ($i = $page; $i > 0; --$i) { - if (isset($this->newpagegroup[$i]) AND (($i + $this->pagegroups[$this->newpagegroup[$i]]) > $page)) { - --$this->pagegroups[$this->newpagegroup[$i]]; - break; - } - } - } - if (isset($this->pageopen[$page])) { - unset($this->pageopen[$page]); - } - if ($page < $this->numpages) { - // update remaining pages - for ($i = $page; $i < $this->numpages; ++$i) { - $j = $i + 1; - // shift pages - $this->setPageBuffer($i, $this->getPageBuffer($j)); - $this->pagedim[$i] = $this->pagedim[$j]; - $this->pagelen[$i] = $this->pagelen[$j]; - $this->intmrk[$i] = $this->intmrk[$j]; - $this->bordermrk[$i] = $this->bordermrk[$j]; - $this->cntmrk[$i] = $this->cntmrk[$j]; - $this->pageobjects[$i] = $this->pageobjects[$j]; - if (isset($this->footerpos[$j])) { - $this->footerpos[$i] = $this->footerpos[$j]; - } elseif (isset($this->footerpos[$i])) { - unset($this->footerpos[$i]); - } - if (isset($this->footerlen[$j])) { - $this->footerlen[$i] = $this->footerlen[$j]; - } elseif (isset($this->footerlen[$i])) { - unset($this->footerlen[$i]); - } - if (isset($this->transfmrk[$j])) { - $this->transfmrk[$i] = $this->transfmrk[$j]; - } elseif (isset($this->transfmrk[$i])) { - unset($this->transfmrk[$i]); - } - if (isset($this->PageAnnots[$j])) { - $this->PageAnnots[$i] = $this->PageAnnots[$j]; - } elseif (isset($this->PageAnnots[$i])) { - unset($this->PageAnnots[$i]); - } - if (isset($this->newpagegroup[$j])) { - $this->newpagegroup[$i] = $this->newpagegroup[$j]; - unset($this->newpagegroup[$j]); - } - if ($this->currpagegroup == $j) { - $this->currpagegroup = $i; - } - if (isset($this->pageopen[$j])) { - $this->pageopen[$i] = $this->pageopen[$j]; - } elseif (isset($this->pageopen[$i])) { - unset($this->pageopen[$i]); - } - } - // remove last page - unset($this->pages[$this->numpages]); - unset($this->pagedim[$this->numpages]); - unset($this->pagelen[$this->numpages]); - unset($this->intmrk[$this->numpages]); - unset($this->bordermrk[$this->numpages]); - unset($this->cntmrk[$this->numpages]); - foreach ($this->pageobjects[$this->numpages] as $oid) { - if (isset($this->offsets[$oid])){ - unset($this->offsets[$oid]); - } - } - unset($this->pageobjects[$this->numpages]); - if (isset($this->footerpos[$this->numpages])) { - unset($this->footerpos[$this->numpages]); - } - if (isset($this->footerlen[$this->numpages])) { - unset($this->footerlen[$this->numpages]); - } - if (isset($this->transfmrk[$this->numpages])) { - unset($this->transfmrk[$this->numpages]); - } - if (isset($this->PageAnnots[$this->numpages])) { - unset($this->PageAnnots[$this->numpages]); - } - if (isset($this->newpagegroup[$this->numpages])) { - unset($this->newpagegroup[$this->numpages]); - } - if ($this->currpagegroup == $this->numpages) { - $this->currpagegroup = ($this->numpages - 1); - } - if (isset($this->pagegroups[$this->numpages])) { - unset($this->pagegroups[$this->numpages]); - } - if (isset($this->pageopen[$this->numpages])) { - unset($this->pageopen[$this->numpages]); - } - } - --$this->numpages; - $this->page = $this->numpages; - // adjust outlines - $tmpoutlines = $this->outlines; - foreach ($tmpoutlines as $key => $outline) { - if (!$outline['f']) { - if ($outline['p'] > $page) { - $this->outlines[$key]['p'] = $outline['p'] - 1; - } elseif ($outline['p'] == $page) { - unset($this->outlines[$key]); - } - } - } - // adjust dests - $tmpdests = $this->dests; - foreach ($tmpdests as $key => $dest) { - if (!$dest['f']) { - if ($dest['p'] > $page) { - $this->dests[$key]['p'] = $dest['p'] - 1; - } elseif ($dest['p'] == $page) { - unset($this->dests[$key]); - } - } - } - // adjust links - $tmplinks = $this->links; - foreach ($tmplinks as $key => $link) { - if (!$link['f']) { - if ($link['p'] > $page) { - $this->links[$key]['p'] = $link['p'] - 1; - } elseif ($link['p'] == $page) { - unset($this->links[$key]); - } - } - } - // adjust javascript - $jpage = $page; - if (preg_match_all('/this\.addField\(\'([^\']*)\',\'([^\']*)\',([0-9]+)/', $this->javascript, $pamatch) > 0) { - foreach($pamatch[0] as $pk => $pmatch) { - $pagenum = intval($pamatch[3][$pk]) + 1; - if ($pagenum >= $jpage) { - $newpage = ($pagenum - 1); - } elseif ($pagenum == $jpage) { - $newpage = 1; - } else { - $newpage = $pagenum; - } - --$newpage; - $newjs = "this.addField(\'".$pamatch[1][$pk]."\',\'".$pamatch[2][$pk]."\',".$newpage; - $this->javascript = str_replace($pmatch, $newjs, $this->javascript); - } - unset($pamatch); - } - // return to last page - if ($this->numpages > 0) { - $this->lastPage(true); - } - return true; - } - - /** - * Clone the specified page to a new page. - * @param $page (int) number of page to copy (0 = current page) - * @return true in case of success, false in case of error. - * @public - * @since 4.9.015 (2010-04-20) - */ - public function copyPage($page=0) { - if ($page == 0) { - // default value - $page = $this->page; - } - if (($page < 1) OR ($page > $this->numpages)) { - return false; - } - // close the last page - $this->endPage(); - // copy all page-related states - ++$this->numpages; - $this->page = $this->numpages; - $this->setPageBuffer($this->page, $this->getPageBuffer($page)); - $this->pagedim[$this->page] = $this->pagedim[$page]; - $this->pagelen[$this->page] = $this->pagelen[$page]; - $this->intmrk[$this->page] = $this->intmrk[$page]; - $this->bordermrk[$this->page] = $this->bordermrk[$page]; - $this->cntmrk[$this->page] = $this->cntmrk[$page]; - $this->pageobjects[$this->page] = $this->pageobjects[$page]; - $this->pageopen[$this->page] = false; - if (isset($this->footerpos[$page])) { - $this->footerpos[$this->page] = $this->footerpos[$page]; - } - if (isset($this->footerlen[$page])) { - $this->footerlen[$this->page] = $this->footerlen[$page]; - } - if (isset($this->transfmrk[$page])) { - $this->transfmrk[$this->page] = $this->transfmrk[$page]; - } - if (isset($this->PageAnnots[$page])) { - $this->PageAnnots[$this->page] = $this->PageAnnots[$page]; - } - if (isset($this->newpagegroup[$page])) { - // start a new group - $this->newpagegroup[$this->page] = sizeof($this->newpagegroup) + 1; - $this->currpagegroup = $this->newpagegroup[$this->page]; - $this->pagegroups[$this->currpagegroup] = 1; - } elseif (isset($this->currpagegroup) AND ($this->currpagegroup > 0)) { - ++$this->pagegroups[$this->currpagegroup]; - } - // copy outlines - $tmpoutlines = $this->outlines; - foreach ($tmpoutlines as $key => $outline) { - if ($outline['p'] == $page) { - $this->outlines[] = array('t' => $outline['t'], 'l' => $outline['l'], 'x' => $outline['x'], 'y' => $outline['y'], 'p' => $this->page, 'f' => $outline['f'], 's' => $outline['s'], 'c' => $outline['c']); - } - } - // copy links - $tmplinks = $this->links; - foreach ($tmplinks as $key => $link) { - if ($link['p'] == $page) { - $this->links[] = array('p' => $this->page, 'y' => $link['y'], 'f' => $link['f']); - } - } - // return to last page - $this->lastPage(true); - return true; - } - - /** - * Output a Table of Content Index (TOC). - * This method must be called after all Bookmarks were set. - * Before calling this method you have to open the page using the addTOCPage() method. - * After calling this method you have to call endTOCPage() to close the TOC page. - * You can override this method to achieve different styles. - * @param $page (int) page number where this TOC should be inserted (leave empty for current page). - * @param $numbersfont (string) set the font for page numbers (please use monospaced font for better alignment). - * @param $filler (string) string used to fill the space between text and page number. - * @param $toc_name (string) name to use for TOC bookmark. - * @param $style (string) Font style for title: B = Bold, I = Italic, BI = Bold + Italic. - * @param $color (array) RGB color array for bookmark title (values from 0 to 255). - * @public - * @author Nicola Asuni - * @since 4.5.000 (2009-01-02) - * @see addTOCPage(), endTOCPage(), addHTMLTOC() - */ - public function addTOC($page='', $numbersfont='', $filler='.', $toc_name='TOC', $style='', $color=array(0,0,0)) { - $fontsize = $this->FontSizePt; - $fontfamily = $this->FontFamily; - $fontstyle = $this->FontStyle; - $w = $this->w - $this->lMargin - $this->rMargin; - $spacer = $this->GetStringWidth(chr(32)) * 4; - $lmargin = $this->lMargin; - $rmargin = $this->rMargin; - $x_start = $this->GetX(); - $page_first = $this->page; - $current_page = $this->page; - $page_fill_start = false; - $page_fill_end = false; - $current_column = $this->current_column; - if (TCPDF_STATIC::empty_string($numbersfont)) { - $numbersfont = $this->default_monospaced_font; - } - if (TCPDF_STATIC::empty_string($filler)) { - $filler = ' '; - } - if (TCPDF_STATIC::empty_string($page)) { - $gap = ' '; - } else { - $gap = ''; - if ($page < 1) { - $page = 1; - } - } - $this->SetFont($numbersfont, $fontstyle, $fontsize); - $numwidth = $this->GetStringWidth('00000'); - $maxpage = 0; //used for pages on attached documents - foreach ($this->outlines as $key => $outline) { - // check for extra pages (used for attachments) - if (($this->page > $page_first) AND ($outline['p'] >= $this->numpages)) { - $outline['p'] += ($this->page - $page_first); - } - if ($this->rtl) { - $aligntext = 'R'; - $alignnum = 'L'; - } else { - $aligntext = 'L'; - $alignnum = 'R'; - } - if ($outline['l'] == 0) { - $this->SetFont($fontfamily, $outline['s'].'B', $fontsize); - } else { - $this->SetFont($fontfamily, $outline['s'], $fontsize - $outline['l']); - } - $this->SetTextColorArray($outline['c']); - // check for page break - $this->checkPageBreak(2 * $this->getCellHeight($this->FontSize)); - // set margins and X position - if (($this->page == $current_page) AND ($this->current_column == $current_column)) { - $this->lMargin = $lmargin; - $this->rMargin = $rmargin; - } else { - if ($this->current_column != $current_column) { - if ($this->rtl) { - $x_start = $this->w - $this->columns[$this->current_column]['x']; - } else { - $x_start = $this->columns[$this->current_column]['x']; - } - } - $lmargin = $this->lMargin; - $rmargin = $this->rMargin; - $current_page = $this->page; - $current_column = $this->current_column; - } - $this->SetX($x_start); - $indent = ($spacer * $outline['l']); - if ($this->rtl) { - $this->x -= $indent; - $this->rMargin = $this->w - $this->x; - } else { - $this->x += $indent; - $this->lMargin = $this->x; - } - $link = $this->AddLink(); - $this->SetLink($link, $outline['y'], $outline['p']); - // write the text - if ($this->rtl) { - $txt = ' '.$outline['t']; - } else { - $txt = $outline['t'].' '; - } - $this->Write(0, $txt, $link, false, $aligntext, false, 0, false, false, 0, $numwidth, ''); - if ($this->rtl) { - $tw = $this->x - $this->lMargin; - } else { - $tw = $this->w - $this->rMargin - $this->x; - } - $this->SetFont($numbersfont, $fontstyle, $fontsize); - if (TCPDF_STATIC::empty_string($page)) { - $pagenum = $outline['p']; - } else { - // placemark to be replaced with the correct number - $pagenum = '{#'.($outline['p']).'}'; - if ($this->isUnicodeFont()) { - $pagenum = '{'.$pagenum.'}'; - } - $maxpage = max($maxpage, $outline['p']); - } - $fw = ($tw - $this->GetStringWidth($pagenum.$filler)); - $wfiller = $this->GetStringWidth($filler); - if ($wfiller > 0) { - $numfills = floor($fw / $wfiller); - } else { - $numfills = 0; - } - if ($numfills > 0) { - $rowfill = str_repeat($filler, $numfills); - } else { - $rowfill = ''; - } - if ($this->rtl) { - $pagenum = $pagenum.$gap.$rowfill; - } else { - $pagenum = $rowfill.$gap.$pagenum; - } - // write the number - $this->Cell($tw, 0, $pagenum, 0, 1, $alignnum, 0, $link, 0); - } - $page_last = $this->getPage(); - $numpages = ($page_last - $page_first + 1); - // account for booklet mode - if ($this->booklet) { - // check if a blank page is required before TOC - $page_fill_start = ((($page_first % 2) == 0) XOR (($page % 2) == 0)); - $page_fill_end = (!((($numpages % 2) == 0) XOR ($page_fill_start))); - if ($page_fill_start) { - // add a page at the end (to be moved before TOC) - $this->addPage(); - ++$page_last; - ++$numpages; - } - if ($page_fill_end) { - // add a page at the end - $this->addPage(); - ++$page_last; - ++$numpages; - } - } - $maxpage = max($maxpage, $page_last); - if (!TCPDF_STATIC::empty_string($page)) { - for ($p = $page_first; $p <= $page_last; ++$p) { - // get page data - $temppage = $this->getPageBuffer($p); - for ($n = 1; $n <= $maxpage; ++$n) { - // update page numbers - $a = '{#'.$n.'}'; - // get page number aliases - $pnalias = $this->getInternalPageNumberAliases($a); - // calculate replacement number - if (($n >= $page) AND ($n <= $this->numpages)) { - $np = $n + $numpages; - } else { - $np = $n; - } - $na = TCPDF_STATIC::formatTOCPageNumber(($this->starting_page_number + $np - 1)); - $nu = TCPDF_FONTS::UTF8ToUTF16BE($na, false, $this->isunicode, $this->CurrentFont); - // replace aliases with numbers - foreach ($pnalias['u'] as $u) { - $sfill = str_repeat($filler, max(0, (strlen($u) - strlen($nu.' ')))); - if ($this->rtl) { - $nr = $nu.TCPDF_FONTS::UTF8ToUTF16BE(' '.$sfill, false, $this->isunicode, $this->CurrentFont); - } else { - $nr = TCPDF_FONTS::UTF8ToUTF16BE($sfill.' ', false, $this->isunicode, $this->CurrentFont).$nu; - } - $temppage = str_replace($u, $nr, $temppage); - } - foreach ($pnalias['a'] as $a) { - $sfill = str_repeat($filler, max(0, (strlen($a) - strlen($na.' ')))); - if ($this->rtl) { - $nr = $na.' '.$sfill; - } else { - $nr = $sfill.' '.$na; - } - $temppage = str_replace($a, $nr, $temppage); - } - } - // save changes - $this->setPageBuffer($p, $temppage); - } - // move pages - $this->Bookmark($toc_name, 0, 0, $page_first, $style, $color); - if ($page_fill_start) { - $this->movePage($page_last, $page_first); - } - for ($i = 0; $i < $numpages; ++$i) { - $this->movePage($page_last, $page); - } - } - } - - /** - * Output a Table Of Content Index (TOC) using HTML templates. - * This method must be called after all Bookmarks were set. - * Before calling this method you have to open the page using the addTOCPage() method. - * After calling this method you have to call endTOCPage() to close the TOC page. - * @param $page (int) page number where this TOC should be inserted (leave empty for current page). - * @param $toc_name (string) name to use for TOC bookmark. - * @param $templates (array) array of html templates. Use: "#TOC_DESCRIPTION#" for bookmark title, "#TOC_PAGE_NUMBER#" for page number. - * @param $correct_align (boolean) if true correct the number alignment (numbers must be in monospaced font like courier and right aligned on LTR, or left aligned on RTL) - * @param $style (string) Font style for title: B = Bold, I = Italic, BI = Bold + Italic. - * @param $color (array) RGB color array for title (values from 0 to 255). - * @public - * @author Nicola Asuni - * @since 5.0.001 (2010-05-06) - * @see addTOCPage(), endTOCPage(), addTOC() - */ - public function addHTMLTOC($page='', $toc_name='TOC', $templates=array(), $correct_align=true, $style='', $color=array(0,0,0)) { - $filler = ' '; - $prev_htmlLinkColorArray = $this->htmlLinkColorArray; - $prev_htmlLinkFontStyle = $this->htmlLinkFontStyle; - // set new style for link - $this->htmlLinkColorArray = array(); - $this->htmlLinkFontStyle = ''; - $page_first = $this->getPage(); - $page_fill_start = false; - $page_fill_end = false; - // get the font type used for numbers in each template - $current_font = $this->FontFamily; - foreach ($templates as $level => $html) { - $dom = $this->getHtmlDomArray($html); - foreach ($dom as $key => $value) { - if ($value['value'] == '#TOC_PAGE_NUMBER#') { - $this->SetFont($dom[($key - 1)]['fontname']); - $templates['F'.$level] = $this->isUnicodeFont(); - } - } - } - $this->SetFont($current_font); - $maxpage = 0; //used for pages on attached documents - foreach ($this->outlines as $key => $outline) { - // get HTML template - $row = $templates[$outline['l']]; - if (TCPDF_STATIC::empty_string($page)) { - $pagenum = $outline['p']; - } else { - // placemark to be replaced with the correct number - $pagenum = '{#'.($outline['p']).'}'; - if ($templates['F'.$outline['l']]) { - $pagenum = '{'.$pagenum.'}'; - } - $maxpage = max($maxpage, $outline['p']); - } - // replace templates with current values - $row = str_replace('#TOC_DESCRIPTION#', $outline['t'], $row); - $row = str_replace('#TOC_PAGE_NUMBER#', $pagenum, $row); - // add link to page - $row = ''.$row.''; - // write bookmark entry - $this->writeHTML($row, false, false, true, false, ''); - } - // restore link styles - $this->htmlLinkColorArray = $prev_htmlLinkColorArray; - $this->htmlLinkFontStyle = $prev_htmlLinkFontStyle; - // move TOC page and replace numbers - $page_last = $this->getPage(); - $numpages = ($page_last - $page_first + 1); - // account for booklet mode - if ($this->booklet) { - // check if a blank page is required before TOC - $page_fill_start = ((($page_first % 2) == 0) XOR (($page % 2) == 0)); - $page_fill_end = (!((($numpages % 2) == 0) XOR ($page_fill_start))); - if ($page_fill_start) { - // add a page at the end (to be moved before TOC) - $this->addPage(); - ++$page_last; - ++$numpages; - } - if ($page_fill_end) { - // add a page at the end - $this->addPage(); - ++$page_last; - ++$numpages; - } - } - $maxpage = max($maxpage, $page_last); - if (!TCPDF_STATIC::empty_string($page)) { - for ($p = $page_first; $p <= $page_last; ++$p) { - // get page data - $temppage = $this->getPageBuffer($p); - for ($n = 1; $n <= $maxpage; ++$n) { - // update page numbers - $a = '{#'.$n.'}'; - // get page number aliases - $pnalias = $this->getInternalPageNumberAliases($a); - // calculate replacement number - if ($n >= $page) { - $np = $n + $numpages; - } else { - $np = $n; - } - $na = TCPDF_STATIC::formatTOCPageNumber(($this->starting_page_number + $np - 1)); - $nu = TCPDF_FONTS::UTF8ToUTF16BE($na, false, $this->isunicode, $this->CurrentFont); - // replace aliases with numbers - foreach ($pnalias['u'] as $u) { - if ($correct_align) { - $sfill = str_repeat($filler, (strlen($u) - strlen($nu.' '))); - if ($this->rtl) { - $nr = $nu.TCPDF_FONTS::UTF8ToUTF16BE(' '.$sfill, false, $this->isunicode, $this->CurrentFont); - } else { - $nr = TCPDF_FONTS::UTF8ToUTF16BE($sfill.' ', false, $this->isunicode, $this->CurrentFont).$nu; - } - } else { - $nr = $nu; - } - $temppage = str_replace($u, $nr, $temppage); - } - foreach ($pnalias['a'] as $a) { - if ($correct_align) { - $sfill = str_repeat($filler, (strlen($a) - strlen($na.' '))); - if ($this->rtl) { - $nr = $na.' '.$sfill; - } else { - $nr = $sfill.' '.$na; - } - } else { - $nr = $na; - } - $temppage = str_replace($a, $nr, $temppage); - } - } - // save changes - $this->setPageBuffer($p, $temppage); - } - // move pages - $this->Bookmark($toc_name, 0, 0, $page_first, $style, $color); - if ($page_fill_start) { - $this->movePage($page_last, $page_first); - } - for ($i = 0; $i < $numpages; ++$i) { - $this->movePage($page_last, $page); - } - } - } - - /** - * Stores a copy of the current TCPDF object used for undo operation. - * @public - * @since 4.5.029 (2009-03-19) - */ - public function startTransaction() { - if (isset($this->objcopy)) { - // remove previous copy - $this->commitTransaction(); - } - // record current page number and Y position - $this->start_transaction_page = $this->page; - $this->start_transaction_y = $this->y; - // clone current object - $this->objcopy = TCPDF_STATIC::objclone($this); - } - - /** - * Delete the copy of the current TCPDF object used for undo operation. - * @public - * @since 4.5.029 (2009-03-19) - */ - public function commitTransaction() { - if (isset($this->objcopy)) { - $this->objcopy->_destroy(true, true); - unset($this->objcopy); - } - } - - /** - * This method allows to undo the latest transaction by returning the latest saved TCPDF object with startTransaction(). - * @param $self (boolean) if true restores current class object to previous state without the need of reassignment via the returned value. - * @return TCPDF object. - * @public - * @since 4.5.029 (2009-03-19) - */ - public function rollbackTransaction($self=false) { - if (isset($this->objcopy)) { - $this->_destroy(true, true); - if ($self) { - $objvars = get_object_vars($this->objcopy); - foreach ($objvars as $key => $value) { - $this->$key = $value; - } - } - return $this->objcopy; - } - return $this; - } - - // --- MULTI COLUMNS METHODS ----------------------- - - /** - * Set multiple columns of the same size - * @param $numcols (int) number of columns (set to zero to disable columns mode) - * @param $width (int) column width - * @param $y (int) column starting Y position (leave empty for current Y position) - * @public - * @since 4.9.001 (2010-03-28) - */ - public function setEqualColumns($numcols=0, $width=0, $y='') { - $this->columns = array(); - if ($numcols < 2) { - $numcols = 0; - $this->columns = array(); - } else { - // maximum column width - $maxwidth = ($this->w - $this->original_lMargin - $this->original_rMargin) / $numcols; - if (($width == 0) OR ($width > $maxwidth)) { - $width = $maxwidth; - } - if (TCPDF_STATIC::empty_string($y)) { - $y = $this->y; - } - // space between columns - $space = (($this->w - $this->original_lMargin - $this->original_rMargin - ($numcols * $width)) / ($numcols - 1)); - // fill the columns array (with, space, starting Y position) - for ($i = 0; $i < $numcols; ++$i) { - $this->columns[$i] = array('w' => $width, 's' => $space, 'y' => $y); - } - } - $this->num_columns = $numcols; - $this->current_column = 0; - $this->column_start_page = $this->page; - $this->selectColumn(0); - } - - /** - * Remove columns and reset page margins. - * @public - * @since 5.9.072 (2011-04-26) - */ - public function resetColumns() { - $this->lMargin = $this->original_lMargin; - $this->rMargin = $this->original_rMargin; - $this->setEqualColumns(); - } - - /** - * Set columns array. - * Each column is represented by an array of arrays with the following keys: (w = width, s = space between columns, y = column top position). - * @param $columns (array) - * @public - * @since 4.9.001 (2010-03-28) - */ - public function setColumnsArray($columns) { - $this->columns = $columns; - $this->num_columns = count($columns); - $this->current_column = 0; - $this->column_start_page = $this->page; - $this->selectColumn(0); - } - - /** - * Set position at a given column - * @param $col (int) column number (from 0 to getNumberOfColumns()-1); empty string = current column. - * @public - * @since 4.9.001 (2010-03-28) - */ - public function selectColumn($col='') { - if (is_string($col)) { - $col = $this->current_column; - } elseif ($col >= $this->num_columns) { - $col = 0; - } - $xshift = array('x' => 0, 's' => array('H' => 0, 'V' => 0), 'p' => array('L' => 0, 'T' => 0, 'R' => 0, 'B' => 0)); - $enable_thead = false; - if ($this->num_columns > 1) { - if ($col != $this->current_column) { - // move Y pointer at the top of the column - if ($this->column_start_page == $this->page) { - $this->y = $this->columns[$col]['y']; - } else { - $this->y = $this->tMargin; - } - // Avoid to write table headers more than once - if (($this->page > $this->maxselcol['page']) OR (($this->page == $this->maxselcol['page']) AND ($col > $this->maxselcol['column']))) { - $enable_thead = true; - $this->maxselcol['page'] = $this->page; - $this->maxselcol['column'] = $col; - } - } - $xshift = $this->colxshift; - // set X position of the current column by case - $listindent = ($this->listindentlevel * $this->listindent); - // calculate column X position - $colpos = 0; - for ($i = 0; $i < $col; ++$i) { - $colpos += ($this->columns[$i]['w'] + $this->columns[$i]['s']); - } - if ($this->rtl) { - $x = $this->w - $this->original_rMargin - $colpos; - $this->rMargin = ($this->w - $x + $listindent); - $this->lMargin = ($x - $this->columns[$col]['w']); - $this->x = $x - $listindent; - } else { - $x = $this->original_lMargin + $colpos; - $this->lMargin = ($x + $listindent); - $this->rMargin = ($this->w - $x - $this->columns[$col]['w']); - $this->x = $x + $listindent; - } - $this->columns[$col]['x'] = $x; - } - $this->current_column = $col; - // fix for HTML mode - $this->newline = true; - // print HTML table header (if any) - if ((!TCPDF_STATIC::empty_string($this->thead)) AND (!$this->inthead)) { - if ($enable_thead) { - // print table header - $this->writeHTML($this->thead, false, false, false, false, ''); - $this->y += $xshift['s']['V']; - // store end of header position - if (!isset($this->columns[$col]['th'])) { - $this->columns[$col]['th'] = array(); - } - $this->columns[$col]['th']['\''.$this->page.'\''] = $this->y; - $this->lasth = 0; - } elseif (isset($this->columns[$col]['th']['\''.$this->page.'\''])) { - $this->y = $this->columns[$col]['th']['\''.$this->page.'\'']; - } - } - // account for an html table cell over multiple columns - if ($this->rtl) { - $this->rMargin += $xshift['x']; - $this->x -= ($xshift['x'] + $xshift['p']['R']); - } else { - $this->lMargin += $xshift['x']; - $this->x += $xshift['x'] + $xshift['p']['L']; - } - } - - /** - * Return the current column number - * @return int current column number - * @public - * @since 5.5.011 (2010-07-08) - */ - public function getColumn() { - return $this->current_column; - } - - /** - * Return the current number of columns. - * @return int number of columns - * @public - * @since 5.8.018 (2010-08-25) - */ - public function getNumberOfColumns() { - return $this->num_columns; - } - - /** - * Set Text rendering mode. - * @param $stroke (int) outline size in user units (0 = disable). - * @param $fill (boolean) if true fills the text (default). - * @param $clip (boolean) if true activate clipping mode - * @public - * @since 4.9.008 (2009-04-02) - */ - public function setTextRenderingMode($stroke=0, $fill=true, $clip=false) { - // Ref.: PDF 32000-1:2008 - 9.3.6 Text Rendering Mode - // convert text rendering parameters - if ($stroke < 0) { - $stroke = 0; - } - if ($fill === true) { - if ($stroke > 0) { - if ($clip === true) { - // Fill, then stroke text and add to path for clipping - $textrendermode = 6; - } else { - // Fill, then stroke text - $textrendermode = 2; - } - $textstrokewidth = $stroke; - } else { - if ($clip === true) { - // Fill text and add to path for clipping - $textrendermode = 4; - } else { - // Fill text - $textrendermode = 0; - } - } - } else { - if ($stroke > 0) { - if ($clip === true) { - // Stroke text and add to path for clipping - $textrendermode = 5; - } else { - // Stroke text - $textrendermode = 1; - } - $textstrokewidth = $stroke; - } else { - if ($clip === true) { - // Add text to path for clipping - $textrendermode = 7; - } else { - // Neither fill nor stroke text (invisible) - $textrendermode = 3; - } - } - } - $this->textrendermode = $textrendermode; - $this->textstrokewidth = $stroke; - } - - /** - * Set parameters for drop shadow effect for text. - * @param $params (array) Array of parameters: enabled (boolean) set to true to enable shadow; depth_w (float) shadow width in user units; depth_h (float) shadow height in user units; color (array) shadow color or false to use the stroke color; opacity (float) Alpha value: real value from 0 (transparent) to 1 (opaque); blend_mode (string) blend mode, one of the following: Normal, Multiply, Screen, Overlay, Darken, Lighten, ColorDodge, ColorBurn, HardLight, SoftLight, Difference, Exclusion, Hue, Saturation, Color, Luminosity. - * @since 5.9.174 (2012-07-25) - * @public - */ - public function setTextShadow($params=array('enabled'=>false, 'depth_w'=>0, 'depth_h'=>0, 'color'=>false, 'opacity'=>1, 'blend_mode'=>'Normal')) { - if (isset($params['enabled'])) { - $this->txtshadow['enabled'] = $params['enabled']?true:false; - } else { - $this->txtshadow['enabled'] = false; - } - if (isset($params['depth_w'])) { - $this->txtshadow['depth_w'] = floatval($params['depth_w']); - } else { - $this->txtshadow['depth_w'] = 0; - } - if (isset($params['depth_h'])) { - $this->txtshadow['depth_h'] = floatval($params['depth_h']); - } else { - $this->txtshadow['depth_h'] = 0; - } - if (isset($params['color']) AND ($params['color'] !== false) AND is_array($params['color'])) { - $this->txtshadow['color'] = $params['color']; - } else { - $this->txtshadow['color'] = $this->strokecolor; - } - if (isset($params['opacity'])) { - $this->txtshadow['opacity'] = min(1, max(0, floatval($params['opacity']))); - } else { - $this->txtshadow['opacity'] = 1; - } - if (isset($params['blend_mode']) AND in_array($params['blend_mode'], array('Normal', 'Multiply', 'Screen', 'Overlay', 'Darken', 'Lighten', 'ColorDodge', 'ColorBurn', 'HardLight', 'SoftLight', 'Difference', 'Exclusion', 'Hue', 'Saturation', 'Color', 'Luminosity'))) { - $this->txtshadow['blend_mode'] = $params['blend_mode']; - } else { - $this->txtshadow['blend_mode'] = 'Normal'; - } - if ((($this->txtshadow['depth_w'] == 0) AND ($this->txtshadow['depth_h'] == 0)) OR ($this->txtshadow['opacity'] == 0)) { - $this->txtshadow['enabled'] = false; - } - } - - /** - * Return the text shadow parameters array. - * @return Array of parameters. - * @since 5.9.174 (2012-07-25) - * @public - */ - public function getTextShadow() { - return $this->txtshadow; - } - - /** - * Returns an array of chars containing soft hyphens. - * @param $word (array) array of chars - * @param $patterns (array) Array of hypenation patterns. - * @param $dictionary (array) Array of words to be returned without applying the hyphenation algorithm. - * @param $leftmin (int) Minimum number of character to leave on the left of the word without applying the hyphens. - * @param $rightmin (int) Minimum number of character to leave on the right of the word without applying the hyphens. - * @param $charmin (int) Minimum word length to apply the hyphenation algorithm. - * @param $charmax (int) Maximum length of broken piece of word. - * @return array text with soft hyphens - * @author Nicola Asuni - * @since 4.9.012 (2010-04-12) - * @protected - */ - protected function hyphenateWord($word, $patterns, $dictionary=array(), $leftmin=1, $rightmin=2, $charmin=1, $charmax=8) { - $hyphenword = array(); // hyphens positions - $numchars = count($word); - if ($numchars <= $charmin) { - return $word; - } - $word_string = TCPDF_FONTS::UTF8ArrSubString($word, '', '', $this->isunicode); - // some words will be returned as-is - $pattern = '/^([a-zA-Z0-9_\.\-]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/'; - if (preg_match($pattern, $word_string) > 0) { - // email - return $word; - } - $pattern = '/(([a-zA-Z0-9\-]+\.)?)((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/'; - if (preg_match($pattern, $word_string) > 0) { - // URL - return $word; - } - if (isset($dictionary[$word_string])) { - return TCPDF_FONTS::UTF8StringToArray($dictionary[$word_string], $this->isunicode, $this->CurrentFont); - } - // surround word with '_' characters - $tmpword = array_merge(array(46), $word, array(46)); - $tmpnumchars = $numchars + 2; - $maxpos = $tmpnumchars - 1; - for ($pos = 0; $pos < $maxpos; ++$pos) { - $imax = min(($tmpnumchars - $pos), $charmax); - for ($i = 1; $i <= $imax; ++$i) { - $subword = strtolower(TCPDF_FONTS::UTF8ArrSubString($tmpword, $pos, ($pos + $i), $this->isunicode)); - if (isset($patterns[$subword])) { - $pattern = TCPDF_FONTS::UTF8StringToArray($patterns[$subword], $this->isunicode, $this->CurrentFont); - $pattern_length = count($pattern); - $digits = 1; - for ($j = 0; $j < $pattern_length; ++$j) { - // check if $pattern[$j] is a number = hyphenation level (only numbers from 1 to 5 are valid) - if (($pattern[$j] >= 48) AND ($pattern[$j] <= 57)) { - if ($j == 0) { - $zero = $pos - 1; - } else { - $zero = $pos + $j - $digits; - } - // get hyphenation level - $level = ($pattern[$j] - 48); - // if two levels from two different patterns match at the same point, the higher one is selected. - if (!isset($hyphenword[$zero]) OR ($hyphenword[$zero] < $level)) { - $hyphenword[$zero] = $level; - } - ++$digits; - } - } - } - } - } - $inserted = 0; - $maxpos = $numchars - $rightmin; - for ($i = $leftmin; $i <= $maxpos; ++$i) { - // only odd levels indicate allowed hyphenation points - if (isset($hyphenword[$i]) AND (($hyphenword[$i] % 2) != 0)) { - // 173 = soft hyphen character - array_splice($word, $i + $inserted, 0, 173); - ++$inserted; - } - } - return $word; - } - - /** - * Returns text with soft hyphens. - * @param $text (string) text to process - * @param $patterns (mixed) Array of hypenation patterns or a TEX file containing hypenation patterns. TEX patterns can be downloaded from http://www.ctan.org/tex-archive/language/hyph-utf8/tex/generic/hyph-utf8/patterns/ - * @param $dictionary (array) Array of words to be returned without applying the hyphenation algorithm. - * @param $leftmin (int) Minimum number of character to leave on the left of the word without applying the hyphens. - * @param $rightmin (int) Minimum number of character to leave on the right of the word without applying the hyphens. - * @param $charmin (int) Minimum word length to apply the hyphenation algorithm. - * @param $charmax (int) Maximum length of broken piece of word. - * @return array text with soft hyphens - * @author Nicola Asuni - * @since 4.9.012 (2010-04-12) - * @public - */ - public function hyphenateText($text, $patterns, $dictionary=array(), $leftmin=1, $rightmin=2, $charmin=1, $charmax=8) { - $text = $this->unhtmlentities($text); - $word = array(); // last word - $txtarr = array(); // text to be returned - $intag = false; // true if we are inside an HTML tag - $skip = false; // true to skip hyphenation - if (!is_array($patterns)) { - $patterns = TCPDF_STATIC::getHyphenPatternsFromTEX($patterns); - } - // get array of characters - $unichars = TCPDF_FONTS::UTF8StringToArray($text, $this->isunicode, $this->CurrentFont); - // for each char - foreach ($unichars as $char) { - if ((!$intag) AND (!$skip) AND TCPDF_FONT_DATA::$uni_type[$char] == 'L') { - // letter character - $word[] = $char; - } else { - // other type of character - if (!TCPDF_STATIC::empty_string($word)) { - // hypenate the word - $txtarr = array_merge($txtarr, $this->hyphenateWord($word, $patterns, $dictionary, $leftmin, $rightmin, $charmin, $charmax)); - $word = array(); - } - $txtarr[] = $char; - if (chr($char) == '<') { - // we are inside an HTML tag - $intag = true; - } elseif ($intag AND (chr($char) == '>')) { - // end of HTML tag - $intag = false; - // check for style tag - $expected = array(115, 116, 121, 108, 101); // = 'style' - $current = array_slice($txtarr, -6, 5); // last 5 chars - $compare = array_diff($expected, $current); - if (empty($compare)) { - // check if it is a closing tag - $expected = array(47); // = '/' - $current = array_slice($txtarr, -7, 1); - $compare = array_diff($expected, $current); - if (empty($compare)) { - // closing style tag - $skip = false; - } else { - // opening style tag - $skip = true; - } - } - } - } - } - if (!TCPDF_STATIC::empty_string($word)) { - // hypenate the word - $txtarr = array_merge($txtarr, $this->hyphenateWord($word, $patterns, $dictionary, $leftmin, $rightmin, $charmin, $charmax)); - } - // convert char array to string and return - return TCPDF_FONTS::UTF8ArrSubString($txtarr, '', '', $this->isunicode); - } - - /** - * Enable/disable rasterization of vector images using ImageMagick library. - * @param $mode (boolean) if true enable rasterization, false otherwise. - * @public - * @since 5.0.000 (2010-04-27) - */ - public function setRasterizeVectorImages($mode) { - $this->rasterize_vector_images = $mode; - } - - /** - * Enable or disable default option for font subsetting. - * @param $enable (boolean) if true enable font subsetting by default. - * @author Nicola Asuni - * @public - * @since 5.3.002 (2010-06-07) - */ - public function setFontSubsetting($enable=true) { - if ($this->pdfa_mode) { - $this->font_subsetting = false; - } else { - $this->font_subsetting = $enable ? true : false; - } - } - - /** - * Return the default option for font subsetting. - * @return boolean default font subsetting state. - * @author Nicola Asuni - * @public - * @since 5.3.002 (2010-06-07) - */ - public function getFontSubsetting() { - return $this->font_subsetting; - } - - /** - * Left trim the input string - * @param $str (string) string to trim - * @param $replace (string) string that replace spaces. - * @return left trimmed string - * @author Nicola Asuni - * @public - * @since 5.8.000 (2010-08-11) - */ - public function stringLeftTrim($str, $replace='') { - return preg_replace('/^'.$this->re_space['p'].'+/'.$this->re_space['m'], $replace, $str); - } - - /** - * Right trim the input string - * @param $str (string) string to trim - * @param $replace (string) string that replace spaces. - * @return right trimmed string - * @author Nicola Asuni - * @public - * @since 5.8.000 (2010-08-11) - */ - public function stringRightTrim($str, $replace='') { - return preg_replace('/'.$this->re_space['p'].'+$/'.$this->re_space['m'], $replace, $str); - } - - /** - * Trim the input string - * @param $str (string) string to trim - * @param $replace (string) string that replace spaces. - * @return trimmed string - * @author Nicola Asuni - * @public - * @since 5.8.000 (2010-08-11) - */ - public function stringTrim($str, $replace='') { - $str = $this->stringLeftTrim($str, $replace); - $str = $this->stringRightTrim($str, $replace); - return $str; - } - - /** - * Return true if the current font is unicode type. - * @return true for unicode font, false otherwise. - * @author Nicola Asuni - * @public - * @since 5.8.002 (2010-08-14) - */ - public function isUnicodeFont() { - return (($this->CurrentFont['type'] == 'TrueTypeUnicode') OR ($this->CurrentFont['type'] == 'cidfont0')); - } - - /** - * Return normalized font name - * @param $fontfamily (string) property string containing font family names - * @return string normalized font name - * @author Nicola Asuni - * @public - * @since 5.8.004 (2010-08-17) - */ - public function getFontFamilyName($fontfamily) { - // remove spaces and symbols - $fontfamily = preg_replace('/[^a-z0-9_\,]/', '', strtolower($fontfamily)); - // extract all font names - $fontslist = preg_split('/[,]/', $fontfamily); - // find first valid font name - foreach ($fontslist as $font) { - // replace font variations - $font = preg_replace('/regular$/', '', $font); - $font = preg_replace('/italic$/', 'I', $font); - $font = preg_replace('/oblique$/', 'I', $font); - $font = preg_replace('/bold([I]?)$/', 'B\\1', $font); - // replace common family names and core fonts - $pattern = array(); - $replacement = array(); - $pattern[] = '/^serif|^cursive|^fantasy|^timesnewroman/'; - $replacement[] = 'times'; - $pattern[] = '/^sansserif/'; - $replacement[] = 'helvetica'; - $pattern[] = '/^monospace/'; - $replacement[] = 'courier'; - $font = preg_replace($pattern, $replacement, $font); - if (in_array(strtolower($font), $this->fontlist) OR in_array($font, $this->fontkeys)) { - return $font; - } - } - // return current font as default - return $this->CurrentFont['fontkey']; - } - - /** - * Start a new XObject Template. - * An XObject Template is a PDF block that is a self-contained description of any sequence of graphics objects (including path objects, text objects, and sampled images). - * An XObject Template may be painted multiple times, either on several pages or at several locations on the same page and produces the same results each time, subject only to the graphics state at the time it is invoked. - * Note: X,Y coordinates will be reset to 0,0. - * @param $w (int) Template width in user units (empty string or zero = page width less margins). - * @param $h (int) Template height in user units (empty string or zero = page height less margins). - * @param $group (mixed) Set transparency group. Can be a boolean value or an array specifying optional parameters: 'CS' (solour space name), 'I' (boolean flag to indicate isolated group) and 'K' (boolean flag to indicate knockout group). - * @return int the XObject Template ID in case of success or false in case of error. - * @author Nicola Asuni - * @public - * @since 5.8.017 (2010-08-24) - * @see endTemplate(), printTemplate() - */ - public function startTemplate($w=0, $h=0, $group=false) { - if ($this->inxobj) { - // we are already inside an XObject template - return false; - } - $this->inxobj = true; - ++$this->n; - // XObject ID - $this->xobjid = 'XT'.$this->n; - // object ID - $this->xobjects[$this->xobjid] = array('n' => $this->n); - // store current graphic state - $this->xobjects[$this->xobjid]['gvars'] = $this->getGraphicVars(); - // initialize data - $this->xobjects[$this->xobjid]['intmrk'] = 0; - $this->xobjects[$this->xobjid]['transfmrk'] = array(); - $this->xobjects[$this->xobjid]['outdata'] = ''; - $this->xobjects[$this->xobjid]['xobjects'] = array(); - $this->xobjects[$this->xobjid]['images'] = array(); - $this->xobjects[$this->xobjid]['fonts'] = array(); - $this->xobjects[$this->xobjid]['annotations'] = array(); - $this->xobjects[$this->xobjid]['extgstates'] = array(); - $this->xobjects[$this->xobjid]['gradients'] = array(); - $this->xobjects[$this->xobjid]['spot_colors'] = array(); - // set new environment - $this->num_columns = 1; - $this->current_column = 0; - $this->SetAutoPageBreak(false); - if (($w === '') OR ($w <= 0)) { - $w = $this->w - $this->lMargin - $this->rMargin; - } - if (($h === '') OR ($h <= 0)) { - $h = $this->h - $this->tMargin - $this->bMargin; - } - $this->xobjects[$this->xobjid]['x'] = 0; - $this->xobjects[$this->xobjid]['y'] = 0; - $this->xobjects[$this->xobjid]['w'] = $w; - $this->xobjects[$this->xobjid]['h'] = $h; - $this->w = $w; - $this->h = $h; - $this->wPt = $this->w * $this->k; - $this->hPt = $this->h * $this->k; - $this->fwPt = $this->wPt; - $this->fhPt = $this->hPt; - $this->x = 0; - $this->y = 0; - $this->lMargin = 0; - $this->rMargin = 0; - $this->tMargin = 0; - $this->bMargin = 0; - // set group mode - $this->xobjects[$this->xobjid]['group'] = $group; - return $this->xobjid; - } - - /** - * End the current XObject Template started with startTemplate() and restore the previous graphic state. - * An XObject Template is a PDF block that is a self-contained description of any sequence of graphics objects (including path objects, text objects, and sampled images). - * An XObject Template may be painted multiple times, either on several pages or at several locations on the same page and produces the same results each time, subject only to the graphics state at the time it is invoked. - * @return int the XObject Template ID in case of success or false in case of error. - * @author Nicola Asuni - * @public - * @since 5.8.017 (2010-08-24) - * @see startTemplate(), printTemplate() - */ - public function endTemplate() { - if (!$this->inxobj) { - // we are not inside a template - return false; - } - $this->inxobj = false; - // restore previous graphic state - $this->setGraphicVars($this->xobjects[$this->xobjid]['gvars'], true); - return $this->xobjid; - } - - /** - * Print an XObject Template. - * You can print an XObject Template inside the currently opened Template. - * An XObject Template is a PDF block that is a self-contained description of any sequence of graphics objects (including path objects, text objects, and sampled images). - * An XObject Template may be painted multiple times, either on several pages or at several locations on the same page and produces the same results each time, subject only to the graphics state at the time it is invoked. - * @param $id (string) The ID of XObject Template to print. - * @param $x (int) X position in user units (empty string = current x position) - * @param $y (int) Y position in user units (empty string = current y position) - * @param $w (int) Width in user units (zero = remaining page width) - * @param $h (int) Height in user units (zero = remaining page height) - * @param $align (string) Indicates the alignment of the pointer next to template insertion relative to template height. The value can be:
        • T: top-right for LTR or top-left for RTL
        • M: middle-right for LTR or middle-left for RTL
        • B: bottom-right for LTR or bottom-left for RTL
        • N: next line
        - * @param $palign (string) Allows to center or align the template on the current line. Possible values are:
        • L : left align
        • C : center
        • R : right align
        • '' : empty string : left for LTR or right for RTL
        - * @param $fitonpage (boolean) If true the template is resized to not exceed page dimensions. - * @author Nicola Asuni - * @public - * @since 5.8.017 (2010-08-24) - * @see startTemplate(), endTemplate() - */ - public function printTemplate($id, $x='', $y='', $w=0, $h=0, $align='', $palign='', $fitonpage=false) { - if ($this->state != 2) { - return; - } - if (!isset($this->xobjects[$id])) { - $this->Error('The XObject Template \''.$id.'\' doesn\'t exist!'); - } - if ($this->inxobj) { - if ($id == $this->xobjid) { - // close current template - $this->endTemplate(); - } else { - // use the template as resource for the template currently opened - $this->xobjects[$this->xobjid]['xobjects'][$id] = $this->xobjects[$id]; - } - } - // set default values - if ($x === '') { - $x = $this->x; - } - if ($y === '') { - $y = $this->y; - } - // check page for no-write regions and adapt page margins if necessary - list($x, $y) = $this->checkPageRegions($h, $x, $y); - $ow = $this->xobjects[$id]['w']; - if ($ow <= 0) { - $ow = 1; - } - $oh = $this->xobjects[$id]['h']; - if ($oh <= 0) { - $oh = 1; - } - // calculate template width and height on document - if (($w <= 0) AND ($h <= 0)) { - $w = $ow; - $h = $oh; - } elseif ($w <= 0) { - $w = $h * $ow / $oh; - } elseif ($h <= 0) { - $h = $w * $oh / $ow; - } - // fit the template on available space - list($w, $h, $x, $y) = $this->fitBlock($w, $h, $x, $y, $fitonpage); - // set page alignment - $rb_y = $y + $h; - // set alignment - if ($this->rtl) { - if ($palign == 'L') { - $xt = $this->lMargin; - } elseif ($palign == 'C') { - $xt = ($this->w + $this->lMargin - $this->rMargin - $w) / 2; - } elseif ($palign == 'R') { - $xt = $this->w - $this->rMargin - $w; - } else { - $xt = $x - $w; - } - $rb_x = $xt; - } else { - if ($palign == 'L') { - $xt = $this->lMargin; - } elseif ($palign == 'C') { - $xt = ($this->w + $this->lMargin - $this->rMargin - $w) / 2; - } elseif ($palign == 'R') { - $xt = $this->w - $this->rMargin - $w; - } else { - $xt = $x; - } - $rb_x = $xt + $w; - } - // print XObject Template + Transformation matrix - $this->StartTransform(); - // translate and scale - $sx = ($w / $ow); - $sy = ($h / $oh); - $tm = array(); - $tm[0] = $sx; - $tm[1] = 0; - $tm[2] = 0; - $tm[3] = $sy; - $tm[4] = $xt * $this->k; - $tm[5] = ($this->h - $h - $y) * $this->k; - $this->Transform($tm); - // set object - $this->_out('/'.$id.' Do'); - $this->StopTransform(); - // add annotations - if (!empty($this->xobjects[$id]['annotations'])) { - foreach ($this->xobjects[$id]['annotations'] as $annot) { - // transform original coordinates - $coordlt = TCPDF_STATIC::getTransformationMatrixProduct($tm, array(1, 0, 0, 1, ($annot['x'] * $this->k), (-$annot['y'] * $this->k))); - $ax = ($coordlt[4] / $this->k); - $ay = ($this->h - $h - ($coordlt[5] / $this->k)); - $coordrb = TCPDF_STATIC::getTransformationMatrixProduct($tm, array(1, 0, 0, 1, (($annot['x'] + $annot['w']) * $this->k), ((-$annot['y'] - $annot['h']) * $this->k))); - $aw = ($coordrb[4] / $this->k) - $ax; - $ah = ($this->h - $h - ($coordrb[5] / $this->k)) - $ay; - $this->Annotation($ax, $ay, $aw, $ah, $annot['text'], $annot['opt'], $annot['spaces']); - } - } - // set pointer to align the next text/objects - switch($align) { - case 'T': { - $this->y = $y; - $this->x = $rb_x; - break; - } - case 'M': { - $this->y = $y + round($h/2); - $this->x = $rb_x; - break; - } - case 'B': { - $this->y = $rb_y; - $this->x = $rb_x; - break; - } - case 'N': { - $this->SetY($rb_y); - break; - } - default:{ - break; - } - } - } - - /** - * Set the percentage of character stretching. - * @param $perc (int) percentage of stretching (100 = no stretching) - * @author Nicola Asuni - * @public - * @since 5.9.000 (2010-09-29) - */ - public function setFontStretching($perc=100) { - $this->font_stretching = $perc; - } - - /** - * Get the percentage of character stretching. - * @return float stretching value - * @author Nicola Asuni - * @public - * @since 5.9.000 (2010-09-29) - */ - public function getFontStretching() { - return $this->font_stretching; - } - - /** - * Set the amount to increase or decrease the space between characters in a text. - * @param $spacing (float) amount to increase or decrease the space between characters in a text (0 = default spacing) - * @author Nicola Asuni - * @public - * @since 5.9.000 (2010-09-29) - */ - public function setFontSpacing($spacing=0) { - $this->font_spacing = $spacing; - } - - /** - * Get the amount to increase or decrease the space between characters in a text. - * @return int font spacing (tracking) value - * @author Nicola Asuni - * @public - * @since 5.9.000 (2010-09-29) - */ - public function getFontSpacing() { - return $this->font_spacing; - } - - /** - * Return an array of no-write page regions - * @return array of no-write page regions - * @author Nicola Asuni - * @public - * @since 5.9.003 (2010-10-13) - * @see setPageRegions(), addPageRegion() - */ - public function getPageRegions() { - return $this->page_regions; - } - - /** - * Set no-write regions on page. - * A no-write region is a portion of the page with a rectangular or trapezium shape that will not be covered when writing text or html code. - * A region is always aligned on the left or right side of the page ad is defined using a vertical segment. - * You can set multiple regions for the same page. - * @param $regions (array) array of no-write regions. For each region you can define an array as follow: ('page' => page number or empy for current page, 'xt' => X top, 'yt' => Y top, 'xb' => X bottom, 'yb' => Y bottom, 'side' => page side 'L' = left or 'R' = right). Omit this parameter to remove all regions. - * @author Nicola Asuni - * @public - * @since 5.9.003 (2010-10-13) - * @see addPageRegion(), getPageRegions() - */ - public function setPageRegions($regions=array()) { - // empty current regions array - $this->page_regions = array(); - // add regions - foreach ($regions as $data) { - $this->addPageRegion($data); - } - } - - /** - * Add a single no-write region on selected page. - * A no-write region is a portion of the page with a rectangular or trapezium shape that will not be covered when writing text or html code. - * A region is always aligned on the left or right side of the page ad is defined using a vertical segment. - * You can set multiple regions for the same page. - * @param $region (array) array of a single no-write region array: ('page' => page number or empy for current page, 'xt' => X top, 'yt' => Y top, 'xb' => X bottom, 'yb' => Y bottom, 'side' => page side 'L' = left or 'R' = right). - * @author Nicola Asuni - * @public - * @since 5.9.003 (2010-10-13) - * @see setPageRegions(), getPageRegions() - */ - public function addPageRegion($region) { - if (!isset($region['page']) OR empty($region['page'])) { - $region['page'] = $this->page; - } - if (isset($region['xt']) AND isset($region['xb']) AND ($region['xt'] > 0) AND ($region['xb'] > 0) - AND isset($region['yt']) AND isset($region['yb']) AND ($region['yt'] >= 0) AND ($region['yt'] < $region['yb']) - AND isset($region['side']) AND (($region['side'] == 'L') OR ($region['side'] == 'R'))) { - $this->page_regions[] = $region; - } - } - - /** - * Remove a single no-write region. - * @param $key (int) region key - * @author Nicola Asuni - * @public - * @since 5.9.003 (2010-10-13) - * @see setPageRegions(), getPageRegions() - */ - public function removePageRegion($key) { - if (isset($this->page_regions[$key])) { - unset($this->page_regions[$key]); - } - } - - /** - * Check page for no-write regions and adapt current coordinates and page margins if necessary. - * A no-write region is a portion of the page with a rectangular or trapezium shape that will not be covered when writing text or html code. - * A region is always aligned on the left or right side of the page ad is defined using a vertical segment. - * @param $h (float) height of the text/image/object to print in user units - * @param $x (float) current X coordinate in user units - * @param $y (float) current Y coordinate in user units - * @return array($x, $y) - * @author Nicola Asuni - * @protected - * @since 5.9.003 (2010-10-13) - */ - protected function checkPageRegions($h, $x, $y) { - // set default values - if ($x === '') { - $x = $this->x; - } - if ($y === '') { - $y = $this->y; - } - if (!$this->check_page_regions OR empty($this->page_regions)) { - // no page regions defined - return array($x, $y); - } - if (empty($h)) { - $h = $this->getCellHeight($this->FontSize); - } - // check for page break - if ($this->checkPageBreak($h, $y)) { - // the content will be printed on a new page - $x = $this->x; - $y = $this->y; - } - if ($this->num_columns > 1) { - if ($this->rtl) { - $this->lMargin = ($this->columns[$this->current_column]['x'] - $this->columns[$this->current_column]['w']); - } else { - $this->rMargin = ($this->w - $this->columns[$this->current_column]['x'] - $this->columns[$this->current_column]['w']); - } - } else { - if ($this->rtl) { - $this->lMargin = max($this->clMargin, $this->original_lMargin); - } else { - $this->rMargin = max($this->crMargin, $this->original_rMargin); - } - } - // adjust coordinates and page margins - foreach ($this->page_regions as $regid => $regdata) { - if ($regdata['page'] == $this->page) { - // check region boundaries - if (($y > ($regdata['yt'] - $h)) AND ($y <= $regdata['yb'])) { - // Y is inside the region - $minv = ($regdata['xb'] - $regdata['xt']) / ($regdata['yb'] - $regdata['yt']); // inverse of angular coefficient - $yt = max($y, $regdata['yt']); - $yb = min(($yt + $h), $regdata['yb']); - $xt = (($yt - $regdata['yt']) * $minv) + $regdata['xt']; - $xb = (($yb - $regdata['yt']) * $minv) + $regdata['xt']; - if ($regdata['side'] == 'L') { // left side - $new_margin = max($xt, $xb); - if ($this->lMargin < $new_margin) { - if ($this->rtl) { - // adjust left page margin - $this->lMargin = max(0, $new_margin); - } - if ($x < $new_margin) { - // adjust x position - $x = $new_margin; - if ($new_margin > ($this->w - $this->rMargin)) { - // adjust y position - $y = $regdata['yb'] - $h; - } - } - } - } elseif ($regdata['side'] == 'R') { // right side - $new_margin = min($xt, $xb); - if (($this->w - $this->rMargin) > $new_margin) { - if (!$this->rtl) { - // adjust right page margin - $this->rMargin = max(0, ($this->w - $new_margin)); - } - if ($x > $new_margin) { - // adjust x position - $x = $new_margin; - if ($new_margin > $this->lMargin) { - // adjust y position - $y = $regdata['yb'] - $h; - } - } - } - } - } - } - } - return array($x, $y); - } - - // --- SVG METHODS --------------------------------------------------------- - - /** - * Embedd a Scalable Vector Graphics (SVG) image. - * NOTE: SVG standard is not yet fully implemented, use the setRasterizeVectorImages() method to enable/disable rasterization of vector images using ImageMagick library. - * @param $file (string) Name of the SVG file or a '@' character followed by the SVG data string. - * @param $x (float) Abscissa of the upper-left corner. - * @param $y (float) Ordinate of the upper-left corner. - * @param $w (float) Width of the image in the page. If not specified or equal to zero, it is automatically calculated. - * @param $h (float) Height of the image in the page. If not specified or equal to zero, it is automatically calculated. - * @param $link (mixed) URL or identifier returned by AddLink(). - * @param $align (string) Indicates the alignment of the pointer next to image insertion relative to image height. The value can be:
        • T: top-right for LTR or top-left for RTL
        • M: middle-right for LTR or middle-left for RTL
        • B: bottom-right for LTR or bottom-left for RTL
        • N: next line
        If the alignment is an empty string, then the pointer will be restored on the starting SVG position. - * @param $palign (string) Allows to center or align the image on the current line. Possible values are:
        • L : left align
        • C : center
        • R : right align
        • '' : empty string : left for LTR or right for RTL
        - * @param $border (mixed) Indicates if borders must be drawn around the cell. The value can be a number:
        • 0: no border (default)
        • 1: frame
        or a string containing some or all of the following characters (in any order):
        • L: left
        • T: top
        • R: right
        • B: bottom
        or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) - * @param $fitonpage (boolean) if true the image is resized to not exceed page dimensions. - * @author Nicola Asuni - * @since 5.0.000 (2010-05-02) - * @public - */ - public function ImageSVG($file, $x='', $y='', $w=0, $h=0, $link='', $align='', $palign='', $border=0, $fitonpage=false) { - if ($this->state != 2) { - return; - } - // reset SVG vars - $this->svggradients = array(); - $this->svggradientid = 0; - $this->svgdefsmode = false; - $this->svgdefs = array(); - $this->svgclipmode = false; - $this->svgclippaths = array(); - $this->svgcliptm = array(); - $this->svgclipid = 0; - $this->svgtext = ''; - $this->svgtextmode = array(); - if ($this->rasterize_vector_images AND ($w > 0) AND ($h > 0)) { - // convert SVG to raster image using GD or ImageMagick libraries - return $this->Image($file, $x, $y, $w, $h, 'SVG', $link, $align, true, 300, $palign, false, false, $border, false, false, false); - } - if ($file[0] === '@') { // image from string - $this->svgdir = ''; - $svgdata = substr($file, 1); - } else { // SVG file - $this->svgdir = dirname($file); - $svgdata = TCPDF_STATIC::fileGetContents($file); - } - if ($svgdata === FALSE) { - $this->Error('SVG file not found: '.$file); - } - if ($x === '') { - $x = $this->x; - } - if ($y === '') { - $y = $this->y; - } - // check page for no-write regions and adapt page margins if necessary - list($x, $y) = $this->checkPageRegions($h, $x, $y); - $k = $this->k; - $ox = 0; - $oy = 0; - $ow = $w; - $oh = $h; - $aspect_ratio_align = 'xMidYMid'; - $aspect_ratio_ms = 'meet'; - $regs = array(); - // get original image width and height - preg_match('/]*)>/si', $svgdata, $regs); - if (isset($regs[1]) AND !empty($regs[1])) { - $tmp = array(); - if (preg_match('/[\s]+x[\s]*=[\s]*"([^"]*)"/si', $regs[1], $tmp)) { - $ox = $this->getHTMLUnitToUnits($tmp[1], 0, $this->svgunit, false); - } - $tmp = array(); - if (preg_match('/[\s]+y[\s]*=[\s]*"([^"]*)"/si', $regs[1], $tmp)) { - $oy = $this->getHTMLUnitToUnits($tmp[1], 0, $this->svgunit, false); - } - $tmp = array(); - if (preg_match('/[\s]+width[\s]*=[\s]*"([^"]*)"/si', $regs[1], $tmp)) { - $ow = $this->getHTMLUnitToUnits($tmp[1], 1, $this->svgunit, false); - } - $tmp = array(); - if (preg_match('/[\s]+height[\s]*=[\s]*"([^"]*)"/si', $regs[1], $tmp)) { - $oh = $this->getHTMLUnitToUnits($tmp[1], 1, $this->svgunit, false); - } - $tmp = array(); - $view_box = array(); - if (preg_match('/[\s]+viewBox[\s]*=[\s]*"[\s]*([0-9\.\-]+)[\s]+([0-9\.\-]+)[\s]+([0-9\.]+)[\s]+([0-9\.]+)[\s]*"/si', $regs[1], $tmp)) { - if (count($tmp) == 5) { - array_shift($tmp); - foreach ($tmp as $key => $val) { - $view_box[$key] = $this->getHTMLUnitToUnits($val, 0, $this->svgunit, false); - } - $ox = $view_box[0]; - $oy = $view_box[1]; - } - // get aspect ratio - $tmp = array(); - if (preg_match('/[\s]+preserveAspectRatio[\s]*=[\s]*"([^"]*)"/si', $regs[1], $tmp)) { - $aspect_ratio = preg_split('/[\s]+/si', $tmp[1]); - switch (count($aspect_ratio)) { - case 3: { - $aspect_ratio_align = $aspect_ratio[1]; - $aspect_ratio_ms = $aspect_ratio[2]; - break; - } - case 2: { - $aspect_ratio_align = $aspect_ratio[0]; - $aspect_ratio_ms = $aspect_ratio[1]; - break; - } - case 1: { - $aspect_ratio_align = $aspect_ratio[0]; - $aspect_ratio_ms = 'meet'; - break; - } - } - } - } - } - if ($ow <= 0) { - $ow = 1; - } - if ($oh <= 0) { - $oh = 1; - } - // calculate image width and height on document - if (($w <= 0) AND ($h <= 0)) { - // convert image size to document unit - $w = $ow; - $h = $oh; - } elseif ($w <= 0) { - $w = $h * $ow / $oh; - } elseif ($h <= 0) { - $h = $w * $oh / $ow; - } - // fit the image on available space - list($w, $h, $x, $y) = $this->fitBlock($w, $h, $x, $y, $fitonpage); - if ($this->rasterize_vector_images) { - // convert SVG to raster image using GD or ImageMagick libraries - return $this->Image($file, $x, $y, $w, $h, 'SVG', $link, $align, true, 300, $palign, false, false, $border, false, false, false); - } - // set alignment - $this->img_rb_y = $y + $h; - // set alignment - if ($this->rtl) { - if ($palign == 'L') { - $ximg = $this->lMargin; - } elseif ($palign == 'C') { - $ximg = ($this->w + $this->lMargin - $this->rMargin - $w) / 2; - } elseif ($palign == 'R') { - $ximg = $this->w - $this->rMargin - $w; - } else { - $ximg = $x - $w; - } - $this->img_rb_x = $ximg; - } else { - if ($palign == 'L') { - $ximg = $this->lMargin; - } elseif ($palign == 'C') { - $ximg = ($this->w + $this->lMargin - $this->rMargin - $w) / 2; - } elseif ($palign == 'R') { - $ximg = $this->w - $this->rMargin - $w; - } else { - $ximg = $x; - } - $this->img_rb_x = $ximg + $w; - } - // store current graphic vars - $gvars = $this->getGraphicVars(); - // store SVG position and scale factors - $svgoffset_x = ($ximg - $ox) * $this->k; - $svgoffset_y = -($y - $oy) * $this->k; - if (isset($view_box[2]) AND ($view_box[2] > 0) AND ($view_box[3] > 0)) { - $ow = $view_box[2]; - $oh = $view_box[3]; - } else { - if ($ow <= 0) { - $ow = $w; - } - if ($oh <= 0) { - $oh = $h; - } - } - $svgscale_x = $w / $ow; - $svgscale_y = $h / $oh; - // scaling and alignment - if ($aspect_ratio_align != 'none') { - // store current scaling values - $svgscale_old_x = $svgscale_x; - $svgscale_old_y = $svgscale_y; - // force uniform scaling - if ($aspect_ratio_ms == 'slice') { - // the entire viewport is covered by the viewBox - if ($svgscale_x > $svgscale_y) { - $svgscale_y = $svgscale_x; - } elseif ($svgscale_x < $svgscale_y) { - $svgscale_x = $svgscale_y; - } - } else { // meet - // the entire viewBox is visible within the viewport - if ($svgscale_x < $svgscale_y) { - $svgscale_y = $svgscale_x; - } elseif ($svgscale_x > $svgscale_y) { - $svgscale_x = $svgscale_y; - } - } - // correct X alignment - switch (substr($aspect_ratio_align, 1, 3)) { - case 'Min': { - // do nothing - break; - } - case 'Max': { - $svgoffset_x += (($w * $this->k) - ($ow * $this->k * $svgscale_x)); - break; - } - default: - case 'Mid': { - $svgoffset_x += ((($w * $this->k) - ($ow * $this->k * $svgscale_x)) / 2); - break; - } - } - // correct Y alignment - switch (substr($aspect_ratio_align, 5)) { - case 'Min': { - // do nothing - break; - } - case 'Max': { - $svgoffset_y -= (($h * $this->k) - ($oh * $this->k * $svgscale_y)); - break; - } - default: - case 'Mid': { - $svgoffset_y -= ((($h * $this->k) - ($oh * $this->k * $svgscale_y)) / 2); - break; - } - } - } - // store current page break mode - $page_break_mode = $this->AutoPageBreak; - $page_break_margin = $this->getBreakMargin(); - $cell_padding = $this->cell_padding; - $this->SetCellPadding(0); - $this->SetAutoPageBreak(false); - // save the current graphic state - $this->_out('q'.$this->epsmarker); - // set initial clipping mask - $this->Rect($ximg, $y, $w, $h, 'CNZ', array(), array()); - // scale and translate - $e = $ox * $this->k * (1 - $svgscale_x); - $f = ($this->h - $oy) * $this->k * (1 - $svgscale_y); - $this->_out(sprintf('%F %F %F %F %F %F cm', $svgscale_x, 0, 0, $svgscale_y, ($e + $svgoffset_x), ($f + $svgoffset_y))); - // creates a new XML parser to be used by the other XML functions - $this->parser = xml_parser_create('UTF-8'); - // the following function allows to use parser inside object - xml_set_object($this->parser, $this); - // disable case-folding for this XML parser - xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); - // sets the element handler functions for the XML parser - xml_set_element_handler($this->parser, 'startSVGElementHandler', 'endSVGElementHandler'); - // sets the character data handler function for the XML parser - xml_set_character_data_handler($this->parser, 'segSVGContentHandler'); - // start parsing an XML document - if (!xml_parse($this->parser, $svgdata)) { - $error_message = sprintf('SVG Error: %s at line %d', xml_error_string(xml_get_error_code($this->parser)), xml_get_current_line_number($this->parser)); - $this->Error($error_message); - } - // free this XML parser - xml_parser_free($this->parser); - // restore previous graphic state - $this->_out($this->epsmarker.'Q'); - // restore graphic vars - $this->setGraphicVars($gvars); - $this->lasth = $gvars['lasth']; - if (!empty($border)) { - $bx = $this->x; - $by = $this->y; - $this->x = $ximg; - if ($this->rtl) { - $this->x += $w; - } - $this->y = $y; - $this->Cell($w, $h, '', $border, 0, '', 0, '', 0, true); - $this->x = $bx; - $this->y = $by; - } - if ($link) { - $this->Link($ximg, $y, $w, $h, $link, 0); - } - // set pointer to align the next text/objects - switch($align) { - case 'T':{ - $this->y = $y; - $this->x = $this->img_rb_x; - break; - } - case 'M':{ - $this->y = $y + round($h/2); - $this->x = $this->img_rb_x; - break; - } - case 'B':{ - $this->y = $this->img_rb_y; - $this->x = $this->img_rb_x; - break; - } - case 'N':{ - $this->SetY($this->img_rb_y); - break; - } - default:{ - // restore pointer to starting position - $this->x = $gvars['x']; - $this->y = $gvars['y']; - $this->page = $gvars['page']; - $this->current_column = $gvars['current_column']; - $this->tMargin = $gvars['tMargin']; - $this->bMargin = $gvars['bMargin']; - $this->w = $gvars['w']; - $this->h = $gvars['h']; - $this->wPt = $gvars['wPt']; - $this->hPt = $gvars['hPt']; - $this->fwPt = $gvars['fwPt']; - $this->fhPt = $gvars['fhPt']; - break; - } - } - $this->endlinex = $this->img_rb_x; - // restore page break - $this->SetAutoPageBreak($page_break_mode, $page_break_margin); - $this->cell_padding = $cell_padding; - } - - /** - * Convert SVG transformation matrix to PDF. - * @param $tm (array) original SVG transformation matrix - * @return array transformation matrix - * @protected - * @since 5.0.000 (2010-05-02) - */ - protected function convertSVGtMatrix($tm) { - $a = $tm[0]; - $b = -$tm[1]; - $c = -$tm[2]; - $d = $tm[3]; - $e = $this->getHTMLUnitToUnits($tm[4], 1, $this->svgunit, false) * $this->k; - $f = -$this->getHTMLUnitToUnits($tm[5], 1, $this->svgunit, false) * $this->k; - $x = 0; - $y = $this->h * $this->k; - $e = ($x * (1 - $a)) - ($y * $c) + $e; - $f = ($y * (1 - $d)) - ($x * $b) + $f; - return array($a, $b, $c, $d, $e, $f); - } - - /** - * Apply SVG graphic transformation matrix. - * @param $tm (array) original SVG transformation matrix - * @protected - * @since 5.0.000 (2010-05-02) - */ - protected function SVGTransform($tm) { - $this->Transform($this->convertSVGtMatrix($tm)); - } - - /** - * Apply the requested SVG styles (*** TO BE COMPLETED ***) - * @param $svgstyle (array) array of SVG styles to apply - * @param $prevsvgstyle (array) array of previous SVG style - * @param $x (int) X origin of the bounding box - * @param $y (int) Y origin of the bounding box - * @param $w (int) width of the bounding box - * @param $h (int) height of the bounding box - * @param $clip_function (string) clip function - * @param $clip_params (array) array of parameters for clipping function - * @return object style - * @author Nicola Asuni - * @since 5.0.000 (2010-05-02) - * @protected - */ - protected function setSVGStyles($svgstyle, $prevsvgstyle, $x=0, $y=0, $w=1, $h=1, $clip_function='', $clip_params=array()) { - if ($this->state != 2) { - return; - } - $objstyle = ''; - $minlen = (0.01 / $this->k); // minimum acceptable length - if (!isset($svgstyle['opacity'])) { - return $objstyle; - } - // clip-path - $regs = array(); - if (preg_match('/url\([\s]*\#([^\)]*)\)/si', $svgstyle['clip-path'], $regs)) { - $clip_path = $this->svgclippaths[$regs[1]]; - foreach ($clip_path as $cp) { - $this->startSVGElementHandler('clip-path', $cp['name'], $cp['attribs'], $cp['tm']); - } - } - // opacity - if ($svgstyle['opacity'] != 1) { - $this->setAlpha($svgstyle['opacity'], 'Normal', $svgstyle['opacity'], false); - } - // color - $fill_color = TCPDF_COLORS::convertHTMLColorToDec($svgstyle['color'], $this->spot_colors); - $this->SetFillColorArray($fill_color); - // text color - $text_color = TCPDF_COLORS::convertHTMLColorToDec($svgstyle['text-color'], $this->spot_colors); - $this->SetTextColorArray($text_color); - // clip - if (preg_match('/rect\(([a-z0-9\-\.]*)[\s]*([a-z0-9\-\.]*)[\s]*([a-z0-9\-\.]*)[\s]*([a-z0-9\-\.]*)\)/si', $svgstyle['clip'], $regs)) { - $top = (isset($regs[1])?$this->getHTMLUnitToUnits($regs[1], 0, $this->svgunit, false):0); - $right = (isset($regs[2])?$this->getHTMLUnitToUnits($regs[2], 0, $this->svgunit, false):0); - $bottom = (isset($regs[3])?$this->getHTMLUnitToUnits($regs[3], 0, $this->svgunit, false):0); - $left = (isset($regs[4])?$this->getHTMLUnitToUnits($regs[4], 0, $this->svgunit, false):0); - $cx = $x + $left; - $cy = $y + $top; - $cw = $w - $left - $right; - $ch = $h - $top - $bottom; - if ($svgstyle['clip-rule'] == 'evenodd') { - $clip_rule = 'CNZ'; - } else { - $clip_rule = 'CEO'; - } - $this->Rect($cx, $cy, $cw, $ch, $clip_rule, array(), array()); - } - // fill - $regs = array(); - if (preg_match('/url\([\s]*\#([^\)]*)\)/si', $svgstyle['fill'], $regs)) { - // gradient - $gradient = $this->svggradients[$regs[1]]; - if (isset($gradient['xref'])) { - // reference to another gradient definition - $newgradient = $this->svggradients[$gradient['xref']]; - $newgradient['coords'] = $gradient['coords']; - $newgradient['mode'] = $gradient['mode']; - $newgradient['type'] = $gradient['type']; - $newgradient['gradientUnits'] = $gradient['gradientUnits']; - if (isset($gradient['gradientTransform'])) { - $newgradient['gradientTransform'] = $gradient['gradientTransform']; - } - $gradient = $newgradient; - } - //save current Graphic State - $this->_outSaveGraphicsState(); - //set clipping area - if (!empty($clip_function) AND method_exists($this, $clip_function)) { - $bbox = call_user_func_array(array($this, $clip_function), $clip_params); - if ((!isset($gradient['type']) OR ($gradient['type'] != 3)) AND is_array($bbox) AND (count($bbox) == 4)) { - list($x, $y, $w, $h) = $bbox; - } - } - if ($gradient['mode'] == 'measure') { - if (!isset($gradient['coords'][4])) { - $gradient['coords'][4] = 0.5; - } - if (isset($gradient['gradientTransform']) AND !empty($gradient['gradientTransform'])) { - $gtm = $gradient['gradientTransform']; - // apply transformation matrix - $xa = ($gtm[0] * $gradient['coords'][0]) + ($gtm[2] * $gradient['coords'][1]) + $gtm[4]; - $ya = ($gtm[1] * $gradient['coords'][0]) + ($gtm[3] * $gradient['coords'][1]) + $gtm[5]; - $xb = ($gtm[0] * $gradient['coords'][2]) + ($gtm[2] * $gradient['coords'][3]) + $gtm[4]; - $yb = ($gtm[1] * $gradient['coords'][2]) + ($gtm[3] * $gradient['coords'][3]) + $gtm[5]; - $r = sqrt(pow(($gtm[0] * $gradient['coords'][4]), 2) + pow(($gtm[1] * $gradient['coords'][4]), 2)); - $gradient['coords'][0] = $xa; - $gradient['coords'][1] = $ya; - $gradient['coords'][2] = $xb; - $gradient['coords'][3] = $yb; - $gradient['coords'][4] = $r; - } - // convert SVG coordinates to user units - $gradient['coords'][0] = $this->getHTMLUnitToUnits($gradient['coords'][0], 0, $this->svgunit, false); - $gradient['coords'][1] = $this->getHTMLUnitToUnits($gradient['coords'][1], 0, $this->svgunit, false); - $gradient['coords'][2] = $this->getHTMLUnitToUnits($gradient['coords'][2], 0, $this->svgunit, false); - $gradient['coords'][3] = $this->getHTMLUnitToUnits($gradient['coords'][3], 0, $this->svgunit, false); - $gradient['coords'][4] = $this->getHTMLUnitToUnits($gradient['coords'][4], 0, $this->svgunit, false); - if ($w <= $minlen) { - $w = $minlen; - } - if ($h <= $minlen) { - $h = $minlen; - } - // shift units - if ($gradient['gradientUnits'] == 'objectBoundingBox') { - // convert to SVG coordinate system - $gradient['coords'][0] += $x; - $gradient['coords'][1] += $y; - $gradient['coords'][2] += $x; - $gradient['coords'][3] += $y; - } - // calculate percentages - $gradient['coords'][0] = (($gradient['coords'][0] - $x) / $w); - $gradient['coords'][1] = (($gradient['coords'][1] - $y) / $h); - $gradient['coords'][2] = (($gradient['coords'][2] - $x) / $w); - $gradient['coords'][3] = (($gradient['coords'][3] - $y) / $h); - $gradient['coords'][4] /= $w; - } elseif ($gradient['mode'] == 'percentage') { - foreach($gradient['coords'] as $key => $val) { - $gradient['coords'][$key] = (intval($val) / 100); - if ($val < 0) { - $gradient['coords'][$key] = 0; - } elseif ($val > 1) { - $gradient['coords'][$key] = 1; - } - } - } - if (($gradient['type'] == 2) AND ($gradient['coords'][0] == $gradient['coords'][2]) AND ($gradient['coords'][1] == $gradient['coords'][3])) { - // single color (no shading) - $gradient['coords'][0] = 1; - $gradient['coords'][1] = 0; - $gradient['coords'][2] = 0.999; - $gradient['coords'][3] = 0; - } - // swap Y coordinates - $tmp = $gradient['coords'][1]; - $gradient['coords'][1] = $gradient['coords'][3]; - $gradient['coords'][3] = $tmp; - // set transformation map for gradient - $cy = ($this->h - $y); - if ($gradient['type'] == 3) { - // circular gradient - $cy -= ($gradient['coords'][1] * ($w + $h)); - $h = $w = max($w, $h); - } else { - $cy -= $h; - } - $this->_out(sprintf('%F 0 0 %F %F %F cm', ($w * $this->k), ($h * $this->k), ($x * $this->k), ($cy * $this->k))); - if (count($gradient['stops']) > 1) { - $this->Gradient($gradient['type'], $gradient['coords'], $gradient['stops'], array(), false); - } - } elseif ($svgstyle['fill'] != 'none') { - $fill_color = TCPDF_COLORS::convertHTMLColorToDec($svgstyle['fill'], $this->spot_colors); - if ($svgstyle['fill-opacity'] != 1) { - $this->setAlpha($this->alpha['CA'], 'Normal', $svgstyle['fill-opacity'], false); - } - $this->SetFillColorArray($fill_color); - if ($svgstyle['fill-rule'] == 'evenodd') { - $objstyle .= 'F*'; - } else { - $objstyle .= 'F'; - } - } - // stroke - if ($svgstyle['stroke'] != 'none') { - if ($svgstyle['stroke-opacity'] != 1) { - $this->setAlpha($svgstyle['stroke-opacity'], 'Normal', $this->alpha['ca'], false); - } elseif (preg_match('/rgba\(\d+%?,\s*\d+%?,\s*\d+%?,\s*(\d+(?:\.\d+)?)\)/i', $svgstyle['stroke'], $rgba_matches)) { - $this->setAlpha($rgba_matches[1], 'Normal', $this->alpha['ca'], false); - } - $stroke_style = array( - 'color' => TCPDF_COLORS::convertHTMLColorToDec($svgstyle['stroke'], $this->spot_colors), - 'width' => $this->getHTMLUnitToUnits($svgstyle['stroke-width'], 0, $this->svgunit, false), - 'cap' => $svgstyle['stroke-linecap'], - 'join' => $svgstyle['stroke-linejoin'] - ); - if (isset($svgstyle['stroke-dasharray']) AND !empty($svgstyle['stroke-dasharray']) AND ($svgstyle['stroke-dasharray'] != 'none')) { - $stroke_style['dash'] = $svgstyle['stroke-dasharray']; - } - $this->SetLineStyle($stroke_style); - $objstyle .= 'D'; - } - // font - $regs = array(); - if (!empty($svgstyle['font'])) { - if (preg_match('/font-family[\s]*:[\s]*([^\;\"]*)/si', $svgstyle['font'], $regs)) { - $font_family = $this->getFontFamilyName($regs[1]); - } else { - $font_family = $svgstyle['font-family']; - } - if (preg_match('/font-size[\s]*:[\s]*([^\s\;\"]*)/si', $svgstyle['font'], $regs)) { - $font_size = trim($regs[1]); - } else { - $font_size = $svgstyle['font-size']; - } - if (preg_match('/font-style[\s]*:[\s]*([^\s\;\"]*)/si', $svgstyle['font'], $regs)) { - $font_style = trim($regs[1]); - } else { - $font_style = $svgstyle['font-style']; - } - if (preg_match('/font-weight[\s]*:[\s]*([^\s\;\"]*)/si', $svgstyle['font'], $regs)) { - $font_weight = trim($regs[1]); - } else { - $font_weight = $svgstyle['font-weight']; - } - if (preg_match('/font-stretch[\s]*:[\s]*([^\s\;\"]*)/si', $svgstyle['font'], $regs)) { - $font_stretch = trim($regs[1]); - } else { - $font_stretch = $svgstyle['font-stretch']; - } - if (preg_match('/letter-spacing[\s]*:[\s]*([^\s\;\"]*)/si', $svgstyle['font'], $regs)) { - $font_spacing = trim($regs[1]); - } else { - $font_spacing = $svgstyle['letter-spacing']; - } - } else { - $font_family = $this->getFontFamilyName($svgstyle['font-family']); - $font_size = $svgstyle['font-size']; - $font_style = $svgstyle['font-style']; - $font_weight = $svgstyle['font-weight']; - $font_stretch = $svgstyle['font-stretch']; - $font_spacing = $svgstyle['letter-spacing']; - } - $font_size = $this->getHTMLFontUnits($font_size, $this->svgstyles[0]['font-size'], $prevsvgstyle['font-size'], $this->svgunit); - $font_stretch = $this->getCSSFontStretching($font_stretch, $svgstyle['font-stretch']); - $font_spacing = $this->getCSSFontSpacing($font_spacing, $svgstyle['letter-spacing']); - switch ($font_style) { - case 'italic': { - $font_style = 'I'; - break; - } - case 'oblique': { - $font_style = 'I'; - break; - } - default: - case 'normal': { - $font_style = ''; - break; - } - } - switch ($font_weight) { - case 'bold': - case 'bolder': { - $font_style .= 'B'; - break; - } - case 'normal': { - if ((substr($font_family, -1) == 'I') AND (substr($font_family, -2, 1) == 'B')) { - $font_family = substr($font_family, 0, -2).'I'; - } elseif (substr($font_family, -1) == 'B') { - $font_family = substr($font_family, 0, -1); - } - break; - } - } - switch ($svgstyle['text-decoration']) { - case 'underline': { - $font_style .= 'U'; - break; - } - case 'overline': { - $font_style .= 'O'; - break; - } - case 'line-through': { - $font_style .= 'D'; - break; - } - default: - case 'none': { - break; - } - } - $this->SetFont($font_family, $font_style, $font_size); - $this->setFontStretching($font_stretch); - $this->setFontSpacing($font_spacing); - return $objstyle; - } - - /** - * Draws an SVG path - * @param $d (string) attribute d of the path SVG element - * @param $style (string) Style of rendering. Possible values are: - *
          - *
        • D or empty string: Draw (default).
        • - *
        • F: Fill.
        • - *
        • F*: Fill using the even-odd rule to determine which regions lie inside the clipping path.
        • - *
        • DF or FD: Draw and fill.
        • - *
        • DF* or FD*: Draw and fill using the even-odd rule to determine which regions lie inside the clipping path.
        • - *
        • CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).
        • - *
        • CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).
        • - *
        - * @return array of container box measures (x, y, w, h) - * @author Nicola Asuni - * @since 5.0.000 (2010-05-02) - * @protected - */ - protected function SVGPath($d, $style='') { - if ($this->state != 2) { - return; - } - // set fill/stroke style - $op = TCPDF_STATIC::getPathPaintOperator($style, ''); - if (empty($op)) { - return; - } - $paths = array(); - $d = preg_replace('/([0-9ACHLMQSTVZ])([\-\+])/si', '\\1 \\2', $d); - preg_match_all('/([ACHLMQSTVZ])[\s]*([^ACHLMQSTVZ\"]*)/si', $d, $paths, PREG_SET_ORDER); - $x = 0; - $y = 0; - $x1 = 0; - $y1 = 0; - $x2 = 0; - $y2 = 0; - $xmin = 2147483647; - $xmax = 0; - $ymin = 2147483647; - $ymax = 0; - $relcoord = false; - $minlen = (0.01 / $this->k); // minimum acceptable length (3 point) - $firstcmd = true; // used to print first point - // draw curve pieces - foreach ($paths as $key => $val) { - // get curve type - $cmd = trim($val[1]); - if (strtolower($cmd) == $cmd) { - // use relative coordinated instead of absolute - $relcoord = true; - $xoffset = $x; - $yoffset = $y; - } else { - $relcoord = false; - $xoffset = 0; - $yoffset = 0; - } - $params = array(); - if (isset($val[2])) { - // get curve parameters - $rawparams = preg_split('/([\,\s]+)/si', trim($val[2])); - $params = array(); - foreach ($rawparams as $ck => $cp) { - $params[$ck] = $this->getHTMLUnitToUnits($cp, 0, $this->svgunit, false); - if (abs($params[$ck]) < $minlen) { - // approximate little values to zero - $params[$ck] = 0; - } - } - } - // store current origin point - $x0 = $x; - $y0 = $y; - switch (strtoupper($cmd)) { - case 'M': { // moveto - foreach ($params as $ck => $cp) { - if (($ck % 2) == 0) { - $x = $cp + $xoffset; - } else { - $y = $cp + $yoffset; - if ($firstcmd OR (abs($x0 - $x) >= $minlen) OR (abs($y0 - $y) >= $minlen)) { - if ($ck == 1) { - $this->_outPoint($x, $y); - $firstcmd = false; - } else { - $this->_outLine($x, $y); - } - $x0 = $x; - $y0 = $y; - } - $xmin = min($xmin, $x); - $ymin = min($ymin, $y); - $xmax = max($xmax, $x); - $ymax = max($ymax, $y); - if ($relcoord) { - $xoffset = $x; - $yoffset = $y; - } - } - } - break; - } - case 'L': { // lineto - foreach ($params as $ck => $cp) { - if (($ck % 2) == 0) { - $x = $cp + $xoffset; - } else { - $y = $cp + $yoffset; - if ((abs($x0 - $x) >= $minlen) OR (abs($y0 - $y) >= $minlen)) { - $this->_outLine($x, $y); - $x0 = $x; - $y0 = $y; - } - $xmin = min($xmin, $x); - $ymin = min($ymin, $y); - $xmax = max($xmax, $x); - $ymax = max($ymax, $y); - if ($relcoord) { - $xoffset = $x; - $yoffset = $y; - } - } - } - break; - } - case 'H': { // horizontal lineto - foreach ($params as $ck => $cp) { - $x = $cp + $xoffset; - if ((abs($x0 - $x) >= $minlen) OR (abs($y0 - $y) >= $minlen)) { - $this->_outLine($x, $y); - $x0 = $x; - $y0 = $y; - } - $xmin = min($xmin, $x); - $xmax = max($xmax, $x); - if ($relcoord) { - $xoffset = $x; - } - } - break; - } - case 'V': { // vertical lineto - foreach ($params as $ck => $cp) { - $y = $cp + $yoffset; - if ((abs($x0 - $x) >= $minlen) OR (abs($y0 - $y) >= $minlen)) { - $this->_outLine($x, $y); - $x0 = $x; - $y0 = $y; - } - $ymin = min($ymin, $y); - $ymax = max($ymax, $y); - if ($relcoord) { - $yoffset = $y; - } - } - break; - } - case 'C': { // curveto - foreach ($params as $ck => $cp) { - $params[$ck] = $cp; - if ((($ck + 1) % 6) == 0) { - $x1 = $params[($ck - 5)] + $xoffset; - $y1 = $params[($ck - 4)] + $yoffset; - $x2 = $params[($ck - 3)] + $xoffset; - $y2 = $params[($ck - 2)] + $yoffset; - $x = $params[($ck - 1)] + $xoffset; - $y = $params[($ck)] + $yoffset; - $this->_outCurve($x1, $y1, $x2, $y2, $x, $y); - $xmin = min($xmin, $x, $x1, $x2); - $ymin = min($ymin, $y, $y1, $y2); - $xmax = max($xmax, $x, $x1, $x2); - $ymax = max($ymax, $y, $y1, $y2); - if ($relcoord) { - $xoffset = $x; - $yoffset = $y; - } - } - } - break; - } - case 'S': { // shorthand/smooth curveto - foreach ($params as $ck => $cp) { - $params[$ck] = $cp; - if ((($ck + 1) % 4) == 0) { - if (($key > 0) AND ((strtoupper($paths[($key - 1)][1]) == 'C') OR (strtoupper($paths[($key - 1)][1]) == 'S'))) { - $x1 = (2 * $x) - $x2; - $y1 = (2 * $y) - $y2; - } else { - $x1 = $x; - $y1 = $y; - } - $x2 = $params[($ck - 3)] + $xoffset; - $y2 = $params[($ck - 2)] + $yoffset; - $x = $params[($ck - 1)] + $xoffset; - $y = $params[($ck)] + $yoffset; - $this->_outCurve($x1, $y1, $x2, $y2, $x, $y); - $xmin = min($xmin, $x, $x1, $x2); - $ymin = min($ymin, $y, $y1, $y2); - $xmax = max($xmax, $x, $x1, $x2); - $ymax = max($ymax, $y, $y1, $y2); - if ($relcoord) { - $xoffset = $x; - $yoffset = $y; - } - } - } - break; - } - case 'Q': { // quadratic Bezier curveto - foreach ($params as $ck => $cp) { - $params[$ck] = $cp; - if ((($ck + 1) % 4) == 0) { - // convert quadratic points to cubic points - $x1 = $params[($ck - 3)] + $xoffset; - $y1 = $params[($ck - 2)] + $yoffset; - $xa = ($x + (2 * $x1)) / 3; - $ya = ($y + (2 * $y1)) / 3; - $x = $params[($ck - 1)] + $xoffset; - $y = $params[($ck)] + $yoffset; - $xb = ($x + (2 * $x1)) / 3; - $yb = ($y + (2 * $y1)) / 3; - $this->_outCurve($xa, $ya, $xb, $yb, $x, $y); - $xmin = min($xmin, $x, $xa, $xb); - $ymin = min($ymin, $y, $ya, $yb); - $xmax = max($xmax, $x, $xa, $xb); - $ymax = max($ymax, $y, $ya, $yb); - if ($relcoord) { - $xoffset = $x; - $yoffset = $y; - } - } - } - break; - } - case 'T': { // shorthand/smooth quadratic Bezier curveto - foreach ($params as $ck => $cp) { - $params[$ck] = $cp; - if (($ck % 2) != 0) { - if (($key > 0) AND ((strtoupper($paths[($key - 1)][1]) == 'Q') OR (strtoupper($paths[($key - 1)][1]) == 'T'))) { - $x1 = (2 * $x) - $x1; - $y1 = (2 * $y) - $y1; - } else { - $x1 = $x; - $y1 = $y; - } - // convert quadratic points to cubic points - $xa = ($x + (2 * $x1)) / 3; - $ya = ($y + (2 * $y1)) / 3; - $x = $params[($ck - 1)] + $xoffset; - $y = $params[($ck)] + $yoffset; - $xb = ($x + (2 * $x1)) / 3; - $yb = ($y + (2 * $y1)) / 3; - $this->_outCurve($xa, $ya, $xb, $yb, $x, $y); - $xmin = min($xmin, $x, $xa, $xb); - $ymin = min($ymin, $y, $ya, $yb); - $xmax = max($xmax, $x, $xa, $xb); - $ymax = max($ymax, $y, $ya, $yb); - if ($relcoord) { - $xoffset = $x; - $yoffset = $y; - } - } - } - break; - } - case 'A': { // elliptical arc - foreach ($params as $ck => $cp) { - $params[$ck] = $cp; - if ((($ck + 1) % 7) == 0) { - $x0 = $x; - $y0 = $y; - $rx = abs($params[($ck - 6)]); - $ry = abs($params[($ck - 5)]); - $ang = -$rawparams[($ck - 4)]; - $angle = deg2rad($ang); - $fa = $rawparams[($ck - 3)]; // large-arc-flag - $fs = $rawparams[($ck - 2)]; // sweep-flag - $x = $params[($ck - 1)] + $xoffset; - $y = $params[$ck] + $yoffset; - if ((abs($x0 - $x) < $minlen) AND (abs($y0 - $y) < $minlen)) { - // endpoints are almost identical - $xmin = min($xmin, $x); - $ymin = min($ymin, $y); - $xmax = max($xmax, $x); - $ymax = max($ymax, $y); - } else { - $cos_ang = cos($angle); - $sin_ang = sin($angle); - $a = (($x0 - $x) / 2); - $b = (($y0 - $y) / 2); - $xa = ($a * $cos_ang) - ($b * $sin_ang); - $ya = ($a * $sin_ang) + ($b * $cos_ang); - $rx2 = $rx * $rx; - $ry2 = $ry * $ry; - $xa2 = $xa * $xa; - $ya2 = $ya * $ya; - $delta = ($xa2 / $rx2) + ($ya2 / $ry2); - if ($delta > 1) { - $rx *= sqrt($delta); - $ry *= sqrt($delta); - $rx2 = $rx * $rx; - $ry2 = $ry * $ry; - } - $numerator = (($rx2 * $ry2) - ($rx2 * $ya2) - ($ry2 * $xa2)); - if ($numerator < 0) { - $root = 0; - } else { - $root = sqrt($numerator / (($rx2 * $ya2) + ($ry2 * $xa2))); - } - if ($fa == $fs){ - $root *= -1; - } - $cax = $root * (($rx * $ya) / $ry); - $cay = -$root * (($ry * $xa) / $rx); - // coordinates of ellipse center - $cx = ($cax * $cos_ang) - ($cay * $sin_ang) + (($x0 + $x) / 2); - $cy = ($cax * $sin_ang) + ($cay * $cos_ang) + (($y0 + $y) / 2); - // get angles - $angs = TCPDF_STATIC::getVectorsAngle(1, 0, (($xa - $cax) / $rx), (($cay - $ya) / $ry)); - $dang = TCPDF_STATIC::getVectorsAngle((($xa - $cax) / $rx), (($ya - $cay) / $ry), ((-$xa - $cax) / $rx), ((-$ya - $cay) / $ry)); - if (($fs == 0) AND ($dang > 0)) { - $dang -= (2 * M_PI); - } elseif (($fs == 1) AND ($dang < 0)) { - $dang += (2 * M_PI); - } - $angf = $angs - $dang; - if ((($fs == 0) AND ($angs > $angf)) OR (($fs == 1) AND ($angs < $angf))) { - // reverse angles - $tmp = $angs; - $angs = $angf; - $angf = $tmp; - } - $angs = round(rad2deg($angs), 6); - $angf = round(rad2deg($angf), 6); - // covent angles to positive values - if (($angs < 0) AND ($angf < 0)) { - $angs += 360; - $angf += 360; - } - $pie = false; - if (($key == 0) AND (isset($paths[($key + 1)][1])) AND (trim($paths[($key + 1)][1]) == 'z')) { - $pie = true; - } - list($axmin, $aymin, $axmax, $aymax) = $this->_outellipticalarc($cx, $cy, $rx, $ry, $ang, $angs, $angf, $pie, 2, false, ($fs == 0), true); - $xmin = min($xmin, $x, $axmin); - $ymin = min($ymin, $y, $aymin); - $xmax = max($xmax, $x, $axmax); - $ymax = max($ymax, $y, $aymax); - } - if ($relcoord) { - $xoffset = $x; - $yoffset = $y; - } - } - } - break; - } - case 'Z': { - $this->_out('h'); - break; - } - } - $firstcmd = false; - } // end foreach - if (!empty($op)) { - $this->_out($op); - } - return array($xmin, $ymin, ($xmax - $xmin), ($ymax - $ymin)); - } - - /** - * Return the tag name without the namespace - * @param $name (string) Tag name - * @protected - */ - protected function removeTagNamespace($name) { - if(strpos($name, ':') !== false) { - $parts = explode(':', $name); - return $parts[(sizeof($parts) - 1)]; - } - return $name; - } - - /** - * Sets the opening SVG element handler function for the XML parser. (*** TO BE COMPLETED ***) - * @param $parser (resource) The first parameter, parser, is a reference to the XML parser calling the handler. - * @param $name (string) The second parameter, name, contains the name of the element for which this handler is called. If case-folding is in effect for this parser, the element name will be in uppercase letters. - * @param $attribs (array) The third parameter, attribs, contains an associative array with the element's attributes (if any). The keys of this array are the attribute names, the values are the attribute values. Attribute names are case-folded on the same criteria as element names. Attribute values are not case-folded. The original order of the attributes can be retrieved by walking through attribs the normal way, using each(). The first key in the array was the first attribute, and so on. - * @param $ctm (array) tranformation matrix for clipping mode (starting transformation matrix). - * @author Nicola Asuni - * @since 5.0.000 (2010-05-02) - * @protected - */ - protected function startSVGElementHandler($parser, $name, $attribs, $ctm=array()) { - $name = $this->removeTagNamespace($name); - // check if we are in clip mode - if ($this->svgclipmode) { - $this->svgclippaths[$this->svgclipid][] = array('name' => $name, 'attribs' => $attribs, 'tm' => $this->svgcliptm[$this->svgclipid]); - return; - } - if ($this->svgdefsmode AND !in_array($name, array('clipPath', 'linearGradient', 'radialGradient', 'stop'))) { - if (isset($attribs['id'])) { - $attribs['child_elements'] = array(); - $this->svgdefs[$attribs['id']] = array('name' => $name, 'attribs' => $attribs); - return; - } - if (end($this->svgdefs) !== FALSE) { - $last_svgdefs_id = key($this->svgdefs); - if (isset($this->svgdefs[$last_svgdefs_id]['attribs']['child_elements'])) { - $attribs['id'] = 'DF_'.(count($this->svgdefs[$last_svgdefs_id]['attribs']['child_elements']) + 1); - $this->svgdefs[$last_svgdefs_id]['attribs']['child_elements'][$attribs['id']] = array('name' => $name, 'attribs' => $attribs); - return; - } - } - return; - } - $clipping = false; - if ($parser == 'clip-path') { - // set clipping mode - $clipping = true; - } - // get styling properties - $prev_svgstyle = $this->svgstyles[max(0,(count($this->svgstyles) - 1))]; // previous style - $svgstyle = $this->svgstyles[0]; // set default style - if ($clipping AND !isset($attribs['fill']) AND (!isset($attribs['style']) OR (!preg_match('/[;\"\s]{1}fill[\s]*:[\s]*([^;\"]*)/si', $attribs['style'], $attrval)))) { - // default fill attribute for clipping - $attribs['fill'] = 'none'; - } - if (isset($attribs['style']) AND !TCPDF_STATIC::empty_string($attribs['style']) AND ($attribs['style'][0] != ';')) { - // fix style for regular expression - $attribs['style'] = ';'.$attribs['style']; - } - foreach ($prev_svgstyle as $key => $val) { - if (in_array($key, TCPDF_IMAGES::$svginheritprop)) { - // inherit previous value - $svgstyle[$key] = $val; - } - if (isset($attribs[$key]) AND !TCPDF_STATIC::empty_string($attribs[$key])) { - // specific attribute settings - if ($attribs[$key] == 'inherit') { - $svgstyle[$key] = $val; - } else { - $svgstyle[$key] = $attribs[$key]; - } - } elseif (isset($attribs['style']) AND !TCPDF_STATIC::empty_string($attribs['style'])) { - // CSS style syntax - $attrval = array(); - if (preg_match('/[;\"\s]{1}'.$key.'[\s]*:[\s]*([^;\"]*)/si', $attribs['style'], $attrval) AND isset($attrval[1])) { - if ($attrval[1] == 'inherit') { - $svgstyle[$key] = $val; - } else { - $svgstyle[$key] = $attrval[1]; - } - } - } - } - // transformation matrix - if (!empty($ctm)) { - $tm = $ctm; - } else { - $tm = array(1,0,0,1,0,0); - } - if (isset($attribs['transform']) AND !empty($attribs['transform'])) { - $tm = TCPDF_STATIC::getTransformationMatrixProduct($tm, TCPDF_STATIC::getSVGTransformMatrix($attribs['transform'])); - } - $svgstyle['transfmatrix'] = $tm; - $invisible = false; - if (($svgstyle['visibility'] == 'hidden') OR ($svgstyle['visibility'] == 'collapse') OR ($svgstyle['display'] == 'none')) { - // the current graphics element is invisible (nothing is painted) - $invisible = true; - } - // process tag - switch($name) { - case 'defs': { - $this->svgdefsmode = true; - break; - } - // clipPath - case 'clipPath': { - if ($invisible) { - break; - } - $this->svgclipmode = true; - if (!isset($attribs['id'])) { - $attribs['id'] = 'CP_'.(count($this->svgcliptm) + 1); - } - $this->svgclipid = $attribs['id']; - $this->svgclippaths[$this->svgclipid] = array(); - $this->svgcliptm[$this->svgclipid] = $tm; - break; - } - case 'svg': { - // start of SVG object - if(++$this->svg_tag_depth <= 1) { - break; - } - // inner SVG - array_push($this->svgstyles, $svgstyle); - $this->StartTransform(); - $svgX = (isset($attribs['x'])?$attribs['x']:0); - $svgY = (isset($attribs['y'])?$attribs['y']:0); - $svgW = (isset($attribs['width'])?$attribs['width']:0); - $svgH = (isset($attribs['height'])?$attribs['height']:0); - // set x, y position using transform matrix - $tm = TCPDF_STATIC::getTransformationMatrixProduct($tm, array( 1, 0, 0, 1, $svgX, $svgY)); - $this->SVGTransform($tm); - // set clipping for width and height - $x = 0; - $y = 0; - $w = (isset($attribs['width'])?$this->getHTMLUnitToUnits($attribs['width'], 0, $this->svgunit, false):$this->w); - $h = (isset($attribs['height'])?$this->getHTMLUnitToUnits($attribs['height'], 0, $this->svgunit, false):$this->h); - // draw clipping rect - $this->Rect($x, $y, $w, $h, 'CNZ', array(), array()); - // parse viewbox, calculate extra transformation matrix - if (isset($attribs['viewBox'])) { - $tmp = array(); - preg_match_all("/[0-9]+/", $attribs['viewBox'], $tmp); - $tmp = $tmp[0]; - if (sizeof($tmp) == 4) { - $vx = $tmp[0]; - $vy = $tmp[1]; - $vw = $tmp[2]; - $vh = $tmp[3]; - // get aspect ratio - $tmp = array(); - $aspectX = 'xMid'; - $aspectY = 'YMid'; - $fit = 'meet'; - if (isset($attribs['preserveAspectRatio'])) { - if($attribs['preserveAspectRatio'] == 'none') { - $fit = 'none'; - } else { - preg_match_all('/[a-zA-Z]+/', $attribs['preserveAspectRatio'], $tmp); - $tmp = $tmp[0]; - if ((sizeof($tmp) == 2) AND (strlen($tmp[0]) == 8) AND (in_array($tmp[1], array('meet', 'slice', 'none')))) { - $aspectX = substr($tmp[0], 0, 4); - $aspectY = substr($tmp[0], 4, 4); - $fit = $tmp[1]; - } - } - } - $wr = ($svgW / $vw); - $hr = ($svgH / $vh); - $ax = $ay = 0; - if ((($fit == 'meet') AND ($hr < $wr)) OR (($fit == 'slice') AND ($hr > $wr))) { - if ($aspectX == 'xMax') { - $ax = (($vw * ($wr / $hr)) - $vw); - } - if ($aspectX == 'xMid') { - $ax = ((($vw * ($wr / $hr)) - $vw) / 2); - } - $wr = $hr; - } elseif ((($fit == 'meet') AND ($hr > $wr)) OR (($fit == 'slice') AND ($hr < $wr))) { - if ($aspectY == 'YMax') { - $ay = (($vh * ($hr / $wr)) - $vh); - } - if ($aspectY == 'YMid') { - $ay = ((($vh * ($hr / $wr)) - $vh) / 2); - } - $hr = $wr; - } - $newtm = array($wr, 0, 0, $hr, (($wr * ($ax - $vx)) - $svgX), (($hr * ($ay - $vy)) - $svgY)); - $tm = TCPDF_STATIC::getTransformationMatrixProduct($tm, $newtm); - $this->SVGTransform($tm); - } - } - $this->setSVGStyles($svgstyle, $prev_svgstyle); - break; - } - case 'g': { - // group together related graphics elements - array_push($this->svgstyles, $svgstyle); - $this->StartTransform(); - $x = (isset($attribs['x'])?$attribs['x']:0); - $y = (isset($attribs['y'])?$attribs['y']:0); - $w = 1;//(isset($attribs['width'])?$attribs['width']:1); - $h = 1;//(isset($attribs['height'])?$attribs['height']:1); - $tm = TCPDF_STATIC::getTransformationMatrixProduct($tm, array($w, 0, 0, $h, $x, $y)); - $this->SVGTransform($tm); - $this->setSVGStyles($svgstyle, $prev_svgstyle); - break; - } - case 'linearGradient': { - if ($this->pdfa_mode) { - break; - } - if (!isset($attribs['id'])) { - $attribs['id'] = 'GR_'.(count($this->svggradients) + 1); - } - $this->svggradientid = $attribs['id']; - $this->svggradients[$this->svggradientid] = array(); - $this->svggradients[$this->svggradientid]['type'] = 2; - $this->svggradients[$this->svggradientid]['stops'] = array(); - if (isset($attribs['gradientUnits'])) { - $this->svggradients[$this->svggradientid]['gradientUnits'] = $attribs['gradientUnits']; - } else { - $this->svggradients[$this->svggradientid]['gradientUnits'] = 'objectBoundingBox'; - } - //$attribs['spreadMethod'] - if (((!isset($attribs['x1'])) AND (!isset($attribs['y1'])) AND (!isset($attribs['x2'])) AND (!isset($attribs['y2']))) - OR ((isset($attribs['x1']) AND (substr($attribs['x1'], -1) == '%')) - OR (isset($attribs['y1']) AND (substr($attribs['y1'], -1) == '%')) - OR (isset($attribs['x2']) AND (substr($attribs['x2'], -1) == '%')) - OR (isset($attribs['y2']) AND (substr($attribs['y2'], -1) == '%')))) { - $this->svggradients[$this->svggradientid]['mode'] = 'percentage'; - } else { - $this->svggradients[$this->svggradientid]['mode'] = 'measure'; - } - $x1 = (isset($attribs['x1'])?$attribs['x1']:'0'); - $y1 = (isset($attribs['y1'])?$attribs['y1']:'0'); - $x2 = (isset($attribs['x2'])?$attribs['x2']:'100'); - $y2 = (isset($attribs['y2'])?$attribs['y2']:'0'); - if (isset($attribs['gradientTransform'])) { - $this->svggradients[$this->svggradientid]['gradientTransform'] = TCPDF_STATIC::getSVGTransformMatrix($attribs['gradientTransform']); - } - $this->svggradients[$this->svggradientid]['coords'] = array($x1, $y1, $x2, $y2); - if (isset($attribs['xlink:href']) AND !empty($attribs['xlink:href'])) { - // gradient is defined on another place - $this->svggradients[$this->svggradientid]['xref'] = substr($attribs['xlink:href'], 1); - } - break; - } - case 'radialGradient': { - if ($this->pdfa_mode) { - break; - } - if (!isset($attribs['id'])) { - $attribs['id'] = 'GR_'.(count($this->svggradients) + 1); - } - $this->svggradientid = $attribs['id']; - $this->svggradients[$this->svggradientid] = array(); - $this->svggradients[$this->svggradientid]['type'] = 3; - $this->svggradients[$this->svggradientid]['stops'] = array(); - if (isset($attribs['gradientUnits'])) { - $this->svggradients[$this->svggradientid]['gradientUnits'] = $attribs['gradientUnits']; - } else { - $this->svggradients[$this->svggradientid]['gradientUnits'] = 'objectBoundingBox'; - } - //$attribs['spreadMethod'] - if (((!isset($attribs['cx'])) AND (!isset($attribs['cy']))) - OR ((isset($attribs['cx']) AND (substr($attribs['cx'], -1) == '%')) - OR (isset($attribs['cy']) AND (substr($attribs['cy'], -1) == '%')))) { - $this->svggradients[$this->svggradientid]['mode'] = 'percentage'; - } elseif (isset($attribs['r']) AND is_numeric($attribs['r']) AND ($attribs['r']) <= 1) { - $this->svggradients[$this->svggradientid]['mode'] = 'ratio'; - } else { - $this->svggradients[$this->svggradientid]['mode'] = 'measure'; - } - $cx = (isset($attribs['cx']) ? $attribs['cx'] : 0.5); - $cy = (isset($attribs['cy']) ? $attribs['cy'] : 0.5); - $fx = (isset($attribs['fx']) ? $attribs['fx'] : $cx); - $fy = (isset($attribs['fy']) ? $attribs['fy'] : $cy); - $r = (isset($attribs['r']) ? $attribs['r'] : 0.5); - if (isset($attribs['gradientTransform'])) { - $this->svggradients[$this->svggradientid]['gradientTransform'] = TCPDF_STATIC::getSVGTransformMatrix($attribs['gradientTransform']); - } - $this->svggradients[$this->svggradientid]['coords'] = array($cx, $cy, $fx, $fy, $r); - if (isset($attribs['xlink:href']) AND !empty($attribs['xlink:href'])) { - // gradient is defined on another place - $this->svggradients[$this->svggradientid]['xref'] = substr($attribs['xlink:href'], 1); - } - break; - } - case 'stop': { - // gradient stops - if (substr($attribs['offset'], -1) == '%') { - $offset = floatval(substr($attribs['offset'], -1)) / 100; - } else { - $offset = floatval($attribs['offset']); - if ($offset > 1) { - $offset /= 100; - } - } - $stop_color = isset($svgstyle['stop-color'])?TCPDF_COLORS::convertHTMLColorToDec($svgstyle['stop-color'], $this->spot_colors):'black'; - $opacity = isset($svgstyle['stop-opacity'])?$svgstyle['stop-opacity']:1; - $this->svggradients[$this->svggradientid]['stops'][] = array('offset' => $offset, 'color' => $stop_color, 'opacity' => $opacity); - break; - } - // paths - case 'path': { - if ($invisible) { - break; - } - if (isset($attribs['d'])) { - $d = trim($attribs['d']); - if (!empty($d)) { - $x = (isset($attribs['x'])?$attribs['x']:0); - $y = (isset($attribs['y'])?$attribs['y']:0); - $w = (isset($attribs['width'])?$attribs['width']:1); - $h = (isset($attribs['height'])?$attribs['height']:1); - $tm = TCPDF_STATIC::getTransformationMatrixProduct($tm, array($w, 0, 0, $h, $x, $y)); - if ($clipping) { - $this->SVGTransform($tm); - $this->SVGPath($d, 'CNZ'); - } else { - $this->StartTransform(); - $this->SVGTransform($tm); - $obstyle = $this->setSVGStyles($svgstyle, $prev_svgstyle, $x, $y, $w, $h, 'SVGPath', array($d, 'CNZ')); - if (!empty($obstyle)) { - $this->SVGPath($d, $obstyle); - } - $this->StopTransform(); - } - } - } - break; - } - // shapes - case 'rect': { - if ($invisible) { - break; - } - $x = (isset($attribs['x'])?$this->getHTMLUnitToUnits($attribs['x'], 0, $this->svgunit, false):0); - $y = (isset($attribs['y'])?$this->getHTMLUnitToUnits($attribs['y'], 0, $this->svgunit, false):0); - $w = (isset($attribs['width'])?$this->getHTMLUnitToUnits($attribs['width'], 0, $this->svgunit, false):0); - $h = (isset($attribs['height'])?$this->getHTMLUnitToUnits($attribs['height'], 0, $this->svgunit, false):0); - $rx = (isset($attribs['rx'])?$this->getHTMLUnitToUnits($attribs['rx'], 0, $this->svgunit, false):0); - $ry = (isset($attribs['ry'])?$this->getHTMLUnitToUnits($attribs['ry'], 0, $this->svgunit, false):$rx); - if ($clipping) { - $this->SVGTransform($tm); - $this->RoundedRectXY($x, $y, $w, $h, $rx, $ry, '1111', 'CNZ', array(), array()); - } else { - $this->StartTransform(); - $this->SVGTransform($tm); - $obstyle = $this->setSVGStyles($svgstyle, $prev_svgstyle, $x, $y, $w, $h, 'RoundedRectXY', array($x, $y, $w, $h, $rx, $ry, '1111', 'CNZ')); - if (!empty($obstyle)) { - $this->RoundedRectXY($x, $y, $w, $h, $rx, $ry, '1111', $obstyle, array(), array()); - } - $this->StopTransform(); - } - break; - } - case 'circle': { - if ($invisible) { - break; - } - $r = (isset($attribs['r']) ? $this->getHTMLUnitToUnits($attribs['r'], 0, $this->svgunit, false) : 0); - $cx = (isset($attribs['cx']) ? $this->getHTMLUnitToUnits($attribs['cx'], 0, $this->svgunit, false) : (isset($attribs['x']) ? $this->getHTMLUnitToUnits($attribs['x'], 0, $this->svgunit, false) : 0)); - $cy = (isset($attribs['cy']) ? $this->getHTMLUnitToUnits($attribs['cy'], 0, $this->svgunit, false) : (isset($attribs['y']) ? $this->getHTMLUnitToUnits($attribs['y'], 0, $this->svgunit, false) : 0)); - $x = ($cx - $r); - $y = ($cy - $r); - $w = (2 * $r); - $h = $w; - if ($clipping) { - $this->SVGTransform($tm); - $this->Circle($cx, $cy, $r, 0, 360, 'CNZ', array(), array(), 8); - } else { - $this->StartTransform(); - $this->SVGTransform($tm); - $obstyle = $this->setSVGStyles($svgstyle, $prev_svgstyle, $x, $y, $w, $h, 'Circle', array($cx, $cy, $r, 0, 360, 'CNZ')); - if (!empty($obstyle)) { - $this->Circle($cx, $cy, $r, 0, 360, $obstyle, array(), array(), 8); - } - $this->StopTransform(); - } - break; - } - case 'ellipse': { - if ($invisible) { - break; - } - $rx = (isset($attribs['rx']) ? $this->getHTMLUnitToUnits($attribs['rx'], 0, $this->svgunit, false) : 0); - $ry = (isset($attribs['ry']) ? $this->getHTMLUnitToUnits($attribs['ry'], 0, $this->svgunit, false) : 0); - $cx = (isset($attribs['cx']) ? $this->getHTMLUnitToUnits($attribs['cx'], 0, $this->svgunit, false) : (isset($attribs['x']) ? $this->getHTMLUnitToUnits($attribs['x'], 0, $this->svgunit, false) : 0)); - $cy = (isset($attribs['cy']) ? $this->getHTMLUnitToUnits($attribs['cy'], 0, $this->svgunit, false) : (isset($attribs['y']) ? $this->getHTMLUnitToUnits($attribs['y'], 0, $this->svgunit, false) : 0)); - $x = ($cx - $rx); - $y = ($cy - $ry); - $w = (2 * $rx); - $h = (2 * $ry); - if ($clipping) { - $this->SVGTransform($tm); - $this->Ellipse($cx, $cy, $rx, $ry, 0, 0, 360, 'CNZ', array(), array(), 8); - } else { - $this->StartTransform(); - $this->SVGTransform($tm); - $obstyle = $this->setSVGStyles($svgstyle, $prev_svgstyle, $x, $y, $w, $h, 'Ellipse', array($cx, $cy, $rx, $ry, 0, 0, 360, 'CNZ')); - if (!empty($obstyle)) { - $this->Ellipse($cx, $cy, $rx, $ry, 0, 0, 360, $obstyle, array(), array(), 8); - } - $this->StopTransform(); - } - break; - } - case 'line': { - if ($invisible) { - break; - } - $x1 = (isset($attribs['x1'])?$this->getHTMLUnitToUnits($attribs['x1'], 0, $this->svgunit, false):0); - $y1 = (isset($attribs['y1'])?$this->getHTMLUnitToUnits($attribs['y1'], 0, $this->svgunit, false):0); - $x2 = (isset($attribs['x2'])?$this->getHTMLUnitToUnits($attribs['x2'], 0, $this->svgunit, false):0); - $y2 = (isset($attribs['y2'])?$this->getHTMLUnitToUnits($attribs['y2'], 0, $this->svgunit, false):0); - $x = $x1; - $y = $y1; - $w = abs($x2 - $x1); - $h = abs($y2 - $y1); - if (!$clipping) { - $this->StartTransform(); - $this->SVGTransform($tm); - $obstyle = $this->setSVGStyles($svgstyle, $prev_svgstyle, $x, $y, $w, $h, 'Line', array($x1, $y1, $x2, $y2)); - $this->Line($x1, $y1, $x2, $y2); - $this->StopTransform(); - } - break; - } - case 'polyline': - case 'polygon': { - if ($invisible) { - break; - } - $points = (isset($attribs['points'])?$attribs['points']:'0 0'); - $points = trim($points); - // note that point may use a complex syntax not covered here - $points = preg_split('/[\,\s]+/si', $points); - if (count($points) < 4) { - break; - } - $p = array(); - $xmin = 2147483647; - $xmax = 0; - $ymin = 2147483647; - $ymax = 0; - foreach ($points as $key => $val) { - $p[$key] = $this->getHTMLUnitToUnits($val, 0, $this->svgunit, false); - if (($key % 2) == 0) { - // X coordinate - $xmin = min($xmin, $p[$key]); - $xmax = max($xmax, $p[$key]); - } else { - // Y coordinate - $ymin = min($ymin, $p[$key]); - $ymax = max($ymax, $p[$key]); - } - } - $x = $xmin; - $y = $ymin; - $w = ($xmax - $xmin); - $h = ($ymax - $ymin); - if ($name == 'polyline') { - $this->StartTransform(); - $this->SVGTransform($tm); - $obstyle = $this->setSVGStyles($svgstyle, $prev_svgstyle, $x, $y, $w, $h, 'PolyLine', array($p, 'CNZ')); - if (!empty($obstyle)) { - $this->PolyLine($p, $obstyle, array(), array()); - } - $this->StopTransform(); - } else { // polygon - if ($clipping) { - $this->SVGTransform($tm); - $this->Polygon($p, 'CNZ', array(), array(), true); - } else { - $this->StartTransform(); - $this->SVGTransform($tm); - $obstyle = $this->setSVGStyles($svgstyle, $prev_svgstyle, $x, $y, $w, $h, 'Polygon', array($p, 'CNZ')); - if (!empty($obstyle)) { - $this->Polygon($p, $obstyle, array(), array(), true); - } - $this->StopTransform(); - } - } - break; - } - // image - case 'image': { - if ($invisible) { - break; - } - if (!isset($attribs['xlink:href']) OR empty($attribs['xlink:href'])) { - break; - } - $x = (isset($attribs['x'])?$this->getHTMLUnitToUnits($attribs['x'], 0, $this->svgunit, false):0); - $y = (isset($attribs['y'])?$this->getHTMLUnitToUnits($attribs['y'], 0, $this->svgunit, false):0); - $w = (isset($attribs['width'])?$this->getHTMLUnitToUnits($attribs['width'], 0, $this->svgunit, false):0); - $h = (isset($attribs['height'])?$this->getHTMLUnitToUnits($attribs['height'], 0, $this->svgunit, false):0); - $img = $attribs['xlink:href']; - if (!$clipping) { - $this->StartTransform(); - $this->SVGTransform($tm); - $obstyle = $this->setSVGStyles($svgstyle, $prev_svgstyle, $x, $y, $w, $h); - if (preg_match('/^data:image\/[^;]+;base64,/', $img, $m) > 0) { - // embedded image encoded as base64 - $img = '@'.base64_decode(substr($img, strlen($m[0]))); - } else { - // fix image path - if (!TCPDF_STATIC::empty_string($this->svgdir) AND (($img[0] == '.') OR (basename($img) == $img))) { - // replace relative path with full server path - $img = $this->svgdir.'/'.$img; - } - if (($img[0] == '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) { - $findroot = strpos($img, $_SERVER['DOCUMENT_ROOT']); - if (($findroot === false) OR ($findroot > 1)) { - if (substr($_SERVER['DOCUMENT_ROOT'], -1) == '/') { - $img = substr($_SERVER['DOCUMENT_ROOT'], 0, -1).$img; - } else { - $img = $_SERVER['DOCUMENT_ROOT'].$img; - } - } - } - $img = urldecode($img); - $testscrtype = @parse_url($img); - if (!isset($testscrtype['query']) OR empty($testscrtype['query'])) { - // convert URL to server path - $img = str_replace(K_PATH_URL, K_PATH_MAIN, $img); - } - } - // get image type - $imgtype = TCPDF_IMAGES::getImageFileType($img); - if (($imgtype == 'eps') OR ($imgtype == 'ai')) { - $this->ImageEps($img, $x, $y, $w, $h); - } elseif ($imgtype == 'svg') { - // store SVG vars - $svggradients = $this->svggradients; - $svggradientid = $this->svggradientid; - $svgdefsmode = $this->svgdefsmode; - $svgdefs = $this->svgdefs; - $svgclipmode = $this->svgclipmode; - $svgclippaths = $this->svgclippaths; - $svgcliptm = $this->svgcliptm; - $svgclipid = $this->svgclipid; - $svgtext = $this->svgtext; - $svgtextmode = $this->svgtextmode; - $this->ImageSVG($img, $x, $y, $w, $h); - // restore SVG vars - $this->svggradients = $svggradients; - $this->svggradientid = $svggradientid; - $this->svgdefsmode = $svgdefsmode; - $this->svgdefs = $svgdefs; - $this->svgclipmode = $svgclipmode; - $this->svgclippaths = $svgclippaths; - $this->svgcliptm = $svgcliptm; - $this->svgclipid = $svgclipid; - $this->svgtext = $svgtext; - $this->svgtextmode = $svgtextmode; - } else { - $this->Image($img, $x, $y, $w, $h); - } - $this->StopTransform(); - } - break; - } - // text - case 'text': - case 'tspan': { - if (isset($this->svgtextmode['text-anchor']) AND !empty($this->svgtext)) { - // @TODO: unsupported feature - } - // only basic support - advanced features must be implemented - $this->svgtextmode['invisible'] = $invisible; - if ($invisible) { - break; - } - array_push($this->svgstyles, $svgstyle); - if (isset($attribs['x'])) { - $x = $this->getHTMLUnitToUnits($attribs['x'], 0, $this->svgunit, false); - } elseif ($name == 'tspan') { - $x = $this->x; - } else { - $x = 0; - } - if (isset($attribs['dx'])) { - $x += $this->getHTMLUnitToUnits($attribs['dx'], 0, $this->svgunit, false); - } - if (isset($attribs['y'])) { - $y = $this->getHTMLUnitToUnits($attribs['y'], 0, $this->svgunit, false); - } elseif ($name == 'tspan') { - $y = $this->y; - } else { - $y = 0; - } - if (isset($attribs['dy'])) { - $y += $this->getHTMLUnitToUnits($attribs['dy'], 0, $this->svgunit, false); - } - $svgstyle['text-color'] = $svgstyle['fill']; - $this->svgtext = ''; - if (isset($svgstyle['text-anchor'])) { - $this->svgtextmode['text-anchor'] = $svgstyle['text-anchor']; - } else { - $this->svgtextmode['text-anchor'] = 'start'; - } - if (isset($svgstyle['direction'])) { - if ($svgstyle['direction'] == 'rtl') { - $this->svgtextmode['rtl'] = true; - } else { - $this->svgtextmode['rtl'] = false; - } - } else { - $this->svgtextmode['rtl'] = false; - } - if (isset($svgstyle['stroke']) AND ($svgstyle['stroke'] != 'none') AND isset($svgstyle['stroke-width']) AND ($svgstyle['stroke-width'] > 0)) { - $this->svgtextmode['stroke'] = $this->getHTMLUnitToUnits($svgstyle['stroke-width'], 0, $this->svgunit, false); - } else { - $this->svgtextmode['stroke'] = false; - } - $this->StartTransform(); - $this->SVGTransform($tm); - $obstyle = $this->setSVGStyles($svgstyle, $prev_svgstyle, $x, $y, 1, 1); - $this->x = $x; - $this->y = $y; - break; - } - // use - case 'use': { - if (isset($attribs['xlink:href']) AND !empty($attribs['xlink:href'])) { - $svgdefid = substr($attribs['xlink:href'], 1); - if (isset($this->svgdefs[$svgdefid])) { - $use = $this->svgdefs[$svgdefid]; - if (isset($attribs['xlink:href'])) { - unset($attribs['xlink:href']); - } - if (isset($attribs['id'])) { - unset($attribs['id']); - } - if (isset($use['attribs']['x']) AND isset($attribs['x'])) { - $attribs['x'] += $use['attribs']['x']; - } - if (isset($use['attribs']['y']) AND isset($attribs['y'])) { - $attribs['y'] += $use['attribs']['y']; - } - if (empty($attribs['style'])) { - $attribs['style'] = ''; - } - if (!empty($use['attribs']['style'])) { - // merge styles - $attribs['style'] = str_replace(';;',';',';'.$use['attribs']['style'].$attribs['style']); - } - $attribs = array_merge($use['attribs'], $attribs); - $this->startSVGElementHandler($parser, $use['name'], $attribs); - return; - } - } - break; - } - default: { - break; - } - } // end of switch - // process child elements - if (!empty($attribs['child_elements'])) { - $child_elements = $attribs['child_elements']; - unset($attribs['child_elements']); - foreach($child_elements as $child_element) { - if (empty($child_element['attribs']['closing_tag'])) { - $this->startSVGElementHandler('child-tag', $child_element['name'], $child_element['attribs']); - } else { - if (isset($child_element['attribs']['content'])) { - $this->svgtext = $child_element['attribs']['content']; - } - $this->endSVGElementHandler('child-tag', $child_element['name']); - } - } - } - } - - /** - * Sets the closing SVG element handler function for the XML parser. - * @param $parser (resource) The first parameter, parser, is a reference to the XML parser calling the handler. - * @param $name (string) The second parameter, name, contains the name of the element for which this handler is called. If case-folding is in effect for this parser, the element name will be in uppercase letters. - * @author Nicola Asuni - * @since 5.0.000 (2010-05-02) - * @protected - */ - protected function endSVGElementHandler($parser, $name) { - $name = $this->removeTagNamespace($name); - if ($this->svgdefsmode AND !in_array($name, array('defs', 'clipPath', 'linearGradient', 'radialGradient', 'stop'))) {; - if (end($this->svgdefs) !== FALSE) { - $last_svgdefs_id = key($this->svgdefs); - if (isset($this->svgdefs[$last_svgdefs_id]['attribs']['child_elements'])) { - foreach($this->svgdefs[$last_svgdefs_id]['attribs']['child_elements'] as $child_element) { - if (isset($child_element['attribs']['id']) AND ($child_element['name'] == $name)) { - $this->svgdefs[$last_svgdefs_id]['attribs']['child_elements'][$child_element['attribs']['id'].'_CLOSE'] = array('name' => $name, 'attribs' => array('closing_tag' => TRUE, 'content' => $this->svgtext)); - return; - } - } - if ($this->svgdefs[$last_svgdefs_id]['name'] == $name) { - $this->svgdefs[$last_svgdefs_id]['attribs']['child_elements'][$last_svgdefs_id.'_CLOSE'] = array('name' => $name, 'attribs' => array('closing_tag' => TRUE, 'content' => $this->svgtext)); - return; - } - } - } - return; - } - switch($name) { - case 'defs': { - $this->svgdefsmode = false; - break; - } - // clipPath - case 'clipPath': { - $this->svgclipmode = false; - break; - } - case 'svg': { - if (--$this->svg_tag_depth <= 0) { - break; - } - } - case 'g': { - // ungroup: remove last style from array - array_pop($this->svgstyles); - $this->StopTransform(); - break; - } - case 'text': - case 'tspan': { - if ($this->svgtextmode['invisible']) { - // This implementation must be fixed to following the rule: - // If the 'visibility' property is set to hidden on a 'tspan', 'tref' or 'altGlyph' element, then the text is invisible but still takes up space in text layout calculations. - break; - } - // print text - $text = $this->svgtext; - //$text = $this->stringTrim($text); - $textlen = $this->GetStringWidth($text); - if ($this->svgtextmode['text-anchor'] != 'start') { - // check if string is RTL text - if ($this->svgtextmode['text-anchor'] == 'end') { - if ($this->svgtextmode['rtl']) { - $this->x += $textlen; - } else { - $this->x -= $textlen; - } - } elseif ($this->svgtextmode['text-anchor'] == 'middle') { - if ($this->svgtextmode['rtl']) { - $this->x += ($textlen / 2); - } else { - $this->x -= ($textlen / 2); - } - } - } - $textrendermode = $this->textrendermode; - $textstrokewidth = $this->textstrokewidth; - $this->setTextRenderingMode($this->svgtextmode['stroke'], true, false); - if ($name == 'text') { - // store current coordinates - $tmpx = $this->x; - $tmpy = $this->y; - } - // print the text - $this->Cell($textlen, 0, $text, 0, 0, '', false, '', 0, false, 'L', 'T'); - if ($name == 'text') { - // restore coordinates - $this->x = $tmpx; - $this->y = $tmpy; - } - // restore previous rendering mode - $this->textrendermode = $textrendermode; - $this->textstrokewidth = $textstrokewidth; - $this->svgtext = ''; - $this->StopTransform(); - if (!$this->svgdefsmode) { - array_pop($this->svgstyles); - } - break; - } - default: { - break; - } - } - } - - /** - * Sets the character data handler function for the XML parser. - * @param $parser (resource) The first parameter, parser, is a reference to the XML parser calling the handler. - * @param $data (string) The second parameter, data, contains the character data as a string. - * @author Nicola Asuni - * @since 5.0.000 (2010-05-02) - * @protected - */ - protected function segSVGContentHandler($parser, $data) { - $this->svgtext .= $data; - } - - // --- END SVG METHODS ----------------------------------------------------- - -} // END OF TCPDF CLASS - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/html/lib/tcpdf/tcpdf_include.php b/html/lib/tcpdf/tcpdf_include.php deleted file mode 100644 index 68b7b5ec15..0000000000 --- a/html/lib/tcpdf/tcpdf_include.php +++ /dev/null @@ -1,49 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// Description : This is a PHP class for parsing PDF documents. -// -//============================================================+ - -/** - * @file - * This is a PHP class for parsing PDF documents.
        - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.0.15 - */ - -// include class for decoding filters -require_once(dirname(__FILE__).'/include/tcpdf_filters.php'); - -/** - * @class TCPDF_PARSER - * This is a PHP class for parsing PDF documents.
        - * @package com.tecnick.tcpdf - * @brief This is a PHP class for parsing PDF documents.. - * @version 1.0.15 - * @author Nicola Asuni - info@tecnick.com - */ -class TCPDF_PARSER { - - /** - * Raw content of the PDF document. - * @private - */ - private $pdfdata = ''; - - /** - * XREF data. - * @protected - */ - protected $xref = array(); - - /** - * Array of PDF objects. - * @protected - */ - protected $objects = array(); - - /** - * Class object for decoding filters. - * @private - */ - private $FilterDecoders; - - /** - * Array of configuration parameters. - * @private - */ - private $cfg = array( - 'die_for_errors' => false, - 'ignore_filter_decoding_errors' => true, - 'ignore_missing_filter_decoders' => true, - ); - -// ----------------------------------------------------------------------------- - - /** - * Parse a PDF document an return an array of objects. - * @param $data (string) PDF data to parse. - * @param $cfg (array) Array of configuration parameters: - * 'die_for_errors' : if true termitate the program execution in case of error, otherwise thows an exception; - * 'ignore_filter_decoding_errors' : if true ignore filter decoding errors; - * 'ignore_missing_filter_decoders' : if true ignore missing filter decoding errors. - * @public - * @since 1.0.000 (2011-05-24) - */ - public function __construct($data, $cfg=array()) { - if (empty($data)) { - $this->Error('Empty PDF data.'); - } - // find the pdf header starting position - if (($trimpos = strpos($data, '%PDF-')) === FALSE) { - $this->Error('Invalid PDF data: missing %PDF header.'); - } - // get PDF content string - $this->pdfdata = substr($data, $trimpos); - // get length - $pdflen = strlen($this->pdfdata); - // set configuration parameters - $this->setConfig($cfg); - // get xref and trailer data - $this->xref = $this->getXrefData(); - // parse all document objects - $this->objects = array(); - foreach ($this->xref['xref'] as $obj => $offset) { - if (!isset($this->objects[$obj]) AND ($offset > 0)) { - // decode objects with positive offset - $this->objects[$obj] = $this->getIndirectObject($obj, $offset, true); - } - } - // release some memory - unset($this->pdfdata); - $this->pdfdata = ''; - } - - /** - * Set the configuration parameters. - * @param $cfg (array) Array of configuration parameters: - * 'die_for_errors' : if true termitate the program execution in case of error, otherwise thows an exception; - * 'ignore_filter_decoding_errors' : if true ignore filter decoding errors; - * 'ignore_missing_filter_decoders' : if true ignore missing filter decoding errors. - * @public - */ - protected function setConfig($cfg) { - if (isset($cfg['die_for_errors'])) { - $this->cfg['die_for_errors'] = !!$cfg['die_for_errors']; - } - if (isset($cfg['ignore_filter_decoding_errors'])) { - $this->cfg['ignore_filter_decoding_errors'] = !!$cfg['ignore_filter_decoding_errors']; - } - if (isset($cfg['ignore_missing_filter_decoders'])) { - $this->cfg['ignore_missing_filter_decoders'] = !!$cfg['ignore_missing_filter_decoders']; - } - } - - /** - * Return an array of parsed PDF document objects. - * @return (array) Array of parsed PDF document objects. - * @public - * @since 1.0.000 (2011-06-26) - */ - public function getParsedData() { - return array($this->xref, $this->objects); - } - - /** - * Get Cross-Reference (xref) table and trailer data from PDF document data. - * @param $offset (int) xref offset (if know). - * @param $xref (array) previous xref array (if any). - * @return Array containing xref and trailer data. - * @protected - * @since 1.0.000 (2011-05-24) - */ - protected function getXrefData($offset=0, $xref=array()) { - if ($offset == 0) { - // find last startxref - if (preg_match_all('/[\r\n]startxref[\s]*[\r\n]+([0-9]+)[\s]*[\r\n]+%%EOF/i', $this->pdfdata, $matches, PREG_SET_ORDER, $offset) == 0) { - $this->Error('Unable to find startxref'); - } - $matches = array_pop($matches); - $startxref = $matches[1]; - } elseif (strpos($this->pdfdata, 'xref', $offset) == $offset) { - // Already pointing at the xref table - $startxref = $offset; - } elseif (preg_match('/([0-9]+[\s][0-9]+[\s]obj)/i', $this->pdfdata, $matches, PREG_OFFSET_CAPTURE, $offset)) { - // Cross-Reference Stream object - $startxref = $offset; - } elseif (preg_match('/[\r\n]startxref[\s]*[\r\n]+([0-9]+)[\s]*[\r\n]+%%EOF/i', $this->pdfdata, $matches, PREG_OFFSET_CAPTURE, $offset)) { - // startxref found - $startxref = $matches[1][0]; - } else { - $this->Error('Unable to find startxref'); - } - // check xref position - if (strpos($this->pdfdata, 'xref', $startxref) == $startxref) { - // Cross-Reference - $xref = $this->decodeXref($startxref, $xref); - } else { - // Cross-Reference Stream - $xref = $this->decodeXrefStream($startxref, $xref); - } - if (empty($xref)) { - $this->Error('Unable to find xref'); - } - return $xref; - } - - /** - * Decode the Cross-Reference section - * @param $startxref (int) Offset at which the xref section starts (position of the 'xref' keyword). - * @param $xref (array) Previous xref array (if any). - * @return Array containing xref and trailer data. - * @protected - * @since 1.0.000 (2011-06-20) - */ - protected function decodeXref($startxref, $xref=array()) { - $startxref += 4; // 4 is the length of the word 'xref' - // skip initial white space chars: \x00 null (NUL), \x09 horizontal tab (HT), \x0A line feed (LF), \x0C form feed (FF), \x0D carriage return (CR), \x20 space (SP) - $offset = $startxref + strspn($this->pdfdata, "\x00\x09\x0a\x0c\x0d\x20", $startxref); - // initialize object number - $obj_num = 0; - // search for cross-reference entries or subsection - while (preg_match('/([0-9]+)[\x20]([0-9]+)[\x20]?([nf]?)(\r\n|[\x20]?[\r\n])/', $this->pdfdata, $matches, PREG_OFFSET_CAPTURE, $offset) > 0) { - if ($matches[0][1] != $offset) { - // we are on another section - break; - } - $offset += strlen($matches[0][0]); - if ($matches[3][0] == 'n') { - // create unique object index: [object number]_[generation number] - $index = $obj_num.'_'.intval($matches[2][0]); - // check if object already exist - if (!isset($xref['xref'][$index])) { - // store object offset position - $xref['xref'][$index] = intval($matches[1][0]); - } - ++$obj_num; - } elseif ($matches[3][0] == 'f') { - ++$obj_num; - } else { - // object number (index) - $obj_num = intval($matches[1][0]); - } - } - // get trailer data - if (preg_match('/trailer[\s]*<<(.*)>>/isU', $this->pdfdata, $matches, PREG_OFFSET_CAPTURE, $offset) > 0) { - $trailer_data = $matches[1][0]; - if (!isset($xref['trailer']) OR empty($xref['trailer'])) { - // get only the last updated version - $xref['trailer'] = array(); - // parse trailer_data - if (preg_match('/Size[\s]+([0-9]+)/i', $trailer_data, $matches) > 0) { - $xref['trailer']['size'] = intval($matches[1]); - } - if (preg_match('/Root[\s]+([0-9]+)[\s]+([0-9]+)[\s]+R/i', $trailer_data, $matches) > 0) { - $xref['trailer']['root'] = intval($matches[1]).'_'.intval($matches[2]); - } - if (preg_match('/Encrypt[\s]+([0-9]+)[\s]+([0-9]+)[\s]+R/i', $trailer_data, $matches) > 0) { - $xref['trailer']['encrypt'] = intval($matches[1]).'_'.intval($matches[2]); - } - if (preg_match('/Info[\s]+([0-9]+)[\s]+([0-9]+)[\s]+R/i', $trailer_data, $matches) > 0) { - $xref['trailer']['info'] = intval($matches[1]).'_'.intval($matches[2]); - } - if (preg_match('/ID[\s]*[\[][\s]*[<]([^>]*)[>][\s]*[<]([^>]*)[>]/i', $trailer_data, $matches) > 0) { - $xref['trailer']['id'] = array(); - $xref['trailer']['id'][0] = $matches[1]; - $xref['trailer']['id'][1] = $matches[2]; - } - } - if (preg_match('/Prev[\s]+([0-9]+)/i', $trailer_data, $matches) > 0) { - // get previous xref - $xref = $this->getXrefData(intval($matches[1]), $xref); - } - } else { - $this->Error('Unable to find trailer'); - } - return $xref; - } - - /** - * Decode the Cross-Reference Stream section - * @param $startxref (int) Offset at which the xref section starts. - * @param $xref (array) Previous xref array (if any). - * @return Array containing xref and trailer data. - * @protected - * @since 1.0.003 (2013-03-16) - */ - protected function decodeXrefStream($startxref, $xref=array()) { - // try to read Cross-Reference Stream - $xrefobj = $this->getRawObject($startxref); - $xrefcrs = $this->getIndirectObject($xrefobj[1], $startxref, true); - if (!isset($xref['trailer']) OR empty($xref['trailer'])) { - // get only the last updated version - $xref['trailer'] = array(); - $filltrailer = true; - } else { - $filltrailer = false; - } - if (!isset($xref['xref'])) { - $xref['xref'] = array(); - } - $valid_crs = false; - $columns = 0; - $sarr = $xrefcrs[0][1]; - foreach ($sarr as $k => $v) { - if (($v[0] == '/') AND ($v[1] == 'Type') AND (isset($sarr[($k +1)]) AND ($sarr[($k +1)][0] == '/') AND ($sarr[($k +1)][1] == 'XRef'))) { - $valid_crs = true; - } elseif (($v[0] == '/') AND ($v[1] == 'Index') AND (isset($sarr[($k +1)]))) { - // first object number in the subsection - $index_first = intval($sarr[($k +1)][1][0][1]); - // number of entries in the subsection - $index_entries = intval($sarr[($k +1)][1][1][1]); - } elseif (($v[0] == '/') AND ($v[1] == 'Prev') AND (isset($sarr[($k +1)]) AND ($sarr[($k +1)][0] == 'numeric'))) { - // get previous xref offset - $prevxref = intval($sarr[($k +1)][1]); - } elseif (($v[0] == '/') AND ($v[1] == 'W') AND (isset($sarr[($k +1)]))) { - // number of bytes (in the decoded stream) of the corresponding field - $wb = array(); - $wb[0] = intval($sarr[($k +1)][1][0][1]); - $wb[1] = intval($sarr[($k +1)][1][1][1]); - $wb[2] = intval($sarr[($k +1)][1][2][1]); - } elseif (($v[0] == '/') AND ($v[1] == 'DecodeParms') AND (isset($sarr[($k +1)][1]))) { - $decpar = $sarr[($k +1)][1]; - foreach ($decpar as $kdc => $vdc) { - if (($vdc[0] == '/') AND ($vdc[1] == 'Columns') AND (isset($decpar[($kdc +1)]) AND ($decpar[($kdc +1)][0] == 'numeric'))) { - $columns = intval($decpar[($kdc +1)][1]); - } elseif (($vdc[0] == '/') AND ($vdc[1] == 'Predictor') AND (isset($decpar[($kdc +1)]) AND ($decpar[($kdc +1)][0] == 'numeric'))) { - $predictor = intval($decpar[($kdc +1)][1]); - } - } - } elseif ($filltrailer) { - if (($v[0] == '/') AND ($v[1] == 'Size') AND (isset($sarr[($k +1)]) AND ($sarr[($k +1)][0] == 'numeric'))) { - $xref['trailer']['size'] = $sarr[($k +1)][1]; - } elseif (($v[0] == '/') AND ($v[1] == 'Root') AND (isset($sarr[($k +1)]) AND ($sarr[($k +1)][0] == 'objref'))) { - $xref['trailer']['root'] = $sarr[($k +1)][1]; - } elseif (($v[0] == '/') AND ($v[1] == 'Info') AND (isset($sarr[($k +1)]) AND ($sarr[($k +1)][0] == 'objref'))) { - $xref['trailer']['info'] = $sarr[($k +1)][1]; - } elseif (($v[0] == '/') AND ($v[1] == 'Encrypt') AND (isset($sarr[($k +1)]) AND ($sarr[($k +1)][0] == 'objref'))) { - $xref['trailer']['encrypt'] = $sarr[($k +1)][1]; - } elseif (($v[0] == '/') AND ($v[1] == 'ID') AND (isset($sarr[($k +1)]))) { - $xref['trailer']['id'] = array(); - $xref['trailer']['id'][0] = $sarr[($k +1)][1][0][1]; - $xref['trailer']['id'][1] = $sarr[($k +1)][1][1][1]; - } - } - } - // decode data - if ($valid_crs AND isset($xrefcrs[1][3][0])) { - // number of bytes in a row - $rowlen = ($columns + 1); - // convert the stream into an array of integers - $sdata = unpack('C*', $xrefcrs[1][3][0]); - // split the rows - $sdata = array_chunk($sdata, $rowlen); - // initialize decoded array - $ddata = array(); - // initialize first row with zeros - $prev_row = array_fill (0, $rowlen, 0); - // for each row apply PNG unpredictor - foreach ($sdata as $k => $row) { - // initialize new row - $ddata[$k] = array(); - // get PNG predictor value - $predictor = (10 + $row[0]); - // for each byte on the row - for ($i=1; $i<=$columns; ++$i) { - // new index - $j = ($i - 1); - $row_up = $prev_row[$j]; - if ($i == 1) { - $row_left = 0; - $row_upleft = 0; - } else { - $row_left = $row[($i - 1)]; - $row_upleft = $prev_row[($j - 1)]; - } - switch ($predictor) { - case 10: { // PNG prediction (on encoding, PNG None on all rows) - $ddata[$k][$j] = $row[$i]; - break; - } - case 11: { // PNG prediction (on encoding, PNG Sub on all rows) - $ddata[$k][$j] = (($row[$i] + $row_left) & 0xff); - break; - } - case 12: { // PNG prediction (on encoding, PNG Up on all rows) - $ddata[$k][$j] = (($row[$i] + $row_up) & 0xff); - break; - } - case 13: { // PNG prediction (on encoding, PNG Average on all rows) - $ddata[$k][$j] = (($row[$i] + (($row_left + $row_up) / 2)) & 0xff); - break; - } - case 14: { // PNG prediction (on encoding, PNG Paeth on all rows) - // initial estimate - $p = ($row_left + $row_up - $row_upleft); - // distances - $pa = abs($p - $row_left); - $pb = abs($p - $row_up); - $pc = abs($p - $row_upleft); - $pmin = min($pa, $pb, $pc); - // return minimum distance - switch ($pmin) { - case $pa: { - $ddata[$k][$j] = (($row[$i] + $row_left) & 0xff); - break; - } - case $pb: { - $ddata[$k][$j] = (($row[$i] + $row_up) & 0xff); - break; - } - case $pc: { - $ddata[$k][$j] = (($row[$i] + $row_upleft) & 0xff); - break; - } - } - break; - } - default: { // PNG prediction (on encoding, PNG optimum) - $this->Error('Unknown PNG predictor'); - break; - } - } - } - $prev_row = $ddata[$k]; - } // end for each row - // complete decoding - $sdata = array(); - // for every row - foreach ($ddata as $k => $row) { - // initialize new row - $sdata[$k] = array(0, 0, 0); - if ($wb[0] == 0) { - // default type field - $sdata[$k][0] = 1; - } - $i = 0; // count bytes in the row - // for every column - for ($c = 0; $c < 3; ++$c) { - // for every byte on the column - for ($b = 0; $b < $wb[$c]; ++$b) { - if (isset($row[$i])) { - $sdata[$k][$c] += ($row[$i] << (($wb[$c] - 1 - $b) * 8)); - } - ++$i; - } - } - } - $ddata = array(); - // fill xref - if (isset($index_first)) { - $obj_num = $index_first; - } else { - $obj_num = 0; - } - foreach ($sdata as $k => $row) { - switch ($row[0]) { - case 0: { // (f) linked list of free objects - break; - } - case 1: { // (n) objects that are in use but are not compressed - // create unique object index: [object number]_[generation number] - $index = $obj_num.'_'.$row[2]; - // check if object already exist - if (!isset($xref['xref'][$index])) { - // store object offset position - $xref['xref'][$index] = $row[1]; - } - break; - } - case 2: { // compressed objects - // $row[1] = object number of the object stream in which this object is stored - // $row[2] = index of this object within the object stream - $index = $row[1].'_0_'.$row[2]; - $xref['xref'][$index] = -1; - break; - } - default: { // null objects - break; - } - } - ++$obj_num; - } - } // end decoding data - if (isset($prevxref)) { - // get previous xref - $xref = $this->getXrefData($prevxref, $xref); - } - return $xref; - } - - /** - * Get object type, raw value and offset to next object - * @param $offset (int) Object offset. - * @return array containing object type, raw value and offset to next object - * @protected - * @since 1.0.000 (2011-06-20) - */ - protected function getRawObject($offset=0) { - $objtype = ''; // object type to be returned - $objval = ''; // object value to be returned - // skip initial white space chars: \x00 null (NUL), \x09 horizontal tab (HT), \x0A line feed (LF), \x0C form feed (FF), \x0D carriage return (CR), \x20 space (SP) - $offset += strspn($this->pdfdata, "\x00\x09\x0a\x0c\x0d\x20", $offset); - // get first char - $char = $this->pdfdata[$offset]; - // get object type - switch ($char) { - case '%': { // \x25 PERCENT SIGN - // skip comment and search for next token - $next = strcspn($this->pdfdata, "\r\n", $offset); - if ($next > 0) { - $offset += $next; - return $this->getRawObject($offset); - } - break; - } - case '/': { // \x2F SOLIDUS - // name object - $objtype = $char; - ++$offset; - if (preg_match('/^([^\x00\x09\x0a\x0c\x0d\x20\s\x28\x29\x3c\x3e\x5b\x5d\x7b\x7d\x2f\x25]+)/', substr($this->pdfdata, $offset, 256), $matches) == 1) { - $objval = $matches[1]; // unescaped value - $offset += strlen($objval); - } - break; - } - case '(': // \x28 LEFT PARENTHESIS - case ')': { // \x29 RIGHT PARENTHESIS - // literal string object - $objtype = $char; - ++$offset; - $strpos = $offset; - if ($char == '(') { - $open_bracket = 1; - while ($open_bracket > 0) { - if (!isset($this->pdfdata{$strpos})) { - break; - } - $ch = $this->pdfdata{$strpos}; - switch ($ch) { - case '\\': { // REVERSE SOLIDUS (5Ch) (Backslash) - // skip next character - ++$strpos; - break; - } - case '(': { // LEFT PARENHESIS (28h) - ++$open_bracket; - break; - } - case ')': { // RIGHT PARENTHESIS (29h) - --$open_bracket; - break; - } - } - ++$strpos; - } - $objval = substr($this->pdfdata, $offset, ($strpos - $offset - 1)); - $offset = $strpos; - } - break; - } - case '[': // \x5B LEFT SQUARE BRACKET - case ']': { // \x5D RIGHT SQUARE BRACKET - // array object - $objtype = $char; - ++$offset; - if ($char == '[') { - // get array content - $objval = array(); - do { - // get element - $element = $this->getRawObject($offset); - $offset = $element[2]; - $objval[] = $element; - } while ($element[0] != ']'); - // remove closing delimiter - array_pop($objval); - } - break; - } - case '<': // \x3C LESS-THAN SIGN - case '>': { // \x3E GREATER-THAN SIGN - if (isset($this->pdfdata{($offset + 1)}) AND ($this->pdfdata{($offset + 1)} == $char)) { - // dictionary object - $objtype = $char.$char; - $offset += 2; - if ($char == '<') { - // get array content - $objval = array(); - do { - // get element - $element = $this->getRawObject($offset); - $offset = $element[2]; - $objval[] = $element; - } while ($element[0] != '>>'); - // remove closing delimiter - array_pop($objval); - } - } else { - // hexadecimal string object - $objtype = $char; - ++$offset; - if (($char == '<') AND (preg_match('/^([0-9A-Fa-f\x09\x0a\x0c\x0d\x20]+)>/iU', substr($this->pdfdata, $offset), $matches) == 1)) { - // remove white space characters - $objval = strtr($matches[1], "\x09\x0a\x0c\x0d\x20", ''); - $offset += strlen($matches[0]); - } elseif (($endpos = strpos($this->pdfdata, '>', $offset)) !== FALSE) { - $offset = $endpos + 1; - } - } - break; - } - default: { - if (substr($this->pdfdata, $offset, 6) == 'endobj') { - // indirect object - $objtype = 'endobj'; - $offset += 6; - } elseif (substr($this->pdfdata, $offset, 4) == 'null') { - // null object - $objtype = 'null'; - $offset += 4; - $objval = 'null'; - } elseif (substr($this->pdfdata, $offset, 4) == 'true') { - // boolean true object - $objtype = 'boolean'; - $offset += 4; - $objval = 'true'; - } elseif (substr($this->pdfdata, $offset, 5) == 'false') { - // boolean false object - $objtype = 'boolean'; - $offset += 5; - $objval = 'false'; - } elseif (substr($this->pdfdata, $offset, 6) == 'stream') { - // start stream object - $objtype = 'stream'; - $offset += 6; - if (preg_match('/^([\r]?[\n])/isU', substr($this->pdfdata, $offset), $matches) == 1) { - $offset += strlen($matches[0]); - if (preg_match('/(endstream)[\x09\x0a\x0c\x0d\x20]/isU', substr($this->pdfdata, $offset), $matches, PREG_OFFSET_CAPTURE) == 1) { - $objval = substr($this->pdfdata, $offset, $matches[0][1]); - $offset += $matches[1][1]; - } - } - } elseif (substr($this->pdfdata, $offset, 9) == 'endstream') { - // end stream object - $objtype = 'endstream'; - $offset += 9; - } elseif (preg_match('/^([0-9]+)[\s]+([0-9]+)[\s]+R/iU', substr($this->pdfdata, $offset, 33), $matches) == 1) { - // indirect object reference - $objtype = 'objref'; - $offset += strlen($matches[0]); - $objval = intval($matches[1]).'_'.intval($matches[2]); - } elseif (preg_match('/^([0-9]+)[\s]+([0-9]+)[\s]+obj/iU', substr($this->pdfdata, $offset, 33), $matches) == 1) { - // object start - $objtype = 'obj'; - $objval = intval($matches[1]).'_'.intval($matches[2]); - $offset += strlen ($matches[0]); - } elseif (($numlen = strspn($this->pdfdata, '+-.0123456789', $offset)) > 0) { - // numeric object - $objtype = 'numeric'; - $objval = substr($this->pdfdata, $offset, $numlen); - $offset += $numlen; - } - break; - } - } - return array($objtype, $objval, $offset); - } - - /** - * Get content of indirect object. - * @param $obj_ref (string) Object number and generation number separated by underscore character. - * @param $offset (int) Object offset. - * @param $decoding (boolean) If true decode streams. - * @return array containing object data. - * @protected - * @since 1.0.000 (2011-05-24) - */ - protected function getIndirectObject($obj_ref, $offset=0, $decoding=true) { - $obj = explode('_', $obj_ref); - if (($obj === false) OR (count($obj) != 2)) { - $this->Error('Invalid object reference: '.$obj); - return; - } - $objref = $obj[0].' '.$obj[1].' obj'; - // ignore leading zeros - $offset += strspn($this->pdfdata, '0', $offset); - if (strpos($this->pdfdata, $objref, $offset) != $offset) { - // an indirect reference to an undefined object shall be considered a reference to the null object - return array('null', 'null', $offset); - } - // starting position of object content - $offset += strlen($objref); - // get array of object content - $objdata = array(); - $i = 0; // object main index - do { - $oldoffset = $offset; - // get element - $element = $this->getRawObject($offset); - $offset = $element[2]; - // decode stream using stream's dictionary information - if ($decoding AND ($element[0] == 'stream') AND (isset($objdata[($i - 1)][0])) AND ($objdata[($i - 1)][0] == '<<')) { - $element[3] = $this->decodeStream($objdata[($i - 1)][1], $element[1]); - } - $objdata[$i] = $element; - ++$i; - } while (($element[0] != 'endobj') AND ($offset != $oldoffset)); - // remove closing delimiter - array_pop($objdata); - // return raw object content - return $objdata; - } - - /** - * Get the content of object, resolving indect object reference if necessary. - * @param $obj (string) Object value. - * @return array containing object data. - * @protected - * @since 1.0.000 (2011-06-26) - */ - protected function getObjectVal($obj) { - if ($obj[0] == 'objref') { - // reference to indirect object - if (isset($this->objects[$obj[1]])) { - // this object has been already parsed - return $this->objects[$obj[1]]; - } elseif (isset($this->xref[$obj[1]])) { - // parse new object - $this->objects[$obj[1]] = $this->getIndirectObject($obj[1], $this->xref[$obj[1]], false); - return $this->objects[$obj[1]]; - } - } - return $obj; - } - - /** - * Decode the specified stream. - * @param $sdic (array) Stream's dictionary array. - * @param $stream (string) Stream to decode. - * @return array containing decoded stream data and remaining filters. - * @protected - * @since 1.0.000 (2011-06-22) - */ - protected function decodeStream($sdic, $stream) { - // get stream length and filters - $slength = strlen($stream); - if ($slength <= 0) { - return array('', array()); - } - $filters = array(); - foreach ($sdic as $k => $v) { - if ($v[0] == '/') { - if (($v[1] == 'Length') AND (isset($sdic[($k + 1)])) AND ($sdic[($k + 1)][0] == 'numeric')) { - // get declared stream length - $declength = intval($sdic[($k + 1)][1]); - if ($declength < $slength) { - $stream = substr($stream, 0, $declength); - $slength = $declength; - } - } elseif (($v[1] == 'Filter') AND (isset($sdic[($k + 1)]))) { - // resolve indirect object - $objval = $this->getObjectVal($sdic[($k + 1)]); - if ($objval[0] == '/') { - // single filter - $filters[] = $objval[1]; - } elseif ($objval[0] == '[') { - // array of filters - foreach ($objval[1] as $flt) { - if ($flt[0] == '/') { - $filters[] = $flt[1]; - } - } - } - } - } - } - // decode the stream - $remaining_filters = array(); - foreach ($filters as $filter) { - if (in_array($filter, TCPDF_FILTERS::getAvailableFilters())) { - try { - $stream = TCPDF_FILTERS::decodeFilter($filter, $stream); - } catch (Exception $e) { - $emsg = $e->getMessage(); - if ((($emsg[0] == '~') AND !$this->cfg['ignore_missing_filter_decoders']) - OR (($emsg[0] != '~') AND !$this->cfg['ignore_filter_decoding_errors'])) { - $this->Error($e->getMessage()); - } - } - } else { - // add missing filter to array - $remaining_filters[] = $filter; - } - } - return array($stream, $remaining_filters); - } - - /** - * Throw an exception or print an error message and die if the K_TCPDF_PARSER_THROW_EXCEPTION_ERROR constant is set to true. - * @param $msg (string) The error message - * @public - * @since 1.0.000 (2011-05-23) - */ - public function Error($msg) { - if ($this->cfg['die_for_errors']) { - die('TCPDF_PARSER ERROR: '.$msg); - } else { - throw new Exception('TCPDF_PARSER ERROR: '.$msg); - } - } - -} // END OF TCPDF_PARSER CLASS - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/html/pages/device/showconfig.inc.php b/html/pages/device/showconfig.inc.php index 52529bc34b..c01d032c9b 100644 --- a/html/pages/device/showconfig.inc.php +++ b/html/pages/device/showconfig.inc.php @@ -1,7 +1,5 @@ 723 72.34 -> 72.3 2.23 -> 2.23 - - list($whole, $decimal) = explode(".", $number); - - if (strlen($whole) >= $sf || !is_numeric($decimal)) { - $number = $whole; - } elseif (strlen($whole) < $sf) { - $diff = $sf - strlen($whole); - $number = $whole .".".substr($decimal, 0, $diff); - } - return $number; -} - function external_exec($command) { global $debug,$vdebug; @@ -601,7 +585,7 @@ function format_si($value, $round = '2', $sf = '3') $value = $value * -1; } - return format_number_short(round($value, $round), $sf).$ext; + return number_format(round($value, $round), $sf, '.', '').$ext; } function format_bi($value, $round = '2', $sf = '3') @@ -621,7 +605,7 @@ function format_bi($value, $round = '2', $sf = '3') $value = $value * -1; } - return format_number_short(round($value, $round), $sf).$ext; + return number_format(round($value, $round), $sf, '.', '').$ext; } function format_number($value, $base = '1000', $round = 2, $sf = 3) diff --git a/includes/init.php b/includes/init.php index 7c61d671af..4b3d1af98a 100644 --- a/includes/init.php +++ b/includes/init.php @@ -39,20 +39,11 @@ chdir($install_dir); require('Net/IPv4.php'); require('Net/IPv6.php'); -// initialize the class loader and add custom mappings -require $install_dir . '/LibreNMS/ClassLoader.php'; -$classLoader = new LibreNMS\ClassLoader(); -$classLoader->registerClass('Console_Color2', $config['install_dir'] . '/lib/console_colour.php'); -$classLoader->registerClass('Console_Table', $config['install_dir'] . '/lib/console_table.php'); -$classLoader->registerClass('PHPMailer', $config['install_dir'] . "/lib/phpmailer/class.phpmailer.php"); -$classLoader->registerClass('SMTP', $config['install_dir'] . "/lib/phpmailer/class.smtp.php"); -$classLoader->registerClass('PasswordHash', $config['install_dir'] . '/html/lib/PasswordHash.php'); -// $classLoader->registerDir($install_dir . '/tests', 'LibreNMS\Tests'); -$classLoader->register(); +# composer autoload +require $install_dir . '/vendor/autoload.php'; if (version_compare(PHP_VERSION, '5.4', '>=')) { require $install_dir . '/lib/influxdb-php/vendor/autoload.php'; } -require $install_dir . '/lib/yaml/vendor/autoload.php'; // function only files require_once $install_dir . '/includes/common.php'; @@ -67,7 +58,6 @@ require $install_dir . '/includes/services.inc.php'; require $install_dir . '/includes/mergecnf.inc.php'; require $install_dir . '/includes/functions.php'; require $install_dir . '/includes/rewrites.php'; // FIXME both definitions and functions -require $install_dir . '/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier.auto.php'; if (module_selected('web', $init_modules)) { chdir($install_dir . '/html'); diff --git a/lib/PhpAmqpLib/Channel/AMQPChannel.php b/lib/PhpAmqpLib/Channel/AMQPChannel.php deleted file mode 100644 index 21590c43bb..0000000000 --- a/lib/PhpAmqpLib/Channel/AMQPChannel.php +++ /dev/null @@ -1,1489 +0,0 @@ -get_free_channel_id(); - } - - parent::__construct($connection, $channel_id); - - $this->publish_cache = array(); - $this->publish_cache_max_size = 100; - - if ($this->debug) { - MiscHelper::debug_msg('using channel_id: ' . $channel_id); - } - - $this->default_ticket = 0; - $this->is_open = false; - $this->active = true; // Flow control - $this->alerts = array(); - $this->callbacks = array(); - $this->auto_decode = $auto_decode; - - try { - $this->x_open(); - } catch (\Exception $e) { - $this->close(); - throw $e; - } - } - - /** - * Tear down this object, after we've agreed to close with the server. - */ - protected function do_close() - { - if ($this->channel_id !== null) { - unset($this->connection->channels[$this->channel_id]); - } - $this->channel_id = $this->connection = null; - $this->is_open = false; - } - - /** - * Only for AMQP0.8.0 - * This method allows the server to send a non-fatal warning to - * the client. This is used for methods that are normally - * asynchronous and thus do not have confirmations, and for which - * the server may detect errors that need to be reported. Fatal - * errors are handled as channel or connection exceptions; non- - * fatal errors are sent through this method. - * - * @param AMQPReader $args - */ - protected function channel_alert($args) - { - $reply_code = $args->read_short(); - $reply_text = $args->read_shortstr(); - $details = $args->read_table(); - array_push($this->alerts, array($reply_code, $reply_text, $details)); - } - - /** - * Request a channel close - * - * @param int $reply_code - * @param string $reply_text - * @param array $method_sig - * @return mixed - */ - public function close($reply_code = 0, $reply_text = '', $method_sig = array(0, 0)) - { - if ($this->is_open !== true || null === $this->connection) { - $this->do_close(); - - return; // already closed - } - list($class_id, $method_id, $args) = $this->protocolWriter->channelClose( - $reply_code, - $reply_text, - $method_sig[0], - $method_sig[1] - ); - - $this->send_method_frame(array($class_id, $method_id), $args); - - return $this->wait(array( - $this->waitHelper->get_wait('channel.close_ok') - )); - } - - /** - * @param AMQPReader $args - * @throws \PhpAmqpLib\Exception\AMQPProtocolChannelException - */ - protected function channel_close($args) - { - $reply_code = $args->read_short(); - $reply_text = $args->read_shortstr(); - $class_id = $args->read_short(); - $method_id = $args->read_short(); - - $this->send_method_frame(array(20, 41)); - $this->do_close(); - - throw new AMQPProtocolChannelException($reply_code, $reply_text, array($class_id, $method_id)); - } - - /** - * Confirm a channel close - * Alias of AMQPChannel::do_close() - * - * @param AMQPReader $args - */ - protected function channel_close_ok($args) - { - $this->do_close(); - } - - /** - * Enables/disables flow from peer - * - * @param $active - * @return mixed - */ - public function flow($active) - { - list($class_id, $method_id, $args) = $this->protocolWriter->channelFlow($active); - $this->send_method_frame(array($class_id, $method_id), $args); - - return $this->wait(array( - $this->waitHelper->get_wait('channel.flow_ok') - )); - } - - /** - * @param AMQPReader $args - */ - protected function channel_flow($args) - { - $this->active = $args->read_bit(); - $this->x_flow_ok($this->active); - } - - /** - * @param $active - */ - protected function x_flow_ok($active) - { - list($class_id, $method_id, $args) = $this->protocolWriter->channelFlow($active); - $this->send_method_frame(array($class_id, $method_id), $args); - } - - /** - * @param AMQPReader $args - * @return bool - */ - protected function channel_flow_ok($args) - { - return $args->read_bit(); - } - - /** - * @param string $out_of_band - * @return mixed - */ - protected function x_open($out_of_band = '') - { - if ($this->is_open) { - return null; - } - - list($class_id, $method_id, $args) = $this->protocolWriter->channelOpen($out_of_band); - $this->send_method_frame(array($class_id, $method_id), $args); - - return $this->wait(array( - $this->waitHelper->get_wait('channel.open_ok') - )); - } - - /** - * @param AMQPReader $args - */ - protected function channel_open_ok($args) - { - $this->is_open = true; - - if ($this->debug) { - MiscHelper::debug_msg('Channel open'); - } - } - - /** - * Requests an access ticket - * - * @param string $realm - * @param bool $exclusive - * @param bool $passive - * @param bool $active - * @param bool $write - * @param bool $read - * @return mixed - */ - public function access_request( - $realm, - $exclusive = false, - $passive = false, - $active = false, - $write = false, - $read = false - ) { - list($class_id, $method_id, $args) = $this->protocolWriter->accessRequest( - $realm, - $exclusive, - $passive, - $active, - $write, - $read - ); - - $this->send_method_frame(array($class_id, $method_id), $args); - - return $this->wait(array( - $this->waitHelper->get_wait('access.request_ok') - )); - } - - /** - * Grants access to server resources - * - * @param AMQPReader $args - * @return string - */ - protected function access_request_ok($args) - { - $this->default_ticket = $args->read_short(); - - return $this->default_ticket; - } - - /** - * Declares exchange - * - * @param string $exchange - * @param string $type - * @param bool $passive - * @param bool $durable - * @param bool $auto_delete - * @param bool $internal - * @param bool $nowait - * @return mixed|null - */ - public function exchange_declare( - $exchange, - $type, - $passive = false, - $durable = false, - $auto_delete = true, - $internal = false, - $nowait = false, - $arguments = null, - $ticket = null - ) { - $arguments = $this->getArguments($arguments); - $ticket = $this->getTicket($ticket); - - list($class_id, $method_id, $args) = $this->protocolWriter->exchangeDeclare( - $ticket, - $exchange, - $type, - $passive, - $durable, - $auto_delete, - $internal, - $nowait, - $arguments - ); - - $this->send_method_frame(array($class_id, $method_id), $args); - - if ($nowait) { - return null; - } - - return $this->wait(array( - $this->waitHelper->get_wait('exchange.declare_ok') - )); - } - - /** - * Confirms an exchange declaration - */ - protected function exchange_declare_ok($args) - { - } - - /** - * Deletes an exchange - * - * @param string $exchange - * @param bool $if_unused - * @param bool $nowait - * @param null $ticket - * @return mixed|null - */ - public function exchange_delete( - $exchange, - $if_unused = false, - $nowait = false, - $ticket = null - ) { - $ticket = $this->getTicket($ticket); - list($class_id, $method_id, $args) = $this->protocolWriter->exchangeDelete( - $ticket, - $exchange, - $if_unused, - $nowait - ); - - $this->send_method_frame(array($class_id, $method_id), $args); - - if ($nowait) { - return null; - } - - return $this->wait(array( - $this->waitHelper->get_wait('exchange.delete_ok') - )); - } - - /** - * Confirms deletion of an exchange - */ - protected function exchange_delete_ok($args) - { - } - - /** - * Binds dest exchange to source exchange - * - * @param string $destination - * @param string $source - * @param string $routing_key - * @param bool $nowait - * @param null $arguments - * @param null $ticket - * @return mixed|null - */ - public function exchange_bind( - $destination, - $source, - $routing_key = '', - $nowait = false, - $arguments = null, - $ticket = null - ) { - $arguments = $this->getArguments($arguments); - $ticket = $this->getTicket($ticket); - - list($class_id, $method_id, $args) = $this->protocolWriter->exchangeBind( - $ticket, - $destination, - $source, - $routing_key, - $nowait, - $arguments - ); - - $this->send_method_frame(array($class_id, $method_id), $args); - - if ($nowait) { - return null; - } - - return $this->wait(array( - $this->waitHelper->get_wait('exchange.bind_ok') - )); - } - - /** - * Confirms bind successful - */ - protected function exchange_bind_ok($args) - { - } - - /** - * Unbinds dest exchange from source exchange - * - * @param string $destination - * @param string $source - * @param string $routing_key - * @param null $arguments - * @param null $ticket - * @return mixed - */ - public function exchange_unbind($destination, $source, $routing_key = '', $arguments = null, $ticket = null) - { - $arguments = $this->getArguments($arguments); - $ticket = $this->getTicket($ticket); - - list($class_id, $method_id, $args) = $this->protocolWriter->exchangeUnbind( - $ticket, - $destination, - $source, - $routing_key, - $arguments - ); - - $this->send_method_frame(array($class_id, $method_id), $args); - - return $this->wait(array( - $this->waitHelper->get_wait('exchange.unbind_ok') - )); - } - - /** - * Confirms unbind successful - */ - protected function exchange_unbind_ok($args) - { - } - - /** - * Binds queue to an exchange - * - * @param string $queue - * @param string $exchange - * @param string $routing_key - * @param bool $nowait - * @param null $arguments - * @param null $ticket - * @return mixed|null - */ - public function queue_bind($queue, $exchange, $routing_key = '', $nowait = false, $arguments = null, $ticket = null) - { - $arguments = $this->getArguments($arguments); - $ticket = $this->getTicket($ticket); - - list($class_id, $method_id, $args) = $this->protocolWriter->queueBind( - $ticket, - $queue, - $exchange, - $routing_key, - $nowait, - $arguments - ); - - $this->send_method_frame(array($class_id, $method_id), $args); - - if ($nowait) { - return null; - } - - return $this->wait(array( - $this->waitHelper->get_wait('queue.bind_ok') - )); - } - - /** - * Confirms bind successful - */ - protected function queue_bind_ok($args) - { - } - - /** - * Unbind queue from an exchange - * - * @param string $queue - * @param string $exchange - * @param string $routing_key - * @param null $arguments - * @param null $ticket - * @return mixed - */ - public function queue_unbind($queue, $exchange, $routing_key = '', $arguments = null, $ticket = null) - { - $arguments = $this->getArguments($arguments); - $ticket = $this->getTicket($ticket); - - list($class_id, $method_id, $args) = $this->protocolWriter->queueUnbind( - $ticket, - $queue, - $exchange, - $routing_key, - $arguments - ); - - $this->send_method_frame(array($class_id, $method_id), $args); - - return $this->wait(array( - $this->waitHelper->get_wait('queue.unbind_ok') - )); - } - - /** - * Confirms unbind successful - */ - protected function queue_unbind_ok($args) - { - } - - /** - * Declares queue, creates if needed - * - * @param string $queue - * @param bool $passive - * @param bool $durable - * @param bool $exclusive - * @param bool $auto_delete - * @param bool $nowait - * @param null $arguments - * @param null $ticket - * @return mixed|null - */ - public function queue_declare( - $queue = '', - $passive = false, - $durable = false, - $exclusive = false, - $auto_delete = true, - $nowait = false, - $arguments = null, - $ticket = null - ) { - $arguments = $this->getArguments($arguments); - $ticket = $this->getTicket($ticket); - - list($class_id, $method_id, $args) = $this->protocolWriter->queueDeclare( - $ticket, - $queue, - $passive, - $durable, - $exclusive, - $auto_delete, - $nowait, - $arguments - ); - - $this->send_method_frame(array($class_id, $method_id), $args); - - if ($nowait) { - return null; - } - - return $this->wait(array( - $this->waitHelper->get_wait('queue.declare_ok') - )); - } - - /** - * Confirms a queue definition - * - * @param AMQPReader $args - * @return array - */ - protected function queue_declare_ok($args) - { - $queue = $args->read_shortstr(); - $message_count = $args->read_long(); - $consumer_count = $args->read_long(); - - return array($queue, $message_count, $consumer_count); - } - - /** - * Deletes a queue - * - * @param string $queue - * @param bool $if_unused - * @param bool $if_empty - * @param bool $nowait - * @param null $ticket - * @return mixed|null - */ - public function queue_delete($queue = '', $if_unused = false, $if_empty = false, $nowait = false, $ticket = null) - { - $ticket = $this->getTicket($ticket); - - list($class_id, $method_id, $args) = $this->protocolWriter->queueDelete( - $ticket, - $queue, - $if_unused, - $if_empty, - $nowait - ); - - $this->send_method_frame(array($class_id, $method_id), $args); - - if ($nowait) { - return null; - } - - return $this->wait(array( - $this->waitHelper->get_wait('queue.delete_ok') - )); - } - - /** - * Confirms deletion of a queue - * - * @param AMQPReader $args - * @return string - */ - protected function queue_delete_ok($args) - { - return $args->read_long(); - } - - /** - * Purges a queue - * - * @param string $queue - * @param bool $nowait - * @param null $ticket - * @return mixed|null - */ - public function queue_purge($queue = '', $nowait = false, $ticket = null) - { - $ticket = $this->getTicket($ticket); - list($class_id, $method_id, $args) = $this->protocolWriter->queuePurge($ticket, $queue, $nowait); - - $this->send_method_frame(array($class_id, $method_id), $args); - - if ($nowait) { - return null; - } - - return $this->wait(array( - $this->waitHelper->get_wait('queue.purge_ok') - )); - } - - /** - * Confirms a queue purge - * - * @param AMQPReader $args - * @return string - */ - protected function queue_purge_ok($args) - { - return $args->read_long(); - } - - /** - * Acknowledges one or more messages - * - * @param string $delivery_tag - * @param bool $multiple - */ - public function basic_ack($delivery_tag, $multiple = false) - { - list($class_id, $method_id, $args) = $this->protocolWriter->basicAck($delivery_tag, $multiple); - $this->send_method_frame(array($class_id, $method_id), $args); - } - - /** - * Called when the server sends a basic.ack - * - * @param AMQPReader $args - * @throws AMQPRuntimeException - */ - protected function basic_ack_from_server(AMQPReader $args) - { - $delivery_tag = $args->read_longlong(); - $multiple = (bool) $args->read_bit(); - - if (false === isset($this->published_messages[$delivery_tag])) { - throw new AMQPRuntimeException(sprintf( - 'Server ack\'ed unknown delivery_tag %s', - $delivery_tag - )); - } - - $this->internal_ack_handler($delivery_tag, $multiple, $this->ack_handler); - } - - /** - * Called when the server sends a basic.nack - * - * @param AMQPReader $args - * @throws AMQPRuntimeException - */ - protected function basic_nack_from_server($args) - { - $delivery_tag = $args->read_longlong(); - $multiple = (bool) $args->read_bit(); - - if (false === isset($this->published_messages[$delivery_tag])) { - throw new AMQPRuntimeException(sprintf( - 'Server nack\'ed unknown delivery_tag %s', - $delivery_tag - )); - } - - $this->internal_ack_handler($delivery_tag, $multiple, $this->nack_handler); - } - - /** - * Handles the deletion of messages from this->publishedMessages and dispatches them to the $handler - * - * @param string $delivery_tag - * @param bool $multiple - * @param $handler - */ - protected function internal_ack_handler($delivery_tag, $multiple, $handler) - { - if ($multiple) { - $keys = $this->get_keys_less_or_equal($this->published_messages, $delivery_tag); - - foreach ($keys as $key) { - $this->internal_ack_handler($key, false, $handler); - } - - } else { - $message = $this->get_and_unset_message($delivery_tag); - $this->dispatch_to_handler($handler, array($message)); - } - } - - /** - * @param array $array - * @param $value - * @return mixed - */ - protected function get_keys_less_or_equal(array $array, $value) - { - $keys = array_reduce( - array_keys($array), - function ($keys, $key) use ($value) { - if (bccomp($key, $value, 0) <= 0) { - $keys[] = $key; - } - - return $keys; - }, - array() - ); - - return $keys; - } - - /** - * Rejects one or several received messages - * - * @param string $delivery_tag - * @param bool $multiple - * @param bool $requeue - */ - public function basic_nack($delivery_tag, $multiple = false, $requeue = false) - { - list($class_id, $method_id, $args) = $this->protocolWriter->basicNack($delivery_tag, $multiple, $requeue); - $this->send_method_frame(array($class_id, $method_id), $args); - } - - /** - * Ends a queue consumer - * - * @param string $consumer_tag - * @param bool $nowait - * @return mixed - */ - public function basic_cancel($consumer_tag, $nowait = false) - { - list($class_id, $method_id, $args) = $this->protocolWriter->basicCancel($consumer_tag, $nowait); - $this->send_method_frame(array($class_id, $method_id), $args); - - return $this->wait(array( - $this->waitHelper->get_wait('basic.cancel_ok') - )); - } - - /** - * @param AMQPReader $args - * @throws \PhpAmqpLib\Exception\AMQPBasicCancelException - */ - protected function basic_cancel_from_server(AMQPReader $args) - { - $consumerTag = $args->read_shortstr(); - - throw new AMQPBasicCancelException($consumerTag); - } - - /** - * Confirm a cancelled consumer - * - * @param AMQPReader $args - */ - protected function basic_cancel_ok($args) - { - $consumer_tag = $args->read_shortstr(); - unset($this->callbacks[$consumer_tag]); - } - - /** - * Starts a queue consumer - * - * @param string $queue - * @param string $consumer_tag - * @param bool $no_local - * @param bool $no_ack - * @param bool $exclusive - * @param bool $nowait - * @param callback|null $callback - * @param int|null $ticket - * @param array $arguments - * @return mixed|string - */ - public function basic_consume( - $queue = '', - $consumer_tag = '', - $no_local = false, - $no_ack = false, - $exclusive = false, - $nowait = false, - $callback = null, - $ticket = null, - $arguments = array() - ) { - $ticket = $this->getTicket($ticket); - list($class_id, $method_id, $args) = $this->protocolWriter->basicConsume( - $ticket, - $queue, - $consumer_tag, - $no_local, - $no_ack, - $exclusive, - $nowait, - $this->protocolVersion == '0.9.1' ? $arguments : null - ); - - $this->send_method_frame(array($class_id, $method_id), $args); - - if (false === $nowait) { - $consumer_tag = $this->wait(array( - $this->waitHelper->get_wait('basic.consume_ok') - )); - } - - $this->callbacks[$consumer_tag] = $callback; - - return $consumer_tag; - } - - /** - * Confirms a new consumer - * - * @param AMQPReader $args - * @return string - */ - protected function basic_consume_ok($args) - { - return $args->read_shortstr(); - } - - /** - * Notifies the client of a consumer message - * - * @param AMQPReader $args - * @param AMQPMessage $msg - */ - protected function basic_deliver($args, $msg) - { - $consumer_tag = $args->read_shortstr(); - $delivery_tag = $args->read_longlong(); - $redelivered = $args->read_bit(); - $exchange = $args->read_shortstr(); - $routing_key = $args->read_shortstr(); - - $msg->delivery_info = array( - 'channel' => $this, - 'consumer_tag' => $consumer_tag, - 'delivery_tag' => $delivery_tag, - 'redelivered' => $redelivered, - 'exchange' => $exchange, - 'routing_key' => $routing_key - ); - - if (isset($this->callbacks[$consumer_tag])) { - $func = $this->callbacks[$consumer_tag]; - } else { - $func = null; - } - - if ($func != null) { - call_user_func($func, $msg); - } - } - - /** - * Direct access to a queue if no message was available in the queue, return null - * - * @param string $queue - * @param bool $no_ack - * @param null $ticket - * @return mixed - */ - public function basic_get($queue = '', $no_ack = false, $ticket = null) - { - $ticket = $this->getTicket($ticket); - list($class_id, $method_id, $args) = $this->protocolWriter->basicGet($ticket, $queue, $no_ack); - - $this->send_method_frame(array($class_id, $method_id), $args); - - return $this->wait(array( - $this->waitHelper->get_wait('basic.get_ok'), - $this->waitHelper->get_wait('basic.get_empty') - )); - } - - /** - * Indicates no messages available - * - * @param AMQPReader $args - */ - protected function basic_get_empty($args) - { - $cluster_id = $args->read_shortstr(); - } - - /** - * Provides client with a message - * - * @param AMQPReader $args - * @param AMQPMessage $msg - * @return AMQPMessage - */ - protected function basic_get_ok($args, $msg) - { - $delivery_tag = $args->read_longlong(); - $redelivered = $args->read_bit(); - $exchange = $args->read_shortstr(); - $routing_key = $args->read_shortstr(); - $message_count = $args->read_long(); - - $msg->delivery_info = array( - 'delivery_tag' => $delivery_tag, - 'redelivered' => $redelivered, - 'exchange' => $exchange, - 'routing_key' => $routing_key, - 'message_count' => $message_count - ); - - return $msg; - } - - /** - * @param string $exchange - * @param string $routing_key - * @param $mandatory - * @param $immediate - * @param $ticket - * @return mixed - */ - private function pre_publish($exchange, $routing_key, $mandatory, $immediate, $ticket) - { - $cache_key = sprintf( - '%s|%s|%s|%s|%s', - $exchange, - $routing_key, - $mandatory, - $immediate, - $ticket - ); - if (false === isset($this->publish_cache[$cache_key])) { - $ticket = $this->getTicket($ticket); - list($class_id, $method_id, $args) = $this->protocolWriter->basicPublish( - $ticket, - $exchange, - $routing_key, - $mandatory, - $immediate - ); - - $pkt = $this->prepare_method_frame(array($class_id, $method_id), $args); - $this->publish_cache[$cache_key] = $pkt->getvalue(); - if (count($this->publish_cache) > $this->publish_cache_max_size) { - reset($this->publish_cache); - $old_key = key($this->publish_cache); - unset($this->publish_cache[$old_key]); - } - } - - return $this->publish_cache[$cache_key]; - } - - /** - * Publishes a message - * - * @param AMQPMessage $msg - * @param string $exchange - * @param string $routing_key - * @param bool $mandatory - * @param bool $immediate - * @param null $ticket - */ - public function basic_publish( - $msg, - $exchange = '', - $routing_key = '', - $mandatory = false, - $immediate = false, - $ticket = null - ) { - $pkt = new AMQPWriter(); - $pkt->write($this->pre_publish($exchange, $routing_key, $mandatory, $immediate, $ticket)); - - $this->connection->send_content( - $this->channel_id, - 60, - 0, - mb_strlen($msg->body, 'ASCII'), - $msg->serialize_properties(), - $msg->body, - $pkt - ); - - if ($this->next_delivery_tag > 0) { - $this->published_messages[$this->next_delivery_tag] = $msg; - $this->next_delivery_tag = bcadd($this->next_delivery_tag, '1', 0); - } - } - - /** - * @param AMQPMessage $msg - * @param string $exchange - * @param string $routing_key - * @param bool $mandatory - * @param bool $immediate - * @param null $ticket - */ - public function batch_basic_publish( - $msg, - $exchange = '', - $routing_key = '', - $mandatory = false, - $immediate = false, - $ticket = null - ) { - $this->batch_messages[] = func_get_args(); - } - - /** - * Publish batch - * - * @return void - */ - public function publish_batch() - { - if (empty($this->batch_messages)) { - return; - } - - /** @var AMQPWriter $pkt */ - $pkt = new AMQPWriter(); - - /** @var AMQPMessage $msg */ - foreach ($this->batch_messages as $m) { - $msg = $m[0]; - - $exchange = isset($m[1]) ? $m[1] : ''; - $routing_key = isset($m[2]) ? $m[2] : ''; - $mandatory = isset($m[3]) ? $m[3] : false; - $immediate = isset($m[4]) ? $m[4] : false; - $ticket = isset($m[5]) ? $m[5] : null; - $pkt->write($this->pre_publish($exchange, $routing_key, $mandatory, $immediate, $ticket)); - - $this->connection->prepare_content( - $this->channel_id, - 60, - 0, - mb_strlen($msg->body, 'ASCII'), - $msg->serialize_properties(), - $msg->body, - $pkt - ); - - if ($this->next_delivery_tag > 0) { - $this->published_messages[$this->next_delivery_tag] = $msg; - $this->next_delivery_tag = bcadd($this->next_delivery_tag, '1', 0); - } - } - - //call write here - $this->connection->write($pkt->getvalue()); - $this->batch_messages = array(); - } - - /** - * Specifies QoS - * - * @param int $prefetch_size - * @param int $prefetch_count - * @param bool $a_global - * @return mixed - */ - public function basic_qos($prefetch_size, $prefetch_count, $a_global) - { - list($class_id, $method_id, $args) = $this->protocolWriter->basicQos( - $prefetch_size, - $prefetch_count, - $a_global - ); - - $this->send_method_frame(array($class_id, $method_id), $args); - - return $this->wait(array( - $this->waitHelper->get_wait('basic.qos_ok') - )); - } - - /** - * Confirms QoS request - */ - protected function basic_qos_ok($args) - { - } - - /** - * Redelivers unacknowledged messages - * - * @param bool $requeue - * @return mixed - */ - public function basic_recover($requeue = false) - { - list($class_id, $method_id, $args) = $this->protocolWriter->basicRecover($requeue); - $this->send_method_frame(array($class_id, $method_id), $args); - - return $this->wait(array( - $this->waitHelper->get_wait('basic.recover_ok') - )); - } - - /** - * Confirm the requested recover - */ - protected function basic_recover_ok($args) - { - } - - /** - * Rejects an incoming message - * - * @param string $delivery_tag - * @param bool $requeue - */ - public function basic_reject($delivery_tag, $requeue) - { - list($class_id, $method_id, $args) = $this->protocolWriter->basicReject($delivery_tag, $requeue); - $this->send_method_frame(array($class_id, $method_id), $args); - } - - /** - * Returns a failed message - * - * @param AMQPReader $args - * @param AMQPMessage $msg - */ - protected function basic_return($args, $msg) - { - $reply_code = $args->read_short(); - $reply_text = $args->read_shortstr(); - $exchange = $args->read_shortstr(); - $routing_key = $args->read_shortstr(); - - if (null !== ($this->basic_return_callback)) { - call_user_func_array($this->basic_return_callback, array( - $reply_code, - $reply_text, - $exchange, - $routing_key, - $msg, - )); - - } elseif ($this->debug) { - MiscHelper::debug_msg('Skipping unhandled basic_return message'); - } - } - - /** - * @return mixed - */ - public function tx_commit() - { - $this->send_method_frame(array(90, 20)); - - return $this->wait(array( - $this->waitHelper->get_wait('tx.commit_ok') - )); - } - - /** - * Confirms a successful commit - */ - protected function tx_commit_ok($args) - { - } - - /** - * Rollbacks the current transaction - * - * @return mixed - */ - public function tx_rollback() - { - $this->send_method_frame(array(90, 30)); - - return $this->wait(array( - $this->waitHelper->get_wait('tx.rollback_ok') - )); - } - - /** - * Confirms a successful rollback - */ - protected function tx_rollback_ok($args) - { - } - - /** - * Puts the channel into confirm mode - * Beware that only non-transactional channels may be put into confirm mode and vice versa - * - * @param bool $nowait - */ - public function confirm_select($nowait = false) - { - list($class_id, $method_id, $args) = $this->protocolWriter->confirmSelect($nowait); - - $this->send_method_frame(array($class_id, $method_id), $args); - - if ($nowait) { - return null; - } - - $this->wait(array($this->waitHelper->get_wait('confirm.select_ok'))); - $this->next_delivery_tag = 1; - } - - /** - * Confirms a selection - * - * @return void - */ - public function confirm_select_ok() - { - } - - /** - * Waits for pending acks and nacks from the server. - * If there are no pending acks, the method returns immediately - * - * @param int $timeout Waits until $timeout value is reached - */ - public function wait_for_pending_acks($timeout = 0) - { - $functions = array( - $this->waitHelper->get_wait('basic.ack'), - $this->waitHelper->get_wait('basic.nack'), - ); - - while (count($this->published_messages) !== 0) { - if ($timeout > 0) { - $this->wait($functions, true, $timeout); - } else { - $this->wait($functions); - } - } - } - - /** - * Waits for pending acks, nacks and returns from the server. If there are no pending acks, the method returns immediately. - * - * @param int $timeout If set to value > 0 the method will wait at most $timeout seconds for pending acks. - */ - public function wait_for_pending_acks_returns($timeout = 0) - { - $functions = array( - $this->waitHelper->get_wait('basic.ack'), - $this->waitHelper->get_wait('basic.nack'), - $this->waitHelper->get_wait('basic.return'), - ); - - while (count($this->published_messages) !== 0) { - if ($timeout > 0) { - $this->wait($functions, true, $timeout); - } else { - $this->wait($functions); - } - } - } - - /** - * Selects standard transaction mode - * - * @return mixed - */ - public function tx_select() - { - $this->send_method_frame(array(90, 10)); - - return $this->wait(array( - $this->waitHelper->get_wait('tx.select_ok') - )); - } - - /** - * Confirms transaction mode - */ - protected function tx_select_ok($args) - { - } - - /** - * @param mixed $arguments - * @return array|mixed - */ - protected function getArguments($arguments) - { - return (null === $arguments) ? array() : $arguments; - } - - /** - * @param mixed $ticket - * @return int - */ - protected function getTicket($ticket) - { - return (null === $ticket) ? $this->default_ticket : $ticket; - } - - /** - * Helper method to get a particular method from $this->publishedMessages, removes it from the array and returns it. - * - * @param $index - * @return AMQPMessage - */ - protected function get_and_unset_message($index) - { - $message = $this->published_messages[$index]; - unset($this->published_messages[$index]); - - return $message; - } - - /** - * Sets callback for basic_return - * - * @param callable $callback - * @throws \InvalidArgumentException if $callback is not callable - */ - public function set_return_listener($callback) - { - if (false === is_callable($callback)) { - throw new \InvalidArgumentException(sprintf( - 'Given callback "%s" should be callable. %s type was given.', - $callback, - gettype($callback) - )); - } - - $this->basic_return_callback = $callback; - } - - /** - * Sets a handler which called for any message nack'ed by the server, with the AMQPMessage as first argument. - * - * @param callable $callback - * @throws \InvalidArgumentException - */ - public function set_nack_handler($callback) - { - if (false === is_callable($callback)) { - throw new \InvalidArgumentException(sprintf( - 'Given callback "%s" should be callable. %s type was given.', - $callback, - gettype($callback) - )); - } - - $this->nack_handler = $callback; - } - - /** - * Sets a handler which called for any message ack'ed by the server, with the AMQPMessage as first argument. - * - * @param callable $callback - * @throws \InvalidArgumentException - */ - public function set_ack_handler($callback) - { - if (false === is_callable($callback)) { - throw new \InvalidArgumentException(sprintf( - 'Given callback "%s" should be callable. %s type was given.', - $callback, - gettype($callback) - )); - } - - $this->ack_handler = $callback; - } -} diff --git a/lib/PhpAmqpLib/Channel/AbstractChannel.php b/lib/PhpAmqpLib/Channel/AbstractChannel.php deleted file mode 100644 index fdc02163b0..0000000000 --- a/lib/PhpAmqpLib/Channel/AbstractChannel.php +++ /dev/null @@ -1,419 +0,0 @@ -connection = $connection; - $this->channel_id = $channel_id; - $connection->channels[$channel_id] = $this; - $this->frame_queue = array(); // Lower level queue for frames - $this->method_queue = array(); // Higher level queue for methods - $this->auto_decode = false; - $this->debug = defined('AMQP_DEBUG') ? AMQP_DEBUG : false; - - $this->msg_property_reader = new AMQPReader(null); - $this->wait_content_reader = new AMQPReader(null); - $this->dispatch_reader = new AMQPReader(null); - - $this->protocolVersion = self::getProtocolVersion(); - switch ($this->protocolVersion) { - case self::PROTOCOL_091: - self::$PROTOCOL_CONSTANTS_CLASS = 'PhpAmqpLib\Wire\Constants091'; - $c = self::$PROTOCOL_CONSTANTS_CLASS; - $this->amqp_protocol_header = $c::$AMQP_PROTOCOL_HEADER; - $this->protocolWriter = new Protocol091(); - $this->waitHelper = new Wait091(); - $this->methodMap = new MethodMap091(); - break; - case self::PROTOCOL_080: - self::$PROTOCOL_CONSTANTS_CLASS = 'PhpAmqpLib\Wire\Constants080'; - $c = self::$PROTOCOL_CONSTANTS_CLASS; - $this->amqp_protocol_header = $c::$AMQP_PROTOCOL_HEADER; - $this->protocolWriter = new Protocol080(); - $this->waitHelper = new Wait080(); - $this->methodMap = new MethodMap080(); - break; - default: - //this is logic exception (requires code changes to fix), so OutOfRange, not OutOfBounds or Runtime - throw new AMQPOutOfRangeException(sprintf('Protocol version %s not implemented.', $this->protocolVersion)); - } - } - - /** - * @return string - * @throws AMQPOutOfRangeException - */ - public static function getProtocolVersion() - { - $protocol = defined('AMQP_PROTOCOL') ? AMQP_PROTOCOL : self::PROTOCOL_091; - //adding check here to catch unknown protocol ASAP, as this method may be called from the outside - if (!in_array($protocol, array(self::PROTOCOL_080, self::PROTOCOL_091), TRUE)) { - throw new AMQPOutOfRangeException(sprintf('Protocol version %s not implemented.', $protocol)); - } - - return $protocol; - } - - /** - * @return string - */ - public function getChannelId() - { - return $this->channel_id; - } - - public function setBodySizeLimit($max_bytes) - { - $max_bytes = intval($max_bytes); - - if ( $max_bytes > 0 ) { - $this->body_size_max = $max_bytes; - } else { - $this->body_size_max = null; - } - } - - /** - * @return AbstractConnection - */ - public function getConnection() - { - return $this->connection; - } - - /** - * @return array - */ - public function getMethodQueue() - { - return $this->method_queue; - } - - /** - * @param string $method_sig - * @param string $args - * @param $content - * @return mixed - * @throws \PhpAmqpLib\Exception\AMQPRuntimeException - */ - public function dispatch($method_sig, $args, $content) - { - if (!$this->methodMap->valid_method($method_sig)) { - throw new AMQPRuntimeException(sprintf( - 'Unknown AMQP method "%s"', - $method_sig - )); - } - - $amqp_method = $this->methodMap->get_method($method_sig); - - if (!method_exists($this, $amqp_method)) { - throw new AMQPRuntimeException(sprintf( - 'Method: "%s" not implemented by class: %s', - $amqp_method, - get_class($this) - )); - } - - $this->dispatch_reader->reuse($args); - - if ($content == null) { - return call_user_func(array($this, $amqp_method), $this->dispatch_reader); - } - - return call_user_func(array($this, $amqp_method), $this->dispatch_reader, $content); - } - - /** - * @param int $timeout - * @return array|mixed - */ - public function next_frame($timeout = 0) - { - if ($this->debug) { - MiscHelper::debug_msg('waiting for a new frame'); - } - - if (!empty($this->frame_queue)) { - return array_shift($this->frame_queue); - } - - return $this->connection->wait_channel($this->channel_id, $timeout); - } - - /** - * @param $method_sig - * @param string $args - */ - protected function send_method_frame($method_sig, $args = '') - { - $this->connection->send_channel_method_frame($this->channel_id, $method_sig, $args); - } - - /** - * This is here for performance reasons to batch calls to fwrite from basic.publish - * - * @param $method_sig - * @param string $args - * @param null $pkt - * @return null|\PhpAmqpLib\Wire\AMQPWriter - */ - protected function prepare_method_frame($method_sig, $args = '', $pkt = null) - { - return $this->connection->prepare_channel_method_frame($this->channel_id, $method_sig, $args, $pkt); - } - - /** - * @return AMQPMessage - * @throws \PhpAmqpLib\Exception\AMQPRuntimeException - */ - public function wait_content() - { - $frm = $this->next_frame(); - $frame_type = $frm[0]; - $payload = $frm[1]; - - if ($frame_type != 2) { - throw new AMQPRuntimeException('Expecting Content header'); - } - - $this->wait_content_reader->reuse(mb_substr($payload, 0, 12, 'ASCII')); - - // $payload_reader = new AMQPReader(substr($payload,0,12)); - $class_id = $this->wait_content_reader->read_short(); - $weight = $this->wait_content_reader->read_short(); - - $body_size = $this->wait_content_reader->read_longlong(); - - //hack to avoid creating new instances of AMQPReader; - $this->msg_property_reader->reuse(mb_substr($payload, 12, mb_strlen($payload, 'ASCII') - 12, 'ASCII')); - - $msg = new AMQPMessage(); - $msg->load_properties($this->msg_property_reader); - $msg->body_size = $body_size; - - $body_parts = array(); - $body_received = 0; - while (bccomp($body_size, $body_received, 0) == 1) { - $frm = $this->next_frame(); - $frame_type = $frm[0]; - $payload = $frm[1]; - - if ($frame_type != 3) { - $PROTOCOL_CONSTANTS_CLASS = self::$PROTOCOL_CONSTANTS_CLASS; - throw new AMQPRuntimeException(sprintf( - 'Expecting Content body, received frame type %s (%s)', - $frame_type, - $PROTOCOL_CONSTANTS_CLASS::$FRAME_TYPES[$frame_type] - )); - } - - $body_received = bcadd($body_received, mb_strlen($payload, 'ASCII'), 0); - - if ( ! is_null($this->body_size_max) && $body_received > $this->body_size_max ) { - $msg->is_truncated = true; - continue; - } - - $body_parts[] = $payload; - } - - $msg->body = implode('', $body_parts); - - if ($this->auto_decode && isset($msg->content_encoding)) { - try { - $msg->body = $msg->body->decode($msg->content_encoding); - } catch (\Exception $e) { - if ($this->debug) { - MiscHelper::debug_msg('Ignoring body decoding exception: ' . $e->getMessage()); - } - } - } - - return $msg; - } - - /** - * Wait for some expected AMQP methods and dispatch to them. - * Unexpected methods are queued up for later calls to this PHP - * method. - * - * @param array $allowed_methods - * @param bool $non_blocking - * @param int $timeout - * @throws \PhpAmqpLib\Exception\AMQPOutOfBoundsException - * @throws \PhpAmqpLib\Exception\AMQPRuntimeException - * @return mixed - */ - public function wait($allowed_methods = null, $non_blocking = false, $timeout = 0) - { - $PROTOCOL_CONSTANTS_CLASS = self::$PROTOCOL_CONSTANTS_CLASS; - - if ($allowed_methods && $this->debug) { - MiscHelper::debug_msg('waiting for ' . implode(', ', $allowed_methods)); - } elseif ($this->debug) { - MiscHelper::debug_msg('waiting for any method'); - } - - //Process deferred methods - foreach ($this->method_queue as $qk => $queued_method) { - if ($this->debug) { - MiscHelper::debug_msg('checking queue method ' . $qk); - } - - $method_sig = $queued_method[0]; - if ($allowed_methods == null || in_array($method_sig, $allowed_methods)) { - unset($this->method_queue[$qk]); - - if ($this->debug) { - MiscHelper::debug_msg(sprintf( - 'Executing queued method: %s: %s', - $method_sig, - $PROTOCOL_CONSTANTS_CLASS::$GLOBAL_METHOD_NAMES[MiscHelper::methodSig($method_sig)] - )); - } - - return $this->dispatch($queued_method[0], $queued_method[1], $queued_method[2]); - } - } - - // No deferred methods? wait for new ones - while (true) { - $frm = $this->next_frame($timeout); - $frame_type = $frm[0]; - $payload = $frm[1]; - - if ($frame_type != 1) { - throw new AMQPRuntimeException(sprintf( - 'Expecting AMQP method, received frame type: %s (%s)', - $frame_type, - $PROTOCOL_CONSTANTS_CLASS::$FRAME_TYPES[$frame_type] - )); - } - - if (mb_strlen($payload, 'ASCII') < 4) { - throw new AMQPOutOfBoundsException('Method frame too short'); - } - - $method_sig_array = unpack('n2', mb_substr($payload, 0, 4, 'ASCII')); - $method_sig = '' . $method_sig_array[1] . ',' . $method_sig_array[2]; - $args = mb_substr($payload, 4, mb_strlen($payload, 'ASCII') - 4, 'ASCII'); - - if ($this->debug) { - MiscHelper::debug_msg(sprintf( - '> %s: %s', - $method_sig, - $PROTOCOL_CONSTANTS_CLASS::$GLOBAL_METHOD_NAMES[MiscHelper::methodSig($method_sig)] - )); - } - - if (in_array($method_sig, $PROTOCOL_CONSTANTS_CLASS::$CONTENT_METHODS)) { - $content = $this->wait_content(); - } else { - $content = null; - } - - if ($allowed_methods == null || - in_array($method_sig, $allowed_methods) || - in_array($method_sig, $PROTOCOL_CONSTANTS_CLASS::$CLOSE_METHODS) - ) { - return $this->dispatch($method_sig, $args, $content); - } - - // Wasn't what we were looking for? save it for later - if ($this->debug) { - MiscHelper::debug_msg('Queueing for later: $method_sig: ' - . $PROTOCOL_CONSTANTS_CLASS::$GLOBAL_METHOD_NAMES[MiscHelper::methodSig($method_sig)]); - } - $this->method_queue[] = array($method_sig, $args, $content); - - if ($non_blocking) { - break; - } - } - } - - /** - * @param $handler - * @param array $arguments - */ - protected function dispatch_to_handler($handler, array $arguments) - { - if (is_callable($handler)) { - call_user_func_array($handler, $arguments); - } - } -} diff --git a/lib/PhpAmqpLib/Connection/AMQPConnection.php b/lib/PhpAmqpLib/Connection/AMQPConnection.php deleted file mode 100644 index 9e4f67a783..0000000000 --- a/lib/PhpAmqpLib/Connection/AMQPConnection.php +++ /dev/null @@ -1,13 +0,0 @@ -connect(); - - return parent::getSocket(); - } - - /** - * {@inheritdoc} - */ - public function channel($channel_id = null) - { - $this->connect(); - - return parent::channel($channel_id); - } - - /** - * @return null|\PhpAmqpLib\Wire\IO\AbstractIO - */ - protected function getIO() - { - if (!$this->io) { - $this->connect(); - } - - return $this->io; - } - - /** - * Should the connection be attempted during construction? - * - * @return bool - */ - public function connectOnConstruct() - { - return false; - } -} diff --git a/lib/PhpAmqpLib/Connection/AMQPSSLConnection.php b/lib/PhpAmqpLib/Connection/AMQPSSLConnection.php deleted file mode 100644 index ddfebc2fa2..0000000000 --- a/lib/PhpAmqpLib/Connection/AMQPSSLConnection.php +++ /dev/null @@ -1,56 +0,0 @@ -create_ssl_context($ssl_options); - parent::__construct( - $host, - $port, - $user, - $password, - $vhost, - isset($options['insist']) ? $options['insist'] : false, - isset($options['login_method']) ? $options['login_method'] : 'AMQPLAIN', - isset($options['login_response']) ? $options['login_response'] : null, - isset($options['locale']) ? $options['locale'] : 'en_US', - isset($options['connection_timeout']) ? $options['connection_timeout'] : 3, - isset($options['read_write_timeout']) ? $options['read_write_timeout'] : 3, - $ssl_context, - isset($options['keepalive']) ? $options['keepalive'] : false, - isset($options['heartbeat']) ? $options['heartbeat'] : 0 - ); - } - - /** - * @param $options - * @return resource - */ - private function create_ssl_context($options) - { - $ssl_context = stream_context_create(); - foreach ($options as $k => $v) { - stream_context_set_option($ssl_context, 'ssl', $k, $v); - } - - return $ssl_context; - } -} diff --git a/lib/PhpAmqpLib/Connection/AMQPSocketConnection.php b/lib/PhpAmqpLib/Connection/AMQPSocketConnection.php deleted file mode 100644 index 54e8814462..0000000000 --- a/lib/PhpAmqpLib/Connection/AMQPSocketConnection.php +++ /dev/null @@ -1,38 +0,0 @@ -construct_params = func_get_args(); - } -} diff --git a/lib/PhpAmqpLib/Connection/AbstractConnection.php b/lib/PhpAmqpLib/Connection/AbstractConnection.php deleted file mode 100644 index d2dfe00e21..0000000000 --- a/lib/PhpAmqpLib/Connection/AbstractConnection.php +++ /dev/null @@ -1,972 +0,0 @@ - array('S', 'AMQPLib'), - 'platform' => array('S', 'PHP'), - 'version' => array('S', '2.4'), - 'information' => array('S', ''), - 'copyright' => array('S', ''), - 'capabilities' => array( - 'F', - array( - 'authentication_failure_close' => array('t', true), - 'publisher_confirms' => array('t', true), - 'consumer_cancel_notify' => array('t', true), - 'exchange_exchange_bindings' => array('t', true), - 'basic.nack' => array('t', true), - 'connection.blocked' => array('t', true) - ) - ) - ); - - /** @var AMQPChannel[] */ - public $channels = array(); - - /** @var int */ - protected $version_major; - - /** @var int */ - protected $version_minor; - - /** @var array */ - protected $server_properties; - - /** @var array */ - protected $mechanisms; - - /** @var array */ - protected $locales; - - /** @var bool */ - protected $wait_tune_ok; - - /** @var string */ - protected $known_hosts; - - /** @var AMQPReader */ - protected $input; - - /** @var string */ - protected $vhost; - - /** @var bool */ - protected $insist; - - /** @var string */ - protected $login_method; - - /** @var AMQPWriter */ - protected $login_response; - - /** @var string */ - protected $locale; - - /** @var int */ - protected $heartbeat; - - /** @var SocketIO */ - protected $sock; - - /** @var int */ - protected $channel_max = 65535; - - /** @var int */ - protected $frame_max = 131072; - - /** @var array Constructor parameters for clone */ - protected $construct_params; - - /** @var bool Close the connection in destructor */ - protected $close_on_destruct = true; - - /** @var bool Maintain connection status */ - protected $is_connected = false; - - /** @var \PhpAmqpLib\Wire\IO\AbstractIO */ - protected $io; - - /** @var \PhpAmqpLib\Wire\AMQPReader */ - protected $wait_frame_reader; - - /** @var callable Handles connection blocking from the server */ - private $connection_block_handler; - - /** @var callable Handles connection unblocking from the server */ - private $connection_unblock_handler; - - /** - * Circular buffer to speed up prepare_content(). - * Max size limited by $prepare_content_cache_max_size. - * - * @var array - * @see prepare_content() - */ - private $prepare_content_cache; - - /** @var int Maximal size of $prepare_content_cache */ - private $prepare_content_cache_max_size; - - /** - * @param AbstractConnection $user - * @param string $password - * @param string $vhost - * @param bool $insist - * @param string $login_method - * @param null $login_response - * @param string $locale - * @param AbstractIO $io - * @param int $heartbeat - * @throws \Exception - */ - public function __construct( - $user, - $password, - $vhost = '/', - $insist = false, - $login_method = 'AMQPLAIN', - $login_response = null, - $locale = 'en_US', - AbstractIO $io, - $heartbeat = 0 - ) { - // save the params for the use of __clone - $this->construct_params = func_get_args(); - - $this->wait_frame_reader = new AMQPReader(null); - $this->vhost = $vhost; - $this->insist = $insist; - $this->login_method = $login_method; - $this->login_response = $login_response; - $this->locale = $locale; - $this->io = $io; - $this->heartbeat = $heartbeat; - - if ($user && $password) { - $this->login_response = new AMQPWriter(); - $this->login_response->write_table(array( - 'LOGIN' => array('S', $user), - 'PASSWORD' => array('S', $password) - )); - - // Skip the length - $responseValue = $this->login_response->getvalue(); - $this->login_response = mb_substr($responseValue, 4, mb_strlen($responseValue, 'ASCII') - 4, 'ASCII'); - - } else { - $this->login_response = null; - } - - $this->prepare_content_cache = array(); - $this->prepare_content_cache_max_size = 100; - - // Lazy Connection waits on connecting - if ($this->connectOnConstruct()) { - $this->connect(); - } - } - - /** - * Connects to the AMQP server - */ - protected function connect() - { - try { - // Loop until we connect - while (!$this->isConnected()) { - // Assume we will connect, until we dont - $this->setIsConnected(true); - - // Connect the socket - $this->getIO()->connect(); - - $this->channels = array(); - // The connection object itself is treated as channel 0 - parent::__construct($this, 0); - - $this->input = new AMQPReader(null, $this->getIO()); - - $this->write($this->amqp_protocol_header); - $this->wait(array($this->waitHelper->get_wait('connection.start'))); - $this->x_start_ok(self::$LIBRARY_PROPERTIES, $this->login_method, $this->login_response, $this->locale); - - $this->wait_tune_ok = true; - while ($this->wait_tune_ok) { - $this->wait(array( - $this->waitHelper->get_wait('connection.secure'), - $this->waitHelper->get_wait('connection.tune') - )); - } - - $host = $this->x_open($this->vhost, '', $this->insist); - if (!$host) { - return; // we weren't redirected - } - - $this->setIsConnected(false); - $this->closeChannels(); - - // we were redirected, close the socket, loop and try again - $this->close_socket(); - } - - } catch (\Exception $e) { - // Something went wrong, set the connection status - $this->setIsConnected(false); - $this->closeChannels(); - throw $e; // Rethrow exception - } - } - - /** - * Reconnects using the original connection settings. - * This will not recreate any channels that were established previously - */ - public function reconnect() - { - // Try to close the AMQP connection - $this->safeClose(); - // Reconnect the socket/stream then AMQP - $this->getIO()->reconnect(); - $this->setIsConnected(false); // getIO can initiate the connection setting via LazyConnection, set it here to be sure - $this->connect(); - } - - /** - * Cloning will use the old properties to make a new connection to the same server - */ - public function __clone() - { - call_user_func_array(array($this, '__construct'), $this->construct_params); - } - - public function __destruct() - { - if ($this->close_on_destruct) { - $this->safeClose(); - } - } - - /** - * Attempts to close the connection safely - */ - protected function safeClose() - { - try { - if (isset($this->input) && $this->input) { - $this->close(); - } - } catch (\Exception $e) { - // Nothing here - } - } - - /** - * @param int $sec - * @param int $usec - * @return mixed - */ - public function select($sec, $usec = 0) - { - return $this->getIO()->select($sec, $usec); - } - - /** - * Allows to not close the connection - * it's useful after the fork when you don't want to close parent process connection - * - * @param bool $close - */ - public function set_close_on_destruct($close = true) - { - $this->close_on_destruct = (bool) $close; - } - - protected function close_input() - { - if ($this->debug) { - MiscHelper::debug_msg('closing input'); - } - - if (!is_null($this->input)) { - $this->input->close(); - $this->input = null; - } - } - - protected function close_socket() - { - if ($this->debug) { - MiscHelper::debug_msg('closing socket'); - } - - if (!is_null($this->getIO())) { - $this->getIO()->close(); - } - } - - /** - * @param $data - */ - public function write($data) - { - if ($this->debug) { - MiscHelper::debug_msg(sprintf( - '< [hex]: %s%s', - PHP_EOL, - MiscHelper::hexdump($data, $htmloutput = false, $uppercase = true, $return = true) - )); - } - - try { - $this->getIO()->write($data); - } catch (AMQPRuntimeException $e) { - $this->setIsConnected(false); - throw $e; - } - } - - protected function do_close() - { - $this->setIsConnected(false); - $this->close_input(); - $this->close_socket(); - } - - /** - * @return int - * @throws \PhpAmqpLib\Exception\AMQPRuntimeException - */ - public function get_free_channel_id() - { - for ($i = 1; $i <= $this->channel_max; $i++) { - if (!isset($this->channels[$i])) { - return $i; - } - } - - throw new AMQPRuntimeException('No free channel ids'); - } - - /** - * @param string $channel - * @param int $class_id - * @param int $weight - * @param int $body_size - * @param string $packed_properties - * @param string $body - * @param AMQPWriter $pkt - */ - public function send_content($channel, $class_id, $weight, $body_size, $packed_properties, $body, $pkt = null) - { - $this->prepare_content($channel, $class_id, $weight, $body_size, $packed_properties, $body, $pkt); - $this->write($pkt->getvalue()); - } - - /** - * Returns a new AMQPWriter or mutates the provided $pkt - * - * @param string $channel - * @param int $class_id - * @param int $weight - * @param int $body_size - * @param string $packed_properties - * @param string $body - * @param AMQPWriter $pkt - * @return AMQPWriter - */ - public function prepare_content($channel, $class_id, $weight, $body_size, $packed_properties, $body, $pkt = null) - { - if (empty($pkt)) { - $pkt = new AMQPWriter(); - } - - // Content already prepared ? - $key_cache = sprintf( - '%s|%s|%s|%s', - $channel, - $packed_properties, - $class_id, - $weight - ); - if (!isset($this->prepare_content_cache[$key_cache])) { - $w = new AMQPWriter(); - $w->write_octet(2); - $w->write_short($channel); - $w->write_long(mb_strlen($packed_properties, 'ASCII') + 12); - $w->write_short($class_id); - $w->write_short($weight); - $this->prepare_content_cache[$key_cache] = $w->getvalue(); - if (count($this->prepare_content_cache) > $this->prepare_content_cache_max_size) { - reset($this->prepare_content_cache); - $old_key = key($this->prepare_content_cache); - unset($this->prepare_content_cache[$old_key]); - } - } - $pkt->write($this->prepare_content_cache[$key_cache]); - - $pkt->write_longlong($body_size); - $pkt->write($packed_properties); - - $pkt->write_octet(0xCE); - - - // memory efficiency: walk the string instead of biting it. good for very large packets (close in size to memory_limit setting) - $position = 0; - $bodyLength = mb_strlen($body,'ASCII'); - while ($position <= $bodyLength) { - $payload = mb_substr($body, $position, $this->frame_max - 8, 'ASCII'); - $position += $this->frame_max - 8; - - $pkt->write_octet(3); - $pkt->write_short($channel); - $pkt->write_long(mb_strlen($payload, 'ASCII')); - - $pkt->write($payload); - - $pkt->write_octet(0xCE); - } - - return $pkt; - } - - /** - * @param $channel - * @param $method_sig - * @param string $args - * @param null $pkt - */ - protected function send_channel_method_frame($channel, $method_sig, $args = '', $pkt = null) - { - $pkt = $this->prepare_channel_method_frame($channel, $method_sig, $args, $pkt); - - $this->write($pkt->getvalue()); - - if ($this->debug) { - $PROTOCOL_CONSTANTS_CLASS = self::$PROTOCOL_CONSTANTS_CLASS; - MiscHelper::debug_msg(sprintf( - '< %s: %s', - MiscHelper::methodSig($method_sig), - $PROTOCOL_CONSTANTS_CLASS::$GLOBAL_METHOD_NAMES[MiscHelper::methodSig($method_sig)] - )); - } - } - - /** - * Returns a new AMQPWriter or mutates the provided $pkt - * - * @param $channel - * @param $method_sig - * @param string $args - * @param AMQPWriter $pkt - * @return null|AMQPWriter - */ - protected function prepare_channel_method_frame($channel, $method_sig, $args = '', $pkt = null) - { - if ($args instanceof AMQPWriter) { - $args = $args->getvalue(); - } - - if (empty($pkt)) { - $pkt = new AMQPWriter(); - } - - $pkt->write_octet(1); - $pkt->write_short($channel); - $pkt->write_long(mb_strlen($args, 'ASCII') + 4); // 4 = length of class_id and method_id - // in payload - - $pkt->write_short($method_sig[0]); // class_id - $pkt->write_short($method_sig[1]); // method_id - $pkt->write($args); - - $pkt->write_octet(0xCE); - - if ($this->debug) { - $PROTOCOL_CONSTANTS_CLASS = self::$PROTOCOL_CONSTANTS_CLASS; - MiscHelper::debug_msg(sprintf( - '< %s: %s', - MiscHelper::methodSig($method_sig), - $PROTOCOL_CONSTANTS_CLASS::$GLOBAL_METHOD_NAMES[MiscHelper::methodSig($method_sig)] - )); - } - - return $pkt; - } - - /** - * Waits for a frame from the server - * - * @param int $timeout - * @return array - * @throws \Exception - * @throws \PhpAmqpLib\Exception\AMQPTimeoutException - * @throws \PhpAmqpLib\Exception\AMQPRuntimeException - */ - protected function wait_frame($timeout = 0) - { - $currentTimeout = $this->input->getTimeout(); - $this->input->setTimeout($timeout); - - try { - // frame_type + channel_id + size - $this->wait_frame_reader->reuse( - $this->input->read(AMQPReader::OCTET + AMQPReader::SHORT + AMQPReader::LONG) - ); - - $frame_type = $this->wait_frame_reader->read_octet(); - $channel = $this->wait_frame_reader->read_short(); - $size = $this->wait_frame_reader->read_long(); - - // payload + ch - $this->wait_frame_reader->reuse($this->input->read(AMQPReader::OCTET + (int) $size)); - - $payload = $this->wait_frame_reader->read($size); - $ch = $this->wait_frame_reader->read_octet(); - - } catch (AMQPTimeoutException $e) { - $this->input->setTimeout($currentTimeout); - throw $e; - } - - $this->input->setTimeout($currentTimeout); - - if ($ch != 0xCE) { - throw new AMQPRuntimeException(sprintf( - 'Framing error, unexpected byte: %x', - $ch - )); - } - - return array($frame_type, $channel, $payload); - } - - /** - * Waits for a frame from the server destined for a particular channel. - * - * @param string $channel_id - * @param int $timeout - * @return array - */ - protected function wait_channel($channel_id, $timeout = 0) - { - while (true) { - list($frame_type, $frame_channel, $payload) = $this->wait_frame($timeout); - - if ($frame_channel === 0 && $frame_type === 8) { - // skip heartbeat frames - continue; - - } else { - - if ($frame_channel == $channel_id) { - return array($frame_type, $payload); - } - - // Not the channel we were looking for. Queue this frame - //for later, when the other channel is looking for frames. - array_push($this->channels[$frame_channel]->frame_queue, array($frame_type, $payload)); - - // If we just queued up a method for channel 0 (the Connection - // itself) it's probably a close method in reaction to some - // error, so deal with it right away. - if (($frame_type == 1) && ($frame_channel == 0)) { - $this->wait(); - } - } - } - } - - /** - * Fetches a channel object identified by the numeric channel_id, or - * create that object if it doesn't already exist. - * - * @param string $channel_id - * @return AMQPChannel - */ - public function channel($channel_id = null) - { - if (isset($this->channels[$channel_id])) { - return $this->channels[$channel_id]; - } else { - $channel_id = $channel_id ? $channel_id : $this->get_free_channel_id(); - $ch = new AMQPChannel($this->connection, $channel_id); - $this->channels[$channel_id] = $ch; - - return $ch; - } - } - - /** - * Requests a connection close - * - * @param int $reply_code - * @param string $reply_text - * @param array $method_sig - * @return mixed|null - */ - public function close($reply_code = 0, $reply_text = '', $method_sig = array(0, 0)) - { - if (!$this->protocolWriter || !$this->isConnected()) { - return null; - } - - $this->closeChannels(); - - list($class_id, $method_id, $args) = $this->protocolWriter->connectionClose( - $reply_code, - $reply_text, - $method_sig[0], - $method_sig[1] - ); - $this->send_method_frame(array($class_id, $method_id), $args); - - $this->setIsConnected(false); - - return $this->wait(array( - $this->waitHelper->get_wait('connection.close_ok') - )); - } - - /** - * @param $table - * @return string - */ - public static function dump_table($table) - { - $tokens = array(); - foreach ($table as $name => $value) { - switch ($value[0]) { - case 'D': - $val = $value[1]->n . 'E' . $value[1]->e; - break; - case 'F': - $val = '(' . self::dump_table($value[1]) . ')'; - break; - case 'T': - $val = date('Y-m-d H:i:s', $value[1]); - break; - default: - $val = $value[1]; - } - $tokens[] = $name . '=' . $val; - } - - return implode(', ', $tokens); - } - - /** - * @param AMQPReader $args - * @throws \PhpAmqpLib\Exception\AMQPProtocolConnectionException - */ - protected function connection_close($args) - { - $reply_code = $args->read_short(); - $reply_text = $args->read_shortstr(); - $class_id = $args->read_short(); - $method_id = $args->read_short(); - - $this->x_close_ok(); - - throw new AMQPProtocolConnectionException($reply_code, $reply_text, array($class_id, $method_id)); - } - - /** - * Confirms a connection close - */ - protected function x_close_ok() - { - $this->send_method_frame( - explode(',', $this->waitHelper->get_wait('connection.close_ok')) - ); - $this->do_close(); - } - - /** - * Confirm a connection close - */ - protected function connection_close_ok($args) - { - $this->do_close(); - } - - /** - * @param string $virtual_host - * @param string $capabilities - * @param bool $insist - * @return mixed - */ - protected function x_open($virtual_host, $capabilities = '', $insist = false) - { - $args = new AMQPWriter(); - $args->write_shortstr($virtual_host); - $args->write_shortstr($capabilities); - $args->write_bits(array($insist)); - $this->send_method_frame(array(10, 40), $args); - - $wait = array( - $this->waitHelper->get_wait('connection.open_ok') - ); - - if ($this->protocolVersion == '0.8') { - $wait[] = $this->waitHelper->get_wait('connection.redirect'); - } - - return $this->wait($wait); - } - - /** - * Signals that the connection is ready - * - * @param AMQPReader $args - */ - protected function connection_open_ok($args) - { - $this->known_hosts = $args->read_shortstr(); - if ($this->debug) { - MiscHelper::debug_msg('Open OK! known_hosts: ' . $this->known_hosts); - } - } - - /** - * Asks the client to use a different server - * - * @param AMQPReader $args - * @return string - */ - protected function connection_redirect($args) - { - $host = $args->read_shortstr(); - $this->known_hosts = $args->read_shortstr(); - if ($this->debug) { - MiscHelper::debug_msg(sprintf( - 'Redirected to [%s], known_hosts [%s]', - $host, - $this->known_hosts - )); - } - - return $host; - } - - /** - * Security mechanism challenge - * - * @param AMQPReader $args - */ - protected function connection_secure($args) - { - $challenge = $args->read_longstr(); - } - - /** - * Security mechanism response - */ - protected function x_secure_ok($response) - { - $args = new AMQPWriter(); - $args->write_longstr($response); - $this->send_method_frame(array(10, 21), $args); - } - - /** - * Starts connection negotiation - * - * @param AMQPReader $args - */ - protected function connection_start($args) - { - $this->version_major = $args->read_octet(); - $this->version_minor = $args->read_octet(); - $this->server_properties = $args->read_table(); - $this->mechanisms = explode(' ', $args->read_longstr()); - $this->locales = explode(' ', $args->read_longstr()); - - if ($this->debug) { - MiscHelper::debug_msg(sprintf( - 'Start from server, version: %d.%d, properties: %s, mechanisms: %s, locales: %s', - $this->version_major, - $this->version_minor, - self::dump_table($this->server_properties), - implode(', ', $this->mechanisms), - implode(', ', $this->locales) - )); - } - } - - /** - * @param $client_properties - * @param $mechanism - * @param $response - * @param $locale - */ - protected function x_start_ok($client_properties, $mechanism, $response, $locale) - { - $args = new AMQPWriter(); - $args->write_table($client_properties); - $args->write_shortstr($mechanism); - $args->write_longstr($response); - $args->write_shortstr($locale); - $this->send_method_frame(array(10, 11), $args); - } - - /** - * Proposes connection tuning parameters - * - * @param AMQPReader $args - */ - protected function connection_tune($args) - { - $v = $args->read_short(); - if ($v) { - $this->channel_max = $v; - } - - $v = $args->read_long(); - if ($v) { - $this->frame_max = $v; - } - - // use server proposed value if not set - if ($this->heartbeat === null) { - $this->heartbeat = $args->read_short(); - } - - $this->x_tune_ok($this->channel_max, $this->frame_max, $this->heartbeat); - } - - /** - * Negotiates connection tuning parameters - * - * @param $channel_max - * @param $frame_max - * @param $heartbeat - */ - protected function x_tune_ok($channel_max, $frame_max, $heartbeat) - { - $args = new AMQPWriter(); - $args->write_short($channel_max); - $args->write_long($frame_max); - $args->write_short($heartbeat); - $this->send_method_frame(array(10, 31), $args); - $this->wait_tune_ok = false; - } - - /** - * @return SocketIO - */ - public function getSocket() - { - return $this->io->getSocket(); - } - - /** - * @return \PhpAmqpLib\Wire\IO\AbstractIO - */ - protected function getIO() - { - return $this->io; - } - - /** - * Handles connection blocked notifications - * - * @param AMQPReader $args - */ - protected function connection_blocked(AMQPReader $args) - { - // Call the block handler and pass in the reason - $this->dispatch_to_handler($this->connection_block_handler, array($args->read_shortstr())); - } - - /** - * Handles connection unblocked notifications - */ - protected function connection_unblocked(AMQPReader $args) - { - // No args to an unblock event - $this->dispatch_to_handler($this->connection_unblock_handler, array()); - } - - /** - * Sets a handler which is called whenever a connection.block is sent from the server - * - * @param callable $callback - */ - public function set_connection_block_handler($callback) - { - $this->connection_block_handler = $callback; - } - - /** - * Sets a handler which is called whenever a connection.block is sent from the server - * - * @param callable $callback - */ - public function set_connection_unblock_handler($callback) - { - $this->connection_unblock_handler = $callback; - } - - /** - * Gets the connection status - * - * @return bool - */ - public function isConnected() - { - return $this->is_connected; - } - - /** - * Set the connection status - * - * @param bool $is_connected - */ - protected function setIsConnected($is_connected) - { - $this->is_connected = $is_connected; - } - - /** - * Closes all available channels - */ - protected function closeChannels() - { - foreach ($this->channels as $key => $channel) { - // channels[0] is this connection object, so don't close it yet - if ($key === 0) { - continue; - } - try { - $channel->close(); - } catch (\Exception $e) { - /* Ignore closing errors */ - } - } - } - - /** - * Should the connection be attempted during construction? - * - * @return bool - */ - public function connectOnConstruct() - { - return true; - } -} diff --git a/lib/PhpAmqpLib/Exception/AMQPBasicCancelException.php b/lib/PhpAmqpLib/Exception/AMQPBasicCancelException.php deleted file mode 100644 index 51d7b3e970..0000000000 --- a/lib/PhpAmqpLib/Exception/AMQPBasicCancelException.php +++ /dev/null @@ -1,16 +0,0 @@ -consumerTag = $consumerTag; - } -} diff --git a/lib/PhpAmqpLib/Exception/AMQPChannelException.php b/lib/PhpAmqpLib/Exception/AMQPChannelException.php deleted file mode 100644 index b6ca39e5d1..0000000000 --- a/lib/PhpAmqpLib/Exception/AMQPChannelException.php +++ /dev/null @@ -1,9 +0,0 @@ -amqp_reply_code = $reply_code; // redundant, but kept for BC - $this->amqp_reply_text = $reply_text; // redundant, but kept for BC - $this->amqp_method_sig = $method_sig; - - $ms = MiscHelper::methodSig($method_sig); - $PROTOCOL_CONSTANTS_CLASS = AbstractChannel::$PROTOCOL_CONSTANTS_CLASS; - $mn = isset($PROTOCOL_CONSTANTS_CLASS::$GLOBAL_METHOD_NAMES[$ms]) - ? $PROTOCOL_CONSTANTS_CLASS::$GLOBAL_METHOD_NAMES[$ms] - : $mn = ''; - - $this->args = array($reply_code, $reply_text, $method_sig, $mn); - } -} diff --git a/lib/PhpAmqpLib/Exception/AMQPExceptionInterface.php b/lib/PhpAmqpLib/Exception/AMQPExceptionInterface.php deleted file mode 100644 index 74d61992dd..0000000000 --- a/lib/PhpAmqpLib/Exception/AMQPExceptionInterface.php +++ /dev/null @@ -1,6 +0,0 @@ -amqp_reply_code = $reply_code; // redundant, but kept for BC - $this->amqp_reply_text = $reply_text; // redundant, but kept for BC - $this->amqp_method_sig = $method_sig; - - $ms = MiscHelper::methodSig($method_sig); - - $PROTOCOL_CONSTANTS_CLASS = AbstractChannel::$PROTOCOL_CONSTANTS_CLASS; - $mn = isset($PROTOCOL_CONSTANTS_CLASS::$GLOBAL_METHOD_NAMES[$ms]) - ? $PROTOCOL_CONSTANTS_CLASS::$GLOBAL_METHOD_NAMES[$ms] - : $mn = ''; - - $this->args = array($reply_code, $reply_text, $method_sig, $mn); - } -} diff --git a/lib/PhpAmqpLib/Exception/AMQPRuntimeException.php b/lib/PhpAmqpLib/Exception/AMQPRuntimeException.php deleted file mode 100644 index ef0dcff063..0000000000 --- a/lib/PhpAmqpLib/Exception/AMQPRuntimeException.php +++ /dev/null @@ -1,6 +0,0 @@ - - * @author Peter Waller - * @link http://aidanlister.com/repos/v/function.hexdump.php - * - * @param string $data The string to be dumped - * @param bool $htmloutput Set to false for non-HTML output - * @param bool $uppercase Set to true for uppercase hex - * @param bool $return Set to true to return the dump - * @return string - */ - public static function hexdump($data, $htmloutput = true, $uppercase = false, $return = false) - { - // Init - $hexi = ''; - $ascii = ''; - $dump = $htmloutput ? '
        ' : '';
        -        $offset = 0;
        -        $len = mb_strlen($data, 'ASCII');
        -
        -        // Upper or lower case hexidecimal
        -        $hexFormat = $uppercase ? 'X' : 'x';
        -
        -        // Iterate string
        -        for ($i = $j = 0; $i < $len; $i++) {
        -            // Convert to hexidecimal
        -            // We must use concatenation here because the $hexFormat value
        -            // is needed for sprintf() to parse the format
        -            $hexi .= sprintf('%02' .  $hexFormat . ' ', ord($data[$i]));
        -
        -            // Replace non-viewable bytes with '.'
        -            if (ord($data[$i]) >= 32) {
        -                $ascii .= $htmloutput ? htmlentities($data[$i]) : $data[$i];
        -            } else {
        -                $ascii .= '.';
        -            }
        -
        -            // Add extra column spacing
        -            if ($j === 7) {
        -                $hexi .= ' ';
        -                $ascii .= ' ';
        -            }
        -
        -            // Add row
        -            if (++$j === 16 || $i === $len - 1) {
        -                // Join the hexi / ascii output
        -                // We must use concatenation here because the $hexFormat value
        -                // is needed for sprintf() to parse the format
        -                $dump .= sprintf('%04' . $hexFormat . '  %-49s  %s', $offset, $hexi, $ascii);
        -
        -                // Reset vars
        -                $hexi = $ascii = '';
        -                $offset += 16;
        -                $j = 0;
        -
        -                // Add newline
        -                if ($i !== $len - 1) {
        -                    $dump .= PHP_EOL;
        -                }
        -            }
        -        }
        -
        -        // Finish dump
        -        $dump .= $htmloutput ? '
        ' : ''; - $dump .= PHP_EOL; - - if ($return) { - return $dump; - } - - echo $dump; - } -} diff --git a/lib/PhpAmqpLib/Helper/Protocol/MethodMap080.php b/lib/PhpAmqpLib/Helper/Protocol/MethodMap080.php deleted file mode 100644 index a43c3f27d7..0000000000 --- a/lib/PhpAmqpLib/Helper/Protocol/MethodMap080.php +++ /dev/null @@ -1,120 +0,0 @@ - 'connection_start', - '10,11' => 'connection_start_ok', - '10,20' => 'connection_secure', - '10,21' => 'connection_secure_ok', - '10,30' => 'connection_tune', - '10,31' => 'connection_tune_ok', - '10,40' => 'connection_open', - '10,41' => 'connection_open_ok', - '10,50' => 'connection_redirect', - '10,60' => 'connection_close', - '10,61' => 'connection_close_ok', - '20,10' => 'channel_open', - '20,11' => 'channel_open_ok', - '20,20' => 'channel_flow', - '20,21' => 'channel_flow_ok', - '20,30' => 'channel_alert', - '20,40' => 'channel_close', - '20,41' => 'channel_close_ok', - '30,10' => 'access_request', - '30,11' => 'access_request_ok', - '40,10' => 'exchange_declare', - '40,11' => 'exchange_declare_ok', - '40,20' => 'exchange_delete', - '40,21' => 'exchange_delete_ok', - '50,10' => 'queue_declare', - '50,11' => 'queue_declare_ok', - '50,20' => 'queue_bind', - '50,21' => 'queue_bind_ok', - '50,30' => 'queue_purge', - '50,31' => 'queue_purge_ok', - '50,40' => 'queue_delete', - '50,41' => 'queue_delete_ok', - '50,50' => 'queue_unbind', - '50,51' => 'queue_unbind_ok', - '60,10' => 'basic_qos', - '60,11' => 'basic_qos_ok', - '60,20' => 'basic_consume', - '60,21' => 'basic_consume_ok', - '60,30' => 'basic_cancel', - '60,31' => 'basic_cancel_ok', - '60,40' => 'basic_publish', - '60,50' => 'basic_return', - '60,60' => 'basic_deliver', - '60,70' => 'basic_get', - '60,71' => 'basic_get_ok', - '60,72' => 'basic_get_empty', - '60,80' => 'basic_ack', - '60,90' => 'basic_reject', - '60,100' => 'basic_recover_async', - '60,110' => 'basic_recover', - '60,111' => 'basic_recover_ok', - '70,10' => 'file_qos', - '70,11' => 'file_qos_ok', - '70,20' => 'file_consume', - '70,21' => 'file_consume_ok', - '70,30' => 'file_cancel', - '70,31' => 'file_cancel_ok', - '70,40' => 'file_open', - '70,41' => 'file_open_ok', - '70,50' => 'file_stage', - '70,60' => 'file_publish', - '70,70' => 'file_return', - '70,80' => 'file_deliver', - '70,90' => 'file_ack', - '70,100' => 'file_reject', - '80,10' => 'stream_qos', - '80,11' => 'stream_qos_ok', - '80,20' => 'stream_consume', - '80,21' => 'stream_consume_ok', - '80,30' => 'stream_cancel', - '80,31' => 'stream_cancel_ok', - '80,40' => 'stream_publish', - '80,50' => 'stream_return', - '80,60' => 'stream_deliver', - '90,10' => 'tx_select', - '90,11' => 'tx_select_ok', - '90,20' => 'tx_commit', - '90,21' => 'tx_commit_ok', - '90,30' => 'tx_rollback', - '90,31' => 'tx_rollback_ok', - '100,10' => 'dtx_select', - '100,11' => 'dtx_select_ok', - '100,20' => 'dtx_start', - '100,21' => 'dtx_start_ok', - '110,10' => 'tunnel_request', - '120,10' => 'test_integer', - '120,11' => 'test_integer_ok', - '120,20' => 'test_string', - '120,21' => 'test_string_ok', - '120,30' => 'test_table', - '120,31' => 'test_table_ok', - '120,40' => 'test_content', - '120,41' => 'test_content_ok', - ); - - - - public function get_method($method_sig) - { - return $this->method_map[$method_sig]; - } - - - - public function valid_method($method_sig) - { - return array_key_exists($method_sig, $this->method_map); - } - -} diff --git a/lib/PhpAmqpLib/Helper/Protocol/MethodMap091.php b/lib/PhpAmqpLib/Helper/Protocol/MethodMap091.php deleted file mode 100644 index e3c4e79994..0000000000 --- a/lib/PhpAmqpLib/Helper/Protocol/MethodMap091.php +++ /dev/null @@ -1,91 +0,0 @@ - 'connection_start', - '10,11' => 'connection_start_ok', - '10,20' => 'connection_secure', - '10,21' => 'connection_secure_ok', - '10,30' => 'connection_tune', - '10,31' => 'connection_tune_ok', - '10,40' => 'connection_open', - '10,41' => 'connection_open_ok', - '10,50' => 'connection_close', - '10,51' => 'connection_close_ok', - '10,60' => 'connection_blocked', - '10,61' => 'connection_unblocked', - '20,10' => 'channel_open', - '20,11' => 'channel_open_ok', - '20,20' => 'channel_flow', - '20,21' => 'channel_flow_ok', - '20,40' => 'channel_close', - '20,41' => 'channel_close_ok', - '30,10' => 'access_request', - '30,11' => 'access_request_ok', - '40,10' => 'exchange_declare', - '40,11' => 'exchange_declare_ok', - '40,20' => 'exchange_delete', - '40,21' => 'exchange_delete_ok', - '40,30' => 'exchange_bind', - '40,31' => 'exchange_bind_ok', - '40,40' => 'exchange_unbind', - '40,51' => 'exchange_unbind_ok', - '50,10' => 'queue_declare', - '50,11' => 'queue_declare_ok', - '50,20' => 'queue_bind', - '50,21' => 'queue_bind_ok', - '50,30' => 'queue_purge', - '50,31' => 'queue_purge_ok', - '50,40' => 'queue_delete', - '50,41' => 'queue_delete_ok', - '50,50' => 'queue_unbind', - '50,51' => 'queue_unbind_ok', - '60,10' => 'basic_qos', - '60,11' => 'basic_qos_ok', - '60,20' => 'basic_consume', - '60,21' => 'basic_consume_ok', - '60,30' => 'basic_cancel_from_server', - '60,31' => 'basic_cancel_ok', - '60,40' => 'basic_publish', - '60,50' => 'basic_return', - '60,60' => 'basic_deliver', - '60,70' => 'basic_get', - '60,71' => 'basic_get_ok', - '60,72' => 'basic_get_empty', - '60,80' => 'basic_ack_from_server', - '60,90' => 'basic_reject', - '60,100' => 'basic_recover_async', - '60,110' => 'basic_recover', - '60,111' => 'basic_recover_ok', - '60,120' => 'basic_nack_from_server', - '90,10' => 'tx_select', - '90,11' => 'tx_select_ok', - '90,20' => 'tx_commit', - '90,21' => 'tx_commit_ok', - '90,30' => 'tx_rollback', - '90,31' => 'tx_rollback_ok', - '85,10' => 'confirm_select', - '85,11' => 'confirm_select_ok', - ); - - - - public function get_method($method_sig) - { - return $this->method_map[$method_sig]; - } - - - - public function valid_method($method_sig) - { - return array_key_exists($method_sig, $this->method_map); - } - -} diff --git a/lib/PhpAmqpLib/Helper/Protocol/Protocol080.php b/lib/PhpAmqpLib/Helper/Protocol/Protocol080.php deleted file mode 100644 index f22a94e947..0000000000 --- a/lib/PhpAmqpLib/Helper/Protocol/Protocol080.php +++ /dev/null @@ -1,1260 +0,0 @@ -write_octet($version_major); - $args->write_octet($version_minor); - $args->write_table(empty($server_properties) ? array() : $server_properties); - $args->write_longstr($mechanisms); - $args->write_longstr($locales); - return array(10, 10, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function connectionStartOk($args) - { - $ret = array(); - $ret[] = $args->read_table(); - $ret[] = $args->read_shortstr(); - $ret[] = $args->read_longstr(); - $ret[] = $args->read_shortstr(); - return $ret; - } - - - - /** - * @return array - */ - public function connectionSecure($challenge) - { - $args = new AMQPWriter(); - $args->write_longstr($challenge); - return array(10, 20, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function connectionSecureOk($args) - { - $ret = array(); - $ret[] = $args->read_longstr(); - return $ret; - } - - - - /** - * @return array - */ - public function connectionTune($channel_max = 0, $frame_max = 0, $heartbeat = 0) - { - $args = new AMQPWriter(); - $args->write_short($channel_max); - $args->write_long($frame_max); - $args->write_short($heartbeat); - return array(10, 30, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function connectionTuneOk($args) - { - $ret = array(); - $ret[] = $args->read_short(); - $ret[] = $args->read_long(); - $ret[] = $args->read_short(); - return $ret; - } - - - - /** - * @return array - */ - public function connectionOpen($virtual_host = '/', $capabilities = '', $insist = false) - { - $args = new AMQPWriter(); - $args->write_shortstr($virtual_host); - $args->write_shortstr($capabilities); - $args->write_bits(array($insist)); - return array(10, 40, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function connectionOpenOk($args) - { - $ret = array(); - $ret[] = $args->read_shortstr(); - return $ret; - } - - - - /** - * @return array - */ - public function connectionRedirect($host, $known_hosts = '') - { - $args = new AMQPWriter(); - $args->write_shortstr($host); - $args->write_shortstr($known_hosts); - return array(10, 50, $args); - } - - - - /** - * @return array - */ - public function connectionClose($reply_code, $reply_text = '', $class_id, $method_id) - { - $args = new AMQPWriter(); - $args->write_short($reply_code); - $args->write_shortstr($reply_text); - $args->write_short($class_id); - $args->write_short($method_id); - return array(10, 60, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function connectionCloseOk($args) - { - $ret = array(); - return $ret; - } - - - - /** - * @return array - */ - public function channelOpen($out_of_band = '') - { - $args = new AMQPWriter(); - $args->write_shortstr($out_of_band); - return array(20, 10, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function channelOpenOk($args) - { - $ret = array(); - return $ret; - } - - - - /** - * @return array - */ - public function channelFlow($active) - { - $args = new AMQPWriter(); - $args->write_bits(array($active)); - return array(20, 20, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function channelFlowOk($args) - { - $ret = array(); - $ret[] = $args->read_bit(); - return $ret; - } - - - - /** - * @return array - */ - public function channelAlert($reply_code, $reply_text = '', $details = array()) - { - $args = new AMQPWriter(); - $args->write_short($reply_code); - $args->write_shortstr($reply_text); - $args->write_table(empty($details) ? array() : $details); - return array(20, 30, $args); - } - - - - /** - * @return array - */ - public function channelClose($reply_code, $reply_text = '', $class_id, $method_id) - { - $args = new AMQPWriter(); - $args->write_short($reply_code); - $args->write_shortstr($reply_text); - $args->write_short($class_id); - $args->write_short($method_id); - return array(20, 40, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function channelCloseOk($args) - { - $ret = array(); - return $ret; - } - - - - /** - * @return array - */ - public function accessRequest($realm = '/data', $exclusive = false, $passive = true, $active = true, $write = true, $read = true) - { - $args = new AMQPWriter(); - $args->write_shortstr($realm); - $args->write_bits(array($exclusive, $passive, $active, $write, $read)); - return array(30, 10, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function accessRequestOk($args) - { - $ret = array(); - $ret[] = $args->read_short(); - return $ret; - } - - - - /** - * @return array - */ - public function exchangeDeclare($ticket = 1, $exchange, $type = 'direct', $passive = false, $durable = false, $auto_delete = false, $internal = false, $nowait = false, $arguments = array()) - { - $args = new AMQPWriter(); - $args->write_short($ticket); - $args->write_shortstr($exchange); - $args->write_shortstr($type); - $args->write_bits(array($passive, $durable, $auto_delete, $internal, $nowait)); - $args->write_table(empty($arguments) ? array() : $arguments); - return array(40, 10, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function exchangeDeclareOk($args) - { - $ret = array(); - return $ret; - } - - - - /** - * @return array - */ - public function exchangeDelete($ticket = 1, $exchange, $if_unused = false, $nowait = false) - { - $args = new AMQPWriter(); - $args->write_short($ticket); - $args->write_shortstr($exchange); - $args->write_bits(array($if_unused, $nowait)); - return array(40, 20, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function exchangeDeleteOk($args) - { - $ret = array(); - return $ret; - } - - - - /** - * @return array - */ - public function queueDeclare($ticket = 1, $queue = '', $passive = false, $durable = false, $exclusive = false, $auto_delete = false, $nowait = false, $arguments = array()) - { - $args = new AMQPWriter(); - $args->write_short($ticket); - $args->write_shortstr($queue); - $args->write_bits(array($passive, $durable, $exclusive, $auto_delete, $nowait)); - $args->write_table(empty($arguments) ? array() : $arguments); - return array(50, 10, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function queueDeclareOk($args) - { - $ret = array(); - $ret[] = $args->read_shortstr(); - $ret[] = $args->read_long(); - $ret[] = $args->read_long(); - return $ret; - } - - - - /** - * @return array - */ - public function queueBind($ticket = 1, $queue = '', $exchange, $routing_key = '', $nowait = false, $arguments = array()) - { - $args = new AMQPWriter(); - $args->write_short($ticket); - $args->write_shortstr($queue); - $args->write_shortstr($exchange); - $args->write_shortstr($routing_key); - $args->write_bits(array($nowait)); - $args->write_table(empty($arguments) ? array() : $arguments); - return array(50, 20, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function queueBindOk($args) - { - $ret = array(); - return $ret; - } - - - - /** - * @return array - */ - public function queuePurge($ticket = 1, $queue = '', $nowait = false) - { - $args = new AMQPWriter(); - $args->write_short($ticket); - $args->write_shortstr($queue); - $args->write_bits(array($nowait)); - return array(50, 30, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function queuePurgeOk($args) - { - $ret = array(); - $ret[] = $args->read_long(); - return $ret; - } - - - - /** - * @return array - */ - public function queueDelete($ticket = 1, $queue = '', $if_unused = false, $if_empty = false, $nowait = false) - { - $args = new AMQPWriter(); - $args->write_short($ticket); - $args->write_shortstr($queue); - $args->write_bits(array($if_unused, $if_empty, $nowait)); - return array(50, 40, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function queueDeleteOk($args) - { - $ret = array(); - $ret[] = $args->read_long(); - return $ret; - } - - - - /** - * @return array - */ - public function queueUnbind($ticket = 1, $queue = '', $exchange, $routing_key = '', $arguments = array()) - { - $args = new AMQPWriter(); - $args->write_short($ticket); - $args->write_shortstr($queue); - $args->write_shortstr($exchange); - $args->write_shortstr($routing_key); - $args->write_table(empty($arguments) ? array() : $arguments); - return array(50, 50, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function queueUnbindOk($args) - { - $ret = array(); - return $ret; - } - - - - /** - * @return array - */ - public function basicQos($prefetch_size = 0, $prefetch_count = 0, $global = false) - { - $args = new AMQPWriter(); - $args->write_long($prefetch_size); - $args->write_short($prefetch_count); - $args->write_bits(array($global)); - return array(60, 10, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function basicQosOk($args) - { - $ret = array(); - return $ret; - } - - - - /** - * @return array - */ - public function basicConsume($ticket = 1, $queue = '', $consumer_tag = '', $no_local = false, $no_ack = false, $exclusive = false, $nowait = false) - { - $args = new AMQPWriter(); - $args->write_short($ticket); - $args->write_shortstr($queue); - $args->write_shortstr($consumer_tag); - $args->write_bits(array($no_local, $no_ack, $exclusive, $nowait)); - return array(60, 20, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function basicConsumeOk($args) - { - $ret = array(); - $ret[] = $args->read_shortstr(); - return $ret; - } - - - - /** - * @return array - */ - public function basicCancel($consumer_tag, $nowait = false) - { - $args = new AMQPWriter(); - $args->write_shortstr($consumer_tag); - $args->write_bits(array($nowait)); - return array(60, 30, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function basicCancelOk($args) - { - $ret = array(); - $ret[] = $args->read_shortstr(); - return $ret; - } - - - - /** - * @return array - */ - public function basicPublish($ticket = 1, $exchange = '', $routing_key = '', $mandatory = false, $immediate = false) - { - $args = new AMQPWriter(); - $args->write_short($ticket); - $args->write_shortstr($exchange); - $args->write_shortstr($routing_key); - $args->write_bits(array($mandatory, $immediate)); - return array(60, 40, $args); - } - - - - /** - * @return array - */ - public function basicReturn($reply_code, $reply_text = '', $exchange, $routing_key) - { - $args = new AMQPWriter(); - $args->write_short($reply_code); - $args->write_shortstr($reply_text); - $args->write_shortstr($exchange); - $args->write_shortstr($routing_key); - return array(60, 50, $args); - } - - - - /** - * @return array - */ - public function basicDeliver($consumer_tag, $delivery_tag, $redelivered = false, $exchange, $routing_key) - { - $args = new AMQPWriter(); - $args->write_shortstr($consumer_tag); - $args->write_longlong($delivery_tag); - $args->write_bits(array($redelivered)); - $args->write_shortstr($exchange); - $args->write_shortstr($routing_key); - return array(60, 60, $args); - } - - - - /** - * @return array - */ - public function basicGet($ticket = 1, $queue = '', $no_ack = false) - { - $args = new AMQPWriter(); - $args->write_short($ticket); - $args->write_shortstr($queue); - $args->write_bits(array($no_ack)); - return array(60, 70, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function basicGetOk($args) - { - $ret = array(); - $ret[] = $args->read_longlong(); - $ret[] = $args->read_bit(); - $ret[] = $args->read_shortstr(); - $ret[] = $args->read_shortstr(); - $ret[] = $args->read_long(); - return $ret; - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function basicGetEmpty($args) - { - $ret = array(); - $ret[] = $args->read_shortstr(); - return $ret; - } - - - - /** - * @return array - */ - public function basicAck($delivery_tag = 0, $multiple = false) - { - $args = new AMQPWriter(); - $args->write_longlong($delivery_tag); - $args->write_bits(array($multiple)); - return array(60, 80, $args); - } - - - - /** - * @return array - */ - public function basicReject($delivery_tag, $requeue = true) - { - $args = new AMQPWriter(); - $args->write_longlong($delivery_tag); - $args->write_bits(array($requeue)); - return array(60, 90, $args); - } - - - - /** - * @return array - */ - public function basicRecoverAsync($requeue = false) - { - $args = new AMQPWriter(); - $args->write_bits(array($requeue)); - return array(60, 100, $args); - } - - - - /** - * @return array - */ - public function basicRecover($requeue = false) - { - $args = new AMQPWriter(); - $args->write_bits(array($requeue)); - return array(60, 110, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function basicRecoverOk($args) - { - $ret = array(); - return $ret; - } - - - - /** - * @return array - */ - public function fileQos($prefetch_size = 0, $prefetch_count = 0, $global = false) - { - $args = new AMQPWriter(); - $args->write_long($prefetch_size); - $args->write_short($prefetch_count); - $args->write_bits(array($global)); - return array(70, 10, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function fileQosOk($args) - { - $ret = array(); - return $ret; - } - - - - /** - * @return array - */ - public function fileConsume($ticket = 1, $queue = '', $consumer_tag = '', $no_local = false, $no_ack = false, $exclusive = false, $nowait = false) - { - $args = new AMQPWriter(); - $args->write_short($ticket); - $args->write_shortstr($queue); - $args->write_shortstr($consumer_tag); - $args->write_bits(array($no_local, $no_ack, $exclusive, $nowait)); - return array(70, 20, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function fileConsumeOk($args) - { - $ret = array(); - $ret[] = $args->read_shortstr(); - return $ret; - } - - - - /** - * @return array - */ - public function fileCancel($consumer_tag, $nowait = false) - { - $args = new AMQPWriter(); - $args->write_shortstr($consumer_tag); - $args->write_bits(array($nowait)); - return array(70, 30, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function fileCancelOk($args) - { - $ret = array(); - $ret[] = $args->read_shortstr(); - return $ret; - } - - - - /** - * @return array - */ - public function fileOpen($identifier, $content_size) - { - $args = new AMQPWriter(); - $args->write_shortstr($identifier); - $args->write_longlong($content_size); - return array(70, 40, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function fileOpenOk($args) - { - $ret = array(); - $ret[] = $args->read_longlong(); - return $ret; - } - - - - /** - * @return array - */ - public function fileStage() - { - $args = new AMQPWriter(); - return array(70, 50, $args); - } - - - - /** - * @return array - */ - public function filePublish($ticket = 1, $exchange = '', $routing_key = '', $mandatory = false, $immediate = false, $identifier) - { - $args = new AMQPWriter(); - $args->write_short($ticket); - $args->write_shortstr($exchange); - $args->write_shortstr($routing_key); - $args->write_bits(array($mandatory, $immediate)); - $args->write_shortstr($identifier); - return array(70, 60, $args); - } - - - - /** - * @return array - */ - public function fileReturn($reply_code = 200, $reply_text = '', $exchange, $routing_key) - { - $args = new AMQPWriter(); - $args->write_short($reply_code); - $args->write_shortstr($reply_text); - $args->write_shortstr($exchange); - $args->write_shortstr($routing_key); - return array(70, 70, $args); - } - - - - /** - * @return array - */ - public function fileDeliver($consumer_tag, $delivery_tag, $redelivered = false, $exchange, $routing_key, $identifier) - { - $args = new AMQPWriter(); - $args->write_shortstr($consumer_tag); - $args->write_longlong($delivery_tag); - $args->write_bits(array($redelivered)); - $args->write_shortstr($exchange); - $args->write_shortstr($routing_key); - $args->write_shortstr($identifier); - return array(70, 80, $args); - } - - - - /** - * @return array - */ - public function fileAck($delivery_tag = 0, $multiple = false) - { - $args = new AMQPWriter(); - $args->write_longlong($delivery_tag); - $args->write_bits(array($multiple)); - return array(70, 90, $args); - } - - - - /** - * @return array - */ - public function fileReject($delivery_tag, $requeue = true) - { - $args = new AMQPWriter(); - $args->write_longlong($delivery_tag); - $args->write_bits(array($requeue)); - return array(70, 100, $args); - } - - - - /** - * @return array - */ - public function streamQos($prefetch_size = 0, $prefetch_count = 0, $consume_rate = 0, $global = false) - { - $args = new AMQPWriter(); - $args->write_long($prefetch_size); - $args->write_short($prefetch_count); - $args->write_long($consume_rate); - $args->write_bits(array($global)); - return array(80, 10, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function streamQosOk($args) - { - $ret = array(); - return $ret; - } - - - - /** - * @return array - */ - public function streamConsume($ticket = 1, $queue = '', $consumer_tag = '', $no_local = false, $exclusive = false, $nowait = false) - { - $args = new AMQPWriter(); - $args->write_short($ticket); - $args->write_shortstr($queue); - $args->write_shortstr($consumer_tag); - $args->write_bits(array($no_local, $exclusive, $nowait)); - return array(80, 20, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function streamConsumeOk($args) - { - $ret = array(); - $ret[] = $args->read_shortstr(); - return $ret; - } - - - - /** - * @return array - */ - public function streamCancel($consumer_tag, $nowait = false) - { - $args = new AMQPWriter(); - $args->write_shortstr($consumer_tag); - $args->write_bits(array($nowait)); - return array(80, 30, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function streamCancelOk($args) - { - $ret = array(); - $ret[] = $args->read_shortstr(); - return $ret; - } - - - - /** - * @return array - */ - public function streamPublish($ticket = 1, $exchange = '', $routing_key = '', $mandatory = false, $immediate = false) - { - $args = new AMQPWriter(); - $args->write_short($ticket); - $args->write_shortstr($exchange); - $args->write_shortstr($routing_key); - $args->write_bits(array($mandatory, $immediate)); - return array(80, 40, $args); - } - - - - /** - * @return array - */ - public function streamReturn($reply_code = 200, $reply_text = '', $exchange, $routing_key) - { - $args = new AMQPWriter(); - $args->write_short($reply_code); - $args->write_shortstr($reply_text); - $args->write_shortstr($exchange); - $args->write_shortstr($routing_key); - return array(80, 50, $args); - } - - - - /** - * @return array - */ - public function streamDeliver($consumer_tag, $delivery_tag, $exchange, $queue) - { - $args = new AMQPWriter(); - $args->write_shortstr($consumer_tag); - $args->write_longlong($delivery_tag); - $args->write_shortstr($exchange); - $args->write_shortstr($queue); - return array(80, 60, $args); - } - - - - /** - * @return array - */ - public function txSelect() - { - $args = new AMQPWriter(); - return array(90, 10, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function txSelectOk($args) - { - $ret = array(); - return $ret; - } - - - - /** - * @return array - */ - public function txCommit() - { - $args = new AMQPWriter(); - return array(90, 20, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function txCommitOk($args) - { - $ret = array(); - return $ret; - } - - - - /** - * @return array - */ - public function txRollback() - { - $args = new AMQPWriter(); - return array(90, 30, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function txRollbackOk($args) - { - $ret = array(); - return $ret; - } - - - - /** - * @return array - */ - public function dtxSelect() - { - $args = new AMQPWriter(); - return array(100, 10, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function dtxSelectOk($args) - { - $ret = array(); - return $ret; - } - - - - /** - * @return array - */ - public function dtxStart($dtx_identifier) - { - $args = new AMQPWriter(); - $args->write_shortstr($dtx_identifier); - return array(100, 20, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function dtxStartOk($args) - { - $ret = array(); - return $ret; - } - - - - /** - * @return array - */ - public function tunnelRequest($meta_data) - { - $args = new AMQPWriter(); - $args->write_table(empty($meta_data) ? array() : $meta_data); - return array(110, 10, $args); - } - - - - /** - * @return array - */ - public function testInteger($integer_1, $integer_2, $integer_3, $integer_4, $operation) - { - $args = new AMQPWriter(); - $args->write_octet($integer_1); - $args->write_short($integer_2); - $args->write_long($integer_3); - $args->write_longlong($integer_4); - $args->write_octet($operation); - return array(120, 10, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function testIntegerOk($args) - { - $ret = array(); - $ret[] = $args->read_longlong(); - return $ret; - } - - - - /** - * @return array - */ - public function testString($string_1, $string_2, $operation) - { - $args = new AMQPWriter(); - $args->write_shortstr($string_1); - $args->write_longstr($string_2); - $args->write_octet($operation); - return array(120, 20, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function testStringOk($args) - { - $ret = array(); - $ret[] = $args->read_longstr(); - return $ret; - } - - - - /** - * @return array - */ - public function testTable($table, $integer_op, $string_op) - { - $args = new AMQPWriter(); - $args->write_table(empty($table) ? array() : $table); - $args->write_octet($integer_op); - $args->write_octet($string_op); - return array(120, 30, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function testTableOk($args) - { - $ret = array(); - $ret[] = $args->read_longlong(); - $ret[] = $args->read_longstr(); - return $ret; - } - - - - /** - * @return array - */ - public function testContent() - { - $args = new AMQPWriter(); - return array(120, 40, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function testContentOk($args) - { - $ret = array(); - $ret[] = $args->read_long(); - return $ret; - } - -} diff --git a/lib/PhpAmqpLib/Helper/Protocol/Protocol091.php b/lib/PhpAmqpLib/Helper/Protocol/Protocol091.php deleted file mode 100644 index fcca7333da..0000000000 --- a/lib/PhpAmqpLib/Helper/Protocol/Protocol091.php +++ /dev/null @@ -1,870 +0,0 @@ -write_octet($version_major); - $args->write_octet($version_minor); - $args->write_table(empty($server_properties) ? array() : $server_properties); - $args->write_longstr($mechanisms); - $args->write_longstr($locales); - return array(10, 10, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function connectionStartOk($args) - { - $ret = array(); - $ret[] = $args->read_table(); - $ret[] = $args->read_shortstr(); - $ret[] = $args->read_longstr(); - $ret[] = $args->read_shortstr(); - return $ret; - } - - - - /** - * @return array - */ - public function connectionSecure($challenge) - { - $args = new AMQPWriter(); - $args->write_longstr($challenge); - return array(10, 20, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function connectionSecureOk($args) - { - $ret = array(); - $ret[] = $args->read_longstr(); - return $ret; - } - - - - /** - * @return array - */ - public function connectionTune($channel_max = 0, $frame_max = 0, $heartbeat = 0) - { - $args = new AMQPWriter(); - $args->write_short($channel_max); - $args->write_long($frame_max); - $args->write_short($heartbeat); - return array(10, 30, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function connectionTuneOk($args) - { - $ret = array(); - $ret[] = $args->read_short(); - $ret[] = $args->read_long(); - $ret[] = $args->read_short(); - return $ret; - } - - - - /** - * @return array - */ - public function connectionOpen($virtual_host = '/', $capabilities = '', $insist = false) - { - $args = new AMQPWriter(); - $args->write_shortstr($virtual_host); - $args->write_shortstr($capabilities); - $args->write_bits(array($insist)); - return array(10, 40, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function connectionOpenOk($args) - { - $ret = array(); - $ret[] = $args->read_shortstr(); - return $ret; - } - - - - /** - * @return array - */ - public function connectionClose($reply_code, $reply_text = '', $class_id, $method_id) - { - $args = new AMQPWriter(); - $args->write_short($reply_code); - $args->write_shortstr($reply_text); - $args->write_short($class_id); - $args->write_short($method_id); - return array(10, 50, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function connectionCloseOk($args) - { - $ret = array(); - return $ret; - } - - - - /** - * @return array - */ - public function connectionBlocked($reason = '') - { - $args = new AMQPWriter(); - $args->write_shortstr($reason); - return array(10, 60, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function connectionUnblocked($args) - { - $ret = array(); - return $ret; - } - - - - /** - * @return array - */ - public function channelOpen($out_of_band = '') - { - $args = new AMQPWriter(); - $args->write_shortstr($out_of_band); - return array(20, 10, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function channelOpenOk($args) - { - $ret = array(); - $ret[] = $args->read_longstr(); - return $ret; - } - - - - /** - * @return array - */ - public function channelFlow($active) - { - $args = new AMQPWriter(); - $args->write_bits(array($active)); - return array(20, 20, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function channelFlowOk($args) - { - $ret = array(); - $ret[] = $args->read_bit(); - return $ret; - } - - - - /** - * @return array - */ - public function channelClose($reply_code, $reply_text = '', $class_id, $method_id) - { - $args = new AMQPWriter(); - $args->write_short($reply_code); - $args->write_shortstr($reply_text); - $args->write_short($class_id); - $args->write_short($method_id); - return array(20, 40, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function channelCloseOk($args) - { - $ret = array(); - return $ret; - } - - - - /** - * @return array - */ - public function accessRequest($realm = '/data', $exclusive = false, $passive = true, $active = true, $write = true, $read = true) - { - $args = new AMQPWriter(); - $args->write_shortstr($realm); - $args->write_bits(array($exclusive, $passive, $active, $write, $read)); - return array(30, 10, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function accessRequestOk($args) - { - $ret = array(); - $ret[] = $args->read_short(); - return $ret; - } - - - - /** - * @return array - */ - public function exchangeDeclare($ticket = 0, $exchange, $type = 'direct', $passive = false, $durable = false, $auto_delete = false, $internal = false, $nowait = false, $arguments = array()) - { - $args = new AMQPWriter(); - $args->write_short($ticket); - $args->write_shortstr($exchange); - $args->write_shortstr($type); - $args->write_bits(array($passive, $durable, $auto_delete, $internal, $nowait)); - $args->write_table(empty($arguments) ? array() : $arguments); - return array(40, 10, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function exchangeDeclareOk($args) - { - $ret = array(); - return $ret; - } - - - - /** - * @return array - */ - public function exchangeDelete($ticket = 0, $exchange, $if_unused = false, $nowait = false) - { - $args = new AMQPWriter(); - $args->write_short($ticket); - $args->write_shortstr($exchange); - $args->write_bits(array($if_unused, $nowait)); - return array(40, 20, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function exchangeDeleteOk($args) - { - $ret = array(); - return $ret; - } - - - - /** - * @return array - */ - public function exchangeBind($ticket = 0, $destination, $source, $routing_key = '', $nowait = false, $arguments = array()) - { - $args = new AMQPWriter(); - $args->write_short($ticket); - $args->write_shortstr($destination); - $args->write_shortstr($source); - $args->write_shortstr($routing_key); - $args->write_bits(array($nowait)); - $args->write_table(empty($arguments) ? array() : $arguments); - return array(40, 30, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function exchangeBindOk($args) - { - $ret = array(); - return $ret; - } - - - - /** - * @return array - */ - public function exchangeUnbind($ticket = 0, $destination, $source, $routing_key = '', $nowait = false, $arguments = array()) - { - $args = new AMQPWriter(); - $args->write_short($ticket); - $args->write_shortstr($destination); - $args->write_shortstr($source); - $args->write_shortstr($routing_key); - $args->write_bits(array($nowait)); - $args->write_table(empty($arguments) ? array() : $arguments); - return array(40, 40, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function exchangeUnbindOk($args) - { - $ret = array(); - return $ret; - } - - - - /** - * @return array - */ - public function queueDeclare($ticket = 0, $queue = '', $passive = false, $durable = false, $exclusive = false, $auto_delete = false, $nowait = false, $arguments = array()) - { - $args = new AMQPWriter(); - $args->write_short($ticket); - $args->write_shortstr($queue); - $args->write_bits(array($passive, $durable, $exclusive, $auto_delete, $nowait)); - $args->write_table(empty($arguments) ? array() : $arguments); - return array(50, 10, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function queueDeclareOk($args) - { - $ret = array(); - $ret[] = $args->read_shortstr(); - $ret[] = $args->read_long(); - $ret[] = $args->read_long(); - return $ret; - } - - - - /** - * @return array - */ - public function queueBind($ticket = 0, $queue = '', $exchange, $routing_key = '', $nowait = false, $arguments = array()) - { - $args = new AMQPWriter(); - $args->write_short($ticket); - $args->write_shortstr($queue); - $args->write_shortstr($exchange); - $args->write_shortstr($routing_key); - $args->write_bits(array($nowait)); - $args->write_table(empty($arguments) ? array() : $arguments); - return array(50, 20, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function queueBindOk($args) - { - $ret = array(); - return $ret; - } - - - - /** - * @return array - */ - public function queuePurge($ticket = 0, $queue = '', $nowait = false) - { - $args = new AMQPWriter(); - $args->write_short($ticket); - $args->write_shortstr($queue); - $args->write_bits(array($nowait)); - return array(50, 30, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function queuePurgeOk($args) - { - $ret = array(); - $ret[] = $args->read_long(); - return $ret; - } - - - - /** - * @return array - */ - public function queueDelete($ticket = 0, $queue = '', $if_unused = false, $if_empty = false, $nowait = false) - { - $args = new AMQPWriter(); - $args->write_short($ticket); - $args->write_shortstr($queue); - $args->write_bits(array($if_unused, $if_empty, $nowait)); - return array(50, 40, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function queueDeleteOk($args) - { - $ret = array(); - $ret[] = $args->read_long(); - return $ret; - } - - - - /** - * @return array - */ - public function queueUnbind($ticket = 0, $queue = '', $exchange, $routing_key = '', $arguments = array()) - { - $args = new AMQPWriter(); - $args->write_short($ticket); - $args->write_shortstr($queue); - $args->write_shortstr($exchange); - $args->write_shortstr($routing_key); - $args->write_table(empty($arguments) ? array() : $arguments); - return array(50, 50, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function queueUnbindOk($args) - { - $ret = array(); - return $ret; - } - - - - /** - * @return array - */ - public function basicQos($prefetch_size = 0, $prefetch_count = 0, $global = false) - { - $args = new AMQPWriter(); - $args->write_long($prefetch_size); - $args->write_short($prefetch_count); - $args->write_bits(array($global)); - return array(60, 10, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function basicQosOk($args) - { - $ret = array(); - return $ret; - } - - - - /** - * @return array - */ - public function basicConsume($ticket = 0, $queue = '', $consumer_tag = '', $no_local = false, $no_ack = false, $exclusive = false, $nowait = false, $arguments = array()) - { - $args = new AMQPWriter(); - $args->write_short($ticket); - $args->write_shortstr($queue); - $args->write_shortstr($consumer_tag); - $args->write_bits(array($no_local, $no_ack, $exclusive, $nowait)); - $args->write_table(empty($arguments) ? array() : $arguments); - return array(60, 20, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function basicConsumeOk($args) - { - $ret = array(); - $ret[] = $args->read_shortstr(); - return $ret; - } - - - - /** - * @return array - */ - public function basicCancel($consumer_tag, $nowait = false) - { - $args = new AMQPWriter(); - $args->write_shortstr($consumer_tag); - $args->write_bits(array($nowait)); - return array(60, 30, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function basicCancelOk($args) - { - $ret = array(); - $ret[] = $args->read_shortstr(); - return $ret; - } - - - - /** - * @return array - */ - public function basicPublish($ticket = 0, $exchange = '', $routing_key = '', $mandatory = false, $immediate = false) - { - $args = new AMQPWriter(); - $args->write_short($ticket); - $args->write_shortstr($exchange); - $args->write_shortstr($routing_key); - $args->write_bits(array($mandatory, $immediate)); - return array(60, 40, $args); - } - - - - /** - * @return array - */ - public function basicReturn($reply_code, $reply_text = '', $exchange, $routing_key) - { - $args = new AMQPWriter(); - $args->write_short($reply_code); - $args->write_shortstr($reply_text); - $args->write_shortstr($exchange); - $args->write_shortstr($routing_key); - return array(60, 50, $args); - } - - - - /** - * @return array - */ - public function basicDeliver($consumer_tag, $delivery_tag, $redelivered = false, $exchange, $routing_key) - { - $args = new AMQPWriter(); - $args->write_shortstr($consumer_tag); - $args->write_longlong($delivery_tag); - $args->write_bits(array($redelivered)); - $args->write_shortstr($exchange); - $args->write_shortstr($routing_key); - return array(60, 60, $args); - } - - - - /** - * @return array - */ - public function basicGet($ticket = 0, $queue = '', $no_ack = false) - { - $args = new AMQPWriter(); - $args->write_short($ticket); - $args->write_shortstr($queue); - $args->write_bits(array($no_ack)); - return array(60, 70, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function basicGetOk($args) - { - $ret = array(); - $ret[] = $args->read_longlong(); - $ret[] = $args->read_bit(); - $ret[] = $args->read_shortstr(); - $ret[] = $args->read_shortstr(); - $ret[] = $args->read_long(); - return $ret; - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function basicGetEmpty($args) - { - $ret = array(); - $ret[] = $args->read_shortstr(); - return $ret; - } - - - - /** - * @return array - */ - public function basicAck($delivery_tag = 0, $multiple = false) - { - $args = new AMQPWriter(); - $args->write_longlong($delivery_tag); - $args->write_bits(array($multiple)); - return array(60, 80, $args); - } - - - - /** - * @return array - */ - public function basicReject($delivery_tag, $requeue = true) - { - $args = new AMQPWriter(); - $args->write_longlong($delivery_tag); - $args->write_bits(array($requeue)); - return array(60, 90, $args); - } - - - - /** - * @return array - */ - public function basicRecoverAsync($requeue = false) - { - $args = new AMQPWriter(); - $args->write_bits(array($requeue)); - return array(60, 100, $args); - } - - - - /** - * @return array - */ - public function basicRecover($requeue = false) - { - $args = new AMQPWriter(); - $args->write_bits(array($requeue)); - return array(60, 110, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function basicRecoverOk($args) - { - $ret = array(); - return $ret; - } - - - - /** - * @return array - */ - public function basicNack($delivery_tag = 0, $multiple = false, $requeue = true) - { - $args = new AMQPWriter(); - $args->write_longlong($delivery_tag); - $args->write_bits(array($multiple, $requeue)); - return array(60, 120, $args); - } - - - - /** - * @return array - */ - public function txSelect() - { - $args = new AMQPWriter(); - return array(90, 10, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function txSelectOk($args) - { - $ret = array(); - return $ret; - } - - - - /** - * @return array - */ - public function txCommit() - { - $args = new AMQPWriter(); - return array(90, 20, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function txCommitOk($args) - { - $ret = array(); - return $ret; - } - - - - /** - * @return array - */ - public function txRollback() - { - $args = new AMQPWriter(); - return array(90, 30, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function txRollbackOk($args) - { - $ret = array(); - return $ret; - } - - - - /** - * @return array - */ - public function confirmSelect($nowait = false) - { - $args = new AMQPWriter(); - $args->write_bits(array($nowait)); - return array(85, 10, $args); - } - - - - /** - * @param AMQPReader $args - * @return array - */ - public static function confirmSelectOk($args) - { - $ret = array(); - return $ret; - } - -} diff --git a/lib/PhpAmqpLib/Helper/Protocol/Wait080.php b/lib/PhpAmqpLib/Helper/Protocol/Wait080.php deleted file mode 100644 index 93badd2fbb..0000000000 --- a/lib/PhpAmqpLib/Helper/Protocol/Wait080.php +++ /dev/null @@ -1,113 +0,0 @@ - '10,10', - 'connection.start_ok' => '10,11', - 'connection.secure' => '10,20', - 'connection.secure_ok' => '10,21', - 'connection.tune' => '10,30', - 'connection.tune_ok' => '10,31', - 'connection.open' => '10,40', - 'connection.open_ok' => '10,41', - 'connection.redirect' => '10,50', - 'connection.close' => '10,60', - 'connection.close_ok' => '10,61', - 'channel.open' => '20,10', - 'channel.open_ok' => '20,11', - 'channel.flow' => '20,20', - 'channel.flow_ok' => '20,21', - 'channel.alert' => '20,30', - 'channel.close' => '20,40', - 'channel.close_ok' => '20,41', - 'access.request' => '30,10', - 'access.request_ok' => '30,11', - 'exchange.declare' => '40,10', - 'exchange.declare_ok' => '40,11', - 'exchange.delete' => '40,20', - 'exchange.delete_ok' => '40,21', - 'queue.declare' => '50,10', - 'queue.declare_ok' => '50,11', - 'queue.bind' => '50,20', - 'queue.bind_ok' => '50,21', - 'queue.purge' => '50,30', - 'queue.purge_ok' => '50,31', - 'queue.delete' => '50,40', - 'queue.delete_ok' => '50,41', - 'queue.unbind' => '50,50', - 'queue.unbind_ok' => '50,51', - 'basic.qos' => '60,10', - 'basic.qos_ok' => '60,11', - 'basic.consume' => '60,20', - 'basic.consume_ok' => '60,21', - 'basic.cancel' => '60,30', - 'basic.cancel_ok' => '60,31', - 'basic.publish' => '60,40', - 'basic.return' => '60,50', - 'basic.deliver' => '60,60', - 'basic.get' => '60,70', - 'basic.get_ok' => '60,71', - 'basic.get_empty' => '60,72', - 'basic.ack' => '60,80', - 'basic.reject' => '60,90', - 'basic.recover_async' => '60,100', - 'basic.recover' => '60,110', - 'basic.recover_ok' => '60,111', - 'file.qos' => '70,10', - 'file.qos_ok' => '70,11', - 'file.consume' => '70,20', - 'file.consume_ok' => '70,21', - 'file.cancel' => '70,30', - 'file.cancel_ok' => '70,31', - 'file.open' => '70,40', - 'file.open_ok' => '70,41', - 'file.stage' => '70,50', - 'file.publish' => '70,60', - 'file.return' => '70,70', - 'file.deliver' => '70,80', - 'file.ack' => '70,90', - 'file.reject' => '70,100', - 'stream.qos' => '80,10', - 'stream.qos_ok' => '80,11', - 'stream.consume' => '80,20', - 'stream.consume_ok' => '80,21', - 'stream.cancel' => '80,30', - 'stream.cancel_ok' => '80,31', - 'stream.publish' => '80,40', - 'stream.return' => '80,50', - 'stream.deliver' => '80,60', - 'tx.select' => '90,10', - 'tx.select_ok' => '90,11', - 'tx.commit' => '90,20', - 'tx.commit_ok' => '90,21', - 'tx.rollback' => '90,30', - 'tx.rollback_ok' => '90,31', - 'dtx.select' => '100,10', - 'dtx.select_ok' => '100,11', - 'dtx.start' => '100,20', - 'dtx.start_ok' => '100,21', - 'tunnel.request' => '110,10', - 'test.integer' => '120,10', - 'test.integer_ok' => '120,11', - 'test.string' => '120,20', - 'test.string_ok' => '120,21', - 'test.table' => '120,30', - 'test.table_ok' => '120,31', - 'test.content' => '120,40', - 'test.content_ok' => '120,41', - ); - - - - public function get_wait($method) - { - return $this->wait[$method]; - } - -} diff --git a/lib/PhpAmqpLib/Helper/Protocol/Wait091.php b/lib/PhpAmqpLib/Helper/Protocol/Wait091.php deleted file mode 100644 index 9533db9fae..0000000000 --- a/lib/PhpAmqpLib/Helper/Protocol/Wait091.php +++ /dev/null @@ -1,84 +0,0 @@ - '10,10', - 'connection.start_ok' => '10,11', - 'connection.secure' => '10,20', - 'connection.secure_ok' => '10,21', - 'connection.tune' => '10,30', - 'connection.tune_ok' => '10,31', - 'connection.open' => '10,40', - 'connection.open_ok' => '10,41', - 'connection.close' => '10,50', - 'connection.close_ok' => '10,51', - 'connection.blocked' => '10,60', - 'connection.unblocked' => '10,61', - 'channel.open' => '20,10', - 'channel.open_ok' => '20,11', - 'channel.flow' => '20,20', - 'channel.flow_ok' => '20,21', - 'channel.close' => '20,40', - 'channel.close_ok' => '20,41', - 'access.request' => '30,10', - 'access.request_ok' => '30,11', - 'exchange.declare' => '40,10', - 'exchange.declare_ok' => '40,11', - 'exchange.delete' => '40,20', - 'exchange.delete_ok' => '40,21', - 'exchange.bind' => '40,30', - 'exchange.bind_ok' => '40,31', - 'exchange.unbind' => '40,40', - 'exchange.unbind_ok' => '40,51', - 'queue.declare' => '50,10', - 'queue.declare_ok' => '50,11', - 'queue.bind' => '50,20', - 'queue.bind_ok' => '50,21', - 'queue.purge' => '50,30', - 'queue.purge_ok' => '50,31', - 'queue.delete' => '50,40', - 'queue.delete_ok' => '50,41', - 'queue.unbind' => '50,50', - 'queue.unbind_ok' => '50,51', - 'basic.qos' => '60,10', - 'basic.qos_ok' => '60,11', - 'basic.consume' => '60,20', - 'basic.consume_ok' => '60,21', - 'basic.cancel' => '60,30', - 'basic.cancel_ok' => '60,31', - 'basic.publish' => '60,40', - 'basic.return' => '60,50', - 'basic.deliver' => '60,60', - 'basic.get' => '60,70', - 'basic.get_ok' => '60,71', - 'basic.get_empty' => '60,72', - 'basic.ack' => '60,80', - 'basic.reject' => '60,90', - 'basic.recover_async' => '60,100', - 'basic.recover' => '60,110', - 'basic.recover_ok' => '60,111', - 'basic.nack' => '60,120', - 'tx.select' => '90,10', - 'tx.select_ok' => '90,11', - 'tx.commit' => '90,20', - 'tx.commit_ok' => '90,21', - 'tx.rollback' => '90,30', - 'tx.rollback_ok' => '90,31', - 'confirm.select' => '85,10', - 'confirm.select_ok' => '85,11', - ); - - - - public function get_wait($method) - { - return $this->wait[$method]; - } - -} diff --git a/lib/PhpAmqpLib/Message/AMQPMessage.php b/lib/PhpAmqpLib/Message/AMQPMessage.php deleted file mode 100644 index fca9b19204..0000000000 --- a/lib/PhpAmqpLib/Message/AMQPMessage.php +++ /dev/null @@ -1,57 +0,0 @@ - 'shortstr', - 'content_encoding' => 'shortstr', - 'application_headers' => 'table_object', - 'delivery_mode' => 'octet', - 'priority' => 'octet', - 'correlation_id' => 'shortstr', - 'reply_to' => 'shortstr', - 'expiration' => 'shortstr', - 'message_id' => 'shortstr', - 'timestamp' => 'timestamp', - 'type' => 'shortstr', - 'user_id' => 'shortstr', - 'app_id' => 'shortstr', - 'cluster_id' => 'shortstr', - ); - - /** - * @param string $body - * @param null $properties - */ - public function __construct($body = '', $properties = null) - { - $this->setBody($body); - parent::__construct($properties, static::$propertyDefinitions); - } - - /** - * Sets the message payload - * - * @param mixed $body - * @return $this - */ - public function setBody($body) - { - $this->body = $body; - } -} diff --git a/lib/PhpAmqpLib/Wire/AMQPAbstractCollection.php b/lib/PhpAmqpLib/Wire/AMQPAbstractCollection.php deleted file mode 100644 index 7789da5e45..0000000000 --- a/lib/PhpAmqpLib/Wire/AMQPAbstractCollection.php +++ /dev/null @@ -1,446 +0,0 @@ - 'I', - self::T_DECIMAL => 'D', - self::T_TIMESTAMP => 'T', - self::T_STRING_LONG => 'S', - self::T_TABLE => 'F' - ); - - /** - * @var array - */ - private static $_types_091 = array( - self::T_INT_SHORTSHORT => 'b', - self::T_INT_SHORTSHORT_U => 'B', - self::T_INT_SHORT => 'U', - self::T_INT_SHORT_U => 'u', - self::T_INT_LONG => 'I', - self::T_INT_LONG_U => 'i', - self::T_INT_LONGLONG => 'L', - self::T_INT_LONGLONG_U => 'l', - self::T_DECIMAL => 'D', - self::T_TIMESTAMP => 'T', - self::T_VOID => 'V', - self::T_BOOL => 't', - self::T_STRING_SHORT => 's', - self::T_STRING_LONG => 'S', - self::T_ARRAY => 'A', - self::T_TABLE => 'F' - ); - - /** - * @var array - */ - private static $_types_rabbit = array( - self::T_INT_SHORTSHORT => 'b', - self::T_INT_SHORT => 's', - self::T_INT_LONG => 'I', - self::T_INT_LONGLONG => 'l', - self::T_DECIMAL => 'D', - self::T_TIMESTAMP => 'T', - self::T_VOID => 'V', - self::T_BOOL => 't', - self::T_STRING_LONG => 'S', - self::T_ARRAY => 'A', - self::T_TABLE => 'F' - ); - - /** - * @var array - */ - protected $data = array(); - - public function __construct(array $data = null) - { - if (!empty($data)) { - $this->data = $this->encodeCollection($data); - } - } - - /** - * @return int - */ - abstract public function getType(); - - /** - * @param mixed $val - * @param int $type - * @param string $key - */ - final protected function setValue($val, $type = null, $key = null) - { - if ($val instanceof self) { - if ($type && ($type != $val->getType())) { - throw new Exception\AMQPInvalidArgumentException( - 'Attempted to add instance of ' . get_class($val) . ' representing type [' . $val->getType() . '] as mismatching type [' . $type . ']' - ); - } - $type = $val->getType(); - } elseif ($type) { //ensuring data integrity and that all members are properly validated - switch ($type) { - case self::T_ARRAY: - throw new Exception\AMQPInvalidArgumentException('Arrays must be passed as AMQPArray instance'); - break; - case self::T_TABLE: - throw new Exception\AMQPInvalidArgumentException('Tables must be passed as AMQPTable instance'); - break; - case self::T_DECIMAL: - if (!($val instanceof AMQPDecimal)) { - throw new Exception\AMQPInvalidArgumentException('Decimal values must be instance of AMQPDecimal'); - } - break; - } - } - - if ($type) { - self::checkDataTypeIsSupported($type, false); - $val = array($type, $val); - } else { - $val = $this->encodeValue($val); - } - - if ($key === null) { - $this->data[] = $val; - } else { - $this->data[$key] = $val; - } - } - - /** - * @return array - */ - final public function getNativeData() - { - return $this->decodeCollection($this->data); - } - - /** - * @param array $val - * @return array - */ - final protected function encodeCollection(array $val) - { - foreach ($val as &$v) { - $v = $this->encodeValue($v); - } - unset($v); - - return $val; - } - - /** - * @param array $val - * @return array - */ - final protected function decodeCollection(array $val) - { - foreach ($val as &$v) { - $v = $this->decodeValue($v[1], $v[0]); - } - unset($v); - - return $val; - } - - /** - * @param mixed $val - * @return mixed - * @throws Exception\AMQPOutOfBoundsException - */ - protected function encodeValue($val) - { - if (is_string($val)) { - $val = $this->encodeString($val); - } elseif (is_float($val)) { - $val = $this->encodeFloat($val); - } elseif (is_int($val)) { - $val = $this->encodeInt($val); - } elseif (is_bool($val)) { - $val = $this->encodeBool($val); - } elseif (is_null($val)) { - $val = $this->encodeVoid(); - } elseif ($val instanceof \DateTime) { - $val = array(self::T_TIMESTAMP, $val->getTimestamp()); - } elseif ($val instanceof AMQPDecimal) { - $val = array(self::T_DECIMAL, $val); - } elseif ($val instanceof self) { - //avoid silent type correction of strictly typed values - self::checkDataTypeIsSupported($val->getType(), false); - $val = array($val->getType(), $val); - } elseif (is_array($val)) { - //AMQP specs says "Field names MUST start with a letter, '$' or '#'" - //so beware, some servers may raise an exception with 503 code in cases when indexed array is encoded as table - if (self::isProtocol(self::PROTOCOL_080)) { - //080 doesn't support arrays, forcing table - $val = array(self::T_TABLE, new AMQPTable($val)); - } elseif (empty($val) || (array_keys($val) === range(0, count($val) - 1))) { - $val = array(self::T_ARRAY, new AMQPArray($val)); - } else { - $val = array(self::T_TABLE, new AMQPTable($val)); - } - } else { - throw new Exception\AMQPOutOfBoundsException(sprintf('Encountered value of unsupported type: %s', gettype($val))); - } - - return $val; - } - - /** - * @param mixed $val - * @param integer $type - * @return array|bool|\DateTime|null - */ - protected function decodeValue($val, $type) - { - if ($val instanceof self) { - //covering arrays and tables - $val = $val->getNativeData(); - } else { - switch ($type) { - case self::T_BOOL: - $val = (bool) $val; - break; - case self::T_TIMESTAMP: - $val = \DateTime::createFromFormat('U', $val); - break; - case self::T_VOID: - $val = null; - break; - case self::T_ARRAY: - case self::T_TABLE: - throw new Exception\AMQPLogicException( - 'Encountered an array/table struct which is not an instance of AMQPCollection. ' . - 'This is considered a bug and should be fixed, please report' - ); - } - } - - return $val; - } - - /** - * @param string $val - * @return array - */ - protected function encodeString($val) - { - return array(self::T_STRING_LONG, $val); - } - - /** - * @param int $val - * @return array - */ - protected function encodeInt($val) - { - if (($val >= -2147483648) && ($val <= 2147483647)) { - $ev = array(self::T_INT_LONG, $val); - } elseif (self::isProtocol(self::PROTOCOL_080)) { - //080 doesn't support longlong - $ev = $this->encodeString((string) $val); - } else { - $ev = array(self::T_INT_LONGLONG, $val); - } - - return $ev; - } - - /** - * @param float $val - * @return array - */ - protected function encodeFloat($val) - { - return static::encodeString((string) $val); - } - - /** - * @param bool $val - * @return array - */ - protected function encodeBool($val) - { - $val = (bool) $val; - - return self::isProtocol(self::PROTOCOL_080) ? array(self::T_INT_LONG, (int) $val) : array(self::T_BOOL, $val); - } - - /** - * @return array - */ - protected function encodeVoid() - { - return self::isProtocol(self::PROTOCOL_080) ? $this->encodeString('') : array(self::T_VOID, null); - } - - /** - * @return string - */ - final public static function getProtocol() - { - if (self::$_protocol === null) { - self::$_protocol = defined('AMQP_STRICT_FLD_TYPES') && AMQP_STRICT_FLD_TYPES ? - AbstractChannel::getProtocolVersion() : - self::PROTOCOL_RBT; - } - - return self::$_protocol; - } - - /** - * @param string $proto - * @return bool - */ - final public static function isProtocol($proto) - { - return self::getProtocol() == $proto; - } - - /** - * @return array [dataTypeConstant => dataTypeSymbol] - */ - final public static function getSupportedDataTypes() - { - switch ($proto = self::getProtocol()) { - case self::PROTOCOL_080: - $types = self::$_types_080; - break; - case self::PROTOCOL_091: - $types = self::$_types_091; - break; - case self::PROTOCOL_RBT: - $types = self::$_types_rabbit; - break; - default: - throw new Exception\AMQPOutOfRangeException(sprintf('Unknown protocol: %s', $proto)); - } - - return $types; - } - - /** - * @param string $type - * @param bool $return Whether to return or raise AMQPOutOfRangeException - * @return boolean - */ - final public static function checkDataTypeIsSupported($type, $return = true) - { - try { - $supported = self::getSupportedDataTypes(); - if (!isset($supported[$type])) { - throw new Exception\AMQPOutOfRangeException(sprintf('AMQP-%s doesn\'t support data of type [%s]', self::getProtocol(), $type)); - } - return true; - - } catch (Exception\AMQPOutOfRangeException $ex) { - if (!$return) { - throw $ex; - } - - return false; - } - } - - /** - * @param integer $type - * @return string - */ - final public static function getSymbolForDataType($type) - { - $types = self::getSupportedDataTypes(); - if (!isset($types[$type])) { - throw new Exception\AMQPOutOfRangeException(sprintf('AMQP-%s doesn\'t support data of type [%s]', self::getProtocol(), $type)); - } - - return $types[$type]; - } - - /** - * @param string $symbol - * @return integer - */ - final public static function getDataTypeForSymbol($symbol) - { - $symbols = array_flip(self::getSupportedDataTypes()); - if (!isset($symbols[$symbol])) { - throw new Exception\AMQPOutOfRangeException(sprintf('AMQP-%s doesn\'t define data of type [%s]', self::getProtocol(), $symbol)); - } - - return $symbols[$symbol]; - } - - public function current() - { - return current($this->data); - } - - public function key() - { - return key($this->data); - } - - public function next() - { - next($this->data); - } - - public function rewind() - { - reset($this->data); - } - - public function valid() - { - return key($this->data) !== null; - } -} diff --git a/lib/PhpAmqpLib/Wire/AMQPArray.php b/lib/PhpAmqpLib/Wire/AMQPArray.php deleted file mode 100644 index 742925691b..0000000000 --- a/lib/PhpAmqpLib/Wire/AMQPArray.php +++ /dev/null @@ -1,32 +0,0 @@ -setValue($val, $type); - - return $this; - } -} diff --git a/lib/PhpAmqpLib/Wire/AMQPDecimal.php b/lib/PhpAmqpLib/Wire/AMQPDecimal.php deleted file mode 100644 index 9768a4899f..0000000000 --- a/lib/PhpAmqpLib/Wire/AMQPDecimal.php +++ /dev/null @@ -1,47 +0,0 @@ -n = $n; - $this->e = $e; - } - - /** - * @return string - */ - public function asBCvalue() - { - return bcdiv($this->n, bcpow(10, $this->e)); - } -} diff --git a/lib/PhpAmqpLib/Wire/AMQPReader.php b/lib/PhpAmqpLib/Wire/AMQPReader.php deleted file mode 100644 index be1b76f221..0000000000 --- a/lib/PhpAmqpLib/Wire/AMQPReader.php +++ /dev/null @@ -1,534 +0,0 @@ -str = $str; - $this->str_length = mb_strlen($this->str, 'ASCII'); - $this->io = $io; - $this->offset = 0; - $this->bitcount = $this->bits = 0; - $this->timeout = $timeout; - } - - /** - * Resets the object from the injected param - * - * Used to not need to create a new AMQPReader instance every time. - * when we can just pass a string and reset the object state. - * NOTE: since we are working with strings we don't need to pass an AbstractIO - * or a timeout. - * - * @param string $str - */ - public function reuse($str) - { - $this->str = $str; - $this->str_length = mb_strlen($this->str, 'ASCII'); - $this->offset = 0; - $this->bitcount = $this->bits = 0; - } - - /** - * Closes the stream - */ - public function close() - { - if ($this->io) { - $this->io->close(); - } - } - - /** - * @param $n - * @return string - */ - public function read($n) - { - $this->bitcount = $this->bits = 0; - - return $this->rawread($n); - } - - /** - * Waits until some data is retrieved from the socket. - * - * AMQPTimeoutException can be raised if the timeout is set - * - * @throws \PhpAmqpLib\Exception\AMQPTimeoutException - */ - protected function wait() - { - if ($this->timeout == 0) { - return; - } - - // wait .. - list($sec, $usec) = MiscHelper::splitSecondsMicroseconds($this->timeout); - $result = $this->io->select($sec, $usec); - - if ($result === false) { - throw new AMQPRuntimeException('A network error occured while awaiting for incoming data'); - } - - if ($result === 0) { - throw new AMQPTimeoutException(sprintf( - 'The connection timed out after %s sec while awaiting incoming data', - $this->getTimeout() - )); - } - } - - /** - * @param $n - * @return string - * @throws \RuntimeException - * @throws \PhpAmqpLib\Exception\AMQPRuntimeException - */ - protected function rawread($n) - { - if ($this->io) { - $this->wait(); - $res = $this->io->read($n); - $this->offset += $n; - } else { - if ($this->str_length < $n) { - throw new AMQPRuntimeException(sprintf( - 'Error reading data. Requested %s bytes while string buffer has only %s', - $n, - $this->str_length - )); - } - - $res = mb_substr($this->str, 0, $n, 'ASCII'); - $this->str = mb_substr($this->str, $n, mb_strlen($this->str, 'ASCII') - $n, 'ASCII'); - $this->str_length -= $n; - $this->offset += $n; - } - - return $res; - } - - /** - * @return bool - */ - public function read_bit() - { - if (!$this->bitcount) { - $this->bits = ord($this->rawread(1)); - $this->bitcount = 8; - } - - $result = ($this->bits & 1) == 1; - $this->bits >>= 1; - $this->bitcount -= 1; - - return $result; - } - - /** - * @return mixed - */ - public function read_octet() - { - $this->bitcount = $this->bits = 0; - list(, $res) = unpack('C', $this->rawread(1)); - - return $res; - } - - /** - * @return mixed - */ - public function read_signed_octet() - { - $this->bitcount = $this->bits = 0; - list(, $res) = unpack('c', $this->rawread(1)); - - return $res; - } - - /** - * @return mixed - */ - public function read_short() - { - $this->bitcount = $this->bits = 0; - list(, $res) = unpack('n', $this->rawread(2)); - - return $res; - } - - /** - * @return mixed - */ - public function read_signed_short() - { - $this->bitcount = $this->bits = 0; - list(, $res) = unpack('s', $this->correctEndianness($this->rawread(2))); - - return $res; - } - - /** - * Reads 32 bit integer in big-endian byte order. - * - * On 64 bit systems it will return always unsigned int - * value in 0..2^32 range. - * - * On 32 bit systems it will return signed int value in - * -2^31...+2^31 range. - * - * Use with caution! - */ - public function read_php_int() - { - list(, $res) = unpack('N', $this->rawread(4)); - if ($this->is64bits) { - $sres = sprintf('%u', $res); - return (int) $sres; - } else { - return $res; - } - } - - /** - * PHP does not have unsigned 32 bit int, - * so we return it as a string - * - * @return string - */ - public function read_long() - { - $this->bitcount = $this->bits = 0; - list(, $res) = unpack('N', $this->rawread(4)); - - return !$this->is64bits && self::getLongMSB($res) ? sprintf('%u', $res) : $res; - } - - /** - * @return integer - */ - private function read_signed_long() - { - $this->bitcount = $this->bits = 0; - list(, $res) = unpack('l', $this->correctEndianness($this->rawread(4))); - - return $res; - } - - /** - * Even on 64 bit systems PHP integers are singed. - * Since we need an unsigned value here we return it - * as a string. - * - * @return string - */ - public function read_longlong() - { - $this->bitcount = $this->bits = 0; - - list(, $hi, $lo) = unpack('N2', $this->rawread(8)); - $msb = self::getLongMSB($hi); - - if (!$this->is64bits) { - if ($msb) { - $hi = sprintf('%u', $hi); - } - if (self::getLongMSB($lo)) { - $lo = sprintf('%u', $lo); - } - } - - return bcadd($this->is64bits && !$msb ? $hi << 32 : bcmul($hi, '4294967296', 0), $lo, 0); - } - - /** - * @return string - */ - public function read_signed_longlong() - { - $this->bitcount = $this->bits = 0; - - list(, $hi, $lo) = unpack('N2', $this->rawread(8)); - - if ($this->is64bits) { - return bcadd($hi << 32, $lo, 0); - } else { - return bcadd(bcmul($hi, '4294967296', 0), self::getLongMSB($lo) ? sprintf('%u', $lo) : $lo, 0); - } - } - - /** - * @param int $longInt - * @return bool - */ - private static function getLongMSB($longInt) - { - return (bool) ($longInt & 0x80000000); - } - - /** - * Read a utf-8 encoded string that's stored in up to - * 255 bytes. Return it decoded as a PHP unicode object. - */ - public function read_shortstr() - { - $this->bitcount = $this->bits = 0; - list(, $slen) = unpack('C', $this->rawread(1)); - - return $this->rawread($slen); - } - - /** - * Read a string that's up to 2**32 bytes, the encoding - * isn't specified in the AMQP spec, so just return it as - * a plain PHP string. - */ - public function read_longstr() - { - $this->bitcount = $this->bits = 0; - $slen = $this->read_php_int(); - - if ($slen < 0) { - throw new AMQPOutOfBoundsException('Strings longer than supported on this platform'); - } - - return $this->rawread($slen); - } - - /** - * Read and AMQP timestamp, which is a 64-bit integer representing - * seconds since the Unix epoch in 1-second resolution. - */ - public function read_timestamp() - { - return $this->read_longlong(); - } - - /** - * Read an AMQP table, and return as a PHP array. keys are strings, - * values are (type,value) tuples. - * - * @param bool $returnObject Whether to return AMQPArray instance instead of plain array - * @return array|AMQPTable - */ - public function read_table($returnObject = false) - { - $this->bitcount = $this->bits = 0; - $tlen = $this->read_php_int(); - - if ($tlen < 0) { - throw new AMQPOutOfBoundsException('Table is longer than supported'); - } - - $table_data = new AMQPReader($this->rawread($tlen), null); - $result = $returnObject ? new AMQPTable() : array(); - while ($table_data->tell() < $tlen) { - $name = $table_data->read_shortstr(); - $ftype = AMQPAbstractCollection::getDataTypeForSymbol($ftypeSym = $table_data->rawread(1)); - $val = $table_data->read_value($ftype, $returnObject); - $returnObject ? $result->set($name, $val, $ftype) : $result[$name] = array($ftypeSym, $val); - } - - return $result; - } - - /** - * @return array|AMQPTable - */ - public function read_table_object() - { - return $this->read_table(true); - } - - /** - * Reads the array in the next value. - * - * @param bool $returnObject Whether to return AMQPArray instance instead of plain array - * @return array|AMQPArray - */ - public function read_array($returnObject = false) - { - $this->bitcount = $this->bits = 0; - - // Determine array length and its end position - $arrayLength = $this->read_php_int(); - $endOffset = $this->offset + $arrayLength; - - $result = $returnObject ? new AMQPArray() : array(); - // Read values until we reach the end of the array - while ($this->offset < $endOffset) { - $fieldType = AMQPAbstractCollection::getDataTypeForSymbol($this->rawread(1)); - $fieldValue = $this->read_value($fieldType, $returnObject); - $returnObject ? $result->push($fieldValue, $fieldType) : $result[] = $fieldValue; - } - - return $result; - } - - /** - * @return array|AMQPArray - */ - public function read_array_object() - { - return $this->read_array(true); - } - - /** - * Reads the next value as the provided field type. - * - * @param int $fieldType One of AMQPAbstractCollection::T_* constants - * @param bool $collectionsAsObjects Description - * @return mixed - * @throws \PhpAmqpLib\Exception\AMQPRuntimeException - */ - public function read_value($fieldType, $collectionsAsObjects = false) - { - $this->bitcount = $this->bits = 0; - - $val = null; - switch ($fieldType) { - case AMQPAbstractCollection::T_INT_SHORTSHORT: - //according to AMQP091 spec, 'b' is not bit, it is short-short-int, also valid for rabbit/qpid - //$val=$this->read_bit(); - $val = $this->read_signed_octet(); - break; - case AMQPAbstractCollection::T_INT_SHORTSHORT_U: - $val = $this->read_octet(); - break; - case AMQPAbstractCollection::T_INT_SHORT: - $val = $this->read_signed_short(); - break; - case AMQPAbstractCollection::T_INT_SHORT_U: - $val = $this->read_short(); - break; - case AMQPAbstractCollection::T_INT_LONG: - $val = $this->read_signed_long(); - break; - case AMQPAbstractCollection::T_INT_LONG_U: - $val = $this->read_long(); - break; - case AMQPAbstractCollection::T_INT_LONGLONG: - $val = $this->read_signed_longlong(); - break; - case AMQPAbstractCollection::T_INT_LONGLONG_U: - $val = $this->read_longlong(); - break; - case AMQPAbstractCollection::T_DECIMAL: - $e = $this->read_octet(); - $n = $this->read_signed_long(); - $val = new AMQPDecimal($n, $e); - break; - case AMQPAbstractCollection::T_TIMESTAMP: - $val = $this->read_timestamp(); - break; - case AMQPAbstractCollection::T_BOOL: - $val = $this->read_octet(); - break; - case AMQPAbstractCollection::T_STRING_SHORT: - $val = $this->read_shortstr(); - break; - case AMQPAbstractCollection::T_STRING_LONG: - $val = $this->read_longstr(); - break; - case AMQPAbstractCollection::T_ARRAY: - $val = $this->read_array($collectionsAsObjects); - break; - case AMQPAbstractCollection::T_TABLE: - $val = $this->read_table($collectionsAsObjects); - break; - case AMQPAbstractCollection::T_VOID: - $val = null; - break; - default: - throw new AMQPInvalidArgumentException(sprintf( - 'Unsupported type "%s"', - $fieldType - )); - } - - return $val; - } - - /** - * @return int - */ - protected function tell() - { - return $this->offset; - } - - /** - * Sets the timeout (second) - * - * @param $timeout - */ - public function setTimeout($timeout) - { - $this->timeout = $timeout; - } - - /** - * @return int - */ - public function getTimeout() - { - return $this->timeout; - } -} diff --git a/lib/PhpAmqpLib/Wire/AMQPTable.php b/lib/PhpAmqpLib/Wire/AMQPTable.php deleted file mode 100644 index 99d4e4d343..0000000000 --- a/lib/PhpAmqpLib/Wire/AMQPTable.php +++ /dev/null @@ -1,35 +0,0 @@ - 128)) { - throw new Exception\AMQPInvalidArgumentException('Table key must be non-empty string up to 128 chars in length'); - } - $this->setValue($val, $type, $key); - } -} diff --git a/lib/PhpAmqpLib/Wire/AMQPWriter.php b/lib/PhpAmqpLib/Wire/AMQPWriter.php deleted file mode 100644 index 3ef4ab1bf9..0000000000 --- a/lib/PhpAmqpLib/Wire/AMQPWriter.php +++ /dev/null @@ -1,494 +0,0 @@ -out = ''; - $this->bits = array(); - $this->bitcount = 0; - } - - /** - * Packs integer into raw byte string in big-endian order - * Supports positive and negative ints represented as PHP int or string (except scientific notation) - * - * Floats has some precision issues and so intentionally not supported. - * Beware that floats out of PHP_INT_MAX range will be represented in scientific (exponential) notation when casted to string - * - * @param int|string $x Value to pack - * @param int $bytes Must be multiply of 2 - * @return string - */ - private static function packBigEndian($x, $bytes) - { - if (($bytes <= 0) || ($bytes % 2)) { - throw new AMQPInvalidArgumentException(sprintf('Expected bytes count must be multiply of 2, %s given', $bytes)); - } - - $ox = $x; //purely for dbg purposes (overflow exception) - $isNeg = false; - if (is_int($x)) { - if ($x < 0) { - $isNeg = true; - $x = abs($x); - } - } elseif (is_string($x)) { - if (!is_numeric($x)) { - throw new AMQPInvalidArgumentException(sprintf('Unknown numeric string format: %s', $x)); - } - $x = preg_replace('/^-/', '', $x, 1, $isNeg); - } else { - throw new AMQPInvalidArgumentException('Only integer and numeric string values are supported'); - } - if ($isNeg) { - $x = bcadd($x, -1, 0); - } //in negative domain starting point is -1, not 0 - - $res = array(); - for ($b = 0; $b < $bytes; $b += 2) { - $chnk = (int) bcmod($x, 65536); - $x = bcdiv($x, 65536, 0); - $res[] = pack('n', $isNeg ? ~$chnk : $chnk); - } - if ($x || ($isNeg && ($chnk & 0x8000))) { - throw new AMQPOutOfBoundsException(sprintf('Overflow detected while attempting to pack %s into %s bytes', $ox, $bytes)); - } - - return implode(array_reverse($res)); - } - - private function flushbits() - { - if (!empty($this->bits)) { - $this->out .= implode('', array_map('chr', $this->bits)); - $this->bits = array(); - $this->bitcount = 0; - } - } - - /** - * Get what's been encoded so far. - */ - public function getvalue() - { - /* temporarily needed for compatibility with write_bit unit tests */ - if ($this->bitcount) { - $this->flushbits(); - } - - return $this->out; - } - - /** - * Write a plain PHP string, with no special encoding. - */ - public function write($s) - { - $this->out .= $s; - - return $this; - } - - /** - * Write a boolean value. - * (deprecated, use write_bits instead) - * - * @deprecated - * @param $b - * @return $this - */ - public function write_bit($b) - { - $b = (int) (bool) $b; - $shift = $this->bitcount % 8; - - if ($shift == 0) { - $last = 0; - } else { - $last = array_pop($this->bits); - } - - $last |= ($b << $shift); - array_push($this->bits, $last); - $this->bitcount += 1; - - return $this; - } - - /** - * Write multiple bits as an octet - * - * @param $bits - * @return $this - */ - public function write_bits($bits) - { - $value = 0; - - foreach ($bits as $n => $bit) { - $bit = $bit ? 1 : 0; - $value |= ($bit << $n); - } - - $this->out .= chr($value); - - return $this; - } - - /** - * Write an integer as an unsigned 8-bit value - * - * @param $n - * @return $this - * @throws \PhpAmqpLib\Exception\AMQPInvalidArgumentException - */ - public function write_octet($n) - { - if ($n < 0 || $n > 255) { - throw new AMQPInvalidArgumentException('Octet out of range: ' . $n); - } - - $this->out .= chr($n); - - return $this; - } - - public function write_signed_octet($n) - { - if (($n < -128) || ($n > 127)) { - throw new AMQPInvalidArgumentException('Signed octet out of range: ' . $n); - } - - $this->out .= pack('c', $n); - - return $this; - } - - /** - * Write an integer as an unsigned 16-bit value - * - * @param $n - * @return $this - * @throws \PhpAmqpLib\Exception\AMQPInvalidArgumentException - */ - public function write_short($n) - { - if ($n < 0 || $n > 65535) { - throw new AMQPInvalidArgumentException('Short out of range: ' . $n); - } - - $this->out .= pack('n', $n); - - return $this; - } - - public function write_signed_short($n) - { - if (($n < -32768) || ($n > 32767)) { - throw new AMQPInvalidArgumentException('Signed short out of range: ' . $n); - } - - $this->out .= $this->correctEndianness(pack('s', $n)); - - return $this; - } - - /** - * Write an integer as an unsigned 32-bit value - * - * @param $n - * @return $this - */ - public function write_long($n) - { - if (($n < 0) || ($n > 4294967295)) { - throw new AMQPInvalidArgumentException('Long out of range: ' . $n); - } - - //Numeric strings >PHP_INT_MAX on 32bit are casted to PHP_INT_MAX, damn PHP - if (!$this->is64bits && is_string($n)) { - $n = (float) $n; - } - $this->out .= pack('N', $n); - - return $this; - } - - /** - * @param $n - * @return $this - */ - private function write_signed_long($n) - { - if (($n < -2147483648) || ($n > 2147483647)) { - throw new AMQPInvalidArgumentException('Signed long out of range: ' . $n); - } - - //on my 64bit debian this approach is slightly faster than splitIntoQuads() - $this->out .= $this->correctEndianness(pack('l', $n)); - - return $this; - } - - /** - * Write an integer as an unsigned 64-bit value - * - * @param $n - * @return $this - */ - public function write_longlong($n) - { - if ($n < 0) { - throw new AMQPInvalidArgumentException('Longlong out of range: ' . $n); - } - - // if PHP_INT_MAX is big enough for that - // direct $n<=PHP_INT_MAX check is unreliable on 64bit (values close to max) due to limited float precision - if (bcadd($n, -PHP_INT_MAX, 0) <= 0) { - // trick explained in http://www.php.net/manual/fr/function.pack.php#109328 - if ($this->is64bits) { - list($hi, $lo) = $this->splitIntoQuads($n); - } else { - $hi = 0; - $lo = $n; - } //on 32bits hi quad is 0 a priori - $this->out .= pack('NN', $hi, $lo); - } else { - try { - $this->out .= self::packBigEndian($n, 8); - } catch (AMQPOutOfBoundsException $ex) { - throw new AMQPInvalidArgumentException('Longlong out of range: ' . $n, 0, $ex); - } - } - - return $this; - } - - public function write_signed_longlong($n) - { - if ((bcadd($n, PHP_INT_MAX, 0) >= -1) && (bcadd($n, -PHP_INT_MAX, 0) <= 0)) { - if ($this->is64bits) { - list($hi, $lo) = $this->splitIntoQuads($n); - } else { - $hi = $n < 0 ? -1 : 0; - $lo = $n; - } //0xffffffff for negatives - $this->out .= pack('NN', $hi, $lo); - } elseif ($this->is64bits) { - throw new AMQPInvalidArgumentException('Signed longlong out of range: ' . $n); - } else { - if (bcadd($n, '-9223372036854775807', 0) > 0) { - throw new AMQPInvalidArgumentException('Signed longlong out of range: ' . $n); - } - try { - //will catch only negative overflow, as values >9223372036854775807 are valid for 8bytes range (unsigned) - $this->out .= self::packBigEndian($n, 8); - } catch (AMQPOutOfBoundsException $ex) { - throw new AMQPInvalidArgumentException('Signed longlong out of range: ' . $n, 0, $ex); - } - } - - return $this; - } - - /** - * @param int $n - * @return array - */ - private function splitIntoQuads($n) - { - $n = (int) $n; - - return array($n >> 32, $n & 0x00000000ffffffff); - } - - /** - * Write a string up to 255 bytes long after encoding. - * Assume UTF-8 encoding - * - * @param $s - * @return $this - * @throws \PhpAmqpLib\Exception\AMQPInvalidArgumentException - */ - public function write_shortstr($s) - { - $len = mb_strlen($s, 'ASCII'); - if ($len > 255) { - throw new AMQPInvalidArgumentException('String too long'); - } - - $this->write_octet($len); - $this->out .= $s; - - return $this; - } - - /** - * Write a string up to 2**32 bytes long. Assume UTF-8 encoding - * - * @param $s - * @return $this - */ - public function write_longstr($s) - { - $this->write_long(mb_strlen($s, 'ASCII')); - $this->out .= $s; - - return $this; - } - - /** - * Supports the writing of Array types, so that you can implement - * array methods, like Rabbitmq's HA parameters - * - * @param AMQPArray|array $a Instance of AMQPArray or PHP array WITHOUT format hints (unlike write_table()) - * @return self - */ - public function write_array($a) - { - if (!($a instanceof AMQPArray)) { - $a = new AMQPArray($a); - } - $data = new AMQPWriter(); - - foreach ($a as $v) { - $data->write_value($v[0], $v[1]); - } - - $data = $data->getvalue(); - $this->write_long(mb_strlen($data, 'ASCII')); - $this->write($data); - - return $this; - } - - /** - * Write unix time_t value as 64 bit timestamp - * - * @param $v - * @return $this - */ - public function write_timestamp($v) - { - $this->write_longlong($v); - - return $this; - } - - /** - * Write PHP array, as table. Input array format: keys are strings, - * values are (type,value) tuples. - * - * @param AMQPTable|array $d Instance of AMQPTable or PHP array WITH format hints (unlike write_array()) - * @return self - * @throws \PhpAmqpLib\Exception\AMQPInvalidArgumentException - */ - public function write_table($d) - { - $typeIsSym = !($d instanceof AMQPTable); //purely for back-compat purposes - - $table_data = new AMQPWriter(); - foreach ($d as $k => $va) { - list($ftype, $v) = $va; - $table_data->write_shortstr($k); - $table_data->write_value($typeIsSym ? AMQPAbstractCollection::getDataTypeForSymbol($ftype) : $ftype, $v); - } - - $table_data = $table_data->getvalue(); - $this->write_long(mb_strlen($table_data, 'ASCII')); - $this->write($table_data); - - return $this; - } - - /** - * for compat with method mapping used by AMQPMessage - */ - public function write_table_object($d) - { - return $this->write_table($d); - } - - /** - * @param int $type One of AMQPAbstractCollection::T_* constants - * @param mixed $val - */ - private function write_value($type, $val) - { - //This will find appropriate symbol for given data type for currently selected protocol - //Also will raise an exception on unknown type - $this->write(AMQPAbstractCollection::getSymbolForDataType($type)); - - switch ($type) { - case AMQPAbstractCollection::T_INT_SHORTSHORT: - $this->write_signed_octet($val); - break; - case AMQPAbstractCollection::T_INT_SHORTSHORT_U: - $this->write_octet($val); - break; - case AMQPAbstractCollection::T_INT_SHORT: - $this->write_signed_short($val); - break; - case AMQPAbstractCollection::T_INT_SHORT_U: - $this->write_short($val); - break; - case AMQPAbstractCollection::T_INT_LONG: - $this->write_signed_long($val); - break; - case AMQPAbstractCollection::T_INT_LONG_U: - $this->write_long($val); - break; - case AMQPAbstractCollection::T_INT_LONGLONG: - $this->write_signed_longlong($val); - break; - case AMQPAbstractCollection::T_INT_LONGLONG_U: - $this->write_longlong($val); - break; - case AMQPAbstractCollection::T_DECIMAL: - $this->write_octet($val->e); - $this->write_signed_long($val->n); - break; - case AMQPAbstractCollection::T_TIMESTAMP: - $this->write_timestamp($val); - break; - case AMQPAbstractCollection::T_BOOL: - $this->write_octet($val ? 1 : 0); - break; - case AMQPAbstractCollection::T_STRING_SHORT: - $this->write_shortstr($val); - break; - case AMQPAbstractCollection::T_STRING_LONG: - $this->write_longstr($val); - break; - case AMQPAbstractCollection::T_ARRAY: - $this->write_array($val); - break; - case AMQPAbstractCollection::T_TABLE: - $this->write_table($val); - break; - case AMQPAbstractCollection::T_VOID: - break; - default: - throw new AMQPInvalidArgumentException(sprintf( - 'Unsupported type "%s"', - $type - )); - } - } -} diff --git a/lib/PhpAmqpLib/Wire/AbstractClient.php b/lib/PhpAmqpLib/Wire/AbstractClient.php deleted file mode 100644 index fd4362faa0..0000000000 --- a/lib/PhpAmqpLib/Wire/AbstractClient.php +++ /dev/null @@ -1,36 +0,0 @@ -is64bits = PHP_INT_SIZE == 8; - - $tmp = unpack('S', "\x01\x00"); // to maintain 5.3 compatibility - $this->isLittleEndian = $tmp[1] == 1; - } - - /** - * Converts byte-string between native and network byte order, in both directions - * - * @param string $byteStr - * @return string - */ - protected function correctEndianness($byteStr) - { - return $this->isLittleEndian ? strrev($byteStr) : $byteStr; - } -} diff --git a/lib/PhpAmqpLib/Wire/Constants080.php b/lib/PhpAmqpLib/Wire/Constants080.php deleted file mode 100644 index 4e856f1d19..0000000000 --- a/lib/PhpAmqpLib/Wire/Constants080.php +++ /dev/null @@ -1,142 +0,0 @@ - 'FRAME-METHOD', - 2 => 'FRAME-HEADER', - 3 => 'FRAME-BODY', - 4 => 'FRAME-OOB-METHOD', - 5 => 'FRAME-OOB-HEADER', - 6 => 'FRAME-OOB-BODY', - 7 => 'FRAME-TRACE', - 8 => 'FRAME-HEARTBEAT', - 4096 => 'FRAME-MIN-SIZE', - 206 => 'FRAME-END', - 501 => 'FRAME-ERROR', - ); - - public static $CONTENT_METHODS = array( - 0 => '60,40', - 1 => '60,50', - 2 => '60,60', - 3 => '60,71', - 4 => '70,50', - 5 => '70,70', - 6 => '80,40', - 7 => '80,50', - 8 => '80,60', - 9 => '110,10', - 10 => '120,40', - 11 => '120,41', - ); - - public static $CLOSE_METHODS = array( - 0 => '10,60', - 1 => '20,40', - ); - - public static $GLOBAL_METHOD_NAMES = array( - '10,10' => 'Connection.start', - '10,11' => 'Connection.start_ok', - '10,20' => 'Connection.secure', - '10,21' => 'Connection.secure_ok', - '10,30' => 'Connection.tune', - '10,31' => 'Connection.tune_ok', - '10,40' => 'Connection.open', - '10,41' => 'Connection.open_ok', - '10,50' => 'Connection.redirect', - '10,60' => 'Connection.close', - '10,61' => 'Connection.close_ok', - '20,10' => 'Channel.open', - '20,11' => 'Channel.open_ok', - '20,20' => 'Channel.flow', - '20,21' => 'Channel.flow_ok', - '20,30' => 'Channel.alert', - '20,40' => 'Channel.close', - '20,41' => 'Channel.close_ok', - '30,10' => 'Access.request', - '30,11' => 'Access.request_ok', - '40,10' => 'Exchange.declare', - '40,11' => 'Exchange.declare_ok', - '40,20' => 'Exchange.delete', - '40,21' => 'Exchange.delete_ok', - '50,10' => 'Queue.declare', - '50,11' => 'Queue.declare_ok', - '50,20' => 'Queue.bind', - '50,21' => 'Queue.bind_ok', - '50,30' => 'Queue.purge', - '50,31' => 'Queue.purge_ok', - '50,40' => 'Queue.delete', - '50,41' => 'Queue.delete_ok', - '50,50' => 'Queue.unbind', - '50,51' => 'Queue.unbind_ok', - '60,10' => 'Basic.qos', - '60,11' => 'Basic.qos_ok', - '60,20' => 'Basic.consume', - '60,21' => 'Basic.consume_ok', - '60,30' => 'Basic.cancel', - '60,31' => 'Basic.cancel_ok', - '60,40' => 'Basic.publish', - '60,50' => 'Basic.return', - '60,60' => 'Basic.deliver', - '60,70' => 'Basic.get', - '60,71' => 'Basic.get_ok', - '60,72' => 'Basic.get_empty', - '60,80' => 'Basic.ack', - '60,90' => 'Basic.reject', - '60,100' => 'Basic.recover_async', - '60,110' => 'Basic.recover', - '60,111' => 'Basic.recover_ok', - '70,10' => 'File.qos', - '70,11' => 'File.qos_ok', - '70,20' => 'File.consume', - '70,21' => 'File.consume_ok', - '70,30' => 'File.cancel', - '70,31' => 'File.cancel_ok', - '70,40' => 'File.open', - '70,41' => 'File.open_ok', - '70,50' => 'File.stage', - '70,60' => 'File.publish', - '70,70' => 'File.return', - '70,80' => 'File.deliver', - '70,90' => 'File.ack', - '70,100' => 'File.reject', - '80,10' => 'Stream.qos', - '80,11' => 'Stream.qos_ok', - '80,20' => 'Stream.consume', - '80,21' => 'Stream.consume_ok', - '80,30' => 'Stream.cancel', - '80,31' => 'Stream.cancel_ok', - '80,40' => 'Stream.publish', - '80,50' => 'Stream.return', - '80,60' => 'Stream.deliver', - '90,10' => 'Tx.select', - '90,11' => 'Tx.select_ok', - '90,20' => 'Tx.commit', - '90,21' => 'Tx.commit_ok', - '90,30' => 'Tx.rollback', - '90,31' => 'Tx.rollback_ok', - '100,10' => 'Dtx.select', - '100,11' => 'Dtx.select_ok', - '100,20' => 'Dtx.start', - '100,21' => 'Dtx.start_ok', - '110,10' => 'Tunnel.request', - '120,10' => 'Test.integer', - '120,11' => 'Test.integer_ok', - '120,20' => 'Test.string', - '120,21' => 'Test.string_ok', - '120,30' => 'Test.table', - '120,31' => 'Test.table_ok', - '120,40' => 'Test.content', - '120,41' => 'Test.content_ok', - ); - -} diff --git a/lib/PhpAmqpLib/Wire/Constants091.php b/lib/PhpAmqpLib/Wire/Constants091.php deleted file mode 100644 index 2cde3942ac..0000000000 --- a/lib/PhpAmqpLib/Wire/Constants091.php +++ /dev/null @@ -1,101 +0,0 @@ - 'FRAME-METHOD', - 2 => 'FRAME-HEADER', - 3 => 'FRAME-BODY', - 8 => 'FRAME-HEARTBEAT', - 4096 => 'FRAME-MIN-SIZE', - 206 => 'FRAME-END', - 501 => 'FRAME-ERROR', - ); - - public static $CONTENT_METHODS = array( - 0 => '60,40', - 1 => '60,50', - 2 => '60,60', - 3 => '60,71', - ); - - public static $CLOSE_METHODS = array( - 0 => '10,50', - 1 => '20,40', - ); - - public static $GLOBAL_METHOD_NAMES = array( - '10,10' => 'Connection.start', - '10,11' => 'Connection.start_ok', - '10,20' => 'Connection.secure', - '10,21' => 'Connection.secure_ok', - '10,30' => 'Connection.tune', - '10,31' => 'Connection.tune_ok', - '10,40' => 'Connection.open', - '10,41' => 'Connection.open_ok', - '10,50' => 'Connection.close', - '10,51' => 'Connection.close_ok', - '10,60' => 'Connection.blocked', - '10,61' => 'Connection.unblocked', - '20,10' => 'Channel.open', - '20,11' => 'Channel.open_ok', - '20,20' => 'Channel.flow', - '20,21' => 'Channel.flow_ok', - '20,40' => 'Channel.close', - '20,41' => 'Channel.close_ok', - '30,10' => 'Access.request', - '30,11' => 'Access.request_ok', - '40,10' => 'Exchange.declare', - '40,11' => 'Exchange.declare_ok', - '40,20' => 'Exchange.delete', - '40,21' => 'Exchange.delete_ok', - '40,30' => 'Exchange.bind', - '40,31' => 'Exchange.bind_ok', - '40,40' => 'Exchange.unbind', - '40,51' => 'Exchange.unbind_ok', - '50,10' => 'Queue.declare', - '50,11' => 'Queue.declare_ok', - '50,20' => 'Queue.bind', - '50,21' => 'Queue.bind_ok', - '50,30' => 'Queue.purge', - '50,31' => 'Queue.purge_ok', - '50,40' => 'Queue.delete', - '50,41' => 'Queue.delete_ok', - '50,50' => 'Queue.unbind', - '50,51' => 'Queue.unbind_ok', - '60,10' => 'Basic.qos', - '60,11' => 'Basic.qos_ok', - '60,20' => 'Basic.consume', - '60,21' => 'Basic.consume_ok', - '60,30' => 'Basic.cancel', - '60,31' => 'Basic.cancel_ok', - '60,40' => 'Basic.publish', - '60,50' => 'Basic.return', - '60,60' => 'Basic.deliver', - '60,70' => 'Basic.get', - '60,71' => 'Basic.get_ok', - '60,72' => 'Basic.get_empty', - '60,80' => 'Basic.ack', - '60,90' => 'Basic.reject', - '60,100' => 'Basic.recover_async', - '60,110' => 'Basic.recover', - '60,111' => 'Basic.recover_ok', - '60,120' => 'Basic.nack', - '90,10' => 'Tx.select', - '90,11' => 'Tx.select_ok', - '90,20' => 'Tx.commit', - '90,21' => 'Tx.commit_ok', - '90,30' => 'Tx.rollback', - '90,31' => 'Tx.rollback_ok', - '85,10' => 'Confirm.select', - '85,11' => 'Confirm.select_ok', - ); - -} diff --git a/lib/PhpAmqpLib/Wire/GenericContent.php b/lib/PhpAmqpLib/Wire/GenericContent.php deleted file mode 100644 index 6058379874..0000000000 --- a/lib/PhpAmqpLib/Wire/GenericContent.php +++ /dev/null @@ -1,209 +0,0 @@ - 'shortstr' - ); - - /** - * @param $props - * @param null $prop_types - */ - public function __construct($props, $prop_types = null) - { - if ($prop_types) { - $this->prop_types = $prop_types; - } else { - $this->prop_types = self::$PROPERTIES; - } - - if ($props) { - $this->properties = array_intersect_key($props, $this->prop_types); - } - } - - /** - * Check whether a property exists in the 'properties' dictionary - * or if present - in the 'delivery_info' dictionary. - * - * @param string $name - * @return bool - */ - public function has($name) - { - return isset($this->properties[$name]) || isset($this->delivery_info[$name]); - } - - /** - * Look for additional properties in the 'properties' dictionary, - * and if present - the 'delivery_info' dictionary. - * - * @param string $name - * @throws \OutOfBoundsException - * @return mixed|AMQPChannel - */ - public function get($name) - { - if (isset($this->properties[$name])) { - return $this->properties[$name]; - } - - if (isset($this->delivery_info[$name])) { - return $this->delivery_info[$name]; - } - - throw new \OutOfBoundsException(sprintf( - 'No "%s" property', - $name - )); - } - - /** - * Returns the properties content - * - * @return array - */ - public function get_properties() - { - return $this->properties; - } - - /** - * Sets a property value - * - * @param string $name The property name (one of the property definition) - * @param mixed $value The property value - * @throws \OutOfBoundsException - */ - public function set($name, $value) - { - if (!array_key_exists($name, $this->prop_types)) { - throw new \OutOfBoundsException(sprintf( - 'No "%s" property', - $name - )); - } - - $this->properties[$name] = $value; - } - - /** - * Given the raw bytes containing the property-flags and - * property-list from a content-frame-header, parse and insert - * into a dictionary stored in this object as an attribute named - * 'properties'. - * - * @param AMQPReader $r - * NOTE: do not mutate $reader - */ - public function load_properties($r) - { - // Read 16-bit shorts until we get one with a low bit set to zero - $flags = array(); - while (true) { - $flag_bits = $r->read_short(); - $flags[] = $flag_bits; - if (($flag_bits & 1) == 0) { - break; - } - } - - $shift = 0; - $d = array(); - foreach ($this->prop_types as $key => $proptype) { - if ($shift == 0) { - if (!$flags) { - break; - } - $flag_bits = array_shift($flags); - $shift = 15; - } - if ($flag_bits & (1 << $shift)) { - $d[$key] = $r->{'read_' . $proptype}(); - } - - $shift -= 1; - } - $this->properties = $d; - } - - - /** - * Serializes the 'properties' attribute (a dictionary) into the - * raw bytes making up a set of property flags and a property - * list, suitable for putting into a content frame header. - * - * @return string - * @todo Inject the AMQPWriter to make the method easier to test - */ - public function serialize_properties() - { - if (!empty($this->serialized_properties)) { - return $this->serialized_properties; - } - - $shift = 15; - $flag_bits = 0; - $flags = array(); - $raw_bytes = new AMQPWriter(); - - foreach ($this->prop_types as $key => $prototype) { - $val = isset($this->properties[$key]) ? $this->properties[$key] : null; - - // Very important: PHP type eval is weak, use the === to test the - // value content. Zero or false value should not be removed - if ($val === null) { - $shift -= 1; - continue; - } - - if ($shift === 0) { - $flags[] = $flag_bits; - $flag_bits = 0; - $shift = 15; - } - - $flag_bits |= (1 << $shift); - if ($prototype != 'bit') { - $raw_bytes->{'write_' . $prototype}($val); - } - - $shift -= 1; - } - - $flags[] = $flag_bits; - $result = new AMQPWriter(); - foreach ($flags as $flag_bits) { - $result->write_short($flag_bits); - } - - $result->write($raw_bytes->getvalue()); - - $this->serialized_properties = $result->getvalue(); - - return $this->serialized_properties; - } -} diff --git a/lib/PhpAmqpLib/Wire/IO/AbstractIO.php b/lib/PhpAmqpLib/Wire/IO/AbstractIO.php deleted file mode 100644 index 0822b9cbf5..0000000000 --- a/lib/PhpAmqpLib/Wire/IO/AbstractIO.php +++ /dev/null @@ -1,44 +0,0 @@ -host = $host; - $this->port = $port; - $this->timeout = $timeout; - $this->keepalive = $keepalive; - } - - /** - * Sets up the socket connection - * - * @throws \Exception - */ - public function connect() - { - $this->sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); - - socket_set_option($this->sock, SOL_SOCKET, SO_RCVTIMEO, array('sec' => $this->timeout, 'usec' => 0)); - socket_set_option($this->sock, SOL_SOCKET, SO_SNDTIMEO, array('sec' => $this->timeout, 'usec' => 0)); - - if (!socket_connect($this->sock, $this->host, $this->port)) { - $errno = socket_last_error($this->sock); - $errstr = socket_strerror($errno); - throw new AMQPIOException(sprintf( - 'Error Connecting to server (%s): %s', - $errno, - $errstr - ), $errno); - } - - socket_set_block($this->sock); - socket_set_option($this->sock, SOL_TCP, TCP_NODELAY, 1); - - if ($this->keepalive) { - $this->enable_keepalive(); - } - } - - /** - * @return resource - */ - public function getSocket() - { - return $this->sock; - } - - /** - * Reconnects the socket - */ - public function reconnect() - { - $this->close(); - $this->connect(); - } - - /** - * @param $n - * @return mixed|string - * @throws \PhpAmqpLib\Exception\AMQPIOException - * @throws \PhpAmqpLib\Exception\AMQPRuntimeException - */ - public function read($n) - { - $res = ''; - $read = 0; - - $buf = socket_read($this->sock, $n); - while ($read < $n && $buf !== '' && $buf !== false) { - // Null sockets are invalid, throw exception - if (is_null($this->sock)) { - throw new AMQPRuntimeException(sprintf( - 'Socket was null! Last SocketError was: %s', - socket_strerror(socket_last_error()) - )); - } - - $read += mb_strlen($buf, 'ASCII'); - $res .= $buf; - $buf = socket_read($this->sock, $n - $read); - } - - if (mb_strlen($res, 'ASCII') != $n) { - throw new AMQPIOException(sprintf( - 'Error reading data. Received %s instead of expected %s bytes', - mb_strlen($res, 'ASCII'), - $n - )); - } - - return $res; - } - - /** - * @param $data - * @return mixed|void - * @throws \PhpAmqpLib\Exception\AMQPIOException - * @throws \PhpAmqpLib\Exception\AMQPRuntimeException - */ - public function write($data) - { - $len = mb_strlen($data, 'ASCII'); - - while (true) { - // Null sockets are invalid, throw exception - if (is_null($this->sock)) { - throw new AMQPRuntimeException(sprintf( - 'Socket was null! Last SocketError was: %s', - socket_strerror(socket_last_error()) - )); - } - - $sent = socket_write($this->sock, $data, $len); - if ($sent === false) { - throw new AMQPIOException(sprintf( - 'Error sending data. Last SocketError: %s', - socket_strerror(socket_last_error()) - )); - } - - // Check if the entire message has been sent - if ($sent < $len) { - // If not sent the entire message. - // Get the part of the message that has not yet been sent as message - $data = mb_substr($data, $sent, mb_strlen($data, 'ASCII') - $sent, 'ASCII'); - // Get the length of the not sent part - $len -= $sent; - } else { - break; - } - } - } - - public function close() - { - if (is_resource($this->sock)) { - socket_close($this->sock); - } - $this->sock = null; - } - - /** - * @param $sec - * @param $usec - * @return int|mixed - */ - public function select($sec, $usec) - { - $read = array($this->sock); - $write = null; - $except = null; - - return socket_select($read, $write, $except, $sec, $usec); - } - - /** - * @throws \PhpAmqpLib\Exception\AMQPIOException - */ - protected function enable_keepalive() - { - if (!defined('SOL_SOCKET') || !defined('SO_KEEPALIVE')) { - throw new AMQPIOException('Can not enable keepalive: SOL_SOCKET or SO_KEEPALIVE is not defined'); - } - - socket_set_option($this->sock, SOL_SOCKET, SO_KEEPALIVE, 1); - } -} diff --git a/lib/PhpAmqpLib/Wire/IO/StreamIO.php b/lib/PhpAmqpLib/Wire/IO/StreamIO.php deleted file mode 100644 index 0ec12fc839..0000000000 --- a/lib/PhpAmqpLib/Wire/IO/StreamIO.php +++ /dev/null @@ -1,309 +0,0 @@ -host = $host; - $this->port = $port; - $this->connection_timeout = $connection_timeout; - $this->read_write_timeout = $read_write_timeout; - $this->context = $context; - $this->keepalive = $keepalive; - $this->heartbeat = $heartbeat; - $this->canDispatchPcntlSignal = extension_loaded('pcntl') && function_exists('pcntl_signal_dispatch') - && (defined('AMQP_WITHOUT_SIGNALS') ? !AMQP_WITHOUT_SIGNALS : true); - } - - /** - * Sets up the stream connection - * - * @throws \PhpAmqpLib\Exception\AMQPRuntimeException - * @throws \Exception - */ - public function connect() - { - $errstr = $errno = null; - - if ($this->context) { - $remote = sprintf('ssl://%s:%s', $this->host, $this->port); - $this->sock = @stream_socket_client( - $remote, - $errno, - $errstr, - $this->connection_timeout, - STREAM_CLIENT_CONNECT, - $this->context - ); - } else { - $remote = sprintf('tcp://%s:%s', $this->host, $this->port); - $this->sock = @stream_socket_client( - $remote, - $errno, - $errstr, - $this->connection_timeout, - STREAM_CLIENT_CONNECT - ); - } - - if (!$this->sock) { - throw new AMQPRuntimeException(sprintf( - 'Error Connecting to server (%s): %s', - $errno, - $errstr - ), $errno); - } - - list($sec, $uSec) = MiscHelper::splitSecondsMicroseconds($this->read_write_timeout); - if (!stream_set_timeout($this->sock, $sec, $uSec)) { - throw new AMQPIOException('Timeout could not be set'); - } - - stream_set_blocking($this->sock, 1); - - if ($this->keepalive) { - $this->enable_keepalive(); - } - } - - /** - * Reconnects the socket - */ - public function reconnect() - { - $this->close(); - $this->connect(); - } - - /** - * @param $n - * @throws \PhpAmqpLib\Exception\AMQPIOException - * @return mixed|string - */ - public function read($n) - { - $res = ''; - $read = 0; - - while ($read < $n && !feof($this->sock) && (false !== ($buf = fread($this->sock, $n - $read)))) { - $this->check_heartbeat(); - - if ($buf === '') { - if ($this->canDispatchPcntlSignal) { - pcntl_signal_dispatch(); - } - continue; - } - - $read += mb_strlen($buf, 'ASCII'); - $res .= $buf; - - $this->last_read = microtime(true); - } - - if (mb_strlen($res, 'ASCII') != $n) { - throw new AMQPIOException(sprintf( - 'Error reading data. Received %s instead of expected %s bytes', - mb_strlen($res, 'ASCII'), - $n - )); - } - - return $res; - } - - /** - * @param $data - * @return mixed|void - * @throws \PhpAmqpLib\Exception\AMQPRuntimeException - * @throws \PhpAmqpLib\Exception\AMQPTimeoutException - */ - public function write($data) - { - $len = mb_strlen($data, 'ASCII'); - while (true) { - if (is_null($this->sock)) { - throw new AMQPRuntimeException('Broken pipe or closed connection'); - } - - if (false === ($written = @fwrite($this->sock, $data))) { - throw new AMQPRuntimeException('Error sending data'); - } - - if ($written === 0) { - throw new AMQPRuntimeException('Broken pipe or closed connection'); - } - - if ($this->timed_out()) { - throw new AMQPTimeoutException('Error sending data. Socket connection timed out'); - } - - $len = $len - $written; - if ($len > 0) { - $data = mb_substr($data, 0 - $len, 0 - $len, 'ASCII'); - } else { - $this->last_write = microtime(true); - break; - } - } - } - - /** - * Heartbeat logic: check connection health here - */ - protected function check_heartbeat() - { - // ignore unless heartbeat interval is set - if ($this->heartbeat !== 0 && $this->last_read && $this->last_write) { - $t = microtime(true); - $t_read = round($t - $this->last_read); - $t_write = round($t - $this->last_write); - - // server has gone away - if (($this->heartbeat * 2) < $t_read) { - $this->reconnect(); - } - - // time for client to send a heartbeat - if (($this->heartbeat / 2) < $t_write) { - $this->write_heartbeat(); - } - } - } - - /** - * Sends a heartbeat message - */ - protected function write_heartbeat() - { - $pkt = new AMQPWriter(); - $pkt->write_octet(8); - $pkt->write_short(0); - $pkt->write_long(0); - $pkt->write_octet(0xCE); - $val = $pkt->getvalue(); - $this->write($pkt->getvalue()); - } - - public function close() - { - if (is_resource($this->sock)) { - fclose($this->sock); - } - $this->sock = null; - } - - /** - * @return resource - */ - public function get_socket() - { - return $this->sock; - } - - /** - * @return resource - */ - public function getSocket() - { - return $this->get_socket(); - } - - /** - * @param $sec - * @param $usec - * @return int|mixed - */ - public function select($sec, $usec) - { - $read = array($this->sock); - $write = null; - $except = null; - - return stream_select($read, $write, $except, $sec, $usec); - } - - /** - * @return mixed - */ - protected function timed_out() - { - // get status of socket to determine whether or not it has timed out - $info = stream_get_meta_data($this->sock); - - return $info['timed_out']; - } - - /** - * @throws \PhpAmqpLib\Exception\AMQPIOException - */ - protected function enable_keepalive() - { - if (!function_exists('socket_import_stream')) { - throw new AMQPIOException('Can not enable keepalive: function socket_import_stream does not exist'); - } - - if (!defined('SOL_SOCKET') || !defined('SO_KEEPALIVE')) { - throw new AMQPIOException('Can not enable keepalive: SOL_SOCKET or SO_KEEPALIVE is not defined'); - } - - $socket = socket_import_stream($this->sock); - socket_set_option($socket, SOL_SOCKET, SO_KEEPALIVE, 1); - } -} diff --git a/lib/PhpAmqpLib/autoload.php b/lib/PhpAmqpLib/autoload.php deleted file mode 100644 index 67f05e8316..0000000000 --- a/lib/PhpAmqpLib/autoload.php +++ /dev/null @@ -1,64 +0,0 @@ - '/Channel/AbstractChannel.php', - 'phpamqplib\\channel\\amqpchannel' => '/Channel/AMQPChannel.php', - 'phpamqplib\\connection\\abstractconnection' => '/Connection/AbstractConnection.php', - 'phpamqplib\\connection\\amqpconnection' => '/Connection/AMQPConnection.php', - 'phpamqplib\\connection\\amqplazyconnection' => '/Connection/AMQPLazyConnection.php', - 'phpamqplib\\connection\\amqpsocketconnection' => '/Connection/AMQPSocketConnection.php', - 'phpamqplib\\connection\\amqpsslconnection' => '/Connection/AMQPSSLConnection.php', - 'phpamqplib\\connection\\amqpstreamconnection' => '/Connection/AMQPStreamConnection.php', - 'phpamqplib\\exception\\amqpbasiccancelexception' => '/Exception/AMQPBasicCancelException.php', - 'phpamqplib\\exception\\amqpchannelexception' => '/Exception/AMQPChannelException.php', - 'phpamqplib\\exception\\amqpconnectionexception' => '/Exception/AMQPConnectionException.php', - 'phpamqplib\\exception\\amqpexception' => '/Exception/AMQPException.php', - 'phpamqplib\\exception\\amqpexceptioninterface' => '/Exception/AMQPExceptionInterface.php', - 'phpamqplib\\exception\\amqpinvalidargumentexception' => '/Exception/AMQPInvalidArgumentException.php', - 'phpamqplib\\exception\\amqpioexception' => '/Exception/AMQPIOException.php', - 'phpamqplib\\exception\\amqplogicexception' => '/Exception/AMQPLogicException.php', - 'phpamqplib\\exception\\amqpoutofboundsexception' => '/Exception/AMQPOutOfBoundsException.php', - 'phpamqplib\\exception\\amqpoutofrangeexception' => '/Exception/AMQPOutOfRangeException.php', - 'phpamqplib\\exception\\amqpprotocolchannelexception' => '/Exception/AMQPProtocolChannelException.php', - 'phpamqplib\\exception\\amqpprotocolconnectionexception' => '/Exception/AMQPProtocolConnectionException.php', - 'phpamqplib\\exception\\amqpprotocolexception' => '/Exception/AMQPProtocolException.php', - 'phpamqplib\\exception\\amqpruntimeexception' => '/Exception/AMQPRuntimeException.php', - 'phpamqplib\\exception\\amqptimeoutexception' => '/Exception/AMQPTimeoutException.php', - 'phpamqplib\\helper\\mischelper' => '/Helper/MiscHelper.php', - 'phpamqplib\\helper\\protocol\\methodmap080' => '/Helper/Protocol/MethodMap080.php', - 'phpamqplib\\helper\\protocol\\methodmap091' => '/Helper/Protocol/MethodMap091.php', - 'phpamqplib\\helper\\protocol\\protocol080' => '/Helper/Protocol/Protocol080.php', - 'phpamqplib\\helper\\protocol\\protocol091' => '/Helper/Protocol/Protocol091.php', - 'phpamqplib\\helper\\protocol\\wait080' => '/Helper/Protocol/Wait080.php', - 'phpamqplib\\helper\\protocol\\wait091' => '/Helper/Protocol/Wait091.php', - 'phpamqplib\\message\\amqpmessage' => '/Message/AMQPMessage.php', - 'phpamqplib\\wire\\abstractclient' => '/Wire/AbstractClient.php', - 'phpamqplib\\wire\\amqpabstractcollection' => '/Wire/AMQPAbstractCollection.php', - 'phpamqplib\\wire\\amqparray' => '/Wire/AMQPArray.php', - 'phpamqplib\\wire\\amqpdecimal' => '/Wire/AMQPDecimal.php', - 'phpamqplib\\wire\\amqpreader' => '/Wire/AMQPReader.php', - 'phpamqplib\\wire\\amqptable' => '/Wire/AMQPTable.php', - 'phpamqplib\\wire\\amqpwriter' => '/Wire/AMQPWriter.php', - 'phpamqplib\\wire\\constants080' => '/Wire/Constants080.php', - 'phpamqplib\\wire\\constants091' => '/Wire/Constants091.php', - 'phpamqplib\\wire\\genericcontent' => '/Wire/GenericContent.php', - 'phpamqplib\\wire\\io\\abstractio' => '/Wire/IO/AbstractIO.php', - 'phpamqplib\\wire\\io\\socketio' => '/Wire/IO/SocketIO.php', - 'phpamqplib\\wire\\io\\streamio' => '/Wire/IO/StreamIO.php' - ); - } - $cn = strtolower($class); - if (isset($classes[$cn])) { - require __DIR__ . $classes[$cn]; - } - }, - true, - false -); -// @codeCoverageIgnoreEnd diff --git a/lib/console_colour.php b/lib/console_colour.php deleted file mode 100644 index f98c1db6b9..0000000000 --- a/lib/console_colour.php +++ /dev/null @@ -1,383 +0,0 @@ - - * @license http://www.opensource.org/licenses/mit-license.php MIT License - * @link http://pear.php.net/package/Console_Color2 - */ - - - -/** - * A simple class to use ANSI Colorcodes. - * - * Of all the functions, you probably only want to use convert() and escape(). - * They are easier to use. However, if you want to access colorcodes more - * directly, look into the other functions. - * - * @category Console - * @package Console_Color - * @author Stefan Walk - * @license http://www.opensource.org/licenses/mit-license.php MIT License - * @link http://pear.php.net/package/Console_Color - */ -class Console_Color2 -{ - - protected $color_codes; - - - public function __construct() - { - $this->setColorCodes( - array( - 'color' => array( - 'black' => 30, - 'red' => 31, - 'green' => 32, - 'brown' => 33, - 'blue' => 34, - 'purple' => 35, - 'cyan' => 36, - 'grey' => 37, - 'yellow' => 33, - ), - 'style' => array( - 'normal' => 0, - 'bold' => 1, - 'light' => 1, - 'underscore' => 4, - 'underline' => 4, - 'blink' => 5, - 'inverse' => 6, - 'hidden' => 8, - 'concealed' => 8, - ), - 'background' => array( - 'black' => 40, - 'red' => 41, - 'green' => 42, - 'brown' => 43, - 'yellow' => 43, - 'blue' => 44, - 'purple' => 45, - 'cyan' => 46, - 'grey' => 47, - ), - ) - ); - - }//end __construct() - - - public function setColorCodes($color_codes) - { - $this->color_codes = $color_codes; - - }//end setColorCodes() - - - public function getColorCodes() - { - return $this->color_codes; - - }//end getColorCodes() - - - /** - * Returns an ANSI-Controlcode - * - * Takes 1 to 3 Arguments: either 1 to 3 strings containing the name of the - * FG Color, style and BG color, or one array with the indices color, style - * or background. - * - * @param mixed $color Optional. - * Either a string with the name of the foreground - * color, or an array with the indices 'color', - * 'style', 'background' and corresponding names as - * values. - * @param string $style Optional name of the style - * @param string $background Optional name of the background color - * - * @return string - */ - public function color($color=null, $style=null, $background=null) - { - $colors = $this->getColorCodes(); - if (is_array($color)) { - $style = isset($color['style']) ? $color['style'] : null; - $background = isset($color['background']) ? $color['background'] : null; - $color = isset($color['color']) ? $color['color'] : null; - } - - if ($color == 'reset') { - return "\033[0m"; - } - - $code = array(); - if (isset($style)) { - $code[] = $colors['style'][$style]; - } - - if (isset($color)) { - $code[] = $colors['color'][$color]; - } - - if (isset($background)) { - $code[] = $colors['background'][$background]; - } - - if (empty($code)) { - $code[] = 0; - } - - $code = implode(';', $code); - return "\033[{$code}m"; - - }//end color() - - - // }}} - - - /** - * Returns a FG color controlcode - * - * @param string $name Name of controlcode - * - * @return string - */ - public function fgcolor($name) - { - $colors = $this->getColorCodes(); - - return "\033[".$colors['color'][$name].'m'; - - }//end fgcolor() - - - /** - * Returns a style controlcode - * - * @param string $name Name of controlcode - * - * @return string - */ - function bgcolor($name) - { - $colors = $this->getColorCodes(); - return "\033[".$colors['background'][$name].'m'; - - }//end bgcolor() - - - /** - * Converts colorcodes in the format %y (for yellow) into ansi-control - * codes. The conversion table is: ('bold' meaning 'light' on some - * terminals). It's almost the same conversion table irssi uses. - *
        -     *                  text      text            background
        -     *      ------------------------------------------------
        -     *      %k %K %0    black     dark grey       black
        -     *      %r %R %1    red       bold red        red
        -     *      %g %G %2    green     bold green      green
        -     *      %y %Y %3    yellow    bold yellow     yellow
        -     *      %b %B %4    blue      bold blue       blue
        -     *      %m %M %5    magenta   bold magenta    magenta
        -     *      %p %P       magenta (think: purple)
        -     *      %c %C %6    cyan      bold cyan       cyan
        -     *      %w %W %7    white     bold white      white
        -     *
        -     *      %F     Blinking, Flashing
        -     *      %U     Underline
        -     *      %8     Reverse
        -     *      %_,%9  Bold
        -     *
        -     *      %n     Resets the color
        -     *      %%     A single %
        -     * 
        - * First param is the string to convert, second is an optional flag if - * colors should be used. It defaults to true, if set to false, the - * colorcodes will just be removed (And %% will be transformed into %) - * - * @param string $string String to convert - * @param boolean $colored Should the string be colored? - * - * @return string - */ - public function convert($string, $colored=true) - { - static $conversions = array( - // static so the array doesn't get built - // everytime - // %y - yellow, and so on... {{{ - '%y' => array( - 'color' => 'yellow', - 'style' => 'normal', - ), - '%g' => array( - 'color' => 'green', - 'style' => 'normal', - ), - '%b' => array( - 'color' => 'blue', - 'style' => 'normal', - ), - '%r' => array( - 'color' => 'red', - 'style' => 'normal', - ), - '%p' => array( - 'color' => 'purple', - 'style' => 'normal', - ), - '%m' => array( - 'color' => 'purple', - 'style' => 'normal', - ), - '%c' => array( - 'color' => 'cyan', - 'style' => 'normal', - ), - '%w' => array( - 'color' => 'grey', - 'style' => 'normal', - ), - '%k' => array( - 'color' => 'black', - 'style' => 'normal', - ), - '%n' => array('color' => 'reset' ), - '%Y' => array( - 'color' => 'yellow', - 'style' => 'light', - ), - '%G' => array( - 'color' => 'green', - 'style' => 'light', - ), - '%B' => array( - 'color' => 'blue', - 'style' => 'light', - ), - '%R' => array( - 'color' => 'red', - 'style' => 'light', - ), - '%P' => array( - 'color' => 'purple', - 'style' => 'light', - ), - '%M' => array( - 'color' => 'purple', - 'style' => 'light', - ), - '%C' => array( - 'color' => 'cyan', - 'style' => 'light', - ), - '%W' => array( - 'color' => 'grey', - 'style' => 'light', - ), - '%K' => array( - 'color' => 'black', - 'style' => 'light', - ), - '%N' => array( - 'color' => 'reset', - 'style' => 'light', - ), - '%3' => array('background' => 'yellow'), - '%2' => array('background' => 'green' ), - '%4' => array('background' => 'blue' ), - '%1' => array('background' => 'red' ), - '%5' => array('background' => 'purple'), - '%6' => array('background' => 'cyan' ), - '%7' => array('background' => 'grey' ), - '%0' => array('background' => 'black' ), - // Don't use this, I can't stand flashing text - '%F' => array('style' => 'blink'), - '%U' => array('style' => 'underline'), - '%8' => array('style' => 'inverse'), - '%9' => array('style' => 'bold'), - '%_' => array('style' => 'bold'), - // }}} - ); - - if ($colored) { - $string = str_replace('%%', '% ', $string); - foreach ($conversions as $key => $value) { - $string = str_replace( - $key, - $this->color($value), - $string - ); - } - - $string = str_replace('% ', '%', $string); - } - else { - $string = preg_replace('/%((%)|.)/', '$2', $string); - } - - return $string; - - }//end convert() - - - /** - * Escapes % so they don't get interpreted as color codes - * - * @param string $string String to escape - * - * @return string - */ - public function escape($string) - { - return str_replace('%', '%%', $string); - - }//end escape() - - - /** - * Strips ANSI color codes from a string - * - * @param string $string String to strip - * - * @acess public - * @return string - */ - public function strip($string) - { - return preg_replace('/\033\[[\d;]+m/', '', $string); - - }//end strip() - - -}//end class diff --git a/lib/console_table.php b/lib/console_table.php deleted file mode 100644 index ebc42c02ae..0000000000 --- a/lib/console_table.php +++ /dev/null @@ -1,965 +0,0 @@ - - * @author Jan Schneider - * @copyright 2002-2005 Richard Heyes - * @copyright 2006-2008 Jan Schneider - * @license http://www.debian.org/misc/bsd.license BSD License (3 Clause) - * @version CVS: $Id$ - * @link http://pear.php.net/package/Console_Table - */ - -define('CONSOLE_TABLE_HORIZONTAL_RULE', 1); -define('CONSOLE_TABLE_ALIGN_LEFT', -1); -define('CONSOLE_TABLE_ALIGN_CENTER', 0); -define('CONSOLE_TABLE_ALIGN_RIGHT', 1); -define('CONSOLE_TABLE_BORDER_ASCII', -1); - -/* - * The main class. - * - * @category Console - * @package Console_Table - * @author Jan Schneider - * @license http://www.debian.org/misc/bsd.license BSD License (3 Clause) - * @link http://pear.php.net/package/Console_Table - */ -class Console_Table -{ - - /* - * The table headers. - * - * @var array - */ - var $_headers = array(); - - /* - * The data of the table. - * - * @var array - */ - var $_data = array(); - - /* - * The maximum number of columns in a row. - * - * @var integer - */ - var $_max_cols = 0; - - /* - * The maximum number of rows in the table. - * - * @var integer - */ - var $_max_rows = 0; - - /* - * Lengths of the columns, calculated when rows are added to the table. - * - * @var array - */ - var $_cell_lengths = array(); - - /* - * Heights of the rows. - * - * @var array - */ - var $_row_heights = array(); - - /* - * How many spaces to use to pad the table. - * - * @var integer - */ - var $_padding = 1; - - /* - * Column filters. - * - * @var array - */ - var $_filters = array(); - - /* - * Columns to calculate totals for. - * - * @var array - */ - var $_calculateTotals; - - /* - * Alignment of the columns. - * - * @var array - */ - var $_col_align = array(); - - /* - * Default alignment of columns. - * - * @var integer - */ - var $_defaultAlign; - - /* - * Character set of the data. - * - * @var string - */ - var $_charset = 'utf-8'; - - /* - * Border character. - * - * @var string - */ - var $_border = CONSOLE_TABLE_BORDER_ASCII; - - /* - * Whether the data has ANSI colors. - * - * @var boolean - */ - var $_ansiColor = false; - - - /* - * Constructor. - * - * @param integer $align Default alignment. One of - * CONSOLE_TABLE_ALIGN_LEFT, - * CONSOLE_TABLE_ALIGN_CENTER or - * CONSOLE_TABLE_ALIGN_RIGHT. - * @param string $border The character used for table borders or - * CONSOLE_TABLE_BORDER_ASCII. - * @param integer $padding How many spaces to use to pad the table. - * @param string $charset A charset supported by the mbstring PHP - * extension. - * @param boolean $color Whether the data contains ansi color codes. - */ - function __construct( - $align=CONSOLE_TABLE_ALIGN_LEFT, - $border=CONSOLE_TABLE_BORDER_ASCII, - $padding=1, - $charset=null, - $color=false - ) { - $this->_defaultAlign = $align; - $this->_border = $border; - $this->_padding = $padding; - $this->_ansiColor = $color; - if ($this->_ansiColor) { - include_once 'Console/Color.php'; - } - - if (!empty($charset)) { - $this->setCharset($charset); - } - - }//end Console_Table() - - - /* - * Converts an array to a table. - * - * @param array $headers Headers for the table. - * @param array $data A two dimensional array with the table - * data. - * @param boolean $returnObject Whether to return the Console_Table object - * instead of the rendered table. - * - * @static - * - * @return Console_Table|string A Console_Table object or the generated - * table. - */ - function fromArray($headers, $data, $returnObject=false) { - if (!is_array($headers) || !is_array($data)) { - return false; - } - - $table = new Console_Table(); - $table->setHeaders($headers); - - foreach ($data as $row) { - $table->addRow($row); - } - - return $returnObject ? $table : $table->getTable(); - - }//end fromArray() - - - /* - * Adds a filter to a column. - * - * Filters are standard PHP callbacks which are run on the data before - * table generation is performed. Filters are applied in the order they - * are added. The callback function must accept a single argument, which - * is a single table cell. - * - * @param integer $col Column to apply filter to. - * @param mixed &$callback PHP callback to apply. - * - * @return void - */ - function addFilter($col, &$callback) { - $this->_filters[] = array( - $col, - &$callback, - ); - - }//end addFilter() - - - /* - * Sets the charset of the provided table data. - * - * @param string $charset A charset supported by the mbstring PHP - * extension. - * - * @return void - */ - function setCharset($charset) { - $locale = setlocale(LC_CTYPE, 0); - setlocale(LC_CTYPE, 'en_US'); - $this->_charset = strtolower($charset); - setlocale(LC_CTYPE, $locale); - - }//end setCharset() - - - /* - * Sets the alignment for the columns. - * - * @param integer $col_id The column number. - * @param integer $align Alignment to set for this column. One of - * CONSOLE_TABLE_ALIGN_LEFT - * CONSOLE_TABLE_ALIGN_CENTER - * CONSOLE_TABLE_ALIGN_RIGHT. - * - * @return void - */ - function setAlign($col_id, $align=CONSOLE_TABLE_ALIGN_LEFT) - { - switch ($align) { - case CONSOLE_TABLE_ALIGN_CENTER: - $pad = STR_PAD_BOTH; - break; - - case CONSOLE_TABLE_ALIGN_RIGHT: - $pad = STR_PAD_LEFT; - break; - - default: - $pad = STR_PAD_RIGHT; - break; - } - - $this->_col_align[$col_id] = $pad; - - }//end setAlign() - - - /* - * Specifies which columns are to have totals calculated for them and - * added as a new row at the bottom. - * - * @param array $cols Array of column numbers (starting with 0). - * - * @return void - */ - function calculateTotalsFor($cols) { - $this->_calculateTotals = $cols; - - }//end calculateTotalsFor() - - - /* - * Sets the headers for the columns. - * - * @param array $headers The column headers. - * - * @return void - */ - function setHeaders($headers) { - $this->_headers = array(array_values($headers)); - $this->_updateRowsCols($headers); - - }//end setHeaders() - - - /* - * Adds a row to the table. - * - * @param array $row The row data to add. - * @param boolean $append Whether to append or prepend the row. - * - * @return void - */ - function addRow($row, $append=true) { - if ($append) { - $this->_data[] = array_values($row); - } - else { - array_unshift($this->_data, array_values($row)); - } - - $this->_updateRowsCols($row); - - }//end addRow() - - - /* - * Inserts a row after a given row number in the table. - * - * If $row_id is not given it will prepend the row. - * - * @param array $row The data to insert. - * @param integer $row_id Row number to insert before. - * - * @return void - */ - function insertRow($row, $row_id=0) { - array_splice($this->_data, $row_id, 0, array($row)); - - $this->_updateRowsCols($row); - - }//end insertRow() - - - /* - * Adds a column to the table. - * - * @param array $col_data The data of the column. - * @param integer $col_id The column index to populate. - * @param integer $row_id If starting row is not zero, specify it here. - * - * @return void - */ - function addCol($col_data, $col_id=0, $row_id=0) { - foreach ($col_data as $col_cell) { - $this->_data[$row_id++][$col_id] = $col_cell; - } - - $this->_updateRowsCols(); - $this->_max_cols = max($this->_max_cols, ($col_id + 1)); - - }//end addCol() - - - /* - * Adds data to the table. - * - * @param array $data A two dimensional array with the table data. - * @param integer $col_id Starting column number. - * @param integer $row_id Starting row number. - * - * @return void - */ - function addData($data, $col_id=0, $row_id=0) { - foreach ($data as $row) { - if ($row === CONSOLE_TABLE_HORIZONTAL_RULE) { - $this->_data[$row_id] = CONSOLE_TABLE_HORIZONTAL_RULE; - $row_id++; - continue; - } - - $starting_col = $col_id; - foreach ($row as $cell) { - $this->_data[$row_id][$starting_col++] = $cell; - } - - $this->_updateRowsCols(); - $this->_max_cols = max($this->_max_cols, $starting_col); - $row_id++; - } - - }//end addData() - - - /* - * Adds a horizontal seperator to the table. - * - * @return void - */ - function addSeparator() { - $this->_data[] = CONSOLE_TABLE_HORIZONTAL_RULE; - - }//end addSeparator() - - - /* - * Returns the generated table. - * - * @return string The generated table. - */ - function getTable() { - $this->_applyFilters(); - $this->_calculateTotals(); - $this->_validateTable(); - - return $this->_buildTable(); - - }//end getTable() - - - /* - * Calculates totals for columns. - * - * @return void - */ - function _calculateTotals() { - if (empty($this->_calculateTotals)) { - return; - } - - $this->addSeparator(); - - $totals = array(); - foreach ($this->_data as $row) { - if (is_array($row)) { - foreach ($this->_calculateTotals as $columnID) { - $totals[$columnID] += $row[$columnID]; - } - } - } - - $this->_data[] = $totals; - $this->_updateRowsCols(); - - }//end _calculateTotals() - - - /* - * Applies any column filters to the data. - * - * @return void - */ - function _applyFilters() { - if (empty($this->_filters)) { - return; - } - - foreach ($this->_filters as $filter) { - $column = $filter[0]; - $callback = $filter[1]; - - foreach ($this->_data as $row_id => $row_data) { - if ($row_data !== CONSOLE_TABLE_HORIZONTAL_RULE) { - $this->_data[$row_id][$column] = call_user_func($callback, $row_data[$column]); - } - } - } - - }//end _applyFilters() - - - /* - * Ensures that column and row counts are correct. - * - * @return void - */ - function _validateTable() { - if (!empty($this->_headers)) { - $this->_calculateRowHeight(-1, $this->_headers[0]); - } - - for ($i = 0; $i < $this->_max_rows; $i++) { - for ($j = 0; $j < $this->_max_cols; $j++) { - if (!isset($this->_data[$i][$j]) - && (!isset($this->_data[$i]) - || $this->_data[$i] !== CONSOLE_TABLE_HORIZONTAL_RULE) - ) { - $this->_data[$i][$j] = ''; - } - } - - $this->_calculateRowHeight($i, $this->_data[$i]); - - if ($this->_data[$i] !== CONSOLE_TABLE_HORIZONTAL_RULE) { - ksort($this->_data[$i]); - } - } - - $this->_splitMultilineRows(); - - // Update cell lengths. - $count_headers = count($this->_headers); - for ($i = 0; $i < $count_headers; $i++) { - $this->_calculateCellLengths($this->_headers[$i]); - } - - for ($i = 0; $i < $this->_max_rows; $i++) { - $this->_calculateCellLengths($this->_data[$i]); - } - - ksort($this->_data); - - }//end _validateTable() - - - /* - * Splits multiline rows into many smaller one-line rows. - * - * @return void - */ - function _splitMultilineRows() { - ksort($this->_data); - $sections = array( - &$this->_headers, - &$this->_data, - ); - $max_rows = array( - count($this->_headers), - $this->_max_rows, - ); - $row_height_offset = array( - -1, - 0, - ); - - for ($s = 0; $s <= 1; $s++) { - $inserted = 0; - $new_data = $sections[$s]; - - for ($i = 0; $i < $max_rows[$s]; $i++) { - // Process only rows that have many lines. - $height = $this->_row_heights[($i + $row_height_offset[$s])]; - if ($height > 1) { - // Split column data into one-liners. - $split = array(); - for ($j = 0; $j < $this->_max_cols; $j++) { - $split[$j] = preg_split( - '/\r?\n|\r/', - $sections[$s][$i][$j] - ); - } - - $new_rows = array(); - // Construct new 'virtual' rows - insert empty strings for - // columns that have less lines that the highest one. - for ($i2 = 0; $i2 < $height; $i2++) { - for ($j = 0; $j < $this->_max_cols; $j++) { - $new_rows[$i2][$j] = !isset($split[$j][$i2]) ? '' : $split[$j][$i2]; - } - } - - // Replace current row with smaller rows. $inserted is - // used to take account of bigger array because of already - // inserted rows. - array_splice($new_data, ($i + $inserted), 1, $new_rows); - $inserted += (count($new_rows) - 1); - }//end if - }//end for - - // Has the data been modified? - if ($inserted > 0) { - $sections[$s] = $new_data; - $this->_updateRowsCols(); - } - }//end for - - }//end _splitMultilineRows() - - - /* - * Builds the table. - * - * @return string The generated table string. - */ - function _buildTable() { - if (!count($this->_data)) { - return ''; - } - - $rule = $this->_border == CONSOLE_TABLE_BORDER_ASCII ? '|' : $this->_border; - $separator = $this->_getSeparator(); - - $return = array(); - $count_data = count($this->_data); - for ($i = 0; $i < $count_data; $i++) { - $count_data_i = count($this->_data[$i]); - for ($j = 0; $j < $count_data_i; $j++) { - if ($this->_data[$i] !== CONSOLE_TABLE_HORIZONTAL_RULE - && $this->_strlen($this->_data[$i][$j]) < $this->_cell_lengths[$j] - ) { - $this->_data[$i][$j] = $this->_strpad( - $this->_data[$i][$j], - $this->_cell_lengths[$j], - ' ', - $this->_col_align[$j] - ); - } - } - - if ($this->_data[$i] !== CONSOLE_TABLE_HORIZONTAL_RULE) { - $row_begin = $rule.str_repeat(' ', $this->_padding); - $row_end = str_repeat(' ', $this->_padding).$rule; - $implode_char = str_repeat(' ', $this->_padding).$rule.str_repeat(' ', $this->_padding); - $return[] = $row_begin.implode($implode_char, $this->_data[$i]).$row_end; - } - else if (!empty($separator)) { - $return[] = $separator; - } - }//end for - - $return = implode(PHP_EOL, $return); - if (!empty($separator)) { - $return = $separator.PHP_EOL.$return.PHP_EOL.$separator; - } - - $return .= PHP_EOL; - - if (!empty($this->_headers)) { - $return = $this->_getHeaderLine().PHP_EOL.$return; - } - - return $return; - - }//end _buildTable() - - - /* - * Creates a horizontal separator for header separation and table - * start/end etc. - * - * @return string The horizontal separator. - */ - function _getSeparator() { - if (!$this->_border) { - return; - } - - if ($this->_border == CONSOLE_TABLE_BORDER_ASCII) { - $rule = '-'; - $sect = '+'; - } - else { - $rule = $sect = $this->_border; - } - - $return = array(); - foreach ($this->_cell_lengths as $cl) { - $return[] = str_repeat($rule, $cl); - } - - $row_begin = $sect.str_repeat($rule, $this->_padding); - $row_end = str_repeat($rule, $this->_padding).$sect; - $implode_char = str_repeat($rule, $this->_padding).$sect.str_repeat($rule, $this->_padding); - - return $row_begin.implode($implode_char, $return).$row_end; - - }//end _getSeparator() - - - /* - * Returns the header line for the table. - * - * @return string The header line of the table. - */ - function _getHeaderLine() { - // Make sure column count is correct - $count_headers = count($this->_headers); - for ($j = 0; $j < $count_headers; $j++) { - for ($i = 0; $i < $this->_max_cols; $i++) { - if (!isset($this->_headers[$j][$i])) { - $this->_headers[$j][$i] = ''; - } - } - } - - $count_headers = count($this->_headers); - for ($j = 0; $j < $count_headers; $j++) { - $count_headers_j = count($this->_headers[$j]); - for ($i = 0; $i < $count_headers_j; $i++) { - if ($this->_strlen($this->_headers[$j][$i]) < $this->_cell_lengths[$i] - ) { - $this->_headers[$j][$i] = $this->_strpad( - $this->_headers[$j][$i], - $this->_cell_lengths[$i], - ' ', - $this->_col_align[$i] - ); - } - } - } - - $rule = $this->_border == CONSOLE_TABLE_BORDER_ASCII ? '|' : $this->_border; - $row_begin = $rule.str_repeat(' ', $this->_padding); - $row_end = str_repeat(' ', $this->_padding).$rule; - $implode_char = str_repeat(' ', $this->_padding).$rule.str_repeat(' ', $this->_padding); - - $separator = $this->_getSeparator(); - if (!empty($separator)) { - $return[] = $separator; - } - - for ($j = 0; $j < count($this->_headers); $j++) { - $return[] = $row_begin.implode($implode_char, $this->_headers[$j]).$row_end; - } - - return implode(PHP_EOL, $return); - - }//end _getHeaderLine() - - - /* - * Updates values for maximum columns and rows. - * - * @param array $rowdata Data array of a single row. - * - * @return void - */ - function _updateRowsCols($rowdata=null) { - // Update maximum columns. - $this->_max_cols = max($this->_max_cols, count($rowdata)); - - // Update maximum rows. - ksort($this->_data); - $keys = array_keys($this->_data); - $this->_max_rows = (end($keys) + 1); - - switch ($this->_defaultAlign) { - case CONSOLE_TABLE_ALIGN_CENTER: - $pad = STR_PAD_BOTH; - break; - - case CONSOLE_TABLE_ALIGN_RIGHT: - $pad = STR_PAD_LEFT; - break; - - default: - $pad = STR_PAD_RIGHT; - break; - } - - // Set default column alignments - for ($i = count($this->_col_align); $i < $this->_max_cols; $i++) { - $this->_col_align[$i] = $pad; - } - - }//end _updateRowsCols() - - - /* - * Calculates the maximum length for each column of a row. - * - * @param array $row The row data. - * - * @return void - */ - function _calculateCellLengths($row) { - $count_row = count($row); - for ($i = 0; $i < $count_row; $i++) { - if (!isset($this->_cell_lengths[$i])) { - $this->_cell_lengths[$i] = 0; - } - - $this->_cell_lengths[$i] = max( - $this->_cell_lengths[$i], - $this->_strlen($row[$i]) - ); - } - - }//end _calculateCellLengths() - - - /* - * Calculates the maximum height for all columns of a row. - * - * @param integer $row_number The row number. - * @param array $row The row data. - * - * @return void - */ - function _calculateRowHeight($row_number, $row) { - if (!isset($this->_row_heights[$row_number])) { - $this->_row_heights[$row_number] = 1; - } - - // Do not process horizontal rule rows. - if ($row === CONSOLE_TABLE_HORIZONTAL_RULE) { - return; - } - - for ($i = 0, $c = count($row); $i < $c; ++$i) { - $lines = preg_split('/\r?\n|\r/', $row[$i]); - $this->_row_heights[$row_number] = max( - $this->_row_heights[$row_number], - count($lines) - ); - } - - }//end _calculateRowHeight() - - - /* - * Returns the character length of a string. - * - * @param string $str A multibyte or singlebyte string. - * - * @return integer The string length. - */ - function _strlen($str) { - static $mbstring; - - // Strip ANSI color codes if requested. - if ($this->_ansiColor) { - $str = Console_Color::strip($str); - } - - // Cache expensive function_exists() calls. - if (!isset($mbstring)) { - $mbstring = function_exists('mb_strwidth'); - } - - if ($mbstring) { - return mb_strwidth($str, $this->_charset); - } - - return strlen($str); - - }//end _strlen() - - - /* - * Returns part of a string. - * - * @param string $string The string to be converted. - * @param integer $start The part's start position, zero based. - * @param integer $length The part's length. - * - * @return string The string's part. - */ - function _substr($string, $start, $length=null) { - static $mbstring; - - // Cache expensive function_exists() calls. - if (!isset($mbstring)) { - $mbstring = function_exists('mb_substr'); - } - - if (is_null($length)) { - $length = $this->_strlen($string); - } - - if ($mbstring) { - $ret = @mb_substr($string, $start, $length, $this->_charset); - if (!empty($ret)) { - return $ret; - } - } - - return substr($string, $start, $length); - - }//end _substr() - - - /* - * Returns a string padded to a certain length with another string. - * - * This method behaves exactly like str_pad but is multibyte safe. - * - * @param string $input The string to be padded. - * @param integer $length The length of the resulting string. - * @param string $pad The string to pad the input string with. Must - * be in the same charset like the input string. - * @param const $type The padding type. One of STR_PAD_LEFT, - * STR_PAD_RIGHT, or STR_PAD_BOTH. - * - * @return string The padded string. - */ - function _strpad($input, $length, $pad=' ', $type=STR_PAD_RIGHT) { - $mb_length = $this->_strlen($input); - $sb_length = strlen($input); - $pad_length = $this->_strlen($pad); - - // Return if we already have the length. - if ($mb_length >= $length) { - return $input; - } - - // Shortcut for single byte strings. - if ($mb_length == $sb_length && $pad_length == strlen($pad)) { - return str_pad($input, $length, $pad, $type); - } - - switch ($type) { - case STR_PAD_LEFT: - $left = ($length - $mb_length); - $output = $this->_substr( - str_repeat($pad, ceil($left / $pad_length)), - 0, - $left, - $this->_charset - ).$input; - break; - - case STR_PAD_BOTH: - $left = floor(($length - $mb_length) / 2); - $right = ceil(($length - $mb_length) / 2); - $output = $this->_substr( - str_repeat($pad, ceil($left / $pad_length)), - 0, - $left, - $this->_charset - ).$input.$this->_substr( - str_repeat($pad, ceil($right / $pad_length)), - 0, - $right, - $this->_charset - ); - break; - - case STR_PAD_RIGHT: - $right = ($length - $mb_length); - $output = $input.$this->_substr( - str_repeat($pad, ceil($right / $pad_length)), - 0, - $right, - $this->_charset - ); - break; - }//end switch - - return $output; - - }//end _strpad() - - -}//end class diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/DefinitionCache/Serializer/HTML/4.8.0,b6889960956c877d241a7e8f87e613efc7a3611d,1.ser b/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/DefinitionCache/Serializer/HTML/4.8.0,b6889960956c877d241a7e8f87e613efc7a3611d,1.ser deleted file mode 100644 index eb19b2228e..0000000000 Binary files a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/DefinitionCache/Serializer/HTML/4.8.0,b6889960956c877d241a7e8f87e613efc7a3611d,1.ser and /dev/null differ diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/DefinitionCache/Serializer/URI/4.8.0,3478238e680361cd87bf880f5b3cc50a1e7abc6c,1.ser b/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/DefinitionCache/Serializer/URI/4.8.0,3478238e680361cd87bf880f5b3cc50a1e7abc6c,1.ser deleted file mode 100644 index f6d3e812b7..0000000000 Binary files a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/DefinitionCache/Serializer/URI/4.8.0,3478238e680361cd87bf880f5b3cc50a1e7abc6c,1.ser and /dev/null differ diff --git a/lib/phpmailer/class.phpmailer.php b/lib/phpmailer/class.phpmailer.php deleted file mode 100644 index 6afcf9ae94..0000000000 --- a/lib/phpmailer/class.phpmailer.php +++ /dev/null @@ -1,3983 +0,0 @@ - - * @author Jim Jagielski (jimjag) - * @author Andy Prevost (codeworxtech) - * @author Brent R. Matzelle (original founder) - * @copyright 2012 - 2014 Marcus Bointon - * @copyright 2010 - 2012 Jim Jagielski - * @copyright 2004 - 2009 Andy Prevost - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License - * @note This program is distributed in the hope that it will be useful - WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. - */ - -/** - * PHPMailer - PHP email creation and transport class. - * @package PHPMailer - * @author Marcus Bointon (Synchro/coolbru) - * @author Jim Jagielski (jimjag) - * @author Andy Prevost (codeworxtech) - * @author Brent R. Matzelle (original founder) - */ -class PHPMailer -{ - /** - * The PHPMailer Version number. - * @var string - */ - public $Version = '5.2.19'; - - /** - * Email priority. - * Options: null (default), 1 = High, 3 = Normal, 5 = low. - * When null, the header is not set at all. - * @var integer - */ - public $Priority = null; - - /** - * The character set of the message. - * @var string - */ - public $CharSet = 'iso-8859-1'; - - /** - * The MIME Content-type of the message. - * @var string - */ - public $ContentType = 'text/plain'; - - /** - * The message encoding. - * Options: "8bit", "7bit", "binary", "base64", and "quoted-printable". - * @var string - */ - public $Encoding = '8bit'; - - /** - * Holds the most recent mailer error message. - * @var string - */ - public $ErrorInfo = ''; - - /** - * The From email address for the message. - * @var string - */ - public $From = 'root@localhost'; - - /** - * The From name of the message. - * @var string - */ - public $FromName = 'Root User'; - - /** - * The Sender email (Return-Path) of the message. - * If not empty, will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode. - * @var string - */ - public $Sender = ''; - - /** - * The Return-Path of the message. - * If empty, it will be set to either From or Sender. - * @var string - * @deprecated Email senders should never set a return-path header; - * it's the receiver's job (RFC5321 section 4.4), so this no longer does anything. - * @link https://tools.ietf.org/html/rfc5321#section-4.4 RFC5321 reference - */ - public $ReturnPath = ''; - - /** - * The Subject of the message. - * @var string - */ - public $Subject = ''; - - /** - * An HTML or plain text message body. - * If HTML then call isHTML(true). - * @var string - */ - public $Body = ''; - - /** - * The plain-text message body. - * This body can be read by mail clients that do not have HTML email - * capability such as mutt & Eudora. - * Clients that can read HTML will view the normal Body. - * @var string - */ - public $AltBody = ''; - - /** - * An iCal message part body. - * Only supported in simple alt or alt_inline message types - * To generate iCal events, use the bundled extras/EasyPeasyICS.php class or iCalcreator - * @link http://sprain.ch/blog/downloads/php-class-easypeasyics-create-ical-files-with-php/ - * @link http://kigkonsult.se/iCalcreator/ - * @var string - */ - public $Ical = ''; - - /** - * The complete compiled MIME message body. - * @access protected - * @var string - */ - protected $MIMEBody = ''; - - /** - * The complete compiled MIME message headers. - * @var string - * @access protected - */ - protected $MIMEHeader = ''; - - /** - * Extra headers that createHeader() doesn't fold in. - * @var string - * @access protected - */ - protected $mailHeader = ''; - - /** - * Word-wrap the message body to this number of chars. - * Set to 0 to not wrap. A useful value here is 78, for RFC2822 section 2.1.1 compliance. - * @var integer - */ - public $WordWrap = 0; - - /** - * Which method to use to send mail. - * Options: "mail", "sendmail", or "smtp". - * @var string - */ - public $Mailer = 'mail'; - - /** - * The path to the sendmail program. - * @var string - */ - public $Sendmail = '/usr/sbin/sendmail'; - - /** - * Whether mail() uses a fully sendmail-compatible MTA. - * One which supports sendmail's "-oi -f" options. - * @var boolean - */ - public $UseSendmailOptions = true; - - /** - * Path to PHPMailer plugins. - * Useful if the SMTP class is not in the PHP include path. - * @var string - * @deprecated Should not be needed now there is an autoloader. - */ - public $PluginDir = ''; - - /** - * The email address that a reading confirmation should be sent to, also known as read receipt. - * @var string - */ - public $ConfirmReadingTo = ''; - - /** - * The hostname to use in the Message-ID header and as default HELO string. - * If empty, PHPMailer attempts to find one with, in order, - * $_SERVER['SERVER_NAME'], gethostname(), php_uname('n'), or the value - * 'localhost.localdomain'. - * @var string - */ - public $Hostname = ''; - - /** - * An ID to be used in the Message-ID header. - * If empty, a unique id will be generated. - * You can set your own, but it must be in the format "", - * as defined in RFC5322 section 3.6.4 or it will be ignored. - * @see https://tools.ietf.org/html/rfc5322#section-3.6.4 - * @var string - */ - public $MessageID = ''; - - /** - * The message Date to be used in the Date header. - * If empty, the current date will be added. - * @var string - */ - public $MessageDate = ''; - - /** - * SMTP hosts. - * Either a single hostname or multiple semicolon-delimited hostnames. - * You can also specify a different port - * for each host by using this format: [hostname:port] - * (e.g. "smtp1.example.com:25;smtp2.example.com"). - * You can also specify encryption type, for example: - * (e.g. "tls://smtp1.example.com:587;ssl://smtp2.example.com:465"). - * Hosts will be tried in order. - * @var string - */ - public $Host = 'localhost'; - - /** - * The default SMTP server port. - * @var integer - * @TODO Why is this needed when the SMTP class takes care of it? - */ - public $Port = 25; - - /** - * The SMTP HELO of the message. - * Default is $Hostname. If $Hostname is empty, PHPMailer attempts to find - * one with the same method described above for $Hostname. - * @var string - * @see PHPMailer::$Hostname - */ - public $Helo = ''; - - /** - * What kind of encryption to use on the SMTP connection. - * Options: '', 'ssl' or 'tls' - * @var string - */ - public $SMTPSecure = ''; - - /** - * Whether to enable TLS encryption automatically if a server supports it, - * even if `SMTPSecure` is not set to 'tls'. - * Be aware that in PHP >= 5.6 this requires that the server's certificates are valid. - * @var boolean - */ - public $SMTPAutoTLS = true; - - /** - * Whether to use SMTP authentication. - * Uses the Username and Password properties. - * @var boolean - * @see PHPMailer::$Username - * @see PHPMailer::$Password - */ - public $SMTPAuth = false; - - /** - * Options array passed to stream_context_create when connecting via SMTP. - * @var array - */ - public $SMTPOptions = array(); - - /** - * SMTP username. - * @var string - */ - public $Username = ''; - - /** - * SMTP password. - * @var string - */ - public $Password = ''; - - /** - * SMTP auth type. - * Options are CRAM-MD5, LOGIN, PLAIN, NTLM, XOAUTH2, attempted in that order if not specified - * @var string - */ - public $AuthType = ''; - - /** - * SMTP realm. - * Used for NTLM auth - * @var string - */ - public $Realm = ''; - - /** - * SMTP workstation. - * Used for NTLM auth - * @var string - */ - public $Workstation = ''; - - /** - * The SMTP server timeout in seconds. - * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2 - * @var integer - */ - public $Timeout = 300; - - /** - * SMTP class debug output mode. - * Debug output level. - * Options: - * * `0` No output - * * `1` Commands - * * `2` Data and commands - * * `3` As 2 plus connection status - * * `4` Low-level data output - * @var integer - * @see SMTP::$do_debug - */ - public $SMTPDebug = 0; - - /** - * How to handle debug output. - * Options: - * * `echo` Output plain-text as-is, appropriate for CLI - * * `html` Output escaped, line breaks converted to `
        `, appropriate for browser output - * * `error_log` Output to error log as configured in php.ini - * - * Alternatively, you can provide a callable expecting two params: a message string and the debug level: - * - * $mail->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";}; - * - * @var string|callable - * @see SMTP::$Debugoutput - */ - public $Debugoutput = 'echo'; - - /** - * Whether to keep SMTP connection open after each message. - * If this is set to true then to close the connection - * requires an explicit call to smtpClose(). - * @var boolean - */ - public $SMTPKeepAlive = false; - - /** - * Whether to split multiple to addresses into multiple messages - * or send them all in one message. - * Only supported in `mail` and `sendmail` transports, not in SMTP. - * @var boolean - */ - public $SingleTo = false; - - /** - * Storage for addresses when SingleTo is enabled. - * @var array - * @TODO This should really not be public - */ - public $SingleToArray = array(); - - /** - * Whether to generate VERP addresses on send. - * Only applicable when sending via SMTP. - * @link https://en.wikipedia.org/wiki/Variable_envelope_return_path - * @link http://www.postfix.org/VERP_README.html Postfix VERP info - * @var boolean - */ - public $do_verp = false; - - /** - * Whether to allow sending messages with an empty body. - * @var boolean - */ - public $AllowEmpty = false; - - /** - * The default line ending. - * @note The default remains "\n". We force CRLF where we know - * it must be used via self::CRLF. - * @var string - */ - public $LE = "\n"; - - /** - * DKIM selector. - * @var string - */ - public $DKIM_selector = ''; - - /** - * DKIM Identity. - * Usually the email address used as the source of the email. - * @var string - */ - public $DKIM_identity = ''; - - /** - * DKIM passphrase. - * Used if your key is encrypted. - * @var string - */ - public $DKIM_passphrase = ''; - - /** - * DKIM signing domain name. - * @example 'example.com' - * @var string - */ - public $DKIM_domain = ''; - - /** - * DKIM private key file path. - * @var string - */ - public $DKIM_private = ''; - - /** - * DKIM private key string. - * If set, takes precedence over `$DKIM_private`. - * @var string - */ - public $DKIM_private_string = ''; - - /** - * Callback Action function name. - * - * The function that handles the result of the send email action. - * It is called out by send() for each email sent. - * - * Value can be any php callable: http://www.php.net/is_callable - * - * Parameters: - * boolean $result result of the send action - * string $to email address of the recipient - * string $cc cc email addresses - * string $bcc bcc email addresses - * string $subject the subject - * string $body the email body - * string $from email address of sender - * @var string - */ - public $action_function = ''; - - /** - * What to put in the X-Mailer header. - * Options: An empty string for PHPMailer default, whitespace for none, or a string to use - * @var string - */ - public $XMailer = ''; - - /** - * Which validator to use by default when validating email addresses. - * May be a callable to inject your own validator, but there are several built-in validators. - * @see PHPMailer::validateAddress() - * @var string|callable - * @static - */ - public static $validator = 'auto'; - - /** - * An instance of the SMTP sender class. - * @var SMTP - * @access protected - */ - protected $smtp = null; - - /** - * The array of 'to' names and addresses. - * @var array - * @access protected - */ - protected $to = array(); - - /** - * The array of 'cc' names and addresses. - * @var array - * @access protected - */ - protected $cc = array(); - - /** - * The array of 'bcc' names and addresses. - * @var array - * @access protected - */ - protected $bcc = array(); - - /** - * The array of reply-to names and addresses. - * @var array - * @access protected - */ - protected $ReplyTo = array(); - - /** - * An array of all kinds of addresses. - * Includes all of $to, $cc, $bcc - * @var array - * @access protected - * @see PHPMailer::$to @see PHPMailer::$cc @see PHPMailer::$bcc - */ - protected $all_recipients = array(); - - /** - * An array of names and addresses queued for validation. - * In send(), valid and non duplicate entries are moved to $all_recipients - * and one of $to, $cc, or $bcc. - * This array is used only for addresses with IDN. - * @var array - * @access protected - * @see PHPMailer::$to @see PHPMailer::$cc @see PHPMailer::$bcc - * @see PHPMailer::$all_recipients - */ - protected $RecipientsQueue = array(); - - /** - * An array of reply-to names and addresses queued for validation. - * In send(), valid and non duplicate entries are moved to $ReplyTo. - * This array is used only for addresses with IDN. - * @var array - * @access protected - * @see PHPMailer::$ReplyTo - */ - protected $ReplyToQueue = array(); - - /** - * The array of attachments. - * @var array - * @access protected - */ - protected $attachment = array(); - - /** - * The array of custom headers. - * @var array - * @access protected - */ - protected $CustomHeader = array(); - - /** - * The most recent Message-ID (including angular brackets). - * @var string - * @access protected - */ - protected $lastMessageID = ''; - - /** - * The message's MIME type. - * @var string - * @access protected - */ - protected $message_type = ''; - - /** - * The array of MIME boundary strings. - * @var array - * @access protected - */ - protected $boundary = array(); - - /** - * The array of available languages. - * @var array - * @access protected - */ - protected $language = array(); - - /** - * The number of errors encountered. - * @var integer - * @access protected - */ - protected $error_count = 0; - - /** - * The S/MIME certificate file path. - * @var string - * @access protected - */ - protected $sign_cert_file = ''; - - /** - * The S/MIME key file path. - * @var string - * @access protected - */ - protected $sign_key_file = ''; - - /** - * The optional S/MIME extra certificates ("CA Chain") file path. - * @var string - * @access protected - */ - protected $sign_extracerts_file = ''; - - /** - * The S/MIME password for the key. - * Used only if the key is encrypted. - * @var string - * @access protected - */ - protected $sign_key_pass = ''; - - /** - * Whether to throw exceptions for errors. - * @var boolean - * @access protected - */ - protected $exceptions = false; - - /** - * Unique ID used for message ID and boundaries. - * @var string - * @access protected - */ - protected $uniqueid = ''; - - /** - * Error severity: message only, continue processing. - */ - const STOP_MESSAGE = 0; - - /** - * Error severity: message, likely ok to continue processing. - */ - const STOP_CONTINUE = 1; - - /** - * Error severity: message, plus full stop, critical error reached. - */ - const STOP_CRITICAL = 2; - - /** - * SMTP RFC standard line ending. - */ - const CRLF = "\r\n"; - - /** - * The maximum line length allowed by RFC 2822 section 2.1.1 - * @var integer - */ - const MAX_LINE_LENGTH = 998; - - /** - * Constructor. - * @param boolean $exceptions Should we throw external exceptions? - */ - public function __construct($exceptions = null) - { - if ($exceptions !== null) { - $this->exceptions = (boolean)$exceptions; - } - } - - /** - * Destructor. - */ - public function __destruct() - { - //Close any open SMTP connection nicely - $this->smtpClose(); - } - - /** - * Call mail() in a safe_mode-aware fashion. - * Also, unless sendmail_path points to sendmail (or something that - * claims to be sendmail), don't pass params (not a perfect fix, - * but it will do) - * @param string $to To - * @param string $subject Subject - * @param string $body Message Body - * @param string $header Additional Header(s) - * @param string $params Params - * @access private - * @return boolean - */ - private function mailPassthru($to, $subject, $body, $header, $params) - { - //Check overloading of mail function to avoid double-encoding - if (ini_get('mbstring.func_overload') & 1) { - $subject = $this->secureHeader($subject); - } else { - $subject = $this->encodeHeader($this->secureHeader($subject)); - } - - //Can't use additional_parameters in safe_mode, calling mail() with null params breaks - //@link http://php.net/manual/en/function.mail.php - if (ini_get('safe_mode') or !$this->UseSendmailOptions or is_null($params)) { - $result = @mail($to, $subject, $body, $header); - } else { - $result = @mail($to, $subject, $body, $header, $params); - } - return $result; - } - /** - * Output debugging info via user-defined method. - * Only generates output if SMTP debug output is enabled (@see SMTP::$do_debug). - * @see PHPMailer::$Debugoutput - * @see PHPMailer::$SMTPDebug - * @param string $str - */ - protected function edebug($str) - { - if ($this->SMTPDebug <= 0) { - return; - } - //Avoid clash with built-in function names - if (!in_array($this->Debugoutput, array('error_log', 'html', 'echo')) and is_callable($this->Debugoutput)) { - call_user_func($this->Debugoutput, $str, $this->SMTPDebug); - return; - } - switch ($this->Debugoutput) { - case 'error_log': - //Don't output, just log - error_log($str); - break; - case 'html': - //Cleans up output a bit for a better looking, HTML-safe output - echo htmlentities( - preg_replace('/[\r\n]+/', '', $str), - ENT_QUOTES, - 'UTF-8' - ) - . "
        \n"; - break; - case 'echo': - default: - //Normalize line breaks - $str = preg_replace('/\r\n?/ms', "\n", $str); - echo gmdate('Y-m-d H:i:s') . "\t" . str_replace( - "\n", - "\n \t ", - trim($str) - ) . "\n"; - } - } - - /** - * Sets message type to HTML or plain. - * @param boolean $isHtml True for HTML mode. - * @return void - */ - public function isHTML($isHtml = true) - { - if ($isHtml) { - $this->ContentType = 'text/html'; - } else { - $this->ContentType = 'text/plain'; - } - } - - /** - * Send messages using SMTP. - * @return void - */ - public function isSMTP() - { - $this->Mailer = 'smtp'; - } - - /** - * Send messages using PHP's mail() function. - * @return void - */ - public function isMail() - { - $this->Mailer = 'mail'; - } - - /** - * Send messages using $Sendmail. - * @return void - */ - public function isSendmail() - { - $ini_sendmail_path = ini_get('sendmail_path'); - - if (!stristr($ini_sendmail_path, 'sendmail')) { - $this->Sendmail = '/usr/sbin/sendmail'; - } else { - $this->Sendmail = $ini_sendmail_path; - } - $this->Mailer = 'sendmail'; - } - - /** - * Send messages using qmail. - * @return void - */ - public function isQmail() - { - $ini_sendmail_path = ini_get('sendmail_path'); - - if (!stristr($ini_sendmail_path, 'qmail')) { - $this->Sendmail = '/var/qmail/bin/qmail-inject'; - } else { - $this->Sendmail = $ini_sendmail_path; - } - $this->Mailer = 'qmail'; - } - - /** - * Add a "To" address. - * @param string $address The email address to send to - * @param string $name - * @return boolean true on success, false if address already used or invalid in some way - */ - public function addAddress($address, $name = '') - { - return $this->addOrEnqueueAnAddress('to', $address, $name); - } - - /** - * Add a "CC" address. - * @note: This function works with the SMTP mailer on win32, not with the "mail" mailer. - * @param string $address The email address to send to - * @param string $name - * @return boolean true on success, false if address already used or invalid in some way - */ - public function addCC($address, $name = '') - { - return $this->addOrEnqueueAnAddress('cc', $address, $name); - } - - /** - * Add a "BCC" address. - * @note: This function works with the SMTP mailer on win32, not with the "mail" mailer. - * @param string $address The email address to send to - * @param string $name - * @return boolean true on success, false if address already used or invalid in some way - */ - public function addBCC($address, $name = '') - { - return $this->addOrEnqueueAnAddress('bcc', $address, $name); - } - - /** - * Add a "Reply-To" address. - * @param string $address The email address to reply to - * @param string $name - * @return boolean true on success, false if address already used or invalid in some way - */ - public function addReplyTo($address, $name = '') - { - return $this->addOrEnqueueAnAddress('Reply-To', $address, $name); - } - - /** - * Add an address to one of the recipient arrays or to the ReplyTo array. Because PHPMailer - * can't validate addresses with an IDN without knowing the PHPMailer::$CharSet (that can still - * be modified after calling this function), addition of such addresses is delayed until send(). - * Addresses that have been added already return false, but do not throw exceptions. - * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo' - * @param string $address The email address to send, resp. to reply to - * @param string $name - * @throws phpmailerException - * @return boolean true on success, false if address already used or invalid in some way - * @access protected - */ - protected function addOrEnqueueAnAddress($kind, $address, $name) - { - $address = trim($address); - $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim - if (($pos = strrpos($address, '@')) === false) { - // At-sign is misssing. - $error_message = $this->lang('invalid_address') . " (addAnAddress $kind): $address"; - $this->setError($error_message); - $this->edebug($error_message); - if ($this->exceptions) { - throw new phpmailerException($error_message); - } - return false; - } - $params = array($kind, $address, $name); - // Enqueue addresses with IDN until we know the PHPMailer::$CharSet. - if ($this->has8bitChars(substr($address, ++$pos)) and $this->idnSupported()) { - if ($kind != 'Reply-To') { - if (!array_key_exists($address, $this->RecipientsQueue)) { - $this->RecipientsQueue[$address] = $params; - return true; - } - } else { - if (!array_key_exists($address, $this->ReplyToQueue)) { - $this->ReplyToQueue[$address] = $params; - return true; - } - } - return false; - } - // Immediately add standard addresses without IDN. - return call_user_func_array(array($this, 'addAnAddress'), $params); - } - - /** - * Add an address to one of the recipient arrays or to the ReplyTo array. - * Addresses that have been added already return false, but do not throw exceptions. - * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo' - * @param string $address The email address to send, resp. to reply to - * @param string $name - * @throws phpmailerException - * @return boolean true on success, false if address already used or invalid in some way - * @access protected - */ - protected function addAnAddress($kind, $address, $name = '') - { - if (!in_array($kind, array('to', 'cc', 'bcc', 'Reply-To'))) { - $error_message = $this->lang('Invalid recipient kind: ') . $kind; - $this->setError($error_message); - $this->edebug($error_message); - if ($this->exceptions) { - throw new phpmailerException($error_message); - } - return false; - } - if (!$this->validateAddress($address)) { - $error_message = $this->lang('invalid_address') . " (addAnAddress $kind): $address"; - $this->setError($error_message); - $this->edebug($error_message); - if ($this->exceptions) { - throw new phpmailerException($error_message); - } - return false; - } - if ($kind != 'Reply-To') { - if (!array_key_exists(strtolower($address), $this->all_recipients)) { - array_push($this->$kind, array($address, $name)); - $this->all_recipients[strtolower($address)] = true; - return true; - } - } else { - if (!array_key_exists(strtolower($address), $this->ReplyTo)) { - $this->ReplyTo[strtolower($address)] = array($address, $name); - return true; - } - } - return false; - } - - /** - * Parse and validate a string containing one or more RFC822-style comma-separated email addresses - * of the form "display name
        " into an array of name/address pairs. - * Uses the imap_rfc822_parse_adrlist function if the IMAP extension is available. - * Note that quotes in the name part are removed. - * @param string $addrstr The address list string - * @param bool $useimap Whether to use the IMAP extension to parse the list - * @return array - * @link http://www.andrew.cmu.edu/user/agreen1/testing/mrbs/web/Mail/RFC822.php A more careful implementation - */ - public function parseAddresses($addrstr, $useimap = true) - { - $addresses = array(); - if ($useimap and function_exists('imap_rfc822_parse_adrlist')) { - //Use this built-in parser if it's available - $list = imap_rfc822_parse_adrlist($addrstr, ''); - foreach ($list as $address) { - if ($address->host != '.SYNTAX-ERROR.') { - if ($this->validateAddress($address->mailbox . '@' . $address->host)) { - $addresses[] = array( - 'name' => (property_exists($address, 'personal') ? $address->personal : ''), - 'address' => $address->mailbox . '@' . $address->host - ); - } - } - } - } else { - //Use this simpler parser - $list = explode(',', $addrstr); - foreach ($list as $address) { - $address = trim($address); - //Is there a separate name part? - if (strpos($address, '<') === false) { - //No separate name, just use the whole thing - if ($this->validateAddress($address)) { - $addresses[] = array( - 'name' => '', - 'address' => $address - ); - } - } else { - list($name, $email) = explode('<', $address); - $email = trim(str_replace('>', '', $email)); - if ($this->validateAddress($email)) { - $addresses[] = array( - 'name' => trim(str_replace(array('"', "'"), '', $name)), - 'address' => $email - ); - } - } - } - } - return $addresses; - } - - /** - * Set the From and FromName properties. - * @param string $address - * @param string $name - * @param boolean $auto Whether to also set the Sender address, defaults to true - * @throws phpmailerException - * @return boolean - */ - public function setFrom($address, $name = '', $auto = true) - { - $address = trim($address); - $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim - // Don't validate now addresses with IDN. Will be done in send(). - if (($pos = strrpos($address, '@')) === false or - (!$this->has8bitChars(substr($address, ++$pos)) or !$this->idnSupported()) and - !$this->validateAddress($address)) { - $error_message = $this->lang('invalid_address') . " (setFrom) $address"; - $this->setError($error_message); - $this->edebug($error_message); - if ($this->exceptions) { - throw new phpmailerException($error_message); - } - return false; - } - $this->From = $address; - $this->FromName = $name; - if ($auto) { - if (empty($this->Sender)) { - $this->Sender = $address; - } - } - return true; - } - - /** - * Return the Message-ID header of the last email. - * Technically this is the value from the last time the headers were created, - * but it's also the message ID of the last sent message except in - * pathological cases. - * @return string - */ - public function getLastMessageID() - { - return $this->lastMessageID; - } - - /** - * Check that a string looks like an email address. - * @param string $address The email address to check - * @param string|callable $patternselect A selector for the validation pattern to use : - * * `auto` Pick best pattern automatically; - * * `pcre8` Use the squiloople.com pattern, requires PCRE > 8.0, PHP >= 5.3.2, 5.2.14; - * * `pcre` Use old PCRE implementation; - * * `php` Use PHP built-in FILTER_VALIDATE_EMAIL; - * * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements. - * * `noregex` Don't use a regex: super fast, really dumb. - * Alternatively you may pass in a callable to inject your own validator, for example: - * PHPMailer::validateAddress('user@example.com', function($address) { - * return (strpos($address, '@') !== false); - * }); - * You can also set the PHPMailer::$validator static to a callable, allowing built-in methods to use your validator. - * @return boolean - * @static - * @access public - */ - public static function validateAddress($address, $patternselect = null) - { - if (is_null($patternselect)) { - $patternselect = self::$validator; - } - if (is_callable($patternselect)) { - return call_user_func($patternselect, $address); - } - //Reject line breaks in addresses; it's valid RFC5322, but not RFC5321 - if (strpos($address, "\n") !== false or strpos($address, "\r") !== false) { - return false; - } - if (!$patternselect or $patternselect == 'auto') { - //Check this constant first so it works when extension_loaded() is disabled by safe mode - //Constant was added in PHP 5.2.4 - if (defined('PCRE_VERSION')) { - //This pattern can get stuck in a recursive loop in PCRE <= 8.0.2 - if (version_compare(PCRE_VERSION, '8.0.3') >= 0) { - $patternselect = 'pcre8'; - } else { - $patternselect = 'pcre'; - } - } elseif (function_exists('extension_loaded') and extension_loaded('pcre')) { - //Fall back to older PCRE - $patternselect = 'pcre'; - } else { - //Filter_var appeared in PHP 5.2.0 and does not require the PCRE extension - if (version_compare(PHP_VERSION, '5.2.0') >= 0) { - $patternselect = 'php'; - } else { - $patternselect = 'noregex'; - } - } - } - switch ($patternselect) { - case 'pcre8': - /** - * Uses the same RFC5322 regex on which FILTER_VALIDATE_EMAIL is based, but allows dotless domains. - * @link http://squiloople.com/2009/12/20/email-address-validation/ - * @copyright 2009-2010 Michael Rushton - * Feel free to use and redistribute this code. But please keep this copyright notice. - */ - return (boolean)preg_match( - '/^(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){255,})(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){65,}@)' . - '((?>(?>(?>((?>(?>(?>\x0D\x0A)?[\t ])+|(?>[\t ]*\x0D\x0A)?[\t ]+)?)(\((?>(?2)' . - '(?>[\x01-\x08\x0B\x0C\x0E-\'*-\[\]-\x7F]|\\\[\x00-\x7F]|(?3)))*(?2)\)))+(?2))|(?2))?)' . - '([!#-\'*+\/-9=?^-~-]+|"(?>(?2)(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\x7F]))*' . - '(?2)")(?>(?1)\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)' . - '(?>(?1)\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}' . - '|(?!(?:.*[a-f0-9][:\]]){8,})((?6)(?>:(?6)){0,6})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:' . - '|(?!(?:.*[a-f0-9]:){6,})(?8)?::(?>((?6)(?>:(?6)){0,4}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}' . - '|[1-9]?[0-9])(?>\.(?9)){3}))\])(?1)$/isD', - $address - ); - case 'pcre': - //An older regex that doesn't need a recent PCRE - return (boolean)preg_match( - '/^(?!(?>"?(?>\\\[ -~]|[^"])"?){255,})(?!(?>"?(?>\\\[ -~]|[^"])"?){65,}@)(?>' . - '[!#-\'*+\/-9=?^-~-]+|"(?>(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\xFF]))*")' . - '(?>\.(?>[!#-\'*+\/-9=?^-~-]+|"(?>(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\xFF]))*"))*' . - '@(?>(?![a-z0-9-]{64,})(?>[a-z0-9](?>[a-z0-9-]*[a-z0-9])?)(?>\.(?![a-z0-9-]{64,})' . - '(?>[a-z0-9](?>[a-z0-9-]*[a-z0-9])?)){0,126}|\[(?:(?>IPv6:(?>(?>[a-f0-9]{1,4})(?>:' . - '[a-f0-9]{1,4}){7}|(?!(?:.*[a-f0-9][:\]]){8,})(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,6})?' . - '::(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,6})?))|(?>(?>IPv6:(?>[a-f0-9]{1,4}(?>:' . - '[a-f0-9]{1,4}){5}:|(?!(?:.*[a-f0-9]:){6,})(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,4})?' . - '::(?>(?:[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,4}):)?))?(?>25[0-5]|2[0-4][0-9]|1[0-9]{2}' . - '|[1-9]?[0-9])(?>\.(?>25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}))\])$/isD', - $address - ); - case 'html5': - /** - * This is the pattern used in the HTML5 spec for validation of 'email' type form input elements. - * @link http://www.whatwg.org/specs/web-apps/current-work/#e-mail-state-(type=email) - */ - return (boolean)preg_match( - '/^[a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}' . - '[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/sD', - $address - ); - case 'noregex': - //No PCRE! Do something _very_ approximate! - //Check the address is 3 chars or longer and contains an @ that's not the first or last char - return (strlen($address) >= 3 - and strpos($address, '@') >= 1 - and strpos($address, '@') != strlen($address) - 1); - case 'php': - default: - return (boolean)filter_var($address, FILTER_VALIDATE_EMAIL); - } - } - - /** - * Tells whether IDNs (Internationalized Domain Names) are supported or not. This requires the - * "intl" and "mbstring" PHP extensions. - * @return bool "true" if required functions for IDN support are present - */ - public function idnSupported() - { - // @TODO: Write our own "idn_to_ascii" function for PHP <= 5.2. - return function_exists('idn_to_ascii') and function_exists('mb_convert_encoding'); - } - - /** - * Converts IDN in given email address to its ASCII form, also known as punycode, if possible. - * Important: Address must be passed in same encoding as currently set in PHPMailer::$CharSet. - * This function silently returns unmodified address if: - * - No conversion is necessary (i.e. domain name is not an IDN, or is already in ASCII form) - * - Conversion to punycode is impossible (e.g. required PHP functions are not available) - * or fails for any reason (e.g. domain has characters not allowed in an IDN) - * @see PHPMailer::$CharSet - * @param string $address The email address to convert - * @return string The encoded address in ASCII form - */ - public function punyencodeAddress($address) - { - // Verify we have required functions, CharSet, and at-sign. - if ($this->idnSupported() and - !empty($this->CharSet) and - ($pos = strrpos($address, '@')) !== false) { - $domain = substr($address, ++$pos); - // Verify CharSet string is a valid one, and domain properly encoded in this CharSet. - if ($this->has8bitChars($domain) and @mb_check_encoding($domain, $this->CharSet)) { - $domain = mb_convert_encoding($domain, 'UTF-8', $this->CharSet); - if (($punycode = defined('INTL_IDNA_VARIANT_UTS46') ? - idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46) : - idn_to_ascii($domain)) !== false) { - return substr($address, 0, $pos) . $punycode; - } - } - } - return $address; - } - - /** - * Create a message and send it. - * Uses the sending method specified by $Mailer. - * @throws phpmailerException - * @return boolean false on error - See the ErrorInfo property for details of the error. - */ - public function send() - { - try { - if (!$this->preSend()) { - return false; - } - return $this->postSend(); - } catch (phpmailerException $exc) { - $this->mailHeader = ''; - $this->setError($exc->getMessage()); - if ($this->exceptions) { - throw $exc; - } - return false; - } - } - - /** - * Prepare a message for sending. - * @throws phpmailerException - * @return boolean - */ - public function preSend() - { - try { - $this->error_count = 0; // Reset errors - $this->mailHeader = ''; - - // Dequeue recipient and Reply-To addresses with IDN - foreach (array_merge($this->RecipientsQueue, $this->ReplyToQueue) as $params) { - $params[1] = $this->punyencodeAddress($params[1]); - call_user_func_array(array($this, 'addAnAddress'), $params); - } - if ((count($this->to) + count($this->cc) + count($this->bcc)) < 1) { - throw new phpmailerException($this->lang('provide_address'), self::STOP_CRITICAL); - } - - // Validate From, Sender, and ConfirmReadingTo addresses - foreach (array('From', 'Sender', 'ConfirmReadingTo') as $address_kind) { - $this->$address_kind = trim($this->$address_kind); - if (empty($this->$address_kind)) { - continue; - } - $this->$address_kind = $this->punyencodeAddress($this->$address_kind); - if (!$this->validateAddress($this->$address_kind)) { - $error_message = $this->lang('invalid_address') . ' (punyEncode) ' . $this->$address_kind; - $this->setError($error_message); - $this->edebug($error_message); - if ($this->exceptions) { - throw new phpmailerException($error_message); - } - return false; - } - } - - // Set whether the message is multipart/alternative - if ($this->alternativeExists()) { - $this->ContentType = 'multipart/alternative'; - } - - $this->setMessageType(); - // Refuse to send an empty message unless we are specifically allowing it - if (!$this->AllowEmpty and empty($this->Body)) { - throw new phpmailerException($this->lang('empty_message'), self::STOP_CRITICAL); - } - - // Create body before headers in case body makes changes to headers (e.g. altering transfer encoding) - $this->MIMEHeader = ''; - $this->MIMEBody = $this->createBody(); - // createBody may have added some headers, so retain them - $tempheaders = $this->MIMEHeader; - $this->MIMEHeader = $this->createHeader(); - $this->MIMEHeader .= $tempheaders; - - // To capture the complete message when using mail(), create - // an extra header list which createHeader() doesn't fold in - if ($this->Mailer == 'mail') { - if (count($this->to) > 0) { - $this->mailHeader .= $this->addrAppend('To', $this->to); - } else { - $this->mailHeader .= $this->headerLine('To', 'undisclosed-recipients:;'); - } - $this->mailHeader .= $this->headerLine( - 'Subject', - $this->encodeHeader($this->secureHeader(trim($this->Subject))) - ); - } - - // Sign with DKIM if enabled - if (!empty($this->DKIM_domain) - && !empty($this->DKIM_selector) - && (!empty($this->DKIM_private_string) - || (!empty($this->DKIM_private) && file_exists($this->DKIM_private)) - ) - ) { - $header_dkim = $this->DKIM_Add( - $this->MIMEHeader . $this->mailHeader, - $this->encodeHeader($this->secureHeader($this->Subject)), - $this->MIMEBody - ); - $this->MIMEHeader = rtrim($this->MIMEHeader, "\r\n ") . self::CRLF . - str_replace("\r\n", "\n", $header_dkim) . self::CRLF; - } - return true; - } catch (phpmailerException $exc) { - $this->setError($exc->getMessage()); - if ($this->exceptions) { - throw $exc; - } - return false; - } - } - - /** - * Actually send a message. - * Send the email via the selected mechanism - * @throws phpmailerException - * @return boolean - */ - public function postSend() - { - try { - // Choose the mailer and send through it - switch ($this->Mailer) { - case 'sendmail': - case 'qmail': - return $this->sendmailSend($this->MIMEHeader, $this->MIMEBody); - case 'smtp': - return $this->smtpSend($this->MIMEHeader, $this->MIMEBody); - case 'mail': - return $this->mailSend($this->MIMEHeader, $this->MIMEBody); - default: - $sendMethod = $this->Mailer.'Send'; - if (method_exists($this, $sendMethod)) { - return $this->$sendMethod($this->MIMEHeader, $this->MIMEBody); - } - - return $this->mailSend($this->MIMEHeader, $this->MIMEBody); - } - } catch (phpmailerException $exc) { - $this->setError($exc->getMessage()); - $this->edebug($exc->getMessage()); - if ($this->exceptions) { - throw $exc; - } - } - return false; - } - - /** - * Send mail using the $Sendmail program. - * @param string $header The message headers - * @param string $body The message body - * @see PHPMailer::$Sendmail - * @throws phpmailerException - * @access protected - * @return boolean - */ - protected function sendmailSend($header, $body) - { - if (!empty($this->Sender)) { - if ($this->Mailer == 'qmail') { - $sendmail = sprintf('%s -f%s', escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender)); - } else { - $sendmail = sprintf('%s -oi -f%s -t', escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender)); - } - } else { - if ($this->Mailer == 'qmail') { - $sendmail = sprintf('%s', escapeshellcmd($this->Sendmail)); - } else { - $sendmail = sprintf('%s -oi -t', escapeshellcmd($this->Sendmail)); - } - } - if ($this->SingleTo) { - foreach ($this->SingleToArray as $toAddr) { - if (!@$mail = popen($sendmail, 'w')) { - throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); - } - fputs($mail, 'To: ' . $toAddr . "\n"); - fputs($mail, $header); - fputs($mail, $body); - $result = pclose($mail); - $this->doCallback( - ($result == 0), - array($toAddr), - $this->cc, - $this->bcc, - $this->Subject, - $body, - $this->From - ); - if ($result != 0) { - throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); - } - } - } else { - if (!@$mail = popen($sendmail, 'w')) { - throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); - } - fputs($mail, $header); - fputs($mail, $body); - $result = pclose($mail); - $this->doCallback( - ($result == 0), - $this->to, - $this->cc, - $this->bcc, - $this->Subject, - $body, - $this->From - ); - if ($result != 0) { - throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); - } - } - return true; - } - - /** - * Send mail using the PHP mail() function. - * @param string $header The message headers - * @param string $body The message body - * @link http://www.php.net/manual/en/book.mail.php - * @throws phpmailerException - * @access protected - * @return boolean - */ - protected function mailSend($header, $body) - { - $toArr = array(); - foreach ($this->to as $toaddr) { - $toArr[] = $this->addrFormat($toaddr); - } - $to = implode(', ', $toArr); - - $params = null; - //This sets the SMTP envelope sender which gets turned into a return-path header by the receiver - if (!empty($this->Sender) and $this->validateAddress($this->Sender)) { - $params = sprintf('-f%s', escapeshellarg($this->Sender)); - } - if (!empty($this->Sender) and !ini_get('safe_mode') and $this->validateAddress($this->Sender)) { - $old_from = ini_get('sendmail_from'); - ini_set('sendmail_from', $this->Sender); - } - $result = false; - if ($this->SingleTo and count($toArr) > 1) { - foreach ($toArr as $toAddr) { - $result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params); - $this->doCallback($result, array($toAddr), $this->cc, $this->bcc, $this->Subject, $body, $this->From); - } - } else { - $result = $this->mailPassthru($to, $this->Subject, $body, $header, $params); - $this->doCallback($result, $this->to, $this->cc, $this->bcc, $this->Subject, $body, $this->From); - } - if (isset($old_from)) { - ini_set('sendmail_from', $old_from); - } - if (!$result) { - throw new phpmailerException($this->lang('instantiate'), self::STOP_CRITICAL); - } - return true; - } - - /** - * Get an instance to use for SMTP operations. - * Override this function to load your own SMTP implementation - * @return SMTP - */ - public function getSMTPInstance() - { - if (!is_object($this->smtp)) { - $this->smtp = new SMTP; - } - return $this->smtp; - } - - /** - * Send mail via SMTP. - * Returns false if there is a bad MAIL FROM, RCPT, or DATA input. - * Uses the PHPMailerSMTP class by default. - * @see PHPMailer::getSMTPInstance() to use a different class. - * @param string $header The message headers - * @param string $body The message body - * @throws phpmailerException - * @uses SMTP - * @access protected - * @return boolean - */ - protected function smtpSend($header, $body) - { - $bad_rcpt = array(); - if (!$this->smtpConnect($this->SMTPOptions)) { - throw new phpmailerException($this->lang('smtp_connect_failed'), self::STOP_CRITICAL); - } - if (!empty($this->Sender) and $this->validateAddress($this->Sender)) { - $smtp_from = $this->Sender; - } else { - $smtp_from = $this->From; - } - if (!$this->smtp->mail($smtp_from)) { - $this->setError($this->lang('from_failed') . $smtp_from . ' : ' . implode(',', $this->smtp->getError())); - throw new phpmailerException($this->ErrorInfo, self::STOP_CRITICAL); - } - - // Attempt to send to all recipients - foreach (array($this->to, $this->cc, $this->bcc) as $togroup) { - foreach ($togroup as $to) { - if (!$this->smtp->recipient($to[0])) { - $error = $this->smtp->getError(); - $bad_rcpt[] = array('to' => $to[0], 'error' => $error['detail']); - $isSent = false; - } else { - $isSent = true; - } - $this->doCallback($isSent, array($to[0]), array(), array(), $this->Subject, $body, $this->From); - } - } - - // Only send the DATA command if we have viable recipients - if ((count($this->all_recipients) > count($bad_rcpt)) and !$this->smtp->data($header . $body)) { - throw new phpmailerException($this->lang('data_not_accepted'), self::STOP_CRITICAL); - } - if ($this->SMTPKeepAlive) { - $this->smtp->reset(); - } else { - $this->smtp->quit(); - $this->smtp->close(); - } - //Create error message for any bad addresses - if (count($bad_rcpt) > 0) { - $errstr = ''; - foreach ($bad_rcpt as $bad) { - $errstr .= $bad['to'] . ': ' . $bad['error']; - } - throw new phpmailerException( - $this->lang('recipients_failed') . $errstr, - self::STOP_CONTINUE - ); - } - return true; - } - - /** - * Initiate a connection to an SMTP server. - * Returns false if the operation failed. - * @param array $options An array of options compatible with stream_context_create() - * @uses SMTP - * @access public - * @throws phpmailerException - * @return boolean - */ - public function smtpConnect($options = null) - { - if (is_null($this->smtp)) { - $this->smtp = $this->getSMTPInstance(); - } - - //If no options are provided, use whatever is set in the instance - if (is_null($options)) { - $options = $this->SMTPOptions; - } - - // Already connected? - if ($this->smtp->connected()) { - return true; - } - - $this->smtp->setTimeout($this->Timeout); - $this->smtp->setDebugLevel($this->SMTPDebug); - $this->smtp->setDebugOutput($this->Debugoutput); - $this->smtp->setVerp($this->do_verp); - $hosts = explode(';', $this->Host); - $lastexception = null; - - foreach ($hosts as $hostentry) { - $hostinfo = array(); - if (!preg_match('/^((ssl|tls):\/\/)*([a-zA-Z0-9\.-]*):?([0-9]*)$/', trim($hostentry), $hostinfo)) { - // Not a valid host entry - continue; - } - // $hostinfo[2]: optional ssl or tls prefix - // $hostinfo[3]: the hostname - // $hostinfo[4]: optional port number - // The host string prefix can temporarily override the current setting for SMTPSecure - // If it's not specified, the default value is used - $prefix = ''; - $secure = $this->SMTPSecure; - $tls = ($this->SMTPSecure == 'tls'); - if ('ssl' == $hostinfo[2] or ('' == $hostinfo[2] and 'ssl' == $this->SMTPSecure)) { - $prefix = 'ssl://'; - $tls = false; // Can't have SSL and TLS at the same time - $secure = 'ssl'; - } elseif ($hostinfo[2] == 'tls') { - $tls = true; - // tls doesn't use a prefix - $secure = 'tls'; - } - //Do we need the OpenSSL extension? - $sslext = defined('OPENSSL_ALGO_SHA1'); - if ('tls' === $secure or 'ssl' === $secure) { - //Check for an OpenSSL constant rather than using extension_loaded, which is sometimes disabled - if (!$sslext) { - throw new phpmailerException($this->lang('extension_missing').'openssl', self::STOP_CRITICAL); - } - } - $host = $hostinfo[3]; - $port = $this->Port; - $tport = (integer)$hostinfo[4]; - if ($tport > 0 and $tport < 65536) { - $port = $tport; - } - if ($this->smtp->connect($prefix . $host, $port, $this->Timeout, $options)) { - try { - if ($this->Helo) { - $hello = $this->Helo; - } else { - $hello = $this->serverHostname(); - } - $this->smtp->hello($hello); - //Automatically enable TLS encryption if: - // * it's not disabled - // * we have openssl extension - // * we are not already using SSL - // * the server offers STARTTLS - if ($this->SMTPAutoTLS and $sslext and $secure != 'ssl' and $this->smtp->getServerExt('STARTTLS')) { - $tls = true; - } - if ($tls) { - if (!$this->smtp->startTLS()) { - throw new phpmailerException($this->lang('connect_host')); - } - // We must resend EHLO after TLS negotiation - $this->smtp->hello($hello); - } - if ($this->SMTPAuth) { - if (!$this->smtp->authenticate( - $this->Username, - $this->Password, - $this->AuthType, - $this->Realm, - $this->Workstation - ) - ) { - throw new phpmailerException($this->lang('authenticate')); - } - } - return true; - } catch (phpmailerException $exc) { - $lastexception = $exc; - $this->edebug($exc->getMessage()); - // We must have connected, but then failed TLS or Auth, so close connection nicely - $this->smtp->quit(); - } - } - } - // If we get here, all connection attempts have failed, so close connection hard - $this->smtp->close(); - // As we've caught all exceptions, just report whatever the last one was - if ($this->exceptions and !is_null($lastexception)) { - throw $lastexception; - } - return false; - } - - /** - * Close the active SMTP session if one exists. - * @return void - */ - public function smtpClose() - { - if (is_a($this->smtp, 'SMTP')) { - if ($this->smtp->connected()) { - $this->smtp->quit(); - $this->smtp->close(); - } - } - } - - /** - * Set the language for error messages. - * Returns false if it cannot load the language file. - * The default language is English. - * @param string $langcode ISO 639-1 2-character language code (e.g. French is "fr") - * @param string $lang_path Path to the language file directory, with trailing separator (slash) - * @return boolean - * @access public - */ - public function setLanguage($langcode = 'en', $lang_path = '') - { - // Backwards compatibility for renamed language codes - $renamed_langcodes = array( - 'br' => 'pt_br', - 'cz' => 'cs', - 'dk' => 'da', - 'no' => 'nb', - 'se' => 'sv', - ); - - if (isset($renamed_langcodes[$langcode])) { - $langcode = $renamed_langcodes[$langcode]; - } - - // Define full set of translatable strings in English - $PHPMAILER_LANG = array( - 'authenticate' => 'SMTP Error: Could not authenticate.', - 'connect_host' => 'SMTP Error: Could not connect to SMTP host.', - 'data_not_accepted' => 'SMTP Error: data not accepted.', - 'empty_message' => 'Message body empty', - 'encoding' => 'Unknown encoding: ', - 'execute' => 'Could not execute: ', - 'file_access' => 'Could not access file: ', - 'file_open' => 'File Error: Could not open file: ', - 'from_failed' => 'The following From address failed: ', - 'instantiate' => 'Could not instantiate mail function.', - 'invalid_address' => 'Invalid address: ', - 'mailer_not_supported' => ' mailer is not supported.', - 'provide_address' => 'You must provide at least one recipient email address.', - 'recipients_failed' => 'SMTP Error: The following recipients failed: ', - 'signing' => 'Signing Error: ', - 'smtp_connect_failed' => 'SMTP connect() failed.', - 'smtp_error' => 'SMTP server error: ', - 'variable_set' => 'Cannot set or reset variable: ', - 'extension_missing' => 'Extension missing: ' - ); - if (empty($lang_path)) { - // Calculate an absolute path so it can work if CWD is not here - $lang_path = dirname(__FILE__). DIRECTORY_SEPARATOR . 'language'. DIRECTORY_SEPARATOR; - } - //Validate $langcode - if (!preg_match('/^[a-z]{2}(?:_[a-zA-Z]{2})?$/', $langcode)) { - $langcode = 'en'; - } - $foundlang = true; - $lang_file = $lang_path . 'phpmailer.lang-' . $langcode . '.php'; - // There is no English translation file - if ($langcode != 'en') { - // Make sure language file path is readable - if (!is_readable($lang_file)) { - $foundlang = false; - } else { - // Overwrite language-specific strings. - // This way we'll never have missing translation keys. - $foundlang = include $lang_file; - } - } - $this->language = $PHPMAILER_LANG; - return (boolean)$foundlang; // Returns false if language not found - } - - /** - * Get the array of strings for the current language. - * @return array - */ - public function getTranslations() - { - return $this->language; - } - - /** - * Create recipient headers. - * @access public - * @param string $type - * @param array $addr An array of recipient, - * where each recipient is a 2-element indexed array with element 0 containing an address - * and element 1 containing a name, like: - * array(array('joe@example.com', 'Joe User'), array('zoe@example.com', 'Zoe User')) - * @return string - */ - public function addrAppend($type, $addr) - { - $addresses = array(); - foreach ($addr as $address) { - $addresses[] = $this->addrFormat($address); - } - return $type . ': ' . implode(', ', $addresses) . $this->LE; - } - - /** - * Format an address for use in a message header. - * @access public - * @param array $addr A 2-element indexed array, element 0 containing an address, element 1 containing a name - * like array('joe@example.com', 'Joe User') - * @return string - */ - public function addrFormat($addr) - { - if (empty($addr[1])) { // No name provided - return $this->secureHeader($addr[0]); - } else { - return $this->encodeHeader($this->secureHeader($addr[1]), 'phrase') . ' <' . $this->secureHeader( - $addr[0] - ) . '>'; - } - } - - /** - * Word-wrap message. - * For use with mailers that do not automatically perform wrapping - * and for quoted-printable encoded messages. - * Original written by philippe. - * @param string $message The message to wrap - * @param integer $length The line length to wrap to - * @param boolean $qp_mode Whether to run in Quoted-Printable mode - * @access public - * @return string - */ - public function wrapText($message, $length, $qp_mode = false) - { - if ($qp_mode) { - $soft_break = sprintf(' =%s', $this->LE); - } else { - $soft_break = $this->LE; - } - // If utf-8 encoding is used, we will need to make sure we don't - // split multibyte characters when we wrap - $is_utf8 = (strtolower($this->CharSet) == 'utf-8'); - $lelen = strlen($this->LE); - $crlflen = strlen(self::CRLF); - - $message = $this->fixEOL($message); - //Remove a trailing line break - if (substr($message, -$lelen) == $this->LE) { - $message = substr($message, 0, -$lelen); - } - - //Split message into lines - $lines = explode($this->LE, $message); - //Message will be rebuilt in here - $message = ''; - foreach ($lines as $line) { - $words = explode(' ', $line); - $buf = ''; - $firstword = true; - foreach ($words as $word) { - if ($qp_mode and (strlen($word) > $length)) { - $space_left = $length - strlen($buf) - $crlflen; - if (!$firstword) { - if ($space_left > 20) { - $len = $space_left; - if ($is_utf8) { - $len = $this->utf8CharBoundary($word, $len); - } elseif (substr($word, $len - 1, 1) == '=') { - $len--; - } elseif (substr($word, $len - 2, 1) == '=') { - $len -= 2; - } - $part = substr($word, 0, $len); - $word = substr($word, $len); - $buf .= ' ' . $part; - $message .= $buf . sprintf('=%s', self::CRLF); - } else { - $message .= $buf . $soft_break; - } - $buf = ''; - } - while (strlen($word) > 0) { - if ($length <= 0) { - break; - } - $len = $length; - if ($is_utf8) { - $len = $this->utf8CharBoundary($word, $len); - } elseif (substr($word, $len - 1, 1) == '=') { - $len--; - } elseif (substr($word, $len - 2, 1) == '=') { - $len -= 2; - } - $part = substr($word, 0, $len); - $word = substr($word, $len); - - if (strlen($word) > 0) { - $message .= $part . sprintf('=%s', self::CRLF); - } else { - $buf = $part; - } - } - } else { - $buf_o = $buf; - if (!$firstword) { - $buf .= ' '; - } - $buf .= $word; - - if (strlen($buf) > $length and $buf_o != '') { - $message .= $buf_o . $soft_break; - $buf = $word; - } - } - $firstword = false; - } - $message .= $buf . self::CRLF; - } - - return $message; - } - - /** - * Find the last character boundary prior to $maxLength in a utf-8 - * quoted-printable encoded string. - * Original written by Colin Brown. - * @access public - * @param string $encodedText utf-8 QP text - * @param integer $maxLength Find the last character boundary prior to this length - * @return integer - */ - public function utf8CharBoundary($encodedText, $maxLength) - { - $foundSplitPos = false; - $lookBack = 3; - while (!$foundSplitPos) { - $lastChunk = substr($encodedText, $maxLength - $lookBack, $lookBack); - $encodedCharPos = strpos($lastChunk, '='); - if (false !== $encodedCharPos) { - // Found start of encoded character byte within $lookBack block. - // Check the encoded byte value (the 2 chars after the '=') - $hex = substr($encodedText, $maxLength - $lookBack + $encodedCharPos + 1, 2); - $dec = hexdec($hex); - if ($dec < 128) { - // Single byte character. - // If the encoded char was found at pos 0, it will fit - // otherwise reduce maxLength to start of the encoded char - if ($encodedCharPos > 0) { - $maxLength = $maxLength - ($lookBack - $encodedCharPos); - } - $foundSplitPos = true; - } elseif ($dec >= 192) { - // First byte of a multi byte character - // Reduce maxLength to split at start of character - $maxLength = $maxLength - ($lookBack - $encodedCharPos); - $foundSplitPos = true; - } elseif ($dec < 192) { - // Middle byte of a multi byte character, look further back - $lookBack += 3; - } - } else { - // No encoded character found - $foundSplitPos = true; - } - } - return $maxLength; - } - - /** - * Apply word wrapping to the message body. - * Wraps the message body to the number of chars set in the WordWrap property. - * You should only do this to plain-text bodies as wrapping HTML tags may break them. - * This is called automatically by createBody(), so you don't need to call it yourself. - * @access public - * @return void - */ - public function setWordWrap() - { - if ($this->WordWrap < 1) { - return; - } - - switch ($this->message_type) { - case 'alt': - case 'alt_inline': - case 'alt_attach': - case 'alt_inline_attach': - $this->AltBody = $this->wrapText($this->AltBody, $this->WordWrap); - break; - default: - $this->Body = $this->wrapText($this->Body, $this->WordWrap); - break; - } - } - - /** - * Assemble message headers. - * @access public - * @return string The assembled headers - */ - public function createHeader() - { - $result = ''; - - if ($this->MessageDate == '') { - $this->MessageDate = self::rfcDate(); - } - $result .= $this->headerLine('Date', $this->MessageDate); - - // To be created automatically by mail() - if ($this->SingleTo) { - if ($this->Mailer != 'mail') { - foreach ($this->to as $toaddr) { - $this->SingleToArray[] = $this->addrFormat($toaddr); - } - } - } else { - if (count($this->to) > 0) { - if ($this->Mailer != 'mail') { - $result .= $this->addrAppend('To', $this->to); - } - } elseif (count($this->cc) == 0) { - $result .= $this->headerLine('To', 'undisclosed-recipients:;'); - } - } - - $result .= $this->addrAppend('From', array(array(trim($this->From), $this->FromName))); - - // sendmail and mail() extract Cc from the header before sending - if (count($this->cc) > 0) { - $result .= $this->addrAppend('Cc', $this->cc); - } - - // sendmail and mail() extract Bcc from the header before sending - if (( - $this->Mailer == 'sendmail' or $this->Mailer == 'qmail' or $this->Mailer == 'mail' - ) - and count($this->bcc) > 0 - ) { - $result .= $this->addrAppend('Bcc', $this->bcc); - } - - if (count($this->ReplyTo) > 0) { - $result .= $this->addrAppend('Reply-To', $this->ReplyTo); - } - - // mail() sets the subject itself - if ($this->Mailer != 'mail') { - $result .= $this->headerLine('Subject', $this->encodeHeader($this->secureHeader($this->Subject))); - } - - // Only allow a custom message ID if it conforms to RFC 5322 section 3.6.4 - // https://tools.ietf.org/html/rfc5322#section-3.6.4 - if ('' != $this->MessageID and preg_match('/^<.*@.*>$/', $this->MessageID)) { - $this->lastMessageID = $this->MessageID; - } else { - $this->lastMessageID = sprintf('<%s@%s>', $this->uniqueid, $this->serverHostname()); - } - $result .= $this->headerLine('Message-ID', $this->lastMessageID); - if (!is_null($this->Priority)) { - $result .= $this->headerLine('X-Priority', $this->Priority); - } - if ($this->XMailer == '') { - $result .= $this->headerLine( - 'X-Mailer', - 'PHPMailer ' . $this->Version . ' (https://github.com/PHPMailer/PHPMailer)' - ); - } else { - $myXmailer = trim($this->XMailer); - if ($myXmailer) { - $result .= $this->headerLine('X-Mailer', $myXmailer); - } - } - - if ($this->ConfirmReadingTo != '') { - $result .= $this->headerLine('Disposition-Notification-To', '<' . $this->ConfirmReadingTo . '>'); - } - - // Add custom headers - foreach ($this->CustomHeader as $header) { - $result .= $this->headerLine( - trim($header[0]), - $this->encodeHeader(trim($header[1])) - ); - } - if (!$this->sign_key_file) { - $result .= $this->headerLine('MIME-Version', '1.0'); - $result .= $this->getMailMIME(); - } - - return $result; - } - - /** - * Get the message MIME type headers. - * @access public - * @return string - */ - public function getMailMIME() - { - $result = ''; - $ismultipart = true; - switch ($this->message_type) { - case 'inline': - $result .= $this->headerLine('Content-Type', 'multipart/related;'); - $result .= $this->textLine("\tboundary=\"" . $this->boundary[1] . '"'); - break; - case 'attach': - case 'inline_attach': - case 'alt_attach': - case 'alt_inline_attach': - $result .= $this->headerLine('Content-Type', 'multipart/mixed;'); - $result .= $this->textLine("\tboundary=\"" . $this->boundary[1] . '"'); - break; - case 'alt': - case 'alt_inline': - $result .= $this->headerLine('Content-Type', 'multipart/alternative;'); - $result .= $this->textLine("\tboundary=\"" . $this->boundary[1] . '"'); - break; - default: - // Catches case 'plain': and case '': - $result .= $this->textLine('Content-Type: ' . $this->ContentType . '; charset=' . $this->CharSet); - $ismultipart = false; - break; - } - // RFC1341 part 5 says 7bit is assumed if not specified - if ($this->Encoding != '7bit') { - // RFC 2045 section 6.4 says multipart MIME parts may only use 7bit, 8bit or binary CTE - if ($ismultipart) { - if ($this->Encoding == '8bit') { - $result .= $this->headerLine('Content-Transfer-Encoding', '8bit'); - } - // The only remaining alternatives are quoted-printable and base64, which are both 7bit compatible - } else { - $result .= $this->headerLine('Content-Transfer-Encoding', $this->Encoding); - } - } - - if ($this->Mailer != 'mail') { - $result .= $this->LE; - } - - return $result; - } - - /** - * Returns the whole MIME message. - * Includes complete headers and body. - * Only valid post preSend(). - * @see PHPMailer::preSend() - * @access public - * @return string - */ - public function getSentMIMEMessage() - { - return rtrim($this->MIMEHeader . $this->mailHeader, "\n\r") . self::CRLF . self::CRLF . $this->MIMEBody; - } - - /** - * Create unique ID - * @return string - */ - protected function generateId() { - return md5(uniqid(time())); - } - - /** - * Assemble the message body. - * Returns an empty string on failure. - * @access public - * @throws phpmailerException - * @return string The assembled message body - */ - public function createBody() - { - $body = ''; - //Create unique IDs and preset boundaries - $this->uniqueid = $this->generateId(); - $this->boundary[1] = 'b1_' . $this->uniqueid; - $this->boundary[2] = 'b2_' . $this->uniqueid; - $this->boundary[3] = 'b3_' . $this->uniqueid; - - if ($this->sign_key_file) { - $body .= $this->getMailMIME() . $this->LE; - } - - $this->setWordWrap(); - - $bodyEncoding = $this->Encoding; - $bodyCharSet = $this->CharSet; - //Can we do a 7-bit downgrade? - if ($bodyEncoding == '8bit' and !$this->has8bitChars($this->Body)) { - $bodyEncoding = '7bit'; - //All ISO 8859, Windows codepage and UTF-8 charsets are ascii compatible up to 7-bit - $bodyCharSet = 'us-ascii'; - } - //If lines are too long, and we're not already using an encoding that will shorten them, - //change to quoted-printable transfer encoding for the body part only - if ('base64' != $this->Encoding and self::hasLineLongerThanMax($this->Body)) { - $bodyEncoding = 'quoted-printable'; - } - - $altBodyEncoding = $this->Encoding; - $altBodyCharSet = $this->CharSet; - //Can we do a 7-bit downgrade? - if ($altBodyEncoding == '8bit' and !$this->has8bitChars($this->AltBody)) { - $altBodyEncoding = '7bit'; - //All ISO 8859, Windows codepage and UTF-8 charsets are ascii compatible up to 7-bit - $altBodyCharSet = 'us-ascii'; - } - //If lines are too long, and we're not already using an encoding that will shorten them, - //change to quoted-printable transfer encoding for the alt body part only - if ('base64' != $altBodyEncoding and self::hasLineLongerThanMax($this->AltBody)) { - $altBodyEncoding = 'quoted-printable'; - } - //Use this as a preamble in all multipart message types - $mimepre = "This is a multi-part message in MIME format." . $this->LE . $this->LE; - switch ($this->message_type) { - case 'inline': - $body .= $mimepre; - $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, '', $bodyEncoding); - $body .= $this->encodeString($this->Body, $bodyEncoding); - $body .= $this->LE . $this->LE; - $body .= $this->attachAll('inline', $this->boundary[1]); - break; - case 'attach': - $body .= $mimepre; - $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, '', $bodyEncoding); - $body .= $this->encodeString($this->Body, $bodyEncoding); - $body .= $this->LE . $this->LE; - $body .= $this->attachAll('attachment', $this->boundary[1]); - break; - case 'inline_attach': - $body .= $mimepre; - $body .= $this->textLine('--' . $this->boundary[1]); - $body .= $this->headerLine('Content-Type', 'multipart/related;'); - $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"'); - $body .= $this->LE; - $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, '', $bodyEncoding); - $body .= $this->encodeString($this->Body, $bodyEncoding); - $body .= $this->LE . $this->LE; - $body .= $this->attachAll('inline', $this->boundary[2]); - $body .= $this->LE; - $body .= $this->attachAll('attachment', $this->boundary[1]); - break; - case 'alt': - $body .= $mimepre; - $body .= $this->getBoundary($this->boundary[1], $altBodyCharSet, 'text/plain', $altBodyEncoding); - $body .= $this->encodeString($this->AltBody, $altBodyEncoding); - $body .= $this->LE . $this->LE; - $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, 'text/html', $bodyEncoding); - $body .= $this->encodeString($this->Body, $bodyEncoding); - $body .= $this->LE . $this->LE; - if (!empty($this->Ical)) { - $body .= $this->getBoundary($this->boundary[1], '', 'text/calendar; method=REQUEST', ''); - $body .= $this->encodeString($this->Ical, $this->Encoding); - $body .= $this->LE . $this->LE; - } - $body .= $this->endBoundary($this->boundary[1]); - break; - case 'alt_inline': - $body .= $mimepre; - $body .= $this->getBoundary($this->boundary[1], $altBodyCharSet, 'text/plain', $altBodyEncoding); - $body .= $this->encodeString($this->AltBody, $altBodyEncoding); - $body .= $this->LE . $this->LE; - $body .= $this->textLine('--' . $this->boundary[1]); - $body .= $this->headerLine('Content-Type', 'multipart/related;'); - $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"'); - $body .= $this->LE; - $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, 'text/html', $bodyEncoding); - $body .= $this->encodeString($this->Body, $bodyEncoding); - $body .= $this->LE . $this->LE; - $body .= $this->attachAll('inline', $this->boundary[2]); - $body .= $this->LE; - $body .= $this->endBoundary($this->boundary[1]); - break; - case 'alt_attach': - $body .= $mimepre; - $body .= $this->textLine('--' . $this->boundary[1]); - $body .= $this->headerLine('Content-Type', 'multipart/alternative;'); - $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"'); - $body .= $this->LE; - $body .= $this->getBoundary($this->boundary[2], $altBodyCharSet, 'text/plain', $altBodyEncoding); - $body .= $this->encodeString($this->AltBody, $altBodyEncoding); - $body .= $this->LE . $this->LE; - $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, 'text/html', $bodyEncoding); - $body .= $this->encodeString($this->Body, $bodyEncoding); - $body .= $this->LE . $this->LE; - $body .= $this->endBoundary($this->boundary[2]); - $body .= $this->LE; - $body .= $this->attachAll('attachment', $this->boundary[1]); - break; - case 'alt_inline_attach': - $body .= $mimepre; - $body .= $this->textLine('--' . $this->boundary[1]); - $body .= $this->headerLine('Content-Type', 'multipart/alternative;'); - $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"'); - $body .= $this->LE; - $body .= $this->getBoundary($this->boundary[2], $altBodyCharSet, 'text/plain', $altBodyEncoding); - $body .= $this->encodeString($this->AltBody, $altBodyEncoding); - $body .= $this->LE . $this->LE; - $body .= $this->textLine('--' . $this->boundary[2]); - $body .= $this->headerLine('Content-Type', 'multipart/related;'); - $body .= $this->textLine("\tboundary=\"" . $this->boundary[3] . '"'); - $body .= $this->LE; - $body .= $this->getBoundary($this->boundary[3], $bodyCharSet, 'text/html', $bodyEncoding); - $body .= $this->encodeString($this->Body, $bodyEncoding); - $body .= $this->LE . $this->LE; - $body .= $this->attachAll('inline', $this->boundary[3]); - $body .= $this->LE; - $body .= $this->endBoundary($this->boundary[2]); - $body .= $this->LE; - $body .= $this->attachAll('attachment', $this->boundary[1]); - break; - default: - // Catch case 'plain' and case '', applies to simple `text/plain` and `text/html` body content types - //Reset the `Encoding` property in case we changed it for line length reasons - $this->Encoding = $bodyEncoding; - $body .= $this->encodeString($this->Body, $this->Encoding); - break; - } - - if ($this->isError()) { - $body = ''; - } elseif ($this->sign_key_file) { - try { - if (!defined('PKCS7_TEXT')) { - throw new phpmailerException($this->lang('extension_missing') . 'openssl'); - } - // @TODO would be nice to use php://temp streams here, but need to wrap for PHP < 5.1 - $file = tempnam(sys_get_temp_dir(), 'mail'); - if (false === file_put_contents($file, $body)) { - throw new phpmailerException($this->lang('signing') . ' Could not write temp file'); - } - $signed = tempnam(sys_get_temp_dir(), 'signed'); - //Workaround for PHP bug https://bugs.php.net/bug.php?id=69197 - if (empty($this->sign_extracerts_file)) { - $sign = @openssl_pkcs7_sign( - $file, - $signed, - 'file://' . realpath($this->sign_cert_file), - array('file://' . realpath($this->sign_key_file), $this->sign_key_pass), - null - ); - } else { - $sign = @openssl_pkcs7_sign( - $file, - $signed, - 'file://' . realpath($this->sign_cert_file), - array('file://' . realpath($this->sign_key_file), $this->sign_key_pass), - null, - PKCS7_DETACHED, - $this->sign_extracerts_file - ); - } - if ($sign) { - @unlink($file); - $body = file_get_contents($signed); - @unlink($signed); - //The message returned by openssl contains both headers and body, so need to split them up - $parts = explode("\n\n", $body, 2); - $this->MIMEHeader .= $parts[0] . $this->LE . $this->LE; - $body = $parts[1]; - } else { - @unlink($file); - @unlink($signed); - throw new phpmailerException($this->lang('signing') . openssl_error_string()); - } - } catch (phpmailerException $exc) { - $body = ''; - if ($this->exceptions) { - throw $exc; - } - } - } - return $body; - } - - /** - * Return the start of a message boundary. - * @access protected - * @param string $boundary - * @param string $charSet - * @param string $contentType - * @param string $encoding - * @return string - */ - protected function getBoundary($boundary, $charSet, $contentType, $encoding) - { - $result = ''; - if ($charSet == '') { - $charSet = $this->CharSet; - } - if ($contentType == '') { - $contentType = $this->ContentType; - } - if ($encoding == '') { - $encoding = $this->Encoding; - } - $result .= $this->textLine('--' . $boundary); - $result .= sprintf('Content-Type: %s; charset=%s', $contentType, $charSet); - $result .= $this->LE; - // RFC1341 part 5 says 7bit is assumed if not specified - if ($encoding != '7bit') { - $result .= $this->headerLine('Content-Transfer-Encoding', $encoding); - } - $result .= $this->LE; - - return $result; - } - - /** - * Return the end of a message boundary. - * @access protected - * @param string $boundary - * @return string - */ - protected function endBoundary($boundary) - { - return $this->LE . '--' . $boundary . '--' . $this->LE; - } - - /** - * Set the message type. - * PHPMailer only supports some preset message types, not arbitrary MIME structures. - * @access protected - * @return void - */ - protected function setMessageType() - { - $type = array(); - if ($this->alternativeExists()) { - $type[] = 'alt'; - } - if ($this->inlineImageExists()) { - $type[] = 'inline'; - } - if ($this->attachmentExists()) { - $type[] = 'attach'; - } - $this->message_type = implode('_', $type); - if ($this->message_type == '') { - //The 'plain' message_type refers to the message having a single body element, not that it is plain-text - $this->message_type = 'plain'; - } - } - - /** - * Format a header line. - * @access public - * @param string $name - * @param string $value - * @return string - */ - public function headerLine($name, $value) - { - return $name . ': ' . $value . $this->LE; - } - - /** - * Return a formatted mail line. - * @access public - * @param string $value - * @return string - */ - public function textLine($value) - { - return $value . $this->LE; - } - - /** - * Add an attachment from a path on the filesystem. - * Returns false if the file could not be found or read. - * @param string $path Path to the attachment. - * @param string $name Overrides the attachment name. - * @param string $encoding File encoding (see $Encoding). - * @param string $type File extension (MIME) type. - * @param string $disposition Disposition to use - * @throws phpmailerException - * @return boolean - */ - public function addAttachment($path, $name = '', $encoding = 'base64', $type = '', $disposition = 'attachment') - { - try { - if (!@is_file($path)) { - throw new phpmailerException($this->lang('file_access') . $path, self::STOP_CONTINUE); - } - - // If a MIME type is not specified, try to work it out from the file name - if ($type == '') { - $type = self::filenameToType($path); - } - - $filename = basename($path); - if ($name == '') { - $name = $filename; - } - - $this->attachment[] = array( - 0 => $path, - 1 => $filename, - 2 => $name, - 3 => $encoding, - 4 => $type, - 5 => false, // isStringAttachment - 6 => $disposition, - 7 => 0 - ); - - } catch (phpmailerException $exc) { - $this->setError($exc->getMessage()); - $this->edebug($exc->getMessage()); - if ($this->exceptions) { - throw $exc; - } - return false; - } - return true; - } - - /** - * Return the array of attachments. - * @return array - */ - public function getAttachments() - { - return $this->attachment; - } - - /** - * Attach all file, string, and binary attachments to the message. - * Returns an empty string on failure. - * @access protected - * @param string $disposition_type - * @param string $boundary - * @return string - */ - protected function attachAll($disposition_type, $boundary) - { - // Return text of body - $mime = array(); - $cidUniq = array(); - $incl = array(); - - // Add all attachments - foreach ($this->attachment as $attachment) { - // Check if it is a valid disposition_filter - if ($attachment[6] == $disposition_type) { - // Check for string attachment - $string = ''; - $path = ''; - $bString = $attachment[5]; - if ($bString) { - $string = $attachment[0]; - } else { - $path = $attachment[0]; - } - - $inclhash = md5(serialize($attachment)); - if (in_array($inclhash, $incl)) { - continue; - } - $incl[] = $inclhash; - $name = $attachment[2]; - $encoding = $attachment[3]; - $type = $attachment[4]; - $disposition = $attachment[6]; - $cid = $attachment[7]; - if ($disposition == 'inline' && array_key_exists($cid, $cidUniq)) { - continue; - } - $cidUniq[$cid] = true; - - $mime[] = sprintf('--%s%s', $boundary, $this->LE); - //Only include a filename property if we have one - if (!empty($name)) { - $mime[] = sprintf( - 'Content-Type: %s; name="%s"%s', - $type, - $this->encodeHeader($this->secureHeader($name)), - $this->LE - ); - } else { - $mime[] = sprintf( - 'Content-Type: %s%s', - $type, - $this->LE - ); - } - // RFC1341 part 5 says 7bit is assumed if not specified - if ($encoding != '7bit') { - $mime[] = sprintf('Content-Transfer-Encoding: %s%s', $encoding, $this->LE); - } - - if ($disposition == 'inline') { - $mime[] = sprintf('Content-ID: <%s>%s', $cid, $this->LE); - } - - // If a filename contains any of these chars, it should be quoted, - // but not otherwise: RFC2183 & RFC2045 5.1 - // Fixes a warning in IETF's msglint MIME checker - // Allow for bypassing the Content-Disposition header totally - if (!(empty($disposition))) { - $encoded_name = $this->encodeHeader($this->secureHeader($name)); - if (preg_match('/[ \(\)<>@,;:\\"\/\[\]\?=]/', $encoded_name)) { - $mime[] = sprintf( - 'Content-Disposition: %s; filename="%s"%s', - $disposition, - $encoded_name, - $this->LE . $this->LE - ); - } else { - if (!empty($encoded_name)) { - $mime[] = sprintf( - 'Content-Disposition: %s; filename=%s%s', - $disposition, - $encoded_name, - $this->LE . $this->LE - ); - } else { - $mime[] = sprintf( - 'Content-Disposition: %s%s', - $disposition, - $this->LE . $this->LE - ); - } - } - } else { - $mime[] = $this->LE; - } - - // Encode as string attachment - if ($bString) { - $mime[] = $this->encodeString($string, $encoding); - if ($this->isError()) { - return ''; - } - $mime[] = $this->LE . $this->LE; - } else { - $mime[] = $this->encodeFile($path, $encoding); - if ($this->isError()) { - return ''; - } - $mime[] = $this->LE . $this->LE; - } - } - } - - $mime[] = sprintf('--%s--%s', $boundary, $this->LE); - - return implode('', $mime); - } - - /** - * Encode a file attachment in requested format. - * Returns an empty string on failure. - * @param string $path The full path to the file - * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' - * @throws phpmailerException - * @access protected - * @return string - */ - protected function encodeFile($path, $encoding = 'base64') - { - try { - if (!is_readable($path)) { - throw new phpmailerException($this->lang('file_open') . $path, self::STOP_CONTINUE); - } - $magic_quotes = get_magic_quotes_runtime(); - if ($magic_quotes) { - if (version_compare(PHP_VERSION, '5.3.0', '<')) { - set_magic_quotes_runtime(false); - } else { - //Doesn't exist in PHP 5.4, but we don't need to check because - //get_magic_quotes_runtime always returns false in 5.4+ - //so it will never get here - ini_set('magic_quotes_runtime', false); - } - } - $file_buffer = file_get_contents($path); - $file_buffer = $this->encodeString($file_buffer, $encoding); - if ($magic_quotes) { - if (version_compare(PHP_VERSION, '5.3.0', '<')) { - set_magic_quotes_runtime($magic_quotes); - } else { - ini_set('magic_quotes_runtime', $magic_quotes); - } - } - return $file_buffer; - } catch (Exception $exc) { - $this->setError($exc->getMessage()); - return ''; - } - } - - /** - * Encode a string in requested format. - * Returns an empty string on failure. - * @param string $str The text to encode - * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' - * @access public - * @return string - */ - public function encodeString($str, $encoding = 'base64') - { - $encoded = ''; - switch (strtolower($encoding)) { - case 'base64': - $encoded = chunk_split(base64_encode($str), 76, $this->LE); - break; - case '7bit': - case '8bit': - $encoded = $this->fixEOL($str); - // Make sure it ends with a line break - if (substr($encoded, -(strlen($this->LE))) != $this->LE) { - $encoded .= $this->LE; - } - break; - case 'binary': - $encoded = $str; - break; - case 'quoted-printable': - $encoded = $this->encodeQP($str); - break; - default: - $this->setError($this->lang('encoding') . $encoding); - break; - } - return $encoded; - } - - /** - * Encode a header string optimally. - * Picks shortest of Q, B, quoted-printable or none. - * @access public - * @param string $str - * @param string $position - * @return string - */ - public function encodeHeader($str, $position = 'text') - { - $matchcount = 0; - switch (strtolower($position)) { - case 'phrase': - if (!preg_match('/[\200-\377]/', $str)) { - // Can't use addslashes as we don't know the value of magic_quotes_sybase - $encoded = addcslashes($str, "\0..\37\177\\\""); - if (($str == $encoded) && !preg_match('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str)) { - return ($encoded); - } else { - return ("\"$encoded\""); - } - } - $matchcount = preg_match_all('/[^\040\041\043-\133\135-\176]/', $str, $matches); - break; - /** @noinspection PhpMissingBreakStatementInspection */ - case 'comment': - $matchcount = preg_match_all('/[()"]/', $str, $matches); - // Intentional fall-through - case 'text': - default: - $matchcount += preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches); - break; - } - - //There are no chars that need encoding - if ($matchcount == 0) { - return ($str); - } - - $maxlen = 75 - 7 - strlen($this->CharSet); - // Try to select the encoding which should produce the shortest output - if ($matchcount > strlen($str) / 3) { - // More than a third of the content will need encoding, so B encoding will be most efficient - $encoding = 'B'; - if (function_exists('mb_strlen') && $this->hasMultiBytes($str)) { - // Use a custom function which correctly encodes and wraps long - // multibyte strings without breaking lines within a character - $encoded = $this->base64EncodeWrapMB($str, "\n"); - } else { - $encoded = base64_encode($str); - $maxlen -= $maxlen % 4; - $encoded = trim(chunk_split($encoded, $maxlen, "\n")); - } - } else { - $encoding = 'Q'; - $encoded = $this->encodeQ($str, $position); - $encoded = $this->wrapText($encoded, $maxlen, true); - $encoded = str_replace('=' . self::CRLF, "\n", trim($encoded)); - } - - $encoded = preg_replace('/^(.*)$/m', ' =?' . $this->CharSet . "?$encoding?\\1?=", $encoded); - $encoded = trim(str_replace("\n", $this->LE, $encoded)); - - return $encoded; - } - - /** - * Check if a string contains multi-byte characters. - * @access public - * @param string $str multi-byte text to wrap encode - * @return boolean - */ - public function hasMultiBytes($str) - { - if (function_exists('mb_strlen')) { - return (strlen($str) > mb_strlen($str, $this->CharSet)); - } else { // Assume no multibytes (we can't handle without mbstring functions anyway) - return false; - } - } - - /** - * Does a string contain any 8-bit chars (in any charset)? - * @param string $text - * @return boolean - */ - public function has8bitChars($text) - { - return (boolean)preg_match('/[\x80-\xFF]/', $text); - } - - /** - * Encode and wrap long multibyte strings for mail headers - * without breaking lines within a character. - * Adapted from a function by paravoid - * @link http://www.php.net/manual/en/function.mb-encode-mimeheader.php#60283 - * @access public - * @param string $str multi-byte text to wrap encode - * @param string $linebreak string to use as linefeed/end-of-line - * @return string - */ - public function base64EncodeWrapMB($str, $linebreak = null) - { - $start = '=?' . $this->CharSet . '?B?'; - $end = '?='; - $encoded = ''; - if ($linebreak === null) { - $linebreak = $this->LE; - } - - $mb_length = mb_strlen($str, $this->CharSet); - // Each line must have length <= 75, including $start and $end - $length = 75 - strlen($start) - strlen($end); - // Average multi-byte ratio - $ratio = $mb_length / strlen($str); - // Base64 has a 4:3 ratio - $avgLength = floor($length * $ratio * .75); - - for ($i = 0; $i < $mb_length; $i += $offset) { - $lookBack = 0; - do { - $offset = $avgLength - $lookBack; - $chunk = mb_substr($str, $i, $offset, $this->CharSet); - $chunk = base64_encode($chunk); - $lookBack++; - } while (strlen($chunk) > $length); - $encoded .= $chunk . $linebreak; - } - - // Chomp the last linefeed - $encoded = substr($encoded, 0, -strlen($linebreak)); - return $encoded; - } - - /** - * Encode a string in quoted-printable format. - * According to RFC2045 section 6.7. - * @access public - * @param string $string The text to encode - * @param integer $line_max Number of chars allowed on a line before wrapping - * @return string - * @link http://www.php.net/manual/en/function.quoted-printable-decode.php#89417 Adapted from this comment - */ - public function encodeQP($string, $line_max = 76) - { - // Use native function if it's available (>= PHP5.3) - if (function_exists('quoted_printable_encode')) { - return quoted_printable_encode($string); - } - // Fall back to a pure PHP implementation - $string = str_replace( - array('%20', '%0D%0A.', '%0D%0A', '%'), - array(' ', "\r\n=2E", "\r\n", '='), - rawurlencode($string) - ); - return preg_replace('/[^\r\n]{' . ($line_max - 3) . '}[^=\r\n]{2}/', "$0=\r\n", $string); - } - - /** - * Backward compatibility wrapper for an old QP encoding function that was removed. - * @see PHPMailer::encodeQP() - * @access public - * @param string $string - * @param integer $line_max - * @param boolean $space_conv - * @return string - * @deprecated Use encodeQP instead. - */ - public function encodeQPphp( - $string, - $line_max = 76, - /** @noinspection PhpUnusedParameterInspection */ $space_conv = false - ) { - return $this->encodeQP($string, $line_max); - } - - /** - * Encode a string using Q encoding. - * @link http://tools.ietf.org/html/rfc2047 - * @param string $str the text to encode - * @param string $position Where the text is going to be used, see the RFC for what that means - * @access public - * @return string - */ - public function encodeQ($str, $position = 'text') - { - // There should not be any EOL in the string - $pattern = ''; - $encoded = str_replace(array("\r", "\n"), '', $str); - switch (strtolower($position)) { - case 'phrase': - // RFC 2047 section 5.3 - $pattern = '^A-Za-z0-9!*+\/ -'; - break; - /** @noinspection PhpMissingBreakStatementInspection */ - case 'comment': - // RFC 2047 section 5.2 - $pattern = '\(\)"'; - // intentional fall-through - // for this reason we build the $pattern without including delimiters and [] - case 'text': - default: - // RFC 2047 section 5.1 - // Replace every high ascii, control, =, ? and _ characters - $pattern = '\000-\011\013\014\016-\037\075\077\137\177-\377' . $pattern; - break; - } - $matches = array(); - if (preg_match_all("/[{$pattern}]/", $encoded, $matches)) { - // If the string contains an '=', make sure it's the first thing we replace - // so as to avoid double-encoding - $eqkey = array_search('=', $matches[0]); - if (false !== $eqkey) { - unset($matches[0][$eqkey]); - array_unshift($matches[0], '='); - } - foreach (array_unique($matches[0]) as $char) { - $encoded = str_replace($char, '=' . sprintf('%02X', ord($char)), $encoded); - } - } - // Replace every spaces to _ (more readable than =20) - return str_replace(' ', '_', $encoded); - } - - /** - * Add a string or binary attachment (non-filesystem). - * This method can be used to attach ascii or binary data, - * such as a BLOB record from a database. - * @param string $string String attachment data. - * @param string $filename Name of the attachment. - * @param string $encoding File encoding (see $Encoding). - * @param string $type File extension (MIME) type. - * @param string $disposition Disposition to use - * @return void - */ - public function addStringAttachment( - $string, - $filename, - $encoding = 'base64', - $type = '', - $disposition = 'attachment' - ) { - // If a MIME type is not specified, try to work it out from the file name - if ($type == '') { - $type = self::filenameToType($filename); - } - // Append to $attachment array - $this->attachment[] = array( - 0 => $string, - 1 => $filename, - 2 => basename($filename), - 3 => $encoding, - 4 => $type, - 5 => true, // isStringAttachment - 6 => $disposition, - 7 => 0 - ); - } - - /** - * Add an embedded (inline) attachment from a file. - * This can include images, sounds, and just about any other document type. - * These differ from 'regular' attachments in that they are intended to be - * displayed inline with the message, not just attached for download. - * This is used in HTML messages that embed the images - * the HTML refers to using the $cid value. - * @param string $path Path to the attachment. - * @param string $cid Content ID of the attachment; Use this to reference - * the content when using an embedded image in HTML. - * @param string $name Overrides the attachment name. - * @param string $encoding File encoding (see $Encoding). - * @param string $type File MIME type. - * @param string $disposition Disposition to use - * @return boolean True on successfully adding an attachment - */ - public function addEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = '', $disposition = 'inline') - { - if (!@is_file($path)) { - $this->setError($this->lang('file_access') . $path); - return false; - } - - // If a MIME type is not specified, try to work it out from the file name - if ($type == '') { - $type = self::filenameToType($path); - } - - $filename = basename($path); - if ($name == '') { - $name = $filename; - } - - // Append to $attachment array - $this->attachment[] = array( - 0 => $path, - 1 => $filename, - 2 => $name, - 3 => $encoding, - 4 => $type, - 5 => false, // isStringAttachment - 6 => $disposition, - 7 => $cid - ); - return true; - } - - /** - * Add an embedded stringified attachment. - * This can include images, sounds, and just about any other document type. - * Be sure to set the $type to an image type for images: - * JPEG images use 'image/jpeg', GIF uses 'image/gif', PNG uses 'image/png'. - * @param string $string The attachment binary data. - * @param string $cid Content ID of the attachment; Use this to reference - * the content when using an embedded image in HTML. - * @param string $name - * @param string $encoding File encoding (see $Encoding). - * @param string $type MIME type. - * @param string $disposition Disposition to use - * @return boolean True on successfully adding an attachment - */ - public function addStringEmbeddedImage( - $string, - $cid, - $name = '', - $encoding = 'base64', - $type = '', - $disposition = 'inline' - ) { - // If a MIME type is not specified, try to work it out from the name - if ($type == '' and !empty($name)) { - $type = self::filenameToType($name); - } - - // Append to $attachment array - $this->attachment[] = array( - 0 => $string, - 1 => $name, - 2 => $name, - 3 => $encoding, - 4 => $type, - 5 => true, // isStringAttachment - 6 => $disposition, - 7 => $cid - ); - return true; - } - - /** - * Check if an inline attachment is present. - * @access public - * @return boolean - */ - public function inlineImageExists() - { - foreach ($this->attachment as $attachment) { - if ($attachment[6] == 'inline') { - return true; - } - } - return false; - } - - /** - * Check if an attachment (non-inline) is present. - * @return boolean - */ - public function attachmentExists() - { - foreach ($this->attachment as $attachment) { - if ($attachment[6] == 'attachment') { - return true; - } - } - return false; - } - - /** - * Check if this message has an alternative body set. - * @return boolean - */ - public function alternativeExists() - { - return !empty($this->AltBody); - } - - /** - * Clear queued addresses of given kind. - * @access protected - * @param string $kind 'to', 'cc', or 'bcc' - * @return void - */ - public function clearQueuedAddresses($kind) - { - $RecipientsQueue = $this->RecipientsQueue; - foreach ($RecipientsQueue as $address => $params) { - if ($params[0] == $kind) { - unset($this->RecipientsQueue[$address]); - } - } - } - - /** - * Clear all To recipients. - * @return void - */ - public function clearAddresses() - { - foreach ($this->to as $to) { - unset($this->all_recipients[strtolower($to[0])]); - } - $this->to = array(); - $this->clearQueuedAddresses('to'); - } - - /** - * Clear all CC recipients. - * @return void - */ - public function clearCCs() - { - foreach ($this->cc as $cc) { - unset($this->all_recipients[strtolower($cc[0])]); - } - $this->cc = array(); - $this->clearQueuedAddresses('cc'); - } - - /** - * Clear all BCC recipients. - * @return void - */ - public function clearBCCs() - { - foreach ($this->bcc as $bcc) { - unset($this->all_recipients[strtolower($bcc[0])]); - } - $this->bcc = array(); - $this->clearQueuedAddresses('bcc'); - } - - /** - * Clear all ReplyTo recipients. - * @return void - */ - public function clearReplyTos() - { - $this->ReplyTo = array(); - $this->ReplyToQueue = array(); - } - - /** - * Clear all recipient types. - * @return void - */ - public function clearAllRecipients() - { - $this->to = array(); - $this->cc = array(); - $this->bcc = array(); - $this->all_recipients = array(); - $this->RecipientsQueue = array(); - } - - /** - * Clear all filesystem, string, and binary attachments. - * @return void - */ - public function clearAttachments() - { - $this->attachment = array(); - } - - /** - * Clear all custom headers. - * @return void - */ - public function clearCustomHeaders() - { - $this->CustomHeader = array(); - } - - /** - * Add an error message to the error container. - * @access protected - * @param string $msg - * @return void - */ - protected function setError($msg) - { - $this->error_count++; - if ($this->Mailer == 'smtp' and !is_null($this->smtp)) { - $lasterror = $this->smtp->getError(); - if (!empty($lasterror['error'])) { - $msg .= $this->lang('smtp_error') . $lasterror['error']; - if (!empty($lasterror['detail'])) { - $msg .= ' Detail: '. $lasterror['detail']; - } - if (!empty($lasterror['smtp_code'])) { - $msg .= ' SMTP code: ' . $lasterror['smtp_code']; - } - if (!empty($lasterror['smtp_code_ex'])) { - $msg .= ' Additional SMTP info: ' . $lasterror['smtp_code_ex']; - } - } - } - $this->ErrorInfo = $msg; - } - - /** - * Return an RFC 822 formatted date. - * @access public - * @return string - * @static - */ - public static function rfcDate() - { - // Set the time zone to whatever the default is to avoid 500 errors - // Will default to UTC if it's not set properly in php.ini - date_default_timezone_set(@date_default_timezone_get()); - return date('D, j M Y H:i:s O'); - } - - /** - * Get the server hostname. - * Returns 'localhost.localdomain' if unknown. - * @access protected - * @return string - */ - protected function serverHostname() - { - $result = 'localhost.localdomain'; - if (!empty($this->Hostname)) { - $result = $this->Hostname; - } elseif (isset($_SERVER) and array_key_exists('SERVER_NAME', $_SERVER) and !empty($_SERVER['SERVER_NAME'])) { - $result = $_SERVER['SERVER_NAME']; - } elseif (function_exists('gethostname') && gethostname() !== false) { - $result = gethostname(); - } elseif (php_uname('n') !== false) { - $result = php_uname('n'); - } - return $result; - } - - /** - * Get an error message in the current language. - * @access protected - * @param string $key - * @return string - */ - protected function lang($key) - { - if (count($this->language) < 1) { - $this->setLanguage('en'); // set the default language - } - - if (array_key_exists($key, $this->language)) { - if ($key == 'smtp_connect_failed') { - //Include a link to troubleshooting docs on SMTP connection failure - //this is by far the biggest cause of support questions - //but it's usually not PHPMailer's fault. - return $this->language[$key] . ' https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting'; - } - return $this->language[$key]; - } else { - //Return the key as a fallback - return $key; - } - } - - /** - * Check if an error occurred. - * @access public - * @return boolean True if an error did occur. - */ - public function isError() - { - return ($this->error_count > 0); - } - - /** - * Ensure consistent line endings in a string. - * Changes every end of line from CRLF, CR or LF to $this->LE. - * @access public - * @param string $str String to fixEOL - * @return string - */ - public function fixEOL($str) - { - // Normalise to \n - $nstr = str_replace(array("\r\n", "\r"), "\n", $str); - // Now convert LE as needed - if ($this->LE !== "\n") { - $nstr = str_replace("\n", $this->LE, $nstr); - } - return $nstr; - } - - /** - * Add a custom header. - * $name value can be overloaded to contain - * both header name and value (name:value) - * @access public - * @param string $name Custom header name - * @param string $value Header value - * @return void - */ - public function addCustomHeader($name, $value = null) - { - if ($value === null) { - // Value passed in as name:value - $this->CustomHeader[] = explode(':', $name, 2); - } else { - $this->CustomHeader[] = array($name, $value); - } - } - - /** - * Returns all custom headers. - * @return array - */ - public function getCustomHeaders() - { - return $this->CustomHeader; - } - - /** - * Create a message body from an HTML string. - * Automatically inlines images and creates a plain-text version by converting the HTML, - * overwriting any existing values in Body and AltBody. - * $basedir is used when handling relative image paths, e.g. - * will look for an image file in $basedir/images/a.png and convert it to inline. - * If you don't want to apply these transformations to your HTML, just set Body and AltBody yourself. - * @access public - * @param string $message HTML message string - * @param string $basedir base directory for relative paths to images - * @param boolean|callable $advanced Whether to use the internal HTML to text converter - * or your own custom converter @see PHPMailer::html2text() - * @return string $message The transformed message Body - */ - public function msgHTML($message, $basedir = '', $advanced = false) - { - preg_match_all('/(src|background)=["\'](.*)["\']/Ui', $message, $images); - if (array_key_exists(2, $images)) { - foreach ($images[2] as $imgindex => $url) { - // Convert data URIs into embedded images - if (preg_match('#^data:(image[^;,]*)(;base64)?,#', $url, $match)) { - $data = substr($url, strpos($url, ',')); - if ($match[2]) { - $data = base64_decode($data); - } else { - $data = rawurldecode($data); - } - $cid = md5($url) . '@phpmailer.0'; // RFC2392 S 2 - if ($this->addStringEmbeddedImage($data, $cid, 'embed' . $imgindex, 'base64', $match[1])) { - $message = str_replace( - $images[0][$imgindex], - $images[1][$imgindex] . '="cid:' . $cid . '"', - $message - ); - } - } elseif (substr($url, 0, 4) !== 'cid:' && !preg_match('#^[a-z][a-z0-9+.-]*://#i', $url)) { - // Do not change urls for absolute images (thanks to corvuscorax) - // Do not change urls that are already inline images - $filename = basename($url); - $directory = dirname($url); - if ($directory == '.') { - $directory = ''; - } - $cid = md5($url) . '@phpmailer.0'; // RFC2392 S 2 - if (strlen($basedir) > 1 && substr($basedir, -1) != '/') { - $basedir .= '/'; - } - if (strlen($directory) > 1 && substr($directory, -1) != '/') { - $directory .= '/'; - } - if ($this->addEmbeddedImage( - $basedir . $directory . $filename, - $cid, - $filename, - 'base64', - self::_mime_types((string)self::mb_pathinfo($filename, PATHINFO_EXTENSION)) - ) - ) { - $message = preg_replace( - '/' . $images[1][$imgindex] . '=["\']' . preg_quote($url, '/') . '["\']/Ui', - $images[1][$imgindex] . '="cid:' . $cid . '"', - $message - ); - } - } - } - } - $this->isHTML(true); - // Convert all message body line breaks to CRLF, makes quoted-printable encoding work much better - $this->Body = $this->normalizeBreaks($message); - $this->AltBody = $this->normalizeBreaks($this->html2text($message, $advanced)); - if (!$this->alternativeExists()) { - $this->AltBody = 'To view this email message, open it in a program that understands HTML!' . - self::CRLF . self::CRLF; - } - return $this->Body; - } - - /** - * Convert an HTML string into plain text. - * This is used by msgHTML(). - * Note - older versions of this function used a bundled advanced converter - * which was been removed for license reasons in #232. - * Example usage: - * - * // Use default conversion - * $plain = $mail->html2text($html); - * // Use your own custom converter - * $plain = $mail->html2text($html, function($html) { - * $converter = new MyHtml2text($html); - * return $converter->get_text(); - * }); - * - * @param string $html The HTML text to convert - * @param boolean|callable $advanced Any boolean value to use the internal converter, - * or provide your own callable for custom conversion. - * @return string - */ - public function html2text($html, $advanced = false) - { - if (is_callable($advanced)) { - return call_user_func($advanced, $html); - } - return html_entity_decode( - trim(strip_tags(preg_replace('/<(head|title|style|script)[^>]*>.*?<\/\\1>/si', '', $html))), - ENT_QUOTES, - $this->CharSet - ); - } - - /** - * Get the MIME type for a file extension. - * @param string $ext File extension - * @access public - * @return string MIME type of file. - * @static - */ - public static function _mime_types($ext = '') - { - $mimes = array( - 'xl' => 'application/excel', - 'js' => 'application/javascript', - 'hqx' => 'application/mac-binhex40', - 'cpt' => 'application/mac-compactpro', - 'bin' => 'application/macbinary', - 'doc' => 'application/msword', - 'word' => 'application/msword', - 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', - 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template', - 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', - 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', - 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide', - 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', - 'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12', - 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12', - 'class' => 'application/octet-stream', - 'dll' => 'application/octet-stream', - 'dms' => 'application/octet-stream', - 'exe' => 'application/octet-stream', - 'lha' => 'application/octet-stream', - 'lzh' => 'application/octet-stream', - 'psd' => 'application/octet-stream', - 'sea' => 'application/octet-stream', - 'so' => 'application/octet-stream', - 'oda' => 'application/oda', - 'pdf' => 'application/pdf', - 'ai' => 'application/postscript', - 'eps' => 'application/postscript', - 'ps' => 'application/postscript', - 'smi' => 'application/smil', - 'smil' => 'application/smil', - 'mif' => 'application/vnd.mif', - 'xls' => 'application/vnd.ms-excel', - 'ppt' => 'application/vnd.ms-powerpoint', - 'wbxml' => 'application/vnd.wap.wbxml', - 'wmlc' => 'application/vnd.wap.wmlc', - 'dcr' => 'application/x-director', - 'dir' => 'application/x-director', - 'dxr' => 'application/x-director', - 'dvi' => 'application/x-dvi', - 'gtar' => 'application/x-gtar', - 'php3' => 'application/x-httpd-php', - 'php4' => 'application/x-httpd-php', - 'php' => 'application/x-httpd-php', - 'phtml' => 'application/x-httpd-php', - 'phps' => 'application/x-httpd-php-source', - 'swf' => 'application/x-shockwave-flash', - 'sit' => 'application/x-stuffit', - 'tar' => 'application/x-tar', - 'tgz' => 'application/x-tar', - 'xht' => 'application/xhtml+xml', - 'xhtml' => 'application/xhtml+xml', - 'zip' => 'application/zip', - 'mid' => 'audio/midi', - 'midi' => 'audio/midi', - 'mp2' => 'audio/mpeg', - 'mp3' => 'audio/mpeg', - 'mpga' => 'audio/mpeg', - 'aif' => 'audio/x-aiff', - 'aifc' => 'audio/x-aiff', - 'aiff' => 'audio/x-aiff', - 'ram' => 'audio/x-pn-realaudio', - 'rm' => 'audio/x-pn-realaudio', - 'rpm' => 'audio/x-pn-realaudio-plugin', - 'ra' => 'audio/x-realaudio', - 'wav' => 'audio/x-wav', - 'bmp' => 'image/bmp', - 'gif' => 'image/gif', - 'jpeg' => 'image/jpeg', - 'jpe' => 'image/jpeg', - 'jpg' => 'image/jpeg', - 'png' => 'image/png', - 'tiff' => 'image/tiff', - 'tif' => 'image/tiff', - 'eml' => 'message/rfc822', - 'css' => 'text/css', - 'html' => 'text/html', - 'htm' => 'text/html', - 'shtml' => 'text/html', - 'log' => 'text/plain', - 'text' => 'text/plain', - 'txt' => 'text/plain', - 'rtx' => 'text/richtext', - 'rtf' => 'text/rtf', - 'vcf' => 'text/vcard', - 'vcard' => 'text/vcard', - 'xml' => 'text/xml', - 'xsl' => 'text/xml', - 'mpeg' => 'video/mpeg', - 'mpe' => 'video/mpeg', - 'mpg' => 'video/mpeg', - 'mov' => 'video/quicktime', - 'qt' => 'video/quicktime', - 'rv' => 'video/vnd.rn-realvideo', - 'avi' => 'video/x-msvideo', - 'movie' => 'video/x-sgi-movie' - ); - if (array_key_exists(strtolower($ext), $mimes)) { - return $mimes[strtolower($ext)]; - } - return 'application/octet-stream'; - } - - /** - * Map a file name to a MIME type. - * Defaults to 'application/octet-stream', i.e.. arbitrary binary data. - * @param string $filename A file name or full path, does not need to exist as a file - * @return string - * @static - */ - public static function filenameToType($filename) - { - // In case the path is a URL, strip any query string before getting extension - $qpos = strpos($filename, '?'); - if (false !== $qpos) { - $filename = substr($filename, 0, $qpos); - } - $pathinfo = self::mb_pathinfo($filename); - return self::_mime_types($pathinfo['extension']); - } - - /** - * Multi-byte-safe pathinfo replacement. - * Drop-in replacement for pathinfo(), but multibyte-safe, cross-platform-safe, old-version-safe. - * Works similarly to the one in PHP >= 5.2.0 - * @link http://www.php.net/manual/en/function.pathinfo.php#107461 - * @param string $path A filename or path, does not need to exist as a file - * @param integer|string $options Either a PATHINFO_* constant, - * or a string name to return only the specified piece, allows 'filename' to work on PHP < 5.2 - * @return string|array - * @static - */ - public static function mb_pathinfo($path, $options = null) - { - $ret = array('dirname' => '', 'basename' => '', 'extension' => '', 'filename' => ''); - $pathinfo = array(); - if (preg_match('%^(.*?)[\\\\/]*(([^/\\\\]*?)(\.([^\.\\\\/]+?)|))[\\\\/\.]*$%im', $path, $pathinfo)) { - if (array_key_exists(1, $pathinfo)) { - $ret['dirname'] = $pathinfo[1]; - } - if (array_key_exists(2, $pathinfo)) { - $ret['basename'] = $pathinfo[2]; - } - if (array_key_exists(5, $pathinfo)) { - $ret['extension'] = $pathinfo[5]; - } - if (array_key_exists(3, $pathinfo)) { - $ret['filename'] = $pathinfo[3]; - } - } - switch ($options) { - case PATHINFO_DIRNAME: - case 'dirname': - return $ret['dirname']; - case PATHINFO_BASENAME: - case 'basename': - return $ret['basename']; - case PATHINFO_EXTENSION: - case 'extension': - return $ret['extension']; - case PATHINFO_FILENAME: - case 'filename': - return $ret['filename']; - default: - return $ret; - } - } - - /** - * Set or reset instance properties. - * You should avoid this function - it's more verbose, less efficient, more error-prone and - * harder to debug than setting properties directly. - * Usage Example: - * `$mail->set('SMTPSecure', 'tls');` - * is the same as: - * `$mail->SMTPSecure = 'tls';` - * @access public - * @param string $name The property name to set - * @param mixed $value The value to set the property to - * @return boolean - * @TODO Should this not be using the __set() magic function? - */ - public function set($name, $value = '') - { - if (property_exists($this, $name)) { - $this->$name = $value; - return true; - } else { - $this->setError($this->lang('variable_set') . $name); - return false; - } - } - - /** - * Strip newlines to prevent header injection. - * @access public - * @param string $str - * @return string - */ - public function secureHeader($str) - { - return trim(str_replace(array("\r", "\n"), '', $str)); - } - - /** - * Normalize line breaks in a string. - * Converts UNIX LF, Mac CR and Windows CRLF line breaks into a single line break format. - * Defaults to CRLF (for message bodies) and preserves consecutive breaks. - * @param string $text - * @param string $breaktype What kind of line break to use, defaults to CRLF - * @return string - * @access public - * @static - */ - public static function normalizeBreaks($text, $breaktype = "\r\n") - { - return preg_replace('/(\r\n|\r|\n)/ms', $breaktype, $text); - } - - /** - * Set the public and private key files and password for S/MIME signing. - * @access public - * @param string $cert_filename - * @param string $key_filename - * @param string $key_pass Password for private key - * @param string $extracerts_filename Optional path to chain certificate - */ - public function sign($cert_filename, $key_filename, $key_pass, $extracerts_filename = '') - { - $this->sign_cert_file = $cert_filename; - $this->sign_key_file = $key_filename; - $this->sign_key_pass = $key_pass; - $this->sign_extracerts_file = $extracerts_filename; - } - - /** - * Quoted-Printable-encode a DKIM header. - * @access public - * @param string $txt - * @return string - */ - public function DKIM_QP($txt) - { - $line = ''; - for ($i = 0; $i < strlen($txt); $i++) { - $ord = ord($txt[$i]); - if (((0x21 <= $ord) && ($ord <= 0x3A)) || $ord == 0x3C || ((0x3E <= $ord) && ($ord <= 0x7E))) { - $line .= $txt[$i]; - } else { - $line .= '=' . sprintf('%02X', $ord); - } - } - return $line; - } - - /** - * Generate a DKIM signature. - * @access public - * @param string $signHeader - * @throws phpmailerException - * @return string The DKIM signature value - */ - public function DKIM_Sign($signHeader) - { - if (!defined('PKCS7_TEXT')) { - if ($this->exceptions) { - throw new phpmailerException($this->lang('extension_missing') . 'openssl'); - } - return ''; - } - $privKeyStr = !empty($this->DKIM_private_string) ? $this->DKIM_private_string : file_get_contents($this->DKIM_private); - if ('' != $this->DKIM_passphrase) { - $privKey = openssl_pkey_get_private($privKeyStr, $this->DKIM_passphrase); - } else { - $privKey = openssl_pkey_get_private($privKeyStr); - } - //Workaround for missing digest algorithms in old PHP & OpenSSL versions - //@link http://stackoverflow.com/a/11117338/333340 - if (version_compare(PHP_VERSION, '5.3.0') >= 0 and - in_array('sha256WithRSAEncryption', openssl_get_md_methods(true))) { - if (openssl_sign($signHeader, $signature, $privKey, 'sha256WithRSAEncryption')) { - openssl_pkey_free($privKey); - return base64_encode($signature); - } - } else { - $pinfo = openssl_pkey_get_details($privKey); - $hash = hash('sha256', $signHeader); - //'Magic' constant for SHA256 from RFC3447 - //@link https://tools.ietf.org/html/rfc3447#page-43 - $t = '3031300d060960864801650304020105000420' . $hash; - $pslen = $pinfo['bits'] / 8 - (strlen($t) / 2 + 3); - $eb = pack('H*', '0001' . str_repeat('FF', $pslen) . '00' . $t); - - if (openssl_private_encrypt($eb, $signature, $privKey, OPENSSL_NO_PADDING)) { - openssl_pkey_free($privKey); - return base64_encode($signature); - } - } - openssl_pkey_free($privKey); - return ''; - } - - /** - * Generate a DKIM canonicalization header. - * @access public - * @param string $signHeader Header - * @return string - */ - public function DKIM_HeaderC($signHeader) - { - $signHeader = preg_replace('/\r\n\s+/', ' ', $signHeader); - $lines = explode("\r\n", $signHeader); - foreach ($lines as $key => $line) { - list($heading, $value) = explode(':', $line, 2); - $heading = strtolower($heading); - $value = preg_replace('/\s{2,}/', ' ', $value); // Compress useless spaces - $lines[$key] = $heading . ':' . trim($value); // Don't forget to remove WSP around the value - } - $signHeader = implode("\r\n", $lines); - return $signHeader; - } - - /** - * Generate a DKIM canonicalization body. - * @access public - * @param string $body Message Body - * @return string - */ - public function DKIM_BodyC($body) - { - if ($body == '') { - return "\r\n"; - } - // stabilize line endings - $body = str_replace("\r\n", "\n", $body); - $body = str_replace("\n", "\r\n", $body); - // END stabilize line endings - while (substr($body, strlen($body) - 4, 4) == "\r\n\r\n") { - $body = substr($body, 0, strlen($body) - 2); - } - return $body; - } - - /** - * Create the DKIM header and body in a new message header. - * @access public - * @param string $headers_line Header lines - * @param string $subject Subject - * @param string $body Body - * @return string - */ - public function DKIM_Add($headers_line, $subject, $body) - { - $DKIMsignatureType = 'rsa-sha256'; // Signature & hash algorithms - $DKIMcanonicalization = 'relaxed/simple'; // Canonicalization of header/body - $DKIMquery = 'dns/txt'; // Query method - $DKIMtime = time(); // Signature Timestamp = seconds since 00:00:00 - Jan 1, 1970 (UTC time zone) - $subject_header = "Subject: $subject"; - $headers = explode($this->LE, $headers_line); - $from_header = ''; - $to_header = ''; - $date_header = ''; - $current = ''; - foreach ($headers as $header) { - if (strpos($header, 'From:') === 0) { - $from_header = $header; - $current = 'from_header'; - } elseif (strpos($header, 'To:') === 0) { - $to_header = $header; - $current = 'to_header'; - } elseif (strpos($header, 'Date:') === 0) { - $date_header = $header; - $current = 'date_header'; - } else { - if (!empty($$current) && strpos($header, ' =?') === 0) { - $$current .= $header; - } else { - $current = ''; - } - } - } - $from = str_replace('|', '=7C', $this->DKIM_QP($from_header)); - $to = str_replace('|', '=7C', $this->DKIM_QP($to_header)); - $date = str_replace('|', '=7C', $this->DKIM_QP($date_header)); - $subject = str_replace( - '|', - '=7C', - $this->DKIM_QP($subject_header) - ); // Copied header fields (dkim-quoted-printable) - $body = $this->DKIM_BodyC($body); - $DKIMlen = strlen($body); // Length of body - $DKIMb64 = base64_encode(pack('H*', hash('sha256', $body))); // Base64 of packed binary SHA-256 hash of body - if ('' == $this->DKIM_identity) { - $ident = ''; - } else { - $ident = ' i=' . $this->DKIM_identity . ';'; - } - $dkimhdrs = 'DKIM-Signature: v=1; a=' . - $DKIMsignatureType . '; q=' . - $DKIMquery . '; l=' . - $DKIMlen . '; s=' . - $this->DKIM_selector . - ";\r\n" . - "\tt=" . $DKIMtime . '; c=' . $DKIMcanonicalization . ";\r\n" . - "\th=From:To:Date:Subject;\r\n" . - "\td=" . $this->DKIM_domain . ';' . $ident . "\r\n" . - "\tz=$from\r\n" . - "\t|$to\r\n" . - "\t|$date\r\n" . - "\t|$subject;\r\n" . - "\tbh=" . $DKIMb64 . ";\r\n" . - "\tb="; - $toSign = $this->DKIM_HeaderC( - $from_header . "\r\n" . - $to_header . "\r\n" . - $date_header . "\r\n" . - $subject_header . "\r\n" . - $dkimhdrs - ); - $signed = $this->DKIM_Sign($toSign); - return $dkimhdrs . $signed . "\r\n"; - } - - /** - * Detect if a string contains a line longer than the maximum line length allowed. - * @param string $str - * @return boolean - * @static - */ - public static function hasLineLongerThanMax($str) - { - //+2 to include CRLF line break for a 1000 total - return (boolean)preg_match('/^(.{'.(self::MAX_LINE_LENGTH + 2).',})/m', $str); - } - - /** - * Allows for public read access to 'to' property. - * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. - * @access public - * @return array - */ - public function getToAddresses() - { - return $this->to; - } - - /** - * Allows for public read access to 'cc' property. - * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. - * @access public - * @return array - */ - public function getCcAddresses() - { - return $this->cc; - } - - /** - * Allows for public read access to 'bcc' property. - * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. - * @access public - * @return array - */ - public function getBccAddresses() - { - return $this->bcc; - } - - /** - * Allows for public read access to 'ReplyTo' property. - * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. - * @access public - * @return array - */ - public function getReplyToAddresses() - { - return $this->ReplyTo; - } - - /** - * Allows for public read access to 'all_recipients' property. - * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. - * @access public - * @return array - */ - public function getAllRecipientAddresses() - { - return $this->all_recipients; - } - - /** - * Perform a callback. - * @param boolean $isSent - * @param array $to - * @param array $cc - * @param array $bcc - * @param string $subject - * @param string $body - * @param string $from - */ - protected function doCallback($isSent, $to, $cc, $bcc, $subject, $body, $from) - { - if (!empty($this->action_function) && is_callable($this->action_function)) { - $params = array($isSent, $to, $cc, $bcc, $subject, $body, $from); - call_user_func_array($this->action_function, $params); - } - } -} - -/** - * PHPMailer exception handler - * @package PHPMailer - */ -class phpmailerException extends Exception -{ - /** - * Prettify error message output - * @return string - */ - public function errorMessage() - { - $errorMsg = '' . $this->getMessage() . "
        \n"; - return $errorMsg; - } -} diff --git a/lib/phpmailer/class.smtp.php b/lib/phpmailer/class.smtp.php deleted file mode 100644 index 04ced65812..0000000000 --- a/lib/phpmailer/class.smtp.php +++ /dev/null @@ -1,1249 +0,0 @@ - - * @author Jim Jagielski (jimjag) - * @author Andy Prevost (codeworxtech) - * @author Brent R. Matzelle (original founder) - * @copyright 2014 Marcus Bointon - * @copyright 2010 - 2012 Jim Jagielski - * @copyright 2004 - 2009 Andy Prevost - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License - * @note This program is distributed in the hope that it will be useful - WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. - */ - -/** - * PHPMailer RFC821 SMTP email transport class. - * Implements RFC 821 SMTP commands and provides some utility methods for sending mail to an SMTP server. - * @package PHPMailer - * @author Chris Ryan - * @author Marcus Bointon - */ -class SMTP -{ - /** - * The PHPMailer SMTP version number. - * @var string - */ - const VERSION = '5.2.19'; - - /** - * SMTP line break constant. - * @var string - */ - const CRLF = "\r\n"; - - /** - * The SMTP port to use if one is not specified. - * @var integer - */ - const DEFAULT_SMTP_PORT = 25; - - /** - * The maximum line length allowed by RFC 2822 section 2.1.1 - * @var integer - */ - const MAX_LINE_LENGTH = 998; - - /** - * Debug level for no output - */ - const DEBUG_OFF = 0; - - /** - * Debug level to show client -> server messages - */ - const DEBUG_CLIENT = 1; - - /** - * Debug level to show client -> server and server -> client messages - */ - const DEBUG_SERVER = 2; - - /** - * Debug level to show connection status, client -> server and server -> client messages - */ - const DEBUG_CONNECTION = 3; - - /** - * Debug level to show all messages - */ - const DEBUG_LOWLEVEL = 4; - - /** - * The PHPMailer SMTP Version number. - * @var string - * @deprecated Use the `VERSION` constant instead - * @see SMTP::VERSION - */ - public $Version = '5.2.19'; - - /** - * SMTP server port number. - * @var integer - * @deprecated This is only ever used as a default value, so use the `DEFAULT_SMTP_PORT` constant instead - * @see SMTP::DEFAULT_SMTP_PORT - */ - public $SMTP_PORT = 25; - - /** - * SMTP reply line ending. - * @var string - * @deprecated Use the `CRLF` constant instead - * @see SMTP::CRLF - */ - public $CRLF = "\r\n"; - - /** - * Debug output level. - * Options: - * * self::DEBUG_OFF (`0`) No debug output, default - * * self::DEBUG_CLIENT (`1`) Client commands - * * self::DEBUG_SERVER (`2`) Client commands and server responses - * * self::DEBUG_CONNECTION (`3`) As DEBUG_SERVER plus connection status - * * self::DEBUG_LOWLEVEL (`4`) Low-level data output, all messages - * @var integer - */ - public $do_debug = self::DEBUG_OFF; - - /** - * How to handle debug output. - * Options: - * * `echo` Output plain-text as-is, appropriate for CLI - * * `html` Output escaped, line breaks converted to `
        `, appropriate for browser output - * * `error_log` Output to error log as configured in php.ini - * - * Alternatively, you can provide a callable expecting two params: a message string and the debug level: - * - * $smtp->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";}; - * - * @var string|callable - */ - public $Debugoutput = 'echo'; - - /** - * Whether to use VERP. - * @link http://en.wikipedia.org/wiki/Variable_envelope_return_path - * @link http://www.postfix.org/VERP_README.html Info on VERP - * @var boolean - */ - public $do_verp = false; - - /** - * The timeout value for connection, in seconds. - * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2 - * This needs to be quite high to function correctly with hosts using greetdelay as an anti-spam measure. - * @link http://tools.ietf.org/html/rfc2821#section-4.5.3.2 - * @var integer - */ - public $Timeout = 300; - - /** - * How long to wait for commands to complete, in seconds. - * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2 - * @var integer - */ - public $Timelimit = 300; - - /** - * @var array patterns to extract smtp transaction id from smtp reply - * Only first capture group will be use, use non-capturing group to deal with it - * Extend this class to override this property to fulfil your needs. - */ - protected $smtp_transaction_id_patterns = array( - 'exim' => '/[0-9]{3} OK id=(.*)/', - 'sendmail' => '/[0-9]{3} 2.0.0 (.*) Message/', - 'postfix' => '/[0-9]{3} 2.0.0 Ok: queued as (.*)/' - ); - - /** - * The socket for the server connection. - * @var resource - */ - protected $smtp_conn; - - /** - * Error information, if any, for the last SMTP command. - * @var array - */ - protected $error = array( - 'error' => '', - 'detail' => '', - 'smtp_code' => '', - 'smtp_code_ex' => '' - ); - - /** - * The reply the server sent to us for HELO. - * If null, no HELO string has yet been received. - * @var string|null - */ - protected $helo_rply = null; - - /** - * The set of SMTP extensions sent in reply to EHLO command. - * Indexes of the array are extension names. - * Value at index 'HELO' or 'EHLO' (according to command that was sent) - * represents the server name. In case of HELO it is the only element of the array. - * Other values can be boolean TRUE or an array containing extension options. - * If null, no HELO/EHLO string has yet been received. - * @var array|null - */ - protected $server_caps = null; - - /** - * The most recent reply received from the server. - * @var string - */ - protected $last_reply = ''; - - /** - * Output debugging info via a user-selected method. - * @see SMTP::$Debugoutput - * @see SMTP::$do_debug - * @param string $str Debug string to output - * @param integer $level The debug level of this message; see DEBUG_* constants - * @return void - */ - protected function edebug($str, $level = 0) - { - if ($level > $this->do_debug) { - return; - } - //Avoid clash with built-in function names - if (!in_array($this->Debugoutput, array('error_log', 'html', 'echo')) and is_callable($this->Debugoutput)) { - call_user_func($this->Debugoutput, $str, $level); - return; - } - switch ($this->Debugoutput) { - case 'error_log': - //Don't output, just log - error_log($str); - break; - case 'html': - //Cleans up output a bit for a better looking, HTML-safe output - echo htmlentities( - preg_replace('/[\r\n]+/', '', $str), - ENT_QUOTES, - 'UTF-8' - ) - . "
        \n"; - break; - case 'echo': - default: - //Normalize line breaks - $str = preg_replace('/(\r\n|\r|\n)/ms', "\n", $str); - echo gmdate('Y-m-d H:i:s') . "\t" . str_replace( - "\n", - "\n \t ", - trim($str) - )."\n"; - } - } - - /** - * Connect to an SMTP server. - * @param string $host SMTP server IP or host name - * @param integer $port The port number to connect to - * @param integer $timeout How long to wait for the connection to open - * @param array $options An array of options for stream_context_create() - * @access public - * @return boolean - */ - public function connect($host, $port = null, $timeout = 30, $options = array()) - { - static $streamok; - //This is enabled by default since 5.0.0 but some providers disable it - //Check this once and cache the result - if (is_null($streamok)) { - $streamok = function_exists('stream_socket_client'); - } - // Clear errors to avoid confusion - $this->setError(''); - // Make sure we are __not__ connected - if ($this->connected()) { - // Already connected, generate error - $this->setError('Already connected to a server'); - return false; - } - if (empty($port)) { - $port = self::DEFAULT_SMTP_PORT; - } - // Connect to the SMTP server - $this->edebug( - "Connection: opening to $host:$port, timeout=$timeout, options=".var_export($options, true), - self::DEBUG_CONNECTION - ); - $errno = 0; - $errstr = ''; - if ($streamok) { - $socket_context = stream_context_create($options); - set_error_handler(array($this, 'errorHandler')); - $this->smtp_conn = stream_socket_client( - $host . ":" . $port, - $errno, - $errstr, - $timeout, - STREAM_CLIENT_CONNECT, - $socket_context - ); - restore_error_handler(); - } else { - //Fall back to fsockopen which should work in more places, but is missing some features - $this->edebug( - "Connection: stream_socket_client not available, falling back to fsockopen", - self::DEBUG_CONNECTION - ); - set_error_handler(array($this, 'errorHandler')); - $this->smtp_conn = fsockopen( - $host, - $port, - $errno, - $errstr, - $timeout - ); - restore_error_handler(); - } - // Verify we connected properly - if (!is_resource($this->smtp_conn)) { - $this->setError( - 'Failed to connect to server', - $errno, - $errstr - ); - $this->edebug( - 'SMTP ERROR: ' . $this->error['error'] - . ": $errstr ($errno)", - self::DEBUG_CLIENT - ); - return false; - } - $this->edebug('Connection: opened', self::DEBUG_CONNECTION); - // SMTP server can take longer to respond, give longer timeout for first read - // Windows does not have support for this timeout function - if (substr(PHP_OS, 0, 3) != 'WIN') { - $max = ini_get('max_execution_time'); - // Don't bother if unlimited - if ($max != 0 && $timeout > $max) { - @set_time_limit($timeout); - } - stream_set_timeout($this->smtp_conn, $timeout, 0); - } - // Get any announcement - $announce = $this->get_lines(); - $this->edebug('SERVER -> CLIENT: ' . $announce, self::DEBUG_SERVER); - return true; - } - - /** - * Initiate a TLS (encrypted) session. - * @access public - * @return boolean - */ - public function startTLS() - { - if (!$this->sendCommand('STARTTLS', 'STARTTLS', 220)) { - return false; - } - - //Allow the best TLS version(s) we can - $crypto_method = STREAM_CRYPTO_METHOD_TLS_CLIENT; - - //PHP 5.6.7 dropped inclusion of TLS 1.1 and 1.2 in STREAM_CRYPTO_METHOD_TLS_CLIENT - //so add them back in manually if we can - if (defined('STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT')) { - $crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT; - $crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT; - } - - // Begin encrypted connection - if (!stream_socket_enable_crypto( - $this->smtp_conn, - true, - $crypto_method - )) { - return false; - } - return true; - } - - /** - * Perform SMTP authentication. - * Must be run after hello(). - * @see hello() - * @param string $username The user name - * @param string $password The password - * @param string $authtype The auth type (PLAIN, LOGIN, NTLM, CRAM-MD5, XOAUTH2) - * @param string $realm The auth realm for NTLM - * @param string $workstation The auth workstation for NTLM - * @param null|OAuth $OAuth An optional OAuth instance (@see PHPMailerOAuth) - * @return bool True if successfully authenticated.* @access public - */ - public function authenticate( - $username, - $password, - $authtype = null, - $realm = '', - $workstation = '', - $OAuth = null - ) { - if (!$this->server_caps) { - $this->setError('Authentication is not allowed before HELO/EHLO'); - return false; - } - - if (array_key_exists('EHLO', $this->server_caps)) { - // SMTP extensions are available. Let's try to find a proper authentication method - - if (!array_key_exists('AUTH', $this->server_caps)) { - $this->setError('Authentication is not allowed at this stage'); - // 'at this stage' means that auth may be allowed after the stage changes - // e.g. after STARTTLS - return false; - } - - self::edebug('Auth method requested: ' . ($authtype ? $authtype : 'UNKNOWN'), self::DEBUG_LOWLEVEL); - self::edebug( - 'Auth methods available on the server: ' . implode(',', $this->server_caps['AUTH']), - self::DEBUG_LOWLEVEL - ); - - if (empty($authtype)) { - foreach (array('CRAM-MD5', 'LOGIN', 'PLAIN', 'NTLM', 'XOAUTH2') as $method) { - if (in_array($method, $this->server_caps['AUTH'])) { - $authtype = $method; - break; - } - } - if (empty($authtype)) { - $this->setError('No supported authentication methods found'); - return false; - } - self::edebug('Auth method selected: '.$authtype, self::DEBUG_LOWLEVEL); - } - - if (!in_array($authtype, $this->server_caps['AUTH'])) { - $this->setError("The requested authentication method \"$authtype\" is not supported by the server"); - return false; - } - } elseif (empty($authtype)) { - $authtype = 'LOGIN'; - } - switch ($authtype) { - case 'PLAIN': - // Start authentication - if (!$this->sendCommand('AUTH', 'AUTH PLAIN', 334)) { - return false; - } - // Send encoded username and password - if (!$this->sendCommand( - 'User & Password', - base64_encode("\0" . $username . "\0" . $password), - 235 - ) - ) { - return false; - } - break; - case 'LOGIN': - // Start authentication - if (!$this->sendCommand('AUTH', 'AUTH LOGIN', 334)) { - return false; - } - if (!$this->sendCommand("Username", base64_encode($username), 334)) { - return false; - } - if (!$this->sendCommand("Password", base64_encode($password), 235)) { - return false; - } - break; - case 'XOAUTH2': - //If the OAuth Instance is not set. Can be a case when PHPMailer is used - //instead of PHPMailerOAuth - if (is_null($OAuth)) { - return false; - } - $oauth = $OAuth->getOauth64(); - - // Start authentication - if (!$this->sendCommand('AUTH', 'AUTH XOAUTH2 ' . $oauth, 235)) { - return false; - } - break; - case 'NTLM': - /* - * ntlm_sasl_client.php - * Bundled with Permission - * - * How to telnet in windows: - * http://technet.microsoft.com/en-us/library/aa995718%28EXCHG.65%29.aspx - * PROTOCOL Docs http://curl.haxx.se/rfc/ntlm.html#ntlmSmtpAuthentication - */ - require_once 'extras/ntlm_sasl_client.php'; - $temp = new stdClass; - $ntlm_client = new ntlm_sasl_client_class; - //Check that functions are available - if (!$ntlm_client->initialize($temp)) { - $this->setError($temp->error); - $this->edebug( - 'You need to enable some modules in your php.ini file: ' - . $this->error['error'], - self::DEBUG_CLIENT - ); - return false; - } - //msg1 - $msg1 = $ntlm_client->typeMsg1($realm, $workstation); //msg1 - - if (!$this->sendCommand( - 'AUTH NTLM', - 'AUTH NTLM ' . base64_encode($msg1), - 334 - ) - ) { - return false; - } - //Though 0 based, there is a white space after the 3 digit number - //msg2 - $challenge = substr($this->last_reply, 3); - $challenge = base64_decode($challenge); - $ntlm_res = $ntlm_client->NTLMResponse( - substr($challenge, 24, 8), - $password - ); - //msg3 - $msg3 = $ntlm_client->typeMsg3( - $ntlm_res, - $username, - $realm, - $workstation - ); - // send encoded username - return $this->sendCommand('Username', base64_encode($msg3), 235); - case 'CRAM-MD5': - // Start authentication - if (!$this->sendCommand('AUTH CRAM-MD5', 'AUTH CRAM-MD5', 334)) { - return false; - } - // Get the challenge - $challenge = base64_decode(substr($this->last_reply, 4)); - - // Build the response - $response = $username . ' ' . $this->hmac($challenge, $password); - - // send encoded credentials - return $this->sendCommand('Username', base64_encode($response), 235); - default: - $this->setError("Authentication method \"$authtype\" is not supported"); - return false; - } - return true; - } - - /** - * Calculate an MD5 HMAC hash. - * Works like hash_hmac('md5', $data, $key) - * in case that function is not available - * @param string $data The data to hash - * @param string $key The key to hash with - * @access protected - * @return string - */ - protected function hmac($data, $key) - { - if (function_exists('hash_hmac')) { - return hash_hmac('md5', $data, $key); - } - - // The following borrowed from - // http://php.net/manual/en/function.mhash.php#27225 - - // RFC 2104 HMAC implementation for php. - // Creates an md5 HMAC. - // Eliminates the need to install mhash to compute a HMAC - // by Lance Rushing - - $bytelen = 64; // byte length for md5 - if (strlen($key) > $bytelen) { - $key = pack('H*', md5($key)); - } - $key = str_pad($key, $bytelen, chr(0x00)); - $ipad = str_pad('', $bytelen, chr(0x36)); - $opad = str_pad('', $bytelen, chr(0x5c)); - $k_ipad = $key ^ $ipad; - $k_opad = $key ^ $opad; - - return md5($k_opad . pack('H*', md5($k_ipad . $data))); - } - - /** - * Check connection state. - * @access public - * @return boolean True if connected. - */ - public function connected() - { - if (is_resource($this->smtp_conn)) { - $sock_status = stream_get_meta_data($this->smtp_conn); - if ($sock_status['eof']) { - // The socket is valid but we are not connected - $this->edebug( - 'SMTP NOTICE: EOF caught while checking if connected', - self::DEBUG_CLIENT - ); - $this->close(); - return false; - } - return true; // everything looks good - } - return false; - } - - /** - * Close the socket and clean up the state of the class. - * Don't use this function without first trying to use QUIT. - * @see quit() - * @access public - * @return void - */ - public function close() - { - $this->setError(''); - $this->server_caps = null; - $this->helo_rply = null; - if (is_resource($this->smtp_conn)) { - // close the connection and cleanup - fclose($this->smtp_conn); - $this->smtp_conn = null; //Makes for cleaner serialization - $this->edebug('Connection: closed', self::DEBUG_CONNECTION); - } - } - - /** - * Send an SMTP DATA command. - * Issues a data command and sends the msg_data to the server, - * finializing the mail transaction. $msg_data is the message - * that is to be send with the headers. Each header needs to be - * on a single line followed by a with the message headers - * and the message body being separated by and additional . - * Implements rfc 821: DATA - * @param string $msg_data Message data to send - * @access public - * @return boolean - */ - public function data($msg_data) - { - //This will use the standard timelimit - if (!$this->sendCommand('DATA', 'DATA', 354)) { - return false; - } - - /* The server is ready to accept data! - * According to rfc821 we should not send more than 1000 characters on a single line (including the CRLF) - * so we will break the data up into lines by \r and/or \n then if needed we will break each of those into - * smaller lines to fit within the limit. - * We will also look for lines that start with a '.' and prepend an additional '.'. - * NOTE: this does not count towards line-length limit. - */ - - // Normalize line breaks before exploding - $lines = explode("\n", str_replace(array("\r\n", "\r"), "\n", $msg_data)); - - /* To distinguish between a complete RFC822 message and a plain message body, we check if the first field - * of the first line (':' separated) does not contain a space then it _should_ be a header and we will - * process all lines before a blank line as headers. - */ - - $field = substr($lines[0], 0, strpos($lines[0], ':')); - $in_headers = false; - if (!empty($field) && strpos($field, ' ') === false) { - $in_headers = true; - } - - foreach ($lines as $line) { - $lines_out = array(); - if ($in_headers and $line == '') { - $in_headers = false; - } - //Break this line up into several smaller lines if it's too long - //Micro-optimisation: isset($str[$len]) is faster than (strlen($str) > $len), - while (isset($line[self::MAX_LINE_LENGTH])) { - //Working backwards, try to find a space within the last MAX_LINE_LENGTH chars of the line to break on - //so as to avoid breaking in the middle of a word - $pos = strrpos(substr($line, 0, self::MAX_LINE_LENGTH), ' '); - //Deliberately matches both false and 0 - if (!$pos) { - //No nice break found, add a hard break - $pos = self::MAX_LINE_LENGTH - 1; - $lines_out[] = substr($line, 0, $pos); - $line = substr($line, $pos); - } else { - //Break at the found point - $lines_out[] = substr($line, 0, $pos); - //Move along by the amount we dealt with - $line = substr($line, $pos + 1); - } - //If processing headers add a LWSP-char to the front of new line RFC822 section 3.1.1 - if ($in_headers) { - $line = "\t" . $line; - } - } - $lines_out[] = $line; - - //Send the lines to the server - foreach ($lines_out as $line_out) { - //RFC2821 section 4.5.2 - if (!empty($line_out) and $line_out[0] == '.') { - $line_out = '.' . $line_out; - } - $this->client_send($line_out . self::CRLF); - } - } - - //Message data has been sent, complete the command - //Increase timelimit for end of DATA command - $savetimelimit = $this->Timelimit; - $this->Timelimit = $this->Timelimit * 2; - $result = $this->sendCommand('DATA END', '.', 250); - //Restore timelimit - $this->Timelimit = $savetimelimit; - return $result; - } - - /** - * Send an SMTP HELO or EHLO command. - * Used to identify the sending server to the receiving server. - * This makes sure that client and server are in a known state. - * Implements RFC 821: HELO - * and RFC 2821 EHLO. - * @param string $host The host name or IP to connect to - * @access public - * @return boolean - */ - public function hello($host = '') - { - //Try extended hello first (RFC 2821) - return (boolean)($this->sendHello('EHLO', $host) or $this->sendHello('HELO', $host)); - } - - /** - * Send an SMTP HELO or EHLO command. - * Low-level implementation used by hello() - * @see hello() - * @param string $hello The HELO string - * @param string $host The hostname to say we are - * @access protected - * @return boolean - */ - protected function sendHello($hello, $host) - { - $noerror = $this->sendCommand($hello, $hello . ' ' . $host, 250); - $this->helo_rply = $this->last_reply; - if ($noerror) { - $this->parseHelloFields($hello); - } else { - $this->server_caps = null; - } - return $noerror; - } - - /** - * Parse a reply to HELO/EHLO command to discover server extensions. - * In case of HELO, the only parameter that can be discovered is a server name. - * @access protected - * @param string $type - 'HELO' or 'EHLO' - */ - protected function parseHelloFields($type) - { - $this->server_caps = array(); - $lines = explode("\n", $this->helo_rply); - - foreach ($lines as $n => $s) { - //First 4 chars contain response code followed by - or space - $s = trim(substr($s, 4)); - if (empty($s)) { - continue; - } - $fields = explode(' ', $s); - if (!empty($fields)) { - if (!$n) { - $name = $type; - $fields = $fields[0]; - } else { - $name = array_shift($fields); - switch ($name) { - case 'SIZE': - $fields = ($fields ? $fields[0] : 0); - break; - case 'AUTH': - if (!is_array($fields)) { - $fields = array(); - } - break; - default: - $fields = true; - } - } - $this->server_caps[$name] = $fields; - } - } - } - - /** - * Send an SMTP MAIL command. - * Starts a mail transaction from the email address specified in - * $from. Returns true if successful or false otherwise. If True - * the mail transaction is started and then one or more recipient - * commands may be called followed by a data command. - * Implements rfc 821: MAIL FROM: - * @param string $from Source address of this message - * @access public - * @return boolean - */ - public function mail($from) - { - $useVerp = ($this->do_verp ? ' XVERP' : ''); - return $this->sendCommand( - 'MAIL FROM', - 'MAIL FROM:<' . $from . '>' . $useVerp, - 250 - ); - } - - /** - * Send an SMTP QUIT command. - * Closes the socket if there is no error or the $close_on_error argument is true. - * Implements from rfc 821: QUIT - * @param boolean $close_on_error Should the connection close if an error occurs? - * @access public - * @return boolean - */ - public function quit($close_on_error = true) - { - $noerror = $this->sendCommand('QUIT', 'QUIT', 221); - $err = $this->error; //Save any error - if ($noerror or $close_on_error) { - $this->close(); - $this->error = $err; //Restore any error from the quit command - } - return $noerror; - } - - /** - * Send an SMTP RCPT command. - * Sets the TO argument to $toaddr. - * Returns true if the recipient was accepted false if it was rejected. - * Implements from rfc 821: RCPT TO: - * @param string $address The address the message is being sent to - * @access public - * @return boolean - */ - public function recipient($address) - { - return $this->sendCommand( - 'RCPT TO', - 'RCPT TO:<' . $address . '>', - array(250, 251) - ); - } - - /** - * Send an SMTP RSET command. - * Abort any transaction that is currently in progress. - * Implements rfc 821: RSET - * @access public - * @return boolean True on success. - */ - public function reset() - { - return $this->sendCommand('RSET', 'RSET', 250); - } - - /** - * Send a command to an SMTP server and check its return code. - * @param string $command The command name - not sent to the server - * @param string $commandstring The actual command to send - * @param integer|array $expect One or more expected integer success codes - * @access protected - * @return boolean True on success. - */ - protected function sendCommand($command, $commandstring, $expect) - { - if (!$this->connected()) { - $this->setError("Called $command without being connected"); - return false; - } - //Reject line breaks in all commands - if (strpos($commandstring, "\n") !== false or strpos($commandstring, "\r") !== false) { - $this->setError("Command '$command' contained line breaks"); - return false; - } - $this->client_send($commandstring . self::CRLF); - - $this->last_reply = $this->get_lines(); - // Fetch SMTP code and possible error code explanation - $matches = array(); - if (preg_match("/^([0-9]{3})[ -](?:([0-9]\\.[0-9]\\.[0-9]) )?/", $this->last_reply, $matches)) { - $code = $matches[1]; - $code_ex = (count($matches) > 2 ? $matches[2] : null); - // Cut off error code from each response line - $detail = preg_replace( - "/{$code}[ -]".($code_ex ? str_replace('.', '\\.', $code_ex).' ' : '')."/m", - '', - $this->last_reply - ); - } else { - // Fall back to simple parsing if regex fails - $code = substr($this->last_reply, 0, 3); - $code_ex = null; - $detail = substr($this->last_reply, 4); - } - - $this->edebug('SERVER -> CLIENT: ' . $this->last_reply, self::DEBUG_SERVER); - - if (!in_array($code, (array)$expect)) { - $this->setError( - "$command command failed", - $detail, - $code, - $code_ex - ); - $this->edebug( - 'SMTP ERROR: ' . $this->error['error'] . ': ' . $this->last_reply, - self::DEBUG_CLIENT - ); - return false; - } - - $this->setError(''); - return true; - } - - /** - * Send an SMTP SAML command. - * Starts a mail transaction from the email address specified in $from. - * Returns true if successful or false otherwise. If True - * the mail transaction is started and then one or more recipient - * commands may be called followed by a data command. This command - * will send the message to the users terminal if they are logged - * in and send them an email. - * Implements rfc 821: SAML FROM: - * @param string $from The address the message is from - * @access public - * @return boolean - */ - public function sendAndMail($from) - { - return $this->sendCommand('SAML', "SAML FROM:$from", 250); - } - - /** - * Send an SMTP VRFY command. - * @param string $name The name to verify - * @access public - * @return boolean - */ - public function verify($name) - { - return $this->sendCommand('VRFY', "VRFY $name", array(250, 251)); - } - - /** - * Send an SMTP NOOP command. - * Used to keep keep-alives alive, doesn't actually do anything - * @access public - * @return boolean - */ - public function noop() - { - return $this->sendCommand('NOOP', 'NOOP', 250); - } - - /** - * Send an SMTP TURN command. - * This is an optional command for SMTP that this class does not support. - * This method is here to make the RFC821 Definition complete for this class - * and _may_ be implemented in future - * Implements from rfc 821: TURN - * @access public - * @return boolean - */ - public function turn() - { - $this->setError('The SMTP TURN command is not implemented'); - $this->edebug('SMTP NOTICE: ' . $this->error['error'], self::DEBUG_CLIENT); - return false; - } - - /** - * Send raw data to the server. - * @param string $data The data to send - * @access public - * @return integer|boolean The number of bytes sent to the server or false on error - */ - public function client_send($data) - { - $this->edebug("CLIENT -> SERVER: $data", self::DEBUG_CLIENT); - return fwrite($this->smtp_conn, $data); - } - - /** - * Get the latest error. - * @access public - * @return array - */ - public function getError() - { - return $this->error; - } - - /** - * Get SMTP extensions available on the server - * @access public - * @return array|null - */ - public function getServerExtList() - { - return $this->server_caps; - } - - /** - * A multipurpose method - * The method works in three ways, dependent on argument value and current state - * 1. HELO/EHLO was not sent - returns null and set up $this->error - * 2. HELO was sent - * $name = 'HELO': returns server name - * $name = 'EHLO': returns boolean false - * $name = any string: returns null and set up $this->error - * 3. EHLO was sent - * $name = 'HELO'|'EHLO': returns server name - * $name = any string: if extension $name exists, returns boolean True - * or its options. Otherwise returns boolean False - * In other words, one can use this method to detect 3 conditions: - * - null returned: handshake was not or we don't know about ext (refer to $this->error) - * - false returned: the requested feature exactly not exists - * - positive value returned: the requested feature exists - * @param string $name Name of SMTP extension or 'HELO'|'EHLO' - * @return mixed - */ - public function getServerExt($name) - { - if (!$this->server_caps) { - $this->setError('No HELO/EHLO was sent'); - return null; - } - - // the tight logic knot ;) - if (!array_key_exists($name, $this->server_caps)) { - if ($name == 'HELO') { - return $this->server_caps['EHLO']; - } - if ($name == 'EHLO' || array_key_exists('EHLO', $this->server_caps)) { - return false; - } - $this->setError('HELO handshake was used. Client knows nothing about server extensions'); - return null; - } - - return $this->server_caps[$name]; - } - - /** - * Get the last reply from the server. - * @access public - * @return string - */ - public function getLastReply() - { - return $this->last_reply; - } - - /** - * Read the SMTP server's response. - * Either before eof or socket timeout occurs on the operation. - * With SMTP we can tell if we have more lines to read if the - * 4th character is '-' symbol. If it is a space then we don't - * need to read anything else. - * @access protected - * @return string - */ - protected function get_lines() - { - // If the connection is bad, give up straight away - if (!is_resource($this->smtp_conn)) { - return ''; - } - $data = ''; - $endtime = 0; - stream_set_timeout($this->smtp_conn, $this->Timeout); - if ($this->Timelimit > 0) { - $endtime = time() + $this->Timelimit; - } - while (is_resource($this->smtp_conn) && !feof($this->smtp_conn)) { - $str = @fgets($this->smtp_conn, 515); - $this->edebug("SMTP -> get_lines(): \$data is \"$data\"", self::DEBUG_LOWLEVEL); - $this->edebug("SMTP -> get_lines(): \$str is \"$str\"", self::DEBUG_LOWLEVEL); - $data .= $str; - // If 4th character is a space, we are done reading, break the loop, micro-optimisation over strlen - if ((isset($str[3]) and $str[3] == ' ')) { - break; - } - // Timed-out? Log and break - $info = stream_get_meta_data($this->smtp_conn); - if ($info['timed_out']) { - $this->edebug( - 'SMTP -> get_lines(): timed-out (' . $this->Timeout . ' sec)', - self::DEBUG_LOWLEVEL - ); - break; - } - // Now check if reads took too long - if ($endtime and time() > $endtime) { - $this->edebug( - 'SMTP -> get_lines(): timelimit reached ('. - $this->Timelimit . ' sec)', - self::DEBUG_LOWLEVEL - ); - break; - } - } - return $data; - } - - /** - * Enable or disable VERP address generation. - * @param boolean $enabled - */ - public function setVerp($enabled = false) - { - $this->do_verp = $enabled; - } - - /** - * Get VERP address generation mode. - * @return boolean - */ - public function getVerp() - { - return $this->do_verp; - } - - /** - * Set error messages and codes. - * @param string $message The error message - * @param string $detail Further detail on the error - * @param string $smtp_code An associated SMTP error code - * @param string $smtp_code_ex Extended SMTP code - */ - protected function setError($message, $detail = '', $smtp_code = '', $smtp_code_ex = '') - { - $this->error = array( - 'error' => $message, - 'detail' => $detail, - 'smtp_code' => $smtp_code, - 'smtp_code_ex' => $smtp_code_ex - ); - } - - /** - * Set debug output method. - * @param string|callable $method The name of the mechanism to use for debugging output, or a callable to handle it. - */ - public function setDebugOutput($method = 'echo') - { - $this->Debugoutput = $method; - } - - /** - * Get debug output method. - * @return string - */ - public function getDebugOutput() - { - return $this->Debugoutput; - } - - /** - * Set debug output level. - * @param integer $level - */ - public function setDebugLevel($level = 0) - { - $this->do_debug = $level; - } - - /** - * Get debug output level. - * @return integer - */ - public function getDebugLevel() - { - return $this->do_debug; - } - - /** - * Set SMTP timeout. - * @param integer $timeout - */ - public function setTimeout($timeout = 0) - { - $this->Timeout = $timeout; - } - - /** - * Get SMTP timeout. - * @return integer - */ - public function getTimeout() - { - return $this->Timeout; - } - - /** - * Reports an error number and string. - * @param integer $errno The error number returned by PHP. - * @param string $errmsg The error message returned by PHP. - */ - protected function errorHandler($errno, $errmsg) - { - $notice = 'Connection: Failed to connect to server.'; - $this->setError( - $notice, - $errno, - $errmsg - ); - $this->edebug( - $notice . ' Error number ' . $errno . '. "Error notice: ' . $errmsg, - self::DEBUG_CONNECTION - ); - } - - /** - * Will return the ID of the last smtp transaction based on a list of patterns provided - * in SMTP::$smtp_transaction_id_patterns. - * If no reply has been received yet, it will return null. - * If no pattern has been matched, it will return false. - * @return bool|null|string - */ - public function getLastTransactionID() - { - $reply = $this->getLastReply(); - - if (empty($reply)) { - return null; - } - - foreach($this->smtp_transaction_id_patterns as $smtp_transaction_id_pattern) { - if(preg_match($smtp_transaction_id_pattern, $reply, $matches)) { - return $matches[1]; - } - } - - return false; - } -} diff --git a/lib/pure_php_radius/radius.class.php b/lib/pure_php_radius/radius.class.php deleted file mode 100644 index 4feb33fcd7..0000000000 --- a/lib/pure_php_radius/radius.class.php +++ /dev/null @@ -1,840 +0,0 @@ -. - * - * - * @author: SysCo/al - * @since CreationDate: 2008-01-04 - * @copyright (c) 2008 by SysCo systemes de communication sa - * @version $LastChangedRevision: 1.2.2 $ - * @version $LastChangedDate: 2009-01-05 $ - * @version $LastChangedBy: SysCo/al $ - * @link $HeadURL: radius.class.php $ - * @link http://developer.sysco.ch/php/ - * @link developer@sysco.ch - * Language: PHP 4.0.7 or higher - * - * - * Usage - * - * require_once('radius.class.php'); - * $radius = new Radius($ip_radius_server = 'radius_server_ip_address', $shared_secret = 'radius_shared_secret'[, $radius_suffix = 'optional_radius_suffix'[, $udp_timeout = udp_timeout_in_seconds[, $authentication_port = 1812]]]); - * $result = $radius->Access_Request($username = 'username', $password = 'password'[, $udp_timeout = udp_timeout_in_seconds]); - * - * - * Examples - * - * Example 1 - * SetNasIpAddress('1.2.3.4'); // Needed for some devices, and not auto_detected if PHP not runned through a web server - * if ($radius->AccessRequest('user', 'pass')) - * { - * echo "Authentication accepted."; - * } - * else - * { - * echo "Authentication rejected."; - * } - * ?> - * - * Example 2 - * SetNasPort(0); - * $radius->SetNasIpAddress('1.2.3.4'); // Needed for some devices, and not auto_detected if PHP not runned through a web server - * if ($radius->AccessRequest('user', 'pass')) - * { - * echo "Authentication accepted."; - * echo "
        "; - * } - * else - * { - * echo "Authentication rejected."; - * echo "
        "; - * } - * echo $radius->GetReadableReceivedAttributes(); - * ?> - * - * - * External file needed - * - * none. - * - * - * External file created - * - * none. - * - * - * Special issues - * - * - Sockets support must be enabled. - * * In Linux and *nix environments, the extension is enabled at - * compile time using the --enable-sockets configure option - * * In Windows, PHP Sockets can be activated by un-commenting - * extension=php_sockets.dll in php.ini - * - * - * Other related ressources - * - * FreeRADIUS, a free Radius server implementation for Linux and *nix environments: - * http://www.freeradius.org/ - * - * WinRadius, Windows Radius server (free for 5 users): - * http://www.itconsult2000.com/en/product/WinRadius.zip - * - * Radl, a free Radius server for Windows: - * http://www.loriotpro.com/Products/RadiusServer/FreeRadiusServer_EN.php - * - * DOS command line Radius client: - * http://www.itconsult2000.com/en/product/WinRadiusClient.zip - * - * - * Users feedbacks and comments - * - * 2008-07-02 Pim Koeman/Parantion - * - * When using a radius connection behind a linux iptables firewall - * allow port 1812 and 1813 with udp protocol - * - * IPTABLES EXAMPLE (command line): - * iptables -A AlwaysACCEPT -p udp --dport 1812 -j ACCEPT - * iptables -A AlwaysACCEPT -p udp --dport 1813 -j ACCEPT - * - * or put the lines in /etc/sysconfig/iptables (red-hat type systems (fedora, centos, rhel etc.) - * -A AlwaysACCEPT -p udp --dport 1812 -j ACCEPT - * -A AlwaysACCEPT -p udp --dport 1813 -j ACCEPT - * - * - * Change Log - * - * 2009-01-05 1.2.2 SysCo/al Added Robert Svensson feedback, Mideye RADIUS server is supported - * 2008-11-11 1.2.1 SysCo/al Added Carlo Ferrari resolution in examples (add NAS IP Address for a VASCO Middleware server) - * 2008-07-07 1.2 SysCo/al Added Pim Koeman (Parantion) contribution - * - comments concerning using radius behind a linux iptables firewall - * Added Jon Bright (tick Trading Software AG) contribution - * - false octal encoding with 0xx indexes (indexes are now rewritten in xx only) - * - challenge/response support for the RSA SecurID New-PIN mode - * Added GetRadiusPacketInfo() method - * Added GetAttributesInfo() method - * Added DecodeVendorSpecificContent() (to answer Raul Carvalho's question) - * Added Decoded Vendor Specific Content in debug messages - * 2008-02-04 1.1 SysCo/al Typo error for the udp_timeout parameter (line 256 in the version 1.0) - * 2008-01-07 1.0 SysCo/al Initial release - * - *********************************************************************/ - - -/********************************************************************* - * - * Radius - * Pure PHP radius class - * - * Creation 2008-01-04 - * Update 2009-01-05 - * @package radius - * @version v.1.2.2 - * @author SysCo/al - * - *********************************************************************/ -class Radius -{ - var $_ip_radius_server; // Radius server IP address - var $_shared_secret; // Shared secret with the radius server - var $_radius_suffix; // Radius suffix (default is ''); - var $_udp_timeout; // Timeout of the UDP connection in seconds (default value is 5) - var $_authentication_port; // Authentication port (default value is 1812) - var $_accounting_port; // Accouting port (default value is 1813) - var $_nas_ip_address; // NAS IP address - var $_nas_port; // NAS port - var $_encrypted_password; // Encrypted password, as described in the RFC 2865 - var $_user_ip_address; // Remote IP address of the user - var $_request_authenticator; // Request-Authenticator, 16 octets random number - var $_response_authenticator; // Request-Authenticator, 16 octets random number - var $_username; // Username to sent to the Radius server - var $_password; // Password to sent to the Radius server (clear password, must be encrypted) - var $_identifier_to_send; // Identifier field for the packet to be sent - var $_identifier_received; // Identifier field for the received packet - var $_radius_packet_to_send; // Radius packet code (1=Access-Request, 2=Access-Accept, 3=Access-Reject, 4=Accounting-Request, 5=Accounting-Response, 11=Access-Challenge, 12=Status-Server (experimental), 13=Status-Client (experimental), 255=Reserved - var $_radius_packet_received; // Radius packet code (1=Access-Request, 2=Access-Accept, 3=Access-Reject, 4=Accounting-Request, 5=Accounting-Response, 11=Access-Challenge, 12=Status-Server (experimental), 13=Status-Client (experimental), 255=Reserved - var $_attributes_to_send; // Radius attributes to send - var $_attributes_received; // Radius attributes received - var $_socket_to_server; // Socket connection - var $_debug_mode; // Debug mode flag - var $_attributes_info; // Attributes info array - var $_radius_packet_info; // Radius packet codes info array - var $_last_error_code; // Last error code - var $_last_error_message; // Last error message - - - /********************************************************************* - * - * Name: Radius - * short description: Radius class constructor - * - * Creation 2008-01-04 - * Update 2009-01-05 - * @version v.1.2.2 - * @author SysCo/al - * @param string ip address of the radius server - * @param string shared secret with the radius server - * @param string radius domain name suffix (default is empty) - * @param integer UDP timeout (default is 5) - * @param integer authentication port - * @param integer accounting port - * @return NULL - *********************************************************************/ - public function __construct($ip_radius_server = '127.0.0.1', $shared_secret = '', $radius_suffix = '', $udp_timeout = 5, $authentication_port = 1812, $accounting_port = 1813) - { - $this->_radius_packet_info[1] = 'Access-Request'; - $this->_radius_packet_info[2] = 'Access-Accept'; - $this->_radius_packet_info[3] = 'Access-Reject'; - $this->_radius_packet_info[4] = 'Accounting-Request'; - $this->_radius_packet_info[5] = 'Accounting-Response'; - $this->_radius_packet_info[11] = 'Access-Challenge'; - $this->_radius_packet_info[12] = 'Status-Server (experimental)'; - $this->_radius_packet_info[13] = 'Status-Client (experimental)'; - $this->_radius_packet_info[255] = 'Reserved'; - - $this->_attributes_info[1] = array('User-Name', 'S'); - $this->_attributes_info[2] = array('User-Password', 'S'); - $this->_attributes_info[3] = array('CHAP-Password', 'S'); // Type (1) / Length (1) / CHAP Ident (1) / String - $this->_attributes_info[4] = array('NAS-IP-Address', 'A'); - $this->_attributes_info[5] = array('NAS-Port', 'I'); - $this->_attributes_info[6] = array('Service-Type', 'I'); - $this->_attributes_info[7] = array('Framed-Protocol', 'I'); - $this->_attributes_info[8] = array('Framed-IP-Address', 'A'); - $this->_attributes_info[9] = array('Framed-IP-Netmask', 'A'); - $this->_attributes_info[10] = array('Framed-Routing', 'I'); - $this->_attributes_info[11] = array('Filter-Id', 'T'); - $this->_attributes_info[12] = array('Framed-MTU', 'I'); - $this->_attributes_info[13] = array('Framed-Compression', 'I'); - $this->_attributes_info[14] = array( 'Login-IP-Host', 'A'); - $this->_attributes_info[15] = array('Login-service', 'I'); - $this->_attributes_info[16] = array('Login-TCP-Port', 'I'); - $this->_attributes_info[17] = array('(unassigned)', ''); - $this->_attributes_info[18] = array('Reply-Message', 'T'); - $this->_attributes_info[19] = array('Callback-Number', 'S'); - $this->_attributes_info[20] = array('Callback-Id', 'S'); - $this->_attributes_info[21] = array('(unassigned)', ''); - $this->_attributes_info[22] = array('Framed-Route', 'T'); - $this->_attributes_info[23] = array('Framed-IPX-Network', 'I'); - $this->_attributes_info[24] = array('State', 'S'); - $this->_attributes_info[25] = array('Class', 'S'); - $this->_attributes_info[26] = array('Vendor-Specific', 'S'); // Type (1) / Length (1) / Vendor-Id (4) / Vendor type (1) / Vendor length (1) / Attribute-Specific... - $this->_attributes_info[27] = array('Session-Timeout', 'I'); - $this->_attributes_info[28] = array('Idle-Timeout', 'I'); - $this->_attributes_info[29] = array('Termination-Action', 'I'); - $this->_attributes_info[30] = array('Called-Station-Id', 'S'); - $this->_attributes_info[31] = array('Calling-Station-Id', 'S'); - $this->_attributes_info[32] = array('NAS-Identifier', 'S'); - $this->_attributes_info[33] = array('Proxy-State', 'S'); - $this->_attributes_info[34] = array('Login-LAT-Service', 'S'); - $this->_attributes_info[35] = array('Login-LAT-Node', 'S'); - $this->_attributes_info[36] = array('Login-LAT-Group', 'S'); - $this->_attributes_info[37] = array('Framed-AppleTalk-Link', 'I'); - $this->_attributes_info[38] = array('Framed-AppleTalk-Network', 'I'); - $this->_attributes_info[39] = array('Framed-AppleTalk-Zone', 'S'); - $this->_attributes_info[60] = array('CHAP-Challenge', 'S'); - $this->_attributes_info[61] = array('NAS-Port-Type', 'I'); - $this->_attributes_info[62] = array('Port-Limit', 'I'); - $this->_attributes_info[63] = array('Login-LAT-Port', 'S'); - $this->_attributes_info[76] = array('Prompt', 'I'); - - $this->_identifier_to_send = 0; - $this->_user_ip_address = (isset($_SERVER['REMOTE_ADDR'])?$_SERVER['REMOTE_ADDR']:'0.0.0.0'); - - $this->GenerateRequestAuthenticator(); - $this->SetIpRadiusServer($ip_radius_server); - $this->SetSharedSecret($shared_secret); - $this->SetAuthenticationPort($authentication_port); - $this->SetAccountingPort($accounting_port); - $this->SetRadiusSuffix($radius_suffix); - $this->SetUdpTimeout($udp_timeout); - $this->SetUsername(); - $this->SetPassword(); - $this->SetNasIpAddress(); - $this->SetNasPort(); - - $this->ClearLastError(); - $this->ClearDataToSend(); - $this->ClearDataReceived(); - } - - - function GetNextIdentifier() - { - $this->_identifier_to_send = (($this->_identifier_to_send + 1) % 256); - return $this->_identifier_to_send; - } - - - function GenerateRequestAuthenticator() - { - $this->_request_authenticator = ''; - for ($ra_loop = 0; $ra_loop <= 15; $ra_loop++) - { - $this->_request_authenticator .= chr(rand(1, 255)); - } - } - - - function GetRequestAuthenticator() - { - return $this->_request_authenticator; - } - - - function GetLastError() - { - if (0 < $this->_last_error_code) - { - return $this->_last_error_message.' ('.$this->_last_error_code.')'; - } - else - { - return ''; - } - } - - - function ClearDataToSend() - { - $this->_radius_packet_to_send = 0; - $this->_attributes_to_send = NULL; - } - - - function ClearDataReceived() - { - $this->_radius_packet_received = 0; - $this->_attributes_received = NULL; - } - - - function SetPacketCodeToSend($packet_code) - { - $this->_radius_packet_to_send = $packet_code; - } - - - function SetDebugMode($debug_mode) - { - $this->_debug_mode = (TRUE === $debug_mode); - } - - - function SetIpRadiusServer($ip_radius_server) - { - $this->_ip_radius_server = gethostbyname($ip_radius_server); - } - - - function SetSharedSecret($shared_secret) - { - $this->_shared_secret = $shared_secret; - } - - - function SetRadiusSuffix($radius_suffix) - { - $this->_radius_suffix = $radius_suffix; - } - - - function SetUsername($username = '') - { - $temp_username = $username; - if (false === strpos($temp_username, '@')) - { - $temp_username .= $this->_radius_suffix; - } - - $this->_username = $temp_username; - $this->SetAttribute(1, $this->_username); - } - - - function SetPassword($password = '') - { - $this->_password = $password; - $encrypted_password = ''; - $padded_password = $password; - - if (0 != (strlen($password)%16)) - { - $padded_password .= str_repeat(chr(0),(16-strlen($password)%16)); - } - - $previous_result = $this->_request_authenticator; - - for ($full_loop = 0; $full_loop < (strlen($padded_password)/16); $full_loop++) - { - $xor_value = md5($this->_shared_secret.$previous_result); - - $previous_result = ''; - for ($xor_loop = 0; $xor_loop <= 15; $xor_loop++) - { - $value1 = ord(substr($padded_password, ($full_loop * 16) + $xor_loop, 1)); - $value2 = hexdec(substr($xor_value, 2*$xor_loop, 2)); - $xor_result = $value1 ^ $value2; - $previous_result .= chr($xor_result); - } - $encrypted_password .= $previous_result; - } - - $this->_encrypted_password = $encrypted_password; - $this->SetAttribute(2, $this->_encrypted_password); - } - - - function SetNasIPAddress($nas_ip_address = '') - { - if (0 < strlen($nas_ip_address)) - { - $this->_nas_ip_address = gethostbyname($nas_ip_address); - } - else - { - $this->_nas_ip_address = gethostbyname(isset($_SERVER['SERVER_ADDR'])?$_SERVER['SERVER_ADDR']:'0.0.0.0'); - } - $this->SetAttribute(4, $this->_nas_ip_address); - } - - - function SetNasPort($nas_port = 0) - { - $this->_nas_port = intval($nas_port); - $this->SetAttribute(5, $this->_nas_port); - } - - - function SetUdpTimeout($udp_timeout = 5) - { - if (intval($udp_timeout) > 0) - { - $this->_udp_timeout = intval($udp_timeout); - } - } - - - function ClearLastError() - { - $this->_last_error_code = 0; - $this->_last_error_message = ''; - } - - - function SetAuthenticationPort($authentication_port) - { - if ((intval($authentication_port) > 0) && (intval($authentication_port) < 65536)) - { - $this->_authentication_port = intval($authentication_port); - } - } - - - function SetAccountingPort($accounting_port) - { - if ((intval($accounting_port) > 0) && (intval($accounting_port) < 65536)) - { - $this->_accounting_port = intval($accounting_port); - } - } - - - function GetReceivedPacket() - { - return $this->_radius_packet_received; - } - - - function GetReceivedAttributes() - { - return $this->_attributes_received; - } - - - function GetReadableReceivedAttributes() - { - $readable_attributes = ''; - if (isset($this->_attributes_received)) - { - foreach($this->_attributes_received as $one_received_attribute) - { - $attributes_info = $this->GetAttributesInfo($one_received_attribute[0]); - $readable_attributes .= $attributes_info[0].": "; - if (26 == $one_received_attribute[0]) - { - $vendor_array = $this->DecodeVendorSpecificContent($one_received_attribute[1]); - foreach($vendor_array as $vendor_one) - { - $readable_attributes .= 'Vendor-Id: '.$vendor_one[0].", Vendor-type: ".$vendor_one[1].", Attribute-specific: ".$vendor_one[2]; - } - } - else - { - $readable_attributes .= $one_received_attribute[1]; - } - $readable_attributes .= "
        \n"; - } - } - return $readable_attributes; - } - - - function GetAttribute($attribute_type) - { - $attribute_value = NULL; - foreach($this->_attributes_received as $one_received_attribute) - { - if (intval($attribute_type) == $one_received_attribute[0]) - { - $attribute_value = $one_received_attribute[1]; - break; - } - } - return $attribute_value; - } - - - function GetRadiusPacketInfo($info_index) - { - if (isset($this->_radius_packet_info[intval($info_index)])) - { - return $this->_radius_packet_info[intval($info_index)]; - } - else - { - return ''; - } - } - - - function GetAttributesInfo($info_index) - { - if (isset($this->_attributes_info[intval($info_index)])) - { - return $this->_attributes_info[intval($info_index)]; - } - else - { - return array('',''); - } - } - - - function DebugInfo($debug_info) - { - if ($this->_debug_mode) - { - echo date('Y-m-d H:i:s').' DEBUG: '; - echo $debug_info; - echo '
        '; - flush(); - } - } - - - function SetAttribute($type, $value) - { - $attribute_index = -1; - for ($attributes_loop = 0; $attributes_loop < count($this->_attributes_to_send); $attributes_loop++) - { - if ($type == ord(substr($this->_attributes_to_send[$attributes_loop], 0, 1))) - { - $attribute_index = $attributes_loop; - break; - } - } - - $temp_attribute = NULL; - - if (isset($this->_attributes_info[$type])) - { - switch ($this->_attributes_info[$type][1]) - { - case 'T': // Text, 1-253 octets containing UTF-8 encoded ISO 10646 characters (RFC 2279). - $temp_attribute = chr($type).chr(2+strlen($value)).$value; - break; - case 'S': // String, 1-253 octets containing binary data (values 0 through 255 decimal, inclusive). - $temp_attribute = chr($type).chr(2+strlen($value)).$value; - break; - case 'A': // Address, 32 bit value, most significant octet first. - $ip_array = explode(".", $value); - $temp_attribute = chr($type).chr(6).chr($ip_array[0]).chr($ip_array[1]).chr($ip_array[2]).chr($ip_array[3]); - break; - case 'I': // Integer, 32 bit unsigned value, most significant octet first. - $temp_attribute = chr($type).chr(6).chr(($value/(256*256*256))%256).chr(($value/(256*256))%256).chr(($value/(256))%256).chr($value%256); - break; - case 'D': // Time, 32 bit unsigned value, most significant octet first -- seconds since 00:00:00 UTC, January 1, 1970. (not used in this RFC) - $temp_attribute = NULL; - break; - default: - $temp_attribute = NULL; - } - } - - if ($attribute_index > -1) - { - $this->_attributes_to_send[$attribute_index] = $temp_attribute; - $additional_debug = 'Modified'; - } - else - { - $this->_attributes_to_send[] = $temp_attribute; - $additional_debug = 'Added'; - } - $attribute_info = $this->GetAttributesInfo($type); - $this->DebugInfo($additional_debug.' Attribute '.$type.' ('.$attribute_info[0].'), format '.$attribute_info[1].', value '.$value.''); - } - - - function DecodeAttribute($attribute_raw_value, $attribute_format) - { - $attribute_value = NULL; - - if (isset($this->_attributes_info[$attribute_format])) - { - switch ($this->_attributes_info[$attribute_format][1]) - { - case 'T': // Text, 1-253 octets containing UTF-8 encoded ISO 10646 characters (RFC 2279). - $attribute_value = $attribute_raw_value; - break; - case 'S': // String, 1-253 octets containing binary data (values 0 through 255 decimal, inclusive). - $attribute_value = $attribute_raw_value; - break; - case 'A': // Address, 32 bit value, most significant octet first. - $attribute_value = ord(substr($attribute_raw_value, 0, 1)).'.'.ord(substr($attribute_raw_value, 1, 1)).'.'.ord(substr($attribute_raw_value, 2, 1)).'.'.ord(substr($attribute_raw_value, 3, 1)); - break; - case 'I': // Integer, 32 bit unsigned value, most significant octet first. - $attribute_value = (ord(substr($attribute_raw_value, 0, 1))*256*256*256)+(ord(substr($attribute_raw_value, 1, 1))*256*256)+(ord(substr($attribute_raw_value, 2, 1))*256)+ord(substr($attribute_raw_value, 3, 1)); - break; - case 'D': // Time, 32 bit unsigned value, most significant octet first -- seconds since 00:00:00 UTC, January 1, 1970. (not used in this RFC) - $attribute_value = NULL; - break; - default: - $attribute_value = NULL; - } - } - return $attribute_value; - } - - - /********************************************************************* - * Array returned: array(array(Vendor-Id1, Vendor type1, Attribute-Specific1), ..., array(Vendor-IdN, Vendor typeN, Attribute-SpecificN) - *********************************************************************/ - function DecodeVendorSpecificContent($vendor_specific_raw_value) - { - $result = array(); - $offset_in_raw = 0; - $vendor_id = (ord(substr($vendor_specific_raw_value, 0, 1))*256*256*256)+(ord(substr($vendor_specific_raw_value, 1, 1))*256*256)+(ord(substr($vendor_specific_raw_value, 2, 1))*256)+ord(substr($vendor_specific_raw_value, 3, 1)); - $offset_in_raw += 4; - while ($offset_in_raw < strlen($vendor_specific_raw_value)) - { - $vendor_type = (ord(substr($vendor_specific_raw_value, 0+$offset_in_raw, 1))); - $vendor_length = (ord(substr($vendor_specific_raw_value, 1+$offset_in_raw, 1))); - $attribute_specific = substr($vendor_specific_raw_value, 2+$offset_in_raw, $vendor_length); - $result[] = array($vendor_id, $vendor_type, $attribute_specific); - $offset_in_raw += ($vendor_length); - } - - return $result; - } - - - /* - * Function : AccessRequest - * - * Return TRUE if Access-Request is accepted, FALSE otherwise - */ - function AccessRequest($username = '', $password = '', $udp_timeout = 0, $state = NULL) - { - $this->ClearDataReceived(); - $this->ClearLastError(); - - $this->SetPacketCodeToSend(1); // Access-Request - - if (0 < strlen($username)) - { - $this->SetUsername($username); - } - - if (0 < strlen($password)) - { - $this->SetPassword($password); - } - - if ($state!==NULL) - { - $this->SetAttribute(24, $state); - } - else - { - $this->SetAttribute(6, 1); // 1=Login - } - - if (intval($udp_timeout) > 0) - { - $this->SetUdpTimeout($udp_timeout); - } - - $attributes_content = ''; - for ($attributes_loop = 0; $attributes_loop < count($this->_attributes_to_send); $attributes_loop++) - { - $attributes_content .= $this->_attributes_to_send[$attributes_loop]; - } - - $packet_length = 4; // Radius packet code + Identifier + Length high + Length low - $packet_length += strlen($this->_request_authenticator); // Request-Authenticator - $packet_length += strlen($attributes_content); // Attributes - - $packet_data = chr($this->_radius_packet_to_send); - $packet_data .= chr($this->GetNextIdentifier()); - $packet_data .= chr(intval($packet_length/256)); - $packet_data .= chr(intval($packet_length%256)); - $packet_data .= $this->_request_authenticator; - $packet_data .= $attributes_content; - - $_socket_to_server = socket_create(AF_INET, SOCK_DGRAM, 17); // UDP packet = 17 - - if ($_socket_to_server === FALSE) - { - $this->_last_error_code = socket_last_error(); - $this->_last_error_message = socket_strerror($this->_last_error_code); - } - elseif (FALSE === socket_connect($_socket_to_server, $this->_ip_radius_server, $this->_authentication_port)) - { - $this->_last_error_code = socket_last_error(); - $this->_last_error_message = socket_strerror($this->_last_error_code); - } - elseif (FALSE === socket_write($_socket_to_server, $packet_data, $packet_length)) - { - $this->_last_error_code = socket_last_error(); - $this->_last_error_message = socket_strerror($this->_last_error_code); - } - else - { - $this->DebugInfo('Packet type '.$this->_radius_packet_to_send.' ('.$this->GetRadiusPacketInfo($this->_radius_packet_to_send).')'.' sent'); - if ($this->_debug_mode) - { - $readable_attributes = ''; - foreach($this->_attributes_to_send as $one_attribute_to_send) - { - $attribute_info = $this->GetAttributesInfo(ord(substr($one_attribute_to_send,0,1))); - $this->DebugInfo('Attribute '.ord(substr($one_attribute_to_send,0,1)).' ('.$attribute_info[0].'), length '.(ord(substr($one_attribute_to_send,1,1))-2).', format '.$attribute_info[1].', value '.$this->DecodeAttribute(substr($one_attribute_to_send,2), ord(substr($one_attribute_to_send,0,1))).''); - } - } - $read_socket_array = array($_socket_to_server); - $write_socket_array = NULL; - $except_socket_array = NULL; - - $received_packet = chr(0); - - if (!(FALSE === socket_select($read_socket_array, $write_socket_array, $except_socket_array, $this->_udp_timeout))) - { - if (in_array($_socket_to_server, $read_socket_array)) - { - if (FALSE === ($received_packet = @socket_read($_socket_to_server, 1024))) // @ used, than no error is displayed if the connection is closed by the remote host - { - $received_packet = chr(0); - $this->_last_error_code = socket_last_error(); - $this->_last_error_message = socket_strerror($this->_last_error_code); - } - else - { - socket_close($_socket_to_server); - } - } - } - else - { - socket_close($_socket_to_server); - } - } - - $this->_radius_packet_received = intval(ord(substr($received_packet, 0, 1))); - - $this->DebugInfo('Packet type '.$this->_radius_packet_received.' ('.$this->GetRadiusPacketInfo($this->_radius_packet_received).')'.' received'); - - if ($this->_radius_packet_received > 0) - { - $this->_identifier_received = intval(ord(substr($received_packet, 1, 1))); - $packet_length = (intval(ord(substr($received_packet, 2, 1))) * 256) + (intval(ord(substr($received_packet, 3, 1)))); - $this->_response_authenticator = substr($received_packet, 4, 16); - $attributes_content = substr($received_packet, 20, ($packet_length - 4 - 16)); - while (strlen($attributes_content) > 2) - { - $attribute_type = intval(ord(substr($attributes_content,0,1))); - $attribute_length = intval(ord(substr($attributes_content,1,1))); - $attribute_raw_value = substr($attributes_content,2,$attribute_length-2); - $attributes_content = substr($attributes_content, $attribute_length); - - $attribute_value = $this->DecodeAttribute($attribute_raw_value, $attribute_type); - - $attribute_info = $this->GetAttributesInfo($attribute_type); - if (26 == $attribute_type) - { - $vendor_array = $this->DecodeVendorSpecificContent($attribute_value); - foreach($vendor_array as $vendor_one) - { - $this->DebugInfo('Attribute '.$attribute_type.' ('.$attribute_info[0].'), length '.($attribute_length-2).', format '.$attribute_info[1].', Vendor-Id: '.$vendor_one[0].", Vendor-type: ".$vendor_one[1].", Attribute-specific: ".$vendor_one[2]); - } - } - else - { - $this->DebugInfo('Attribute '.$attribute_type.' ('.$attribute_info[0].'), length '.($attribute_length-2).', format '.$attribute_info[1].', value '.$attribute_value.''); - } - - $this->_attributes_received[] = array($attribute_type, $attribute_value); - } - } - - return (2 == ($this->_radius_packet_received)); - } -} - -?> diff --git a/lib/yaml/composer.json b/lib/yaml/composer.json deleted file mode 100644 index 6eb407259a..0000000000 --- a/lib/yaml/composer.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "require": { - "symfony/yaml": "2.8.15" - } -} diff --git a/lib/yaml/composer.lock b/lib/yaml/composer.lock deleted file mode 100644 index f42fc66568..0000000000 --- a/lib/yaml/composer.lock +++ /dev/null @@ -1,68 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", - "This file is @generated automatically" - ], - "hash": "f39cd3712ad7d20c5111a0ea2c079546", - "content-hash": "26f418ca06a9e08a53ce887599d7a496", - "packages": [ - { - "name": "symfony/yaml", - "version": "v2.8.15", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "befb26a3713c97af90d25dd12e75621ef14d91ff" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/befb26a3713c97af90d25dd12e75621ef14d91ff", - "reference": "befb26a3713c97af90d25dd12e75621ef14d91ff", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Yaml Component", - "homepage": "https://symfony.com", - "time": "2016-11-14 16:15:57" - } - ], - "packages-dev": [], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": [], - "platform-dev": [] -} diff --git a/lib/yaml/vendor/autoload.php b/lib/yaml/vendor/autoload.php deleted file mode 100644 index 8ba2b9bfe1..0000000000 --- a/lib/yaml/vendor/autoload.php +++ /dev/null @@ -1,7 +0,0 @@ - - * Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Composer\Autoload; - -/** - * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. - * - * $loader = new \Composer\Autoload\ClassLoader(); - * - * // register classes with namespaces - * $loader->add('Symfony\Component', __DIR__.'/component'); - * $loader->add('Symfony', __DIR__.'/framework'); - * - * // activate the autoloader - * $loader->register(); - * - * // to enable searching the include path (eg. for PEAR packages) - * $loader->setUseIncludePath(true); - * - * In this example, if you try to use a class in the Symfony\Component - * namespace or one of its children (Symfony\Component\Console for instance), - * the autoloader will first look for the class under the component/ - * directory, and it will then fallback to the framework/ directory if not - * found before giving up. - * - * This class is loosely based on the Symfony UniversalClassLoader. - * - * @author Fabien Potencier - * @author Jordi Boggiano - * @see http://www.php-fig.org/psr/psr-0/ - * @see http://www.php-fig.org/psr/psr-4/ - */ -class ClassLoader -{ - // PSR-4 - private $prefixLengthsPsr4 = array(); - private $prefixDirsPsr4 = array(); - private $fallbackDirsPsr4 = array(); - - // PSR-0 - private $prefixesPsr0 = array(); - private $fallbackDirsPsr0 = array(); - - private $useIncludePath = false; - private $classMap = array(); - - private $classMapAuthoritative = false; - - public function getPrefixes() - { - if (!empty($this->prefixesPsr0)) { - return call_user_func_array('array_merge', $this->prefixesPsr0); - } - - return array(); - } - - public function getPrefixesPsr4() - { - return $this->prefixDirsPsr4; - } - - public function getFallbackDirs() - { - return $this->fallbackDirsPsr0; - } - - public function getFallbackDirsPsr4() - { - return $this->fallbackDirsPsr4; - } - - public function getClassMap() - { - return $this->classMap; - } - - /** - * @param array $classMap Class to filename map - */ - public function addClassMap(array $classMap) - { - if ($this->classMap) { - $this->classMap = array_merge($this->classMap, $classMap); - } else { - $this->classMap = $classMap; - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, either - * appending or prepending to the ones previously set for this prefix. - * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories - */ - public function add($prefix, $paths, $prepend = false) - { - if (!$prefix) { - if ($prepend) { - $this->fallbackDirsPsr0 = array_merge( - (array) $paths, - $this->fallbackDirsPsr0 - ); - } else { - $this->fallbackDirsPsr0 = array_merge( - $this->fallbackDirsPsr0, - (array) $paths - ); - } - - return; - } - - $first = $prefix[0]; - if (!isset($this->prefixesPsr0[$first][$prefix])) { - $this->prefixesPsr0[$first][$prefix] = (array) $paths; - - return; - } - if ($prepend) { - $this->prefixesPsr0[$first][$prefix] = array_merge( - (array) $paths, - $this->prefixesPsr0[$first][$prefix] - ); - } else { - $this->prefixesPsr0[$first][$prefix] = array_merge( - $this->prefixesPsr0[$first][$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, either - * appending or prepending to the ones previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories - * @param bool $prepend Whether to prepend the directories - * - * @throws \InvalidArgumentException - */ - public function addPsr4($prefix, $paths, $prepend = false) - { - if (!$prefix) { - // Register directories for the root namespace. - if ($prepend) { - $this->fallbackDirsPsr4 = array_merge( - (array) $paths, - $this->fallbackDirsPsr4 - ); - } else { - $this->fallbackDirsPsr4 = array_merge( - $this->fallbackDirsPsr4, - (array) $paths - ); - } - } elseif (!isset($this->prefixDirsPsr4[$prefix])) { - // Register directories for a new namespace. - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } elseif ($prepend) { - // Prepend directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - (array) $paths, - $this->prefixDirsPsr4[$prefix] - ); - } else { - // Append directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - $this->prefixDirsPsr4[$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, - * replacing any others previously set for this prefix. - * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 base directories - */ - public function set($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr0 = (array) $paths; - } else { - $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, - * replacing any others previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories - * - * @throws \InvalidArgumentException - */ - public function setPsr4($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr4 = (array) $paths; - } else { - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } - } - - /** - * Turns on searching the include path for class files. - * - * @param bool $useIncludePath - */ - public function setUseIncludePath($useIncludePath) - { - $this->useIncludePath = $useIncludePath; - } - - /** - * Can be used to check if the autoloader uses the include path to check - * for classes. - * - * @return bool - */ - public function getUseIncludePath() - { - return $this->useIncludePath; - } - - /** - * Turns off searching the prefix and fallback directories for classes - * that have not been registered with the class map. - * - * @param bool $classMapAuthoritative - */ - public function setClassMapAuthoritative($classMapAuthoritative) - { - $this->classMapAuthoritative = $classMapAuthoritative; - } - - /** - * Should class lookup fail if not found in the current class map? - * - * @return bool - */ - public function isClassMapAuthoritative() - { - return $this->classMapAuthoritative; - } - - /** - * Registers this instance as an autoloader. - * - * @param bool $prepend Whether to prepend the autoloader or not - */ - public function register($prepend = false) - { - spl_autoload_register(array($this, 'loadClass'), true, $prepend); - } - - /** - * Unregisters this instance as an autoloader. - */ - public function unregister() - { - spl_autoload_unregister(array($this, 'loadClass')); - } - - /** - * Loads the given class or interface. - * - * @param string $class The name of the class - * @return bool|null True if loaded, null otherwise - */ - public function loadClass($class) - { - if ($file = $this->findFile($class)) { - includeFile($file); - - return true; - } - } - - /** - * Finds the path to the file where the class is defined. - * - * @param string $class The name of the class - * - * @return string|false The path if found, false otherwise - */ - public function findFile($class) - { - // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731 - if ('\\' == $class[0]) { - $class = substr($class, 1); - } - - // class map lookup - if (isset($this->classMap[$class])) { - return $this->classMap[$class]; - } - if ($this->classMapAuthoritative) { - return false; - } - - $file = $this->findFileWithExtension($class, '.php'); - - // Search for Hack files if we are running on HHVM - if ($file === null && defined('HHVM_VERSION')) { - $file = $this->findFileWithExtension($class, '.hh'); - } - - if ($file === null) { - // Remember that this class does not exist. - return $this->classMap[$class] = false; - } - - return $file; - } - - private function findFileWithExtension($class, $ext) - { - // PSR-4 lookup - $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; - - $first = $class[0]; - if (isset($this->prefixLengthsPsr4[$first])) { - foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) { - if (0 === strpos($class, $prefix)) { - foreach ($this->prefixDirsPsr4[$prefix] as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { - return $file; - } - } - } - } - } - - // PSR-4 fallback dirs - foreach ($this->fallbackDirsPsr4 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { - return $file; - } - } - - // PSR-0 lookup - if (false !== $pos = strrpos($class, '\\')) { - // namespaced class name - $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) - . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); - } else { - // PEAR-like class name - $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; - } - - if (isset($this->prefixesPsr0[$first])) { - foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { - if (0 === strpos($class, $prefix)) { - foreach ($dirs as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - } - } - } - - // PSR-0 fallback dirs - foreach ($this->fallbackDirsPsr0 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - - // PSR-0 include paths. - if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { - return $file; - } - } -} - -/** - * Scope isolated include. - * - * Prevents access to $this/self from included files. - */ -function includeFile($file) -{ - include $file; -} diff --git a/lib/yaml/vendor/composer/autoload_classmap.php b/lib/yaml/vendor/composer/autoload_classmap.php deleted file mode 100644 index 7a91153b0d..0000000000 --- a/lib/yaml/vendor/composer/autoload_classmap.php +++ /dev/null @@ -1,9 +0,0 @@ - array($vendorDir . '/symfony/yaml'), -); diff --git a/lib/yaml/vendor/composer/autoload_real.php b/lib/yaml/vendor/composer/autoload_real.php deleted file mode 100644 index 558c16f2b2..0000000000 --- a/lib/yaml/vendor/composer/autoload_real.php +++ /dev/null @@ -1,52 +0,0 @@ -= 50600 && !defined('HHVM_VERSION'); - if ($useStaticLoader) { - require_once __DIR__ . '/autoload_static.php'; - - call_user_func(\Composer\Autoload\ComposerStaticInitbf55e88dc351079d20d9712178c18567::getInitializer($loader)); - } else { - $map = require __DIR__ . '/autoload_namespaces.php'; - foreach ($map as $namespace => $path) { - $loader->set($namespace, $path); - } - - $map = require __DIR__ . '/autoload_psr4.php'; - foreach ($map as $namespace => $path) { - $loader->setPsr4($namespace, $path); - } - - $classMap = require __DIR__ . '/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); - } - } - - $loader->register(true); - - return $loader; - } -} diff --git a/lib/yaml/vendor/composer/autoload_static.php b/lib/yaml/vendor/composer/autoload_static.php deleted file mode 100644 index bde3adf53d..0000000000 --- a/lib/yaml/vendor/composer/autoload_static.php +++ /dev/null @@ -1,31 +0,0 @@ - - array ( - 'Symfony\\Component\\Yaml\\' => 23, - ), - ); - - public static $prefixDirsPsr4 = array ( - 'Symfony\\Component\\Yaml\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/yaml', - ), - ); - - public static function getInitializer(ClassLoader $loader) - { - return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInitbf55e88dc351079d20d9712178c18567::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInitbf55e88dc351079d20d9712178c18567::$prefixDirsPsr4; - - }, null, ClassLoader::class); - } -} diff --git a/lib/yaml/vendor/composer/installed.json b/lib/yaml/vendor/composer/installed.json deleted file mode 100644 index 737a6269cf..0000000000 --- a/lib/yaml/vendor/composer/installed.json +++ /dev/null @@ -1,53 +0,0 @@ -[ - { - "name": "symfony/yaml", - "version": "v2.8.15", - "version_normalized": "2.8.15.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "befb26a3713c97af90d25dd12e75621ef14d91ff" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/befb26a3713c97af90d25dd12e75621ef14d91ff", - "reference": "befb26a3713c97af90d25dd12e75621ef14d91ff", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "time": "2016-11-14 16:15:57", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Yaml Component", - "homepage": "https://symfony.com" - } -] diff --git a/scripts/pre-commit.php b/scripts/pre-commit.php index 1694651ece..27e8626c59 100755 --- a/scripts/pre-commit.php +++ b/scripts/pre-commit.php @@ -7,9 +7,7 @@ $filename = basename(__FILE__); $install_dir = realpath(__DIR__ . '/..'); chdir($install_dir); -require_once $install_dir . '/LibreNMS/ClassLoader.php'; -$classLoader = new LibreNMS\ClassLoader(); -$classLoader->register(); +require $install_dir . '/vendor/autoload.php'; $short_opts = 'lsupch'; $long_opts = array( @@ -113,7 +111,6 @@ function check_lint($passthru = false, $command_only = false) $lint_excludes = array('vendor/'); if (defined('HHVM_VERSION') || version_compare(PHP_VERSION, '5.6', '<')) { $lint_excludes[] = 'lib/influxdb-php/'; - $lint_excludes[] = 'lib/yaml/vendor/composer/autoload_static.php'; } $lint_exclude = build_excludes('--exclude ', $lint_excludes); diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 6b3d9b1180..8af9b2192c 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -33,11 +33,8 @@ $config['install_dir'] = $install_dir; $config['mib_dir'] = $install_dir . '/mibs'; $config['snmpget'] = 'snmpget'; -// initialize the class loader and add custom mappings -require $install_dir . '/LibreNMS/ClassLoader.php'; -$classLoader = new LibreNMS\ClassLoader(); -$classLoader->registerDir($install_dir . '/tests', 'LibreNMS\Tests'); -$classLoader->register(); +// initialize the class loader +require $install_dir . '/vendor/autoload.php'; require $install_dir . '/includes/common.php'; require $install_dir . '/html/includes/functions.inc.php'; @@ -53,7 +50,6 @@ if (getenv('SNMPSIM')) { require $install_dir . '/tests/mocks/mock.snmp.inc.php'; } -require $install_dir . '/lib/yaml/vendor/autoload.php'; ini_set('display_errors', 1); error_reporting(E_ALL & ~E_WARNING); //error_reporting(E_ALL); diff --git a/vendor/amenadiel/jpgraph/Examples/antispamex01.php b/vendor/amenadiel/jpgraph/Examples/antispamex01.php new file mode 100644 index 0000000000..57fe6099fd --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/antispamex01.php @@ -0,0 +1,18 @@ +Rand(5); + +// Stroke random cahllenge +if( $spam->Stroke() === false ) { + die('Illegal or no data to plot'); +} + +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/blueblack400x300grad.png b/vendor/amenadiel/jpgraph/Examples/blueblack400x300grad.png new file mode 100644 index 0000000000..8852862a74 Binary files /dev/null and b/vendor/amenadiel/jpgraph/Examples/blueblack400x300grad.png differ diff --git a/vendor/amenadiel/jpgraph/Examples/builtinplotmarksex1.php b/vendor/amenadiel/jpgraph/Examples/builtinplotmarksex1.php new file mode 100644 index 0000000000..439e6486ba --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/builtinplotmarksex1.php @@ -0,0 +1,62 @@ +SetMargin(30, 20, 60, 20); +$graph->SetMarginColor('white'); +$graph->SetScale("linlin"); + +// Hide the frame around the graph +$graph->SetFrame(false); + +// Setup title +$graph->title->Set("Using Builtin PlotMarks"); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 14); + +// Note: requires jpgraph 1.12p or higher +// $graph->SetBackgroundGradient('blue','navy:0.5',GRAD_HOR,BGRAD_PLOT); +$graph->tabtitle->Set('Region 1'); +$graph->tabtitle->SetWidth(TABTITLE_WIDTHFULL); + +// Enable X and Y Grid +$graph->xgrid->Show(); +$graph->xgrid->SetColor('gray@0.5'); +$graph->ygrid->SetColor('gray@0.5'); + +// Format the legend box +$graph->legend->SetColor('navy'); +$graph->legend->SetFillColor('lightgreen'); +$graph->legend->SetLineWeight(1); +$graph->legend->SetFont(FF_ARIAL, FS_BOLD, 8); +$graph->legend->SetShadow('gray@0.4', 3); +$graph->legend->SetAbsPos(15, 120, 'right', 'bottom'); + +// Create the line plots + +$p1 = new Plot\LinePlot($datay1); +$p1->SetColor("red"); +$p1->SetFillColor("yellow@0.5"); +$p1->SetWeight(2); +$p1->mark->SetType(MARK_IMG_DIAMOND, 5, 0.6); +$p1->SetLegend('2006'); +$graph->Add($p1); + +$p2 = new Plot\LinePlot($datay2); +$p2->SetColor("darkgreen"); +$p2->SetWeight(2); +$p2->SetLegend('2001'); +$p2->mark->SetType(MARK_IMG_MBALL, 'red'); +$graph->Add($p2); + +// Add a vertical line at the end scale position '7' +$l1 = new PlotLine(VERTICAL, 7); +$graph->Add($l1); + +// Output the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/checkgd.php b/vendor/amenadiel/jpgraph/Examples/checkgd.php new file mode 100644 index 0000000000..ad252bd21a --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/checkgd.php @@ -0,0 +1,11 @@ + diff --git a/vendor/amenadiel/jpgraph/Examples/checkgd2.php b/vendor/amenadiel/jpgraph/Examples/checkgd2.php new file mode 100644 index 0000000000..e5e7b3c5e1 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/checkgd2.php @@ -0,0 +1,14 @@ + diff --git a/vendor/amenadiel/jpgraph/Examples/checkttf.php b/vendor/amenadiel/jpgraph/Examples/checkttf.php new file mode 100644 index 0000000000..5efe737f26 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/checkttf.php @@ -0,0 +1,22 @@ + diff --git a/vendor/amenadiel/jpgraph/Examples/classroom.jpg b/vendor/amenadiel/jpgraph/Examples/classroom.jpg new file mode 100644 index 0000000000..f4cc06c44b Binary files /dev/null and b/vendor/amenadiel/jpgraph/Examples/classroom.jpg differ diff --git a/vendor/amenadiel/jpgraph/Examples/colormaps.php b/vendor/amenadiel/jpgraph/Examples/colormaps.php new file mode 100644 index 0000000000..2f9470f0d9 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/colormaps.php @@ -0,0 +1,133 @@ +img->SetColor('darkgray'); + $graph->img->Rectangle(0,0,$width-1,$height-1); + + $t = new Text($aTitle, $width/2,5); + $t->SetAlign('center','top'); + $t->SetFont(FF_ARIAL,FS_BOLD,14); + $t->Stroke($graph->img); + + // Instantiate a colormap + $cm = new ColorMap(); + $cm->InitRGB($graph->img->rgb); + + for( $mapidx=$aStart; $mapidx <= $aEnd; ++$mapidx, $ys += $ymarg ) { + + $cm->SetMap($mapidx,$aReverse); + $n = $cm->SetNumColors($n); + list( $mapidx, $maparray ) = $cm->GetCurrMap(); + $ncols = count($maparray); + $colbuckets = $cm->GetBuckets(); + + // The module width will depend on the actual number of colors + $mw = round(($width-$lmarg-$rmarg)/$n); + + // Draw color map title (name) + $t->Set('Basic colors: '.$ncols.', Total colors: '.$n); + $t->SetAlign('center','bottom'); + $t->SetAngle(0); + $t->SetFont(FF_TIMES,FS_NORMAL,14); + $t->Stroke($graph->img,$width/2,$ys-3); + + // Add the name/number of the map to the left + $t->SetAlign('right','center'); + $t->Set('Map: '.$mapidx); + $t->SetFont(FF_ARIAL,FS_NORMAL,14); + $t->Stroke($graph->img,$xs-20,round($ys+$mh/2)); + + // Setup text properties for the color names + if( $addColorNames ) { + $t->SetAngle(30); + $t->SetFont(FF_ARIAL,FS_NORMAL,12); + $t->SetAlign('right','top'); + } + + // Loop through all colors in the map + $x = $xs; $y = $ys; $k=0; + for($i=0; $i < $n; ++$i){ + $graph->img->SetColor($colbuckets[$i]); + $graph->img->FilledRectangle($x,$y,$x+$mw,$y+$mh); + + // Mark all basic colors in the map with a bar and name + if( $i % (($n-$ncols)/($ncols-1)+1) == 0 ) { + $graph->img->SetColor('black'); + $graph->img->FilledRectangle($x,$y+$mh+4,$x+$mw-1,$y+$mh+6); + if( $addColorNames ) { + $t->Set($maparray[$k++]); + $t->Stroke($graph->img,$x+$mw/2,$y+$mh+10); + } + } + $x += $mw; + } + + // Draw a border around the map + $graph->img->SetColor('black'); + $graph->img->Rectangle($xs,$ys,$xs+$mw*$n,$ys+$mh); + + } + + // Send back to client + $graph->Stroke(); + } + +} + +$driver = new ColorMapDriver(); + +$title = "Standard maps"; +$reverse = false; +$n = 64; $s=0; $e=9; +$showNames = false; + + +/* +$title = "Center maps"; +$reverse = false; +$n = 64; $s=10; $e=14; +$showNames = false; +*/ + +/* +$title = "Continues maps"; +$reverse = false; +$n = 64; $s=15; $e=21; +$showNames = false; +*/ +$driver->Draw($title,$s,$e,$n,$reverse,$showNames); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/csim_in_html_ex1.php b/vendor/amenadiel/jpgraph/Examples/csim_in_html_ex1.php new file mode 100644 index 0000000000..2c08e09578 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/csim_in_html_ex1.php @@ -0,0 +1,61 @@ + + + +GetHTMLImageMap($_mapname); +echo $imgmap; + +?> + +

        This is an example page with CSIM graphs with arbitrary HTML text

        + +Clicked on bar: <none>
        '; +} +else { + echo 'Clicked on bar: '.$_GET['clickedon'].''; +} +echo '

        '; +?> + +

        First we need to get hold of the image map and include it in the HTML + page.

        +

        For this graph it is:

        +'.htmlentities($imgmap).'
      7. ';?> + + tag and rebuild the +$imgtag = $graph->GetCSIMImgHTML($_mapname,$_graphfilename); +?> +

        The graph is then be displayed as shown in figure 1. With the following + created <img> tag:

        +
        
        +
        +
        + + +

        + +
        Figure 1. The included CSIM graph. +

        + + + diff --git a/vendor/amenadiel/jpgraph/Examples/csim_in_html_ex2.php b/vendor/amenadiel/jpgraph/Examples/csim_in_html_ex2.php new file mode 100644 index 0000000000..c94bda3c35 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/csim_in_html_ex2.php @@ -0,0 +1,100 @@ + + + +GetHTMLImageMap($_mapname1); +$imgmap2 = $piegraph->GetHTMLImageMap($_mapname2); +echo $imgmap1; +echo $imgmap2; + +?> + +

        This is an example page with CSIM graphs with arbitrary HTML text

        + +Clicked on bar: <none>'; +} +else { + echo 'Clicked on bar: '.$_GET['clickedon'].''; +} +echo '

        '; +if( empty($_GET['pie_clickedon']) ) { + echo 'Clicked on pie slice: <none>'; +} +else { + echo 'Clicked on pie slice: '.$_GET['pie_clickedon'].''; +} +echo '

        '; +?> + +

        First we need to get hold of the image maps and include them in the HTML + page.

        +

        For these graphs the maps are:

        +
        '.htmlentities($imgmap1).'
        '; +?> +

        +and +

        +
        '.htmlentities($imgmap2).'
        '; +?> + + tags for Figure 1 & 2 and rebuild the URL arguments +$imgtag1 = $graph->GetCSIMImgHTML($_mapname1,$_graphfilename1); +$imgtag2 = $piegraph->GetCSIMImgHTML($_mapname2,$_graphfilename2); +?> +

        The graphs are then displayed as shown in figure 1 & 2. With the following + created <img> tags:

        +
        +
        +
        + +

        +Note: For the Pie the center is counted as the first slice. +

        + +

        + + + + +
        + +
        Figure 1. The included Bar CSIM graph. +

        +
        + +
        Figure 2. The included Pie CSIM graph. +

        +
        + + diff --git a/vendor/amenadiel/jpgraph/Examples/csim_in_html_graph_ex1.php b/vendor/amenadiel/jpgraph/Examples/csim_in_html_graph_ex1.php new file mode 100644 index 0000000000..7da3988dcb --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/csim_in_html_graph_ex1.php @@ -0,0 +1,46 @@ +SetScale('textlin'); +$graph->SetMargin(50, 80, 20, 40); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); + +$n = count($datay); // Number of bars + +global $_wrapperfilename; + +// Create targets for the image maps. One for each column +$targ = array(); +$alt = array(); +$wtarg = array(); +for ($i = 0; $i < $n; ++$i) { + $urlarg = 'clickedon=' . ($i + 1); + $targ[] = $_wrapperfilename . '?' . $urlarg; + $alt[] = 'val=%d'; + $wtarg[] = ''; +} +$bplot->SetCSIMTargets($targ, $alt, $wtarg); + +$graph->Add($bplot); + +$graph->title->Set('Multiple Image maps'); +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetCSIMTarget('#45', 'Title for Bar', '_blank'); + +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetCSIMTarget('#55', 'Y-axis title'); +$graph->yaxis->title->Set("Y-title"); + +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetCSIMTarget('#55', 'X-axis title'); +$graph->xaxis->title->Set("X-title"); + +// Send back the image when we are called from within the tag +$graph->StrokeCSIMImage(); diff --git a/vendor/amenadiel/jpgraph/Examples/csim_in_html_graph_ex2.php b/vendor/amenadiel/jpgraph/Examples/csim_in_html_graph_ex2.php new file mode 100644 index 0000000000..8c59c0c363 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/csim_in_html_graph_ex2.php @@ -0,0 +1,75 @@ +SetFrame(false); + +// Setup title +$piegraph->title->Set("CSIM Center Pie plot"); +$piegraph->title->SetFont(FF_ARIAL,FS_BOLD,18); +$piegraph->title->SetMargin(8); // Add a little bit more margin from the top + +// Create the pie plot +$p1 = new PiePlotC($data); + +// Set the radius of pie (as fraction of image size) +$p1->SetSize(0.32); + +// Label font and color setup +$p1->value->SetFont(FF_ARIAL,FS_BOLD,11); +$p1->value->SetColor('white'); + +// Setup the title on the center circle +$p1->midtitle->Set("Distribution\n2008 H1"); +$p1->midtitle->SetFont(FF_ARIAL,FS_NORMAL,12); + +// Set color for mid circle +$p1->SetMidColor('yellow'); + +// Use percentage values in the legends values (This is also the default) +$p1->SetLabelType(PIE_VALUE_PER); + +// The label array values may have printf() formatting in them. The argument to the +// form,at string will be the value of the slice (either the percetage or absolute +// depending on what was specified in the SetLabelType() above. +$lbl = array("Jan\n%.1f%%","Feb\n%.1f%%","March\n%.1f%%", + "Apr\n%.1f%%","May\n%.1f%%","Jun\n%.1f%%"); +$p1->SetLabels($lbl); + +// Add drop shadow to slices +$p1->SetShadow(); + +// Explode all slices 15 pixels +$p1->ExplodeAll(15); + +// Setup the CSIM targets +global $_wrapperfilename; +$targ = array(); $alt = array(); $wtarg = array(); +for( $i=0; $i <= $n; ++$i ) { + $urlarg = 'pie_clickedon='.($i+1); + $targ[] = $_wrapperfilename.'?'.$urlarg; + $alt[] = 'val=%d'; + $wtarg[] = ''; +} +$p1->SetCSIMTargets($targ,$alt,$wtarg); +$p1->SetMidCSIM($targ[0],$alt[0],$wtarg[0]); + +// Add plot to pie graph +$piegraph->Add($p1); + +// Send back the image when we are called from within the tag +$piegraph->StrokeCSIMImage(); + +?> + + diff --git a/vendor/amenadiel/jpgraph/Examples/dataset01.inc.php b/vendor/amenadiel/jpgraph/Examples/dataset01.inc.php new file mode 100644 index 0000000000..6ac7f2b09b --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/dataset01.inc.php @@ -0,0 +1,275 @@ + 1.0885908919277, 1 => + 0.99034385297982, 2 => 0.97005467188578, 3 => + 0.99901201350824, 4 => 1.1263167971152, 5 => + 1.0582808133448, 6 => 1.0216740689064, 7 => + 0.96626236356644, 8 => 1.0125912828768, 9 => + 0.99047473992496, 10 => 0.99102472104561, 11 => + 0.98500781573283, 12 => 0.91933668914198, 13 => + 0.92234602792711, 14 => 0.88933863410054, 15 => + 0.94236150975178, 16 => 0.98924287679116, 17 => + 1.0342765545566, 18 => 1.0538510278089, 19 => + 0.93496076181191, 20 => 0.90944479677235, 21 => + 0.80831866316983, 22 => 0.81912434615535, 23 => + 0.83143770042109, 24 => 0.86972168159496, 25 => + 0.92645774571577, 26 => 0.81169120061422, 27 => + 0.84409853057606, 28 => 0.89065856249272, 29 => + 0.83551478929348, 30 => 0.87015680306726, 31 => + 0.76063327042172, 32 => 0.82720958380697, 33 => + 0.86565279505723, 34 => 0.77858966246836, 35 => + 0.81009606378237, 36 => 0.80485136798149, 37 => + 0.82641461943804, 38 => 0.87442020676513, 39 => + 0.89589150146825, 40 => 0.92082995956816, 41 => + 0.92614241931726, 42 => 0.96915564652581, 43 => + 1.003753706293, 44 => 0.97438809368023, 45 => + 1.011556766867, 46 => 1.0785692014115, 47 => + 1.0586915420364, 48 => 1.284210059027, 49 => + 1.3424512661794, 50 => 1.1743365450983, 51 => + 1.2387345559532, 52 => 1.2485728609648, 53 => + 1.2330096418558, 54 => 1.1857882621709, 55 => + 1.2344956522411, 56 => 1.2047675730648, 57 => + 1.292419000136, 58 => 1.3405480219013, 59 => + 1.3971752198648, 60 => 1.4359555309649, 61 => + 1.3243735045701, 62 => 1.2359389187087, 63 => + 1.2201320423161, 64 => 1.3602246705197, 65 => + 1.360886940568, 66 => 1.3493553211075, 67 => + 1.4401769929405, 68 => 1.3979767849951, 69 => + 1.4545882591647, 70 => 1.337801210539, 71 => + 1.3793601365977, 72 => 1.4586769476223, 73 => + 1.5230946076475, 74 => 1.4124735946125, 75 => + 1.4030318592551, 76 => 1.349158816711, 77 => + 1.3994840622105, 78 => 1.4239672612346, 79 => + 1.40812256221, 80 => 1.4583856197192, 81 => + 1.4613314581567, 82 => 1.6756755916668, 83 => + 1.8580313939158, 84 => 1.8342360959805, 85 => + 1.9216082598086, 86 => 1.9478846253628, 87 => + 2.0244872112436, 88 => 1.9560660777181, 89 => + 1.8415152640121, 90 => 1.8471764273372, 91 => + 1.8889886695023, 92 => 1.8195007209252, 93 => + 1.8960270595999, 94 => 1.8644490575386, 95 => + 1.971196340772, 96 => 2.015583152659, 97 => + 1.9959882430428, 98 => 2.1063668082622, 99 => + 2.1719175769191, 100 => 2.1875938345039, 101 => + 2.1587594039981, 102 => 2.1278241823627, 103 => + 2.298793912594, 104 => 2.3723774302753, 105 => + 2.4413392788904, 106 => 2.4834594954125, 107 => + 2.5164271989421, 108 => 2.48274719503, 109 => + 2.4492997581034, 110 => 2.1412357263019, 111 => + 2.0314268112566, 112 => 1.9596098764628, 113 => + 2.0250983127109, 114 => 1.924959829851, 115 => + 1.9603612943993, 116 => 2.0540576271866, 117 => + 2.0568349960689, 118 => 2.0811524692325, 119 => + 2.0581964759165, 120 => 2.020162840272, 121 => + 2.0626517638667, 122 => 1.9286563823225, 123 => + 2.0127912437563, 124 => 1.9491858277931, 125 => + 1.8692310150316, 126 => 1.6993275416762, 127 => + 1.5849680675709, 128 => 1.5422481968304, 129 => + 1.603188853916, 130 => 1.6449504349551, 131 => + 1.6570332084417, 132 => 1.7563884552262, 133 => + 1.7346008663135, 134 => 1.741307942998, 135 => + 1.7415848536123, 136 => 1.7014366147405, 137 => + 1.6719646364256, 138 => 1.7092888030342, 139 => + 1.7371529028402, 140 => 1.7019154041991, 141 => + 1.7662473702497, 142 => 1.8480766044197, 143 => + 1.8355114169662, 144 => 1.7819817315586, 145 => + 1.7148079481036, 146 => 1.6241989833489, 147 => + 1.4624626548138, 148 => 1.5040542012939, 149 => + 1.442295346913, 150 => 1.4187087000604, 151 => + 1.4225097958511, 152 => 1.5001324671865, 153 => + 1.4584802723727, 154 => 1.5342572961469, 155 => + 1.514133174734, 156 => 1.5443934302345, 157 => + 1.5476883863698, 158 => 1.6080128685721, 159 => + 1.5816649899396, 160 => 1.5310436755918, 161 => + 1.518280754595, 162 => 1.5216184249044, 163 => + 1.4393414811719, 164 => 1.409379582707, 165 => + 1.436861898056, 166 => 1.4739894373751, 167 => + 1.4512785421546, 168 => 1.496057581316, 169 => + 1.3817455776456, 170 => 1.2990312802211, 171 => + 1.3073949130374, 172 => 1.2473214566896, 173 => + 1.1105915111374, 174 => 1.0420360580822, 175 => + 1.1744654786356, 176 => 1.0602876800127, 177 => + 1.074408841208, 178 => 1.18387615056, 179 => + 1.1890999077101, 180 => 1.0549293038746, 181 => + 1.0570601708416, 182 => 1.0800216692849, 183 => + 0.96274117702549, 184 => 0.9501673977047, 185 => + 0.97710108451711, 186 => 0.89886322996001, 187 => + 0.9239453369566, 188 => 0.96299807255386, 189 => + 1.0105532418267, 190 => 1.0164009465948, 191 => + 1.0413107606824, 192 => 1.0475248122459, 193 => + 1.0266007451985, 194 => 1.0159556206533, 195 => + 1.0943852922517, 196 => 1.0750418553654, 197 => + 0.97774129938915, 198 => 0.98590717162284, 199 => + 0.87713795242119, 200 => 0.90770624057599, 201 => + 0.87557547650302, 202 => 0.95754187545856, 203 => + 1.0111465867283, 204 => 0.93224663470275, 205 => + 0.93886113881632, 206 => 0.94128877256653, 207 => + 0.9559086414866, 208 => 0.97782683000598, 209 => + 1.0648991708916, 210 => 1.1759619281479, 211 => + 1.1323001889786, 212 => 1.2173222321276, 213 => + 1.192219780365, 214 => 1.1507367671992, 215 => + 1.0062415877475, 216 => 1.0017043563084, 217 => + 0.94468309902865, 218 => 0.99384124056529, 219 => + 1.0514822705943, 220 => 1.0451723914426, 221 => + 1.0776122119814, 222 => 1.2013601009631, 223 => + 1.1765086398423, 224 => 1.2387735028784, 225 => + 1.2441365026242, 226 => 1.2694500268723, 227 => + 1.2789962941485, 228 => 1.2442094256309, 229 => + 1.2352688438234, 230 => 1.2571277155372, 231 => + 1.3291795377077, 232 => 1.2703480599183, 233 => + 1.30729508393, 234 => 1.3233030218068, 235 => + 1.2861232143244, 236 => 1.3168684998023, 237 => + 1.2499001566772, 238 => 1.2622769692485, 239 => + 1.2160789893735, 240 => 1.2288877111321, 241 => + 1.222967255453, 242 => 1.2998243638567, 243 => + 1.3443008723449, 244 => 1.339680674028, 245 => + 1.3779965791538, 246 => 1.3560080691721, 247 => + 1.3470544172094, 248 => 1.3166882067851, 249 => + 1.4452459865932, 250 => 1.4514278120119, 251 => + 1.413690283372, 252 => 1.4178934332405, 253 => + 1.4237414657565, 254 => 1.3777636409301, 255 => + 1.4041849448389, 256 => 1.4049533546771, 257 => + 1.4277375831259, 258 => 1.4224090113077, 259 => + 1.4647907974628, 260 => 1.4243190632657, 261 => + 1.4286580133998, 262 => 1.4348828641501, 263 => + 1.415409243977, 264 => 1.4476028555859, 265 => + 1.4538821661641, 266 => 1.4883184435336, 267 => + 1.4205032194634, 268 => 1.3856543933372, 269 => + 1.2716906168086, 270 => 1.3462117624752, 271 => + 1.3003015423298, 272 => 1.2148491725878, 273 => + 1.2605381058318, 274 => 1.2690047369619, 275 => + 1.3327723638582, 276 => 1.3118643588249, 277 => + 1.293007944258, 278 => 1.2548761810876, 279 => + 1.3335015938603, 280 => 1.3152744239077, 281 => + 1.2564376463182, 282 => 1.2478417859372, 283 => + 1.2518821298414, 284 => 1.2036453589032, 285 => + 1.1798564480155, 286 => 1.2062515260098, 287 => + 1.2129817801455, 288 => 1.1405762096618, 289 => + 1.0161049810033, 290 => 1.0030124197677, 291 => + 1.0111565082559, 292 => 1.0084286839061, 293 => + 0.95068297130577, 294 => 1.0450005357207, 295 => + 1.211596899292, 296 => 1.3762615912002, 297 => + 1.530127116787, 298 => 1.5167370832585, 299 => + 1.6259521507076, 300 => 1.6518467383405, 301 => + 1.7713043850286, 302 => 1.6396708687084, 303 => + 1.6116177484122, 304 => 1.5225729470695, 305 => + 1.6101471149808); + + +$xdata = array( + + 0 => 444348000, 1 => 446853600, 2 => + 449532000, 3 => 452124000, 4 => 454802400, 5 => + 457394400, 6 => 460072800, 7 => 462751200, 8 => + 465343200, 9 => 468021600, 10 => 470613600, 11 => + 473292000, 12 => 475970400, 13 => 478389600, 14 => + 481068000, 15 => 483660000, 16 => 486338400, 17 => + 488930400, 18 => 491608800, 19 => 494287200, 20 => + 496879200, 21 => 499557600, 22 => 502149600, 23 => + 504828000, 24 => 507506400, 25 => 509925600, 26 => + 512604000, 27 => 515196000, 28 => 517874400, 29 => + 520466400, 30 => 523144800, 31 => 525823200, 32 => + 528415200, 33 => 531093600, 34 => 533685600, 35 => + 536364000, 36 => 539042400, 37 => 541461600, 38 => + 544140000, 39 => 546732000, 40 => 549410400, 41 => + 552002400, 42 => 554680800, 43 => 557359200, 44 => + 559951200, 45 => 562629600, 46 => 565221600, 47 => + 567900000, 48 => 570578400, 49 => 573084000, 50 => + 575762400, 51 => 578354400, 52 => 581032800, 53 => + 583624800, 54 => 586303200, 55 => 588981600, 56 => + 591573600, 57 => 594252000, 58 => 596844000, 59 => + 599522400, 60 => 602200800, 61 => 604620000, 62 => + 607298400, 63 => 609890400, 64 => 612568800, 65 => + 615160800, 66 => 617839200, 67 => 620517600, 68 => + 623109600, 69 => 625788000, 70 => 628380000, 71 => + 631058400, 72 => 633736800, 73 => 636156000, 74 => + 638834400, 75 => 641426400, 76 => 644104800, 77 => + 646696800, 78 => 649375200, 79 => 652053600, 80 => + 654645600, 81 => 657324000, 82 => 659916000, 83 => + 662594400, 84 => 665272800, 85 => 667692000, 86 => + 670370400, 87 => 672962400, 88 => 675640800, 89 => + 678232800, 90 => 680911200, 91 => 683589600, 92 => + 686181600, 93 => 688860000, 94 => 691452000, 95 => + 694130400, 96 => 696808800, 97 => 699314400, 98 => + 701992800, 99 => 704584800, 100 => 707263200, 101 => + 709855200, 102 => 712533600, 103 => 715212000, 104 => + 717804000, 105 => 720482400, 106 => 723074400, 107 => + 725752800, 108 => 728431200, 109 => 730850400, 110 => + 733528800, 111 => 736120800, 112 => 738799200, 113 => + 741391200, 114 => 744069600, 115 => 746748000, 116 => + 749340000, 117 => 752018400, 118 => 754610400, 119 => + 757288800, 120 => 759967200, 121 => 762386400, 122 => + 765064800, 123 => 767656800, 124 => 770335200, 125 => + 772927200, 126 => 775605600, 127 => 778284000, 128 => + 780876000, 129 => 783554400, 130 => 786146400, 131 => + 788824800, 132 => 791503200, 133 => 793922400, 134 => + 796600800, 135 => 799192800, 136 => 801871200, 137 => + 804463200, 138 => 807141600, 139 => 809820000, 140 => + 812412000, 141 => 815090400, 142 => 817682400, 143 => + 820360800, 144 => 823039200, 145 => 825544800, 146 => + 828223200, 147 => 830815200, 148 => 833493600, 149 => + 836085600, 150 => 838764000, 151 => 841442400, 152 => + 844034400, 153 => 846712800, 154 => 849304800, 155 => + 851983200, 156 => 854661600, 157 => 857080800, 158 => + 859759200, 159 => 862351200, 160 => 865029600, 161 => + 867621600, 162 => 870300000, 163 => 872978400, 164 => + 875570400, 165 => 878248800, 166 => 880840800, 167 => + 883519200, 168 => 886197600, 169 => 888616800, 170 => + 891295200, 171 => 893887200, 172 => 896565600, 173 => + 899157600, 174 => 901836000, 175 => 904514400, 176 => + 907106400, 177 => 909784800, 178 => 912376800, 179 => + 915055200, 180 => 917733600, 181 => 920152800, 182 => + 922831200, 183 => 925423200, 184 => 928101600, 185 => + 930693600, 186 => 933372000, 187 => 936050400, 188 => + 938642400, 189 => 941320800, 190 => 943912800, 191 => + 946591200, 192 => 949269600, 193 => 951775200, 194 => + 954453600, 195 => 957045600, 196 => 959724000, 197 => + 962316000, 198 => 964994400, 199 => 967672800, 200 => + 970264800, 201 => 972943200, 202 => 975535200, 203 => + 978213600, 204 => 980892000, 205 => 983311200, 206 => + 985989600, 207 => 988581600, 208 => 991260000, 209 => + 993852000, 210 => 996530400, 211 => 999208800, 212 => + 1001800800, 213 => 1004479200, 214 => 1007071200, + 215 => 1009749600, 216 => 1012428000, 217 => + 1014847200, 218 => 1017525600, 219 => 1020117600, + 220 => 1022796000, 221 => 1025388000, 222 => + 1028066400, 223 => 1030744800, 224 => 1033336800, + 225 => 1036015200, 226 => 1038607200, 227 => + 1041285600, 228 => 1043964000, 229 => 1046383200, + 230 => 1049061600, 231 => 1051653600, 232 => + 1054332000, 233 => 1056924000, 234 => 1059602400, + 235 => 1062280800, 236 => 1064872800, 237 => + 1067551200, 238 => 1070143200, 239 => 1072821600, + 240 => 1075500000, 241 => 1078005600, 242 => + 1080684000, 243 => 1083276000, 244 => 1085954400, + 245 => 1088546400, 246 => 1091224800, 247 => + 1093903200, 248 => 1096495200, 249 => 1099173600, + 250 => 1101765600, 251 => 1104444000, 252 => + 1107122400, 253 => 1109541600, 254 => 1112220000, + 255 => 1114812000, 256 => 1117490400, 257 => + 1120082400, 258 => 1122760800, 259 => 1125439200, + 260 => 1128031200, 261 => 1130709600, 262 => + 1133301600, 263 => 1135980000, 264 => 1138658400, + 265 => 1141077600, 266 => 1143756000, 267 => + 1146348000, 268 => 1149026400, 269 => 1151618400, + 270 => 1154296800, 271 => 1156975200, 272 => + 1159567200, 273 => 1162245600, 274 => 1164837600, + 275 => 1167516000, 276 => 1170194400, 277 => + 1172613600, 278 => 1175292000, 279 => 1177884000, + 280 => 1180562400, 281 => 1183154400, 282 => + 1185832800, 283 => 1188511200, 284 => 1191103200, + 285 => 1193781600, 286 => 1196373600, 287 => + 1199052000, 288 => 1201730400, 289 => 1204236000, + 290 => 1206914400, 291 => 1209506400, 292 => + 1212184800, 293 => 1214776800, 294 => 1217455200, + 295 => 1220133600, 296 => 1222725600, 297 => + 1225404000, 298 => 1227996000, 299 => 1230674400, + 300 => 1233352800, 301 => 1235772000, 302 => + 1238450400, 303 => 1241042400, 304 => 1243720800, + 305 => 1246312800, + ); + +?> \ No newline at end of file diff --git a/vendor/amenadiel/jpgraph/Examples/dm_ex6.png b/vendor/amenadiel/jpgraph/Examples/dm_ex6.png new file mode 100644 index 0000000000..b389990b02 Binary files /dev/null and b/vendor/amenadiel/jpgraph/Examples/dm_ex6.png differ diff --git a/vendor/amenadiel/jpgraph/Examples/examples_axis/axislabelbkgex01.php b/vendor/amenadiel/jpgraph/Examples/examples_axis/axislabelbkgex01.php new file mode 100644 index 0000000000..9708003a6c --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_axis/axislabelbkgex01.php @@ -0,0 +1,35 @@ +SetScale('intlin'); +$graph->SetMargin(30, 15, 40, 30); +$graph->SetMarginColor('white'); +$graph->SetFrame(true, 'blue', 3); + +$graph->title->Set('Label background'); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); + +$graph->subtitle->SetFont(FF_ARIAL, FS_NORMAL, 10); +$graph->subtitle->SetColor('darkred'); +$graph->subtitle->Set('"LABELBKG_NONE"'); + +$graph->SetAxisLabelBackground(LABELBKG_NONE, 'orange', 'red', 'lightblue', 'red'); + +// Use Ariel font +$graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 9); +$graph->yaxis->SetFont(FF_ARIAL, FS_NORMAL, 9); +$graph->xgrid->Show(); + +// Create the plot line +$p1 = new Plot\LinePlot($ydata); +$graph->Add($p1); + +// Output graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_axis/axislabelbkgex02.php b/vendor/amenadiel/jpgraph/Examples/examples_axis/axislabelbkgex02.php new file mode 100644 index 0000000000..6240e55673 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_axis/axislabelbkgex02.php @@ -0,0 +1,33 @@ +SetScale('intlin'); +$graph->SetMargin(30, 15, 40, 30); +$graph->SetMarginColor('white'); +$graph->SetFrame(true, 'blue', 3); + +$graph->title->Set('Label background'); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); + +$graph->subtitle->SetFont(FF_ARIAL, FS_NORMAL, 10); +$graph->subtitle->SetColor('darkred'); +$graph->subtitle->Set('"LABELBKG_XAXIS"'); + +$graph->SetAxisLabelBackground(LABELBKG_XAXIS, 'orange', 'red', 'lightblue', 'red'); + +// Use Ariel font +$graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 9); +$graph->yaxis->SetFont(FF_ARIAL, FS_NORMAL, 9); +$graph->xgrid->Show(); + +// Create the plot line +$p1 = new Plot\LinePlot($ydata); +$graph->Add($p1); + +// Output graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_axis/axislabelbkgex03.php b/vendor/amenadiel/jpgraph/Examples/examples_axis/axislabelbkgex03.php new file mode 100644 index 0000000000..9776c6993b --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_axis/axislabelbkgex03.php @@ -0,0 +1,33 @@ +SetScale('intlin'); +$graph->SetMargin(30, 15, 40, 30); +$graph->SetMarginColor('white'); +$graph->SetFrame(true, 'blue', 3); + +$graph->title->Set('Label background'); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); + +$graph->subtitle->SetFont(FF_ARIAL, FS_NORMAL, 10); +$graph->subtitle->SetColor('darkred'); +$graph->subtitle->Set('"LABELBKG_YAXIS"'); + +$graph->SetAxisLabelBackground(LABELBKG_YAXIS, 'orange', 'red', 'lightblue', 'red'); + +// Use Ariel font +$graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 9); +$graph->yaxis->SetFont(FF_ARIAL, FS_NORMAL, 9); +$graph->xgrid->Show(); + +// Create the plot line +$p1 = new Plot\LinePlot($ydata); +$graph->Add($p1); + +// Output graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_axis/axislabelbkgex04.php b/vendor/amenadiel/jpgraph/Examples/examples_axis/axislabelbkgex04.php new file mode 100644 index 0000000000..b59ff93dea --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_axis/axislabelbkgex04.php @@ -0,0 +1,33 @@ +SetScale('intlin'); +$graph->SetMargin(30, 15, 40, 30); +$graph->SetMarginColor('white'); +$graph->SetFrame(true, 'blue', 3); + +$graph->title->Set('Label background'); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); + +$graph->subtitle->SetFont(FF_ARIAL, FS_NORMAL, 10); +$graph->subtitle->SetColor('darkred'); +$graph->subtitle->Set('"LABELBKG_YAXISFULL"'); + +$graph->SetAxisLabelBackground(LABELBKG_YAXISFULL, 'orange', 'red', 'lightblue', 'red'); + +// Use Ariel font +$graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 9); +$graph->yaxis->SetFont(FF_ARIAL, FS_NORMAL, 9); +$graph->xgrid->Show(); + +// Create the plot line +$p1 = new Plot\LinePlot($ydata); +$graph->Add($p1); + +// Output graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_axis/axislabelbkgex05.php b/vendor/amenadiel/jpgraph/Examples/examples_axis/axislabelbkgex05.php new file mode 100644 index 0000000000..4b8222174d --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_axis/axislabelbkgex05.php @@ -0,0 +1,33 @@ +SetScale('intlin'); +$graph->SetMargin(30, 15, 40, 30); +$graph->SetMarginColor('white'); +$graph->SetFrame(true, 'blue', 3); + +$graph->title->Set('Label background'); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); + +$graph->subtitle->SetFont(FF_ARIAL, FS_NORMAL, 10); +$graph->subtitle->SetColor('darkred'); +$graph->subtitle->Set('"LABELBKG_XAXISFULL"'); + +$graph->SetAxisLabelBackground(LABELBKG_XAXISFULL, 'orange', 'red', 'lightblue', 'red'); + +// Use Ariel font +$graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 9); +$graph->yaxis->SetFont(FF_ARIAL, FS_NORMAL, 9); +$graph->xgrid->Show(); + +// Create the plot line +$p1 = new Plot\LinePlot($ydata); +$graph->Add($p1); + +// Output graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_axis/axislabelbkgex06.php b/vendor/amenadiel/jpgraph/Examples/examples_axis/axislabelbkgex06.php new file mode 100644 index 0000000000..4aebafe408 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_axis/axislabelbkgex06.php @@ -0,0 +1,33 @@ +SetScale('intlin'); +$graph->SetMargin(30, 15, 40, 30); +$graph->SetMarginColor('white'); +$graph->SetFrame(true, 'blue', 3); + +$graph->title->Set('Label background'); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); + +$graph->subtitle->SetFont(FF_ARIAL, FS_NORMAL, 10); +$graph->subtitle->SetColor('darkred'); +$graph->subtitle->Set('"LABELBKG_XYFULL"'); + +$graph->SetAxisLabelBackground(LABELBKG_XYFULL, 'orange', 'red', 'lightblue', 'red'); + +// Use Ariel font +$graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 9); +$graph->yaxis->SetFont(FF_ARIAL, FS_NORMAL, 9); +$graph->xgrid->Show(); + +// Create the plot line +$p1 = new Plot\LinePlot($ydata); +$graph->Add($p1); + +// Output graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_axis/axislabelbkgex07.php b/vendor/amenadiel/jpgraph/Examples/examples_axis/axislabelbkgex07.php new file mode 100644 index 0000000000..e6c29ddd33 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_axis/axislabelbkgex07.php @@ -0,0 +1,33 @@ +SetScale('intlin'); +$graph->SetMargin(30, 15, 40, 30); +$graph->SetMarginColor('white'); +$graph->SetFrame(true, 'blue', 3); + +$graph->title->Set('Label background'); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); + +$graph->subtitle->SetFont(FF_ARIAL, FS_NORMAL, 10); +$graph->subtitle->SetColor('darkred'); +$graph->subtitle->Set('"LABELBKG_XY"'); + +$graph->SetAxisLabelBackground(LABELBKG_XY, 'orange', 'red', 'lightblue', 'red'); + +// Use Ariel font +$graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 9); +$graph->yaxis->SetFont(FF_ARIAL, FS_NORMAL, 9); +$graph->xgrid->Show(); + +// Create the plot line +$p1 = new Plot\LinePlot($ydata); +$graph->Add($p1); + +// Output graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_axis/dupyaxisex1.php b/vendor/amenadiel/jpgraph/Examples/examples_axis/dupyaxisex1.php new file mode 100644 index 0000000000..7dc8a284cf --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_axis/dupyaxisex1.php @@ -0,0 +1,28 @@ +E(-M_PI, M_PI, 25); + +$graph = new Graph\Graph(300, 200); +$graph->SetScale("linlin"); +$graph->SetMargin(50, 50, 20, 30); +$graph->SetFrame(false); +$graph->SetBox(true, 'black', 2); +$graph->SetMarginColor('white'); +$graph->SetColor('lightyellow'); + +$graph->title->Set('Duplicating Y-axis'); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +$graph->SetAxisStyle(AXSTYLE_YBOXIN); +$graph->xgrid->Show(); + +$lp1 = new Plot\LinePlot($ydata, $xdata); +$lp1->SetColor("blue"); +$lp1->SetWeight(2); +$graph->Add($lp1); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_axis/inyaxisex1.php b/vendor/amenadiel/jpgraph/Examples/examples_axis/inyaxisex1.php new file mode 100644 index 0000000000..91bc17eea7 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_axis/inyaxisex1.php @@ -0,0 +1,47 @@ +SetScale("linlin"); +$graph->img->SetMargin(50, 50, 60, 40); +$graph->SetMarginColor('darkblue'); +$graph->SetColor('darkblue'); +$graph->SetAxisStyle(AXSTYLE_BOXOUT); + +$graph->title->Set("Depth curve. Dive #2"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetColor("white"); + +$graph->subtitle->Set("(Negated Y-axis)"); +$graph->subtitle->SetFont(FF_FONT1, FS_NORMAL); +$graph->subtitle->SetColor("white"); + +// Setup axis +$graph->yaxis->SetLabelFormatCallback("_cb_negate"); +$graph->xaxis->SetColor("lightblue", "white"); +$graph->yaxis->SetColor("lightblue", "white"); +$graph->ygrid->SetColor("blue"); + +$lp1 = new Plot\LinePlot($ydata); +$lp1->SetColor("yellow"); +$lp1->SetWeight(2); + +$graph->Add($lp1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_axis/inyaxisex2.php b/vendor/amenadiel/jpgraph/Examples/examples_axis/inyaxisex2.php new file mode 100644 index 0000000000..292ad2a32a --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_axis/inyaxisex2.php @@ -0,0 +1,49 @@ +SetScale("linlin"); +$graph->img->SetMargin(50, 50, 60, 40); +$graph->SetMarginColor('darkblue'); +$graph->SetColor('darkblue'); +$graph->SetAxisStyle(AXSTYLE_BOXOUT); +$graph->SetBackgroundImage("blueblack400x300grad.png", 1); +//$graph->SetBackgroundImage("lightbluedarkblue400x300grad.png",1); + +$graph->title->Set("Depth curve. Dive #2"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetColor("white"); + +$graph->subtitle->Set("(Negated Y-axis)"); +$graph->subtitle->SetFont(FF_FONT1, FS_NORMAL); +$graph->subtitle->SetColor("white"); + +// Setup axis +$graph->yaxis->SetLabelFormatCallback("_cb_negate"); +$graph->xaxis->SetColor("lightblue", "white"); +$graph->yaxis->SetColor("lightblue", "white"); +$graph->ygrid->SetColor("blue"); + +$lp1 = new Plot\LinePlot($ydata); +$lp1->SetColor("yellow"); +$lp1->SetWeight(2); + +$graph->Add($lp1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_axis/inyaxisex3.php b/vendor/amenadiel/jpgraph/Examples/examples_axis/inyaxisex3.php new file mode 100644 index 0000000000..12802b9264 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_axis/inyaxisex3.php @@ -0,0 +1,67 @@ +SetScale("linlin"); +$graph->SetY2Scale("lin"); +$graph->SetMargin(50, 50, 60, 40); +$graph->SetMarginColor('darkblue'); +$graph->SetColor('darkblue'); + +// Setup titles +$graph->title->Set("Inverting both Y-axis"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetColor("white"); + +$graph->subtitle->Set("(Negated Y & Y2 axis)"); +$graph->subtitle->SetFont(FF_FONT1, FS_NORMAL); +$graph->subtitle->SetColor("white"); + +// Setup axis +$graph->yaxis->SetLabelFormatCallback("_cb_negate"); +$graph->xaxis->SetColor("lightblue", "white"); +$graph->yaxis->SetColor("lightblue", "white"); +$graph->ygrid->SetColor("blue"); + +// Setup Y2 axis +$graph->y2axis->SetLabelFormatCallback("_cb_negate"); +$graph->y2axis->SetColor("darkred", "white"); +$graph->y2scale->SetAutoMax(0); // To make sure it starts with 0 + +// Setup plot 1 +$lp1 = new Plot\LinePlot($ydata); +$lp1->SetColor("yellow"); +$lp1->SetWeight(2); +$graph->Add($lp1); + +// Setup plot 2 +$lp2 = new Plot\LinePlot($y2data); +$lp2->SetColor("darkred"); +$lp2->SetWeight(2); +$graph->AddY2($lp2); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_axis/mulyaxiscsimex1.php b/vendor/amenadiel/jpgraph/Examples/examples_axis/mulyaxiscsimex1.php new file mode 100644 index 0000000000..1c60bef836 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_axis/mulyaxiscsimex1.php @@ -0,0 +1,73 @@ +SetMargin(60, 180, 50, 40); +$graph->SetMarginColor('white'); +$graph->title->Set("Multi Y-axes with Image Map"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Setup the scales for all axes +$graph->SetScale("intlin"); +$graph->SetYScale(0, 'int'); +$graph->SetYScale(1, 'int'); + +// Standard Y-axis plot +$lp1 = new Plot\LinePlot($datay1); +$lp1->SetLegend('2001'); +$lp1->mark->SetType(MARK_DIAMOND); +$lp1->mark->SetWidth(15); +$lp1->mark->SetFillColor('orange'); +$lp1->SetCSIMTargets($targ1, $alts1); +$graph->yaxis->title->Set('Basic Rate'); +$graph->yaxis->title->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->yaxis->title->SetColor('black'); +$graph->Add($lp1); + +// First multi Y-axis plot +$lp2 = new Plot\LinePlot($datay2); +$lp2->SetLegend('2002'); +$lp2->mark->SetType(MARK_DIAMOND); +$lp2->mark->SetWidth(15); +$lp2->mark->SetFillColor('darkred'); +$lp2->SetCSIMTargets($targ2, $alts2); +$graph->ynaxis[0]->SetColor('darkred'); +$graph->ynaxis[0]->title->Set('Rate A'); +$graph->ynaxis[0]->title->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->ynaxis[0]->title->SetColor('darkred'); +$graph->AddY(0, $lp2); + +// Second multi Y-axis plot +$lp3 = new Plot\LinePlot($datay3); +$lp3->SetLegend('2003'); +$lp3->mark->SetType(MARK_DIAMOND); +$lp3->mark->SetWidth(15); +$lp3->mark->SetFillColor('darkgreen'); +$lp3->SetCSIMTargets($targ3, $alts3); +$graph->ynaxis[1]->SetColor('darkgreen'); +$graph->ynaxis[1]->title->Set('Rate B'); +$graph->ynaxis[1]->title->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->ynaxis[1]->title->SetColor('darkgreen'); +$graph->AddY(1, $lp3); + +// Send back the HTML page which will call this script again +// to retrieve the image. +$graph->StrokeCSIM(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_axis/mulyaxisex1.php b/vendor/amenadiel/jpgraph/Examples/examples_axis/mulyaxisex1.php new file mode 100644 index 0000000000..9d2d13ec2e --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_axis/mulyaxisex1.php @@ -0,0 +1,45 @@ +SetMargin(40, 150, 40, 30); +$graph->SetMarginColor('white'); + +$graph->SetScale('intlin'); +$graph->title->Set('Using multiple Y-axis'); +$graph->title->SetFont(FF_ARIAL, FS_NORMAL, 14); + +$graph->SetYScale(0, 'lin'); +$graph->SetYScale(1, 'lin'); +$graph->SetYScale(2, 'lin'); + +$p1 = new Plot\LinePlot($datay); +$graph->Add($p1); + +$p2 = new Plot\LinePlot($datay2); +$p2->SetColor('teal'); +$graph->AddY(0, $p2); +$graph->ynaxis[0]->SetColor('teal'); + +$p3 = new Plot\LinePlot($datay3); +$p3->SetColor('red'); +$graph->AddY(1, $p3); +$graph->ynaxis[1]->SetColor('red'); + +$p4 = new Plot\LinePlot($datay4); +$p4->SetColor('blue'); +$graph->AddY(2, $p4); +$graph->ynaxis[2]->SetColor('blue'); + +// Output line +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_axis/topxaxisex1.php b/vendor/amenadiel/jpgraph/Examples/examples_axis/topxaxisex1.php new file mode 100644 index 0000000000..42d61d6e08 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_axis/topxaxisex1.php @@ -0,0 +1,45 @@ +img->SetMargin(40, 40, 40, 20); + +$graph->SetScale("linlin"); +$graph->SetShadow(); +$graph->title->Set("Top X-axis"); + +// Start at 0 +$graph->yscale->SetAutoMin(0); + +// Add some air around the Y-scale +$graph->yscale->SetGrace(100); + +// Use built in font +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Adjust the X-axis +$graph->xaxis->SetPos("max"); +$graph->xaxis->SetLabelSide(SIDE_UP); +$graph->xaxis->SetTickSide(SIDE_DOWN); + +// Create the line plot +$p1 = new Plot\LinePlot($datay); +$p1->SetColor("blue"); + +// Specify marks for the line plots +$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetFillColor("red"); +$p1->mark->SetWidth(4); + +// Show values +$p1->value->Show(); + +// Add lineplot to graph +$graph->Add($p1); + +// Output line +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_background/background_type_ex0.php b/vendor/amenadiel/jpgraph/Examples/examples_background/background_type_ex0.php new file mode 100644 index 0000000000..afe4b6e4e8 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_background/background_type_ex0.php @@ -0,0 +1,38 @@ +SetScale("textlin"); +$graph->SetMargin(40, 40, 50, 50); + +// Setup the grid and plotarea box +$graph->ygrid->SetLineStyle('dashed'); +$graph->ygrid->setColor('darkgray'); +$graph->SetBox(true); + +// Steup graph titles +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); +$graph->title->Set('Using background image'); +$graph->subtitle->SetFont(FF_COURIER, FS_BOLD, 11); +$graph->subtitle->Set('"BGIMG_COPY"'); +$graph->subtitle->SetColor('darkred'); + +// Add background with 25% mix +$graph->SetBackgroundImage('heat1.jpg', BGIMG_COPY); +$graph->SetBackgroundImageMix(25); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot->SetColor("blue"); + +// Add the plot to the graph +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_background/background_type_ex1.php b/vendor/amenadiel/jpgraph/Examples/examples_background/background_type_ex1.php new file mode 100644 index 0000000000..ab3be0d3f1 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_background/background_type_ex1.php @@ -0,0 +1,37 @@ +SetScale("textlin"); +$graph->SetMargin(40, 40, 50, 50); + +// Setup the grid and plotarea box +$graph->ygrid->SetLineStyle('dashed'); +$graph->ygrid->setColor('darkgray'); +$graph->SetBox(true); + +// Steup graph titles +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); +$graph->title->Set('Using background image'); +$graph->subtitle->SetFont(FF_COURIER, FS_BOLD, 11); +$graph->subtitle->Set('"BGIMG_CENTER"'); +$graph->subtitle->SetColor('darkred'); + +// Add background with 25% mix +$graph->SetBackgroundImage('heat1.jpg', BGIMG_CENTER); +$graph->SetBackgroundImageMix(25); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot->SetColor("blue"); + +// Add the plot to the graph +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_background/background_type_ex2.php b/vendor/amenadiel/jpgraph/Examples/examples_background/background_type_ex2.php new file mode 100644 index 0000000000..1cc98a3fa8 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_background/background_type_ex2.php @@ -0,0 +1,37 @@ +SetScale("textlin"); +$graph->SetMargin(40, 40, 50, 50); + +// Setup the grid and plotarea box +$graph->ygrid->SetLineStyle('dashed'); +$graph->ygrid->setColor('darkgray'); +$graph->SetBox(true); + +// Steup graph titles +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); +$graph->title->Set('Using background image'); +$graph->subtitle->SetFont(FF_COURIER, FS_BOLD, 11); +$graph->subtitle->Set('"BGIMG_FREE"'); +$graph->subtitle->SetColor('darkred'); + +// Add background with 25% mix +$graph->SetBackgroundImage('heat1.jpg', BGIMG_FREE); +$graph->SetBackgroundImageMix(25); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot->SetColor("blue"); + +// Add the plot to the graph +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_background/background_type_ex3.php b/vendor/amenadiel/jpgraph/Examples/examples_background/background_type_ex3.php new file mode 100644 index 0000000000..c1563fec9c --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_background/background_type_ex3.php @@ -0,0 +1,37 @@ +SetScale("textlin"); +$graph->SetMargin(40, 40, 50, 50); + +// Setup the grid and plotarea box +$graph->ygrid->SetLineStyle('dashed'); +$graph->ygrid->setColor('darkgray'); +$graph->SetBox(true); + +// Steup graph titles +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); +$graph->title->Set('Using background image'); +$graph->subtitle->SetFont(FF_COURIER, FS_BOLD, 11); +$graph->subtitle->Set('"BGIMG_FILLPLOT"'); +$graph->subtitle->SetColor('darkred'); + +// Add background with 25% mix +$graph->SetBackgroundImage('heat1.jpg', BGIMG_FILLPLOT); +$graph->SetBackgroundImageMix(25); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot->SetColor("blue"); + +// Add the plot to the graph +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_background/background_type_ex4.php b/vendor/amenadiel/jpgraph/Examples/examples_background/background_type_ex4.php new file mode 100644 index 0000000000..9d1b4beb56 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_background/background_type_ex4.php @@ -0,0 +1,37 @@ +SetScale("textlin"); +$graph->SetMargin(40, 40, 50, 50); + +// Setup the grid and plotarea box +$graph->ygrid->SetLineStyle('dashed'); +$graph->ygrid->setColor('darkgray'); +$graph->SetBox(true); + +// Steup graph titles +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); +$graph->title->Set('Using background image'); +$graph->subtitle->SetFont(FF_COURIER, FS_BOLD, 11); +$graph->subtitle->Set('"BGIMG_FILLFRAME"'); +$graph->subtitle->SetColor('darkred'); + +// Add background with 25% mix +$graph->SetBackgroundImage('heat1.jpg', BGIMG_FILLFRAME); +$graph->SetBackgroundImageMix(25); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot->SetColor("blue"); + +// Add the plot to the graph +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_background/backgroundex01.php b/vendor/amenadiel/jpgraph/Examples/examples_background/backgroundex01.php new file mode 100644 index 0000000000..5b3b0590f8 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_background/backgroundex01.php @@ -0,0 +1,47 @@ +img->SetMargin(40, 180, 40, 40); +$graph->SetBackgroundImage("tiger_bkg.png", BGIMG_FILLPLOT); + +$graph->img->SetAntiAliasing("white"); +$graph->SetScale("textlin"); +$graph->SetShadow(); +$graph->title->Set("Background image"); + +// Use built in font +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Slightly adjust the legend from it's default position in the +// top right corner. +$graph->legend->Pos(0.05, 0.5, "right", "center"); + +// Create the first line +$p1 = new Plot\LinePlot($datay); +$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetFillColor("red"); +$p1->mark->SetWidth(4); +$p1->SetColor("blue"); +$p1->SetCenter(); +$p1->SetLegend("Triumph Tiger -98"); +$graph->Add($p1); + +// ... and the second +$p2 = new Plot\LinePlot($data2y); +$p2->mark->SetType(MARK_STAR); +$p2->mark->SetFillColor("red"); +$p2->mark->SetWidth(4); +$p2->SetColor("red"); +$p2->SetCenter(); +$p2->SetLegend("New tiger -99"); +$graph->Add($p2); + +// Output line +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_background/backgroundex02.php b/vendor/amenadiel/jpgraph/Examples/examples_background/backgroundex02.php new file mode 100644 index 0000000000..2f72e04780 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_background/backgroundex02.php @@ -0,0 +1,47 @@ +img->SetMargin(40, 180, 40, 40); +$graph->SetBackgroundImage("tiger_bkg.png", BGIMG_FILLFRAME); + +$graph->img->SetAntiAliasing(); +$graph->SetScale("textlin"); +$graph->SetShadow(); +$graph->title->Set("Background image"); + +// Use built in font +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Slightly adjust the legend from it's default position in the +// top right corner. +$graph->legend->Pos(0.05, 0.5, "right", "center"); + +// Create the first line +$p1 = new Plot\LinePlot($datay); +$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetFillColor("red"); +$p1->mark->SetWidth(4); +$p1->SetColor("blue"); +$p1->SetCenter(); +$p1->SetLegend("Triumph Tiger -98"); +$graph->Add($p1); + +// ... and the second +$p2 = new Plot\LinePlot($data2y); +$p2->mark->SetType(MARK_STAR); +$p2->mark->SetFillColor("red"); +$p2->mark->SetWidth(4); +$p2->SetColor("red"); +$p2->SetCenter(); +$p2->SetLegend("New tiger -99"); +$graph->Add($p2); + +// Output line +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_background/backgroundex03.php b/vendor/amenadiel/jpgraph/Examples/examples_background/backgroundex03.php new file mode 100644 index 0000000000..c9cb2037b8 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_background/backgroundex03.php @@ -0,0 +1,47 @@ +img->SetMargin(40, 180, 40, 40); +$graph->SetBackgroundImage("tiger_bkg.png", BGIMG_COPY); + +$graph->img->SetAntiAliasing("white"); +$graph->SetScale("textlin"); +$graph->SetShadow(); +$graph->title->Set("Background image"); + +// Use built in font +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Slightly adjust the legend from it's default position in the +// top right corner. +$graph->legend->Pos(0.05, 0.5, "right", "center"); + +// Create the first line +$p1 = new Plot\LinePlot($datay); +$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetFillColor("red"); +$p1->mark->SetWidth(4); +$p1->SetColor("blue"); +$p1->SetCenter(); +$p1->SetLegend("Triumph Tiger -98"); +$graph->Add($p1); + +// ... and the second +$p2 = new Plot\LinePlot($data2y); +$p2->mark->SetType(MARK_STAR); +$p2->mark->SetFillColor("red"); +$p2->mark->SetWidth(4); +$p2->SetColor("red"); +$p2->SetCenter(); +$p2->SetLegend("New tiger -99"); +$graph->Add($p2); + +// Output line +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/accbarex1.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/accbarex1.php new file mode 100644 index 0000000000..d942e82f51 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/accbarex1.php @@ -0,0 +1,41 @@ +SetScale("textlin"); + +$graph->SetShadow(); +$graph->img->SetMargin(40, 30, 20, 40); + +// Create the bar plots +$b1plot = new Plot\BarPlot($data1y); +$b1plot->SetFillColor("orange"); +$b1plot->value->Show(); +$b2plot = new Plot\BarPlot($data2y); +$b2plot->SetFillColor("blue"); +$b2plot->value->Show(); + +// Create the grouped bar plot +$gbplot = new Plot\AccBarPlot(array($b1plot, $b2plot)); + +// ...and add it to the graPH +$graph->Add($gbplot); + +$graph->title->Set("Accumulated bar plots"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/accbarframeex01.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/accbarframeex01.php new file mode 100644 index 0000000000..e40b001b7e --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/accbarframeex01.php @@ -0,0 +1,32 @@ +SetScale('textlin'); +$graph->SetMarginColor('white'); + +// Setup title +$graph->title->Set('Acc bar with gradient'); + +// Create the first bar +$bplot = new Plot\BarPlot($datay1); +$bplot->SetFillGradient('AntiqueWhite2', 'AntiqueWhite4:0.8', GRAD_VERT); +$bplot->SetColor('darkred'); + +// Create the second bar +$bplot2 = new Plot\BarPlot($datay2); +$bplot2->SetFillGradient('olivedrab1', 'olivedrab4', GRAD_VERT); +$bplot2->SetColor('darkgreen'); + +// And join them in an accumulated bar +$accbplot = new Plot\AccBarPlot(array($bplot, $bplot2)); +$graph->Add($accbplot); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/accbarframeex02.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/accbarframeex02.php new file mode 100644 index 0000000000..77358cc087 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/accbarframeex02.php @@ -0,0 +1,34 @@ +SetScale('textlin'); +$graph->SetMarginColor('white'); + +// Setup title +$graph->title->Set('Acc bar with gradient'); + +// Create the first bar +$bplot = new Plot\BarPlot($datay1); +$bplot->SetFillGradient('AntiqueWhite2', 'AntiqueWhite4:0.8', GRAD_VERT); +$bplot->SetColor('darkred'); + +// Create the second bar +$bplot2 = new Plot\BarPlot($datay2); +$bplot2->SetFillGradient('olivedrab1', 'olivedrab4', GRAD_VERT); +$bplot2->SetColor('darkgreen'); + +// And join them in an accumulated bar +$accbplot = new Plot\AccBarPlot(array($bplot, $bplot2)); +$accbplot->SetColor('red'); +$accbplot->SetWeight(1); +$graph->Add($accbplot); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/accbarframeex03.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/accbarframeex03.php new file mode 100644 index 0000000000..212521f490 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/accbarframeex03.php @@ -0,0 +1,35 @@ +SetScale('textlin'); +$graph->SetMarginColor('white'); + +// Setup title +$graph->title->Set('Acc bar with gradient'); + +// Create the first bar +$bplot = new Plot\BarPlot($datay1); +$bplot->SetFillGradient('AntiqueWhite2', 'AntiqueWhite4:0.8', GRAD_VERT); +$bplot->SetColor('darkred'); +$bplot->SetWeight(0); + +// Create the second bar +$bplot2 = new Plot\BarPlot($datay2); +$bplot2->SetFillGradient('olivedrab1', 'olivedrab4', GRAD_VERT); +$bplot2->SetColor('darkgreen'); +$bplot2->SetWeight(0); + +// And join them in an accumulated bar +$accbplot = new Plot\AccBarPlot(array($bplot, $bplot2)); +$accbplot->SetColor('darkgray'); +$accbplot->SetWeight(1); +$graph->Add($accbplot); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/alphabarex1.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/alphabarex1.php new file mode 100644 index 0000000000..146c655eae --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/alphabarex1.php @@ -0,0 +1,75 @@ +SetScale("textlin"); +$graph->img->SetMargin(40, 80, 30, 40); + +// Adjust the position of the legend box +$graph->legend->Pos(0.02, 0.15); + +// Adjust the color for theshadow of the legend +$graph->legend->SetShadow('darkgray@0.5'); +$graph->legend->SetFillColor('lightblue@0.3'); + +// Get localised version of the month names +$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth()); + +// Set a nice summer (in Stockholm) image +$graph->SetBackgroundImage('stship.jpg', BGIMG_COPY); + +// Set axis titles and fonts +$graph->xaxis->title->Set('Year 2002'); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetColor('white'); + +$graph->xaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->SetColor('white'); + +$graph->yaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->SetColor('white'); + +//$graph->ygrid->Show(false); +$graph->ygrid->SetColor('white@0.5'); + +// Setup graph title +$graph->title->Set('Using alpha blending with a background'); +// Some extra margin (from the top) +$graph->title->SetMargin(3); +$graph->title->SetFont(FF_ARIAL, FS_NORMAL, 12); + +// Create the three var series we will combine +$bplot1 = new Plot\BarPlot($datay1); +$bplot2 = new Plot\BarPlot($datay2); +$bplot3 = new Plot\BarPlot($datay3); + +// Setup the colors with 40% transparency (alpha channel) +$bplot1->SetFillColor('orange@0.4'); +$bplot2->SetFillColor('brown@0.4'); +$bplot3->SetFillColor('darkgreen@0.4'); + +// Setup legends +$bplot1->SetLegend('Label 1'); +$bplot2->SetLegend('Label 2'); +$bplot3->SetLegend('Label 3'); + +// Setup each bar with a shadow of 50% transparency +$bplot1->SetShadow('black@0.4'); +$bplot2->SetShadow('black@0.4'); +$bplot3->SetShadow('black@0.4'); + +$gbarplot = new Plot\GroupBarPlot(array($bplot1, $bplot2, $bplot3)); +$gbarplot->SetWidth(0.6); +$graph->Add($gbarplot); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/bar2scalesex1.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/bar2scalesex1.php new file mode 100644 index 0000000000..8a9572fa23 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/bar2scalesex1.php @@ -0,0 +1,47 @@ +title->Set('Example with 2 scale bars'); + +// Setup Y and Y2 scales with some "grace" +$graph->SetScale("textlin"); +$graph->SetY2Scale("lin"); +$graph->yaxis->scale->SetGrace(30); +$graph->y2axis->scale->SetGrace(30); + +//$graph->ygrid->Show(true,true); +$graph->ygrid->SetColor('gray', 'lightgray@0.5'); + +// Setup graph colors +$graph->SetMarginColor('white'); +$graph->y2axis->SetColor('darkred'); + +// Create the "dummy" 0 bplot +$bplotzero = new Plot\BarPlot($datazero); + +// Create the "Y" axis group +$ybplot1 = new Plot\BarPlot($datay); +$ybplot1->value->Show(); +$ybplot = new Plot\GroupBarPlot(array($ybplot1, $bplotzero)); + +// Create the "Y2" axis group +$ybplot2 = new Plot\BarPlot($datay2); +$ybplot2->value->Show(); +$ybplot2->value->SetColor('darkred'); +$ybplot2->SetFillColor('darkred'); +$y2bplot = new Plot\GroupBarPlot(array($bplotzero, $ybplot2)); + +// Add the grouped bar plots to the graph +$graph->Add($ybplot); +$graph->AddY2($y2bplot); + +// .. and finally stroke the image back to browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/bar_csimex1.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/bar_csimex1.php new file mode 100644 index 0000000000..873950663e --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/bar_csimex1.php @@ -0,0 +1,50 @@ +SetScale("textlin"); +$graph->img->SetMargin(60, 30, 20, 40); +$graph->yaxis->SetTitleMargin(45); +$graph->yaxis->scale->SetGrace(30); +$graph->SetShadow(); + +// Turn the tickmarks +$graph->xaxis->SetTickSide(SIDE_DOWN); +$graph->yaxis->SetTickSide(SIDE_LEFT); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); + +// Create targets for the image maps. One for each column +$targ = array("bar_clsmex1.php#1", "bar_clsmex1.php#2", "bar_clsmex1.php#3", "bar_clsmex1.php#4", "bar_clsmex1.php#5", "bar_clsmex1.php#6"); +$alts = array("val=%d", "val=%d", "val=%d", "val=%d", "val=%d", "val=%d"); +$bplot->SetCSIMTargets($targ, $alts); +$bplot->SetFillColor("orange"); + +// Use a shadow on the bar graphs (just use the default settings) +$bplot->SetShadow(); +$bplot->value->SetFormat(" $ %2.1f", 70); +$bplot->value->SetFont(FF_ARIAL, FS_NORMAL, 9); +$bplot->value->SetColor("blue"); +$bplot->value->Show(); + +$graph->Add($bplot); + +$graph->title->Set("Image maps barex1"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +// Send back the HTML page which will call this script again +// to retrieve the image. +$graph->StrokeCSIM(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/bar_csimex2.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/bar_csimex2.php new file mode 100644 index 0000000000..65b976a3cd --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/bar_csimex2.php @@ -0,0 +1,49 @@ +SetScale("textlin"); +$graph->img->SetMargin(40, 30, 20, 40); +$graph->SetShadow(); + +// Create the bar plots +$b1plot = new Plot\BarPlot($data1y); +$b1plot->SetFillColor("orange"); +$targ = array("bar_clsmex2.php#1", "bar_clsmex2.php#2", "bar_clsmex2.php#3", + "bar_clsmex2.php#4", "bar_clsmex2.php#5", "bar_clsmex2.php#6"); +$alts = array("val=%d", "val=%d", "val=%d", "val=%d", "val=%d", "val=%d"); +$b1plot->SetCSIMTargets($targ, $alts); + +$b2plot = new Plot\BarPlot($data2y); +$b2plot->SetFillColor("blue"); +$targ = array("bar_clsmex2.php#7", "bar_clsmex2.php#8", "bar_clsmex2.php#9", + "bar_clsmex2.php#10", "bar_clsmex2.php#11", "bar_clsmex2.php#12"); +$alts = array("val=%d", "val=%d", "val=%d", "val=%d", "val=%d", "val=%d"); +$b2plot->SetCSIMTargets($targ, $alts); + +// Create the grouped bar plot +$abplot = new Plot\AccBarPlot(array($b1plot, $b2plot)); + +$abplot->SetShadow(); +$abplot->value->Show(); + +// ...and add it to the graPH +$graph->Add($abplot); + +$graph->title->Set("Image map barex2"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +// Send back the HTML page which will call this script again +// to retrieve the image. +$graph->StrokeCSIM(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/bar_csimex3.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/bar_csimex3.php new file mode 100644 index 0000000000..bc67151177 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/bar_csimex3.php @@ -0,0 +1,87 @@ +SetAngle(90); +$graph->SetScale("textlin"); + +// The negative margins are necessary since we +// have rotated the image 90 degress and shifted the +// meaning of width, and height. This means that the +// left and right margins now becomes top and bottom +// calculated with the image width and not the height. +$graph->img->SetMargin(-80, -80, 210, 210); + +$graph->SetMarginColor('white'); + +// Setup title for graph +$graph->title->Set('Horizontal bar graph'); +$graph->title->SetFont(FF_FONT2, FS_BOLD); +$graph->subtitle->Set("With image map\nNote: The URL just points back to this image"); + +// Setup X-axis. +$graph->xaxis->SetTitle("X-title", 'center'); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetAngle(90); +$graph->xaxis->SetTitleMargin(30); +$graph->xaxis->SetLabelMargin(15); +$graph->xaxis->SetLabelAlign('right', 'center'); + +// Setup Y-axis + +// First we want it at the bottom, i.e. the 'max' value of the +// x-axis +$graph->yaxis->SetPos('max'); + +// Arrange the title +$graph->yaxis->SetTitle("Turnaround (mkr)", 'center'); +$graph->yaxis->SetTitleSide(SIDE_RIGHT); +$graph->yaxis->title->SetFont(FF_FONT2, FS_BOLD); +$graph->yaxis->title->SetAngle(0); +$graph->yaxis->title->Align('center', 'top'); +$graph->yaxis->SetTitleMargin(30); + +// Arrange the labels +$graph->yaxis->SetLabelSide(SIDE_RIGHT); +$graph->yaxis->SetLabelAlign('center', 'top'); + +// Create the bar plots with image maps +$b1plot = new Plot\BarPlot($data1y); +$b1plot->SetFillColor("orange"); +$targ = array("bar_clsmex2.php#1", "bar_clsmex2.php#2", "bar_clsmex2.php#3", + "bar_clsmex2.php#4", "bar_clsmex2.php#5", "bar_clsmex2.php#6"); +$alts = array("val=%d", "val=%d", "val=%d", "val=%d", "val=%d", "val=%d"); +$b1plot->SetCSIMTargets($targ, $alts); + +$b2plot = new Plot\BarPlot($data2y); +$b2plot->SetFillColor("blue"); +$targ = array("bar_clsmex2.php#7", "bar_clsmex2.php#8", "bar_clsmex2.php#9", + "bar_clsmex2.php#10", "bar_clsmex2.php#11", "bar_clsmex2.php#12"); +$alts = array("val=%d", "val=%d", "val=%d", "val=%d", "val=%d", "val=%d"); +$b2plot->SetCSIMTargets($targ, $alts); + +// Create the accumulated bar plot +$abplot = new Plot\AccBarPlot(array($b1plot, $b2plot)); +$abplot->SetShadow(); + +// We want to display the value of each bar at the top +$abplot->value->Show(); +$abplot->value->SetFont(FF_FONT1, FS_NORMAL); +$abplot->value->SetAlign('left', 'center'); +$abplot->value->SetColor("black", "darkred"); +$abplot->value->SetFormat('%.1f mkr'); + +// ...and add it to the graph +$graph->Add($abplot); + +// Send back the HTML page which will call this script again +// to retrieve the image. +$graph->StrokeCSIM(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/barcsim_details.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/barcsim_details.php new file mode 100644 index 0000000000..68fb2166e0 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/barcsim_details.php @@ -0,0 +1,10 @@ +'.basename(__FILE__).'.'; +} +else { + echo 'Some details on bar with id='.$_GET['id']; +} + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/barcsim_popup.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/barcsim_popup.php new file mode 100644 index 0000000000..45590a4df8 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/barcsim_popup.php @@ -0,0 +1,40 @@ +SetScale("textlin"); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); + +// Create targets for the image maps so that the details are opened in a separate window +$fmtStr = "javascript:window.open('barcsim_details.php?id=%d','_new','width=500,height=300');void(0)"; +$n = count($datay); +$targ = array(); +$alts = array(); +for ($i = 0; $i < $n; ++$i) { + $targ[$i] = sprintf($fmtStr, $i + 1); + $alts[$i] = 'val=%d'; + // Note: The format placeholder val=%d will be replaced by the actual value in the ouput HTML by the + // library so that when the user hoovers the mouse over the bar the actual numerical value of the bar + // will be dísplayed +} +$bplot->SetCSIMTargets($targ, $alts); + +// Add plot to graph +$graph->Add($bplot); + +// Setup the title, also wih a CSIM area +$graph->title->Set("CSIM with popup windows"); +$graph->title->SetFont(FF_FONT2, FS_BOLD); +// Assume we can give more details on the graph +$graph->title->SetCSIMTarget(sprintf($fmtStr, -1), 'Title for Bar'); + +// Send back the HTML page which will call this script again to retrieve the image. +$graph->StrokeCSIM(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/barformatcallbackex1.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/barformatcallbackex1.php new file mode 100644 index 0000000000..15f744be86 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/barformatcallbackex1.php @@ -0,0 +1,31 @@ +SetScale("textlin"); + +// Create a bar plots +$bar1 = new Plot\BarPlot($data); + +// Setup the callback function +$bar1->value->SetFormatCallback("cbFmtPercentage"); +$bar1->value->Show(); + +// Add the plot to the graph +$graph->Add($bar1); + +// .. and send the graph back to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradex1.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradex1.php new file mode 100644 index 0000000000..dff3162e1c --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradex1.php @@ -0,0 +1,47 @@ +img->SetMargin(60, 20, 35, 75); +$graph->SetScale("textlin"); +$graph->SetMarginColor("lightblue:1.1"); +$graph->SetShadow(); + +// Set up the title for the graph +$graph->title->Set("Bar gradient with left reflection"); +$graph->title->SetMargin(8); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +$graph->title->SetColor("darkred"); + +// Setup font for axis +$graph->xaxis->SetFont(FF_VERDANA, FS_NORMAL, 10); +$graph->yaxis->SetFont(FF_VERDANA, FS_NORMAL, 10); + +// Show 0 label on Y-axis (default is not to show) +$graph->yscale->ticks->SupressZeroLabel(false); + +// Setup X-axis labels +$graph->xaxis->SetTickLabels($datax); +$graph->xaxis->SetLabelAngle(50); + +// Create the bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetWidth(0.6); + +// Setup color for gradient fill style +$bplot->SetFillGradient("navy:0.9", "navy:1.85", GRAD_LEFT_REFLECTION); + +// Set color for the frame of each bar +$bplot->SetColor("white"); +$graph->Add($bplot); + +// Finally send the graph to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradex2.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradex2.php new file mode 100644 index 0000000000..4ebc37ad0f --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradex2.php @@ -0,0 +1,48 @@ +img->SetMargin(60, 20, 30, 50); +$graph->SetScale("textlin"); +$graph->SetMarginColor("silver"); +$graph->SetShadow(); + +// Set up the title for the graph +$graph->title->Set("Example negative bars"); +$graph->title->SetFont(FF_VERDANA, FS_NORMAL, 18); +$graph->title->SetColor("darkred"); + +// Setup font for axis +$graph->xaxis->SetFont(FF_VERDANA, FS_NORMAL, 12); +$graph->xaxis->SetColor("black", "red"); +$graph->yaxis->SetFont(FF_VERDANA, FS_NORMAL, 11); + +// Show 0 label on Y-axis (default is not to show) +$graph->yscale->ticks->SupressZeroLabel(false); + +// Setup X-axis labels +$graph->xaxis->SetTickLabels($datax); +$graph->xaxis->SetLabelAngle(50); + +// Create the bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetWidth(0.6); + +// Setup color for gradient fill style +$bplot->SetFillGradient("navy", "steelblue", GRAD_MIDVER); + +// Set color for the frame of each bar +$bplot->SetColor("navy"); +$graph->Add($bplot); + +// Finally send the graph to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradex3.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradex3.php new file mode 100644 index 0000000000..8586fdf600 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradex3.php @@ -0,0 +1,50 @@ +img->SetMargin(60, 20, 30, 50); +$graph->SetScale("textlin"); +$graph->SetMarginColor("silver"); +$graph->SetShadow(); + +// Set up the title for the graph +$graph->title->Set("Example negative bars"); +$graph->title->SetFont(FF_VERDANA, FS_NORMAL, 16); +$graph->title->SetColor("darkred"); + +// Setup font for axis +$graph->xaxis->SetFont(FF_VERDANA, FS_NORMAL, 10); +$graph->yaxis->SetFont(FF_VERDANA, FS_NORMAL, 10); + +// Show 0 label on Y-axis (default is not to show) +$graph->yscale->ticks->SupressZeroLabel(false); + +// Setup X-axis labels +$graph->xaxis->SetTickLabels($datax); +$graph->xaxis->SetLabelAngle(50); + +// Set X-axis at the minimum value of Y-axis (default will be at 0) +$graph->xaxis->SetPos("min"); // "min" will position the x-axis at the minimum value of the Y-axis + +// Create the bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetWidth(0.6); + +// Setup color for gradient fill style +$bplot->SetFillGradient("navy", "steelblue", GRAD_MIDVER); + +// Set color for the frame of each bar +$bplot->SetColor("navy"); +$graph->Add($bplot); + +// Finally send the graph to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradex4.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradex4.php new file mode 100644 index 0000000000..bffcbeb686 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradex4.php @@ -0,0 +1,47 @@ +img->SetMargin(60, 30, 30, 40); +$graph->SetScale("textlin"); +$graph->SetMarginColor("teal"); +$graph->SetShadow(); + +// Set up the title for the graph +$graph->title->Set("Bargraph with small variations"); +$graph->title->SetColor("white"); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); + +// Setup color for axis and labels +$graph->xaxis->SetColor("black", "white"); +$graph->yaxis->SetColor("black", "white"); + +// Setup font for axis +$graph->xaxis->SetFont(FF_VERDANA, FS_NORMAL, 10); +$graph->yaxis->SetFont(FF_VERDANA, FS_NORMAL, 10); + +// Setup X-axis title (color & font) +$graph->xaxis->title->Set("X-axis"); +$graph->xaxis->title->SetColor("white"); +$graph->xaxis->title->SetFont(FF_VERDANA, FS_BOLD, 10); + +// Create the bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetWidth(0.6); + +// Setup color for gradient fill style +$tcol = array(100, 100, 255); +$fcol = array(255, 100, 100); +$bplot->SetFillGradient($fcol, $tcol, GRAD_HOR); +$graph->Add($bplot); + +// Finally send the graph to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradex5.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradex5.php new file mode 100644 index 0000000000..e95ad5e1b9 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradex5.php @@ -0,0 +1,51 @@ +img->SetMargin(60, 30, 30, 40); +$graph->SetScale("textlin"); +$graph->SetMarginColor("teal"); +$graph->SetShadow(); + +// Create the bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetWidth(0.6); + +// This is how you make the bar graph start from something other than 0 +$bplot->SetYMin(0.302); + +// Setup color for gradient fill style +$tcol = array(100, 100, 255); +$fcol = array(255, 100, 100); +$bplot->SetFillGradient($fcol, $tcol, GRAD_HOR); +$bplot->SetFillColor("orange"); +$graph->Add($bplot); + +// Set up the title for the graph +$graph->title->Set("Bargraph which doesn't start from y=0"); +$graph->title->SetColor("yellow"); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); + +// Setup color for axis and labels +$graph->xaxis->SetColor("black", "white"); +$graph->yaxis->SetColor("black", "white"); + +// Setup font for axis +$graph->xaxis->SetFont(FF_VERDANA, FS_NORMAL, 10); +$graph->yaxis->SetFont(FF_VERDANA, FS_NORMAL, 10); + +// Setup X-axis title (color & font) +$graph->xaxis->title->Set("X-axis"); +$graph->xaxis->title->SetColor("white"); +$graph->xaxis->title->SetFont(FF_VERDANA, FS_BOLD, 10); + +// Finally send the graph to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradex6.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradex6.php new file mode 100644 index 0000000000..f88f259612 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradex6.php @@ -0,0 +1,51 @@ +img->SetMargin(60, 150, 30, 50); +$graph->SetScale("textlin"); +$graph->SetMarginColor("silver"); +$graph->SetShadow(); + +// Set up the title for the graph +$graph->title->Set("Example negative bars"); +$graph->title->SetFont(FF_VERDANA, FS_NORMAL, 16); +$graph->title->SetColor("darkred"); + +// Setup font for axis +$graph->xaxis->SetFont(FF_VERDANA, FS_NORMAL, 10); +$graph->yaxis->SetFont(FF_VERDANA, FS_NORMAL, 10); + +// Show 0 label on Y-axis (default is not to show) +$graph->yscale->ticks->SupressZeroLabel(false); + +// Setup X-axis labels +$graph->xaxis->SetTickLabels($datax); +$graph->xaxis->SetLabelAngle(50); + +// Set X-axis at the minimum value of Y-axis (default will be at 0) +$graph->xaxis->SetPos("min"); // "min" will position the x-axis at the minimum value of the Y-axis + +// Create the bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetWidth(0.6); +$bplot->SetLegend("Result 1999", "blue"); + +// Setup color for gradient fill style +$bplot->SetFillGradient("navy", "steelblue", GRAD_MIDVER); + +// Set color for the frame of each bar +$bplot->SetColor("navy"); +$graph->Add($bplot); + +// Finally send the graph to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradsmallex1.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradsmallex1.php new file mode 100644 index 0000000000..0784d6c860 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradsmallex1.php @@ -0,0 +1,34 @@ +SetScale("textlin"); +$graph->img->SetMargin(25, 15, 25, 25); + +$graph->title->Set('"GRAD_MIDVER"'); +$graph->title->SetColor('darkred'); + +// Setup font for axis +$graph->xaxis->SetFont(FF_FONT1); +$graph->yaxis->SetFont(FF_FONT1); + +// Create the bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetWidth(0.6); + +// Setup color for gradient fill style +$bplot->SetFillGradient("navy", "lightsteelblue", GRAD_MIDVER); + +// Set color for the frame of each bar +$bplot->SetColor("navy"); +$graph->Add($bplot); + +// Finally send the graph to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradsmallex2.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradsmallex2.php new file mode 100644 index 0000000000..b870b4954c --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradsmallex2.php @@ -0,0 +1,34 @@ +SetScale("textlin"); +$graph->img->SetMargin(25, 15, 25, 25); + +$graph->title->Set('"GRAD_MIDHOR"'); +$graph->title->SetColor('darkred'); + +// Setup font for axis +$graph->xaxis->SetFont(FF_FONT1); +$graph->yaxis->SetFont(FF_FONT1); + +// Create the bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetWidth(0.6); + +// Setup color for gradient fill style +$bplot->SetFillGradient("navy", "lightsteelblue", GRAD_MIDHOR); + +// Set color for the frame of each bar +$bplot->SetColor("navy"); +$graph->Add($bplot); + +// Finally send the graph to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradsmallex3.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradsmallex3.php new file mode 100644 index 0000000000..f66c9bab1b --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradsmallex3.php @@ -0,0 +1,34 @@ +SetScale("textlin"); +$graph->img->SetMargin(25, 15, 25, 25); + +$graph->title->Set('"GRAD_HOR"'); +$graph->title->SetColor('darkred'); + +// Setup font for axis +$graph->xaxis->SetFont(FF_FONT1); +$graph->yaxis->SetFont(FF_FONT1); + +// Create the bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetWidth(0.6); + +// Setup color for gradient fill style +$bplot->SetFillGradient("navy", "lightsteelblue", GRAD_HOR); + +// Set color for the frame of each bar +$bplot->SetColor("navy"); +$graph->Add($bplot); + +// Finally send the graph to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradsmallex4.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradsmallex4.php new file mode 100644 index 0000000000..b1b64ce564 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradsmallex4.php @@ -0,0 +1,34 @@ +SetScale("textlin"); +$graph->img->SetMargin(25, 15, 25, 25); + +$graph->title->Set('"GRAD_VER"'); +$graph->title->SetColor('darkred'); + +// Setup font for axis +$graph->xaxis->SetFont(FF_FONT1); +$graph->yaxis->SetFont(FF_FONT1); + +// Create the bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetWidth(0.6); + +// Setup color for gradient fill style +$bplot->SetFillGradient("navy", "lightsteelblue", GRAD_VER); + +// Set color for the frame of each bar +$bplot->SetColor("navy"); +$graph->Add($bplot); + +// Finally send the graph to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradsmallex5.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradsmallex5.php new file mode 100644 index 0000000000..4110f8d100 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradsmallex5.php @@ -0,0 +1,34 @@ +SetScale("textlin"); +$graph->img->SetMargin(25, 15, 25, 25); + +$graph->title->Set('"GRAD_WIDE_MIDVER"'); +$graph->title->SetColor('darkred'); + +// Setup font for axis +$graph->xaxis->SetFont(FF_FONT1); +$graph->yaxis->SetFont(FF_FONT1); + +// Create the bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetWidth(0.6); + +// Setup color for gradient fill style +$bplot->SetFillGradient("navy", "lightsteelblue", GRAD_WIDE_MIDVER); + +// Set color for the frame of each bar +$bplot->SetColor("navy"); +$graph->Add($bplot); + +// Finally send the graph to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradsmallex6.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradsmallex6.php new file mode 100644 index 0000000000..76003d592b --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradsmallex6.php @@ -0,0 +1,34 @@ +SetScale("textlin"); +$graph->img->SetMargin(25, 15, 25, 25); + +$graph->title->Set('"GRAD_WIDE_MIDHOR"'); +$graph->title->SetColor('darkred'); + +// Setup font for axis +$graph->xaxis->SetFont(FF_FONT1); +$graph->yaxis->SetFont(FF_FONT1); + +// Create the bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetWidth(0.6); + +// Setup color for gradient fill style +$bplot->SetFillGradient("navy", "lightsteelblue", GRAD_WIDE_MIDHOR); + +// Set color for the frame of each bar +$bplot->SetColor("navy"); +$graph->Add($bplot); + +// Finally send the graph to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradsmallex7.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradsmallex7.php new file mode 100644 index 0000000000..cef5ea07c2 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradsmallex7.php @@ -0,0 +1,34 @@ +SetScale("textlin"); +$graph->img->SetMargin(25, 15, 25, 25); + +$graph->title->Set('"GRAD_CENTER"'); +$graph->title->SetColor('darkred'); + +// Setup font for axis +$graph->xaxis->SetFont(FF_FONT1); +$graph->yaxis->SetFont(FF_FONT1); + +// Create the bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetWidth(0.6); + +// Setup color for gradient fill style +$bplot->SetFillGradient("navy", "lightsteelblue", GRAD_CENTER); + +// Set color for the frame of each bar +$bplot->SetColor("navy"); +$graph->Add($bplot); + +// Finally send the graph to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradsmallex8.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradsmallex8.php new file mode 100644 index 0000000000..0d426b38e6 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/bargradsmallex8.php @@ -0,0 +1,34 @@ +SetScale("textlin"); +$graph->img->SetMargin(25, 15, 25, 25); + +$graph->title->Set('"GRAD_RAISED_PANEL"'); +$graph->title->SetColor('darkred'); + +// Setup font for axis +$graph->xaxis->SetFont(FF_FONT1); +$graph->yaxis->SetFont(FF_FONT1); + +// Create the bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetWidth(0.6); + +// Setup color for gradient fill style +$bplot->SetFillGradient('navy', 'orange', GRAD_RAISED_PANEL); + +// Set color for the frame of each bar +$bplot->SetColor("navy"); +$graph->Add($bplot); + +// Finally send the graph to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/barimgex1.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/barimgex1.php new file mode 100644 index 0000000000..a2bcadb2f3 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/barimgex1.php @@ -0,0 +1,29 @@ +SetScale("textlin"); + +$graph->title->Set('Images on top of bars'); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 13); + +$graph->SetTitleBackground('lightblue:1.1', TITLEBKG_STYLE1, TITLEBKG_FRAME_BEVEL); + +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor("orange"); +$bplot->SetWidth(0.5); + +$lplot = new Plot\LinePlot($datay); +$lplot->SetColor('white@1'); +$lplot->SetBarCenter(); +$lplot->mark->SetType(MARK_IMG_LBALL, 'red'); + +$graph->Add($bplot); +$graph->Add($lplot); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/barintex1.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/barintex1.php new file mode 100644 index 0000000000..9dadebcc8a --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/barintex1.php @@ -0,0 +1,48 @@ +img->SetMargin(40, 30, 30, 40); +$graph->SetScale("textint"); +$graph->SetShadow(); +$graph->SetFrame(false); // No border around the graph + +// Add some grace to the top so that the scale doesn't +// end exactly at the max value. +$graph->yaxis->scale->SetGrace(100); + +// Setup X-axis labels +$a = $gDateLocale->GetShortMonth(); +$graph->xaxis->SetTickLabels($a); +$graph->xaxis->SetFont(FF_FONT2); + +// Setup graph title ands fonts +$graph->title->Set("Example of integer Y-scale"); +$graph->title->SetFont(FF_FONT2, FS_BOLD); +$graph->xaxis->title->Set("Year 2002"); +$graph->xaxis->title->SetFont(FF_FONT2, FS_BOLD); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor("orange"); +$bplot->SetWidth(0.5); +$bplot->SetShadow(); + +// Setup the values that are displayed on top of each bar +$bplot->value->Show(); +// Must use TTF fonts if we want text at an arbitrary angle +$bplot->value->SetFont(FF_ARIAL, FS_BOLD); +$bplot->value->SetAngle(45); +// Black color for positive values and darkred for negative values +$bplot->value->SetColor("black", "darkred"); +$graph->Add($bplot); + +// Finally stroke the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/barintex2.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/barintex2.php new file mode 100644 index 0000000000..ac5cccd5ee --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/barintex2.php @@ -0,0 +1,57 @@ +img->SetMargin(40, 30, 40, 40); +$graph->SetScale("textint"); +$graph->SetFrame(true, 'blue', 1); +$graph->SetColor('lightblue'); +$graph->SetMarginColor('lightblue'); + +// Add some grace to the top so that the scale doesn't +// end exactly at the max value. +//$graph->yaxis->scale->SetGrace(20); + +// Setup X-axis labels +$a = $gDateLocale->GetShortMonth(); +$graph->xaxis->SetTickLabels($a); +$graph->xaxis->SetFont(FF_FONT1); +$graph->xaxis->SetColor('darkblue', 'black'); + +// Stup "hidden" y-axis by given it the same color +// as the background +$graph->yaxis->SetColor('lightblue', 'darkblue'); +$graph->ygrid->SetColor('white'); + +// Setup graph title ands fonts +$graph->title->Set('Example of integer Y-scale'); +$graph->subtitle->Set('(With "hidden" y-axis)'); + +$graph->title->SetFont(FF_FONT2, FS_BOLD); +$graph->xaxis->title->Set("Year 2002"); +$graph->xaxis->title->SetFont(FF_FONT2, FS_BOLD); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor('darkblue'); +$bplot->SetColor('darkblue'); +$bplot->SetWidth(0.5); +$bplot->SetShadow('darkgray'); + +// Setup the values that are displayed on top of each bar +$bplot->value->Show(); +// Must use TTF fonts if we want text at an arbitrary angle +$bplot->value->SetFont(FF_ARIAL, FS_NORMAL, 8); +$bplot->value->SetFormat('$%d'); +// Black color for positive values and darkred for negative values +$bplot->value->SetColor("black", "darkred"); +$graph->Add($bplot); + +// Finally stroke the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/barline_csimex1.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/barline_csimex1.php new file mode 100644 index 0000000000..c9d99e654b --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/barline_csimex1.php @@ -0,0 +1,39 @@ +SetScale("textlin"); +$graph->img->SetMargin(40, 20, 30, 40); +$graph->title->Set("CSIM example with bar and line"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Setup axis titles +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot->mark->SetType(MARK_FILLEDCIRCLE); +$lineplot->mark->SetWidth(5); +$lineplot->mark->SetColor('black'); +$lineplot->mark->SetFillColor('red'); +$lineplot->SetCSIMTargets($targ, $alt); + +// Create line plot +$barplot = new Plot\BarPlot($ydata2); +$barplot->SetCSIMTargets($targ, $alt); + +// Add the plots to the graph +$graph->Add($lineplot); +$graph->Add($barplot); + +$graph->StrokeCSIM(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/barlinealphaex1.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/barlinealphaex1.php new file mode 100644 index 0000000000..b9ba9281df --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/barlinealphaex1.php @@ -0,0 +1,74 @@ +GetShortMonth(); + +// Create the graph. +$graph = new Graph\Graph(300, 200); +$graph->SetScale("textlin"); +$graph->SetMarginColor('white'); + +// Adjust the margin slightly so that we use the +// entire area (since we don't use a frame) +$graph->SetMargin(30, 1, 20, 5); + +// Box around plotarea +$graph->SetBox(); + +// No frame around the image +$graph->SetFrame(false); + +// Setup the tab title +$graph->tabtitle->Set('Year 2003'); +$graph->tabtitle->SetFont(FF_ARIAL, FS_BOLD, 10); + +// Setup the X and Y grid +$graph->ygrid->SetFill(true, '#DDDDDD@0.5', '#BBBBBB@0.5'); +$graph->ygrid->SetLineStyle('dashed'); +$graph->ygrid->SetColor('gray'); +$graph->xgrid->Show(); +$graph->xgrid->SetLineStyle('dashed'); +$graph->xgrid->SetColor('gray'); + +// Setup month as labels on the X-axis +$graph->xaxis->SetTickLabels($months); +$graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 8); +$graph->xaxis->SetLabelAngle(45); + +// Create a bar pot +$bplot = new Plot\BarPlot($ydata); +$bplot->SetWidth(0.6); +$fcol = '#440000'; +$tcol = '#FF9090'; + +$bplot->SetFillGradient($fcol, $tcol, GRAD_LEFT_REFLECTION); + +// Set line weigth to 0 so that there are no border +// around each bar +$bplot->SetWeight(0); + +$graph->Add($bplot); + +// Create filled line plot +$lplot = new Plot\LinePlot($ydata2); +$lplot->SetFillColor('skyblue@0.5'); +$lplot->SetColor('navy@0.7'); +$lplot->SetBarCenter(); + +$lplot->mark->SetType(MARK_SQUARE); +$lplot->mark->SetColor('blue@0.5'); +$lplot->mark->SetFillColor('lightblue'); +$lplot->mark->SetSize(6); + +$graph->Add($lplot); + +// .. and finally send it back to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/barlinefreq_csimex1.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/barlinefreq_csimex1.php new file mode 100644 index 0000000000..c921f2dc2f --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/barlinefreq_csimex1.php @@ -0,0 +1,97 @@ +CheckCSIMCache('auto'); + +// Setup some basic graph parameters +$graph->SetScale("textlin"); +$graph->SetY2Scale('lin', 0, 100); +$graph->img->SetMargin(50, 70, 30, 40); +$graph->yaxis->SetTitleMargin(30); +$graph->SetMarginColor('#EEEEEE'); + +// Setup titles and fonts +$graph->title->Set("Frequence plot"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +// Turn the tickmarks +$graph->xaxis->SetTickSide(SIDE_DOWN); +$graph->yaxis->SetTickSide(SIDE_LEFT); + +$graph->y2axis->SetTickSide(SIDE_RIGHT); +$graph->y2axis->SetColor('black', 'blue'); +$graph->y2axis->SetLabelFormat('%3d.0%%'); + +// Create a bar pot +$bplot = new Plot\BarPlot($data_freq); + +// Create targets and alt texts for the image maps. One for each bar +// (In this example this is just "dummy" targets) +$targ = array("#1", "#2", "#3", "#4", "#5", "#6", "#7"); +$alts = array("val=%d", "val=%d", "val=%d", "val=%d", "val=%d", "val=%d", "val=%d"); +$bplot->SetCSIMTargets($targ, $alts); + +// Create accumulative graph +$lplot = new Plot\LinePlot($data_accfreq); + +// We want the line plot data point in the middle of the bars +$lplot->SetBarCenter(); + +// Use transperancy +$lplot->SetFillColor('lightblue@0.6'); +$lplot->SetColor('blue@0.6'); +//$lplot->SetColor('blue'); +$graph->AddY2($lplot); + +// Setup the bars +$bplot->SetFillColor("orange@0.2"); +$bplot->SetValuePos('center'); +$bplot->value->SetFormat("%d"); +$bplot->value->SetFont(FF_ARIAL, FS_NORMAL, 9); +$bplot->value->Show(); + +// Add it to the graph +$graph->Add($bplot); + +// Send back the HTML page which will call this script again +// to retrieve the image. +$graph->StrokeCSIM(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/barlinefreqex1.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/barlinefreqex1.php new file mode 100644 index 0000000000..c674fd1495 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/barlinefreqex1.php @@ -0,0 +1,83 @@ +SetScale("textlin"); +$graph->SetY2Scale('lin', 0, 100); +$graph->img->SetMargin(50, 70, 30, 40); +$graph->yaxis->SetTitleMargin(30); +$graph->SetMarginColor('#EEEEEE'); + +// Setup titles and fonts +$graph->title->Set("Frequence plot"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +// Turn the tickmarks +$graph->xaxis->SetTickSide(SIDE_DOWN); +$graph->yaxis->SetTickSide(SIDE_LEFT); + +$graph->y2axis->SetTickSide(SIDE_RIGHT); +$graph->y2axis->SetColor('black', 'blue'); +$graph->y2axis->SetLabelFormat('%3d.0%%'); + +// Create a bar pot +$bplot = new Plot\BarPlot($data_freq); + +// Create accumulative graph +$lplot = new Plot\LinePlot($data_accfreq); + +// We want the line plot data point in the middle of the bars +$lplot->SetBarCenter(); + +// Use transperancy +$lplot->SetFillColor('lightblue@0.6'); +$lplot->SetColor('blue@0.6'); +$graph->AddY2($lplot); + +// Setup the bars +$bplot->SetFillColor("orange@0.2"); +$bplot->SetValuePos('center'); +$bplot->value->SetFormat("%d"); +$bplot->value->SetFont(FF_ARIAL, FS_NORMAL, 9); +$bplot->value->Show(); + +// Add it to the graph +$graph->Add($bplot); + +// Send back the HTML page which will call this script again +// to retrieve the image. +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/barpatternex1.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/barpatternex1.php new file mode 100644 index 0000000000..609d39540d --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/barpatternex1.php @@ -0,0 +1,33 @@ +SetScale("textlin"); + +$graph->SetMarginColor('navy:1.9'); +$graph->SetBox(); + +$graph->title->Set('Bar Pattern'); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 20); + +$graph->SetTitleBackground('lightblue:1.3', TITLEBKG_STYLE2, TITLEBKG_FRAME_BEVEL); +$graph->SetTitleBackgroundFillStyle(TITLEBKG_FILLSTYLE_HSTRIPED, 'lightblue', 'blue'); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor('darkorange'); +$bplot->SetWidth(0.6); + +$bplot->SetPattern(PATTERN_CROSS1, 'navy'); + +$graph->Add($bplot); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/barscalecallbackex1.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/barscalecallbackex1.php new file mode 100644 index 0000000000..6f1603bdb4 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/barscalecallbackex1.php @@ -0,0 +1,65 @@ +img->SetMargin(80, 30, 30, 40); +$graph->SetScale('textint'); +$graph->SetShadow(); +$graph->SetFrame(false); // No border around the graph + +// Add some grace to the top so that the scale doesn't +// end exactly at the max value. +// The grace value is the percetage of additional scale +// value we add. Specifying 50 means that we add 50% of the +// max value +$graph->yaxis->scale->SetGrace(50); +$graph->yaxis->SetLabelFormatCallback('separator1000'); + +// Setup X-axis labels +$a = $gDateLocale->GetShortMonth(); +$graph->xaxis->SetTickLabels($a); +$graph->xaxis->SetFont(FF_FONT2); + +// Setup graph title ands fonts +$graph->title->Set('Example of Y-scale callback formatting'); +$graph->title->SetFont(FF_FONT2, FS_BOLD); +$graph->xaxis->title->Set('Year 2002'); +$graph->xaxis->title->SetFont(FF_FONT2, FS_BOLD); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor('orange'); +$bplot->SetWidth(0.5); +$bplot->SetShadow(); + +// Setup the values that are displayed on top of each bar +$bplot->value->Show(); + +// Must use TTF fonts if we want text at an arbitrary angle +$bplot->value->SetFont(FF_ARIAL, FS_BOLD); +$bplot->value->SetAngle(45); +$bplot->value->SetFormatCallback('separator1000_usd'); + +// Black color for positive values and darkred for negative values +$bplot->value->SetColor('black', 'darkred'); +$graph->Add($bplot); + +// Finally stroke the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/bartutex1.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/bartutex1.php new file mode 100644 index 0000000000..c45db7bfdd --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/bartutex1.php @@ -0,0 +1,32 @@ +SetShadow(); + +// Use a "text" X-scale +$graph->SetScale("textlin"); + +// Set title and subtitle +$graph->title->Set("Elementary barplot with a text scale"); + +// Use built in font +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Create the bar plot +$b1 = new Plot\BarPlot($databary); +$b1->SetLegend("Temperature"); +//$b1->SetAbsWidth(6); +//$b1->SetShadow(); + +// The order the plots are added determines who's ontop +$graph->Add($b1); + +// Finally output the image +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/bartutex12.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/bartutex12.php new file mode 100644 index 0000000000..9384506e02 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/bartutex12.php @@ -0,0 +1,86 @@ +SetBackgroundImage("tiger_bkg.png", BGIMG_FILLFRAME); +$graph->SetShadow(); + +// Use text X-scale so we can text labels on the X-axis +$graph->SetScale("textlin"); + +// Y2-axis is linear +$graph->SetY2Scale("lin"); + +// Color the two Y-axis to make them easier to associate +// to the corresponding plot (we keep the axis black though) +$graph->yaxis->SetColor("black", "red"); +$graph->y2axis->SetColor("black", "orange"); + +// Set title and subtitle +$graph->title->Set("Combined bar and line plot"); +$graph->subtitle->Set("100 data points, X-Scale: 'text'"); + +// Use built in font (don't need TTF support) +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Make the margin around the plot a little bit bigger then default +$graph->img->SetMargin(40, 140, 40, 80); + +// Slightly adjust the legend from it's default position in the +// top right corner to middle right side +$graph->legend->Pos(0.03, 0.5, "right", "center"); + +// Display every 6:th tickmark +$graph->xaxis->SetTextTickInterval(6); + +// Label every 2:nd tick mark +$graph->xaxis->SetTextLabelInterval(2); + +// Setup the labels +$graph->xaxis->SetTickLabels($databarx); +$graph->xaxis->SetLabelAngle(90); + +// Create a red line plot +$p1 = new Plot\LinePlot($datay); +$p1->SetColor("red"); +$p1->SetLegend("Pressure"); + +// Create the bar plot +$b1 = new Plot\BarPlot($databary); +$b1->SetLegend("Temperature"); +$b1->SetFillColor("orange"); +$b1->SetAbsWidth(8); + +// Drop shadow on bars adjust the default values a little bit +$b1->SetShadow("steelblue", 2, 2); + +// The order the plots are added determines who's ontop +$graph->Add($p1); +$graph->AddY2($b1); + +// Finally output the image +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/bartutex2.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/bartutex2.php new file mode 100644 index 0000000000..1e69a55953 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/bartutex2.php @@ -0,0 +1,37 @@ +GetShortMonth(); + +// new Graph\Graph with a drop shadow +$graph = new Graph\Graph(300, 200, 'auto'); +$graph->SetShadow(); + +// Use a "text" X-scale +$graph->SetScale("textlin"); + +// Specify X-labels +$graph->xaxis->SetTickLabels($months); + +// Set title and subtitle +$graph->title->Set("Textscale with specified labels"); + +// Use built in font +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Create the bar plot +$b1 = new Plot\BarPlot($databary); +$b1->SetLegend("Temperature"); + +//$b1->SetAbsWidth(6); +//$b1->SetShadow(); + +// The order the plots are added determines who's ontop +$graph->Add($b1); + +// Finally output the image +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/bartutex3.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/bartutex3.php new file mode 100644 index 0000000000..0558e11f81 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/bartutex3.php @@ -0,0 +1,41 @@ +GetShortMonth(); + +srand((double) microtime() * 1000000); +for ($i = 0; $i < 25; ++$i) { + $databary[] = rand(1, 50); + $databarx[] = $months[$i % 12]; +} + +// new Graph\Graph with a drop shadow +$graph = new Graph\Graph(300, 200, 'auto'); +$graph->SetShadow(); + +// Use a "text" X-scale +$graph->SetScale("textlin"); + +// Specify X-labels +$graph->xaxis->SetTickLabels($databarx); + +// Set title and subtitle +$graph->title->Set("Bar tutorial example 3"); + +// Use built in font +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Create the bar plot +$b1 = new Plot\BarPlot($databary); +$b1->SetLegend("Temperature"); +//$b1->SetAbsWidth(6); +//$b1->SetShadow(); + +// The order the plots are added determines who's ontop +$graph->Add($b1); + +// Finally output the image +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/bartutex4.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/bartutex4.php new file mode 100644 index 0000000000..8f44546fd9 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/bartutex4.php @@ -0,0 +1,44 @@ +GetShortMonth(); + +srand((double) microtime() * 1000000); +for ($i = 0; $i < 25; ++$i) { + $databary[] = rand(1, 50); + $databarx[] = $months[$i % 12]; +} + +// new Graph\Graph with a drop shadow +$graph = new Graph\Graph(300, 200, 'auto'); +$graph->SetShadow(); + +// Use a "text" X-scale +$graph->SetScale("textlin"); + +// Specify X-labels +//$databarx = array('tXi','','','xxx','','','iXii','','','OOO','','','tOO'); +$graph->xaxis->SetFont(FF_FONT1, FS_NORMAL); +$graph->xaxis->SetTickLabels($databarx); +$graph->xaxis->SetTextLabelInterval(3); + +// Set title and subtitle +$graph->title->Set("Displaying only every third label"); + +// Use built in font +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Create the bar plot +$b1 = new Plot\BarPlot($databary); +$b1->SetLegend("Temperature"); +//$b1->SetAbsWidth(6); +//$b1->SetShadow(); + +// The order the plots are added determines who's ontop +$graph->Add($b1); + +// Finally output the image +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/bartutex5.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/bartutex5.php new file mode 100644 index 0000000000..4eb1b4327f --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/bartutex5.php @@ -0,0 +1,42 @@ +GetShortMonth(); + +srand((double) microtime() * 1000000); +for ($i = 0; $i < 25; ++$i) { + $databary[] = rand(1, 50); + $databarx[] = $months[$i % 12]; +} + +// new Graph\Graph with a drop shadow +$graph = new Graph\Graph(300, 200, 'auto'); +$graph->SetShadow(); + +// Use a "text" X-scale +$graph->SetScale("textlin"); + +// Specify X-labels +$graph->xaxis->SetTickLabels($databarx); +$graph->xaxis->SetTextLabelInterval(1); +$graph->xaxis->SetTextTickInterval(3); + +// Set title and subtitle +$graph->title->Set("Bar tutorial example 5"); + +// Use built in font +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Create the bar plot +$b1 = new Plot\BarPlot($databary); +$b1->SetLegend("Temperature"); +$b1->SetWidth(0.4); + +// The order the plots are added determines who's ontop +$graph->Add($b1); + +// Finally output the image +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/bartutex6.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/bartutex6.php new file mode 100644 index 0000000000..6a1b64011f --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/bartutex6.php @@ -0,0 +1,43 @@ +GetShortMonth(); +srand((double) microtime() * 1000000); +for ($i = 0; $i < 25; ++$i) { + $databary[] = rand(1, 50); + $databarx[] = $months[$i % 12]; +} + +// new Graph\Graph with a drop shadow +$graph = new Graph\Graph(300, 200, 'auto'); +$graph->SetShadow(); + +// Use a "text" X-scale +$graph->SetScale("textlin"); + +// Specify X-labels +$graph->xaxis->SetTickLabels($databarx); +$graph->xaxis->SetTextLabelInterval(3); + +// Hide the tick marks +$graph->xaxis->HideTicks(); + +// Set title and subtitle +$graph->title->Set("Bar tutorial example 6"); + +// Use built in font +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Create the bar plot +$b1 = new Plot\BarPlot($databary); +$b1->SetLegend("Temperature"); +$b1->SetWidth(0.4); + +// The order the plots are added determines who's ontop +$graph->Add($b1); + +// Finally output the image +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/grace_ex0.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/grace_ex0.php new file mode 100644 index 0000000000..656362f0e2 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/grace_ex0.php @@ -0,0 +1,57 @@ +img->SetMargin(40, 30, 40, 50); +$graph->SetScale("textint"); +$graph->SetFrame(true, 'blue', 1); +$graph->SetColor('lightblue'); +$graph->SetMarginColor('lightblue'); + +// Setup X-axis labels +$a = $gDateLocale->GetShortMonth(); +$graph->xaxis->SetTickLabels($a); +$graph->xaxis->SetFont(FF_FONT1); +$graph->xaxis->SetColor('darkblue', 'black'); + +// Setup "hidden" y-axis by given it the same color +// as the background (this could also be done by setting the weight +// to zero) +$graph->yaxis->SetColor('lightblue', 'darkblue'); +$graph->ygrid->SetColor('white'); + +// Setup graph title ands fonts +$graph->title->Set('Using grace = 0'); +$graph->title->SetFont(FF_FONT2, FS_BOLD); +$graph->xaxis->SetTitle('Year 2002', 'center'); +$graph->xaxis->SetTitleMargin(10); +$graph->xaxis->title->SetFont(FF_FONT2, FS_BOLD); + +// Add some grace to the top so that the scale doesn't +// end exactly at the max value. +$graph->yaxis->scale->SetGrace(0); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor('darkblue'); +$bplot->SetColor('darkblue'); +$bplot->SetWidth(0.5); +$bplot->SetShadow('darkgray'); + +// Setup the values that are displayed on top of each bar +// Must use TTF fonts if we want text at an arbitrary angle +$bplot->value->Show(); +$bplot->value->SetFont(FF_ARIAL, FS_NORMAL, 8); +$bplot->value->SetFormat('$%d'); +$bplot->value->SetColor('darkred'); +$bplot->value->SetAngle(45); +$graph->Add($bplot); + +// Finally stroke the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/grace_ex1.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/grace_ex1.php new file mode 100644 index 0000000000..9a97ca769c --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/grace_ex1.php @@ -0,0 +1,57 @@ +img->SetMargin(40, 30, 40, 50); +$graph->SetScale("textint"); +$graph->SetFrame(true, 'blue', 1); +$graph->SetColor('lightblue'); +$graph->SetMarginColor('lightblue'); + +// Setup X-axis labels +$a = $gDateLocale->GetShortMonth(); +$graph->xaxis->SetTickLabels($a); +$graph->xaxis->SetFont(FF_FONT1); +$graph->xaxis->SetColor('darkblue', 'black'); + +// Setup "hidden" y-axis by given it the same color +// as the background (this could also be done by setting the weight +// to zero) +$graph->yaxis->SetColor('lightblue', 'darkblue'); +$graph->ygrid->SetColor('white'); + +// Setup graph title ands fonts +$graph->title->Set('Using grace = 10%'); +$graph->title->SetFont(FF_FONT2, FS_BOLD); +$graph->xaxis->SetTitle('Year 2002', 'center'); +$graph->xaxis->SetTitleMargin(10); +$graph->xaxis->title->SetFont(FF_FONT2, FS_BOLD); + +// Add some grace to the top so that the scale doesn't +// end exactly at the max value. +$graph->yaxis->scale->SetGrace(10); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor('darkblue'); +$bplot->SetColor('darkblue'); +$bplot->SetWidth(0.5); +$bplot->SetShadow('darkgray'); + +// Setup the values that are displayed on top of each bar +// Must use TTF fonts if we want text at an arbitrary angle +$bplot->value->Show(); +$bplot->value->SetFont(FF_ARIAL, FS_NORMAL, 8); +$bplot->value->SetFormat('$%d'); +$bplot->value->SetColor('darkred'); +$bplot->value->SetAngle(45); +$graph->Add($bplot); + +// Finally stroke the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/grace_ex2.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/grace_ex2.php new file mode 100644 index 0000000000..4567ce32c6 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/grace_ex2.php @@ -0,0 +1,57 @@ +img->SetMargin(40, 30, 40, 50); +$graph->SetScale("textint"); +$graph->SetFrame(true, 'blue', 1); +$graph->SetColor('lightblue'); +$graph->SetMarginColor('lightblue'); + +// Setup X-axis labels +$a = $gDateLocale->GetShortMonth(); +$graph->xaxis->SetTickLabels($a); +$graph->xaxis->SetFont(FF_FONT1); +$graph->xaxis->SetColor('darkblue', 'black'); + +// Setup "hidden" y-axis by given it the same color +// as the background (this could also be done by setting the weight +// to zero) +$graph->yaxis->SetColor('lightblue', 'darkblue'); +$graph->ygrid->SetColor('white'); + +// Setup graph title ands fonts +$graph->title->Set('Using grace = 50%'); +$graph->title->SetFont(FF_FONT2, FS_BOLD); +$graph->xaxis->SetTitle('Year 2002', 'center'); +$graph->xaxis->SetTitleMargin(10); +$graph->xaxis->title->SetFont(FF_FONT2, FS_BOLD); + +// Add some grace to the top so that the scale doesn't +// end exactly at the max value. +$graph->yaxis->scale->SetGrace(50); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor('darkblue'); +$bplot->SetColor('darkblue'); +$bplot->SetWidth(0.5); +$bplot->SetShadow('darkgray'); + +// Setup the values that are displayed on top of each bar +// Must use TTF fonts if we want text at an arbitrary angle +$bplot->value->Show(); +$bplot->value->SetFont(FF_ARIAL, FS_NORMAL, 8); +$bplot->value->SetFormat('$%d'); +$bplot->value->SetColor('darkred'); +$bplot->value->SetAngle(45); +$graph->Add($bplot); + +// Finally stroke the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/grace_ex3.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/grace_ex3.php new file mode 100644 index 0000000000..3eb679ac53 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/grace_ex3.php @@ -0,0 +1,57 @@ +img->SetMargin(40, 30, 40, 50); +$graph->SetScale("textint"); +$graph->SetFrame(true, 'blue', 1); +$graph->SetColor('lightblue'); +$graph->SetMarginColor('lightblue'); + +// Setup X-axis labels +$a = $gDateLocale->GetShortMonth(); +$graph->xaxis->SetTickLabels($a); +$graph->xaxis->SetFont(FF_FONT1); +$graph->xaxis->SetColor('darkblue', 'black'); + +// Setup "hidden" y-axis by given it the same color +// as the background (this could also be done by setting the weight +// to zero) +$graph->yaxis->SetColor('lightblue', 'darkblue'); +$graph->ygrid->SetColor('white'); + +// Setup graph title ands fonts +$graph->title->Set('Using grace = 100%'); +$graph->title->SetFont(FF_FONT2, FS_BOLD); +$graph->xaxis->SetTitle('Year 2002', 'center'); +$graph->xaxis->SetTitleMargin(10); +$graph->xaxis->title->SetFont(FF_FONT2, FS_BOLD); + +// Add some grace to the top so that the scale doesn't +// end exactly at the max value. +$graph->yaxis->scale->SetGrace(100); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor('darkblue'); +$bplot->SetColor('darkblue'); +$bplot->SetWidth(0.5); +$bplot->SetShadow('darkgray'); + +// Setup the values that are displayed on top of each bar +// Must use TTF fonts if we want text at an arbitrary angle +$bplot->value->Show(); +$bplot->value->SetFont(FF_ARIAL, FS_NORMAL, 8); +$bplot->value->SetFormat('$%d'); +$bplot->value->SetColor('darkred'); +$bplot->value->SetAngle(45); +$graph->Add($bplot); + +// Finally stroke the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/groupbarex1.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/groupbarex1.php new file mode 100644 index 0000000000..4f3f060636 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/groupbarex1.php @@ -0,0 +1,43 @@ +SetScale("textlin"); +$graph->SetShadow(); +$graph->img->SetMargin(40, 30, 40, 40); +$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth()); + +$graph->xaxis->title->Set('Year 2002'); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +$graph->title->Set('Group bar plot'); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +$bplot1 = new Plot\BarPlot($datay1); +$bplot2 = new Plot\BarPlot($datay2); +$bplot3 = new Plot\BarPlot($datay3); + +$bplot1->SetFillColor("orange"); +$bplot2->SetFillColor("brown"); +$bplot3->SetFillColor("darkgreen"); + +$bplot1->SetShadow(); +$bplot2->SetShadow(); +$bplot3->SetShadow(); + +$bplot1->SetShadow(); +$bplot2->SetShadow(); +$bplot3->SetShadow(); + +$gbarplot = new Plot\GroupBarPlot(array($bplot1, $bplot2, $bplot3)); +$gbarplot->SetWidth(0.6); +$graph->Add($gbarplot); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/horizbarex1.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/horizbarex1.php new file mode 100644 index 0000000000..87eacf56d2 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/horizbarex1.php @@ -0,0 +1,63 @@ +SetScale('textlin'); + +// Rotate graph 90 degrees and set margin +$graph->Set90AndMargin(50, 20, 50, 30); + +// Nice shadow +$graph->SetShadow(); + +// Setup title +$graph->title->Set('Horizontal bar graph ex 1'); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 14); + +// Setup X-axis +$graph->xaxis->SetTickLabels($datax); +$graph->xaxis->SetFont(FF_VERDANA, FS_NORMAL, 12); + +// Some extra margin looks nicer +$graph->xaxis->SetLabelMargin(10); + +// Label align for X-axis +$graph->xaxis->SetLabelAlign('right', 'center'); + +// Add some grace to y-axis so the bars doesn't go +// all the way to the end of the plot area +$graph->yaxis->scale->SetGrace(20); + +// We don't want to display Y-axis +$graph->yaxis->Hide(); + +// Now create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor('orange'); +$bplot->SetShadow(); + +//You can change the width of the bars if you like +//$bplot->SetWidth(0.5); + +// We want to display the value of each bar at the top +$bplot->value->Show(); +$bplot->value->SetFont(FF_ARIAL, FS_BOLD, 12); +$bplot->value->SetAlign('left', 'center'); +$bplot->value->SetColor('black', 'darkred'); +$bplot->value->SetFormat('%.1f mkr'); + +// Add the bar to the graph +$graph->Add($bplot); + +// .. and stroke the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/horizbarex2.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/horizbarex2.php new file mode 100644 index 0000000000..268413323a --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/horizbarex2.php @@ -0,0 +1,69 @@ +SetScale("textlin"); + +$top = 80; +$bottom = 30; +$left = 50; +$right = 30; +$graph->Set90AndMargin($left, $right, $top, $bottom); + +// Nice shadow +$graph->SetShadow(); + +// Setup title +$graph->title->Set("Horizontal bar graph ex 2"); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 14); +$graph->subtitle->Set("(Axis at top)"); + +// Setup X-axis +$graph->xaxis->SetTickLabels($datax); +$graph->xaxis->SetFont(FF_VERDANA, FS_NORMAL, 12); + +// Some extra margin looks nicer +$graph->xaxis->SetLabelMargin(5); + +// Label align for X-axis +$graph->xaxis->SetLabelAlign('right', 'center'); + +// Add some grace to y-axis so the bars doesn't go +// all the way to the end of the plot area +$graph->yaxis->scale->SetGrace(20); +$graph->yaxis->SetLabelAlign('center', 'bottom'); +$graph->yaxis->SetLabelAngle(45); +$graph->yaxis->SetLabelFormat('%d'); +$graph->yaxis->SetFont(FF_VERDANA, FS_NORMAL, 12); + +// We don't want to display Y-axis +//$graph->yaxis->Hide(); + +// Now create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor("orange"); +$bplot->SetShadow(); + +//You can change the width of the bars if you like +//$bplot->SetWidth(0.5); + +// We want to display the value of each bar at the top +$bplot->value->Show(); +$bplot->value->SetFont(FF_ARIAL, FS_BOLD, 12); +$bplot->value->SetAlign('left', 'center'); +$bplot->value->SetColor("black", "darkred"); +$bplot->value->SetFormat('%.1f mkr'); + +// Add the bar to the graph +$graph->Add($bplot); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/horizbarex3.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/horizbarex3.php new file mode 100644 index 0000000000..e4c84849fd --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/horizbarex3.php @@ -0,0 +1,98 @@ +SetScale("textlin"); + +$top = 50; +$bottom = 80; +$left = 50; +$right = 20; +$graph->Set90AndMargin($left, $right, $top, $bottom); + +$graph->xaxis->SetPos('min'); + +// Nice shadow +$graph->SetShadow(); + +// Setup title +$graph->title->Set("Horizontal bar graph ex 3"); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 14); +$graph->subtitle->Set("(Axis at bottom)"); + +// Setup X-axis +$graph->xaxis->SetTickLabels($datax); +$graph->xaxis->SetFont(FF_FONT2, FS_BOLD, 12); + +// Some extra margin looks nicer +$graph->xaxis->SetLabelMargin(5); + +// Label align for X-axis +$graph->xaxis->SetLabelAlign('right', 'center'); + +// Add some grace to y-axis so the bars doesn't go +// all the way to the end of the plot area +$graph->yaxis->scale->SetGrace(20); + +// Setup the Y-axis to be displayed in the bottom of the +// graph. We also finetune the exact layout of the title, +// ticks and labels to make them look nice. +$graph->yaxis->SetPos('max'); + +// First make the labels look right +$graph->yaxis->SetLabelAlign('center', 'top'); +$graph->yaxis->SetLabelFormat('%d'); +$graph->yaxis->SetLabelSide(SIDE_RIGHT); + +// The fix the tick marks +$graph->yaxis->SetTickSide(SIDE_LEFT); + +// Finally setup the title +$graph->yaxis->SetTitleSide(SIDE_RIGHT); +$graph->yaxis->SetTitleMargin(35); + +// To align the title to the right use : +$graph->yaxis->SetTitle('Turnaround 2002', 'high'); +$graph->yaxis->title->Align('right'); + +// To center the title use : +//$graph->yaxis->SetTitle('Turnaround 2002','center'); +//$graph->yaxis->title->Align('center'); + +$graph->yaxis->title->SetFont(FF_ARIAL, FS_BOLD, 12); +$graph->yaxis->title->SetAngle(0); + +$graph->yaxis->SetFont(FF_FONT2, FS_NORMAL); +// If you want the labels at an angle other than 0 or 90 +// you need to use TTF fonts +//$graph->yaxis->SetLabelAngle(0); + +// Now create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor("orange"); +$bplot->SetShadow(); + +//You can change the width of the bars if you like +//$bplot->SetWidth(0.5); + +// We want to display the value of each bar at the top +$bplot->value->Show(); +$bplot->value->SetFont(FF_ARIAL, FS_BOLD, 12); +$bplot->value->SetAlign('left', 'center'); +$bplot->value->SetColor("black", "darkred"); +$bplot->value->SetFormat('%.1f mkr'); + +// Add the bar to the graph +$graph->Add($bplot); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/horizbarex4.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/horizbarex4.php new file mode 100644 index 0000000000..f6e53f97d9 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/horizbarex4.php @@ -0,0 +1,48 @@ +SetScale('textlin'); + +$top = 60; +$bottom = 30; +$left = 80; +$right = 30; +$graph->Set90AndMargin($left, $right, $top, $bottom); + +// Nice shadow +$graph->SetShadow(); + +// Setup labels +$lbl = array("Andrew\nTait", "Thomas\nAnderssen", "Kevin\nSpacey", "Nick\nDavidsson", + "David\nLindquist", "Jason\nTait", "Lorin\nPersson"); +$graph->xaxis->SetTickLabels($lbl); + +// Label align for X-axis +$graph->xaxis->SetLabelAlign('right', 'center', 'right'); + +// Label align for Y-axis +$graph->yaxis->SetLabelAlign('center', 'bottom'); + +// Titles +$graph->title->Set('Number of incidents'); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor('orange'); +$bplot->SetWidth(0.5); +$bplot->SetYMin(1990); + +$graph->Add($bplot); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/horizbarex6.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/horizbarex6.php new file mode 100644 index 0000000000..6b00f3fede --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/horizbarex6.php @@ -0,0 +1,83 @@ +SetScale("textlin"); + +// No frame around the image +$graph->SetFrame(false); + +// Rotate graph 90 degrees and set margin +$graph->Set90AndMargin(100, 20, 50, 30); + +// Set white margin color +$graph->SetMarginColor('white'); + +// Use a box around the plot area +$graph->SetBox(); + +// Use a gradient to fill the plot area +$graph->SetBackgroundGradient('white', 'lightblue', GRAD_HOR, BGRAD_PLOT); + +// Setup title +$graph->title->Set("Graphic card performance"); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 11); +$graph->subtitle->Set("(Non optimized)"); + +// Setup X-axis +$graph->xaxis->SetTickLabels($datax); +$graph->xaxis->SetFont(FF_VERDANA, FS_NORMAL, 8); + +// Some extra margin looks nicer +$graph->xaxis->SetLabelMargin(10); + +// Label align for X-axis +$graph->xaxis->SetLabelAlign('right', 'center'); + +// Add some grace to y-axis so the bars doesn't go +// all the way to the end of the plot area +$graph->yaxis->scale->SetGrace(20); + +// We don't want to display Y-axis +$graph->yaxis->Hide(); + +// Now create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetShadow(); + +//You can change the width of the bars if you like +//$bplot->SetWidth(0.5); + +// Set gradient fill for bars +$bplot->SetFillGradient('darkred', 'yellow', GRAD_HOR); + +// We want to display the value of each bar at the top +$bplot->value->Show(); +$bplot->value->SetFont(FF_ARIAL, FS_BOLD, 10); +//$bplot->value->SetAlign('left','center'); +$bplot->value->SetColor("white"); +$bplot->value->SetFormat('%.1f'); +$bplot->SetValuePos('max'); + +// Add the bar to the graph +$graph->Add($bplot); + +// Add some explanation text +$txt = new Text('Note: Higher value is better.'); +$txt->SetPos(190, 399, 'center', 'bottom'); +$txt->SetFont(FF_ARIAL, FS_NORMAL, 8); +$graph->Add($txt); + +// .. and stroke the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/logbarex1.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/logbarex1.php new file mode 100644 index 0000000000..09c9f0dea7 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/logbarex1.php @@ -0,0 +1,48 @@ +img->SetMargin(50,30,50,50); +$graph->SetScale("textlog"); +//$graph->SetShadow(); + +// Setup titles for graph and axis +$graph->title->Set("Bar with logarithmic Y-scale"); +$graph->title->SetFont(FF_VERDANA, FS_NORMAL, 18); + +$graph->xaxis->SetTitle("2002"); +$graph->xaxis->title->SetFont(FF_ARIAL, FS_NORMAL, 16); + +$graph->yaxis->title->SetFont(FF_ARIAL, FS_NORMAL, 16); +$graph->yaxis->SetTitle("Y-title", 'center'); +$graph->yaxis->SetTitleMargin(30); + +// Setup month on X-scale +//$graph->xaxis->SetTickLabels($datax); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor("orange"); + +//You can also set a manual base of the bars +//$bplot->SetYBase(0.001); + +/* +$bplot->SetShadow(); +$bplot->value->Show(); +$bplot->value->SetFont(FF_ARIAL,FS_BOLD); +$bplot->value->SetAngle(45); +$bplot->value->SetColor("black","darkred"); + */ + +$graph->Add($bplot); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/manual_textscale_ex1.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/manual_textscale_ex1.php new file mode 100644 index 0000000000..1e69a55953 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/manual_textscale_ex1.php @@ -0,0 +1,37 @@ +GetShortMonth(); + +// new Graph\Graph with a drop shadow +$graph = new Graph\Graph(300, 200, 'auto'); +$graph->SetShadow(); + +// Use a "text" X-scale +$graph->SetScale("textlin"); + +// Specify X-labels +$graph->xaxis->SetTickLabels($months); + +// Set title and subtitle +$graph->title->Set("Textscale with specified labels"); + +// Use built in font +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Create the bar plot +$b1 = new Plot\BarPlot($databary); +$b1->SetLegend("Temperature"); + +//$b1->SetAbsWidth(6); +//$b1->SetShadow(); + +// The order the plots are added determines who's ontop +$graph->Add($b1); + +// Finally output the image +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/manual_textscale_ex2.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/manual_textscale_ex2.php new file mode 100644 index 0000000000..681c7450ce --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/manual_textscale_ex2.php @@ -0,0 +1,37 @@ +GetShortMonth(); + +// new Graph\Graph with a drop shadow +$graph = new Graph\Graph(300, 200); +$graph->SetShadow(); + +// Use a "text" X-scale +$graph->SetScale('textlin'); + +// Specify X-labels +$graph->xaxis->SetTickLabels($months); +$graph->xaxis->SetTextTickInterval(2, 0); + +// Set title and subtitle +$graph->title->Set('Textscale with tickinterval=2'); + +// Use built in font +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Create the bar plot +$b1 = new Plot\BarPlot($databary); +$b1->SetLegend('Temperature'); + +// The order the plots are added determines who's ontop +$graph->Add($b1); + +// Finally output the image +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/manual_textscale_ex3.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/manual_textscale_ex3.php new file mode 100644 index 0000000000..0f127ff952 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/manual_textscale_ex3.php @@ -0,0 +1,37 @@ +GetShortMonth(); + +// new Graph\Graph with a drop shadow +$graph = new Graph\Graph(300, 200); +$graph->SetShadow(); + +// Use a "text" X-scale +$graph->SetScale('textlin'); + +// Specify X-labels +$graph->xaxis->SetTickLabels($months); +$graph->xaxis->SetTextLabelInterval(2); + +// Set title and subtitle +$graph->title->Set('Textscale with tickinterval=2'); + +// Use built in font +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Create the bar plot +$b1 = new Plot\BarPlot($databary); +$b1->SetLegend('Temperature'); + +// The order the plots are added determines who's ontop +$graph->Add($b1); + +// Finally output the image +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/manual_textscale_ex4.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/manual_textscale_ex4.php new file mode 100644 index 0000000000..a4232acd0b --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/manual_textscale_ex4.php @@ -0,0 +1,48 @@ +GetShortMonth(); +$k = 0; +for ($i = 0; $i < 480; ++$i) { + $datay[$i] = rand(1, 40); + if ($i % DATAPERMONTH === 0) { + $months[$i] = $m[(int) ($i / DATAPERMONTH)]; + } else { + $months[$i] = 'xx'; + } + +} + +// new Graph\Graph with a drop shadow +$graph = new Graph\Graph(400, 200); +//$graph->SetShadow(); + +// Use a "text" X-scale +$graph->SetScale('textlin'); + +// Specify X-labels +$graph->xaxis->SetTickLabels($months); +$graph->xaxis->SetTextTickInterval(DATAPERMONTH, 0); +$graph->xaxis->SetTextLabelInterval(2); + +// Set title and subtitle +$graph->title->Set('Textscale with tickinterval=2'); + +// Use built in font +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +$graph->SetBox(true, 'red'); + +// Create the bar plot +$lp1 = new Plot\LinePlot($datay); +$lp1->SetLegend('Temperature'); + +// The order the plots are added determines who's ontop +$graph->Add($lp1); + +// Finally output the image +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/negbarvalueex01.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/negbarvalueex01.php new file mode 100644 index 0000000000..bcf3293020 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/negbarvalueex01.php @@ -0,0 +1,38 @@ +img->SetMargin(60, 30, 40, 40); +$graph->SetScale("textlin"); +$graph->SetShadow(); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor("orange"); + +// DIsplay value at top of each bar +$bplot->value->Show(); +$bplot->SetShadow(); + +$graph->Add($bplot); + +// Position the scale at the min of the other axis +$graph->xaxis->SetPos("min"); + +// Add 10% more space at top and bottom of graph +$graph->yscale->SetGrace(10, 10); + +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_VERDANA, FS_NORMAL, 12); +$graph->title->Set("Example of bar plot with absolute labels"); + +$graph->yaxis->title->SetFont(FF_ARIAL, FS_NORMAL, 16); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/new_bar1.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/new_bar1.php new file mode 100644 index 0000000000..caaf3f5032 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/new_bar1.php @@ -0,0 +1,47 @@ +SetScale("textlin"); + +$theme_class = new UniversalTheme; +$graph->SetTheme($theme_class); + +$graph->yaxis->SetTickPositions(array(0, 30, 60, 90, 120, 150), array(15, 45, 75, 105, 135)); +$graph->SetBox(false); + +$graph->ygrid->SetFill(false); +$graph->xaxis->SetTickLabels(array('A', 'B', 'C', 'D')); +$graph->yaxis->HideLine(false); +$graph->yaxis->HideTicks(false, false); + +// Create the bar plots +$b1plot = new Plot\BarPlot($data1y); +$b2plot = new Plot\BarPlot($data2y); +$b3plot = new Plot\BarPlot($data3y); + +// Create the grouped bar plot +$gbplot = new Plot\GroupBarPlot(array($b1plot, $b2plot, $b3plot)); +// ...and add it to the graPH +$graph->Add($gbplot); + +$b1plot->SetColor("white"); +$b1plot->SetFillColor("#cc1111"); + +$b2plot->SetColor("white"); +$b2plot->SetFillColor("#11cccc"); + +$b3plot->SetColor("white"); +$b3plot->SetFillColor("#1111cc"); + +$graph->title->Set("Bar Plots"); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/new_bar3.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/new_bar3.php new file mode 100644 index 0000000000..0407bff10d --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/new_bar3.php @@ -0,0 +1,37 @@ +SetScale("textlin"); + +//$theme_class="DefaultTheme"; +//$graph->SetTheme(new $theme_class()); + +// set major and minor tick positions manually +$graph->yaxis->SetTickPositions(array(0, 30, 60, 90, 120, 150), array(15, 45, 75, 105, 135)); +$graph->SetBox(false); + +//$graph->ygrid->SetColor('gray'); +$graph->ygrid->SetFill(false); +$graph->xaxis->SetTickLabels(array('A', 'B', 'C', 'D')); +$graph->yaxis->HideLine(false); +$graph->yaxis->HideTicks(false, false); + +// Create the bar plots +$b1plot = new Plot\BarPlot($datay); + +// ...and add it to the graPH +$graph->Add($b1plot); + +$b1plot->SetColor("white"); +$b1plot->SetFillGradient("#4B0082", "white", GRAD_LEFT_REFLECTION); +$b1plot->SetWidth(45); +$graph->title->Set("Bar Gradient(Left reflection)"); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/new_bar4.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/new_bar4.php new file mode 100644 index 0000000000..a4dbf40558 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/new_bar4.php @@ -0,0 +1,42 @@ +SetScale("textlin"); + +$theme_class = new UniversalTheme; +$graph->SetTheme($theme_class); + +$graph->Set90AndMargin(50, 40, 40, 40); +$graph->img->SetAngle(90); + +// set major and minor tick positions manually +$graph->SetBox(false); + +//$graph->ygrid->SetColor('gray'); +$graph->ygrid->Show(false); +$graph->ygrid->SetFill(false); +$graph->xaxis->SetTickLabels(array('A', 'B', 'C', 'D', 'E', 'F')); +$graph->yaxis->HideLine(false); +$graph->yaxis->HideTicks(false, false); + +// For background to be gradient, setfill is needed first. +$graph->SetBackgroundGradient('#00CED1', '#FFFFFF', GRAD_HOR, BGRAD_PLOT); + +// Create the bar plots +$b1plot = new Plot\BarPlot($datay); + +// ...and add it to the graPH +$graph->Add($b1plot); + +$b1plot->SetWeight(0); +$b1plot->SetFillGradient("#808000", "#90EE90", GRAD_HOR); +$b1plot->SetWidth(17); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/new_bar6.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/new_bar6.php new file mode 100644 index 0000000000..f548cbc08f --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/new_bar6.php @@ -0,0 +1,103 @@ +SetScale("textlin"); +$graph->SetY2Scale("lin", 0, 90); +$graph->SetY2OrderBack(false); + +$graph->SetMargin(35, 50, 20, 5); + +$theme_class = new UniversalTheme; +$graph->SetTheme($theme_class); + +$graph->yaxis->SetTickPositions(array(0, 50, 100, 150, 200, 250, 300, 350), array(25, 75, 125, 175, 275, 325)); +$graph->y2axis->SetTickPositions(array(30, 40, 50, 60, 70, 80, 90)); + +$months = $gDateLocale->GetShortMonth(); +$months = array_merge(array_slice($months, 3, 9), array_slice($months, 0, 3)); +$graph->SetBox(false); + +$graph->ygrid->SetFill(false); +$graph->xaxis->SetTickLabels(array('A', 'B', 'C', 'D')); +$graph->yaxis->HideLine(false); +$graph->yaxis->HideTicks(false, false); +// Setup month as labels on the X-axis +$graph->xaxis->SetTickLabels($months); + +// Create the bar plots +$b1plot = new Plot\BarPlot($data1y); +$b2plot = new Plot\BarPlot($data2y); + +$b3plot = new Plot\BarPlot($data3y); +$b4plot = new Plot\BarPlot($data4y); +$b5plot = new Plot\BarPlot($data5y); + +$lplot = new Plot\LinePlot($data6y); + +// Create the grouped bar plot +$gbbplot = new Plot\AccBarPlot(array($b3plot, $b4plot, $b5plot)); +$gbplot = new Plot\GroupBarPlot(array($b1plot, $b2plot, $gbbplot)); + +// ...and add it to the graPH +$graph->Add($gbplot); +$graph->AddY2($lplot); + +$b1plot->SetColor("#0000CD"); +$b1plot->SetFillColor("#0000CD"); +$b1plot->SetLegend("Cliants"); + +$b2plot->SetColor("#B0C4DE"); +$b2plot->SetFillColor("#B0C4DE"); +$b2plot->SetLegend("Machines"); + +$b3plot->SetColor("#8B008B"); +$b3plot->SetFillColor("#8B008B"); +$b3plot->SetLegend("First Track"); + +$b4plot->SetColor("#DA70D6"); +$b4plot->SetFillColor("#DA70D6"); +$b4plot->SetLegend("All"); + +$b5plot->SetColor("#9370DB"); +$b5plot->SetFillColor("#9370DB"); +$b5plot->SetLegend("Single Only"); + +$lplot->SetBarCenter(); +$lplot->SetColor("yellow"); +$lplot->SetLegend("Houses"); +$lplot->mark->SetType(MARK_X, '', 1.0); +$lplot->mark->SetWeight(2); +$lplot->mark->SetWidth(8); +$lplot->mark->setColor("yellow"); +$lplot->mark->setFillColor("yellow"); + +$graph->legend->SetFrameWeight(1); +$graph->legend->SetColumns(6); +$graph->legend->SetColor('#4E4E4E', '#00A78A'); + +$band = new Plot\PlotBand(VERTICAL, BAND_RDIAG, 11, "max", 'khaki4'); +$band->ShowFrame(true); +$band->SetOrder(DEPTH_BACK); +$graph->Add($band); + +$graph->title->Set("Combineed Line and Bar plots"); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/plotbanddensity_ex0.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/plotbanddensity_ex0.php new file mode 100644 index 0000000000..f35930ee4f --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/plotbanddensity_ex0.php @@ -0,0 +1,37 @@ +SetScale('textlin'); +$graph->SetMargin(25, 10, 20, 25); +$graph->SetBox(true); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor("lightblue"); + +$graph->ygrid->Show(false); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add band +$band = new Plot\PlotBand(HORIZONTAL, BAND_3DPLANE, 15, 35, 'khaki4'); +$band->SetDensity(10); +$band->ShowFrame(true); +$graph->AddBand($band); + +// Set title +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->title->SetColor('darkred'); +$graph->title->Set('BAND_3DPLANE, Density=10'); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/plotbanddensity_ex1.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/plotbanddensity_ex1.php new file mode 100644 index 0000000000..ef960e7005 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/plotbanddensity_ex1.php @@ -0,0 +1,37 @@ +SetScale('textlin'); +$graph->SetMargin(25, 10, 20, 25); +$graph->SetBox(true); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor("lightblue"); + +$graph->ygrid->Show(false); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add band +$band = new Plot\PlotBand(HORIZONTAL, BAND_3DPLANE, 15, 35, 'khaki4'); +$band->SetDensity(40); +$band->ShowFrame(true); +$graph->AddBand($band); + +// Set title +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->title->SetColor('darkred'); +$graph->title->Set('BAND_3DPLANE, Density=40'); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_bar/plotbanddensity_ex2.php b/vendor/amenadiel/jpgraph/Examples/examples_bar/plotbanddensity_ex2.php new file mode 100644 index 0000000000..f6ca907548 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_bar/plotbanddensity_ex2.php @@ -0,0 +1,36 @@ +SetScale('textlin'); +$graph->SetMargin(25, 10, 20, 25); +$graph->SetBox(true); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10); +$graph->ygrid->Show(false); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor("lightblue"); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add band +$band = new Plot\PlotBand(HORIZONTAL, BAND_3DPLANE, 15, 35, 'khaki4'); +$band->SetDensity(80); +$band->ShowFrame(true); +$graph->AddBand($band); + +// Set title +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->title->SetColor('darkred'); +$graph->title->Set('BAND_3DPLANE, Density=80'); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_canvas/canvas_jpgarchex.php b/vendor/amenadiel/jpgraph/Examples/examples_canvas/canvas_jpgarchex.php new file mode 100644 index 0000000000..a67c0cbe87 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_canvas/canvas_jpgarchex.php @@ -0,0 +1,143 @@ +SetMargin(2,3,2,3); +$g->SetMarginColor("teal"); +$g->InitFrame(); + +// ... and a scale +$scale = new CanvasScale($g); +$scale->Set(0,$xmax,0,$ymax); + +// ... we need shape since we want the indented rectangle +$shape = new Shape($g,$scale); +$shape->SetColor('black'); + +// ... basic parameters for the overall image +$l = 2; // Left margin +$r = 18; // Row number to start the lowest line on +$width = 16; // Total width + +// Setup the two basic rectangle text object we will use +$tt = new CanvasRectangleText(); +$tt->SetFont(FF_ARIAL,FS_NORMAL,14); +$tt->SetFillColor(''); +$tt->SetColor(''); +$tt->SetFontColor('navy'); + +$t = new CanvasRectangleText(); +$t->SetFont(FF_ARIAL,FS_NORMAL,14); +$t->SetFillColor('goldenrod1'); +$t->SetFontColor('navy'); + + +// Now start drawing the arch overview from the bottom and up +// This is all pretty manual and one day I will write a proper +// framework to make it easy to construct these types of architecture +// overviews. But for now, just plain old coordinates.. + +// Line: GD Library and image libraries +$h=3; +$s = 3; $d=$l + $width-9; +$t->SetFillColor('cadetblue3'); +$t->Set("TTF",$d,$r+2,$s,1); +$t->Stroke($g->img,$scale); +$t->Set("PNG",$d+$s,$r+2,$s,1); +$t->Stroke($g->img,$scale); +$t->Set("JPEG",$d+2*$s,$r+2,$s,1); +$t->Stroke($g->img,$scale); +$shape->IndentedRectangle($l,$r,$width,$h,$s*3,1,2,'lightgreen'); +$tt->Set("GD Basic library\n(1.8.x or 2.x)",$l,$r,$width,$h-1); +$tt->Stroke($g->img,$scale); + + +// Area: Basic internal JpGraph architecture +$t->SetFillColor('goldenrod1'); +$h = 2; +$r -= $h; $d=8; +$t->Set("Image primitives\n(RGB, Anti-aliasing,\nGD Abstraction)",$l,$r-0.5,$width*0.5,$h+0.5); +$t->Stroke($g->img,$scale); +$t->Set("Image Cache &\nStreaming",$l+0.5*$width,$r,$width*0.4,$h); +$t->Stroke($g->img,$scale); + +$r -= $h; $d=8; +$t->Set("2D Rot & Transformation",$l,$r,$width*0.5,$h-0.5); $t->Stroke($g->img,$scale); + + +$r -= 2; $h = 4; +$shape->IndentedRectangle($l,$r,$width*0.9,$h,$d,2,3,'goldenrod1'); +$tt->Set("Axis, Labelling, (Auto)-Scaling",$l,$r,$width*0.9,$h-2); $tt->Stroke($g->img,$scale); + +$r -= 1; +$shape->IndentedRectangle($l,$r,$width,7,$width*0.9,6,3,'goldenrod1'); +$tt->Set("Error handling & Utility classes",$l,$r,$width,1); $tt->Stroke($g->img,$scale); + + +// Area: Top area with graph components +$t->SetFillColor('gold1'); +$r -= 3; +$w = $width*0.55/4; $h = 2; +$t->Set("Gantt\nGraph",$l,$r,$w,$h); +$t->Stroke($g->img,$scale); + +$t->Set("Pie\nGraph",$l+$w,$r,$w,$h); +$t->Stroke($g->img,$scale); +$t->Set("Radar\nGraph",$l+$w*2,$r,$w,$h); +$t->Stroke($g->img,$scale); + +$shape->IndentedRectangle($l,$r,$width,3,4*$w,2,0,'gold1'); +$tt->Set("Base Graph\n(Orthogonal\ncoordinate system)",$l+4*$w,$r,$width-$w*4,3); +$tt->Stroke($g->img,$scale); + +$r -= 2; +$d = 0.7; +$shape->IndentedRectangle($l+3*$w,$r,$w,4, $w*$d,2,0,'gold1'); +$t->Set("Canv\nUtil",$l+3*$w,$r,$w*$d,$h); $t->Stroke($g->img,$scale); +$tt->Set("Canvas\nGraph",$l+3*$w,$r+2,$w,2); $tt->Stroke($g->img,$scale); + +// Top line of plotting plugins +$t->SetFillColor('cyan'); +$t->Set("Gantt\nPlot",$l,$r,$w,$h); $t->Stroke($g->img,$scale); +$t->Set("2D\nPlot",$l+$w,$r,$w/2,$h); $t->Stroke($g->img,$scale); +$t->Set("3D\nPlot",$l+$w+$w/2,$r,$w/2,$h);$t->Stroke($g->img,$scale); +$t->Set("Radar\nPlot",$l+2*$w,$r,$w,$h); $t->Stroke($g->img,$scale); + +$wp = ($width - 4*$w)/4; +$t->Set("Error\nPlot",$l+4*$w,$r,$wp,$h); $t->Stroke($g->img,$scale); +$t->Set("Line\nPlot",$l+4*$w+$wp,$r,$wp,$h); $t->Stroke($g->img,$scale); +$t->Set("Bar\nPlot",$l+4*$w+2*$wp,$r,$wp,$h); $t->Stroke($g->img,$scale); +$t->Set("Scatter\nPlot",$l+4*$w+3*$wp,$r,$wp,$h); $t->Stroke($g->img,$scale); + +// Show application top +$r -= 2.5; $h=2; +$t->SetFillColor('blue'); +$t->SetFontColor('white'); +$t->SetFont(FF_ARIAL,FS_BOLD,20); +$t->Set("PHP Application",$l,$r,$width,$h); $t->Stroke($g->img,$scale); + +// Stroke title +$r = 0.5; +$tt->SetFontColor('black'); +$tt->SetFont(FF_TIMES,FS_BOLD,28); +$tt->Set("JpGraph Architecture Overview",$l,$r,$width,1); +$tt->Stroke($g->img,$scale); + +// Stroke footer +$tt->SetFont(FF_VERDANA,FS_NORMAL,10); +$tt->Set("Generated: ".date("ymd H:m",time()),0.1,$ymax*0.95); +$tt->Stroke($g->img,$scale); + +// .. and stream it all back +$g->Stroke(); + +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_canvas/canvasbezierex1.php b/vendor/amenadiel/jpgraph/Examples/examples_canvas/canvasbezierex1.php new file mode 100644 index 0000000000..36febdf515 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_canvas/canvasbezierex1.php @@ -0,0 +1,40 @@ +title->Set('Bezier line with control points'); + +// Setup control point for bezier +$p = array(3,6, + 6,9, + 5,3, + 7,4); + +// Visualize control points +$shape->SetColor('blue'); +$shape->Line($p[0],$p[1],$p[2],$p[3]); +$shape->FilledCircle($p[2],$p[3],-6); + +$shape->SetColor('red'); +$shape->Line($p[4],$p[5],$p[6],$p[7]); +$shape->FilledCircle($p[4],$p[5],-6); + +// Draw bezier +$shape->SetColor('black'); +$shape->Bezier($p); + +// Frame it with a square +$shape->SetColor('navy'); +$shape->Rectangle(0.5,2,9.5,9.5); + +// ... and stroke it +$g->Stroke(); +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_canvas/canvasex01.php b/vendor/amenadiel/jpgraph/Examples/examples_canvas/canvasex01.php new file mode 100644 index 0000000000..68839155fe --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_canvas/canvasex01.php @@ -0,0 +1,37 @@ +SetMargin(5,11,6,11); +$g->SetShadow(); +$g->SetMarginColor("teal"); + +// We need to stroke the plotarea and margin before we add the +// text since we otherwise would overwrite the text. +$g->InitFrame(); + +// Draw a text box in the middle +$txt="This\nis\na TEXT!!!"; +$t = new Text($txt,200,10); +$t->SetFont(FF_ARIAL,FS_BOLD,40); + +// How should the text box interpret the coordinates? +$t->Align('center','top'); + +// How should the paragraph be aligned? +$t->ParagraphAlign('center'); + +// Add a box around the text, white fill, black border and gray shadow +$t->SetBox("white","black","gray"); + +// Stroke the text +$t->Stroke($g->img); + +// Stroke the graph +$g->Stroke(); + +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_canvas/canvasex02.php b/vendor/amenadiel/jpgraph/Examples/examples_canvas/canvasex02.php new file mode 100644 index 0000000000..2080762233 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_canvas/canvasex02.php @@ -0,0 +1,42 @@ +SetMargin(5,11,6,11); +$g->SetShadow(); +$g->SetMarginColor("teal"); + +// We need to stroke the plotarea and margin before we add the +// text since we otherwise would overwrite the text. +$g->InitFrame(); + +// Add a black line +$g->img->SetColor('black'); +$g->img->Line(0,0,100,100); + +// .. and a circle (x,y,diameter) +$g->img->Circle(100,100,50); + +// .. and a filled circle (x,y,diameter) +$g->img->SetColor('red'); +$g->img->FilledCircle(200,100,50); + +// .. add a rectangle +$g->img->SetColor('green'); +$g->img->FilledRectangle(10,10,50,50); + +// .. add a filled rounded rectangle +$g->img->SetColor('green'); +$g->img->FilledRoundedRectangle(300,30,350,80,10); +// .. with a darker border +$g->img->SetColor('darkgreen'); +$g->img->RoundedRectangle(300,30,350,80,10); + +// Stroke the graph +$g->Stroke(); + +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_canvas/canvasex03.php b/vendor/amenadiel/jpgraph/Examples/examples_canvas/canvasex03.php new file mode 100644 index 0000000000..dad3c55b59 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_canvas/canvasex03.php @@ -0,0 +1,58 @@ +SetMargin(5,11,6,11); +$g->SetShadow(); +$g->SetMarginColor("teal"); + +// We need to stroke the plotarea and margin before we add the +// text since we otherwise would overwrite the text. +$g->InitFrame(); + +// Create a new scale +$scale = new CanvasScale($g); +$scale->Set(0,$xmax,0,$ymax); + +// The shape class is wrapper around the Imgae class which translates +// the coordinates for us +$shape = new Shape($g,$scale); +$shape->SetColor('black'); + + +// Add a black line +$shape->SetColor('black'); +$shape->Line(0,0,20,20); + +// .. and a circle (x,y,diameter) +$shape->Circle(5,14,2); + +// .. and a filled circle (x,y,diameter) +$shape->SetColor('red'); +$shape->FilledCircle(11,8,3); + +// .. add a rectangle +$shape->SetColor('green'); +$shape->FilledRectangle(15,8,19,14); + +// .. add a filled rounded rectangle +$shape->SetColor('green'); +$shape->FilledRoundedRectangle(2,3,8,6); +// .. with a darker border +$shape->SetColor('darkgreen'); +$shape->RoundedRectangle(2,3,8,6); + + +// Stroke the graph +$g->Stroke(); + +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_canvas/canvasex04.php b/vendor/amenadiel/jpgraph/Examples/examples_canvas/canvasex04.php new file mode 100644 index 0000000000..3e6ac9f93c --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_canvas/canvasex04.php @@ -0,0 +1,58 @@ +SetMargin(5,11,6,11); +$g->SetShadow(); +$g->SetMarginColor("teal"); + +// We need to stroke the plotarea and margin before we add the +// text since we otherwise would overwrite the text. +$g->InitFrame(); + +// Create a new scale +$scale = new CanvasScale($g); +$scale->Set(0,$xmax,0,$ymax); + +// The shape class is wrapper around the Imgae class which translates +// the coordinates for us +$shape = new Shape($g,$scale); +$shape->SetColor('black'); + + +// Add a black line +$shape->SetColor('black'); +$shape->Line(0,0,20,20); + +// .. and a circle (x,y,diameter) +$shape->Circle(5,14,2); + +// .. and a filled circle (x,y,diameter) +$shape->SetColor('red'); +$shape->FilledCircle(11,8,3); + +// .. add a rectangle +$shape->SetColor('green'); +$shape->FilledRectangle(15,8,19,14); + +// .. add a filled rounded rectangle +$shape->SetColor('green'); +$shape->FilledRoundedRectangle(2,3,8,6); +// .. with a darker border +$shape->SetColor('darkgreen'); +$shape->RoundedRectangle(2,3,8,6); + + +// Stroke the graph +$g->Stroke(); + +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_canvas/canvasex05.php b/vendor/amenadiel/jpgraph/Examples/examples_canvas/canvasex05.php new file mode 100644 index 0000000000..461398422c --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_canvas/canvasex05.php @@ -0,0 +1,58 @@ +SetMargin(5,11,6,11); +$g->SetShadow(); +$g->SetMarginColor("teal"); + +// We need to stroke the plotarea and margin before we add the +// text since we otherwise would overwrite the text. +$g->InitFrame(); + +// Create a new scale +$scale = new CanvasScale($g); +$scale->Set(0,$xmax,0,$ymax); + +// The shape class is wrapper around the Imgae class which translates +// the coordinates for us +$shape = new Shape($g,$scale); +$shape->SetColor('black'); + + +// Add a black line +$shape->SetColor('black'); +$shape->Line(0,0,20,20); + +// .. and a circle (x,y,diameter) +$shape->Circle(5,14,2); + +// .. and a filled circle (x,y,diameter) +$shape->SetColor('red'); +$shape->FilledCircle(11,8,3); + +// .. add a rectangle +$shape->SetColor('green'); +$shape->FilledRectangle(15,8,19,14); + +// .. add a filled rounded rectangle +$shape->SetColor('green'); +$shape->FilledRoundedRectangle(2,3,8,6); +// .. with a darker border +$shape->SetColor('darkgreen'); +$shape->RoundedRectangle(2,3,8,6); + + +// Stroke the graph +$g->Stroke(); + +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_canvas/canvasex06.php b/vendor/amenadiel/jpgraph/Examples/examples_canvas/canvasex06.php new file mode 100644 index 0000000000..b475c68da2 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_canvas/canvasex06.php @@ -0,0 +1,42 @@ +SetMargin(5,11,6,11); +$g->SetShadow(); +$g->SetMarginColor("teal"); + +// We need to stroke the plotarea and margin before we add the +// text since we otherwise would overwrite the text. +$g->InitFrame(); + +// Create a new scale +$scale = new CanvasScale($g); +$scale->Set(0,$xmax,0,$ymax); + +// The shape class is wrapper around the Imgae class which translates +// the coordinates for us +$shape = new Shape($g,$scale); +$shape->SetColor('black'); + +$shape->IndentedRectangle(1,2,15,15,8,8,CORNER_TOPLEFT,'khaki'); + +$shape->IndentedRectangle(1,20,15,15,8,8,CORNER_BOTTOMLEFT,'khaki'); + +$shape->IndentedRectangle(20,2,15,15,8,8,CORNER_TOPRIGHT,'khaki'); + +$shape->IndentedRectangle(20,20,15,15,8,8,CORNER_BOTTOMRIGHT,'khaki'); + +// Stroke the graph +$g->Stroke(); + +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_canvas/canvaspiralex1.php b/vendor/amenadiel/jpgraph/Examples/examples_canvas/canvaspiralex1.php new file mode 100644 index 0000000000..5d72b9209b --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_canvas/canvaspiralex1.php @@ -0,0 +1,78 @@ +SetColor($color1); + $img->Line($x,$y,$x+$s1*$w,$y); + } + else { + $x = $x + $s2*$w*$r; + $w = (1-$r)*$w; + $h = $h / (1-$r) * $r; + $s2 *= -1; + $img->SetColor($color1); + $img->Line($x,$y,$x,$y-$s2*$h); + } + $img->SetColor($color2); + $img->FilledRectangle($x-1,$y-1,$x+1,$y+1); + $img->Arc($x,$y,2*$w+1,2*$h+1,$sa,$ea); + $img->Arc($x,$y,2*$w,2*$h,$sa,$ea); + $img->Arc($x,$y,2*$w-1,2*$h-1,$sa,$ea); + $img->Line($x_old,$y_old,$x,$y); + $x_old=$x; $y_old=$y; + } +} + +$g = new CanvasGraph($w,$h); +//$gr = 1.61803398874989484820; + +$p = SeaShell($g->img,0,20,$w-1,$h-21,$r,19); +$g->img->SetColor('black'); +$g->img->Rectangle(0,20,$w-1,$h-1); +$g->img->SetFont(FF_FONT2,FS_BOLD); +$g->img->SetTextAlign('center','top'); +$g->img->StrokeText($w/2,0,"Canvas Spiral"); + +$g->Stroke(); +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_canvas/mkgrad.php b/vendor/amenadiel/jpgraph/Examples/examples_canvas/mkgrad.php new file mode 100644 index 0000000000..3f36b44a97 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_canvas/mkgrad.php @@ -0,0 +1,171 @@ +iColors = array_keys($rgb->rgb_table); + usort($this->iColors,'_cmp'); + + $this->iGradstyles = array( + "Vertical",2, + "Horizontal",1, + "Vertical from middle",3, + "Horizontal from middle",4, + "Horizontal wider middle",6, + "Vertical wider middle",7, + "Rectangle",5 ); + } + + function Run() { + + echo '

        Generate gradient background

        '; + echo ''; + echo ''; + echo "\n"; + echo ''; + echo "\n"; + echo ''; + echo ''; + echo ''; + echo ''; + echo '
        Width:
        '.$this->GenHTMLInput('w',8,4,300).'
        Height:
        '.$this->GenHTMLInput('h',8,4,300).'
        From Color:
        '; + echo $this->GenHTMLSelect('fc',$this->iColors); + echo '
        To Color:
        '; + echo $this->GenHTMLSelect('tc',$this->iColors); + echo '
        Gradient style:
        '; + echo $this->GenHTMLSelectCode('s',$this->iGradstyles); + echo '
        Filename: (empty to stream)
        '; + echo $this->GenHTMLInput('fn',55,100); + echo '
        '.$this->GenHTMLSubmit('submit').'
        '; + echo ''; + + } + + function GenHTMLSubmit($name) { + return ''; + } + + + function GenHTMLInput($name,$len,$maxlen=100,$val='') { + return ''; + } + + function GenHTMLSelect($name,$option,$selected="",$size=0) { + $txt="\n"; + } + + function GenHTMLSelectCode($name,$option,$selected="",$size=0) { + $txt="\n"; + } + +} + +// Basic application driver + +class Driver { + var $iGraph, $iGrad; + var $iWidth,$iHeight; + var $iFromColor, $iToColor; + var $iStyle; + var $iForm; + + function Driver() { + $this->iForm = new Form(); + } + + function GenGradImage() { + + $aWidth = (int)@$_POST['w']; + $aHeight = (int)@$_POST['h']; + $aFrom = @$_POST['fc']; + $aTo = @$_POST['tc']; + $aStyle = @$_POST['s']; + $aFileName = @$_POST['fn']; + + $this->iWidth = $aWidth; + $this->iHeight = $aHeight; + $this->iFromColor = $aFrom; + $this->iToColor = $aTo; + $this->iStyle = $aStyle; + + $this->graph = new CanvasGraph($aWidth,$aHeight); + $this->grad = new Gradient($this->graph->img); + $this->grad->FilledRectangle(0,0, + $this->iWidth,$this->iHeight, + $this->iFromColor, + $this->iToColor, + $this->iStyle); + + if( $aFileName != "" ) { + $this->graph->Stroke($aFileName); + echo "Image file '$aFileName' created."; + } + else + $this->graph->Stroke(); + } + + + function Run() { + + global $HTTP_POST_VARS; + + // Two modes: + // 1) If the script is called with no posted arguments + // we show the input form. + // 2) If we have posted arguments we naivly assume that + // we are called to do the image. + + if( @$_POST['ok']===' Ok ' ) { + $this->GenGradImage(); + } + else + $this->iForm->Run(); + } +} + +$driver = new Driver(); +$driver->Run(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_canvas/text-example1.php b/vendor/amenadiel/jpgraph/Examples/examples_canvas/text-example1.php new file mode 100644 index 0000000000..99de8ffe8a --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_canvas/text-example1.php @@ -0,0 +1,18 @@ +SetPos(0.05,0.5); +$t1->SetOrientation("h"); +$t1->SetFont(FF_FONT1,FS_NORMAL); +$t1->SetBox("white","black",'gray'); +$t1->SetColor("black"); +$graph->AddText($t1); + +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_canvas/text-example2.php b/vendor/amenadiel/jpgraph/Examples/examples_canvas/text-example2.php new file mode 100644 index 0000000000..b20cfa8e9d --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_canvas/text-example2.php @@ -0,0 +1,18 @@ +SetPos(0.05,100); +$t1->SetFont(FF_FONT1,FS_NORMAL); +$t1->SetBox("white","black",true); +$t1->ParagraphAlign("right"); +$t1->SetColor("black"); +$graph->AddText($t1); + +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_canvas/textalignex1.php b/vendor/amenadiel/jpgraph/Examples/examples_canvas/textalignex1.php new file mode 100644 index 0000000000..a7b33c577a --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_canvas/textalignex1.php @@ -0,0 +1,91 @@ +img; + +// Get the bounding box for text +$img->SetFont(FF_ARIAL,FS_NORMAL,16); +$tw=$img->GetBBoxWidth($txt,$angle); +$th=$img->GetBBoxHeight($txt,$angle); + +$img->SetFont(FF_ARIAL,FS_NORMAL,11); +$ch=$img->GetBBoxHeight($caption); + +// Calculate needed height for the image +$h = 3*$th+2*$ym + $ch; +$g = new CanvasGraph($w,$h); +$img = $g->img; + +// Alignment for anchor points to use +$anchors = array('left','top', + 'center','top', + 'right','top', + 'left','center', + 'center','center', + 'right','center', + 'left','bottom', + 'center','bottom', + 'right','bottom'); + +$n = count($anchors)/2; + +for( $i=0,$r=0,$c=0; $i < $n; ++$i ) { + + $x = $c*($tw+$xm)+$xm/2; + $y = $r*($th+$ym)+$ym/2-10; + + $img->SetColor('blue'); + $img->SetTextAlign($anchors[$i*2],$anchors[$i*2+1]); + $img->SetFont(FF_ARIAL,FS_NORMAL,16); + $img->StrokeText($x,$y,$txt,$angle,"left",true); + + $img->SetColor('black'); + $img->SetFont(FF_FONT1,FS_BOLD); + $img->SetTextAlign('center','top'); + $align = sprintf('("%s","%s")',$anchors[$i*2],$anchors[$i*2+1]); + $img->StrokeText($c*($tw/2+$xm)+$xm/2+$tw/2,$r*($th/2+$ym)+$th+$ym/2-4,$align); + + $c++; + if( $c==3 ) { + $c=0;$r++; + } +} + +// Draw the caption text +$img->SetTextAlign('center','bottom'); +$img->SetFont(FF_ARIAL,FS_ITALIC,11); +$img->StrokeText($w/2,$h-10,$caption,0,'left'); + +$img->SetColor('navy'); +$img->Rectangle(0,0,$w-1,$h-1); + +// .. and send back to browser +$g->Stroke(); + +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_canvas/textpalignex1.php b/vendor/amenadiel/jpgraph/Examples/examples_canvas/textpalignex1.php new file mode 100644 index 0000000000..b4dfb36f07 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_canvas/textpalignex1.php @@ -0,0 +1,44 @@ +img; + +// Alignment for anchor points to use +$palign = array('left','center','right'); + +$n = count($palign); +$t = new Text($txt); + +$y = $ym; +for( $i=0; $i < $n; ++$i ) { + + $x = $xm + $i*$tw; + + $t->SetColor('black'); + $t->SetAlign('left','top'); + $t->SetFont(FF_ARIAL,FS_NORMAL,11); + $t->SetBox(); + $t->SetParagraphAlign($palign[$i]); + $t->Stroke($img, $x,$y); + + $img->SetColor('black'); + $img->SetFont(FF_FONT1,FS_BOLD); + $img->SetTextAlign('center','top'); + $img->StrokeText($x+140,$y+160,'"'.$palign[$i].'"'.' pargraph align'); + +} + +// .. and send back to browser +$g->Stroke(); + +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_contour/basic_contourex01.php b/vendor/amenadiel/jpgraph/Examples/examples_contour/basic_contourex01.php new file mode 100644 index 0000000000..284d49f3fc --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_contour/basic_contourex01.php @@ -0,0 +1,40 @@ +SetScale('intint'); + +// Adjust the margins to fit the margin +$graph->SetMargin(30, 100, 40, 30); + +// Setup +$graph->title->Set('Basic contour plot'); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); + +// A simple contour plot with default arguments (e.g. 10 isobar lines) +$cp = new Plot\ContourPlot($data); + +// Display the legend +$cp->ShowLegend(); + +$graph->Add($cp); + +// ... and send the graph back to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_contour/basic_contourex02.php b/vendor/amenadiel/jpgraph/Examples/examples_contour/basic_contourex02.php new file mode 100644 index 0000000000..3fabbfa8be --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_contour/basic_contourex02.php @@ -0,0 +1,43 @@ +SetScale('intint'); + +// Show axis on all sides +$graph->SetAxisStyle(AXSTYLE_BOXOUT); + +// Adjust the margins to fit the margin +$graph->SetMargin(30, 100, 40, 30); + +// Setup +$graph->title->Set('Basic contour plot with multiple axis'); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); + +// A simple contour plot with default arguments (e.g. 10 isobar lines) +$cp = new Plot\ContourPlot($data); + +// Display the legend +$cp->ShowLegend(); + +$graph->Add($cp); + +// ... and send the graph back to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_contour/basic_contourex03-1.php b/vendor/amenadiel/jpgraph/Examples/examples_contour/basic_contourex03-1.php new file mode 100644 index 0000000000..fc82581685 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_contour/basic_contourex03-1.php @@ -0,0 +1,39 @@ +SetScale('intint'); + +// Show axis on all sides +$graph->SetAxisStyle(AXSTYLE_BOXOUT); + +// Adjust the margins to fit the margin +$graph->SetMargin(30, 100, 40, 30); + +// Setup +$graph->title->Set('Basic contour plot with multiple axis'); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); + +// A simple contour plot with default arguments (e.g. 10 isobar lines) +$cp = new Plot\ContourPlot($data, 10, 1); + +// Display the legend +$cp->ShowLegend(); + +$graph->Add($cp); + +// ... and send the graph back to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_contour/basic_contourex03-2.php b/vendor/amenadiel/jpgraph/Examples/examples_contour/basic_contourex03-2.php new file mode 100644 index 0000000000..32367a3f82 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_contour/basic_contourex03-2.php @@ -0,0 +1,38 @@ +SetScale('intint'); + +// Show axis on all sides +$graph->SetAxisStyle(AXSTYLE_BOXOUT); + +// Adjust the margins to fit the margin +$graph->SetMargin(30, 100, 40, 30); + +// Setup +$graph->title->Set('Basic contour plot with multiple axis'); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); + +// A simple contour plot with default arguments (e.g. 10 isobar lines) +$cp = new Plot\ContourPlot($data, 10, 2); + +// Display the legend +$cp->ShowLegend(); + +$graph->Add($cp); + +// ... and send the graph back to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_contour/basic_contourex03-3.php b/vendor/amenadiel/jpgraph/Examples/examples_contour/basic_contourex03-3.php new file mode 100644 index 0000000000..183b9945f6 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_contour/basic_contourex03-3.php @@ -0,0 +1,39 @@ +SetScale('intint'); + +// Show axis on all sides +$graph->SetAxisStyle(AXSTYLE_BOXOUT); + +// Adjust the margins to fit the margin +$graph->SetMargin(30, 100, 40, 30); + +// Setup +$graph->title->Set('Basic contour plot with multiple axis'); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); + +// A simple contour plot with default arguments (e.g. 10 isobar lines) +$cp = new Plot\ContourPlot($data, 10, 3); + +// Display the legend +$cp->ShowLegend(); + +$graph->Add($cp); + +// ... and send the graph back to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_contour/basic_contourex04.php b/vendor/amenadiel/jpgraph/Examples/examples_contour/basic_contourex04.php new file mode 100644 index 0000000000..f5d397fe81 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_contour/basic_contourex04.php @@ -0,0 +1,43 @@ +SetScale('intint'); + +// Show axis on all sides +$graph->SetAxisStyle(AXSTYLE_BOXOUT); + +// Adjust the margins to fit the margin +$graph->SetMargin(30, 100, 40, 30); + +// Setup +$graph->title->Set('Basic contour plot with multiple axis'); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); + +// A simple contour plot with default arguments (e.g. 10 isobar lines) +$cp = new Plot\ContourPlot($data, 5); + +// Display the legend +$cp->ShowLegend(); + +$graph->Add($cp); + +// ... and send the graph back to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_contour/basic_contourex05.php b/vendor/amenadiel/jpgraph/Examples/examples_contour/basic_contourex05.php new file mode 100644 index 0000000000..3a46b717db --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_contour/basic_contourex05.php @@ -0,0 +1,46 @@ +SetScale('intint'); + +// Show axis on all sides +$graph->SetAxisStyle(AXSTYLE_BOXOUT); + +// Adjust the margins to fit the margin +$graph->SetMargin(30, 100, 40, 30); + +// Setup +$graph->title->Set('Basic contour plot with multiple axis'); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); + +// A simple contour plot with default arguments (e.g. 10 isobar lines) +$cp = new Plot\ContourPlot($data); + +// Flip the data around its center line +$cp->SetInvert(); + +// Display the legend +$cp->ShowLegend(); + +$graph->Add($cp); + +// ... and send the graph back to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_contour/contour2_ex1.php b/vendor/amenadiel/jpgraph/Examples/examples_contour/contour2_ex1.php new file mode 100644 index 0000000000..a48453119f --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_contour/contour2_ex1.php @@ -0,0 +1,49 @@ +SetMargin(30, 30, 40, 30); +$graph->SetScale('intint'); +$graph->SetMarginColor('white'); + +// Setup title of graph +$graph->title->Set('Filled contour plot'); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); + +$graph->subtitle->Set('(With lines and labels)'); +$graph->subtitle->SetFont(FF_VERDANA, FS_ITALIC, 10); + +// Create a new contour plot +$cp = new FilledContourPlot($data); + +// Use only blue/red color schema +$cp->UseHighContrastColor(true); + +// Flip visually +$cp->SetInvert(); + +// Fill the contours +$cp->SetFilled(true); + +// Display the labels +$cp->ShowLabels(true, true); +$cp->SetFont(FF_ARIAL, FS_BOLD, 9); +$cp->SetFontColor('white'); + +// And add the plot to the graph +$graph->Add($cp); + +// Send it back to the client +$graph->stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_contour/contour2_ex2.php b/vendor/amenadiel/jpgraph/Examples/examples_contour/contour2_ex2.php new file mode 100644 index 0000000000..dc7d96dec7 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_contour/contour2_ex2.php @@ -0,0 +1,50 @@ +SetMargin(30, 30, 40, 30); +$graph->SetScale('intint'); +$graph->SetMarginColor('white'); + +// Setup title of graph +$graph->title->Set('Filled contour plot'); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); + +$graph->subtitle->Set('(No lines, no labels)'); +$graph->subtitle->SetFont(FF_VERDANA, FS_ITALIC, 10); + +// Create a new contour plot +$cp = new FilledContourPlot($data); + +// Use only blue/red color schema +$cp->UseHighContrastColor(true); + +// Flip visually +$cp->SetInvert(); + +// Fill the contours +$cp->SetFilled(true); + +// No labels +$cp->ShowLabels(false); + +// No lines +$cp->ShowLines(false); + +// And add the plot to the graph +$graph->Add($cp); + +// Send it back to the client +$graph->stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_contour/contour2_ex3.php b/vendor/amenadiel/jpgraph/Examples/examples_contour/contour2_ex3.php new file mode 100644 index 0000000000..d0a093bce7 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_contour/contour2_ex3.php @@ -0,0 +1,54 @@ +SetMargin(30, 30, 40, 30); +$graph->SetScale('intint'); +$graph->SetMarginColor('white'); + +// Setup title of graph +$graph->title->Set('Filled contour plot'); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); + +$graph->subtitle->Set('(Manual colors)'); +$graph->subtitle->SetFont(FF_VERDANA, FS_ITALIC, 10); + +// Create a new contour plot with only 3 isobars +$cp = new FilledContourPlot($data, 3); + +// Specify the colors manually +$isobar_colors = array('lightgray', 'teal:1.3', 'orange', 'red'); +$cp->SetIsobarColors($isobar_colors); + +// Use only blue/red color schema +$cp->UseHighContrastColor(true); + +// Flip visually +$cp->SetInvert(); + +// Fill the contours +$cp->SetFilled(true); + +// Display labels +$cp->ShowLabels(true); + +// No lines +$cp->ShowLines(false); + +// And add the plot to the graph +$graph->Add($cp); + +// Send it back to the client +$graph->stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_contour/contour2_ex4.php b/vendor/amenadiel/jpgraph/Examples/examples_contour/contour2_ex4.php new file mode 100644 index 0000000000..dcfb0188b6 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_contour/contour2_ex4.php @@ -0,0 +1,46 @@ +SetMargin(30, 30, 40, 30); +$graph->SetScale('intint'); +$graph->SetMarginColor('white'); + +// Setup title of graph +$graph->title->Set('Filled contour plot'); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); + +$graph->subtitle->Set('(labels follows gradients)'); +$graph->subtitle->SetFont(FF_VERDANA, FS_ITALIC, 10); + +// Create a new contour plot +$cp = new FilledContourPlot($data, 8); + +// Flip visually +$cp->SetInvert(); + +// Fill the contours +$cp->SetFilled(true); + +// Display the labels +$cp->ShowLabels(true, true); +$cp->SetFont(FF_ARIAL, FS_BOLD, 9); +$cp->SetFontColor('black'); + +// And add the plot to the graph +$graph->Add($cp); + +// Send it back to the client +$graph->stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_contour/contour2_ex5.php b/vendor/amenadiel/jpgraph/Examples/examples_contour/contour2_ex5.php new file mode 100644 index 0000000000..15def52cec --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_contour/contour2_ex5.php @@ -0,0 +1,51 @@ +SetMargin(30, 30, 40, 30); +$graph->SetScale('intint'); +$graph->SetMarginColor('white'); + +// Setup title of graph +$graph->title->Set('Filled contour plot'); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); + +$graph->subtitle->Set('(horizontal labels)'); +$graph->subtitle->SetFont(FF_VERDANA, FS_ITALIC, 10); + +// Create a new contour plot +$cp = new FilledContourPlot($data, 8); + +// Use only black/and white schema +$cp->UseHighContrastColor(true, true); + +// Flip visually +$cp->SetInvert(); + +// Fill the contours +$cp->SetFilled(true); +// Show lines in red +$cp->ShowLines(true, 'red'); + +// Display the labels +$cp->ShowLabels(true, false); +$cp->SetFont(FF_ARIAL, FS_BOLD, 9); +$cp->SetFontColor('white'); + +// And add the plot to the graph +$graph->Add($cp); + +// Send it back to the client +$graph->stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_contour/contour2_ex6.php b/vendor/amenadiel/jpgraph/Examples/examples_contour/contour2_ex6.php new file mode 100644 index 0000000000..e5c2980571 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_contour/contour2_ex6.php @@ -0,0 +1,52 @@ +SetMargin(30, 30, 40, 30); +$graph->SetScale('intint'); +$graph->SetMarginColor('white'); + +// Setup title of graph +$graph->title->Set('Filled contour plot'); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); + +$graph->subtitle->Set('(With lines and labels)'); +$graph->subtitle->SetFont(FF_VERDANA, FS_ITALIC, 10); + +// Create a new contour plot +$cp = new FilledContourPlot($data, 7); + +// Use only blue/red color schema +$cp->UseHighContrastColor(true); + +// Flip visually +$cp->SetInvert(); + +// Fill the contours +$cp->SetFilled(true); + +// Specify method to use +$cp->SetMethod('rect'); + +// Display the labels +$cp->ShowLabels(true, true); +$cp->SetFont(FF_ARIAL, FS_BOLD, 9); +$cp->SetFontColor('white'); + +// And add the plot to the graph +$graph->Add($cp); + +// Send it back to the client +$graph->stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_contour/contour2_ex7.php b/vendor/amenadiel/jpgraph/Examples/examples_contour/contour2_ex7.php new file mode 100644 index 0000000000..856a06bc68 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_contour/contour2_ex7.php @@ -0,0 +1,52 @@ +SetMargin(30, 30, 40, 30); +$graph->SetScale('intint'); +$graph->SetMarginColor('white'); + +// Setup title of graph +$graph->title->Set('Filled contour plot'); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); + +$graph->subtitle->Set('(With lines and labels)'); +$graph->subtitle->SetFont(FF_VERDANA, FS_ITALIC, 10); + +// Create a new contour plot +$cp = new FilledContourPlot($data, 7); + +// Use only blue/red color schema +$cp->UseHighContrastColor(true); + +// Flip visually +$cp->SetInvert(); + +// Fill the contours +$cp->SetFilled(true); + +// Specify method to use +$cp->SetMethod('tri'); + +// Display the labels +$cp->ShowLabels(true, true); +$cp->SetFont(FF_ARIAL, FS_BOLD, 9); +$cp->SetFontColor('white'); + +// And add the plot to the graph +$graph->Add($cp); + +// Send it back to the client +$graph->stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_contour/contourex01.php b/vendor/amenadiel/jpgraph/Examples/examples_contour/contourex01.php new file mode 100644 index 0000000000..2d29e53a45 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_contour/contourex01.php @@ -0,0 +1,46 @@ +SetMargin(40, 140, 60, 40); + +$graph->title->Set('Example of contour plot'); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); + +// For contour plots it is custom to use a box style ofr the axis +$graph->legend->SetPos(0.05, 0.5, 'right', 'center'); +$graph->SetScale('intint'); +$graph->SetAxisStyle(AXSTYLE_BOXOUT); +$graph->xgrid->Show(); +$graph->ygrid->Show(); + +// A simple contour plot with default arguments (e.g. 10 isobar lines) +$cp = new Plot\ContourPlot($data); + +// Display the legend +$cp->ShowLegend(); + +// Make the isobar lines slightly thicker +$cp->SetLineWeight(2); +$graph->Add($cp); + +// ... and send the graph back to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_contour/contourex02.php b/vendor/amenadiel/jpgraph/Examples/examples_contour/contourex02.php new file mode 100644 index 0000000000..875fbef5b6 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_contour/contourex02.php @@ -0,0 +1,41 @@ +SetMargin(40, 140, 60, 40); + +$graph->title->Set("Example of contour plot"); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); + +// For contour plots it is custom to use a box style ofr the axis +$graph->legend->SetPos(0.05, 0.5, 'right', 'center'); +$graph->SetScale('intint'); +$graph->SetAxisStyle(AXSTYLE_BOXOUT); +$graph->xgrid->Show(); +$graph->ygrid->Show(); + +// A simple contour plot with 12 isobar lines and flipped Y-coordinates +$cp = new Plot\ContourPlot($data, 12, true); + +// Display the legend +$cp->ShowLegend(); + +// Make the isobar lines slightly thicker +$graph->Add($cp); + +// ... and send the graph back to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_contour/contourex03.php b/vendor/amenadiel/jpgraph/Examples/examples_contour/contourex03.php new file mode 100644 index 0000000000..f82d72d12f --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_contour/contourex03.php @@ -0,0 +1,49 @@ +SetMargin(40, 140, 60, 40); + +// Enable antialias. Note with antiaaliasing only line weight=1 is supported. +$graph->img->SetAntiAliasing(); + +$graph->title->Set("Example of contour plot"); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); + +// For contour plots it is custom to use a box style ofr the axis +$graph->legend->SetPos(0.05, 0.5, 'right', 'center'); +$graph->SetScale('intint'); +$graph->SetAxisStyle(AXSTYLE_BOXOUT); +$graph->xgrid->Show(); +$graph->ygrid->Show(); + +// A simple contour plot with 19 isobars and flipped vertical range +$cp = new Plot\ContourPlot($data, 10, true); + +// Display the legend +$cp->ShowLegend(); + +// Invert the legend to th lowest isobar is on top +$cp->Invertlegend(); +$graph->Add($cp); + +// ... and send the graph back to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_contour/contourex04.php b/vendor/amenadiel/jpgraph/Examples/examples_contour/contourex04.php new file mode 100644 index 0000000000..09d288f1b5 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_contour/contourex04.php @@ -0,0 +1,50 @@ +SetMargin(40, 140, 60, 40); + +$graph->title->Set("Example of interpolated contour plot"); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$graph->title->SetMargin(10); + +// For contour plots it is custom to use a box style ofr the axis +$graph->legend->SetPos(0.05, 0.5, 'right', 'center'); +$graph->SetScale('intint'); + +// Setup axis and grids +$graph->SetAxisStyle(AXSTYLE_BOXOUT); +$graph->xgrid->SetLineStyle('dashed'); +$graph->xgrid->Show(true); +$graph->ygrid->SetLineStyle('dashed'); +$graph->ygrid->Show(true); + +// A simple contour plot with 10 isobar lines and flipped Y-coordinates +// Make the data smoother by interpolate the original matrice by a factor of two +// which will make each grid cell half the original size +$cp = new Plot\ContourPlot($data, 10, 2); + +$cp->UseHighContrastColor(true); + +// Display the legend +$cp->ShowLegend(); + +// Make the isobar lines slightly thicker +$graph->Add($cp); + +// ... and send the graph back to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_contour/contourex05.php b/vendor/amenadiel/jpgraph/Examples/examples_contour/contourex05.php new file mode 100644 index 0000000000..18e5b88fad --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_contour/contourex05.php @@ -0,0 +1,58 @@ +SetMargin(40, 120, 60, 50); + +$graph->title->Set("Contour plot, high contrast color"); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); +$graph->title->SetMargin(10); + +// For contour plots it is custom to use a box style ofr the axis +$graph->SetScale('intint', 0, 56, 0, 56); + +// Setup axis and grids +$graph->SetAxisStyle(AXSTYLE_BOXOUT); +$graph->xgrid->Show(true); +$graph->ygrid->Show(true); + +// A simple contour plot with 10 isobar lines and flipped Y-coordinates +// Make the data smoother by interpolate the original matrice by a factor of two +// which will make each grid cell half the original size +$cp = new Plot\ContourPlot($data, 10, 3); + +$cp->UseHighContrastColor(true); + +// Display the legend +$cp->ShowLegend(); + +// Make the isobar lines slightly thicker +$graph->Add($cp); + +// ... and send the graph back to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_datamatrix/datamatrix_ex0.php b/vendor/amenadiel/jpgraph/Examples/examples_datamatrix/datamatrix_ex0.php new file mode 100644 index 0000000000..8de2522226 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_datamatrix/datamatrix_ex0.php @@ -0,0 +1,18 @@ +SetEncoding(ENCODING_ASCII); +$backend = DatamatrixBackendFactory::Create($encoder); + +// We increase the module width to 3 pixels +$backend->SetModuleWidth(3); + +try { + $backend->Stroke($data); +} catch (Exception $e) { + echo 'Datamatrix error: '.$e->GetMessage()."\n"; + exit(1); +} +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_datamatrix/datamatrix_ex00.php b/vendor/amenadiel/jpgraph/Examples/examples_datamatrix/datamatrix_ex00.php new file mode 100644 index 0000000000..1aec89f397 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_datamatrix/datamatrix_ex00.php @@ -0,0 +1,9 @@ +Stroke($data); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_datamatrix/datamatrix_ex1.php b/vendor/amenadiel/jpgraph/Examples/examples_datamatrix/datamatrix_ex1.php new file mode 100644 index 0000000000..a2e735836c --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_datamatrix/datamatrix_ex1.php @@ -0,0 +1,18 @@ +SetModuleWidth(3); + +// Create the barcode from the given data string and write to output file +try { + $backend->Stroke($data); +} catch (Exception $e) { + $errstr = $e->GetMessage(); + echo "Datamatrix error message: $errstr\n"; +} + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_datamatrix/datamatrix_ex2.php b/vendor/amenadiel/jpgraph/Examples/examples_datamatrix/datamatrix_ex2.php new file mode 100644 index 0000000000..e7c9462b47 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_datamatrix/datamatrix_ex2.php @@ -0,0 +1,21 @@ +SetEncoding(ENCODING_BASE256); + +// Create the image backend (default) +$backend = DatamatrixBackendFactory::Create($encoder); +$backend->SetModuleWidth(3); + +try { + $backend->Stroke($data); +} catch (Exception $e) { + $errstr = $e->GetMessage(); + echo "Datamatrix error message: $errstr\n"; +} + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_datamatrix/datamatrix_ex3.php b/vendor/amenadiel/jpgraph/Examples/examples_datamatrix/datamatrix_ex3.php new file mode 100644 index 0000000000..6b6b8279eb --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_datamatrix/datamatrix_ex3.php @@ -0,0 +1,21 @@ +SetEncoding(ENCODING_BASE256); + +// Create the image backend (default) +$backend = DatamatrixBackendFactory::Create($encoder); +$backend->SetModuleWidth(3); + +try { + $backend->Stroke($data); +} catch (Exception $e) { + $errstr = $e->GetMessage(); + echo "Datamatrix error message: $errstr\n"; +} + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_datamatrix/datamatrix_ex4.php b/vendor/amenadiel/jpgraph/Examples/examples_datamatrix/datamatrix_ex4.php new file mode 100644 index 0000000000..77b36674d1 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_datamatrix/datamatrix_ex4.php @@ -0,0 +1,25 @@ +SetEncoding(ENCODING_TEXT); + +// Create the image backend (default) +$backend = DatamatrixBackendFactory::Create($encoder); +$backend->SetModuleWidth(3); + +// Adjust the Quiet zone +$backend->SetQuietZone(10); + +// Create the barcode from the given data string and write to output file +try { + $backend->Stroke($data); +} catch (Exception $e) { + $errstr = $e->GetMessage(); + echo "Datamatrix error message: $errstr\n"; +} + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_datamatrix/datamatrix_ex5.php b/vendor/amenadiel/jpgraph/Examples/examples_datamatrix/datamatrix_ex5.php new file mode 100644 index 0000000000..9242252eb1 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_datamatrix/datamatrix_ex5.php @@ -0,0 +1,30 @@ +SetEncoding(ENCODING_TEXT); + +// Create the image backend (default) +$backend = DatamatrixBackendFactory::Create($encoder); + +// By default the module width is 2 pixel so we increase it a bit +$backend->SetModuleWidth(4); + +// Set Quiet zone +$backend->SetQuietZone(10); + +// Set other than default colors (one, zero, quiet zone/background) +$backend->SetColor('navy','white','lightgray'); + +// Create the barcode from the given data string and write to output file +try { + $backend->Stroke($data); +} catch (Exception $e) { + $errstr = $e->GetMessage(); + echo "Datamatrix error message: $errstr\n"; +} + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_datamatrix/datamatrix_ex6.php b/vendor/amenadiel/jpgraph/Examples/examples_datamatrix/datamatrix_ex6.php new file mode 100644 index 0000000000..918bc4b1ee --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_datamatrix/datamatrix_ex6.php @@ -0,0 +1,33 @@ +SetEncoding(ENCODING_TEXT); + +// Create the image backend (default) +$backend = DatamatrixBackendFactory::Create($encoder); +$backend->SetModuleWidth(5); +$backend->SetQuietZone(10); + +// Set other than default colors (one, zero, background) +$backend->SetColor('navy','white'); + +// Create the barcode from the given data string and write to output file +$dir = dirname(__FILE__); +$file = '"'.$dir.'/'.$outputfile.'"'; +try { + $backend->Stroke($data,$outputfile); + echo 'Barcode sucessfully written to file: '.$file; +} catch (Exception $e) { + $errstr = $e->GetMessage(); + $errcode = $e->GetCode(); + echo "Failed writing file: ".$file.'
        '; + echo "Datamatrix error ($errcode). Message: $errstr\n"; +} + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_datamatrix/datamatrix_ex7.php b/vendor/amenadiel/jpgraph/Examples/examples_datamatrix/datamatrix_ex7.php new file mode 100644 index 0000000000..a27d42cf52 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_datamatrix/datamatrix_ex7.php @@ -0,0 +1,22 @@ +SetEncoding(ENCODING_BASE256); + +// Create the image backend (default) +$backend = DatamatrixBackendFactory::Create($encoder, BACKEND_ASCII); +$backend->SetModuleWidth(3); + +try { + $ps_txt = $backend->Stroke($data); + echo '
        '.$ps_txt.'
        '; +} catch (Exception $e) { + $errstr = $e->GetMessage(); + echo "Datamatrix error message: $errstr\n"; +} + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_date/dateaxisex1.php b/vendor/amenadiel/jpgraph/Examples/examples_date/dateaxisex1.php new file mode 100644 index 0000000000..226245ffda --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_date/dateaxisex1.php @@ -0,0 +1,53 @@ +SetMargin(40, 40, 30, 70); +$graph->title->Set('Date: ' . date('Y-m-d', $now)); +$graph->SetAlphaBlending(); + +// Setup a manual x-scale (We leave the sentinels for the +// Y-axis at 0 which will then autoscale the Y-axis.) +// We could also use autoscaling for the x-axis but then it +// probably will start a little bit earlier than the first value +// to make the first value an even number as it sees the timestamp +// as an normal integer value. +$graph->SetScale("intlin", 0, 200, $now, $datax[$n - 1]); + +// Setup the x-axis with a format callback to convert the timestamp +// to a user readable time +$graph->xaxis->SetLabelFormatCallback('TimeCallback'); +$graph->xaxis->SetLabelAngle(90); + +// Create the line +$p1 = new Plot\LinePlot($datay, $datax); +$p1->SetColor("blue"); + +// Set the fill color partly transparent +$p1->SetFillColor("blue@0.4"); + +// Add lineplot to the graph +$graph->Add($p1); + +// Output line +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_date/dateaxisex2.php b/vendor/amenadiel/jpgraph/Examples/examples_date/dateaxisex2.php new file mode 100644 index 0000000000..bd6a2eb436 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_date/dateaxisex2.php @@ -0,0 +1,36 @@ +SetMargin(40, 40, 30, 130); + +// Fix the Y-scale to go between [0,100] and use date for the x-axis +$graph->SetScale('datlin', 0, 100); +$graph->title->Set("Example on Date scale"); + +// Set the angle for the labels to 90 degrees +$graph->xaxis->SetLabelAngle(90); + +$line = new Plot\LinePlot($data, $xdata); +$line->SetLegend('Year 2005'); +$line->SetFillColor('lightblue@0.5'); +$graph->Add($line); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_date/dateaxisex3.php b/vendor/amenadiel/jpgraph/Examples/examples_date/dateaxisex3.php new file mode 100644 index 0000000000..07342e16a2 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_date/dateaxisex3.php @@ -0,0 +1,46 @@ +SetMargin(40, 40, 30, 130); + +// Fix the Y-scale to go between [0,100] and use date for the x-axis +$graph->SetScale('datlin', 0, 100); +$graph->title->Set("Example on Date scale"); + +// Set the angle for the labels to 90 degrees +$graph->xaxis->SetLabelAngle(90); + +// It is possible to adjust the density for the X-axis as well +// The following call makes the dates a little more sparse +// $graph->SetTickDensity(TICKD_NORMAL,TICKD_SPARSE); + +// The automatic format string for dates can be overridden +// $graph->xaxis->scale->SetDateFormat('h:i'); + +// Adjust the start/end to a specific alignment +$graph->xaxis->scale->SetTimeAlign(MINADJ_15); + +$line = new Plot\LinePlot($data, $xdata); +$line->SetLegend('Year 2005'); +$line->SetFillColor('lightblue@0.5'); +$graph->Add($line); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_date/dateaxisex4.php b/vendor/amenadiel/jpgraph/Examples/examples_date/dateaxisex4.php new file mode 100644 index 0000000000..b648e0df2b --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_date/dateaxisex4.php @@ -0,0 +1,42 @@ +SetMargin(40, 40, 30, 130); + +// Fix the Y-scale to go between [0,100] and use date for the x-axis +$graph->SetScale('datlin', 0, 100); +$graph->title->Set("Example on Date scale"); + +// Set the angle for the labels to 90 degrees +$graph->xaxis->SetLabelAngle(90); + +// The automatic format string for dates can be overridden +$graph->xaxis->scale->SetDateFormat('H:i'); + +// Adjust the start/end to a specific alignment +$graph->xaxis->scale->SetTimeAlign(MINADJ_10); + +$line = new Plot\LinePlot($data, $xdata); +$line->SetLegend('Year 2005'); +$line->SetFillColor('lightblue@0.5'); +$graph->Add($line); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_date/datescaleticksex01.php b/vendor/amenadiel/jpgraph/Examples/examples_date/datescaleticksex01.php new file mode 100644 index 0000000000..a7d4adede1 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_date/datescaleticksex01.php @@ -0,0 +1,62 @@ +SetMargin(80, 30, 50, 40); +$graph->SetMarginColor('white'); +$graph->SetScale('dateint'); +$graph->title->Set('Current Bids'); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); +$graph->subtitle->Set('(Updated every 5 minutes)'); +$graph->subtitle->SetFont(FF_ARIAL, FS_ITALIC, 10); + +// Enable antialias +$graph->img->SetAntiAliasing(); + +// Setup the y-axis to show currency values +$graph->yaxis->SetLabelFormatCallback('number_format'); +$graph->yaxis->SetLabelFormat('$%s'); + +//Use hour:minute format for the labels +$graph->xaxis->scale->SetDateFormat('H:i'); + +// Force labels to only be displayed every 5 minutes +$graph->xaxis->scale->ticks->Set(INTERVAL); + +// Adjust the start time for an "even" 5 minute, i.e. 5,10,15,20,25, ... +$graph->xaxis->scale->SetTimeAlign(MINADJ_5); + +// Create the plots using the dummy data created at the beginning +$line = array(); +for ($i = 0; $i < $m; ++$i) { + $line[$i] = new Plot\LinePlot($bids[$i], $times); + $line[$i]->mark->SetType(MARK_SQUARE); +} +$graph->Add($line); + +// Send the graph back to the client +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_date/dateutilex01.php b/vendor/amenadiel/jpgraph/Examples/examples_date/dateutilex01.php new file mode 100644 index 0000000000..3c1ae3beea --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_date/dateutilex01.php @@ -0,0 +1,52 @@ +SetScale('intlin', 0, 0, min($xdata), max($xdata)); +$graph->SetMargin(60, 20, 40, 60); + +// Setup the titles +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); +$graph->title->Set('Development since 1984'); +$graph->subtitle->SetFont(FF_ARIAL, FS_ITALIC, 10); +$graph->subtitle->Set('(Example using DateScaleUtils class)'); + +// Setup the labels to be correctly format on the X-axis +$graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 8); +$graph->xaxis->SetLabelAngle(30); + +// The second paramter set to 'true' will make the library interpret the +// format string as a date format. We use a Month + Year format +$graph->xaxis->SetLabelFormatString('M, Y', true); + +// Get manual tick every second year +list($tickPos, $minTickPos) = $dateUtils->getTicks($xdata, DSUTILS_YEAR2); +$graph->xaxis->SetTickPositions($tickPos, $minTickPos); + +// First add an area plot +$lp1 = new Plot\LinePlot($ydata, $xdata); +$lp1->SetWeight(0); +$lp1->SetFillColor('orange@0.85'); +$graph->Add($lp1); + +// And then add line. We use two plots in order to get a +// more distinct border on the graph +$lp2 = new Plot\LinePlot($ydata, $xdata); +$lp2->SetColor('orange'); +$graph->Add($lp2); + +// And send back to the client +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_date/dateutilex02.php b/vendor/amenadiel/jpgraph/Examples/examples_date/dateutilex02.php new file mode 100644 index 0000000000..27dcdbda9f --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_date/dateutilex02.php @@ -0,0 +1,46 @@ +SetScale('datlin'); +$graph->SetMargin(60, 20, 40, 60); + +// Setup the titles +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); +$graph->title->Set('Development since 1984'); +$graph->subtitle->SetFont(FF_ARIAL, FS_ITALIC, 10); +$graph->subtitle->Set('(Example using the builtin date scale)'); + +// Setup the labels to be correctly format on the X-axis +$graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 8); +$graph->xaxis->SetLabelAngle(30); + +// The second paramter set to 'true' will make the library interpret the +// format string as a date format. We use a Month + Year format +// $graph->xaxis->SetLabelFormatString('M, Y',true); + +// First add an area plot +$lp1 = new Plot\LinePlot($ydata, $xdata); +$lp1->SetWeight(0); +$lp1->SetFillColor('orange@0.85'); +$graph->Add($lp1); + +// And then add line. We use two plots in order to get a +// more distinct border on the graph +$lp2 = new Plot\LinePlot($ydata, $xdata); +$lp2->SetColor('orange'); +$graph->Add($lp2); + +// And send back to the client +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/gantt_samerowex1.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/gantt_samerowex1.php new file mode 100644 index 0000000000..6c59cebde6 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/gantt_samerowex1.php @@ -0,0 +1,63 @@ +SetShadow(); + +// Add title and subtitle +$graph->title->Set("Activities on same row"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Instead of week number show the date for the first day in the week +// on the week scale +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); + +// Make the week scale font smaller than the default +$graph->scale->week->SetFont(FF_FONT0); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// 0 % vertical label margin +$graph->SetLabelVMarginFactor(1); // 1=default value + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity1 = new GanttBar(0,"Activity 1","2001-12-21","2001-12-26",""); + +// Yellow diagonal line pattern on a red background +$activity1->SetPattern(BAND_RDIAG,"yellow"); +$activity1->SetFillColor("red"); + +// Set absolute height of activity +$activity1->SetHeight(16); + +// Format the bar for the second activity +// ($row,$title,$startdate,$enddate) +$activity2 = new GanttBar(0,"","2001-12-31","2002-01-2","[BO]"); + +// ADjust font for caption +$activity2->caption->SetFont(FF_ARIAL,FS_BOLD); +$activity2->caption->SetColor("darkred"); + +// Yellow diagonal line pattern on a red background +$activity2->SetPattern(BAND_RDIAG,"yellow"); +$activity2->SetFillColor("red"); + +// Set absolute height of activity +$activity2->SetHeight(16); + +// Finally add the bar to the graph +$graph->Add($activity1); +$graph->Add($activity2); + +// ... and display it +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/gantt_samerowex2.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/gantt_samerowex2.php new file mode 100644 index 0000000000..b3e2702a00 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/gantt_samerowex2.php @@ -0,0 +1,65 @@ +SetShadow(); + +// Add title and subtitle +$graph->title->Set("Activities on same row"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set('Using break style'); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Instead of week number show the date for the first day in the week +// on the week scale +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); + +// Make the week scale font smaller than the default +$graph->scale->week->SetFont(FF_FONT0); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// 0 % vertical label margin +$graph->SetLabelVMarginFactor(1); // 1=default value + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity1 = new GanttBar(0,"Activity 1","2001-12-21","2001-12-26",""); + +// Yellow diagonal line pattern on a red background +$activity1->SetPattern(BAND_RDIAG,"yellow"); +$activity1->SetFillColor("red"); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$break1 = new GanttBar(0,'',"2001-12-27","2001-12-30",""); +$break1->SetBreakStyle(true,'dotted',2); +$break1->SetColor('red'); +$graph->Add($break1); + +// Format the bar for the second activity +// ($row,$title,$startdate,$enddate) +$activity2 = new GanttBar(0,"","2001-12-31","2002-01-2","[BO]"); + +// ADjust font for caption +$activity2->caption->SetFont(FF_ARIAL,FS_BOLD); +$activity2->caption->SetColor("darkred"); + +// Yellow diagonal line pattern on a red background +$activity2->SetPattern(BAND_RDIAG,"yellow"); +$activity2->SetFillColor("red"); + +// Finally add the bar to the graph +$graph->Add($activity1); +$graph->Add($activity2); + +// ... and display it +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/gantt_textex1.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/gantt_textex1.php new file mode 100644 index 0000000000..dae1d56e66 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/gantt_textex1.php @@ -0,0 +1,96 @@ +SetBox(); +$graph->SetShadow(); + +// Add title and subtitle +$graph->title->Set("Example with added texts"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Set table title +$graph->scale->tableTitle->Set("(Rev: 1.22)"); +$graph->scale->tableTitle->SetFont(FF_FONT1,FS_BOLD); +$graph->scale->SetTableTitleBackground("silver"); + +// Modify the appearance of the dividing lines +$graph->scale->divider->SetWeight(3); +$graph->scale->divider->SetColor("navy"); +$graph->scale->dividerh->SetWeight(3); +$graph->scale->dividerh->SetColor("navy"); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// 0 % vertical label margin +$graph->SetLabelVMarginFactor(1); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-01-07","[50%]"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Set absolute height +$activity->SetHeight(10); + +// Specify progress to 60% +$activity->progress->Set(0.6); +$activity->progress->SetPattern(BAND_HVCROSS,"blue"); + +// Format the bar for the second activity +// ($row,$title,$startdate,$enddate) +$activity2 = new GanttBar(1,"Project","2001-12-21","2001-12-27","[30%]"); + +// Yellow diagonal line pattern on a red background +$activity2->SetPattern(BAND_RDIAG,"yellow"); +$activity2->SetFillColor("red"); + +// Set absolute height +$activity2->SetHeight(10); + +// Specify progress to 30% +$activity2->progress->Set(0.3); +$activity2->progress->SetPattern(BAND_HVCROSS,"blue"); + +// Finally add the bar to the graph +$graph->Add($activity); +$graph->Add($activity2); + +// Add text to top left corner of graph +$txt1 = new Text(); +$txt1->SetPos(5,2); +$txt1->Set("Note:\nEstimate done w148"); +$txt1->SetFont(FF_ARIAL,FS_BOLD,12); +$txt1->SetColor('darkred'); +$graph->Add($txt1); + +// Add text to the top bar +$txt2 = new Text(); +$txt2->SetScalePos("2002-01-01",1); +$txt2->SetFont(FF_ARIAL,FS_BOLD,12); +$txt2->SetAlign('left','center'); +$txt2->Set("Remember this!"); +$txt2->SetBox('yellow'); +$graph->Add($txt2); + + +// Add a vertical line +$vline = new GanttVLine("2001-12-24","Phase 1"); +$vline->SetDayOffset(0.5); +//$graph->Add($vline); + +// ... and display it +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttcolumnfontsex01.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttcolumnfontsex01.php new file mode 100644 index 0000000000..a371f87546 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttcolumnfontsex01.php @@ -0,0 +1,68 @@ +SetMarginColor('gray:1.7'); +$graph->SetColor('white'); + +// Setup the graph title and title font +$graph->title->Set("Example of column fonts"); +$graph->title->SetFont(FF_VERDANA,FS_BOLD,14); + +// Show three headers +$graph->ShowHeaders(GANTT_HDAY | GANTT_HMONTH| GANTT_HYEAR); + +// Set the column headers and font +$graph->scale->actinfo->SetColTitles( array('Name','Start','End'),array(100)); +$graph->scale->actinfo->SetFont(FF_ARIAL,FS_BOLD,11); + +// Some "dummy" data to be dsiplayed +$data = array( + array(0,'Group 1', '2001-11-27','2001-12-05'), + array(1,' Activity 1', '2001-11-27','2001-11-29'), + array(2,' Activity 2', '2001-11-28','2001-12-05'), + array(3,'Group 2', '2001-11-29','2001-12-10'), + array(4,' Activity 1', '2001-11-29','2001-12-03'), + array(5,' Activity 2', '2001-12-01','2001-12-10'), + +); + +// Format and add the Gantt bars to the chart +$n = count($data); +for($i=0; $i < $n; ++$i) { + if( $i === 0 || $i === 3 ) { + // Format the group bars + $bar = new GanttBar($data[$i][0],array($data[$i][1],$data[$i][2],$data[$i][3]),$data[$i][2],$data[$i][3],'',0.35); + + // For each group make the name bold but keep the dates as the default font + $bar->title->SetColumnFonts(array(array(FF_ARIAL,FS_BOLD,11))); + + // Add group markers + $bar->leftMark->SetType( MARK_LEFTTRIANGLE ); + $bar->leftMark->Show(); + $bar->rightMark->SetType( MARK_RIGHTTRIANGLE ); + $bar->rightMark->Show(); + $bar->SetFillColor('black'); + $bar->SetPattern(BAND_SOLID,'black'); + } + else { + // Format the activity bars + $bar = new GanttBar($data[$i][0],array($data[$i][1],$data[$i][2],$data[$i][3]),$data[$i][2],$data[$i][3],'',0.45); + $bar->SetPattern(BAND_RDIAG,'black'); + $bar->SetFillColor('orange'); + } + // Default font + $bar->title->SetFont(FF_ARIAL,FS_NORMAL,10); + $graph->Add($bar); +} + +// Send back the graph to the client +$graph->Stroke(); +?> + + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttconstrainex0.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttconstrainex0.php new file mode 100644 index 0000000000..8f5b72a12b --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttconstrainex0.php @@ -0,0 +1,38 @@ +title->Set("Example with grouping and constrains"); + +// Setup scale +$graph->ShowHeaders(GANTT_HYEAR | GANTT_HMONTH | GANTT_HDAY | GANTT_HWEEK); +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAYWNBR); + +// Add the specified activities +$graph->CreateSimple($data,$constrains,$progress); + +// .. and stroke the graph +$graph->Stroke(); + +?> + + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttconstrainex1.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttconstrainex1.php new file mode 100644 index 0000000000..7e9a3c1f50 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttconstrainex1.php @@ -0,0 +1,40 @@ +title->Set("Example with grouping and constrains"); + +// Setup scale +$graph->ShowHeaders(GANTT_HYEAR | GANTT_HMONTH | GANTT_HDAY | GANTT_HWEEK); +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAYWNBR); + +// Add the specified activities +$graph->CreateSimple($data,$constrains,$progress); + +// .. and stroke the graph +$graph->Stroke(); + +?> + + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttconstrainex2.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttconstrainex2.php new file mode 100644 index 0000000000..1e6bbbab14 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttconstrainex2.php @@ -0,0 +1,39 @@ +title->Set("Example with grouping and constrains"); +//$graph->SetFrame(false); + +// Setup scale +$graph->ShowHeaders(GANTT_HYEAR | GANTT_HMONTH | GANTT_HDAY | GANTT_HWEEK); +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAYWNBR); + +// Add the specified activities +$graph->CreateSimple($data,$constrains,$progress); + +// .. and stroke the graph +$graph->Stroke(); + +?> + + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttcsimex01.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttcsimex01.php new file mode 100644 index 0000000000..997d347314 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttcsimex01.php @@ -0,0 +1,28 @@ +SetCSIMTarget('#','Go back 1'); +$bar1->title->SetCSIMTarget('#','Go back 1 (title)'); +$bar2 = new GanttBar(1,"Activity 2","2002-01-03","2002-01-25"); +$bar2->SetCSIMTarget('#','Go back 2'); +$bar2->title->SetCSIMTarget('#','Go back 2 (title)'); + +$graph = new GanttGraph(500); +$graph->title->Set("Example with image map"); +$graph->ShowHeaders(GANTT_HYEAR | GANTT_HMONTH | GANTT_HDAY | GANTT_HWEEK); +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); +$graph->scale->week->SetFont(FF_FONT1); + +$graph->Add(array($bar1,$bar2)); + +// And stroke +$graph->StrokeCSIM(); + + +?> + + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttcsimex02.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttcsimex02.php new file mode 100644 index 0000000000..b9dd4c66f3 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttcsimex02.php @@ -0,0 +1,40 @@ +title->Set("Example with image map"); +$graph->ShowHeaders(GANTT_HYEAR | GANTT_HMONTH | GANTT_HDAY | GANTT_HWEEK); +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); +$graph->scale->week->SetFont(FF_FONT1); + +$graph->CreateSimple($data,$constrains,$progress); + +// Add the specified activities +//SetupSimpleGantt($graph,$data,$constrains,$progress); + +// And stroke +$graph->StrokeCSIM(); + + +?> + + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex00.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex00.php new file mode 100644 index 0000000000..e95f7cc3a4 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex00.php @@ -0,0 +1,13 @@ +Add($activity); + +// Display the Gantt chart +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex01.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex01.php new file mode 100644 index 0000000000..b3b9d5359d --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex01.php @@ -0,0 +1,40 @@ +SetShadow(); + +// Add title and subtitle +$graph->title->Set('A main title'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set('(Draft version)'); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Instead of week number show the date for the first day in the week +// on the week scale +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); + +// Make the week scale font smaller than the default +$graph->scale->week->SetFont(FF_FONT0); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,'Activity 1','2001-12-21','2002-01-18'); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_LDIAG,'yellow'); +$activity->SetFillColor('red'); + +// Finally add the bar to the graph +$graph->Add($activity); + +// ... and display it +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex02.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex02.php new file mode 100644 index 0000000000..2ac42ed7ba --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex02.php @@ -0,0 +1,42 @@ +SetShadow(); + +// Add title and subtitle +$graph->title->Set("Main title"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); + +// Show day, week and month scale +//$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); +$graph->ShowHeaders(GANTT_HWEEK ); + +// Instead of week number show the date for the first day in the week +// on the week scale +$graph->scale->week->SetStyle(WEEKSTYLE_WNBR); + +// Make the week scale font smaller than the default +$graph->scale->week->SetFont(FF_FONT0); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-02-20"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Finally add the bar to the graph +$graph->Add($activity); + +// ... and display it +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex03.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex03.php new file mode 100644 index 0000000000..de528a53e2 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex03.php @@ -0,0 +1,42 @@ +SetShadow(); + +// Add title and subtitle +$graph->title->Set("A nice main title"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(Draft version)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Instead of week number show the date for the first day in the week +// on the week scale +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); + +// Make the week scale font smaller than the default +$graph->scale->week->SetFont(FF_FONT0); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(7,"Project","2001-12-21","2002-02-20"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Finally add the bar to the graph +$graph->Add($activity); + +// ... and display it +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex04.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex04.php new file mode 100644 index 0000000000..c9ea4cb924 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex04.php @@ -0,0 +1,47 @@ +SetShadow(); + +// Add title and subtitle +$graph->title->Set("A nice main title"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(Draft version)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Instead of week number show the date for the first day in the week +// on the week scale +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); + +// Make the week scale font smaller than the default +$graph->scale->week->SetFont(FF_FONT0); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-01-20"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Finally add the bar to the graph +$graph->Add($activity); + +// Create a miletone +$milestone = new MileStone(2,"Milestone",'2002-01-09','MS5'); +$milestone->caption->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->Add($milestone); + +// ... and display it +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex05.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex05.php new file mode 100644 index 0000000000..6c0ef36c1b --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex05.php @@ -0,0 +1,48 @@ +SetShadow(); + +// Add title and subtitle +$graph->title->Set("A nice main title"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(Draft version)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Instead of week number show the date for the first day in the week +// on the week scale +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); + +// Make the week scale font smaller than the default +$graph->scale->week->SetFont(FF_FONT0); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-02-20"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Finally add the bar to the graph +$graph->Add($activity); + +// Create a miletone +$milestone = new MileStone(2,"Milestone","2002-01-15","2002-01-15"); +$milestone->title->SetColor("black"); +$milestone->title->SetFont(FF_FONT1,FS_BOLD); +$graph->Add($milestone); + +// ... and display it +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex06.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex06.php new file mode 100644 index 0000000000..8cf4dbb347 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex06.php @@ -0,0 +1,52 @@ +SetShadow(); + +// Add title and subtitle +$graph->title->Set("A nice main title"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(Draft version)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Instead of week number show the date for the first day in the week +// on the week scale +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); + +// Make the week scale font smaller than the default +$graph->scale->week->SetFont(FF_FONT0); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-02-20"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Finally add the bar to the graph +$graph->Add($activity); + +// Create a miletone +$milestone = new MileStone(2,"Milestone","2002-01-15","2002-01-15"); +$milestone->title->SetColor("black"); +$milestone->title->SetFont(FF_FONT1,FS_BOLD); +$graph->Add($milestone); + +// Add a vertical line +$vline = new GanttVLine("2001-12-24","Phase 1"); +$graph->Add($vline); + +// ... and display it +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex07.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex07.php new file mode 100644 index 0000000000..b1eb27aa54 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex07.php @@ -0,0 +1,53 @@ +SetShadow(); + +// Add title and subtitle +$graph->title->Set("A nice main title"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(Draft version)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Instead of week number show the date for the first day in the week +// on the week scale +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); + +// Make the week scale font smaller than the default +$graph->scale->week->SetFont(FF_FONT0); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-02-20"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Finally add the bar to the graph +$graph->Add($activity); + +// Create a miletone +$milestone = new MileStone(2,"Milestone","2002-01-15","2002-01-15"); +$milestone->title->SetColor("black"); +$milestone->title->SetFont(FF_FONT1,FS_BOLD); +$graph->Add($milestone); + +// Add a vertical line +$vline = new GanttVLine("2001-12-24","Phase 1"); +$vline->SetDayOffset(0.5); +$graph->Add($vline); + +// ... and display it +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex08.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex08.php new file mode 100644 index 0000000000..62d8947c77 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex08.php @@ -0,0 +1,63 @@ +SetShadow(); + +// Add title and subtitle +$graph->title->Set("A nice main title"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(Draft version)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Instead of week number show the date for the first day in the week +// on the week scale +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); + +// Make the week scale font smaller than the default +$graph->scale->week->SetFont(FF_FONT0); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-01-15"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Add a right marker +$activity->rightMark->Show(); +$activity->rightMark->SetType(MARK_FILLEDCIRCLE); +$activity->rightMark->SetWidth(13); +$activity->rightMark->SetColor("red"); +$activity->rightMark->SetFillColor("red"); +$activity->rightMark->title->Set("M5"); +$activity->rightMark->title->SetFont(FF_ARIAL,FS_BOLD,12); +$activity->rightMark->title->SetColor("white"); + +// Finally add the bar to the graph +$graph->Add($activity); + +// Create a miletone +$milestone = new MileStone(2,"Milestone","2002-01-10","2002-01-10"); +$milestone->title->SetColor("black"); +$milestone->title->SetFont(FF_FONT1,FS_BOLD); +$graph->Add($milestone); + +// Add a vertical line +$vline = new GanttVLine("2001-12-24","Phase 1"); +$vline->SetDayOffset(0.5); +$graph->Add($vline); + +// ... and display it +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex09.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex09.php new file mode 100644 index 0000000000..f5fff1a127 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex09.php @@ -0,0 +1,66 @@ +SetShadow(); + +// Add title and subtitle +$graph->title->Set("A nice main title"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(Draft version)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Instead of week number show the date for the first day in the week +// on the week scale +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); + +// Make the week scale font smaller than the default +$graph->scale->week->SetFont(FF_FONT0); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-02-20"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Add a right marker +$activity->rightMark->Show(); +$activity->rightMark->SetType(MARK_FILLEDCIRCLE); +$activity->rightMark->SetWidth(13); +$activity->rightMark->SetColor("red"); +$activity->rightMark->SetFillColor("red"); +$activity->rightMark->title->Set("M5"); +$activity->rightMark->title->SetFont(FF_ARIAL,FS_BOLD,12); +$activity->rightMark->title->SetColor("white"); + +// Set absolute height +$activity->SetHeight(8); + +// Finally add the bar to the graph +$graph->Add($activity); + +// Create a miletone +$milestone = new MileStone(2,"Milestone","2002-01-15","2002-01-15"); +$milestone->title->SetColor("black"); +$milestone->title->SetFont(FF_FONT1,FS_BOLD); +$graph->Add($milestone); + +// Add a vertical line +$vline = new GanttVLine("2001-12-24","Phase 1"); +$vline->SetDayOffset(0.5); +$graph->Add($vline); + +// ... and display it +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex10.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex10.php new file mode 100644 index 0000000000..459920cfb9 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex10.php @@ -0,0 +1,90 @@ +SetShadow(); + +// Add title and subtitle +$graph->title->Set("A nice main title"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(Draft version)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Instead of week number show the date for the first day in the week +// on the week scale +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); + +// Make the week scale font smaller than the default +$graph->scale->week->SetFont(FF_FONT0); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-02-20"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Add a right marker +$activity->rightMark->Show(); +$activity->rightMark->SetType(MARK_FILLEDCIRCLE); +$activity->rightMark->SetWidth(13); +$activity->rightMark->SetColor("red"); +$activity->rightMark->SetFillColor("red"); +$activity->rightMark->title->Set("M5"); +$activity->rightMark->title->SetFont(FF_ARIAL,FS_BOLD,12); +$activity->rightMark->title->SetColor("white"); + +// Set absolute height +$activity->SetHeight(1); + + +// Format the bar for the second activity +// ($row,$title,$startdate,$enddate) +$activity2 = new GanttBar(1,"Project","2001-12-21","2002-02-20"); + +// Yellow diagonal line pattern on a red background +$activity2->SetPattern(BAND_RDIAG,"yellow"); +$activity2->SetFillColor("red"); + +// Add a right marker +$activity2->rightMark->Show(); +$activity2->rightMark->SetType(MARK_FILLEDCIRCLE); +$activity2->rightMark->SetWidth(13); +$activity2->rightMark->SetColor("red"); +$activity2->rightMark->SetFillColor("red"); +$activity2->rightMark->title->Set("M5"); +$activity2->rightMark->title->SetFont(FF_ARIAL,FS_BOLD,12); +$activity2->rightMark->title->SetColor("white"); + +// Set absolute height +$activity2->SetHeight(1); + + +// Finally add the bar to the graph +$graph->Add($activity); +$graph->Add($activity2); + +// Create a miletone +$milestone = new MileStone(2,"Milestone","2002-01-15","2002-01-15"); +$milestone->title->SetColor("black"); +$milestone->title->SetFont(FF_FONT1,FS_BOLD); +$graph->Add($milestone); + +// Add a vertical line +$vline = new GanttVLine("2001-12-24","Phase 1"); +$vline->SetDayOffset(0.5); +//$graph->Add($vline); + +// ... and display it +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex11.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex11.php new file mode 100644 index 0000000000..2fec58bb98 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex11.php @@ -0,0 +1,89 @@ +SetShadow(); + +// Add title and subtitle +$graph->title->Set("A nice main title"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(Draft version)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Instead of week number show the date for the first day in the week +// on the week scale +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); + +// Make the week scale font smaller than the default +$graph->scale->week->SetFont(FF_FONT0); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-02-20"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Add a right marker +$activity->rightMark->Show(); +$activity->rightMark->SetType(MARK_FILLEDCIRCLE); +$activity->rightMark->SetWidth(13); +$activity->rightMark->SetColor("red"); +$activity->rightMark->SetFillColor("red"); +$activity->rightMark->title->Set("M5"); +$activity->rightMark->title->SetFont(FF_ARIAL,FS_BOLD,12); +$activity->rightMark->title->SetColor("white"); + +// Set absolute height +$activity->SetHeight(10); + + +// Format the bar for the second activity +// ($row,$title,$startdate,$enddate) +$activity2 = new GanttBar(1,"Project","2001-12-21","2002-02-20"); + +// Yellow diagonal line pattern on a red background +$activity2->SetPattern(BAND_RDIAG,"yellow"); +$activity2->SetFillColor("red"); + +// Add a right marker +$activity2->rightMark->Show(); +$activity2->rightMark->SetType(MARK_FILLEDCIRCLE); +$activity2->rightMark->SetWidth(13); +$activity2->rightMark->SetColor("red"); +$activity2->rightMark->SetFillColor("red"); +$activity2->rightMark->title->Set("M5"); +$activity2->rightMark->title->SetFont(FF_ARIAL,FS_BOLD,12); +$activity2->rightMark->title->SetColor("white"); + +// Set absolute height +$activity2->SetHeight(10); + +// Finally add the bar to the graph +$graph->Add($activity); +$graph->Add($activity2); + +// Create a miletone +$milestone = new MileStone(2,"Milestone","2002-01-15","2002-01-15"); +$milestone->title->SetColor("black"); +$milestone->title->SetFont(FF_FONT1,FS_BOLD); +$graph->Add($milestone); + +// Add a vertical line +$vline = new GanttVLine("2001-12-24","Phase 1"); +$vline->SetDayOffset(0.5); +//$graph->Add($vline); + +// ... and display it +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex12.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex12.php new file mode 100644 index 0000000000..e7adc7a9e4 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex12.php @@ -0,0 +1,93 @@ +SetBox(); +$graph->SetShadow(); + +// Add title and subtitle +$graph->title->Set("A nice main title"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(Draft version)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Instead of week number show the date for the first day in the week +// on the week scale +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); + +// Make the week scale font smaller than the default +$graph->scale->week->SetFont(FF_FONT0); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// 0 % vertical label margin +$graph->SetLabelVMarginFactor(0); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-02-20"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Add a right marker +$activity->rightMark->Show(); +$activity->rightMark->SetType(MARK_FILLEDCIRCLE); +$activity->rightMark->SetWidth(13); +$activity->rightMark->SetColor("red"); +$activity->rightMark->SetFillColor("red"); +$activity->rightMark->title->Set("M5"); +$activity->rightMark->title->SetFont(FF_ARIAL,FS_BOLD,12); +$activity->rightMark->title->SetColor("white"); + +// Set absolute height +$activity->SetHeight(10); + + +// Format the bar for the second activity +// ($row,$title,$startdate,$enddate) +$activity2 = new GanttBar(1,"Project","2001-12-21","2002-02-20"); + +// Yellow diagonal line pattern on a red background +$activity2->SetPattern(BAND_RDIAG,"yellow"); +$activity2->SetFillColor("red"); + +// Add a right marker +$activity2->rightMark->Show(); +$activity2->rightMark->SetType(MARK_FILLEDCIRCLE); +$activity2->rightMark->SetWidth(13); +$activity2->rightMark->SetColor("red"); +$activity2->rightMark->SetFillColor("red"); +$activity2->rightMark->title->Set("M5"); +$activity2->rightMark->title->SetFont(FF_ARIAL,FS_BOLD,12); +$activity2->rightMark->title->SetColor("white"); + +// Set absolute height +$activity2->SetHeight(10); + +// Finally add the bar to the graph +$graph->Add($activity); +$graph->Add($activity2); + +// Create a miletone +$milestone = new MileStone(2,"Milestone","2002-01-15","2002-01-15"); +$milestone->title->SetColor("black"); +$milestone->title->SetFont(FF_FONT1,FS_BOLD); +$graph->Add($milestone); + +// Add a vertical line +$vline = new GanttVLine("2001-12-24","Phase 1"); +$vline->SetDayOffset(0.5); +//$graph->Add($vline); + +// ... and display it +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex13-zoom1.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex13-zoom1.php new file mode 100644 index 0000000000..9a8457e681 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex13-zoom1.php @@ -0,0 +1,67 @@ +SetShadow(); + +// Add title and subtitle +$graph->title->Set("Zooming a graph"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(zoom=0.7)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Instead of week number show the date for the first day in the week +// on the week scale +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); + +// Make the week scale font smaller than the default +$graph->scale->week->SetFont(FF_FONT0); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// 0 % vertical label margin +$graph->SetLabelVMarginFactor(1.0); // 1=default value + +// Set zoom factor +$graph->SetZoomFactor(0.7); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity1 = new GanttBar(0,"Activity 1","2001-12-21","2002-01-07","[ER,TR]"); + +// Yellow diagonal line pattern on a red background +$activity1->SetPattern(BAND_RDIAG,"yellow"); +$activity1->SetFillColor("red"); + +// Set absolute height of activity +$activity1->SetHeight(16); + +// Format the bar for the second activity +// ($row,$title,$startdate,$enddate) +$activity2 = new GanttBar(1,"Activity 2","2001-12-21","2002-01-01","[BO,SW,JC]"); + +// ADjust font for caption +$activity2->caption->SetFont(FF_ARIAL,FS_BOLD); +$activity2->caption->SetColor("darkred"); + +// Yellow diagonal line pattern on a red background +$activity2->SetPattern(BAND_RDIAG,"yellow"); +$activity2->SetFillColor("red"); + +// Set absolute height of activity +$activity2->SetHeight(16); + +// Finally add the bar to the graph +$graph->Add($activity1); +$graph->Add($activity2); + +// ... and display it +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex13-zoom2.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex13-zoom2.php new file mode 100644 index 0000000000..882fb7bc78 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex13-zoom2.php @@ -0,0 +1,67 @@ +SetShadow(); + +// Add title and subtitle +$graph->title->Set("Zooming a graph"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(zoom=1.5)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Instead of week number show the date for the first day in the week +// on the week scale +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); + +// Make the week scale font smaller than the default +$graph->scale->week->SetFont(FF_FONT0); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// 0 % vertical label margin +$graph->SetLabelVMarginFactor(1.0); // 1=default value + +// Set zoom factor +$graph->SetZoomFactor(1.5); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity1 = new GanttBar(0,"Activity 1","2001-12-21","2002-01-07","[ER,TR]"); + +// Yellow diagonal line pattern on a red background +$activity1->SetPattern(BAND_RDIAG,"yellow"); +$activity1->SetFillColor("red"); + +// Set absolute height of activity +$activity1->SetHeight(16); + +// Format the bar for the second activity +// ($row,$title,$startdate,$enddate) +$activity2 = new GanttBar(1,"Activity 2","2001-12-21","2002-01-01","[BO,SW,JC]"); + +// ADjust font for caption +$activity2->caption->SetFont(FF_ARIAL,FS_BOLD); +$activity2->caption->SetColor("darkred"); + +// Yellow diagonal line pattern on a red background +$activity2->SetPattern(BAND_RDIAG,"yellow"); +$activity2->SetFillColor("red"); + +// Set absolute height of activity +$activity2->SetHeight(16); + +// Finally add the bar to the graph +$graph->Add($activity1); +$graph->Add($activity2); + +// ... and display it +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex13.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex13.php new file mode 100644 index 0000000000..865a4db0ab --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex13.php @@ -0,0 +1,64 @@ +SetShadow(); + +// Add title and subtitle +$graph->title->Set("Example of captions"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(ganttex13.php)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Instead of week number show the date for the first day in the week +// on the week scale +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); + +// Make the week scale font smaller than the default +$graph->scale->week->SetFont(FF_FONT0); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// 0 % vertical label margin +$graph->SetLabelVMarginFactor(1); // 1=default value + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity1 = new GanttBar(0,"Activity 1","2001-12-21","2002-01-07","[ER,TR]"); + +// Yellow diagonal line pattern on a red background +$activity1->SetPattern(BAND_RDIAG,"yellow"); +$activity1->SetFillColor("red"); + +// Set absolute height of activity +$activity1->SetHeight(16); + +// Format the bar for the second activity +// ($row,$title,$startdate,$enddate) +$activity2 = new GanttBar(1,"Activity 2","2001-12-21","2002-01-01","[BO,SW,JC]"); + +// ADjust font for caption +$activity2->caption->SetFont(FF_ARIAL,FS_BOLD); +$activity2->caption->SetColor("darkred"); + +// Yellow diagonal line pattern on a red background +$activity2->SetPattern(BAND_RDIAG,"yellow"); +$activity2->SetFillColor("red"); + +// Set absolute height of activity +$activity2->SetHeight(16); + +// Finally add the bar to the graph +$graph->Add($activity1); +$graph->Add($activity2); + +// ... and display it +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex14.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex14.php new file mode 100644 index 0000000000..a53942ba55 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex14.php @@ -0,0 +1,67 @@ +SetBox(); +$graph->SetShadow(); + +// Add title and subtitle +$graph->title->Set("Example of captions"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(ganttex14.php)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// 0 % vertical label margin +$graph->SetLabelVMarginFactor(1); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-01-07","[50%]"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Set absolute height +$activity->SetHeight(10); + +// Specify progress to 60% +$activity->progress->Set(0.6); + +// Format the bar for the second activity +// ($row,$title,$startdate,$enddate) +$activity2 = new GanttBar(1,"Project","2001-12-21","2002-01-02","[30%]"); + +// Yellow diagonal line pattern on a red background +$activity2->SetPattern(BAND_RDIAG,"yellow"); +$activity2->SetFillColor("red"); + +// Set absolute height +$activity2->SetHeight(10); + +// Specify progress to 30% +$activity2->progress->Set(0.3); + + +// Finally add the bar to the graph +$graph->Add($activity); +$graph->Add($activity2); + +// Add a vertical line +$vline = new GanttVLine("2001-12-24","Phase 1"); +$vline->SetDayOffset(0.5); +//$graph->Add($vline); + +// ... and display it +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex15.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex15.php new file mode 100644 index 0000000000..ae7598392c --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex15.php @@ -0,0 +1,68 @@ +SetBox(); +$graph->SetShadow(); + +// Add title and subtitle +$graph->title->Set("Example of captions"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(ganttex15.php)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// 0 % vertical label margin +$graph->SetLabelVMarginFactor(1); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-01-07","[50%]"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Set absolute height +$activity->SetHeight(10); + +// Specify progress to 60% +$activity->progress->Set(0.6); +$activity->progress->SetPattern(BAND_HVCROSS,"blue"); + +// Format the bar for the second activity +// ($row,$title,$startdate,$enddate) +$activity2 = new GanttBar(1,"Project","2001-12-21","2002-01-02","[30%]"); + +// Yellow diagonal line pattern on a red background +$activity2->SetPattern(BAND_RDIAG,"yellow"); +$activity2->SetFillColor("red"); + +// Set absolute height +$activity2->SetHeight(10); + +// Specify progress to 30% +$activity2->progress->Set(0.3); +$activity2->progress->SetPattern(BAND_HVCROSS,"blue"); + +// Finally add the bar to the graph +$graph->Add($activity); +$graph->Add($activity2); + +// Add a vertical line +$vline = new GanttVLine("2001-12-24","Phase 1"); +$vline->SetDayOffset(0.5); +//$graph->Add($vline); + +// ... and display it +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex16.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex16.php new file mode 100644 index 0000000000..bf3e06fae1 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex16.php @@ -0,0 +1,73 @@ +SetBox(); +$graph->SetShadow(); + +// Add title and subtitle +$graph->title->Set("Example of captions"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(ganttex16.php)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Set table title +$graph->scale->tableTitle->Set("(Rev: 1.22)"); +$graph->scale->tableTitle->SetFont(FF_FONT1,FS_BOLD); +$graph->scale->SetTableTitleBackground("silver"); +$graph->scale->tableTitle->Show(); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// 0 % vertical label margin +$graph->SetLabelVMarginFactor(1); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-01-07","[50%]"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Set absolute height +$activity->SetHeight(10); + +// Specify progress to 60% +$activity->progress->Set(0.6); +$activity->progress->SetPattern(BAND_HVCROSS,"blue"); + +// Format the bar for the second activity +// ($row,$title,$startdate,$enddate) +$activity2 = new GanttBar(1,"Project","2001-12-21","2002-01-02","[30%]"); + +// Yellow diagonal line pattern on a red background +$activity2->SetPattern(BAND_RDIAG,"yellow"); +$activity2->SetFillColor("red"); + +// Set absolute height +$activity2->SetHeight(10); + +// Specify progress to 30% +$activity2->progress->Set(0.3); +$activity2->progress->SetPattern(BAND_HVCROSS,"blue"); + +// Finally add the bar to the graph +$graph->Add($activity); +$graph->Add($activity2); + +// Add a vertical line +$vline = new GanttVLine("2001-12-24","Phase 1"); +$vline->SetDayOffset(0.5); +//$graph->Add($vline); + +// ... and display it +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex17-flag.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex17-flag.php new file mode 100644 index 0000000000..17eaca491f --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex17-flag.php @@ -0,0 +1,88 @@ +SetBox(); +$graph->SetShadow(); + +// Add title and subtitle +$graph->title->Set("Example of captions"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(ganttex17.php)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Set table title +$graph->scale->tableTitle->Set("(Rev: 1.22)"); +$graph->scale->tableTitle->SetFont(FF_FONT1,FS_BOLD); +$graph->scale->SetTableTitleBackground("silver"); + +// Modify the appearance of the dividing lines +$graph->scale->divider->SetWeight(3); +$graph->scale->divider->SetColor("navy"); +$graph->scale->dividerh->SetWeight(3); +$graph->scale->dividerh->SetColor("navy"); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// 0 % vertical label margin +$graph->SetLabelVMarginFactor(1); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-01-07","[50%]"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Set absolute height +$activity->SetHeight(10); + +// Specify progress to 60% +$activity->progress->Set(0.6); +$activity->progress->SetPattern(BAND_HVCROSS,"blue"); + +// Format the bar for the second activity +// ($row,$title,$startdate,$enddate) +$activity2 = new GanttBar(1,"Project","2001-12-21","2002-01-02","[30%]"); + +// Yellow diagonal line pattern on a red background +$activity2->SetPattern(BAND_RDIAG,"yellow"); +$activity2->SetFillColor("red"); + +// Set absolute height +$activity2->SetHeight(10); + +// Specify progress to 30% +$activity2->progress->Set(0.3); +$activity2->progress->SetPattern(BAND_HVCROSS,"blue"); + +// Finally add the bar to the graph +$graph->Add($activity); +$graph->Add($activity2); + +// Add a coutnry flag +$icon = new IconPlot(); +$icon->SetAnchor('left','top'); +$icon->SetCountryFlag('norway'); +$icon->SetMix(50); +$icon->SetPos(5,5); +$graph->Add($icon); + + +// Add a vertical line +$vline = new GanttVLine("2001-12-24","Phase 1"); +$vline->SetDayOffset(0.5); +//$graph->Add($vline); + +// ... and display it +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex17.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex17.php new file mode 100644 index 0000000000..cc2e7e8949 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex17.php @@ -0,0 +1,78 @@ +SetBox(); +$graph->SetShadow(); + +// Add title and subtitle +$graph->title->Set("Example of captions"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(ganttex17.php)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Set table title +$graph->scale->tableTitle->Set("(Rev: 1.22)"); +$graph->scale->tableTitle->SetFont(FF_FONT1,FS_BOLD); +$graph->scale->SetTableTitleBackground("silver"); + +// Modify the appearance of the dividing lines +$graph->scale->divider->SetWeight(3); +$graph->scale->divider->SetColor("navy"); +$graph->scale->dividerh->SetWeight(3); +$graph->scale->dividerh->SetColor("navy"); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// 0 % vertical label margin +$graph->SetLabelVMarginFactor(1); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-01-07","[50%]"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Set absolute height +$activity->SetHeight(10); + +// Specify progress to 60% +$activity->progress->Set(0.6); +$activity->progress->SetPattern(BAND_HVCROSS,"blue"); + +// Format the bar for the second activity +// ($row,$title,$startdate,$enddate) +$activity2 = new GanttBar(1,"Project","2001-12-21","2002-01-02","[30%]"); + +// Yellow diagonal line pattern on a red background +$activity2->SetPattern(BAND_RDIAG,"yellow"); +$activity2->SetFillColor("red"); + +// Set absolute height +$activity2->SetHeight(10); + +// Specify progress to 30% +$activity2->progress->Set(0.3); +$activity2->progress->SetPattern(BAND_HVCROSS,"blue"); + +// Finally add the bar to the graph +$graph->Add($activity); +$graph->Add($activity2); + +// Add a vertical line +$vline = new GanttVLine("2001-12-24","Phase 1"); +$vline->SetDayOffset(0.5); +//$graph->Add($vline); + +// ... and display it +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex18.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex18.php new file mode 100644 index 0000000000..4c4b5d91fe --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex18.php @@ -0,0 +1,82 @@ +SetBox(); +$graph->SetShadow(); + +// Add title and subtitle +$graph->title->Set("Example of captions"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(ganttex18.php)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Set table title +$graph->scale->tableTitle->Set("(Rev: 1.22)"); +$graph->scale->tableTitle->SetFont(FF_FONT1,FS_BOLD); +$graph->scale->SetTableTitleBackground("silver"); + +// Modify the appearance of the dividing lines +$graph->scale->divider->SetWeight(3); +$graph->scale->divider->SetColor("navy"); + +$graph->scale->dividerh->SetWeight(3); +$graph->scale->dividerh->SetColor("navy"); + +$graph->SetBox(true,"navy",3); + + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// 0 % vertical label margin +$graph->SetLabelVMarginFactor(1); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-01-07","[50%]"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Set absolute height +$activity->SetHeight(10); + +// Specify progress to 60% +$activity->progress->Set(0.6); +$activity->progress->SetPattern(BAND_HVCROSS,"blue"); + +// Format the bar for the second activity +// ($row,$title,$startdate,$enddate) +$activity2 = new GanttBar(1,"Project","2001-12-21","2002-01-02","[30%]"); + +// Yellow diagonal line pattern on a red background +$activity2->SetPattern(BAND_RDIAG,"yellow"); +$activity2->SetFillColor("red"); + +// Set absolute height +$activity2->SetHeight(10); + +// Specify progress to 30% +$activity2->progress->Set(0.3); +$activity2->progress->SetPattern(BAND_HVCROSS,"blue"); + +// Finally add the bar to the graph +$graph->Add($activity); +$graph->Add($activity2); + +// Add a vertical line +$vline = new GanttVLine("2001-12-24","Phase 1"); +$vline->SetDayOffset(0.5); +//$graph->Add($vline); + +// ... and display it +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex19.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex19.php new file mode 100644 index 0000000000..7528412ead --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex19.php @@ -0,0 +1,84 @@ +SetBox(); +$graph->SetShadow(); + +// Use default locale +$graph->scale->SetDateLocale('sv_SE'); + +// Add title and subtitle +$graph->title->Set('Example of captions'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set('(ganttex19.php)'); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Set table title +$graph->scale->tableTitle->Set('(Rev: 1.22)'); +$graph->scale->tableTitle->SetFont(FF_FONT1,FS_BOLD); +$graph->scale->SetTableTitleBackground('silver'); +$graph->scale->tableTitle->Show(); + +$graph->scale->divider->SetStyle('solid'); +$graph->scale->divider->SetWeight(2); +$graph->scale->divider->SetColor('black'); + + +$graph->SetBox(true,'navy',2); + + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2); +$graph->scale->month->SetFontColor('white'); +$graph->scale->month->SetBackgroundColor('blue'); + +// 0 % vertical label margin +$graph->SetLabelVMarginFactor(1); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,'Project','2001-12-21','2002-01-07','[50%]'); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,'yellow'); +$activity->SetFillColor('red'); + +// Set absolute height +$activity->SetHeight(10); + +// Specify progress to 60% +$activity->progress->Set(0.6); +$activity->progress->SetPattern(BAND_HVCROSS,'blue'); + +// Format the bar for the second activity +// ($row,$title,$startdate,$enddate) +$activity2 = new GanttBar(1,'Project','2001-12-21','2002-01-02','[30%]'); + +// Yellow diagonal line pattern on a red background +$activity2->SetPattern(BAND_RDIAG,'yellow'); +$activity2->SetFillColor('red'); + +// Set absolute height +$activity2->SetHeight(10); + +// Specify progress to 30% +$activity2->progress->Set(0.3); +$activity2->progress->SetPattern(BAND_HVCROSS,'blue'); + +// Finally add the bar to the graph +$graph->Add($activity); +$graph->Add($activity2); + +// Add a vertical line +$vline = new GanttVLine('2001-12-24','Phase 1'); +$vline->SetDayOffset(0.5); +//$graph->Add($vline); + +// ... and display it +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex30.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex30.php new file mode 100644 index 0000000000..20f1b88d21 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex30.php @@ -0,0 +1,86 @@ +SetShadow(); +$graph->SetBox(); + +// Titles for chart +$graph->title->Set("General conversion plan"); +$graph->subtitle->Set("(Revision: 2001-11-18)"); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); + +// For illustration we enable all headers. +$graph->ShowHeaders(GANTT_HYEAR | GANTT_HMONTH | GANTT_HDAY | GANTT_HWEEK); + +// For the week we choose to show the start date of the week +// the default is to show week number (according to ISO 8601) +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); + +// Change the scale font +$graph->scale->week->SetFont(FF_FONT0); +$graph->scale->year->SetFont(FF_ARIAL, FS_BOLD, 12); + +// Setup some data for the gantt bars +$data = array( + array(0, "Group 1", "2001-10-29", "2001-11-27", FF_FONT1, FS_BOLD, 8), + array(1, " Label 2", "2001-11-8", "2001-12-14"), + array(2, " Label 3", "2001-11-01", "2001-11-8"), + array(4, "Group 2", "2001-11-07", "2001-12-19", FF_FONT1, FS_BOLD, 8), + array(5, " Label 4", "2001-11-8", "2001-12-19"), + array(6, " Label 5", "2001-11-01", "2001-11-8"), +); + +for ($i = 0; $i < count($data); ++$i) { + $bar = new GanttBar($data[$i][0], $data[$i][1], $data[$i][2], $data[$i][3], "[50%]", 0.5); + if (count($data[$i]) > 4) { + $bar->title->SetFont($data[$i][4], $data[$i][5], $data[$i][6]); + } + + // If you like each bar can have a shadow + // $bar->SetShadow(true,"darkgray"); + + // For illustration lets make each bar be red with yellow diagonal stripes + $bar->SetPattern(BAND_RDIAG, "yellow"); + $bar->SetFillColor("red"); + + // To indicate progress each bar can have a smaller bar within + // For illustrative purpose just set the progress to 50% for each bar + $bar->progress->Set(0.5); + + // Each bar may also have optional left and right plot marks + // As illustration lets put a filled circle with a number at the end + // of each bar + $bar->rightMark->SetType(MARK_FILLEDCIRCLE); + $bar->rightMark->SetFillColor("red"); + $bar->rightMark->SetColor("red"); + $bar->rightMark->SetWidth(10); + + // Title for the mark + $bar->rightMark->title->Set("" . $i + 1); + $bar->rightMark->title->SetColor("white"); + $bar->rightMark->title->SetFont(FF_ARIAL, FS_BOLD, 10); + $bar->rightMark->Show(); + + // ... and add the bar to the gantt chart + $graph->Add($bar); +} + +// Create a milestone mark +$ms = new MileStone(7, "M5", "2001-12-10", "10/12"); +$ms->title->SetFont(FF_FONT1, FS_BOLD); +$graph->Add($ms); + +// Create a vertical line to emphasize the milestone +$vl = new GanttVLine("2001-12-10 13:00", "Phase 1", "darkred"); +$vl->SetDayOffset(0.5); // Center the line in the day +$graph->Add($vl); + +// Output the graph +$graph->Stroke(); + +// EOF diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex_slice.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex_slice.php new file mode 100644 index 0000000000..5ec95bc96d --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttex_slice.php @@ -0,0 +1,78 @@ +SetShadow(); +$graph->SetBox(); + +// Only show part of the Gantt +$graph->SetDateRange('2001-11-22','2002-1-24'); + +// Weeks start on Sunday +$graph->scale->SetWeekStart(0); + +$graph->title->Set("General conversion plan"); +$graph->subtitle->Set("(Slice between 2001-11-22 to 2002-01-24)"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,20); + +$graph->ShowHeaders(GANTT_HYEAR | GANTT_HMONTH | GANTT_HDAY | GANTT_HWEEK); +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); +$graph->scale->week->SetFont(FF_FONT1); + + +$data = array( + array(0,"Group 1\tJohan", "2002-1-23","2002-01-28",FF_FONT1,FS_BOLD,8), + array(1," Label 2", "2001-10-26","2001-11-16"), + array(2," Label 3", "2001-11-30","2001-12-01"), + array(4,"Group 2", "2001-11-30","2001-12-22",FF_FONT1,FS_BOLD,8), + array(5," Label 4", "2001-11-30","2001-12-1"), + array(6," Label 5", "2001-12-6","2001-12-8"), + array(8," Label 8", "2001-11-30","2002-01-02") + ); + + +// make up some fictionary activity bars +for($i=0; $i4 ) + $bar->title->SetFont($data[$i][4],$data[$i][5],$data[$i][6]); + + $bar->rightMark->Show(); + $bar->rightMark->SetType(MARK_FILLEDCIRCLE); + $bar->rightMark->SetWidth(8); + $bar->rightMark->SetColor("red"); + $bar->rightMark->SetFillColor("red"); + $bar->rightMark->title->Set($i+1); + $bar->rightMark->title->SetFont(FF_ARIAL,FS_BOLD,12); + $bar->rightMark->title->SetColor("white"); + + $bar->SetPattern(BAND_RDIAG,"yellow"); + $bar->SetFillColor("red"); + $bar->progress->Set($i/10); + $bar->progress->SetPattern(GANTT_SOLID,"darkgreen"); + + $graph->Add($bar); +} + + +// The line will NOT be shown since it is outside the specified slice +$vline = new GanttVLine("2002-02-28"); +$vline->title->Set("2002-02-28"); +$vline->title->SetFont(FF_FONT1,FS_BOLD,10); +$graph->Add($vline); + +// The milestone will NOT be shown since it is outside the specified slice +$ms = new MileStone(7,"M5","2002-01-28","28/1"); +$ms->title->SetFont(FF_FONT1,FS_BOLD); +$graph->Add($ms); + +$graph->Stroke(); + + +?> + + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/gantthgridex1.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/gantthgridex1.php new file mode 100644 index 0000000000..70a9481364 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/gantthgridex1.php @@ -0,0 +1,63 @@ +title->Set("Grid example"); +$graph->subtitle->Set("(Horizontal grid)"); +$graph->title->SetFont(FF_VERDANA,FS_NORMAL,14); + +// Specify what headers to show +$graph->ShowHeaders(GANTT_HMONTH|GANTT_HDAY ); +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); +$graph->scale->week->SetFont(FF_FONT0); + +// Setup a horizontal grid +$graph->hgrid->Show(); +$graph->hgrid->SetRowFillColor('darkblue@0.9'); + + +for($i=0; $i 4 ) + $bar->title->SetFont($data[$i][4],$data[$i][5],$data[$i][6]); + $bar->SetPattern(BAND_RDIAG,"yellow"); + $bar->SetFillColor("red"); + $graph->Add($bar); +} + +// Setup a vertical marker line +$vline = new GanttVLine("2001-11-01"); +$vline->SetDayOffset(0.5); +$vline->title->Set("2001-11-01"); +$vline->title->SetFont(FF_FONT1,FS_BOLD,10); +$graph->Add($vline); + +// Setup a milestone +$ms = new MileStone(6,"M5","2001-11-28","28/12"); +$ms->title->SetFont(FF_FONT1,FS_BOLD); +$graph->Add($ms); + +// And to show that you can also add an icon we add "Tux" +$icon = new IconPlot('penguin.png',0.05,0.95,1,15); +$icon->SetAnchor('left','bottom'); +$graph->Add($icon); + +// .. and finally send it back to the browser +$graph->Stroke(); + +?> + + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/gantthourex1.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/gantthourex1.php new file mode 100644 index 0000000000..bfe55324e6 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/gantthourex1.php @@ -0,0 +1,51 @@ +SetMarginColor('blue:1.7'); +$graph->SetColor('white'); + +$graph->SetBackgroundGradient('navy','white',GRAD_HOR,BGRAD_MARGIN); +$graph->scale->hour->SetBackgroundColor('lightyellow:1.5'); +$graph->scale->hour->SetFont(FF_FONT1); +$graph->scale->day->SetBackgroundColor('lightyellow:1.5'); +$graph->scale->day->SetFont(FF_FONT1,FS_BOLD); + +$graph->title->Set("Example of hours in scale"); +$graph->title->SetColor('white'); +$graph->title->SetFont(FF_VERDANA,FS_BOLD,14); + +$graph->ShowHeaders(GANTT_HDAY | GANTT_HHOUR); + +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); +$graph->scale->week->SetFont(FF_FONT1); +$graph->scale->hour->SetIntervall(4); + +$graph->scale->hour->SetStyle(HOURSTYLE_HM24); +$graph->scale->day->SetStyle(DAYSTYLE_SHORTDAYDATE3); + +$data = array( + array(0," Label 1", "2001-01-26 04:00","2001-01-26 14:00"), + array(1," Label 2", "2001-01-26 10:00","2001-01-26 18:00"), + array(2," Label 3", "2001-01-26","2001-01-27 10:00") +); + + +for($i=0; $i4 ) + $bar->title->SetFont($data[$i][4],$data[$i][5],$data[$i][6]); + $bar->SetPattern(BAND_RDIAG,"yellow"); + $bar->SetFillColor("red"); + $graph->Add($bar); +} + +$graph->Stroke(); + + + +?> + + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/gantthourminex1.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/gantthourminex1.php new file mode 100644 index 0000000000..8a76bf1202 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/gantthourminex1.php @@ -0,0 +1,93 @@ +SetMarginColor('darkgreen@0.8'); +$graph->SetColor('white'); + +// We want to display day, hour and minute scales +$graph->ShowHeaders(GANTT_HDAY | GANTT_HHOUR | GANTT_HMIN); + +// We want to have the following titles in our columns +// describing each activity +$graph->scale->actinfo->SetColTitles( + array('Act','Duration','Start','Finish','Resp'));//,array(100,70,70,70)); + +// Uncomment the following line if you don't want the 3D look +// in the columns headers +//$graph->scale->actinfo->SetStyle(ACTINFO_2D); + +$graph->scale->actinfo->SetFont(FF_ARIAL,FS_NORMAL,10); + +//These are the default values for use in the columns +//$graph->scale->actinfo->SetFontColor('black'); +//$graph->scale->actinfo->SetBackgroundColor('lightgray'); +//$graph->scale->actinfo->vgrid->SetStyle('solid'); + +$graph->scale->actinfo->vgrid->SetColor('gray'); +$graph->scale->actinfo->SetColor('darkgray'); + +// Setup day format +$graph->scale->day->SetBackgroundColor('lightyellow:1.5'); +$graph->scale->day->SetFont(FF_ARIAL); +$graph->scale->day->SetStyle(DAYSTYLE_SHORTDAYDATE1); + +// Setup hour format +$graph->scale->hour->SetIntervall(1); +$graph->scale->hour->SetBackgroundColor('lightyellow:1.5'); +$graph->scale->hour->SetFont(FF_FONT0); +$graph->scale->hour->SetStyle(HOURSTYLE_H24); +$graph->scale->hour->grid->SetColor('gray:0.8'); + +// Setup minute format +$graph->scale->minute->SetIntervall(30); +$graph->scale->minute->SetBackgroundColor('lightyellow:1.5'); +$graph->scale->minute->SetFont(FF_FONT0); +$graph->scale->minute->SetStyle(MINUTESTYLE_MM); +$graph->scale->minute->grid->SetColor('lightgray'); + +$graph->scale->tableTitle->Set('Phase 1'); +$graph->scale->tableTitle->SetFont(FF_ARIAL,FS_NORMAL,12); +$graph->scale->SetTableTitleBackground('darkgreen@0.6'); +$graph->scale->tableTitle->Show(true); + +$graph->title->Set("Example of hours & mins scale"); +$graph->title->SetColor('darkgray'); +$graph->title->SetFont(FF_VERDANA,FS_BOLD,14); + + +for($i=0; $i4 ) + $bar->title->SetFont($data[$i][4],$data[$i][5],$data[$i][6]); + $bar->SetPattern(BAND_RDIAG,"yellow"); + $bar->SetFillColor("gray"); + $graph->Add($bar); +} + + +//$vline = new GanttVLine("2001-11-27");//d=1006858800, +$vline = new GanttVLine("2001-11-27 9:00");//d=1006858800, +$vline->SetWeight(5); +$vline->SetDayOffset(0); +$vline->title->Set("27/11 9:00"); +$vline->title->SetFont(FF_FONT1,FS_BOLD,10); +$graph->Add($vline); + +$graph->Stroke(); + +?> + + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/gantticonex1.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/gantticonex1.php new file mode 100644 index 0000000000..b5a31976fe --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/gantticonex1.php @@ -0,0 +1,77 @@ +title->Set("Gantt chart with title columns and icons"); +$graph->title->SetFont(FF_ARIAL, FS_BOLD,12); +$graph->title->SetMargin(10); + +// Explicitely set the date range +// (Autoscaling will of course also work) +$graph->SetDateRange('2001-10-06','2002-4-10'); + +// 1.5 line spacing to make more room +$graph->SetVMarginFactor(1.5); + +// Setup some nonstandard colors +$graph->SetMarginColor('darkgreen@0.95'); +$graph->SetBox(true,'yellow:0.6',2); +$graph->SetFrame(true,'darkgreen',4); +$graph->scale->divider->SetColor('yellow:0.6'); +$graph->scale->dividerh->SetColor('yellow:0.6'); + +// Display month and year scale with the gridlines +$graph->ShowHeaders(GANTT_HMONTH | GANTT_HYEAR); +$graph->scale->month->grid->SetColor('gray'); +$graph->scale->month->grid->Show(true); +$graph->scale->year->grid->SetColor('gray'); +$graph->scale->year->grid->Show(true); + +// For the titles we also add a minimum width of 100 pixels for the Task name column +$graph->scale->actinfo->SetColTitles( + array('Note','Task','Duration','Start','Finish'),array(30,100)); +$graph->scale->actinfo->SetBackgroundColor('green:0.5@0.5'); +$graph->scale->actinfo->SetFont(FF_ARIAL,FS_NORMAL,10); +$graph->scale->actinfo->vgrid->SetStyle('solid'); +$graph->scale->actinfo->vgrid->SetColor('gray'); + +// Uncomment this to keep the columns but show no headers +//$graph->scale->actinfo->Show(false); + +// Setup the icons we want to use +$erricon = new IconImage(GICON_FOLDER,0.6); +$startconicon = new IconImage(GICON_FOLDEROPEN,0.6); +$endconicon = new IconImage(GICON_TEXTIMPORTANT,0.5); + +// Store the icons in the first column and use plain text in the others +$data = array( + array(0,array($erricon,"Pre-study","102 days","23 Nov '01","1 Mar '02") + , "2001-11-23","2002-03-1",FF_ARIAL,FS_NORMAL,8), + array(1,array($startconicon,"Prototype","21 days","26 Oct '01","16 Nov '01"), + "2001-10-26","2001-11-16",FF_ARIAL,FS_NORMAL,8), + array(2,array($endconicon,"Report","12 days","1 Mar '02","13 Mar '02"), + "2002-03-01","2002-03-13",FF_ARIAL,FS_NORMAL,8) +); + +// Create the bars and add them to the gantt chart +for($i=0; $i4 ) + $bar->title->SetFont($data[$i][4],$data[$i][5],$data[$i][6]); + $bar->SetPattern(BAND_RDIAG,"yellow"); + $bar->SetFillColor("gray"); + $bar->progress->Set(0.5); + $bar->progress->SetPattern(GANTT_SOLID,"darkgreen"); + $bar->title->SetCSIMTarget(array('#1'.$i,'#2'.$i,'#3'.$i,'#4'.$i,'#5'.$i),array('11'.$i,'22'.$i,'33'.$i)); + $graph->Add($bar); +} + +// Output the chart +$graph->Stroke(); + +?> + + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttmonthyearex1.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttmonthyearex1.php new file mode 100644 index 0000000000..6bc7809c8d --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttmonthyearex1.php @@ -0,0 +1,50 @@ +title->Set("Only month & year scale"); + +// Setup some "very" nonstandard colors +$graph->SetMarginColor('lightgreen@0.8'); +$graph->SetBox(true,'yellow:0.6',2); +$graph->SetFrame(true,'darkgreen',4); +$graph->scale->divider->SetColor('yellow:0.6'); +$graph->scale->dividerh->SetColor('yellow:0.6'); + +// Explicitely set the date range +// (Autoscaling will of course also work) +$graph->SetDateRange('2001-10-06','2002-4-01'); + +// Display month and year scale with the gridlines +$graph->ShowHeaders(GANTT_HMONTH | GANTT_HYEAR); +$graph->scale->month->grid->SetColor('gray'); +$graph->scale->month->grid->Show(true); +$graph->scale->year->grid->SetColor('gray'); +$graph->scale->year->grid->Show(true); + +// Data for our example activities +$data = array( + array(0,"Group 1 Johan", "2001-11-23","2002-03-1",FF_FONT1,FS_BOLD,8), + array(1," Label 2", "2001-10-26","2001-11-16")); + +// Create the bars and add them to the gantt chart +for($i=0; $i4 ) + $bar->title->SetFont($data[$i][4],$data[$i][5],$data[$i][6]); + $bar->SetPattern(BAND_RDIAG,"yellow"); + $bar->SetFillColor("red"); + $bar->progress->Set(0.5); + $bar->progress->SetPattern(GANTT_SOLID,"darkgreen"); + $graph->Add($bar); +} + +// Output the chart +$graph->Stroke(); + +?> + + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttmonthyearex2.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttmonthyearex2.php new file mode 100644 index 0000000000..4ed509255c --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttmonthyearex2.php @@ -0,0 +1,66 @@ +title->Set("Only month & year scale"); + +// Setup some "very" nonstandard colors +$graph->SetMarginColor('lightgreen@0.8'); +$graph->SetBox(true,'yellow:0.6',2); +$graph->SetFrame(true,'darkgreen',4); +$graph->scale->divider->SetColor('yellow:0.6'); +$graph->scale->dividerh->SetColor('yellow:0.6'); + +// Explicitely set the date range +// (Autoscaling will of course also work) +$graph->SetDateRange('2001-10-06','2002-4-10'); + +// Display month and year scale with the gridlines +$graph->ShowHeaders(GANTT_HMONTH | GANTT_HYEAR); +$graph->scale->month->grid->SetColor('gray'); +$graph->scale->month->grid->Show(true); +$graph->scale->year->grid->SetColor('gray'); +$graph->scale->year->grid->Show(true); + + +// Setup activity info + +// For the titles we also add a minimum width of 100 pixels for the Task name column +$graph->scale->actinfo->SetColTitles( + array('Name','Duration','Start','Finish'),array(100)); +$graph->scale->actinfo->SetBackgroundColor('green:0.5@0.5'); +$graph->scale->actinfo->SetFont(FF_ARIAL,FS_NORMAL,10); +$graph->scale->actinfo->vgrid->SetStyle('solid'); +$graph->scale->actinfo->vgrid->SetColor('gray'); + +// Data for our example activities +$data = array( + array(0,array("Pre-study","102 days","23 Nov '01","1 Mar '02") + , "2001-11-23","2002-03-1",FF_ARIAL,FS_NORMAL,8), + array(1,array("Prototype","21 days","26 Oct '01","16 Nov '01"), + "2001-10-26","2001-11-16",FF_ARIAL,FS_NORMAL,8), + array(2,array("Report","12 days","1 Mar '02","13 Mar '02"), + "2002-03-01","2002-03-13",FF_ARIAL,FS_NORMAL,8) +); + +// Create the bars and add them to the gantt chart +for($i=0; $i4 ) + $bar->title->SetFont($data[$i][4],$data[$i][5],$data[$i][6]); + $bar->SetPattern(BAND_RDIAG,"yellow"); + $bar->SetFillColor("gray"); + $bar->progress->Set(0.5); + $bar->progress->SetPattern(GANTT_SOLID,"darkgreen"); + $graph->Add($bar); +} + +// Output the chart +$graph->Stroke(); + +?> + + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttmonthyearex3.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttmonthyearex3.php new file mode 100644 index 0000000000..fa0c3f67bb --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttmonthyearex3.php @@ -0,0 +1,66 @@ +title->Set("Only month & year scale"); + +// Setup some "very" nonstandard colors +$graph->SetMarginColor('lightgreen@0.8'); +$graph->SetBox(true,'yellow:0.6',2); +$graph->SetFrame(true,'darkgreen',4); +$graph->scale->divider->SetColor('yellow:0.6'); +$graph->scale->dividerh->SetColor('yellow:0.6'); + +// Explicitely set the date range +// (Autoscaling will of course also work) +$graph->SetDateRange('2001-10-06','2002-4-10'); + +// Display month and year scale with the gridlines +$graph->ShowHeaders(GANTT_HMONTH | GANTT_HYEAR); +$graph->scale->month->grid->SetColor('gray'); +$graph->scale->month->grid->Show(true); +$graph->scale->year->grid->SetColor('gray'); +$graph->scale->year->grid->Show(true); + + +// Setup activity info + +// For the titles we also add a minimum width of 100 pixels for the Task name column +$graph->scale->actinfo->SetColTitles( + array('Type','Name','Duration','Start','Finish'),array(40,100)); +$graph->scale->actinfo->SetBackgroundColor('green:0.5@0.5'); +$graph->scale->actinfo->SetFont(FF_ARIAL,FS_NORMAL,10); +$graph->scale->actinfo->vgrid->SetStyle('solid'); +$graph->scale->actinfo->vgrid->SetColor('gray'); + +// Data for our example activities +$data = array( + array(0,array("","Pre-study","102 days","23 Nov '01","1 Mar '02") + , "2001-11-23","2002-03-1",FF_ARIAL,FS_NORMAL,8), + array(1,array("","Prototype","21 days","26 Oct '01","16 Nov '01"), + "2001-10-26","2001-11-16",FF_ARIAL,FS_NORMAL,8), + array(2,array("","Report","12 days","1 Mar '02","13 Mar '02"), + "2002-03-01","2002-03-13",FF_ARIAL,FS_NORMAL,8) +); + +// Create the bars and add them to the gantt chart +for($i=0; $i4 ) + $bar->title->SetFont($data[$i][4],$data[$i][5],$data[$i][6]); + $bar->SetPattern(BAND_RDIAG,"yellow"); + $bar->SetFillColor("gray"); + $bar->progress->Set(0.5); + $bar->progress->SetPattern(GANTT_SOLID,"darkgreen"); + $graph->Add($bar); +} + +// Output the chart +$graph->Stroke(); + +?> + + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttmonthyearex4.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttmonthyearex4.php new file mode 100644 index 0000000000..defa2e73f9 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttmonthyearex4.php @@ -0,0 +1,71 @@ +title->Set("Adding a spaning title"); + +// Setup some "very" nonstandard colors +$graph->SetMarginColor('lightgreen@0.8'); +$graph->SetBox(true,'yellow:0.6',2); +$graph->SetFrame(true,'darkgreen',4); +$graph->scale->divider->SetColor('yellow:0.6'); +$graph->scale->dividerh->SetColor('yellow:0.6'); + +// Explicitely set the date range +// (Autoscaling will of course also work) +$graph->SetDateRange('2001-11-06','2002-1-10'); + +// Display month and year scale with the gridlines +$graph->ShowHeaders(GANTT_HMONTH | GANTT_HYEAR | GANTT_HWEEK ); +$graph->scale->month->grid->SetColor('gray'); +$graph->scale->month->grid->Show(true); +$graph->scale->year->grid->SetColor('gray'); +$graph->scale->year->grid->Show(true); + + +//Setup spanning title +$graph->scale->tableTitle->Set( 'Phase 1' ); +$graph->scale->tableTitle->SetFont( FF_ARIAL , FS_NORMAL , 16 ); +$graph->scale->SetTableTitleBackground( 'darkgreen@0.6' ); +$graph->scale->tableTitle->Show( true ); + +// Setup activity info + +// For the titles we also add a minimum width of 100 pixels for the Task name column +$graph->scale->actinfo->SetColTitles(array('Name','Duration','Start','Finish'),array(100)); +$graph->scale->actinfo->SetBackgroundColor('green:0.5@0.5'); +$graph->scale->actinfo->SetFont(FF_ARIAL,FS_NORMAL,10); +$graph->scale->actinfo->vgrid->SetStyle('solid'); +$graph->scale->actinfo->vgrid->SetColor('gray'); + +// Data for our example activities +$data = array( + array(0,array("Pre-study","102 days","23 Nov '01","1 Mar '02") + , "2001-11-23","2002-03-1",FF_ARIAL,FS_NORMAL,8), + array(1,array("Prototype","21 days","26 Oct '01","16 Nov '01"), + "2001-10-26","2001-11-16",FF_ARIAL,FS_NORMAL,8), + array(2,array("Report","12 days","1 Mar '02","13 Mar '02"), + "2002-03-01","2002-03-13",FF_ARIAL,FS_NORMAL,8) +); + +// Create the bars and add them to the gantt chart +for($i=0; $i4 ) + $bar->title->SetFont($data[$i][4],$data[$i][5],$data[$i][6]); + $bar->SetPattern(BAND_RDIAG,"yellow"); + $bar->SetFillColor("gray"); + $bar->progress->Set(0.5); + $bar->progress->SetPattern(GANTT_SOLID,"darkgreen"); + $graph->Add($bar); +} + +// Output the chart +$graph->Stroke(); + +?> + + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttsimpleex1.php b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttsimpleex1.php new file mode 100644 index 0000000000..63e4efb6c6 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_gantt/ganttsimpleex1.php @@ -0,0 +1,31 @@ +title->Set("Gantt Graph using CreateSimple()"); + +// Setup scale +$graph->ShowHeaders(GANTT_HYEAR | GANTT_HMONTH | GANTT_HDAY | GANTT_HWEEK); +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); + +// Add the specified activities +$graph->CreateSimple($data); + +// .. and stroke the graph +$graph->Stroke(); + +?> + + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example0-0.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example0-0.php new file mode 100644 index 0000000000..c148c47b31 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example0-0.php @@ -0,0 +1,25 @@ +SetScale('intlin'); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); + +// Add the plot to the graph +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example0.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example0.php new file mode 100644 index 0000000000..3b9f2a93a4 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example0.php @@ -0,0 +1,21 @@ +SetScale('textlin'); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot->SetColor('blue'); + +// Add the plot to the graph +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example1.1.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example1.1.php new file mode 100644 index 0000000000..3bcdf1b89a --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example1.1.php @@ -0,0 +1,25 @@ +SetScale("textlin"); +$graph->img->SetMargin(30, 90, 40, 50); +$graph->xaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->title->Set("Example 1.1 same y-values"); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot->SetLegend("Test 1"); +$lineplot->SetColor("blue"); +$lineplot->SetWeight(5); + +// Add the plot to the graph +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example1.2.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example1.2.php new file mode 100644 index 0000000000..d6e0feb9bc --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example1.2.php @@ -0,0 +1,28 @@ +SetScale("textlin"); +$graph->img->SetMargin(30, 90, 40, 50); +$graph->xaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->title->Set("Dashed lineplot"); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot->SetLegend("Test 1"); +$lineplot->SetColor("blue"); + +// Style can also be specified as SetStyle([1|2|3|4]) or +// SetStyle("solid"|"dotted"|"dashed"|"lobgdashed") +$lineplot->SetStyle("dashed"); + +// Add the plot to the graph +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example1.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example1.php new file mode 100644 index 0000000000..1c5a30d702 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example1.php @@ -0,0 +1,24 @@ +SetScale("textlin"); +$graph->img->SetMargin(50, 90, 40, 50); +$graph->xaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->title->Set("Examples for graph"); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot->SetLegend("Test 1"); +$lineplot->SetColor("blue"); + +// Add the plot to the graph +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example10.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example10.php new file mode 100644 index 0000000000..4ab565df5d --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example10.php @@ -0,0 +1,59 @@ +img->SetMargin(40, 110, 20, 40); +$graph->SetScale("textlog"); +$graph->SetY2Scale("log"); +$graph->SetShadow(); + +$graph->ygrid->Show(true, true); +$graph->xgrid->Show(true, false); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot2 = new Plot\LinePlot($y2data); + +$graph->yaxis->scale->ticks->SupressFirst(); +$graph->y2axis->scale->ticks->SupressFirst(); +// Add the plot to the graph +$graph->Add($lineplot); +$graph->AddY2($lineplot2); +$lineplot2->SetColor("orange"); +$lineplot2->SetWeight(2); +$graph->y2axis->SetColor("orange"); + +$graph->title->Set("Example 10"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); + +$lineplot2->SetColor("orange"); +$lineplot2->SetWeight(2); + +$graph->yaxis->SetColor("blue"); + +$lineplot->SetLegend("Plot 1"); +$lineplot2->SetLegend("Plot 2"); + +$graph->legend->Pos(0.05, 0.5, "right", "center"); + +$graph->xaxis->SetTickLabels($datax); +$graph->xaxis->SetTextTickInterval(2); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example11.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example11.php new file mode 100644 index 0000000000..d13b9d6afa --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example11.php @@ -0,0 +1,51 @@ +Push(); + +// Create the graph. These two calls are always required +$graph = new Graph\Graph(300, 200); +$graph->SetScale("textlin"); + +$graph->SetMargin(40, 20, 20, 60); + +$graph->title->Set("Timing a graph"); +$graph->footer->right->Set('Timer (ms): '); +$graph->footer->right->SetFont(FF_COURIER, FS_ITALIC); +$graph->footer->SetTimer($timer); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); + +$lineplot2 = new Plot\LinePlot($ydata2); + +// Add the plot to the graph +$graph->Add($lineplot); +$graph->Add($lineplot2); + +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); + +$lineplot2->SetColor("orange"); +$lineplot2->SetWeight(2); + +$graph->yaxis->SetColor("red"); +$graph->yaxis->SetWeight(2); +$graph->SetShadow(); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example13.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example13.php new file mode 100644 index 0000000000..d2d867a783 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example13.php @@ -0,0 +1,35 @@ +SetScale("textlin"); + +$graph->img->SetMargin(40, 30, 20, 40); +$graph->SetShadow(); + +// Create the error plot +$errplot = new Plot\ErrorPlot($errdatay); +$errplot->SetColor("red"); +$errplot->SetWeight(2); + +// Add the plot to the graph +$graph->Add($errplot); + +$graph->title->Set("Simple error plot"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +$datax = $gDateLocale->GetShortMonth(); +$graph->xaxis->SetTickLabels($datax); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example14.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example14.php new file mode 100644 index 0000000000..04df347932 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example14.php @@ -0,0 +1,36 @@ +SetScale("textlin"); + +$graph->img->SetMargin(40, 30, 20, 40); +$graph->SetShadow(); + +// Create the error plot +$errplot = new Plot\ErrorPlot($errdatay); +$errplot->SetColor("red"); +$errplot->SetWeight(2); +$errplot->SetCenter(); + +// Add the plot to the graph +$graph->Add($errplot); + +$graph->title->Set("Simple error plot"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +$datax = $gDateLocale->GetShortMonth(); +$graph->xaxis->SetTickLabels($datax); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example15.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example15.php new file mode 100644 index 0000000000..898fe2c769 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example15.php @@ -0,0 +1,39 @@ +SetScale("textlin"); + +$graph->img->SetMargin(40, 30, 20, 40); +$graph->SetShadow(); + +// Create the linear plot +$errplot = new Plot\ErrorLinePlot($errdatay); + +$errplot->SetColor("red"); +$errplot->SetWeight(2); +$errplot->SetCenter(); +$errplot->line->SetWeight(2); +$errplot->line->SetColor("blue"); + +// Add the plot to the graph +$graph->Add($errplot); + +$graph->title->Set("Linear error plot"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +$datax = $gDateLocale->GetShortMonth(); +$graph->xaxis->SetTickLabels($datax); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example16.1.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example16.1.php new file mode 100644 index 0000000000..d7cf2f2ce3 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example16.1.php @@ -0,0 +1,44 @@ +SetScale('textlin'); + +$graph->img->SetMargin(40, 130, 20, 40); +$graph->SetShadow(); + +// Create the linear error plot +$l1plot = new Plot\LinePlot($l1datay); +$l1plot->SetColor('red'); +$l1plot->SetWeight(2); +$l1plot->SetLegend('Prediction'); + +// Create the bar plot +$l2plot = new Plot\LinePlot($l2datay); +$l2plot->SetFillColor('orange'); +$l2plot->SetLegend('Result'); + +// Add the plots to the graph +$graph->Add($l2plot); +$graph->Add($l1plot); + +$graph->title->Set('Mixing line and filled line'); +$graph->xaxis->title->Set('X-title'); +$graph->yaxis->title->Set('Y-title'); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +//$graph->xaxis->SetTickLabels($datax); +//$graph->xaxis->SetTextTickInterval(2); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example16.2.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example16.2.php new file mode 100644 index 0000000000..cdc732f1f9 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example16.2.php @@ -0,0 +1,44 @@ +SetScale("textlin"); + +$graph->img->SetMargin(40, 130, 20, 40); +$graph->SetShadow(); + +// Create the linear error plot +$l1plot = new Plot\LinePlot($l1datay); +$l1plot->SetColor("red"); +$l1plot->SetWeight(2); +$l1plot->SetLegend("Prediction"); + +// Create the bar plot +$bplot = new Plot\BarPlot($l2datay); +$bplot->SetFillColor("orange"); +$bplot->SetLegend("Result"); + +// Add the plots to t'he graph +$graph->Add($l1plot); +$graph->Add($bplot); + +$graph->title->Set("Adding a line plot to a bar graph v1"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +//$graph->xaxis->SetTickLabels($datax); +//$graph->xaxis->SetTextTickInterval(2); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example16.3.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example16.3.php new file mode 100644 index 0000000000..21133b7cc1 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example16.3.php @@ -0,0 +1,44 @@ +SetScale('textlin'); + +$graph->img->SetMargin(40, 130, 20, 40); +$graph->SetShadow(); + +// Create the linear error plot +$l1plot = new Plot\LinePlot($l1datay); +$l1plot->SetColor('red'); +$l1plot->SetWeight(2); +$l1plot->SetLegend('Prediction'); + +// Create the bar plot +$bplot = new Plot\BarPlot($l2datay); +$bplot->SetFillColor('orange'); +$bplot->SetLegend('Result'); + +// Add the plots to t'he graph +$graph->Add($bplot); +$graph->Add($l1plot); + +$graph->title->Set('Adding a line plot to a bar graph v1'); +$graph->xaxis->title->Set('X-title'); +$graph->yaxis->title->Set('Y-title'); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +$graph->xaxis->SetTickLabels($datax); +//$graph->xaxis->SetTextTickInterval(2); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example16.4.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example16.4.php new file mode 100644 index 0000000000..b0842e32e8 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example16.4.php @@ -0,0 +1,45 @@ +SetScale('intlin'); + +$graph->img->SetMargin(40, 130, 20, 40); +$graph->SetShadow(); + +// Create the linear error plot +$l1plot = new Plot\LinePlot($l1datay); +$l1plot->SetColor('red'); +$l1plot->SetWeight(2); +$l1plot->SetLegend('Prediction'); + +// Create the bar plot +$bplot = new Plot\BarPlot($l2datay); +$bplot->SetFillColor('orange'); +$bplot->SetLegend('Result'); + +// Add the plots to t'he graph +$graph->Add($bplot); +$graph->Add($l1plot); + +$graph->title->Set('Adding a line plot to a bar graph v3'); +$graph->xaxis->title->Set('X-title'); +$graph->yaxis->title->Set('Y-title'); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +$datax = $gDateLocale->GetShortMonth(); +$graph->xaxis->SetTickLabels($datax); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example16.5.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example16.5.php new file mode 100644 index 0000000000..bce81a56d7 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example16.5.php @@ -0,0 +1,55 @@ +img->SetMargin(40, 70, 20, 40); +$graph->SetScale("textlin"); +$graph->SetShadow(); +$graph->SetColor(array(250, 250, 250)); + +$graph->img->SetTransparent("white"); + +$t1 = new Text\Text("This is a text"); +$t1->SetPos(0.5, 0.5); +$t1->SetOrientation("h"); +$t1->SetFont(FF_FONT1, FS_BOLD); +$t1->SetBox("white", "black", "gray"); +$t1->SetColor("black"); +$graph->AddText($t1); + +// Create the linear error plot +$l1plot = new Plot\LinePlot($l1datay); +$l1plot->SetColor("blue"); +$l1plot->SetWeight(2); +$l1plot->SetLegend("Prediction"); + +// Create the bar plot +$l2plot = new Plot\BarPlot($l2datay); +$l2plot->SetFillColor("orange"); +$l2plot->SetLegend("Result"); + +// Add the plots to the graph +$graph->Add($l1plot); +$graph->Add($l2plot); + +$graph->title->Set("Example 16.3"); +$graph->xaxis->title->Set("Month"); +$graph->yaxis->title->Set("x10,000 US$"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +$graph->xaxis->SetTickLabels($datax); +//$graph->xaxis->SetTextTickInterval(2); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example16.6.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example16.6.php new file mode 100644 index 0000000000..74be5f1986 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example16.6.php @@ -0,0 +1,56 @@ +GetStat(); +list($xd, $yd) = $lr->GetY(0, 19); + +// Create the graph +$graph = new Graph\Graph(300, 250); +$graph->SetScale('linlin'); + +// Setup title +$graph->title->Set("Linear regression"); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); + +$graph->subtitle->Set('(stderr=' . sprintf('%.2f', $stderr) . ', corr=' . sprintf('%.2f', $corr) . ')'); +$graph->subtitle->SetFont(FF_ARIAL, FS_NORMAL, 12); + +// make sure that the X-axis is always at the +// bottom at the plot and not just at Y=0 which is +// the default position +$graph->xaxis->SetPos('min'); + +// Create the scatter plot with some nice colors +$sp1 = new ScatterPlot($datay, $datax); +$sp1->mark->SetType(MARK_FILLEDCIRCLE); +$sp1->mark->SetFillColor("red"); +$sp1->SetColor("blue"); +$sp1->SetWeight(3); +$sp1->mark->SetWidth(4); + +// Create the regression line +$lplot = new Plot\LinePlot($yd); +$lplot->SetWeight(2); +$lplot->SetColor('navy'); + +// Add the pltos to the line +$graph->Add($sp1); +$graph->Add($lplot); + +// ... and stroke +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example16.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example16.php new file mode 100644 index 0000000000..6297c982ac --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example16.php @@ -0,0 +1,42 @@ +SetScale("textlin"); + +$graph->img->SetMargin(40, 30, 20, 40); +$graph->SetShadow(); + +// Create the linear plot +$errplot = new Plot\ErrorLinePlot($errdatay); +$errplot->SetColor("red"); +$errplot->SetWeight(2); +$errplot->SetCenter(); +$errplot->line->SetWeight(2); +$errplot->line->SetColor("blue"); + +// Setup the legends +$errplot->SetLegend("Min/Max"); +$errplot->line->SetLegend("Average"); + +// Add the plot to the graph +$graph->Add($errplot); + +$graph->title->Set("Linear error plot"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +$datax = $gDateLocale->GetShortMonth(); +$graph->xaxis->SetTickLabels($datax); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example17.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example17.php new file mode 100644 index 0000000000..0affb1419a --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example17.php @@ -0,0 +1,41 @@ +SetScale("textlin"); +$graph->SetShadow(); +$graph->img->SetMargin(40, 30, 20, 40); + +// Create the linear plots for each category +$dplot[] = new Plot\LinePlot($datay1); +$dplot[] = new Plot\LinePlot($datay2); +$dplot[] = new Plot\LinePlot($datay3); + +$dplot[0]->SetFillColor("red"); +$dplot[1]->SetFillColor("blue"); +$dplot[2]->SetFillColor("green"); + +// Create the accumulated graph +$accplot = new AccLinePlot($dplot); + +// Add the plot to the graph +$graph->Add($accplot); + +$graph->xaxis->SetTextTickInterval(2); +$graph->title->Set("Example 17"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example18.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example18.php new file mode 100644 index 0000000000..af6e99a4dd --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example18.php @@ -0,0 +1,32 @@ +SetScale("textlin"); + +// Add a drop shadow +$graph->SetShadow(); + +// Adjust the margin a bit to make more room for titles +$graph->img->SetMargin(40, 30, 20, 40); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$graph->Add($bplot); + +// Setup the titles +$graph->title->Set("A simple bar graph"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example19.1.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example19.1.php new file mode 100644 index 0000000000..1a1f0cc800 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example19.1.php @@ -0,0 +1,35 @@ +SetScale('intlin'); + +// Add a drop shadow +$graph->SetShadow(); + +// Adjust the margin a bit to make more room for titles +$graph->SetMargin(40, 30, 20, 40); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); + +// Adjust fill color +$bplot->SetFillColor('orange'); +$graph->Add($bplot); + +// Setup the titles +$graph->title->Set('A basic bar graph'); +$graph->xaxis->title->Set('X-title'); +$graph->yaxis->title->Set('Y-title'); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example19.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example19.php new file mode 100644 index 0000000000..33724b1709 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example19.php @@ -0,0 +1,35 @@ +SetScale('textlin'); + +// Add a drop shadow +$graph->SetShadow(); + +// Adjust the margin a bit to make more room for titles +$graph->SetMargin(40, 30, 20, 40); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); + +// Adjust fill color +$bplot->SetFillColor('orange'); +$graph->Add($bplot); + +// Setup the titles +$graph->title->Set('A basic bar graph'); +$graph->xaxis->title->Set('X-title'); +$graph->yaxis->title->Set('Y-title'); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example2.1.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example2.1.php new file mode 100644 index 0000000000..bfd8c763e4 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example2.1.php @@ -0,0 +1,28 @@ +SetScale("textlin"); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); + +$lineplot->value->Show(); +$lineplot->value->SetColor("red"); +$lineplot->value->SetFont(FF_FONT1, FS_BOLD); + +// Add the plot to the graph +$graph->Add($lineplot); + +$graph->img->SetMargin(40, 20, 20, 40); +$graph->title->Set("Example 2.1"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example2.5.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example2.5.php new file mode 100644 index 0000000000..ecc98741ab --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example2.5.php @@ -0,0 +1,25 @@ +SetScale("textlin"); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); + +// Add the plot to the graph +$graph->Add($lineplot); + +$graph->img->SetMargin(40, 20, 20, 40); +$graph->title->Set("Example 2.5"); +$graph->xaxis->title->Set("X-title"); +$graph->xaxis->SetPos("min"); +$graph->yaxis->title->Set("Y-title"); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example2.6.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example2.6.php new file mode 100644 index 0000000000..345b757688 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example2.6.php @@ -0,0 +1,26 @@ +SetScale("textlin"); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot->SetStepStyle(); + +// Add the plot to the graph +$graph->Add($lineplot); + +$graph->img->SetMargin(40, 20, 20, 40); +$graph->title->Set("Example 2.6 (Line with stepstyle)"); +$graph->xaxis->title->Set("X-title"); +$graph->xaxis->SetPos("min"); +$graph->yaxis->title->Set("Y-title"); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example2.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example2.php new file mode 100644 index 0000000000..799af34f54 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example2.php @@ -0,0 +1,32 @@ +SetScale('intlin'); + +// Setup margin and titles +$graph->SetMargin(40, 20, 20, 40); +$graph->title->Set('Calls per operator'); +$graph->subtitle->Set('(March 12, 2008)'); +$graph->xaxis->title->Set('Operator'); +$graph->yaxis->title->Set('# of calls'); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); + +// Add the plot to the graph +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example20.1.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example20.1.php new file mode 100644 index 0000000000..cc2002545e --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example20.1.php @@ -0,0 +1,35 @@ +SetScale("textlin"); + +// Add a drop shadow +$graph->SetShadow(); + +// Adjust the margin a bit to make more room for titles +$graph->img->SetMargin(40, 30, 20, 40); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); + +// Adjust fill color +$bplot->SetFillColor('orange'); +$bplot->value->Show(); +$graph->Add($bplot); + +// Setup the titles +$graph->title->Set("Bar graph"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example20.2.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example20.2.php new file mode 100644 index 0000000000..7217564dc8 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example20.2.php @@ -0,0 +1,36 @@ +SetScale("textlin"); +$graph->yaxis->scale->SetGrace(20); + +// Add a drop shadow +$graph->SetShadow(); + +// Adjust the margin a bit to make more room for titles +$graph->img->SetMargin(40, 30, 20, 40); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); + +// Adjust fill color +$bplot->SetFillColor('orange'); +$bplot->value->Show(); +$graph->Add($bplot); + +// Setup the titles +$graph->title->Set("Bar graph with Y-scale grace"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example20.3.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example20.3.php new file mode 100644 index 0000000000..f5eeae6e9c --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example20.3.php @@ -0,0 +1,39 @@ +SetScale("textlin"); +$graph->yaxis->scale->SetGrace(20); + +// Add a drop shadow +$graph->SetShadow(); + +// Adjust the margin a bit to make more room for titles +$graph->img->SetMargin(40, 30, 20, 40); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); + +// Adjust fill color +$bplot->SetFillColor('orange'); +$bplot->value->Show(); +$bplot->value->SetFont(FF_ARIAL, FS_BOLD, 10); +$bplot->value->SetAngle(45); +$bplot->value->SetFormat('%0.1f'); +$graph->Add($bplot); + +// Setup the titles +$graph->title->Set("Bar graph with Y-scale grace"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example20.4.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example20.4.php new file mode 100644 index 0000000000..fd24715476 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example20.4.php @@ -0,0 +1,40 @@ +SetScale("textlin"); +$graph->yaxis->scale->SetGrace(20); + +// Add a drop shadow +$graph->SetShadow(); + +// Adjust the margin a bit to make more room for titles +$graph->img->SetMargin(40, 30, 20, 40); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); + +// Adjust fill color +$bplot->SetFillColor('orange'); +$bplot->SetShadow(); +$bplot->value->Show(); +$bplot->value->SetFont(FF_ARIAL, FS_BOLD, 10); +$bplot->value->SetAngle(45); +$bplot->value->SetFormat('%0.1f'); +$graph->Add($bplot); + +// Setup the titles +$graph->title->Set("Bar graph with drop shadow"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example20.5.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example20.5.php new file mode 100644 index 0000000000..6fde66d5ce --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example20.5.php @@ -0,0 +1,46 @@ +SetScale("textlin"); + +// Add a drop shadow +$graph->SetShadow(); + +// Adjust the margin a bit to make more room for titles +$graph->img->SetMargin(40, 30, 20, 40); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); + +// Adjust fill color +$bplot->SetFillColor('orange'); + +// Setup values +$bplot->value->Show(); +$bplot->value->SetFormat('%d'); +$bplot->value->SetFont(FF_FONT1, FS_BOLD); + +// Center the values in the bar +$bplot->SetValuePos('center'); + +// Make the bar a little bit wider +$bplot->SetWidth(0.7); + +$graph->Add($bplot); + +// Setup the titles +$graph->title->Set("Centered values for bars"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example20.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example20.php new file mode 100644 index 0000000000..46739b1715 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example20.php @@ -0,0 +1,35 @@ +SetScale("textlin"); + +// Add a drop shadow +$graph->SetShadow(); + +// Adjust the margin a bit to make more room for titles +$graph->img->SetMargin(40, 30, 20, 40); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); + +// Adjust fill color +$bplot->SetFillColor('orange'); +$bplot->SetWidth(1.0); +$graph->Add($bplot); + +// Setup the titles +$graph->title->Set("Bar graph"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example21.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example21.php new file mode 100644 index 0000000000..03fb8390c9 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example21.php @@ -0,0 +1,36 @@ +SetScale("textlin"); + +$graph->SetShadow(); +$graph->img->SetMargin(40, 30, 20, 40); + +// Create the bar plots +$b1plot = new Plot\BarPlot($data1y); +$b1plot->SetFillColor("orange"); +$b2plot = new Plot\BarPlot($data2y); +$b2plot->SetFillColor("blue"); + +// Create the grouped bar plot +$gbplot = new Plot\GroupBarPlot(array($b1plot, $b2plot)); + +// ...and add it to the graPH +$graph->Add($gbplot); + +$graph->title->Set("Example 21"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example22.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example22.php new file mode 100644 index 0000000000..c4d043776e --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example22.php @@ -0,0 +1,37 @@ +SetScale("textlin"); +$graph->SetShadow(); + +$graph->img->SetMargin(40, 30, 20, 40); + +// Create the bar plots +$b1plot = new Plot\BarPlot($data1y); +$b1plot->SetFillColor("orange"); +$b2plot = new Plot\BarPlot($data2y); +$b2plot->SetFillColor("blue"); + +// Create the grouped bar plot +$gbplot = new Plot\GroupBarPlot(array($b1plot, $b2plot)); +$gbplot->SetWidth(0.9); + +// ...and add it to the graPH +$graph->Add($gbplot); + +$graph->title->Set("Adjusting the width"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example23.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example23.php new file mode 100644 index 0000000000..3caadfc300 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example23.php @@ -0,0 +1,38 @@ +SetScale("textlin"); + +$graph->SetShadow(); +$graph->img->SetMargin(40, 30, 20, 40); + +// Create the bar plots +$b1plot = new Plot\BarPlot($data1y); +$b1plot->SetFillColor("orange"); +$b2plot = new Plot\BarPlot($data2y); +$b2plot->SetFillColor("blue"); + +// Create the grouped bar plot +$gbplot = new Plot\AccBarPlot(array($b1plot, $b2plot)); + +// ...and add it to the graPH +$graph->Add($gbplot); + +$graph->title->Set("Accumulated bar plots"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example24.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example24.php new file mode 100644 index 0000000000..24b3be4120 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example24.php @@ -0,0 +1,45 @@ +SetScale("textlin"); + +$graph->SetShadow(); +$graph->img->SetMargin(40, 30, 20, 40); + +$b1plot = new Plot\BarPlot($data1y); +$b1plot->SetFillColor("orange"); +$b2plot = new Plot\BarPlot($data2y); +$b2plot->SetFillColor("blue"); +$b3plot = new Plot\BarPlot($data3y); +$b3plot->SetFillColor("green"); +$b4plot = new Plot\BarPlot($data4y); +$b4plot->SetFillColor("brown"); + +// Create the accumulated bar plots +$ab1plot = new Plot\AccBarPlot(array($b1plot, $b2plot)); +$ab2plot = new Plot\AccBarPlot(array($b3plot, $b4plot)); + +// Create the grouped bar plot +$gbplot = new Plot\GroupBarPlot(array($ab1plot, $ab2plot)); + +// ...and add it to the graph +$graph->Add($gbplot); + +$graph->title->Set("Grouped Accumulated bar plots"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example25.1.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example25.1.php new file mode 100644 index 0000000000..bb412fec00 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example25.1.php @@ -0,0 +1,39 @@ +SetScale('textlin'); + +// Add a drop shadow +$graph->SetShadow(); + +// Adjust the margin a bit to make more room for titles +$graph->img->SetMargin(40, 30, 40, 40); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$graph->Add($bplot); + +// Create and add a new text +$txt = new Text('This is a text'); +$txt->SetPos(10, 20); +$txt->SetColor('darkred'); +$txt->SetFont(FF_FONT2, FS_BOLD); +$txt->SetBox('yellow', 'navy', 'gray@0.5'); +$graph->AddText($txt); + +// Setup the titles +$graph->title->Set("A simple bar graph"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example25.2.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example25.2.php new file mode 100644 index 0000000000..70be94d83b --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example25.2.php @@ -0,0 +1,40 @@ +SetScale('textlin'); + +// Add a drop shadow +$graph->SetShadow(); + +// Adjust the margin a bit to make more room for titles +$graph->img->SetMargin(40, 30, 20, 40); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$graph->Add($bplot); + +// Create and add a new text +$txt = new Text("This is a text\nwith many\nand even\nmore\nlines of text"); +$txt->SetPos(0.5, 0.5, 'center', 'center'); +$txt->SetFont(FF_FONT2, FS_BOLD); +$txt->ParagraphAlign('center'); +$txt->SetBox('yellow', 'navy', 'gray'); +$txt->SetColor('red'); +$graph->AddText($txt); + +// Setup the titles +$graph->title->Set("A simple bar graph"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example25.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example25.php new file mode 100644 index 0000000000..586084e76d --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example25.php @@ -0,0 +1,38 @@ +SetScale('textlin'); + +// Add a drop shadow +$graph->SetShadow(); + +// Adjust the margin a bit to make more room for titles +$graph->img->SetMargin(40, 30, 40, 40); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$graph->Add($bplot); + +// Create and add a new text +$txt = new Text('This is a text'); +$txt->SetPos(0, 20); +$txt->SetColor('darkred'); +$txt->SetFont(FF_FONT2, FS_BOLD); +$graph->AddText($txt); + +// Setup the titles +$graph->title->Set("A simple bar graph"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example26.1.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example26.1.php new file mode 100644 index 0000000000..63a9d267e3 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example26.1.php @@ -0,0 +1,22 @@ +SetShadow(); + +$graph->title->Set("A simple Pie plot"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$p1 = new PiePlot($data); +$p1->SetLegends($gDateLocale->GetShortMonth()); +$p1->SetCenter(0.4); + +$graph->Add($p1); +$graph->Stroke(); + +?> + + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example26.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example26.php new file mode 100644 index 0000000000..9cb57ebe74 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example26.php @@ -0,0 +1,18 @@ +SetShadow(); + +$graph->title->Set("A simple Pie plot"); + +$p1 = new PiePlot($data); +$graph->Add($p1); +$graph->Stroke(); + +?> + + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example27.1.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example27.1.php new file mode 100644 index 0000000000..51d52e3aae --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example27.1.php @@ -0,0 +1,25 @@ +SetShadow(); + +$graph->title->Set("A simple Pie plot"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$p1 = new PiePlot3D($data); +$p1->SetAngle(20); +$p1->SetSize(0.5); +$p1->SetCenter(0.45); +$p1->SetLegends($gDateLocale->GetShortMonth()); + +$graph->Add($p1); +$graph->Stroke(); + +?> + + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example27.2.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example27.2.php new file mode 100644 index 0000000000..aad23a38e7 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example27.2.php @@ -0,0 +1,24 @@ +SetShadow(); + +$graph->title->Set("A simple Pie plot"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$p1 = new PiePlot($data); +$p1->ExplodeSlice(1); +$p1->SetCenter(0.45); +$p1->SetLegends($gDateLocale->GetShortMonth()); + +$graph->Add($p1); +$graph->Stroke(); + +?> + + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example27.3.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example27.3.php new file mode 100644 index 0000000000..fb2a56ec75 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example27.3.php @@ -0,0 +1,24 @@ +SetShadow(); + +$graph->title->Set("A simple 3D Pie plot"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$p1 = new PiePlot3D($data); +$p1->ExplodeSlice(1); +$p1->SetCenter(0.45); +$p1->SetLegends($gDateLocale->GetShortMonth()); + +$graph->Add($p1); +$graph->Stroke(); + +?> + + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example27.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example27.php new file mode 100644 index 0000000000..3feee435ce --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example27.php @@ -0,0 +1,24 @@ +SetShadow(); + +$graph->title->Set("A simple Pie plot"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$p1 = new PiePlot3D($data); +$p1->SetSize(0.5); +$p1->SetCenter(0.45); +$p1->SetLegends($gDateLocale->GetShortMonth()); + +$graph->Add($p1); +$graph->Stroke(); + +?> + + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example28.1.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example28.1.php new file mode 100644 index 0000000000..7dce5d8ad3 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example28.1.php @@ -0,0 +1,22 @@ +SetShadow(); + +$graph->title->Set("'earth' Theme"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$p1 = new PiePlot($data); +$p1->SetTheme("earth"); +$p1->SetCenter(0.5,0.55); +$p1->value->Show(false); +$graph->Add($p1); +$graph->Stroke(); + +?> + + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example28.2.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example28.2.php new file mode 100644 index 0000000000..905be8dac3 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example28.2.php @@ -0,0 +1,22 @@ +SetShadow(); + +$graph->title->Set("'pastel' Theme"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$p1 = new PiePlot($data); +$p1->SetTheme("pastel"); +$p1->SetCenter(0.5,0.55); +$p1->value->Show(false); +$graph->Add($p1); +$graph->Stroke(); + +?> + + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example28.3.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example28.3.php new file mode 100644 index 0000000000..bc4fdbd1fc --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example28.3.php @@ -0,0 +1,22 @@ +SetShadow(); + +$graph->title->Set("'water' Theme"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$p1 = new PiePlot($data); +$p1->SetTheme("water"); +$p1->SetCenter(0.5,0.55); +$p1->value->Show(false); +$graph->Add($p1); +$graph->Stroke(); + +?> + + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example28.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example28.php new file mode 100644 index 0000000000..08d28bdc4d --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example28.php @@ -0,0 +1,22 @@ +SetShadow(); + +$graph->title->Set("'sand' Theme"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$p1 = new PiePlot($data); +$p1->SetTheme("sand"); +$p1->SetCenter(0.5,0.55); +$p1->value->Show(false); +$graph->Add($p1); +$graph->Stroke(); + +?> + + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example3.0.1.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example3.0.1.php new file mode 100644 index 0000000000..f353ae3807 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example3.0.1.php @@ -0,0 +1,40 @@ +SetScale('intlin'); +$graph->SetShadow(); + +// Setup margin and titles +$graph->SetMargin(40, 20, 20, 40); +$graph->title->Set('Calls per operator'); +$graph->subtitle->Set('(March 12, 2008)'); +$graph->xaxis->title->Set('Operator'); +$graph->yaxis->title->Set('# of calls'); + +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +$graph->yaxis->SetColor('blue'); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot->SetColor('blue'); +$lineplot->SetWeight(2); // Two pixel wide + +// Add the plot to the graph +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example3.0.2.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example3.0.2.php new file mode 100644 index 0000000000..2352195164 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example3.0.2.php @@ -0,0 +1,39 @@ +SetScale('intlin'); +$graph->SetShadow(); + +// Setup margin and titles +$graph->SetMargin(40, 20, 20, 40); +$graph->title->Set('Interpolated values'); +$graph->xaxis->title->Set('x-title'); +$graph->yaxis->title->Set('y-title'); + +$graph->yaxis->title->SetFont(FF_ARIAL, FS_BOLD, 9); +$graph->xaxis->title->SetFont(FF_ARIAL, FS_BOLD, 9); + +$graph->yaxis->SetColor('blue'); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot->SetColor('blue'); +$lineplot->SetWeight(2); // Two pixel wide + +// Add the plot to the graph +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example3.0.3.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example3.0.3.php new file mode 100644 index 0000000000..951419ad07 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example3.0.3.php @@ -0,0 +1,39 @@ +SetScale('intlin'); +$graph->SetShadow(); + +// Setup margin and titles +$graph->SetMargin(40, 20, 20, 40); +$graph->title->Set('NULL values'); +$graph->xaxis->title->Set('x-title'); +$graph->yaxis->title->Set('y-title'); + +$graph->yaxis->title->SetFont(FF_ARIAL, FS_BOLD, 9); +$graph->xaxis->title->SetFont(FF_ARIAL, FS_BOLD, 9); + +$graph->yaxis->SetColor('blue'); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot->SetColor('blue'); +$lineplot->SetWeight(2); // Two pixel wide + +// Add the plot to the graph +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example3.1.1.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example3.1.1.php new file mode 100644 index 0000000000..6902143acd --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example3.1.1.php @@ -0,0 +1,43 @@ +SetScale('intlin'); +$graph->SetShadow(); + +// Setup margin and titles +$graph->SetMargin(40, 20, 20, 40); +$graph->title->Set('Calls per operator'); +$graph->subtitle->Set('(March 12, 2008)'); +$graph->xaxis->title->Set('Operator'); +$graph->yaxis->title->Set('# of calls'); + +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +$graph->yaxis->SetColor('blue'); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot->SetColor('blue'); +$lineplot->SetWeight(2); // Two pixel wide + +// Add an image mark scaled to 50% +$lineplot->mark->SetType(MARK_IMG_DIAMOND, 'red', 0.5); + +// Add the plot to the graph +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example3.1.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example3.1.php new file mode 100644 index 0000000000..d512ae95b6 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example3.1.php @@ -0,0 +1,43 @@ +SetScale('intlin'); +$graph->SetShadow(); + +// Setup margin and titles +$graph->SetMargin(40, 20, 20, 40); +$graph->title->Set('Calls per operator'); +$graph->subtitle->Set('(March 12, 2008)'); +$graph->xaxis->title->Set('Operator'); +$graph->yaxis->title->Set('# of calls'); + +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +$graph->yaxis->SetColor('blue'); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot->SetColor('blue'); +$lineplot->SetWeight(2); // Two pixel wide +$lineplot->mark->SetType(MARK_UTRIANGLE); +$lineplot->mark->SetColor('blue'); +$lineplot->mark->SetFillColor('red'); + +// Add the plot to the graph +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example3.2.1.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example3.2.1.php new file mode 100644 index 0000000000..c6b7e21f15 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example3.2.1.php @@ -0,0 +1,35 @@ +SetScale("textlin"); +$graph->yaxis->scale->SetGrace(10, 10); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot->mark->SetType(MARK_CIRCLE); + +// Add the plot to the graph +$graph->Add($lineplot); + +$graph->img->SetMargin(40, 20, 20, 40); +$graph->title->Set("Grace value, version 1"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); +$graph->yaxis->SetWeight(2); +$graph->SetShadow(); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example3.2.2.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example3.2.2.php new file mode 100644 index 0000000000..926543e619 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example3.2.2.php @@ -0,0 +1,37 @@ +SetScale("textlin"); +$graph->yaxis->scale->SetGrace(10, 10); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot->mark->SetType(MARK_CIRCLE); + +// Add the plot to the graph +$graph->Add($lineplot); + +$graph->img->SetMargin(40, 20, 20, 40); +$graph->title->Set("Grace value version 2"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->xaxis->SetPos('min'); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); +$graph->yaxis->SetWeight(2); +$graph->SetShadow(); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example3.2.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example3.2.php new file mode 100644 index 0000000000..67fb358a71 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example3.2.php @@ -0,0 +1,34 @@ +SetScale("textlin"); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot->mark->SetType(MARK_CIRCLE); + +// Add the plot to the graph +$graph->Add($lineplot); + +$graph->img->SetMargin(40, 20, 20, 40); +$graph->title->Set("Example 3.2"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); +$graph->yaxis->SetWeight(2); +$graph->SetShadow(); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example3.3.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example3.3.php new file mode 100644 index 0000000000..ad60746c45 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example3.3.php @@ -0,0 +1,45 @@ +SetScale('intlin'); +$graph->SetShadow(); + +// Setup margin and titles +$graph->SetMargin(40, 20, 20, 40); +$graph->title->Set('Calls per operator'); +$graph->subtitle->Set('(March 12, 2008)'); +$graph->xaxis->title->Set('Operator'); +$graph->yaxis->title->Set('# of calls'); + +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +$graph->yaxis->SetColor('blue'); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot->SetColor('blue'); +$lineplot->SetWeight(2); // Two pixel wide +$lineplot->mark->SetType(MARK_UTRIANGLE); +$lineplot->mark->SetColor('blue'); +$lineplot->mark->SetFillColor('red'); + +$lineplot->value->Show(); + +// Add the plot to the graph +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example3.4.1.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example3.4.1.php new file mode 100644 index 0000000000..31e39cd887 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example3.4.1.php @@ -0,0 +1,80 @@ + 1000, 'CM' => 900, 'D' => 500, 'CD' => 400, + 'C' => 100, 'XC' => 90, 'L' => 50, 'XL' => 40, + 'X' => 10, 'IX' => 9, 'V' => 5, 'IV' => 4, 'I' => 1); + + foreach ($lookup as $roman => $value) { + // Determine the number of matches + $matches = intval($n / $value); + + // Store that many characters + $result .= str_repeat($roman, $matches); + + // Substract that from the number + $n = $n % $value; + } + + // The Roman numeral should be built, return it + return $result; +} + +function formatCallback($aVal) +{ + return '(' . numberToRoman($aVal) . ')'; +} + +// Some (random) data +$ydata = array(11, 3, 8, 12, 5, 1, 9, 13, 5, 7); + +// Size of the overall graph +$width = 350; +$height = 250; + +// Create the graph and set a scale. +// These two calls are always required +$graph = new Graph\Graph($width, $height); +$graph->SetScale('intlin'); +$graph->SetShadow(); + +// Setup margin and titles +$graph->SetMargin(40, 20, 20, 40); +$graph->title->Set('Calls per operator'); +$graph->subtitle->Set('(March 12, 2008)'); +$graph->xaxis->title->Set('Operator'); +$graph->yaxis->title->Set('# of calls'); + +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +$graph->yaxis->SetColor('blue'); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot->SetColor('blue'); +$lineplot->SetWeight(2); // Two pixel wide +$lineplot->mark->SetType(MARK_UTRIANGLE); +$lineplot->mark->SetColor('blue'); +$lineplot->mark->SetFillColor('red'); + +$lineplot->value->Show(); +$lineplot->value->SetFont(FF_ARIAL, FS_BOLD, 10); +$lineplot->value->SetColor('darkred'); +$lineplot->value->SetFormatCallback('formatCallback'); + +// Add the plot to the graph +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example3.4.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example3.4.php new file mode 100644 index 0000000000..625965db10 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example3.4.php @@ -0,0 +1,48 @@ +SetScale('intlin'); +$graph->SetShadow(); + +// Setup margin and titles +$graph->SetMargin(40, 20, 20, 40); +$graph->title->Set('Calls per operator'); +$graph->subtitle->Set('(March 12, 2008)'); +$graph->xaxis->title->Set('Operator'); +$graph->yaxis->title->Set('# of calls'); + +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +$graph->yaxis->SetColor('blue'); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot->SetColor('blue'); +$lineplot->SetWeight(2); // Two pixel wide +$lineplot->mark->SetType(MARK_UTRIANGLE); +$lineplot->mark->SetColor('blue'); +$lineplot->mark->SetFillColor('red'); + +$lineplot->value->Show(); +$lineplot->value->SetFont(FF_ARIAL, FS_BOLD, 10); +$lineplot->value->SetColor('darkred'); +$lineplot->value->SetFormat('(%d)'); + +// Add the plot to the graph +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example3.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example3.php new file mode 100644 index 0000000000..ea273ea89c --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example3.php @@ -0,0 +1,37 @@ +SetScale('intlin'); + +// Setup margin and titles +$graph->SetMargin(40, 20, 20, 40); +$graph->title->Set('Calls per operator'); +$graph->subtitle->Set('(March 12, 2008)'); +$graph->xaxis->title->Set('Operator'); +$graph->yaxis->title->Set('# of calls'); + +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot->SetColor('blue'); +$lineplot->SetWeight(2); // Two pixel wide + +// Add the plot to the graph +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example4.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example4.php new file mode 100644 index 0000000000..bc1453a1b4 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example4.php @@ -0,0 +1,45 @@ +SetScale('intlin'); +$graph->SetShadow(); + +// Setup margin and titles +$graph->SetMargin(40, 20, 20, 40); +$graph->title->Set('Calls per operator (June,July)'); +$graph->subtitle->Set('(March 12, 2008)'); +$graph->xaxis->title->Set('Operator'); +$graph->yaxis->title->Set('# of calls'); + +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +// Create the first data series +$lineplot = new Plot\LinePlot($ydata); +$lineplot->SetWeight(2); // Two pixel wide + +// Add the plot to the graph +$graph->Add($lineplot); + +// Create the second data series +$lineplot2 = new Plot\LinePlot($ydata2); +$lineplot2->SetWeight(2); // Two pixel wide + +// Add the second plot to the graph +$graph->Add($lineplot2); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example5.1.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example5.1.php new file mode 100644 index 0000000000..1704b1694e --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example5.1.php @@ -0,0 +1,47 @@ +img->SetMargin(40, 40, 20, 40); +$graph->SetScale("textlin"); +$graph->SetY2Scale("lin"); +$graph->SetShadow(); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot2 = new Plot\LinePlot($y2data); + +// Add the plot to the graph +$graph->Add($lineplot); +$graph->AddY2($lineplot2); +$lineplot2->SetColor("orange"); +$lineplot2->SetWeight(2); +$graph->y2axis->SetColor("orange"); + +$graph->title->Set("Example 5"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); + +$lineplot2->SetColor("orange"); +$lineplot2->SetWeight(2); + +$graph->yaxis->SetColor("blue"); + +$lineplot->SetLegend("Plot 1"); +$lineplot2->SetLegend("Plot 2"); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example5.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example5.php new file mode 100644 index 0000000000..9ac848d87f --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example5.php @@ -0,0 +1,44 @@ +img->SetMargin(40, 40, 20, 40); +$graph->SetScale("textlin"); +$graph->SetY2Scale("lin"); +$graph->SetShadow(); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot2 = new Plot\LinePlot($y2data); + +// Add the plot to the graph +$graph->Add($lineplot); +$graph->AddY2($lineplot2); +$lineplot2->SetColor("orange"); +$lineplot2->SetWeight(2); +$graph->y2axis->SetColor("orange"); + +$graph->title->Set("Example 5"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); + +$lineplot2->SetColor("orange"); +$lineplot2->SetWeight(2); + +$graph->yaxis->SetColor("blue"); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example6.1.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example6.1.php new file mode 100644 index 0000000000..5eaae25493 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example6.1.php @@ -0,0 +1,55 @@ +SetScale("textlin"); +$graph->SetY2Scale("lin"); +$graph->SetShadow(); + +// Adjust the margin +$graph->img->SetMargin(40, 40, 20, 70); + +// Create the two linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot2 = new Plot\LinePlot($y2data); + +// Add the plot to the graph +$graph->Add($lineplot); +$graph->AddY2($lineplot2); +$lineplot2->SetColor("orange"); +$lineplot2->SetWeight(2); + +// Adjust the axis color +$graph->y2axis->SetColor("orange"); +$graph->yaxis->SetColor("blue"); + +$graph->title->Set("Example 6.1"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +// Set the colors for the plots +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); +$lineplot2->SetColor("orange"); +$lineplot2->SetWeight(2); + +// Set the legends for the plots +$lineplot->SetLegend("Plot 1"); +$lineplot2->SetLegend("Plot 2"); + +// Adjust the legend position +$graph->legend->SetLayout(LEGEND_HOR); +$graph->legend->Pos(0.4, 0.95, "center", "bottom"); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example6.2.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example6.2.php new file mode 100644 index 0000000000..bf2f329126 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example6.2.php @@ -0,0 +1,47 @@ +SetScale("textlin"); +$graph->SetShadow(); + +// Adjust the margin +$graph->img->SetMargin(40, 40, 20, 70); + +// Create the two linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot->SetStepStyle(); + +// Adjust the axis color +$graph->yaxis->SetColor("blue"); + +$graph->title->Set("Example 6.2"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +// Set the colors for the plots +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); + +// Set the legends for the plots +$lineplot->SetLegend("Plot 1"); + +// Add the plot to the graph +$graph->Add($lineplot); + +// Adjust the legend position +$graph->legend->SetLayout(LEGEND_HOR); +$graph->legend->Pos(0.4, 0.95, "center", "bottom"); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example6.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example6.php new file mode 100644 index 0000000000..e03b6c97b9 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example6.php @@ -0,0 +1,54 @@ +SetScale('textlin'); +$graph->SetY2Scale('lin'); +$graph->SetShadow(); + +// Adjust the margin +$graph->img->SetMargin(40, 140, 20, 40); + +// Create the two linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot2 = new Plot\LinePlot($y2data); + +// Add the plot to the graph +$graph->Add($lineplot); +$graph->AddY2($lineplot2); +$lineplot2->SetColor('orange'); +$lineplot2->SetWeight(2); + +// Adjust the axis color +$graph->y2axis->SetColor('orange'); +$graph->yaxis->SetColor('blue'); + +$graph->title->Set('Example 6'); +$graph->xaxis->title->Set('X-title'); +$graph->yaxis->title->Set('Y-title'); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +// Set the colors for the plots +$lineplot->SetColor('blue'); +$lineplot->SetWeight(2); +$lineplot2->SetColor('orange'); +$lineplot2->SetWeight(2); + +// Set the legends for the plots +$lineplot->SetLegend('Plot 1'); +$lineplot2->SetLegend('Plot 2'); + +// Adjust the legend position +$graph->legend->Pos(0.05, 0.5, 'right', 'center'); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example7.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example7.php new file mode 100644 index 0000000000..0fdd77997e --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example7.php @@ -0,0 +1,44 @@ +SetScale("textlin"); +$graph->SetY2Scale("log"); +$graph->SetShadow(); +$graph->img->SetMargin(40, 110, 20, 40); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot2 = new Plot\LinePlot($y2data); + +// Add the plot to the graph +$graph->Add($lineplot); +$graph->AddY2($lineplot2); +$graph->yaxis->SetColor('blue'); + +$graph->title->Set("Example 7"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); +$lineplot2->SetWeight(2); + +$lineplot->SetLegend("Plot 1"); +$lineplot2->SetLegend("Plot 2"); + +$graph->legend->Pos(0.05, 0.5, "right", "center"); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example8.1.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example8.1.php new file mode 100644 index 0000000000..50f5bfa0ae --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example8.1.php @@ -0,0 +1,57 @@ +SetScale("textlog"); +$graph->SetY2Scale("log"); + +$graph->SetShadow(); +$graph->SetMargin(40, 110, 20, 40); + +$graph->ygrid->Show(true, true); +$graph->xgrid->Show(true, false); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); + +$lineplot2 = new Plot\LinePlot($y2data); +$lineplot2->SetColor("orange"); +$lineplot2->SetWeight(2); + +$graph->yaxis->scale->ticks->SupressFirst(); + +// Add the plot to the graph +$graph->Add($lineplot); +$graph->AddY2($lineplot2); + +$graph->title->Set("Example 8"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); + +$lineplot2->SetColor("orange"); +$lineplot2->SetWeight(2); + +$graph->yaxis->SetColor("blue"); +$graph->y2axis->SetColor("orange"); + +$lineplot->SetLegend("Plot 1"); +$lineplot2->SetLegend("Plot 2"); + +$graph->legend->Pos(0.05, 0.5, "right", "center"); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example8.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example8.php new file mode 100644 index 0000000000..a5e1873d5f --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example8.php @@ -0,0 +1,48 @@ +SetScale("textlog"); +$graph->SetShadow(); +$graph->img->SetMargin(40, 110, 20, 40); + +// Show the gridlines +$graph->ygrid->Show(true, true); +$graph->xgrid->Show(true, false); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot2 = new Plot\LinePlot($y2data); + +// Add the plot to the graph +$graph->Add($lineplot); + +$graph->title->Set("Example 8"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); + +// Adjust the color of the Y axis +$graph->yaxis->SetColor("blue"); + +// Specifya a legend +$lineplot->SetLegend("Plot 1"); + +// Adjust the position of the grid box +$graph->legend->Pos(0.05, 0.5, "right", "center"); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example9.1.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example9.1.php new file mode 100644 index 0000000000..2e3895e5fb --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example9.1.php @@ -0,0 +1,49 @@ +SetScale("textlog"); + +$graph->img->SetMargin(40, 110, 20, 40); +$graph->SetShadow(); + +$graph->ygrid->Show(true, true); +$graph->xgrid->Show(true, false); + +// Specify the tick labels +$a = $gDateLocale->GetShortMonth(); +$graph->xaxis->SetTickLabels($a); +$graph->xaxis->SetTextLabelInterval(2); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); + +// Add the plot to the graph +$graph->Add($lineplot); + +$graph->title->Set("Examples 9"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); + +$graph->yaxis->SetColor("blue"); + +$lineplot->SetLegend("Plot 1"); + +$graph->legend->Pos(0.05, 0.5, "right", "center"); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example9.2.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example9.2.php new file mode 100644 index 0000000000..1a5c0a6557 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example9.2.php @@ -0,0 +1,50 @@ +SetScale("textlog"); + +$graph->img->SetMargin(40, 110, 20, 50); +$graph->SetShadow(); + +$graph->ygrid->Show(true, true); +$graph->xgrid->Show(true, false); + +// Specify the tick labels +$a = $gDateLocale->GetShortMonth(); +$graph->xaxis->SetTickLabels($a); +//$graph->xaxis->SetTextLabelInterval(2); +$graph->xaxis->SetLabelAngle(90); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); + +// Add the plot to the graph +$graph->Add($lineplot); + +$graph->title->Set("Examples 9"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); + +$graph->yaxis->SetColor("blue"); + +$lineplot->SetLegend("Plot 1"); + +$graph->legend->Pos(0.05, 0.5, "right", "center"); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/example9.php b/vendor/amenadiel/jpgraph/Examples/examples_general/example9.php new file mode 100644 index 0000000000..b4e6ef9c0d --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/example9.php @@ -0,0 +1,48 @@ +SetScale("textlog"); + +$graph->img->SetMargin(40, 110, 20, 40); +$graph->SetShadow(); + +$graph->ygrid->Show(true, true); +$graph->xgrid->Show(true, false); + +// Specify the tick labels +$a = $gDateLocale->GetShortMonth(); +$graph->xaxis->SetTickLabels($a); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); + +// Add the plot to the graph +$graph->Add($lineplot); + +$graph->title->Set("Examples 9"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); + +$graph->yaxis->SetColor("blue"); + +$lineplot->SetLegend("Plot 1"); + +$graph->legend->Pos(0.05, 0.5, "right", "center"); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_general/exampleex9.php b/vendor/amenadiel/jpgraph/Examples/examples_general/exampleex9.php new file mode 100644 index 0000000000..9700260ea1 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_general/exampleex9.php @@ -0,0 +1,62 @@ +SetScale("textlog"); + +$graph->img->SetMargin(40, 110, 20, 40); + +$graph->SetY2Scale("log"); +$graph->SetShadow(); + +$graph->ygrid->Show(true, true); +$graph->xgrid->Show(true, false); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot2 = new Plot\LinePlot($y2data); + +$graph->yaxis->scale->ticks->SupressFirst(); +$graph->y2axis->scale->ticks->SupressFirst(); +// Add the plot to the graph +$graph->Add($lineplot); +$graph->AddY2($lineplot2); +$lineplot2->SetColor("orange"); +$lineplot2->SetWeight(2); +$graph->y2axis->SetColor("orange"); + +$graph->title->Set("Examples 9"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); + +$lineplot2->SetColor("orange"); +$lineplot2->SetWeight(2); + +$graph->yaxis->SetColor("blue"); + +$lineplot->SetLegend("Plot 1"); +$lineplot2->SetLegend("Plot 2"); + +$graph->legend->Pos(0.05, 0.5, "right", "center"); + +$graph->xaxis->SetTickLabels($datax); +$graph->xaxis->SetTextTickInterval(2); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_img/bkgimgflagex1.php b/vendor/amenadiel/jpgraph/Examples/examples_img/bkgimgflagex1.php new file mode 100644 index 0000000000..122f2b89e3 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_img/bkgimgflagex1.php @@ -0,0 +1,77 @@ +SetScale('textlin'); +$graph->SetMargin(40, 20, 20, 40); +$graph->SetMarginColor('white:0.9'); +$graph->SetColor('white'); +$graph->SetShadow(); + +// Adjust the position of the legend box +$graph->legend->Pos(0.03, 0.10); + +// Adjust the color for theshadow of the legend +$graph->legend->SetShadow('darkgray@0.5'); +$graph->legend->SetFillColor('lightblue@0.1'); +$graph->legend->Hide(); + +// Get localised version of the month names +$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth()); +$graph->SetBackgroundCountryFlag('mais', BGIMG_COPY, 50); + +// Set axis titles and fonts +$graph->xaxis->title->Set('Year 2002'); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetColor('white'); + +$graph->xaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->SetColor('navy'); + +$graph->yaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->SetColor('navy'); + +//$graph->ygrid->Show(false); +$graph->ygrid->SetColor('white@0.5'); + +// Setup graph title +$graph->title->Set('Using a country flag background'); + +// Some extra margin (from the top) +$graph->title->SetMargin(3); +$graph->title->SetFont(FF_ARIAL, FS_NORMAL, 12); + +// Create the three var series we will combine +$bplot1 = new Plot\BarPlot($datay1); +$bplot2 = new Plot\BarPlot($datay2); +$bplot3 = new Plot\BarPlot($datay3); + +// Setup the colors with 40% transparency (alpha channel) +$bplot1->SetFillColor('yellow@0.4'); +$bplot2->SetFillColor('red@0.4'); +$bplot3->SetFillColor('darkgreen@0.4'); + +// Setup legends +$bplot1->SetLegend('Label 1'); +$bplot2->SetLegend('Label 2'); +$bplot3->SetLegend('Label 3'); + +// Setup each bar with a shadow of 50% transparency +$bplot1->SetShadow('black@0.4'); +$bplot2->SetShadow('black@0.4'); +$bplot3->SetShadow('black@0.4'); + +$gbarplot = new Plot\GroupBarPlot(array($bplot1, $bplot2, $bplot3)); +$gbarplot->SetWidth(0.6); +$graph->Add($gbarplot); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_img/bkgimgflagex2.php b/vendor/amenadiel/jpgraph/Examples/examples_img/bkgimgflagex2.php new file mode 100644 index 0000000000..06d046b0d4 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_img/bkgimgflagex2.php @@ -0,0 +1,81 @@ +SetScale("textlin"); +$graph->SetMargin(40, 20, 20, 40); +$graph->SetMarginColor('white:0.9'); +$graph->SetColor('white'); +$graph->SetShadow(); + +// Apply a perspective transformation at the end +$graph->Set3DPerspective(SKEW3D_UP, 100, 180); + +// Adjust the position of the legend box +$graph->legend->Pos(0.03, 0.10); + +// Adjust the color for theshadow of the legend +$graph->legend->SetShadow('darkgray@0.5'); +$graph->legend->SetFillColor('lightblue@0.1'); +$graph->legend->Hide(); + +// Get localised version of the month names +$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth()); + +$graph->SetBackgroundCountryFlag('mais', BGIMG_COPY, 50); + +// Set axis titles and fonts +$graph->xaxis->title->Set('Year 2002'); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetColor('white'); + +$graph->xaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->SetColor('navy'); + +$graph->yaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->SetColor('navy'); + +//$graph->ygrid->Show(false); +$graph->ygrid->SetColor('white@0.5'); + +// Setup graph title +$graph->title->Set('Using a country flag background'); + +// Some extra margin (from the top) +$graph->title->SetMargin(3); +$graph->title->SetFont(FF_ARIAL, FS_NORMAL, 12); + +// Create the three var series we will combine +$bplot1 = new Plot\BarPlot($datay1); +$bplot2 = new Plot\BarPlot($datay2); +$bplot3 = new Plot\BarPlot($datay3); + +// Setup the colors with 40% transparency (alpha channel) +$bplot1->SetFillColor('yellow@0.4'); +$bplot2->SetFillColor('red@0.4'); +$bplot3->SetFillColor('darkgreen@0.4'); + +// Setup legends +$bplot1->SetLegend('Label 1'); +$bplot2->SetLegend('Label 2'); +$bplot3->SetLegend('Label 3'); + +// Setup each bar with a shadow of 50% transparency +$bplot1->SetShadow('black@0.4'); +$bplot2->SetShadow('black@0.4'); +$bplot3->SetShadow('black@0.4'); + +$gbarplot = new Plot\GroupBarPlot(array($bplot1, $bplot2, $bplot3)); +$gbarplot->SetWidth(0.6); +$graph->Add($gbarplot); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_img/bkgimgflagex3.php b/vendor/amenadiel/jpgraph/Examples/examples_img/bkgimgflagex3.php new file mode 100644 index 0000000000..9dedcd402c --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_img/bkgimgflagex3.php @@ -0,0 +1,81 @@ +SetScale("textlin"); +$graph->SetMargin(40, 20, 20, 40); +$graph->SetMarginColor('white:0.9'); +$graph->SetColor('white'); +$graph->SetShadow(); + +// Apply a perspective transformation at the end +$graph->Set3DPerspective(SKEW3D_DOWN, 100, 180); + +// Adjust the position of the legend box +$graph->legend->Pos(0.03, 0.10); + +// Adjust the color for theshadow of the legend +$graph->legend->SetShadow('darkgray@0.5'); +$graph->legend->SetFillColor('lightblue@0.1'); +$graph->legend->Hide(); + +// Get localised version of the month names +$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth()); + +$graph->SetBackgroundCountryFlag('mais', BGIMG_COPY, 50); + +// Set axis titles and fonts +$graph->xaxis->title->Set('Year 2002'); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetColor('white'); + +$graph->xaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->SetColor('navy'); + +$graph->yaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->SetColor('navy'); + +//$graph->ygrid->Show(false); +$graph->ygrid->SetColor('white@0.5'); + +// Setup graph title +$graph->title->Set('Using a country flag background'); + +// Some extra margin (from the top) +$graph->title->SetMargin(3); +$graph->title->SetFont(FF_ARIAL, FS_NORMAL, 12); + +// Create the three var series we will combine +$bplot1 = new Plot\BarPlot($datay1); +$bplot2 = new Plot\BarPlot($datay2); +$bplot3 = new Plot\BarPlot($datay3); + +// Setup the colors with 40% transparency (alpha channel) +$bplot1->SetFillColor('yellow@0.4'); +$bplot2->SetFillColor('red@0.4'); +$bplot3->SetFillColor('darkgreen@0.4'); + +// Setup legends +$bplot1->SetLegend('Label 1'); +$bplot2->SetLegend('Label 2'); +$bplot3->SetLegend('Label 3'); + +// Setup each bar with a shadow of 50% transparency +$bplot1->SetShadow('black@0.4'); +$bplot2->SetShadow('black@0.4'); +$bplot3->SetShadow('black@0.4'); + +$gbarplot = new Plot\GroupBarPlot(array($bplot1, $bplot2, $bplot3)); +$gbarplot->SetWidth(0.6); +$graph->Add($gbarplot); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_img/bkgimgflagex4.php b/vendor/amenadiel/jpgraph/Examples/examples_img/bkgimgflagex4.php new file mode 100644 index 0000000000..86608898e3 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_img/bkgimgflagex4.php @@ -0,0 +1,81 @@ +SetScale("textlin"); +$graph->SetMargin(40, 20, 20, 40); +$graph->SetMarginColor('white:0.9'); +$graph->SetColor('white'); +$graph->SetShadow(); + +// Apply a perspective transformation at the end +$graph->Set3DPerspective(SKEW3D_LEFT, 350, 320, true); + +// Adjust the position of the legend box +$graph->legend->Pos(0.03, 0.10); + +// Adjust the color for theshadow of the legend +$graph->legend->SetShadow('darkgray@0.5'); +$graph->legend->SetFillColor('lightblue@0.1'); +$graph->legend->Hide(); + +// Get localised version of the month names +$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth()); + +$graph->SetBackgroundCountryFlag('mais', BGIMG_COPY, 50); + +// Set axis titles and fonts +$graph->xaxis->title->Set('Year 2002'); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetColor('white'); + +$graph->xaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->SetColor('navy'); + +$graph->yaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->SetColor('navy'); + +//$graph->ygrid->Show(false); +$graph->ygrid->SetColor('white@0.5'); + +// Setup graph title +$graph->title->Set('Using a country flag background'); + +// Some extra margin (from the top) +$graph->title->SetMargin(3); +$graph->title->SetFont(FF_ARIAL, FS_NORMAL, 12); + +// Create the three var series we will combine +$bplot1 = new Plot\BarPlot($datay1); +$bplot2 = new Plot\BarPlot($datay2); +$bplot3 = new Plot\BarPlot($datay3); + +// Setup the colors with 40% transparency (alpha channel) +$bplot1->SetFillColor('yellow@0.4'); +$bplot2->SetFillColor('red@0.4'); +$bplot3->SetFillColor('darkgreen@0.4'); + +// Setup legends +$bplot1->SetLegend('Label 1'); +$bplot2->SetLegend('Label 2'); +$bplot3->SetLegend('Label 3'); + +// Setup each bar with a shadow of 50% transparency +$bplot1->SetShadow('black@0.4'); +$bplot2->SetShadow('black@0.4'); +$bplot3->SetShadow('black@0.4'); + +$gbarplot = new Plot\GroupBarPlot(array($bplot1, $bplot2, $bplot3)); +$gbarplot->SetWidth(0.6); +$graph->Add($gbarplot); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_img/bkgimgflagex5.php b/vendor/amenadiel/jpgraph/Examples/examples_img/bkgimgflagex5.php new file mode 100644 index 0000000000..3e357167a2 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_img/bkgimgflagex5.php @@ -0,0 +1,81 @@ +SetScale("textlin"); +$graph->SetMargin(40, 20, 20, 40); +$graph->SetMarginColor('white:0.9'); +$graph->SetColor('white'); +$graph->SetShadow(); + +// Apply a perspective transformation at the end +$graph->Set3DPerspective(SKEW3D_RIGHT, 350, 320, true); + +// Adjust the position of the legend box +$graph->legend->Pos(0.03, 0.10); + +// Adjust the color for theshadow of the legend +$graph->legend->SetShadow('darkgray@0.5'); +$graph->legend->SetFillColor('lightblue@0.1'); +$graph->legend->Hide(); + +// Get localised version of the month names +$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth()); + +$graph->SetBackgroundCountryFlag('mais', BGIMG_COPY, 50); + +// Set axis titles and fonts +$graph->xaxis->title->Set('Year 2002'); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetColor('white'); + +$graph->xaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->SetColor('navy'); + +$graph->yaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->SetColor('navy'); + +//$graph->ygrid->Show(false); +$graph->ygrid->SetColor('white@0.5'); + +// Setup graph title +$graph->title->Set('Using a country flag background'); + +// Some extra margin (from the top) +$graph->title->SetMargin(3); +$graph->title->SetFont(FF_ARIAL, FS_NORMAL, 12); + +// Create the three var series we will combine +$bplot1 = new Plot\BarPlot($datay1); +$bplot2 = new Plot\BarPlot($datay2); +$bplot3 = new Plot\BarPlot($datay3); + +// Setup the colors with 40% transparency (alpha channel) +$bplot1->SetFillColor('yellow@0.4'); +$bplot2->SetFillColor('red@0.4'); +$bplot3->SetFillColor('darkgreen@0.4'); + +// Setup legends +$bplot1->SetLegend('Label 1'); +$bplot2->SetLegend('Label 2'); +$bplot3->SetLegend('Label 3'); + +// Setup each bar with a shadow of 50% transparency +$bplot1->SetShadow('black@0.4'); +$bplot2->SetShadow('black@0.4'); +$bplot3->SetShadow('black@0.4'); + +$gbarplot = new Plot\GroupBarPlot(array($bplot1, $bplot2, $bplot3)); +$gbarplot->SetWidth(0.6); +$graph->Add($gbarplot); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_img/imgmarkercsimex1.php b/vendor/amenadiel/jpgraph/Examples/examples_img/imgmarkercsimex1.php new file mode 100644 index 0000000000..4ef9f3080c --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_img/imgmarkercsimex1.php @@ -0,0 +1,51 @@ +SetMarginColor('white'); +$graph->SetScale("textlin"); +$graph->SetFrame(false); +$graph->SetMargin(30, 5, 25, 20); + +// Setup the tab +$graph->tabtitle->Set(' Year 2003 '); +$graph->tabtitle->SetFont(FF_ARIAL, FS_BOLD, 13); +$graph->tabtitle->SetColor('darkred', '#E1E1FF'); + +// Enable X-grid as well +$graph->xgrid->Show(); + +// Use months as X-labels +$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth()); + +// Create the plot +$p1 = new Plot\LinePlot($datay1); +$p1->SetColor("navy"); + +$p1->SetCSIMTargets(array('#1', '#2', '#3', '#4', '#5')); + +// Use an image of favourite car as +$p1->mark->SetType(MARK_IMG, 'saab_95.jpg', 0.5); +//$p1->mark->SetType(MARK_SQUARE); + +// Displayes value on top of marker image +$p1->value->SetFormat('%d mil'); +$p1->value->Show(); +$p1->value->SetColor('darkred'); +$p1->value->SetFont(FF_ARIAL, FS_BOLD, 10); +// Increase the margin so that the value is printed avove tje +// img marker +$p1->value->SetMargin(14); + +// Incent the X-scale so the first and last point doesn't +// fall on the edges +$p1->SetCenter(); + +$graph->Add($p1); + +$graph->StrokeCSIM(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_img/imgmarkerex1.php b/vendor/amenadiel/jpgraph/Examples/examples_img/imgmarkerex1.php new file mode 100644 index 0000000000..1be8648869 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_img/imgmarkerex1.php @@ -0,0 +1,48 @@ +SetMarginColor('white'); +$graph->SetScale("textlin"); +$graph->SetFrame(false); +$graph->SetMargin(30, 5, 25, 20); + +// Setup the tab +$graph->tabtitle->Set(' Year 2003 '); +$graph->tabtitle->SetFont(FF_ARIAL, FS_BOLD, 13); +$graph->tabtitle->SetColor('darkred', '#E1E1FF'); + +// Enable X-grid as well +$graph->xgrid->Show(); + +// Use months as X-labels +$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth()); + +// Create the plot +$p1 = new Plot\LinePlot($datay1); +$p1->SetColor("navy"); + +// Use an image of favourite car as marker +$p1->mark->SetType(MARK_IMG, 'saab_95.jpg', 0.5); + +// Displayes value on top of marker image +$p1->value->SetFormat('%d mil'); +$p1->value->Show(); +$p1->value->SetColor('darkred'); +$p1->value->SetFont(FF_ARIAL, FS_BOLD, 10); +// Increase the margin so that the value is printed avove tje +// img marker +$p1->value->SetMargin(14); + +// Incent the X-scale so the first and last point doesn't +// fall on the edges +$p1->SetCenter(); + +$graph->Add($p1); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/new_pie1.php b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/new_pie1.php new file mode 100644 index 0000000000..c7187fbad9 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/new_pie1.php @@ -0,0 +1,25 @@ +SetTheme(new $theme_class()); + +// Set A title for the plot +$graph->title->Set("A Simple Pie Plot"); +$graph->SetBox(true); + +// Create +$p1 = new \PiePlot($data); +$graph->Add($p1); + +$p1->ShowBorder(); +$p1->SetColor('black'); +$p1->SetSliceColors(array('#1E90FF', '#2E8B57', '#ADFF2F', '#DC143C', '#BA55D3')); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/new_pie2.php b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/new_pie2.php new file mode 100644 index 0000000000..7d137197cc --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/new_pie2.php @@ -0,0 +1,53 @@ +SetShadow(); + +$theme_class = new UniversalTheme; +//$graph->SetTheme($theme_class); + +// Set A title for the plot +$graph->title->Set("Multiple - Pie plot"); + +// Create plots +$size = 0.13; +$p1 = new \PiePlot($data); +$graph->Add($p1); + +$p1->SetSize($size); +$p1->SetCenter(0.25, 0.32); +$p1->SetSliceColors(array('#1E90FF', '#2E8B57', '#ADFF2F', '#DC143C', '#BA55D3')); +$p1->title->Set("2005"); + +$p2 = new \PiePlot($data); +$graph->Add($p2); + +$p2->SetSize($size); +$p2->SetCenter(0.65, 0.32); +$p2->SetSliceColors(array('#1E90FF', '#2E8B57', '#ADFF2F', '#DC143C', '#BA55D3')); +$p2->title->Set("2006"); + +$p3 = new \PiePlot($data); +$graph->Add($p3); + +$p3->SetSize($size); +$p3->SetCenter(0.25, 0.75); +$p3->SetSliceColors(array('#6495ED', '#2E8B57', '#ADFF2F', '#DC143C', '#BA55D3')); +$p3->title->Set("2007"); + +$p4 = new \PiePlot($data); +$graph->Add($p4); + +$p4->SetSize($size); +$p4->SetCenter(0.65, 0.75); +$p4->SetSliceColors(array('#6495ED', '#2E8B57', '#ADFF2F', '#DC143C', '#BA55D3')); +$p4->title->Set("2008"); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/new_pie3.php b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/new_pie3.php new file mode 100644 index 0000000000..c30059ebfb --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/new_pie3.php @@ -0,0 +1,27 @@ +SetTheme($theme_class); + +// Set A title for the plot +$graph->title->Set("A Simple 3D Pie Plot"); + +// Create +$p1 = new \PiePlot3D($data); +$graph->Add($p1); + +$p1->ShowBorder(); +$p1->SetColor('black'); +$p1->SetSliceColors(array('#1E90FF', '#2E8B57', '#ADFF2F', '#BA55D3')); +$p1->ExplodeSlice(1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/new_pie4.php b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/new_pie4.php new file mode 100644 index 0000000000..744d430a67 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/new_pie4.php @@ -0,0 +1,64 @@ +SetTheme(new $theme_class()); + +// Setup background +$graph->SetBackgroundImage('worldmap1.jpg', BGIMG_FILLFRAME); + +// Setup title +$graph->title->Set("Pie plots with background image"); +$graph->title->SetColor('white'); +$graph->SetTitleBackground('#4169E1', TITLEBKG_STYLE2, TITLEBKG_FRAME_FULL, '#4169E1', 10, 10, true); + +$p = array(); +// Create the plots +for ($i = 0; $i < $n; ++$i) { + $p[] = new \PiePlot3D($data); +} +for ($i = 0; $i < $n; ++$i) { + $graph->Add($p[$i]); +} + +// Position the four pies and change color +for ($i = 0; $i < $n; ++$i) { + $p[$i]->SetCenter($piepos[2 * $i], $piepos[2 * $i + 1]); + $p[$i]->SetSliceColors(array('#1E90FF', '#2E8B57', '#ADFF2F', '#DC143C', '#BA55D3')); +} + +// Set the titles +for ($i = 0; $i < $n; ++$i) { + $p[$i]->title->Set($titles[$i]); + $p[$i]->title->SetFont(FF_ARIAL, FS_NORMAL, 8); +} + +for ($i = 0; $i < $n; ++$i) { + $p[$i]->value->Show(false); +} + +// Size of pie in fraction of the width of the graph +for ($i = 0; $i < $n; ++$i) { + $p[$i]->SetSize(0.13); +} + +for ($i = 0; $i < $n; ++$i) { + $p[$i]->SetEdge(false); + $p[$i]->ExplodeSlice(1, 7); +} + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pie3d_csimex1.php b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pie3d_csimex1.php new file mode 100644 index 0000000000..b1ee5be710 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pie3d_csimex1.php @@ -0,0 +1,39 @@ +SetShadow(); + +// Set A title for the plot +$graph->title->Set("3D Pie Client side image map"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Create +$p1 = new \PiePlot3D($data); +$p1->SetLegends(array("Jan (%d)", "Feb", "Mar", "Apr", "May", "Jun", "Jul")); +$targ = array("pie3d_csimex1.php?v=1", "pie3d_csimex1.php?v=2", "pie3d_csimex1.php?v=3", + "pie3d_csimex1.php?v=4", "pie3d_csimex1.php?v=5", "pie3d_csimex1.php?v=6"); +$alts = array("val=%d", "val=%d", "val=%d", "val=%d", "val=%d", "val=%d"); +$p1->SetCSIMTargets($targ, $alts); + +// Use absolute labels +$p1->SetLabelType(1); +$p1->value->SetFormat("%d kr"); + +// Move the pie slightly to the left +$p1->SetCenter(0.4, 0.5); + +$graph->Add($p1); + +// Send back the HTML page which will call this script again +// to retrieve the image. +$graph->StrokeCSIM(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pie3dex1.php b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pie3dex1.php new file mode 100644 index 0000000000..22116eb66f --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pie3dex1.php @@ -0,0 +1,29 @@ +SetShadow(); + +// Set A title for the plot +$graph->title->Set("Example 1 3D Pie plot"); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 18); +$graph->title->SetColor("darkblue"); +$graph->legend->Pos(0.1, 0.2); + +// Create pie plot +$p1 = new \PiePlot3D($data); +$p1->SetTheme("sand"); +$p1->SetCenter(0.4); +$p1->SetAngle(30); +$p1->value->SetFont(FF_ARIAL, FS_NORMAL, 12); +$p1->SetLegends(array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct")); + +$graph->Add($p1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pie3dex2.php b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pie3dex2.php new file mode 100644 index 0000000000..7c53b447a3 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pie3dex2.php @@ -0,0 +1,41 @@ +SetShadow(); + +// Set A title for the plot +$graph->title->Set("Example 2 3D Pie plot"); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 18); +$graph->title->SetColor("darkblue"); +$graph->legend->Pos(0.1, 0.2); + +// Create 3D pie plot +$p1 = new \PiePlot3D($data); +$p1->SetTheme("sand"); +$p1->SetCenter(0.4); +$p1->SetSize(0.4); +$p1->SetHeight(5); + +// Adjust projection angle +$p1->SetAngle(45); + +// You can explode several slices by specifying the explode +// distance for some slices in an array +$p1->Explode(array(0, 40, 0, 30)); + +// As a shortcut you can easily explode one numbered slice with +// $p1->ExplodeSlice(3); + +$p1->value->SetFont(FF_ARIAL, FS_NORMAL, 10); +$p1->SetLegends(array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct")); + +$graph->Add($p1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pie3dex3.php b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pie3dex3.php new file mode 100644 index 0000000000..6c5a3bd8fb --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pie3dex3.php @@ -0,0 +1,39 @@ +SetShadow(); + +// Set A title for the plot +$graph->title->Set("Example 3 3D Pie plot"); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 18); +$graph->title->SetColor("darkblue"); +$graph->legend->Pos(0.1, 0.2); + +// Create 3D pie plot +$p1 = new \PiePlot3D($data); +$p1->SetTheme("sand"); +$p1->SetCenter(0.4); +$p1->SetSize(80); + +// Adjust projection angle +$p1->SetAngle(45); + +// As a shortcut you can easily explode one numbered slice with +$p1->ExplodeSlice(3); + +// Setup the slice values +$p1->value->SetFont(FF_ARIAL, FS_BOLD, 11); +$p1->value->SetColor("navy"); + +$p1->SetLegends(array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct")); + +$graph->Add($p1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pie3dex4.php b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pie3dex4.php new file mode 100644 index 0000000000..ff0f220cfb --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pie3dex4.php @@ -0,0 +1,42 @@ +SetShadow(); + +// Set A title for the plot +$graph->title->Set("Example 4 3D Pie plot"); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 18); +$graph->title->SetColor("darkblue"); +$graph->legend->Pos(0.1, 0.2); + +// Create 3D pie plot +$p1 = new \PiePlot3D($data); +$p1->SetTheme("sand"); +$p1->SetCenter(0.4); +$p1->SetSize(80); + +// Adjust projection angle +$p1->SetAngle(45); + +// Adjsut angle for first slice +$p1->SetStartAngle(45); + +// As a shortcut you can easily explode one numbered slice with +$p1->ExplodeSlice(3); + +// Setup slice values +$p1->value->SetFont(FF_ARIAL, FS_BOLD, 11); +$p1->value->SetColor("navy"); + +$p1->SetLegends(array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct")); + +$graph->Add($p1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pie3dex5.php b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pie3dex5.php new file mode 100644 index 0000000000..c63c3f64d4 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pie3dex5.php @@ -0,0 +1,43 @@ +SetShadow(); + +// Set A title for the plot +$graph->title->Set("Example 5 3D Pie plot"); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 18); +$graph->title->SetColor("darkblue"); +$graph->legend->Pos(0.1, 0.2); + +// Create 3D pie plot +$p1 = new \PiePlot3D($data); +$p1->SetTheme("sand"); +$p1->SetCenter(0.4); +$p1->SetSize(80); + +// Adjust projection angle +$p1->SetAngle(45); + +// Adjsut angle for first slice +$p1->SetStartAngle(45); + +// Display the slice values +$p1->value->SetFont(FF_ARIAL, FS_BOLD, 11); +$p1->value->SetColor("navy"); + +// Add colored edges to the 3D pie +// NOTE: You can't have exploded slices with edges! +$p1->SetEdge("navy"); + +$p1->SetLegends(array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct")); + +$graph->Add($p1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pie_csimex1.php b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pie_csimex1.php new file mode 100644 index 0000000000..be420f087b --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pie_csimex1.php @@ -0,0 +1,31 @@ +SetShadow(); + +// Set A title for the plot +$graph->title->Set("Client side image map"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Create +$p1 = new \PiePlot($data); +$p1->SetCenter(0.4, 0.5); + +$p1->SetLegends(array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul")); +$targ = array("pie_csimex1.php#1", "pie_csimex1.php#2", "pie_csimex1.php#3", + "pie_csimex1.php#4", "pie_csimex1.php#5", "pie_csimex1.php#6"); +$alts = array("val=%d", "val=%d", "val=%d", "val=%d", "val=%d", "val=%d"); +$p1->SetCSIMTargets($targ, $alts); + +$graph->Add($p1); + +// Send back the HTML page which will call this script again +// to retrieve the image. +$graph->StrokeCSIM(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/piebkgex1.php b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/piebkgex1.php new file mode 100644 index 0000000000..b9b62e6c58 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/piebkgex1.php @@ -0,0 +1,89 @@ +SetMargin(1, 1, 40, 1); +$graph->SetMarginColor('navy'); +$graph->SetShadow(false); + +// Setup background +$graph->SetBackgroundImage('worldmap1.jpg', BGIMG_FILLPLOT); + +// Setup title +$graph->title->Set("Pie plots with background image"); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 20); +$graph->title->SetColor('white'); + +$p = array(); +// Create the plots +for ($i = 0; $i < $n; ++$i) { + $d = "data$i"; + $p[] = new \PiePlot3D($data[$i]); +} + +// Position the four pies +for ($i = 0; $i < $n; ++$i) { + $p[$i]->SetCenter($piepos[2 * $i], $piepos[2 * $i + 1]); +} + +// Set the titles +for ($i = 0; $i < $n; ++$i) { + $p[$i]->title->Set($titles[$i]); + $p[$i]->title->SetColor('white'); + $p[$i]->title->SetFont(FF_ARIAL, FS_BOLD, 12); +} + +// Label font and color setup +for ($i = 0; $i < $n; ++$i) { + $p[$i]->value->SetFont(FF_ARIAL, FS_BOLD); + $p[$i]->value->SetColor('white'); +} + +// Show the percetages for each slice +for ($i = 0; $i < $n; ++$i) { + $p[$i]->value->Show(); +} + +// Label format +for ($i = 0; $i < $n; ++$i) { + $p[$i]->value->SetFormat("%01.1f%%"); +} + +// Size of pie in fraction of the width of the graph +for ($i = 0; $i < $n; ++$i) { + $p[$i]->SetSize(0.15); +} + +// Format the border around each slice + +for ($i = 0; $i < $n; ++$i) { + $p[$i]->SetEdge(false); + $p[$i]->ExplodeSlice(1); +} + +// Use one legend for the whole graph +$p[0]->SetLegends(array("May", "June", "July", "Aug")); +$graph->legend->Pos(0.05, 0.35); +$graph->legend->SetShadow(false); + +for ($i = 0; $i < $n; ++$i) { + $graph->Add($p[$i]); +} + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/piec_csimex1.php b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/piec_csimex1.php new file mode 100644 index 0000000000..6fe4a9c42f --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/piec_csimex1.php @@ -0,0 +1,83 @@ +SetFrame(false); + +// Uncomment this line to add a drop shadow to the border +// $graph->SetShadow(); + +// Setup title +$graph->title->Set("CSIM Center Pie plot ex 1"); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 18); +$graph->title->SetMargin(8); // Add a little bit more margin from the top + +// Create the pie plot +$p1 = new \PiePlotC($data); + +// Set the radius of pie (as fraction of image size) +$p1->SetSize(0.32); + +// Move the center of the pie slightly to the top of the image +$p1->SetCenter(0.5, 0.45); + +// Label font and color setup +$p1->value->SetFont(FF_ARIAL, FS_BOLD, 12); +$p1->value->SetColor('white'); + +// Setup the title on the center circle +$p1->midtitle->Set("Test mid\nRow 1\nRow 2"); +$p1->midtitle->SetFont(FF_ARIAL, FS_NORMAL, 14); + +// Set color for mid circle +$p1->SetMidColor('yellow'); + +// Use percentage values in the legends values (This is also the default) +$p1->SetLabelType(PIE_VALUE_PER); + +// The label array values may have printf() formatting in them. The argument to the +// form,at string will be the value of the slice (either the percetage or absolute +// depending on what was specified in the SetLabelType() above. +$lbl = array("adam\n%.1f%%", "bertil\n%.1f%%", "johan\n%.1f%%", + "peter\n%.1f%%", "daniel\n%.1f%%", "erik\n%.1f%%"); +$p1->SetLabels($lbl); + +// Uncomment this line to remove the borders around the slices +// $p1->ShowBorder(false); + +// Add drop shadow to slices +$p1->SetShadow(); + +// Explode all slices 15 pixels +$p1->ExplodeAll(15); + +// Setup the CSIM targets +$targ = array("piec_csimex1.php#1", "piec_csimex1.php#2", "piec_csimex1.php#3", + "piec_csimex1.php#4", "piec_csimex1.php#5", "piec_csimex1.php#6"); +$alts = array("val=%d", "val=%d", "val=%d", "val=%d", "val=%d", "val=%d"); +$p1->SetCSIMTargets($targ, $alts); +$p1->SetMidCSIM("piec_csimex1.php#7", "Center"); + +// Setup a small help text in the image +$txt = new Text("Note: This is an example of image map. Hold\nyour mouse over the slices to see the values.\nThe URL just points back to this page"); +$txt->SetFont(FF_FONT1, FS_BOLD); +$txt->SetPos(0.5, 0.97, 'center', 'bottom'); +$txt->SetBox('yellow', 'black'); +$txt->SetShadow(); +$graph->AddText($txt); + +// Add plot to pie graph +$graph->Add($p1); + +// .. and send the image on it's marry way to the browser +$graph->StrokeCSIM(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/piecex1.php b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/piecex1.php new file mode 100644 index 0000000000..dcbf5197d8 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/piecex1.php @@ -0,0 +1,43 @@ +title->Set("Pie plot with center circle"); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$graph->title->SetMargin(8); // Add a little bit more margin from the top + +// Create the pie plot +$p1 = new \PiePlotC($data); + +// Set size of pie +$p1->SetSize(0.32); + +// Label font and color setup +$p1->value->SetFont(FF_ARIAL, FS_BOLD, 10); +$p1->value->SetColor('black'); + +// Setup the title on the center circle +$p1->midtitle->Set("Test mid\nRow 1\nRow 2"); +$p1->midtitle->SetFont(FF_ARIAL, FS_NORMAL, 10); + +// Set color for mid circle +$p1->SetMidColor('yellow'); + +// Use percentage values in the legends values (This is also the default) +$p1->SetLabelType(PIE_VALUE_PER); + +// Add plot to pie graph +$graph->Add($p1); + +// .. and send the image on it's marry way to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/piecex2.php b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/piecex2.php new file mode 100644 index 0000000000..9e75c05a44 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/piecex2.php @@ -0,0 +1,67 @@ +SetFrame(false); + +// Uncomment this line to add a drop shadow to the border +// $graph->SetShadow(); + +// Setup title +$graph->title->Set("\PiePlotC"); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 18); +$graph->title->SetMargin(8); // Add a little bit more margin from the top + +// Create the pie plot +$p1 = new \PiePlotC($data); + +// Set size of pie +$p1->SetSize(0.35); + +// Label font and color setup +$p1->value->SetFont(FF_ARIAL, FS_BOLD, 12); +$p1->value->SetColor('white'); + +$p1->value->Show(); + +// Setup the title on the center circle +$p1->midtitle->Set("Test mid\nRow 1\nRow 2"); +$p1->midtitle->SetFont(FF_ARIAL, FS_NORMAL, 14); + +// Set color for mid circle +$p1->SetMidColor('yellow'); + +// Use percentage values in the legends values (This is also the default) +$p1->SetLabelType(PIE_VALUE_PER); + +// The label array values may have printf() formatting in them. The argument to the +// form,at string will be the value of the slice (either the percetage or absolute +// depending on what was specified in the SetLabelType() above. +$lbl = array("adam\n%.1f%%", "bertil\n%.1f%%", "johan\n%.1f%%", + "peter\n%.1f%%", "daniel\n%.1f%%", "erik\n%.1f%%"); +$p1->SetLabels($lbl); + +// Uncomment this line to remove the borders around the slices +// $p1->ShowBorder(false); + +// Add drop shadow to slices +$p1->SetShadow(); + +// Explode all slices 15 pixels +$p1->ExplodeAll(15); + +// Add plot to pie graph +$graph->Add($p1); + +// .. and send the image on it's marry way to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pieex1.php b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pieex1.php new file mode 100644 index 0000000000..f600c90117 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pieex1.php @@ -0,0 +1,28 @@ +SetShadow(); + +// Set A title for the plot +$graph->title->Set("Example 1 Pie plot"); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 14); +$graph->title->SetColor("brown"); + +// Create pie plot +$p1 = new \PiePlot($data); +//$p1->SetSliceColors(array("red","blue","yellow","green")); +$p1->SetTheme("earth"); + +$p1->value->SetFont(FF_ARIAL, FS_NORMAL, 10); +// Set how many pixels each slice should explode +$p1->Explode(array(0, 15, 15, 25, 15)); + +$graph->Add($p1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pieex2.php b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pieex2.php new file mode 100644 index 0000000000..2794f1fd4a --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pieex2.php @@ -0,0 +1,21 @@ +SetShadow(); + +// Set A title for the plot +$graph->title->Set("Example 2 Pie plot"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Create +$p1 = new \PiePlot($data); +$p1->SetLegends(array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul")); +$graph->Add($p1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pieex3.php b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pieex3.php new file mode 100644 index 0000000000..70fb17a83e --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pieex3.php @@ -0,0 +1,49 @@ +SetShadow(); + +// Set A title for the plot +$graph->title->Set("Multiple - Pie plot"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Create plots +$size = 0.13; +$p1 = new \PiePlot($data); +$p1->SetLegends(array("Jan", "Feb", "Mar", "Apr", "May")); +$p1->SetSize($size); +$p1->SetCenter(0.25, 0.32); +$p1->value->SetFont(FF_FONT0); +$p1->title->Set("2001"); + +$p2 = new \PiePlot($data); +$p2->SetSize($size); +$p2->SetCenter(0.65, 0.32); +$p2->value->SetFont(FF_FONT0); +$p2->title->Set("2002"); + +$p3 = new \PiePlot($data); +$p3->SetSize($size); +$p3->SetCenter(0.25, 0.75); +$p3->value->SetFont(FF_FONT0); +$p3->title->Set("2003"); + +$p4 = new \PiePlot($data); +$p4->SetSize($size); +$p4->SetCenter(0.65, 0.75); +$p4->value->SetFont(FF_FONT0); +$p4->title->Set("2004"); + +$graph->Add($p1); +$graph->Add($p2); +$graph->Add($p3); +$graph->Add($p4); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pieex4.php b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pieex4.php new file mode 100644 index 0000000000..2f6981b1ae --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pieex4.php @@ -0,0 +1,22 @@ +SetShadow(); + +$graph->title->Set("Example 4 of pie plot"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +$p1 = new \PiePlot($data); +$p1->value->SetFont(FF_FONT1, FS_BOLD); +$p1->value->SetColor("darkred"); +$p1->SetSize(0.3); +$p1->SetCenter(0.4); +$p1->SetLegends(array("Jan", "Feb", "Mar", "Apr", "May")); +$graph->Add($p1); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pieex5.php b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pieex5.php new file mode 100644 index 0000000000..5996a1b408 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pieex5.php @@ -0,0 +1,28 @@ +SetShadow(); + +// Setup graph title +$graph->title->Set("Example 5 of pie plot"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Create pie plot +$p1 = new \PiePlot($data); +$p1->value->SetFont(FF_VERDANA, FS_BOLD); +$p1->value->SetColor("darkred"); +$p1->SetSize(0.3); +$p1->SetCenter(0.4); +$p1->SetLegends(array("Jan", "Feb", "Mar", "Apr", "May")); +//$p1->SetStartAngle(M_PI/8); +$p1->ExplodeSlice(3); + +$graph->Add($p1); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pieex6.php b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pieex6.php new file mode 100644 index 0000000000..9174812914 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pieex6.php @@ -0,0 +1,46 @@ +SetShadow(); + +// Setup title +$graph->title->Set("Example of pie plot with absolute labels"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// The pie plot +$p1 = new \PiePlot($data); + +// Move center of pie to the left to make better room +// for the legend +$p1->SetCenter(0.35, 0.5); + +// No border +$p1->ShowBorder(false); + +// Label font and color setup +$p1->value->SetFont(FF_FONT1, FS_BOLD); +$p1->value->SetColor("darkred"); + +// Use absolute values (type==1) +$p1->SetLabelType(PIE_VALUE_ABS); + +// Label format +$p1->value->SetFormat("$%d"); +$p1->value->Show(); + +// Size of pie in fraction of the width of the graph +$p1->SetSize(0.3); + +// Legends +$p1->SetLegends(array("May ($%d)", "June ($%d)", "July ($%d)", "Aug ($%d)")); +$graph->legend->Pos(0.05, 0.15); + +$graph->Add($p1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pieex7.php b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pieex7.php new file mode 100644 index 0000000000..16e8bbc27c --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pieex7.php @@ -0,0 +1,49 @@ +SetShadow(); + +// Setup title +$graph->title->Set("Pie plot with absolute labels"); +$graph->subtitle->Set('(With hidden 0 labels)'); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// The pie plot +$p1 = new \PiePlot($data); + +// Move center of pie to the left to make better room +// for the legend +$p1->SetCenter(0.35, 0.5); + +// No border +$p1->ShowBorder(false); + +// Label font and color setup +$p1->value->SetFont(FF_FONT1, FS_BOLD); +$p1->value->SetColor("darkred"); + +// Use absolute values (type==1) +$p1->SetLabelType(PIE_VALUE_ABS); + +// Label format +$p1->value->SetFormat("$%d"); +$p1->value->HideZero(); +$p1->value->Show(); + +// Size of pie in fraction of the width of the graph +$p1->SetSize(0.3); + +// Legends +$p1->SetLegends(array("May ($%d)", "June ($%d)", "July ($%d)", "Aug ($%d)")); +$graph->legend->Pos(0.05, 0.2); + +$graph->Add($p1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pieex8.php b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pieex8.php new file mode 100644 index 0000000000..98a8056625 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pieex8.php @@ -0,0 +1,32 @@ +SetShadow(); + +// Title setup +$graph->title->Set("Adjusting the label pos"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Setup the pie plot +$p1 = new \PiePlot($data); + +// Adjust size and position of plot +$p1->SetSize(0.4); +$p1->SetCenter(0.5, 0.52); + +// Setup slice labels and move them into the plot +$p1->value->SetFont(FF_FONT1, FS_BOLD); +$p1->value->SetColor("darkred"); +$p1->SetLabelPos(0.6); + +// Finally add the plot +$graph->Add($p1); + +// ... and stroke it +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pieex9.php b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pieex9.php new file mode 100644 index 0000000000..d2d52c8c8e --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pieex9.php @@ -0,0 +1,38 @@ +SetShadow(); + +// Title setup +$graph->title->Set("Exploding all slices"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Setup the pie plot +$p1 = new \PiePlot($data); + +// Adjust size and position of plot +$p1->SetSize(0.35); +$p1->SetCenter(0.5, 0.52); + +// Setup slice labels and move them into the plot +$p1->value->SetFont(FF_FONT1, FS_BOLD); +$p1->value->SetColor("darkred"); +$p1->SetLabelPos(0.65); + +// Explode all slices +$p1->ExplodeAll(10); + +// Add drop shadow +$p1->SetShadow(); + +// Finally add the plot +$graph->Add($p1); + +// ... and stroke it +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pielabelsex1.php b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pielabelsex1.php new file mode 100644 index 0000000000..abe72f4af0 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pielabelsex1.php @@ -0,0 +1,34 @@ +title->Set("Label guide lines"); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +$graph->title->SetColor("darkblue"); +$graph->legend->Pos(0.1, 0.2); + +// Create pie plot +$p1 = new \PiePlot($data); +$p1->SetCenter(0.5, 0.55); +$p1->SetSize(0.3); + +// Enable and set policy for guide-lines +$p1->SetGuideLines(); +$p1->SetGuideLinesAdjust(1.4); + +// Setup the labels +$p1->SetLabelType(PIE_VALUE_PER); +$p1->value->Show(); +$p1->value->SetFont(FF_ARIAL, FS_NORMAL, 9); +$p1->value->SetFormat('%2.1f%%'); + +// Add and stroke +$graph->Add($p1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pielabelsex2.php b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pielabelsex2.php new file mode 100644 index 0000000000..a3b9c0ac78 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pielabelsex2.php @@ -0,0 +1,34 @@ +title->Set("Label guide lines"); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +$graph->title->SetColor("darkblue"); +$graph->legend->Pos(0.1, 0.2); + +// Create pie plot +$p1 = new \PiePlot($data); +$p1->SetCenter(0.5, 0.55); +$p1->SetSize(0.3); + +// Enable and set policy for guide-lines. Make labels line up vertically +$p1->SetGuideLines(true, false); +$p1->SetGuideLinesAdjust(1.5); + +// Setup the labels +$p1->SetLabelType(PIE_VALUE_PER); +$p1->value->Show(); +$p1->value->SetFont(FF_ARIAL, FS_NORMAL, 9); +$p1->value->SetFormat('%2.1f%%'); + +// Add and stroke +$graph->Add($p1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pielabelsex3.php b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pielabelsex3.php new file mode 100644 index 0000000000..b360623c0d --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pielabelsex3.php @@ -0,0 +1,35 @@ +title->Set("Label guide lines"); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +$graph->title->SetColor("darkblue"); +$graph->legend->Pos(0.1, 0.2); + +// Create pie plot +$p1 = new \PiePlot($data); +$p1->SetCenter(0.5, 0.55); +$p1->SetSize(0.3); + +// Enable and set policy for guide-lines. Make labels line up vertically +// and force guide lines to always beeing used +$p1->SetGuideLines(true, false, true); +$p1->SetGuideLinesAdjust(1.5); + +// Setup the labels +$p1->SetLabelType(PIE_VALUE_PER); +$p1->value->Show(); +$p1->value->SetFont(FF_ARIAL, FS_NORMAL, 9); +$p1->value->SetFormat('%2.1f%%'); + +// Add and stroke +$graph->Add($p1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pielabelsex4.php b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pielabelsex4.php new file mode 100644 index 0000000000..c45808c74e --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pielabelsex4.php @@ -0,0 +1,34 @@ +title->Set("Label guide lines"); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +$graph->title->SetColor("darkblue"); +$graph->legend->Pos(0.1, 0.2); + +// Create pie plot +$p1 = new \PiePlot($data); +$p1->SetCenter(0.5, 0.55); +$p1->SetSize(0.3); + +// Enable and set policy for guide-lines. Make labels line up vertically +$p1->SetGuideLines(true, false); +$p1->SetGuideLinesAdjust(1.1); + +// Setup the labels +$p1->SetLabelType(PIE_VALUE_PER); +$p1->value->Show(); +$p1->value->SetFont(FF_ARIAL, FS_NORMAL, 9); +$p1->value->SetFormat('%2.1f%%'); + +// Add and stroke +$graph->Add($p1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pielabelsex5.php b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pielabelsex5.php new file mode 100644 index 0000000000..81c5f67313 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/pielabelsex5.php @@ -0,0 +1,45 @@ +SetShadow(); + +// Set A title for the plot +$graph->title->Set('String labels with values'); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +$graph->title->SetColor('black'); + +// Create pie plot +$p1 = new \PiePlot($data); +$p1->SetCenter(0.5, 0.5); +$p1->SetSize(0.3); + +// Setup the labels to be displayed +$p1->SetLabels($labels); + +// This method adjust the position of the labels. This is given as fractions +// of the radius of the Pie. A value < 1 will put the center of the label +// inside the Pie and a value >= 1 will pout the center of the label outside the +// Pie. By default the label is positioned at 0.5, in the middle of each slice. +$p1->SetLabelPos(1); + +// Setup the label formats and what value we want to be shown (The absolute) +// or the percentage. +$p1->SetLabelType(PIE_VALUE_PER); +$p1->value->Show(); +$p1->value->SetFont(FF_ARIAL, FS_NORMAL, 9); +$p1->value->SetColor('darkgray'); + +// Add and stroke +$graph->Add($p1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/worldmap1.jpg b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/worldmap1.jpg new file mode 100644 index 0000000000..caa7c14045 Binary files /dev/null and b/vendor/amenadiel/jpgraph/Examples/examples_jpgraph_pie/worldmap1.jpg differ diff --git a/vendor/amenadiel/jpgraph/Examples/examples_led/ledex1.php b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex1.php new file mode 100644 index 0000000000..8d61f937ce --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex1.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL',LEDC_GREEN); + + + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_led/ledex10.php b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex10.php new file mode 100644 index 0000000000..3aa375f9aa --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex10.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL',LEDC_KHAKI); + + + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_led/ledex11.php b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex11.php new file mode 100644 index 0000000000..857faa0746 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex11.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL',LEDC_OLIVE); + + + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_led/ledex12.php b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex12.php new file mode 100644 index 0000000000..7756ea130a --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex12.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL',LEDC_LIMEGREEN); + + + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_led/ledex13.php b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex13.php new file mode 100644 index 0000000000..add394d3f1 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex13.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL',LEDC_FORESTGREEN); + + + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_led/ledex14.php b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex14.php new file mode 100644 index 0000000000..7a50599938 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex14.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL',LEDC_TEAL); + + + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_led/ledex15.php b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex15.php new file mode 100644 index 0000000000..6a5bb1f6f0 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex15.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL',LEDC_STEELBLUE); + + + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_led/ledex16.php b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex16.php new file mode 100644 index 0000000000..08ab73129b --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex16.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL',LEDC_NAVY); + + + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_led/ledex17.php b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex17.php new file mode 100644 index 0000000000..34f18cd1ba --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex17.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL',LEDC_INVERTGRAY); + + + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_led/ledex2.php b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex2.php new file mode 100644 index 0000000000..bd196d389b --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex2.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL',LEDC_RED); + + + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_led/ledex3.php b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex3.php new file mode 100644 index 0000000000..0d81b3d521 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex3.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL',LEDC_YELLOW); + + + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_led/ledex4.1.php b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex4.1.php new file mode 100644 index 0000000000..81a9d1ff38 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex4.1.php @@ -0,0 +1,13 @@ +SetSupersampling(2); +$led->StrokeNumber('123.',LEDC_RED); + + + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_led/ledex4.2.php b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex4.2.php new file mode 100644 index 0000000000..0a25bc029c --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex4.2.php @@ -0,0 +1,13 @@ +SetSupersampling(4); +$led->StrokeNumber('123.',LEDC_RED); + + + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_led/ledex4.php b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex4.php new file mode 100644 index 0000000000..d8782e2569 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex4.php @@ -0,0 +1,13 @@ +SetSupersampling(1); +$led->StrokeNumber('123.',LEDC_RED); + + + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_led/ledex5.php b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex5.php new file mode 100644 index 0000000000..5526063c5a --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex5.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL',LEDC_BLUE); + + + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_led/ledex6.php b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex6.php new file mode 100644 index 0000000000..eb8c03bad5 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex6.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL',LEDC_GRAY); + + + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_led/ledex7.php b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex7.php new file mode 100644 index 0000000000..da6c656b8b --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex7.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL',LEDC_CHOCOLATE); + + + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_led/ledex8.php b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex8.php new file mode 100644 index 0000000000..2075e26125 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex8.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL',LEDC_PERU); + + + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_led/ledex9.php b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex9.php new file mode 100644 index 0000000000..82837d1d76 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex9.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL',LEDC_GOLDENROD); + + + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_led/ledex_cyrillic.php b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex_cyrillic.php new file mode 100644 index 0000000000..b85f9d31cb --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex_cyrillic.php @@ -0,0 +1,27 @@ +SetSupersampling(2); +$text = 'Ð'. + 'Б'. + 'Ð’'. + 'Г'. + 'Д'. + 'Е'. + 'Ð'. + 'З'. + 'И'. + 'Й'. + 'К'. + 'Л'. + 'Ðœ'. + 'Ð'. + 'О'. + 'П'; +$led->StrokeNumber($text, LEDC_RED); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_led/ledex_cyrillic2.php b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex_cyrillic2.php new file mode 100644 index 0000000000..fb0071440a --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_led/ledex_cyrillic2.php @@ -0,0 +1,27 @@ +SetSupersampling(2); +$text = 'Р'. + 'С'. + 'Т'. + 'У'. + 'Ф'. + 'Ð¥'. + 'Ц'. + 'Ч'. + 'Ш'. + 'Щ'. + 'Ъ'. + 'Ы'. + 'Ь'. + 'Э'. + 'Ю'. + 'Я'; +$led->StrokeNumber($text, LEDC_RED); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/centeredlineex01.php b/vendor/amenadiel/jpgraph/Examples/examples_line/centeredlineex01.php new file mode 100644 index 0000000000..e58d1d4bf7 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/centeredlineex01.php @@ -0,0 +1,28 @@ +img->SetMargin(40, 40, 40, 40); +$graph->img->SetAntiAliasing(); +$graph->SetScale("textlin"); +$graph->SetShadow(); +$graph->title->Set("Example of line centered plot"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Use 20% "grace" to get slightly larger scale then min/max of +// data +$graph->yscale->SetGrace(20); + +$p1 = new Plot\LinePlot($datay); +$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetFillColor("red"); +$p1->mark->SetWidth(4); +$p1->SetColor("blue"); +$p1->SetCenter(); +$graph->Add($p1); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/centeredlineex02.php b/vendor/amenadiel/jpgraph/Examples/examples_line/centeredlineex02.php new file mode 100644 index 0000000000..7a589baa18 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/centeredlineex02.php @@ -0,0 +1,25 @@ +img->SetMargin(40, 40, 40, 40); +$graph->img->SetAntiAliasing(); +$graph->SetScale("textlin"); +$graph->SetShadow(); +$graph->title->Set("Example of filled line centered plot"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +$p1 = new Plot\LinePlot($datay); +$p1->SetFillColor("green"); +$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetFillColor("red"); +$p1->mark->SetWidth(4); +$p1->SetColor("blue"); +$p1->SetCenter(); +$graph->Add($p1); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/centeredlineex03.php b/vendor/amenadiel/jpgraph/Examples/examples_line/centeredlineex03.php new file mode 100644 index 0000000000..56bf6a2876 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/centeredlineex03.php @@ -0,0 +1,27 @@ +img->SetMargin(40, 40, 40, 80); +$graph->img->SetAntiAliasing(); +$graph->SetScale("textlin"); +$graph->SetShadow(); +$graph->title->Set("Example slanted X-labels"); +$graph->title->SetFont(FF_VERDANA, FS_NORMAL, 14); + +$graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 11); +$graph->xaxis->SetTickLabels($labels); +$graph->xaxis->SetLabelAngle(45); + +$p1 = new Plot\LinePlot($datay); +$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetFillColor("red"); +$p1->mark->SetWidth(4); +$p1->SetColor("blue"); +$p1->SetCenter(); +$graph->Add($p1); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/centerlinebarex1.php b/vendor/amenadiel/jpgraph/Examples/examples_line/centerlinebarex1.php new file mode 100644 index 0000000000..f90fe5f763 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/centerlinebarex1.php @@ -0,0 +1,30 @@ +img->SetMargin(40, 80, 40, 40); +$graph->SetScale("textlin"); +$graph->SetShadow(); + +$graph->title->Set('Center the line points in bars'); + +$line = new Plot\LinePlot($ydata); +$line->SetBarCenter(); +$line->SetWeight(2); + +$bar = new Plot\BarPlot($ydata); +$bar2 = new Plot\BarPlot($ydata); +$bar2->SetFillColor("red"); + +$gbar = new Plot\GroupBarPlot(array($bar, $bar2)); + +$graph->Add($gbar); +$graph->Add($line); + +// Output line +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/clipping_ex1.php b/vendor/amenadiel/jpgraph/Examples/examples_line/clipping_ex1.php new file mode 100644 index 0000000000..b42beb09f5 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/clipping_ex1.php @@ -0,0 +1,35 @@ +SetScale('intlin', 0, 10); +$graph->SetMargin(30, 20, 70, 40); +$graph->SetMarginColor(array(177, 191, 174)); + +$graph->SetClipping(false); + +$graph->xaxis->SetFont(FF_FONT1, FS_BOLD); + +$graph->ygrid->SetLineStyle('dashed'); + +$graph->title->Set("Manual scale"); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$graph->title->SetColor('white'); +$graph->subtitle->Set("(No clipping)"); +$graph->subtitle->SetColor('white'); +$graph->subtitle->SetFont(FF_ARIAL, FS_BOLD, 10); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot->SetColor("red"); +$lineplot->SetWeight(2); + +// Add the plot to the graph +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/clipping_ex2.php b/vendor/amenadiel/jpgraph/Examples/examples_line/clipping_ex2.php new file mode 100644 index 0000000000..2d3d8cc810 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/clipping_ex2.php @@ -0,0 +1,35 @@ +SetScale('intlin', 0, 10); +$graph->SetMargin(30, 20, 70, 40); +$graph->SetMarginColor(array(177, 191, 174)); + +$graph->SetClipping(true); + +$graph->xaxis->SetFont(FF_FONT1, FS_BOLD); + +$graph->ygrid->SetLineStyle('dashed'); + +$graph->title->Set("Manual scale"); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$graph->title->SetColor('white'); +$graph->subtitle->Set("(With clipping)"); +$graph->subtitle->SetColor('white'); +$graph->subtitle->SetFont(FF_ARIAL, FS_BOLD, 10); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot->SetColor("red"); +$lineplot->SetWeight(2); + +// Add the plot to the graph +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/filledgridex1.php b/vendor/amenadiel/jpgraph/Examples/examples_line/filledgridex1.php new file mode 100644 index 0000000000..da8f9f9f89 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/filledgridex1.php @@ -0,0 +1,45 @@ +SetMarginColor('white'); +$graph->SetScale("textlin"); +$graph->SetFrame(false); +$graph->SetMargin(30, 50, 30, 30); + +$graph->title->Set('Filled Y-grid'); + +$graph->yaxis->HideZeroLabel(); +$graph->ygrid->SetFill(true, '#EFEFEF@0.5', '#BBCCFF@0.5'); +$graph->xgrid->Show(); + +$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth()); + +// Create the first line +$p1 = new Plot\LinePlot($datay1); +$p1->SetColor("navy"); +$p1->SetLegend('Line 1'); +$graph->Add($p1); + +// Create the second line +$p2 = new Plot\LinePlot($datay2); +$p2->SetColor("red"); +$p2->SetLegend('Line 2'); +$graph->Add($p2); + +// Create the third line +$p3 = new Plot\LinePlot($datay3); +$p3->SetColor("orange"); +$p3->SetLegend('Line 3'); +$graph->Add($p3); + +$graph->legend->SetShadow('gray@0.4', 5); +$graph->legend->SetPos(0.1, 0.1, 'right', 'top'); +// Output line +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/filledline01.php b/vendor/amenadiel/jpgraph/Examples/examples_line/filledline01.php new file mode 100644 index 0000000000..8390c5fb54 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/filledline01.php @@ -0,0 +1,20 @@ +img->SetMargin(40, 40, 40, 40); +$graph->SetScale("textlin"); +$graph->SetShadow(); +$graph->title->Set("Example of filled line plot"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +$p1 = new Plot\LinePlot($datay); +$p1->SetFillColor("orange"); +$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetFillColor("red"); +$p1->mark->SetWidth(4); +$graph->Add($p1); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/filledlineex01.1.php b/vendor/amenadiel/jpgraph/Examples/examples_line/filledlineex01.1.php new file mode 100644 index 0000000000..bf2a6e3c77 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/filledlineex01.1.php @@ -0,0 +1,23 @@ +SetScale("textlin"); + +$graph->img->SetMargin(40, 40, 40, 40); +$graph->SetShadow(); +$graph->SetGridDepth(DEPTH_FRONT); + +$graph->title->Set("Example of filled line plot"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +$p1 = new Plot\LinePlot($datay); +$p1->SetFillColor("orange"); +$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetFillColor("red"); +$p1->mark->SetWidth(4); +$graph->Add($p1); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/filledlineex01.php b/vendor/amenadiel/jpgraph/Examples/examples_line/filledlineex01.php new file mode 100644 index 0000000000..56f8328791 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/filledlineex01.php @@ -0,0 +1,22 @@ +SetScale('textlin'); + +$graph->img->SetMargin(40, 40, 40, 40); +$graph->SetShadow(); + +$graph->title->Set("Example of filled line plot"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +$p1 = new Plot\LinePlot($datay); +$p1->SetFillColor("orange"); +$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetFillColor("red"); +$p1->mark->SetWidth(4); +$graph->Add($p1); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/filledlineex02.php b/vendor/amenadiel/jpgraph/Examples/examples_line/filledlineex02.php new file mode 100644 index 0000000000..a3fd82d95a --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/filledlineex02.php @@ -0,0 +1,23 @@ +img->SetMargin(40, 40, 40, 40); +$graph->SetScale("textlin"); +$graph->SetShadow(); +$graph->title->Set("Example of filled line plot"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->subtitle->Set("(Starting from Y=0)"); + +$graph->yaxis->scale->SetAutoMin(0); + +$p1 = new Plot\LinePlot($datay); +$p1->SetFillColor("orange"); +$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetFillColor("red"); +$p1->mark->SetWidth(4); +$graph->Add($p1); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/filledlineex03.php b/vendor/amenadiel/jpgraph/Examples/examples_line/filledlineex03.php new file mode 100644 index 0000000000..318a723fbf --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/filledlineex03.php @@ -0,0 +1,19 @@ +SetScale('intlin'); +$graph->title->Set('Filled line with NULL values'); +//Make sure data starts from Zero whatever data we have +$graph->yscale->SetAutoMin(0); + +$p1 = new Plot\LinePlot($datay); +$p1->SetFillColor('lightblue'); +$graph->Add($p1); + +// Output line +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/filledstepstyleex1.php b/vendor/amenadiel/jpgraph/Examples/examples_line/filledstepstyleex1.php new file mode 100644 index 0000000000..6ba88e3e74 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/filledstepstyleex1.php @@ -0,0 +1,37 @@ +SetScale("textlin"); +$graph->SetShadow(true); +$graph->SetMarginColor("antiquewhite"); +$graph->img->SetMargin(60, 40, 40, 50); +$graph->img->setTransparent("white"); +$graph->xaxis->SetFont(FF_FONT1); +$graph->xaxis->setTextTickInterval(1); +$graph->xaxis->SetTextLabelInterval(1); +$graph->legend->SetFillColor("antiquewhite"); +$graph->legend->SetShadow(true); +$graph->legend->SetLayout(LEGEND_VERT); +$graph->legend->Pos(0.02, 0.01); +$graph->title->Set("Step Styled Example"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +$lineplot = new Plot\LinePlot($ydata); +$lineplot->SetColor("black"); +$lineplot->setFillColor("gray7"); +$lineplot->SetStepStyle(); +$lineplot->SetLegend(" 2002 "); + +// add plot to the graph +$graph->Add($lineplot); +$graph->ygrid->show(false, false); + +// display graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/funcex1.php b/vendor/amenadiel/jpgraph/Examples/examples_line/funcex1.php new file mode 100644 index 0000000000..c00063378d --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/funcex1.php @@ -0,0 +1,53 @@ +E(-1.2 * M_PI, 1.2 * M_PI); + +$f = new FuncGenerator('$x*$x'); +list($x2data, $y2data) = $f->E(-2, 2); + +// Setup the basic graph +$graph = new Graph\Graph(450, 350); +$graph->SetScale("linlin"); +$graph->SetShadow(); +$graph->img->SetMargin(50, 50, 60, 40); +$graph->SetBox(true, 'black', 2); +$graph->SetMarginColor('white'); +$graph->SetColor('lightyellow'); + +// ... and titles +$graph->title->Set('Example of Function plot'); +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->subtitle->Set("(With some more advanced axis formatting\nHiding first and last label)"); +$graph->subtitle->SetFont(FF_FONT1, FS_NORMAL); +$graph->xgrid->Show(); + +$graph->yaxis->SetPos(0); +$graph->yaxis->SetWeight(2); +$graph->yaxis->HideZeroLabel(); +$graph->yaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->SetColor('black', 'darkblue'); +$graph->yaxis->HideTicks(true, false); +$graph->yaxis->HideFirstLastLabel(); + +$graph->xaxis->SetWeight(2); +$graph->xaxis->HideZeroLabel(); +$graph->xaxis->HideFirstLastLabel(); +$graph->xaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->SetColor('black', 'darkblue'); + +$lp1 = new Plot\LinePlot($ydata, $xdata); +$lp1->SetColor('blue'); +$lp1->SetWeight(2); + +$lp2 = new Plot\LinePlot($y2data, $x2data); +list($xm, $ym) = $lp2->Max(); +$lp2->SetColor('red'); +$lp2->SetWeight(2); + +$graph->Add($lp1); +$graph->Add($lp2); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/funcex2.php b/vendor/amenadiel/jpgraph/Examples/examples_line/funcex2.php new file mode 100644 index 0000000000..c6ac0e97f9 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/funcex2.php @@ -0,0 +1,31 @@ +E(-M_PI, M_PI, 25); + +$graph = new Graph\Graph(380, 450); +$graph->SetScale("linlin"); +$graph->SetShadow(); +$graph->img->SetMargin(50, 50, 60, 40); +$graph->SetBox(true, 'black', 2); +$graph->SetMarginColor('white'); +$graph->SetColor('lightyellow'); +$graph->SetAxisStyle(AXSTYLE_SIMPLE); + +//$graph->xaxis->SetLabelFormat('%.1f'); + +$graph->title->Set("Function plot with marker"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->subtitle->Set("(BOXOUT Axis style)"); +$graph->subtitle->SetFont(FF_FONT1, FS_NORMAL); + +$lp1 = new Plot\LinePlot($ydata, $xdata); +$lp1->mark->SetType(MARK_FILLEDCIRCLE); +$lp1->mark->SetFillColor("red"); +$lp1->SetColor("blue"); + +$graph->Add($lp1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/funcex3.php b/vendor/amenadiel/jpgraph/Examples/examples_line/funcex3.php new file mode 100644 index 0000000000..fd31e8b27e --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/funcex3.php @@ -0,0 +1,33 @@ +E(-M_PI, M_PI, 25); + +$graph = new Graph\Graph(350, 430); +$graph->SetScale("linlin"); +$graph->SetShadow(); +$graph->img->SetMargin(50, 50, 60, 40); +$graph->SetBox(true, 'black', 2); +$graph->SetMarginColor('white'); +$graph->SetColor('lightyellow'); +$graph->SetAxisStyle(AXSTYLE_BOXIN); +$graph->xgrid->Show(); + +//$graph->xaxis->SetLabelFormat('%.0f'); + +$graph->img->SetMargin(50, 50, 60, 40); + +$graph->title->Set("Function plot"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->subtitle->Set("(BOXIN Axis style)"); +$graph->subtitle->SetFont(FF_FONT1, FS_NORMAL); + +$lp1 = new Plot\LinePlot($ydata, $xdata); +$lp1->SetColor("blue"); +$lp1->SetWeight(2); + +$graph->Add($lp1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/funcex4.php b/vendor/amenadiel/jpgraph/Examples/examples_line/funcex4.php new file mode 100644 index 0000000000..1743835820 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/funcex4.php @@ -0,0 +1,58 @@ +E(-1.2 * M_PI, 1.2 * M_PI); + +$f = new FuncGenerator('$x*$x'); +list($x2data, $y2data) = $f->E(-2, 2); + +// Setup the basic graph +$graph = new Graph\Graph(450, 350); +$graph->SetScale("linlin"); +//$graph->SetShadow(); +$graph->img->SetMargin(5, 10, 60, 9); +$graph->SetBox(true, 'green', 2); +$graph->SetMarginColor('black'); +$graph->SetColor('black'); + +// ... and titles +$graph->title->Set('Example of Function plot'); +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetColor('lightgreen'); +$graph->subtitle->Set("(With some more advanced axis formatting\nHiding first and last label)"); +$graph->subtitle->SetFont(FF_FONT1, FS_NORMAL); +$graph->subtitle->SetColor('lightgreen'); + +$graph->xgrid->Show(); +$graph->xgrid->SetColor('darkgreen'); +$graph->ygrid->SetColor('darkgreen'); + +$graph->yaxis->SetPos(0); +$graph->yaxis->SetWeight(2); +$graph->yaxis->HideZeroLabel(); +$graph->yaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->SetColor('green', 'green'); +$graph->yaxis->HideTicks(true, true); +$graph->yaxis->HideFirstLastLabel(); + +$graph->xaxis->SetWeight(2); +$graph->xaxis->HideZeroLabel(); +$graph->xaxis->HideFirstLastLabel(); +$graph->xaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->SetColor('green', 'green'); + +$lp1 = new Plot\LinePlot($ydata, $xdata); +$lp1->SetColor('yellow'); +$lp1->SetWeight(2); + +$lp2 = new Plot\LinePlot($y2data, $x2data); +list($xm, $ym) = $lp2->Max(); +$lp2->SetColor('blue'); +$lp2->SetWeight(2); + +$graph->Add($lp1); +$graph->Add($lp2); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/gradlinefillex1.php b/vendor/amenadiel/jpgraph/Examples/examples_line/gradlinefillex1.php new file mode 100644 index 0000000000..c13091edd7 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/gradlinefillex1.php @@ -0,0 +1,25 @@ +SetMargin(40, 40, 20, 30); +$graph->SetScale("intlin"); +$graph->SetMarginColor('darkgreen@0.8'); + +$graph->title->Set('Gradient filled line plot'); +$graph->yscale->SetAutoMin(0); + +// Create the line +$p1 = new Plot\LinePlot($datay); +$p1->SetColor("blue"); +$p1->SetWeight(0); +$p1->SetFillGradient('red', 'yellow'); + +$graph->Add($p1); + +// Output line +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/gradlinefillex2.php b/vendor/amenadiel/jpgraph/Examples/examples_line/gradlinefillex2.php new file mode 100644 index 0000000000..dfca8efef2 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/gradlinefillex2.php @@ -0,0 +1,26 @@ +SetMargin(40, 40, 20, 30); +$graph->SetScale("intlin"); +$graph->SetBox(); +$graph->SetMarginColor('darkgreen@0.8'); + +// Setup a background gradient image +$graph->SetBackgroundGradient('darkred', 'yellow', GRAD_HOR, BGRAD_PLOT); + +$graph->title->Set('Gradient filled line plot ex2'); +$graph->yscale->SetAutoMin(0); + +// Create the line +$p1 = new Plot\LinePlot($datay); +$p1->SetFillGradient('white', 'darkgreen'); +$graph->Add($p1); + +// Output line +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/gradlinefillex3.php b/vendor/amenadiel/jpgraph/Examples/examples_line/gradlinefillex3.php new file mode 100644 index 0000000000..ca5ef27584 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/gradlinefillex3.php @@ -0,0 +1,26 @@ +SetMargin(40, 40, 20, 30); +$graph->SetScale("intlin"); +$graph->SetBox(); +$graph->SetMarginColor('darkgreen@0.8'); + +// Setup a background gradient image +$graph->SetBackgroundGradient('darkred', 'yellow', GRAD_HOR, BGRAD_PLOT); + +$graph->title->Set('Gradient filled line plot ex3'); +$graph->yscale->SetAutoMin(0); + +// Create the line +$p1 = new Plot\LinePlot($datay); +$p1->SetFillGradient('white', 'darkgreen', 4); +$graph->Add($p1); + +// Output line +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/gradlinefillex4.php b/vendor/amenadiel/jpgraph/Examples/examples_line/gradlinefillex4.php new file mode 100644 index 0000000000..3999c33349 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/gradlinefillex4.php @@ -0,0 +1,27 @@ +SetMargin(40, 40, 20, 30); +$graph->SetScale("intlin"); +$graph->SetBox(); +$graph->SetMarginColor('darkgreen@0.8'); + +// Setup a background gradient image +$graph->SetBackgroundGradient('darkred', 'yellow', GRAD_HOR, BGRAD_PLOT); + +$graph->title->Set('Gradient filled line plot ex2'); +$graph->yscale->SetAutoMin(0); + +// Create the line +$p1 = new Plot\LinePlot($datay); +$p1->SetFillGradient('white', 'darkgreen'); +$p1->SetStepStyle(); +$graph->Add($p1); + +// Output line +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/linebarcentex1.php b/vendor/amenadiel/jpgraph/Examples/examples_line/linebarcentex1.php new file mode 100644 index 0000000000..291d5367f5 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/linebarcentex1.php @@ -0,0 +1,45 @@ +GetShortMonth(); + +// Create the graph. +$graph = new Graph\Graph(400, 200); +$graph->SetScale("textlin"); +$graph->SetMargin(40, 130, 20, 40); +$graph->SetShadow(); +$graph->xaxis->SetTickLabels($datax); + +// Create the linear error plot +$l1plot = new Plot\LinePlot($l1datay); +$l1plot->SetColor("red"); +$l1plot->SetWeight(2); +$l1plot->SetLegend("Prediction"); + +//Center the line plot in the center of the bars +$l1plot->SetBarCenter(); + +// Create the bar plot +$bplot = new Plot\BarPlot($l2datay); +$bplot->SetFillColor("orange"); +$bplot->SetLegend("Result"); + +// Add the plots to t'he graph +$graph->Add($bplot); +$graph->Add($l1plot); + +$graph->title->Set("Adding a line plot to a bar graph v1"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/linebarex1.php b/vendor/amenadiel/jpgraph/Examples/examples_line/linebarex1.php new file mode 100644 index 0000000000..21cfb98973 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/linebarex1.php @@ -0,0 +1,69 @@ +SetBackgroundImage("tiger_bkg.png", BGIMG_FILLFRAME); +$graph->SetShadow(); + +// Use an integer X-scale +$graph->SetScale("textlin"); + +// Set title and subtitle +$graph->title->Set("Combined bar and line plot"); +$graph->subtitle->Set("100 data points, X-Scale: 'text'"); + +// Use built in font +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Make the margin around the plot a little bit bigger +// then default +$graph->img->SetMargin(40, 140, 40, 80); + +// Slightly adjust the legend from it's default position in the +// top right corner to middle right side +$graph->legend->Pos(0.05, 0.5, "right", "center"); + +// Display every 10:th datalabel +$graph->xaxis->SetTextTickInterval(6); +$graph->xaxis->SetTextLabelInterval(2); +$graph->xaxis->SetTickLabels($databarx); +$graph->xaxis->SetLabelAngle(90); + +// Create a red line plot +$p1 = new Plot\LinePlot($datay); +$p1->SetColor("red"); +$p1->SetLegend("Pressure"); + +// Create the bar plot +$b1 = new Plot\BarPlot($databary); +$b1->SetLegend("Temperature"); +$b1->SetAbsWidth(6); +$b1->SetShadow(); + +// The order the plots are added determines who's ontop +$graph->Add($p1); +$graph->Add($b1); + +// Finally output the image +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/linebarex2.php b/vendor/amenadiel/jpgraph/Examples/examples_line/linebarex2.php new file mode 100644 index 0000000000..f5a41e60f2 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/linebarex2.php @@ -0,0 +1,55 @@ +SetBackgroundImage("tiger_bkg.png", BGIMG_FILLFRAME); +$graph->SetShadow(); + +// Use an integer X-scale +$graph->SetScale("intlin"); + +// Set title and subtitle +$graph->title->Set("Combined bar and line plot"); +$graph->subtitle->Set("(\"left\" aligned bars)"); + +// Use built in font +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Make the margin around the plot a little bit bigger +// then default +$graph->img->SetMargin(40, 120, 40, 40); + +// Slightly adjust the legend from it's default position in the +// top right corner to middle right side +$graph->legend->Pos(0.05, 0.5, "right", "center"); + +// Create a red line plot +$p1 = new Plot\LinePlot($datay, $datax); +$p1->SetColor("red"); +$p1->SetLegend("Status one"); +$graph->Add($p1); + +// Create the bar plot +$b1 = new Plot\BarPlot($databary, $databarx); +$b1->SetLegend("Status two"); +$b1->SetAlign("left"); +$b1->SetShadow(); +$graph->Add($b1); + +// Finally output the image +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/linebarex3.php b/vendor/amenadiel/jpgraph/Examples/examples_line/linebarex3.php new file mode 100644 index 0000000000..6d96eb2eee --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/linebarex3.php @@ -0,0 +1,51 @@ +img->SetMargin(40, 180, 40, 40); +$graph->SetBackgroundImage("tiger_bkg.png", BGIMG_FILLFRAME); + +//$graph->img->SetAntiAliasing(); + +$graph->SetScale("intlin"); +$graph->SetShadow(); +$graph->title->Set("Combined bar and line plot"); +$graph->subtitle->Set("(\"center\" aligned bars)"); + +// Use built in font +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Slightly adjust the legend from it's default position in the +// top right corner. +$graph->legend->Pos(0.05, 0.5, "right", "center"); + +// Create the first line + +$p1 = new Plot\LinePlot($datay, $datax); +$p1->SetWeight(1); +$p1->SetColor("red"); +$p1->SetLegend("Triumph Tiger -98"); +$graph->Add($p1); + +$b1 = new Plot\BarPlot($databary, $databarx); +$b1->SetAbsWidth(10); +$b1->SetAlign("center"); +$b1->SetShadow(); +$graph->Add($b1); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/linegraceex.php b/vendor/amenadiel/jpgraph/Examples/examples_line/linegraceex.php new file mode 100644 index 0000000000..b185658269 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/linegraceex.php @@ -0,0 +1,27 @@ +img->SetMargin(40, 40, 40, 40); + +$graph->img->SetAntiAliasing(); +$graph->SetScale("textlin"); +$graph->SetShadow(); +$graph->title->Set("Example of 10% top/bottom grace"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Add 10% grace to top and bottom of plot +$graph->yscale->SetGrace(10, 10); + +$p1 = new Plot\LinePlot($datay); +$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetFillColor("red"); +$p1->mark->SetWidth(4); +$p1->SetColor("blue"); +$p1->SetCenter(); +$graph->Add($p1); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/lineiconex1.php b/vendor/amenadiel/jpgraph/Examples/examples_line/lineiconex1.php new file mode 100644 index 0000000000..e57efebb2e --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/lineiconex1.php @@ -0,0 +1,44 @@ +SetMargin(40, 40, 20, 30); +$graph->SetScale("textlin"); + +$graph->title->Set('Adding an icon ("tux") in the background'); +$graph->title->SetFont(FF_ARIAL, FS_NORMAL, 12); + +//$graph->SetBackgroundGradient('red','blue'); + +$graph->xaxis->SetPos('min'); + +$p1 = new Plot\LinePlot($datay); +$p1->SetColor("blue"); +$p1->SetFillGradient('yellow@0.4', 'red@0.4'); + +$p2 = new Plot\LinePlot($datay2); +$p2->SetColor("black"); +$p2->SetFillGradient('green@0.4', 'white'); + +$p3 = new Plot\LinePlot($datay3); +$p3->SetColor("blue"); +$p3->SetFillGradient('navy@0.4', 'white@0.4'); + +$graph->Add($p1); +$graph->Add($p2); +$graph->Add($p3); + +$icon = new IconPlot('penguin.png', 0.2, 0.3, 1, 30); +$icon->SetAnchor('center', 'center'); +$graph->Add($icon); + +// Output line +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/lineiconex2.php b/vendor/amenadiel/jpgraph/Examples/examples_line/lineiconex2.php new file mode 100644 index 0000000000..8bb4881e5b --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/lineiconex2.php @@ -0,0 +1,28 @@ +SetMargin(40, 40, 20, 30); +$graph->SetScale("textlin"); + +$graph->title->Set('Adding a country flag as a an icon'); + +$p1 = new Plot\LinePlot($datay); +$p1->SetColor("blue"); +$p1->SetFillGradient('yellow@0.4', 'red@0.4'); + +$graph->Add($p1); + +$icon = new IconPlot(); +$icon->SetCountryFlag('iceland', 50, 30, 1.5, 40, 3); +$icon->SetAnchor('left', 'top'); +$graph->Add($icon); + +// Output line +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/lineimagefillex1.php b/vendor/amenadiel/jpgraph/Examples/examples_line/lineimagefillex1.php new file mode 100644 index 0000000000..c05e05b066 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/lineimagefillex1.php @@ -0,0 +1,37 @@ +title->Set('Education growth'); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$graph->SetScale('intlin'); +$graph->SetMarginColor('white'); +$graph->SetBox(); +//$graph->img->SetAntialiasing(); + +$graph->SetGridDepth(DEPTH_FRONT); +$graph->ygrid->SetColor('gray@0.7'); +$graph->SetBackgroundImage('classroom.jpg', BGIMG_FILLPLOT); + +// Masking graph +$p1 = new Plot\LinePlot($datay); +$p1->SetFillColor('white'); +$p1->SetFillFromYMax(); +$p1->SetWeight(0); +$graph->Add($p1); + +// Line plot +$p2 = new Plot\LinePlot($datay); +$p2->SetColor('black@0.4'); +$p2->SetWeight(3); +$p2->mark->SetType(MARK_SQUARE); +$p2->mark->SetColor('orange@0.5'); +$p2->mark->SetFillColor('orange@0.3'); +$graph->Add($p2); + +// Output line +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/manscaleex1.php b/vendor/amenadiel/jpgraph/Examples/examples_line/manscaleex1.php new file mode 100644 index 0000000000..d7b6a4a7b0 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/manscaleex1.php @@ -0,0 +1,18 @@ +SetScale("textlin", 3, 35); +$graph->yscale->ticks->Set(8, 2); + +$graph->title->Set('Manual scale, manual ticks'); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +$line = new Plot\LinePlot($ydata); +$graph->Add($line); + +// Output graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/manscaleex2.php b/vendor/amenadiel/jpgraph/Examples/examples_line/manscaleex2.php new file mode 100644 index 0000000000..7e01d24a48 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/manscaleex2.php @@ -0,0 +1,17 @@ +SetScale("textlin", 3, 35); + +$graph->title->Set('Manual scale, exact limits'); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +$line = new Plot\LinePlot($ydata); +$graph->Add($line); + +// Output graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/manscaleex3.php b/vendor/amenadiel/jpgraph/Examples/examples_line/manscaleex3.php new file mode 100644 index 0000000000..4a0b7a1359 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/manscaleex3.php @@ -0,0 +1,19 @@ +SetScale("textlin", 3, 35); +$graph->SetTickDensity(TICKD_DENSE); +$graph->yscale->SetAutoTicks(); + +$graph->title->Set('Manual scale, auto ticks'); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +$line = new Plot\LinePlot($ydata); +$graph->Add($line); + +// Output graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/manscaleex4.php b/vendor/amenadiel/jpgraph/Examples/examples_line/manscaleex4.php new file mode 100644 index 0000000000..0ff91d461a --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/manscaleex4.php @@ -0,0 +1,18 @@ +SetScale("textlin", 3, 35); +$graph->yscale->SetAutoTicks(); + +$graph->title->Set('Manual scale, allow adjustment'); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +$line = new Plot\LinePlot($ydata); +$graph->Add($line); + +// Output graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/new_line1.php b/vendor/amenadiel/jpgraph/Examples/examples_line/new_line1.php new file mode 100644 index 0000000000..ffc4dcedd9 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/new_line1.php @@ -0,0 +1,53 @@ +SetScale("textlin"); + +$theme_class = new UniversalTheme; + +$graph->SetTheme($theme_class); +$graph->img->SetAntiAliasing(false); +$graph->title->Set('Filled Y-grid'); +$graph->SetBox(false); + +$graph->img->SetAntiAliasing(); + +$graph->yaxis->HideZeroLabel(); +$graph->yaxis->HideLine(false); +$graph->yaxis->HideTicks(false, false); + +$graph->xgrid->Show(); +$graph->xgrid->SetLineStyle("solid"); +$graph->xaxis->SetTickLabels(array('A', 'B', 'C', 'D')); +$graph->xgrid->SetColor('#E3E3E3'); +/* $graph->SetBackgroundImage("tiger_bkg.png",BGIMG_FILLPLOT); */ + +// Create the first line +$p1 = new Plot\LinePlot($datay1); +$graph->Add($p1); +$p1->SetColor("#6495ED"); +$p1->SetLegend('Line 1'); + +// Create the second line +$p2 = new Plot\LinePlot($datay2); +$graph->Add($p2); +$p2->SetColor("#B22222"); +$p2->SetLegend('Line 2'); + +// Create the third line +$p3 = new Plot\LinePlot($datay3); +$graph->Add($p3); +$p3->SetColor("#FF1493"); +$p3->SetLegend('Line 3'); + +$graph->legend->SetFrameWeight(1); + +// Output line +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/new_line2.php b/vendor/amenadiel/jpgraph/Examples/examples_line/new_line2.php new file mode 100644 index 0000000000..69c08b8cd3 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/new_line2.php @@ -0,0 +1,52 @@ +SetScale("textlin"); + +$theme_class = new UniversalTheme; +$graph->SetTheme($theme_class); + +$graph->title->Set('Background Image'); +$graph->SetBox(false); + +$graph->yaxis->HideZeroLabel(); +$graph->yaxis->HideLine(false); +$graph->yaxis->HideTicks(false, false); + +$graph->xaxis->SetTickLabels(array('A', 'B', 'C', 'D')); +$graph->ygrid->SetFill(false); +$graph->SetBackgroundImage("tiger_bkg.png", BGIMG_FILLFRAME); + +$p1 = new Plot\LinePlot($datay1); +$graph->Add($p1); + +$p2 = new Plot\LinePlot($datay2); +$graph->Add($p2); + +$p1->SetColor("#55bbdd"); +$p1->SetLegend('Line 1'); +$p1->mark->SetType(MARK_FILLEDCIRCLE, '', 1.0); +$p1->mark->SetColor('#55bbdd'); +$p1->mark->SetFillColor('#55bbdd'); +$p1->SetCenter(); + +$p2->SetColor("#aaaaaa"); +$p2->SetLegend('Line 2'); +$p2->mark->SetType(MARK_UTRIANGLE, '', 1.0); +$p2->mark->SetColor('#aaaaaa'); +$p2->mark->SetFillColor('#aaaaaa'); +$p2->value->SetMargin(14); +$p2->SetCenter(); + +$graph->legend->SetFrameWeight(1); +$graph->legend->SetColor('#4E4E4E', '#00A78A'); +$graph->legend->SetMarkAbsSize(8); + +// Output line +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/new_line3.php b/vendor/amenadiel/jpgraph/Examples/examples_line/new_line3.php new file mode 100644 index 0000000000..aa13bde7c7 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/new_line3.php @@ -0,0 +1,42 @@ +SetScale("textlin", 0, 50); + +//$theme_class=new DefaultTheme; +//$graph->SetTheme($theme_class); + +$graph->title->Set("Filled Area"); + +$graph->SetBox(false); +$graph->yaxis->HideLine(false); +$graph->yaxis->HideTicks(false, false); +$graph->yaxis->HideZeroLabel(); + +$graph->xaxis->SetTickLabels(array('A', 'B', 'C', 'D', 'E', 'F', 'G')); + +// Create the plot +$p1 = new Plot\LinePlot($datay1); +$graph->Add($p1); + +$p2 = new Plot\LinePlot($datay2); +$graph->Add($p2); + +// Use an image of favourite car as marker +$p1->mark->SetType(MARK_IMG, 'rose.gif', 1.0); +$p1->SetLegend('rose'); +$p1->SetColor('#CD5C5C'); + +$p2->mark->SetType(MARK_IMG, 'sunflower.gif', 1.0); +$p2->SetLegend('sunflower'); +$p2->SetColor('#CD5C5C'); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/new_line4.php b/vendor/amenadiel/jpgraph/Examples/examples_line/new_line4.php new file mode 100644 index 0000000000..7b5d0f5f9f --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/new_line4.php @@ -0,0 +1,46 @@ +SetScale("textlin", 0, 50); + +$theme_class = new UniversalTheme; +$graph->SetTheme($theme_class); + +$graph->title->Set("Line Plots with Markers"); + +$graph->SetBox(false); +$graph->ygrid->SetFill(false); +$graph->yaxis->HideLine(false); +$graph->yaxis->HideTicks(false, false); +$graph->yaxis->HideZeroLabel(); + +$graph->xaxis->SetTickLabels(array('A', 'B', 'C', 'D', 'E', 'F', 'G')); +// Create the plot +$p1 = new Plot\LinePlot($datay1); +$graph->Add($p1); + +$p2 = new Plot\LinePlot($datay2); +$graph->Add($p2); + +// Use an image of favourite car as marker +$p1->mark->SetType(MARK_IMG, 'new1.gif', 0.8); +$p1->SetColor('#aadddd'); +$p1->value->SetFormat('%d'); +$p1->value->Show(); +$p1->value->SetColor('#55bbdd'); + +$p2->mark->SetType(MARK_IMG, 'new2.gif', 0.8); +$p2->SetColor('#ddaa99'); +$p2->value->SetFormat('%d'); +$p2->value->Show(); +$p2->value->SetColor('#55bbdd'); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/new_line5.php b/vendor/amenadiel/jpgraph/Examples/examples_line/new_line5.php new file mode 100644 index 0000000000..2f727c18e9 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/new_line5.php @@ -0,0 +1,40 @@ +SetScale("intlin", 0, $aYMax = 50); + +$theme_class = new UniversalTheme; +$graph->SetTheme($theme_class); + +$graph->SetMargin(40, 40, 50, 40); + +$graph->title->Set('Inverted Y-axis'); +$graph->SetBox(false); +$graph->yaxis->HideLine(false); +$graph->yaxis->HideTicks(false, false); + +// For background to be gradient, setfill is needed first. +$graph->ygrid->SetFill(true, '#FFFFFF@0.5', '#FFFFFF@0.5'); +$graph->SetBackgroundGradient('#FFFFFF', '#00FF7F', GRAD_HOR, BGRAD_PLOT); + +$graph->xaxis->SetTickLabels(array('G', 'F', 'E', 'D', 'C', 'B', 'A')); +$graph->xaxis->SetLabelMargin(20); +$graph->yaxis->SetLabelMargin(20); + +$graph->SetAxisStyle(AXSTYLE_BOXOUT); +$graph->img->SetAngle(180); + +// Create the line +$p1 = new Plot\LinePlot($datay); +$graph->Add($p1); + +$p1->SetFillGradient('#FFFFFF', '#F0F8FF'); +$p1->SetColor('#aadddd'); + +// Output line +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/partiallyfilledlineex1.php b/vendor/amenadiel/jpgraph/Examples/examples_line/partiallyfilledlineex1.php new file mode 100644 index 0000000000..cca3090e3e --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/partiallyfilledlineex1.php @@ -0,0 +1,43 @@ +SetScale("textlin"); +$graph->SetShadow(true); +$graph->SetMarginColor("lightblue"); + +// Setup format for legend +$graph->legend->SetFillColor("antiquewhite"); +$graph->legend->SetShadow(true); + +// Setup title +$graph->title->Set("Filled Area Example"); +$graph->title->SetFont(FF_FONT2, FS_BOLD); + +// Setup semi-filled line plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot->SetLegend("Semi-filled\nLineplot"); + +// Set line color +$lineplot->SetColor("black"); + +// Setup the two areas to be filled +$lineplot->AddArea(2, 5, LP_AREA_FILLED, "red"); +$lineplot->AddArea(6, 8, LP_AREA_FILLED, "green"); + +// Display the marks on the lines +$lineplot->mark->SetType(MARK_DIAMOND); +$lineplot->mark->SetSize(8); +$lineplot->mark->Show(); + +// add plot to the graph +$graph->Add($lineplot); + +// display graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/plotlineex1.php b/vendor/amenadiel/jpgraph/Examples/examples_line/plotlineex1.php new file mode 100644 index 0000000000..3e4694f880 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/plotlineex1.php @@ -0,0 +1,35 @@ +SetScale("textlin"); +$graph->SetMargin(40, 20, 50, 70); + +$graph->legend->SetPos(0.5, 0.97, 'center', 'bottom'); + +$graph->title->Set('Plot line legend'); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); + +$graph->SetTitleBackground('lightblue:1.3', TITLEBKG_STYLE2, TITLEBKG_FRAME_BEVEL); +$graph->SetTitleBackgroundFillStyle(TITLEBKG_FILLSTYLE_HSTRIPED, 'lightblue', 'navy'); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->value->Show(); +$bplot->value->SetFont(FF_VERDANA, FS_BOLD, 8); +$bplot->SetValuePos('top'); +$bplot->SetLegend('Bar Legend'); +$graph->Add($bplot); + +$pline = new PlotLine(HORIZONTAL, 8, 'red', 2); +$pline->SetLegend('Line Legend'); +$graph->legend->SetColumns(10); +$graph->Add($pline); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/splineex1.php b/vendor/amenadiel/jpgraph/Examples/examples_line/splineex1.php new file mode 100644 index 0000000000..a703189aa8 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/splineex1.php @@ -0,0 +1,53 @@ +Get(50); + +// Create the graph +$g = new Graph\Graph(300, 200); +$g->SetMargin(30, 20, 40, 30); +$g->title->Set("Natural cubic splines"); +$g->title->SetFont(FF_ARIAL, FS_NORMAL, 12); +$g->subtitle->Set('(Control points shown in red)'); +$g->subtitle->SetColor('darkred'); +$g->SetMarginColor('lightblue'); + +//$g->img->SetAntiAliasing(); + +// We need a linlin scale since we provide both +// x and y coordinates for the data points. +$g->SetScale('linlin'); + +// We want 1 decimal for the X-label +$g->xaxis->SetLabelFormat('%1.1f'); + +// We use a scatterplot to illustrate the original +// contro points. +$splot = new ScatterPlot($ydata, $xdata); + +// +$splot->mark->SetFillColor('red@0.3'); +$splot->mark->SetColor('red@0.5'); + +// And a line plot to stroke the smooth curve we got +// from the original control points +$lplot = new Plot\LinePlot($newy, $newx); +$lplot->SetColor('navy'); + +// Add the plots to the graph and stroke +$g->Add($lplot); +$g->Add($splot); +$g->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_line/staticlinebarex1.php b/vendor/amenadiel/jpgraph/Examples/examples_line/staticlinebarex1.php new file mode 100644 index 0000000000..27bf55c30a --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_line/staticlinebarex1.php @@ -0,0 +1,54 @@ +img->SetMargin(60, 30, 50, 40); +$graph->SetScale("textlin"); +$graph->SetShadow(); + +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 15); +$graph->title->Set("Cash flow "); +$graph->subtitle->Set("(Department X)"); + +// Show both X and Y grid +$graph->xgrid->Show(true, false); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10, 10); + +// Turn the tick mark out from the plot area +$graph->xaxis->SetTickSide(SIDE_DOWN); +$graph->yaxis->SetTickSide(SIDE_LEFT); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor("orange"); +$bplot->SetShadow(); + +// Show the actual value for each bar on top/bottom +$bplot->value->Show(); +$bplot->value->SetFormat("%02d kr"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add mark graph with static lines +$graph->AddLine(new PlotLine(HORIZONTAL, 0, "black", 2)); +$graph->AddLine(new PlotLine(VERTICAL, 3, "black", 2)); + +//$graph->title->Set("Test of bar gradient fill"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->yaxis->title->SetFont(FF_ARIAL, FS_BOLD, 11); +$graph->xaxis->title->SetFont(FF_ARIAL, FS_BOLD, 11); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_csimex01.php b/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_csimex01.php new file mode 100644 index 0000000000..76bb0a1e73 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_csimex01.php @@ -0,0 +1,76 @@ +SetBackgroundGradient('lightsteelblue:0.8','lightsteelblue:0.3'); +$graph->title->Set('CSIM with matrix'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,16); +$graph->title->SetColor('white'); + +// Create one matrix plot +$mp = new MatrixPlot($data,1); +$mp->SetModuleSize(13,15); +$mp->SetCenterPos(0.35,0.6); +$mp->colormap->SetNullColor('gray'); + +// Setup column lablels +$mp->collabel->Set($collabels); +$mp->collabel->SetSide('top'); +$mp->collabel->SetFont(FF_ARIAL,FS_NORMAL,8); +$mp->collabel->SetFontColor('lightgray'); + +// Setup row lablels +$mp->rowlabel->Set($rowlabels); +$mp->rowlabel->SetSide('right'); +$mp->rowlabel->SetFont(FF_ARIAL,FS_NORMAL,8); +$mp->rowlabel->SetFontColor('lightgray'); + +$mp->rowlabel->SetCSIMTargets($rowlabeltargets); +$mp->collabel->SetCSIMTargets($collabeltargets); + +// Move the legend more to the right +$mp->legend->SetMargin(90); +$mp->legend->SetColor('white'); +$mp->legend->SetFont(FF_VERDANA,FS_BOLD,10); + +$mp->SetCSIMTargets($csimtargets); + +$graph->Add($mp); +$graph->StrokeCSIM(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_edgeex01.php b/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_edgeex01.php new file mode 100644 index 0000000000..e66fd77a36 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_edgeex01.php @@ -0,0 +1,53 @@ +SetMarginColor('white'); +$graph->title->Set('Adding labels on the edges'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,14); + +// Create one matrix plot +$mp = new MatrixPlot($data,1); +$mp->SetModuleSize(13,15); +$mp->SetCenterPos(0.35,0.45); +$mp->colormap->SetNullColor('gray'); + +// Setup column lablels +$mp->collabel->Set($xlabels); +$mp->collabel->SetSide('bottom'); +$mp->collabel->SetFont(FF_ARIAL,FS_NORMAL,8); +$mp->collabel->SetFontColor('darkgray'); + +// Setup row lablels +$mp->rowlabel->Set($ylabels); +$mp->rowlabel->SetSide('right'); +$mp->rowlabel->SetFont(FF_ARIAL,FS_NORMAL,8); +$mp->rowlabel->SetFontColor('darkgray'); + +// Move the legend more to the right +$mp->legend->SetMargin(90); + +$graph->Add($mp); +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_edgeex02.php b/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_edgeex02.php new file mode 100644 index 0000000000..c07ba6a174 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_edgeex02.php @@ -0,0 +1,51 @@ +title->Set('Add ine row/col labels'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,14); + +$mp = new MatrixPlot($data,1); +$mp->SetSize(0.55); +$mp->SetCenterPos(0.45, 0.45); + +$rowtitles = array(); +for( $i=0; $i < $nrow; ++$i ) { + $rowtitles[$i] = sprintf('Row: %02d',$i); +} +$coltitles = array(); +for( $i=0; $i < $ncol; ++$i ) { + $coltitles[$i] = sprintf('Col: %02d',$i); +} + +$mp->rowlabel->Set($rowtitles); +$mp->rowlabel->SetFont(FF_ARIAL,FS_NORMAL,10); +$mp->rowlabel->SetFontColor('blue'); +$mp->rowlabel->SetSide('left'); + +$mp->collabel->Set($coltitles); +$mp->collabel->SetFont(FF_ARIAL,FS_NORMAL,10); +$mp->collabel->SetFontColor('darkred'); +$mp->collabel->SetAngle(70); // 90 is default for col titles +$mp->collabel->SetSide('bottom'); + +$graph->Add($mp); +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_ex0.php b/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_ex0.php new file mode 100644 index 0000000000..43777cf898 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_ex0.php @@ -0,0 +1,28 @@ +title->Set('Basic matrix example'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,14); + +// Create a ,atrix plot using all default values +$mp = new MatrixPlot($data); +$graph->Add($mp); + +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_ex01.php b/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_ex01.php new file mode 100644 index 0000000000..d0387dd1bc --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_ex01.php @@ -0,0 +1,38 @@ +title->Set('Possible legend positions'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,14); + +$mp = array(); +$n = 4; +$pos = array(0.3,0.33, 0.8,0.68, + 0.3,0.68, 0.8,0.33); +for($i=0; $i < $n; ++$i){ + $mp[$i] = new MatrixPlot($data); + $mp[$i]->colormap->SetMap($i); + $mp[$i]->SetModuleSize(4,5); + $mp[$i]->SetLegendLayout($i); + $mp[$i]->SetCenterPos($pos[$i*2],$pos[$i*2+1]); +} + +$graph->Add($mp); +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_ex02.php b/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_ex02.php new file mode 100644 index 0000000000..f81e59cd54 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_ex02.php @@ -0,0 +1,32 @@ +title->Set('Meshinterpolation=3'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,14); + +$mp = new MatrixPlot($data,1); +$mp->colormap->SetMap(0); +$mp->SetSize(200,160); +$mp->SetCenterPos(0.5,0.55); +$mp->legend->Show(false); +$graph->Add($mp); +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_ex03.php b/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_ex03.php new file mode 100644 index 0000000000..a943acd0fb --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_ex03.php @@ -0,0 +1,36 @@ +title->Set('Adding an icon to the background'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,14); + +$mp = new MatrixPlot($data,1); +$mp->SetSize(0.6); + +$icon = new IconPlot('icon.jpg',$width-1,$height-1,0.8,50); +$icon->SetAnchor('right','bottom'); +$graph->Add($icon); + +$graph->Add($mp); +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_ex04.1.php b/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_ex04.1.php new file mode 100644 index 0000000000..419a437a3e --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_ex04.1.php @@ -0,0 +1,40 @@ +title->Set('Adding a background image'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,14); +$graph->subtitle->Set('Alphablending = 0.2'); + +// Add a stretched background image +$graph->SetBackgroundImage('ironrod.jpg',BGIMG_FILLFRAME); +$graph->SetBackgroundImageMix(50); + +$mp = new MatrixPlot($data,1); +$mp->SetSize(0.65); +$mp->SetCenterPos(0.5,0.5); +$mp->SetLegendLayout(1); +$mp->SetAlpha(0.2); + +$graph->Add($mp); +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_ex04.2.php b/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_ex04.2.php new file mode 100644 index 0000000000..6650444cf4 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_ex04.2.php @@ -0,0 +1,40 @@ +title->Set('Adding a background image'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,14); +$graph->subtitle->Set('Alphablending = 0.7'); + +// Add a stretched background image +$graph->SetBackgroundImage('ironrod.jpg',BGIMG_FILLFRAME); +$graph->SetBackgroundImageMix(50); + +$mp = new MatrixPlot($data,1); +$mp->SetSize(0.65); +$mp->SetCenterPos(0.5,0.5); +$mp->SetLegendLayout(1); +$mp->SetAlpha(0.7); + +$graph->Add($mp); +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_ex04.php b/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_ex04.php new file mode 100644 index 0000000000..2917f15c18 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_ex04.php @@ -0,0 +1,38 @@ +title->Set('Adding a background image'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,14); + +// Add a stretched background image +$graph->SetBackgroundImage('ironrod.jpg',BGIMG_FILLFRAME); +$graph->SetBackgroundImageMix(50); + +$mp = new MatrixPlot($data,1); +$mp->SetSize(0.6); +$mp->SetCenterPos(0.5,0.5); +$mp->SetLegendLayout(1); + +$graph->Add($mp); +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_ex05.php b/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_ex05.php new file mode 100644 index 0000000000..d3f989eac3 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_ex05.php @@ -0,0 +1,31 @@ +title->Set('Using a circular module type'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,14); + +$mp = new MatrixPlot($data,2); +$mp->SetSize(0.85); +$mp->SetModuleType(1); +$mp->SetBackgroundColor('teal:1.8'); +$mp->SetCenterPos(0.5,0.45); +$mp->SetLegendLayout(1); + +$graph->Add($mp); +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_ex06.php b/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_ex06.php new file mode 100644 index 0000000000..7c3d472748 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_ex06.php @@ -0,0 +1,75 @@ +SetBackgroundGradient('lightsteelblue:0.8','lightsteelblue:0.3'); +$graph->title->Set('Matrix with lines'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,18); +$graph->title->SetColor('white'); + +// Create two lines to add as markers +$l1 = new PlotLine(VERTICAL, 5, 'lightgray:1.5', 4); +$l2 = new PlotLine(HORIZONTAL, 3, 'lightgray:1.5', 4); + +// Create one matrix plot +$mp = new MatrixPlot($data,1); +$mp->SetModuleSize(13,15); +$mp->SetCenterPos(0.35,0.6); +$mp->colormap->SetNullColor('gray'); + +// Add lines +$mp->AddLine($l1); +$mp->AddLine($l2); +// this could also be done as +// $mp->AddLine(array($l1,$l2)); + +// Setup column lablels +$mp->collabel->Set($collabels); +$mp->collabel->SetSide('top'); +$mp->collabel->SetFont(FF_ARIAL,FS_NORMAL,8); +$mp->collabel->SetFontColor('lightgray'); + +// Setup row lablels +$mp->rowlabel->Set($rowlabels); +$mp->rowlabel->SetSide('right'); +$mp->rowlabel->SetFont(FF_ARIAL,FS_NORMAL,8); +$mp->rowlabel->SetFontColor('lightgray'); + +// Move the legend more to the right +$mp->legend->SetMargin(90); +$mp->legend->SetColor('white'); +$mp->legend->SetFont(FF_VERDANA,FS_BOLD,10); + +$graph->Add($mp); +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_introex.php b/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_introex.php new file mode 100644 index 0000000000..d96844a00a --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_introex.php @@ -0,0 +1,90 @@ +Push(); + +//-------------------------------------------------------------- +// Setup a basic matrix graph +//-------------------------------------------------------------- +$width = 740; +$height = 500; +$graph = new MatrixGraph($width, $height); +$graph->SetMargin(1, 2, 70, 1); +$graph->SetColor('white'); +$graph->SetMarginColor('#fafafa'); +$graph->title->Set('Intro matrix graph'); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); + +// Setup the background image +$graph->SetBackgroundImage('fireplace.jpg', BGIMG_FILLPLOT); +$graph->SetBackgroundImageMix(50); + +// Setup the timer in the right footer +$graph->footer->SetTimer($timer); +$graph->footer->right->SetColor('white'); + +//-------------------------------------------------------------- +// Create the 2 matrix plots +//-------------------------------------------------------------- +$mp = array(); +$n = 2; +for ($i = 0; $i < $n; ++$i) { + $mp[$i] = new MatrixPlot($data); + $mp[$i]->colormap->SetMap($i); + $mp[$i]->SetSize(300, 250); + $mp[$i]->SetLegendLayout(1); + $mp[$i]->SetAlpha(0.2); + + // Make the legend slightly longer than default + $mp[$i]->legend->SetSize(20, 280); +} +$mp[1]->colormap->SetMap(3); + +$hor1 = new LayoutHor(array($mp[0], $mp[1])); +$hor1->SetCenterPos(0.5, 0.5); + +$graph->Add($hor1); + +//-------------------------------------------------------------- +// Add texts to the graph +//-------------------------------------------------------------- +$txts = array( + array('Temperature gradient', $width / 2, 80), + array('Heat color map', 200, 110), + array('High contrast map', 560, 110)); + +$n = count($txts); +$t = array(); +for ($i = 0; $i < $n; ++$i) { + $t[$i] = new Text($txts[$i][0], $txts[$i][1], $txts[$i][2]); + $t[$i]->SetFont(FF_ARIAL, FS_BOLD, 14); + $t[$i]->SetColor('white'); + $t[$i]->SetAlign('center', 'top'); +} +$graph->Add($t); + +//-------------------------------------------------------------- +// Add Jpgraph logo to top left corner +//-------------------------------------------------------------- +$icon = new IconPlot('jpglogo.jpg', 2, 2, 0.9, 50); +$graph->Add($icon); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_layout_ex1.php b/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_layout_ex1.php new file mode 100644 index 0000000000..1fefb1a815 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrix_layout_ex1.php @@ -0,0 +1,44 @@ +title->Set('Matrix layout example'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,14); + +$mp = array(); +$n = 5; +for($i=0; $i < $n; ++$i){ + $mp[$i] = new MatrixPlot($data); + $mp[$i]->colormap->SetMap($i); + if( $i < 2 ) + $mp[$i]->SetSize(0.35); + else + $mp[$i]->SetSize(0.21); + // We need to make the legend a bit smaller since by + // defalt has a ~45% height + $mp[$i]->legend->SetModuleSize(15,2); +} + +$hor1 = new LayoutHor(array($mp[0],$mp[1])); +$hor2 = new LayoutHor(array($mp[2],$mp[3],$mp[4])); +$vert = new LayoutVert(array($hor1,$hor2)); +$vert->SetCenterPos(0.45,0.5); + +$graph->Add($vert); +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrixex00.php b/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrixex00.php new file mode 100644 index 0000000000..2ba5114ac3 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_matrix/matrixex00.php @@ -0,0 +1,59 @@ +title->Set('Matrix example 00'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,14); + +//$graph->SetColor('darkgreen@0.8'); + +$mp = array(); +$n = 5; +for($i=0; $i < $n; ++$i){ + $mp[$i] = new MatrixPlot($data); + $mp[$i]->colormap->SetMap($i); + if( $i < 2 ) + $mp[$i]->SetSize(0.35); + else + $mp[$i]->SetSize(0.21); +} + +$hor1 = new LayoutHor(array($mp[0],$mp[1])); +$hor2 = new LayoutHor(array($mp[2],$mp[3],$mp[4])); +$vert = new LayoutVert(array($hor1,$hor2)); +$vert->SetCenterPos(0.45,0.5); + +//$mp = new MatrixPlot($data); +//$mp->colormap->SetMap(2); +//$mp->SetCenterPos(0.5, 0.45); +//$mp->SetLegendLayout(0); +//$mp->SetSize(0.6); +//$mp->legend->Show(false); +//$mp->SetModuleSize(5,5); + +//$mp->legend->SetModuleSize(20,4); +//$mp->legend->SetSize(20,0.5); + +//$t = new Text('A text string',10,10); +//$graph->Add($t); + +//$graph->Add($mp); + +$graph->Add($vert); +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_multigraph/comb90dategraphex01.php b/vendor/amenadiel/jpgraph/Examples/examples_multigraph/comb90dategraphex01.php new file mode 100644 index 0000000000..17b6bf35cb --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_multigraph/comb90dategraphex01.php @@ -0,0 +1,95 @@ + 359) { + $data_winddirection[$i + 1] = 0; + } + + $data_windspeed[$i + 1] = $data_windspeed[$i] + rand(-2, 2); + if ($data_windspeed[$i + 1] < 0) { + $data_windspeed[$i + 1] = 0; + } + + $xdata[$i] = $start + $i * SAMPLERATE; +} +$xdata[$i] = $start + $i * SAMPLERATE; + +// Setup the Wind direction graph +$graph = new Graph\Graph(300, 800); +$graph->SetMarginColor('lightgray:1.7'); +$graph->SetScale('datlin', 0, 360); +$graph->Set90AndMargin(50, 30, 60, 30); +$graph->SetFrame(true, 'white', 0); +$graph->SetBox(); + +$graph->title->Set('Wind direction'); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$graph->title->SetMargin(10); + +$graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 9); +$graph->xaxis->scale->SetDateFormat('h:i'); +$graph->xgrid->Show(); + +$graph->yaxis->SetLabelAngle(45); +$graph->yaxis->SetFont(FF_ARIAL, FS_NORMAL, 9); +$graph->yaxis->SetLabelMargin(0); +$graph->yaxis->scale->SetAutoMin(0); + +$line = new Plot\LinePlot($data_winddirection, $xdata); +$line->SetStepStyle(); +$line->SetColor('blue'); + +$graph->Add($line); + +// Setup the wind speed graph +$graph2 = new Graph\Graph(300, 800); +$graph2->SetScale('datlin'); +$graph2->Set90AndMargin(50, 30, 60, 30); +$graph2->SetMarginColor('lightgray:1.7'); +$graph2->SetFrame(true, 'white', 0); +$graph2->SetBox(); + +$graph2->title->Set('Windspeed'); +$graph2->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$graph2->title->SetMargin(10); + +$graph2->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 9); +$graph2->xaxis->scale->SetDateFormat('h:i'); +$graph2->xgrid->Show(); + +$graph2->yaxis->SetLabelAngle(45); +$graph2->yaxis->SetFont(FF_ARIAL, FS_NORMAL, 9); +$graph2->yaxis->SetLabelMargin(0); +$graph2->yaxis->scale->SetAutoMin(0); + +$line2 = new Plot\LinePlot($data_windspeed, $xdata); +$line2->SetStepStyle(); +$line2->SetColor('red'); + +$graph2->Add($line2); + +//----------------------- +// Create a multigraph +//---------------------- +$mgraph = new MGraph(); +$mgraph->SetMargin(2, 2, 2, 2); +$mgraph->SetFrame(true, 'darkgray', 2); +$mgraph->SetFillColor('lightgray'); +$mgraph->Add($graph); +$mgraph->Add($graph2, 300, 0); +$mgraph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_multigraph/comb90dategraphex02.php b/vendor/amenadiel/jpgraph/Examples/examples_multigraph/comb90dategraphex02.php new file mode 100644 index 0000000000..807e306f34 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_multigraph/comb90dategraphex02.php @@ -0,0 +1,102 @@ + 359) { + $data_winddirection[$i + 1] = 0; + } + + $data_windspeed[$i + 1] = $data_windspeed[$i] + rand(-2, 2); + if ($data_windspeed[$i + 1] < 0) { + $data_windspeed[$i + 1] = 0; + } + + $xdata[$i] = $start + $i * SAMPLERATE; +} +$xdata[$i] = $start + $i * SAMPLERATE; + +DEFINE('BKG_COLOR', 'lightgray:1.7'); +DEFINE('WIND_HEIGHT', 800); +DEFINE('WIND_WIDTH', 280); + +// Setup the Wind direction graph +$graph = new Graph\Graph(WIND_WIDTH, WIND_HEIGHT); +$graph->SetMarginColor(BKG_COLOR); +$graph->SetScale('datlin', 0, 360); +$graph->Set90AndMargin(50, 10, 60, 30); +$graph->SetFrame(true, 'white', 0); +$graph->SetBox(); + +$graph->title->Set('Wind direction'); +$graph->title->SetColor('blue'); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$graph->title->SetMargin(5); + +$graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 9); +$graph->xaxis->scale->SetDateFormat('h:i'); +$graph->xgrid->Show(); + +$graph->yaxis->SetLabelAngle(90); +$graph->yaxis->SetColor('blue'); +$graph->yaxis->SetFont(FF_ARIAL, FS_NORMAL, 9); +$graph->yaxis->SetLabelMargin(0); +$graph->yaxis->scale->SetAutoMin(0); + +$line = new Plot\LinePlot($data_winddirection, $xdata); +$line->SetStepStyle(); +$line->SetColor('blue'); + +$graph->Add($line); + +// Setup the wind speed graph +$graph2 = new Graph\Graph(WIND_WIDTH - 30, WIND_HEIGHT); +$graph2->SetScale('datlin'); +$graph2->Set90AndMargin(5, 20, 60, 30); +$graph2->SetMarginColor(BKG_COLOR); +$graph2->SetFrame(true, 'white', 0); +$graph2->SetBox(); + +$graph2->title->Set('Windspeed'); +$graph2->title->SetColor('red'); +$graph2->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$graph2->title->SetMargin(5); + +$graph2->xaxis->HideLabels(); +$graph2->xgrid->Show(); + +$graph2->yaxis->SetLabelAngle(90); +$graph2->yaxis->SetColor('red'); +$graph2->yaxis->SetFont(FF_ARIAL, FS_NORMAL, 9); +$graph2->yaxis->SetLabelMargin(0); +$graph2->yaxis->scale->SetAutoMin(0); + +$line2 = new Plot\LinePlot($data_windspeed, $xdata); +$line2->SetStepStyle(); +$line2->SetColor('red'); + +$graph2->Add($line2); + +//----------------------- +// Create a multigraph +//---------------------- +$mgraph = new MGraph(); +$mgraph->SetMargin(2, 2, 2, 2); +$mgraph->SetFrame(true, 'darkgray', 2); +$mgraph->SetFillColor(BKG_COLOR); +$mgraph->Add($graph); +$mgraph->Add($graph2, 280, 0); +$mgraph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_multigraph/comb90dategraphex03.php b/vendor/amenadiel/jpgraph/Examples/examples_multigraph/comb90dategraphex03.php new file mode 100644 index 0000000000..8a2918f78e --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_multigraph/comb90dategraphex03.php @@ -0,0 +1,146 @@ + 359) { + $data_winddirection[$i + 1] = 0; + } + + $data_windspeed[$i + 1] = $data_windspeed[$i] + rand(-2, 2); + if ($data_windspeed[$i + 1] < 0) { + $data_windspeed[$i + 1] = 0; + } + + $data_windtemp[$i + 1] = $data_windtemp[$i] + rand(-1.5, 1.5); + + $xdata[$i] = $start + $i * SAMPLERATE; +} +$xdata[$i] = $start + $i * SAMPLERATE; + +//DEFINE('BKG_COLOR','lightgray:1.7'); +DEFINE('BKG_COLOR', 'green:1.98'); +DEFINE('WIND_HEIGHT', 800); +DEFINE('WIND_WIDTH', 250); + +//------------------------------------------------------------------ +// Setup the Wind direction graph +//------------------------------------------------------------------ +$graph = new Graph\Graph(WIND_WIDTH, WIND_HEIGHT); +$graph->SetMarginColor(BKG_COLOR); +$graph->SetScale('datlin', 0, 360); +$graph->Set90AndMargin(50, 10, 70, 30); +$graph->SetFrame(true, 'white', 0); +$graph->SetBox(); + +$graph->title->Set('Wind direction'); +$graph->title->SetColor('blue'); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$graph->title->SetMargin(5); + +$graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 9); +$graph->xaxis->scale->SetDateFormat('H:i'); +$graph->xgrid->Show(); + +$graph->yaxis->SetLabelAngle(90); +$graph->yaxis->SetColor('blue'); +$graph->yaxis->SetFont(FF_ARIAL, FS_NORMAL, 9); +$graph->yaxis->SetLabelMargin(0); +$graph->yaxis->scale->SetAutoMin(0); + +$line = new Plot\LinePlot($data_winddirection, $xdata); +$line->SetStepStyle(); +$line->SetColor('blue'); + +$graph->Add($line); + +//------------------------------------------------------------------ +// Setup the wind speed graph +//------------------------------------------------------------------ +$graph2 = new Graph\Graph(WIND_WIDTH - 30, WIND_HEIGHT); +$graph2->SetScale('datlin'); +$graph2->Set90AndMargin(5, 20, 70, 30); +$graph2->SetMarginColor(BKG_COLOR); +$graph2->SetFrame(true, 'white', 0); +$graph2->SetBox(); + +$graph2->title->Set('Windspeed'); +$graph2->title->SetColor('red'); +$graph2->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$graph2->title->SetMargin(5); + +$graph2->xaxis->HideLabels(); +$graph2->xgrid->Show(); + +$graph2->yaxis->SetLabelAngle(90); +$graph2->yaxis->SetColor('red'); +$graph2->yaxis->SetFont(FF_ARIAL, FS_NORMAL, 9); +$graph2->yaxis->SetLabelMargin(0); +$graph2->yaxis->scale->SetAutoMin(0); + +$line2 = new Plot\LinePlot($data_windspeed, $xdata); +$line2->SetStepStyle(); +$line2->SetColor('red'); + +$graph2->Add($line2); + +//------------------------------------------------------------------ +// Setup the wind temp graph +//------------------------------------------------------------------ +$graph3 = new Graph\Graph(WIND_WIDTH - 30, WIND_HEIGHT); +$graph3->SetScale('datlin'); +$graph3->Set90AndMargin(5, 20, 70, 30); +$graph3->SetMarginColor(BKG_COLOR); +$graph3->SetFrame(true, 'white', 0); +$graph3->SetBox(); + +$graph3->title->Set('Temperature'); +$graph3->title->SetColor('black'); +$graph3->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$graph3->title->SetMargin(5); + +$graph3->xaxis->HideLabels(); +$graph3->xgrid->Show(); + +$graph3->yaxis->SetLabelAngle(90); +$graph3->yaxis->SetColor('black'); +$graph3->yaxis->SetFont(FF_ARIAL, FS_NORMAL, 9); +$graph3->yaxis->SetLabelMargin(0); +$graph3->yaxis->scale->SetAutoMin(-10); + +$line3 = new Plot\LinePlot($data_windtemp, $xdata); +$line3->SetStepStyle(); +$line3->SetColor('black'); + +$graph3->Add($line3); + +//----------------------- +// Create a multigraph +//---------------------- +$mgraph = new MGraph(); +$mgraph->SetMargin(2, 2, 2, 2); +$mgraph->SetFrame(true, 'darkgray', 2); +$mgraph->SetFillColor(BKG_COLOR); +$mgraph->Add($graph, 0, 50); +$mgraph->Add($graph2, 250, 50); +$mgraph->Add($graph3, 460, 50); +$mgraph->title->Set('Climate diagram 12 March 2009'); +$mgraph->title->SetFont(FF_ARIAL, FS_BOLD, 20); +$mgraph->title->SetMargin(8); +$mgraph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_multigraph/combgraphex1.php b/vendor/amenadiel/jpgraph/Examples/examples_multigraph/combgraphex1.php new file mode 100644 index 0000000000..78b0d85a9f --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_multigraph/combgraphex1.php @@ -0,0 +1,86 @@ +getTicks($datax, DSUTILS_MONTH1); + +// Now create the real graph +// Combine a line and a bar graph + +// We add some grace to the end of the X-axis scale so that the first and last +// data point isn't exactly at the very end or beginning of the scale +$grace = 400000; +$xmin = $datax[0] - $grace; +$xmax = $datax[$n - 1] + $grace; + +// Overall width of graphs +$w = 450; +// Left and right margin for each graph +$lm = 25; +$rm = 15; + +//---------------------- +// Setup the line graph +//---------------------- +$graph = new Graph\Graph($w, 250); +$graph->SetScale('linlin', 0, 0, $xmin, $xmax); +$graph->SetMargin($lm, $rm, 10, 30); +$graph->SetMarginColor('white'); +$graph->SetFrame(false); +$graph->SetBox(true); +$graph->title->Set('Example of combined graph'); +$graph->title->SetFont(FF_ARIAL, FS_NORMAL, 14); +$graph->xaxis->SetTickPositions($tickPositions, $minTickPositions); +$graph->xaxis->SetLabelFormatString('My', true); +$graph->xgrid->Show(); +$p1 = new Plot\LinePlot($datay, $datax); +$graph->Add($p1); + +//---------------------- +// Setup the bar graph +//---------------------- +$graph2 = new Graph\Graph($w, 110); +$graph2->SetScale('linlin', 0, 0, $xmin, $xmax); +$graph2->SetMargin($lm, $rm, 5, 10); +$graph2->SetMarginColor('white'); +$graph2->SetFrame(false); +$graph2->SetBox(true); +$graph2->xgrid->Show(); +$graph2->xaxis->SetTickPositions($tickPositions, $minTickPositions); +$graph2->xaxis->SetLabelFormatString('My', true); +$graph2->xaxis->SetPos('max'); +$graph2->xaxis->HideLabels(); +$graph2->xaxis->SetTickSide(SIDE_DOWN); +$b1 = new Plot\BarPlot($datay2, $datax); +$b1->SetFillColor('teal'); +$b1->SetColor('teal:1.2'); +$graph2->Add($b1); + +//----------------------- +// Create a multigraph +//---------------------- +$mgraph = new MGraph(); +$mgraph->SetMargin(2, 2, 2, 2); +$mgraph->SetFrame(true, 'darkgray', 2); +$mgraph->Add($graph); +$mgraph->Add($graph2, 0, 240); +$mgraph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_multigraph/combgraphex2.php b/vendor/amenadiel/jpgraph/Examples/examples_multigraph/combgraphex2.php new file mode 100644 index 0000000000..44ac049cdf --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_multigraph/combgraphex2.php @@ -0,0 +1,87 @@ +SetScale('linlin', 0, 0, $xmin, $xmax); +$graph->SetMargin($lm, $rm, 10, 30); +$graph->SetMarginColor('white'); +$graph->SetFrame(false); +$graph->SetBox(true); +$graph->title->Set('Example of combined graph with background'); +$graph->title->SetFont(FF_ARIAL, FS_NORMAL, 14); +$graph->xaxis->SetTickPositions($tickPositions, $minTickPositions); +$graph->xaxis->SetLabelFormatString('My', true); +$graph->xgrid->Show(); +$p1 = new Plot\LinePlot($datay, $datax); +$graph->Add($p1); + +//---------------------- +// Setup the bar graph +//---------------------- +$graph2 = new Graph\Graph($w, 110); +$graph2->SetScale('linlin', 0, 0, $xmin, $xmax); +$graph2->SetMargin($lm, $rm, 5, 10); +$graph2->SetMarginColor('white'); +$graph2->SetFrame(false); +$graph2->SetBox(true); +$graph2->xgrid->Show(); +$graph2->xaxis->SetTickPositions($tickPositions, $minTickPositions); +$graph2->xaxis->SetLabelFormatString('My', true); +$graph2->xaxis->SetPos('max'); +$graph2->xaxis->HideLabels(); +$graph2->xaxis->SetTickSide(SIDE_DOWN); +$b1 = new Plot\BarPlot($datay2, $datax); +$b1->SetFillColor('teal'); +$b1->SetColor('teal:1.2'); +$graph2->Add($b1); + +//----------------------- +// Create a multigraph +//---------------------- +$mgraph = new MGraph(); +$mgraph->SetImgFormat('jpeg', 60); +$mgraph->SetMargin(2, 2, 2, 2); +$mgraph->SetFrame(true, 'darkgray', 2); +$mgraph->SetBackgroundImage('tiger1.jpg'); +$mgraph->AddMix($graph, 0, 0, 85); +$mgraph->AddMix($graph2, 0, 250, 85); +$mgraph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex00.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex00.php new file mode 100644 index 0000000000..e8cef55235 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex00.php @@ -0,0 +1,47 @@ +SetColor('white'); +$graph->SetMarginColor('white'); +$graph->SetFrame(false); + +//--------------------------------------------------------------------- +// Now we need to create an odometer to add to the graph. +// By default the scale will be 0 to 100 +//--------------------------------------------------------------------- +$odo = new Odometer(); + +//--------------------------------------------------------------------- +// Set display value for the odometer +//--------------------------------------------------------------------- +$odo->needle->Set(40); + +//--------------------------------------------------------------------- +// Add the odometer to the graph +//--------------------------------------------------------------------- +$graph->Add($odo); + +//--------------------------------------------------------------------- +// ... and finally stroke and stream the image back to the browser +//--------------------------------------------------------------------- +$graph->Stroke(); + +// EOF +?> \ No newline at end of file diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex01.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex01.php new file mode 100644 index 0000000000..3d29aa02b2 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex01.php @@ -0,0 +1,69 @@ +title->Set("Odometer title"); +$graph->title->SetColor("white"); +$graph->subtitle->Set("2002-02-13"); +$graph->subtitle->SetColor("white"); + +//--------------------------------------------------------------------- +// Specify caption. +// * (This is the text at the bottom of the graph.) The margins will +// automatically adjust to fit the height of the text. A caption +// may have multiple lines by including a '\n' character in the +// string. +//--------------------------------------------------------------------- +$graph->caption->Set("First caption row\n... second row"); +$graph->caption->SetColor("white"); + +//--------------------------------------------------------------------- +// Now we need to create an odometer to add to the graph. +// By default the scale will be 0 to 100 +//--------------------------------------------------------------------- +$odo = new Odometer(); + +//--------------------------------------------------------------------- +// Set color indication between values 80 and 100 as red +//--------------------------------------------------------------------- +$odo->AddIndication(80,100,"red"); + +//--------------------------------------------------------------------- +// Set display value for the odometer +//--------------------------------------------------------------------- +$odo->needle->Set(30); + +//--------------------------------------------------------------------- +// Add the odometer to the graph +//--------------------------------------------------------------------- +$graph->Add($odo); + +//--------------------------------------------------------------------- +// ... and finally stroke and stream the image back to the browser +//--------------------------------------------------------------------- +$graph->Stroke(); + +// EOF +?> \ No newline at end of file diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex010.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex010.php new file mode 100644 index 0000000000..3c70ad2f6f --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex010.php @@ -0,0 +1,75 @@ +AddIndication(80,100,"red"); +$odo2->AddIndication(20,30,"green"); +$odo2->AddIndication(65,100,"red"); +$odo3->AddIndication(60,90,"yellow"); +$odo3->AddIndication(90,100,"red"); + +//--------------------------------------------------------------------- +// Set display values for the odometers +//--------------------------------------------------------------------- +$odo1->needle->Set(17); +$odo2->needle->Set(47); +$odo3->needle->Set(86); + +$odo1->needle->SetFillColor("blue"); +$odo2->needle->SetFillColor("yellow:0.7"); +$odo3->needle->SetFillColor("black"); +$odo3->needle->SetColor("black"); + + +//--------------------------------------------------------------------- +// Set scale label properties +//--------------------------------------------------------------------- +$odo1->scale->label->SetColor("navy"); +$odo2->scale->label->SetColor("blue"); +$odo3->scale->label->SetColor("darkred"); + +$odo1->scale->label->SetFont(FF_FONT1); +$odo2->scale->label->SetFont(FF_FONT2,FS_BOLD); +$odo3->scale->label->SetFont(FF_ARIAL,FS_BOLD,11); + +//--------------------------------------------------------------------- +// Add the odometers to the graph using a vertical layout +//--------------------------------------------------------------------- +$l1 = new LayoutVert( array($odo1,$odo2,$odo3) ) ; +$graph->Add( $l1 ); + +//--------------------------------------------------------------------- +// ... and finally stroke and stream the image back to the browser +//--------------------------------------------------------------------- +$graph->Stroke(); + +// EOF +?> \ No newline at end of file diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex011.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex011.php new file mode 100644 index 0000000000..cc74f4f702 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex011.php @@ -0,0 +1,108 @@ +SetShadow(); + +//--------------------------------------------------------------------- +// Specify title and subtitle using default fonts +// * Note each title may be multilines by using a '\n' as a line +// divider. +//--------------------------------------------------------------------- +$graph->title->Set("Result from 2002"); +$graph->title->SetColor("white"); +$graph->subtitle->Set("O1 - W-Site"); +$graph->subtitle->SetColor("white"); + +//--------------------------------------------------------------------- +// Specify caption. +// * (This is the text at the bottom of the graph.) The margins will +// automatically adjust to fit the height of the text. A caption +// may have multiple lines by including a '\n' character in the +// string. +//--------------------------------------------------------------------- +$graph->caption->Set("Fig1. Values within 85%\nconfidence intervall"); +$graph->caption->SetColor("white"); + +//--------------------------------------------------------------------- +// We will display three odometers stacked vertically +// The first thing to do is to create them +//--------------------------------------------------------------------- +$odo1 = new Odometer(); +$odo2 = new Odometer(); +$odo3 = new Odometer(); + + +//--------------------------------------------------------------------- +// Set caption for each odometer +//--------------------------------------------------------------------- +$odo1->caption->Set("April"); +$odo1->caption->SetFont(FF_FONT2,FS_BOLD); +$odo2->caption->Set("May"); +$odo2->caption->SetFont(FF_FONT2,FS_BOLD); +$odo3->caption->Set("June"); +$odo3->caption->SetFont(FF_FONT2,FS_BOLD); + +//--------------------------------------------------------------------- +// Set Indicator bands for the odometers +//--------------------------------------------------------------------- +$odo1->AddIndication(80,100,"red"); +$odo2->AddIndication(20,30,"green"); +$odo2->AddIndication(65,100,"red"); +$odo3->AddIndication(60,90,"yellow"); +$odo3->AddIndication(90,100,"red"); + +//--------------------------------------------------------------------- +// Set display values for the odometers +//--------------------------------------------------------------------- +$odo1->needle->Set(17); +$odo2->needle->Set(47); +$odo3->needle->Set(86); + +$odo1->needle->SetFillColor("blue"); +$odo2->needle->SetFillColor("yellow:0.7"); +$odo3->needle->SetFillColor("black"); +$odo3->needle->SetColor("black"); + + +//--------------------------------------------------------------------- +// Set scale label properties +//--------------------------------------------------------------------- +$odo1->scale->label->SetColor("navy"); +$odo2->scale->label->SetColor("blue"); +$odo3->scale->label->SetColor("darkred"); + +$odo1->scale->label->SetFont(FF_FONT1); +$odo2->scale->label->SetFont(FF_FONT2,FS_BOLD); +$odo3->scale->label->SetFont(FF_ARIAL,FS_BOLD,10); + +//--------------------------------------------------------------------- +// Add the odometers to the graph using a vertical layout +//--------------------------------------------------------------------- +$l1 = new LayoutVert( array($odo1,$odo2,$odo3) ) ; +$graph->Add( $l1 ); + +//--------------------------------------------------------------------- +// ... and finally stroke and stream the image back to the browser +//--------------------------------------------------------------------- +$graph->Stroke(); + +// EOF +?> \ No newline at end of file diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex012.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex012.php new file mode 100644 index 0000000000..b54f773dfd --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex012.php @@ -0,0 +1,119 @@ +SetShadow(); + +//--------------------------------------------------------------------- +// Specify title and subtitle using default fonts +// * Note each title may be multilines by using a '\n' as a line +// divider. +//--------------------------------------------------------------------- +$graph->title->Set("Result from 2002"); +$graph->title->SetColor("white"); +$graph->subtitle->Set("O1 - W-Site"); +$graph->subtitle->SetColor("white"); + +//--------------------------------------------------------------------- +// Specify caption. +// * (This is the text at the bottom of the graph.) The margins will +// automatically adjust to fit the height of the text. A caption +// may have multiple lines by including a '\n' character in the +// string. +//--------------------------------------------------------------------- +$graph->caption->Set("Fig1. Values within 85%\nconfidence intervall"); +$graph->caption->SetColor("white"); + +//--------------------------------------------------------------------- +// We will display two columns where the first column has +// three odometers (same as in example 11) and the second column +// has two odoemters +// The first thing to do is to create them +//--------------------------------------------------------------------- +$odo1 = new Odometer(); +$odo2 = new Odometer(); +$odo3 = new Odometer(); +$odo4 = new Odometer(); +$odo5 = new Odometer(); + + +//--------------------------------------------------------------------- +// Set caption for each odometer +//--------------------------------------------------------------------- +$odo1->caption->Set("April"); +$odo1->caption->SetFont(FF_ARIAL,FS_BOLD); +$odo2->caption->Set("May"); +$odo2->caption->SetFont(FF_FONT2,FS_BOLD); +$odo3->caption->Set("June"); +$odo3->caption->SetFont(FF_FONT2,FS_BOLD); +$odo4->caption->Set("Daily low average"); +$odo4->caption->SetFont(FF_FONT1,FS_BOLD); +$odo5->caption->Set("Daily high average"); +$odo5->caption->SetFont(FF_FONT1,FS_BOLD); + +//--------------------------------------------------------------------- +// Set Indicator bands for the odometers +//--------------------------------------------------------------------- +$odo1->AddIndication(80,100,"red"); +$odo2->AddIndication(20,30,"green"); +$odo2->AddIndication(65,100,"red"); +$odo3->AddIndication(60,90,"yellow"); +$odo3->AddIndication(90,100,"red"); + +//--------------------------------------------------------------------- +// Set display values for the odometers +//--------------------------------------------------------------------- +$odo1->needle->Set(17); +$odo2->needle->Set(47); +$odo3->needle->Set(86); +$odo4->needle->Set(22); +$odo5->needle->Set(77); + +$odo1->needle->SetFillColor("blue"); +$odo2->needle->SetFillColor("yellow:0.7"); +$odo3->needle->SetFillColor("black"); +$odo3->needle->SetColor("black"); + + +//--------------------------------------------------------------------- +// Set scale label properties +//--------------------------------------------------------------------- +$odo1->scale->label->SetColor("navy"); +$odo2->scale->label->SetColor("blue"); +$odo3->scale->label->SetColor("darkred"); + +$odo1->scale->label->SetFont(FF_FONT1); +$odo2->scale->label->SetFont(FF_FONT2,FS_BOLD); +$odo3->scale->label->SetFont(FF_ARIAL,FS_BOLD,10); + +//--------------------------------------------------------------------- +// Add the odometers to the graph using a vertical layout +//--------------------------------------------------------------------- +$l1 = new LayoutVert( array($odo1,$odo2,$odo3) ) ; +$l2 = new LayoutVert( array($odo4,$odo5) ) ; +$l3 = new LayoutHor( array($l1,$l2) ); +$graph->Add( $l3 ); + +//--------------------------------------------------------------------- +// ... and finally stroke and stream the image back to the browser +//--------------------------------------------------------------------- +$graph->Stroke(); + +// EOF +?> \ No newline at end of file diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex02.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex02.php new file mode 100644 index 0000000000..47ccc6bae9 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex02.php @@ -0,0 +1,71 @@ +title->Set("Odometer title"); +$graph->title->SetColor("white"); +$graph->subtitle->Set("2002-02-13"); +$graph->subtitle->SetColor("white"); + +//--------------------------------------------------------------------- +// Specify caption. +// * (This is the text at the bottom of the graph.) The margins will +// automatically adjust to fit the height of the text. A caption +// may have multiple lines by including a '\n' character in the +// string. +//--------------------------------------------------------------------- +$graph->caption->Set("First caption row\n... second row"); +$graph->caption->SetColor("white"); + +//--------------------------------------------------------------------- +// Now we need to create an odometer to add to the graph. +// By default the scale will be 0 to 100 +//--------------------------------------------------------------------- +$odo = new Odometer(); + +//--------------------------------------------------------------------- +// Set color indication +//--------------------------------------------------------------------- +$odo->AddIndication(0,50,"green"); +$odo->AddIndication(50,80,"yellow"); +$odo->AddIndication(80,100,"red"); + +//--------------------------------------------------------------------- +// Set display value for the odometer +//--------------------------------------------------------------------- +$odo->needle->Set(30); + +//--------------------------------------------------------------------- +// Add the odometer to the graph +//--------------------------------------------------------------------- +$graph->Add($odo); + +//--------------------------------------------------------------------- +// ... and finally stroke and stream the image back to the browser +//--------------------------------------------------------------------- +$graph->Stroke(); + +// EOF +?> \ No newline at end of file diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex03.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex03.php new file mode 100644 index 0000000000..91ca401c80 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex03.php @@ -0,0 +1,83 @@ +SetShadow(); + +//--------------------------------------------------------------------- +// Specify title and subtitle using default fonts +// * Note each title may be multilines by using a '\n' as a line +// divider. +//--------------------------------------------------------------------- +$graph->title->Set("Odometer title"); +$graph->title->SetColor("white"); +$graph->subtitle->Set("2002-02-13"); +$graph->subtitle->SetColor("white"); + +//--------------------------------------------------------------------- +// Specify caption. +// * (This is the text at the bottom of the graph.) The margins will +// automatically adjust to fit the height of the text. A caption +// may have multiple lines by including a '\n' character in the +// string. +//--------------------------------------------------------------------- +$graph->caption->Set("First caption row\n... second row"); +$graph->caption->SetColor("white"); + +//--------------------------------------------------------------------- +// Now we need to create an odometer to add to the graph. +// By default the scale will be 0 to 100 +//--------------------------------------------------------------------- +$odo = new Odometer(); + +//--------------------------------------------------------------------- +// Set color indication +//--------------------------------------------------------------------- +$odo->AddIndication(0,50,"green"); +$odo->AddIndication(50,80,"yellow"); +$odo->AddIndication(80,100,"red"); + +//--------------------------------------------------------------------- +// Adjust scale ticks to be shown at 10 steps interval and scale +// labels at every second tick +//--------------------------------------------------------------------- +$odo->scale->SetTicks(10,2); + +//--------------------------------------------------------------------- +// Use a bold font for tick labels +//--------------------------------------------------------------------- +$odo->scale->label->SetFont(FF_FONT1, FS_BOLD); + +//--------------------------------------------------------------------- +// Set display value for the odometer +//--------------------------------------------------------------------- +$odo->needle->Set(30); + +//--------------------------------------------------------------------- +// Add the odometer to the graph +//--------------------------------------------------------------------- +$graph->Add($odo); + +//--------------------------------------------------------------------- +// ... and finally stroke and stream the image back to the browser +//--------------------------------------------------------------------- +$graph->Stroke(); + +// EOF +?> \ No newline at end of file diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex04.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex04.php new file mode 100644 index 0000000000..9955b7db38 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex04.php @@ -0,0 +1,96 @@ +title->Set("Odometer title"); +$graph->title->SetColor("white"); +$graph->subtitle->Set("2002-02-13"); +$graph->subtitle->SetColor("white"); + +//--------------------------------------------------------------------- +// Specify caption. +// * (This is the text at the bottom of the graph.) The margins will +// automatically adjust to fit the height of the text. A caption +// may have multiple lines by including a '\n' character in the +// string. +//--------------------------------------------------------------------- +$graph->caption->Set("First caption row\n... second row"); +$graph->caption->SetColor("white"); + +//--------------------------------------------------------------------- +// Now we need to create an odometer to add to the graph. +// By default the scale will be 0 to 100 +//--------------------------------------------------------------------- +$odo = new Odometer(); + +//--------------------------------------------------------------------- +// Set color indication +//--------------------------------------------------------------------- +$odo->AddIndication(0,50,"green"); +$odo->AddIndication(50,80,"yellow"); +$odo->AddIndication(80,100,"red"); + +//--------------------------------------------------------------------- +// Set the center area that will not be affected by the color bands +//--------------------------------------------------------------------- +$odo->SetCenterAreaWidth(0.4); // Fraction of radius + +//--------------------------------------------------------------------- +// Adjust scale ticks to be shown at 10 steps interval and scale +// labels at every second tick +//--------------------------------------------------------------------- +$odo->scale->SetTicks(10,2); + +//--------------------------------------------------------------------- +// Use a bold font for tick labels +//--------------------------------------------------------------------- +$odo->scale->label->SetFont(FF_FONT1, FS_BOLD); + +//--------------------------------------------------------------------- +// Set display value for the odometer +//--------------------------------------------------------------------- +$odo->needle->Set(30); + +//--------------------------------------------------------------------- +// Set a new style for the needle +//--------------------------------------------------------------------- +$odo->needle->SetStyle(NEEDLE_STYLE_MEDIUM_TRIANGLE); +$odo->needle->SetLength(0.7); // Length as 70% of the radius +$odo->needle->SetFillColor("orange"); + + +//--------------------------------------------------------------------- +// Add the odometer to the graph +//--------------------------------------------------------------------- +$graph->Add($odo); + +//--------------------------------------------------------------------- +// ... and finally stroke and stream the image back to the browser +//--------------------------------------------------------------------- +$graph->Stroke(); + +// EOF +?> \ No newline at end of file diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex05.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex05.php new file mode 100644 index 0000000000..379a06e9a2 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex05.php @@ -0,0 +1,123 @@ +SetColor("lightyellow"); + +//--------------------------------------------------------------------- +// Specify title and subtitle using default fonts +// * Note each title may be multilines by using a '\n' as a line +// divider. +//--------------------------------------------------------------------- +$graph->title->Set("Odometer title"); +$graph->title->SetColor("white"); +$graph->subtitle->Set("2002-02-13"); +$graph->subtitle->SetColor("white"); + +//--------------------------------------------------------------------- +// Specify caption. +// * (This is the text at the bottom of the graph.) The margins will +// automatically adjust to fit the height of the text. A caption +// may have multiple lines by including a '\n' character in the +// string. +//--------------------------------------------------------------------- +$graph->caption->Set("First caption row\n... second row"); +$graph->caption->SetColor("white"); + +//--------------------------------------------------------------------- +// Now we need to create an odometer to add to the graph. +// By default the scale will be 0 to 100 +//--------------------------------------------------------------------- +$odo = new Odometer(); + +//--------------------------------------------------------------------- +// Set color indication +//--------------------------------------------------------------------- +$odo->AddIndication(0,50,"green"); +$odo->AddIndication(50,80,"yellow"); +$odo->AddIndication(80,100,"red"); + +//--------------------------------------------------------------------- +// Set the center area that will not be affected by the color bands +//--------------------------------------------------------------------- +$odo->SetCenterAreaWidth(0.4); // Fraction of radius + +//--------------------------------------------------------------------- +// Adjust scale ticks to be shown at 10 steps interval and scale +// labels at every second tick +//--------------------------------------------------------------------- +$odo->scale->SetTicks(10,2); + +//--------------------------------------------------------------------- +// Make the tick marks 2 pixel wide +//--------------------------------------------------------------------- +$odo->scale->SetTickWeight(2); + +//--------------------------------------------------------------------- +// Use a bold font for tick labels +//--------------------------------------------------------------------- +$odo->scale->label->SetFont(FF_FONT1, FS_BOLD); + +//--------------------------------------------------------------------- +// Set display value for the odometer +//--------------------------------------------------------------------- +$odo->needle->Set(78); + +//--------------------------------------------------------------------- +// Specify scale caption. Note that depending on the position of the +// indicator needle this label might be partially hidden. +//--------------------------------------------------------------------- +$odo->label->Set("% Passed"); + +//--------------------------------------------------------------------- +// Set a new style for the needle +//--------------------------------------------------------------------- +$odo->needle->SetStyle(NEEDLE_STYLE_MEDIUM_TRIANGLE); +$odo->needle->SetLength(0.7); // Length as 70% of the radius +$odo->needle->SetFillColor("orange"); + +//--------------------------------------------------------------------- +// Setup the second indicator needle +//--------------------------------------------------------------------- +$odo->needle2->Set(24); +$odo->needle2->SetStyle(NEEDLE_STYLE_SMALL_TRIANGLE); +$odo->needle2->SetLength(0.55); // Length as 70% of the radius +$odo->needle2->SetFillColor("lightgray"); +$odo->needle2->Show(); + + +//--------------------------------------------------------------------- +// Add the odometer to the graph +//--------------------------------------------------------------------- +$graph->Add($odo); + +//--------------------------------------------------------------------- +// ... and finally stroke and stream the image back to the browser +//--------------------------------------------------------------------- +$graph->Stroke(); + +// EOF +?> \ No newline at end of file diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex06.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex06.php new file mode 100644 index 0000000000..305a5eea18 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex06.php @@ -0,0 +1,122 @@ +SetColor("lightyellow"); + +//--------------------------------------------------------------------- +// Specify title and subtitle using default fonts +// * Note each title may be multilines by using a '\n' as a line +// divider. +//--------------------------------------------------------------------- +$graph->title->Set("Odometer title"); +$graph->title->SetColor("white"); +$graph->subtitle->Set("2002-02-13"); +$graph->subtitle->SetColor("white"); + +//--------------------------------------------------------------------- +// Specify caption. +// * (This is the text at the bottom of the graph.) The margins will +// automatically adjust to fit the height of the text. A caption +// may have multiple lines by including a '\n' character in the +// string. +//--------------------------------------------------------------------- +$graph->caption->Set("First caption row\n... second row"); +$graph->caption->SetColor("white"); + +//--------------------------------------------------------------------- +// Now we need to create an odometer to add to the graph. +// By default the scale will be 0 to 100 +//--------------------------------------------------------------------- +$odo = new Odometer(ODO_FULL); + +//--------------------------------------------------------------------- +// Set color indication +//--------------------------------------------------------------------- +$odo->AddIndication(0,50,"green"); +$odo->AddIndication(50,80,"yellow"); +$odo->AddIndication(80,100,"red"); + +//--------------------------------------------------------------------- +// Set the center area that will not be affected by the color bands +//--------------------------------------------------------------------- +$odo->SetCenterAreaWidth(0.4); // Fraction of radius + +//--------------------------------------------------------------------- +// Adjust scale ticks to be shown at 10 steps interval and scale +// labels at every second tick +//--------------------------------------------------------------------- +$odo->scale->SetTicks(10,2); + +//--------------------------------------------------------------------- +// Make the tick marks 2 pixel wide +//--------------------------------------------------------------------- +$odo->scale->SetTickWeight(2); + +//--------------------------------------------------------------------- +// Use a bold font for tick labels +//--------------------------------------------------------------------- +$odo->scale->label->SetFont(FF_FONT1, FS_BOLD); + +//--------------------------------------------------------------------- +// Set display value for the odometer +//--------------------------------------------------------------------- +$odo->needle->Set(78); + +//--------------------------------------------------------------------- +// Specify scale caption. Note that depending on the position of the +// indicator needle this label might be partially hidden. +//--------------------------------------------------------------------- +$odo->label->Set("% Passed"); + +//--------------------------------------------------------------------- +// Set a new style for the needle +//--------------------------------------------------------------------- +$odo->needle->SetStyle(NEEDLE_STYLE_MEDIUM_TRIANGLE); +$odo->needle->SetLength(0.7); // Length as 70% of the radius +$odo->needle->SetFillColor("orange"); + +//--------------------------------------------------------------------- +// Setup the second indicator needle +//--------------------------------------------------------------------- +$odo->needle2->Set(24); +$odo->needle2->SetStyle(NEEDLE_STYLE_SMALL_TRIANGLE); +$odo->needle2->SetLength(0.55); // Length as 70% of the radius +$odo->needle2->SetFillColor("lightgray"); +$odo->needle2->Show(); + + +//--------------------------------------------------------------------- +// Add the odometer to the graph +//--------------------------------------------------------------------- +$graph->Add($odo); + +//--------------------------------------------------------------------- +// ... and finally stroke and stream the image back to the browser +//--------------------------------------------------------------------- +$graph->Stroke(); + +// EOF +?> \ No newline at end of file diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex07.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex07.php new file mode 100644 index 0000000000..eb86ba3cca --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex07.php @@ -0,0 +1,126 @@ +SetColor("lightyellow"); + +//--------------------------------------------------------------------- +// Specify title and subtitle using default fonts +// * Note each title may be multilines by using a '\n' as a line +// divider. +//--------------------------------------------------------------------- +$graph->title->Set("Odometer title"); +$graph->title->SetColor("white"); +$graph->subtitle->Set("2002-02-13"); +$graph->subtitle->SetColor("white"); + +//--------------------------------------------------------------------- +// Specify caption. +// * (This is the text at the bottom of the graph.) The margins will +// automatically adjust to fit the height of the text. A caption +// may have multiple lines by including a '\n' character in the +// string. +//--------------------------------------------------------------------- +$graph->caption->Set("First caption row\n... second row"); +$graph->caption->SetColor("white"); + +//--------------------------------------------------------------------- +// Now we need to create an odometer to add to the graph. +// By default the scale will be 0 to 100 +//--------------------------------------------------------------------- +$odo = new Odometer(ODO_FULL); + +//--------------------------------------------------------------------- +// Set color indication +//--------------------------------------------------------------------- +$odo->AddIndication(0,50,"green"); +$odo->AddIndication(50,80,"yellow"); +$odo->AddIndication(80,100,"red"); + +//--------------------------------------------------------------------- +// Set the center area that will not be affected by the color bands +//--------------------------------------------------------------------- +$odo->SetCenterAreaWidth(0.4); // Fraction of radius + +//--------------------------------------------------------------------- +// Adjust scale ticks to be shown at 10 steps interval and scale +// labels at every second tick +//--------------------------------------------------------------------- +$odo->scale->SetTicks(10,2); + +//--------------------------------------------------------------------- +// Make the tick marks 2 pixel wide +//--------------------------------------------------------------------- +$odo->scale->SetTickWeight(2); + +//--------------------------------------------------------------------- +// Use a bold font for tick labels +//--------------------------------------------------------------------- +$odo->scale->label->SetFont(FF_FONT1, FS_BOLD); + +//--------------------------------------------------------------------- +// Change the start and end angle for the scale +//--------------------------------------------------------------------- +$odo->scale->SetAngle(20,340); + +//--------------------------------------------------------------------- +// Set display value for the odometer +//--------------------------------------------------------------------- +$odo->needle->Set(64); + +//--------------------------------------------------------------------- +// Specify scale caption. Note that depending on the position of the +// indicator needle this label might be partially hidden. +//--------------------------------------------------------------------- +$odo->label->Set("% Passed"); + +//--------------------------------------------------------------------- +// Set a new style for the needle +//--------------------------------------------------------------------- +$odo->needle->SetStyle(NEEDLE_STYLE_MEDIUM_TRIANGLE); +$odo->needle->SetLength(0.7); // Length as 70% of the radius +$odo->needle->SetFillColor("orange"); + +//--------------------------------------------------------------------- +// Setup the second indicator needle +//--------------------------------------------------------------------- +$odo->needle2->Set(15); +$odo->needle2->SetStyle(NEEDLE_STYLE_SMALL_TRIANGLE); +$odo->needle2->SetLength(0.55); // Length as 70% of the radius +$odo->needle2->SetFillColor("lightgray"); +$odo->needle2->Show(); + + +//--------------------------------------------------------------------- +// Add the odometer to the graph +//--------------------------------------------------------------------- +$graph->Add($odo); + +//--------------------------------------------------------------------- +// ... and finally stroke and stream the image back to the browser +//--------------------------------------------------------------------- +$graph->Stroke(); + +// EOF +?> \ No newline at end of file diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex08.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex08.php new file mode 100644 index 0000000000..39f12e7a90 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex08.php @@ -0,0 +1,150 @@ +SetShadow(); + +//--------------------------------------------------------------------- +// Change the color of the odometer plotcanvas. NOT the odometer +// fill color itself. +//--------------------------------------------------------------------- +$graph->SetColor("lightyellow"); + +//--------------------------------------------------------------------- +// Change the color of the margin in the graph +//--------------------------------------------------------------------- +$graph->SetMarginColor("khaki:0.6"); + +//--------------------------------------------------------------------- +// Specify title and subtitle using default fonts +// * Note each title may be multilines by using a '\n' as a line +// divider. +//--------------------------------------------------------------------- +$graph->title->Set("Odometer title"); +$graph->title->SetColor("white"); +$graph->subtitle->Set("2002-02-13"); +$graph->subtitle->SetColor("white"); + +//--------------------------------------------------------------------- +// Specify caption. +// * (This is the text at the bottom of the graph.) The margins will +// automatically adjust to fit the height of the text. A caption +// may have multiple lines by including a '\n' character in the +// string. +//--------------------------------------------------------------------- +$graph->caption->Set("First caption row\n... second row"); +$graph->caption->SetColor("white"); + +//--------------------------------------------------------------------- +// Now we need to create an odometer to add to the graph. +// By default the scale will be 0 to 100 +//--------------------------------------------------------------------- +$odo = new Odometer(ODO_FULL); + +//--------------------------------------------------------------------- +// Set fill color for odometer +//--------------------------------------------------------------------- +$odo->SetColor("lightblue"); + +//--------------------------------------------------------------------- +// Set color indication +//--------------------------------------------------------------------- +$odo->AddIndication(0,50,"green"); +$odo->AddIndication(50,80,"yellow"); +$odo->AddIndication(80,100,"red"); + +//--------------------------------------------------------------------- +// Set the center area that will not be affected by the color bands +//--------------------------------------------------------------------- +$odo->SetCenterAreaWidth(0.4); // Fraction of radius + +//--------------------------------------------------------------------- +// Adjust scale ticks to be shown at 10 steps interval and scale +// labels at every second tick +//--------------------------------------------------------------------- +$odo->scale->SetTicks(10,2); + +//--------------------------------------------------------------------- +// Make the tick marks 2 pixel wide +//--------------------------------------------------------------------- +$odo->scale->SetTickWeight(2); + +//--------------------------------------------------------------------- +// Use a bold font for tick labels +//--------------------------------------------------------------------- +$odo->scale->label->SetFont(FF_FONT1, FS_BOLD); + +//--------------------------------------------------------------------- +// Change the start and end angle for the scale +//--------------------------------------------------------------------- +$odo->scale->SetAngle(20,340); + +//--------------------------------------------------------------------- +// Set display value for the odometer +//--------------------------------------------------------------------- +$odo->needle->Set(64); + +//--------------------------------------------------------------------- +// Specify scale caption. Note that depending on the position of the +// indicator needle this label might be partially hidden. +//--------------------------------------------------------------------- +$odo->label->Set("% Passed"); + +//--------------------------------------------------------------------- +// Set a new style for the needle +//--------------------------------------------------------------------- +$odo->needle->SetStyle(NEEDLE_STYLE_MEDIUM_TRIANGLE); +$odo->needle->SetLength(0.7); // Length as 70% of the radius +$odo->needle->SetFillColor("orange"); + +//--------------------------------------------------------------------- +// Setup the second indicator needle +//--------------------------------------------------------------------- +$odo->needle2->Set(15); +$odo->needle2->SetStyle(NEEDLE_STYLE_SMALL_TRIANGLE); +$odo->needle2->SetLength(0.55); // Length as 70% of the radius +$odo->needle2->SetFillColor("lightgray"); + +// Only the first needle is shown by default +$odo->needle2->Show(); + +//--------------------------------------------------------------------- +// Add a drop shadow to the indicator needles +//--------------------------------------------------------------------- +$odo->needle->SetShadow(); +$odo->needle2->SetShadow(); + +//--------------------------------------------------------------------- +// Add the odometer to the graph +//--------------------------------------------------------------------- +$graph->Add($odo); + +//--------------------------------------------------------------------- +// ... and finally stroke and stream the image back to the browser +//--------------------------------------------------------------------- +$graph->Stroke(); + +// EOF +?> \ No newline at end of file diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex09.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex09.php new file mode 100644 index 0000000000..9fc9affeab --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odoex09.php @@ -0,0 +1,49 @@ +needle->Set(17); +$odo2->needle->Set(47); +$odo3->needle->Set(86); + +//--------------------------------------------------------------------- +// Add the odometers to the graph using a vertical layout +//--------------------------------------------------------------------- +$l1 = new LayoutVert( array($odo1,$odo2,$odo3) ) ; +$graph->Add( $l1 ); + +//--------------------------------------------------------------------- +// ... and finally stroke and stream the image back to the browser +//--------------------------------------------------------------------- +$graph->Stroke(); + +// EOF +?> \ No newline at end of file diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex00.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex00.php new file mode 100644 index 0000000000..4344292dec --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex00.php @@ -0,0 +1,21 @@ +needle->Set(30); + +// Add the odometer to the graph +$graph->Add($odo); + +// ... and finally stroke and stream the image back to the client +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex01.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex01.php new file mode 100644 index 0000000000..ec970cd424 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex01.php @@ -0,0 +1,21 @@ +needle->Set(30); + +// Add the odometer to the graph +$graph->Add($odo); + +// ... and finally stroke and stream the image back to the client +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex02.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex02.php new file mode 100644 index 0000000000..a007c1b18f --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex02.php @@ -0,0 +1,30 @@ +title->Set("Result for 2002"); +$graph->title->SetColor("white"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,14); +$graph->subtitle->Set("New York Office"); +$graph->subtitle->SetColor("white"); +$graph->caption->Set("Figure 1. Branch results."); +$graph->caption->SetColor("white"); + +// Now we need to create an odometer to add to the graph. +// By default the scale will be 0 to 100 +$odo = new Odometer(); + +// Set display value for the odometer +$odo->needle->Set(30); + +// Add the odometer to the graph +$graph->Add($odo); + +// ... and finally stroke and stream the image back to the client +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex03.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex03.php new file mode 100644 index 0000000000..3c0e907c69 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex03.php @@ -0,0 +1,30 @@ +title->Set("Result for 2002"); +$graph->title->SetColor("white"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,14); +$graph->subtitle->Set("New York Office"); +$graph->subtitle->SetColor("white"); +$graph->caption->Set("Figure 1.This is a very, very\nlong text with multiples lines\nthat are added as a caption."); +$graph->caption->SetColor("white"); + +// Now we need to create an odometer to add to the graph. +// By default the scale will be 0 to 100 +$odo = new Odometer(); + +// Set display value for the odometer +$odo->needle->Set(30); + +// Add the odometer to the graph +$graph->Add($odo); + +// ... and finally stroke and stream the image back to the client +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex04.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex04.php new file mode 100644 index 0000000000..60c57fc70e --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex04.php @@ -0,0 +1,40 @@ +title->Set("Result for 2002"); +$graph->title->SetColor("white"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,14); +$graph->subtitle->Set("New York Office"); +$graph->subtitle->SetColor("white"); +$graph->caption->Set("Figure 1.This is a very, very\nlong text with multiples lines\nthat are added as a caption."); +$graph->caption->SetColor("white"); + +// Setup colors +// Make the border 40% darker than normal "khaki" +$graph->SetMarginColor("khaki:0.6"); +$graph->SetColor("khaki"); + +// Now we need to create an odometer to add to the graph. +// By default the scale will be 0 to 100 +$odo = new Odometer(); + +// Setup colors for odometyer plot +$odo->SetColor('white'); +$odo->scale->label->SetColor("darkred"); +$odo->needle->SetFillColor("yellow"); + +// Set display value for the odometer +$odo->needle->Set(30); + +// Add the odometer to the graph +$graph->Add($odo); + +// ... and finally stroke and stream the image back to the client +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex06.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex06.php new file mode 100644 index 0000000000..4161e5fa44 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex06.php @@ -0,0 +1,43 @@ +SetColor("lightyellow"); + $odo[$i]->needle->Set(80); + $odo[$i]->needle->SetStyle($nstyle[$i]); + $odo[$i]->caption->Set($captions[$i]); + $odo[$i]->caption->SetFont(FF_FONT1); + $odo[$i]->caption->SetMargin(3); +} + +// Use the automatic layout engine to positon the plots on the graph +$row1 = new LayoutHor( array($odo[0],$odo[1],$odo[2]) ); +$row2 = new LayoutHor( array($odo[3],$odo[4],$odo[5]) ); +$col1 = new LayoutVert( array($row1,$row2) ); + +// Add the odometer to the graph +$graph->Add($col1); + +// ... and finally stroke and stream the image back to the browser +$graph->Stroke(); + +?> \ No newline at end of file diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex07.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex07.php new file mode 100644 index 0000000000..a1ba22bbb3 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex07.php @@ -0,0 +1,37 @@ +SetColor("lightyellow"); + $odo[$i]->needle->Set(75); + $odo[$i]->needle->SetStyle(NEEDLE_STYLE_ENDARROW, $astyles[$i]); + $odo[$i]->caption->SetFont(FF_FONT1,FS_BOLD); + $odo[$i]->caption->Set('Arrow: '.$acaptions[$i]); +} + +$row1 = new LayoutHor( array($odo[0],$odo[1],$odo[2]) ); +$row2 = new LayoutHor( array($odo[3],$odo[4],$odo[5]) ); +$row3 = new LayoutHor( array($odo[6],$odo[7],$odo[8]) ); +$col1 = new LayoutVert( array($row1,$row2,$row3) ); + +// Add the odometer to the graph +$graph->Add($col1); + +// ... and finally stroke and stream the image back to the browser +$graph->Stroke(); +?> \ No newline at end of file diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex08.1.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex08.1.php new file mode 100644 index 0000000000..676ac4c8b8 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex08.1.php @@ -0,0 +1,41 @@ +title->Set('An example with thick border'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,11); + +// Add drop shadow for graph +$graph->SetShadow(); + +// Set some nonstandard colors +$color = array(205,220,205); +$graph->SetMarginColor($color); +$graph->SetColor($color); + +// Now we need to create an odometer to add to the graph. +// By default the scale will be 0 to 100 +$odo = new Odometer(); +$odo->SetColor('white'); +$odo->SetBorder('darkgreen:0.8',5); + +$odo->scale->label->SetFont(FF_ARIAL,FS_BOLD,10); +$odo->scale->label->SetColor('brown:0.6'); + +// Set display value for the odometer +$odo->needle->Set(70); + +// Add drop shadow for needle +$odo->needle->SetShadow(); + +// Add the odometer to the graph +$graph->Add($odo); + +// ... and finally stroke and stream the image back to the browser +$graph->Stroke(); + +?> \ No newline at end of file diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex08.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex08.php new file mode 100644 index 0000000000..8132e732f3 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex08.php @@ -0,0 +1,36 @@ +title->Set('An example with drop shadows'); + +// Add drop shadow for graph +$graph->SetShadow(); + +// Set some nonstandard colors +$color = array(205,220,205); +$graph->SetMarginColor($color); +$graph->SetColor($color); + +// Now we need to create an odometer to add to the graph. +// By default the scale will be 0 to 100 +$odo = new Odometer(); +$odo->SetColor('white'); + +// Set display value for the odometer +$odo->needle->Set(70); + +// Add drop shadow for needle +$odo->needle->SetShadow(); + +// Add the odometer to the graph +$graph->Add($odo); + +// ... and finally stroke and stream the image back to the browser +$graph->Stroke(); + +?> \ No newline at end of file diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex09.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex09.php new file mode 100644 index 0000000000..82a2c4b3e7 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex09.php @@ -0,0 +1,38 @@ +SetColor("lightyellow"); + $odo[$i]->needle->Set(75); + $odo[$i]->needle->SetStyle(NEEDLE_STYLE_ENDARROW, $astyles[$i]); + $odo[$i]->caption->SetFont(FF_FONT1); + $odo[$i]->caption->Set($acaptions[$i]); + $odo[$i]->SetMargin(15); +} + +$row1 = new LayoutHor( array($odo[0],$odo[1],$odo[2]) ); +$row2 = new LayoutHor( array($odo[3],$odo[4],$odo[5]) ); +$row3 = new LayoutHor( array($odo[6],$odo[7],$odo[8]) ); +$col1 = new LayoutVert( array($row1,$row2,$row3) ); + +// Add the odometer to the graph +$graph->Add($col1); + +// ... and finally stroke and stream the image back to the browser +$graph->Stroke(); +?> \ No newline at end of file diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex10.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex10.php new file mode 100644 index 0000000000..f44fc5e0d0 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex10.php @@ -0,0 +1,43 @@ +title->Set('Example with scale indicators'); + +// Add drop shadow for graph +$graph->SetShadow(); + +// Now we need to create an odometer to add to the graph. +// By default the scale will be 0 to 100 +$odo = new Odometer(ODO_HALF); + +// Add color indications +$odo->AddIndication(0,20,"green:0.7"); +$odo->AddIndication(20,30,"green:0.9"); +$odo->AddIndication(30,60,"yellow"); +$odo->AddIndication(60,80,"orange"); +$odo->AddIndication(80,100,"red"); + +// Set display value for the odometer +$odo->needle->Set(90); + +//--------------------------------------------------------------------- +// Add drop shadow for needle +//--------------------------------------------------------------------- +$odo->needle->SetShadow(); + +//--------------------------------------------------------------------- +// Add the odometer to the graph +//--------------------------------------------------------------------- +$graph->Add($odo); + +//--------------------------------------------------------------------- +// ... and finally stroke and stream the image back to the browser +//--------------------------------------------------------------------- +$graph->Stroke(); + +// EOF +?> \ No newline at end of file diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex11.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex11.php new file mode 100644 index 0000000000..f1290f7daa --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex11.php @@ -0,0 +1,40 @@ +title->Set('Example with scale indicators'); + +// Add drop shadow for graph +$graph->SetShadow(); + +// Now we need to create an odometer to add to the graph. +// By default the scale will be 0 to 100 +$odo = new Odometer(ODO_HALF); + +// Add color indications +$odo->AddIndication(0,20,"green:0.7"); +$odo->AddIndication(20,30,"green:0.9"); +$odo->AddIndication(30,60,"yellow"); +$odo->AddIndication(60,80,"orange"); +$odo->AddIndication(80,100,"red"); + +// Set display value for the odometer +$odo->needle->Set(90); + +// Set the size of the non-colored base area to 40% of the radius +$odo->SetCenterAreaWidth(0.45); + +// Add drop shadow for needle +$odo->needle->SetShadow(); + +// Add the odometer to the graph +$graph->Add($odo); + +// ... and finally stroke and stream the image back to the browser +$graph->Stroke(); + +// EOF +?> \ No newline at end of file diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex12.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex12.php new file mode 100644 index 0000000000..5d030a8e36 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex12.php @@ -0,0 +1,47 @@ +title->Set('Example with scale indicators'); + +// Add drop shadow for graph +$graph->SetShadow(); + +// Now we need to create an odometer to add to the graph. +// By default the scale will be 0 to 100 +$odo = new Odometer(ODO_HALF); + +// Add color indications +$odo->AddIndication(0,20,"green:0.7"); +$odo->AddIndication(20,30,"green:0.9"); +$odo->AddIndication(30,60,"yellow"); +$odo->AddIndication(60,80,"orange"); +$odo->AddIndication(80,100,"red"); + +// Set display value for the odometer +$odo->needle->Set(90); + +// Set the size of the non-colored base area to 40% of the radius +$odo->SetCenterAreaWidth(0.45); + +// Add drop shadow for needle +$odo->needle->SetShadow(); + +// Setup the second needle +$odo->needle2->Set(44); +$odo->needle2->Show(); +$odo->needle2->SetLength(0.4); +$odo->needle2->SetFillColor("navy"); +$odo->needle2->SetShadow(); + +// Add the odometer to the graph +$graph->Add($odo); + +// ... and finally stroke and stream the image back to the browser +$graph->Stroke(); + +// EOF +?> \ No newline at end of file diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex13.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex13.php new file mode 100644 index 0000000000..5c49a1179f --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex13.php @@ -0,0 +1,41 @@ +title->Set('Example with scale indicators'); + +// Add drop shadow for graph +$graph->SetShadow(); + +// Now we need to create an odometer to add to the graph. +// By default the scale will be 0 to 100 +$odo = new Odometer(ODO_HALF); + +// Add color indications +$odo->AddIndication(0,20,"green:0.7"); +$odo->AddIndication(20,30,"green:0.9"); +$odo->AddIndication(30,60,"yellow"); +$odo->AddIndication(60,80,"orange"); +$odo->AddIndication(80,100,"red"); + +$odo->SetCenterAreaWidth(0.45); + +// Set display value for the odometer +$odo->needle->Set(90); + +// Add scale labels +$odo->label->Set("mBar"); +$odo->label->SetFont(FF_FONT2,FS_BOLD); + +// Add drop shadow for needle +$odo->needle->SetShadow(); + +// Add the odometer to the graph +$graph->Add($odo); + +// ... and finally stroke and stream the image back to the browser +$graph->Stroke(); +?> \ No newline at end of file diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex14.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex14.php new file mode 100644 index 0000000000..19e8f71b8b --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex14.php @@ -0,0 +1,35 @@ +title->Set('Custom scale'); +$graph->title->SetColor('white'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD); + +// Add drop shadow for graph +$graph->SetShadow(); + +// Now we need to create an odometer to add to the graph. +// By default the scale will be 0 to 100 +$odo = new Odometer(); +$odo->SetColor('lightyellow'); + +// Setup the scale +$odo->scale->Set(100,600); +$odo->scale->SetTicks(50,2); + +// Set display value for the odometer +$odo->needle->Set(280); + +// Add drop shadow for needle +$odo->needle->SetShadow(); + +// Add the odometer to the graph +$graph->Add($odo); + +// ... and finally stroke and stream the image back to the browser +$graph->Stroke(); + +?> \ No newline at end of file diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex15.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex15.php new file mode 100644 index 0000000000..fece535e90 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex15.php @@ -0,0 +1,46 @@ +title->Set('Custom formatting'); +$graph->title->SetColor('white'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD); + +// Add drop shadow for graph +$graph->SetShadow(); + +// Now we need to create an odometer to add to the graph. +$odo = new Odometer(); +$odo->SetColor("lightgray:1.9"); + +// Setup the scale +$odo->scale->Set(100,600); +$odo->scale->SetTicks(50,2); +$odo->scale->SetTickColor('brown'); +$odo->scale->SetTickLength(0.05); +$odo->scale->SetTickWeight(2); + +$odo->scale->SetLabelPos(0.75); +$odo->scale->label->SetFont(FF_FONT1, FS_BOLD); +$odo->scale->label->SetColor('brown'); +$odo->scale->label->SetFont(FF_ARIAL,FS_NORMAL,10); + +// Setup a label with a degree mark +$odo->scale->SetLabelFormat('%dC'.SymChar::Get('degree')); + +// Set display value for the odometer +$odo->needle->Set(280); + +// Add drop shadow for needle +$odo->needle->SetShadow(); + +// Add the odometer to the graph +$graph->Add($odo); + +// ... and finally stroke and stream the image back to the browser +$graph->Stroke(); +?> \ No newline at end of file diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex16.1.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex16.1.php new file mode 100644 index 0000000000..c370618feb --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex16.1.php @@ -0,0 +1,42 @@ +SetShadow(); + +// Now we need to create an odometer to add to the graph. +// By default the scale will be 0 to 100 +$odo1 = new Odometer(); +$odo2 = new Odometer(); +$odo1->SetColor("lightgray:1.9"); +$odo2->SetColor("lightgray:1.9"); + +// Adjust start and end angle for the scale +$odo2->scale->SetAngle(110,250); + +$odo1->scale->label->SetFont(FF_ARIAL,FS_BOLD,10); +$odo2->scale->label->SetFont(FF_ARIAL,FS_BOLD,10); +$odo2->AddIndication(-15,0,'lightgray'); +$odo2->AddIndication(100,115,'lightgray'); + +// Set display value for the odometer +$odo1->needle->Set(70); +$odo2->needle->Set(70); + +// Add drop shadow for needle +$odo1->needle->SetShadow(); +$odo2->needle->SetShadow(); + +// Specify the layout for the two odometers +$row = new LayoutHor( array($odo1,$odo2) ); + +// Add the odometer to the graph +$graph->Add($row); + +// ... and finally stroke and stream the image back to the browser +$graph->Stroke(); +?> \ No newline at end of file diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex16.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex16.php new file mode 100644 index 0000000000..16619f3c12 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex16.php @@ -0,0 +1,40 @@ +SetShadow(); + +// Now we need to create an odometer to add to the graph. +// By default the scale will be 0 to 100 +$odo1 = new Odometer(); +$odo2 = new Odometer(); +$odo1->SetColor("lightgray:1.9"); +$odo2->SetColor("lightgray:1.9"); + +// Adjust start and end angle for the scale +$odo2->scale->SetAngle(110,250); + +$odo1->scale->label->SetFont(FF_ARIAL,FS_BOLD,10); +$odo2->scale->label->SetFont(FF_ARIAL,FS_BOLD,10); + +// Set display value for the odometer +$odo1->needle->Set(70); +$odo2->needle->Set(70); + +// Add drop shadow for needle +$odo1->needle->SetShadow(); +$odo2->needle->SetShadow(); + +// Specify the layout for the two odometers +$row = new LayoutHor( array($odo1,$odo2) ); + +// Add the odometer to the graph +$graph->Add($row); + +// ... and finally stroke and stream the image back to the browser +$graph->Stroke(); +?> \ No newline at end of file diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex17.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex17.php new file mode 100644 index 0000000000..6a9abf8dc3 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex17.php @@ -0,0 +1,46 @@ +title->Set('Manual positioning'); +$graph->title->SetColor('white'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,14); + +// Add drop shadow for graph +$graph->SetShadow(); + +// Now we need to create an odometer to add to the graph. +$odo1 = new Odometer(); +$odo2 = new Odometer(); +$odo1->SetColor('lightgray:1.9'); +$odo2->SetColor('lightgray:1.9'); + +// Set display value for the odometer +$odo1->needle->Set(37); +$odo2->needle->Set(73); + +// Add drop shadow for needle +$odo1->needle->SetShadow(); +$odo2->needle->SetShadow(); + +// Specify the position for the two odometers +$odo1->SetPos(180,110); +$odo1->SetSize(100); +$odo2->SetPos(110,250); +$odo2->SetSize(100); + +// Set captions for the odometers +$odo1->caption->Set("(x,y) = (180,120)\nradius=100"); +$odo2->caption->Set("(x,y) = (110,270)\nradius=100"); + +// Add the odometer to the graph +$graph->Add($odo1); +$graph->Add($odo2); + +// ... and finally stroke and stream the image back to the browser +$graph->Stroke(); +?> \ No newline at end of file diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex18.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex18.php new file mode 100644 index 0000000000..44bd4913a7 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex18.php @@ -0,0 +1,37 @@ +SetColor('lightgray:1.9'); + $odo[$i]->needle->Set(10+$i*17); + $odo[$i]->needle->SetShadow(); + if( $i < 2 ) + $fsize = 10; + else + $fsize = 8; + $odo[$i]->scale->label->SetFont(FF_ARIAL,FS_NORMAL,$fsize); + $odo[$i]->AddIndication(92,100,'red'); + $odo[$i]->AddIndication(80,92,'orange'); + $odo[$i]->AddIndication(60,80,'yellow'); +} + +// Create the layout +$row1 = new LayoutHor( array($odo[0],$odo[1]) ); +$row2 = new LayoutHor( array($odo[2],$odo[3],$odo[4]) ); +$col1 = new LayoutVert( array($row1,$row2) ); + +// Add the odometer to the graph +$graph->Add($col1); + +// ... and finally stroke and stream the image back to the browser +$graph->Stroke(); + +?> \ No newline at end of file diff --git a/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex19.php b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex19.php new file mode 100644 index 0000000000..02324b0677 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_odometer/odotutex19.php @@ -0,0 +1,49 @@ +SetColor('lightgray:1.9'); + $odo[$i]->needle->Set(10+$i*17); + $odo[$i]->needle->SetShadow(); + if( $i < 2 ) + $fsize = 10; + else + $fsize = 8; + $odo[$i]->scale->label->SetFont(FF_ARIAL,FS_NORMAL,$fsize); + $odo[$i]->AddIndication(92,100,'red'); + $odo[$i]->AddIndication(80,92,'orange'); + $odo[$i]->AddIndication(60,80,'yellow'); +} + +// Create the layout +$row1 = new LayoutHor( array($odo[0],$odo[1]) ); +$row2 = new LayoutHor( array($odo[2],$odo[3],$odo[4]) ); +$col1 = new LayoutVert( array($row1,$row2) ); + +// Add the odometer to the graph +$graph->Add($col1); + +// Add an icon and text +$icon = new IconPlot('jpglogo.jpg',250,10,0.85,30); +$icon->SetAnchor('center','top'); +$graph->Add($icon); + +$t = new Text('JpGraph',250,70); +$t->SetAlign('center','top'); +#$t->SetFont(FF_VERA,FS_BOLD,11); +$t->SetColor('darkgray'); +$graph->Add($t); + +// ... and finally stroke and stream the image back to the browser +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pdf/pdf417_ex0.php b/vendor/amenadiel/jpgraph/Examples/examples_pdf/pdf417_ex0.php new file mode 100644 index 0000000000..fb197f5b10 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pdf/pdf417_ex0.php @@ -0,0 +1,8 @@ +Stroke($data); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pdf/pdf417_ex1.php b/vendor/amenadiel/jpgraph/Examples/examples_pdf/pdf417_ex1.php new file mode 100644 index 0000000000..84dd2726b1 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pdf/pdf417_ex1.php @@ -0,0 +1,13 @@ +Stroke($data); +} +catch(JpGraphException $e) { + echo 'PDF417 Error: '.$e->GetMessage(); +} +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pdf/pdf417_ex1b.php b/vendor/amenadiel/jpgraph/Examples/examples_pdf/pdf417_ex1b.php new file mode 100644 index 0000000000..fad0a9e0a4 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pdf/pdf417_ex1b.php @@ -0,0 +1,20 @@ +Stroke($data); +} +catch(JpGraphException $e) { + echo 'PDF417 Error: '.$e->GetMessage(); +} +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pdf/pdf417_ex1c.php b/vendor/amenadiel/jpgraph/Examples/examples_pdf/pdf417_ex1c.php new file mode 100644 index 0000000000..96a748703a --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pdf/pdf417_ex1c.php @@ -0,0 +1,23 @@ +ShowText(true); + $backend->SetModuleWidth($modwidth); + $backend->Stroke($data); +} +catch(JpGraphException $e) { + echo 'PDF417 Error: '.$e->GetMessage(); +} +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pdf/pdf417_ex2.php b/vendor/amenadiel/jpgraph/Examples/examples_pdf/pdf417_ex2.php new file mode 100644 index 0000000000..685b0c292b --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pdf/pdf417_ex2.php @@ -0,0 +1,24 @@ +SetModuleWidth($modwidth); + $backend->SetHeight($height); + $backend->Stroke($data); +} +catch(JpGraphException $e) { + echo 'PDF417 Error: '.$e->GetMessage(); +} +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pdf/pdf417_ex3.php b/vendor/amenadiel/jpgraph/Examples/examples_pdf/pdf417_ex3.php new file mode 100644 index 0000000000..ec2c7b6fef --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pdf/pdf417_ex3.php @@ -0,0 +1,26 @@ +SetModuleWidth($modwidth); + $backend->SetHeight($height); + $backend->NoText(!$showtext); + $backend->Stroke($data); +} +catch(JpGraphException $e) { + echo 'PDF417 Error: '.$e->GetMessage(); +} +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pdf/pdf417_ex4.php b/vendor/amenadiel/jpgraph/Examples/examples_pdf/pdf417_ex4.php new file mode 100644 index 0000000000..5fb8e6e7fc --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pdf/pdf417_ex4.php @@ -0,0 +1,28 @@ +SetModuleWidth($modwidth); + $backend->SetHeight($height); + $backend->NoText(!$showtext); + $backend->SetColor('black','yellow'); + $backend->Stroke($data); +} +catch(JpGraphException $e) { + echo 'PDF417 Error: '.$e->GetMessage(); +} +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pdf/pdf417_ex5.php b/vendor/amenadiel/jpgraph/Examples/examples_pdf/pdf417_ex5.php new file mode 100644 index 0000000000..fc525bfe77 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pdf/pdf417_ex5.php @@ -0,0 +1,29 @@ +SetModuleWidth($modwidth); + $backend->SetHeight($height); + $backend->NoText(!$showtext); + $backend->SetColor('black','yellow'); + $output = $backend->Stroke($data); + echo nl2br(htmlspecialchars($output)); +} +catch(JpGraphException $e) { + echo 'PDF417 Error: '.$e->GetMessage(); +} +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pdf/pdf417_ex6.php b/vendor/amenadiel/jpgraph/Examples/examples_pdf/pdf417_ex6.php new file mode 100644 index 0000000000..9b2e14d6a1 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pdf/pdf417_ex6.php @@ -0,0 +1,35 @@ +SetModuleWidth($modwidth); + $backend->NoText(!$showtext); + $backend->Stroke($data); +} +catch(JpGraphException $e) { + echo 'PDF417 Error: '.$e->GetMessage(); +} +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pie/new_pie1.php b/vendor/amenadiel/jpgraph/Examples/examples_pie/new_pie1.php new file mode 100644 index 0000000000..0ff3e16a5c --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pie/new_pie1.php @@ -0,0 +1,18 @@ +title->Set("A Simple Pie Plot"); +$graph->SetBox(true); + +$data = array(40, 21, 17, 14, 23); +$p1 = new Plot\PiePlot($data); +$p1->ShowBorder(); +$p1->SetColor('black'); +$p1->SetSliceColors(array('#1E90FF', '#2E8B57', '#ADFF2F', '#DC143C', '#BA55D3')); + +$graph->Add($p1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pie/new_pie2.php b/vendor/amenadiel/jpgraph/Examples/examples_pie/new_pie2.php new file mode 100644 index 0000000000..a1e50f9272 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pie/new_pie2.php @@ -0,0 +1,53 @@ +SetShadow(); + +$theme_class = new UniversalTheme; +//$graph->SetTheme($theme_class); + +// Set A title for the plot +$graph->title->Set("Multiple - Pie plot"); + +// Create plots +$size = 0.13; +$p1 = new Plot\PiePlot($data); +$graph->Add($p1); + +$p1->SetSize($size); +$p1->SetCenter(0.25, 0.32); +$p1->SetSliceColors(array('#1E90FF', '#2E8B57', '#ADFF2F', '#DC143C', '#BA55D3')); +$p1->title->Set("2005"); + +$p2 = new Plot\PiePlot($data); +$graph->Add($p2); + +$p2->SetSize($size); +$p2->SetCenter(0.65, 0.32); +$p2->SetSliceColors(array('#1E90FF', '#2E8B57', '#ADFF2F', '#DC143C', '#BA55D3')); +$p2->title->Set("2006"); + +$p3 = new Plot\PiePlot($data); +$graph->Add($p3); + +$p3->SetSize($size); +$p3->SetCenter(0.25, 0.75); +$p3->SetSliceColors(array('#6495ED', '#2E8B57', '#ADFF2F', '#DC143C', '#BA55D3')); +$p3->title->Set("2007"); + +$p4 = new Plot\PiePlot($data); +$graph->Add($p4); + +$p4->SetSize($size); +$p4->SetCenter(0.65, 0.75); +$p4->SetSliceColors(array('#6495ED', '#2E8B57', '#ADFF2F', '#DC143C', '#BA55D3')); +$p4->title->Set("2008"); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pie/new_pie3.php b/vendor/amenadiel/jpgraph/Examples/examples_pie/new_pie3.php new file mode 100644 index 0000000000..a2799b780d --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pie/new_pie3.php @@ -0,0 +1,26 @@ +SetTheme($theme_class); + +// Set A title for the plot +$graph->title->Set("A Simple 3D Pie Plot"); + +// Create +$p1 = new Plot\PiePlot3D($data); +$graph->Add($p1); + +$p1->ShowBorder(); +$p1->SetColor('black'); +$p1->SetSliceColors(array('#1E90FF', '#2E8B57', '#ADFF2F', '#BA55D3')); +$p1->ExplodeSlice(1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pie/new_pie4.php b/vendor/amenadiel/jpgraph/Examples/examples_pie/new_pie4.php new file mode 100644 index 0000000000..bf84c0932b --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pie/new_pie4.php @@ -0,0 +1,62 @@ +SetTheme(new $theme_class()); + +// Setup background +$graph->SetBackgroundImage('worldmap1.jpg', BGIMG_FILLFRAME); + +// Setup title +$graph->title->Set("Pie plots with background image"); +$graph->title->SetColor('white'); +$graph->SetTitleBackground('#4169E1', TITLEBKG_STYLE2, TITLEBKG_FRAME_FULL, '#4169E1', 10, 10, true); + +$p = array(); +// Create the plots +for ($i = 0; $i < $n; ++$i) { + $p[] = new Plot\PiePlot3D($data); +} +for ($i = 0; $i < $n; ++$i) { + $graph->Add($p[$i]); +} + +// Position the four pies and change color +for ($i = 0; $i < $n; ++$i) { + $p[$i]->SetCenter($piepos[2 * $i], $piepos[2 * $i + 1]); + $p[$i]->SetSliceColors(array('#1E90FF', '#2E8B57', '#ADFF2F', '#DC143C', '#BA55D3')); +} + +// Set the titles +for ($i = 0; $i < $n; ++$i) { + $p[$i]->title->Set($titles[$i]); + $p[$i]->title->SetFont(FF_ARIAL, FS_NORMAL, 8); +} + +for ($i = 0; $i < $n; ++$i) { + $p[$i]->value->Show(false); +} + +// Size of pie in fraction of the width of the graph +for ($i = 0; $i < $n; ++$i) { + $p[$i]->SetSize(0.13); +} + +for ($i = 0; $i < $n; ++$i) { + $p[$i]->SetEdge(false); + $p[$i]->ExplodeSlice(1, 7); +} + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pie/pie3d_csimex1.php b/vendor/amenadiel/jpgraph/Examples/examples_pie/pie3d_csimex1.php new file mode 100644 index 0000000000..d31ba21553 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pie/pie3d_csimex1.php @@ -0,0 +1,38 @@ +SetShadow(); + +// Set A title for the plot +$graph->title->Set("3D Pie Client side image map"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Create +$p1 = new Plot\PiePlot3D($data); +$p1->SetLegends(array("Jan (%d)", "Feb", "Mar", "Apr", "May", "Jun", "Jul")); +$targ = array("pie3d_csimex1.php?v=1", "pie3d_csimex1.php?v=2", "pie3d_csimex1.php?v=3", + "pie3d_csimex1.php?v=4", "pie3d_csimex1.php?v=5", "pie3d_csimex1.php?v=6"); +$alts = array("val=%d", "val=%d", "val=%d", "val=%d", "val=%d", "val=%d"); +$p1->SetCSIMTargets($targ, $alts); + +// Use absolute labels +$p1->SetLabelType(1); +$p1->value->SetFormat("%d kr"); + +// Move the pie slightly to the left +$p1->SetCenter(0.4, 0.5); + +$graph->Add($p1); + +// Send back the HTML page which will call this script again +// to retrieve the image. +$graph->StrokeCSIM(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pie/pie3dex1.php b/vendor/amenadiel/jpgraph/Examples/examples_pie/pie3dex1.php new file mode 100644 index 0000000000..4d55e5f163 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pie/pie3dex1.php @@ -0,0 +1,28 @@ +SetShadow(); + +// Set A title for the plot +$graph->title->Set("Example 1 3D Pie plot"); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 18); +$graph->title->SetColor("darkblue"); +$graph->legend->Pos(0.1, 0.2); + +// Create pie plot +$p1 = new Plot\PiePlot3D($data); +$p1->SetTheme("sand"); +$p1->SetCenter(0.4); +$p1->SetAngle(30); +$p1->value->SetFont(FF_ARIAL, FS_NORMAL, 12); +$p1->SetLegends(array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct")); + +$graph->Add($p1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pie/pie3dex2.php b/vendor/amenadiel/jpgraph/Examples/examples_pie/pie3dex2.php new file mode 100644 index 0000000000..3a68748a9c --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pie/pie3dex2.php @@ -0,0 +1,40 @@ +SetShadow(); + +// Set A title for the plot +$graph->title->Set("Example 2 3D Pie plot"); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 18); +$graph->title->SetColor("darkblue"); +$graph->legend->Pos(0.1, 0.2); + +// Create 3D pie plot +$p1 = new Plot\PiePlot3D($data); +$p1->SetTheme("sand"); +$p1->SetCenter(0.4); +$p1->SetSize(0.4); +$p1->SetHeight(5); + +// Adjust projection angle +$p1->SetAngle(45); + +// You can explode several slices by specifying the explode +// distance for some slices in an array +$p1->Explode(array(0, 40, 0, 30)); + +// As a shortcut you can easily explode one numbered slice with +// $p1->ExplodeSlice(3); + +$p1->value->SetFont(FF_ARIAL, FS_NORMAL, 10); +$p1->SetLegends(array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct")); + +$graph->Add($p1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pie/pie3dex3.php b/vendor/amenadiel/jpgraph/Examples/examples_pie/pie3dex3.php new file mode 100644 index 0000000000..9006c3bfa5 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pie/pie3dex3.php @@ -0,0 +1,38 @@ +SetShadow(); + +// Set A title for the plot +$graph->title->Set("Example 3 3D Pie plot"); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 18); +$graph->title->SetColor("darkblue"); +$graph->legend->Pos(0.1, 0.2); + +// Create 3D pie plot +$p1 = new Plot\PiePlot3D($data); +$p1->SetTheme("sand"); +$p1->SetCenter(0.4); +$p1->SetSize(80); + +// Adjust projection angle +$p1->SetAngle(45); + +// As a shortcut you can easily explode one numbered slice with +$p1->ExplodeSlice(3); + +// Setup the slice values +$p1->value->SetFont(FF_ARIAL, FS_BOLD, 11); +$p1->value->SetColor("navy"); + +$p1->SetLegends(array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct")); + +$graph->Add($p1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pie/pie3dex4.php b/vendor/amenadiel/jpgraph/Examples/examples_pie/pie3dex4.php new file mode 100644 index 0000000000..947c9d91e2 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pie/pie3dex4.php @@ -0,0 +1,41 @@ +SetShadow(); + +// Set A title for the plot +$graph->title->Set("Example 4 3D Pie plot"); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 18); +$graph->title->SetColor("darkblue"); +$graph->legend->Pos(0.1, 0.2); + +// Create 3D pie plot +$p1 = new Plot\PiePlot3D($data); +$p1->SetTheme("sand"); +$p1->SetCenter(0.4); +$p1->SetSize(80); + +// Adjust projection angle +$p1->SetAngle(45); + +// Adjsut angle for first slice +$p1->SetStartAngle(45); + +// As a shortcut you can easily explode one numbered slice with +$p1->ExplodeSlice(3); + +// Setup slice values +$p1->value->SetFont(FF_ARIAL, FS_BOLD, 11); +$p1->value->SetColor("navy"); + +$p1->SetLegends(array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct")); + +$graph->Add($p1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pie/pie3dex5.php b/vendor/amenadiel/jpgraph/Examples/examples_pie/pie3dex5.php new file mode 100644 index 0000000000..e29fc619d4 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pie/pie3dex5.php @@ -0,0 +1,42 @@ +SetShadow(); + +// Set A title for the plot +$graph->title->Set("Example 5 3D Pie plot"); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 18); +$graph->title->SetColor("darkblue"); +$graph->legend->Pos(0.1, 0.2); + +// Create 3D pie plot +$p1 = new Plot\PiePlot3D($data); +$p1->SetTheme("sand"); +$p1->SetCenter(0.4); +$p1->SetSize(80); + +// Adjust projection angle +$p1->SetAngle(45); + +// Adjsut angle for first slice +$p1->SetStartAngle(45); + +// Display the slice values +$p1->value->SetFont(FF_ARIAL, FS_BOLD, 11); +$p1->value->SetColor("navy"); + +// Add colored edges to the 3D pie +// NOTE: You can't have exploded slices with edges! +$p1->SetEdge("navy"); + +$p1->SetLegends(array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct")); + +$graph->Add($p1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pie/pie_csimex1.php b/vendor/amenadiel/jpgraph/Examples/examples_pie/pie_csimex1.php new file mode 100644 index 0000000000..06fd4b3ac8 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pie/pie_csimex1.php @@ -0,0 +1,31 @@ +SetShadow(); + +// Set A title for the plot +$graph->title->Set("Client side image map"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Create +$p1 = new Plot\PiePlot($data); +$p1->SetCenter(0.4, 0.5); + +$p1->SetLegends(array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul")); +$targ = array("pie_csimex1.php#1", "pie_csimex1.php#2", "pie_csimex1.php#3", + "pie_csimex1.php#4", "pie_csimex1.php#5", "pie_csimex1.php#6"); +$alts = array("val=%d", "val=%d", "val=%d", "val=%d", "val=%d", "val=%d"); +$p1->SetCSIMTargets($targ, $alts); + +$graph->Add($p1); + +// Send back the HTML page which will call this script again +// to retrieve the image. +$graph->StrokeCSIM(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pie/piebkgex1.php b/vendor/amenadiel/jpgraph/Examples/examples_pie/piebkgex1.php new file mode 100644 index 0000000000..5ca8a59b31 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pie/piebkgex1.php @@ -0,0 +1,90 @@ +SetMargin(1, 1, 40, 1); +$graph->SetMarginColor('navy'); +$graph->SetShadow(false); + +// Setup background +$graph->SetBackgroundImage('worldmap1.jpg', BGIMG_FILLPLOT); + +// Setup title +$graph->title->Set("Pie plots with background image"); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 20); +$graph->title->SetColor('white'); + +$p = array(); +// Create the plots +for ($i = 0; $i < $n; ++$i) { + $d = "data$i"; + $p[] = new Plot\PiePlot3D($data[$i]); +} + +// Position the four pies +for ($i = 0; $i < $n; ++$i) { + $p[$i]->SetCenter($piepos[2 * $i], $piepos[2 * $i + 1]); +} + +// Set the titles +for ($i = 0; $i < $n; ++$i) { + $p[$i]->title->Set($titles[$i]); + $p[$i]->title->SetColor('white'); + $p[$i]->title->SetFont(FF_ARIAL, FS_BOLD, 12); +} + +// Label font and color setup +for ($i = 0; $i < $n; ++$i) { + $p[$i]->value->SetFont(FF_ARIAL, FS_BOLD); + $p[$i]->value->SetColor('white'); +} + +// Show the percetages for each slice +for ($i = 0; $i < $n; ++$i) { + $p[$i]->value->Show(); +} + +// Label format +for ($i = 0; $i < $n; ++$i) { + $p[$i]->value->SetFormat("%01.1f%%"); +} + +// Size of pie in fraction of the width of the graph +for ($i = 0; $i < $n; ++$i) { + $p[$i]->SetSize(0.15); +} + +// Format the border around each slice + +for ($i = 0; $i < $n; ++$i) { + $p[$i]->SetEdge(false); + $p[$i]->ExplodeSlice(1); +} + +// Use one legend for the whole graph +$p[0]->SetLegends(array("May", "June", "July", "Aug")); +$graph->legend->Pos(0.05, 0.35); +$graph->legend->SetShadow(false); + +for ($i = 0; $i < $n; ++$i) { + $graph->Add($p[$i]); +} + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pie/piec_csimex1.php b/vendor/amenadiel/jpgraph/Examples/examples_pie/piec_csimex1.php new file mode 100644 index 0000000000..43fe14e663 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pie/piec_csimex1.php @@ -0,0 +1,83 @@ +SetFrame(false); + +// Uncomment this line to add a drop shadow to the border +// $graph->SetShadow(); + +// Setup title +$graph->title->Set("CSIM Center Pie plot ex 1"); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 18); +$graph->title->SetMargin(8); // Add a little bit more margin from the top + +// Create the pie plot +$p1 = new Plot\PiePlotC($data); + +// Set the radius of pie (as fraction of image size) +$p1->SetSize(0.32); + +// Move the center of the pie slightly to the top of the image +$p1->SetCenter(0.5, 0.45); + +// Label font and color setup +$p1->value->SetFont(FF_ARIAL, FS_BOLD, 12); +$p1->value->SetColor('white'); + +// Setup the title on the center circle +$p1->midtitle->Set("Test mid\nRow 1\nRow 2"); +$p1->midtitle->SetFont(FF_ARIAL, FS_NORMAL, 14); + +// Set color for mid circle +$p1->SetMidColor('yellow'); + +// Use percentage values in the legends values (This is also the default) +$p1->SetLabelType(PIE_VALUE_PER); + +// The label array values may have printf() formatting in them. The argument to the +// form,at string will be the value of the slice (either the percetage or absolute +// depending on what was specified in the SetLabelType() above. +$lbl = array("adam\n%.1f%%", "bertil\n%.1f%%", "johan\n%.1f%%", + "peter\n%.1f%%", "daniel\n%.1f%%", "erik\n%.1f%%"); +$p1->SetLabels($lbl); + +// Uncomment this line to remove the borders around the slices +// $p1->ShowBorder(false); + +// Add drop shadow to slices +$p1->SetShadow(); + +// Explode all slices 15 pixels +$p1->ExplodeAll(15); + +// Setup the CSIM targets +$targ = array("piec_csimex1.php#1", "piec_csimex1.php#2", "piec_csimex1.php#3", + "piec_csimex1.php#4", "piec_csimex1.php#5", "piec_csimex1.php#6"); +$alts = array("val=%d", "val=%d", "val=%d", "val=%d", "val=%d", "val=%d"); +$p1->SetCSIMTargets($targ, $alts); +$p1->SetMidCSIM("piec_csimex1.php#7", "Center"); + +// Setup a small help text in the image +$txt = new Text("Note: This is an example of image map. Hold\nyour mouse over the slices to see the values.\nThe URL just points back to this page"); +$txt->SetFont(FF_FONT1, FS_BOLD); +$txt->SetPos(0.5, 0.97, 'center', 'bottom'); +$txt->SetBox('yellow', 'black'); +$txt->SetShadow(); +$graph->AddText($txt); + +// Add plot to pie graph +$graph->Add($p1); + +// .. and send the image on it's marry way to the browser +$graph->StrokeCSIM(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pie/piecex1.php b/vendor/amenadiel/jpgraph/Examples/examples_pie/piecex1.php new file mode 100644 index 0000000000..98b4f3338c --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pie/piecex1.php @@ -0,0 +1,43 @@ +title->Set("Pie plot with center circle"); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$graph->title->SetMargin(8); // Add a little bit more margin from the top + +// Create the pie plot +$p1 = new Plot\PiePlotC($data); + +// Set size of pie +$p1->SetSize(0.32); + +// Label font and color setup +$p1->value->SetFont(FF_ARIAL, FS_BOLD, 10); +$p1->value->SetColor('black'); + +// Setup the title on the center circle +$p1->midtitle->Set("Test mid\nRow 1\nRow 2"); +$p1->midtitle->SetFont(FF_ARIAL, FS_NORMAL, 10); + +// Set color for mid circle +$p1->SetMidColor('yellow'); + +// Use percentage values in the legends values (This is also the default) +$p1->SetLabelType(PIE_VALUE_PER); + +// Add plot to pie graph +$graph->Add($p1); + +// .. and send the image on it's marry way to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pie/piecex2.php b/vendor/amenadiel/jpgraph/Examples/examples_pie/piecex2.php new file mode 100644 index 0000000000..ac0ef0a025 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pie/piecex2.php @@ -0,0 +1,67 @@ +SetFrame(false); + +// Uncomment this line to add a drop shadow to the border +// $graph->SetShadow(); + +// Setup title +$graph->title->Set("Plot\PiePlotC"); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 18); +$graph->title->SetMargin(8); // Add a little bit more margin from the top + +// Create the pie plot +$p1 = new Plot\PiePlotC($data); + +// Set size of pie +$p1->SetSize(0.35); + +// Label font and color setup +$p1->value->SetFont(FF_ARIAL, FS_BOLD, 12); +$p1->value->SetColor('white'); + +$p1->value->Show(); + +// Setup the title on the center circle +$p1->midtitle->Set("Test mid\nRow 1\nRow 2"); +$p1->midtitle->SetFont(FF_ARIAL, FS_NORMAL, 14); + +// Set color for mid circle +$p1->SetMidColor('yellow'); + +// Use percentage values in the legends values (This is also the default) +$p1->SetLabelType(PIE_VALUE_PER); + +// The label array values may have printf() formatting in them. The argument to the +// form,at string will be the value of the slice (either the percetage or absolute +// depending on what was specified in the SetLabelType() above. +$lbl = array("adam\n%.1f%%", "bertil\n%.1f%%", "johan\n%.1f%%", + "peter\n%.1f%%", "daniel\n%.1f%%", "erik\n%.1f%%"); +$p1->SetLabels($lbl); + +// Uncomment this line to remove the borders around the slices +// $p1->ShowBorder(false); + +// Add drop shadow to slices +$p1->SetShadow(); + +// Explode all slices 15 pixels +$p1->ExplodeAll(15); + +// Add plot to pie graph +$graph->Add($p1); + +// .. and send the image on it's marry way to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pie/pieex1.php b/vendor/amenadiel/jpgraph/Examples/examples_pie/pieex1.php new file mode 100644 index 0000000000..e05e80f3f4 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pie/pieex1.php @@ -0,0 +1,28 @@ +SetShadow(); + +// Set A title for the plot +$graph->title->Set("Example 1 Pie plot"); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 14); +$graph->title->SetColor("brown"); + +// Create pie plot +$p1 = new Plot\PiePlot($data); +//$p1->SetSliceColors(array("red","blue","yellow","green")); +$p1->SetTheme("earth"); + +$p1->value->SetFont(FF_ARIAL, FS_NORMAL, 10); +// Set how many pixels each slice should explode +$p1->Explode(array(0, 15, 15, 25, 15)); + +$graph->Add($p1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pie/pieex2.php b/vendor/amenadiel/jpgraph/Examples/examples_pie/pieex2.php new file mode 100644 index 0000000000..15c7c6fbb3 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pie/pieex2.php @@ -0,0 +1,21 @@ +SetShadow(); + +// Set A title for the plot +$graph->title->Set("Example 2 Pie plot"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Create +$p1 = new Plot\PiePlot($data); +$p1->SetLegends(array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul")); +$graph->Add($p1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pie/pieex3.php b/vendor/amenadiel/jpgraph/Examples/examples_pie/pieex3.php new file mode 100644 index 0000000000..bf1e32d769 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pie/pieex3.php @@ -0,0 +1,49 @@ +SetShadow(); + +// Set A title for the plot +$graph->title->Set("Multiple - Pie plot"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Create plots +$size = 0.13; +$p1 = new Plot\PiePlot($data); +$p1->SetLegends(array("Jan", "Feb", "Mar", "Apr", "May")); +$p1->SetSize($size); +$p1->SetCenter(0.25, 0.32); +$p1->value->SetFont(FF_FONT0); +$p1->title->Set("2001"); + +$p2 = new Plot\PiePlot($data); +$p2->SetSize($size); +$p2->SetCenter(0.65, 0.32); +$p2->value->SetFont(FF_FONT0); +$p2->title->Set("2002"); + +$p3 = new Plot\PiePlot($data); +$p3->SetSize($size); +$p3->SetCenter(0.25, 0.75); +$p3->value->SetFont(FF_FONT0); +$p3->title->Set("2003"); + +$p4 = new Plot\PiePlot($data); +$p4->SetSize($size); +$p4->SetCenter(0.65, 0.75); +$p4->value->SetFont(FF_FONT0); +$p4->title->Set("2004"); + +$graph->Add($p1); +$graph->Add($p2); +$graph->Add($p3); +$graph->Add($p4); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pie/pieex4.php b/vendor/amenadiel/jpgraph/Examples/examples_pie/pieex4.php new file mode 100644 index 0000000000..d8e6a23e61 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pie/pieex4.php @@ -0,0 +1,22 @@ +SetShadow(); + +$graph->title->Set("Example 4 of pie plot"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +$p1 = new Plot\PiePlot($data); +$p1->value->SetFont(FF_FONT1, FS_BOLD); +$p1->value->SetColor("darkred"); +$p1->SetSize(0.3); +$p1->SetCenter(0.4); +$p1->SetLegends(array("Jan", "Feb", "Mar", "Apr", "May")); +$graph->Add($p1); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pie/pieex5.php b/vendor/amenadiel/jpgraph/Examples/examples_pie/pieex5.php new file mode 100644 index 0000000000..5cf0af60bd --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pie/pieex5.php @@ -0,0 +1,28 @@ +SetShadow(); + +// Setup graph title +$graph->title->Set("Example 5 of pie plot"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Create pie plot +$p1 = new Plot\PiePlot($data); +$p1->value->SetFont(FF_VERDANA, FS_BOLD); +$p1->value->SetColor("darkred"); +$p1->SetSize(0.3); +$p1->SetCenter(0.4); +$p1->SetLegends(array("Jan", "Feb", "Mar", "Apr", "May")); +//$p1->SetStartAngle(M_PI/8); +$p1->ExplodeSlice(3); + +$graph->Add($p1); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pie/pieex6.php b/vendor/amenadiel/jpgraph/Examples/examples_pie/pieex6.php new file mode 100644 index 0000000000..a66a5b8afd --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pie/pieex6.php @@ -0,0 +1,46 @@ +SetShadow(); + +// Setup title +$graph->title->Set("Example of pie plot with absolute labels"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// The pie plot +$p1 = new Plot\PiePlot($data); + +// Move center of pie to the left to make better room +// for the legend +$p1->SetCenter(0.35, 0.5); + +// No border +$p1->ShowBorder(false); + +// Label font and color setup +$p1->value->SetFont(FF_FONT1, FS_BOLD); +$p1->value->SetColor("darkred"); + +// Use absolute values (type==1) +$p1->SetLabelType(PIE_VALUE_ABS); + +// Label format +$p1->value->SetFormat("$%d"); +$p1->value->Show(); + +// Size of pie in fraction of the width of the graph +$p1->SetSize(0.3); + +// Legends +$p1->SetLegends(array("May ($%d)", "June ($%d)", "July ($%d)", "Aug ($%d)")); +$graph->legend->Pos(0.05, 0.15); + +$graph->Add($p1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pie/pieex7.php b/vendor/amenadiel/jpgraph/Examples/examples_pie/pieex7.php new file mode 100644 index 0000000000..1f65df9ef8 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pie/pieex7.php @@ -0,0 +1,49 @@ +SetShadow(); + +// Setup title +$graph->title->Set("Pie plot with absolute labels"); +$graph->subtitle->Set('(With hidden 0 labels)'); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// The pie plot +$p1 = new Plot\PiePlot($data); + +// Move center of pie to the left to make better room +// for the legend +$p1->SetCenter(0.35, 0.5); + +// No border +$p1->ShowBorder(false); + +// Label font and color setup +$p1->value->SetFont(FF_FONT1, FS_BOLD); +$p1->value->SetColor("darkred"); + +// Use absolute values (type==1) +$p1->SetLabelType(PIE_VALUE_ABS); + +// Label format +$p1->value->SetFormat("$%d"); +$p1->value->HideZero(); +$p1->value->Show(); + +// Size of pie in fraction of the width of the graph +$p1->SetSize(0.3); + +// Legends +$p1->SetLegends(array("May ($%d)", "June ($%d)", "July ($%d)", "Aug ($%d)")); +$graph->legend->Pos(0.05, 0.2); + +$graph->Add($p1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pie/pieex8.php b/vendor/amenadiel/jpgraph/Examples/examples_pie/pieex8.php new file mode 100644 index 0000000000..ef2c30023e --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pie/pieex8.php @@ -0,0 +1,32 @@ +SetShadow(); + +// Title setup +$graph->title->Set("Adjusting the label pos"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Setup the pie plot +$p1 = new Plot\PiePlot($data); + +// Adjust size and position of plot +$p1->SetSize(0.4); +$p1->SetCenter(0.5, 0.52); + +// Setup slice labels and move them into the plot +$p1->value->SetFont(FF_FONT1, FS_BOLD); +$p1->value->SetColor("darkred"); +$p1->SetLabelPos(0.6); + +// Finally add the plot +$graph->Add($p1); + +// ... and stroke it +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pie/pieex9.php b/vendor/amenadiel/jpgraph/Examples/examples_pie/pieex9.php new file mode 100644 index 0000000000..b9b2bdb225 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pie/pieex9.php @@ -0,0 +1,38 @@ +SetShadow(); + +// Title setup +$graph->title->Set("Exploding all slices"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Setup the pie plot +$p1 = new Plot\PiePlot($data); + +// Adjust size and position of plot +$p1->SetSize(0.35); +$p1->SetCenter(0.5, 0.52); + +// Setup slice labels and move them into the plot +$p1->value->SetFont(FF_FONT1, FS_BOLD); +$p1->value->SetColor("darkred"); +$p1->SetLabelPos(0.65); + +// Explode all slices +$p1->ExplodeAll(10); + +// Add drop shadow +$p1->SetShadow(); + +// Finally add the plot +$graph->Add($p1); + +// ... and stroke it +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pie/pielabelsex1.php b/vendor/amenadiel/jpgraph/Examples/examples_pie/pielabelsex1.php new file mode 100644 index 0000000000..4595e163c4 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pie/pielabelsex1.php @@ -0,0 +1,34 @@ +title->Set("Label guide lines"); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +$graph->title->SetColor("darkblue"); +$graph->legend->Pos(0.1, 0.2); + +// Create pie plot +$p1 = new Plot\PiePlot($data); +$p1->SetCenter(0.5, 0.55); +$p1->SetSize(0.3); + +// Enable and set policy for guide-lines +$p1->SetGuideLines(); +$p1->SetGuideLinesAdjust(1.4); + +// Setup the labels +$p1->SetLabelType(PIE_VALUE_PER); +$p1->value->Show(); +$p1->value->SetFont(FF_ARIAL, FS_NORMAL, 9); +$p1->value->SetFormat('%2.1f%%'); + +// Add and stroke +$graph->Add($p1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pie/pielabelsex2.php b/vendor/amenadiel/jpgraph/Examples/examples_pie/pielabelsex2.php new file mode 100644 index 0000000000..ec180a5829 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pie/pielabelsex2.php @@ -0,0 +1,34 @@ +title->Set("Label guide lines"); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +$graph->title->SetColor("darkblue"); +$graph->legend->Pos(0.1, 0.2); + +// Create pie plot +$p1 = new Plot\PiePlot($data); +$p1->SetCenter(0.5, 0.55); +$p1->SetSize(0.3); + +// Enable and set policy for guide-lines. Make labels line up vertically +$p1->SetGuideLines(true, false); +$p1->SetGuideLinesAdjust(1.5); + +// Setup the labels +$p1->SetLabelType(PIE_VALUE_PER); +$p1->value->Show(); +$p1->value->SetFont(FF_ARIAL, FS_NORMAL, 9); +$p1->value->SetFormat('%2.1f%%'); + +// Add and stroke +$graph->Add($p1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pie/pielabelsex3.php b/vendor/amenadiel/jpgraph/Examples/examples_pie/pielabelsex3.php new file mode 100644 index 0000000000..6f302fc03c --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pie/pielabelsex3.php @@ -0,0 +1,35 @@ +title->Set("Label guide lines"); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +$graph->title->SetColor("darkblue"); +$graph->legend->Pos(0.1, 0.2); + +// Create pie plot +$p1 = new Plot\PiePlot($data); +$p1->SetCenter(0.5, 0.55); +$p1->SetSize(0.3); + +// Enable and set policy for guide-lines. Make labels line up vertically +// and force guide lines to always beeing used +$p1->SetGuideLines(true, false, true); +$p1->SetGuideLinesAdjust(1.5); + +// Setup the labels +$p1->SetLabelType(PIE_VALUE_PER); +$p1->value->Show(); +$p1->value->SetFont(FF_ARIAL, FS_NORMAL, 9); +$p1->value->SetFormat('%2.1f%%'); + +// Add and stroke +$graph->Add($p1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pie/pielabelsex4.php b/vendor/amenadiel/jpgraph/Examples/examples_pie/pielabelsex4.php new file mode 100644 index 0000000000..dc93e1e580 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pie/pielabelsex4.php @@ -0,0 +1,34 @@ +title->Set("Label guide lines"); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +$graph->title->SetColor("darkblue"); +$graph->legend->Pos(0.1, 0.2); + +// Create pie plot +$p1 = new Plot\PiePlot($data); +$p1->SetCenter(0.5, 0.55); +$p1->SetSize(0.3); + +// Enable and set policy for guide-lines. Make labels line up vertically +$p1->SetGuideLines(true, false); +$p1->SetGuideLinesAdjust(1.1); + +// Setup the labels +$p1->SetLabelType(PIE_VALUE_PER); +$p1->value->Show(); +$p1->value->SetFont(FF_ARIAL, FS_NORMAL, 9); +$p1->value->SetFormat('%2.1f%%'); + +// Add and stroke +$graph->Add($p1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pie/pielabelsex5.php b/vendor/amenadiel/jpgraph/Examples/examples_pie/pielabelsex5.php new file mode 100644 index 0000000000..15b346a8c7 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_pie/pielabelsex5.php @@ -0,0 +1,45 @@ +SetShadow(); + +// Set A title for the plot +$graph->title->Set('String labels with values'); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +$graph->title->SetColor('black'); + +// Create pie plot +$p1 = new Plot\PiePlot($data); +$p1->SetCenter(0.5, 0.5); +$p1->SetSize(0.3); + +// Setup the labels to be displayed +$p1->SetLabels($labels); + +// This method adjust the position of the labels. This is given as fractions +// of the radius of the Pie. A value < 1 will put the center of the label +// inside the Pie and a value >= 1 will pout the center of the label outside the +// Pie. By default the label is positioned at 0.5, in the middle of each slice. +$p1->SetLabelPos(1); + +// Setup the label formats and what value we want to be shown (The absolute) +// or the percentage. +$p1->SetLabelType(PIE_VALUE_PER); +$p1->value->Show(); +$p1->value->SetFont(FF_ARIAL, FS_NORMAL, 9); +$p1->value->SetColor('darkgray'); + +// Add and stroke +$graph->Add($p1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_pie/worldmap1.jpg b/vendor/amenadiel/jpgraph/Examples/examples_pie/worldmap1.jpg new file mode 100644 index 0000000000..caa7c14045 Binary files /dev/null and b/vendor/amenadiel/jpgraph/Examples/examples_pie/worldmap1.jpg differ diff --git a/vendor/amenadiel/jpgraph/Examples/examples_polar/polar_csimex1.php b/vendor/amenadiel/jpgraph/Examples/examples_polar/polar_csimex1.php new file mode 100644 index 0000000000..ffaac17674 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_polar/polar_csimex1.php @@ -0,0 +1,69 @@ +SetScale('log',100); +$graph->SetType(POLAR_180); + +// Hide frame around graph (by setting width=0) +$graph->SetFrame(true,'white',1); + +// Show both major and minor grid lines +$graph->axis->ShowGrid(true,true); + +// Set color for gradient lines +$graph->axis->SetGridColor('lightblue:0.9','lightblue:0.9','lightblue:0.9'); + +// Set label and axis colors +$graph->axis->SetColor('black','navy','darkred'); + +// Draw the ticks on the bottom side of the radius axis +$graph->axis->SetTickSide(SIDE_DOWN); + +// Increase the margin for the labels since we changed the +// side of the ticks. +$graph->axis->SetLabelMargin(6); + +// Change fonts +$graph->axis->SetFont(FF_ARIAL,FS_NORMAL,8); +$graph->axis->SetAngleFont(FF_ARIAL,FS_NORMAL,8); + +// Setup axis title +$graph->axis->SetTitle('Coverage (in meter)','middle'); +$graph->axis->title->SetFont(FF_FONT1,FS_BOLD); + +// Setup graph title +$graph->title->Set('Polar plot #9'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,16); +$graph->title->SetColor('navy'); + +// Setup tab title +$graph->tabtitle->Set('Microphone #1'); +$graph->tabtitle->SetColor('brown:0.5','lightyellow'); + +// Setup the polar plot with CSIM targets for the marks +$p = new PolarPlot($data); +$p->SetFillColor('lightblue@0.5'); +$p->mark->SetType(MARK_SQUARE); +$p->mark->SetWidth(10); +$p->SetCSIMTargets( $targets ); + +$graph->Add($p); + +$graph->StrokeCSIM(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_polar/polarclockex1.php b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarclockex1.php new file mode 100644 index 0000000000..bdf9008e36 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarclockex1.php @@ -0,0 +1,55 @@ +SetScale('lin',150); + +$graph->SetMarginColor('#FFE6C0'); +$graph->SetType(POLAR_360); +$graph->SetMargin(40,40,50,40); +$graph->SetClockwise(true); + +//$graph->Set90AndMargin(60,50,70,120); + +$graph->SetBox(true); +$graph->SetFrame(false); +$graph->axis->ShowGrid(true,false,true); +$graph->axis->SetGridColor('gray','gray','gray'); + +$graph->axis->SetFont(FF_ARIAL,FS_NORMAL,8); +$graph->axis->SetTitle('X-Axis','center'); + +$graph->axis->SetColor('black','black','darkred'); +$graph->axis->SetAngleFont(FF_ARIAL,FS_NORMAL,8); + +$graph->title->Set('Clockwise polar plot'); +$graph->title->SetFont(FF_COMIC,FS_NORMAL,16); +$graph->title->SetColor('navy'); + + + +$p = new PolarPlot($data); +$p->SetFillColor('lightblue@0.5'); +$graph->Add($p); + +//$p2 = new PolarPlot($data2); +//$p2->SetFillColor('red@0.5'); +//$graph->Add($p2); + +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_polar/polarclockex2.php b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarclockex2.php new file mode 100644 index 0000000000..11cdeca668 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarclockex2.php @@ -0,0 +1,53 @@ +SetScale('lin',150); + +$graph->SetMarginColor('#FFE6C0'); +$graph->SetType(POLAR_360); +$graph->SetClockwise(true); +$graph->Set90AndMargin(40,40,50,40); + +$graph->SetBox(true); +$graph->SetFrame(false); +$graph->axis->ShowGrid(true,false,true); +$graph->axis->SetGridColor('gray','gray','gray'); + +$graph->axis->SetFont(FF_ARIAL,FS_NORMAL,8); +$graph->axis->SetTitle('X-Axis','center'); + +$graph->axis->SetColor('black','black','darkred'); +$graph->axis->SetAngleFont(FF_ARIAL,FS_NORMAL,8); + +$graph->title->Set('Clockwise polar plot (rotated)'); +$graph->title->SetFont(FF_COMIC,FS_NORMAL,16); +$graph->title->SetColor('navy'); + + + +$p = new PolarPlot($data); +$p->SetFillColor('lightblue@0.5'); +$graph->Add($p); + +//$p2 = new PolarPlot($data2); +//$p2->SetFillColor('red@0.5'); +//$graph->Add($p2); + +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex0-180.php b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex0-180.php new file mode 100644 index 0000000000..4fa344fa91 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex0-180.php @@ -0,0 +1,27 @@ +SetScale('lin'); +$graph->SetMargin(35,35,25,25); +$graph->SetType(POLAR_180); + +$p = new PolarPlot($data); +$p->SetFillColor('lightblue@0.5'); +$graph->Add($p); + +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex0.php b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex0.php new file mode 100644 index 0000000000..b11aa6e136 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex0.php @@ -0,0 +1,26 @@ +SetScale('lin'); +$graph->SetMargin(35,35,25,25); + +$p = new PolarPlot($data); +$p->SetFillColor('lightblue@0.5'); +$graph->Add($p); + +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex1.php b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex1.php new file mode 100644 index 0000000000..b0c7f8afba --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex1.php @@ -0,0 +1,30 @@ +SetScale('lin'); +$graph->SetType(POLAR_180); +//$graph->SetAngle(90); +//$graph->SetMargin(30-150,30-150,30+150,30+150); +$graph->Set90AndMargin(40,40,40,40); +//$graph->axis->SetLabelAlign('right','center'); + +$p = new PolarPlot($data); +$p->SetLegend("Test"); +$graph->Add($p); + +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex10.php b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex10.php new file mode 100644 index 0000000000..d864a23d49 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex10.php @@ -0,0 +1,66 @@ +SetScale('log',100); +$graph->SetType(POLAR_360); + +// Hide frame around graph (by setting width=0) +$graph->SetFrame(true,'white',1); + +// Show both major and minor grid lines +$graph->axis->ShowGrid(true,true); + +// Set color for gradient lines +$graph->axis->SetGridColor('lightblue:0.9','lightblue:0.9','lightblue:0.9'); + +// Set label and axis colors +$graph->axis->SetColor('black','navy','darkred'); + +// Draw the ticks on the bottom side of the radius axis +$graph->axis->SetTickSide(SIDE_DOWN); + +// Increase the margin for the labels since we changed the +// side of the ticks. +$graph->axis->SetLabelMargin(6); + +// Change fonts +$graph->axis->SetFont(FF_ARIAL,FS_NORMAL,8); +$graph->axis->SetAngleFont(FF_ARIAL,FS_NORMAL,8); + + +// Setup graph title +$graph->title->Set('Polar plot #10'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,16); +$graph->title->SetColor('navy'); + +// Setup tab title +$graph->tabtitle->Set('Microphone #1'); +$graph->tabtitle->SetColor('brown:0.5','lightyellow'); + + +$p = new PolarPlot($data); +$p->SetFillColor('lightblue@0.5'); +$p->mark->SetType(MARK_SQUARE); + +$graph->Add($p); + +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex2.php b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex2.php new file mode 100644 index 0000000000..d4a9779a29 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex2.php @@ -0,0 +1,34 @@ +SetScale('lin'); + +$graph->title->Set('Polar plot #2'); +$graph->title->SetFont(FF_FONT2,FS_BOLD); +$graph->title->SetColor('navy'); + +// Hide last labels on the Radius axis +// They intersect with the box otherwise +$graph->axis->HideLastTickLabel(); + +$p = new PolarPlot($data); +$p->SetFillColor('lightred@0.5'); + +$graph->Add($p); + +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex3-lin.php b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex3-lin.php new file mode 100644 index 0000000000..430438c908 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex3-lin.php @@ -0,0 +1,33 @@ +SetScale('lin',200); +$graph->SetType(POLAR_180); + +$graph->title->Set('Polar plot #3'); +$graph->title->SetFont(FF_FONT2,FS_BOLD); +$graph->title->SetColor('navy'); + +$graph->axis->ShowGrid(true,false); + +$p = new PolarPlot($data); +$p->SetFillColor('lightred@0.5'); + +$graph->Add($p); + +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex3.php b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex3.php new file mode 100644 index 0000000000..82bf18a237 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex3.php @@ -0,0 +1,33 @@ +SetScale('log',100); +$graph->SetType(POLAR_180); + +$graph->title->Set('Polar plot #3'); +$graph->title->SetFont(FF_FONT2,FS_BOLD); +$graph->title->SetColor('navy'); + +$graph->axis->ShowGrid(true,false); + +$p = new PolarPlot($data); +$p->SetFillColor('lightred@0.5'); + +$graph->Add($p); + +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex4.php b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex4.php new file mode 100644 index 0000000000..a4fb1d0841 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex4.php @@ -0,0 +1,34 @@ +SetScale('log'); + +$graph->title->Set('Polar plot #4'); +$graph->title->SetFont(FF_FONT2,FS_BOLD); +$graph->title->SetColor('navy'); + +// Hide last labels on the Radius axis +// They intersect with the box otherwise +$graph->axis->HideLastTickLabel(); + +$p = new PolarPlot($data); +$p->SetFillColor('lightred@0.5'); + +$graph->Add($p); + +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex5.php b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex5.php new file mode 100644 index 0000000000..7da58020b8 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex5.php @@ -0,0 +1,37 @@ +SetScale('log'); + +// Show both major and minor grid lines +$graph->axis->ShowGrid(true,true); + +$graph->title->Set('Polar plot #5'); +$graph->title->SetFont(FF_FONT2,FS_BOLD); +$graph->title->SetColor('navy'); + +// Hide last labels on the Radius axis +// They intersect with the box otherwise +$graph->axis->HideLastTickLabel(); + +$p = new PolarPlot($data); +$p->SetFillColor('lightred@0.5'); + +$graph->Add($p); + +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex6.php b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex6.php new file mode 100644 index 0000000000..21ae6a2772 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex6.php @@ -0,0 +1,35 @@ +SetScale('log'); +$graph->SetType(POLAR_180); + +// Show both major and minor grid lines +$graph->axis->ShowGrid(true,true); + +$graph->title->Set('Polar plot #6'); +$graph->title->SetFont(FF_FONT2,FS_BOLD); +$graph->title->SetColor('navy'); + + +$p = new PolarPlot($data); +$p->SetFillColor('lightred@0.5'); + +$graph->Add($p); + +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex7-1.php b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex7-1.php new file mode 100644 index 0000000000..5b593a19b5 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex7-1.php @@ -0,0 +1,50 @@ +SetScale('log',100); +$graph->SetType(POLAR_180); +$graph->SetPlotSize(220,250); + +// Hide frame around graph (by setting width=0) +$graph->SetFrame(true,'white',1); + +$graph->SetBackgroundGradient('blue:1.3','brown:1.4',GRAD_HOR,BGRAD_PLOT); + +// Set color for gradient lines +$graph->axis->SetGridColor('gray','gray','gray'); + +// Setup axis title +$graph->axis->SetTitle('Coverage (in meter)','middle'); +$graph->axis->title->SetFont(FF_FONT1,FS_BOLD); + +$graph->title->Set('Polar plot #7'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,16); +$graph->title->SetColor('navy'); + +// Adjust legen box position and color +$graph->legend->SetColor('navy','darkgray'); +$graph->legend->SetFillColor('white'); +$graph->legend->SetShadow('darkgray@0.5',5); + +$p = new PolarPlot($data); +$p->SetFillColor('lightblue@0.5'); +$p->mark->SetType(MARK_SQUARE); +$p->SetLegend("Mirophone #1\n(No amps)"); + +$graph->Add($p); + +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex7-2.php b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex7-2.php new file mode 100644 index 0000000000..959749d2a9 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex7-2.php @@ -0,0 +1,53 @@ +SetScale('log',100); +$graph->SetType(POLAR_360); +$graph->SetPlotSize(220,300); + +// Hide frame around graph (by setting width=0) +$graph->SetFrame(true,'white',1); + +$graph->SetBackgroundGradient('blue:1.3','brown:1.4',GRAD_MIDHOR,BGRAD_PLOT); + +// Set color for gradient lines +$graph->axis->SetGridColor('gray','gray','gray'); + +$graph->title->Set('Polar plot #7-2'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,16); +$graph->title->SetColor('navy'); + +// Adjust legen box position and color +$graph->legend->SetColor('navy','darkgray'); +$graph->legend->SetFillColor('white'); +$graph->legend->SetShadow('darkgray@0.5',5); + +$p = new PolarPlot($data); +$p->SetFillColor('yellow@0.6'); +$p->mark->SetType(MARK_SQUARE); +$p->SetLegend("Mirophone #1\n(No amps)"); + +$graph->Add($p); + +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex7.php b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex7.php new file mode 100644 index 0000000000..d7079a0a14 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex7.php @@ -0,0 +1,53 @@ +SetScale('lin',300); +$graph->SetType(POLAR_180); +$graph->SetPlotSize(220,250); + +// Hide frame around graph (by setting width=0) +$graph->SetFrame(true,'white',1); + +$graph->SetBackgroundGradient('blue:1.3','brown:1.4',GRAD_HOR,BGRAD_PLOT); + +// Show both major and minor grid lines +$graph->axis->ShowGrid(true,true); + +// Set color for gradient lines +$graph->axis->SetGridColor('gray','gray','gray'); + +// Setup axis title +$graph->axis->SetTitle('Coverage (in meter)','middle'); +$graph->axis->title->SetFont(FF_FONT1,FS_BOLD); + +$graph->title->Set('Polar plot #7'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,16); +$graph->title->SetColor('navy'); + +// Adjust legen box position and color +$graph->legend->SetColor('navy','darkgray'); +$graph->legend->SetFillColor('white'); +$graph->legend->SetShadow('darkgray@0.5',5); + +$p = new PolarPlot($data); +$p->SetFillColor('lightblue@0.5'); +$p->mark->SetType(MARK_SQUARE); +$p->SetLegend("Mirophone #1\n(No amps)"); + +$graph->Add($p); + +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex8.php b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex8.php new file mode 100644 index 0000000000..8322ebcd88 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex8.php @@ -0,0 +1,54 @@ +SetScale('log',100); +$graph->SetType(POLAR_180); +//$graph->SetPlotSize(250,250); + +// Hide frame around graph (by setting width=0) +$graph->SetFrame(true,'white',1); + +// Set plotarea color +$graph->SetColor('lightblue'); + +// Show both major and minor grid lines +$graph->axis->ShowGrid(true,true); + +// Set color for gradient lines +$graph->axis->SetGridColor('lightblue:0.8','lightblue:0.8','lightblue:0.8'); + +// Setup axis title +$graph->axis->SetTitle('Coverage (in meter)','middle'); +$graph->axis->title->SetFont(FF_FONT1,FS_BOLD); + +$graph->title->Set('Polar plot #8'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,16); +$graph->title->SetColor('navy'); + +// Adjust legen box position and color +$graph->legend->SetColor('navy','darkgray'); +$graph->legend->SetFillColor('white'); +$graph->legend->SetShadow('darkgray@0.5',5); + +$p = new PolarPlot($data); +$p->SetFillColor('white@0.5'); +$p->mark->SetType(MARK_SQUARE); +$p->SetLegend("Mirophone #1\n(No amps)"); + +$graph->Add($p); + +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex9.php b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex9.php new file mode 100644 index 0000000000..ee239ec066 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_polar/polarex9.php @@ -0,0 +1,63 @@ +SetScale('log',100); +$graph->SetType(POLAR_180); + +// Hide frame around graph (by setting width=0) +$graph->SetFrame(true,'white',1); + +// Show both major and minor grid lines +$graph->axis->ShowGrid(true,true); + +// Set color for gradient lines +$graph->axis->SetGridColor('lightblue:0.9','lightblue:0.9','lightblue:0.9'); + +// Set label and axis colors +$graph->axis->SetColor('black','navy','darkred'); + +// Draw the ticks on the bottom side of the radius axis +$graph->axis->SetTickSide(SIDE_DOWN); + +// Increase the margin for the labels since we changed the +// side of the ticks. +$graph->axis->SetLabelMargin(6); + +// Change fonts +$graph->axis->SetFont(FF_ARIAL,FS_NORMAL,8); +$graph->axis->SetAngleFont(FF_ARIAL,FS_NORMAL,8); + +// Setup axis title +$graph->axis->SetTitle('Coverage (in meter)','middle'); +$graph->axis->title->SetFont(FF_FONT1,FS_BOLD); + +// Setup graph title +$graph->title->Set('Polar plot #9'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,16); +$graph->title->SetColor('navy'); + +// Setup tab title +$graph->tabtitle->Set('Microphone #1'); +$graph->tabtitle->SetColor('brown:0.5','lightyellow'); + + +$p = new PolarPlot($data); +$p->SetFillColor('lightblue@0.5'); +$p->mark->SetType(MARK_SQUARE); + +$graph->Add($p); + +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_qr/qr-input.txt b/vendor/amenadiel/jpgraph/Examples/examples_qr/qr-input.txt new file mode 100644 index 0000000000..1b3c2bcdf0 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_qr/qr-input.txt @@ -0,0 +1 @@ +01234567890 \ No newline at end of file diff --git a/vendor/amenadiel/jpgraph/Examples/examples_qr/qr_template.php b/vendor/amenadiel/jpgraph/Examples/examples_qr/qr_template.php new file mode 100644 index 0000000000..e54ea7825f --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_qr/qr_template.php @@ -0,0 +1,32 @@ +SetModuleWidth($modulewidth); + +// Set Quiet zone (this should rarely need changing from the default) +$backend->SetQuietZone($quiet); + +if( $back == BACKEND_IMAGE ) { + + $backend->Stroke($data); +} +else { + $str = $backend->Stroke($data); + echo '
        '.$str.'
        '; +} +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample0.php b/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample0.php new file mode 100644 index 0000000000..46126fe7ae --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample0.php @@ -0,0 +1,23 @@ +Stroke($data); +} catch (Exception $e) { + $errstr = $e->GetMessage(); + echo 'QR Code error: '.$e->GetMessage()."\n"; + exit(1); +} + +?> \ No newline at end of file diff --git a/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample00.php b/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample00.php new file mode 100644 index 0000000000..f09fcd5d1a --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample00.php @@ -0,0 +1,16 @@ +Stroke($data); +?> \ No newline at end of file diff --git a/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample01.php b/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample01.php new file mode 100644 index 0000000000..af99deaf11 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample01.php @@ -0,0 +1,19 @@ +SetModuleWidth(5); + +// .. send the barcode back to the browser for the data +$backend->Stroke($data); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample02.php b/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample02.php new file mode 100644 index 0000000000..890d616c1c --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample02.php @@ -0,0 +1,23 @@ +SetModuleWidth(5); + + // .. send the barcode back to the browser for the data + $backend->Stroke($data); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample03.php b/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample03.php new file mode 100644 index 0000000000..858eede350 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample03.php @@ -0,0 +1,27 @@ +SetModuleWidth(5); + + // Store the barcode in the specifed file + $backend->Stroke($data,$fileName); + list($version,$errorcorrection) = $backend->GetQRInfo(); + + echo "QR Barcode, (Version: $version-$errorcorrection), image stored in file $fileName"; +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample03.png b/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample03.png new file mode 100644 index 0000000000..091a1cc2e6 Binary files /dev/null and b/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample03.png differ diff --git a/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample04.php b/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample04.php new file mode 100644 index 0000000000..c86447ae76 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample04.php @@ -0,0 +1,24 @@ +SetModuleWidth(3); + + // Store the barcode in the specifed file + $backend->Stroke($data); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample05.php b/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample05.php new file mode 100644 index 0000000000..96f5f47a2f --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample05.php @@ -0,0 +1,29 @@ +SetModuleWidth(4); + + // Store the barcode in the specifed file + $backend->Stroke($data); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample06.php b/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample06.php new file mode 100644 index 0000000000..046627f230 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample06.php @@ -0,0 +1,26 @@ +SetImgFormat('jpeg',80); + + // Set the module size + $backend->SetModuleWidth(4); + + // Store the barcode in the specifed file + $backend->Stroke($data); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample07.php b/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample07.php new file mode 100644 index 0000000000..68dde156ab --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample07.php @@ -0,0 +1,26 @@ +SetModuleWidth(4); + + // Store the barcode in the specifed file + $backend->Stroke($data); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample08.php b/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample08.php new file mode 100644 index 0000000000..08eb947b08 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample08.php @@ -0,0 +1,22 @@ +SetModuleWidth(5); + + // .. send the barcode back to the browser for the data in the file + $backend->StrokeFromFile($readFromFilename); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample09.php b/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample09.php new file mode 100644 index 0000000000..faa2a5de51 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample09.php @@ -0,0 +1,25 @@ +SetModuleWidth(5); + + // Use blue and white colors instead + $backend->SetColor('navy','white'); + + // .. send the barcode back to the browser for the data in the file + $backend->StrokeFromFile($readFromFilename); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample10.php b/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample10.php new file mode 100644 index 0000000000..1232754a22 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample10.php @@ -0,0 +1,26 @@ +SetModuleWidth(3); + + // Set color + $backend->SetColor('brown','white'); + + // Store the barcode in the specifed file + $backend->Stroke($data); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample11.php b/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample11.php new file mode 100644 index 0000000000..2f3e503e2e --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample11.php @@ -0,0 +1,26 @@ +SetModuleWidth($modulewidth); + +// Store the barcode in the specifed file +$ps_str = $backend->Stroke($data); + +echo '
        '.$ps_str.'
        '; +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample12.php b/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample12.php new file mode 100644 index 0000000000..d1e090465d --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_qr/qrexample12.php @@ -0,0 +1,26 @@ +SetModuleWidth($modulewidth); + +// Store the barcode in the specifed file +$ps_str = $backend->Stroke($data); + +echo '
        '.$ps_str.'
        '; +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_radar/fixscale_radarex1.php b/vendor/amenadiel/jpgraph/Examples/examples_radar/fixscale_radarex1.php new file mode 100644 index 0000000000..d663d90825 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_radar/fixscale_radarex1.php @@ -0,0 +1,36 @@ +SetScale('lin',0,50); +$graph->yscale->ticks->Set(25,5); +$graph->SetColor('white'); +$graph->SetShadow(); + +$graph->SetCenter(0.5,0.55); + +$graph->axis->SetFont(FF_FONT1,FS_BOLD); +$graph->axis->SetWeight(2); + +// Uncomment the following lines to also show grid lines. +$graph->grid->SetLineStyle('dashed'); +$graph->grid->SetColor('navy@0.5'); +$graph->grid->Show(); + +$graph->ShowMinorTickMarks(); + +$graph->title->Set('Quality result'); +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->SetTitles(array('One','Two','Three','Four','Five','Sex','Seven','Eight','Nine','Ten')); + +$plot = new RadarPlot(array(12,35,20,30,33,15,37)); +$plot->SetLegend('Goal'); +$plot->SetColor('red','lightred'); +$plot->SetFillColor('lightblue'); +$plot->SetLineWeight(2); + +$graph->Add($plot); +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_radar/radar_csimex1.php b/vendor/amenadiel/jpgraph/Examples/examples_radar/radar_csimex1.php new file mode 100644 index 0000000000..1f0454d8f7 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_radar/radar_csimex1.php @@ -0,0 +1,43 @@ +title->Set('Radar with marks'); +$graph->title->SetFont(FF_VERDANA,FS_BOLD,12); +$graph->title->SetMargin(10); + +$graph->SetTitles($titles); +$graph->SetCenter(0.5,0.55); +$graph->HideTickMarks(); +$graph->SetColor('lightgreen@0.7'); +$graph->axis->SetColor('darkgray'); +$graph->grid->SetColor('darkgray'); +$graph->grid->Show(); + +$graph->axis->title->SetFont(FF_ARIAL,FS_NORMAL,12); +$graph->axis->title->SetMargin(5); +$graph->SetGridDepth(DEPTH_BACK); +$graph->SetSize(0.6); + +$plot = new RadarPlot($data); +$plot->SetColor('red@0.2'); +$plot->SetLineWeight(2); +$plot->SetFillColor('red@0.7'); +$plot->mark->SetType(MARK_IMG_DIAMOND,'red',0.6); +$plot->mark->SetFillColor('darkred'); +$plot->SetCSIMTargets( $targets , $alts ); + +$graph->Add($plot); +$graph->StrokeCSIM(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_radar/radarex1.php b/vendor/amenadiel/jpgraph/Examples/examples_radar/radarex1.php new file mode 100644 index 0000000000..a21037574b --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_radar/radarex1.php @@ -0,0 +1,16 @@ +Add($plot); +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_radar/radarex2.php b/vendor/amenadiel/jpgraph/Examples/examples_radar/radarex2.php new file mode 100644 index 0000000000..a1400a3f2e --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_radar/radarex2.php @@ -0,0 +1,21 @@ +title->Set('Weekly goals'); +$graph->subtitle->Set('Year 2003'); + +$plot = new RadarPlot($data); +$plot->SetFillColor('lightred'); +$graph->SetSize(0.6); +$graph->SetPos(0.5,0.6); +// Add the plot and display the graph +$graph->Add($plot); +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_radar/radarex3.php b/vendor/amenadiel/jpgraph/Examples/examples_radar/radarex3.php new file mode 100644 index 0000000000..18fdd90216 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_radar/radarex3.php @@ -0,0 +1,21 @@ +GetShortMonth(); +$graph->SetTitles($titles); + +$plot = new RadarPlot($data); +$plot->SetFillColor('lightblue'); + +// Add the plot and display the graph +$graph->Add($plot); +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_radar/radarex4.php b/vendor/amenadiel/jpgraph/Examples/examples_radar/radarex4.php new file mode 100644 index 0000000000..f64f614820 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_radar/radarex4.php @@ -0,0 +1,28 @@ +SetShadow(); + +// Create the titles for the axis +$titles = $gDateLocale->GetShortMonth(); +$graph->SetTitles($titles); + +// Add grid lines +$graph->grid->Show(); +$graph->grid->SetLineStyle('dashed'); + +$plot = new RadarPlot($data); +$plot->SetFillColor('lightblue'); + +// Add the plot and display the graph +$graph->Add($plot); +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_radar/radarex5.php b/vendor/amenadiel/jpgraph/Examples/examples_radar/radarex5.php new file mode 100644 index 0000000000..6ee42aef0a --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_radar/radarex5.php @@ -0,0 +1,26 @@ +GetShortMonth(); +$graph->SetTitles($titles); + +// Add grid lines +$graph->grid->Show(); +$graph->grid->SetColor('darkred'); +$graph->grid->SetLineStyle('dotted'); + +$plot = new RadarPlot($data); +$plot->SetFillColor('lightblue'); + +// Add the plot and display the graph +$graph->Add($plot); +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_radar/radarex6.1.php b/vendor/amenadiel/jpgraph/Examples/examples_radar/radarex6.1.php new file mode 100644 index 0000000000..e6f9a50eae --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_radar/radarex6.1.php @@ -0,0 +1,45 @@ +SetShadow(); + +// Create the titles for the axis +$titles = $gDateLocale->GetShortMonth(); +$graph->SetTitles($titles); +$graph->SetColor('lightyellow'); + +// ADjust the position to make more room +// for the legend +$graph->SetCenter(0.4,0.55); +$graph->SetSize(0.6); + +// Add grid lines +$graph->grid->Show(); +$graph->grid->SetColor('darkred'); +$graph->grid->SetLineStyle('dotted'); + +$plot = new RadarPlot($data); +$plot->SetFillColor('lightblue'); +$plot->SetLegend("QA results"); + +$plot2 = new RadarPlot($data2); +$plot2->SetLegend("Target"); +$plot2->SetColor('red'); +$plot2->SetFill(false); +$plot2->SetLineWeight(2); + + +// Add the plot and display the graph +$graph->Add($plot); +$graph->Add($plot2); +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_radar/radarex6.php b/vendor/amenadiel/jpgraph/Examples/examples_radar/radarex6.php new file mode 100644 index 0000000000..d702f2941b --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_radar/radarex6.php @@ -0,0 +1,35 @@ +SetShadow(); + +// Create the titles for the axis +$titles = $gDateLocale->GetShortMonth(); +$graph->SetTitles($titles); +$graph->SetColor('lightyellow'); + +// ADjust the position to make more room +// for the legend +$graph->SetCenter(0.45,0.5); + +// Add grid lines +$graph->grid->Show(); +$graph->grid->SetColor('darkred'); +$graph->grid->SetLineStyle('dashed'); + +$plot = new RadarPlot($data); +$plot->SetFillColor('lightblue'); +$plot->SetLegend("QA results"); + +// Add the plot and display the graph +$graph->Add($plot); +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_radar/radarex7.php b/vendor/amenadiel/jpgraph/Examples/examples_radar/radarex7.php new file mode 100644 index 0000000000..cb44c20899 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_radar/radarex7.php @@ -0,0 +1,48 @@ +SetColor("white"); +$graph->SetShadow(); + +// Position the graph +$graph->SetCenter(0.4,0.55); + +// Setup the axis formatting +$graph->axis->SetFont(FF_FONT1,FS_BOLD); +$graph->axis->SetWeight(2); + +// Setup the grid lines +$graph->grid->SetLineStyle("longdashed"); +$graph->grid->SetColor("navy"); +$graph->grid->Show(); +$graph->HideTickMarks(); + +// Setup graph titles +$graph->title->Set("Quality result"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->SetTitles(array("One","Two","Three","Four","Five","Sex","Seven","Eight","Nine","Ten")); +// Create the first radar plot +$plot = new RadarPlot(array(30,80,60,40,71,81,47)); +$plot->SetLegend("Goal"); +$plot->SetColor("red","lightred"); +$plot->SetFill(false); +$plot->SetLineWeight(2); + +// Create the second radar plot +$plot2 = new RadarPlot(array(70,40,30,80,31,51,14)); +$plot2->SetLegend("Actual"); +$plot2->SetColor("blue","lightred"); + +// Add the plots to the graph +$graph->Add($plot2); +$graph->Add($plot); + +// And output the graph +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_radar/radarex8.1.php b/vendor/amenadiel/jpgraph/Examples/examples_radar/radarex8.1.php new file mode 100644 index 0000000000..e1f1336bc5 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_radar/radarex8.1.php @@ -0,0 +1,52 @@ +img->SetAntiAliasing(); + +// Set background color and shadow +$graph->SetColor("white"); +$graph->SetShadow(); + +// Position the graph +$graph->SetCenter(0.4,0.55); + +// Setup the axis formatting +$graph->axis->SetFont(FF_FONT1,FS_BOLD); + +// Setup the grid lines +$graph->grid->SetLineStyle("solid"); +$graph->grid->SetColor("navy"); +$graph->grid->Show(); +$graph->HideTickMarks(); + +// Setup graph titles +$graph->title->Set("Quality result"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$graph->SetTitles($gDateLocale->GetShortMonth()); + +// Create the first radar plot +$plot = new RadarPlot(array(70,80,60,90,71,81,47)); +$plot->SetLegend("Goal"); +$plot->SetColor("red","lightred"); +$plot->SetFill(false); +$plot->SetLineWeight(2); + +// Create the second radar plot +$plot2 = new RadarPlot(array(70,40,30,80,31,51,14)); +$plot2->SetLegend("Actual"); +$plot2->SetLineWeight(2); +$plot2->SetColor("blue"); +$plot2->SetFill(false); + +// Add the plots to the graph +$graph->Add($plot2); +$graph->Add($plot); + +// And output the graph +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_radar/radarex8.php b/vendor/amenadiel/jpgraph/Examples/examples_radar/radarex8.php new file mode 100644 index 0000000000..0d6b0f872e --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_radar/radarex8.php @@ -0,0 +1,51 @@ +img->SetAntiAliasing(); + +// Set background color and shadow +$graph->SetColor("white"); +$graph->SetShadow(); + +// Position the graph +$graph->SetCenter(0.4,0.55); + +// Setup the axis formatting +$graph->axis->SetFont(FF_FONT1,FS_BOLD); + +// Setup the grid lines +$graph->grid->SetLineStyle("solid"); +$graph->grid->SetColor("navy"); +$graph->grid->Show(); +$graph->HideTickMarks(); + +// Setup graph titles +$graph->title->Set("Quality result"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->SetTitles($gDateLocale->GetShortMonth()); + +// Create the first radar plot +$plot = new RadarPlot(array(70,80,60,90,71,81,47)); +$plot->SetLegend("Goal"); +$plot->SetColor("red","lightred"); +$plot->SetFill(false); +$plot->SetLineWeight(2); + +// Create the second radar plot +$plot2 = new RadarPlot(array(70,40,30,80,31,51,14)); +$plot2->SetLegend("Actual"); +$plot2->SetLineWeight(2); +$plot2->SetColor("blue"); +$plot2->SetFill(false); + +// Add the plots to the graph +$graph->Add($plot2); +$graph->Add($plot); + +// And output the graph +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_radar/radarex9.php b/vendor/amenadiel/jpgraph/Examples/examples_radar/radarex9.php new file mode 100644 index 0000000000..465ca262d7 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_radar/radarex9.php @@ -0,0 +1,33 @@ +title->Set("Accumulated PPM"); +$graph->title->SetFont(FF_VERDANA,FS_NORMAL,12); + +$graph->subtitle->Set("(according to direction)"); +$graph->subtitle->SetFont(FF_VERDANA,FS_ITALIC,10); + + +$graph->SetTitles($titles); +$graph->SetCenter(0.5,0.55); +$graph->HideTickMarks(); +$graph->SetColor('lightyellow'); +$graph->axis->SetColor('darkgray@0.3'); +$graph->grid->SetColor('darkgray@0.3'); +$graph->grid->Show(); + +$graph->SetGridDepth(DEPTH_BACK); + +$plot = new RadarPlot($data); +$plot->SetColor('red@0.2'); +$plot->SetLineWeight(1); +$plot->SetFillColor('red@0.7'); +$graph->Add($plot); +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_radar/radarlogex1-aa.php b/vendor/amenadiel/jpgraph/Examples/examples_radar/radarlogex1-aa.php new file mode 100644 index 0000000000..8417fb764f --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_radar/radarlogex1-aa.php @@ -0,0 +1,60 @@ +SetScale('log'); + +$graph->title->SetFont(FF_ARIAL,FS_BOLD,16); +$graph->title->Set('Logarithmic scale'); +$graph->title->SetMargin(10); + +// Make the radar graph fill out it's bounding box +$graph->SetPlotSize(0.8); +$graph->SetCenter(0.5,0.55); + +// Note: Enabling this results in a very noticable slow +// down of the image generation! And more load on your +// server. +$graph->img->SetAntiAliasing(); + +// Uncomment the following line if you want to supress +// minor tick marks +//$graph->yscale->ticks->SupressMinorTickMarks(); + +// We want the major tick marks to be black and minor +// slightly less noticable +$graph->yscale->ticks->SetMarkColor('black','darkgray'); + +// Set the axis title font +$graph->axis->title->SetFont(FF_ARIAL,FS_BOLD,14); +$graph->axis->title->SetColor('darkred:0.8'); + +// Use blue axis +$graph->axis->SetColor('blue'); + +$plot = new RadarPlot($data); +$plot->SetLineWeight(1); +$plot->SetColor('forestgreen'); +$plot->SetFillColor('forestgreen@0.9'); + +$plot2 = new RadarPlot($data2); +$plot2->SetLineWeight(2); +$plot2->SetColor('red'); +$plot2->SetFillColor('red@0.9'); + +// Add the plot and display the graph +$graph->Add($plot); +$graph->Add($plot2); +$graph->Stroke(); +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_radar/radarlogex1.php b/vendor/amenadiel/jpgraph/Examples/examples_radar/radarlogex1.php new file mode 100644 index 0000000000..2d08310ed0 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_radar/radarlogex1.php @@ -0,0 +1,55 @@ +SetScale('log'); + +$graph->title->SetFont(FF_ARIAL,FS_BOLD,16); +$graph->title->Set('Logarithmic scale'); +$graph->title->SetMargin(10); + +// Make the radar graph fill out it's bounding box +$graph->SetPlotSize(0.8); +$graph->SetCenter(0.5,0.55); + +// Uncomment the following line if you want to supress +// minor tick marks +//$graph->yscale->ticks->SupressMinorTickMarks(); + +// We want the major tick marks to be black and minor +// slightly less noticable +$graph->yscale->ticks->SetMarkColor('black','darkgray'); + +// Set the axis title font +$graph->axis->title->SetFont(FF_ARIAL,FS_BOLD,14); +$graph->axis->title->SetColor('darkred:0.8'); + +// Use blue axis +$graph->axis->SetColor('blue'); + +$plot = new RadarPlot($data); +$plot->SetLineWeight(1); +$plot->SetColor('forestgreen'); +$plot->SetFillColor('forestgreen@0.9'); + +$plot2 = new RadarPlot($data2); +$plot2->SetLineWeight(2); +$plot2->SetColor('red'); +$plot2->SetFillColor('red@0.9'); + +// Add the plot and display the graph +$graph->Add($plot); +$graph->Add($plot2); +$graph->Stroke(); +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_radar/radarlogex2.php b/vendor/amenadiel/jpgraph/Examples/examples_radar/radarlogex2.php new file mode 100644 index 0000000000..f347141c84 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_radar/radarlogex2.php @@ -0,0 +1,47 @@ +img->SetAntiAliasing(); + +// Make the spider graph fill out it's bounding box +$graph->SetPlotSize(0.85); + +// Use logarithmic scale (If you don't use any SetScale() +// the spider graph will default to linear scale +$graph->SetScale("log"); + +// Uncomment the following line if you want to supress +// minor tick marks +// $graph->yscale->ticks->SupressMinorTickMarks(); + +// We want the major tick marks to be black and minor +// slightly less noticable +$graph->yscale->ticks->SetMarkColor("black","darkgray"); + +// Set the axis title font +$graph->axis->title->SetFont(FF_ARIAL,FS_BOLD,12); + +// Use blue axis +$graph->axis->SetColor("blue"); + +$plot = new RadarPlot($data); +$plot->SetLineWeight(2); +$plot->SetColor('forestgreen'); + +// Add the plot and display the graph +$graph->Add($plot); +$graph->Stroke(); +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_radar/radarmarkex1.php b/vendor/amenadiel/jpgraph/Examples/examples_radar/radarmarkex1.php new file mode 100644 index 0000000000..f5595e8a16 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_radar/radarmarkex1.php @@ -0,0 +1,35 @@ +title->Set('Radar with marks'); +$graph->title->SetFont(FF_VERDANA,FS_NORMAL,12); + +$graph->SetTitles($titles); +$graph->SetCenter(0.5,0.55); +$graph->HideTickMarks(); +$graph->SetColor('lightgreen@0.7'); +$graph->axis->SetColor('darkgray'); +$graph->grid->SetColor('darkgray'); +$graph->grid->Show(); + +$graph->axis->title->SetFont(FF_ARIAL,FS_NORMAL,12); +$graph->axis->title->SetMargin(5); +$graph->SetGridDepth(DEPTH_BACK); +$graph->SetSize(0.6); + +$plot = new RadarPlot($data); +$plot->SetColor('red@0.2'); +$plot->SetLineWeight(1); +$plot->SetFillColor('red@0.7'); + +$plot->mark->SetType(MARK_IMG_SBALL,'red'); + +$graph->Add($plot); +$graph->Stroke(); +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_rotate/rotateex1.php b/vendor/amenadiel/jpgraph/Examples/examples_rotate/rotateex1.php new file mode 100644 index 0000000000..35ca3c1920 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_rotate/rotateex1.php @@ -0,0 +1,45 @@ +SetAngle(40); +$graph->img->SetMargin(80, 80, 80, 80); +$graph->SetScale("textlin"); +$graph->SetY2Scale("lin"); +$graph->SetShadow(); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot2 = new Plot\LinePlot($y2data); + +// Add the plot to the graph +$graph->Add($lineplot); +$graph->AddY2($lineplot2); +$lineplot2->SetColor("orange"); +$lineplot2->SetWeight(2); +$graph->y2axis->SetColor("orange"); + +$graph->title->Set("Example 1 rotated graph (40 degree)"); +$graph->legend->Pos(0.05, 0.1, "right", "top"); + +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); + +$lineplot2->SetColor("orange"); +$lineplot2->SetWeight(2); + +$graph->yaxis->SetColor("blue"); + +$lineplot->SetLegend("Plot 1"); +$lineplot2->SetLegend("Plot 2"); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_rotate/rotex0.php b/vendor/amenadiel/jpgraph/Examples/examples_rotate/rotex0.php new file mode 100644 index 0000000000..31d87d17f0 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_rotate/rotex0.php @@ -0,0 +1,18 @@ +SetMargin(30, 90, 30, 30); +$graph->SetScale("textlin"); + +$line = new Plot\LinePlot($ydata); +$line->SetLegend('2002'); +$line->SetColor('darkred'); +$line->SetWeight(2); +$graph->Add($line); + +// Output graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_rotate/rotex1.php b/vendor/amenadiel/jpgraph/Examples/examples_rotate/rotex1.php new file mode 100644 index 0000000000..21996cca68 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_rotate/rotex1.php @@ -0,0 +1,20 @@ +SetMargin(30, 90, 30, 30); +$graph->SetScale("textlin"); + +$graph->img->SetAngle(45); + +$line = new Plot\LinePlot($ydata); +$line->SetLegend('2002'); +$line->SetColor('darkred'); +$line->SetWeight(2); +$graph->Add($line); + +// Output graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_rotate/rotex2.php b/vendor/amenadiel/jpgraph/Examples/examples_rotate/rotex2.php new file mode 100644 index 0000000000..df318037a8 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_rotate/rotex2.php @@ -0,0 +1,20 @@ +SetMargin(30, 90, 30, 30); +$graph->SetScale("textlin"); + +$graph->img->SetAngle(90); + +$line = new Plot\LinePlot($ydata); +$line->SetLegend('2002'); +$line->SetColor('darkred'); +$line->SetWeight(2); +$graph->Add($line); + +// Output graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_rotate/rotex3.php b/vendor/amenadiel/jpgraph/Examples/examples_rotate/rotex3.php new file mode 100644 index 0000000000..b9b0b341bf --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_rotate/rotex3.php @@ -0,0 +1,21 @@ +SetMargin(30, 90, 30, 30); +$graph->SetScale("textlin"); + +$graph->img->SetAngle(45); +$graph->img->SetCenter(floor(270 / 2), floor(170 / 2)); + +$line = new Plot\LinePlot($ydata); +$line->SetLegend('2002'); +$line->SetColor('darkred'); +$line->SetWeight(2); +$graph->Add($line); + +// Output graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_rotate/rotex4.php b/vendor/amenadiel/jpgraph/Examples/examples_rotate/rotex4.php new file mode 100644 index 0000000000..c64b722588 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_rotate/rotex4.php @@ -0,0 +1,21 @@ +SetMargin(30, 90, 30, 30); +$graph->SetScale("textlin"); + +$graph->img->SetAngle(90); +$graph->img->SetCenter(floor(270 / 2), floor(170 / 2)); + +$line = new Plot\LinePlot($ydata); +$line->SetLegend('2002'); +$line->SetColor('darkred'); +$line->SetWeight(2); +$graph->Add($line); + +// Output graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_rotate/rotex5.php b/vendor/amenadiel/jpgraph/Examples/examples_rotate/rotex5.php new file mode 100644 index 0000000000..efbe0e676b --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_rotate/rotex5.php @@ -0,0 +1,21 @@ +SetMargin(30, 90, 30, 30); +$graph->SetScale("textlin"); + +$graph->img->SetAngle(-30); +$graph->img->SetCenter(30, 170 - 30); + +$line = new Plot\LinePlot($ydata); +$line->SetLegend('2002'); +$line->SetColor('darkred'); +$line->SetWeight(2); +$graph->Add($line); + +// Output graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_scatter/balloonex1.php b/vendor/amenadiel/jpgraph/Examples/examples_scatter/balloonex1.php new file mode 100644 index 0000000000..efce7534a2 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_scatter/balloonex1.php @@ -0,0 +1,58 @@ +SetScale("linlin"); +$graph->img->SetMargin(40, 100, 40, 40); +$graph->SetShadow(); +$graph->title->Set("Example of ballon scatter plot"); +// Use a lot of grace to get large scales +$graph->yaxis->scale->SetGrace(50, 10); + +// Make sure X-axis as at the bottom of the graph +$graph->xaxis->SetPos('min'); + +// Create the scatter plot +$sp1 = new ScatterPlot($datay, $datax); +$sp1->mark->SetType(MARK_FILLEDCIRCLE); + +// Uncomment the following two lines to display the values +$sp1->value->Show(); +$sp1->value->SetFont(FF_FONT1, FS_BOLD); + +// Specify the callback +$sp1->mark->SetCallback("FCallback"); + +// Setup the legend for plot +$sp1->SetLegend('Year 2002'); + +// Add the scatter plot to the graph +$graph->Add($sp1); + +// ... and send to browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_scatter/balloonex2.php b/vendor/amenadiel/jpgraph/Examples/examples_scatter/balloonex2.php new file mode 100644 index 0000000000..56cf15dce3 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_scatter/balloonex2.php @@ -0,0 +1,75 @@ +SetScale("intlin"); +$graph->SetMargin(40, 40, 40, 40); +$graph->SetMarginColor('wheat'); + +$graph->title->Set("Example of ballon scatter plot with X,Y callback"); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); +$graph->title->SetMargin(10); + +// Use a lot of grace to get large scales since the ballon have +// size and we don't want them to collide with the X-axis +$graph->yaxis->scale->SetGrace(50, 10); +$graph->xaxis->scale->SetGrace(50, 10); + +// Make sure X-axis as at the bottom of the graph and not at the default Y=0 +$graph->xaxis->SetPos('min'); + +// Set X-scale to start at 0 +$graph->xscale->SetAutoMin(0); + +// Create the scatter plot +$sp1 = new ScatterPlot($datay, $datax); +$sp1->mark->SetType(MARK_FILLEDCIRCLE); + +// Uncomment the following two lines to display the values +$sp1->value->Show(); +$sp1->value->SetFont(FF_FONT1, FS_BOLD); + +// Specify the callback +$sp1->mark->SetCallbackYX("FCallback"); + +// Add the scatter plot to the graph +$graph->Add($sp1); + +// ... and send to browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_scatter/bezierex1.php b/vendor/amenadiel/jpgraph/Examples/examples_scatter/bezierex1.php new file mode 100644 index 0000000000..eb32a9f12b --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_scatter/bezierex1.php @@ -0,0 +1,51 @@ +Get(50); + +// Create the graph +$g = new Graph\Graph(300, 200); +$g->SetMargin(30, 20, 40, 30); +$g->title->Set("Bezier interpolation"); +$g->title->SetFont(FF_ARIAL, FS_NORMAL, 12); +$g->subtitle->Set('(Control points shown in red)'); +$g->subtitle->SetColor('darkred'); +$g->SetMarginColor('lightblue'); + +//$g->img->SetAntiAliasing(); + +// We need a linlin scale since we provide both +// x and y coordinates for the data points. +$g->SetScale('linlin'); + +// We want 1 decimal for the X-label +$g->xaxis->SetLabelFormat('%1.1f'); + +// We use a scatterplot to illustrate the original +// contro points. +$bplot = new ScatterPlot($ydata, $xdata); +$bplot->mark->SetFillColor('red@0.3'); +$bplot->mark->SetColor('red@0.5'); + +// And a line plot to stroke the smooth curve we got +// from the original control points +$lplot = new Plot\LinePlot($newy, $newx); +$lplot->SetColor('navy'); + +// Add the plots to the graph and stroke +$g->Add($lplot); +$g->Add($bplot); +$g->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_scatter/ccbp_ex1.php b/vendor/amenadiel/jpgraph/Examples/examples_scatter/ccbp_ex1.php new file mode 100644 index 0000000000..4d1f10c600 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_scatter/ccbp_ex1.php @@ -0,0 +1,37 @@ +SetTitle('Buffer penetration', '(history added)'); +$graph->SetColorMap(0); + +// Two "fake tasks with hostory +$datax = array(75, 83); +$datay = array(110, 64); +$datax1 = array(33, 50, 67, 83); +$datay1 = array(86, 76, 80, 64); +$datax2 = array(18, 47, 58, 75); +$datay2 = array(80, 97, 105, 110); + +$sp = new ScatterPlot($datay, $datax); +$sp->mark->SetType(MARK_DIAMOND); +$sp->mark->SetFillColor('white'); +$sp->mark->SetSize(12); + +$sp_hist = array(); +$sp_hist[0] = new Plot\LinePlot($datay1, $datax1); +$sp_hist[0]->SetWeight(1); +$sp_hist[0]->SetColor('white'); + +$sp_hist[1] = new Plot\LinePlot($datay2, $datax2); +$sp_hist[1]->SetWeight(1); +$sp_hist[1]->SetColor('white'); + +$graph->Add($sp_hist); +$graph->Add($sp); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_scatter/ccbp_ex2.php b/vendor/amenadiel/jpgraph/Examples/examples_scatter/ccbp_ex2.php new file mode 100644 index 0000000000..25fab7161b --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_scatter/ccbp_ex2.php @@ -0,0 +1,37 @@ +SetTitle('Buffer penetration', '(history added)'); +$graph->SetColorMap(1); + +// Two "fake tasks with hostory +$datax = array(75, 83); +$datay = array(110, 64); +$datax1 = array(33, 50, 67, 83); +$datay1 = array(86, 76, 80, 64); +$datax2 = array(18, 47, 58, 75); +$datay2 = array(80, 97, 105, 110); + +$sp = new ScatterPlot($datay, $datax); +$sp->mark->SetType(MARK_DIAMOND); +$sp->mark->SetFillColor('white'); +$sp->mark->SetSize(12); + +$sp_hist = array(); +$sp_hist[0] = new Plot\LinePlot($datay1, $datax1); +$sp_hist[0]->SetWeight(1); +$sp_hist[0]->SetColor('white'); + +$sp_hist[1] = new Plot\LinePlot($datay2, $datax2); +$sp_hist[1]->SetWeight(1); +$sp_hist[1]->SetColor('white'); + +$graph->Add($sp_hist); +$graph->Add($sp); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_scatter/ccbpgraph.class.php b/vendor/amenadiel/jpgraph/Examples/examples_scatter/ccbpgraph.class.php new file mode 100644 index 0000000000..01a7d2530e --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_scatter/ccbpgraph.class.php @@ -0,0 +1,276 @@ +iWidth = $aWidth; + $this->iHeight = $aHeight; + } + + /** + * Set the title and subtitle for the graph + * + * @param string $aTitle + * @param string $aSubTitle + */ + public function SetTitle($aTitle, $aSubTitle) + { + $this->iTitle = $aTitle; + $this->iSubTitle = $aSubTitle; + } + + /** + * Set the x-axis min and max values + * + * @param int $aMin + * @param int $aMax + */ + public function SetXMinMax($aMin, $aMax) + { + $this->iXMin = floor($aMin / CCBPGraph::TickStep) * CCBPGraph::TickStep; + $this->iXMax = ceil($aMax / CCBPGraph::TickStep) * CCBPGraph::TickStep; + } + + /** + * Specify what color map to use + * + * @param int $aMap + */ + public function SetColorMap($aMap) + { + $this->iColorMap = $aMap % CCBPGraph::NColorMaps; + } + + /** + * Set the y-axis min and max values + * + * @param int $aMin + * @param int $aMax + */ + public function SetYMinMax($aMin, $aMax) + { + $this->iYMin = floor($aMin / CCBPGraph::TickStep) * CCBPGraph::TickStep; + $this->iYMax = ceil($aMax / CCBPGraph::TickStep) * CCBPGraph::TickStep; + } + + /** + * Set the specification of the color backgrounds and also the + * optional exact colors to be used + * + * @param mixed $aSpec An array of 3 1x2 arrays. Each array specify the + * color indication value at x=0 and x=max x in order to determine the slope + * @param mixed $aColors An array with four elements specifying the colors + * of each color indicator + */ + public function SetColorIndication(array $aSpec, array $aColors = null) + { + if (count($aSpec) !== 3) { + JpgraphError::Raise('Specification of scale values for background indicators must be an array with three elements.'); + } + $this->iColorInd = $aSpec; + if ($aColors !== null) { + if (is_array($aColors) && count($aColors) == 4) { + $this->iColorSpec = $aColors; + } else { + JpGraphError::Raise('Color specification for background indication must have four colors.'); + } + } + } + + /** + * Construct the graph + * + */ + private function Init() + { + + // Setup limits for color indications + $lowx = $this->iXMin; + $highx = $this->iXMax; + $lowy = $this->iYMin; + $highy = $this->iYMax; + $width = $this->iWidth; + $height = $this->iHeight; + + // Margins + $lm = 50; + $rm = 40; + $tm = 60; + $bm = 40; + + if ($width <= 300 || $height <= 250) { + $labelsize = 8; + $lm = 25; + $rm = 25; + $tm = 45; + $bm = 25; + } elseif ($width <= 450 || $height <= 300) { + $labelsize = 8; + $lm = 30; + $rm = 30; + $tm = 50; + $bm = 30; + } elseif ($width <= 600 || $height <= 400) { + $labelsize = 9; + } else { + $labelsize = 11; + } + + if ($this->iSubTitle == '') { + $tm -= $labelsize + 4; + } + + $graph = new Graph\Graph($width, $height); + $graph->SetScale('intint', $lowy, $highy, $lowx, $highx); + $graph->SetMargin($lm, $rm, $tm, $bm); + $graph->SetMarginColor($this->iMarginColor[$this->iColorMap]); + $graph->SetClipping(); + + $graph->title->Set($this->iTitle); + $graph->subtitle->Set($this->iSubTitle); + + $graph->title->SetFont(FF_ARIAL, FS_BOLD, $labelsize + 4); + $graph->subtitle->SetFont(FF_ARIAL, FS_BOLD, $labelsize + 1); + + $graph->SetBox(true, 'black@0.3'); + + $graph->xaxis->SetFont(FF_ARIAL, FS_BOLD, $labelsize); + $graph->yaxis->SetFont(FF_ARIAL, FS_BOLD, $labelsize); + + $graph->xaxis->scale->ticks->Set(CCBPGraph::TickStep, CCBPGraph::TickStep); + $graph->yaxis->scale->ticks->Set(CCBPGraph::TickStep, CCBPGraph::TickStep); + + $graph->xaxis->HideZeroLabel(); + $graph->yaxis->HideZeroLabel(); + + $graph->xaxis->SetLabelFormatString('%d%%'); + $graph->yaxis->SetLabelFormatString('%d%%'); + + // For the x-axis we adjust the color so labels on the left of the Y-axis are in black + $n1 = floor(abs($this->iXMin / 25)) + 1; + $n2 = floor($this->iXMax / 25); + if ($this->iColorMap == 0) { + $xlcolors = array(); + for ($i = 0; $i < $n1; ++$i) { + $xlcolors[$i] = 'black'; + } + for ($i = 0; $i < $n2; ++$i) { + $xlcolors[$n1 + $i] = 'lightgray:1.5'; + } + $graph->xaxis->SetColor('gray', $xlcolors); + $graph->yaxis->SetColor('gray', 'lightgray:1.5'); + } else { + $graph->xaxis->SetColor('darkgray', 'darkgray:0.8'); + $graph->yaxis->SetColor('darkgray', 'darkgray:0.8'); + } + $graph->SetGridDepth(DEPTH_FRONT); + $graph->ygrid->SetColor('gray@0.6'); + $graph->ygrid->SetLineStyle('dotted'); + + $graph->ygrid->Show(); + + $graph->xaxis->SetWeight(1); + $graph->yaxis->SetWeight(1); + + $ytitle = new Text(CCBPGraph::YTitle, floor($lm * .75), ($height - $tm - $bm) / 2 + $tm); + #$ytitle->SetFont(FF_VERA,FS_BOLD,$labelsize+1); + $ytitle->SetAlign('right', 'center'); + $ytitle->SetAngle(90); + $graph->Add($ytitle); + + $xtitle = new Text(CCBPGraph::XTitle, ($width - $lm - $rm) / 2 + $lm, $height - 10); + #$xtitle->SetFont(FF_VERA,FS_BOLD,$labelsize); + $xtitle->SetAlign('center', 'bottom'); + $graph->Add($xtitle); + + $df = 'D j:S M, Y'; + if ($width < 400) { + $df = 'D j:S M'; + } + + $time = new Text(date($df), $width - 10, $height - 10); + $time->SetAlign('right', 'bottom'); + #$time->SetFont(FF_VERA,FS_NORMAL,$labelsize-1); + $time->SetColor('darkgray'); + $graph->Add($time); + + // Use an accumulated fille line graph to create the colored bands + + $n = 3; + for ($i = 0; $i < $n; ++$i) { + $b = $this->iColorInd[$i][0]; + $k = ($this->iColorInd[$i][1] - $this->iColorInd[$i][0]) / $this->iXMax; + $colarea[$i] = array(array($lowx, $lowx * $k + $b), array($highx, $highx * $k + $b)); + } + $colarea[3] = array(array($lowx, $highy), array($highx, $highy)); + + $cb = array(); + for ($i = 0; $i < 4; ++$i) { + $cb[$i] = new Plot\LinePlot(array($colarea[$i][0][1], $colarea[$i][1][1]), + array($colarea[$i][0][0], $colarea[$i][1][0])); + $cb[$i]->SetFillColor($this->iColorSpec[$this->iColorMap][$i]); + $cb[$i]->SetFillFromYMin(); + } + + $graph->Add(array_slice(array_reverse($cb), 0, 4)); + $this->graph = $graph; + } + + /** + * Add a line or scatter plot to the graph + * + * @param mixed $aPlots + */ + public function Add($aPlots) + { + if (is_array($aPlots)) { + $this->iPlots = array_merge($this->iPlots, $aPlots); + } else { + $this->iPlots[] = $aPlots; + } + } + + /** + * Stroke the graph back to the client or to a file + * + * @param mixed $aFile + */ + public function Stroke($aFile = '') + { + $this->Init(); + if (count($this->iPlots) > 0) { + $this->graph->Add($this->iPlots); + } + $this->graph->Stroke($aFile); + } +} diff --git a/vendor/amenadiel/jpgraph/Examples/examples_scatter/fieldscatterex1.php b/vendor/amenadiel/jpgraph/Examples/examples_scatter/fieldscatterex1.php new file mode 100644 index 0000000000..bad00a6320 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_scatter/fieldscatterex1.php @@ -0,0 +1,108 @@ + 1) { + $f = 1; + } + + $red = floor((1 - $f) * 255); + $blue = floor($f * 255); + $color = array($red, 0, $blue); + //echo "x=$x, y=$y, blue=$blue, red=$red
        "; + return array($color, $size, $arrowsize); +} + +// Create data for a simulated pseudo-magnetic radient field +$datax = array(); +$datay = array(); +$angle = array(); +for ($x = 1; $x < 10; ++$x) { + for ($y = 10; $y < 100; $y += 10) { + $a = -1; + if ($x == $polex && $y == $poley) { + continue; + } + + if ($x == $polex) { + if ($y > $poley) { + $a = 90; + } else { + $a = 270; + } + + } + if ($y == $poley) { + if ($x > $polex) { + $a = 0; + } else { + $a = 180; + } + + } + if ($a == -1) { + $d1 = $y - $poley; + $d2 = ($polex - $x) * 20; + if ($y < $poley) { + $d2 *= -1; + } + + $h = sqrt($d1 * $d1 + $d2 * $d2); + $t = -$d2 / $h; + $ac = acos($t); + if ($y < $poley) { + $ac += M_PI; + } + + $a = $ac * 180 / M_PI; + } + $datax[] = $x; + $datay[] = $y; + $angle[] = $a; + } +} + +// Setup the graph +$graph = new Graph\Graph(300, 200); +$graph->SetScale("intlin", 0, 100, 0, 10); +$graph->SetMarginColor('lightblue'); + +// ..and titles +$graph->title->Set("Field plot"); + +// Setup the field plot +$fp = new FieldPlot($datay, $datax, $angle); + +// Setup formatting callback +$fp->SetCallback('FldCallback'); + +// First size argument is length (in pixels of arrow) +// Second size argument is roughly size of arrow. Arrow size is specified as +// an integer in the range [0,9] +$fp->arrow->SetSize(20, 2); +$fp->arrow->SetColor('navy'); + +$graph->Add($fp); + +// .. and output +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_scatter/footerex1.php b/vendor/amenadiel/jpgraph/Examples/examples_scatter/footerex1.php new file mode 100644 index 0000000000..2371110aa6 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_scatter/footerex1.php @@ -0,0 +1,58 @@ +SetMarginColor('white'); +$graph->SetScale("textlin"); +$graph->SetFrame(false); +$graph->SetMargin(30, 5, 25, 50); + +// Setup the tab +$graph->tabtitle->Set(' Year 2003 '); +$graph->tabtitle->SetFont(FF_ARIAL, FS_BOLD, 13); +$graph->tabtitle->SetColor('darkred', '#E1E1FF'); + +// Enable X-grid as well +$graph->xgrid->Show(); + +// Use months as X-labels +$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth()); + +$graph->footer->left->Set('L. footer'); +$graph->footer->left->SetFont(FF_ARIAL, FS_NORMAL, 12); +$graph->footer->left->SetColor('darkred'); +$graph->footer->center->Set('C. footer'); +$graph->footer->center->SetFont(FF_ARIAL, FS_BOLD, 12); +$graph->footer->center->SetColor('darkred'); +$graph->footer->right->Set('R. footer'); +$graph->footer->right->SetFont(FF_ARIAL, FS_NORMAL, 12); +$graph->footer->right->SetColor('darkred'); + +// Create the plot +$p1 = new Plot\LinePlot($datay1); +$p1->SetColor("navy"); + +// Use an image of favourite car as marker +$p1->mark->SetType(MARK_IMG, 'saab_95.jpg', 0.5); + +// Displayes value on top of marker image +$p1->value->SetFormat('%d mil'); +$p1->value->Show(); +$p1->value->SetColor('darkred'); +$p1->value->SetFont(FF_ARIAL, FS_BOLD, 10); +// Increase the margin so that the value is printed avove tje +// img marker +$p1->value->SetMargin(14); + +// Incent the X-scale so the first and last point doesn't +// fall on the edges +$p1->SetCenter(); + +$graph->Add($p1); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_scatter/impulsex1.php b/vendor/amenadiel/jpgraph/Examples/examples_scatter/impulsex1.php new file mode 100644 index 0000000000..a97325854e --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_scatter/impulsex1.php @@ -0,0 +1,21 @@ +SetScale("textlin"); + +$graph->SetShadow(); +$graph->img->SetMargin(40, 40, 40, 40); + +$graph->title->Set("Simple mpuls plot"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +$sp1 = new ScatterPlot($datay); +$sp1->mark->SetType(MARK_SQUARE); +$sp1->SetImpuls(); + +$graph->Add($sp1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_scatter/impulsex2.php b/vendor/amenadiel/jpgraph/Examples/examples_scatter/impulsex2.php new file mode 100644 index 0000000000..6bec45f889 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_scatter/impulsex2.php @@ -0,0 +1,27 @@ +SetScale("textlin"); + +$graph->SetShadow(); +$graph->img->SetMargin(40, 40, 40, 40); + +$graph->title->Set("Impuls plot, variant 2"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->Set("Impuls respons"); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); + +$sp1 = new ScatterPlot($datay); //,$datax); +$sp1->mark->SetType(MARK_FILLEDCIRCLE); +$sp1->mark->SetFillColor("red"); +$sp1->mark->SetWidth(4); +$sp1->SetImpuls(); +$sp1->SetColor("blue"); +$sp1->SetWeight(3); + +$graph->Add($sp1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_scatter/impulsex3.php b/vendor/amenadiel/jpgraph/Examples/examples_scatter/impulsex3.php new file mode 100644 index 0000000000..b611c5f117 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_scatter/impulsex3.php @@ -0,0 +1,52 @@ +SetScale("intlin"); +$graph->SetShadow(); +$graph->SetBox(); + +$graph->title->Set("Impuls Example 3"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Set format callback for labels +$graph->yaxis->SetLabelFormatCallback("mycallback"); + +// Set X-axis at the minimum value of Y-axis (default will be at 0) +$graph->xaxis->SetPos("min"); // "min" will position the x-axis at the minimum value of the Y-axis + +// Extend the margin for the labels on the Y-axis and reverse the direction +// of the ticks on the Y-axis +$graph->yaxis->SetLabelMargin(12); +$graph->xaxis->SetLabelMargin(6); +$graph->yaxis->SetTickSide(SIDE_LEFT); +$graph->xaxis->SetTickSide(SIDE_DOWN); + +// Create a new impuls type scatter plot +$sp1 = new ScatterPlot($datay); +$sp1->mark->SetType(MARK_SQUARE); +$sp1->mark->SetFillColor("red"); +$sp1->SetImpuls(); +$sp1->SetColor("blue"); +$sp1->SetWeight(1); +$sp1->mark->SetWidth(3); + +$graph->Add($sp1); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_scatter/impulsex4.php b/vendor/amenadiel/jpgraph/Examples/examples_scatter/impulsex4.php new file mode 100644 index 0000000000..2f893654fe --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_scatter/impulsex4.php @@ -0,0 +1,74 @@ +SetScale("intlin"); + +$graph->SetShadow(); +$graph->SetBox(); +$graph->title->Set("Impuls Example 4"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Set some other color then the boring default +$graph->SetColor("lightyellow"); +$graph->SetMarginColor("khaki"); + +// Set legend box specification +$graph->legend->SetFillColor("white"); +$graph->legend->SetLineWeight(2); + +// Set X-axis at the minimum value of Y-axis (default will be at 0) +$graph->xaxis->SetPos("min"); // "min" will position the x-axis at the minimum value of the Y-axis + +// Extend the margin for the labels on the Y-axis and reverse the direction +// of the ticks on the Y-axis +$graph->yaxis->SetLabelMargin(12); +$graph->xaxis->SetLabelMargin(6); +$graph->yaxis->SetTickSide(SIDE_LEFT); +$graph->xaxis->SetTickSide(SIDE_DOWN); + +// Add mark graph with static lines +$line = new PlotLine(HORIZONTAL, 0, "black", 2); +$graph->AddLine($line); + +// Create a new impuls type scatter plot +$sp1 = new ScatterPlot($datay, $datax); +$sp1->mark->SetType(MARK_SQUARE); +$sp1->mark->SetFillColor("red"); +$sp1->mark->SetWidth(3); + +$sp1->SetImpuls(); +$sp1->SetColor("blue"); +$sp1->SetWeight(1); +$sp1->SetLegend("Non-causal signal"); + +$graph->Add($sp1); + +// Create the envelope plot +$ep1 = new Plot\LinePlot($datayenv, $datax); +$ep1->SetStyle("dotted"); +$ep1->SetLegend("Positive envelope"); + +$graph->Add($ep1); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_scatter/loglogex1.php b/vendor/amenadiel/jpgraph/Examples/examples_scatter/loglogex1.php new file mode 100644 index 0000000000..adfb99c7fe --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_scatter/loglogex1.php @@ -0,0 +1,56 @@ +SetScale("loglog"); +$graph->SetY2Scale("lin"); +$graph->y2axis->SetColor("blue", "blue"); + +$graph->img->SetMargin(50, 70, 40, 50); +$graph->title->Set("Geoelektrik"); +$graph->xaxis->title->Set("Auslage ab/2 [m]"); +$graph->yaxis->title->Set("rho_s [Ohm m]"); +$graph->y2axis->title->Set("mn/2 [m]"); +$graph->y2axis->title->SetColor("blue"); +$graph->y2axis->SetTitleMargin(35); +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xgrid->Show(true, true); +$graph->ygrid->Show(true, true); + +// Create the linear plot + +$lineplot = new Plot\LinePlot($rhos, $ab2); +$lineplot->SetWeight(1); +$lineplot->mark->SetType(MARK_FILLEDCIRCLE); +$lineplot->mark->SetWidth(2); + +// Create scatter plot + +$scplot = new ScatterPlot($mn2, $ab2); +$scplot->mark->SetType(MARK_FILLEDCIRCLE); +$scplot->mark->SetColor("blue"); +$scplot->mark->SetWidth(2); + +// Add plots to the graph + +$graph->AddY2($scplot); +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_scatter/markflagex1.php b/vendor/amenadiel/jpgraph/Examples/examples_scatter/markflagex1.php new file mode 100644 index 0000000000..ece920cfce --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_scatter/markflagex1.php @@ -0,0 +1,70 @@ +SetMarginColor('white'); +$graph->SetScale("textlin"); +$graph->SetFrame(false); +$graph->SetMargin(30, 5, 25, 20); + +// Enable X-grid as well +$graph->xgrid->Show(); + +// Use months as X-labels +$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth()); + +//------------------------ +// Create the plots +//------------------------ +$p1 = new Plot\LinePlot($datay[0]); +$p1->SetColor("navy"); + +// Use a flag +$p1->mark->SetType(MARK_FLAG1, 197); + +// Displayes value on top of marker image +$p1->value->SetFormat('%d mil'); +$p1->value->Show(); +$p1->value->SetColor('darkred'); +$p1->value->SetFont(FF_ARIAL, FS_BOLD, 10); +// Increase the margin so that the value is printed avove tje +// img marker +$p1->value->SetMargin(14); + +// Incent the X-scale so the first and last point doesn't +// fall on the edges +$p1->SetCenter(); + +$graph->Add($p1); + +//------------ +// 2:nd plot +//------------ +$p2 = new Plot\LinePlot($datay[1]); +$p2->SetColor("navy"); + +// Use a flag +$p2->mark->SetType(MARK_FLAG1, 'united states'); + +// Displayes value on top of marker image +$p2->value->SetFormat('%d mil'); +$p2->value->Show(); +$p2->value->SetColor('darkred'); +$p2->value->SetFont(FF_ARIAL, FS_BOLD, 10); +// Increase the margin so that the value is printed avove tje +// img marker +$p2->value->SetMargin(14); + +// Incent the X-scale so the first and last point doesn't +// fall on the edges +$p2->SetCenter(); +$graph->Add($p2); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_scatter/pushpinex1.php b/vendor/amenadiel/jpgraph/Examples/examples_scatter/pushpinex1.php new file mode 100644 index 0000000000..bee0132816 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_scatter/pushpinex1.php @@ -0,0 +1,61 @@ +img->SetMargin(1, 1, 1, 1); +$graph->SetScale('linlin', 0, 100, 0, 100); + +// We don't want any axis to be shown +$graph->xaxis->Hide(); +$graph->yaxis->Hide(); + +// Use a worldmap as the background and let it fill the plot area +$graph->SetBackgroundImage(WORLDMAP, BGIMG_FILLPLOT); + +// Setup a nice title with a striped bevel background +$graph->title->Set("Pushpin graph"); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 16); +$graph->title->SetColor('white'); +$graph->SetTitleBackground('darkgreen', TITLEBKG_STYLE1, TITLEBKG_FRAME_BEVEL); +$graph->SetTitleBackgroundFillStyle(TITLEBKG_FILLSTYLE_HSTRIPED, 'blue', 'darkgreen'); + +// Finally create the scatterplot +$sp = new ScatterPlot($datay, $datax); + +// We want the markers to be an image +$sp->mark->SetType(MARK_IMG_PUSHPIN, 'blue', 0.6); + +// Install the Y-X callback for the markers +$sp->mark->SetCallbackYX('markCallback'); + +// ... and add it to the graph +$graph->Add($sp); + +// .. and output to browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_scatter/pushpinex2.php b/vendor/amenadiel/jpgraph/Examples/examples_scatter/pushpinex2.php new file mode 100644 index 0000000000..86b0339f04 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_scatter/pushpinex2.php @@ -0,0 +1,62 @@ +img->SetMargin(1, 1, 1, 1); +$graph->SetScale('linlin', 0, 100, 0, 100); + +// We don't want any axis to be shown +$graph->xaxis->Hide(); +$graph->yaxis->Hide(); + +// Use a worldmap as the background and let it fill the plot area +$graph->SetBackgroundImage(WORLDMAP, BGIMG_FILLPLOT); + +// Setup a nice title with a striped bevel background +$graph->title->Set("Pushpin graph"); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 16); +$graph->title->SetColor('white'); +$graph->SetTitleBackground('darkgreen', TITLEBKG_STYLE1, TITLEBKG_FRAME_BEVEL); +$graph->SetTitleBackgroundFillStyle(TITLEBKG_FILLSTYLE_HSTRIPED, 'blue', 'darkgreen'); + +// Finally create the lineplot +$lp = new Plot\LinePlot($datay, $datax); +$lp->SetColor('lightgray'); + +// We want the markers to be an image +$lp->mark->SetType(MARK_IMG_PUSHPIN, 'blue', 0.6); + +// Install the Y-X callback for the markers +$lp->mark->SetCallbackYX('markCallback'); + +// ... and add it to the graph +$graph->Add($lp); + +// .. and output to browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_scatter/scatter_csimex1.php b/vendor/amenadiel/jpgraph/Examples/examples_scatter/scatter_csimex1.php new file mode 100644 index 0000000000..66f259420e --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_scatter/scatter_csimex1.php @@ -0,0 +1,42 @@ +SetShadow(); +$graph->SetScale("linlin"); + +//$graph->img->SetMargin(40,40,40,40); + +$graph->title->Set("Scatter plot with Image Map"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Client side image map targets +$targ = array("pie_csimex1.php#1", "pie_csimex1.php#2", "pie_csimex1.php#3", + "pie_csimex1.php#4", "pie_csimex1.php#5", "pie_csimex1.php#6", + "pie_csimex1.php#7", "pie_csimex1.php#8", "pie_csimex1.php#9"); + +// Strings to put as "alts" (and "title" value) +$alts = array("val=%d", "val=%d", "val=%d", "val=%d", "val=%d", "val=%d", "val=%d", "val=%d", "val=%d"); + +// Create a new scatter plot +$sp1 = new ScatterPlot($datay, $datax); + +// Use diamonds as markerss +$sp1->mark->SetType(MARK_DIAMOND); +$sp1->mark->SetWidth(10); + +// Set the scatter plot image map targets +$sp1->SetCSIMTargets($targ, $alts); + +// Add the plot +$graph->Add($sp1); + +// Send back the HTML page which will call this script again +// to retrieve the image. +$graph->StrokeCSIM(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_scatter/scatterex1.php b/vendor/amenadiel/jpgraph/Examples/examples_scatter/scatterex1.php new file mode 100644 index 0000000000..e493f566e3 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_scatter/scatterex1.php @@ -0,0 +1,20 @@ +SetScale("linlin"); + +$graph->img->SetMargin(40, 40, 40, 40); +$graph->SetShadow(); + +$graph->title->Set("A simple scatter plot"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +$sp1 = new ScatterPlot($datay, $datax); + +$graph->Add($sp1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_scatter/scatterex2.php b/vendor/amenadiel/jpgraph/Examples/examples_scatter/scatterex2.php new file mode 100644 index 0000000000..2c279d7859 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_scatter/scatterex2.php @@ -0,0 +1,23 @@ +SetScale("linlin"); + +$graph->img->SetMargin(40, 40, 40, 40); +$graph->SetShadow(); + +$graph->title->Set("A simple scatter plot"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +$sp1 = new ScatterPlot($datay, $datax); +$sp1->mark->SetType(MARK_FILLEDCIRCLE); +$sp1->mark->SetFillColor("red"); +$sp1->mark->SetWidth(8); + +$graph->Add($sp1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_scatter/scatterlinkex1.php b/vendor/amenadiel/jpgraph/Examples/examples_scatter/scatterlinkex1.php new file mode 100644 index 0000000000..c3c8822adb --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_scatter/scatterlinkex1.php @@ -0,0 +1,22 @@ +img->SetMargin(40, 40, 40, 40); +$graph->img->SetAntiAliasing(); +$graph->SetScale("linlin"); +$graph->SetShadow(); +$graph->title->Set("Linked Scatter plot ex1"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +$sp1 = new ScatterPlot($datay, $datax); +$sp1->SetLinkPoints(true, "red", 2); +$sp1->mark->SetType(MARK_FILLEDCIRCLE); +$sp1->mark->SetFillColor("navy"); +$sp1->mark->SetWidth(3); + +$graph->Add($sp1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_scatter/scatterlinkex2.php b/vendor/amenadiel/jpgraph/Examples/examples_scatter/scatterlinkex2.php new file mode 100644 index 0000000000..64b629a1d8 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_scatter/scatterlinkex2.php @@ -0,0 +1,37 @@ +SetScale("linlin"); + +$graph->img->SetMargin(40, 40, 40, 40); + +$graph->SetShadow(); +$graph->title->Set("Linked scatter plot"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// 10% top and bottom grace +$graph->yscale->SetGrace(5, 5); +$graph->xscale->SetGrace(1, 1); + +$sp1 = new ScatterPlot($datay, $datax); +$sp1->mark->SetType(MARK_FILLEDCIRCLE); +$sp1->mark->SetFillColor("red"); +$sp1->SetColor("blue"); + +//$sp1->SetWeight(3); +$sp1->mark->SetWidth(4); +$sp1->SetLinkPoints(); + +$graph->Add($sp1); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_scatter/scatterlinkex3.php b/vendor/amenadiel/jpgraph/Examples/examples_scatter/scatterlinkex3.php new file mode 100644 index 0000000000..5ebba9a8a9 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_scatter/scatterlinkex3.php @@ -0,0 +1,39 @@ +SetScale('linlin'); +$graph->SetShadow(); +$graph->SetAxisStyle(AXSTYLE_BOXOUT); + +$graph->img->SetMargin(50, 50, 60, 40); + +$graph->title->Set('Linked scatter plot'); +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->subtitle->Set('(BOXOUT Axis style)'); +$graph->subtitle->SetFont(FF_FONT1, FS_NORMAL); + +// 10% top and bottom grace +$graph->yscale->SetGrace(5, 5); +$graph->xscale->SetGrace(1, 1); + +$sp1 = new ScatterPlot($datay, $datax); +$sp1->mark->SetType(MARK_FILLEDCIRCLE); +$sp1->mark->SetFillColor('red'); +$sp1->SetColor('blue'); + +$sp1->mark->SetWidth(4); +$sp1->link->Show(); +$sp1->link->SetStyle('dotted'); + +$graph->Add($sp1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_scatter/scatterlinkex4.php b/vendor/amenadiel/jpgraph/Examples/examples_scatter/scatterlinkex4.php new file mode 100644 index 0000000000..b5c1662682 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_scatter/scatterlinkex4.php @@ -0,0 +1,40 @@ +SetScale('linlin'); +$graph->SetShadow(); +$graph->SetAxisStyle(AXSTYLE_BOXIN); + +$graph->img->SetMargin(50, 50, 60, 40); + +$graph->title->Set('Linked scatter plot'); +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->subtitle->Set('(BOXIN Axis style)'); +$graph->subtitle->SetFont(FF_FONT1, FS_NORMAL); + +// 10% top and bottom grace +$graph->yscale->SetGrace(5, 5); +$graph->xscale->SetGrace(1, 1); + +$sp1 = new ScatterPlot($datay, $datax); +$sp1->mark->SetType(MARK_FILLEDCIRCLE); +$sp1->mark->SetFillColor('red'); +$sp1->SetColor('blue'); + +$sp1->mark->SetWidth(4); +$sp1->link->Show(); +$sp1->link->SetWeight(2); +$sp1->link->SetColor('red@0.7'); + +$graph->Add($sp1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_scatter/scatterrotex1.php b/vendor/amenadiel/jpgraph/Examples/examples_scatter/scatterrotex1.php new file mode 100644 index 0000000000..9812cab859 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_scatter/scatterrotex1.php @@ -0,0 +1,33 @@ +SetScale("linlin"); + +$graph->Set90AndMargin(40, 40, 40, 40); +$graph->SetShadow(); + +$graph->title->Set("A 90 degrees rotated scatter plot"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +// Adjust the label align for X-axis so they look good rotated +$graph->xaxis->SetLabelAlign('right', 'center', 'right'); + +// Adjust the label align for Y-axis so they look good rotated +$graph->yaxis->SetLabelAlign('center', 'bottom'); + +$graph->xaxis->SetTitle('X-Axis title', 'low'); +$graph->xaxis->title->SetAngle(90); +$graph->xaxis->title->SetMargin(15); + +$sp1 = new ScatterPlot($datay, $datax); +$sp1->mark->SetType(MARK_FILLEDCIRCLE); +$sp1->mark->SetFillColor("red"); +$sp1->mark->SetWidth(5); + +$graph->Add($sp1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_staticband/smallstaticbandsex1.php b/vendor/amenadiel/jpgraph/Examples/examples_staticband/smallstaticbandsex1.php new file mode 100644 index 0000000000..5e491b5fa6 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_staticband/smallstaticbandsex1.php @@ -0,0 +1,39 @@ +SetScale("textlin"); +$graph->SetMargin(25, 10, 20, 20); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor("lightblue"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +$graph->ygrid->Show(false); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add band +$band = new Plot\PlotBand(HORIZONTAL, BAND_RDIAG, 15, 35, 'khaki4'); +$band->ShowFrame(false); +$graph->Add($band); + +// Set title +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->title->SetColor('darkred'); +$graph->title->Set('BAND_RDIAG'); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_staticband/smallstaticbandsex10.php b/vendor/amenadiel/jpgraph/Examples/examples_staticband/smallstaticbandsex10.php new file mode 100644 index 0000000000..a17f4a177d --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_staticband/smallstaticbandsex10.php @@ -0,0 +1,39 @@ +SetScale("textlin"); +$graph->SetMargin(25, 10, 20, 20); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor("lightblue"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +$graph->ygrid->Show(false); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add band +$band = new Plot\PlotBand(HORIZONTAL, BAND_DIAGCROSS, 15, 35, 'khaki4'); +$band->ShowFrame(false); +$graph->Add($band); + +// Set title +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->title->SetColor('darkred'); +$graph->title->Set('BAND_DIAGCROSS'); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_staticband/smallstaticbandsex11.php b/vendor/amenadiel/jpgraph/Examples/examples_staticband/smallstaticbandsex11.php new file mode 100644 index 0000000000..a17f4a177d --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_staticband/smallstaticbandsex11.php @@ -0,0 +1,39 @@ +SetScale("textlin"); +$graph->SetMargin(25, 10, 20, 20); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor("lightblue"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +$graph->ygrid->Show(false); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add band +$band = new Plot\PlotBand(HORIZONTAL, BAND_DIAGCROSS, 15, 35, 'khaki4'); +$band->ShowFrame(false); +$graph->Add($band); + +// Set title +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->title->SetColor('darkred'); +$graph->title->Set('BAND_DIAGCROSS'); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_staticband/smallstaticbandsex2.php b/vendor/amenadiel/jpgraph/Examples/examples_staticband/smallstaticbandsex2.php new file mode 100644 index 0000000000..7161d02f29 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_staticband/smallstaticbandsex2.php @@ -0,0 +1,39 @@ +SetScale("textlin"); +$graph->SetMargin(25, 10, 20, 20); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor("lightblue"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +$graph->ygrid->Show(false); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add band +$band = new Plot\PlotBand(HORIZONTAL, BAND_LDIAG, 15, 35, 'khaki4'); +$band->ShowFrame(false); +$graph->Add($band); + +// Set title +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->title->SetColor('darkred'); +$graph->title->Set('BAND_LDIAG'); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_staticband/smallstaticbandsex3.php b/vendor/amenadiel/jpgraph/Examples/examples_staticband/smallstaticbandsex3.php new file mode 100644 index 0000000000..2924d6b120 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_staticband/smallstaticbandsex3.php @@ -0,0 +1,39 @@ +SetScale("textlin"); +$graph->SetMargin(25, 10, 20, 20); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor("lightblue"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +$graph->ygrid->Show(false); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add band +$band = new Plot\PlotBand(HORIZONTAL, BAND_SOLID, 15, 35, 'khaki4'); +$band->ShowFrame(false); +$graph->Add($band); + +// Set title +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->title->SetColor('darkred'); +$graph->title->Set('BAND_SOLID'); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_staticband/smallstaticbandsex4.php b/vendor/amenadiel/jpgraph/Examples/examples_staticband/smallstaticbandsex4.php new file mode 100644 index 0000000000..eac5c017ce --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_staticband/smallstaticbandsex4.php @@ -0,0 +1,40 @@ +SetScale("textlin"); +$graph->SetMargin(25, 10, 20, 20); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor("lightblue"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +$graph->ygrid->Show(false); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add band +$band = new Plot\PlotBand(HORIZONTAL, BAND_3DPLANE, 15, 35, 'khaki4'); +$band->SetDensity(80); +$band->ShowFrame(true); +$graph->Add($band); + +// Set title +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->title->SetColor('darkred'); +$graph->title->Set('BAND_3DPLANE, Density=60'); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_staticband/smallstaticbandsex5.php b/vendor/amenadiel/jpgraph/Examples/examples_staticband/smallstaticbandsex5.php new file mode 100644 index 0000000000..1baa92bc0d --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_staticband/smallstaticbandsex5.php @@ -0,0 +1,40 @@ +SetScale("textlin"); +$graph->SetMargin(25, 10, 20, 20); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor("lightblue"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +$graph->ygrid->Show(false); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add band +$band = new Plot\PlotBand(HORIZONTAL, BAND_HVCROSS, 15, 35, 'khaki4'); +$band->ShowFrame(true); +$band->SetOrder(DEPTH_FRONT); +$graph->Add($band); + +// Set title +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->title->SetColor('darkred'); +$graph->title->Set('BAND_HVCROSS, In front'); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_staticband/smallstaticbandsex6.php b/vendor/amenadiel/jpgraph/Examples/examples_staticband/smallstaticbandsex6.php new file mode 100644 index 0000000000..91d9b5ea06 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_staticband/smallstaticbandsex6.php @@ -0,0 +1,39 @@ +SetScale("textlin"); +$graph->SetMargin(25, 10, 20, 20); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor("lightblue"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +$graph->ygrid->Show(false); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add band +$band = new Plot\PlotBand(HORIZONTAL, BAND_VLINE, 15, 35, 'khaki4'); +$band->ShowFrame(false); +$graph->Add($band); + +// Set title +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->title->SetColor('darkred'); +$graph->title->Set('BAND_VLINE'); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_staticband/smallstaticbandsex7.php b/vendor/amenadiel/jpgraph/Examples/examples_staticband/smallstaticbandsex7.php new file mode 100644 index 0000000000..692e5832a8 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_staticband/smallstaticbandsex7.php @@ -0,0 +1,39 @@ +SetScale("textlin"); +$graph->SetMargin(25, 10, 20, 20); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor("lightblue"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +$graph->ygrid->Show(false); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add band +$band = new Plot\PlotBand(HORIZONTAL, BAND_HLINE, 15, 35, 'khaki4'); +$band->ShowFrame(false); +$graph->Add($band); + +// Set title +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->title->SetColor('darkred'); +$graph->title->Set('BAND_HLINE'); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_staticband/smallstaticbandsex8.php b/vendor/amenadiel/jpgraph/Examples/examples_staticband/smallstaticbandsex8.php new file mode 100644 index 0000000000..5712acb2de --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_staticband/smallstaticbandsex8.php @@ -0,0 +1,39 @@ +SetScale("textlin"); +$graph->SetMargin(25, 10, 20, 20); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor("lightblue"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +$graph->ygrid->Show(false); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add band +$band = new Plot\PlotBand(HORIZONTAL, BAND_3DPLANE, 15, 35, 'khaki4'); +$band->ShowFrame(false); +$graph->Add($band); + +// Set title +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->title->SetColor('darkred'); +$graph->title->Set('BAND_3DPLANE'); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_staticband/smallstaticbandsex9.php b/vendor/amenadiel/jpgraph/Examples/examples_staticband/smallstaticbandsex9.php new file mode 100644 index 0000000000..89cedf5394 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_staticband/smallstaticbandsex9.php @@ -0,0 +1,39 @@ +SetScale("textlin"); +$graph->SetMargin(25, 10, 20, 20); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor("lightblue"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +$graph->ygrid->Show(false); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add band +$band = new Plot\PlotBand(HORIZONTAL, BAND_HVCROSS, 15, 35, 'khaki4'); +$band->ShowFrame(false); +$graph->Add($band); + +// Set title +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->title->SetColor('darkred'); +$graph->title->Set('BAND_HVCROSS'); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_staticband/staticbandbarex1.php b/vendor/amenadiel/jpgraph/Examples/examples_staticband/staticbandbarex1.php new file mode 100644 index 0000000000..0055dc468a --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_staticband/staticbandbarex1.php @@ -0,0 +1,51 @@ +img->SetMargin(60, 30, 50, 40); +$graph->SetScale("textlin"); +$graph->SetShadow(); + +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 15); +$graph->title->Set("Cash flow "); +$graph->subtitle->Set("(Department X)"); + +// Show both X and Y grid +$graph->xgrid->Show(true, false); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10, 10); + +// Turn the tick mark out from the plot area +$graph->xaxis->SetTickSide(SIDE_DOWN); +$graph->yaxis->SetTickSide(SIDE_LEFT); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor("orange"); + +// Show the actual value for each bar on top/bottom +$bplot->value->Show(true); +$bplot->value->SetFormat("%02d kr"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add band +$graph->Add(new Plot\PlotBand(HORIZONTAL, BAND_HLINE, 0, 10)); + +//$graph->title->Set("Test of bar gradient fill"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->yaxis->title->SetFont(FF_ARIAL, FS_BOLD, 11); +$graph->xaxis->title->SetFont(FF_ARIAL, FS_BOLD, 11); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_staticband/staticbandbarex2.php b/vendor/amenadiel/jpgraph/Examples/examples_staticband/staticbandbarex2.php new file mode 100644 index 0000000000..bd6e8a9101 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_staticband/staticbandbarex2.php @@ -0,0 +1,51 @@ +img->SetMargin(60, 30, 50, 40); +$graph->SetScale("textlin"); +$graph->SetShadow(); + +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 15); +$graph->title->Set("Cash flow "); +$graph->subtitle->Set("(Department X)"); + +// Show both X and Y grid +$graph->xgrid->Show(true, false); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10, 10); + +// Turn the tick mark out from the plot area +$graph->xaxis->SetTickSide(SIDE_DOWN); +$graph->yaxis->SetTickSide(SIDE_LEFT); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor("orange"); + +// Show the actual value for each bar on top/bottom +$bplot->value->Show(true); +$bplot->value->SetFormat("%02d kr"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add band +$graph->Add(new Plot\PlotBand(HORIZONTAL, BAND_RDIAG, 0, "max", "red", 2)); + +//$graph->title->Set("Test of bar gradient fill"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->yaxis->title->SetFont(FF_ARIAL, FS_BOLD, 11); +$graph->xaxis->title->SetFont(FF_ARIAL, FS_BOLD, 11); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_staticband/staticbandbarex3.php b/vendor/amenadiel/jpgraph/Examples/examples_staticband/staticbandbarex3.php new file mode 100644 index 0000000000..924a94b5f3 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_staticband/staticbandbarex3.php @@ -0,0 +1,57 @@ +img->SetMargin(60, 30, 50, 40); +$graph->SetScale("textlin"); +$graph->SetShadow(); + +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 15); +$graph->title->Set("Cash flow "); +$graph->subtitle->Set("(Department X)"); + +// Show both X and Y grid +$graph->xgrid->Show(true, false); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10, 10); + +// Turn the tick mark out from the plot area +$graph->xaxis->SetTickSide(SIDE_DOWN); +$graph->yaxis->SetTickSide(SIDE_LEFT); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor("orange"); + +// Show the actual value for each bar on top/bottom +$bplot->value->Show(true); +$bplot->value->SetFormat("%02d kr"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add upper and lower band and use no frames +$uband = new Plot\PlotBand(HORIZONTAL, BAND_RDIAG, 0, "max", "green"); +$uband->ShowFrame(false); +$lband = new Plot\PlotBand(HORIZONTAL, BAND_LDIAG, "min", 0, "red"); +$lband->ShowFrame(false); + +$graph->Add($uband); +$graph->Add($lband); + +//$graph->title->Set("Test of bar gradient fill"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->yaxis->title->SetFont(FF_ARIAL, FS_BOLD, 11); +$graph->xaxis->title->SetFont(FF_ARIAL, FS_BOLD, 11); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_staticband/staticbandbarex4.php b/vendor/amenadiel/jpgraph/Examples/examples_staticband/staticbandbarex4.php new file mode 100644 index 0000000000..c73a1c5ab8 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_staticband/staticbandbarex4.php @@ -0,0 +1,59 @@ +img->SetMargin(60, 30, 50, 40); +$graph->SetScale("textlin"); +$graph->SetShadow(); + +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 15); +$graph->title->Set("Cash flow "); +$graph->subtitle->Set("(Department X)"); + +// Show both X and Y grid +$graph->xgrid->Show(true, false); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10, 10); + +// Turn the tick mark out from the plot area +$graph->xaxis->SetTickSide(SIDE_DOWN); +$graph->yaxis->SetTickSide(SIDE_LEFT); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor("orange"); + +// Show the actual value for each bar on top/bottom +$bplot->value->Show(true); +$bplot->value->SetFormat("%02d kr"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add upper and lower band and use no frames +$uband = new Plot\PlotBand(HORIZONTAL, BAND_RDIAG, 0, "max", "green"); +$uband->ShowFrame(false); +$uband->SetDensity(50); // 50% line density +$lband = new Plot\PlotBand(HORIZONTAL, BAND_LDIAG, "min", 0, "red"); +$lband->ShowFrame(false); +$lband->SetDensity(20); // 20% line density + +$graph->Add($uband); +$graph->Add($lband); + +//$graph->title->Set("Test of bar gradient fill"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->yaxis->title->SetFont(FF_ARIAL, FS_BOLD, 11); +$graph->xaxis->title->SetFont(FF_ARIAL, FS_BOLD, 11); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_staticband/staticbandbarex5.php b/vendor/amenadiel/jpgraph/Examples/examples_staticband/staticbandbarex5.php new file mode 100644 index 0000000000..1fe4da7037 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_staticband/staticbandbarex5.php @@ -0,0 +1,62 @@ +img->SetMargin(60, 30, 50, 40); +$graph->SetScale("textlin"); +$graph->SetShadow(); + +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 15); +$graph->title->Set("Cash flow "); +$graph->subtitle->Set("(Department X)"); + +// Show both X and Y grid +$graph->xgrid->Show(true, false); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10, 10); + +// Turn the tick mark out from the plot area +$graph->xaxis->SetTickSide(SIDE_DOWN); +$graph->yaxis->SetTickSide(SIDE_LEFT); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor("orange"); + +// Show the actual value for each bar on top/bottom +$bplot->value->Show(true); +$bplot->value->SetFormat("%02d kr"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add upper and lower band and use no frames +$band[0] = new Plot\PlotBand(HORIZONTAL, BAND_RDIAG, 10, 20, "green"); +$band[0]->ShowFrame(false); +$band[0]->SetDensity(30); +$band[1] = new Plot\PlotBand(HORIZONTAL, BAND_LDIAG, -20, -10, "red"); +$band[1]->ShowFrame(false); +$band[1]->SetDensity(40); +$band[2] = new Plot\PlotBand(HORIZONTAL, BAND_LDIAG, "min", -20, "red"); +$band[2]->ShowFrame(false); +$band[2]->SetDensity(80); + +// We can also add band in an array +$graph->Add($band); + +//$graph->title->Set("Test of bar gradient fill"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->yaxis->title->SetFont(FF_ARIAL, FS_BOLD, 11); +$graph->xaxis->title->SetFont(FF_ARIAL, FS_BOLD, 11); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_staticband/staticbandbarex6.php b/vendor/amenadiel/jpgraph/Examples/examples_staticband/staticbandbarex6.php new file mode 100644 index 0000000000..cc232fd27d --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_staticband/staticbandbarex6.php @@ -0,0 +1,72 @@ +img->SetMargin(60, 30, 50, 40); +$graph->SetScale("textlin"); +$graph->SetShadow(); + +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 15); +$graph->title->Set("Cash flow "); +$graph->subtitle->Set("Shows some possible patterns for bands"); + +// Show both X and Y grid +$graph->xgrid->Show(true, false); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10, 10); + +// Turn the tick mark out from the plot area +$graph->xaxis->SetTickSide(SIDE_DOWN); +$graph->yaxis->SetTickSide(SIDE_LEFT); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor("orange"); +$bplot->SetShadow(); + +// Show the actual value for each bar on top/bottom +$bplot->value->Show(true); +$bplot->value->SetFormat("%02d kr"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add upper and lower band and use no frames +$band[0] = new Plot\PlotBand(HORIZONTAL, BAND_RDIAG, 10, 20, "green"); +$band[0]->ShowFrame(false); +$band[1] = new Plot\PlotBand(HORIZONTAL, BAND_LDIAG, -20, -10, "red"); +$band[1]->ShowFrame(false); +$band[1]->SetDensity(20); +$band[2] = new Plot\PlotBand(HORIZONTAL, BAND_DIAGCROSS, "min", -20, "red"); +$band[2]->ShowFrame(false); +$band[2]->SetDensity(40); +$band[3] = new Plot\PlotBand(VERTICAL, BAND_HLINE, 0, 1, "darkgray"); +$band[3]->ShowFrame(false); +$band[3]->SetOrder(DEPTH_FRONT); +$band[4] = new Plot\PlotBand(VERTICAL, BAND_HVCROSS, 5, "max", "darkgray"); +$band[4]->ShowFrame(false); +$band[4]->SetOrder(DEPTH_FRONT); +$band[5] = new Plot\PlotBand(HORIZONTAL, BAND_SOLID, 20, "max", "lightgreen"); +$band[6] = new Plot\PlotBand(HORIZONTAL, BAND_3DPLANE, -10, 0, "blue"); +$band[6]->SetDensity(70); +$graph->Add($band); + +$graph->AddLine(new PlotLine(HORIZONTAL, 0, "black", 2)); + +//$graph->title->Set("Test of bar gradient fill"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->yaxis->title->SetFont(FF_ARIAL, FS_BOLD, 11); +$graph->xaxis->title->SetFont(FF_ARIAL, FS_BOLD, 11); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_staticband/staticbandbarex7.php b/vendor/amenadiel/jpgraph/Examples/examples_staticband/staticbandbarex7.php new file mode 100644 index 0000000000..0d12dcd93a --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_staticband/staticbandbarex7.php @@ -0,0 +1,61 @@ +img->SetMargin(60, 30, 50, 40); +$graph->SetScale("textlin"); +$graph->SetShadow(); + +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 15); +$graph->title->Set("Cash flow "); +$graph->subtitle->Set("Use of static line, 3D and solid band"); + +// Turn off Y-grid (it's on by default) +$graph->ygrid->Show(false); + +// Add 10% grace ("space") at top of Y-scale. +$graph->yscale->SetGrace(10); +$graph->yscale->SetAutoMin(-20); + +// Turn the tick mark out from the plot area +$graph->xaxis->SetTickSide(SIDE_DOWN); +$graph->yaxis->SetTickSide(SIDE_LEFT); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); +$bplot->SetFillColor("orange"); +$bplot->SetShadow("darkblue"); + +// Show the actual value for each bar on top/bottom +$bplot->value->Show(true); +$bplot->value->SetFormat("%02d kr"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add upper and lower band and use no frames +$band[0] = new Plot\PlotBand(HORIZONTAL, BAND_3DPLANE, "min", 0, "blue"); +$band[0]->ShowFrame(false); +$band[0]->SetDensity(20); +$band[1] = new Plot\PlotBand(HORIZONTAL, BAND_SOLID, 0, "max", "steelblue"); +$band[1]->ShowFrame(false); +$graph->Add($band); + +$graph->Add(new PlotLine(HORIZONTAL, 0, "black", 2)); + +//$graph->title->Set("Test of bar gradient fill"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->yaxis->title->SetFont(FF_ARIAL, FS_BOLD, 11); +$graph->xaxis->title->SetFont(FF_ARIAL, FS_BOLD, 11); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_stock/boxstockcsimex1.php b/vendor/amenadiel/jpgraph/Examples/examples_stock/boxstockcsimex1.php new file mode 100644 index 0000000000..8786b0821a --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_stock/boxstockcsimex1.php @@ -0,0 +1,35 @@ +SetScale("textlin"); +$graph->SetMarginColor('lightblue'); +$graph->title->Set('Box Stock chart example'); + +// Create a new stock plot +$p1 = new BoxPlot($datay); + +// Setup URL target for image map +$p1->SetCSIMTargets(array('#1', '#2', '#3', '#4', '#5')); + +// Width of the bars (in pixels) +$p1->SetWidth(9); + +//$p1->SetCenter(); +// Uncomment the following line to hide the horizontal end lines +//$p1->HideEndLines(); + +// Add the plot to the graph and send it back to the browser +$graph->Add($p1); +$graph->StrokeCSIM(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_stock/boxstockex1.php b/vendor/amenadiel/jpgraph/Examples/examples_stock/boxstockex1.php new file mode 100644 index 0000000000..5ebd010b33 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_stock/boxstockex1.php @@ -0,0 +1,31 @@ +SetScale('textlin'); +$graph->SetMarginColor('lightblue'); +$graph->title->Set('Box Stock chart example'); + +// Create a new stock plot +$p1 = new BoxPlot($datay); + +// Width of the bars (in pixels) +$p1->SetWidth(9); + +// Uncomment the following line to hide the horizontal end lines +//$p1->HideEndLines(); + +// Add the plot to the graph and send it back to the browser +$graph->Add($p1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_stock/boxstockex2.php b/vendor/amenadiel/jpgraph/Examples/examples_stock/boxstockex2.php new file mode 100644 index 0000000000..d904858936 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_stock/boxstockex2.php @@ -0,0 +1,36 @@ +SetScale("textlin"); +$graph->SetMarginColor('lightblue'); +$graph->title->Set('Box Stock chart example'); +$graph->subtitle->Set('(Indented X-axis)'); + +// Create a new stock plot +$p1 = new BoxPlot($datay); + +// Width of the bars (in pixels) +$p1->SetWidth(9); + +// Indent bars so they dont start and end at the edge of the +// plot area +$p1->SetCenter(); + +// Uncomment the following line to hide the horizontal end lines +//$p1->HideEndLines(); + +// Add the plot to the graph and send it back to the browser +$graph->Add($p1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_stock/stockex1.php b/vendor/amenadiel/jpgraph/Examples/examples_stock/stockex1.php new file mode 100644 index 0000000000..789ed3302e --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_stock/stockex1.php @@ -0,0 +1,31 @@ +SetScale("textlin"); +$graph->SetMarginColor('lightblue'); +$graph->title->Set('Stockchart example'); + +// Create a new stock plot +$p1 = new StockPlot($datay); + +// Width of the bars (in pixels) +$p1->SetWidth(9); + +// Uncomment the following line to hide the horizontal end lines +//$p1->HideEndLines(); + +// Add the plot to the graph and send it back to the browser +$graph->Add($p1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_stock/stockex2.php b/vendor/amenadiel/jpgraph/Examples/examples_stock/stockex2.php new file mode 100644 index 0000000000..1d9902086a --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_stock/stockex2.php @@ -0,0 +1,37 @@ +SetScale("textlin"); +$graph->SetMarginColor('white'); +$graph->SetFrame(false); +$graph->ygrid->SetFill(true, '#EFEFEF@0.5', '#BBCCFF@0.5'); +$graph->SetBox(); + +$graph->tabtitle->Set(' Week 34 '); +$graph->tabtitle->SetFont(FF_ARIAL, FS_NORMAL, 12); + +// Get week days in curent locale +$days = $gDateLocale->GetShortDay(); +array_shift($days); // Start on monday +$graph->xaxis->SetTickLabels($days); + +// Create stock plot +$p1 = new StockPlot($datay); + +// Indent plot so first and last bar isn't on the edges +$p1->SetCenter(); + +// Add and stroke +$graph->Add($p1); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_sunspot/sunspotsex1.php b/vendor/amenadiel/jpgraph/Examples/examples_sunspot/sunspotsex1.php new file mode 100644 index 0000000000..1d7e0cf19f --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_sunspot/sunspotsex1.php @@ -0,0 +1,51 @@ + $datarow) { + $split = preg_split('/[\s]+/', $datarow); + $aYears[] = substr(trim($split[0]), 0, 4); + $aSunspots[] = trim($split[1]); + } +} + +$year = array(); +$ydata = array(); +readsunspotdata('yearssn.txt', $year, $ydata); + +// Width and height of the graph +$width = 600; +$height = 200; + +// Create a graph instance +$graph = new Graph\Graph($width, $height); + +// Specify what scale we want to use, +// int = integer scale for the X-axis +// int = integer scale for the Y-axis +$graph->SetScale('intint'); + +// Setup a title for the graph +$graph->title->Set('Sunspot example'); + +// Setup titles and X-axis labels +$graph->xaxis->title->Set('(year from 1701)'); + +// Setup Y-axis title +$graph->yaxis->title->Set('(# sunspots)'); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); + +// Add the plot to the graph +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_sunspot/sunspotsex2.php b/vendor/amenadiel/jpgraph/Examples/examples_sunspot/sunspotsex2.php new file mode 100644 index 0000000000..0f4bdec78a --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_sunspot/sunspotsex2.php @@ -0,0 +1,52 @@ + $datarow) { + $split = preg_split('/[\s]+/', $datarow); + $aYears[] = substr(trim($split[0]), 0, 4); + $aSunspots[] = trim($split[1]); + } +} + +$year = array(); +$ydata = array(); +readsunspotdata('yearssn.txt', $year, $ydata); + +// Width and height of the graph +$width = 600; +$height = 200; + +// Create a graph instance +$graph = new Graph\Graph($width, $height); + +// Specify what scale we want to use, +// int = integer scale for the X-axis +// int = integer scale for the Y-axis +$graph->SetScale('intint'); + +// Setup a title for the graph +$graph->title->Set('Sunspot example'); + +// Setup titles and X-axis labels +$graph->xaxis->title->Set('(year from 1701)'); + +// Setup Y-axis title +$graph->yaxis->title->Set('(# sunspots)'); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot->SetFillColor('orange@0.5'); + +// Add the plot to the graph +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_sunspot/sunspotsex3.php b/vendor/amenadiel/jpgraph/Examples/examples_sunspot/sunspotsex3.php new file mode 100644 index 0000000000..c9e42dd756 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_sunspot/sunspotsex3.php @@ -0,0 +1,53 @@ + $datarow) { + $split = preg_split('/[\s]+/', $datarow); + $aYears[] = substr(trim($split[0]), 0, 4); + $aSunspots[] = trim($split[1]); + } +} + +$year = array(); +$ydata = array(); +readsunspotdata('yearssn.txt', $year, $ydata); + +// Width and height of the graph +$width = 600; +$height = 200; + +// Create a graph instance +$graph = new Graph\Graph($width, $height); + +// Specify what scale we want to use, +// int = integer scale for the X-axis +// int = integer scale for the Y-axis +$graph->SetScale('intint'); + +// Setup a title for the graph +$graph->title->Set('Sunspot example'); + +// Setup titles and X-axis labels +$graph->xaxis->title->Set('(year from 1701)'); +$graph->xaxis->SetTickLabels($year); + +// Setup Y-axis title +$graph->yaxis->title->Set('(# sunspots)'); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot->SetFillColor('orange@0.5'); + +// Add the plot to the graph +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_sunspot/sunspotsex4.php b/vendor/amenadiel/jpgraph/Examples/examples_sunspot/sunspotsex4.php new file mode 100644 index 0000000000..35d8ed3f78 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_sunspot/sunspotsex4.php @@ -0,0 +1,53 @@ + $datarow) { + $split = preg_split('/[\s]+/', $datarow); + $aYears[] = substr(trim($split[0]), 0, 4); + $aSunspots[] = trim($split[1]); + } +} + +$year = array(); +$ydata = array(); +readsunspotdata('yearssn.txt', $year, $ydata); + +// Width and height of the graph +$width = 600; +$height = 200; + +// Create a graph instance +$graph = new Graph\Graph($width, $height); + +// Specify what scale we want to use, +// int = integer scale for the X-axis +// int = integer scale for the Y-axis +$graph->SetScale('intint', 0, 0, 0, max($year) - min($year) + 1); + +// Setup a title for the graph +$graph->title->Set('Sunspot example'); + +// Setup titles and X-axis labels +$graph->xaxis->title->Set('(year from 1701)'); +$graph->xaxis->SetTickLabels($year); + +// Setup Y-axis title +$graph->yaxis->title->Set('(# sunspots)'); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot->SetFillColor('orange@0.5'); + +// Add the plot to the graph +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_sunspot/sunspotsex5.php b/vendor/amenadiel/jpgraph/Examples/examples_sunspot/sunspotsex5.php new file mode 100644 index 0000000000..95cb5b4a51 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_sunspot/sunspotsex5.php @@ -0,0 +1,58 @@ + $datarow) { + $split = preg_split('/[\s]+/', $datarow); + $aYears[] = substr(trim($split[0]), 0, 4); + $aSunspots[] = trim($split[1]); + } +} + +$year = array(); +$ydata = array(); +readsunspotdata('yearssn.txt', $year, $ydata); + +function year_callback($aLabel) +{ + return 1700 + (int) $aLabel; +} + +// Width and height of the graph +$width = 600; +$height = 200; + +// Create a graph instance +$graph = new Graph\Graph($width, $height); + +// Specify what scale we want to use, +// int = integer scale for the X-axis +// int = integer scale for the Y-axis +$graph->SetScale('intint'); + +// Setup a title for the graph +$graph->title->Set('Sunspot example'); + +// Setup titles and X-axis labels +$graph->xaxis->title->Set('(year from 1701)'); +$graph->xaxis->SetLabelFormatCallback('year_callback'); + +// Setup Y-axis title +$graph->yaxis->title->Set('(# sunspots)'); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot->SetFillColor('orange@0.5'); + +// Add the plot to the graph +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_sunspot/sunspotsex6.php b/vendor/amenadiel/jpgraph/Examples/examples_sunspot/sunspotsex6.php new file mode 100644 index 0000000000..76cacdeb4a --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_sunspot/sunspotsex6.php @@ -0,0 +1,52 @@ + $datarow) { + $split = preg_split('/[\s]+/', $datarow); + $aYears[] = substr(trim($split[0]), 0, 4); + $aSunspots[] = trim($split[1]); + } +} + +$year = array(); +$ydata = array(); +readsunspotdata('yearssn.txt', $year, $ydata); + +// Width and height of the graph +$width = 600; +$height = 200; + +// Create a graph instance +$graph = new Graph\Graph($width, $height); + +// Specify what scale we want to use, +// int = integer scale for the X-axis +// int = integer scale for the Y-axis +$graph->SetScale('intint'); + +// Setup a title for the graph +$graph->title->Set('Sunspot example'); + +// Setup titles and X-axis labels +$graph->xaxis->title->Set('(year from 1701)'); + +// Setup Y-axis title +$graph->yaxis->title->Set('(# sunspots)'); + +// Create the bar plot +$barplot = new Plot\BarPlot($ydata); + +// Add the plot to the graph +$graph->Add($barplot); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_sunspot/sunspotsex7.php b/vendor/amenadiel/jpgraph/Examples/examples_sunspot/sunspotsex7.php new file mode 100644 index 0000000000..3504317d24 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_sunspot/sunspotsex7.php @@ -0,0 +1,56 @@ + $datarow) { + $split = preg_split('/[\s]+/', $datarow); + $aYears[] = substr(trim($split[0]), 0, 4); + $aSunspots[] = trim($split[1]); + } +} + +$year = array(); +$ydata = array(); +readsunspotdata('yearssn.txt', $year, $ydata); + +// Just keep the last 20 values in the arrays +$year = array_slice($year, -20); +$ydata = array_slice($ydata, -20); + +// Width and height of the graph +$width = 600; +$height = 200; + +// Create a graph instance +$graph = new Graph\Graph($width, $height); + +// Specify what scale we want to use, +// text = txt scale for the X-axis +// int = integer scale for the Y-axis +$graph->SetScale('textint'); + +// Setup a title for the graph +$graph->title->Set('Sunspot example'); + +// Setup titles and X-axis labels +$graph->xaxis->title->Set('(year)'); +$graph->xaxis->SetTickLabels($year); + +// Setup Y-axis title +$graph->yaxis->title->Set('(# sunspots)'); + +// Create the bar plot +$barplot = new Plot\BarPlot($ydata); + +// Add the plot to the graph +$graph->Add($barplot); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_tables/table_flagex1.php b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_flagex1.php new file mode 100644 index 0000000000..8729561db0 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_flagex1.php @@ -0,0 +1,70 @@ +Set($data); +$table->SetFont(FF_TIMES,FS_NORMAL,11); + +// Adjust the font for row 0 and 6 +$table->SetColFont(0,FF_ARIAL,FS_BOLD,11); +$table->SetRowFont(6,FF_TIMES,FS_BOLD,12); + +// Set the minimum heigth/width +$table->SetMinRowHeight(2,10); +$table->SetMinColWidth(70); + +// Add some padding (in pixels) +$table->SetRowPadding(2,0); +$table->SetRowGrid(6,1,'darkgray',TGRID_DOUBLE2); + +// Setup the grid +$table->SetGrid(0); +$table->SetRowGrid(6,1,'black',TGRID_DOUBLE2); + +// Merge all cells in row 0 +$table->MergeRow(0); + +// Set aligns +$table->SetAlign(3,0,6,6,'right'); +$table->SetRowAlign(1,'center'); +$table->SetRowAlign(2,'center'); + +// Set background colors +$table->SetRowFillColor(0,'lightgray@0.5'); +$table->SetColFillColor(0,'lightgray@0.5'); + +// Add the country flags in row 1 +$n = count($countries); +for($i=0; $i < $n; ++$i ) { + $table->SetCellCountryFlag(1,$i+1,$countries[$i],0.5); + $table->SetCellImageConstrain(1,$i+1,TIMG_HEIGHT,20); +} + +// Add the table to the graph +$graph->Add($table); + +// Send back the table graph to the client +$graph->Stroke(); + +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_tables/table_howto1.php b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_howto1.php new file mode 100644 index 0000000000..bb50fa0358 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_howto1.php @@ -0,0 +1,21 @@ +Set($data); + +// Add the table to the graph +$graph->Add($table); + +// ... and send back the table to the client +$graph->Stroke(); + +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_tables/table_howto2.php b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_howto2.php new file mode 100644 index 0000000000..69d25e6b60 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_howto2.php @@ -0,0 +1,25 @@ +Set($data); + +// Merge all cellsn in the rectangle with +// top left corner = (0,2) and bottom right = (1,3) +$table->MergeCells(0,2,1,3); + +// Add the table to the graph +$graph->Add($table); + +// ... and send back the table to the client +$graph->Stroke(); + +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_tables/table_howto3.php b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_howto3.php new file mode 100644 index 0000000000..26417b4a85 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_howto3.php @@ -0,0 +1,24 @@ +Set($data); + +// Merge all cells in row 0 +$table->MergeRow(0); + +// Add table to graph +$graph->Add($table); + +// ... and send back the table to the client +$graph->Stroke(); + +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_tables/table_howto4.php b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_howto4.php new file mode 100644 index 0000000000..d093fcb304 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_howto4.php @@ -0,0 +1,28 @@ +Set($data); + +// Merge all cells in row 0 +$table->MergeRow(0); + +// Set foreground and background color +$table->SetCellFillColor(0,0,'orange@0.7'); +$table->SetCellColor(0,0,'darkred'); + +// Add the table to the graph +$graph->Add($table); + +// and send it back to the client +$graph->Stroke(); + +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_tables/table_howto5.php b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_howto5.php new file mode 100644 index 0000000000..252318af4e --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_howto5.php @@ -0,0 +1,30 @@ +Set($data); + +// Merge all cells in row 0 +$table->MergeRow(0); + +// Adjust font in cell (0,0) +$table->SetCellFont(0,0,FF_ARIAL,FS_BOLD,14); + +// Set left align for all cells in rectangle (0,0) - (0,3) +$table->SetAlign(0,0,0,3,'Left'); + +// Add table to graph +$graph->Add($table); + +// ... send it back to the client +$graph->Stroke(); + +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_tables/table_howto6.php b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_howto6.php new file mode 100644 index 0000000000..c776494ed3 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_howto6.php @@ -0,0 +1,32 @@ +Set($data); + +// Merge all cells in row 0 +$table->MergeRow(0); + +// Setup font and color +$table->SetCellFont(0,0,FF_ARIAL,FS_BOLD,14); +$table->SetRowFillColor(0,'orange@0.5'); +$table->SetRowColor(0,'darkred'); + +// Setup the minimum width of all columns +$table->SetMinColWidth(35); + +// Add table to the graph +$graph->Add($table); + +// ... send it back to the client +$graph->Stroke(); + +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_tables/table_howto7.1.php b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_howto7.1.php new file mode 100644 index 0000000000..4dbe52d73d --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_howto7.1.php @@ -0,0 +1,34 @@ +Set($data); + +// Set default font in entire table +$table->SetFont(FF_ARIAL,FS_NORMAL,11); + +// Setup font and color for row = 2 +$table->SetRowFont(2,FF_ARIAL,FS_BOLD,11); +$table->SetRowFillColor(2,'orange@0.5'); + +// Setup minimum color width +$table->SetMinColWidth(35); + +// Setup grid on row 2 +$table->SetRowGrid(2,1,'black',TGRID_DOUBLE); + +// Add table to the graph +$graph->Add($table); + +// and send it back to the client +$graph->Stroke(); + +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_tables/table_howto7.2.php b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_howto7.2.php new file mode 100644 index 0000000000..8a159f8aa2 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_howto7.2.php @@ -0,0 +1,34 @@ +Set($data); + +// Set default font in entire table +$table->SetFont(FF_ARIAL,FS_NORMAL,11); + +// Setup font and color for row = 2 +$table->SetRowFont(2,FF_ARIAL,FS_BOLD,11); +$table->SetRowFillColor(2,'orange@0.5'); + +// Setup minimum color width +$table->SetMinColWidth(35); + +// Setup grid on row 2 +$table->SetRowGrid(2,1,'black',TGRID_DOUBLE2); + +// Add table to the graph +$graph->Add($table); + +// and send it back to the client +$graph->Stroke(); + +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_tables/table_howto7.php b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_howto7.php new file mode 100644 index 0000000000..8a159f8aa2 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_howto7.php @@ -0,0 +1,34 @@ +Set($data); + +// Set default font in entire table +$table->SetFont(FF_ARIAL,FS_NORMAL,11); + +// Setup font and color for row = 2 +$table->SetRowFont(2,FF_ARIAL,FS_BOLD,11); +$table->SetRowFillColor(2,'orange@0.5'); + +// Setup minimum color width +$table->SetMinColWidth(35); + +// Setup grid on row 2 +$table->SetRowGrid(2,1,'black',TGRID_DOUBLE2); + +// Add table to the graph +$graph->Add($table); + +// and send it back to the client +$graph->Stroke(); + +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_tables/table_howto8.php b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_howto8.php new file mode 100644 index 0000000000..a89785b3ff --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_howto8.php @@ -0,0 +1,43 @@ +Set($data); + +// Setup overall table font +$table->SetFont(FF_ARIAL,FS_NORMAL,11); + +// Setup font and color for row = 2 +$table->SetRowFont(2,FF_ARIAL,FS_BOLD,11); +$table->SetRowFillColor(2,'orange@0.5'); + +// Setup minimum color width +$table->SetMinColWidth(35); + +// Setup overall cell alignment for the table +$table->SetAlign('right'); + +// Setup overall table border +$table->SetBorder(0,'black'); + +// Setup overall table grid +$table->setGrid(0,'black'); + +// Set specific frid for row = 2 +$table->SetRowGrid(2,1,'black',TGRID_DOUBLE2); + +// Add the table to the graph +$graph->Add($table); + +// and send it back to the browser +$graph->Stroke(); + +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_tables/table_howto9.php b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_howto9.php new file mode 100644 index 0000000000..cf6f65f457 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_howto9.php @@ -0,0 +1,46 @@ +Set($data); + +// Setup overall table font +$table->SetFont(FF_ARIAL,FS_NORMAL,11); + +// Setup font and color for row = 2 +$table->SetRowFont(2,FF_ARIAL,FS_BOLD,11); +$table->SetRowFillColor(2,'orange@0.5'); + +// Setup minimum color width +$table->SetMinColWidth(40); + +// Setup overall cell alignment for the table +$table->SetAlign('right'); + +// Setup overall table border +$table->SetBorder(0,'black'); + +// Setup overall table grid +$table->setGrid(0,'black'); + +// Set specific frid for row = 2 +$table->SetRowGrid(2,1,'black',TGRID_DOUBLE2); + +// Setup overall number format in all cells +$table->SetNumberFormat("%0.1f"); + +// Add table to the graph +$graph->Add($table); + +// and send it back to the browser +$graph->Stroke(); + +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_tables/table_mex0.php b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_mex0.php new file mode 100644 index 0000000000..9568874e80 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_mex0.php @@ -0,0 +1,50 @@ +Set($data); + +// Setup fonts +$table->SetFont(FF_TIMES,FS_NORMAL,11); +$table->SetColFont(0,FF_ARIAL,FS_NORMAL,11); +$table->SetRowFont(0,FF_ARIAL,FS_NORMAL,11); +$table->SetRowFont(4,FF_TIMES,FS_BOLD,14); + +// Turn off the grid +$table->SetGrid(0); + +// Setup color +$table->SetRowFillColor(0,'lightgray@0.5'); +$table->SetRowFillColor(4,'lightgray@0.5'); +$table->SetColFillColor(0,'lightgray@0.5'); +$table->SetFillColor(0,0,4,0,'lightgray@0.5'); + +// Set default minimum column width +$table->SetMinColWidth(45); + +// Set default table alignment +$table->SetAlign('right'); + +// Add table to the graph +$graph->Add($table); + +// and send it back to the client +$graph->Stroke(); + +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_tables/table_mex00.php b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_mex00.php new file mode 100644 index 0000000000..ecd7410d7b --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_mex00.php @@ -0,0 +1,33 @@ +Set($data); +$table->SetFont(FF_TIMES,FS_NORMAL,11); + +// Set default table alignment +$table->SetAlign('right'); + +// Add table to graph +$graph->Add($table); + +// and send it back to the client +$graph->Stroke(); + +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_tables/table_mex1.php b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_mex1.php new file mode 100644 index 0000000000..ce40d0e774 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_mex1.php @@ -0,0 +1,56 @@ +Set($data); +$table->SetFont(FF_ARIAL,FS_NORMAL,11); + +// Setup default column width +$table->SetMinColWidth(40); + +// Setup defalt table alignment +$table->SetAlign('right'); + +// Turn off border +$table->SetBorder(0); + +// Turn off grid +$table->setGrid(0); + +// Setup font for row 4 and 0 +$table->SetRowFont(4,FF_ARIAL,FS_BOLD,11); +$table->SetRowFont(0,FF_ARIAL,FS_BOLD,11); + +// Setup color +$table->SetRowFillColor(4,'orange@0.5'); +$table->SetFillColor(0,1,0,6,'teal@0.8'); + + +// Setup grids +$table->SetRowGrid(4,1,'black',TGRID_DOUBLE2); +$table->SetColGrid(1,1,'black',TGRID_SINGLE); +$table->SetRowGrid(1,1,'black',TGRID_SINGLE); + +// Add table to the graph +$graph->Add($table); + +// Send it back to the client +$graph->Stroke(); + +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_tables/table_mex2.php b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_mex2.php new file mode 100644 index 0000000000..a4acc9d801 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_mex2.php @@ -0,0 +1,58 @@ +Set($data); +$table->SetFont(FF_ARIAL,FS_NORMAL,11); + +// Set default minimum color width +$table->SetMinColWidth(40); + +// Set default table alignment +$table->SetAlign('right'); + +// Set table border +$table->SetBorder(0); + +// Turn off grid +$table->setGrid(0); + +// Setup font +$table->SetRowFont(4,FF_ARIAL,FS_BOLD,11); +$table->SetRowFont(0,FF_ARIAL,FS_BOLD,11); + +// Setup various grid lines +$table->SetRowGrid(4,2,'black',TGRID_SINGLE); +$table->SetColGrid(1,3,'black',TGRID_SINGLE); +$table->SetRowGrid(1,1,'black',TGRID_SINGLE); + +// Setup various colors +$table->SetFillColor(0,1,0,6,'black'); +$table->SetRowColor(0,'white'); +$table->SetRowFillColor(4,'lightyellow'); +$table->SetFillColor(2,0,2,6,'lightgray'); + +// Add table to the graph +$graph->Add($table); + + +// Send back to client +$graph->Stroke(); + +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_tables/table_mex3.php b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_mex3.php new file mode 100644 index 0000000000..981181c477 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_mex3.php @@ -0,0 +1,59 @@ +Set($data); +$table->SetFont(FF_ARIAL,FS_NORMAL,11); + +// Set default minimum color width +$table->SetMinColWidth(40); + +// Set default table alignment +$table->SetAlign('right'); + +// Turn off grid +$table->setGrid(0); + +// Set table border +$table->SetBorder(2); + +// Setup font +$table->SetRowFont(4,FF_ARIAL,FS_BOLD,11); +$table->SetRowFont(0,FF_ARIAL,FS_BOLD,11); +$table->SetFont(1,2,1,3,FF_ARIAL,FS_BOLD,11); + +// Setup grids +$table->SetRowGrid(4,2,'black',TGRID_SINGLE); +$table->SetColGrid(1,1,'black',TGRID_SINGLE); +$table->SetRowGrid(1,1,'black',TGRID_SINGLE); + +// Setup colors +$table->SetFillColor(0,1,0,6,'black'); +$table->SetRowColor(0,'white'); +$table->SetRowFillColor(4,'lightgray@0.3'); +$table->SetFillColor(2,0,2,6,'lightgray@0.6'); +$table->SetFillColor(1,2,1,3,'lightred'); + +// Add table to graph +$graph->Add($table); + +// Send back to the client +$graph->Stroke(); + +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_tables/table_vtext.php b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_vtext.php new file mode 100644 index 0000000000..1b2b349ae3 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_vtext.php @@ -0,0 +1,42 @@ +Set($data); +$table->SetAlign('right'); +$table->SetFont(FF_TIMES,FS_NORMAL,12); +$table->SetCellFont(0,0,FF_ARIAL,FS_BOLD,16); + +// Rotate the entire table 90 degrees +$table->SetTextOrientation(90); +//$table->SetCellTextOrientation(0,0,0); + +// Setup background color for header column +$table->SetColFillColor(0,'lightgray'); + +// Set the imnimum row height +$table->SetMinRowHeight(0,150); + +// Add table to graph +$graph->Add($table); + +// and send it back to the client +$graph->Stroke(); + +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_tables/table_vtext_ex1.php b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_vtext_ex1.php new file mode 100644 index 0000000000..9581884b32 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_tables/table_vtext_ex1.php @@ -0,0 +1,42 @@ +Set($data); +$table->SetFont(FF_TIMES,FS_NORMAL,11); + +// Default table alignment +$table->SetAlign('right'); + +// Adjust font in (0,0) +$table->SetCellFont(0,0,FF_TIMES,FS_BOLD,14); + +// Rotate all textxs in row 0 +$table->SetRowTextOrientation(0,90); + +// Adjust alignment in cell (0,0) +$table->SetCellAlign(0,0,'center','center'); + +// Add table to graph +$graph->Add($table); + +// Send back table to client +$graph->Stroke(); + +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_tables/tablebarex1.php b/vendor/amenadiel/jpgraph/Examples/examples_tables/tablebarex1.php new file mode 100644 index 0000000000..63f0c074df --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_tables/tablebarex1.php @@ -0,0 +1,68 @@ +img->SetMargin($tablexpos, $rightmargin, 30, $height - $tableypos); +$graph->SetScale("textlin"); +$graph->SetMarginColor('white'); + +// Setup titles and fonts +$graph->title->Set('Bar and table'); +$graph->title->SetFont(FF_VERDANA, FS_NORMAL, 14); +$graph->yaxis->title->Set("Flow"); +$graph->yaxis->title->SetFont(FF_ARIAL, FS_NORMAL, 12); +$graph->yaxis->title->SetMargin(10); + +// Create the bars and the accbar plot +$bplot = new Plot\BarPlot($datay[3]); +$bplot->SetFillColor("orange"); +$bplot2 = new Plot\BarPlot($datay[2]); +$bplot2->SetFillColor("red"); +$bplot3 = new Plot\BarPlot($datay[1]); +$bplot3->SetFillColor("darkgreen"); +$accbplot = new Plot\AccBarPlot(array($bplot, $bplot2, $bplot3)); +$accbplot->value->Show(); +$graph->Add($accbplot); + +//Setup the table +$table = new GTextTable(); +$table->Set($datay); +$table->SetPos($tablexpos, $tableypos + 1); + +// Basic table formatting +$table->SetFont(FF_ARIAL, FS_NORMAL, 10); +$table->SetAlign('right'); +$table->SetMinColWidth($cellwidth); +$table->SetNumberFormat('%0.1f'); + +// Format table header row +$table->SetRowFillColor(0, 'teal@0.7'); +$table->SetRowFont(0, FF_ARIAL, FS_BOLD, 11); +$table->SetRowAlign(0, 'center'); + +// .. and add it to the graph +$graph->Add($table); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_tables/tablebarex1_csim.php b/vendor/amenadiel/jpgraph/Examples/examples_tables/tablebarex1_csim.php new file mode 100644 index 0000000000..01bd3a5f6e --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_tables/tablebarex1_csim.php @@ -0,0 +1,70 @@ +img->SetMargin($tablexpos, $rightmargin, 30, $height - $tableypos); +$graph->SetScale("textlin"); +$graph->SetMarginColor('white'); + +// Setup titles and fonts +$graph->title->Set('Bar and table'); +$graph->title->SetFont(FF_VERDANA, FS_NORMAL, 14); +$graph->yaxis->title->Set("Flow"); +$graph->yaxis->title->SetFont(FF_ARIAL, FS_NORMAL, 12); +$graph->yaxis->title->SetMargin(10); + +// Create the bars and the accbar plot +$bplot = new Plot\BarPlot($datay[3]); +$bplot->SetFillColor("orange"); +$bplot2 = new Plot\BarPlot($datay[2]); +$bplot2->SetFillColor("red"); +$bplot3 = new Plot\BarPlot($datay[1]); +$bplot3->SetFillColor("darkgreen"); +$accbplot = new Plot\AccBarPlot(array($bplot, $bplot2, $bplot3)); +$accbplot->value->Show(); +$graph->Add($accbplot); + +//Setup the table +$table = new GTextTable(); +$table->Set($datay); +$table->SetPos($tablexpos, $tableypos + 1); + +$table->SetCellCSIMTarget(1, 1, 'tableex02.php', 'View details'); + +// Basic table formatting +$table->SetFont(FF_ARIAL, FS_NORMAL, 10); +$table->SetAlign('right'); +$table->SetMinColWidth($cellwidth); +$table->SetNumberFormat('%0.1f'); + +// Format table header row +$table->SetRowFillColor(0, 'teal@0.7'); +$table->SetRowFont(0, FF_ARIAL, FS_BOLD, 11); +$table->SetRowAlign(0, 'center'); + +// .. and add it to the graph +$graph->Add($table); + +$graph->StrokeCSIM(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_tables/tableex00.php b/vendor/amenadiel/jpgraph/Examples/examples_tables/tableex00.php new file mode 100644 index 0000000000..0acabaed2e --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_tables/tableex00.php @@ -0,0 +1,25 @@ +Set($data); + +//Add table to the graph +$graph->Add($table); + +// Send back table to the client +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_tables/tableex01.php b/vendor/amenadiel/jpgraph/Examples/examples_tables/tableex01.php new file mode 100644 index 0000000000..8efe9f9f51 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_tables/tableex01.php @@ -0,0 +1,29 @@ +Init(); +$table->Set($data); + +$table->SetRowFont(0,FF_FONT1,FS_BOLD); +$table->SetRowColor(0,'navy'); +$table->SetRowFillColor(0,'lightgray'); + +$table->SetColFont(0,FF_FONT1,FS_BOLD); +$table->SetColColor(0,'navy'); +$table->SetColFillColor(0,'lightgray'); + +$graph->Add($table); +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_tables/tableex01_csim.php b/vendor/amenadiel/jpgraph/Examples/examples_tables/tableex01_csim.php new file mode 100644 index 0000000000..ff11a70b8e --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_tables/tableex01_csim.php @@ -0,0 +1,33 @@ +Set($data); + +$table->SetCellCSIMTarget(1,1,'tableex02.php','View details'); + +$table->SetRowFont(0,FF_FONT1,FS_BOLD); +$table->SetRowColor(0,'navy'); +$table->SetRowFillColor(0,'lightgray'); + +$table->SetColFont(0,FF_FONT1,FS_BOLD); +$table->SetColColor(0,'navy'); +$table->SetColFillColor(0,'lightgray'); + +$graph->Add($table); + +$graph->StrokeCSIM(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_tables/tableex02.php b/vendor/amenadiel/jpgraph/Examples/examples_tables/tableex02.php new file mode 100644 index 0000000000..193f49f179 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_tables/tableex02.php @@ -0,0 +1,33 @@ +Init(); +$table->Set($data); + +// Setup row and column headers +$table->SetRowFont(0,FF_TIMES,FS_BOLD,11); +$table->SetRowAlign(0,'left','bottom'); +$table->SetRowColor(0,'navy'); +$table->SetRowFillColor(0,'lightgray'); +$table->SetColFont(0,FF_ARIAL,FS_BOLD,11); +$table->SetColColor(0,'navy'); +$table->SetColFillColor(0,'lightgray'); + +// Highlight cell 2,3 +$table->SetCellFillColor(2,3,'yellow'); + +$graph->Add($table); +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/examples_tables/tableex03.php b/vendor/amenadiel/jpgraph/Examples/examples_tables/tableex03.php new file mode 100644 index 0000000000..5ac72151e1 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_tables/tableex03.php @@ -0,0 +1,58 @@ +Init(); +$table->Set($data); +$table->SetBorder(2,'black'); + +// Setup top row with the year title +$table->MergeCells(0,0,0,6); +$table->SetRowFont(0,FF_ARIAL,FS_BOLD,16); +$table->SetRowColor(0,'navy'); +$table->SetRowAlign(0,'center'); + +// Setup quarter header +$table->MergeCells(1,1,1,3); +$table->MergeCells(1,4,1,6); +$table->SetRowAlign(1,'center'); +$table->SetRowFont(1,FF_ARIAL,FS_BOLD,10); +$table->SetRowColor(1,'navy'); +$table->SetRowFillColor(1,'lightgray'); +$table->SetRowGrid(2,'',0); // Turn off the gridline just under the top row + +// Setup row and column headers +$table->SetRowFont(2,FF_ARIAL,FS_NORMAL,11); +$table->SetRowColor(2,'navy'); +$table->SetRowFillColor(2,'lightgray'); + +$table->SetColFont(0,FF_ARIAL,FS_NORMAL,11); +$table->SetColColor(0,'navy'); +$table->SetColFillColor(0,'lightgray'); + +$table->SetCellFillColor(0,0,'lightgreen'); +$table->SetCellFillColor(1,0,'lightgreen'); +$table->SetCellFillColor(2,0,'lightgreen'); + +// Highlight cell 2,3 +$table->SetCellFillColor(4,3,'yellow'); + +$graph->Add($table); +$graph->Stroke(); + +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_tables/tableex04.php b/vendor/amenadiel/jpgraph/Examples/examples_tables/tableex04.php new file mode 100644 index 0000000000..21f540d38b --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_tables/tableex04.php @@ -0,0 +1,50 @@ +Init(); +$table->Set($data); +$table->SetBorder(2,'black'); + +// Highlight summation row +$table->SetRowFillColor($r-1,'yellow'); +$table->SetCellAlign($r-1,0,'right'); + +// Setup row and column headers +$table->SetRowFont(0,FF_ARIAL,FS_NORMAL,10); +$table->SetRowColor(0,'navy'); +$table->SetRowFillColor(0,'lightgray'); + +$table->SetColFont(0,FF_ARIAL,FS_NORMAL,10); +$table->SetColColor(0,'navy'); +$table->SetColFillColor(0,'lightgray'); + +$table->SetRowGrid($r-1,1,'black',TGRID_DOUBLE); + +$graph->Add($table); +$graph->Stroke(); + +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_tables/tableex05.php b/vendor/amenadiel/jpgraph/Examples/examples_tables/tableex05.php new file mode 100644 index 0000000000..aad9e00d58 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_tables/tableex05.php @@ -0,0 +1,53 @@ +Init(); +$table->Set($data); +$table->SetBorder(2,'black'); + +// Highlight summation row +$table->SetRowFillColor($r-1,'yellow'); +$table->SetCellAlign($r-1,0,'right'); + +// Setup row and column headers +$table->SetRowFont(0,FF_ARIAL,FS_NORMAL,10); +$table->SetRowColor(0,'navy'); +$table->SetRowFillColor(0,'lightgray'); + +$table->SetColFont(0,FF_ARIAL,FS_NORMAL,10); +$table->SetColColor(0,'navy'); +$table->SetColFillColor(0,'lightgray'); + +$table->SetRowGrid($r-1,1,'black',TGRID_DOUBLE); + +$table->SetFont(1,4,2,6,FF_TIMES,FS_NORMAL,18); +$table->SetFillColor(1,1,2,3,'red'); + +$table->MergeCol(1); +$graph->Add($table); +$graph->Stroke(); + +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/examples_theme/aqua_example.php b/vendor/amenadiel/jpgraph/Examples/examples_theme/aqua_example.php new file mode 100644 index 0000000000..a9cdb0dbd6 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_theme/aqua_example.php @@ -0,0 +1,60 @@ + array(0 => 79, 1 => -25, 2 => -7, 3 => 85, 4 => -26, 5 => -32), + 1 => array(0 => 76, 1 => 51, 2 => 86, 3 => 12, 4 => -7, 5 => 94), + 2 => array(0 => 49, 1 => 38, 2 => 7, 3 => -40, 4 => 9, 5 => -7), + 3 => array(0 => 69, 1 => 96, 2 => 49, 3 => 7, 4 => 92, 5 => -38), + 4 => array(0 => 68, 1 => 16, 2 => 82, 3 => -49, 4 => 50, 5 => 7), + 5 => array(0 => -37, 1 => 28, 2 => 32, 3 => 6, 4 => 13, 5 => 57), + 6 => array(0 => 24, 1 => -11, 2 => 7, 3 => 10, 4 => 51, 5 => 51), + 7 => array(0 => 3, 1 => -1, 2 => -12, 3 => 61, 4 => 10, 5 => 47), + 8 => array(0 => -47, 1 => -21, 2 => 43, 3 => 53, 4 => 36, 5 => 34), +); + +// Create the graph. These two calls are always required +$graph = new Graph\Graph(400, 300); + +$graph->SetScale("textlin"); +if ($theme) { + $graph->SetTheme(new $theme()); +} +$theme_class = new Themes\AquaTheme; +$graph->SetTheme($theme_class); + +$plot = array(); +// Create the bar plots +for ($i = 0; $i < 4; $i++) { + $plot[$i] = new Plot\BarPlot($data[$i]); + $plot[$i]->SetLegend('plot' . ($i + 1)); +} +//$acc1 = new Plot\AccBarPlot(array($plot[0], $plot[1])); +//$acc1->value->Show(); +Kint::enabled(true); +ddd($plot); +$gbplot = new Plot\GroupBarPlot(array($plot[2], $plot[1])); + +for ($i = 4; $i < 8; $i++) { + $plot[$i] = new Plot\LinePlot($data[$i]); + $plot[$i]->SetLegend('plot' . $i); + $plot[$i]->value->Show(); +} + +$graph->Add($gbplot); +$graph->Add($plot[4]); + +$title = "AquaTheme Example"; +$title = mb_convert_encoding($title, 'UTF-8'); +$graph->title->Set($title); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_theme/fusion_example.php b/vendor/amenadiel/jpgraph/Examples/examples_theme/fusion_example.php new file mode 100644 index 0000000000..2c60354e47 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_theme/fusion_example.php @@ -0,0 +1,55 @@ + array(0 => 79, 1 => -25, 2 => -7, 3 => 85, 4 => -26, 5 => -32), + 1 => array(0 => 76, 1 => 51, 2 => 86, 3 => 12, 4 => -7, 5 => 94), + 2 => array(0 => 49, 1 => 38, 2 => 7, 3 => -40, 4 => 9, 5 => -7), + 3 => array(0 => 69, 1 => 96, 2 => 49, 3 => 7, 4 => 92, 5 => -38), + 4 => array(0 => 68, 1 => 16, 2 => 82, 3 => -49, 4 => 50, 5 => 7), + 5 => array(0 => -37, 1 => 28, 2 => 32, 3 => 6, 4 => 13, 5 => 57), + 6 => array(0 => 24, 1 => -11, 2 => 7, 3 => 10, 4 => 51, 5 => 51), + 7 => array(0 => 3, 1 => -1, 2 => -12, 3 => 61, 4 => 10, 5 => 47), + 8 => array(0 => -47, 1 => -21, 2 => 43, 3 => 53, 4 => 36, 5 => 34), +); + +// Create the graph. These two calls are always required +$graph = new Graph\Graph(400, 300); + +$graph->SetScale("textlin"); +if ($theme) { + $graph->SetTheme(new $theme()); +} +$theme_class = new FusionTheme; +$graph->SetTheme($theme_class); + +$plot = array(); +// Create the bar plots +for ($i = 0; $i < 4; $i++) { + $plot[$i] = new Plot\BarPlot($data[$i]); + $plot[$i]->SetLegend('plot' . ($i + 1)); +} +//$acc1 = new Plot\AccBarPlot(array($plot[0], $plot[1])); +//$acc1->value->Show(); +$gbplot = new Plot\GroupBarPlot(array($plot[2], $plot[1])); + +for ($i = 4; $i < 8; $i++) { + $plot[$i] = new Plot\LinePlot($data[$i]); + $plot[$i]->SetLegend('plot' . $i); + $plot[$i]->value->Show(); +} + +$graph->Add($gbplot); +$graph->Add($plot[4]); + +$title = "FusionTheme Example"; +$title = mb_convert_encoding($title, 'UTF-8'); +$graph->title->Set($title); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_theme/green_example.php b/vendor/amenadiel/jpgraph/Examples/examples_theme/green_example.php new file mode 100644 index 0000000000..645989297f --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_theme/green_example.php @@ -0,0 +1,56 @@ + array(0 => 79, 1 => -25, 2 => -7, 3 => 85, 4 => -26, 5 => -32), + 1 => array(0 => 76, 1 => 51, 2 => 86, 3 => 12, 4 => -7, 5 => 94), + 2 => array(0 => 49, 1 => 38, 2 => 7, 3 => -40, 4 => 9, 5 => -7), + 3 => array(0 => 69, 1 => 96, 2 => 49, 3 => 7, 4 => 92, 5 => -38), + 4 => array(0 => 68, 1 => 16, 2 => 82, 3 => -49, 4 => 50, 5 => 7), + 5 => array(0 => -37, 1 => 28, 2 => 32, 3 => 6, 4 => 13, 5 => 57), + 6 => array(0 => 24, 1 => -11, 2 => 7, 3 => 10, 4 => 51, 5 => 51), + 7 => array(0 => 3, 1 => -1, 2 => -12, 3 => 61, 4 => 10, 5 => 47), + 8 => array(0 => -47, 1 => -21, 2 => 43, 3 => 53, 4 => 36, 5 => 34), +); + +// Create the graph. These two calls are always required +$graph = new Graph\Graph(400, 300); + +$graph->SetScale("textlin"); +if ($theme) { + $graph->SetTheme(new $theme()); +} +$theme_class = new GreenTheme; +$graph->SetTheme($theme_class); + +$plot = array(); +// Create the bar plots +for ($i = 0; $i < 4; $i++) { + $plot[$i] = new Plot\BarPlot($data[$i]); + $plot[$i]->SetLegend('plot' . ($i + 1)); +} +//$acc1 = new Plot\AccBarPlot(array($plot[0], $plot[1])); +//$acc1->value->Show(); +$gbplot = new Plot\GroupBarPlot(array($plot[2], $plot[1])); + +for ($i = 4; $i < 8; $i++) { + $plot[$i] = new Plot\LinePlot($data[$i]); + $plot[$i]->SetLegend('plot' . $i); + $plot[$i]->value->Show(); +} + +$graph->Add($gbplot); +$graph->Add($plot[4]); + +$title = "GreenTheme Example"; +$title = mb_convert_encoding($title, 'UTF-8'); +$graph->title->Set($title); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_theme/ocean_example.php b/vendor/amenadiel/jpgraph/Examples/examples_theme/ocean_example.php new file mode 100644 index 0000000000..f60650b4a3 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_theme/ocean_example.php @@ -0,0 +1,56 @@ + array(0 => 79, 1 => -25, 2 => -7, 3 => 85, 4 => -26, 5 => -32), + 1 => array(0 => 76, 1 => 51, 2 => 86, 3 => 12, 4 => -7, 5 => 94), + 2 => array(0 => 49, 1 => 38, 2 => 7, 3 => -40, 4 => 9, 5 => -7), + 3 => array(0 => 69, 1 => 96, 2 => 49, 3 => 7, 4 => 92, 5 => -38), + 4 => array(0 => 68, 1 => 16, 2 => 82, 3 => -49, 4 => 50, 5 => 7), + 5 => array(0 => -37, 1 => 28, 2 => 32, 3 => 6, 4 => 13, 5 => 57), + 6 => array(0 => 24, 1 => -11, 2 => 7, 3 => 10, 4 => 51, 5 => 51), + 7 => array(0 => 3, 1 => -1, 2 => -12, 3 => 61, 4 => 10, 5 => 47), + 8 => array(0 => -47, 1 => -21, 2 => 43, 3 => 53, 4 => 36, 5 => 34), +); + +// Create the graph. These two calls are always required +$graph = new Graph\Graph(400, 300); + +$graph->SetScale("textlin"); +if ($theme) { + $graph->SetTheme(new $theme()); +} +$theme_class = new OceanTheme; +$graph->SetTheme($theme_class); + +$plot = array(); +// Create the bar plots +for ($i = 0; $i < 4; $i++) { + $plot[$i] = new Plot\BarPlot($data[$i]); + $plot[$i]->SetLegend('plot' . ($i + 1)); +} +//$acc1 = new Plot\AccBarPlot(array($plot[0], $plot[1])); +//$acc1->value->Show(); +$gbplot = new Plot\GroupBarPlot(array($plot[2], $plot[1])); + +for ($i = 4; $i < 8; $i++) { + $plot[$i] = new Plot\LinePlot($data[$i]); + $plot[$i]->SetLegend('plot' . $i); + $plot[$i]->value->Show(); +} + +$graph->Add($gbplot); +$graph->Add($plot[4]); + +$title = "OceanTheme Example"; +$title = mb_convert_encoding($title, 'UTF-8'); +$graph->title->Set($title); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_theme/orange_example.php b/vendor/amenadiel/jpgraph/Examples/examples_theme/orange_example.php new file mode 100644 index 0000000000..14032640e1 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_theme/orange_example.php @@ -0,0 +1,56 @@ + array(0 => 79, 1 => -25, 2 => -7, 3 => 85, 4 => -26, 5 => -32), + 1 => array(0 => 76, 1 => 51, 2 => 86, 3 => 12, 4 => -7, 5 => 94), + 2 => array(0 => 49, 1 => 38, 2 => 7, 3 => -40, 4 => 9, 5 => -7), + 3 => array(0 => 69, 1 => 96, 2 => 49, 3 => 7, 4 => 92, 5 => -38), + 4 => array(0 => 68, 1 => 16, 2 => 82, 3 => -49, 4 => 50, 5 => 7), + 5 => array(0 => -37, 1 => 28, 2 => 32, 3 => 6, 4 => 13, 5 => 57), + 6 => array(0 => 24, 1 => -11, 2 => 7, 3 => 10, 4 => 51, 5 => 51), + 7 => array(0 => 3, 1 => -1, 2 => -12, 3 => 61, 4 => 10, 5 => 47), + 8 => array(0 => -47, 1 => -21, 2 => 43, 3 => 53, 4 => 36, 5 => 34), +); + +// Create the graph. These two calls are always required +$graph = new Graph\Graph(400, 300); + +$graph->SetScale("textlin"); +if ($theme) { + $graph->SetTheme(new $theme()); +} +$theme_class = new OrangeTheme; +$graph->SetTheme($theme_class); + +$plot = array(); +// Create the bar plots +for ($i = 0; $i < 4; $i++) { + $plot[$i] = new Plot\BarPlot($data[$i]); + $plot[$i]->SetLegend('plot' . ($i + 1)); +} +//$acc1 = new Plot\AccBarPlot(array($plot[0], $plot[1])); +//$acc1->value->Show(); +$gbplot = new Plot\GroupBarPlot(array($plot[2], $plot[1])); + +for ($i = 4; $i < 8; $i++) { + $plot[$i] = new Plot\LinePlot($data[$i]); + $plot[$i]->SetLegend('plot' . $i); + $plot[$i]->value->Show(); +} + +$graph->Add($gbplot); +$graph->Add($plot[4]); + +$title = "OrangeTheme Example"; +$title = mb_convert_encoding($title, 'UTF-8'); +$graph->title->Set($title); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_theme/pastel_example.php b/vendor/amenadiel/jpgraph/Examples/examples_theme/pastel_example.php new file mode 100644 index 0000000000..c4b27e8748 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_theme/pastel_example.php @@ -0,0 +1,55 @@ + array(0 => 79, 1 => -25, 2 => -7, 3 => 85, 4 => -26, 5 => -32), + 1 => array(0 => 76, 1 => 51, 2 => 86, 3 => 12, 4 => -7, 5 => 94), + 2 => array(0 => 49, 1 => 38, 2 => 7, 3 => -40, 4 => 9, 5 => -7), + 3 => array(0 => 69, 1 => 96, 2 => 49, 3 => 7, 4 => 92, 5 => -38), + 4 => array(0 => 68, 1 => 16, 2 => 82, 3 => -49, 4 => 50, 5 => 7), + 5 => array(0 => -37, 1 => 28, 2 => 32, 3 => 6, 4 => 13, 5 => 57), + 6 => array(0 => 24, 1 => -11, 2 => 7, 3 => 10, 4 => 51, 5 => 51), + 7 => array(0 => 3, 1 => -1, 2 => -12, 3 => 61, 4 => 10, 5 => 47), + 8 => array(0 => -47, 1 => -21, 2 => 43, 3 => 53, 4 => 36, 5 => 34), +); + +// Create the graph. These two calls are always required +$graph = new Graph\Graph(400, 300); + +$graph->SetScale("textlin"); +if ($theme) { + $graph->SetTheme(new $theme()); +} +$theme_class = new PastelTheme; +$graph->SetTheme($theme_class); + +$plot = array(); +// Create the bar plots +for ($i = 0; $i < 4; $i++) { + $plot[$i] = new Plot\BarPlot($data[$i]); + $plot[$i]->SetLegend('plot' . ($i + 1)); +} +//$acc1 = new Plot\AccBarPlot(array($plot[0], $plot[1])); +//$acc1->value->Show(); +$gbplot = new Plot\GroupBarPlot(array($plot[2], $plot[1])); + +for ($i = 4; $i < 8; $i++) { + $plot[$i] = new Plot\LinePlot($data[$i]); + $plot[$i]->SetLegend('plot' . $i); + $plot[$i]->value->Show(); +} + +$graph->Add($gbplot); +$graph->Add($plot[4]); + +$title = "PastelTheme Example"; +$title = mb_convert_encoding($title, 'UTF-8'); +$graph->title->Set($title); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_theme/rose_example.php b/vendor/amenadiel/jpgraph/Examples/examples_theme/rose_example.php new file mode 100644 index 0000000000..61da4d1894 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_theme/rose_example.php @@ -0,0 +1,56 @@ + array(0 => 79, 1 => -25, 2 => -7, 3 => 85, 4 => -26, 5 => -32), + 1 => array(0 => 76, 1 => 51, 2 => 86, 3 => 12, 4 => -7, 5 => 94), + 2 => array(0 => 49, 1 => 38, 2 => 7, 3 => -40, 4 => 9, 5 => -7), + 3 => array(0 => 69, 1 => 96, 2 => 49, 3 => 7, 4 => 92, 5 => -38), + 4 => array(0 => 68, 1 => 16, 2 => 82, 3 => -49, 4 => 50, 5 => 7), + 5 => array(0 => -37, 1 => 28, 2 => 32, 3 => 6, 4 => 13, 5 => 57), + 6 => array(0 => 24, 1 => -11, 2 => 7, 3 => 10, 4 => 51, 5 => 51), + 7 => array(0 => 3, 1 => -1, 2 => -12, 3 => 61, 4 => 10, 5 => 47), + 8 => array(0 => -47, 1 => -21, 2 => 43, 3 => 53, 4 => 36, 5 => 34), +); + +// Create the graph. These two calls are always required +$graph = new Graph\Graph(400, 300); + +$graph->SetScale("textlin"); +if ($theme) { + $graph->SetTheme(new $theme()); +} +$theme_class = new RoseTheme; +$graph->SetTheme($theme_class); + +$plot = array(); +// Create the bar plots +for ($i = 0; $i < 4; $i++) { + $plot[$i] = new Plot\BarPlot($data[$i]); + $plot[$i]->SetLegend('plot' . ($i + 1)); +} +//$acc1 = new Plot\AccBarPlot(array($plot[0], $plot[1])); +//$acc1->value->Show(); +$gbplot = new Plot\GroupBarPlot(array($plot[2], $plot[1])); + +for ($i = 4; $i < 8; $i++) { + $plot[$i] = new Plot\LinePlot($data[$i]); + $plot[$i]->SetLegend('plot' . $i); + $plot[$i]->value->Show(); +} + +$graph->Add($gbplot); +$graph->Add($plot[4]); + +$title = "RoseTheme Example"; +$title = mb_convert_encoding($title, 'UTF-8'); +$graph->title->Set($title); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_theme/softy_example.php b/vendor/amenadiel/jpgraph/Examples/examples_theme/softy_example.php new file mode 100644 index 0000000000..bdabee926c --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_theme/softy_example.php @@ -0,0 +1,56 @@ + array(0 => 79, 1 => -25, 2 => -7, 3 => 85, 4 => -26, 5 => -32), + 1 => array(0 => 76, 1 => 51, 2 => 86, 3 => 12, 4 => -7, 5 => 94), + 2 => array(0 => 49, 1 => 38, 2 => 7, 3 => -40, 4 => 9, 5 => -7), + 3 => array(0 => 69, 1 => 96, 2 => 49, 3 => 7, 4 => 92, 5 => -38), + 4 => array(0 => 68, 1 => 16, 2 => 82, 3 => -49, 4 => 50, 5 => 7), + 5 => array(0 => -37, 1 => 28, 2 => 32, 3 => 6, 4 => 13, 5 => 57), + 6 => array(0 => 24, 1 => -11, 2 => 7, 3 => 10, 4 => 51, 5 => 51), + 7 => array(0 => 3, 1 => -1, 2 => -12, 3 => 61, 4 => 10, 5 => 47), + 8 => array(0 => -47, 1 => -21, 2 => 43, 3 => 53, 4 => 36, 5 => 34), +); + +// Create the graph. These two calls are always required +$graph = new Graph\Graph(400, 300); + +$graph->SetScale("textlin"); +if ($theme) { + $graph->SetTheme(new $theme()); +} +$theme_class = new SoftyTheme; +$graph->SetTheme($theme_class); + +$plot = array(); +// Create the bar plots +for ($i = 0; $i < 4; $i++) { + $plot[$i] = new Plot\BarPlot($data[$i]); + $plot[$i]->SetLegend('plot' . ($i + 1)); +} +//$acc1 = new Plot\AccBarPlot(array($plot[0], $plot[1])); +//$acc1->value->Show(); +$gbplot = new Plot\GroupBarPlot(array($plot[2], $plot[1])); + +for ($i = 4; $i < 8; $i++) { + $plot[$i] = new Plot\LinePlot($data[$i]); + $plot[$i]->SetLegend('plot' . $i); + $plot[$i]->value->Show(); +} + +$graph->Add($gbplot); +$graph->Add($plot[4]); + +$title = "SoftyTheme Example"; +$title = mb_convert_encoding($title, 'UTF-8'); +$graph->title->Set($title); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_theme/theme_example.php b/vendor/amenadiel/jpgraph/Examples/examples_theme/theme_example.php new file mode 100644 index 0000000000..db0ae21226 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_theme/theme_example.php @@ -0,0 +1,26 @@ +SetScale('textlin'); + +$theme_class = new AquaTheme; +$graph->SetTheme($theme_class); + +// after setting theme, you can change details as you want +$graph->SetFrame(true, 'lightgray'); // set frame visible + +$graph->xaxis->SetTickLabels(array('A', 'B', 'C', 'D')); // change xaxis lagels +$graph->title->Set("Theme Example"); // add title + +// add barplot +$bplot = new Plot\BarPlot($data1y); +$graph->Add($bplot); + +// you can change properties of the plot only after calling Add() +$bplot->SetWeight(0); +$bplot->SetFillGradient('#FFAAAA:0.7', '#FFAAAA:1.2', GRAD_VER); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_theme/universal_example.php b/vendor/amenadiel/jpgraph/Examples/examples_theme/universal_example.php new file mode 100644 index 0000000000..3a7f50e255 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_theme/universal_example.php @@ -0,0 +1,56 @@ + array(0 => 79, 1 => -25, 2 => -7, 3 => 85, 4 => -26, 5 => -32), + 1 => array(0 => 76, 1 => 51, 2 => 86, 3 => 12, 4 => -7, 5 => 94), + 2 => array(0 => 49, 1 => 38, 2 => 7, 3 => -40, 4 => 9, 5 => -7), + 3 => array(0 => 69, 1 => 96, 2 => 49, 3 => 7, 4 => 92, 5 => -38), + 4 => array(0 => 68, 1 => 16, 2 => 82, 3 => -49, 4 => 50, 5 => 7), + 5 => array(0 => -37, 1 => 28, 2 => 32, 3 => 6, 4 => 13, 5 => 57), + 6 => array(0 => 24, 1 => -11, 2 => 7, 3 => 10, 4 => 51, 5 => 51), + 7 => array(0 => 3, 1 => -1, 2 => -12, 3 => 61, 4 => 10, 5 => 47), + 8 => array(0 => -47, 1 => -21, 2 => 43, 3 => 53, 4 => 36, 5 => 34), +); + +// Create the graph. These two calls are always required +$graph = new Graph\Graph(400, 300); + +$graph->SetScale("textlin"); +if ($theme) { + $graph->SetTheme(new $theme()); +} +$theme_class = new UniversalTheme; +$graph->SetTheme($theme_class); + +$plot = array(); +// Create the bar plots +for ($i = 0; $i < 4; $i++) { + $plot[$i] = new Plot\BarPlot($data[$i]); + $plot[$i]->SetLegend('plot' . ($i + 1)); +} +//$acc1 = new Plot\AccBarPlot(array($plot[0], $plot[1])); +//$acc1->value->Show(); +$gbplot = new Plot\GroupBarPlot(array($plot[2], $plot[1])); + +for ($i = 4; $i < 8; $i++) { + $plot[$i] = new Plot\LinePlot($data[$i]); + $plot[$i]->SetLegend('plot' . $i); + $plot[$i]->value->Show(); +} + +$graph->Add($gbplot); +$graph->Add($plot[4]); + +$title = "UniversalTheme Example"; +$title = mb_convert_encoding($title, 'UTF-8'); +$graph->title->Set($title); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_theme/vivid_example.php b/vendor/amenadiel/jpgraph/Examples/examples_theme/vivid_example.php new file mode 100644 index 0000000000..4faccf47c9 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_theme/vivid_example.php @@ -0,0 +1,56 @@ + array(0 => 79, 1 => -25, 2 => -7, 3 => 85, 4 => -26, 5 => -32), + 1 => array(0 => 76, 1 => 51, 2 => 86, 3 => 12, 4 => -7, 5 => 94), + 2 => array(0 => 49, 1 => 38, 2 => 7, 3 => -40, 4 => 9, 5 => -7), + 3 => array(0 => 69, 1 => 96, 2 => 49, 3 => 7, 4 => 92, 5 => -38), + 4 => array(0 => 68, 1 => 16, 2 => 82, 3 => -49, 4 => 50, 5 => 7), + 5 => array(0 => -37, 1 => 28, 2 => 32, 3 => 6, 4 => 13, 5 => 57), + 6 => array(0 => 24, 1 => -11, 2 => 7, 3 => 10, 4 => 51, 5 => 51), + 7 => array(0 => 3, 1 => -1, 2 => -12, 3 => 61, 4 => 10, 5 => 47), + 8 => array(0 => -47, 1 => -21, 2 => 43, 3 => 53, 4 => 36, 5 => 34), +); + +// Create the graph. These two calls are always required +$graph = new Graph\Graph(400, 300); + +$graph->SetScale("textlin"); +if ($theme) { + $graph->SetTheme(new $theme()); +} +$theme_class = new VividTheme; +$graph->SetTheme($theme_class); + +$plot = array(); +// Create the bar plots +for ($i = 0; $i < 4; $i++) { + $plot[$i] = new Plot\BarPlot($data[$i]); + $plot[$i]->SetLegend('plot' . ($i + 1)); +} +//$acc1 = new Plot\AccBarPlot(array($plot[0], $plot[1])); +//$acc1->value->Show(); +$gbplot = new Plot\GroupBarPlot(array($plot[2], $plot[1])); + +for ($i = 4; $i < 8; $i++) { + $plot[$i] = new Plot\LinePlot($data[$i]); + $plot[$i]->SetLegend('plot' . $i); + $plot[$i]->value->Show(); +} + +$graph->Add($gbplot); +$graph->Add($plot[4]); + +$title = "VividTheme Example"; +$title = mb_convert_encoding($title, 'UTF-8'); +$graph->title->Set($title); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_tick/manualtickex1.php b/vendor/amenadiel/jpgraph/Examples/examples_tick/manualtickex1.php new file mode 100644 index 0000000000..43d0667ac7 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_tick/manualtickex1.php @@ -0,0 +1,69 @@ +GetTicks($datax); + +// We add some grace to the end of the X-axis scale so that the first and last +// data point isn't exactly at the very end or beginning of the scale +$grace = 400000; +$xmin = $datax[0] - $grace; +$xmax = $datax[$n - 1] + $grace; + +// +// The code to setup a very basic graph +// +$graph = new Graph\Graph(400, 200); + +// +// We use an integer scale on the X-axis since the positions on the X axis +// are assumed to be UNI timestamps +$graph->SetScale('intlin', 0, 0, $xmin, $xmax); +$graph->title->Set('Basic example with manual ticks'); +$graph->title->SetFont(FF_ARIAL, FS_NORMAL, 12); + +// +// Make sure that the X-axis is always at the bottom of the scale +// (By default the X-axis is alwys positioned at Y=0 so if the scale +// doesn't happen to include 0 the axis will not be shown) +$graph->xaxis->SetPos('min'); + +// Now set the tic positions +$graph->xaxis->SetTickPositions($tickPositions, $minTickPositions); + +// The labels should be formatted at dates with "Year-month" +$graph->xaxis->SetLabelFormatString('My', true); + +// Use Ariel font +$graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 9); + +// Add a X-grid +$graph->xgrid->Show(); + +// Create the plot line +$p1 = new Plot\LinePlot($datay, $datax); +$p1->SetColor('teal'); +$graph->Add($p1); + +// Output graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_tick/manualtickex1a.php b/vendor/amenadiel/jpgraph/Examples/examples_tick/manualtickex1a.php new file mode 100644 index 0000000000..43d0667ac7 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_tick/manualtickex1a.php @@ -0,0 +1,69 @@ +GetTicks($datax); + +// We add some grace to the end of the X-axis scale so that the first and last +// data point isn't exactly at the very end or beginning of the scale +$grace = 400000; +$xmin = $datax[0] - $grace; +$xmax = $datax[$n - 1] + $grace; + +// +// The code to setup a very basic graph +// +$graph = new Graph\Graph(400, 200); + +// +// We use an integer scale on the X-axis since the positions on the X axis +// are assumed to be UNI timestamps +$graph->SetScale('intlin', 0, 0, $xmin, $xmax); +$graph->title->Set('Basic example with manual ticks'); +$graph->title->SetFont(FF_ARIAL, FS_NORMAL, 12); + +// +// Make sure that the X-axis is always at the bottom of the scale +// (By default the X-axis is alwys positioned at Y=0 so if the scale +// doesn't happen to include 0 the axis will not be shown) +$graph->xaxis->SetPos('min'); + +// Now set the tic positions +$graph->xaxis->SetTickPositions($tickPositions, $minTickPositions); + +// The labels should be formatted at dates with "Year-month" +$graph->xaxis->SetLabelFormatString('My', true); + +// Use Ariel font +$graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 9); + +// Add a X-grid +$graph->xgrid->Show(); + +// Create the plot line +$p1 = new Plot\LinePlot($datay, $datax); +$p1->SetColor('teal'); +$graph->Add($p1); + +// Output graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_tick/manualtickex2.php b/vendor/amenadiel/jpgraph/Examples/examples_tick/manualtickex2.php new file mode 100644 index 0000000000..6126a3028c --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_tick/manualtickex2.php @@ -0,0 +1,70 @@ +E(0, 10); + +// Now get labels at 1/2 PI intervall +$tickPositions = array(); +$tickLabels = array(); +$tickPositions[0] = 0; +$tickLabels[0] = '0'; +for ($i = 1; $i / 2 * M_PI < 11; ++$i) { + $tickPositions[$i] = $i / 2 * M_PI; + if ($i % 2) { + $tickLabels[$i] = $i . '/2' . SymChar::Get('pi'); + } else { + $tickLabels[$i] = ($i / 2) . SymChar::Get('pi'); + } + +} + +$n = count($datax); +$xmin = $datax[0]; +$xmax = $datax[$n - 1]; + +// +// The code to setup a very basic graph +// +$graph = new Graph\Graph(400, 200); + +// +// We use an integer scale on the X-axis since the positions on the X axis +// are assumed to be UNI timestamps +$graph->SetScale('linlin', 0, 0, $xmin, $xmax); +$graph->title->Set('Example with manual tick labels'); +$graph->title->SetFont(FF_ARIAL, FS_NORMAL, 12); + +// +// Make sure that the X-axis is always at the bottom of the scale +// (By default the X-axis is alwys positioned at Y=0 so if the scale +// doesn't happen to include 0 the axis will not be shown) +$graph->xaxis->SetPos('min'); + +// Now set the tic positions +$graph->xaxis->SetMajTickPositions($tickPositions, $tickLabels); + +// Use Times font +$graph->xaxis->SetFont(FF_TIMES, FS_NORMAL, 10); +$graph->yaxis->SetFont(FF_TIMES, FS_NORMAL, 10); + +// Add a X-grid +$graph->xgrid->Show(); + +// Create the plot line +$p1 = new Plot\LinePlot($datay, $datax); +$p1->SetColor('teal'); +$graph->Add($p1); + +// Output graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_tick/manualtickex3.php b/vendor/amenadiel/jpgraph/Examples/examples_tick/manualtickex3.php new file mode 100644 index 0000000000..fb8413bc41 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_tick/manualtickex3.php @@ -0,0 +1,89 @@ +E(0, 10); + +// Now get labels at 1/2 PI intervall +$tickPositions = array(); +$tickLabels = array(); +$tickPositions[0] = 0; +$tickLabels[0] = '0'; +for ($i = 1; $i / 2 * M_PI < 11; ++$i) { + $tickPositions[$i] = $i / 2 * M_PI; + if ($i % 2) { + $tickLabels[$i] = $i . '/2' . SymChar::Get('pi'); + } else { + $tickLabels[$i] = ($i / 2) . SymChar::Get('pi'); + } + +} + +$n = count($datax); +$xmin = $datax[0]; +$xmax = $datax[$n - 1]; + +// +// The code to setup a very basic graph +// +$graph = new Graph\Graph(400, 200); + +// We use an integer scale on the X-axis since the positions on the X axis +// are assumed to be UNI timestamps +$graph->SetScale('linlin', 0, 0, $xmin, $xmax); +$graph->title->Set('Example with manual tick labels'); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); +$graph->title->SetColor('white'); + +// Setup a abackground gradient +$graph->SetBackgroundGradient('darkred:0.7', 'black', 2, BGRAD_MARGIN); +$graph->SetPlotGradient('black', 'darkred:0.8', 2); + +// Make sure that the X-axis is always at the bottom of the scale +// (By default the X-axis is alwys positioned at Y=0 so if the scale +// doesn't happen to include 0 the axis will not be shown) +$graph->xaxis->SetPos('min'); + +// Now set the tic positions +$graph->xaxis->SetMajTickPositions($tickPositions, $tickLabels); + +// Use Times font +$graph->xaxis->SetFont(FF_TIMES, FS_NORMAL, 11); +$graph->yaxis->SetFont(FF_TIMES, FS_NORMAL, 9); + +// Set colors for axis +$graph->xaxis->SetColor('lightgray'); +$graph->yaxis->SetColor('lightgray'); + +// Add a X-grid +$graph->xgrid->Show(); + +// Show ticks outwards +$graph->xaxis->SetTickSide(SIDE_DOWN); +$graph->xaxis->SetLabelMargin(8); +$graph->yaxis->SetTickSide(SIDE_LEFT); + +// Setup a filled y-grid +//$graph->ygrid->SetFill(true,'darkgray:1.55@0.7','darkgray:1.6@0.7'); +$graph->ygrid->SetStyle('dotted'); +$graph->xgrid->SetStyle('dashed'); + +// Create the plot line +$p1 = new Plot\LinePlot($datay, $datax); +$p1->SetWeight(2); +$p1->SetColor('orange:0.9'); +$p1->SetFillColor('white@0.7'); +$graph->Add($p1); + +// Output graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_tick/manualtickex4.php b/vendor/amenadiel/jpgraph/Examples/examples_tick/manualtickex4.php new file mode 100644 index 0000000000..ee35652a57 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_tick/manualtickex4.php @@ -0,0 +1,90 @@ +E(0, 10); + +// Now get labels at 1/2 PI intervall +$tickPositions = array(); +$tickLabels = array(); +$tickPositions[0] = 0; +$tickLabels[0] = '0'; +for ($i = 1; $i / 2 * M_PI < 11; ++$i) { + $tickPositions[$i] = $i / 2 * M_PI; + if ($i % 2) { + $tickLabels[$i] = $i . '/2' . SymChar::Get('pi'); + } else { + $tickLabels[$i] = ($i / 2) . SymChar::Get('pi'); + } + +} + +$n = count($datax); +$xmin = $datax[0]; +$xmax = $datax[$n - 1]; + +// +// The code to setup a very basic graph +// +$graph = new Graph\Graph(400, 200); + +// We use an integer scale on the X-axis since the positions on the X axis +// are assumed to be UNI timestamps +$graph->SetScale('linlin', 0, 0, $xmin, $xmax); +$graph->title->Set('Example with manual tick labels'); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); +$graph->title->SetColor('white'); + +// Setup a abackground gradient +$graph->SetBackgroundGradient('darkred:0.7', 'black', 2, BGRAD_MARGIN); +$graph->SetPlotGradient('black', 'darkred:0.8', 2); + +// Make sure that the X-axis is always at the bottom of the scale +// (By default the X-axis is alwys positioned at Y=0 so if the scale +// doesn't happen to include 0 the axis will not be shown) +$graph->xaxis->SetPos('min'); + +// Now set the tic positions +$graph->xaxis->SetMajTickPositions($tickPositions, $tickLabels); + +// Use Times font +$graph->xaxis->SetFont(FF_TIMES, FS_NORMAL, 11); +$graph->yaxis->SetFont(FF_TIMES, FS_NORMAL, 9); + +// Set colors for axis +$graph->xaxis->SetColor('lightgray'); +$graph->yaxis->SetColor('lightgray'); + +// Add a X-grid +$graph->xgrid->Show(); + +// Show ticks outwards +$graph->xaxis->SetTickSide(SIDE_DOWN); +$graph->xaxis->SetLabelMargin(8); +$graph->yaxis->SetTickSide(SIDE_LEFT); + +// Setup a filled y-grid +//$graph->ygrid->SetFill(true,'darkgray:1.55@0.7','darkgray:1.6@0.7'); +$graph->ygrid->SetStyle('dotted'); +$graph->xgrid->SetStyle('dashed'); + +// Create the plot line +$p1 = new Plot\LinePlot($datay, $datax); +$p1->SetWeight(2); +$p1->SetColor('orange:0.9'); +$p1->SetFillColor('white@0.7'); +$p1->SetFillFromYMin(); +$graph->Add($p1); + +// Output graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_2plots_ex1.php b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_2plots_ex1.php new file mode 100644 index 0000000000..3693e1e309 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_2plots_ex1.php @@ -0,0 +1,42 @@ + array(10, 10, 13, 7), + 2 => array(2, 8, 10), + 4 => array(1, 12, 22), +); + +$data2 = array( + 4 => array(12, 8, 2, 3), + 2 => array(5, 4, 4, 5, 2), +); + +// Create a new small windrose graph +$graph = new Graph\WindroseGraph(660, 400); +$graph->SetShadow(); + +$graph->title->Set('Two windrose plots in one graph'); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$graph->subtitle->Set('(Using Box() for each plot)'); + +$wp = new Plot\WindrosePlot($data); +$wp->SetType(WINDROSE_TYPE8); +$wp->SetSize(0.42); +$wp->SetPos(0.25, 0.55); +$wp->SetBox(); + +$wp2 = new Plot\WindrosePlot($data2); +$wp2->SetType(WINDROSE_TYPE16); +$wp2->SetSize(0.42); +$wp2->SetPos(0.74, 0.55); +$wp2->SetBox(); +$wp2->SetRangeColors(array('green', 'yellow', 'red', 'brown')); + +$graph->Add($wp); +$graph->Add($wp2); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_bgimg_ex1.php b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_bgimg_ex1.php new file mode 100644 index 0000000000..863b62f3ef --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_bgimg_ex1.php @@ -0,0 +1,45 @@ + array(12, 8, 2, 3), + 6 => array(5, 4, 4, 5, 4), +); + +$se_CompassLbl = array('O', 'ONO', 'NO', 'NNO', 'N', 'NNV', 'NV', 'VNV', 'V', 'VSV', 'SV', 'SSV', 'S', 'SSO', 'SO', 'OSO'); + +// Create a new small windrose graph +$graph = new Graph\WindroseGraph(400, 400); +$graph->SetMargin(25, 25, 25, 25); +$graph->SetFrame(); + +$graph->title->Set('Example with background flag'); +#$graph->title->SetFont(FF_VERA,FS_BOLD,14); + +//$graph->SetBackgroundImage('bkgimg.jpg',BGIMG_FILLFRAME); +//$graph->SetBackgroundImageMix(90); +$graph->SetBackgroundCFlag(28, BGIMG_FILLFRAME, 15); + +$wp2 = new Plot\WindrosePlot($data2); +$wp2->SetType(WINDROSE_TYPE16); +$wp2->SetSize(0.55); +$wp2->SetPos(0.5, 0.5); +$wp2->SetAntiAlias(false); + +$wp2->SetFont(FF_ARIAL, FS_BOLD, 10); +$wp2->SetFontColor('black'); + +$wp2->SetCompassLabels($se_CompassLbl); +$wp2->legend->SetMargin(20, 5); + +$wp2->scale->SetZFont(FF_ARIAL, FS_NORMAL, 8); +$wp2->scale->SetFont(FF_ARIAL, FS_NORMAL, 9); +$wp2->scale->SetLabelFillColor('white', 'white'); + +$wp2->SetRangeColors(array('green', 'yellow', 'red', 'brown')); + +$graph->Add($wp2); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex0.php b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex0.php new file mode 100644 index 0000000000..280170f690 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex0.php @@ -0,0 +1,23 @@ + array(5, 5, 5, 8), + 1 => array(3, 4, 1, 4), + 'WSW' => array(1, 5, 5, 3), + 'N' => array(2, 3, 8, 1, 1), + 15 => array(2, 3, 5)); + +// First create a new windrose graph with a title +$graph = new Graph\WindroseGraph(400, 400); +$graph->title->Set('A basic Windrose graph'); + +// Create the windrose plot. +$wp = new Plot\WindrosePlot($data); + +// Add and send back to browser +$graph->Add($wp); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex1.php b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex1.php new file mode 100644 index 0000000000..fc59909bf9 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex1.php @@ -0,0 +1,26 @@ + array(1, 1, 2.5, 4), + 1 => array(3, 4, 1, 4), + 'wsw' => array(1, 5, 5, 3), + 'N' => array(2, 7, 5, 4, 2), + 15 => array(2, 7, 12)); + +// First create a new windrose graph with a title +$graph = new Graph\WindroseGraph(400, 400); + +// Setup title +$graph->title->Set('Windrose basic example'); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +$graph->title->SetColor('navy'); + +// Create the windrose plot. +$wp = new Plot\WindrosePlot($data); +$wp->SetRadialGridStyle('solid'); +$graph->Add($wp); + +// Send the graph to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex1b.php b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex1b.php new file mode 100644 index 0000000000..a3e25ebab7 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex1b.php @@ -0,0 +1,31 @@ + array(1, 1, 2.5, 4), + 1 => array(3, 4, 1, 4), + 'wsw' => array(1, 5, 5, 3), + 'N' => array(2, 7, 5, 4, 2), + 15 => array(2, 7, 12)); + +// First create a new windrose graph with a title +$graph = new Graph\WindroseGraph(400, 400); +$graph->title->Set('Windrose example 1b'); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +$graph->title->SetColor('navy'); + +// Create the windrose plot. +// The default plot will have 16 compass axis. +$wp = new Plot\WindrosePlot($data); +$wp->SetRadialGridStyle('solid'); +$graph->Add($wp); + +// Setup the range so that the values do not touch eachother +$wp->SetRanges(array(0, 1, 2, 3, 4, 5, 6, 7, 8, 10)); +$wp->SetRangeStyle(RANGE_DISCRETE); // Cmp with RANGE_OVERLAPPING as default + +// Send the graph to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex2.1.php b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex2.1.php new file mode 100644 index 0000000000..3776578742 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex2.1.php @@ -0,0 +1,47 @@ + array(1, 1, 6, 4), + 1 => array(3, 8, 1, 4), + 2 => array(2, 7, 4, 4, 3), + 3 => array(2, 7, 1, 2)); + +// First create a new windrose graph with a title +$graph = new Graph\WindroseGraph(400, 400); + +// Setup title +$graph->title->Set('Windrose example 2'); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +$graph->title->SetColor('navy'); + +// Create the windrose plot. +$wp = new Plot\WindrosePlot($data); + +// Make it have 8 compass direction +$wp->SetType(WINDROSE_TYPE4); + +// Setup the weight of the laegs for the different ranges +$weights = array_fill(0, 8, 10); +$wp->SetRangeWeights($weights); + +// Adjust the font and font color for scale labels +$wp->scale->SetFont(FF_TIMES, FS_NORMAL, 11); +$wp->scale->SetFontColor('navy'); + +// Set the diametr for the plot to 160 pixels +$wp->SetSize(160); + +// Set the size of the innermost center circle to 30% of the plot size +$wp->SetZCircleSize(0.2); + +// Adjust the font and font color for compass directions +$wp->SetFont(FF_ARIAL, FS_NORMAL, 12); +$wp->SetFontColor('darkgreen'); + +// Add and send back to browser +$graph->Add($wp); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex2.php b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex2.php new file mode 100644 index 0000000000..1e734b7e66 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex2.php @@ -0,0 +1,47 @@ + array(1, 1, 2.5, 4), + 1 => array(3, 4, 1, 4), + 3 => array(2, 7, 4, 4, 3), + 5 => array(2, 7, 1, 2)); + +// First create a new windrose graph with a title +$graph = new Graph\WindroseGraph(400, 400); + +// Setup title +$graph->title->Set('Windrose example 2'); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +$graph->title->SetColor('navy'); + +// Create the windrose plot. +$wp = new Plot\WindrosePlot($data); + +// Make it have 8 compass direction +$wp->SetType(WINDROSE_TYPE8); + +// Setup the weight of the laegs for the different ranges +$weights = array_fill(0, 8, 10); +$wp->SetRangeWeights($weights); + +// Adjust the font and font color for scale labels +$wp->scale->SetFont(FF_TIMES, FS_NORMAL, 11); +$wp->scale->SetFontColor('navy'); + +// Set the diametr for the plot to 160 pixels +$wp->SetSize(200); + +// Set the size of the innermost center circle to 30% of the plot size +$wp->SetZCircleSize(0.2); + +// Adjust the font and font color for compass directions +$wp->SetFont(FF_ARIAL, FS_NORMAL, 12); +$wp->SetFontColor('darkgreen'); + +// Add and send back the graph to the client +$graph->Add($wp); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex3.php b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex3.php new file mode 100644 index 0000000000..c9e65c8e09 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex3.php @@ -0,0 +1,71 @@ + array(1, 1, 2.5, 4), + 1 => array(3, 4, 1, 4), + 3 => array(2, 7, 4, 4, 3), + 5 => array(2, 7, 1, 2)); + +$data[1] = array( + "n" => array(1, 1, 2.5, 4), + "ssw" => array(3, 4, 1, 4), + "se" => array(2, 7, 4, 4, 3)); + +// Store the position and size data for each plot in an +// array to make it easier to create multiple plots. +// The format choosen for the layout data is +// (type,x-pos,y-pos,size, z-circle size) +$layout = array( + array(WINDROSE_TYPE8, 0.25, 0.55, 0.4, 0.25), + array(WINDROSE_TYPE16, 0.75, 0.55, 0.4, 0.25)); + +$legendtxt = array('(m/s) Station 7', '(m/s) Station 12'); + +// First create a new windrose graph with a dropshadow +$graph = new Graph\WindroseGraph(600, 350); +$graph->SetShadow('darkgray'); + +// Setup titles +$graph->title->Set('Windrose example 3'); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +$graph->title->SetColor('navy'); +$graph->subtitle->Set('(Multiple plots in the same graph)'); +$graph->subtitle->SetFont(FF_VERDANA, FS_NORMAL, 9); +$graph->subtitle->SetColor('navy'); + +// Create the two windrose plots. +for ($i = 0; $i < count($data); ++$i) { + $wp[$i] = new Plot\WindrosePlot($data[$i]); + + // Make it have 8 compass direction + $wp[$i]->SetType($layout[$i][0]); + + // Adjust the font and font color for scale labels + $wp[$i]->scale->SetFont(FF_TIMES, FS_NORMAL, 10); + $wp[$i]->scale->SetFontColor('navy'); + + // Set the position of the plot + $wp[$i]->SetPos($layout[$i][1], $layout[$i][2]); + + // Set the diameter for the plot to 30% of the width of the graph pixels + $wp[$i]->SetSize($layout[$i][3]); + + // Set the size of the innermost center circle to 30% of the plot size + $wp[$i]->SetZCircleSize($layout[$i][4]); + + // Adjust the font and font color for compass directions + $wp[$i]->SetFont(FF_ARIAL, FS_NORMAL, 10); + $wp[$i]->SetFontColor('darkgreen'); + + // Add legend text + $wp[$i]->legend->SetText($legendtxt[$i]); + + $graph->Add($wp[$i]); +} + +// Send the graph to the browser +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex4.php b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex4.php new file mode 100644 index 0000000000..e2ac749354 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex4.php @@ -0,0 +1,56 @@ + array(1, 1, 2.5, 4), + 1 => array(3, 4, 1, 4), + 3 => array(2, 7, 4, 4, 3), + 5 => array(2, 7, 1, 2)); + +// First create a new windrose graph with a title +$graph = new Graph\WindroseGraph(400, 400); + +// Setup title +$graph->title->Set('Windrose example 4'); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +$graph->title->SetColor('navy'); + +// Create the windrose plot. +$wp = new Plot\WindrosePlot($data); + +// Adjust the font and font color for scale labels +$wp->scale->SetFont(FF_TIMES, FS_NORMAL, 11); +$wp->scale->SetFontColor('navy'); + +// Set the diameter and position for plot +$wp->SetSize(190); + +// Set the size of the innermost center circle to 40% of the plot size +// Note that we can have the automatic "Zero" sum appear in our custom text +$wp->SetZCircleSize(0.38); +$wp->scale->SetZeroLabel("Station 12\n(Calm %d%%)"); + +// Adjust color and font for center circle text +$wp->scale->SetZFont(FF_ARIAL, FS_NORMAL, 9); +$wp->scale->SetZFontColor('darkgreen'); + +// Adjust the font and font color for compass directions +$wp->SetFont(FF_ARIAL, FS_NORMAL, 10); +$wp->SetFontColor('darkgreen'); + +// Adjust the margin to the compass directions +$wp->SetLabelMargin(50); + +// Adjust grid colors +$wp->SetGridColor('silver', 'blue'); + +// Add (m/s) text to legend +$wp->legend->SetText('(m/s)'); +$wp->legend->SetMargin(20, 5); + +// Add and send back to client +$graph->Add($wp); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex5.php b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex5.php new file mode 100644 index 0000000000..d4f43d184c --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex5.php @@ -0,0 +1,94 @@ + array(1, 1, 2.5, 4), + 1 => array(3, 4, 1, 4), + 3 => array(2, 7, 4, 4, 3), + 5 => array(2, 7, 1, 2)); + +// Text to be added. +$txt = array(); +$txt[0] = "It is possible to add arbitrary,multi line, text to a graph. "; +$txt[0] .= "Such a paragraph can have it's text be left, right or center "; +$txt[0] .= "aligned."; +$txt[1] = "This is an example of a right aligned paragraph."; +$txt[2] = "Finally we can show a center aligned paragraph without box."; + +// We store the layout for each of the text boxes in an array +// to keep the code clean +$txtlayout = array( + array(0.97, 0.15, 25, 'left', 'black', 'lightblue'), + array(0.97, 0.4, 20, 'right', 'black', 'lightblue'), + array(0.97, 0.7, 20, 'center', 'darkred', false, FF_COMIC, FS_NORMAL, 12), +); + +// Range colors to be used +$rangeColors = array('silver', 'khaki', 'orange', 'brown', 'blue', 'navy', 'maroon', 'red'); + +// First create a new windrose graph with a title +$graph = new Graph\WindroseGraph(570, 430); +$graph->title->Set('Windrose example 5'); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +$graph->title->SetColor('navy'); + +// Setup graph background color +$graph->SetColor('darkgreen@0.7'); + +// Setup all the defined text boxes +$n = count($txt); +for ($i = 0; $i < $n; ++$i) { + $txtbox[$i] = new Text($txt[$i]); + $txtbox[$i]->SetPos($txtlayout[$i][0], $txtlayout[$i][1], 'right'); + $txtbox[$i]->SetWordwrap($txtlayout[$i][2]); + $txtbox[$i]->SetParagraphAlign($txtlayout[$i][3]); + $txtbox[$i]->SetColor($txtlayout[$i][4]); + $txtbox[$i]->SetBox($txtlayout[$i][5]); + if (count($txtlayout[$i]) > 6) { + $txtbox[$i]->SetFont($txtlayout[$i][6], $txtlayout[$i][7], $txtlayout[$i][8]); + } + +} +$graph->Add($txtbox); + +// Create the windrose plot. +$wp = new Plot\WindrosePlot($data); + +// Set background color for plot area +$wp->SetColor('lightyellow'); + +// Add a box around the plot +$wp->SetBox(); + +// Setup the colors for the ranges +$wp->SetRangeColors($rangeColors); + +// Adjust the font and font color for scale labels +$wp->scale->SetFont(FF_ARIAL, FS_NORMAL, 9); +$wp->scale->SetFontColor('navy'); + +// Set the diameter and position for plot +$wp->SetSize(190); +$wp->SetPos(0.35, 0.53); + +$wp->SetZCircleSize(0.2); + +// Adjust the font and font color for compass directions +$wp->SetFont(FF_ARIAL, FS_NORMAL, 10); +$wp->SetFontColor('darkgreen'); + +// Adjust the margin to the compass directions +$wp->SetLabelMargin(50); + +// Adjust grid colors +$wp->SetGridColor('silver', 'blue'); + +// Add (m/s) text to legend +$wp->legend->SetText('(m/s)'); +$wp->legend->SetMargin(20, 5); + +// Add plot and send back to client +$graph->Add($wp); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex6.1.php b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex6.1.php new file mode 100644 index 0000000000..6448000611 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex6.1.php @@ -0,0 +1,87 @@ + array(1, 1, 2.5, 4), + '32.0' => array(3, 4, 1, 4), + '120.5' => array(2, 3, 4, 4, 3, 2, 1), + '223.2' => array(2, 4, 1, 2, 2), + '285.7' => array(2, 2, 1, 2, 4, 2, 1, 1), +); + +// This file is encode din utf-8. The two Kanji characters roughly means +// 中 = Chinese +// æ–‡ = Sentences +$ctxt = '中文'; + +// Specify text for direction labels +$labels = array( + '120.5' => $ctxt, + '232.2' => "Reference\n#13 Ver:2"); + +// Range colors to be used +$rangeColors = array('khaki', 'yellow', 'orange', 'orange:0.7', 'brown', 'darkred', 'black'); + +// First create a new windrose graph with a title +$graph = new Graph\WindroseGraph(400, 450); + +// Setup title +$graph->title->Set('Using chinese charecters'); +#$graph->title->SetFont(FF_VERDANA,FS_BOLD,12); +$graph->title->SetColor('navy'); +$graph->subtitle->Set('(Free type plot)'); +#$graph->subtitle->SetFont(FF_VERDANA,FS_ITALIC,10); +$graph->subtitle->SetColor('navy'); + +// Create the windrose plot. +$wp = new Plot\WindrosePlot($data); + +// Setup a free plot +$wp->SetType(WINDROSE_TYPEFREE); + +// Setup labels +$wp->SetLabels($labels); +$wp->SetLabelPosition(LBLPOSITION_CENTER); +$wp->SetLabelMargin(30); + +// Setup the colors for the ranges +$wp->SetRangeColors($rangeColors); + +// Adjust the font and font color for scale labels +#$wp->scale->SetFont(FF_ARIAL,FS_NORMAL,9); + +// Set the diameter and position for plot +#$wp->SetSize(240); +$wp->SetSize(200); +$wp->SetZCircleSize(30); +$wp->SetPos(0.5, 0.5); + +// Adjust the font and font color for compass directions +#$wp->SetFont(FF_CHINESE,FS_NORMAL,12); +$wp->SetFontColor('darkgreen'); + +// Adjust grid colors +$wp->SetGridColor('darkgreen@0.7', 'blue'); + +// Add (m/s) text to legend +$wp->legend->SetText('(m/s)'); +$wp->legend->SetTFontColor('blue'); + +// Set legend label font color +$wp->legend->SetLFontColor('orange:0.7'); +#$wp->legend->SetLFont(FF_ARIAL,FS_ITALIC,8); + +// Display legend values with no decimals +$wp->legend->SetFormat('%d'); + +// Set the circle font to use chinse character set +// Note: When FF_CHINESE is used the input charectr data are +// assumed to already be in utf-8 encoding +#$wp->legend->SetCFont(FF_CHINESE,FS_NORMAL,14); +$wp->legend->SetCircleText($ctxt); +$wp->legend->SetCFontColor('red'); + +// Add plot to graph and send back to client +$graph->Add($wp); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex6.php b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex6.php new file mode 100644 index 0000000000..5afe457fd1 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex6.php @@ -0,0 +1,70 @@ + array(1, 1, 2.5, 4), + '32.0' => array(3, 4, 1, 4), + '120.5' => array(2, 3, 4, 4, 3, 2, 1), + '223.2' => array(2, 4, 1, 2, 2), + '285.7' => array(2, 2, 1, 2, 4, 2, 1, 1), +); + +// Specify text for direction labels +$labels = array('120.5' => "Plant\n#1275", + '285.7' => "Reference\n#13 Ver:2"); + +// Range colors to be used +$rangeColors = array('khaki', 'yellow', 'orange', 'orange:0.7', 'brown', 'darkred', 'black'); + +// First create a new windrose graph with a title +$graph = new Graph\WindroseGraph(400, 450); + +// Setup titles +$graph->title->Set('Windrose example 6'); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +$graph->title->SetColor('navy'); + +$graph->subtitle->Set('(Free type plot)'); +$graph->subtitle->SetFont(FF_VERDANA, FS_ITALIC, 10); +$graph->subtitle->SetColor('navy'); + +// Create the windrose plot. +$wp = new Plot\WindrosePlot($data); + +// Setup a free plot +$wp->SetType(WINDROSE_TYPEFREE); + +// Setup labels +$wp->SetLabels($labels); +$wp->SetLabelPosition(LBLPOSITION_CENTER); +$wp->SetLabelMargin(30); + +// Setup the colors for the ranges +$wp->SetRangeColors($rangeColors); + +// Adjust the font and font color for scale labels +$wp->scale->SetFont(FF_ARIAL, FS_NORMAL, 9); + +// Set the diameter and position for plot +$wp->SetSize(230); +$wp->SetZCircleSize(30); + +// Adjust the font and font color for compass directions +$wp->SetFont(FF_ARIAL, FS_NORMAL, 10); +$wp->SetFontColor('darkgreen'); + +// Adjust grid colors +$wp->SetGridColor('darkgreen@0.7', 'blue'); + +// Add (m/s) text to legend +$wp->legend->SetText('(m/s)'); + +// Display legend values with no decimals +$wp->legend->SetFormat('%d'); + +// Add plot to graph and send back to the client +$graph->Add($wp); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex7.1.php b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex7.1.php new file mode 100644 index 0000000000..10af0b23c7 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex7.1.php @@ -0,0 +1,63 @@ + array(1, 15, 7.5, 2), + 5 => array(1, 1, 1.5, 2), + 7 => array(1, 2, 10, 3, 2), + 8 => array(2, 3, 1, 3, 1, 2), +); + +// First create a new windrose graph with a title +$graph = new Graph\WindroseGraph(590, 580); +$graph->title->Set('Japanese locale'); +#$graph->title->SetFont(FF_VERDANA,FS_BOLD,14); +$graph->title->SetColor('navy'); + +// Create the free windrose plot. +$wp = new Plot\WindrosePlot($data); +$wp->SetType(WINDROSE_TYPE8); + +// Add some "arbitrary" text to the center +$wp->scale->SetZeroLabel("SOx\n8%%"); + +// Localize the compass direction labels into Japanese +// Note: The labels for data must now also match the exact +// string for the compass directions. +// +// ï¼¥ã€€ã€€ã€€æ± +// Nï¼¥ã€€ã€€åŒ—æ± +// N   北 +// NW  北西 +// W   西 +// SW  å—西 +// ï¼³ã€€ã€€ã€€å— +// SE  å—æ± +$jp_CompassLbl = array('æ±', '', '北æ±', '', '北', '', '北西', '', + '西', '', 'å—西', '', 'å—', '', 'å—æ±', ''); +$wp->SetCompassLabels($jp_CompassLbl); +#$wp->SetFont(FF_MINCHO,FS_NORMAL,15); + +// Localize the "Calm" text into Swedish and make the circle +// slightly bigger than default +$jp_calmtext = 'å¹³ç©'; +$wp->legend->SetCircleText($jp_calmtext); +$wp->legend->SetCircleRadius(20); +#$wp->legend->SetCFont(FF_MINCHO,FS_NORMAL,10); +$wp->legend->SetMargin(5, 0); +$wp->SetPos(0.5, 0.5); + +// Adjust the displayed ranges +$ranges = array(1, 3, 5, 8, 12, 19, 29); +$wp->SetRanges($ranges); + +// Set the scale to always have max value of 30 +$wp->scale->Set(30, 10); +#$wp->scale->SetFont(FF_VERA,FS_NORMAL,12); + +// Finally add it to the graph and send back to client +$graph->Add($wp); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex7.php b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex7.php new file mode 100644 index 0000000000..f3542013f6 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex7.php @@ -0,0 +1,49 @@ + array(1, 15, 7.5, 2), + 5 => array(1, 1, 1.5, 2), + 7 => array(1, 2, 10, 3, 2), + 9 => array(2, 3, 1, 3, 1, 2), +); + +// First create a new windrose graph with a title +$graph = new Graph\WindroseGraph(400, 450); +$graph->title->Set('Windrose example 7'); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 14); +$graph->title->SetColor('navy'); + +// Create the free windrose plot. +$wp = new Plot\WindrosePlot($data); +$wp->SetType(WINDROSE_TYPE16); + +// Add some "arbitrary" text to the center +$wp->scale->SetZeroLabel("SOx\n8%%"); + +// Localize the compass direction labels into Swedish +// Note: The labels for data must now also match the exact +// string for the compass directions. +$se_CompassLbl = array('O', 'ONO', 'NO', 'NNO', 'N', 'NNV', 'NV', 'VNV', + 'V', 'VSV', 'SV', 'SSV', 'S', 'SSO', 'SO', 'OSO'); +$wp->SetCompassLabels($se_CompassLbl); + +// Localize the "Calm" text into Swedish and make the circle +// slightly bigger than default +$se_calmtext = 'Lugnt'; +$wp->legend->SetCircleText($se_calmtext); +$wp->legend->SetCircleRadius(20); + +// Adjust the displayed ranges +$ranges = array(1, 3, 5, 8, 12, 19, 29); +$wp->SetRanges($ranges); +//$wp->SetAntiAlias(true); + +// Set the scale to always have max value of 30 with a step +// size of 12. +$wp->scale->Set(30, 12); + +// Finally add it to the graph and send back to client +$graph->Add($wp); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex8.1.php b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex8.1.php new file mode 100644 index 0000000000..e70af32958 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex8.1.php @@ -0,0 +1,47 @@ + array(3, 2, 1, 2, 2), + 355 => array(1, 1, 1.5, 2), + 180 => array(1, 1, 1.5, 2), + 150 => array(1, 2, 1, 3), + 'S' => array(2, 3, 5, 1), +); + +// Add some labels for afew of the directions +$labels = array(355 => "At\nHome base", 180 => "Probe\n123", 150 => "Power\nplant"); + +// Define the color,weight and style of some individual radial grid lines. +$axiscolors = array(355 => "red"); +$axisweights = array(355 => 8); +$axisstyles = array(355 => 'solid', 150 => 'solid'); + +// First create a new windrose graph with a title +$graph = new Graph\WindroseGraph(400, 460); +$graph->title->Set('Adding label backgrounds'); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 14); +$graph->title->SetColor('navy'); + +// Create the free windrose plot. +$wp = new Plot\WindrosePlot($data); +$wp->SetType(WINDROSE_TYPEFREE); +$wp->scale->SetLabelFillColor('lightblue', 'black'); + +// Specify colors weights and style for the radial gridlines +$wp->SetRadialColors($axiscolors); +$wp->SetRadialWeights($axisweights); +$wp->SetRadialStyles($axisstyles); + +// Add a few labels +$wp->SetLabels($labels); + +// Add some "arbitrary" text to the center +$wp->scale->SetZeroLabel("SOx\n8%%"); + +// Finally add it to the graph and send back to client +$graph->Add($wp); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex8.php b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex8.php new file mode 100644 index 0000000000..fb540bfbfb --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex8.php @@ -0,0 +1,46 @@ + array(3, 2, 1, 2, 2), + 355 => array(1, 1, 1.5, 2), + 180 => array(1, 1, 1.5, 2), + 150 => array(1, 2, 1, 3), + 'S' => array(2, 3, 5, 1), +); + +// Add some labels for afew of the directions +$labels = array(355 => "At\nHome base", 180 => "Probe\n123", 150 => "Power\nplant"); + +// Define the color,weight and style of some individual radial grid lines. +$axiscolors = array(355 => "red"); +$axisweights = array(355 => 8); +$axisstyles = array(355 => 'solid', 150 => 'solid'); + +// First create a new windrose graph with a title +$graph = new Graph\WindroseGraph(400, 500); +$graph->title->Set('Windrose example 8'); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 14); +$graph->title->SetColor('navy'); + +// Create the free windrose plot. +$wp = new Plot\WindrosePlot($data); +$wp->SetType(WINDROSE_TYPEFREE); + +// Specify colors weights and style for the radial gridlines +$wp->SetRadialColors($axiscolors); +$wp->SetRadialWeights($axisweights); +$wp->SetRadialStyles($axisstyles); + +// Add a few labels +$wp->SetLabels($labels); + +// Add some "arbitrary" text to the center +$wp->scale->SetZeroLabel("SOx\n8%%"); + +// Finally add it to the graph and send back to client +$graph->Add($wp); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex9.1.php b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex9.1.php new file mode 100644 index 0000000000..0fdafe03fa --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex9.1.php @@ -0,0 +1,60 @@ + array(3, 2, 1, 2, 2), + 4 => array(1, 1, 1.5, 2), + 6 => array(1, 1, 1.5, 2), + 12 => array(2, 3, 5, 1), +); + +$xpos1 = 0.26; +$xpos2 = 0.74; +$ypos1 = 0.5; +$ypos2 = 0.9; + +// First create a new windrose graph with a title +$graph = new Graph\WindroseGraph(650, 350); +$graph->title->Set('Interpretation of ordinal keys'); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 14); +$graph->title->SetColor('navy'); + +// Create the first plot +$wp1 = new Plot\WindrosePlot($data); +$wp1->SetType(WINDROSE_TYPE16); + +// This is the default encoding +$wp1->SetDataKeyEncoding(KEYENCODING_ANTICLOCKWISE); +$wp1->legend->Hide(); +$wp1->SetPos($xpos1, $ypos1); +$wp1->SetSize(0.5); + +// Create the second plot +$wp2 = new Plot\WindrosePlot($data); +$wp2->SetType(WINDROSE_TYPE16); +$wp2->SetDataKeyEncoding(KEYENCODING_CLOCKWISE); +$wp2->legend->Hide(); +$wp2->SetPos($xpos2, $ypos1); +$wp2->SetSize(0.5); + +$txt1 = new Text('KEYENCODING_ANTICLOCKWISE'); +$txt1->SetFont(FF_COURIER, FS_BOLD, 12); +$txt1->SetPos($xpos1, $ypos2); +$txt1->SetAlign('center', 'top'); + +$txt2 = new Text('KEYENCODING_CLOCKWISE'); +$txt2->SetFont(FF_COURIER, FS_BOLD, 12); +$txt2->SetPos($xpos2, $ypos2); +$txt2->SetAlign('center', 'top'); + +// Finally add it to the graph and send back to the client +$graph->Add($wp1); +$graph->Add($txt1); + +$graph->Add($wp2); +$graph->Add($txt2); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex9.php b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex9.php new file mode 100644 index 0000000000..d5bf652f67 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_ex9.php @@ -0,0 +1,44 @@ + array(3, 2, 1, 2, 2), + 'N' => array(1, 1, 1.5, 2), + 'nw' => array(1, 1, 1.5, 2), + 'S' => array(2, 3, 5, 1), +); + +// Define the color,weight and style of some individual radial +// grid lines. Axis can be specified either by their (localized) +// label or by their index. +// Note; Depending on how many axis you have in the plot the +// index will vary between 0..n where n is the number of +// compass directions. +$axiscolors = array('nw' => 'brown'); +$axisweights = array('nw' => 8); // Could also be specified as 6 => 8 +$axisstyles = array('nw' => 'solid'); + +// First create a new windrose graph with a title +$graph = new Graph\WindroseGraph(400, 500); +$graph->title->Set('Windrose example 9'); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 14); +$graph->title->SetColor('navy'); + +// Create the free windrose plot. +$wp = new Plot\WindrosePlot($data); +$wp->SetType(WINDROSE_TYPE16); + +// Specify colors weights and style for the radial gridlines +$wp->SetRadialColors($axiscolors); +$wp->SetRadialWeights($axisweights); +$wp->SetRadialStyles($axisstyles); + +// Add some "arbitrary" text to the center +$wp->scale->SetZeroLabel("SOx\n8%%"); + +// Finally add it to the graph and send back to the client +$graph->Add($wp); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_icon_ex1.php b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_icon_ex1.php new file mode 100644 index 0000000000..d2bcea877d --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_icon_ex1.php @@ -0,0 +1,30 @@ + array(1, 1, 2.5, 4), + 1 => array(3, 4, 1, 4), + 'wsw' => array(1, 5, 5, 3), + 'N' => array(2, 7, 5, 4, 2), + 15 => array(2, 7, 12)); + +// First create a new windrose graph with a title +$graph = new Graph\WindroseGraph(400, 400); + +// Creta an icon to be added to the graph +$icon = new IconPlot('tornado.jpg', 10, 10, 1.3, 50); +$icon->SetAnchor('left', 'top'); +$graph->Add($icon); + +// Setup title +$graph->title->Set('Windrose icon example'); +$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +$graph->title->SetColor('navy'); + +// Create the windrose plot. +$wp = new Plot\WindrosePlot($data); + +// Add to graph and send back to client +$graph->Add($wp); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_layout_ex0.php b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_layout_ex0.php new file mode 100644 index 0000000000..295f709560 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_layout_ex0.php @@ -0,0 +1,44 @@ + array(10, 10, 13, 7), + 2 => array(2, 8, 10), + 4 => array(1, 12, 22)), + array( + 4 => array(12, 8, 2, 3), + 2 => array(5, 4, 4, 5, 2)), + array( + 1 => array(12, 8, 2, 3), + 3 => array(5, 4, 4, 5, 2)), + array( + 2 => array(12, 8, 2, 3), + 3 => array(5, 4, 4, 5, 2)), +); + +// Create a windrose graph with titles +$graph = new Graph\WindroseGraph(600, 650); +$graph->SetShadow(); + +$graph->title->Set('Multiple plots with automatic layout'); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); + +// Setup the individual windrose plots +$wp = array(); +for ($i = 0; $i < 4; ++$i) { + $wp[$i] = new Plot\WindrosePlot($data[$i]); + $wp[$i]->SetSize(0.22); + $wp[$i]->SetCenterSize(0.25); +} + +// Position with two rows. Two plots in top row and three plots in +// bottom row. +$hl1 = new LayoutHor(array($wp[0], $wp[1])); +$hl2 = new LayoutHor(array($wp[2], $wp[3])); +$vl = new LayoutVert(array($hl1, $hl2)); + +$graph->Add($vl); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_layout_ex1.php b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_layout_ex1.php new file mode 100644 index 0000000000..5a821d6fc9 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/examples_windrose/windrose_layout_ex1.php @@ -0,0 +1,56 @@ + array(10, 10, 13, 7), + 2 => array(2, 8, 10), + 4 => array(1, 12, 22)), + array( + 4 => array(12, 8, 2, 3), + 2 => array(5, 4, 4, 5, 2)), + array( + 1 => array(12, 8, 2, 3), + 3 => array(5, 4, 4, 5, 2)), + array( + 2 => array(12, 8, 2, 3), + 3 => array(5, 4, 4, 5, 2)), + array( + 4 => array(12, 8, 2, 3), + 6 => array(5, 4, 4, 5, 2)), +); + +// Legend range colors +$rangecolors = array('green', 'yellow', 'red', 'brown'); + +// Create a windrose graph with titles +$graph = new Graph\WindroseGraph(750, 700); + +$graph->title->Set('Multiple plots with automatic layout'); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); + +// Setup the individual windrose plots +$wp = array(); +for ($i = 0; $i < 5; ++$i) { + $wp[$i] = new Plot\WindrosePlot($data[$i]); + $wp[$i]->SetType(WINDROSE_TYPE8); + if ($i < 2) { + $wp[$i]->SetSize(0.28); + } else { + $wp[$i]->legend->Hide(); + $wp[$i]->SetSize(0.16); + $wp[$i]->SetCenterSize(0.25); + } + $wp[$i]->SetRangeColors($rangecolors); +} + +// Position with two rows. Two plots in top row and three plots in +// bottom row. +$hl1 = new LayoutHor(array($wp[0], $wp[1])); +$hl2 = new LayoutHor(array($wp[2], $wp[3], $wp[4])); +$vl = new LayoutVert(array($hl1, $hl2)); + +$graph->Add($vl); +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/fireplace.jpg b/vendor/amenadiel/jpgraph/Examples/fireplace.jpg new file mode 100644 index 0000000000..8006e3d003 Binary files /dev/null and b/vendor/amenadiel/jpgraph/Examples/fireplace.jpg differ diff --git a/vendor/amenadiel/jpgraph/Examples/gradbkgex1.php b/vendor/amenadiel/jpgraph/Examples/gradbkgex1.php new file mode 100644 index 0000000000..765ed86a91 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/gradbkgex1.php @@ -0,0 +1,62 @@ +SetMarginColor('white'); +$graph->SetScale("textlin", 0, 50); +$graph->SetMargin(30, 50, 30, 30); + +// We must have the frame enabled to get the gradient +// However, we don't want the frame line so we set it to +// white color which makes it invisible. +$graph->SetFrame(true, 'white'); + +// Setup a background gradient image +$graph->SetBackgroundGradient('blue', 'navy:0.5', GRAD_HOR, BGRAD_PLOT); + +// Setup the tab title +$graph->tabtitle->Set(' 3rd Division '); +$graph->tabtitle->SetFont(FF_ARIAL, FS_BOLD, 13); + +// Setup x,Y grid +$graph->xgrid->Show(); +$graph->xgrid->SetColor('gray@0.5'); +$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth()); +$graph->ygrid->SetColor('gray@0.5'); + +// Setup color for axis and labels on axis +$graph->xaxis->SetColor('orange', 'black'); +$graph->yaxis->SetColor('orange', 'black'); + +// Ticks on the outsid +$graph->xaxis->SetTickSide(SIDE_DOWN); +$graph->yaxis->SetTickSide(SIDE_LEFT); + +// Setup the legend box colors and font +$graph->legend->SetColor('white', 'navy'); +$graph->legend->SetFillColor('navy@0.25'); +$graph->legend->SetFont(FF_ARIAL, FS_BOLD, 8); +$graph->legend->SetShadow('darkgray@0.4', 3); +$graph->legend->SetPos(0.05, 0.05, 'right', 'top'); + +// Create the first line +$p1 = new Plot\LinePlot($datay1); +$p1->SetColor("red"); +$p1->SetWeight(2); +$p1->SetLegend('2002'); +$graph->Add($p1); + +// Create the second line +$p2 = new Plot\LinePlot($datay2); +$p2->SetColor("lightyellow"); +$p2->SetLegend('2001'); +$p2->SetWeight(2); +$graph->Add($p2); + +// Output line +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/heat1.jpg b/vendor/amenadiel/jpgraph/Examples/heat1.jpg new file mode 100644 index 0000000000..07f04d762c Binary files /dev/null and b/vendor/amenadiel/jpgraph/Examples/heat1.jpg differ diff --git a/vendor/amenadiel/jpgraph/Examples/icon.jpg b/vendor/amenadiel/jpgraph/Examples/icon.jpg new file mode 100644 index 0000000000..dc3b30299f Binary files /dev/null and b/vendor/amenadiel/jpgraph/Examples/icon.jpg differ diff --git a/vendor/amenadiel/jpgraph/Examples/index.html b/vendor/amenadiel/jpgraph/Examples/index.html new file mode 100644 index 0000000000..f24859a9fb --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/index.html @@ -0,0 +1,441 @@ +

        Examples Axis

        + +

        Examples Background

        + +

        Examples Bar

        + +

        Examples Barcodes

        + +

        Examples Contour

        + +

        Examples Datamatrix

        + +

        Examples Gantt

        + +

        Examples Led

        + +

        Examples Matrix

        + +

        Examples Odometer

        + +

        Examples PDF

        + +

        Examples Pie

        + +

        Examples Polar

        + +

        Examples QR

        + +

        Examples Radar

        + +

        Examples StaticBand

        + +

        Examples SunSpot

        + +

        Examples Table

        + +

        Examples Themes

        + +

        Examples Tick

        + +

        Examples Windrose

        + \ No newline at end of file diff --git a/vendor/amenadiel/jpgraph/Examples/interpolation-growth-log.php b/vendor/amenadiel/jpgraph/Examples/interpolation-growth-log.php new file mode 100644 index 0000000000..44d1b090d2 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/interpolation-growth-log.php @@ -0,0 +1,39 @@ +SetScale('intlog'); +$graph->SetMargin(50, 50, 20, 30); +$graph->SetFrame(false); +$graph->SetBox(true, 'black', 2); +$graph->SetMarginColor('white'); +$graph->SetColor('lightyellow@0.7'); + +$graph->title->Set('Interpolation growth for size 10x10'); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +$graph->xaxis->SetTitle('Interpolation factor', 'center'); +$graph->xaxis->SetTitleMargin(10); + +$graph->SetAxisStyle(AXSTYLE_YBOXIN); +$graph->xgrid->Show(); + +$lp1 = new Plot\LinePlot($ydata, $xdata); +$lp1->SetColor('darkred'); +$lp1->SetWeight(3); +$graph->Add($lp1); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/interpolation-growth.php b/vendor/amenadiel/jpgraph/Examples/interpolation-growth.php new file mode 100644 index 0000000000..26df978100 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/interpolation-growth.php @@ -0,0 +1,39 @@ +SetScale('intint'); +$graph->SetMargin(50, 50, 20, 30); +$graph->SetFrame(false); +$graph->SetBox(true, 'black', 2); +$graph->SetMarginColor('white'); +$graph->SetColor('lightyellow@0.7'); + +$graph->title->Set('Interpolation growth for size 10x10'); +$graph->title->SetFont(FF_FONT1, FS_BOLD); + +$graph->xaxis->SetTitle('Interpolation factor', 'center'); +$graph->xaxis->SetTitleMargin(10); + +$graph->SetAxisStyle(AXSTYLE_YBOXIN); +$graph->xgrid->Show(); + +$lp1 = new Plot\LinePlot($ydata, $xdata); +$lp1->SetColor('darkred'); +$lp1->SetWeight(3); +$graph->Add($lp1); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/ironrod.jpg b/vendor/amenadiel/jpgraph/Examples/ironrod.jpg new file mode 100644 index 0000000000..0b9e8d4031 Binary files /dev/null and b/vendor/amenadiel/jpgraph/Examples/ironrod.jpg differ diff --git a/vendor/amenadiel/jpgraph/Examples/jpglogo.jpg b/vendor/amenadiel/jpgraph/Examples/jpglogo.jpg new file mode 100644 index 0000000000..a7f71211a3 Binary files /dev/null and b/vendor/amenadiel/jpgraph/Examples/jpglogo.jpg differ diff --git a/vendor/amenadiel/jpgraph/Examples/lightbluedarkblue400x300grad.png b/vendor/amenadiel/jpgraph/Examples/lightbluedarkblue400x300grad.png new file mode 100644 index 0000000000..86092ecfd8 Binary files /dev/null and b/vendor/amenadiel/jpgraph/Examples/lightbluedarkblue400x300grad.png differ diff --git a/vendor/amenadiel/jpgraph/Examples/linlogex1.php b/vendor/amenadiel/jpgraph/Examples/linlogex1.php new file mode 100644 index 0000000000..a47af99b7b --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/linlogex1.php @@ -0,0 +1,62 @@ +SetScale("linlog"); +$graph->img->SetMargin(40, 20, 20, 40); +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->Set("ab/2"); +$graph->yaxis->title->Set("rho_s"); +$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->ygrid->Show(true, true); +$graph->xgrid->Show(true, true); + +$errorplot = new Plot\ErrorPlot($ydata, $xdata); + +$graph->Add($errorplot); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/lista.txt b/vendor/amenadiel/jpgraph/Examples/lista.txt new file mode 100644 index 0000000000..32628ea570 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/lista.txt @@ -0,0 +1,629 @@ +./antispamex01.php +./balloonex1.php +./balloonex2.php +./bezierex1.php +./bkgimgflagex1.php +./bkgimgflagex2.php +./bkgimgflagex3.php +./bkgimgflagex4.php +./bkgimgflagex5.php +./boxstockcsimex1.php +./boxstockex1.php +./boxstockex2.php +./builtinplotmarksex1.php +./canvas_jpgarchex.php +./canvasbezierex1.php +./canvasex01.php +./canvasex02.php +./canvasex03.php +./canvasex04.php +./canvasex05.php +./canvasex06.php +./canvaspiralex1.php +./ccbp_ex1.php +./ccbp_ex2.php +./ccbpgraph.class.php +./centeredlineex01.php +./centeredlineex02.php +./centeredlineex03.php +./centerlinebarex1.php +./checkgd.php +./checkgd2.php +./checkttf.php +./clipping_ex1.php +./clipping_ex2.php +./colormaps.php +./comb90dategraphex01.php +./comb90dategraphex02.php +./comb90dategraphex03.php +./combgraphex1.php +./combgraphex2.php +./csim_in_html_ex1.php +./csim_in_html_ex2.php +./csim_in_html_graph_ex1.php +./csim_in_html_graph_ex2.php +./dataset01.inc.php +./dateaxisex1.php +./dateaxisex2.php +./dateaxisex3.php +./dateaxisex4.php +./datescaleticksex01.php +./dateutilex01.php +./dateutilex02.php +./dupyaxisex1.php +./example0-0.php +./example0.php +./example1.1.php +./example1.2.php +./example1.php +./example10.php +./example11.php +./example13.php +./example14.php +./example15.php +./example16.1.php +./example16.2.php +./example16.3.php +./example16.4.php +./example16.5.php +./example16.6.php +./example16.php +./example17.php +./example18.php +./example19.1.php +./example19.php +./example2.1.php +./example2.5.php +./example2.6.php +./example2.php +./example20.1.php +./example20.2.php +./example20.3.php +./example20.4.php +./example20.5.php +./example20.php +./example21.php +./example22.php +./example23.php +./example24.php +./example25.1.php +./example25.2.php +./example25.php +./example26.1.php +./example26.php +./example27.1.php +./example27.2.php +./example27.3.php +./example27.php +./example28.1.php +./example28.2.php +./example28.3.php +./example28.php +./example3.0.1.php +./example3.0.2.php +./example3.0.3.php +./example3.1.1.php +./example3.1.php +./example3.2.1.php +./example3.2.2.php +./example3.2.php +./example3.3.php +./example3.4.1.php +./example3.4.php +./example3.php +./example4.php +./example5.1.php +./example5.php +./example6.1.php +./example6.2.php +./example6.php +./example7.php +./example8.1.php +./example8.php +./example9.1.php +./example9.2.php +./example9.php +./exampleex9.php +./examples_axis/axislabelbkgex01.php +./examples_axis/axislabelbkgex02.php +./examples_axis/axislabelbkgex03.php +./examples_axis/axislabelbkgex04.php +./examples_axis/axislabelbkgex05.php +./examples_axis/axislabelbkgex06.php +./examples_axis/axislabelbkgex07.php +./examples_background/background_type_ex0.php +./examples_background/background_type_ex1.php +./examples_background/background_type_ex2.php +./examples_background/background_type_ex3.php +./examples_background/background_type_ex4.php +./examples_background/backgroundex01.php +./examples_background/backgroundex02.php +./examples_background/backgroundex03.php +./examples_bar/accbarex1.php +./examples_bar/accbarframeex01.php +./examples_bar/accbarframeex02.php +./examples_bar/accbarframeex03.php +./examples_bar/alphabarex1.php +./examples_bar/bar2scalesex1.php +./examples_bar/bar_csimex1.php +./examples_bar/bar_csimex2.php +./examples_bar/bar_csimex3.php +./examples_bar/barcsim_details.php +./examples_bar/barcsim_popup.php +./examples_bar/barformatcallbackex1.php +./examples_bar/bargradex1.php +./examples_bar/bargradex2.php +./examples_bar/bargradex3.php +./examples_bar/bargradex4.php +./examples_bar/bargradex5.php +./examples_bar/bargradex6.php +./examples_bar/bargradsmallex1.php +./examples_bar/bargradsmallex2.php +./examples_bar/bargradsmallex3.php +./examples_bar/bargradsmallex4.php +./examples_bar/bargradsmallex5.php +./examples_bar/bargradsmallex6.php +./examples_bar/bargradsmallex7.php +./examples_bar/bargradsmallex8.php +./examples_bar/barimgex1.php +./examples_bar/barintex1.php +./examples_bar/barintex2.php +./examples_bar/barline_csimex1.php +./examples_bar/barlinealphaex1.php +./examples_bar/barlinefreq_csimex1.php +./examples_bar/barlinefreqex1.php +./examples_bar/barpatternex1.php +./examples_bar/barscalecallbackex1.php +./examples_bar/bartutex1.php +./examples_bar/bartutex12.php +./examples_bar/bartutex2.php +./examples_bar/bartutex3.php +./examples_bar/bartutex4.php +./examples_bar/bartutex5.php +./examples_bar/bartutex6.php +./examples_barcodes/barcode_errhandling_ex0.php +./examples_barcodes/barcode_ex0.php +./examples_barcodes/barcode_ex1.php +./examples_barcodes/barcode_ex2.php +./examples_barcodes/barcode_ex3.php +./examples_barcodes/barcode_ex4.php +./examples_barcodes/barcode_usps_example.php +./examples_contour/basic_contourex01.php +./examples_contour/basic_contourex02.php +./examples_contour/basic_contourex03-1.php +./examples_contour/basic_contourex03-2.php +./examples_contour/basic_contourex03-3.php +./examples_contour/basic_contourex04.php +./examples_contour/basic_contourex05.php +./examples_contour/contour2_ex1.php +./examples_contour/contour2_ex2.php +./examples_contour/contour2_ex3.php +./examples_contour/contour2_ex4.php +./examples_contour/contour2_ex5.php +./examples_contour/contour2_ex6.php +./examples_contour/contour2_ex7.php +./examples_contour/contourex01.php +./examples_contour/contourex02.php +./examples_contour/contourex03.php +./examples_contour/contourex04.php +./examples_contour/contourex05.php +./examples_datamatrix/datamatrix_ex0.php +./examples_datamatrix/datamatrix_ex00.php +./examples_datamatrix/datamatrix_ex1.php +./examples_datamatrix/datamatrix_ex2.php +./examples_datamatrix/datamatrix_ex3.php +./examples_datamatrix/datamatrix_ex4.php +./examples_datamatrix/datamatrix_ex5.php +./examples_datamatrix/datamatrix_ex6.php +./examples_datamatrix/datamatrix_ex7.php +./examples_gantt/gantt_samerowex1.php +./examples_gantt/gantt_samerowex2.php +./examples_gantt/gantt_textex1.php +./examples_gantt/ganttcolumnfontsex01.php +./examples_gantt/ganttconstrainex0.php +./examples_gantt/ganttconstrainex1.php +./examples_gantt/ganttconstrainex2.php +./examples_gantt/ganttcsimex01.php +./examples_gantt/ganttcsimex02.php +./examples_gantt/ganttex00.php +./examples_gantt/ganttex01.php +./examples_gantt/ganttex02.php +./examples_gantt/ganttex03.php +./examples_gantt/ganttex04.php +./examples_gantt/ganttex05.php +./examples_gantt/ganttex06.php +./examples_gantt/ganttex07.php +./examples_gantt/ganttex08.php +./examples_gantt/ganttex09.php +./examples_gantt/ganttex10.php +./examples_gantt/ganttex11.php +./examples_gantt/ganttex12.php +./examples_gantt/ganttex13-zoom1.php +./examples_gantt/ganttex13-zoom2.php +./examples_gantt/ganttex13.php +./examples_gantt/ganttex14.php +./examples_gantt/ganttex15.php +./examples_gantt/ganttex16.php +./examples_gantt/ganttex17-flag.php +./examples_gantt/ganttex17.php +./examples_gantt/ganttex18.php +./examples_gantt/ganttex19.php +./examples_gantt/ganttex30.php +./examples_gantt/ganttex_slice.php +./examples_gantt/gantthgridex1.php +./examples_gantt/gantthourex1.php +./examples_gantt/gantthourminex1.php +./examples_gantt/gantticonex1.php +./examples_gantt/ganttmonthyearex1.php +./examples_gantt/ganttmonthyearex2.php +./examples_gantt/ganttmonthyearex3.php +./examples_gantt/ganttmonthyearex4.php +./examples_gantt/ganttsimpleex1.php +./examples_led/ledex1.php +./examples_led/ledex10.php +./examples_led/ledex11.php +./examples_led/ledex12.php +./examples_led/ledex13.php +./examples_led/ledex14.php +./examples_led/ledex15.php +./examples_led/ledex16.php +./examples_led/ledex17.php +./examples_led/ledex2.php +./examples_led/ledex3.php +./examples_led/ledex4.1.php +./examples_led/ledex4.2.php +./examples_led/ledex4.php +./examples_led/ledex5.php +./examples_led/ledex6.php +./examples_led/ledex7.php +./examples_led/ledex8.php +./examples_led/ledex9.php +./examples_led/ledex_cyrillic.php +./examples_led/ledex_cyrillic2.php +./examples_matrix/matrix_csimex01.php +./examples_matrix/matrix_edgeex01.php +./examples_matrix/matrix_edgeex02.php +./examples_matrix/matrix_ex0.php +./examples_matrix/matrix_ex01.php +./examples_matrix/matrix_ex02.php +./examples_matrix/matrix_ex03.php +./examples_matrix/matrix_ex04.1.php +./examples_matrix/matrix_ex04.2.php +./examples_matrix/matrix_ex04.php +./examples_matrix/matrix_ex05.php +./examples_matrix/matrix_ex06.php +./examples_matrix/matrix_introex.php +./examples_matrix/matrix_layout_ex1.php +./examples_matrix/matrixex00.php +./examples_odometer/odoex00.php +./examples_odometer/odoex01.php +./examples_odometer/odoex010.php +./examples_odometer/odoex011.php +./examples_odometer/odoex012.php +./examples_odometer/odoex02.php +./examples_odometer/odoex03.php +./examples_odometer/odoex04.php +./examples_odometer/odoex05.php +./examples_odometer/odoex06.php +./examples_odometer/odoex07.php +./examples_odometer/odoex08.php +./examples_odometer/odoex09.php +./examples_odometer/odotutex00.php +./examples_odometer/odotutex01.php +./examples_odometer/odotutex02.php +./examples_odometer/odotutex03.php +./examples_odometer/odotutex04.php +./examples_odometer/odotutex06.php +./examples_odometer/odotutex07.php +./examples_odometer/odotutex08.1.php +./examples_odometer/odotutex08.php +./examples_odometer/odotutex09.php +./examples_odometer/odotutex10.php +./examples_odometer/odotutex11.php +./examples_odometer/odotutex12.php +./examples_odometer/odotutex13.php +./examples_odometer/odotutex14.php +./examples_odometer/odotutex15.php +./examples_odometer/odotutex16.1.php +./examples_odometer/odotutex16.php +./examples_odometer/odotutex17.php +./examples_odometer/odotutex18.php +./examples_odometer/odotutex19.php +./examples_pdf/pdf417_ex0.php +./examples_pdf/pdf417_ex1.php +./examples_pdf/pdf417_ex1b.php +./examples_pdf/pdf417_ex1c.php +./examples_pdf/pdf417_ex2.php +./examples_pdf/pdf417_ex3.php +./examples_pdf/pdf417_ex4.php +./examples_pdf/pdf417_ex5.php +./examples_pdf/pdf417_ex6.php +./examples_pie/pie3d_csimex1.php +./examples_pie/pie3dex1.php +./examples_pie/pie3dex2.php +./examples_pie/pie3dex3.php +./examples_pie/pie3dex4.php +./examples_pie/pie3dex5.php +./examples_pie/pie_csimex1.php +./examples_pie/piebkgex1.php +./examples_pie/piec_csimex1.php +./examples_pie/piecex1.php +./examples_pie/piecex2.php +./examples_pie/pieex1.php +./examples_pie/pieex2.php +./examples_pie/pieex3.php +./examples_pie/pieex4.php +./examples_pie/pieex5.php +./examples_pie/pieex6.php +./examples_pie/pieex7.php +./examples_pie/pieex8.php +./examples_pie/pieex9.php +./examples_pie/pielabelsex1.php +./examples_pie/pielabelsex2.php +./examples_pie/pielabelsex3.php +./examples_pie/pielabelsex4.php +./examples_pie/pielabelsex5.php +./examples_polar/polar_csimex1.php +./examples_polar/polarclockex1.php +./examples_polar/polarclockex2.php +./examples_polar/polarex0-180.php +./examples_polar/polarex0.php +./examples_polar/polarex1.php +./examples_polar/polarex10.php +./examples_polar/polarex2.php +./examples_polar/polarex3-lin.php +./examples_polar/polarex3.php +./examples_polar/polarex4.php +./examples_polar/polarex5.php +./examples_polar/polarex6.php +./examples_polar/polarex7-1.php +./examples_polar/polarex7-2.php +./examples_polar/polarex7.php +./examples_polar/polarex8.php +./examples_polar/polarex9.php +./examples_qr/qr_template.php +./examples_qr/qrexample0.php +./examples_qr/qrexample00.php +./examples_qr/qrexample01.php +./examples_qr/qrexample02.php +./examples_qr/qrexample03.php +./examples_qr/qrexample04.php +./examples_qr/qrexample05.php +./examples_qr/qrexample06.php +./examples_qr/qrexample07.php +./examples_qr/qrexample08.php +./examples_qr/qrexample09.php +./examples_qr/qrexample10.php +./examples_qr/qrexample11.php +./examples_qr/qrexample12.php +./examples_radar/radar_csimex1.php +./examples_radar/radarex1.php +./examples_radar/radarex2.php +./examples_radar/radarex3.php +./examples_radar/radarex4.php +./examples_radar/radarex5.php +./examples_radar/radarex6.1.php +./examples_radar/radarex6.php +./examples_radar/radarex7.php +./examples_radar/radarex8.1.php +./examples_radar/radarex8.php +./examples_radar/radarex9.php +./examples_radar/radarlogex1-aa.php +./examples_radar/radarlogex1.php +./examples_radar/radarlogex2.php +./examples_radar/radarmarkex1.php +./examples_staticband/smallstaticbandsex1.php +./examples_staticband/smallstaticbandsex10.php +./examples_staticband/smallstaticbandsex11.php +./examples_staticband/smallstaticbandsex2.php +./examples_staticband/smallstaticbandsex3.php +./examples_staticband/smallstaticbandsex4.php +./examples_staticband/smallstaticbandsex5.php +./examples_staticband/smallstaticbandsex6.php +./examples_staticband/smallstaticbandsex7.php +./examples_staticband/smallstaticbandsex8.php +./examples_staticband/smallstaticbandsex9.php +./examples_staticband/staticbandbarex1.php +./examples_staticband/staticbandbarex2.php +./examples_staticband/staticbandbarex3.php +./examples_staticband/staticbandbarex4.php +./examples_staticband/staticbandbarex5.php +./examples_staticband/staticbandbarex6.php +./examples_staticband/staticbandbarex7.php +./examples_sunspot/sunspotsex1.php +./examples_sunspot/sunspotsex2.php +./examples_sunspot/sunspotsex3.php +./examples_sunspot/sunspotsex4.php +./examples_sunspot/sunspotsex5.php +./examples_sunspot/sunspotsex6.php +./examples_sunspot/sunspotsex7.php +./examples_tables/table_flagex1.php +./examples_tables/table_howto1.php +./examples_tables/table_howto2.php +./examples_tables/table_howto3.php +./examples_tables/table_howto4.php +./examples_tables/table_howto5.php +./examples_tables/table_howto6.php +./examples_tables/table_howto7.1.php +./examples_tables/table_howto7.2.php +./examples_tables/table_howto7.php +./examples_tables/table_howto8.php +./examples_tables/table_howto9.php +./examples_tables/table_mex0.php +./examples_tables/table_mex00.php +./examples_tables/table_mex1.php +./examples_tables/table_mex2.php +./examples_tables/table_mex3.php +./examples_tables/table_vtext.php +./examples_tables/table_vtext_ex1.php +./examples_tables/tablebarex1.php +./examples_tables/tablebarex1_csim.php +./examples_tables/tableex00.php +./examples_tables/tableex01.php +./examples_tables/tableex01_csim.php +./examples_tables/tableex02.php +./examples_tables/tableex03.php +./examples_tables/tableex04.php +./examples_tables/tableex05.php +./examples_theme/aqua_example.php +./examples_theme/fusion_example.php +./examples_theme/green_example.php +./examples_theme/ocean_example.php +./examples_theme/orange_example.php +./examples_theme/pastel_example.php +./examples_theme/rose_example.php +./examples_theme/softy_example.php +./examples_theme/theme_example.php +./examples_theme/universal_example.php +./examples_theme/vivid_example.php +./examples_tick/manualtickex1.php +./examples_tick/manualtickex1a.php +./examples_tick/manualtickex2.php +./examples_tick/manualtickex3.php +./examples_tick/manualtickex4.php +./examples_windrose/windrose_2plots_ex1.php +./examples_windrose/windrose_bgimg_ex1.php +./examples_windrose/windrose_ex0.php +./examples_windrose/windrose_ex1.php +./examples_windrose/windrose_ex1b.php +./examples_windrose/windrose_ex2.1.php +./examples_windrose/windrose_ex2.php +./examples_windrose/windrose_ex3.php +./examples_windrose/windrose_ex4.php +./examples_windrose/windrose_ex5.php +./examples_windrose/windrose_ex6.1.php +./examples_windrose/windrose_ex6.php +./examples_windrose/windrose_ex7.1.php +./examples_windrose/windrose_ex7.php +./examples_windrose/windrose_ex8.1.php +./examples_windrose/windrose_ex8.php +./examples_windrose/windrose_ex9.1.php +./examples_windrose/windrose_ex9.php +./examples_windrose/windrose_icon_ex1.php +./examples_windrose/windrose_layout_ex0.php +./examples_windrose/windrose_layout_ex1.php +./fieldscatterex1.php +./filledgridex1.php +./filledline01.php +./filledlineex01.1.php +./filledlineex01.php +./filledlineex02.php +./filledlineex03.php +./filledstepstyleex1.php +./fixscale_radarex1.php +./footerex1.php +./funcex1.php +./funcex2.php +./funcex3.php +./funcex4.php +./grace_ex0.php +./grace_ex1.php +./grace_ex2.php +./grace_ex3.php +./gradbkgex1.php +./gradlinefillex1.php +./gradlinefillex2.php +./gradlinefillex3.php +./gradlinefillex4.php +./groupbarex1.php +./horizbarex1.php +./horizbarex2.php +./horizbarex3.php +./horizbarex4.php +./horizbarex6.php +./imgmarkercsimex1.php +./imgmarkerex1.php +./impulsex1.php +./impulsex2.php +./impulsex3.php +./impulsex4.php +./interpolation-growth-log.php +./interpolation-growth.php +./inyaxisex1.php +./inyaxisex2.php +./inyaxisex3.php +./linebarcentex1.php +./linebarex1.php +./linebarex2.php +./linebarex3.php +./linegraceex.php +./lineiconex1.php +./lineiconex2.php +./lineimagefillex1.php +./linlogex1.php +./listallflags.php +./listallflags_helper.php +./listfontsex1.php +./logbarex1.php +./loglogex1.php +./manscaleex1.php +./manscaleex2.php +./manscaleex3.php +./manscaleex4.php +./manual_textscale_ex1.php +./manual_textscale_ex2.php +./manual_textscale_ex3.php +./manual_textscale_ex4.php +./markflagex1.php +./mkgrad.php +./multconstganttex01.php +./mulyaxiscsimex1.php +./mulyaxisex1.php +./negbarvalueex01.php +./new_bar1.php +./new_bar3.php +./new_bar4.php +./new_bar6.php +./new_line1.php +./new_line2.php +./new_line3.php +./new_line4.php +./new_line5.php +./new_pie1.php +./new_pie2.php +./new_pie3.php +./new_pie4.php +./new_step1.php +./nullvalueex01.php +./partiallyfilledlineex1.php +./plotbanddensity_ex0.php +./plotbanddensity_ex1.php +./plotbanddensity_ex2.php +./plotlineex1.php +./prepaccdata_example.php +./pushpinex1.php +./pushpinex2.php +./rotateex1.php +./rotex0.php +./rotex1.php +./rotex2.php +./rotex3.php +./rotex4.php +./rotex5.php +./scatter_csimex1.php +./scatterex1.php +./scatterex2.php +./scatterlinkex1.php +./scatterlinkex2.php +./scatterlinkex3.php +./scatterlinkex4.php +./scatterrotex1.php +./show-example.php +./show-image.php +./show-source.php +./splineex1.php +./staticlinebarex1.php +./stockex1.php +./stockex2.php +./tabtitleex1.php +./testsuit.php +./text-example1.php +./text-example2.php +./textalignex1.php +./textpalignex1.php +./timestampex01.php +./titlecsimex01.php +./titleex1.php +./topxaxisex1.php +./y2synch.php +./y2synch2.php diff --git a/vendor/amenadiel/jpgraph/Examples/listallflags.php b/vendor/amenadiel/jpgraph/Examples/listallflags.php new file mode 100644 index 0000000000..0f7a7966a0 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/listallflags.php @@ -0,0 +1,29 @@ +\n"; +$cols=0; +while( list($key,$val) = each($flags->iCountryNameMap) ) { + + echo '
        '; + echo "$key
        idx=$val\n"; + + if( ++$cols == 5 ) { + echo "\n"; + $cols=0; + } +} + +echo ""; + +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/listallflags_helper.php b/vendor/amenadiel/jpgraph/Examples/listallflags_helper.php new file mode 100644 index 0000000000..52ad9f9b1b --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/listallflags_helper.php @@ -0,0 +1,25 @@ +GetImgByIdx($idx); +header ("Content-type: image/png"); +ImagePng ($img); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/listfontsex1.php b/vendor/amenadiel/jpgraph/Examples/listfontsex1.php new file mode 100644 index 0000000000..15ee50d141 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/listfontsex1.php @@ -0,0 +1,154 @@ +Set(0,27,0,85); +$g->SetMargin(5,6,5,6); +$g->SetColor('white'); +$g->SetMarginColor("teal"); +$g->InitFrame(); + + +$t = new CanvasRectangleText(); +$t->SetFont(FF_ARIAL,FS_NORMAL,16); +$t->SetFillColor('lemonchiffon2'); +$t->SetFontColor('black'); +$t->Set("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nTTF Fonts (11pt)",0.5,19.5,26,64.5); +$t->Stroke($g->img,$scale); + +$t->SetFillColor('lemonchiffon3'); +$t->Set("\n\n\n\nBitmap Fonts",0.5,5,26,13.5); +$t->Stroke($g->img,$scale); + + +$t = new CanvasRectangleText(); +$t->SetFillColor(''); +$t->SetFontColor('black'); +$t->SetColor(''); +$t->SetShadow(''); + +$t->SetFont(FF_ARIAL,FS_BOLD,18); +$t->Set('Normal',1,1,8); +$t->Stroke($g->img,$scale); + +$t->Set('Italic style',9,1,8); +$t->Stroke($g->img,$scale); + +$t->Set('Bold style',17.5,1,8); +$t->Stroke($g->img,$scale); + + +$t->SetFillColor('yellow'); +$t->SetFontColor('black'); +$t->SetColor('black'); +$t->SetShadow('gray'); + +$r=6;$c=1;$w=7.5;$h=3.5; + +$fonts=array( + array("Font 0",FF_FONT0,FS_NORMAL), + array("",FF_FONT0,FS_ITALIC), + array("",FF_FONT0,FS_BOLD), + + array("Font 1",FF_FONT1,FS_NORMAL), + array("",FF_FONT1,FS_ITALIC), + array("Font 1 bold",FF_FONT1,FS_BOLD), + + array("Font 2",FF_FONT2,FS_NORMAL), + array("",FF_FONT2,FS_ITALIC), + array("Font 2 bold",FF_FONT2,FS_BOLD), + + array("Arial",FF_ARIAL,FS_NORMAL), + array("Arial italic",FF_ARIAL,FS_ITALIC), + array("Arial bold",FF_ARIAL,FS_BOLD), + + array("Verdana",FF_VERDANA,FS_NORMAL), + array("Verdana italic",FF_VERDANA,FS_ITALIC), + array("Verdana bold",FF_VERDANA,FS_BOLD), + + + array("Trebuche",FF_TREBUCHE,FS_NORMAL), + array("Trebuche italic",FF_TREBUCHE,FS_ITALIC), + array("Trebuche bold",FF_TREBUCHE,FS_BOLD), + + array("Georgia",FF_GEORGIA,FS_NORMAL), + array("Georgia italic",FF_GEORGIA,FS_ITALIC), + array("Georgia bold",FF_GEORGIA,FS_BOLD), + + array("Comic",FF_COMIC,FS_NORMAL), + array("",FF_COMIC,FS_ITALIC), + array("Comic bold",FF_COMIC,FS_BOLD), + + array("Courier",FF_COURIER,FS_NORMAL), + array("Courier italic",FF_COURIER,FS_ITALIC), + array("Courier bold",FF_COURIER,FS_BOLD), + + array("Times normal",FF_TIMES,FS_NORMAL), + array("Times italic",FF_TIMES,FS_ITALIC), + array("Times bold",FF_TIMES,FS_BOLD), + + array("Vera normal",FF_VERA,FS_NORMAL), + array("Vera italic",FF_VERA,FS_ITALIC), + array("Vera bold",FF_VERA,FS_BOLD), + + array("Vera mono normal",FF_VERAMONO,FS_NORMAL), + array("Vera mono italic",FF_VERAMONO,FS_ITALIC), + array("Vera mono bold",FF_VERAMONO,FS_BOLD), + + array("Vera serif normal",FF_VERASERIF,FS_NORMAL), + array("",FF_VERASERIF,FS_ITALIC), + array("Vera serif bold",FF_VERASERIF,FS_BOLD), + + array("DejaVu sans serif",FF_DV_SANSSERIF,FS_NORMAL), + array("DejaVu sans serif",FF_DV_SANSSERIF,FS_ITALIC), + array("DejaVu sans serif",FF_DV_SANSSERIF,FS_BOLD), + + array("DejaVu serif",FF_DV_SERIF,FS_NORMAL), + array("DejaVu serif",FF_DV_SERIF,FS_ITALIC), + array("DejaVu serif",FF_DV_SERIF,FS_BOLD), + + array("DejaVuMono sans serif",FF_DV_SANSSERIFMONO,FS_NORMAL), + array("DejaVuMono sans serif",FF_DV_SANSSERIFMONO,FS_ITALIC), + array("DejaVuMono sans serif",FF_DV_SANSSERIFMONO,FS_BOLD), + + array("DejaVuCond serif",FF_DV_SERIFCOND,FS_NORMAL), + array("DejaVuCond serif",FF_DV_SERIFCOND,FS_ITALIC), + array("DejaVuCond serif",FF_DV_SERIFCOND,FS_BOLD), + + array("DejaVuCond sans serif",FF_DV_SANSSERIFCOND,FS_NORMAL), + array("DejaVuCond sans serif",FF_DV_SANSSERIFCOND,FS_ITALIC), + array("DejaVuCond sans serif",FF_DV_SANSSERIFCOND,FS_BOLD), + + ); + + +$n=count($fonts); + +for( $i=0; $i < $n; ++$i ) { + + if( $i==9 ) $r += 3; + + if( $fonts[$i][0] ) { + $t->SetTxt($fonts[$i][0]); + $t->SetPos($c,$r,$w,$h); + $t->SetFont($fonts[$i][1],$fonts[$i][2],11); + $t->Stroke($g->img,$scale); + } + + $c += $w+1; + if( $c > 30-$w-2 ) { + $c = 1; + $r += 4; + } + +} + +$g->Stroke(); +?> + diff --git a/vendor/amenadiel/jpgraph/Examples/multconstganttex01.php b/vendor/amenadiel/jpgraph/Examples/multconstganttex01.php new file mode 100644 index 0000000000..fce986e25b --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/multconstganttex01.php @@ -0,0 +1,30 @@ +title->Set("Example with multiple constrains"); + +$bar1 = new GanttBar(0, "Label 1", "2003-06-08", "2003-06-12"); +$bar2 = new GanttBar(1, "Label 2", "2003-06-16", "2003-06-19"); +$bar3 = new GanttBar(2, "Label 3", "2003-06-15", "2003-06-21"); + +//create constraints +$bar1->SetConstrain(1, CONSTRAIN_ENDSTART); +$bar1->SetConstrain(2, CONSTRAIN_ENDSTART); + +// Setup scale +$graph->ShowHeaders(/*GANTT_HYEAR | GANTT_HMONTH |*/ GANTT_HDAY | GANTT_HWEEK); +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAYWNBR); + +// Add the specified activities +$graph->Add($bar1); +$graph->Add($bar2); +$graph->Add($bar3); + +// .. and stroke the graph +$graph->Stroke(); + +?> diff --git a/vendor/amenadiel/jpgraph/Examples/new1.gif b/vendor/amenadiel/jpgraph/Examples/new1.gif new file mode 100644 index 0000000000..7c8a29626f Binary files /dev/null and b/vendor/amenadiel/jpgraph/Examples/new1.gif differ diff --git a/vendor/amenadiel/jpgraph/Examples/new2.gif b/vendor/amenadiel/jpgraph/Examples/new2.gif new file mode 100644 index 0000000000..b9620d7404 Binary files /dev/null and b/vendor/amenadiel/jpgraph/Examples/new2.gif differ diff --git a/vendor/amenadiel/jpgraph/Examples/new_step1.php b/vendor/amenadiel/jpgraph/Examples/new_step1.php new file mode 100644 index 0000000000..31e30ede8e --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/new_step1.php @@ -0,0 +1,32 @@ +SetScale("intlin", 0, $aYMax = 50); +$theme_class = new UniversalTheme; +$graph->SetTheme($theme_class); + +$graph->SetBox(false); + +$graph->title->Set('Step Line'); +$graph->ygrid->Show(true); +$graph->xgrid->Show(false); +$graph->yaxis->HideZeroLabel(); +$graph->ygrid->SetFill(true, '#FFFFFF@0.5', '#FFFFFF@0.5'); +$graph->SetBackgroundGradient('blue', '#55eeff', GRAD_HOR, BGRAD_PLOT); +$graph->xaxis->SetTickLabels(array('A', 'B', 'C', 'D', 'E', 'F', 'G')); + +// Create the line +$p1 = new Plot\LinePlot($datay); +$graph->Add($p1); + +$p1->SetFillGradient('yellow', 'red'); +$p1->SetStepStyle(); +$p1->SetColor('#808000'); + +// Output line +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/nullvalueex01.php b/vendor/amenadiel/jpgraph/Examples/nullvalueex01.php new file mode 100644 index 0000000000..8ab3e63013 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/nullvalueex01.php @@ -0,0 +1,52 @@ +img->SetMargin(40, 150, 40, 80); +$graph->SetScale("textlin"); +$graph->SetShadow(); + +//Setup title +$graph->title->Set("Line plot with null values"); + +// Use built in font +$graph->title->SetFont(FF_ARIAL, FS_NORMAL, 14); + +// Slightly adjust the legend from it's default position +$graph->legend->Pos(0.03, 0.5, "right", "center"); +$graph->legend->SetFont(FF_FONT1, FS_BOLD); + +// Setup X-scale +$graph->xaxis->SetTickLabels($datax); +$graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 8); +$graph->xaxis->SetLabelAngle(45); + +// Create the first line +$p1 = new Plot\LinePlot($datay); +$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetFillColor("red"); +$p1->mark->SetWidth(4); +$p1->SetColor("blue"); +$p1->SetCenter(); +$p1->SetLegend("Undefined\nvariant 1"); +$graph->Add($p1); + +// ... and the second +$p2 = new Plot\LinePlot($data2y); +$p2->mark->SetType(MARK_STAR); +$p2->mark->SetFillColor("red"); +$p2->mark->SetWidth(4); +$p2->SetColor("red"); +$p2->SetCenter(); +$p2->SetLegend("Undefined\nvariant 2"); +$graph->Add($p2); + +// Output line +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/penguin.png b/vendor/amenadiel/jpgraph/Examples/penguin.png new file mode 100644 index 0000000000..2ae426ae3c Binary files /dev/null and b/vendor/amenadiel/jpgraph/Examples/penguin.png differ diff --git a/vendor/amenadiel/jpgraph/Examples/prepaccdata_example.php b/vendor/amenadiel/jpgraph/Examples/prepaccdata_example.php new file mode 100644 index 0000000000..68e4a2a819 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/prepaccdata_example.php @@ -0,0 +1,61 @@ +title->Set('Accumulated values with specified X-axis scale'); +$graph->SetScale('textlin'); + +// Setup margin color +$graph->SetMarginColor('green@0.95'); + +// Adjust the margin to make room for the X-labels +$graph->SetMargin(40, 30, 40, 120); + +// Turn the tick marks out from the plot area +$graph->xaxis->SetTickSide(SIDE_BOTTOM); +$graph->yaxis->SetTickSide(SIDE_LEFT); + +$p0 = new Plot\LinePlot($ydata[0]); +$p0->SetFillColor('sandybrown'); +$p1 = new Plot\LinePlot($ydata[1]); +$p1->SetFillColor('lightblue'); +$p2 = new Plot\LinePlot($ydata[2]); +$p2->SetFillColor('red'); +$ap = new AccLinePlot(array($p0, $p1, $p2)); + +$graph->xaxis->SetTickLabels($xdata); +$graph->xaxis->SetTextLabelInterval(4); + +// Add the plot to the graph +$graph->Add($ap); + +// Set the angle for the labels to 90 degrees +$graph->xaxis->SetLabelAngle(90); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/rose.gif b/vendor/amenadiel/jpgraph/Examples/rose.gif new file mode 100644 index 0000000000..59fe631985 Binary files /dev/null and b/vendor/amenadiel/jpgraph/Examples/rose.gif differ diff --git a/vendor/amenadiel/jpgraph/Examples/saab_95.jpg b/vendor/amenadiel/jpgraph/Examples/saab_95.jpg new file mode 100644 index 0000000000..189b0d48f8 Binary files /dev/null and b/vendor/amenadiel/jpgraph/Examples/saab_95.jpg differ diff --git a/vendor/amenadiel/jpgraph/Examples/show-example.php b/vendor/amenadiel/jpgraph/Examples/show-example.php new file mode 100644 index 0000000000..b95ac274aa --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/show-example.php @@ -0,0 +1,24 @@ + + + + + Test suite for JpGraph - <?php echo $target; ?> + + + + "; + else + echo ""; + ?> + + + diff --git a/vendor/amenadiel/jpgraph/Examples/show-image.php b/vendor/amenadiel/jpgraph/Examples/show-image.php new file mode 100644 index 0000000000..85a987cd25 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/show-image.php @@ -0,0 +1,10 @@ + + + + + Image <?php echo basename($target); ?> + + +<?php echo basename($target); ?> + + diff --git a/vendor/amenadiel/jpgraph/Examples/show-source.php b/vendor/amenadiel/jpgraph/Examples/show-source.php new file mode 100644 index 0000000000..248f2dee69 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/show-source.php @@ -0,0 +1 @@ + diff --git a/vendor/amenadiel/jpgraph/Examples/stship.jpg b/vendor/amenadiel/jpgraph/Examples/stship.jpg new file mode 100644 index 0000000000..7f3bae62d7 Binary files /dev/null and b/vendor/amenadiel/jpgraph/Examples/stship.jpg differ diff --git a/vendor/amenadiel/jpgraph/Examples/sunflower.gif b/vendor/amenadiel/jpgraph/Examples/sunflower.gif new file mode 100644 index 0000000000..b83709f848 Binary files /dev/null and b/vendor/amenadiel/jpgraph/Examples/sunflower.gif differ diff --git a/vendor/amenadiel/jpgraph/Examples/tabtitleex1.php b/vendor/amenadiel/jpgraph/Examples/tabtitleex1.php new file mode 100644 index 0000000000..faeb2f580a --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/tabtitleex1.php @@ -0,0 +1,46 @@ +SetMarginColor('white'); +$graph->SetScale("textlin"); +$graph->SetFrame(false); +$graph->SetMargin(30, 50, 30, 30); + +$graph->tabtitle->Set(' Year 2003 '); +$graph->tabtitle->SetFont(FF_ARIAL, FS_BOLD, 13); + +$graph->yaxis->HideZeroLabel(); +$graph->ygrid->SetFill(true, '#EFEFEF@0.5', '#BBCCFF@0.5'); +$graph->xgrid->Show(); + +$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth()); + +// Create the first line +$p1 = new Plot\LinePlot($datay1); +$p1->SetColor("navy"); +$p1->SetLegend('Line 1'); +$graph->Add($p1); + +// Create the second line +$p2 = new Plot\LinePlot($datay2); +$p2->SetColor("red"); +$p2->SetLegend('Line 2'); +$graph->Add($p2); + +// Create the third line +$p3 = new Plot\LinePlot($datay3); +$p3->SetColor("orange"); +$p3->SetLegend('Line 3'); +$graph->Add($p3); + +$graph->legend->SetShadow('gray@0.4', 5); +$graph->legend->SetPos(0.1, 0.1, 'right', 'top'); +// Output line +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/testsuit.php b/vendor/amenadiel/jpgraph/Examples/testsuit.php new file mode 100644 index 0000000000..623e8cc089 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/testsuit.php @@ -0,0 +1,115 @@ +iType = $aType; + if ($aDir == '') { + $aDir = getcwd(); + } + if (!chdir($aDir)) { + die("PANIC: Can't access directory : $aDir"); + } + $this->iDir = $aDir; + } + + public function GetFiles() + { + $d = @dir($this->iDir); + $a = array(); + while ($entry = $d->Read()) { + //echo $entry . ':' . (is_dir($entry) ? 'folder' : 'file') . '
        '; + if (is_dir($entry) && ($entry == "examples_pie")) { + $examplefolder = @dir($entry); + while ($file = $examplefolder->Read()) { + if (strstr($file, ".php") && strstr($file, "x") && !strstr($file, "show") && !strstr($file, "csim")) { + $a[] = $entry . '/' . $file; + } + } + } + + } + $d->Close(); + if (count($a) == 0) { + die("PANIC: Apache/PHP does not have enough permission to read the scripts in directory: $this->iDir"); + } + sort($a); + return $a; + } + + public function GetCSIMFiles() + { + $d = @dir($this->iDir); + $a = array(); + while ($entry = $d->Read()) { + if (strstr($entry, ".php") && strstr($entry, "csim")) { + $a[] = $entry; + } + } + $d->Close(); + if (count($a) == 0) { + die("PANIC: Apache/PHP does not have enough permission to read the CSIM scripts in directory: $this->iDir"); + } + sort($a); + return $a; + } + + public function Run() + { + switch ($this->iType) { + case 1: + $files = $this->GetFiles(); + break; + case 2: + $files = $this->GetCSIMFiles(); + break; + default: + die('Panic: Unknown type of test'); + break; + } + $n = count($files); + echo "

        Visual test suit for JpGraph

        "; + echo "Testtype: " . ($this->iType == 1 ? ' Standard images ' : ' Image map tests '); + echo "
        Number of tests: $n

        "; + echo "

          "; + + for ($i = 0; $i < $n; ++$i) { + if ($this->iType == 1) { + echo '

        1. Filename: ' . basename($files[$i]) . "\n"; + } else { + echo '
        2. ' . $files[$i] . "\n"; + } + } + echo "
        "; + + echo "

        Done.

        "; + } +} + +$type = @$_GET['type']; +if (empty($type)) { + $type = 1; +} + +$driver = new TestDriver($type); +$driver->Run(); diff --git a/vendor/amenadiel/jpgraph/Examples/testsuitversus.php b/vendor/amenadiel/jpgraph/Examples/testsuitversus.php new file mode 100644 index 0000000000..5850663c90 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/testsuitversus.php @@ -0,0 +1,174 @@ +iType = $aType; + + $basePath = getcwd(); + + if (!chdir($basePath)) { + die("PANIC: Can't access directory : $aDir"); + } + $this->iDir = $basePath; + $this->subFolders = $subFolders; + } + + public function GetFiles() + { + $d = @dir($this->iDir); + $a = array(); + while ($entry = $d->Read()) { + if (strstr($entry, ".php") && strstr($entry, "x") && !strstr($entry, "show") && !strstr($entry, "csim")) { + $a[] = $entry; + } + } + $d->Close(); + if (count($a) == 0) { + die("PANIC: Apache/PHP does not have enough permission to read the scripts in directory: $this->iDir"); + } + sort($a); + return $a; + } + + public function GetFilespath($path) + { + $d = @dir($this->iDir); + $a = array(); + + while ($entry = $d->Read()) { + if (is_dir($entry) && $entry == $path) { + $examplefolder = @dir($entry); + while ($file = $examplefolder->Read()) { + if (strstr($file, ".php") && strstr($file, "x") && !strstr($file, "show") && !strstr($file, "csim")) { + $a[] = $entry . '/' . $file; + } + } + } + + } + $d->Close(); + if (count($a) == 0) { + die("PANIC: Apache/PHP does not have enough permission to read the scripts in directory: $this->iDir"); + } + sort($a); + return $a; + } + + public function GetCSIMFiles() + { + $d = @dir($this->iDir); + $a = array(); + while ($entry = $d->Read()) { + if (strstr($entry, ".php") && strstr($entry, "csim")) { + $a[] = $entry; + } + } + $d->Close(); + if (count($a) == 0) { + die("PANIC: Apache/PHP does not have enough permission to read the CSIM scripts in directory: $this->iDir"); + } + sort($a); + return $a; + } + + public function Run() + { + switch ($this->iType) { + case 1: + $files = $this->GetFilespath($this->subFolders[0]); + $files2 = $this->GetFilespath($this->subFolders[1]); + break; + case 2: + $files = $this->GetCSIMFiles(); + break; + default: + die('Panic: Unknown type of test'); + break; + } + + $n = count($files); + echo "

        Visual test suit for JpGraph

        "; + echo "Testtype: " . ($this->iType == 1 ? ' Standard images ' : ' Image map tests '); + echo "
        Number of tests: $n

        "; + echo "

          "; + + foreach ($files as $i => $file) { + if ($this->iType == 1) { + echo '
        1. '; + + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + + echo ''; + echo ''; + echo ''; + echo ''; + echo '
          '; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo '
          '; + echo 'Filename: ' . basename($files[$i]) . ""; + echo ''; + echo 'Filename: ' . basename($files2[$i]) . ""; + echo '
          '; + + echo "\n"; + + } else { + echo '
        2. ' . $files[$i] . "\n"; + } + } + echo "
        "; + + echo "

        Done.

        "; + } +} + +$type = @$_GET['type']; +if (empty($type)) { + $type = 1; +} + +echo '
        '; + +$driver = new TestDriver($type, ['examples_pie', 'examples_pie_jpgraph']); +$driver->Run(); +echo '
        '; + +/* +echo '
        '; + +$driver2 = new TestDriver($type, 'examples_pie_jpgraph'); +$driver2->Run(); + +echo '
        ';*/ diff --git a/vendor/amenadiel/jpgraph/Examples/tiger1.jpg b/vendor/amenadiel/jpgraph/Examples/tiger1.jpg new file mode 100644 index 0000000000..9959610140 Binary files /dev/null and b/vendor/amenadiel/jpgraph/Examples/tiger1.jpg differ diff --git a/vendor/amenadiel/jpgraph/Examples/tiger_bkg.gif b/vendor/amenadiel/jpgraph/Examples/tiger_bkg.gif new file mode 100644 index 0000000000..3faaa174dc Binary files /dev/null and b/vendor/amenadiel/jpgraph/Examples/tiger_bkg.gif differ diff --git a/vendor/amenadiel/jpgraph/Examples/tiger_bkg.jpg b/vendor/amenadiel/jpgraph/Examples/tiger_bkg.jpg new file mode 100644 index 0000000000..43d45f30e8 Binary files /dev/null and b/vendor/amenadiel/jpgraph/Examples/tiger_bkg.jpg differ diff --git a/vendor/amenadiel/jpgraph/Examples/tiger_bkg.png b/vendor/amenadiel/jpgraph/Examples/tiger_bkg.png new file mode 100644 index 0000000000..78d8e25b0c Binary files /dev/null and b/vendor/amenadiel/jpgraph/Examples/tiger_bkg.png differ diff --git a/vendor/amenadiel/jpgraph/Examples/timestampex01.php b/vendor/amenadiel/jpgraph/Examples/timestampex01.php new file mode 100644 index 0000000000..8738dc6197 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/timestampex01.php @@ -0,0 +1,59 @@ +SetMargin(40, 20, 30, 50); + +// Now specify the X-scale explicit but let the Y-scale be auto-scaled +$graph->SetScale("intlin", 0, 0, $adjstart, $adjend); +$graph->title->Set("Example on TimeStamp Callback"); + +// Setup the callback and adjust the angle of the labels +$graph->xaxis->SetLabelFormatCallback('TimeCallback'); +$graph->xaxis->SetLabelAngle(90); + +// Set the labels every 5min (i.e. 300seconds) and minor ticks every minute +$graph->xaxis->scale->ticks->Set(300, 60); + +$line = new Plot\LinePlot($data, $xdata); +$line->SetColor('lightblue'); +$graph->Add($line); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/titlecsimex01.php b/vendor/amenadiel/jpgraph/Examples/titlecsimex01.php new file mode 100644 index 0000000000..d39c8c9105 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/titlecsimex01.php @@ -0,0 +1,59 @@ +SetScale("textlin"); +$graph->SetMargin(50, 80, 20, 40); +$graph->yaxis->SetTitleMargin(30); +$graph->yaxis->scale->SetGrace(30); +$graph->SetShadow(); + +// Create a bar pot +$bplot = new Plot\BarPlot($datay); + +// Create targets for the bars image maps. One for each column +$targ = array("bar_clsmex1.php#1", "bar_clsmex1.php#2", "bar_clsmex1.php#3", "bar_clsmex1.php#4", "bar_clsmex1.php#5", "bar_clsmex1.php#6"); +$alts = array("val=%d", "val=%d", "val=%d", "val=%d", "val=%d", "val=%d"); +$bplot->SetCSIMTargets($targ, $alts); +$bplot->SetFillColor("orange"); +$bplot->SetLegend('Year 2001 %%', '#kalle ', '%s'); + +// Display the values on top of each bar +$bplot->SetShadow(); +$bplot->value->SetFormat(" $ %2.1f", 70); +$bplot->value->SetFont(FF_ARIAL, FS_NORMAL, 9); +$bplot->value->SetColor("blue"); +$bplot->value->Show(); + +$graph->Add($bplot); + +// Create a big "button" that has an image map action +$txt1 = new Text("A simple text with\ntwo rows"); +$txt1->SetFont(FF_ARIAL); +$txt1->SetBox('lightblue', 'black', 'white@1', 5); +$txt1->SetParagraphAlign('center'); +$txt1->SetPos(40, 50); +$txt1->SetCSIMTarget('#88', 'Text element'); +$graph->Add($txt1); + +// Add image map to the graph title as well (you can do this to the +// sub- and subsub-title as well) +$graph->title->Set("Image maps barex1"); +$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetCSIMTarget('#45', 'Title for Bar'); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +// Setup the axis title image map and font style +$graph->yaxis->title->SetFont(FF_FONT2, FS_BOLD); +$graph->yaxis->title->SetCSIMTarget('#55', 'Y-axis title'); +$graph->xaxis->title->SetFont(FF_FONT2, FS_BOLD); +$graph->xaxis->title->SetCSIMTarget('#55', 'X-axis title'); + +// Send back the HTML page which will call this script again +// to retrieve the image. +$graph->StrokeCSIM(); diff --git a/vendor/amenadiel/jpgraph/Examples/titleex1.php b/vendor/amenadiel/jpgraph/Examples/titleex1.php new file mode 100644 index 0000000000..f1b2999021 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/titleex1.php @@ -0,0 +1,28 @@ +SetScale("textlin"); +$graph->SetMargin(25, 10, 30, 30); + +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); +$graph->title->Set('The Title'); +$graph->subtitle->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->subtitle->Set('The Subtitle'); +$graph->subsubtitle->SetFont(FF_ARIAL, FS_ITALIC, 9); +$graph->subsubtitle->Set('The Subsubitle'); + +// Create the linear plot +$lineplot = new Plot\LinePlot($ydata); +$lineplot->SetColor("blue"); + +// Add the plot to the graph +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/tornado.jpg b/vendor/amenadiel/jpgraph/Examples/tornado.jpg new file mode 100644 index 0000000000..24c1ea1b3d Binary files /dev/null and b/vendor/amenadiel/jpgraph/Examples/tornado.jpg differ diff --git a/vendor/amenadiel/jpgraph/Examples/tr1.jpg b/vendor/amenadiel/jpgraph/Examples/tr1.jpg new file mode 100644 index 0000000000..f855e31e4b Binary files /dev/null and b/vendor/amenadiel/jpgraph/Examples/tr1.jpg differ diff --git a/vendor/amenadiel/jpgraph/Examples/tr2.jpg b/vendor/amenadiel/jpgraph/Examples/tr2.jpg new file mode 100644 index 0000000000..6a75e474b2 Binary files /dev/null and b/vendor/amenadiel/jpgraph/Examples/tr2.jpg differ diff --git a/vendor/amenadiel/jpgraph/Examples/tr3.jpg b/vendor/amenadiel/jpgraph/Examples/tr3.jpg new file mode 100644 index 0000000000..799e097d56 Binary files /dev/null and b/vendor/amenadiel/jpgraph/Examples/tr3.jpg differ diff --git a/vendor/amenadiel/jpgraph/Examples/tr4.jpg b/vendor/amenadiel/jpgraph/Examples/tr4.jpg new file mode 100644 index 0000000000..fe411c1ca3 Binary files /dev/null and b/vendor/amenadiel/jpgraph/Examples/tr4.jpg differ diff --git a/vendor/amenadiel/jpgraph/Examples/tr5.jpg b/vendor/amenadiel/jpgraph/Examples/tr5.jpg new file mode 100644 index 0000000000..33c974881e Binary files /dev/null and b/vendor/amenadiel/jpgraph/Examples/tr5.jpg differ diff --git a/vendor/amenadiel/jpgraph/Examples/tr6.jpg b/vendor/amenadiel/jpgraph/Examples/tr6.jpg new file mode 100644 index 0000000000..81321b7daa Binary files /dev/null and b/vendor/amenadiel/jpgraph/Examples/tr6.jpg differ diff --git a/vendor/amenadiel/jpgraph/Examples/y2synch.php b/vendor/amenadiel/jpgraph/Examples/y2synch.php new file mode 100644 index 0000000000..704e7eb74a --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/y2synch.php @@ -0,0 +1,58 @@ +SetMargin(50, 60, 40, 45); +$graph->SetMarginColor('white'); + +// Setup the scales for X,Y and Y2 axis +$graph->SetScale("intlin"); // X and Y axis +$graph->SetY2Scale("lin"); // Y2 axis + +// Overall graph title +$graph->title->Set('Synchronized Y & Y2 scales'); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); + +// Title for X-axis +$graph->xaxis->title->Set('Measurement'); +$graph->xaxis->title->SetMargin(5); +$graph->xaxis->title->SetFont(FF_ARIAL, FS_NORMAL, 11); + +// Create Y data set +$lplot = new Plot\LinePlot($datay); +$graph->yaxis->title->Set('Celcius (C)'); +$graph->yaxis->title->SetMargin(5); +$graph->yaxis->title->SetFont(FF_ARIAL, FS_NORMAL, 11); +// ... and add the plot to the Y-axis +$graph->Add($lplot); + +// Create Y2 scale data set +$l2plot = new Plot\LinePlot($datay); +$l2plot->SetWeight(0); +$graph->y2axis->title->Set('Fahrenheit (F)'); +$graph->y2axis->title->SetMargin(5); // Some extra margin to clear labels +$graph->y2axis->title->SetFont(FF_ARIAL, FS_NORMAL, 11); +$graph->y2axis->SetLabelFormatCallback('toFahrenheit'); +$graph->y2axis->SetColor('navy'); + +// ... and add the plot to the Y2-axis +$graph->AddY2($l2plot); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/y2synch2.php b/vendor/amenadiel/jpgraph/Examples/y2synch2.php new file mode 100644 index 0000000000..1d81244ff4 --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/y2synch2.php @@ -0,0 +1,58 @@ +SetMargin(50, 60, 40, 45); +$graph->SetMarginColor('white'); + +// Setup the scales for X,Y and Y2 axis +$graph->SetScale("textlin"); // X and Y axis +$graph->SetY2Scale("lin"); // Y2 axis + +// Overall graph title +$graph->title->Set('Synchronized Y & Y2 scales'); +$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); + +// Title for X-axis +$graph->xaxis->title->Set('Measurement'); +$graph->xaxis->title->SetMargin(5); +$graph->xaxis->title->SetFont(FF_ARIAL, FS_NORMAL, 11); + +// Create Y data set +$lplot = new Plot\BarPlot($datay); +$graph->yaxis->title->Set('Celcius (C)'); +$graph->yaxis->title->SetMargin(5); +$graph->yaxis->title->SetFont(FF_ARIAL, FS_NORMAL, 11); +// ... and add the plot to the Y-axis +$graph->Add($lplot); + +// Create Y2 scale data set +$l2plot = new Plot\LinePlot($datay); +$l2plot->SetWeight(0); +$graph->y2axis->title->Set('Fahrenheit (F)'); +$graph->y2axis->title->SetMargin(5); // Some extra margin to clear labels +$graph->y2axis->title->SetFont(FF_ARIAL, FS_NORMAL, 11); +$graph->y2axis->SetLabelFormatCallback('toFahrenheit'); +$graph->y2axis->SetColor('navy'); + +// ... and add the plot to the Y2-axis +$graph->AddY2($l2plot); + +$graph->Stroke(); diff --git a/vendor/amenadiel/jpgraph/Examples/yearssn.txt b/vendor/amenadiel/jpgraph/Examples/yearssn.txt new file mode 100644 index 0000000000..bafcd7b3dd --- /dev/null +++ b/vendor/amenadiel/jpgraph/Examples/yearssn.txt @@ -0,0 +1,309 @@ +1700.5 5.0 +1701.5 11.0 +1702.5 16.0 +1703.5 23.0 +1704.5 36.0 +1705.5 58.0 +1706.5 29.0 +1707.5 20.0 +1708.5 10.0 +1709.5 8.0 +1710.5 3.0 +1711.5 0.0 +1712.5 0.0 +1713.5 2.0 +1714.5 11.0 +1715.5 27.0 +1716.5 47.0 +1717.5 63.0 +1718.5 60.0 +1719.5 39.0 +1720.5 28.0 +1721.5 26.0 +1722.5 22.0 +1723.5 11.0 +1724.5 21.0 +1725.5 40.0 +1726.5 78.0 +1727.5 122.0 +1728.5 103.0 +1729.5 73.0 +1730.5 47.0 +1731.5 35.0 +1732.5 11.0 +1733.5 5.0 +1734.5 16.0 +1735.5 34.0 +1736.5 70.0 +1737.5 81.0 +1738.5 111.0 +1739.5 101.0 +1740.5 73.0 +1741.5 40.0 +1742.5 20.0 +1743.5 16.0 +1744.5 5.0 +1745.5 11.0 +1746.5 22.0 +1747.5 40.0 +1748.5 60.0 +1749.5 80.9 +1750.5 83.4 +1751.5 47.7 +1752.5 47.8 +1753.5 30.7 +1754.5 12.2 +1755.5 9.6 +1756.5 10.2 +1757.5 32.4 +1758.5 47.6 +1759.5 54.0 +1760.5 62.9 +1761.5 85.9 +1762.5 61.2 +1763.5 45.1 +1764.5 36.4 +1765.5 20.9 +1766.5 11.4 +1767.5 37.8 +1768.5 69.8 +1769.5 106.1 +1770.5 100.8 +1771.5 81.6 +1772.5 66.5 +1773.5 34.8 +1774.5 30.6 +1775.5 7.0 +1776.5 19.8 +1777.5 92.5 +1778.5 154.4 +1779.5 125.9 +1780.5 84.8 +1781.5 68.1 +1782.5 38.5 +1783.5 22.8 +1784.5 10.2 +1785.5 24.1 +1786.5 82.9 +1787.5 132.0 +1788.5 130.9 +1789.5 118.1 +1790.5 89.9 +1791.5 66.6 +1792.5 60.0 +1793.5 46.9 +1794.5 41.0 +1795.5 21.3 +1796.5 16.0 +1797.5 6.4 +1798.5 4.1 +1799.5 6.8 +1800.5 14.5 +1801.5 34.0 +1802.5 45.0 +1803.5 43.1 +1804.5 47.5 +1805.5 42.2 +1806.5 28.1 +1807.5 10.1 +1808.5 8.1 +1809.5 2.5 +1810.5 0.0 +1811.5 1.4 +1812.5 5.0 +1813.5 12.2 +1814.5 13.9 +1815.5 35.4 +1816.5 45.8 +1817.5 41.0 +1818.5 30.1 +1819.5 23.9 +1820.5 15.6 +1821.5 6.6 +1822.5 4.0 +1823.5 1.8 +1824.5 8.5 +1825.5 16.6 +1826.5 36.3 +1827.5 49.6 +1828.5 64.2 +1829.5 67.0 +1830.5 70.9 +1831.5 47.8 +1832.5 27.5 +1833.5 8.5 +1834.5 13.2 +1835.5 56.9 +1836.5 121.5 +1837.5 138.3 +1838.5 103.2 +1839.5 85.7 +1840.5 64.6 +1841.5 36.7 +1842.5 24.2 +1843.5 10.7 +1844.5 15.0 +1845.5 40.1 +1846.5 61.5 +1847.5 98.5 +1848.5 124.7 +1849.5 96.3 +1850.5 66.6 +1851.5 64.5 +1852.5 54.1 +1853.5 39.0 +1854.5 20.6 +1855.5 6.7 +1856.5 4.3 +1857.5 22.7 +1858.5 54.8 +1859.5 93.8 +1860.5 95.8 +1861.5 77.2 +1862.5 59.1 +1863.5 44.0 +1864.5 47.0 +1865.5 30.5 +1866.5 16.3 +1867.5 7.3 +1868.5 37.6 +1869.5 74.0 +1870.5 139.0 +1871.5 111.2 +1872.5 101.6 +1873.5 66.2 +1874.5 44.7 +1875.5 17.0 +1876.5 11.3 +1877.5 12.4 +1878.5 3.4 +1879.5 6.0 +1880.5 32.3 +1881.5 54.3 +1882.5 59.7 +1883.5 63.7 +1884.5 63.5 +1885.5 52.2 +1886.5 25.4 +1887.5 13.1 +1888.5 6.8 +1889.5 6.3 +1890.5 7.1 +1891.5 35.6 +1892.5 73.0 +1893.5 85.1 +1894.5 78.0 +1895.5 64.0 +1896.5 41.8 +1897.5 26.2 +1898.5 26.7 +1899.5 12.1 +1900.5 9.5 +1901.5 2.7 +1902.5 5.0 +1903.5 24.4 +1904.5 42.0 +1905.5 63.5 +1906.5 53.8 +1907.5 62.0 +1908.5 48.5 +1909.5 43.9 +1910.5 18.6 +1911.5 5.7 +1912.5 3.6 +1913.5 1.4 +1914.5 9.6 +1915.5 47.4 +1916.5 57.1 +1917.5 103.9 +1918.5 80.6 +1919.5 63.6 +1920.5 37.6 +1921.5 26.1 +1922.5 14.2 +1923.5 5.8 +1924.5 16.7 +1925.5 44.3 +1926.5 63.9 +1927.5 69.0 +1928.5 77.8 +1929.5 64.9 +1930.5 35.7 +1931.5 21.2 +1932.5 11.1 +1933.5 5.7 +1934.5 8.7 +1935.5 36.1 +1936.5 79.7 +1937.5 114.4 +1938.5 109.6 +1939.5 88.8 +1940.5 67.8 +1941.5 47.5 +1942.5 30.6 +1943.5 16.3 +1944.5 9.6 +1945.5 33.2 +1946.5 92.6 +1947.5 151.6 +1948.5 136.3 +1949.5 134.7 +1950.5 83.9 +1951.5 69.4 +1952.5 31.5 +1953.5 13.9 +1954.5 4.4 +1955.5 38.0 +1956.5 141.7 +1957.5 190.2 +1958.5 184.8 +1959.5 159.0 +1960.5 112.3 +1961.5 53.9 +1962.5 37.6 +1963.5 27.9 +1964.5 10.2 +1965.5 15.1 +1966.5 47.0 +1967.5 93.7 +1968.5 105.9 +1969.5 105.5 +1970.5 104.5 +1971.5 66.6 +1972.5 68.9 +1973.5 38.0 +1974.5 34.5 +1975.5 15.5 +1976.5 12.6 +1977.5 27.5 +1978.5 92.5 +1979.5 155.4 +1980.5 154.6 +1981.5 140.5 +1982.5 115.9 +1983.5 66.6 +1984.5 45.9 +1985.5 17.9 +1986.5 13.4 +1987.5 29.2 +1988.5 100.2 +1989.5 157.6 +1990.5 142.6 +1991.5 145.7 +1992.5 94.3 +1993.5 54.6 +1994.5 29.9 +1995.5 17.5 +1996.5 8.6 +1997.5 21.5 +1998.5 64.3 +1999.5 93.3 +2000.5 119.6 +2001.5 111.0 +2002.5 104.0 +2003.5 63.7 +2004.5 40.4 +2005.5 29.8 +2006.5 15.2 +2007.5 7.5 +2008.5 2.9 diff --git a/vendor/amenadiel/jpgraph/LICENSE.md b/vendor/amenadiel/jpgraph/LICENSE.md new file mode 100644 index 0000000000..5b3435b56a --- /dev/null +++ b/vendor/amenadiel/jpgraph/LICENSE.md @@ -0,0 +1,51 @@ + +# The Q Public License Version 1.0 (QPL-1.0) + +Copyright (C) 1999 Trolltech AS, Norway. +Everyone is permitted to copy and distribute this license document. + +The intent of this license is to establish freedom to share and change the software regulated by this license under the open source model. + +This license applies to any software containing a notice placed by the copyright holder saying that it may be distributed under the terms of the Q Public License version 1.0\. Such software is herein referred to as the Software. This license covers modification and distribution of the Software, use of third-party application programs based on the Software, and development of free software which uses the Software. + +## Granted Rights + +1. You are granted the non-exclusive rights set forth in this license provided you agree to and comply with any and all conditions in this license. Whole or partial distribution of the Software, or software items that link with the Software, in any form signifies acceptance of this license. + +2. You may copy and distribute the Software in unmodified form provided that the entire package, including - but not restricted to - copyright, trademark notices and disclaimers, as released by the initial developer of the Software, is distributed. + +3. You may make modifications to the Software and distribute your modifications, in a form that is separate from the Software, such as patches. The following restrictions apply to modifications: + + a) Modifications must not alter or remove any copyright notices in the Software. + + b) When modifications to the Software are released under this license, a non-exclusive royalty-free right is granted to the initial developer of the Software to distribute your modification in future versions of the Software provided such versions remain available under these terms in addition to any other license(s) of the initial developer. + +4. You may distribute machine-executable forms of the Software or machine-executable forms of modified versions of the Software, provided that you meet these restrictions: + + a) You must include this license document in the distribution. + + b) You must ensure that all recipients of the machine-executable forms are also able to receive the complete machine-readable source code to the distributed Software, including all modifications, without any charge beyond the costs of data transfer, and place prominent notices in the distribution explaining this. + c. You must ensure that all modifications included in the machine-executable forms are available under the terms of this license. + +5. You may use the original or modified versions of the Software to compile, link and run application programs legally developed by you or by others. + +6. You may develop application programs, reusable components and other software items that link with the original or modified versions of the Software. These items, when distributed, are subject to the following requirements: + + a) You must ensure that all recipients of machine-executable forms of these items are also able to receive and use the complete machine-readable source code to the items without any charge beyond the costs of data transfer. + + b) You must explicitly license all recipients of your items to use and re-distribute original and modified versions of the items in both machine-executable and source code forms. The recipients must be able to do so without any charges whatsoever, and they must be able to re-distribute to anyone they choose. + + c) If the items are not available to the general public, and the initial developer of the Software requests a copy of the items, then you must supply one. + + +## Limitations of Liability +In no event shall the initial developers or copyright holders be liable for any damages whatsoever, including - but not restricted to - lost revenue or profits or other direct, indirect, special, incidental or consequential damages, even if they have been advised of the possibility of such damages, except to the extent invariable law, if any, provides otherwise. + + +## No Warranty +The Software and this license document are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +## Choice of Law +This license is governed by the Laws of Norway. Disputes shall be settled by Oslo City Court. + diff --git a/vendor/amenadiel/jpgraph/README.md b/vendor/amenadiel/jpgraph/README.md new file mode 100644 index 0000000000..9734aca1bf --- /dev/null +++ b/vendor/amenadiel/jpgraph/README.md @@ -0,0 +1,131 @@ +## JPGRAPH 3.6.6, Community Edition + +[![Packagist](https://img.shields.io/packagist/dm/amenadiel/jpgraph.svg)](https://packagist.org/packages/amenadiel/jpgraph) + +This is an unnoficial refactor of [JpGraph](http://jpgraph.net/) with thefollowing differences: +- the app was fully refactored adding namespaces, proper folder hierarchy, separating each class in its own file and stripping the use of `require` and `include` to the bare minimum +- it provides full composer compatibility +- it has PSR-4 autoloading +- it makes requirement checks so you can't go wrong +- it has release tags, to let `composer install` use your cached packages instead of pulling from github every time +- I stripped the docs because they are useless weight in a dependency. [You can find them here](http://jpgraph.net/doc/) +- The Examples folder were moved upwards, althought they are now in categories. Not all of them work at this point +- Examples pointing to features not present in the free tool were stripped from said folder (e.g. Barcodes) +- If the chosen font isn't found, it falls back to existing fonts instead of crashing +- If you try to use antialiasing functions not present in your current GD installation, it disables them instead of crashing + +## How to install + +Using composer + +```sh +composer require amenadiel/jpgraph:^3.6 +``` + +## How to use + +See the [examples folder](https://github.com/amenadiel/jpgraph/tree/master/Examples) for working samples. The general concept is: + + - run `composer install` + + - require `vendor/autoload.php` it the top of your script + + - generate a graph with a snippet like the following + + ```php + use Amenadiel\JpGraph\Graph; + use Amenadiel\JpGraph\Plot; + + $data = array(40, 21, 17, 14, 23); + $p1 = new Plot\PiePlot($data); + $p1->ShowBorder(); + $p1->SetColor('black'); + $p1->SetSliceColors(array('#1E90FF', '#2E8B57', '#ADFF2F', '#DC143C', '#BA55D3')); + + $graph = new Graph\PieGraph(350, 250); + $graph->title->Set("A Simple Pie Plot"); + $graph->SetBox(true); + + $graph->Add($p1); + $graph->Stroke(); + ``` + +### Wishlist + +- Get all the examples working +- If the project gains traction I can move the repo to an organization so there can be more mantainers and contributions +- Add tests +- Add CI tools +- Add alternative use of [imagick](http://php.net/manual/en/imagick.setup.php) + + + + +![jpgraph_logo](https://cloud.githubusercontent.com/assets/238439/8861477/e8aac1f0-3160-11e5-9d02-36838810ca26.jpg) + +README FOR JPGRAPH 3.5.x +========================= + +This package contains the JpGraph PHP library Pro version 3.5.x + +The library is Copyright (C) 2000-2010 Asial Corporatoin and +released under dual license QPL 1.0 for open source and educational +use and JpGraph Professional License for commercial use. + +Please see full license details at +http://jpgraph.net/pro/ +http://jpgraph.net/download/ + +* -------------------------------------------------------------------- +* PHP4 IS NOT SUPPORTED IN 2.x or 3.x SERIES +* -------------------------------------------------------------------- + +Requirements: +------------- +Miminum: +* PHP 5.1.0 or higher +* GD 2.0.28 or higher +Note: Earlier versions might work but is unsupported. + +Recommended: +* >= PHP 5.2.0 +* PHP Builtin GD library + +Installation +------------ +1. Make sure that the PHP version is compatible with the stated + requirements and that the PHP installation has support for + the GD library. Please run phpinfo() to check if GD library + is supported in the installation. + If the GD library doesn't seem to be installed + please consult the PHP manual under section "Image" for + instructions on where to find this library. Please refer to + the manual section "Verifying your PHP installation" + +2. Unzip and copy the files to a directory of your choice where Your + httpd sever can access them. + For a global site installation you should copy the files to + somewhere in the PHP search path. + +3. Check that the default directory paths in jpg-config.inc.php + for cache directory and TTF directory suits your installation. + Note1: The default directories are different depending on if + the library is running on Windows or UNIX. + Note2: Apache/PHP must have write permission to your cache + directory if you enable the cache feature. By default the cache + is disabled. + + +Documentation +------------- +The installation includes HTML documentation and reference guide for the +library. The portal page for all documentation is +/docs/index.html + + +Bug reports and suggestions +--------------------------- +Should be reported using the contact form at + +http://jpgraph.net/contact/ + diff --git a/vendor/amenadiel/jpgraph/composer.json b/vendor/amenadiel/jpgraph/composer.json new file mode 100644 index 0000000000..f778da0f66 --- /dev/null +++ b/vendor/amenadiel/jpgraph/composer.json @@ -0,0 +1,36 @@ +{ + "name": "amenadiel/jpgraph", + "type": "library", + "description": "jpGraph, library to make graphs and charts", + "version": "3.6.6", + "keywords": [ + "graph", + "chart", + "pie", + "jpgraph", + "data" + ], + "homepage": "http://jpgraph.net/", + "license": "QPL 1.0", + + "support": { + "issues": "https://github.com/amenadiel/jpgraph/issues" + }, + "require": { + "php": ">=5.3.0", + "ext-gd": "*" + }, + "autoload": { + "psr-4": { + "Amenadiel\\JpGraph\\": "src/", + "Amenadiel\\JpGraph\\Graph\\": "src/graph", + "Amenadiel\\JpGraph\\Image\\": "src/image", + "Amenadiel\\JpGraph\\Plot\\": "src/plot", + "Amenadiel\\JpGraph\\Text\\": "src/text", + "Amenadiel\\JpGraph\\Themes\\": "src/themes", + "Amenadiel\\JpGraph\\Util\\": "src/util" + } + + } + +} diff --git a/vendor/amenadiel/jpgraph/jpgraph_logo.jpg b/vendor/amenadiel/jpgraph/jpgraph_logo.jpg new file mode 100644 index 0000000000..c09464ee6b Binary files /dev/null and b/vendor/amenadiel/jpgraph/jpgraph_logo.jpg differ diff --git a/html/lib/jpgraph/flags.dat b/vendor/amenadiel/jpgraph/src/flags/flags.dat similarity index 100% rename from html/lib/jpgraph/flags.dat rename to vendor/amenadiel/jpgraph/src/flags/flags.dat diff --git a/html/lib/jpgraph/flags_thumb100x100.dat b/vendor/amenadiel/jpgraph/src/flags/flags_thumb100x100.dat similarity index 100% rename from html/lib/jpgraph/flags_thumb100x100.dat rename to vendor/amenadiel/jpgraph/src/flags/flags_thumb100x100.dat diff --git a/html/lib/jpgraph/flags_thumb35x35.dat b/vendor/amenadiel/jpgraph/src/flags/flags_thumb35x35.dat similarity index 100% rename from html/lib/jpgraph/flags_thumb35x35.dat rename to vendor/amenadiel/jpgraph/src/flags/flags_thumb35x35.dat diff --git a/html/lib/jpgraph/flags_thumb60x60.dat b/vendor/amenadiel/jpgraph/src/flags/flags_thumb60x60.dat similarity index 100% rename from html/lib/jpgraph/flags_thumb60x60.dat rename to vendor/amenadiel/jpgraph/src/flags/flags_thumb60x60.dat diff --git a/vendor/amenadiel/jpgraph/src/fonts/DejaVuSans-Bold.ttf b/vendor/amenadiel/jpgraph/src/fonts/DejaVuSans-Bold.ttf new file mode 100644 index 0000000000..ac313d269c Binary files /dev/null and b/vendor/amenadiel/jpgraph/src/fonts/DejaVuSans-Bold.ttf differ diff --git a/vendor/amenadiel/jpgraph/src/fonts/DejaVuSans-BoldOblique.ttf b/vendor/amenadiel/jpgraph/src/fonts/DejaVuSans-BoldOblique.ttf new file mode 100644 index 0000000000..c818ae6e7c Binary files /dev/null and b/vendor/amenadiel/jpgraph/src/fonts/DejaVuSans-BoldOblique.ttf differ diff --git a/vendor/amenadiel/jpgraph/src/fonts/DejaVuSans-Oblique.ttf b/vendor/amenadiel/jpgraph/src/fonts/DejaVuSans-Oblique.ttf new file mode 100644 index 0000000000..d5ac60d6aa Binary files /dev/null and b/vendor/amenadiel/jpgraph/src/fonts/DejaVuSans-Oblique.ttf differ diff --git a/vendor/amenadiel/jpgraph/src/fonts/DejaVuSans.ttf b/vendor/amenadiel/jpgraph/src/fonts/DejaVuSans.ttf new file mode 100644 index 0000000000..a99969e1b2 Binary files /dev/null and b/vendor/amenadiel/jpgraph/src/fonts/DejaVuSans.ttf differ diff --git a/vendor/amenadiel/jpgraph/src/fonts/FF_FONT0-Bold.gdf b/vendor/amenadiel/jpgraph/src/fonts/FF_FONT0-Bold.gdf new file mode 100644 index 0000000000..3b371f8a62 Binary files /dev/null and b/vendor/amenadiel/jpgraph/src/fonts/FF_FONT0-Bold.gdf differ diff --git a/vendor/amenadiel/jpgraph/src/fonts/FF_FONT0.gdf b/vendor/amenadiel/jpgraph/src/fonts/FF_FONT0.gdf new file mode 100644 index 0000000000..e231b71314 Binary files /dev/null and b/vendor/amenadiel/jpgraph/src/fonts/FF_FONT0.gdf differ diff --git a/vendor/amenadiel/jpgraph/src/fonts/FF_FONT1-Bold.gdf b/vendor/amenadiel/jpgraph/src/fonts/FF_FONT1-Bold.gdf new file mode 100644 index 0000000000..d62f0b3bb7 Binary files /dev/null and b/vendor/amenadiel/jpgraph/src/fonts/FF_FONT1-Bold.gdf differ diff --git a/vendor/amenadiel/jpgraph/src/fonts/FF_FONT1.gdf b/vendor/amenadiel/jpgraph/src/fonts/FF_FONT1.gdf new file mode 100644 index 0000000000..7b5b0f628b Binary files /dev/null and b/vendor/amenadiel/jpgraph/src/fonts/FF_FONT1.gdf differ diff --git a/vendor/amenadiel/jpgraph/src/fonts/FF_FONT2-Bold.gdf b/vendor/amenadiel/jpgraph/src/fonts/FF_FONT2-Bold.gdf new file mode 100644 index 0000000000..6e402847c2 Binary files /dev/null and b/vendor/amenadiel/jpgraph/src/fonts/FF_FONT2-Bold.gdf differ diff --git a/vendor/amenadiel/jpgraph/src/fonts/FF_FONT2.gdf b/vendor/amenadiel/jpgraph/src/fonts/FF_FONT2.gdf new file mode 100644 index 0000000000..50bca09e08 Binary files /dev/null and b/vendor/amenadiel/jpgraph/src/fonts/FF_FONT2.gdf differ diff --git a/vendor/amenadiel/jpgraph/src/graph/Axis.php b/vendor/amenadiel/jpgraph/src/graph/Axis.php new file mode 100644 index 0000000000..5f61dd9b53 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/Axis.php @@ -0,0 +1,264 @@ +hide) { + return; + } + + if (is_numeric($this->pos)) { + $pos = $aOtherAxisScale->Translate($this->pos); + } else { + // Default to minimum of other scale if pos not set + if (($aOtherAxisScale->GetMinVal() >= 0 && $this->pos == false) || $this->pos == 'min') { + $pos = $aOtherAxisScale->scale_abs[0]; + } elseif ($this->pos == "max") { + $pos = $aOtherAxisScale->scale_abs[1]; + } else { + // If negative set x-axis at 0 + $this->pos = 0; + $pos = $aOtherAxisScale->Translate(0); + } + } + + $pos += $this->iDeltaAbsPos; + $this->img->SetLineWeight($this->weight); + $this->img->SetColor($this->color); + $this->img->SetFont($this->font_family, $this->font_style, $this->font_size); + + if ($this->scale->type == "x") { + if (!$this->hide_line) { + // Stroke X-axis + $this->img->FilledRectangle( + $this->img->left_margin, + $pos, + $this->img->width - $this->img->right_margin, + $pos + $this->weight - 1 + ); + } + if ($this->title_side == SIDE_DOWN) { + $y = $pos + $this->img->GetFontHeight() + $this->title_margin + $this->title->margin; + $yalign = 'top'; + } else { + $y = $pos - $this->img->GetFontHeight() - $this->title_margin - $this->title->margin; + $yalign = 'bottom'; + } + + if ($this->title_adjust == 'high') { + $this->title->SetPos($this->img->width - $this->img->right_margin, $y, 'right', $yalign); + } elseif ($this->title_adjust == 'middle' || $this->title_adjust == 'center') { + $this->title->SetPos(($this->img->width - $this->img->left_margin - $this->img->right_margin) / 2 + $this->img->left_margin, $y, 'center', $yalign); + } elseif ($this->title_adjust == 'low') { + $this->title->SetPos($this->img->left_margin, $y, 'left', $yalign); + } else { + Util\JpGraphError::RaiseL(25060, $this->title_adjust); //('Unknown alignment specified for X-axis title. ('.$this->title_adjust.')'); + } + } elseif ($this->scale->type == "y") { + // Add line weight to the height of the axis since + // the x-axis could have a width>1 and we want the axis to fit nicely together. + if (!$this->hide_line) { + // Stroke Y-axis + $this->img->FilledRectangle( + $pos - $this->weight + 1, + $this->img->top_margin, + $pos, + $this->img->height - $this->img->bottom_margin + $this->weight - 1 + ); + } + + $x = $pos; + if ($this->title_side == SIDE_LEFT) { + $x -= $this->title_margin; + $x -= $this->title->margin; + $halign = 'right'; + } else { + $x += $this->title_margin; + $x += $this->title->margin; + $halign = 'left'; + } + // If the user has manually specified an hor. align + // then we override the automatic settings with this + // specifed setting. Since default is 'left' we compare + // with that. (This means a manually set 'left' align + // will have no effect.) + if ($this->title->halign != 'left') { + $halign = $this->title->halign; + } + if ($this->title_adjust == 'high') { + $this->title->SetPos($x, $this->img->top_margin, $halign, 'top'); + } elseif ($this->title_adjust == 'middle' || $this->title_adjust == 'center') { + $this->title->SetPos($x, ($this->img->height - $this->img->top_margin - $this->img->bottom_margin) / 2 + $this->img->top_margin, $halign, "center"); + } elseif ($this->title_adjust == 'low') { + $this->title->SetPos($x, $this->img->height - $this->img->bottom_margin, $halign, 'bottom'); + } else { + Util\JpGraphError::RaiseL(25061, $this->title_adjust); //('Unknown alignment specified for Y-axis title. ('.$this->title_adjust.')'); + } + } + $this->scale->ticks->Stroke($this->img, $this->scale, $pos); + if ($aStrokeLabels) { + if (!$this->hide_labels) { + $this->StrokeLabels($pos); + } + $this->title->Stroke($this->img); + } + } + + //--------------- + // PRIVATE METHODS + // Draw all the tick labels on major tick marks + public function StrokeLabels($aPos, $aMinor = false, $aAbsLabel = false) + { + + if (is_array($this->label_color) && count($this->label_color) > 3) { + $this->ticks_label_colors = $this->label_color; + $this->img->SetColor($this->label_color[0]); + } else { + $this->img->SetColor($this->label_color); + } + $this->img->SetFont($this->font_family, $this->font_style, $this->font_size); + $yoff = $this->img->GetFontHeight() / 2; + + // Only draw labels at major tick marks + $nbr = count($this->scale->ticks->maj_ticks_label); + + // We have the option to not-display the very first mark + // (Usefull when the first label might interfere with another + // axis.) + $i = $this->show_first_label ? 0 : 1; + if (!$this->show_last_label) { + --$nbr; + } + // Now run through all labels making sure we don't overshoot the end + // of the scale. + $ncolor = 0; + if (isset($this->ticks_label_colors)) { + $ncolor = count($this->ticks_label_colors); + } + while ($i < $nbr) { + // $tpos holds the absolute text position for the label + $tpos = $this->scale->ticks->maj_ticklabels_pos[$i]; + + // Note. the $limit is only used for the x axis since we + // might otherwise overshoot if the scale has been centered + // This is due to us "loosing" the last tick mark if we center. + if ($this->scale->type == 'x' && $tpos > $this->img->width - $this->img->right_margin + 1) { + return; + } + // we only draw every $label_step label + if (($i % $this->label_step) == 0) { + + // Set specific label color if specified + if ($ncolor > 0) { + $this->img->SetColor($this->ticks_label_colors[$i % $ncolor]); + } + + // If the label has been specified use that and in other case + // just label the mark with the actual scale value + $m = $this->scale->ticks->GetMajor(); + + // ticks_label has an entry for each data point and is the array + // that holds the labels set by the user. If the user hasn't + // specified any values we use whats in the automatically asigned + // labels in the maj_ticks_label + if (isset($this->ticks_label[$i * $m])) { + $label = $this->ticks_label[$i * $m]; + } else { + if ($aAbsLabel) { + $label = abs($this->scale->ticks->maj_ticks_label[$i]); + } else { + $label = $this->scale->ticks->maj_ticks_label[$i]; + } + + // We number the scale from 1 and not from 0 so increase by one + if ($this->scale->textscale && + $this->scale->ticks->label_formfunc == '' && + !$this->scale->ticks->HaveManualLabels()) { + + ++$label; + + } + } + + if ($this->scale->type == "x") { + if ($this->labelPos == SIDE_DOWN) { + if ($this->label_angle == 0 || $this->label_angle == 90) { + if ($this->label_halign == '' && $this->label_valign == '') { + $this->img->SetTextAlign('center', 'top'); + } else { + $this->img->SetTextAlign($this->label_halign, $this->label_valign); + } + + } else { + if ($this->label_halign == '' && $this->label_valign == '') { + $this->img->SetTextAlign("right", "top"); + } else { + $this->img->SetTextAlign($this->label_halign, $this->label_valign); + } + } + $this->img->StrokeText($tpos, $aPos + $this->tick_label_margin, $label, + $this->label_angle, $this->label_para_align); + } else { + if ($this->label_angle == 0 || $this->label_angle == 90) { + if ($this->label_halign == '' && $this->label_valign == '') { + $this->img->SetTextAlign("center", "bottom"); + } else { + $this->img->SetTextAlign($this->label_halign, $this->label_valign); + } + } else { + if ($this->label_halign == '' && $this->label_valign == '') { + $this->img->SetTextAlign("right", "bottom"); + } else { + $this->img->SetTextAlign($this->label_halign, $this->label_valign); + } + } + $this->img->StrokeText($tpos, $aPos - $this->tick_label_margin - 1, $label, + $this->label_angle, $this->label_para_align); + } + } else { + // scale->type == "y" + //if( $this->label_angle!=0 ) + //Util\JpGraphError::Raise(" Labels at an angle are not supported on Y-axis"); + if ($this->labelPos == SIDE_LEFT) { + // To the left of y-axis + if ($this->label_halign == '' && $this->label_valign == '') { + $this->img->SetTextAlign("right", "center"); + } else { + $this->img->SetTextAlign($this->label_halign, $this->label_valign); + } + $this->img->StrokeText($aPos - $this->tick_label_margin, $tpos, $label, $this->label_angle, $this->label_para_align); + } else { + // To the right of the y-axis + if ($this->label_halign == '' && $this->label_valign == '') { + $this->img->SetTextAlign("left", "center"); + } else { + $this->img->SetTextAlign($this->label_halign, $this->label_valign); + } + $this->img->StrokeText($aPos + $this->tick_label_margin, $tpos, $label, $this->label_angle, $this->label_para_align); + } + } + } + ++$i; + } + } + +} diff --git a/vendor/amenadiel/jpgraph/src/graph/AxisPrototype.php b/vendor/amenadiel/jpgraph/src/graph/AxisPrototype.php new file mode 100644 index 0000000000..4b048e1cd4 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/AxisPrototype.php @@ -0,0 +1,259 @@ +img = $img; + $this->scale = $aScale; + $this->color = $color; + $this->title = new Text(''); + + if ($aScale->type == 'y') { + $this->title_margin = 25; + $this->title_adjust = 'middle'; + $this->title->SetOrientation(90); + $this->tick_label_margin = 7; + $this->labelPos = SIDE_LEFT; + } else { + $this->title_margin = 5; + $this->title_adjust = 'high'; + $this->title->SetOrientation(0); + $this->tick_label_margin = 5; + $this->labelPos = SIDE_DOWN; + $this->title_side = SIDE_DOWN; + } + } + + public function SetLabelFormat($aFormStr) + { + $this->scale->ticks->SetLabelFormat($aFormStr); + } + + public function SetLabelFormatString($aFormStr, $aDate = false) + { + $this->scale->ticks->SetLabelFormat($aFormStr, $aDate); + } + + public function SetLabelFormatCallback($aFuncName) + { + $this->scale->ticks->SetFormatCallback($aFuncName); + } + + public function SetLabelAlign($aHAlign, $aVAlign = 'top', $aParagraphAlign = 'left') + { + $this->label_halign = $aHAlign; + $this->label_valign = $aVAlign; + $this->label_para_align = $aParagraphAlign; + } + + // Don't display the first label + public function HideFirstTickLabel($aShow = false) + { + $this->show_first_label = $aShow; + } + + public function HideLastTickLabel($aShow = false) + { + $this->show_last_label = $aShow; + } + + // Manually specify the major and (optional) minor tick position and labels + public function SetTickPositions($aMajPos, $aMinPos = null, $aLabels = null) + { + $this->scale->ticks->SetTickPositions($aMajPos, $aMinPos, $aLabels); + } + + // Manually specify major tick positions and optional labels + public function SetMajTickPositions($aMajPos, $aLabels = null) + { + $this->scale->ticks->SetTickPositions($aMajPos, null, $aLabels); + } + + // Hide minor or major tick marks + public function HideTicks($aHideMinor = true, $aHideMajor = true) + { + $this->scale->ticks->SupressMinorTickMarks($aHideMinor); + $this->scale->ticks->SupressTickMarks($aHideMajor); + } + + // Hide zero label + public function HideZeroLabel($aFlag = true) + { + $this->scale->ticks->SupressZeroLabel(); + } + + public function HideFirstLastLabel() + { + // The two first calls to ticks method will supress + // automatically generated scale values. However, that + // will not affect manually specified value, e.g text-scales. + // therefor we also make a kludge here to supress manually + // specified scale labels. + $this->scale->ticks->SupressLast(); + $this->scale->ticks->SupressFirst(); + $this->show_first_label = false; + $this->show_last_label = false; + } + + // Hide the axis + public function Hide($aHide = true) + { + $this->hide = $aHide; + } + + // Hide the actual axis-line, but still print the labels + public function HideLine($aHide = true) + { + $this->hide_line = $aHide; + } + + public function HideLabels($aHide = true) + { + $this->hide_labels = $aHide; + } + + // Weight of axis + public function SetWeight($aWeight) + { + $this->weight = $aWeight; + } + + // Axis color + public function SetColor($aColor, $aLabelColor = false) + { + $this->color = $aColor; + if (!$aLabelColor) { + $this->label_color = $aColor; + } else { + $this->label_color = $aLabelColor; + } + + } + + // Title on axis + public function SetTitle($aTitle, $aAdjustAlign = 'high') + { + $this->title->Set($aTitle); + $this->title_adjust = $aAdjustAlign; + } + + // Specify distance from the axis + public function SetTitleMargin($aMargin) + { + $this->title_margin = $aMargin; + } + + // Which side of the axis should the axis title be? + public function SetTitleSide($aSideOfAxis) + { + $this->title_side = $aSideOfAxis; + } + + public function SetTickSide($aDir) + { + $this->scale->ticks->SetSide($aDir); + } + + public function SetTickSize($aMajSize, $aMinSize = 3) + { + $this->scale->ticks->SetSize($aMajSize, $aMinSize = 3); + } + + // Specify text labels for the ticks. One label for each data point + public function SetTickLabels($aLabelArray, $aLabelColorArray = null) + { + $this->ticks_label = $aLabelArray; + $this->ticks_label_colors = $aLabelColorArray; + } + + public function SetLabelMargin($aMargin) + { + $this->tick_label_margin = $aMargin; + } + + // Specify that every $step of the ticks should be displayed starting + // at $start + public function SetTextTickInterval($aStep, $aStart = 0) + { + $this->scale->ticks->SetTextLabelStart($aStart); + $this->tick_step = $aStep; + } + + // Specify that every $step tick mark should have a label + // should be displayed starting + public function SetTextLabelInterval($aStep) + { + if ($aStep < 1) { + Util\JpGraphError::RaiseL(25058); //(" Text label interval must be specified >= 1."); + } + $this->label_step = $aStep; + } + + public function SetLabelSide($aSidePos) + { + $this->labelPos = $aSidePos; + } + + // Set the font + public function SetFont($aFamily, $aStyle = FS_NORMAL, $aSize = 10) + { + $this->font_family = $aFamily; + $this->font_style = $aStyle; + $this->font_size = $aSize; + } + + // Position for axis line on the "other" scale + public function SetPos($aPosOnOtherScale) + { + $this->pos = $aPosOnOtherScale; + } + + // Set the position of the axis to be X-pixels delta to the right + // of the max X-position (used to position the multiple Y-axis) + public function SetPosAbsDelta($aDelta) + { + $this->iDeltaAbsPos = $aDelta; + } + + // Specify the angle for the tick labels + public function SetLabelAngle($aAngle) + { + $this->label_angle = $aAngle; + } + +} // Class diff --git a/vendor/amenadiel/jpgraph/src/graph/CanvasGraph.php b/vendor/amenadiel/jpgraph/src/graph/CanvasGraph.php new file mode 100644 index 0000000000..8ad5d3bf7b --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/CanvasGraph.php @@ -0,0 +1,98 @@ +StrokePlotArea(); + } + + // Method description + public function Stroke($aStrokeFileName = "") + { + if ($this->texts != null) { + for ($i = 0; $i < count($this->texts); ++$i) { + $this->texts[$i]->Stroke($this->img); + } + } + if ($this->iTables !== null) { + for ($i = 0; $i < count($this->iTables); ++$i) { + $this->iTables[$i]->Stroke($this->img); + } + } + $this->StrokeTitles(); + + // If the filename is the predefined value = '_csim_special_' + // we assume that the call to stroke only needs to do enough + // to correctly generate the CSIM maps. + // We use this variable to skip things we don't strictly need + // to do to generate the image map to improve performance + // a best we can. Therefor you will see a lot of tests !$_csim in the + // code below. + $_csim = ($aStrokeFileName === _CSIM_SPECIALFILE); + + // We need to know if we have stroked the plot in the + // GetCSIMareas. Otherwise the CSIM hasn't been generated + // and in the case of GetCSIM called before stroke to generate + // CSIM without storing an image to disk GetCSIM must call Stroke. + $this->iHasStroked = true; + + if (!$_csim) { + + // Should we do any final image transformation + if ($this->iImgTrans) { + if (!class_exists('ImgTrans', false)) { + require_once 'jpgraph_imgtrans.php'; + } + + $tform = new ImgTrans($this->img->img); + $this->img->img = $tform->Skew3D($this->iImgTransHorizon, $this->iImgTransSkewDist, + $this->iImgTransDirection, $this->iImgTransHighQ, + $this->iImgTransMinSize, $this->iImgTransFillColor, + $this->iImgTransBorder); + } + + // If the filename is given as the special _IMG_HANDLER + // then the image handler is returned and the image is NOT + // streamed back + if ($aStrokeFileName == _IMG_HANDLER) { + return $this->img->img; + } else { + // Finally stream the generated picture + $this->cache->PutAndStream($this->img, $this->cache_name, $this->inline, $aStrokeFileName); + return true; + } + } + } +} // Class + +/* EOF */ diff --git a/vendor/amenadiel/jpgraph/src/graph/CanvasScale.php b/vendor/amenadiel/jpgraph/src/graph/CanvasScale.php new file mode 100644 index 0000000000..0cad8878dd --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/CanvasScale.php @@ -0,0 +1,59 @@ +g = $graph; + $this->w = $graph->img->width; + $this->h = $graph->img->height; + $this->ixmin = $xmin; + $this->ixmax = $xmax; + $this->iymin = $ymin; + $this->iymax = $ymax; + } + + public function Set($xmin = 0, $xmax = 10, $ymin = 0, $ymax = 10) + { + $this->ixmin = $xmin; + $this->ixmax = $xmax; + $this->iymin = $ymin; + $this->iymax = $ymax; + } + + public function Get() + { + return array($this->ixmin, $this->ixmax, $this->iymin, $this->iymax); + } + + public function Translate($x, $y) + { + $xp = round(($x - $this->ixmin) / ($this->ixmax - $this->ixmin) * $this->w); + $yp = round(($y - $this->iymin) / ($this->iymax - $this->iymin) * $this->h); + return array($xp, $yp); + } + + public function TranslateX($x) + { + $xp = round(($x - $this->ixmin) / ($this->ixmax - $this->ixmin) * $this->w); + return $xp; + } + + public function TranslateY($y) + { + $yp = round(($y - $this->iymin) / ($this->iymax - $this->iymin) * $this->h); + return $yp; + } + +} diff --git a/vendor/amenadiel/jpgraph/src/graph/DateScale.php b/vendor/amenadiel/jpgraph/src/graph/DateScale.php new file mode 100644 index 0000000000..2fef61a2b6 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/DateScale.php @@ -0,0 +1,518 @@ +type = $aType; + $this->scale = [$aMin, $aMax]; + $this->world_size = $aMax - $aMin; + $this->ticks = new LinearTicks(); + $this->intscale = true; + } + + //------------------------------------------------------------------------------------------ + // Utility Function AdjDate() + // Description: Will round a given time stamp to an even year, month or day + // argument. + //------------------------------------------------------------------------------------------ + + public function AdjDate($aTime, $aRound = 0, $aYearType = false, $aMonthType = false, $aDayType = false) + { + $y = (int) date('Y', $aTime); + $m = (int) date('m', $aTime); + $d = (int) date('d', $aTime); + $h = 0; + $i = 0; + $s = 0; + if ($aYearType !== false) { + $yearAdj = [0 => 1, 1 => 2, 2 => 5]; + if ($aRound == 0) { + $y = floor($y / $yearAdj[$aYearType]) * $yearAdj[$aYearType]; + } else { + ++$y; + $y = ceil($y / $yearAdj[$aYearType]) * $yearAdj[$aYearType]; + } + $m = 1; + $d = 1; + } elseif ($aMonthType !== false) { + $monthAdj = [0 => 1, 1 => 6]; + if ($aRound == 0) { + $m = floor($m / $monthAdj[$aMonthType]) * $monthAdj[$aMonthType]; + $d = 1; + } else { + ++$m; + $m = ceil($m / $monthAdj[$aMonthType]) * $monthAdj[$aMonthType]; + $d = 1; + } + } elseif ($aDayType !== false) { + if ($aDayType == 0) { + if ($aRound == 1) { + //++$d; + $h = 23; + $i = 59; + $s = 59; + } + } else { + // Adjust to an even week boundary. + $w = (int) date('w', $aTime); // Day of week 0=Sun, 6=Sat + if (true) { + // Adjust to start on Mon + if ($w == 0) { + $w = 6; + } else { + --$w; + } + + } + if ($aRound == 0) { + $d -= $w; + } else { + $d += (7 - $w); + $h = 23; + $i = 59; + $s = 59; + } + } + } + return mktime($h, $i, $s, $m, $d, $y); + + } + + //------------------------------------------------------------------------------------------ + // Wrapper for AdjDate that will round a timestamp to an even date rounding + // it downwards. + //------------------------------------------------------------------------------------------ + public function AdjStartDate($aTime, $aYearType = false, $aMonthType = false, $aDayType = false) + { + return $this->AdjDate($aTime, 0, $aYearType, $aMonthType, $aDayType); + } + + //------------------------------------------------------------------------------------------ + // Wrapper for AdjDate that will round a timestamp to an even date rounding + // it upwards + //------------------------------------------------------------------------------------------ + public function AdjEndDate($aTime, $aYearType = false, $aMonthType = false, $aDayType = false) + { + return $this->AdjDate($aTime, 1, $aYearType, $aMonthType, $aDayType); + } + + //------------------------------------------------------------------------------------------ + // Utility Function AdjTime() + // Description: Will round a given time stamp to an even time according to + // argument. + //------------------------------------------------------------------------------------------ + + public function AdjTime($aTime, $aRound = 0, $aHourType = false, $aMinType = false, $aSecType = false) + { + $y = (int) date('Y', $aTime); + $m = (int) date('m', $aTime); + $d = (int) date('d', $aTime); + $h = (int) date('H', $aTime); + $i = (int) date('i', $aTime); + $s = (int) date('s', $aTime); + if ($aHourType !== false) { + $aHourType %= 6; + $hourAdj = [0 => 1, 1 => 2, 2 => 3, 3 => 4, 4 => 6, 5 => 12]; + if ($aRound == 0) { + $h = floor($h / $hourAdj[$aHourType]) * $hourAdj[$aHourType]; + } else { + if (($h % $hourAdj[$aHourType] == 0) && ($i > 0 || $s > 0)) { + $h++; + } + $h = ceil($h / $hourAdj[$aHourType]) * $hourAdj[$aHourType]; + if ($h >= 24) { + $aTime += 86400; + $y = (int) date('Y', $aTime); + $m = (int) date('m', $aTime); + $d = (int) date('d', $aTime); + $h -= 24; + } + } + $i = 0; + $s = 0; + } elseif ($aMinType !== false) { + $aMinType %= 5; + $minAdj = [0 => 1, 1 => 5, 2 => 10, 3 => 15, 4 => 30]; + if ($aRound == 0) { + $i = floor($i / $minAdj[$aMinType]) * $minAdj[$aMinType]; + } else { + if (($i % $minAdj[$aMinType] == 0) && $s > 0) { + $i++; + } + $i = ceil($i / $minAdj[$aMinType]) * $minAdj[$aMinType]; + if ($i >= 60) { + $aTime += 3600; + $y = (int) date('Y', $aTime); + $m = (int) date('m', $aTime); + $d = (int) date('d', $aTime); + $h = (int) date('H', $aTime); + $i = 0; + } + } + $s = 0; + } elseif ($aSecType !== false) { + $aSecType %= 5; + $secAdj = [0 => 1, 1 => 5, 2 => 10, 3 => 15, 4 => 30]; + if ($aRound == 0) { + $s = floor($s / $secAdj[$aSecType]) * $secAdj[$aSecType]; + } else { + $s = ceil($s / $secAdj[$aSecType] * 1.0) * $secAdj[$aSecType]; + if ($s >= 60) { + $s = 0; + $aTime += 60; + $y = (int) date('Y', $aTime); + $m = (int) date('m', $aTime); + $d = (int) date('d', $aTime); + $h = (int) date('H', $aTime); + $i = (int) date('i', $aTime); + } + } + } + return mktime($h, $i, $s, $m, $d, $y); + } + + //------------------------------------------------------------------------------------------ + // Wrapper for AdjTime that will round a timestamp to an even time rounding + // it downwards. + // Example: AdjStartTime(mktime(18,27,13,2,22,2005),false,2) => 18:20 + //------------------------------------------------------------------------------------------ + public function AdjStartTime($aTime, $aHourType = false, $aMinType = false, $aSecType = false) + { + return $this->AdjTime($aTime, 0, $aHourType, $aMinType, $aSecType); + } + + //------------------------------------------------------------------------------------------ + // Wrapper for AdjTime that will round a timestamp to an even time rounding + // it upwards + // Example: AdjEndTime(mktime(18,27,13,2,22,2005),false,2) => 18:30 + //------------------------------------------------------------------------------------------ + public function AdjEndTime($aTime, $aHourType = false, $aMinType = false, $aSecType = false) + { + return $this->AdjTime($aTime, 1, $aHourType, $aMinType, $aSecType); + } + + //------------------------------------------------------------------------------------------ + // DateAutoScale + // Autoscale a date axis given start and end time + // Returns an array ($start,$end,$major,$minor,$format) + //------------------------------------------------------------------------------------------ + public function DoDateAutoScale($aStartTime, $aEndTime, $aDensity = 0, $aAdjust = true) + { + // Format of array + // array ( Decision point, array( array( Major-scale-step-array ), + // array( Minor-scale-step-array ), + // array( 0=date-adjust, 1=time-adjust, adjustment-alignment) ) + // + $scalePoints = + [ + /* Intervall larger than 10 years */ + SECPERYEAR * 10, [[SECPERYEAR * 5, SECPERYEAR * 2], + [SECPERYEAR], + [0, YEARADJ_1, 0, YEARADJ_1]], + + /* Intervall larger than 2 years */ + SECPERYEAR * 2, [[SECPERYEAR], [SECPERYEAR], + [0, YEARADJ_1]], + + /* Intervall larger than 90 days (approx 3 month) */ + SECPERDAY * 90, [[SECPERDAY * 30, SECPERDAY * 14, SECPERDAY * 7, SECPERDAY], + [SECPERDAY * 5, SECPERDAY * 7, SECPERDAY, SECPERDAY], + [0, MONTHADJ_1, 0, DAYADJ_WEEK, 0, DAYADJ_1, 0, DAYADJ_1]], + + /* Intervall larger than 30 days (approx 1 month) */ + SECPERDAY * 30, [[SECPERDAY * 14, SECPERDAY * 7, SECPERDAY * 2, SECPERDAY], + [SECPERDAY, SECPERDAY, SECPERDAY, SECPERDAY], + [0, DAYADJ_WEEK, 0, DAYADJ_1, 0, DAYADJ_1, 0, DAYADJ_1]], + + /* Intervall larger than 7 days */ + SECPERDAY * 7, [[SECPERDAY, SECPERHOUR * 12, SECPERHOUR * 6, SECPERHOUR * 2], + [SECPERHOUR * 6, SECPERHOUR * 3, SECPERHOUR, SECPERHOUR], + [0, DAYADJ_1, 1, HOURADJ_12, 1, HOURADJ_6, 1, HOURADJ_1]], + + /* Intervall larger than 1 day */ + SECPERDAY, [[SECPERDAY, SECPERHOUR * 12, SECPERHOUR * 6, SECPERHOUR * 2, SECPERHOUR], + [SECPERHOUR * 6, SECPERHOUR * 2, SECPERHOUR, SECPERHOUR, SECPERHOUR], + [1, HOURADJ_12, 1, HOURADJ_6, 1, HOURADJ_1, 1, HOURADJ_1]], + + /* Intervall larger than 12 hours */ + SECPERHOUR * 12, [[SECPERHOUR * 2, SECPERHOUR, SECPERMIN * 30, 900, 600], + [1800, 1800, 900, 300, 300], + [1, HOURADJ_1, 1, MINADJ_30, 1, MINADJ_15, 1, MINADJ_10, 1, MINADJ_5]], + + /* Intervall larger than 2 hours */ + SECPERHOUR * 2, [[SECPERHOUR, SECPERMIN * 30, 900, 600, 300], + [1800, 900, 300, 120, 60], + [1, HOURADJ_1, 1, MINADJ_30, 1, MINADJ_15, 1, MINADJ_10, 1, MINADJ_5]], + + /* Intervall larger than 1 hours */ + SECPERHOUR, [[SECPERMIN * 30, 900, 600, 300], [900, 300, 120, 60], + [1, MINADJ_30, 1, MINADJ_15, 1, MINADJ_10, 1, MINADJ_5]], + + /* Intervall larger than 30 min */ + SECPERMIN * 30, [[SECPERMIN * 15, SECPERMIN * 10, SECPERMIN * 5, SECPERMIN], + [300, 300, 60, 10], + [1, MINADJ_15, 1, MINADJ_10, 1, MINADJ_5, 1, MINADJ_1]], + + /* Intervall larger than 1 min */ + SECPERMIN, [[SECPERMIN, 15, 10, 5], + [15, 5, 2, 1], + [1, MINADJ_1, 1, SECADJ_15, 1, SECADJ_10, 1, SECADJ_5]], + + /* Intervall larger than 10 sec */ + 10, [[5, 2], + [1, 1], + [1, SECADJ_5, 1, SECADJ_1]], + + /* Intervall larger than 1 sec */ + 1, [[1], + [1], + [1, SECADJ_1]], + ]; + + $ns = count($scalePoints); + // Establish major and minor scale units for the date scale + $diff = $aEndTime - $aStartTime; + if ($diff < 1) { + return false; + } + + $done = false; + $i = 0; + while (!$done) { + if ($diff > $scalePoints[2 * $i]) { + // Get major and minor scale for this intervall + $scaleSteps = $scalePoints[2 * $i + 1]; + $major = $scaleSteps[0][min($aDensity, count($scaleSteps[0]) - 1)]; + // Try to find out which minor step looks best + $minor = $scaleSteps[1][min($aDensity, count($scaleSteps[1]) - 1)]; + if ($aAdjust) { + // Find out how we should align the start and end timestamps + $idx = 2 * min($aDensity, floor(count($scaleSteps[2]) / 2) - 1); + if ($scaleSteps[2][$idx] === 0) { + // Use date adjustment + $adj = $scaleSteps[2][$idx + 1]; + if ($adj >= 30) { + $start = $this->AdjStartDate($aStartTime, $adj - 30); + $end = $this->AdjEndDate($aEndTime, $adj - 30); + } elseif ($adj >= 20) { + $start = $this->AdjStartDate($aStartTime, false, $adj - 20); + $end = $this->AdjEndDate($aEndTime, false, $adj - 20); + } else { + $start = $this->AdjStartDate($aStartTime, false, false, $adj); + $end = $this->AdjEndDate($aEndTime, false, false, $adj); + // We add 1 second for date adjustment to make sure we end on 00:00 the following day + // This makes the final major tick be srawn when we step day-by-day instead of ending + // on xx:59:59 which would not draw the final major tick + $end++; + } + } else { + // Use time adjustment + $adj = $scaleSteps[2][$idx + 1]; + if ($adj >= 30) { + $start = $this->AdjStartTime($aStartTime, $adj - 30); + $end = $this->AdjEndTime($aEndTime, $adj - 30); + } elseif ($adj >= 20) { + $start = $this->AdjStartTime($aStartTime, false, $adj - 20); + $end = $this->AdjEndTime($aEndTime, false, $adj - 20); + } else { + $start = $this->AdjStartTime($aStartTime, false, false, $adj); + $end = $this->AdjEndTime($aEndTime, false, false, $adj); + } + } + } + // If the overall date span is larger than 1 day ten we show date + $format = ''; + if (($end - $start) > SECPERDAY) { + $format = 'Y-m-d '; + } + // If the major step is less than 1 day we need to whow hours + min + if ($major < SECPERDAY) { + $format .= 'H:i'; + } + // If the major step is less than 1 min we need to show sec + if ($major < 60) { + $format .= ':s'; + } + $done = true; + } + ++$i; + } + return [$start, $end, $major, $minor, $format]; + } + + // Overrides the automatic determined date format. Must be a valid date() format string + public function SetDateFormat($aFormat) + { + $this->date_format = $aFormat; + $this->ticks->SetLabelDateFormat($this->date_format); + } + + public function AdjustForDST($aFlg = true) + { + $this->ticks->AdjustForDST($aFlg); + } + + public function SetDateAlign($aStartAlign, $aEndAlign = false) + { + if ($aEndAlign === false) { + $aEndAlign = $aStartAlign; + } + $this->iStartAlign = $aStartAlign; + $this->iEndAlign = $aEndAlign; + } + + public function SetTimeAlign($aStartAlign, $aEndAlign = false) + { + if ($aEndAlign === false) { + $aEndAlign = $aStartAlign; + } + $this->iStartTimeAlign = $aStartAlign; + $this->iEndTimeAlign = $aEndAlign; + } + + public function AutoScale($img, $aStartTime, $aEndTime, $aNumSteps, $_adummy = false) + { + // We need to have one dummy argument to make the signature of AutoScale() + // identical to LinearScale::AutoScale + if ($aStartTime == $aEndTime) { + // Special case when we only have one data point. + // Create a small artifical intervall to do the autoscaling + $aStartTime -= 10; + $aEndTime += 10; + } + $done = false; + $i = 0; + while (!$done && $i < 5) { + list($adjstart, $adjend, $maj, $min, $format) = $this->DoDateAutoScale($aStartTime, $aEndTime, $i); + $n = floor(($adjend - $adjstart) / $maj); + if ($n * 1.7 > $aNumSteps) { + $done = true; + } + $i++; + } + + /* + if( 0 ) { // DEBUG + echo " Start =".date("Y-m-d H:i:s",$aStartTime)."
        "; + echo " End =".date("Y-m-d H:i:s",$aEndTime)."
        "; + echo "Adj Start =".date("Y-m-d H:i:s",$adjstart)."
        "; + echo "Adj End =".date("Y-m-d H:i:s",$adjend)."

        "; + echo "Major = $maj s, ".floor($maj/60)."min, ".floor($maj/3600)."h, ".floor($maj/86400)."day
        "; + echo "Min = $min s, ".floor($min/60)."min, ".floor($min/3600)."h, ".floor($min/86400)."day
        "; + echo "Format=$format

        "; + } + */ + + if ($this->iStartTimeAlign !== false && $this->iStartAlign !== false) { + Util\JpGraphError::RaiseL(3001); + //('It is only possible to use either SetDateAlign() or SetTimeAlign() but not both'); + } + + if ($this->iStartTimeAlign !== false) { + if ($this->iStartTimeAlign >= 30) { + $adjstart = $this->AdjStartTime($aStartTime, $this->iStartTimeAlign - 30); + } elseif ($this->iStartTimeAlign >= 20) { + $adjstart = $this->AdjStartTime($aStartTime, false, $this->iStartTimeAlign - 20); + } else { + $adjstart = $this->AdjStartTime($aStartTime, false, false, $this->iStartTimeAlign); + } + } + if ($this->iEndTimeAlign !== false) { + if ($this->iEndTimeAlign >= 30) { + $adjend = $this->AdjEndTime($aEndTime, $this->iEndTimeAlign - 30); + } elseif ($this->iEndTimeAlign >= 20) { + $adjend = $this->AdjEndTime($aEndTime, false, $this->iEndTimeAlign - 20); + } else { + $adjend = $this->AdjEndTime($aEndTime, false, false, $this->iEndTimeAlign); + } + } + + if ($this->iStartAlign !== false) { + if ($this->iStartAlign >= 30) { + $adjstart = $this->AdjStartDate($aStartTime, $this->iStartAlign - 30); + } elseif ($this->iStartAlign >= 20) { + $adjstart = $this->AdjStartDate($aStartTime, false, $this->iStartAlign - 20); + } else { + $adjstart = $this->AdjStartDate($aStartTime, false, false, $this->iStartAlign); + } + } + if ($this->iEndAlign !== false) { + if ($this->iEndAlign >= 30) { + $adjend = $this->AdjEndDate($aEndTime, $this->iEndAlign - 30); + } elseif ($this->iEndAlign >= 20) { + $adjend = $this->AdjEndDate($aEndTime, false, $this->iEndAlign - 20); + } else { + $adjend = $this->AdjEndDate($aEndTime, false, false, $this->iEndAlign); + } + } + $this->Update($img, $adjstart, $adjend); + if (!$this->ticks->IsSpecified()) { + $this->ticks->Set($maj, $min); + } + + if ($this->date_format == '') { + $this->ticks->SetLabelDateFormat($format); + } else { + $this->ticks->SetLabelDateFormat($this->date_format); + } + + } +} diff --git a/vendor/amenadiel/jpgraph/src/graph/GanttActivityInfo.php b/vendor/amenadiel/jpgraph/src/graph/GanttActivityInfo.php new file mode 100644 index 0000000000..ed6d219dc0 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/GanttActivityInfo.php @@ -0,0 +1,348 @@ +vgrid = new LineProperty(); + } + + public function Hide($aF = true) + { + $this->iShow = !$aF; + } + + public function Show($aF = true) + { + $this->iShow = $aF; + } + + // Specify font + public function SetFont($aFFamily, $aFStyle = FS_NORMAL, $aFSize = 10) + { + $this->iFFamily = $aFFamily; + $this->iFStyle = $aFStyle; + $this->iFSize = $aFSize; + } + + public function SetStyle($aStyle) + { + $this->iStyle = $aStyle; + } + + public function SetColumnMargin($aLeft, $aRight) + { + $this->iLeftColMargin = $aLeft; + $this->iRightColMargin = $aRight; + } + + public function SetFontColor($aFontColor) + { + $this->iFontColor = $aFontColor; + } + + public function SetColor($aColor) + { + $this->iColor = $aColor; + } + + public function SetBackgroundColor($aColor) + { + $this->iBackgroundColor = $aColor; + } + + public function SetColTitles($aTitles, $aWidth = null) + { + $this->iTitles = $aTitles; + $this->iWidth = $aWidth; + } + + public function SetMinColWidth($aWidths) + { + $n = min(count($this->iTitles), count($aWidths)); + for ($i = 0; $i < $n; ++$i) { + if (!empty($aWidths[$i])) { + if (empty($this->iWidth[$i])) { + $this->iWidth[$i] = $aWidths[$i]; + } else { + $this->iWidth[$i] = max($this->iWidth[$i], $aWidths[$i]); + } + } + } + } + + public function GetWidth($aImg) + { + $txt = new TextProperty(); + $txt->SetFont($this->iFFamily, $this->iFStyle, $this->iFSize); + $n = count($this->iTitles); + $rm = $this->iRightColMargin; + $w = 0; + for ($h = 0, $i = 0; $i < $n; ++$i) { + $w += $this->iLeftColMargin; + $txt->Set($this->iTitles[$i]); + if (!empty($this->iWidth[$i])) { + $w1 = max($txt->GetWidth($aImg) + $rm, $this->iWidth[$i]); + } else { + $w1 = $txt->GetWidth($aImg) + $rm; + } + $this->iWidth[$i] = $w1; + $w += $w1; + $h = max($h, $txt->GetHeight($aImg)); + } + $this->iHeight = $h + $this->iTopHeaderMargin; + $txt = ''; + return $w; + } + + public function GetColStart($aImg, &$aStart, $aAddLeftMargin = false) + { + $n = count($this->iTitles); + $adj = $aAddLeftMargin ? $this->iLeftColMargin : 0; + $aStart = array($aImg->left_margin + $adj); + for ($i = 1; $i < $n; ++$i) { + $aStart[$i] = $aStart[$i - 1] + $this->iLeftColMargin + $this->iWidth[$i - 1]; + } + } + + // Adjust headers left, right or centered + public function SetHeaderAlign($aAlign) + { + $this->iHeaderAlign = $aAlign; + } + + public function Stroke($aImg, $aXLeft, $aYTop, $aXRight, $aYBottom, $aUseTextHeight = false) + { + + if (!$this->iShow) { + return; + } + + $txt = new TextProperty(); + $txt->SetFont($this->iFFamily, $this->iFStyle, $this->iFSize); + $txt->SetColor($this->iFontColor); + $txt->SetAlign($this->iHeaderAlign, 'top'); + $n = count($this->iTitles); + + if ($n == 0) { + return; + } + + $x = $aXLeft; + $h = $this->iHeight; + $yTop = $aUseTextHeight ? $aYBottom - $h - $this->iTopColMargin - $this->iBottomColMargin : $aYTop; + + if ($h < 0) { + Util\JpGraphError::RaiseL(6001); + //('Internal error. Height for ActivityTitles is < 0'); + } + + $aImg->SetLineWeight(1); + // Set background color + $aImg->SetColor($this->iBackgroundColor); + $aImg->FilledRectangle($aXLeft, $yTop, $aXRight, $aYBottom - 1); + + if ($this->iStyle == 1) { + // Make a 3D effect + $aImg->SetColor('white'); + $aImg->Line($aXLeft, $yTop + 1, $aXRight, $yTop + 1); + } + + for ($i = 0; $i < $n; ++$i) { + if ($this->iStyle == 1) { + // Make a 3D effect + $aImg->SetColor('white'); + $aImg->Line($x + 1, $yTop, $x + 1, $aYBottom); + } + $x += $this->iLeftColMargin; + $txt->Set($this->iTitles[$i]); + + // Adjust the text anchor position according to the choosen alignment + $xp = $x; + if ($this->iHeaderAlign == 'center') { + $xp = (($x - $this->iLeftColMargin) + ($x + $this->iWidth[$i])) / 2; + } elseif ($this->iHeaderAlign == 'right') { + $xp = $x + $this->iWidth[$i] - $this->iRightColMargin; + } + + $txt->Stroke($aImg, $xp, $yTop + $this->iTopHeaderMargin); + $x += $this->iWidth[$i]; + if ($i < $n - 1) { + $aImg->SetColor($this->iColor); + $aImg->Line($x, $yTop, $x, $aYBottom); + } + } + + $aImg->SetColor($this->iColor); + $aImg->Line($aXLeft, $yTop, $aXRight, $yTop); + + // Stroke vertical column dividers + $cols = array(); + $this->GetColStart($aImg, $cols); + $n = count($cols); + for ($i = 1; $i < $n; ++$i) { + $this->vgrid->Stroke($aImg, $cols[$i], $aYBottom, $cols[$i], + $aImg->height - $aImg->bottom_margin); + } + } +} + +//=================================================== +// Global cache for builtin images +//=================================================== +$_gPredefIcons = new PredefIcons(); + +// diff --git a/vendor/amenadiel/jpgraph/src/graph/GanttGraph.php b/vendor/amenadiel/jpgraph/src/graph/GanttGraph.php new file mode 100644 index 0000000000..493fa904f5 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/GanttGraph.php @@ -0,0 +1,866 @@ +scale = new GanttScale($this->img); + + // Default margins + $this->img->SetMargin(15, 17, 25, 15); + + $this->hgrid = new HorizontalGridLine(); + + $this->scale->ShowHeaders(GANTT_HWEEK | GANTT_HDAY); + $this->SetBox(); + } + + //--------------- + // PUBLIC METHODS + + // + + public function SetSimpleFont($aFont, $aSize) + { + $this->iSimpleFont = $aFont; + $this->iSimpleFontSize = $aSize; + } + + public function SetSimpleStyle($aBand, $aColor, $aBkgColor) + { + $this->iSimpleStyle = $aBand; + $this->iSimpleColor = $aColor; + $this->iSimpleBkgColor = $aBkgColor; + } + + // A utility function to help create basic Gantt charts + public function CreateSimple($data, $constrains = array(), $progress = array()) + { + $num = count($data); + for ($i = 0; $i < $num; ++$i) { + switch ($data[$i][1]) { + case ACTYPE_GROUP: + // Create a slightly smaller height bar since the + // "wings" at the end will make it look taller + $a = new GanttBar($data[$i][0], $data[$i][2], $data[$i][3], $data[$i][4], '', 8); + $a->title->SetFont($this->iSimpleFont, FS_BOLD, $this->iSimpleFontSize); + $a->rightMark->Show(); + $a->rightMark->SetType(MARK_RIGHTTRIANGLE); + $a->rightMark->SetWidth(8); + $a->rightMark->SetColor('black'); + $a->rightMark->SetFillColor('black'); + + $a->leftMark->Show(); + $a->leftMark->SetType(MARK_LEFTTRIANGLE); + $a->leftMark->SetWidth(8); + $a->leftMark->SetColor('black'); + $a->leftMark->SetFillColor('black'); + + $a->SetPattern(BAND_SOLID, 'black'); + $csimpos = 6; + break; + + case ACTYPE_NORMAL: + $a = new GanttBar($data[$i][0], $data[$i][2], $data[$i][3], $data[$i][4], '', 10); + $a->title->SetFont($this->iSimpleFont, FS_NORMAL, $this->iSimpleFontSize); + $a->SetPattern($this->iSimpleStyle, $this->iSimpleColor); + $a->SetFillColor($this->iSimpleBkgColor); + // Check if this activity should have a constrain line + $n = count($constrains); + for ($j = 0; $j < $n; ++$j) { + if (empty($constrains[$j]) || (count($constrains[$j]) != 3)) { + Util\JpGraphError::RaiseL(6003, $j); + //("Invalid format for Constrain parameter at index=$j in CreateSimple(). Parameter must start with index 0 and contain arrays of (Row,Constrain-To,Constrain-Type)"); + } + if ($constrains[$j][0] == $data[$i][0]) { + $a->SetConstrain($constrains[$j][1], $constrains[$j][2], 'black', ARROW_S2, ARROWT_SOLID); + } + } + + // Check if this activity have a progress bar + $n = count($progress); + for ($j = 0; $j < $n; ++$j) { + + if (empty($progress[$j]) || (count($progress[$j]) != 2)) { + Util\JpGraphError::RaiseL(6004, $j); + //("Invalid format for Progress parameter at index=$j in CreateSimple(). Parameter must start with index 0 and contain arrays of (Row,Progress)"); + } + if ($progress[$j][0] == $data[$i][0]) { + $a->progress->Set($progress[$j][1]); + $a->progress->SetPattern($this->iSimpleProgressStyle, + $this->iSimpleProgressColor); + $a->progress->SetFillColor($this->iSimpleProgressBkgColor); + //$a->progress->SetPattern($progress[$j][2],$progress[$j][3]); + break; + } + } + $csimpos = 6; + break; + + case ACTYPE_MILESTONE: + $a = new MileStone($data[$i][0], $data[$i][2], $data[$i][3]); + $a->title->SetFont($this->iSimpleFont, FS_NORMAL, $this->iSimpleFontSize); + $a->caption->SetFont($this->iSimpleFont, FS_NORMAL, $this->iSimpleFontSize); + $csimpos = 5; + break; + default: + die('Unknown activity type'); + break; + } + + // Setup caption + $a->caption->Set($data[$i][$csimpos - 1]); + + // Check if this activity should have a CSIM target�? + if (!empty($data[$i][$csimpos])) { + $a->SetCSIMTarget($data[$i][$csimpos]); + $a->SetCSIMAlt($data[$i][$csimpos + 1]); + } + if (!empty($data[$i][$csimpos + 2])) { + $a->title->SetCSIMTarget($data[$i][$csimpos + 2]); + $a->title->SetCSIMAlt($data[$i][$csimpos + 3]); + } + + $this->Add($a); + } + } + + // Set user specified scale zoom factor when auto sizing is used + public function SetZoomFactor($aZoom) + { + $this->iZoomFactor = $aZoom; + } + + // Set what headers should be shown + public function ShowHeaders($aFlg) + { + $this->scale->ShowHeaders($aFlg); + } + + // Specify the fraction of the font height that should be added + // as vertical margin + public function SetLabelVMarginFactor($aVal) + { + $this->iLabelVMarginFactor = $aVal; + } + + // Synonym to the method above + public function SetVMarginFactor($aVal) + { + $this->iLabelVMarginFactor = $aVal; + } + + // Add a new Gantt object + public function Add($aObject) + { + if (is_array($aObject) && count($aObject) > 0) { + $cl = $aObject[0]; + if (class_exists('IconPlot', false) && ($cl instanceof IconPlot)) { + $this->AddIcon($aObject); + } elseif (class_exists('Text', false) && ($cl instanceof Text)) { + $this->AddText($aObject); + } else { + $n = count($aObject); + for ($i = 0; $i < $n; ++$i) { + $this->iObj[] = $aObject[$i]; + } + + } + } else { + if (class_exists('IconPlot', false) && ($aObject instanceof IconPlot)) { + $this->AddIcon($aObject); + } elseif (class_exists('Text', false) && ($aObject instanceof Text)) { + $this->AddText($aObject); + } else { + $this->iObj[] = $aObject; + } + } + } + + public function StrokeTexts() + { + // Stroke any user added text objects + if ($this->texts != null) { + $n = count($this->texts); + for ($i = 0; $i < $n; ++$i) { + if ($this->texts[$i]->iScalePosX !== null && $this->texts[$i]->iScalePosY !== null) { + $x = $this->scale->TranslateDate($this->texts[$i]->iScalePosX); + $y = $this->scale->TranslateVertPos($this->texts[$i]->iScalePosY); + $y -= $this->scale->GetVertSpacing() / 2; + } else { + $x = $y = null; + } + $this->texts[$i]->Stroke($this->img, $x, $y); + } + } + } + + // Override inherit method from Graph and give a warning message + public function SetScale($aAxisType, $aYMin = 1, $aYMax = 1, $aXMin = 1, $aXMax = 1) + { + Util\JpGraphError::RaiseL(6005); + //("SetScale() is not meaningfull with Gantt charts."); + } + + // Specify the date range for Gantt graphs (if this is not set it will be + // automtically determined from the input data) + public function SetDateRange($aStart, $aEnd) + { + // Adjust the start and end so that the indicate the + // begining and end of respective start and end days + if (strpos($aStart, ':') === false) { + $aStart = date('Y-m-d 00:00', strtotime($aStart)); + } + + if (strpos($aEnd, ':') === false) { + $aEnd = date('Y-m-d 23:59', strtotime($aEnd)); + } + + $this->scale->SetRange($aStart, $aEnd); + } + + // Get the maximum width of the activity titles columns for the bars + // The name is lightly misleading since we from now on can have + // multiple columns in the label section. When this was first written + // it only supported a single label, hence the name. + public function GetMaxLabelWidth() + { + $m = 10; + if ($this->iObj != null) { + $marg = $this->scale->actinfo->iLeftColMargin + $this->scale->actinfo->iRightColMargin; + $n = count($this->iObj); + for ($i = 0; $i < $n; ++$i) { + if (!empty($this->iObj[$i]->title)) { + if ($this->iObj[$i]->title->HasTabs()) { + list($tot, $w) = $this->iObj[$i]->title->GetWidth($this->img, true); + $m = max($m, $tot); + } else { + $m = max($m, $this->iObj[$i]->title->GetWidth($this->img)); + } + + } + } + } + return $m; + } + + // Get the maximum height of the titles for the bars + public function GetMaxLabelHeight() + { + $m = 10; + if ($this->iObj != null) { + $n = count($this->iObj); + // We can not include the title of GnttVLine since that title is stroked at the bottom + // of the Gantt bar and not in the activity title columns + for ($i = 0; $i < $n; ++$i) { + if (!empty($this->iObj[$i]->title) && !($this->iObj[$i] instanceof GanttVLine)) { + $m = max($m, $this->iObj[$i]->title->GetHeight($this->img)); + } + } + } + return $m; + } + + public function GetMaxBarAbsHeight() + { + $m = 0; + if ($this->iObj != null) { + $m = $this->iObj[0]->GetAbsHeight($this->img); + $n = count($this->iObj); + for ($i = 1; $i < $n; ++$i) { + $m = max($m, $this->iObj[$i]->GetAbsHeight($this->img)); + } + } + return $m; + } + + // Get the maximum used line number (vertical position) for bars + public function GetBarMaxLineNumber() + { + $m = 1; + if ($this->iObj != null) { + $m = $this->iObj[0]->GetLineNbr(); + $n = count($this->iObj); + for ($i = 1; $i < $n; ++$i) { + $m = max($m, $this->iObj[$i]->GetLineNbr()); + } + } + return $m; + } + + // Get the minumum and maximum used dates for all bars + public function GetBarMinMax() + { + $start = 0; + $n = count($this->iObj); + while ($start < $n && $this->iObj[$start]->GetMaxDate() === false) { + ++$start; + } + + if ($start >= $n) { + Util\JpGraphError::RaiseL(6006); + //('Cannot autoscale Gantt chart. No dated activities exist. [GetBarMinMax() start >= n]'); + } + + $max = $this->scale->NormalizeDate($this->iObj[$start]->GetMaxDate()); + $min = $this->scale->NormalizeDate($this->iObj[$start]->GetMinDate()); + + for ($i = $start + 1; $i < $n; ++$i) { + $rmax = $this->scale->NormalizeDate($this->iObj[$i]->GetMaxDate()); + if ($rmax != false) { + $max = Max($max, $rmax); + } + + $rmin = $this->scale->NormalizeDate($this->iObj[$i]->GetMinDate()); + if ($rmin != false) { + $min = Min($min, $rmin); + } + + } + $minDate = date("Y-m-d", $min); + $min = strtotime($minDate); + $maxDate = date("Y-m-d 23:59", $max); + $max = strtotime($maxDate); + return array($min, $max); + } + + // Create a new auto sized canvas if the user hasn't specified a size + // The size is determined by what scale the user has choosen and hence + // the minimum width needed to display the headers. Some margins are + // also added to make it better looking. + public function AutoSize() + { + + if ($this->img->img == null) { + // The predefined left, right, top, bottom margins. + // Note that the top margin might incease depending on + // the title. + $hadj = $vadj = 0; + if ($this->doshadow) { + $hadj = $this->shadow_width; + $vadj = $this->shadow_width + 5; + } + + $lm = $this->img->left_margin; + $rm = $this->img->right_margin + $hadj; + $rm += 2; + $tm = $this->img->top_margin; + $bm = $this->img->bottom_margin + $vadj; + $bm += 2; + + // If there are any added GanttVLine we must make sure that the + // bottom margin is wide enough to hold a title. + $n = count($this->iObj); + for ($i = 0; $i < $n; ++$i) { + if ($this->iObj[$i] instanceof GanttVLine) { + $bm = max($bm, $this->iObj[$i]->title->GetHeight($this->img) + 10); + } + } + + // First find out the height + $n = $this->GetBarMaxLineNumber() + 1; + $m = max($this->GetMaxLabelHeight(), $this->GetMaxBarAbsHeight()); + $height = $n * ((1 + $this->iLabelVMarginFactor) * $m); + + // Add the height of the scale titles + $h = $this->scale->GetHeaderHeight(); + $height += $h; + + // Calculate the top margin needed for title and subtitle + if ($this->title->t != "") { + $tm += $this->title->GetFontHeight($this->img); + } + if ($this->subtitle->t != "") { + $tm += $this->subtitle->GetFontHeight($this->img); + } + + // ...and then take the bottom and top plot margins into account + $height += $tm + $bm + $this->scale->iTopPlotMargin + $this->scale->iBottomPlotMargin; + // Now find the minimum width for the chart required + + // If day scale or smaller is shown then we use the day font width + // as the base size unit. + // If only weeks or above is displayed we use a modified unit to + // get a smaller image. + if ($this->scale->IsDisplayHour() || $this->scale->IsDisplayMinute()) { + // Add 2 pixel margin on each side + $fw = $this->scale->day->GetFontWidth($this->img) + 4; + } elseif ($this->scale->IsDisplayWeek()) { + $fw = 8; + } elseif ($this->scale->IsDisplayMonth()) { + $fw = 4; + } else { + $fw = 2; + } + + $nd = $this->scale->GetNumberOfDays(); + + if ($this->scale->IsDisplayDay()) { + // If the days are displayed we also need to figure out + // how much space each day's title will require. + switch ($this->scale->day->iStyle) { + case DAYSTYLE_LONG: + $txt = "Monday"; + break; + case DAYSTYLE_LONGDAYDATE1: + $txt = "Monday 23 Jun"; + break; + case DAYSTYLE_LONGDAYDATE2: + $txt = "Monday 23 Jun 2003"; + break; + case DAYSTYLE_SHORT: + $txt = "Mon"; + break; + case DAYSTYLE_SHORTDAYDATE1: + $txt = "Mon 23/6"; + break; + case DAYSTYLE_SHORTDAYDATE2: + $txt = "Mon 23 Jun"; + break; + case DAYSTYLE_SHORTDAYDATE3: + $txt = "Mon 23"; + break; + case DAYSTYLE_SHORTDATE1: + $txt = "23/6"; + break; + case DAYSTYLE_SHORTDATE2: + $txt = "23 Jun"; + break; + case DAYSTYLE_SHORTDATE3: + $txt = "Mon 23"; + break; + case DAYSTYLE_SHORTDATE4: + $txt = "88"; + break; + case DAYSTYLE_CUSTOM: + $txt = date($this->scale->day->iLabelFormStr, strtotime('2003-12-20 18:00')); + break; + case DAYSTYLE_ONELETTER: + default: + $txt = "M"; + break; + } + $fw = $this->scale->day->GetStrWidth($this->img, $txt) + 6; + } + + // If we have hours enabled we must make sure that each day has enough + // space to fit the number of hours to be displayed. + if ($this->scale->IsDisplayHour()) { + // Depending on what format the user has choose we need different amount + // of space. We therefore create a typical string for the choosen format + // and determine the length of that string. + switch ($this->scale->hour->iStyle) { + case HOURSTYLE_HMAMPM: + $txt = '12:00pm'; + break; + case HOURSTYLE_H24: + // 13 + $txt = '24'; + break; + case HOURSTYLE_HAMPM: + $txt = '12pm'; + break; + case HOURSTYLE_CUSTOM: + $txt = date($this->scale->hour->iLabelFormStr, strtotime('2003-12-20 18:00')); + break; + case HOURSTYLE_HM24: + default: + $txt = '24:00'; + break; + } + + $hfw = $this->scale->hour->GetStrWidth($this->img, $txt) + 6; + $mw = $hfw; + if ($this->scale->IsDisplayMinute()) { + // Depending on what format the user has choose we need different amount + // of space. We therefore create a typical string for the choosen format + // and determine the length of that string. + switch ($this->scale->minute->iStyle) { + case HOURSTYLE_CUSTOM: + $txt2 = date($this->scale->minute->iLabelFormStr, strtotime('2005-05-15 18:55')); + break; + case MINUTESTYLE_MM: + default: + $txt2 = '15'; + break; + } + + $mfw = $this->scale->minute->GetStrWidth($this->img, $txt2) + 6; + $n2 = ceil(60 / $this->scale->minute->GetIntervall()); + $mw = $n2 * $mfw; + } + $hfw = $hfw < $mw ? $mw : $hfw; + $n = ceil(24 * 60 / $this->scale->TimeToMinutes($this->scale->hour->GetIntervall())); + $hw = $n * $hfw; + $fw = $fw < $hw ? $hw : $fw; + } + + // We need to repeat this code block here as well. + // THIS iS NOT A MISTAKE ! + // We really need it since we need to adjust for minutes both in the case + // where hour scale is shown and when it is not shown. + + if ($this->scale->IsDisplayMinute()) { + // Depending on what format the user has choose we need different amount + // of space. We therefore create a typical string for the choosen format + // and determine the length of that string. + switch ($this->scale->minute->iStyle) { + case HOURSTYLE_CUSTOM: + $txt = date($this->scale->minute->iLabelFormStr, strtotime('2005-05-15 18:55')); + break; + case MINUTESTYLE_MM: + default: + $txt = '15'; + break; + } + + $mfw = $this->scale->minute->GetStrWidth($this->img, $txt) + 6; + $n = ceil(60 / $this->scale->TimeToMinutes($this->scale->minute->GetIntervall())); + $mw = $n * $mfw; + $fw = $fw < $mw ? $mw : $fw; + } + + // If we display week we must make sure that 7*$fw is enough + // to fit up to 10 characters of the week font (if the week is enabled) + if ($this->scale->IsDisplayWeek()) { + // Depending on what format the user has choose we need different amount + // of space + $fsw = strlen($this->scale->week->iLabelFormStr); + if ($this->scale->week->iStyle == WEEKSTYLE_FIRSTDAY2WNBR) { + $fsw += 8; + } elseif ($this->scale->week->iStyle == WEEKSTYLE_FIRSTDAYWNBR) { + $fsw += 7; + } else { + $fsw += 4; + } + + $ww = $fsw * $this->scale->week->GetFontWidth($this->img); + if (7 * $fw < $ww) { + $fw = ceil($ww / 7); + } + } + + if (!$this->scale->IsDisplayDay() && !$this->scale->IsDisplayHour() && + !(($this->scale->week->iStyle == WEEKSTYLE_FIRSTDAYWNBR || + $this->scale->week->iStyle == WEEKSTYLE_FIRSTDAY2WNBR) && $this->scale->IsDisplayWeek())) { + // If we don't display the individual days we can shrink the + // scale a little bit. This is a little bit pragmatic at the + // moment and should be re-written to take into account + // a) What scales exactly are shown and + // b) what format do they use so we know how wide we need to + // make each scale text space at minimum. + $fw /= 2; + if (!$this->scale->IsDisplayWeek()) { + $fw /= 1.8; + } + } + + $cw = $this->GetMaxActInfoColWidth(); + $this->scale->actinfo->SetMinColWidth($cw); + if ($this->img->width <= 0) { + // Now determine the width for the activity titles column + + // Firdst find out the maximum width of each object column + $titlewidth = max(max($this->GetMaxLabelWidth(), + $this->scale->tableTitle->GetWidth($this->img)), + $this->scale->actinfo->GetWidth($this->img)); + + // Add the width of the vertivcal divider line + $titlewidth += $this->scale->divider->iWeight * 2; + + // Adjust the width by the user specified zoom factor + $fw *= $this->iZoomFactor; + + // Now get the total width taking + // titlewidth, left and rigt margin, dayfont size + // into account + $width = $titlewidth + $nd * $fw + $lm + $rm; + } else { + $width = $this->img->width; + } + + $width = round($width); + $height = round($height); + // Make a sanity check on image size + if ($width > MAX_GANTTIMG_SIZE_W || $height > MAX_GANTTIMG_SIZE_H) { + Util\JpGraphError::RaiseL(6007, $width, $height); + //("Sanity check for automatic Gantt chart size failed. Either the width (=$width) or height (=$height) is larger than MAX_GANTTIMG_SIZE. This could potentially be caused by a wrong date in one of the activities."); + } + $this->img->CreateImgCanvas($width, $height); + $this->img->SetMargin($lm, $rm, $tm, $bm); + } + } + + // Return an array width the maximum width for each activity + // column. This is used when we autosize the columns where we need + // to find out the maximum width of each column. In order to do that we + // must walk through all the objects, sigh... + public function GetMaxActInfoColWidth() + { + $n = count($this->iObj); + if ($n == 0) { + return; + } + + $w = array(); + $m = $this->scale->actinfo->iLeftColMargin + $this->scale->actinfo->iRightColMargin; + + for ($i = 0; $i < $n; ++$i) { + $tmp = $this->iObj[$i]->title->GetColWidth($this->img, $m); + $nn = count($tmp); + for ($j = 0; $j < $nn; ++$j) { + if (empty($w[$j])) { + $w[$j] = $tmp[$j]; + } else { + $w[$j] = max($w[$j], $tmp[$j]); + } + + } + } + return $w; + } + + // Stroke the gantt chart + public function Stroke($aStrokeFileName = "") + { + + // If the filename is the predefined value = '_csim_special_' + // we assume that the call to stroke only needs to do enough + // to correctly generate the CSIM maps. + // We use this variable to skip things we don't strictly need + // to do to generate the image map to improve performance + // a best we can. Therefor you will see a lot of tests !$_csim in the + // code below. + $_csim = ($aStrokeFileName === _CSIM_SPECIALFILE); + + // Should we autoscale dates? + + if (!$this->scale->IsRangeSet()) { + list($min, $max) = $this->GetBarMinMax(); + $this->scale->SetRange($min, $max); + } + + $this->scale->AdjustStartEndDay(); + + // Check if we should autoscale the image + $this->AutoSize(); + + // Should we start from the top or just spread the bars out even over the + // available height + $this->scale->SetVertLayout($this->iLayout); + if ($this->iLayout == GANTT_FROMTOP) { + $maxheight = max($this->GetMaxLabelHeight(), $this->GetMaxBarAbsHeight()); + $this->scale->SetVertSpacing($maxheight * (1 + $this->iLabelVMarginFactor)); + } + // If it hasn't been set find out the maximum line number + if ($this->scale->iVertLines == -1) { + $this->scale->iVertLines = $this->GetBarMaxLineNumber() + 1; + } + + $maxwidth = max($this->scale->actinfo->GetWidth($this->img), + max($this->GetMaxLabelWidth(), + $this->scale->tableTitle->GetWidth($this->img))); + + $this->scale->SetLabelWidth($maxwidth + $this->scale->divider->iWeight); //*(1+$this->iLabelHMarginFactor)); + + if (!$_csim) { + $this->StrokePlotArea(); + if ($this->iIconDepth == DEPTH_BACK) { + $this->StrokeIcons(); + } + } + + $this->scale->Stroke(); + + if (!$_csim) { + // Due to a minor off by 1 bug we need to temporarily adjust the margin + $this->img->right_margin--; + $this->StrokePlotBox(); + $this->img->right_margin++; + } + + // Stroke Grid line + $this->hgrid->Stroke($this->img, $this->scale); + + $n = count($this->iObj); + for ($i = 0; $i < $n; ++$i) { + //$this->iObj[$i]->SetLabelLeftMargin(round($maxwidth*$this->iLabelHMarginFactor/2)); + $this->iObj[$i]->Stroke($this->img, $this->scale); + } + + $this->StrokeTitles(); + + if (!$_csim) { + $this->StrokeConstrains(); + $this->footer->Stroke($this->img); + + if ($this->iIconDepth == DEPTH_FRONT) { + $this->StrokeIcons(); + } + + // Stroke all added user texts + $this->StrokeTexts(); + + // Should we do any final image transformation + if ($this->iImgTrans) { + if (!class_exists('ImgTrans', false)) { + require_once 'jpgraph_imgtrans.php'; + } + + $tform = new ImgTrans($this->img->img); + $this->img->img = $tform->Skew3D($this->iImgTransHorizon, $this->iImgTransSkewDist, + $this->iImgTransDirection, $this->iImgTransHighQ, + $this->iImgTransMinSize, $this->iImgTransFillColor, + $this->iImgTransBorder); + } + + // If the filename is given as the special "__handle" + // then the image handler is returned and the image is NOT + // streamed back + if ($aStrokeFileName == _IMG_HANDLER) { + return $this->img->img; + } else { + // Finally stream the generated picture + $this->cache->PutAndStream($this->img, $this->cache_name, $this->inline, + $aStrokeFileName); + } + } + } + + public function StrokeConstrains() + { + $n = count($this->iObj); + + // Stroke all constrains + for ($i = 0; $i < $n; ++$i) { + + // Some gantt objects may not have constraints associated with them + // for example we can add IconPlots which doesn't have this property. + if (empty($this->iObj[$i]->constraints)) { + continue; + } + + $numConstrains = count($this->iObj[$i]->constraints); + + for ($k = 0; $k < $numConstrains; $k++) { + $vpos = $this->iObj[$i]->constraints[$k]->iConstrainRow; + if ($vpos >= 0) { + $c1 = $this->iObj[$i]->iConstrainPos; + + // Find out which object is on the target row + $targetobj = -1; + for ($j = 0; $j < $n && $targetobj == -1; ++$j) { + if ($this->iObj[$j]->iVPos == $vpos) { + $targetobj = $j; + } + } + if ($targetobj == -1) { + Util\JpGraphError::RaiseL(6008, $this->iObj[$i]->iVPos, $vpos); + //('You have specifed a constrain from row='.$this->iObj[$i]->iVPos.' to row='.$vpos.' which does not have any activity.'); + } + $c2 = $this->iObj[$targetobj]->iConstrainPos; + if (count($c1) == 4 && count($c2) == 4) { + switch ($this->iObj[$i]->constraints[$k]->iConstrainType) { + case CONSTRAIN_ENDSTART: + if ($c1[1] < $c2[1]) { + $link = new GanttLink($c1[2], $c1[3], $c2[0], $c2[1]); + } else { + $link = new GanttLink($c1[2], $c1[1], $c2[0], $c2[3]); + } + $link->SetPath(3); + break; + case CONSTRAIN_STARTEND: + if ($c1[1] < $c2[1]) { + $link = new GanttLink($c1[0], $c1[3], $c2[2], $c2[1]); + } else { + $link = new GanttLink($c1[0], $c1[1], $c2[2], $c2[3]); + } + $link->SetPath(0); + break; + case CONSTRAIN_ENDEND: + if ($c1[1] < $c2[1]) { + $link = new GanttLink($c1[2], $c1[3], $c2[2], $c2[1]); + } else { + $link = new GanttLink($c1[2], $c1[1], $c2[2], $c2[3]); + } + $link->SetPath(1); + break; + case CONSTRAIN_STARTSTART: + if ($c1[1] < $c2[1]) { + $link = new GanttLink($c1[0], $c1[3], $c2[0], $c2[1]); + } else { + $link = new GanttLink($c1[0], $c1[1], $c2[0], $c2[3]); + } + $link->SetPath(3); + break; + default: + Util\JpGraphError::RaiseL(6009, $this->iObj[$i]->iVPos, $vpos); + //('Unknown constrain type specified from row='.$this->iObj[$i]->iVPos.' to row='.$vpos); + break; + } + + $link->SetColor($this->iObj[$i]->constraints[$k]->iConstrainColor); + $link->SetArrow($this->iObj[$i]->constraints[$k]->iConstrainArrowSize, + $this->iObj[$i]->constraints[$k]->iConstrainArrowType); + + $link->Stroke($this->img); + } + } + } + } + } + + public function GetCSIMAreas() + { + if (!$this->iHasStroked) { + $this->Stroke(_CSIM_SPECIALFILE); + } + + $csim = $this->title->GetCSIMAreas(); + $csim .= $this->subtitle->GetCSIMAreas(); + $csim .= $this->subsubtitle->GetCSIMAreas(); + + $n = count($this->iObj); + for ($i = $n - 1; $i >= 0; --$i) { + $csim .= $this->iObj[$i]->GetCSIMArea(); + } + + return $csim; + } +} diff --git a/vendor/amenadiel/jpgraph/src/graph/GanttScale.php b/vendor/amenadiel/jpgraph/src/graph/GanttScale.php new file mode 100644 index 0000000000..e8bd0b278a --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/GanttScale.php @@ -0,0 +1,1158 @@ +iImg = $aImg; + $this->iDateLocale = new DateLocale(); + + $this->minute = new HeaderProperty(); + $this->minute->SetIntervall(15); + $this->minute->SetLabelFormatString('i'); + $this->minute->SetFont(FF_FONT0); + $this->minute->grid->SetColor("gray"); + + $this->hour = new HeaderProperty(); + $this->hour->SetFont(FF_FONT0); + $this->hour->SetIntervall(6); + $this->hour->SetStyle(HOURSTYLE_HM24); + $this->hour->SetLabelFormatString('H:i'); + $this->hour->grid->SetColor("gray"); + + $this->day = new HeaderProperty(); + $this->day->grid->SetColor("gray"); + $this->day->SetLabelFormatString('l'); + + $this->week = new HeaderProperty(); + $this->week->SetLabelFormatString("w%d"); + $this->week->SetFont(FF_FONT1); + + $this->month = new HeaderProperty(); + $this->month->SetFont(FF_FONT1, FS_BOLD); + + $this->year = new HeaderProperty(); + $this->year->SetFont(FF_FONT1, FS_BOLD); + + $this->divider = new LineProperty(); + $this->dividerh = new LineProperty(); + $this->dividerh->SetWeight(2); + $this->divider->SetWeight(6); + $this->divider->SetColor('gray'); + $this->divider->SetStyle('fancy'); + + $this->tableTitle = new TextProperty(); + $this->tableTitle->Show(false); + $this->actinfo = new GanttActivityInfo(); + } + + //--------------- + // PUBLIC METHODS + // Specify what headers should be visible + public function ShowHeaders($aFlg) + { + $this->day->Show($aFlg & GANTT_HDAY); + $this->week->Show($aFlg & GANTT_HWEEK); + $this->month->Show($aFlg & GANTT_HMONTH); + $this->year->Show($aFlg & GANTT_HYEAR); + $this->hour->Show($aFlg & GANTT_HHOUR); + $this->minute->Show($aFlg & GANTT_HMIN); + + // Make some default settings of gridlines whihc makes sense + if ($aFlg & GANTT_HWEEK) { + $this->month->grid->Show(false); + $this->year->grid->Show(false); + } + if ($aFlg & GANTT_HHOUR) { + $this->day->grid->SetColor("black"); + } + } + + // Should the weekend background stretch all the way down in the plotarea + public function UseWeekendBackground($aShow) + { + $this->iUsePlotWeekendBackground = $aShow; + } + + // Have a range been specified? + public function IsRangeSet() + { + return $this->iStartDate != -1 && $this->iEndDate != -1; + } + + // Should the layout be from top or even? + public function SetVertLayout($aLayout) + { + $this->iVertLayout = $aLayout; + } + + // Which locale should be used? + public function SetDateLocale($aLocale) + { + $this->iDateLocale->Set($aLocale); + } + + // Number of days we are showing + public function GetNumberOfDays() + { + return round(($this->iEndDate - $this->iStartDate) / SECPERDAY); + } + + // The width of the actual plot area + public function GetPlotWidth() + { + $img = $this->iImg; + return $img->width - $img->left_margin - $img->right_margin; + } + + // Specify the width of the titles(labels) for the activities + // (This is by default set to the minimum width enought for the + // widest title) + public function SetLabelWidth($aLabelWidth) + { + $this->iLabelWidth = $aLabelWidth; + } + + // Which day should the week start? + // 0==Sun, 1==Monday, 2==Tuesday etc + public function SetWeekStart($aStartDay) + { + $this->iWeekStart = $aStartDay % 7; + + //Recalculate the startday since this will change the week start + $this->SetRange($this->iStartDate, $this->iEndDate); + } + + // Do we show min scale? + public function IsDisplayMinute() + { + return $this->minute->iShowLabels; + } + + // Do we show day scale? + public function IsDisplayHour() + { + return $this->hour->iShowLabels; + } + + // Do we show day scale? + public function IsDisplayDay() + { + return $this->day->iShowLabels; + } + + // Do we show week scale? + public function IsDisplayWeek() + { + return $this->week->iShowLabels; + } + + // Do we show month scale? + public function IsDisplayMonth() + { + return $this->month->iShowLabels; + } + + // Do we show year scale? + public function IsDisplayYear() + { + return $this->year->iShowLabels; + } + + // Specify spacing (in percent of bar height) between activity bars + public function SetVertSpacing($aSpacing) + { + $this->iVertSpacing = $aSpacing; + } + + // Specify scale min and max date either as timestamp or as date strings + // Always round to the nearest week boundary + public function SetRange($aMin, $aMax) + { + $this->iStartDate = $this->NormalizeDate($aMin); + $this->iEndDate = $this->NormalizeDate($aMax); + } + + // Adjust the start and end date so they fit to beginning/ending + // of the week taking the specified week start day into account. + public function AdjustStartEndDay() + { + + if (!($this->IsDisplayYear() || $this->IsDisplayMonth() || $this->IsDisplayWeek())) { + // Don't adjust + return; + } + + // Get day in week for start and ending date (Sun==0) + $ds = strftime("%w", $this->iStartDate); + $de = strftime("%w", $this->iEndDate); + + // We want to start on iWeekStart day. But first we subtract a week + // if the startdate is "behind" the day the week start at. + // This way we ensure that the given start date is always included + // in the range. If we don't do this the nearest correct weekday in the week + // to start at might be later than the start date. + if ($ds < $this->iWeekStart) { + $d = strtotime('-7 day', $this->iStartDate); + } else { + $d = $this->iStartDate; + } + + $adjdate = strtotime(($this->iWeekStart - $ds) . ' day', $d/*$this->iStartDate*/); + $this->iStartDate = $adjdate; + + // We want to end on the last day of the week + $preferredEndDay = ($this->iWeekStart + 6) % 7; + if ($preferredEndDay != $de) { + // Solve equivalence eq: $de + x ~ $preferredDay (mod 7) + $adj = (7 + ($preferredEndDay - $de)) % 7; + $adjdate = strtotime("+$adj day", $this->iEndDate); + $this->iEndDate = $adjdate; + } + } + + // Specify background for the table title area (upper left corner of the table) + public function SetTableTitleBackground($aColor) + { + $this->iTableHeaderBackgroundColor = $aColor; + } + + /////////////////////////////////////// + // PRIVATE Methods + + // Determine the height of all the scale headers combined + public function GetHeaderHeight() + { + $img = $this->iImg; + $height = 1; + if ($this->minute->iShowLabels) { + $height += $this->minute->GetFontHeight($img); + $height += $this->minute->iTitleVertMargin; + } + if ($this->hour->iShowLabels) { + $height += $this->hour->GetFontHeight($img); + $height += $this->hour->iTitleVertMargin; + } + if ($this->day->iShowLabels) { + $height += $this->day->GetFontHeight($img); + $height += $this->day->iTitleVertMargin; + } + if ($this->week->iShowLabels) { + $height += $this->week->GetFontHeight($img); + $height += $this->week->iTitleVertMargin; + } + if ($this->month->iShowLabels) { + $height += $this->month->GetFontHeight($img); + $height += $this->month->iTitleVertMargin; + } + if ($this->year->iShowLabels) { + $height += $this->year->GetFontHeight($img); + $height += $this->year->iTitleVertMargin; + } + return $height; + } + + // Get width (in pixels) for a single day + public function GetDayWidth() + { + return ($this->GetPlotWidth() - $this->iLabelWidth + 1) / $this->GetNumberOfDays(); + } + + // Get width (in pixels) for a single hour + public function GetHourWidth() + { + return $this->GetDayWidth() / 24; + } + + public function GetMinuteWidth() + { + return $this->GetHourWidth() / 60; + } + + // Nuber of days in a year + public function GetNumDaysInYear($aYear) + { + if ($this->IsLeap($aYear)) { + return 366; + } else { + return 365; + } + + } + + // Get week number + public function GetWeekNbr($aDate, $aSunStart = true) + { + // We can't use the internal strftime() since it gets the weeknumber + // wrong since it doesn't follow ISO on all systems since this is + // system linrary dependent. + // Even worse is that this works differently if we are on a Windows + // or UNIX box (it even differs between UNIX boxes how strftime() + // is natively implemented) + // + // Credit to Nicolas Hoizey for this elegant + // version of Week Nbr calculation. + + $day = $this->NormalizeDate($aDate); + if ($aSunStart) { + $day += 60 * 60 * 24; + } + + /*------------------------------------------------------------------------- + According to ISO-8601 : + "Week 01 of a year is per definition the first week that has the Thursday in this year, + which is equivalent to the week that contains the fourth day of January. + In other words, the first week of a new year is the week that has the majority of its + days in the new year." + + Be carefull, with PHP, -3 % 7 = -3, instead of 4 !!! + + day of year = date("z", $day) + 1 + offset to thursday = 3 - (date("w", $day) + 6) % 7 + first thursday of year = 1 + (11 - date("w", mktime(0, 0, 0, 1, 1, date("Y", $day)))) % 7 + week number = (thursday's day of year - first thursday's day of year) / 7 + 1 + ---------------------------------------------------------------------------*/ + + $thursday = $day + 60 * 60 * 24 * (3 - (date("w", $day) + 6) % 7); // take week's thursday + $week = 1 + (date("z", $thursday) - (11 - date("w", mktime(0, 0, 0, 1, 1, date("Y", $thursday)))) % 7) / 7; + + return $week; + } + + // Is year a leap year? + public function IsLeap($aYear) + { + // Is the year a leap year? + //$year = 0+date("Y",$aDate); + if ($aYear % 4 == 0) { + if (!($aYear % 100 == 0) || ($aYear % 400 == 0)) { + return true; + } + } + + return false; + } + + // Get current year + public function GetYear($aDate) + { + return 0 + Date("Y", $aDate); + } + + // Return number of days in a year + public function GetNumDaysInMonth($aMonth, $aYear) + { + $days = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); + $daysl = array(31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); + if ($this->IsLeap($aYear)) { + return $daysl[$aMonth]; + } else { + return $days[$aMonth]; + } + + } + + // Get day in month + public function GetMonthDayNbr($aDate) + { + return 0 + strftime("%d", $aDate); + } + + // Get day in year + public function GetYearDayNbr($aDate) + { + return 0 + strftime("%j", $aDate); + } + + // Get month number + public function GetMonthNbr($aDate) + { + return 0 + strftime("%m", $aDate); + } + + // Translate a date to screen coordinates (horizontal scale) + public function TranslateDate($aDate) + { + // + // In order to handle the problem with Daylight savings time + // the scale written with equal number of seconds per day beginning + // with the start date. This means that we "cement" the state of + // DST as it is in the start date. If later the scale includes the + // switchover date (depends on the locale) we need to adjust back + // if the date we try to translate has a different DST status since + // we would otherwise be off by one hour. + $aDate = $this->NormalizeDate($aDate); + $tmp = localtime($aDate); + $cloc = $tmp[8]; + $tmp = localtime($this->iStartDate); + $sloc = $tmp[8]; + $offset = 0; + if ($sloc != $cloc) { + if ($sloc) { + $offset = 3600; + } else { + $offset = -3600; + } + + } + $img = $this->iImg; + return ($aDate - $this->iStartDate - $offset) / SECPERDAY * $this->GetDayWidth() + $img->left_margin + $this->iLabelWidth; + } + + // Get screen coordinatesz for the vertical position for a bar + public function TranslateVertPos($aPos, $atTop = false) + { + $img = $this->iImg; + if ($aPos > $this->iVertLines) { + Util\JpGraphError::RaiseL(6015, $aPos); + } + + // 'Illegal vertical position %d' + if ($this->iVertLayout == GANTT_EVEN) { + // Position the top bar at 1 vert spacing from the scale + $pos = round($img->top_margin + $this->iVertHeaderSize + ($aPos + 1) * $this->iVertSpacing); + } else { + // position the top bar at 1/2 a vert spacing from the scale + $pos = round($img->top_margin + $this->iVertHeaderSize + $this->iTopPlotMargin + ($aPos + 1) * $this->iVertSpacing); + } + + if ($atTop) { + $pos -= $this->iVertSpacing; + } + + return $pos; + } + + // What is the vertical spacing? + public function GetVertSpacing() + { + return $this->iVertSpacing; + } + + // Convert a date to timestamp + public function NormalizeDate($aDate) + { + if ($aDate === false) { + return false; + } + + if (is_string($aDate)) { + $t = strtotime($aDate); + if ($t === false || $t === -1) { + Util\JpGraphError::RaiseL(6016, $aDate); + //("Date string ($aDate) specified for Gantt activity can not be interpretated. Please make sure it is a valid time string, e.g. 2005-04-23 13:30"); + } + return $t; + } elseif (is_int($aDate) || is_float($aDate)) { + return $aDate; + } else { + Util\JpGraphError::RaiseL(6017, $aDate); + } + + //Unknown date format in GanttScale ($aDate)."); + } + + // Convert a time string to minutes + + public function TimeToMinutes($aTimeString) + { + // Split in hours and minutes + $pos = strpos($aTimeString, ':'); + $minint = 60; + if ($pos === false) { + $hourint = $aTimeString; + $minint = 0; + } else { + $hourint = floor(substr($aTimeString, 0, $pos)); + $minint = floor(substr($aTimeString, $pos + 1)); + } + $minint += 60 * $hourint; + return $minint; + } + + // Stroke the day scale (including gridlines) + public function StrokeMinutes($aYCoord, $getHeight = false) + { + $img = $this->iImg; + $xt = $img->left_margin + $this->iLabelWidth; + $yt = $aYCoord + $img->top_margin; + if ($this->minute->iShowLabels) { + $img->SetFont($this->minute->iFFamily, $this->minute->iFStyle, $this->minute->iFSize); + $yb = $yt + $img->GetFontHeight() + + $this->minute->iTitleVertMargin + $this->minute->iFrameWeight; + if ($getHeight) { + return $yb - $img->top_margin; + } + $xb = $img->width - $img->right_margin + 1; + $img->SetColor($this->minute->iBackgroundColor); + $img->FilledRectangle($xt, $yt, $xb, $yb); + + $x = $xt; + $img->SetTextAlign("center"); + $day = date('w', $this->iStartDate); + $minint = $this->minute->GetIntervall(); + + if (60 % $minint !== 0) { + Util\JpGraphError::RaiseL(6018, $minint); + //'Intervall for minutes must divide the hour evenly, e.g. 1,5,10,12,15,20,30 etc You have specified an intervall of '.$minint.' minutes.'); + } + + $n = 60 / $minint; + $datestamp = $this->iStartDate; + $width = $this->GetHourWidth() / $n; + if ($width < 8) { + // TO small width to draw minute scale + Util\JpGraphError::RaiseL(6019, $width); + //('The available width ('.$width.') for minutes are to small for this scale to be displayed. Please use auto-sizing or increase the width of the graph.'); + } + + $nh = ceil(24 * 60 / $this->TimeToMinutes($this->hour->GetIntervall())); + $nd = $this->GetNumberOfDays(); + // Convert to intervall to seconds + $minint *= 60; + for ($j = 0; $j < $nd; ++$j, $day += 1, $day %= 7) { + for ($k = 0; $k < $nh; ++$k) { + for ($i = 0; $i < $n; ++$i, $x += $width, $datestamp += $minint) { + if ($day == 6 || $day == 0) { + + $img->PushColor($this->day->iWeekendBackgroundColor); + if ($this->iUsePlotWeekendBackground) { + $img->FilledRectangle($x, $yt + $this->day->iFrameWeight, $x + $width, $img->height - $img->bottom_margin); + } else { + $img->FilledRectangle($x, $yt + $this->day->iFrameWeight, $x + $width, $yb - $this->day->iFrameWeight); + } + + $img->PopColor(); + + } + + if ($day == 0) { + $img->SetColor($this->day->iSundayTextColor); + } else { + $img->SetColor($this->day->iTextColor); + } + + switch ($this->minute->iStyle) { + case MINUTESTYLE_CUSTOM: + $txt = date($this->minute->iLabelFormStr, $datestamp); + break; + case MINUTESTYLE_MM: + default: + // 15 + $txt = date('i', $datestamp); + break; + } + $img->StrokeText(round($x + $width / 2), round($yb - $this->minute->iTitleVertMargin), $txt); + + // Fix a rounding problem the wrong way .. + // If we also have hour scale then don't draw the firsta or last + // gridline since that will be overwritten by the hour scale gridline if such exists. + // However, due to the propagation of rounding of the 'x+=width' term in the loop + // this might sometimes be one pixel of so we fix this by not drawing it. + // The proper way to fix it would be to re-calculate the scale for each step and + // not using the additive term. + if (!(($i == $n || $i == 0) && $this->hour->iShowLabels && $this->hour->grid->iShow)) { + $img->SetColor($this->minute->grid->iColor); + $img->SetLineWeight($this->minute->grid->iWeight); + $img->Line($x, $yt, $x, $yb); + $this->minute->grid->Stroke($img, $x, $yb, $x, $img->height - $img->bottom_margin); + } + } + } + } + $img->SetColor($this->minute->iFrameColor); + $img->SetLineWeight($this->minute->iFrameWeight); + $img->Rectangle($xt, $yt, $xb, $yb); + return $yb - $img->top_margin; + } + return $aYCoord; + } + + // Stroke the day scale (including gridlines) + public function StrokeHours($aYCoord, $getHeight = false) + { + $img = $this->iImg; + $xt = $img->left_margin + $this->iLabelWidth; + $yt = $aYCoord + $img->top_margin; + if ($this->hour->iShowLabels) { + $img->SetFont($this->hour->iFFamily, $this->hour->iFStyle, $this->hour->iFSize); + $yb = $yt + $img->GetFontHeight() + + $this->hour->iTitleVertMargin + $this->hour->iFrameWeight; + if ($getHeight) { + return $yb - $img->top_margin; + } + $xb = $img->width - $img->right_margin + 1; + $img->SetColor($this->hour->iBackgroundColor); + $img->FilledRectangle($xt, $yt, $xb, $yb); + + $x = $xt; + $img->SetTextAlign("center"); + $tmp = $this->hour->GetIntervall(); + $minint = $this->TimeToMinutes($tmp); + if (1440 % $minint !== 0) { + Util\JpGraphError::RaiseL(6020, $tmp); + //('Intervall for hours must divide the day evenly, e.g. 0:30, 1:00, 1:30, 4:00 etc. You have specified an intervall of '.$tmp); + } + + $n = ceil(24 * 60 / $minint); + $datestamp = $this->iStartDate; + $day = date('w', $this->iStartDate); + $doback = !$this->minute->iShowLabels; + $width = $this->GetDayWidth() / $n; + for ($j = 0; $j < $this->GetNumberOfDays(); ++$j, $day += 1, $day %= 7) { + for ($i = 0; $i < $n; ++$i, $x += $width) { + if ($day == 6 || $day == 0) { + + $img->PushColor($this->day->iWeekendBackgroundColor); + if ($this->iUsePlotWeekendBackground && $doback) { + $img->FilledRectangle($x, $yt + $this->day->iFrameWeight, $x + $width, $img->height - $img->bottom_margin); + } else { + $img->FilledRectangle($x, $yt + $this->day->iFrameWeight, $x + $width, $yb - $this->day->iFrameWeight); + } + + $img->PopColor(); + + } + + if ($day == 0) { + $img->SetColor($this->day->iSundayTextColor); + } else { + $img->SetColor($this->day->iTextColor); + } + + switch ($this->hour->iStyle) { + case HOURSTYLE_HMAMPM: + // 1:35pm + $txt = date('g:ia', $datestamp); + break; + case HOURSTYLE_H24: + // 13 + $txt = date('H', $datestamp); + break; + case HOURSTYLE_HAMPM: + $txt = date('ga', $datestamp); + break; + case HOURSTYLE_CUSTOM: + $txt = date($this->hour->iLabelFormStr, $datestamp); + break; + case HOURSTYLE_HM24: + default: + $txt = date('H:i', $datestamp); + break; + } + $img->StrokeText(round($x + $width / 2), round($yb - $this->hour->iTitleVertMargin), $txt); + $img->SetColor($this->hour->grid->iColor); + $img->SetLineWeight($this->hour->grid->iWeight); + $img->Line($x, $yt, $x, $yb); + $this->hour->grid->Stroke($img, $x, $yb, $x, $img->height - $img->bottom_margin); + //$datestamp += $minint*60 + $datestamp = mktime(date('H', $datestamp), date('i', $datestamp) + $minint, 0, + date("m", $datestamp), date("d", $datestamp) + 1, date("Y", $datestamp)); + + } + } + $img->SetColor($this->hour->iFrameColor); + $img->SetLineWeight($this->hour->iFrameWeight); + $img->Rectangle($xt, $yt, $xb, $yb); + return $yb - $img->top_margin; + } + return $aYCoord; + } + + // Stroke the day scale (including gridlines) + public function StrokeDays($aYCoord, $getHeight = false) + { + $img = $this->iImg; + $daywidth = $this->GetDayWidth(); + $xt = $img->left_margin + $this->iLabelWidth; + $yt = $aYCoord + $img->top_margin; + if ($this->day->iShowLabels) { + $img->SetFont($this->day->iFFamily, $this->day->iFStyle, $this->day->iFSize); + $yb = $yt + $img->GetFontHeight() + $this->day->iTitleVertMargin + $this->day->iFrameWeight; + if ($getHeight) { + return $yb - $img->top_margin; + } + $xb = $img->width - $img->right_margin + 1; + $img->SetColor($this->day->iBackgroundColor); + $img->FilledRectangle($xt, $yt, $xb, $yb); + + $x = $xt; + $img->SetTextAlign("center"); + $day = date('w', $this->iStartDate); + $datestamp = $this->iStartDate; + + $doback = !($this->hour->iShowLabels || $this->minute->iShowLabels); + + setlocale(LC_TIME, $this->iDateLocale->iLocale); + + for ($i = 0; $i < $this->GetNumberOfDays(); ++$i, $x += $daywidth, $day += 1, $day %= 7) { + if ($day == 6 || $day == 0) { + $img->SetColor($this->day->iWeekendBackgroundColor); + if ($this->iUsePlotWeekendBackground && $doback) { + $img->FilledRectangle($x, $yt + $this->day->iFrameWeight, + $x + $daywidth, $img->height - $img->bottom_margin); + } else { + $img->FilledRectangle($x, $yt + $this->day->iFrameWeight, + $x + $daywidth, $yb - $this->day->iFrameWeight); + } + + } + + $mn = strftime('%m', $datestamp); + if ($mn[0] == '0') { + $mn = $mn[1]; + } + + switch ($this->day->iStyle) { + case DAYSTYLE_LONG: + // "Monday" + $txt = strftime('%A', $datestamp); + break; + case DAYSTYLE_SHORT: + // "Mon" + $txt = strftime('%a', $datestamp); + break; + case DAYSTYLE_SHORTDAYDATE1: + // "Mon 23/6" + $txt = strftime('%a %d/' . $mn, $datestamp); + break; + case DAYSTYLE_SHORTDAYDATE2: + // "Mon 23 Jun" + $txt = strftime('%a %d %b', $datestamp); + break; + case DAYSTYLE_SHORTDAYDATE3: + // "Mon 23 Jun 2003" + $txt = strftime('%a %d %b %Y', $datestamp); + break; + case DAYSTYLE_LONGDAYDATE1: + // "Monday 23 Jun" + $txt = strftime('%A %d %b', $datestamp); + break; + case DAYSTYLE_LONGDAYDATE2: + // "Monday 23 Jun 2003" + $txt = strftime('%A %d %b %Y', $datestamp); + break; + case DAYSTYLE_SHORTDATE1: + // "23/6" + $txt = strftime('%d/' . $mn, $datestamp); + break; + case DAYSTYLE_SHORTDATE2: + // "23 Jun" + $txt = strftime('%d %b', $datestamp); + break; + case DAYSTYLE_SHORTDATE3: + // "Mon 23" + $txt = strftime('%a %d', $datestamp); + break; + case DAYSTYLE_SHORTDATE4: + // "23" + $txt = strftime('%d', $datestamp); + break; + case DAYSTYLE_CUSTOM: + // Custom format + $txt = strftime($this->day->iLabelFormStr, $datestamp); + break; + case DAYSTYLE_ONELETTER: + default: + // "M" + $txt = strftime('%A', $datestamp); + $txt = strtoupper($txt[0]); + break; + } + + if ($day == 0) { + $img->SetColor($this->day->iSundayTextColor); + } else { + $img->SetColor($this->day->iTextColor); + } + + $img->StrokeText(round($x + $daywidth / 2 + 1), + round($yb - $this->day->iTitleVertMargin), $txt); + $img->SetColor($this->day->grid->iColor); + $img->SetLineWeight($this->day->grid->iWeight); + $img->Line($x, $yt, $x, $yb); + $this->day->grid->Stroke($img, $x, $yb, $x, $img->height - $img->bottom_margin); + $datestamp = mktime(0, 0, 0, date("m", $datestamp), date("d", $datestamp) + 1, date("Y", $datestamp)); + //$datestamp += SECPERDAY; + + } + $img->SetColor($this->day->iFrameColor); + $img->SetLineWeight($this->day->iFrameWeight); + $img->Rectangle($xt, $yt, $xb, $yb); + return $yb - $img->top_margin; + } + return $aYCoord; + } + + // Stroke week header and grid + public function StrokeWeeks($aYCoord, $getHeight = false) + { + if ($this->week->iShowLabels) { + $img = $this->iImg; + $yt = $aYCoord + $img->top_margin; + $img->SetFont($this->week->iFFamily, $this->week->iFStyle, $this->week->iFSize); + $yb = $yt + $img->GetFontHeight() + $this->week->iTitleVertMargin + $this->week->iFrameWeight; + + if ($getHeight) { + return $yb - $img->top_margin; + } + + $xt = $img->left_margin + $this->iLabelWidth; + $weekwidth = $this->GetDayWidth() * 7; + $wdays = $this->iDateLocale->GetDayAbb(); + $xb = $img->width - $img->right_margin + 1; + $week = $this->iStartDate; + $weeknbr = $this->GetWeekNbr($week); + $img->SetColor($this->week->iBackgroundColor); + $img->FilledRectangle($xt, $yt, $xb, $yb); + $img->SetColor($this->week->grid->iColor); + $x = $xt; + if ($this->week->iStyle == WEEKSTYLE_WNBR) { + $img->SetTextAlign("center"); + $txtOffset = $weekwidth / 2 + 1; + } elseif ($this->week->iStyle == WEEKSTYLE_FIRSTDAY || + $this->week->iStyle == WEEKSTYLE_FIRSTDAY2 || + $this->week->iStyle == WEEKSTYLE_FIRSTDAYWNBR || + $this->week->iStyle == WEEKSTYLE_FIRSTDAY2WNBR) { + $img->SetTextAlign("left"); + $txtOffset = 3; + } else { + Util\JpGraphError::RaiseL(6021); + //("Unknown formatting style for week."); + } + + for ($i = 0; $i < $this->GetNumberOfDays() / 7; ++$i, $x += $weekwidth) { + $img->PushColor($this->week->iTextColor); + + if ($this->week->iStyle == WEEKSTYLE_WNBR) { + $txt = sprintf($this->week->iLabelFormStr, $weeknbr); + } elseif ($this->week->iStyle == WEEKSTYLE_FIRSTDAY || + $this->week->iStyle == WEEKSTYLE_FIRSTDAYWNBR) { + $txt = date("j/n", $week); + } elseif ($this->week->iStyle == WEEKSTYLE_FIRSTDAY2 || + $this->week->iStyle == WEEKSTYLE_FIRSTDAY2WNBR) { + $monthnbr = date("n", $week) - 1; + $shortmonth = $this->iDateLocale->GetShortMonthName($monthnbr); + $txt = Date("j", $week) . " " . $shortmonth; + } + + if ($this->week->iStyle == WEEKSTYLE_FIRSTDAYWNBR || + $this->week->iStyle == WEEKSTYLE_FIRSTDAY2WNBR) { + $w = sprintf($this->week->iLabelFormStr, $weeknbr); + $txt .= ' ' . $w; + } + + $img->StrokeText(round($x + $txtOffset), + round($yb - $this->week->iTitleVertMargin), $txt); + + $week = strtotime('+7 day', $week); + $weeknbr = $this->GetWeekNbr($week); + $img->PopColor(); + $img->SetLineWeight($this->week->grid->iWeight); + $img->Line($x, $yt, $x, $yb); + $this->week->grid->Stroke($img, $x, $yb, $x, $img->height - $img->bottom_margin); + } + $img->SetColor($this->week->iFrameColor); + $img->SetLineWeight($this->week->iFrameWeight); + $img->Rectangle($xt, $yt, $xb, $yb); + return $yb - $img->top_margin; + } + return $aYCoord; + } + + // Format the mont scale header string + public function GetMonthLabel($aMonthNbr, $year) + { + $sn = $this->iDateLocale->GetShortMonthName($aMonthNbr); + $ln = $this->iDateLocale->GetLongMonthName($aMonthNbr); + switch ($this->month->iStyle) { + case MONTHSTYLE_SHORTNAME: + $m = $sn; + break; + case MONTHSTYLE_LONGNAME: + $m = $ln; + break; + case MONTHSTYLE_SHORTNAMEYEAR2: + $m = $sn . " '" . substr("" . $year, 2); + break; + case MONTHSTYLE_SHORTNAMEYEAR4: + $m = $sn . " " . $year; + break; + case MONTHSTYLE_LONGNAMEYEAR2: + $m = $ln . " '" . substr("" . $year, 2); + break; + case MONTHSTYLE_LONGNAMEYEAR4: + $m = $ln . " " . $year; + break; + case MONTHSTYLE_FIRSTLETTER: + $m = $sn[0]; + break; + } + return $m; + } + + // Stroke month scale and gridlines + public function StrokeMonths($aYCoord, $getHeight = false) + { + if ($this->month->iShowLabels) { + $img = $this->iImg; + $img->SetFont($this->month->iFFamily, $this->month->iFStyle, $this->month->iFSize); + $yt = $aYCoord + $img->top_margin; + $yb = $yt + $img->GetFontHeight() + $this->month->iTitleVertMargin + $this->month->iFrameWeight; + if ($getHeight) { + return $yb - $img->top_margin; + } + $monthnbr = $this->GetMonthNbr($this->iStartDate) - 1; + $xt = $img->left_margin + $this->iLabelWidth; + $xb = $img->width - $img->right_margin + 1; + + $img->SetColor($this->month->iBackgroundColor); + $img->FilledRectangle($xt, $yt, $xb, $yb); + + $img->SetLineWeight($this->month->grid->iWeight); + $img->SetColor($this->month->iTextColor); + $year = 0 + strftime("%Y", $this->iStartDate); + $img->SetTextAlign("center"); + if ($this->GetMonthNbr($this->iStartDate) == $this->GetMonthNbr($this->iEndDate) + && $this->GetYear($this->iStartDate) == $this->GetYear($this->iEndDate)) { + $monthwidth = $this->GetDayWidth() * ($this->GetMonthDayNbr($this->iEndDate) - $this->GetMonthDayNbr($this->iStartDate) + 1); + } else { + $monthwidth = $this->GetDayWidth() * ($this->GetNumDaysInMonth($monthnbr, $year) - $this->GetMonthDayNbr($this->iStartDate) + 1); + } + // Is it enough space to stroke the first month? + $monthName = $this->GetMonthLabel($monthnbr, $year); + if ($monthwidth >= 1.2 * $img->GetTextWidth($monthName)) { + $img->SetColor($this->month->iTextColor); + $img->StrokeText(round($xt + $monthwidth / 2 + 1), + round($yb - $this->month->iTitleVertMargin), + $monthName); + } + $x = $xt + $monthwidth; + while ($x < $xb) { + $img->SetColor($this->month->grid->iColor); + $img->Line($x, $yt, $x, $yb); + $this->month->grid->Stroke($img, $x, $yb, $x, $img->height - $img->bottom_margin); + $monthnbr++; + if ($monthnbr == 12) { + $monthnbr = 0; + $year++; + } + $monthName = $this->GetMonthLabel($monthnbr, $year); + $monthwidth = $this->GetDayWidth() * $this->GetNumDaysInMonth($monthnbr, $year); + if ($x + $monthwidth < $xb) { + $w = $monthwidth; + } else { + $w = $xb - $x; + } + + if ($w >= 1.2 * $img->GetTextWidth($monthName)) { + $img->SetColor($this->month->iTextColor); + $img->StrokeText(round($x + $w / 2 + 1), + round($yb - $this->month->iTitleVertMargin), $monthName); + } + $x += $monthwidth; + } + $img->SetColor($this->month->iFrameColor); + $img->SetLineWeight($this->month->iFrameWeight); + $img->Rectangle($xt, $yt, $xb, $yb); + return $yb - $img->top_margin; + } + return $aYCoord; + } + + // Stroke year scale and gridlines + public function StrokeYears($aYCoord, $getHeight = false) + { + if ($this->year->iShowLabels) { + $img = $this->iImg; + $yt = $aYCoord + $img->top_margin; + $img->SetFont($this->year->iFFamily, $this->year->iFStyle, $this->year->iFSize); + $yb = $yt + $img->GetFontHeight() + $this->year->iTitleVertMargin + $this->year->iFrameWeight; + + if ($getHeight) { + return $yb - $img->top_margin; + } + + $xb = $img->width - $img->right_margin + 1; + $xt = $img->left_margin + $this->iLabelWidth; + $year = $this->GetYear($this->iStartDate); + $img->SetColor($this->year->iBackgroundColor); + $img->FilledRectangle($xt, $yt, $xb, $yb); + $img->SetLineWeight($this->year->grid->iWeight); + $img->SetTextAlign("center"); + if ($year == $this->GetYear($this->iEndDate)) { + $yearwidth = $this->GetDayWidth() * ($this->GetYearDayNbr($this->iEndDate) - $this->GetYearDayNbr($this->iStartDate) + 1); + } else { + $yearwidth = $this->GetDayWidth() * ($this->GetNumDaysInYear($year) - $this->GetYearDayNbr($this->iStartDate) + 1); + } + + // The space for a year must be at least 20% bigger than the actual text + // so we allow 10% margin on each side + if ($yearwidth >= 1.20 * $img->GetTextWidth("" . $year)) { + $img->SetColor($this->year->iTextColor); + $img->StrokeText(round($xt + $yearwidth / 2 + 1), + round($yb - $this->year->iTitleVertMargin), + $year); + } + $x = $xt + $yearwidth; + while ($x < $xb) { + $img->SetColor($this->year->grid->iColor); + $img->Line($x, $yt, $x, $yb); + $this->year->grid->Stroke($img, $x, $yb, $x, $img->height - $img->bottom_margin); + $year += 1; + $yearwidth = $this->GetDayWidth() * $this->GetNumDaysInYear($year); + if ($x + $yearwidth < $xb) { + $w = $yearwidth; + } else { + $w = $xb - $x; + } + + if ($w >= 1.2 * $img->GetTextWidth("" . $year)) { + $img->SetColor($this->year->iTextColor); + $img->StrokeText(round($x + $w / 2 + 1), + round($yb - $this->year->iTitleVertMargin), + $year); + } + $x += $yearwidth; + } + $img->SetColor($this->year->iFrameColor); + $img->SetLineWeight($this->year->iFrameWeight); + $img->Rectangle($xt, $yt, $xb, $yb); + return $yb - $img->top_margin; + } + return $aYCoord; + } + + // Stroke table title (upper left corner) + public function StrokeTableHeaders($aYBottom) + { + $img = $this->iImg; + $xt = $img->left_margin; + $yt = $img->top_margin; + $xb = $xt + $this->iLabelWidth; + $yb = $aYBottom + $img->top_margin; + + if ($this->tableTitle->iShow) { + $img->SetColor($this->iTableHeaderBackgroundColor); + $img->FilledRectangle($xt, $yt, $xb, $yb); + $this->tableTitle->Align("center", "top"); + $this->tableTitle->Stroke($img, $xt + ($xb - $xt) / 2 + 1, $yt + 2); + $img->SetColor($this->iTableHeaderFrameColor); + $img->SetLineWeight($this->iTableHeaderFrameWeight); + $img->Rectangle($xt, $yt, $xb, $yb); + } + + $this->actinfo->Stroke($img, $xt, $yt, $xb, $yb, $this->tableTitle->iShow); + + // Draw the horizontal dividing line + $this->dividerh->Stroke($img, $xt, $yb, $img->width - $img->right_margin, $yb); + + // Draw the vertical dividing line + // We do the width "manually" since we want the line only to grow + // to the left + $fancy = $this->divider->iStyle == 'fancy'; + if ($fancy) { + $this->divider->iStyle = 'solid'; + } + + $tmp = $this->divider->iWeight; + $this->divider->iWeight = 1; + $y = $img->height - $img->bottom_margin; + for ($i = 0; $i < $tmp; ++$i) { + $this->divider->Stroke($img, $xb - $i, $yt, $xb - $i, $y); + } + + // Should we draw "fancy" divider + if ($fancy) { + $img->SetLineWeight(1); + $img->SetColor($this->iTableHeaderFrameColor); + $img->Line($xb, $yt, $xb, $y); + $img->Line($xb - $tmp + 1, $yt, $xb - $tmp + 1, $y); + $img->SetColor('white'); + $img->Line($xb - $tmp + 2, $yt, $xb - $tmp + 2, $y); + } + } + + // Main entry point to stroke scale + public function Stroke() + { + if (!$this->IsRangeSet()) { + Util\JpGraphError::RaiseL(6022); + //("Gantt scale has not been specified."); + } + $img = $this->iImg; + + // If minutes are displayed then hour interval must be 1 + if ($this->IsDisplayMinute() && $this->hour->GetIntervall() > 1) { + Util\JpGraphError::RaiseL(6023); + //('If you display both hour and minutes the hour intervall must be 1 (Otherwise it doesn\' make sense to display minutes).'); + } + + // Stroke all headers. As argument we supply the offset from the + // top which depends on any previous headers + + // First find out the height of each header + $offy = $this->StrokeYears(0, true); + $offm = $this->StrokeMonths($offy, true); + $offw = $this->StrokeWeeks($offm, true); + $offd = $this->StrokeDays($offw, true); + $offh = $this->StrokeHours($offd, true); + $offmin = $this->StrokeMinutes($offh, true); + + // ... then we can stroke them in the "backwards order to ensure that + // the larger scale gridlines is stroked over the smaller scale gridline + $this->StrokeMinutes($offh); + $this->StrokeHours($offd); + $this->StrokeDays($offw); + $this->StrokeWeeks($offm); + $this->StrokeMonths($offy); + $this->StrokeYears(0); + + // Now when we now the oaverall size of the scale headers + // we can stroke the overall table headers + $this->StrokeTableHeaders($offmin); + + // Now we can calculate the correct scaling factor for each vertical position + $this->iAvailableHeight = $img->height - $img->top_margin - $img->bottom_margin - $offd; + + $this->iVertHeaderSize = $offmin; + if ($this->iVertSpacing == -1) { + $this->iVertSpacing = $this->iAvailableHeight / $this->iVertLines; + } + + } +} diff --git a/vendor/amenadiel/jpgraph/src/graph/Graph.php b/vendor/amenadiel/jpgraph/src/graph/Graph.php new file mode 100644 index 0000000000..86834ec67b --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/Graph.php @@ -0,0 +1,2736 @@ +0 + public $grid_depth = DEPTH_BACK; // Draw grid under all plots as default + public $iAxisStyle = AXSTYLE_SIMPLE; + public $iCSIMdisplay = false, $iHasStroked = false; + public $footer; + public $csimcachename = '', $csimcachetimeout = 0, $iCSIMImgAlt = ''; + public $iDoClipping = false; + public $y2orderback = true; + public $tabtitle; + public $bkg_gradtype = -1, $bkg_gradstyle = BGRAD_MARGIN; + public $bkg_gradfrom = 'navy', $bkg_gradto = 'silver'; + public $plot_gradtype = -1, $plot_gradstyle = BGRAD_MARGIN; + public $plot_gradfrom = 'silver', $plot_gradto = 'navy'; + + public $titlebackground = false; + public $titlebackground_color = 'lightblue', + $titlebackground_style = 1, + $titlebackground_framecolor, + $titlebackground_framestyle, + $titlebackground_frameweight, + $titlebackground_bevelheight; + public $titlebkg_fillstyle = TITLEBKG_FILLSTYLE_SOLID; + public $titlebkg_scolor1 = 'black', $titlebkg_scolor2 = 'white'; + public $framebevel, $framebeveldepth; + public $framebevelborder, $framebevelbordercolor; + public $framebevelcolor1, $framebevelcolor2; + public $background_image_mix = 100; + public $background_cflag = ''; + public $background_cflag_type = BGIMG_FILLPLOT; + public $background_cflag_mix = 100; + public $iImgTrans = false, + $iImgTransHorizon = 100, $iImgTransSkewDist = 150, + $iImgTransDirection = 1, $iImgTransMinSize = true, + $iImgTransFillColor = 'white', $iImgTransHighQ = false, + $iImgTransBorder = false, $iImgTransHorizonPos = 0.5; + public $legend; + public $graph_theme; + protected $iYAxisDeltaPos = 50; + protected $iIconDepth = DEPTH_BACK; + protected $iAxisLblBgType = 0, + $iXAxisLblBgFillColor = 'lightgray', $iXAxisLblBgColor = 'black', + $iYAxisLblBgFillColor = 'lightgray', $iYAxisLblBgColor = 'black'; + protected $iTables = null; + + protected $isRunningClear = false; + protected $inputValues; + protected $isAfterSetScale = false; + + // aWIdth Width in pixels of image + // aHeight Height in pixels of image + // aCachedName Name for image file in cache directory + // aTimeOut Timeout in minutes for image in cache + // aInline If true the image is streamed back in the call to Stroke() + // If false the image is just created in the cache + public function __construct($aWidth = 300, $aHeight = 200, $aCachedName = '', $aTimeout = 0, $aInline = true) + { + + if (!is_numeric($aWidth) || !is_numeric($aHeight)) { + Util\JpGraphError::RaiseL(25008); //('Image width/height argument in Graph::Graph() must be numeric'); + } + + // Initialize frame and margin + $this->InitializeFrameAndMargin(); + + // Automatically generate the image file name based on the name of the script that + // generates the graph + if ($aCachedName == 'auto') { + $aCachedName = GenImgName(); + } + + // Should the image be streamed back to the browser or only to the cache? + $this->inline = $aInline; + + $this->img = new Image\RotImage($aWidth, $aHeight); + $this->cache = new Image\ImgStreamCache(); + + // Window doesn't like '?' in the file name so replace it with an '_' + $aCachedName = str_replace("?", "_", $aCachedName); + $this->SetupCache($aCachedName, $aTimeout); + + $this->title = new Text\Text(); + $this->title->ParagraphAlign('center'); + $this->title->SetFont(FF_DEFAULT, FS_NORMAL); //FF_FONT2, FS_BOLD + $this->title->SetMargin(5); + $this->title->SetAlign('center'); + + $this->subtitle = new Text\Text(); + $this->subtitle->ParagraphAlign('center'); + $this->subtitle->SetMargin(3); + $this->subtitle->SetAlign('center'); + + $this->subsubtitle = new Text\Text(); + $this->subsubtitle->ParagraphAlign('center'); + $this->subsubtitle->SetMargin(3); + $this->subsubtitle->SetAlign('center'); + + $this->legend = new Legend(); + $this->footer = new Image\Footer(); + + // If the cached version exist just read it directly from the + // cache, stream it back to browser and exit + if ($aCachedName != '' && READ_CACHE && $aInline) { + if ($this->cache->GetAndStream($this->img, $aCachedName)) { + exit(); + } + } + + $this->SetTickDensity(); // Normal density + + $this->tabtitle = new Text\GraphTabTitle(); + + if (!$this->isRunningClear) { + $this->inputValues = array(); + $this->inputValues['aWidth'] = $aWidth; + $this->inputValues['aHeight'] = $aHeight; + $this->inputValues['aCachedName'] = $aCachedName; + $this->inputValues['aTimeout'] = $aTimeout; + $this->inputValues['aInline'] = $aInline; + + $theme_class = '\Amenadiel\JpGraph\Themes\\' . DEFAULT_THEME_CLASS; + + if (class_exists($theme_class)) { + $this->graph_theme = new $theme_class(); + } + } + } + + public function InitializeFrameAndMargin() + { + $this->doframe = true; + $this->frame_color = 'black'; + $this->frame_weight = 1; + + $this->titlebackground_framecolor = 'blue'; + $this->titlebackground_framestyle = 2; + $this->titlebackground_frameweight = 1; + $this->titlebackground_bevelheight = 3; + $this->titlebkg_fillstyle = TITLEBKG_FILLSTYLE_SOLID; + $this->titlebkg_scolor1 = 'black'; + $this->titlebkg_scolor2 = 'white'; + $this->framebevel = false; + $this->framebeveldepth = 2; + $this->framebevelborder = false; + $this->framebevelbordercolor = 'black'; + $this->framebevelcolor1 = 'white@0.4'; + $this->framebevelcolor2 = 'black@0.4'; + + $this->margin_color = array(250, 250, 250); + } + + public function SetupCache($aFilename, $aTimeout = 60) + { + $this->cache_name = $aFilename; + $this->cache->SetTimeOut($aTimeout); + } + + // Enable final image perspective transformation + public function Set3DPerspective($aDir = 1, $aHorizon = 100, $aSkewDist = 120, $aQuality = false, $aFillColor = '#FFFFFF', $aBorder = false, $aMinSize = true, $aHorizonPos = 0.5) + { + $this->iImgTrans = true; + $this->iImgTransHorizon = $aHorizon; + $this->iImgTransSkewDist = $aSkewDist; + $this->iImgTransDirection = $aDir; + $this->iImgTransMinSize = $aMinSize; + $this->iImgTransFillColor = $aFillColor; + $this->iImgTransHighQ = $aQuality; + $this->iImgTransBorder = $aBorder; + $this->iImgTransHorizonPos = $aHorizonPos; + } + + public function SetUserFont($aNormal, $aBold = '', $aItalic = '', $aBoldIt = '') + { + $this->img->ttf->SetUserFont($aNormal, $aBold, $aItalic, $aBoldIt); + } + + public function SetUserFont1($aNormal, $aBold = '', $aItalic = '', $aBoldIt = '') + { + $this->img->ttf->SetUserFont1($aNormal, $aBold, $aItalic, $aBoldIt); + } + + public function SetUserFont2($aNormal, $aBold = '', $aItalic = '', $aBoldIt = '') + { + $this->img->ttf->SetUserFont2($aNormal, $aBold, $aItalic, $aBoldIt); + } + + public function SetUserFont3($aNormal, $aBold = '', $aItalic = '', $aBoldIt = '') + { + $this->img->ttf->SetUserFont3($aNormal, $aBold, $aItalic, $aBoldIt); + } + + // Set Image format and optional quality + public function SetImgFormat($aFormat, $aQuality = 75) + { + $this->img->SetImgFormat($aFormat, $aQuality); + } + + // Should the grid be in front or back of the plot? + public function SetGridDepth($aDepth) + { + $this->grid_depth = $aDepth; + } + + public function SetIconDepth($aDepth) + { + $this->iIconDepth = $aDepth; + } + + // Specify graph angle 0-360 degrees. + public function SetAngle($aAngle) + { + $this->img->SetAngle($aAngle); + } + + public function SetAlphaBlending($aFlg = true) + { + $this->img->SetAlphaBlending($aFlg); + } + + // Shortcut to image margin + public function SetMargin($lm, $rm, $tm, $bm) + { + $this->img->SetMargin($lm, $rm, $tm, $bm); + } + + public function SetY2OrderBack($aBack = true) + { + $this->y2orderback = $aBack; + } + + // Rotate the graph 90 degrees and set the margin + // when we have done a 90 degree rotation + public function Set90AndMargin($lm = 0, $rm = 0, $tm = 0, $bm = 0) + { + $lm = $lm == 0 ? floor(0.2 * $this->img->width) : $lm; + $rm = $rm == 0 ? floor(0.1 * $this->img->width) : $rm; + $tm = $tm == 0 ? floor(0.2 * $this->img->height) : $tm; + $bm = $bm == 0 ? floor(0.1 * $this->img->height) : $bm; + + $adj = ($this->img->height - $this->img->width) / 2; + $this->img->SetMargin($tm - $adj, $bm - $adj, $rm + $adj, $lm + $adj); + $this->img->SetCenter(floor($this->img->width / 2), floor($this->img->height / 2)); + $this->SetAngle(90); + if (empty($this->yaxis) || empty($this->xaxis)) { + Util\JpGraphError::RaiseL(25009); //('You must specify what scale to use with a call to Graph::SetScale()'); + } + $this->xaxis->SetLabelAlign('right', 'center'); + $this->yaxis->SetLabelAlign('center', 'bottom'); + } + + public function SetClipping($aFlg = true) + { + $this->iDoClipping = $aFlg; + } + + // Add a plot object to the graph + public function Add($aPlot) + { + if ($aPlot == null) { + Util\JpGraphError::RaiseL(25010); //("Graph::Add() You tried to add a null plot to the graph."); + } + if (is_array($aPlot) && count($aPlot) > 0) { + $cl = $aPlot[0]; + } else { + $cl = $aPlot; + } + + if ($cl instanceof Text) { + $this->AddText($aPlot); + } elseif (class_exists('PlotLine', false) && ($cl instanceof PlotLine)) { + $this->AddLine($aPlot); + } elseif (class_exists('PlotBand', false) && ($cl instanceof PlotBand)) { + $this->AddBand($aPlot); + } elseif (class_exists('IconPlot', false) && ($cl instanceof IconPlot)) { + $this->AddIcon($aPlot); + } elseif (class_exists('GTextTable', false) && ($cl instanceof GTextTable)) { + $this->AddTable($aPlot); + } else { + if (is_array($aPlot)) { + $this->plots = array_merge($this->plots, $aPlot); + } else { + $this->plots[] = $aPlot; + } + } + + if ($this->graph_theme) { + $this->graph_theme->SetupPlot($aPlot); + } + } + + public function AddTable($aTable) + { + if (is_array($aTable)) { + for ($i = 0; $i < count($aTable); ++$i) { + $this->iTables[] = $aTable[$i]; + } + } else { + $this->iTables[] = $aTable; + } + } + + public function AddIcon($aIcon) + { + if (is_array($aIcon)) { + for ($i = 0; $i < count($aIcon); ++$i) { + $this->iIcons[] = $aIcon[$i]; + } + } else { + $this->iIcons[] = $aIcon; + } + } + + // Add plot to second Y-scale + public function AddY2($aPlot) + { + if ($aPlot == null) { + Util\JpGraphError::RaiseL(25011); //("Graph::AddY2() You tried to add a null plot to the graph."); + } + + if (is_array($aPlot) && count($aPlot) > 0) { + $cl = $aPlot[0]; + } else { + $cl = $aPlot; + } + + if ($cl instanceof Text) { + $this->AddText($aPlot, true); + } elseif (class_exists('PlotLine', false) && ($cl instanceof PlotLine)) { + $this->AddLine($aPlot, true); + } elseif (class_exists('PlotBand', false) && ($cl instanceof PlotBand)) { + $this->AddBand($aPlot, true); + } else { + $this->y2plots[] = $aPlot; + } + + if ($this->graph_theme) { + $this->graph_theme->SetupPlot($aPlot); + } + } + + // Add plot to the extra Y-axises + public function AddY($aN, $aPlot) + { + + if ($aPlot == null) { + Util\JpGraphError::RaiseL(25012); //("Graph::AddYN() You tried to add a null plot to the graph."); + } + + if (is_array($aPlot) && count($aPlot) > 0) { + $cl = $aPlot[0]; + } else { + $cl = $aPlot; + } + + if (($cl instanceof Text) || + (class_exists('PlotLine', false) && ($cl instanceof PlotLine)) || + (class_exists('PlotBand', false) && ($cl instanceof PlotBand))) { + JpGraph::RaiseL(25013); //('You can only add standard plots to multiple Y-axis'); + } else { + $this->ynplots[$aN][] = $aPlot; + } + + if ($this->graph_theme) { + $this->graph_theme->SetupPlot($aPlot); + } + } + + // Add text object to the graph + public function AddText($aTxt, $aToY2 = false) + { + if ($aTxt == null) { + Util\JpGraphError::RaiseL(25014); //("Graph::AddText() You tried to add a null text to the graph."); + } + if ($aToY2) { + if (is_array($aTxt)) { + for ($i = 0; $i < count($aTxt); ++$i) { + $this->y2texts[] = $aTxt[$i]; + } + } else { + $this->y2texts[] = $aTxt; + } + } else { + if (is_array($aTxt)) { + for ($i = 0; $i < count($aTxt); ++$i) { + $this->texts[] = $aTxt[$i]; + } + } else { + $this->texts[] = $aTxt; + } + } + } + + // Add a line object (class PlotLine) to the graph + public function AddLine($aLine, $aToY2 = false) + { + if ($aLine == null) { + Util\JpGraphError::RaiseL(25015); //("Graph::AddLine() You tried to add a null line to the graph."); + } + + if ($aToY2) { + if (is_array($aLine)) { + for ($i = 0; $i < count($aLine); ++$i) { + //$this->y2lines[]=$aLine[$i]; + $this->y2plots[] = $aLine[$i]; + } + } else { + //$this->y2lines[] = $aLine; + $this->y2plots[] = $aLine; + } + } else { + if (is_array($aLine)) { + for ($i = 0; $i < count($aLine); ++$i) { + //$this->lines[]=$aLine[$i]; + $this->plots[] = $aLine[$i]; + } + } else { + //$this->lines[] = $aLine; + $this->plots[] = $aLine; + } + } + } + + // Add vertical or horizontal band + public function AddBand($aBand, $aToY2 = false) + { + if ($aBand == null) { + Util\JpGraphError::RaiseL(25016); //(" Graph::AddBand() You tried to add a null band to the graph."); + } + + if ($aToY2) { + if (is_array($aBand)) { + for ($i = 0; $i < count($aBand); ++$i) { + $this->y2bands[] = $aBand[$i]; + } + } else { + $this->y2bands[] = $aBand; + } + } else { + if (is_array($aBand)) { + for ($i = 0; $i < count($aBand); ++$i) { + $this->bands[] = $aBand[$i]; + } + } else { + $this->bands[] = $aBand; + } + } + } + + public function SetPlotGradient($aFrom = 'navy', $aTo = 'silver', $aGradType = 2) + { + $this->plot_gradtype = $aGradType; + $this->plot_gradfrom = $aFrom; + $this->plot_gradto = $aTo; + } + + public function SetBackgroundGradient($aFrom = 'navy', $aTo = 'silver', $aGradType = 2, $aStyle = BGRAD_FRAME) + { + $this->bkg_gradtype = $aGradType; + $this->bkg_gradstyle = $aStyle; + $this->bkg_gradfrom = $aFrom; + $this->bkg_gradto = $aTo; + } + + // Set a country flag in the background + public function SetBackgroundCFlag($aName, $aBgType = BGIMG_FILLPLOT, $aMix = 100) + { + $this->background_cflag = $aName; + $this->background_cflag_type = $aBgType; + $this->background_cflag_mix = $aMix; + } + + // Alias for the above method + public function SetBackgroundCountryFlag($aName, $aBgType = BGIMG_FILLPLOT, $aMix = 100) + { + $this->background_cflag = $aName; + $this->background_cflag_type = $aBgType; + $this->background_cflag_mix = $aMix; + } + + // Specify a background image + public function SetBackgroundImage($aFileName, $aBgType = BGIMG_FILLPLOT, $aImgFormat = 'auto') + { + + // Get extension to determine image type + if ($aImgFormat == 'auto') { + $e = explode('.', $aFileName); + if (!$e) { + Util\JpGraphError::RaiseL(25018, $aFileName); //('Incorrect file name for Graph::SetBackgroundImage() : '.$aFileName.' Must have a valid image extension (jpg,gif,png) when using autodetection of image type'); + } + + $valid_formats = array('png', 'jpg', 'gif'); + $aImgFormat = strtolower($e[count($e) - 1]); + if ($aImgFormat == 'jpeg') { + $aImgFormat = 'jpg'; + } elseif (!in_array($aImgFormat, $valid_formats)) { + Util\JpGraphError::RaiseL(25019, $aImgFormat); //('Unknown file extension ($aImgFormat) in Graph::SetBackgroundImage() for filename: '.$aFileName); + } + } + + $this->background_image = $aFileName; + $this->background_image_type = $aBgType; + $this->background_image_format = $aImgFormat; + } + + public function SetBackgroundImageMix($aMix) + { + $this->background_image_mix = $aMix; + } + + // Adjust background image position + public function SetBackgroundImagePos($aXpos, $aYpos) + { + $this->background_image_xpos = $aXpos; + $this->background_image_ypos = $aYpos; + } + + // Specify axis style (boxed or single) + public function SetAxisStyle($aStyle) + { + $this->iAxisStyle = $aStyle; + } + + // Set a frame around the plot area + public function SetBox($aDrawPlotFrame = true, $aPlotFrameColor = array(0, 0, 0), $aPlotFrameWeight = 1) + { + $this->boxed = $aDrawPlotFrame; + $this->box_weight = $aPlotFrameWeight; + $this->box_color = $aPlotFrameColor; + } + + // Specify color for the plotarea (not the margins) + public function SetColor($aColor) + { + $this->plotarea_color = $aColor; + } + + // Specify color for the margins (all areas outside the plotarea) + public function SetMarginColor($aColor) + { + $this->margin_color = $aColor; + } + + // Set a frame around the entire image + public function SetFrame($aDrawImgFrame = true, $aImgFrameColor = array(0, 0, 0), $aImgFrameWeight = 1) + { + $this->doframe = $aDrawImgFrame; + $this->frame_color = $aImgFrameColor; + $this->frame_weight = $aImgFrameWeight; + } + + public function SetFrameBevel($aDepth = 3, $aBorder = false, $aBorderColor = 'black', $aColor1 = 'white@0.4', $aColor2 = 'darkgray@0.4', $aFlg = true) + { + $this->framebevel = $aFlg; + $this->framebeveldepth = $aDepth; + $this->framebevelborder = $aBorder; + $this->framebevelbordercolor = $aBorderColor; + $this->framebevelcolor1 = $aColor1; + $this->framebevelcolor2 = $aColor2; + + $this->doshadow = false; + } + + // Set the shadow around the whole image + public function SetShadow($aShowShadow = true, $aShadowWidth = 5, $aShadowColor = 'darkgray') + { + $this->doshadow = $aShowShadow; + $this->shadow_color = $aShadowColor; + $this->shadow_width = $aShadowWidth; + $this->footer->iBottomMargin += $aShadowWidth; + $this->footer->iRightMargin += $aShadowWidth; + } + + // Specify x,y scale. Note that if you manually specify the scale + // you must also specify the tick distance with a call to Ticks::Set() + public function SetScale($aAxisType, $aYMin = 1, $aYMax = 1, $aXMin = 1, $aXMax = 1) + { + $this->axtype = $aAxisType; + + if ($aYMax < $aYMin || $aXMax < $aXMin) { + Util\JpGraphError::RaiseL(25020); //('Graph::SetScale(): Specified Max value must be larger than the specified Min value.'); + } + + $yt = substr($aAxisType, -3, 3); + if ($yt == 'lin') { + $this->yscale = new LinearScale($aYMin, $aYMax); + } elseif ($yt == 'int') { + $this->yscale = new LinearScale($aYMin, $aYMax); + $this->yscale->SetIntScale(); + } elseif ($yt == 'log') { + $this->yscale = new LogScale($aYMin, $aYMax); + } else { + Util\JpGraphError::RaiseL(25021, $aAxisType); //("Unknown scale specification for Y-scale. ($aAxisType)"); + } + + $xt = substr($aAxisType, 0, 3); + if ($xt == 'lin' || $xt == 'tex') { + $this->xscale = new LinearScale($aXMin, $aXMax, 'x'); + $this->xscale->textscale = ($xt == 'tex'); + } elseif ($xt == 'int') { + $this->xscale = new LinearScale($aXMin, $aXMax, 'x'); + $this->xscale->SetIntScale(); + } elseif ($xt == 'dat') { + $this->xscale = new DateScale($aXMin, $aXMax, 'x'); + } elseif ($xt == 'log') { + $this->xscale = new LogScale($aXMin, $aXMax, 'x'); + } else { + Util\JpGraphError::RaiseL(25022, $aAxisType); //(" Unknown scale specification for X-scale. ($aAxisType)"); + } + + $this->xaxis = new Axis($this->img, $this->xscale); + $this->yaxis = new Axis($this->img, $this->yscale); + $this->xgrid = new Grid($this->xaxis); + $this->ygrid = new Grid($this->yaxis); + $this->ygrid->Show(); + + if (!$this->isRunningClear) { + $this->inputValues['aAxisType'] = $aAxisType; + $this->inputValues['aYMin'] = $aYMin; + $this->inputValues['aYMax'] = $aYMax; + $this->inputValues['aXMin'] = $aXMin; + $this->inputValues['aXMax'] = $aXMax; + + if ($this->graph_theme) { + $this->graph_theme->ApplyGraph($this); + } + } + + $this->isAfterSetScale = true; + } + + // Specify secondary Y scale + public function SetY2Scale($aAxisType = 'lin', $aY2Min = 1, $aY2Max = 1) + { + if ($aAxisType == 'lin') { + $this->y2scale = new LinearScale($aY2Min, $aY2Max); + } elseif ($aAxisType == 'int') { + $this->y2scale = new LinearScale($aY2Min, $aY2Max); + $this->y2scale->SetIntScale(); + } elseif ($aAxisType == 'log') { + $this->y2scale = new LogScale($aY2Min, $aY2Max); + } else { + Util\JpGraphError::RaiseL(25023, $aAxisType); //("JpGraph: Unsupported Y2 axis type: $aAxisType\nMust be one of (lin,log,int)"); + } + + $this->y2axis = new Axis($this->img, $this->y2scale); + $this->y2axis->scale->ticks->SetDirection(SIDE_LEFT); + $this->y2axis->SetLabelSide(SIDE_RIGHT); + $this->y2axis->SetPos('max'); + $this->y2axis->SetTitleSide(SIDE_RIGHT); + + // Deafult position is the max x-value + $this->y2grid = new Grid($this->y2axis); + + if ($this->graph_theme) { + $this->graph_theme->ApplyGraph($this); + } + } + + // Set the delta position (in pixels) between the multiple Y-axis + public function SetYDeltaDist($aDist) + { + $this->iYAxisDeltaPos = $aDist; + } + + // Specify secondary Y scale + public function SetYScale($aN, $aAxisType = "lin", $aYMin = 1, $aYMax = 1) + { + + if ($aAxisType == 'lin') { + $this->ynscale[$aN] = new LinearScale($aYMin, $aYMax); + } elseif ($aAxisType == 'int') { + $this->ynscale[$aN] = new LinearScale($aYMin, $aYMax); + $this->ynscale[$aN]->SetIntScale(); + } elseif ($aAxisType == 'log') { + $this->ynscale[$aN] = new LogScale($aYMin, $aYMax); + } else { + Util\JpGraphError::RaiseL(25024, $aAxisType); //("JpGraph: Unsupported Y axis type: $aAxisType\nMust be one of (lin,log,int)"); + } + + $this->ynaxis[$aN] = new Axis($this->img, $this->ynscale[$aN]); + $this->ynaxis[$aN]->scale->ticks->SetDirection(SIDE_LEFT); + $this->ynaxis[$aN]->SetLabelSide(SIDE_RIGHT); + + if ($this->graph_theme) { + $this->graph_theme->ApplyGraph($this); + } + } + + // Specify density of ticks when autoscaling 'normal', 'dense', 'sparse', 'verysparse' + // The dividing factor have been determined heuristically according to my aesthetic + // sense (or lack off) y.m.m.v ! + public function SetTickDensity($aYDensity = TICKD_NORMAL, $aXDensity = TICKD_NORMAL) + { + $this->xtick_factor = 30; + $this->ytick_factor = 25; + switch ($aYDensity) { + case TICKD_DENSE: + $this->ytick_factor = 12; + break; + case TICKD_NORMAL: + $this->ytick_factor = 25; + break; + case TICKD_SPARSE: + $this->ytick_factor = 40; + break; + case TICKD_VERYSPARSE: + $this->ytick_factor = 100; + break; + default: + Util\JpGraphError::RaiseL(25025, $densy); //("JpGraph: Unsupported Tick density: $densy"); + } + switch ($aXDensity) { + case TICKD_DENSE: + $this->xtick_factor = 15; + break; + case TICKD_NORMAL: + $this->xtick_factor = 30; + break; + case TICKD_SPARSE: + $this->xtick_factor = 45; + break; + case TICKD_VERYSPARSE: + $this->xtick_factor = 60; + break; + default: + Util\JpGraphError::RaiseL(25025, $densx); //("JpGraph: Unsupported Tick density: $densx"); + } + } + + // Get a string of all image map areas + public function GetCSIMareas() + { + if (!$this->iHasStroked) { + $this->Stroke(_CSIM_SPECIALFILE); + } + + $csim = $this->title->GetCSIMAreas(); + $csim .= $this->subtitle->GetCSIMAreas(); + $csim .= $this->subsubtitle->GetCSIMAreas(); + $csim .= $this->legend->GetCSIMAreas(); + + if ($this->y2axis != null) { + $csim .= $this->y2axis->title->GetCSIMAreas(); + } + + if ($this->texts != null) { + $n = count($this->texts); + for ($i = 0; $i < $n; ++$i) { + $csim .= $this->texts[$i]->GetCSIMAreas(); + } + } + + if ($this->y2texts != null && $this->y2scale != null) { + $n = count($this->y2texts); + for ($i = 0; $i < $n; ++$i) { + $csim .= $this->y2texts[$i]->GetCSIMAreas(); + } + } + + if ($this->yaxis != null && $this->xaxis != null) { + $csim .= $this->yaxis->title->GetCSIMAreas(); + $csim .= $this->xaxis->title->GetCSIMAreas(); + } + + $n = count($this->plots); + for ($i = 0; $i < $n; ++$i) { + $csim .= $this->plots[$i]->GetCSIMareas(); + } + + $n = count($this->y2plots); + for ($i = 0; $i < $n; ++$i) { + $csim .= $this->y2plots[$i]->GetCSIMareas(); + } + + $n = count($this->ynaxis); + for ($i = 0; $i < $n; ++$i) { + $m = count($this->ynplots[$i]); + for ($j = 0; $j < $m; ++$j) { + $csim .= $this->ynplots[$i][$j]->GetCSIMareas(); + } + } + + $n = count($this->iTables); + for ($i = 0; $i < $n; ++$i) { + $csim .= $this->iTables[$i]->GetCSIMareas(); + } + + return $csim; + } + + // Get a complete .. tag for the final image map + public function GetHTMLImageMap($aMapName) + { + $im = "\n"; + $im .= $this->GetCSIMareas(); + $im .= ""; + return $im; + } + + public function CheckCSIMCache($aCacheName, $aTimeOut = 60) + { + global $_SERVER; + + if ($aCacheName == 'auto') { + $aCacheName = basename($_SERVER['PHP_SELF']); + } + + $urlarg = $this->GetURLArguments(); + $this->csimcachename = CSIMCACHE_DIR . $aCacheName . $urlarg; + $this->csimcachetimeout = $aTimeOut; + + // First determine if we need to check for a cached version + // This differs from the standard cache in the sense that the + // image and CSIM map HTML file is written relative to the directory + // the script executes in and not the specified cache directory. + // The reason for this is that the cache directory is not necessarily + // accessible from the HTTP server. + if ($this->csimcachename != '') { + $dir = dirname($this->csimcachename); + $base = basename($this->csimcachename); + $base = strtok($base, '.'); + $suffix = strtok('.'); + $basecsim = $dir . '/' . $base . '?' . $urlarg . '_csim_.html'; + $baseimg = $dir . '/' . $base . '?' . $urlarg . '.' . $this->img->img_format; + + $timedout = false; + // Does it exist at all ? + + if (file_exists($basecsim) && file_exists($baseimg)) { + // Check that it hasn't timed out + $diff = time() - filemtime($basecsim); + if ($this->csimcachetimeout > 0 && ($diff > $this->csimcachetimeout * 60)) { + $timedout = true; + @unlink($basecsim); + @unlink($baseimg); + } else { + if ($fh = @fopen($basecsim, "r")) { + fpassthru($fh); + return true; + } else { + Util\JpGraphError::RaiseL(25027, $basecsim); //(" Can't open cached CSIM \"$basecsim\" for reading."); + } + } + } + } + return false; + } + + // Build the argument string to be used with the csim images + public static function GetURLArguments($aAddRecursiveBlocker = false) + { + + if ($aAddRecursiveBlocker) { + // This is a JPGRAPH internal defined that prevents + // us from recursively coming here again + $urlarg = _CSIM_DISPLAY . '=1'; + } + + // Now reconstruct any user URL argument + reset($_GET); + while (list($key, $value) = each($_GET)) { + if (is_array($value)) { + foreach ($value as $k => $v) { + $urlarg .= '&' . $key . '%5B' . $k . '%5D=' . urlencode($v); + } + } else { + $urlarg .= '&' . $key . '=' . urlencode($value); + } + } + + // It's not ideal to convert POST argument to GET arguments + // but there is little else we can do. One idea for the + // future might be recreate the POST header in case. + reset($_POST); + while (list($key, $value) = each($_POST)) { + if (is_array($value)) { + foreach ($value as $k => $v) { + $urlarg .= '&' . $key . '%5B' . $k . '%5D=' . urlencode($v); + } + } else { + $urlarg .= '&' . $key . '=' . urlencode($value); + } + } + + return $urlarg; + } + + public function SetCSIMImgAlt($aAlt) + { + $this->iCSIMImgAlt = $aAlt; + } + + public function StrokeCSIM($aScriptName = 'auto', $aCSIMName = '', $aBorder = 0) + { + if ($aCSIMName == '') { + // create a random map name + srand((double) microtime() * 1000000); + $r = rand(0, 100000); + $aCSIMName = '__mapname' . $r . '__'; + } + + if ($aScriptName == 'auto') { + $aScriptName = basename($_SERVER['PHP_SELF']); + } + + $urlarg = $this->GetURLArguments(true); + + if (empty($_GET[_CSIM_DISPLAY])) { + // First determine if we need to check for a cached version + // This differs from the standard cache in the sense that the + // image and CSIM map HTML file is written relative to the directory + // the script executes in and not the specified cache directory. + // The reason for this is that the cache directory is not necessarily + // accessible from the HTTP server. + if ($this->csimcachename != '') { + $dir = dirname($this->csimcachename); + $base = basename($this->csimcachename); + $base = strtok($base, '.'); + $suffix = strtok('.'); + $basecsim = $dir . '/' . $base . '?' . $urlarg . '_csim_.html'; + $baseimg = $base . '?' . $urlarg . '.' . $this->img->img_format; + + // Check that apache can write to directory specified + + if (file_exists($dir) && !is_writeable($dir)) { + Util\JpGraphError::RaiseL(25028, $dir); //('Apache/PHP does not have permission to write to the CSIM cache directory ('.$dir.'). Check permissions.'); + } + + // Make sure directory exists + $this->cache->MakeDirs($dir); + + // Write the image file + $this->Stroke(CSIMCACHE_DIR . $baseimg); + + // Construct wrapper HTML and write to file and send it back to browser + + // In the src URL we must replace the '?' with its encoding to prevent the arguments + // to be converted to real arguments. + $tmp = str_replace('?', '%3f', $baseimg); + $htmlwrap = $this->GetHTMLImageMap($aCSIMName) . "\n" . + 'img->width . '" height="' . $this->img->height . "\" alt=\"" . $this->iCSIMImgAlt . "\" />\n"; + + if ($fh = @fopen($basecsim, 'w')) { + fwrite($fh, $htmlwrap); + fclose($fh); + echo $htmlwrap; + } else { + Util\JpGraphError::RaiseL(25029, $basecsim); //(" Can't write CSIM \"$basecsim\" for writing. Check free space and permissions."); + } + } else { + + if ($aScriptName == '') { + Util\JpGraphError::RaiseL(25030); //('Missing script name in call to StrokeCSIM(). You must specify the name of the actual image script as the first parameter to StrokeCSIM().'); + } + echo $this->GetHTMLImageMap($aCSIMName) . $this->GetCSIMImgHTML($aCSIMName, $aScriptName, $aBorder); + } + } else { + $this->Stroke(); + } + } + + public function StrokeCSIMImage() + { + if (@$_GET[_CSIM_DISPLAY] == 1) { + $this->Stroke(); + } + } + + public function GetCSIMImgHTML($aCSIMName, $aScriptName = 'auto', $aBorder = 0) + { + if ($aScriptName == 'auto') { + $aScriptName = basename($_SERVER['PHP_SELF']); + } + $urlarg = $this->GetURLArguments(true); + return "\""iCSIMImgAlt . "\" />\n"; + } + + public function GetTextsYMinMax($aY2 = false) + { + if ($aY2) { + $txts = $this->y2texts; + } else { + $txts = $this->texts; + } + $n = count($txts); + $min = null; + $max = null; + for ($i = 0; $i < $n; ++$i) { + if ($txts[$i]->iScalePosY !== null && $txts[$i]->iScalePosX !== null) { + if ($min === null) { + $min = $max = $txts[$i]->iScalePosY; + } else { + $min = min($min, $txts[$i]->iScalePosY); + $max = max($max, $txts[$i]->iScalePosY); + } + } + } + if ($min !== null) { + return array($min, $max); + } else { + return null; + } + } + + public function GetTextsXMinMax($aY2 = false) + { + if ($aY2) { + $txts = $this->y2texts; + } else { + $txts = $this->texts; + } + $n = count($txts); + $min = null; + $max = null; + for ($i = 0; $i < $n; ++$i) { + if ($txts[$i]->iScalePosY !== null && $txts[$i]->iScalePosX !== null) { + if ($min === null) { + $min = $max = $txts[$i]->iScalePosX; + } else { + $min = min($min, $txts[$i]->iScalePosX); + $max = max($max, $txts[$i]->iScalePosX); + } + } + } + if ($min !== null) { + return array($min, $max); + } else { + return null; + } + } + + public function GetXMinMax() + { + + list($min, $ymin) = $this->plots[0]->Min(); + list($max, $ymax) = $this->plots[0]->Max(); + + $i = 0; + // Some plots, e.g. PlotLine should not affect the scale + // and will return (null,null). We should ignore those + // values. + while (($min === null || $max === null) && ($i < count($this->plots) - 1)) { + ++$i; + list($min, $ymin) = $this->plots[$i]->Min(); + list($max, $ymax) = $this->plots[$i]->Max(); + } + + foreach ($this->plots as $p) { + list($xmin, $ymin) = $p->Min(); + list($xmax, $ymax) = $p->Max(); + + if ($xmin !== null && $xmax !== null) { + $min = Min($xmin, $min); + $max = Max($xmax, $max); + } + } + + if ($this->y2axis != null) { + foreach ($this->y2plots as $p) { + list($xmin, $ymin) = $p->Min(); + list($xmax, $ymax) = $p->Max(); + $min = Min($xmin, $min); + $max = Max($xmax, $max); + } + } + + $n = count($this->ynaxis); + for ($i = 0; $i < $n; ++$i) { + if ($this->ynaxis[$i] != null) { + foreach ($this->ynplots[$i] as $p) { + list($xmin, $ymin) = $p->Min(); + list($xmax, $ymax) = $p->Max(); + $min = Min($xmin, $min); + $max = Max($xmax, $max); + } + } + } + return array($min, $max); + } + + public function AdjustMarginsForTitles() + { + $totrequired = + ($this->title->t != '' + ? $this->title->GetTextHeight($this->img) + $this->title->margin + 5 * SUPERSAMPLING_SCALE + : 0) + + ($this->subtitle->t != '' + ? $this->subtitle->GetTextHeight($this->img) + $this->subtitle->margin + 5 * SUPERSAMPLING_SCALE + : 0) + + ($this->subsubtitle->t != '' + ? $this->subsubtitle->GetTextHeight($this->img) + $this->subsubtitle->margin + 5 * SUPERSAMPLING_SCALE + : 0); + + $btotrequired = 0; + if ($this->xaxis != null && !$this->xaxis->hide && !$this->xaxis->hide_labels) { + // Minimum bottom margin + if ($this->xaxis->title->t != '') { + if ($this->img->a == 90) { + $btotrequired = $this->yaxis->title->GetTextHeight($this->img) + 7; + } else { + $btotrequired = $this->xaxis->title->GetTextHeight($this->img) + 7; + } + } else { + $btotrequired = 0; + } + + if ($this->img->a == 90) { + $this->img->SetFont($this->yaxis->font_family, $this->yaxis->font_style, + $this->yaxis->font_size); + $lh = $this->img->GetTextHeight('Mg', $this->yaxis->label_angle); + } else { + $this->img->SetFont($this->xaxis->font_family, $this->xaxis->font_style, + $this->xaxis->font_size); + $lh = $this->img->GetTextHeight('Mg', $this->xaxis->label_angle); + } + + $btotrequired += $lh + 6; + } + + if ($this->img->a == 90) { + // DO Nothing. It gets too messy to do this properly for 90 deg... + } else { + // need more top margin + if ($this->img->top_margin < $totrequired) { + $this->SetMargin( + $this->img->raw_left_margin, + $this->img->raw_right_margin, + $totrequired / SUPERSAMPLING_SCALE, + $this->img->raw_bottom_margin + ); + } + + // need more bottom margin + if ($this->img->bottom_margin < $btotrequired) { + $this->SetMargin( + $this->img->raw_left_margin, + $this->img->raw_right_margin, + $this->img->raw_top_margin, + $btotrequired / SUPERSAMPLING_SCALE + ); + } + } + } + + public function StrokeStore($aStrokeFileName) + { + // Get the handler to prevent the library from sending the + // image to the browser + $ih = $this->Stroke(_IMG_HANDLER); + + // Stroke it to a file + $this->img->Stream($aStrokeFileName); + + // Send it back to browser + $this->img->Headers(); + $this->img->Stream(); + } + + public function doAutoscaleXAxis() + { + //Check if we should autoscale x-axis + if (!$this->xscale->IsSpecified()) { + if (substr($this->axtype, 0, 4) == "text") { + $max = 0; + $n = count($this->plots); + for ($i = 0; $i < $n; ++$i) { + $p = $this->plots[$i]; + // We need some unfortunate sub class knowledge here in order + // to increase number of data points in case it is a line plot + // which has the barcenter set. If not it could mean that the + // last point of the data is outside the scale since the barcenter + // settings means that we will shift the entire plot half a tick step + // to the right in oder to align with the center of the bars. + if (class_exists('BarPlot', false)) { + $cl = strtolower(get_class($p)); + if ((class_exists('BarPlot', false) && ($p instanceof BarPlot)) || empty($p->barcenter)) { + $max = max($max, $p->numpoints - 1); + } else { + $max = max($max, $p->numpoints); + } + } else { + if (empty($p->barcenter)) { + $max = max($max, $p->numpoints - 1); + } else { + $max = max($max, $p->numpoints); + } + } + } + $min = 0; + if ($this->y2axis != null) { + foreach ($this->y2plots as $p) { + $max = max($max, $p->numpoints - 1); + } + } + $n = count($this->ynaxis); + for ($i = 0; $i < $n; ++$i) { + if ($this->ynaxis[$i] != null) { + foreach ($this->ynplots[$i] as $p) { + $max = max($max, $p->numpoints - 1); + } + } + } + + $this->xscale->Update($this->img, $min, $max); + $this->xscale->ticks->Set($this->xaxis->tick_step, 1); + $this->xscale->ticks->SupressMinorTickMarks(); + } else { + list($min, $max) = $this->GetXMinMax(); + + $lres = $this->GetLinesXMinMax($this->lines); + if ($lres) { + list($linmin, $linmax) = $lres; + $min = min($min, $linmin); + $max = max($max, $linmax); + } + + $lres = $this->GetLinesXMinMax($this->y2lines); + if ($lres) { + list($linmin, $linmax) = $lres; + $min = min($min, $linmin); + $max = max($max, $linmax); + } + + $tres = $this->GetTextsXMinMax(); + if ($tres) { + list($tmin, $tmax) = $tres; + $min = min($min, $tmin); + $max = max($max, $tmax); + } + + $tres = $this->GetTextsXMinMax(true); + if ($tres) { + list($tmin, $tmax) = $tres; + $min = min($min, $tmin); + $max = max($max, $tmax); + } + + $this->xscale->AutoScale($this->img, $min, $max, round($this->img->plotwidth / $this->xtick_factor)); + } + + //Adjust position of y-axis and y2-axis to minimum/maximum of x-scale + if (!is_numeric($this->yaxis->pos) && !is_string($this->yaxis->pos)) { + $this->yaxis->SetPos($this->xscale->GetMinVal()); + } + } elseif ($this->xscale->IsSpecified() && + ($this->xscale->auto_ticks || !$this->xscale->ticks->IsSpecified())) { + // The tick calculation will use the user suplied min/max values to determine + // the ticks. If auto_ticks is false the exact user specifed min and max + // values will be used for the scale. + // If auto_ticks is true then the scale might be slightly adjusted + // so that the min and max values falls on an even major step. + $min = $this->xscale->scale[0]; + $max = $this->xscale->scale[1]; + $this->xscale->AutoScale($this->img, $min, $max, round($this->img->plotwidth / $this->xtick_factor), false); + + // Now make sure we show enough precision to accurate display the + // labels. If this is not done then the user might end up with + // a scale that might actually start with, say 13.5, butdue to rounding + // the scale label will ony show 14. + if (abs(floor($min) - $min) > 0) { + + // If the user has set a format then we bail out + if ($this->xscale->ticks->label_formatstr == '' && $this->xscale->ticks->label_dateformatstr == '') { + $this->xscale->ticks->precision = abs(floor(log10(abs(floor($min) - $min)))) + 1; + } + } + } + + // Position the optional Y2 and Yn axis to the rightmost position of the x-axis + if ($this->y2axis != null) { + if (!is_numeric($this->y2axis->pos) && !is_string($this->y2axis->pos)) { + $this->y2axis->SetPos($this->xscale->GetMaxVal()); + } + $this->y2axis->SetTitleSide(SIDE_RIGHT); + } + + $n = count($this->ynaxis); + $nY2adj = $this->y2axis != null ? $this->iYAxisDeltaPos : 0; + for ($i = 0; $i < $n; ++$i) { + if ($this->ynaxis[$i] != null) { + if (!is_numeric($this->ynaxis[$i]->pos) && !is_string($this->ynaxis[$i]->pos)) { + $this->ynaxis[$i]->SetPos($this->xscale->GetMaxVal()); + $this->ynaxis[$i]->SetPosAbsDelta($i * $this->iYAxisDeltaPos + $nY2adj); + } + $this->ynaxis[$i]->SetTitleSide(SIDE_RIGHT); + } + } + } + + public function doAutoScaleYnAxis() + { + + if ($this->y2scale != null) { + if (!$this->y2scale->IsSpecified() && count($this->y2plots) > 0) { + list($min, $max) = $this->GetPlotsYMinMax($this->y2plots); + + $lres = $this->GetLinesYMinMax($this->y2lines); + if (is_array($lres)) { + list($linmin, $linmax) = $lres; + $min = min($min, $linmin); + $max = max($max, $linmax); + } + $tres = $this->GetTextsYMinMax(true); + if (is_array($tres)) { + list($tmin, $tmax) = $tres; + $min = min($min, $tmin); + $max = max($max, $tmax); + } + $this->y2scale->AutoScale($this->img, $min, $max, $this->img->plotheight / $this->ytick_factor); + } elseif ($this->y2scale->IsSpecified() && ($this->y2scale->auto_ticks || !$this->y2scale->ticks->IsSpecified())) { + // The tick calculation will use the user suplied min/max values to determine + // the ticks. If auto_ticks is false the exact user specifed min and max + // values will be used for the scale. + // If auto_ticks is true then the scale might be slightly adjusted + // so that the min and max values falls on an even major step. + $min = $this->y2scale->scale[0]; + $max = $this->y2scale->scale[1]; + $this->y2scale->AutoScale($this->img, $min, $max, + $this->img->plotheight / $this->ytick_factor, + $this->y2scale->auto_ticks); + + // Now make sure we show enough precision to accurate display the + // labels. If this is not done then the user might end up with + // a scale that might actually start with, say 13.5, butdue to rounding + // the scale label will ony show 14. + if (abs(floor($min) - $min) > 0) { + // If the user has set a format then we bail out + if ($this->y2scale->ticks->label_formatstr == '' && $this->y2scale->ticks->label_dateformatstr == '') { + $this->y2scale->ticks->precision = abs(floor(log10(abs(floor($min) - $min)))) + 1; + } + } + + } + } + + // + // Autoscale the extra Y-axises + // + $n = count($this->ynaxis); + for ($i = 0; $i < $n; ++$i) { + if ($this->ynscale[$i] != null) { + if (!$this->ynscale[$i]->IsSpecified() && count($this->ynplots[$i]) > 0) { + list($min, $max) = $this->GetPlotsYMinMax($this->ynplots[$i]); + $this->ynscale[$i]->AutoScale($this->img, $min, $max, $this->img->plotheight / $this->ytick_factor); + } elseif ($this->ynscale[$i]->IsSpecified() && ($this->ynscale[$i]->auto_ticks || !$this->ynscale[$i]->ticks->IsSpecified())) { + // The tick calculation will use the user suplied min/max values to determine + // the ticks. If auto_ticks is false the exact user specifed min and max + // values will be used for the scale. + // If auto_ticks is true then the scale might be slightly adjusted + // so that the min and max values falls on an even major step. + $min = $this->ynscale[$i]->scale[0]; + $max = $this->ynscale[$i]->scale[1]; + $this->ynscale[$i]->AutoScale($this->img, $min, $max, + $this->img->plotheight / $this->ytick_factor, + $this->ynscale[$i]->auto_ticks); + + // Now make sure we show enough precision to accurate display the + // labels. If this is not done then the user might end up with + // a scale that might actually start with, say 13.5, butdue to rounding + // the scale label will ony show 14. + if (abs(floor($min) - $min) > 0) { + // If the user has set a format then we bail out + if ($this->ynscale[$i]->ticks->label_formatstr == '' && $this->ynscale[$i]->ticks->label_dateformatstr == '') { + $this->ynscale[$i]->ticks->precision = abs(floor(log10(abs(floor($min) - $min)))) + 1; + } + } + } + } + } + } + + public function doAutoScaleYAxis() + { + + //Check if we should autoscale y-axis + if (!$this->yscale->IsSpecified() && count($this->plots) > 0) { + list($min, $max) = $this->GetPlotsYMinMax($this->plots); + $lres = $this->GetLinesYMinMax($this->lines); + if (is_array($lres)) { + list($linmin, $linmax) = $lres; + $min = min($min, $linmin); + $max = max($max, $linmax); + } + $tres = $this->GetTextsYMinMax(); + if (is_array($tres)) { + list($tmin, $tmax) = $tres; + $min = min($min, $tmin); + $max = max($max, $tmax); + } + $this->yscale->AutoScale($this->img, $min, $max, + $this->img->plotheight / $this->ytick_factor); + } elseif ($this->yscale->IsSpecified() && ($this->yscale->auto_ticks || !$this->yscale->ticks->IsSpecified())) { + // The tick calculation will use the user suplied min/max values to determine + // the ticks. If auto_ticks is false the exact user specifed min and max + // values will be used for the scale. + // If auto_ticks is true then the scale might be slightly adjusted + // so that the min and max values falls on an even major step. + $min = $this->yscale->scale[0]; + $max = $this->yscale->scale[1]; + $this->yscale->AutoScale($this->img, $min, $max, + $this->img->plotheight / $this->ytick_factor, + $this->yscale->auto_ticks); + + // Now make sure we show enough precision to accurate display the + // labels. If this is not done then the user might end up with + // a scale that might actually start with, say 13.5, butdue to rounding + // the scale label will ony show 14. + if (abs(floor($min) - $min) > 0) { + + // If the user has set a format then we bail out + if ($this->yscale->ticks->label_formatstr == '' && $this->yscale->ticks->label_dateformatstr == '') { + $this->yscale->ticks->precision = abs(floor(log10(abs(floor($min) - $min)))) + 1; + } + } + } + + } + + public function InitScaleConstants() + { + // Setup scale constants + if ($this->yscale) { + $this->yscale->InitConstants($this->img); + } + + if ($this->xscale) { + $this->xscale->InitConstants($this->img); + } + + if ($this->y2scale) { + $this->y2scale->InitConstants($this->img); + } + + $n = count($this->ynscale); + for ($i = 0; $i < $n; ++$i) { + if ($this->ynscale[$i]) { + $this->ynscale[$i]->InitConstants($this->img); + } + } + } + + public function doPrestrokeAdjustments() + { + + // Do any pre-stroke adjustment that is needed by the different plot types + // (i.e bar plots want's to add an offset to the x-labels etc) + for ($i = 0; $i < count($this->plots); ++$i) { + $this->plots[$i]->PreStrokeAdjust($this); + $this->plots[$i]->DoLegend($this); + } + + // Any plots on the second Y scale? + if ($this->y2scale != null) { + for ($i = 0; $i < count($this->y2plots); ++$i) { + $this->y2plots[$i]->PreStrokeAdjust($this); + $this->y2plots[$i]->DoLegend($this); + } + } + + // Any plots on the extra Y axises? + $n = count($this->ynaxis); + for ($i = 0; $i < $n; ++$i) { + if ($this->ynplots == null || $this->ynplots[$i] == null) { + Util\JpGraphError::RaiseL(25032, $i); //("No plots for Y-axis nbr:$i"); + } + $m = count($this->ynplots[$i]); + for ($j = 0; $j < $m; ++$j) { + $this->ynplots[$i][$j]->PreStrokeAdjust($this); + $this->ynplots[$i][$j]->DoLegend($this); + } + } + } + + public function StrokeBands($aDepth, $aCSIM) + { + // Stroke bands + if ($this->bands != null && !$aCSIM) { + for ($i = 0; $i < count($this->bands); ++$i) { + // Stroke all bands that asks to be in the background + if ($this->bands[$i]->depth == $aDepth) { + $this->bands[$i]->Stroke($this->img, $this->xscale, $this->yscale); + } + } + } + + if ($this->y2bands != null && $this->y2scale != null && !$aCSIM) { + for ($i = 0; $i < count($this->y2bands); ++$i) { + // Stroke all bands that asks to be in the foreground + if ($this->y2bands[$i]->depth == $aDepth) { + $this->y2bands[$i]->Stroke($this->img, $this->xscale, $this->y2scale); + } + } + } + } + + // Stroke the graph + // $aStrokeFileName If != "" the image will be written to this file and NOT + // streamed back to the browser + public function Stroke($aStrokeFileName = '') + { + // Fist make a sanity check that user has specified a scale + if (empty($this->yscale)) { + Util\JpGraphError::RaiseL(25031); //('You must specify what scale to use with a call to Graph::SetScale().'); + } + + // Start by adjusting the margin so that potential titles will fit. + $this->AdjustMarginsForTitles(); + + // Give the plot a chance to do any scale adjuments the individual plots + // wants to do. Right now this is only used by the contour plot to set scale + // limits + for ($i = 0; $i < count($this->plots); ++$i) { + $this->plots[$i]->PreScaleSetup($this); + } + + // Init scale constants that are used to calculate the transformation from + // world to pixel coordinates + $this->InitScaleConstants(); + + // If the filename is the predefined value = '_csim_special_' + // we assume that the call to stroke only needs to do enough + // to correctly generate the CSIM maps. + // We use this variable to skip things we don't strictly need + // to do to generate the image map to improve performance + // a best we can. Therefor you will see a lot of tests !$_csim in the + // code below. + $_csim = ($aStrokeFileName === _CSIM_SPECIALFILE); + + // If we are called the second time (perhaps the user has called GetHTMLImageMap() + // himself then the legends have alsready been populated once in order to get the + // CSIM coordinats. Since we do not want the legends to be populated a second time + // we clear the legends + $this->legend->Clear(); + + // We need to know if we have stroked the plot in the + // GetCSIMareas. Otherwise the CSIM hasn't been generated + // and in the case of GetCSIM called before stroke to generate + // CSIM without storing an image to disk GetCSIM must call Stroke. + $this->iHasStroked = true; + + // Setup pre-stroked adjustments and Legends + $this->doPrestrokeAdjustments(); + + if ($this->graph_theme) { + $this->graph_theme->PreStrokeApply($this); + } + + // Bail out if any of the Y-axis not been specified and + // has no plots. (This means it is impossible to do autoscaling and + // no other scale was given so we can't possible draw anything). If you use manual + // scaling you also have to supply the tick steps as well. + if ((!$this->yscale->IsSpecified() && count($this->plots) == 0) || + ($this->y2scale != null && !$this->y2scale->IsSpecified() && count($this->y2plots) == 0)) { + //$e = "n=".count($this->y2plots)."\n"; + // $e = "Can't draw unspecified Y-scale.
        \nYou have either:
        \n"; + // $e .= "1. Specified an Y axis for autoscaling but have not supplied any plots
        \n"; + // $e .= "2. Specified a scale manually but have forgot to specify the tick steps"; + Util\JpGraphError::RaiseL(25026); + } + + // Bail out if no plots and no specified X-scale + if ((!$this->xscale->IsSpecified() && count($this->plots) == 0 && count($this->y2plots) == 0)) { + Util\JpGraphError::RaiseL(25034); //("JpGraph: Can't draw unspecified X-scale.
        No plots.
        "); + } + + // Autoscale the normal Y-axis + $this->doAutoScaleYAxis(); + + // Autoscale all additiopnal y-axis + $this->doAutoScaleYnAxis(); + + // Autoscale the regular x-axis and position the y-axis properly + $this->doAutoScaleXAxis(); + + // If we have a negative values and x-axis position is at 0 + // we need to supress the first and possible the last tick since + // they will be drawn on top of the y-axis (and possible y2 axis) + // The test below might seem strange the reasone being that if + // the user hasn't specified a value for position this will not + // be set until we do the stroke for the axis so as of now it + // is undefined. + // For X-text scale we ignore all this since the tick are usually + // much further in and not close to the Y-axis. Hence the test + // for 'text' + if (($this->yaxis->pos == $this->xscale->GetMinVal() || (is_string($this->yaxis->pos) && $this->yaxis->pos == 'min')) && + !is_numeric($this->xaxis->pos) && $this->yscale->GetMinVal() < 0 && + substr($this->axtype, 0, 4) != 'text' && $this->xaxis->pos != 'min') { + + //$this->yscale->ticks->SupressZeroLabel(false); + $this->xscale->ticks->SupressFirst(); + if ($this->y2axis != null) { + $this->xscale->ticks->SupressLast(); + } + } elseif (!is_numeric($this->yaxis->pos) && $this->yaxis->pos == 'max') { + $this->xscale->ticks->SupressLast(); + } + + if (!$_csim) { + $this->StrokePlotArea(); + if ($this->iIconDepth == DEPTH_BACK) { + $this->StrokeIcons(); + } + } + $this->StrokeAxis(false); + + // Stroke colored bands + $this->StrokeBands(DEPTH_BACK, $_csim); + + if ($this->grid_depth == DEPTH_BACK && !$_csim) { + $this->ygrid->Stroke(); + $this->xgrid->Stroke(); + } + + // Stroke Y2-axis + if ($this->y2axis != null && !$_csim) { + $this->y2axis->Stroke($this->xscale); + $this->y2grid->Stroke(); + } + + // Stroke yn-axis + $n = count($this->ynaxis); + for ($i = 0; $i < $n; ++$i) { + $this->ynaxis[$i]->Stroke($this->xscale); + } + + $oldoff = $this->xscale->off; + if (substr($this->axtype, 0, 4) == 'text') { + if ($this->text_scale_abscenteroff > -1) { + // For a text scale the scale factor is the number of pixel per step. + // Hence we can use the scale factor as a substitute for number of pixels + // per major scale step and use that in order to adjust the offset so that + // an object of width "abscenteroff" becomes centered. + $this->xscale->off += round($this->xscale->scale_factor / 2) - round($this->text_scale_abscenteroff / 2); + } else { + $this->xscale->off += ceil($this->xscale->scale_factor * $this->text_scale_off * $this->xscale->ticks->minor_step); + } + } + + if ($this->iDoClipping) { + $oldimage = $this->img->CloneCanvasH(); + } + + if (!$this->y2orderback) { + // Stroke all plots for Y1 axis + for ($i = 0; $i < count($this->plots); ++$i) { + $this->plots[$i]->Stroke($this->img, $this->xscale, $this->yscale); + $this->plots[$i]->StrokeMargin($this->img); + } + } + + // Stroke all plots for Y2 axis + if ($this->y2scale != null) { + for ($i = 0; $i < count($this->y2plots); ++$i) { + $this->y2plots[$i]->Stroke($this->img, $this->xscale, $this->y2scale); + } + } + + if ($this->y2orderback) { + // Stroke all plots for Y1 axis + for ($i = 0; $i < count($this->plots); ++$i) { + $this->plots[$i]->Stroke($this->img, $this->xscale, $this->yscale); + $this->plots[$i]->StrokeMargin($this->img); + } + } + + $n = count($this->ynaxis); + for ($i = 0; $i < $n; ++$i) { + $m = count($this->ynplots[$i]); + for ($j = 0; $j < $m; ++$j) { + $this->ynplots[$i][$j]->Stroke($this->img, $this->xscale, $this->ynscale[$i]); + $this->ynplots[$i][$j]->StrokeMargin($this->img); + } + } + + if ($this->iIconDepth == DEPTH_FRONT) { + $this->StrokeIcons(); + } + + if ($this->iDoClipping) { + // Clipping only supports graphs at 0 and 90 degrees + if ($this->img->a == 0) { + $this->img->CopyCanvasH($oldimage, $this->img->img, + $this->img->left_margin, $this->img->top_margin, + $this->img->left_margin, $this->img->top_margin, + $this->img->plotwidth + 1, $this->img->plotheight); + } elseif ($this->img->a == 90) { + $adj = ($this->img->height - $this->img->width) / 2; + $this->img->CopyCanvasH($oldimage, $this->img->img, + $this->img->bottom_margin - $adj, $this->img->left_margin + $adj, + $this->img->bottom_margin - $adj, $this->img->left_margin + $adj, + $this->img->plotheight + 1, $this->img->plotwidth); + } else { + Util\JpGraphError::RaiseL(25035, $this->img->a); //('You have enabled clipping. Cliping is only supported for graphs at 0 or 90 degrees rotation. Please adjust you current angle (='.$this->img->a.' degrees) or disable clipping.'); + } + $this->img->Destroy(); + $this->img->SetCanvasH($oldimage); + } + + $this->xscale->off = $oldoff; + + if ($this->grid_depth == DEPTH_FRONT && !$_csim) { + $this->ygrid->Stroke(); + $this->xgrid->Stroke(); + } + + // Stroke colored bands + $this->StrokeBands(DEPTH_FRONT, $_csim); + + // Finally draw the axis again since some plots may have nagged + // the axis in the edges. + if (!$_csim) { + $this->StrokeAxis(); + } + + if ($this->y2scale != null && !$_csim) { + $this->y2axis->Stroke($this->xscale, false); + } + + if (!$_csim) { + $this->StrokePlotBox(); + } + + // The titles and legends never gets rotated so make sure + // that the angle is 0 before stroking them + $aa = $this->img->SetAngle(0); + $this->StrokeTitles(); + $this->footer->Stroke($this->img); + $this->legend->Stroke($this->img); + $this->img->SetAngle($aa); + $this->StrokeTexts(); + $this->StrokeTables(); + + if (!$_csim) { + + $this->img->SetAngle($aa); + + // Draw an outline around the image map + if (_JPG_DEBUG) { + $this->DisplayClientSideaImageMapAreas(); + } + + // Should we do any final image transformation + if ($this->iImgTrans) { + if (!class_exists('ImgTrans', false)) { + require_once 'jpgraph_imgtrans.php'; + //Util\JpGraphError::Raise('In order to use image transformation you must include the file jpgraph_imgtrans.php in your script.'); + } + + $tform = new Image\ImgTrans($this->img->img); + $this->img->img = $tform->Skew3D($this->iImgTransHorizon, $this->iImgTransSkewDist, + $this->iImgTransDirection, $this->iImgTransHighQ, + $this->iImgTransMinSize, $this->iImgTransFillColor, + $this->iImgTransBorder); + } + + // If the filename is given as the special "__handle" + // then the image handler is returned and the image is NOT + // streamed back + if ($aStrokeFileName == _IMG_HANDLER) { + return $this->img->img; + } else { + // Finally stream the generated picture + $this->cache->PutAndStream($this->img, $this->cache_name, $this->inline, $aStrokeFileName); + } + } + } + + public function SetAxisLabelBackground($aType, $aXFColor = 'lightgray', $aXColor = 'black', $aYFColor = 'lightgray', $aYColor = 'black') + { + $this->iAxisLblBgType = $aType; + $this->iXAxisLblBgFillColor = $aXFColor; + $this->iXAxisLblBgColor = $aXColor; + $this->iYAxisLblBgFillColor = $aYFColor; + $this->iYAxisLblBgColor = $aYColor; + } + + public function StrokeAxisLabelBackground() + { + // Types + // 0 = No background + // 1 = Only X-labels, length of axis + // 2 = Only Y-labels, length of axis + // 3 = As 1 but extends to width of graph + // 4 = As 2 but extends to height of graph + // 5 = Combination of 3 & 4 + // 6 = Combination of 1 & 2 + + $t = $this->iAxisLblBgType; + if ($t < 1) { + return; + } + + // Stroke optional X-axis label background color + if ($t == 1 || $t == 3 || $t == 5 || $t == 6) { + $this->img->PushColor($this->iXAxisLblBgFillColor); + if ($t == 1 || $t == 6) { + $xl = $this->img->left_margin; + $yu = $this->img->height - $this->img->bottom_margin + 1; + $xr = $this->img->width - $this->img->right_margin; + $yl = $this->img->height - 1 - $this->frame_weight; + } else { + // t==3 || t==5 + $xl = $this->frame_weight; + $yu = $this->img->height - $this->img->bottom_margin + 1; + $xr = $this->img->width - 1 - $this->frame_weight; + $yl = $this->img->height - 1 - $this->frame_weight; + } + + $this->img->FilledRectangle($xl, $yu, $xr, $yl); + $this->img->PopColor(); + + // Check if we should add the vertical lines at left and right edge + if ($this->iXAxisLblBgColor !== '') { + // Hardcode to one pixel wide + $this->img->SetLineWeight(1); + $this->img->PushColor($this->iXAxisLblBgColor); + if ($t == 1 || $t == 6) { + $this->img->Line($xl, $yu, $xl, $yl); + $this->img->Line($xr, $yu, $xr, $yl); + } else { + $xl = $this->img->width - $this->img->right_margin; + $this->img->Line($xl, $yu - 1, $xr, $yu - 1); + } + $this->img->PopColor(); + } + } + + if ($t == 2 || $t == 4 || $t == 5 || $t == 6) { + $this->img->PushColor($this->iYAxisLblBgFillColor); + if ($t == 2 || $t == 6) { + $xl = $this->frame_weight; + $yu = $this->frame_weight + $this->img->top_margin; + $xr = $this->img->left_margin - 1; + $yl = $this->img->height - $this->img->bottom_margin + 1; + } else { + $xl = $this->frame_weight; + $yu = $this->frame_weight; + $xr = $this->img->left_margin - 1; + $yl = $this->img->height - 1 - $this->frame_weight; + } + + $this->img->FilledRectangle($xl, $yu, $xr, $yl); + $this->img->PopColor(); + + // Check if we should add the vertical lines at left and right edge + if ($this->iXAxisLblBgColor !== '') { + $this->img->PushColor($this->iXAxisLblBgColor); + if ($t == 2 || $t == 6) { + $this->img->Line($xl, $yu - 1, $xr, $yu - 1); + $this->img->Line($xl, $yl - 1, $xr, $yl - 1); + } else { + $this->img->Line($xr + 1, $yu, $xr + 1, $this->img->top_margin); + } + $this->img->PopColor(); + } + + } + } + + public function StrokeAxis($aStrokeLabels = true) + { + + if ($aStrokeLabels) { + $this->StrokeAxisLabelBackground(); + } + + // Stroke axis + if ($this->iAxisStyle != AXSTYLE_SIMPLE) { + switch ($this->iAxisStyle) { + case AXSTYLE_BOXIN: + $toppos = SIDE_DOWN; + $bottompos = SIDE_UP; + $leftpos = SIDE_RIGHT; + $rightpos = SIDE_LEFT; + break; + case AXSTYLE_BOXOUT: + $toppos = SIDE_UP; + $bottompos = SIDE_DOWN; + $leftpos = SIDE_LEFT; + $rightpos = SIDE_RIGHT; + break; + case AXSTYLE_YBOXIN: + $toppos = false; + $bottompos = SIDE_UP; + $leftpos = SIDE_RIGHT; + $rightpos = SIDE_LEFT; + break; + case AXSTYLE_YBOXOUT: + $toppos = false; + $bottompos = SIDE_DOWN; + $leftpos = SIDE_LEFT; + $rightpos = SIDE_RIGHT; + break; + default: + Util\JpGraphError::RaiseL(25036, $this->iAxisStyle); //('Unknown AxisStyle() : '.$this->iAxisStyle); + break; + } + + // By default we hide the first label so it doesn't cross the + // Y-axis in case the positon hasn't been set by the user. + // However, if we use a box we always want the first value + // displayed so we make sure it will be displayed. + $this->xscale->ticks->SupressFirst(false); + + // Now draw the bottom X-axis + $this->xaxis->SetPos('min'); + $this->xaxis->SetLabelSide(SIDE_DOWN); + $this->xaxis->scale->ticks->SetSide($bottompos); + $this->xaxis->Stroke($this->yscale, $aStrokeLabels); + + if ($toppos !== false) { + // We also want a top X-axis + $this->xaxis = $this->xaxis; + $this->xaxis->SetPos('max'); + $this->xaxis->SetLabelSide(SIDE_UP); + // No title for the top X-axis + if ($aStrokeLabels) { + $this->xaxis->title->Set(''); + } + $this->xaxis->scale->ticks->SetSide($toppos); + $this->xaxis->Stroke($this->yscale, $aStrokeLabels); + } + + // Stroke the left Y-axis + $this->yaxis->SetPos('min'); + $this->yaxis->SetLabelSide(SIDE_LEFT); + $this->yaxis->scale->ticks->SetSide($leftpos); + $this->yaxis->Stroke($this->xscale, $aStrokeLabels); + + // Stroke the right Y-axis + $this->yaxis->SetPos('max'); + // No title for the right side + if ($aStrokeLabels) { + $this->yaxis->title->Set(''); + } + $this->yaxis->SetLabelSide(SIDE_RIGHT); + $this->yaxis->scale->ticks->SetSide($rightpos); + $this->yaxis->Stroke($this->xscale, $aStrokeLabels); + } else { + $this->xaxis->Stroke($this->yscale, $aStrokeLabels); + $this->yaxis->Stroke($this->xscale, $aStrokeLabels); + } + } + + // Private helper function for backgound image + public static function LoadBkgImage($aImgFormat = '', $aFile = '', $aImgStr = '') + { + if ($aImgStr != '') { + return Image::CreateFromString($aImgStr); + } + + // Remove case sensitivity and setup appropriate function to create image + // Get file extension. This should be the LAST '.' separated part of the filename + $e = explode('.', $aFile); + $ext = strtolower($e[count($e) - 1]); + if ($ext == "jpeg") { + $ext = "jpg"; + } + + if (trim($ext) == '') { + $ext = 'png'; // Assume PNG if no extension specified + } + + if ($aImgFormat == '') { + $imgtag = $ext; + } else { + $imgtag = $aImgFormat; + } + + $supported = imagetypes(); + if (($ext == 'jpg' && !($supported & IMG_JPG)) || + ($ext == 'gif' && !($supported & IMG_GIF)) || + ($ext == 'png' && !($supported & IMG_PNG)) || + ($ext == 'bmp' && !($supported & IMG_WBMP)) || + ($ext == 'xpm' && !($supported & IMG_XPM))) { + + Util\JpGraphError::RaiseL(25037, $aFile); //('The image format of your background image ('.$aFile.') is not supported in your system configuration. '); + } + + if ($imgtag == "jpg" || $imgtag == "jpeg") { + $f = "imagecreatefromjpeg"; + $imgtag = "jpg"; + } else { + $f = "imagecreatefrom" . $imgtag; + } + + // Compare specified image type and file extension + if ($imgtag != $ext) { + //$t = "Background image seems to be of different type (has different file extension) than specified imagetype. Specified: '".$aImgFormat."'File: '".$aFile."'"; + Util\JpGraphError::RaiseL(25038, $aImgFormat, $aFile); + } + + $img = @$f($aFile); + if (!$img) { + Util\JpGraphError::RaiseL(25039, $aFile); //(" Can't read background image: '".$aFile."'"); + } + return $img; + } + + public function StrokePlotGrad() + { + if ($this->plot_gradtype < 0) { + return; + } + + $grad = new Plot\Gradient($this->img); + $xl = $this->img->left_margin; + $yt = $this->img->top_margin; + $xr = $xl + $this->img->plotwidth + 1; + $yb = $yt + $this->img->plotheight; + $grad->FilledRectangle($xl, $yt, $xr, $yb, $this->plot_gradfrom, $this->plot_gradto, $this->plot_gradtype); + + } + + public function StrokeBackgroundGrad() + { + if ($this->bkg_gradtype < 0) { + return; + } + + $grad = new Plot\Gradient($this->img); + if ($this->bkg_gradstyle == BGRAD_PLOT) { + $xl = $this->img->left_margin; + $yt = $this->img->top_margin; + $xr = $xl + $this->img->plotwidth + 1; + $yb = $yt + $this->img->plotheight; + $grad->FilledRectangle($xl, $yt, $xr, $yb, $this->bkg_gradfrom, $this->bkg_gradto, $this->bkg_gradtype); + } else { + $xl = 0; + $yt = 0; + $xr = $xl + $this->img->width - 1; + $yb = $yt + $this->img->height - 1; + if ($this->doshadow) { + $xr -= $this->shadow_width; + $yb -= $this->shadow_width; + } + if ($this->doframe) { + $yt += $this->frame_weight; + $yb -= $this->frame_weight; + $xl += $this->frame_weight; + $xr -= $this->frame_weight; + } + $aa = $this->img->SetAngle(0); + $grad->FilledRectangle($xl, $yt, $xr, $yb, $this->bkg_gradfrom, $this->bkg_gradto, $this->bkg_gradtype); + $aa = $this->img->SetAngle($aa); + } + } + + public function StrokeFrameBackground() + { + if ($this->background_image != '' && $this->background_cflag != '') { + Util\JpGraphError::RaiseL(25040); //('It is not possible to specify both a background image and a background country flag.'); + } + if ($this->background_image != '') { + $bkgimg = $this->LoadBkgImage($this->background_image_format, $this->background_image); + } elseif ($this->background_cflag != '') { + if (!class_exists('FlagImages', false)) { + Util\JpGraphError::RaiseL(25041); //('In order to use Country flags as backgrounds you must include the "jpgraph_flags.php" file.'); + } + $fobj = new Images\FlagImages(FLAGSIZE4); + $dummy = ''; + $bkgimg = $fobj->GetImgByName($this->background_cflag, $dummy); + $this->background_image_mix = $this->background_cflag_mix; + $this->background_image_type = $this->background_cflag_type; + } else { + return; + } + + $bw = ImageSX($bkgimg); + $bh = ImageSY($bkgimg); + + // No matter what the angle is we always stroke the image and frame + // assuming it is 0 degree + $aa = $this->img->SetAngle(0); + + switch ($this->background_image_type) { + case BGIMG_FILLPLOT: // Resize to just fill the plotarea + $this->FillMarginArea(); + $this->StrokeFrame(); + // Special case to hande 90 degree rotated graph corectly + if ($aa == 90) { + $this->img->SetAngle(90); + $this->FillPlotArea(); + $aa = $this->img->SetAngle(0); + $adj = ($this->img->height - $this->img->width) / 2; + $this->img->CopyMerge($bkgimg, + $this->img->bottom_margin - $adj, $this->img->left_margin + $adj, + 0, 0, + $this->img->plotheight + 1, $this->img->plotwidth, + $bw, $bh, $this->background_image_mix); + } else { + $this->FillPlotArea(); + $this->img->CopyMerge($bkgimg, + $this->img->left_margin, $this->img->top_margin + 1, + 0, 0, $this->img->plotwidth + 1, $this->img->plotheight, + $bw, $bh, $this->background_image_mix); + } + break; + case BGIMG_FILLFRAME: // Fill the whole area from upper left corner, resize to just fit + $hadj = 0; + $vadj = 0; + if ($this->doshadow) { + $hadj = $this->shadow_width; + $vadj = $this->shadow_width; + } + $this->FillMarginArea(); + $this->FillPlotArea(); + $this->img->CopyMerge($bkgimg, 0, 0, 0, 0, $this->img->width - $hadj, $this->img->height - $vadj, + $bw, $bh, $this->background_image_mix); + $this->StrokeFrame(); + break; + case BGIMG_COPY: // Just copy the image from left corner, no resizing + $this->FillMarginArea(); + $this->FillPlotArea(); + $this->img->CopyMerge($bkgimg, 0, 0, 0, 0, $bw, $bh, + $bw, $bh, $this->background_image_mix); + $this->StrokeFrame(); + break; + case BGIMG_CENTER: // Center original image in the plot area + $this->FillMarginArea(); + $this->FillPlotArea(); + $centerx = round($this->img->plotwidth / 2 + $this->img->left_margin - $bw / 2); + $centery = round($this->img->plotheight / 2 + $this->img->top_margin - $bh / 2); + $this->img->CopyMerge($bkgimg, $centerx, $centery, 0, 0, $bw, $bh, + $bw, $bh, $this->background_image_mix); + $this->StrokeFrame(); + break; + case BGIMG_FREE: // Just copy the image to the specified location + $this->img->CopyMerge($bkgimg, + $this->background_image_xpos, $this->background_image_ypos, + 0, 0, $bw, $bh, $bw, $bh, $this->background_image_mix); + $this->StrokeFrame(); // New + break; + default: + Util\JpGraphError::RaiseL(25042); //(" Unknown background image layout"); + } + $this->img->SetAngle($aa); + } + + // Private + // Draw a frame around the image + public function StrokeFrame() + { + if (!$this->doframe) { + return; + } + + if ($this->background_image_type <= 1 && ($this->bkg_gradtype < 0 || ($this->bkg_gradtype > 0 && $this->bkg_gradstyle == BGRAD_PLOT))) { + $c = $this->margin_color; + } else { + $c = false; + } + + if ($this->doshadow) { + $this->img->SetColor($this->frame_color); + $this->img->ShadowRectangle(0, 0, $this->img->width, $this->img->height, + $c, $this->shadow_width, $this->shadow_color); + } elseif ($this->framebevel) { + if ($c) { + $this->img->SetColor($this->margin_color); + $this->img->FilledRectangle(0, 0, $this->img->width - 1, $this->img->height - 1); + } + $this->img->Bevel(1, 1, $this->img->width - 2, $this->img->height - 2, + $this->framebeveldepth, + $this->framebevelcolor1, $this->framebevelcolor2); + if ($this->framebevelborder) { + $this->img->SetColor($this->framebevelbordercolor); + $this->img->Rectangle(0, 0, $this->img->width - 1, $this->img->height - 1); + } + } else { + $this->img->SetLineWeight($this->frame_weight); + if ($c) { + $this->img->SetColor($this->margin_color); + $this->img->FilledRectangle(0, 0, $this->img->width - 1, $this->img->height - 1); + } + $this->img->SetColor($this->frame_color); + $this->img->Rectangle(0, 0, $this->img->width - 1, $this->img->height - 1); + } + } + + public function FillMarginArea() + { + $hadj = 0; + $vadj = 0; + if ($this->doshadow) { + $hadj = $this->shadow_width; + $vadj = $this->shadow_width; + } + + $this->img->SetColor($this->margin_color); + $this->img->FilledRectangle(0, 0, $this->img->width - 1 - $hadj, $this->img->height - 1 - $vadj); + + $this->img->FilledRectangle(0, 0, $this->img->width - 1 - $hadj, $this->img->top_margin); + $this->img->FilledRectangle(0, $this->img->top_margin, $this->img->left_margin, $this->img->height - 1 - $hadj); + $this->img->FilledRectangle($this->img->left_margin + 1, + $this->img->height - $this->img->bottom_margin, + $this->img->width - 1 - $hadj, + $this->img->height - 1 - $hadj); + $this->img->FilledRectangle($this->img->width - $this->img->right_margin, + $this->img->top_margin + 1, + $this->img->width - 1 - $hadj, + $this->img->height - $this->img->bottom_margin - 1); + } + + public function FillPlotArea() + { + $this->img->PushColor($this->plotarea_color); + $this->img->FilledRectangle($this->img->left_margin, + $this->img->top_margin, + $this->img->width - $this->img->right_margin, + $this->img->height - $this->img->bottom_margin); + $this->img->PopColor(); + } + + // Stroke the plot area with either a solid color or a background image + public function StrokePlotArea() + { + // Note: To be consistent we really should take a possible shadow + // into account. However, that causes some problem for the LinearScale class + // since in the current design it does not have any links to class Graph which + // means it has no way of compensating for the adjusted plotarea in case of a + // shadow. So, until I redesign LinearScale we can't compensate for this. + // So just set the two adjustment parameters to zero for now. + $boxadj = 0; //$this->doframe ? $this->frame_weight : 0 ; + $adj = 0; //$this->doshadow ? $this->shadow_width : 0 ; + + if ($this->background_image != '' || $this->background_cflag != '') { + $this->StrokeFrameBackground(); + } else { + $aa = $this->img->SetAngle(0); + $this->StrokeFrame(); + $aa = $this->img->SetAngle($aa); + $this->StrokeBackgroundGrad(); + if ($this->bkg_gradtype < 0 || ($this->bkg_gradtype > 0 && $this->bkg_gradstyle == BGRAD_MARGIN)) { + $this->FillPlotArea(); + } + $this->StrokePlotGrad(); + } + } + + public function StrokeIcons() + { + $n = count($this->iIcons); + for ($i = 0; $i < $n; ++$i) { + $this->iIcons[$i]->StrokeWithScale($this->img, $this->xscale, $this->yscale); + } + } + + public function StrokePlotBox() + { + // Should we draw a box around the plot area? + if ($this->boxed) { + $this->img->SetLineWeight(1); + $this->img->SetLineStyle('solid'); + $this->img->SetColor($this->box_color); + for ($i = 0; $i < $this->box_weight; ++$i) { + $this->img->Rectangle( + $this->img->left_margin - $i, $this->img->top_margin - $i, + $this->img->width - $this->img->right_margin + $i, + $this->img->height - $this->img->bottom_margin + $i); + } + } + } + + public function SetTitleBackgroundFillStyle($aStyle, $aColor1 = 'black', $aColor2 = 'white') + { + $this->titlebkg_fillstyle = $aStyle; + $this->titlebkg_scolor1 = $aColor1; + $this->titlebkg_scolor2 = $aColor2; + } + + public function SetTitleBackground($aBackColor = 'gray', $aStyle = TITLEBKG_STYLE1, $aFrameStyle = TITLEBKG_FRAME_NONE, $aFrameColor = 'black', $aFrameWeight = 1, $aBevelHeight = 3, $aEnable = true) + { + $this->titlebackground = $aEnable; + $this->titlebackground_color = $aBackColor; + $this->titlebackground_style = $aStyle; + $this->titlebackground_framecolor = $aFrameColor; + $this->titlebackground_framestyle = $aFrameStyle; + $this->titlebackground_frameweight = $aFrameWeight; + $this->titlebackground_bevelheight = $aBevelHeight; + } + + public function StrokeTitles() + { + + $margin = 3; + + if ($this->titlebackground) { + // Find out height + $this->title->margin += 2; + $h = $this->title->GetTextHeight($this->img) + $this->title->margin + $margin; + if ($this->subtitle->t != '' && !$this->subtitle->hide) { + $h += $this->subtitle->GetTextHeight($this->img) + $margin + + $this->subtitle->margin; + $h += 2; + } + if ($this->subsubtitle->t != '' && !$this->subsubtitle->hide) { + $h += $this->subsubtitle->GetTextHeight($this->img) + $margin + + $this->subsubtitle->margin; + $h += 2; + } + $this->img->PushColor($this->titlebackground_color); + if ($this->titlebackground_style === TITLEBKG_STYLE1) { + // Inside the frame + if ($this->framebevel) { + $x1 = $y1 = $this->framebeveldepth + 1; + $x2 = $this->img->width - $this->framebeveldepth - 2; + $this->title->margin += $this->framebeveldepth + 1; + $h += $y1; + $h += 2; + } else { + $x1 = $y1 = $this->frame_weight; + $x2 = $this->img->width - $this->frame_weight - 1; + } + } elseif ($this->titlebackground_style === TITLEBKG_STYLE2) { + // Cover the frame as well + $x1 = $y1 = 0; + $x2 = $this->img->width - 1; + } elseif ($this->titlebackground_style === TITLEBKG_STYLE3) { + // Cover the frame as well (the difference is that + // for style==3 a bevel frame border is on top + // of the title background) + $x1 = $y1 = 0; + $x2 = $this->img->width - 1; + $h += $this->framebeveldepth; + $this->title->margin += $this->framebeveldepth; + } else { + Util\JpGraphError::RaiseL(25043); //('Unknown title background style.'); + } + + if ($this->titlebackground_framestyle === 3) { + $h += $this->titlebackground_bevelheight * 2 + 1; + $this->title->margin += $this->titlebackground_bevelheight; + } + + if ($this->doshadow) { + $x2 -= $this->shadow_width; + } + + $indent = 0; + if ($this->titlebackground_framestyle == TITLEBKG_FRAME_BEVEL) { + $indent = $this->titlebackground_bevelheight; + } + + if ($this->titlebkg_fillstyle == TITLEBKG_FILLSTYLE_HSTRIPED) { + $this->img->FilledRectangle2($x1 + $indent, $y1 + $indent, $x2 - $indent, $h - $indent, + $this->titlebkg_scolor1, + $this->titlebkg_scolor2); + } elseif ($this->titlebkg_fillstyle == TITLEBKG_FILLSTYLE_VSTRIPED) { + $this->img->FilledRectangle2($x1 + $indent, $y1 + $indent, $x2 - $indent, $h - $indent, + $this->titlebkg_scolor1, + $this->titlebkg_scolor2, 2); + } else { + // Solid fill + $this->img->FilledRectangle($x1, $y1, $x2, $h); + } + $this->img->PopColor(); + + $this->img->PushColor($this->titlebackground_framecolor); + $this->img->SetLineWeight($this->titlebackground_frameweight); + if ($this->titlebackground_framestyle == TITLEBKG_FRAME_FULL) { + // Frame background + $this->img->Rectangle($x1, $y1, $x2, $h); + } elseif ($this->titlebackground_framestyle == TITLEBKG_FRAME_BOTTOM) { + // Bottom line only + $this->img->Line($x1, $h, $x2, $h); + } elseif ($this->titlebackground_framestyle == TITLEBKG_FRAME_BEVEL) { + $this->img->Bevel($x1, $y1, $x2, $h, $this->titlebackground_bevelheight); + } + $this->img->PopColor(); + + // This is clumsy. But we neeed to stroke the whole graph frame if it is + // set to bevel to get the bevel shading on top of the text background + if ($this->framebevel && $this->doframe && $this->titlebackground_style === 3) { + $this->img->Bevel(1, 1, $this->img->width - 2, $this->img->height - 2, + $this->framebeveldepth, + $this->framebevelcolor1, $this->framebevelcolor2); + if ($this->framebevelborder) { + $this->img->SetColor($this->framebevelbordercolor); + $this->img->Rectangle(0, 0, $this->img->width - 1, $this->img->height - 1); + } + } + } + + // Stroke title + $y = $this->title->margin; + if ($this->title->halign == 'center') { + $this->title->Center(0, $this->img->width, $y); + } elseif ($this->title->halign == 'left') { + $this->title->SetPos($this->title->margin + 2, $y); + } elseif ($this->title->halign == 'right') { + $indent = 0; + if ($this->doshadow) { + $indent = $this->shadow_width + 2; + } + $this->title->SetPos($this->img->width - $this->title->margin - $indent, $y, 'right'); + } + $this->title->Stroke($this->img); + + // ... and subtitle + $y += $this->title->GetTextHeight($this->img) + $margin + $this->subtitle->margin; + if ($this->subtitle->halign == 'center') { + $this->subtitle->Center(0, $this->img->width, $y); + } elseif ($this->subtitle->halign == 'left') { + $this->subtitle->SetPos($this->subtitle->margin + 2, $y); + } elseif ($this->subtitle->halign == 'right') { + $indent = 0; + if ($this->doshadow) { + $indent = $this->shadow_width + 2; + } + + $this->subtitle->SetPos($this->img->width - $this->subtitle->margin - $indent, $y, 'right'); + } + $this->subtitle->Stroke($this->img); + + // ... and subsubtitle + $y += $this->subtitle->GetTextHeight($this->img) + $margin + $this->subsubtitle->margin; + if ($this->subsubtitle->halign == 'center') { + $this->subsubtitle->Center(0, $this->img->width, $y); + } elseif ($this->subsubtitle->halign == 'left') { + $this->subsubtitle->SetPos($this->subsubtitle->margin + 2, $y); + } elseif ($this->subsubtitle->halign == 'right') { + $indent = 0; + if ($this->doshadow) { + $indent = $this->shadow_width + 2; + } + + $this->subsubtitle->SetPos($this->img->width - $this->subsubtitle->margin - $indent, $y, 'right'); + } + $this->subsubtitle->Stroke($this->img); + + // ... and fancy title + $this->tabtitle->Stroke($this->img); + + } + + public function StrokeTexts() + { + // Stroke any user added text objects + if ($this->texts != null) { + for ($i = 0; $i < count($this->texts); ++$i) { + $this->texts[$i]->StrokeWithScale($this->img, $this->xscale, $this->yscale); + } + } + + if ($this->y2texts != null && $this->y2scale != null) { + for ($i = 0; $i < count($this->y2texts); ++$i) { + $this->y2texts[$i]->StrokeWithScale($this->img, $this->xscale, $this->y2scale); + } + } + + } + + public function StrokeTables() + { + if ($this->iTables != null) { + $n = count($this->iTables); + for ($i = 0; $i < $n; ++$i) { + $this->iTables[$i]->StrokeWithScale($this->img, $this->xscale, $this->yscale); + } + } + } + + public function DisplayClientSideaImageMapAreas() + { + // Debug stuff - display the outline of the image map areas + $csim = ''; + foreach ($this->plots as $p) { + $csim .= $p->GetCSIMareas(); + } + $csim .= $this->legend->GetCSIMareas(); + if (preg_match_all("/area shape=\"(\w+)\" coords=\"([0-9\, ]+)\"/", $csim, $coords)) { + $this->img->SetColor($this->csimcolor); + $n = count($coords[0]); + for ($i = 0; $i < $n; $i++) { + if ($coords[1][$i] == 'poly') { + preg_match_all('/\s*([0-9]+)\s*,\s*([0-9]+)\s*,*/', $coords[2][$i], $pts); + $this->img->SetStartPoint($pts[1][count($pts[0]) - 1], $pts[2][count($pts[0]) - 1]); + $m = count($pts[0]); + for ($j = 0; $j < $m; $j++) { + $this->img->LineTo($pts[1][$j], $pts[2][$j]); + } + } elseif ($coords[1][$i] == 'rect') { + $pts = preg_split('/,/', $coords[2][$i]); + $this->img->SetStartPoint($pts[0], $pts[1]); + $this->img->LineTo($pts[2], $pts[1]); + $this->img->LineTo($pts[2], $pts[3]); + $this->img->LineTo($pts[0], $pts[3]); + $this->img->LineTo($pts[0], $pts[1]); + } + } + } + } + + // Text scale offset in world coordinates + public function SetTextScaleOff($aOff) + { + $this->text_scale_off = $aOff; + $this->xscale->text_scale_off = $aOff; + } + + // Text width of bar to be centered in absolute pixels + public function SetTextScaleAbsCenterOff($aOff) + { + $this->text_scale_abscenteroff = $aOff; + } + + // Get Y min and max values for added lines + public function GetLinesYMinMax($aLines) + { + $n = count($aLines); + if ($n == 0) { + return false; + } + + $min = $aLines[0]->scaleposition; + $max = $min; + $flg = false; + for ($i = 0; $i < $n; ++$i) { + if ($aLines[$i]->direction == HORIZONTAL) { + $flg = true; + $v = $aLines[$i]->scaleposition; + if ($min > $v) { + $min = $v; + } + + if ($max < $v) { + $max = $v; + } + + } + } + return $flg ? array($min, $max) : false; + } + + // Get X min and max values for added lines + public function GetLinesXMinMax($aLines) + { + $n = count($aLines); + if ($n == 0) { + return false; + } + + $min = $aLines[0]->scaleposition; + $max = $min; + $flg = false; + for ($i = 0; $i < $n; ++$i) { + if ($aLines[$i]->direction == VERTICAL) { + $flg = true; + $v = $aLines[$i]->scaleposition; + if ($min > $v) { + $min = $v; + } + + if ($max < $v) { + $max = $v; + } + + } + } + return $flg ? array($min, $max) : false; + } + + // Get min and max values for all included plots + public function GetPlotsYMinMax($aPlots) + { + $n = count($aPlots); + $i = 0; + do { + list($xmax, $max) = $aPlots[$i]->Max(); + } while (++$i < $n && !is_numeric($max)); + + $i = 0; + do { + list($xmin, $min) = $aPlots[$i]->Min(); + } while (++$i < $n && !is_numeric($min)); + + if (!is_numeric($min) || !is_numeric($max)) { + Util\JpGraphError::RaiseL(25044); //('Cannot use autoscaling since it is impossible to determine a valid min/max value of the Y-axis (only null values).'); + } + + for ($i = 0; $i < $n; ++$i) { + list($xmax, $ymax) = $aPlots[$i]->Max(); + list($xmin, $ymin) = $aPlots[$i]->Min(); + if (is_numeric($ymax)) { + $max = max($max, $ymax); + } + + if (is_numeric($ymin)) { + $min = min($min, $ymin); + } + + } + if ($min == '') { + $min = 0; + } + + if ($max == '') { + $max = 0; + } + + if ($min == 0 && $max == 0) { + // Special case if all values are 0 + $min = 0; + $max = 1; + } + return array($min, $max); + } + + public function hasLinePlotAndBarPlot() + { + $has_line = false; + $has_bar = false; + + foreach ($this->plots as $plot) { + if ($plot instanceof LinePlot) { + $has_line = true; + } + if ($plot instanceof BarPlot) { + $has_bar = true; + } + } + + if ($has_line && $has_bar) { + return true; + } + + return false; + } + + public function SetTheme($graph_theme) + { + + if (!($this instanceof PieGraph)) { + if (!$this->isAfterSetScale) { + Util\JpGraphError::RaiseL(25133); //('Use Graph::SetTheme() after Graph::SetScale().'); + } + } + + if ($this->graph_theme) { + $this->ClearTheme(); + } + $this->graph_theme = $graph_theme; + $this->graph_theme->ApplyGraph($this); + } + + public function ClearTheme() + { + $this->graph_theme = null; + + $this->isRunningClear = true; + + $this->__construct( + $this->inputValues['aWidth'], + $this->inputValues['aHeight'], + $this->inputValues['aCachedName'], + $this->inputValues['aTimeout'], + $this->inputValues['aInline'] + ); + + if (!($this instanceof PieGraph)) { + if ($this->isAfterSetScale) { + $this->SetScale( + $this->inputValues['aAxisType'], + $this->inputValues['aYMin'], + $this->inputValues['aYMax'], + $this->inputValues['aXMin'], + $this->inputValues['aXMax'] + ); + } + } + + $this->isRunningClear = false; + } + + public function SetSupersampling($do = false, $scale = 2) + { + if ($do) { + define('SUPERSAMPLING_SCALE', $scale); + // $this->img->scale = $scale; + } else { + define('SUPERSAMPLING_SCALE', 1); + //$this->img->scale = 0; + } + } + +} // Class diff --git a/vendor/amenadiel/jpgraph/src/graph/Grid.php b/vendor/amenadiel/jpgraph/src/graph/Grid.php new file mode 100644 index 0000000000..a874315f75 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/Grid.php @@ -0,0 +1,169 @@ +scale = $aAxis->scale; + $this->img = $aAxis->img; + } + + public function SetColor($aMajColor, $aMinColor = false) + { + $this->majorcolor = $aMajColor; + if ($aMinColor === false) { + $aMinColor = $aMajColor; + } + $this->minorcolor = $aMinColor; + } + + public function SetWeight($aMajorWeight, $aMinorWeight = 1) + { + $this->majorweight = $aMajorWeight; + $this->minorweight = $aMinorWeight; + } + + // Specify if grid should be dashed, dotted or solid + public function SetLineStyle($aMajorType, $aMinorType = 'solid') + { + $this->majortype = $aMajorType; + $this->minortype = $aMinorType; + } + + public function SetStyle($aMajorType, $aMinorType = 'solid') + { + $this->SetLineStyle($aMajorType, $aMinorType); + } + + // Decide if both major and minor grid should be displayed + public function Show($aShowMajor = true, $aShowMinor = false) + { + $this->show = $aShowMajor; + $this->showMinor = $aShowMinor; + } + + public function SetFill($aFlg = true, $aColor1 = 'lightgray', $aColor2 = 'lightblue') + { + $this->fill = $aFlg; + $this->fillcolor = array($aColor1, $aColor2); + } + + // Display the grid + public function Stroke() + { + if ($this->showMinor && !$this->scale->textscale) { + $this->DoStroke($this->scale->ticks->ticks_pos, $this->minortype, $this->minorcolor, $this->minorweight); + $this->DoStroke($this->scale->ticks->maj_ticks_pos, $this->majortype, $this->majorcolor, $this->majorweight); + } else { + $this->DoStroke($this->scale->ticks->maj_ticks_pos, $this->majortype, $this->majorcolor, $this->majorweight); + } + } + + //-------------- + // Private methods + // Draw the grid + public function DoStroke($aTicksPos, $aType, $aColor, $aWeight) + { + if (!$this->show) { + return; + } + + $nbrgrids = count($aTicksPos); + + if ($this->scale->type == 'y') { + $xl = $this->img->left_margin; + $xr = $this->img->width - $this->img->right_margin; + + if ($this->fill) { + // Draw filled areas + $y2 = $aTicksPos[0]; + $i = 1; + while ($i < $nbrgrids) { + $y1 = $y2; + $y2 = $aTicksPos[$i++]; + $this->img->SetColor($this->fillcolor[$i & 1]); + $this->img->FilledRectangle($xl, $y1, $xr, $y2); + } + } + + $this->img->SetColor($aColor); + $this->img->SetLineWeight($aWeight); + + // Draw grid lines + switch ($aType) { + case 'solid':$style = LINESTYLE_SOLID; + break; + case 'dotted':$style = LINESTYLE_DOTTED; + break; + case 'dashed':$style = LINESTYLE_DASHED; + break; + case 'longdashed':$style = LINESTYLE_LONGDASH; + break; + default: + $style = LINESTYLE_SOLID; + break; + } + + for ($i = 0; $i < $nbrgrids; ++$i) { + $y = $aTicksPos[$i]; + $this->img->StyleLine($xl, $y, $xr, $y, $style, true); + } + } elseif ($this->scale->type == 'x') { + $yu = $this->img->top_margin; + $yl = $this->img->height - $this->img->bottom_margin; + $limit = $this->img->width - $this->img->right_margin; + + if ($this->fill) { + // Draw filled areas + $x2 = $aTicksPos[0]; + $i = 1; + while ($i < $nbrgrids) { + $x1 = $x2; + $x2 = min($aTicksPos[$i++], $limit); + $this->img->SetColor($this->fillcolor[$i & 1]); + $this->img->FilledRectangle($x1, $yu, $x2, $yl); + } + } + + $this->img->SetColor($aColor); + $this->img->SetLineWeight($aWeight); + + // We must also test for limit since we might have + // an offset and the number of ticks is calculated with + // assumption offset==0 so we might end up drawing one + // to many gridlines + $i = 0; + $x = $aTicksPos[$i]; + while ($i < count($aTicksPos) && ($x = $aTicksPos[$i]) <= $limit) { + if ($aType == 'solid') { + $this->img->Line($x, $yl, $x, $yu); + } elseif ($aType == 'dotted') { + $this->img->DashedLineForGrid($x, $yl, $x, $yu, 1, 6); + } elseif ($aType == 'dashed') { + $this->img->DashedLineForGrid($x, $yl, $x, $yu, 2, 4); + } elseif ($aType == 'longdashed') { + $this->img->DashedLineForGrid($x, $yl, $x, $yu, 8, 6); + } + + ++$i; + } + } else { + Util\JpGraphError::RaiseL(25054, $this->scale->type); //('Internal error: Unknown grid axis ['.$this->scale->type.']'); + } + return true; + } +} // Class diff --git a/vendor/amenadiel/jpgraph/src/graph/HeaderProperty.php b/vendor/amenadiel/jpgraph/src/graph/HeaderProperty.php new file mode 100644 index 0000000000..f3d9288f24 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/HeaderProperty.php @@ -0,0 +1,128 @@ +grid = new LineProperty(); + } + + //--------------- + // PUBLIC METHODS + public function Show($aShow = true) + { + $this->iShowLabels = $aShow; + } + + public function SetIntervall($aInt) + { + $this->iIntervall = $aInt; + } + + public function SetInterval($aInt) + { + $this->iIntervall = $aInt; + } + + public function GetIntervall() + { + return $this->iIntervall; + } + + public function SetFont($aFFamily, $aFStyle = FS_NORMAL, $aFSize = 10) + { + $this->iFFamily = $aFFamily; + $this->iFStyle = $aFStyle; + $this->iFSize = $aFSize; + } + + public function SetFontColor($aColor) + { + $this->iTextColor = $aColor; + } + + public function GetFontHeight($aImg) + { + $aImg->SetFont($this->iFFamily, $this->iFStyle, $this->iFSize); + return $aImg->GetFontHeight(); + } + + public function GetFontWidth($aImg) + { + $aImg->SetFont($this->iFFamily, $this->iFStyle, $this->iFSize); + return $aImg->GetFontWidth(); + } + + public function GetStrWidth($aImg, $aStr) + { + $aImg->SetFont($this->iFFamily, $this->iFStyle, $this->iFSize); + return $aImg->GetTextWidth($aStr); + } + + public function SetStyle($aStyle) + { + $this->iStyle = $aStyle; + } + + public function SetBackgroundColor($aColor) + { + $this->iBackgroundColor = $aColor; + } + + public function SetFrameWeight($aWeight) + { + $this->iFrameWeight = $aWeight; + } + + public function SetFrameColor($aColor) + { + $this->iFrameColor = $aColor; + } + + // Only used by day scale + public function SetWeekendColor($aColor) + { + $this->iWeekendBackgroundColor = $aColor; + } + + // Only used by day scale + public function SetSundayFontColor($aColor) + { + $this->iSundayTextColor = $aColor; + } + + public function SetTitleVertMargin($aMargin) + { + $this->iTitleVertMargin = $aMargin; + } + + public function SetLabelFormatString($aStr) + { + $this->iLabelFormStr = $aStr; + } + + public function SetFormatString($aStr) + { + $this->SetLabelFormatString($aStr); + } + +} diff --git a/vendor/amenadiel/jpgraph/src/graph/HorizontalGridLine.php b/vendor/amenadiel/jpgraph/src/graph/HorizontalGridLine.php new file mode 100644 index 0000000000..28bff1e0fa --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/HorizontalGridLine.php @@ -0,0 +1,89 @@ +line = new LineProperty(); + $this->line->SetColor('gray@0.4'); + $this->line->SetStyle('dashed'); + } + + public function Show($aShow = true) + { + $this->iShow = $aShow; + } + + public function SetRowFillColor($aColor1, $aColor2 = '') + { + $this->iRowColor1 = $aColor1; + $this->iRowColor2 = $aColor2; + } + + public function SetStart($aStart) + { + $this->iStart = $aStart; + } + + public function Stroke($aImg, $aScale) + { + + if (!$this->iShow) { + return; + } + + // Get horizontal width of line + /* + $limst = $aScale->iStartDate; + $limen = $aScale->iEndDate; + $xt = round($aScale->TranslateDate($aScale->iStartDate)); + $xb = round($aScale->TranslateDate($limen)); + */ + + if ($this->iStart === 0) { + $xt = $aImg->left_margin - 1; + } else { + $xt = round($aScale->TranslateDate($aScale->iStartDate)) + 1; + } + + $xb = $aImg->width - $aImg->right_margin; + + $yt = round($aScale->TranslateVertPos(0)); + $yb = round($aScale->TranslateVertPos(1)); + $height = $yb - $yt; + + // Loop around for all lines in the chart + for ($i = 0; $i < $aScale->iVertLines; ++$i) { + $yb = $yt - $height; + $this->line->Stroke($aImg, $xt, $yb, $xb, $yb); + if ($this->iRowColor1 !== '') { + if ($i % 2 == 0) { + $aImg->PushColor($this->iRowColor1); + $aImg->FilledRectangle($xt, $yt, $xb, $yb); + $aImg->PopColor(); + } elseif ($this->iRowColor2 !== '') { + $aImg->PushColor($this->iRowColor2); + $aImg->FilledRectangle($xt, $yt, $xb, $yb); + $aImg->PopColor(); + } + } + $yt = round($aScale->TranslateVertPos($i + 1)); + } + $yb = $yt - $height; + $this->line->Stroke($aImg, $xt, $yb, $xb, $yb); + } +} diff --git a/vendor/amenadiel/jpgraph/src/graph/Legend.php b/vendor/amenadiel/jpgraph/src/graph/Legend.php new file mode 100644 index 0000000000..5d81268d42 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/Legend.php @@ -0,0 +1,519 @@ +hide = $aHide; + } + + public function SetHColMargin($aXMarg) + { + $this->xmargin = $aXMarg; + } + + public function SetVColMargin($aSpacing) + { + $this->ylinespacing = $aSpacing; + } + + public function SetLeftMargin($aXMarg) + { + $this->xlmargin = $aXMarg; + } + + // Synonym + public function SetLineSpacing($aSpacing) + { + $this->ylinespacing = $aSpacing; + } + + public function SetShadow($aShow = 'gray', $aWidth = 4) + { + if (is_string($aShow)) { + $this->shadow_color = $aShow; + $this->shadow = true; + } else { + $this->shadow = $aShow; + } + $this->shadow_width = $aWidth; + } + + public function SetMarkAbsSize($aSize) + { + $this->mark_abs_vsize = $aSize; + $this->mark_abs_hsize = $aSize; + } + + public function SetMarkAbsVSize($aSize) + { + $this->mark_abs_vsize = $aSize; + } + + public function SetMarkAbsHSize($aSize) + { + $this->mark_abs_hsize = $aSize; + } + + public function SetLineWeight($aWeight) + { + $this->weight = $aWeight; + } + + public function SetFrameWeight($aWeight) + { + $this->frameweight = $aWeight; + } + + public function SetLayout($aDirection = LEGEND_VERT) + { + $this->layout_n = $aDirection == LEGEND_VERT ? 1 : 99; + } + + public function SetColumns($aCols) + { + $this->layout_n = $aCols; + } + + public function SetReverse($f = true) + { + $this->reverse = $f; + } + + // Set color on frame around box + public function SetColor($aFontColor, $aColor = 'black') + { + $this->font_color = $aFontColor; + $this->color = $aColor; + } + + public function SetFont($aFamily, $aStyle = FS_NORMAL, $aSize = 10) + { + $this->font_family = $aFamily; + $this->font_style = $aStyle; + $this->font_size = $aSize; + } + + public function SetPos($aX, $aY, $aHAlign = 'right', $aVAlign = 'top') + { + $this->Pos($aX, $aY, $aHAlign, $aVAlign); + } + + public function SetAbsPos($aX, $aY, $aHAlign = 'right', $aVAlign = 'top') + { + $this->xabspos = $aX; + $this->yabspos = $aY; + $this->halign = $aHAlign; + $this->valign = $aVAlign; + } + + public function Pos($aX, $aY, $aHAlign = 'right', $aVAlign = 'top') + { + if (!($aX < 1 && $aY < 1)) { + JpGraphError::RaiseL(25120); //(" Position for legend must be given as percentage in range 0-1"); + } + $this->xpos = $aX; + $this->ypos = $aY; + $this->halign = $aHAlign; + $this->valign = $aVAlign; + } + + public function SetFillColor($aColor) + { + $this->fill_color = $aColor; + } + + public function Clear() + { + $this->txtcol = array(); + } + + public function Add($aTxt, $aColor, $aPlotmark = '', $aLinestyle = 0, $csimtarget = '', $csimalt = '', $csimwintarget = '') + { + $this->txtcol[] = array($aTxt, $aColor, $aPlotmark, $aLinestyle, $csimtarget, $csimalt, $csimwintarget); + } + + public function GetCSIMAreas() + { + return $this->csimareas; + } + + public function SetBackgroundGradient($aFrom = 'navy', $aTo = 'silver', $aGradType = 2) + { + $this->bkg_gradtype = $aGradType; + $this->bkg_gradfrom = $aFrom; + $this->bkg_gradto = $aTo; + } + + public function HasItems() + { + return (boolean) (count($this->txtcol)); + } + + public function Stroke($aImg) + { + // Constant + $fillBoxFrameWeight = 1; + + if ($this->hide) { + return; + } + + $aImg->SetFont($this->font_family, $this->font_style, $this->font_size); + + if ($this->reverse) { + $this->txtcol = array_reverse($this->txtcol); + } + + $n = count($this->txtcol); + if ($n == 0) { + return; + } + + // Find out the max width and height of each column to be able + // to size the legend box. + $numcolumns = ($n > $this->layout_n ? $this->layout_n : $n); + for ($i = 0; $i < $numcolumns; ++$i) { + $colwidth[$i] = $aImg->GetTextWidth($this->txtcol[$i][0]) + + 2 * $this->xmargin + 2 * $this->mark_abs_hsize; + $colheight[$i] = 0; + + } + + // Find our maximum height in each row + $rows = 0; + $rowheight[0] = 0; + for ($i = 0; $i < $n; ++$i) { + $h = max($this->mark_abs_vsize, $aImg->GetTextHeight($this->txtcol[$i][0])) + $this->ylinespacing; + + // Makes sure we always have a minimum of 1/4 (1/2 on each side) of the mark as space + // between two vertical legend entries + //$h = round(max($h,$this->mark_abs_vsize+$this->ymargin)); + //echo "Textheight #$i: tetxheight=".$aImg->GetTextHeight($this->txtcol[$i][0]).', '; + //echo "h=$h ({$this->mark_abs_vsize},{$this->ymargin})
        "; + if ($i % $numcolumns == 0) { + $rows++; + $rowheight[$rows - 1] = 0; + } + $rowheight[$rows - 1] = max($rowheight[$rows - 1], $h) + 1; + } + + $abs_height = 0; + for ($i = 0; $i < $rows; ++$i) { + $abs_height += $rowheight[$i]; + } + + // Make sure that the height is at least as high as mark size + ymargin + $abs_height = max($abs_height, $this->mark_abs_vsize); + $abs_height += $this->ybottom_margin; + + // Find out the maximum width in each column + for ($i = $numcolumns; $i < $n; ++$i) { + $colwidth[$i % $numcolumns] = max( + $aImg->GetTextWidth($this->txtcol[$i][0]) + 2 * $this->xmargin + 2 * $this->mark_abs_hsize, + $colwidth[$i % $numcolumns]); + } + + // Get the total width + $mtw = 0; + for ($i = 0; $i < $numcolumns; ++$i) { + $mtw += $colwidth[$i]; + } + + // remove the last rows interpace margin (since there is no next row) + $abs_height -= $this->ylinespacing; + + // Find out maximum width we need for legend box + $abs_width = $mtw + $this->xlmargin + ($numcolumns - 1) * $this->mark_abs_hsize; + + if ($this->xabspos === -1 && $this->yabspos === -1) { + $this->xabspos = $this->xpos * $aImg->width; + $this->yabspos = $this->ypos * $aImg->height; + } + + // Positioning of the legend box + if ($this->halign == 'left') { + $xp = $this->xabspos; + } elseif ($this->halign == 'center') { + $xp = $this->xabspos - $abs_width / 2; + } else { + $xp = $aImg->width - $this->xabspos - $abs_width; + } + + $yp = $this->yabspos; + if ($this->valign == 'center') { + $yp -= $abs_height / 2; + } elseif ($this->valign == 'bottom') { + $yp -= $abs_height; + } + + // Stroke legend box + $aImg->SetColor($this->color); + $aImg->SetLineWeight($this->frameweight); + $aImg->SetLineStyle('solid'); + + if ($this->shadow) { + $aImg->ShadowRectangle($xp, $yp, + $xp + $abs_width + $this->shadow_width + 2, + $yp + $abs_height + $this->shadow_width + 2, + $this->fill_color, $this->shadow_width + 2, $this->shadow_color); + } else { + $aImg->SetColor($this->fill_color); + $aImg->FilledRectangle($xp, $yp, $xp + $abs_width, $yp + $abs_height); + $aImg->SetColor($this->color); + $aImg->Rectangle($xp, $yp, $xp + $abs_width, $yp + $abs_height); + } + + if ($this->bkg_gradtype >= 0) { + $grad = new Plot\Gradient($aImg); + $grad->FilledRectangle($xp + 1, $yp + 1, + $xp + $abs_width - 3, $yp + $abs_height - 3, + $this->bkg_gradfrom, $this->bkg_gradto, + $this->bkg_gradtype); + } + + // x1,y1 is the position for the legend marker + text + // The vertical position is the baseline position for the text + // and every marker is adjusted acording to that. + + // For multiline texts this get more complicated. + + $x1 = $xp + $this->xlmargin; + $y1 = $yp + $rowheight[0] - $this->ylinespacing + 2; // The ymargin is included in rowheight + + // Now, y1 is the bottom vertical position of the first legend, i.e if + // the legend has multiple lines it is the bottom line. + + $grad = new Plot\Gradient($aImg); + $patternFactory = null; + + // Now stroke each legend in turn + // Each plot has added the following information to the legend + // p[0] = Legend text + // p[1] = Color, + // p[2] = For markers a reference to the PlotMark object + // p[3] = For lines the line style, for gradient the negative gradient style + // p[4] = CSIM target + // p[5] = CSIM Alt text + $i = 1; + $row = 0; + foreach ($this->txtcol as $p) { + + // STROKE DEBUG BOX + if (_JPG_DEBUG) { + $aImg->SetLineWeight(1); + $aImg->SetColor('red'); + $aImg->SetLineStyle('solid'); + $aImg->Rectangle($x1, $y1, $xp + $abs_width - 1, $y1 - $rowheight[$row]); + } + + $aImg->SetLineWeight($this->weight); + $x1 = round($x1) + 1; // We add one to not collide with the border + $y1 = round($y1); + + // This is the center offset up from the baseline which is + // considered the "center" of the marks. This gets slightly complicated since + // we need to consider if the text is a multiline paragraph or if it is only + // a single line. The reason is that for single line the y1 corresponds to the baseline + // and that is fine. However for a multiline paragraph there is no single baseline + // and in that case the y1 corresponds to the lowest y for the bounding box. In that + // case we center the mark in the middle of the paragraph + if (!preg_match('/\n/', $p[0])) { + // Single line + $marky = ceil($y1 - $this->mark_abs_vsize / 2) - 1; + } else { + // Paragraph + $marky = $y1 - $aImg->GetTextHeight($p[0]) / 2; + + // echo "y1=$y1, p[o]={$p[0]}, marky=$marky
        "; + } + + //echo "
        Mark #$i: marky=$marky
        "; + + $x1 += $this->mark_abs_hsize; + + if (!empty($p[2]) && $p[2]->GetType() > -1) { + + // Make a plot mark legend. This is constructed with a mark which + // is run through with a line + + // First construct a bit of the line that looks exactly like the + // line in the plot + $aImg->SetColor($p[1]); + if (is_string($p[3]) || $p[3] > 0) { + $aImg->SetLineStyle($p[3]); + $aImg->StyleLine($x1 - $this->mark_abs_hsize, $marky, $x1 + $this->mark_abs_hsize, $marky); + } + + // Stroke a mark using image + if ($p[2]->GetType() == MARK_IMG) { + $p[2]->Stroke($aImg, $x1, $marky); + } + + // Stroke a mark with the standard size + // (As long as it is not an image mark ) + if ($p[2]->GetType() != MARK_IMG) { + + // Clear any user callbacks since we ont want them called for + // the legend marks + $p[2]->iFormatCallback = ''; + $p[2]->iFormatCallback2 = ''; + + // Since size for circles is specified as the radius + // this means that we must half the size to make the total + // width behave as the other marks + if ($p[2]->GetType() == MARK_FILLEDCIRCLE || $p[2]->GetType() == MARK_CIRCLE) { + $p[2]->SetSize(min($this->mark_abs_vsize, $this->mark_abs_hsize) / 2); + $p[2]->Stroke($aImg, $x1, $marky); + } else { + $p[2]->SetSize(min($this->mark_abs_vsize, $this->mark_abs_hsize)); + $p[2]->Stroke($aImg, $x1, $marky); + } + } + } elseif (!empty($p[2]) && (is_string($p[3]) || $p[3] > 0)) { + // Draw a styled line + $aImg->SetColor($p[1]); + $aImg->SetLineStyle($p[3]); + $aImg->StyleLine($x1 - $this->mark_abs_hsize, $marky, $x1 + $this->mark_abs_hsize, $marky); + $aImg->StyleLine($x1 - $this->mark_abs_hsize, $marky + 1, $x1 + $this->mark_abs_hsize, $marky + 1); + } else { + // Draw a colored box + $color = $p[1]; + + // We make boxes slightly larger to better show + $boxsize = max($this->mark_abs_vsize, $this->mark_abs_hsize) + 2; + + $ym = $marky - ceil($boxsize / 2); // Marker y-coordinate + + // We either need to plot a gradient or a + // pattern. To differentiate we use a kludge. + // Patterns have a p[3] value of < -100 + if ($p[3] < -100) { + // p[1][0] == iPattern, p[1][1] == iPatternColor, p[1][2] == iPatternDensity + if ($patternFactory == null) { + $patternFactory = new RectPatternFactory(); + } + $prect = $patternFactory->Create($p[1][0], $p[1][1], 1); + $prect->SetBackground($p[1][3]); + $prect->SetDensity($p[1][2] + 1); + $prect->SetPos(new Rectangle($x1, $ym, $boxsize, $boxsize)); + $prect->Stroke($aImg); + $prect = null; + } else { + if (is_array($color) && count($color) == 2) { + // The client want a gradient color + $grad->FilledRectangle($x1 - $boxsize / 2, $ym, + $x1 + $boxsize / 2, $ym + $boxsize, + $color[0], $color[1], -$p[3]); + } else { + $aImg->SetColor($p[1]); + $aImg->FilledRectangle($x1 - $boxsize / 2, $ym, $x1 + $boxsize / 2, $ym + $boxsize); + } + + // Draw a plot frame line + $aImg->SetColor($this->color); + $aImg->SetLineWeight($fillBoxFrameWeight); + $aImg->Rectangle($x1 - $boxsize / 2, $ym, + $x1 + $boxsize / 2, $ym + $boxsize); + } + } + $aImg->SetColor($this->font_color); + $aImg->SetFont($this->font_family, $this->font_style, $this->font_size); + $aImg->SetTextAlign('left', 'baseline'); + + $debug = false; + $aImg->StrokeText($x1 + $this->mark_abs_hsize + $this->xmargin, $y1, $p[0], + 0, 'left', $debug); + + // Add CSIM for Legend if defined + if (!empty($p[4])) { + + $xs = $x1 - $this->mark_abs_hsize; + $ys = $y1 + 1; + $xe = $x1 + $aImg->GetTextWidth($p[0]) + $this->mark_abs_hsize + $this->xmargin; + $ye = $y1 - $rowheight[$row] + 1; + $coords = "$xs,$ys,$xe,$y1,$xe,$ye,$xs,$ye"; + if (!empty($p[4])) { + $this->csimareas .= "csimareas .= " target=\"" . $p[6] . "\""; + } + + if (!empty($p[5])) { + $tmp = sprintf($p[5], $p[0]); + $this->csimareas .= " title=\"$tmp\" alt=\"$tmp\" "; + } + $this->csimareas .= " />\n"; + } + } + + if ($i >= $this->layout_n) { + $x1 = $xp + $this->xlmargin; + $row++; + if (!empty($rowheight[$row])) { + $y1 += $rowheight[$row]; + } + + $i = 1; + } else { + $x1 += $colwidth[($i - 1) % $numcolumns]; + ++$i; + } + } + } +} // Class diff --git a/vendor/amenadiel/jpgraph/src/graph/LineProperty.php b/vendor/amenadiel/jpgraph/src/graph/LineProperty.php new file mode 100644 index 0000000000..6b99a77c0e --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/LineProperty.php @@ -0,0 +1,54 @@ +iWeight = $aWeight; + $this->iColor = $aColor; + $this->iStyle = $aStyle; + } + + public function SetColor($aColor) + { + $this->iColor = $aColor; + } + + public function SetWeight($aWeight) + { + $this->iWeight = $aWeight; + } + + public function SetStyle($aStyle) + { + $this->iStyle = $aStyle; + } + + public function Show($aShow = true) + { + $this->iShow = $aShow; + } + + public function Stroke($aImg, $aX1, $aY1, $aX2, $aY2) + { + if ($this->iShow) { + $aImg->PushColor($this->iColor); + $oldls = $aImg->line_style; + $oldlw = $aImg->line_weight; + $aImg->SetLineWeight($this->iWeight); + $aImg->SetLineStyle($this->iStyle); + $aImg->StyleLine($aX1, $aY1, $aX2, $aY2); + $aImg->PopColor($this->iColor); + $aImg->line_style = $oldls; + $aImg->line_weight = $oldlw; + + } + } +} diff --git a/vendor/amenadiel/jpgraph/src/graph/LinearScale.php b/vendor/amenadiel/jpgraph/src/graph/LinearScale.php new file mode 100644 index 0000000000..126298d3ed --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/LinearScale.php @@ -0,0 +1,596 @@ +type = $aType; + $this->scale = array($aMin, $aMax); + $this->world_size = $aMax - $aMin; + $this->ticks = new LinearTicks(); + } + + // Check if scale is set or if we should autoscale + // We should do this is either scale or ticks has not been set + public function IsSpecified() + { + if ($this->GetMinVal() == $this->GetMaxVal()) { + // Scale not set + return false; + } + return true; + } + + // Set the minimum data value when the autoscaling is used. + // Usefull if you want a fix minimum (like 0) but have an + // automatic maximum + public function SetAutoMin($aMin) + { + $this->autoscale_min = $aMin; + } + + // Set the minimum data value when the autoscaling is used. + // Usefull if you want a fix minimum (like 0) but have an + // automatic maximum + public function SetAutoMax($aMax) + { + $this->autoscale_max = $aMax; + } + + // If the user manually specifies a scale should the ticks + // still be set automatically? + public function SetAutoTicks($aFlag = true) + { + $this->auto_ticks = $aFlag; + } + + // Specify scale "grace" value (top and bottom) + public function SetGrace($aGraceTop, $aGraceBottom = 0) + { + if ($aGraceTop < 0 || $aGraceBottom < 0) { + Util\JpGraphError::RaiseL(25069); //(" Grace must be larger then 0"); + } + $this->gracetop = $aGraceTop; + $this->gracebottom = $aGraceBottom; + } + + // Get the minimum value in the scale + public function GetMinVal() + { + return $this->scale[0]; + } + + // get maximum value for scale + public function GetMaxVal() + { + return $this->scale[1]; + } + + // Specify a new min/max value for sclae + public function Update($aImg, $aMin, $aMax) + { + $this->scale = array($aMin, $aMax); + $this->world_size = $aMax - $aMin; + $this->InitConstants($aImg); + } + + // Translate between world and screen + public function Translate($aCoord) + { + if (!is_numeric($aCoord)) { + if ($aCoord != '' && $aCoord != '-' && $aCoord != 'x') { + Util\JpGraphError::RaiseL(25070); //('Your data contains non-numeric values.'); + } + return 0; + } else { + return round($this->off + ($aCoord - $this->scale[0]) * $this->scale_factor); + } + } + + // Relative translate (don't include offset) usefull when we just want + // to know the relative position (in pixels) on the axis + public function RelTranslate($aCoord) + { + if (!is_numeric($aCoord)) { + if ($aCoord != '' && $aCoord != '-' && $aCoord != 'x') { + Util\JpGraphError::RaiseL(25070); //('Your data contains non-numeric values.'); + } + return 0; + } else { + return ($aCoord - $this->scale[0]) * $this->scale_factor; + } + } + + // Restrict autoscaling to only use integers + public function SetIntScale($aIntScale = true) + { + $this->intscale = $aIntScale; + } + + // Calculate an integer autoscale + public function IntAutoScale($img, $min, $max, $maxsteps, $majend = true) + { + // Make sure limits are integers + $min = floor($min); + $max = ceil($max); + if (abs($min - $max) == 0) { + --$min; ++$max; + } + $maxsteps = floor($maxsteps); + + $gracetop = round(($this->gracetop / 100.0) * abs($max - $min)); + $gracebottom = round(($this->gracebottom / 100.0) * abs($max - $min)); + if (is_numeric($this->autoscale_min)) { + $min = ceil($this->autoscale_min); + if ($min >= $max) { + Util\JpGraphError::RaiseL(25071); //('You have specified a min value with SetAutoMin() which is larger than the maximum value used for the scale. This is not possible.'); + } + } + + if (is_numeric($this->autoscale_max)) { + $max = ceil($this->autoscale_max); + if ($min >= $max) { + Util\JpGraphError::RaiseL(25072); //('You have specified a max value with SetAutoMax() which is smaller than the miminum value used for the scale. This is not possible.'); + } + } + + if (abs($min - $max) == 0) { + ++$max; + --$min; + } + + $min -= $gracebottom; + $max += $gracetop; + + // First get tickmarks as multiples of 1, 10, ... + if ($majend) { + list($num1steps, $adj1min, $adj1max, $maj1step) = $this->IntCalcTicks($maxsteps, $min, $max, 1); + } else { + $adj1min = $min; + $adj1max = $max; + list($num1steps, $maj1step) = $this->IntCalcTicksFreeze($maxsteps, $min, $max, 1); + } + + if (abs($min - $max) > 2) { + // Then get tick marks as 2:s 2, 20, ... + if ($majend) { + list($num2steps, $adj2min, $adj2max, $maj2step) = $this->IntCalcTicks($maxsteps, $min, $max, 5); + } else { + $adj2min = $min; + $adj2max = $max; + list($num2steps, $maj2step) = $this->IntCalcTicksFreeze($maxsteps, $min, $max, 5); + } + } else { + $num2steps = 10000; // Dummy high value so we don't choose this + } + + if (abs($min - $max) > 5) { + // Then get tickmarks as 5:s 5, 50, 500, ... + if ($majend) { + list($num5steps, $adj5min, $adj5max, $maj5step) = $this->IntCalcTicks($maxsteps, $min, $max, 2); + } else { + $adj5min = $min; + $adj5max = $max; + list($num5steps, $maj5step) = $this->IntCalcTicksFreeze($maxsteps, $min, $max, 2); + } + } else { + $num5steps = 10000; // Dummy high value so we don't choose this + } + + // Check to see whichof 1:s, 2:s or 5:s fit better with + // the requested number of major ticks + $match1 = abs($num1steps - $maxsteps); + $match2 = abs($num2steps - $maxsteps); + if (!empty($maj5step) && $maj5step > 1) { + $match5 = abs($num5steps - $maxsteps); + } else { + $match5 = 10000; // Dummy high value + } + + // Compare these three values and see which is the closest match + // We use a 0.6 weight to gravitate towards multiple of 5:s + if ($match1 < $match2) { + if ($match1 < $match5) { + $r = 1; + } else { + $r = 3; + } + + } else { + if ($match2 < $match5) { + $r = 2; + } else { + $r = 3; + } + + } + // Minsteps are always the same as maxsteps for integer scale + switch ($r) { + case 1: + $this->ticks->Set($maj1step, $maj1step); + $this->Update($img, $adj1min, $adj1max); + break; + case 2: + $this->ticks->Set($maj2step, $maj2step); + $this->Update($img, $adj2min, $adj2max); + break; + case 3: + $this->ticks->Set($maj5step, $maj5step); + $this->Update($img, $adj5min, $adj5max); + break; + default: + Util\JpGraphError::RaiseL(25073, $r); //('Internal error. Integer scale algorithm comparison out of bound (r=$r)'); + } + } + + // Calculate autoscale. Used if user hasn't given a scale and ticks + // $maxsteps is the maximum number of major tickmarks allowed. + public function AutoScale($img, $min, $max, $maxsteps, $majend = true) + { + + if (!is_numeric($min) || !is_numeric($max)) { + Util\JpGraphError::Raise(25044); + } + + if ($this->intscale) { + $this->IntAutoScale($img, $min, $max, $maxsteps, $majend); + return; + } + if (abs($min - $max) < 0.00001) { + // We need some difference to be able to autoscale + // make it 5% above and 5% below value + if ($min == 0 && $max == 0) { + // Special case + $min = -1; + $max = 1; + } else { + $delta = (abs($max) + abs($min)) * 0.005; + $min -= $delta; + $max += $delta; + } + } + + $gracetop = ($this->gracetop / 100.0) * abs($max - $min); + $gracebottom = ($this->gracebottom / 100.0) * abs($max - $min); + if (is_numeric($this->autoscale_min)) { + $min = $this->autoscale_min; + if ($min >= $max) { + Util\JpGraphError::RaiseL(25071); //('You have specified a min value with SetAutoMin() which is larger than the maximum value used for the scale. This is not possible.'); + } + if (abs($min - $max) < 0.001) { + $max *= 1.2; + } + } + + if (is_numeric($this->autoscale_max)) { + $max = $this->autoscale_max; + if ($min >= $max) { + Util\JpGraphError::RaiseL(25072); //('You have specified a max value with SetAutoMax() which is smaller than the miminum value used for the scale. This is not possible.'); + } + if (abs($min - $max) < 0.001) { + $min *= 0.8; + } + } + + $min -= $gracebottom; + $max += $gracetop; + + // First get tickmarks as multiples of 0.1, 1, 10, ... + if ($majend) { + list($num1steps, $adj1min, $adj1max, $min1step, $maj1step) = $this->CalcTicks($maxsteps, $min, $max, 1, 2); + } else { + $adj1min = $min; + $adj1max = $max; + list($num1steps, $min1step, $maj1step) = $this->CalcTicksFreeze($maxsteps, $min, $max, 1, 2, false); + } + + // Then get tick marks as 2:s 0.2, 2, 20, ... + if ($majend) { + list($num2steps, $adj2min, $adj2max, $min2step, $maj2step) = $this->CalcTicks($maxsteps, $min, $max, 5, 2); + } else { + $adj2min = $min; + $adj2max = $max; + list($num2steps, $min2step, $maj2step) = $this->CalcTicksFreeze($maxsteps, $min, $max, 5, 2, false); + } + + // Then get tickmarks as 5:s 0.05, 0.5, 5, 50, ... + if ($majend) { + list($num5steps, $adj5min, $adj5max, $min5step, $maj5step) = $this->CalcTicks($maxsteps, $min, $max, 2, 5); + } else { + $adj5min = $min; + $adj5max = $max; + list($num5steps, $min5step, $maj5step) = $this->CalcTicksFreeze($maxsteps, $min, $max, 2, 5, false); + } + + // Check to see whichof 1:s, 2:s or 5:s fit better with + // the requested number of major ticks + $match1 = abs($num1steps - $maxsteps); + $match2 = abs($num2steps - $maxsteps); + $match5 = abs($num5steps - $maxsteps); + + // Compare these three values and see which is the closest match + // We use a 0.8 weight to gravitate towards multiple of 5:s + $r = $this->MatchMin3($match1, $match2, $match5, 0.8); + switch ($r) { + case 1: + $this->Update($img, $adj1min, $adj1max); + $this->ticks->Set($maj1step, $min1step); + break; + case 2: + $this->Update($img, $adj2min, $adj2max); + $this->ticks->Set($maj2step, $min2step); + break; + case 3: + $this->Update($img, $adj5min, $adj5max); + $this->ticks->Set($maj5step, $min5step); + break; + } + } + + //--------------- + // PRIVATE METHODS + + // This method recalculates all constants that are depending on the + // margins in the image. If the margins in the image are changed + // this method should be called for every scale that is registred with + // that image. Should really be installed as an observer of that image. + public function InitConstants($img) + { + if ($this->type == 'x') { + $this->world_abs_size = $img->width - $img->left_margin - $img->right_margin; + $this->off = $img->left_margin; + $this->scale_factor = 0; + if ($this->world_size > 0) { + $this->scale_factor = $this->world_abs_size / ($this->world_size * 1.0); + } + } else { + // y scale + $this->world_abs_size = $img->height - $img->top_margin - $img->bottom_margin; + $this->off = $img->top_margin + $this->world_abs_size; + $this->scale_factor = 0; + if ($this->world_size > 0) { + $this->scale_factor = -$this->world_abs_size / ($this->world_size * 1.0); + } + } + $size = $this->world_size * $this->scale_factor; + $this->scale_abs = array($this->off, $this->off + $size); + } + + // Initialize the conversion constants for this scale + // This tries to pre-calculate as much as possible to speed up the + // actual conversion (with Translate()) later on + // $start =scale start in absolute pixels (for x-scale this is an y-position + // and for an y-scale this is an x-position + // $len =absolute length in pixels of scale + public function SetConstants($aStart, $aLen) + { + $this->world_abs_size = $aLen; + $this->off = $aStart; + + if ($this->world_size <= 0) { + // This should never ever happen !! + Util\JpGraphError::RaiseL(25074); + //("You have unfortunately stumbled upon a bug in JpGraph. It seems like the scale range is ".$this->world_size." [for ".$this->type." scale]
        Please report Bug #01 to info@jpgraph.net and include the script that gave this error. This problem could potentially be caused by trying to use \"illegal\" values in the input data arrays (like trying to send in strings or only NULL values) which causes the autoscaling to fail."); + } + + // scale_factor = number of pixels per world unit + $this->scale_factor = $this->world_abs_size / ($this->world_size * 1.0); + + // scale_abs = start and end points of scale in absolute pixels + $this->scale_abs = array($this->off, $this->off + $this->world_size * $this->scale_factor); + } + + // Calculate number of ticks steps with a specific division + // $a is the divisor of 10**x to generate the first maj tick intervall + // $a=1, $b=2 give major ticks with multiple of 10, ...,0.1,1,10,... + // $a=5, $b=2 give major ticks with multiple of 2:s ...,0.2,2,20,... + // $a=2, $b=5 give major ticks with multiple of 5:s ...,0.5,5,50,... + // We return a vector of + // [$numsteps,$adjmin,$adjmax,$minstep,$majstep] + // If $majend==true then the first and last marks on the axis will be major + // labeled tick marks otherwise it will be adjusted to the closest min tick mark + public function CalcTicks($maxsteps, $min, $max, $a, $b, $majend = true) + { + $diff = $max - $min; + if ($diff == 0) { + $ld = 0; + } else { + $ld = floor(log10($diff)); + } + + // Gravitate min towards zero if we are close + if ($min > 0 && $min < pow(10, $ld)) { + $min = 0; + } + + //$majstep=pow(10,$ld-1)/$a; + $majstep = pow(10, $ld) / $a; + $minstep = $majstep / $b; + + $adjmax = ceil($max / $minstep) * $minstep; + $adjmin = floor($min / $minstep) * $minstep; + $adjdiff = $adjmax - $adjmin; + $numsteps = $adjdiff / $majstep; + + while ($numsteps > $maxsteps) { + $majstep = pow(10, $ld) / $a; + $numsteps = $adjdiff / $majstep; + ++$ld; + } + + $minstep = $majstep / $b; + $adjmin = floor($min / $minstep) * $minstep; + $adjdiff = $adjmax - $adjmin; + if ($majend) { + $adjmin = floor($min / $majstep) * $majstep; + $adjdiff = $adjmax - $adjmin; + $adjmax = ceil($adjdiff / $majstep) * $majstep + $adjmin; + } else { + $adjmax = ceil($max / $minstep) * $minstep; + } + + return array($numsteps, $adjmin, $adjmax, $minstep, $majstep); + } + + public function CalcTicksFreeze($maxsteps, $min, $max, $a, $b) + { + // Same as CalcTicks but don't adjust min/max values + $diff = $max - $min; + if ($diff == 0) { + $ld = 0; + } else { + $ld = floor(log10($diff)); + } + + //$majstep=pow(10,$ld-1)/$a; + $majstep = pow(10, $ld) / $a; + $minstep = $majstep / $b; + $numsteps = floor($diff / $majstep); + + while ($numsteps > $maxsteps) { + $majstep = pow(10, $ld) / $a; + $numsteps = floor($diff / $majstep); + ++$ld; + } + $minstep = $majstep / $b; + return array($numsteps, $minstep, $majstep); + } + + public function IntCalcTicks($maxsteps, $min, $max, $a, $majend = true) + { + $diff = $max - $min; + if ($diff == 0) { + Util\JpGraphError::RaiseL(25075); //('Can\'t automatically determine ticks since min==max.'); + } else { + $ld = floor(log10($diff)); + } + + // Gravitate min towards zero if we are close + if ($min > 0 && $min < pow(10, $ld)) { + $min = 0; + } + if ($ld == 0) { + $ld = 1; + } + if ($a == 1) { + $majstep = 1; + } else { + $majstep = pow(10, $ld) / $a; + } + $adjmax = ceil($max / $majstep) * $majstep; + + $adjmin = floor($min / $majstep) * $majstep; + $adjdiff = $adjmax - $adjmin; + $numsteps = $adjdiff / $majstep; + while ($numsteps > $maxsteps) { + $majstep = pow(10, $ld) / $a; + $numsteps = $adjdiff / $majstep; + ++$ld; + } + + $adjmin = floor($min / $majstep) * $majstep; + $adjdiff = $adjmax - $adjmin; + if ($majend) { + $adjmin = floor($min / $majstep) * $majstep; + $adjdiff = $adjmax - $adjmin; + $adjmax = ceil($adjdiff / $majstep) * $majstep + $adjmin; + } else { + $adjmax = ceil($max / $majstep) * $majstep; + } + + return array($numsteps, $adjmin, $adjmax, $majstep); + } + + public function IntCalcTicksFreeze($maxsteps, $min, $max, $a) + { + // Same as IntCalcTick but don't change min/max values + $diff = $max - $min; + if ($diff == 0) { + Util\JpGraphError::RaiseL(25075); //('Can\'t automatically determine ticks since min==max.'); + } else { + $ld = floor(log10($diff)); + } + if ($ld == 0) { + $ld = 1; + } + if ($a == 1) { + $majstep = 1; + } else { + $majstep = pow(10, $ld) / $a; + } + + $numsteps = floor($diff / $majstep); + while ($numsteps > $maxsteps) { + $majstep = pow(10, $ld) / $a; + $numsteps = floor($diff / $majstep); + ++$ld; + } + + return array($numsteps, $majstep); + } + + // Determine the minimum of three values witha weight for last value + public function MatchMin3($a, $b, $c, $weight) + { + if ($a < $b) { + if ($a < ($c * $weight)) { + return 1; // $a smallest + } else { + return 3; // $c smallest + } + } elseif ($b < ($c * $weight)) { + return 2; // $b smallest + } + return 3; // $c smallest + } + + public function __get($name) + { + $variable_name = '_' . $name; + + if (isset($this->$variable_name)) { + return $this->$variable_name * SUPERSAMPLING_SCALE; + } else { + Util\JpGraphError::RaiseL('25132', $name); + } + } + + public function __set($name, $value) + { + $this->{'_' . $name} = $value; + } +} // Class diff --git a/vendor/amenadiel/jpgraph/src/graph/LinearTicks.php b/vendor/amenadiel/jpgraph/src/graph/LinearTicks.php new file mode 100644 index 0000000000..f0f5aa6767 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/LinearTicks.php @@ -0,0 +1,385 @@ +precision = -1; + } + + // Return major step size in world coordinates + public function GetMajor() + { + return $this->major_step; + } + + // Return minor step size in world coordinates + public function GetMinor() + { + return $this->minor_step; + } + + // Set Minor and Major ticks (in world coordinates) + public function Set($aMajStep, $aMinStep = false) + { + if ($aMinStep == false) { + $aMinStep = $aMajStep; + } + + if ($aMajStep <= 0 || $aMinStep <= 0) { + Util\JpGraphError::RaiseL(25064); + //(" Minor or major step size is 0. Check that you haven't got an accidental SetTextTicks(0) in your code. If this is not the case you might have stumbled upon a bug in JpGraph. Please report this and if possible include the data that caused the problem."); + } + + $this->major_step = $aMajStep; + $this->minor_step = $aMinStep; + $this->is_set = true; + } + + public function SetMajTickPositions($aMajPos, $aLabels = null) + { + $this->SetTickPositions($aMajPos, null, $aLabels); + } + + public function SetTickPositions($aMajPos, $aMinPos = null, $aLabels = null) + { + if (!is_array($aMajPos) || ($aMinPos !== null && !is_array($aMinPos))) { + Util\JpGraphError::RaiseL(25065); //('Tick positions must be specifued as an array()'); + return; + } + $n = count($aMajPos); + if (is_array($aLabels) && (count($aLabels) != $n)) { + Util\JpGraphError::RaiseL(25066); //('When manually specifying tick positions and labels the number of labels must be the same as the number of specified ticks.'); + } + $this->iManualTickPos = $aMajPos; + $this->iManualMinTickPos = $aMinPos; + $this->iManualTickLabels = $aLabels; + } + + public function HaveManualLabels() + { + return count($this->iManualTickLabels) > 0; + } + + // Specify all the tick positions manually and possible also the exact labels + public function _doManualTickPos($aScale) + { + $n = count($this->iManualTickPos); + $m = count($this->iManualMinTickPos); + $doLbl = count($this->iManualTickLabels) > 0; + + $this->maj_ticks_pos = array(); + $this->maj_ticklabels_pos = array(); + $this->ticks_pos = array(); + + // Now loop through the supplied positions and translate them to screen coordinates + // and store them in the maj_label_positions + $minScale = $aScale->scale[0]; + $maxScale = $aScale->scale[1]; + $j = 0; + for ($i = 0; $i < $n; ++$i) { + // First make sure that the first tick is not lower than the lower scale value + if (!isset($this->iManualTickPos[$i]) || $this->iManualTickPos[$i] < $minScale || $this->iManualTickPos[$i] > $maxScale) { + continue; + } + + $this->maj_ticks_pos[$j] = $aScale->Translate($this->iManualTickPos[$i]); + $this->maj_ticklabels_pos[$j] = $this->maj_ticks_pos[$j]; + + // Set the minor tick marks the same as major if not specified + if ($m <= 0) { + $this->ticks_pos[$j] = $this->maj_ticks_pos[$j]; + } + if ($doLbl) { + $this->maj_ticks_label[$j] = $this->iManualTickLabels[$i]; + } else { + $this->maj_ticks_label[$j] = $this->_doLabelFormat($this->iManualTickPos[$i], $i, $n); + } + ++$j; + } + + // Some sanity check + if (count($this->maj_ticks_pos) < 2) { + Util\JpGraphError::RaiseL(25067); //('Your manually specified scale and ticks is not correct. The scale seems to be too small to hold any of the specified tickl marks.'); + } + + // Setup the minor tick marks + $j = 0; + for ($i = 0; $i < $m; ++$i) { + if (empty($this->iManualMinTickPos[$i]) || $this->iManualMinTickPos[$i] < $minScale || $this->iManualMinTickPos[$i] > $maxScale) { + continue; + } + $this->ticks_pos[$j] = $aScale->Translate($this->iManualMinTickPos[$i]); + ++$j; + } + } + + public function _doAutoTickPos($aScale) + { + $maj_step_abs = $aScale->scale_factor * $this->major_step; + $min_step_abs = $aScale->scale_factor * $this->minor_step; + + if ($min_step_abs == 0 || $maj_step_abs == 0) { + Util\JpGraphError::RaiseL(25068); //("A plot has an illegal scale. This could for example be that you are trying to use text autoscaling to draw a line plot with only one point or that the plot area is too small. It could also be that no input data value is numeric (perhaps only '-' or 'x')"); + } + // We need to make this an int since comparing it below + // with the result from round() can give wrong result, such that + // (40 < 40) == TRUE !!! + $limit = (int) $aScale->scale_abs[1]; + + if ($aScale->textscale) { + // This can only be true for a X-scale (horizontal) + // Define ticks for a text scale. This is slightly different from a + // normal linear type of scale since the position might be adjusted + // and the labels start at on + $label = (float) $aScale->GetMinVal() + $this->text_label_start + $this->label_offset; + $start_abs = $aScale->scale_factor * $this->text_label_start; + $nbrmajticks = round(($aScale->GetMaxVal() - $aScale->GetMinVal() - $this->text_label_start) / $this->major_step) + 1; + + $x = $aScale->scale_abs[0] + $start_abs + $this->xlabel_offset * $min_step_abs; + for ($i = 0; $label <= $aScale->GetMaxVal() + $this->label_offset; ++$i) { + // Apply format to label + $this->maj_ticks_label[$i] = $this->_doLabelFormat($label, $i, $nbrmajticks); + $label += $this->major_step; + + // The x-position of the tick marks can be different from the labels. + // Note that we record the tick position (not the label) so that the grid + // happen upon tick marks and not labels. + $xtick = $aScale->scale_abs[0] + $start_abs + $this->xtick_offset * $min_step_abs + $i * $maj_step_abs; + $this->maj_ticks_pos[$i] = $xtick; + $this->maj_ticklabels_pos[$i] = round($x); + $x += $maj_step_abs; + } + } else { + $label = $aScale->GetMinVal(); + $abs_pos = $aScale->scale_abs[0]; + $j = 0; + $i = 0; + $step = round($maj_step_abs / $min_step_abs); + if ($aScale->type == "x") { + // For a normal linear type of scale the major ticks will always be multiples + // of the minor ticks. In order to avoid any rounding issues the major ticks are + // defined as every "step" minor ticks and not calculated separately + $nbrmajticks = round(($aScale->GetMaxVal() - $aScale->GetMinVal() - $this->text_label_start) / $this->major_step) + 1; + while (round($abs_pos) <= $limit) { + $this->ticks_pos[] = round($abs_pos); + $this->ticks_label[] = $label; + if ($step == 0 || $i % $step == 0 && $j < $nbrmajticks) { + $this->maj_ticks_pos[$j] = round($abs_pos); + $this->maj_ticklabels_pos[$j] = round($abs_pos); + $this->maj_ticks_label[$j] = $this->_doLabelFormat($label, $j, $nbrmajticks); + ++$j; + } + ++$i; + $abs_pos += $min_step_abs; + $label += $this->minor_step; + } + } elseif ($aScale->type == "y") { + //@todo s=2:20,12 s=1:50,6 $this->major_step:$nbr + // abs_point,limit s=1:270,80 s=2:540,160 + // $this->major_step = 50; + $nbrmajticks = round(($aScale->GetMaxVal() - $aScale->GetMinVal()) / $this->major_step) + 1; + // $step = 5; + while (round($abs_pos) >= $limit) { + $this->ticks_pos[$i] = round($abs_pos); + $this->ticks_label[$i] = $label; + if ($step == 0 || $i % $step == 0 && $j < $nbrmajticks) { + $this->maj_ticks_pos[$j] = round($abs_pos); + $this->maj_ticklabels_pos[$j] = round($abs_pos); + $this->maj_ticks_label[$j] = $this->_doLabelFormat($label, $j, $nbrmajticks); + ++$j; + } + ++$i; + $abs_pos += $min_step_abs; + $label += $this->minor_step; + } + } + } + } + + public function AdjustForDST($aFlg = true) + { + $this->iAdjustForDST = $aFlg; + } + + public function _doLabelFormat($aVal, $aIdx, $aNbrTicks) + { + + // If precision hasn't been specified set it to a sensible value + if ($this->precision == -1) { + $t = log10($this->minor_step); + if ($t > 0) { + $precision = 0; + } else { + $precision = -floor($t); + } + } else { + $precision = $this->precision; + } + + if ($this->label_formfunc != '') { + $f = $this->label_formfunc; + if ($this->label_formatstr == '') { + $l = call_user_func($f, $aVal); + } else { + $l = sprintf($this->label_formatstr, call_user_func($f, $aVal)); + } + } elseif ($this->label_formatstr != '' || $this->label_dateformatstr != '') { + if ($this->label_usedateformat) { + // Adjust the value to take daylight savings into account + if (date("I", $aVal) == 1 && $this->iAdjustForDST) { + // DST + $aVal += 3600; + } + + $l = date($this->label_formatstr, $aVal); + if ($this->label_formatstr == 'W') { + // If we use week formatting then add a single 'w' in front of the + // week number to differentiate it from dates + $l = 'w' . $l; + } + } else { + if ($this->label_dateformatstr !== '') { + // Adjust the value to take daylight savings into account + if (date("I", $aVal) == 1 && $this->iAdjustForDST) { + // DST + $aVal += 3600; + } + + $l = date($this->label_dateformatstr, $aVal); + if ($this->label_formatstr == 'W') { + // If we use week formatting then add a single 'w' in front of the + // week number to differentiate it from dates + $l = 'w' . $l; + } + } else { + $l = sprintf($this->label_formatstr, $aVal); + } + } + } else { + $l = sprintf('%01.' . $precision . 'f', round($aVal, $precision)); + } + + if (($this->supress_zerolabel && $l == 0) || ($this->supress_first && $aIdx == 0) || ($this->supress_last && $aIdx == $aNbrTicks - 1)) { + $l = ''; + } + return $l; + } + + // Stroke ticks on either X or Y axis + public function _StrokeTicks($aImg, $aScale, $aPos) + { + $hor = $aScale->type == 'x'; + $aImg->SetLineWeight($this->weight); + + // We need to make this an int since comparing it below + // with the result from round() can give wrong result, such that + // (40 < 40) == TRUE !!! + $limit = (int) $aScale->scale_abs[1]; + + // A text scale doesn't have any minor ticks + if (!$aScale->textscale) { + // Stroke minor ticks + $yu = $aPos - $this->direction * $this->GetMinTickAbsSize(); + $xr = $aPos + $this->direction * $this->GetMinTickAbsSize(); + $n = count($this->ticks_pos); + for ($i = 0; $i < $n; ++$i) { + if (!$this->supress_tickmarks && !$this->supress_minor_tickmarks) { + if ($this->mincolor != '') { + $aImg->PushColor($this->mincolor); + } + if ($hor) { + //if( $this->ticks_pos[$i] <= $limit ) + $aImg->Line($this->ticks_pos[$i], $aPos, $this->ticks_pos[$i], $yu); + } else { + //if( $this->ticks_pos[$i] >= $limit ) + $aImg->Line($aPos, $this->ticks_pos[$i], $xr, $this->ticks_pos[$i]); + } + if ($this->mincolor != '') { + $aImg->PopColor(); + } + } + } + } + + // Stroke major ticks + $yu = $aPos - $this->direction * $this->GetMajTickAbsSize(); + $xr = $aPos + $this->direction * $this->GetMajTickAbsSize(); + $nbrmajticks = round(($aScale->GetMaxVal() - $aScale->GetMinVal() - $this->text_label_start) / $this->major_step) + 1; + $n = count($this->maj_ticks_pos); + for ($i = 0; $i < $n; ++$i) { + if (!($this->xtick_offset > 0 && $i == $nbrmajticks - 1) && !$this->supress_tickmarks) { + if ($this->majcolor != '') { + $aImg->PushColor($this->majcolor); + } + if ($hor) { + //if( $this->maj_ticks_pos[$i] <= $limit ) + $aImg->Line($this->maj_ticks_pos[$i], $aPos, $this->maj_ticks_pos[$i], $yu); + } else { + //if( $this->maj_ticks_pos[$i] >= $limit ) + $aImg->Line($aPos, $this->maj_ticks_pos[$i], $xr, $this->maj_ticks_pos[$i]); + } + if ($this->majcolor != '') { + $aImg->PopColor(); + } + } + } + + } + + // Draw linear ticks + public function Stroke($aImg, $aScale, $aPos) + { + if ($this->iManualTickPos != null) { + $this->_doManualTickPos($aScale); + } else { + $this->_doAutoTickPos($aScale); + } + $this->_StrokeTicks($aImg, $aScale, $aPos, $aScale->type == 'x'); + } + + //--------------- + // PRIVATE METHODS + // Spoecify the offset of the displayed tick mark with the tick "space" + // Legal values for $o is [0,1] used to adjust where the tick marks and label + // should be positioned within the major tick-size + // $lo specifies the label offset and $to specifies the tick offset + // this comes in handy for example in bar graphs where we wont no offset for the + // tick but have the labels displayed halfway under the bars. + public function SetXLabelOffset($aLabelOff, $aTickOff = -1) + { + $this->xlabel_offset = $aLabelOff; + if ($aTickOff == -1) { + // Same as label offset + $this->xtick_offset = $aLabelOff; + } else { + $this->xtick_offset = $aTickOff; + } + if ($aLabelOff > 0) { + $this->SupressLast(); // The last tick wont fit + } + } + + // Which tick label should we start with? + public function SetTextLabelStart($aTextLabelOff) + { + $this->text_label_start = $aTextLabelOff; + } + +} // Class diff --git a/vendor/amenadiel/jpgraph/src/graph/LogScale.php b/vendor/amenadiel/jpgraph/src/graph/LogScale.php new file mode 100644 index 0000000000..02116f67b6 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/LogScale.php @@ -0,0 +1,138 @@ +ticks = new LogTicks('log'); + $this->name = 'log'; + } + + //---------------- + // PUBLIC METHODS + + // Translate between world and screen + public function Translate($a) + { + if (!is_numeric($a)) { + if ($a != '' && $a != '-' && $a != 'x') { + Util\JpGraphError::RaiseL(11001); + // ('Your data contains non-numeric values.'); + } + return 1; + } + if ($a < 0) { + Util\JpGraphError::RaiseL(11002); + //("Negative data values can not be used in a log scale."); + exit(1); + } + if ($a == 0) { + $a = 1; + } + + $a = log10($a); + return ceil($this->off + ($a * 1.0 - $this->scale[0]) * $this->scale_factor); + } + + // Relative translate (don't include offset) usefull when we just want + // to know the relative position (in pixels) on the axis + public function RelTranslate($a) + { + if (!is_numeric($a)) { + if ($a != '' && $a != '-' && $a != 'x') { + Util\JpGraphError::RaiseL(11001); + //('Your data contains non-numeric values.'); + } + return 1; + } + if ($a == 0) { + $a = 1; + } + $a = log10($a); + return round(($a * 1.0 - $this->scale[0]) * $this->scale_factor); + } + + // Use bcpow() for increased precision + public function GetMinVal() + { + if (function_exists("bcpow")) { + return round(bcpow(10, $this->scale[0], 15), 14); + } else { + return round(pow(10, $this->scale[0]), 14); + } + } + + public function GetMaxVal() + { + if (function_exists("bcpow")) { + return round(bcpow(10, $this->scale[1], 15), 14); + } else { + return round(pow(10, $this->scale[1]), 14); + } + } + + // Logarithmic autoscaling is much simplier since we just + // set the min and max to logs of the min and max values. + // Note that for log autoscale the "maxstep" the fourth argument + // isn't used. This is just included to give the method the same + // signature as the linear counterpart. + public function AutoScale($img, $min, $max, $maxsteps, $majend = true) + { + if ($min == 0) { + $min = 1; + } + + if ($max <= 0) { + Util\JpGraphError::RaiseL(11004); + //('Scale error for logarithmic scale. You have a problem with your data values. The max value must be greater than 0. It is mathematically impossible to have 0 in a logarithmic scale.'); + } + if (is_numeric($this->autoscale_min)) { + $smin = round($this->autoscale_min); + $smax = ceil(log10($max)); + if ($min >= $max) { + Util\JpGraphError::RaiseL(25071); //('You have specified a min value with SetAutoMin() which is larger than the maximum value used for the scale. This is not possible.'); + } + } else { + $smin = floor(log10($min)); + if (is_numeric($this->autoscale_max)) { + $smax = round($this->autoscale_max); + if ($smin >= $smax) { + Util\JpGraphError::RaiseL(25072); //('You have specified a max value with SetAutoMax() which is smaller than the miminum value used for the scale. This is not possible.'); + } + } else { + $smax = ceil(log10($max)); + } + + } + + $this->Update($img, $smin, $smax); + } + + //--------------- + // PRIVATE METHODS +} // Class diff --git a/vendor/amenadiel/jpgraph/src/graph/LogTicks.php b/vendor/amenadiel/jpgraph/src/graph/LogTicks.php new file mode 100644 index 0000000000..5b8147b950 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/LogTicks.php @@ -0,0 +1,181 @@ +label_logtype = $aType; + } + + // For log scale it's meaningless to speak about a major step + // We just return -1 to make the framework happy (specifically + // StrokeLabels() ) + public function GetMajor() + { + return -1; + } + + public function SetTextLabelStart($aStart) + { + Util\JpGraphError::RaiseL(11005); + //('Specifying tick interval for a logarithmic scale is undefined. Remove any calls to SetTextLabelStart() or SetTextTickInterval() on the logarithmic scale.'); + } + + public function SetXLabelOffset($dummy) + { + // For log scales we dont care about XLabel offset + } + + // Draw ticks on image "img" using scale "scale". The axis absolute + // position in the image is specified in pos, i.e. for an x-axis + // it specifies the absolute y-coord and for Y-ticks it specified the + // absolute x-position. + public function Stroke($img, $scale, $pos) + { + $start = $scale->GetMinVal(); + $limit = $scale->GetMaxVal(); + $nextMajor = 10 * $start; + $step = $nextMajor / 10.0; + + $img->SetLineWeight($this->weight); + + if ($scale->type == "y") { + // member direction specified if the ticks should be on + // left or right side. + $a = $pos + $this->direction * $this->GetMinTickAbsSize(); + $a2 = $pos + $this->direction * $this->GetMajTickAbsSize(); + + $count = 1; + $this->maj_ticks_pos[0] = $scale->Translate($start); + $this->maj_ticklabels_pos[0] = $scale->Translate($start); + if ($this->supress_first) { + $this->maj_ticks_label[0] = ""; + } else { + if ($this->label_formfunc != '') { + $f = $this->label_formfunc; + $this->maj_ticks_label[0] = call_user_func($f, $start); + } elseif ($this->label_logtype == LOGLABELS_PLAIN) { + $this->maj_ticks_label[0] = $start; + } else { + $this->maj_ticks_label[0] = '10^' . round(log10($start)); + } + } + $i = 1; + for ($y = $start; $y <= $limit; $y += $step, ++$count) { + $ys = $scale->Translate($y); + $this->ticks_pos[] = $ys; + $this->ticklabels_pos[] = $ys; + if ($count % 10 == 0) { + if (!$this->supress_tickmarks) { + if ($this->majcolor != "") { + $img->PushColor($this->majcolor); + $img->Line($pos, $ys, $a2, $ys); + $img->PopColor(); + } else { + $img->Line($pos, $ys, $a2, $ys); + } + } + + $this->maj_ticks_pos[$i] = $ys; + $this->maj_ticklabels_pos[$i] = $ys; + + if ($this->label_formfunc != '') { + $f = $this->label_formfunc; + $this->maj_ticks_label[$i] = call_user_func($f, $nextMajor); + } elseif ($this->label_logtype == 0) { + $this->maj_ticks_label[$i] = $nextMajor; + } else { + $this->maj_ticks_label[$i] = '10^' . round(log10($nextMajor)); + } + ++$i; + $nextMajor *= 10; + $step *= 10; + $count = 1; + } else { + if (!$this->supress_tickmarks && !$this->supress_minor_tickmarks) { + if ($this->mincolor != "") { + $img->PushColor($this->mincolor); + } + $img->Line($pos, $ys, $a, $ys); + if ($this->mincolor != "") { + $img->PopColor(); + } + } + } + } + } else { + $a = $pos - $this->direction * $this->GetMinTickAbsSize(); + $a2 = $pos - $this->direction * $this->GetMajTickAbsSize(); + $count = 1; + $this->maj_ticks_pos[0] = $scale->Translate($start); + $this->maj_ticklabels_pos[0] = $scale->Translate($start); + if ($this->supress_first) { + $this->maj_ticks_label[0] = ""; + } else { + if ($this->label_formfunc != '') { + $f = $this->label_formfunc; + $this->maj_ticks_label[0] = call_user_func($f, $start); + } elseif ($this->label_logtype == 0) { + $this->maj_ticks_label[0] = $start; + } else { + $this->maj_ticks_label[0] = '10^' . round(log10($start)); + } + } + $i = 1; + for ($x = $start; $x <= $limit; $x += $step, ++$count) { + $xs = $scale->Translate($x); + $this->ticks_pos[] = $xs; + $this->ticklabels_pos[] = $xs; + if ($count % 10 == 0) { + if (!$this->supress_tickmarks) { + $img->Line($xs, $pos, $xs, $a2); + } + $this->maj_ticks_pos[$i] = $xs; + $this->maj_ticklabels_pos[$i] = $xs; + + if ($this->label_formfunc != '') { + $f = $this->label_formfunc; + $this->maj_ticks_label[$i] = call_user_func($f, $nextMajor); + } elseif ($this->label_logtype == 0) { + $this->maj_ticks_label[$i] = $nextMajor; + } else { + $this->maj_ticks_label[$i] = '10^' . round(log10($nextMajor)); + } + ++$i; + $nextMajor *= 10; + $step *= 10; + $count = 1; + } else { + if (!$this->supress_tickmarks && !$this->supress_minor_tickmarks) { + $img->Line($xs, $pos, $xs, $a); + } + } + } + } + return true; + } +} // Class +/* EOF */ diff --git a/vendor/amenadiel/jpgraph/src/graph/MGraph.php b/vendor/amenadiel/jpgraph/src/graph/MGraph.php new file mode 100644 index 0000000000..38172c7c6f --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/MGraph.php @@ -0,0 +1,362 @@ +iWidth = $aWidth; + $this->iHeight = $aHeight; + + // If the cached version exist just read it directly from the + // cache, stream it back to browser and exit + if ($aCachedName != '' && READ_CACHE && $aInline) { + $this->cache = new Image\ImgStreamCache(); + $this->cache->SetTimeOut($aTimeOut); + $image = new Image\Image(); + if ($this->cache->GetAndStream($image, $aCachedName)) { + exit(); + } + } + $this->inline = $aInline; + $this->cache_name = $aCachedName; + + $this->title = new Text\Text(); + $this->title->ParagraphAlign('center'); + $this->title->SetFont(FF_FONT2, FS_BOLD); + $this->title->SetMargin(3); + $this->title->SetAlign('center'); + + $this->subtitle = new Text\Text(); + $this->subtitle->ParagraphAlign('center'); + $this->subtitle->SetFont(FF_FONT1, FS_BOLD); + $this->subtitle->SetMargin(3); + $this->subtitle->SetAlign('center'); + + $this->subsubtitle = new Text\Text(); + $this->subsubtitle->ParagraphAlign('center'); + $this->subsubtitle->SetFont(FF_FONT1, FS_NORMAL); + $this->subsubtitle->SetMargin(3); + $this->subsubtitle->SetAlign('center'); + + $this->footer = new Image\Footer(); + + } + + // Specify background fill color for the combined graph + public function SetFillColor($aColor) + { + $this->iFillColor = $aColor; + } + + // Add a frame around the combined graph + public function SetFrame($aFlg, $aColor = 'black', $aWeight = 1) + { + $this->iDoFrame = $aFlg; + $this->iFrameColor = $aColor; + $this->iFrameWeight = $aWeight; + } + + // Specify a background image blend + public function SetBackgroundImageMix($aMix) + { + $this->background_image_mix = $aMix; + } + + // Specify a background image + public function SetBackgroundImage($aFileName, $aCenter_aX = null, $aY = null) + { + // Second argument can be either a boolean value or + // a numeric + $aCenter = true; + $aX = null; + + if (is_numeric($aCenter_aX)) { + $aX = $aCenter_aX; + } + + // Get extension to determine image type + $e = explode('.', $aFileName); + if (!$e) { + Util\JpGraphError::RaiseL(12002, $aFileName); + //('Incorrect file name for MGraph::SetBackgroundImage() : '.$aFileName.' Must have a valid image extension (jpg,gif,png) when using autodetection of image type'); + } + + $valid_formats = array('png', 'jpg', 'gif'); + $aImgFormat = strtolower($e[count($e) - 1]); + if ($aImgFormat == 'jpeg') { + $aImgFormat = 'jpg'; + } elseif (!in_array($aImgFormat, $valid_formats)) { + Util\JpGraphError::RaiseL(12003, $aImgFormat, $aFileName); + //('Unknown file extension ($aImgFormat) in MGraph::SetBackgroundImage() for filename: '.$aFileName); + } + + $this->background_image = $aFileName; + $this->background_image_center = $aCenter; + $this->background_image_format = $aImgFormat; + $this->background_image_x = $aX; + $this->background_image_y = $aY; + } + + public function _strokeBackgroundImage() + { + if ($this->background_image == '') { + return; + } + + $bkgimg = Graph::LoadBkgImage('', $this->background_image); + + // Background width & Heoght + $bw = imagesx($bkgimg); + $bh = imagesy($bkgimg); + + // Canvas width and height + $cw = imagesx($this->img); + $ch = imagesy($this->img); + + if ($this->doshadow) { + $cw -= $this->shadow_width; + $ch -= $this->shadow_width; + } + + if ($this->background_image_x === null || $this->background_image_y === null) { + if ($this->background_image_center) { + // Center original image in the plot area + $x = round($cw / 2 - $bw / 2); + $y = round($ch / 2 - $bh / 2); + } else { + // Just copy the image from left corner, no resizing + $x = 0; + $y = 0; + } + } else { + $x = $this->background_image_x; + $y = $this->background_image_y; + } + imagecopymerge($this->img, $bkgimg, $x, $y, 0, 0, $bw, $bh, $this->background_image_mix); + } + + public function AddMix($aGraph, $x = 0, $y = 0, $mix = 100, $fx = 0, $fy = 0, $w = 0, $h = 0) + { + $this->_gdImgHandle($aGraph->Stroke(_IMG_HANDLER), $x, $y, $fx = 0, $fy = 0, $w, $h, $mix); + } + + public function Add($aGraph, $x = 0, $y = 0, $fx = 0, $fy = 0, $w = 0, $h = 0) + { + $this->_gdImgHandle($aGraph->Stroke(_IMG_HANDLER), $x, $y, $fx = 0, $fy = 0, $w, $h); + } + + public function _gdImgHandle($agdCanvas, $x, $y, $fx = 0, $fy = 0, $w = 0, $h = 0, $mix = 100) + { + if ($w == 0) { + $w = @imagesx($agdCanvas); + } + if ($w === null) { + Util\JpGraphError::RaiseL(12007); + //('Argument to MGraph::Add() is not a valid GD image handle.'); + return; + } + if ($h == 0) { + $h = @imagesy($agdCanvas); + } + $this->iGraphs[$this->iCnt++] = array($agdCanvas, $x, $y, $fx, $fy, $w, $h, $mix); + } + + public function SetMargin($lm, $rm, $tm, $bm) + { + $this->lm = $lm; + $this->rm = $rm; + $this->tm = $tm; + $this->bm = $bm; + } + + public function SetExpired($aFlg = true) + { + $this->expired = $aFlg; + } + + public function SetImgFormat($aFormat, $aQuality = 75) + { + $this->image_format = $aFormat; + $this->image_quality = $aQuality; + } + + // Set the shadow around the whole image + public function SetShadow($aShowShadow = true, $aShadowWidth = 4, $aShadowColor = 'gray@0.3') + { + $this->doshadow = $aShowShadow; + $this->shadow_color = $aShadowColor; + $this->shadow_width = $aShadowWidth; + $this->footer->iBottomMargin += $aShadowWidth; + $this->footer->iRightMargin += $aShadowWidth; + } + + public function StrokeTitle($image, $w, $h) + { + // Stroke title + if ($this->title->t !== '') { + + $margin = 3; + + $y = $this->title->margin; + if ($this->title->halign == 'center') { + $this->title->Center(0, $w, $y); + } elseif ($this->title->halign == 'left') { + $this->title->SetPos($this->title->margin + 2, $y); + } elseif ($this->title->halign == 'right') { + $indent = 0; + if ($this->doshadow) { + $indent = $this->shadow_width + 2; + } + $this->title->SetPos($w - $this->title->margin - $indent, $y, 'right'); + } + $this->title->Stroke($image); + + // ... and subtitle + $y += $this->title->GetTextHeight($image) + $margin + $this->subtitle->margin; + if ($this->subtitle->halign == 'center') { + $this->subtitle->Center(0, $w, $y); + } elseif ($this->subtitle->halign == 'left') { + $this->subtitle->SetPos($this->subtitle->margin + 2, $y); + } elseif ($this->subtitle->halign == 'right') { + $indent = 0; + if ($this->doshadow) { + $indent = $this->shadow_width + 2; + } + $this->subtitle->SetPos($this->img->width - $this->subtitle->margin - $indent, $y, 'right'); + } + $this->subtitle->Stroke($image); + + // ... and subsubtitle + $y += $this->subtitle->GetTextHeight($image) + $margin + $this->subsubtitle->margin; + if ($this->subsubtitle->halign == 'center') { + $this->subsubtitle->Center(0, $w, $y); + } elseif ($this->subsubtitle->halign == 'left') { + $this->subsubtitle->SetPos($this->subsubtitle->margin + 2, $y); + } elseif ($this->subsubtitle->halign == 'right') { + $indent = 0; + if ($this->doshadow) { + $indent = $this->shadow_width + 2; + } + $this->subsubtitle->SetPos($w - $this->subsubtitle->margin - $indent, $y, 'right'); + } + $this->subsubtitle->Stroke($image); + + } + } + + public function Stroke($aFileName = '') + { + // Find out the necessary size for the container image + $w = 0; + $h = 0; + for ($i = 0; $i < $this->iCnt; ++$i) { + $maxw = $this->iGraphs[$i][1] + $this->iGraphs[$i][5]; + $maxh = $this->iGraphs[$i][2] + $this->iGraphs[$i][6]; + $w = max($w, $maxw); + $h = max($h, $maxh); + } + $w += $this->lm + $this->rm; + $h += $this->tm + $this->bm; + + // User specified width,height overrides + if ($this->iWidth !== null && $this->iWidth !== 0) { + $w = $this->iWidth; + } + + if ($this->iHeight !== null && $this->iHeight !== 0) { + $h = $this->iHeight; + } + + if ($this->doshadow) { + $w += $this->shadow_width; + $h += $this->shadow_width; + } + + $image = new Image\Image($w, $h); + $image->SetImgFormat($this->image_format, $this->image_quality); + + if ($this->doshadow) { + $image->SetColor($this->iFrameColor); + $image->ShadowRectangle(0, 0, $w - 1, $h - 1, $this->iFillColor, $this->shadow_width, $this->shadow_color); + $w -= $this->shadow_width; + $h -= $this->shadow_width; + } else { + $image->SetColor($this->iFillColor); + $image->FilledRectangle(0, 0, $w - 1, $h - 1); + } + $image->SetExpired($this->expired); + + $this->img = $image->img; + $this->_strokeBackgroundImage(); + + if ($this->iDoFrame && !$this->doshadow) { + $image->SetColor($this->iFrameColor); + $image->SetLineWeight($this->iFrameWeight); + $image->Rectangle(0, 0, $w - 1, $h - 1); + } + + // Copy all sub graphs to the container + for ($i = 0; $i < $this->iCnt; ++$i) { + $image->CopyMerge($this->iGraphs[$i][0], + $this->iGraphs[$i][1] + $this->lm, $this->iGraphs[$i][2] + $this->tm, + $this->iGraphs[$i][3], $this->iGraphs[$i][4], + $this->iGraphs[$i][5], $this->iGraphs[$i][6], + -1, -1, /* Full from width and height */ + $this->iGraphs[$i][7]); + + } + + $this->StrokeTitle($image, $w, $h); + $this->footer->Stroke($image); + + // Output image + if ($aFileName == _IMG_HANDLER) { + return $image->img; + } else { + //Finally stream the generated picture + $this->cache = new Image\ImgStreamCache(); + $this->cache->PutAndStream($image, $this->cache_name, $this->inline, $aFileName); + } + } +} + +// EOF diff --git a/vendor/amenadiel/jpgraph/src/graph/PieGraph.php b/vendor/amenadiel/jpgraph/src/graph/PieGraph.php new file mode 100644 index 0000000000..813e68ce39 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/PieGraph.php @@ -0,0 +1,272 @@ +posx = $width / 2; + $this->posy = $height / 2; + $this->SetColor(array(255, 255, 255)); + + if ($this->graph_theme) { + $this->graph_theme->ApplyGraph($this); + } + } + + //--------------- + // PUBLIC METHODS + public function Add($aObj) + { + + if (is_array($aObj) && count($aObj) > 0) { + $cl = $aObj[0]; + } else { + $cl = $aObj; + } + + if ($cl instanceof Text) { + $this->AddText($aObj); + } elseif (class_exists('IconPlot', false) && ($cl instanceof IconPlot)) { + $this->AddIcon($aObj); + } else { + if (is_array($aObj)) { + $n = count($aObj); + for ($i = 0; $i < $n; ++$i) { + //if ($aObj[$i]->theme) { + // $this->ClearTheme(); + //} + $this->plots[] = $aObj[$i]; + } + } else { + //if ($aObj->theme) { + // $this->ClearTheme(); + //} + $this->plots[] = $aObj; + } + } + + if ($this->graph_theme) { + $this->graph_theme->SetupPlot($aObj); + if ($aObj->is_using_plot_theme) { + $aObj->UsePlotThemeColors(); + } + } + } + + public function SetAntiAliasing($aFlg = true) + { + $this->pieaa = $aFlg; + } + + public function SetColor($c) + { + $this->SetMarginColor($c); + } + + public function DisplayCSIMAreas() + { + $csim = ""; + foreach ($this->plots as $p) { + $csim .= $p->GetCSIMareas(); + } + + $csim .= $this->legend->GetCSIMareas(); + if (preg_match_all("/area shape=\"(\w+)\" coords=\"([0-9\, ]+)\"/", $csim, $coords)) { + $this->img->SetColor($this->csimcolor); + $n = count($coords[0]); + for ($i = 0; $i < $n; $i++) { + if ($coords[1][$i] == "poly") { + preg_match_all('/\s*([0-9]+)\s*,\s*([0-9]+)\s*,*/', $coords[2][$i], $pts); + $this->img->SetStartPoint($pts[1][count($pts[0]) - 1], $pts[2][count($pts[0]) - 1]); + $m = count($pts[0]); + for ($j = 0; $j < $m; $j++) { + $this->img->LineTo($pts[1][$j], $pts[2][$j]); + } + } else if ($coords[1][$i] == "rect") { + $pts = preg_split('/,/', $coords[2][$i]); + $this->img->SetStartPoint($pts[0], $pts[1]); + $this->img->LineTo($pts[2], $pts[1]); + $this->img->LineTo($pts[2], $pts[3]); + $this->img->LineTo($pts[0], $pts[3]); + $this->img->LineTo($pts[0], $pts[1]); + + } + } + } + } + + // Method description + public function Stroke($aStrokeFileName = "") + { + + // If the filename is the predefined value = '_csim_special_' + // we assume that the call to stroke only needs to do enough + // to correctly generate the CSIM maps. + // We use this variable to skip things we don't strictly need + // to do to generate the image map to improve performance + // a best we can. Therefor you will see a lot of tests !$_csim in the + // code below. + $_csim = ($aStrokeFileName === _CSIM_SPECIALFILE); + + // If we are called the second time (perhaps the user has called GetHTMLImageMap() + // himself then the legends have alsready been populated once in order to get the + // CSIM coordinats. Since we do not want the legends to be populated a second time + // we clear the legends + $this->legend->Clear(); + + // We need to know if we have stroked the plot in the + // GetCSIMareas. Otherwise the CSIM hasn't been generated + // and in the case of GetCSIM called before stroke to generate + // CSIM without storing an image to disk GetCSIM must call Stroke. + $this->iHasStroked = true; + + $n = count($this->plots); + + if ($this->pieaa) { + + if (!$_csim) { + if ($this->background_image != "") { + $this->StrokeFrameBackground(); + } else { + $this->StrokeFrame(); + $this->StrokeBackgroundGrad(); + } + } + + $w = $this->img->width; + $h = $this->img->height; + $oldimg = $this->img->img; + + $this->img->CreateImgCanvas(2 * $w, 2 * $h); + + $this->img->SetColor($this->margin_color); + $this->img->FilledRectangle(0, 0, 2 * $w - 1, 2 * $h - 1); + + // Make all icons *2 i size since we will be scaling down the + // imahe to do the anti aliasing + $ni = count($this->iIcons); + for ($i = 0; $i < $ni; ++$i) { + $this->iIcons[$i]->iScale *= 2; + if ($this->iIcons[$i]->iX > 1) { + $this->iIcons[$i]->iX *= 2; + } + + if ($this->iIcons[$i]->iY > 1) { + $this->iIcons[$i]->iY *= 2; + } + + } + + $this->StrokeIcons(); + + for ($i = 0; $i < $n; ++$i) { + if ($this->plots[$i]->posx > 1) { + $this->plots[$i]->posx *= 2; + } + + if ($this->plots[$i]->posy > 1) { + $this->plots[$i]->posy *= 2; + } + + $this->plots[$i]->Stroke($this->img, 1); + + if ($this->plots[$i]->posx > 1) { + $this->plots[$i]->posx /= 2; + } + + if ($this->plots[$i]->posy > 1) { + $this->plots[$i]->posy /= 2; + } + + } + + $indent = $this->doframe ? ($this->frame_weight + ($this->doshadow ? $this->shadow_width : 0)) : 0; + $indent += $this->framebevel ? $this->framebeveldepth + 1 : 0; + $this->img->CopyCanvasH($oldimg, $this->img->img, $indent, $indent, $indent, $indent, + $w - 2 * $indent, $h - 2 * $indent, 2 * ($w - $indent), 2 * ($h - $indent)); + + $this->img->img = $oldimg; + $this->img->width = $w; + $this->img->height = $h; + + for ($i = 0; $i < $n; ++$i) { + $this->plots[$i]->Stroke($this->img, 2); // Stroke labels + $this->plots[$i]->Legend($this); + } + + } else { + + if (!$_csim) { + if ($this->background_image != "") { + $this->StrokeFrameBackground(); + } else { + $this->StrokeFrame(); + $this->StrokeBackgroundGrad(); + } + } + + $this->StrokeIcons(); + + for ($i = 0; $i < $n; ++$i) { + $this->plots[$i]->Stroke($this->img); + $this->plots[$i]->Legend($this); + } + } + + $this->legend->Stroke($this->img); + $this->footer->Stroke($this->img); + $this->StrokeTitles(); + + if (!$_csim) { + + // Stroke texts + if ($this->texts != null) { + $n = count($this->texts); + for ($i = 0; $i < $n; ++$i) { + $this->texts[$i]->Stroke($this->img); + } + } + + if (_JPG_DEBUG) { + $this->DisplayCSIMAreas(); + } + + // Should we do any final image transformation + if ($this->iImgTrans) { + if (!class_exists('ImgTrans', false)) { + require_once 'jpgraph_imgtrans.php'; + //Util\JpGraphError::Raise('In order to use image transformation you must include the file jpgraph_imgtrans.php in your script.'); + } + + $tform = new ImgTrans($this->img->img); + $this->img->img = $tform->Skew3D($this->iImgTransHorizon, $this->iImgTransSkewDist, + $this->iImgTransDirection, $this->iImgTransHighQ, + $this->iImgTransMinSize, $this->iImgTransFillColor, + $this->iImgTransBorder); + } + + // If the filename is given as the special "__handle" + // then the image handler is returned and the image is NOT + // streamed back + if ($aStrokeFileName == _IMG_HANDLER) { + return $this->img->img; + } else { + // Finally stream the generated picture + $this->cache->PutAndStream($this->img, $this->cache_name, $this->inline, + $aStrokeFileName); + } + } + } +} // Class diff --git a/vendor/amenadiel/jpgraph/src/graph/PolarAxis.php b/vendor/amenadiel/jpgraph/src/graph/PolarAxis.php new file mode 100644 index 0000000000..efeb23b602 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/PolarAxis.php @@ -0,0 +1,454 @@ +show_angle_mark = $aFlg; + } + + public function SetAngleStep($aStep) + { + $this->angle_step = $aStep; + } + + public function HideTicks($aFlg = true, $aAngleFlg = true) + { + parent::HideTicks($aFlg, $aFlg); + $this->show_angle_tick = !$aAngleFlg; + } + + public function ShowAngleLabel($aFlg = true) + { + $this->show_angle_label = $aFlg; + } + + public function ShowGrid($aMajor = true, $aMinor = false, $aAngle = true) + { + $this->show_minor_grid = $aMinor; + $this->show_major_grid = $aMajor; + $this->show_angle_grid = $aAngle; + } + + public function SetAngleFont($aFontFam, $aFontStyle = FS_NORMAL, $aFontSize = 10) + { + $this->angle_fontfam = $aFontFam; + $this->angle_fontstyle = $aFontStyle; + $this->angle_fontsize = $aFontSize; + } + + public function SetColor($aColor, $aRadColor = '', $aAngleColor = '') + { + if ($aAngleColor == '') { + $aAngleColor = $aColor; + } + + parent::SetColor($aColor, $aRadColor); + $this->angle_fontcolor = $aAngleColor; + } + + public function SetGridColor($aMajorColor, $aMinorColor = '', $aAngleColor = '') + { + if ($aMinorColor == '') { + $aMinorColor = $aMajorColor; + } + + if ($aAngleColor == '') { + $aAngleColor = $aMajorColor; + } + + $this->gridminor_color = $aMinorColor; + $this->gridmajor_color = $aMajorColor; + $this->angle_color = $aAngleColor; + } + + public function SetTickColors($aRadColor, $aAngleColor = '') + { + $this->radius_tick_color = $aRadColor; + $this->angle_tick_color = $aAngleColor; + } + + // Private methods + public function StrokeGrid($pos) + { + $x = round($this->img->left_margin + $this->img->plotwidth / 2); + $this->scale->ticks->Stroke($this->img, $this->scale, $pos); + + // Stroke the minor arcs + $pmin = []; + $p = $this->scale->ticks->ticks_pos; + $n = count($p); + $i = 0; + $this->img->SetColor($this->gridminor_color); + while ($i < $n) { + $r = $p[$i] - $x + 1; + $pmin[] = $r; + if ($this->show_minor_grid) { + $this->img->Circle($x, $pos, $r); + } + $i++; + } + + $limit = max($this->img->plotwidth, $this->img->plotheight) * 1.4; + while ($r < $limit) { + $off = $r; + $i = 1; + $r = $off + round($p[$i] - $x + 1); + while ($r < $limit && $i < $n) { + $r = $off + $p[$i] - $x; + $pmin[] = $r; + if ($this->show_minor_grid) { + $this->img->Circle($x, $pos, $r); + } + $i++; + } + } + + // Stroke the major arcs + if ($this->show_major_grid) { + // First determine how many minor step on + // every major step. We have recorded the minor radius + // in pmin and use these values. This is done in order + // to avoid rounding errors if we were to recalculate the + // different major radius. + $pmaj = $this->scale->ticks->maj_ticks_pos; + $p = $this->scale->ticks->ticks_pos; + if ($this->scale->name == 'lin') { + $step = round(($pmaj[1] - $pmaj[0]) / ($p[1] - $p[0])); + } else { + $step = 9; + } + $n = round(count($pmin) / $step); + $i = 0; + $this->img->SetColor($this->gridmajor_color); + $limit = max($this->img->plotwidth, $this->img->plotheight) * 1.4; + $off = $r; + $i = 0; + $r = $pmin[$i * $step]; + while ($r < $limit && $i < $n) { + $r = $pmin[$i * $step]; + $this->img->Circle($x, $pos, $r); + $i++; + } + } + + // Draw angles + if ($this->show_angle_grid) { + $this->img->SetColor($this->angle_color); + $d = max($this->img->plotheight, $this->img->plotwidth) * 1.4; + $a = 0; + $p = $this->scale->ticks->ticks_pos; + $start_radius = $p[1] - $x; + while ($a < 360) { + if ($a == 90 || $a == 270) { + // Make sure there are no rounding problem with + // exactly vertical lines + $this->img->Line($x + $start_radius * cos($a / 180 * M_PI) + 1, + $pos - $start_radius * sin($a / 180 * M_PI), + $x + $start_radius * cos($a / 180 * M_PI) + 1, + $pos - $d * sin($a / 180 * M_PI)); + + } else { + $this->img->Line($x + $start_radius * cos($a / 180 * M_PI) + 1, + $pos - $start_radius * sin($a / 180 * M_PI), + $x + $d * cos($a / 180 * M_PI), + $pos - $d * sin($a / 180 * M_PI)); + } + $a += $this->angle_step; + } + } + } + + public function StrokeAngleLabels($pos, $type) + { + + if (!$this->show_angle_label) { + return; + } + + $x0 = round($this->img->left_margin + $this->img->plotwidth / 2) + 1; + + $d = max($this->img->plotwidth, $this->img->plotheight) * 1.42; + $a = $this->angle_step; + $t = new Text(); + $t->SetColor($this->angle_fontcolor); + $t->SetFont($this->angle_fontfam, $this->angle_fontstyle, $this->angle_fontsize); + $xright = $this->img->width - $this->img->right_margin; + $ytop = $this->img->top_margin; + $xleft = $this->img->left_margin; + $ybottom = $this->img->height - $this->img->bottom_margin; + $ha = 'left'; + $va = 'center'; + $w = $this->img->plotwidth / 2; + $h = $this->img->plotheight / 2; + $xt = $x0; + $yt = $pos; + $margin = 5; + + $tl = $this->angle_tick_len; // Outer len + $tl2 = $this->angle_tick_len2; // Interior len + + $this->img->SetColor($this->angle_tick_color); + $rot90 = $this->img->a == 90; + + if ($type == POLAR_360) { + + // Corner angles of the four corners + $ca1 = atan($h / $w) / M_PI * 180; + $ca2 = 180 - $ca1; + $ca3 = $ca1 + 180; + $ca4 = 360 - $ca1; + $end = 360; + + while ($a < $end) { + $ca = cos($a / 180 * M_PI); + $sa = sin($a / 180 * M_PI); + $x = $d * $ca; + $y = $d * $sa; + $xt = 1000; + $yt = 1000; + if ($a <= $ca1 || $a >= $ca4) { + $yt = $pos - $w * $y / $x; + $xt = $xright + $margin; + if ($rot90) { + $ha = 'center'; + $va = 'top'; + } else { + $ha = 'left'; + $va = 'center'; + } + $x1 = $xright - $tl2; + $x2 = $xright + $tl; + $y1 = $y2 = $yt; + } elseif ($a > $ca1 && $a < $ca2) { + $xt = $x0 + $h * $x / $y; + $yt = $ytop - $margin; + if ($rot90) { + $ha = 'left'; + $va = 'center'; + } else { + $ha = 'center'; + $va = 'bottom'; + } + $y1 = $ytop + $tl2; + $y2 = $ytop - $tl; + $x1 = $x2 = $xt; + } elseif ($a >= $ca2 && $a <= $ca3) { + $yt = $pos + $w * $y / $x; + $xt = $xleft - $margin; + if ($rot90) { + $ha = 'center'; + $va = 'bottom'; + } else { + $ha = 'right'; + $va = 'center'; + } + $x1 = $xleft + $tl2; + $x2 = $xleft - $tl; + $y1 = $y2 = $yt; + } else { + $xt = $x0 - $h * $x / $y; + $yt = $ybottom + $margin; + if ($rot90) { + $ha = 'right'; + $va = 'center'; + } else { + $ha = 'center'; + $va = 'top'; + } + $y1 = $ybottom - $tl2; + $y2 = $ybottom + $tl; + $x1 = $x2 = $xt; + } + if ($a != 0 && $a != 180) { + $t->Align($ha, $va); + if ($this->scale->clockwise) { + $t->Set(360 - $a); + } else { + $t->Set($a); + } + if ($this->show_angle_mark && $t->font_family > 4) { + $a .= SymChar::Get('degree'); + } + $t->Stroke($this->img, $xt, $yt); + if ($this->show_angle_tick) { + $this->img->Line($x1, $y1, $x2, $y2); + } + } + $a += $this->angle_step; + } + } else { + // POLAR_HALF + $ca1 = atan($h / $w * 2) / M_PI * 180; + $ca2 = 180 - $ca1; + $end = 180; + while ($a < $end) { + $ca = cos($a / 180 * M_PI); + $sa = sin($a / 180 * M_PI); + $x = $d * $ca; + $y = $d * $sa; + if ($a <= $ca1) { + $yt = $pos - $w * $y / $x; + $xt = $xright + $margin; + if ($rot90) { + $ha = 'center'; + $va = 'top'; + } else { + $ha = 'left'; + $va = 'center'; + } + $x1 = $xright - $tl2; + $x2 = $xright + $tl; + $y1 = $y2 = $yt; + } elseif ($a > $ca1 && $a < $ca2) { + $xt = $x0 + 2 * $h * $x / $y; + $yt = $ytop - $margin; + if ($rot90) { + $ha = 'left'; + $va = 'center'; + } else { + $ha = 'center'; + $va = 'bottom'; + } + $y1 = $ytop + $tl2; + $y2 = $ytop - $tl; + $x1 = $x2 = $xt; + } elseif ($a >= $ca2) { + $yt = $pos + $w * $y / $x; + $xt = $xleft - $margin; + if ($rot90) { + $ha = 'center'; + $va = 'bottom'; + } else { + $ha = 'right'; + $va = 'center'; + } + $x1 = $xleft + $tl2; + $x2 = $xleft - $tl; + $y1 = $y2 = $yt; + } + $t->Align($ha, $va); + if ($this->show_angle_mark && $t->font_family > 4) { + $a .= SymChar::Get('degree'); + } + $t->Set($a); + $t->Stroke($this->img, $xt, $yt); + if ($this->show_angle_tick) { + $this->img->Line($x1, $y1, $x2, $y2); + } + $a += $this->angle_step; + } + } + } + + public function Stroke($pos, $dummy = true) + { + + $this->img->SetLineWeight($this->weight); + $this->img->SetColor($this->color); + $this->img->SetFont($this->font_family, $this->font_style, $this->font_size); + if (!$this->hide_line) { + $this->img->FilledRectangle($this->img->left_margin, $pos, + $this->img->width - $this->img->right_margin, + $pos + $this->weight - 1); + } + $y = $pos + $this->img->GetFontHeight() + $this->title_margin + $this->title->margin; + if ($this->title_adjust == "high") { + $this->title->SetPos($this->img->width - $this->img->right_margin, $y, "right", "top"); + } elseif ($this->title_adjust == "middle" || $this->title_adjust == "center") { + $this->title->SetPos(($this->img->width - $this->img->left_margin - $this->img->right_margin) / 2 + $this->img->left_margin, + $y, "center", "top"); + } elseif ($this->title_adjust == "low") { + $this->title->SetPos($this->img->left_margin, $y, "left", "top"); + } else { + Util\JpGraphError::RaiseL(17002, $this->title_adjust); + //('Unknown alignment specified for X-axis title. ('.$this->title_adjust.')'); + } + + if (!$this->hide_labels) { + $this->StrokeLabels($pos, false); + } + $this->img->SetColor($this->radius_tick_color); + $this->scale->ticks->Stroke($this->img, $this->scale, $pos); + + // + // Mirror the positions for the left side of the scale + // + $mid = 2 * ($this->img->left_margin + $this->img->plotwidth / 2); + $n = count($this->scale->ticks->ticks_pos); + $i = 0; + while ($i < $n) { + $this->scale->ticks->ticks_pos[$i] = + $mid - $this->scale->ticks->ticks_pos[$i]; + ++$i; + } + + $n = count($this->scale->ticks->maj_ticks_pos); + $i = 0; + while ($i < $n) { + $this->scale->ticks->maj_ticks_pos[$i] = + $mid - $this->scale->ticks->maj_ticks_pos[$i]; + ++$i; + } + + $n = count($this->scale->ticks->maj_ticklabels_pos); + $i = 1; + while ($i < $n) { + $this->scale->ticks->maj_ticklabels_pos[$i] = + $mid - $this->scale->ticks->maj_ticklabels_pos[$i]; + ++$i; + } + + // Draw the left side of the scale + $n = count($this->scale->ticks->ticks_pos); + $yu = $pos - $this->scale->ticks->direction * $this->scale->ticks->GetMinTickAbsSize(); + + // Minor ticks + if (!$this->scale->ticks->supress_minor_tickmarks) { + $i = 1; + while ($i < $n / 2) { + $x = round($this->scale->ticks->ticks_pos[$i]); + $this->img->Line($x, $pos, $x, $yu); + ++$i; + } + } + + $n = count($this->scale->ticks->maj_ticks_pos); + $yu = $pos - $this->scale->ticks->direction * $this->scale->ticks->GetMajTickAbsSize(); + + // Major ticks + if (!$this->scale->ticks->supress_tickmarks) { + $i = 1; + while ($i < $n / 2) { + $x = round($this->scale->ticks->maj_ticks_pos[$i]); + $this->img->Line($x, $pos, $x, $yu); + ++$i; + } + } + if (!$this->hide_labels) { + $this->StrokeLabels($pos, false); + } + $this->title->Stroke($this->img); + } +} diff --git a/vendor/amenadiel/jpgraph/src/graph/PolarGraph.php b/vendor/amenadiel/jpgraph/src/graph/PolarGraph.php new file mode 100644 index 0000000000..b2317175da --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/PolarGraph.php @@ -0,0 +1,224 @@ +SetDensity(TICKD_DENSE); + $this->SetBox(); + $this->SetMarginColor('white'); + } + + public function SetDensity($aDense) + { + $this->SetTickDensity(TICKD_NORMAL, $aDense); + } + + public function SetClockwise($aFlg) + { + $this->scale->SetClockwise($aFlg); + } + + public function Set90AndMargin($lm = 0, $rm = 0, $tm = 0, $bm = 0) + { + $adj = ($this->img->height - $this->img->width) / 2; + $this->SetAngle(90); + $lm2 = -$adj + ($lm - $rm + $tm + $bm) / 2; + $rm2 = -$adj + (-$lm + $rm + $tm + $bm) / 2; + $tm2 = $adj + ($tm - $bm + $lm + $rm) / 2; + $bm2 = $adj + (-$tm + $bm + $lm + $rm) / 2; + $this->SetMargin($lm2, $rm2, $tm2, $bm2); + $this->axis->SetLabelAlign('right', 'center'); + } + + public function SetScale($aScale, $rmax = 0, $dummy1 = 1, $dummy2 = 1, $dummy3 = 1) + { + if ($aScale == 'lin') { + $this->scale = new PolarScale($rmax, $this, $this->iClockwise); + } elseif ($aScale == 'log') { + $this->scale = new PolarLogScale($rmax, $this, $this->iClockwise); + } else { + Util\JpGraphError::RaiseL(17004); //('Unknown scale type for polar graph. Must be "lin" or "log"'); + } + + $this->axis = new PolarAxis($this->img, $this->scale); + $this->SetMargin(40, 40, 50, 40); + } + + public function SetType($aType) + { + $this->iType = $aType; + } + + public function SetPlotSize($w, $h) + { + $this->SetMargin(($this->img->width - $w) / 2, ($this->img->width - $w) / 2, + ($this->img->height - $h) / 2, ($this->img->height - $h) / 2); + } + + // Private methods + public function GetPlotsMax() + { + $n = count($this->plots); + $m = $this->plots[0]->Max(); + $i = 1; + while ($i < $n) { + $m = max($this->plots[$i]->Max(), $m); + ++$i; + } + return $m; + } + + public function Stroke($aStrokeFileName = "") + { + + // Start by adjusting the margin so that potential titles will fit. + $this->AdjustMarginsForTitles(); + + // If the filename is the predefined value = '_csim_special_' + // we assume that the call to stroke only needs to do enough + // to correctly generate the CSIM maps. + // We use this variable to skip things we don't strictly need + // to do to generate the image map to improve performance + // a best we can. Therefor you will see a lot of tests !$_csim in the + // code below. + $_csim = ($aStrokeFileName === _CSIM_SPECIALFILE); + + // We need to know if we have stroked the plot in the + // GetCSIMareas. Otherwise the CSIM hasn't been generated + // and in the case of GetCSIM called before stroke to generate + // CSIM without storing an image to disk GetCSIM must call Stroke. + $this->iHasStroked = true; + + //Check if we should autoscale axis + if (!$this->scale->IsSpecified() && count($this->plots) > 0) { + $max = $this->GetPlotsMax(); + $t1 = $this->img->plotwidth; + $this->img->plotwidth /= 2; + $t2 = $this->img->left_margin; + $this->img->left_margin += $this->img->plotwidth + 1; + $this->scale->AutoScale($this->img, 0, $max, + $this->img->plotwidth / $this->xtick_factor / 2); + $this->img->plotwidth = $t1; + $this->img->left_margin = $t2; + } else { + // The tick calculation will use the user suplied min/max values to determine + // the ticks. If auto_ticks is false the exact user specifed min and max + // values will be used for the scale. + // If auto_ticks is true then the scale might be slightly adjusted + // so that the min and max values falls on an even major step. + //$min = 0; + $max = $this->scale->scale[1]; + $t1 = $this->img->plotwidth; + $this->img->plotwidth /= 2; + $t2 = $this->img->left_margin; + $this->img->left_margin += $this->img->plotwidth + 1; + $this->scale->AutoScale($this->img, 0, $max, + $this->img->plotwidth / $this->xtick_factor / 2); + $this->img->plotwidth = $t1; + $this->img->left_margin = $t2; + } + + if ($this->iType == POLAR_180) { + $pos = $this->img->height - $this->img->bottom_margin; + } else { + $pos = $this->img->plotheight / 2 + $this->img->top_margin; + } + + if (!$_csim) { + $this->StrokePlotArea(); + } + + $this->iDoClipping = true; + + if ($this->iDoClipping) { + $oldimage = $this->img->CloneCanvasH(); + } + + if (!$_csim) { + $this->axis->StrokeGrid($pos); + } + + // Stroke all plots for Y1 axis + for ($i = 0; $i < count($this->plots); ++$i) { + $this->plots[$i]->Stroke($this->img, $this->scale); + } + + if ($this->iDoClipping) { + // Clipping only supports graphs at 0 and 90 degrees + if ($this->img->a == 0) { + $this->img->CopyCanvasH($oldimage, $this->img->img, + $this->img->left_margin, $this->img->top_margin, + $this->img->left_margin, $this->img->top_margin, + $this->img->plotwidth + 1, $this->img->plotheight + 1); + } elseif ($this->img->a == 90) { + $adj1 = round(($this->img->height - $this->img->width) / 2); + $adj2 = round(($this->img->width - $this->img->height) / 2); + $lm = $this->img->left_margin; + $rm = $this->img->right_margin; + $tm = $this->img->top_margin; + $bm = $this->img->bottom_margin; + $this->img->CopyCanvasH($oldimage, $this->img->img, + $adj2 + round(($lm - $rm + $tm + $bm) / 2), + $adj1 + round(($tm - $bm + $lm + $rm) / 2), + $adj2 + round(($lm - $rm + $tm + $bm) / 2), + $adj1 + round(($tm - $bm + $lm + $rm) / 2), + $this->img->plotheight + 1, + $this->img->plotwidth + 1); + } + $this->img->Destroy(); + $this->img->SetCanvasH($oldimage); + } + + if (!$_csim) { + $this->axis->Stroke($pos); + $this->axis->StrokeAngleLabels($pos, $this->iType); + } + + if (!$_csim) { + $this->StrokePlotBox(); + $this->footer->Stroke($this->img); + + // The titles and legends never gets rotated so make sure + // that the angle is 0 before stroking them + $aa = $this->img->SetAngle(0); + $this->StrokeTitles(); + } + + for ($i = 0; $i < count($this->plots); ++$i) { + $this->plots[$i]->Legend($this); + } + + $this->legend->Stroke($this->img); + + if (!$_csim) { + + $this->StrokeTexts(); + $this->img->SetAngle($aa); + + // Draw an outline around the image map + if (_JPG_DEBUG) { + $this->DisplayClientSideaImageMapAreas(); + } + + // If the filename is given as the special "__handle" + // then the image handler is returned and the image is NOT + // streamed back + if ($aStrokeFileName == _IMG_HANDLER) { + return $this->img->img; + } else { + // Finally stream the generated picture + $this->cache->PutAndStream($this->img, $this->cache_name, $this->inline, $aStrokeFileName); + } + } + } +} diff --git a/vendor/amenadiel/jpgraph/src/graph/PolarLogScale.php b/vendor/amenadiel/jpgraph/src/graph/PolarLogScale.php new file mode 100644 index 0000000000..2a1ea653d6 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/PolarLogScale.php @@ -0,0 +1,51 @@ +graph = $graph; + $this->ticks->SetLabelLogType(LOGLABELS_MAGNITUDE); + $this->clockwise = $aClockwise; + + } + + public function SetClockwise($aFlg) + { + $this->clockwise = $aFlg; + } + + public function PTranslate($aAngle, $aRad) + { + + if ($aRad == 0) { + $aRad = 1; + } + + $aRad = log10($aRad); + $m = $this->scale[1]; + $w = $this->graph->img->plotwidth / 2; + $aRad = $aRad / $m * $w; + + $a = $aAngle / 180 * M_PI; + if ($this->clockwise) { + $a = 2 * M_PI - $a; + } + + $x = cos($a) * $aRad; + $y = sin($a) * $aRad; + + $x += $w + $this->graph->img->left_margin; //$this->_Translate(0); + if ($this->graph->iType == POLAR_360) { + $y = ($this->graph->img->top_margin + $this->graph->img->plotheight / 2) - $y; + } else { + $y = ($this->graph->img->top_margin + $this->graph->img->plotheight) - $y; + } + return [$x, $y]; + } +} diff --git a/vendor/amenadiel/jpgraph/src/graph/PolarScale.php b/vendor/amenadiel/jpgraph/src/graph/PolarScale.php new file mode 100644 index 0000000000..8cf46009bb --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/PolarScale.php @@ -0,0 +1,50 @@ +graph = $graph; + $this->clockwise = $aClockwise; + } + + public function SetClockwise($aFlg) + { + $this->clockwise = $aFlg; + } + + public function _Translate($v) + { + return parent::Translate($v); + } + + public function PTranslate($aAngle, $aRad) + { + + $m = $this->scale[1]; + $w = $this->graph->img->plotwidth / 2; + $aRad = $aRad / $m * $w; + + $a = $aAngle / 180 * M_PI; + if ($this->clockwise) { + $a = 2 * M_PI - $a; + } + + $x = cos($a) * $aRad; + $y = sin($a) * $aRad; + + $x += $this->_Translate(0); + + if ($this->graph->iType == POLAR_360) { + $y = ($this->graph->img->top_margin + $this->graph->img->plotheight / 2) - $y; + } else { + $y = ($this->graph->img->top_margin + $this->graph->img->plotheight) - $y; + } + return [$x, $y]; + } +} diff --git a/vendor/amenadiel/jpgraph/src/graph/RadarAxis.php b/vendor/amenadiel/jpgraph/src/graph/RadarAxis.php new file mode 100644 index 0000000000..956f8e662f --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/RadarAxis.php @@ -0,0 +1,148 @@ +len = $img->plotheight; + $this->title = new Text(); + $this->title->SetFont(FF_FONT1, FS_BOLD); + $this->color = array(0, 0, 0); + } + + // Stroke the axis + // $pos = Vertical position of axis + // $aAxisAngle = Axis angle + // $grid = Returns an array with positions used to draw the grid + // $lf = Label flag, TRUE if the axis should have labels + public function Stroke($pos, $aAxisAngle, &$grid, $title, $lf) + { + $this->img->SetColor($this->color); + + // Determine end points for the axis + $x = round($this->scale->world_abs_size * cos($aAxisAngle) + $this->scale->scale_abs[0]); + $y = round($pos - $this->scale->world_abs_size * sin($aAxisAngle)); + + // Draw axis + $this->img->SetColor($this->color); + $this->img->SetLineWeight($this->weight); + if (!$this->hide) { + $this->img->Line($this->scale->scale_abs[0], $pos, $x, $y); + } + + $this->scale->ticks->Stroke($this->img, $grid, $pos, $aAxisAngle, $this->scale, $majpos, $majlabel); + $ncolor = 0; + if (isset($this->ticks_label_colors)) { + $ncolor = count($this->ticks_label_colors); + } + + // Draw labels + if ($lf && !$this->hide) { + $this->img->SetFont($this->font_family, $this->font_style, $this->font_size); + $this->img->SetTextAlign('left', 'top'); + $this->img->SetColor($this->label_color); + + // majpos contains (x,y) coordinates for labels + if (!$this->hide_labels) { + $n = floor(count($majpos) / 2); + for ($i = 0; $i < $n; ++$i) { + // Set specific label color if specified + if ($ncolor > 0) { + $this->img->SetColor($this->ticks_label_colors[$i % $ncolor]); + } + + if ($this->ticks_label != null && isset($this->ticks_label[$i])) { + $this->img->StrokeText($majpos[$i * 2], $majpos[$i * 2 + 1], $this->ticks_label[$i]); + } else { + $this->img->StrokeText($majpos[$i * 2], $majpos[$i * 2 + 1], $majlabel[$i]); + } + } + } + } + $this->_StrokeAxisTitle($pos, $aAxisAngle, $title); + } + + public function _StrokeAxisTitle($pos, $aAxisAngle, $title) + { + $this->title->Set($title); + $marg = 6 + $this->title->margin; + $xt = round(($this->scale->world_abs_size + $marg) * cos($aAxisAngle) + $this->scale->scale_abs[0]); + $yt = round($pos - ($this->scale->world_abs_size + $marg) * sin($aAxisAngle)); + + // Position the axis title. + // dx, dy is the offset from the top left corner of the bounding box that sorrounds the text + // that intersects with the extension of the corresponding axis. The code looks a little + // bit messy but this is really the only way of having a reasonable position of the + // axis titles. + if ($this->title->iWordwrap > 0) { + $title = wordwrap($title, $this->title->iWordwrap, "\n"); + } + + $h = $this->img->GetTextHeight($title) * 1.2; + $w = $this->img->GetTextWidth($title) * 1.2; + + while ($aAxisAngle > 2 * M_PI) { + $aAxisAngle -= 2 * M_PI; + } + + // Around 3 a'clock + if ($aAxisAngle >= 7 * M_PI / 4 || $aAxisAngle <= M_PI / 4) { + $dx = -0.15; + } + // Small trimming to make the dist to the axis more even + + // Around 12 a'clock + if ($aAxisAngle >= M_PI / 4 && $aAxisAngle <= 3 * M_PI / 4) { + $dx = ($aAxisAngle - M_PI / 4) * 2 / M_PI; + } + + // Around 9 a'clock + if ($aAxisAngle >= 3 * M_PI / 4 && $aAxisAngle <= 5 * M_PI / 4) { + $dx = 1; + } + + // Around 6 a'clock + if ($aAxisAngle >= 5 * M_PI / 4 && $aAxisAngle <= 7 * M_PI / 4) { + $dx = (1 - ($aAxisAngle - M_PI * 5 / 4) * 2 / M_PI); + } + + if ($aAxisAngle >= 7 * M_PI / 4) { + $dy = (($aAxisAngle - M_PI) - 3 * M_PI / 4) * 2 / M_PI; + } + + if ($aAxisAngle <= M_PI / 12) { + $dy = (0.5 - $aAxisAngle * 2 / M_PI); + } + + if ($aAxisAngle <= M_PI / 4 && $aAxisAngle > M_PI / 12) { + $dy = (1 - $aAxisAngle * 2 / M_PI); + } + + if ($aAxisAngle >= M_PI / 4 && $aAxisAngle <= 3 * M_PI / 4) { + $dy = 1; + } + + if ($aAxisAngle >= 3 * M_PI / 4 && $aAxisAngle <= 5 * M_PI / 4) { + $dy = (1 - ($aAxisAngle - 3 * M_PI / 4) * 2 / M_PI); + } + + if ($aAxisAngle >= 5 * M_PI / 4 && $aAxisAngle <= 7 * M_PI / 4) { + $dy = 0; + } + + if (!$this->hide) { + $this->title->Stroke($this->img, $xt - $dx * $w, $yt - $dy * $h, $title); + } + } + +} // Class diff --git a/vendor/amenadiel/jpgraph/src/graph/RadarGraph.php b/vendor/amenadiel/jpgraph/src/graph/RadarGraph.php new file mode 100644 index 0000000000..971612a696 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/RadarGraph.php @@ -0,0 +1,324 @@ +posx = $width / 2; + $this->posy = $height / 2; + $this->len = min($width, $height) * 0.35; + $this->SetColor(array(255, 255, 255)); + $this->SetTickDensity(TICKD_NORMAL); + $this->SetScale('lin'); + $this->SetGridDepth(DEPTH_FRONT); + } + + public function HideTickMarks($aFlag = true) + { + $this->axis->scale->ticks->SupressTickMarks($aFlag); + } + + public function ShowMinorTickmarks($aFlag = true) + { + $this->yscale->ticks->SupressMinorTickMarks(!$aFlag); + } + + public function SetScale($axtype, $ymin = 1, $ymax = 1, $dummy1 = null, $dumy2 = null) + { + if ($axtype != 'lin' && $axtype != 'log') { + Util\JpGraphError::RaiseL(18003, $axtype); + //("Illegal scale for radarplot ($axtype). Must be \"lin\" or \"log\""); + } + if ($axtype == 'lin') { + $this->yscale = new LinearScale($ymin, $ymax); + $this->yscale->ticks = new RadarLinearTicks(); + $this->yscale->ticks->SupressMinorTickMarks(); + } elseif ($axtype == 'log') { + $this->yscale = new LogScale($ymin, $ymax); + $this->yscale->ticks = new RadarLogTicks(); + } + + $this->axis = new RadarAxis($this->img, $this->yscale); + $this->grid = new RadarGrid(); + } + + public function SetSize($aSize) + { + if ($aSize < 0.1 || $aSize > 1) { + Util\JpGraphError::RaiseL(18004, $aSize); + //("Radar Plot size must be between 0.1 and 1. (Your value=$s)"); + } + $this->len = min($this->img->width, $this->img->height) * $aSize / 2; + } + + public function SetPlotSize($aSize) + { + $this->SetSize($aSize); + } + + public function SetTickDensity($densy = TICKD_NORMAL, $dummy1 = null) + { + $this->ytick_factor = 25; + switch ($densy) { + case TICKD_DENSE: + $this->ytick_factor = 12; + break; + case TICKD_NORMAL: + $this->ytick_factor = 25; + break; + case TICKD_SPARSE: + $this->ytick_factor = 40; + break; + case TICKD_VERYSPARSE: + $this->ytick_factor = 70; + break; + default: + Util\JpGraphError::RaiseL(18005, $densy); + //("RadarPlot Unsupported Tick density: $densy"); + } + } + + public function SetPos($px, $py = 0.5) + { + $this->SetCenter($px, $py); + } + + public function SetCenter($px, $py = 0.5) + { + if ($px >= 0 && $px <= 1) { + $this->posx = $this->img->width * $px; + } else { + $this->posx = $px; + } + if ($py >= 0 && $py <= 1) { + $this->posy = $this->img->height * $py; + } else { + $this->posy = $py; + } + } + + public function SetColor($aColor) + { + $this->SetMarginColor($aColor); + } + + public function SetTitles($aTitleArray) + { + $this->axis_title = $aTitleArray; + } + + public function Add($aPlot) + { + if ($aPlot == null) { + Util\JpGraphError::RaiseL(25010); //("Graph::Add() You tried to add a null plot to the graph."); + } + if (is_array($aPlot) && count($aPlot) > 0) { + $cl = $aPlot[0]; + } else { + $cl = $aPlot; + } + + if ($cl instanceof Text) { + $this->AddText($aPlot); + } elseif (class_exists('IconPlot', false) && ($cl instanceof IconPlot)) { + $this->AddIcon($aPlot); + } else { + $this->plots[] = $aPlot; + } + } + + public function GetPlotsYMinMax($aPlots) + { + $min = $aPlots[0]->Min(); + $max = $aPlots[0]->Max(); + foreach ($this->plots as $p) { + $max = max($max, $p->Max()); + $min = min($min, $p->Min()); + } + if ($min < 0) { + Util\JpGraphError::RaiseL(18006, $min); + //("Minimum data $min (Radar plots should only be used when all data points > 0)"); + } + return array($min, $max); + } + + public function StrokeIcons() + { + if ($this->iIcons != null) { + $n = count($this->iIcons); + for ($i = 0; $i < $n; ++$i) { + $this->iIcons[$i]->Stroke($this->img); + } + } + } + + public function StrokeTexts() + { + if ($this->texts != null) { + $n = count($this->texts); + for ($i = 0; $i < $n; ++$i) { + $this->texts[$i]->Stroke($this->img); + } + } + } + + // Stroke the Radar graph + public function Stroke($aStrokeFileName = '') + { + + // If the filename is the predefined value = '_csim_special_' + // we assume that the call to stroke only needs to do enough + // to correctly generate the CSIM maps. + // We use this variable to skip things we don't strictly need + // to do to generate the image map to improve performance + // a best we can. Therefor you will see a lot of tests !$_csim in the + // code below. + $_csim = ($aStrokeFileName === _CSIM_SPECIALFILE); + + // We need to know if we have stroked the plot in the + // GetCSIMareas. Otherwise the CSIM hasn't been generated + // and in the case of GetCSIM called before stroke to generate + // CSIM without storing an image to disk GetCSIM must call Stroke. + $this->iHasStroked = true; + + $n = count($this->plots); + // Set Y-scale + + if (!$this->yscale->IsSpecified() && count($this->plots) > 0) { + list($min, $max) = $this->GetPlotsYMinMax($this->plots); + $this->yscale->AutoScale($this->img, 0, $max, $this->len / $this->ytick_factor); + } elseif ($this->yscale->IsSpecified() && + ($this->yscale->auto_ticks || !$this->yscale->ticks->IsSpecified())) { + + // The tick calculation will use the user suplied min/max values to determine + // the ticks. If auto_ticks is false the exact user specifed min and max + // values will be used for the scale. + // If auto_ticks is true then the scale might be slightly adjusted + // so that the min and max values falls on an even major step. + $min = $this->yscale->scale[0]; + $max = $this->yscale->scale[1]; + $this->yscale->AutoScale($this->img, $min, $max, + $this->len / $this->ytick_factor, + $this->yscale->auto_ticks); + } + + // Set start position end length of scale (in absolute pixels) + $this->yscale->SetConstants($this->posx, $this->len); + + // We need as many axis as there are data points + $nbrpnts = $this->plots[0]->GetCount(); + + // If we have no titles just number the axis 1,2,3,... + if ($this->axis_title == null) { + for ($i = 0; $i < $nbrpnts; ++$i) { + $this->axis_title[$i] = $i + 1; + } + } elseif (count($this->axis_title) < $nbrpnts) { + Util\JpGraphError::RaiseL(18007); + // ("Number of titles does not match number of points in plot."); + } + for ($i = 0; $i < $n; ++$i) { + if ($nbrpnts != $this->plots[$i]->GetCount()) { + Util\JpGraphError::RaiseL(18008); + //("Each radar plot must have the same number of data points."); + } + } + + if (!$_csim) { + if ($this->background_image != '') { + $this->StrokeFrameBackground(); + } else { + $this->StrokeFrame(); + $this->StrokeBackgroundGrad(); + } + } + $astep = 2 * M_PI / $nbrpnts; + + if (!$_csim) { + if ($this->iIconDepth == DEPTH_BACK) { + $this->StrokeIcons(); + } + + // Prepare legends + for ($i = 0; $i < $n; ++$i) { + $this->plots[$i]->Legend($this); + } + $this->legend->Stroke($this->img); + $this->footer->Stroke($this->img); + } + + if (!$_csim) { + if ($this->grid_depth == DEPTH_BACK) { + // Draw axis and grid + for ($i = 0, $a = M_PI / 2; $i < $nbrpnts; ++$i, $a += $astep) { + $this->axis->Stroke($this->posy, $a, $grid[$i], $this->axis_title[$i], $i == 0); + } + $this->grid->Stroke($this->img, $grid); + } + if ($this->iIconDepth == DEPTH_BACK) { + $this->StrokeIcons(); + } + + } + + // Plot points + $a = M_PI / 2; + for ($i = 0; $i < $n; ++$i) { + $this->plots[$i]->Stroke($this->img, $this->posy, $this->yscale, $a); + } + + if (!$_csim) { + if ($this->grid_depth != DEPTH_BACK) { + // Draw axis and grid + for ($i = 0, $a = M_PI / 2; $i < $nbrpnts; ++$i, $a += $astep) { + $this->axis->Stroke($this->posy, $a, $grid[$i], $this->axis_title[$i], $i == 0); + } + $this->grid->Stroke($this->img, $grid); + } + + $this->StrokeTitles(); + $this->StrokeTexts(); + if ($this->iIconDepth == DEPTH_FRONT) { + $this->StrokeIcons(); + } + } + + // Should we do any final image transformation + if ($this->iImgTrans && !$_csim) { + if (!class_exists('ImgTrans', false)) { + require_once 'jpgraph_imgtrans.php'; + } + + $tform = new ImgTrans($this->img->img); + $this->img->img = $tform->Skew3D($this->iImgTransHorizon, $this->iImgTransSkewDist, + $this->iImgTransDirection, $this->iImgTransHighQ, + $this->iImgTransMinSize, $this->iImgTransFillColor, + $this->iImgTransBorder); + } + + if (!$_csim) { + // If the filename is given as the special "__handle" + // then the image handler is returned and the image is NOT + // streamed back + if ($aStrokeFileName == _IMG_HANDLER) { + return $this->img->img; + } else { + // Finally stream the generated picture + $this->cache->PutAndStream($this->img, $this->cache_name, $this->inline, $aStrokeFileName); + } + } + } +} // Class diff --git a/vendor/amenadiel/jpgraph/src/graph/RadarGrid.php b/vendor/amenadiel/jpgraph/src/graph/RadarGrid.php new file mode 100644 index 0000000000..9b8de7cec0 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/RadarGrid.php @@ -0,0 +1,257 @@ +grid_color = $aMajColor; + } + + public function SetWeight($aWeight) + { + $this->weight = $aWeight; + } + + // Specify if grid should be dashed, dotted or solid + public function SetLineStyle($aType) + { + $this->type = $aType; + } + + // Decide if both major and minor grid should be displayed + public function Show($aShowMajor = true) + { + $this->show = $aShowMajor; + } + + public function Stroke($img, $grid) + { + if (!$this->show) { + return; + } + + $nbrticks = count($grid[0]) / 2; + $nbrpnts = count($grid); + $img->SetColor($this->grid_color); + $img->SetLineWeight($this->weight); + + for ($i = 0; $i < $nbrticks; ++$i) { + for ($j = 0; $j < $nbrpnts; ++$j) { + $pnts[$j * 2] = $grid[$j][$i * 2]; + $pnts[$j * 2 + 1] = $grid[$j][$i * 2 + 1]; + } + for ($k = 0; $k < $nbrpnts; ++$k) { + $l = ($k + 1) % $nbrpnts; + if ($this->type == 'solid') { + $img->Line($pnts[$k * 2], $pnts[$k * 2 + 1], $pnts[$l * 2], $pnts[$l * 2 + 1]); + } elseif ($this->type == 'dotted') { + $img->DashedLine($pnts[$k * 2], $pnts[$k * 2 + 1], $pnts[$l * 2], $pnts[$l * 2 + 1], 1, 6); + } elseif ($this->type == 'dashed') { + $img->DashedLine($pnts[$k * 2], $pnts[$k * 2 + 1], $pnts[$l * 2], $pnts[$l * 2 + 1], 2, 4); + } elseif ($this->type == 'longdashed') { + $img->DashedLine($pnts[$k * 2], $pnts[$k * 2 + 1], $pnts[$l * 2], $pnts[$l * 2 + 1], 8, 6); + } + + } + $pnts = array(); + } + } +} // Class + +//=================================================== +// CLASS RadarPlot +// Description: Plot a radarplot +//=================================================== +class RadarPlot +{ + public $mark = null; + public $legend = ''; + public $legendcsimtarget = ''; + public $legendcsimalt = ''; + public $csimtargets = array(); // Array of targets for CSIM + public $csimareas = ""; // Resultant CSIM area tags + public $csimalts = null; // ALT:s for corresponding target + private $data = array(); + private $fill = false, $fill_color = array(200, 170, 180); + private $color = array(0, 0, 0); + private $weight = 1; + private $linestyle = 'solid'; + + //--------------- + // CONSTRUCTOR + public function __construct($data) + { + $this->data = $data; + $this->mark = new PlotMark(); + } + + public function Min() + { + return Min($this->data); + } + + public function Max() + { + return Max($this->data); + } + + public function SetLegend($legend) + { + $this->legend = $legend; + } + + public function SetLineStyle($aStyle) + { + $this->linestyle = $aStyle; + } + + public function SetLineWeight($w) + { + $this->weight = $w; + } + + public function SetFillColor($aColor) + { + $this->fill_color = $aColor; + $this->fill = true; + } + + public function SetFill($f = true) + { + $this->fill = $f; + } + + public function SetColor($aColor, $aFillColor = false) + { + $this->color = $aColor; + if ($aFillColor) { + $this->SetFillColor($aFillColor); + $this->fill = true; + } + } + + // Set href targets for CSIM + public function SetCSIMTargets($aTargets, $aAlts = null) + { + $this->csimtargets = $aTargets; + $this->csimalts = $aAlts; + } + + // Get all created areas + public function GetCSIMareas() + { + return $this->csimareas; + } + + public function Stroke($img, $pos, $scale, $startangle) + { + $nbrpnts = count($this->data); + $astep = 2 * M_PI / $nbrpnts; + $a = $startangle; + + for ($i = 0; $i < $nbrpnts; ++$i) { + + // Rotate each non null point to the correct axis-angle + $cs = $scale->RelTranslate($this->data[$i]); + $x = round($cs * cos($a) + $scale->scale_abs[0]); + $y = round($pos - $cs * sin($a)); + + $pnts[$i * 2] = $x; + $pnts[$i * 2 + 1] = $y; + + // If the next point is null then we draw this polygon segment + // to the center, skip the next and draw the next segment from + // the center up to the point on the axis with the first non-null + // value and continues from that point. Some additoinal logic is necessary + // to handle the boundary conditions + if ($i < $nbrpnts - 1) { + if (is_null($this->data[$i + 1])) { + $cs = 0; + $x = round($cs * cos($a) + $scale->scale_abs[0]); + $y = round($pos - $cs * sin($a)); + $pnts[$i * 2] = $x; + $pnts[$i * 2 + 1] = $y; + $a += $astep; + } + } + + $a += $astep; + } + + if ($this->fill) { + $img->SetColor($this->fill_color); + $img->FilledPolygon($pnts); + } + + $img->SetLineWeight($this->weight); + $img->SetColor($this->color); + $img->SetLineStyle($this->linestyle); + $pnts[] = $pnts[0]; + $pnts[] = $pnts[1]; + $img->Polygon($pnts); + $img->SetLineStyle('solid'); // Reset line style to default + + // Add plotmarks on top + if ($this->mark->show) { + for ($i = 0; $i < $nbrpnts; ++$i) { + if (isset($this->csimtargets[$i])) { + $this->mark->SetCSIMTarget($this->csimtargets[$i]); + $this->mark->SetCSIMAlt($this->csimalts[$i]); + $this->mark->SetCSIMAltVal($pnts[$i * 2], $pnts[$i * 2 + 1]); + $this->mark->Stroke($img, $pnts[$i * 2], $pnts[$i * 2 + 1]); + $this->csimareas .= $this->mark->GetCSIMAreas(); + } else { + $this->mark->Stroke($img, $pnts[$i * 2], $pnts[$i * 2 + 1]); + } + } + } + + } + + public function GetCount() + { + return count($this->data); + } + + public function Legend($graph) + { + if ($this->legend == '') { + return; + } + if ($this->fill) { + $graph->legend->Add($this->legend, $this->fill_color, $this->mark); + } else { + $graph->legend->Add($this->legend, $this->color, $this->mark); + } + } + +} // Class + +/* EOF */ diff --git a/vendor/amenadiel/jpgraph/src/graph/RadarLinearTicks.php b/vendor/amenadiel/jpgraph/src/graph/RadarLinearTicks.php new file mode 100644 index 0000000000..9768aaf11a --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/RadarLinearTicks.php @@ -0,0 +1,119 @@ +major_step; + } + + // Return minor step size in world coordinates + public function GetMinor() + { + return $this->minor_step; + } + + // Set Minor and Major ticks (in world coordinates) + public function Set($aMajStep, $aMinStep = false) + { + if ($aMinStep == false) { + $aMinStep = $aMajStep; + } + + if ($aMajStep <= 0 || $aMinStep <= 0) { + Util\JpGraphError::RaiseL(25064); + //Util\JpGraphError::Raise(" Minor or major step size is 0. Check that you haven't got an accidental SetTextTicks(0) in your code. If this is not the case you might have stumbled upon a bug in JpGraph. Please report this and if possible include the data that caused the problem."); + } + + $this->major_step = $aMajStep; + $this->minor_step = $aMinStep; + $this->is_set = true; + } + + public function Stroke($aImg, &$grid, $aPos, $aAxisAngle, $aScale, &$aMajPos, &$aMajLabel) + { + // Prepare to draw linear ticks + $maj_step_abs = abs($aScale->scale_factor * $this->major_step); + $min_step_abs = abs($aScale->scale_factor * $this->minor_step); + $nbrmaj = round($aScale->world_abs_size / $maj_step_abs); + $nbrmin = round($aScale->world_abs_size / $min_step_abs); + $skip = round($nbrmin / $nbrmaj); // Don't draw minor on top of major + + // Draw major ticks + $ticklen2 = $this->major_abs_size; + $dx = round(sin($aAxisAngle) * $ticklen2); + $dy = round(cos($aAxisAngle) * $ticklen2); + $label = $aScale->scale[0] + $this->major_step; + + $aImg->SetLineWeight($this->weight); + + $aMajPos = array(); + $aMajLabel = array(); + + for ($i = 1; $i <= $nbrmaj; ++$i) { + $xt = round($i * $maj_step_abs * cos($aAxisAngle)) + $aScale->scale_abs[0]; + $yt = $aPos - round($i * $maj_step_abs * sin($aAxisAngle)); + + if ($this->label_formfunc != '') { + $f = $this->label_formfunc; + $l = call_user_func($f, $label); + } else { + $l = $label; + } + + $aMajLabel[] = $l; + $label += $this->major_step; + $grid[] = $xt; + $grid[] = $yt; + $aMajPos[($i - 1) * 2] = $xt + 2 * $dx; + $aMajPos[($i - 1) * 2 + 1] = $yt - $aImg->GetFontheight() / 2; + if (!$this->supress_tickmarks) { + if ($this->majcolor != '') { + $aImg->PushColor($this->majcolor); + } + $aImg->Line($xt + $dx, $yt + $dy, $xt - $dx, $yt - $dy); + if ($this->majcolor != '') { + $aImg->PopColor(); + } + } + } + + // Draw minor ticks + $ticklen2 = $this->minor_abs_size; + $dx = round(sin($aAxisAngle) * $ticklen2); + $dy = round(cos($aAxisAngle) * $ticklen2); + if (!$this->supress_tickmarks && !$this->supress_minor_tickmarks) { + if ($this->mincolor != '') { + $aImg->PushColor($this->mincolor); + } + for ($i = 1; $i <= $nbrmin; ++$i) { + if (($i % $skip) == 0) { + continue; + } + $xt = round($i * $min_step_abs * cos($aAxisAngle)) + $aScale->scale_abs[0]; + $yt = $aPos - round($i * $min_step_abs * sin($aAxisAngle)); + $aImg->Line($xt + $dx, $yt + $dy, $xt - $dx, $yt - $dy); + } + if ($this->mincolor != '') { + $aImg->PopColor(); + } + } + } +} diff --git a/vendor/amenadiel/jpgraph/src/graph/RadarLogTicks.php b/vendor/amenadiel/jpgraph/src/graph/RadarLogTicks.php new file mode 100644 index 0000000000..f481ed6091 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/RadarLogTicks.php @@ -0,0 +1,92 @@ +GetMinVal(); + $limit = $aScale->GetMaxVal(); + $nextMajor = 10 * $start; + $step = $nextMajor / 10.0; + $count = 1; + + $ticklen_maj = 5; + $dx_maj = round(sin($aAxisAngle) * $ticklen_maj); + $dy_maj = round(cos($aAxisAngle) * $ticklen_maj); + $ticklen_min = 3; + $dx_min = round(sin($aAxisAngle) * $ticklen_min); + $dy_min = round(cos($aAxisAngle) * $ticklen_min); + + $aMajPos = array(); + $aMajLabel = array(); + + if ($this->supress_first) { + $aMajLabel[] = ''; + } else { + $aMajLabel[] = $start; + } + + $yr = $aScale->RelTranslate($start); + $xt = round($yr * cos($aAxisAngle)) + $aScale->scale_abs[0]; + $yt = $aPos - round($yr * sin($aAxisAngle)); + $aMajPos[] = $xt + 2 * $dx_maj; + $aMajPos[] = $yt - $aImg->GetFontheight() / 2; + $grid[] = $xt; + $grid[] = $yt; + + $aImg->SetLineWeight($this->weight); + + for ($y = $start; $y <= $limit; $y += $step, ++$count) { + $yr = $aScale->RelTranslate($y); + $xt = round($yr * cos($aAxisAngle)) + $aScale->scale_abs[0]; + $yt = $aPos - round($yr * sin($aAxisAngle)); + if ($count % 10 == 0) { + $grid[] = $xt; + $grid[] = $yt; + $aMajPos[] = $xt + 2 * $dx_maj; + $aMajPos[] = $yt - $aImg->GetFontheight() / 2; + if (!$this->supress_tickmarks) { + if ($this->majcolor != '') { + $aImg->PushColor($this->majcolor); + } + $aImg->Line($xt + $dx_maj, $yt + $dy_maj, $xt - $dx_maj, $yt - $dy_maj); + if ($this->majcolor != '') { + $aImg->PopColor(); + } + } + if ($this->label_formfunc != '') { + $f = $this->label_formfunc; + $l = call_user_func($f, $nextMajor); + } else { + $l = $nextMajor; + } + + $aMajLabel[] = $l; + $nextMajor *= 10; + $step *= 10; + $count = 1; + } else { + if (!$this->supress_minor_tickmarks) { + if ($this->mincolor != '') { + $aImg->PushColor($this->mincolor); + } + $aImg->Line($xt + $dx_min, $yt + $dy_min, $xt - $dx_min, $yt - $dy_min); + if ($this->mincolor != '') { + $aImg->PopColor(); + } + } + } + } + } +} diff --git a/vendor/amenadiel/jpgraph/src/graph/RectPattern.php b/vendor/amenadiel/jpgraph/src/graph/RectPattern.php new file mode 100644 index 0000000000..40af5991d8 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/RectPattern.php @@ -0,0 +1,82 @@ +color = $aColor; + $this->weight = $aWeight; + } + + public function SetBackground($aBackgroundColor) + { + $this->iBackgroundColor = $aBackgroundColor; + } + + public function SetPos($aRect) + { + $this->rect = $aRect; + } + + public function ShowFrame($aShow = true) + { + $this->doframe = $aShow; + } + + public function SetDensity($aDens) + { + if ($aDens < 1 || $aDens > 100) { + Util\JpGraphError::RaiseL(16001, $aDens); + } + + //(" Desity for pattern must be between 1 and 100. (You tried $aDens)"); + // 1% corresponds to linespacing=50 + // 100 % corresponds to linespacing 1 + $this->linespacing = floor(((100 - $aDens) / 100.0) * 50) + 1; + + } + + public function Stroke($aImg) + { + if ($this->rect == null) { + Util\JpGraphError::RaiseL(16002); + } + + //(" No positions specified for pattern."); + + if (!(is_numeric($this->iBackgroundColor) && $this->iBackgroundColor == -1)) { + $aImg->SetColor($this->iBackgroundColor); + $aImg->FilledRectangle($this->rect->x, $this->rect->y, $this->rect->xe, $this->rect->ye); + } + + $aImg->SetColor($this->color); + $aImg->SetLineWeight($this->weight); + + // Virtual function implemented by subclass + $this->DoPattern($aImg); + + // Frame around the pattern area + if ($this->doframe) { + $aImg->Rectangle($this->rect->x, $this->rect->y, $this->rect->xe, $this->rect->ye); + } + + } + +} diff --git a/vendor/amenadiel/jpgraph/src/graph/RectPattern3DPlane.php b/vendor/amenadiel/jpgraph/src/graph/RectPattern3DPlane.php new file mode 100644 index 0000000000..3bb5c1118b --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/RectPattern3DPlane.php @@ -0,0 +1,126 @@ +SetDensity(10); // Slightly larger default + } + + public function SetHorizon($aHorizon) + { + $this->alpha = $aHorizon; + } + + public function DoPattern($aImg) + { + // "Fake" a nice 3D grid-effect. + $x0 = $this->rect->x + $this->rect->w / 2; + $y0 = $this->rect->y; + $x1 = $x0; + $y1 = $this->rect->ye; + $x0_right = $x0; + $x1_right = $x1; + + // BTW "apa" means monkey in Swedish but is really a shortform for + // "alpha+a" which was the labels I used on paper when I derived the + // geometric to get the 3D perspective right. + // $apa is the height of the bounding rectangle plus the distance to the + // artifical horizon (alpha) + $apa = $this->rect->h + $this->alpha; + + // Three cases and three loops + // 1) The endpoint of the line ends on the bottom line + // 2) The endpoint ends on the side + // 3) Horizontal lines + + // Endpoint falls on bottom line + $middle = $this->rect->x + $this->rect->w / 2; + $dist = $this->linespacing; + $factor = $this->alpha / ($apa); + while ($x1 > $this->rect->x) { + $aImg->Line($x0, $y0, $x1, $y1); + $aImg->Line($x0_right, $y0, $x1_right, $y1); + $x1 = $middle - $dist; + $x0 = $middle - $dist * $factor; + $x1_right = $middle + $dist; + $x0_right = $middle + $dist * $factor; + $dist += $this->linespacing; + } + + // Endpoint falls on sides + $dist -= $this->linespacing; + $d = $this->rect->w / 2; + $c = $apa - $d * $apa / $dist; + while ($x0 > $this->rect->x) { + $aImg->Line($x0, $y0, $this->rect->x, $this->rect->ye - $c); + $aImg->Line($x0_right, $y0, $this->rect->xe, $this->rect->ye - $c); + $dist += $this->linespacing; + $x0 = $middle - $dist * $factor; + $x1 = $middle - $dist; + $x0_right = $middle + $dist * $factor; + $c = $apa - $d * $apa / $dist; + } + + // Horizontal lines + // They need some serious consideration since they are a function + // of perspective depth (alpha) and density (linespacing) + $x0 = $this->rect->x; + $x1 = $this->rect->xe; + $y = $this->rect->ye; + + // The first line is drawn directly. Makes the loop below slightly + // more readable. + $aImg->Line($x0, $y, $x1, $y); + $hls = $this->linespacing; + + // A correction factor for vertical "brick" line spacing to account for + // a) the difference in number of pixels hor vs vert + // b) visual apperance to make the first layer of "bricks" look more + // square. + $vls = $this->linespacing * 0.6; + + $ds = $hls * ($apa - $vls) / $apa; + // Get the slope for the "perspective line" going from bottom right + // corner to top left corner of the "first" brick. + + // Uncomment the following lines if you want to get a visual understanding + // of what this helpline does. BTW this mimics the way you would get the + // perspective right when drawing on paper. + /* + $x0 = $middle; + $y0 = $this->rect->ye; + $len=floor(($this->rect->ye-$this->rect->y)/$vls); + $x1 = $middle+round($len*$ds); + $y1 = $this->rect->ye-$len*$vls; + $aImg->PushColor("red"); + $aImg->Line($x0,$y0,$x1,$y1); + $aImg->PopColor(); + */ + + $y -= $vls; + $k = ($this->rect->ye - ($this->rect->ye - $vls)) / ($middle - ($middle - $ds)); + $dist = $hls; + while ($y > $this->rect->y) { + $aImg->Line($this->rect->x, $y, $this->rect->xe, $y); + $adj = $k * $dist / (1 + $dist * $k / $apa); + if ($adj < 2) { + $adj = 1; + } + + $y = $this->rect->ye - round($adj); + $dist += $hls; + } + } +} diff --git a/vendor/amenadiel/jpgraph/src/graph/RectPatternCross.php b/vendor/amenadiel/jpgraph/src/graph/RectPatternCross.php new file mode 100644 index 0000000000..c5f54000f2 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/RectPatternCross.php @@ -0,0 +1,43 @@ +vert = new RectPatternVert($aColor, $aWeight); + $this->hor = new RectPatternHor($aColor, $aWeight); + } + + public function SetOrder($aDepth) + { + $this->vert->SetOrder($aDepth); + $this->hor->SetOrder($aDepth); + } + + public function SetPos($aRect) + { + parent::SetPos($aRect); + $this->vert->SetPos($aRect); + $this->hor->SetPos($aRect); + } + + public function SetDensity($aDens) + { + $this->vert->SetDensity($aDens); + $this->hor->SetDensity($aDens); + } + + public function DoPattern($aImg) + { + $this->vert->DoPattern($aImg); + $this->hor->DoPattern($aImg); + } +} diff --git a/vendor/amenadiel/jpgraph/src/graph/RectPatternDiagCross.php b/vendor/amenadiel/jpgraph/src/graph/RectPatternDiagCross.php new file mode 100644 index 0000000000..b544dac61e --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/RectPatternDiagCross.php @@ -0,0 +1,45 @@ +right = new RectPatternRDiag($aColor, $aWeight); + $this->left = new RectPatternLDiag($aColor, $aWeight); + } + + public function SetOrder($aDepth) + { + $this->left->SetOrder($aDepth); + $this->right->SetOrder($aDepth); + } + + public function SetPos($aRect) + { + parent::SetPos($aRect); + $this->left->SetPos($aRect); + $this->right->SetPos($aRect); + } + + public function SetDensity($aDens) + { + $this->left->SetDensity($aDens); + $this->right->SetDensity($aDens); + } + + public function DoPattern($aImg) + { + $this->left->DoPattern($aImg); + $this->right->DoPattern($aImg); + } + +} diff --git a/vendor/amenadiel/jpgraph/src/graph/RectPatternFactory.php b/vendor/amenadiel/jpgraph/src/graph/RectPatternFactory.php new file mode 100644 index 0000000000..d6d90cce9b --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/RectPatternFactory.php @@ -0,0 +1,60 @@ +linespacing = $aLineSpacing; + } + + public function DoPattern($aImg) + { + $x0 = $this->rect->x; + $x1 = $this->rect->xe; + $y = $this->rect->y; + while ($y < $this->rect->ye) { + $aImg->Line($x0, $y, $x1, $y); + $y += $this->linespacing; + } + } +} diff --git a/vendor/amenadiel/jpgraph/src/graph/RectPatternLDiag.php b/vendor/amenadiel/jpgraph/src/graph/RectPatternLDiag.php new file mode 100644 index 0000000000..c3cb83e873 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/RectPatternLDiag.php @@ -0,0 +1,69 @@ +linespacing = $aLineSpacing; + parent::__construct($aColor, $aWeight); + } + + public function DoPattern($aImg) + { + // -------------------- + // |\ \ \ \ \ | + // | \ \ \ \ \| + // | \ \ \ \ | + // |------------------| + $xe = $this->rect->xe; + $ye = $this->rect->ye; + $x0 = $this->rect->x + round($this->linespacing / 2); + $y0 = $this->rect->ye; + $x1 = $this->rect->x; + $y1 = $this->rect->ye - round($this->linespacing / 2); + + while ($x0 <= $xe && $y1 >= $this->rect->y) { + $aImg->Line($x0, $y0, $x1, $y1); + $x0 += $this->linespacing; + $y1 -= $this->linespacing; + } + if ($xe - $x1 > $ye - $this->rect->y) { + // Width larger than height + $x1 = $this->rect->x + ($this->rect->y - $y1); + $y0 = $ye; + $y1 = $this->rect->y; + while ($x0 <= $xe) { + $aImg->Line($x0, $y0, $x1, $y1); + $x0 += $this->linespacing; + $x1 += $this->linespacing; + } + + $y0 = $this->rect->ye - ($x0 - $xe); + $x0 = $xe; + } else { + // Height larger than width + $diff = $x0 - $xe; + $y0 = $ye - $diff; + $x0 = $xe; + while ($y1 >= $this->rect->y) { + $aImg->Line($x0, $y0, $x1, $y1); + $y0 -= $this->linespacing; + $y1 -= $this->linespacing; + } + $diff = $this->rect->y - $y1; + $x1 = $this->rect->x + $diff; + $y1 = $this->rect->y; + } + while ($y0 >= $this->rect->y) { + $aImg->Line($x0, $y0, $x1, $y1); + $y0 -= $this->linespacing; + $x1 += $this->linespacing; + } + } +} diff --git a/vendor/amenadiel/jpgraph/src/graph/RectPatternRDiag.php b/vendor/amenadiel/jpgraph/src/graph/RectPatternRDiag.php new file mode 100644 index 0000000000..f56e48edff --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/RectPatternRDiag.php @@ -0,0 +1,73 @@ +linespacing = $aLineSpacing; + } + + public function DoPattern($aImg) + { + // -------------------- + // | / / / / /| + // |/ / / / / | + // | / / / / | + // -------------------- + $xe = $this->rect->xe; + $ye = $this->rect->ye; + $x0 = $this->rect->x + round($this->linespacing / 2); + $y0 = $this->rect->y; + $x1 = $this->rect->x; + $y1 = $this->rect->y + round($this->linespacing / 2); + + while ($x0 <= $xe && $y1 <= $ye) { + $aImg->Line($x0, $y0, $x1, $y1); + $x0 += $this->linespacing; + $y1 += $this->linespacing; + } + + if ($xe - $x1 > $ye - $y0) { + // Width larger than height + $x1 = $this->rect->x + ($y1 - $ye); + $y1 = $ye; + $y0 = $this->rect->y; + while ($x0 <= $xe) { + $aImg->Line($x0, $y0, $x1, $y1); + $x0 += $this->linespacing; + $x1 += $this->linespacing; + } + + $y0 = $this->rect->y + ($x0 - $xe); + $x0 = $xe; + } else { + // Height larger than width + $diff = $x0 - $xe; + $y0 = $diff + $this->rect->y; + $x0 = $xe; + $x1 = $this->rect->x; + while ($y1 <= $ye) { + $aImg->Line($x0, $y0, $x1, $y1); + $y1 += $this->linespacing; + $y0 += $this->linespacing; + } + + $diff = $y1 - $ye; + $y1 = $ye; + $x1 = $diff + $this->rect->x; + } + + while ($y0 <= $ye) { + $aImg->Line($x0, $y0, $x1, $y1); + $y0 += $this->linespacing; + $x1 += $this->linespacing; + } + } +} diff --git a/vendor/amenadiel/jpgraph/src/graph/RectPatternSolid.php b/vendor/amenadiel/jpgraph/src/graph/RectPatternSolid.php new file mode 100644 index 0000000000..cc0d027fdf --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/RectPatternSolid.php @@ -0,0 +1,22 @@ +SetColor($this->color); + $aImg->FilledRectangle($this->rect->x, $this->rect->y, + $this->rect->xe, $this->rect->ye); + } +} diff --git a/vendor/amenadiel/jpgraph/src/graph/RectPatternVert.php b/vendor/amenadiel/jpgraph/src/graph/RectPatternVert.php new file mode 100644 index 0000000000..268c2c2b85 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/RectPatternVert.php @@ -0,0 +1,30 @@ +linespacing = $aLineSpacing; + } + + //-------------------- + // Private methods + // + public function DoPattern($aImg) + { + $x = $this->rect->x; + $y0 = $this->rect->y; + $y1 = $this->rect->ye; + while ($x < $this->rect->xe) { + $aImg->Line($x, $y0, $x, $y1); + $x += $this->linespacing; + } + } +} diff --git a/vendor/amenadiel/jpgraph/src/graph/Rectangle.php b/vendor/amenadiel/jpgraph/src/graph/Rectangle.php new file mode 100644 index 0000000000..247a42e594 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/Rectangle.php @@ -0,0 +1,17 @@ +x = $aX; + $this->y = $aY; + $this->w = $aWidth; + $this->h = $aHeight; + $this->xe = $aX + $aWidth - 1; + $this->ye = $aY + $aHeight - 1; + } +} diff --git a/vendor/amenadiel/jpgraph/src/graph/Shape.php b/vendor/amenadiel/jpgraph/src/graph/Shape.php new file mode 100644 index 0000000000..d02eaa1fbc --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/Shape.php @@ -0,0 +1,353 @@ +img = $aGraph->img; + $this->img->SetColor('black'); + $this->scale = $scale; + } + + public function SetColor($aColor) + { + $this->img->SetColor($aColor); + } + + public function Line($x1, $y1, $x2, $y2) + { + list($x1, $y1) = $this->scale->Translate($x1, $y1); + list($x2, $y2) = $this->scale->Translate($x2, $y2); + $this->img->Line($x1, $y1, $x2, $y2); + } + + public function SetLineWeight($aWeight) + { + $this->img->SetLineWeight($aWeight); + } + + public function Polygon($p, $aClosed = false) + { + $n = count($p); + for ($i = 0; $i < $n; $i += 2) { + $p[$i] = $this->scale->TranslateX($p[$i]); + $p[$i + 1] = $this->scale->TranslateY($p[$i + 1]); + } + $this->img->Polygon($p, $aClosed); + } + + public function FilledPolygon($p) + { + $n = count($p); + for ($i = 0; $i < $n; $i += 2) { + $p[$i] = $this->scale->TranslateX($p[$i]); + $p[$i + 1] = $this->scale->TranslateY($p[$i + 1]); + } + $this->img->FilledPolygon($p); + } + + // Draw a bezier curve with defining points in the $aPnts array + // using $aSteps steps. + // 0=x0, 1=y0 + // 2=x1, 3=y1 + // 4=x2, 5=y2 + // 6=x3, 7=y3 + public function Bezier($p, $aSteps = 40) + { + $x0 = $p[0]; + $y0 = $p[1]; + // Calculate coefficients + $cx = 3 * ($p[2] - $p[0]); + $bx = 3 * ($p[4] - $p[2]) - $cx; + $ax = $p[6] - $p[0] - $cx - $bx; + $cy = 3 * ($p[3] - $p[1]); + $by = 3 * ($p[5] - $p[3]) - $cy; + $ay = $p[7] - $p[1] - $cy - $by; + + // Step size + $delta = 1.0 / $aSteps; + + $x_old = $x0; + $y_old = $y0; + for ($t = $delta; $t <= 1.0; $t += $delta) { + $tt = $t * $t; + $ttt = $tt * $t; + $x = $ax * $ttt + $bx * $tt + $cx * $t + $x0; + $y = $ay * $ttt + $by * $tt + $cy * $t + $y0; + $this->Line($x_old, $y_old, $x, $y); + $x_old = $x; + $y_old = $y; + } + $this->Line($x_old, $y_old, $p[6], $p[7]); + } + + public function Rectangle($x1, $y1, $x2, $y2) + { + list($x1, $y1) = $this->scale->Translate($x1, $y1); + list($x2, $y2) = $this->scale->Translate($x2, $y2); + $this->img->Rectangle($x1, $y1, $x2, $y2); + } + + public function FilledRectangle($x1, $y1, $x2, $y2) + { + list($x1, $y1) = $this->scale->Translate($x1, $y1); + list($x2, $y2) = $this->scale->Translate($x2, $y2); + $this->img->FilledRectangle($x1, $y1, $x2, $y2); + } + + public function Circle($x1, $y1, $r) + { + list($x1, $y1) = $this->scale->Translate($x1, $y1); + if ($r >= 0) { + $r = $this->scale->TranslateX($r); + } else { + $r = -$r; + } + + $this->img->Circle($x1, $y1, $r); + } + + public function FilledCircle($x1, $y1, $r) + { + list($x1, $y1) = $this->scale->Translate($x1, $y1); + if ($r >= 0) { + $r = $this->scale->TranslateX($r); + } else { + $r = -$r; + } + + $this->img->FilledCircle($x1, $y1, $r); + } + + public function RoundedRectangle($x1, $y1, $x2, $y2, $r = null) + { + list($x1, $y1) = $this->scale->Translate($x1, $y1); + list($x2, $y2) = $this->scale->Translate($x2, $y2); + + if ($r == null) { + $r = 5; + } elseif ($r >= 0) { + $r = $this->scale->TranslateX($r); + } else { + $r = -$r; + } + + $this->img->RoundedRectangle($x1, $y1, $x2, $y2, $r); + } + + public function FilledRoundedRectangle($x1, $y1, $x2, $y2, $r = null) + { + list($x1, $y1) = $this->scale->Translate($x1, $y1); + list($x2, $y2) = $this->scale->Translate($x2, $y2); + + if ($r == null) { + $r = 5; + } elseif ($r > 0) { + $r = $this->scale->TranslateX($r); + } else { + $r = -$r; + } + + $this->img->FilledRoundedRectangle($x1, $y1, $x2, $y2, $r); + } + + public function ShadowRectangle($x1, $y1, $x2, $y2, $fcolor = false, $shadow_width = null, $shadow_color = array(102, 102, 102)) + { + list($x1, $y1) = $this->scale->Translate($x1, $y1); + list($x2, $y2) = $this->scale->Translate($x2, $y2); + if ($shadow_width == null) { + $shadow_width = 4; + } else { + $shadow_width = $this->scale->TranslateX($shadow_width); + } + + $this->img->ShadowRectangle($x1, $y1, $x2, $y2, $fcolor, $shadow_width, $shadow_color); + } + + public function SetTextAlign($halign, $valign = "bottom") + { + $this->img->SetTextAlign($halign, $valign = "bottom"); + } + + public function StrokeText($x1, $y1, $txt, $dir = 0, $paragraph_align = "left") + { + list($x1, $y1) = $this->scale->Translate($x1, $y1); + $this->img->StrokeText($x1, $y1, $txt, $dir, $paragraph_align); + } + + // A rounded rectangle where one of the corner has been moved "into" the + // rectangle 'iw' width and 'ih' height. Corners: + // 0=Top left, 1=top right, 2=bottom right, 3=bottom left + public function IndentedRectangle($xt, $yt, $w, $h, $iw = 0, $ih = 0, $aCorner = 3, $aFillColor = "", $r = 4) + { + + list($xt, $yt) = $this->scale->Translate($xt, $yt); + list($w, $h) = $this->scale->Translate($w, $h); + list($iw, $ih) = $this->scale->Translate($iw, $ih); + + $xr = $xt + $w - 0; + $yl = $yt + $h - 0; + + switch ($aCorner) { + case 0: // Upper left + + // Bottom line, left & right arc + $this->img->Line($xt + $r, $yl, $xr - $r, $yl); + $this->img->Arc($xt + $r, $yl - $r, $r * 2, $r * 2, 90, 180); + $this->img->Arc($xr - $r, $yl - $r, $r * 2, $r * 2, 0, 90); + + // Right line, Top right arc + $this->img->Line($xr, $yt + $r, $xr, $yl - $r); + $this->img->Arc($xr - $r, $yt + $r, $r * 2, $r * 2, 270, 360); + + // Top line, Top left arc + $this->img->Line($xt + $iw + $r, $yt, $xr - $r, $yt); + $this->img->Arc($xt + $iw + $r, $yt + $r, $r * 2, $r * 2, 180, 270); + + // Left line + $this->img->Line($xt, $yt + $ih + $r, $xt, $yl - $r); + + // Indent horizontal, Lower left arc + $this->img->Line($xt + $r, $yt + $ih, $xt + $iw - $r, $yt + $ih); + $this->img->Arc($xt + $r, $yt + $ih + $r, $r * 2, $r * 2, 180, 270); + + // Indent vertical, Indent arc + $this->img->Line($xt + $iw, $yt + $r, $xt + $iw, $yt + $ih - $r); + $this->img->Arc($xt + $iw - $r, $yt + $ih - $r, $r * 2, $r * 2, 0, 90); + + if ($aFillColor != '') { + $bc = $this->img->current_color_name; + $this->img->PushColor($aFillColor); + $this->img->FillToBorder($xr - $r, $yl - $r, $bc); + $this->img->PopColor(); + } + + break; + + case 1: // Upper right + + // Bottom line, left & right arc + $this->img->Line($xt + $r, $yl, $xr - $r, $yl); + $this->img->Arc($xt + $r, $yl - $r, $r * 2, $r * 2, 90, 180); + $this->img->Arc($xr - $r, $yl - $r, $r * 2, $r * 2, 0, 90); + + // Left line, Top left arc + $this->img->Line($xt, $yt + $r, $xt, $yl - $r); + $this->img->Arc($xt + $r, $yt + $r, $r * 2, $r * 2, 180, 270); + + // Top line, Top right arc + $this->img->Line($xt + $r, $yt, $xr - $iw - $r, $yt); + $this->img->Arc($xr - $iw - $r, $yt + $r, $r * 2, $r * 2, 270, 360); + + // Right line + $this->img->Line($xr, $yt + $ih + $r, $xr, $yl - $r); + + // Indent horizontal, Lower right arc + $this->img->Line($xr - $iw + $r, $yt + $ih, $xr - $r, $yt + $ih); + $this->img->Arc($xr - $r, $yt + $ih + $r, $r * 2, $r * 2, 270, 360); + + // Indent vertical, Indent arc + $this->img->Line($xr - $iw, $yt + $r, $xr - $iw, $yt + $ih - $r); + $this->img->Arc($xr - $iw + $r, $yt + $ih - $r, $r * 2, $r * 2, 90, 180); + + if ($aFillColor != '') { + $bc = $this->img->current_color_name; + $this->img->PushColor($aFillColor); + $this->img->FillToBorder($xt + $r, $yl - $r, $bc); + $this->img->PopColor(); + } + + break; + + case 2: // Lower right + // Top line, Top left & Top right arc + $this->img->Line($xt + $r, $yt, $xr - $r, $yt); + $this->img->Arc($xt + $r, $yt + $r, $r * 2, $r * 2, 180, 270); + $this->img->Arc($xr - $r, $yt + $r, $r * 2, $r * 2, 270, 360); + + // Left line, Bottom left arc + $this->img->Line($xt, $yt + $r, $xt, $yl - $r); + $this->img->Arc($xt + $r, $yl - $r, $r * 2, $r * 2, 90, 180); + + // Bottom line, Bottom right arc + $this->img->Line($xt + $r, $yl, $xr - $iw - $r, $yl); + $this->img->Arc($xr - $iw - $r, $yl - $r, $r * 2, $r * 2, 0, 90); + + // Right line + $this->img->Line($xr, $yt + $r, $xr, $yl - $ih - $r); + + // Indent horizontal, Lower right arc + $this->img->Line($xr - $r, $yl - $ih, $xr - $iw + $r, $yl - $ih); + $this->img->Arc($xr - $r, $yl - $ih - $r, $r * 2, $r * 2, 0, 90); + + // Indent vertical, Indent arc + $this->img->Line($xr - $iw, $yl - $r, $xr - $iw, $yl - $ih + $r); + $this->img->Arc($xr - $iw + $r, $yl - $ih + $r, $r * 2, $r * 2, 180, 270); + + if ($aFillColor != '') { + $bc = $this->img->current_color_name; + $this->img->PushColor($aFillColor); + $this->img->FillToBorder($xt + $r, $yt + $r, $bc); + $this->img->PopColor(); + } + + break; + + case 3: // Lower left + // Top line, Top left & Top right arc + $this->img->Line($xt + $r, $yt, $xr - $r, $yt); + $this->img->Arc($xt + $r, $yt + $r, $r * 2, $r * 2, 180, 270); + $this->img->Arc($xr - $r, $yt + $r, $r * 2, $r * 2, 270, 360); + + // Right line, Bottom right arc + $this->img->Line($xr, $yt + $r, $xr, $yl - $r); + $this->img->Arc($xr - $r, $yl - $r, $r * 2, $r * 2, 0, 90); + + // Bottom line, Bottom left arc + $this->img->Line($xt + $iw + $r, $yl, $xr - $r, $yl); + $this->img->Arc($xt + $iw + $r, $yl - $r, $r * 2, $r * 2, 90, 180); + + // Left line + $this->img->Line($xt, $yt + $r, $xt, $yl - $ih - $r); + + // Indent horizontal, Lower left arc + $this->img->Line($xt + $r, $yl - $ih, $xt + $iw - $r, $yl - $ih); + $this->img->Arc($xt + $r, $yl - $ih - $r, $r * 2, $r * 2, 90, 180); + + // Indent vertical, Indent arc + $this->img->Line($xt + $iw, $yl - $ih + $r, $xt + $iw, $yl - $r); + $this->img->Arc($xt + $iw - $r, $yl - $ih + $r, $r * 2, $r * 2, 270, 360); + + if ($aFillColor != '') { + $bc = $this->img->current_color_name; + $this->img->PushColor($aFillColor); + $this->img->FillToBorder($xr - $r, $yt + $r, $bc); + $this->img->PopColor(); + } + + break; + } + } +} diff --git a/vendor/amenadiel/jpgraph/src/graph/SymChar.php b/vendor/amenadiel/jpgraph/src/graph/SymChar.php new file mode 100644 index 0000000000..a92b57f904 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/SymChar.php @@ -0,0 +1,85 @@ +scale = $aScale; + $this->precision = -1; + } + + // Set format string for automatic labels + public function SetLabelFormat($aFormatString, $aDate = false) + { + $this->label_formatstr = $aFormatString; + $this->label_usedateformat = $aDate; + } + + public function SetLabelDateFormat($aFormatString) + { + $this->label_dateformatstr = $aFormatString; + } + + public function SetFormatCallback($aCallbackFuncName) + { + $this->label_formfunc = $aCallbackFuncName; + } + + // Don't display the first zero label + public function SupressZeroLabel($aFlag = true) + { + $this->supress_zerolabel = $aFlag; + } + + // Don't display minor tick marks + public function SupressMinorTickMarks($aHide = true) + { + $this->supress_minor_tickmarks = $aHide; + } + + // Don't display major tick marks + public function SupressTickMarks($aHide = true) + { + $this->supress_tickmarks = $aHide; + } + + // Hide the first tick mark + public function SupressFirst($aHide = true) + { + $this->supress_first = $aHide; + } + + // Hide the last tick mark + public function SupressLast($aHide = true) + { + $this->supress_last = $aHide; + } + + // Size (in pixels) of minor tick marks + public function GetMinTickAbsSize() + { + return $this->minor_abs_size; + } + + // Size (in pixels) of major tick marks + public function GetMajTickAbsSize() + { + return $this->major_abs_size; + } + + public function SetSize($aMajSize, $aMinSize = 3) + { + $this->major_abs_size = $aMajSize; + $this->minor_abs_size = $aMinSize; + } + + // Have the ticks been specified + public function IsSpecified() + { + return $this->is_set; + } + + public function SetSide($aSide) + { + $this->direction = $aSide; + } + + // Which side of the axis should the ticks be on + public function SetDirection($aSide = SIDE_RIGHT) + { + $this->direction = $aSide; + } + + // Set colors for major and minor tick marks + public function SetMarkColor($aMajorColor, $aMinorColor = '') + { + $this->SetColor($aMajorColor, $aMinorColor); + } + + public function SetColor($aMajorColor, $aMinorColor = '') + { + $this->majcolor = $aMajorColor; + + // If not specified use same as major + if ($aMinorColor == '') { + $this->mincolor = $aMajorColor; + } else { + $this->mincolor = $aMinorColor; + } + } + + public function SetWeight($aWeight) + { + $this->weight = $aWeight; + } + +} // Class diff --git a/vendor/amenadiel/jpgraph/src/graph/WindroseGraph.php b/vendor/amenadiel/jpgraph/src/graph/WindroseGraph.php new file mode 100644 index 0000000000..6bc6e6ff09 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/WindroseGraph.php @@ -0,0 +1,128 @@ +posx = $width / 2; + $this->posy = $height / 2; + $this->SetColor('white'); + $this->title->SetFont(FF_VERDANA, FS_NORMAL, 12); + $this->title->SetMargin(8); + $this->subtitle->SetFont(FF_VERDANA, FS_NORMAL, 10); + $this->subtitle->SetMargin(0); + $this->subsubtitle->SetFont(FF_VERDANA, FS_NORMAL, 8); + $this->subsubtitle->SetMargin(0); + } + + public function StrokeTexts() + { + if ($this->texts != null) { + $n = count($this->texts); + for ($i = 0; $i < $n; ++$i) { + $this->texts[$i]->Stroke($this->img); + } + } + } + + public function StrokeIcons() + { + if ($this->iIcons != null) { + $n = count($this->iIcons); + for ($i = 0; $i < $n; ++$i) { + // Since Windrose graphs doesn't have any linear scale the position of + // each icon has to be given as absolute coordinates + $this->iIcons[$i]->_Stroke($this->img); + } + } + } + + //--------------- + // PUBLIC METHODS + public function Add($aObj) + { + if (is_array($aObj) && count($aObj) > 0) { + $cl = $aObj[0]; + } else { + $cl = $aObj; + } + if ($cl instanceof Text) { + $this->AddText($aObj); + } elseif ($cl instanceof IconPlot) { + $this->AddIcon($aObj); + } elseif (($cl instanceof WindrosePlot) || ($cl instanceof LayoutRect) || ($cl instanceof LayoutHor)) { + $this->plots[] = $aObj; + } else { + Util\JpGraphError::RaiseL(22021); + } + } + + public function AddText($aTxt, $aToY2 = false) + { + parent::AddText($aTxt); + } + + public function SetColor($c) + { + $this->SetMarginColor($c); + } + + // Method description + public function Stroke($aStrokeFileName = "") + { + + // If the filename is the predefined value = '_csim_special_' + // we assume that the call to stroke only needs to do enough + // to correctly generate the CSIM maps. + // We use this variable to skip things we don't strictly need + // to do to generate the image map to improve performance + // as best we can. Therefore you will see a lot of tests !$_csim in the + // code below. + $_csim = ($aStrokeFileName === _CSIM_SPECIALFILE); + + // We need to know if we have stroked the plot in the + // GetCSIMareas. Otherwise the CSIM hasn't been generated + // and in the case of GetCSIM called before stroke to generate + // CSIM without storing an image to disk GetCSIM must call Stroke. + $this->iHasStroked = true; + + if ($this->background_image != "" || $this->background_cflag != "") { + $this->StrokeFrameBackground(); + } else { + $this->StrokeFrame(); + } + + // n holds number of plots + $n = count($this->plots); + for ($i = 0; $i < $n; ++$i) { + $this->plots[$i]->Stroke($this); + } + + $this->footer->Stroke($this->img); + $this->StrokeIcons(); + $this->StrokeTexts(); + $this->StrokeTitles(); + + // If the filename is given as the special "__handle" + // then the image handler is returned and the image is NOT + // streamed back + if ($aStrokeFileName == _IMG_HANDLER) { + return $this->img->img; + } else { + // Finally stream the generated picture + $this->cache->PutAndStream($this->img, $this->cache_name, $this->inline, + $aStrokeFileName); + } + } + +} // Class diff --git a/vendor/amenadiel/jpgraph/src/graph/WindrosePlotScale.php b/vendor/amenadiel/jpgraph/src/graph/WindrosePlotScale.php new file mode 100644 index 0000000000..0f02b1c144 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/graph/WindrosePlotScale.php @@ -0,0 +1,251 @@ +iZeroSum = 0; + foreach ($aData as $idx => $legdata) { + $legsum = array_sum($legdata); + $maxnum = max($maxnum, count($legdata) - 1); + $max = max($legsum - $legdata[0], $max); + $totlegsum += $legsum; + $this->iZeroSum += $legdata[0]; + } + if (round($totlegsum) > 100) { + Util\JpGraphError::RaiseL(22001, $legsum); + //("Total percentage for all windrose legs in a windrose plot can not exceed 100% !\n(Current max is: ".$legsum.')'); + } + $this->iMax = $max; + $this->iMaxNum = $maxnum; + $this->iNumCirc = $this->GetNumCirc(); + $this->iMaxVal = $this->iNumCirc * $this->iDelta; + } + + // Return number of grid circles + public function GetNumCirc() + { + // Never return less than 1 circles + $num = ceil($this->iMax / $this->iDelta); + return max(1, $num); + } + + public function SetMaxValue($aMax) + { + $this->iMax = $aMax; + $this->iNumCirc = $this->GetNumCirc(); + $this->iMaxVal = $this->iNumCirc * $this->iDelta; + } + + // Set step size for circular grid + public function Set($aMax, $aDelta = null) + { + if ($aDelta == null) { + $this->SetMaxValue($aMax); + return; + } + $this->iDelta = $aDelta; + $this->iNumCirc = ceil($aMax / $aDelta); //$this->GetNumCirc(); + $this->iMaxVal = $this->iNumCirc * $this->iDelta; + $this->iMax = $aMax; + // Remember that user has specified interval so don't + // do autoscaling + $this->iManualScale = true; + } + + public function AutoScale($aRadius, $aMinDist = 30) + { + + if ($this->iManualScale) { + return; + } + + // Make sure distance (in pixels) between two circles + // is never less than $aMinDist pixels + $tst = ceil($aRadius / $this->iNumCirc); + + while ($tst <= $aMinDist && $this->iDelta < 100) { + $this->iDelta += 5; + $tst = ceil($aRadius / $this->GetNumCirc()); + } + + if ($this->iDelta >= 100) { + Util\JpGraphError::RaiseL(22002); //('Graph is too small to have a scale. Please make the graph larger.'); + } + + // If the distance is to large try with multiples of 2 instead + if ($tst > $aMinDist * 3) { + $this->iDelta = 2; + $tst = ceil($aRadius / $this->iNumCirc); + + while ($tst <= $aMinDist && $this->iDelta < 100) { + $this->iDelta += 2; + $tst = ceil($aRadius / $this->GetNumCirc()); + } + + if ($this->iDelta >= 100) { + Util\JpGraphError::RaiseL(22002); //('Graph is too small to have a scale. Please make the graph larger.'); + } + } + + $this->iNumCirc = $this->GetNumCirc(); + $this->iMaxVal = $this->iNumCirc * $this->iDelta; + } + + // Return max of all leg values + public function GetMax() + { + return $this->iMax; + } + + public function Hide($aFlg = true) + { + $this->iHideLabels = $aFlg; + } + + public function SetAngle($aAngle) + { + $this->iAngle = $aAngle; + } + + // Translate a Leg value to radius distance + public function RelTranslate($aVal, $r, $ri) + { + $tv = round($aVal / $this->iMaxVal * ($r - $ri)); + return $tv; + } + + public function SetLabelAlign($aAlign) + { + $this->iLblAlign = $aAlign; + } + + public function SetLabelFormat($aFmt) + { + $this->iLblFmt = $aFmt; + } + + public function SetLabelFillColor($aBkgColor, $aBorderColor = false) + { + + $this->iFontBkgColor = $aBkgColor; + if ($aBorderColor === false) { + $this->iFontFrameColor = $aBkgColor; + } else { + $this->iFontFrameColor = $aBorderColor; + } + } + + public function SetFontColor($aColor) + { + $this->iFontColor = $aColor; + $this->iZFontColor = $aColor; + } + + public function SetFont($aFontFamily, $aFontStyle = FS_NORMAL, $aFontSize = 10) + { + $this->iFontFamily = $aFontFamily; + $this->iFontStyle = $aFontStyle; + $this->iFontSize = $aFontSize; + $this->SetZFont($aFontFamily, $aFontStyle, $aFontSize); + } + + public function SetZFont($aFontFamily, $aFontStyle = FS_NORMAL, $aFontSize = 10) + { + $this->iZFontFamily = $aFontFamily; + $this->iZFontStyle = $aFontStyle; + $this->iZFontSize = $aFontSize; + } + + public function SetZeroLabel($aTxt) + { + $this->iLblZeroTxt = $aTxt; + } + + public function SetZFontColor($aColor) + { + $this->iZFontColor = $aColor; + } + + public function StrokeLabels($aImg, $xc, $yc, $ri, $rr) + { + + if ($this->iHideLabels) { + return; + } + + // Setup some convinient vairables + $a = $this->iAngle * M_PI / 180.0; + $n = $this->iNumCirc; + $d = $this->iDelta; + + // Setup the font and font color + $val = new Text(); + $val->SetFont($this->iFontFamily, $this->iFontStyle, $this->iFontSize); + $val->SetColor($this->iFontColor); + + if ($this->iFontBkgColor !== false) { + $val->SetBox($this->iFontBkgColor, $this->iFontFrameColor); + } + + // Position the labels relative to the radiant circles + if ($this->iLblAlign == LBLALIGN_TOP) { + if ($a > 0 && $a <= M_PI / 2) { + $val->SetAlign('left', 'bottom'); + } elseif ($a > M_PI / 2 && $a <= M_PI) { + $val->SetAlign('right', 'bottom'); + } + } elseif ($this->iLblAlign == LBLALIGN_CENTER) { + $val->SetAlign('center', 'center'); + } + + // Stroke the labels close to each circle + $v = $d; + $si = sin($a); + $co = cos($a); + for ($i = 0; $i < $n; ++$i, $v += $d) { + $r = $ri + ($i + 1) * $rr; + $x = $xc + $co * $r; + $y = $yc - $si * $r; + $val->Set(sprintf($this->iLblFmt, $v)); + $val->Stroke($aImg, $x, $y); + } + + // Print the text in the zero circle + if ($this->iLblZeroTxt === null) { + $this->iLblZeroTxt = sprintf($this->iLblFmt, $this->iZeroSum); + } else { + $this->iLblZeroTxt = sprintf($this->iLblZeroTxt, $this->iZeroSum); + } + + $val->Set($this->iLblZeroTxt); + $val->SetAlign('center', 'center'); + $val->SetParagraphAlign('center'); + $val->SetColor($this->iZFontColor); + $val->SetFont($this->iZFontFamily, $this->iZFontStyle, $this->iZFontSize); + $val->Stroke($aImg, $xc, $yc); + } +} diff --git a/vendor/amenadiel/jpgraph/src/image/DigitalLED74.php b/vendor/amenadiel/jpgraph/src/image/DigitalLED74.php new file mode 100644 index 0000000000..96a58afcec --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/image/DigitalLED74.php @@ -0,0 +1,314 @@ + array('red', 'darkred:0.9', 'red:0.3'), // 0 + LEDC_GREEN => array('green', 'darkgreen', 'green:0.3'), // 1 + LEDC_BLUE => array('lightblue:0.9', 'darkblue:0.85', 'darkblue:0.7'), // 2 + LEDC_YELLOW => array('yellow', 'yellow:0.4', 'yellow:0.3'), // 3 + LEDC_GRAY => array('gray:1.4', 'darkgray:0.85', 'darkgray:0.7'), + LEDC_CHOCOLATE => array('chocolate', 'chocolate:0.7', 'chocolate:0.5'), + LEDC_PERU => array('peru:0.95', 'peru:0.6', 'peru:0.5'), + LEDC_GOLDENROD => array('goldenrod', 'goldenrod:0.6', 'goldenrod:0.5'), + LEDC_KHAKI => array('khaki:0.7', 'khaki:0.4', 'khaki:0.3'), + LEDC_OLIVE => array('#808000', '#808000:0.7', '#808000:0.6'), + LEDC_LIMEGREEN => array('limegreen:0.9', 'limegreen:0.5', 'limegreen:0.4'), + LEDC_FORESTGREEN => array('forestgreen', 'forestgreen:0.7', 'forestgreen:0.5'), + LEDC_TEAL => array('teal', 'teal:0.7', 'teal:0.5'), + LEDC_STEELBLUE => array('steelblue', 'steelblue:0.65', 'steelblue:0.5'), + LEDC_NAVY => array('navy:1.3', 'navy:0.95', 'navy:0.8'), //14 + LEDC_INVERTGRAY => array('darkgray', 'lightgray:1.5', 'white'), //15 + ), + + /* Each line of the character is encoded as a 4 bit value + 0 ____ + 1 ___x + 2 __x_ + 3 __xx + 4 _x__ + 5 _x_x + 6 _xx_ + 7 _xxx + 8 x___ + 9 x__x + 10 x_x_ + 11 x_xx + 12 xx__ + 13 xx_x + 14 xxx_ + 15 xxxx + */ + + $iLEDSpec = array( + 0 => array(6, 9, 11, 15, 13, 9, 6), + 1 => array(2, 6, 10, 2, 2, 2, 2), + 2 => array(6, 9, 1, 2, 4, 8, 15), + 3 => array(6, 9, 1, 6, 1, 9, 6), + 4 => array(1, 3, 5, 9, 15, 1, 1), + 5 => array(15, 8, 8, 14, 1, 9, 6), + 6 => array(6, 8, 8, 14, 9, 9, 6), + 7 => array(15, 1, 1, 2, 4, 4, 4), + 8 => array(6, 9, 9, 6, 9, 9, 6), + 9 => array(6, 9, 9, 7, 1, 1, 6), + '!' => array(4, 4, 4, 4, 4, 0, 4), + '?' => array(6, 9, 1, 2, 2, 0, 2), + '#' => array(0, 9, 15, 9, 15, 9, 0), + '@' => array(6, 9, 11, 11, 10, 9, 6), + '-' => array(0, 0, 0, 15, 0, 0, 0), + '_' => array(0, 0, 0, 0, 0, 0, 15), + '=' => array(0, 0, 15, 0, 15, 0, 0), + '+' => array(0, 0, 4, 14, 4, 0, 0), + '|' => array(4, 4, 4, 4, 4, 4, 4), //vertical line, used for simulate rus 'Ы' + ',' => array(0, 0, 0, 0, 0, 12, 4), + '.' => array(0, 0, 0, 0, 0, 12, 12), + ':' => array(12, 12, 0, 0, 0, 12, 12), + ';' => array(12, 12, 0, 0, 0, 12, 4), + '[' => array(3, 2, 2, 2, 2, 2, 3), + ']' => array(12, 4, 4, 4, 4, 4, 12), + '(' => array(1, 2, 2, 2, 2, 2, 1), + ')' => array(8, 4, 4, 4, 4, 4, 8), + '{' => array(3, 2, 2, 6, 2, 2, 3), + '}' => array(12, 4, 4, 6, 4, 4, 12), + '<' => array(1, 2, 4, 8, 4, 2, 1), + '>' => array(8, 4, 2, 1, 2, 4, 8), + '*' => array(9, 6, 15, 6, 9, 0, 0), + '"' => array(10, 10, 0, 0, 0, 0, 0), + '\'' => array(4, 4, 0, 0, 0, 0, 0), + '`' => array(4, 2, 0, 0, 0, 0, 0), + '~' => array(13, 11, 0, 0, 0, 0, 0), + '^' => array(4, 10, 0, 0, 0, 0, 0), + '\\' => array(8, 8, 4, 6, 2, 1, 1), + '/' => array(1, 1, 2, 6, 4, 8, 8), + '%' => array(1, 9, 2, 6, 4, 9, 8), + '&' => array(0, 4, 10, 4, 11, 10, 5), + '$' => array(2, 7, 8, 6, 1, 14, 4), + ' ' => array(0, 0, 0, 0, 0, 0, 0), + '•' => array(0, 0, 6, 6, 0, 0, 0), //149 + '°' => array(14, 10, 14, 0, 0, 0, 0), //176 + '†' => array(4, 4, 14, 4, 4, 4, 4), //134 + '‡' => array(4, 4, 14, 4, 14, 4, 4), //135 + '±' => array(0, 4, 14, 4, 0, 14, 0), //177 + '‰' => array(0, 4, 2, 15, 2, 4, 0), //137 show right arrow + 'â„¢' => array(0, 2, 4, 15, 4, 2, 0), //156 show left arrow + 'ÐŽ' => array(0, 0, 8, 8, 0, 0, 0), //159 show small hi-stick - that need for simulate rus 'Ф' + "\t" => array(8, 8, 8, 0, 0, 0, 0), //show hi-stick - that need for simulate rus 'У' + "\r" => array(8, 8, 8, 8, 8, 8, 8), //vertical line - that need for simulate 'M', 'W' and rus 'Ðœ','Ш' ,'Щ' + "\n" => array(15, 15, 15, 15, 15, 15, 15), //fill up - that need for simulate rus 'Ж' + "Ò" => array(10, 5, 10, 5, 10, 5, 10), //chess + "µ" => array(15, 0, 15, 0, 15, 0, 15), //4 horizontal lines + // latin + 'A' => array(6, 9, 9, 15, 9, 9, 9), + 'B' => array(14, 9, 9, 14, 9, 9, 14), + 'C' => array(6, 9, 8, 8, 8, 9, 6), + 'D' => array(14, 9, 9, 9, 9, 9, 14), + 'E' => array(15, 8, 8, 14, 8, 8, 15), + 'F' => array(15, 8, 8, 14, 8, 8, 8), + 'G' => array(6, 9, 8, 8, 11, 9, 6), + 'H' => array(9, 9, 9, 15, 9, 9, 9), + 'I' => array(14, 4, 4, 4, 4, 4, 14), + 'J' => array(15, 1, 1, 1, 1, 9, 6), + 'K' => array(8, 9, 10, 12, 12, 10, 9), + 'L' => array(8, 8, 8, 8, 8, 8, 15), + 'M' => array(8, 13, 10, 8, 8, 8, 8), // need to add \r + 'N' => array(9, 9, 13, 11, 9, 9, 9), + 'O' => array(6, 9, 9, 9, 9, 9, 6), + 'P' => array(14, 9, 9, 14, 8, 8, 8), + 'Q' => array(6, 9, 9, 9, 13, 11, 6), + 'R' => array(14, 9, 9, 14, 12, 10, 9), + 'S' => array(6, 9, 8, 6, 1, 9, 6), + 'T' => array(14, 4, 4, 4, 4, 4, 4), + 'U' => array(9, 9, 9, 9, 9, 9, 6), + 'V' => array(0, 0, 0, 10, 10, 10, 4), + 'W' => array(8, 8, 8, 8, 10, 13, 8), // need to add \r + 'X' => array(9, 9, 6, 6, 6, 9, 9), + 'Y' => array(10, 10, 10, 10, 4, 4, 4), + 'Z' => array(15, 1, 2, 6, 4, 8, 15), + // russian utf-8 + 'Ð' => array(6, 9, 9, 15, 9, 9, 9), + 'Б' => array(14, 8, 8, 14, 9, 9, 14), + 'Ð’' => array(14, 9, 9, 14, 9, 9, 14), + 'Г' => array(15, 8, 8, 8, 8, 8, 8), + 'Д' => array(14, 9, 9, 9, 9, 9, 14), + 'Е' => array(15, 8, 8, 14, 8, 8, 15), + 'Ð' => array(6, 15, 8, 14, 8, 8, 15), + //Ж is combine: >\n< + 'З' => array(6, 9, 1, 2, 1, 9, 6), + 'И' => array(9, 9, 9, 11, 13, 9, 9), + 'Й' => array(13, 9, 9, 11, 13, 9, 9), + 'К' => array(9, 10, 12, 10, 9, 9, 9), + 'Л' => array(7, 9, 9, 9, 9, 9, 9), + 'Ðœ' => array(8, 13, 10, 8, 8, 8, 8), // need to add \r + 'Ð' => array(9, 9, 9, 15, 9, 9, 9), + 'О' => array(6, 9, 9, 9, 9, 9, 6), + 'П' => array(15, 9, 9, 9, 9, 9, 9), + 'Р' => array(14, 9, 9, 14, 8, 8, 8), + 'С' => array(6, 9, 8, 8, 8, 9, 6), + 'Т' => array(14, 4, 4, 4, 4, 4, 4), + 'У' => array(9, 9, 9, 7, 1, 9, 6), + 'Ф' => array(2, 7, 10, 10, 7, 2, 2), // need to add ÐŽ + 'Ð¥' => array(9, 9, 6, 6, 6, 9, 9), + 'Ц' => array(10, 10, 10, 10, 10, 15, 1), + 'Ч' => array(9, 9, 9, 7, 1, 1, 1), + 'Ш' => array(10, 10, 10, 10, 10, 10, 15), // \r + 'Щ' => array(10, 10, 10, 10, 10, 15, 0), // need to add \r + 'Ъ' => array(12, 4, 4, 6, 5, 5, 6), + 'Ы' => array(8, 8, 8, 14, 9, 9, 14), // need to add | + 'Ь' => array(8, 8, 8, 14, 9, 9, 14), + 'Э' => array(6, 9, 1, 7, 1, 9, 6), + 'Ю' => array(2, 2, 2, 3, 2, 2, 2), // need to add O + 'Я' => array(7, 9, 9, 7, 3, 5, 9), + ), + + $iSuperSampling = 3, $iMarg = 1, $iRad = 4; + + public function __construct($aRadius = 2, $aMargin = 0.6) + { + $this->iRad = $aRadius; + $this->iMarg = $aMargin; + } + + public function SetSupersampling($aSuperSampling = 2) + { + $this->iSuperSampling = $aSuperSampling; + } + + public function _GetLED($aLedIdx, $aColor = 0) + { + $width = $this->iLED_X * $this->iRad * 2 + ($this->iLED_X + 1) * $this->iMarg + $this->iRad; + $height = $this->iLED_Y * $this->iRad * 2 + ($this->iLED_Y) * $this->iMarg + $this->iRad * 2; + + // Adjust radious for supersampling + $rad = $this->iRad * $this->iSuperSampling; + + // Margin in between "Led" dots + $marg = $this->iMarg * $this->iSuperSampling; + + $swidth = $width * $this->iSuperSampling; + $sheight = $height * $this->iSuperSampling; + + $simg = new RotImage($swidth, $sheight, 0, DEFAULT_GFORMAT, false); + $simg->SetColor($this->iColorSchema[$aColor][2]); + $simg->FilledRectangle(0, 0, $swidth - 1, $sheight - 1); + + if (array_key_exists($aLedIdx, $this->iLEDSpec)) { + $d = $this->iLEDSpec[$aLedIdx]; + } else { + $d = array(0, 0, 0, 0, 0, 0, 0); + } + + for ($r = 0; $r < 7; ++$r) { + $dr = $d[$r]; + for ($c = 0; $c < 4; ++$c) { + if (($dr & pow(2, 3 - $c)) !== 0) { + $color = $this->iColorSchema[$aColor][0]; + } else { + $color = $this->iColorSchema[$aColor][1]; + } + + $x = 2 * $rad * $c + $rad + ($c + 1) * $marg + $rad; + $y = 2 * $rad * $r + $rad + ($r + 1) * $marg + $rad; + + $simg->SetColor($color); + $simg->FilledCircle($x, $y, $rad); + } + } + + $img = new Image\Image($width, $height, DEFAULT_GFORMAT, false); + $img->Copy($simg->img, 0, 0, 0, 0, $width, $height, $swidth, $sheight); + $simg->Destroy(); + unset($simg); + return $img; + } + + public function Stroke($aValStr, $aColor = 0, $aFileName = '') + { + $this->StrokeNumber($aValStr, $aColor, $aFileName); + } + + public function StrokeNumber($aValStr, $aColor = 0, $aFileName = '') + { + if ($aColor < 0 || $aColor >= sizeof($this->iColorSchema)) { + $aColor = 0; + } + + if (($n = mb_strlen($aValStr, 'utf8')) == 0) { + $aValStr = ' '; + $n = 1; + } + + for ($i = 0; $i < $n; ++$i) { + $d = mb_substr($aValStr, $i, 1, 'utf8'); + if (ctype_digit($d)) { + $d = (int) $d; + } else { + $d = strtoupper($d); + } + $digit_img[$i] = $this->_GetLED($d, $aColor); + } + + $w = imagesx($digit_img[0]->img); + $h = imagesy($digit_img[0]->img); + + $number_img = new Image\Image($w * $n, $h, DEFAULT_GFORMAT, false); + + for ($i = 0; $i < $n; ++$i) { + $number_img->Copy($digit_img[$i]->img, $i * $w, 0, 0, 0, $w, $h, $w, $h); + } + + if ($aFileName != '') { + $number_img->Stream($aFileName); + } else { + $number_img->Headers(); + $number_img->Stream(); + } + } +} diff --git a/vendor/amenadiel/jpgraph/src/image/FieldArrow.php b/vendor/amenadiel/jpgraph/src/image/FieldArrow.php new file mode 100644 index 0000000000..bc0ea4e97a --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/image/FieldArrow.php @@ -0,0 +1,66 @@ +iSize = $aSize; + $this->iArrowSize = $aArrowSize; + } + + public function SetColor($aColor) + { + $this->iColor = $aColor; + } + + public function Stroke($aImg, $x, $y, $a) + { + // First rotate the center coordinates + list($x, $y) = $aImg->Rotate($x, $y); + + $old_origin = $aImg->SetCenter($x, $y); + $old_a = $aImg->a; + $aImg->SetAngle(-$a + $old_a); + + $dx = round($this->iSize / 2); + $c = array($x - $dx, $y, $x + $dx, $y); + $x += $dx; + + list($dx, $dy) = $this->isizespec[$this->iArrowSize]; + $ca = array($x, $y, $x - $dx, $y - $dy, $x - $dx, $y + $dy, $x, $y); + + $aImg->SetColor($this->iColor); + $aImg->Polygon($c); + $aImg->FilledPolygon($ca); + + $aImg->SetCenter($old_origin[0], $old_origin[1]); + $aImg->SetAngle($old_a); + } +} diff --git a/vendor/amenadiel/jpgraph/src/image/FlagImages.php b/vendor/amenadiel/jpgraph/src/image/FlagImages.php new file mode 100644 index 0000000000..a307b396e1 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/image/FlagImages.php @@ -0,0 +1,377 @@ + 'afgh', + 'Republic of Angola' => 'agla', + 'Republic of Albania' => 'alba', + 'Alderney' => 'alde', + 'Democratic and Popular Republic of Algeria' => 'alge', + 'Territory of American Samoa' => 'amsa', + 'Principality of Andorra' => 'andr', + 'British Overseas Territory of Anguilla' => 'angu', + 'Antarctica' => 'anta', + 'Argentine Republic' => 'arge', + 'League of Arab States' => 'arle', + 'Republic of Armenia' => 'arme', + 'Aruba' => 'arub', + 'Commonwealth of Australia' => 'astl', + 'Republic of Austria' => 'aust', + 'Azerbaijani Republic' => 'azer', + 'Bangladesh' => 'bngl', + 'British Antarctic Territory' => 'bant', + 'Kingdom of Belgium' => 'belg', + 'British Overseas Territory of Bermuda' => 'berm', + 'Commonwealth of the Bahamas' => 'bhms', + 'Kingdom of Bahrain' => 'bhrn', + 'Republic of Belarus' => 'blru', + 'Republic of Bolivia' => 'blva', + 'Belize' => 'blze', + 'Republic of Benin' => 'bnin', + 'Republic of Botswana' => 'bots', + 'Federative Republic of Brazil' => 'braz', + 'Barbados' => 'brbd', + 'British Indian Ocean Territory' => 'brin', + 'Brunei Darussalam' => 'brun', + 'Republic of Burkina' => 'bufa', + 'Republic of Bulgaria' => 'bulg', + 'Republic of Burundi' => 'buru', + 'Overseas Territory of the British Virgin Islands' => 'bvis', + 'Central African Republic' => 'cafr', + 'Kingdom of Cambodia' => 'camb', + 'Republic of Cameroon' => 'came', + 'Dominion of Canada' => 'cana', + 'Caribbean Community' => 'cari', + 'Republic of Cape Verde' => 'cave', + 'Republic of Chad' => 'chad', + 'Republic of Chile' => 'chil', + 'Peoples Republic of China' => 'chin', + 'Territory of Christmas Island' => 'chms', + 'Commonwealth of Independent States' => 'cins', + 'Cook Islands' => 'ckis', + 'Republic of Colombia' => 'clmb', + 'Territory of Cocos Islands' => 'cois', + 'Commonwealth' => 'comn', + 'Union of the Comoros' => 'como', + 'Republic of the Congo' => 'cong', + 'Republic of Costa Rica' => 'corc', + 'Republic of Croatia' => 'croa', + 'Republic of Cuba' => 'cuba', + 'British Overseas Territory of the Cayman Islands' => 'cyis', + 'Republic of Cyprus' => 'cypr', + 'The Czech Republic' => 'czec', + 'Kingdom of Denmark' => 'denm', + 'Republic of Djibouti' => 'djib', + 'Commonwealth of Dominica' => 'domn', + 'Dominican Republic' => 'dore', + 'Republic of Ecuador' => 'ecua', + 'Arab Republic of Egypt' => 'egyp', + 'Republic of El Salvador' => 'elsa', + 'England' => 'engl', + 'Republic of Equatorial Guinea' => 'eqgu', + 'State of Eritrea' => 'erit', + 'Republic of Estonia' => 'estn', + 'Ethiopia' => 'ethp', + 'European Union' => 'euun', + 'British Overseas Territory of the Falkland Islands' => 'fais', + 'International Federation of Vexillological Associations' => 'fiav', + 'Republic of Fiji' => 'fiji', + 'Republic of Finland' => 'finl', + 'Territory of French Polynesia' => 'fpol', + 'French Republic' => 'fran', + 'Overseas Department of French Guiana' => 'frgu', + 'Gabonese Republic' => 'gabn', + 'Republic of the Gambia' => 'gamb', + 'Republic of Georgia' => 'geor', + 'Federal Republic of Germany' => 'germ', + 'Republic of Ghana' => 'ghan', + 'Gibraltar' => 'gibr', + 'Hellenic Republic' => 'grec', + 'State of Grenada' => 'gren', + 'Overseas Department of Guadeloupe' => 'guad', + 'Territory of Guam' => 'guam', + 'Republic of Guatemala' => 'guat', + 'The Bailiwick of Guernsey' => 'guer', + 'Republic of Guinea' => 'guin', + 'Republic of Haiti' => 'hait', + 'Hong Kong Special Administrative Region' => 'hokn', + 'Republic of Honduras' => 'hond', + 'Republic of Hungary' => 'hung', + 'Republic of Iceland' => 'icel', + 'International Committee of the Red Cross' => 'icrc', + 'Republic of India' => 'inda', + 'Republic of Indonesia' => 'indn', + 'Republic of Iraq' => 'iraq', + 'Republic of Ireland' => 'irel', + 'Organization of the Islamic Conference' => 'isco', + 'Isle of Man' => 'isma', + 'State of Israel' => 'isra', + 'Italian Republic' => 'ital', + 'Jamaica' => 'jama', + 'Japan' => 'japa', + 'The Bailiwick of Jersey' => 'jers', + 'Hashemite Kingdom of Jordan' => 'jord', + 'Republic of Kazakhstan' => 'kazk', + 'Republic of Kenya' => 'keny', + 'Republic of Kiribati' => 'kirb', + 'State of Kuwait' => 'kuwa', + 'Kyrgyz Republic' => 'kyrg', + 'Republic of Latvia' => 'latv', + 'Lebanese Republic' => 'leba', + 'Kingdom of Lesotho' => 'lest', + 'Republic of Liberia' => 'libe', + 'Principality of Liechtenstein' => 'liec', + 'Republic of Lithuania' => 'lith', + 'Grand Duchy of Luxembourg' => 'luxe', + 'Macao Special Administrative Region' => 'maca', + 'Republic of Macedonia' => 'mace', + 'Republic of Madagascar' => 'mada', + 'Republic of the Marshall Islands' => 'mais', + 'Republic of Mali' => 'mali', + 'Federation of Malaysia' => 'mals', + 'Republic of Malta' => 'malt', + 'Republic of Malawi' => 'malw', + 'Overseas Department of Martinique' => 'mart', + 'Islamic Republic of Mauritania' => 'maur', + 'Territorial Collectivity of Mayotte' => 'mayt', + 'United Mexican States' => 'mexc', + 'Federated States of Micronesia' => 'micr', + 'Midway Islands' => 'miis', + 'Republic of Moldova' => 'mold', + 'Principality of Monaco' => 'mona', + 'Republic of Mongolia' => 'mong', + 'British Overseas Territory of Montserrat' => 'mont', + 'Kingdom of Morocco' => 'morc', + 'Republic of Mozambique' => 'moza', + 'Republic of Mauritius' => 'mrts', + 'Union of Myanmar' => 'myan', + 'Republic of Namibia' => 'namb', + 'North Atlantic Treaty Organization' => 'nato', + 'Republic of Nauru' => 'naur', + 'Turkish Republic of Northern Cyprus' => 'ncyp', + 'Netherlands Antilles' => 'nean', + 'Kingdom of Nepal' => 'nepa', + 'Kingdom of the Netherlands' => 'neth', + 'Territory of Norfolk Island' => 'nfis', + 'Federal Republic of Nigeria' => 'ngra', + 'Republic of Nicaragua' => 'nica', + 'Republic of Niger' => 'nigr', + 'Niue' => 'niue', + 'Commonwealth of the Northern Mariana Islands' => 'nmar', + 'Province of Northern Ireland' => 'noir', + 'Nordic Council' => 'nord', + 'Kingdom of Norway' => 'norw', + 'Territory of New Caledonia and Dependencies' => 'nwca', + 'New Zealand' => 'nwze', + 'Organization of American States' => 'oast', + 'Organization of African Unity' => 'oaun', + 'International Olympic Committee' => 'olym', + 'Sultanate of Oman' => 'oman', + 'Islamic Republic of Pakistan' => 'paks', + 'Republic of Palau' => 'pala', + 'Independent State of Papua New Guinea' => 'pang', + 'Republic of Paraguay' => 'para', + 'Republic of Peru' => 'peru', + 'Republic of the Philippines' => 'phil', + 'British Overseas Territory of the Pitcairn Islands' => 'piis', + 'Republic of Poland' => 'pola', + 'Republic of Portugal' => 'port', + 'Commonwealth of Puerto Rico' => 'purc', + 'State of Qatar' => 'qata', + 'Russian Federation' => 'russ', + 'Romania' => 'rmna', + 'Republic of Rwanda' => 'rwan', + 'Kingdom of Saudi Arabia' => 'saar', + 'Republic of San Marino' => 'sama', + 'Nordic Sami Conference' => 'sami', + 'Sark' => 'sark', + 'Scotland' => 'scot', + 'Principality of Seborga' => 'sebo', + 'Republic of Serbia' => 'serb', + 'Republic of Sierra Leone' => 'sile', + 'Republic of Singapore' => 'sing', + 'Republic of Korea' => 'skor', + 'Republic of Slovenia' => 'slva', + 'Somali Republic' => 'smla', + 'Republic of Somaliland' => 'smld', + 'Republic of South Africa' => 'soaf', + 'Solomon Islands' => 'sois', + 'Kingdom of Spain' => 'span', + 'Secretariat of the Pacific Community' => 'spco', + 'Democratic Socialist Republic of Sri Lanka' => 'srla', + 'Saint Lucia' => 'stlu', + 'Republic of the Sudan' => 'suda', + 'Republic of Suriname' => 'surn', + 'Slovak Republic' => 'svka', + 'Kingdom of Sweden' => 'swdn', + 'Swiss Confederation' => 'swit', + 'Syrian Arab Republic' => 'syra', + 'Kingdom of Swaziland' => 'szld', + 'Republic of China' => 'taiw', + 'Taiwan' => 'taiw', + 'Republic of Tajikistan' => 'tajk', + 'United Republic of Tanzania' => 'tanz', + 'Kingdom of Thailand' => 'thal', + 'Autonomous Region of Tibet' => 'tibe', + 'Turkmenistan' => 'tkst', + 'Togolese Republic' => 'togo', + 'Tokelau' => 'toke', + 'Kingdom of Tonga' => 'tong', + 'Tristan da Cunha' => 'trdc', + 'Tromelin' => 'tris', + 'Republic of Tunisia' => 'tuns', + 'Republic of Turkey' => 'turk', + 'Tuvalu' => 'tuva', + 'United Arab Emirates' => 'uaem', + 'Republic of Uganda' => 'ugan', + 'Ukraine' => 'ukrn', + 'United Kingdom of Great Britain' => 'unkg', + 'United Nations' => 'unna', + 'United States of America' => 'unst', + 'Oriental Republic of Uruguay' => 'urgy', + 'Virgin Islands of the United States' => 'usvs', + 'Republic of Uzbekistan' => 'uzbk', + 'State of the Vatican City' => 'vacy', + 'Republic of Vanuatu' => 'vant', + 'Bolivarian Republic of Venezuela' => 'venz', + 'Republic of Yemen' => 'yemn', + 'Democratic Republic of Congo' => 'zare', + 'Republic of Zimbabwe' => 'zbwe'); + + private $iFlagCount = -1; + private $iFlagSetMap = array( + FLAGSIZE1 => 'flags_thumb35x35', + FLAGSIZE2 => 'flags_thumb60x60', + FLAGSIZE3 => 'flags_thumb100x100', + FLAGSIZE4 => 'flags', + ); + + private $iFlagData; + private $iOrdIdx = array(); + + public function FlagImages($aSize = FLAGSIZE1) + { + switch ($aSize) { + case FLAGSIZE1: + case FLAGSIZE2: + case FLAGSIZE3: + case FLAGSIZE4: + $file = dirname(__FILE__) . '/flags/' . $this->iFlagSetMap[$aSize] . '.dat'; + $fp = fopen($file, 'rb'); + $rawdata = fread($fp, filesize($file)); + $this->iFlagData = unserialize($rawdata); + break; + default: + Util\JpGraphError::RaiseL(5001, $aSize); + //('Unknown flag size. ('.$aSize.')'); + } + $this->iFlagCount = count($this->iCountryNameMap); + } + + public function GetNum() + { + return $this->iFlagCount; + } + + public function GetImgByName($aName, &$outFullName) + { + $idx = $this->GetIdxByName($aName, $outFullName); + return $this->GetImgByIdx($idx); + } + + public function GetImgByIdx($aIdx) + { + if (array_key_exists($aIdx, $this->iFlagData)) { + $d = $this->iFlagData[$aIdx][1]; + return Image::CreateFromString($d); + } else { + Util\JpGraphError::RaiseL(5002, $aIdx); + //("Flag index \"�$aIdx\" does not exist."); + } + } + + public function GetIdxByOrdinal($aOrd, &$outFullName) + { + $aOrd--; + $n = count($this->iOrdIdx); + if ($n == 0) { + reset($this->iCountryNameMap); + $this->iOrdIdx = array(); + $i = 0; + while (list($key, $val) = each($this->iCountryNameMap)) { + $this->iOrdIdx[$i++] = array($val, $key); + } + $tmp = $this->iOrdIdx[$aOrd]; + $outFullName = $tmp[1]; + return $tmp[0]; + + } elseif ($aOrd >= 0 && $aOrd < $n) { + $tmp = $this->iOrdIdx[$aOrd]; + $outFullName = $tmp[1]; + return $tmp[0]; + } else { + Util\JpGraphError::RaiseL(5003, $aOrd); + //('Invalid ordinal number specified for flag index.'); + } + } + + public function GetIdxByName($aName, &$outFullName) + { + + if (is_integer($aName)) { + $idx = $this->GetIdxByOrdinal($aName, $outFullName); + return $idx; + } + + $found = false; + $aName = strtolower($aName); + $nlen = strlen($aName); + reset($this->iCountryNameMap); + // Start by trying to match exact index name + while (list($key, $val) = each($this->iCountryNameMap)) { + if ($nlen == strlen($val) && $val == $aName) { + $found = true; + break; + } + } + if (!$found) { + reset($this->iCountryNameMap); + // If the exact index doesn't work try a (partial) full name + while (list($key, $val) = each($this->iCountryNameMap)) { + if (strpos(strtolower($key), $aName) !== false) { + $found = true; + break; + } + } + } + if ($found) { + $outFullName = $key; + return $val; + } else { + Util\JpGraphError::RaiseL(5004, $aName); + //("The (partial) country name \"$aName\" does not have a cooresponding flag image. The flag may still exist but under another name, e.g. insted of \"usa\" try \"united states\"."); + } + } +} diff --git a/vendor/amenadiel/jpgraph/src/image/Footer.php b/vendor/amenadiel/jpgraph/src/image/Footer.php new file mode 100644 index 0000000000..f5f7bd0994 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/image/Footer.php @@ -0,0 +1,57 @@ +left = new Text(); + $this->left->ParagraphAlign('left'); + $this->center = new Text(); + $this->center->ParagraphAlign('center'); + $this->right = new Text(); + $this->right->ParagraphAlign('right'); + } + + public function SetTimer($aTimer, $aTimerPostString = '') + { + $this->iTimer = $aTimer; + $this->itimerpoststring = $aTimerPostString; + } + + public function SetMargin($aLeft = 3, $aRight = 3, $aBottom = 3) + { + $this->iLeftMargin = $aLeft; + $this->iRightMargin = $aRight; + $this->iBottomMargin = $aBottom; + } + + public function Stroke($aImg) + { + $y = $aImg->height - $this->iBottomMargin; + $x = $this->iLeftMargin; + $this->left->Align('left', 'bottom'); + $this->left->Stroke($aImg, $x, $y); + + $x = ($aImg->width - $this->iLeftMargin - $this->iRightMargin) / 2; + $this->center->Align('center', 'bottom'); + $this->center->Stroke($aImg, $x, $y); + + $x = $aImg->width - $this->iRightMargin; + $this->right->Align('right', 'bottom'); + if ($this->iTimer != null) { + $this->right->Set($this->right->t . sprintf('%.3f', $this->iTimer->Pop() / 1000.0) . $this->itimerpoststring); + } + $this->right->Stroke($aImg, $x, $y); + } +} diff --git a/vendor/amenadiel/jpgraph/src/image/GanttLink.php b/vendor/amenadiel/jpgraph/src/image/GanttLink.php new file mode 100644 index 0000000000..f89ba4b223 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/image/GanttLink.php @@ -0,0 +1,193 @@ +ix1 = $x1; + $this->ix2 = $x2; + $this->iy1 = $y1; + $this->iy2 = $y2; + } + + public function SetPos($x1, $y1, $x2, $y2) + { + $this->ix1 = $x1; + $this->ix2 = $x2; + $this->iy1 = $y1; + $this->iy2 = $y2; + } + + public function SetPath($aPath) + { + $this->iPathType = $aPath; + } + + public function SetColor($aColor) + { + $this->iColor = $aColor; + } + + public function SetArrow($aSize, $aType = ARROWT_SOLID) + { + $this->iArrowSize = $aSize; + $this->iArrowType = $aType; + } + + public function SetWeight($aWeight) + { + $this->iWeight = $aWeight; + } + + public function Stroke($aImg) + { + // The way the path for the arrow is constructed is partly based + // on some heuristics. This is not an exact science but draws the + // path in a way that, for me, makes esthetic sence. For example + // if the start and end activities are very close we make a small + // detour to endter the target horixontally. If there are more + // space between axctivities then no suh detour is made and the + // target is "hit" directly vertical. I have tried to keep this + // simple. no doubt this could become almost infinitive complex + // and have some real AI. Feel free to modify this. + // This will no-doubt be tweaked as times go by. One design aim + // is to avoid having the user choose what types of arrow + // he wants. + + // The arrow is drawn between (x1,y1) to (x2,y2) + $x1 = $this->ix1; + $x2 = $this->ix2; + $y1 = $this->iy1; + $y2 = $this->iy2; + + // Depending on if the target is below or above we have to + // handle thi different. + if ($y2 > $y1) { + $arrowtype = ARROW_DOWN; + $midy = round(($y2 - $y1) / 2 + $y1); + if ($x2 > $x1) { + switch ($this->iPathType) { + case 0: + $c = array($x1, $y1, $x1, $midy, $x2, $midy, $x2, $y2); + break; + case 1: + case 2: + case 3: + $c = array($x1, $y1, $x2, $y1, $x2, $y2); + break; + default: + Util\JpGraphError::RaiseL(6032, $this->iPathType); + //('Internal error: Unknown path type (='.$this->iPathType .') specified for link.'); + exit(1); + break; + } + } else { + switch ($this->iPathType) { + case 0: + case 1: + $c = array($x1, $y1, $x1, $midy, $x2, $midy, $x2, $y2); + break; + case 2: + // Always extend out horizontally a bit from the first point + // If we draw a link back in time (end to start) and the bars + // are very close we also change the path so it comes in from + // the left on the activity + $c = array($x1, $y1, $x1 + $this->iPathExtend, $y1, + $x1 + $this->iPathExtend, $midy, + $x2, $midy, $x2, $y2); + break; + case 3: + if ($y2 - $midy < 6) { + $c = array($x1, $y1, $x1, $midy, + $x2 - $this->iPathExtend, $midy, + $x2 - $this->iPathExtend, $y2, + $x2, $y2); + $arrowtype = ARROW_RIGHT; + } else { + $c = array($x1, $y1, $x1, $midy, $x2, $midy, $x2, $y2); + } + break; + default: + Util\JpGraphError::RaiseL(6032, $this->iPathType); + //('Internal error: Unknown path type specified for link.'); + exit(1); + break; + } + } + $arrow = new LinkArrow($x2, $y2, $arrowtype); + } else { + // Y2 < Y1 + $arrowtype = ARROW_UP; + $midy = round(($y1 - $y2) / 2 + $y2); + if ($x2 > $x1) { + switch ($this->iPathType) { + case 0: + case 1: + $c = array($x1, $y1, $x1, $midy, $x2, $midy, $x2, $y2); + break; + case 3: + if ($midy - $y2 < 8) { + $arrowtype = ARROW_RIGHT; + $c = array($x1, $y1, $x1, $y2, $x2, $y2); + } else { + $c = array($x1, $y1, $x1, $midy, $x2, $midy, $x2, $y2); + } + break; + default: + Util\JpGraphError::RaiseL(6032, $this->iPathType); + //('Internal error: Unknown path type specified for link.'); + break; + } + } else { + switch ($this->iPathType) { + case 0: + case 1: + $c = array($x1, $y1, $x1, $midy, $x2, $midy, $x2, $y2); + break; + case 2: + // Always extend out horizontally a bit from the first point + $c = array($x1, $y1, $x1 + $this->iPathExtend, $y1, + $x1 + $this->iPathExtend, $midy, + $x2, $midy, $x2, $y2); + break; + case 3: + if ($midy - $y2 < 16) { + $arrowtype = ARROW_RIGHT; + $c = array($x1, $y1, $x1, $midy, $x2 - $this->iPathExtend, $midy, + $x2 - $this->iPathExtend, $y2, + $x2, $y2); + } else { + $c = array($x1, $y1, $x1, $midy, $x2, $midy, $x2, $y2); + } + break; + default: + Util\JpGraphError::RaiseL(6032, $this->iPathType); + //('Internal error: Unknown path type specified for link.'); + break; + } + } + $arrow = new LinkArrow($x2, $y2, $arrowtype); + } + $aImg->SetColor($this->iColor); + $aImg->SetLineWeight($this->iWeight); + $aImg->Polygon($c); + $aImg->SetLineWeight(1); + $arrow->SetColor($this->iColor); + $arrow->SetSize($this->iArrowSize); + $arrow->SetType($this->iArrowType); + $arrow->Stroke($aImg); + } +} diff --git a/vendor/amenadiel/jpgraph/src/image/IconImage.php b/vendor/amenadiel/jpgraph/src/image/IconImage.php new file mode 100644 index 0000000000..0dae7918e3 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/image/IconImage.php @@ -0,0 +1,70 @@ +iGDImage = Graph::LoadBkgImage('', $aIcon); + } elseif (is_integer($aIcon)) { + // Builtin image + $this->iGDImage = $_gPredefIcons->GetImg($aIcon); + } else { + Util\JpGraphError::RaiseL(6011); + //('Argument to IconImage must be string or integer'); + } + $this->iScale = $aScale; + $this->iWidth = Image::GetWidth($this->iGDImage); + $this->iHeight = Image::GetHeight($this->iGDImage); + } + + public function GetWidth() + { + return round($this->iScale * $this->iWidth); + } + + public function GetHeight() + { + return round($this->iScale * $this->iHeight); + } + + public function SetAlign($aX = 'left', $aY = 'center') + { + $this->ixalign = $aX; + $this->iyalign = $aY; + } + + public function Stroke($aImg, $x, $y) + { + + if ($this->ixalign == 'right') { + $x -= $this->iWidth; + } elseif ($this->ixalign == 'center') { + $x -= round($this->iWidth / 2 * $this->iScale); + } + + if ($this->iyalign == 'bottom') { + $y -= $this->iHeight; + } elseif ($this->iyalign == 'center') { + $y -= round($this->iHeight / 2 * $this->iScale); + } + + $aImg->Copy($this->iGDImage, + $x, $y, 0, 0, + round($this->iWidth * $this->iScale), round($this->iHeight * $this->iScale), + $this->iWidth, $this->iHeight); + } +} diff --git a/vendor/amenadiel/jpgraph/src/image/Image.php b/vendor/amenadiel/jpgraph/src/image/Image.php new file mode 100644 index 0000000000..d9753d7281 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/image/Image.php @@ -0,0 +1,2036 @@ +original_width = $aWidth; + $this->original_height = $aHeight; + $this->CreateImgCanvas($aWidth, $aHeight); + + if ($aSetAutoMargin) { + $this->SetAutoMargin(); + } + + if (!$this->SetImgFormat($aFormat)) { + Util\JpGraphError::RaiseL(25081, $aFormat); //("JpGraph: Selected graphic format is either not supported or unknown [$aFormat]"); + } + $this->ttf = new TTF(); + $this->langconv = new LanguageConv(); + + $this->ff_font0 = imageloadfont(dirname(dirname(__FILE__)) . "/fonts/FF_FONT0.gdf"); + $this->ff_font1 = imageloadfont(dirname(dirname(__FILE__)) . "/fonts/FF_FONT1.gdf"); + $this->ff_font2 = imageloadfont(dirname(dirname(__FILE__)) . "/fonts/FF_FONT2.gdf"); + $this->ff_font1_bold = imageloadfont(dirname(dirname(__FILE__)) . "/fonts/FF_FONT1-Bold.gdf"); + $this->ff_font2_bold = imageloadfont(dirname(dirname(__FILE__)) . "/fonts/FF_FONT2-Bold.gdf"); + } + + // Enable interlacing in images + public function SetInterlace($aFlg = true) + { + $this->iInterlace = $aFlg; + } + + // Should we use anti-aliasing. Note: This really slows down graphics! + public function SetAntiAliasing($aFlg = true) + { + $this->use_anti_aliasing = $aFlg; + if (function_exists('imageantialias')) { + imageantialias($this->img, $aFlg); + } else { + Util\JpGraphError::RaiseL(25128); //('The function imageantialias() is not available in your PHP installation. Use the GD version that comes with PHP and not the standalone version.') + } + } + + public function GetAntiAliasing() + { + return $this->use_anti_aliasing; + } + + public function CreateRawCanvas($aWidth = 0, $aHeight = 0) + { + + $aWidth *= SUPERSAMPLING_SCALE; + $aHeight *= SUPERSAMPLING_SCALE; + + if ($aWidth <= 1 || $aHeight <= 1) { + Util\JpGraphError::RaiseL(25082, $aWidth, $aHeight); //("Illegal sizes specified for width or height when creating an image, (width=$aWidth, height=$aHeight)"); + } + + $this->img = @imagecreatetruecolor($aWidth, $aHeight); + if ($this->img < 1) { + Util\JpGraphError::RaiseL(25126); + //die("Can't create truecolor image. Check that you really have GD2 library installed."); + } + $this->SetAlphaBlending(); + + if ($this->iInterlace) { + imageinterlace($this->img, 1); + } + if ($this->rgb != null) { + $this->rgb->img = $this->img; + } else { + $this->rgb = new RGB($this->img); + } + } + + public function CloneCanvasH() + { + $oldimage = $this->img; + $this->CreateRawCanvas($this->width, $this->height); + imagecopy($this->img, $oldimage, 0, 0, 0, 0, $this->width, $this->height); + return $oldimage; + } + + public function CreateImgCanvas($aWidth = 0, $aHeight = 0) + { + + $old = array($this->img, $this->width, $this->height); + + $aWidth = round($aWidth); + $aHeight = round($aHeight); + + $this->width = $aWidth; + $this->height = $aHeight; + + if ($aWidth == 0 || $aHeight == 0) { + // We will set the final size later. + // Note: The size must be specified before any other + // img routines that stroke anything are called. + $this->img = null; + $this->rgb = null; + return $old; + } + + $this->CreateRawCanvas($aWidth, $aHeight); + // Set canvas color (will also be the background color for a + // a pallett image + $this->SetColor($this->canvascolor); + $this->FilledRectangle(0, 0, $this->width - 1, $this->height - 1); + + return $old; + } + + public function CopyCanvasH($aToHdl, $aFromHdl, $aToX, $aToY, $aFromX, $aFromY, $aWidth, $aHeight, $aw = -1, $ah = -1) + { + if ($aw === -1) { + $aw = $aWidth; + $ah = $aHeight; + $f = 'imagecopyresized'; + } else { + $f = 'imagecopyresampled'; + } + $f($aToHdl, $aFromHdl, $aToX, $aToY, $aFromX, $aFromY, $aWidth, $aHeight, $aw, $ah); + } + + public function Copy($fromImg, $toX, $toY, $fromX, $fromY, $toWidth, $toHeight, $fromWidth = -1, $fromHeight = -1) + { + $this->CopyCanvasH($this->img, $fromImg, $toX, $toY, $fromX, $fromY, $toWidth, $toHeight, $fromWidth, $fromHeight); + } + + public function CopyMerge($fromImg, $toX, $toY, $fromX, $fromY, $toWidth, $toHeight, $fromWidth = -1, $fromHeight = -1, $aMix = 100) + { + if ($aMix == 100) { + $this->CopyCanvasH($this->img, $fromImg, + $toX, $toY, $fromX, $fromY, $toWidth, $toHeight, $fromWidth, $fromHeight); + } else { + if (($fromWidth != -1 && ($fromWidth != $toWidth)) || ($fromHeight != -1 && ($fromHeight != $fromHeight))) { + // Create a new canvas that will hold the re-scaled original from image + if ($toWidth <= 1 || $toHeight <= 1) { + Util\JpGraphError::RaiseL(25083); //('Illegal image size when copying image. Size for copied to image is 1 pixel or less.'); + } + + $tmpimg = @imagecreatetruecolor($toWidth, $toHeight); + + if ($tmpimg < 1) { + Util\JpGraphError::RaiseL(25084); //('Failed to create temporary GD canvas. Out of memory ?'); + } + $this->CopyCanvasH($tmpimg, $fromImg, 0, 0, 0, 0, + $toWidth, $toHeight, $fromWidth, $fromHeight); + $fromImg = $tmpimg; + } + imagecopymerge($this->img, $fromImg, $toX, $toY, $fromX, $fromY, $toWidth, $toHeight, $aMix); + } + } + + public static function GetWidth($aImg = null) + { + if ($aImg === null) { + $aImg = $this->img; + } + return imagesx($aImg); + } + + public static function GetHeight($aImg = null) + { + if ($aImg === null) { + $aImg = $this->img; + } + return imagesy($aImg); + } + + public static function CreateFromString($aStr) + { + $img = imagecreatefromstring($aStr); + if ($img === false) { + Util\JpGraphError::RaiseL(25085); + //('An image can not be created from the supplied string. It is either in a format not supported or the string is representing an corrupt image.'); + } + return $img; + } + + public function SetCanvasH($aHdl) + { + $this->img = $aHdl; + $this->rgb->img = $aHdl; + } + + public function SetCanvasColor($aColor) + { + $this->canvascolor = $aColor; + } + + public function SetAlphaBlending($aFlg = true) + { + ImageAlphaBlending($this->img, $aFlg); + } + + public function SetAutoMargin() + { + $min_bm = 5; + $lm = min(40, $this->width / 7); + $rm = min(20, $this->width / 10); + $tm = max(5, $this->height / 7); + $bm = max($min_bm, $this->height / 6); + $this->SetMargin($lm, $rm, $tm, $bm); + } + + //--------------- + // PUBLIC METHODS + + public function SetFont($family, $style = FS_NORMAL, $size = 10) + { + $this->font_family = $family; + $this->font_style = $style; + $this->font_size = $size * SUPERSAMPLING_SCALE; + $this->font_file = ''; + if (($this->font_family == FF_FONT1 || $this->font_family == FF_FONT2) && $this->font_style == FS_BOLD) { + ++$this->font_family; + } + if ($this->font_family > FF_FONT2 + 1) { + // A TTF font so get the font file + + // Check that this PHP has support for TTF fonts + if (!function_exists('imagettfbbox')) { + // use internal font when php is configured without '--with-ttf' + $this->font_family = FF_FONT1; + // Util\JpGraphError::RaiseL(25087);//('This PHP build has not been configured with TTF support. You need to recompile your PHP installation with FreeType support.'); + } else { + $this->font_file = $this->ttf->File($this->font_family, $this->font_style); + } + } + } + + // Get the specific height for a text string + public function GetTextHeight($txt = "", $angle = 0) + { + $tmp = preg_split('/\n/', $txt); + $n = count($tmp); + $m = 0; + for ($i = 0; $i < $n; ++$i) { + $m = max($m, strlen($tmp[$i])); + } + + if ($this->font_family <= FF_FONT2 + 1) { + if ($angle == 0) { + $h = imagefontheight($this->font_family); + if ($h === false) { + Util\JpGraphError::RaiseL(25088); //('You have a misconfigured GD font support. The call to imagefontwidth() fails.'); + } + + return $n * $h; + } else { + $w = @imagefontwidth($this->font_family); + if ($w === false) { + Util\JpGraphError::RaiseL(25088); //('You have a misconfigured GD font support. The call to imagefontwidth() fails.'); + } + + return $m * $w; + } + } else { + $bbox = $this->GetTTFBBox($txt, $angle); + return $bbox[1] - $bbox[5] + 1; + } + } + + // Estimate font height + public function GetFontHeight($angle = 0) + { + $txt = "XOMg"; + return $this->GetTextHeight($txt, $angle); + } + + // Approximate font width with width of letter "O" + public function GetFontWidth($angle = 0) + { + $txt = 'O'; + return $this->GetTextWidth($txt, $angle); + } + + // Get actual width of text in absolute pixels. Note that the width is the + // texts projected with onto the x-axis. Call with angle=0 to get the true + // etxt width. + public function GetTextWidth($txt, $angle = 0) + { + + $tmp = preg_split('/\n/', $txt); + $n = count($tmp); + if ($this->font_family <= FF_FONT2 + 1) { + + $m = 0; + for ($i = 0; $i < $n; ++$i) { + $l = strlen($tmp[$i]); + if ($l > $m) { + $m = $l; + } + } + + if ($angle == 0) { + $w = @imagefontwidth($this->font_family); + if ($w === false) { + Util\JpGraphError::RaiseL(25088); //('You have a misconfigured GD font support. The call to imagefontwidth() fails.'); + } + return $m * $w; + } else { + // 90 degrees internal so height becomes width + $h = @imagefontheight($this->font_family); + if ($h === false) { + Util\JpGraphError::RaiseL(25089); //('You have a misconfigured GD font support. The call to imagefontheight() fails.'); + } + return $n * $h; + } + } else { + // For TTF fonts we must walk through a lines and find the + // widest one which we use as the width of the multi-line + // paragraph + $m = 0; + for ($i = 0; $i < $n; ++$i) { + $bbox = $this->GetTTFBBox($tmp[$i], $angle); + $mm = $bbox[2] - $bbox[0]; + if ($mm > $m) { + $m = $mm; + } + + } + return $m; + } + } + + // Draw text with a box around it + public function StrokeBoxedText($x, $y, $txt, $dir = 0, $fcolor = "white", $bcolor = "black", + $shadowcolor = false, $paragraph_align = "left", + $xmarg = 6, $ymarg = 4, $cornerradius = 0, $dropwidth = 3) { + + $oldx = $this->lastx; + $oldy = $this->lasty; + + if (!is_numeric($dir)) { + if ($dir == "h") { + $dir = 0; + } elseif ($dir == "v") { + $dir = 90; + } else { + Util\JpGraphError::RaiseL(25090, $dir); + } + //(" Unknown direction specified in call to StrokeBoxedText() [$dir]"); + } + + if ($this->font_family >= FF_FONT0 && $this->font_family <= FF_FONT2 + 1) { + $width = $this->GetTextWidth($txt, $dir); + $height = $this->GetTextHeight($txt, $dir); + } else { + $width = $this->GetBBoxWidth($txt, $dir); + $height = $this->GetBBoxHeight($txt, $dir); + } + + $height += 2 * $ymarg; + $width += 2 * $xmarg; + + if ($this->text_halign == "right") { + $x -= $width; + } elseif ($this->text_halign == "center") { + $x -= $width / 2; + } + + if ($this->text_valign == "bottom") { + $y -= $height; + } elseif ($this->text_valign == "center") { + $y -= $height / 2; + } + + $olda = $this->SetAngle(0); + + if ($shadowcolor) { + $this->PushColor($shadowcolor); + $this->FilledRoundedRectangle($x - $xmarg + $dropwidth, $y - $ymarg + $dropwidth, + $x + $width + $dropwidth, $y + $height - $ymarg + $dropwidth, + $cornerradius); + $this->PopColor(); + $this->PushColor($fcolor); + $this->FilledRoundedRectangle($x - $xmarg, $y - $ymarg, + $x + $width, $y + $height - $ymarg, + $cornerradius); + $this->PopColor(); + $this->PushColor($bcolor); + $this->RoundedRectangle($x - $xmarg, $y - $ymarg, + $x + $width, $y + $height - $ymarg, $cornerradius); + $this->PopColor(); + } else { + if ($fcolor) { + $oc = $this->current_color; + $this->SetColor($fcolor); + $this->FilledRoundedRectangle($x - $xmarg, $y - $ymarg, $x + $width, $y + $height - $ymarg, $cornerradius); + $this->current_color = $oc; + } + if ($bcolor) { + $oc = $this->current_color; + $this->SetColor($bcolor); + $this->RoundedRectangle($x - $xmarg, $y - $ymarg, $x + $width, $y + $height - $ymarg, $cornerradius); + $this->current_color = $oc; + } + } + + $h = $this->text_halign; + $v = $this->text_valign; + $this->SetTextAlign("left", "top"); + + $debug = false; + $this->StrokeText($x, $y, $txt, $dir, $paragraph_align, $debug); + + $bb = array($x - $xmarg, $y + $height - $ymarg, $x + $width, $y + $height - $ymarg, + $x + $width, $y - $ymarg, $x - $xmarg, $y - $ymarg); + $this->SetTextAlign($h, $v); + + $this->SetAngle($olda); + $this->lastx = $oldx; + $this->lasty = $oldy; + + return $bb; + } + + // Draw text with a box around it. This time the box will be rotated + // with the text. The previous method will just make a larger enough non-rotated + // box to hold the text inside. + public function StrokeBoxedText2($x, $y, $txt, $dir = 0, $fcolor = "white", $bcolor = "black", + $shadowcolor = false, $paragraph_align = "left", + $xmarg = 6, $ymarg = 4, $cornerradius = 0, $dropwidth = 3) { + + // This version of boxed text will stroke a rotated box round the text + // thta will follow the angle of the text. + // This has two implications: + // 1) This methos will only support TTF fonts + // 2) The only two alignment that makes sense are centered or baselined + + if ($this->font_family <= FF_FONT2 + 1) { + Util\JpGraphError::RaiseL(25131); //StrokeBoxedText2() Only support TTF fonts and not built in bitmap fonts + } + + $oldx = $this->lastx; + $oldy = $this->lasty; + $dir = $this->NormAngle($dir); + + if (!is_numeric($dir)) { + if ($dir == "h") { + $dir = 0; + } elseif ($dir == "v") { + $dir = 90; + } else { + Util\JpGraphError::RaiseL(25090, $dir); + } + //(" Unknown direction specified in call to StrokeBoxedText() [$dir]"); + } + + $width = $this->GetTextWidth($txt, 0) + 2 * $xmarg; + $height = $this->GetTextHeight($txt, 0) + 2 * $ymarg; + $rect_width = $this->GetBBoxWidth($txt, $dir); + $rect_height = $this->GetBBoxHeight($txt, $dir); + + $baseline_offset = $this->bbox_cache[1] - 1; + + if ($this->text_halign == "center") { + if ($dir >= 0 && $dir <= 90) { + + $x -= $rect_width / 2; + $x += sin($dir * M_PI / 180) * $height; + $y += $rect_height / 2; + + } elseif ($dir >= 270 && $dir <= 360) { + + $x -= $rect_width / 2; + $y -= $rect_height / 2; + $y += cos($dir * M_PI / 180) * $height; + + } elseif ($dir >= 90 && $dir <= 180) { + + $x += $rect_width / 2; + $y += $rect_height / 2; + $y += cos($dir * M_PI / 180) * $height; + + } else { + // $dir > 180 && $dir < 270 + $x += $rect_width / 2; + $x += sin($dir * M_PI / 180) * $height; + $y -= $rect_height / 2; + } + } + + // Rotate the box around this point + $this->SetCenter($x, $y); + $olda = $this->SetAngle(-$dir); + + // We need to use adjusted coordinats for the box to be able + // to draw the box below the baseline. This cannot be done before since + // the rotating point must be the original x,y since that is arounbf the + // point where the text will rotate and we cannot change this since + // that is where the GD/GreeType will rotate the text + + // For smaller <14pt font we need to do some additional + // adjustments to make it look good + if ($this->font_size < 14) { + $x -= 2; + $y += 2; + } else { + // $y += $baseline_offset; + } + + if ($shadowcolor) { + $this->PushColor($shadowcolor); + $this->FilledRectangle($x - $xmarg + $dropwidth, $y + $ymarg + $dropwidth - $height, + $x + $width + $dropwidth, $y + $ymarg + $dropwidth); + //$cornerradius); + $this->PopColor(); + $this->PushColor($fcolor); + $this->FilledRectangle($x - $xmarg, $y + $ymarg - $height, + $x + $width, $y + $ymarg); + //$cornerradius); + $this->PopColor(); + $this->PushColor($bcolor); + $this->Rectangle($x - $xmarg, $y + $ymarg - $height, + $x + $width, $y + $ymarg); + //$cornerradius); + $this->PopColor(); + } else { + if ($fcolor) { + $oc = $this->current_color; + $this->SetColor($fcolor); + $this->FilledRectangle($x - $xmarg, $y + $ymarg - $height, $x + $width, $y + $ymarg); //,$cornerradius); + $this->current_color = $oc; + } + if ($bcolor) { + $oc = $this->current_color; + $this->SetColor($bcolor); + $this->Rectangle($x - $xmarg, $y + $ymarg - $height, $x + $width, $y + $ymarg); //,$cornerradius); + $this->current_color = $oc; + } + } + + if ($this->font_size < 14) { + $x += 2; + $y -= 2; + } else { + + // Restore the original y before we stroke the text + // $y -= $baseline_offset; + + } + + $this->SetCenter(0, 0); + $this->SetAngle($olda); + + $h = $this->text_halign; + $v = $this->text_valign; + if ($this->text_halign == 'center') { + $this->SetTextAlign('center', 'basepoint'); + } else { + $this->SetTextAlign('basepoint', 'basepoint'); + } + + $debug = false; + $this->StrokeText($x, $y, $txt, $dir, $paragraph_align, $debug); + + $bb = array($x - $xmarg, $y + $height - $ymarg, + $x + $width, $y + $height - $ymarg, + $x + $width, $y - $ymarg, + $x - $xmarg, $y - $ymarg); + + $this->SetTextAlign($h, $v); + $this->SetAngle($olda); + + $this->lastx = $oldx; + $this->lasty = $oldy; + + return $bb; + } + + // Set text alignment + public function SetTextAlign($halign, $valign = "bottom") + { + $this->text_halign = $halign; + $this->text_valign = $valign; + } + + public function _StrokeBuiltinFont($x, $y, $txt, $dir, $paragraph_align, &$aBoundingBox, $aDebug = false) + { + + if (is_numeric($dir) && $dir != 90 && $dir != 0) { + Util\JpGraphError::RaiseL(25091); + } + //(" Internal font does not support drawing text at arbitrary angle. Use TTF fonts instead."); + + $h = $this->GetTextHeight($txt); + $fh = $this->GetFontHeight(); + $w = $this->GetTextWidth($txt); + + if ($this->text_halign == "right") { + $x -= $dir == 0 ? $w : $h; + } elseif ($this->text_halign == "center") { + // For center we subtract 1 pixel since this makes the middle + // be prefectly in the middle + $x -= $dir == 0 ? $w / 2 - 1 : $h / 2; + } + if ($this->text_valign == "top") { + $y += $dir == 0 ? $h : $w; + } elseif ($this->text_valign == "center") { + $y += $dir == 0 ? $h / 2 : $w / 2; + } + + $use_font = $this->font_family; + + if ($dir == 90) { + imagestringup($this->img, $use_font, $x, $y, $txt, $this->current_color); + $aBoundingBox = array(round($x), round($y), round($x), round($y - $w), round($x + $h), round($y - $w), round($x + $h), round($y)); + if ($aDebug) { + // Draw bounding box + $this->PushColor('green'); + $this->Polygon($aBoundingBox, true); + $this->PopColor(); + } + } else { + if (preg_match('/\n/', $txt)) { + $tmp = preg_split('/\n/', $txt); + for ($i = 0; $i < count($tmp); ++$i) { + $w1 = $this->GetTextWidth($tmp[$i]); + if ($paragraph_align == "left") { + imagestring($this->img, $use_font, $x, $y - $h + 1 + $i * $fh, $tmp[$i], $this->current_color); + } elseif ($paragraph_align == "right") { + imagestring($this->img, $use_font, $x + ($w - $w1), $y - $h + 1 + $i * $fh, $tmp[$i], $this->current_color); + } else { + imagestring($this->img, $use_font, $x + $w / 2 - $w1 / 2, $y - $h + 1 + $i * $fh, $tmp[$i], $this->current_color); + } + } + } else { + //Put the text + imagestring($this->img, $use_font, $x, $y - $h + 1, $txt, $this->current_color); + } + if ($aDebug) { + // Draw the bounding rectangle and the bounding box + $p1 = array(round($x), round($y), round($x), round($y - $h), round($x + $w), round($y - $h), round($x + $w), round($y)); + + // Draw bounding box + $this->PushColor('green'); + $this->Polygon($p1, true); + $this->PopColor(); + + } + $aBoundingBox = array(round($x), round($y), round($x), round($y - $h), round($x + $w), round($y - $h), round($x + $w), round($y)); + } + } + + public function AddTxtCR($aTxt) + { + // If the user has just specified a '\n' + // instead of '\n\t' we have to add '\r' since + // the width will be too muchy otherwise since when + // we print we stroke the individually lines by hand. + $e = explode("\n", $aTxt); + $n = count($e); + for ($i = 0; $i < $n; ++$i) { + $e[$i] = str_replace("\r", "", $e[$i]); + } + return implode("\n\r", $e); + } + + public function NormAngle($a) + { + // Normalize angle in degrees + // Normalize angle to be between 0-360 + while ($a > 360) { + $a -= 360; + } + + while ($a < -360) { + $a += 360; + } + + if ($a < 0) { + $a = 360 + $a; + } + + return $a; + } + + public function imagettfbbox_fixed($size, $angle, $fontfile, $text) + { + + if (!USE_LIBRARY_IMAGETTFBBOX) { + + $bbox = @imagettfbbox($size, $angle, $fontfile, $text); + if ($bbox === false) { + Util\JpGraphError::RaiseL(25092, $this->font_file); + //("There is either a configuration problem with TrueType or a problem reading font file (".$this->font_file."). Make sure file exists and is in a readable place for the HTTP process. (If 'basedir' restriction is enabled in PHP then the font file must be located in the document root.). It might also be a wrongly installed FreeType library. Try uppgrading to at least FreeType 2.1.13 and recompile GD with the correct setup so it can find the new FT library."); + } + $this->bbox_cache = $bbox; + return $bbox; + } + + // The built in imagettfbbox is buggy for angles != 0 so + // we calculate this manually by getting the bounding box at + // angle = 0 and then rotate the bounding box manually + $bbox = @imagettfbbox($size, 0, $fontfile, $text); + if ($bbox === false) { + Util\JpGraphError::RaiseL(25092, $this->font_file); + //("There is either a configuration problem with TrueType or a problem reading font file (".$this->font_file."). Make sure file exists and is in a readable place for the HTTP process. (If 'basedir' restriction is enabled in PHP then the font file must be located in the document root.). It might also be a wrongly installed FreeType library. Try uppgrading to at least FreeType 2.1.13 and recompile GD with the correct setup so it can find the new FT library."); + } + + $angle = $this->NormAngle($angle); + + $a = $angle * M_PI / 180; + $ca = cos($a); + $sa = sin($a); + $ret = array(); + + // We always add 1 pixel to the left since the left edge of the bounding + // box is sometimes coinciding with the first pixel of the text + //$bbox[0] -= 1; + //$bbox[6] -= 1; + + // For roatated text we need to add extra width for rotated + // text since the kerning and stroking of the TTF is not the same as for + // text at a 0 degree angle + + if ($angle > 0.001 && abs($angle - 360) > 0.001) { + $h = abs($bbox[7] - $bbox[1]); + $w = abs($bbox[2] - $bbox[0]); + + $bbox[0] -= 2; + $bbox[6] -= 2; + // The width is underestimated so compensate for that + $bbox[2] += round($w * 0.06); + $bbox[4] += round($w * 0.06); + + // and we also need to compensate with increased height + $bbox[5] -= round($h * 0.1); + $bbox[7] -= round($h * 0.1); + + if ($angle > 90) { + // For angles > 90 we also need to extend the height further down + // by the baseline since that is also one more problem + $bbox[1] += round($h * 0.15); + $bbox[3] += round($h * 0.15); + + // and also make it slighty less height + $bbox[7] += round($h * 0.05); + $bbox[5] += round($h * 0.05); + + // And we need to move the box slightly top the rright (from a tetx perspective) + $bbox[0] += round($w * 0.02); + $bbox[6] += round($w * 0.02); + + if ($angle > 180) { + // And we need to move the box slightly to the left (from a text perspective) + $bbox[0] -= round($w * 0.02); + $bbox[6] -= round($w * 0.02); + $bbox[2] -= round($w * 0.02); + $bbox[4] -= round($w * 0.02); + + } + + } + for ($i = 0; $i < 7; $i += 2) { + $ret[$i] = round($bbox[$i] * $ca + $bbox[$i + 1] * $sa); + $ret[$i + 1] = round($bbox[$i + 1] * $ca - $bbox[$i] * $sa); + } + $this->bbox_cache = $ret; + return $ret; + } else { + $this->bbox_cache = $bbox; + return $bbox; + } + } + + // Deprecated + public function GetTTFBBox($aTxt, $aAngle = 0) + { + $bbox = $this->imagettfbbox_fixed($this->font_size, $aAngle, $this->font_file, $aTxt); + return $bbox; + } + + public function GetBBoxTTF($aTxt, $aAngle = 0) + { + // Normalize the bounding box to become a minimum + // enscribing rectangle + + $aTxt = $this->AddTxtCR($aTxt); + + if (!is_readable($this->font_file)) { + Util\JpGraphError::RaiseL(25093, $this->font_file); + //('Can not read font file ('.$this->font_file.') in call to Image::GetBBoxTTF. Please make sure that you have set a font before calling this method and that the font is installed in the TTF directory.'); + } + $bbox = $this->imagettfbbox_fixed($this->font_size, $aAngle, $this->font_file, $aTxt); + + if ($aAngle == 0) { + return $bbox; + } + + if ($aAngle >= 0) { + if ($aAngle <= 90) { + //<=0 + $bbox = array($bbox[6], $bbox[1], $bbox[2], $bbox[1], + $bbox[2], $bbox[5], $bbox[6], $bbox[5]); + } elseif ($aAngle <= 180) { + //<= 2 + $bbox = array($bbox[4], $bbox[7], $bbox[0], $bbox[7], + $bbox[0], $bbox[3], $bbox[4], $bbox[3]); + } elseif ($aAngle <= 270) { + //<= 3 + $bbox = array($bbox[2], $bbox[5], $bbox[6], $bbox[5], + $bbox[6], $bbox[1], $bbox[2], $bbox[1]); + } else { + $bbox = array($bbox[0], $bbox[3], $bbox[4], $bbox[3], + $bbox[4], $bbox[7], $bbox[0], $bbox[7]); + } + } elseif ($aAngle < 0) { + if ($aAngle <= -270) { + // <= -3 + $bbox = array($bbox[6], $bbox[1], $bbox[2], $bbox[1], + $bbox[2], $bbox[5], $bbox[6], $bbox[5]); + } elseif ($aAngle <= -180) { + // <= -2 + $bbox = array($bbox[0], $bbox[3], $bbox[4], $bbox[3], + $bbox[4], $bbox[7], $bbox[0], $bbox[7]); + } elseif ($aAngle <= -90) { + // <= -1 + $bbox = array($bbox[2], $bbox[5], $bbox[6], $bbox[5], + $bbox[6], $bbox[1], $bbox[2], $bbox[1]); + } else { + $bbox = array($bbox[0], $bbox[3], $bbox[4], $bbox[3], + $bbox[4], $bbox[7], $bbox[0], $bbox[7]); + } + } + return $bbox; + } + + public function GetBBoxHeight($aTxt, $aAngle = 0) + { + $box = $this->GetBBoxTTF($aTxt, $aAngle); + return abs($box[7] - $box[1]); + } + + public function GetBBoxWidth($aTxt, $aAngle = 0) + { + $box = $this->GetBBoxTTF($aTxt, $aAngle); + return $box[2] - $box[0] + 1; + } + + public function _StrokeTTF($x, $y, $txt, $dir, $paragraph_align, &$aBoundingBox, $debug = false) + { + + // Setup default inter line margin for paragraphs to be + // 3% of the font height. + $ConstLineSpacing = 0.03; + + // Remember the anchor point before adjustment + if ($debug) { + $ox = $x; + $oy = $y; + } + + if (!preg_match('/\n/', $txt) || ($dir > 0 && preg_match('/\n/', $txt))) { + // Format a single line + + $txt = $this->AddTxtCR($txt); + $bbox = $this->GetBBoxTTF($txt, $dir); + $width = $this->GetBBoxWidth($txt, $dir); + $height = $this->GetBBoxHeight($txt, $dir); + + // The special alignment "basepoint" is mostly used internally + // in the library. This will put the anchor position at the left + // basepoint of the tetx. This is the default anchor point for + // TTF text. + + if ($this->text_valign != 'basepoint') { + // Align x,y ot lower left corner of bbox + + if ($this->text_halign == 'right') { + $x -= $width; + $x -= $bbox[0]; + } elseif ($this->text_halign == 'center') { + $x -= $width / 2; + $x -= $bbox[0]; + } elseif ($this->text_halign == 'baseline') { + // This is only support for text at 90 degree !! + // Do nothing the text is drawn at baseline by default + } + + if ($this->text_valign == 'top') { + $y -= $bbox[1]; // Adjust to bottom of text + $y += $height; + } elseif ($this->text_valign == 'center') { + $y -= $bbox[1]; // Adjust to bottom of text + $y += $height / 2; + } elseif ($this->text_valign == 'baseline') { + // This is only support for text at 0 degree !! + // Do nothing the text is drawn at baseline by default + } + } + ImageTTFText($this->img, $this->font_size, $dir, $x, $y, + $this->current_color, $this->font_file, $txt); + + // Calculate and return the co-ordinates for the bounding box + $box = $this->imagettfbbox_fixed($this->font_size, $dir, $this->font_file, $txt); + $p1 = array(); + + for ($i = 0; $i < 4; ++$i) { + $p1[] = round($box[$i * 2] + $x); + $p1[] = round($box[$i * 2 + 1] + $y); + } + $aBoundingBox = $p1; + + // Debugging code to highlight the bonding box and bounding rectangle + // For text at 0 degrees the bounding box and bounding rectangle are the + // same + if ($debug) { + // Draw the bounding rectangle and the bounding box + + $p = array(); + $p1 = array(); + + for ($i = 0; $i < 4; ++$i) { + $p[] = $bbox[$i * 2] + $x; + $p[] = $bbox[$i * 2 + 1] + $y; + $p1[] = $box[$i * 2] + $x; + $p1[] = $box[$i * 2 + 1] + $y; + } + + // Draw bounding box + $this->PushColor('green'); + $this->Polygon($p1, true); + $this->PopColor(); + + // Draw bounding rectangle + $this->PushColor('darkgreen'); + $this->Polygon($p, true); + $this->PopColor(); + + // Draw a cross at the anchor point + $this->PushColor('red'); + $this->Line($ox - 15, $oy, $ox + 15, $oy); + $this->Line($ox, $oy - 15, $ox, $oy + 15); + $this->PopColor(); + } + } else { + // Format a text paragraph + $fh = $this->GetFontHeight(); + + // Line margin is 25% of font height + $linemargin = round($fh * $ConstLineSpacing); + $fh += $linemargin; + $w = $this->GetTextWidth($txt); + + $y -= $linemargin / 2; + $tmp = preg_split('/\n/', $txt); + $nl = count($tmp); + $h = $nl * $fh; + + if ($this->text_halign == 'right') { + $x -= $dir == 0 ? $w : $h; + } elseif ($this->text_halign == 'center') { + $x -= $dir == 0 ? $w / 2 : $h / 2; + } + + if ($this->text_valign == 'top') { + $y += $dir == 0 ? $h : $w; + } elseif ($this->text_valign == 'center') { + $y += $dir == 0 ? $h / 2 : $w / 2; + } + + // Here comes a tricky bit. + // Since we have to give the position for the string at the + // baseline this means thaht text will move slightly up + // and down depending on any of it's character descend below + // the baseline, for example a 'g'. To adjust the Y-position + // we therefore adjust the text with the baseline Y-offset + // as used for the current font and size. This will keep the + // baseline at a fixed positoned disregarding the actual + // characters in the string. + $standardbox = $this->GetTTFBBox('Gg', $dir); + $yadj = $standardbox[1]; + $xadj = $standardbox[0]; + $aBoundingBox = array(); + for ($i = 0; $i < $nl; ++$i) { + $wl = $this->GetTextWidth($tmp[$i]); + $bbox = $this->GetTTFBBox($tmp[$i], $dir); + if ($paragraph_align == 'left') { + $xl = $x; + } elseif ($paragraph_align == 'right') { + $xl = $x + ($w - $wl); + } else { + // Center + $xl = $x + $w / 2 - $wl / 2; + } + + // In theory we should adjust with full pre-lead to get the lines + // lined up but this doesn't look good so therfore we only adjust with + // half th pre-lead + $xl -= $bbox[0] / 2; + $yl = $y - $yadj; + //$xl = $xl- $xadj; + ImageTTFText($this->img, $this->font_size, $dir, $xl, $yl - ($h - $fh) + $fh * $i, + $this->current_color, $this->font_file, $tmp[$i]); + + // echo "xl=$xl,".$tmp[$i]."
        "; + if ($debug) { + // Draw the bounding rectangle around each line + $box = @ImageTTFBBox($this->font_size, $dir, $this->font_file, $tmp[$i]); + $p = array(); + for ($j = 0; $j < 4; ++$j) { + $p[] = $bbox[$j * 2] + $xl; + $p[] = $bbox[$j * 2 + 1] + $yl - ($h - $fh) + $fh * $i; + } + + // Draw bounding rectangle + $this->PushColor('darkgreen'); + $this->Polygon($p, true); + $this->PopColor(); + } + } + + // Get the bounding box + $bbox = $this->GetBBoxTTF($txt, $dir); + for ($j = 0; $j < 4; ++$j) { + $bbox[$j * 2] += round($x); + $bbox[$j * 2 + 1] += round($y - ($h - $fh) - $yadj); + } + $aBoundingBox = $bbox; + + if ($debug) { + // Draw a cross at the anchor point + $this->PushColor('red'); + $this->Line($ox - 25, $oy, $ox + 25, $oy); + $this->Line($ox, $oy - 25, $ox, $oy + 25); + $this->PopColor(); + } + + } + } + + public function StrokeText($x, $y, $txt, $dir = 0, $paragraph_align = "left", $debug = false) + { + + $x = round($x); + $y = round($y); + + // Do special language encoding + $txt = $this->langconv->Convert($txt, $this->font_family); + + if (!is_numeric($dir)) { + Util\JpGraphError::RaiseL(25094); //(" Direction for text most be given as an angle between 0 and 90."); + } + + if ($this->font_family >= FF_FONT0 && $this->font_family <= FF_FONT2 + 1) { + $this->_StrokeBuiltinFont($x, $y, $txt, $dir, $paragraph_align, $boundingbox, $debug); + } elseif ($this->font_family >= _FIRST_FONT && $this->font_family <= _LAST_FONT) { + $this->_StrokeTTF($x, $y, $txt, $dir, $paragraph_align, $boundingbox, $debug); + } else { + Util\JpGraphError::RaiseL(25095); //(" Unknown font font family specification. "); + } + return $boundingbox; + } + + public function SetMargin($lm, $rm, $tm, $bm) + { + + $this->left_margin = $lm; + $this->right_margin = $rm; + $this->top_margin = $tm; + $this->bottom_margin = $bm; + + $this->plotwidth = $this->width - $this->left_margin - $this->right_margin; + $this->plotheight = $this->height - $this->top_margin - $this->bottom_margin; + + if ($this->width > 0 && $this->height > 0) { + if ($this->plotwidth < 0 || $this->plotheight < 0) { + Util\JpGraphError::RaiseL(25130, $this->plotwidth, $this->plotheight); + //Util\JpGraphError::raise("To small plot area. ($lm,$rm,$tm,$bm : $this->plotwidth x $this->plotheight). With the given image size and margins there is to little space left for the plot. Increase the plot size or reduce the margins."); + } + } + } + + public function SetTransparent($color) + { + imagecolortransparent($this->img, $this->rgb->allocate($color)); + } + + public function SetColor($color, $aAlpha = 0) + { + $this->current_color_name = $color; + $this->current_color = $this->rgb->allocate($color, $aAlpha); + if ($this->current_color == -1) { + $tc = imagecolorstotal($this->img); + Util\JpGraphError::RaiseL(25096); + //("Can't allocate any more colors. Image has already allocated maximum of $tc colors. This might happen if you have anti-aliasing turned on together with a background image or perhaps gradient fill since this requires many, many colors. Try to turn off anti-aliasing. If there is still a problem try downgrading the quality of the background image to use a smaller pallete to leave some entries for your graphs. You should try to limit the number of colors in your background image to 64. If there is still problem set the constant DEFINE(\"USE_APPROX_COLORS\",true); in jpgraph.php This will use approximative colors when the palette is full. Unfortunately there is not much JpGraph can do about this since the palette size is a limitation of current graphic format and what the underlying GD library suppports."); + } + return $this->current_color; + } + + public function PushColor($color) + { + if ($color != "") { + $this->colorstack[$this->colorstackidx] = $this->current_color_name; + $this->colorstack[$this->colorstackidx + 1] = $this->current_color; + $this->colorstackidx += 2; + $this->SetColor($color); + } else { + Util\JpGraphError::RaiseL(25097); //("Color specified as empty string in PushColor()."); + } + } + + public function PopColor() + { + if ($this->colorstackidx < 1) { + Util\JpGraphError::RaiseL(25098); //(" Negative Color stack index. Unmatched call to PopColor()"); + } + $this->current_color = $this->colorstack[--$this->colorstackidx]; + $this->current_color_name = $this->colorstack[--$this->colorstackidx]; + } + + public function SetLineWeight($weight) + { + $old = $this->line_weight; + imagesetthickness($this->img, $weight); + $this->line_weight = $weight; + return $old; + } + + public function SetStartPoint($x, $y) + { + $this->lastx = round($x); + $this->lasty = round($y); + } + + public function Arc($cx, $cy, $w, $h, $s, $e) + { + // GD Arc doesn't like negative angles + while ($s < 0) { + $s += 360; + } + + while ($e < 0) { + $e += 360; + } + + imagearc($this->img, round($cx), round($cy), round($w), round($h), $s, $e, $this->current_color); + } + + public function FilledArc($xc, $yc, $w, $h, $s, $e, $style = '') + { + $s = round($s); + $e = round($e); + while ($s < 0) { + $s += 360; + } + + while ($e < 0) { + $e += 360; + } + + if ($style == '') { + $style = IMG_ARC_PIE; + } + + if (abs($s - $e) > 0) { + imagefilledarc($this->img, round($xc), round($yc), round($w), round($h), $s, $e, $this->current_color, $style); + // $this->DrawImageSmoothArc($this->img,round($xc),round($yc),round($w),round($h),$s,$e,$this->current_color,$style); + } + } + + public function FilledCakeSlice($cx, $cy, $w, $h, $s, $e) + { + $this->CakeSlice($cx, $cy, $w, $h, $s, $e, $this->current_color_name); + } + + public function CakeSlice($xc, $yc, $w, $h, $s, $e, $fillcolor = "", $arccolor = "") + { + $s = round($s); + $e = round($e); + $w = round($w); + $h = round($h); + $xc = round($xc); + $yc = round($yc); + if ($s == $e) { + // A full circle. We draw this a plain circle + $this->PushColor($fillcolor); + imagefilledellipse($this->img, $xc, $yc, 2 * $w, 2 * $h, $this->current_color); + + // If antialiasing is used then we often don't have any color no the surrounding + // arc. So, we need to check for this special case so we don't send an empty + // color to the push function. In this case we use the fill color for the arc as well + if ($arccolor != '') { + $this->PopColor(); + $this->PushColor($arccolor); + } + imageellipse($this->img, $xc, $yc, 2 * $w, 2 * $h, $this->current_color); + $this->Line($xc, $yc, cos($s * M_PI / 180) * $w + $xc, $yc + sin($s * M_PI / 180) * $h); + $this->PopColor(); + } else { + $this->PushColor($fillcolor); + $this->FilledArc($xc, $yc, 2 * $w, 2 * $h, $s, $e); + $this->PopColor(); + if ($arccolor != "") { + $this->PushColor($arccolor); + // We add 2 pixels to make the Arc() better aligned with + // the filled arc. + imagefilledarc($this->img, $xc, $yc, 2 * $w, 2 * $h, $s, $e, $this->current_color, IMG_ARC_NOFILL | IMG_ARC_EDGED); + $this->PopColor(); + } + } + } + + public function Ellipse($xc, $yc, $w, $h) + { + $this->Arc($xc, $yc, $w, $h, 0, 360); + } + + public function Circle($xc, $yc, $r) + { + imageellipse($this->img, round($xc), round($yc), $r * 2, $r * 2, $this->current_color); + // $this->DrawImageSmoothArc($this->img,round($xc),round($yc),$r*2+1,$r*2+1,0,360,$this->current_color); + // $this->imageSmoothCircle($this->img, round($xc),round($yc), $r*2+1, $this->current_color); + } + + public function FilledCircle($xc, $yc, $r) + { + imagefilledellipse($this->img, round($xc), round($yc), 2 * $r, 2 * $r, $this->current_color); + // $this->DrawImageSmoothArc($this->img, round($xc), round($yc), 2*$r, 2*$r, 0, 360, $this->current_color); + } + + // Linear Color InterPolation + public function lip($f, $t, $p) + { + $p = round($p, 1); + $r = $f[0] + ($t[0] - $f[0]) * $p; + $g = $f[1] + ($t[1] - $f[1]) * $p; + $b = $f[2] + ($t[2] - $f[2]) * $p; + return array($r, $g, $b); + } + + // Set line style dashed, dotted etc + public function SetLineStyle($s) + { + if (is_numeric($s)) { + if ($s < 1 || $s > 4) { + Util\JpGraphError::RaiseL(25101, $s); //(" Illegal numeric argument to SetLineStyle(): ($s)"); + } + } elseif (is_string($s)) { + if ($s == "solid") { + $s = 1; + } elseif ($s == "dotted") { + $s = 2; + } elseif ($s == "dashed") { + $s = 3; + } elseif ($s == "longdashed") { + $s = 4; + } else { + Util\JpGraphError::RaiseL(25102, $s); //(" Illegal string argument to SetLineStyle(): $s"); + } + } else { + Util\JpGraphError::RaiseL(25103, $s); //(" Illegal argument to SetLineStyle $s"); + } + $old = $this->line_style; + $this->line_style = $s; + return $old; + } + + // Same as Line but take the line_style into account + public function StyleLine($x1, $y1, $x2, $y2, $aStyle = '', $from_grid_class = false) + { + if ($this->line_weight <= 0) { + return; + } + + if ($aStyle === '') { + $aStyle = $this->line_style; + } + + $dashed_line_method = 'DashedLine'; + if ($from_grid_class) { + $dashed_line_method = 'DashedLineForGrid'; + } + + // Add error check since dashed line will only work if anti-alias is disabled + // this is a limitation in GD + + if ($aStyle == 1) { + // Solid style. We can handle anti-aliasing for this + $this->Line($x1, $y1, $x2, $y2); + } else { + // Since the GD routines doesn't handle AA for styled line + // we have no option than to turn it off to get any lines at + // all if the weight > 1 + $oldaa = $this->GetAntiAliasing(); + if ($oldaa && $this->line_weight > 1) { + $this->SetAntiAliasing(false); + } + + switch ($aStyle) { + case 2: // Dotted + $this->$dashed_line_method($x1, $y1, $x2, $y2, 2, 6); + break; + case 3: // Dashed + $this->$dashed_line_method($x1, $y1, $x2, $y2, 5, 9); + break; + case 4: // Longdashes + $this->$dashed_line_method($x1, $y1, $x2, $y2, 9, 13); + break; + default: + Util\JpGraphError::RaiseL(25104, $this->line_style); //(" Unknown line style: $this->line_style "); + break; + } + if ($oldaa) { + $this->SetAntiAliasing(true); + } + } + } + + public function DashedLine($x1, $y1, $x2, $y2, $dash_length = 1, $dash_space = 4) + { + + if ($this->line_weight <= 0) { + return; + } + + // Add error check to make sure anti-alias is not enabled. + // Dashed line does not work with anti-alias enabled. This + // is a limitation in GD. + if ($this->use_anti_aliasing) { + // Util\JpGraphError::RaiseL(25129); // Anti-alias can not be used with dashed lines. Please disable anti-alias or use solid lines. + } + + $x1 = round($x1); + $x2 = round($x2); + $y1 = round($y1); + $y2 = round($y2); + + $dash_length *= SUPERSAMPLING_SCALE; + $dash_space *= SUPERSAMPLING_SCALE; + + $style = array_fill(0, $dash_length, $this->current_color); + $style = array_pad($style, $dash_space, IMG_COLOR_TRANSPARENT); + imagesetstyle($this->img, $style); + imageline($this->img, $x1, $y1, $x2, $y2, IMG_COLOR_STYLED); + + $this->lastx = $x2; + $this->lasty = $y2; + } + + public function DashedLineForGrid($x1, $y1, $x2, $y2, $dash_length = 1, $dash_space = 4) + { + + if ($this->line_weight <= 0) { + return; + } + + // Add error check to make sure anti-alias is not enabled. + // Dashed line does not work with anti-alias enabled. This + // is a limitation in GD. + if ($this->use_anti_aliasing) { + // Util\JpGraphError::RaiseL(25129); // Anti-alias can not be used with dashed lines. Please disable anti-alias or use solid lines. + } + + $x1 = round($x1); + $x2 = round($x2); + $y1 = round($y1); + $y2 = round($y2); + + /* + $dash_length *= $this->scale; + $dash_space *= $this->scale; + */ + + $dash_length = 2; + $dash_length = 4; + imagesetthickness($this->img, 1); + $style = array_fill(0, $dash_length, $this->current_color); //hexdec('CCCCCC')); + $style = array_pad($style, $dash_space, IMG_COLOR_TRANSPARENT); + imagesetstyle($this->img, $style); + imageline($this->img, $x1, $y1, $x2, $y2, IMG_COLOR_STYLED); + + $this->lastx = $x2; + $this->lasty = $y2; + } + + public function Line($x1, $y1, $x2, $y2) + { + + if ($this->line_weight <= 0) { + return; + } + + $x1 = round($x1); + $x2 = round($x2); + $y1 = round($y1); + $y2 = round($y2); + + imageline($this->img, $x1, $y1, $x2, $y2, $this->current_color); + // $this->DrawLine($this->img, $x1, $y1, $x2, $y2, $this->line_weight, $this->current_color); + $this->lastx = $x2; + $this->lasty = $y2; + } + + public function Polygon($p, $closed = false, $fast = false) + { + + if ($this->line_weight <= 0) { + return; + } + + $n = count($p); + $oldx = $p[0]; + $oldy = $p[1]; + if ($fast) { + for ($i = 2; $i < $n; $i += 2) { + imageline($this->img, $oldx, $oldy, $p[$i], $p[$i + 1], $this->current_color); + $oldx = $p[$i]; + $oldy = $p[$i + 1]; + } + if ($closed) { + imageline($this->img, $p[$n * 2 - 2], $p[$n * 2 - 1], $p[0], $p[1], $this->current_color); + } + } else { + for ($i = 2; $i < $n; $i += 2) { + $this->StyleLine($oldx, $oldy, $p[$i], $p[$i + 1]); + $oldx = $p[$i]; + $oldy = $p[$i + 1]; + } + if ($closed) { + $this->StyleLine($oldx, $oldy, $p[0], $p[1]); + } + } + } + + public function FilledPolygon($pts) + { + $n = count($pts); + if ($n == 0) { + Util\JpGraphError::RaiseL(25105); //('NULL data specified for a filled polygon. Check that your data is not NULL.'); + } + for ($i = 0; $i < $n; ++$i) { + $pts[$i] = round($pts[$i]); + } + $old = $this->line_weight; + imagesetthickness($this->img, 1); + imagefilledpolygon($this->img, $pts, count($pts) / 2, $this->current_color); + $this->line_weight = $old; + imagesetthickness($this->img, $old); + } + + public function Rectangle($xl, $yu, $xr, $yl) + { + $this->Polygon(array($xl, $yu, $xr, $yu, $xr, $yl, $xl, $yl, $xl, $yu)); + } + + public function FilledRectangle($xl, $yu, $xr, $yl) + { + $this->FilledPolygon(array($xl, $yu, $xr, $yu, $xr, $yl, $xl, $yl)); + } + + public function FilledRectangle2($xl, $yu, $xr, $yl, $color1, $color2, $style = 1) + { + // Fill a rectangle with lines of two colors + if ($style === 1) { + // Horizontal stripe + if ($yl < $yu) { + $t = $yl; + $yl = $yu; + $yu = $t; + } + for ($y = $yu; $y <= $yl; ++$y) { + $this->SetColor($color1); + $this->Line($xl, $y, $xr, $y); + ++$y; + $this->SetColor($color2); + $this->Line($xl, $y, $xr, $y); + } + } else { + if ($xl < $xl) { + $t = $xl; + $xl = $xr; + $xr = $t; + } + for ($x = $xl; $x <= $xr; ++$x) { + $this->SetColor($color1); + $this->Line($x, $yu, $x, $yl); + ++$x; + $this->SetColor($color2); + $this->Line($x, $yu, $x, $yl); + } + } + } + + public function ShadowRectangle($xl, $yu, $xr, $yl, $fcolor = false, $shadow_width = 4, $shadow_color = 'darkgray', $useAlpha = true) + { + // This is complicated by the fact that we must also handle the case where + // the reactangle has no fill color + $xl = floor($xl); + $yu = floor($yu); + $xr = floor($xr); + $yl = floor($yl); + $this->PushColor($shadow_color); + $shadowAlpha = 0; + $this->SetLineWeight(1); + $this->SetLineStyle('solid'); + $basecolor = $this->rgb->Color($shadow_color); + $shadow_color = array($basecolor[0], $basecolor[1], $basecolor[2]); + for ($i = 0; $i < $shadow_width; ++$i) { + $this->SetColor($shadow_color, $shadowAlpha); + $this->Line($xr - $shadow_width + $i, $yu + $shadow_width, + $xr - $shadow_width + $i, $yl - $shadow_width - 1 + $i); + $this->Line($xl + $shadow_width, $yl - $shadow_width + $i, + $xr - $shadow_width + $i, $yl - $shadow_width + $i); + if ($useAlpha) { + $shadowAlpha += 1.0 / $shadow_width; + } + + } + + $this->PopColor(); + if ($fcolor == false) { + $this->Rectangle($xl, $yu, $xr - $shadow_width - 1, $yl - $shadow_width - 1); + } else { + $this->PushColor($fcolor); + $this->FilledRectangle($xl, $yu, $xr - $shadow_width - 1, $yl - $shadow_width - 1); + $this->PopColor(); + $this->Rectangle($xl, $yu, $xr - $shadow_width - 1, $yl - $shadow_width - 1); + } + } + + public function FilledRoundedRectangle($xt, $yt, $xr, $yl, $r = 5) + { + if ($r == 0) { + $this->FilledRectangle($xt, $yt, $xr, $yl); + return; + } + + // To avoid overlapping fillings (which will look strange + // when alphablending is enabled) we have no choice but + // to fill the five distinct areas one by one. + + // Center square + $this->FilledRectangle($xt + $r, $yt + $r, $xr - $r, $yl - $r); + // Top band + $this->FilledRectangle($xt + $r, $yt, $xr - $r, $yt + $r); + // Bottom band + $this->FilledRectangle($xt + $r, $yl - $r, $xr - $r, $yl); + // Left band + $this->FilledRectangle($xt, $yt + $r, $xt + $r, $yl - $r); + // Right band + $this->FilledRectangle($xr - $r, $yt + $r, $xr, $yl - $r); + + // Topleft & Topright arc + $this->FilledArc($xt + $r, $yt + $r, $r * 2, $r * 2, 180, 270); + $this->FilledArc($xr - $r, $yt + $r, $r * 2, $r * 2, 270, 360); + + // Bottomleft & Bottom right arc + $this->FilledArc($xt + $r, $yl - $r, $r * 2, $r * 2, 90, 180); + $this->FilledArc($xr - $r, $yl - $r, $r * 2, $r * 2, 0, 90); + + } + + public function RoundedRectangle($xt, $yt, $xr, $yl, $r = 5) + { + + if ($r == 0) { + $this->Rectangle($xt, $yt, $xr, $yl); + return; + } + + // Top & Bottom line + $this->Line($xt + $r, $yt, $xr - $r, $yt); + $this->Line($xt + $r, $yl, $xr - $r, $yl); + + // Left & Right line + $this->Line($xt, $yt + $r, $xt, $yl - $r); + $this->Line($xr, $yt + $r, $xr, $yl - $r); + + // Topleft & Topright arc + $this->Arc($xt + $r, $yt + $r, $r * 2, $r * 2, 180, 270); + $this->Arc($xr - $r, $yt + $r, $r * 2, $r * 2, 270, 360); + + // Bottomleft & Bottomright arc + $this->Arc($xt + $r, $yl - $r, $r * 2, $r * 2, 90, 180); + $this->Arc($xr - $r, $yl - $r, $r * 2, $r * 2, 0, 90); + } + + public function FilledBevel($x1, $y1, $x2, $y2, $depth = 2, $color1 = 'white@0.4', $color2 = 'darkgray@0.4') + { + $this->FilledRectangle($x1, $y1, $x2, $y2); + $this->Bevel($x1, $y1, $x2, $y2, $depth, $color1, $color2); + } + + public function Bevel($x1, $y1, $x2, $y2, $depth = 2, $color1 = 'white@0.4', $color2 = 'black@0.5') + { + $this->PushColor($color1); + for ($i = 0; $i < $depth; ++$i) { + $this->Line($x1 + $i, $y1 + $i, $x1 + $i, $y2 - $i); + $this->Line($x1 + $i, $y1 + $i, $x2 - $i, $y1 + $i); + } + $this->PopColor(); + + $this->PushColor($color2); + for ($i = 0; $i < $depth; ++$i) { + $this->Line($x1 + $i, $y2 - $i, $x2 - $i, $y2 - $i); + $this->Line($x2 - $i, $y1 + $i, $x2 - $i, $y2 - $i - 1); + } + $this->PopColor(); + } + + public function StyleLineTo($x, $y) + { + $this->StyleLine($this->lastx, $this->lasty, $x, $y); + $this->lastx = $x; + $this->lasty = $y; + } + + public function LineTo($x, $y) + { + $this->Line($this->lastx, $this->lasty, $x, $y); + $this->lastx = $x; + $this->lasty = $y; + } + + public function Point($x, $y) + { + imagesetpixel($this->img, round($x), round($y), $this->current_color); + } + + public function Fill($x, $y) + { + imagefill($this->img, round($x), round($y), $this->current_color); + } + + public function FillToBorder($x, $y, $aBordColor) + { + $bc = $this->rgb->allocate($aBordColor); + if ($bc == -1) { + Util\JpGraphError::RaiseL(25106); //('Image::FillToBorder : Can not allocate more colors'); + } + imagefilltoborder($this->img, round($x), round($y), $bc, $this->current_color); + } + + public function SetExpired($aFlg = true) + { + $this->expired = $aFlg; + } + + // Generate image header + public function Headers() + { + + // In case we are running from the command line with the client version of + // PHP we can't send any headers. + $sapi = php_sapi_name(); + if ($sapi == 'cli') { + return; + } + + // These parameters are set by headers_sent() but they might cause + // an undefined variable error unless they are initilized + $file = ''; + $lineno = ''; + if (headers_sent($file, $lineno)) { + $file = basename($file); + $t = new ErrMsgText(); + $msg = $t->Get(10, $file, $lineno); + die($msg); + } + + if ($this->expired) { + header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); + header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT"); + header("Cache-Control: no-cache, must-revalidate"); + header("Pragma: no-cache"); + } + header("Content-type: image/$this->img_format"); + } + + // Adjust image quality for formats that allow this + public function SetQuality($q) + { + $this->quality = $q; + } + + // Stream image to browser or to file + public function Stream($aFile = "") + { + $this->DoSupersampling(); + + $func = "image" . $this->img_format; + if ($this->img_format == "jpeg" && $this->quality != null) { + $res = @$func($this->img, $aFile, $this->quality); + } else { + if ($aFile != "") { + $res = @$func($this->img, $aFile); + if (!$res) { + Util\JpGraphError::RaiseL(25107, $aFile); //("Can't write to file '$aFile'. Check that the process running PHP has enough permission."); + } + } else { + $res = @$func($this->img); + if (!$res) { + Util\JpGraphError::RaiseL(25108); //("Can't stream image. This is most likely due to a faulty PHP/GD setup. Try to recompile PHP and use the built-in GD library that comes with PHP."); + } + + } + } + } + + // Do SuperSampling using $scale + public function DoSupersampling() + { + if (SUPERSAMPLING_SCALE <= 1) { + return $this->img; + } + + $dst_img = @imagecreatetruecolor($this->original_width, $this->original_height); + imagecopyresampled($dst_img, $this->img, 0, 0, 0, 0, $this->original_width, $this->original_height, $this->width, $this->height); + $this->Destroy(); + return $this->img = $dst_img; + } + + // Clear resources used by image (this is normally not used since all resources are/should be + // returned when the script terminates + public function Destroy() + { + imagedestroy($this->img); + } + + // Specify image format. Note depending on your installation + // of PHP not all formats may be supported. + public function SetImgFormat($aFormat, $aQuality = 75) + { + $this->quality = $aQuality; + $aFormat = strtolower($aFormat); + $tst = true; + $supported = imagetypes(); + if ($aFormat == "auto") { + if ($supported & IMG_PNG) { + $this->img_format = "png"; + } elseif ($supported & IMG_JPG) { + $this->img_format = "jpeg"; + } elseif ($supported & IMG_GIF) { + $this->img_format = "gif"; + } elseif ($supported & IMG_WBMP) { + $this->img_format = "wbmp"; + } elseif ($supported & IMG_XPM) { + $this->img_format = "xpm"; + } else { + Util\JpGraphError::RaiseL(25109); //("Your PHP (and GD-lib) installation does not appear to support any known graphic formats. You need to first make sure GD is compiled as a module to PHP. If you also want to use JPEG images you must get the JPEG library. Please see the PHP docs for details."); + } + return true; + } else { + if ($aFormat == "jpeg" || $aFormat == "png" || $aFormat == "gif") { + if ($aFormat == "jpeg" && !($supported & IMG_JPG)) { + $tst = false; + } elseif ($aFormat == "png" && !($supported & IMG_PNG)) { + $tst = false; + } elseif ($aFormat == "gif" && !($supported & IMG_GIF)) { + $tst = false; + } elseif ($aFormat == "wbmp" && !($supported & IMG_WBMP)) { + $tst = false; + } elseif ($aFormat == "xpm" && !($supported & IMG_XPM)) { + $tst = false; + } else { + $this->img_format = $aFormat; + return true; + } + } else { + $tst = false; + } + if (!$tst) { + Util\JpGraphError::RaiseL(25110, $aFormat); //(" Your PHP installation does not support the chosen graphic format: $aFormat"); + } + } + } + + /** + * Draw Line + */ + public function DrawLine($im, $x1, $y1, $x2, $y2, $weight, $color) + { + if ($weight == 1) { + return imageline($im, $x1, $y1, $x2, $y2, $color); + } + + $angle = (atan2(($y1 - $y2), ($x2 - $x1))); + + $dist_x = $weight * (sin($angle)) / 2; + $dist_y = $weight * (cos($angle)) / 2; + + $p1x = ceil(($x1 + $dist_x)); + $p1y = ceil(($y1 + $dist_y)); + $p2x = ceil(($x2 + $dist_x)); + $p2y = ceil(($y2 + $dist_y)); + $p3x = ceil(($x2 - $dist_x)); + $p3y = ceil(($y2 - $dist_y)); + $p4x = ceil(($x1 - $dist_x)); + $p4y = ceil(($y1 - $dist_y)); + + $array = array($p1x, $p1y, $p2x, $p2y, $p3x, $p3y, $p4x, $p4y); + imagefilledpolygon($im, $array, (count($array) / 2), $color); + + // for antialias + imageline($im, $p1x, $p1y, $p2x, $p2y, $color); + imageline($im, $p3x, $p3y, $p4x, $p4y, $color); + return; + + return imageline($this->img, $x1, $y1, $x2, $y2, $this->current_color); + $weight = 8; + if ($weight <= 1) { + return imageline($this->img, $x1, $y1, $x2, $y2, $this->current_color); + } + + $pts = array(); + + $weight /= 2; + + if ($y2 - $y1 == 0) { + // x line + $pts = array(); + $pts[] = $x1; + $pts[] = $y1 - $weight; + $pts[] = $x1; + $pts[] = $y1 + $weight; + $pts[] = $x2; + $pts[] = $y2 + $weight; + $pts[] = $x2; + $pts[] = $y2 - $weight; + + } elseif ($x2 - $x1 == 0) { + // y line + $pts = array(); + $pts[] = $x1 - $weight; + $pts[] = $y1; + $pts[] = $x1 + $weight; + $pts[] = $y1; + $pts[] = $x2 + $weight; + $pts[] = $y2; + $pts[] = $x2 - $weight; + $pts[] = $y2; + + } else { + + var_dump($x1, $x2, $y1, $y2); + $length = sqrt(pow($x2 - $x1, 2) + pow($y2 - $y1, 2)); + var_dump($length);exit; + exit; + + /* + $lean = ($y2 - $y1) / ($x2 - $x1); + $lean2 = -1 / $lean; + $sin = $lean / ($y2 - $y1); + $cos = $lean / ($x2 - $x1); + + $pts[] = $x1 + (-$weight * $sin); $pts[] = $y1 + (-$weight * $cos); + $pts[] = $x1 + (+$weight * $sin); $pts[] = $y1 + (+$weight * $cos); + $pts[] = $x2 + (+$weight * $sin); $pts[] = $y2 + (+$weight * $cos); + $pts[] = $x2 + (-$weight * $sin); $pts[] = $y2 + (-$weight * $cos); + */ + } + + //print_r($pts);exit; + if (count($pts) / 2 < 3) { + return; + } + + imagesetthickness($im, 1); + imagefilledpolygon($im, $pts, count($pts) / 2, $color); + + $weight *= 2; + + // $this->DrawImageSmoothArc($im, $x1, $y1, $weight, $weight, 0, 360, $color); + // $this->DrawImageSmoothArc($im, $x2, $y2, $weight, $weight, 0, 360, $color); + } + + public function DrawImageSmoothArc($im, $xc, $yc, $w, $h, $s, $e, $color, $style = null) + { + $tmp = $s; + $s = (360 - $e) / 180 * M_PI; + $e = (360 - $tmp) / 180 * M_PI; + return imageSmoothArc($im, round($xc), round($yc), round($w), round($h), $this->CreateColorForImageSmoothArc($color), $s, $e); + } + + public function CreateColorForImageSmoothArc($color) + { + $alpha = $color >> 24 & 0xFF; + $red = $color >> 16 & 0xFF; + $green = $color >> 8 & 0xFF; + $blue = $color & 0xFF; + + //var_dump($alpha, $red, $green, $blue);exit; + + return array($red, $green, $blue, $alpha); + } + + public function imageSmoothCircle(&$img, $cx, $cy, $cr, $color) + { + $ir = $cr; + $ix = 0; + $iy = $ir; + $ig = 2 * $ir - 3; + $idgr = -6; + $idgd = 4 * $ir - 10; + $fill = imageColorExactAlpha($img, $color['R'], $color['G'], $color['B'], 0); + imageLine($img, $cx + $cr - 1, $cy, $cx, $cy, $fill); + imageLine($img, $cx - $cr + 1, $cy, $cx - 1, $cy, $fill); + imageLine($img, $cx, $cy + $cr - 1, $cx, $cy + 1, $fill); + imageLine($img, $cx, $cy - $cr + 1, $cx, $cy - 1, $fill); + $draw = imageColorExactAlpha($img, $color['R'], $color['G'], $color['B'], 42); + imageSetPixel($img, $cx + $cr, $cy, $draw); + imageSetPixel($img, $cx - $cr, $cy, $draw); + imageSetPixel($img, $cx, $cy + $cr, $draw); + imageSetPixel($img, $cx, $cy - $cr, $draw); + while ($ix <= $iy - 2) { + if ($ig < 0) { + $ig += $idgd; + $idgd -= 8; + $iy--; + } else { + $ig += $idgr; + $idgd -= 4; + } + $idgr -= 4; + $ix++; + imageLine($img, $cx + $ix, $cy + $iy - 1, $cx + $ix, $cy + $ix, $fill); + imageLine($img, $cx + $ix, $cy - $iy + 1, $cx + $ix, $cy - $ix, $fill); + imageLine($img, $cx - $ix, $cy + $iy - 1, $cx - $ix, $cy + $ix, $fill); + imageLine($img, $cx - $ix, $cy - $iy + 1, $cx - $ix, $cy - $ix, $fill); + imageLine($img, $cx + $iy - 1, $cy + $ix, $cx + $ix, $cy + $ix, $fill); + imageLine($img, $cx + $iy - 1, $cy - $ix, $cx + $ix, $cy - $ix, $fill); + imageLine($img, $cx - $iy + 1, $cy + $ix, $cx - $ix, $cy + $ix, $fill); + imageLine($img, $cx - $iy + 1, $cy - $ix, $cx - $ix, $cy - $ix, $fill); + $filled = 0; + for ($xx = $ix - 0.45; $xx < $ix + 0.5; $xx += 0.2) { + for ($yy = $iy - 0.45; $yy < $iy + 0.5; $yy += 0.2) { + if (sqrt(pow($xx, 2) + pow($yy, 2)) < $cr) { + $filled += 4; + } + + } + } + $draw = imageColorExactAlpha($img, $color['R'], $color['G'], $color['B'], (100 - $filled)); + imageSetPixel($img, $cx + $ix, $cy + $iy, $draw); + imageSetPixel($img, $cx + $ix, $cy - $iy, $draw); + imageSetPixel($img, $cx - $ix, $cy + $iy, $draw); + imageSetPixel($img, $cx - $ix, $cy - $iy, $draw); + imageSetPixel($img, $cx + $iy, $cy + $ix, $draw); + imageSetPixel($img, $cx + $iy, $cy - $ix, $draw); + imageSetPixel($img, $cx - $iy, $cy + $ix, $draw); + imageSetPixel($img, $cx - $iy, $cy - $ix, $draw); + } + } + + public function __get($name) + { + + if (strpos($name, 'raw_') !== false) { + // if $name == 'raw_left_margin' , return $this->_left_margin; + $variable_name = '_' . str_replace('raw_', '', $name); + return $this->$variable_name; + } + + $variable_name = '_' . $name; + + if (isset($this->$variable_name)) { + return $this->$variable_name * SUPERSAMPLING_SCALE; + } else { + Util\JpGraphError::RaiseL('25132', $name); + } + } + + public function __set($name, $value) + { + $this->{'_' . $name} = $value; + } + +} // CLASS diff --git a/vendor/amenadiel/jpgraph/src/image/ImgData.php b/vendor/amenadiel/jpgraph/src/image/ImgData.php new file mode 100644 index 0000000000..1b17abf91f --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/image/ImgData.php @@ -0,0 +1,49 @@ +an[$aMark]; + if (is_string($aIdx)) { + if (!in_array($aIdx, $this->colors)) { + Util\JpGraphError::RaiseL(23001, $this->name, $aIdx); //('This marker "'.($this->name).'" does not exist in color: '.$aIdx); + } + $idx = $this->index[$aIdx]; + } elseif (!is_integer($aIdx) || + (is_integer($aIdx) && $aIdx > $this->maxidx)) { + Util\JpGraphError::RaiseL(23002, $this->name); //('Mark color index too large for marker "'.($this->name).'"'); + } else { + $idx = $aIdx; + } + + return Image::CreateFromString(base64_decode($this->{$n}[$idx][1])); + } + + public function GetAnchor() + { + return array($this->anchor_x, $this->anchor_y); + } +} diff --git a/vendor/amenadiel/jpgraph/src/image/ImgData_Balls.php b/vendor/amenadiel/jpgraph/src/image/ImgData_Balls.php new file mode 100644 index 0000000000..e85c529ce7 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/image/ImgData_Balls.php @@ -0,0 +1,1056 @@ + 'imgdata_large', + MARK_IMG_MBALL => 'imgdata_small', + MARK_IMG_SBALL => 'imgdata_xsmall', + MARK_IMG_BALL => 'imgdata_xsmall'); + protected $colors, $index, $maxidx; + private $colors_1 = array('blue', 'lightblue', 'brown', 'darkgreen', + 'green', 'purple', 'red', 'gray', 'yellow', 'silver', 'gray'); + private $index_1 = array('blue' => 9, 'lightblue' => 1, 'brown' => 6, 'darkgreen' => 7, + 'green' => 8, 'purple' => 4, 'red' => 0, 'gray' => 5, 'silver' => 3, 'yellow' => 2); + private $maxidx_1 = 9; + + private $colors_2 = array('blue', 'bluegreen', 'brown', 'cyan', + 'darkgray', 'greengray', 'gray', 'green', + 'greenblue', 'lightblue', 'lightred', + 'purple', 'red', 'white', 'yellow'); + + private $index_2 = array('blue' => 9, 'bluegreen' => 13, 'brown' => 8, 'cyan' => 12, + 'darkgray' => 5, 'greengray' => 6, 'gray' => 2, 'green' => 10, + 'greenblue' => 3, 'lightblue' => 1, 'lightred' => 14, + 'purple' => 7, 'red' => 0, 'white' => 11, 'yellow' => 4); + + private $maxidx_2 = 14; + + private $colors_3 = array('bluegreen', 'cyan', 'darkgray', 'greengray', + 'gray', 'graypurple', 'green', 'greenblue', 'lightblue', + 'lightred', 'navy', 'orange', 'purple', 'red', 'yellow'); + + private $index_3 = array('bluegreen' => 1, 'cyan' => 11, 'darkgray' => 14, 'greengray' => 10, + 'gray' => 3, 'graypurple' => 4, 'green' => 9, 'greenblue' => 7, + 'lightblue' => 13, 'lightred' => 0, 'navy' => 2, 'orange' => 12, + 'purple' => 8, 'red' => 5, 'yellow' => 6); + private $maxidx_3 = 14; + + protected $imgdata_large, $imgdata_small, $imgdata_xsmall; + + public function GetImg($aMark, $aIdx) + { + switch ($aMark) { + case MARK_IMG_SBALL: + case MARK_IMG_BALL: + $this->colors = $this->colors_3; + $this->index = $this->index_3; + $this->maxidx = $this->maxidx_3; + break; + case MARK_IMG_MBALL: + $this->colors = $this->colors_2; + $this->index = $this->index_2; + $this->maxidx = $this->maxidx_2; + break; + default: + $this->colors = $this->colors_1; + $this->index = $this->index_1; + $this->maxidx = $this->maxidx_1; + break; + } + return parent::GetImg($aMark, $aIdx); + } + + public function __construct() + { + + //========================================================== + // File: bl_red.png + //========================================================== + $this->imgdata_large[0][0] = 1072; + $this->imgdata_large[0][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAAByF' . + 'BMVEX/////////xsb/vb3/lIz/hIT/e3v/c3P/c2v/a2v/Y2P/' . + 'UlL/Skr/SkL/Qjn/MTH/MSn/KSn/ISH/IRj/GBj/GBD/EBD/EA' . + 'j/CAj/CAD/AAD3QkL3MTH3KSn3KSH3GBj3EBD3CAj3AAD1zMzv' . + 'QkLvISHvIRjvGBjvEBDvEAjvAADnUlLnSkrnMTnnKSnnIRjnGB' . + 'DnEBDnCAjnAADec3PeSkreISHeGBjeGBDeEAjWhITWa2vWUlLW' . + 'SkrWISnWGBjWEBDWEAjWCAjWAADOnp7Oa2vOGCHOGBjOGBDOEB' . + 'DOCAjOAADJrq7Gt7fGGBjGEBDGCAjGAADEpKS/v7+9QkK9GBC9' . + 'EBC9CAi9AAC1e3u1a2u1Skq1KSm1EBC1CAi1AACtEBCtCBCtCA' . + 'itAACngYGlCAilAACghIScOTmcCAicAACYgYGUGAiUCAiUAAiU' . + 'AACMKSmMEACMAACEa2uEGAiEAAB7GBh7CAB7AABzOTlzGBBzCA' . + 'BzAABrSkprOTlrGBhrAABjOTljAABaQkJaOTlaCABaAABSKSlS' . + 'GBhSAABKKSlKGBhKAABCGBhCCABCAAA5CAA5AAAxCAAxAAApCA' . + 'ApAAAhAAAYAACc9eRyAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgF' . + 'HUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkRFD' . + 'UHLytKAAAB4UlEQVR4nGNgIAK4mGjrmNq6BmFIWMmISUpKSmk5' . + 'B8ZEokj4qoiLiQCBgqald3xaBpKMj6y4sLCQkJCIvIaFV0RaUR' . + 'lCSk5cWEiAn19ASN7QwisuraihHiajKyEixM/NwckjoKrvEACU' . + 'qumpg7pAUlREiJdNmZmLT9/cMzwps7Smc3I2WEpGUkxYkJuFiY' . + 'lTxszePzY1v7Shc2oX2D+K4iLCgjzsrOw8embuYUmZeTVtPVOn' . + 'gqSslYAOF+Ln4ZHWtXMPTcjMrWno7J82rRgoZWOsqaCgrqaqqm' . + 'fn5peQmlsK1DR52vRaoFSIs5GRoYG5ub27n19CYm5pdVPnxKnT' . + 'pjWDpLydnZwcHTz8QxMSEnJLgDL9U6dNnQ6Sio4PDAgICA+PTU' . + 'zNzSkph8hADIxKS46Pj0tKTc3MLSksqWrtmQySAjuDIT8rKy0r' . + 'Kz+vtLSmur6jb9JUIJgGdjxDQUVRUVFpaUVNQ1NrZ9+kKVOmTZ' . + 'k6vR0sldJUAwQNTU2dnX0TgOJTQLrSIYFY2dPW1NbW2TNxwtQp' . + 'U6ZMmjJt2rRGWNB3TO7vnzh5MsgSoB6gy7sREdY7bRrQEDAGOb' . + 'wXOQW0TJsOEpwClmxBTTbZ7UDVIPkp7dkYaYqhuLa5trYYUxwL' . + 'AADzm6uekAAcXAAAAABJRU5ErkJggg=='; + + //========================================================== + // File: bl_bluegreen.png + //========================================================== + $this->imgdata_large[1][0] = 1368; + $this->imgdata_large[1][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAABm' . + 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA' . + 'B3RJTUUH0wMMFi8hE9b2uAAABOVJREFUeNq9lk2sJFUVx3+3qv' . + 'tW95t57zFvhiFxmCFRUJRoNCQiJARMhiFx/Igxii5goTG6ZDAu' . + '/EhcSCIrTAgLEiKsJ8ywABNZEMJXEDYCukAmjgjzBkK/j35V1d' . + '333FtV97io97pfzwxfG86qcu/N+Z3zP+fcW/Apmfk4hx57+R/6' . + 'Rqmc9ykhsWjlsUngAA1fXIQ7b73pI/186IGHnn9dH/8frC8v4I' . + 'PiG53uaerR4GmKkv31mB8cyfjd946ZTwR66qVX9OTWIi8UKUv9' . + 'BOrZXpYZvFeiBvzI0fgSUSFKwbVG+Pl1V3HH0VvNR4KeeukV/f' . + 'PmMmdHhst76aXD64AbeVQ9bjNHaiGOC2o3wLrAb2/4LL/84ffn' . + 'fCdzkOdayKpLppBemrBsU5Y1Zdmm9LJdGU6E/t4M24Q26jRDRL' . + 'j3mdc49cSTekFsMzs5XuTsyLDUNSDQ25NwKOly9YIl22MYhJr/' . + 'uoDtBBoT0CxBRGYOAhibIaOCe//2MpfM6KHnX9cXipSlbkKWmS' . + 'nk9iv38J0jixw7vJfrTMYBOvhSoQHJBS09ANELloAGDxW8tfoW' . + 'J+5/UC8CPS0LU7r3SpYarr7M8rmFjMPLXT6/33L4si7Z2GCrQC' . + '+0ctlOaNs9DReV8vSLr85ndPLpZ/WNvHW+01kAVFBOGvJx0wYg' . + 'Sp47RIQ4Emwa8FGJXlDxSCFo5YlVgAo2hwPue/hRndboTV3EW2' . + 'Wp3k6wBp8q56QiWzecW6vwQfnPRkAWhFgILnq08jQ+R2nlUzzN' . + 'uES9Q7Vd+9fba7NmWJW61db2247qACmcjxXr45psYphsFGSLBu' . + 'kIajxqtjNwHkvAjQt0sg3crhPA2+fPz0CuyNFOghsGsr19mnFg' . + 'DGwrRm8UoAtNmQPQtRXDgdC4HImCFEKcCE0oieUWUYq2LtbiGp' . + 'mBQmppfIkjw45DK0QNNkvQ0jMBtPL0UnDRM1rN+cxKwzvOo2NP' . + 'tykR9a1kfpZNDLMG6QDYJqCTBvUe1+uxs+YKyPoGrTwY2HhvC4' . + 'CDWQd5d4xNApNQEEMgjgLdUCLBQ5cprL/trwNwKG2IUmDqDFd5' . + 'sr5BWrlxuSdLDFEFlqAzXGc4zFjupqh6uqYihpxJcEgp026l2w' . + '7wFUv7Z6AvrfRo/n0OYzPwIKE3HUKAJg2otMBiElnsF7wngis9' . + '3ZDjNnLi7huCWUZfueZKTu/M0V3HvmkOFDVxVKDG04ScejSgW5' . + 'V0q5JYFEghuDLHlTmToqDeGOCKIVtrW9hsdmXufEcNLPSXuPHa' . + 'a+bvuh9df5AH/v5PDFmbWQC3Mx+TVvfGVTRB2CodNgT2JBX003' . + 'aANZAYS/BxCv32TV/l2C03G7jgmfjGiT/qmeEmibEYm7XzAO2k' . + 'A+pbgHhBgydqu54YO5eRiLCy7yDvPP6Xqf+5Z+Lu277OYuOpiw' . + 'H15oBmlNOMcmK5RbP+PrEscGU+DSAxdg4CICIkxnLP8aNz63Og' . + 'H3/rdvOb795GVhuaYo0oBc3GGrEsUPVTwO6a7LYd+X51x3Hu/t' . + 'lP5tS65FN+6okn9U+n/sqb596dTvhOF+02myXTmkQNrOw7yD3H' . + 'j14E+UDQjp24/0E9/eKrbA4HH3aMK1b2ccvXvswjv//1J/s5ud' . + 'Due/hRPfP+OmfOrk7vrn7a48ihA3zh8CH+8Iuffiw/n4r9H1ZZ' . + '0zz7G56hAAAAAElFTkSuQmCC'; + + //========================================================== + // File: bl_yellow.png + //========================================================== + $this->imgdata_large[2][0] = 1101; + $this->imgdata_large[2][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAAB2l' . + 'BMVEX//////////+///+f//9b//8b//73//7X//63//6X//5T/' . + '/4z//4T//3P//2v//1r//0r//0L//zH//yn//yH//xj//xD//w' . + 'j//wD/90L/9zn/9zH/9xj/9xD/9wj/9wD39yn37zn37zH37yH3' . + '7xD37wj37wDv70Lv50rv50Lv5znv5yHv5xjv5wjv5wDn51Ln5x' . + 'Dn3jHn3iHn3hjn3hDn3gje3oze3nPe3lLe1oze1nPe1lLe1ine' . + '1iHe1hje1hDe1gje1gDW1qXW1mvWzqXWzkLWzhjWzhDWzgjWzg' . + 'DOzrXOzq3OzpzOzgDOxkrOxinOxhjOxhDOxgjOxgDGxqXGxnvG' . + 'xmvGvRjGvRDGvQjGvQDFxbnAvr6/v7+9vaW9vZS9vQi9vQC9tR' . + 'C9tQi9tQC7u7W1tZS1tXu1tTG1tQi1rRC1rQi1rQCtrYytrSGt' . + 'rQitrQCtpYStpSGtpQitpQClpYSlpXulpQClnBClnAilnACcnG' . + 'ucnAicnACclAiclACUlFqUlCmUlAiUlACUjFKUjAiUjACMjFKM' . + 'jEqMjACMhACEhACEewB7ezF7exB7ewB7cwBzcylzcwBzaxBzaw' . + 'BraxhrawhrawBrYxBrYwBjYwBjWgBaWgBaUgCXBwRMAAAAAXRS' . + 'TlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAd' . + 'LdfvwAAAAHdElNRQfTAwkRFBKiJZ4hAAAB7ElEQVR4nI3S+1vS' . + 'UBgHcB67WJmIMWAVdDHEDLBC6Go0slj3Ft0m9RRBWQEmFZFDEM' . + 'Qgt0EMFBY7p/+198hj1kM/9N1+++x73rOd6XT/kStnTx4fPzd9' . + 'uwfOjFhomj7smAhwj/6Cm2O0xUwy6g7cCL99uCW3jtBmE7lsdr' . + 'fvejgpzP7uEDFRRoqy2k8xQPnypo2BUMP6waF9Vpf3ciiSzErL' . + 'XTkPc0zDe3bsHDAcc00yoVgqL3UWN2iENpspff+2vn6D0+NnZ9' . + '6lC5K6RuSqBTZn1O/a3rd7v/MSez+WyIpVFX8GuuCA9SjD4N6B' . + 'oRNTfo5PCAVR0fBXoIuOQzab1XjwwNHx00GOj8/nKtV1DdeArk' . + '24R+0ul9PjmbrHPYl+EipyU0OoQSjg8/m83kl/MMhx0fjCkqio' . + 'SMOE7t4JMAzDsizH81AqSdW2hroLPg4/CEF4PhKNx98vlevrbY' . + 'QQXgV6kXwVfjkTiSXmhYVcSa7DIE1DOENe7GM6lUym0l+EXKks' . + 'K20VAeH2M0JvVgrZfL5Qqkiy0lRVaMBd7H7EZUmsiJJcrTdVja' . + 'wGpdbTLj3/3qwrUOjAfGgg4LnNA5tdQx14Hm00QFBm65hfNzAm' . + '+yIFhFtzuj+z2MI/MQn6Uez5pz4Ua41G7VumB/6RX4zMr1TKBr' . + 'SXAAAAAElFTkSuQmCC'; + + //========================================================== + // File: bl_silver.png + //========================================================== + $this->imgdata_large[3][0] = 1481; + $this->imgdata_large[3][1] = + 'iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAMAAAAM7l6QAAADAF' . + 'BMVEUAAADOzs7Gxsa9vb21tbXOxsbOzsbGzsb3///O1ta1vb2c' . + 'paVSWlpKWlpSY2ve5+97hIze7/9aY2vO5/9zhJRaa3tSY3PGzt' . + 'aMlJxrc3tja3NKUlpCSlK1vcZze4RSWmPW5/+Upb3G3v9zhJxS' . + 'Y3t7jKVaa4TO3veltc6ElK1re5Rjc4ycpbV7hJRaY3M5QlLn7/' . + '/Gzt6lrb2EjJzO3v9ja3vG1ve9zu+1xueltdacrc6UpcaMnL1C' . + 'SlqElLV7jK1zhKVre5zW3u/O1ue1vc6ttcaMlKVze4xrc4RSWm' . + 'tKUmPG1v+9zve1xu+tveeltd6crdbe5/+9xt6cpb17hJxaY3s5' . + 'QlrW3vfO1u/Gzue1vdattc6lrcaUnLWMlK2EjKVze5Rrc4xja4' . + 'RSWnNKUmtCSmO9xuecpcZ7hKVaY4TW3v/O1vfGzu+1vd6ttdal' . + 'rc69xu+UnL2MlLWEjK1ze5xrc5R7hK1ja4zO1v+1veettd6lrd' . + 'aMlL3Gzv/39//W1t7Gxs61tb29vcatrbWlpa2cnKWUlJyEhIx7' . + 'e4TW1ufGxta1tcZSUlqcnK3W1u+UlKW9vda1tc57e4ytrcalpb' . + '1ra3vOzu9jY3OUlK29vd6MjKWEhJxaWmtSUmNzc4xKSlpjY3tK' . + 'SmNCQlqUjJzOxs7///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' . + 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' . + 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' . + 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' . + 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' . + 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' . + 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' . + 'AAAAAAAAAAAAAAAAAAAAAAAAD///9fnkWVAAAAAnRSTlP/AOW3' . + 'MEoAAAABYktHRP+lB/LFAAAACXBIWXMAAABFAAAARQBP+QatAA' . + 'AB/klEQVR42mNgxAsYqCdd3+lcb4hLmj8wMMvEu8DCMqYbU9op' . + 'UEFB2MTb26eyysomFl06XEEhUCHLpAKo2z/fujikEUVaXUFBMB' . + 'BouLePuV+VVWGRciIXknSEsImCQd3//xwmPr65llaFcSFJHkjS' . + '3iYmWUDZ//8NfCr989NjNUMSUyTg0jneSiaCINn/gmlVQM12qg' . + 'lJnp5waTMTE5NAkCyHWZW/lXWNfUlikmdYK0zax7siS4EDKJtd' . + 'mQeU1XRwLBdLkRGASucWmGVnZ4dnhZvn5lmm29iVOWpnJqcuko' . + 'JKR1Wm5eTkRKYF5eblp9sU2ZeUJiV7zbfVg0pH56UFBQXNjIqK' . + 'jgkujItX1koKTVmYajsdKu2qETVhwgSXiUDZ2Bn9xqUeoZ5e0t' . + 'LzYYZ3B092ndjtOnmKTmycW1s7SHa+l5dtB8zlccE6RlN0dGbM' . + 'mDVbd5KupNBcL6+F82XgHouLj5vRP2PWLGNdd4+ppnxe8tJec6' . + 'XnNsKkm0uVQ5RDRHQTPTym68nPlZbvkfYCexsa5rpJ2qXa5Umm' . + 'ocmec3m8vHjmSs+fgxyhC5JDQ8WSPT2lvbzm8vDIe0nbtiBLN8' . + '8BigNdu1B6Lsje+fPbUFMLi5TMfGmvHi/puUAv23q2YCTFNqH5' . + 'MvPnSwPh3HasCbm3XUpv+nS5VtrkEkwAANSTpGHdye9PAAAASn' . + 'RFWHRzaWduYXR1cmUANGJkODkyYmE4MWZhNTk4MTIyNDJjNjUx' . + 'NzZhY2UxMDAzOGFhZjdhZWIyNzliNTM2ZGFmZDlkM2RiNDU3Zm' . + 'NlNT9CliMAAAAASUVORK5CYII='; + + //========================================================== + // File: bl_purple.png + //========================================================== + $this->imgdata_large[4][0] = 1149; + $this->imgdata_large[4][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAACAV' . + 'BMVEX/////////7///5///1v//xv//rf//pf//lP//jP//hP//' . + 'c///a///Wv//Wvf/Uv//Sv//Qv//Qvf/Off/Mf//Kf//If//If' . + 'f/GP//GPf/EP//EPf/CP//CPf/CO//AP//APf3Oe/3Kff3Ke/3' . + 'Ie/3GO/3EO/3AO/vSu/vSufvOefvMefvIefvGOfvEOfvCOfvAO' . + 'fnUufnSufnMd7nId7nGN7nGNbnEN7nCN7nAN7ejN7ejNbec97e' . + 'c9beUtbeQtbeIdbeGNbeENbeCNbeANbWpdbWa9bWQs7WGM7WEM' . + '7WCM7WAM7Otc7Orc7OnM7OSsbOIb3OGMbOEMbOCMbOAM7OAMbG' . + 'pcbGnMbGe8bGa8bGKbXGEL3GCL3GAL3FucXBu73AvsC/v7+9pb' . + '29Ka29GLW9ELW9CLW9AL29ALW5rrm1lLW1e7W1MbW1GKW1EK21' . + 'CLW1CK21AK2tjK2thKWtMaWtIaWtGJytCK2tCKWtAK2tAKWlhK' . + 'Wle6WlEJylCJylAKWlAJyca5ycGJScEJScCJScAJycAJSUWpSU' . + 'UoyUKZSUEIyUCIyUAJSUAIyMUoyMSoyMIYSMEISMCISMAIyMAI' . + 'SECHuEAISEAHt7MXt7EHt7CHt7AHt7AHNzKXNzEGtzAHNzAGtr' . + 'GGtrEGNrCGtrAGtrAGNjCFpjAGNjAFpaAFpaAFIpZn4bAAAAAX' . + 'RSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsS' . + 'AdLdfvwAAAAHdElNRQfTAwkRFB0ymoOwAAAB9UlEQVR4nGNgIA' . + 'K42hhqGtm5+WFIWClKycvLK6gbuARGoEj4aMjLSElISUir6Tt7' . + 'x+aEIWR8leQlwEBSTc/CK7awLguuR0lGQkJMVFRUTFJVzwko1d' . + 'oFk9OQl5IQE+Dh5hVR0TV3CkkvbJgyASJjDZIR5GBl5eRX0TH1' . + 'DEqrbJ2ypBEspSgvJSXKw8bMxMavbOLoGZNf1TZlybw4oIyfLN' . + 'BxotxsLEzsQiaOHkFpBQ2905esrAZK2SpIAaUEuDm5+LTNPAKj' . + 'C+pbps1evrIDKGWnLictKSkuLKyoZQyUya9o7Z2+YMXKGUApew' . + 'M9PTVdXR0TEwf3wOjUirruafOXL18xFyjl72Kpb25qaurg4REU' . + 'EFVe2zJ5zpLlK1aCpbydnZ2dnDwDA6NTopLLeiZNXbB8BcTAyP' . + 'TQ0JDg4KCY1NS83JKmiVOBepYvX9UPlAovzEiPSU/LLyior2vq' . + 'mjZr3vLlIF01IC+XVhUWFlZW1Lc290ycOGfxohVATSsXx4Oksn' . + 'vaWlsb2tq6J0+bM2/RohVA81asbIcEYueU3t7JU6ZNnwNyGkhm' . + '+cp5CRCppJnzZ8+ZM3/JUogECBbBIixr8Yqly8FCy8F6ltUgoj' . + 'lz7sqVK2ByK+cVMSCDxoUrwWDVysXt8WhJKqG4Y8bcuTP6qrGk' . + 'QwwAABiMu7T4HMi4AAAAAElFTkSuQmCC'; + + //========================================================== + // File: bl_gray.png + //========================================================== + $this->imgdata_large[5][0] = 905; + $this->imgdata_large[5][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAABO1' . + 'BMVEX////////3///39/fv7+/e5+fW3t7Wzs7WxsbG1tbGzsbG' . + 'xsbDxMS/v7++wMC+v7+9zsa9xsa9vb29tbW9ra29pa24uLi1xs' . + 'a1vb21tbWxtrattbWmpqalra2cra2cpaWcnJycjIyUpaWUnJyU' . + 'lJSUjIyMnJyMnJSMlJSMlIyMjJSMjIyElJSElIyEjIyEhIR7jI' . + 'x7hIR7hHt7e3t7e3N7e2tzhIRze3tze3Nzc3Nre3trc3Nrc2tr' . + 'a2tjc3Njc2tja3Nja2tjY2NjWlpaa2taY2taY2NaY1paWlpaUl' . + 'JSY2NSY1pSWlpSWlJSUlJSUkpKWlpKWlJKUlpKUlJKUkpKSkpK' . + 'SkJCUlJCUkJCSkpCSkJCQkI5Sko5QkI5Qjk5OUI5OTkxQkIxOT' . + 'kxMTkxMTEpMTEhMTEhKSkYISEpy7AFAAAAAXRSTlMAQObYZgAA' . + 'AAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdE' . + 'lNRQfTAwkRFQfW40uLAAABx0lEQVR4nI3SbXfSMBQA4NV3nce5' . + 'TecAHUywRMHSgFuBCFsQUqwBS1OsWQh0GTj//y8wZUzdwQ/efM' . + 'tzcm/uuXdj4z9ic/PR9k4qk1qDnf0X2/uZzKt8GaRvSubg4LVp' . + 'mkWzCGAT/i3Zsm2XNQHLsm2n2937LaaNnGoJFAEo27B50qN0ay' . + 'Wg26lXsw8fP8nmzcJb2CbsnF5JmmCE8ncN404KvLfsYwd7/MdV' . + 'Pdgl/VbKMIzbuwVgVZw2JlSKJTVJ3609vWUY957lgAUd1KNcqr' . + 'yWnOcOPn8q7d5/8PywAqsOOiVDrn42NFk+HQ7dVuXNYeFdBTpN' . + 'nY5JdZl8xI5Y+HXYaTVqEDp1hAnRohZM03EUjMdhn5wghOoNnD' . + 'wSK7KiiDPqEtz+iD4ctdyAifNYzUnScBSxwPd6GLfRURW7Ay5i' . + 'pS5bmrY8348C5vvUI+TLiIVSJrVA0heK/GDkJxYMRoyfCSmk4s' . + 'uWc3yic/oBo4yF374LGQs5Xw0GyQljI8bYmEsxVUoKxa6HMpAT' . + 'vgyhU2mR8uU1pXmsa8ezqb6U4mwWF/5MeY8uLtQ0nmmQ8UWYvb' . + 'EcJaYWar7QhztrO5Wr4Q4hDbAG/4hfTAF2iCiWrCEAAAAASUVO' . + 'RK5CYII='; + + //========================================================== + // File: bl_brown.png + //========================================================== + $this->imgdata_large[6][0] = 1053; + $this->imgdata_large[6][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAABoV' . + 'BMVEX////Gzs7GvbXGrZTGpXu9nHO1nHO1nIy9taXGxs7GtaXO' . + 'nHPGlFrGjEq9hEq1hEqte0Klczmcazmce1KtnIzGxsbGvb3OlF' . + 'LOlFq9hFKte0qcc0KUYzGEWimMc1K9ta3OnGvOnGPWnGO9jFq9' . + 'jFKlc0KUazmMYzl7UilzUjGtpZzGxr3GnGPWpWvepXO1hFJ7Wj' . + 'FrSiFjUjG1ra3GnHPvxpT/5733zpythFKUa0KEYzlzUilaOSF7' . + 'Wjm9jErvvYz/99b///f/78bnrYS1hFqle0p7UjFrSiljQiFCMR' . + 'iMhHO9lGvGjFLWnGv/3q3////erXuthEqlc0paQiFKMRhSQin/' . + '1qX/997//++cc0pjSilaQilKORhCKRiclIy9pYzGlGPntYT33q' . + '3vvZSEWjlSOSE5KRB7c2O1lHutczmthFqte1JrWkqtjGtCKRBa' . + 'SjmljGuca0KMYzGMaznOztaclISUYzmEWjFKOSF7a1qEYzFaSi' . + 'GUjISEa0pKOSm9vb2llIxaQhg5IQiEc2tzY0paORilnJy1raVS' . + 'OSljUkJjWkKTpvQWAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHU' . + 'gAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkREiei' . + 'zP2EAAAB9UlEQVR4nGWS/VfSUBjHL5QluhhBxtwyWcCus5Blpm' . + 'wDC4ONaWXCyBi7RMZmpQ2Bypm9W/byV3cHHo/W88s95/s5z/d5' . + 'uwCcCh/4L3zAf+bs0NC588On9QAYGSUuBINk6GI4cmnsBLk8Go' . + '1SFEGMkzRzZeLq5JE8FvDHouw1lqXiCZJOcnCKnx4AcP0GBqmZ' . + 'mRgRT9MMB4Wbs7cGSXNRik3dnp9fiMUzNCNKgpzN9bsaWaQo9s' . + '7dfH7pXiFTZCBU1JK27LmtBO8TDx7mV1eXHqXXyiIUFLWiVzHx' . + 'BxcJIvV4/cn6wkqmWOOwmVE3UQOAp6HxRKL5bGPj+VwhUhalFq' . + '8alm5vAt+LlySZTsebzcKrraIIW4JqZC3N3ga+1+EQTZKZta1M' . + 'pCZCSeDViqVrThsEdsLJZLJYLpZrHVGScrKBvTQNtQHY6XIM02' . + 'E6Ik7odRW1Dzy3N28n3kGuB3tQagm7UMBFXI/sATAs7L5vdbEs' . + '8Lycm923NB0j5wMe6KOsKIIyxcuqauxbrmlqyEWfPmPy5assY1' . + 'U1SvWKZWom9nK/HfQ3+v2HYZSMStayTNN0PYKqg11P1nWsWq7u' . + '4gJeY8g9PLrddNXRdW8Iryv86I3ja/9s26gvukhDdvUQnIjlKr' . + 'IdZCNH+3Xw779qbG63f//ZOzb6C4+ofdbzERrSAAAAAElFTkSu' . + 'QmCC'; + + //========================================================== + // File: bl_darkgreen.png + //========================================================== + $this->imgdata_large[7][0] = 1113; + $this->imgdata_large[7][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAAB2l' . + 'BMVEX////////3///v///n/+/e99bW/+/W99bO786/v7++vr69' . + '/96999a7wb24vbu1/9a1zqW1u7itxrWosq6l772l1qWlxrWlxq' . + '2lva2cxpSU562U3q2UxqWUvaWUpZyM77WM57WMvYyMtZyMrZyM' . + 'pZSMnJSEvZyEtYyErZSElIx7zpR7xpx7xpR7vZR7jIRz1pRzxp' . + 'RzjIRrzpRrzoxrxoxrtYRrrYxrrXtrpYRrhHNjzoxjxoxjxoRj' . + 'vYRjtYRjrXtjpXtjlGNje2tazoxazoRaxoxaxoRavYRatYRatX' . + 'tarXtapXNanHNajFpae2tSzoRSxoRSvXtStXtSrXtSrXNSpXNS' . + 'nHNSnGtSlGtSlGNSjGtSjGNKvXtKtXNKrXNKpWtKnGtKlGNKjG' . + 'NKhGNKhFJKc1pKa1JCrWtCpWtCnGtClGNCjGNCjFpChFpCe1JC' . + 'a1JCY1I5pWs5nGM5lGM5jFo5hFo5e1o5c0o5WkoxjFoxhFoxhF' . + 'Ixe1Ixc1Ixc0oxa0ophFIpe0opc0opa0opa0IpY0IpWkIpWjkp' . + 'UkIpUjkhc0oha0IhY0IhWjkhWjEhUjkhUjEhSjEhSikhQjEhQi' . + 'kYWjkYSjEYSikYQjEYQikQSikQQikQQiEQOSExf8saAAAAAXRS' . + 'TlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAd' . + 'LdfvwAAAAHdElNRQfTAwkRFCaDkWqUAAAB+ElEQVR4nI3S+1vS' . + 'UBgHcGZlPV0ks/vFrmQWFimJjiwiYUJWjFBWFhClyZCy5hLrwA' . + 'x2EIwJC1w7zf2vnU0re+iHvs9++7x7zznvORbLf+TA6ct9fYMX' . + 'jrfAUYefpp+/iM1ykxf/lmuhUZ/PTwXC8dml5Wcd23o5H5Mk6b' . + '5NUU8icXbhS67rNzn9JDnguOEYGQtEEtwC+Crs3RJ76P5A/znr' . + 'vsNX7wQnEiwHCtK7TTkW8rvdZ9uJtvZTLkxpHhSrP66bNEj7/P' . + '3WNoLYeeSWQQCIpe9lQw7RNEU5rDsIYtcJ14Nocg7kRUlBNkxn' . + 'YmGKcp7cv3vPwR7XOJPmc0VYU3Sv0e9NOBAYG7Hbz/cMjTMveZ' . + 'CHkqxuTBv0PhYJB4N3XR6PJ5rMAPMnpGUxDX1IxSeMTEaZp1OZ' . + 'nGAIQiYtsalUIhFlmGTy3sO3AizJCKn6DKYryxzHsWyaneMzr6' . + 'cWxRVZVlFTe4SpE3zm+U/4+whyiwJcWVMQNr3XONirVWAklxcE' . + 'EdbqchPhjhVzGpeqhUKhWBQhLElr9fo3pDaQPrw5xOl1CGG1JE' . + 'k1uYEBIVkrb02+o6RItfq6rBhbw/tuINT96766KhuqYpY3UFPF' . + 'BbY/19yZ1XF1U0UNBa9T7rZsz80K0jWk6bpWGW55UzbvTHZ+3t' . + 'vbAv/IT+K1uCmhIrKJAAAAAElFTkSuQmCC'; + + //========================================================== + // File: bl_green.png + //========================================================== + $this->imgdata_large[8][0] = 1484; + $this->imgdata_large[8][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAABm' . + 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA' . + 'B3RJTUUH0wMMFjM4kcoDJQAABVlJREFUeNq9ll2MJFUVx3/11V' . + 'Vd/TE9vU0v4zLDwJIF16jBqLAPhsRXEiDqg0QTJiQSjcSNvCzw' . + 'sBEDDxizhvAAxBgf1oR9QF9NiE9ESFZkQyZB5WtddmdnZ3qqqr' . + 'uqbt367Cofqu3ZZpWVaDzJfbkf53//55z/PVdZXV3l/2H6f7Lp' . + '5VdOV/4Nb+GmHpUeA7AdBNxc3kafNb73jRPK9Xwon8ToxVefqU' . + 'b91wibH5EkCQBCizFihTSviHUHR0hWws9xe3wvJ7/7nPKpgX5y' . + '9oFqt3eOgWniRBoAbUBGGqZUibSYaeoT2B5bnkdaSA6793Cv/S' . + 'QPPbihXBfo5VdOV+8dfgnvwAU62YH5fCZ12sDujFkwyegCqTrB' . + 'iUOKTOJKj8jr88jS8zy6cXwBTP048nuHX0I0nDlIp7RpTG7kM0' . + 'sdyAYsTVukUuWGhlWHMq0ITL92lnUp9R1Obz/GmTNnqn9bDD8/' . + '+0D1oX0O0zQZZDYCsK2j3Gl9jQqDfHiei8GfiKVLlsZkJaBAN1' . + '0i6PgwUbB0GxG5/PrtE/xLRr959Znqw9452oVNI+jiJhnr1pe4' . + 'k29zB1/nFr5Kj7tpt1YYhJ0FJ7nUYbcJQBgahN2MzeCP/OipR6' . + 'prgN6Qr6ELFQFUWoRpNVjlKwxZB8DCpE+PtfEKqV1cUzxpVudu' . + 'GTBHA5Y1g99e+dUio9O/P1Vpq+/WE5GGjDSMoAtAQjrf3C52IP' . + 'QxpY4WK2hpReka9Gfrhqgz0bACRoCWjDh56kQ1z9FeuUUQxVhK' . + 'B92sD1VahM+bAJgcoJhGjP/6Ln8rAgDiRCVRKiIzxMkkodBJ85' . + 'im1IlEHbE4k1xyNveL4YP8HarmGJIOpqyjeQmfNHmTvnqZTWBt' . + 'vIJXpPwlukJSuSTKGK3pEwtJmiX00ZlInTyNscImO6XBITvH1c' . + '8vVt2OucdKvIyeKRTNCivsEMgcpg6taYs30nfq0Gqg6hOSSFJ4' . + 'BSnJPht0IqEjWmOGocEI6F0J94F0qaL6BntTF0MtUfweKQKAPU' . + 'Wwp4OcVnQAmVb0p9DLOzjEhEKnGRmoRc7EzRGlwA6NujAKG4yP' . + '6Sjwc4aVznZ7DK0xXdkDoJf0kGmFBniFBOBGcZSCCSKd0IwN0k' . + 'IS+QZWCGVZex4BnUxya3+Zt9iugQbcRFpIAtuHvAZulPUdLhUJ' . + 'RqegI3WcqaSXddlT3idsWMSRRGkEtNwmyTifAwyBo7LP+11J0e' . + '7tM7pZOYblHkBLcqZ5LcYtw6Wbd4CM3SpE9foYZsIHoqDKCrbz' . + 'mLSQtPwmuhXgtBLs0GBdbXOhFGB7WBKO2F8GXt9/VO97Ya3atF' . + '7nUHnwGjGGQqcPxFEdFqURkEidiZszAERoYIsGju1hq21kWee3' . + 'bw15+8WpsvAy3K1+i3JkkhZyPpxxjjPOsfOYiZ+TFhLPzQnHOU' . + 'tpzGB2dgA4tscIkKIx19Cxg/fPL7vQJu47eXt1VvsDK8pwPueZ' . + 'PuZoQMOqhRoJHSs0kKLBWjvjYinmeQGw1TaX1RFdfZ3LMzYLjA' . + 'C++dkn6AaH2Nobk6cxEzdnuG0TdC8zvdJkN0hqkFkO/jwL0fxa' . + 'so8sBcuFzQ+/+MRC+BeAHnpwQzn++ee5KT9Eshuy46dcKAXm32' . + '0uzPQhS4GttkH2GQID2Wc0Y4LtAbDxhZ/x5A+e/uTG9+jGceXH' . + '9/ySnnIXnUzOxXe1038mW3ZynNmam4yYWkO+f9cv+Oljz16/lV' . + '9tDz/9nerc1hm8ZEScSRK7VvtYl1i1dklsOKyvc+zg/bzw1O8+' . + '/efkajt56kR1ydlEJBc5H46xzbrJ3dY9wrB7hGcff+6/+279L+' . + '0fHxyiE8XMLl4AAAAASUVORK5CYII='; + + //========================================================== + // File: bl_blue.png + //========================================================== + $this->imgdata_large[9][0] = 1169; + $this->imgdata_large[9][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAACEF' . + 'BMVEX/////////7//35//v1v/exv/Wvf/Wrf/Wpf/Orf+/v7+9' . + 'tc69jP+9hP+5ucW1tc6tlP+rq7Wlpdalpcalpb2cnM6cnMacc/' . + '+cWv+UlLWUjN6UjK2Uc/+Ma/+MUv+EhKWEa/+EQvd7e8Z7e7V7' . + 'e6V7c957Wv9za9Zza8ZzSv9ra5xrSv9rOf9rMe9jUudjQv9jOe' . + '9aWpRaUt5aUpRaSu9aSudSUoxSSs5SSoxSMf9KQtZKOfdKMedK' . + 'Kf9KKe9CKf9CKb1CKa1CIfdCIedCId45MXs5Kfc5If85Iec5Id' . + 'Y5GP8xMbUxMXsxKc4xKZQxIf8xGP8xGO8xGN4xGNYxGL0xGK0p' . + 'KXMpIYwpGP8pGO8pGOcpGNYpGM4pEP8pEPcpEOcpEN4pENYpEM' . + 'YpEL0hGKUhEP8hEPchEO8hEOchEN4hENYhEM4hEMYhELUhCP8h' . + 'CO8hCN4YGJwYGGsYEL0YEK0YEHMYCN4YCM4YCMYYCL0YCKUYAP' . + '8QEJQQEIwQEHsQEGsQCM4QCLUQCK0QCKUQCJwQCJQQCIwQCHMQ' . + 'CGsQAP8QAPcQAO8QAOcQAN4QANYQAM4QAMYQAL0QALUQAKUQAJ' . + 'QQAIQICGsICGMIAO8IANYIAL0IALUIAK0IAKUIAJwIAJQIAIwI' . + 'AIQIAHsIAHMIAGsIAGMAAN4AAMYAAK0AAJQAAIwAAIQAAHMAAG' . + 'sAAGMAAFrR1dDlAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA' . + 'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkRFRPMOZ' . + '/2AAAB+klEQVR4nGNgIAIIqeqZmBqpi2JISNml5lVXV3d198Yo' . + 'oUjwm1SnxsbGRsSm5ZfNXO4tjCTjVh0ABhFx6QV9E1Y0S8JkuN' . + '3yAgLc7W3t/QPi4jPKJ8ye1yoIlTKpjvVy15eVUbN0i4zKLJ8w' . + 'ae6qcKgLqmMj3PUFWFl5NJ0CExLLJzbNW7BWCyxlXR0ba6/Axs' . + 'zELmfnkRBT0QiSKgXJCOflxUbYy3KyMHEoOrtEZ1c2TZ6/cMl6' . + 'eaCUamdsbIC7tjgPr4SBS3BMMVDTwkXr1hsDpYy6UmMj/O0tdX' . + 'QNbDxjknJLWqYsXLx0vStQynxGflpkZGCgs7Onp29SbtNkoMy6' . + 'pevCgFJWy3oyMuKjgoKCPWNCvEuqWhcsWrJ06XqQlPnMvrKyrM' . + 'TomJjkZAfHlNa2qdOWrlu63gcopbG8v7+hvLwip7g4JdSxsLZu' . + '8dKlS9ettwBKic2eNXHChIkTG5tKqgpr2uo6loLAehWQx0LnzJ' . + '49p6mpeXLLlNq6RUvqly6dvnR9Bx9ISnnlvLmT582bMr9t4aL2' . + '+vrp60GaDCGB6Ld6wfwFCxYCJZYsXQ+SmL6+FBryInVrFi1atH' . + 'jJkqVQsH6pNCzCJNvXrQW6CmQJREYFEc2CYevXrwMLAyXXl0oz' . + 'IAOt0vVQUGSIkabkDV3DwlzNVDAksAAAfUbNQRCwr88AAAAASU' . + 'VORK5CYII='; + + //========================================================== + // File: bs_red.png + //========================================================== + $this->imgdata_small[0][0] = 437; + $this->imgdata_small[0][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAk1' . + 'BMVEX////////GxsbGra3/xsbOhITWhIT/hIT/e3v/c3P/a2vG' . + 'UlK1SkrOUlL/Y2PWUlLGSkrnUlLeSkrnSkr/SkqEGBj/KSmlGB' . + 'jeGBjvGBj3GBj/EBD/CAj/AAD3AADvAADnAADeAADWAADOAADG' . + 'AAC9AAC1AACtAAClAACcAACUAACMAACEAAB7AABzAABrAABjAA' . + 'BuukXBAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZ' . + 'cwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkUGDNEMgOYAAAAm0' . + 'lEQVR4nI3Q3RKCIBAFYGZMy9RKzX7MVUAUlQTe/+kS0K49d3wD' . + '7JlFaG+CvIR3FvzPXgpLatxevVVS+Jzv0BDGk/UJwOkQ1ph2g/' . + 'Ct5ACX4wNT1o/zzUoJUFUGBiGfVnDTYGJgmrWy8iKEtp0Bpd2d' . + 'jLGu56MB7f4JOOfDJAwoNwslk/jOUi+Jts6RVNrC1hkhPy50Ef' . + 'u79/ADQMQSGQ8bBywAAAAASUVORK5CYII='; + + //========================================================== + // File: bs_lightblue.png + //========================================================== + $this->imgdata_small[1][0] = 657; + $this->imgdata_small[1][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAABVl' . + 'BMVEX////////d///AwMC7wcS08P+y+P+xxdCwxM+uws2twMur' . + 'vsinzNynytylzuKhyN6e5v6d5P+d1fOcwNWcu8ub4f+at8iZ3v' . + '+ZvdGY2/yW2f+VscGU1vuT1fqTr72Sx+SSxeKR0fWRz/GPz/OP' . + 'rr+OyeqMy+6Myu2LyeyKxueJudSGw+SGorGDvt+Cvd6CvN2Aud' . + 'p+uNd+t9Z9tdV8tdR8tNN6sc94r813rct2q8h0qcZ0qMVzp8Rx' . + 'o8Bwor5tn7ptnrptnrlsnbhqmbRpmbNpi51ol7Flkqtkkqtkka' . + 'pjj6hijaRhjaZgi6NfiqJfiaFdh55bhJtag5pZgphYgJZYf5VX' . + 'cn9Ve5FSeI1RdopRdYlQdYlPc4dPcoZPcoVNcINLboBLbH9GZn' . + 'hGZXdFZHZEY3RDYnJCXW4/W2s/WWg+Wmo7VmU7VGM7U2E6VGM6' . + 'VGI5UV82T1wGxheQAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHU' . + 'gAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkUGTok' . + '9Yp9AAAAtElEQVR4nGNgIBaw8wkpKghzwvksPAKiUsraprYiLF' . + 'ARXkE2JiZ1PXMHXzGIAIekOFBE08TGLTCOCyzCLyvDxsZqZOnk' . + 'E56kAhaRV9NQUjW2tPcMjs9wBYsY6Oobmlk7egRGpxZmgkW0zC' . + '2s7Jy9giKT8gohaiQcnVzc/UNjkrMLCyHmcHr7BYREJKTlFxbm' . + 'QOxiEIuKTUzJKgQCaZibpdOzQfwCOZibGRi4dcJyw3S4iQ4HAL' . + 'qvIlIAMH7YAAAAAElFTkSuQmCC'; + + //========================================================== + // File: bs_gray.png + //========================================================== + $this->imgdata_small[2][0] = 550; + $this->imgdata_small[2][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAAQCAMAAADH72RtAAABI1' . + 'BMVEX///8AAAD8EAD8IAD8NAD8RAD8VAAYGBi/v7+goKCCgoJk' . + 'ZGRGRkb8yAD83AD87AD8/AD4+ADo+ADY+ADI+AC0+ACk+ACU+A' . + 'CE+AB0/ABk/ABU/ABE/AAw/AAg/AAQ/AAA/AAA+AAA6BAA2CAA' . + 'yDQAtEQApFQAlGQAhHQAdIgAZJgAVKgARLgAMMgAINwAEOwAAP' . + 'wAAPgIAPAQAOgYAOAkANgsANA0AMg8AMBEALhMALBUAKhcAKBo' . + 'AJhwAJB4AIiAAID////4+Pjy8vLs7Ozm5ubg4ODa2trT09PNzc' . + '3Hx8fBwcG7u7u1tbWurq6oqKiioqKcnJyWlpaQkJCJiYmDg4N9' . + 'fX13d3dxcXFra2tkZGReXl5YWFhSUlJMTExGRkZAQEA1BLn4AA' . + 'AAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIA' . + 'AAsSAdLdfvwAAAAHdElNRQfTAwkUGiIctEHoAAAAfElEQVR4nI' . + '2N2xKDIAwF+bZ2kAa8cNFosBD//yvKWGh9dN+yk9kjxH28R7ze' . + 'wzBOYSX6CaNB927Z9qZ66KTSNmBM7UU9Hx2c5qjmJaWCaV5j4t' . + 'o1ANr40sn5a+x4biElrqHgrXMeac/c1nEpFHG0LSFoo/jO/BeF' . + 'lJnFbT58ayUf0BpA8wAAAABJRU5ErkJggg=='; + + //========================================================== + // File: bs_greenblue.png + //========================================================== + $this->imgdata_small[3][0] = 503; + $this->imgdata_small[3][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAxl' . + 'BMVEX///////+/v79znJQhSkJ7raU5hHtjraVKnJRCjIRClIyU' . + '9++E595avbVaxr2/v7+ctbWcvb17nJxrjIx7paUxQkK9//+Mvb' . + '17ra2Evb17tbVCY2MQGBiU5+ec9/eM5+d71tZanJxjra1rvb1j' . + 'tbVSnJxara1rzs5jxsZKlJRChIQpUlIhQkJatbVSpaU5c3MxY2' . + 'MYMTEQISFavb1Sra1KnJxCjIw5e3sxa2spWlpClJQhSkoYOTkp' . + 'Y2MhUlIQKSkIGBgQMTH+e30mAAAAAXRSTlMAQObYZgAAAAFiS0' . + 'dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfT' . + 'AwkUGTIqLgJPAAAAqklEQVR4nI2QVxOCMBCEM6Mi2OiCvSslJB' . + 'CUoqjn//9TYgCfubf9Zu9uZxFqO+rscO7b6l/LljMZX29J2pNr' . + 'YjmX4ZaIEs2NeiWO19NNacl8rHAyD4LR6jjw6PMRdTjZE0JOiU' . + 'dDv2ALTlzRvSdCCfAHGCc7yRPSrAQRQOWxKc3C/IUjBlDdUcM8' . + '97vFGwBY9QsZGBc/A4DWZNbeXIPWZEZI0c2lqSute/gCO9MXGY' . + '4/IOkAAAAASUVORK5CYII='; + + //========================================================== + // File: bs_yellow.png + //========================================================== + $this->imgdata_small[4][0] = 507; + $this->imgdata_small[4][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAzF' . + 'BMVEX///////+/v79zYwCMewDOxoTWzoTezkr/5wj/5wDnzgDe' . + 'xgC1pQCtnACllACcjACUhABjWgDGvVK1rUrOxlLGvUqEexilnB' . + 'jv3hj35xj/7wj/7wD35wDv3gDn1gDezgDWxgDOvQDGtQC9rQCE' . + 'ewB7cwBzawBrYwDWzlLn3lLe1krn3kre1hi9tQC1rQCtpQClnA' . + 'CclACUjACMhAD/9wC/v7///8bOzoT//4T//3v//3P//2v//2Pn' . + '50r//0r//yn39xj//xD//wBjYwDO8noaAAAAAXRSTlMAQObYZg' . + 'AAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAH' . + 'dElNRQfTAwkUGSDZl3MHAAAAqElEQVR4nI3QWRNDMBAA4My09E' . + 'IF1SME0VT1okXvM/3//6kEfbZv+81eswA0DfHxRpOV+M+zkDGG' . + 'rL63zCoJ2ef2RLZDIqNqYexyvFrY9ePkxGWdpvfzC7tEGtIRly' . + 'nqzboFKMlizAXbNnZyiFUKAy4bZ+B6W0lRaQDLmg4h/k7eFwDL' . + 'OWIky8qhXUBQ7gKGmsxpC+ah1TdriwByqG8GQNDNr6kLjf/wAx' . + 'KgEq+FpPbfAAAAAElFTkSuQmCC'; + + //========================================================== + // File: bs_darkgray.png + //========================================================== + $this->imgdata_small[5][0] = 611; + $this->imgdata_small[5][1] = + 'iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAMAAAAMCGV4AAABJl' . + 'BMVEX////////o8v/f6O7W4OnR3PXL1OTL0evEyLvCzePAwMC/' . + 'v7a8wsq7t7C1xum1vtS1q6GzopmyxeKsrsOqvNWoq7anvN+nsb' . + 'qhrcGgqbGfpq6cp7+bqMuVmJKRm7yPlKKMnL6FkKWFipOEkLSE' . + 'j6qEhoqAiaB+jqd8haF7hZR4iJt4g5l3hZl2gIt2cod1hJVzeY' . + 'VzboJvhp9sfJJsb41peY1pd5xpdoVod4xndI5lcHxka4BjcYVg' . + 'Z3BfboFbb4lbZnZbYntaZ4laZYVZV3JYYWpXX3JWWm5VX4RVW2' . + 'NUYX9SXHxPWn5OVFxNWWtNVXVMVWFKV3xHUGZGU3dGTldFSlxE' . + 'Sk9ESXBCRlNBS3k/SGs/RU4+R1k9R2U6RFU2PUg0PEQxNU0ECL' . + 'QWAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAA' . + 'CxIAAAsSAdLdfvwAAAAHdElNRQfTAwkUGQmbJetrAAAAtklEQV' . + 'R4nGNgwAK4JZTNNOWlYDxhMT4ZDTOzQE1uMF9CiJWVU0LbxDlS' . + 'G8QVF+FnZ2KRNHAIiPUHaZGSlmZj5lH19A1KjLUA8lXU5MWllF' . + 'yjo30TYr2BfG19G11b37CEeN84H38gX1HbwTUkOjo+zjfG3hLI' . + 'l1exCvCNCwnxjfMz0gTyRdXNHXx9fUNCQu2MwU6SN3ZwD42LCH' . + 'W30IK4T8vUJSAkNMhDiwPqYiktXWN9JZj7UQAAjWEfhlG+kScA' . + 'AAAASUVORK5CYII='; + + //========================================================== + // File: bs_darkgreen.png + //========================================================== + $this->imgdata_small[6][0] = 666; + $this->imgdata_small[6][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAABX1' . + 'BMVEX////////l/+nAwMC86r+8wb28wby8wLy78sCzw7SywrSx' . + 'wLKwvrGuvK+syK+ryq2rx62n36ym3aumxKmk2qij0Keh16ahva' . + 'Og1aSguKKe06KeuaCetZ+d0KGdtZ+bz6Cay56ZyZ2Zwp2Zr5qZ' . + 'rpqYwJuXyZuXrJmVw5mUxZiTxJeTw5eTq5WRwJWPtJKOvZKKuI' . + '6Kt42Kn4yJt42ItIuGsomFsYmEsIiEr4eDr4eBrIR/qoN+qIJ8' . + 'poB7pH56o356on14nnt2nXl0mndzmnZzmXZymHVwlXNvlHJukn' . + 'FtiHBqjm1qjW1oi2toiWpniWplh2hlhmdkhWdig2VggGNgf2Je' . + 'fmFdfGBde19bbl1aeFxXdFpWclhVclhVcVdUcFZTb1VSbVRQal' . + 'JPaVFKY0xKYkxJYUtIYEpHX0lEWkZCWERCV0NCVkM/U0A+U0A+' . + 'UUA+UEA9Uj89UT48Tj45TDvewfrHAAAAAXRSTlMAQObYZgAAAA' . + 'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN' . + 'RQfTAwkUGRjxlcuZAAAAtElEQVR4nGNgIBZw8osqqIpzw/msfI' . + 'IiUmr6lo6SbFARASEOJiYtQ2uXADmIAJeEGFBE18LBMySBBywi' . + 'LC/LwcFiZuvmH5WiAxZR0tRW1DC3dfYJS8zyAouYGBibWtm7+o' . + 'TEpZfkgEX0rG3snNx9Q2NSCksgaqRd3Ty8gyLiU/NKSiDmcPsF' . + 'BodHJ2UUlZTkQ+xikIlNSE7LLgECZagL2VQyc0H8YnV2uD94jS' . + 'ILIo14iQ4HALarJBNwbJVNAAAAAElFTkSuQmCC'; + + //========================================================== + // File: bs_purple.png + //========================================================== + $this->imgdata_small[7][0] = 447; + $this->imgdata_small[7][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAnF' . + 'BMVEX///////+/v7/Gvca9rb3Grcb/xv+1hLWte629hL21e7XG' . + 'hMbWhNbOe87We9b/hP//e/97OXv/c///a///Y/+cOZz/Sv/WOd' . + 'bnOefvOe//Kf9jCGNrCGv/EP//CP/nCOf/AP/3APfvAO/nAOfe' . + 'AN7WANbOAM7GAMa9AL21ALWtAK2lAKWcAJyUAJSMAIyEAIR7AH' . + 'tzAHNrAGtjAGPP1sZnAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgF' . + 'HUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkUGS' . + 'o5QpoZAAAAnElEQVR4nI3Q2xJDMBAG4MyQokWrZz3oSkJISJH3' . + 'f7dK0Gv/Xb7J7vyzCK0NjtPsHuH/2wlhTE7LnTNLCO/TFQjjIp' . + 'hHAA6bY06LSqppMAY47x+04HXTba2kAFlmQKr+YuVDCGUG2k6/' . + 'rNwYK8rKwKCnPxHnVS0aA3rag4UQslUGhrlk0Kpv1+sx3tLZ6w' . + 'dtYemMkOsnz8R3V9/hB87DEu2Wos5+AAAAAElFTkSuQmCC'; + + //========================================================== + // File: bs_brown.png + //========================================================== + $this->imgdata_small[8][0] = 677; + $this->imgdata_small[8][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAABaF' . + 'BMVEX//////////8X/3oD/3nj/1HX/0Gr/xGP/rkv/gBf+iS/2' . + 'bAL1agDxaQDuZwDrZwLpZQDmZQLlZADjcx7gZATeYQDdZgraXw' . + 'DZXwHYXgDXiEvXZAvUjlfUXwXTjVfTbR7ShUvRbR7RWwDMWQDL' . + 'WADKooLKWADJoYLJgkvHWATGoILFn4LFgEvFVgDEZx7EVQDDt6' . + '/DVQDCt6/CnoLChlfCVADAwMC+hFe+UgC8UgC6UQC4gVe4UAC3' . + 'gVe3UAC1gFe1eUu1TwC1TgCzTgCwTQKuTACrSgCqSgCpSgCpSQ' . + 'CodEulSACkRwCiRgCdRACcRACaQwCYQgCWQgKVQQCVQACUQACS' . + 'UR6RPwCOPgCNPQCLPACKPACJOwCEOQCBOAB+NwB9NgB8NgB7NQ' . + 'B6NwJ4NAB3RR52MwB0MgBuLwBtLwBsLwBqLgBpLQBkLQJiKgBh' . + 'KgBgKwRcKABbKQJbJwBaKQRaJwBYKAJVJQDZvdIYAAAAAXRSTl' . + 'MAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLd' . + 'fvwAAAAHdElNRQfTAwkUGho0tvl2AAAAtklEQVR4nGNgIBaoSg' . + 'mLKGpowfkGMty8AqJKpi4mRlAROR5ONg4JFUv3YHOIgDo/HwsT' . + 'q6yps29EsjZYREFIkJ2ZS9/OMzA20wEsIi8uKSZtaOPmH5WSFw' . + 'YW0VRW07Vw8vCLSMguLwCL6FlaObp6B0TGZxSXQ9TouHv6+IXG' . + 'JGYWlpdDzNEKCgmPjkvLKS0vL4LYxWAen5SelV8OBNZQFxrZ5h' . + 'aC+GX2MDczMBh7pZakehkTHQ4AA0Am/jsB5gkAAAAASUVORK5C' . + 'YII='; + + //========================================================== + // File: bs_blue.png + //========================================================== + $this->imgdata_small[9][0] = 436; + $this->imgdata_small[9][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAk1' . + 'BMVEX///////+/v7+trcbGxv+EhM6EhNaEhP97e/9zc/9ra/9S' . + 'UsZKSrVSUs5jY/9SUtZKSsZSUudKSt5KSudKSv8YGIQpKf8YGK' . + 'UYGN4YGO8YGPcQEP8ICP8AAP8AAPcAAO8AAOcAAN4AANYAAM4A' . + 'AMYAAL0AALUAAK0AAKUAAJwAAJQAAIwAAIQAAHsAAHMAAGsAAG' . + 'ONFkFbAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZ' . + 'cwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkUGhNNakHSAAAAmk' . + 'lEQVR4nI3P2xKCIBAGYGfM6SBWo1nauIqogaDA+z9dK9Lhrv47' . + 'vtl/2A2CfxNlJRRp9IETYGraJeEb7ocLNKznia8A7Db7umWDUG' . + 'sxAzhurxRHxok4KQGqCuEhlL45oU1D2w5BztY4KRhj/bCAsetM' . + '2uObjwvY8/oX50JItYDxSyZSTrO2mNhvGMbaWAevnbFIcpuTr7' . + 't+5AkyfBIKSJHdSQAAAABJRU5ErkJggg=='; + + //========================================================== + // File: bs_green.png + //========================================================== + $this->imgdata_small[10][0] = 452; + $this->imgdata_small[10][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAn1' . + 'BMVEX///////+/v7+/v7/G/8aUxpSMvYyUzpSMzoyM1oxarVqE' . + '/4R7/3tavVpKnEpaxlpz/3Nr/2tKtUpj/2Na51pKzkpK1kpK50' . + 'pK/0oYcxgp/ykYlBgY3hgY7xgY9xgQ/xAI/wgA/wAA9wAA7wAA' . + '5wAA3gAA1gAAzgAAxgAAvQAAtQAArQAApQAAnAAAlAAAjAAAhA' . + 'AAewAAcwAAawAAYwA0tyxUAAAAAXRSTlMAQObYZgAAAAFiS0dE' . + 'AIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAw' . + 'kUGgW5vvSDAAAAnklEQVR4nI3QSxKCMAwA0M4gqCgoiiJ+kEAL' . + 'LQUq0PufzX7ENdnlJZNkgtDS2CYZvK6bf+7EoKLA9cH5SQzv6A' . + 'YloTywsAbYr44FrlgrXCMJwHl3xxVtuuFkJAPIcw2tGB9GcFli' . + 'oqEf5GTkSUhVMw2TtD0XSlnDOw3SznE5520vNEi7CwW9+Ayjyq' . + 'U/3+yPuq5gvhkhL0xlGnqL//AFf14UIh4mkEkAAAAASUVORK5C' . + 'YII='; + + //========================================================== + // File: bs_white.png + //========================================================== + $this->imgdata_small[11][0] = 480; + $this->imgdata_small[11][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAAQCAYAAADwMZRfAAAABm' . + 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA' . + 'B3RJTUUH0wMLFTsY/ewvBQAAAW1JREFUeJytkz2u4jAUhT/jic' . + 'gfBUKiZhE0bIKeVbCWrIKenp6eDiGlCEEEBArIxvzGU4xeZjLk' . + 'jWb05lRXuvbx+exr4bouX1Xjyw7Atz81F4uFBYjjGIDhcCjq1o' . + 'k6nN1uZwFerxfP55Msy1itVmRZBsB4PK6YveHkeW5d18XzPIIg' . + 'wPd9Wq0WnU6HMAxJkoQoiuynOIfDwUopkVIihKAoCgAcx6Hdbm' . + 'OMIU1T5vN55eBKEikljUYDIX6kFUKU9e8aDAZlmjcca+1b7TgO' . + '1+uVy+VS9nzfr8e53++VzdZaiqIgz3OMMWitOZ/PaK0JgqDeRC' . + 'mF53lIKYGfr3O73TDGoJQiTVO01nS73XqT4/FIs9kkCAIej0eZ' . + 'brPZEMcxSZKgtQZgMpmIWpN+vy+m06n1PK9yTx8Gy+WS/X5Pr9' . + 'er9GuHLYoiG4YhSilOpxPr9Zrtdlti/JriU5MPjUYjq7UuEWaz' . + '2d+P/b/qv/zi75oetJcv7QQXAAAAAElFTkSuQmCC'; + + //========================================================== + // File: bs_cyan.png + //========================================================== + $this->imgdata_small[12][0] = 633; + $this->imgdata_small[12][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAABPl' . + 'BMVEX////////F///AwMCvxsaC1NSC0dGCz8+CzMyA//94//91' . + '//9q//9j//9X4uJX09NXz89Xx8dXxMRL//9L5uZL3d1L2NhLxs' . + 'ZLt7cv//8e9fUe8fEe7u4e398epqYehoYX//8L+PgK//8F9fUE' . + '/v4E5+cEb28EZ2cC//8C/v4C/f0CzMwCrq4Cjo4CdXUCaWkCZW' . + 'UB/PwA//8A/f0A+/sA8/MA7e0A7OwA6+sA5eUA5OQA4uIA4eEA' . + '3NwA2toA2NgA1dUA09MA0tIA0NAAysoAxsYAxcUAxMQAv78Avr' . + '4AvLwAtrYAtbUAs7MAsLAAra0Aq6sAqKgApaUApKQAoqIAoKAA' . + 'n58AmpoAlZUAk5MAkpIAkJAAj48AjIwAiYkAh4cAf38AfX0Ae3' . + 'sAenoAcnIAcHAAa2sAaWkAaGgAYmIUPEuTAAAAAXRSTlMAQObY' . + 'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA' . + 'AHdElNRQfTAwkUGQDi+VPPAAAAtElEQVR4nGNgIBawikipyIiy' . + 'wfksfJpGRkamNtr8LFARPiMFHmFDcztXfwGoFi0jLiZuZRtnry' . + 'BddrCIiJEGL6eklYO7X3iCOFhE2thESdHawdUnJDZFDiyiamZh' . + 'aevk5h0UlZSpBhaRtbN3dPHwDY5MSM+EqBFzc/f0DgiLTkjLzI' . + 'SYw6bjHxgaEZeckZmpD7GLQSAqJj4xNRMIBGFuFtRLA/ENhGBu' . + 'ZmDgkJBXl5fgIDocAAKcINaFePT4AAAAAElFTkSuQmCC'; + + //========================================================== + // File: bs_bluegreen.png + //========================================================== + $this->imgdata_small[13][0] = 493; + $this->imgdata_small[13][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAvV' . + 'BMVEX///////+/v79j//855/8x3v851v9Spb1C1v8AOUqEtcZK' . + 'lK1StdYxzv8hxv8AY4QASmNSlK1KpcZKtd4YQlIYnM4YrecIvf' . + '8AtfcAre8AjL0AhLUAc5wAa5QAWnsAQloAKTkAGCFKhJxKrdYY' . + 'jL0Ypd4Atf8ArfcApecAnN4AlM4AjMYAe60Ac6UAY4wAUnNSnL' . + '0AlNYAWoQASmsAOVIAITGEtc4YWnsAUnsAMUqtvcaErcYAKUIA' . + 'GCkAECHUyVh/AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAA' . + 'AJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkUGxNUcXCT' . + 'AAAAqUlEQVR4nI2Q1xKCMBREM2NHLCCogAGCjd6SqLT8/2cZKT' . + '6zb3tm987OBWCsXoejp8rC35fi4+l6gXFZlD0Rz6fZ1tdDmKR9' . + 'RdOmkzmP7DDpilfX3SzvRgQ/Vr1uiZplfsCBiVf03RJd140wgj' . + 'kmNqMtuYXcxyYmNWJdRoYwzpM9qRvGujuCmSR7q7ARY00/MiWk' . + 'sCnjkobNEm1+HknDZgAqR0GKU43+wxdu2hYzbsHU6AAAAABJRU' . + '5ErkJggg=='; + + //========================================================== + // File: bs_lightred.png + //========================================================== + $this->imgdata_small[14][0] = 532; + $this->imgdata_small[14][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAA3l' . + 'BMVEX///////+/v7/Gvb0hGBj/5///3v//zu//1u//xucpGCG9' . + 'nK21lKVSQkp7Wms5KTExISlaOUpjQlIhEBj/tdbOhKXnrcbGjK' . + 'Wla4TetcbGnK2EWmv/rc73pcZ7UmOcY3vOpbW1jJzenLW9e5Rz' . + 'Slq1c4xrQlJSOULGhJz/pcb3nL2chIzOnK33rcbelK3WjKWMWm' . + 'vGe5SEUmM5ISnOtb3GrbXerb3vpb2ca3v/rcaUY3POhJxCKTF7' . + 'SlrWnK21e4ytc4TvnLXnlK2la3taOUK1lJxrSlLGhJRjQkpSMT' . + 'lw+q2nAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZ' . + 'cwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkUGjoP2Nm+AAAAr0' . + 'lEQVR4nGNgIBaYiOk62imYwPnMkiIyso76yhJSzFARMxkRNk49' . + 'a3t5OW6oFk1LVkYOfWUHKxUXiEYzLS12DnN3VXkjIRtFsIiSk5' . + '6evqGqhYGKugAfWMRa1FpD2UHeQEXQRlgALCJur+rgbCUNFOAS' . + 'hqjRkZe3MpBTcwEKCEPMMTGSs3Xz8OQHCnBBHckt6OJpIyAMBD' . + 'wwN/MYc4H4LK4wNzMwmGrzcvFqmxIdDgDiHRT6VVQkrAAAAABJ' . + 'RU5ErkJggg=='; + + //========================================================== + // File: bxs_lightred.png + //========================================================== + $this->imgdata_xsmall[0][0] = 432; + $this->imgdata_xsmall[0][1] = + 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAA3l' . + 'BMVEX///////+/v7/Gvb0hGBj/5///3v//zu//1u//xucpGCG9' . + 'nK21lKVSQkp7Wms5KTExISlaOUpjQlIhEBj/tdbOhKXnrcbGjK' . + 'Wla4TetcbGnK2EWmv/rc73pcZ7UmOcY3vOpbW1jJzenLW9e5Rz' . + 'Slq1c4xrQlJSOULGhJz/pcb3nL2chIzOnK33rcbelK3WjKWMWm' . + 'vGe5SEUmM5ISnOtb3GrbXerb3vpb2ca3v/rcaUY3POhJxCKTF7' . + 'SlrWnK21e4ytc4TvnLXnlK2la3taOUK1lJxrSlLGhJRjQkpSMT' . + 'lw+q2nAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZ' . + 'cwAACxEAAAsRAX9kX5EAAAAHdElNRQfTAwkUKBOgGhWjAAAAS0' . + 'lEQVR4nGNgQAEmunYmEJaMCKe1vBxYzJKVQ9lKBSSupKdnaKGi' . + 'zgdkiqs6WKnYcIGYJnK2HvzCwmCNgi42wsLCECNMeXlNUY0HAL' . + 'DaB7Du8MiEAAAAAElFTkSuQmCC'; + + //========================================================== + // File: bxs_bluegreen.png + //========================================================== + $this->imgdata_xsmall[1][0] = 397; + $this->imgdata_xsmall[1][1] = + 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAAvV' . + 'BMVEX///////+/v79j//855/8x3v851v9Spb1C1v8AOUqEtcZK' . + 'lK1StdYxzv8hxv8AY4QASmNSlK1KpcZKtd4YQlIYnM4YrecIvf' . + '8AtfcAre8AjL0AhLUAc5wAa5QAWnsAQloAKTkAGCFKhJxKrdYY' . + 'jL0Ypd4Atf8ArfcApecAnN4AlM4AjMYAe60Ac6UAY4wAUnNSnL' . + '0AlNYAWoQASmsAOVIAITGEtc4YWnsAUnsAMUqtvcaErcYAKUIA' . + 'GCkAECHUyVh/AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAA' . + 'AJcEhZcwAACxEAAAsRAX9kX5EAAAAHdElNRQfTAwkUKDVyF5Be' . + 'AAAASUlEQVR4nGNgQAFmYqJcEJaEOJ+UrD5YTJKFTZrfGCQuaq' . + 'glLWvMaQ5kqujo6hnbKIKYXPr68gp2dmCNJiZAlh3ECGsREWtU' . + '4wF1kwdpAHfnSwAAAABJRU5ErkJggg=='; + + //========================================================== + // File: bxs_navy.png + //========================================================== + $this->imgdata_xsmall[2][0] = 353; + $this->imgdata_xsmall[2][1] = + 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAAk1' . + 'BMVEX///////+/v7+trcbGxv+EhM6EhNaEhP97e/9zc/9ra/9S' . + 'UsZKSrVSUs5jY/9SUtZKSsZSUudKSt5KSudKSv8YGIQpKf8YGK' . + 'UYGN4YGO8YGPcQEP8ICP8AAP8AAPcAAO8AAOcAAN4AANYAAM4A' . + 'AMYAAL0AALUAAK0AAKUAAJwAAJQAAIwAAIQAAHsAAHMAAGsAAG' . + 'ONFkFbAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZ' . + 'cwAACxEAAAsRAX9kX5EAAAAHdElNRQfTAwkUJxXO4axZAAAAR0' . + 'lEQVR4nGNgQAGskhKsEJaslIi8ijpYTJaDU1FVAyQuKSujoKKh' . + 'LQ5kSigpqWro6oOYrOoaWroGBmCNWiCWAdQwUVFWVOMBOp4GCJ' . + 's5S60AAAAASUVORK5CYII='; + + //========================================================== + // File: bxs_gray.png + //========================================================== + $this->imgdata_xsmall[3][0] = 492; + $this->imgdata_xsmall[3][1] = + 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAABI1' . + 'BMVEX///8AAAD8EAD8IAD8NAD8RAD8VAAYGBi/v7+goKCCgoJk' . + 'ZGRGRkb8yAD83AD87AD8/AD4+ADo+ADY+ADI+AC0+ACk+ACU+A' . + 'CE+AB0/ABk/ABU/ABE/AAw/AAg/AAQ/AAA/AAA+AAA6BAA2CAA' . + 'yDQAtEQApFQAlGQAhHQAdIgAZJgAVKgARLgAMMgAINwAEOwAAP' . + 'wAAPgIAPAQAOgYAOAkANgsANA0AMg8AMBEALhMALBUAKhcAKBo' . + 'AJhwAJB4AIiAAID////4+Pjy8vLs7Ozm5ubg4ODa2trT09PNzc' . + '3Hx8fBwcG7u7u1tbWurq6oqKiioqKcnJyWlpaQkJCJiYmDg4N9' . + 'fX13d3dxcXFra2tkZGReXl5YWFhSUlJMTExGRkZAQEA1BLn4AA' . + 'AAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxEA' . + 'AAsRAX9kX5EAAAAHdElNRQfTAwkUKC74clmyAAAAQklEQVR4nG' . + 'NgQAVBYVCGt5dXYEQ0mOnp5h4QFgVmeri6+4dHxYMVeHoFRUTH' . + 'gTUFBIZBWAwMkZEx8bFQM2Lj0UwHANc/DV6yq/BiAAAAAElFTk' . + 'SuQmCC'; + + //========================================================== + // File: bxs_graypurple.png + //========================================================== + $this->imgdata_xsmall[4][0] = 542; + $this->imgdata_xsmall[4][1] = + 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAABSl' . + 'BMVEX////////11P/MqdvKrNfAwMC+u7+9u7+4rr24lsi3rby3' . + 'lMe1rLq1o720q7i0oL20ksSzoryyqbaykMGxlb2wkL+vnbiujb' . + '2sjLuri7qpl7GoirWoibenmK2mla6mjLKmhrSllauki7CjhrCj' . + 'hLGihLChg6+ggq2fkqadkKOcfqqai6Gag6WYe6WXeqSWeaOTd6' . + 'CTd5+Rdp6RdZ6RdZ2Qg5eOc5qMcpiLcZeJb5WIbpOHbZKGbJGE' . + 'a4+CaY2AZ4t/Z4p/Zop/Zol+Zol7ZIZ6Y4V5YoR1ZH11X391Xn' . + '9zXX1yXXtxXHtvWnluWXhsV3VqVnNpVXJoVHFnU3BmUm9jUGth' . + 'VGdgTmheTGZcS2RcSmRaSWJYR19XRl5SQllRQlhQQVdPQFZOP1' . + 'VLPlFJO09IPE5IOk5FOEtEN0lDOEpDOElDNklCNkc/M0XhbrfD' . + 'AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACx' . + 'EAAAsRAX9kX5EAAAAHdElNRQfTAwkUKCgREfyHAAAATUlEQVR4' . + 'nGNgQAEcIko8EBY3M5Ougy+IxSXMwmTsFsAHZMqrSRvZB0W7A5' . + 'k6FlYugXEZICaPr394Um4uSAFDRFRCbm4uxAihsDAhVOMBHT0L' . + 'hkeRpo8AAAAASUVORK5CYII='; + + //========================================================== + // File: bxs_red.png + //========================================================== + $this->imgdata_xsmall[5][0] = 357; + $this->imgdata_xsmall[5][1] = + 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAAk1' . + 'BMVEX////////GxsbGra3/xsbOhITWhIT/hIT/e3v/c3P/a2vG' . + 'UlK1SkrOUlL/Y2PWUlLGSkrnUlLeSkrnSkr/SkqEGBj/KSmlGB' . + 'jeGBjvGBj3GBj/EBD/CAj/AAD3AADvAADnAADeAADWAADOAADG' . + 'AAC9AAC1AACtAAClAACcAACUAACMAACEAAB7AABzAABrAABjAA' . + 'BuukXBAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZ' . + 'cwAACxEAAAsRAX9kX5EAAAAHdElNRQfTAwkUIyjy5SVMAAAAS0' . + 'lEQVR4nGNgQAFsUpJsEJastIi8ijpYTJaDU0FVgxXIlJKVUVDR' . + '0BYHMiUUlVQ1dPVBTDZ1dS1dAwOQAgYtbSDLAGIEq6goK6rxAD' . + 'yXBg73lwGUAAAAAElFTkSuQmCC'; + + //========================================================== + // File: bxs_yellow.png + //========================================================== + $this->imgdata_xsmall[6][0] = 414; + $this->imgdata_xsmall[6][1] = + 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAAzF' . + 'BMVEX///////+/v79zYwCMewDOxoTWzoTezkr/5wj/5wDnzgDe' . + 'xgC1pQCtnACllACcjACUhABjWgDGvVK1rUrOxlLGvUqEexilnB' . + 'jv3hj35xj/7wj/7wD35wDv3gDn1gDezgDWxgDOvQDGtQC9rQCE' . + 'ewB7cwBzawBrYwDWzlLn3lLe1krn3kre1hi9tQC1rQCtpQClnA' . + 'CclACUjACMhAD/9wC/v7///8bOzoT//4T//3v//3P//2v//2Pn' . + '50r//0r//yn39xj//xD//wBjYwDO8noaAAAAAXRSTlMAQObYZg' . + 'AAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAAH' . + 'dElNRQfTAwkUIzoBXFQEAAAAS0lEQVR4nGNgQAFsDhJsEJaTo5' . + '2skj5YzMnSSk7ZwBzIlOSUklPiMxYHMnW4FXT5VNVBTDZeXiNV' . + 'QUGQAgYBYyBLEGIEq5gYK6rxAH4kBmHBaMQQAAAAAElFTkSuQm' . + 'CC'; + + //========================================================== + // File: bxs_greenblue.png + //========================================================== + $this->imgdata_xsmall[7][0] = 410; + $this->imgdata_xsmall[7][1] = + 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAAxl' . + 'BMVEX///////+/v79znJQhSkJ7raU5hHtjraVKnJRCjIRClIyU' . + '9++E595avbVaxr2/v7+ctbWcvb17nJxrjIx7paUxQkK9//+Mvb' . + '17ra2Evb17tbVCY2MQGBiU5+ec9/eM5+d71tZanJxjra1rvb1j' . + 'tbVSnJxara1rzs5jxsZKlJRChIQpUlIhQkJatbVSpaU5c3MxY2' . + 'MYMTEQISFavb1Sra1KnJxCjIw5e3sxa2spWlpClJQhSkoYOTkp' . + 'Y2MhUlIQKSkIGBgQMTH+e30mAAAAAXRSTlMAQObYZgAAAAFiS0' . + 'dEAIgFHUgAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAAHdElNRQfT' . + 'AwkUJy5/6kV9AAAATUlEQVR4nGNgQAGCyuyCEJaGugKHviVYzF' . + 'hO3sxCWwDIVNLTM9PXtpEGMhW12Cy0DR1ATEFLSxZ7BweQAgYd' . + 'HUMHBweIEQKiogKoxgMAo/4H5AfSehsAAAAASUVORK5CYII='; + + //========================================================== + // File: bxs_purple.png + //========================================================== + $this->imgdata_xsmall[8][0] = 364; + $this->imgdata_xsmall[8][1] = + 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAAnF' . + 'BMVEX///////+/v7/Gvca9rb3Grcb/xv+1hLWte629hL21e7XG' . + 'hMbWhNbOe87We9b/hP//e/97OXv/c///a///Y/+cOZz/Sv/WOd' . + 'bnOefvOe//Kf9jCGNrCGv/EP//CP/nCOf/AP/3APfvAO/nAOfe' . + 'AN7WANbOAM7GAMa9AL21ALWtAK2lAKWcAJyUAJSMAIyEAIR7AH' . + 'tzAHNrAGtjAGPP1sZnAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgF' . + 'HUgAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAAHdElNRQfTAwkUIj' . + 'mBTjT/AAAASUlEQVR4nGNgQAGskhKsEJaCrJiSuhZYTEFASFlD' . + 'GyQuqSCnrK6tJwpkiquoamgbGIGYrFpaugbGxmCNunpAljHECB' . + 'ZBQRZU4wFSMAZsXeM71AAAAABJRU5ErkJggg=='; + + //========================================================== + // File: bxs_green.png + //========================================================== + $this->imgdata_xsmall[9][0] = 370; + $this->imgdata_xsmall[9][1] = + 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAAn1' . + 'BMVEX///////+/v7+/v7/G/8aUxpSMvYyUzpSMzoyM1oxarVqE' . + '/4R7/3tavVpKnEpaxlpz/3Nr/2tKtUpj/2Na51pKzkpK1kpK50' . + 'pK/0oYcxgp/ykYlBgY3hgY7xgY9xgQ/xAI/wgA/wAA9wAA7wAA' . + '5wAA3gAA1gAAzgAAxgAAvQAAtQAArQAApQAAnAAAlAAAjAAAhA' . + 'AAewAAcwAAawAAYwA0tyxUAAAAAXRSTlMAQObYZgAAAAFiS0dE' . + 'AIgFHUgAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAAHdElNRQfTAw' . + 'kUKBrZxq0HAAAATElEQVR4nGNgQAGccrIcEJaivISyhjaIxa7I' . + 'I6CiqcMKZMopKqho6OhLA5kyqmqaOobGICartraeoYkJSAGDnj' . + '6QZQIxgk1Skg3VeABlVgbItqEBUwAAAABJRU5ErkJggg=='; + + //========================================================== + // File: bxs_darkgreen.png + //========================================================== + $this->imgdata_xsmall[10][0] = 563; + $this->imgdata_xsmall[10][1] = + 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAABX1' . + 'BMVEX////////l/+nAwMC86r+8wb28wby8wLy78sCzw7SywrSx' . + 'wLKwvrGuvK+syK+ryq2rx62n36ym3aumxKmk2qij0Keh16ahva' . + 'Og1aSguKKe06KeuaCetZ+d0KGdtZ+bz6Cay56ZyZ2Zwp2Zr5qZ' . + 'rpqYwJuXyZuXrJmVw5mUxZiTxJeTw5eTq5WRwJWPtJKOvZKKuI' . + '6Kt42Kn4yJt42ItIuGsomFsYmEsIiEr4eDr4eBrIR/qoN+qIJ8' . + 'poB7pH56o356on14nnt2nXl0mndzmnZzmXZymHVwlXNvlHJukn' . + 'FtiHBqjm1qjW1oi2toiWpniWplh2hlhmdkhWdig2VggGNgf2Je' . + 'fmFdfGBde19bbl1aeFxXdFpWclhVclhVcVdUcFZTb1VSbVRQal' . + 'JPaVFKY0xKYkxJYUtIYEpHX0lEWkZCWERCV0NCVkM/U0A+U0A+' . + 'UUA+UEA9Uj89UT48Tj45TDvewfrHAAAAAXRSTlMAQObYZgAAAA' . + 'FiS0dEAIgFHUgAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAAHdElN' . + 'RQfTAwkUKCFozUQjAAAATUlEQVR4nGNgQAGcoqrcEJYQB5OhSw' . + 'CIxSXGwWThGcIDZCppK5o7hyV6AZl6NnbuoSmFICZ3YHB0RkkJ' . + 'SAFDbEJaSUkJxAjeyEheVOMBQj4MOEkWew4AAAAASUVORK5CYI' . + 'I='; + + //========================================================== + // File: bxs_cyan.png + //========================================================== + $this->imgdata_xsmall[11][0] = 530; + $this->imgdata_xsmall[11][1] = + 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAABPl' . + 'BMVEX////////F///AwMCvxsaC1NSC0dGCz8+CzMyA//94//91' . + '//9q//9j//9X4uJX09NXz89Xx8dXxMRL//9L5uZL3d1L2NhLxs' . + 'ZLt7cv//8e9fUe8fEe7u4e398epqYehoYX//8L+PgK//8F9fUE' . + '/v4E5+cEb28EZ2cC//8C/v4C/f0CzMwCrq4Cjo4CdXUCaWkCZW' . + 'UB/PwA//8A/f0A+/sA8/MA7e0A7OwA6+sA5eUA5OQA4uIA4eEA' . + '3NwA2toA2NgA1dUA09MA0tIA0NAAysoAxsYAxcUAxMQAv78Avr' . + '4AvLwAtrYAtbUAs7MAsLAAra0Aq6sAqKgApaUApKQAoqIAoKAA' . + 'n58AmpoAlZUAk5MAkpIAkJAAj48AjIwAiYkAh4cAf38AfX0Ae3' . + 'sAenoAcnIAcHAAa2sAaWkAaGgAYmIUPEuTAAAAAXRSTlMAQObY' . + 'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxEAAAsRAX9kX5EAAA' . + 'AHdElNRQfTAwkUKQFKuFWqAAAATUlEQVR4nGNgQAGsUjJsEJaR' . + 'grC5qz9YzIiL28YriB3IlDZRsnYNiZUDMmXtHT2CE9JBTDb/wI' . + 'jkzEyQAoaomMTMzEyIERzy8hyoxgMAN2MLVPW0f4gAAAAASUVO' . + 'RK5CYII='; + + //========================================================== + // File: bxs_orange.png + //========================================================== + $this->imgdata_xsmall[12][0] = 572; + $this->imgdata_xsmall[12][1] = + 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAABaF' . + 'BMVEX//////////8X/3oD/3nj/1HX/0Gr/xGP/rkv/gBf+iS/2' . + 'bAL1agDxaQDuZwDrZwLpZQDmZQLlZADjcx7gZATeYQDdZgraXw' . + 'DZXwHYXgDXiEvXZAvUjlfUXwXTjVfTbR7ShUvRbR7RWwDMWQDL' . + 'WADKooLKWADJoYLJgkvHWATGoILFn4LFgEvFVgDEZx7EVQDDt6' . + '/DVQDCt6/CnoLChlfCVADAwMC+hFe+UgC8UgC6UQC4gVe4UAC3' . + 'gVe3UAC1gFe1eUu1TwC1TgCzTgCwTQKuTACrSgCqSgCpSgCpSQ' . + 'CodEulSACkRwCiRgCdRACcRACaQwCYQgCWQgKVQQCVQACUQACS' . + 'UR6RPwCOPgCNPQCLPACKPACJOwCEOQCBOAB+NwB9NgB8NgB7NQ' . + 'B6NwJ4NAB3RR52MwB0MgBuLwBtLwBsLwBqLgBpLQBkLQJiKgBh' . + 'KgBgKwRcKABbKQJbJwBaKQRaJwBYKAJVJQDZvdIYAAAAAXRSTl' . + 'MAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxEAAAsRAX9k' . + 'X5EAAAAHdElNRQfTAwkUJBSSy88MAAAATUlEQVR4nGNgQAGqwo' . + 'paEBYPJ4eKezCIpc7HwmrqG6ENZMpLihm6RaWEAZl6Vo7ekRnF' . + 'IKZWSHhcTnk5SAFDfFJWeXk5xAjj1FRjVOMBeFwNcWYSLjsAAA' . + 'AASUVORK5CYII='; + + //========================================================== + // File: bxs_lightblue.png + //========================================================== + $this->imgdata_xsmall[13][0] = 554; + $this->imgdata_xsmall[13][1] = + 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAABVl' . + 'BMVEX////////d///AwMC7wcS08P+y+P+xxdCwxM+uws2twMur' . + 'vsinzNynytylzuKhyN6e5v6d5P+d1fOcwNWcu8ub4f+at8iZ3v' . + '+ZvdGY2/yW2f+VscGU1vuT1fqTr72Sx+SSxeKR0fWRz/GPz/OP' . + 'rr+OyeqMy+6Myu2LyeyKxueJudSGw+SGorGDvt+Cvd6CvN2Aud' . + 'p+uNd+t9Z9tdV8tdR8tNN6sc94r813rct2q8h0qcZ0qMVzp8Rx' . + 'o8Bwor5tn7ptnrptnrlsnbhqmbRpmbNpi51ol7Flkqtkkqtkka' . + 'pjj6hijaRhjaZgi6NfiqJfiaFdh55bhJtag5pZgphYgJZYf5VX' . + 'cn9Ve5FSeI1RdopRdYlQdYlPc4dPcoZPcoVNcINLboBLbH9GZn' . + 'hGZXdFZHZEY3RDYnJCXW4/W2s/WWg+Wmo7VmU7VGM7U2E6VGM6' . + 'VGI5UV82T1wGxheQAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHU' . + 'gAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAAHdElNRQfTAwkUJziL' . + 'PvAsAAAATUlEQVR4nGNgQAHsQgqcEJYgG5Oegy+IxSHOxmTiFs' . + 'gFZMprKBnbB8e7AplaFlbOQUl5ICanX0BEWmEhSAFDVGxKYWEh' . + 'xAjusDBuVOMBJO8LrFHRAykAAAAASUVORK5CYII='; + + //========================================================== + // File: bxs_darkgray.png + //========================================================== + $this->imgdata_xsmall[14][0] = 574; + $this->imgdata_xsmall[14][1] = + 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABm' . + 'JLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAAsRAAALEQF/ZF+RAAAB' . + 'iElEQVR42k3QPU8TYRwA8P//ebkXrgdIColXRAOEkJqbaExMut' . + 'DBhE1GNjYHPg+DG6ODiU6QOLjVxITBcFKBYCstlAC2Bz17fe76' . + 'vLD6+wg/1FpTRFR5lpaub/u1eGBGaAT4HneD4OlXx7avtDYUjT' . + 'HQabd2Ti8e3vVSKzxrtHS32wIpFVldno22Nqvvg2Bhl0gp/aNm' . + 'vJ3qqXAtLIva+ks1H0wqlSXi4+d6+OFTfRsAfHJx2d1od24rZP' . + 'xP2HzopINr1mkesX7ccojqif0v9crxWXODZTno3+dNGA7uWLsd' . + 'mUYU4fHJCViMG9umLBmM4L6fagZGg9QKfjZ+Qfy3C3G/B3mugF' . + 'IHHNcDf64E3KJALApk2p8CSolUUqLjFkyxOGMsTtFyJ+Wz57NQ' . + '8DghS4sLB0svioeZZo7nPhFoUKZDIVFbglkTTnl5/rC8snjAkJ' . + 'Bk/XV5LxHC/v7tR8jzTFPbg8LENK9WX0Vv31T2AEmCSmlKCCoh' . + 'ROnP1U1tPFYjJBRcbtzSf+GPsFTAQBq1n4AAAABKdEVYdHNpZ2' . + '5hdHVyZQBiYzYyMDIyNjgwYThjODMyMmUxNjk0NWUzZjljOGFh' . + 'N2VmZWFhMjA4OTE2ZjkwOTdhZWE1MzYyMjk0MWRkM2I5EqaPDA' . + 'AAAABJRU5ErkJggg=='; + } +} diff --git a/vendor/amenadiel/jpgraph/src/image/ImgData_Bevels.php b/vendor/amenadiel/jpgraph/src/image/ImgData_Bevels.php new file mode 100644 index 0000000000..9130ccbf83 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/image/ImgData_Bevels.php @@ -0,0 +1,105 @@ + 'imgdata'); + + protected $colors = array('green', 'purple', 'orange', 'red', 'yellow'); + protected $index = array('green' => 1, 'purple' => 4, 'orange' => 2, 'red' => 0, 'yellow' => 3); + protected $maxidx = 4; + + protected $imgdata; + + public function __construct() + { + //========================================================== + // File: bullets_balls_red_013.png + //========================================================== + $this->imgdata[0][0] = 337; + $this->imgdata[0][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1' . + 'BMVEX////////27t/f3+LFwcmNxMuxm62DmqKth1VpZmIWg6fv' . + 'HCa7K0BwMEytCjFnIyUlEBg9vhQvAAAAAXRSTlMAQObYZgAAAA' . + 'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN' . + 'RQfTAxcBNhk+pYJVAAAAl0lEQVR4nE2Q2xLDIAgFHUWBKJf//9' . + 'oekmbafVDZARRbK/pYTKP9WNcNv64zzUdd9BjmrgnsVXRNSzO3' . + 'CJ5ahdhy0XKQkxld1kxb45j7dp0x2lBNOyVgQpMaoadX7Hs7zr' . + 'P1yKj47DKBnKaBKiSAkNss7O6PkMx6kIgYXISQJpcZCqdY6KR+' . + 'J1PkS5Xob/h7MNz8x6D3fz5DKQjpkZOBYAAAAABJRU5ErkJggg' . + '=='; + + //========================================================== + // File: bullets_balls_green_013.png + //========================================================== + $this->imgdata[1][0] = 344; + $this->imgdata[1][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1' . + 'BMVEX////////27t/e3+K3vriUub/Dm18j4xc3ob10k0ItqQlU' . + 'e5JBmwpxY1ENaKBgUh0iHgwsSre9AAAAAXRSTlMAQObYZgAAAA' . + 'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN' . + 'RQfTAxcBNTfJXtxZAAAAnklEQVR4nE2QWY4EMQhDUVhSIRC4/2' . + 'kbaqLp9p+f2AxAayAzDfiK9znPORuvH0x8Ss9z6I9sHp6tcxE9' . + 'nLmWmebmt5F5p2AR0+C9AWpLBjXRaZsCAT3SqklVp0YkAWaGtd' . + 'c5Z41/STYpPzW7BjyiRrwkVmQto/Cw9tNEMvsgcekyCyFPboIu' . + 'IsuXiKffYB4NK4r/h6d4g9HPPwCR7i8+GscIiiaonUAAAAAASU' . + 'VORK5CYII='; + + //========================================================== + // File: bullets_balls_oy_035.png + //========================================================== + $this->imgdata[2][0] = 341; + $this->imgdata[2][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1' . + 'BMVEX////////27t/f3+K5tbqNwcjnkjXjbxR2i5anfEoNkbis' . + 'PBxpU0sZbZejKgdqIRIlERIwYtkYAAAAAXRSTlMAQObYZgAAAA' . + 'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN' . + 'RQfTAxcBNgK0wEu5AAAAm0lEQVR4nE3QVxIEIQgEUErAgTHA/U' . + '+7zbipf9RXgoGo0liMmX6RdSPLPtZM9F4LuuSIaZtZWffiU6Iz' . + 'Y8SOMF0NogBj30ioGRGLZgiPvce1TbIRz6oBQEbOFGK0rIoxrn' . + '5hDomMA1cfGRCaRVhjS3gkzheM+4HtnlkXcvdZhWG4qZawewe6' . + '9Jnz/TKLB/ML6HUepn//QczazuwFO/0Ivpolhi4AAAAASUVORK' . + '5CYII='; + + //========================================================== + // File: bullets_balls_oy_036.png + //========================================================== + $this->imgdata[3][0] = 340; + $this->imgdata[3][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1' . + 'BMVEX////////27t/e3+LO3hfYzz65ubiNwci6uQ12ipadgVGa' . + 'fwsNkbhnVkcaZ5dwSA8lFg7CEepmAAAAAXRSTlMAQObYZgAAAA' . + 'FiS0dEAIgFHUgAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAAHdElN' . + 'RQfTAxcCBySi1nevAAAAjElEQVR4nFXPWw7EIAgFUNMoCMhj/6' . + 'staKczc/2RkwjS2glQ+w3YytgXCXCZpRo8gJdGxZadJws13CUP' . + '4SZI4MYiUxypeiGGw1XShVBTNN9kLXP2GRrZPFvKgd7z/sqGGV' . + '7C7r7r3l09alYN3iA8Yn+ImdVrNoEeSRqJPAaHfhZzLYwXstdZ' . + 'rP3n2bvdAI4INwtihiwAAAAASUVORK5CYII='; + + //========================================================== + // File: bullets_balls_pp_019.png + //========================================================== + $this->imgdata[4][0] = 334; + $this->imgdata[4][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1' . + 'BMVEX////+/v7i4eO/w8eHxcvKroNVormtfkjrMN2BeXQrepPc' . + 'Esy4IL+OFaR7F25LHF8mFRh5XXtUAAAAAXRSTlMAQObYZgAAAA' . + 'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN' . + 'RQfTAxcBNgkjEpIxAAAAlElEQVR4nE2QAQ7FIAhDDTAVndL7n3' . + 'ZV/7JfEwMvFIWUlkTMVNInbVv5ZeJqG7Smh2QTBwJBpsdizAZP' . + '5NyW0awhK8kYodnZxS6ECvPRp2sI+y7PBv1mN02KH7h77QCJ8D' . + '4VvY5NUgEmCwj6ZMzHtJRgRSXwC1gfcqJJH0GBnSnK1kUQ72DY' . + 'CPBv+MCS/e0jib77eQAJxwiEWm7hFwAAAABJRU5ErkJggg=='; + + } +} diff --git a/vendor/amenadiel/jpgraph/src/image/ImgData_Diamonds.php b/vendor/amenadiel/jpgraph/src/image/ImgData_Diamonds.php new file mode 100644 index 0000000000..05a6001f95 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/image/ImgData_Diamonds.php @@ -0,0 +1,178 @@ + 'imgdata'); + protected $colors = array('lightblue', 'darkblue', 'gray', + 'blue', 'pink', 'purple', 'red', 'yellow'); + protected $index = array('lightblue' => 7, 'darkblue' => 2, 'gray' => 6, + 'blue' => 4, 'pink' => 1, 'purple' => 5, 'red' => 0, 'yellow' => 3); + + protected $maxidx = 7; + protected $imgdata; + + public function __construct() + { + //========================================================== + // File: diam_red.png + //========================================================== + $this->imgdata[0][0] = 668; + $this->imgdata[0][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA/F' . + 'BMVEX///////+cAAD/AADOAABjAABrAADWGBjOCAj/CAj/GBj/' . + 'EBCcCAiMOTl7KSl7ISFzGBilGBjOEBBrCAjv5+eMQkK1QkKtMT' . + 'GtKSnWKSn/KSlzEBCcEBDexsb/tbXOe3ucWlqcUlKUSkr/e3vn' . + 'a2u9UlL/a2uEMTHeUlLeSkqtOTn/UlL/SkrWOTn/QkL/OTmlIS' . + 'H/MTH/ISH39/f/9/f35+fezs7/5+fvzs7WtbXOra3nvb3/zs7G' . + 'nJzvtbXGlJTepaW9jIy1hITWlJS1e3uta2ulY2P/lJTnhITne3' . + 'vGY2O9Wlr/c3PeY2O1Skr/Y2P/WlreQkLWISGlEBCglEUaAAAA' . + 'AXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAA' . + 'sSAdLdfvwAAAAHdElNRQfTAwsWEw5WI4qnAAABGUlEQVR4nHXQ' . + '1XLDMBAFUKUCM1NiO8zcpIxpp8z0//9SWY7b2LHv6EU6s1qtAN' . + 'iMBAojLPkigpJvogKC4pxDuQipjanlICXof1RQDkYEF21mKIfg' . + '/GGKtjAmOKt9oSyuCU7OhyiDCQnjowGfRnooCJIkiWJvv8NxnG' . + 'nyNAwFcekvZpPP3mu7Vrp8fOq8DYbTyjdnAvBj7Jbd7nP95urs' . + '+MC2D6unF+Cu0VJULQBAlsOQuueN3Hrp2nGUvqppemBZ0aU7Se' . + 'SXvYZFMKaLJn7MH3btJmZEMEmGSOreqy0SI/4ffo3uiUOYEACy' . + 'OFopmNWlP5uZd9uPWmUoxvK9ilO9NtBo6mS7KkZD0fOJYqgGBU' . + 'S/T7OKCAA9tfsFOicXcbxt29cAAAAASUVORK5CYII='; + + //========================================================== + // File: diam_pink.png + //========================================================== + $this->imgdata[1][0] = 262; + $this->imgdata[1][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl' . + 'BMVEX///+AgID/M5n/Zpn/zMz/mZn1xELhAAAAAXRSTlMAQObY' . + 'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA' . + 'AHdElNRQfTAwsWEi3tX8qUAAAAbUlEQVR4nFXJwQ3AMAhDUdRm' . + 'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8' . + '6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R' . + 'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg' . + '=='; + + //========================================================== + // File: diam_blue.png + //========================================================== + $this->imgdata[2][0] = 662; + $this->imgdata[2][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA+V' . + 'BMVEX///+AgIAAAJwAAP8AAM4AAGMAAGsQEP8YGHMQEHMYGP8Q' . + 'EKUICJwICM5KSpQxMYQpKXsYGNYQEM4ICGsICP97e85aWpw5OY' . + 'xSUv85ObVCQt4xMa0pKa0hIaUpKf+9vd6EhLVra+dzc/9SUr1r' . + 'a/9aWt5SUt5CQrVaWv9KSv8hIXs5Of8xMf8pKdYhIdYYGKUhIf' . + '/Ozs739//v7/fn5+/v7//n5/fW1ufOzufOzu/W1v+trc69veel' . + 'pc6trd6UlMa9vf+MjL21tfe1tf+UlNZzc61ra6Wlpf+EhOeMjP' . + '9ra8ZSUpyEhP9CQoxKSrVCQv85Od4xMdYQENZnJhlWAAAAAXRS' . + 'TlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAd' . + 'LdfvwAAAAHdElNRQfTAwsWEx3Snct5AAABFklEQVR4nHXR5XbD' . + 'IBgGYM6AuHsaqbvOfeuknev9X8xISbplSd5/8JyXwwcA/I0AKm' . + 'PFchVBdvKNKggKQx2VIoRwMZihMiQE49YUlWBCcPL0hYq4ITh+' . + 'qKECUoLDZWqoQNA766F/mJHlHXblPJJNiyURhM5eU9cNw5BlmS' . + 'IrLOLxhzfotF7vwO2j3ez2ap/TmW4AIM7DoN9+tu+vLk6Pdg9O' . + '6ufXjfXLm6pxPACSJIpRFAa+/26DhuK6qjbiON40k0N3skjOvm' . + 'NijBmchF5mi+1jhQqDmWyIzPp1hUlrv8On5l+6mMm1tigFNyrt' . + '5R97g+FKKyGKkTNKesXPJTZXOFIrUoKiypcTQVHjK4g8H2dWEQ' . + 'B8bvUDLSQXSr41rmEAAAAASUVORK5CYII='; + + //========================================================== + // File: diam_yellow.png + //========================================================== + $this->imgdata[3][0] = 262; + $this->imgdata[3][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl' . + 'BMVEX///+AgIBmMwCZZgD/zADMmQD/QLMZAAAAAXRSTlMAQObY' . + 'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA' . + 'AHdElNRQfTAwsWEwcv/zIDAAAAbUlEQVR4nFXJwQ3AMAhDUdRm' . + 'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8' . + '6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R' . + 'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg' . + '=='; + + //========================================================== + // File: diam_lightblue.png + //========================================================== + $this->imgdata[4][0] = 671; + $this->imgdata[4][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA/1' . + 'BMVEX///+AgIAAnP8A//8Azv8AY/8Aa/8I//8Y1v8Izv8Y//8Q' . + '//8InP8Qzv8Ypf85jP8he/8Yc/8Ia/8pe/8p//8p1v9Ctf8xrf' . + '8prf8QnP8Qc/9CjP+1//97//9r//9S//9K//9C//85//8x//8h' . + '//9r5/9K3v9S3v851v97zv9Svf85rf8hpf/G3v9SnP9anP9KlP' . + '8xhP/n7//v7+f3///n///O//+U//9z//9j//9a//975/9C3v8h' . + '1v+E5/+17/9j3v/O7//n9/+95/+l3v9jxv+U1v8Qpf9avf9Ktf' . + '+Uxv+11v97tf9rrf+cxv+Mvf9jpf+tzv+Etf/O3v/39/8Akkxr' . + 'AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACx' . + 'IAAAsSAdLdfvwAAAAHdElNRQfTAwsWEiHk6Ya/AAABGUlEQVR4' . + 'nHXQ13KDMBAF0J2o0E01GHDvJa7p3em95/+/JQJMYjDc0Yt0Zr' . + 'VaAaxHgtxwbSGPkGQpOIeQ2ORxJiJmNWYZyAhZR0WcgQGhViU0' . + 'nEGoedDHGxgRapRPcRpXhOr7XZzCmLjaXk9IIjvkOEmSRLG62+' . + 'F5XlEElhA5sW21GvXj6mGlDBfnJ51lr9svnvEKwH1hu2QPbwd3' . + 'N9eXVzuL7/Hn29frdKaamgcgy67L3HFG9gDefV+dm5qme4YRXL' . + 'oVR374mRqUELZYosf84XAxISFRQuMh4rrH8YxGSP6HX6H97NNQ' . + 'KEAaR08qCeuSnx2a8zIPWqUowtKHSRK91rAw0elmVYQFVc8mhq' . + '7p5RD7Ps3IIwA9sfsFxFUX6eZ4Zh4AAAAASUVORK5CYII='; + + //========================================================== + // File: diam_purple.png + //========================================================== + $this->imgdata[5][0] = 657; + $this->imgdata[5][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA/F' . + 'BMVEX///////8xAP/OAP+cAP9jAP9rAP+cCP85CP/OEP9SKf/O' . + 'CP9CEP9zGP9rCP+lGP/WOf/WIf9KIf9jOf+MQv+EMf97If9zEP' . + '+1Sv+lIf/ne//eUv/na//n5//Oxv/Wzv+chP9zUv97Wv9rQv9a' . + 'Mf9KGP/v5/+te/97Kf+9Y/+tOf+tKf+lEP/vtf/WMf/WKf/v7+' . + 'f39/+tnP+9rf9rSv9jQv9CGP+ljP+EY//Gtf+tlP+Ma/9zSv/e' . + 'zv+UUv+9lP+cWv+lY/+cUv+MOf+EKf+UQv/Opf/OhP/Ga/+1Qv' . + '/Oe/+9Uv/ntf/eWv/eSv/WGP/3zv/vlP/WEP//9/+pL4oHAAAA' . + 'AXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAA' . + 'sSAdLdfvwAAAAHdElNRQfTAwsWEjX+M1LCAAABDklEQVR4nHXQ' . + '1bLDIBAGYFqIEW+ksbr7cXd3ff93OUCamdOE/Mxw882yywLwPz' . + '+gNKotlRFUVnNUQlCxTMRFCKEdE+MgpJaEiIOU4DKaoSIygtb3' . + 'FBUQrm3xjPK4JvXjK0A5hFniYSBtIilQVYUm+X0KTVNiYah+2q' . + 'ulFb8nUbSovD2+TCavwXQWmnMA6ro+di+uR5cPzfPhVqPV3N1p' . + 'n3b3+rimAWAYhP3xnXd7P6oc9vadPsa1wYEs00dFQRAFehlX21' . + '25Sg9NOgwF5jeNTjVL9om0TjDc1lmeCKZ17nFPzhPtSRt6J06R' . + 'WKUoeG3MoXRa/wjLHGLodwZcotPqjsYngnWslRBZH91hWTbpD2' . + 'EdF1ECWW1SAAAAAElFTkSuQmCC'; + + //========================================================== + // File: diam_gray.png + //========================================================== + $this->imgdata[6][0] = 262; + $this->imgdata[6][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl' . + 'BMVEX//////wAzMzNmZmbMzMyZmZlq4Qo5AAAAAXRSTlMAQObY' . + 'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA' . + 'AHdElNRQfTAwsWExZFTxLxAAAAbUlEQVR4nFXJwQ3AMAhDUdRm' . + 'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8' . + '6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R' . + 'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg' . + '=='; + + //========================================================== + // File: diam_blgr.png + //========================================================== + $this->imgdata[7][0] = 262; + $this->imgdata[7][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl' . + 'BMVEX///+AgIBmzP9m///M//+Z//8hMmBVAAAAAXRSTlMAQObY' . + 'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA' . + 'AHdElNRQfTAwsWEwCxm6egAAAAbUlEQVR4nFXJwQ3AMAhDUdRm' . + 'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8' . + '6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R' . + 'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg' . + '=='; + } +} diff --git a/vendor/amenadiel/jpgraph/src/image/ImgData_PushPins.php b/vendor/amenadiel/jpgraph/src/image/ImgData_PushPins.php new file mode 100644 index 0000000000..da18d9f645 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/image/ImgData_PushPins.php @@ -0,0 +1,516 @@ + 'imgdata_small', + MARK_IMG_SPUSHPIN => 'imgdata_small', + MARK_IMG_LPUSHPIN => 'imgdata_large'); + + protected $colors = array('blue', 'green', 'orange', 'pink', 'red'); + protected $index = array('red' => 0, 'orange' => 1, 'pink' => 2, 'blue' => 3, 'green' => 4); + protected $maxidx = 4; + protected $imgdata_large, $imgdata_small; + + public function __construct() + { + + // The anchor should be where the needle "hits" the paper + // (bottom left corner) + $this->anchor_x = 0; + $this->anchor_y = 1; + + //========================================================== + // File: ppl_red.png + //========================================================== + $this->imgdata_large[0][0] = 2490; + $this->imgdata_large[0][1] = + 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABm' . + 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA' . + 'B3RJTUUH0wMKBh4Ryh89CgAACUdJREFUeJy9mNtTFFcexz+/7p' . + '4Lw1wZJKDGCAwmDAqUySamcCq1ed6k9mn3UfMP7F+1T3nYqn2J' . + 'lZdoDEjpbq0KG8EBFBFBEJye6Zmenkv32Ydu5GYiUMmeqq6uqT' . + '6Xz3zP73aOcIKmAQkIFyD3N/jrBPwlKjLQEglVlJKyUjR3u7cc' . + 'WLoP3/4dvv03LNrQ8I6x1rFbDML9kOmHvh7IRHU9JKmUSG8vpF' . + 'IoXX/TV0AiEM5A5jT0noFMFMJHXUt/d5f9TUAbhtQ3cPFruDog' . + '8klHMnmO0dGYe/myOJGINEwTz3F2higFXgy8PpAkOC+h8hoaCt' . + '4ppHFcQAWSgOQlyI/p+lUjmRxWAwNJd3xca/f34yoFi4tgmjtD' . + 'NIFkJ4xcgBCgVqEBFJ9DqcZea/gNAAVEg7AOGYnHe9XoaJd3+X' . + 'LISSSwnz6lsbKCZ9sHh4UVdBkwdA6cPwNnIfJPmC3Ctgft3wwQ' . + 'QPkvTZJJnbExzfvsM2nMzVG7e5fG48d4lnXwTwEYCjJxuHQBog' . + 'BHUfKkgAIIhiGk06hTp/Dm5qS1uYlXLvtWd4gPgIiCrAEcVckT' . + 'Ab5p7TaYJrK1hQaEenrwSiVfQdc91P0kSp7Ii89D5ksY/kAkLy' . + 'IZXFdXkQjS1YUSEbdcRu168V6+HTUNIKJDRwdE+sBIQmP9Ld59' . + 'bEBA3of4F/D+uXb7rGaaCSmXI3pPj64PDaHCYfEqFVSjgWo2D2' . + '73XlJNQTgCyQykIuBWoNKEeh1aLXBPBCggGdBOgxZVSjoajVhH' . + 'o5HWlIpq4bCQSgm9vXhK4ZZKh5SUYygp4J1EQVUD9xlU18BJQD' . + 'bUbJ5T5XJStyxN9fSI099P3baxV1dRloW2h2ivx/yakg2ot6F1' . + 'EkCa4G1D+zVEq5ArKTWM42Q6HUczQV7U66w9e0ZpdRXlOIQ5vF' . + 'VHUXILKify4jiEzkOqC3peQMoBQymFlMt4Dx6wUSxSsm2UZXEK' . + 'P30QvOUt8/2Sd78CdWwFDTA+gsw3cOlPcPUD+CQB52oQ21RKXM' . + 'eRhGXhOg7VoKrx8KuS4ygZhVg3ZI8FGIfwR9BVgAtfwxdXdP3L' . + '86nUR91dXelNXTeWWy10paQHX602YAP1ADASAL7LJvFtMpOCc0' . + 'cG3FHuGlz6Gr4YEpnoTCbzsdHRbOzy5RCRiLRMk5rjyOtAimwA' . + 'U4U3SurBN/0wnAASBCVDIKpB4kiAB5Ub0/UvO9LpPAMDGfn005' . + 'AxPCzxep3Q6iqPLUseBoufCZRsAE6g5g5kKIDfKUj3wnpAG8QB' . + '/Z1OIqANQuI65AtwNScyYXR2XlAXL2YZHzcklRKWl5GVFXFtGx' . + 'MoAiV/EQaAGH6BUQNWgQpwFngv+Ca8KUAQEBcwgTJHyMV7679R' . + 'XS8YqdSI6u/PMD5ukMtJY3GR2uQkr5aXeWVZOEALmA8WsIAxfL' . + 'd0goVLAdCOd+/YpgqeVtBv4yiA++q/RKKXixe7GB8PSyoljcVF' . + 'yg8fyubyMpulEk2lyAIfAAvAC+B+oOQFoAt/+0rAejB/EzjNri' . + 'vvqNnCd64jxcE39V8spnP+vMbAgDSePKE2NcXm06dslMuUlcID' . + 'TuFvqwXMBU8N39bGgRR+ki0Dz4L5DSAe9NGD7zq+6kcN1L6H2b' . + 'ao5WWaQHllRTafPmWrVMJUimoAQrBYJFjQwre7B6A8YAi8LCgD' . + '5DVo6/hbb/iHK1KggvFeD3hHziQKEMuiNTNDbXGRTdtmw7Iwla' . + 'KGH0oqwbscLOoG46rAY6AOzRhY74PT6QuUKEN4PegXxd/yEDTT' . + 'YMWOk+oEaLkuFdNk0zTZwjfkavDUArXWgGXgFb4dEShXhfYqlI' . + 'ow3w9rg3B6ED60IOOA5oEYQBrcpG+mj9bg0VG8GMJhVDZLyzAo' . + 'VSq8rFYxXXefcjVgG9+uisDrXUCApoKSBcUHMBmHhfcgNwhtD3' . + 'q9IG6Lr15b4OUTmPwBJt8JqGuapp05o0mhoHnptLQfPsR+8IBK' . + 'uYyNH3yr+B77LHheA3tK1Ta+IrMeTL2C6Xl48TOsNWDDgAz7s5' . + '/r+krP/eddCsbj8fDQ4GBm9MqVvvRXX2VULBayRGRzaYn1SoWa' . + 'UjgB4PIB5QK4ZgBXBKaAHxQsrED1H7CRgCUPwgHZDqACmhWwXv' . + '2aDRqGYeRyufS169cvThQKV88PDuYbW1vJ5VRK+5euqxWlPMdX' . + 'SRqgreHbZGN3ijfKBXBTAeh2Fdwi2MofshP/dvKwCmKhp4m83Y' . + 'vj8Xg4l8tlCoXC0MTExMTFkZE/1m37wvLGRvKRacoD1209E7Fc' . + 'pZwYREOQqEJ4z3HskHLsz4AoXykPIBSN0t3dTTQafROoHdumXC' . + '4fjoMiog0ODiauX7+eLxQKV3O53ETdti88nJnJ3rl505ifmWm3' . + 'arWSodR8GNbycDoNHy5C5jFold1k8d+DyvELNwg93d18/vnn9P' . + 'X1oes6nufx/Plz7t+/fxhQKSWJRCI5NjaWHxkZKdj1+sjSwkJm' . + '+uZN/dZ337VqCwullGUVdZjsgIUC5LqhrUPvCugWuApeApPAzY' . + 'PKHWyaphGNRunt7WVwcBARwfM8Ojo6sCzrMKBhGLphGFEF2Wq1' . + '2jc7M5OZ/vHH0MPbt93awkJJmeZsC6ZaMK3DCwvWdNioQUb5B6' . + 'AdBR+9SzkAz/NwHIeXL18iIui6TjgcJplMMjY2th8wHo+Hh4aG' . + 'MsPDw6fddru7+Phxx51bt/RbN260qwsLpZhlFZsw9QJ+2Pbrga' . + 'oJG2FY2oKwuTtVEz9uV34NbqdtbW0xPT1NNBoF4MyZM1y5coWu' . + 'rq5dQBHRcrlc4tq1a/l8Pj9RMs38ndu3Ez//9JNXLRZNyuXZJk' . + 'xVYKoExQpsK/+IaAuYb7no8zjC/R+A4zisrq7u+53NZjl16tQ+' . + 'QIlEIslsNpuPRCJXZ2dnh2/duNFRW1oy07a96MKd575yxRqU1B' . + '5vPMpF5HHa1tYW9+7do7Ozc/eQpZTSQ6FQt1Lq8pMnT/5w7969' . + 'nuLcXE1rNufO9fRMhlKpOyvt9qPtVmvb25fFfvvWbrepVCqHwo' . + 'xaX19vff/996ZhGC8qlkW9Wt1Onz073fXxxz+6MB+9e9dUjuO+' . + '7ebq9wLdB9hoNCrr6+s/4wf3FCJW3fPmTZhXsNWCprjuW66Dfr' . + '928KAfBhJAEgiJSLuzs7OSTqctoFkqlZRt26j/I+L/AGjPTN4d' . + 'Nqn4AAAAAElFTkSuQmCC'; + + //========================================================== + // File: ppl_orange.png + //========================================================== + $this->imgdata_large[1][0] = 2753; + $this->imgdata_large[1][1] = + 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABm' . + 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA' . + 'B3RJTUUH0wMLFQ0VCkHCzQAACk5JREFUeJytmGtzG0d2hp8zNw' . + 'AEcRdJ6EJK9FL0CqZUm9jWbkwq3vhDstl8dmLvz8rP2H8Q75ZT' . + 'pkRfpLgqsS6WIFEKGYkiSBCDO+banQ8DUpRWEkklXQUUqlCDfv' . + 'rp857pgfAOQ4AMOJdg4R/hX96Hf06bvDc5iT07i8yeg8ksiIAI' . + '4TBi/ds9/vivD/njapNHvRBfHXMu410AM+BUoVSF05NQsi1sO4' . + '8402AXwLQTuP31OAZO2aG0MEn14iSlnI1z3LnMk8IZYJyBwjIs' . + '/TWsVIWPJkvMFS4zMfMhUp5BsoCpAAEBLYKaMFGn00jBxnvu02' . + '35+JHmSJEnBpQEcPo38MmCxd/nS9Ry71Ga/g1W9a8gn0GsHkgA' . + '6DGjxkqb5CoO+YxF3A3p+jGjQUzoK+L/V0ADzFMwtSR8eLbAr8' . + 'uXOTf9NzhTc0geSLUQcYHgYEH786RMg0zWJHV2Aitv4x/HpHVS' . + 'QA2YBqTTGIUq5qkPMWaWkVwPnPtAA/BevmZcjxaaUtHh8pJJGu' . + 'DpCB9FvT7A7YT7S3p5vFMNzmWo/O0MSx/Ms3TqI8r59zFTfUQe' . + 'I7SBODE3tnfoIxYnNHligwik0zAzDdVpyKbA8sff5YAeMEwgkV' . + 'cufQeTJzZoCsaFLKXPTnNpoUTNsSgJmNoGsuNQjIDwYD2HlnZy' . + 'k++yxTKXZfKTU8zOpjhneeQYkorSmGERtIlICBKRbLX+y98YN3' . + 'ADcNIm+bJD4U3pPnmbEaRgYVRTGBkDSSsmxKfY7ZLuDJA4hdjl' . + 'JEgyBB2SJOvQ9RzTpNKoEwNq0CNFvOXR3/HxMgYVPObaz8kPmh' . + 'hkEWMatAfRONGGvLizyOE9P8KkpwhPDAgQKJQbELUD0oOIhbbH' . + 'JeVTmowxjAgZutB5AoOngA+2DdYrcTyOyYZP9+QpBvI29vwEhb' . + 'It042BVQgDy9KTMfkwQG1A9ACCLlgBBGUwxxoc52WDh2ATyEPp' . + '1hoaPvrEBh0Dq5an9OUsl/9hylk5b5c+mowLc4E2Jtw4Eoljyf' . + 'ogA/AGEAagNRjGyUxOmEycyVA5EWDBxrmUp3ytLIv/NJP69Goh' . + '+9mFydIvS5PZYkvH1oY/RFtKymlwBFQAgQd+kAA6qSQ8pvn2mp' . + 'SkJkuVFHPHBnQMrEt5Sl+e4/Lvp51PF1PF5Xy6WMvOWZXMom8z' . + 'OZTQ8+j5sbQiMEwopsCIwRtBGIJSCdzbTGo9NimkDcgdC7Bg49' . + 'TG5n4/nfr0Si77WdYp1YzyZEkWPdteaEnB7pPqBTxuIf/VgciE' . + 'SgasCPwh+GNIkaNNag1RiPge5pEhMQVjfoLcF+eoXSvbKxedwn' . + 'LKzC3KWbOi5/sW5a44/SHFUSgVA7SCzRG0AvA9mPOgFIETgu4n' . + 'Ww0wNQWFAqRSL6D2ZQYBdDrQ7R7jXiwgRcvIL02makuTmWtpM/' . + '+BlLMl5vuWzLVEuwH6oYnR1KS8kJINGXMM2YdfRlALoQoQQKeb' . + 'bDVwoMdxQMaLCwLo96HZTF5HbrEhmOftianfZisfzueKv7ZmrX' . + 'MsjhxKXZGBjzyeEHmSE3oWiggtyVGmE8DTIXTC5NxgAxOAGUM8' . + 'fun9mnSSLQ/CxNzOTgJ3LIMgoGwkKBiiMyaVviHVkdCO4FEKNv' . + 'LQzWBYHfITPa4UBVM0LR/WB7ARJsdDDTjA6deYFIFUOimJ3d0E' . + 'sNdLavYYgBpthqKcjiiJRO8K6CK0CsJTjfQAGaJtD9vQFAxNNQ' . + '1FB0yBAfA8gdMAIagLoCVAen0M00zMOTYShNDtoHs9CAIUoI4E' . + '1IBihCdNhsMhsj6NuV7BCC2IBpBqQaaFOENCCeiEsO1BO4RQgy' . + 'I5Hm4k4oIU9MrgZSAdBeTabZz+ODxKQRRBFBJo6IUc51anYRQo' . + 'dto+24FNxYCiaWKkQsj00KkO4gxRRkAngJ868M0u3OkkM+hxQA' . + 'cQ7YD7GO5XYSsPZybh/TCkFIYY+kWniTW4Q7jXgHvHMhiRpmuW' . + 'ca08GZkkZ/nY6TZMNhCnf2CuPoDVJvxpB+q9BHA8Ag1uH+oP4c' . + 'YEPCzDwmzSLquShHW/E0YRbG/BjZtw40hAy7aNzJlzRn75E6N0' . + 'qiwTzafI7kOU3gWrhzZC2iHcbsPqLlxvJnCt4KC1RYAL3I5hzY' . + 'Xv/huePYCtITQMKEnyB4KQvMURuJvw889HGSwUCs7CwkLpo6tX' . + 'Ty/+7nel6VLGDn/8N9m+eZuo1UP8iNhLau6b3RfmOsHBGTUYw9' . + 'WBNeDrGB4+h/4qNLKwTnLbHj9CJw/6GoIh9Jpvq0HHcayFhYXi' . + 'l3/4w9LK8vLKexfma3G/mb/3n1njTivS7tNQaaU1grQDjJ868D' . + 'Axx6vmxnBrY9C9IcSbSXbavNjb/S3eN6/0m1JcKBScixcvllZW' . + 'Vi6uLC8v12q1v/M8b/HxVjP//YYr32yE4dYWvShO0ogi14xwxq' . + 'F4rbnxZ3cMjtpvEEeMvwA0TdOYn5/PffHFF7Vr166tvPeLXyx7' . + 'nrd4+/btyg/frFo//Xgncnd67qCn78earQqcmYD3fSi1wPCTSV' . + '3gzqvm9uFOMl5nUAqFQn5paal26dKla57vf7D+6FHph9VV88af' . + 'vgq79bo70e3VT2l9A3hYg4UiRALVHTCHSZvYBm4A//6quf8zoG' . + '3bpuM4acMwKr1+//SDe/dK31+/bv90/Xrcq9fduNW6rbVeC+E7' . + 'gWdD2DKg4UEpBmPcm10RuScida31ntb62HAigoigDw6Gh0axWH' . + 'QWFhZKi4uLZ+I4PrVer2e+u37dXPvqq6hbr7tOp1NXWq89h6/b' . + '8FBB34WGBesdcPrj38lkMkGlUuml0+mu53nR3t4eo9HoSLhMJk' . + 'OlUiGdTuN5Hq7rvgA0TdO4cOFC7vPPP6/VarXldqdTu7m2lrv7' . + '7beq++BBO263b/tKrfWSXlbvwJ6CuAtDgTYiaBFMw6BSqfDxxx' . + '+rarWqGo0GN2/eZGtrC6XenAkRoVKpcPXqVWZmZmg0Gty6desF' . + 'oIhIOp3Ol8vlmmVZK3fv3Lm09uc/Zwbr653ccPgoNIzvnmn99Z' . + '7W9QG46lAaM5mM2l95GIYUi0VOnz7N7OwsWmsymQzyuse5Q8Mw' . + 'DNLpNDMzM5w/f/7A6AGgUkoajYa9urpayOXzUz/fvZutr68Pim' . + 'F4/2y1+n2o9Q/ru7uPesPhXnyo4A+vfHp6mmazybNnz9jZ2UFr' . + 'TbPZJAhe+8/aS0Mphed5NBoNABqNBqPR6MWBVWstvu/nnj9/Pv' . + 'vo0aPq5uZmPBgM/qcwPf39xV/9ajU1M3Nvq9PZaw8GoT50PjdN' . + 'k6mpKa5cucL58+eJ45j19XWePHnCzs4OnudhmiaWZRGGIVH05r' . + 'yEYYjrumxubrKxsfFyDQJ6NBp1Pc+7C4jWumBaVm+kVL2l1H2l' . + '1G6otS+H6V6z8u3tbVzXpdFooJRicXGRqakptre3uXXr1ltrcT' . + 'Qa8ezZszemWAE9rfUdYBOwtVLRbrPZ+48ff+wDvuu6Sr3MB4Dr' . + 'uty6desgfa1WC3iRyrNnz4pSSmezWUzTfGtYtNYcdvC/9sMlgP' . + 'n5N4cAAAAASUVORK5CYII='; + + //========================================================== + // File: ppl_pink.png + //========================================================== + $this->imgdata_large[2][0] = 2779; + $this->imgdata_large[2][1] = + 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABm' . + 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA' . + 'B3RJTUUH0wMLFQolY9lkpgAACmhJREFUeJy9mOtzFNl5h5+3b9' . + 'Mz0kzPBWmEVtIiWYhIiC0HCDhB8lb8ISk7nzdZ5+/zJ/8BTmpT' . + '660CZLwG1pVFgBkgGIHECEaa+/T9nHzQCCQuRpCNz6mp6g893U' . + '8/c37ve3qEjxiC4OA4n/Lp/EUu/tsMM/+aEWduVBx7WhdkShcY' . + 'xUH2zo0Dwod/5N6vf8V//PoGdx8M8EOFPtK9jI8BdHCcMuVSmf' . + 'LxHLmSZdm2U8xIbmKETDGDZZnIy4dBbCynyGhphurEDBOlHFnn' . + 'qPcyPxTOwDCOccw7w5nlBRZWylI+ny/mZ6rL1dzUZ5/IWGZU3D' . + 'ZIOMQDDaJcHDVGWUbJBi9odVr0QoVSPzigIEaZ8vgSS/8wZU3/' . + 'k1fylipz5dLM2WlrZqHKaGCKbEbontq3KAKWQyZfZKTgYqc9Bp' . + '2I2PcJ4ogk/UEBQcwipbFZmT13vDBx8fhnE1Ofnp9yJopFyT3X' . + 'yANfks0QHSQMDaL37pOxMLIu2UyVkjVKLjyKSeuD8dAYCFkso1' . + 'gYMaeWJ40T56cl8yAi/O4FSa2P6kYczIDsgVpAqcDImZPMuAB1' . + 'dkLQtcc8a/bwox8IUHAxZVxGZMouSLVYwKuMkD5IxN+JSdsRJB' . + 'pexuTVgYYM6EoGmxkmg3/hEhNUMr/hd7dqbOzExMn/GRDAxWZc' . + 'j3I8HiXfMjF2FQowKw7pjoN6E/Llw/GBJj8qxVOMlX4ipxc/lY' . + 'kl2zBLkmrTcEzMkoNoRLVidLi/9g+Z3I+1xRHX5EcAihxnbPRv' . + 'OTU9kZSmpKPy9FTGrLimPZ1H+UiyGaF67w6n7E1DwMngFDxGvc' . + 'w70v0xZUby5IxjlIyMssUJrJwVWkXBdbXvSvwEibcSdKCAFI16' . + '4/sc0SRo9cGAGq1DwvQFzV6DVuBiV4zYnlEts6A2TSPcSiXoxo' . + 'QqJCEEFMbQ2b69o5qMiOOPqIMQkagu/aSL7waE8101WFShLjk9' . + 'yxgEvjRUiyYd+gwAjY2J9VpXfZ/JEXLhDp3OR6U4T97+hEnPwx' . + 'tv4HsRjy2tTQSFzQgDUnwSLBQRI+x1ZgcH87Vcv4SF19Kt0ezS' . + '1h9s0Ma25pgr/YJfnLnEysok0+ezjM6EBLldGqKIJYuDRhOQEJ' . + 'Oih8X9Q0xmcXNjlCofBJgn78wxVz7L2YWf8tPPz1hnfjbjzfxN' . + 'qVwutq2etZXUQSXikcXGIgUiUkJSDIQMJgYGJsaB3c7b1qQ4GZ' . + 'xSkdGZIwMeNLfK6uezMnvJK3pLxeVixfvMsyVjSNSO6IV9adPG' . + 'AArkEEz8oUkFmBjYGO80qfd6pCWIayD59wIKcsjcKqufn7JO/S' . + 'xfyi+5c24pey5rZ09mJRNkiDdT/tzbkBr3SYkpMYpgEaIJSYhI' . + 'kSOY1GhilAQk5ntDIojxCZ/kf87Pl85xbuWEnLiUy+cW3NNuJX' . + 'MmY5meKf6mT7wZS+THdOjxlG06tIlIOMZxchSxcFFEGAwAGGME' . + 'jwyZYSnWL3cXWiIUbUI6hO/vxXuFOV84ycmlBWthNeflTjuzTi' . + 'lzJmM5s46Ej0J63/ZoPmoy6PYxtYVNhmfs0mbAND1mmKVMBY1L' . + 'mxA1LN7WgXQbCApNhKJHRIM+DQbv7yQGhjnJ5NgFuXBuxpu5mD' . + 'udm3LPuY7pmZLUE6L1SIJaIPFuDAqyw9lnwDYv6NFHkWJh4ZDB' . + 'wCBFD3uMxsTAwcBAiElpE/KcPg36dIiOvpsRxDCyhmlP2YY9ZU' . + 'v8NMb/1id+FGO0DTztkSXLOONUqeITsMkW2zwnJEIDFhYGx+A1' . + 'kwK4mASkvKDPc3p0iYhRRwYUhZLUTyV6Eu0t4s1Y4kcx6W6KaM' . + 'EZThcXH59RRhGEgIAddnBwNEBKqqpUtWBIF22YDIhJsbEkJqFN' . + 'qLtERHs7GnUkwISEQAf0uj30bY39PzbiC6qrDu2cExJ69Nhhhz' . + '59UlIUipCQOnVi4sjG7ubJBy6um0C+he/0iDHQKIQERYyKFLqr' . + 'SI/W6kJCnvOcrWSLSquC1/Jw9Ks3R0FQKHr0uMc9bnCDGjX69A' . + 'H0XlcJkibN5jOe/alCZStHbjJL9lSMLkXExvCXRiDV6GZEeGeX' . + '3TvvBVQoEjfBL/v0rT75Th7VU5C8gktI6NLlMY+5yU3WWGODDf' . + 'r098tHpNFNH7/2lKdXXdz7efLzVaqJIBOCmK8AJUlI6g0aV+9y' . + '9+p7AR3bMQpTBWPy7yeN6fy0jNwewfpvC9Xe+3kFoUuXe9zj5n' . + 'BusEGHjh6GIAGawC2FWuvSvbbF1maFylZAsC1ISZADBiVNSJrP' . + 'eX73MY//skHP85z5+fnSxQsXj//4n39cmnPn7LbZlsajBmEnBL' . + '1nuEGDG9x4aa5Ldz+h0RCuBqwBv1Wo+7vs9r7n++0MmYeAM+zB' . + '+61EK1QUEnbbtN+9Bh3Hsebn54u//PdfLq9eWl2ZnZ1dSnaSwu' . + 'Pin40b9g3doKE0WoNIl65xj3v75njd3BBubQi6ExKmDWkMRKSl' . + 'tSbVKQcMao1Go5Ugb0+x53nOyZMnSysrKydXLq1cWlxa/McgCB' . + 'Yev3hU+GPrD3I5/q94k3pXYQY58q6B5Bs0HB//neaGx00gyWaz' . + 'VCoV7bquCoKAnZ0dfN/f03egLGj0m3XQNE1jdnY2/+WXXy6trq' . + '6uzP3oR5eCIFi4detW5feXL1vr679Let37zVB3/mQytjXJwmSB' . + 'wikHp9ShY0RESqObwPrr5oBERKhUKly4cIFqtUq9XufmzZtsbW' . + '2hXvuDwTTNtxZq8TyvsLy8vLS4uLgahOHphw8elL69fNlc++qr' . + 'uFOrNXPddm1cczVL5f5P+Lv5MuOJgTGxwYbZpZsCdeAq8M1Bcw' . + 'CGYeC6LtVqlRMnTjAyMkKn0yGXyx0N0LZt03Ec1zCMSrfXO37v' . + 'zp3S769csb+/ciXt1mrNdHf3ltZ6Lca8ZpJsduhtCdb2gEFJoQ' . + 'xADYHuHDS3f32lFEEQUK/XGRkZoVAocP78eZaXl9FaI/Jq25Uk' . + 'yWHAYrHozM/PlxYWFibTND32sFbLXrtyxVz76qukXas1M61WTW' . + 'm99gx+20TdN9jqtfjP7QzOwwYNp037Zd0DukDnIByA1pqdnR2+' . + '++472u02Z8+eZWJiAsMwDsEBRNGBzYJpmsaJEyfyX3zxxdLS0t' . + 'KlVqu1dP3q1cLta9ekU6u1dat1J9b6Sk9kraV1rYXegW7apDYw' . + 'kFY6fPc4MNTw88bwfZ/NzU2UUnieRxAEiAiGcXiXfcigiIjruo' . + 'VyubxkWdbK7fX1xWvffFMInjzBM82uMT5+p++6V1UUrSe7u03t' . + '+8lezlKt3gHyl0aSJDQaDa5fv876+vo+w6FzDq1BpZRsb2/bly' . + '9f9vL5/Njdu3fzG0+eMJHNxsfn532vXN5NPG/7abPZal6/Hvfe' . + 'kroPHfsm98f7AHW9Xo+//vrrlmVZm71+37QNw3JnZ9PK4uJGpV' . + 'pt4Dh+vLGhsrmcfv1iHzu01m89HjIdCon2fb8TBMHtvYeRUn50' . + '1Oj4vqp3Ok1f5LYSadfr9dQfDN642P/XeF2DA+SBAuA4jkOhUK' . + 'BQKESO43S11p3BYBDt7u4y+CtB/i/q7jp1GMiw2AAAAABJRU5E' . + 'rkJggg=='; + + //========================================================== + // File: ppl_blue.png + //========================================================== + $this->imgdata_large[3][0] = 2284; + $this->imgdata_large[3][1] = + 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABm' . + 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA' . + 'B3RJTUUH0wMLFRAiTZAL3gAACHlJREFUeJy9mGtv29YZgJ9zKF' . + 'F3y/Q9jh05tuQkarKgbYasde0UBdZgwNou/Vqga/sD9mP2B4a1' . + 'BbZ9atFPxb5sqOtmXbI19bqsluPYiR3HN90vFEWRZx/IJI5zqa' . + 'x0OwBBSgR5Hj7v+55zSEFXTUgIJyA9C6/9RsjMjAyFIxxJCDc7' . + 'iBqKgyZACGg3G2x9+xXf/fG33P3mC9qNKsp1O+1JdkEnQTdgIO' . + 'ttCSMUi8gj072MnugllAyB9G8rBGi6RsToJTF6iuRoFi1kHKZf' . + '7fB8Iggj0/Dy23D2dakNTR3JDsXPvzstxmZGRMER1EwHhQAEgE' . + 'CLhIkPD6InY9S3djGLJVBtQP1Qb4HDAyoJYQOOZkPx49nhTH9i' . + '7MUBGT7egxkJgd70wZS/CUkoZtA/fRoE1DZ2ACiv52ibReCp4e' . + '7CIEHomxDiuVdGTqUnf/ZeOjR8fpiVXZul5ZrY3bWwbdcLr/dA' . + 'AAIpAwQjUWIjQ+g9HZvswiCgBVF9/SI6OSLGzo0i+oLi6+Utbq' . + '+bKEftgwOE/0Ohocf66M+cBjo22U2RQLIHMhmYnvaOpR9S8bSU' . + 'UqCURGpRkuMZMm9cIvPGJZLj0yBjT2LprkiSkykx9cuXIhOnUs' . + 'm+QNC2XdG02ggBTcvFabsPWwTPpBAChSCgh4kYBpoeplWp47Qs' . + '7EYDt21xINzd5GCAxLExRl89Z+nHjpbKMmjbmkgfDzI0JEW53K' . + 'Jaa6NcAOEX8v52uJzsBlAS6u0hcnTIccPRqhWPCUcLD+s1EaUp' . + 'HCEhEMCyHNpt9SjgIU12A6iw6xb123vYhaaKjB9tlgMD5X+uBp' . + 'zdkpg6azA8EaNQtKlVba+Xez4eCntnJrsDdFsW5nYFpxlFN846' . + 'DXe8utkM4mhi+EgQmjYbS2WqexZKk6BpjwJ2YlK5VjeA3pNDiH' . + 'YjRWPzPE7tmBo8EWwGhkXx+z3uXL7D3rU97LIF8RBEAl6lK/Uo' . + '6JNM1rZ2aTcr3eUgIQOGTgbdwXMGyRejenLYTvQGbAdRuetSud' . + 'OivVuFZgtCEgICghICnZoMhmlVTPR49LCAEkQUhk/B7KXe0MWf' . + 'nxj8xVR/cDheK14WZmtVMJSBnlGoN6FmQq0FLfdwJgORKPHRo/' . + 'Snzx4G0F/FjJ4KiOdmjPCrrx8bffnMybMv9MQGNG3rzlVqtR1B' . + 'sh/CYXCD4Aag1oCW7ZnUOjSp6WFi/QNEB8Y7BfTNjZyCmUvJ0I' . + 'XXT47MTp98Ybon9VZCk8cVazfqlNargsY34G7ByAlIjkHd9CCr' . + 'LbBdiHViUgiECuDKYCdz8b2cywREdiYZOj8zNnLuzOTzx6ODp+' . + 'OaGaqwVzBFqz0Idhz2loE7YEwBLaAJLQcKbW8qjAcBF5Jh0AMP' . + 'IOHe6kxgtb3UMO2OxkF//ffK28nQqxfvm3szrtnDVa799Qb/+v' . + 'NtsbNSpm3tAv8B+w7Ub0FhAyoBcMPec9oK6raXk48ziQBXQcmC' . + 'pT3YqHa0mpEBkTR6wz/Jjo2cy04+fzwxdDquNfQKO7sFUbpu0c' . + 'wp3JoAYsA42Bbkl4GCryUNDEM7Avm6Z/CgSYBWG8pNuFuDu1Wo' . + 'tjoxKIJGeHIiM/jmK9NnX5ycuJQMtUcqXPvLDTa+qIie4hAJ1U' . + 'vdrmO2HaDfB931twJgAn1A4lGT96obPHPLBbhVgUoTHHWo9aAA' . + 'JVAKpyKEmQNzWRENAsL18ycKjAFN/9gCNvzLB/390MMmE7pnDi' . + 'Bvwt0K5Jv3O+0oB22nJ1Vvjb/UMhOpcKknqN1OiMB2DNHU2G5s' . + 'sVndpGJVcZXjX1IAlvw9PmhRQcOFPhsSDkiBrQR1G7brgs0a7D' . + 'ag3FK4rguqBXarI4Nt1SJv5gls7TEWtJDRBO2GwnIs8maevFnA' . + 'Gx6awLZvzeTBu4kFbLigijC47pscpx0xyDfkvtUEnlarCDtrUC' . + 't2HGIhvPHVdVwqjTIrxRU2a5uUrYoP0QZ2gMvACl7+3V/LuKDq' . + 'sJuDy597516+CEezIHXv7vcgXQu2l+Bvn8He9Y4AE4kgk5P9DE' . + 'R6aFdq5Et5Nit3yTf3m9sBcsAN3+D98c0Fit5JawE25r1zg1Fo' . + '5B8GFD7g+nVYnu8EUEop9XTa0N/9dUbqcphP/rDJzbUClVbpgR' . + 'y2fXM3fND95qj75J8AC6BWPINfVSBieK+x+6cS5UCzCLu3oFV9' . + 'GqCMx2NGOp2Znpv7aXZudsool3T5J/179sxVlHJ4kGPrP2COBX' . + '/7DmiApWCjxIMXpYNznYuXM+6TAKWUMppOZzLvv//ery5cuDCT' . + 'SqVS336bCwr1JfAPB9r+2KAFwJS+OcETzZHz/7v3etl6ipz77X' . + 'GAMh6PG+l0OjM3NzczOzs3k0pNnFlbW43+e/GKtMqrblSsF03V' . + 'WHcJA0PjIAzvg9JTze2H67g9DjAwOTmZ+uCDD96anZ2dnZiYmF' . + '5dW41++Lvfa1fnr7qllVK9103mXNTnJgPA+YugsvB3HTaEl+Qs' . + 'AZ/yeHPPDCiTyaRx5syZbGoilV1dW00szC9oV+avusuLy0Xd0X' . + 'MgFkDM+zkYBZEHV8f7wwKu84zmngQoNU0LaZoWUa4K31y5qX/8' . + '4cfyyvwVN5/L10NOKNeg8UmDxoKF5Vfj1xXAgD0JrgAcvBDfel' . + 'a4g4AykUgY6XR6emJiIru2ttZXq9S0K19eUcuLy8WQE8o5OAsN' . + 'Ggsmpl+NpoL1g9X4UBU+C9xDgEKIwNTUVOqdd955M9mbnJ3/cj' . + '6Vu5aTheXCQXNdVeMzAwJSCGEA2XKpnF1cXIzlFnOVhJPIKdR+' . + 'c88ctq4AlVKsrKzw0UcfKcC5uXqzXnNqSzb2pwLxOHP/l7Z/BN' . + 'eB01LKt4HTrusKvGr8jB+hGn8MQAkYQMrfw4Nq/MFPtf+rdvDb' . + 'k8QL+/5Z4Uepxm7bfwHuTAVUWpWaqAAAAABJRU5ErkJggg=='; + + //========================================================== + // File: ppl_green.png + //========================================================== + $this->imgdata_large[4][0] = 2854; + $this->imgdata_large[4][1] = + 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABm' . + 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA' . + 'B3RJTUUH0wMLFQ4hANhluwAACrNJREFUeJytmF1zE1eagJ+3u9' . + 'XdkvUty2AbmLEtEzDBgZ0UpDBOalNTUzU3czl7tct/2n+wt3M/' . + 'NVM12SSTQQSyW2TA+QAJQogtYYFtyfrqL3WfvWj5g8AEjzfvhS' . + 'SXjk8//Zz3Pf3qCMcJAWxMKlT4kH+jwu/FknnJSUItKFHzCrKA' . + 'BggBQx5ziz/wn/yBz3hED4/oaJfSjgVoYjJJgTLTZCjohp7IGT' . + 'k5aZ4kb+bRTR30Q7djj8f/kpPMUSCFedRL6W8e8qMQNE6S4xpv' . + 'c5HrTPFubiJ3ZnlyOXV59rJYU5Z00h1c3d0brxAiUkScRijisk' . + '6XLTyiN3s8HuAJpniXa/q8/pt8Or+0kF8oXJm5YiydWcIpOrJu' . + 'rjOQwd54AQwsMpTJYhPSoYuLQ58An/DnBQSdImXO8avsTPbqpc' . + 'lLp67OXDVzMznZLGxSs2qyIRu4at8gKHQEC50kE1icxqCAdxST' . + 'xjEA44tqaJlERl8uLWvvnX5PHuQfcCdxh5qq0aX76vj4WgWyXO' . + 'QiNgBP8IAaddr08X8+wHFmJSQhBbPAZGoSZSt5wQs6qoNC7UEd' . + '4AEoLIQSCaCCy78Dv8Tiv1hjjW1CRj8XIAgEKqDtt9keboMJZa' . + 'vMjuzQVd3Xr9prTJo+GF/jKZea95R25Lxs8jg5qFGiwDnOS0mW' . + 'NE0rjNRIt3WbklUCA9mV3Zdz8OBT/JfCQLB0SKYVVjGFYSfx/E' . + '26ow4e6uDujlPFQpE0FU6P8qNTHdXJdEdda0qf0itWBVM3pa/3' . + 'ccUlIECJet0cAJoeYk5EZCeS5IwEoerSxccJBwRqFFf38QCTaO' . + 'TRVFKJm3NTbtLNSyh2IkhIXsvLCesEGNCWdmwyruSD/z9kUlRc' . + '3bqNlSxhJNJ43p5JITrOEis8Qtr0cXEpU/JT/pmO18n2vb42pU' . + '3JnDnHMBqyPlpnoAaxhr2llv1ZUBqEGlqYwDQMsskMOcMgVL3Y' . + 'ZOQTHAcQQiIGjHCwCaiovjrv4hbcpKuJJjIcDHm685RGr4GLCx' . + 'YHkAcrLoAoDSLBiAQrMkjqybHJCbxgh+7xAC1MpsgzwRwD3qHL' . + 'WyTIBdlAa6u2rHfXaew06PV78ZZjAwleNnkolECoH5i090wOcY' . + '+TgwYzFHiPi1zkOkXexeAMASnVU+LiyiA1wFUuaqggACLizeWw' . + 'ycMzyssmVYKkbpGyC5T+OUALk2mKLHKWf+ED/az+YW42d66YL+' . + 'aNrmEEzQCFEnKw368EgEvcN1m80eTIQIt0TFOjMJHkzNEBBYPp' . + 'sblf8QHzrORO5JaWZ5ZLl6cuJyyxpNPv4PZdoT+GyIxBfI5uUg' . + 'eJMCwP2/bIHO1JEudcgUUWOceKNq99mCvnzs5PzRcuTV4y5mRO' . + 'SMIjo47z5S7a94oQCNKgJsZwO7D/IDNg3/LLhRNXt4JohBb4aG' . + '82GLdXcf93mQ+Y43r2RHZp+cRy6cqJK4l8MS+tdItaqiYtc0Mm' . + 'QpfJARh98HYh9IiXVcaAo58wGb+LBAjbSPgCOcoSa0wzxXtc08' . + '/pv8mfyL+9MLVQvDJ1JVHJV6SZbFI1qtTsB+KlehRtRTGE8Afo' . + 'P4DRcAxiEudhAHjjzz+ubgX4oHowakHQOlqzICQwyVPITGVOXi' . + 'xfLF6aumzmczl5lHzMff2+fCdPaGttEkXoLQAO9B7C6EugPYby' . + 'gVPjGXc5eIbNAJPjGwiAbaAJUQv8wVG7GROkJFpyOqn/ovgLba' . + '44L0+sDaraXb6jzq7aBQWjBOyUoHcaopOgmaA3IRyNDZnA1HjO' . + 'HSBkr7eEFDAEngHrQCf+/s2A8cSiSkqcKUeeTjwFy2Jd78t3+L' . + 'TR4itIiBLwLQhzkJyB5Cx4HXDaENVQCBAQcRqFIHTRaBIvuYXg' . + 'AdsouuNxEL0ZUBHnSQp66R73zYfUtQ6OytKT8RckQAJQoLtgO5' . + 'BJgj0D/WfgdyHaAHx8THoUcbGx8ciwhUl3bDEiToURPooeI7pH' . + 'MziK9Yd9nU5a6GgKjOH41vsgI4hAcyC5AZkapF+AoYNrjjsuhx' . + 'FbtPmeB5ykyQQzTPAWAQWC8S9oAI0QRRuPb9jkmyMZNAOTklvC' . + 'GGYZaFkGmkVAh8h4DtKFMIBunG+pB5B5AIkGBDsQ+qBiL20caj' . + 'zhJknq5KlgMkLjJHJos4kYEbFJi5vc5eYbATVN02bNWe19+32t' . + 'aJWlFm3wbf8Rz5NbDFJdlOFBF/g7cBf0JkrbBb+F6j1DOduEkU' . + '8bWCOiSofPWadBnSZDWmgUkEMGhZCINut8S/0NBtPptFlZrBSu' . + 'vnt1+ndnflfIp9OJ/279Ubbbd+lP7KBKPoEBsgnqLph/BRzwdS' . + 'LnBUFvHcfdpRsGPAGqwMco6jynz+e0SPKYCHMfLX5VKHwcenR+' . + 'Igd1XTcqlUr+xn/cePv91fevzy8sLO2OtrOpWkqL7gXKSAVRdh' . + 'ZFEmEXoYkwBNqovoc/3GHH3aUR+jwC1oD/AWrANi4hGwyBzqEG' . + 'Vvb77Dgi0eT1VZzJZMxKpVJYXV1dXF1dXVm6sPSvruue3Xzcyj' . + '6/syvDzwj0lNazK6Fj5LFCRZouZpBABj6jXouu3+Np6HNvDHaf' . + 'g91t74msbMuOJicnSSaTKKUQEUQEpRSO69But1/dB0VEm5uby9' . + 'y4cWNpdXX1+sLCworrume//PuXpeqnVeOban0U1PW2kcx+O9L7' . + 'Te9sUB4lWFR9SqNtNGcHx+/RDD2+Am4D94CnQA8OjjlEhMnyJC' . + 'srK8zOzu7BiYioMAzZ2Njg9u3brwIqpSSXy2WXl5eXLly4sOo4' . + 'zoV6vV6oflrVP/7Tx8Hmw1Zb6ydqmpWp7ha8h4O3gjOhzVANmF' . + 'XPMNQWvdDnCXCXuHR+APqH4fbCtm2mp6eZn59H13WJuYXRaKSU' . + 'UiSTyVcBdV3XDcOwRaTU7/en19bWCn/79G+JL/76RbhZ22y7u+' . + '6ahl71nPDz/nO17m7wAxlabFOihy4+DvAcqAMbPzZ3OFzX5dmz' . + 'Z2iahoiosUUVhiGNRgPHcV4GzGQy5uLiYuH8+fMzo9FoslarJW' . + '9+elP75E+fBJu1zY7qqpqBUW3T/niohnVvy+1zm5aVtp+WE2XT' . + 'nrHFzbjh1tYLz3XdPjD4R3BKKba2tqhWq4dzUO3noBPn4H5PKy' . + 'LaO++8U7hx48byhQsXVne7u6tf3/v64t3P7mbq9+odt+OuaWi3' . + 'PLxbW2ytubjbQCgiMnt6VlaurWgz0zM0m02q1WrUaDSUUuqI56' . + 'ivDxE5MCgiYllWtlwuL5mmufLV/a/O/uXPf9Ff1F+80Lv6Yx29' . + '2qHzyZBh3cdvc7gaTZuZkzPh/Py8ACqVSv1/uPZDKXUAGEWRtF' . + 'qtxEcffZTL5XLF+2v39fqjeivshA/TpP83JLwzYFBzcA4370Cc' . + 'S81nTRBUs9lkOByi1GuOPI4Rh3+26JZlnSkWi781DOPXvV4v3+' . + '/2G0R8kSBxB/jew+tERK+c49m2TblcxrZtXNfl+fPneJ6HZVmU' . + 'y2VJJpNyaJ9TSinlOA5bW1u4rntkQA0oAG8D54gb9W3ianxM3A' . + 'e/cn73U3Hq1Cm5du2aPjs7a+ztcSIShmE4ajQa6tatWzQajZ+0' . + 'fbiKI+It4SvijVUj7kL2qvGfgkskEqTTaZmcnDROnTplJhIJTU' . + 'QiwPd9P/Q8T6XTaQzDIAiCfzjP/wFVfszuFqdHXgAAAABJRU5E' . + 'rkJggg=='; + + //========================================================== + // File: pp_red.png + //========================================================== + $this->imgdata_small[0][0] = 384; + $this->imgdata_small[0][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABm' . + 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAAA' . + 'B3RJTUUH0wMJFhouFobZrQAAAQ1JREFUeJyV1dFtwyAQBuD/og' . + 'xQdYxa8gRY6hJ0jK6QdohMkTEuE5wUj5ERen05IoLvID7Jkn2G' . + 'j8MgTMyMXqRlUQBYq9ydmaL2h1cwqD7l30t+L1iwlbYFRegY7I' . + 'SHjkEifGg4ww3aBa/l4+9AhxWWr/dLhEunXUGHq6yGniw3QkOw' . + '3jJ7UBd82n/VVAlAtvsfp98lAj2sAJOhU4AeQ7DC1ubVBODWDJ' . + 'TtCsEWa6u5M1NeFs1NzgdtuhHGtj+9Q2IDppQUAL6Cyrlz0gDN' . + 'ohSMiJCt861672EiAhEhESG3woJ9V9OKTkwRKbdqz4cHmFLSFg' . + 's69+LvAZKdeZ/n89uLnd2g0S+gjd5g8zzjH5Y/eLLi+NPEAAAA' . + 'AElFTkSuQmCC'; + + //========================================================== + // File: pp_orange.png + //========================================================== + $this->imgdata_small[1][0] = 403; + $this->imgdata_small[1][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABm' . + 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAAA' . + 'B3RJTUUH0wMJFhwAnApz5AAAASBJREFUeJyN1dFthDAMBuDf7S' . + '3BCm2VCRKpS4QxbhikW6IewzcBqm6Fm6JyH7iEEByCn5AJH38g' . + 'BBIRHNUzBAWAGNfe/SrUGv92CtNt309BrfFdMGPjvt9CD8Fyml' . + 'ZZaDchRgA/59FDMD18pvNoNyHxMnUmgLmPHoJ+CqqfMaNAH22C' . + 'fgqKRwR+GRpxGjXBEiuXDBWQhTK3plxijyWWvtKVS5KNG1xM8I' . + 'OBr7geV1WupDqpmTAPKjCqLhxk/z0PImQmjKrAuI6vMXlhFroD' . + 'vfdqITXWqg2YMSJEAFcReoag6UXU2DzPG8w5t09YYsAyLWvHrL' . + 'HUy6D3XmvMAAhAay8kAJpBosX4vt0G4+4Jam6s6Rz1fgFG0ncA' . + 'f3XfOQcA+Acv5IUSdQw9hgAAAABJRU5ErkJggg=='; + + //========================================================== + // File: pp_pink.png + //========================================================== + $this->imgdata_small[2][0] = 419; + $this->imgdata_small[2][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABm' . + 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAAA' . + 'B3RJTUUH0wMJFhsQzvz1RwAAATBJREFUeJyd1MFthDAQheF/oi' . + 'gF+JYWQKICkCJRA1vGtrDbxFbhGvY0HVjCLeS2BeTiHFgTB2wg' . + 'eRISstCnmcG2qCpbuXf3ADBQzWsPfZfS9y9HsEu4/Fo33Wf4Fx' . + 'gxL3a1XkI3wbTNXHLoboVeLFUYDqObYBy+Fw/Uh9DdCmtOwIjF' . + 'YvG76CZoOhNGRmpO8zz30CJoOhMAqlDxFzQLppgXj2XaNlP7FF' . + 'GLL7ccMYCBgZERgCvXLBrfi2DEclmiKZwFY4tp6sW26bVfnede' . + 'e5Hc5dC2bUgrXGKqWrwcXnNYDjmCrcCIiQgDcFYV05kQ8SXmnB' . + 'NgPiVN06wrTDGAhz5EWY/FOccTk+cTnHM/YNu2YYllgFxCWuUM' . + 'ikzGx+2Gc+4N+CoJW8n+5a2UKm2aBoBvGA6L7wfl8aoAAAAASU' . + 'VORK5CYII='; + + //========================================================== + // File: pp_blue.png + //========================================================== + $this->imgdata_small[3][0] = 883; + $this->imgdata_small[3][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAACi1' . + 'BMVEX///8AAAAAADMAAGYAAJkAAMwAAP8zAAAzADMzAGYzAJkz' . + 'AMwzAP9mAABmADNmAGZmAJlmAMxmAP+ZAACZADOZAGaZAJmZAM' . + 'yZAP/MAADMADPMAGbMAJnMAMzMAP//AAD/ADP/AGb/AJn/AMz/' . + 'AP8AMwAAMzMAM2YAM5kAM8wAM/8zMwAzMzMzM2YzM5kzM8wzM/' . + '9mMwBmMzNmM2ZmM5lmM8xmM/+ZMwCZMzOZM2aZM5mZM8yZM//M' . + 'MwDMMzPMM2bMM5nMM8zMM///MwD/MzP/M2b/M5n/M8z/M/8AZg' . + 'AAZjMAZmYAZpkAZswAZv8zZgAzZjMzZmYzZpkzZswzZv9mZgBm' . + 'ZjNmZmZmZplmZsxmZv+ZZgCZZjOZZmaZZpmZZsyZZv/MZgDMZj' . + 'PMZmbMZpnMZszMZv//ZgD/ZjP/Zmb/Zpn/Zsz/Zv8AmQAAmTMA' . + 'mWYAmZkAmcwAmf8zmQAzmTMzmWYzmZkzmcwzmf9mmQBmmTNmmW' . + 'ZmmZlmmcxmmf+ZmQCZmTOZmWaZmZmZmcyZmf/MmQDMmTPMmWbM' . + 'mZnMmczMmf//mQD/mTP/mWb/mZn/mcz/mf8AzAAAzDMAzGYAzJ' . + 'kAzMwAzP8zzAAzzDMzzGYzzJkzzMwzzP9mzABmzDNmzGZmzJlm' . + 'zMxmzP+ZzACZzDOZzGaZzJmZzMyZzP/MzADMzDPMzGbMzJnMzM' . + 'zMzP//zAD/zDP/zGb/zJn/zMz/zP8A/wAA/zMA/2YA/5kA/8wA' . + '//8z/wAz/zMz/2Yz/5kz/8wz//9m/wBm/zNm/2Zm/5lm/8xm//' . + '+Z/wCZ/zOZ/2aZ/5mZ/8yZ///M/wDM/zPM/2bM/5nM/8zM////' . + '/wD//zP//2b//5n//8z///9jJVUgAAAAAXRSTlMAQObYZgAAAA' . + 'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN' . + 'RQfTAwkWGTNerea3AAAAYUlEQVR4nHXNwQ3AIAxDUUfyoROxRZ' . + 'icARin0EBTIP3Hp1gBRqSqYo0seqjZpnngojlWBir5+b8o06lM' . + 'ha5uFKEpDZulV8l52axhVzqaCdxQp32qVSSwC1wN3fYiw7b76w' . + 'bN4SMue4/KbwAAAABJRU5ErkJggg=='; + + //========================================================== + // File: pp_green.png + //========================================================== + $this->imgdata_small[4][0] = 447; + $this->imgdata_small[4][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABm' . + 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAAA' . + 'B3RJTUUH0wMJFhkLdq9eKQAAAUxJREFUeJyN1LFVwzAQxvH/8f' . + 'IeDS0FLKABlN6eIwPYAzCHB0gWYI2jj+i1ABUTQN4TRSQ7iiWZ' . + 'qxLn9Mt9ydmiqrSq930AYFiu6YdKrf/hP1gYQn6960PxwBaYMG' . + 'E9UA3dBFtVQjdBOQmBakLennK0CapRwbZRZ3N0O/IeEsqp3HKL' . + 'Smtt5pUZgTPg4gdDud+6xoS97wM2rsxxmRSoTgoVcMZsXJkBho' . + 'SmKqCuOuEtls6nmGMFPTUmxBKx/MeyNfQGLoOOiC2ddsxb1Kzv' . + 'ZzUqu5IXbGDvBJf+hDisi77qFSuhq7Xpuu66TyJLRGbsXVUPxV' . + 'SxsgkzDMt0mKT3/RcjL8C5hHnvJToXY0xYRZ4xnVKsV/S+a8YA' . + 'AvCb3s9g13UhYj+TTo93B3fApRV1FVlEAD6H42DjN9/WvzDYuJ' . + 'dL5b1/ji+/IX8EGWP4AwRii8PdFHTqAAAAAElFTkSuQmCC'; + } +} diff --git a/vendor/amenadiel/jpgraph/src/image/ImgData_Squares.php b/vendor/amenadiel/jpgraph/src/image/ImgData_Squares.php new file mode 100644 index 0000000000..0b1046a595 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/image/ImgData_Squares.php @@ -0,0 +1,151 @@ + 'imgdata'); + + protected $colors = array('bluegreen', 'blue', 'green', + 'lightblue', 'orange', 'purple', 'red', 'yellow'); + protected $index = array('bluegreen' => 2, 'blue' => 5, 'green' => 6, + 'lightblue' => 0, 'orange' => 7, 'purple' => 4, 'red' => 3, 'yellow' => 1); + protected $maxidx = 7; + protected $imgdata; + + public function ImgData_Squares() + { + //========================================================== + //sq_lblue.png + //========================================================== + $this->imgdata[0][0] = 362; + $this->imgdata[0][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAIAAADZrBkAAAAABm' . + 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA' . + 'B3RJTUUH0wMLFgojiPx/ygAAAPdJREFUeNpj/P377+kzHx89/c' . + 'VAHNBQ5VBX52HavPWWjg6nnDQbkXoUFTnnL7zD9PPXrz17HxCj' . + 'E6Jn6fL7H7/+ZWJgYCBGJ7IeBgYGJogofp1oehDa8OjE1IOiDa' . + 'tOrHoYGBhY0NwD0enirMDAwMDFxYRVD7ptyDrNTAU0NXix6sGu' . + 'jYGBgZOT9e/f/0xMjFyczFgVsGAKCfBza2kKzpl3hIuT1c9Xb/' . + 'PW58/foKchJqx6tmy98vbjj8cvPm/afMnXW1JShA2fNmQ9EBFc' . + 'Opnw6MGjkwm/Hlw6mQjqwaqTiRg9mDoZv//4M2/+UYJ64EBWgj' . + 'cm2hwA8l24oNDl+DMAAAAASUVORK5CYII='; + + //========================================================== + //sq_yellow.png + //========================================================== + $this->imgdata[1][0] = 338; + $this->imgdata[1][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAWl' . + 'BMVEX////+/+H+/9/9/9v8/8P8/8H8/7v8/7n6/4P5/335/3n5' . + '/3X4/1f4/1P3/031/w30/wn0/wPt+ADp9ADm8ADk7gDc5gDa5A' . + 'DL1ADFzgCwuACqsgClrABzeAC9M0MzAAAAAWJLR0QAiAUdSAAA' . + 'AAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9MDCxYEDlOgDj' . + 'EAAAB+SURBVHjaVcpbCsQgDEDRGERGKopjDa2a/W9zfLWj9/Nw' . + 'Ac21ZRBOtZlRN9ApzSYFaDUj79KIorRDbJNO9bN/GUSh2ZRJFJ' . + 'S18iorURBiyksO8buT0zkfYaUqzI91ckfhWhoGXTLzsDjI68Sz' . + 'pGMjrzPzauA/iXk1AtykmvgBC8UcWUdc9HkAAAAASUVORK5CYI' . + 'I='; + + //========================================================== + //sq_blgr.png + //========================================================== + $this->imgdata[2][0] = 347; + $this->imgdata[2][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAZl' . + 'BMVEX////0+vv0+vrz+fry+frv+Png7e/d7e/a6+zY6+250tSz' . + '0tSyztCtztGM0NWIz9SDzdNfsLVcrrRZrbJOp61MpqtIr7dHn6' . + 'RErrZArLQ6q7M2g4kygYcsp68npa4ctr8QZ20JnqepKsl4AAAA' . + 'AWJLR0QAiAUdSAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU' . + '1FB9MDCxYEByp8tpUAAAB7SURBVHjaVcjRFoIgDADQWZpWJpjY' . + 'MsnG//9kzIFn3McLzfArDA3MndFjrhvgfDHFBEB9pt0CVzwrY3' . + 'n2yicjhY4vTSp0nbXtN+hCV53SHDWe61dZY+/9463r2XuifHAM' . + '0SoH+6xEcovUlCfefeFSIwfTTQ3fB+pi4lV/bTIgvmaA7a0AAA' . + 'AASUVORK5CYII='; + + //========================================================== + //sq_red.png + //========================================================== + $this->imgdata[3][0] = 324; + $this->imgdata[3][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAXV' . + 'BMVEX////++Pn99/j99ff99fb98/X98/T98PL55uj43+P24+bw' . + 'kKPvjaHviJ3teJHpxMnoL2Pjs73WW3rWNljVWXnUVnbUK1DTJk' . + '3SUHPOBz/KQmmxPVmuOFasNFOeIkWVka/fAAAAAWJLR0QAiAUd' . + 'SAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9MDCxYEHd' . + 'ceT+8AAABtSURBVHjaVchbAkMwEAXQq6i3VrQiQfa/zDYTw8z5' . + 'PCjGt9JVWFt1XWPh1fWNdfDy+tq6WPfRUPENNKnSnXNWPB4uv2' . + 'b54nSZ8jHrMtOxvWZZZtpD4KP6xLkO9/AhzhaCOMhJh68cOjzV' . + '/K/4Ac2cG+nBcaRuAAAAAElFTkSuQmCC'; + + //========================================================== + //sq_pink.png + //========================================================== + $this->imgdata[4][0] = 445; + $this->imgdata[4][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAApV' . + 'BMVEX////6+Pz69/v49Pr38/r17/jr4+/l3Onj2efh1ua/L+i+' . + 'q8m+Lue9Lua8qsS8LuW8LeS7pca5LOG4LN+2Y9O2YNW1ZdO1Kt' . + 'y0atC0aNGzb82zbc6zKtuzKdqycsuwa8qtJtOISZ2GRpuFN6GE' . + 'NqCDQpmCMZ+BPpd/LJ1/K519S5B9Jpx9Jpt9JZt6RY11BJZ1BJ' . + 'V0BJV0BJRzBJNvNoRtIoJUEmdZ/XbrAAAAAWJLR0QAiAUdSAAA' . + 'AAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9MDCxYDF3iKMD' . + 'YAAACeSURBVHjaVczbEoIgGARgCiMtrexoWpaa2FHUgvd/tH4Y' . + 'BnEvv9ldhNPradPnnGBUTtPDzMRPSIF46SaBoR25dYjz3I20Lb' . + 'ek6BgQz73Il7KKpSgCO0pTHU0886J1sCe0ZYbALjGhjFnEM2es' . + 'VhZVI4d+B1QtfnV47ywCEaKeP/p7JdLejSYt0j6NIiOq1wJZIs' . + 'QTDA0ELHwhPBCwyR/Cni9cOmzJtwAAAABJRU5ErkJggg=='; + + //========================================================== + //sq_blue.png + //========================================================== + $this->imgdata[5][0] = 283; + $this->imgdata[5][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAQl' . + 'BMVEX////4+fz39/z19vvy8vru7/ni4+7g4fHW1ue8vteXmt6B' . + 'hdhiZ7FQVaZETcxCSJo1Oq4zNoMjKakhJHcKFaMEC2jRVYdWAA' . + 'AAAWJLR0QAiAUdSAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0' . + 'SU1FB9MDCxYDN0PkEP4AAABfSURBVHjaVchHAoAgDATAVcCCIF' . + 'j4/1elJEjmOFDHKVgDv4iz640gLs+LMF6ZUv/VqcXXplU7Gqpy' . + 'PFzBT5qml9NzlOX259riWHlS4kOffviHD8PQYZx2EFMPRkw+9Q' . + 'FSnRPeWEDzKAAAAABJRU5ErkJggg=='; + + //========================================================== + //sq_green.png + //========================================================== + $this->imgdata[6][0] = 325; + $this->imgdata[6][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAXV' . + 'BMVEX////2+vX1+vX1+fT0+fPz+PPx9/Dv9u7u9e3h7uHe697a' . + '6dnO2s3I1sa10LOvza2ay5aEwYBWlE9TqE5Tkk1RkEpMrUJMg0' . + 'hKiUNGpEFBojw8oTcsbScaYBMWlwmMT0NtAAAAAWJLR0QAiAUd' . + 'SAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9MDCxYEFd' . + 'nFx90AAABuSURBVHjaVc9HAoAgDADB2HuJWLDx/2cKBITscW4L' . + '5byzMIWtZobNDZIZtrcCGZsRQ8GwvRSRNxIiMuysODKG3alikl' . + 'ueOPlpKTLBaRmOZxQxaXlfb5ZWI9om4WntrXiDSJzp7SBkwMQa' . + 'FEy0VR/NAB2kNuj7rgAAAABJRU5ErkJggg=='; + + //========================================================== + //sq_orange.png + //========================================================== + $this->imgdata[7][0] = 321; + $this->imgdata[7][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAUV' . + 'BMVEX/////8+n/8uf/8OP/59H/5Mv/zqH/zJ3/ypv/yJf/vYH/' . + 'u33/uXn/n0n/nUX/m0H/lzn/ljf/lDP/kS3/kCv/iR//hxv/fg' . + 'n/fAX/eQDYZgDW6ia5AAAAAWJLR0QAiAUdSAAAAAlwSFlzAAAL' . + 'EgAACxIB0t1+/AAAAAd0SU1FB9MDCxYEJIgbx+cAAAB2SURBVH' . + 'jaVczRCoQwDETRbLAWLZSGUA35/w/dVI0283i4DODew3YESmWW' . + 'kg5gWkoQAe6TleUQI/66Sy7i56+kLk7cht2N0+hcnJgQu0SqiC' . + '1SzSIbzWSi6gavqJ63wSduRi2f+kwyD5rEukwCdZ1kGAMGMfv9' . + 'AbWuGMOr5COSAAAAAElFTkSuQmCC'; + } +} diff --git a/vendor/amenadiel/jpgraph/src/image/ImgData_Stars.php b/vendor/amenadiel/jpgraph/src/image/ImgData_Stars.php new file mode 100644 index 0000000000..95a26ba7d1 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/image/ImgData_Stars.php @@ -0,0 +1,145 @@ + 'imgdata'); + + protected $colors = array('bluegreen', 'lightblue', 'purple', 'blue', 'green', 'pink', 'red', 'yellow'); + protected $index = array('bluegreen' => 3, 'lightblue' => 4, 'purple' => 1, + 'blue' => 5, 'green' => 0, 'pink' => 7, 'red' => 2, 'yellow' => 6); + protected $maxidx = 7; + protected $imgdata; + + public function __construct() + { + //========================================================== + // File: bstar_green_001.png + //========================================================== + $this->imgdata[0][0] = 329; + $this->imgdata[0][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAAUV' . + 'BMVEX///////+/v7+83rqcyY2Q/4R7/15y/1tp/05p/0lg/zdX' . + '/zdX/zVV/zdO/zFJ9TFJvDFD4yg+8Bw+3iU68hwurhYotxYosx' . + 'YokBoTfwANgQFUp7DWAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgF' . + 'HUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJj' . + 'CRyxgTAAAAcUlEQVR4nH3MSw6AIAwEUBL/IKBWwXL/g0pLojUS' . + 'ZzGLl8ko9Zumhr5iy66/GH0dp49llNPB5sTotDY5PVuLG6tnM9' . + 'CVKSIe1joSgPsAKSuANNaENFQvTAGzmheSkUpMBWeJZwqBT8wo' . + 'hmysD4bnnPsC/x8ItUdGPfAAAAAASUVORK5CYII='; + //========================================================== + // File: bstar_blred.png + //========================================================== + $this->imgdata[1][0] = 325; + $this->imgdata[1][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl' . + 'BMVEX///+/v79uRJ6jWPOSUtKrb+ejWO+gWPaGTruJTr6rZvF2' . + 'RqC2ocqdVuCeV+egV/GsnLuIXL66rMSpcOyATbipY/OdWOp+VK' . + 'aTU9WhV+yJKBoLAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA' . + 'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJwynv1' . + 'XVAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4' . + 'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY' . + 'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6' . + 'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg=='; + + //========================================================== + // File: bstar_red_001.png + //========================================================== + $this->imgdata[2][0] = 325; + $this->imgdata[2][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl' . + 'BMVEX///+/v7+eRFHzWG3SUmHnb37vWGr2WHG7Tlm+TljxZneg' . + 'Rk3KoaXgVmXnV2nxV227nJ++XGzErK3scIS4TVzzY3fqWG2mVF' . + 'zVU2PsV2rJFw9VAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA' . + 'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJzCI0C' . + 'lSAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4' . + 'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY' . + 'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6' . + 'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg=='; + + //========================================================== + // File: bstar_blgr_001.png + //========================================================== + $this->imgdata[3][0] = 325; + $this->imgdata[3][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl' . + 'BMVEX///+/v79Ehp5Yx/NSq9Jvw+dYwu9YzfZOmbtOmb5myPFG' . + 'gqChvcpWteBXvedXxvGcsbtcpb6su8RwzOxNmrhjyvNYwupUjK' . + 'ZTr9VXwOyJhmWNAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA' . + 'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJTC65k' . + 'vQAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4' . + 'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY' . + 'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6' . + 'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg=='; + + //========================================================== + // File: bstar_blgr_002.png + //========================================================== + $this->imgdata[4][0] = 325; + $this->imgdata[4][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl' . + 'BMVEX///+/v79EnpxY8/FS0dJv5+dY7+9Y9vBOubtOur5m8fFG' . + 'nKChycpW3uBX5+ZX8e2curtcvrqswsRw7OdNuLZj8/BY6udUpK' . + 'ZT1dRX7OtNkrW5AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA' . + 'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJgXHeN' . + 'wwAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4' . + 'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY' . + 'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6' . + 'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg=='; + + //========================================================== + // File: bstar_blue_001.png + //========================================================== + $this->imgdata[5][0] = 325; + $this->imgdata[5][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl' . + 'BMVEX///+/v79EY55Yi/NSetJvledYiO9YkPZOb7tObr5mkvFG' . + 'X6ChrcpWgOBXhedXi/Gcpbtcf76sssRwnOxNcbhjk/NYiepUbK' . + 'ZTfdVXh+ynNEzzAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA' . + 'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJhStyP' . + 'zCAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4' . + 'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY' . + 'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6' . + 'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg=='; + + //========================================================== + // File: bstar_oy_007.png + //========================================================== + $this->imgdata[6][0] = 325; + $this->imgdata[6][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl' . + 'BMVEX///+/v7+ejUTz11jSvVLn02/v1lj21li7q06+r07x2mag' . + 'lUbKxKHgy1bnz1fx1Ve7t5y+qlzEwqzs03C4pE3z2WPqz1imml' . + 'TVv1Ps01dGRjeyAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA' . + 'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJjsGGc' . + 'GbAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4' . + 'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY' . + 'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6' . + 'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg=='; + + //========================================================== + // File: bstar_lred.png + //========================================================== + $this->imgdata[7][0] = 325; + $this->imgdata[7][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl' . + 'BMVEX///+/v7+eRJPzWN3SUr7nb9TvWNj2WOS7Tqi+TqnxZtyg' . + 'Ro/KocPgVsjnV9LxV927nLa+XLTErL7scN24TarzY9/qWNemVJ' . + 'jVU8LsV9VCwcc9AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA' . + 'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJxi9ZY' . + 'GoAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4' . + 'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY' . + 'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6' . + 'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg=='; + } +} diff --git a/vendor/amenadiel/jpgraph/src/image/ImgStreamCache.php b/vendor/amenadiel/jpgraph/src/image/ImgStreamCache.php new file mode 100644 index 0000000000..eff2319966 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/image/ImgStreamCache.php @@ -0,0 +1,216 @@ +cache_dir = $aCacheDir; + } + + //--------------- + // PUBLIC METHODS + + // Specify a timeout (in minutes) for the file. If the file is older then the + // timeout value it will be overwritten with a newer version. + // If timeout is set to 0 this is the same as infinite large timeout and if + // timeout is set to -1 this is the same as infinite small timeout + public function SetTimeout($aTimeout) + { + $this->timeout = $aTimeout; + } + + // Output image to browser and also write it to the cache + public function PutAndStream($aImage, $aCacheFileName, $aInline, $aStrokeFileName) + { + + // Check if we should always stroke the image to a file + if (_FORCE_IMGTOFILE) { + $aStrokeFileName = _FORCE_IMGDIR . GenImgName(); + } + + if ($aStrokeFileName != '') { + + if ($aStrokeFileName == 'auto') { + $aStrokeFileName = GenImgName(); + } + + if (file_exists($aStrokeFileName)) { + + // Wait for lock (to make sure no readers are trying to access the image) + $fd = fopen($aStrokeFileName, 'w'); + $lock = flock($fd, LOCK_EX); + + // Since the image write routines only accepts a filename which must not + // exist we need to delete the old file first + if (!@unlink($aStrokeFileName)) { + $lock = flock($fd, LOCK_UN); + Util\JpGraphError::RaiseL(25111, $aStrokeFileName); + //(" Can't delete cached image $aStrokeFileName. Permission problem?"); + } + $aImage->Stream($aStrokeFileName); + $lock = flock($fd, LOCK_UN); + fclose($fd); + + } else { + $aImage->Stream($aStrokeFileName); + } + + return; + } + + if ($aCacheFileName != '' && USE_CACHE) { + + $aCacheFileName = $this->cache_dir . $aCacheFileName; + if (file_exists($aCacheFileName)) { + if (!$aInline) { + // If we are generating image off-line (just writing to the cache) + // and the file exists and is still valid (no timeout) + // then do nothing, just return. + $diff = time() - filemtime($aCacheFileName); + if ($diff < 0) { + Util\JpGraphError::RaiseL(25112, $aCacheFileName); + //(" Cached imagefile ($aCacheFileName) has file date in the future!!"); + } + if ($this->timeout > 0 && ($diff <= $this->timeout * 60)) { + return; + } + + } + + // Wait for lock (to make sure no readers are trying to access the image) + $fd = fopen($aCacheFileName, 'w'); + $lock = flock($fd, LOCK_EX); + + if (!@unlink($aCacheFileName)) { + $lock = flock($fd, LOCK_UN); + Util\JpGraphError::RaiseL(25113, $aStrokeFileName); + //(" Can't delete cached image $aStrokeFileName. Permission problem?"); + } + $aImage->Stream($aCacheFileName); + $lock = flock($fd, LOCK_UN); + fclose($fd); + + } else { + $this->MakeDirs(dirname($aCacheFileName)); + if (!is_writeable(dirname($aCacheFileName))) { + Util\JpGraphError::RaiseL(25114, $aCacheFileName); + //('PHP has not enough permissions to write to the cache file '.$aCacheFileName.'. Please make sure that the user running PHP has write permission for this file if you wan to use the cache system with JpGraph.'); + } + $aImage->Stream($aCacheFileName); + } + + $res = true; + // Set group to specified + if (CACHE_FILE_GROUP != '') { + $res = @chgrp($aCacheFileName, CACHE_FILE_GROUP); + } + if (CACHE_FILE_MOD != '') { + $res = @chmod($aCacheFileName, CACHE_FILE_MOD); + } + if (!$res) { + Util\JpGraphError::RaiseL(25115, $aStrokeFileName); + //(" Can't set permission for cached image $aStrokeFileName. Permission problem?"); + } + + $aImage->Destroy(); + if ($aInline) { + if ($fh = @fopen($aCacheFileName, "rb")) { + $aImage->Headers(); + fpassthru($fh); + return; + } else { + Util\JpGraphError::RaiseL(25116, $aFile); //(" Cant open file from cache [$aFile]"); + } + } + } elseif ($aInline) { + $aImage->Headers(); + $aImage->Stream(); + return; + } + } + + public function IsValid($aCacheFileName) + { + $aCacheFileName = $this->cache_dir . $aCacheFileName; + if (USE_CACHE && file_exists($aCacheFileName)) { + $diff = time() - filemtime($aCacheFileName); + if ($this->timeout > 0 && ($diff > $this->timeout * 60)) { + return false; + } else { + return true; + } + } else { + return false; + } + } + + public function StreamImgFile($aImage, $aCacheFileName) + { + $aCacheFileName = $this->cache_dir . $aCacheFileName; + if ($fh = @fopen($aCacheFileName, 'rb')) { + $lock = flock($fh, LOCK_SH); + $aImage->Headers(); + fpassthru($fh); + $lock = flock($fh, LOCK_UN); + fclose($fh); + return true; + } else { + Util\JpGraphError::RaiseL(25117, $aCacheFileName); //(" Can't open cached image \"$aCacheFileName\" for reading."); + } + } + + // Check if a given image is in cache and in that case + // pass it directly on to web browser. Return false if the + // image file doesn't exist or exists but is to old + public function GetAndStream($aImage, $aCacheFileName) + { + if ($this->Isvalid($aCacheFileName)) { + $this->StreamImgFile($aImage, $aCacheFileName); + } else { + return false; + } + } + + //--------------- + // PRIVATE METHODS + // Create all necessary directories in a path + public function MakeDirs($aFile) + { + $dirs = array(); + // In order to better work when open_basedir is enabled + // we do not create directories in the root path + while ($aFile != '/' && !(file_exists($aFile))) { + $dirs[] = $aFile . '/'; + $aFile = dirname($aFile); + } + for ($i = sizeof($dirs) - 1; $i >= 0; $i--) { + if (!@mkdir($dirs[$i], 0777)) { + Util\JpGraphError::RaiseL(25118, $aFile); //(" Can't create directory $aFile. Make sure PHP has write permission to this directory."); + } + // We also specify mode here after we have changed group. + // This is necessary if Apache user doesn't belong the + // default group and hence can't specify group permission + // in the previous mkdir() call + if (CACHE_FILE_GROUP != "") { + $res = true; + $res = @chgrp($dirs[$i], CACHE_FILE_GROUP); + $res = @chmod($dirs[$i], 0777); + if (!$res) { + Util\JpGraphError::RaiseL(25119, $aFile); //(" Can't set permissions for $aFile. Permission problems?"); + } + } + } + return true; + } +} // CLASS Cache diff --git a/vendor/amenadiel/jpgraph/src/image/ImgTrans.php b/vendor/amenadiel/jpgraph/src/image/ImgTrans.php new file mode 100644 index 0000000000..53b50f2104 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/image/ImgTrans.php @@ -0,0 +1,241 @@ +gdImg = $aGdImg; + } + + // -------------------------------------------------------------------- + // _TransVert3D() and _TransHor3D() are helper methods to + // Skew3D(). + // -------------------------------------------------------------------- + public function _TransVert3D($aGdImg, $aHorizon = 100, $aSkewDist = 120, $aDir = SKEW3D_DOWN, $aMinSize = true, $aFillColor = '#FFFFFF', $aQuality = false, $aBorder = false, $aHorizonPos = 0.5) + { + + // Parameter check + if ($aHorizonPos < 0 || $aHorizonPos > 1.0) { + Util\JpGraphError::RaiseL(9001); + //("Value for image transformation out of bounds.\nVanishing point on horizon must be specified as a value between 0 and 1."); + } + + $w = imagesx($aGdImg); + $h = imagesy($aGdImg); + + // Create new image + $ww = $w; + if ($aMinSize) { + $hh = ceil($h * $aHorizon / ($aSkewDist + $h)); + } else { + $hh = $h; + } + + $newgdh = imagecreatetruecolor($ww, $hh); + $crgb = new RGB($newgdh); + $fillColor = $crgb->Allocate($aFillColor); + imagefilledrectangle($newgdh, 0, 0, $ww - 1, $hh - 1, $fillColor); + + if ($aBorder) { + $colidx = $crgb->Allocate($aBorder); + imagerectangle($newgdh, 0, 0, $ww - 1, $hh - 1, $colidx); + } + + $mid = round($w * $aHorizonPos); + + $last = $h; + for ($y = 0; $y < $h; ++$y) { + + $yp = $h - $y - 1; + $yt = floor($yp * $aHorizon / ($aSkewDist + $yp)); + + if (!$aQuality) { + if ($last <= $yt) { + continue; + } + + $last = $yt; + } + + for ($x = 0; $x < $w; ++$x) { + $xt = ($x - $mid) * $aSkewDist / ($aSkewDist + $yp); + if ($aDir == SKEW3D_UP) { + $rgb = imagecolorat($aGdImg, $x, $h - $y - 1); + } else { + $rgb = imagecolorat($aGdImg, $x, $y); + } + + $r = ($rgb >> 16) & 0xFF; + $g = ($rgb >> 8) & 0xFF; + $b = $rgb & 0xFF; + $colidx = imagecolorallocate($newgdh, $r, $g, $b); + $xt = round($xt + $mid); + if ($aDir == SKEW3D_UP) { + $syt = $yt; + } else { + $syt = $hh - $yt - 1; + } + + if (!empty($set[$yt])) { + $nrgb = imagecolorat($newgdh, $xt, $syt); + $nr = ($nrgb >> 16) & 0xFF; + $ng = ($nrgb >> 8) & 0xFF; + $nb = $nrgb & 0xFF; + $colidx = imagecolorallocate($newgdh, floor(($r + $nr) / 2), + floor(($g + $ng) / 2), floor(($b + $nb) / 2)); + } + + imagesetpixel($newgdh, $xt, $syt, $colidx); + } + + $set[$yt] = true; + } + + return $newgdh; + } + + // -------------------------------------------------------------------- + // _TransVert3D() and _TransHor3D() are helper methods to + // Skew3D(). + // -------------------------------------------------------------------- + public function _TransHor3D($aGdImg, $aHorizon = 100, $aSkewDist = 120, $aDir = SKEW3D_LEFT, $aMinSize = true, $aFillColor = '#FFFFFF', $aQuality = false, $aBorder = false, $aHorizonPos = 0.5) + { + + $w = imagesx($aGdImg); + $h = imagesy($aGdImg); + + // Create new image + $hh = $h; + if ($aMinSize) { + $ww = ceil($w * $aHorizon / ($aSkewDist + $w)); + } else { + $ww = $w; + } + + $newgdh = imagecreatetruecolor($ww, $hh); + $crgb = new RGB($newgdh); + $fillColor = $crgb->Allocate($aFillColor); + imagefilledrectangle($newgdh, 0, 0, $ww - 1, $hh - 1, $fillColor); + + if ($aBorder) { + $colidx = $crgb->Allocate($aBorder); + imagerectangle($newgdh, 0, 0, $ww - 1, $hh - 1, $colidx); + } + + $mid = round($h * $aHorizonPos); + + $last = -1; + for ($x = 0; $x < $w - 1; ++$x) { + $xt = floor($x * $aHorizon / ($aSkewDist + $x)); + if (!$aQuality) { + if ($last >= $xt) { + continue; + } + + $last = $xt; + } + + for ($y = 0; $y < $h; ++$y) { + $yp = $h - $y - 1; + $yt = ($yp - $mid) * $aSkewDist / ($aSkewDist + $x); + + if ($aDir == SKEW3D_RIGHT) { + $rgb = imagecolorat($aGdImg, $w - $x - 1, $y); + } else { + $rgb = imagecolorat($aGdImg, $x, $y); + } + + $r = ($rgb >> 16) & 0xFF; + $g = ($rgb >> 8) & 0xFF; + $b = $rgb & 0xFF; + $colidx = imagecolorallocate($newgdh, $r, $g, $b); + $yt = floor($hh - $yt - $mid - 1); + if ($aDir == SKEW3D_RIGHT) { + $sxt = $ww - $xt - 1; + } else { + $sxt = $xt; + } + + if (!empty($set[$xt])) { + $nrgb = imagecolorat($newgdh, $sxt, $yt); + $nr = ($nrgb >> 16) & 0xFF; + $ng = ($nrgb >> 8) & 0xFF; + $nb = $nrgb & 0xFF; + $colidx = imagecolorallocate($newgdh, floor(($r + $nr) / 2), + floor(($g + $ng) / 2), floor(($b + $nb) / 2)); + } + imagesetpixel($newgdh, $sxt, $yt, $colidx); + } + + $set[$xt] = true; + } + + return $newgdh; + } + + // -------------------------------------------------------------------- + // Skew image for the apperance of a 3D effect + // This transforms an image into a 3D-skewed version + // of the image. The transformation is specified by giving the height + // of the artificial horizon and specifying a "skew" factor which + // is the distance on the horizon line between the point of + // convergence and perspective line. + // + // The function returns the GD handle of the transformed image + // leaving the original image untouched. + // + // Parameters: + // * $aGdImg, GD handle to the image to be transformed + // * $aHorizon, Distance to the horizon + // * $aSkewDist, Distance from the horizon point of convergence + // on the horizon line to the perspective points. A larger + // value will fore-shorten the image more + // * $aDir, parameter specifies type of convergence. This of this + // as the walls in a room you are looking at. This specifies if the + // image should be applied on the left,right,top or bottom walls. + // * $aMinSize, true=make the new image just as big as needed, + // false = keep the image the same size as the original image + // * $aFillColor, Background fill color in the image + // * $aHiQuality, true=performa some interpolation that improves + // the image quality but at the expense of performace. Enabling + // high quality will have a dramatic effect on the time it takes + // to transform an image. + // * $aBorder, if set to anything besides false this will draw a + // a border of the speciied color around the image + // -------------------------------------------------------------------- + public function Skew3D($aHorizon = 120, $aSkewDist = 150, $aDir = SKEW3D_DOWN, $aHiQuality = false, $aMinSize = true, $aFillColor = '#FFFFFF', $aBorder = false) + { + return $this->_Skew3D($this->gdImg, $aHorizon, $aSkewDist, $aDir, $aHiQuality, + $aMinSize, $aFillColor, $aBorder); + } + + public function _Skew3D($aGdImg, $aHorizon = 120, $aSkewDist = 150, $aDir = SKEW3D_DOWN, $aHiQuality = false, $aMinSize = true, $aFillColor = '#FFFFFF', $aBorder = false) + { + if ($aDir == SKEW3D_DOWN || $aDir == SKEW3D_UP) { + return $this->_TransVert3D($aGdImg, $aHorizon, $aSkewDist, $aDir, $aMinSize, $aFillColor, $aHiQuality, $aBorder); + } else { + return $this->_TransHor3D($aGdImg, $aHorizon, $aSkewDist, $aDir, $aMinSize, $aFillColor, $aHiQuality, $aBorder); + } + + } + +} diff --git a/vendor/amenadiel/jpgraph/src/image/LinkArrow.php b/vendor/amenadiel/jpgraph/src/image/LinkArrow.php new file mode 100644 index 0000000000..af137f4fc6 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/image/LinkArrow.php @@ -0,0 +1,81 @@ +iDirection = $aDirection; + $this->iType = $aType; + $this->iSize = $aSize; + $this->ix = $x; + $this->iy = $y; + } + + public function SetColor($aColor) + { + $this->iColor = $aColor; + } + + public function SetSize($aSize) + { + $this->iSize = $aSize; + } + + public function SetType($aType) + { + $this->iType = $aType; + } + + public function Stroke($aImg) + { + list($dx, $dy) = $this->isizespec[$this->iSize]; + $x = $this->ix; + $y = $this->iy; + switch ($this->iDirection) { + case ARROW_DOWN: + $c = array($x, $y, $x - $dx, $y - $dy, $x + $dx, $y - $dy, $x, $y); + break; + case ARROW_UP: + $c = array($x, $y, $x - $dx, $y + $dy, $x + $dx, $y + $dy, $x, $y); + break; + case ARROW_LEFT: + $c = array($x, $y, $x + $dy, $y - $dx, $x + $dy, $y + $dx, $x, $y); + break; + case ARROW_RIGHT: + $c = array($x, $y, $x - $dy, $y - $dx, $x - $dy, $y + $dx, $x, $y); + break; + default: + Util\JpGraphError::RaiseL(6030); + //('Unknown arrow direction for link.'); + die(); + break; + } + $aImg->SetColor($this->iColor); + switch ($this->iType) { + case ARROWT_SOLID: + $aImg->FilledPolygon($c); + break; + case ARROWT_OPEN: + $aImg->Polygon($c); + break; + default: + Util\JpGraphError::RaiseL(6031); + //('Unknown arrow type for link.'); + die(); + break; + } + } +} diff --git a/vendor/amenadiel/jpgraph/src/image/PredefIcons.php b/vendor/amenadiel/jpgraph/src/image/PredefIcons.php new file mode 100644 index 0000000000..e67f09e8ff --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/image/PredefIcons.php @@ -0,0 +1,322 @@ +iLen; + } + + public function GetImg($aIdx) + { + if ($aIdx < 0 || $aIdx >= $this->iLen) { + Util\JpGraphError::RaiseL(6010, $aIdx); + //('Illegal icon index for Gantt builtin icon ['.$aIdx.']'); + } + return Image::CreateFromString(base64_decode($this->iBuiltinIcon[$aIdx][1])); + } + + public function __construct() + { + //========================================================== + // warning.png + //========================================================== + $this->iBuiltinIcon[0][0] = 1043; + $this->iBuiltinIcon[0][1] = + 'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAAA' . + 'B3RJTUUH0wgKFSgilWPhUQAAA6BJREFUeNrtl91rHFUYh5/3zMx+Z5JNUoOamCZNaqTZ6IWIkqRiQWmi1IDetHfeiCiltgXBP8AL' . + '0SIUxf/AvfRSBS9EKILFFqyIH9CEmFZtPqrBJLs7c+b1YneT3WTTbNsUFPLCcAbmzPt73o9zzgzs2Z793231UOdv3w9k9Z2uzOdA' . + '5+2+79yNeL7Hl7hw7oeixRMZ6PJM26W18DNAm/Vh7lR8fqh97NmMF11es1iFpMATqdirwMNA/J4DpIzkr5YsAF1PO6gIMYHRdPwl' . + 'oO2elmB+qH3sm7XozbkgYvy8SzYnZPtcblyM6I+5z3jQ+0vJfgpEu56BfI9vUkbyi2HZd1QJoeWRiAjBd4SDCW8SSAOy6wBHMzF7' . + 'YdV2A+ROuvRPLfHoiSU0EMY/cDAIhxJeGngKaN1VgHyPL7NBxI1K9P4QxBzw3K1zJ/zkG8B9uwaQ7/HNsRZv9kohBGD0o7JqMYS/' . + '/ynPidQw/LrBiPBcS/yFCT95DvB2BWAy4575PaQbQKW+tPd3GCItu2odKI++YxiKu0d26oWmAD7paZU/rLz37VqIijD2YbnzNBBE' . + 'IBHf8K8qjL7vYhCGErEU8CTg3xXAeMp96GrJEqkyXkm9Bhui1xfsunjdGhcYLq+IzjsGmBt5YH/cmJkFq6gIqlon3u4LxdKGuCIo' . + 'Qu41g0E41po+2R33Xt5uz9kRIB2UTle7PnfKrROP1HD4sRjZlq0lzhwoZ6rDNeTi3nEg1si/7FT7kYQbXS6E5E65tA5uRF9tutq0' . + 'K/VwAF+/FbIYWt6+tjQM/AqUms7A4Wy6d7YSfSNxgMmzi0ycWWworio4QJvj4LpuL5BqugTnXzzqJsJwurrlNhJXFaavW67NRw3F' . + 'q+aJcCQVe9fzvJGmAY7/dPH0gi0f64OveGxa+usCuQMeZ0+kt8BVrX+qPO9Bzx0MgqBvs+a2PfDdYIf+WAjXU1ub4tqNaPPzRs8A' . + 'blrli+WVn79cXn0cWKl+tGx7HLc7pu3CSmnfitL+l1UihAhwjFkPQev4K/fSABjBM8JCaFuurJU+rgW41SroA8aNMVNAFtgHJCsn' . + 'XGy/58QVxAC9MccJtZ5kIzNlW440WrJ2ea4YPA9cAooA7i0A/gS+iqLoOpB1HOegqrYB3UBmJrAtQAJwpwPr1Ry92wVlgZsiYlW1' . + 'uX1gU36dymgqYxJIJJNJT1W9QqHgNwFQBGYqo94OwHZQUuPD7ACglSvc+5n5T9m/wfJJX4U9qzEAAAAASUVORK5CYII='; + + //========================================================== + // edit.png + //========================================================== + $this->iBuiltinIcon[1][0] = 959; + $this->iBuiltinIcon[1][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAFgAWABY9j+ZuwAAAAlwSFlz' . + 'AAALEAAACxABrSO9dQAAAAd0SU1FB9AKDAwbIEXOA6AAAAM8SURBVHicpdRPaBxlHMbx76ZvsmOTmm1dsEqQSIIsEmGVBAQjivEQ' . + 'PAUJngpWsAWlBw8egpQepKwplN4ULEG9CjkEyUFKlSJrWTG0IU51pCsdYW2ncUPjdtp9Z+f3vuNhu8nKbmhaf5cZeGc+PO8zf1Lc' . + 'm0KhkACICCKCMeaBjiLC0tLSnjNvPmuOHRpH0TZTU1M8zBi9wakzn7OFTs5sw8YYACYmJrre7HkeuVyu69qPF77hlT1XmZ0eQ03O' . + 'wOLJTvhBx1rLz18VmJ0eY+jVd2FxDkKXnvYLHgb97OgLzE4ON9Hzc1B1QaQzsed5O0Lta3Ec89OnR5h5McfQ+Mw2qgQUnfBOPbZ3' . + 'bK3l+xOvMT0+3ERLp5FNF6UEjcL32+DdVmGt5WLhDYYPZrbRqreFumXwql0S3w9tnDvLWD5PZigPpdOwuYpSCo3C8wU3UHxQdHbf' . + 'cZIkNM6dxcnlUM4k1eUFMlUPpUADbpkttFarHe6oYqeOr6yt4RzMQHYUcUsQVtGicHDwKprViuLDkkOtVnsHCHZVRVy/zcj1i5Af' . + 'h8AjdIts+hUcGcYPK3iBtKM3gD/uAzf/AdY2mmmVgy6X8YNNKmGIvyloPcB8SUin07RQ4EZHFdsdG0wkJEnEaHAJxvKEpSLeaokV' . + 'r4zWmhUZYLlY4b1D03y5eIEWCtS7vsciAgiIxkQRabWOrlQor66y4pUphoJb1jiO4uO5o0S3q6RSqVbiOmC7VCEgAhLSaDQ48dH7' . + 'vD46REY0iysegSjKQciRt99ib7qXwX0O+pG4teM6YKHLB9JMq4mTmF9/+AKA4wvLZByH7OgYL7+UY2qvw/7Bfg5kHiXjJFyv3CGO' . + 'Y1rof+BW4t/XLiPG0DCGr79d4XzRxRnIMn98huXSTYyJ6et1UNYQhRvcinpJq86H3wGPPPM0iBDd+QffD1g4eZjLvuG7S1Wef26E' . + 'J7L7eSx7gAHVg7V3MSbi6m/r93baBd6qQjerAJg/9Ql/XrvG0ON1+vv7GH3qSfY5fahUnSTpwZgIEQesaVXRPbHRG/xyJSAxMYlp' . + 'EOm71HUINiY7mGb95l/8jZCyQmJjMDGJjUmsdCROtZ0n/P/Z8v4Fs2MTUUf7vYoAAAAASUVORK5CYII='; + + //========================================================== + // endconstrain.png + //========================================================== + $this->iBuiltinIcon[2][0] = 666; + $this->iBuiltinIcon[2][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlz' . + 'AAALDwAACw8BkvkDpQAAAAd0SU1FB9ALEREILkh0+eQAAAIXSURBVHictZU9aFNRFMd/N81HX77aptJUWmp1LHRpIcWhg5sIDlUQ' . + 'LAXB4t7RRUpwEhy7iQ46CCIoSHcl0CFaoVARU2MFMYktadLXJNok7x2HtCExvuYFmnO4w/3gx+Gc/z1HKRTdMEdXqHbB/sgc/sic' . + 'nDoYAI8XwDa8o1RMLT+2hAsigtTvbIGVqhX46szUifBGswUeCPgAGB7QeLk0X4Ork+HOxo1VgSqGASjMqkn8W4r4vVtEgI/RRQEL' . + 'vaoGD85cl5V3nySR/S1mxWxab7f35PnntNyMJeRr9kCMqiHTy09EoeToLwggx6ymiMOD/VwcD7Oa/MHkcIiQx026WGYto5P/U+ZZ' . + '7gD0QwDuT5z9N3LrVPi0Xs543eQPKkRzaS54eviJIp4tMFQFMllAWN2qcRZHBnixNM8NYD162xq8u7ePSQ+GX2Pjwxc2dB2cLtB8' . + '7GgamCb0anBYBeChMtl8855CarclxU1gvViiUK4w2OMkNDnGeJ8bt9fH90yOnOkCwLFTwhzykhvtYzOWoBBbY//R3dbaNTYhf2RO' . + 'QpeuUMzv188MlwuHy0H13HnE48UzMcL0WAtUHX8OxZHoG1URiFw7rnLLCswuSPD1ulze/iWjT2PSf+dBXRFtVVGIvzqph0pQL7VE' . + 'avXYaXXxPwsnt0imdttCocMmZBdK7YU9D8wuNOW0nXc6QWzPsSa5naZ1beb9BbGB6dxGtMnXAAAAAElFTkSuQmCC'; + + //========================================================== + // mail.png + //========================================================== + $this->iBuiltinIcon[3][0] = 1122; + $this->iBuiltinIcon[3][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlz' . + 'AAALEAAACxABrSO9dQAAAAd0SU1FB9AJHAMfFvL9OU8AAAPfSURBVHictZRdaBRXFMd/987H7tbNx8aYtGCrEexDsOBDaKHFxirb' . + 'h0qhsiY0ykppKq1osI99C4H2WSiFFMHWUhXBrjRi0uCmtSEUGgP1QWqhWjGkoW7M1kTX3WRn5p4+TJJNGolQ6IXDnDtz+N0z/3PP' . + 'UWBIpdpYa23b9g09PZ2kUrOrvmUyGVKp1Ao/mUyi56YnVgWfO/P1CihAd/dJMpmaNROIRq8BkM1m0bH6TasC3j6QXgFdXI+DR6PR' . + 'JX/Pno8B+KLnMKqlpUU8z8MYs2RBEDzWf9J+0RcRbMdxGBsbw/fmCXwPMUEYID4iAVp8wIRmDIHMo4yHSIBSASKC+CWE0C/PF9jU' . + '3B6Cp+4M07C5FUtKGNvGwQJctPgIsgD2wRhEIqAMGB+UQYkHJgYYZD7P1HwVlmWhHcfhyk83KeRGUW4t6CgoG5SNUS4KBWgQDUov' . + '7AGlwYASBVqH0Bk49dXpCviVV3dw/tI1Bvr7kMIIlh0NYUpjlF0BAYvcxSXmEVLKceHSCJm+PnbueBHbtkNwTXUNBzo6aGpq4sSZ' . + 'GwT5H7BsF6Wdf1GWHQAoM0upeI9PT1yioS7B7tdaSdSuw7KsUGMAy7HYsmUztTW1nMwM0txssX1rlHjjS5jy/Uq2YkK/eJuLl6/z' . + 'x+1xkslW6mrixGIODx8EFSlEBC0+tmXT0NhA2763iEUjnLv4C8XpUbSbAB1mKkGJ3J83Od77HW5EszvZSqK2iljMIeJaRGNuJePF' . + '6mspY7BJ1DXwQnCd2fxGRq5OUCz8xt72dyhMZcn++Cu3xu9SKhdp2b4ZHWnAtTSxmIWlhcIjlksR3lNBYzlxZsb7+f7ne+xtSzOd' . + 'u83szH1OnThOPp/n+a0beeP1l4mvq+PU2Qyd+5PY1RuwlAqLYFaBfbTbyPSdfgaH77A//QF4f1O/vpr6RJyq+C5Kc/M8FbFxXItY' . + 'xOHDrvfo/fxLDnbsJBp5BowBReVWYAzabeTh5ABDw7cWoNNL3YYYNtSv57lnn6Z+Qx01VeuIuBa2DV1HD3H63BAPZu4u1WGpeLHq' . + 'Rh7+NcjA0O+0p4+CNwXigwnbWlQQdpuEpli+n+PIkcOc//YKuckJJFh2K2anrjFw+QZt6S6kPImIF/b+cqAJD1LihWAxC61twBTo' . + 'fPcQF/oGsVW5ovHQlavs2/8+uYnRVSOUgHAmmAClBIOBwKC0gPjhIRgEIX2wg7NnwpZW3d3d4vs+vu8TBMGK51rvPM9b8hdteZxd' . + 'LBbVR8feJDs0Rlv6GFKeXJ21rNRXESxMPR+CBUl0nN7PjtO+dye7Up/8v1I88bf/ixT/AO1/hZsqW+C6AAAAAElFTkSuQmCC'; + + //========================================================== + // startconstrain.png + //========================================================== + $this->iBuiltinIcon[4][0] = 725; + $this->iBuiltinIcon[4][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlz' . + 'AAALDgAACw4BQL7hQQAAAAd0SU1FB9ALEREICJp5fBkAAAJSSURBVHic3dS9a1NRGMfx77kxtS+xqS9FG6p1ER3qVJpBQUUc3CRU' . + 'BwURVLB1EAuKIP0THJQiiNRJBK3iJl18AyeltRZa0bbaJMbUNmlNSm5e7s25j0NqpSSmyag/OMM9POdzDuflwn8djz8gClVRrVEV' . + 'ur4Bl1FTNSzLrSS6vbml0jUUwSXj8Qfk3PkLtLW2AeBIybmrgz3+gFzpucjlE4f4btuFTuWuCF5XDr3a3UPf6cM8GQvxzbsRAJdh' . + 'ScfxSywml5j7mVypN0eGEJ0tebIre+zxB6Tv7jPReS2hREpOvpmUXU+H5eC913JnNCSRVE60pUVbWoZjprR39Yq70bdqj4pW7PEH' . + '5FpvL9e79jOTTHM7ssDL6CJZ08LbvAGnrpZg2mI2Z/MlZfN8IkxuSwu4V9+WIrj7zFlOHfXzKrLIi2SGh5ECKjnNVNxkQEc55vOw' . + 'rb6O8JLFdHyJ+ayFElUeHvjwkfteL/V7fKTSkFvIQE4DoLI2Mz/muTkTApcBKIwaN8pwIUrKw+ajWwDknAO0d/r4zFaMuRS63sWm' . + 'RoOdm+vRIriUYjKexrQV+t1o0YEVwfZSVJmD/dIABJuO0LG3lRFx0GOfiAELE9OgCrfU0XnIp5FwGLEy5WEAOxlR5uN+ARhP7GN3' . + '5w7Gv4bQI2+xpt4jjv2nWBmIlcExE2vDAHYioszBZXw6CPE4ADoWVHmd/tuwlZR9eXYyoszBfpiNQqaAOU5+TXRN+DeeenADPT9b' . + 'EVgKVsutKPl0TGWGhwofoquaoKK4apsq/tH/e/kFwBMXLgAEKK4AAAAASUVORK5CYII='; + + //========================================================== + // calc.png + //========================================================== + $this->iBuiltinIcon[5][0] = 589; + $this->iBuiltinIcon[5][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAA4AIwBbgMF12wAAAAlwSFlz' . + 'AAALEQAACxEBf2RfkQAAAAd0SU1FB9AHBxQeFsqn0wQAAAHKSURBVHicnZWff+RAGIef3U/gcOEgUAgUCgcLhYXCwsHBQeGgUDgs' . + 'FgMHB4VA/4Bg4XChWFgIFIqBwkJhsRAYeOGF+TQHmWSTTbKd9pU37/x45jvfTDITXEynAbdWKVQB0NazcVm0alcL4rJaRVzm+w/e' . + '3iwAkzbYRcnnYgI04GCvsxxSPabYaEdt2Ra6D0atcvvvDmyrMWBX1zPq2ircP/Tk98DiJtjV/fim6ziOCL6dDHZNhxQ3arIMsox4' . + 'vejleL2Ay9+jaw6A+4OSICG2cacGKhsGxg+CxeqAQS0Y7BYJvowq7iGMOhXHEfzpvpQkA9bLKgOgWKt+4Lo1mM9hs9m17QNsJ70P' . + 'Fjc/O52joogoX8MZKiBiAFxd9Z1vcj9wfSpUlDRNMcYQxzFpmnJ0FPH8nDe1MQaWSz9woQpWSZKEojDkeaWoKAyr1tlu+s48wfVx' . + 'u7n5i7jthmGIiEGcT+36PP+gFeJrxWLhb0UA/lb4ggGs1T0rZs0zwM/ZjNfilcIY5tutPxgOW3F6dUX464LrKILLiw+A7WErrl+2' . + 'rABG1EL/BilZP8DjU2uR4U+2E49P1Z8QJmNXUzl24A9GBT0IruCfi86d9x+D12RGzt+pNAAAAABJRU5ErkJggg=='; + + //========================================================== + // mag.png + //========================================================== + $this->iBuiltinIcon[6][0] = 1415; + $this->iBuiltinIcon[6][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlz' . + 'AAALDAAACwwBP0AiyAAAAAd0SU1FB9ALDxEWDY6Ul+UAAAUESURBVHicdZVrbFRFGIafsyyF0nalV1R6WiggaAptlzsr1OgEogmC' . + '0IgoBAsBgkIrBAPEhBj/AP6xRTCUFEwRI4jcgsitXMrFCJptJWvBNpXYbbXtbtttt6e7e86ec/yxadlCfZPJZDIz73zzzjfvR2VL' . + 'F7U+hf0HD2JduIzTFy6SlJRkPtkcDgdCCE65OxFC8NPV6wghyM7OptankJ2dzbSC5QghEEIgCSHog9PpNAF27dlN6miZuPgElB4/' . + 'nmY3O7ZtByA1NVUCkGWZweD1eklJScESTbqxuIjrd+/x6uIl5M19hSy7nfGOeUxf+g7VjU1sKi7C4/GYsiyz7tAJAD4/cRaA1tZW' . + 'AHIPnECUVGD1+/3U19ebG4uLeHf1akamjsIwoVnVCOvQEdLoVILYYmMo3PIxSBJflpSaDX5FAmju1QAYv/8k/s8+wLVxOU0jR2LZ' . + '8sMFAApWrCApbRRDrRZirBYSLBKaoRPQw3SFernf2sav7T0Ubt4KwL4FMwF4Vu8FoHBCKgCzDhwHwLIhZ7y5a89u4m2JhA0wTdDC' . + 'OrphEjJMNElCHxKDEjaobmvlfo/Krj27CQQCJsCGJW8C0KXqAMxMiosQA8hZWcTFx9OsaniDKh1qmG7VoFsL0x0K06kbeAMhWpRe' . + '/KpG+gwHAKUnz7Dz3BUMw6DK18nuw99wt0Nh6VdHI8RJicmETQgFg7SFwjSrGv+oKp6ghldV6dZ0ugJBlF6FmCESQ2w2AIqXLsan' . + 'BrFYLJTnTCBrdBqveeopWZiPFaBHUegJhegMqGgxEkHDwB/UaQ9rdIV06v0+TD2EEQjQFtAY0dsNgNvt5sialQAIIXh7wQKuVf6J' . + 'gTsSccPDWlQstClBGjr9eHpVWvUQncEwdYEedF8noQ4vmYmpZMTH0nTvDn25vLbrNmu7bvfnsYEbAMnhcPDgwQPzUo2LJusw/mhp' . + 'QwlHNO0KBAnoIfxtrcQMT2De1Mm891wyUzNlUlJSpIyMDBobGzlzr5rFM/Koq6vrP8ASGxsLwPmKcvIShjPGZiPOakE3VFB8hHwd' . + 'vJAxhrk5L7Ly+RQuH/sWgPdXrwFg/6HDFBUsIj09nehfbAWwPWOT9n5RYhqGwarNWxkRM5TRCfF4U1PQsDDJFk9uYhwXvzvKjm3b' . + 'KSsro3DJInNW5RXp7u2bAKSlpeH1esnPz6eqqgqLpmmcr3Fht9ulfaV7mZk1Bs+lM6T1djM9fhg5egDPpTNMy5TZsW07kydPYdWM' . + 'aXx96ixOp9O8cfUa80srmDpjOgAulytiQqZpMnvObLbt/JTtHxXj9/tRVdU0DGOAufRpevPDTeac0hJyc3NxOOawfv161lVWS6eX' . + 'z+9/UOCxu1VWVvaTRGv16NFfjB2bNeAQp9NpTpmSM4DcbrdL0WsGDKLRR+52uwe1yP8jb2lpYfikyY9t80n03UCWZeaXVjw1f+zs' . + 'Oen+/d+pqanhzp2fKSsrw+l0mi6XiyPl5ZGITdN8fAVJwjRNJEmi1qfw1kw7siyTnJxMe3s71dXV3GpoZO64DG41NPJylvxU5D/e' . + 'qJKsfWQD9IkaZ2RmUvr9aV4aGYcQgjfO3aWoYBF5eXm4ewIsu/CbdPz1aWb0/p1bNoOrQxlUiuiaFo3c3FyEEOx9+C9CCD6paaTW' . + 'p/TXyYkTJ0Xe59jf7QOyAKDWp/QXxcFQ61P4pT3ShBBcvnUHIQTjxmX19/8BCeVg+/GPpskAAAAASUVORK5CYII='; + + //========================================================== + // lock.png + //========================================================== + $this->iBuiltinIcon[7][0] = 963; + $this->iBuiltinIcon[7][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlz' . + 'AAALCwAACwsBbQSEtwAAAAd0SU1FB9AKAw0XDmwMOwIAAANASURBVHic7ZXfS1t3GMY/3+PprI7aisvo2YU6h6ATA8JW4rrlsF4U' . + 'qiAsF9mhl0N2cYTRy9G/wptAYWPD9iJtRy5asDe7cYFmyjaXOLaMImOrmkRrjL9yTmIS3120JybWQgfb3R74wuc8Lzw858vLOUpE' . + 'OK6pqSm2trbY39+nu7tbPHYch7m5OcLhMIA67kWj0aMQEWk6tm17rNm2LSIie3t7ksvlJJ1OSyqVkls3Z8SyLMnlcqTTaVKpFLdu' . + 'zmBZVj1HeY2VUti2TSQSQSml2bZdi0QirK2tMT09zerqKtlslqGhISYnJ4nHv2N+foFsNquOe9FotLlxOBwmk8lgWRbhcFgymYxY' . + 'liUi0mqaJoAuIi2macrdO7fFsizx3to0Te7euV1vrXtXEgqFmJmZYWVlhXK5LB4/U9kwDL784kYV0A3DYHd3m4sXRymXywKoRi8U' . + 'Ch01DgQCJBIJLMsiEAhIIpHw2uLz+eqtYrEYIqKZpimxWEyCwaCMjY01zYPBIJpXqVQqsby8TLVabWKA/v5+RkZGMAyDrq4ulFKH' . + 'HsfjcWZnZ+ns7KTRqwcnk0mKxSKFQqGJlVKtruuSTCYB6O3trW9UI/v9/iZPB/j8s2HOnX0FgHfeXpeffnzK+fWf+fijvhLs0PtG' . + 'D/n1OJ9+MsrlSwb3733DwMCAt1EyPj6uACYmJp56168NU6nUqFSE9nZdPE7+WqC/r4NKTagcCJVqDaUUB5VDAA4Pa9x7sMLlSwan' . + 'WjRmv13D7/erpaWlo604qOp88OF7LC48rPNosMq5Th+Dgxd4/XyA1rbzADi7j8jnf2P++wdcvSr8MJ/i8eomAKlUqn41OsDAQDeD' . + 'g++yuPCwzm/2vU8+n2a7sMFfj79mp7BBuVzioFSiXHJx3SKuW2Rzy0Up9dxnQVvODALQerqNRn4ZKe0Mvtc6TpzpmqbxalcY9Ato' . + '2v06t515C73YQftZB9GLnDrt4LoujuPgOA4Ui+C6yOpXJwZrJ7r/gv4P/u+D9W7fLxTz+1ScQxrZ3atRLaVxdjbY2d184R6/sLHe' . + 'opHP7/Do90Ua+WWUyezzZHObP/7cfX54/dowE1d66s8TV3oE+Mfn+L/zb4XmHPjRG9YjAAAAAElFTkSuQmCC'; + + //========================================================== + // stop.png + //========================================================== + $this->iBuiltinIcon[8][0] = 889; + $this->iBuiltinIcon[8][1] = + 'iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlz' . + 'AAALDwAACw8BkvkDpQAAAAd0SU1FB9AJDwEvNyD6M/0AAAL2SURBVHic1ZTLaxVnGIefb2bO5OScHJN4oWrFNqcUJYoUEgU3/Qf6' . + 'F7gwCkIrvdBLUtqqiLhSg9bgBduFSHZdiG5ctkJ3xRDbUFwUmghNzBDanPGMkzOX79LFJGPMOSd204U/+Bbzvd/78F4H/ieJdoad' . + 'pZKxRFszAI/DcP0HazXY22v+HB01kee1PA/v3zfnjx4xgGnHcNZe7OvuNj+cOEF1ZATv5nUA4jhBSgmADCVWo8Ge2Of9wb18P/G7' . + 'oUXmYi30zqlTVEdGWLh1g2D6MYlKkXGE0Vl8aa2GEB149+4xXSzyoOIw/mimiZV/DPb25pFOj13A9gOMEChhUEqhVYqWKUk9QAUp' . + 'sT/P4s8PmKlUmNhQaIJbkDVqBbpw6wZ2zUc4Nm+ePku5p4eOrgpueQOFUoVCVxcD4+N07dpF9+5tVJeWGPBjhvr7WF1zC8ASgtcP' . + 'H8a7eZ1odh4sh50nzwCw9ZNh3M4Stutiu0X2nB/LyjZ6lcIbVTpdQU/jWVPzLADM8+ZGBRdtC7wrF/O7bR99iu26VL86iU4SAH4b' . + 'Po5d6AQhstMSvGyI4wS5FJBKSRwnzF8byx/u+PjzzMF1mfryQ1K/jnCahqp1xEopjFLoNEFJSRJHzF799gWHqa+/QKcSUXBI609f' . + 'Al5W4teQSiHDOipNUKnMI13RvnOXAIEKQixvGWya98SC560MFwPiqEG86JM8q79Q06lvhnOndy5/B6GPCUOMUu3BQgg8z0M3GmBZ' . + 'iGJn3v2VmsqnfzNx7FDueODuj8ROCFpjtG5TCmOYv32bJ09msP0ISydMfnAUgF8/O45RAA6WTPjlvXcB+Gn7FuRf/zAnNX6x3ARe' . + 'PSdmqL+P/YHkwMGDOGWDZTlQcNBRhPEComgB/YeHfq2InF1kLlXUOkpMbio1bd7aATRD/X0M1lPeSlM2vt2X1XBZjZnpLG2tmZO6' . + 'LbQVOIcP+HG2UauH3xgwBqOz9Cc3l1tC24Fz+MvUDroeGNb5if9H/1dM/wLPCYMw9fryKgAAAABJRU5ErkJggg=='; + + //========================================================== + // error.png + //========================================================== + $this->iBuiltinIcon[9][0] = 541; + $this->iBuiltinIcon[9][1] = + 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAAAaVBMVEX//////2Xy8mLl5V/Z2VvMzFi/v1WyslKlpU+ZmUyMjEh/' . + 'f0VyckJlZT9YWDxMTDjAwMDy8sLl5bnY2K/MzKW/v5yyspKlpYiYmH+MjHY/PzV/f2xycmJlZVlZWU9MTEXY2Ms/PzwyMjLFTjea' . + 'AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTCAkUMSj9wWSOAAABLUlEQVR4' . + '2s2U3ZKCMAxGjfzJanFAXFkUle/9H9JUKA1gKTN7Yy6YMjl+kNPK5rlZVSuxf1ZRnlZxFYAm93NnIKvR+MEHUgqBXx93wZGIUrSe' . + 'h+ctEgbpiMo3iQ4kioHCGxir/ZYUbr7AgPXs9bX0BCYM8vN/cPe8oQYzom3tVsSBMVHEoOJ5dm5F1RsIe9CtqGgRacCAkUvRtevT' . + 'e2pd6vOWF+gCuc/brcuhyARakBU9FgK5bUBWdHEH8tHpDsZnRTZQGzdLVvQ3CzyYZiTAmSIODEwzFCAdJopuvbpeZDisJ4pKEcjD' . + 'ijWPJhU1MjCo9dkYfiUVjQNTDKY6CVbR6A0niUSZjRwFanR0l9i/TyvGnFdqwStq5axMfDbyBksld/FUumvxS/Bd9VyJvQDWiiMx' . + 'iOsCHgAAAABJRU5ErkJggg=='; + + //========================================================== + // openfolder.png + //========================================================== + $this->iBuiltinIcon[10][0] = 2040; + $this->iBuiltinIcon[10][1] = + 'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAZiS0dEANAAtwClFht71AAAAAlwSFlz' . + 'AAALEAAACxABrSO9dQAAAAd0SU1FB9AKDQ4RIXMeaLcAAAd1SURBVHicxZd7jBXVHcc/58zcvTNzH8vusqw8FsTsKiCUUh5WBZXG' . + 'GkOptmqwNWsWLKXFGlEpzZI0AWNKSy0WhDS22gJKtWlTsSRqzYIuLGB2WVvDIwQMZQMsy2OFfdzde+/OnHP6x907vJaFpjb9JZM5' . + 'c85Mfp/f9/s7Jxn4P4e41gtSyp78WGvtfdEAcqDFYUOH9HS0NhGk9tPb/ilSyp789UUB2AMuqhQy3Uzm7HGkE6W3dTNZMRI3EcWO' . + 'jf9ClLmWBT3dzW8jUsevWHCG3UpWl+IkHSxnbDh/Mcz12NevBcuWXTmf6TjnXvJ88gDmVB3pw3+nt3UzHa1NqMzBS2zqPLGFjtMN' . + 'ZNr3XdW+qyqwZcFk76HX/tHWfuQvyO4W7qhaHwL8efkMRlRUpPv7rqD0RrJ+FgAjLy1a20OIxZJEEuNCRfIApj+om4bGM3u2/sYU' . + '9J41d8973f3Dhg1pISTV1dXXBRNJxPGFCzhou+DCQrScZOkktNaeDZjamgeZ9MgiYmVDccvHhjAzJw0NTh8/alyZMaVJicp0iTHj' . + 'JpgNv38tjWUhhGROdbUL9W5/MH5XCkjlcibi+KIop5LVHLKEu8A/f4r286doa9pGrGwYAAsfqbbH3b8MgO/Nqgy6WvdbbXHMkEFJ' . + '4xUOMVEvaTZu3BgmvF4Yk4hz9rO/Ulr5cE9owae/rcGxohSOuiWkC2IjcIqKyPZm+OmCH7GhoZEF077EEzVVweAbJ+riEeO0Ey8y' . + 'UubqOHn0AOgMwvf59txnBrSp9dgxKmf/+kIP1NY8SFk0jh5ajmNHAWg5b2E5EexojGHjbiVRMoRMNs0LC+Yz46vTuH3enN7BI8fr' . + 'qFdo0BoVZNC9aVSQ4fNjBzEmQJiARxb+/AqYPMAVB5FsPU5v37g9OxgLhe14ZM5/ju052E6MNZvf5pmHHuLmmWOkEysxUtpGAtme' . + 'dtHTflJkezqQto3jFRnLssyf1jydxiiM7zNnye/c3ZsqLu2BN5fcMfzrv/hby1tPzmRUoihcTJ87CwQI2yLtDcIqsIjYUf51qBlf' . + 'OnScOSrdQUOMURkiXsLUzJnvbGhoBGDHH5cGyZLhOpYoNl5hqYnYEXOu5fDl9eYAHntx98n8hFHZcPHUuTSxSASAeK/CGIOxJJ0f' . + 'bOGNPU280dgkq6Y2yu8vfjCIlwwzr+/ZQ/PHO0gOLuO5qsftDQ2NbN+4OCgqG6WTxWVaq6zpF+DiSHWnicdylp3r6aZTWthIOrNp' . + 'ktHcvBu0sHX1Sm6ozB3B42d90zZA9bQp7PvgPSzXZfnqX/HS4DKKK2+x69Y/HURs26iBAN5ccsfw7774UcumF37C6f07KSt2OHji' . + 'DEUJD0tISjyPrrSPlAKvN0JP/U4O1NfjuhG2rvklN1SOpfXwftpbTqAyKRrff5fb7rs9V1R7m4wlz2ihA3HpmXflUWyOH2umpLiY' . + 'ui3v8M+6bWzfsRNbSgqkxaCkiy0simMuEWEhpcRzIhQWOIAh6tiAwS4owInFiTou5dOnMnl2NR++ujBwXEc9terD6M43nrj6LgAB' . + 'QnDPA9/irtkP8JRS7Hr/3T6YekDQ1pEiEXOwpUVJzCVlZZFS4mZtkpEo9ChAkDp/jtLMBACy6S4RiQghLyv5cgBRPnKUOX6smUGF' . + 'hSil0MYw9d77mPy1e5mnFE3batm3czvb6nYgEJztSFGU9LCRlMRdUjIH0+lnEMIwPNXD3NumoVJnrMCJaiciMUZfvQnz4QcBSvV1' . + 'vjE5GK358t0zmXDnDB79saLpo20c+aSRD+t25JTp7GZQwsEWFiVxl6hlUf/WO9z32CxmL1rOe6u/I2KuwGhzLQCB7/sYY9Bah3el' . + 'FKbvrrVm4vS7GH/7ncx+chEHGz7myCeNbPtoO0JI2jq78WIRLGkzsqs7V5SfFV5EovXACoiqqsfNpk2vo5VCWtYFBfoU0VoTBAFa' . + 'a7TRaK2p+MoURk+cxMzq+Rzbv49DDbuo27UTW9h0dedssPxuK+kIfN8XxhgDYPVXf2Fh4XKtFIl4AiklAlBKAYRKKK36wHIweTCt' . + 'NfHiEkaOn8j0+7/BmDFjaT30GbHywSxcuZkpFfFg+m1jjZ/NmnVvNfRvwd69e8WBA/uNFAIh4JVXXmHsmDHE4vEQQgjQ2lxQIm9N' . + 'nz35q3BEOZOHzaG2thaA4mRU+L29It+IV21CpbRQfeMFC35gRB/M2rVrubnyZmLxWJhECBEmz/eHyo/7lMlH3LFFujsthNFCCGOu' . + '+WNyeUgpjSVzMKtWraKyshLPdcPEeYWCIEBdpIxSivr6eta8vI7d6+cGnhdV06pe1QP+F/QXWmuRL+jZZ58LlVmxYgUVFRV4rhtu' . + '4TzMxXAA6XRaRAtsYUkx8I/JtSJQOlSwpmZpCLN8+fPcdNNoHMfB9/0QJgRoP295TlR7UVv8xxZcHMuWIZ9/Hn35vG3JEGZpzVJG' . + 'jx5N1IlitKahsZE1L69j69qHgx+urFX/lQL9JYdLlfnZihUhzOLFi8N3Ml1dthOxVH/f/8/CtqSJ2JaJ2JZ59J7RPsC/AViJsQS/' . + 'dBntAAAAAElFTkSuQmCC'; + + //========================================================== + // folder.png + //========================================================== + $this->iBuiltinIcon[11][0] = 1824; + $this->iBuiltinIcon[11][1] = + 'iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAYAAAA6RwvCAAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlz' . + 'AAALEAAACxABrSO9dQAAAAd0SU1FB9ECAQgFFyd9cRUAAAadSURBVHiczdhvbBP3Hcfx9/2xfefEOA5JoCNNnIT8AdtZmYBETJsI' . + '6+jQOlQihT1AYgytqzZpD1atfyYqlT1h0lRpT7aRJ4NQpRvZGELVuo5Ua9jEJDIETQsNQyPBsUJMWGPnj//e+e72wNg4xElMR6ed' . + 'ZNln3933dZ/f93f6yfB/sgmrHdDV1WXlPg8NDZUDScD8LFFFEZZlWYZhWMFg0Orq6sq/gDJAfFy1iiZy9OjrVnj4JzQ1rMWqfxm/' . + '309jYyNtbW0kEgnu3bvH4cOH88c/jqSKQl4/XGkd+eVtAN46up1LH92ktqYS++ZX8Pv9NDQ0sGnTJlKpFOFwmO7u7vy5IyMjeVRd' . + 'XV1+WEOh0IrY4pDnq6wXX/sTiCJaMkFZdRNqxefoe7VtCSqXVDqdZnZ2ltraWkzTpKqqijt3JpFlG7dvj7NzZ1f++qFQyA3EClHL' . + 'Ql743nFkhxPDtJAd5eTaYSVUfX09lZWVlJWVIUnSg7sVQMBCUcu4ceMGe/bsIRQK1QAzOcyykIM9P0KyudAyCWyqG8nhwqa4SkLt' . + '3r0bVVVxu924XC40TUOWZUQxe97CwgIdHR2LMHIxSCaVInVvFElxE0vMY1Pd2NUKJMWNTXHlUfF//4vETJCelwbpFm3MjP2dt37x' . + 'AlN+PzU1NViWRSwW4+7du3g8HjweD4qi5EFAJzAExIpCANbooxhplfB0FJvTg6xWIqsVRVF6MopkU3FXPcnkJxGU0VEAdF2noqKC' . + 'W3/8DpnqLjzep2lubsblcjE8PExHR8fboVDID9xYFpLBDpJF0jDQIncQpWlkm31FlFLtp9PfyuW/vYQj1kPSuRW/38+lj27S2Q7v' . + '/aWXUBVUffVNtm3blivVCEwsC5Eyc5iiApEpDEAXMqQdldhSiWVQHjJagud+8Fuexck/zv+K82dfoSbSCsDe75/km+4GVPd6+l5t' . + '4zJHcqVUYN2yEEtZQDCSJCueRAYsPY49HsFIZVG6p25JUumFafT4DKJN4amtT7Nz38sk5+5A70HMtEYyMkFiZhxzjQ/poXrLQrRU' . + 'DFGEeFpAlkQkm4pRiCpIKodKzk0T/2QMh+piPjxKZPwiSkUtu/b9mNnJEWS7E8nhAmvpM60oJDkXJxqNozxRRUxPIesispBBlsXV' . + 'UaKEFo8gzoaJhz8s2lOmrpUG+WBhJ9/60g+Z+fDXTAXfxllRjl1VkO0OFATsYhYliiK21ZKKhhHnFveUqSdKgwAEOp7F2v51vvw8' . + 'XH7/N1wd/BlTweuUV65BdtgfoLTSkipsdD3tRi0VYpommUwGwzDwdT5HYEc3giAwcvH3jLz3BlPB67jWeZBEKYsSBWwpHZtNKo4q' . + 'aHTDsJeeiGEYWJaFZVmYpommaRiGQdPnv0bb1m8gSRL/vPIOV979aR4lmAJ2p4qCgCxksNuKJ6VNpx4NYhgGpmkuQhmGQTqdxjAM' . + 'qr2d7HtxEEEQuH1tkKvvvkF44tqDnrIcKJKAPf1g+LAUElq8dIiu60sApmnm93Pfzc7OYhgGrie+wFe++ztcLhcT1wf54PzPCU9c' . + 'w7XWjWS3IdsdOAUBWZAxrRJnTQ6SG5bce2FCpmkughmGQSqVYm5uDtnj44sH38TtdhP6+Dwf//V4ttHXrkGURZJaic8RgHQ6jWma' . + 'SJKUL5RLKNfIOczDKF3XSSaTRCIRhLJWntp3nGfWrSMxc5OLf3iNP4+68T9Ub9nF76lTpxgfHycajZJKpdA0LZ9GbjYV7hcDWZaF' . + 'pmnMz88Ti8UYunSLmu1HFi2aVkxkaGjINTY2ttDb24vX6+XQoUNs3ryZ8vJyIDu1BUFYkkxhgxeiWlpaOHPmDE1NTdTX1xe98eWG' . + 'JnF/9dQZCoXUYDA4AOD1ejlw4ACtra2Ul5fniwmCkEcUJiUIAoFAgL6+Pnw+H21tbfT39z8SxCS7hHsfWH9/8dL4MKqnp4eWlhac' . + 'TmcekEvMNE2am5s5ceIEgUCA9vZ2Tp48ic/nY3j4UsmQHCYOjJHtpeBKqL1799Lc3IzT6UTXdRobGxkYGKC9vZ3W1tZ8Ko86NJ8a' . + 'tXHjRo4dO8bp06fZsmULGzZsoL+/n0AggNfr5ezZs/8VpGTU5OSkc//+/acBfD4f1dXV7Nq1i4aGBs6dO4fP5+Pq1SuPBbIiyjTN' . + 'RUnV1dUNXLhwAa/Xy44dO4jFYgBEo9FFF1r134BPuYlk16LrAYXsAlmtq6sbKDwoFAp9m+ykuP5ZQVZF3f8tCdwCov8LyHIoAANI' . + 'AXf/A1TI0XCDh7OWAAAAAElFTkSuQmCC'; + + //========================================================== + // file_important.png + //========================================================== + $this->iBuiltinIcon[12][0] = 1785; + $this->iBuiltinIcon[12][1] = + 'iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAYAAAA6RwvCAAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlz' . + 'AAALDwAACw8BkvkDpQAAAAd0SU1FB9ECDAcjDeD3lKsAAAZ2SURBVHicrZhPaFzHHcc/897s7lutJCsr2VHsOHWMk0MPbsBUrcnF' . + 'OFRdSo6FNhdB6SGHlpDmYtJCDyoxyKe6EBxKQkt7KKL0T6ABo0NbciqigtC6PhWKI2NFqqxdSd7V2/dmftPDvPd212t55dCBYfbN' . + 'zpvfZ77z+/1mdhUjytWrV93Hf/24eD5z9gwiMlDjOKbb7dLtdhER2u02u7u73Lp1CxEZBw4AeZwdNQqkMd9wbziFGINJUt6rRbz5' . + '1ptUq1XK5TJBEAAUMHt7e+zu7gKwvLzMysoKwAng/uNg9CgQgFKlgg1DUJ67Vqtx6tQpZmdniaIIpRTOOZRSdDoddnZ2aLfbLC8v' . + 's7S0xJUrV7ZGwQSj1PhhfRodVdDlMrpc5vup5Z2fvMPdu3fZ29vDWjvwztjYGPV6nVqtRqVS4dKlSywtLQFsAdOH2XwsCEApg3jl' . + 'w98Rak2gvYjNZpNms0mSJDjnHgkDMDc3dySYQ0Ea8w139YUX0OUKulzyg7UmCEO+l1huvHuDra0t9vf3h1TJYSqVypFhHquIrlQI' . + 'S5qv/uIDAC7/4bcEQYAKvK+0Wq1DVQGIoog7d+4cCeaRII35hrt+8SsEOkRlUaEyR0UpFIrXHxyMVKVUKnHv3r0jwRwaNelBjBjL' . + 'Sz/7KYuLiwAsLi7y4z/9kY9e+TpkCuSqjI+Po7XuAWeKXLt2DWNMUZMkwRjDhQsXWFtbK6JpCCT3jfQgxomPtPX19YHWicM5x3c2' . + '73Pj3Ru8/aO3mZqaolKpoHVvyuvXr/Ppnf/Q7uzz380NPtu4y/qnG+ztd1hfX2dtbQ3gIvDnRyqSxl1UoPjyz98D4PTp0wPtq39Z' . + '4fdzLxegrVaLVqvF5OQkYRgWqpRKJZ77wvNsbW1RG5tgfKLOTH2G7Z1twqBQrgrMDvhInjfSOCY5iIv+hYWFgRZArEWsZWF941Bf' . + 'SdMUgMnJCWpjVU4cn+HUyePM1Gc4+fRUPkzBI5w1jbukcczLv/5l0XfmzJmBFuCba38r/CRXpT+CrDUoZ0jjB4RYonJAOYRobJKT' . + 'z5zgqfqxAbsFSH6mpHFM2qdGXh4VnoViD6mSJF2cTQeqDqBaKVHWmonJCWpZjhkC6anR5WsffTgwaHV1FaUUq6urA/2v3f5k4LnV' . + 'arG9tUn3oI2YBCcWHYAxMVYs1qZEZY2SFB2aYZDGfMN9d7uJiWPSeFiNo5Rclc3NTXZbO6RpF7EJVixYA9agwwDnUiqlEPdQ3imi' . + 'Jo27BGHIt/7x9yEjc3Nzh27Na7c/4TdffKl4bja3ae5MUIu0T/HOEIaOpJt4gwoSsVTK4SBIY77hFtY3ABBjBiZ90rKwvsH77/+K' . + 't37wOhO1iPpTk4SBw1mLsz6CnKQ4l3qV+kE+t9XHlNZOk+bUJLVIE1VCcIJWQmJ6qjj30NbcXLkZMt8YPig+Z3n1G5fZ39/j/vY2' . + '9ckqZT2Ochbn0p4qNkU/dDfUADdXbh4HXgRO4zNdEU0XL1784PLly5w9e7Z4SazFOfGrEotDcOKrcoJPmrYIXf/Zop3QNd1skuGt' . + 'cUAb2MgAxvHZTgFUq1Wmp6eZnZ0F8JlTjDduDThBnDeECEoJtbGIp6enqEblzCcEZ1PECU4yVRiOGgd0gc+AB0CZvkv1sWPHOHfu' . + 'HOfPn8da41cpkkltEBEPJhYnBkTQJcdYVKGkgRxCfBsq5xXNgAa2Bn+hjTOgHEKBP8pzRUxykIH4ifLJRTJAl+UMBJzPHQ6bfe/f' . + 'cWIzPxlUpD+zugzIZtVk1d8znBAqRxgoQuVQgSJQ3h9C5QhDRYgjUILCAzlnEdsHYTKfMTEBcP7F54YUGVmc2GLlIn6ve6v0ahSt' . + '8X25TzjJ+rIx1grKpQPWR4LkGVVsMgghvS0qjPdvm5OeceOTWA5Evo2mFzkjQfL7hZPUy5yvvF/uPFQL3+nbDmsLCEmT3sTmCTNr' . + 'rogT6yFsOix3ftw7OwQhkvSU6CuinhCk0+kAkFoBazEEICHaHHiPVmU0gnUp4EAc1mYrF0EBVpwPi34VrBkwPxKk3W5ju/e5/c+d' . + 'bGUHIAIuydTIE5zfc5Wr4lJcahHnHTP3CVGm78DrgY38N+DEibp7dmYKdAQmBh1hjEFjis+9CTWYGK21H6PxPyOI0DobYwzZF/z7' . + '7jadTvJtYG0kCD7lfwl49ijgT1gc0AH+dZSJA/xB+Mz/GSIvFoj/B7H1mAd8CO/zAAAAAElFTkSuQmCC'; + + $this->iLen = count($this->iBuiltinIcon); + } +} diff --git a/vendor/amenadiel/jpgraph/src/image/Progress.php b/vendor/amenadiel/jpgraph/src/image/Progress.php new file mode 100644 index 0000000000..ae1c87e318 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/image/Progress.php @@ -0,0 +1,43 @@ + 1.0) { + Util\JpGraphError::RaiseL(6027); + //("Progress value must in range [0, 1]"); + } + $this->iProgress = $aProg; + } + + public function SetPattern($aPattern, $aColor = "blue", $aDensity = 98) + { + $this->iPattern = $aPattern; + $this->iColor = $aColor; + $this->iDensity = $aDensity; + } + + public function SetFillColor($aColor) + { + $this->iFillColor = $aColor; + } + + public function SetHeight($aHeight) + { + $this->iHeight = $aHeight; + } +} diff --git a/vendor/amenadiel/jpgraph/src/image/RGB.php b/vendor/amenadiel/jpgraph/src/image/RGB.php new file mode 100644 index 0000000000..93f17652b8 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/image/RGB.php @@ -0,0 +1,619 @@ +img = $aImg; + + // Conversion array between color names and RGB + $this->rgb_table = array( + 'aqua' => array(0, 255, 255), + 'lime' => array(0, 255, 0), + 'teal' => array(0, 128, 128), + 'whitesmoke' => array(245, 245, 245), + 'gainsboro' => array(220, 220, 220), + 'oldlace' => array(253, 245, 230), + 'linen' => array(250, 240, 230), + 'antiquewhite' => array(250, 235, 215), + 'papayawhip' => array(255, 239, 213), + 'blanchedalmond' => array(255, 235, 205), + 'bisque' => array(255, 228, 196), + 'peachpuff' => array(255, 218, 185), + 'navajowhite' => array(255, 222, 173), + 'moccasin' => array(255, 228, 181), + 'cornsilk' => array(255, 248, 220), + 'ivory' => array(255, 255, 240), + 'lemonchiffon' => array(255, 250, 205), + 'seashell' => array(255, 245, 238), + 'mintcream' => array(245, 255, 250), + 'azure' => array(240, 255, 255), + 'aliceblue' => array(240, 248, 255), + 'lavender' => array(230, 230, 250), + 'lavenderblush' => array(255, 240, 245), + 'mistyrose' => array(255, 228, 225), + 'white' => array(255, 255, 255), + 'black' => array(0, 0, 0), + 'darkslategray' => array(47, 79, 79), + 'dimgray' => array(105, 105, 105), + 'slategray' => array(112, 128, 144), + 'lightslategray' => array(119, 136, 153), + 'gray' => array(190, 190, 190), + 'lightgray' => array(211, 211, 211), + 'midnightblue' => array(25, 25, 112), + 'navy' => array(0, 0, 128), + 'indigo' => array(75, 0, 130), + 'electricindigo' => array(102, 0, 255), + 'deepindigo' => array(138, 43, 226), + 'pigmentindigo' => array(75, 0, 130), + 'indigodye' => array(0, 65, 106), + 'cornflowerblue' => array(100, 149, 237), + 'darkslateblue' => array(72, 61, 139), + 'slateblue' => array(106, 90, 205), + 'mediumslateblue' => array(123, 104, 238), + 'lightslateblue' => array(132, 112, 255), + 'mediumblue' => array(0, 0, 205), + 'royalblue' => array(65, 105, 225), + 'blue' => array(0, 0, 255), + 'dodgerblue' => array(30, 144, 255), + 'deepskyblue' => array(0, 191, 255), + 'skyblue' => array(135, 206, 235), + 'lightskyblue' => array(135, 206, 250), + 'steelblue' => array(70, 130, 180), + 'lightred' => array(211, 167, 168), + 'lightsteelblue' => array(176, 196, 222), + 'lightblue' => array(173, 216, 230), + 'powderblue' => array(176, 224, 230), + 'paleturquoise' => array(175, 238, 238), + 'darkturquoise' => array(0, 206, 209), + 'mediumturquoise' => array(72, 209, 204), + 'turquoise' => array(64, 224, 208), + 'cyan' => array(0, 255, 255), + 'lightcyan' => array(224, 255, 255), + 'cadetblue' => array(95, 158, 160), + 'mediumaquamarine' => array(102, 205, 170), + 'aquamarine' => array(127, 255, 212), + 'darkgreen' => array(0, 100, 0), + 'darkolivegreen' => array(85, 107, 47), + 'darkseagreen' => array(143, 188, 143), + 'seagreen' => array(46, 139, 87), + 'mediumseagreen' => array(60, 179, 113), + 'lightseagreen' => array(32, 178, 170), + 'palegreen' => array(152, 251, 152), + 'springgreen' => array(0, 255, 127), + 'lawngreen' => array(124, 252, 0), + 'green' => array(0, 255, 0), + 'chartreuse' => array(127, 255, 0), + 'mediumspringgreen' => array(0, 250, 154), + 'greenyellow' => array(173, 255, 47), + 'limegreen' => array(50, 205, 50), + 'yellowgreen' => array(154, 205, 50), + 'forestgreen' => array(34, 139, 34), + 'olivedrab' => array(107, 142, 35), + 'darkkhaki' => array(189, 183, 107), + 'khaki' => array(240, 230, 140), + 'palegoldenrod' => array(238, 232, 170), + 'lightgoldenrodyellow' => array(250, 250, 210), + 'lightyellow' => array(255, 255, 200), + 'yellow' => array(255, 255, 0), + 'gold' => array(255, 215, 0), + 'lightgoldenrod' => array(238, 221, 130), + 'goldenrod' => array(218, 165, 32), + 'darkgoldenrod' => array(184, 134, 11), + 'rosybrown' => array(188, 143, 143), + 'indianred' => array(205, 92, 92), + 'saddlebrown' => array(139, 69, 19), + 'sienna' => array(160, 82, 45), + 'peru' => array(205, 133, 63), + 'burlywood' => array(222, 184, 135), + 'beige' => array(245, 245, 220), + 'wheat' => array(245, 222, 179), + 'sandybrown' => array(244, 164, 96), + 'tan' => array(210, 180, 140), + 'chocolate' => array(210, 105, 30), + 'firebrick' => array(178, 34, 34), + 'brown' => array(165, 42, 42), + 'darksalmon' => array(233, 150, 122), + 'salmon' => array(250, 128, 114), + 'lightsalmon' => array(255, 160, 122), + 'orange' => array(255, 165, 0), + 'darkorange' => array(255, 140, 0), + 'coral' => array(255, 127, 80), + 'lightcoral' => array(240, 128, 128), + 'tomato' => array(255, 99, 71), + 'orangered' => array(255, 69, 0), + 'red' => array(255, 0, 0), + 'hotpink' => array(255, 105, 180), + 'deeppink' => array(255, 20, 147), + 'pink' => array(255, 192, 203), + 'lightpink' => array(255, 182, 193), + 'palevioletred' => array(219, 112, 147), + 'maroon' => array(176, 48, 96), + 'mediumvioletred' => array(199, 21, 133), + 'violetred' => array(208, 32, 144), + 'magenta' => array(255, 0, 255), + 'violet' => array(238, 130, 238), + 'plum' => array(221, 160, 221), + 'orchid' => array(218, 112, 214), + 'mediumorchid' => array(186, 85, 211), + 'darkorchid' => array(153, 50, 204), + 'darkviolet' => array(148, 0, 211), + 'blueviolet' => array(138, 43, 226), + 'purple' => array(160, 32, 240), + 'mediumpurple' => array(147, 112, 219), + 'thistle' => array(216, 191, 216), + 'snow1' => array(255, 250, 250), + 'snow2' => array(238, 233, 233), + 'snow3' => array(205, 201, 201), + 'snow4' => array(139, 137, 137), + 'seashell1' => array(255, 245, 238), + 'seashell2' => array(238, 229, 222), + 'seashell3' => array(205, 197, 191), + 'seashell4' => array(139, 134, 130), + 'AntiqueWhite1' => array(255, 239, 219), + 'AntiqueWhite2' => array(238, 223, 204), + 'AntiqueWhite3' => array(205, 192, 176), + 'AntiqueWhite4' => array(139, 131, 120), + 'bisque1' => array(255, 228, 196), + 'bisque2' => array(238, 213, 183), + 'bisque3' => array(205, 183, 158), + 'bisque4' => array(139, 125, 107), + 'peachPuff1' => array(255, 218, 185), + 'peachpuff2' => array(238, 203, 173), + 'peachpuff3' => array(205, 175, 149), + 'peachpuff4' => array(139, 119, 101), + 'navajowhite1' => array(255, 222, 173), + 'navajowhite2' => array(238, 207, 161), + 'navajowhite3' => array(205, 179, 139), + 'navajowhite4' => array(139, 121, 94), + 'lemonchiffon1' => array(255, 250, 205), + 'lemonchiffon2' => array(238, 233, 191), + 'lemonchiffon3' => array(205, 201, 165), + 'lemonchiffon4' => array(139, 137, 112), + 'ivory1' => array(255, 255, 240), + 'ivory2' => array(238, 238, 224), + 'ivory3' => array(205, 205, 193), + 'ivory4' => array(139, 139, 131), + 'honeydew' => array(193, 205, 193), + 'lavenderblush1' => array(255, 240, 245), + 'lavenderblush2' => array(238, 224, 229), + 'lavenderblush3' => array(205, 193, 197), + 'lavenderblush4' => array(139, 131, 134), + 'mistyrose1' => array(255, 228, 225), + 'mistyrose2' => array(238, 213, 210), + 'mistyrose3' => array(205, 183, 181), + 'mistyrose4' => array(139, 125, 123), + 'azure1' => array(240, 255, 255), + 'azure2' => array(224, 238, 238), + 'azure3' => array(193, 205, 205), + 'azure4' => array(131, 139, 139), + 'slateblue1' => array(131, 111, 255), + 'slateblue2' => array(122, 103, 238), + 'slateblue3' => array(105, 89, 205), + 'slateblue4' => array(71, 60, 139), + 'royalblue1' => array(72, 118, 255), + 'royalblue2' => array(67, 110, 238), + 'royalblue3' => array(58, 95, 205), + 'royalblue4' => array(39, 64, 139), + 'dodgerblue1' => array(30, 144, 255), + 'dodgerblue2' => array(28, 134, 238), + 'dodgerblue3' => array(24, 116, 205), + 'dodgerblue4' => array(16, 78, 139), + 'steelblue1' => array(99, 184, 255), + 'steelblue2' => array(92, 172, 238), + 'steelblue3' => array(79, 148, 205), + 'steelblue4' => array(54, 100, 139), + 'deepskyblue1' => array(0, 191, 255), + 'deepskyblue2' => array(0, 178, 238), + 'deepskyblue3' => array(0, 154, 205), + 'deepskyblue4' => array(0, 104, 139), + 'skyblue1' => array(135, 206, 255), + 'skyblue2' => array(126, 192, 238), + 'skyblue3' => array(108, 166, 205), + 'skyblue4' => array(74, 112, 139), + 'lightskyblue1' => array(176, 226, 255), + 'lightskyblue2' => array(164, 211, 238), + 'lightskyblue3' => array(141, 182, 205), + 'lightskyblue4' => array(96, 123, 139), + 'slategray1' => array(198, 226, 255), + 'slategray2' => array(185, 211, 238), + 'slategray3' => array(159, 182, 205), + 'slategray4' => array(108, 123, 139), + 'lightsteelblue1' => array(202, 225, 255), + 'lightsteelblue2' => array(188, 210, 238), + 'lightsteelblue3' => array(162, 181, 205), + 'lightsteelblue4' => array(110, 123, 139), + 'lightblue1' => array(191, 239, 255), + 'lightblue2' => array(178, 223, 238), + 'lightblue3' => array(154, 192, 205), + 'lightblue4' => array(104, 131, 139), + 'lightcyan1' => array(224, 255, 255), + 'lightcyan2' => array(209, 238, 238), + 'lightcyan3' => array(180, 205, 205), + 'lightcyan4' => array(122, 139, 139), + 'paleturquoise1' => array(187, 255, 255), + 'paleturquoise2' => array(174, 238, 238), + 'paleturquoise3' => array(150, 205, 205), + 'paleturquoise4' => array(102, 139, 139), + 'cadetblue1' => array(152, 245, 255), + 'cadetblue2' => array(142, 229, 238), + 'cadetblue3' => array(122, 197, 205), + 'cadetblue4' => array(83, 134, 139), + 'turquoise1' => array(0, 245, 255), + 'turquoise2' => array(0, 229, 238), + 'turquoise3' => array(0, 197, 205), + 'turquoise4' => array(0, 134, 139), + 'cyan1' => array(0, 255, 255), + 'cyan2' => array(0, 238, 238), + 'cyan3' => array(0, 205, 205), + 'cyan4' => array(0, 139, 139), + 'darkslategray1' => array(151, 255, 255), + 'darkslategray2' => array(141, 238, 238), + 'darkslategray3' => array(121, 205, 205), + 'darkslategray4' => array(82, 139, 139), + 'aquamarine1' => array(127, 255, 212), + 'aquamarine2' => array(118, 238, 198), + 'aquamarine3' => array(102, 205, 170), + 'aquamarine4' => array(69, 139, 116), + 'darkseagreen1' => array(193, 255, 193), + 'darkseagreen2' => array(180, 238, 180), + 'darkseagreen3' => array(155, 205, 155), + 'darkseagreen4' => array(105, 139, 105), + 'seagreen1' => array(84, 255, 159), + 'seagreen2' => array(78, 238, 148), + 'seagreen3' => array(67, 205, 128), + 'seagreen4' => array(46, 139, 87), + 'palegreen1' => array(154, 255, 154), + 'palegreen2' => array(144, 238, 144), + 'palegreen3' => array(124, 205, 124), + 'palegreen4' => array(84, 139, 84), + 'springgreen1' => array(0, 255, 127), + 'springgreen2' => array(0, 238, 118), + 'springgreen3' => array(0, 205, 102), + 'springgreen4' => array(0, 139, 69), + 'chartreuse1' => array(127, 255, 0), + 'chartreuse2' => array(118, 238, 0), + 'chartreuse3' => array(102, 205, 0), + 'chartreuse4' => array(69, 139, 0), + 'olivedrab1' => array(192, 255, 62), + 'olivedrab2' => array(179, 238, 58), + 'olivedrab3' => array(154, 205, 50), + 'olivedrab4' => array(105, 139, 34), + 'darkolivegreen1' => array(202, 255, 112), + 'darkolivegreen2' => array(188, 238, 104), + 'darkolivegreen3' => array(162, 205, 90), + 'darkolivegreen4' => array(110, 139, 61), + 'khaki1' => array(255, 246, 143), + 'khaki2' => array(238, 230, 133), + 'khaki3' => array(205, 198, 115), + 'khaki4' => array(139, 134, 78), + 'lightgoldenrod1' => array(255, 236, 139), + 'lightgoldenrod2' => array(238, 220, 130), + 'lightgoldenrod3' => array(205, 190, 112), + 'lightgoldenrod4' => array(139, 129, 76), + 'yellow1' => array(255, 255, 0), + 'yellow2' => array(238, 238, 0), + 'yellow3' => array(205, 205, 0), + 'yellow4' => array(139, 139, 0), + 'gold1' => array(255, 215, 0), + 'gold2' => array(238, 201, 0), + 'gold3' => array(205, 173, 0), + 'gold4' => array(139, 117, 0), + 'goldenrod1' => array(255, 193, 37), + 'goldenrod2' => array(238, 180, 34), + 'goldenrod3' => array(205, 155, 29), + 'goldenrod4' => array(139, 105, 20), + 'darkgoldenrod1' => array(255, 185, 15), + 'darkgoldenrod2' => array(238, 173, 14), + 'darkgoldenrod3' => array(205, 149, 12), + 'darkgoldenrod4' => array(139, 101, 8), + 'rosybrown1' => array(255, 193, 193), + 'rosybrown2' => array(238, 180, 180), + 'rosybrown3' => array(205, 155, 155), + 'rosybrown4' => array(139, 105, 105), + 'indianred1' => array(255, 106, 106), + 'indianred2' => array(238, 99, 99), + 'indianred3' => array(205, 85, 85), + 'indianred4' => array(139, 58, 58), + 'sienna1' => array(255, 130, 71), + 'sienna2' => array(238, 121, 66), + 'sienna3' => array(205, 104, 57), + 'sienna4' => array(139, 71, 38), + 'burlywood1' => array(255, 211, 155), + 'burlywood2' => array(238, 197, 145), + 'burlywood3' => array(205, 170, 125), + 'burlywood4' => array(139, 115, 85), + 'wheat1' => array(255, 231, 186), + 'wheat2' => array(238, 216, 174), + 'wheat3' => array(205, 186, 150), + 'wheat4' => array(139, 126, 102), + 'tan1' => array(255, 165, 79), + 'tan2' => array(238, 154, 73), + 'tan3' => array(205, 133, 63), + 'tan4' => array(139, 90, 43), + 'chocolate1' => array(255, 127, 36), + 'chocolate2' => array(238, 118, 33), + 'chocolate3' => array(205, 102, 29), + 'chocolate4' => array(139, 69, 19), + 'firebrick1' => array(255, 48, 48), + 'firebrick2' => array(238, 44, 44), + 'firebrick3' => array(205, 38, 38), + 'firebrick4' => array(139, 26, 26), + 'brown1' => array(255, 64, 64), + 'brown2' => array(238, 59, 59), + 'brown3' => array(205, 51, 51), + 'brown4' => array(139, 35, 35), + 'salmon1' => array(255, 140, 105), + 'salmon2' => array(238, 130, 98), + 'salmon3' => array(205, 112, 84), + 'salmon4' => array(139, 76, 57), + 'lightsalmon1' => array(255, 160, 122), + 'lightsalmon2' => array(238, 149, 114), + 'lightsalmon3' => array(205, 129, 98), + 'lightsalmon4' => array(139, 87, 66), + 'orange1' => array(255, 165, 0), + 'orange2' => array(238, 154, 0), + 'orange3' => array(205, 133, 0), + 'orange4' => array(139, 90, 0), + 'darkorange1' => array(255, 127, 0), + 'darkorange2' => array(238, 118, 0), + 'darkorange3' => array(205, 102, 0), + 'darkorange4' => array(139, 69, 0), + 'coral1' => array(255, 114, 86), + 'coral2' => array(238, 106, 80), + 'coral3' => array(205, 91, 69), + 'coral4' => array(139, 62, 47), + 'tomato1' => array(255, 99, 71), + 'tomato2' => array(238, 92, 66), + 'tomato3' => array(205, 79, 57), + 'tomato4' => array(139, 54, 38), + 'orangered1' => array(255, 69, 0), + 'orangered2' => array(238, 64, 0), + 'orangered3' => array(205, 55, 0), + 'orangered4' => array(139, 37, 0), + 'deeppink1' => array(255, 20, 147), + 'deeppink2' => array(238, 18, 137), + 'deeppink3' => array(205, 16, 118), + 'deeppink4' => array(139, 10, 80), + 'hotpink1' => array(255, 110, 180), + 'hotpink2' => array(238, 106, 167), + 'hotpink3' => array(205, 96, 144), + 'hotpink4' => array(139, 58, 98), + 'pink1' => array(255, 181, 197), + 'pink2' => array(238, 169, 184), + 'pink3' => array(205, 145, 158), + 'pink4' => array(139, 99, 108), + 'lightpink1' => array(255, 174, 185), + 'lightpink2' => array(238, 162, 173), + 'lightpink3' => array(205, 140, 149), + 'lightpink4' => array(139, 95, 101), + 'palevioletred1' => array(255, 130, 171), + 'palevioletred2' => array(238, 121, 159), + 'palevioletred3' => array(205, 104, 137), + 'palevioletred4' => array(139, 71, 93), + 'maroon1' => array(255, 52, 179), + 'maroon2' => array(238, 48, 167), + 'maroon3' => array(205, 41, 144), + 'maroon4' => array(139, 28, 98), + 'violetred1' => array(255, 62, 150), + 'violetred2' => array(238, 58, 140), + 'violetred3' => array(205, 50, 120), + 'violetred4' => array(139, 34, 82), + 'magenta1' => array(255, 0, 255), + 'magenta2' => array(238, 0, 238), + 'magenta3' => array(205, 0, 205), + 'magenta4' => array(139, 0, 139), + 'mediumred' => array(140, 34, 34), + 'orchid1' => array(255, 131, 250), + 'orchid2' => array(238, 122, 233), + 'orchid3' => array(205, 105, 201), + 'orchid4' => array(139, 71, 137), + 'plum1' => array(255, 187, 255), + 'plum2' => array(238, 174, 238), + 'plum3' => array(205, 150, 205), + 'plum4' => array(139, 102, 139), + 'mediumorchid1' => array(224, 102, 255), + 'mediumorchid2' => array(209, 95, 238), + 'mediumorchid3' => array(180, 82, 205), + 'mediumorchid4' => array(122, 55, 139), + 'darkorchid1' => array(191, 62, 255), + 'darkorchid2' => array(178, 58, 238), + 'darkorchid3' => array(154, 50, 205), + 'darkorchid4' => array(104, 34, 139), + 'purple1' => array(155, 48, 255), + 'purple2' => array(145, 44, 238), + 'purple3' => array(125, 38, 205), + 'purple4' => array(85, 26, 139), + 'mediumpurple1' => array(171, 130, 255), + 'mediumpurple2' => array(159, 121, 238), + 'mediumpurple3' => array(137, 104, 205), + 'mediumpurple4' => array(93, 71, 139), + 'thistle1' => array(255, 225, 255), + 'thistle2' => array(238, 210, 238), + 'thistle3' => array(205, 181, 205), + 'thistle4' => array(139, 123, 139), + 'gray1' => array(10, 10, 10), + 'gray2' => array(40, 40, 30), + 'gray3' => array(70, 70, 70), + 'gray4' => array(100, 100, 100), + 'gray5' => array(130, 130, 130), + 'gray6' => array(160, 160, 160), + 'gray7' => array(190, 190, 190), + 'gray8' => array(210, 210, 210), + 'gray9' => array(240, 240, 240), + 'darkgray' => array(100, 100, 100), + 'darkblue' => array(0, 0, 139), + 'darkcyan' => array(0, 139, 139), + 'darkmagenta' => array(139, 0, 139), + 'darkred' => array(139, 0, 0), + 'silver' => array(192, 192, 192), + 'eggplant' => array(144, 176, 168), + 'lightgreen' => array(144, 238, 144)); + } + + //---------------- + // PUBLIC METHODS + // Colors can be specified as either + // 1. #xxxxxx HTML style + // 2. "colorname" as a named color + // 3. array(r,g,b) RGB triple + // This function translates this to a native RGB format and returns an + // RGB triple. + + public function Color($aColor) + { + if (is_string($aColor)) { + $matches = array(); + // this regex will parse a color string and fill the $matches array as such: + // 0: the full match if any + // 1: a hex string preceded by a hash, can be 3 characters (#fff) or 6 (#ffffff) (4 or 5 also accepted but...) + // 2,3,4: r,g,b values in hex if the first character of the string is # + // 5: all alpha-numeric characters at the beginning of the string if string does not start with # + // 6: alpha value prefixed by @ if supplied + // 7: alpha value with @ stripped + // 8: adjust value prefixed with : if supplied + // 9: adjust value with : stripped + $regex = '/(#([0-9a-fA-F]{1,2})([0-9a-fA-F]{1,2})([0-9a-fA-F]{1,2}))?([\w]+)?(@([\d\.,]+))?(:([\d\.,]+))?/'; + if (!preg_match($regex, $aColor, $matches)) { + Util\JpGraphError::RaiseL(25078, $aColor); //(" Unknown color: $aColor"); + } + if (empty($matches[5])) { + $r = strlen($matches[2]) == 1 ? $matches[2] . $matches[2] : $matches[2]; + $g = strlen($matches[3]) == 1 ? $matches[3] . $matches[3] : $matches[3]; + $b = strlen($matches[4]) == 1 ? $matches[4] . $matches[4] : $matches[4]; + $r = hexdec($r); + $g = hexdec($g); + $b = hexdec($b); + } else { + if (!isset($this->rgb_table[$matches[5]])) { + Util\JpGraphError::RaiseL(25078, $aColor); //(" Unknown color: $aColor"); + } + $r = $this->rgb_table[$matches[5]][0]; + $g = $this->rgb_table[$matches[5]][1]; + $b = $this->rgb_table[$matches[5]][2]; + } + $alpha = isset($matches[7]) ? str_replace(',', '.', $matches[7]) : 0; + $adj = isset($matches[9]) ? str_replace(',', '.', $matches[9]) : 1.0; + + if ($adj < 0) { + Util\JpGraphError::RaiseL(25077); //('Adjustment factor for color must be > 0'); + } + + // Scale adj so that an adj=2 always + // makes the color 100% white (i.e. 255,255,255. + // and adj=1 neutral and adj=0 black. + if ($adj == 1) { + return array($r, $g, $b, $alpha); + } elseif ($adj > 1) { + $m = ($adj - 1.0) * (255 - min(255, min($r, min($g, $b)))); + return array(min(255, $r + $m), min(255, $g + $m), min(255, $b + $m), $alpha); + } elseif ($adj < 1) { + $m = ($adj - 1.0) * max(255, max($r, max($g, $b))); + return array(max(0, $r + $m), max(0, $g + $m), max(0, $b + $m), $alpha); + } + } elseif (is_array($aColor)) { + if (!isset($aColor[3])) { + $aColor[3] = 0; + } + + return $aColor; + } else { + Util\JpGraphError::RaiseL(25079, $aColor, count($aColor)); //(" Unknown color specification: $aColor , size=".count($aColor)); + } + } + + // Compare two colors + // return true if equal + public function Equal($aCol1, $aCol2) + { + $c1 = $this->Color($aCol1); + $c2 = $this->Color($aCol2); + return $c1[0] == $c2[0] && $c1[1] == $c2[1] && $c1[2] == $c2[2]; + } + + // Allocate a new color in the current image + // Return new color index, -1 if no more colors could be allocated + public function Allocate($aColor, $aAlpha = 0.0) + { + list($r, $g, $b, $a) = $this->color($aColor); + // If alpha is specified in the color string then this + // takes precedence over the second argument + if ($a > 0) { + $aAlpha = $a; + } + if ($aAlpha < 0 || $aAlpha > 1) { + Util\JpGraphError::RaiseL(25080); //('Alpha parameter for color must be between 0.0 and 1.0'); + } + return imagecolorresolvealpha($this->img, $r, $g, $b, round($aAlpha * 127)); + } + + // Try to convert an array with three valid numbers to the corresponding hex array + // This is currenly only used in processing the colors for barplots in order to be able + // to handle the case where the color might be specified as an array of colros as well. + // In that case we must be able to find out if an array of values should be interpretated as + // a single color (specifeid as an RGB triple) + public static function tryHexConversion($aColor) + { + if (is_array($aColor)) { + if (count($aColor) == 3) { + if (is_numeric($aColor[0]) && is_numeric($aColor[1]) && is_numeric($aColor[2])) { + if (($aColor[0] >= 0 && $aColor[0] <= 255) && + ($aColor[1] >= 0 && $aColor[1] <= 255) && + ($aColor[2] >= 0 && $aColor[2] <= 255)) { + return sprintf('#%02x%02x%02x', $aColor[0], $aColor[1], $aColor[2]); + } + } + } + } + return $aColor; + } + + // Return a RGB tripple corresponding to a position in the normal light spectrum + // The argumen values is in the range [0, 1] where a value of 0 correponds to blue and + // a value of 1 corresponds to red. Values in betwen is mapped to a linear interpolation + // of the constituting colors in the visible color spectra. + // The $aDynamicRange specified how much of the dynamic range we shold use + // a value of 1.0 give the full dyanmic range and a lower value give more dark + // colors. In the extreme of 0.0 then all colors will be black. + public static function GetSpectrum($aVal, $aDynamicRange = 1.0) + { + if ($aVal < 0 || $aVal > 1.0001) { + return array(0, 0, 0); // Invalid case - just return black + } + + $sat = round(255 * $aDynamicRange); + $a = 0.25; + if ($aVal <= 0.25) { + return array(0, round($sat * $aVal / $a), $sat); + } elseif ($aVal <= 0.5) { + return array(0, $sat, round($sat - $sat * ($aVal - 0.25) / $a)); + } elseif ($aVal <= 0.75) { + return array(round($sat * ($aVal - 0.5) / $a), $sat, 0); + } else { + return array($sat, round($sat - $sat * ($aVal - 0.75) / $a), 0); + } + } + +} // Class diff --git a/vendor/amenadiel/jpgraph/src/image/RotImage.php b/vendor/amenadiel/jpgraph/src/image/RotImage.php new file mode 100644 index 0000000000..9d24f2df61 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/image/RotImage.php @@ -0,0 +1,187 @@ +dx = $this->left_margin + $this->plotwidth / 2; + $this->dy = $this->top_margin + $this->plotheight / 2; + $this->SetAngle($a); + } + + public function SetCenter($dx, $dy) + { + $old_dx = $this->dx; + $old_dy = $this->dy; + $this->dx = $dx; + $this->dy = $dy; + $this->SetAngle($this->a); + return array($old_dx, $old_dy); + } + + public function SetTranslation($dx, $dy) + { + $old = array($this->transx, $this->transy); + $this->transx = $dx; + $this->transy = $dy; + return $old; + } + + public function UpdateRotMatrice() + { + $a = $this->a; + $a *= M_PI / 180; + $sa = sin($a); + $ca = cos($a); + // Create the rotation matrix + $this->m[0][0] = $ca; + $this->m[0][1] = -$sa; + $this->m[0][2] = $this->dx * (1 - $ca) + $sa * $this->dy; + $this->m[1][0] = $sa; + $this->m[1][1] = $ca; + $this->m[1][2] = $this->dy * (1 - $ca) - $sa * $this->dx; + } + + public function SetAngle($a) + { + $tmp = $this->a; + $this->a = $a; + $this->UpdateRotMatrice(); + return $tmp; + } + + public function Circle($xc, $yc, $r) + { + list($xc, $yc) = $this->Rotate($xc, $yc); + parent::Circle($xc, $yc, $r); + } + + public function FilledCircle($xc, $yc, $r) + { + list($xc, $yc) = $this->Rotate($xc, $yc); + parent::FilledCircle($xc, $yc, $r); + } + + public function Arc($xc, $yc, $w, $h, $s, $e) + { + list($xc, $yc) = $this->Rotate($xc, $yc); + $s += $this->a; + $e += $this->a; + parent::Arc($xc, $yc, $w, $h, $s, $e); + } + + public function FilledArc($xc, $yc, $w, $h, $s, $e, $style = '') + { + list($xc, $yc) = $this->Rotate($xc, $yc); + $s += $this->a; + $e += $this->a; + parent::FilledArc($xc, $yc, $w, $h, $s, $e); + } + + public function SetMargin($lm, $rm, $tm, $bm) + { + parent::SetMargin($lm, $rm, $tm, $bm); + $this->dx = $this->left_margin + $this->plotwidth / 2; + $this->dy = $this->top_margin + $this->plotheight / 2; + $this->UpdateRotMatrice(); + } + + public function Rotate($x, $y) + { + // Optimization. Ignore rotation if Angle==0 || Angle==360 + if ($this->a == 0 || $this->a == 360) { + return array($x + $this->transx, $y + $this->transy); + } else { + $x1 = round($this->m[0][0] * $x + $this->m[0][1] * $y, 1) + $this->m[0][2] + $this->transx; + $y1 = round($this->m[1][0] * $x + $this->m[1][1] * $y, 1) + $this->m[1][2] + $this->transy; + return array($x1, $y1); + } + } + + public function CopyMerge($fromImg, $toX, $toY, $fromX, $fromY, $toWidth, $toHeight, $fromWidth = -1, $fromHeight = -1, $aMix = 100) + { + list($toX, $toY) = $this->Rotate($toX, $toY); + parent::CopyMerge($fromImg, $toX, $toY, $fromX, $fromY, $toWidth, $toHeight, $fromWidth, $fromHeight, $aMix); + + } + + public function ArrRotate($pnts) + { + $n = count($pnts) - 1; + for ($i = 0; $i < $n; $i += 2) { + list($x, $y) = $this->Rotate($pnts[$i], $pnts[$i + 1]); + $pnts[$i] = $x; + $pnts[$i + 1] = $y; + } + return $pnts; + } + + public function DashedLine($x1, $y1, $x2, $y2, $dash_length = 1, $dash_space = 4) + { + list($x1, $y1) = $this->Rotate($x1, $y1); + list($x2, $y2) = $this->Rotate($x2, $y2); + parent::DashedLine($x1, $y1, $x2, $y2, $dash_length, $dash_space); + } + + public function Line($x1, $y1, $x2, $y2) + { + list($x1, $y1) = $this->Rotate($x1, $y1); + list($x2, $y2) = $this->Rotate($x2, $y2); + parent::Line($x1, $y1, $x2, $y2); + } + + public function Rectangle($x1, $y1, $x2, $y2) + { + // Rectangle uses Line() so it will be rotated through that call + parent::Rectangle($x1, $y1, $x2, $y2); + } + + public function FilledRectangle($x1, $y1, $x2, $y2) + { + if ($y1 == $y2 || $x1 == $x2) { + $this->Line($x1, $y1, $x2, $y2); + } else { + $this->FilledPolygon(array($x1, $y1, $x2, $y1, $x2, $y2, $x1, $y2)); + } + + } + + public function Polygon($pnts, $closed = false, $fast = false) + { + // Polygon uses Line() so it will be rotated through that call unless + // fast drawing routines are used in which case a rotate is needed + if ($fast) { + parent::Polygon($this->ArrRotate($pnts)); + } else { + parent::Polygon($pnts, $closed, $fast); + } + } + + public function FilledPolygon($pnts) + { + parent::FilledPolygon($this->ArrRotate($pnts)); + } + + public function Point($x, $y) + { + list($xp, $yp) = $this->Rotate($x, $y); + parent::Point($xp, $yp); + } + + public function StrokeText($x, $y, $txt, $dir = 0, $paragraph_align = "left", $debug = false) + { + list($xp, $yp) = $this->Rotate($x, $y); + return parent::StrokeText($xp, $yp, $txt, $dir, $paragraph_align, $debug); + } +} diff --git a/vendor/amenadiel/jpgraph/src/includes/imageSmoothArc.php b/vendor/amenadiel/jpgraph/src/includes/imageSmoothArc.php new file mode 100644 index 0000000000..a1d581ff4d --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/includes/imageSmoothArc.php @@ -0,0 +1,344 @@ += abs($yStart)) { + $aaStartX = true; + } else { + $aaStartX = false; + } + if ($xStop >= $yStop) { + $aaStopX = true; + } else { + $aaStopX = false; + } + //$xp = +1; $yp = -1; $xa = +1; $ya = 0; + for ( $x = 0; $x < $a; $x += 1 ) { + /*$y = $b * sqrt( 1 - ($x*$x)/($a*$a) ); + + $error = $y - (int)($y); + $y = (int)($y); + + $diffColor = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error );*/ + + $_y1 = $dyStop*$x; + $_y2 = $dyStart*$x; + if ($xStart > $xStop) + { + $error1 = $_y1 - (int)($_y1); + $error2 = 1 - $_y2 + (int)$_y2; + $_y1 = $_y1-$error1; + $_y2 = $_y2+$error2; + } + else + { + $error1 = 1 - $_y1 + (int)$_y1; + $error2 = $_y2 - (int)($_y2); + $_y1 = $_y1+$error1; + $_y2 = $_y2-$error2; + } + /* + if ($aaStopX) + $diffColor1 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error1 ); + if ($aaStartX) + $diffColor2 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error2 ); + */ + + if ($seg == 0 || $seg == 2) + { + $i = $seg; + if (!($start > $i*M_PI/2 && $x > $xStart)) { + if ($i == 0) { + $xp = +1; $yp = -1; $xa = +1; $ya = 0; + } else { + $xp = -1; $yp = +1; $xa = 0; $ya = +1; + } + if ( $stop < ($i+1)*(M_PI/2) && $x <= $xStop ) { + $diffColor1 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error1 ); + $y1 = $_y1; if ($aaStopX) imageSetPixel($img, $cx+$xp*($x)+$xa, $cy+$yp*($y1+1)+$ya, $diffColor1); + + } else { + $y = $b * sqrt( 1 - ($x*$x)/($a*$a) ); + $error = $y - (int)($y); + $y = (int)($y); + $diffColor = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error ); + $y1 = $y; if ($x < $aaAngleX ) imageSetPixel($img, $cx+$xp*$x+$xa, $cy+$yp*($y1+1)+$ya, $diffColor); + } + if ($start > $i*M_PI/2 && $x <= $xStart) { + $diffColor2 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error2 ); + $y2 = $_y2; if ($aaStartX) imageSetPixel($img, $cx+$xp*$x+$xa, $cy+$yp*($y2-1)+$ya, $diffColor2); + } else { + $y2 = 0; + } + if ($y2 <= $y1) imageLine($img, $cx+$xp*$x+$xa, $cy+$yp*$y1+$ya , $cx+$xp*$x+$xa, $cy+$yp*$y2+$ya, $fillColor); + } + } + + if ($seg == 1 || $seg == 3) + { + $i = $seg; + if (!($stop < ($i+1)*M_PI/2 && $x > $xStop)) { + if ($i == 1) { + $xp = -1; $yp = -1; $xa = 0; $ya = 0; + } else { + $xp = +1; $yp = +1; $xa = 1; $ya = 1; + } + if ( $start > $i*M_PI/2 && $x < $xStart ) { + $diffColor2 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error2 ); + $y1 = $_y2; if ($aaStartX) imageSetPixel($img, $cx+$xp*$x+$xa, $cy+$yp*($y1+1)+$ya, $diffColor2); + + } else { + $y = $b * sqrt( 1 - ($x*$x)/($a*$a) ); + $error = $y - (int)($y); + $y = (int) $y; + $diffColor = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error ); + $y1 = $y; if ($x < $aaAngleX ) imageSetPixel($img, $cx+$xp*$x+$xa, $cy+$yp*($y1+1)+$ya, $diffColor); + } + if ($stop < ($i+1)*M_PI/2 && $x <= $xStop) { + $diffColor1 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error1 ); + $y2 = $_y1; if ($aaStopX) imageSetPixel($img, $cx+$xp*$x+$xa, $cy+$yp*($y2-1)+$ya, $diffColor1); + } else { + $y2 = 0; + } + if ($y2 <= $y1) imageLine($img, $cx+$xp*$x+$xa, $cy+$yp*$y1+$ya, $cx+$xp*$x+$xa, $cy+$yp*$y2+$ya, $fillColor); + } + } + } + + ///YYYYY + + for ( $y = 0; $y < $b; $y += 1 ) { + /*$x = $a * sqrt( 1 - ($y*$y)/($b*$b) ); + + $error = $x - (int)($x); + $x = (int)($x); + + $diffColor = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error ); + */ + $_x1 = $dxStop*$y; + $_x2 = $dxStart*$y; + if ($yStart > $yStop) + { + $error1 = $_x1 - (int)($_x1); + $error2 = 1 - $_x2 + (int)$_x2; + $_x1 = $_x1-$error1; + $_x2 = $_x2+$error2; + } + else + { + $error1 = 1 - $_x1 + (int)$_x1; + $error2 = $_x2 - (int)($_x2); + $_x1 = $_x1+$error1; + $_x2 = $_x2-$error2; + } +/* + if (!$aaStopX) + $diffColor1 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error1 ); + if (!$aaStartX) + $diffColor2 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error2 ); +*/ + + if ($seg == 0 || $seg == 2) + { + $i = $seg; + if (!($start > $i*M_PI/2 && $y > $yStop)) { + if ($i == 0) { + $xp = +1; $yp = -1; $xa = 1; $ya = 0; + } else { + $xp = -1; $yp = +1; $xa = 0; $ya = 1; + } + if ( $stop < ($i+1)*(M_PI/2) && $y <= $yStop ) { + $diffColor1 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error1 ); + $x1 = $_x1; if (!$aaStopX) imageSetPixel($img, $cx+$xp*($x1-1)+$xa, $cy+$yp*($y)+$ya, $diffColor1); + } + if ($start > $i*M_PI/2 && $y < $yStart) { + $diffColor2 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error2 ); + $x2 = $_x2; if (!$aaStartX) imageSetPixel($img, $cx+$xp*($x2+1)+$xa, $cy+$yp*($y)+$ya, $diffColor2); + } else { + $x = $a * sqrt( 1 - ($y*$y)/($b*$b) ); + $error = $x - (int)($x); + $x = (int)($x); + $diffColor = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error ); + $x1 = $x; if ($y < $aaAngleY && $y <= $yStop ) imageSetPixel($img, $cx+$xp*($x1+1)+$xa, $cy+$yp*$y+$ya, $diffColor); + } + } + } + + if ($seg == 1 || $seg == 3) + { + $i = $seg; + if (!($stop < ($i+1)*M_PI/2 && $y > $yStart)) { + if ($i == 1) { + $xp = -1; $yp = -1; $xa = 0; $ya = 0; + } else { + $xp = +1; $yp = +1; $xa = 1; $ya = 1; + } + if ( $start > $i*M_PI/2 && $y < $yStart ) { + $diffColor2 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error2 ); + $x1 = $_x2; if (!$aaStartX) imageSetPixel($img, $cx+$xp*($x1-1)+$xa, $cy+$yp*$y+$ya, $diffColor2); + } + if ($stop < ($i+1)*M_PI/2 && $y <= $yStop) { + $diffColor1 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error1 ); + $x2 = $_x1; if (!$aaStopX) imageSetPixel($img, $cx+$xp*($x2+1)+$xa, $cy+$yp*$y+$ya, $diffColor1); + } else { + $x = $a * sqrt( 1 - ($y*$y)/($b*$b) ); + $error = $x - (int)($x); + $x = (int)($x); + $diffColor = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error ); + $x1 = $x; if ($y < $aaAngleY && $y < $yStart) imageSetPixel($img,$cx+$xp*($x1+1)+$xa, $cy+$yp*$y+$ya, $diffColor); + } + } + } + } +} + + +function imageSmoothArc ( &$img, $cx, $cy, $w, $h, $color, $start, $stop) +{ + // Originally written from scratch by Ulrich Mierendorff, 06/2006 + // Rewritten and improved, 04/2007, 07/2007 + // compared to old version: + // + Support for transparency added + // + Improved quality of edges & antialiasing + + // note: This function does not represent the fastest way to draw elliptical + // arcs. It was written without reading any papers on that subject. Better + // algorithms may be twice as fast or even more. + + // what it cannot do: It does not support outlined arcs, only filled + + // Parameters: + // $cx - Center of ellipse, X-coord + // $cy - Center of ellipse, Y-coord + // $w - Width of ellipse ($w >= 2) + // $h - Height of ellipse ($h >= 2 ) + // $color - Color of ellipse as a four component array with RGBA + // $start - Starting angle of the arc, no limited range! + // $stop - Stop angle of the arc, no limited range! + // $start _can_ be greater than $stop! + // If any value is not in the given range, results are undefined! + + // This script does not use any special algorithms, everything is completely + // written from scratch; see http://de.wikipedia.org/wiki/Ellipse for formulas. + + while ($start < 0) + $start += 2*M_PI; + while ($stop < 0) + $stop += 2*M_PI; + + while ($start > 2*M_PI) + $start -= 2*M_PI; + + while ($stop > 2*M_PI) + $stop -= 2*M_PI; + + + if ($start > $stop) + { + imageSmoothArc ( $img, $cx, $cy, $w, $h, $color, $start, 2*M_PI); + imageSmoothArc ( $img, $cx, $cy, $w, $h, $color, 0, $stop); + return; + } + + $a = 1.0*round ($w/2); + $b = 1.0*round ($h/2); + $cx = 1.0*round ($cx); + $cy = 1.0*round ($cy); + + $aaAngle = atan(($b*$b)/($a*$a)*tan(0.25*M_PI)); + $aaAngleX = $a*cos($aaAngle); + $aaAngleY = $b*sin($aaAngle); + + $a -= 0.5; // looks better... + $b -= 0.5; + + for ($i=0; $i<4;$i++) + { + if ($start < ($i+1)*M_PI/2) + { + if ($start > $i*M_PI/2) + { + if ($stop > ($i+1)*M_PI/2) + { + imageSmoothArcDrawSegment($img, $cx, $cy, $a, $b, $aaAngleX, $aaAngleY , $color, $start, ($i+1)*M_PI/2, $i); + } + else + { + imageSmoothArcDrawSegment($img, $cx, $cy, $a, $b, $aaAngleX, $aaAngleY, $color, $start, $stop, $i); + break; + } + } + else + { + if ($stop > ($i+1)*M_PI/2) + { + imageSmoothArcDrawSegment($img, $cx, $cy, $a, $b, $aaAngleX, $aaAngleY, $color, $i*M_PI/2, ($i+1)*M_PI/2, $i); + } + else + { + imageSmoothArcDrawSegment($img, $cx, $cy, $a, $b, $aaAngleX, $aaAngleY, $color, $i*M_PI/2, $stop, $i); + break; + } + } + } + } +} +?> diff --git a/vendor/amenadiel/jpgraph/src/includes/jpg-config.inc.php b/vendor/amenadiel/jpgraph/src/includes/jpg-config.inc.php new file mode 100644 index 0000000000..5c55f6b3ff --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/includes/jpg-config.inc.php @@ -0,0 +1,135 @@ +Get(11, $file, $lineno); + die($msg); + } else { + define('CACHE_DIR', $_SERVER['TEMP'] . '/'); + } + } else { + define('CACHE_DIR', '/tmp/jpgraph_cache/'); + } + } +} elseif (!defined('CACHE_DIR')) { + define('CACHE_DIR', ''); +} + +// +// Setup path for western/latin TTF fonts +// +if (!defined('TTF_DIR')) { + if (strstr(PHP_OS, 'WIN')) { + $sroot = getenv('SystemRoot'); + if (empty($sroot)) { + $t = new ErrMsgText(); + $msg = $t->Get(12, $file, $lineno); + die($msg); + } else { + define('TTF_DIR', $sroot . '/fonts/'); + } + } else { + define('TTF_DIR', '/usr/share/fonts/truetype/'); + } +} + +// +// Setup path for MultiByte TTF fonts (japanese, chinese etc.) +// +if (!defined('MBTTF_DIR')) { + if (strstr(PHP_OS, 'WIN')) { + $sroot = getenv('SystemRoot'); + if (empty($sroot)) { + $t = new ErrMsgText(); + $msg = $t->Get(12, $file, $lineno); + die($msg); + } else { + define('MBTTF_DIR', $sroot . '/fonts/'); + } + } else { + define('MBTTF_DIR', '/usr/share/fonts/truetype/'); + } +} + +// +// Check minimum PHP version +// +function CheckPHPVersion($aMinVersion) +{ + return version_compare(PHP_VERSION, $aMinVersion) >= 0; +} + +// +// Make sure PHP version is high enough +// +if (!CheckPHPVersion(MIN_PHPVERSION)) { + Amenadiel\JpGraph\Util\JpGraphError::RaiseL(13, PHP_VERSION, MIN_PHPVERSION); + die(); +} + +// +// Make GD sanity check +// +if (!function_exists("imagetypes") || !function_exists('imagecreatefromstring')) { + Amenadiel\JpGraph\Util\JpGraphError::RaiseL(25001); + //("This PHP installation is not configured with the GD library. Please recompile PHP with GD support to run JpGraph. (Neither function imagetypes() nor imagecreatefromstring() does exist)"); +} + +// +// Setup PHP error handler +// +function _phpErrorHandler($errno, $errmsg, $filename, $linenum, $vars) +{ + // Respect current error level + if ($errno & error_reporting()) { + Amenadiel\JpGraph\Util\JpGraphError::RaiseL(25003, basename($filename), $linenum, $errmsg); + } +} + +if (INSTALL_PHP_ERR_HANDLER) { + set_error_handler("_phpErrorHandler"); +} + +// +// Check if there were any warnings, perhaps some wrong includes by the user. In this +// case we raise it immediately since otherwise the image will not show and makes +// debugging difficult. This is controlled by the user setting CATCH_PHPERRMSG +// +if (isset($GLOBALS['php_errormsg']) && CATCH_PHPERRMSG && !preg_match('/|Deprecated|/i', $GLOBALS['php_errormsg'])) { + Amenadiel\JpGraph\Util\JpGraphError::RaiseL(25004, $GLOBALS['php_errormsg']); +} + +// Useful mathematical function +function sign($a) +{return $a >= 0 ? 1 : -1;} + +// +// Utility function to generate an image name based on the filename we +// are running from and assuming we use auto detection of graphic format +// (top level), i.e it is safe to call this function +// from a script that uses JpGraph +// +function GenImgName() +{ + // Determine what format we should use when we save the images + $supported = imagetypes(); + if ($supported & IMG_PNG) { + $img_format = "png"; + } elseif ($supported & IMG_GIF) { + $img_format = "gif"; + } elseif ($supported & IMG_JPG) { + $img_format = "jpeg"; + } elseif ($supported & IMG_WBMP) { + $img_format = "wbmp"; + } elseif ($supported & IMG_XPM) { + $img_format = "xpm"; + } + + if (!isset($_SERVER['PHP_SELF'])) { + Amenadiel\JpGraph\Util\JpGraphError::RaiseL(25005); + //(" Can't access PHP_SELF, PHP global variable. You can't run PHP from command line if you want to use the 'auto' naming of cache or image files."); + } + $fname = basename($_SERVER['PHP_SELF']); + if (!empty($_SERVER['QUERY_STRING'])) { + $q = @$_SERVER['QUERY_STRING']; + $fname .= '_' . preg_replace("/\W/", "_", $q) . '.' . $img_format; + } else { + $fname = substr($fname, 0, strlen($fname) - 4) . '.' . $img_format; + } + return $fname; +} + +global $gDateLocale; +// Global object handlers +$gDateLocale = new Amenadiel\JpGraph\Util\DateLocale(); +$gJpgDateLocale = new Amenadiel\JpGraph\Util\DateLocale(); + +// diff --git a/vendor/amenadiel/jpgraph/src/includes/jpgraph_ttf.inc.php b/vendor/amenadiel/jpgraph/src/includes/jpgraph_ttf.inc.php new file mode 100644 index 0000000000..f6544efe8e --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/includes/jpgraph_ttf.inc.php @@ -0,0 +1,148 @@ +digits['6'][0] = 645; + $this->digits['6'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg' . + 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAEBAAMBAAAAAAAAAAAAAAAABgMEBwX/xAAvEAABAwMC' . + 'BAQEBwAAAAAAAAABAgMEAAURBiESIjFRBxMUQRUWMmFTYnGRkrHC/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAEC/8QAFhEBAQEAAAAA' . + 'AAAAAAAAAAAAAAER/9oADAMBAAIRAxEAPwDslwiR3oDku8ONttsAvDiVyMcO/ET7ke5/aoOz6k1Vr5htNjW7a7M1yO3NTQU9JUDu' . + 'GgrlSn8xyf6p4gXaHJvNps9/mKZtSkGdMjRwpfqAFBLLACRlZUrJONsI2717No1lbZ10kx7XGnRpKWQ/6GVGMfzEJ5VFIVtsOH6e' . + 'wyKVhYsia0y22pLThSkJK1uniVgdThOM0ol+StIUhpopIyCFq3H8aUVCwnG3PGe4Rp6fLXJtMdyM0ojcIWvIz3HFnAPfrWTXb6GN' . + 'WaLXDwZjVz8pKEfhuIUFg/bAz9sVJ61nt61mxJFslLtq7e5yPqiBT4UDklKw4MDpt+u+9bFiu9riXNu83R+fcr6tohuQ5HQhmK37' . + 'paaC8DruScmg6X8KkjZEhbaB9KEyFYSOw26Uqd+e7Qerl5z74DY/1SomP//Z'; + + //========================================================== + // d2-small.jpg + //========================================================== + $this->digits['2'][0] = 606; + $this->digits['2'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg' . + 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEQMBIgACEQEDEQH/xAAYAAEBAQEBAAAAAAAAAAAAAAAFAAQHAv/EACsQAAEDBAEC' . + 'BAYDAAAAAAAAAAIBAwQABQYRIRIxQVFhcQcTFSJSU5GU0f/EABcBAAMBAAAAAAAAAAAAAAAAAAECAwT/xAAZEQACAwEAAAAAAAAA' . + 'AAAAAAAAARESUUH/2gAMAwEAAhEDEQA/AOqXm/Q8dxmOL4PPSnCSNFixx6nXnkXgRT3Te17JWbGsveueSyLZdbPItNxOKLzTLjou' . + 'gYCSoSoY8ISKSbFeUrzkdlnTL1YshskiErkQnFEZaF8kkdBBVdjyi6RNL5+9F486eS/ECVkcBtDt1vZcho5viS8ZCp9C9tAIAm/F' . + 'VoPRU+HRtJ5JVRP1kP0PfwP+1VKrHBMliXG4Nw8VgE4xGkuqk2S1wTUNEVdIvgpL9iL6KtNxY7WOwo9tt0RCitj0sR2uCbFPPzH1' . + '7+6rRuSRcljMBMsUy2tky045KOawZk5xtEFBJEROO3hx61kh2rPCIX3MhsyC4QmfTbC6lH8dq5212qwkiG5H6Y/9R2qm+ofxqqsL' . + 'DLZ6f//Z'; + + //========================================================== + // d9-small.jpg + //========================================================== + $this->digits['9'][0] = 680; + $this->digits['9'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg' . + 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABAUGBwP/xAArEAABAwMD' . + 'AgYBBQAAAAAAAAABAgMEBQYRABIhE1EUIjEzQUIHMlJhcdH/xAAWAQEBAQAAAAAAAAAAAAAAAAACAQD/xAAYEQEAAwEAAAAAAAAA' . + 'AAAAAAAAAREhQf/aAAwDAQACEQMRAD8AkK7brF6X7XpMeGoKhFMLEeT4ZUheEhanF4OcZ2pTgDykk92bZpdCsi7aezLjxkIPUZiV' . + 'RSCy8hah7EkZ27yM7V+iscal5bE22Lon1qNDmSKROd8Sl+Ix1lMOlIS4HGgQpbStoUCnlJz8HmsXtW3Lst2rmBAelLMRRekOwnYz' . + 'Edls9QKKnOVLyk7UgcbzzrdBthqEJJwZbAI4x1U/7o1TaFa9lG36aXaZTy54VrcXUgrzsGdx+T30aNydweqVw1GS87T6Lb86Q4ha' . + 'my/IAYjZBx+snKk99oOQMf1AViE65SY348hzFy6hPKnqtKz7DC1lbqyPrvJKUJ7H+M6Wrt3InP7o1brFNp4bCDGhxGAsqz69VSiQ' . + 'ORwBxrrQ7itm1ac7Hp0WoGTIc3PSn0pccdcP2WorycfA1RaRHjxosZqOyhtDTSAhCf2gDAGjVHTd9sKSCumynFEZK1tIJUe58/ro' . + '1V1//9k='; + + //========================================================== + // d5-small.jpg + //========================================================== + $this->digits['5'][0] = 632; + $this->digits['5'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg' . + 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABgIFBwT/xAAoEAABAwME' . + 'AQQCAwAAAAAAAAABAgMEBQYRABIhIkEUMVFhBxNCgaH/xAAVAQEBAAAAAAAAAAAAAAAAAAAAAv/EABcRAQEBAQAAAAAAAAAAAAAA' . + 'AAABEUH/2gAMAwEAAhEDEQA/ANGvW4YVOeiRX5b4mv5Sin05IdlupPKdo/j2SO3+6TbPNQvOsTVz33KRT4csR3YUF7Dsh5OSFvug' . + 'kqG4FPBxnjxpvvi4KZb1pTpU+QwxUi2Y7ZIAefUk5ATxnB9/gbtL/wCH1UpuhPUlZlMVaQ0mS8zJjqZOPfc2TwpIUonI9tw40R1r' . + 'WNGq/wBdJR1XT3lqHBUnGCfkfWjRWs1ve249erQqQYjOtN1FqPUpCXQ4WIzQSsJwT0UpRwQPG0nzqyuNHobjsl9kBuWqoOoXtT1/' . + 'WppZcA8lKRj64HxqU+3KpAr6plElRVKef3S4E0K9O8pLXVzKcqSsJAB9wSAca6bSoNXeuA1+5pEV+SGFNU1iKVFqI0Vdx2AJUeoz' . + '8DGlTDwG3CAf3q/pI0ah6MDhLz6U+EpXwPoaNMU//9k='; + + //========================================================== + // d1-small.jpg + //========================================================== + $this->digits['1'][0] = 646; + $this->digits['1'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg' . + 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEwMBIgACEQEDEQH/xAAZAAADAAMAAAAAAAAAAAAAAAAABQYCBAf/xAApEAACAQMD' . + 'AwQBBQAAAAAAAAABAgMEBREABiESMUEHEyJRkSNCYXGB/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAEC/8QAFxEBAQEBAAAAAAAAAAAA' . + 'AAAAAAEREv/aAAwDAQACEQMRAD8A6jdd4WLbstILnc4Uq0VoWpkJknb6IjXLHJUePOlez923fcW4r1SxWlqC2UbdKirQif3Xw3yA' . + 'OFAGT09/kO3OmV3a20MFRf6lIYPcpy7yRRAzgxjIy2M8YwcdiBzpX6d22VNvUlTXsFkuwkrKqNSfnK7F8OTzwrAY+l5zoxKskudN' . + 'EgQPUT9PBkWF3DH+1GPxo1mLnRoAqF2VRgGOFmX/AAgY/GjRUP6hVMFv2FuFqUvUGrpDFJMBnpdyF5bsAQew7Hxzp6LZNT0yQ1DI' . + 'wp0QCFBhD0jCsfLZHxbx5xxpTuvb1+v9PV7Ztk9roLPLCjmSSN3mX5ZwqjCgZX7PfWxDQb2in96pv9qq46aTE0bW4x9ceAWAYPwS' . + 'PsYzoixgmheBGjIVcYCnjp/jHjHbRpe1JLn9OnopE/a0ykvjwDx47aNMXqP/2Q=='; + + //========================================================== + // d8-small.jpg + //========================================================== + $this->digits['8'][0] = 694; + $this->digits['8'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg' . + 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AFQMBIgACEQEDEQH/xAAYAAADAQEAAAAAAAAAAAAAAAAABgcEBf/EACsQAAEDAwMD' . + 'AwMFAAAAAAAAAAECAwQFBhEAEiEUMVEHE0EVYYEiIzJCsf/EABYBAQEBAAAAAAAAAAAAAAAAAAIAAf/EABcRAQEBAQAAAAAAAAAA' . + 'AAAAAAABERL/2gAMAwEAAhEDEQA/AKL6gVVUa0i1T5QjvTprUJMlxW4R9zgQXe/AH+kaWrntqlWjaq7gpcmotXAw82ht9yY4tch8' . + 'uAFC0k7VBXPGMY51ruiaue+bThIj+7NbWqS+7HDxajFf6AlB/k44o8ZOABk4xkL0X0tZiojKrlRuGRJjugqldSlKGf6t7BuUQe3J' . + '44xxxrA1a4KVJipLidri8uLHgqOcfjOPxo0o2hdDvS1CmV2Yl6fS5ioipIQR1CAlKkLKR2UUqAI8g6NRSwuuyHab6s1ufLI/Zai7' . + 'UBJOxhTS0+6B32pWSFH4CidOdWU0ukLiN1BLr0zG5Sdm3GRvcPhIT858DvjXNrVsSLnm/VIdTXS6tTnFsxZTSN3jchaTwps+O/z9' . + 'tcBVq3hIX0tYqlIiQHdy5CqRHKHXEjAOMgBKjnvyRk4xrQa7OiGt1K5biYZL8SoVEpjOqkFsONtJCNwASeCQrn7aNUKnQYtLp7EC' . + 'EylmLHQltptPZKQOBo1FzH//2Q=='; + + //========================================================== + // d4-small.jpg + //========================================================== + $this->digits['4'][0] = 643; + $this->digits['4'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg' . + 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAYAAADAQEAAAAAAAAAAAAAAAAABAYHAv/EAC0QAAIBAwQA' . + 'BAMJAAAAAAAAAAECAwQFEQAGEiETFDFBUmGBByIjUVNxobHR/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAIB/8QAGBEBAAMBAAAAAAAA' . + 'AAAAAAAAAAERIVH/2gAMAwEAAhEDEQA/ANjM00Nxmt1xiWW31CZp5uJwoAAaOQ/n7qfcZHqO5my3q5XX7R6ijiqnNut9u4NyJ4yv' . + 'JJyjYr8Xhrn5g599J7x3ulBNU7Zo7dXXXcLQ8kURYi4epYtkALjOePv1nUvbLvV7P3BZm3DR3eh88Kp7pVzBZI6iUhGWRRGWwE44' . + 'HX3V+uiL1uHgt+vL/H+aNJQ3CSeCOaFqSaJ1DJKs/TqRkMOvQjvRorHE4pRDLNWLGlRHGUeYIORXs9e5B7OP31E0fmdyb/t0DJ4Q' . + '27bfx3YZzPUIoAAz7IpOD6cuxq0uNumqLfVNDOqXBoZEjnZcqhIPXH4c46+WkdoWOltu3IDDLLLVVR83UVcuPEmmcZZ2/rHoAANG' . + 'GI7KIY1ijoLeEQBVCwIoAHpgY6Hy0aZe7mJ2jeHLKcEhusj6aNKgzr//2Q=='; + + //========================================================== + // d7-small.jpg + //========================================================== + $this->digits['7'][0] = 658; + $this->digits['7'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg' . + 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABgEFBwT/xAAuEAABAwIE' . + 'BAQGAwAAAAAAAAABAgMEBREABiExEhMiQSMyUXEHFBclVJFhk9L/xAAXAQADAQAAAAAAAAAAAAAAAAAAAQID/8QAGREBAQEAAwAA' . + 'AAAAAAAAAAAAAAEREiFR/9oADAMBAAIRAxEAPwDXq9mCjZeQ05VZ5ZST4bfEpa3VdglCbqUe+g9MZ5Uq7V8415WXoMSdQ6etgSps' . + '19wpkCMDZKUpv0FZvbi1NzpYasMDLDUbMVXrtQdbeeU23xLWkj5RlLYK0J7anW9gbAjCzkOtsVSUJUdtc6dVZK51UeaFm4LKbhpC' . + 'l7EhIFkDW974GbRI2XorUVls1OTdKAOqUpR0Hc3198GITQ6k+hLwrEpoODiDenRfW23bBicg78JXxPpD0mgVOW5PAivNNpahsPW5' . + '8xxQaSVkboQnhsnYm5OHqDGp1IpsalMKjMsMIC3+XZKbJFth62/QOEfMOZqZXp9JcKZTcGmTky3meSi7xQklI81vMR+sXIz/AEgp' . + 'Q0qPNu6ea8Q2jqtbp8+2w9h/OKORc/cpHjt1dDSHOtLZ4ekHW23bBjj+o9H/AB539aP94MG0+L//2Q=='; + + //========================================================== + // d3-small.jpg + //========================================================== + $this->digits['3'][0] = 662; + $this->digits['3'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg' . + 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABAUGBwL/xAArEAABBAED' . + 'AwMDBQEAAAAAAAABAgMEBREABhIhMUEiMmETFZEHFkJDUdH/xAAWAQEBAQAAAAAAAAAAAAAAAAABAAL/xAAYEQEBAQEBAAAAAAAA' . + 'AAAAAAAAEQExQf/aAAwDAQACEQMRAD8A0vclruBdk3VVLLUNssGRJsZSCtqOjlgJAHvcOD6c4HnOdIbcttw1W5P29cFEhuawqTXS' . + 'VsJjnCMBxKkJJx7goAde+ceJfdNxU0UNlyymyXHi6kxWUNl1S3EnkAEIHX2nv86qtTuZr9Q9+1VhRsOoYpYcgSVyAE/TdewkJxnK' . + 'sBCjkdPGpnOtFMd3PqsXgfOAgD8Y0aX+11H9rDDjn8lr9yj5J+dGqsqxaw6Cc9cQZU4Sp7zTJsIrKlcUEKwhSin1JABI45GUjqOu' . + 'lbOvjbc3Ts9ynjGCy445UuFLYRzbWgrT6fhSCQSMDke+pew2zYVly/d7YchNqkMJZnQpgV9J8IzwWFJyUrAJHYgjvpLbu37G5nR7' . + 'vck5C3YRKYEOEVJZj8kjKypXqWvirjk9h+dB9i4faa89TDZUfKlIyT8k+To10a6KTkpcJ/0vL/7o0TS//9k='; + } +} + +class AntiSpam +{ + + private $iNumber = ''; + + public function __construct($aNumber = '') + { + $this->iNumber = $aNumber; + } + + public function Rand($aLen) + { + $d = ''; + for ($i = 0; $i < $aLen; ++$i) { + $d .= rand(1, 9); + } + $this->iNumber = $d; + return $d; + } + + public function Stroke() + { + + $n = strlen($this->iNumber); + for ($i = 0; $i < $n; ++$i) { + if (!is_numeric($this->iNumber[$i]) || $this->iNumber[$i] == 0) { + return false; + } + } + + $dd = new HandDigits(); + $n = strlen($this->iNumber); + $img = @imagecreatetruecolor($n * $dd->iWidth, $dd->iHeight); + if ($img < 1) { + return false; + } + $start = 0; + for ($i = 0; $i < $n; ++$i) { + $size = $dd->digits[$this->iNumber[$i]][0]; + $dimg = imagecreatefromstring(base64_decode($dd->digits[$this->iNumber[$i]][1])); + imagecopy($img, $dimg, $start, 0, 0, 0, imagesx($dimg), $dd->iHeight); + $start += imagesx($dimg); + } + $resimg = @imagecreatetruecolor($start + 4, $dd->iHeight + 4); + if ($resimg < 1) { + return false; + } + imagecopy($resimg, $img, 2, 2, 0, 0, $start, $dd->iHeight); + header("Content-type: image/jpeg"); + imagejpeg($resimg); + return true; + } +} diff --git a/vendor/amenadiel/jpgraph/src/jpgraph_antispam.php b/vendor/amenadiel/jpgraph/src/jpgraph_antispam.php new file mode 100644 index 0000000000..513ca61d3d --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/jpgraph_antispam.php @@ -0,0 +1,614 @@ +chars['j'][0] = 658; + $this->chars['j'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx' . + 'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjL/wAARCAAeABUDASIAAhEBAxEB/8QAGAAAAwEBAAAAAAAAAAAAAAAAAAUGBAf/xAAsEAACAQMDAwMBCQAAAAAAAAAB' . + 'AgMEBREAEjEGIUEUUXGBBxMVIiNSYWKC/8QAFgEBAQEAAAAAAAAAAAAAAAAAAwEC/8QAGhEAAwADAQAAAAAAAAAAAAAAAAECERIh' . + 'Mv/aAAwDAQACEQMRAD8A6veK2st8zRWSyV1dUBfvHaGVI4hknsS7AFv4AyM57ayWbqeS+11xtT2etttwo4YqhEqnQs5bcAfyk4AZ' . + 'SOeD441TKRTyingUBG4/ah8j684+dSFzh/BvtaslejMUu9DPQTDnLx4lQ/ONw1TGBm0jdRWqguEMghEisWilgDmNs4Ze+MEEEH40' . + 'aUVFTa7JeLjRXu4GjhmnNbSfqFQVlA3rkckOjH/Q99Glmkl0C/Q06pvsvT9vttXHDF6T1KrWbs5gRgQJM+FDlQxPhjpF1XcVq+qe' . + 'jEoKiOecXBqh2TDDYIXLKuP6549xk8auI6aJqV45oknWdNswkAIkGMYIxjGO2NR1F0LZY5qkWqkS1xrM0M8lMSJpY+TGrnJiQ577' . + 'cEgeNHhi7D3qC3UN69M8tIakRhgrh9o748+eNGtcCiKjjpkQKlMTEg3ZwoxtHHtgfTRpYXArvp//2Q=='; + + //========================================================== + // lf-small.jpg + //========================================================== + $this->chars['f'][0] = 633; + $this->chars['f'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx' . + 'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjL/wAARCAAeABcDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAQFBgcC/8QAKxAAAgEDAwMCBQUAAAAAAAAA' . + 'AQIDBBEhAAUGEjFBEyIHFFFhoRUzYnGS/8QAFQEBAQAAAAAAAAAAAAAAAAAAAQP/xAAaEQACAwEBAAAAAAAAAAAAAAAAAQIRMRIh' . + '/9oADAMBAAIRAxEAPwDcnmLoIkiSYsouC3tA++O2lU9WkqVjJ+YdhZLsQI/4/YfQm50kZP0vbmaCSU0SRNIH6sghb9INs3t38dvp' . + 'akUuz8x5DwdN5peS1jV1dSipSiVUigIcdQjQ26lIB/c6r3F86SZpE/zCFJaqsihQNhRgdj3Jyfxo0jDSbXHt9Oph9RAoV3qJGltY' . + 'HDOxyb/nRpV0D3RXle21m48XraOk3IUSemUaV4g4Zc9ShcDtgff+tQfwvjq34Dtku7buamFqeJKemCCMxKFsEJU+/FrX8d76sEHG' . + 'aNItzr4usVNdG3S0rmRYAVwEUmyjyQLZ11x7aF4zs9DQOyzml29I2cLa/pixIHi99DFCtU9dFuLIaijo9qiYPmR2mZmB9thgAHOD' . + '4+mjUrURyrUNMZFEkkIOFuFAbsP9d/OjVIQ6Vh4tP//Z'; + + //========================================================== + // lb-small.jpg + //========================================================== + $this->chars['b'][0] = 645; + $this->chars['b'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx' . + 'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjL/wAARCAAeABUDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAYCAwUH/8QAKxAAAQMDAwMDAwUAAAAAAAAA' . + 'AQIDBAAFEQYSIRMxUSJBYQcVI2JxgqHw/8QAFQEBAQAAAAAAAAAAAAAAAAAAAQL/xAAYEQEBAQEBAAAAAAAAAAAAAAAAATERYf/a' . + 'AAwDAQACEQMRAD8A6H95mxNYwLXcX+pCuilSLXJ6YSplaUELjqxwe4IJ5PIPamJ2V0bPcS7+NxCX1cHggAnIP+xSd9RyzHh2m7FQ' . + 'Q1CvMNQWTjCt+HFD+PB/Y1fI1PL1HFFt0zaGblFdJQ9cJjpZiqPJUlBAKnPcEpGB5NNRKdrOl1NlgiQol4R2w4Sc5VtGf7opZteo' . + 'LhdorjUSM5FnQnlR50NeHQysYxtVxlJHIPgjtRRD3xkaghs6juumdHz4+Y7RVPnt59K2mk7W+fcKWsZ7djTXMkW+xMP3GRJjwIEN' . + 'HTG/CWx5wPY8AADx2NYk3SL9wukvUjGobnBkORksIbjdMANozgEqSo8qJPGO/wAVO36IsjUmBIfZfuM7epZk3F9UhSSk5O0K9Kcq' . + '8AcU3UzFuhUSBFud6nRXoz96mqmJZWg7m2dqUNhWBwdqQSP1UU5c/FFCn//Z'; + + //========================================================== + // d6-small.jpg + //========================================================== + $this->chars['6'][0] = 645; + $this->chars['6'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg' . + 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAEBAAMBAAAAAAAAAAAAAAAABgMEBwX/xAAvEAABAwMC' . + 'BAQEBwAAAAAAAAABAgMEAAURBiESIjFRBxMUQRUWMmFTYnGRkrHC/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAEC/8QAFhEBAQEAAAAA' . + 'AAAAAAAAAAAAAAER/9oADAMBAAIRAxEAPwDslwiR3oDku8ONttsAvDiVyMcO/ET7ke5/aoOz6k1Vr5htNjW7a7M1yO3NTQU9JUDu' . + 'GgrlSn8xyf6p4gXaHJvNps9/mKZtSkGdMjRwpfqAFBLLACRlZUrJONsI2717No1lbZ10kx7XGnRpKWQ/6GVGMfzEJ5VFIVtsOH6e' . + 'wyKVhYsia0y22pLThSkJK1uniVgdThOM0ol+StIUhpopIyCFq3H8aUVCwnG3PGe4Rp6fLXJtMdyM0ojcIWvIz3HFnAPfrWTXb6GN' . + 'WaLXDwZjVz8pKEfhuIUFg/bAz9sVJ61nt61mxJFslLtq7e5yPqiBT4UDklKw4MDpt+u+9bFiu9riXNu83R+fcr6tohuQ5HQhmK37' . + 'paaC8DruScmg6X8KkjZEhbaB9KEyFYSOw26Uqd+e7Qerl5z74DY/1SomP//Z'; + + //========================================================== + // lx-small.jpg + //========================================================== + $this->chars['x'][0] = 650; + $this->chars['x'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx' . + 'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjL/wAARCAAeABMDASIAAhEBAxEB/8QAGAAAAwEBAAAAAAAAAAAAAAAAAAUHBgj/xAApEAABAwMDAwQCAwAAAAAAAAAB' . + 'AgMEBQYRACFBBxIxFCJRgRNxkcHw/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAH/xAAWEQEBAQAAAAAAAAAAAAAAAAAAEQH/2gAMAwEA' . + 'AhEDEQA/AH9t3pKvO14UykVARa/HfAlxlDKXR24V2p3z7RlPwdtMep91uWdRGHWELjuTFFtLvcC4SNznnH+21O7ttiodOq1BvC0E' . + 'p9I0lSX2kgqCSklK+5PKCMAng6zV2XRO6u3lSIURtbDRShltlZHa0tW7q/0MeTwnjxq1Jiw2xc9xTLbhSVU5iaXUFfqFFILgJOCd' . + '9Gt3SXabR6REpkL8yo0RpLCFNx1qBCRjOQMHxo0pEr6o3um2LVYpMEpTVqg25lHn08dfcB9kEgfZ1LIFDuawqZRb7aQlLTzqglsg' . + '9wQdveOEqBIB425xqhQuk8qo9UKlPrlRblw2ZBeCSVKW6CcoSrI2AGOT41SKzT4dYtmdS5bIXDZhNoWgbZJ94x8AYT/GkM03oNUc' . + 'uKgwqtTZDTMOU0FttqRkoHggnPkEEHRrkJ6t1SlSHYUOc6zHaWrsbQrATk5/vRqK/9k='; + + //========================================================== + // d2-small.jpg + //========================================================== + $this->chars['2'][0] = 606; + $this->chars['2'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg' . + 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEQMBIgACEQEDEQH/xAAYAAEBAQEBAAAAAAAAAAAAAAAFAAQHAv/EACsQAAEDBAEC' . + 'BAYDAAAAAAAAAAIBAwQABQYRIRIxQVFhcQcTFSJSU5GU0f/EABcBAAMBAAAAAAAAAAAAAAAAAAECAwT/xAAZEQACAwEAAAAAAAAA' . + 'AAAAAAAAARESUUH/2gAMAwEAAhEDEQA/AOqXm/Q8dxmOL4PPSnCSNFixx6nXnkXgRT3Te17JWbGsveueSyLZdbPItNxOKLzTLjou' . + 'gYCSoSoY8ISKSbFeUrzkdlnTL1YshskiErkQnFEZaF8kkdBBVdjyi6RNL5+9F486eS/ECVkcBtDt1vZcho5viS8ZCp9C9tAIAm/F' . + 'VoPRU+HRtJ5JVRP1kP0PfwP+1VKrHBMliXG4Nw8VgE4xGkuqk2S1wTUNEVdIvgpL9iL6KtNxY7WOwo9tt0RCitj0sR2uCbFPPzH1' . + '7+6rRuSRcljMBMsUy2tky045KOawZk5xtEFBJEROO3hx61kh2rPCIX3MhsyC4QmfTbC6lH8dq5212qwkiG5H6Y/9R2qm+ofxqqsL' . + 'DLZ6f//Z'; + + //========================================================== + // lm-small.jpg + //========================================================== + $this->chars['m'][0] = 649; + $this->chars['m'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx' . + 'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjL/wAARCAAeABcDASIAAhEBAxEB/8QAGgAAAgMBAQAAAAAAAAAAAAAAAAcDBAUCBv/EAC0QAAICAQMCBAMJAAAAAAAA' . + 'AAECAwQRAAUSBiETMVFhB2KhFSIyQVJxgZHB/8QAFgEBAQEAAAAAAAAAAAAAAAAAAgED/8QAGREBAQEAAwAAAAAAAAAAAAAAAQAR' . + 'EiEx/9oADAMBAAIRAxEAPwB0MI2lIdgI0Cly3kFXLEn2zx1FDdp7rbpbjUtRWKio3hyxOGQllJzkegX66rQ2qW87Zuk9S5FNVmru' . + 'iywyBhjDKTkeXfSr+GRfYtq2KAO32b1BGxAZu0dyJ2DKPTxY1wPddVszycUq2Golq8jRWbcnJWwCVGMjz+VQP50atxMtm2ZUOY4l' . + '4qfUnBP0x/Z0amy4jJm10Tt2yddWasFmfaRfdrlG3UcgArnxKzJ+Fu4DqCMkcgNem2DoWav8PLfTm+FPEkuSNTnqueS5bnHIv6CG' . + 'LNjJwM99bm67NB1Ht89KSxNXnr2hNDbiUc47K4KyD2GQMfmMjUnS+7vuIktTqPCaaWCqAMMojPFyw8hyYMQBnAwNJHYGXPTsW9VN' . + 'jg2zf50W9zk524GAEihuz+xbIOD82jW5TkjtRPZkTkJ+4VgDhQfuj/f3OjUxl1f/2Q=='; + + //========================================================== + // lt-small.jpg + //========================================================== + $this->chars['t'][0] = 648; + $this->chars['t'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx' . + 'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjL/wAARCAAeABcDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAQDBQYH/8QAJxAAAQMDAgYDAQEAAAAAAAAA' . + 'AQIDBAUGEQASEyExQVFhIjJxFSP/xAAWAQEBAQAAAAAAAAAAAAAAAAABAAP/xAAZEQADAQEBAAAAAAAAAAAAAAAAAREhMUH/2gAM' . + 'AwEAAhEDEQA/AO4BLEiEy7uG4IGxxs5IOOx76wd2XYidSp1HoD70240gcNNPbDyI6wQQpaz8E9MczkdhqtbsKYLieDk6WLKmZmmL' . + 'Hk7AHVkbkLI+RQc7uRxgkfr1tx2rGu6VbToLVKkhU+kbugGf9WfaknCk5ycaX0zmaa+3JkqvW/CmzojsB9xoF6OoFK0r6HOcEDI0' . + 'aefTuKX5ScMdC14HYq8n12zo1DEUcKTGg1Z+hyBwoPBVIiA/VQyOIgedhUCB4WMfXSV3UufVLcTUIqVf26K6mXDbPVRRzKT54iMg' . + '+zjtq6mtsyJjclxpKlUhSXEbkgkqWnBx4+J5e/zU0pZemPvJJQzEPDfQOrwwFY9AZ5eeYPLV6FwhoFYZuigxpkJeIjqAeIoAk9wA' . + 'D46EnuD+6Nc1smDNrTlRkxqtMo1vzKhIdYgU9YDqVpISrLhHxSSd21I0aYyqP//Z'; + + //========================================================== + // li-small.jpg + //========================================================== + $this->chars['i'][0] = 639; + $this->chars['i'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx' . + 'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjL/wAARCAAeABYDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAABwAGBP/EACcQAAEEAQMEAgIDAAAAAAAAAAEC' . + 'AwQRBQAGEiExQVEHExSBFWFx/8QAFgEBAQEAAAAAAAAAAAAAAAAAAgMB/8QAGBEBAQEBAQAAAAAAAAAAAAAAAAECMRH/2gAMAwEA' . + 'AhEDEQA/AE7c+5M9BeRG29t1WUfKFFYW+GvrI7WD3B9g140YD5T36rcErDjbUR6dCBdejsKUpxITXI2FUrooCh70yvxzHyIlMvuK' . + 'eVSH7IKEpJoKqu/ahddLryR/aMiO187bsmrWShhp1AZS2XHHrWhNJrzdf7f7GiVcHk3sptmHkJcJ2DIftS2FrKlJPXudWuLGYeQp' . + 't2fmEIckqIZaaKuSGG0lQ4gduRoFRHQ9AOgs2lOJbk9aSUlpjGvAWeSVH2VKq/2dFPw3IjyJe8s281ct3I9UoHJXGiQkD2STrSZ7' . + 'Yf8AOl7JTdw5eOCz0jw3+LbYCfA9nz71msb8KMxoTGTw+5srjsipAdDqFBQBIuiOl6KrdYyJMyTCshlw2G3Fr/HiNqNNAqJJUoGl' . + 'KND+h47km1bZwsvCbYYjycxIyK1qDv2yEi0hQviK8atKDcy9j//Z'; + + //========================================================== + // lp-small.jpg + //========================================================== + $this->chars['p'][0] = 700; + $this->chars['p'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx' . + 'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjL/wAARCAAeABcDASIAAhEBAxEB/8QAGgAAAQUBAAAAAAAAAAAAAAAAAAECBAUGB//EAC8QAAEDAwMCBAMJAAAAAAAA' . + 'AAECAwQFESEABhIiMRMVUWEHFEEWIzIzcYGRocH/xAAWAQEBAQAAAAAAAAAAAAAAAAADAgH/xAAcEQACAgIDAAAAAAAAAAAAAAAA' . + 'AQIxAxESIUH/2gAMAwEAAhEDEQA/AOh703xG21DMeOyqoVNDjSzERiwU6Ep5qtZNycA97HTF13d33KWtmlt9xwkLl1NkXVxIuQgK' . + 'wLj+hqBvel0qmbR8GnR22nJNZiLeeKr8nDIT1OLJucX+uPbWom7iocRpafOac5MX1ALltp/Cbi+cJH++utdh+WVNL3PNdNYpdWgx' . + 'Y0qmLZSrwJJcQoOJ5XKlJFu4HbJOjVbt+V5nu7eopNRivqcdhK+bFnWwA1Y2AOcgjvj9dGlxy0g5y0xd+hNXoG24C4obizq3HZUh' . + 'YHqtRHD06bG/8a0MbbG1mqekxaBSGmgkrcdcitlLfrckZIz7DUatbeFak0tyRLUwzT5vmiGm0cufEkFBJItfkD+59tKmiO12atFa' . + 'eQukO3ejUxgENqTcfnE5WbkHiOnJ76N2IqI1DibabptS+zkZhtp90F2Y0S026EkAFK/qL46cXv65NVZDfxHmVCK4DE2/RX/lRFbA' . + 'C5LwAyq2EtpHZI7mxPYDRqoctdESimz/2Q=='; + + //========================================================== + // le-small.jpg + //========================================================== + $this->chars['e'][0] = 700; + $this->chars['e'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx' . + 'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjL/wAARCAAeABgDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAYEBQcB/8QAKhAAAQMCBAUEAwEAAAAAAAAA' . + 'AgEDBAURAAYSIQciMTJBE0JRYRQVFoH/xAAXAQEBAQEAAAAAAAAAAAAAAAAAAgED/8QAGREAAwEBAQAAAAAAAAAAAAAAAAERAjFB' . + '/9oADAMBAAIRAxEAPwDTszvhEYCoS80BTm2bCjQRwdAzVe2yopkpJtpRUVfjEIc4V2oMerByg5Ji30oMyS3GeMunK0upfnu09MdJ' . + 'p2scTmWnnGfx6HThktgLfKj7xEOqyr7QBbL41LhBzpxbcOru0LKDLdSnOHoaltNqSC4qWL0x9xbJYum69caczSaHmGmTmpDUYn4l' . + 'UiqjkynzAVtwV23Ud+X4Ibpa2DCPkjhfUaRO/p8yzpb+YHhUmhbev6ZEll1lvqK3jt2XrbBgp6HVwsK3THpfEubGSoOUyFMpbJmL' . + 'Deh6SgOGKti57EuY6l62JMWdJy7k3hg1LkOozEbVm7suQSkTiKtkEfP1pH664Za/QItccgI4bseTHdNxiXHLQ8yVl7V32XyioqL5' . + 'TGc1ng6eYs0idczXUZscBBABWgEhEtfKNuUezwPnBhEuj8X2M21z9BR6NUX211Kk/UKKAjuhkPhL7XVf8vtgw7UPJlEyrDWFSYLb' . + 'LBNF6qrzG6t0spEu6+fpL7YMXhUndp//2Q=='; + + //========================================================== + // la-small.jpg + //========================================================== + $this->chars['a'][0] = 730; + $this->chars['a'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx' . + 'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjL/wAARCAAeABoDASIAAhEBAxEB/8QAGAABAAMBAAAAAAAAAAAAAAAABgMEBwX/xAAvEAABAwIFAQcCBwAAAAAAAAAB' . + 'AgMEBREAEiExQQYHFBUiUXGBE2EyQkNSgpHh/8QAFwEBAQEBAAAAAAAAAAAAAAAAAAMBAv/EABkRAAMBAQEAAAAAAAAAAAAAAAAB' . + 'IQIRMf/aAAwDAQACEQMRAD8AfdQ1pxjqZMSn0mRUZRYDaklJCE3OawO2ttTxY4hl07qFMVs1Ku02kpPnRGhsAqz8W9T9wDjozq6o' . + 'Q1lDrcZLGVcmUoZg0obpufxK3Ftt9ccqB1GgBcmLSqtVEqOZcr6ARm/kbXHt7DEtc7WTJKTJqEWvRKfLqL9QplSjuPtGVYOJKBrm' . + 't+U+n94WGStZzNypmRWqckUKTbixy6jAfxPxHtCgKqFNlU5huK6pLMndSlegG4J45N8aKmTMKQRBsCNMzwB+RbHWHGEAZlPZX2hx' . + 'qZIC34ygZoYUbB50JSkFXFhZR9BrpheR4fIbQ6gvurJ7q02bIQTuAOAN8x40HAxRr3TrNRpBmSHVt1KMlTyJTCsqkKAPlSf28W+c' . + 'UGaD1c9HSR1HFUh9tJU45EBcAtcC9+P9wqbg8IAto9o81yputrVGpiUkgHKkqUTZI32+cKm1z1tIUgPBBAKQ4UBQH3uL3xmXSXep' . + 'HVDtXStE5K5jlPU7PF3Q41+okJFkjgC+3OuNSYiSzHaLtRcW4UDMpLYSCbakDW3thhum5p//2Q=='; + + //========================================================== + // d9-small.jpg + //========================================================== + $this->chars['9'][0] = 680; + $this->chars['9'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg' . + 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABAUGBwP/xAArEAABAwMD' . + 'AgYBBQAAAAAAAAABAgMEBQYRABIhE1EUIjEzQUIHMlJhcdH/xAAWAQEBAQAAAAAAAAAAAAAAAAACAQD/xAAYEQEAAwEAAAAAAAAA' . + 'AAAAAAAAAREhQf/aAAwDAQACEQMRAD8AkK7brF6X7XpMeGoKhFMLEeT4ZUheEhanF4OcZ2pTgDykk92bZpdCsi7aezLjxkIPUZiV' . + 'RSCy8hah7EkZ27yM7V+iscal5bE22Lon1qNDmSKROd8Sl+Ix1lMOlIS4HGgQpbStoUCnlJz8HmsXtW3Lst2rmBAelLMRRekOwnYz' . + 'Edls9QKKnOVLyk7UgcbzzrdBthqEJJwZbAI4x1U/7o1TaFa9lG36aXaZTy54VrcXUgrzsGdx+T30aNydweqVw1GS87T6Lb86Q4ha' . + 'my/IAYjZBx+snKk99oOQMf1AViE65SY348hzFy6hPKnqtKz7DC1lbqyPrvJKUJ7H+M6Wrt3InP7o1brFNp4bCDGhxGAsqz69VSiQ' . + 'ORwBxrrQ7itm1ac7Hp0WoGTIc3PSn0pccdcP2WorycfA1RaRHjxosZqOyhtDTSAhCf2gDAGjVHTd9sKSCumynFEZK1tIJUe58/ro' . + '1V1//9k='; + + //========================================================== + // d5-small.jpg + //========================================================== + $this->chars['5'][0] = 632; + $this->chars['5'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg' . + 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABgIFBwT/xAAoEAABAwME' . + 'AQQCAwAAAAAAAAABAgMEBQYRABIhIkEUMVFhBxNCgaH/xAAVAQEBAAAAAAAAAAAAAAAAAAAAAv/EABcRAQEBAQAAAAAAAAAAAAAA' . + 'AAABEUH/2gAMAwEAAhEDEQA/ANGvW4YVOeiRX5b4mv5Sin05IdlupPKdo/j2SO3+6TbPNQvOsTVz33KRT4csR3YUF7Dsh5OSFvug' . + 'kqG4FPBxnjxpvvi4KZb1pTpU+QwxUi2Y7ZIAefUk5ATxnB9/gbtL/wCH1UpuhPUlZlMVaQ0mS8zJjqZOPfc2TwpIUonI9tw40R1r' . + 'WNGq/wBdJR1XT3lqHBUnGCfkfWjRWs1ve249erQqQYjOtN1FqPUpCXQ4WIzQSsJwT0UpRwQPG0nzqyuNHobjsl9kBuWqoOoXtT1/' . + 'WppZcA8lKRj64HxqU+3KpAr6plElRVKef3S4E0K9O8pLXVzKcqSsJAB9wSAca6bSoNXeuA1+5pEV+SGFNU1iKVFqI0Vdx2AJUeoz' . + '8DGlTDwG3CAf3q/pI0ah6MDhLz6U+EpXwPoaNMU//9k='; + + //========================================================== + // d1-small.jpg + //========================================================== + $this->chars['1'][0] = 646; + $this->chars['1'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg' . + 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEwMBIgACEQEDEQH/xAAZAAADAAMAAAAAAAAAAAAAAAAABQYCBAf/xAApEAACAQMD' . + 'AwQBBQAAAAAAAAABAgMEBREABiESMUEHEyJRkSNCYXGB/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAEC/8QAFxEBAQEBAAAAAAAAAAAA' . + 'AAAAAAEREv/aAAwDAQACEQMRAD8A6jdd4WLbstILnc4Uq0VoWpkJknb6IjXLHJUePOlez923fcW4r1SxWlqC2UbdKirQif3Xw3yA' . + 'OFAGT09/kO3OmV3a20MFRf6lIYPcpy7yRRAzgxjIy2M8YwcdiBzpX6d22VNvUlTXsFkuwkrKqNSfnK7F8OTzwrAY+l5zoxKskudN' . + 'EgQPUT9PBkWF3DH+1GPxo1mLnRoAqF2VRgGOFmX/AAgY/GjRUP6hVMFv2FuFqUvUGrpDFJMBnpdyF5bsAQew7Hxzp6LZNT0yQ1DI' . + 'wp0QCFBhD0jCsfLZHxbx5xxpTuvb1+v9PV7Ztk9roLPLCjmSSN3mX5ZwqjCgZX7PfWxDQb2in96pv9qq46aTE0bW4x9ceAWAYPwS' . + 'PsYzoixgmheBGjIVcYCnjp/jHjHbRpe1JLn9OnopE/a0ykvjwDx47aNMXqP/2Q=='; + + //========================================================== + // ll-small.jpg + //========================================================== + $this->chars['l'][0] = 626; + $this->chars['l'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx' . + 'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjL/wAARCAAeABcDASIAAhEBAxEB/8QAGAAAAgMAAAAAAAAAAAAAAAAAAAYEBQf/xAArEAACAQIFAwIGAwAAAAAAAAAB' . + 'AgMEEQAFBhIhFEFREzEHFSIyYcFxgZH/xAAXAQEAAwAAAAAAAAAAAAAAAAACAAED/8QAGhEAAwEAAwAAAAAAAAAAAAAAAAECMREh' . + 'Qf/aAAwDAQACEQMRAD8A15Zfm1VURj1Fp5AqLKv3OARcL4W5Nzx+MLWjdRz5hqXU6TSb6OCr6WghiQbrJ91gOTy1yT5xZ55myZFk' . + 'Gb5ozX6Ondm28XYqpQDwu7jEH4c5S2UaDy4xxrLmlUDWzk8XaQ3O49hbj+RiB85HNg8Ee3aqwIqhDuux7G/HHbvzgxEqaWOvy09R' . + 'O0o3hjdQoUji20g+fY3wYSM6pJ4Ylr7V+Zz5PSaezHTlTRNWzxySSxt6q1MSkH6AOT2Fu3Aw7RfF/T9DEkLUeawuF2mKSgdWQj2/' . + 'q3+fnDZDlqRZzQGaOGcpTOaeR1u8R+ncN3gj94so2jNWHeMNNKzorEX2qp9v3imNPoRE1zpjUtZ09HJmYq5lury0benZeTww23t3' . + 'Ivgw+T0yRRyyxIqNfkLcA8jt7YMKcBWn/9k='; + + //========================================================== + // ls-small.jpg + //========================================================== + $this->chars['s'][0] = 701; + $this->chars['s'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx' . + 'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjL/wAARCAAeABQDASIAAhEBAxEB/8QAGgAAAgMBAQAAAAAAAAAAAAAAAAMCBAUGB//EACwQAAEEAQIFAgUFAAAAAAAA' . + 'AAECAwQFEQAGEhMUITEiYQcjQVFxFRZCUoH/xAAWAQEBAQAAAAAAAAAAAAAAAAADAgH/xAAZEQADAQEBAAAAAAAAAAAAAAAAAQIR' . + 'EiH/2gAMAwEAAhEDEQA/APWZMhmFXSJU+SGmWFiQtAWMJQAnJUr8Z+w/OuQk71uZnMsqnbjy9s8st9UMCQ6kZJdZaIHEkZ/JHceN' . + 'N3HtizuY1JLrG48yLBSC9UTFKQiY4nACir+wAOOMEe2rm2bTbzlqtE1MyBuZAPybpw85KSfDRJ4Cg+Pl/wC61hJeGjV31VuuKqwr' . + 'LGU+whZZK+Rw+oYJAyj3GjS4dZFpZVkqPLktdfMXNcaU2kBC1BIITkdx6c599GlnvPAa3TL2vNvU76n0063acr3YSLCEjpUpUQtW' . + 'Dhf14SMEnOc57aZ8Tegm7dbrEQGZt1PeTDgc1PEW3FeXAvyAkZVkeMDOm2G3f3O7Cl/qEuqkQg4lp6CRxraWfUlRUD24kZA741Ko' . + '2k1HvlT3ri2sLOCgtsyJz6XEtBwZPAgJAGQMHUNPWKqWItsqh0UCFVyLeKhyLHQ2TMdHNVj+RKlAnJyfto1FW2ahgjrq6LYTFjjf' . + 'lymUOLdWfJyoHA+gA7AAAaNPE3ysJdLT/9k='; + + //========================================================== + // lh-small.jpg + //========================================================== + $this->chars['h'][0] = 677; + $this->chars['h'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx' . + 'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjL/wAARCAAeABUDASIAAhEBAxEB/8QAGgAAAQUBAAAAAAAAAAAAAAAAAAIDBAUGB//EACwQAAIBAwMCBQIHAAAAAAAA' . + 'AAECAwQFEQAGEiExExQiQVEVggcyU2GRocH/xAAXAQADAQAAAAAAAAAAAAAAAAAAAwQB/8QAGhEBAQEAAwEAAAAAAAAAAAAAAQAC' . + 'AyEyMf/aAAwDAQACEQMRAD8A6DZb95q9bmpK6ieOCzNHJTxmE+NMhQ5fr1fLq3Ejvkak2e7ipiFsqb3R0m4qkPPJRiRXenU9VjKE' . + '5JVcA9R7nWc3/BUbfoKTdO3VRXhpjbZ2D8Rwk6RyZH6chB+46m7i2hDYtgA2ePlV2VkuKysoLzzRnlIScZJZeeevvjtrX7LK2rp7' . + 'tTwwJ9WjhILDrTKnIdMEDl2+P80aVdJZb1QW+vgqENLPH4sBCDLIwUgnOf4GjVvDnLgUk79T81voqjb8NnuUx8pVRCiEaYUSuynl' . + 'jHU9mOfnOoOx6hqz8PrbNdfEkMUXg1LSM3rKOUywJ7YAJ1ZTWmSpvdvlaVTDSUzJAhH5ZJBgv0x2RSAPlz21WXqoet3ba9nuW8n4' . + 'Jr6qTPqnUNxSM/f6mPvxA9zqJnExTbR+h0nkhVu1uE8j0UBRQ9PGxBKFjnkAScdsDp10a0lc7z0tI7Y5YYN+5GAf7GjVXF4Icj3f' . + '/9k='; + + //========================================================== + // ld-small.jpg + //========================================================== + $this->chars['d'][0] = 681; + $this->chars['d'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx' . + 'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjL/wAARCAAeABcDASIAAhEBAxEB/8QAGAAAAwEBAAAAAAAAAAAAAAAAAAQFBgH/xAAsEAABAwMEAAQFBQAAAAAAAAAB' . + 'AgMEBQYRABIhMQcTI0EUMlFhkRgicaGx/8QAFgEBAQEAAAAAAAAAAAAAAAAAAgEA/8QAGBEBAQEBAQAAAAAAAAAAAAAAAAECETH/' . + '2gAMAwEAAhEDEQA/ALUhp6h3W/X63UlypbhCY0WMjLqGzwDtPCfv/WtealNpVInuVBBqCogcdbU36YUkAkJWVHG8YPXBxxzxqPcN' . + 'YtWyWnIlUeW05VEOAvrCnnSkftK1H5lKJPHsMDoDUWq+KdrSbIqsalVsImiEtLUZ2MU71bcYJWkhZ/36ayLHhi/IXZVOmzKqp5uU' . + '688hTyjuGVEFJKvoQesD86NL2jGZp1EoLDSmk+ZAQ8d7oPzp3YGesFWMfxo1YGvSzLsT9QExVX8phTlMaFOExAJIBGQjJwCcL+/e' . + 'rd+W7GuO0Kw05CQ6+ww69Gfdb2kFIKk7DgEkjgnr86rXRa9HuyP8LV4SH0sIBbWFFDiFEgDaocgdkjo8ccay0qw7ut5nyrcviQqC' . + 'slsRKo0HwlODkBRzxj2AGoXTtpzIdQ8MbffUChz4NCPRaClAo9Mn6c7T3o13wytmo0K05VIqkiPJbizFiMWs4CTgnIIHOST796NL' . + 'Ia1JX//Z'; + + //========================================================== + // d8-small.jpg + //========================================================== + $this->chars['8'][0] = 694; + $this->chars['8'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg' . + 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AFQMBIgACEQEDEQH/xAAYAAADAQEAAAAAAAAAAAAAAAAABgcEBf/EACsQAAEDAwMD' . + 'AwMFAAAAAAAAAAECAwQFBhEAEiEUMVEHE0EVYYEiIzJCsf/EABYBAQEBAAAAAAAAAAAAAAAAAAIAAf/EABcRAQEBAQAAAAAAAAAA' . + 'AAAAAAABERL/2gAMAwEAAhEDEQA/AKL6gVVUa0i1T5QjvTprUJMlxW4R9zgQXe/AH+kaWrntqlWjaq7gpcmotXAw82ht9yY4tch8' . + 'uAFC0k7VBXPGMY51ruiaue+bThIj+7NbWqS+7HDxajFf6AlB/k44o8ZOABk4xkL0X0tZiojKrlRuGRJjugqldSlKGf6t7BuUQe3J' . + '44xxxrA1a4KVJipLidri8uLHgqOcfjOPxo0o2hdDvS1CmV2Yl6fS5ioipIQR1CAlKkLKR2UUqAI8g6NRSwuuyHab6s1ufLI/Zai7' . + 'UBJOxhTS0+6B32pWSFH4CidOdWU0ukLiN1BLr0zG5Sdm3GRvcPhIT858DvjXNrVsSLnm/VIdTXS6tTnFsxZTSN3jchaTwps+O/z9' . + 'tcBVq3hIX0tYqlIiQHdy5CqRHKHXEjAOMgBKjnvyRk4xrQa7OiGt1K5biYZL8SoVEpjOqkFsONtJCNwASeCQrn7aNUKnQYtLp7EC' . + 'EylmLHQltptPZKQOBo1FzH//2Q=='; + + //========================================================== + // lz-small.jpg + //========================================================== + $this->chars['z'][0] = 690; + $this->chars['z'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx' . + 'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjL/wAARCAAeABYDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAABgAHA//EACsQAAEDAwQBAwIHAAAAAAAAAAEC' . + 'AwQFESEABhIxBxMiQVFxCCM0UmGRof/EABYBAQEBAAAAAAAAAAAAAAAAAAECAP/EABgRAAMBAQAAAAAAAAAAAAAAAAABEVEC/9oA' . + 'DAMBAAIRAxEAPwBTWfLu1KXXZDbM4uewNvLajlwhaCbBAwDe5uehYd3xm6t6bi3jvulwqc7KgxXZZeYQLNLeF73WRg4HEdgfzrSa' . + 'P45pNEkznITDc9ypLShtyWhJDJyXC2qxJHZvjoZOjyVv1v8AESt6FFS4ijxvTLbawEApSccrYHJf0+OtJMQ2rNXk7GZMufJgJjTH' . + 'Un9M4qzxT7hyCiThIyRnPXWrRvyLElVBUF6vlhl0lwRYCFKcQhAtyWpVhyWTx+w++rUvp4EWjOvbniUOnVatcS43BYDbJSPZyIBw' . + 'ejclIx+3Wa+J63T6DQanuGszI0eZVJJV60p0Jum5GEi6le7l0PjvSjyRsaTvJqI1BqhhR46ksuMrQVJcUSEoUbHNr/7o7C8L7eiz' . + '4lLlyJk2cEqW+6V+m0AE9ISLnsj5+O9UhsFK92bZZqb9SRu9p2c4A0OCEqDbYAJSlJwAVZv3fBvbFrg/462btlhuS1RG5nL8pYkq' . + 'KrnsKH06I/rVrQKkf//Z'; + + //========================================================== + // d4-small.jpg + //========================================================== + $this->chars['4'][0] = 643; + $this->chars['4'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg' . + 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAYAAADAQEAAAAAAAAAAAAAAAAABAYHAv/EAC0QAAIBAwQA' . + 'BAMJAAAAAAAAAAECAwQFEQAGEiETFDFBUmGBByIjUVNxobHR/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAIB/8QAGBEBAAMBAAAAAAAA' . + 'AAAAAAAAAAERIVH/2gAMAwEAAhEDEQA/ANjM00Nxmt1xiWW31CZp5uJwoAAaOQ/n7qfcZHqO5my3q5XX7R6ijiqnNut9u4NyJ4yv' . + 'JJyjYr8Xhrn5g599J7x3ulBNU7Zo7dXXXcLQ8kURYi4epYtkALjOePv1nUvbLvV7P3BZm3DR3eh88Kp7pVzBZI6iUhGWRRGWwE44' . + 'HX3V+uiL1uHgt+vL/H+aNJQ3CSeCOaFqSaJ1DJKs/TqRkMOvQjvRorHE4pRDLNWLGlRHGUeYIORXs9e5B7OP31E0fmdyb/t0DJ4Q' . + '27bfx3YZzPUIoAAz7IpOD6cuxq0uNumqLfVNDOqXBoZEjnZcqhIPXH4c46+WkdoWOltu3IDDLLLVVR83UVcuPEmmcZZ2/rHoAANG' . + 'GI7KIY1ijoLeEQBVCwIoAHpgY6Hy0aZe7mJ2jeHLKcEhusj6aNKgzr//2Q=='; + + //========================================================== + // lv-small.jpg + //========================================================== + $this->chars['v'][0] = 648; + $this->chars['v'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx' . + 'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjL/wAARCAAeABQDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAQDBQYH/8QAKBAAAQQBAwMEAgMAAAAAAAAA' . + 'AQIDBBEFAAYhEzFBEhQiYQdRFTKB/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAEC/8QAFxEBAQEBAAAAAAAAAAAAAAAAAAERIf/aAAwD' . + 'AQACEQMRAD8A6Ngt1SZ4yrYgrecgTFsFJA9aGwAUrUaF2D2Avjzq6CIjiBPkB9bwQVIkIYIDae/wq+P9N+dY4SGMf+Txlev7KBmY' . + 'PoadKRy4zxSgRxaTwO/x09u7KPYnasmHjlsyFZZXt4K23ezjvBpNGgLUrvXfVZyLLbWambiwEbKvvxYAkeotNlIJW2FEJWb7WBda' . + 'NSQI0fHYyJjkrjKRDZQwnpQ1vgBIr+w8+a+9GocZr8iKkuY1eXhsKH8U8iZE9BHz6ZHUc48UfSPqzqH3kfeO9kTTDQYGGietpTaO' . + 'shyW6AocpHNIrv8AvWzk9BUSdPdYS4BcRlomkhIV6KP0VE39V+tU2wdlRMHtZUB8NuTQ+51X27+Kr46ZPIAFV540D8zeLsJ5LMHa' . + 'ubmMBCVJdjx0pRyLoWR4I8aNIQ8BvZMNtMTeUcsptKfc4tC1gAkCyFC+K0aJtf/Z'; + + //========================================================== + // lk-small.jpg + //========================================================== + $this->chars['k'][0] = 680; + $this->chars['k'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx' . + 'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjL/wAARCAAeABUDASIAAhEBAxEB/8QAGQAAAwEBAQAAAAAAAAAAAAAAAAUGBAMH/8QALhAAAQMDAwIEBAcAAAAAAAAA' . + 'AQIDBAUREgAGITFBEyIyYQcVUYEUIzNicZHx/8QAFgEBAQEAAAAAAAAAAAAAAAAAAwEE/8QAGxEAAwACAwAAAAAAAAAAAAAAAAEC' . + 'AxESMeH/2gAMAwEAAhEDEQA/APVK/V36dU6NSJDTT8esPLiqfK8S2cCoeTkKvZQ6jm2ldSqKqbu+OgMOvSX3m4UBrLnDlbqiefKl' . + 'Nzz2x1m+IwNP27CkJQ7JkR6rCkMJbP5jp8S2CPfkgD6H+dJ6Ca0nerr+64rTNSqMYrg+C9mmOwhVpDfsuxSbi97DmybaoZeQ5jTl' . + 'PEp18JTIfeW3kq3ly4H26aNZqvTWZsjFcZTsVtSg0G8Rio+vr2vb7g6NLPRnuXy8F+8kl+obUh4KXJdqSJJQnohlkZqJPYBXh3P+' . + 'a4b5Hyp6k1bO7sOotPyXkj9NlwFl0ewstJA9ifrqkVSmET4csoS7UTHXFQ+6SQlskKUMb/tH9ddLVUmS7DqdBqD7U6OsqfS46jzl' . + 'hQ5bXb1K9Scuybdxo2OTu92dwSZkWn0Sb8viQWyn8Qq5D6ifSLd0BIv7q0arTBRSKPToMZbi2GWylsvLK148Wue/XRrRjxOpT2R2' . + 'k9aP/9k='; + + //========================================================== + // lr-small.jpg + //========================================================== + $this->chars['r'][0] = 681; + $this->chars['r'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx' . + 'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjL/wAARCAAeABYDASIAAhEBAxEB/8QAGgAAAgIDAAAAAAAAAAAAAAAAAAYCBQMEB//EAC4QAAICAQIFAgMJAQAAAAAA' . + 'AAECAwQRBQYAEiExQQdRFGFxEyIyM0JSYoGC8P/EABYBAQEBAAAAAAAAAAAAAAAAAAEAAv/EABcRAQEBAQAAAAAAAAAAAAAAAAAB' . + 'EUH/2gAMAwEAAhEDEQA/AOs0ZdETU54Gt1INSmlPJEsyo7J+jlXPUYBPY9c+eE/dO9tY0a7ren6BVrW7VJTZtW5kZkjXkBSIKveQ' . + 'gHp0AAJ4w+q2hVdT2Md0h46+saS4mr3EUK0gWTAB+vQj2PboeL/ZVOqmhaZVjkFmxdC6tctt3tM2G5/7bAx4C4+qxiWwd3prWzKe' . + 'r3IBAth5OYxozKsgc8y4GTgnJB9uncdTi6tXq2140rRVM13JMEMAVAg7sMdBjJB/18uDgRO9R2Oo6FX2vShkFzURFUq1whIj+8DI' . + '7EdAFjXv7MeNb0kuStsFEmIaajZaos2fy2Q4VGH7SGxn+Rzw9yMLOm/FzRhZazmOTkP4grYyD3B8j2PTyeFfZ+z7G3BeSS8lmprl' . + '2K2qcnK0Z5S8gPjrgAY8cNEWmq7u23pEos6/Zji+Kd0rLLGWwseA3joeZj/w4OET1g0vlmrWV+ydFnkUxSgsvM4V+YYIwfHz6cHB' . + 'ZeKZ1//Z'; + + //========================================================== + // lg-small.jpg + //========================================================== + $this->chars['g'][0] = 655; + $this->chars['g'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx' . + 'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjL/wAARCAAeABQDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAQCBQYH/8QAJxAAAQQBAwQCAgMAAAAAAAAA' . + 'AQIDBBEFAAYhBxIxQRNhcYEiQlH/xAAYAQACAwAAAAAAAAAAAAAAAAACAwABBP/EABkRAAMBAQEAAAAAAAAAAAAAAAABAhEhIv/a' . + 'AAwDAQACEQMRAD8AayO4t6bq3hmMHtxyLi4OKeKH5jyASiiQCCQeTRNAeB61FrBb+jTGpLO+BMW24EFMhkhpQru8m7B/H70x09Yi' . + 'q3nv/vLfwpnJ7UNkqSRbngf2ofWkpXV7brymC2malLfagurjW0aHk89xPJ9cX9aprURHWbYEaMHHEBfwpv8AnXPk+/8AdGqGJOxO' . + '4YbOSxK4y4boIStUWysgkEmxY54r60aOI8oTV9MHtjJwunPUbO46WWo0HLlD8KY4goboFVoquOVEVwLT963WdnxYfT6ZJyz0JvHm' . + 'KvtaSkW4tYNVSqKiTwB+fw5n9sY/cuOXCzDDcluyW3Ckd7V+0n0eNZTH9DdouFalHIOJBUhtDki0pNV3UALo81ehG6IdKjPZ6d47' . + '4ywltanVJvuJI+RQs/sHRqy2r003JhsImEc/CUyhxRZBjKV2oJ8eRXNmufPnRo1WIz3DdNn/2Q=='; + + //========================================================== + // lc-small.jpg + //========================================================== + $this->chars['c'][0] = 629; + $this->chars['c'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx' . + 'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjL/wAARCAAeABcDASIAAhEBAxEB/8QAGQAAAwEBAQAAAAAAAAAAAAAAAAUGBwID/8QALRAAAgICAQIEBAYDAAAAAAAA' . + 'AQIDBAURACExBhIiQRMVUWEHMkJScYFykaH/xAAWAQEBAQAAAAAAAAAAAAAAAAABAgP/xAAXEQEBAQEAAAAAAAAAAAAAAAAAATER' . + '/9oADAMBAAIRAxEAPwDcoGkmiT4Q8kWvzuPU38D2/v8A1zwrCFayq1qTaFk2H7aJHt05MeMvENzC4upDWkjW9kJXiricAJCigvJN' . + 'IB1IVQT5frrv24twPgunk6a288crbklUSJNNdnSTZ2STHHqOP/Eb17njdZtAoqwEvrEiGVyG117/AG6HhyV8H1sljMldoxXTksGC' . + 'zV7M0oaWGQOVeGQ92I6EMR22D11w4LmEPjaOL51iL8ssc9Z69zHtZkYCGGeQK0ez2UEoU39wCeX1S/LLiEt+mPSbMLxsGVv2kEjR' . + '305xkaEV/GTULMUT1LD/AAGh8gIZS2jv+vpybb8NMIb0dVLWYWgiiU0vmMphOj6V0TvQI3rfsON1E6dYjGtisa0F1mAWR2NhG0WZ' . + '3Ls3TqNs5Hc9h23w49NWL9K+Q/VD5T/zhwPH/9k='; + + //========================================================== + // d7-small.jpg + //========================================================== + $this->chars['7'][0] = 658; + $this->chars['7'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg' . + 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABgEFBwT/xAAuEAABAwIE' . + 'BAQGAwAAAAAAAAABAgMEBREABiExEhMiQSMyUXEHFBclVJFhk9L/xAAXAQADAQAAAAAAAAAAAAAAAAAAAQID/8QAGREBAQEAAwAA' . + 'AAAAAAAAAAAAAAEREiFR/9oADAMBAAIRAxEAPwDXq9mCjZeQ05VZ5ZST4bfEpa3VdglCbqUe+g9MZ5Uq7V8415WXoMSdQ6etgSps' . + '19wpkCMDZKUpv0FZvbi1NzpYasMDLDUbMVXrtQdbeeU23xLWkj5RlLYK0J7anW9gbAjCzkOtsVSUJUdtc6dVZK51UeaFm4LKbhpC' . + 'l7EhIFkDW974GbRI2XorUVls1OTdKAOqUpR0Hc3198GITQ6k+hLwrEpoODiDenRfW23bBicg78JXxPpD0mgVOW5PAivNNpahsPW5' . + '8xxQaSVkboQnhsnYm5OHqDGp1IpsalMKjMsMIC3+XZKbJFth62/QOEfMOZqZXp9JcKZTcGmTky3meSi7xQklI81vMR+sXIz/AEgp' . + 'Q0qPNu6ea8Q2jqtbp8+2w9h/OKORc/cpHjt1dDSHOtLZ4ekHW23bBjj+o9H/AB539aP94MG0+L//2Q=='; + + //========================================================== + // ly-small.jpg + //========================================================== + $this->chars['y'][0] = 672; + $this->chars['y'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx' . + 'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjL/wAARCAAeABQDASIAAhEBAxEB/8QAGAAAAwEBAAAAAAAAAAAAAAAAAAQGBQf/xAArEAABAwMEAQIFBQAAAAAAAAAB' . + 'AgMEBREhAAYSEzEHIhQkQVGxQmFxgaH/xAAWAQEBAQAAAAAAAAAAAAAAAAADAQL/xAAeEQEAAgEEAwAAAAAAAAAAAAABABECAxIh' . + 'MUGR8P/aAAwDAQACEQMRAD8Ar3tys07dVHohemz5dWQ7fk91MsA3IIRY8rkKFySceTqw3JVV0KhyKw+0C1CQp9aUOFSiAk4AIAvn' . + '76xtz0ioVvbcJ6msx2JtOfZmw1PKI5LQcJNh7UqBKcn6+NRfqPu6s1fYc6GxSJsRfWDUVSGA22ygEckJWSexRNgOP0udXzDKOJ0I' . + 'yo62mHm25Sy80l1Z4lSgpQvZRGLgWwPGjTjbchyLH+Ejx22EtJSgO8kki3kADA/nOjWjGzv73CyQZjUWNVp7bNSrj7qJDqflqUlQ' . + 'DMds24l3HvcNr3Pi9gME6T9WWVsemdYWswwC2lPta4m5WMA3OdUExCmozUJD6g84ntMjrHIFBTdQz5yLDx/WDNytpwW6nAkViqVe' . + 'uvmXdlme6n4dCwlRBKEgA2tj99QG7Ilncp5QqpU31PMsJ6x7A32f6SPxo0hPVCD45oVyKf0MtgeT97/nRrO7UOCFla3tn//Z'; + + //========================================================== + // d3-small.jpg + //========================================================== + $this->chars['3'][0] = 662; + $this->chars['3'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg' . + 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABAUGBwL/xAArEAABBAED' . + 'AwMDBQEAAAAAAAABAgMEBREABhIhMUEiMmETFZEHFkJDUdH/xAAWAQEBAQAAAAAAAAAAAAAAAAABAAL/xAAYEQEBAQEBAAAAAAAA' . + 'AAAAAAAAEQExQf/aAAwDAQACEQMRAD8A0vclruBdk3VVLLUNssGRJsZSCtqOjlgJAHvcOD6c4HnOdIbcttw1W5P29cFEhuawqTXS' . + 'VsJjnCMBxKkJJx7goAde+ceJfdNxU0UNlyymyXHi6kxWUNl1S3EnkAEIHX2nv86qtTuZr9Q9+1VhRsOoYpYcgSVyAE/TdewkJxnK' . + 'sBCjkdPGpnOtFMd3PqsXgfOAgD8Y0aX+11H9rDDjn8lr9yj5J+dGqsqxaw6Cc9cQZU4Sp7zTJsIrKlcUEKwhSin1JABI45GUjqOu' . + 'lbOvjbc3Ts9ynjGCy445UuFLYRzbWgrT6fhSCQSMDke+pew2zYVly/d7YchNqkMJZnQpgV9J8IzwWFJyUrAJHYgjvpLbu37G5nR7' . + 'vck5C3YRKYEOEVJZj8kjKypXqWvirjk9h+dB9i4faa89TDZUfKlIyT8k+To10a6KTkpcJ/0vL/7o0TS//9k='; + + //========================================================== + // ln-small.jpg + //========================================================== + $this->chars['n'][0] = 643; + $this->chars['n'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx' . + 'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjL/wAARCAAeABQDASIAAhEBAxEB/8QAGwAAAgEFAAAAAAAAAAAAAAAAAAYCAQMEBQf/xAAtEAACAQMCBAUCBwAAAAAA' . + 'AAABAgMEBREAIQYSE0EHIjFRcWGRIzIzQoGCwf/EABYBAQEBAAAAAAAAAAAAAAAAAAMEAP/EABkRAQEBAQEBAAAAAAAAAAAAAAEA' . + 'AhEhUf/aAAwDAQACEQMRAD8A6FR3p7v4oV9rlkMQsjL00RyOss0KkFxnDcrc2PbI1NOJKyTjW+W5OmKeA0UEJx5meRZS2/8AUfbS' . + 'LVGS1+K16vCzfiR3GmoqqXGyxz06hWPsFlVMfOmq1iNvE69KjBYo3oJMZ3GKeYYPxg/fW+xzZX1FLQyxwSTcpWNceu4G3+aNSmpY' . + 'qmQzzwh2k8yhv2r2H23/AJ0aoy+EWh7I1ntacR3PxDtEzhjWy0wkkIwYmanU5GO6sNh7rrU8AVdTceNbhDXxNHUQvS0tZ3DzwxVA' . + 'fB7hj59/XJ08cPWaKj4gvlwSQiG7dCboqvLy9NOmQT9SM7ayJrBa6K5V91hjlWorp4JGUOAglRSiMMDb82/vgaBGTpVvtNUVtyJg' . + '5+WNAh5ZCu/r2+dGrgq0pi0DhmlRsSSAfqMd+b6ZyNu3po1Rk1yNBe3/2Q=='; + + //========================================================== + // lu-small.jpg + //========================================================== + $this->chars['u'][0] = 671; + $this->chars['u'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx' . + 'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjL/wAARCAAeABcDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAYDBAUH/8QAJRAAAQQBAwQDAQEAAAAAAAAA' . + 'AQIDBBEFAAYhBxMxYRJBURSB/8QAFgEBAQEAAAAAAAAAAAAAAAAAAQAD/8QAGhEBAQEAAwEAAAAAAAAAAAAAAQARITFBAv/aAAwD' . + 'AQACEQMRAD8A6dLkQmJzu3WVtHIqjf0duKFNuBr5UTQ45F1R8/XI1PMmsYoJyjhS9iI7BKHeKjkXZVXqhyLHP+rrHeR1pZlx1W1M' . + 'wTiW0ukkrS28nn5fV2SPPFfurHUKQhzYG7pLYKEfyBhaSOS7dG/YCki/uvWn3LPDOJrwa4kyEzOYeakqkpC3Hk0bNePQHgDRpchY' . + 'leIZwzUWauKtuPctTSUlCAUmrBHIKuAPV/ujQsmHdm7hya43UbbD3ZVElOQJsdTS6IQaQUqBHCk8E2Pocgam6oYwObHy0Zm0oi45' . + 'T1KBPdpV2f0pom/1Ws7cmPazu98Ltvcq3VzRHfehz8a4pirFEKRZo8eQT+eCdWYfS/b+WYnxpbuVcDRMdHcyTqg2fiAfiLoi+Rf+' . + 'jT7Xc74HtOYnHyUOh8yWUvKeHhy0CiPVUAPoDRrm+OeznTva6lzsyMjCYbbaiNJjJSWElagD5tRpNUSALFeNGoOCH7Bv/9k='; + + //========================================================== + // lw-small.jpg + //========================================================== + $this->chars['w'][0] = 673; + $this->chars['w'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx' . + 'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjL/wAARCAAeABcDASIAAhEBAxEB/8QAGAAAAgMAAAAAAAAAAAAAAAAAAAYDBAX/xAAtEAACAQMDAgMHBQAAAAAAAAAB' . + 'AgMEBREABhIhMRMUQRUiIzJRYZEWNIGx0f/EABYBAQEBAAAAAAAAAAAAAAAAAAABA//EABoRAAICAwAAAAAAAAAAAAAAAAABERIh' . + 'MVH/2gAMAwEAAhEDEQA/AHXbV13ZLu6t2/uaa1JijWopVp4XUTKSAXRyc+6ehBGeoPbTSlwpql0K3GneqpZViqUhI5JzGMEZJGeh' . + 'GlXfaFILDf7FQzXC426rDLTojs8sLqVkXBGcfKf40twWbdWzZY75R0s90ul3jPtKjVMJDNn4DDp8iEhW+wJ1WZG2KWt3Lv26U1tv' . + '92o7PaYkgYUbqVepYlmUBlIwqnB++O2jTDt/bBtth9jcpvEWNGqalZQryTlmeR8jPct6+mNGmRC4a1U13htzVFItB5nA/cyOUVfp' . + '7oz/ALqitJulYJKuqvFsppHALLFb3cp9FBaXr+O51bq0q6i38KK5PDVAAxSzU6SIpz3Kjjn8jUFoS7uFmut1gq17xLFQ+DxOccj8' . + 'Rsn+tVpiyJnqv09YfOXu5AycgZZQEhBZjgDBOOgwO/po0sttWHdNzqLruioa4UwmdaC3kYp4IwSvJlBHKQ4OSe3po0qxM6P/2Q=='; + + //========================================================== + // lq-small.jpg + //========================================================== + $this->chars['q'][0] = 671; + $this->chars['q'][1] = + '/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx' . + 'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy' . + 'MjIyMjIyMjL/wAARCAAeABQDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAcDBAUG/8QAKRAAAQQBBAICAQQDAAAAAAAA' . + 'AQIDBBEFAAYSIQcxIlETCBQVgSNBYf/EABUBAQEAAAAAAAAAAAAAAAAAAAAB/8QAFhEBAQEAAAAAAAAAAAAAAAAAAAER/9oADAMB' . + 'AAIRAxEAPwDT3H5Qz+O3LN2vtrF/y86NYLzzVlAABJITQPv2a/17vXMboz3lDEYWPuafNx7CFrS03+2jpK2bs0CUkUa7pRvrUu63' . + 'sr438yv7pLEo4XIK5Kcji0uJUkckm+uQUOVH6GsnyJv7A5vaJwuFdkONLmolgONFH4vioKRXYqyCADXvRMh0yspmZ4jyIEtDTK47' . + 'aiA0lQUopBJBI/7X9aNT7amRo228e3a31iO3yUzCcdSPiKAIFdCho0TIswZ7GQlO/hlRxBooih1YXzAoKUkX0LPEBX110dJ7zbuv' . + 'AORpO04cIpmxH23FSEIRwKuNnsdk0o31702XhFMKbuRUZJWP8LTQ6HBCuIB+iVWSR2BXuqK93/hDlvGzEphmG3Ml5JpDi1I7TzNA' . + 'BYFlPafY+/7LBiv1CYDH4iFDOGySlMR22lFP4wCUpANfL11o1r4bxXlWMNEaE/bqlIbCFl/ANPK5Do/M0VDr2Rf3o0TX/9k='; + + } +} + +class AntiSpam +{ + + private $iData = ''; + private $iDD = null; + + public function __construct($aData = '') + { + $this->iData = $aData; + $this->iDD = new HandDigits(); + } + + public function Set($aData) + { + $this->iData = $aData; + } + + public function Rand($aLen) + { + $d = ''; + for ($i = 0; $i < $aLen; ++$i) { + if (rand(0, 9) < 6) { + // Digits + $d .= chr(ord('1') + rand(0, 8)); + } else { + // Letters + do { + $offset = rand(0, 25); + } while ($offset == 14); + $d .= chr(ord('a') + $offset); + } + } + $this->iData = $d; + return $d; + } + + public function Stroke() + { + + $n = strlen($this->iData); + if ($n == 0) { + return false; + } + + for ($i = 0; $i < $n; ++$i) { + if ($this->iData[$i] === '0' || strtolower($this->iData[$i]) === 'o') { + return false; + } + } + + $img = @imagecreatetruecolor($n * $this->iDD->iWidth, $this->iDD->iHeight); + if ($img < 1) { + return false; + } + + $start = 0; + for ($i = 0; $i < $n; ++$i) { + $dimg = imagecreatefromstring(base64_decode($this->iDD->chars[strtolower($this->iData[$i])][1])); + imagecopy($img, $dimg, $start, 0, 0, 0, imagesx($dimg), $this->iDD->iHeight); + $start += imagesx($dimg); + } + $resimg = @imagecreatetruecolor($start + 4, $this->iDD->iHeight + 4); + if ($resimg < 1) { + return false; + } + + imagecopy($resimg, $img, 2, 2, 0, 0, $start, $this->iDD->iHeight); + header("Content-type: image/jpeg"); + imagejpeg($resimg); + return true; + } +} diff --git a/vendor/amenadiel/jpgraph/src/lang/de.inc.php b/vendor/amenadiel/jpgraph/src/lang/de.inc.php new file mode 100644 index 0000000000..8e41c2c33e --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/lang/de.inc.php @@ -0,0 +1,542 @@ +,) +$_jpg_messages = array( + +/* + ** Headers wurden bereits gesendet - Fehler. Dies wird als HTML formatiert, weil es direkt als text zurueckgesendet wird + */ + 10 => array('
        JpGraph Fehler: +HTTP header wurden bereits gesendet.
        Fehler in der Datei %s in der Zeile %d.
        Erklärung:
        HTTP header wurden bereits zum Browser gesendet, wobei die Daten als Text gekennzeichnet wurden, bevor die Bibliothek die Chance hatte, seinen Bild-HTTP-Header zum Browser zu schicken. Dies verhindert, dass die Bibliothek Bilddaten zum Browser schicken kann (weil sie vom Browser als Text interpretiert würden und daher nur Mist dargestellt würde).

        Wahrscheinlich steht Text im Skript bevor Graph::Stroke() aufgerufen wird. Wenn dieser Text zum Browser gesendet wird, nimmt dieser an, dass die gesamten Daten aus Text bestehen. Such nach irgendwelchem Text, auch nach Leerzeichen und Zeilenumbrüchen, die eventuell bereits zum Browser gesendet wurden.

        Zum Beispiel ist ein oft auftretender Fehler, eine Leerzeile am Anfang der Datei oder vor Graph::Stroke() zu lassen."<?php".

        ', 2), + +/* + ** Setup Fehler + */ + 11 => array('Es wurde kein Pfad für CACHE_DIR angegeben. Bitte gib einen Pfad CACHE_DIR in der Datei jpg-config.inc an.', 0), + 12 => array('Es wurde kein Pfad für TTF_DIR angegeben und der Pfad kann nicht automatisch ermittelt werden. Bitte gib den Pfad in der Datei jpg-config.inc an.', 0), + 13 => array('The installed PHP version (%s) is not compatible with this release of the library. The library requires at least PHP version %s', 2), + +/* + ** jpgraph_bar + */ + + 2001 => array('Die Anzahl der Farben ist nicht gleich der Anzahl der Vorlagen in BarPlot::SetPattern().', 0), + 2002 => array('Unbekannte Vorlage im Aufruf von BarPlot::SetPattern().', 0), + 2003 => array('Anzahl der X- und Y-Koordinaten sind nicht identisch. Anzahl der X-Koordinaten: %d; Anzahl der Y-Koordinaten: %d.', 2), + 2004 => array('Alle Werte für ein Balkendiagramm (barplot) müssen numerisch sein. Du hast den Wert nr [%d] == %s angegeben.', 2), + 2005 => array('Du hast einen leeren Vektor für die Schattierungsfarben im Balkendiagramm (barplot) angegeben.', 0), + 2006 => array('Unbekannte Position für die Werte der Balken: %s.', 1), + 2007 => array('Kann GroupBarPlot nicht aus einem leeren Vektor erzeugen.', 0), + 2008 => array('GroupBarPlot Element nbr %d wurde nicht definiert oder ist leer.', 0), + 2009 => array('Eins der Objekte, das an GroupBar weitergegeben wurde ist kein Balkendiagramm (BarPlot). Versichere Dich, dass Du den GroupBarPlot aus einem Vektor von Balkendiagrammen (barplot) oder AccBarPlot-Objekten erzeugst. (Class = %s)', 1), + 2010 => array('Kann AccBarPlot nicht aus einem leeren Vektor erzeugen.', 0), + 2011 => array('AccBarPlot-Element nbr %d wurde nicht definiert oder ist leer.', 1), + 2012 => array('Eins der Objekte, das an AccBar weitergegeben wurde ist kein Balkendiagramm (barplot). Versichere Dich, dass Du den AccBar-Plot aus einem Vektor von Balkendiagrammen (barplot) erzeugst. (Class=%s)', 1), + 2013 => array('Du hast einen leeren Vektor für die Schattierungsfarben im Balkendiagramm (barplot) angegeben.', 0), + 2014 => array('Die Anzahl der Datenpunkte jeder Datenreihe in AccBarPlot muss gleich sein.', 0), + 2015 => array('Individual bar plots in an AccBarPlot or GroupBarPlot can not have specified X-coordinates', 0), + +/* + ** jpgraph_date + */ + + 3001 => array('Es ist nur möglich, entweder SetDateAlign() oder SetTimeAlign() zu benutzen, nicht beides!', 0), + +/* + ** jpgraph_error + */ + + 4002 => array('Fehler bei den Eingabedaten von LineErrorPlot. Die Anzahl der Datenpunkte mus ein Mehrfaches von drei sein!', 0), + +/* + ** jpgraph_flags + */ + + 5001 => array('Unbekannte Flaggen-Größe (%d).', 1), + 5002 => array('Der Flaggen-Index %s existiert nicht.', 1), + 5003 => array('Es wurde eine ungültige Ordnungszahl (%d) für den Flaggen-Index angegeben.', 1), + 5004 => array('Der Landesname %s hat kein korrespondierendes Flaggenbild. Die Flagge mag existieren, abr eventuell unter einem anderen Namen, z.B. versuche "united states" statt "usa".', 1), + +/* + ** jpgraph_gantt + */ + + 6001 => array('Interner Fehler. Die Höhe für ActivityTitles ist < 0.', 0), + 6002 => array('Es dürfen keine negativen Werte für die Gantt-Diagramm-Dimensionen angegeben werden. Verwende 0, wenn die Dimensionen automatisch ermittelt werden sollen.', 0), + 6003 => array('Ungültiges Format für den Bedingungs-Parameter bei Index=%d in CreateSimple(). Der Parameter muss bei index 0 starten und Vektoren in der Form (Row,Constrain-To,Constrain-Type) enthalten.', 1), + 6004 => array('Ungültiges Format für den Fortschritts-Parameter bei Index=%d in CreateSimple(). Der Parameter muss bei Index 0 starten und Vektoren in der Form (Row,Progress) enthalten.', 1), + 6005 => array('SetScale() ist nicht sinnvoll bei Gantt-Diagrammen.', 0), + 6006 => array('Das Gantt-Diagramm kann nicht automatisch skaliert werden. Es existieren keine Aktivitäten mit Termin. [GetBarMinMax() start >= n]', 0), + 6007 => array('Plausibiltätsprüfung für die automatische Gantt-Diagramm-Größe schlug fehl. Entweder die Breite (=%d) oder die Höhe (=%d) ist größer als MAX_GANTTIMG_SIZE. Dies kann möglicherweise durch einen falschen Wert bei einer Aktivität hervorgerufen worden sein.', 2), + 6008 => array('Du hast eine Bedingung angegeben von Reihe=%d bis Reihe=%d, die keine Aktivität hat.', 2), + 6009 => array('Unbekannter Bedingungstyp von Reihe=%d bis Reihe=%d', 2), + 6010 => array('Ungültiger Icon-Index für das eingebaute Gantt-Icon [%d]', 1), + 6011 => array('Argument für IconImage muss entweder ein String oder ein Integer sein.', 0), + 6012 => array('Unbekannter Typ bei der Gantt-Objekt-Title-Definition.', 0), + 6015 => array('Ungültige vertikale Position %d', 1), + 6016 => array('Der eingegebene Datums-String (%s) für eine Gantt-Aktivität kann nicht interpretiert werden. Versichere Dich, dass es ein gültiger Datumsstring ist, z.B. 2005-04-23 13:30', 1), + 6017 => array('Unbekannter Datumstyp in GanttScale (%s).', 1), + 6018 => array('Intervall für Minuten muss ein gerader Teiler einer Stunde sein, z.B. 1,5,10,12,15,20,30, etc. Du hast ein Intervall von %d Minuten angegeben.', 1), + 6019 => array('Die vorhandene Breite (%d) für die Minuten ist zu klein, um angezeigt zu werden. Bitte benutze die automatische Größenermittlung oder vergrößere die Breite des Diagramms.', 1), + 6020 => array('Das Intervall für die Stunden muss ein gerader Teiler eines Tages sein, z.B. 0:30, 1:00, 1:30, 4:00, etc. Du hast ein Intervall von %d eingegeben.', 1), + 6021 => array('Unbekanntes Format für die Woche.', 0), + 6022 => array('Die Gantt-Skala wurde nicht eingegeben.', 0), + 6023 => array('Wenn Du sowohl Stunden als auch Minuten anzeigen lassen willst, muss das Stunden-Interval gleich 1 sein (anderenfalls ist es nicht sinnvoll, Minuten anzeigen zu lassen).', 0), + 6024 => array('Das CSIM-Ziel muss als String angegeben werden. Der Start des Ziels ist: %d', 1), + 6025 => array('Der CSIM-Alt-Text muss als String angegeben werden. Der Beginn des Alt-Textes ist: %d', 1), + 6027 => array('Der Fortschrittswert muss im Bereich [0, 1] liegen.', 0), + 6028 => array('Die eingegebene Höhe (%d) für GanttBar ist nicht im zulässigen Bereich.', 1), + 6029 => array('Der Offset für die vertikale Linie muss im Bereich [0,1] sein.', 0), + 6030 => array('Unbekannte Pfeilrichtung für eine Verbindung.', 0), + 6031 => array('Unbekannter Pfeiltyp für eine Verbindung.', 0), + 6032 => array('Interner Fehler: Unbekannter Pfadtyp (=%d) für eine Verbindung.', 1), + 6033 => array('Array of fonts must contain arrays with 3 elements, i.e. (Family, Style, Size)', 0), + +/* + ** jpgraph_gradient + */ + + 7001 => array('Unbekannter Gradiententyp (=%d).', 1), + +/* + ** jpgraph_iconplot + */ + + 8001 => array('Der Mix-Wert für das Icon muss zwischen 0 und 100 sein.', 0), + 8002 => array('Die Ankerposition für Icons muss entweder "top", "bottom", "left", "right" oder "center" sein.', 0), + 8003 => array('Es ist nicht möglich, gleichzeitig ein Bild und eine Landesflagge für dasselbe Icon zu definieren', 0), + 8004 => array('Wenn Du Landesflaggen benutzen willst, musst Du die Datei "jpgraph_flags.php" hinzufügen (per include).', 0), + +/* + ** jpgraph_imgtrans + */ + + 9001 => array('Der Wert für die Bildtransformation ist außerhalb des zulässigen Bereichs. Der verschwindende Punkt am Horizont muss als Wert zwischen 0 und 1 angegeben werden.', 0), + +/* + ** jpgraph_lineplot + */ + + 10001 => array('Die Methode LinePlot::SetFilled() sollte nicht mehr benutzt werden. Benutze lieber SetFillColor()', 0), + 10002 => array('Der Plot ist zu kompliziert für FastLineStroke. Benutze lieber den StandardStroke()', 0), + 10003 => array('Each plot in an accumulated lineplot must have the same number of data points.', 0), +/* + ** jpgraph_log + */ + + 11001 => array('Deine Daten enthalten nicht-numerische Werte.', 0), + 11002 => array('Negative Werte können nicht für logarithmische Achsen verwendet werden.', 0), + 11003 => array('Deine Daten enthalten nicht-numerische Werte.', 0), + 11004 => array('Skalierungsfehler für die logarithmische Achse. Es gibt ein Problem mit den Daten der Achse. Der größte Wert muss größer sein als Null. Es ist mathematisch nicht möglich, einen Wert gleich Null in der Skala zu haben.', 0), + 11005 => array('Das Tick-Intervall für die logarithmische Achse ist nicht definiert. Lösche jeden Aufruf von SetTextLabelStart() oder SetTextTickInterval() bei der logarithmischen Achse.', 0), + +/* + ** jpgraph_mgraph + */ + + 12001 => array("Du benutzt GD 2.x und versuchst ein Nicht-Truecolor-Bild als Hintergrundbild zu benutzen. Um Hintergrundbilder mit GD 2.x zu benutzen, ist es notwendig Truecolor zu aktivieren, indem die USE_TRUECOLOR-Konstante auf TRUE gesetzt wird. Wegen eines Bugs in GD 2.0.1 ist die Qualität der Truetype-Schriften sehr schlecht, wenn man Truetype-Schriften mit Truecolor-Bildern verwendet.", 0), + 12002 => array('Ungültiger Dateiname für MGraph::SetBackgroundImage() : %s. Die Datei muss eine gültige Dateierweiterung haben (jpg,gif,png), wenn die automatische Typerkennung verwendet wird.', 1), + 12003 => array('Unbekannte Dateierweiterung (%s) in MGraph::SetBackgroundImage() für Dateiname: %s', 2), + 12004 => array('Das Bildformat des Hintergrundbildes (%s) wird von Deiner System-Konfiguration nicht unterstützt. ', 1), + 12005 => array('Das Hintergrundbild kann nicht gelesen werden: %s', 1), + 12006 => array('Es wurden ungültige Größen für Breite oder Höhe beim Erstellen des Bildes angegeben, (Breite=%d, Höhe=%d)', 2), + 12007 => array('Das Argument für MGraph::Add() ist nicht gültig für GD.', 0), + 12008 => array('Deine PHP- (und GD-lib-) Installation scheint keine bekannten Bildformate zu unterstützen.', 0), + 12009 => array('Deine PHP-Installation unterstützt das gewählte Bildformat nicht: %s', 1), + 12010 => array('Es konnte kein Bild als Datei %s erzeugt werden. Überprüfe, ob Du die entsprechenden Schreibrechte im aktuellen Verzeichnis hast.', 1), + 12011 => array('Es konnte kein Truecolor-Bild erzeugt werden. Überprüfe, ob Du wirklich die GD2-Bibliothek installiert hast.', 0), + 12012 => array('Es konnte kein Bild erzeugt werden. Überprüfe, ob Du wirklich die GD2-Bibliothek installiert hast.', 0), + +/* + ** jpgraph_pie3d + */ + + 14001 => array('Pie3D::ShowBorder(). Missbilligte Funktion. Benutze Pie3D::SetEdge(), um die Ecken der Tortenstücke zu kontrollieren.', 0), + 14002 => array('PiePlot3D::SetAngle() 3D-Torten-Projektionswinkel muss zwischen 5 und 85 Grad sein.', 0), + 14003 => array('Interne Festlegung schlug fehl. Pie3D::Pie3DSlice', 0), + 14004 => array('Tortenstück-Startwinkel muss zwischen 0 und 360 Grad sein.', 0), + 14005 => array('Pie3D Interner Fehler: Versuch, zweimal zu umhüllen bei der Suche nach dem Startindex.', 0), + 14006 => array('Pie3D Interner Fehler: Z-Sortier-Algorithmus für 3D-Tortendiagramme funktioniert nicht einwandfrei (2). Versuch, zweimal zu umhüllen beim Erstellen des Bildes.', 0), + 14007 => array('Die Breite für das 3D-Tortendiagramm ist 0. Gib eine Breite > 0 an.', 0), + +/* + ** jpgraph_pie + */ + + 15001 => array('PiePLot::SetTheme() Unbekannter Stil: %s', 1), + 15002 => array('Argument für PiePlot::ExplodeSlice() muss ein Integer-Wert sein', 0), + 15003 => array('Argument für PiePlot::Explode() muss ein Vektor mit Integer-Werten sein.', 0), + 15004 => array('Tortenstück-Startwinkel muss zwischen 0 und 360 Grad sein.', 0), + 15005 => array('PiePlot::SetFont() sollte nicht mehr verwendet werden. Benutze stattdessen PiePlot->value->SetFont().', 0), + 15006 => array('PiePlot::SetSize() Radius für Tortendiagramm muss entweder als Bruch [0, 0.5] der Bildgröße oder als Absoluwert in Pixel im Bereich [10, 1000] angegeben werden.', 0), + 15007 => array('PiePlot::SetFontColor() sollte nicht mehr verwendet werden. Benutze stattdessen PiePlot->value->SetColor()..', 0), + 15008 => array('PiePlot::SetLabelType() der Typ für Tortendiagramme muss entweder 0 or 1 sein (nicht %d).', 1), + 15009 => array('Ungültiges Tortendiagramm. Die Summe aller Daten ist Null.', 0), + 15010 => array('Die Summe aller Daten ist Null.', 0), + 15011 => array('Um Bildtransformationen benutzen zu können, muss die Datei jpgraph_imgtrans.php eingefügt werden (per include).', 0), // @todo translate into German + 15012 => array('PiePlot::SetTheme() is no longer recommended. Use PieGraph::SetTheme()', 0), + +/* + ** jpgraph_plotband + */ + + 16001 => array('Die Dichte für das Pattern muss zwischen 1 und 100 sein. (Du hast %f eingegeben)', 1), + 16002 => array('Es wurde keine Position für das Pattern angegeben.', 0), + 16003 => array('Unbekannte Pattern-Definition (%d)', 0), + 16004 => array('Der Mindeswert für das PlotBand ist größer als der Maximalwert. Bitte korrigiere dies!', 0), + +/* + ** jpgraph_polar + */ + + 17001 => array('PolarPlots müssen eine gerade Anzahl von Datenpunkten haben. Jeder Datenpunkt ist ein Tupel (Winkel, Radius).', 0), + 17002 => array('Unbekannte Ausrichtung für X-Achsen-Titel. (%s)', 1), + //17003 => array('Set90AndMargin() wird für PolarGraph nicht unterstützt.',0), + 17004 => array('Unbekannter Achsentyp für PolarGraph. Er muss entweder \'lin\' oder \'log\' sein.', 0), + +/* + ** jpgraph_radar + */ + + 18001 => array('ClientSideImageMaps werden für RadarPlots nicht unterstützt.', 0), + 18002 => array('RadarGraph::SupressTickMarks() sollte nicht mehr verwendet werden. Benutze stattdessen HideTickMarks().', 0), + 18003 => array('Ungültiger Achsentyp für RadarPlot (%s). Er muss entweder \'lin\' oder \'log\' sein.', 1), + 18004 => array('Die RadarPlot-Größe muss zwischen 0.1 und 1 sein. (Dein Wert=%f)', 1), + 18005 => array('RadarPlot: nicht unterstützte Tick-Dichte: %d', 1), + 18006 => array('Minimum Daten %f (RadarPlots sollten nur verwendet werden, wenn alle Datenpunkte einen Wert > 0 haben).', 1), + 18007 => array('Die Anzahl der Titel entspricht nicht der Anzahl der Datenpunkte.', 0), + 18008 => array('Jeder RadarPlot muss die gleiche Anzahl von Datenpunkten haben.', 0), + +/* + ** jpgraph_regstat + */ + + 19001 => array('Spline: Anzahl der X- und Y-Koordinaten muss gleich sein.', 0), + 19002 => array('Ungültige Dateneingabe für Spline. Zwei oder mehr aufeinanderfolgende X-Werte sind identisch. Jeder eigegebene X-Wert muss unterschiedlich sein, weil vom mathematischen Standpunkt ein Eins-zu-Eins-Mapping vorliegen muss, d.h. jeder X-Wert korrespondiert mit exakt einem Y-Wert.', 0), + 19003 => array('Bezier: Anzahl der X- und Y-Koordinaten muss gleich sein.', 0), + +/* + ** jpgraph_scatter + */ + + 20001 => array('Fieldplots müssen die gleiche Anzahl von X und Y Datenpunkten haben.', 0), + 20002 => array('Bei Fieldplots muss ein Winkel für jeden X und Y Datenpunkt angegeben werden.', 0), + 20003 => array('Scatterplots müssen die gleiche Anzahl von X- und Y-Datenpunkten haben.', 0), + +/* + ** jpgraph_stock + */ + + 21001 => array('Die Anzahl der Datenwerte für Stock-Charts müssen ein Mehrfaches von %d Datenpunkten sein.', 1), + +/* + ** jpgraph_plotmark + */ + + 23001 => array('Der Marker "%s" existiert nicht in der Farbe: %d', 2), + 23002 => array('Der Farb-Index ist zu hoch für den Marker "%s"', 1), + 23003 => array('Ein Dateiname muss angegeben werden, wenn Du den Marker-Typ auf MARK_IMG setzt.', 0), + +/* + ** jpgraph_utils + */ + + 24001 => array('FuncGenerator : Keine Funktion definiert. ', 0), + 24002 => array('FuncGenerator : Syntax-Fehler in der Funktionsdefinition ', 0), + 24003 => array('DateScaleUtils: Unknown tick type specified in call to GetTicks()', 0), + 24004 => array('ReadCSV2: Die anzahl der spalten fehler in %s reihe %d', 2), +/* + ** jpgraph + */ + + 25001 => array('Diese PHP-Installation ist nicht mit der GD-Bibliothek kompiliert. Bitte kompiliere PHP mit GD-Unterstützung neu, damit JpGraph funktioniert. (Weder die Funktion imagetypes() noch imagecreatefromstring() existiert!)', 0), + 25002 => array('Diese PHP-Installation scheint nicht die benötigte GD-Bibliothek zu unterstützen. Bitte schau in der PHP-Dokumentation nach, wie man die GD-Bibliothek installiert und aktiviert.', 0), + 25003 => array('Genereller PHP Fehler : Bei %s:%d : %s', 3), + 25004 => array('Genereller PHP Fehler : %s ', 1), + 25005 => array('PHP_SELF, die PHP-Global-Variable kann nicht ermittelt werden. PHP kann nicht von der Kommandozeile gestartet werden, wenn der Cache oder die Bilddateien automatisch benannt werden sollen.', 0), + 25006 => array('Die Benutzung der FF_CHINESE (FF_BIG5) Schriftfamilie benötigt die iconv() Funktion in Deiner PHP-Konfiguration. Dies wird nicht defaultmäßig in PHP kompiliert (benötigt "--width-iconv" bei der Konfiguration).', 0), + 25007 => array('Du versuchst das lokale (%s) zu verwenden, was von Deiner PHP-Installation nicht unterstützt wird. Hinweis: Benutze \'\', um das defaultmäßige Lokale für diese geographische Region festzulegen.', 1), + 25008 => array('Die Bild-Breite und Höhe in Graph::Graph() müssen numerisch sein', 0), + 25009 => array('Die Skalierung der Achsen muss angegeben werden mit Graph::SetScale()', 0), + + 25010 => array('Graph::Add() Du hast versucht, einen leeren Plot zum Graph hinzuzufügen.', 0), + 25011 => array('Graph::AddY2() Du hast versucht, einen leeren Plot zum Graph hinzuzufügen.', 0), + 25012 => array('Graph::AddYN() Du hast versucht, einen leeren Plot zum Graph hinzuzufügen.', 0), + 25013 => array('Es können nur Standard-Plots zu multiplen Y-Achsen hinzugefügt werden', 0), + 25014 => array('Graph::AddText() Du hast versucht, einen leeren Text zum Graph hinzuzufügen.', 0), + 25015 => array('Graph::AddLine() Du hast versucht, eine leere Linie zum Graph hinzuzufügen.', 0), + 25016 => array('Graph::AddBand() Du hast versucht, ein leeres Band zum Graph hinzuzufügen.', 0), + 25017 => array('Du benutzt GD 2.x und versuchst, ein Hintergrundbild in einem Truecolor-Bild zu verwenden. Um Hintergrundbilder mit GD 2.x zu verwenden, ist es notwendig, Truecolor zu aktivieren, indem die USE_TRUECOLOR-Konstante auf TRUE gesetzt wird. Wegen eines Bugs in GD 2.0.1 ist die Qualität der Schrift sehr schlecht, wenn Truetype-Schrift in Truecolor-Bildern verwendet werden.', 0), + 25018 => array('Falscher Dateiname für Graph::SetBackgroundImage() : "%s" muss eine gültige Dateinamenerweiterung (jpg,gif,png) haben, wenn die automatische Dateityperkennung verwenndet werden soll.', 1), + 25019 => array('Unbekannte Dateinamenerweiterung (%s) in Graph::SetBackgroundImage() für Dateiname: "%s"', 2), + + 25020 => array('Graph::SetScale(): Dar Maximalwert muss größer sein als der Mindestwert.', 0), + 25021 => array('Unbekannte Achsendefinition für die Y-Achse. (%s)', 1), + 25022 => array('Unbekannte Achsendefinition für die X-Achse. (%s)', 1), + 25023 => array('Nicht unterstützter Y2-Achsentyp: "%s" muss einer von (lin,log,int) sein.', 1), + 25024 => array('Nicht unterstützter X-Achsentyp: "%s" muss einer von (lin,log,int) sein.', 1), + 25025 => array('Nicht unterstützte Tick-Dichte: %d', 1), + 25026 => array('Nicht unterstützter Typ der nicht angegebenen Y-Achse. Du hast entweder: 1. einen Y-Achsentyp für automatisches Skalieren definiert, aber keine Plots angegeben. 2. eine Achse direkt definiert, aber vergessen, die Tick-Dichte zu festzulegen.', 0), + 25027 => array('Kann cached CSIM "%s" zum Lesen nicht öffnen.', 1), + 25028 => array('Apache/PHP hat keine Schreibrechte, in das CSIM-Cache-Verzeichnis (%s) zu schreiben. Überprüfe die Rechte.', 1), + 25029 => array('Kann nicht in das CSIM "%s" schreiben. Überprüfe die Schreibrechte und den freien Speicherplatz.', 1), + + 25030 => array('Fehlender Skriptname für StrokeCSIM(). Der Name des aktuellen Skriptes muss als erster Parameter von StrokeCSIM() angegeben werden.', 0), + 25031 => array('Der Achsentyp muss mittels Graph::SetScale() angegeben werden.', 0), + 25032 => array('Es existieren keine Plots für die Y-Achse nbr:%d', 1), + 25033 => array('', 0), + 25034 => array('Undefinierte X-Achse kann nicht gezeichnet werden. Es wurden keine Plots definiert.', 0), + 25035 => array('Du hast Clipping aktiviert. Clipping wird nur für Diagramme mit 0 oder 90 Grad Rotation unterstützt. Bitte verändere Deinen Rotationswinkel (=%d Grad) dementsprechend oder deaktiviere Clipping.', 1), + 25036 => array('Unbekannter Achsentyp AxisStyle() : %s', 1), + 25037 => array('Das Bildformat Deines Hintergrundbildes (%s) wird von Deiner System-Konfiguration nicht unterstützt. ', 1), + 25038 => array('Das Hintergrundbild scheint von einem anderen Typ (unterschiedliche Dateierweiterung) zu sein als der angegebene Typ. Angegebenen: %s; Datei: %s', 2), + 25039 => array('Hintergrundbild kann nicht gelesen werden: "%s"', 1), + + 25040 => array('Es ist nicht möglich, sowohl ein Hintergrundbild als auch eine Hintergrund-Landesflagge anzugeben.', 0), + 25041 => array('Um Landesflaggen als Hintergrund benutzen zu können, muss die Datei "jpgraph_flags.php" eingefügt werden (per include).', 0), + 25042 => array('Unbekanntes Hintergrundbild-Layout', 0), + 25043 => array('Unbekannter Titelhintergrund-Stil.', 0), + 25044 => array('Automatisches Skalieren kann nicht verwendet werden, weil es unmöglich ist, einen gültigen min/max Wert für die Y-Achse zu ermitteln (nur Null-Werte).', 0), + 25045 => array('Die Schriftfamilien FF_HANDWRT und FF_BOOK sind wegen Copyright-Problemen nicht mehr verfügbar. Diese Schriften können nicht mehr mit JpGraph verteilt werden. Bitte lade Dir Schriften von http://corefonts.sourceforge.net/ herunter.', 0), + 25046 => array('Angegebene TTF-Schriftfamilie (id=%d) ist unbekannt oder existiert nicht. Bitte merke Dir, dass TTF-Schriften wegen Copyright-Problemen nicht mit JpGraph mitgeliefert werden. Du findest MS-TTF-Internetschriften (arial, courier, etc.) zum Herunterladen unter http://corefonts.sourceforge.net/', 1), + 25047 => array('Stil %s ist nicht verfügbar für Schriftfamilie %s', 2), + 25048 => array('Unbekannte Schriftstildefinition [%s].', 1), + 25049 => array('Schriftdatei "%s" ist nicht lesbar oder existiert nicht.', 1), + + 25050 => array('Erstes Argument für Text::Text() muss ein String sein.', 0), + 25051 => array('Ungültige Richtung angegeben für Text.', 0), + 25052 => array('PANIK: Interner Fehler in SuperScript::Stroke(). Unbekannte vertikale Ausrichtung für Text.', 0), + 25053 => array('PANIK: Interner Fehler in SuperScript::Stroke(). Unbekannte horizontale Ausrichtung für Text.', 0), + 25054 => array('Interner Fehler: Unbekannte Grid-Achse %s', 1), + 25055 => array('Axis::SetTickDirection() sollte nicht mehr verwendet werden. Benutze stattdessen Axis::SetTickSide().', 0), + 25056 => array('SetTickLabelMargin() sollte nicht mehr verwendet werden. Benutze stattdessen Axis::SetLabelMargin().', 0), + 25057 => array('SetTextTicks() sollte nicht mehr verwendet werden. Benutze stattdessen SetTextTickInterval().', 0), + 25058 => array('TextLabelIntevall >= 1 muss angegeben werden.', 0), + 25059 => array('SetLabelPos() sollte nicht mehr verwendet werden. Benutze stattdessen Axis::SetLabelSide().', 0), + + 25060 => array('Unbekannte Ausrichtung angegeben für X-Achsentitel (%s).', 1), + 25061 => array('Unbekannte Ausrichtung angegeben für Y-Achsentitel (%s).', 1), + 25062 => array('Label unter einem Winkel werden für die Y-Achse nicht unterstützt.', 0), + 25063 => array('Ticks::SetPrecision() sollte nicht mehr verwendet werden. Benutze stattdessen Ticks::SetLabelFormat() (oder Ticks::SetFormatCallback()).', 0), + 25064 => array('Kleinere oder größere Schrittgröße ist 0. Überprüfe, ob Du fälschlicherweise SetTextTicks(0) in Deinem Skript hast. Wenn dies nicht der Fall ist, bist Du eventuell über einen Bug in JpGraph gestolpert. Bitte sende einen Report und füge den Code an, der den Fehler verursacht hat.', 0), + 25065 => array('Tick-Positionen müssen als array() angegeben werden', 0), + 25066 => array('Wenn die Tick-Positionen und -Label von Hand eingegeben werden, muss die Anzahl der Ticks und der Label gleich sein.', 0), + 25067 => array('Deine von Hand eingegebene Achse und Ticks sind nicht korrekt. Die Skala scheint zu klein zu sein für den Tickabstand.', 0), + 25068 => array('Ein Plot hat eine ungültige Achse. Dies kann beispielsweise der Fall sein, wenn Du automatisches Text-Skalieren verwendest, um ein Liniendiagramm zu zeichnen mit nur einem Datenpunkt, oder wenn die Bildfläche zu klein ist. Es kann auch der Fall sein, dass kein Datenpunkt einen numerischen Wert hat (vielleicht nur \'-\' oder \'x\').', 0), + 25069 => array('Grace muss größer sein als 0', 0), + + 25070 => array('Deine Daten enthalten nicht-numerische Werte.', 0), + 25071 => array('Du hast mit SetAutoMin() einen Mindestwert angegeben, der größer ist als der Maximalwert für die Achse. Dies ist nicht möglich.', 0), + 25072 => array('Du hast mit SetAutoMax() einen Maximalwert angegeben, der kleiner ist als der Minimalwert der Achse. Dies ist nicht möglich.', 0), + 25073 => array('Interner Fehler. Der Integer-Skalierungs-Algorithmus-Vergleich ist außerhalb der Grenzen (r=%f).', 1), + 25074 => array('Interner Fehler. Der Skalierungsbereich ist negativ (%f) [für %s Achse]. Dieses Problem könnte verursacht werden durch den Versuch, \'ungültige\' Werte in die Daten-Vektoren einzugeben (z.B. nur String- oder NULL-Werte), was beim automatischen Skalieren einen Fehler erzeugt.', 2), + 25075 => array('Die automatischen Ticks können nicht gesetzt werden, weil min==max.', 0), + 25077 => array('Einstellfaktor für die Farbe muss größer sein als 0', 0), + 25078 => array('Unbekannte Farbe: %s', 1), + 25079 => array('Unbekannte Farbdefinition: %s, Größe=%d', 2), + + 25080 => array('Der Alpha-Parameter für Farben muss zwischen 0.0 und 1.0 liegen.', 0), + 25081 => array('Das ausgewählte Grafikformat wird entweder nicht unterstützt oder ist unbekannt [%s]', 1), + 25082 => array('Es wurden ungültige Größen für Breite und Höhe beim Erstellen des Bildes definiert (Breite=%d, Höhe=%d).', 2), + 25083 => array('Es wurde eine ungültige Größe beim Kopieren des Bildes angegeben. Die Größe für das kopierte Bild wurde auf 1 Pixel oder weniger gesetzt.', 0), + 25084 => array('Fehler beim Erstellen eines temporären GD-Canvas. Möglicherweise liegt ein Arbeitsspeicherproblem vor.', 0), + 25085 => array('Ein Bild kann nicht aus dem angegebenen String erzeugt werden. Er ist entweder in einem nicht unterstützen Format oder er represäntiert ein kaputtes Bild.', 0), + 25086 => array('Du scheinst nur GD 1.x installiert zu haben. Um Alphablending zu aktivieren, ist GD 2.x oder höher notwendig. Bitte installiere GD 2.x oder versichere Dich, dass die Konstante USE_GD2 richtig gesetzt ist. Standardmäßig wird die installierte GD-Version automatisch erkannt. Ganz selten wird GD2 erkannt, obwohl nur GD1 installiert ist. Die Konstante USE_GD2 muss dann zu "false" gesetzt werden.', 0), + 25087 => array('Diese PHP-Version wurde ohne TTF-Unterstützung konfiguriert. PHP muss mit TTF-Unterstützung neu kompiliert und installiert werden.', 0), + 25088 => array('Die GD-Schriftunterstützung wurde falsch konfiguriert. Der Aufruf von imagefontwidth() ist fehlerhaft.', 0), + 25089 => array('Die GD-Schriftunterstützung wurde falsch konfiguriert. Der Aufruf von imagefontheight() ist fehlerhaft.', 0), + + 25090 => array('Unbekannte Richtung angegeben im Aufruf von StrokeBoxedText() [%s].', 1), + 25091 => array('Die interne Schrift untestützt das Schreiben von Text in einem beliebigen Winkel nicht. Benutze stattdessen TTF-Schriften.', 0), + 25092 => array('Es liegt entweder ein Konfigurationsproblem mit TrueType oder ein Problem beim Lesen der Schriftdatei "%s" vor. Versichere Dich, dass die Datei existiert und Leserechte und -pfad vergeben sind. (wenn \'basedir\' restriction in PHP aktiviert ist, muss die Schriftdatei im Dokumentwurzelverzeichnis abgelegt werden). Möglicherweise ist die FreeType-Bibliothek falsch installiert. Versuche, mindestens zur FreeType-Version 2.1.13 zu aktualisieren und kompiliere GD mit einem korrekten Setup neu, damit die FreeType-Bibliothek gefunden werden kann.', 1), + 25093 => array('Die Schriftdatei "%s" kann nicht gelesen werden beim Aufruf von Image::GetBBoxTTF. Bitte versichere Dich, dass die Schrift gesetzt wurde, bevor diese Methode aufgerufen wird, und dass die Schrift im TTF-Verzeichnis installiert ist.', 1), + 25094 => array('Die Textrichtung muss in einem Winkel zwischen 0 und 90 engegeben werden.', 0), + 25095 => array('Unbekannte Schriftfamilien-Definition. ', 0), + 25096 => array('Der Farbpalette können keine weiteren Farben zugewiesen werden. Dem Bild wurde bereits die größtmögliche Anzahl von Farben (%d) zugewiesen und die Palette ist voll. Verwende stattdessen ein TrueColor-Bild', 0), + 25097 => array('Eine Farbe wurde als leerer String im Aufruf von PushColor() angegegeben.', 0), + 25098 => array('Negativer Farbindex. Unpassender Aufruf von PopColor().', 0), + 25099 => array('Die Parameter für Helligkeit und Kontrast sind außerhalb des zulässigen Bereichs [-1,1]', 0), + + 25100 => array('Es liegt ein Problem mit der Farbpalette und dem GD-Setup vor. Bitte deaktiviere anti-aliasing oder verwende GD2 mit TrueColor. Wenn die GD2-Bibliothek installiert ist, versichere Dich, dass die Konstante USE_GD2 auf "true" gesetzt und TrueColor aktiviert ist.', 0), + 25101 => array('Ungültiges numerisches Argument für SetLineStyle(): (%d)', 1), + 25102 => array('Ungültiges String-Argument für SetLineStyle(): %s', 1), + 25103 => array('Ungültiges Argument für SetLineStyle %s', 1), + 25104 => array('Unbekannter Linientyp: %s', 1), + 25105 => array('Es wurden NULL-Daten für ein gefülltes Polygon angegeben. Sorge dafür, dass keine NULL-Daten angegeben werden.', 0), + 25106 => array('Image::FillToBorder : es können keine weiteren Farben zugewiesen werden.', 0), + 25107 => array('In Datei "%s" kann nicht geschrieben werden. Überprüfe die aktuellen Schreibrechte.', 1), + 25108 => array('Das Bild kann nicht gestreamt werden. Möglicherweise liegt ein Fehler im PHP/GD-Setup vor. Kompiliere PHP neu und verwende die eingebaute GD-Bibliothek, die mit PHP angeboten wird.', 0), + 25109 => array('Deine PHP- (und GD-lib-) Installation scheint keine bekannten Grafikformate zu unterstützen. Sorge zunächst dafür, dass GD als PHP-Modul kompiliert ist. Wenn Du außerdem JPEG-Bilder verwenden willst, musst Du die JPEG-Bibliothek installieren. Weitere Details sind in der PHP-Dokumentation zu finden.', 0), + + 25110 => array('Dein PHP-Installation unterstützt das gewählte Grafikformat nicht: %s', 1), + 25111 => array('Das gecachete Bild %s kann nicht gelöscht werden. Problem mit den Rechten?', 1), + 25112 => array('Das Datum der gecacheten Datei (%s) liegt in der Zukunft.', 1), + 25113 => array('Das gecachete Bild %s kann nicht gelöscht werden. Problem mit den Rechten?', 1), + 25114 => array('PHP hat nicht die erforderlichen Rechte, um in die Cache-Datei %s zu schreiben. Bitte versichere Dich, dass der Benutzer, der PHP anwendet, die entsprechenden Schreibrechte für die Datei hat, wenn Du das Cache-System in JPGraph verwenden willst.', 1), + 25115 => array('Berechtigung für gecachetes Bild %s kann nicht gesetzt werden. Problem mit den Rechten?', 1), + 25116 => array('Datei kann nicht aus dem Cache %s geöffnet werden', 1), + 25117 => array('Gecachetes Bild %s kann nicht zum Lesen geöffnet werden.', 1), + 25118 => array('Verzeichnis %s kann nicht angelegt werden. Versichere Dich, dass PHP die Schreibrechte in diesem Verzeichnis hat.', 1), + 25119 => array('Rechte für Datei %s können nicht gesetzt werden. Problem mit den Rechten?', 1), + + 25120 => array('Die Position für die Legende muss als Prozentwert im Bereich 0-1 angegeben werden.', 0), + 25121 => array('Eine leerer Datenvektor wurde für den Plot eingegeben. Es muss wenigstens ein Datenpunkt vorliegen.', 0), + 25122 => array('Stroke() muss als Subklasse der Klasse Plot definiert sein.', 0), + 25123 => array('Du kannst keine Text-X-Achse mit X-Koordinaten verwenden. Benutze stattdessen eine "int" oder "lin" Achse.', 0), + 25124 => array('Der Eingabedatenvektor mus aufeinanderfolgende Werte von 0 aufwärts beinhalten. Der angegebene Y-Vektor beginnt mit leeren Werten (NULL).', 0), + 25125 => array('Ungültige Richtung für statische Linie.', 0), + 25126 => array('Es kann kein TrueColor-Bild erzeugt werden. Überprüfe, ob die GD2-Bibliothek und PHP korrekt aufgesetzt wurden.', 0), + 25127 => array('The library has been configured for automatic encoding conversion of Japanese fonts. This requires that PHP has the mb_convert_encoding() function. Your PHP installation lacks this function (PHP needs the "--enable-mbstring" when compiled).', 0), + 25128 => array('The function imageantialias() is not available in your PHP installation. Use the GD version that comes with PHP and not the standalone version.', 0), + 25129 => array('Anti-alias can not be used with dashed lines. Please disable anti-alias or use solid lines.', 0), + 25130 => array('Too small plot area. (%d x %d). With the given image size and margins there is to little space left for the plot. Increase the plot size or reduce the margins.', 2), + + 25131 => array('StrokeBoxedText2() only supports TTF fonts and not built-in bitmap fonts.', 0), + 25132 => array('Undefined property %s.', 1), // @todo translate + 25133 => array('Use Graph::SetTheme() after Graph::SetScale().', 0), // @todo translate + +/* + ** jpgraph_led + */ + + 25500 => array('Multibyte strings must be enabled in the PHP installation in order to run the LED module so that the function mb_strlen() is available. See PHP documentation for more information.', 0), + +/* + **--------------------------------------------------------------------------------------------- + ** Pro-version strings + **--------------------------------------------------------------------------------------------- + */ + +/* + ** jpgraph_table + */ + + 27001 => array('GTextTable: Ungültiges Argument für Set(). Das Array-Argument muss 2-- dimensional sein.', 0), + 27002 => array('GTextTable: Ungültiges Argument für Set()', 0), + 27003 => array('GTextTable: Falsche Anzahl von Argumenten für GTextTable::SetColor()', 0), + 27004 => array('GTextTable: Angegebener Zellenbereich, der verschmolzen werden soll, ist ungültig.', 0), + 27005 => array('GTextTable: Bereits verschmolzene Zellen im Bereich (%d,%d) bis (%d,%d) können nicht ein weiteres Mal verschmolzen werden.', 4), + 27006 => array('GTextTable: Spalten-Argument = %d liegt außerhalb der festgelegten Tabellengröße.', 1), + 27007 => array('GTextTable: Zeilen-Argument = %d liegt außerhalb der festgelegten Tabellengröße.', 1), + 27008 => array('GTextTable: Spalten- und Zeilengröße müssen zu den Dimensionen der Tabelle passen.', 0), + 27009 => array('GTextTable: Die Anzahl der Tabellenspalten oder -zeilen ist 0. Versichere Dich, dass die Methoden Init() oder Set() aufgerufen werden.', 0), + 27010 => array('GTextTable: Es wurde keine Ausrichtung beim Aufruf von SetAlign() angegeben.', 0), + 27011 => array('GTextTable: Es wurde eine unbekannte Ausrichtung beim Aufruf von SetAlign() abgegeben. Horizontal=%s, Vertikal=%s', 2), + 27012 => array('GTextTable: Interner Fehler. Es wurde ein ungültiges Argument festgeleget %s', 1), + 27013 => array('GTextTable: Das Argument für FormatNumber() muss ein String sein.', 0), + 27014 => array('GTextTable: Die Tabelle wurde weder mit einem Aufruf von Set() noch von Init() initialisiert.', 0), + 27015 => array('GTextTable: Der Zellenbildbedingungstyp muss entweder TIMG_WIDTH oder TIMG_HEIGHT sein.', 0), + +/* + ** jpgraph_windrose + */ + + 22001 => array('Die Gesamtsumme der prozentualen Anteile aller Windrosenarme darf 100%% nicht überschreiten!\n(Aktuell max: %d)', 1), + 22002 => array('Das Bild ist zu klein für eine Skala. Bitte vergrößere das Bild.', 0), + 22004 => array('Die Etikettendefinition für Windrosenrichtungen müssen 16 Werte haben (eine für jede Kompassrichtung).', 0), + 22005 => array('Der Linientyp für radiale Linien muss einer von ("solid","dotted","dashed","longdashed") sein.', 0), + 22006 => array('Es wurde ein ungültiger Windrosentyp angegeben.', 0), + 22007 => array('Es wurden zu wenig Werte für die Bereichslegende angegeben.', 0), + 22008 => array('Interner Fehler: Versuch, eine freie Windrose zu plotten, obwohl der Typ keine freie Windrose ist.', 0), + 22009 => array('Du hast die gleiche Richtung zweimal angegeben, einmal mit einem Winkel und einmal mit einer Kompassrichtung (%f Grad).', 0), + 22010 => array('Die Richtung muss entweder ein numerischer Wert sein oder eine der 16 Kompassrichtungen', 0), + 22011 => array('Der Windrosenindex muss ein numerischer oder Richtungswert sein. Du hast angegeben Index=%d', 1), + 22012 => array('Die radiale Achsendefinition für die Windrose enthält eine nicht aktivierte Richtung.', 0), + 22013 => array('Du hast dasselbe Look&Feel für die gleiche Kompassrichtung zweimal engegeben, einmal mit Text und einmal mit einem Index (Index=%d)', 1), + 22014 => array('Der Index für eine Kompassrichtung muss zwischen 0 und 15 sein.', 0), + 22015 => array('Du hast einen unbekannten Windrosenplottyp angegeben.', 0), + 22016 => array('Der Windrosenarmindex muss ein numerischer oder ein Richtungswert sein.', 0), + 22017 => array('Die Windrosendaten enthalten eine Richtung, die nicht aktiviert ist. Bitte berichtige, welche Label angezeigt werden sollen.', 0), + 22018 => array('Du hast für dieselbe Kompassrichtung zweimal Daten angegeben, einmal mit Text und einmal mit einem Index (Index=%d)', 1), + 22019 => array('Der Index für eine Richtung muss zwischen 0 und 15 sein. Winkel dürfen nicht für einen regelmäßigen Windplot angegeben werden, sondern entweder ein Index oder eine Kompassrichtung.', 0), + 22020 => array('Der Windrosenplot ist zu groß für die angegebene Bildgröße. Benutze entweder WindrosePlot::SetSize(), um den Plot kleiner zu machen oder vergrößere das Bild im ursprünglichen Aufruf von WindroseGraph().', 0), + 22021 => array('It is only possible to add Text, IconPlot or WindrosePlot to a Windrose Graph', 0), + +/* + ** jpgraph_odometer + */ + + 13001 => array('Unbekannter Nadeltypstil (%d).', 1), + 13002 => array('Ein Wert für das Odometer (%f) ist außerhalb des angegebenen Bereichs [%f,%f]', 3), + +/* + ** jpgraph_barcode + */ + + 1001 => array('Unbekannte Kodier-Specifikation: %s', 1), + 1002 => array('datenvalidierung schlug fehl. [%s] kann nicht mittels der Kodierung "%s" kodiert werden', 2), + 1003 => array('Interner Kodierfehler. Kodieren von %s ist nicht möglich in Code 128', 1), + 1004 => array('Interner barcode Fehler. Unbekannter UPC-E Kodiertyp: %s', 1), + 1005 => array('Interner Fehler. Das Textzeichen-Tupel (%s, %s) kann nicht im Code-128 Zeichensatz C kodiert werden.', 2), + 1006 => array('Interner Kodierfehler für CODE 128. Es wurde versucht, CTRL in CHARSET != A zu kodieren.', 0), + 1007 => array('Interner Kodierfehler für CODE 128. Es wurde versucht, DEL in CHARSET != B zu kodieren.', 0), + 1008 => array('Interner Kodierfehler für CODE 128. Es wurde versucht, kleine Buchstaben in CHARSET != B zu kodieren.', 0), + 1009 => array('Kodieren mittels CODE 93 wird noch nicht unterstützt.', 0), + 1010 => array('Kodieren mittels POSTNET wird noch nicht unterstützt.', 0), + 1011 => array('Nicht untrstütztes Barcode-Backend für den Typ %s', 1), + +/* + ** PDF417 + */ + + 26000 => array('PDF417: The PDF417 module requires that the PHP installation must support the function bcmod(). This is normally enabled at compile time. See documentation for more information.', 0), + 26001 => array('PDF417: Die Anzahl der Spalten muss zwischen 1 und 30 sein.', 0), + 26002 => array('PDF417: Der Fehler-Level muss zwischen 0 und 8 sein.', 0), + 26003 => array('PDF417: Ungültiges Format für Eingabedaten, um sie mit PDF417 zu kodieren.', 0), + 26004 => array('PDF417: die eigebenen Daten können nicht mit Fehler-Level %d und %d spalten kodiert werden, weil daraus zu viele Symbole oder mehr als 90 Zeilen resultieren.', 2), + 26005 => array('PDF417: Die Datei "%s" kann nicht zum Schreiben geöffnet werden.', 1), + 26006 => array('PDF417: Interner Fehler. Die Eingabedatendatei für PDF417-Cluster %d ist fehlerhaft.', 1), + 26007 => array('PDF417: Interner Fehler. GetPattern: Ungültiger Code-Wert %d (Zeile %d)', 2), + 26008 => array('PDF417: Interner Fehler. Modus wurde nicht in der Modusliste!! Modus %d', 1), + 26009 => array('PDF417: Kodierfehler: Ungültiges Zeichen. Zeichen kann nicht mit ASCII-Code %d kodiert werden.', 1), + 26010 => array('PDF417: Interner Fehler: Keine Eingabedaten beim Dekodieren.', 0), + 26011 => array('PDF417: Kodierfehler. Numerisches Kodieren bei nicht-numerischen Daten nicht möglich.', 0), + 26012 => array('PDF417: Interner Fehler. Es wurden für den Binary-Kompressor keine Daten zum Dekodieren eingegeben.', 0), + 26013 => array('PDF417: Interner Fehler. Checksum Fehler. Koeffiziententabellen sind fehlerhaft.', 0), + 26014 => array('PDF417: Interner Fehler. Es wurden keine Daten zum Berechnen von Kodewörtern eingegeben.', 0), + 26015 => array('PDF417: Interner Fehler. Ein Eintrag 0 in die Statusübertragungstabellen ist nicht NULL. Eintrag 1 = (%s)', 1), + 26016 => array('PDF417: Interner Fehler: Nichtregistrierter Statusübertragungsmodus beim Dekodieren.', 0), + +/* + ** jpgraph_contour + */ + + 28001 => array('Dritten parameter fur Contour muss ein vector der fargen sind.', 0), + 28002 => array('Die anzahlen der farges jeder isobar linien muss gleich sein.', 0), + 28003 => array('ContourPlot Interner Fehler: isobarHCrossing: Spalten index ist zu hoch (%d)', 1), + 28004 => array('ContourPlot Interner Fehler: isobarHCrossing: Reihe index ist zu hoch (%d)', 1), + 28005 => array('ContourPlot Interner Fehler: isobarVCrossing: Reihe index ist zu hoch (%d)', 1), + 28006 => array('ContourPlot Interner Fehler: isobarVCrossing: Spalten index ist zu hoch (%d)', 1), + 28007 => array('ContourPlot. Interpolation faktor ist zu hoch (>5)', 0), + +/* + * jpgraph_matrix and colormap + */ + 29201 => array('Min range value must be less or equal to max range value for colormaps', 0), + 29202 => array('The distance between min and max value is too small for numerical precision', 0), + 29203 => array('Number of color quantification level must be at least %d', 1), + 29204 => array('Number of colors (%d) is invalid for this colormap. It must be a number that can be written as: %d + k*%d', 3), + 29205 => array('Colormap specification out of range. Must be an integer in range [0,%d]', 1), + 29206 => array('Invalid object added to MatrixGraph', 0), + 29207 => array('Empty input data specified for MatrixPlot', 0), + 29208 => array('Unknown side specifiction for matrix labels "%s"', 1), + 29209 => array('CSIM Target matrix must be the same size as the data matrix (csim=%d x %d, data=%d x %d)', 4), + 29210 => array('CSIM Target for matrix labels does not match the number of labels (csim=%d, labels=%d)', 2), + +/* + * jpgraph_theme + */ + 30001 => array("Theme::%s() is not defined. \nPlease make %s(\$graph) function in your theme classs.", 2), + +); diff --git a/vendor/amenadiel/jpgraph/src/lang/en.inc.php b/vendor/amenadiel/jpgraph/src/lang/en.inc.php new file mode 100644 index 0000000000..e8bd04bf41 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/lang/en.inc.php @@ -0,0 +1,538 @@ +,) +$_jpg_messages = array( + +/* + ** Headers already sent error. This is formatted as HTML different since this will be sent back directly as text + */ + 10 => array('
        JpGraph Error: +HTTP headers have already been sent.
        Caused by output from file %s at line %d.
        Explanation:
        HTTP headers have already been sent back to the browser indicating the data as text before the library got a chance to send it\'s image HTTP header to this browser. This makes it impossible for the library to send back image data to the browser (since that would be interpretated as text by the browser and show up as junk text).

        Most likely you have some text in your script before the call to Graph::Stroke(). If this texts gets sent back to the browser the browser will assume that all data is plain text. Look for any text, even spaces and newlines, that might have been sent back to the browser.

        For example it is a common mistake to leave a blank line before the opening "<?php".

        ', 2), + +/* + ** Setup errors + */ + 11 => array('No path specified for CACHE_DIR. Please specify CACHE_DIR manually in jpg-config.inc', 0), + 12 => array('No path specified for TTF_DIR and path can not be determined automatically. Please specify TTF_DIR manually (in jpg-config.inc).', 0), + 13 => array('The installed PHP version (%s) is not compatible with this release of the library. The library requires at least PHP version %s', 2), + +/* + ** jpgraph_bar + */ + + 2001 => array('Number of colors is not the same as the number of patterns in BarPlot::SetPattern()', 0), + 2002 => array('Unknown pattern specified in call to BarPlot::SetPattern()', 0), + 2003 => array('Number of X and Y points are not equal. Number of X-points: %d Number of Y-points: %d', 2), + 2004 => array('All values for a barplot must be numeric. You have specified value nr [%d] == %s', 2), + 2005 => array('You have specified an empty array for shadow colors in the bar plot.', 0), + 2006 => array('Unknown position for values on bars : %s', 1), + 2007 => array('Cannot create GroupBarPlot from empty plot array.', 0), + 2008 => array('Group bar plot element nbr %d is undefined or empty.', 0), + 2009 => array('One of the objects submitted to GroupBar is not a BarPlot. Make sure that you create the GroupBar plot from an array of BarPlot or AccBarPlot objects. (Class = %s)', 1), + 2010 => array('Cannot create AccBarPlot from empty plot array.', 0), + 2011 => array('Acc bar plot element nbr %d is undefined or empty.', 1), + 2012 => array('One of the objects submitted to AccBar is not a BarPlot. Make sure that you create the AccBar plot from an array of BarPlot objects. (Class=%s)', 1), + 2013 => array('You have specified an empty array for shadow colors in the bar plot.', 0), + 2014 => array('Number of datapoints for each data set in accbarplot must be the same', 0), + 2015 => array('Individual bar plots in an AccBarPlot or GroupBarPlot can not have specified X-coordinates', 0), + +/* + ** jpgraph_date + */ + + 3001 => array('It is only possible to use either SetDateAlign() or SetTimeAlign() but not both', 0), + +/* + ** jpgraph_error + */ + + 4002 => array('Error in input data to LineErrorPlot. Number of data points must be a multiple of 3', 0), + +/* + ** jpgraph_flags + */ + + 5001 => array('Unknown flag size (%d).', 1), + 5002 => array('Flag index %s does not exist.', 1), + 5003 => array('Invalid ordinal number (%d) specified for flag index.', 1), + 5004 => array('The (partial) country name %s does not have a corresponding flag image. The flag may still exist but under another name, e.g. instead of "usa" try "united states".', 1), + +/* + ** jpgraph_gantt + */ + + 6001 => array('Internal error. Height for ActivityTitles is < 0', 0), + 6002 => array('You can\'t specify negative sizes for Gantt graph dimensions. Use 0 to indicate that you want the library to automatically determine a dimension.', 0), + 6003 => array('Invalid format for Constrain parameter at index=%d in CreateSimple(). Parameter must start with index 0 and contain arrays of (Row,Constrain-To,Constrain-Type)', 1), + 6004 => array('Invalid format for Progress parameter at index=%d in CreateSimple(). Parameter must start with index 0 and contain arrays of (Row,Progress)', 1), + 6005 => array('SetScale() is not meaningful with Gantt charts.', 0), + 6006 => array('Cannot autoscale Gantt chart. No dated activities exist. [GetBarMinMax() start >= n]', 0), + 6007 => array('Sanity check for automatic Gantt chart size failed. Either the width (=%d) or height (=%d) is larger than MAX_GANTTIMG_SIZE. This could potentially be caused by a wrong date in one of the activities.', 2), + 6008 => array('You have specified a constrain from row=%d to row=%d which does not have any activity', 2), + 6009 => array('Unknown constrain type specified from row=%d to row=%d', 2), + 6010 => array('Illegal icon index for Gantt builtin icon [%d]', 1), + 6011 => array('Argument to IconImage must be string or integer', 0), + 6012 => array('Unknown type in Gantt object title specification', 0), + 6015 => array('Illegal vertical position %d', 1), + 6016 => array('Date string (%s) specified for Gantt activity can not be interpretated. Please make sure it is a valid time string, e.g. 2005-04-23 13:30', 1), + 6017 => array('Unknown date format in GanttScale (%s).', 1), + 6018 => array('Interval for minutes must divide the hour evenly, e.g. 1,5,10,12,15,20,30 etc You have specified an interval of %d minutes.', 1), + 6019 => array('The available width (%d) for minutes are to small for this scale to be displayed. Please use auto-sizing or increase the width of the graph.', 1), + 6020 => array('Interval for hours must divide the day evenly, e.g. 0:30, 1:00, 1:30, 4:00 etc. You have specified an interval of %d', 1), + 6021 => array('Unknown formatting style for week.', 0), + 6022 => array('Gantt scale has not been specified.', 0), + 6023 => array('If you display both hour and minutes the hour interval must be 1 (Otherwise it doesn\'t make sense to display minutes).', 0), + 6024 => array('CSIM Target must be specified as a string. Start of target is: %d', 1), + 6025 => array('CSIM Alt text must be specified as a string. Start of alt text is: %d', 1), + 6027 => array('Progress value must in range [0, 1]', 0), + 6028 => array('Specified height (%d) for gantt bar is out of range.', 1), + 6029 => array('Offset for vertical line must be in range [0,1]', 0), + 6030 => array('Unknown arrow direction for link.', 0), + 6031 => array('Unknown arrow type for link.', 0), + 6032 => array('Internal error: Unknown path type (=%d) specified for link.', 1), + 6033 => array('Array of fonts must contain arrays with 3 elements, i.e. (Family, Style, Size)', 0), + +/* + ** jpgraph_gradient + */ + + 7001 => array('Unknown gradient style (=%d).', 1), + +/* + ** jpgraph_iconplot + */ + + 8001 => array('Mix value for icon must be between 0 and 100.', 0), + 8002 => array('Anchor position for icons must be one of "top", "bottom", "left", "right" or "center"', 0), + 8003 => array('It is not possible to specify both an image file and a country flag for the same icon.', 0), + 8004 => array('In order to use Country flags as icons you must include the "jpgraph_flags.php" file.', 0), + +/* + ** jpgraph_imgtrans + */ + + 9001 => array('Value for image transformation out of bounds. Vanishing point on horizon must be specified as a value between 0 and 1.', 0), + +/* + ** jpgraph_lineplot + */ + + 10001 => array('LinePlot::SetFilled() is deprecated. Use SetFillColor()', 0), + 10002 => array('Plot too complicated for fast line Stroke. Use standard Stroke()', 0), + 10003 => array('Each plot in an accumulated lineplot must have the same number of data points.', 0), + +/* + ** jpgraph_log + */ + + 11001 => array('Your data contains non-numeric values.', 0), + 11002 => array('Negative data values can not be used in a log scale.', 0), + 11003 => array('Your data contains non-numeric values.', 0), + 11004 => array('Scale error for logarithmic scale. You have a problem with your data values. The max value must be greater than 0. It is mathematically impossible to have 0 in a logarithmic scale.', 0), + 11005 => array('Specifying tick interval for a logarithmic scale is undefined. Remove any calls to SetTextLabelStart() or SetTextTickInterval() on the logarithmic scale.', 0), + +/* + ** jpgraph_mgraph + */ + + 12001 => array("You are using GD 2.x and are trying to use a background images on a non truecolor image. To use background images with GD 2.x it is necessary to enable truecolor by setting the USE_TRUECOLOR constant to TRUE. Due to a bug in GD 2.0.1 using any truetype fonts with truecolor images will result in very poor quality fonts.", 0), + 12002 => array('Incorrect file name for MGraph::SetBackgroundImage() : %s Must have a valid image extension (jpg,gif,png) when using auto detection of image type', 1), + 12003 => array('Unknown file extension (%s) in MGraph::SetBackgroundImage() for filename: %s', 2), + 12004 => array('The image format of your background image (%s) is not supported in your system configuration. ', 1), + 12005 => array('Can\'t read background image: %s', 1), + 12006 => array('Illegal sizes specified for width or height when creating an image, (width=%d, height=%d)', 2), + 12007 => array('Argument to MGraph::Add() is not a valid GD image handle.', 0), + 12008 => array('Your PHP (and GD-lib) installation does not appear to support any known graphic formats.', 0), + 12009 => array('Your PHP installation does not support the chosen graphic format: %s', 1), + 12010 => array('Can\'t create or stream image to file %s Check that PHP has enough permission to write a file to the current directory.', 1), + 12011 => array('Can\'t create truecolor image. Check that you really have GD2 library installed.', 0), + 12012 => array('Can\'t create image. Check that you really have GD2 library installed.', 0), + +/* + ** jpgraph_pie3d + */ + + 14001 => array('Pie3D::ShowBorder() . Deprecated function. Use Pie3D::SetEdge() to control the edges around slices.', 0), + 14002 => array('PiePlot3D::SetAngle() 3D Pie projection angle must be between 5 and 85 degrees.', 0), + 14003 => array('Internal assertion failed. Pie3D::Pie3DSlice', 0), + 14004 => array('Slice start angle must be between 0 and 360 degrees.', 0), + 14005 => array('Pie3D Internal error: Trying to wrap twice when looking for start index', 0), + 14006 => array('Pie3D Internal Error: Z-Sorting algorithm for 3D Pies is not working properly (2). Trying to wrap twice while stroking.', 0), + 14007 => array('Width for 3D Pie is 0. Specify a size > 0', 0), + +/* + ** jpgraph_pie + */ + + 15001 => array('PiePLot::SetTheme() Unknown theme: %s', 1), + 15002 => array('Argument to PiePlot::ExplodeSlice() must be an integer', 0), + 15003 => array('Argument to PiePlot::Explode() must be an array with integer distances.', 0), + 15004 => array('Slice start angle must be between 0 and 360 degrees.', 0), + 15005 => array('PiePlot::SetFont() is deprecated. Use PiePlot->value->SetFont() instead.', 0), + 15006 => array('PiePlot::SetSize() Radius for pie must either be specified as a fraction [0, 0.5] of the size of the image or as an absolute size in pixels in the range [10, 1000]', 0), + 15007 => array('PiePlot::SetFontColor() is deprecated. Use PiePlot->value->SetColor() instead.', 0), + 15008 => array('PiePlot::SetLabelType() Type for pie plots must be 0 or 1 (not %d).', 1), + 15009 => array('Illegal pie plot. Sum of all data is zero for Pie Plot', 0), + 15010 => array('Sum of all data is 0 for Pie.', 0), + 15011 => array('In order to use image transformation you must include the file jpgraph_imgtrans.php in your script.', 0), + 15012 => array('PiePlot::SetTheme() is no longer supported. Use PieGraph::SetTheme()', 0), + +/* + ** jpgraph_plotband + */ + + 16001 => array('Density for pattern must be between 1 and 100. (You tried %f)', 1), + 16002 => array('No positions specified for pattern.', 0), + 16003 => array('Unknown pattern specification (%d)', 0), + 16004 => array('Min value for plotband is larger than specified max value. Please correct.', 0), + +/* + ** jpgraph_polar + */ + + 17001 => array('Polar plots must have an even number of data point. Each data point is a tuple (angle,radius).', 0), + 17002 => array('Unknown alignment specified for X-axis title. (%s)', 1), + //17003 => array('Set90AndMargin() is not supported for polar graphs.',0), + 17004 => array('Unknown scale type for polar graph. Must be "lin" or "log"', 0), + +/* + ** jpgraph_radar + */ + + 18001 => array('Client side image maps not supported for RadarPlots.', 0), + 18002 => array('RadarGraph::SupressTickMarks() is deprecated. Use HideTickMarks() instead.', 0), + 18003 => array('Illegal scale for radarplot (%s). Must be \'lin\' or \'log\'', 1), + 18004 => array('Radar Plot size must be between 0.1 and 1. (Your value=%f)', 1), + 18005 => array('RadarPlot Unsupported Tick density: %d', 1), + 18006 => array('Minimum data %f (Radar plots should only be used when all data points > 0)', 1), + 18007 => array('Number of titles does not match number of points in plot.', 0), + 18008 => array('Each radar plot must have the same number of data points.', 0), + +/* + ** jpgraph_regstat + */ + + 19001 => array('Spline: Number of X and Y coordinates must be the same', 0), + 19002 => array('Invalid input data for spline. Two or more consecutive input X-values are equal. Each input X-value must differ since from a mathematical point of view it must be a one-to-one mapping, i.e. each X-value must correspond to exactly one Y-value.', 0), + 19003 => array('Bezier: Number of X and Y coordinates must be the same', 0), + +/* + ** jpgraph_scatter + */ + + 20001 => array('Fieldplots must have equal number of X and Y points.', 0), + 20002 => array('Fieldplots must have an angle specified for each X and Y points.', 0), + 20003 => array('Scatterplot must have equal number of X and Y points.', 0), + +/* + ** jpgraph_stock + */ + + 21001 => array('Data values for Stock charts must contain an even multiple of %d data points.', 1), + +/* + ** jpgraph_plotmark + */ + + 23001 => array('This marker "%s" does not exist in color with index: %d', 2), + 23002 => array('Mark color index too large for marker "%s"', 1), + 23003 => array('A filename must be specified if you set the mark type to MARK_IMG.', 0), + +/* + ** jpgraph_utils + */ + + 24001 => array('FuncGenerator : No function specified. ', 0), + 24002 => array('FuncGenerator : Syntax error in function specification ', 0), + 24003 => array('DateScaleUtils: Unknown tick type specified in call to GetTicks()', 0), + 24004 => array('ReadCSV2: Column count mismatch in %s line %d', 2), +/* + ** jpgraph + */ + + 25001 => array('This PHP installation is not configured with the GD library. Please recompile PHP with GD support to run JpGraph. (Neither function imagetypes() nor imagecreatefromstring() does exist)', 0), + 25002 => array('Your PHP installation does not seem to have the required GD library. Please see the PHP documentation on how to install and enable the GD library.', 0), + 25003 => array('General PHP error : At %s:%d : %s', 3), + 25004 => array('General PHP error : %s ', 1), + 25005 => array('Can\'t access PHP_SELF, PHP global variable. You can\'t run PHP from command line if you want to use the \'auto\' naming of cache or image files.', 0), + 25006 => array('Usage of FF_CHINESE (FF_BIG5) font family requires that your PHP setup has the iconv() function. By default this is not compiled into PHP (needs the "--width-iconv" when configured).', 0), + 25007 => array('You are trying to use the locale (%s) which your PHP installation does not support. Hint: Use \'\' to indicate the default locale for this geographic region.', 1), + 25008 => array('Image width/height argument in Graph::Graph() must be numeric', 0), + 25009 => array('You must specify what scale to use with a call to Graph::SetScale()', 0), + + 25010 => array('Graph::Add() You tried to add a null plot to the graph.', 0), + 25011 => array('Graph::AddY2() You tried to add a null plot to the graph.', 0), + 25012 => array('Graph::AddYN() You tried to add a null plot to the graph.', 0), + 25013 => array('You can only add standard plots to multiple Y-axis', 0), + 25014 => array('Graph::AddText() You tried to add a null text to the graph.', 0), + 25015 => array('Graph::AddLine() You tried to add a null line to the graph.', 0), + 25016 => array('Graph::AddBand() You tried to add a null band to the graph.', 0), + 25017 => array('You are using GD 2.x and are trying to use a background images on a non truecolor image. To use background images with GD 2.x it is necessary to enable truecolor by setting the USE_TRUECOLOR constant to TRUE. Due to a bug in GD 2.0.1 using any truetype fonts with truecolor images will result in very poor quality fonts.', 0), + 25018 => array('Incorrect file name for Graph::SetBackgroundImage() : "%s" Must have a valid image extension (jpg,gif,png) when using auto detection of image type', 1), + 25019 => array('Unknown file extension (%s) in Graph::SetBackgroundImage() for filename: "%s"', 2), + + 25020 => array('Graph::SetScale(): Specified Max value must be larger than the specified Min value.', 0), + 25021 => array('Unknown scale specification for Y-scale. (%s)', 1), + 25022 => array('Unknown scale specification for X-scale. (%s)', 1), + 25023 => array('Unsupported Y2 axis type: "%s" Must be one of (lin,log,int)', 1), + 25024 => array('Unsupported Y axis type: "%s" Must be one of (lin,log,int)', 1), + 25025 => array('Unsupported Tick density: %d', 1), + 25026 => array('Can\'t draw unspecified Y-scale. You have either: 1. Specified an Y axis for auto scaling but have not supplied any plots. 2. Specified a scale manually but have forgot to specify the tick steps', 0), + 25027 => array('Can\'t open cached CSIM "%s" for reading.', 1), + 25028 => array('Apache/PHP does not have permission to write to the CSIM cache directory (%s). Check permissions.', 1), + 25029 => array('Can\'t write CSIM "%s" for writing. Check free space and permissions.', 1), + + 25030 => array('Missing script name in call to StrokeCSIM(). You must specify the name of the actual image script as the first parameter to StrokeCSIM().', 0), + 25031 => array('You must specify what scale to use with a call to Graph::SetScale().', 0), + 25032 => array('No plots for Y-axis nbr:%d', 1), + 25033 => array('', 0), + 25034 => array('Can\'t draw unspecified X-scale. No plots specified.', 0), + 25035 => array('You have enabled clipping. Clipping is only supported for graphs at 0 or 90 degrees rotation. Please adjust you current angle (=%d degrees) or disable clipping.', 1), + 25036 => array('Unknown AxisStyle() : %s', 1), + 25037 => array('The image format of your background image (%s) is not supported in your system configuration. ', 1), + 25038 => array('Background image seems to be of different type (has different file extension) than specified imagetype. Specified: %s File: %s', 2), + 25039 => array('Can\'t read background image: "%s"', 1), + + 25040 => array('It is not possible to specify both a background image and a background country flag.', 0), + 25041 => array('In order to use Country flags as backgrounds you must include the "jpgraph_flags.php" file.', 0), + 25042 => array('Unknown background image layout', 0), + 25043 => array('Unknown title background style.', 0), + 25044 => array('Cannot use auto scaling since it is impossible to determine a valid min/max value of the Y-axis (only null values).', 0), + 25045 => array('Font families FF_HANDWRT and FF_BOOK are no longer available due to copyright problem with these fonts. Fonts can no longer be distributed with JpGraph. Please download fonts from http://corefonts.sourceforge.net/', 0), + 25046 => array('Specified TTF font family (id=%d) is unknown or does not exist. Please note that TTF fonts are not distributed with JpGraph for copyright reasons. You can find the MS TTF WEB-fonts (arial, courier etc) for download at http://corefonts.sourceforge.net/', 1), + 25047 => array('Style %s is not available for font family %s', 2), + 25048 => array('Unknown font style specification [%s].', 1), + 25049 => array('Font file "%s" is not readable or does not exist.', 1), + + 25050 => array('First argument to Text::Text() must be a string.', 0), + 25051 => array('Invalid direction specified for text.', 0), + 25052 => array('PANIC: Internal error in SuperScript::Stroke(). Unknown vertical alignment for text', 0), + 25053 => array('PANIC: Internal error in SuperScript::Stroke(). Unknown horizontal alignment for text', 0), + 25054 => array('Internal error: Unknown grid axis %s', 1), + 25055 => array('Axis::SetTickDirection() is deprecated. Use Axis::SetTickSide() instead', 0), + 25056 => array('SetTickLabelMargin() is deprecated. Use Axis::SetLabelMargin() instead.', 0), + 25057 => array('SetTextTicks() is deprecated. Use SetTextTickInterval() instead.', 0), + 25058 => array('Text label interval must be specified >= 1.', 0), + 25059 => array('SetLabelPos() is deprecated. Use Axis::SetLabelSide() instead.', 0), + + 25060 => array('Unknown alignment specified for X-axis title. (%s)', 1), + 25061 => array('Unknown alignment specified for Y-axis title. (%s)', 1), + 25062 => array('Labels at an angle are not supported on Y-axis', 0), + 25063 => array('Ticks::SetPrecision() is deprecated. Use Ticks::SetLabelFormat() (or Ticks::SetFormatCallback()) instead', 0), + 25064 => array('Minor or major step size is 0. Check that you haven\'t got an accidental SetTextTicks(0) in your code. If this is not the case you might have stumbled upon a bug in JpGraph. Please report this and if possible include the data that caused the problem', 0), + 25065 => array('Tick positions must be specified as an array()', 0), + 25066 => array('When manually specifying tick positions and labels the number of labels must be the same as the number of specified ticks.', 0), + 25067 => array('Your manually specified scale and ticks is not correct. The scale seems to be too small to hold any of the specified tick marks.', 0), + 25068 => array('A plot has an illegal scale. This could for example be that you are trying to use text auto scaling to draw a line plot with only one point or that the plot area is too small. It could also be that no input data value is numeric (perhaps only \'-\' or \'x\')', 0), + 25069 => array('Grace must be larger then 0', 0), + 25070 => array('Either X or Y data arrays contains non-numeric values. Check that the data is really specified as numeric data and not as strings. It is an error to specify data for example as \'-2345.2\' (using quotes).', 0), + 25071 => array('You have specified a min value with SetAutoMin() which is larger than the maximum value used for the scale. This is not possible.', 0), + 25072 => array('You have specified a max value with SetAutoMax() which is smaller than the minimum value used for the scale. This is not possible.', 0), + 25073 => array('Internal error. Integer scale algorithm comparison out of bound (r=%f)', 1), + 25074 => array('Internal error. The scale range is negative (%f) [for %s scale] This problem could potentially be caused by trying to use \"illegal\" values in the input data arrays (like trying to send in strings or only NULL values) which causes the auto scaling to fail.', 2), + 25075 => array('Can\'t automatically determine ticks since min==max.', 0), + 25077 => array('Adjustment factor for color must be > 0', 0), + 25078 => array('Unknown color: %s', 1), + 25079 => array('Unknown color specification: %s, size=%d', 2), + + 25080 => array('Alpha parameter for color must be between 0.0 and 1.0', 0), + 25081 => array('Selected graphic format is either not supported or unknown [%s]', 1), + 25082 => array('Illegal sizes specified for width or height when creating an image, (width=%d, height=%d)', 2), + 25083 => array('Illegal image size when copying image. Size for copied to image is 1 pixel or less.', 0), + 25084 => array('Failed to create temporary GD canvas. Possible Out of memory problem.', 0), + 25085 => array('An image can not be created from the supplied string. It is either in a format not supported or the string is representing an corrupt image.', 0), + 25086 => array('You only seem to have GD 1.x installed. To enable Alphablending requires GD 2.x or higher. Please install GD or make sure the constant USE_GD2 is specified correctly to reflect your installation. By default it tries to auto detect what version of GD you have installed. On some very rare occasions it may falsely detect GD2 where only GD1 is installed. You must then set USE_GD2 to false.', 0), + 25087 => array('This PHP build has not been configured with TTF support. You need to recompile your PHP installation with FreeType support.', 0), + 25088 => array('You have a misconfigured GD font support. The call to imagefontwidth() fails.', 0), + 25089 => array('You have a misconfigured GD font support. The call to imagefontheight() fails.', 0), + + 25090 => array('Unknown direction specified in call to StrokeBoxedText() [%s]', 1), + 25091 => array('Internal font does not support drawing text at arbitrary angle. Use TTF fonts instead.', 0), + 25092 => array('There is either a configuration problem with TrueType or a problem reading font file "%s" Make sure file exists and is in a readable place for the HTTP process. (If \'basedir\' restriction is enabled in PHP then the font file must be located in the document root.). It might also be a wrongly installed FreeType library. Try upgrading to at least FreeType 2.1.13 and recompile GD with the correct setup so it can find the new FT library.', 1), + 25093 => array('Can not read font file "%s" in call to Image::GetBBoxTTF. Please make sure that you have set a font before calling this method and that the font is installed in the TTF directory.', 1), + 25094 => array('Direction for text most be given as an angle between 0 and 90.', 0), + 25095 => array('Unknown font font family specification. ', 0), + 25096 => array('Can\'t allocate any more colors in palette image. Image has already allocated maximum of %d colors and the palette is now full. Change to a truecolor image instead', 0), + 25097 => array('Color specified as empty string in PushColor().', 0), + 25098 => array('Negative Color stack index. Unmatched call to PopColor()', 0), + 25099 => array('Parameters for brightness and Contrast out of range [-1,1]', 0), + + 25100 => array('Problem with color palette and your GD setup. Please disable anti-aliasing or use GD2 with true-color. If you have GD2 library installed please make sure that you have set the USE_GD2 constant to true and truecolor is enabled.', 0), + 25101 => array('Illegal numeric argument to SetLineStyle(): (%d)', 1), + 25102 => array('Illegal string argument to SetLineStyle(): %s', 1), + 25103 => array('Illegal argument to SetLineStyle %s', 1), + 25104 => array('Unknown line style: %s', 1), + 25105 => array('NULL data specified for a filled polygon. Check that your data is not NULL.', 0), + 25106 => array('Image::FillToBorder : Can not allocate more colors', 0), + 25107 => array('Can\'t write to file "%s". Check that the process running PHP has enough permission.', 1), + 25108 => array('Can\'t stream image. This is most likely due to a faulty PHP/GD setup. Try to recompile PHP and use the built-in GD library that comes with PHP.', 0), + 25109 => array('Your PHP (and GD-lib) installation does not appear to support any known graphic formats. You need to first make sure GD is compiled as a module to PHP. If you also want to use JPEG images you must get the JPEG library. Please see the PHP docs for details.', 0), + + 25110 => array('Your PHP installation does not support the chosen graphic format: %s', 1), + 25111 => array('Can\'t delete cached image %s. Permission problem?', 1), + 25112 => array('Cached imagefile (%s) has file date in the future.', 1), + 25113 => array('Can\'t delete cached image "%s". Permission problem?', 1), + 25114 => array('PHP has not enough permissions to write to the cache file "%s". Please make sure that the user running PHP has write permission for this file if you wan to use the cache system with JpGraph.', 1), + 25115 => array('Can\'t set permission for cached image "%s". Permission problem?', 1), + 25116 => array('Cant open file from cache "%s"', 1), + 25117 => array('Can\'t open cached image "%s" for reading.', 1), + 25118 => array('Can\'t create directory "%s". Make sure PHP has write permission to this directory.', 1), + 25119 => array('Can\'t set permissions for "%s". Permission problems?', 1), + + 25120 => array('Position for legend must be given as percentage in range 0-1', 0), + 25121 => array('Empty input data array specified for plot. Must have at least one data point.', 0), + 25122 => array('Stroke() must be implemented by concrete subclass to class Plot', 0), + 25123 => array('You can\'t use a text X-scale with specified X-coords. Use a "int" or "lin" scale instead.', 0), + 25124 => array('The input data array must have consecutive values from position 0 and forward. The given y-array starts with empty values (NULL)', 0), + 25125 => array('Illegal direction for static line', 0), + 25126 => array('Can\'t create truecolor image. Check that the GD2 library is properly setup with PHP.', 0), + 25127 => array('The library has been configured for automatic encoding conversion of Japanese fonts. This requires that PHP has the mb_convert_encoding() function. Your PHP installation lacks this function (PHP needs the "--enable-mbstring" when compiled).', 0), + 25128 => array('The function imageantialias() is not available in your PHP installation. Use the GD version that comes with PHP and not the standalone version.', 0), + 25129 => array('Anti-alias can not be used with dashed lines. Please disable anti-alias or use solid lines.', 0), + 25130 => array('Too small plot area. (%d x %d). With the given image size and margins there is to little space left for the plot. Increase the plot size or reduce the margins.', 2), + + 25131 => array('StrokeBoxedText2() only supports TTF fonts and not built-in bitmap fonts.', 0), + 25132 => array('Undefined property %s.', 1), + 25133 => array('Use Graph::SetTheme() after Graph::SetScale().', 0), + +/* + ** jpgraph_led + */ + + 25500 => array('Multibyte strings must be enabled in the PHP installation in order to run the LED module so that the function mb_strlen() is available. See PHP documentation for more information.', 0), + +/* + **--------------------------------------------------------------------------------------------- + ** Pro-version strings + **--------------------------------------------------------------------------------------------- + */ + +/* + ** jpgraph_table + */ + + 27001 => array('GTextTable: Invalid argument to Set(). Array argument must be 2 dimensional', 0), + 27002 => array('GTextTable: Invalid argument to Set()', 0), + 27003 => array('GTextTable: Wrong number of arguments to GTextTable::SetColor()', 0), + 27004 => array('GTextTable: Specified cell range to be merged is not valid.', 0), + 27005 => array('GTextTable: Cannot merge already merged cells in the range: (%d,%d) to (%d,%d)', 4), + 27006 => array('GTextTable: Column argument = %d is outside specified table size.', 1), + 27007 => array('GTextTable: Row argument = %d is outside specified table size.', 1), + 27008 => array('GTextTable: Column and row size arrays must match the dimensions of the table', 0), + 27009 => array('GTextTable: Number of table columns or rows are 0. Make sure Init() or Set() is called.', 0), + 27010 => array('GTextTable: No alignment specified in call to SetAlign()', 0), + 27011 => array('GTextTable: Unknown alignment specified in SetAlign(). Horizontal=%s, Vertical=%s', 2), + 27012 => array('GTextTable: Internal error. Invalid alignment specified =%s', 1), + 27013 => array('GTextTable: Argument to FormatNumber() must be a string.', 0), + 27014 => array('GTextTable: Table is not initilaized with either a call to Set() or Init()', 0), + 27015 => array('GTextTable: Cell image constrain type must be TIMG_WIDTH or TIMG_HEIGHT', 0), + +/* + ** jpgraph_windrose + */ + + 22001 => array('Total percentage for all windrose legs in a windrose plot can not exceed 100%% !\n(Current max is: %d)', 1), + 22002 => array('Graph is too small to have a scale. Please make the graph larger.', 0), + 22004 => array('Label specification for windrose directions must have 16 values (one for each compass direction).', 0), + 22005 => array('Line style for radial lines must be on of ("solid","dotted","dashed","longdashed") ', 0), + 22006 => array('Illegal windrose type specified.', 0), + 22007 => array('To few values for the range legend.', 0), + 22008 => array('Internal error: Trying to plot free Windrose even though type is not a free windrose', 0), + 22009 => array('You have specified the same direction twice, once with an angle and once with a compass direction (%f degrees)', 0), + 22010 => array('Direction must either be a numeric value or one of the 16 compass directions', 0), + 22011 => array('Windrose index must be numeric or direction label. You have specified index=%d', 1), + 22012 => array('Windrose radial axis specification contains a direction which is not enabled.', 0), + 22013 => array('You have specified the look&feel for the same compass direction twice, once with text and once with index (Index=%d)', 1), + 22014 => array('Index for compass direction must be between 0 and 15.', 0), + 22015 => array('You have specified an undefined Windrose plot type.', 0), + 22016 => array('Windrose leg index must be numeric or direction label.', 0), + 22017 => array('Windrose data contains a direction which is not enabled. Please adjust what labels are displayed.', 0), + 22018 => array('You have specified data for the same compass direction twice, once with text and once with index (Index=%d)', 1), + 22019 => array('Index for direction must be between 0 and 15. You can\'t specify angles for a Regular Windplot, only index and compass directions.', 0), + 22020 => array('Windrose plot is too large to fit the specified Graph size. Please use WindrosePlot::SetSize() to make the plot smaller or increase the size of the Graph in the initial WindroseGraph() call.', 0), + 22021 => array('It is only possible to add Text, IconPlot or WindrosePlot to a Windrose Graph', 0), +/* + ** jpgraph_odometer + */ + + 13001 => array('Unknown needle style (%d).', 1), + 13002 => array('Value for odometer (%f) is outside specified scale [%f,%f]', 3), + +/* + ** jpgraph_barcode + */ + + 1001 => array('Unknown encoder specification: %s', 1), + 1002 => array('Data validation failed. Can\'t encode [%s] using encoding "%s"', 2), + 1003 => array('Internal encoding error. Trying to encode %s is not possible in Code 128', 1), + 1004 => array('Internal barcode error. Unknown UPC-E encoding type: %s', 1), + 1005 => array('Internal error. Can\'t encode character tuple (%s, %s) in Code-128 charset C', 2), + 1006 => array('Internal encoding error for CODE 128. Trying to encode control character in CHARSET != A', 0), + 1007 => array('Internal encoding error for CODE 128. Trying to encode DEL in CHARSET != B', 0), + 1008 => array('Internal encoding error for CODE 128. Trying to encode small letters in CHARSET != B', 0), + 1009 => array('Encoding using CODE 93 is not yet supported.', 0), + 1010 => array('Encoding using POSTNET is not yet supported.', 0), + 1011 => array('Non supported barcode backend for type %s', 1), + +/* + ** PDF417 + */ + 26000 => array('PDF417: The PDF417 module requires that the PHP installation must support the function bcmod(). This is normally enabled at compile time. See documentation for more information.', 0), + 26001 => array('PDF417: Number of Columns must be >= 1 and <= 30', 0), + 26002 => array('PDF417: Error level must be between 0 and 8', 0), + 26003 => array('PDF417: Invalid format for input data to encode with PDF417', 0), + 26004 => array('PDF417: Can\'t encode given data with error level %d and %d columns since it results in too many symbols or more than 90 rows.', 2), + 26005 => array('PDF417: Can\'t open file "%s" for writing', 1), + 26006 => array('PDF417: Internal error. Data files for PDF417 cluster %d is corrupted.', 1), + 26007 => array('PDF417: Internal error. GetPattern: Illegal Code Value = %d (row=%d)', 2), + 26008 => array('PDF417: Internal error. Mode not found in mode list!! mode=%d', 1), + 26009 => array('PDF417: Encode error: Illegal character. Can\'t encode character with ASCII code=%d', 1), + 26010 => array('PDF417: Internal error: No input data in decode.', 0), + 26011 => array('PDF417: Encoding error. Can\'t use numeric encoding on non-numeric data.', 0), + 26012 => array('PDF417: Internal error. No input data to decode for Binary compressor.', 0), + 26013 => array('PDF417: Internal error. Checksum error. Coefficient tables corrupted.', 0), + 26014 => array('PDF417: Internal error. No data to calculate codewords on.', 0), + 26015 => array('PDF417: Internal error. State transition table entry 0 is NULL. Entry 1 = (%s)', 1), + 26016 => array('PDF417: Internal error: Unrecognized state transition mode in decode.', 0), + +/* + ** jpgraph_contour + */ + + 28001 => array('Third argument to Contour must be an array of colors.', 0), + 28002 => array('Number of colors must equal the number of isobar lines specified', 0), + 28003 => array('ContourPlot Internal Error: isobarHCrossing: Coloumn index too large (%d)', 1), + 28004 => array('ContourPlot Internal Error: isobarHCrossing: Row index too large (%d)', 1), + 28005 => array('ContourPlot Internal Error: isobarVCrossing: Row index too large (%d)', 1), + 28006 => array('ContourPlot Internal Error: isobarVCrossing: Col index too large (%d)', 1), + 28007 => array('ContourPlot interpolation factor is too large (>5)', 0), + +/* + * jpgraph_matrix and colormap + */ + 29201 => array('Min range value must be less or equal to max range value for colormaps', 0), + 29202 => array('The distance between min and max value is too small for numerical precision', 0), + 29203 => array('Number of color quantification level must be at least %d', 1), + 29204 => array('Number of colors (%d) is invalid for this colormap. It must be a number that can be written as: %d + k*%d', 3), + 29205 => array('Colormap specification out of range. Must be an integer in range [0,%d]', 1), + 29206 => array('Invalid object added to MatrixGraph', 0), + 29207 => array('Empty input data specified for MatrixPlot', 0), + 29208 => array('Unknown side specifiction for matrix labels "%s"', 1), + 29209 => array('CSIM Target matrix must be the same size as the data matrix (csim=%d x %d, data=%d x %d)', 4), + 29210 => array('CSIM Target for matrix labels does not match the number of labels (csim=%d, labels=%d)', 2), + +/* + * jpgraph_theme + */ + 30001 => array("Theme::%s() is not defined. \nPlease make %s(\$graph) function in your theme classs.", 2), + +); diff --git a/vendor/amenadiel/jpgraph/src/lang/prod.inc.php b/vendor/amenadiel/jpgraph/src/lang/prod.inc.php new file mode 100644 index 0000000000..8d552a3041 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/lang/prod.inc.php @@ -0,0 +1,383 @@ +,) +$_jpg_messages = array( + +/* + ** Headers already sent error. This is formatted as HTML different since this will be sent back directly as text + */ + 10 => array('
        JpGraph Error: +HTTP headers have already been sent.
        Caused by output from file %s at line %d.
        Explanation:
        HTTP headers have already been sent back to the browser indicating the data as text before the library got a chance to send it\'s image HTTP header to this browser. This makes it impossible for the library to send back image data to the browser (since that would be interpretated as text by the browser and show up as junk text).

        Most likely you have some text in your script before the call to Graph::Stroke(). If this texts gets sent back to the browser the browser will assume that all data is plain text. Look for any text, even spaces and newlines, that might have been sent back to the browser.

        For example it is a common mistake to leave a blank line before the opening "<?php".

        ', 2), + + 11 => array(DEFAULT_ERROR_MESSAGE . '11', 0), + 12 => array(DEFAULT_ERROR_MESSAGE . '12', 0), + 13 => array(DEFAULT_ERROR_MESSAGE . '13', 0), + 2001 => array(DEFAULT_ERROR_MESSAGE . '2001', 0), + 2002 => array(DEFAULT_ERROR_MESSAGE . '2002', 0), + 2003 => array(DEFAULT_ERROR_MESSAGE . '2003', 0), + 2004 => array(DEFAULT_ERROR_MESSAGE . '2004', 0), + 2005 => array(DEFAULT_ERROR_MESSAGE . '2005', 0), + 2006 => array(DEFAULT_ERROR_MESSAGE . '2006', 0), + 2007 => array(DEFAULT_ERROR_MESSAGE . '2007', 0), + 2008 => array(DEFAULT_ERROR_MESSAGE . '2008', 0), + 2009 => array(DEFAULT_ERROR_MESSAGE . '2009', 0), + 2010 => array(DEFAULT_ERROR_MESSAGE . '2010', 0), + 2011 => array(DEFAULT_ERROR_MESSAGE . '2011', 0), + 2012 => array(DEFAULT_ERROR_MESSAGE . '2012', 0), + 2013 => array(DEFAULT_ERROR_MESSAGE . '2013', 0), + 2014 => array(DEFAULT_ERROR_MESSAGE . '2014', 0), + 3001 => array(DEFAULT_ERROR_MESSAGE . '3001', 0), + 4002 => array(DEFAULT_ERROR_MESSAGE . '4002', 0), + 5001 => array(DEFAULT_ERROR_MESSAGE . '5001', 0), + 5002 => array(DEFAULT_ERROR_MESSAGE . '5002', 0), + 5003 => array(DEFAULT_ERROR_MESSAGE . '5003', 0), + 5004 => array(DEFAULT_ERROR_MESSAGE . '5004', 0), + 6001 => array(DEFAULT_ERROR_MESSAGE . '6001', 0), + 6002 => array(DEFAULT_ERROR_MESSAGE . '6002', 0), + 6003 => array(DEFAULT_ERROR_MESSAGE . '6003', 0), + 6004 => array(DEFAULT_ERROR_MESSAGE . '6004', 0), + 6005 => array(DEFAULT_ERROR_MESSAGE . '6005', 0), + 6006 => array(DEFAULT_ERROR_MESSAGE . '6006', 0), + 6007 => array(DEFAULT_ERROR_MESSAGE . '6007', 0), + 6008 => array(DEFAULT_ERROR_MESSAGE . '6008', 0), + 6009 => array(DEFAULT_ERROR_MESSAGE . '6009', 0), + 6010 => array(DEFAULT_ERROR_MESSAGE . '6010', 0), + 6011 => array(DEFAULT_ERROR_MESSAGE . '6011', 0), + 6012 => array(DEFAULT_ERROR_MESSAGE . '6012', 0), + 6015 => array(DEFAULT_ERROR_MESSAGE . '6015', 0), + 6016 => array(DEFAULT_ERROR_MESSAGE . '6016', 0), + 6017 => array(DEFAULT_ERROR_MESSAGE . '6017', 0), + 6018 => array(DEFAULT_ERROR_MESSAGE . '6018', 0), + 6019 => array(DEFAULT_ERROR_MESSAGE . '6019', 0), + 6020 => array(DEFAULT_ERROR_MESSAGE . '6020', 0), + 6021 => array(DEFAULT_ERROR_MESSAGE . '6021', 0), + 6022 => array(DEFAULT_ERROR_MESSAGE . '6022', 0), + 6023 => array(DEFAULT_ERROR_MESSAGE . '6023', 0), + 6024 => array(DEFAULT_ERROR_MESSAGE . '6024', 0), + 6025 => array(DEFAULT_ERROR_MESSAGE . '6025', 0), + 6027 => array(DEFAULT_ERROR_MESSAGE . '6027', 0), + 6028 => array(DEFAULT_ERROR_MESSAGE . '6028', 0), + 6029 => array(DEFAULT_ERROR_MESSAGE . '6029', 0), + 6030 => array(DEFAULT_ERROR_MESSAGE . '6030', 0), + 6031 => array(DEFAULT_ERROR_MESSAGE . '6031', 0), + 6032 => array(DEFAULT_ERROR_MESSAGE . '6032', 0), + 6033 => array(DEFAULT_ERROR_MESSAGE . '6033', 0), + 7001 => array(DEFAULT_ERROR_MESSAGE . '7001', 0), + 8001 => array(DEFAULT_ERROR_MESSAGE . '8001', 0), + 8002 => array(DEFAULT_ERROR_MESSAGE . '8002', 0), + 8003 => array(DEFAULT_ERROR_MESSAGE . '8003', 0), + 8004 => array(DEFAULT_ERROR_MESSAGE . '8004', 0), + 9001 => array(DEFAULT_ERROR_MESSAGE . '9001', 0), + 10001 => array(DEFAULT_ERROR_MESSAGE . '10001', 0), + 10002 => array(DEFAULT_ERROR_MESSAGE . '10002', 0), + 10003 => array(DEFAULT_ERROR_MESSAGE . '10003', 0), + 11001 => array(DEFAULT_ERROR_MESSAGE . '11001', 0), + 11002 => array(DEFAULT_ERROR_MESSAGE . '11002', 0), + 11003 => array(DEFAULT_ERROR_MESSAGE . '11003', 0), + 11004 => array(DEFAULT_ERROR_MESSAGE . '11004', 0), + 11005 => array(DEFAULT_ERROR_MESSAGE . '11005', 0), + 12001 => array(DEFAULT_ERROR_MESSAGE . '12001', 0), + 12002 => array(DEFAULT_ERROR_MESSAGE . '12002', 0), + 12003 => array(DEFAULT_ERROR_MESSAGE . '12003', 0), + 12004 => array(DEFAULT_ERROR_MESSAGE . '12004', 0), + 12005 => array(DEFAULT_ERROR_MESSAGE . '12005', 0), + 12006 => array(DEFAULT_ERROR_MESSAGE . '12006', 0), + 12007 => array(DEFAULT_ERROR_MESSAGE . '12007', 0), + 12008 => array(DEFAULT_ERROR_MESSAGE . '12008', 0), + 12009 => array(DEFAULT_ERROR_MESSAGE . '12009', 0), + 12010 => array(DEFAULT_ERROR_MESSAGE . '12010', 0), + 12011 => array(DEFAULT_ERROR_MESSAGE . '12011', 0), + 12012 => array(DEFAULT_ERROR_MESSAGE . '12012', 0), + 14001 => array(DEFAULT_ERROR_MESSAGE . '14001', 0), + 14002 => array(DEFAULT_ERROR_MESSAGE . '14002', 0), + 14003 => array(DEFAULT_ERROR_MESSAGE . '14003', 0), + 14004 => array(DEFAULT_ERROR_MESSAGE . '14004', 0), + 14005 => array(DEFAULT_ERROR_MESSAGE . '14005', 0), + 14006 => array(DEFAULT_ERROR_MESSAGE . '14006', 0), + 14007 => array(DEFAULT_ERROR_MESSAGE . '14007', 0), + 15001 => array(DEFAULT_ERROR_MESSAGE . '15001', 0), + 15002 => array(DEFAULT_ERROR_MESSAGE . '15002', 0), + 15003 => array(DEFAULT_ERROR_MESSAGE . '15003', 0), + 15004 => array(DEFAULT_ERROR_MESSAGE . '15004', 0), + 15005 => array(DEFAULT_ERROR_MESSAGE . '15005', 0), + 15006 => array(DEFAULT_ERROR_MESSAGE . '15006', 0), + 15007 => array(DEFAULT_ERROR_MESSAGE . '15007', 0), + 15008 => array(DEFAULT_ERROR_MESSAGE . '15008', 0), + 15009 => array(DEFAULT_ERROR_MESSAGE . '15009', 0), + 15010 => array(DEFAULT_ERROR_MESSAGE . '15010', 0), + 15011 => array(DEFAULT_ERROR_MESSAGE . '15011', 0), + 15012 => array(DEFAULT_ERROR_MESSAGE . '15012', 0), + 16001 => array(DEFAULT_ERROR_MESSAGE . '16001', 0), + 16002 => array(DEFAULT_ERROR_MESSAGE . '16002', 0), + 16003 => array(DEFAULT_ERROR_MESSAGE . '16003', 0), + 16004 => array(DEFAULT_ERROR_MESSAGE . '16004', 0), + 17001 => array(DEFAULT_ERROR_MESSAGE . '17001', 0), + 17002 => array(DEFAULT_ERROR_MESSAGE . '17002', 0), + 17004 => array(DEFAULT_ERROR_MESSAGE . '17004', 0), + 18001 => array(DEFAULT_ERROR_MESSAGE . '18001', 0), + 18002 => array(DEFAULT_ERROR_MESSAGE . '18002', 0), + 18003 => array(DEFAULT_ERROR_MESSAGE . '18003', 0), + 18004 => array(DEFAULT_ERROR_MESSAGE . '18004', 0), + 18005 => array(DEFAULT_ERROR_MESSAGE . '18005', 0), + 18006 => array(DEFAULT_ERROR_MESSAGE . '18006', 0), + 18007 => array(DEFAULT_ERROR_MESSAGE . '18007', 0), + 18008 => array(DEFAULT_ERROR_MESSAGE . '18008', 0), + 19001 => array(DEFAULT_ERROR_MESSAGE . '19001', 0), + 19002 => array(DEFAULT_ERROR_MESSAGE . '19002', 0), + 19003 => array(DEFAULT_ERROR_MESSAGE . '19003', 0), + 20001 => array(DEFAULT_ERROR_MESSAGE . '20001', 0), + 20002 => array(DEFAULT_ERROR_MESSAGE . '20002', 0), + 20003 => array(DEFAULT_ERROR_MESSAGE . '20003', 0), + 21001 => array(DEFAULT_ERROR_MESSAGE . '21001', 0), + 23001 => array(DEFAULT_ERROR_MESSAGE . '23001', 0), + 23002 => array(DEFAULT_ERROR_MESSAGE . '23002', 0), + 23003 => array(DEFAULT_ERROR_MESSAGE . '23003', 0), + 24001 => array(DEFAULT_ERROR_MESSAGE . '24001', 0), + 24002 => array(DEFAULT_ERROR_MESSAGE . '24002', 0), + 24003 => array(DEFAULT_ERROR_MESSAGE . '24003', 0), + 24004 => array(DEFAULT_ERROR_MESSAGE . '24004', 0), + 25001 => array(DEFAULT_ERROR_MESSAGE . '25001', 0), + 25002 => array(DEFAULT_ERROR_MESSAGE . '25002', 0), + 25003 => array(DEFAULT_ERROR_MESSAGE . '25003', 0), + 25004 => array(DEFAULT_ERROR_MESSAGE . '25004', 0), + 25005 => array(DEFAULT_ERROR_MESSAGE . '25005', 0), + 25006 => array(DEFAULT_ERROR_MESSAGE . '25006', 0), + 25007 => array(DEFAULT_ERROR_MESSAGE . '25007', 0), + 25008 => array(DEFAULT_ERROR_MESSAGE . '25008', 0), + 25009 => array(DEFAULT_ERROR_MESSAGE . '25009', 0), + 25010 => array(DEFAULT_ERROR_MESSAGE . '25010', 0), + 25011 => array(DEFAULT_ERROR_MESSAGE . '25011', 0), + 25012 => array(DEFAULT_ERROR_MESSAGE . '25012', 0), + 25013 => array(DEFAULT_ERROR_MESSAGE . '25013', 0), + 25014 => array(DEFAULT_ERROR_MESSAGE . '25014', 0), + 25015 => array(DEFAULT_ERROR_MESSAGE . '25015', 0), + 25016 => array(DEFAULT_ERROR_MESSAGE . '25016', 0), + 25017 => array(DEFAULT_ERROR_MESSAGE . '25017', 0), + 25018 => array(DEFAULT_ERROR_MESSAGE . '25018', 0), + 25019 => array(DEFAULT_ERROR_MESSAGE . '25019', 0), + 25020 => array(DEFAULT_ERROR_MESSAGE . '25020', 0), + 25021 => array(DEFAULT_ERROR_MESSAGE . '25021', 0), + 25022 => array(DEFAULT_ERROR_MESSAGE . '25022', 0), + 25023 => array(DEFAULT_ERROR_MESSAGE . '25023', 0), + 25024 => array(DEFAULT_ERROR_MESSAGE . '25024', 0), + 25025 => array(DEFAULT_ERROR_MESSAGE . '25025', 0), + 25026 => array(DEFAULT_ERROR_MESSAGE . '25026', 0), + 25027 => array(DEFAULT_ERROR_MESSAGE . '25027', 0), + 25028 => array(DEFAULT_ERROR_MESSAGE . '25028', 0), + 25029 => array(DEFAULT_ERROR_MESSAGE . '25029', 0), + 25030 => array(DEFAULT_ERROR_MESSAGE . '25030', 0), + 25031 => array(DEFAULT_ERROR_MESSAGE . '25031', 0), + 25032 => array(DEFAULT_ERROR_MESSAGE . '25032', 0), + 25033 => array(DEFAULT_ERROR_MESSAGE . '25033', 0), + 25034 => array(DEFAULT_ERROR_MESSAGE . '25034', 0), + 25035 => array(DEFAULT_ERROR_MESSAGE . '25035', 0), + 25036 => array(DEFAULT_ERROR_MESSAGE . '25036', 0), + 25037 => array(DEFAULT_ERROR_MESSAGE . '25037', 0), + 25038 => array(DEFAULT_ERROR_MESSAGE . '25038', 0), + 25039 => array(DEFAULT_ERROR_MESSAGE . '25039', 0), + 25040 => array(DEFAULT_ERROR_MESSAGE . '25040', 0), + 25041 => array(DEFAULT_ERROR_MESSAGE . '25041', 0), + 25042 => array(DEFAULT_ERROR_MESSAGE . '25042', 0), + 25043 => array(DEFAULT_ERROR_MESSAGE . '25043', 0), + 25044 => array(DEFAULT_ERROR_MESSAGE . '25044', 0), + 25045 => array(DEFAULT_ERROR_MESSAGE . '25045', 0), + 25046 => array(DEFAULT_ERROR_MESSAGE . '25046', 0), + 25047 => array(DEFAULT_ERROR_MESSAGE . '25047', 0), + 25048 => array(DEFAULT_ERROR_MESSAGE . '25048', 0), + 25049 => array(DEFAULT_ERROR_MESSAGE . '25049', 0), + 25050 => array(DEFAULT_ERROR_MESSAGE . '25050', 0), + 25051 => array(DEFAULT_ERROR_MESSAGE . '25051', 0), + 25052 => array(DEFAULT_ERROR_MESSAGE . '25052', 0), + 25053 => array(DEFAULT_ERROR_MESSAGE . '25053', 0), + 25054 => array(DEFAULT_ERROR_MESSAGE . '25054', 0), + 25055 => array(DEFAULT_ERROR_MESSAGE . '25055', 0), + 25056 => array(DEFAULT_ERROR_MESSAGE . '25056', 0), + 25057 => array(DEFAULT_ERROR_MESSAGE . '25057', 0), + 25058 => array(DEFAULT_ERROR_MESSAGE . '25058', 0), + 25059 => array(DEFAULT_ERROR_MESSAGE . '25059', 0), + 25060 => array(DEFAULT_ERROR_MESSAGE . '25060', 0), + 25061 => array(DEFAULT_ERROR_MESSAGE . '25061', 0), + 25062 => array(DEFAULT_ERROR_MESSAGE . '25062', 0), + 25063 => array(DEFAULT_ERROR_MESSAGE . '25063', 0), + 25064 => array(DEFAULT_ERROR_MESSAGE . '25064', 0), + 25065 => array(DEFAULT_ERROR_MESSAGE . '25065', 0), + 25066 => array(DEFAULT_ERROR_MESSAGE . '25066', 0), + 25067 => array(DEFAULT_ERROR_MESSAGE . '25067', 0), + 25068 => array(DEFAULT_ERROR_MESSAGE . '25068', 0), + 25069 => array(DEFAULT_ERROR_MESSAGE . '25069', 0), + 25070 => array(DEFAULT_ERROR_MESSAGE . '25070', 0), + 25071 => array(DEFAULT_ERROR_MESSAGE . '25071', 0), + 25072 => array(DEFAULT_ERROR_MESSAGE . '25072', 0), + 25073 => array(DEFAULT_ERROR_MESSAGE . '25073', 0), + 25074 => array(DEFAULT_ERROR_MESSAGE . '25074', 0), + 25075 => array(DEFAULT_ERROR_MESSAGE . '25075', 0), + 25077 => array(DEFAULT_ERROR_MESSAGE . '25077', 0), + 25078 => array(DEFAULT_ERROR_MESSAGE . '25078', 0), + 25079 => array(DEFAULT_ERROR_MESSAGE . '25079', 0), + 25080 => array(DEFAULT_ERROR_MESSAGE . '25080', 0), + 25081 => array(DEFAULT_ERROR_MESSAGE . '25081', 0), + 25082 => array(DEFAULT_ERROR_MESSAGE . '25082', 0), + 25083 => array(DEFAULT_ERROR_MESSAGE . '25083', 0), + 25084 => array(DEFAULT_ERROR_MESSAGE . '25084', 0), + 25085 => array(DEFAULT_ERROR_MESSAGE . '25085', 0), + 25086 => array(DEFAULT_ERROR_MESSAGE . '25086', 0), + 25087 => array(DEFAULT_ERROR_MESSAGE . '25087', 0), + 25088 => array(DEFAULT_ERROR_MESSAGE . '25088', 0), + 25089 => array(DEFAULT_ERROR_MESSAGE . '25089', 0), + 25090 => array(DEFAULT_ERROR_MESSAGE . '25090', 0), + 25091 => array(DEFAULT_ERROR_MESSAGE . '25091', 0), + 25092 => array(DEFAULT_ERROR_MESSAGE . '25092', 0), + 25093 => array(DEFAULT_ERROR_MESSAGE . '25093', 0), + 25094 => array(DEFAULT_ERROR_MESSAGE . '25094', 0), + 25095 => array(DEFAULT_ERROR_MESSAGE . '25095', 0), + 25096 => array(DEFAULT_ERROR_MESSAGE . '25096', 0), + 25097 => array(DEFAULT_ERROR_MESSAGE . '25097', 0), + 25098 => array(DEFAULT_ERROR_MESSAGE . '25098', 0), + 25099 => array(DEFAULT_ERROR_MESSAGE . '25099', 0), + 25100 => array(DEFAULT_ERROR_MESSAGE . '25100', 0), + 25101 => array(DEFAULT_ERROR_MESSAGE . '25101', 0), + 25102 => array(DEFAULT_ERROR_MESSAGE . '25102', 0), + 25103 => array(DEFAULT_ERROR_MESSAGE . '25103', 0), + 25104 => array(DEFAULT_ERROR_MESSAGE . '25104', 0), + 25105 => array(DEFAULT_ERROR_MESSAGE . '25105', 0), + 25106 => array(DEFAULT_ERROR_MESSAGE . '25106', 0), + 25107 => array(DEFAULT_ERROR_MESSAGE . '25107', 0), + 25108 => array(DEFAULT_ERROR_MESSAGE . '25108', 0), + 25109 => array(DEFAULT_ERROR_MESSAGE . '25109', 0), + 25110 => array(DEFAULT_ERROR_MESSAGE . '25110', 0), + 25111 => array(DEFAULT_ERROR_MESSAGE . '25111', 0), + 25112 => array(DEFAULT_ERROR_MESSAGE . '25112', 0), + 25113 => array(DEFAULT_ERROR_MESSAGE . '25113', 0), + 25114 => array(DEFAULT_ERROR_MESSAGE . '25114', 0), + 25115 => array(DEFAULT_ERROR_MESSAGE . '25115', 0), + 25116 => array(DEFAULT_ERROR_MESSAGE . '25116', 0), + 25117 => array(DEFAULT_ERROR_MESSAGE . '25117', 0), + 25118 => array(DEFAULT_ERROR_MESSAGE . '25118', 0), + 25119 => array(DEFAULT_ERROR_MESSAGE . '25119', 0), + 25120 => array(DEFAULT_ERROR_MESSAGE . '25120', 0), + 25121 => array(DEFAULT_ERROR_MESSAGE . '25121', 0), + 25122 => array(DEFAULT_ERROR_MESSAGE . '25122', 0), + 25123 => array(DEFAULT_ERROR_MESSAGE . '25123', 0), + 25124 => array(DEFAULT_ERROR_MESSAGE . '25124', 0), + 25125 => array(DEFAULT_ERROR_MESSAGE . '25125', 0), + 25126 => array(DEFAULT_ERROR_MESSAGE . '25126', 0), + 25127 => array(DEFAULT_ERROR_MESSAGE . '25127', 0), + 25128 => array(DEFAULT_ERROR_MESSAGE . '25128', 0), + 25129 => array(DEFAULT_ERROR_MESSAGE . '25129', 0), + 25130 => array(DEFAULT_ERROR_MESSAGE . '25130', 0), + 25131 => array(DEFAULT_ERROR_MESSAGE . '25131', 0), + 25132 => array(DEFAULT_ERROR_MESSAGE . '25132', 0), + 25133 => array(DEFAULT_ERROR_MESSAGE . '25133', 0), + 25500 => array(DEFAULT_ERROR_MESSAGE . '25500', 0), + 24003 => array(DEFAULT_ERROR_MESSAGE . '24003', 0), + 24004 => array(DEFAULT_ERROR_MESSAGE . '24004', 0), + 24005 => array(DEFAULT_ERROR_MESSAGE . '24005', 0), + 24006 => array(DEFAULT_ERROR_MESSAGE . '24006', 0), + 24007 => array(DEFAULT_ERROR_MESSAGE . '24007', 0), + 24008 => array(DEFAULT_ERROR_MESSAGE . '24008', 0), + 24009 => array(DEFAULT_ERROR_MESSAGE . '24009', 0), + 24010 => array(DEFAULT_ERROR_MESSAGE . '24010', 0), + 24011 => array(DEFAULT_ERROR_MESSAGE . '24011', 0), + 24012 => array(DEFAULT_ERROR_MESSAGE . '24012', 0), + 24013 => array(DEFAULT_ERROR_MESSAGE . '24013', 0), + 24014 => array(DEFAULT_ERROR_MESSAGE . '24014', 0), + 24015 => array(DEFAULT_ERROR_MESSAGE . '24015', 0), + 22001 => array(DEFAULT_ERROR_MESSAGE . '22001', 0), + 22002 => array(DEFAULT_ERROR_MESSAGE . '22002', 0), + 22004 => array(DEFAULT_ERROR_MESSAGE . '22004', 0), + 22005 => array(DEFAULT_ERROR_MESSAGE . '22005', 0), + 22006 => array(DEFAULT_ERROR_MESSAGE . '22006', 0), + 22007 => array(DEFAULT_ERROR_MESSAGE . '22007', 0), + 22008 => array(DEFAULT_ERROR_MESSAGE . '22008', 0), + 22009 => array(DEFAULT_ERROR_MESSAGE . '22009', 0), + 22010 => array(DEFAULT_ERROR_MESSAGE . '22010', 0), + 22011 => array(DEFAULT_ERROR_MESSAGE . '22011', 0), + 22012 => array(DEFAULT_ERROR_MESSAGE . '22012', 0), + 22013 => array(DEFAULT_ERROR_MESSAGE . '22013', 0), + 22014 => array(DEFAULT_ERROR_MESSAGE . '22014', 0), + 22015 => array(DEFAULT_ERROR_MESSAGE . '22015', 0), + 22016 => array(DEFAULT_ERROR_MESSAGE . '22016', 0), + 22017 => array(DEFAULT_ERROR_MESSAGE . '22017', 0), + 22018 => array(DEFAULT_ERROR_MESSAGE . '22018', 0), + 22019 => array(DEFAULT_ERROR_MESSAGE . '22019', 0), + 22020 => array(DEFAULT_ERROR_MESSAGE . '22020', 0), + 13001 => array(DEFAULT_ERROR_MESSAGE . '13001', 0), + 13002 => array(DEFAULT_ERROR_MESSAGE . '13002', 0), + 1001 => array(DEFAULT_ERROR_MESSAGE . '1001', 0), + 1002 => array(DEFAULT_ERROR_MESSAGE . '1002', 0), + 1003 => array(DEFAULT_ERROR_MESSAGE . '1003', 0), + 1004 => array(DEFAULT_ERROR_MESSAGE . '1004', 0), + 1005 => array(DEFAULT_ERROR_MESSAGE . '1005', 0), + 1006 => array(DEFAULT_ERROR_MESSAGE . '1006', 0), + 1007 => array(DEFAULT_ERROR_MESSAGE . '1007', 0), + 1008 => array(DEFAULT_ERROR_MESSAGE . '1008', 0), + 1009 => array(DEFAULT_ERROR_MESSAGE . '1009', 0), + 1010 => array(DEFAULT_ERROR_MESSAGE . '1010', 0), + 1011 => array(DEFAULT_ERROR_MESSAGE . '1011', 0), + 26000 => array(DEFAULT_ERROR_MESSAGE . '26000', 0), + 26001 => array(DEFAULT_ERROR_MESSAGE . '26001', 0), + 26002 => array(DEFAULT_ERROR_MESSAGE . '26002', 0), + 26003 => array(DEFAULT_ERROR_MESSAGE . '26003', 0), + 26004 => array(DEFAULT_ERROR_MESSAGE . '26004', 0), + 26005 => array(DEFAULT_ERROR_MESSAGE . '26005', 0), + 26006 => array(DEFAULT_ERROR_MESSAGE . '26006', 0), + 26007 => array(DEFAULT_ERROR_MESSAGE . '26007', 0), + 26008 => array(DEFAULT_ERROR_MESSAGE . '26008', 0), + 26009 => array(DEFAULT_ERROR_MESSAGE . '26009', 0), + 26010 => array(DEFAULT_ERROR_MESSAGE . '26010', 0), + 26011 => array(DEFAULT_ERROR_MESSAGE . '26011', 0), + 26012 => array(DEFAULT_ERROR_MESSAGE . '26012', 0), + 26013 => array(DEFAULT_ERROR_MESSAGE . '26013', 0), + 26014 => array(DEFAULT_ERROR_MESSAGE . '26014', 0), + 26015 => array(DEFAULT_ERROR_MESSAGE . '26015', 0), + 26016 => array(DEFAULT_ERROR_MESSAGE . '26016', 0), + + 27001 => array(DEFAULT_ERROR_MESSAGE . '27001', 0), + 27002 => array(DEFAULT_ERROR_MESSAGE . '27002', 0), + 27003 => array(DEFAULT_ERROR_MESSAGE . '27003', 0), + 27004 => array(DEFAULT_ERROR_MESSAGE . '27004', 0), + 27005 => array(DEFAULT_ERROR_MESSAGE . '27005', 0), + 27006 => array(DEFAULT_ERROR_MESSAGE . '27006', 0), + 27007 => array(DEFAULT_ERROR_MESSAGE . '27007', 0), + 27008 => array(DEFAULT_ERROR_MESSAGE . '27008', 0), + 27009 => array(DEFAULT_ERROR_MESSAGE . '27009', 0), + 27010 => array(DEFAULT_ERROR_MESSAGE . '27010', 0), + 27011 => array(DEFAULT_ERROR_MESSAGE . '27011', 0), + 27012 => array(DEFAULT_ERROR_MESSAGE . '27012', 0), + 27013 => array(DEFAULT_ERROR_MESSAGE . '27013', 0), + 27014 => array(DEFAULT_ERROR_MESSAGE . '27014', 0), + 27015 => array(DEFAULT_ERROR_MESSAGE . '27015', 0), + + 28001 => array(DEFAULT_ERROR_MESSAGE . '28001', 0), + 28002 => array(DEFAULT_ERROR_MESSAGE . '28002', 0), + 28003 => array(DEFAULT_ERROR_MESSAGE . '28003', 0), + 28004 => array(DEFAULT_ERROR_MESSAGE . '28004', 0), + 28005 => array(DEFAULT_ERROR_MESSAGE . '28005', 0), + 28006 => array(DEFAULT_ERROR_MESSAGE . '28006', 0), + 28007 => array(DEFAULT_ERROR_MESSAGE . '28007', 0), + + 29201 => array(DEFAULT_ERROR_MESSAGE . '28001', 0), + 29202 => array(DEFAULT_ERROR_MESSAGE . '28002', 0), + 29203 => array(DEFAULT_ERROR_MESSAGE . '28003', 0), + 29204 => array(DEFAULT_ERROR_MESSAGE . '28004', 0), + 29205 => array(DEFAULT_ERROR_MESSAGE . '28005', 0), + 29206 => array(DEFAULT_ERROR_MESSAGE . '28006', 0), + 29207 => array(DEFAULT_ERROR_MESSAGE . '28007', 0), + 29208 => array(DEFAULT_ERROR_MESSAGE . '28008', 0), + 29209 => array(DEFAULT_ERROR_MESSAGE . '28009', 0), + 29210 => array(DEFAULT_ERROR_MESSAGE . '28010', 0), + +); diff --git a/vendor/amenadiel/jpgraph/src/plot/AccBarPlot.php b/vendor/amenadiel/jpgraph/src/plot/AccBarPlot.php new file mode 100644 index 0000000000..a6a364e70a --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/plot/AccBarPlot.php @@ -0,0 +1,441 @@ +plots = $plots; + $this->nbrplots = count($plots); + if ($this->nbrplots < 1) { + Util\JpGraphError::RaiseL(2010); //('Cannot create AccBarPlot from empty plot array.'); + } + for ($i = 0; $i < $this->nbrplots; ++$i) { + if (empty($this->plots[$i]) || !isset($this->plots[$i])) { + Util\JpGraphError::RaiseL(2011, $i); //("Acc bar plot element nbr $i is undefined or empty."); + } + } + + // We can only allow individual plost which do not have specified X-positions + for ($i = 0; $i < $this->nbrplots; ++$i) { + if (!empty($this->plots[$i]->coords[1])) { + Util\JpGraphError::RaiseL(2015); + //'Individual bar plots in an AccBarPlot or GroupBarPlot can not have specified X-positions.'); + } + } + + // Use 0 weight by default which means that the individual bar + // weights will be used per part n the accumulated bar + $this->SetWeight(0); + + $this->numpoints = $plots[0]->numpoints; + $this->value = new DisplayValue(); + } + + //--------------- + // PUBLIC METHODS + public function Legend($graph) + { + $n = count($this->plots); + for ($i = $n - 1; $i >= 0; --$i) { + $c = get_class($this->plots[$i]); + if (!($this->plots[$i] instanceof BarPlot)) { + Util\JpGraphError::RaiseL(2012, $c); + //('One of the objects submitted to AccBar is not a BarPlot. Make sure that you create the AccBar plot from an array of BarPlot objects.(Class='.$c.')'); + } + $this->plots[$i]->DoLegend($graph); + } + } + + public function Max() + { + list($xmax) = $this->plots[0]->Max(); + $nmax = 0; + for ($i = 0; $i < count($this->plots); ++$i) { + $n = count($this->plots[$i]->coords[0]); + $nmax = max($nmax, $n); + list($x) = $this->plots[$i]->Max(); + $xmax = max($xmax, $x); + } + for ($i = 0; $i < $nmax; $i++) { + // Get y-value for bar $i by adding the + // individual bars from all the plots added. + // It would be wrong to just add the + // individual plots max y-value since that + // would in most cases give to large y-value. + $y = 0; + if (!isset($this->plots[0]->coords[0][$i])) { + Util\JpGraphError::RaiseL(2014); + } + if ($this->plots[0]->coords[0][$i] > 0) { + $y = $this->plots[0]->coords[0][$i]; + } + + for ($j = 1; $j < $this->nbrplots; $j++) { + if (!isset($this->plots[$j]->coords[0][$i])) { + Util\JpGraphError::RaiseL(2014); + } + if ($this->plots[$j]->coords[0][$i] > 0) { + $y += $this->plots[$j]->coords[0][$i]; + } + + } + $ymax[$i] = $y; + } + $ymax = max($ymax); + + // Bar always start at baseline + if ($ymax <= $this->ybase) { + $ymax = $this->ybase; + } + + return array($xmax, $ymax); + } + + public function Min() + { + $nmax = 0; + list($xmin, $ysetmin) = $this->plots[0]->Min(); + for ($i = 0; $i < count($this->plots); ++$i) { + $n = count($this->plots[$i]->coords[0]); + $nmax = max($nmax, $n); + list($x, $y) = $this->plots[$i]->Min(); + $xmin = Min($xmin, $x); + $ysetmin = Min($y, $ysetmin); + } + for ($i = 0; $i < $nmax; $i++) { + // Get y-value for bar $i by adding the + // individual bars from all the plots added. + // It would be wrong to just add the + // individual plots max y-value since that + // would in most cases give to large y-value. + $y = 0; + if ($this->plots[0]->coords[0][$i] < 0) { + $y = $this->plots[0]->coords[0][$i]; + } + + for ($j = 1; $j < $this->nbrplots; $j++) { + if ($this->plots[$j]->coords[0][$i] < 0) { + $y += $this->plots[$j]->coords[0][$i]; + } + + } + $ymin[$i] = $y; + } + $ymin = Min($ysetmin, Min($ymin)); + // Bar always start at baseline + if ($ymin >= $this->ybase) { + $ymin = $this->ybase; + } + + return array($xmin, $ymin); + } + + // Stroke acc bar plot + public function Stroke($img, $xscale, $yscale) + { + $pattern = null; + $img->SetLineWeight($this->weight); + $grad = null; + for ($i = 0; $i < $this->numpoints - 1; $i++) { + $accy = 0; + $accy_neg = 0; + for ($j = 0; $j < $this->nbrplots; ++$j) { + $img->SetColor($this->plots[$j]->color); + + if ($this->plots[$j]->coords[0][$i] >= 0) { + $yt = $yscale->Translate($this->plots[$j]->coords[0][$i] + $accy); + $accyt = $yscale->Translate($accy); + $accy += $this->plots[$j]->coords[0][$i]; + } else { + //if ( $this->plots[$j]->coords[0][$i] < 0 || $accy_neg < 0 ) { + $yt = $yscale->Translate($this->plots[$j]->coords[0][$i] + $accy_neg); + $accyt = $yscale->Translate($accy_neg); + $accy_neg += $this->plots[$j]->coords[0][$i]; + } + + $xt = $xscale->Translate($i); + + if ($this->abswidth > -1) { + $abswidth = $this->abswidth; + } else { + $abswidth = round($this->width * $xscale->scale_factor, 0); + } + + $pts = array($xt, $accyt, $xt, $yt, $xt + $abswidth, $yt, $xt + $abswidth, $accyt); + + if ($this->bar_shadow) { + $ssh = $this->bar_shadow_hsize; + $ssv = $this->bar_shadow_vsize; + + // We must also differ if we are a positive or negative bar. + if ($j === 0) { + // This gets extra complicated since we have to + // see all plots to see if we are negative. It could + // for example be that all plots are 0 until the very + // last one. We therefore need to save the initial setup + // for both the negative and positive case + + // In case the final bar is positive + $sp[0] = $pts[6] + 1; + $sp[1] = $pts[7]; + $sp[2] = $pts[6] + $ssh; + $sp[3] = $pts[7] - $ssv; + + // In case the final bar is negative + $nsp[0] = $pts[0]; + $nsp[1] = $pts[1]; + $nsp[2] = $pts[0] + $ssh; + $nsp[3] = $pts[1] - $ssv; + $nsp[4] = $pts[6] + $ssh; + $nsp[5] = $pts[7] - $ssv; + $nsp[10] = $pts[6] + 1; + $nsp[11] = $pts[7]; + } + + if ($j === $this->nbrplots - 1) { + // If this is the last plot of the bar and + // the total value is larger than 0 then we + // add the shadow. + if (is_array($this->bar_shadow_color)) { + $numcolors = count($this->bar_shadow_color); + if ($numcolors == 0) { + Util\JpGraphError::RaiseL(2013); //('You have specified an empty array for shadow colors in the bar plot.'); + } + $img->PushColor($this->bar_shadow_color[$i % $numcolors]); + } else { + $img->PushColor($this->bar_shadow_color); + } + + if ($accy > 0) { + $sp[4] = $pts[4] + $ssh; + $sp[5] = $pts[5] - $ssv; + $sp[6] = $pts[2] + $ssh; + $sp[7] = $pts[3] - $ssv; + $sp[8] = $pts[2]; + $sp[9] = $pts[3] - 1; + $sp[10] = $pts[4] + 1; + $sp[11] = $pts[5]; + $img->FilledPolygon($sp, 4); + } elseif ($accy_neg < 0) { + $nsp[6] = $pts[4] + $ssh; + $nsp[7] = $pts[5] - $ssv; + $nsp[8] = $pts[4] + 1; + $nsp[9] = $pts[5]; + $img->FilledPolygon($nsp, 4); + } + $img->PopColor(); + } + } + + // If value is NULL or 0, then don't draw a bar at all + if ($this->plots[$j]->coords[0][$i] == 0) { + continue; + } + + if ($this->plots[$j]->grad) { + if ($grad === null) { + $grad = new Gradient($img); + } + if (is_array($this->plots[$j]->grad_fromcolor)) { + // The first argument (grad_fromcolor) can be either an array or a single color. If it is an array + // then we have two choices. It can either a) be a single color specified as an RGB triple or it can be + // an array to specify both (from, to style) for each individual bar. The way to know the difference is + // to investgate the first element. If this element is an integer [0,255] then we assume it is an RGB + // triple. + $ng = count($this->plots[$j]->grad_fromcolor); + if ($ng === 3) { + if (is_numeric($this->plots[$j]->grad_fromcolor[0]) && $this->plots[$j]->grad_fromcolor[0] > 0 && + $this->plots[$j]->grad_fromcolor[0] < 256) { + // RGB Triple + $fromcolor = $this->plots[$j]->grad_fromcolor; + $tocolor = $this->plots[$j]->grad_tocolor; + $style = $this->plots[$j]->grad_style; + } else { + $fromcolor = $this->plots[$j]->grad_fromcolor[$i % $ng][0]; + $tocolor = $this->plots[$j]->grad_fromcolor[$i % $ng][1]; + $style = $this->plots[$j]->grad_fromcolor[$i % $ng][2]; + } + } else { + $fromcolor = $this->plots[$j]->grad_fromcolor[$i % $ng][0]; + $tocolor = $this->plots[$j]->grad_fromcolor[$i % $ng][1]; + $style = $this->plots[$j]->grad_fromcolor[$i % $ng][2]; + } + $grad->FilledRectangle($pts[2], $pts[3], + $pts[6], $pts[7], + $fromcolor, $tocolor, $style); + } else { + $grad->FilledRectangle($pts[2], $pts[3], + $pts[6], $pts[7], + $this->plots[$j]->grad_fromcolor, + $this->plots[$j]->grad_tocolor, + $this->plots[$j]->grad_style); + } + } else { + if (is_array($this->plots[$j]->fill_color)) { + $numcolors = count($this->plots[$j]->fill_color); + $fillcolor = $this->plots[$j]->fill_color[$i % $numcolors]; + // If the bar is specified to be non filled then the fill color is false + if ($fillcolor !== false) { + $img->SetColor($this->plots[$j]->fill_color[$i % $numcolors]); + } + } else { + $fillcolor = $this->plots[$j]->fill_color; + if ($fillcolor !== false) { + $img->SetColor($this->plots[$j]->fill_color); + } + } + if ($fillcolor !== false) { + $img->FilledPolygon($pts); + } + } + + $img->SetColor($this->plots[$j]->color); + + // Stroke the pattern + if ($this->plots[$j]->iPattern > -1) { + if ($pattern === null) { + $pattern = new RectPatternFactory(); + } + + $prect = $pattern->Create($this->plots[$j]->iPattern, $this->plots[$j]->iPatternColor, 1); + $prect->SetDensity($this->plots[$j]->iPatternDensity); + if ($this->plots[$j]->coords[0][$i] < 0) { + $rx = $pts[0]; + $ry = $pts[1]; + } else { + $rx = $pts[2]; + $ry = $pts[3]; + } + $width = abs($pts[4] - $pts[0]) + 1; + $height = abs($pts[1] - $pts[3]) + 1; + $prect->SetPos(new Rectangle($rx, $ry, $width, $height)); + $prect->Stroke($img); + } + + // CSIM array + + if ($i < count($this->plots[$j]->csimtargets)) { + // Create the client side image map + $rpts = $img->ArrRotate($pts); + $csimcoord = round($rpts[0]) . ", " . round($rpts[1]); + for ($k = 1; $k < 4; ++$k) { + $csimcoord .= ", " . round($rpts[2 * $k]) . ", " . round($rpts[2 * $k + 1]); + } + if (!empty($this->plots[$j]->csimtargets[$i])) { + $this->csimareas .= 'csimareas .= " href=\"" . $this->plots[$j]->csimtargets[$i] . "\" "; + + if (!empty($this->plots[$j]->csimwintargets[$i])) { + $this->csimareas .= " target=\"" . $this->plots[$j]->csimwintargets[$i] . "\" "; + } + + $sval = ''; + if (!empty($this->plots[$j]->csimalts[$i])) { + $sval = sprintf($this->plots[$j]->csimalts[$i], $this->plots[$j]->coords[0][$i]); + $this->csimareas .= " title=\"$sval\" "; + } + $this->csimareas .= " alt=\"$sval\" />\n"; + } + } + + $pts[] = $pts[0]; + $pts[] = $pts[1]; + $img->SetLineWeight($this->plots[$j]->weight); + $img->Polygon($pts); + $img->SetLineWeight(1); + } + + // Daw potential bar around the entire accbar bar + if ($this->weight > 0) { + $y = $yscale->Translate(0); + $img->SetColor($this->color); + $img->SetLineWeight($this->weight); + $img->Rectangle($pts[0], $y, $pts[6], $pts[5]); + } + + // Draw labels for each acc.bar + + $x = $pts[2] + ($pts[4] - $pts[2]) / 2; + if ($this->bar_shadow) { + $x += $ssh; + } + + // First stroke the accumulated value for the entire bar + // This value is always placed at the top/bottom of the bars + if ($accy_neg < 0) { + $y = $yscale->Translate($accy_neg); + $this->value->Stroke($img, $accy_neg, $x, $y); + } else { + $y = $yscale->Translate($accy); + $this->value->Stroke($img, $accy, $x, $y); + } + + $accy = 0; + $accy_neg = 0; + for ($j = 0; $j < $this->nbrplots; ++$j) { + + // We don't print 0 values in an accumulated bar plot + if ($this->plots[$j]->coords[0][$i] == 0) { + continue; + } + + if ($this->plots[$j]->coords[0][$i] > 0) { + $yt = $yscale->Translate($this->plots[$j]->coords[0][$i] + $accy); + $accyt = $yscale->Translate($accy); + if ($this->plots[$j]->valuepos == 'center') { + $y = $accyt - ($accyt - $yt) / 2; + } elseif ($this->plots[$j]->valuepos == 'bottom') { + $y = $accyt; + } else { + // top or max + $y = $accyt - ($accyt - $yt); + } + $accy += $this->plots[$j]->coords[0][$i]; + if ($this->plots[$j]->valuepos == 'center') { + $this->plots[$j]->value->SetAlign("center", "center"); + $this->plots[$j]->value->SetMargin(0); + } elseif ($this->plots[$j]->valuepos == 'bottom') { + $this->plots[$j]->value->SetAlign('center', 'bottom'); + $this->plots[$j]->value->SetMargin(2); + } else { + $this->plots[$j]->value->SetAlign('center', 'top'); + $this->plots[$j]->value->SetMargin(1); + } + } else { + $yt = $yscale->Translate($this->plots[$j]->coords[0][$i] + $accy_neg); + $accyt = $yscale->Translate($accy_neg); + $accy_neg += $this->plots[$j]->coords[0][$i]; + if ($this->plots[$j]->valuepos == 'center') { + $y = $accyt - ($accyt - $yt) / 2; + } elseif ($this->plots[$j]->valuepos == 'bottom') { + $y = $accyt; + } else { + $y = $accyt - ($accyt - $yt); + } + if ($this->plots[$j]->valuepos == 'center') { + $this->plots[$j]->value->SetAlign("center", "center"); + $this->plots[$j]->value->SetMargin(0); + } elseif ($this->plots[$j]->valuepos == 'bottom') { + $this->plots[$j]->value->SetAlign('center', $j == 0 ? 'bottom' : 'top'); + $this->plots[$j]->value->SetMargin(-2); + } else { + $this->plots[$j]->value->SetAlign('center', 'bottom'); + $this->plots[$j]->value->SetMargin(-1); + } + } + $this->plots[$j]->value->Stroke($img, $this->plots[$j]->coords[0][$i], $x, $y); + } + + } + return true; + } +} // Class diff --git a/vendor/amenadiel/jpgraph/src/plot/AccLinePlot.php b/vendor/amenadiel/jpgraph/src/plot/AccLinePlot.php new file mode 100644 index 0000000000..5653a580b3 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/plot/AccLinePlot.php @@ -0,0 +1,228 @@ +plots = $plots; + $this->nbrplots = count($plots); + $this->numpoints = $plots[0]->numpoints; + + // Verify that all plots have the same number of data points + for ($i = 1; $i < $this->nbrplots; ++$i) { + if ($plots[$i]->numpoints != $this->numpoints) { + Util\JpGraphError::RaiseL(10003); //('Each plot in an accumulated lineplot must have the same number of data points',0) + } + } + + for ($i = 0; $i < $this->nbrplots; ++$i) { + $this->LineInterpolate($this->plots[$i]->coords[0]); + } + } + + //--------------- + // PUBLIC METHODS + public function Legend($graph) + { + foreach ($this->plots as $p) { + $p->DoLegend($graph); + } + } + + public function Max() + { + list($xmax) = $this->plots[0]->Max(); + $nmax = 0; + $n = count($this->plots); + for ($i = 0; $i < $n; ++$i) { + $nc = count($this->plots[$i]->coords[0]); + $nmax = max($nmax, $nc); + list($x) = $this->plots[$i]->Max(); + $xmax = Max($xmax, $x); + } + for ($i = 0; $i < $nmax; $i++) { + // Get y-value for line $i by adding the + // individual bars from all the plots added. + // It would be wrong to just add the + // individual plots max y-value since that + // would in most cases give to large y-value. + $y = $this->plots[0]->coords[0][$i]; + for ($j = 1; $j < $this->nbrplots; $j++) { + $y += $this->plots[$j]->coords[0][$i]; + } + $ymax[$i] = $y; + } + $ymax = max($ymax); + return array($xmax, $ymax); + } + + public function Min() + { + $nmax = 0; + list($xmin, $ysetmin) = $this->plots[0]->Min(); + $n = count($this->plots); + for ($i = 0; $i < $n; ++$i) { + $nc = count($this->plots[$i]->coords[0]); + $nmax = max($nmax, $nc); + list($x, $y) = $this->plots[$i]->Min(); + $xmin = Min($xmin, $x); + $ysetmin = Min($y, $ysetmin); + } + for ($i = 0; $i < $nmax; $i++) { + // Get y-value for line $i by adding the + // individual bars from all the plots added. + // It would be wrong to just add the + // individual plots min y-value since that + // would in most cases give to small y-value. + $y = $this->plots[0]->coords[0][$i]; + for ($j = 1; $j < $this->nbrplots; $j++) { + $y += $this->plots[$j]->coords[0][$i]; + } + $ymin[$i] = $y; + } + $ymin = Min($ysetmin, Min($ymin)); + return array($xmin, $ymin); + } + + // Gets called before any axis are stroked + public function PreStrokeAdjust($graph) + { + + // If another plot type have already adjusted the + // offset we don't touch it. + // (We check for empty in case the scale is a log scale + // and hence doesn't contain any xlabel_offset) + + if (empty($graph->xaxis->scale->ticks->xlabel_offset) || + $graph->xaxis->scale->ticks->xlabel_offset == 0) { + if ($this->center) { + ++$this->numpoints; + $a = 0.5; + $b = 0.5; + } else { + $a = 0; + $b = 0; + } + $graph->xaxis->scale->ticks->SetXLabelOffset($a); + $graph->SetTextScaleOff($b); + $graph->xaxis->scale->ticks->SupressMinorTickMarks(); + } + + } + + public function SetInterpolateMode($aIntMode) + { + $this->iStartEndZero = $aIntMode; + } + + // Replace all '-' with an interpolated value. We use straightforward + // linear interpolation. If the data starts with one or several '-' they + // will be replaced by the the first valid data point + public function LineInterpolate(&$aData) + { + + $n = count($aData); + $i = 0; + + // If first point is undefined we will set it to the same as the first + // valid data + if ($aData[$i] === '-') { + // Find the first valid data + while ($i < $n && $aData[$i] === '-') { + ++$i; + } + if ($i < $n) { + for ($j = 0; $j < $i; ++$j) { + if ($this->iStartEndZero) { + $aData[$i] = 0; + } else { + $aData[$j] = $aData[$i]; + } + + } + } else { + // All '-' => Error + return false; + } + } + + while ($i < $n) { + while ($i < $n && $aData[$i] !== '-') { + ++$i; + } + if ($i < $n) { + $pstart = $i - 1; + + // Now see how long this segment of '-' are + while ($i < $n && $aData[$i] === '-') { + ++$i; + } + if ($i < $n) { + $pend = $i; + $size = $pend - $pstart; + $k = ($aData[$pend] - $aData[$pstart]) / $size; + // Replace the segment of '-' with a linear interpolated value. + for ($j = 1; $j < $size; ++$j) { + $aData[$pstart + $j] = $aData[$pstart] + $j * $k; + } + } else { + // There are no valid end point. The '-' goes all the way to the end + // In that case we just set all the remaining values the the same as the + // last valid data point. + for ($j = $pstart + 1; $j < $n; ++$j) { + if ($this->iStartEndZero) { + $aData[$j] = 0; + } else { + $aData[$j] = $aData[$pstart]; + } + } + + } + } + } + return true; + } + + // To avoid duplicate of line drawing code here we just + // change the y-values for each plot and then restore it + // after we have made the stroke. We must do this copy since + // it wouldn't be possible to create an acc line plot + // with the same graphs, i.e AccLinePlot(array($pl,$pl,$pl)); + // since this method would have a side effect. + public function Stroke($img, $xscale, $yscale) + { + $img->SetLineWeight($this->weight); + $this->numpoints = count($this->plots[0]->coords[0]); + // Allocate array + $coords[$this->nbrplots][$this->numpoints] = 0; + for ($i = 0; $i < $this->numpoints; $i++) { + $coords[0][$i] = $this->plots[0]->coords[0][$i]; + $accy = $coords[0][$i]; + for ($j = 1; $j < $this->nbrplots; ++$j) { + $coords[$j][$i] = $this->plots[$j]->coords[0][$i] + $accy; + $accy = $coords[$j][$i]; + } + } + for ($j = $this->nbrplots - 1; $j >= 0; --$j) { + $p = $this->plots[$j]; + for ($i = 0; $i < $this->numpoints; ++$i) { + $tmp[$i] = $p->coords[0][$i]; + $p->coords[0][$i] = $coords[$j][$i]; + } + $p->Stroke($img, $xscale, $yscale); + for ($i = 0; $i < $this->numpoints; ++$i) { + $p->coords[0][$i] = $tmp[$i]; + } + $p->coords[0][] = $tmp; + } + } +} // Class diff --git a/vendor/amenadiel/jpgraph/src/plot/BarPlot.php b/vendor/amenadiel/jpgraph/src/plot/BarPlot.php new file mode 100644 index 0000000000..0424b39d06 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/plot/BarPlot.php @@ -0,0 +1,707 @@ +numpoints; + } + + //--------------- + // PUBLIC METHODS + + // Set a drop shadow for the bar (or rather an "up-right" shadow) + public function SetShadow($aColor = "black", $aHSize = 3, $aVSize = 3, $aShow = true) + { + $this->bar_shadow = $aShow; + $this->bar_shadow_color = $aColor; + $this->bar_shadow_vsize = $aVSize; + $this->bar_shadow_hsize = $aHSize; + + // Adjust the value margin to compensate for shadow + $this->value->margin += $aVSize; + } + + public function Set3D($aHSize = 3, $aVSize = 3, $aShow = true) + { + $this->bar_3d = $aShow; + $this->bar_3d_vsize = $aVSize; + $this->bar_3d_hsize = $aHSize; + + $this->value->margin += $aVSize; + } + + // DEPRECATED use SetYBase instead + public function SetYMin($aYStartValue) + { + //die("JpGraph Error: Deprecated function SetYMin. Use SetYBase() instead."); + $this->ybase = $aYStartValue; + } + + // Specify the base value for the bars + public function SetYBase($aYStartValue) + { + $this->ybase = $aYStartValue; + } + + // The method will take the specified pattern anre + // return a pattern index that corresponds to the original + // patterm being rotated 90 degreees. This is needed when plottin + // Horizontal bars + public function RotatePattern($aPat, $aRotate = true) + { + $rotate = array(1 => 2, 2 => 1, 3 => 3, 4 => 5, 5 => 4, 6 => 6, 7 => 7, 8 => 8); + if ($aRotate) { + return $rotate[$aPat]; + } else { + return $aPat; + } + } + + public function Legend($graph) + { + if ($this->grad && $this->legend != "" && !$this->fill) { + $color = array($this->grad_fromcolor, $this->grad_tocolor); + // In order to differentiate between gradients and cooors specified as an RGB triple + $graph->legend->Add($this->legend, $color, "", -$this->grad_style, + $this->legendcsimtarget, $this->legendcsimalt, $this->legendcsimwintarget); + } elseif ($this->legend != "" && ($this->iPattern > -1 || is_array($this->iPattern))) { + if (is_array($this->iPattern)) { + $p1 = $this->RotatePattern($this->iPattern[0], $graph->img->a == 90); + $p2 = $this->iPatternColor[0]; + $p3 = $this->iPatternDensity[0]; + } else { + $p1 = $this->RotatePattern($this->iPattern, $graph->img->a == 90); + $p2 = $this->iPatternColor; + $p3 = $this->iPatternDensity; + } + if ($p3 < 90) { + $p3 += 5; + } + + $color = array($p1, $p2, $p3, $this->fill_color); + // A kludge: Too mark that we add a pattern we use a type value of < 100 + $graph->legend->Add($this->legend, $color, "", -101, + $this->legendcsimtarget, $this->legendcsimalt, $this->legendcsimwintarget); + } elseif ($this->fill_color && $this->legend != "") { + if (is_array($this->fill_color)) { + $graph->legend->Add($this->legend, $this->fill_color[0], "", 0, + $this->legendcsimtarget, $this->legendcsimalt, $this->legendcsimwintarget); + } else { + $graph->legend->Add($this->legend, $this->fill_color, "", 0, + $this->legendcsimtarget, $this->legendcsimalt, $this->legendcsimwintarget); + } + } + } + + // Gets called before any axis are stroked + public function PreStrokeAdjust($graph) + { + parent::PreStrokeAdjust($graph); + + // If we are using a log Y-scale we want the base to be at the + // minimum Y-value unless the user have specifically set some other + // value than the default. + if (substr($graph->axtype, -3, 3) == "log" && $this->ybase == 0) { + $this->ybase = $graph->yaxis->scale->GetMinVal(); + } + + // For a "text" X-axis scale we will adjust the + // display of the bars a little bit. + if (substr($graph->axtype, 0, 3) == "tex") { + // Position the ticks between the bars + $graph->xaxis->scale->ticks->SetXLabelOffset(0.5, 0); + + // Center the bars + if ($this->abswidth > -1) { + $graph->SetTextScaleAbsCenterOff($this->abswidth); + } else { + if ($this->align == "center") { + $graph->SetTextScaleOff(0.5 - $this->width / 2); + } elseif ($this->align == "right") { + $graph->SetTextScaleOff(1 - $this->width); + } + + } + } elseif (($this instanceof AccBarPlot) || ($this instanceof GroupBarPlot)) { + // We only set an absolute width for linear and int scale + // for text scale the width will be set to a fraction of + // the majstep width. + if ($this->abswidth == -1) { + // Not set + // set width to a visuable sensible default + $this->abswidth = $graph->img->plotwidth / (2 * $this->numpoints); + } + } + } + + public function Min() + { + $m = parent::Min(); + if ($m[1] >= $this->ybase) { + $m[1] = $this->ybase; + } + + return $m; + } + + public function Max() + { + $m = parent::Max(); + if ($m[1] <= $this->ybase) { + $m[1] = $this->ybase; + } + + return $m; + } + + // Specify width as fractions of the major stepo size + public function SetWidth($aWidth) + { + if ($aWidth > 1) { + // Interpret this as absolute width + $this->abswidth = $aWidth; + } else { + $this->width = $aWidth; + } + } + + // Specify width in absolute pixels. If specified this + // overrides SetWidth() + public function SetAbsWidth($aWidth) + { + $this->abswidth = $aWidth; + } + + public function SetAlign($aAlign) + { + $this->align = $aAlign; + } + + public function SetNoFill() + { + $this->grad = false; + $this->fill_color = false; + $this->fill = false; + } + + public function SetFillColor($aColor) + { + // Do an extra error check if the color is specified as an RGB array triple + // In that case convert it to a hex string since it will otherwise be + // interpretated as an array of colors for each individual bar. + + $aColor = Image\RGB::tryHexConversion($aColor); + $this->fill = true; + $this->fill_color = $aColor; + + } + + public function SetFillGradient($aFromColor, $aToColor = null, $aStyle = null) + { + $this->grad = true; + $this->grad_fromcolor = $aFromColor; + $this->grad_tocolor = $aToColor; + $this->grad_style = $aStyle; + } + + public function SetValuePos($aPos) + { + $this->valuepos = $aPos; + } + + public function SetPattern($aPattern, $aColor = 'black') + { + if (is_array($aPattern)) { + $n = count($aPattern); + $this->iPattern = array(); + $this->iPatternDensity = array(); + if (is_array($aColor)) { + $this->iPatternColor = array(); + if (count($aColor) != $n) { + Util\JpGraphError::RaiseL(2001); //('NUmber of colors is not the same as the number of patterns in BarPlot::SetPattern()'); + } + } else { + $this->iPatternColor = $aColor; + } + for ($i = 0; $i < $n; ++$i) { + $this->_SetPatternHelper($aPattern[$i], $this->iPattern[$i], $this->iPatternDensity[$i]); + if (is_array($aColor)) { + $this->iPatternColor[$i] = $aColor[$i]; + } + } + } else { + $this->_SetPatternHelper($aPattern, $this->iPattern, $this->iPatternDensity); + $this->iPatternColor = $aColor; + } + } + + public function _SetPatternHelper($aPattern, &$aPatternValue, &$aDensity) + { + switch ($aPattern) { + case PATTERN_DIAG1: + $aPatternValue = 1; + $aDensity = 92; + break; + case PATTERN_DIAG2: + $aPatternValue = 1; + $aDensity = 78; + break; + case PATTERN_DIAG3: + $aPatternValue = 2; + $aDensity = 92; + break; + case PATTERN_DIAG4: + $aPatternValue = 2; + $aDensity = 78; + break; + case PATTERN_CROSS1: + $aPatternValue = 8; + $aDensity = 90; + break; + case PATTERN_CROSS2: + $aPatternValue = 8; + $aDensity = 78; + break; + case PATTERN_CROSS3: + $aPatternValue = 8; + $aDensity = 65; + break; + case PATTERN_CROSS4: + $aPatternValue = 7; + $aDensity = 90; + break; + case PATTERN_STRIPE1: + $aPatternValue = 5; + $aDensity = 94; + break; + case PATTERN_STRIPE2: + $aPatternValue = 5; + $aDensity = 85; + break; + default: + Util\JpGraphError::RaiseL(2002); + //('Unknown pattern specified in call to BarPlot::SetPattern()'); + } + } + + public function Stroke($img, $xscale, $yscale) + { + + $numpoints = count($this->coords[0]); + if (isset($this->coords[1])) { + if (count($this->coords[1]) != $numpoints) { + Util\JpGraphError::RaiseL(2003, count($this->coords[1]), $numpoints); + //"Number of X and Y points are not equal. Number of X-points:".count($this->coords[1])."Number of Y-points:$numpoints"); + } else { + $exist_x = true; + } + } else { + $exist_x = false; + } + + $numbars = count($this->coords[0]); + + // Use GetMinVal() instead of scale[0] directly since in the case + // of log scale we get a correct value. Log scales will have negative + // values for values < 1 while still not representing negative numbers. + if ($yscale->GetMinVal() >= 0) { + $zp = $yscale->scale_abs[0]; + } else { + $zp = $yscale->Translate(0); + } + + if ($this->abswidth > -1) { + $abswidth = $this->abswidth; + } else { + $abswidth = round($this->width * $xscale->scale_factor, 0); + } + + // Count pontetial pattern array to avoid doing the count for each iteration + if (is_array($this->iPattern)) { + $np = count($this->iPattern); + } + + $grad = null; + for ($i = 0; $i < $numbars; ++$i) { + + // If value is NULL, or 0 then don't draw a bar at all + if ($this->coords[0][$i] === null || $this->coords[0][$i] === '') { + continue; + } + + if ($exist_x) { + $x = $this->coords[1][$i]; + } else { + $x = $i; + } + + $x = $xscale->Translate($x); + + // Comment Note: This confuses the positioning when using acc together with + // grouped bars. Workaround for fixing #191 + /* + if( !$xscale->textscale ) { + if($this->align=="center") + $x -= $abswidth/2; + elseif($this->align=="right") + $x -= $abswidth; + } + */ + // Stroke fill color and fill gradient + $pts = array( + $x, $zp, + $x, $yscale->Translate($this->coords[0][$i]), + $x + $abswidth, $yscale->Translate($this->coords[0][$i]), + $x + $abswidth, $zp); + if ($this->grad) { + if ($grad === null) { + $grad = new Gradient($img); + } + if (is_array($this->grad_fromcolor)) { + // The first argument (grad_fromcolor) can be either an array or a single color. If it is an array + // then we have two choices. It can either a) be a single color specified as an RGB triple or it can be + // an array to specify both (from, to style) for each individual bar. The way to know the difference is + // to investgate the first element. If this element is an integer [0,255] then we assume it is an RGB + // triple. + $ng = count($this->grad_fromcolor); + if ($ng === 3) { + if (is_numeric($this->grad_fromcolor[0]) && $this->grad_fromcolor[0] > 0 && $this->grad_fromcolor[0] < 256) { + // RGB Triple + $fromcolor = $this->grad_fromcolor; + $tocolor = $this->grad_tocolor; + $style = $this->grad_style; + } else { + $fromcolor = $this->grad_fromcolor[$i % $ng][0]; + $tocolor = $this->grad_fromcolor[$i % $ng][1]; + $style = $this->grad_fromcolor[$i % $ng][2]; + } + } else { + $fromcolor = $this->grad_fromcolor[$i % $ng][0]; + $tocolor = $this->grad_fromcolor[$i % $ng][1]; + $style = $this->grad_fromcolor[$i % $ng][2]; + } + $grad->FilledRectangle($pts[2], $pts[3], + $pts[6], $pts[7], + $fromcolor, $tocolor, $style); + } else { + $grad->FilledRectangle($pts[2], $pts[3], + $pts[6], $pts[7], + $this->grad_fromcolor, $this->grad_tocolor, $this->grad_style); + } + } elseif (!empty($this->fill_color)) { + if (is_array($this->fill_color)) { + $img->PushColor($this->fill_color[$i % count($this->fill_color)]); + } else { + $img->PushColor($this->fill_color); + } + $img->FilledPolygon($pts); + $img->PopColor(); + } + + /////////////////////////kokorahen rectangle polygon////////////////////// + + // Remember value of this bar + $val = $this->coords[0][$i]; + + if (!empty($val) && !is_numeric($val)) { + Util\JpGraphError::RaiseL(2004, $i, $val); + //'All values for a barplot must be numeric. You have specified value['.$i.'] == \''.$val.'\''); + } + + // Determine the shadow + if ($this->bar_shadow && $val != 0) { + + $ssh = $this->bar_shadow_hsize; + $ssv = $this->bar_shadow_vsize; + // Create points to create a "upper-right" shadow + if ($val > 0) { + $sp[0] = $pts[6]; + $sp[1] = $pts[7]; + $sp[2] = $pts[4]; + $sp[3] = $pts[5]; + $sp[4] = $pts[2]; + $sp[5] = $pts[3]; + $sp[6] = $pts[2] + $ssh; + $sp[7] = $pts[3] - $ssv; + $sp[8] = $pts[4] + $ssh; + $sp[9] = $pts[5] - $ssv; + $sp[10] = $pts[6] + $ssh; + $sp[11] = $pts[7] - $ssv; + } elseif ($val < 0) { + $sp[0] = $pts[4]; + $sp[1] = $pts[5]; + $sp[2] = $pts[6]; + $sp[3] = $pts[7]; + $sp[4] = $pts[0]; + $sp[5] = $pts[1]; + $sp[6] = $pts[0] + $ssh; + $sp[7] = $pts[1] - $ssv; + $sp[8] = $pts[6] + $ssh; + $sp[9] = $pts[7] - $ssv; + $sp[10] = $pts[4] + $ssh; + $sp[11] = $pts[5] - $ssv; + } + if (is_array($this->bar_shadow_color)) { + $numcolors = count($this->bar_shadow_color); + if ($numcolors == 0) { + Util\JpGraphError::RaiseL(2005); //('You have specified an empty array for shadow colors in the bar plot.'); + } + $img->PushColor($this->bar_shadow_color[$i % $numcolors]); + } else { + $img->PushColor($this->bar_shadow_color); + } + $img->FilledPolygon($sp); + $img->PopColor(); + + } elseif ($this->bar_3d && $val != 0) { + // Determine the 3D + + $ssh = $this->bar_3d_hsize; + $ssv = $this->bar_3d_vsize; + + // Create points to create a "upper-right" shadow + if ($val > 0) { + $sp1[0] = $pts[6]; + $sp1[1] = $pts[7]; + $sp1[2] = $pts[4]; + $sp1[3] = $pts[5]; + $sp1[4] = $pts[4] + $ssh; + $sp1[5] = $pts[5] - $ssv; + $sp1[6] = $pts[6] + $ssh; + $sp1[7] = $pts[7] - $ssv; + + $sp2[0] = $pts[4]; + $sp2[1] = $pts[5]; + $sp2[2] = $pts[2]; + $sp2[3] = $pts[3]; + $sp2[4] = $pts[2] + $ssh; + $sp2[5] = $pts[3] - $ssv; + $sp2[6] = $pts[4] + $ssh; + $sp2[7] = $pts[5] - $ssv; + + } elseif ($val < 0) { + $sp1[0] = $pts[4]; + $sp1[1] = $pts[5]; + $sp1[2] = $pts[6]; + $sp1[3] = $pts[7]; + $sp1[4] = $pts[6] + $ssh; + $sp1[5] = $pts[7] - $ssv; + $sp1[6] = $pts[4] + $ssh; + $sp1[7] = $pts[5] - $ssv; + + $sp2[0] = $pts[6]; + $sp2[1] = $pts[7]; + $sp2[2] = $pts[0]; + $sp2[3] = $pts[1]; + $sp2[4] = $pts[0] + $ssh; + $sp2[5] = $pts[1] - $ssv; + $sp2[6] = $pts[6] + $ssh; + $sp2[7] = $pts[7] - $ssv; + } + + $base_color = $this->fill_color; + + $img->PushColor($base_color . ':0.7'); + $img->FilledPolygon($sp1); + $img->PopColor(); + + $img->PushColor($base_color . ':1.1'); + $img->FilledPolygon($sp2); + $img->PopColor(); + } + + // Stroke the pattern + if (is_array($this->iPattern)) { + $f = new RectPatternFactory(); + if (is_array($this->iPatternColor)) { + $pcolor = $this->iPatternColor[$i % $np]; + } else { + $pcolor = $this->iPatternColor; + } + $prect = $f->Create($this->iPattern[$i % $np], $pcolor, 1); + $prect->SetDensity($this->iPatternDensity[$i % $np]); + + if ($val < 0) { + $rx = $pts[0]; + $ry = $pts[1]; + } else { + $rx = $pts[2]; + $ry = $pts[3]; + } + $width = abs($pts[4] - $pts[0]) + 1; + $height = abs($pts[1] - $pts[3]) + 1; + $prect->SetPos(new Rectangle($rx, $ry, $width, $height)); + $prect->Stroke($img); + } else { + if ($this->iPattern > -1) { + $f = new RectPatternFactory(); + $prect = $f->Create($this->iPattern, $this->iPatternColor, 1); + $prect->SetDensity($this->iPatternDensity); + if ($val < 0) { + $rx = $pts[0]; + $ry = $pts[1]; + } else { + $rx = $pts[2]; + $ry = $pts[3]; + } + $width = abs($pts[4] - $pts[0]) + 1; + $height = abs($pts[1] - $pts[3]) + 1; + $prect->SetPos(new Rectangle($rx, $ry, $width, $height)); + $prect->Stroke($img); + } + } + + // Stroke the outline of the bar + if (is_array($this->color)) { + $img->SetColor($this->color[$i % count($this->color)]); + } else { + $img->SetColor($this->color); + } + + $pts[] = $pts[0]; + $pts[] = $pts[1]; + + if ($this->weight > 0) { + $img->SetLineWeight($this->weight); + $img->Polygon($pts); + } + + // Determine how to best position the values of the individual bars + $x = $pts[2] + ($pts[4] - $pts[2]) / 2; + $this->value->SetMargin(5); + + if ($this->valuepos == 'top') { + $y = $pts[3]; + if ($img->a === 90) { + if ($val < 0) { + $this->value->SetAlign('right', 'center'); + } else { + $this->value->SetAlign('left', 'center'); + } + + } else { + if ($val < 0) { + $this->value->SetMargin(-5); + $y = $pts[1]; + $this->value->SetAlign('center', 'bottom'); + } else { + $this->value->SetAlign('center', 'bottom'); + } + + } + $this->value->Stroke($img, $val, $x, $y); + } elseif ($this->valuepos == 'max') { + $y = $pts[3]; + if ($img->a === 90) { + if ($val < 0) { + $this->value->SetAlign('left', 'center'); + } else { + $this->value->SetAlign('right', 'center'); + } + + } else { + if ($val < 0) { + $this->value->SetAlign('center', 'bottom'); + } else { + $this->value->SetAlign('center', 'top'); + } + } + $this->value->SetMargin(-5); + $this->value->Stroke($img, $val, $x, $y); + } elseif ($this->valuepos == 'center') { + $y = ($pts[3] + $pts[1]) / 2; + $this->value->SetAlign('center', 'center'); + $this->value->SetMargin(0); + $this->value->Stroke($img, $val, $x, $y); + } elseif ($this->valuepos == 'bottom' || $this->valuepos == 'min') { + $y = $pts[1]; + if ($img->a === 90) { + if ($val < 0) { + $this->value->SetAlign('right', 'center'); + } else { + $this->value->SetAlign('left', 'center'); + } + + } + $this->value->SetMargin(3); + $this->value->Stroke($img, $val, $x, $y); + } else { + Util\JpGraphError::RaiseL(2006, $this->valuepos); + //'Unknown position for values on bars :'.$this->valuepos); + } + // Create the client side image map + $rpts = $img->ArrRotate($pts); + $csimcoord = round($rpts[0]) . ", " . round($rpts[1]); + for ($j = 1; $j < 4; ++$j) { + $csimcoord .= ", " . round($rpts[2 * $j]) . ", " . round($rpts[2 * $j + 1]); + } + if (!empty($this->csimtargets[$i])) { + $this->csimareas .= 'csimareas .= " href=\"" . htmlentities($this->csimtargets[$i]) . "\""; + + if (!empty($this->csimwintargets[$i])) { + $this->csimareas .= " target=\"" . $this->csimwintargets[$i] . "\" "; + } + + $sval = ''; + if (!empty($this->csimalts[$i])) { + $sval = sprintf($this->csimalts[$i], $this->coords[0][$i]); + $this->csimareas .= " title=\"$sval\" alt=\"$sval\" "; + } + $this->csimareas .= " />\n"; + } + } + return true; + } +} // Class + +/* EOF */ diff --git a/vendor/amenadiel/jpgraph/src/plot/BoxPlot.php b/vendor/amenadiel/jpgraph/src/plot/BoxPlot.php new file mode 100644 index 0000000000..252a666d9a --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/plot/BoxPlot.php @@ -0,0 +1,34 @@ +iTupleSize = 5; + parent::__construct($datay, $datax); + } + + public function SetMedianColor($aPos, $aNeg) + { + $this->iPColor = $aPos; + $this->iNColor = $aNeg; + } + + public function ModBox($img, $xscale, $yscale, $i, $xl, $xr, $neg) + { + if ($neg) { + $img->SetColor($this->iNColor); + } else { + $img->SetColor($this->iPColor); + } + + $y = $yscale->Translate($this->coords[0][$i * 5 + 4]); + $img->Line($xl, $y, $xr, $y); + } +} diff --git a/vendor/amenadiel/jpgraph/src/plot/Contour.php b/vendor/amenadiel/jpgraph/src/plot/Contour.php new file mode 100644 index 0000000000..3cdc76b47f --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/plot/Contour.php @@ -0,0 +1,420 @@ +nbrRows = count($aMatrix); + $this->nbrCols = count($aMatrix[0]); + $this->dataPoints = $aMatrix; + + if (is_array($aIsobars)) { + // use the isobar values supplied + $this->nbrIsobars = count($aIsobars); + $this->isobarValues = $aIsobars; + } else { + // Determine the isobar values automatically + $this->nbrIsobars = $aIsobars; + list($min, $max) = $this->getMinMaxVal(); + $stepSize = ($max - $min) / $aIsobars; + $isobar = $min + $stepSize / 2; + for ($i = 0; $i < $aIsobars; $i++) { + $this->isobarValues[$i] = $isobar; + $isobar += $stepSize; + } + } + + if ($aColors !== null && count($aColors) > 0) { + + if (!is_array($aColors)) { + Util\JpGraphError::RaiseL(28001); + //'Third argument to Contour must be an array of colors.' + } + + if (count($aColors) != count($this->isobarValues)) { + Util\JpGraphError::RaiseL(28002); + //'Number of colors must equal the number of isobar lines specified'; + } + + $this->isobarColors = $aColors; + } + } + + /** + * Flip the plot around the Y-coordinate. This has the same affect as flipping the input + * data matrice + * + * @param $aFlg If true the the vertice in input data matrice position (0,0) corresponds to the top left + * corner of teh plot otherwise it will correspond to the bottom left corner (a horizontal flip) + */ + public function SetInvert($aFlg = true) + { + $this->invert = $aFlg; + } + + /** + * Find the min and max values in the data matrice + * + * @return array(min_value,max_value) + */ + public function getMinMaxVal() + { + $min = $this->dataPoints[0][0]; + $max = $this->dataPoints[0][0]; + for ($i = 0; $i < $this->nbrRows; $i++) { + if (($mi = min($this->dataPoints[$i])) < $min) { + $min = $mi; + } + + if (($ma = max($this->dataPoints[$i])) > $max) { + $max = $ma; + } + + } + return array($min, $max); + } + + /** + * Reset the two matrices that keeps track on where the isobars crosses the + * horizontal and vertical edges + */ + public function resetEdgeMatrices() + { + for ($k = 0; $k < 2; $k++) { + for ($i = 0; $i <= $this->nbrRows; $i++) { + for ($j = 0; $j <= $this->nbrCols; $j++) { + $this->edges[$k][$i][$j] = false; + } + } + } + } + + /** + * Determine if the specified isobar crosses the horizontal edge specified by its row and column + * + * @param $aRow Row index of edge to be checked + * @param $aCol Col index of edge to be checked + * @param $aIsobar Isobar value + * @return true if the isobar is crossing this edge + */ + public function isobarHCrossing($aRow, $aCol, $aIsobar) + { + + if ($aCol >= $this->nbrCols - 1) { + Util\JpGraphError::RaiseL(28003, $aCol); + //'ContourPlot Internal Error: isobarHCrossing: Coloumn index too large (%d)' + } + if ($aRow >= $this->nbrRows) { + Util\JpGraphError::RaiseL(28004, $aRow); + //'ContourPlot Internal Error: isobarHCrossing: Row index too large (%d)' + } + + $v1 = $this->dataPoints[$aRow][$aCol]; + $v2 = $this->dataPoints[$aRow][$aCol + 1]; + + return ($aIsobar - $v1) * ($aIsobar - $v2) < 0; + + } + + /** + * Determine if the specified isobar crosses the vertical edge specified by its row and column + * + * @param $aRow Row index of edge to be checked + * @param $aCol Col index of edge to be checked + * @param $aIsobar Isobar value + * @return true if the isobar is crossing this edge + */ + public function isobarVCrossing($aRow, $aCol, $aIsobar) + { + + if ($aRow >= $this->nbrRows - 1) { + Util\JpGraphError::RaiseL(28005, $aRow); + //'isobarVCrossing: Row index too large + } + if ($aCol >= $this->nbrCols) { + Util\JpGraphError::RaiseL(28006, $aCol); + //'isobarVCrossing: Col index too large + } + + $v1 = $this->dataPoints[$aRow][$aCol]; + $v2 = $this->dataPoints[$aRow + 1][$aCol]; + + return ($aIsobar - $v1) * ($aIsobar - $v2) < 0; + + } + + /** + * Determine all edges, horizontal and vertical that the specified isobar crosses. The crossings + * are recorded in the two edge matrices. + * + * @param $aIsobar The value of the isobar to be checked + */ + public function determineIsobarEdgeCrossings($aIsobar) + { + + $ib = $this->isobarValues[$aIsobar]; + + for ($i = 0; $i < $this->nbrRows - 1; $i++) { + for ($j = 0; $j < $this->nbrCols - 1; $j++) { + $this->edges[HORIZ_EDGE][$i][$j] = $this->isobarHCrossing($i, $j, $ib); + $this->edges[VERT_EDGE][$i][$j] = $this->isobarVCrossing($i, $j, $ib); + } + } + + // We now have the bottom and rightmost edges unsearched + for ($i = 0; $i < $this->nbrRows - 1; $i++) { + $this->edges[VERT_EDGE][$i][$j] = $this->isobarVCrossing($i, $this->nbrCols - 1, $ib); + } + for ($j = 0; $j < $this->nbrCols - 1; $j++) { + $this->edges[HORIZ_EDGE][$i][$j] = $this->isobarHCrossing($this->nbrRows - 1, $j, $ib); + } + + } + + /** + * Return the normalized coordinates for the crossing of the specified edge with the specified + * isobar- The crossing is simpy detrmined with a linear interpolation between the two vertices + * on each side of the edge and the value of the isobar + * + * @param $aRow Row of edge + * @param $aCol Column of edge + * @param $aEdgeDir Determine if this is a horizontal or vertical edge + * @param $ib The isobar value + * @return unknown_type + */ + public function getCrossingCoord($aRow, $aCol, $aEdgeDir, $aIsobarVal) + { + + // In order to avoid numerical problem when two vertices are very close + // we have to check and avoid dividing by close to zero denumerator. + if ($aEdgeDir == HORIZ_EDGE) { + $d = abs($this->dataPoints[$aRow][$aCol] - $this->dataPoints[$aRow][$aCol + 1]); + if ($d > 0.001) { + $xcoord = $aCol + abs($aIsobarVal - $this->dataPoints[$aRow][$aCol]) / $d; + } else { + $xcoord = $aCol; + } + $ycoord = $aRow; + } else { + $d = abs($this->dataPoints[$aRow][$aCol] - $this->dataPoints[$aRow + 1][$aCol]); + if ($d > 0.001) { + $ycoord = $aRow + abs($aIsobarVal - $this->dataPoints[$aRow][$aCol]) / $d; + } else { + $ycoord = $aRow; + } + $xcoord = $aCol; + } + if ($this->invert) { + $ycoord = $this->nbrRows - 1 - $ycoord; + } + return array($xcoord, $ycoord); + + } + + /** + * In order to avoid all kinds of unpleasent extra checks and complex boundary + * controls for the degenerated case where the contour levels exactly crosses + * one of the vertices we add a very small delta (0.1%) to the data point value. + * This has no visible affect but it makes the code sooooo much cleaner. + * + */ + public function adjustDataPointValues() + { + + $ni = count($this->isobarValues); + for ($k = 0; $k < $ni; $k++) { + $ib = $this->isobarValues[$k]; + for ($row = 0; $row < $this->nbrRows - 1; ++$row) { + for ($col = 0; $col < $this->nbrCols - 1; ++$col) { + if (abs($this->dataPoints[$row][$col] - $ib) < 0.0001) { + $this->dataPoints[$row][$col] += $this->dataPoints[$row][$col] * 0.001; + } + } + } + } + + } + + /** + * @param $aFlg + * @param $aBW + * @return unknown_type + */ + public function UseHighContrastColor($aFlg = true, $aBW = false) + { + $this->highcontrast = $aFlg; + $this->highcontrastbw = $aBW; + } + + /** + * Calculate suitable colors for each defined isobar + * + */ + public function CalculateColors() + { + if ($this->highcontrast) { + if ($this->highcontrastbw) { + for ($ib = 0; $ib < $this->nbrIsobars; $ib++) { + $this->isobarColors[$ib] = 'black'; + } + } else { + // Use only blue/red scale + $step = round(255 / ($this->nbrIsobars - 1)); + for ($ib = 0; $ib < $this->nbrIsobars; $ib++) { + $this->isobarColors[$ib] = array($ib * $step, 50, 255 - $ib * $step); + } + } + } else { + $n = $this->nbrIsobars; + $v = 0; + $step = 1 / ($this->nbrIsobars - 1); + for ($ib = 0; $ib < $this->nbrIsobars; $ib++) { + $this->isobarColors[$ib] = Image\RGB::GetSpectrum($v); + $v += $step; + } + } + } + + /** + * This is where the main work is done. For each isobar the crossing of the edges are determined + * and then each cell is analyzed to find the 0, 2 or 4 crossings. Then the normalized coordinate + * for the crossings are determined and pushed on to the isobar stack. When the method is finished + * the $isobarCoord will hold one arrayfor each isobar where all the line segments that makes + * up the contour plot are stored. + * + * @return array( $isobarCoord, $isobarValues, $isobarColors ) + */ + public function getIsobars() + { + + $this->adjustDataPointValues(); + + for ($isobar = 0; $isobar < $this->nbrIsobars; $isobar++) { + + $ib = $this->isobarValues[$isobar]; + $this->resetEdgeMatrices(); + $this->determineIsobarEdgeCrossings($isobar); + $this->isobarCoord[$isobar] = array(); + + $ncoord = 0; + + for ($row = 0; $row < $this->nbrRows - 1; ++$row) { + for ($col = 0; $col < $this->nbrCols - 1; ++$col) { + + // Find out how many crossings around the edges + $n = 0; + if ($this->edges[HORIZ_EDGE][$row][$col]) { + $neigh[$n++] = array($row, $col, HORIZ_EDGE); + } + + if ($this->edges[HORIZ_EDGE][$row + 1][$col]) { + $neigh[$n++] = array($row + 1, $col, HORIZ_EDGE); + } + + if ($this->edges[VERT_EDGE][$row][$col]) { + $neigh[$n++] = array($row, $col, VERT_EDGE); + } + + if ($this->edges[VERT_EDGE][$row][$col + 1]) { + $neigh[$n++] = array($row, $col + 1, VERT_EDGE); + } + + if ($n == 2) { + $n1 = 0; + $n2 = 1; + $this->isobarCoord[$isobar][$ncoord++] = array( + $this->getCrossingCoord($neigh[$n1][0], $neigh[$n1][1], $neigh[$n1][2], $ib), + $this->getCrossingCoord($neigh[$n2][0], $neigh[$n2][1], $neigh[$n2][2], $ib)); + } elseif ($n == 4) { + // We must determine how to connect the edges either northwest->southeast or + // northeast->southwest. We do that by calculating the imaginary middle value of + // the cell by averaging the for corners. This will compared with the value of the + // top left corner will help determine the orientation of the ridge/creek + $midval = ($this->dataPoints[$row][$col] + $this->dataPoints[$row][$col + 1] + $this->dataPoints[$row + 1][$col] + $this->dataPoints[$row + 1][$col + 1]) / 4; + $v = $this->dataPoints[$row][$col]; + if ($midval == $ib) { + // Orientation "+" + $n1 = 0; + $n2 = 1; + $n3 = 2; + $n4 = 3; + } elseif (($midval > $ib && $v > $ib) || ($midval < $ib && $v < $ib)) { + // Orientation of ridge/valley = "\" + $n1 = 0; + $n2 = 3; + $n3 = 2; + $n4 = 1; + } elseif (($midval > $ib && $v < $ib) || ($midval < $ib && $v > $ib)) { + // Orientation of ridge/valley = "/" + $n1 = 0; + $n2 = 2; + $n3 = 3; + $n4 = 1; + } + + $this->isobarCoord[$isobar][$ncoord++] = array( + $this->getCrossingCoord($neigh[$n1][0], $neigh[$n1][1], $neigh[$n1][2], $ib), + $this->getCrossingCoord($neigh[$n2][0], $neigh[$n2][1], $neigh[$n2][2], $ib)); + + $this->isobarCoord[$isobar][$ncoord++] = array( + $this->getCrossingCoord($neigh[$n3][0], $neigh[$n3][1], $neigh[$n3][2], $ib), + $this->getCrossingCoord($neigh[$n4][0], $neigh[$n4][1], $neigh[$n4][2], $ib)); + + } + } + } + } + + if (count($this->isobarColors) == 0) { + // No manually specified colors. Calculate them automatically. + $this->CalculateColors(); + } + return array($this->isobarCoord, $this->isobarValues, $this->isobarColors); + } +} + +// EOF diff --git a/vendor/amenadiel/jpgraph/src/plot/ContourPlot.php b/vendor/amenadiel/jpgraph/src/plot/ContourPlot.php new file mode 100644 index 0000000000..5f782f2f70 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/plot/ContourPlot.php @@ -0,0 +1,216 @@ +dataMatrix = $aDataMatrix; + $this->flipData = $aInvert; + $this->isobar = $aIsobar; + $this->interpFactor = $aFactor; + + if ($this->interpFactor > 1) { + + if ($this->interpFactor > 5) { + Util\JpGraphError::RaiseL(28007); // ContourPlot interpolation factor is too large (>5) + } + + $ip = new MeshInterpolate(); + $this->dataMatrix = $ip->Linear($this->dataMatrix, $this->interpFactor); + } + + $this->contour = new Contour($this->dataMatrix, $this->isobar, $aIsobarColors); + + if (is_array($aIsobar)) { + $this->nbrContours = count($aIsobar); + } else { + $this->nbrContours = $aIsobar; + } + + } + + /** + * Flipe the data around the center + * + * @param $aFlg + * + */ + public function SetInvert($aFlg = true) + { + $this->flipData = $aFlg; + } + + /** + * Set the colors for the isobar lines + * + * @param $aColorArray + * + */ + public function SetIsobarColors($aColorArray) + { + $this->manualIsobarColors = $aColorArray; + } + + /** + * Show the legend + * + * @param $aFlg true if the legend should be shown + * + */ + public function ShowLegend($aFlg = true) + { + $this->showLegend = $aFlg; + } + + /** + * @param $aFlg true if the legend should start with the lowest isobar on top + * @return unknown_type + */ + public function Invertlegend($aFlg = true) + { + $this->invertLegend = $aFlg; + } + + /* Internal method. Give the min value to be used for the scaling + * + */ + public function Min() + { + return array(0, 0); + } + + /* Internal method. Give the max value to be used for the scaling + * + */ + public function Max() + { + return array(count($this->dataMatrix[0]) - 1, count($this->dataMatrix) - 1); + } + + /** + * Internal ramewrok method to setup the legend to be used for this plot. + * @param $aGraph The parent graph class + */ + public function Legend($aGraph) + { + + if (!$this->showLegend) { + return; + } + + if ($this->invertLegend) { + for ($i = 0; $i < $this->nbrContours; $i++) { + $aGraph->legend->Add(sprintf('%.1f', $this->contourVal[$i]), $this->contourColor[$i]); + } + } else { + for ($i = $this->nbrContours - 1; $i >= 0; $i--) { + $aGraph->legend->Add(sprintf('%.1f', $this->contourVal[$i]), $this->contourColor[$i]); + } + } + } + + /** + * Framework function which gets called before the Stroke() method is called + * + * @see Plot#PreScaleSetup($aGraph) + * + */ + public function PreScaleSetup($aGraph) + { + $xn = count($this->dataMatrix[0]) - 1; + $yn = count($this->dataMatrix) - 1; + + $aGraph->xaxis->scale->Update($aGraph->img, 0, $xn); + $aGraph->yaxis->scale->Update($aGraph->img, 0, $yn); + + $this->contour->SetInvert($this->flipData); + list($this->contourCoord, $this->contourVal, $this->contourColor) = $this->contour->getIsobars(); + } + + /** + * Use high contrast color schema + * + * @param $aFlg True, to use high contrast color + * @param $aBW True, Use only black and white color schema + */ + public function UseHighContrastColor($aFlg = true, $aBW = false) + { + $this->highcontrast = $aFlg; + $this->highcontrastbw = $aBW; + $this->contour->UseHighContrastColor($this->highcontrast, $this->highcontrastbw); + } + + /** + * Internal method. Stroke the contour plot to the graph + * + * @param $img Image handler + * @param $xscale Instance of the xscale to use + * @param $yscale Instance of the yscale to use + */ + public function Stroke($img, $xscale, $yscale) + { + + if (count($this->manualIsobarColors) > 0) { + $this->contourColor = $this->manualIsobarColors; + if (count($this->manualIsobarColors) != $this->nbrContours) { + Util\JpGraphError::RaiseL(28002); + } + } + + $img->SetLineWeight($this->line_weight); + + for ($c = 0; $c < $this->nbrContours; $c++) { + + $img->SetColor($this->contourColor[$c]); + + $n = count($this->contourCoord[$c]); + $i = 0; + while ($i < $n) { + list($x1, $y1) = $this->contourCoord[$c][$i][0]; + $x1t = $xscale->Translate($x1); + $y1t = $yscale->Translate($y1); + + list($x2, $y2) = $this->contourCoord[$c][$i++][1]; + $x2t = $xscale->Translate($x2); + $y2t = $yscale->Translate($y2); + + $img->Line($x1t, $y1t, $x2t, $y2t); + } + + } + } + +} diff --git a/vendor/amenadiel/jpgraph/src/plot/DisplayValue.php b/vendor/amenadiel/jpgraph/src/plot/DisplayValue.php new file mode 100644 index 0000000000..ba13bca37f --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/plot/DisplayValue.php @@ -0,0 +1,144 @@ +txt = new Text\Text(); + } + + public function Show($aFlag = true) + { + $this->show = $aFlag; + } + + public function SetColor($aColor, $aNegcolor = '') + { + $this->color = $aColor; + $this->negcolor = $aNegcolor; + } + + public function SetFont($aFontFamily, $aFontStyle = FS_NORMAL, $aFontSize = 8) + { + $this->ff = $aFontFamily; + $this->fs = $aFontStyle; + $this->fsize = $aFontSize; + } + + public function ApplyFont($aImg) + { + $aImg->SetFont($this->ff, $this->fs, $this->fsize); + } + + public function SetMargin($aMargin) + { + $this->margin = $aMargin; + } + + public function SetAngle($aAngle) + { + $this->angle = $aAngle; + } + + public function SetAlign($aHAlign, $aVAlign = '') + { + $this->halign = $aHAlign; + $this->valign = $aVAlign; + } + + public function SetFormat($aFormat, $aNegFormat = '') + { + $this->format = $aFormat; + $this->negformat = $aNegFormat; + } + + public function SetFormatCallback($aFunc) + { + $this->iFormCallback = $aFunc; + } + + public function HideZero($aFlag = true) + { + $this->iHideZero = $aFlag; + } + + public function Stroke($img, $aVal, $x, $y) + { + + if ($this->show) { + if ($this->negformat == '') { + $this->negformat = $this->format; + } + if ($this->negcolor == '') { + $this->negcolor = $this->color; + } + + if ($aVal === null || (is_string($aVal) && ($aVal == '' || $aVal == '-' || $aVal == 'x'))) { + return; + } + + if (is_numeric($aVal) && $aVal == 0 && $this->iHideZero) { + return; + } + + // Since the value is used in different cirumstances we need to check what + // kind of formatting we shall use. For example, to display values in a line + // graph we simply display the formatted value, but in the case where the user + // has already specified a text string we don't fo anything. + if ($this->iFormCallback != '') { + $f = $this->iFormCallback; + $sval = call_user_func($f, $aVal); + } elseif (is_numeric($aVal)) { + if ($aVal >= 0) { + $sval = sprintf($this->format, $aVal); + } else { + $sval = sprintf($this->negformat, $aVal); + } + } else { + $sval = $aVal; + } + + $y = $y - sign($aVal) * $this->margin; + + $this->txt->Set($sval); + $this->txt->SetPos($x, $y); + $this->txt->SetFont($this->ff, $this->fs, $this->fsize); + if ($this->valign == '') { + if ($aVal >= 0) { + $valign = "bottom"; + } else { + $valign = "top"; + } + } else { + $valign = $this->valign; + } + $this->txt->Align($this->halign, $valign); + + $this->txt->SetOrientation($this->angle); + if ($aVal > 0) { + $this->txt->SetColor($this->color); + } else { + $this->txt->SetColor($this->negcolor); + } + $this->txt->Stroke($img); + } + } +} diff --git a/vendor/amenadiel/jpgraph/src/plot/ErrorLinePlot.php b/vendor/amenadiel/jpgraph/src/plot/ErrorLinePlot.php new file mode 100644 index 0000000000..9061a5f31f --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/plot/ErrorLinePlot.php @@ -0,0 +1,42 @@ +line = new LinePlot($ly, $datax); + } + + //--------------- + // PUBLIC METHODS + public function Legend($graph) + { + if ($this->legend != "") { + $graph->legend->Add($this->legend, $this->color); + } + + $this->line->Legend($graph); + } + + public function Stroke($img, $xscale, $yscale) + { + parent::Stroke($img, $xscale, $yscale); + $this->line->Stroke($img, $xscale, $yscale); + } +} // Class diff --git a/vendor/amenadiel/jpgraph/src/plot/ErrorPlot.php b/vendor/amenadiel/jpgraph/src/plot/ErrorPlot.php new file mode 100644 index 0000000000..6ba9e07ca4 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/plot/ErrorPlot.php @@ -0,0 +1,92 @@ +numpoints /= 2; + } + + //--------------- + // PUBLIC METHODS + + // Gets called before any axis are stroked + public function PreStrokeAdjust($graph) + { + if ($this->center) { + $a = 0.5; + $b = 0.5; + ++$this->numpoints; + } else { + $a = 0; + $b = 0; + } + $graph->xaxis->scale->ticks->SetXLabelOffset($a); + $graph->SetTextScaleOff($b); + //$graph->xaxis->scale->ticks->SupressMinorTickMarks(); + } + + // Method description + public function Stroke($img, $xscale, $yscale) + { + $numpoints = count($this->coords[0]) / 2; + $img->SetColor($this->color); + $img->SetLineWeight($this->weight); + + if (isset($this->coords[1])) { + if (count($this->coords[1]) != $numpoints) { + Util\JpGraphError::RaiseL(2003, count($this->coords[1]), $numpoints); + } + + //("Number of X and Y points are not equal. Number of X-points:".count($this->coords[1])." Number of Y-points:$numpoints"); + else { + $exist_x = true; + } + + } else { + $exist_x = false; + } + + for ($i = 0; $i < $numpoints; ++$i) { + if ($exist_x) { + $x = $this->coords[1][$i]; + } else { + $x = $i; + } + + if (!is_numeric($x) || + !is_numeric($this->coords[0][$i * 2]) || !is_numeric($this->coords[0][$i * 2 + 1])) { + continue; + } + + $xt = $xscale->Translate($x); + $yt1 = $yscale->Translate($this->coords[0][$i * 2]); + $yt2 = $yscale->Translate($this->coords[0][$i * 2 + 1]); + $img->Line($xt, $yt1, $xt, $yt2); + $img->Line($xt - $this->errwidth, $yt1, $xt + $this->errwidth, $yt1); + $img->Line($xt - $this->errwidth, $yt2, $xt + $this->errwidth, $yt2); + } + return true; + } +} // Class diff --git a/vendor/amenadiel/jpgraph/src/plot/FieldPlot.php b/vendor/amenadiel/jpgraph/src/plot/FieldPlot.php new file mode 100644 index 0000000000..20aa01e1fe --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/plot/FieldPlot.php @@ -0,0 +1,89 @@ +iAngles = $angles; + + parent::__construct($datay, $datax); + $this->value->SetAlign('center', 'center'); + $this->value->SetMargin(15); + + $this->arrow = new FieldArrow(); + } + + public function SetCallback($aFunc) + { + $this->iCallback = $aFunc; + } + + public function Stroke($img, $xscale, $yscale) + { + + // Remeber base color and size + $bc = $this->arrow->iColor; + $bs = $this->arrow->iSize; + $bas = $this->arrow->iArrowSize; + + for ($i = 0; $i < $this->numpoints; ++$i) { + // Skip null values + if ($this->coords[0][$i] === "") { + continue; + } + + $f = $this->iCallback; + if ($f != "") { + list($cc, $cs, $cas) = call_user_func($f, $this->coords[1][$i], $this->coords[0][$i], $this->iAngles[$i]); + // Fall back on global data if the callback isn't set + if ($cc == "") { + $cc = $bc; + } + + if ($cs == "") { + $cs = $bs; + } + + if ($cas == "") { + $cas = $bas; + } + + $this->arrow->SetColor($cc); + $this->arrow->SetSize($cs, $cas); + } + + $xt = $xscale->Translate($this->coords[1][$i]); + $yt = $yscale->Translate($this->coords[0][$i]); + + $this->arrow->Stroke($img, $xt, $yt, $this->iAngles[$i]); + $this->value->Stroke($img, $this->coords[0][$i], $xt, $yt); + } + } + + // Framework function + public function Legend($aGraph) + { + if ($this->legend != "") { + $aGraph->legend->Add($this->legend, $this->mark->fill_color, $this->mark, 0, + $this->legendcsimtarget, $this->legendcsimalt, $this->legendcsimwintarget); + } + } +} diff --git a/vendor/amenadiel/jpgraph/src/plot/GanttBar.php b/vendor/amenadiel/jpgraph/src/plot/GanttBar.php new file mode 100644 index 0000000000..8804102dec --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/plot/GanttBar.php @@ -0,0 +1,288 @@ +iStart = $aStart; + // Is the end date given as a date or as number of days added to start date? + if (is_string($aEnd)) { + // If end date has been specified without a time we will asssume + // end date is at the end of that date + if (strpos($aEnd, ':') === false) { + $this->iEnd = strtotime($aEnd) + SECPERDAY - 1; + } else { + $this->iEnd = $aEnd; + } + } elseif (is_int($aEnd) || is_float($aEnd)) { + $this->iEnd = strtotime($aStart) + round($aEnd * SECPERDAY); + } + $this->iVPos = $aPos; + $this->iHeightFactor = $aHeightFactor; + $this->title->Set($aLabel); + $this->caption = new TextProperty($aCaption); + $this->caption->Align("left", "center"); + $this->leftMark = new PlotMark(); + $this->leftMark->Hide(); + $this->rightMark = new PlotMark(); + $this->rightMark->Hide(); + $this->progress = new Progress(); + } + + //--------------- + // PUBLIC METHODS + public function SetShadow($aShadow = true, $aColor = "gray") + { + $this->iShadow = $aShadow; + $this->iShadowColor = $aColor; + } + + public function SetBreakStyle($aFlg = true, $aLineStyle = 'dotted', $aLineWeight = 1) + { + $this->iBreakStyle = $aFlg; + $this->iBreakLineStyle = $aLineStyle; + $this->iBreakLineWeight = $aLineWeight; + } + + public function GetMaxDate() + { + return $this->iEnd; + } + + public function SetHeight($aHeight) + { + $this->iHeightFactor = $aHeight; + } + + public function SetColor($aColor) + { + $this->iFrameColor = $aColor; + } + + public function SetFillColor($aColor) + { + $this->iFillColor = $aColor; + } + + public function GetAbsHeight($aImg) + { + if (is_int($this->iHeightFactor) || $this->leftMark->show || $this->rightMark->show) { + $m = -1; + if (is_int($this->iHeightFactor)) { + $m = $this->iHeightFactor; + } + + if ($this->leftMark->show) { + $m = max($m, $this->leftMark->width * 2); + } + + if ($this->rightMark->show) { + $m = max($m, $this->rightMark->width * 2); + } + + return $m; + } else { + return -1; + } + + } + + public function SetPattern($aPattern, $aColor = "blue", $aDensity = 95) + { + $this->iPattern = $aPattern; + $this->iPatternColor = $aColor; + $this->iPatternDensity = $aDensity; + } + + public function Stroke($aImg, $aScale) + { + $factory = new RectPatternFactory(); + $prect = $factory->Create($this->iPattern, $this->iPatternColor); + $prect->SetDensity($this->iPatternDensity); + + // If height factor is specified as a float between 0,1 then we take it as meaning + // percetage of the scale width between horizontal line. + // If it is an integer > 1 we take it to mean the absolute height in pixels + if ($this->iHeightFactor > -0.0 && $this->iHeightFactor <= 1.1) { + $vs = $aScale->GetVertSpacing() * $this->iHeightFactor; + } elseif (is_int($this->iHeightFactor) && $this->iHeightFactor > 2 && $this->iHeightFactor < 200) { + $vs = $this->iHeightFactor; + } else { + Util\JpGraphError::RaiseL(6028, $this->iHeightFactor); + // ("Specified height (".$this->iHeightFactor.") for gantt bar is out of range."); + } + + // Clip date to min max dates to show + $st = $aScale->NormalizeDate($this->iStart); + $en = $aScale->NormalizeDate($this->iEnd); + + $limst = max($st, $aScale->iStartDate); + $limen = min($en, $aScale->iEndDate); + + $xt = round($aScale->TranslateDate($limst)); + $xb = round($aScale->TranslateDate($limen)); + $yt = round($aScale->TranslateVertPos($this->iVPos) - $vs - ($aScale->GetVertSpacing() / 2 - $vs / 2)); + $yb = round($aScale->TranslateVertPos($this->iVPos) - ($aScale->GetVertSpacing() / 2 - $vs / 2)); + $middle = round($yt + ($yb - $yt) / 2); + $this->StrokeActInfo($aImg, $aScale, $middle); + + // CSIM for title + if (!empty($this->title->csimtarget)) { + $colwidth = $this->title->GetColWidth($aImg); + $colstarts = array(); + $aScale->actinfo->GetColStart($aImg, $colstarts, true); + $n = min(count($colwidth), count($this->title->csimtarget)); + for ($i = 0; $i < $n; ++$i) { + $title_xt = $colstarts[$i]; + $title_xb = $title_xt + $colwidth[$i]; + $coords = "$title_xt,$yt,$title_xb,$yt,$title_xb,$yb,$title_xt,$yb"; + + if (!empty($this->title->csimtarget[$i])) { + $this->csimarea .= "title->csimtarget[$i] . "\""; + + if (!empty($this->title->csimwintarget[$i])) { + $this->csimarea .= "target=\"" . $this->title->csimwintarget[$i] . "\" "; + } + + if (!empty($this->title->csimalt[$i])) { + $tmp = $this->title->csimalt[$i]; + $this->csimarea .= " title=\"$tmp\" alt=\"$tmp\" "; + } + $this->csimarea .= " />\n"; + } + } + } + + // Check if the bar is totally outside the current scale range + if ($en < $aScale->iStartDate || $st > $aScale->iEndDate) { + return; + } + + // Remember the positions for the bar + $this->SetConstrainPos($xt, $yt, $xb, $yb); + + $prect->ShowFrame(false); + $prect->SetBackground($this->iFillColor); + if ($this->iBreakStyle) { + $aImg->SetColor($this->iFrameColor); + $olds = $aImg->SetLineStyle($this->iBreakLineStyle); + $oldw = $aImg->SetLineWeight($this->iBreakLineWeight); + $aImg->StyleLine($xt, $yt, $xb, $yt); + $aImg->StyleLine($xt, $yb, $xb, $yb); + $aImg->SetLineStyle($olds); + $aImg->SetLineWeight($oldw); + } else { + if ($this->iShadow) { + $aImg->SetColor($this->iFrameColor); + $aImg->ShadowRectangle($xt, $yt, $xb, $yb, $this->iFillColor, $this->iShadowWidth, $this->iShadowColor); + $prect->SetPos(new Rectangle($xt + 1, $yt + 1, $xb - $xt - $this->iShadowWidth - 2, $yb - $yt - $this->iShadowWidth - 2)); + $prect->Stroke($aImg); + } else { + $prect->SetPos(new Rectangle($xt, $yt, $xb - $xt + 1, $yb - $yt + 1)); + $prect->Stroke($aImg); + $aImg->SetColor($this->iFrameColor); + $aImg->Rectangle($xt, $yt, $xb, $yb); + } + } + // CSIM for bar + if (!empty($this->csimtarget)) { + + $coords = "$xt,$yt,$xb,$yt,$xb,$yb,$xt,$yb"; + $this->csimarea .= "csimtarget . "\""; + + if (!empty($this->csimwintarget)) { + $this->csimarea .= " target=\"" . $this->csimwintarget . "\" "; + } + + if ($this->csimalt != '') { + $tmp = $this->csimalt; + $this->csimarea .= " title=\"$tmp\" alt=\"$tmp\" "; + } + $this->csimarea .= " />\n"; + } + + // Draw progress bar inside activity bar + if ($this->progress->iProgress > 0) { + + $xtp = $aScale->TranslateDate($st); + $xbp = $aScale->TranslateDate($en); + $len = ($xbp - $xtp) * $this->progress->iProgress; + + $endpos = $xtp + $len; + if ($endpos > $xt) { + + // Take away the length of the progress that is not visible (before the start date) + $len -= ($xt - $xtp); + + // Is the the progress bar visible after the start date? + if ($xtp < $xt) { + $xtp = $xt; + } + + // Make sure that the progess bar doesn't extend over the end date + if ($xtp + $len - 1 > $xb) { + $len = $xb - $xtp; + } + + $prog = $factory->Create($this->progress->iPattern, $this->progress->iColor); + $prog->SetDensity($this->progress->iDensity); + $prog->SetBackground($this->progress->iFillColor); + $barheight = ($yb - $yt + 1); + if ($this->iShadow) { + $barheight -= $this->iShadowWidth; + } + + $progressheight = floor($barheight * $this->progress->iHeight); + $marg = ceil(($barheight - $progressheight) / 2); + $pos = new Rectangle($xtp, $yt + $marg, $len, $barheight - 2 * $marg); + $prog->SetPos($pos); + $prog->Stroke($aImg); + } + } + + // We don't plot the end mark if the bar has been capped + if ($limst == $st) { + $y = $middle; + // We treat the RIGHT and LEFT triangle mark a little bi + // special so that these marks are placed right under the + // bar. + if ($this->leftMark->GetType() == MARK_LEFTTRIANGLE) { + $y = $yb; + } + $this->leftMark->Stroke($aImg, $xt, $y); + } + if ($limen == $en) { + $y = $middle; + // We treat the RIGHT and LEFT triangle mark a little bi + // special so that these marks are placed right under the + // bar. + if ($this->rightMark->GetType() == MARK_RIGHTTRIANGLE) { + $y = $yb; + } + $this->rightMark->Stroke($aImg, $xb, $y); + + $margin = $this->iCaptionMargin; + if ($this->rightMark->show) { + $margin += $this->rightMark->GetWidth(); + } + + $this->caption->Stroke($aImg, $xb + $margin, $middle); + } + } +} diff --git a/vendor/amenadiel/jpgraph/src/plot/GanttPlotObject.php b/vendor/amenadiel/jpgraph/src/plot/GanttPlotObject.php new file mode 100644 index 0000000000..47aced7af9 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/plot/GanttPlotObject.php @@ -0,0 +1,105 @@ +title = new TextProperty(); + $this->title->Align('left', 'center'); + $this->caption = new TextProperty(); + } + + public function GetCSIMArea() + { + return $this->csimarea; + } + + public function SetCSIMTarget($aTarget, $aAlt = '', $aWinTarget = '') + { + if (!is_string($aTarget)) { + $tv = substr(var_export($aTarget, true), 0, 40); + Util\JpGraphError::RaiseL(6024, $tv); + //('CSIM Target must be specified as a string.'."\nStart of target is:\n$tv"); + } + if (!is_string($aAlt)) { + $tv = substr(var_export($aAlt, true), 0, 40); + Util\JpGraphError::RaiseL(6025, $tv); + //('CSIM Alt text must be specified as a string.'."\nStart of alt text is:\n$tv"); + } + + $this->csimtarget = $aTarget; + $this->csimwintarget = $aWinTarget; + $this->csimalt = $aAlt; + } + + public function SetCSIMAlt($aAlt) + { + if (!is_string($aAlt)) { + $tv = substr(var_export($aAlt, true), 0, 40); + Util\JpGraphError::RaiseL(6025, $tv); + //('CSIM Alt text must be specified as a string.'."\nStart of alt text is:\n$tv"); + } + $this->csimalt = $aAlt; + } + + public function SetConstrain($aRow, $aType, $aColor = 'black', $aArrowSize = ARROW_S2, $aArrowType = ARROWT_SOLID) + { + $this->constraints[] = new GanttConstraint($aRow, $aType, $aColor, $aArrowSize, $aArrowType); + } + + public function SetConstrainPos($xt, $yt, $xb, $yb) + { + $this->iConstrainPos = array($xt, $yt, $xb, $yb); + } + + public function GetMinDate() + { + return $this->iStart; + } + + public function GetMaxDate() + { + return $this->iStart; + } + + public function SetCaptionMargin($aMarg) + { + $this->iCaptionMargin = $aMarg; + } + + public function GetAbsHeight($aImg) + { + return 0; + } + + public function GetLineNbr() + { + return $this->iVPos; + } + + public function SetLabelLeftMargin($aOff) + { + $this->iLabelLeftMargin = $aOff; + } + + public function StrokeActInfo($aImg, $aScale, $aYPos) + { + $cols = array(); + $aScale->actinfo->GetColStart($aImg, $cols, true); + $this->title->Stroke($aImg, $cols, $aYPos); + } +} diff --git a/vendor/amenadiel/jpgraph/src/plot/GanttVLine.php b/vendor/amenadiel/jpgraph/src/plot/GanttVLine.php new file mode 100644 index 0000000000..3a0b0d5260 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/plot/GanttVLine.php @@ -0,0 +1,85 @@ +iLine = new Graph\LineProperty(); + $this->iLine->SetColor($aColor); + $this->iLine->SetWeight($aWeight); + $this->iLine->SetStyle($aStyle); + $this->iStart = $aDate; + $this->title = new TextPropertyBelow(); + $this->title->Set($aTitle); + } + + //--------------- + // PUBLIC METHODS + + // Set start and end rows for the VLine. By default the entire heigh of the + // Gantt chart is used + public function SetRowSpan($aStart, $aEnd = -1) + { + $this->iStartRow = $aStart; + $this->iEndRow = $aEnd; + } + + public function SetDayOffset($aOff = 0.5) + { + if ($aOff < 0.0 || $aOff > 1.0) { + Util\JpGraphError::RaiseL(6029); + //("Offset for vertical line must be in range [0,1]"); + } + $this->iDayOffset = $aOff; + } + + public function SetTitleMargin($aMarg) + { + $this->title_margin = $aMarg; + } + + public function SetWeight($aWeight) + { + $this->iLine->SetWeight($aWeight); + } + + public function Stroke($aImg, $aScale) + { + $d = $aScale->NormalizeDate($this->iStart); + if ($d < $aScale->iStartDate || $d > $aScale->iEndDate) { + return; + } + + if ($this->iDayOffset != 0.0) { + $d += 24 * 60 * 60 * $this->iDayOffset; + } + + $x = $aScale->TranslateDate($d); //d=1006858800, + + if ($this->iStartRow > -1) { + $y1 = $aScale->TranslateVertPos($this->iStartRow, true); + } else { + $y1 = $aScale->iVertHeaderSize + $aImg->top_margin; + } + + if ($this->iEndRow > -1) { + $y2 = $aScale->TranslateVertPos($this->iEndRow); + } else { + $y2 = $aImg->height - $aImg->bottom_margin; + } + + $this->iLine->Stroke($aImg, $x, $y1, $x, $y2); + $this->title->Align("center", "top"); + $this->title->Stroke($aImg, $x, $y2 + $this->title_margin); + } +} diff --git a/vendor/amenadiel/jpgraph/src/plot/Gradient.php b/vendor/amenadiel/jpgraph/src/plot/Gradient.php new file mode 100644 index 0000000000..e4a6452e00 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/plot/Gradient.php @@ -0,0 +1,430 @@ +img = $img; + } + + public function SetNumColors($aNum) + { + $this->numcolors = $aNum; + } + + //--------------- + // PUBLIC METHODS + // Produce a gradient filled rectangle with a smooth transition between + // two colors. + // ($xl,$yt) Top left corner + // ($xr,$yb) Bottom right + // $from_color Starting color in gradient + // $to_color End color in the gradient + // $style Which way is the gradient oriented? + public function FilledRectangle($xl, $yt, $xr, $yb, $from_color, $to_color, $style = 1) + { + $this->img->SetLineWeight(1); + switch ($style) { + case GRAD_VER: + $steps = ceil(abs($xr - $xl) + 1); + $delta = $xr >= $xl ? 1 : -1; + $this->GetColArray($from_color, $to_color, $steps, $colors, $this->numcolors); + for ($i = 0, $x = $xl; $i < $steps; ++$i) { + $this->img->current_color = $colors[$i]; + $this->img->Line($x, $yt, $x, $yb); + $x += $delta; + } + break; + + case GRAD_HOR: + $steps = ceil(abs($yb - $yt) + 1); + $delta = $yb >= $yt ? 1 : -1; + $this->GetColArray($from_color, $to_color, $steps, $colors, $this->numcolors); + for ($i = 0, $y = $yt; $i < $steps; ++$i) { + $this->img->current_color = $colors[$i]; + $this->img->Line($xl, $y, $xr, $y); + $y += $delta; + } + break; + + case GRAD_MIDHOR: + $steps = ceil(abs($yb - $yt) / 2); + $delta = $yb >= $yt ? 1 : -1; + $this->GetColArray($from_color, $to_color, $steps, $colors, $this->numcolors); + for ($y = $yt, $i = 0; $i < $steps; ++$i) { + $this->img->current_color = $colors[$i]; + $this->img->Line($xl, $y, $xr, $y); + $y += $delta; + } + --$i; + if (abs($yb - $yt) % 2 == 1) { + --$steps; + } + for ($j = 0; $j < $steps; ++$j, --$i) { + $this->img->current_color = $colors[$i]; + $this->img->Line($xl, $y, $xr, $y); + $y += $delta; + } + $this->img->Line($xl, $y, $xr, $y); + break; + + case GRAD_MIDVER: + $steps = ceil(abs($xr - $xl) / 2); + $delta = $xr >= $xl ? 1 : -1; + $this->GetColArray($from_color, $to_color, $steps, $colors, $this->numcolors); + for ($x = $xl, $i = 0; $i < $steps; ++$i) { + $this->img->current_color = $colors[$i]; + $this->img->Line($x, $yb, $x, $yt); + $x += $delta; + } + --$i; + if (abs($xr - $xl) % 2 == 1) { + --$steps; + } + for ($j = 0; $j < $steps; ++$j, --$i) { + $this->img->current_color = $colors[$i]; + $this->img->Line($x, $yb, $x, $yt); + $x += $delta; + } + $this->img->Line($x, $yb, $x, $yt); + break; + + case GRAD_WIDE_MIDVER: + $diff = ceil(abs($xr - $xl)); + $steps = floor(abs($diff) / 3); + $firststep = $diff - 2 * $steps; + $delta = $xr >= $xl ? 1 : -1; + $this->GetColArray($from_color, $to_color, $firststep, $colors, $this->numcolors); + for ($x = $xl, $i = 0; $i < $firststep; ++$i) { + $this->img->current_color = $colors[$i]; + $this->img->Line($x, $yb, $x, $yt); + $x += $delta; + } + --$i; + $this->img->current_color = $colors[$i]; + for ($j = 0; $j < $steps; ++$j) { + $this->img->Line($x, $yb, $x, $yt); + $x += $delta; + } + + for ($j = 0; $j < $steps; ++$j, --$i) { + $this->img->current_color = $colors[$i]; + $this->img->Line($x, $yb, $x, $yt); + $x += $delta; + } + break; + + case GRAD_WIDE_MIDHOR: + $diff = ceil(abs($yb - $yt)); + $steps = floor(abs($diff) / 3); + $firststep = $diff - 2 * $steps; + $delta = $yb >= $yt ? 1 : -1; + $this->GetColArray($from_color, $to_color, $firststep, $colors, $this->numcolors); + for ($y = $yt, $i = 0; $i < $firststep; ++$i) { + $this->img->current_color = $colors[$i]; + $this->img->Line($xl, $y, $xr, $y); + $y += $delta; + } + --$i; + $this->img->current_color = $colors[$i]; + for ($j = 0; $j < $steps; ++$j) { + $this->img->Line($xl, $y, $xr, $y); + $y += $delta; + } + for ($j = 0; $j < $steps; ++$j, --$i) { + $this->img->current_color = $colors[$i]; + $this->img->Line($xl, $y, $xr, $y); + $y += $delta; + } + break; + + case GRAD_LEFT_REFLECTION: + $steps1 = ceil(0.3 * abs($xr - $xl)); + $delta = $xr >= $xl ? 1 : -1; + + $from_color = $this->img->rgb->Color($from_color); + $adj = 1.4; + $m = ($adj - 1.0) * (255 - min(255, min($from_color[0], min($from_color[1], $from_color[2])))); + $from_color2 = array(min(255, $from_color[0] + $m), + min(255, $from_color[1] + $m), min(255, $from_color[2] + $m)); + + $this->GetColArray($from_color2, $to_color, $steps1, $colors, $this->numcolors); + $n = count($colors); + for ($x = $xl, $i = 0; $i < $steps1 && $i < $n; ++$i) { + $this->img->current_color = $colors[$i]; + $this->img->Line($x, $yb, $x, $yt); + $x += $delta; + } + $steps2 = max(1, ceil(0.08 * abs($xr - $xl))); + $this->img->SetColor($to_color); + for ($j = 0; $j < $steps2; ++$j) { + $this->img->Line($x, $yb, $x, $yt); + $x += $delta; + } + $steps = abs($xr - $xl) - $steps1 - $steps2; + $this->GetColArray($to_color, $from_color, $steps, $colors, $this->numcolors); + $n = count($colors); + for ($i = 0; $i < $steps && $i < $n; ++$i) { + $this->img->current_color = $colors[$i]; + $this->img->Line($x, $yb, $x, $yt); + $x += $delta; + } + break; + + case GRAD_RIGHT_REFLECTION: + $steps1 = ceil(0.7 * abs($xr - $xl)); + $delta = $xr >= $xl ? 1 : -1; + + $this->GetColArray($from_color, $to_color, $steps1, $colors, $this->numcolors); + $n = count($colors); + for ($x = $xl, $i = 0; $i < $steps1 && $i < $n; ++$i) { + $this->img->current_color = $colors[$i]; + $this->img->Line($x, $yb, $x, $yt); + $x += $delta; + } + $steps2 = max(1, ceil(0.08 * abs($xr - $xl))); + $this->img->SetColor($to_color); + for ($j = 0; $j < $steps2; ++$j) { + $this->img->Line($x, $yb, $x, $yt); + $x += $delta; + } + + $from_color = $this->img->rgb->Color($from_color); + $adj = 1.4; + $m = ($adj - 1.0) * (255 - min(255, min($from_color[0], min($from_color[1], $from_color[2])))); + $from_color = array(min(255, $from_color[0] + $m), + min(255, $from_color[1] + $m), min(255, $from_color[2] + $m)); + + $steps = abs($xr - $xl) - $steps1 - $steps2; + $this->GetColArray($to_color, $from_color, $steps, $colors, $this->numcolors); + $n = count($colors); + for ($i = 0; $i < $steps && $i < $n; ++$i) { + $this->img->current_color = $colors[$i]; + $this->img->Line($x, $yb, $x, $yt); + $x += $delta; + } + break; + + case GRAD_CENTER: + $steps = ceil(min(($yb - $yt) + 1, ($xr - $xl) + 1) / 2); + $this->GetColArray($from_color, $to_color, $steps, $colors, $this->numcolors); + $dx = ($xr - $xl) / 2; + $dy = ($yb - $yt) / 2; + $x = $xl; + $y = $yt; + $x2 = $xr; + $y2 = $yb; + $n = count($colors); + for ($x = $xl, $i = 0; $x < $xl + $dx && $y < $yt + $dy && $i < $n; ++$x, ++$y, --$x2, --$y2, ++$i) { + $this->img->current_color = $colors[$i]; + $this->img->Rectangle($x, $y, $x2, $y2); + } + $this->img->Line($x, $y, $x2, $y2); + break; + + case GRAD_RAISED_PANEL: + // right to left + $steps1 = $xr - $xl; + $delta = $xr >= $xl ? 1 : -1; + $this->GetColArray($to_color, $from_color, $steps1, $colors, $this->numcolors); + $n = count($colors); + for ($x = $xl, $i = 0; $i < $steps1 && $i < $n; ++$i) { + $this->img->current_color = $colors[$i]; + $this->img->Line($x, $yb, $x, $yt); + $x += $delta; + } + + // left to right + $xr -= 3; + $xl += 3; + $yb -= 3; + $yt += 3; + $steps2 = $xr - $xl; + $delta = $xr >= $xl ? 1 : -1; + for ($x = $xl, $j = $steps2; $j >= 0; --$j) { + $this->img->current_color = $colors[$j]; + $this->img->Line($x, $yb, $x, $yt); + $x += $delta; + } + break; + + case GRAD_DIAGONAL: + // use the longer dimension to determine the required number of steps. + // first loop draws from one corner to the mid-diagonal and the second + // loop draws from the mid-diagonal to the opposing corner. + if ($xr - $xl > $yb - $yt) { + // width is greater than height -> use x-dimension for steps + $steps = $xr - $xl; + $delta = $xr >= $xl ? 1 : -1; + $this->GetColArray($from_color, $to_color, $steps * 2, $colors, $this->numcolors); + $n = count($colors); + + for ($x = $xl, $i = 0; $i < $steps && $i < $n; ++$i) { + $this->img->current_color = $colors[$i]; + $y = $yt + ($i / $steps) * ($yb - $yt) * $delta; + $this->img->Line($x, $yt, $xl, $y); + $x += $delta; + } + + for ($x = $xl, $i = 0; $i < $steps && $i < $n; ++$i) { + $this->img->current_color = $colors[$steps + $i]; + $y = $yt + ($i / $steps) * ($yb - $yt) * $delta; + $this->img->Line($x, $yb, $xr, $y); + $x += $delta; + } + } else { + // height is greater than width -> use y-dimension for steps + $steps = $yb - $yt; + $delta = $yb >= $yt ? 1 : -1; + $this->GetColArray($from_color, $to_color, $steps * 2, $colors, $this->numcolors); + $n = count($colors); + + for ($y = $yt, $i = 0; $i < $steps && $i < $n; ++$i) { + $this->img->current_color = $colors[$i]; + $x = $xl + ($i / $steps) * ($xr - $xl) * $delta; + $this->img->Line($x, $yt, $xl, $y); + $y += $delta; + } + + for ($y = $yt, $i = 0; $i < $steps && $i < $n; ++$i) { + $this->img->current_color = $colors[$steps + $i]; + $x = $xl + ($i / $steps) * ($xr - $xl) * $delta; + $this->img->Line($x, $yb, $xr, $y); + $x += $delta; + } + + } + break; + + default: + Util\JpGraphError::RaiseL(7001, $style); + //("Unknown gradient style (=$style)."); + break; + } + } + + // Fill a special case of a polygon with a flat bottom + // with a gradient. Can be used for filled line plots. + // Please note that this is NOT a generic gradient polygon fill + // routine. It assumes that the bottom is flat (like a drawing + // of a mountain) + public function FilledFlatPolygon($pts, $from_color, $to_color) + { + if (count($pts) == 0) { + return; + } + + $maxy = $pts[1]; + $miny = $pts[1]; + $n = count($pts); + for ($i = 0, $idx = 0; $i < $n; $i += 2) { + $x = round($pts[$i]); + $y = round($pts[$i + 1]); + $miny = min($miny, $y); + $maxy = max($maxy, $y); + } + + $colors = array(); + $this->GetColArray($from_color, $to_color, abs($maxy - $miny) + 1, $colors, $this->numcolors); + for ($i = $miny, $idx = 0; $i <= $maxy; ++$i) { + $colmap[$i] = $colors[$idx++]; + } + + $n = count($pts) / 2; + $idx = 0; + while ($idx < $n - 1) { + $p1 = array(round($pts[$idx * 2]), round($pts[$idx * 2 + 1])); + $p2 = array(round($pts[++$idx * 2]), round($pts[$idx * 2 + 1])); + + // Find the largest rectangle we can fill + $y = max($p1[1], $p2[1]); + for ($yy = $maxy; $yy > $y; --$yy) { + $this->img->current_color = $colmap[$yy]; + $this->img->Line($p1[0], $yy, $p2[0] - 1, $yy); + } + + if ($p1[1] == $p2[1]) { + continue; + } + + // Fill the rest using lines (slow...) + $slope = ($p2[0] - $p1[0]) / ($p1[1] - $p2[1]); + $x1 = $p1[0]; + $x2 = $p2[0] - 1; + $start = $y; + if ($p1[1] > $p2[1]) { + while ($y >= $p2[1]) { + $x1 = $slope * ($start - $y) + $p1[0]; + $this->img->current_color = $colmap[$y]; + $this->img->Line($x1, $y, $x2, $y); + --$y; + } + } else { + while ($y >= $p1[1]) { + $x2 = $p2[0] + $slope * ($start - $y); + $this->img->current_color = $colmap[$y]; + $this->img->Line($x1, $y, $x2, $y); + --$y; + } + } + } + } + + //--------------- + // PRIVATE METHODS + // Add to the image color map the necessary colors to do the transition + // between the two colors using $numcolors intermediate colors + public function GetColArray($from_color, $to_color, $arr_size, &$colors, $numcols = 100) + { + if ($arr_size == 0) { + return; + } + + // If color is given as text get it's corresponding r,g,b values + $from_color = $this->img->rgb->Color($from_color); + $to_color = $this->img->rgb->Color($to_color); + + $rdelta = ($to_color[0] - $from_color[0]) / $numcols; + $gdelta = ($to_color[1] - $from_color[1]) / $numcols; + $bdelta = ($to_color[2] - $from_color[2]) / $numcols; + $colorsperstep = $numcols / $arr_size; + $prevcolnum = -1; + $from_alpha = $from_color[3]; + $to_alpha = $to_color[3]; + $adelta = ($to_alpha - $from_alpha) / $numcols; + for ($i = 0; $i < $arr_size; ++$i) { + $colnum = floor($colorsperstep * $i); + if ($colnum == $prevcolnum) { + $colors[$i] = $colidx; + } else { + $r = floor($from_color[0] + $colnum * $rdelta); + $g = floor($from_color[1] + $colnum * $gdelta); + $b = floor($from_color[2] + $colnum * $bdelta); + $alpha = $from_alpha + $colnum * $adelta; + $colidx = $this->img->rgb->Allocate(sprintf("#%02x%02x%02x", $r, $g, $b), $alpha); + $colors[$i] = $colidx; + } + $prevcolnum = $colnum; + } + } +} // Class diff --git a/vendor/amenadiel/jpgraph/src/plot/GroupBarPlot.php b/vendor/amenadiel/jpgraph/src/plot/GroupBarPlot.php new file mode 100644 index 0000000000..0e776771fc --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/plot/GroupBarPlot.php @@ -0,0 +1,101 @@ +width = 0.7; + $this->plots = $plots; + $this->nbrplots = count($plots); + if ($this->nbrplots < 1) { + Util\JpGraphError::RaiseL(2007); //('Cannot create GroupBarPlot from empty plot array.'); + } + for ($i = 0; $i < $this->nbrplots; ++$i) { + if (empty($this->plots[$i]) || !isset($this->plots[$i])) { + Util\JpGraphError::RaiseL(2008, $i); //("Group bar plot element nbr $i is undefined or empty."); + } + } + $this->numpoints = $plots[0]->numpoints; + $this->width = 0.7; + } + + //--------------- + // PUBLIC METHODS + public function Legend($graph) + { + $n = count($this->plots); + for ($i = 0; $i < $n; ++$i) { + $c = get_class($this->plots[$i]); + if (!($this->plots[$i] instanceof BarPlot)) { + Util\JpGraphError::RaiseL(2009, $c); + //('One of the objects submitted to GroupBar is not a BarPlot. Make sure that you create the Group Bar plot from an array of BarPlot or AccBarPlot objects. (Class = '.$c.')'); + } + $this->plots[$i]->DoLegend($graph); + } + } + + public function Min() + { + list($xmin, $ymin) = $this->plots[0]->Min(); + $n = count($this->plots); + for ($i = 0; $i < $n; ++$i) { + list($xm, $ym) = $this->plots[$i]->Min(); + $xmin = max($xmin, $xm); + $ymin = min($ymin, $ym); + } + return array($xmin, $ymin); + } + + public function Max() + { + list($xmax, $ymax) = $this->plots[0]->Max(); + $n = count($this->plots); + for ($i = 0; $i < $n; ++$i) { + list($xm, $ym) = $this->plots[$i]->Max(); + $xmax = max($xmax, $xm); + $ymax = max($ymax, $ym); + } + return array($xmax, $ymax); + } + + public function GetCSIMareas() + { + $n = count($this->plots); + $csimareas = ''; + for ($i = 0; $i < $n; ++$i) { + $csimareas .= $this->plots[$i]->csimareas; + } + return $csimareas; + } + + // Stroke all the bars next to each other + public function Stroke($img, $xscale, $yscale) + { + $tmp = $xscale->off; + $n = count($this->plots); + $subwidth = $this->width / $this->nbrplots; + + for ($i = 0; $i < $n; ++$i) { + $this->plots[$i]->ymin = $this->ybase; + $this->plots[$i]->SetWidth($subwidth); + + // If the client have used SetTextTickInterval() then + // major_step will be > 1 and the positioning will fail. + // If we assume it is always one the positioning will work + // fine with a text scale but this will not work with + // arbitrary linear scale + $xscale->off = $tmp + $i * round($xscale->scale_factor * $subwidth); + $this->plots[$i]->Stroke($img, $xscale, $yscale); + } + $xscale->off = $tmp; + } +} // Class diff --git a/vendor/amenadiel/jpgraph/src/plot/IconPlot.php b/vendor/amenadiel/jpgraph/src/plot/IconPlot.php new file mode 100644 index 0000000000..9e9e335e7d --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/plot/IconPlot.php @@ -0,0 +1,215 @@ +iFile = $aFile; + $this->iX = $aX; + $this->iY = $aY; + $this->iScale = $aScale; + if ($aMix < 0 || $aMix > 100) { + Util\JpGraphError::RaiseL(8001); //('Mix value for icon must be between 0 and 100.'); + } + $this->iMix = $aMix; + } + + public function SetCountryFlag($aFlag, $aX = 0, $aY = 0, $aScale = 1.0, $aMix = 100, $aStdSize = 3) + { + $this->iCountryFlag = $aFlag; + $this->iX = $aX; + $this->iY = $aY; + $this->iScale = $aScale; + if ($aMix < 0 || $aMix > 100) { + Util\JpGraphError::RaiseL(8001); //'Mix value for icon must be between 0 and 100.'); + } + $this->iMix = $aMix; + $this->iCountryStdSize = $aStdSize; + } + + public function SetPos($aX, $aY) + { + $this->iX = $aX; + $this->iY = $aY; + } + + public function CreateFromString($aStr) + { + $this->iImgString = $aStr; + } + + public function SetScalePos($aX, $aY) + { + $this->iScalePosX = $aX; + $this->iScalePosY = $aY; + } + + public function SetScale($aScale) + { + $this->iScale = $aScale; + } + + public function SetMix($aMix) + { + if ($aMix < 0 || $aMix > 100) { + Util\JpGraphError::RaiseL(8001); //('Mix value for icon must be between 0 and 100.'); + } + $this->iMix = $aMix; + } + + public function SetAnchor($aXAnchor = 'left', $aYAnchor = 'center') + { + if (!in_array($aXAnchor, $this->iAnchors) || + !in_array($aYAnchor, $this->iAnchors)) { + Util\JpGraphError::RaiseL(8002); //("Anchor position for icons must be one of 'top', 'bottom', 'left', 'right' or 'center'"); + } + $this->iHorAnchor = $aXAnchor; + $this->iVertAnchor = $aYAnchor; + } + + public function PreStrokeAdjust($aGraph) + { + // Nothing to do ... + } + + public function DoLegend($aGraph) + { + // Nothing to do ... + } + + public function Max() + { + return array(false, false); + } + + // The next four function are framework function tht gets called + // from Gantt and is not menaiungfull in the context of Icons but + // they must be implemented to avoid errors. + public function GetMaxDate() + {return false;} + + public function GetMinDate() + {return false;} + + public function GetLineNbr() + {return 0;} + + public function GetAbsHeight() + {return 0;} + + public function Min() + { + return array(false, false); + } + + public function StrokeMargin(&$aImg) + { + return true; + } + + public function Stroke($aImg, $axscale = null, $ayscale = null) + { + $this->StrokeWithScale($aImg, $axscale, $ayscale); + } + + public function StrokeWithScale($aImg, $axscale, $ayscale) + { + if ($this->iScalePosX === null || $this->iScalePosY === null || + $axscale === null || $ayscale === null) { + $this->_Stroke($aImg); + } else { + $this->_Stroke($aImg, + round($axscale->Translate($this->iScalePosX)), + round($ayscale->Translate($this->iScalePosY))); + } + } + + public function GetWidthHeight() + { + $dummy = 0; + return $this->_Stroke($dummy, null, null, true); + } + + public function _Stroke($aImg, $x = null, $y = null, $aReturnWidthHeight = false) + { + if ($this->iFile != '' && $this->iCountryFlag != '') { + Util\JpGraphError::RaiseL(8003); //('It is not possible to specify both an image file and a country flag for the same icon.'); + } + if ($this->iFile != '') { + $gdimg = Graph::LoadBkgImage('', $this->iFile); + } elseif ($this->iImgString != '') { + $gdimg = Image::CreateFromString($this->iImgString); + } else { + if (!class_exists('FlagImages', false)) { + Util\JpGraphError::RaiseL(8004); //('In order to use Country flags as icons you must include the "jpgraph_flags.php" file.'); + } + $fobj = new FlagImages($this->iCountryStdSize); + $dummy = ''; + $gdimg = $fobj->GetImgByName($this->iCountryFlag, $dummy); + } + + $iconw = imagesx($gdimg); + $iconh = imagesy($gdimg); + + if ($aReturnWidthHeight) { + return array(round($iconw * $this->iScale), round($iconh * $this->iScale)); + } + + if ($x !== null && $y !== null) { + $this->iX = $x; + $this->iY = $y; + } + if ($this->iX >= 0 && $this->iX <= 1.0) { + $w = imagesx($aImg->img); + $this->iX = round($w * $this->iX); + } + if ($this->iY >= 0 && $this->iY <= 1.0) { + $h = imagesy($aImg->img); + $this->iY = round($h * $this->iY); + } + + if ($this->iHorAnchor == 'center') { + $this->iX -= round($iconw * $this->iScale / 2); + } + + if ($this->iHorAnchor == 'right') { + $this->iX -= round($iconw * $this->iScale); + } + + if ($this->iVertAnchor == 'center') { + $this->iY -= round($iconh * $this->iScale / 2); + } + + if ($this->iVertAnchor == 'bottom') { + $this->iY -= round($iconh * $this->iScale); + } + + $aImg->CopyMerge($gdimg, $this->iX, $this->iY, 0, 0, + round($iconw * $this->iScale), round($iconh * $this->iScale), + $iconw, $iconh, + $this->iMix); + } +} diff --git a/vendor/amenadiel/jpgraph/src/plot/LegendStyle.php b/vendor/amenadiel/jpgraph/src/plot/LegendStyle.php new file mode 100644 index 0000000000..775f5a5c49 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/plot/LegendStyle.php @@ -0,0 +1,141 @@ +iLblFontFamily = $aFontFamily; + $this->iLblFontStyle = $aFontStyle; + $this->iLblFontSize = $aFontSize; + $this->iTxtFontFamily = $aFontFamily; + $this->iTxtFontStyle = $aFontStyle; + $this->iTxtFontSize = $aFontSize; + $this->iCircleFontFamily = $aFontFamily; + $this->iCircleFontStyle = $aFontStyle; + $this->iCircleFontSize = $aFontSize; + } + + public function SetLFont($aFontFamily, $aFontStyle = FS_NORMAL, $aFontSize = 10) + { + $this->iLblFontFamily = $aFontFamily; + $this->iLblFontStyle = $aFontStyle; + $this->iLblFontSize = $aFontSize; + } + + public function SetTFont($aFontFamily, $aFontStyle = FS_NORMAL, $aFontSize = 10) + { + $this->iTxtFontFamily = $aFontFamily; + $this->iTxtFontStyle = $aFontStyle; + $this->iTxtFontSize = $aFontSize; + } + + public function SetCFont($aFontFamily, $aFontStyle = FS_NORMAL, $aFontSize = 10) + { + $this->iCircleFontFamily = $aFontFamily; + $this->iCircleFontStyle = $aFontStyle; + $this->iCircleFontSize = $aFontSize; + } + + public function SetFontColor($aColor) + { + $this->iTxtFontColor = $aColor; + $this->iLblFontColor = $aColor; + $this->iCircleFontColor = $aColor; + } + + public function SetTFontColor($aColor) + { + $this->iTxtFontColor = $aColor; + } + + public function SetLFontColor($aColor) + { + $this->iLblFontColor = $aColor; + } + + public function SetCFontColor($aColor) + { + $this->iCircleFontColor = $aColor; + } + + public function SetCircleWeight($aWeight) + { + $this->iCircleWeight = $aWeight; + } + + public function SetCircleRadius($aRadius) + { + $this->iCircleRadius = $aRadius; + } + + public function SetCircleColor($aColor) + { + $this->iCircleColor = $aColor; + } + + public function SetCircleText($aTxt) + { + $this->iZCircleTxt = $aTxt; + } + + public function SetMargin($aMarg, $aBottomMargin = 5) + { + $this->iMargin = $aMarg; + $this->iBottomMargin = $aBottomMargin; + } + + public function SetLength($aLength) + { + $this->iLength = $aLength; + } + + public function Show($aFlg = true) + { + $this->iShow = $aFlg; + } + + public function Hide($aFlg = true) + { + $this->iShow = !$aFlg; + } + + public function SetFormat($aFmt) + { + $this->iFormatString = $aFmt; + } + + public function SetText($aTxt) + { + $this->iTxt = $aTxt; + } + +} diff --git a/vendor/amenadiel/jpgraph/src/plot/LineErrorPlot.php b/vendor/amenadiel/jpgraph/src/plot/LineErrorPlot.php new file mode 100644 index 0000000000..393f995263 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/plot/LineErrorPlot.php @@ -0,0 +1,50 @@ +line = new LinePlot($ly, $datax); + } + + //--------------- + // PUBLIC METHODS + public function Legend($graph) + { + if ($this->legend != "") { + $graph->legend->Add($this->legend, $this->color); + } + + $this->line->Legend($graph); + } + + public function Stroke($img, $xscale, $yscale) + { + parent::Stroke($img, $xscale, $yscale); + $this->line->Stroke($img, $xscale, $yscale); + } +} // Class + +/* EOF */ diff --git a/vendor/amenadiel/jpgraph/src/plot/LinePlot.php b/vendor/amenadiel/jpgraph/src/plot/LinePlot.php new file mode 100644 index 0000000000..6999cd7942 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/plot/LinePlot.php @@ -0,0 +1,465 @@ +mark = new PlotMark(); + $this->color = Util\ColorFactory::getColor(); + $this->fill_color = $this->color; + } + + //--------------- + // PUBLIC METHODS + + public function SetFilled($aFlg = true) + { + $this->filled = $aFlg; + } + + public function SetBarCenter($aFlag = true) + { + $this->barcenter = $aFlag; + } + + public function SetStyle($aStyle) + { + $this->line_style = $aStyle; + } + + public function SetStepStyle($aFlag = true) + { + $this->step_style = $aFlag; + } + + public function SetColor($aColor) + { + parent::SetColor($aColor); + } + + public function SetFillFromYMin($f = true) + { + $this->fillFromMin = $f; + } + + public function SetFillFromYMax($f = true) + { + $this->fillFromMax = $f; + } + + public function SetFillColor($aColor, $aFilled = true) + { + //$this->color = $aColor; + $this->fill_color = $aColor; + $this->filled = $aFilled; + } + + public function SetFillGradient($aFromColor, $aToColor, $aNumColors = 100, $aFilled = true) + { + $this->fillgrad_fromcolor = $aFromColor; + $this->fillgrad_tocolor = $aToColor; + $this->fillgrad_numcolors = $aNumColors; + $this->filled = $aFilled; + $this->fillgrad = true; + } + + public function Legend($graph) + { + if ($this->legend != "") { + if ($this->filled && !$this->fillgrad) { + $graph->legend->Add($this->legend, + $this->fill_color, $this->mark, 0, + $this->legendcsimtarget, $this->legendcsimalt, $this->legendcsimwintarget); + } elseif ($this->fillgrad) { + $color = array($this->fillgrad_fromcolor, $this->fillgrad_tocolor); + // In order to differentiate between gradients and cooors specified as an RGB triple + $graph->legend->Add($this->legend, $color, "", -2/* -GRAD_HOR */, + $this->legendcsimtarget, $this->legendcsimalt, $this->legendcsimwintarget); + } else { + $graph->legend->Add($this->legend, + $this->color, $this->mark, $this->line_style, + $this->legendcsimtarget, $this->legendcsimalt, $this->legendcsimwintarget); + } + } + } + + public function AddArea($aMin = 0, $aMax = 0, $aFilled = LP_AREA_NOT_FILLED, $aColor = "gray9", $aBorder = LP_AREA_BORDER) + { + if ($aMin > $aMax) { + // swap + $tmp = $aMin; + $aMin = $aMax; + $aMax = $tmp; + } + $this->filledAreas[] = array($aMin, $aMax, $aColor, $aFilled, $aBorder); + } + + // Gets called before any axis are stroked + public function PreStrokeAdjust($graph) + { + + // If another plot type have already adjusted the + // offset we don't touch it. + // (We check for empty in case the scale is a log scale + // and hence doesn't contain any xlabel_offset) + if (empty($graph->xaxis->scale->ticks->xlabel_offset) || $graph->xaxis->scale->ticks->xlabel_offset == 0) { + if ($this->center) { + ++$this->numpoints; + $a = 0.5; + $b = 0.5; + } else { + $a = 0; + $b = 0; + } + $graph->xaxis->scale->ticks->SetXLabelOffset($a); + $graph->SetTextScaleOff($b); + //$graph->xaxis->scale->ticks->SupressMinorTickMarks(); + } + } + + public function SetFastStroke($aFlg = true) + { + $this->iFastStroke = $aFlg; + } + + public function FastStroke($img, $xscale, $yscale, $aStartPoint = 0, $exist_x = true) + { + // An optimized stroke for many data points with no extra + // features but 60% faster. You can't have values or line styles, or null + // values in plots. + $numpoints = count($this->coords[0]); + if ($this->barcenter) { + $textadj = 0.5 - $xscale->text_scale_off; + } else { + $textadj = 0; + } + + $img->SetColor($this->color); + $img->SetLineWeight($this->weight); + $pnts = $aStartPoint; + while ($pnts < $numpoints) { + if ($exist_x) { + $x = $this->coords[1][$pnts]; + } else { + $x = $pnts + $textadj; + } + $xt = $xscale->Translate($x); + $y = $this->coords[0][$pnts]; + $yt = $yscale->Translate($y); + if (is_numeric($y)) { + $cord[] = $xt; + $cord[] = $yt; + } elseif ($y == '-' && $pnts > 0) { + // Just ignore + } else { + Util\JpGraphError::RaiseL(10002); //('Plot too complicated for fast line Stroke. Use standard Stroke()'); + } + ++$pnts; + } // WHILE + + $img->Polygon($cord, false, true); + } + + public function Stroke($img, $xscale, $yscale) + { + $idx = 0; + $numpoints = count($this->coords[0]); + if (isset($this->coords[1])) { + if (count($this->coords[1]) != $numpoints) { + Util\JpGraphError::RaiseL(2003, count($this->coords[1]), $numpoints); + //("Number of X and Y points are not equal. Number of X-points:".count($this->coords[1])." Number of Y-points:$numpoints"); + } else { + $exist_x = true; + } + } else { + $exist_x = false; + } + + if ($this->barcenter) { + $textadj = 0.5 - $xscale->text_scale_off; + } else { + $textadj = 0; + } + + // Find the first numeric data point + $startpoint = 0; + while ($startpoint < $numpoints && !is_numeric($this->coords[0][$startpoint])) { + ++$startpoint; + } + + // Bail out if no data points + if ($startpoint == $numpoints) { + return; + } + + if ($this->iFastStroke) { + $this->FastStroke($img, $xscale, $yscale, $startpoint, $exist_x); + return; + } + + if ($exist_x) { + $xs = $this->coords[1][$startpoint]; + } else { + $xs = $textadj + $startpoint; + } + + $img->SetStartPoint($xscale->Translate($xs), + $yscale->Translate($this->coords[0][$startpoint])); + + if ($this->filled) { + if ($this->fillFromMax) { + //$max = $yscale->GetMaxVal(); + $cord[$idx++] = $xscale->Translate($xs); + $cord[$idx++] = $yscale->scale_abs[1]; + } else { + $min = $yscale->GetMinVal(); + if ($min > 0 || $this->fillFromMin) { + $fillmin = $yscale->scale_abs[0]; //Translate($min); + } else { + $fillmin = $yscale->Translate(0); + } + + $cord[$idx++] = $xscale->Translate($xs); + $cord[$idx++] = $fillmin; + } + } + $xt = $xscale->Translate($xs); + $yt = $yscale->Translate($this->coords[0][$startpoint]); + $cord[$idx++] = $xt; + $cord[$idx++] = $yt; + $yt_old = $yt; + $xt_old = $xt; + $y_old = $this->coords[0][$startpoint]; + + $this->value->Stroke($img, $this->coords[0][$startpoint], $xt, $yt); + + $img->SetColor($this->color); + $img->SetLineWeight($this->weight); + $img->SetLineStyle($this->line_style); + $pnts = $startpoint + 1; + $firstnonumeric = false; + + while ($pnts < $numpoints) { + + if ($exist_x) { + $x = $this->coords[1][$pnts]; + } else { + $x = $pnts + $textadj; + } + $xt = $xscale->Translate($x); + $yt = $yscale->Translate($this->coords[0][$pnts]); + + $y = $this->coords[0][$pnts]; + if ($this->step_style) { + // To handle null values within step style we need to record the + // first non numeric value so we know from where to start if the + // non value is '-'. + if (is_numeric($y)) { + $firstnonumeric = false; + if (is_numeric($y_old)) { + $img->StyleLine($xt_old, $yt_old, $xt, $yt_old); + $img->StyleLine($xt, $yt_old, $xt, $yt); + } elseif ($y_old == '-') { + $img->StyleLine($xt_first, $yt_first, $xt, $yt_first); + $img->StyleLine($xt, $yt_first, $xt, $yt); + } else { + $yt_old = $yt; + $xt_old = $xt; + } + $cord[$idx++] = $xt; + $cord[$idx++] = $yt_old; + $cord[$idx++] = $xt; + $cord[$idx++] = $yt; + } elseif ($firstnonumeric == false) { + $firstnonumeric = true; + $yt_first = $yt_old; + $xt_first = $xt_old; + } + } else { + $tmp1 = $y; + $prev = $this->coords[0][$pnts - 1]; + if ($tmp1 === '' || $tmp1 === null || $tmp1 === 'X') { + $tmp1 = 'x'; + } + + if ($prev === '' || $prev === null || $prev === 'X') { + $prev = 'x'; + } + + if (is_numeric($y) || (is_string($y) && $y != '-')) { + if (is_numeric($y) && (is_numeric($prev) || $prev === '-')) { + $img->StyleLineTo($xt, $yt); + } else { + $img->SetStartPoint($xt, $yt); + } + } + if ($this->filled && $tmp1 !== '-') { + if ($tmp1 === 'x') { + $cord[$idx++] = $cord[$idx - 3]; + $cord[$idx++] = $fillmin; + } elseif ($prev === 'x') { + $cord[$idx++] = $xt; + $cord[$idx++] = $fillmin; + $cord[$idx++] = $xt; + $cord[$idx++] = $yt; + } else { + $cord[$idx++] = $xt; + $cord[$idx++] = $yt; + } + } else { + if (is_numeric($tmp1) && (is_numeric($prev) || $prev === '-')) { + $cord[$idx++] = $xt; + $cord[$idx++] = $yt; + } + } + } + $yt_old = $yt; + $xt_old = $xt; + $y_old = $y; + + $this->StrokeDataValue($img, $this->coords[0][$pnts], $xt, $yt); + + ++$pnts; + } + + if ($this->filled) { + $cord[$idx++] = $xt; + if ($this->fillFromMax) { + $cord[$idx++] = $yscale->scale_abs[1]; + } else { + if ($min > 0 || $this->fillFromMin) { + $cord[$idx++] = $yscale->Translate($min); + } else { + $cord[$idx++] = $yscale->Translate(0); + } + } + if ($this->fillgrad) { + $img->SetLineWeight(1); + $grad = new Gradient($img); + $grad->SetNumColors($this->fillgrad_numcolors); + $grad->FilledFlatPolygon($cord, $this->fillgrad_fromcolor, $this->fillgrad_tocolor); + $img->SetLineWeight($this->weight); + } else { + $img->SetColor($this->fill_color); + $img->FilledPolygon($cord); + } + if ($this->weight > 0) { + $img->SetLineWeight($this->weight); + $img->SetColor($this->color); + // Remove first and last coordinate before drawing the line + // sine we otherwise get the vertical start and end lines which + // doesn't look appropriate + $img->Polygon(array_slice($cord, 2, count($cord) - 4)); + } + } + + if (!empty($this->filledAreas)) { + + $minY = $yscale->Translate($yscale->GetMinVal()); + $factor = ($this->step_style ? 4 : 2); + + for ($i = 0; $i < sizeof($this->filledAreas); ++$i) { + // go through all filled area elements ordered by insertion + // fill polygon array + $areaCoords[] = $cord[$this->filledAreas[$i][0] * $factor]; + $areaCoords[] = $minY; + + $areaCoords = + array_merge($areaCoords, + array_slice($cord, + $this->filledAreas[$i][0] * $factor, + ($this->filledAreas[$i][1] - $this->filledAreas[$i][0] + ($this->step_style ? 0 : 1)) * $factor)); + $areaCoords[] = $areaCoords[sizeof($areaCoords) - 2]; // last x + $areaCoords[] = $minY; // last y + + if ($this->filledAreas[$i][3]) { + $img->SetColor($this->filledAreas[$i][2]); + $img->FilledPolygon($areaCoords); + $img->SetColor($this->color); + } + // Check if we should draw the frame. + // If not we still re-draw the line since it might have been + // partially overwritten by the filled area and it doesn't look + // very good. + if ($this->filledAreas[$i][4]) { + $img->Polygon($areaCoords); + } else { + $img->Polygon($cord); + } + + $areaCoords = array(); + } + } + + if (!is_object($this->mark) || $this->mark->type == -1 || $this->mark->show == false) { + return; + } + + for ($pnts = 0; $pnts < $numpoints; ++$pnts) { + + if ($exist_x) { + $x = $this->coords[1][$pnts]; + } else { + $x = $pnts + $textadj; + } + $xt = $xscale->Translate($x); + $yt = $yscale->Translate($this->coords[0][$pnts]); + + if (is_numeric($this->coords[0][$pnts])) { + if (!empty($this->csimtargets[$pnts])) { + if (!empty($this->csimwintargets[$pnts])) { + $this->mark->SetCSIMTarget($this->csimtargets[$pnts], $this->csimwintargets[$pnts]); + } else { + $this->mark->SetCSIMTarget($this->csimtargets[$pnts]); + } + $this->mark->SetCSIMAlt($this->csimalts[$pnts]); + } + if ($exist_x) { + $x = $this->coords[1][$pnts]; + } else { + $x = $pnts; + } + $this->mark->SetCSIMAltVal($this->coords[0][$pnts], $x); + $this->mark->Stroke($img, $xt, $yt); + $this->csimareas .= $this->mark->GetCSIMAreas(); + } + } + } +} // Class diff --git a/vendor/amenadiel/jpgraph/src/plot/MeshInterpolate.php b/vendor/amenadiel/jpgraph/src/plot/MeshInterpolate.php new file mode 100644 index 0000000000..bc0c1fc0b7 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/plot/MeshInterpolate.php @@ -0,0 +1,110 @@ +Linear($aData, $aFactor); +} + +/** + * Utility class to interpolate a given data matrix + * + */ +class MeshInterpolate +{ + private $data = array(); + + /** + * Calculate the mid points of the given rectangle which has its top left + * corner at $row,$col. The $aFactordecides how many spliots should be done. + * i.e. how many more divisions should be done recursively + * + * @param $row Top left corner of square to work with + * @param $col Top left corner of square to work with + * $param $aFactor In how many subsquare should we split this square. A value of 1 indicates that no action + */ + public function IntSquare($aRow, $aCol, $aFactor) + { + if ($aFactor <= 1) { + return; + } + + $step = pow(2, $aFactor - 1); + + $v0 = $this->data[$aRow][$aCol]; + $v1 = $this->data[$aRow][$aCol + $step]; + $v2 = $this->data[$aRow + $step][$aCol]; + $v3 = $this->data[$aRow + $step][$aCol + $step]; + + $this->data[$aRow][$aCol + $step / 2] = ($v0 + $v1) / 2; + $this->data[$aRow + $step / 2][$aCol] = ($v0 + $v2) / 2; + $this->data[$aRow + $step][$aCol + $step / 2] = ($v2 + $v3) / 2; + $this->data[$aRow + $step / 2][$aCol + $step] = ($v1 + $v3) / 2; + $this->data[$aRow + $step / 2][$aCol + $step / 2] = ($v0 + $v1 + $v2 + $v3) / 4; + + $this->IntSquare($aRow, $aCol, $aFactor - 1); + $this->IntSquare($aRow, $aCol + $step / 2, $aFactor - 1); + $this->IntSquare($aRow + $step / 2, $aCol, $aFactor - 1); + $this->IntSquare($aRow + $step / 2, $aCol + $step / 2, $aFactor - 1); + } + + /** + * Interpolate values in a matrice so that the total number of data points + * in vert and horizontal axis are $aIntNbr more. For example $aIntNbr=2 will + * make the data matrice have tiwce as many vertical and horizontal dta points. + * + * Note: This will blow up the matrcide in memory size in the order of $aInNbr^2 + * + * @param $ &$aData The original data matricde + * @param $aInNbr Interpolation factor + * @return the interpolated matrice + */ + public function Linear(&$aData, $aIntFactor) + { + $step = pow(2, $aIntFactor - 1); + + $orig_cols = count($aData[0]); + $orig_rows = count($aData); + // Number of new columns/rows + // N = (a-1) * 2^(f-1) + 1 + $p = pow(2, $aIntFactor - 1); + $new_cols = $p * ($orig_cols - 1) + 1; + $new_rows = $p * ($orig_rows - 1) + 1; + + $this->data = array_fill(0, $new_rows, array_fill(0, $new_cols, 0)); + // Initialize the new matrix with the values that we know + for ($i = 0; $i < $new_rows; $i++) { + for ($j = 0; $j < $new_cols; $j++) { + $v = 0; + if (($i % $step == 0) && ($j % $step == 0)) { + $v = $aData[$i / $step][$j / $step]; + } + $this->data[$i][$j] = $v; + } + } + + for ($i = 0; $i < $new_rows - 1; $i += $step) { + for ($j = 0; $j < $new_cols - 1; $j += $step) { + $this->IntSquare($i, $j, $aIntFactor); + } + } + + return $this->data; + } +} diff --git a/vendor/amenadiel/jpgraph/src/plot/MileStone.php b/vendor/amenadiel/jpgraph/src/plot/MileStone.php new file mode 100644 index 0000000000..4a04699281 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/plot/MileStone.php @@ -0,0 +1,100 @@ +caption->Set($aCaption); + $this->caption->Align("left", "center"); + $this->caption->SetFont(FF_FONT1, FS_BOLD); + $this->title->Set($aLabel); + $this->title->SetColor("darkred"); + $this->mark = new PlotMark(); + $this->mark->SetWidth(10); + $this->mark->SetType(MARK_DIAMOND); + $this->mark->SetColor("darkred"); + $this->mark->SetFillColor("darkred"); + $this->iVPos = $aVPos; + $this->iStart = $aDate; + } + + //--------------- + // PUBLIC METHODS + + public function GetAbsHeight($aImg) + { + return max($this->title->GetHeight($aImg), $this->mark->GetWidth()); + } + + public function Stroke($aImg, $aScale) + { + // Put the mark in the middle at the middle of the day + $d = $aScale->NormalizeDate($this->iStart) + SECPERDAY / 2; + $x = $aScale->TranslateDate($d); + $y = $aScale->TranslateVertPos($this->iVPos) - ($aScale->GetVertSpacing() / 2); + + $this->StrokeActInfo($aImg, $aScale, $y); + + // CSIM for title + if (!empty($this->title->csimtarget)) { + + $yt = round($y - $this->title->GetHeight($aImg) / 2); + $yb = round($y + $this->title->GetHeight($aImg) / 2); + + $colwidth = $this->title->GetColWidth($aImg); + $colstarts = array(); + $aScale->actinfo->GetColStart($aImg, $colstarts, true); + $n = min(count($colwidth), count($this->title->csimtarget)); + for ($i = 0; $i < $n; ++$i) { + $title_xt = $colstarts[$i]; + $title_xb = $title_xt + $colwidth[$i]; + $coords = "$title_xt,$yt,$title_xb,$yt,$title_xb,$yb,$title_xt,$yb"; + + if (!empty($this->title->csimtarget[$i])) { + + $this->csimarea .= "title->csimtarget[$i] . "\""; + + if (!empty($this->title->csimwintarget[$i])) { + $this->csimarea .= "target=\"" . $this->title->csimwintarget[$i] . "\""; + } + + if (!empty($this->title->csimalt[$i])) { + $tmp = $this->title->csimalt[$i]; + $this->csimarea .= " title=\"$tmp\" alt=\"$tmp\" "; + } + $this->csimarea .= " />\n"; + } + } + } + + if ($d < $aScale->iStartDate || $d > $aScale->iEndDate) { + return; + } + + // Remember the coordinates for any constrains linking to + // this milestone + $w = $this->mark->GetWidth() / 2; + $this->SetConstrainPos($x, round($y - $w), $x, round($y + $w)); + + // Setup CSIM + if ($this->csimtarget != '') { + $this->mark->SetCSIMTarget($this->csimtarget); + $this->mark->SetCSIMAlt($this->csimalt); + } + + $this->mark->Stroke($aImg, $x, $y); + $this->caption->Stroke($aImg, $x + $this->mark->width / 2 + $this->iCaptionMargin, $y); + + $this->csimarea .= $this->mark->GetCSIMAreas(); + } +} diff --git a/vendor/amenadiel/jpgraph/src/plot/PiePlot.php b/vendor/amenadiel/jpgraph/src/plot/PiePlot.php new file mode 100644 index 0000000000..f3a31d78e0 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/plot/PiePlot.php @@ -0,0 +1,1137 @@ + array(136, 34, 40, 45, 46, 62, 63, 134, 74, 10, 120, 136, 141, 168, 180, 77, 209, 218, 346, 395, 89, 430), + "pastel" => array(27, 415, 128, 59, 66, 79, 105, 110, 42, 147, 152, 230, 236, 240, 331, 337, 405, 38), + "water" => array(8, 370, 24, 40, 335, 56, 213, 237, 268, 14, 326, 387, 10, 388), + "sand" => array(27, 168, 34, 170, 19, 50, 65, 72, 131, 209, 46, 393)); + protected $setslicecolors = array(); + protected $labeltype = 0; // Default to percentage + protected $pie_border = true, $pie_interior_border = true; + public $value; + protected $ishadowcolor = '', $ishadowdrop = 4; + protected $ilabelposadj = 1; + protected $legendcsimtargets = array(), $legendcsimwintargets = array(); + protected $legendcsimalts = array(); + protected $adjusted_data = array(); + public $guideline = null; + protected $guidelinemargin = 10, $iShowGuideLineForSingle = false; + protected $iGuideLineCurve = false, $iGuideVFactor = 1.4, $iGuideLineRFactor = 0.8; + protected $la = array(); // Holds the exact angle for each label + + //--------------- + // CONSTRUCTOR + public function __construct($data) + { + $this->data = array_reverse($data); + $this->title = new Text\Text(""); + $this->title->SetFont(FF_DEFAULT, FS_BOLD); + $this->value = new DisplayValue(); + $this->value->Show(); + $this->value->SetFormat('%.1f%%'); + $this->guideline = new Graph\LineProperty(); + } + + //--------------- + // PUBLIC METHODS + public function SetCenter($x, $y = 0.5) + { + $this->posx = $x; + $this->posy = $y; + } + + // Enable guideline and set drwaing policy + public function SetGuideLines($aFlg = true, $aCurved = true, $aAlways = false) + { + $this->guideline->Show($aFlg); + $this->iShowGuideLineForSingle = $aAlways; + $this->iGuideLineCurve = $aCurved; + } + + // Adjuste the distance between labels and labels and pie + public function SetGuideLinesAdjust($aVFactor, $aRFactor = 0.8) + { + $this->iGuideVFactor = $aVFactor; + $this->iGuideLineRFactor = $aRFactor; + } + + public function SetColor($aColor) + { + $this->color = $aColor; + } + + public function SetSliceColors($aColors) + { + $this->setslicecolors = $aColors; + } + + public function SetShadow($aColor = 'darkgray', $aDropWidth = 4) + { + $this->ishadowcolor = $aColor; + $this->ishadowdrop = $aDropWidth; + } + + public function SetCSIMTargets($aTargets, $aAlts = '', $aWinTargets = '') + { + $this->csimtargets = array_reverse($aTargets); + if (is_array($aWinTargets)) { + $this->csimwintargets = array_reverse($aWinTargets); + } + + if (is_array($aAlts)) { + $this->csimalts = array_reverse($aAlts); + } + + } + + public function GetCSIMareas() + { + return $this->csimareas; + } + + public function AddSliceToCSIM($i, $xc, $yc, $radius, $sa, $ea) + { + //Slice number, ellipse centre (x,y), height, width, start angle, end angle + while ($sa > 2 * M_PI) { + $sa = $sa - 2 * M_PI; + } + + while ($ea > 2 * M_PI) { + $ea = $ea - 2 * M_PI; + } + + $sa = 2 * M_PI - $sa; + $ea = 2 * M_PI - $ea; + + // Special case when we have only one slice since then both start and end + // angle will be == 0 + if (abs($sa - $ea) < 0.0001) { + $sa = 2 * M_PI; + $ea = 0; + } + + //add coordinates of the centre to the map + $xc = floor($xc); + $yc = floor($yc); + $coords = "$xc, $yc"; + + //add coordinates of the first point on the arc to the map + $xp = floor(($radius * cos($ea)) + $xc); + $yp = floor($yc - $radius * sin($ea)); + $coords .= ", $xp, $yp"; + + //add coordinates every 0.2 radians + $a = $ea + 0.2; + + // If we cross the 360-limit with a slice we need to handle + // the fact that end angle is smaller than start + if ($sa < $ea) { + while ($a <= 2 * M_PI) { + $xp = floor($radius * cos($a) + $xc); + $yp = floor($yc - $radius * sin($a)); + $coords .= ", $xp, $yp"; + $a += 0.2; + } + $a -= 2 * M_PI; + } + + while ($a < $sa) { + $xp = floor($radius * cos($a) + $xc); + $yp = floor($yc - $radius * sin($a)); + $coords .= ", $xp, $yp"; + $a += 0.2; + } + + //Add the last point on the arc + $xp = floor($radius * cos($sa) + $xc); + $yp = floor($yc - $radius * sin($sa)); + $coords .= ", $xp, $yp"; + if (!empty($this->csimtargets[$i])) { + $this->csimareas .= "csimtargets[$i] . "\""; + $tmp = ""; + if (!empty($this->csimwintargets[$i])) { + $this->csimareas .= " target=\"" . $this->csimwintargets[$i] . "\" "; + } + if (!empty($this->csimalts[$i])) { + $tmp = sprintf($this->csimalts[$i], $this->data[$i]); + $this->csimareas .= " title=\"$tmp\" alt=\"$tmp\" "; + } + $this->csimareas .= " />\n"; + } + } + + public function SetTheme($aTheme) + { + // Util\JpGraphError::RaiseL(15012,$aTheme); + // return; + + if (in_array($aTheme, array_keys($this->themearr))) { + $this->theme = $aTheme; + $this->is_using_plot_theme = true; + } else { + Util\JpGraphError::RaiseL(15001, $aTheme); //("PiePLot::SetTheme() Unknown theme: $aTheme"); + } + } + + public function ExplodeSlice($e, $radius = 20) + { + if (!is_integer($e)) { + Util\JpGraphError::RaiseL(15002); + } + //('Argument to PiePlot::ExplodeSlice() must be an integer'); + $this->explode_radius[$e] = $radius; + } + + public function ExplodeAll($radius = 20) + { + $this->explode_all = true; + $this->explode_r = $radius; + } + + public function Explode($aExplodeArr) + { + if (!is_array($aExplodeArr)) { + Util\JpGraphError::RaiseL(15003); + //("Argument to PiePlot::Explode() must be an array with integer distances."); + } + $this->explode_radius = $aExplodeArr; + } + + public function SetStartAngle($aStart) + { + if ($aStart < 0 || $aStart > 360) { + Util\JpGraphError::RaiseL(15004); //('Slice start angle must be between 0 and 360 degrees.'); + } + if ($aStart == 0) { + $this->startangle = 0; + } else { + $this->startangle = 360 - $aStart; + $this->startangle *= M_PI / 180; + } + } + + // Size in percentage + public function SetSize($aSize) + { + if (($aSize > 0 && $aSize <= 0.5) || ($aSize > 10 && $aSize < 1000)) { + $this->radius = $aSize; + } else { + Util\JpGraphError::RaiseL(15006); + } + + //("PiePlot::SetSize() Radius for pie must either be specified as a fraction [0, 0.5] of the size of the image or as an absolute size in pixels in the range [10, 1000]"); + } + + // Set label arrays + public function SetLegends($aLegend) + { + $this->legends = $aLegend; + } + + // Set text labels for slices + public function SetLabels($aLabels, $aLblPosAdj = "auto") + { + $this->labels = array_reverse($aLabels); + $this->ilabelposadj = $aLblPosAdj; + } + + public function SetLabelPos($aLblPosAdj) + { + $this->ilabelposadj = $aLblPosAdj; + } + + // Should we display actual value or percentage? + public function SetLabelType($aType) + { + if ($aType < 0 || $aType > 2) { + Util\JpGraphError::RaiseL(15008, $aType); + } + + //("PiePlot::SetLabelType() Type for pie plots must be 0 or 1 (not $t)."); + $this->labeltype = $aType; + } + + // Deprecated. + public function SetValueType($aType) + { + $this->SetLabelType($aType); + } + + // Should the circle around a pie plot be displayed + public function ShowBorder($exterior = true, $interior = true) + { + $this->pie_border = $exterior; + $this->pie_interior_border = $interior; + } + + // Setup the legends + public function Legend($graph) + { + $colors = array_keys($graph->img->rgb->rgb_table); + sort($colors); + $ta = $this->themearr[$this->theme]; + $n = count($this->data); + + if ($this->setslicecolors == null) { + $numcolors = count($ta); + if (class_exists('PiePlot3D', false) && ($this instanceof PiePlot3D)) { + $ta = array_reverse(array_slice($ta, 0, $n)); + } + } else { + $this->setslicecolors = array_slice($this->setslicecolors, 0, $n); + $numcolors = count($this->setslicecolors); + if ($graph->pieaa && !($this instanceof PiePlot3D)) { + $this->setslicecolors = array_reverse($this->setslicecolors); + } + } + + $sum = 0; + for ($i = 0; $i < $n; ++$i) { + $sum += $this->data[$i]; + } + + // Bail out with error if the sum is 0 + if ($sum == 0) { + Util\JpGraphError::RaiseL(15009); + } + //("Illegal pie plot. Sum of all data is zero for Pie!"); + + // Make sure we don't plot more values than data points + // (in case the user added more legends than data points) + $n = min(count($this->legends), count($this->data)); + if ($this->legends != "") { + $this->legends = array_reverse(array_slice($this->legends, 0, $n)); + } + for ($i = $n - 1; $i >= 0; --$i) { + $l = $this->legends[$i]; + // Replace possible format with actual values + if (count($this->csimalts) > $i) { + $fmt = $this->csimalts[$i]; + } else { + $fmt = "%d"; // Deafult Alt if no other has been specified + } + if ($this->labeltype == 0) { + $l = sprintf($l, 100 * $this->data[$i] / $sum); + $alt = sprintf($fmt, $this->data[$i]); + + } elseif ($this->labeltype == 1) { + $l = sprintf($l, $this->data[$i]); + $alt = sprintf($fmt, $this->data[$i]); + + } else { + $l = sprintf($l, $this->adjusted_data[$i]); + $alt = sprintf($fmt, $this->adjusted_data[$i]); + } + + if (empty($this->csimwintargets[$i])) { + $wintarg = ''; + } else { + $wintarg = $this->csimwintargets[$i]; + } + + if ($this->setslicecolors == null) { + $graph->legend->Add($l, $colors[$ta[$i % $numcolors]], "", 0, $this->csimtargets[$i], $alt, $wintarg); + } else { + $graph->legend->Add($l, $this->setslicecolors[$i % $numcolors], "", 0, $this->csimtargets[$i], $alt, $wintarg); + } + } + } + + // Adjust the rounded percetage value so that the sum of + // of the pie slices are always 100% + // Using the Hare/Niemeyer method + public function AdjPercentage($aData, $aPrec = 0) + { + $mul = 100; + if ($aPrec > 0 && $aPrec < 3) { + if ($aPrec == 1) { + $mul = 1000; + } else { + $mul = 10000; + } + + } + + $tmp = array(); + $result = array(); + $quote_sum = 0; + $n = count($aData); + for ($i = 0, $sum = 0; $i < $n; ++$i) { + $sum += $aData[$i]; + } + + foreach ($aData as $index => $value) { + $tmp_percentage = $value / $sum * $mul; + $result[$index] = floor($tmp_percentage); + $tmp[$index] = $tmp_percentage - $result[$index]; + $quote_sum += $result[$index]; + } + if ($quote_sum == $mul) { + if ($mul > 100) { + $tmp = $mul / 100; + for ($i = 0; $i < $n; ++$i) { + $result[$i] /= $tmp; + } + } + return $result; + } + arsort($tmp, SORT_NUMERIC); + reset($tmp); + for ($i = 0; $i < $mul - $quote_sum; $i++) { + $result[key($tmp)]++; + next($tmp); + } + if ($mul > 100) { + $tmp = $mul / 100; + for ($i = 0; $i < $n; ++$i) { + $result[$i] /= $tmp; + } + } + return $result; + } + + public function Stroke($img, $aaoption = 0) + { + // aaoption is used to handle antialias + // aaoption == 0 a normal pie + // aaoption == 1 just the body + // aaoption == 2 just the values + + // Explode scaling. If anti alias we scale the image + // twice and we also need to scale the exploding distance + $expscale = $aaoption === 1 ? 2 : 1; + + if ($this->labeltype == 2) { + // Adjust the data so that it will add up to 100% + $this->adjusted_data = $this->AdjPercentage($this->data); + } + + if ($this->use_plot_theme_colors) { + $this->setslicecolors = null; + } + + $colors = array_keys($img->rgb->rgb_table); + sort($colors); + $ta = $this->themearr[$this->theme]; + $n = count($this->data); + + if ($this->setslicecolors == null) { + $numcolors = count($ta); + } else { + // We need to create an array of colors as long as the data + // since we need to reverse it to get the colors in the right order + $numcolors = count($this->setslicecolors); + $i = 2 * $numcolors; + while ($n > $i) { + $this->setslicecolors = array_merge($this->setslicecolors, $this->setslicecolors); + $i += $n; + } + $tt = array_slice($this->setslicecolors, 0, $n % $numcolors); + $this->setslicecolors = array_merge($this->setslicecolors, $tt); + $this->setslicecolors = array_reverse($this->setslicecolors); + } + + // Draw the slices + $sum = 0; + for ($i = 0; $i < $n; ++$i) { + $sum += $this->data[$i]; + } + + // Bail out with error if the sum is 0 + if ($sum == 0) { + Util\JpGraphError::RaiseL(15009); //("Sum of all data is 0 for Pie."); + } + + // Set up the pie-circle + if ($this->radius <= 1) { + $radius = floor($this->radius * min($img->width, $img->height)); + } else { + $radius = $aaoption === 1 ? $this->radius * 2 : $this->radius; + } + + if ($this->posx <= 1 && $this->posx > 0) { + $xc = round($this->posx * $img->width); + } else { + $xc = $this->posx; + } + + if ($this->posy <= 1 && $this->posy > 0) { + $yc = round($this->posy * $img->height); + } else { + $yc = $this->posy; + } + + $n = count($this->data); + + if ($this->explode_all) { + for ($i = 0; $i < $n; ++$i) { + $this->explode_radius[$i] = $this->explode_r; + } + } + + // If we have a shadow and not just drawing the labels + if ($this->ishadowcolor != "" && $aaoption !== 2) { + $accsum = 0; + $angle2 = $this->startangle; + $img->SetColor($this->ishadowcolor); + for ($i = 0; $sum > 0 && $i < $n; ++$i) { + $j = $n - $i - 1; + $d = $this->data[$i]; + $angle1 = $angle2; + $accsum += $d; + $angle2 = $this->startangle + 2 * M_PI * $accsum / $sum; + if (empty($this->explode_radius[$j])) { + $this->explode_radius[$j] = 0; + } + + if ($d < 0.00001) { + continue; + } + + $la = 2 * M_PI - (abs($angle2 - $angle1) / 2.0 + $angle1); + + $xcm = $xc + $this->explode_radius[$j] * cos($la) * $expscale; + $ycm = $yc - $this->explode_radius[$j] * sin($la) * $expscale; + + $xcm += $this->ishadowdrop * $expscale; + $ycm += $this->ishadowdrop * $expscale; + + $_sa = round($angle1 * 180 / M_PI); + $_ea = round($angle2 * 180 / M_PI); + + // The CakeSlice method draws a full circle in case of start angle = end angle + // for pie slices we don't want this behaviour unless we only have one + // slice in the pie in case it is the wanted behaviour + if ($_ea - $_sa > 0.1 || $n == 1) { + $img->CakeSlice($xcm, $ycm, $radius - 1, $radius - 1, + $angle1 * 180 / M_PI, $angle2 * 180 / M_PI, $this->ishadowcolor); + } + } + } + + //-------------------------------------------------------------------------------- + // This is the main loop to draw each cake slice + //-------------------------------------------------------------------------------- + + // Set up the accumulated sum, start angle for first slice and border color + $accsum = 0; + $angle2 = $this->startangle; + $img->SetColor($this->color); + + // Loop though all the slices if there is a pie to draw (sum>0) + // There are n slices in total + for ($i = 0; $sum > 0 && $i < $n; ++$i) { + + // $j is the actual index used for the slice + $j = $n - $i - 1; + + // Make sure we havea valid distance to explode the slice + if (empty($this->explode_radius[$j])) { + $this->explode_radius[$j] = 0; + } + + // The actual numeric value for the slice + $d = $this->data[$i]; + + $angle1 = $angle2; + + // Accumlate the sum + $accsum += $d; + + // The new angle when we add the "size" of this slice + // angle1 is then the start and angle2 the end of this slice + $angle2 = $this->NormAngle($this->startangle + 2 * M_PI * $accsum / $sum); + + // We avoid some trouble by not allowing end angle to be 0, in that case + // we translate to 360 + + // la is used to hold the label angle, which is centered on the slice + if ($angle2 < 0.0001 && $angle1 > 0.0001) { + $this->la[$i] = 2 * M_PI - (abs(2 * M_PI - $angle1) / 2.0 + $angle1); + } elseif ($angle1 > $angle2) { + // The case where the slice crosses the 3 a'clock line + // Remember that the slices are counted clockwise and + // labels are counted counter clockwise so we need to revert with 2 PI + $this->la[$i] = 2 * M_PI - $this->NormAngle($angle1 + ((2 * M_PI - $angle1) + $angle2) / 2); + } else { + $this->la[$i] = 2 * M_PI - (abs($angle2 - $angle1) / 2.0 + $angle1); + } + + // Too avoid rounding problems we skip the slice if it is too small + if ($d < 0.00001) { + continue; + } + + // If the user has specified an array of colors for each slice then use + // that a color otherwise use the theme array (ta) of colors + if ($this->setslicecolors == null) { + $slicecolor = $colors[$ta[$i % $numcolors]]; + } else { + $slicecolor = $this->setslicecolors[$i % $numcolors]; + } + + // $_sa = round($angle1*180/M_PI); + // $_ea = round($angle2*180/M_PI); + // $_la = round($this->la[$i]*180/M_PI); + // echo "Slice#$i: ang1=$_sa , ang2=$_ea, la=$_la, color=$slicecolor
        "; + + // If we have enabled antialias then we don't draw any border so + // make the bordedr color the same as the slice color + if ($this->pie_interior_border && $aaoption === 0) { + $img->SetColor($this->color); + } else { + $img->SetColor($slicecolor); + } + $arccolor = $this->pie_border && $aaoption === 0 ? $this->color : ""; + + // Calculate the x,y coordinates for the base of this slice taking + // the exploded distance into account. Here we use the mid angle as the + // ray of extension and we have the mid angle handy as it is also the + // label angle + $xcm = $xc + $this->explode_radius[$j] * cos($this->la[$i]) * $expscale; + $ycm = $yc - $this->explode_radius[$j] * sin($this->la[$i]) * $expscale; + + // If we are not just drawing the labels then draw this cake slice + if ($aaoption !== 2) { + + $_sa = round($angle1 * 180 / M_PI); + $_ea = round($angle2 * 180 / M_PI); + $_la = round($this->la[$i] * 180 / M_PI); + //echo "[$i] sa=$_sa, ea=$_ea, la[$i]=$_la, (color=$slicecolor)
        "; + + // The CakeSlice method draws a full circle in case of start angle = end angle + // for pie slices we want this in case the slice have a value larger than 99% of the + // total sum + if (abs($_ea - $_sa) >= 1 || $d == $sum) { + $img->CakeSlice($xcm, $ycm, $radius - 1, $radius - 1, $_sa, $_ea, $slicecolor, $arccolor); + } + } + + // If the CSIM is used then make sure we register a CSIM area for this slice as well + if ($this->csimtargets && $aaoption !== 1) { + $this->AddSliceToCSIM($i, $xcm, $ycm, $radius, $angle1, $angle2); + } + } + + // Format the titles for each slice + if ($aaoption !== 2) { + for ($i = 0; $i < $n; ++$i) { + if ($this->labeltype == 0) { + if ($sum != 0) { + $l = 100.0 * $this->data[$i] / $sum; + } else { + $l = 0.0; + } + + } elseif ($this->labeltype == 1) { + $l = $this->data[$i] * 1.0; + } else { + $l = $this->adjusted_data[$i]; + } + if (isset($this->labels[$i]) && is_string($this->labels[$i])) { + $this->labels[$i] = sprintf($this->labels[$i], $l); + } else { + $this->labels[$i] = $l; + } + + } + } + + if ($this->value->show && $aaoption !== 1) { + $this->StrokeAllLabels($img, $xc, $yc, $radius); + } + + // Adjust title position + if ($aaoption !== 1) { + $this->title->SetPos($xc, + $yc - $this->title->GetFontHeight($img) - $radius - $this->title->margin, + "center", "bottom"); + $this->title->Stroke($img); + } + + } + + //--------------- + // PRIVATE METHODS + + public function NormAngle($a) + { + while ($a < 0) { + $a += 2 * M_PI; + } + + while ($a > 2 * M_PI) { + $a -= 2 * M_PI; + } + + return $a; + } + + public function Quadrant($a) + { + $a = $this->NormAngle($a); + if ($a > 0 && $a <= M_PI / 2) { + return 0; + } + + if ($a > M_PI / 2 && $a <= M_PI) { + return 1; + } + + if ($a > M_PI && $a <= 1.5 * M_PI) { + return 2; + } + + if ($a > 1.5 * M_PI) { + return 3; + } + + } + + public function StrokeGuideLabels($img, $xc, $yc, $radius) + { + $n = count($this->labels); + + //----------------------------------------------------------------------- + // Step 1 of the algorithm is to construct a number of clusters + // a cluster is defined as all slices within the same quadrant (almost) + // that has an angular distance less than the treshold + //----------------------------------------------------------------------- + $tresh_hold = 25 * M_PI / 180; // 25 degrees difference to be in a cluster + $incluster = false; // flag if we are currently in a cluster or not + $clusters = array(); // array of clusters + $cidx = -1; // running cluster index + + // Go through all the labels and construct a number of clusters + for ($i = 0; $i < $n - 1; ++$i) { + // Calc the angle distance between two consecutive slices + $a1 = $this->la[$i]; + $a2 = $this->la[$i + 1]; + $q1 = $this->Quadrant($a1); + $q2 = $this->Quadrant($a2); + $diff = abs($a1 - $a2); + if ($diff < $tresh_hold) { + if ($incluster) { + $clusters[$cidx][1]++; + // Each cluster can only cover one quadrant + // Do we cross a quadrant ( and must break the cluster) + if ($q1 != $q2) { + // If we cross a quadrant boundary we normally start a + // new cluster. However we need to take the 12'a clock + // and 6'a clock positions into a special consideration. + // Case 1: WE go from q=1 to q=2 if the last slice on + // the cluster for q=1 is close to 12'a clock and the + // first slice in q=0 is small we extend the previous + // cluster + if ($q1 == 1 && $q2 == 0 && $a2 > (90 - 15) * M_PI / 180) { + if ($i < $n - 2) { + $a3 = $this->la[$i + 2]; + // If there isn't a cluster coming up with the next-next slice + // we extend the previous cluster to cover this slice as well + if (abs($a3 - $a2) >= $tresh_hold) { + $clusters[$cidx][1]++; + $i++; + } + } + } elseif ($q1 == 3 && $q2 == 2 && $a2 > (270 - 15) * M_PI / 180) { + if ($i < $n - 2) { + $a3 = $this->la[$i + 2]; + // If there isn't a cluster coming up with the next-next slice + // we extend the previous cluster to cover this slice as well + if (abs($a3 - $a2) >= $tresh_hold) { + $clusters[$cidx][1]++; + $i++; + } + } + } + + if ($q1 == 2 && $q2 == 1 && $a2 > (180 - 15) * M_PI / 180) { + $clusters[$cidx][1]++; + $i++; + } + + $incluster = false; + } + } elseif ($q1 == $q2) { + $incluster = true; + // Now we have a special case for quadrant 0. If we previously + // have a cluster of one in quadrant 0 we just extend that + // cluster. If we don't do this then we risk that the label + // for the cluster of one will cross the guide-line + if ($q1 == 0 && $cidx > -1 && + $clusters[$cidx][1] == 1 && + $this->Quadrant($this->la[$clusters[$cidx][0]]) == 0) { + $clusters[$cidx][1]++; + } else { + $cidx++; + $clusters[$cidx][0] = $i; + $clusters[$cidx][1] = 1; + } + } else { + // Create a "cluster" of one since we are just crossing + // a quadrant + $cidx++; + $clusters[$cidx][0] = $i; + $clusters[$cidx][1] = 1; + } + } else { + if ($incluster) { + // Add the last slice + $clusters[$cidx][1]++; + $incluster = false; + } else { + // Create a "cluster" of one + $cidx++; + $clusters[$cidx][0] = $i; + $clusters[$cidx][1] = 1; + } + } + } + // Handle the very last slice + if ($incluster) { + $clusters[$cidx][1]++; + } else { + // Create a "cluster" of one + $cidx++; + $clusters[$cidx][0] = $i; + $clusters[$cidx][1] = 1; + } + + /* + if( true ) { + // Debug printout in labels + for( $i=0; $i <= $cidx; ++$i ) { + for( $j=0; $j < $clusters[$i][1]; ++$j ) { + $a = $this->la[$clusters[$i][0]+$j]; + $aa = round($a*180/M_PI); + $q = $this->Quadrant($a); + $this->labels[$clusters[$i][0]+$j]="[$q:$aa] $i:$j"; + } + } + } + */ + + //----------------------------------------------------------------------- + // Step 2 of the algorithm is use the clusters and draw the labels + // and guidelines + //----------------------------------------------------------------------- + + // We use the font height as the base factor for how far we need to + // spread the labels in the Y-direction. + $this->value->ApplyFont($img); + $fh = $img->GetFontHeight(); + $origvstep = $fh * $this->iGuideVFactor; + $this->value->SetMargin(0); + + // Number of clusters found + $nc = count($clusters); + + // Walk through all the clusters + for ($i = 0; $i < $nc; ++$i) { + + // Start angle and number of slices in this cluster + $csize = $clusters[$i][1]; + $a = $this->la[$clusters[$i][0]]; + $q = $this->Quadrant($a); + + // Now set up the start and end conditions to make sure that + // in each cluster we walk through the all the slices starting with the slice + // closest to the equator. Since all slices are numbered clockwise from "3'a clock" + // we have different conditions depending on in which quadrant the slice lies within. + if ($q == 0) { + $start = $csize - 1; + $idx = $start; + $step = -1; + $vstep = -$origvstep; + } elseif ($q == 1) { + $start = 0; + $idx = $start; + $step = 1; + $vstep = -$origvstep; + } elseif ($q == 2) { + $start = $csize - 1; + $idx = $start; + $step = -1; + $vstep = $origvstep; + } elseif ($q == 3) { + $start = 0; + $idx = $start; + $step = 1; + $vstep = $origvstep; + } + + // Walk through all slices within this cluster + for ($j = 0; $j < $csize; ++$j) { + // Now adjust the position of the labels in each cluster starting + // with the slice that is closest to the equator of the pie + $a = $this->la[$clusters[$i][0] + $idx]; + + // Guide line start in the center of the arc of the slice + $r = $radius + $this->explode_radius[$n - 1 - ($clusters[$i][0] + $idx)]; + $x = round($r * cos($a) + $xc); + $y = round($yc - $r * sin($a)); + + // The distance from the arc depends on chosen font and the "R-Factor" + $r += $fh * $this->iGuideLineRFactor; + + // Should the labels be placed curved along the pie or in straight columns + // outside the pie? + if ($this->iGuideLineCurve) { + $xt = round($r * cos($a) + $xc); + } + + // If this is the first slice in the cluster we need some first time + // proessing + if ($idx == $start) { + if (!$this->iGuideLineCurve) { + $xt = round($r * cos($a) + $xc); + } + + $yt = round($yc - $r * sin($a)); + + // Some special consideration in case this cluster starts + // in quadrant 1 or 3 very close to the "equator" (< 20 degrees) + // and the previous clusters last slice is within the tolerance. + // In that case we add a font height to this labels Y-position + // so it doesn't collide with + // the slice in the previous cluster + $prevcluster = ($i + ($nc - 1)) % $nc; + $previdx = $clusters[$prevcluster][0] + $clusters[$prevcluster][1] - 1; + if ($q == 1 && $a > 160 * M_PI / 180) { + // Get the angle for the previous clusters last slice + $diff = abs($a - $this->la[$previdx]); + if ($diff < $tresh_hold) { + $yt -= $fh; + } + } elseif ($q == 3 && $a > 340 * M_PI / 180) { + // We need to subtract 360 to compare angle distance between + // q=0 and q=3 + $diff = abs($a - $this->la[$previdx] - 360 * M_PI / 180); + if ($diff < $tresh_hold) { + $yt += $fh; + } + } + + } else { + // The step is at minimum $vstep but if the slices are relatively large + // we make sure that we add at least a step that corresponds to the vertical + // distance between the centers at the arc on the slice + $prev_a = $this->la[$clusters[$i][0] + ($idx - $step)]; + $dy = abs($radius * (sin($a) - sin($prev_a)) * 1.2); + if ($vstep > 0) { + $yt += max($vstep, $dy); + } else { + $yt += min($vstep, -$dy); + } + + } + + $label = $this->labels[$clusters[$i][0] + $idx]; + + if ($csize == 1) { + // A "meta" cluster with only one slice + $r = $radius + $this->explode_radius[$n - 1 - ($clusters[$i][0] + $idx)]; + $rr = $r + $img->GetFontHeight() / 2; + $xt = round($rr * cos($a) + $xc); + $yt = round($yc - $rr * sin($a)); + $this->StrokeLabel($label, $img, $xc, $yc, $a, $r); + if ($this->iShowGuideLineForSingle) { + $this->guideline->Stroke($img, $x, $y, $xt, $yt); + } + + } else { + $this->guideline->Stroke($img, $x, $y, $xt, $yt); + if ($q == 1 || $q == 2) { + // Left side of Pie + $this->guideline->Stroke($img, $xt, $yt, $xt - $this->guidelinemargin, $yt); + $lbladj = -$this->guidelinemargin - 5; + $this->value->halign = "right"; + $this->value->valign = "center"; + } else { + // Right side of pie + $this->guideline->Stroke($img, $xt, $yt, $xt + $this->guidelinemargin, $yt); + $lbladj = $this->guidelinemargin + 5; + $this->value->halign = "left"; + $this->value->valign = "center"; + } + $this->value->Stroke($img, $label, $xt + $lbladj, $yt); + } + + // Udate idx to point to next slice in the cluster to process + $idx += $step; + } + } + } + + public function StrokeAllLabels($img, $xc, $yc, $radius) + { + // First normalize all angles for labels + $n = count($this->la); + for ($i = 0; $i < $n; ++$i) { + $this->la[$i] = $this->NormAngle($this->la[$i]); + } + if ($this->guideline->iShow) { + $this->StrokeGuideLabels($img, $xc, $yc, $radius); + } else { + $n = count($this->labels); + for ($i = 0; $i < $n; ++$i) { + $this->StrokeLabel($this->labels[$i], $img, $xc, $yc, + $this->la[$i], + $radius + $this->explode_radius[$n - 1 - $i]); + } + } + } + + // Position the labels of each slice + public function StrokeLabel($label, $img, $xc, $yc, $a, $r) + { + + // Default value + if ($this->ilabelposadj === 'auto') { + $this->ilabelposadj = 0.65; + } + + // We position the values diferently depending on if they are inside + // or outside the pie + if ($this->ilabelposadj < 1.0) { + + $this->value->SetAlign('center', 'center'); + $this->value->margin = 0; + + $xt = round($this->ilabelposadj * $r * cos($a) + $xc); + $yt = round($yc - $this->ilabelposadj * $r * sin($a)); + + $this->value->Stroke($img, $label, $xt, $yt); + } else { + + $this->value->halign = "left"; + $this->value->valign = "top"; + $this->value->margin = 0; + + // Position the axis title. + // dx, dy is the offset from the top left corner of the bounding box that sorrounds the text + // that intersects with the extension of the corresponding axis. The code looks a little + // bit messy but this is really the only way of having a reasonable position of the + // axis titles. + $this->value->ApplyFont($img); + $h = $img->GetTextHeight($label); + // For numeric values the format of the display value + // must be taken into account + if (is_numeric($label)) { + if ($label > 0) { + $w = $img->GetTextWidth(sprintf($this->value->format, $label)); + } else { + $w = $img->GetTextWidth(sprintf($this->value->negformat, $label)); + } + + } else { + $w = $img->GetTextWidth($label); + } + + if ($this->ilabelposadj > 1.0 && $this->ilabelposadj < 5.0) { + $r *= $this->ilabelposadj; + } + + $r += $img->GetFontHeight() / 1.5; + + $xt = round($r * cos($a) + $xc); + $yt = round($yc - $r * sin($a)); + + // Normalize angle + while ($a < 0) { + $a += 2 * M_PI; + } + + while ($a > 2 * M_PI) { + $a -= 2 * M_PI; + } + + if ($a >= 7 * M_PI / 4 || $a <= M_PI / 4) { + $dx = 0; + } + + if ($a >= M_PI / 4 && $a <= 3 * M_PI / 4) { + $dx = ($a - M_PI / 4) * 2 / M_PI; + } + + if ($a >= 3 * M_PI / 4 && $a <= 5 * M_PI / 4) { + $dx = 1; + } + + if ($a >= 5 * M_PI / 4 && $a <= 7 * M_PI / 4) { + $dx = (1 - ($a - M_PI * 5 / 4) * 2 / M_PI); + } + + if ($a >= 7 * M_PI / 4) { + $dy = (($a - M_PI) - 3 * M_PI / 4) * 2 / M_PI; + } + + if ($a <= M_PI / 4) { + $dy = (1 - $a * 2 / M_PI); + } + + if ($a >= M_PI / 4 && $a <= 3 * M_PI / 4) { + $dy = 1; + } + + if ($a >= 3 * M_PI / 4 && $a <= 5 * M_PI / 4) { + $dy = (1 - ($a - 3 * M_PI / 4) * 2 / M_PI); + } + + if ($a >= 5 * M_PI / 4 && $a <= 7 * M_PI / 4) { + $dy = 0; + } + + $this->value->Stroke($img, $label, $xt - $dx * $w, $yt - $dy * $h); + } + } + + public function UsePlotThemeColors($flag = true) + { + $this->use_plot_theme_colors = $flag; + } +} // Class + +/* EOF */ diff --git a/vendor/amenadiel/jpgraph/src/plot/PiePlot3D.php b/vendor/amenadiel/jpgraph/src/plot/PiePlot3D.php new file mode 100644 index 0000000000..670b1ecb88 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/plot/PiePlot3D.php @@ -0,0 +1,1002 @@ +radius = 0.5; + $this->data = $data; + $this->title = new Text\Text(""); + $this->title->SetFont(FF_FONT1, FS_BOLD); + $this->value = new DisplayValue(); + $this->value->Show(); + $this->value->SetFormat('%.0f%%'); + } + + //--------------- + // PUBLIC METHODS + + // Set label arrays + public function SetLegends($aLegend) + { + $this->legends = array_reverse(array_slice($aLegend, 0, count($this->data))); + } + + public function SetSliceColors($aColors) + { + $this->setslicecolors = $aColors; + } + + public function Legend($aGraph) + { + parent::Legend($aGraph); + $aGraph->legend->txtcol = array_reverse($aGraph->legend->txtcol); + } + + public function SetCSIMTargets($aTargets, $aAlts = '', $aWinTargets = '') + { + $this->csimtargets = $aTargets; + $this->csimwintargets = $aWinTargets; + $this->csimalts = $aAlts; + } + + // Should the slices be separated by a line? If color is specified as "" no line + // will be used to separate pie slices. + public function SetEdge($aColor = 'black', $aWeight = 1) + { + $this->edgecolor = $aColor; + $this->edgeweight = $aWeight; + } + + // Specify projection angle for 3D in degrees + // Must be between 20 and 70 degrees + public function SetAngle($a) + { + if ($a < 5 || $a > 90) { + Util\JpGraphError::RaiseL(14002); + //("PiePlot3D::SetAngle() 3D Pie projection angle must be between 5 and 85 degrees."); + } else { + $this->angle = $a; + } + } + + public function Add3DSliceToCSIM($i, $xc, $yc, $height, $width, $thick, $sa, $ea) + { + //Slice number, ellipse centre (x,y), height, width, start angle, end angle + + $sa *= M_PI / 180; + $ea *= M_PI / 180; + + //add coordinates of the centre to the map + $coords = "$xc, $yc"; + + //add coordinates of the first point on the arc to the map + $xp = floor($width * cos($sa) / 2 + $xc); + $yp = floor($yc - $height * sin($sa) / 2); + $coords .= ", $xp, $yp"; + + //If on the front half, add the thickness offset + if ($sa >= M_PI && $sa <= 2 * M_PI * 1.01) { + $yp = floor($yp + $thick); + $coords .= ", $xp, $yp"; + } + + //add coordinates every 0.2 radians + $a = $sa + 0.2; + while ($a < $ea) { + $xp = floor($width * cos($a) / 2 + $xc); + if ($a >= M_PI && $a <= 2 * M_PI * 1.01) { + $yp = floor($yc - ($height * sin($a) / 2) + $thick); + } else { + $yp = floor($yc - $height * sin($a) / 2); + } + $coords .= ", $xp, $yp"; + $a += 0.2; + } + + //Add the last point on the arc + $xp = floor($width * cos($ea) / 2 + $xc); + $yp = floor($yc - $height * sin($ea) / 2); + + if ($ea >= M_PI && $ea <= 2 * M_PI * 1.01) { + $coords .= ", $xp, " . floor($yp + $thick); + } + $coords .= ", $xp, $yp"; + $alt = ''; + + if (!empty($this->csimtargets[$i])) { + $this->csimareas .= "csimtargets[$i] . "\""; + + if (!empty($this->csimwintargets[$i])) { + $this->csimareas .= " target=\"" . $this->csimwintargets[$i] . "\" "; + } + + if (!empty($this->csimalts[$i])) { + $tmp = sprintf($this->csimalts[$i], $this->data[$i]); + $this->csimareas .= "alt=\"$tmp\" title=\"$tmp\" "; + } + $this->csimareas .= " />\n"; + } + + } + + public function SetLabels($aLabels, $aLblPosAdj = "auto") + { + $this->labels = $aLabels; + $this->ilabelposadj = $aLblPosAdj; + } + + // Distance from the pie to the labels + public function SetLabelMargin($m) + { + $this->value->SetMargin($m); + } + + // Show a thin line from the pie to the label for a specific slice + public function ShowLabelHint($f = true) + { + $this->showlabelhint = $f; + } + + // Set color of hint line to label for each slice + public function SetLabelHintColor($c) + { + $this->labelhintcolor = $c; + } + + public function SetHeight($aHeight) + { + $this->iThickness = $aHeight; + } + + // Normalize Angle between 0-360 + public function NormAngle($a) + { + // Normalize anle to 0 to 2M_PI + // + if ($a > 0) { + while ($a > 360) { + $a -= 360; + } + + } else { + while ($a < 0) { + $a += 360; + } + + } + if ($a < 0) { + $a = 360 + $a; + } + + if ($a == 360) { + $a = 0; + } + + return $a; + } + + // Draw one 3D pie slice at position ($xc,$yc) with height $z + public function Pie3DSlice($img, $xc, $yc, $w, $h, $sa, $ea, $z, $fillcolor, $shadow = 0.65) + { + + // Due to the way the 3D Pie algorithm works we are + // guaranteed that any slice we get into this method + // belongs to either the left or right side of the + // pie ellipse. Hence, no slice will cross 90 or 270 + // point. + if (($sa < 90 && $ea > 90) || (($sa > 90 && $sa < 270) && $ea > 270)) { + Util\JpGraphError::RaiseL(14003); //('Internal assertion failed. Pie3D::Pie3DSlice'); + exit(1); + } + + $p[] = array(); + + // Setup pre-calculated values + $rsa = $sa / 180 * M_PI; // to Rad + $rea = $ea / 180 * M_PI; // to Rad + $sinsa = sin($rsa); + $cossa = cos($rsa); + $sinea = sin($rea); + $cosea = cos($rea); + + // p[] is the points for the overall slice and + // pt[] is the points for the top pie + + // Angular step when approximating the arc with a polygon train. + $step = 0.05; + + if ($sa >= 270) { + if ($ea > 360 || ($ea > 0 && $ea <= 90)) { + if ($ea > 0 && $ea <= 90) { + // Adjust angle to simplify conditions in loops + $rea += 2 * M_PI; + } + + $p = array($xc, $yc, $xc, $yc + $z, + $xc + $w * $cossa, $z + $yc - $h * $sinsa); + $pt = array($xc, $yc, $xc + $w * $cossa, $yc - $h * $sinsa); + + for ($a = $rsa; $a < 2 * M_PI; $a += $step) { + $tca = cos($a); + $tsa = sin($a); + $p[] = $xc + $w * $tca; + $p[] = $z + $yc - $h * $tsa; + $pt[] = $xc + $w * $tca; + $pt[] = $yc - $h * $tsa; + } + + $pt[] = $xc + $w; + $pt[] = $yc; + + $p[] = $xc + $w; + $p[] = $z + $yc; + $p[] = $xc + $w; + $p[] = $yc; + $p[] = $xc; + $p[] = $yc; + + for ($a = 2 * M_PI + $step; $a < $rea; $a += $step) { + $pt[] = $xc + $w * cos($a); + $pt[] = $yc - $h * sin($a); + } + + $pt[] = $xc + $w * $cosea; + $pt[] = $yc - $h * $sinea; + $pt[] = $xc; + $pt[] = $yc; + + } else { + $p = array($xc, $yc, $xc, $yc + $z, + $xc + $w * $cossa, $z + $yc - $h * $sinsa); + $pt = array($xc, $yc, $xc + $w * $cossa, $yc - $h * $sinsa); + + $rea = $rea == 0.0 ? 2 * M_PI : $rea; + for ($a = $rsa; $a < $rea; $a += $step) { + $tca = cos($a); + $tsa = sin($a); + $p[] = $xc + $w * $tca; + $p[] = $z + $yc - $h * $tsa; + $pt[] = $xc + $w * $tca; + $pt[] = $yc - $h * $tsa; + } + + $pt[] = $xc + $w * $cosea; + $pt[] = $yc - $h * $sinea; + $pt[] = $xc; + $pt[] = $yc; + + $p[] = $xc + $w * $cosea; + $p[] = $z + $yc - $h * $sinea; + $p[] = $xc + $w * $cosea; + $p[] = $yc - $h * $sinea; + $p[] = $xc; + $p[] = $yc; + } + } elseif ($sa >= 180) { + $p = array($xc, $yc, $xc, $yc + $z, $xc + $w * $cosea, $z + $yc - $h * $sinea); + $pt = array($xc, $yc, $xc + $w * $cosea, $yc - $h * $sinea); + + for ($a = $rea; $a > $rsa; $a -= $step) { + $tca = cos($a); + $tsa = sin($a); + $p[] = $xc + $w * $tca; + $p[] = $z + $yc - $h * $tsa; + $pt[] = $xc + $w * $tca; + $pt[] = $yc - $h * $tsa; + } + + $pt[] = $xc + $w * $cossa; + $pt[] = $yc - $h * $sinsa; + $pt[] = $xc; + $pt[] = $yc; + + $p[] = $xc + $w * $cossa; + $p[] = $z + $yc - $h * $sinsa; + $p[] = $xc + $w * $cossa; + $p[] = $yc - $h * $sinsa; + $p[] = $xc; + $p[] = $yc; + + } elseif ($sa >= 90) { + if ($ea > 180) { + $p = array($xc, $yc, $xc, $yc + $z, $xc + $w * $cosea, $z + $yc - $h * $sinea); + $pt = array($xc, $yc, $xc + $w * $cosea, $yc - $h * $sinea); + + for ($a = $rea; $a > M_PI; $a -= $step) { + $tca = cos($a); + $tsa = sin($a); + $p[] = $xc + $w * $tca; + $p[] = $z + $yc - $h * $tsa; + $pt[] = $xc + $w * $tca; + $pt[] = $yc - $h * $tsa; + } + + $p[] = $xc - $w; + $p[] = $z + $yc; + $p[] = $xc - $w; + $p[] = $yc; + $p[] = $xc; + $p[] = $yc; + + $pt[] = $xc - $w; + $pt[] = $z + $yc; + $pt[] = $xc - $w; + $pt[] = $yc; + + for ($a = M_PI - $step; $a > $rsa; $a -= $step) { + $pt[] = $xc + $w * cos($a); + $pt[] = $yc - $h * sin($a); + } + + $pt[] = $xc + $w * $cossa; + $pt[] = $yc - $h * $sinsa; + $pt[] = $xc; + $pt[] = $yc; + + } else { + // $sa >= 90 && $ea <= 180 + $p = array($xc, $yc, $xc, $yc + $z, + $xc + $w * $cosea, $z + $yc - $h * $sinea, + $xc + $w * $cosea, $yc - $h * $sinea, + $xc, $yc); + + $pt = array($xc, $yc, $xc + $w * $cosea, $yc - $h * $sinea); + + for ($a = $rea; $a > $rsa; $a -= $step) { + $pt[] = $xc + $w * cos($a); + $pt[] = $yc - $h * sin($a); + } + + $pt[] = $xc + $w * $cossa; + $pt[] = $yc - $h * $sinsa; + $pt[] = $xc; + $pt[] = $yc; + + } + } else { + // sa > 0 && ea < 90 + + $p = array($xc, $yc, $xc, $yc + $z, + $xc + $w * $cossa, $z + $yc - $h * $sinsa, + $xc + $w * $cossa, $yc - $h * $sinsa, + $xc, $yc); + + $pt = array($xc, $yc, $xc + $w * $cossa, $yc - $h * $sinsa); + + for ($a = $rsa; $a < $rea; $a += $step) { + $pt[] = $xc + $w * cos($a); + $pt[] = $yc - $h * sin($a); + } + + $pt[] = $xc + $w * $cosea; + $pt[] = $yc - $h * $sinea; + $pt[] = $xc; + $pt[] = $yc; + } + + $img->PushColor($fillcolor . ":" . $shadow); + $img->FilledPolygon($p); + $img->PopColor(); + + $img->PushColor($fillcolor); + $img->FilledPolygon($pt); + $img->PopColor(); + } + + public function SetStartAngle($aStart) + { + if ($aStart < 0 || $aStart > 360) { + Util\JpGraphError::RaiseL(14004); //('Slice start angle must be between 0 and 360 degrees.'); + } + $this->startangle = $aStart; + } + + // Draw a 3D Pie + public function Pie3D($aaoption, $img, $data, $colors, $xc, $yc, $d, $angle, $z, + $shadow = 0.65, $startangle = 0, $edgecolor = "", $edgeweight = 1) { + + //--------------------------------------------------------------------------- + // As usual the algorithm get more complicated than I originally + // envisioned. I believe that this is as simple as it is possible + // to do it with the features I want. It's a good exercise to start + // thinking on how to do this to convince your self that all this + // is really needed for the general case. + // + // The algorithm two draw 3D pies without "real 3D" is done in + // two steps. + // First imagine the pie cut in half through a thought line between + // 12'a clock and 6'a clock. It now easy to imagine that we can plot + // the individual slices for each half by starting with the topmost + // pie slice and continue down to 6'a clock. + // + // In the algortithm this is done in three principal steps + // Step 1. Do the knife cut to ensure by splitting slices that extends + // over the cut line. This is done by splitting the original slices into + // upto 3 subslices. + // Step 2. Find the top slice for each half + // Step 3. Draw the slices from top to bottom + // + // The thing that slightly complicates this scheme with all the + // angle comparisons below is that we can have an arbitrary start + // angle so we must take into account the different equivalence classes. + // For the same reason we must walk through the angle array in a + // modulo fashion. + // + // Limitations of algorithm: + // * A small exploded slice which crosses the 270 degree point + // will get slightly nagged close to the center due to the fact that + // we print the slices in Z-order and that the slice left part + // get printed first and might get slightly nagged by a larger + // slice on the right side just before the right part of the small + // slice. Not a major problem though. + //--------------------------------------------------------------------------- + + // Determine the height of the ellippse which gives an + // indication of the inclination angle + $h = ($angle / 90.0) * $d; + $sum = 0; + for ($i = 0; $i < count($data); ++$i) { + $sum += $data[$i]; + } + + // Special optimization + if ($sum == 0) { + return; + } + + if ($this->labeltype == 2) { + $this->adjusted_data = $this->AdjPercentage($data); + } + + // Setup the start + $accsum = 0; + $a = $startangle; + $a = $this->NormAngle($a); + + // + // Step 1 . Split all slices that crosses 90 or 270 + // + $idx = 0; + $adjexplode = array(); + $numcolors = count($colors); + for ($i = 0; $i < count($data); ++$i, ++$idx) { + $da = $data[$i] / $sum * 360; + + if (empty($this->explode_radius[$i])) { + $this->explode_radius[$i] = 0; + } + + $expscale = 1; + if ($aaoption == 1) { + $expscale = 2; + } + + $la = $a + $da / 2; + $explode = array($xc + $this->explode_radius[$i] * cos($la * M_PI / 180) * $expscale, + $yc - $this->explode_radius[$i] * sin($la * M_PI / 180) * ($h / $d) * $expscale); + $adjexplode[$idx] = $explode; + $labeldata[$i] = array($la, $explode[0], $explode[1]); + $originalangles[$i] = array($a, $a + $da); + + $ne = $this->NormAngle($a + $da); + if ($da <= 180) { + // If the slice size is <= 90 it can at maximum cut across + // one boundary (either 90 or 270) where it needs to be split + $split = -1; // no split + if (($da <= 90 && ($a <= 90 && $ne > 90)) || + (($da <= 180 && $da > 90) && (($a < 90 || $a >= 270) && $ne > 90))) { + $split = 90; + } elseif (($da <= 90 && ($a <= 270 && $ne > 270)) || + (($da <= 180 && $da > 90) && ($a >= 90 && $a < 270 && ($a + $da) > 270))) { + $split = 270; + } + if ($split > 0) { + // split in two + $angles[$idx] = array($a, $split); + $adjcolors[$idx] = $colors[$i % $numcolors]; + $adjexplode[$idx] = $explode; + $angles[++$idx] = array($split, $ne); + $adjcolors[$idx] = $colors[$i % $numcolors]; + $adjexplode[$idx] = $explode; + } else { + // no split + $angles[$idx] = array($a, $ne); + $adjcolors[$idx] = $colors[$i % $numcolors]; + $adjexplode[$idx] = $explode; + } + } else { + // da>180 + // Slice may, depending on position, cross one or two + // bonudaries + + if ($a < 90) { + $split = 90; + } elseif ($a <= 270) { + $split = 270; + } else { + $split = 90; + } + + $angles[$idx] = array($a, $split); + $adjcolors[$idx] = $colors[$i % $numcolors]; + $adjexplode[$idx] = $explode; + //if( $a+$da > 360-$split ) { + // For slices larger than 270 degrees we might cross + // another boundary as well. This means that we must + // split the slice further. The comparison gets a little + // bit complicated since we must take into accound that + // a pie might have a startangle >0 and hence a slice might + // wrap around the 0 angle. + // Three cases: + // a) Slice starts before 90 and hence gets a split=90, but + // we must also check if we need to split at 270 + // b) Slice starts after 90 but before 270 and slices + // crosses 90 (after a wrap around of 0) + // c) If start is > 270 (hence the firstr split is at 90) + // and the slice is so large that it goes all the way + // around 270. + if (($a < 90 && ($a + $da > 270)) || ($a > 90 && $a <= 270 && ($a + $da > 360 + 90)) || ($a > 270 && $this->NormAngle($a + $da) > 270)) { + $angles[++$idx] = array($split, 360 - $split); + $adjcolors[$idx] = $colors[$i % $numcolors]; + $adjexplode[$idx] = $explode; + $angles[++$idx] = array(360 - $split, $ne); + $adjcolors[$idx] = $colors[$i % $numcolors]; + $adjexplode[$idx] = $explode; + } else { + // Just a simple split to the previous decided + // angle. + $angles[++$idx] = array($split, $ne); + $adjcolors[$idx] = $colors[$i % $numcolors]; + $adjexplode[$idx] = $explode; + } + } + $a += $da; + $a = $this->NormAngle($a); + } + + // Total number of slices + $n = count($angles); + + for ($i = 0; $i < $n; ++$i) { + list($dbgs, $dbge) = $angles[$i]; + } + + // + // Step 2. Find start index (first pie that starts in upper left quadrant) + // + $minval = $angles[0][0]; + $min = 0; + for ($i = 0; $i < $n; ++$i) { + if ($angles[$i][0] < $minval) { + $minval = $angles[$i][0]; + $min = $i; + } + } + $j = $min; + $cnt = 0; + while ($angles[$j][1] <= 90) { + $j++; + if ($j >= $n) { + $j = 0; + } + if ($cnt > $n) { + Util\JpGraphError::RaiseL(14005); + //("Pie3D Internal error (#1). Trying to wrap twice when looking for start index"); + } + ++$cnt; + } + $start = $j; + + // + // Step 3. Print slices in z-order + // + $cnt = 0; + + // First stroke all the slices between 90 and 270 (left half circle) + // counterclockwise + + while ($angles[$j][0] < 270 && $aaoption !== 2) { + + list($x, $y) = $adjexplode[$j]; + + $this->Pie3DSlice($img, $x, $y, $d, $h, $angles[$j][0], $angles[$j][1], + $z, $adjcolors[$j], $shadow); + + $last = array($x, $y, $j); + + $j++; + if ($j >= $n) { + $j = 0; + } + + if ($cnt > $n) { + Util\JpGraphError::RaiseL(14006); + //("Pie3D Internal Error: Z-Sorting algorithm for 3D Pies is not working properly (2). Trying to wrap twice while stroking."); + } + ++$cnt; + } + + $slice_left = $n - $cnt; + $j = $start - 1; + if ($j < 0) { + $j = $n - 1; + } + + $cnt = 0; + + // The stroke all slices from 90 to -90 (right half circle) + // clockwise + while ($cnt < $slice_left && $aaoption !== 2) { + + list($x, $y) = $adjexplode[$j]; + + $this->Pie3DSlice($img, $x, $y, $d, $h, $angles[$j][0], $angles[$j][1], + $z, $adjcolors[$j], $shadow); + $j--; + if ($cnt > $n) { + Util\JpGraphError::RaiseL(14006); + //("Pie3D Internal Error: Z-Sorting algorithm for 3D Pies is not working properly (2). Trying to wrap twice while stroking."); + } + if ($j < 0) { + $j = $n - 1; + } + + $cnt++; + } + + // Now do a special thing. Stroke the last slice on the left + // halfcircle one more time. This is needed in the case where + // the slice close to 270 have been exploded. In that case the + // part of the slice close to the center of the pie might be + // slightly nagged. + if ($aaoption !== 2) { + $this->Pie3DSlice($img, $last[0], $last[1], $d, $h, $angles[$last[2]][0], + $angles[$last[2]][1], $z, $adjcolors[$last[2]], $shadow); + } + + if ($aaoption !== 1) { + // Now print possible labels and add csim + $this->value->ApplyFont($img); + $margin = $img->GetFontHeight() / 2 + $this->value->margin; + for ($i = 0; $i < count($data); ++$i) { + $la = $labeldata[$i][0]; + $x = $labeldata[$i][1] + cos($la * M_PI / 180) * ($d + $margin) * $this->ilabelposadj; + $y = $labeldata[$i][2] - sin($la * M_PI / 180) * ($h + $margin) * $this->ilabelposadj; + if ($this->ilabelposadj >= 1.0) { + if ($la > 180 && $la < 360) { + $y += $z; + } + + } + if ($this->labeltype == 0) { + if ($sum > 0) { + $l = 100 * $data[$i] / $sum; + } else { + $l = 0; + } + + } elseif ($this->labeltype == 1) { + $l = $data[$i]; + } else { + $l = $this->adjusted_data[$i]; + } + if (isset($this->labels[$i]) && is_string($this->labels[$i])) { + $l = sprintf($this->labels[$i], $l); + } + + $this->StrokeLabels($l, $img, $labeldata[$i][0] * M_PI / 180, $x, $y, $z); + + $this->Add3DSliceToCSIM($i, $labeldata[$i][1], $labeldata[$i][2], $h * 2, $d * 2, $z, + $originalangles[$i][0], $originalangles[$i][1]); + } + } + + // + // Finally add potential lines in pie + // + + if ($edgecolor == "" || $aaoption !== 0) { + return; + } + + $accsum = 0; + $a = $startangle; + $a = $this->NormAngle($a); + + $a *= M_PI / 180.0; + + $idx = 0; + $img->PushColor($edgecolor); + $img->SetLineWeight($edgeweight); + + $fulledge = true; + for ($i = 0; $i < count($data) && $fulledge; ++$i) { + if (empty($this->explode_radius[$i])) { + $this->explode_radius[$i] = 0; + } + if ($this->explode_radius[$i] > 0) { + $fulledge = false; + } + } + + for ($i = 0; $i < count($data); ++$i, ++$idx) { + + $da = $data[$i] / $sum * 2 * M_PI; + $this->StrokeFullSliceFrame($img, $xc, $yc, $a, $a + $da, $d, $h, $z, $edgecolor, + $this->explode_radius[$i], $fulledge); + $a += $da; + } + $img->PopColor(); + } + + public function StrokeFullSliceFrame($img, $xc, $yc, $sa, $ea, $w, $h, $z, $edgecolor, $exploderadius, $fulledge) + { + $step = 0.02; + + if ($exploderadius > 0) { + $la = ($sa + $ea) / 2; + $xc += $exploderadius * cos($la); + $yc -= $exploderadius * sin($la) * ($h / $w); + + } + + $p = array($xc, $yc, $xc + $w * cos($sa), $yc - $h * sin($sa)); + + for ($a = $sa; $a < $ea; $a += $step) { + $p[] = $xc + $w * cos($a); + $p[] = $yc - $h * sin($a); + } + + $p[] = $xc + $w * cos($ea); + $p[] = $yc - $h * sin($ea); + $p[] = $xc; + $p[] = $yc; + + $img->SetColor($edgecolor); + $img->Polygon($p); + + // Unfortunately we can't really draw the full edge around the whole of + // of the slice if any of the slices are exploded. The reason is that + // this algorithm is to simply. There are cases where the edges will + // "overwrite" other slices when they have been exploded. + // Doing the full, proper 3D hidden lines stiff is actually quite + // tricky. So for exploded pies we only draw the top edge. Not perfect + // but the "real" solution is much more complicated. + if ($fulledge && !($sa > 0 && $sa < M_PI && $ea < M_PI)) { + + if ($sa < M_PI && $ea > M_PI) { + $sa = M_PI; + } + + if ($sa < 2 * M_PI && (($ea >= 2 * M_PI) || ($ea > 0 && $ea < $sa))) { + $ea = 2 * M_PI; + } + + if ($sa >= M_PI && $ea <= 2 * M_PI) { + $p = array($xc + $w * cos($sa), $yc - $h * sin($sa), + $xc + $w * cos($sa), $z + $yc - $h * sin($sa)); + + for ($a = $sa + $step; $a < $ea; $a += $step) { + $p[] = $xc + $w * cos($a); + $p[] = $z + $yc - $h * sin($a); + } + $p[] = $xc + $w * cos($ea); + $p[] = $z + $yc - $h * sin($ea); + $p[] = $xc + $w * cos($ea); + $p[] = $yc - $h * sin($ea); + $img->SetColor($edgecolor); + $img->Polygon($p); + } + } + } + + public function Stroke($img, $aaoption = 0) + { + $n = count($this->data); + + // If user hasn't set the colors use the theme array + if ($this->setslicecolors == null) { + $colors = array_keys($img->rgb->rgb_table); + sort($colors); + $idx_a = $this->themearr[$this->theme]; + $ca = array(); + $m = count($idx_a); + for ($i = 0; $i < $m; ++$i) { + $ca[$i] = $colors[$idx_a[$i]]; + } + $ca = array_reverse(array_slice($ca, 0, $n)); + } else { + $ca = $this->setslicecolors; + } + + if ($this->posx <= 1 && $this->posx > 0) { + $xc = round($this->posx * $img->width); + } else { + $xc = $this->posx; + } + + if ($this->posy <= 1 && $this->posy > 0) { + $yc = round($this->posy * $img->height); + } else { + $yc = $this->posy; + } + + if ($this->radius <= 1) { + $width = floor($this->radius * min($img->width, $img->height)); + // Make sure that the pie doesn't overflow the image border + // The 0.9 factor is simply an extra margin to leave some space + // between the pie an the border of the image. + $width = min($width, min($xc * 0.9, ($yc * 90 / $this->angle - $width / 4) * 0.9)); + } else { + $width = $this->radius * ($aaoption === 1 ? 2 : 1); + } + + // Add a sanity check for width + if ($width < 1) { + Util\JpGraphError::RaiseL(14007); //("Width for 3D Pie is 0. Specify a size > 0"); + } + + // Establish a thickness. By default the thickness is a fifth of the + // pie slice width (=pie radius) but since the perspective depends + // on the inclination angle we use some heuristics to make the edge + // slightly thicker the less the angle. + + // Has user specified an absolute thickness? In that case use + // that instead + + if ($this->iThickness) { + $thick = $this->iThickness; + $thick *= ($aaoption === 1 ? 2 : 1); + } else { + $thick = $width / 12; + } + $a = $this->angle; + + if ($a <= 30) { + $thick *= 1.6; + } elseif ($a <= 40) { + $thick *= 1.4; + } elseif ($a <= 50) { + $thick *= 1.2; + } elseif ($a <= 60) { + $thick *= 1.0; + } elseif ($a <= 70) { + $thick *= 0.8; + } elseif ($a <= 80) { + $thick *= 0.7; + } else { + $thick *= 0.6; + } + + $thick = floor($thick); + + if ($this->explode_all) { + for ($i = 0; $i < $n; ++$i) { + $this->explode_radius[$i] = $this->explode_r; + } + + } + + $this->Pie3D($aaoption, $img, $this->data, $ca, $xc, $yc, $width, $this->angle, + $thick, 0.65, $this->startangle, $this->edgecolor, $this->edgeweight); + + // Adjust title position + if ($aaoption != 1) { + $this->title->SetPos($xc, $yc - $this->title->GetFontHeight($img) - $width / 2 - $this->title->margin, "center", "bottom"); + $this->title->Stroke($img); + } + } + + //--------------- + // PRIVATE METHODS + + // Position the labels of each slice + public function StrokeLabels($label, $img, $a, $xp, $yp, $z) + { + $this->value->halign = "left"; + $this->value->valign = "top"; + + // Position the axis title. + // dx, dy is the offset from the top left corner of the bounding box that sorrounds the text + // that intersects with the extension of the corresponding axis. The code looks a little + // bit messy but this is really the only way of having a reasonable position of the + // axis titles. + $this->value->ApplyFont($img); + $h = $img->GetTextHeight($label); + // For numeric values the format of the display value + // must be taken into account + if (is_numeric($label)) { + if ($label >= 0) { + $w = $img->GetTextWidth(sprintf($this->value->format, $label)); + } else { + $w = $img->GetTextWidth(sprintf($this->value->negformat, $label)); + } + } else { + $w = $img->GetTextWidth($label); + } + + while ($a > 2 * M_PI) { + $a -= 2 * M_PI; + } + + if ($a >= 7 * M_PI / 4 || $a <= M_PI / 4) { + $dx = 0; + } + + if ($a >= M_PI / 4 && $a <= 3 * M_PI / 4) { + $dx = ($a - M_PI / 4) * 2 / M_PI; + } + + if ($a >= 3 * M_PI / 4 && $a <= 5 * M_PI / 4) { + $dx = 1; + } + + if ($a >= 5 * M_PI / 4 && $a <= 7 * M_PI / 4) { + $dx = (1 - ($a - M_PI * 5 / 4) * 2 / M_PI); + } + + if ($a >= 7 * M_PI / 4) { + $dy = (($a - M_PI) - 3 * M_PI / 4) * 2 / M_PI; + } + + if ($a <= M_PI / 4) { + $dy = (1 - $a * 2 / M_PI); + } + + if ($a >= M_PI / 4 && $a <= 3 * M_PI / 4) { + $dy = 1; + } + + if ($a >= 3 * M_PI / 4 && $a <= 5 * M_PI / 4) { + $dy = (1 - ($a - 3 * M_PI / 4) * 2 / M_PI); + } + + if ($a >= 5 * M_PI / 4 && $a <= 7 * M_PI / 4) { + $dy = 0; + } + + $x = round($xp - $dx * $w); + $y = round($yp - $dy * $h); + + // Mark anchor point for debugging + /* + $img->SetColor('red'); + $img->Line($xp-10,$yp,$xp+10,$yp); + $img->Line($xp,$yp-10,$xp,$yp+10); + */ + + $oldmargin = $this->value->margin; + $this->value->margin = 0; + $this->value->Stroke($img, $label, $x, $y); + $this->value->margin = $oldmargin; + + } +} // Class + +/* EOF */ diff --git a/vendor/amenadiel/jpgraph/src/plot/PiePlotC.php b/vendor/amenadiel/jpgraph/src/plot/PiePlotC.php new file mode 100644 index 0000000000..dce461c04f --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/plot/PiePlotC.php @@ -0,0 +1,218 @@ +midtitle = new Text\Text(); + $this->midtitle->ParagraphAlign('center'); + } + + public function SetMid($aTitle, $aColor = 'white', $aSize = 0.5) + { + $this->midtitle->Set($aTitle); + + $this->imidsize = $aSize; + $this->imidcolor = $aColor; + } + + public function SetMidTitle($aTitle) + { + $this->midtitle->Set($aTitle); + } + + public function SetMidSize($aSize) + { + $this->imidsize = $aSize; + } + + public function SetMidColor($aColor) + { + $this->imidcolor = $aColor; + } + + public function SetMidCSIM($aTarget, $aAlt = '', $aWinTarget = '') + { + $this->middlecsimtarget = $aTarget; + $this->middlecsimwintarget = $aWinTarget; + $this->middlecsimalt = $aAlt; + } + + public function AddSliceToCSIM($i, $xc, $yc, $radius, $sa, $ea) + { + //Slice number, ellipse centre (x,y), radius, start angle, end angle + while ($sa > 2 * M_PI) { + $sa = $sa - 2 * M_PI; + } + + while ($ea > 2 * M_PI) { + $ea = $ea - 2 * M_PI; + } + + $sa = 2 * M_PI - $sa; + $ea = 2 * M_PI - $ea; + + // Special case when we have only one slice since then both start and end + // angle will be == 0 + if (abs($sa - $ea) < 0.0001) { + $sa = 2 * M_PI; + $ea = 0; + } + + // Add inner circle first point + $xp = floor(($this->imidsize * $radius * cos($ea)) + $xc); + $yp = floor($yc - ($this->imidsize * $radius * sin($ea))); + $coords = "$xp, $yp"; + + //add coordinates every 0.25 radians + $a = $ea + 0.25; + + // If we cross the 360-limit with a slice we need to handle + // the fact that end angle is smaller than start + if ($sa < $ea) { + while ($a <= 2 * M_PI) { + $xp = floor($radius * cos($a) + $xc); + $yp = floor($yc - $radius * sin($a)); + $coords .= ", $xp, $yp"; + $a += 0.25; + } + $a -= 2 * M_PI; + } + + while ($a < $sa) { + $xp = floor(($this->imidsize * $radius * cos($a) + $xc)); + $yp = floor($yc - ($this->imidsize * $radius * sin($a))); + $coords .= ", $xp, $yp"; + $a += 0.25; + } + + // Make sure we end at the last point + $xp = floor(($this->imidsize * $radius * cos($sa) + $xc)); + $yp = floor($yc - ($this->imidsize * $radius * sin($sa))); + $coords .= ", $xp, $yp"; + + // Straight line to outer circle + $xp = floor($radius * cos($sa) + $xc); + $yp = floor($yc - $radius * sin($sa)); + $coords .= ", $xp, $yp"; + + //add coordinates every 0.25 radians + $a = $sa - 0.25; + while ($a > $ea) { + $xp = floor($radius * cos($a) + $xc); + $yp = floor($yc - $radius * sin($a)); + $coords .= ", $xp, $yp"; + $a -= 0.25; + } + + //Add the last point on the arc + $xp = floor($radius * cos($ea) + $xc); + $yp = floor($yc - $radius * sin($ea)); + $coords .= ", $xp, $yp"; + + // Close the arc + $xp = floor(($this->imidsize * $radius * cos($ea)) + $xc); + $yp = floor($yc - ($this->imidsize * $radius * sin($ea))); + $coords .= ", $xp, $yp"; + + if (!empty($this->csimtargets[$i])) { + $this->csimareas .= "csimtargets[$i] . "\""; + if (!empty($this->csimwintargets[$i])) { + $this->csimareas .= " target=\"" . $this->csimwintargets[$i] . "\" "; + } + if (!empty($this->csimalts[$i])) { + $tmp = sprintf($this->csimalts[$i], $this->data[$i]); + $this->csimareas .= " title=\"$tmp\" alt=\"$tmp\" "; + } + $this->csimareas .= " />\n"; + } + } + + public function Stroke($img, $aaoption = 0) + { + + // Stroke the pie but don't stroke values + $tmp = $this->value->show; + $this->value->show = false; + parent::Stroke($img, $aaoption); + $this->value->show = $tmp; + + $xc = round($this->posx * $img->width); + $yc = round($this->posy * $img->height); + + $radius = floor($this->radius * min($img->width, $img->height)); + + if ($this->imidsize > 0 && $aaoption !== 2) { + + if ($this->ishadowcolor != "") { + $img->SetColor($this->ishadowcolor); + $img->FilledCircle($xc + $this->ishadowdrop, $yc + $this->ishadowdrop, + round($radius * $this->imidsize)); + } + + $img->SetColor($this->imidcolor); + $img->FilledCircle($xc, $yc, round($radius * $this->imidsize)); + + if ($this->pie_border && $aaoption === 0) { + $img->SetColor($this->color); + $img->Circle($xc, $yc, round($radius * $this->imidsize)); + } + + if (!empty($this->middlecsimtarget)) { + $this->AddMiddleCSIM($xc, $yc, round($radius * $this->imidsize)); + } + + } + + if ($this->value->show && $aaoption !== 1) { + $this->StrokeAllLabels($img, $xc, $yc, $radius); + $this->midtitle->SetPos($xc, $yc, 'center', 'center'); + $this->midtitle->Stroke($img); + } + + } + + public function AddMiddleCSIM($xc, $yc, $r) + { + $xc = round($xc); + $yc = round($yc); + $r = round($r); + $this->csimareas .= "middlecsimtarget . "\""; + if (!empty($this->middlecsimwintarget)) { + $this->csimareas .= " target=\"" . $this->middlecsimwintarget . "\""; + } + if (!empty($this->middlecsimalt)) { + $tmp = $this->middlecsimalt; + $this->csimareas .= " title=\"$tmp\" alt=\"$tmp\" "; + } + $this->csimareas .= " />\n"; + } + + public function StrokeLabel($label, $img, $xc, $yc, $a, $r) + { + + if ($this->ilabelposadj === 'auto') { + $this->ilabelposadj = (1 - $this->imidsize) / 2 + $this->imidsize; + } + + parent::StrokeLabel($label, $img, $xc, $yc, $a, $r); + + } + +} diff --git a/vendor/amenadiel/jpgraph/src/plot/Plot.php b/vendor/amenadiel/jpgraph/src/plot/Plot.php new file mode 100644 index 0000000000..96b1650e54 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/plot/Plot.php @@ -0,0 +1,227 @@ +numpoints = count($aDatay); + if ($this->numpoints == 0) { + Util\JpGraphError::RaiseL(25121); //("Empty input data array specified for plot. Must have at least one data point."); + } + + if (!$this->isRunningClear) { + $this->inputValues = array(); + $this->inputValues['aDatay'] = $aDatay; + $this->inputValues['aDatax'] = $aDatax; + } + + $this->coords[0] = $aDatay; + if (is_array($aDatax)) { + $this->coords[1] = $aDatax; + $n = count($aDatax); + for ($i = 0; $i < $n; ++$i) { + if (!is_numeric($aDatax[$i])) { + Util\JpGraphError::RaiseL(25070); + } + } + } + $this->value = new DisplayValue(); + } + + // Stroke the plot + // "virtual" function which must be implemented by + // the subclasses + public function Stroke($aImg, $aXScale, $aYScale) + { + Util\JpGraphError::RaiseL(25122); //("JpGraph: Stroke() must be implemented by concrete subclass to class Plot"); + } + + public function HideLegend($f = true) + { + $this->hidelegend = $f; + } + + public function DoLegend($graph) + { + if (!$this->hidelegend) { + $this->Legend($graph); + } + + } + + public function StrokeDataValue($img, $aVal, $x, $y) + { + $this->value->Stroke($img, $aVal, $x, $y); + } + + // Set href targets for CSIM + public function SetCSIMTargets($aTargets, $aAlts = '', $aWinTargets = '') + { + $this->csimtargets = $aTargets; + $this->csimwintargets = $aWinTargets; + $this->csimalts = $aAlts; + } + + // Get all created areas + public function GetCSIMareas() + { + return $this->csimareas; + } + + // "Virtual" function which gets called before any scale + // or axis are stroked used to do any plot specific adjustment + public function PreStrokeAdjust($aGraph) + { + if (substr($aGraph->axtype, 0, 4) == "text" && (isset($this->coords[1]))) { + Util\JpGraphError::RaiseL(25123); //("JpGraph: You can't use a text X-scale with specified X-coords. Use a \"int\" or \"lin\" scale instead."); + } + return true; + } + + // Virtual function to the the concrete plot class to make any changes to the graph + // and scale before the stroke process begins + public function PreScaleSetup($aGraph) + { + // Empty + } + + // Get minimum values in plot + public function Min() + { + if (isset($this->coords[1])) { + $x = $this->coords[1]; + } else { + $x = ''; + } + if ($x != '' && count($x) > 0) { + $xm = min($x); + } else { + $xm = 0; + } + $y = $this->coords[0]; + $cnt = count($y); + if ($cnt > 0) { + $i = 0; + while ($i < $cnt && !is_numeric($ym = $y[$i])) { + $i++; + } + while ($i < $cnt) { + if (is_numeric($y[$i])) { + $ym = min($ym, $y[$i]); + } + ++$i; + } + } else { + $ym = ''; + } + return array($xm, $ym); + } + + // Get maximum value in plot + public function Max() + { + if (isset($this->coords[1])) { + $x = $this->coords[1]; + } else { + $x = ''; + } + + if ($x != '' && count($x) > 0) { + $xm = max($x); + } else { + $xm = $this->numpoints - 1; + } + $y = $this->coords[0]; + if (count($y) > 0) { + $cnt = count($y); + $i = 0; + while ($i < $cnt && !is_numeric($ym = $y[$i])) { + $i++; + } + while ($i < $cnt) { + if (is_numeric($y[$i])) { + $ym = max($ym, $y[$i]); + } + ++$i; + } + } else { + $ym = ''; + } + return array($xm, $ym); + } + + public function SetColor($aColor) + { + $this->color = $aColor; + } + + public function SetLegend($aLegend, $aCSIM = '', $aCSIMAlt = '', $aCSIMWinTarget = '') + { + $this->legend = $aLegend; + $this->legendcsimtarget = $aCSIM; + $this->legendcsimwintarget = $aCSIMWinTarget; + $this->legendcsimalt = $aCSIMAlt; + } + + public function SetWeight($aWeight) + { + $this->weight = $aWeight; + } + + public function SetLineWeight($aWeight = 1) + { + $this->line_weight = $aWeight; + } + + public function SetCenter($aCenter = true) + { + $this->center = $aCenter; + } + + // This method gets called by Graph class to plot anything that should go + // into the margin after the margin color has been set. + public function StrokeMargin($aImg) + { + return true; + } + + // Framework function the chance for each plot class to set a legend + public function Legend($aGraph) + { + if ($this->legend != '') { + $aGraph->legend->Add($this->legend, $this->color, '', 0, $this->legendcsimtarget, $this->legendcsimalt, $this->legendcsimwintarget); + } + } + + public function Clear() + { + $this->isRunningClear = true; + $this->__construct($this->inputValues['aDatay'], $this->inputValues['aDatax']); + $this->isRunningClear = false; + } + +} // Class diff --git a/vendor/amenadiel/jpgraph/src/plot/PlotBand.php b/vendor/amenadiel/jpgraph/src/plot/PlotBand.php new file mode 100644 index 0000000000..13c92581b9 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/plot/PlotBand.php @@ -0,0 +1,139 @@ +prect = $f->Create($aPattern, $aColor, $aWeight); + if (is_numeric($aMin) && is_numeric($aMax) && ($aMin > $aMax)) { + Util\JpGraphError::RaiseL(16004); + } + + //('Min value for plotband is larger than specified max value. Please correct.'); + $this->dir = $aDir; + $this->min = $aMin; + $this->max = $aMax; + $this->depth = $aDepth; + } + + // Set position. aRect contains absolute image coordinates + public function SetPos($aRect) + { + assert($this->prect != null); + $this->prect->SetPos($aRect); + } + + public function ShowFrame($aFlag = true) + { + $this->prect->ShowFrame($aFlag); + } + + // Set z-order. In front of pplot or in the back + public function SetOrder($aDepth) + { + $this->depth = $aDepth; + } + + public function SetDensity($aDens) + { + $this->prect->SetDensity($aDens); + } + + public function GetDir() + { + return $this->dir; + } + + public function GetMin() + { + return $this->min; + } + + public function GetMax() + { + return $this->max; + } + + public function PreStrokeAdjust($aGraph) + { + // Nothing to do + } + + // Display band + public function Stroke($aImg, $aXScale, $aYScale) + { + assert($this->prect != null); + if ($this->dir == HORIZONTAL) { + if ($this->min === 'min') { + $this->min = $aYScale->GetMinVal(); + } + + if ($this->max === 'max') { + $this->max = $aYScale->GetMaxVal(); + } + + // Only draw the bar if it actually appears in the range + if ($this->min < $aYScale->GetMaxVal() && $this->max > $aYScale->GetMinVal()) { + + // Trucate to limit of axis + $this->min = max($this->min, $aYScale->GetMinVal()); + $this->max = min($this->max, $aYScale->GetMaxVal()); + + $x = $aXScale->scale_abs[0]; + $y = $aYScale->Translate($this->max); + $width = $aXScale->scale_abs[1] - $aXScale->scale_abs[0] + 1; + $height = abs($y - $aYScale->Translate($this->min)) + 1; + $this->prect->SetPos(new Rectangle($x, $y, $width, $height)); + $this->prect->Stroke($aImg); + } + } else { + // VERTICAL + if ($this->min === 'min') { + $this->min = $aXScale->GetMinVal(); + } + + if ($this->max === 'max') { + $this->max = $aXScale->GetMaxVal(); + } + + // Only draw the bar if it actually appears in the range + if ($this->min < $aXScale->GetMaxVal() && $this->max > $aXScale->GetMinVal()) { + + // Trucate to limit of axis + $this->min = max($this->min, $aXScale->GetMinVal()); + $this->max = min($this->max, $aXScale->GetMaxVal()); + + $y = $aYScale->scale_abs[1]; + $x = $aXScale->Translate($this->min); + $height = abs($aYScale->scale_abs[1] - $aYScale->scale_abs[0]); + $width = abs($x - $aXScale->Translate($this->max)); + $this->prect->SetPos(new Rectangle($x, $y, $width, $height)); + $this->prect->Stroke($aImg); + } + } + } +} diff --git a/vendor/amenadiel/jpgraph/src/plot/PlotLine.php b/vendor/amenadiel/jpgraph/src/plot/PlotLine.php new file mode 100644 index 0000000000..b95b57ae1d --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/plot/PlotLine.php @@ -0,0 +1,161 @@ +direction = $aDir; + $this->color = $aColor; + $this->weight = $aWeight; + $this->scaleposition = $aPos; + } + + public function SetLegend($aLegend, $aCSIM = '', $aCSIMAlt = '', $aCSIMWinTarget = '') + { + $this->legend = $aLegend; + $this->legendcsimtarget = $aCSIM; + $this->legendcsimwintarget = $aCSIMWinTarget; + $this->legendcsimalt = $aCSIMAlt; + } + + public function HideLegend($f = true) + { + $this->hidelegend = $f; + } + + public function SetPosition($aScalePosition) + { + $this->scaleposition = $aScalePosition; + } + + public function SetDirection($aDir) + { + $this->direction = $aDir; + } + + public function SetColor($aColor) + { + $this->color = $aColor; + } + + public function SetWeight($aWeight) + { + $this->weight = $aWeight; + } + + public function SetLineStyle($aStyle) + { + $this->iLineStyle = $aStyle; + } + + public function GetCSIMAreas() + { + return ''; + } + + //--------------- + // PRIVATE METHODS + + public function DoLegend($graph) + { + if (!$this->hidelegend) { + $this->Legend($graph); + } + + } + + // Framework function the chance for each plot class to set a legend + public function Legend($aGraph) + { + if ($this->legend != '') { + $dummyPlotMark = new PlotMark(); + $lineStyle = 1; + $aGraph->legend->Add($this->legend, $this->color, $dummyPlotMark, $lineStyle, + $this->legendcsimtarget, $this->legendcsimalt, $this->legendcsimwintarget); + } + } + + public function PreStrokeAdjust($aGraph) + { + // Nothing to do + } + + // Called by framework to allow the object to draw + // optional information in the margin area + public function StrokeMargin($aImg) + { + // Nothing to do + } + + // Framework function to allow the object to adjust the scale + public function PrescaleSetup($aGraph) + { + // Nothing to do + } + + public function Min() + { + return array(null, null); + } + + public function Max() + { + return array(null, null); + } + + public function _Stroke($aImg, $aMinX, $aMinY, $aMaxX, $aMaxY, $aXPos, $aYPos) + { + $aImg->SetColor($this->color); + $aImg->SetLineWeight($this->weight); + $oldStyle = $aImg->SetLineStyle($this->iLineStyle); + if ($this->direction == VERTICAL) { + $ymin_abs = $aMinY; + $ymax_abs = $aMaxY; + $xpos_abs = $aXPos; + $aImg->StyleLine($xpos_abs, $ymin_abs, $xpos_abs, $ymax_abs); + } elseif ($this->direction == HORIZONTAL) { + $xmin_abs = $aMinX; + $xmax_abs = $aMaxX; + $ypos_abs = $aYPos; + $aImg->StyleLine($xmin_abs, $ypos_abs, $xmax_abs, $ypos_abs); + } else { + Util\JpGraphError::RaiseL(25125); //(" Illegal direction for static line"); + } + $aImg->SetLineStyle($oldStyle); + } + + public function Stroke($aImg, $aXScale, $aYScale) + { + $this->_Stroke($aImg, + $aImg->left_margin, + $aYScale->Translate($aYScale->GetMinVal()), + $aImg->width - $aImg->right_margin, + $aYScale->Translate($aYScale->GetMaxVal()), + $aXScale->Translate($this->scaleposition), + $aYScale->Translate($this->scaleposition) + ); + } +} diff --git a/vendor/amenadiel/jpgraph/src/plot/PlotMark.php b/vendor/amenadiel/jpgraph/src/plot/PlotMark.php new file mode 100644 index 0000000000..19a911e6b8 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/plot/PlotMark.php @@ -0,0 +1,498 @@ +title = new Text\Text(); + $this->title->Hide(); + $this->csimareas = ''; + $this->type = -1; + } + + //--------------- + // PUBLIC METHODS + public function SetType($aType, $aFileName = '', $aScale = 1.0) + { + $this->type = $aType; + if ($aType == MARK_IMG && $aFileName == '') { + Util\JpGraphError::RaiseL(23003); //('A filename must be specified if you set the mark type to MARK_IMG.'); + } + $this->iFileName = $aFileName; + $this->iScale = $aScale; + } + + public function SetCallback($aFunc) + { + $this->iFormatCallback = $aFunc; + } + + public function SetCallbackYX($aFunc) + { + $this->iFormatCallback2 = $aFunc; + } + + public function GetType() + { + return $this->type; + } + + public function SetColor($aColor) + { + $this->color = $aColor; + } + + public function SetFillColor($aFillColor) + { + $this->fill_color = $aFillColor; + } + + public function SetWeight($aWeight) + { + $this->weight = $aWeight; + } + + // Synonym for SetWidth() + public function SetSize($aWidth) + { + $this->width = $aWidth; + } + + public function SetWidth($aWidth) + { + $this->width = $aWidth; + } + + public function SetDefaultWidth() + { + switch ($this->type) { + case MARK_CIRCLE: + case MARK_FILLEDCIRCLE: + $this->width = 4; + break; + default: + $this->width = 7; + } + } + + public function GetWidth() + { + return $this->width; + } + + public function Hide($aHide = true) + { + $this->show = !$aHide; + } + + public function Show($aShow = true) + { + $this->show = $aShow; + } + + public function SetCSIMAltVal($aY, $aX = '') + { + $this->yvalue = $aY; + $this->xvalue = $aX; + } + + public function SetCSIMTarget($aTarget, $aWinTarget = '') + { + $this->csimtarget = $aTarget; + $this->csimwintarget = $aWinTarget; + } + + public function SetCSIMAlt($aAlt) + { + $this->csimalt = $aAlt; + } + + public function GetCSIMAreas() + { + return $this->csimareas; + } + + public function AddCSIMPoly($aPts) + { + $coords = round($aPts[0]) . ", " . round($aPts[1]); + $n = count($aPts) / 2; + for ($i = 1; $i < $n; ++$i) { + $coords .= ", " . round($aPts[2 * $i]) . ", " . round($aPts[2 * $i + 1]); + } + $this->csimareas = ""; + if (!empty($this->csimtarget)) { + $this->csimareas .= "csimtarget) . "\""; + + if (!empty($this->csimwintarget)) { + $this->csimareas .= " target=\"" . $this->csimwintarget . "\" "; + } + + if (!empty($this->csimalt)) { + $tmp = sprintf($this->csimalt, $this->yvalue, $this->xvalue); + $this->csimareas .= " title=\"$tmp\" alt=\"$tmp\""; + } + $this->csimareas .= " />\n"; + } + } + + public function AddCSIMCircle($x, $y, $r) + { + $x = round($x); + $y = round($y); + $r = round($r); + $this->csimareas = ""; + if (!empty($this->csimtarget)) { + $this->csimareas .= "csimtarget) . "\""; + + if (!empty($this->csimwintarget)) { + $this->csimareas .= " target=\"" . $this->csimwintarget . "\" "; + } + + if (!empty($this->csimalt)) { + $tmp = sprintf($this->csimalt, $this->yvalue, $this->xvalue); + $this->csimareas .= " title=\"$tmp\" alt=\"$tmp\" "; + } + $this->csimareas .= " />\n"; + } + } + + public function Stroke($img, $x, $y) + { + if (!$this->show) { + return; + } + + if ($this->iFormatCallback != '' || $this->iFormatCallback2 != '') { + + if ($this->iFormatCallback != '') { + $f = $this->iFormatCallback; + list($width, $color, $fcolor) = call_user_func($f, $this->yvalue); + $filename = $this->iFileName; + $imgscale = $this->iScale; + } else { + $f = $this->iFormatCallback2; + list($width, $color, $fcolor, $filename, $imgscale) = call_user_func($f, $this->yvalue, $this->xvalue); + if ($filename == "") { + $filename = $this->iFileName; + } + + if ($imgscale == "") { + $imgscale = $this->iScale; + } + + } + + if ($width == "") { + $width = $this->width; + } + + if ($color == "") { + $color = $this->color; + } + + if ($fcolor == "") { + $fcolor = $this->fill_color; + } + + } else { + $fcolor = $this->fill_color; + $color = $this->color; + $width = $this->width; + $filename = $this->iFileName; + $imgscale = $this->iScale; + } + + if ($this->type == MARK_IMG || + ($this->type >= MARK_FLAG1 && $this->type <= MARK_FLAG4) || + $this->type >= MARK_IMG_PUSHPIN) { + + // Note: For the builtin images we use the "filename" parameter + // to denote the color + $anchor_x = 0.5; + $anchor_y = 0.5; + switch ($this->type) { + case MARK_FLAG1: + case MARK_FLAG2: + case MARK_FLAG3: + case MARK_FLAG4: + $this->markimg = FlagCache::GetFlagImgByName($this->type - MARK_FLAG1 + 1, $filename); + break; + + case MARK_IMG: + // Load an image and use that as a marker + // Small optimization, if we have already read an image don't + // waste time reading it again. + if ($this->markimg == '' || !($this->oldfilename === $filename)) { + $this->markimg = Graph::LoadBkgImage('', $filename); + $this->oldfilename = $filename; + } + break; + + case MARK_IMG_PUSHPIN: + case MARK_IMG_SPUSHPIN: + case MARK_IMG_LPUSHPIN: + if ($this->imgdata_pushpins == null) { + $this->imgdata_pushpins = new Image\ImgData_PushPins(); + } + $this->markimg = $this->imgdata_pushpins->GetImg($this->type, $filename); + list($anchor_x, $anchor_y) = $this->imgdata_pushpins->GetAnchor(); + break; + + case MARK_IMG_SQUARE: + if ($this->imgdata_squares == null) { + $this->imgdata_squares = new Image\ImgData_Squares(); + } + $this->markimg = $this->imgdata_squares->GetImg($this->type, $filename); + list($anchor_x, $anchor_y) = $this->imgdata_squares->GetAnchor(); + break; + + case MARK_IMG_STAR: + if ($this->imgdata_stars == null) { + $this->imgdata_stars = new Image\ImgData_Stars(); + } + $this->markimg = $this->imgdata_stars->GetImg($this->type, $filename); + list($anchor_x, $anchor_y) = $this->imgdata_stars->GetAnchor(); + break; + + case MARK_IMG_BEVEL: + if ($this->imgdata_bevels == null) { + $this->imgdata_bevels = new Image\ImgData_Bevels(); + } + $this->markimg = $this->imgdata_bevels->GetImg($this->type, $filename); + list($anchor_x, $anchor_y) = $this->imgdata_bevels->GetAnchor(); + break; + + case MARK_IMG_DIAMOND: + if ($this->imgdata_diamonds == null) { + $this->imgdata_diamonds = new Image\ImgData_Diamonds(); + } + $this->markimg = $this->imgdata_diamonds->GetImg($this->type, $filename); + list($anchor_x, $anchor_y) = $this->imgdata_diamonds->GetAnchor(); + break; + + case MARK_IMG_BALL: + case MARK_IMG_SBALL: + case MARK_IMG_MBALL: + case MARK_IMG_LBALL: + if ($this->imgdata_balls == null) { + $this->imgdata_balls = new Image\ImgData_Balls(); + } + $this->markimg = $this->imgdata_balls->GetImg($this->type, $filename); + list($anchor_x, $anchor_y) = $this->imgdata_balls->GetAnchor(); + break; + } + + $w = $img->GetWidth($this->markimg); + $h = $img->GetHeight($this->markimg); + + $dw = round($imgscale * $w); + $dh = round($imgscale * $h); + + // Do potential rotation + list($x, $y) = $img->Rotate($x, $y); + + $dx = round($x - $dw * $anchor_x); + $dy = round($y - $dh * $anchor_y); + + $this->width = max($dx, $dy); + + $img->Copy($this->markimg, $dx, $dy, 0, 0, $dw, $dh, $w, $h); + if (!empty($this->csimtarget)) { + $this->csimareas = "csimtarget) . "\""; + + if (!empty($this->csimwintarget)) { + $this->csimareas .= " target=\"" . $this->csimwintarget . "\" "; + } + + if (!empty($this->csimalt)) { + $tmp = sprintf($this->csimalt, $this->yvalue, $this->xvalue); + $this->csimareas .= " title=\"$tmp\" alt=\"$tmp\" "; + } + $this->csimareas .= " />\n"; + } + + // Stroke title + $this->title->Align("center", "top"); + $this->title->Stroke($img, $x, $y + round($dh / 2)); + return; + } + + $weight = $this->weight; + $dx = round($width / 2, 0); + $dy = round($width / 2, 0); + $pts = 0; + + switch ($this->type) { + case MARK_SQUARE: + $c[] = $x - $dx; + $c[] = $y - $dy; + $c[] = $x + $dx; + $c[] = $y - $dy; + $c[] = $x + $dx; + $c[] = $y + $dy; + $c[] = $x - $dx; + $c[] = $y + $dy; + $c[] = $x - $dx; + $c[] = $y - $dy; + $pts = 5; + break; + case MARK_UTRIANGLE: + ++$dx; ++$dy; + $c[] = $x - $dx; + $c[] = $y + 0.87 * $dy; // tan(60)/2*$dx + $c[] = $x; + $c[] = $y - 0.87 * $dy; + $c[] = $x + $dx; + $c[] = $y + 0.87 * $dy; + $c[] = $x - $dx; + $c[] = $y + 0.87 * $dy; // tan(60)/2*$dx + $pts = 4; + break; + case MARK_DTRIANGLE: + ++$dx; ++$dy; + $c[] = $x; + $c[] = $y + 0.87 * $dy; // tan(60)/2*$dx + $c[] = $x - $dx; + $c[] = $y - 0.87 * $dy; + $c[] = $x + $dx; + $c[] = $y - 0.87 * $dy; + $c[] = $x; + $c[] = $y + 0.87 * $dy; // tan(60)/2*$dx + $pts = 4; + break; + case MARK_DIAMOND: + $c[] = $x; + $c[] = $y + $dy; + $c[] = $x - $dx; + $c[] = $y; + $c[] = $x; + $c[] = $y - $dy; + $c[] = $x + $dx; + $c[] = $y; + $c[] = $x; + $c[] = $y + $dy; + $pts = 5; + break; + case MARK_LEFTTRIANGLE: + $c[] = $x; + $c[] = $y; + $c[] = $x; + $c[] = $y + 2 * $dy; + $c[] = $x + $dx * 2; + $c[] = $y; + $c[] = $x; + $c[] = $y; + $pts = 4; + break; + case MARK_RIGHTTRIANGLE: + $c[] = $x - $dx * 2; + $c[] = $y; + $c[] = $x; + $c[] = $y + 2 * $dy; + $c[] = $x; + $c[] = $y; + $c[] = $x - $dx * 2; + $c[] = $y; + $pts = 4; + break; + case MARK_FLASH: + $dy *= 2; + $c[] = $x + $dx / 2; + $c[] = $y - $dy; + $c[] = $x - $dx + $dx / 2; + $c[] = $y + $dy * 0.7 - $dy; + $c[] = $x + $dx / 2; + $c[] = $y + $dy * 1.3 - $dy; + $c[] = $x - $dx + $dx / 2; + $c[] = $y + 2 * $dy - $dy; + $img->SetLineWeight($weight); + $img->SetColor($color); + $img->Polygon($c); + $img->SetLineWeight(1); + $this->AddCSIMPoly($c); + break; + } + + if ($pts > 0) { + $this->AddCSIMPoly($c); + $img->SetLineWeight($weight); + $img->SetColor($fcolor); + $img->FilledPolygon($c); + $img->SetColor($color); + $img->Polygon($c); + $img->SetLineWeight(1); + } elseif ($this->type == MARK_CIRCLE) { + $img->SetColor($color); + $img->Circle($x, $y, $width); + $this->AddCSIMCircle($x, $y, $width); + } elseif ($this->type == MARK_FILLEDCIRCLE) { + $img->SetColor($fcolor); + $img->FilledCircle($x, $y, $width); + $img->SetColor($color); + $img->Circle($x, $y, $width); + $this->AddCSIMCircle($x, $y, $width); + } elseif ($this->type == MARK_CROSS) { + // Oversize by a pixel to match the X + $img->SetColor($color); + $img->SetLineWeight($weight); + $img->Line($x, $y + $dy + 1, $x, $y - $dy - 1); + $img->Line($x - $dx - 1, $y, $x + $dx + 1, $y); + $this->AddCSIMCircle($x, $y, $dx); + } elseif ($this->type == MARK_X) { + $img->SetColor($color); + $img->SetLineWeight($weight); + $img->Line($x + $dx, $y + $dy, $x - $dx, $y - $dy); + $img->Line($x - $dx, $y + $dy, $x + $dx, $y - $dy); + $this->AddCSIMCircle($x, $y, $dx + $dy); + } elseif ($this->type == MARK_STAR) { + $img->SetColor($color); + $img->SetLineWeight($weight); + $img->Line($x + $dx, $y + $dy, $x - $dx, $y - $dy); + $img->Line($x - $dx, $y + $dy, $x + $dx, $y - $dy); + // Oversize by a pixel to match the X + $img->Line($x, $y + $dy + 1, $x, $y - $dy - 1); + $img->Line($x - $dx - 1, $y, $x + $dx + 1, $y); + $this->AddCSIMCircle($x, $y, $dx + $dy); + } + + // Stroke title + $this->title->Align("center", "center"); + $this->title->Stroke($img, $x, $y); + } +} // Class diff --git a/vendor/amenadiel/jpgraph/src/plot/PolarPlot.php b/vendor/amenadiel/jpgraph/src/plot/PolarPlot.php new file mode 100644 index 0000000000..7c84bbc243 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/plot/PolarPlot.php @@ -0,0 +1,157 @@ +numpoints = $n / 2; + $this->coord = $aData; + $this->mark = new PlotMark(); + } + + public function SetWeight($aWeight) + { + $this->iLineWeight = $aWeight; + } + + public function SetColor($aColor) + { + $this->iColor = $aColor; + } + + public function SetFillColor($aColor) + { + $this->iFillColor = $aColor; + } + + public function Max() + { + $m = $this->coord[1]; + $i = 1; + while ($i < $this->numpoints) { + $m = max($m, $this->coord[2 * $i + 1]); + ++$i; + } + return $m; + } + + // Set href targets for CSIM + public function SetCSIMTargets($aTargets, $aAlts = null) + { + $this->csimtargets = $aTargets; + $this->csimalts = $aAlts; + } + + // Get all created areas + public function GetCSIMareas() + { + return $this->csimareas; + } + + public function SetLegend($aLegend, $aCSIM = "", $aCSIMAlt = "") + { + $this->legend = $aLegend; + $this->legendcsimtarget = $aCSIM; + $this->legendcsimalt = $aCSIMAlt; + } + + // Private methods + + public function Legend($aGraph) + { + $color = $this->iColor; + if ($this->legend != "") { + if ($this->iFillColor != '') { + $color = $this->iFillColor; + $aGraph->legend->Add($this->legend, $color, $this->mark, 0, + $this->legendcsimtarget, $this->legendcsimalt); + } else { + $aGraph->legend->Add($this->legend, $color, $this->mark, $this->line_style, + $this->legendcsimtarget, $this->legendcsimalt); + } + } + } + + public function Stroke($img, $scale) + { + + $i = 0; + $p = []; + $this->csimareas = ''; + while ($i < $this->numpoints) { + list($x1, $y1) = $scale->PTranslate($this->coord[2 * $i], $this->coord[2 * $i + 1]); + $p[2 * $i] = $x1; + $p[2 * $i + 1] = $y1; + + if (isset($this->csimtargets[$i])) { + $this->mark->SetCSIMTarget($this->csimtargets[$i]); + $this->mark->SetCSIMAlt($this->csimalts[$i]); + $this->mark->SetCSIMAltVal($this->coord[2 * $i], $this->coord[2 * $i + 1]); + $this->mark->Stroke($img, $x1, $y1); + $this->csimareas .= $this->mark->GetCSIMAreas(); + } else { + $this->mark->Stroke($img, $x1, $y1); + } + + ++$i; + } + + if ($this->iFillColor != '') { + $img->SetColor($this->iFillColor); + $img->FilledPolygon($p); + } + $img->SetLineWeight($this->iLineWeight); + $img->SetColor($this->iColor); + $img->Polygon($p, $this->iFillColor != ''); + } +} diff --git a/vendor/amenadiel/jpgraph/src/plot/RadarPlot.php b/vendor/amenadiel/jpgraph/src/plot/RadarPlot.php new file mode 100644 index 0000000000..2a0d91e115 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/plot/RadarPlot.php @@ -0,0 +1,171 @@ +data = $data; + $this->mark = new PlotMark(); + } + + public function Min() + { + return Min($this->data); + } + + public function Max() + { + return Max($this->data); + } + + public function SetLegend($legend) + { + $this->legend = $legend; + } + + public function SetLineStyle($aStyle) + { + $this->linestyle = $aStyle; + } + + public function SetLineWeight($w) + { + $this->weight = $w; + } + + public function SetFillColor($aColor) + { + $this->fill_color = $aColor; + $this->fill = true; + } + + public function SetFill($f = true) + { + $this->fill = $f; + } + + public function SetColor($aColor, $aFillColor = false) + { + $this->color = $aColor; + if ($aFillColor) { + $this->SetFillColor($aFillColor); + $this->fill = true; + } + } + + // Set href targets for CSIM + public function SetCSIMTargets($aTargets, $aAlts = null) + { + $this->csimtargets = $aTargets; + $this->csimalts = $aAlts; + } + + // Get all created areas + public function GetCSIMareas() + { + return $this->csimareas; + } + + public function Stroke($img, $pos, $scale, $startangle) + { + $nbrpnts = count($this->data); + $astep = 2 * M_PI / $nbrpnts; + $a = $startangle; + + for ($i = 0; $i < $nbrpnts; ++$i) { + + // Rotate each non null point to the correct axis-angle + $cs = $scale->RelTranslate($this->data[$i]); + $x = round($cs * cos($a) + $scale->scale_abs[0]); + $y = round($pos - $cs * sin($a)); + + $pnts[$i * 2] = $x; + $pnts[$i * 2 + 1] = $y; + + // If the next point is null then we draw this polygon segment + // to the center, skip the next and draw the next segment from + // the center up to the point on the axis with the first non-null + // value and continues from that point. Some additoinal logic is necessary + // to handle the boundary conditions + if ($i < $nbrpnts - 1) { + if (is_null($this->data[$i + 1])) { + $cs = 0; + $x = round($cs * cos($a) + $scale->scale_abs[0]); + $y = round($pos - $cs * sin($a)); + $pnts[$i * 2] = $x; + $pnts[$i * 2 + 1] = $y; + $a += $astep; + } + } + + $a += $astep; + } + + if ($this->fill) { + $img->SetColor($this->fill_color); + $img->FilledPolygon($pnts); + } + + $img->SetLineWeight($this->weight); + $img->SetColor($this->color); + $img->SetLineStyle($this->linestyle); + $pnts[] = $pnts[0]; + $pnts[] = $pnts[1]; + $img->Polygon($pnts); + $img->SetLineStyle('solid'); // Reset line style to default + + // Add plotmarks on top + if ($this->mark->show) { + for ($i = 0; $i < $nbrpnts; ++$i) { + if (isset($this->csimtargets[$i])) { + $this->mark->SetCSIMTarget($this->csimtargets[$i]); + $this->mark->SetCSIMAlt($this->csimalts[$i]); + $this->mark->SetCSIMAltVal($pnts[$i * 2], $pnts[$i * 2 + 1]); + $this->mark->Stroke($img, $pnts[$i * 2], $pnts[$i * 2 + 1]); + $this->csimareas .= $this->mark->GetCSIMAreas(); + } else { + $this->mark->Stroke($img, $pnts[$i * 2], $pnts[$i * 2 + 1]); + } + } + } + + } + + public function GetCount() + { + return count($this->data); + } + + public function Legend($graph) + { + if ($this->legend == '') { + return; + } + if ($this->fill) { + $graph->legend->Add($this->legend, $this->fill_color, $this->mark); + } else { + $graph->legend->Add($this->legend, $this->color, $this->mark); + } + } + +} // Class diff --git a/vendor/amenadiel/jpgraph/src/plot/ScatterPlot.php b/vendor/amenadiel/jpgraph/src/plot/ScatterPlot.php new file mode 100644 index 0000000000..960478f36b --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/plot/ScatterPlot.php @@ -0,0 +1,126 @@ +mark = new PlotMark(); + $this->mark->SetType(MARK_SQUARE); + $this->mark->SetColor($this->color); + $this->value->SetAlign('center', 'center'); + $this->value->SetMargin(0); + $this->link = new Graph\LineProperty(1, 'black', 'solid'); + $this->link->iShow = false; + } + + //--------------- + // PUBLIC METHODS + public function SetImpuls($f = true) + { + $this->impuls = $f; + } + + public function SetStem($f = true) + { + $this->impuls = $f; + } + + // Combine the scatter plot points with a line + public function SetLinkPoints($aFlag = true, $aColor = "black", $aWeight = 1, $aStyle = 'solid') + { + $this->link->iShow = $aFlag; + $this->link->iColor = $aColor; + $this->link->iWeight = $aWeight; + $this->link->iStyle = $aStyle; + } + + public function Stroke($img, $xscale, $yscale) + { + + $ymin = $yscale->scale_abs[0]; + if ($yscale->scale[0] < 0) { + $yzero = $yscale->Translate(0); + } else { + $yzero = $yscale->scale_abs[0]; + } + + $this->csimareas = ''; + for ($i = 0; $i < $this->numpoints; ++$i) { + + // Skip null values + if ($this->coords[0][$i] === '' || $this->coords[0][$i] === '-' || $this->coords[0][$i] === 'x') { + continue; + } + + if (isset($this->coords[1])) { + $xt = $xscale->Translate($this->coords[1][$i]); + } else { + $xt = $xscale->Translate($i); + } + + $yt = $yscale->Translate($this->coords[0][$i]); + + if ($this->link->iShow && isset($yt_old)) { + $img->SetColor($this->link->iColor); + $img->SetLineWeight($this->link->iWeight); + $old = $img->SetLineStyle($this->link->iStyle); + $img->StyleLine($xt_old, $yt_old, $xt, $yt); + $img->SetLineStyle($old); + } + + if ($this->impuls) { + $img->SetColor($this->color); + $img->SetLineWeight($this->weight); + $img->Line($xt, $yzero, $xt, $yt); + } + + if (!empty($this->csimtargets[$i])) { + if (!empty($this->csimwintargets[$i])) { + $this->mark->SetCSIMTarget($this->csimtargets[$i], $this->csimwintargets[$i]); + } else { + $this->mark->SetCSIMTarget($this->csimtargets[$i]); + } + $this->mark->SetCSIMAlt($this->csimalts[$i]); + } + + if (isset($this->coords[1])) { + $this->mark->SetCSIMAltVal($this->coords[0][$i], $this->coords[1][$i]); + } else { + $this->mark->SetCSIMAltVal($this->coords[0][$i], $i); + } + + $this->mark->Stroke($img, $xt, $yt); + + $this->csimareas .= $this->mark->GetCSIMAreas(); + $this->value->Stroke($img, $this->coords[0][$i], $xt, $yt); + + $xt_old = $xt; + $yt_old = $yt; + } + } + + // Framework function + public function Legend($aGraph) + { + if ($this->legend != "") { + $aGraph->legend->Add($this->legend, $this->mark->fill_color, $this->mark, 0, + $this->legendcsimtarget, $this->legendcsimalt, $this->legendcsimwintarget); + } + } +} // Class +/* EOF */ diff --git a/vendor/amenadiel/jpgraph/src/plot/StockPlot.php b/vendor/amenadiel/jpgraph/src/plot/StockPlot.php new file mode 100644 index 0000000000..31d04900f7 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/plot/StockPlot.php @@ -0,0 +1,182 @@ +iTupleSize) { + Util\JpGraphError::RaiseL(21001, $this->iTupleSize); + //('Data values for Stock charts must contain an even multiple of '.$this->iTupleSize.' data points.'); + } + parent::__construct($datay, $datax); + $this->numpoints /= $this->iTupleSize; + } + + //--------------- + // PUBLIC METHODS + + public function SetColor($aColor, $aColor1 = 'white', $aColor2 = 'darkred', $aColor3 = 'darkred') + { + $this->color = $aColor; + $this->iStockColor1 = $aColor1; + $this->iStockColor2 = $aColor2; + $this->iStockColor3 = $aColor3; + } + + public function SetWidth($aWidth) + { + // Make sure it's odd + $this->iWidth = 2 * floor($aWidth / 2) + 1; + } + + public function HideEndLines($aHide = true) + { + $this->iEndLines = !$aHide; + } + + // Gets called before any axis are stroked + public function PreStrokeAdjust($graph) + { + if ($this->center) { + $a = 0.5; + $b = 0.5; + $this->numpoints++; + } else { + $a = 0; + $b = 0; + } + $graph->xaxis->scale->ticks->SetXLabelOffset($a); + $graph->SetTextScaleOff($b); + } + + // Method description + public function Stroke($img, $xscale, $yscale) + { + $n = $this->numpoints; + if ($this->center) { + $n--; + } + + if (isset($this->coords[1])) { + if (count($this->coords[1]) != $n) { + Util\JpGraphError::RaiseL(2003, count($this->coords[1]), $n); + // ("Number of X and Y points are not equal. Number of X-points:".count($this->coords[1])." Number of Y-points:$numpoints"); + } else { + $exist_x = true; + } + } else { + $exist_x = false; + } + + if ($exist_x) { + $xs = $this->coords[1][0]; + } else { + $xs = 0; + } + + $ts = $this->iTupleSize; + $this->csimareas = ''; + for ($i = 0; $i < $n; ++$i) { + + //If value is NULL, then don't draw a bar at all + if ($this->coords[0][$i * $ts] === null) { + continue; + } + + if ($exist_x) { + $x = $this->coords[1][$i]; + if ($x === null) { + continue; + } + + } else { + $x = $i; + } + $xt = $xscale->Translate($x); + + $neg = $this->coords[0][$i * $ts] > $this->coords[0][$i * $ts + 1]; + $yopen = $yscale->Translate($this->coords[0][$i * $ts]); + $yclose = $yscale->Translate($this->coords[0][$i * $ts + 1]); + $ymin = $yscale->Translate($this->coords[0][$i * $ts + 2]); + $ymax = $yscale->Translate($this->coords[0][$i * $ts + 3]); + + $dx = floor($this->iWidth / 2); + $xl = $xt - $dx; + $xr = $xt + $dx; + + if ($neg) { + $img->SetColor($this->iStockColor3); + } else { + $img->SetColor($this->iStockColor1); + } + $img->FilledRectangle($xl, $yopen, $xr, $yclose); + $img->SetLineWeight($this->weight); + if ($neg) { + $img->SetColor($this->iStockColor2); + } else { + $img->SetColor($this->color); + } + + $img->Rectangle($xl, $yopen, $xr, $yclose); + + if ($yopen < $yclose) { + $ytop = $yopen; + $ybottom = $yclose; + } else { + $ytop = $yclose; + $ybottom = $yopen; + } + $img->SetColor($this->color); + $img->Line($xt, $ytop, $xt, $ymax); + $img->Line($xt, $ybottom, $xt, $ymin); + + if ($this->iEndLines) { + $img->Line($xl, $ymax, $xr, $ymax); + $img->Line($xl, $ymin, $xr, $ymin); + } + + // A chance for subclasses to add things to the bar + // for data point i + $this->ModBox($img, $xscale, $yscale, $i, $xl, $xr, $neg); + + // Setup image maps + if (!empty($this->csimtargets[$i])) { + $this->csimareas .= 'csimareas .= ' href="' . $this->csimtargets[$i] . '"'; + if (!empty($this->csimalts[$i])) { + $sval = $this->csimalts[$i]; + $this->csimareas .= " title=\"$sval\" alt=\"$sval\" "; + } + $this->csimareas .= " />\n"; + } + } + return true; + } + + // A hook for subclasses to modify the plot + public function ModBox($img, $xscale, $yscale, $i, $xl, $xr, $neg) + {} + +} // Class diff --git a/vendor/amenadiel/jpgraph/src/plot/WindrosePlot.php b/vendor/amenadiel/jpgraph/src/plot/WindrosePlot.php new file mode 100644 index 0000000000..1d20aed13d --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/plot/WindrosePlot.php @@ -0,0 +1,1199 @@ +iData = $aData; + $this->legend = new LegendStyle(); + + // Setup the scale + $this->scale = new Graph\WindrosePlotScale($this->iData); + + // default label for free type i agle and a degree sign + $this->iLabelFormatString = '%.1f' . Graph\SymChar::Get('degree'); + + $delta = 2 * M_PI / 16; + for ($i = 0, $a = 0; $i < 16; ++$i, $a += $delta) { + $this->iStandardDirections[$this->iAllDirectionLabels[$i]] = $a; + } + } + + // Dummy method to make window plots have the same signature as the + // layout classes since windrose plots are "leaf" classes in the hierarchy + public function LayoutSize() + { + return 1; + } + + public function SetSize($aSize) + { + $this->iSize = $aSize; + } + + public function SetDataKeyEncoding($aEncoding) + { + $this->iOrdinalEncoding = $aEncoding; + } + + public function SetColor($aColor) + { + $this->iColor = $aColor; + } + + public function SetRadialColors($aColors) + { + $this->iRadialColorArray = $aColors; + } + + public function SetRadialWeights($aWeights) + { + $this->iRadialWeightArray = $aWeights; + } + + public function SetRadialStyles($aStyles) + { + $this->iRadialStyleArray = $aStyles; + } + + public function SetBox($aColor = 'black', $aWeight = 1, $aStyle = 'solid', $aShow = true) + { + $this->iShowBox = $aShow; + $this->iBoxColor = $aColor; + $this->iBoxWeight = $aWeight; + $this->iBoxStyle = $aStyle; + } + + public function SetLabels($aLabels) + { + $this->iLabels = $aLabels; + } + + public function SetLabelMargin($aMarg) + { + $this->iLabelMargin = $aMarg; + } + + public function SetLabelFormat($aLblFormat) + { + $this->iLabelFormatString = $aLblFormat; + } + + public function SetCompassLabels($aLabels) + { + if (count($aLabels) != 16) { + Util\JpGraphError::RaiseL(22004); //('Label specification for windrose directions must have 16 values (one for each compass direction).'); + } + $this->iAllDirectionLabels = $aLabels; + + $delta = 2 * M_PI / 16; + for ($i = 0, $a = 0; $i < 16; ++$i, $a += $delta) { + $this->iStandardDirections[$this->iAllDirectionLabels[$i]] = $a; + } + + } + + public function SetCenterSize($aSize) + { + $this->iCenterSize = $aSize; + } + + // Alias for SetCenterSize + public function SetZCircleSize($aSize) + { + $this->iCenterSize = $aSize; + } + + public function SetFont($aFFam, $aFStyle = FS_NORMAL, $aFSize = 10) + { + $this->iFontFamily = $aFFam; + $this->iFontStyle = $aFStyle; + $this->iFontSize = $aFSize; + } + + public function SetFontColor($aColor) + { + $this->iFontColor = $aColor; + } + + public function SetGridColor($aColor1, $aColor2) + { + $this->iGridColor1 = $aColor1; + $this->iGridColor2 = $aColor2; + } + + public function SetGridWeight($aGrid1 = 1, $aGrid2 = 2) + { + $this->iCircGridWeight = $aGrid1; + $this->iRadialGridWeight = $aGrid2; + } + + public function SetRadialGridStyle($aStyle) + { + $aStyle = strtolower($aStyle); + if (!in_array($aStyle, ['solid', 'dotted', 'dashed', 'longdashed'])) { + Util\JpGraphError::RaiseL(22005); //("Line style for radial lines must be on of ('solid','dotted','dashed','longdashed') "); + } + $this->iRadialGridStyle = $aStyle; + } + + public function SetRanges($aRanges) + { + $this->iRanges = $aRanges; + } + + public function SetRangeStyle($aStyle) + { + $this->iRangeStyle = $aStyle; + } + + public function SetRangeColors($aLegColors) + { + $this->iLegColors = $aLegColors; + } + + public function SetRangeWeights($aWeights) + { + $n = count($aWeights); + for ($i = 0; $i < $n; ++$i) { + $aWeights[$i] = floor($aWeights[$i] / 2); + } + $this->iLegweights = $aWeights; + + } + + public function SetType($aType) + { + if ($aType < WINDROSE_TYPE4 || $aType > WINDROSE_TYPEFREE) { + Util\JpGraphError::RaiseL(22006); //('Illegal windrose type specified.'); + } + $this->iType = $aType; + } + + // Alias for SetPos() + public function SetCenterPos($aX, $aY) + { + $this->iX = $aX; + $this->iY = $aY; + } + + public function SetPos($aX, $aY) + { + $this->iX = $aX; + $this->iY = $aY; + } + + public function SetAntiAlias($aFlag) + { + $this->iAntiAlias = $aFlag; + if (!$aFlag) { + $this->iCircGridWeight = 1; + } + + } + + public function _ThickCircle($aImg, $aXC, $aYC, $aRad, $aWeight = 2, $aColor) + { + + $aImg->SetColor($aColor); + $aRad *= 2; + $aImg->Ellipse($aXC, $aYC, $aRad, $aRad); + if ($aWeight > 1) { + $aImg->Ellipse($aXC, $aYC, $aRad + 1, $aRad + 1); + $aImg->Ellipse($aXC, $aYC, $aRad + 2, $aRad + 2); + if ($aWeight > 2) { + $aImg->Ellipse($aXC, $aYC, $aRad + 3, $aRad + 3); + $aImg->Ellipse($aXC, $aYC, $aRad + 3, $aRad + 4); + $aImg->Ellipse($aXC, $aYC, $aRad + 4, $aRad + 3); + } + } + } + + public function _StrokeWindLeg($aImg, $xc, $yc, $a, $ri, $r, $weight, $color) + { + + // If less than 1 px long then we assume this has been caused by rounding problems + // and should not be stroked + if ($r < 1) { + return; + } + + $xt = $xc + cos($a) * $ri; + $yt = $yc - sin($a) * $ri; + $xxt = $xc + cos($a) * ($ri + $r); + $yyt = $yc - sin($a) * ($ri + $r); + + $x1 = $xt - $weight * sin($a); + $y1 = $yt - $weight * cos($a); + $x2 = $xxt - $weight * sin($a); + $y2 = $yyt - $weight * cos($a); + + $x3 = $xxt + $weight * sin($a); + $y3 = $yyt + $weight * cos($a); + $x4 = $xt + $weight * sin($a); + $y4 = $yt + $weight * cos($a); + + $pts = [$x1, $y1, $x2, $y2, $x3, $y3, $x4, $y4]; + $aImg->SetColor($color); + $aImg->FilledPolygon($pts); + + } + + public function _StrokeLegend($aImg, $x, $y, $scaling = 1, $aReturnWidth = false) + { + + if (!$this->legend->iShow) { + return 0; + } + + $nlc = count($this->iLegColors); + $nlw = count($this->iLegweights); + + // Setup font for ranges + $value = new Text\Text(); + $value->SetAlign('center', 'bottom'); + $value->SetFont($this->legend->iLblFontFamily, + $this->legend->iLblFontStyle, + $this->legend->iLblFontSize * $scaling); + $value->SetColor($this->legend->iLblFontColor); + + // Remember x-center + $xcenter = $x; + + // Construct format string + $fmt = $this->legend->iFormatString . '-' . $this->legend->iFormatString; + + // Make sure that the length of each range is enough to cover the + // size of the labels + $tst = sprintf($fmt, $this->iRanges[0], $this->iRanges[1]); + $value->Set($tst); + $w = $value->GetWidth($aImg); + $l = round(max($this->legend->iLength * $scaling, $w * 1.5)); + + $r = $this->legend->iCircleRadius * $scaling; + $len = 2 * $r + $this->scale->iMaxNum * $l; + + // We are called just to find out the width + if ($aReturnWidth) { + return $len; + } + + $x -= round($len / 2); + $x += $r; + + // 4 pixels extra vertical margin since the circle sometimes is +/- 1 pixel of the + // theorethical radius due to imperfection in the GD library + //$y -= round(max($r,$scaling*$this->iLegweights[($this->scale->iMaxNum-1) % $nlw])+4*$scaling); + $y -= ($this->legend->iCircleRadius + 2) * $scaling + $this->legend->iBottomMargin * $scaling; + + // Adjust for bottom text + if ($this->legend->iTxt != '') { + // Setup font for text + $value->Set($this->legend->iTxt); + $y -= /*$this->legend->iTxtMargin + */$value->GetHeight($aImg); + } + + // Stroke 0-circle + $this->_ThickCircle($aImg, $x, $y, $r, $this->legend->iCircleWeight, + $this->legend->iCircleColor); + + // Remember the center of the circe + $xc = $x; + $yc = $y; + + $value->SetAlign('center', 'bottom'); + $x += $r + 1; + + // Stroke all used ranges + $txty = $y - + round($this->iLegweights[($this->scale->iMaxNum - 1) % $nlw] * $scaling) - 4 * $scaling; + if ($this->scale->iMaxNum >= count($this->iRanges)) { + Util\JpGraphError::RaiseL(22007); //('To few values for the range legend.'); + } + $i = 0; + $idx = 0; + while ($i < $this->scale->iMaxNum) { + $y1 = $y - round($this->iLegweights[$i % $nlw] * $scaling); + $y2 = $y + round($this->iLegweights[$i % $nlw] * $scaling); + $x2 = $x + $l; + $aImg->SetColor($this->iLegColors[$i % $nlc]); + $aImg->FilledRectangle($x, $y1, $x2, $y2); + if ($this->iRangeStyle == RANGE_OVERLAPPING) { + $lbl = sprintf($fmt, $this->iRanges[$idx], $this->iRanges[$idx + 1]); + } else { + $lbl = sprintf($fmt, $this->iRanges[$idx], $this->iRanges[$idx + 1]); + ++$idx; + } + $value->Set($lbl); + $value->Stroke($aImg, $x + $l / 2, $txty); + $x = $x2; + ++$i; ++$idx; + } + + // Setup circle font + $value->SetFont($this->legend->iCircleFontFamily, + $this->legend->iCircleFontStyle, + $this->legend->iCircleFontSize * $scaling); + $value->SetColor($this->legend->iCircleFontColor); + + // Stroke 0-circle text + $value->Set($this->legend->iZCircleTxt); + $value->SetAlign('center', 'center'); + $value->ParagraphAlign('center'); + $value->Stroke($aImg, $xc, $yc); + + // Setup circle font + $value->SetFont($this->legend->iTxtFontFamily, + $this->legend->iTxtFontStyle, + $this->legend->iTxtFontSize * $scaling); + $value->SetColor($this->legend->iTxtFontColor); + + // Draw the text under the legend + $value->Set($this->legend->iTxt); + $value->SetAlign('center', 'top'); + $value->SetParagraphAlign('center'); + $value->Stroke($aImg, $xcenter, $y2 + $this->legend->iTxtMargin * $scaling); + } + + public function SetAutoScaleAngle($aIsRegRose = true) + { + + // If the user already has manually set an angle don't + // trye to find a position + if (is_numeric($this->scale->iAngle)) { + return; + } + + if ($aIsRegRose) { + + // Create a complete data for all directions + // and translate string directions to ordinal values. + // This will much simplify the logic below + for ($i = 0; $i < 16; ++$i) { + $dtxt = $this->iAllDirectionLabels[$i]; + if (!empty($this->iData[$dtxt])) { + $data[$i] = $this->iData[$dtxt]; + } elseif (!empty($this->iData[strtolower($dtxt)])) { + $data[$i] = $this->iData[strtolower($dtxt)]; + } elseif (!empty($this->iData[$i])) { + $data[$i] = $this->iData[$i]; + } else { + $data[$i] = []; + } + } + + // Find the leg which has the lowest weighted sum of number of data around it + $c0 = array_sum($data[0]); + $c1 = array_sum($data[1]); + $found = 1; + $min = $c0 + $c1 * 100; // Initialize to a high value + for ($i = 1; $i < 15; ++$i) { + $c2 = array_sum($data[$i + 1]); + + // Weight the leg we will use more to give preference + // to a short middle leg even if the 3 way sum is similair + $w = $c0 + 3 * $c1 + $c2; + if ($w < $min) { + $min = $w; + $found = $i; + } + $c0 = $c1; + $c1 = $c2; + } + $this->scale->iAngle = $found * 22.5; + } else { + $n = count($this->iData); + foreach ($this->iData as $dir => $leg) { + if (!is_numeric($dir)) { + $pos = array_search(strtoupper($dir), $this->iAllDirectionLabels); + if ($pos !== false) { + $dir = $pos * 22.5; + } + } + $data[round($dir)] = $leg; + } + + // Get all the angles for the data and sort it + $keys = array_keys($data); + sort($keys, SORT_NUMERIC); + + $n = count($data); + $found = false; + $max = 0; + for ($i = 0; $i < 15; ++$i) { + $try_a = round(22.5 * $i); + + if ($try_a > $keys[$n - 1]) { + break; + } + + if (in_array($try_a, $keys)) { + continue; + } + + // Find the angle just lower than this + $j = 0; + while ($j < $n && $keys[$j] <= $try_a) { + ++$j; + } + + if ($j == 0) { + $kj = 0; + $keys[$n - 1]; + $d1 = 0; + abs($kj - $try_a); + } else { + --$j; + $kj = $keys[$j]; + $d1 = abs($kj - $try_a); + } + + // Find the angle just larger than this + $l = $n - 1; + while ($l >= 0 && $keys[$l] >= $try_a) { + --$l; + } + + if ($l == $n - 1) { + $kl = $keys[0]; + $d2 = abs($kl - $try_a); + } else { + ++$l; + $kl = $keys[$l]; + $d2 = abs($kl - $try_a); + } + + // Weight the distance so that legs with large spread + // gets a better weight + $w = $d1 + $d2; + if ($i == 0) { + $w = round(1.4 * $w); + } + $diff = abs($d1 - $d2); + $w *= (360 - $diff); + if ($w > $max) { + $found = $i; + $max = $w; + } + } + + $a = $found * 22.5; + + // Some heuristics to have some preferred positions + if ($keys[$n - 1] < 25) { + $a = 45; + } elseif ($keys[0] > 60) { + $a = 45; + } elseif ($keys[0] > 25 && $keys[$n - 1] < 340) { + $a = 0; + } elseif ($keys[$n - 1] < 75) { + $a = 90; + } elseif ($keys[$n - 1] < 120) { + $a = 135; + } elseif ($keys[$n - 1] < 160) { + $a = 180; + } + + $this->scale->iAngle = $a; + } + } + + public function NormAngle($a) + { + while ($a > 360) { + $a -= 360; + } + return $a; + } + + public function SetLabelPosition($aPos) + { + $this->iLabelPositioning = $aPos; + } + + public function _StrokeFreeRose($dblImg, $value, $scaling, $xc, $yc, $r, $ri) + { + + // Plot radial grid lines and remember the end position + // and the angle for later use when plotting the labels + if ($this->iType != WINDROSE_TYPEFREE) { + Util\JpGraphError::RaiseL(22008); //('Internal error: Trying to plot free Windrose even though type is not a free windorose'); + } + + // Check if we should auto-position the angle for the + // labels. Basically we try to find a firection with smallest + // (or none) data. + $this->SetAutoScaleAngle(false); + + $nlc = count($this->iLegColors); + $nlw = count($this->iLegweights); + + // Stroke grid lines for directions and remember the + // position for the labels + $txtpos = []; + $num = count($this->iData); + + $keys = array_keys($this->iData); + + foreach ($this->iData as $dir => $legdata) { + if (in_array($dir, $this->iAllDirectionLabels, true) === true) { + $a = $this->iStandardDirections[strtoupper($dir)]; + if (in_array($a * 180 / M_PI, $keys)) { + Util\JpGraphError::RaiseL(22009, round($a * 180 / M_PI)); + //('You have specified the same direction twice, once with an angle and once with a compass direction ('.$a*180/M_PI.' degrees.)'); + } + } elseif (is_numeric($dir)) { + $this->NormAngle($dir); + + if ($this->iOrdinalEncoding == KEYENCODING_CLOCKWISE) { + $dir = 360 - $dir; + } + + $a = $dir * M_PI / 180; + } else { + Util\JpGraphError::RaiseL(22010); //('Direction must either be a numeric value or one of the 16 compass directions'); + } + + $xxc = round($xc + cos($a) * $ri); + $yyc = round($yc - sin($a) * $ri); + $x = round($xc + cos($a) * $r); + $y = round($yc - sin($a) * $r); + if (empty($this->iRadialColorArray[$dir])) { + $dblImg->SetColor($this->iGridColor2); + } else { + $dblImg->SetColor($this->iRadialColorArray[$dir]); + } + if (empty($this->iRadialWeightArray[$dir])) { + $dblImg->SetLineWeight($this->iRadialGridWeight); + } else { + $dblImg->SetLineWeight($this->iRadialWeightArray[$dir]); + } + if (empty($this->iRadialStyleArray[$dir])) { + $dblImg->SetLineStyle($this->iRadialGridStyle); + } else { + $dblImg->SetLineStyle($this->iRadialStyleArray[$dir]); + } + $dblImg->StyleLine($xxc, $yyc, $x, $y); + $txtpos[] = [$x, $y, $a]; + } + $dblImg->SetLineWeight(1); + + // Setup labels + $lr = $scaling * $this->iLabelMargin; + + if ($this->iLabelPositioning == LBLPOSITION_EDGE) { + $value->SetAlign('left', 'top'); + } else { + $value->SetAlign('center', 'center'); + $value->SetMargin(0); + } + + for ($i = 0; $i < $num; ++$i) { + + list($x, $y, $a) = $txtpos[$i]; + + // Determine the label + + $da = $a * 180 / M_PI; + if ($this->iOrdinalEncoding == KEYENCODING_CLOCKWISE) { + $da = 360 - $da; + } + + //$da = 360-$da; + + if (!empty($this->iLabels[$keys[$i]])) { + $lbl = $this->iLabels[$keys[$i]]; + } else { + $lbl = sprintf($this->iLabelFormatString, $da); + } + + if ($this->iLabelPositioning == LBLPOSITION_CENTER) { + $dx = $dy = 0; + } else { + // LBLPOSIITON_EDGE + if ($a >= 7 * M_PI / 4 || $a <= M_PI / 4) { + $dx = 0; + } + + if ($a >= M_PI / 4 && $a <= 3 * M_PI / 4) { + $dx = ($a - M_PI / 4) * 2 / M_PI; + } + + if ($a >= 3 * M_PI / 4 && $a <= 5 * M_PI / 4) { + $dx = 1; + } + + if ($a >= 5 * M_PI / 4 && $a <= 7 * M_PI / 4) { + $dx = (1 - ($a - M_PI * 5 / 4) * 2 / M_PI); + } + + if ($a >= 7 * M_PI / 4) { + $dy = (($a - M_PI) - 3 * M_PI / 4) * 2 / M_PI; + } + + if ($a <= M_PI / 4) { + $dy = (0.5 + $a * 2 / M_PI); + } + + if ($a >= M_PI / 4 && $a <= 3 * M_PI / 4) { + $dy = 1; + } + + if ($a >= 3 * M_PI / 4 && $a <= 5 * M_PI / 4) { + $dy = (1 - ($a - 3 * M_PI / 4) * 2 / M_PI); + } + + if ($a >= 5 * M_PI / 4 && $a <= 7 * M_PI / 4) { + $dy = 0; + } + + } + + $value->Set($lbl); + $th = $value->GetHeight($dblImg); + $tw = $value->GetWidth($dblImg); + $xt = round($lr * cos($a) + $x) - $dx * $tw; + $yt = round($y - $lr * sin($a)) - $dy * $th; + + $value->Stroke($dblImg, $xt, $yt); + } + + if (__DEBUG) { + $dblImg->SetColor('red'); + $dblImg->Circle($xc, $yc, $lr + $r); + } + + // Stroke all the legs + reset($this->iData); + $i = 0; + foreach ($this->iData as $dir => $legdata) { + $legdata = array_slice($legdata, 1); + $nn = count($legdata); + + $a = $txtpos[$i][2]; + $rri = $ri / $scaling; + for ($j = 0; $j < $nn; ++$j) { + // We want the non scaled original radius + $legr = $this->scale->RelTranslate($legdata[$j], $r / $scaling, $ri / $scaling); + $this->_StrokeWindLeg($dblImg, $xc, $yc, $a, + $rri * $scaling, + $legr * $scaling, + $this->iLegweights[$j % $nlw] * $scaling, + $this->iLegColors[$j % $nlc]); + $rri += $legr; + } + ++$i; + } + } + + // Translate potential string specified compass labels to their + // corresponding index. + public function FixupIndexes($aDataArray, $num) + { + $ret = []; + $keys = array_keys($aDataArray); + foreach ($aDataArray as $idx => $data) { + if (is_string($idx)) { + $idx = strtoupper($idx); + $res = array_search($idx, $this->iAllDirectionLabels); + if ($res === false) { + Util\JpGraphError::RaiseL(22011, $idx); //('Windrose index must be numeric or direction label. You have specified index='.$idx); + } + $idx = $res; + if ($idx % (16 / $num) !== 0) { + Util\JpGraphError::RaiseL(22012); //('Windrose radial axis specification contains a direction which is not enabled.'); + } + $idx /= (16 / $num); + + if (in_array($idx, $keys, 1)) { + Util\JpGraphError::RaiseL(22013, $idx); //('You have specified the look&feel for the same compass direction twice, once with text and once with index (Index='.$idx.')'); + } + } + if ($idx < 0 || $idx > 15) { + Util\JpGraphError::RaiseL(22014); //('Index for copmass direction must be between 0 and 15.'); + } + $ret[$idx] = $data; + } + return $ret; + } + + public function _StrokeRegularRose($dblImg, $value, $scaling, $xc, $yc, $r, $ri) + { + // _StrokeRegularRose($dblImg,$xc,$yc,$r,$ri) + // Plot radial grid lines and remember the end position + // and the angle for later use when plotting the labels + switch ($this->iType) { + case WINDROSE_TYPE4: + $num = 4; + break; + case WINDROSE_TYPE8: + $num = 8; + break; + case WINDROSE_TYPE16: + $num = 16; + break; + default: + Util\JpGraphError::RaiseL(22015); //('You have specified an undefined Windrose plot type.'); + } + + // Check if we should auto-position the angle for the + // labels. Basically we try to find a firection with smallest + // (or none) data. + $this->SetAutoScaleAngle(true); + + $nlc = count($this->iLegColors); + $nlw = count($this->iLegweights); + + $this->iRadialColorArray = $this->FixupIndexes($this->iRadialColorArray, $num); + $this->iRadialWeightArray = $this->FixupIndexes($this->iRadialWeightArray, $num); + $this->iRadialStyleArray = $this->FixupIndexes($this->iRadialStyleArray, $num); + + $txtpos = []; + $a = 2 * M_PI / $num; + $dblImg->SetColor($this->iGridColor2); + $dblImg->SetLineStyle($this->iRadialGridStyle); + $dblImg->SetLineWeight($this->iRadialGridWeight); + + // Translate any name specified directions to the index + // so we can easily use it in the loop below + for ($i = 0; $i < $num; ++$i) { + $xxc = round($xc + cos($a * $i) * $ri); + $yyc = round($yc - sin($a * $i) * $ri); + $x = round($xc + cos($a * $i) * $r); + $y = round($yc - sin($a * $i) * $r); + if (empty($this->iRadialColorArray[$i])) { + $dblImg->SetColor($this->iGridColor2); + } else { + $dblImg->SetColor($this->iRadialColorArray[$i]); + } + if (empty($this->iRadialWeightArray[$i])) { + $dblImg->SetLineWeight($this->iRadialGridWeight); + } else { + $dblImg->SetLineWeight($this->iRadialWeightArray[$i]); + } + if (empty($this->iRadialStyleArray[$i])) { + $dblImg->SetLineStyle($this->iRadialGridStyle); + } else { + $dblImg->SetLineStyle($this->iRadialStyleArray[$i]); + } + + $dblImg->StyleLine($xxc, $yyc, $x, $y); + $txtpos[] = [$x, $y, $a * $i]; + } + $dblImg->SetLineWeight(1); + + $lr = $scaling * $this->iLabelMargin; + if ($this->iLabelPositioning == LBLPOSITION_CENTER) { + $value->SetAlign('center', 'center'); + } else { + $value->SetAlign('left', 'top'); + $value->SetMargin(0); + $lr /= 2; + } + + for ($i = 0; $i < $num; ++$i) { + list($x, $y, $a) = $txtpos[$i]; + + // Set the position of the label + if ($this->iLabelPositioning == LBLPOSITION_CENTER) { + $dx = $dy = 0; + } else { + // LBLPOSIITON_EDGE + if ($a >= 7 * M_PI / 4 || $a <= M_PI / 4) { + $dx = 0; + } + + if ($a >= M_PI / 4 && $a <= 3 * M_PI / 4) { + $dx = ($a - M_PI / 4) * 2 / M_PI; + } + + if ($a >= 3 * M_PI / 4 && $a <= 5 * M_PI / 4) { + $dx = 1; + } + + if ($a >= 5 * M_PI / 4 && $a <= 7 * M_PI / 4) { + $dx = (1 - ($a - M_PI * 5 / 4) * 2 / M_PI); + } + + if ($a >= 7 * M_PI / 4) { + $dy = (($a - M_PI) - 3 * M_PI / 4) * 2 / M_PI; + } + + if ($a <= M_PI / 4) { + $dy = (0.5 + $a * 2 / M_PI); + } + + if ($a >= M_PI / 4 && $a <= 3 * M_PI / 4) { + $dy = 1; + } + + if ($a >= 3 * M_PI / 4 && $a <= 5 * M_PI / 4) { + $dy = (1 - ($a - 3 * M_PI / 4) * 2 / M_PI); + } + + if ($a >= 5 * M_PI / 4 && $a <= 7 * M_PI / 4) { + $dy = 0; + } + + } + + $value->Set($this->iAllDirectionLabels[$i * (16 / $num)]); + $th = $value->GetHeight($dblImg); + $tw = $value->GetWidth($dblImg); + $xt = round($lr * cos($a) + $x) - $dx * $tw; + $yt = round($y - $lr * sin($a)) - $dy * $th; + + $value->Stroke($dblImg, $xt, $yt); + } + + if (__DEBUG) { + $dblImg->SetColor("red"); + $dblImg->Circle($xc, $yc, $lr + $r); + } + + // Stroke all the legs + reset($this->iData); + $keys = array_keys($this->iData); + foreach ($this->iData as $idx => $legdata) { + $legdata = array_slice($legdata, 1); + $nn = count($legdata); + if (is_string($idx)) { + $idx = strtoupper($idx); + $idx = array_search($idx, $this->iAllDirectionLabels); + if ($idx === false) { + Util\JpGraphError::RaiseL(22016); //('Windrose leg index must be numeric or direction label.'); + } + if ($idx % (16 / $num) !== 0) { + Util\JpGraphError::RaiseL(22017); //('Windrose data contains a direction which is not enabled. Please adjust what labels are displayed.'); + } + $idx /= (16 / $num); + + if (in_array($idx, $keys, 1)) { + Util\JpGraphError::RaiseL(22018, $idx); //('You have specified data for the same compass direction twice, once with text and once with index (Index='.$idx.')'); + + } + } + if ($idx < 0 || $idx > 15) { + Util\JpGraphError::RaiseL(22019); //('Index for direction must be between 0 and 15. You can\'t specify angles for a Regular Windplot, only index and compass directions.'); + } + $a = $idx * (360 / $num); + $a *= M_PI / 180.0; + $rri = $ri / $scaling; + for ($j = 0; $j < $nn; ++$j) { + // We want the non scaled original radius + $legr = $this->scale->RelTranslate($legdata[$j], $r / $scaling, $ri / $scaling); + $this->_StrokeWindLeg($dblImg, $xc, $yc, $a, + $rri * $scaling, + $legr * $scaling, + $this->iLegweights[$j % $nlw] * $scaling, + $this->iLegColors[$j % $nlc]); + $rri += $legr; + } + } + } + + public function getWidth($aImg) + { + + $scaling = 1; //$this->iAntiAlias ? 2 : 1 ; + if ($this->iSize > 0 && $this->iSize < 1) { + $this->iSize *= min($aImg->width, $aImg->height); + } + + $value = new Text\Text(); + $value->SetFont($this->iFontFamily, $this->iFontStyle, $this->iFontSize * $scaling); + $value->SetColor($this->iFontColor); + // Setup extra size around the graph needed so that the labels + // doesn't get cut. For this we need to find the largest label. + // The code below gives a possible a little to large margin. The + // really, really proper way would be to account for what angle + // the label are at + $n = count($this->iLabels); + if ($n > 0) { + $maxh = 0; + $maxw = 0; + foreach ($this->iLabels as $key => $lbl) { + $value->Set($lbl); + $maxw = max($maxw, $value->GetWidth($aImg)); + } + } else { + $value->Set('888.888'); // Dummy value to get width/height + $maxw = $value->GetWidth($aImg); + } + // Add an extra margin of 50% the font size + $maxw += round($this->iFontSize * $scaling * 0.4); + + $valxmarg = 1.5 * $maxw + 2 * $this->iLabelMargin * $scaling; + $w = round($this->iSize * $scaling + $valxmarg); + + // Make sure that the width of the legend fits + $legendwidth = $this->_StrokeLegend($aImg, 0, 0, $scaling, true) + 10 * $scaling; + $w = max($w, $legendwidth); + + return $w; + } + + public function getHeight($aImg) + { + + $scaling = 1; //$this->iAntiAlias ? 2 : 1 ; + if ($this->iSize > 0 && $this->iSize < 1) { + $this->iSize *= min($aImg->width, $aImg->height); + } + + $value = new Text\Text(); + $value->SetFont($this->iFontFamily, $this->iFontStyle, $this->iFontSize * $scaling); + $value->SetColor($this->iFontColor); + // Setup extra size around the graph needed so that the labels + // doesn't get cut. For this we need to find the largest label. + // The code below gives a possible a little to large margin. The + // really, really proper way would be to account for what angle + // the label are at + $n = count($this->iLabels); + if ($n > 0) { + $maxh = 0; + $maxw = 0; + foreach ($this->iLabels as $key => $lbl) { + $value->Set($lbl); + $maxh = max($maxh, $value->GetHeight($aImg)); + } + } else { + $value->Set('180.8'); // Dummy value to get width/height + $maxh = $value->GetHeight($aImg); + } + // Add an extra margin of 50% the font size + //$maxh += round($this->iFontSize*$scaling * 0.5) ; + $valymarg = 2 * $maxh + 2 * $this->iLabelMargin * $scaling; + + $legendheight = round($this->legend->iShow ? 1 : 0); + $legendheight *= max($this->legend->iCircleRadius * 2, $this->legend->iTxtFontSize * 2) + + $this->legend->iMargin + $this->legend->iBottomMargin + 2; + $legendheight *= $scaling; + $h = round($this->iSize * $scaling + $valymarg) + $legendheight; + + return $h; + } + + public function Stroke($aGraph) + { + + $aImg = $aGraph->img; + + if ($this->iX > 0 && $this->iX < 1) { + $this->iX = round($aImg->width * $this->iX); + } + + if ($this->iY > 0 && $this->iY < 1) { + $this->iY = round($aImg->height * $this->iY); + } + + if ($this->iSize > 0 && $this->iSize < 1) { + $this->iSize *= min($aImg->width, $aImg->height); + } + + if ($this->iCenterSize > 0 && $this->iCenterSize < 1) { + $this->iCenterSize *= $this->iSize; + } + + $this->scale->AutoScale(($this->iSize - $this->iCenterSize) / 2, round(2.5 * $this->scale->iFontSize)); + + $scaling = $this->iAntiAlias ? 2 : 1; + + $value = new Text\Text(); + $value->SetFont($this->iFontFamily, $this->iFontStyle, $this->iFontSize * $scaling); + $value->SetColor($this->iFontColor); + + $legendheight = round($this->legend->iShow ? 1 : 0); + $legendheight *= max($this->legend->iCircleRadius * 2, $this->legend->iTxtFontSize * 2) + + $this->legend->iMargin + $this->legend->iBottomMargin + 2; + $legendheight *= $scaling; + + $w = $scaling * $this->getWidth($aImg); + $h = $scaling * $this->getHeight($aImg); + + // Copy back the double buffered image to the proper canvas + $ww = $w / $scaling; + $hh = $h / $scaling; + + // Create the double buffer + if ($this->iAntiAlias) { + $dblImg = new RotImage($w, $h); + // Set the background color + $dblImg->SetColor($this->iColor); + $dblImg->FilledRectangle(0, 0, $w, $h); + } else { + $dblImg = $aImg; + // Make sure the ix and it coordinates correpond to the new top left center + $dblImg->SetTranslation($this->iX - $w / 2, $this->iY - $h / 2); + } + + if (__DEBUG) { + $dblImg->SetColor('red'); + $dblImg->Rectangle(0, 0, $w - 1, $h - 1); + } + + $dblImg->SetColor('black'); + + if ($this->iShowBox) { + $dblImg->SetColor($this->iBoxColor); + $old = $dblImg->SetLineWeight($this->iBoxWeight); + $dblImg->SetLineStyle($this->iBoxStyle); + $dblImg->Rectangle(0, 0, $w - 1, $h - 1); + $dblImg->SetLineWeight($old); + } + + $xc = round($w / 2); + $yc = round(($h - $legendheight) / 2); + + if (__DEBUG) { + $dblImg->SetColor('red'); + $old = $dblImg->SetLineWeight(2); + $dblImg->Line($xc - 5, $yc - 5, $xc + 5, $yc + 5); + $dblImg->Line($xc + 5, $yc - 5, $xc - 5, $yc + 5); + $dblImg->SetLineWeight($old); + } + + $this->iSize *= $scaling; + + // Inner circle size + $ri = $this->iCenterSize / 2; + + // Full circle radius + $r = round($this->iSize / 2); + + // Get number of grid circles + $n = $this->scale->GetNumCirc(); + + // Plot circle grids + $ri *= $scaling; + $rr = round(($r - $ri) / $n); + for ($i = 1; $i <= $n; ++$i) { + $this->_ThickCircle($dblImg, $xc, $yc, $rr * $i + $ri, + $this->iCircGridWeight, $this->iGridColor1); + } + + $num = 0; + + if ($this->iType == WINDROSE_TYPEFREE) { + $this->_StrokeFreeRose($dblImg, $value, $scaling, $xc, $yc, $r, $ri); + } else { + // Check if we need to re-code the interpretation of the ordinal + // number in the data. Internally ordinal value 0 is East and then + // counted anti-clockwise. The user might choose an encoding + // that have 0 being the first axis to the right of the "N" axis and then + // counted clock-wise + if ($this->iOrdinalEncoding == KEYENCODING_CLOCKWISE) { + if ($this->iType == WINDROSE_TYPE16) { + $const1 = 19; + $const2 = 16; + } elseif ($this->iType == WINDROSE_TYPE8) { + $const1 = 9; + $const2 = 8; + } else { + $const1 = 4; + $const2 = 4; + } + $tmp = []; + $n = count($this->iData); + foreach ($this->iData as $key => $val) { + if (is_numeric($key)) { + $key = ($const1 - $key) % $const2; + } + $tmp[$key] = $val; + } + $this->iData = $tmp; + } + $this->_StrokeRegularRose($dblImg, $value, $scaling, $xc, $yc, $r, $ri); + } + + // Stroke the labels + $this->scale->iFontSize *= $scaling; + $this->scale->iZFontSize *= $scaling; + $this->scale->StrokeLabels($dblImg, $xc, $yc, $ri, $rr); + + // Stroke the inner circle again since the legs + // might have written over it + $this->_ThickCircle($dblImg, $xc, $yc, $ri, $this->iCircGridWeight, $this->iGridColor1); + + if ($ww > $aImg->width) { + Util\JpGraphError::RaiseL(22020); + //('Windrose plot is too large to fit the specified Graph size. Please use WindrosePlot::SetSize() to make the plot smaller or increase the size of the Graph in the initial WindroseGraph() call.'); + } + + $x = $xc; + $y = $h; + $this->_StrokeLegend($dblImg, $x, $y, $scaling); + + if ($this->iAntiAlias) { + $aImg->Copy($dblImg->img, $this->iX - $ww / 2, $this->iY - $hh / 2, 0, 0, $ww, $hh, $w, $h); + } + + // We need to restore the translation matrix + $aImg->SetTranslation(0, 0); + + } + +} diff --git a/vendor/amenadiel/jpgraph/src/text/CanvasRectangleText.php b/vendor/amenadiel/jpgraph/src/text/CanvasRectangleText.php new file mode 100644 index 0000000000..59be52f6d2 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/text/CanvasRectangleText.php @@ -0,0 +1,161 @@ +iTxt = new Text($aTxt); + $this->ix = $xl; + $this->iy = $yt; + $this->iw = $w; + $this->ih = $h; + } + + public function SetShadow($aColor = 'gray', $aWidth = 3) + { + $this->iShadowColor = $aColor; + $this->iShadowWidth = $aWidth; + } + + public function SetFont($FontFam, $aFontStyle, $aFontSize = 12) + { + $this->iTxt->SetFont($FontFam, $aFontStyle, $aFontSize); + } + + public function SetTxt($aTxt) + { + $this->iTxt->Set($aTxt); + } + + public function ParagraphAlign($aParaAlign) + { + $this->iParaAlign = $aParaAlign; + } + + public function SetFillColor($aFillColor) + { + $this->iFillColor = $aFillColor; + } + + public function SetAutoMargin($aMargin) + { + $this->iAutoBoxMargin = $aMargin; + } + + public function SetColor($aColor) + { + $this->iColor = $aColor; + } + + public function SetFontColor($aColor) + { + $this->iFontColor = $aColor; + } + + public function SetPos($xl = 0, $yt = 0, $w = 0, $h = 0) + { + $this->ix = $xl; + $this->iy = $yt; + $this->iw = $w; + $this->ih = $h; + } + + public function Pos($xl = 0, $yt = 0, $w = 0, $h = 0) + { + $this->ix = $xl; + $this->iy = $yt; + $this->iw = $w; + $this->ih = $h; + } + + public function Set($aTxt, $xl, $yt, $w = 0, $h = 0) + { + $this->iTxt->Set($aTxt); + $this->ix = $xl; + $this->iy = $yt; + $this->iw = $w; + $this->ih = $h; + } + + public function SetCornerRadius($aRad = 5) + { + $this->ir = $aRad; + } + + public function Stroke($aImg, $scale) + { + + // If coordinates are specifed as negative this means we should + // treat them as abolsute (pixels) coordinates + if ($this->ix > 0) { + $this->ix = $scale->TranslateX($this->ix); + } else { + $this->ix = -$this->ix; + } + + if ($this->iy > 0) { + $this->iy = $scale->TranslateY($this->iy); + } else { + $this->iy = -$this->iy; + } + + list($this->iw, $this->ih) = $scale->Translate($this->iw, $this->ih); + + if ($this->iw == 0) { + $this->iw = round($this->iTxt->GetWidth($aImg) + $this->iAutoBoxMargin); + } + + if ($this->ih == 0) { + $this->ih = round($this->iTxt->GetTextHeight($aImg) + $this->iAutoBoxMargin); + } + + if ($this->iShadowColor != '') { + $aImg->PushColor($this->iShadowColor); + $aImg->FilledRoundedRectangle($this->ix + $this->iShadowWidth, + $this->iy + $this->iShadowWidth, + $this->ix + $this->iw - 1 + $this->iShadowWidth, + $this->iy + $this->ih - 1 + $this->iShadowWidth, + $this->ir); + $aImg->PopColor(); + } + + if ($this->iFillColor != '') { + $aImg->PushColor($this->iFillColor); + $aImg->FilledRoundedRectangle($this->ix, $this->iy, + $this->ix + $this->iw - 1, + $this->iy + $this->ih - 1, + $this->ir); + $aImg->PopColor(); + } + + if ($this->iColor != '') { + $aImg->PushColor($this->iColor); + $aImg->RoundedRectangle($this->ix, $this->iy, + $this->ix + $this->iw - 1, + $this->iy + $this->ih - 1, + $this->ir); + $aImg->PopColor(); + } + + $this->iTxt->Align('center', 'center'); + $this->iTxt->ParagraphAlign($this->iParaAlign); + $this->iTxt->SetColor($this->iFontColor); + $this->iTxt->Stroke($aImg, $this->ix + $this->iw / 2, $this->iy + $this->ih / 2); + + return array($this->iw, $this->ih); + + } + +} diff --git a/vendor/amenadiel/jpgraph/src/text/GB2312toUTF8.php b/vendor/amenadiel/jpgraph/src/text/GB2312toUTF8.php new file mode 100644 index 0000000000..0b3ea446e1 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/text/GB2312toUTF8.php @@ -0,0 +1,1553 @@ + 12288, 8482 => 12289, 8483 => 12290, 8484 => 12539, 8485 => 713, + 8486 => 711, 8487 => 168, 8488 => 12291, 8489 => 12293, 8490 => 8213, + 8491 => 65374, 8492 => 8214, 8493 => 8230, 8494 => 8216, 8495 => 8217, + 8496 => 8220, 8497 => 8221, 8498 => 12308, 8499 => 12309, 8500 => 12296, + 8501 => 12297, 8502 => 12298, 8503 => 12299, 8504 => 12300, 8505 => 12301, + 8506 => 12302, 8507 => 12303, 8508 => 12310, 8509 => 12311, 8510 => 12304, + 8511 => 12305, 8512 => 177, 8513 => 215, 8514 => 247, 8515 => 8758, + 8516 => 8743, 8517 => 8744, 8518 => 8721, 8519 => 8719, 8520 => 8746, + 8521 => 8745, 8522 => 8712, 8523 => 8759, 8524 => 8730, 8525 => 8869, + 8526 => 8741, 8527 => 8736, 8528 => 8978, 8529 => 8857, 8530 => 8747, + 8531 => 8750, 8532 => 8801, 8533 => 8780, 8534 => 8776, 8535 => 8765, + 8536 => 8733, 8537 => 8800, 8538 => 8814, 8539 => 8815, 8540 => 8804, + 8541 => 8805, 8542 => 8734, 8543 => 8757, 8544 => 8756, 8545 => 9794, + 8546 => 9792, 8547 => 176, 8548 => 8242, 8549 => 8243, 8550 => 8451, + 8551 => 65284, 8552 => 164, 8553 => 65504, 8554 => 65505, 8555 => 8240, + 8556 => 167, 8557 => 8470, 8558 => 9734, 8559 => 9733, 8560 => 9675, + 8561 => 9679, 8562 => 9678, 8563 => 9671, 8564 => 9670, 8565 => 9633, + 8566 => 9632, 8567 => 9651, 8568 => 9650, 8569 => 8251, 8570 => 8594, + 8571 => 8592, 8572 => 8593, 8573 => 8595, 8574 => 12307, 8753 => 9352, + 8754 => 9353, 8755 => 9354, 8756 => 9355, 8757 => 9356, 8758 => 9357, + 8759 => 9358, 8760 => 9359, 8761 => 9360, 8762 => 9361, 8763 => 9362, + 8764 => 9363, 8765 => 9364, 8766 => 9365, 8767 => 9366, 8768 => 9367, + 8769 => 9368, 8770 => 9369, 8771 => 9370, 8772 => 9371, 8773 => 9332, + 8774 => 9333, 8775 => 9334, 8776 => 9335, 8777 => 9336, 8778 => 9337, + 8779 => 9338, 8780 => 9339, 8781 => 9340, 8782 => 9341, 8783 => 9342, + 8784 => 9343, 8785 => 9344, 8786 => 9345, 8787 => 9346, 8788 => 9347, + 8789 => 9348, 8790 => 9349, 8791 => 9350, 8792 => 9351, 8793 => 9312, + 8794 => 9313, 8795 => 9314, 8796 => 9315, 8797 => 9316, 8798 => 9317, + 8799 => 9318, 8800 => 9319, 8801 => 9320, 8802 => 9321, 8805 => 12832, + 8806 => 12833, 8807 => 12834, 8808 => 12835, 8809 => 12836, 8810 => 12837, + 8811 => 12838, 8812 => 12839, 8813 => 12840, 8814 => 12841, 8817 => 8544, + 8818 => 8545, 8819 => 8546, 8820 => 8547, 8821 => 8548, 8822 => 8549, + 8823 => 8550, 8824 => 8551, 8825 => 8552, 8826 => 8553, 8827 => 8554, + 8828 => 8555, 8993 => 65281, 8994 => 65282, 8995 => 65283, 8996 => 65509, + 8997 => 65285, 8998 => 65286, 8999 => 65287, 9000 => 65288, 9001 => 65289, + 9002 => 65290, 9003 => 65291, 9004 => 65292, 9005 => 65293, 9006 => 65294, + 9007 => 65295, 9008 => 65296, 9009 => 65297, 9010 => 65298, 9011 => 65299, + 9012 => 65300, 9013 => 65301, 9014 => 65302, 9015 => 65303, 9016 => 65304, + 9017 => 65305, 9018 => 65306, 9019 => 65307, 9020 => 65308, 9021 => 65309, + 9022 => 65310, 9023 => 65311, 9024 => 65312, 9025 => 65313, 9026 => 65314, + 9027 => 65315, 9028 => 65316, 9029 => 65317, 9030 => 65318, 9031 => 65319, + 9032 => 65320, 9033 => 65321, 9034 => 65322, 9035 => 65323, 9036 => 65324, + 9037 => 65325, 9038 => 65326, 9039 => 65327, 9040 => 65328, 9041 => 65329, + 9042 => 65330, 9043 => 65331, 9044 => 65332, 9045 => 65333, 9046 => 65334, + 9047 => 65335, 9048 => 65336, 9049 => 65337, 9050 => 65338, 9051 => 65339, + 9052 => 65340, 9053 => 65341, 9054 => 65342, 9055 => 65343, 9056 => 65344, + 9057 => 65345, 9058 => 65346, 9059 => 65347, 9060 => 65348, 9061 => 65349, + 9062 => 65350, 9063 => 65351, 9064 => 65352, 9065 => 65353, 9066 => 65354, + 9067 => 65355, 9068 => 65356, 9069 => 65357, 9070 => 65358, 9071 => 65359, + 9072 => 65360, 9073 => 65361, 9074 => 65362, 9075 => 65363, 9076 => 65364, + 9077 => 65365, 9078 => 65366, 9079 => 65367, 9080 => 65368, 9081 => 65369, + 9082 => 65370, 9083 => 65371, 9084 => 65372, 9085 => 65373, 9086 => 65507, + 9249 => 12353, 9250 => 12354, 9251 => 12355, 9252 => 12356, 9253 => 12357, + 9254 => 12358, 9255 => 12359, 9256 => 12360, 9257 => 12361, 9258 => 12362, + 9259 => 12363, 9260 => 12364, 9261 => 12365, 9262 => 12366, 9263 => 12367, + 9264 => 12368, 9265 => 12369, 9266 => 12370, 9267 => 12371, 9268 => 12372, + 9269 => 12373, 9270 => 12374, 9271 => 12375, 9272 => 12376, 9273 => 12377, + 9274 => 12378, 9275 => 12379, 9276 => 12380, 9277 => 12381, 9278 => 12382, + 9279 => 12383, 9280 => 12384, 9281 => 12385, 9282 => 12386, 9283 => 12387, + 9284 => 12388, 9285 => 12389, 9286 => 12390, 9287 => 12391, 9288 => 12392, + 9289 => 12393, 9290 => 12394, 9291 => 12395, 9292 => 12396, 9293 => 12397, + 9294 => 12398, 9295 => 12399, 9296 => 12400, 9297 => 12401, 9298 => 12402, + 9299 => 12403, 9300 => 12404, 9301 => 12405, 9302 => 12406, 9303 => 12407, + 9304 => 12408, 9305 => 12409, 9306 => 12410, 9307 => 12411, 9308 => 12412, + 9309 => 12413, 9310 => 12414, 9311 => 12415, 9312 => 12416, 9313 => 12417, + 9314 => 12418, 9315 => 12419, 9316 => 12420, 9317 => 12421, 9318 => 12422, + 9319 => 12423, 9320 => 12424, 9321 => 12425, 9322 => 12426, 9323 => 12427, + 9324 => 12428, 9325 => 12429, 9326 => 12430, 9327 => 12431, 9328 => 12432, + 9329 => 12433, 9330 => 12434, 9331 => 12435, 9505 => 12449, 9506 => 12450, + 9507 => 12451, 9508 => 12452, 9509 => 12453, 9510 => 12454, 9511 => 12455, + 9512 => 12456, 9513 => 12457, 9514 => 12458, 9515 => 12459, 9516 => 12460, + 9517 => 12461, 9518 => 12462, 9519 => 12463, 9520 => 12464, 9521 => 12465, + 9522 => 12466, 9523 => 12467, 9524 => 12468, 9525 => 12469, 9526 => 12470, + 9527 => 12471, 9528 => 12472, 9529 => 12473, 9530 => 12474, 9531 => 12475, + 9532 => 12476, 9533 => 12477, 9534 => 12478, 9535 => 12479, 9536 => 12480, + 9537 => 12481, 9538 => 12482, 9539 => 12483, 9540 => 12484, 9541 => 12485, + 9542 => 12486, 9543 => 12487, 9544 => 12488, 9545 => 12489, 9546 => 12490, + 9547 => 12491, 9548 => 12492, 9549 => 12493, 9550 => 12494, 9551 => 12495, + 9552 => 12496, 9553 => 12497, 9554 => 12498, 9555 => 12499, 9556 => 12500, + 9557 => 12501, 9558 => 12502, 9559 => 12503, 9560 => 12504, 9561 => 12505, + 9562 => 12506, 9563 => 12507, 9564 => 12508, 9565 => 12509, 9566 => 12510, + 9567 => 12511, 9568 => 12512, 9569 => 12513, 9570 => 12514, 9571 => 12515, + 9572 => 12516, 9573 => 12517, 9574 => 12518, 9575 => 12519, 9576 => 12520, + 9577 => 12521, 9578 => 12522, 9579 => 12523, 9580 => 12524, 9581 => 12525, + 9582 => 12526, 9583 => 12527, 9584 => 12528, 9585 => 12529, 9586 => 12530, + 9587 => 12531, 9588 => 12532, 9589 => 12533, 9590 => 12534, 9761 => 913, + 9762 => 914, 9763 => 915, 9764 => 916, 9765 => 917, 9766 => 918, + 9767 => 919, 9768 => 920, 9769 => 921, 9770 => 922, 9771 => 923, + 9772 => 924, 9773 => 925, 9774 => 926, 9775 => 927, 9776 => 928, + 9777 => 929, 9778 => 931, 9779 => 932, 9780 => 933, 9781 => 934, + 9782 => 935, 9783 => 936, 9784 => 937, 9793 => 945, 9794 => 946, + 9795 => 947, 9796 => 948, 9797 => 949, 9798 => 950, 9799 => 951, + 9800 => 952, 9801 => 953, 9802 => 954, 9803 => 955, 9804 => 956, + 9805 => 957, 9806 => 958, 9807 => 959, 9808 => 960, 9809 => 961, + 9810 => 963, 9811 => 964, 9812 => 965, 9813 => 966, 9814 => 967, + 9815 => 968, 9816 => 969, 10017 => 1040, 10018 => 1041, 10019 => 1042, + 10020 => 1043, 10021 => 1044, 10022 => 1045, 10023 => 1025, 10024 => 1046, + 10025 => 1047, 10026 => 1048, 10027 => 1049, 10028 => 1050, 10029 => 1051, + 10030 => 1052, 10031 => 1053, 10032 => 1054, 10033 => 1055, 10034 => 1056, + 10035 => 1057, 10036 => 1058, 10037 => 1059, 10038 => 1060, 10039 => 1061, + 10040 => 1062, 10041 => 1063, 10042 => 1064, 10043 => 1065, 10044 => 1066, + 10045 => 1067, 10046 => 1068, 10047 => 1069, 10048 => 1070, 10049 => 1071, + 10065 => 1072, 10066 => 1073, 10067 => 1074, 10068 => 1075, 10069 => 1076, + 10070 => 1077, 10071 => 1105, 10072 => 1078, 10073 => 1079, 10074 => 1080, + 10075 => 1081, 10076 => 1082, 10077 => 1083, 10078 => 1084, 10079 => 1085, + 10080 => 1086, 10081 => 1087, 10082 => 1088, 10083 => 1089, 10084 => 1090, + 10085 => 1091, 10086 => 1092, 10087 => 1093, 10088 => 1094, 10089 => 1095, + 10090 => 1096, 10091 => 1097, 10092 => 1098, 10093 => 1099, 10094 => 1100, + 10095 => 1101, 10096 => 1102, 10097 => 1103, 10273 => 257, 10274 => 225, + 10275 => 462, 10276 => 224, 10277 => 275, 10278 => 233, 10279 => 283, + 10280 => 232, 10281 => 299, 10282 => 237, 10283 => 464, 10284 => 236, + 10285 => 333, 10286 => 243, 10287 => 466, 10288 => 242, 10289 => 363, + 10290 => 250, 10291 => 468, 10292 => 249, 10293 => 470, 10294 => 472, + 10295 => 474, 10296 => 476, 10297 => 252, 10298 => 234, 10309 => 12549, + 10310 => 12550, 10311 => 12551, 10312 => 12552, 10313 => 12553, 10314 => 12554, + 10315 => 12555, 10316 => 12556, 10317 => 12557, 10318 => 12558, 10319 => 12559, + 10320 => 12560, 10321 => 12561, 10322 => 12562, 10323 => 12563, 10324 => 12564, + 10325 => 12565, 10326 => 12566, 10327 => 12567, 10328 => 12568, 10329 => 12569, + 10330 => 12570, 10331 => 12571, 10332 => 12572, 10333 => 12573, 10334 => 12574, + 10335 => 12575, 10336 => 12576, 10337 => 12577, 10338 => 12578, 10339 => 12579, + 10340 => 12580, 10341 => 12581, 10342 => 12582, 10343 => 12583, 10344 => 12584, + 10345 => 12585, 10532 => 9472, 10533 => 9473, 10534 => 9474, 10535 => 9475, + 10536 => 9476, 10537 => 9477, 10538 => 9478, 10539 => 9479, 10540 => 9480, + 10541 => 9481, 10542 => 9482, 10543 => 9483, 10544 => 9484, 10545 => 9485, + 10546 => 9486, 10547 => 9487, 10548 => 9488, 10549 => 9489, 10550 => 9490, + 10551 => 9491, 10552 => 9492, 10553 => 9493, 10554 => 9494, 10555 => 9495, + 10556 => 9496, 10557 => 9497, 10558 => 9498, 10559 => 9499, 10560 => 9500, + 10561 => 9501, 10562 => 9502, 10563 => 9503, 10564 => 9504, 10565 => 9505, + 10566 => 9506, 10567 => 9507, 10568 => 9508, 10569 => 9509, 10570 => 9510, + 10571 => 9511, 10572 => 9512, 10573 => 9513, 10574 => 9514, 10575 => 9515, + 10576 => 9516, 10577 => 9517, 10578 => 9518, 10579 => 9519, 10580 => 9520, + 10581 => 9521, 10582 => 9522, 10583 => 9523, 10584 => 9524, 10585 => 9525, + 10586 => 9526, 10587 => 9527, 10588 => 9528, 10589 => 9529, 10590 => 9530, + 10591 => 9531, 10592 => 9532, 10593 => 9533, 10594 => 9534, 10595 => 9535, + 10596 => 9536, 10597 => 9537, 10598 => 9538, 10599 => 9539, 10600 => 9540, + 10601 => 9541, 10602 => 9542, 10603 => 9543, 10604 => 9544, 10605 => 9545, + 10606 => 9546, 10607 => 9547, 12321 => 21834, 12322 => 38463, 12323 => 22467, + 12324 => 25384, 12325 => 21710, 12326 => 21769, 12327 => 21696, 12328 => 30353, + 12329 => 30284, 12330 => 34108, 12331 => 30702, 12332 => 33406, 12333 => 30861, + 12334 => 29233, 12335 => 38552, 12336 => 38797, 12337 => 27688, 12338 => 23433, + 12339 => 20474, 12340 => 25353, 12341 => 26263, 12342 => 23736, 12343 => 33018, + 12344 => 26696, 12345 => 32942, 12346 => 26114, 12347 => 30414, 12348 => 20985, + 12349 => 25942, 12350 => 29100, 12351 => 32753, 12352 => 34948, 12353 => 20658, + 12354 => 22885, 12355 => 25034, 12356 => 28595, 12357 => 33453, 12358 => 25420, + 12359 => 25170, 12360 => 21485, 12361 => 21543, 12362 => 31494, 12363 => 20843, + 12364 => 30116, 12365 => 24052, 12366 => 25300, 12367 => 36299, 12368 => 38774, + 12369 => 25226, 12370 => 32793, 12371 => 22365, 12372 => 38712, 12373 => 32610, + 12374 => 29240, 12375 => 30333, 12376 => 26575, 12377 => 30334, 12378 => 25670, + 12379 => 20336, 12380 => 36133, 12381 => 25308, 12382 => 31255, 12383 => 26001, + 12384 => 29677, 12385 => 25644, 12386 => 25203, 12387 => 33324, 12388 => 39041, + 12389 => 26495, 12390 => 29256, 12391 => 25198, 12392 => 25292, 12393 => 20276, + 12394 => 29923, 12395 => 21322, 12396 => 21150, 12397 => 32458, 12398 => 37030, + 12399 => 24110, 12400 => 26758, 12401 => 27036, 12402 => 33152, 12403 => 32465, + 12404 => 26834, 12405 => 30917, 12406 => 34444, 12407 => 38225, 12408 => 20621, + 12409 => 35876, 12410 => 33502, 12411 => 32990, 12412 => 21253, 12413 => 35090, + 12414 => 21093, 12577 => 34180, 12578 => 38649, 12579 => 20445, 12580 => 22561, + 12581 => 39281, 12582 => 23453, 12583 => 25265, 12584 => 25253, 12585 => 26292, + 12586 => 35961, 12587 => 40077, 12588 => 29190, 12589 => 26479, 12590 => 30865, + 12591 => 24754, 12592 => 21329, 12593 => 21271, 12594 => 36744, 12595 => 32972, + 12596 => 36125, 12597 => 38049, 12598 => 20493, 12599 => 29384, 12600 => 22791, + 12601 => 24811, 12602 => 28953, 12603 => 34987, 12604 => 22868, 12605 => 33519, + 12606 => 26412, 12607 => 31528, 12608 => 23849, 12609 => 32503, 12610 => 29997, + 12611 => 27893, 12612 => 36454, 12613 => 36856, 12614 => 36924, 12615 => 40763, + 12616 => 27604, 12617 => 37145, 12618 => 31508, 12619 => 24444, 12620 => 30887, + 12621 => 34006, 12622 => 34109, 12623 => 27605, 12624 => 27609, 12625 => 27606, + 12626 => 24065, 12627 => 24199, 12628 => 30201, 12629 => 38381, 12630 => 25949, + 12631 => 24330, 12632 => 24517, 12633 => 36767, 12634 => 22721, 12635 => 33218, + 12636 => 36991, 12637 => 38491, 12638 => 38829, 12639 => 36793, 12640 => 32534, + 12641 => 36140, 12642 => 25153, 12643 => 20415, 12644 => 21464, 12645 => 21342, + 12646 => 36776, 12647 => 36777, 12648 => 36779, 12649 => 36941, 12650 => 26631, + 12651 => 24426, 12652 => 33176, 12653 => 34920, 12654 => 40150, 12655 => 24971, + 12656 => 21035, 12657 => 30250, 12658 => 24428, 12659 => 25996, 12660 => 28626, + 12661 => 28392, 12662 => 23486, 12663 => 25672, 12664 => 20853, 12665 => 20912, + 12666 => 26564, 12667 => 19993, 12668 => 31177, 12669 => 39292, 12670 => 28851, + 12833 => 30149, 12834 => 24182, 12835 => 29627, 12836 => 33760, 12837 => 25773, + 12838 => 25320, 12839 => 38069, 12840 => 27874, 12841 => 21338, 12842 => 21187, + 12843 => 25615, 12844 => 38082, 12845 => 31636, 12846 => 20271, 12847 => 24091, + 12848 => 33334, 12849 => 33046, 12850 => 33162, 12851 => 28196, 12852 => 27850, + 12853 => 39539, 12854 => 25429, 12855 => 21340, 12856 => 21754, 12857 => 34917, + 12858 => 22496, 12859 => 19981, 12860 => 24067, 12861 => 27493, 12862 => 31807, + 12863 => 37096, 12864 => 24598, 12865 => 25830, 12866 => 29468, 12867 => 35009, + 12868 => 26448, 12869 => 25165, 12870 => 36130, 12871 => 30572, 12872 => 36393, + 12873 => 37319, 12874 => 24425, 12875 => 33756, 12876 => 34081, 12877 => 39184, + 12878 => 21442, 12879 => 34453, 12880 => 27531, 12881 => 24813, 12882 => 24808, + 12883 => 28799, 12884 => 33485, 12885 => 33329, 12886 => 20179, 12887 => 27815, + 12888 => 34255, 12889 => 25805, 12890 => 31961, 12891 => 27133, 12892 => 26361, + 12893 => 33609, 12894 => 21397, 12895 => 31574, 12896 => 20391, 12897 => 20876, + 12898 => 27979, 12899 => 23618, 12900 => 36461, 12901 => 25554, 12902 => 21449, + 12903 => 33580, 12904 => 33590, 12905 => 26597, 12906 => 30900, 12907 => 25661, + 12908 => 23519, 12909 => 23700, 12910 => 24046, 12911 => 35815, 12912 => 25286, + 12913 => 26612, 12914 => 35962, 12915 => 25600, 12916 => 25530, 12917 => 34633, + 12918 => 39307, 12919 => 35863, 12920 => 32544, 12921 => 38130, 12922 => 20135, + 12923 => 38416, 12924 => 39076, 12925 => 26124, 12926 => 29462, 13089 => 22330, + 13090 => 23581, 13091 => 24120, 13092 => 38271, 13093 => 20607, 13094 => 32928, + 13095 => 21378, 13096 => 25950, 13097 => 30021, 13098 => 21809, 13099 => 20513, + 13100 => 36229, 13101 => 25220, 13102 => 38046, 13103 => 26397, 13104 => 22066, + 13105 => 28526, 13106 => 24034, 13107 => 21557, 13108 => 28818, 13109 => 36710, + 13110 => 25199, 13111 => 25764, 13112 => 25507, 13113 => 24443, 13114 => 28552, + 13115 => 37108, 13116 => 33251, 13117 => 36784, 13118 => 23576, 13119 => 26216, + 13120 => 24561, 13121 => 27785, 13122 => 38472, 13123 => 36225, 13124 => 34924, + 13125 => 25745, 13126 => 31216, 13127 => 22478, 13128 => 27225, 13129 => 25104, + 13130 => 21576, 13131 => 20056, 13132 => 31243, 13133 => 24809, 13134 => 28548, + 13135 => 35802, 13136 => 25215, 13137 => 36894, 13138 => 39563, 13139 => 31204, + 13140 => 21507, 13141 => 30196, 13142 => 25345, 13143 => 21273, 13144 => 27744, + 13145 => 36831, 13146 => 24347, 13147 => 39536, 13148 => 32827, 13149 => 40831, + 13150 => 20360, 13151 => 23610, 13152 => 36196, 13153 => 32709, 13154 => 26021, + 13155 => 28861, 13156 => 20805, 13157 => 20914, 13158 => 34411, 13159 => 23815, + 13160 => 23456, 13161 => 25277, 13162 => 37228, 13163 => 30068, 13164 => 36364, + 13165 => 31264, 13166 => 24833, 13167 => 31609, 13168 => 20167, 13169 => 32504, + 13170 => 30597, 13171 => 19985, 13172 => 33261, 13173 => 21021, 13174 => 20986, + 13175 => 27249, 13176 => 21416, 13177 => 36487, 13178 => 38148, 13179 => 38607, + 13180 => 28353, 13181 => 38500, 13182 => 26970, 13345 => 30784, 13346 => 20648, + 13347 => 30679, 13348 => 25616, 13349 => 35302, 13350 => 22788, 13351 => 25571, + 13352 => 24029, 13353 => 31359, 13354 => 26941, 13355 => 20256, 13356 => 33337, + 13357 => 21912, 13358 => 20018, 13359 => 30126, 13360 => 31383, 13361 => 24162, + 13362 => 24202, 13363 => 38383, 13364 => 21019, 13365 => 21561, 13366 => 28810, + 13367 => 25462, 13368 => 38180, 13369 => 22402, 13370 => 26149, 13371 => 26943, + 13372 => 37255, 13373 => 21767, 13374 => 28147, 13375 => 32431, 13376 => 34850, + 13377 => 25139, 13378 => 32496, 13379 => 30133, 13380 => 33576, 13381 => 30913, + 13382 => 38604, 13383 => 36766, 13384 => 24904, 13385 => 29943, 13386 => 35789, + 13387 => 27492, 13388 => 21050, 13389 => 36176, 13390 => 27425, 13391 => 32874, + 13392 => 33905, 13393 => 22257, 13394 => 21254, 13395 => 20174, 13396 => 19995, + 13397 => 20945, 13398 => 31895, 13399 => 37259, 13400 => 31751, 13401 => 20419, + 13402 => 36479, 13403 => 31713, 13404 => 31388, 13405 => 25703, 13406 => 23828, + 13407 => 20652, 13408 => 33030, 13409 => 30209, 13410 => 31929, 13411 => 28140, + 13412 => 32736, 13413 => 26449, 13414 => 23384, 13415 => 23544, 13416 => 30923, + 13417 => 25774, 13418 => 25619, 13419 => 25514, 13420 => 25387, 13421 => 38169, + 13422 => 25645, 13423 => 36798, 13424 => 31572, 13425 => 30249, 13426 => 25171, + 13427 => 22823, 13428 => 21574, 13429 => 27513, 13430 => 20643, 13431 => 25140, + 13432 => 24102, 13433 => 27526, 13434 => 20195, 13435 => 36151, 13436 => 34955, + 13437 => 24453, 13438 => 36910, 13601 => 24608, 13602 => 32829, 13603 => 25285, + 13604 => 20025, 13605 => 21333, 13606 => 37112, 13607 => 25528, 13608 => 32966, + 13609 => 26086, 13610 => 27694, 13611 => 20294, 13612 => 24814, 13613 => 28129, + 13614 => 35806, 13615 => 24377, 13616 => 34507, 13617 => 24403, 13618 => 25377, + 13619 => 20826, 13620 => 33633, 13621 => 26723, 13622 => 20992, 13623 => 25443, + 13624 => 36424, 13625 => 20498, 13626 => 23707, 13627 => 31095, 13628 => 23548, + 13629 => 21040, 13630 => 31291, 13631 => 24764, 13632 => 36947, 13633 => 30423, + 13634 => 24503, 13635 => 24471, 13636 => 30340, 13637 => 36460, 13638 => 28783, + 13639 => 30331, 13640 => 31561, 13641 => 30634, 13642 => 20979, 13643 => 37011, + 13644 => 22564, 13645 => 20302, 13646 => 28404, 13647 => 36842, 13648 => 25932, + 13649 => 31515, 13650 => 29380, 13651 => 28068, 13652 => 32735, 13653 => 23265, + 13654 => 25269, 13655 => 24213, 13656 => 22320, 13657 => 33922, 13658 => 31532, + 13659 => 24093, 13660 => 24351, 13661 => 36882, 13662 => 32532, 13663 => 39072, + 13664 => 25474, 13665 => 28359, 13666 => 30872, 13667 => 28857, 13668 => 20856, + 13669 => 38747, 13670 => 22443, 13671 => 30005, 13672 => 20291, 13673 => 30008, + 13674 => 24215, 13675 => 24806, 13676 => 22880, 13677 => 28096, 13678 => 27583, + 13679 => 30857, 13680 => 21500, 13681 => 38613, 13682 => 20939, 13683 => 20993, + 13684 => 25481, 13685 => 21514, 13686 => 38035, 13687 => 35843, 13688 => 36300, + 13689 => 29241, 13690 => 30879, 13691 => 34678, 13692 => 36845, 13693 => 35853, + 13694 => 21472, 13857 => 19969, 13858 => 30447, 13859 => 21486, 13860 => 38025, + 13861 => 39030, 13862 => 40718, 13863 => 38189, 13864 => 23450, 13865 => 35746, + 13866 => 20002, 13867 => 19996, 13868 => 20908, 13869 => 33891, 13870 => 25026, + 13871 => 21160, 13872 => 26635, 13873 => 20375, 13874 => 24683, 13875 => 20923, + 13876 => 27934, 13877 => 20828, 13878 => 25238, 13879 => 26007, 13880 => 38497, + 13881 => 35910, 13882 => 36887, 13883 => 30168, 13884 => 37117, 13885 => 30563, + 13886 => 27602, 13887 => 29322, 13888 => 29420, 13889 => 35835, 13890 => 22581, + 13891 => 30585, 13892 => 36172, 13893 => 26460, 13894 => 38208, 13895 => 32922, + 13896 => 24230, 13897 => 28193, 13898 => 22930, 13899 => 31471, 13900 => 30701, + 13901 => 38203, 13902 => 27573, 13903 => 26029, 13904 => 32526, 13905 => 22534, + 13906 => 20817, 13907 => 38431, 13908 => 23545, 13909 => 22697, 13910 => 21544, + 13911 => 36466, 13912 => 25958, 13913 => 39039, 13914 => 22244, 13915 => 38045, + 13916 => 30462, 13917 => 36929, 13918 => 25479, 13919 => 21702, 13920 => 22810, + 13921 => 22842, 13922 => 22427, 13923 => 36530, 13924 => 26421, 13925 => 36346, + 13926 => 33333, 13927 => 21057, 13928 => 24816, 13929 => 22549, 13930 => 34558, + 13931 => 23784, 13932 => 40517, 13933 => 20420, 13934 => 39069, 13935 => 35769, + 13936 => 23077, 13937 => 24694, 13938 => 21380, 13939 => 25212, 13940 => 36943, + 13941 => 37122, 13942 => 39295, 13943 => 24681, 13944 => 32780, 13945 => 20799, + 13946 => 32819, 13947 => 23572, 13948 => 39285, 13949 => 27953, 13950 => 20108, + 14113 => 36144, 14114 => 21457, 14115 => 32602, 14116 => 31567, 14117 => 20240, + 14118 => 20047, 14119 => 38400, 14120 => 27861, 14121 => 29648, 14122 => 34281, + 14123 => 24070, 14124 => 30058, 14125 => 32763, 14126 => 27146, 14127 => 30718, + 14128 => 38034, 14129 => 32321, 14130 => 20961, 14131 => 28902, 14132 => 21453, + 14133 => 36820, 14134 => 33539, 14135 => 36137, 14136 => 29359, 14137 => 39277, + 14138 => 27867, 14139 => 22346, 14140 => 33459, 14141 => 26041, 14142 => 32938, + 14143 => 25151, 14144 => 38450, 14145 => 22952, 14146 => 20223, 14147 => 35775, + 14148 => 32442, 14149 => 25918, 14150 => 33778, 14151 => 38750, 14152 => 21857, + 14153 => 39134, 14154 => 32933, 14155 => 21290, 14156 => 35837, 14157 => 21536, + 14158 => 32954, 14159 => 24223, 14160 => 27832, 14161 => 36153, 14162 => 33452, + 14163 => 37210, 14164 => 21545, 14165 => 27675, 14166 => 20998, 14167 => 32439, + 14168 => 22367, 14169 => 28954, 14170 => 27774, 14171 => 31881, 14172 => 22859, + 14173 => 20221, 14174 => 24575, 14175 => 24868, 14176 => 31914, 14177 => 20016, + 14178 => 23553, 14179 => 26539, 14180 => 34562, 14181 => 23792, 14182 => 38155, + 14183 => 39118, 14184 => 30127, 14185 => 28925, 14186 => 36898, 14187 => 20911, + 14188 => 32541, 14189 => 35773, 14190 => 22857, 14191 => 20964, 14192 => 20315, + 14193 => 21542, 14194 => 22827, 14195 => 25975, 14196 => 32932, 14197 => 23413, + 14198 => 25206, 14199 => 25282, 14200 => 36752, 14201 => 24133, 14202 => 27679, + 14203 => 31526, 14204 => 20239, 14205 => 20440, 14206 => 26381, 14369 => 28014, + 14370 => 28074, 14371 => 31119, 14372 => 34993, 14373 => 24343, 14374 => 29995, + 14375 => 25242, 14376 => 36741, 14377 => 20463, 14378 => 37340, 14379 => 26023, + 14380 => 33071, 14381 => 33105, 14382 => 24220, 14383 => 33104, 14384 => 36212, + 14385 => 21103, 14386 => 35206, 14387 => 36171, 14388 => 22797, 14389 => 20613, + 14390 => 20184, 14391 => 38428, 14392 => 29238, 14393 => 33145, 14394 => 36127, + 14395 => 23500, 14396 => 35747, 14397 => 38468, 14398 => 22919, 14399 => 32538, + 14400 => 21648, 14401 => 22134, 14402 => 22030, 14403 => 35813, 14404 => 25913, + 14405 => 27010, 14406 => 38041, 14407 => 30422, 14408 => 28297, 14409 => 24178, + 14410 => 29976, 14411 => 26438, 14412 => 26577, 14413 => 31487, 14414 => 32925, + 14415 => 36214, 14416 => 24863, 14417 => 31174, 14418 => 25954, 14419 => 36195, + 14420 => 20872, 14421 => 21018, 14422 => 38050, 14423 => 32568, 14424 => 32923, + 14425 => 32434, 14426 => 23703, 14427 => 28207, 14428 => 26464, 14429 => 31705, + 14430 => 30347, 14431 => 39640, 14432 => 33167, 14433 => 32660, 14434 => 31957, + 14435 => 25630, 14436 => 38224, 14437 => 31295, 14438 => 21578, 14439 => 21733, + 14440 => 27468, 14441 => 25601, 14442 => 25096, 14443 => 40509, 14444 => 33011, + 14445 => 30105, 14446 => 21106, 14447 => 38761, 14448 => 33883, 14449 => 26684, + 14450 => 34532, 14451 => 38401, 14452 => 38548, 14453 => 38124, 14454 => 20010, + 14455 => 21508, 14456 => 32473, 14457 => 26681, 14458 => 36319, 14459 => 32789, + 14460 => 26356, 14461 => 24218, 14462 => 32697, 14625 => 22466, 14626 => 32831, + 14627 => 26775, 14628 => 24037, 14629 => 25915, 14630 => 21151, 14631 => 24685, + 14632 => 40858, 14633 => 20379, 14634 => 36524, 14635 => 20844, 14636 => 23467, + 14637 => 24339, 14638 => 24041, 14639 => 27742, 14640 => 25329, 14641 => 36129, + 14642 => 20849, 14643 => 38057, 14644 => 21246, 14645 => 27807, 14646 => 33503, + 14647 => 29399, 14648 => 22434, 14649 => 26500, 14650 => 36141, 14651 => 22815, + 14652 => 36764, 14653 => 33735, 14654 => 21653, 14655 => 31629, 14656 => 20272, + 14657 => 27837, 14658 => 23396, 14659 => 22993, 14660 => 40723, 14661 => 21476, + 14662 => 34506, 14663 => 39592, 14664 => 35895, 14665 => 32929, 14666 => 25925, + 14667 => 39038, 14668 => 22266, 14669 => 38599, 14670 => 21038, 14671 => 29916, + 14672 => 21072, 14673 => 23521, 14674 => 25346, 14675 => 35074, 14676 => 20054, + 14677 => 25296, 14678 => 24618, 14679 => 26874, 14680 => 20851, 14681 => 23448, + 14682 => 20896, 14683 => 35266, 14684 => 31649, 14685 => 39302, 14686 => 32592, + 14687 => 24815, 14688 => 28748, 14689 => 36143, 14690 => 20809, 14691 => 24191, + 14692 => 36891, 14693 => 29808, 14694 => 35268, 14695 => 22317, 14696 => 30789, + 14697 => 24402, 14698 => 40863, 14699 => 38394, 14700 => 36712, 14701 => 39740, + 14702 => 35809, 14703 => 30328, 14704 => 26690, 14705 => 26588, 14706 => 36330, + 14707 => 36149, 14708 => 21053, 14709 => 36746, 14710 => 28378, 14711 => 26829, + 14712 => 38149, 14713 => 37101, 14714 => 22269, 14715 => 26524, 14716 => 35065, + 14717 => 36807, 14718 => 21704, 14881 => 39608, 14882 => 23401, 14883 => 28023, + 14884 => 27686, 14885 => 20133, 14886 => 23475, 14887 => 39559, 14888 => 37219, + 14889 => 25000, 14890 => 37039, 14891 => 38889, 14892 => 21547, 14893 => 28085, + 14894 => 23506, 14895 => 20989, 14896 => 21898, 14897 => 32597, 14898 => 32752, + 14899 => 25788, 14900 => 25421, 14901 => 26097, 14902 => 25022, 14903 => 24717, + 14904 => 28938, 14905 => 27735, 14906 => 27721, 14907 => 22831, 14908 => 26477, + 14909 => 33322, 14910 => 22741, 14911 => 22158, 14912 => 35946, 14913 => 27627, + 14914 => 37085, 14915 => 22909, 14916 => 32791, 14917 => 21495, 14918 => 28009, + 14919 => 21621, 14920 => 21917, 14921 => 33655, 14922 => 33743, 14923 => 26680, + 14924 => 31166, 14925 => 21644, 14926 => 20309, 14927 => 21512, 14928 => 30418, + 14929 => 35977, 14930 => 38402, 14931 => 27827, 14932 => 28088, 14933 => 36203, + 14934 => 35088, 14935 => 40548, 14936 => 36154, 14937 => 22079, 14938 => 40657, + 14939 => 30165, 14940 => 24456, 14941 => 29408, 14942 => 24680, 14943 => 21756, + 14944 => 20136, 14945 => 27178, 14946 => 34913, 14947 => 24658, 14948 => 36720, + 14949 => 21700, 14950 => 28888, 14951 => 34425, 14952 => 40511, 14953 => 27946, + 14954 => 23439, 14955 => 24344, 14956 => 32418, 14957 => 21897, 14958 => 20399, + 14959 => 29492, 14960 => 21564, 14961 => 21402, 14962 => 20505, 14963 => 21518, + 14964 => 21628, 14965 => 20046, 14966 => 24573, 14967 => 29786, 14968 => 22774, + 14969 => 33899, 14970 => 32993, 14971 => 34676, 14972 => 29392, 14973 => 31946, + 14974 => 28246, 15137 => 24359, 15138 => 34382, 15139 => 21804, 15140 => 25252, + 15141 => 20114, 15142 => 27818, 15143 => 25143, 15144 => 33457, 15145 => 21719, + 15146 => 21326, 15147 => 29502, 15148 => 28369, 15149 => 30011, 15150 => 21010, + 15151 => 21270, 15152 => 35805, 15153 => 27088, 15154 => 24458, 15155 => 24576, + 15156 => 28142, 15157 => 22351, 15158 => 27426, 15159 => 29615, 15160 => 26707, + 15161 => 36824, 15162 => 32531, 15163 => 25442, 15164 => 24739, 15165 => 21796, + 15166 => 30186, 15167 => 35938, 15168 => 28949, 15169 => 28067, 15170 => 23462, + 15171 => 24187, 15172 => 33618, 15173 => 24908, 15174 => 40644, 15175 => 30970, + 15176 => 34647, 15177 => 31783, 15178 => 30343, 15179 => 20976, 15180 => 24822, + 15181 => 29004, 15182 => 26179, 15183 => 24140, 15184 => 24653, 15185 => 35854, + 15186 => 28784, 15187 => 25381, 15188 => 36745, 15189 => 24509, 15190 => 24674, + 15191 => 34516, 15192 => 22238, 15193 => 27585, 15194 => 24724, 15195 => 24935, + 15196 => 21321, 15197 => 24800, 15198 => 26214, 15199 => 36159, 15200 => 31229, + 15201 => 20250, 15202 => 28905, 15203 => 27719, 15204 => 35763, 15205 => 35826, + 15206 => 32472, 15207 => 33636, 15208 => 26127, 15209 => 23130, 15210 => 39746, + 15211 => 27985, 15212 => 28151, 15213 => 35905, 15214 => 27963, 15215 => 20249, + 15216 => 28779, 15217 => 33719, 15218 => 25110, 15219 => 24785, 15220 => 38669, + 15221 => 36135, 15222 => 31096, 15223 => 20987, 15224 => 22334, 15225 => 22522, + 15226 => 26426, 15227 => 30072, 15228 => 31293, 15229 => 31215, 15230 => 31637, + 15393 => 32908, 15394 => 39269, 15395 => 36857, 15396 => 28608, 15397 => 35749, + 15398 => 40481, 15399 => 23020, 15400 => 32489, 15401 => 32521, 15402 => 21513, + 15403 => 26497, 15404 => 26840, 15405 => 36753, 15406 => 31821, 15407 => 38598, + 15408 => 21450, 15409 => 24613, 15410 => 30142, 15411 => 27762, 15412 => 21363, + 15413 => 23241, 15414 => 32423, 15415 => 25380, 15416 => 20960, 15417 => 33034, + 15418 => 24049, 15419 => 34015, 15420 => 25216, 15421 => 20864, 15422 => 23395, + 15423 => 20238, 15424 => 31085, 15425 => 21058, 15426 => 24760, 15427 => 27982, + 15428 => 23492, 15429 => 23490, 15430 => 35745, 15431 => 35760, 15432 => 26082, + 15433 => 24524, 15434 => 38469, 15435 => 22931, 15436 => 32487, 15437 => 32426, + 15438 => 22025, 15439 => 26551, 15440 => 22841, 15441 => 20339, 15442 => 23478, + 15443 => 21152, 15444 => 33626, 15445 => 39050, 15446 => 36158, 15447 => 30002, + 15448 => 38078, 15449 => 20551, 15450 => 31292, 15451 => 20215, 15452 => 26550, + 15453 => 39550, 15454 => 23233, 15455 => 27516, 15456 => 30417, 15457 => 22362, + 15458 => 23574, 15459 => 31546, 15460 => 38388, 15461 => 29006, 15462 => 20860, + 15463 => 32937, 15464 => 33392, 15465 => 22904, 15466 => 32516, 15467 => 33575, + 15468 => 26816, 15469 => 26604, 15470 => 30897, 15471 => 30839, 15472 => 25315, + 15473 => 25441, 15474 => 31616, 15475 => 20461, 15476 => 21098, 15477 => 20943, + 15478 => 33616, 15479 => 27099, 15480 => 37492, 15481 => 36341, 15482 => 36145, + 15483 => 35265, 15484 => 38190, 15485 => 31661, 15486 => 20214, 15649 => 20581, + 15650 => 33328, 15651 => 21073, 15652 => 39279, 15653 => 28176, 15654 => 28293, + 15655 => 28071, 15656 => 24314, 15657 => 20725, 15658 => 23004, 15659 => 23558, + 15660 => 27974, 15661 => 27743, 15662 => 30086, 15663 => 33931, 15664 => 26728, + 15665 => 22870, 15666 => 35762, 15667 => 21280, 15668 => 37233, 15669 => 38477, + 15670 => 34121, 15671 => 26898, 15672 => 30977, 15673 => 28966, 15674 => 33014, + 15675 => 20132, 15676 => 37066, 15677 => 27975, 15678 => 39556, 15679 => 23047, + 15680 => 22204, 15681 => 25605, 15682 => 38128, 15683 => 30699, 15684 => 20389, + 15685 => 33050, 15686 => 29409, 15687 => 35282, 15688 => 39290, 15689 => 32564, + 15690 => 32478, 15691 => 21119, 15692 => 25945, 15693 => 37237, 15694 => 36735, + 15695 => 36739, 15696 => 21483, 15697 => 31382, 15698 => 25581, 15699 => 25509, + 15700 => 30342, 15701 => 31224, 15702 => 34903, 15703 => 38454, 15704 => 25130, + 15705 => 21163, 15706 => 33410, 15707 => 26708, 15708 => 26480, 15709 => 25463, + 15710 => 30571, 15711 => 31469, 15712 => 27905, 15713 => 32467, 15714 => 35299, + 15715 => 22992, 15716 => 25106, 15717 => 34249, 15718 => 33445, 15719 => 30028, + 15720 => 20511, 15721 => 20171, 15722 => 30117, 15723 => 35819, 15724 => 23626, + 15725 => 24062, 15726 => 31563, 15727 => 26020, 15728 => 37329, 15729 => 20170, + 15730 => 27941, 15731 => 35167, 15732 => 32039, 15733 => 38182, 15734 => 20165, + 15735 => 35880, 15736 => 36827, 15737 => 38771, 15738 => 26187, 15739 => 31105, + 15740 => 36817, 15741 => 28908, 15742 => 28024, 15905 => 23613, 15906 => 21170, + 15907 => 33606, 15908 => 20834, 15909 => 33550, 15910 => 30555, 15911 => 26230, + 15912 => 40120, 15913 => 20140, 15914 => 24778, 15915 => 31934, 15916 => 31923, + 15917 => 32463, 15918 => 20117, 15919 => 35686, 15920 => 26223, 15921 => 39048, + 15922 => 38745, 15923 => 22659, 15924 => 25964, 15925 => 38236, 15926 => 24452, + 15927 => 30153, 15928 => 38742, 15929 => 31455, 15930 => 31454, 15931 => 20928, + 15932 => 28847, 15933 => 31384, 15934 => 25578, 15935 => 31350, 15936 => 32416, + 15937 => 29590, 15938 => 38893, 15939 => 20037, 15940 => 28792, 15941 => 20061, + 15942 => 37202, 15943 => 21417, 15944 => 25937, 15945 => 26087, 15946 => 33276, + 15947 => 33285, 15948 => 21646, 15949 => 23601, 15950 => 30106, 15951 => 38816, + 15952 => 25304, 15953 => 29401, 15954 => 30141, 15955 => 23621, 15956 => 39545, + 15957 => 33738, 15958 => 23616, 15959 => 21632, 15960 => 30697, 15961 => 20030, + 15962 => 27822, 15963 => 32858, 15964 => 25298, 15965 => 25454, 15966 => 24040, + 15967 => 20855, 15968 => 36317, 15969 => 36382, 15970 => 38191, 15971 => 20465, + 15972 => 21477, 15973 => 24807, 15974 => 28844, 15975 => 21095, 15976 => 25424, + 15977 => 40515, 15978 => 23071, 15979 => 20518, 15980 => 30519, 15981 => 21367, + 15982 => 32482, 15983 => 25733, 15984 => 25899, 15985 => 25225, 15986 => 25496, + 15987 => 20500, 15988 => 29237, 15989 => 35273, 15990 => 20915, 15991 => 35776, + 15992 => 32477, 15993 => 22343, 15994 => 33740, 15995 => 38055, 15996 => 20891, + 15997 => 21531, 15998 => 23803, 16161 => 20426, 16162 => 31459, 16163 => 27994, + 16164 => 37089, 16165 => 39567, 16166 => 21888, 16167 => 21654, 16168 => 21345, + 16169 => 21679, 16170 => 24320, 16171 => 25577, 16172 => 26999, 16173 => 20975, + 16174 => 24936, 16175 => 21002, 16176 => 22570, 16177 => 21208, 16178 => 22350, + 16179 => 30733, 16180 => 30475, 16181 => 24247, 16182 => 24951, 16183 => 31968, + 16184 => 25179, 16185 => 25239, 16186 => 20130, 16187 => 28821, 16188 => 32771, + 16189 => 25335, 16190 => 28900, 16191 => 38752, 16192 => 22391, 16193 => 33499, + 16194 => 26607, 16195 => 26869, 16196 => 30933, 16197 => 39063, 16198 => 31185, + 16199 => 22771, 16200 => 21683, 16201 => 21487, 16202 => 28212, 16203 => 20811, + 16204 => 21051, 16205 => 23458, 16206 => 35838, 16207 => 32943, 16208 => 21827, + 16209 => 22438, 16210 => 24691, 16211 => 22353, 16212 => 21549, 16213 => 31354, + 16214 => 24656, 16215 => 23380, 16216 => 25511, 16217 => 25248, 16218 => 21475, + 16219 => 25187, 16220 => 23495, 16221 => 26543, 16222 => 21741, 16223 => 31391, + 16224 => 33510, 16225 => 37239, 16226 => 24211, 16227 => 35044, 16228 => 22840, + 16229 => 22446, 16230 => 25358, 16231 => 36328, 16232 => 33007, 16233 => 22359, + 16234 => 31607, 16235 => 20393, 16236 => 24555, 16237 => 23485, 16238 => 27454, + 16239 => 21281, 16240 => 31568, 16241 => 29378, 16242 => 26694, 16243 => 30719, + 16244 => 30518, 16245 => 26103, 16246 => 20917, 16247 => 20111, 16248 => 30420, + 16249 => 23743, 16250 => 31397, 16251 => 33909, 16252 => 22862, 16253 => 39745, + 16254 => 20608, 16417 => 39304, 16418 => 24871, 16419 => 28291, 16420 => 22372, + 16421 => 26118, 16422 => 25414, 16423 => 22256, 16424 => 25324, 16425 => 25193, + 16426 => 24275, 16427 => 38420, 16428 => 22403, 16429 => 25289, 16430 => 21895, + 16431 => 34593, 16432 => 33098, 16433 => 36771, 16434 => 21862, 16435 => 33713, + 16436 => 26469, 16437 => 36182, 16438 => 34013, 16439 => 23146, 16440 => 26639, + 16441 => 25318, 16442 => 31726, 16443 => 38417, 16444 => 20848, 16445 => 28572, + 16446 => 35888, 16447 => 25597, 16448 => 35272, 16449 => 25042, 16450 => 32518, + 16451 => 28866, 16452 => 28389, 16453 => 29701, 16454 => 27028, 16455 => 29436, + 16456 => 24266, 16457 => 37070, 16458 => 26391, 16459 => 28010, 16460 => 25438, + 16461 => 21171, 16462 => 29282, 16463 => 32769, 16464 => 20332, 16465 => 23013, + 16466 => 37226, 16467 => 28889, 16468 => 28061, 16469 => 21202, 16470 => 20048, + 16471 => 38647, 16472 => 38253, 16473 => 34174, 16474 => 30922, 16475 => 32047, + 16476 => 20769, 16477 => 22418, 16478 => 25794, 16479 => 32907, 16480 => 31867, + 16481 => 27882, 16482 => 26865, 16483 => 26974, 16484 => 20919, 16485 => 21400, + 16486 => 26792, 16487 => 29313, 16488 => 40654, 16489 => 31729, 16490 => 29432, + 16491 => 31163, 16492 => 28435, 16493 => 29702, 16494 => 26446, 16495 => 37324, + 16496 => 40100, 16497 => 31036, 16498 => 33673, 16499 => 33620, 16500 => 21519, + 16501 => 26647, 16502 => 20029, 16503 => 21385, 16504 => 21169, 16505 => 30782, + 16506 => 21382, 16507 => 21033, 16508 => 20616, 16509 => 20363, 16510 => 20432, + 16673 => 30178, 16674 => 31435, 16675 => 31890, 16676 => 27813, 16677 => 38582, + 16678 => 21147, 16679 => 29827, 16680 => 21737, 16681 => 20457, 16682 => 32852, + 16683 => 33714, 16684 => 36830, 16685 => 38256, 16686 => 24265, 16687 => 24604, + 16688 => 28063, 16689 => 24088, 16690 => 25947, 16691 => 33080, 16692 => 38142, + 16693 => 24651, 16694 => 28860, 16695 => 32451, 16696 => 31918, 16697 => 20937, + 16698 => 26753, 16699 => 31921, 16700 => 33391, 16701 => 20004, 16702 => 36742, + 16703 => 37327, 16704 => 26238, 16705 => 20142, 16706 => 35845, 16707 => 25769, + 16708 => 32842, 16709 => 20698, 16710 => 30103, 16711 => 29134, 16712 => 23525, + 16713 => 36797, 16714 => 28518, 16715 => 20102, 16716 => 25730, 16717 => 38243, + 16718 => 24278, 16719 => 26009, 16720 => 21015, 16721 => 35010, 16722 => 28872, + 16723 => 21155, 16724 => 29454, 16725 => 29747, 16726 => 26519, 16727 => 30967, + 16728 => 38678, 16729 => 20020, 16730 => 37051, 16731 => 40158, 16732 => 28107, + 16733 => 20955, 16734 => 36161, 16735 => 21533, 16736 => 25294, 16737 => 29618, + 16738 => 33777, 16739 => 38646, 16740 => 40836, 16741 => 38083, 16742 => 20278, + 16743 => 32666, 16744 => 20940, 16745 => 28789, 16746 => 38517, 16747 => 23725, + 16748 => 39046, 16749 => 21478, 16750 => 20196, 16751 => 28316, 16752 => 29705, + 16753 => 27060, 16754 => 30827, 16755 => 39311, 16756 => 30041, 16757 => 21016, + 16758 => 30244, 16759 => 27969, 16760 => 26611, 16761 => 20845, 16762 => 40857, + 16763 => 32843, 16764 => 21657, 16765 => 31548, 16766 => 31423, 16929 => 38534, + 16930 => 22404, 16931 => 25314, 16932 => 38471, 16933 => 27004, 16934 => 23044, + 16935 => 25602, 16936 => 31699, 16937 => 28431, 16938 => 38475, 16939 => 33446, + 16940 => 21346, 16941 => 39045, 16942 => 24208, 16943 => 28809, 16944 => 25523, + 16945 => 21348, 16946 => 34383, 16947 => 40065, 16948 => 40595, 16949 => 30860, + 16950 => 38706, 16951 => 36335, 16952 => 36162, 16953 => 40575, 16954 => 28510, + 16955 => 31108, 16956 => 24405, 16957 => 38470, 16958 => 25134, 16959 => 39540, + 16960 => 21525, 16961 => 38109, 16962 => 20387, 16963 => 26053, 16964 => 23653, + 16965 => 23649, 16966 => 32533, 16967 => 34385, 16968 => 27695, 16969 => 24459, + 16970 => 29575, 16971 => 28388, 16972 => 32511, 16973 => 23782, 16974 => 25371, + 16975 => 23402, 16976 => 28390, 16977 => 21365, 16978 => 20081, 16979 => 25504, + 16980 => 30053, 16981 => 25249, 16982 => 36718, 16983 => 20262, 16984 => 20177, + 16985 => 27814, 16986 => 32438, 16987 => 35770, 16988 => 33821, 16989 => 34746, + 16990 => 32599, 16991 => 36923, 16992 => 38179, 16993 => 31657, 16994 => 39585, + 16995 => 35064, 16996 => 33853, 16997 => 27931, 16998 => 39558, 16999 => 32476, + 17000 => 22920, 17001 => 40635, 17002 => 29595, 17003 => 30721, 17004 => 34434, + 17005 => 39532, 17006 => 39554, 17007 => 22043, 17008 => 21527, 17009 => 22475, + 17010 => 20080, 17011 => 40614, 17012 => 21334, 17013 => 36808, 17014 => 33033, + 17015 => 30610, 17016 => 39314, 17017 => 34542, 17018 => 28385, 17019 => 34067, + 17020 => 26364, 17021 => 24930, 17022 => 28459, 17185 => 35881, 17186 => 33426, + 17187 => 33579, 17188 => 30450, 17189 => 27667, 17190 => 24537, 17191 => 33725, + 17192 => 29483, 17193 => 33541, 17194 => 38170, 17195 => 27611, 17196 => 30683, + 17197 => 38086, 17198 => 21359, 17199 => 33538, 17200 => 20882, 17201 => 24125, + 17202 => 35980, 17203 => 36152, 17204 => 20040, 17205 => 29611, 17206 => 26522, + 17207 => 26757, 17208 => 37238, 17209 => 38665, 17210 => 29028, 17211 => 27809, + 17212 => 30473, 17213 => 23186, 17214 => 38209, 17215 => 27599, 17216 => 32654, + 17217 => 26151, 17218 => 23504, 17219 => 22969, 17220 => 23194, 17221 => 38376, + 17222 => 38391, 17223 => 20204, 17224 => 33804, 17225 => 33945, 17226 => 27308, + 17227 => 30431, 17228 => 38192, 17229 => 29467, 17230 => 26790, 17231 => 23391, + 17232 => 30511, 17233 => 37274, 17234 => 38753, 17235 => 31964, 17236 => 36855, + 17237 => 35868, 17238 => 24357, 17239 => 31859, 17240 => 31192, 17241 => 35269, + 17242 => 27852, 17243 => 34588, 17244 => 23494, 17245 => 24130, 17246 => 26825, + 17247 => 30496, 17248 => 32501, 17249 => 20885, 17250 => 20813, 17251 => 21193, + 17252 => 23081, 17253 => 32517, 17254 => 38754, 17255 => 33495, 17256 => 25551, + 17257 => 30596, 17258 => 34256, 17259 => 31186, 17260 => 28218, 17261 => 24217, + 17262 => 22937, 17263 => 34065, 17264 => 28781, 17265 => 27665, 17266 => 25279, + 17267 => 30399, 17268 => 25935, 17269 => 24751, 17270 => 38397, 17271 => 26126, + 17272 => 34719, 17273 => 40483, 17274 => 38125, 17275 => 21517, 17276 => 21629, + 17277 => 35884, 17278 => 25720, 17441 => 25721, 17442 => 34321, 17443 => 27169, + 17444 => 33180, 17445 => 30952, 17446 => 25705, 17447 => 39764, 17448 => 25273, + 17449 => 26411, 17450 => 33707, 17451 => 22696, 17452 => 40664, 17453 => 27819, + 17454 => 28448, 17455 => 23518, 17456 => 38476, 17457 => 35851, 17458 => 29279, + 17459 => 26576, 17460 => 25287, 17461 => 29281, 17462 => 20137, 17463 => 22982, + 17464 => 27597, 17465 => 22675, 17466 => 26286, 17467 => 24149, 17468 => 21215, + 17469 => 24917, 17470 => 26408, 17471 => 30446, 17472 => 30566, 17473 => 29287, + 17474 => 31302, 17475 => 25343, 17476 => 21738, 17477 => 21584, 17478 => 38048, + 17479 => 37027, 17480 => 23068, 17481 => 32435, 17482 => 27670, 17483 => 20035, + 17484 => 22902, 17485 => 32784, 17486 => 22856, 17487 => 21335, 17488 => 30007, + 17489 => 38590, 17490 => 22218, 17491 => 25376, 17492 => 33041, 17493 => 24700, + 17494 => 38393, 17495 => 28118, 17496 => 21602, 17497 => 39297, 17498 => 20869, + 17499 => 23273, 17500 => 33021, 17501 => 22958, 17502 => 38675, 17503 => 20522, + 17504 => 27877, 17505 => 23612, 17506 => 25311, 17507 => 20320, 17508 => 21311, + 17509 => 33147, 17510 => 36870, 17511 => 28346, 17512 => 34091, 17513 => 25288, + 17514 => 24180, 17515 => 30910, 17516 => 25781, 17517 => 25467, 17518 => 24565, + 17519 => 23064, 17520 => 37247, 17521 => 40479, 17522 => 23615, 17523 => 25423, + 17524 => 32834, 17525 => 23421, 17526 => 21870, 17527 => 38218, 17528 => 38221, + 17529 => 28037, 17530 => 24744, 17531 => 26592, 17532 => 29406, 17533 => 20957, + 17534 => 23425, 17697 => 25319, 17698 => 27870, 17699 => 29275, 17700 => 25197, + 17701 => 38062, 17702 => 32445, 17703 => 33043, 17704 => 27987, 17705 => 20892, + 17706 => 24324, 17707 => 22900, 17708 => 21162, 17709 => 24594, 17710 => 22899, + 17711 => 26262, 17712 => 34384, 17713 => 30111, 17714 => 25386, 17715 => 25062, + 17716 => 31983, 17717 => 35834, 17718 => 21734, 17719 => 27431, 17720 => 40485, + 17721 => 27572, 17722 => 34261, 17723 => 21589, 17724 => 20598, 17725 => 27812, + 17726 => 21866, 17727 => 36276, 17728 => 29228, 17729 => 24085, 17730 => 24597, + 17731 => 29750, 17732 => 25293, 17733 => 25490, 17734 => 29260, 17735 => 24472, + 17736 => 28227, 17737 => 27966, 17738 => 25856, 17739 => 28504, 17740 => 30424, + 17741 => 30928, 17742 => 30460, 17743 => 30036, 17744 => 21028, 17745 => 21467, + 17746 => 20051, 17747 => 24222, 17748 => 26049, 17749 => 32810, 17750 => 32982, + 17751 => 25243, 17752 => 21638, 17753 => 21032, 17754 => 28846, 17755 => 34957, + 17756 => 36305, 17757 => 27873, 17758 => 21624, 17759 => 32986, 17760 => 22521, + 17761 => 35060, 17762 => 36180, 17763 => 38506, 17764 => 37197, 17765 => 20329, + 17766 => 27803, 17767 => 21943, 17768 => 30406, 17769 => 30768, 17770 => 25256, + 17771 => 28921, 17772 => 28558, 17773 => 24429, 17774 => 34028, 17775 => 26842, + 17776 => 30844, 17777 => 31735, 17778 => 33192, 17779 => 26379, 17780 => 40527, + 17781 => 25447, 17782 => 30896, 17783 => 22383, 17784 => 30738, 17785 => 38713, + 17786 => 25209, 17787 => 25259, 17788 => 21128, 17789 => 29749, 17790 => 27607, + 17953 => 21860, 17954 => 33086, 17955 => 30130, 17956 => 30382, 17957 => 21305, + 17958 => 30174, 17959 => 20731, 17960 => 23617, 17961 => 35692, 17962 => 31687, + 17963 => 20559, 17964 => 29255, 17965 => 39575, 17966 => 39128, 17967 => 28418, + 17968 => 29922, 17969 => 31080, 17970 => 25735, 17971 => 30629, 17972 => 25340, + 17973 => 39057, 17974 => 36139, 17975 => 21697, 17976 => 32856, 17977 => 20050, + 17978 => 22378, 17979 => 33529, 17980 => 33805, 17981 => 24179, 17982 => 20973, + 17983 => 29942, 17984 => 35780, 17985 => 23631, 17986 => 22369, 17987 => 27900, + 17988 => 39047, 17989 => 23110, 17990 => 30772, 17991 => 39748, 17992 => 36843, + 17993 => 31893, 17994 => 21078, 17995 => 25169, 17996 => 38138, 17997 => 20166, + 17998 => 33670, 17999 => 33889, 18000 => 33769, 18001 => 33970, 18002 => 22484, + 18003 => 26420, 18004 => 22275, 18005 => 26222, 18006 => 28006, 18007 => 35889, + 18008 => 26333, 18009 => 28689, 18010 => 26399, 18011 => 27450, 18012 => 26646, + 18013 => 25114, 18014 => 22971, 18015 => 19971, 18016 => 20932, 18017 => 28422, + 18018 => 26578, 18019 => 27791, 18020 => 20854, 18021 => 26827, 18022 => 22855, + 18023 => 27495, 18024 => 30054, 18025 => 23822, 18026 => 33040, 18027 => 40784, + 18028 => 26071, 18029 => 31048, 18030 => 31041, 18031 => 39569, 18032 => 36215, + 18033 => 23682, 18034 => 20062, 18035 => 20225, 18036 => 21551, 18037 => 22865, + 18038 => 30732, 18039 => 22120, 18040 => 27668, 18041 => 36804, 18042 => 24323, + 18043 => 27773, 18044 => 27875, 18045 => 35755, 18046 => 25488, 18209 => 24688, + 18210 => 27965, 18211 => 29301, 18212 => 25190, 18213 => 38030, 18214 => 38085, + 18215 => 21315, 18216 => 36801, 18217 => 31614, 18218 => 20191, 18219 => 35878, + 18220 => 20094, 18221 => 40660, 18222 => 38065, 18223 => 38067, 18224 => 21069, + 18225 => 28508, 18226 => 36963, 18227 => 27973, 18228 => 35892, 18229 => 22545, + 18230 => 23884, 18231 => 27424, 18232 => 27465, 18233 => 26538, 18234 => 21595, + 18235 => 33108, 18236 => 32652, 18237 => 22681, 18238 => 34103, 18239 => 24378, + 18240 => 25250, 18241 => 27207, 18242 => 38201, 18243 => 25970, 18244 => 24708, + 18245 => 26725, 18246 => 30631, 18247 => 20052, 18248 => 20392, 18249 => 24039, + 18250 => 38808, 18251 => 25772, 18252 => 32728, 18253 => 23789, 18254 => 20431, + 18255 => 31373, 18256 => 20999, 18257 => 33540, 18258 => 19988, 18259 => 24623, + 18260 => 31363, 18261 => 38054, 18262 => 20405, 18263 => 20146, 18264 => 31206, + 18265 => 29748, 18266 => 21220, 18267 => 33465, 18268 => 25810, 18269 => 31165, + 18270 => 23517, 18271 => 27777, 18272 => 38738, 18273 => 36731, 18274 => 27682, + 18275 => 20542, 18276 => 21375, 18277 => 28165, 18278 => 25806, 18279 => 26228, + 18280 => 27696, 18281 => 24773, 18282 => 39031, 18283 => 35831, 18284 => 24198, + 18285 => 29756, 18286 => 31351, 18287 => 31179, 18288 => 19992, 18289 => 37041, + 18290 => 29699, 18291 => 27714, 18292 => 22234, 18293 => 37195, 18294 => 27845, + 18295 => 36235, 18296 => 21306, 18297 => 34502, 18298 => 26354, 18299 => 36527, + 18300 => 23624, 18301 => 39537, 18302 => 28192, 18465 => 21462, 18466 => 23094, + 18467 => 40843, 18468 => 36259, 18469 => 21435, 18470 => 22280, 18471 => 39079, + 18472 => 26435, 18473 => 37275, 18474 => 27849, 18475 => 20840, 18476 => 30154, + 18477 => 25331, 18478 => 29356, 18479 => 21048, 18480 => 21149, 18481 => 32570, + 18482 => 28820, 18483 => 30264, 18484 => 21364, 18485 => 40522, 18486 => 27063, + 18487 => 30830, 18488 => 38592, 18489 => 35033, 18490 => 32676, 18491 => 28982, + 18492 => 29123, 18493 => 20873, 18494 => 26579, 18495 => 29924, 18496 => 22756, + 18497 => 25880, 18498 => 22199, 18499 => 35753, 18500 => 39286, 18501 => 25200, + 18502 => 32469, 18503 => 24825, 18504 => 28909, 18505 => 22764, 18506 => 20161, + 18507 => 20154, 18508 => 24525, 18509 => 38887, 18510 => 20219, 18511 => 35748, + 18512 => 20995, 18513 => 22922, 18514 => 32427, 18515 => 25172, 18516 => 20173, + 18517 => 26085, 18518 => 25102, 18519 => 33592, 18520 => 33993, 18521 => 33635, + 18522 => 34701, 18523 => 29076, 18524 => 28342, 18525 => 23481, 18526 => 32466, + 18527 => 20887, 18528 => 25545, 18529 => 26580, 18530 => 32905, 18531 => 33593, + 18532 => 34837, 18533 => 20754, 18534 => 23418, 18535 => 22914, 18536 => 36785, + 18537 => 20083, 18538 => 27741, 18539 => 20837, 18540 => 35109, 18541 => 36719, + 18542 => 38446, 18543 => 34122, 18544 => 29790, 18545 => 38160, 18546 => 38384, + 18547 => 28070, 18548 => 33509, 18549 => 24369, 18550 => 25746, 18551 => 27922, + 18552 => 33832, 18553 => 33134, 18554 => 40131, 18555 => 22622, 18556 => 36187, + 18557 => 19977, 18558 => 21441, 18721 => 20254, 18722 => 25955, 18723 => 26705, + 18724 => 21971, 18725 => 20007, 18726 => 25620, 18727 => 39578, 18728 => 25195, + 18729 => 23234, 18730 => 29791, 18731 => 33394, 18732 => 28073, 18733 => 26862, + 18734 => 20711, 18735 => 33678, 18736 => 30722, 18737 => 26432, 18738 => 21049, + 18739 => 27801, 18740 => 32433, 18741 => 20667, 18742 => 21861, 18743 => 29022, + 18744 => 31579, 18745 => 26194, 18746 => 29642, 18747 => 33515, 18748 => 26441, + 18749 => 23665, 18750 => 21024, 18751 => 29053, 18752 => 34923, 18753 => 38378, + 18754 => 38485, 18755 => 25797, 18756 => 36193, 18757 => 33203, 18758 => 21892, + 18759 => 27733, 18760 => 25159, 18761 => 32558, 18762 => 22674, 18763 => 20260, + 18764 => 21830, 18765 => 36175, 18766 => 26188, 18767 => 19978, 18768 => 23578, + 18769 => 35059, 18770 => 26786, 18771 => 25422, 18772 => 31245, 18773 => 28903, + 18774 => 33421, 18775 => 21242, 18776 => 38902, 18777 => 23569, 18778 => 21736, + 18779 => 37045, 18780 => 32461, 18781 => 22882, 18782 => 36170, 18783 => 34503, + 18784 => 33292, 18785 => 33293, 18786 => 36198, 18787 => 25668, 18788 => 23556, + 18789 => 24913, 18790 => 28041, 18791 => 31038, 18792 => 35774, 18793 => 30775, + 18794 => 30003, 18795 => 21627, 18796 => 20280, 18797 => 36523, 18798 => 28145, + 18799 => 23072, 18800 => 32453, 18801 => 31070, 18802 => 27784, 18803 => 23457, + 18804 => 23158, 18805 => 29978, 18806 => 32958, 18807 => 24910, 18808 => 28183, + 18809 => 22768, 18810 => 29983, 18811 => 29989, 18812 => 29298, 18813 => 21319, + 18814 => 32499, 18977 => 30465, 18978 => 30427, 18979 => 21097, 18980 => 32988, + 18981 => 22307, 18982 => 24072, 18983 => 22833, 18984 => 29422, 18985 => 26045, + 18986 => 28287, 18987 => 35799, 18988 => 23608, 18989 => 34417, 18990 => 21313, + 18991 => 30707, 18992 => 25342, 18993 => 26102, 18994 => 20160, 18995 => 39135, + 18996 => 34432, 18997 => 23454, 18998 => 35782, 18999 => 21490, 19000 => 30690, + 19001 => 20351, 19002 => 23630, 19003 => 39542, 19004 => 22987, 19005 => 24335, + 19006 => 31034, 19007 => 22763, 19008 => 19990, 19009 => 26623, 19010 => 20107, + 19011 => 25325, 19012 => 35475, 19013 => 36893, 19014 => 21183, 19015 => 26159, + 19016 => 21980, 19017 => 22124, 19018 => 36866, 19019 => 20181, 19020 => 20365, + 19021 => 37322, 19022 => 39280, 19023 => 27663, 19024 => 24066, 19025 => 24643, + 19026 => 23460, 19027 => 35270, 19028 => 35797, 19029 => 25910, 19030 => 25163, + 19031 => 39318, 19032 => 23432, 19033 => 23551, 19034 => 25480, 19035 => 21806, + 19036 => 21463, 19037 => 30246, 19038 => 20861, 19039 => 34092, 19040 => 26530, + 19041 => 26803, 19042 => 27530, 19043 => 25234, 19044 => 36755, 19045 => 21460, + 19046 => 33298, 19047 => 28113, 19048 => 30095, 19049 => 20070, 19050 => 36174, + 19051 => 23408, 19052 => 29087, 19053 => 34223, 19054 => 26257, 19055 => 26329, + 19056 => 32626, 19057 => 34560, 19058 => 40653, 19059 => 40736, 19060 => 23646, + 19061 => 26415, 19062 => 36848, 19063 => 26641, 19064 => 26463, 19065 => 25101, + 19066 => 31446, 19067 => 22661, 19068 => 24246, 19069 => 25968, 19070 => 28465, + 19233 => 24661, 19234 => 21047, 19235 => 32781, 19236 => 25684, 19237 => 34928, + 19238 => 29993, 19239 => 24069, 19240 => 26643, 19241 => 25332, 19242 => 38684, + 19243 => 21452, 19244 => 29245, 19245 => 35841, 19246 => 27700, 19247 => 30561, + 19248 => 31246, 19249 => 21550, 19250 => 30636, 19251 => 39034, 19252 => 33308, + 19253 => 35828, 19254 => 30805, 19255 => 26388, 19256 => 28865, 19257 => 26031, + 19258 => 25749, 19259 => 22070, 19260 => 24605, 19261 => 31169, 19262 => 21496, + 19263 => 19997, 19264 => 27515, 19265 => 32902, 19266 => 23546, 19267 => 21987, + 19268 => 22235, 19269 => 20282, 19270 => 20284, 19271 => 39282, 19272 => 24051, + 19273 => 26494, 19274 => 32824, 19275 => 24578, 19276 => 39042, 19277 => 36865, + 19278 => 23435, 19279 => 35772, 19280 => 35829, 19281 => 25628, 19282 => 33368, + 19283 => 25822, 19284 => 22013, 19285 => 33487, 19286 => 37221, 19287 => 20439, + 19288 => 32032, 19289 => 36895, 19290 => 31903, 19291 => 20723, 19292 => 22609, + 19293 => 28335, 19294 => 23487, 19295 => 35785, 19296 => 32899, 19297 => 37240, + 19298 => 33948, 19299 => 31639, 19300 => 34429, 19301 => 38539, 19302 => 38543, + 19303 => 32485, 19304 => 39635, 19305 => 30862, 19306 => 23681, 19307 => 31319, + 19308 => 36930, 19309 => 38567, 19310 => 31071, 19311 => 23385, 19312 => 25439, + 19313 => 31499, 19314 => 34001, 19315 => 26797, 19316 => 21766, 19317 => 32553, + 19318 => 29712, 19319 => 32034, 19320 => 38145, 19321 => 25152, 19322 => 22604, + 19323 => 20182, 19324 => 23427, 19325 => 22905, 19326 => 22612, 19489 => 29549, + 19490 => 25374, 19491 => 36427, 19492 => 36367, 19493 => 32974, 19494 => 33492, + 19495 => 25260, 19496 => 21488, 19497 => 27888, 19498 => 37214, 19499 => 22826, + 19500 => 24577, 19501 => 27760, 19502 => 22349, 19503 => 25674, 19504 => 36138, + 19505 => 30251, 19506 => 28393, 19507 => 22363, 19508 => 27264, 19509 => 30192, + 19510 => 28525, 19511 => 35885, 19512 => 35848, 19513 => 22374, 19514 => 27631, + 19515 => 34962, 19516 => 30899, 19517 => 25506, 19518 => 21497, 19519 => 28845, + 19520 => 27748, 19521 => 22616, 19522 => 25642, 19523 => 22530, 19524 => 26848, + 19525 => 33179, 19526 => 21776, 19527 => 31958, 19528 => 20504, 19529 => 36538, + 19530 => 28108, 19531 => 36255, 19532 => 28907, 19533 => 25487, 19534 => 28059, + 19535 => 28372, 19536 => 32486, 19537 => 33796, 19538 => 26691, 19539 => 36867, + 19540 => 28120, 19541 => 38518, 19542 => 35752, 19543 => 22871, 19544 => 29305, + 19545 => 34276, 19546 => 33150, 19547 => 30140, 19548 => 35466, 19549 => 26799, + 19550 => 21076, 19551 => 36386, 19552 => 38161, 19553 => 25552, 19554 => 39064, + 19555 => 36420, 19556 => 21884, 19557 => 20307, 19558 => 26367, 19559 => 22159, + 19560 => 24789, 19561 => 28053, 19562 => 21059, 19563 => 23625, 19564 => 22825, + 19565 => 28155, 19566 => 22635, 19567 => 30000, 19568 => 29980, 19569 => 24684, + 19570 => 33300, 19571 => 33094, 19572 => 25361, 19573 => 26465, 19574 => 36834, + 19575 => 30522, 19576 => 36339, 19577 => 36148, 19578 => 38081, 19579 => 24086, + 19580 => 21381, 19581 => 21548, 19582 => 28867, 19745 => 27712, 19746 => 24311, + 19747 => 20572, 19748 => 20141, 19749 => 24237, 19750 => 25402, 19751 => 33351, + 19752 => 36890, 19753 => 26704, 19754 => 37230, 19755 => 30643, 19756 => 21516, + 19757 => 38108, 19758 => 24420, 19759 => 31461, 19760 => 26742, 19761 => 25413, + 19762 => 31570, 19763 => 32479, 19764 => 30171, 19765 => 20599, 19766 => 25237, + 19767 => 22836, 19768 => 36879, 19769 => 20984, 19770 => 31171, 19771 => 31361, + 19772 => 22270, 19773 => 24466, 19774 => 36884, 19775 => 28034, 19776 => 23648, + 19777 => 22303, 19778 => 21520, 19779 => 20820, 19780 => 28237, 19781 => 22242, + 19782 => 25512, 19783 => 39059, 19784 => 33151, 19785 => 34581, 19786 => 35114, + 19787 => 36864, 19788 => 21534, 19789 => 23663, 19790 => 33216, 19791 => 25302, + 19792 => 25176, 19793 => 33073, 19794 => 40501, 19795 => 38464, 19796 => 39534, + 19797 => 39548, 19798 => 26925, 19799 => 22949, 19800 => 25299, 19801 => 21822, + 19802 => 25366, 19803 => 21703, 19804 => 34521, 19805 => 27964, 19806 => 23043, + 19807 => 29926, 19808 => 34972, 19809 => 27498, 19810 => 22806, 19811 => 35916, + 19812 => 24367, 19813 => 28286, 19814 => 29609, 19815 => 39037, 19816 => 20024, + 19817 => 28919, 19818 => 23436, 19819 => 30871, 19820 => 25405, 19821 => 26202, + 19822 => 30358, 19823 => 24779, 19824 => 23451, 19825 => 23113, 19826 => 19975, + 19827 => 33109, 19828 => 27754, 19829 => 29579, 19830 => 20129, 19831 => 26505, + 19832 => 32593, 19833 => 24448, 19834 => 26106, 19835 => 26395, 19836 => 24536, + 19837 => 22916, 19838 => 23041, 20001 => 24013, 20002 => 24494, 20003 => 21361, + 20004 => 38886, 20005 => 36829, 20006 => 26693, 20007 => 22260, 20008 => 21807, + 20009 => 24799, 20010 => 20026, 20011 => 28493, 20012 => 32500, 20013 => 33479, + 20014 => 33806, 20015 => 22996, 20016 => 20255, 20017 => 20266, 20018 => 23614, + 20019 => 32428, 20020 => 26410, 20021 => 34074, 20022 => 21619, 20023 => 30031, + 20024 => 32963, 20025 => 21890, 20026 => 39759, 20027 => 20301, 20028 => 28205, + 20029 => 35859, 20030 => 23561, 20031 => 24944, 20032 => 21355, 20033 => 30239, + 20034 => 28201, 20035 => 34442, 20036 => 25991, 20037 => 38395, 20038 => 32441, + 20039 => 21563, 20040 => 31283, 20041 => 32010, 20042 => 38382, 20043 => 21985, + 20044 => 32705, 20045 => 29934, 20046 => 25373, 20047 => 34583, 20048 => 28065, + 20049 => 31389, 20050 => 25105, 20051 => 26017, 20052 => 21351, 20053 => 25569, + 20054 => 27779, 20055 => 24043, 20056 => 21596, 20057 => 38056, 20058 => 20044, + 20059 => 27745, 20060 => 35820, 20061 => 23627, 20062 => 26080, 20063 => 33436, + 20064 => 26791, 20065 => 21566, 20066 => 21556, 20067 => 27595, 20068 => 27494, + 20069 => 20116, 20070 => 25410, 20071 => 21320, 20072 => 33310, 20073 => 20237, + 20074 => 20398, 20075 => 22366, 20076 => 25098, 20077 => 38654, 20078 => 26212, + 20079 => 29289, 20080 => 21247, 20081 => 21153, 20082 => 24735, 20083 => 35823, + 20084 => 26132, 20085 => 29081, 20086 => 26512, 20087 => 35199, 20088 => 30802, + 20089 => 30717, 20090 => 26224, 20091 => 22075, 20092 => 21560, 20093 => 38177, + 20094 => 29306, 20257 => 31232, 20258 => 24687, 20259 => 24076, 20260 => 24713, + 20261 => 33181, 20262 => 22805, 20263 => 24796, 20264 => 29060, 20265 => 28911, + 20266 => 28330, 20267 => 27728, 20268 => 29312, 20269 => 27268, 20270 => 34989, + 20271 => 24109, 20272 => 20064, 20273 => 23219, 20274 => 21916, 20275 => 38115, + 20276 => 27927, 20277 => 31995, 20278 => 38553, 20279 => 25103, 20280 => 32454, + 20281 => 30606, 20282 => 34430, 20283 => 21283, 20284 => 38686, 20285 => 36758, + 20286 => 26247, 20287 => 23777, 20288 => 20384, 20289 => 29421, 20290 => 19979, + 20291 => 21414, 20292 => 22799, 20293 => 21523, 20294 => 25472, 20295 => 38184, + 20296 => 20808, 20297 => 20185, 20298 => 40092, 20299 => 32420, 20300 => 21688, + 20301 => 36132, 20302 => 34900, 20303 => 33335, 20304 => 38386, 20305 => 28046, + 20306 => 24358, 20307 => 23244, 20308 => 26174, 20309 => 38505, 20310 => 29616, + 20311 => 29486, 20312 => 21439, 20313 => 33146, 20314 => 39301, 20315 => 32673, + 20316 => 23466, 20317 => 38519, 20318 => 38480, 20319 => 32447, 20320 => 30456, + 20321 => 21410, 20322 => 38262, 20323 => 39321, 20324 => 31665, 20325 => 35140, + 20326 => 28248, 20327 => 20065, 20328 => 32724, 20329 => 31077, 20330 => 35814, + 20331 => 24819, 20332 => 21709, 20333 => 20139, 20334 => 39033, 20335 => 24055, + 20336 => 27233, 20337 => 20687, 20338 => 21521, 20339 => 35937, 20340 => 33831, + 20341 => 30813, 20342 => 38660, 20343 => 21066, 20344 => 21742, 20345 => 22179, + 20346 => 38144, 20347 => 28040, 20348 => 23477, 20349 => 28102, 20350 => 26195, + 20513 => 23567, 20514 => 23389, 20515 => 26657, 20516 => 32918, 20517 => 21880, + 20518 => 31505, 20519 => 25928, 20520 => 26964, 20521 => 20123, 20522 => 27463, + 20523 => 34638, 20524 => 38795, 20525 => 21327, 20526 => 25375, 20527 => 25658, + 20528 => 37034, 20529 => 26012, 20530 => 32961, 20531 => 35856, 20532 => 20889, + 20533 => 26800, 20534 => 21368, 20535 => 34809, 20536 => 25032, 20537 => 27844, + 20538 => 27899, 20539 => 35874, 20540 => 23633, 20541 => 34218, 20542 => 33455, + 20543 => 38156, 20544 => 27427, 20545 => 36763, 20546 => 26032, 20547 => 24571, + 20548 => 24515, 20549 => 20449, 20550 => 34885, 20551 => 26143, 20552 => 33125, + 20553 => 29481, 20554 => 24826, 20555 => 20852, 20556 => 21009, 20557 => 22411, + 20558 => 24418, 20559 => 37026, 20560 => 34892, 20561 => 37266, 20562 => 24184, + 20563 => 26447, 20564 => 24615, 20565 => 22995, 20566 => 20804, 20567 => 20982, + 20568 => 33016, 20569 => 21256, 20570 => 27769, 20571 => 38596, 20572 => 29066, + 20573 => 20241, 20574 => 20462, 20575 => 32670, 20576 => 26429, 20577 => 21957, + 20578 => 38152, 20579 => 31168, 20580 => 34966, 20581 => 32483, 20582 => 22687, + 20583 => 25100, 20584 => 38656, 20585 => 34394, 20586 => 22040, 20587 => 39035, + 20588 => 24464, 20589 => 35768, 20590 => 33988, 20591 => 37207, 20592 => 21465, + 20593 => 26093, 20594 => 24207, 20595 => 30044, 20596 => 24676, 20597 => 32110, + 20598 => 23167, 20599 => 32490, 20600 => 32493, 20601 => 36713, 20602 => 21927, + 20603 => 23459, 20604 => 24748, 20605 => 26059, 20606 => 29572, 20769 => 36873, + 20770 => 30307, 20771 => 30505, 20772 => 32474, 20773 => 38772, 20774 => 34203, + 20775 => 23398, 20776 => 31348, 20777 => 38634, 20778 => 34880, 20779 => 21195, + 20780 => 29071, 20781 => 24490, 20782 => 26092, 20783 => 35810, 20784 => 23547, + 20785 => 39535, 20786 => 24033, 20787 => 27529, 20788 => 27739, 20789 => 35757, + 20790 => 35759, 20791 => 36874, 20792 => 36805, 20793 => 21387, 20794 => 25276, + 20795 => 40486, 20796 => 40493, 20797 => 21568, 20798 => 20011, 20799 => 33469, + 20800 => 29273, 20801 => 34460, 20802 => 23830, 20803 => 34905, 20804 => 28079, + 20805 => 38597, 20806 => 21713, 20807 => 20122, 20808 => 35766, 20809 => 28937, + 20810 => 21693, 20811 => 38409, 20812 => 28895, 20813 => 28153, 20814 => 30416, + 20815 => 20005, 20816 => 30740, 20817 => 34578, 20818 => 23721, 20819 => 24310, + 20820 => 35328, 20821 => 39068, 20822 => 38414, 20823 => 28814, 20824 => 27839, + 20825 => 22852, 20826 => 25513, 20827 => 30524, 20828 => 34893, 20829 => 28436, + 20830 => 33395, 20831 => 22576, 20832 => 29141, 20833 => 21388, 20834 => 30746, + 20835 => 38593, 20836 => 21761, 20837 => 24422, 20838 => 28976, 20839 => 23476, + 20840 => 35866, 20841 => 39564, 20842 => 27523, 20843 => 22830, 20844 => 40495, + 20845 => 31207, 20846 => 26472, 20847 => 25196, 20848 => 20335, 20849 => 30113, + 20850 => 32650, 20851 => 27915, 20852 => 38451, 20853 => 27687, 20854 => 20208, + 20855 => 30162, 20856 => 20859, 20857 => 26679, 20858 => 28478, 20859 => 36992, + 20860 => 33136, 20861 => 22934, 20862 => 29814, 21025 => 25671, 21026 => 23591, + 21027 => 36965, 21028 => 31377, 21029 => 35875, 21030 => 23002, 21031 => 21676, + 21032 => 33280, 21033 => 33647, 21034 => 35201, 21035 => 32768, 21036 => 26928, + 21037 => 22094, 21038 => 32822, 21039 => 29239, 21040 => 37326, 21041 => 20918, + 21042 => 20063, 21043 => 39029, 21044 => 25494, 21045 => 19994, 21046 => 21494, + 21047 => 26355, 21048 => 33099, 21049 => 22812, 21050 => 28082, 21051 => 19968, + 21052 => 22777, 21053 => 21307, 21054 => 25558, 21055 => 38129, 21056 => 20381, + 21057 => 20234, 21058 => 34915, 21059 => 39056, 21060 => 22839, 21061 => 36951, + 21062 => 31227, 21063 => 20202, 21064 => 33008, 21065 => 30097, 21066 => 27778, + 21067 => 23452, 21068 => 23016, 21069 => 24413, 21070 => 26885, 21071 => 34433, + 21072 => 20506, 21073 => 24050, 21074 => 20057, 21075 => 30691, 21076 => 20197, + 21077 => 33402, 21078 => 25233, 21079 => 26131, 21080 => 37009, 21081 => 23673, + 21082 => 20159, 21083 => 24441, 21084 => 33222, 21085 => 36920, 21086 => 32900, + 21087 => 30123, 21088 => 20134, 21089 => 35028, 21090 => 24847, 21091 => 27589, + 21092 => 24518, 21093 => 20041, 21094 => 30410, 21095 => 28322, 21096 => 35811, + 21097 => 35758, 21098 => 35850, 21099 => 35793, 21100 => 24322, 21101 => 32764, + 21102 => 32716, 21103 => 32462, 21104 => 33589, 21105 => 33643, 21106 => 22240, + 21107 => 27575, 21108 => 38899, 21109 => 38452, 21110 => 23035, 21111 => 21535, + 21112 => 38134, 21113 => 28139, 21114 => 23493, 21115 => 39278, 21116 => 23609, + 21117 => 24341, 21118 => 38544, 21281 => 21360, 21282 => 33521, 21283 => 27185, + 21284 => 23156, 21285 => 40560, 21286 => 24212, 21287 => 32552, 21288 => 33721, + 21289 => 33828, 21290 => 33829, 21291 => 33639, 21292 => 34631, 21293 => 36814, + 21294 => 36194, 21295 => 30408, 21296 => 24433, 21297 => 39062, 21298 => 30828, + 21299 => 26144, 21300 => 21727, 21301 => 25317, 21302 => 20323, 21303 => 33219, + 21304 => 30152, 21305 => 24248, 21306 => 38605, 21307 => 36362, 21308 => 34553, + 21309 => 21647, 21310 => 27891, 21311 => 28044, 21312 => 27704, 21313 => 24703, + 21314 => 21191, 21315 => 29992, 21316 => 24189, 21317 => 20248, 21318 => 24736, + 21319 => 24551, 21320 => 23588, 21321 => 30001, 21322 => 37038, 21323 => 38080, + 21324 => 29369, 21325 => 27833, 21326 => 28216, 21327 => 37193, 21328 => 26377, + 21329 => 21451, 21330 => 21491, 21331 => 20305, 21332 => 37321, 21333 => 35825, + 21334 => 21448, 21335 => 24188, 21336 => 36802, 21337 => 28132, 21338 => 20110, + 21339 => 30402, 21340 => 27014, 21341 => 34398, 21342 => 24858, 21343 => 33286, + 21344 => 20313, 21345 => 20446, 21346 => 36926, 21347 => 40060, 21348 => 24841, + 21349 => 28189, 21350 => 28180, 21351 => 38533, 21352 => 20104, 21353 => 23089, + 21354 => 38632, 21355 => 19982, 21356 => 23679, 21357 => 31161, 21358 => 23431, + 21359 => 35821, 21360 => 32701, 21361 => 29577, 21362 => 22495, 21363 => 33419, + 21364 => 37057, 21365 => 21505, 21366 => 36935, 21367 => 21947, 21368 => 23786, + 21369 => 24481, 21370 => 24840, 21371 => 27442, 21372 => 29425, 21373 => 32946, + 21374 => 35465, 21537 => 28020, 21538 => 23507, 21539 => 35029, 21540 => 39044, + 21541 => 35947, 21542 => 39533, 21543 => 40499, 21544 => 28170, 21545 => 20900, + 21546 => 20803, 21547 => 22435, 21548 => 34945, 21549 => 21407, 21550 => 25588, + 21551 => 36757, 21552 => 22253, 21553 => 21592, 21554 => 22278, 21555 => 29503, + 21556 => 28304, 21557 => 32536, 21558 => 36828, 21559 => 33489, 21560 => 24895, + 21561 => 24616, 21562 => 38498, 21563 => 26352, 21564 => 32422, 21565 => 36234, + 21566 => 36291, 21567 => 38053, 21568 => 23731, 21569 => 31908, 21570 => 26376, + 21571 => 24742, 21572 => 38405, 21573 => 32792, 21574 => 20113, 21575 => 37095, + 21576 => 21248, 21577 => 38504, 21578 => 20801, 21579 => 36816, 21580 => 34164, + 21581 => 37213, 21582 => 26197, 21583 => 38901, 21584 => 23381, 21585 => 21277, + 21586 => 30776, 21587 => 26434, 21588 => 26685, 21589 => 21705, 21590 => 28798, + 21591 => 23472, 21592 => 36733, 21593 => 20877, 21594 => 22312, 21595 => 21681, + 21596 => 25874, 21597 => 26242, 21598 => 36190, 21599 => 36163, 21600 => 33039, + 21601 => 33900, 21602 => 36973, 21603 => 31967, 21604 => 20991, 21605 => 34299, + 21606 => 26531, 21607 => 26089, 21608 => 28577, 21609 => 34468, 21610 => 36481, + 21611 => 22122, 21612 => 36896, 21613 => 30338, 21614 => 28790, 21615 => 29157, + 21616 => 36131, 21617 => 25321, 21618 => 21017, 21619 => 27901, 21620 => 36156, + 21621 => 24590, 21622 => 22686, 21623 => 24974, 21624 => 26366, 21625 => 36192, + 21626 => 25166, 21627 => 21939, 21628 => 28195, 21629 => 26413, 21630 => 36711, + 21793 => 38113, 21794 => 38392, 21795 => 30504, 21796 => 26629, 21797 => 27048, + 21798 => 21643, 21799 => 20045, 21800 => 28856, 21801 => 35784, 21802 => 25688, + 21803 => 25995, 21804 => 23429, 21805 => 31364, 21806 => 20538, 21807 => 23528, + 21808 => 30651, 21809 => 27617, 21810 => 35449, 21811 => 31896, 21812 => 27838, + 21813 => 30415, 21814 => 26025, 21815 => 36759, 21816 => 23853, 21817 => 23637, + 21818 => 34360, 21819 => 26632, 21820 => 21344, 21821 => 25112, 21822 => 31449, + 21823 => 28251, 21824 => 32509, 21825 => 27167, 21826 => 31456, 21827 => 24432, + 21828 => 28467, 21829 => 24352, 21830 => 25484, 21831 => 28072, 21832 => 26454, + 21833 => 19976, 21834 => 24080, 21835 => 36134, 21836 => 20183, 21837 => 32960, + 21838 => 30260, 21839 => 38556, 21840 => 25307, 21841 => 26157, 21842 => 25214, + 21843 => 27836, 21844 => 36213, 21845 => 29031, 21846 => 32617, 21847 => 20806, + 21848 => 32903, 21849 => 21484, 21850 => 36974, 21851 => 25240, 21852 => 21746, + 21853 => 34544, 21854 => 36761, 21855 => 32773, 21856 => 38167, 21857 => 34071, + 21858 => 36825, 21859 => 27993, 21860 => 29645, 21861 => 26015, 21862 => 30495, + 21863 => 29956, 21864 => 30759, 21865 => 33275, 21866 => 36126, 21867 => 38024, + 21868 => 20390, 21869 => 26517, 21870 => 30137, 21871 => 35786, 21872 => 38663, + 21873 => 25391, 21874 => 38215, 21875 => 38453, 21876 => 33976, 21877 => 25379, + 21878 => 30529, 21879 => 24449, 21880 => 29424, 21881 => 20105, 21882 => 24596, + 21883 => 25972, 21884 => 25327, 21885 => 27491, 21886 => 25919, 22049 => 24103, + 22050 => 30151, 22051 => 37073, 22052 => 35777, 22053 => 33437, 22054 => 26525, + 22055 => 25903, 22056 => 21553, 22057 => 34584, 22058 => 30693, 22059 => 32930, + 22060 => 33026, 22061 => 27713, 22062 => 20043, 22063 => 32455, 22064 => 32844, + 22065 => 30452, 22066 => 26893, 22067 => 27542, 22068 => 25191, 22069 => 20540, + 22070 => 20356, 22071 => 22336, 22072 => 25351, 22073 => 27490, 22074 => 36286, + 22075 => 21482, 22076 => 26088, 22077 => 32440, 22078 => 24535, 22079 => 25370, + 22080 => 25527, 22081 => 33267, 22082 => 33268, 22083 => 32622, 22084 => 24092, + 22085 => 23769, 22086 => 21046, 22087 => 26234, 22088 => 31209, 22089 => 31258, + 22090 => 36136, 22091 => 28825, 22092 => 30164, 22093 => 28382, 22094 => 27835, + 22095 => 31378, 22096 => 20013, 22097 => 30405, 22098 => 24544, 22099 => 38047, + 22100 => 34935, 22101 => 32456, 22102 => 31181, 22103 => 32959, 22104 => 37325, + 22105 => 20210, 22106 => 20247, 22107 => 33311, 22108 => 21608, 22109 => 24030, + 22110 => 27954, 22111 => 35788, 22112 => 31909, 22113 => 36724, 22114 => 32920, + 22115 => 24090, 22116 => 21650, 22117 => 30385, 22118 => 23449, 22119 => 26172, + 22120 => 39588, 22121 => 29664, 22122 => 26666, 22123 => 34523, 22124 => 26417, + 22125 => 29482, 22126 => 35832, 22127 => 35803, 22128 => 36880, 22129 => 31481, + 22130 => 28891, 22131 => 29038, 22132 => 25284, 22133 => 30633, 22134 => 22065, + 22135 => 20027, 22136 => 33879, 22137 => 26609, 22138 => 21161, 22139 => 34496, + 22140 => 36142, 22141 => 38136, 22142 => 31569, 22305 => 20303, 22306 => 27880, + 22307 => 31069, 22308 => 39547, 22309 => 25235, 22310 => 29226, 22311 => 25341, + 22312 => 19987, 22313 => 30742, 22314 => 36716, 22315 => 25776, 22316 => 36186, + 22317 => 31686, 22318 => 26729, 22319 => 24196, 22320 => 35013, 22321 => 22918, + 22322 => 25758, 22323 => 22766, 22324 => 29366, 22325 => 26894, 22326 => 38181, + 22327 => 36861, 22328 => 36184, 22329 => 22368, 22330 => 32512, 22331 => 35846, + 22332 => 20934, 22333 => 25417, 22334 => 25305, 22335 => 21331, 22336 => 26700, + 22337 => 29730, 22338 => 33537, 22339 => 37196, 22340 => 21828, 22341 => 30528, + 22342 => 28796, 22343 => 27978, 22344 => 20857, 22345 => 21672, 22346 => 36164, + 22347 => 23039, 22348 => 28363, 22349 => 28100, 22350 => 23388, 22351 => 32043, + 22352 => 20180, 22353 => 31869, 22354 => 28371, 22355 => 23376, 22356 => 33258, + 22357 => 28173, 22358 => 23383, 22359 => 39683, 22360 => 26837, 22361 => 36394, + 22362 => 23447, 22363 => 32508, 22364 => 24635, 22365 => 32437, 22366 => 37049, + 22367 => 36208, 22368 => 22863, 22369 => 25549, 22370 => 31199, 22371 => 36275, + 22372 => 21330, 22373 => 26063, 22374 => 31062, 22375 => 35781, 22376 => 38459, + 22377 => 32452, 22378 => 38075, 22379 => 32386, 22380 => 22068, 22381 => 37257, + 22382 => 26368, 22383 => 32618, 22384 => 23562, 22385 => 36981, 22386 => 26152, + 22387 => 24038, 22388 => 20304, 22389 => 26590, 22390 => 20570, 22391 => 20316, + 22392 => 22352, 22393 => 24231, 22561 => 20109, 22562 => 19980, 22563 => 20800, + 22564 => 19984, 22565 => 24319, 22566 => 21317, 22567 => 19989, 22568 => 20120, + 22569 => 19998, 22570 => 39730, 22571 => 23404, 22572 => 22121, 22573 => 20008, + 22574 => 31162, 22575 => 20031, 22576 => 21269, 22577 => 20039, 22578 => 22829, + 22579 => 29243, 22580 => 21358, 22581 => 27664, 22582 => 22239, 22583 => 32996, + 22584 => 39319, 22585 => 27603, 22586 => 30590, 22587 => 40727, 22588 => 20022, + 22589 => 20127, 22590 => 40720, 22591 => 20060, 22592 => 20073, 22593 => 20115, + 22594 => 33416, 22595 => 23387, 22596 => 21868, 22597 => 22031, 22598 => 20164, + 22599 => 21389, 22600 => 21405, 22601 => 21411, 22602 => 21413, 22603 => 21422, + 22604 => 38757, 22605 => 36189, 22606 => 21274, 22607 => 21493, 22608 => 21286, + 22609 => 21294, 22610 => 21310, 22611 => 36188, 22612 => 21350, 22613 => 21347, + 22614 => 20994, 22615 => 21000, 22616 => 21006, 22617 => 21037, 22618 => 21043, + 22619 => 21055, 22620 => 21056, 22621 => 21068, 22622 => 21086, 22623 => 21089, + 22624 => 21084, 22625 => 33967, 22626 => 21117, 22627 => 21122, 22628 => 21121, + 22629 => 21136, 22630 => 21139, 22631 => 20866, 22632 => 32596, 22633 => 20155, + 22634 => 20163, 22635 => 20169, 22636 => 20162, 22637 => 20200, 22638 => 20193, + 22639 => 20203, 22640 => 20190, 22641 => 20251, 22642 => 20211, 22643 => 20258, + 22644 => 20324, 22645 => 20213, 22646 => 20261, 22647 => 20263, 22648 => 20233, + 22649 => 20267, 22650 => 20318, 22651 => 20327, 22652 => 25912, 22653 => 20314, + 22654 => 20317, 22817 => 20319, 22818 => 20311, 22819 => 20274, 22820 => 20285, + 22821 => 20342, 22822 => 20340, 22823 => 20369, 22824 => 20361, 22825 => 20355, + 22826 => 20367, 22827 => 20350, 22828 => 20347, 22829 => 20394, 22830 => 20348, + 22831 => 20396, 22832 => 20372, 22833 => 20454, 22834 => 20456, 22835 => 20458, + 22836 => 20421, 22837 => 20442, 22838 => 20451, 22839 => 20444, 22840 => 20433, + 22841 => 20447, 22842 => 20472, 22843 => 20521, 22844 => 20556, 22845 => 20467, + 22846 => 20524, 22847 => 20495, 22848 => 20526, 22849 => 20525, 22850 => 20478, + 22851 => 20508, 22852 => 20492, 22853 => 20517, 22854 => 20520, 22855 => 20606, + 22856 => 20547, 22857 => 20565, 22858 => 20552, 22859 => 20558, 22860 => 20588, + 22861 => 20603, 22862 => 20645, 22863 => 20647, 22864 => 20649, 22865 => 20666, + 22866 => 20694, 22867 => 20742, 22868 => 20717, 22869 => 20716, 22870 => 20710, + 22871 => 20718, 22872 => 20743, 22873 => 20747, 22874 => 20189, 22875 => 27709, + 22876 => 20312, 22877 => 20325, 22878 => 20430, 22879 => 40864, 22880 => 27718, + 22881 => 31860, 22882 => 20846, 22883 => 24061, 22884 => 40649, 22885 => 39320, + 22886 => 20865, 22887 => 22804, 22888 => 21241, 22889 => 21261, 22890 => 35335, + 22891 => 21264, 22892 => 20971, 22893 => 22809, 22894 => 20821, 22895 => 20128, + 22896 => 20822, 22897 => 20147, 22898 => 34926, 22899 => 34980, 22900 => 20149, + 22901 => 33044, 22902 => 35026, 22903 => 31104, 22904 => 23348, 22905 => 34819, + 22906 => 32696, 22907 => 20907, 22908 => 20913, 22909 => 20925, 22910 => 20924, + 23073 => 20935, 23074 => 20886, 23075 => 20898, 23076 => 20901, 23077 => 35744, + 23078 => 35750, 23079 => 35751, 23080 => 35754, 23081 => 35764, 23082 => 35765, + 23083 => 35767, 23084 => 35778, 23085 => 35779, 23086 => 35787, 23087 => 35791, + 23088 => 35790, 23089 => 35794, 23090 => 35795, 23091 => 35796, 23092 => 35798, + 23093 => 35800, 23094 => 35801, 23095 => 35804, 23096 => 35807, 23097 => 35808, + 23098 => 35812, 23099 => 35816, 23100 => 35817, 23101 => 35822, 23102 => 35824, + 23103 => 35827, 23104 => 35830, 23105 => 35833, 23106 => 35836, 23107 => 35839, + 23108 => 35840, 23109 => 35842, 23110 => 35844, 23111 => 35847, 23112 => 35852, + 23113 => 35855, 23114 => 35857, 23115 => 35858, 23116 => 35860, 23117 => 35861, + 23118 => 35862, 23119 => 35865, 23120 => 35867, 23121 => 35864, 23122 => 35869, + 23123 => 35871, 23124 => 35872, 23125 => 35873, 23126 => 35877, 23127 => 35879, + 23128 => 35882, 23129 => 35883, 23130 => 35886, 23131 => 35887, 23132 => 35890, + 23133 => 35891, 23134 => 35893, 23135 => 35894, 23136 => 21353, 23137 => 21370, + 23138 => 38429, 23139 => 38434, 23140 => 38433, 23141 => 38449, 23142 => 38442, + 23143 => 38461, 23144 => 38460, 23145 => 38466, 23146 => 38473, 23147 => 38484, + 23148 => 38495, 23149 => 38503, 23150 => 38508, 23151 => 38514, 23152 => 38516, + 23153 => 38536, 23154 => 38541, 23155 => 38551, 23156 => 38576, 23157 => 37015, + 23158 => 37019, 23159 => 37021, 23160 => 37017, 23161 => 37036, 23162 => 37025, + 23163 => 37044, 23164 => 37043, 23165 => 37046, 23166 => 37050, 23329 => 37048, + 23330 => 37040, 23331 => 37071, 23332 => 37061, 23333 => 37054, 23334 => 37072, + 23335 => 37060, 23336 => 37063, 23337 => 37075, 23338 => 37094, 23339 => 37090, + 23340 => 37084, 23341 => 37079, 23342 => 37083, 23343 => 37099, 23344 => 37103, + 23345 => 37118, 23346 => 37124, 23347 => 37154, 23348 => 37150, 23349 => 37155, + 23350 => 37169, 23351 => 37167, 23352 => 37177, 23353 => 37187, 23354 => 37190, + 23355 => 21005, 23356 => 22850, 23357 => 21154, 23358 => 21164, 23359 => 21165, + 23360 => 21182, 23361 => 21759, 23362 => 21200, 23363 => 21206, 23364 => 21232, + 23365 => 21471, 23366 => 29166, 23367 => 30669, 23368 => 24308, 23369 => 20981, + 23370 => 20988, 23371 => 39727, 23372 => 21430, 23373 => 24321, 23374 => 30042, + 23375 => 24047, 23376 => 22348, 23377 => 22441, 23378 => 22433, 23379 => 22654, + 23380 => 22716, 23381 => 22725, 23382 => 22737, 23383 => 22313, 23384 => 22316, + 23385 => 22314, 23386 => 22323, 23387 => 22329, 23388 => 22318, 23389 => 22319, + 23390 => 22364, 23391 => 22331, 23392 => 22338, 23393 => 22377, 23394 => 22405, + 23395 => 22379, 23396 => 22406, 23397 => 22396, 23398 => 22395, 23399 => 22376, + 23400 => 22381, 23401 => 22390, 23402 => 22387, 23403 => 22445, 23404 => 22436, + 23405 => 22412, 23406 => 22450, 23407 => 22479, 23408 => 22439, 23409 => 22452, + 23410 => 22419, 23411 => 22432, 23412 => 22485, 23413 => 22488, 23414 => 22490, + 23415 => 22489, 23416 => 22482, 23417 => 22456, 23418 => 22516, 23419 => 22511, + 23420 => 22520, 23421 => 22500, 23422 => 22493, 23585 => 22539, 23586 => 22541, + 23587 => 22525, 23588 => 22509, 23589 => 22528, 23590 => 22558, 23591 => 22553, + 23592 => 22596, 23593 => 22560, 23594 => 22629, 23595 => 22636, 23596 => 22657, + 23597 => 22665, 23598 => 22682, 23599 => 22656, 23600 => 39336, 23601 => 40729, + 23602 => 25087, 23603 => 33401, 23604 => 33405, 23605 => 33407, 23606 => 33423, + 23607 => 33418, 23608 => 33448, 23609 => 33412, 23610 => 33422, 23611 => 33425, + 23612 => 33431, 23613 => 33433, 23614 => 33451, 23615 => 33464, 23616 => 33470, + 23617 => 33456, 23618 => 33480, 23619 => 33482, 23620 => 33507, 23621 => 33432, + 23622 => 33463, 23623 => 33454, 23624 => 33483, 23625 => 33484, 23626 => 33473, + 23627 => 33449, 23628 => 33460, 23629 => 33441, 23630 => 33450, 23631 => 33439, + 23632 => 33476, 23633 => 33486, 23634 => 33444, 23635 => 33505, 23636 => 33545, + 23637 => 33527, 23638 => 33508, 23639 => 33551, 23640 => 33543, 23641 => 33500, + 23642 => 33524, 23643 => 33490, 23644 => 33496, 23645 => 33548, 23646 => 33531, + 23647 => 33491, 23648 => 33553, 23649 => 33562, 23650 => 33542, 23651 => 33556, + 23652 => 33557, 23653 => 33504, 23654 => 33493, 23655 => 33564, 23656 => 33617, + 23657 => 33627, 23658 => 33628, 23659 => 33544, 23660 => 33682, 23661 => 33596, + 23662 => 33588, 23663 => 33585, 23664 => 33691, 23665 => 33630, 23666 => 33583, + 23667 => 33615, 23668 => 33607, 23669 => 33603, 23670 => 33631, 23671 => 33600, + 23672 => 33559, 23673 => 33632, 23674 => 33581, 23675 => 33594, 23676 => 33587, + 23677 => 33638, 23678 => 33637, 23841 => 33640, 23842 => 33563, 23843 => 33641, + 23844 => 33644, 23845 => 33642, 23846 => 33645, 23847 => 33646, 23848 => 33712, + 23849 => 33656, 23850 => 33715, 23851 => 33716, 23852 => 33696, 23853 => 33706, + 23854 => 33683, 23855 => 33692, 23856 => 33669, 23857 => 33660, 23858 => 33718, + 23859 => 33705, 23860 => 33661, 23861 => 33720, 23862 => 33659, 23863 => 33688, + 23864 => 33694, 23865 => 33704, 23866 => 33722, 23867 => 33724, 23868 => 33729, + 23869 => 33793, 23870 => 33765, 23871 => 33752, 23872 => 22535, 23873 => 33816, + 23874 => 33803, 23875 => 33757, 23876 => 33789, 23877 => 33750, 23878 => 33820, + 23879 => 33848, 23880 => 33809, 23881 => 33798, 23882 => 33748, 23883 => 33759, + 23884 => 33807, 23885 => 33795, 23886 => 33784, 23887 => 33785, 23888 => 33770, + 23889 => 33733, 23890 => 33728, 23891 => 33830, 23892 => 33776, 23893 => 33761, + 23894 => 33884, 23895 => 33873, 23896 => 33882, 23897 => 33881, 23898 => 33907, + 23899 => 33927, 23900 => 33928, 23901 => 33914, 23902 => 33929, 23903 => 33912, + 23904 => 33852, 23905 => 33862, 23906 => 33897, 23907 => 33910, 23908 => 33932, + 23909 => 33934, 23910 => 33841, 23911 => 33901, 23912 => 33985, 23913 => 33997, + 23914 => 34000, 23915 => 34022, 23916 => 33981, 23917 => 34003, 23918 => 33994, + 23919 => 33983, 23920 => 33978, 23921 => 34016, 23922 => 33953, 23923 => 33977, + 23924 => 33972, 23925 => 33943, 23926 => 34021, 23927 => 34019, 23928 => 34060, + 23929 => 29965, 23930 => 34104, 23931 => 34032, 23932 => 34105, 23933 => 34079, + 23934 => 34106, 24097 => 34134, 24098 => 34107, 24099 => 34047, 24100 => 34044, + 24101 => 34137, 24102 => 34120, 24103 => 34152, 24104 => 34148, 24105 => 34142, + 24106 => 34170, 24107 => 30626, 24108 => 34115, 24109 => 34162, 24110 => 34171, + 24111 => 34212, 24112 => 34216, 24113 => 34183, 24114 => 34191, 24115 => 34169, + 24116 => 34222, 24117 => 34204, 24118 => 34181, 24119 => 34233, 24120 => 34231, + 24121 => 34224, 24122 => 34259, 24123 => 34241, 24124 => 34268, 24125 => 34303, + 24126 => 34343, 24127 => 34309, 24128 => 34345, 24129 => 34326, 24130 => 34364, + 24131 => 24318, 24132 => 24328, 24133 => 22844, 24134 => 22849, 24135 => 32823, + 24136 => 22869, 24137 => 22874, 24138 => 22872, 24139 => 21263, 24140 => 23586, + 24141 => 23589, 24142 => 23596, 24143 => 23604, 24144 => 25164, 24145 => 25194, + 24146 => 25247, 24147 => 25275, 24148 => 25290, 24149 => 25306, 24150 => 25303, + 24151 => 25326, 24152 => 25378, 24153 => 25334, 24154 => 25401, 24155 => 25419, + 24156 => 25411, 24157 => 25517, 24158 => 25590, 24159 => 25457, 24160 => 25466, + 24161 => 25486, 24162 => 25524, 24163 => 25453, 24164 => 25516, 24165 => 25482, + 24166 => 25449, 24167 => 25518, 24168 => 25532, 24169 => 25586, 24170 => 25592, + 24171 => 25568, 24172 => 25599, 24173 => 25540, 24174 => 25566, 24175 => 25550, + 24176 => 25682, 24177 => 25542, 24178 => 25534, 24179 => 25669, 24180 => 25665, + 24181 => 25611, 24182 => 25627, 24183 => 25632, 24184 => 25612, 24185 => 25638, + 24186 => 25633, 24187 => 25694, 24188 => 25732, 24189 => 25709, 24190 => 25750, + 24353 => 25722, 24354 => 25783, 24355 => 25784, 24356 => 25753, 24357 => 25786, + 24358 => 25792, 24359 => 25808, 24360 => 25815, 24361 => 25828, 24362 => 25826, + 24363 => 25865, 24364 => 25893, 24365 => 25902, 24366 => 24331, 24367 => 24530, + 24368 => 29977, 24369 => 24337, 24370 => 21343, 24371 => 21489, 24372 => 21501, + 24373 => 21481, 24374 => 21480, 24375 => 21499, 24376 => 21522, 24377 => 21526, + 24378 => 21510, 24379 => 21579, 24380 => 21586, 24381 => 21587, 24382 => 21588, + 24383 => 21590, 24384 => 21571, 24385 => 21537, 24386 => 21591, 24387 => 21593, + 24388 => 21539, 24389 => 21554, 24390 => 21634, 24391 => 21652, 24392 => 21623, + 24393 => 21617, 24394 => 21604, 24395 => 21658, 24396 => 21659, 24397 => 21636, + 24398 => 21622, 24399 => 21606, 24400 => 21661, 24401 => 21712, 24402 => 21677, + 24403 => 21698, 24404 => 21684, 24405 => 21714, 24406 => 21671, 24407 => 21670, + 24408 => 21715, 24409 => 21716, 24410 => 21618, 24411 => 21667, 24412 => 21717, + 24413 => 21691, 24414 => 21695, 24415 => 21708, 24416 => 21721, 24417 => 21722, + 24418 => 21724, 24419 => 21673, 24420 => 21674, 24421 => 21668, 24422 => 21725, + 24423 => 21711, 24424 => 21726, 24425 => 21787, 24426 => 21735, 24427 => 21792, + 24428 => 21757, 24429 => 21780, 24430 => 21747, 24431 => 21794, 24432 => 21795, + 24433 => 21775, 24434 => 21777, 24435 => 21799, 24436 => 21802, 24437 => 21863, + 24438 => 21903, 24439 => 21941, 24440 => 21833, 24441 => 21869, 24442 => 21825, + 24443 => 21845, 24444 => 21823, 24445 => 21840, 24446 => 21820, 24609 => 21815, + 24610 => 21846, 24611 => 21877, 24612 => 21878, 24613 => 21879, 24614 => 21811, + 24615 => 21808, 24616 => 21852, 24617 => 21899, 24618 => 21970, 24619 => 21891, + 24620 => 21937, 24621 => 21945, 24622 => 21896, 24623 => 21889, 24624 => 21919, + 24625 => 21886, 24626 => 21974, 24627 => 21905, 24628 => 21883, 24629 => 21983, + 24630 => 21949, 24631 => 21950, 24632 => 21908, 24633 => 21913, 24634 => 21994, + 24635 => 22007, 24636 => 21961, 24637 => 22047, 24638 => 21969, 24639 => 21995, + 24640 => 21996, 24641 => 21972, 24642 => 21990, 24643 => 21981, 24644 => 21956, + 24645 => 21999, 24646 => 21989, 24647 => 22002, 24648 => 22003, 24649 => 21964, + 24650 => 21965, 24651 => 21992, 24652 => 22005, 24653 => 21988, 24654 => 36756, + 24655 => 22046, 24656 => 22024, 24657 => 22028, 24658 => 22017, 24659 => 22052, + 24660 => 22051, 24661 => 22014, 24662 => 22016, 24663 => 22055, 24664 => 22061, + 24665 => 22104, 24666 => 22073, 24667 => 22103, 24668 => 22060, 24669 => 22093, + 24670 => 22114, 24671 => 22105, 24672 => 22108, 24673 => 22092, 24674 => 22100, + 24675 => 22150, 24676 => 22116, 24677 => 22129, 24678 => 22123, 24679 => 22139, + 24680 => 22140, 24681 => 22149, 24682 => 22163, 24683 => 22191, 24684 => 22228, + 24685 => 22231, 24686 => 22237, 24687 => 22241, 24688 => 22261, 24689 => 22251, + 24690 => 22265, 24691 => 22271, 24692 => 22276, 24693 => 22282, 24694 => 22281, + 24695 => 22300, 24696 => 24079, 24697 => 24089, 24698 => 24084, 24699 => 24081, + 24700 => 24113, 24701 => 24123, 24702 => 24124, 24865 => 24119, 24866 => 24132, + 24867 => 24148, 24868 => 24155, 24869 => 24158, 24870 => 24161, 24871 => 23692, + 24872 => 23674, 24873 => 23693, 24874 => 23696, 24875 => 23702, 24876 => 23688, + 24877 => 23704, 24878 => 23705, 24879 => 23697, 24880 => 23706, 24881 => 23708, + 24882 => 23733, 24883 => 23714, 24884 => 23741, 24885 => 23724, 24886 => 23723, + 24887 => 23729, 24888 => 23715, 24889 => 23745, 24890 => 23735, 24891 => 23748, + 24892 => 23762, 24893 => 23780, 24894 => 23755, 24895 => 23781, 24896 => 23810, + 24897 => 23811, 24898 => 23847, 24899 => 23846, 24900 => 23854, 24901 => 23844, + 24902 => 23838, 24903 => 23814, 24904 => 23835, 24905 => 23896, 24906 => 23870, + 24907 => 23860, 24908 => 23869, 24909 => 23916, 24910 => 23899, 24911 => 23919, + 24912 => 23901, 24913 => 23915, 24914 => 23883, 24915 => 23882, 24916 => 23913, + 24917 => 23924, 24918 => 23938, 24919 => 23961, 24920 => 23965, 24921 => 35955, + 24922 => 23991, 24923 => 24005, 24924 => 24435, 24925 => 24439, 24926 => 24450, + 24927 => 24455, 24928 => 24457, 24929 => 24460, 24930 => 24469, 24931 => 24473, + 24932 => 24476, 24933 => 24488, 24934 => 24493, 24935 => 24501, 24936 => 24508, + 24937 => 34914, 24938 => 24417, 24939 => 29357, 24940 => 29360, 24941 => 29364, + 24942 => 29367, 24943 => 29368, 24944 => 29379, 24945 => 29377, 24946 => 29390, + 24947 => 29389, 24948 => 29394, 24949 => 29416, 24950 => 29423, 24951 => 29417, + 24952 => 29426, 24953 => 29428, 24954 => 29431, 24955 => 29441, 24956 => 29427, + 24957 => 29443, 24958 => 29434, 25121 => 29435, 25122 => 29463, 25123 => 29459, + 25124 => 29473, 25125 => 29450, 25126 => 29470, 25127 => 29469, 25128 => 29461, + 25129 => 29474, 25130 => 29497, 25131 => 29477, 25132 => 29484, 25133 => 29496, + 25134 => 29489, 25135 => 29520, 25136 => 29517, 25137 => 29527, 25138 => 29536, + 25139 => 29548, 25140 => 29551, 25141 => 29566, 25142 => 33307, 25143 => 22821, + 25144 => 39143, 25145 => 22820, 25146 => 22786, 25147 => 39267, 25148 => 39271, + 25149 => 39272, 25150 => 39273, 25151 => 39274, 25152 => 39275, 25153 => 39276, + 25154 => 39284, 25155 => 39287, 25156 => 39293, 25157 => 39296, 25158 => 39300, + 25159 => 39303, 25160 => 39306, 25161 => 39309, 25162 => 39312, 25163 => 39313, + 25164 => 39315, 25165 => 39316, 25166 => 39317, 25167 => 24192, 25168 => 24209, + 25169 => 24203, 25170 => 24214, 25171 => 24229, 25172 => 24224, 25173 => 24249, + 25174 => 24245, 25175 => 24254, 25176 => 24243, 25177 => 36179, 25178 => 24274, + 25179 => 24273, 25180 => 24283, 25181 => 24296, 25182 => 24298, 25183 => 33210, + 25184 => 24516, 25185 => 24521, 25186 => 24534, 25187 => 24527, 25188 => 24579, + 25189 => 24558, 25190 => 24580, 25191 => 24545, 25192 => 24548, 25193 => 24574, + 25194 => 24581, 25195 => 24582, 25196 => 24554, 25197 => 24557, 25198 => 24568, + 25199 => 24601, 25200 => 24629, 25201 => 24614, 25202 => 24603, 25203 => 24591, + 25204 => 24589, 25205 => 24617, 25206 => 24619, 25207 => 24586, 25208 => 24639, + 25209 => 24609, 25210 => 24696, 25211 => 24697, 25212 => 24699, 25213 => 24698, + 25214 => 24642, 25377 => 24682, 25378 => 24701, 25379 => 24726, 25380 => 24730, + 25381 => 24749, 25382 => 24733, 25383 => 24707, 25384 => 24722, 25385 => 24716, + 25386 => 24731, 25387 => 24812, 25388 => 24763, 25389 => 24753, 25390 => 24797, + 25391 => 24792, 25392 => 24774, 25393 => 24794, 25394 => 24756, 25395 => 24864, + 25396 => 24870, 25397 => 24853, 25398 => 24867, 25399 => 24820, 25400 => 24832, + 25401 => 24846, 25402 => 24875, 25403 => 24906, 25404 => 24949, 25405 => 25004, + 25406 => 24980, 25407 => 24999, 25408 => 25015, 25409 => 25044, 25410 => 25077, + 25411 => 24541, 25412 => 38579, 25413 => 38377, 25414 => 38379, 25415 => 38385, + 25416 => 38387, 25417 => 38389, 25418 => 38390, 25419 => 38396, 25420 => 38398, + 25421 => 38403, 25422 => 38404, 25423 => 38406, 25424 => 38408, 25425 => 38410, + 25426 => 38411, 25427 => 38412, 25428 => 38413, 25429 => 38415, 25430 => 38418, + 25431 => 38421, 25432 => 38422, 25433 => 38423, 25434 => 38425, 25435 => 38426, + 25436 => 20012, 25437 => 29247, 25438 => 25109, 25439 => 27701, 25440 => 27732, + 25441 => 27740, 25442 => 27722, 25443 => 27811, 25444 => 27781, 25445 => 27792, + 25446 => 27796, 25447 => 27788, 25448 => 27752, 25449 => 27753, 25450 => 27764, + 25451 => 27766, 25452 => 27782, 25453 => 27817, 25454 => 27856, 25455 => 27860, + 25456 => 27821, 25457 => 27895, 25458 => 27896, 25459 => 27889, 25460 => 27863, + 25461 => 27826, 25462 => 27872, 25463 => 27862, 25464 => 27898, 25465 => 27883, + 25466 => 27886, 25467 => 27825, 25468 => 27859, 25469 => 27887, 25470 => 27902, + 25633 => 27961, 25634 => 27943, 25635 => 27916, 25636 => 27971, 25637 => 27976, + 25638 => 27911, 25639 => 27908, 25640 => 27929, 25641 => 27918, 25642 => 27947, + 25643 => 27981, 25644 => 27950, 25645 => 27957, 25646 => 27930, 25647 => 27983, + 25648 => 27986, 25649 => 27988, 25650 => 27955, 25651 => 28049, 25652 => 28015, + 25653 => 28062, 25654 => 28064, 25655 => 27998, 25656 => 28051, 25657 => 28052, + 25658 => 27996, 25659 => 28000, 25660 => 28028, 25661 => 28003, 25662 => 28186, + 25663 => 28103, 25664 => 28101, 25665 => 28126, 25666 => 28174, 25667 => 28095, + 25668 => 28128, 25669 => 28177, 25670 => 28134, 25671 => 28125, 25672 => 28121, + 25673 => 28182, 25674 => 28075, 25675 => 28172, 25676 => 28078, 25677 => 28203, + 25678 => 28270, 25679 => 28238, 25680 => 28267, 25681 => 28338, 25682 => 28255, + 25683 => 28294, 25684 => 28243, 25685 => 28244, 25686 => 28210, 25687 => 28197, + 25688 => 28228, 25689 => 28383, 25690 => 28337, 25691 => 28312, 25692 => 28384, + 25693 => 28461, 25694 => 28386, 25695 => 28325, 25696 => 28327, 25697 => 28349, + 25698 => 28347, 25699 => 28343, 25700 => 28375, 25701 => 28340, 25702 => 28367, + 25703 => 28303, 25704 => 28354, 25705 => 28319, 25706 => 28514, 25707 => 28486, + 25708 => 28487, 25709 => 28452, 25710 => 28437, 25711 => 28409, 25712 => 28463, + 25713 => 28470, 25714 => 28491, 25715 => 28532, 25716 => 28458, 25717 => 28425, + 25718 => 28457, 25719 => 28553, 25720 => 28557, 25721 => 28556, 25722 => 28536, + 25723 => 28530, 25724 => 28540, 25725 => 28538, 25726 => 28625, 25889 => 28617, + 25890 => 28583, 25891 => 28601, 25892 => 28598, 25893 => 28610, 25894 => 28641, + 25895 => 28654, 25896 => 28638, 25897 => 28640, 25898 => 28655, 25899 => 28698, + 25900 => 28707, 25901 => 28699, 25902 => 28729, 25903 => 28725, 25904 => 28751, + 25905 => 28766, 25906 => 23424, 25907 => 23428, 25908 => 23445, 25909 => 23443, + 25910 => 23461, 25911 => 23480, 25912 => 29999, 25913 => 39582, 25914 => 25652, + 25915 => 23524, 25916 => 23534, 25917 => 35120, 25918 => 23536, 25919 => 36423, + 25920 => 35591, 25921 => 36790, 25922 => 36819, 25923 => 36821, 25924 => 36837, + 25925 => 36846, 25926 => 36836, 25927 => 36841, 25928 => 36838, 25929 => 36851, + 25930 => 36840, 25931 => 36869, 25932 => 36868, 25933 => 36875, 25934 => 36902, + 25935 => 36881, 25936 => 36877, 25937 => 36886, 25938 => 36897, 25939 => 36917, + 25940 => 36918, 25941 => 36909, 25942 => 36911, 25943 => 36932, 25944 => 36945, + 25945 => 36946, 25946 => 36944, 25947 => 36968, 25948 => 36952, 25949 => 36962, + 25950 => 36955, 25951 => 26297, 25952 => 36980, 25953 => 36989, 25954 => 36994, + 25955 => 37000, 25956 => 36995, 25957 => 37003, 25958 => 24400, 25959 => 24407, + 25960 => 24406, 25961 => 24408, 25962 => 23611, 25963 => 21675, 25964 => 23632, + 25965 => 23641, 25966 => 23409, 25967 => 23651, 25968 => 23654, 25969 => 32700, + 25970 => 24362, 25971 => 24361, 25972 => 24365, 25973 => 33396, 25974 => 24380, + 25975 => 39739, 25976 => 23662, 25977 => 22913, 25978 => 22915, 25979 => 22925, + 25980 => 22953, 25981 => 22954, 25982 => 22947, 26145 => 22935, 26146 => 22986, + 26147 => 22955, 26148 => 22942, 26149 => 22948, 26150 => 22994, 26151 => 22962, + 26152 => 22959, 26153 => 22999, 26154 => 22974, 26155 => 23045, 26156 => 23046, + 26157 => 23005, 26158 => 23048, 26159 => 23011, 26160 => 23000, 26161 => 23033, + 26162 => 23052, 26163 => 23049, 26164 => 23090, 26165 => 23092, 26166 => 23057, + 26167 => 23075, 26168 => 23059, 26169 => 23104, 26170 => 23143, 26171 => 23114, + 26172 => 23125, 26173 => 23100, 26174 => 23138, 26175 => 23157, 26176 => 33004, + 26177 => 23210, 26178 => 23195, 26179 => 23159, 26180 => 23162, 26181 => 23230, + 26182 => 23275, 26183 => 23218, 26184 => 23250, 26185 => 23252, 26186 => 23224, + 26187 => 23264, 26188 => 23267, 26189 => 23281, 26190 => 23254, 26191 => 23270, + 26192 => 23256, 26193 => 23260, 26194 => 23305, 26195 => 23319, 26196 => 23318, + 26197 => 23346, 26198 => 23351, 26199 => 23360, 26200 => 23573, 26201 => 23580, + 26202 => 23386, 26203 => 23397, 26204 => 23411, 26205 => 23377, 26206 => 23379, + 26207 => 23394, 26208 => 39541, 26209 => 39543, 26210 => 39544, 26211 => 39546, + 26212 => 39551, 26213 => 39549, 26214 => 39552, 26215 => 39553, 26216 => 39557, + 26217 => 39560, 26218 => 39562, 26219 => 39568, 26220 => 39570, 26221 => 39571, + 26222 => 39574, 26223 => 39576, 26224 => 39579, 26225 => 39580, 26226 => 39581, + 26227 => 39583, 26228 => 39584, 26229 => 39586, 26230 => 39587, 26231 => 39589, + 26232 => 39591, 26233 => 32415, 26234 => 32417, 26235 => 32419, 26236 => 32421, + 26237 => 32424, 26238 => 32425, 26401 => 32429, 26402 => 32432, 26403 => 32446, + 26404 => 32448, 26405 => 32449, 26406 => 32450, 26407 => 32457, 26408 => 32459, + 26409 => 32460, 26410 => 32464, 26411 => 32468, 26412 => 32471, 26413 => 32475, + 26414 => 32480, 26415 => 32481, 26416 => 32488, 26417 => 32491, 26418 => 32494, + 26419 => 32495, 26420 => 32497, 26421 => 32498, 26422 => 32525, 26423 => 32502, + 26424 => 32506, 26425 => 32507, 26426 => 32510, 26427 => 32513, 26428 => 32514, + 26429 => 32515, 26430 => 32519, 26431 => 32520, 26432 => 32523, 26433 => 32524, + 26434 => 32527, 26435 => 32529, 26436 => 32530, 26437 => 32535, 26438 => 32537, + 26439 => 32540, 26440 => 32539, 26441 => 32543, 26442 => 32545, 26443 => 32546, + 26444 => 32547, 26445 => 32548, 26446 => 32549, 26447 => 32550, 26448 => 32551, + 26449 => 32554, 26450 => 32555, 26451 => 32556, 26452 => 32557, 26453 => 32559, + 26454 => 32560, 26455 => 32561, 26456 => 32562, 26457 => 32563, 26458 => 32565, + 26459 => 24186, 26460 => 30079, 26461 => 24027, 26462 => 30014, 26463 => 37013, + 26464 => 29582, 26465 => 29585, 26466 => 29614, 26467 => 29602, 26468 => 29599, + 26469 => 29647, 26470 => 29634, 26471 => 29649, 26472 => 29623, 26473 => 29619, + 26474 => 29632, 26475 => 29641, 26476 => 29640, 26477 => 29669, 26478 => 29657, + 26479 => 39036, 26480 => 29706, 26481 => 29673, 26482 => 29671, 26483 => 29662, + 26484 => 29626, 26485 => 29682, 26486 => 29711, 26487 => 29738, 26488 => 29787, + 26489 => 29734, 26490 => 29733, 26491 => 29736, 26492 => 29744, 26493 => 29742, + 26494 => 29740, 26657 => 29723, 26658 => 29722, 26659 => 29761, 26660 => 29788, + 26661 => 29783, 26662 => 29781, 26663 => 29785, 26664 => 29815, 26665 => 29805, + 26666 => 29822, 26667 => 29852, 26668 => 29838, 26669 => 29824, 26670 => 29825, + 26671 => 29831, 26672 => 29835, 26673 => 29854, 26674 => 29864, 26675 => 29865, + 26676 => 29840, 26677 => 29863, 26678 => 29906, 26679 => 29882, 26680 => 38890, + 26681 => 38891, 26682 => 38892, 26683 => 26444, 26684 => 26451, 26685 => 26462, + 26686 => 26440, 26687 => 26473, 26688 => 26533, 26689 => 26503, 26690 => 26474, + 26691 => 26483, 26692 => 26520, 26693 => 26535, 26694 => 26485, 26695 => 26536, + 26696 => 26526, 26697 => 26541, 26698 => 26507, 26699 => 26487, 26700 => 26492, + 26701 => 26608, 26702 => 26633, 26703 => 26584, 26704 => 26634, 26705 => 26601, + 26706 => 26544, 26707 => 26636, 26708 => 26585, 26709 => 26549, 26710 => 26586, + 26711 => 26547, 26712 => 26589, 26713 => 26624, 26714 => 26563, 26715 => 26552, + 26716 => 26594, 26717 => 26638, 26718 => 26561, 26719 => 26621, 26720 => 26674, + 26721 => 26675, 26722 => 26720, 26723 => 26721, 26724 => 26702, 26725 => 26722, + 26726 => 26692, 26727 => 26724, 26728 => 26755, 26729 => 26653, 26730 => 26709, + 26731 => 26726, 26732 => 26689, 26733 => 26727, 26734 => 26688, 26735 => 26686, + 26736 => 26698, 26737 => 26697, 26738 => 26665, 26739 => 26805, 26740 => 26767, + 26741 => 26740, 26742 => 26743, 26743 => 26771, 26744 => 26731, 26745 => 26818, + 26746 => 26990, 26747 => 26876, 26748 => 26911, 26749 => 26912, 26750 => 26873, + 26913 => 26916, 26914 => 26864, 26915 => 26891, 26916 => 26881, 26917 => 26967, + 26918 => 26851, 26919 => 26896, 26920 => 26993, 26921 => 26937, 26922 => 26976, + 26923 => 26946, 26924 => 26973, 26925 => 27012, 26926 => 26987, 26927 => 27008, + 26928 => 27032, 26929 => 27000, 26930 => 26932, 26931 => 27084, 26932 => 27015, + 26933 => 27016, 26934 => 27086, 26935 => 27017, 26936 => 26982, 26937 => 26979, + 26938 => 27001, 26939 => 27035, 26940 => 27047, 26941 => 27067, 26942 => 27051, + 26943 => 27053, 26944 => 27092, 26945 => 27057, 26946 => 27073, 26947 => 27082, + 26948 => 27103, 26949 => 27029, 26950 => 27104, 26951 => 27021, 26952 => 27135, + 26953 => 27183, 26954 => 27117, 26955 => 27159, 26956 => 27160, 26957 => 27237, + 26958 => 27122, 26959 => 27204, 26960 => 27198, 26961 => 27296, 26962 => 27216, + 26963 => 27227, 26964 => 27189, 26965 => 27278, 26966 => 27257, 26967 => 27197, + 26968 => 27176, 26969 => 27224, 26970 => 27260, 26971 => 27281, 26972 => 27280, + 26973 => 27305, 26974 => 27287, 26975 => 27307, 26976 => 29495, 26977 => 29522, + 26978 => 27521, 26979 => 27522, 26980 => 27527, 26981 => 27524, 26982 => 27538, + 26983 => 27539, 26984 => 27533, 26985 => 27546, 26986 => 27547, 26987 => 27553, + 26988 => 27562, 26989 => 36715, 26990 => 36717, 26991 => 36721, 26992 => 36722, + 26993 => 36723, 26994 => 36725, 26995 => 36726, 26996 => 36728, 26997 => 36727, + 26998 => 36729, 26999 => 36730, 27000 => 36732, 27001 => 36734, 27002 => 36737, + 27003 => 36738, 27004 => 36740, 27005 => 36743, 27006 => 36747, 27169 => 36749, + 27170 => 36750, 27171 => 36751, 27172 => 36760, 27173 => 36762, 27174 => 36558, + 27175 => 25099, 27176 => 25111, 27177 => 25115, 27178 => 25119, 27179 => 25122, + 27180 => 25121, 27181 => 25125, 27182 => 25124, 27183 => 25132, 27184 => 33255, + 27185 => 29935, 27186 => 29940, 27187 => 29951, 27188 => 29967, 27189 => 29969, + 27190 => 29971, 27191 => 25908, 27192 => 26094, 27193 => 26095, 27194 => 26096, + 27195 => 26122, 27196 => 26137, 27197 => 26482, 27198 => 26115, 27199 => 26133, + 27200 => 26112, 27201 => 28805, 27202 => 26359, 27203 => 26141, 27204 => 26164, + 27205 => 26161, 27206 => 26166, 27207 => 26165, 27208 => 32774, 27209 => 26207, + 27210 => 26196, 27211 => 26177, 27212 => 26191, 27213 => 26198, 27214 => 26209, + 27215 => 26199, 27216 => 26231, 27217 => 26244, 27218 => 26252, 27219 => 26279, + 27220 => 26269, 27221 => 26302, 27222 => 26331, 27223 => 26332, 27224 => 26342, + 27225 => 26345, 27226 => 36146, 27227 => 36147, 27228 => 36150, 27229 => 36155, + 27230 => 36157, 27231 => 36160, 27232 => 36165, 27233 => 36166, 27234 => 36168, + 27235 => 36169, 27236 => 36167, 27237 => 36173, 27238 => 36181, 27239 => 36185, + 27240 => 35271, 27241 => 35274, 27242 => 35275, 27243 => 35276, 27244 => 35278, + 27245 => 35279, 27246 => 35280, 27247 => 35281, 27248 => 29294, 27249 => 29343, + 27250 => 29277, 27251 => 29286, 27252 => 29295, 27253 => 29310, 27254 => 29311, + 27255 => 29316, 27256 => 29323, 27257 => 29325, 27258 => 29327, 27259 => 29330, + 27260 => 25352, 27261 => 25394, 27262 => 25520, 27425 => 25663, 27426 => 25816, + 27427 => 32772, 27428 => 27626, 27429 => 27635, 27430 => 27645, 27431 => 27637, + 27432 => 27641, 27433 => 27653, 27434 => 27655, 27435 => 27654, 27436 => 27661, + 27437 => 27669, 27438 => 27672, 27439 => 27673, 27440 => 27674, 27441 => 27681, + 27442 => 27689, 27443 => 27684, 27444 => 27690, 27445 => 27698, 27446 => 25909, + 27447 => 25941, 27448 => 25963, 27449 => 29261, 27450 => 29266, 27451 => 29270, + 27452 => 29232, 27453 => 34402, 27454 => 21014, 27455 => 32927, 27456 => 32924, + 27457 => 32915, 27458 => 32956, 27459 => 26378, 27460 => 32957, 27461 => 32945, + 27462 => 32939, 27463 => 32941, 27464 => 32948, 27465 => 32951, 27466 => 32999, + 27467 => 33000, 27468 => 33001, 27469 => 33002, 27470 => 32987, 27471 => 32962, + 27472 => 32964, 27473 => 32985, 27474 => 32973, 27475 => 32983, 27476 => 26384, + 27477 => 32989, 27478 => 33003, 27479 => 33009, 27480 => 33012, 27481 => 33005, + 27482 => 33037, 27483 => 33038, 27484 => 33010, 27485 => 33020, 27486 => 26389, + 27487 => 33042, 27488 => 35930, 27489 => 33078, 27490 => 33054, 27491 => 33068, + 27492 => 33048, 27493 => 33074, 27494 => 33096, 27495 => 33100, 27496 => 33107, + 27497 => 33140, 27498 => 33113, 27499 => 33114, 27500 => 33137, 27501 => 33120, + 27502 => 33129, 27503 => 33148, 27504 => 33149, 27505 => 33133, 27506 => 33127, + 27507 => 22605, 27508 => 23221, 27509 => 33160, 27510 => 33154, 27511 => 33169, + 27512 => 28373, 27513 => 33187, 27514 => 33194, 27515 => 33228, 27516 => 26406, + 27517 => 33226, 27518 => 33211, 27681 => 33217, 27682 => 33190, 27683 => 27428, + 27684 => 27447, 27685 => 27449, 27686 => 27459, 27687 => 27462, 27688 => 27481, + 27689 => 39121, 27690 => 39122, 27691 => 39123, 27692 => 39125, 27693 => 39129, + 27694 => 39130, 27695 => 27571, 27696 => 24384, 27697 => 27586, 27698 => 35315, + 27699 => 26000, 27700 => 40785, 27701 => 26003, 27702 => 26044, 27703 => 26054, + 27704 => 26052, 27705 => 26051, 27706 => 26060, 27707 => 26062, 27708 => 26066, + 27709 => 26070, 27710 => 28800, 27711 => 28828, 27712 => 28822, 27713 => 28829, + 27714 => 28859, 27715 => 28864, 27716 => 28855, 27717 => 28843, 27718 => 28849, + 27719 => 28904, 27720 => 28874, 27721 => 28944, 27722 => 28947, 27723 => 28950, + 27724 => 28975, 27725 => 28977, 27726 => 29043, 27727 => 29020, 27728 => 29032, + 27729 => 28997, 27730 => 29042, 27731 => 29002, 27732 => 29048, 27733 => 29050, + 27734 => 29080, 27735 => 29107, 27736 => 29109, 27737 => 29096, 27738 => 29088, + 27739 => 29152, 27740 => 29140, 27741 => 29159, 27742 => 29177, 27743 => 29213, + 27744 => 29224, 27745 => 28780, 27746 => 28952, 27747 => 29030, 27748 => 29113, + 27749 => 25150, 27750 => 25149, 27751 => 25155, 27752 => 25160, 27753 => 25161, + 27754 => 31035, 27755 => 31040, 27756 => 31046, 27757 => 31049, 27758 => 31067, + 27759 => 31068, 27760 => 31059, 27761 => 31066, 27762 => 31074, 27763 => 31063, + 27764 => 31072, 27765 => 31087, 27766 => 31079, 27767 => 31098, 27768 => 31109, + 27769 => 31114, 27770 => 31130, 27771 => 31143, 27772 => 31155, 27773 => 24529, + 27774 => 24528, 27937 => 24636, 27938 => 24669, 27939 => 24666, 27940 => 24679, + 27941 => 24641, 27942 => 24665, 27943 => 24675, 27944 => 24747, 27945 => 24838, + 27946 => 24845, 27947 => 24925, 27948 => 25001, 27949 => 24989, 27950 => 25035, + 27951 => 25041, 27952 => 25094, 27953 => 32896, 27954 => 32895, 27955 => 27795, + 27956 => 27894, 27957 => 28156, 27958 => 30710, 27959 => 30712, 27960 => 30720, + 27961 => 30729, 27962 => 30743, 27963 => 30744, 27964 => 30737, 27965 => 26027, + 27966 => 30765, 27967 => 30748, 27968 => 30749, 27969 => 30777, 27970 => 30778, + 27971 => 30779, 27972 => 30751, 27973 => 30780, 27974 => 30757, 27975 => 30764, + 27976 => 30755, 27977 => 30761, 27978 => 30798, 27979 => 30829, 27980 => 30806, + 27981 => 30807, 27982 => 30758, 27983 => 30800, 27984 => 30791, 27985 => 30796, + 27986 => 30826, 27987 => 30875, 27988 => 30867, 27989 => 30874, 27990 => 30855, + 27991 => 30876, 27992 => 30881, 27993 => 30883, 27994 => 30898, 27995 => 30905, + 27996 => 30885, 27997 => 30932, 27998 => 30937, 27999 => 30921, 28000 => 30956, + 28001 => 30962, 28002 => 30981, 28003 => 30964, 28004 => 30995, 28005 => 31012, + 28006 => 31006, 28007 => 31028, 28008 => 40859, 28009 => 40697, 28010 => 40699, + 28011 => 40700, 28012 => 30449, 28013 => 30468, 28014 => 30477, 28015 => 30457, + 28016 => 30471, 28017 => 30472, 28018 => 30490, 28019 => 30498, 28020 => 30489, + 28021 => 30509, 28022 => 30502, 28023 => 30517, 28024 => 30520, 28025 => 30544, + 28026 => 30545, 28027 => 30535, 28028 => 30531, 28029 => 30554, 28030 => 30568, + 28193 => 30562, 28194 => 30565, 28195 => 30591, 28196 => 30605, 28197 => 30589, + 28198 => 30592, 28199 => 30604, 28200 => 30609, 28201 => 30623, 28202 => 30624, + 28203 => 30640, 28204 => 30645, 28205 => 30653, 28206 => 30010, 28207 => 30016, + 28208 => 30030, 28209 => 30027, 28210 => 30024, 28211 => 30043, 28212 => 30066, + 28213 => 30073, 28214 => 30083, 28215 => 32600, 28216 => 32609, 28217 => 32607, + 28218 => 35400, 28219 => 32616, 28220 => 32628, 28221 => 32625, 28222 => 32633, + 28223 => 32641, 28224 => 32638, 28225 => 30413, 28226 => 30437, 28227 => 34866, + 28228 => 38021, 28229 => 38022, 28230 => 38023, 28231 => 38027, 28232 => 38026, + 28233 => 38028, 28234 => 38029, 28235 => 38031, 28236 => 38032, 28237 => 38036, + 28238 => 38039, 28239 => 38037, 28240 => 38042, 28241 => 38043, 28242 => 38044, + 28243 => 38051, 28244 => 38052, 28245 => 38059, 28246 => 38058, 28247 => 38061, + 28248 => 38060, 28249 => 38063, 28250 => 38064, 28251 => 38066, 28252 => 38068, + 28253 => 38070, 28254 => 38071, 28255 => 38072, 28256 => 38073, 28257 => 38074, + 28258 => 38076, 28259 => 38077, 28260 => 38079, 28261 => 38084, 28262 => 38088, + 28263 => 38089, 28264 => 38090, 28265 => 38091, 28266 => 38092, 28267 => 38093, + 28268 => 38094, 28269 => 38096, 28270 => 38097, 28271 => 38098, 28272 => 38101, + 28273 => 38102, 28274 => 38103, 28275 => 38105, 28276 => 38104, 28277 => 38107, + 28278 => 38110, 28279 => 38111, 28280 => 38112, 28281 => 38114, 28282 => 38116, + 28283 => 38117, 28284 => 38119, 28285 => 38120, 28286 => 38122, 28449 => 38121, + 28450 => 38123, 28451 => 38126, 28452 => 38127, 28453 => 38131, 28454 => 38132, + 28455 => 38133, 28456 => 38135, 28457 => 38137, 28458 => 38140, 28459 => 38141, + 28460 => 38143, 28461 => 38147, 28462 => 38146, 28463 => 38150, 28464 => 38151, + 28465 => 38153, 28466 => 38154, 28467 => 38157, 28468 => 38158, 28469 => 38159, + 28470 => 38162, 28471 => 38163, 28472 => 38164, 28473 => 38165, 28474 => 38166, + 28475 => 38168, 28476 => 38171, 28477 => 38173, 28478 => 38174, 28479 => 38175, + 28480 => 38178, 28481 => 38186, 28482 => 38187, 28483 => 38185, 28484 => 38188, + 28485 => 38193, 28486 => 38194, 28487 => 38196, 28488 => 38198, 28489 => 38199, + 28490 => 38200, 28491 => 38204, 28492 => 38206, 28493 => 38207, 28494 => 38210, + 28495 => 38197, 28496 => 38212, 28497 => 38213, 28498 => 38214, 28499 => 38217, + 28500 => 38220, 28501 => 38222, 28502 => 38223, 28503 => 38226, 28504 => 38227, + 28505 => 38228, 28506 => 38230, 28507 => 38231, 28508 => 38232, 28509 => 38233, + 28510 => 38235, 28511 => 38238, 28512 => 38239, 28513 => 38237, 28514 => 38241, + 28515 => 38242, 28516 => 38244, 28517 => 38245, 28518 => 38246, 28519 => 38247, + 28520 => 38248, 28521 => 38249, 28522 => 38250, 28523 => 38251, 28524 => 38252, + 28525 => 38255, 28526 => 38257, 28527 => 38258, 28528 => 38259, 28529 => 38202, + 28530 => 30695, 28531 => 30700, 28532 => 38601, 28533 => 31189, 28534 => 31213, + 28535 => 31203, 28536 => 31211, 28537 => 31238, 28538 => 23879, 28539 => 31235, + 28540 => 31234, 28541 => 31262, 28542 => 31252, 28705 => 31289, 28706 => 31287, + 28707 => 31313, 28708 => 40655, 28709 => 39333, 28710 => 31344, 28711 => 30344, + 28712 => 30350, 28713 => 30355, 28714 => 30361, 28715 => 30372, 28716 => 29918, + 28717 => 29920, 28718 => 29996, 28719 => 40480, 28720 => 40482, 28721 => 40488, + 28722 => 40489, 28723 => 40490, 28724 => 40491, 28725 => 40492, 28726 => 40498, + 28727 => 40497, 28728 => 40502, 28729 => 40504, 28730 => 40503, 28731 => 40505, + 28732 => 40506, 28733 => 40510, 28734 => 40513, 28735 => 40514, 28736 => 40516, + 28737 => 40518, 28738 => 40519, 28739 => 40520, 28740 => 40521, 28741 => 40523, + 28742 => 40524, 28743 => 40526, 28744 => 40529, 28745 => 40533, 28746 => 40535, + 28747 => 40538, 28748 => 40539, 28749 => 40540, 28750 => 40542, 28751 => 40547, + 28752 => 40550, 28753 => 40551, 28754 => 40552, 28755 => 40553, 28756 => 40554, + 28757 => 40555, 28758 => 40556, 28759 => 40561, 28760 => 40557, 28761 => 40563, + 28762 => 30098, 28763 => 30100, 28764 => 30102, 28765 => 30112, 28766 => 30109, + 28767 => 30124, 28768 => 30115, 28769 => 30131, 28770 => 30132, 28771 => 30136, + 28772 => 30148, 28773 => 30129, 28774 => 30128, 28775 => 30147, 28776 => 30146, + 28777 => 30166, 28778 => 30157, 28779 => 30179, 28780 => 30184, 28781 => 30182, + 28782 => 30180, 28783 => 30187, 28784 => 30183, 28785 => 30211, 28786 => 30193, + 28787 => 30204, 28788 => 30207, 28789 => 30224, 28790 => 30208, 28791 => 30213, + 28792 => 30220, 28793 => 30231, 28794 => 30218, 28795 => 30245, 28796 => 30232, + 28797 => 30229, 28798 => 30233, 28961 => 30235, 28962 => 30268, 28963 => 30242, + 28964 => 30240, 28965 => 30272, 28966 => 30253, 28967 => 30256, 28968 => 30271, + 28969 => 30261, 28970 => 30275, 28971 => 30270, 28972 => 30259, 28973 => 30285, + 28974 => 30302, 28975 => 30292, 28976 => 30300, 28977 => 30294, 28978 => 30315, + 28979 => 30319, 28980 => 32714, 28981 => 31462, 28982 => 31352, 28983 => 31353, + 28984 => 31360, 28985 => 31366, 28986 => 31368, 28987 => 31381, 28988 => 31398, + 28989 => 31392, 28990 => 31404, 28991 => 31400, 28992 => 31405, 28993 => 31411, + 28994 => 34916, 28995 => 34921, 28996 => 34930, 28997 => 34941, 28998 => 34943, + 28999 => 34946, 29000 => 34978, 29001 => 35014, 29002 => 34999, 29003 => 35004, + 29004 => 35017, 29005 => 35042, 29006 => 35022, 29007 => 35043, 29008 => 35045, + 29009 => 35057, 29010 => 35098, 29011 => 35068, 29012 => 35048, 29013 => 35070, + 29014 => 35056, 29015 => 35105, 29016 => 35097, 29017 => 35091, 29018 => 35099, + 29019 => 35082, 29020 => 35124, 29021 => 35115, 29022 => 35126, 29023 => 35137, + 29024 => 35174, 29025 => 35195, 29026 => 30091, 29027 => 32997, 29028 => 30386, + 29029 => 30388, 29030 => 30684, 29031 => 32786, 29032 => 32788, 29033 => 32790, + 29034 => 32796, 29035 => 32800, 29036 => 32802, 29037 => 32805, 29038 => 32806, + 29039 => 32807, 29040 => 32809, 29041 => 32808, 29042 => 32817, 29043 => 32779, + 29044 => 32821, 29045 => 32835, 29046 => 32838, 29047 => 32845, 29048 => 32850, + 29049 => 32873, 29050 => 32881, 29051 => 35203, 29052 => 39032, 29053 => 39040, + 29054 => 39043, 29217 => 39049, 29218 => 39052, 29219 => 39053, 29220 => 39055, + 29221 => 39060, 29222 => 39066, 29223 => 39067, 29224 => 39070, 29225 => 39071, + 29226 => 39073, 29227 => 39074, 29228 => 39077, 29229 => 39078, 29230 => 34381, + 29231 => 34388, 29232 => 34412, 29233 => 34414, 29234 => 34431, 29235 => 34426, + 29236 => 34428, 29237 => 34427, 29238 => 34472, 29239 => 34445, 29240 => 34443, + 29241 => 34476, 29242 => 34461, 29243 => 34471, 29244 => 34467, 29245 => 34474, + 29246 => 34451, 29247 => 34473, 29248 => 34486, 29249 => 34500, 29250 => 34485, + 29251 => 34510, 29252 => 34480, 29253 => 34490, 29254 => 34481, 29255 => 34479, + 29256 => 34505, 29257 => 34511, 29258 => 34484, 29259 => 34537, 29260 => 34545, + 29261 => 34546, 29262 => 34541, 29263 => 34547, 29264 => 34512, 29265 => 34579, + 29266 => 34526, 29267 => 34548, 29268 => 34527, 29269 => 34520, 29270 => 34513, + 29271 => 34563, 29272 => 34567, 29273 => 34552, 29274 => 34568, 29275 => 34570, + 29276 => 34573, 29277 => 34569, 29278 => 34595, 29279 => 34619, 29280 => 34590, + 29281 => 34597, 29282 => 34606, 29283 => 34586, 29284 => 34622, 29285 => 34632, + 29286 => 34612, 29287 => 34609, 29288 => 34601, 29289 => 34615, 29290 => 34623, + 29291 => 34690, 29292 => 34594, 29293 => 34685, 29294 => 34686, 29295 => 34683, + 29296 => 34656, 29297 => 34672, 29298 => 34636, 29299 => 34670, 29300 => 34699, + 29301 => 34643, 29302 => 34659, 29303 => 34684, 29304 => 34660, 29305 => 34649, + 29306 => 34661, 29307 => 34707, 29308 => 34735, 29309 => 34728, 29310 => 34770, + 29473 => 34758, 29474 => 34696, 29475 => 34693, 29476 => 34733, 29477 => 34711, + 29478 => 34691, 29479 => 34731, 29480 => 34789, 29481 => 34732, 29482 => 34741, + 29483 => 34739, 29484 => 34763, 29485 => 34771, 29486 => 34749, 29487 => 34769, + 29488 => 34752, 29489 => 34762, 29490 => 34779, 29491 => 34794, 29492 => 34784, + 29493 => 34798, 29494 => 34838, 29495 => 34835, 29496 => 34814, 29497 => 34826, + 29498 => 34843, 29499 => 34849, 29500 => 34873, 29501 => 34876, 29502 => 32566, + 29503 => 32578, 29504 => 32580, 29505 => 32581, 29506 => 33296, 29507 => 31482, + 29508 => 31485, 29509 => 31496, 29510 => 31491, 29511 => 31492, 29512 => 31509, + 29513 => 31498, 29514 => 31531, 29515 => 31503, 29516 => 31559, 29517 => 31544, + 29518 => 31530, 29519 => 31513, 29520 => 31534, 29521 => 31537, 29522 => 31520, + 29523 => 31525, 29524 => 31524, 29525 => 31539, 29526 => 31550, 29527 => 31518, + 29528 => 31576, 29529 => 31578, 29530 => 31557, 29531 => 31605, 29532 => 31564, + 29533 => 31581, 29534 => 31584, 29535 => 31598, 29536 => 31611, 29537 => 31586, + 29538 => 31602, 29539 => 31601, 29540 => 31632, 29541 => 31654, 29542 => 31655, + 29543 => 31672, 29544 => 31660, 29545 => 31645, 29546 => 31656, 29547 => 31621, + 29548 => 31658, 29549 => 31644, 29550 => 31650, 29551 => 31659, 29552 => 31668, + 29553 => 31697, 29554 => 31681, 29555 => 31692, 29556 => 31709, 29557 => 31706, + 29558 => 31717, 29559 => 31718, 29560 => 31722, 29561 => 31756, 29562 => 31742, + 29563 => 31740, 29564 => 31759, 29565 => 31766, 29566 => 31755, 29729 => 31775, + 29730 => 31786, 29731 => 31782, 29732 => 31800, 29733 => 31809, 29734 => 31808, + 29735 => 33278, 29736 => 33281, 29737 => 33282, 29738 => 33284, 29739 => 33260, + 29740 => 34884, 29741 => 33313, 29742 => 33314, 29743 => 33315, 29744 => 33325, + 29745 => 33327, 29746 => 33320, 29747 => 33323, 29748 => 33336, 29749 => 33339, + 29750 => 33331, 29751 => 33332, 29752 => 33342, 29753 => 33348, 29754 => 33353, + 29755 => 33355, 29756 => 33359, 29757 => 33370, 29758 => 33375, 29759 => 33384, + 29760 => 34942, 29761 => 34949, 29762 => 34952, 29763 => 35032, 29764 => 35039, + 29765 => 35166, 29766 => 32669, 29767 => 32671, 29768 => 32679, 29769 => 32687, + 29770 => 32688, 29771 => 32690, 29772 => 31868, 29773 => 25929, 29774 => 31889, + 29775 => 31901, 29776 => 31900, 29777 => 31902, 29778 => 31906, 29779 => 31922, + 29780 => 31932, 29781 => 31933, 29782 => 31937, 29783 => 31943, 29784 => 31948, + 29785 => 31949, 29786 => 31944, 29787 => 31941, 29788 => 31959, 29789 => 31976, + 29790 => 33390, 29791 => 26280, 29792 => 32703, 29793 => 32718, 29794 => 32725, + 29795 => 32741, 29796 => 32737, 29797 => 32742, 29798 => 32745, 29799 => 32750, + 29800 => 32755, 29801 => 31992, 29802 => 32119, 29803 => 32166, 29804 => 32174, + 29805 => 32327, 29806 => 32411, 29807 => 40632, 29808 => 40628, 29809 => 36211, + 29810 => 36228, 29811 => 36244, 29812 => 36241, 29813 => 36273, 29814 => 36199, + 29815 => 36205, 29816 => 35911, 29817 => 35913, 29818 => 37194, 29819 => 37200, + 29820 => 37198, 29821 => 37199, 29822 => 37220, 29985 => 37218, 29986 => 37217, + 29987 => 37232, 29988 => 37225, 29989 => 37231, 29990 => 37245, 29991 => 37246, + 29992 => 37234, 29993 => 37236, 29994 => 37241, 29995 => 37260, 29996 => 37253, + 29997 => 37264, 29998 => 37261, 29999 => 37265, 30000 => 37282, 30001 => 37283, + 30002 => 37290, 30003 => 37293, 30004 => 37294, 30005 => 37295, 30006 => 37301, + 30007 => 37300, 30008 => 37306, 30009 => 35925, 30010 => 40574, 30011 => 36280, + 30012 => 36331, 30013 => 36357, 30014 => 36441, 30015 => 36457, 30016 => 36277, + 30017 => 36287, 30018 => 36284, 30019 => 36282, 30020 => 36292, 30021 => 36310, + 30022 => 36311, 30023 => 36314, 30024 => 36318, 30025 => 36302, 30026 => 36303, + 30027 => 36315, 30028 => 36294, 30029 => 36332, 30030 => 36343, 30031 => 36344, + 30032 => 36323, 30033 => 36345, 30034 => 36347, 30035 => 36324, 30036 => 36361, + 30037 => 36349, 30038 => 36372, 30039 => 36381, 30040 => 36383, 30041 => 36396, + 30042 => 36398, 30043 => 36387, 30044 => 36399, 30045 => 36410, 30046 => 36416, + 30047 => 36409, 30048 => 36405, 30049 => 36413, 30050 => 36401, 30051 => 36425, + 30052 => 36417, 30053 => 36418, 30054 => 36433, 30055 => 36434, 30056 => 36426, + 30057 => 36464, 30058 => 36470, 30059 => 36476, 30060 => 36463, 30061 => 36468, + 30062 => 36485, 30063 => 36495, 30064 => 36500, 30065 => 36496, 30066 => 36508, + 30067 => 36510, 30068 => 35960, 30069 => 35970, 30070 => 35978, 30071 => 35973, + 30072 => 35992, 30073 => 35988, 30074 => 26011, 30075 => 35286, 30076 => 35294, + 30077 => 35290, 30078 => 35292, 30241 => 35301, 30242 => 35307, 30243 => 35311, + 30244 => 35390, 30245 => 35622, 30246 => 38739, 30247 => 38633, 30248 => 38643, + 30249 => 38639, 30250 => 38662, 30251 => 38657, 30252 => 38664, 30253 => 38671, + 30254 => 38670, 30255 => 38698, 30256 => 38701, 30257 => 38704, 30258 => 38718, + 30259 => 40832, 30260 => 40835, 30261 => 40837, 30262 => 40838, 30263 => 40839, + 30264 => 40840, 30265 => 40841, 30266 => 40842, 30267 => 40844, 30268 => 40702, + 30269 => 40715, 30270 => 40717, 30271 => 38585, 30272 => 38588, 30273 => 38589, + 30274 => 38606, 30275 => 38610, 30276 => 30655, 30277 => 38624, 30278 => 37518, + 30279 => 37550, 30280 => 37576, 30281 => 37694, 30282 => 37738, 30283 => 37834, + 30284 => 37775, 30285 => 37950, 30286 => 37995, 30287 => 40063, 30288 => 40066, + 30289 => 40069, 30290 => 40070, 30291 => 40071, 30292 => 40072, 30293 => 31267, + 30294 => 40075, 30295 => 40078, 30296 => 40080, 30297 => 40081, 30298 => 40082, + 30299 => 40084, 30300 => 40085, 30301 => 40090, 30302 => 40091, 30303 => 40094, + 30304 => 40095, 30305 => 40096, 30306 => 40097, 30307 => 40098, 30308 => 40099, + 30309 => 40101, 30310 => 40102, 30311 => 40103, 30312 => 40104, 30313 => 40105, + 30314 => 40107, 30315 => 40109, 30316 => 40110, 30317 => 40112, 30318 => 40113, + 30319 => 40114, 30320 => 40115, 30321 => 40116, 30322 => 40117, 30323 => 40118, + 30324 => 40119, 30325 => 40122, 30326 => 40123, 30327 => 40124, 30328 => 40125, + 30329 => 40132, 30330 => 40133, 30331 => 40134, 30332 => 40135, 30333 => 40138, + 30334 => 40139, 30497 => 40140, 30498 => 40141, 30499 => 40142, 30500 => 40143, + 30501 => 40144, 30502 => 40147, 30503 => 40148, 30504 => 40149, 30505 => 40151, + 30506 => 40152, 30507 => 40153, 30508 => 40156, 30509 => 40157, 30510 => 40159, + 30511 => 40162, 30512 => 38780, 30513 => 38789, 30514 => 38801, 30515 => 38802, + 30516 => 38804, 30517 => 38831, 30518 => 38827, 30519 => 38819, 30520 => 38834, + 30521 => 38836, 30522 => 39601, 30523 => 39600, 30524 => 39607, 30525 => 40536, + 30526 => 39606, 30527 => 39610, 30528 => 39612, 30529 => 39617, 30530 => 39616, + 30531 => 39621, 30532 => 39618, 30533 => 39627, 30534 => 39628, 30535 => 39633, + 30536 => 39749, 30537 => 39747, 30538 => 39751, 30539 => 39753, 30540 => 39752, + 30541 => 39757, 30542 => 39761, 30543 => 39144, 30544 => 39181, 30545 => 39214, + 30546 => 39253, 30547 => 39252, 30548 => 39647, 30549 => 39649, 30550 => 39654, + 30551 => 39663, 30552 => 39659, 30553 => 39675, 30554 => 39661, 30555 => 39673, + 30556 => 39688, 30557 => 39695, 30558 => 39699, 30559 => 39711, 30560 => 39715, + 30561 => 40637, 30562 => 40638, 30563 => 32315, 30564 => 40578, 30565 => 40583, + 30566 => 40584, 30567 => 40587, 30568 => 40594, 30569 => 37846, 30570 => 40605, + 30571 => 40607, 30572 => 40667, 30573 => 40668, 30574 => 40669, 30575 => 40672, + 30576 => 40671, 30577 => 40674, 30578 => 40681, 30579 => 40679, 30580 => 40677, + 30581 => 40682, 30582 => 40687, 30583 => 40738, 30584 => 40748, 30585 => 40751, + 30586 => 40761, 30587 => 40759, 30588 => 40765, 30589 => 40766, 30590 => 40772, + 0 => 0); + + public function gb2utf8($gb) + { + if (!trim($gb)) { + return $gb; + } + + $utf8 = ''; + while ($gb) { + if (ord(substr($gb, 0, 1)) > 127) { + $t = substr($gb, 0, 2); + $gb = substr($gb, 2); + $utf8 .= $this->u2utf8($this->codetable[hexdec(bin2hex($t)) - 0x8080]); + } else { + $t = substr($gb, 0, 1); + $gb = substr($gb, 1); + $utf8 .= $this->u2utf8($t); + } + } + return $utf8; + } + + public function u2utf8($c) + { + $str = ''; + if ($c < 0x80) { + $str .= $c; + } else if ($c < 0x800) { + $str .= chr(0xC0 | $c >> 6); + $str .= chr(0x80 | $c & 0x3F); + } else if ($c < 0x10000) { + $str .= chr(0xE0 | $c >> 12); + $str .= chr(0x80 | $c >> 6 & 0x3F); + $str .= chr(0x80 | $c & 0x3F); + } else if ($c < 0x200000) { + $str .= chr(0xF0 | $c >> 18); + $str .= chr(0x80 | $c >> 12 & 0x3F); + $str .= chr(0x80 | $c >> 6 & 0x3F); + $str .= chr(0x80 | $c & 0x3F); + } + return $str; + } + +} // END Class diff --git a/vendor/amenadiel/jpgraph/src/text/GTextTable.php b/vendor/amenadiel/jpgraph/src/text/GTextTable.php new file mode 100644 index 0000000000..1901c25496 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/text/GTextTable.php @@ -0,0 +1,969 @@ +iSize[0] = $aRows; + $this->iSize[1] = $aCols; + for ($i = 0; $i < $this->iSize[0]; ++$i) { + for ($j = 0; $j < $this->iSize[1]; ++$j) { + $this->iCells[$i][$j] = new GTextTableCell($aFillText, $i, $j); + $this->iCells[$i][$j]->Init($this); + } + } + $this->iInit = true; + } + + /*----------------------------------------------------------------- + * Outer border of table + *----------------------------------------------------------------- + */ + public function SetBorder($aWeight = 1, $aColor = 'black') + { + $this->iBorderColor = $aColor; + $this->iBorderWeight = $aWeight; + } + + /*----------------------------------------------------------------- + * Position in graph of table + *----------------------------------------------------------------- + */ + public function SetPos($aX, $aY) + { + $this->iXPos = $aX; + $this->iYPos = $aY; + } + + public function SetScalePos($aX, $aY) + { + $this->iScaleXPos = $aX; + $this->iScaleYPos = $aY; + } + + public function SetAnchorPos($aXAnchor, $aYAnchor = 'top') + { + $this->iXAnchor = $aXAnchor; + $this->iYAnchor = $aYAnchor; + } + + /*----------------------------------------------------------------- + * Setup country flag in a cell + *----------------------------------------------------------------- + */ + public function SetCellCountryFlag($aRow, $aCol, $aFlag, $aScale = 1.0, $aMix = 100, $aStdSize = 3) + { + $this->_chkR($aRow); + $this->_chkC($aCol); + $this->iCells[$aRow][$aCol]->SetCountryFlag($aFlag, $aScale, $aMix, $aStdSize); + + } + + /*----------------------------------------------------------------- + * Setup image in a cell + *----------------------------------------------------------------- + */ + public function SetCellImage($aRow, $aCol, $aFile, $aScale = 1.0, $aMix = 100) + { + $this->_chkR($aRow); + $this->_chkC($aCol); + $this->iCells[$aRow][$aCol]->SetImage($aFile, $aScale, $aMix); + } + + public function SetRowImage($aRow, $aFile, $aScale = 1.0, $aMix = 100) + { + $this->_chkR($aRow); + for ($j = 0; $j < $this->iSize[1]; ++$j) { + $this->iCells[$aRow][$j]->SetImage($aFile, $aScale, $aMix); + } + } + + public function SetColImage($aCol, $aFile, $aScale = 1.0, $aMix = 100) + { + $this->_chkC($aCol); + for ($j = 0; $j < $this->iSize[0]; ++$j) { + $this->iCells[$j][$aCol]->SetImage($aFile, $aScale, $aMix); + } + } + + public function SetImage($aFileR1, $aScaleC1 = null, $aMixR2 = null, $aC2 = null, $aFile = null, $aScale = 1.0, $aMix = 100) + { + if ($aScaleC1 !== null && $aMixR2 !== null && $aC2 !== null && $aFile !== null) { + $this->_chkR($aArgR1); + $this->_chkC($aC1); + $this->_chkR($aR2); + $this->_chkC($aC2); + } else { + if ($aScaleC1 !== null) { + $aScale = $aScaleC1; + } + + if ($aMixR2 !== null) { + $aMix = $aMixR2; + } + + $aFile = $aFileR1; + $aMixR2 = $this->iSize[0] - 1; + $aFileR1 = 0; + $aC2 = $this->iSize[1] - 1; + $aScaleC1 = 0; + } + for ($i = $aArgR1; $i <= $aR2; ++$i) { + for ($j = $aC1; $j <= $aC2; ++$j) { + $this->iCells[$i][$j]->SetImage($aFile, $aScale, $aMix); + } + } + } + + public function SetCellImageConstrain($aRow, $aCol, $aType, $aVal) + { + $this->_chkR($aRow); + $this->_chkC($aCol); + $this->iCells[$aRow][$aCol]->SetImageConstrain($aType, $aVal); + } + + /*----------------------------------------------------------------- + * Generate a HTML version of the table + *----------------------------------------------------------------- + */ + public function toString() + { + $t = ''; + for ($i = 0; $i < $this->iSize[0]; ++$i) { + $t .= ''; + for ($j = 0; $j < $this->iSize[1]; ++$j) { + $t .= ''; + } + $t .= ''; + } + $t .= '
        '; + if ($this->iCells[$i][$j]->iMerged) { + $t .= 'M '; + } + + $t .= 'val=' . $this->iCells[$i][$j]->iVal->t; + $t .= ' (cs=' . $this->iCells[$i][$j]->iColSpan . + ', rs=' . $this->iCells[$i][$j]->iRowSpan . ')'; + $t .= '
        '; + return $t; + } + + /*----------------------------------------------------------------- + * Specify data for table + *----------------------------------------------------------------- + */ + public function Set($aArg1, $aArg2 = null, $aArg3 = null) + { + if ($aArg2 === null && $aArg3 === null) { + if (is_array($aArg1)) { + if (is_array($aArg1[0])) { + $m = count($aArg1); + // Find the longest row + $n = 0; + for ($i = 0; $i < $m; ++$i) { + $n = max(count($aArg1[$i]), $n); + } + + for ($i = 0; $i < $m; ++$i) { + for ($j = 0; $j < $n; ++$j) { + if (isset($aArg1[$i][$j])) { + $this->_setcell($i, $j, (string) $aArg1[$i][$j]); + } else { + $this->_setcell($i, $j); + } + } + } + $this->iSize[0] = $m; + $this->iSize[1] = $n; + $this->iInit = true; + } else { + JpGraphError::RaiseL(27001); + //('Illegal argument to GTextTable::Set(). Array must be 2 dimensional'); + } + } else { + JpGraphError::RaiseL(27002); + //('Illegal argument to GTextTable::Set()'); + } + } else { + // Must be in the form (row,col,val) + $this->_chkR($aArg1); + $this->_chkC($aArg2); + $this->_setcell($aArg1, $aArg2, (string) $aArg3); + } + } + + /*--------------------------------------------------------------------- + * Cell margin setting + *--------------------------------------------------------------------- + */ + public function SetPadding($aArgR1, $aC1 = null, $aR2 = null, $aC2 = null, $aPad = null) + { + if ($aC1 !== null && $aR2 !== null && $aC2 !== null && $aPad !== null) { + $this->_chkR($aArgR1); + $this->_chkC($aC1); + $this->_chkR($aR2); + $this->_chkC($aC2); + } else { + $aPad = $aArgR1; + $aR2 = $this->iSize[0] - 1; + $aArgR1 = 0; + $aC2 = $this->iSize[1] - 1; + $aC1 = 0; + } + for ($i = $aArgR1; $i <= $aR2; ++$i) { + for ($j = $aC1; $j <= $aC2; ++$j) { + $this->iCells[$i][$j]->SetMargin($aPad, $aPad, $aPad, $aPad); + } + } + } + + public function SetRowPadding($aRow, $aPad) + { + $this->_chkR($aRow); + for ($j = 0; $j < $this->iSize[1]; ++$j) { + $this->iCells[$aRow][$j]->SetMargin($aPad, $aPad, $aPad, $aPad); + } + } + + public function SetColPadding($aCol, $aPad) + { + $this->_chkC($aCol); + for ($j = 0; $j < $this->iSize[0]; ++$j) { + $this->iCells[$j][$aCol]->SetMargin($aPad, $aPad, $aPad, $aPad); + } + } + + public function SetCellPadding($aRow, $aCol, $aPad) + { + $this->_chkR($aRow); + $this->_chkC($aCol); + $this->iCells[$aRow][$aCol]->SetMargin($aPad, $aPad, $aPad, $aPad); + } + + /*--------------------------------------------------------------------- + * Cell text orientation setting + *--------------------------------------------------------------------- + */ + public function SetTextOrientation($aArgR1, $aC1 = null, $aR2 = null, $aC2 = null, $aO = null) + { + if ($aC1 !== null && $aR2 !== null && $aC2 !== null && $aPad !== null) { + $this->_chkR($aArgR1); + $this->_chkC($aC1); + $this->_chkR($aR2); + $this->_chkC($aC2); + } else { + $aO = $aArgR1; + $aR2 = $this->iSize[0] - 1; + $aArgR1 = 0; + $aC2 = $this->iSize[1] - 1; + $aC1 = 0; + } + for ($i = $aArgR1; $i <= $aR2; ++$i) { + for ($j = $aC1; $j <= $aC2; ++$j) { + $this->iCells[$i][$j]->iVal->SetOrientation($aO); + } + } + } + + public function SetRowTextOrientation($aRow, $aO) + { + $this->_chkR($aRow); + for ($j = 0; $j < $this->iSize[1]; ++$j) { + $this->iCells[$aRow][$j]->iVal->SetOrientation($aO); + } + } + + public function SetColTextOrientation($aCol, $aO) + { + $this->_chkC($aCol); + for ($j = 0; $j < $this->iSize[0]; ++$j) { + $this->iCells[$j][$aCol]->iVal->SetOrientation($aO); + } + } + + public function SetCellTextOrientation($aRow, $aCol, $aO) + { + $this->_chkR($aRow); + $this->_chkC($aCol); + $this->iCells[$aRow][$aCol]->iVal->SetOrientation($aO); + } + + /*--------------------------------------------------------------------- + * Font color setting + *--------------------------------------------------------------------- + */ + + public function SetColor($aArgR1, $aC1 = null, $aR2 = null, $aC2 = null, $aArg = null) + { + if ($aC1 !== null && $aR2 !== null && $aC2 !== null && $aArg !== null) { + $this->_chkR($aArgR1); + $this->_chkC($aC1); + $this->_chkR($aR2); + $this->_chkC($aC2); + } else { + $aArg = $aArgR1; + $aR2 = $this->iSize[0] - 1; + $aArgR1 = 0; + $aC2 = $this->iSize[1] - 1; + $aC1 = 0; + } + for ($i = $aArgR1; $i <= $aR2; ++$i) { + for ($j = $aC1; $j <= $aC2; ++$j) { + $this->iCells[$i][$j]->SetFontColor($aArg); + } + } + } + + public function SetRowColor($aRow, $aColor) + { + $this->_chkR($aRow); + for ($j = 0; $j < $this->iSize[1]; ++$j) { + $this->iCells[$aRow][$j]->SetFontColor($aColor); + } + } + + public function SetColColor($aCol, $aColor) + { + $this->_chkC($aCol); + for ($i = 0; $i < $this->iSize[0]; ++$i) { + $this->iCells[$i][$aCol]->SetFontColor($aColor); + } + } + + public function SetCellColor($aRow, $aCol, $aColor) + { + $this->_chkR($aRow); + $this->_chkC($aCol); + $this->iCells[$aRow][$aCol]->SetFontColor($aColor); + } + + /*--------------------------------------------------------------------- + * Fill color settings + *--------------------------------------------------------------------- + */ + + public function SetFillColor($aArgR1, $aC1 = null, $aR2 = null, $aC2 = null, $aArg = null) + { + if ($aC1 !== null && $aR2 !== null && $aC2 !== null && $aArg !== null) { + $this->_chkR($aArgR1); + $this->_chkC($aC1); + $this->_chkR($aR2); + $this->_chkC($aC2); + for ($i = $aArgR1; $i <= $aR2; ++$i) { + for ($j = $aC1; $j <= $aC2; ++$j) { + $this->iCells[$i][$j]->SetFillColor($aArg); + } + } + } else { + $this->iBGColor = $aArgR1; + } + } + + public function SetRowFillColor($aRow, $aColor) + { + $this->_chkR($aRow); + for ($j = 0; $j < $this->iSize[1]; ++$j) { + $this->iCells[$aRow][$j]->SetFillColor($aColor); + } + } + + public function SetColFillColor($aCol, $aColor) + { + $this->_chkC($aCol); + for ($i = 0; $i < $this->iSize[0]; ++$i) { + $this->iCells[$i][$aCol]->SetFillColor($aColor); + } + } + + public function SetCellFillColor($aRow, $aCol, $aColor) + { + $this->_chkR($aRow); + $this->_chkC($aCol); + $this->iCells[$aRow][$aCol]->SetFillColor($aColor); + } + + /*--------------------------------------------------------------------- + * Font family setting + *--------------------------------------------------------------------- + */ + public function SetFont() + { + $numargs = func_num_args(); + if ($numargs == 2 || $numargs == 3) { + $aFF = func_get_arg(0); + $aFS = func_get_arg(1); + if ($numargs == 3) { + $aFSize = func_get_arg(2); + } else { + $aFSize = 10; + } + + $aR2 = $this->iSize[0] - 1; + $aR1 = 0; + $aC2 = $this->iSize[1] - 1; + $aC1 = 0; + + } elseif ($numargs == 6 || $numargs == 7) { + $aR1 = func_get_arg(0); + $aC1 = func_get_arg(1); + $aR2 = func_get_arg(2); + $aC2 = func_get_arg(3); + $aFF = func_get_arg(4); + $aFS = func_get_arg(5); + if ($numargs == 7) { + $aFSize = func_get_arg(6); + } else { + $aFSize = 10; + } + + } else { + JpGraphError::RaiseL(27003); + //('Wrong number of arguments to GTextTable::SetColor()'); + } + $this->_chkR($aR1); + $this->_chkC($aC1); + $this->_chkR($aR2); + $this->_chkC($aC2); + for ($i = $aR1; $i <= $aR2; ++$i) { + for ($j = $aC1; $j <= $aC2; ++$j) { + $this->iCells[$i][$j]->SetFont($aFF, $aFS, $aFSize); + } + } + } + + public function SetRowFont($aRow, $aFF, $aFS, $aFSize = 10) + { + $this->_chkR($aRow); + for ($j = 0; $j < $this->iSize[1]; ++$j) { + $this->iCells[$aRow][$j]->SetFont($aFF, $aFS, $aFSize); + } + } + + public function SetColFont($aCol, $aFF, $aFS, $aFSize = 10) + { + $this->_chkC($aCol); + for ($i = 0; $i < $this->iSize[0]; ++$i) { + $this->iCells[$i][$aCol]->SetFont($aFF, $aFS, $aFSize); + } + } + + public function SetCellFont($aRow, $aCol, $aFF, $aFS, $aFSize = 10) + { + $this->_chkR($aRow); + $this->_chkC($aCol); + $this->iCells[$aRow][$aCol]->SetFont($aFF, $aFS, $aFSize); + } + + /*--------------------------------------------------------------------- + * Cell align settings + *--------------------------------------------------------------------- + */ + + public function SetAlign($aR1HAlign = null, $aC1VAlign = null, $aR2 = null, $aC2 = null, $aHArg = null, $aVArg = 'center') + { + if ($aC1VAlign !== null && $aR2 !== null && $aC2 !== null && $aHArg !== null) { + $this->_chkR($aR1HAlign); + $this->_chkC($aC1VAlign); + $this->_chkR($aR2); + $this->_chkC($aC2); + } else { + if ($aR1HAlign === null) { + JpGraphError::RaiseL(27010); + } + if ($aC1VAlign === null) { + $aC1VAlign = 'center'; + } + $aHArg = $aR1HAlign; + $aVArg = $aC1VAlign === null ? 'center' : $aC1VAlign; + $aR2 = $this->iSize[0] - 1; + $aR1HAlign = 0; + $aC2 = $this->iSize[1] - 1; + $aC1VAlign = 0; + } + for ($i = $aR1HAlign; $i <= $aR2; ++$i) { + for ($j = $aC1VAlign; $j <= $aC2; ++$j) { + $this->iCells[$i][$j]->SetAlign($aHArg, $aVArg); + } + } + } + + public function SetCellAlign($aRow, $aCol, $aHorAlign, $aVertAlign = 'bottom') + { + $this->_chkR($aRow); + $this->_chkC($aCol); + $this->iCells[$aRow][$aCol]->SetAlign($aHorAlign, $aVertAlign); + } + + public function SetRowAlign($aRow, $aHorAlign, $aVertAlign = 'bottom') + { + $this->_chkR($aRow); + for ($j = 0; $j < $this->iSize[1]; ++$j) { + $this->iCells[$aRow][$j]->SetAlign($aHorAlign, $aVertAlign); + } + } + + public function SetColAlign($aCol, $aHorAlign, $aVertAlign = 'bottom') + { + $this->_chkC($aCol); + for ($i = 0; $i < $this->iSize[0]; ++$i) { + $this->iCells[$i][$aCol]->SetAlign($aHorAlign, $aVertAlign); + } + } + + /*--------------------------------------------------------------------- + * Cell number format + *--------------------------------------------------------------------- + */ + + public function SetNumberFormat($aArgR1, $aC1 = null, $aR2 = null, $aC2 = null, $aArg = null) + { + if ($aC1 !== null && $aR2 !== null && $aC2 !== null && $aArg !== null) { + $this->_chkR($aArgR1); + $this->_chkC($aC1); + $this->_chkR($aR2); + $this->_chkC($aC2); + } else { + $aArg = $aArgR1; + $aR2 = $this->iSize[0] - 1; + $aArgR1 = 0; + $aC2 = $this->iSize[1] - 1; + $aC1 = 0; + } + if (!is_string($aArg)) { + JpGraphError::RaiseL(27013); // argument must be a string + } + for ($i = $aArgR1; $i <= $aR2; ++$i) { + for ($j = $aC1; $j <= $aC2; ++$j) { + $this->iCells[$i][$j]->SetNumberFormat($aArg); + } + } + } + + public function SetRowNumberFormat($aRow, $aF) + { + $this->_chkR($aRow); + if (!is_string($aF)) { + JpGraphError::RaiseL(27013); // argument must be a string + } + for ($j = 0; $j < $this->iSize[1]; ++$j) { + $this->iCells[$aRow][$j]->SetNumberFormat($aF); + } + } + + public function SetColNumberFormat($aCol, $aF) + { + $this->_chkC($aCol); + if (!is_string($aF)) { + JpGraphError::RaiseL(27013); // argument must be a string + } + for ($i = 0; $i < $this->iSize[0]; ++$i) { + $this->iCells[$i][$aCol]->SetNumberFormat($aF); + } + } + + public function SetCellNumberFormat($aRow, $aCol, $aF) + { + $this->_chkR($aRow); + $this->_chkC($aCol); + if (!is_string($aF)) { + JpGraphError::RaiseL(27013); // argument must be a string + } + $this->iCells[$aRow][$aCol]->SetNumberFormat($aF); + } + + /*--------------------------------------------------------------------- + * Set row and column min size + *--------------------------------------------------------------------- + */ + + public function SetMinColWidth($aColWidth, $aWidth = null) + { + // If there is only one argument this means that all + // columns get set to the same width + if ($aWidth === null) { + for ($i = 0; $i < $this->iSize[1]; ++$i) { + $this->iColWidth[$i] = $aColWidth; + } + } else { + $this->_chkC($aColWidth); + $this->iColWidth[$aColWidth] = $aWidth; + } + } + + public function SetMinRowHeight($aRowHeight, $aHeight = null) + { + // If there is only one argument this means that all + // rows get set to the same height + if ($aHeight === null) { + for ($i = 0; $i < $this->iSize[0]; ++$i) { + $this->iRowHeight[$i] = $aRowHeight; + } + } else { + $this->_chkR($aRowHeight); + $this->iRowHeight[$aRowHeight] = $aHeight; + } + } + + /*--------------------------------------------------------------------- + * Grid line settings + *--------------------------------------------------------------------- + */ + + public function SetGrid($aWeight = 1, $aColor = 'black', $aStyle = TGRID_SINGLE) + { + $rc = $this->iSize[0]; + $cc = $this->iSize[1]; + for ($i = 0; $i < $rc; ++$i) { + for ($j = 0; $j < $cc; ++$j) { + $this->iCells[$i][$j]->SetGridColor($aColor, $aColor); + $this->iCells[$i][$j]->SetGridWeight($aWeight, $aWeight); + $this->iCells[$i][$j]->SetGridStyle($aStyle); + } + } + } + + public function SetColGrid($aCol, $aWeight = 1, $aColor = 'black', $aStyle = TGRID_SINGLE) + { + $this->_chkC($aCol); + for ($i = 0; $i < $this->iSize[0]; ++$i) { + $this->iCells[$i][$aCol]->SetGridWeight($aWeight); + $this->iCells[$i][$aCol]->SetGridColor($aColor); + $this->iCells[$i][$aCol]->SetGridStyle($aStyle); + } + } + + public function SetRowGrid($aRow, $aWeight = 1, $aColor = 'black', $aStyle = TGRID_SINGLE) + { + $this->_chkR($aRow); + for ($j = 0; $j < $this->iSize[1]; ++$j) { + $this->iCells[$aRow][$j]->SetGridWeight(null, $aWeight); + $this->iCells[$aRow][$j]->SetGridColor(null, $aColor); + $this->iCells[$aRow][$j]->SetGridStyle(null, $aStyle); + } + } + + /*--------------------------------------------------------------------- + * Merge cells + *--------------------------------------------------------------------- + */ + + public function MergeRow($aRow, $aHAlign = 'center', $aVAlign = 'center') + { + $this->_chkR($aRow); + $this->MergeCells($aRow, 0, $aRow, $this->iSize[1] - 1, $aHAlign, $aVAlign); + } + + public function MergeCol($aCol, $aHAlign = 'center', $aVAlign = 'center') + { + $this->_chkC($aCol); + $this->MergeCells(0, $aCol, $this->iSize[0] - 1, $aCol, $aHAlign, $aVAlign); + } + + public function MergeCells($aR1, $aC1, $aR2, $aC2, $aHAlign = 'center', $aVAlign = 'center') + { + if ($aR1 > $aR2 || $aC1 > $aC2) { + JpGraphError::RaiseL(27004); + //('GTextTable::MergeCells(). Specified cell range to be merged is not valid.'); + } + $this->_chkR($aR1); + $this->_chkC($aC1); + $this->_chkR($aR2); + $this->_chkC($aC2); + $rspan = $aR2 - $aR1 + 1; + $cspan = $aC2 - $aC1 + 1; + // Setup the parent cell for this merged group + if ($this->iCells[$aR1][$aC1]->IsMerged()) { + JpGraphError::RaiseL(27005, $aR1, $aC1, $aR2, $aC2); + //("Cannot merge already merged cells in the range ($aR1,$aC1), ($aR2,$aC2)"); + } + $this->iCells[$aR1][$aC1]->SetRowColSpan($rspan, $cspan); + $this->iCells[$aR1][$aC1]->SetAlign($aHAlign, $aVAlign); + for ($i = $aR1; $i <= $aR2; ++$i) { + for ($j = $aC1; $j <= $aC2; ++$j) { + if (!($i == $aR1 && $j == $aC1)) { + if ($this->iCells[$i][$j]->IsMerged()) { + JpGraphError::RaiseL(27005, $aR1, $aC1, $aR2, $aC2); + //("Cannot merge already merged cells in the range ($aR1,$aC1), ($aR2,$aC2)"); + } + $this->iCells[$i][$j]->SetMerged($aR1, $aC1, true); + } + } + } + } + + /*--------------------------------------------------------------------- + * CSIM methods + *--------------------------------------------------------------------- + */ + + public function SetCSIMTarget($aTarget, $aAlt = null, $aAutoTarget = false) + { + $m = $this->iSize[0]; + $n = $this->iSize[1]; + $csim = ''; + for ($i = 0; $i < $m; ++$i) { + for ($j = 0; $j < $n; ++$j) { + if ($aAutoTarget) { + $t = $aTarget . "?row=$i&col=$j"; + } else { + $t = $aTarget; + } + + $this->iCells[$i][$j]->SetCSIMTarget($t, $aAlt); + } + } + } + + public function SetCellCSIMTarget($aRow, $aCol, $aTarget, $aAlt = null) + { + $this->_chkR($aRow); + $this->_chkC($aCol); + $this->iCells[$aRow][$aCol]->SetCSIMTarget($aTarget, $aAlt); + } + + /*--------------------------------------------------------------------- + * Private methods + *--------------------------------------------------------------------- + */ + + public function GetCSIMAreas() + { + $m = $this->iSize[0]; + $n = $this->iSize[1]; + $csim = ''; + for ($i = 0; $i < $m; ++$i) { + for ($j = 0; $j < $n; ++$j) { + $csim .= $this->iCells[$i][$j]->GetCSIMArea(); + } + } + return $csim; + } + + public function _chkC($aCol) + { + if (!$this->iInit) { + JpGraphError::Raise(27014); // Table not initialized + } + if ($aCol < 0 || $aCol >= $this->iSize[1]) { + JpGraphError::RaiseL(27006, $aCol); + } + + //("GTextTable:\nColumn argument ($aCol) is outside specified table size."); + } + + public function _chkR($aRow) + { + if (!$this->iInit) { + JpGraphError::Raise(27014); // Table not initialized + } + if ($aRow < 0 || $aRow >= $this->iSize[0]) { + JpGraphError::RaiseL(27007, $aRow); + } + + //("GTextTable:\nRow argument ($aRow) is outside specified table size."); + } + + public function _getScalePos() + { + if ($this->iScaleXPos === null || $this->iScaleYPos === null) { + return false; + } + return array($this->iScaleXPos, $this->iScaleYPos); + } + + public function _autoSizeTable($aImg) + { + // Get maximum column width and row height + $m = $this->iSize[0]; + $n = $this->iSize[1]; + $w = 1; + $h = 1; + + // Get maximum row height per row + for ($i = 0; $i < $m; ++$i) { + $h = 0; + for ($j = 0; $j < $n; ++$j) { + $h = max($h, $this->iCells[$i][$j]->GetHeight($aImg)); + } + if (isset($this->iRowHeight[$i])) { + $this->iRowHeight[$i] = max($h, $this->iRowHeight[$i]); + } else { + $this->iRowHeight[$i] = $h; + } + + } + + // Get maximum col width per columns + for ($j = 0; $j < $n; ++$j) { + $w = 0; + for ($i = 0; $i < $m; ++$i) { + $w = max($w, $this->iCells[$i][$j]->GetWidth($aImg)); + } + if (isset($this->iColWidth[$j])) { + $this->iColWidth[$j] = max($w, $this->iColWidth[$j]); + } else { + $this->iColWidth[$j] = $w; + } + + } + } + + public function _setcell($aRow, $aCol, $aVal = '') + { + if (isset($this->iCells[$aRow][$aCol])) { + $this->iCells[$aRow][$aCol]->Set($aVal); + } else { + $this->iCells[$aRow][$aCol] = new GTextTableCell((string) $aVal, $aRow, $aCol); + $this->iCells[$aRow][$aCol]->Init($this); + } + } + + public function StrokeWithScale($aImg, $aXScale, $aYScale) + { + if (is_numeric($this->iScaleXPos) && is_numeric($this->iScaleYPos)) { + $x = round($aXScale->Translate($this->iScaleXPos)); + $y = round($aYScale->Translate($this->iScaleYPos)); + $this->Stroke($aImg, $x, $y); + } else { + $this->Stroke($aImg); + } + } + + public function Stroke($aImg, $aX = null, $aY = null) + { + if ($aX !== null && $aY !== null) { + $this->iXPos = $aX; + $this->iYPos = $aY; + } + + $rc = $this->iSize[0]; // row count + $cc = $this->iSize[1]; // column count + + if ($rc == 0 || $cc == 0) { + JpGraphError::RaiseL(27009); + } + + // Adjust margins of each cell based on the weight of the grid. Each table grid line + // is actually occupying the left side and top part of each cell. + for ($j = 0; $j < $cc; ++$j) { + $this->iCells[0][$j]->iMarginTop += $this->iBorderWeight; + } + for ($i = 0; $i < $rc; ++$i) { + $this->iCells[$i][0]->iMarginLeft += $this->iBorderWeight; + } + for ($i = 0; $i < $rc; ++$i) { + for ($j = 0; $j < $cc; ++$j) { + $this->iCells[$i][$j]->AdjustMarginsForGrid(); + } + } + + // adjust row and column size depending on cell content + $this->_autoSizeTable($aImg); + + if ($this->iSize[1] != count($this->iColWidth) || $this->iSize[0] != count($this->iRowHeight)) { + JpGraphError::RaiseL(27008); + //('Column and row size arrays must match the dimesnions of the table'); + } + + // Find out overall table size + $width = 0; + for ($i = 0; $i < $cc; ++$i) { + $width += $this->iColWidth[$i]; + } + $height = 0; + for ($i = 0; $i < $rc; ++$i) { + $height += $this->iRowHeight[$i]; + } + + // Adjust the X,Y position to alway be at the top left corner + // The anchor position, i.e. how the client want to interpret the specified + // x and y coordinate must be taken into account + switch (strtolower($this->iXAnchor)) { + case 'left': + break; + case 'center': + $this->iXPos -= round($width / 2); + break; + case 'right': + $this->iXPos -= $width; + break; + } + switch (strtolower($this->iYAnchor)) { + case 'top': + break; + case 'center': + case 'middle': + $this->iYPos -= round($height / 2); + break; + case 'bottom': + $this->iYPos -= $height; + break; + } + + // Set the overall background color of the table if set + if ($this->iBGColor !== '') { + $aImg->SetColor($this->iBGColor); + $aImg->FilledRectangle($this->iXPos, $this->iYPos, $this->iXPos + $width, $this->iYPos + $height); + } + + // Stroke all cells + $rpos = $this->iYPos; + for ($i = 0; $i < $rc; ++$i) { + $cpos = $this->iXPos; + for ($j = 0; $j < $cc; ++$j) { + // Calculate width and height of this cell if it is spanning + // more than one column or row + $cwidth = 0; + for ($k = 0; $k < $this->iCells[$i][$j]->iColSpan; ++$k) { + $cwidth += $this->iColWidth[$j + $k]; + } + $cheight = 0; + for ($k = 0; $k < $this->iCells[$i][$j]->iRowSpan; ++$k) { + $cheight += $this->iRowHeight[$i + $k]; + } + + $this->iCells[$i][$j]->Stroke($aImg, $cpos, $rpos, $cwidth, $cheight); + $cpos += $this->iColWidth[$j]; + } + $rpos += $this->iRowHeight[$i]; + } + + // Stroke outer border + $aImg->SetColor($this->iBorderColor); + if ($this->iBorderWeight == 1) { + $aImg->Rectangle($this->iXPos, $this->iYPos, $this->iXPos + $width, $this->iYPos + $height); + } else { + for ($i = 0; $i < $this->iBorderWeight; ++$i) { + $aImg->Rectangle($this->iXPos + $i, $this->iYPos + $i, + $this->iXPos + $width - 1 + $this->iBorderWeight - $i, + $this->iYPos + $height - 1 + $this->iBorderWeight - $i); + } + + } + } +} diff --git a/vendor/amenadiel/jpgraph/src/text/GTextTableCell.php b/vendor/amenadiel/jpgraph/src/text/GTextTableCell.php new file mode 100644 index 0000000000..7c92cde72b --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/text/GTextTableCell.php @@ -0,0 +1,549 @@ +iVal = new Text($aVal); + $this->iRow = $aRow; + $this->iCol = $aCol; + $this->iPRow = $aRow; // Initialiy each cell is its own parent + $this->iPCol = $aCol; + $this->iIconConstrain = array(-1, -1); + } + + public function Init($aTable) + { + $this->iTable = $aTable; + } + + public function SetCSIMTarget($aTarget, $aAlt = '', $aWinTarget = '') + { + $this->iCSIMtarget = $aTarget; + $this->iCSIMwintarget = $aWinTarget; + $this->iCSIMalt = $aAlt; + } + + public function GetCSIMArea() + { + if ($this->iCSIMtarget !== '') { + return $this->iCSIMArea; + } else { + return ''; + } + + } + + public function SetImageConstrain($aType, $aVal) + { + if (!in_array($aType, array(TIMG_WIDTH, TIMG_HEIGHT))) { + JpGraphError::RaiseL(27015); + } + $this->iIconConstrain = array($aType, $aVal); + } + + public function SetCountryFlag($aFlag, $aScale = 1.0, $aMix = 100, $aStdSize = 3) + { + $this->iIcon = new IconPlot(); + $this->iIcon->SetCountryFlag($aFlag, 0, 0, $aScale, $aMix, $aStdSize); + } + + public function SetImage($aFile, $aScale = 1.0, $aMix = 100) + { + $this->iIcon = new IconPlot($aFile, 0, 0, $aScale, $aMix); + } + + public function SetImageFromString($aStr, $aScale = 1.0, $aMix = 100) + { + $this->iIcon = new IconPlot("", 0, 0, $aScale, $aMix); + $this->iIcon->CreateFromString($aStr); + } + + public function SetRowColSpan($aRowSpan, $aColSpan) + { + $this->iRowSpan = $aRowSpan; + $this->iColSpan = $aColSpan; + $this->iMerged = true; + } + + public function SetMerged($aPRow, $aPCol, $aFlg = true) + { + $this->iMerged = $aFlg; + $this->iPRow = $aPRow; + $this->iPCol = $aPCol; + } + + public function IsMerged() + { + return $this->iMerged; + } + + public function SetNumberFormat($aF) + { + $this->iNumberFormat = $aF; + } + + public function Set($aTxt) + { + $this->iVal->Set($aTxt); + } + + public function SetFont($aFF, $aFS, $aFSize) + { + $this->iFF = $aFF; + $this->iFS = $aFS; + $this->iFSize = $aFSize; + $this->iVal->SetFont($aFF, $aFS, $aFSize); + } + + public function SetFillColor($aColor) + { + $this->iBGColor = $aColor; + } + + public function SetFontColor($aColor) + { + $this->iFontColor = $aColor; + } + + public function SetGridColor($aLeft, $aTop = null, $aBottom = null, $aRight = null) + { + if ($aLeft !== null) { + $this->iGridColor[0] = $aLeft; + } + + if ($aTop !== null) { + $this->iGridColor[1] = $aTop; + } + + if ($aBottom !== null) { + $this->iGridColor[2] = $aBottom; + } + + if ($aRight !== null) { + $this->iGridColor[3] = $aRight; + } + + } + + public function SetGridStyle($aLeft, $aTop = null, $aBottom = null, $aRight = null) + { + if ($aLeft !== null) { + $this->iGridStyle[0] = $aLeft; + } + + if ($aTop !== null) { + $this->iGridStyle[1] = $aTop; + } + + if ($aBottom !== null) { + $this->iGridStyle[2] = $aBottom; + } + + if ($aRight !== null) { + $this->iGridStyle[3] = $aRight; + } + + } + + public function SetGridWeight($aLeft = null, $aTop = null, $aBottom = null, $aRight = null) + { + if ($aLeft !== null) { + $this->iGridWeight[0] = $aLeft; + } + + if ($aTop !== null) { + $this->iGridWeight[1] = $aTop; + } + + if ($aBottom !== null) { + $this->iGridWeight[2] = $aBottom; + } + + if ($aRight !== null) { + $this->iGridWeight[3] = $aRight; + } + + } + + public function SetMargin($aLeft, $aRight, $aTop, $aBottom) + { + $this->iMarginLeft = $aLeft; + $this->iMarginRight = $aRight; + $this->iMarginTop = $aTop; + $this->iMarginBottom = $aBottom; + } + + public function GetWidth($aImg) + { + if ($this->iIcon !== null) { + if ($this->iIconConstrain[0] == TIMG_WIDTH) { + $this->iIcon->SetScale(1); + $tmp = $this->iIcon->GetWidthHeight(); + $this->iIcon->SetScale($this->iIconConstrain[1] / $tmp[0]); + } elseif ($this->iIconConstrain[0] == TIMG_HEIGHT) { + $this->iIcon->SetScale(1); + $tmp = $this->iIcon->GetWidthHeight(); + $this->iIcon->SetScale($this->iIconConstrain[1] / $tmp[1]); + } + $tmp = $this->iIcon->GetWidthHeight(); + $iwidth = $tmp[0]; + } else { + $iwidth = 0; + } + if ($this->iTable->iCells[$this->iPRow][$this->iPCol]->iVal->dir == 0) { + $pwidth = $this->iTable->iCells[$this->iPRow][$this->iPCol]->iVal->GetWidth($aImg); + } elseif ($this->iTable->iCells[$this->iPRow][$this->iPCol]->iVal->dir == 90) { + $pwidth = $this->iTable->iCells[$this->iPRow][$this->iPCol]->iVal->GetFontHeight($aImg) + 2; + } else { + $pwidth = $this->iTable->iCells[$this->iPRow][$this->iPCol]->iVal->GetWidth($aImg) + 2; + } + + $pcolspan = $this->iTable->iCells[$this->iPRow][$this->iPCol]->iColSpan; + return round(max($iwidth, $pwidth) / $pcolspan) + $this->iMarginLeft + $this->iMarginRight; + } + + public function GetHeight($aImg) + { + if ($this->iIcon !== null) { + if ($this->iIconConstrain[0] == TIMG_WIDTH) { + $this->iIcon->SetScale(1); + $tmp = $this->iIcon->GetWidthHeight(); + $this->iIcon->SetScale($this->iIconConstrain[1] / $tmp[0]); + } elseif ($this->iIconConstrain[0] == TIMG_HEIGHT) { + $this->iIcon->SetScale(1); + $tmp = $this->iIcon->GetWidthHeight(); + $this->iIcon->SetScale($this->iIconConstrain[1] / $tmp[1]); + } + $tmp = $this->iIcon->GetWidthHeight(); + $iheight = $tmp[1]; + } else { + $iheight = 0; + } + if ($this->iTable->iCells[$this->iPRow][$this->iPCol]->iVal->dir == 0) { + $pheight = $this->iTable->iCells[$this->iPRow][$this->iPCol]->iVal->GetHeight($aImg); + } else { + $pheight = $this->iTable->iCells[$this->iPRow][$this->iPCol]->iVal->GetHeight($aImg) + 1; + } + $prowspan = $this->iTable->iCells[$this->iPRow][$this->iPCol]->iRowSpan; + return round(max($iheight, $pheight) / $prowspan) + $this->iMarginTop + $this->iMarginBottom; + } + + public function SetAlign($aHorAlign = 'left', $aVertAlign = 'bottom') + { + $aHorAlign = strtolower($aHorAlign); + $aVertAlign = strtolower($aVertAlign); + $chk = array('left', 'right', 'center', 'bottom', 'top', 'middle'); + if (!in_array($aHorAlign, $chk) || !in_array($aVertAlign, $chk)) { + JpGraphError::RaiseL(27011, $aHorAlign, $aVertAlign); + } + $this->iVertAlign = $aVertAlign; + $this->iHorAlign = $aHorAlign; + } + + public function AdjustMarginsForGrid() + { + if ($this->iCol > 0) { + switch ($this->iGridStyle[0]) { + case TGRID_SINGLE:$wf = 1; + break; + case TGRID_DOUBLE:$wf = 3; + break; + case TGRID_DOUBLE2:$wf = 4; + break; + } + $this->iMarginLeft += $this->iGridWeight[0] * $wf; + } + if ($this->iRow > 0) { + switch ($this->iGridStyle[1]) { + case TGRID_SINGLE:$wf = 1; + break; + case TGRID_DOUBLE:$wf = 3; + break; + case TGRID_DOUBLE2:$wf = 4; + break; + } + $this->iMarginTop += $this->iGridWeight[1] * $wf; + } + if ($this->iRow + $this->iRowSpan - 1 < $this->iTable->iSize[0] - 1) { + switch ($this->iGridStyle[2]) { + case TGRID_SINGLE:$wf = 1; + break; + case TGRID_DOUBLE:$wf = 3; + break; + case TGRID_DOUBLE2:$wf = 4; + break; + } + $this->iMarginBottom += $this->iGridWeight[2] * $wf; + } + if ($this->iCol + $this->iColSpan - 1 < $this->iTable->iSize[1] - 1) { + switch ($this->iGridStyle[3]) { + case TGRID_SINGLE:$wf = 1; + break; + case TGRID_DOUBLE:$wf = 3; + break; + case TGRID_DOUBLE2:$wf = 4; + break; + } + $this->iMarginRight += $this->iGridWeight[3] * $wf; + } + } + + public function StrokeVGrid($aImg, $aX, $aY, $aWidth, $aHeight, $aDir = 1) + { + // Left or right grid line + // For the right we increase the X-pos and for the right we decrease it. This is + // determined by the direction argument. + $idx = $aDir == 1 ? 0 : 3; + + // We don't stroke the grid lines that are on the edge of the table since this is + // the place of the border. + if ((($this->iCol > 0 && $idx == 0) || ($this->iCol + $this->iColSpan - 1 < $this->iTable->iSize[1] - 1 && $idx == 3)) + && $this->iGridWeight[$idx] > 0) { + $x = $aDir == 1 ? $aX : $aX + $aWidth - 1; + $y = $aY + $aHeight - 1; + $aImg->SetColor($this->iGridColor[$idx]); + switch ($this->iGridStyle[$idx]) { + case TGRID_SINGLE: + for ($i = 0; $i < $this->iGridWeight[$idx]; ++$i) { + $aImg->Line($x + $i * $aDir, $aY, $x + $i * $aDir, $y); + } + + break; + + case TGRID_DOUBLE: + for ($i = 0; $i < $this->iGridWeight[$idx]; ++$i) { + $aImg->Line($x + $i * $aDir, $aY, $x + $i * $aDir, $y); + } + + $x += $this->iGridWeight[$idx] * 2; + for ($i = 0; $i < $this->iGridWeight[$idx]; ++$i) { + $aImg->Line($x + $i * $aDir, $aY, $x + $i * $aDir, $y); + } + + break; + + case TGRID_DOUBLE2: + for ($i = 0; $i < $this->iGridWeight[$idx] * 2; ++$i) { + $aImg->Line($x + $i * $aDir, $aY, $x + $i * $aDir, $y); + } + + $x += $this->iGridWeight[$idx] * 3; + for ($i = 0; $i < $this->iGridWeight[$idx]; ++$i) { + $aImg->Line($x + $i * $aDir, $aY, $x + $i * $aDir, $y); + } + + break; + } + } + } + + public function StrokeHGrid($aImg, $aX, $aY, $aWidth, $aHeight, $aDir = 1) + { + // Top or bottom grid line + // For the left we increase the X-pos and for the right we decrease it. This is + // determined by the direction argument. + $idx = $aDir == 1 ? 1 : 2; + + // We don't stroke the grid lines that are on the edge of the table since this is + // the place of the border. + if ((($this->iRow > 0 && $idx == 1) || ($this->iRow + $this->iRowSpan - 1 < $this->iTable->iSize[0] - 1 && $idx == 2)) + && $this->iGridWeight[$idx] > 0) { + $y = $aDir == 1 ? $aY : $aY + $aHeight - 1; + $x = $aX + $aWidth - 1; + $aImg->SetColor($this->iGridColor[$idx]); + switch ($this->iGridStyle[$idx]) { + case TGRID_SINGLE: + for ($i = 0; $i < $this->iGridWeight[$idx]; ++$i) { + $aImg->Line($aX, $y + $i, $x, $y + $i); + } + + break; + + case TGRID_DOUBLE: + for ($i = 0; $i < $this->iGridWeight[$idx]; ++$i) { + $aImg->Line($aX, $y + $i, $x, $y + $i); + } + + $y += $this->iGridWeight[$idx] * 2; + for ($i = 0; $i < $this->iGridWeight[$idx]; ++$i) { + $aImg->Line($aX, $y + $i, $x, $y + $i); + } + + break; + + case TGRID_DOUBLE2: + for ($i = 0; $i < $this->iGridWeight[$idx] * 2; ++$i) { + $aImg->Line($aX, $y + $i, $x, $y + $i); + } + + $y += $this->iGridWeight[$idx] * 3; + for ($i = 0; $i < $this->iGridWeight[$idx]; ++$i) { + $aImg->Line($aX, $y + $i, $x, $y + $i); + } + + break; + } + } + } + + public function Stroke($aImg, $aX, $aY, $aWidth, $aHeight) + { + // If this is a merged cell we only stroke if it is the parent cell. + // The parent cell holds the merged cell block + if ($this->iMerged && ($this->iRow != $this->iPRow || $this->iCol != $this->iPCol)) { + return; + } + + if ($this->iBGColor != '') { + $aImg->SetColor($this->iBGColor); + $aImg->FilledRectangle($aX, $aY, $aX + $aWidth - 1, $aY + $aHeight - 1); + } + + $coords = $aX . ',' . $aY . ',' . ($aX + $aWidth - 1) . ',' . $aY . ',' . ($aX + $aWidth - 1) . ',' . ($aY + $aHeight - 1) . ',' . $aX . ',' . ($aY + $aHeight - 1); + if (!empty($this->iCSIMtarget)) { + $this->iCSIMArea = 'iCSIMwintarget)) { + $this->iCSIMArea .= " target=\"" . $this->iCSIMwintarget . "\""; + } + if (!empty($this->iCSIMalt)) { + $this->iCSIMArea .= ' alt="' . $this->iCSIMalt . '" title="' . $this->iCSIMalt . "\" "; + } + $this->iCSIMArea .= " />\n"; + } + + $this->StrokeVGrid($aImg, $aX, $aY, $aWidth, $aHeight); + $this->StrokeVGrid($aImg, $aX, $aY, $aWidth, $aHeight, -1); + $this->StrokeHGrid($aImg, $aX, $aY, $aWidth, $aHeight); + $this->StrokeHGrid($aImg, $aX, $aY, $aWidth, $aHeight, -1); + + if ($this->iIcon !== null) { + switch ($this->iHorAlign) { + case 'left': + $x = $aX + $this->iMarginLeft; + $hanchor = 'left'; + break; + case 'center': + case 'middle': + $x = $aX + $this->iMarginLeft + round(($aWidth - $this->iMarginLeft - $this->iMarginRight) / 2); + $hanchor = 'center'; + break; + case 'right': + $x = $aX + $aWidth - $this->iMarginRight - 1; + $hanchor = 'right'; + break; + default: + JpGraphError::RaiseL(27012, $this->iHorAlign); + } + + switch ($this->iVertAlign) { + case 'top': + $y = $aY + $this->iMarginTop; + $vanchor = 'top'; + break; + case 'center': + case 'middle': + $y = $aY + $this->iMarginTop + round(($aHeight - $this->iMarginTop - $this->iMarginBottom) / 2); + $vanchor = 'center'; + break; + case 'bottom': + $y = $aY + $aHeight - 1 - $this->iMarginBottom; + $vanchor = 'bottom'; + break; + default: + JpGraphError::RaiseL(27012, $this->iVertAlign); + } + $this->iIcon->SetAnchor($hanchor, $vanchor); + $this->iIcon->_Stroke($aImg, $x, $y); + } + $this->iVal->SetColor($this->iFontColor); + $this->iVal->SetFont($this->iFF, $this->iFS, $this->iFSize); + switch ($this->iHorAlign) { + case 'left': + $x = $aX + $this->iMarginLeft; + break; + case 'center': + case 'middle': + $x = $aX + $this->iMarginLeft + round(($aWidth - $this->iMarginLeft - $this->iMarginRight) / 2); + break; + case 'right': + $x = $aX + $aWidth - $this->iMarginRight - 1; + break; + default: + JpGraphError::RaiseL(27012, $this->iHorAlign); + } + // A workaround for the shortcomings in the TTF font handling in GD + // The anchor position for rotated text (=90) is to "short" so we add + // an offset based on the actual font size + if ($this->iVal->dir != 0 && $this->iVal->font_family >= 10) { + $aY += 4 + round($this->iVal->font_size * 0.8); + } + switch ($this->iVertAlign) { + case 'top': + $y = $aY + $this->iMarginTop; + break; + case 'center': + case 'middle': + $y = $aY + $this->iMarginTop + round(($aHeight - $this->iMarginTop - $this->iMarginBottom) / 2); + //$y -= round($this->iVal->GetFontHeight($aImg)/2); + $y -= round($this->iVal->GetHeight($aImg) / 2); + break; + case 'bottom': + //$y = $aY+$aHeight-1-$this->iMarginBottom-$this->iVal->GetFontHeight($aImg); + $y = $aY + $aHeight - $this->iMarginBottom - $this->iVal->GetHeight($aImg); + break; + default: + JpGraphError::RaiseL(27012, $this->iVertAlign); + } + $this->iVal->SetAlign($this->iHorAlign, 'top'); + if ($this->iNumberFormat !== null && is_numeric($this->iVal->t)) { + $this->iVal->t = sprintf($this->iNumberFormat, $this->iVal->t); + } + $this->iVal->Stroke($aImg, $x, $y); + } +} + +/* +EOF + */ diff --git a/vendor/amenadiel/jpgraph/src/text/GraphTabTitle.php b/vendor/amenadiel/jpgraph/src/text/GraphTabTitle.php new file mode 100644 index 0000000000..874d203714 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/text/GraphTabTitle.php @@ -0,0 +1,133 @@ +t = ''; + $this->font_style = FS_BOLD; + $this->hide = true; + $this->color = 'darkred'; + } + + public function SetColor($aTxtColor, $aFillColor = 'lightyellow', $aBorderColor = 'black') + { + $this->color = $aTxtColor; + $this->fillcolor = $aFillColor; + $this->bordercolor = $aBorderColor; + } + + public function SetFillColor($aFillColor) + { + $this->fillcolor = $aFillColor; + } + + public function SetTabAlign($aAlign) + { + $this->align = $aAlign; + } + + public function SetWidth($aWidth) + { + $this->width = $aWidth; + } + + public function Set($t) + { + $this->t = $t; + $this->hide = false; + } + + public function SetCorner($aD) + { + $this->corner = $aD; + } + + public function Stroke($aImg, $aDummy1 = null, $aDummy2 = null) + { + if ($this->hide) { + return; + } + + $this->boxed = false; + $w = $this->GetWidth($aImg) + 2 * $this->posx; + $h = $this->GetTextHeight($aImg) + 2 * $this->posy; + + $x = $aImg->left_margin; + $y = $aImg->top_margin; + + if ($this->width === TABTITLE_WIDTHFIT) { + if ($this->align == 'left') { + $p = array($x, $y, + $x, $y - $h + $this->corner, + $x + $this->corner, $y - $h, + $x + $w - $this->corner, $y - $h, + $x + $w, $y - $h + $this->corner, + $x + $w, $y); + } elseif ($this->align == 'center') { + $x += round($aImg->plotwidth / 2) - round($w / 2); + $p = array($x, $y, + $x, $y - $h + $this->corner, + $x + $this->corner, $y - $h, + $x + $w - $this->corner, $y - $h, + $x + $w, $y - $h + $this->corner, + $x + $w, $y); + } else { + $x += $aImg->plotwidth - $w; + $p = array($x, $y, + $x, $y - $h + $this->corner, + $x + $this->corner, $y - $h, + $x + $w - $this->corner, $y - $h, + $x + $w, $y - $h + $this->corner, + $x + $w, $y); + } + } else { + if ($this->width === TABTITLE_WIDTHFULL) { + $w = $aImg->plotwidth; + } else { + $w = $this->width; + } + + // Make the tab fit the width of the plot area + $p = array($x, $y, + $x, $y - $h + $this->corner, + $x + $this->corner, $y - $h, + $x + $w - $this->corner, $y - $h, + $x + $w, $y - $h + $this->corner, + $x + $w, $y); + + } + if ($this->halign == 'left') { + $aImg->SetTextAlign('left', 'bottom'); + $x += $this->posx; + $y -= $this->posy; + } elseif ($this->halign == 'center') { + $aImg->SetTextAlign('center', 'bottom'); + $x += $w / 2; + $y -= $this->posy; + } else { + $aImg->SetTextAlign('right', 'bottom'); + $x += $w - $this->posx; + $y -= $this->posy; + } + + $aImg->SetColor($this->fillcolor); + $aImg->FilledPolygon($p); + + $aImg->SetColor($this->bordercolor); + $aImg->Polygon($p, true); + + $aImg->SetColor($this->color); + $aImg->SetFont($this->font_family, $this->font_style, $this->font_size); + $aImg->StrokeText($x, $y, $this->t, 0, 'center'); + } + +} diff --git a/vendor/amenadiel/jpgraph/src/text/LanguageConv.php b/vendor/amenadiel/jpgraph/src/text/LanguageConv.php new file mode 100644 index 0000000000..fadad0e29f --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/text/LanguageConv.php @@ -0,0 +1,114 @@ +g2312 == null) { + include_once 'jpgraph_gb2312.php'; + $this->g2312 = new GB2312toUTF8(); + } + return $this->g2312->gb2utf8($aTxt); + } elseif ($aFF === FF_BIG5) { + if (!function_exists('iconv')) { + JpGraphError::RaiseL(25006); + //('Usage of FF_CHINESE (FF_BIG5) font family requires that your PHP setup has the iconv() function. By default this is not compiled into PHP (needs the "--width-iconv" when configured).'); + } + return iconv('BIG5', 'UTF-8', $aTxt); + } elseif (ASSUME_EUCJP_ENCODING && + ($aFF == FF_MINCHO || $aFF == FF_GOTHIC || $aFF == FF_PMINCHO || $aFF == FF_PGOTHIC)) { + if (!function_exists('mb_convert_encoding')) { + JpGraphError::RaiseL(25127); + } + return mb_convert_encoding($aTxt, 'UTF-8', 'EUC-JP'); + } elseif ($aFF == FF_DAVID || $aFF == FF_MIRIAM || $aFF == FF_AHRON) { + return LanguageConv::heb_iso2uni($aTxt); + } else { + return $aTxt; + } + + } + + // Translate iso encoding to unicode + public static function iso2uni($isoline) + { + $uniline = ''; + for ($i = 0; $i < strlen($isoline); $i++) { + $thischar = substr($isoline, $i, 1); + $charcode = ord($thischar); + $uniline .= ($charcode > 175) ? "&#" . (1040 + ($charcode - 176)) . ";" : $thischar; + } + return $uniline; + } + + // Translate greek iso encoding to unicode + public static function gr_iso2uni($isoline) + { + $uniline = ''; + for ($i = 0; $i < strlen($isoline); $i++) { + $thischar = substr($isoline, $i, 1); + $charcode = ord($thischar); + $uniline .= ($charcode > 179 && $charcode != 183 && $charcode != 187 && $charcode != 189) ? "&#" . (900 + ($charcode - 180)) . ";" : $thischar; + } + return $uniline; + } + + // Translate greek win encoding to unicode + public static function gr_win2uni($winline) + { + $uniline = ''; + for ($i = 0; $i < strlen($winline); $i++) { + $thischar = substr($winline, $i, 1); + $charcode = ord($thischar); + if ($charcode == 161 || $charcode == 162) { + $uniline .= "&#" . (740 + $charcode) . ";"; + } else { + $uniline .= (($charcode > 183 && $charcode != 187 && $charcode != 189) || $charcode == 180) ? "&#" . (900 + ($charcode - 180)) . ";" : $thischar; + } + } + return $uniline; + } + + public static function heb_iso2uni($isoline) + { + $isoline = hebrev($isoline); + $o = ''; + + $n = strlen($isoline); + for ($i = 0; $i < $n; $i++) { + $c = ord(substr($isoline, $i, 1)); + $o .= ($c > 223) && ($c < 251) ? '&#' . (1264 + $c) . ';' : chr($c); + } + return utf8_encode($o); + } +} diff --git a/vendor/amenadiel/jpgraph/src/text/SuperScriptText.php b/vendor/amenadiel/jpgraph/src/text/SuperScriptText.php new file mode 100644 index 0000000000..e34164e801 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/text/SuperScriptText.php @@ -0,0 +1,188 @@ +iSuper = $aSuper; + } + + public function FromReal($aVal, $aPrecision = 2) + { + // Convert a floating point number to scientific notation + $neg = 1.0; + if ($aVal < 0) { + $neg = -1.0; + $aVal = -$aVal; + } + + $l = floor(log10($aVal)); + $a = sprintf("%0." . $aPrecision . "f", round($aVal / pow(10, $l), $aPrecision)); + $a *= $neg; + if ($this->iSimple && ($a == 1 || $a == -1)) { + $a = ''; + } + + if ($a != '') { + $this->t = $a . ' * 10'; + } else { + if ($neg == 1) { + $this->t = '10'; + } else { + $this->t = '-10'; + } + } + $this->iSuper = $l; + } + + public function Set($aTxt, $aSuper = '') + { + $this->t = $aTxt; + $this->iSuper = $aSuper; + } + + public function SetSuperFont($aFontFam, $aFontStyle = FS_NORMAL, $aFontSize = 8) + { + $this->sfont_family = $aFontFam; + $this->sfont_style = $aFontStyle; + $this->sfont_size = $aFontSize; + } + + // Total width of text + public function GetWidth($aImg) + { + $aImg->SetFont($this->font_family, $this->font_style, $this->font_size); + $w = $aImg->GetTextWidth($this->t); + $aImg->SetFont($this->sfont_family, $this->sfont_style, $this->sfont_size); + $w += $aImg->GetTextWidth($this->iSuper); + $w += $this->iSuperMargin; + return $w; + } + + // Hight of font (approximate the height of the text) + public function GetFontHeight($aImg) + { + $aImg->SetFont($this->font_family, $this->font_style, $this->font_size); + $h = $aImg->GetFontHeight(); + $aImg->SetFont($this->sfont_family, $this->sfont_style, $this->sfont_size); + $h += $aImg->GetFontHeight(); + return $h; + } + + // Hight of text + public function GetTextHeight($aImg) + { + $aImg->SetFont($this->font_family, $this->font_style, $this->font_size); + $h = $aImg->GetTextHeight($this->t); + $aImg->SetFont($this->sfont_family, $this->sfont_style, $this->sfont_size); + $h += $aImg->GetTextHeight($this->iSuper); + return $h; + } + + public function Stroke($aImg, $ax = -1, $ay = -1) + { + + // To position the super script correctly we need different + // cases to handle the alignmewnt specified since that will + // determine how we can interpret the x,y coordinates + + $w = parent::GetWidth($aImg); + $h = parent::GetTextHeight($aImg); + switch ($this->valign) { + case 'top': + $sy = $this->y; + break; + case 'center': + $sy = $this->y - $h / 2; + break; + case 'bottom': + $sy = $this->y - $h; + break; + default: + JpGraphError::RaiseL(25052); //('PANIC: Internal error in SuperScript::Stroke(). Unknown vertical alignment for text'); + break; + } + + switch ($this->halign) { + case 'left': + $sx = $this->x + $w; + break; + case 'center': + $sx = $this->x + $w / 2; + break; + case 'right': + $sx = $this->x; + break; + default: + JpGraphError::RaiseL(25053); //('PANIC: Internal error in SuperScript::Stroke(). Unknown horizontal alignment for text'); + break; + } + + $sx += $this->iSuperMargin; + $sy += $this->iVertOverlap; + + // Should we automatically determine the font or + // has the user specified it explicetly? + if ($this->sfont_family == '') { + if ($this->font_family <= FF_FONT2) { + if ($this->font_family == FF_FONT0) { + $sff = FF_FONT0; + } elseif ($this->font_family == FF_FONT1) { + if ($this->font_style == FS_NORMAL) { + $sff = FF_FONT0; + } else { + $sff = FF_FONT1; + } + } else { + $sff = FF_FONT1; + } + $sfs = $this->font_style; + $sfz = $this->font_size; + } else { + // TTF fonts + $sff = $this->font_family; + $sfs = $this->font_style; + $sfz = floor($this->font_size * $this->iSuperScale); + if ($sfz < 8) { + $sfz = 8; + } + + } + $this->sfont_family = $sff; + $this->sfont_style = $sfs; + $this->sfont_size = $sfz; + } else { + $sff = $this->sfont_family; + $sfs = $this->sfont_style; + $sfz = $this->sfont_size; + } + + parent::Stroke($aImg, $ax, $ay); + + // For the builtin fonts we need to reduce the margins + // since the bounding bx reported for the builtin fonts + // are much larger than for the TTF fonts. + if ($sff <= FF_FONT2) { + $sx -= 2; + $sy += 3; + } + + $aImg->SetTextAlign('left', 'bottom'); + $aImg->SetFont($sff, $sfs, $sfz); + $aImg->PushColor($this->color); + $aImg->StrokeText($sx, $sy, $this->iSuper, $this->iSDir, 'left'); + $aImg->PopColor(); + } +} diff --git a/vendor/amenadiel/jpgraph/src/text/TTF.php b/vendor/amenadiel/jpgraph/src/text/TTF.php new file mode 100644 index 0000000000..70720b051e --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/text/TTF.php @@ -0,0 +1,305 @@ +style_names = array( + FS_NORMAL => 'normal', + FS_BOLD => 'bold', + FS_ITALIC => 'italic', + FS_BOLDITALIC => 'bolditalic'); + + // File names for available fonts + $this->font_files = array( + FF_COURIER => array(FS_NORMAL => 'cour.ttf', + FS_BOLD => 'courbd.ttf', + FS_ITALIC => 'couri.ttf', + FS_BOLDITALIC => 'courbi.ttf'), + FF_GEORGIA => array(FS_NORMAL => 'georgia.ttf', + FS_BOLD => 'georgiab.ttf', + FS_ITALIC => 'georgiai.ttf', + FS_BOLDITALIC => ''), + FF_TREBUCHE => array(FS_NORMAL => 'trebuc.ttf', + FS_BOLD => 'trebucbd.ttf', + FS_ITALIC => 'trebucit.ttf', + FS_BOLDITALIC => 'trebucbi.ttf'), + FF_VERDANA => array(FS_NORMAL => 'verdana.ttf', + FS_BOLD => 'verdanab.ttf', + FS_ITALIC => 'verdanai.ttf', + FS_BOLDITALIC => ''), + FF_TIMES => array(FS_NORMAL => 'times.ttf', + FS_BOLD => 'timesbd.ttf', + FS_ITALIC => 'timesi.ttf', + FS_BOLDITALIC => 'timesbi.ttf'), + FF_COMIC => array(FS_NORMAL => 'comic.ttf', + FS_BOLD => 'comicbd.ttf', + FS_ITALIC => '', + FS_BOLDITALIC => ''), + /*FF_ARIAL => array(FS_NORMAL => 'arial.ttf', + FS_BOLD => 'arialbd.ttf', + FS_ITALIC => 'ariali.ttf', + FS_BOLDITALIC => 'arialbi.ttf'),*/ + FF_ARIAL => array(FS_NORMAL => 'arial.ttf', + FS_BOLD => 'msttcorefonts/Arial_Black.ttf', + FS_ITALIC => 'ariali.ttf', + FS_BOLDITALIC => 'arialbi.ttf'), + FF_VERA => array(FS_NORMAL => 'Vera.ttf', + FS_BOLD => 'VeraBd.ttf', + FS_ITALIC => 'VeraIt.ttf', + FS_BOLDITALIC => 'VeraBI.ttf'), + FF_VERAMONO => array(FS_NORMAL => 'VeraMono.ttf', + FS_BOLD => 'VeraMoBd.ttf', + FS_ITALIC => 'VeraMoIt.ttf', + FS_BOLDITALIC => 'VeraMoBI.ttf'), + FF_VERASERIF => array(FS_NORMAL => 'VeraSe.ttf', + FS_BOLD => 'VeraSeBd.ttf', + FS_ITALIC => '', + FS_BOLDITALIC => ''), + + /* Chinese fonts */ + FF_SIMSUN => array( + FS_NORMAL => 'simsun.ttc', + FS_BOLD => 'simhei.ttf', + FS_ITALIC => '', + FS_BOLDITALIC => ''), + FF_CHINESE => array( + FS_NORMAL => CHINESE_TTF_FONT, + FS_BOLD => '', + FS_ITALIC => '', + FS_BOLDITALIC => ''), + FF_BIG5 => array( + FS_NORMAL => CHINESE_TTF_FONT, + FS_BOLD => '', + FS_ITALIC => '', + FS_BOLDITALIC => ''), + + /* Japanese fonts */ + FF_MINCHO => array( + FS_NORMAL => MINCHO_TTF_FONT, + FS_BOLD => '', + FS_ITALIC => '', + FS_BOLDITALIC => ''), + + FF_PMINCHO => array( + FS_NORMAL => PMINCHO_TTF_FONT, + FS_BOLD => '', + FS_ITALIC => '', + FS_BOLDITALIC => ''), + + FF_GOTHIC => array( + FS_NORMAL => GOTHIC_TTF_FONT, + FS_BOLD => '', + FS_ITALIC => '', + FS_BOLDITALIC => ''), + + FF_PGOTHIC => array( + FS_NORMAL => PGOTHIC_TTF_FONT, + FS_BOLD => '', + FS_ITALIC => '', + FS_BOLDITALIC => ''), + + /* Hebrew fonts */ + FF_DAVID => array( + FS_NORMAL => 'DAVIDNEW.TTF', + FS_BOLD => '', + FS_ITALIC => '', + FS_BOLDITALIC => ''), + + FF_MIRIAM => array( + FS_NORMAL => 'MRIAMY.TTF', + FS_BOLD => '', + FS_ITALIC => '', + FS_BOLDITALIC => ''), + + FF_AHRON => array( + FS_NORMAL => 'ahronbd.ttf', + FS_BOLD => '', + FS_ITALIC => '', + FS_BOLDITALIC => ''), + + /* Misc fonts */ + FF_DIGITAL => array( + FS_NORMAL => 'DIGIRU__.TTF', + FS_BOLD => 'Digirtu_.ttf', + FS_ITALIC => 'Digir___.ttf', + FS_BOLDITALIC => 'DIGIRT__.TTF'), + + /* This is an experimental font for the speedometer development + FF_SPEEDO => array( + FS_NORMAL =>'Speedo.ttf', + FS_BOLD =>'', + FS_ITALIC =>'', + FS_BOLDITALIC =>'' ), + */ + + FF_COMPUTER => array( + FS_NORMAL => 'COMPUTER.TTF', + FS_BOLD => '', + FS_ITALIC => '', + FS_BOLDITALIC => ''), + + FF_CALCULATOR => array( + FS_NORMAL => 'Triad_xs.ttf', + FS_BOLD => '', + FS_ITALIC => '', + FS_BOLDITALIC => ''), + + /* Dejavu fonts */ + FF_DV_SANSSERIF => array( + FS_NORMAL => array('DejaVuSans.ttf'), + FS_BOLD => array('DejaVuSans-Bold.ttf', 'DejaVuSansBold.ttf'), + FS_ITALIC => array('DejaVuSans-Oblique.ttf', 'DejaVuSansOblique.ttf'), + FS_BOLDITALIC => array('DejaVuSans-BoldOblique.ttf', 'DejaVuSansBoldOblique.ttf')), + + FF_DV_SANSSERIFMONO => array( + FS_NORMAL => array('DejaVuSansMono.ttf', 'DejaVuMonoSans.ttf'), + FS_BOLD => array('DejaVuSansMono-Bold.ttf', 'DejaVuMonoSansBold.ttf'), + FS_ITALIC => array('DejaVuSansMono-Oblique.ttf', 'DejaVuMonoSansOblique.ttf'), + FS_BOLDITALIC => array('DejaVuSansMono-BoldOblique.ttf', 'DejaVuMonoSansBoldOblique.ttf')), + + FF_DV_SANSSERIFCOND => array( + FS_NORMAL => array('DejaVuSansCondensed.ttf', 'DejaVuCondensedSans.ttf'), + FS_BOLD => array('DejaVuSansCondensed-Bold.ttf', 'DejaVuCondensedSansBold.ttf'), + FS_ITALIC => array('DejaVuSansCondensed-Oblique.ttf', 'DejaVuCondensedSansOblique.ttf'), + FS_BOLDITALIC => array('DejaVuSansCondensed-BoldOblique.ttf', 'DejaVuCondensedSansBoldOblique.ttf')), + + FF_DV_SERIF => array( + FS_NORMAL => array('DejaVuSerif.ttf'), + FS_BOLD => array('DejaVuSerif-Bold.ttf', 'DejaVuSerifBold.ttf'), + FS_ITALIC => array('DejaVuSerif-Italic.ttf', 'DejaVuSerifItalic.ttf'), + FS_BOLDITALIC => array('DejaVuSerif-BoldItalic.ttf', 'DejaVuSerifBoldItalic.ttf')), + + FF_DV_SERIFCOND => array( + FS_NORMAL => array('DejaVuSerifCondensed.ttf', 'DejaVuCondensedSerif.ttf'), + FS_BOLD => array('DejaVuSerifCondensed-Bold.ttf', 'DejaVuCondensedSerifBold.ttf'), + FS_ITALIC => array('DejaVuSerifCondensed-Italic.ttf', 'DejaVuCondensedSerifItalic.ttf'), + FS_BOLDITALIC => array('DejaVuSerifCondensed-BoldItalic.ttf', 'DejaVuCondensedSerifBoldItalic.ttf')), + + /* Placeholders for defined fonts */ + FF_USERFONT1 => array( + FS_NORMAL => '', + FS_BOLD => '', + FS_ITALIC => '', + FS_BOLDITALIC => ''), + + FF_USERFONT2 => array( + FS_NORMAL => '', + FS_BOLD => '', + FS_ITALIC => '', + FS_BOLDITALIC => ''), + + FF_USERFONT3 => array( + FS_NORMAL => '', + FS_BOLD => '', + FS_ITALIC => '', + FS_BOLDITALIC => ''), + + ); + } + + //--------------- + // PUBLIC METHODS + // Create the TTF file from the font specification + public function File($family, $style = FS_NORMAL) + { + $fam = @$this->font_files[$family]; + if (!$fam) { + Util\JpGraphError::RaiseL(25046, $family); //("Specified TTF font family (id=$family) is unknown or does not exist. Please note that TTF fonts are not distributed with JpGraph for copyright reasons. You can find the MS TTF WEB-fonts (arial, courier etc) for download at http://corefonts.sourceforge.net/"); + } + $ff = @$fam[$style]; + + // There are several optional file names. They are tried in order + // and the first one found is used + if (!is_array($ff)) { + $ff = array($ff); + } + + $jpgraph_font_dir = dirname(dirname(__FILE__)) . '/fonts/'; + + foreach ($ff as $font_file) { + // All font families are guaranteed to have the normal style + + if ($font_file === '') { + Util\JpGraphError::RaiseL(25047, $this->style_names[$style], $this->font_files[$family][FS_NORMAL]); + } + //('Style "'.$this->style_names[$style].'" is not available for font family '.$this->font_files[$family][FS_NORMAL].'.'); + if (!$font_file) { + Util\JpGraphError::RaiseL(25048, $fam); //("Unknown font style specification [$fam]."); + } + + // check jpgraph/src/fonts dir + $jpgraph_font_file = $jpgraph_font_dir . $font_file; + if (file_exists($jpgraph_font_file) === true && is_readable($jpgraph_font_file) === true) { + $font_file = $jpgraph_font_file; + break; + } + + // check OS font dir + if ($family >= FF_MINCHO && $family <= FF_PGOTHIC) { + $font_file = MBTTF_DIR . $font_file; + } else { + $font_file = TTF_DIR . $font_file; + } + if (file_exists($font_file) === true && is_readable($font_file) === true) { + break; + } + } + + if (!file_exists($font_file)) { + //Util\JpGraphError::RaiseL(25049, $font_file); //("Font file \"$font_file\" is not readable or does not exist."); + return $this->File(FF_DV_SANSSERIF, $style); + } + + return $font_file; + } + + public function SetUserFont($aNormal, $aBold = '', $aItalic = '', $aBoldIt = '') + { + $this->font_files[FF_USERFONT] = + array(FS_NORMAL => $aNormal, + FS_BOLD => $aBold, + FS_ITALIC => $aItalic, + FS_BOLDITALIC => $aBoldIt); + } + + public function SetUserFont1($aNormal, $aBold = '', $aItalic = '', $aBoldIt = '') + { + $this->font_files[FF_USERFONT1] = + array(FS_NORMAL => $aNormal, + FS_BOLD => $aBold, + FS_ITALIC => $aItalic, + FS_BOLDITALIC => $aBoldIt); + } + + public function SetUserFont2($aNormal, $aBold = '', $aItalic = '', $aBoldIt = '') + { + $this->font_files[FF_USERFONT2] = + array(FS_NORMAL => $aNormal, + FS_BOLD => $aBold, + FS_ITALIC => $aItalic, + FS_BOLDITALIC => $aBoldIt); + } + + public function SetUserFont3($aNormal, $aBold = '', $aItalic = '', $aBoldIt = '') + { + $this->font_files[FF_USERFONT3] = + array(FS_NORMAL => $aNormal, + FS_BOLD => $aBold, + FS_ITALIC => $aItalic, + FS_BOLDITALIC => $aBoldIt); + } + +} // Class diff --git a/vendor/amenadiel/jpgraph/src/text/Text.php b/vendor/amenadiel/jpgraph/src/text/Text.php new file mode 100644 index 0000000000..a53883f6f0 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/text/Text.php @@ -0,0 +1,368 @@ +t = $aTxt; + $this->x = round($aXAbsPos); + $this->y = round($aYAbsPos); + $this->margin = 0; + } + + //--------------- + // PUBLIC METHODS + // Set the string in the text object + public function Set($aTxt) + { + $this->t = $aTxt; + } + + // Alias for Pos() + public function SetPos($aXAbsPos = 0, $aYAbsPos = 0, $aHAlign = "left", $aVAlign = "top") + { + //$this->Pos($aXAbsPos,$aYAbsPos,$aHAlign,$aVAlign); + $this->x = $aXAbsPos; + $this->y = $aYAbsPos; + $this->halign = $aHAlign; + $this->valign = $aVAlign; + } + + public function SetScalePos($aX, $aY) + { + $this->iScalePosX = $aX; + $this->iScalePosY = $aY; + } + + // Specify alignment for the text + public function Align($aHAlign, $aVAlign = "top", $aParagraphAlign = "") + { + $this->halign = $aHAlign; + $this->valign = $aVAlign; + if ($aParagraphAlign != "") { + $this->paragraph_align = $aParagraphAlign; + } + + } + + // Alias + public function SetAlign($aHAlign, $aVAlign = "top", $aParagraphAlign = "") + { + $this->Align($aHAlign, $aVAlign, $aParagraphAlign); + } + + // Specifies the alignment for a multi line text + public function ParagraphAlign($aAlign) + { + $this->paragraph_align = $aAlign; + } + + // Specifies the alignment for a multi line text + public function SetParagraphAlign($aAlign) + { + $this->paragraph_align = $aAlign; + } + + public function SetShadow($aShadowColor = 'gray', $aShadowWidth = 3) + { + $this->ishadowwidth = $aShadowWidth; + $this->shadow = $aShadowColor; + $this->boxed = true; + } + + public function SetWordWrap($aCol) + { + $this->iWordwrap = $aCol; + } + + // Specify that the text should be boxed. fcolor=frame color, bcolor=border color, + // $shadow=drop shadow should be added around the text. + public function SetBox($aFrameColor = array(255, 255, 255), $aBorderColor = array(0, 0, 0), $aShadowColor = false, $aCornerRadius = 4, $aShadowWidth = 3) + { + if ($aFrameColor === false) { + $this->boxed = false; + } else { + $this->boxed = true; + } + $this->fcolor = $aFrameColor; + $this->bcolor = $aBorderColor; + // For backwards compatibility when shadow was just true or false + if ($aShadowColor === true) { + $aShadowColor = 'gray'; + } + $this->shadow = $aShadowColor; + $this->icornerradius = $aCornerRadius; + $this->ishadowwidth = $aShadowWidth; + } + + public function SetBox2($aFrameColor = array(255, 255, 255), $aBorderColor = array(0, 0, 0), $aShadowColor = false, $aCornerRadius = 4, $aShadowWidth = 3) + { + $this->iBoxType = 2; + $this->SetBox($aFrameColor, $aBorderColor, $aShadowColor, $aCornerRadius, $aShadowWidth); + } + + // Hide the text + public function Hide($aHide = true) + { + $this->hide = $aHide; + } + + // This looks ugly since it's not a very orthogonal design + // but I added this "inverse" of Hide() to harmonize + // with some classes which I designed more recently (especially) + // jpgraph_gantt + public function Show($aShow = true) + { + $this->hide = !$aShow; + } + + // Specify font + public function SetFont($aFamily, $aStyle = FS_NORMAL, $aSize = 10) + { + $this->font_family = $aFamily; + $this->font_style = $aStyle; + $this->font_size = $aSize; + } + + // Center the text between $left and $right coordinates + public function Center($aLeft, $aRight, $aYAbsPos = false) + { + $this->x = $aLeft + ($aRight - $aLeft) / 2; + $this->halign = "center"; + if (is_numeric($aYAbsPos)) { + $this->y = $aYAbsPos; + } + + } + + // Set text color + public function SetColor($aColor) + { + $this->color = $aColor; + } + + public function SetAngle($aAngle) + { + $this->SetOrientation($aAngle); + } + + // Orientation of text. Note only TTF fonts can have an arbitrary angle + public function SetOrientation($aDirection = 0) + { + if (is_numeric($aDirection)) { + $this->dir = $aDirection; + } elseif ($aDirection == "h") { + $this->dir = 0; + } elseif ($aDirection == "v") { + $this->dir = 90; + } else { + JpGraphError::RaiseL(25051); + } + //(" Invalid direction specified for text."); + } + + // Total width of text + public function GetWidth($aImg) + { + $aImg->SetFont($this->font_family, $this->font_style, $this->raw_font_size); + $w = $aImg->GetTextWidth($this->t, $this->dir); + return $w; + } + + // Hight of font + public function GetFontHeight($aImg) + { + $aImg->SetFont($this->font_family, $this->font_style, $this->raw_font_size); + $h = $aImg->GetFontHeight(); + return $h; + + } + + public function GetTextHeight($aImg) + { + $aImg->SetFont($this->font_family, $this->font_style, $this->raw_font_size); + $h = $aImg->GetTextHeight($this->t, $this->dir); + return $h; + } + + public function GetHeight($aImg) + { + // Synonym for GetTextHeight() + $aImg->SetFont($this->font_family, $this->font_style, $this->raw_font_size); + $h = $aImg->GetTextHeight($this->t, $this->dir); + return $h; + } + + // Set the margin which will be interpretated differently depending + // on the context. + public function SetMargin($aMarg) + { + $this->margin = $aMarg; + } + + public function StrokeWithScale($aImg, $axscale, $ayscale) + { + if ($this->iScalePosX === null || $this->iScalePosY === null) { + $this->Stroke($aImg); + } else { + $this->Stroke($aImg, + round($axscale->Translate($this->iScalePosX)), + round($ayscale->Translate($this->iScalePosY))); + } + } + + public function SetCSIMTarget($aURITarget, $aAlt = '', $aWinTarget = '') + { + $this->iCSIMtarget = $aURITarget; + $this->iCSIMalt = $aAlt; + $this->iCSIMWinTarget = $aWinTarget; + } + + public function GetCSIMareas() + { + if ($this->iCSIMtarget !== '') { + return $this->iCSIMarea; + } else { + return ''; + } + } + + // Display text in image + public function Stroke($aImg, $x = null, $y = null) + { + + if ($x !== null) { + $this->x = round($x); + } + + if ($y !== null) { + $this->y = round($y); + } + + // Insert newlines + if ($this->iWordwrap > 0) { + $this->t = wordwrap($this->t, $this->iWordwrap, "\n"); + } + + // If position been given as a fraction of the image size + // calculate the absolute position + if ($this->x < 1 && $this->x > 0) { + $this->x *= $aImg->width; + } + + if ($this->y < 1 && $this->y > 0) { + $this->y *= $aImg->height; + } + + $aImg->PushColor($this->color); + $aImg->SetFont($this->font_family, $this->font_style, $this->raw_font_size); + $aImg->SetTextAlign($this->halign, $this->valign); + + if ($this->boxed) { + if ($this->fcolor == "nofill") { + $this->fcolor = false; + } + + $oldweight = $aImg->SetLineWeight(1); + + if ($this->iBoxType == 2 && $this->font_family > FF_FONT2 + 2) { + + $bbox = $aImg->StrokeBoxedText2($this->x, $this->y, + $this->t, $this->dir, + $this->fcolor, + $this->bcolor, + $this->shadow, + $this->paragraph_align, + 2, 4, + $this->icornerradius, + $this->ishadowwidth); + } else { + $bbox = $aImg->StrokeBoxedText($this->x, $this->y, $this->t, + $this->dir, $this->fcolor, $this->bcolor, $this->shadow, + $this->paragraph_align, 3, 3, $this->icornerradius, + $this->ishadowwidth); + } + + $aImg->SetLineWeight($oldweight); + } else { + $debug = false; + $bbox = $aImg->StrokeText($this->x, $this->y, $this->t, $this->dir, $this->paragraph_align, $debug); + } + + // Create CSIM targets + $coords = $bbox[0] . ',' . $bbox[1] . ',' . $bbox[2] . ',' . $bbox[3] . ',' . $bbox[4] . ',' . $bbox[5] . ',' . $bbox[6] . ',' . $bbox[7]; + $this->iCSIMarea = "iCSIMtarget) . "\" "; + if (trim($this->iCSIMalt) != '') { + $this->iCSIMarea .= " alt=\"" . $this->iCSIMalt . "\" "; + $this->iCSIMarea .= " title=\"" . $this->iCSIMalt . "\" "; + } + if (trim($this->iCSIMWinTarget) != '') { + $this->iCSIMarea .= " target=\"" . $this->iCSIMWinTarget . "\" "; + } + $this->iCSIMarea .= " />\n"; + + $aImg->PopColor($this->color); + } + + public function __get($name) + { + + if (strpos($name, 'raw_') !== false) { + // if $name == 'raw_left_margin' , return $this->_left_margin; + $variable_name = '_' . str_replace('raw_', '', $name); + return $this->$variable_name; + } + + $variable_name = '_' . $name; + + if (isset($this->$variable_name)) { + return $this->$variable_name * SUPERSAMPLING_SCALE; + } else { + JpGraphError::RaiseL('25132', $name); + } + } + + public function __set($name, $value) + { + $this->{'_' . $name} = $value; + } +} // Class diff --git a/vendor/amenadiel/jpgraph/src/text/TextProperty.php b/vendor/amenadiel/jpgraph/src/text/TextProperty.php new file mode 100644 index 0000000000..859ea9fc49 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/text/TextProperty.php @@ -0,0 +1,303 @@ +iText = $aTxt; + } + + //--------------- + // PUBLIC METHODS + public function Set($aTxt) + { + $this->iText = $aTxt; + } + + public function SetCSIMTarget($aTarget, $aAltText = '', $aWinTarget = '') + { + if (is_string($aTarget)) { + $aTarget = array($aTarget); + } + + $this->csimtarget = $aTarget; + + if (is_string($aWinTarget)) { + $aWinTarget = array($aWinTarget); + } + + $this->csimwintarget = $aWinTarget; + + if (is_string($aAltText)) { + $aAltText = array($aAltText); + } + + $this->csimalt = $aAltText; + + } + + public function SetCSIMAlt($aAltText) + { + if (is_string($aAltText)) { + $aAltText = array($aAltText); + } + + $this->csimalt = $aAltText; + } + + // Set text color + public function SetColor($aColor) + { + $this->iColor = $aColor; + } + + public function HasTabs() + { + if (is_string($this->iText)) { + return substr_count($this->iText, "\t") > 0; + } elseif (is_array($this->iText)) { + return false; + } + } + + // Get number of tabs in string + public function GetNbrTabs() + { + if (is_string($this->iText)) { + return substr_count($this->iText, "\t"); + } else { + return 0; + } + } + + // Set alignment + public function Align($aHAlign, $aVAlign = "bottom") + { + $this->iHAlign = $aHAlign; + $this->iVAlign = $aVAlign; + } + + // Synonym + public function SetAlign($aHAlign, $aVAlign = "bottom") + { + $this->iHAlign = $aHAlign; + $this->iVAlign = $aVAlign; + } + + // Specify font + public function SetFont($aFFamily, $aFStyle = FS_NORMAL, $aFSize = 10) + { + $this->iFFamily = $aFFamily; + $this->iFStyle = $aFStyle; + $this->iFSize = $aFSize; + } + + public function SetColumnFonts($aFontArray) + { + if (!is_array($aFontArray) || count($aFontArray[0]) != 3) { + JpGraphError::RaiseL(6033); + // 'Array of fonts must contain arrays with 3 elements, i.e. (Family, Style, Size)' + } + $this->iFontArray = $aFontArray; + } + + public function IsColumns() + { + return is_array($this->iText); + } + + // Get width of text. If text contains several columns separated by + // tabs then return both the total width as well as an array with a + // width for each column. + public function GetWidth($aImg, $aUseTabs = false, $aTabExtraMargin = 1.1) + { + $extra_margin = 4; + $aImg->SetFont($this->iFFamily, $this->iFStyle, $this->iFSize); + if (is_string($this->iText)) { + if (strlen($this->iText) == 0) { + return 0; + } + + $tmp = preg_split('/\t/', $this->iText); + if (count($tmp) <= 1 || !$aUseTabs) { + $w = $aImg->GetTextWidth($this->iText); + return $w + 2 * $extra_margin; + } else { + $tot = 0; + $n = count($tmp); + for ($i = 0; $i < $n; ++$i) { + $res[$i] = $aImg->GetTextWidth($tmp[$i]); + $tot += $res[$i] * $aTabExtraMargin; + } + return array(round($tot), $res); + } + } elseif (is_object($this->iText)) { + // A single icon + return $this->iText->GetWidth() + 2 * $extra_margin; + } elseif (is_array($this->iText)) { + // Must be an array of texts. In this case we return the sum of the + // length + a fixed margin of 4 pixels on each text string + $n = count($this->iText); + $nf = count($this->iFontArray); + for ($i = 0, $w = 0; $i < $n; ++$i) { + if ($i < $nf) { + $aImg->SetFont($this->iFontArray[$i][0], $this->iFontArray[$i][1], $this->iFontArray[$i][2]); + } else { + $aImg->SetFont($this->iFFamily, $this->iFStyle, $this->iFSize); + } + $tmp = $this->iText[$i]; + if (is_string($tmp)) { + $w += $aImg->GetTextWidth($tmp) + $extra_margin; + } else { + if (is_object($tmp) === false) { + JpGraphError::RaiseL(6012); + } + $w += $tmp->GetWidth() + $extra_margin; + } + } + return $w; + } else { + JpGraphError::RaiseL(6012); + } + } + + // for the case where we have multiple columns this function returns the width of each + // column individually. If there is no columns just return the width of the single + // column as an array of one + public function GetColWidth($aImg, $aMargin = 0) + { + $aImg->SetFont($this->iFFamily, $this->iFStyle, $this->iFSize); + if (is_array($this->iText)) { + $n = count($this->iText); + $nf = count($this->iFontArray); + for ($i = 0, $w = array(); $i < $n; ++$i) { + $tmp = $this->iText[$i]; + if (is_string($tmp)) { + if ($i < $nf) { + $aImg->SetFont($this->iFontArray[$i][0], $this->iFontArray[$i][1], $this->iFontArray[$i][2]); + } else { + $aImg->SetFont($this->iFFamily, $this->iFStyle, $this->iFSize); + } + $w[$i] = $aImg->GetTextWidth($tmp) + $aMargin; + } else { + if (is_object($tmp) === false) { + JpGraphError::RaiseL(6012); + } + $w[$i] = $tmp->GetWidth() + $aMargin; + } + } + return $w; + } else { + return array($this->GetWidth($aImg)); + } + } + + // Get total height of text + public function GetHeight($aImg) + { + $nf = count($this->iFontArray); + $maxheight = -1; + + if ($nf > 0) { + // We have to find out the largest font and take that one as the + // height of the row + for ($i = 0; $i < $nf; ++$i) { + $aImg->SetFont($this->iFontArray[$i][0], $this->iFontArray[$i][1], $this->iFontArray[$i][2]); + $height = $aImg->GetFontHeight(); + $maxheight = max($height, $maxheight); + } + } + + $aImg->SetFont($this->iFFamily, $this->iFStyle, $this->iFSize); + $height = $aImg->GetFontHeight(); + $maxheight = max($height, $maxheight); + return $maxheight; + } + + // Unhide/hide the text + public function Show($aShow = true) + { + $this->iShow = $aShow; + } + + // Stroke text at (x,y) coordinates. If the text contains tabs then the + // x parameter should be an array of positions to be used for each successive + // tab mark. If no array is supplied then the tabs will be ignored. + public function Stroke($aImg, $aX, $aY) + { + if ($this->iShow) { + $aImg->SetColor($this->iColor); + $aImg->SetFont($this->iFFamily, $this->iFStyle, $this->iFSize); + $aImg->SetTextAlign($this->iHAlign, $this->iVAlign); + if ($this->GetNbrTabs() < 1) { + if (is_string($this->iText)) { + if (is_array($aX)) { + $aX = $aX[0]; + } + + if (is_array($aY)) { + $aY = $aY[0]; + } + + $aImg->StrokeText($aX, $aY, $this->iText); + } elseif (is_array($this->iText) && ($n = count($this->iText)) > 0) { + $ax = is_array($aX); + $ay = is_array($aY); + if ($ax && $ay) { + // Nothing; both are already arrays + } elseif ($ax) { + $aY = array_fill(0, $n, $aY); + } elseif ($ay) { + $aX = array_fill(0, $n, $aX); + } else { + $aX = array_fill(0, $n, $aX); + $aY = array_fill(0, $n, $aY); + } + $n = min($n, count($aX)); + $n = min($n, count($aY)); + for ($i = 0; $i < $n; ++$i) { + $tmp = $this->iText[$i]; + if (is_object($tmp)) { + $tmp->Stroke($aImg, $aX[$i], $aY[$i]); + } else { + if ($i < count($this->iFontArray)) { + $font = $this->iFontArray[$i]; + $aImg->SetFont($font[0], $font[1], $font[2]); + } else { + $aImg->SetFont($this->iFFamily, $this->iFStyle, $this->iFSize); + } + $aImg->StrokeText($aX[$i], $aY[$i], str_replace("\t", " ", $tmp)); + } + } + } + } else { + $tmp = preg_split('/\t/', $this->iText); + $n = min(count($tmp), count($aX)); + for ($i = 0; $i < $n; ++$i) { + if ($i < count($this->iFontArray)) { + $font = $this->iFontArray[$i]; + $aImg->SetFont($font[0], $font[1], $font[2]); + } else { + $aImg->SetFont($this->iFFamily, $this->iFStyle, $this->iFSize); + } + $aImg->StrokeText($aX[$i], $aY, $tmp[$i]); + } + } + } + } +} diff --git a/vendor/amenadiel/jpgraph/src/text/TextPropertyBelow.php b/vendor/amenadiel/jpgraph/src/text/TextPropertyBelow.php new file mode 100644 index 0000000000..34a8b4b0ca --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/text/TextPropertyBelow.php @@ -0,0 +1,22 @@ +img; + $height = $img->height; + $graph->SetMargin($img->left_margin, $img->right_margin, $img->top_margin, $height * 0.25); + */ + $graph->SetFrame(false); + $graph->SetMarginColor('white'); + $graph->SetBackgroundGradient($this->background_color, '#FFFFFF', GRAD_HOR, BGRAD_PLOT); + + // legend + $graph->legend->SetFrameWeight(0); + $graph->legend->Pos(0.5, 0.85, 'center', 'top'); + $graph->legend->SetFillColor('white'); + $graph->legend->SetLayout(LEGEND_HOR); + $graph->legend->SetColumns(3); + $graph->legend->SetShadow(false); + $graph->legend->SetMarkAbsSize(5); + + // xaxis + $graph->xaxis->title->SetColor($this->font_color); + $graph->xaxis->SetColor($this->axis_color, $this->font_color); + $graph->xaxis->SetTickSide(SIDE_BOTTOM); + $graph->xaxis->SetLabelMargin(10); + + // yaxis + $graph->yaxis->title->SetColor($this->font_color); + $graph->yaxis->SetColor($this->axis_color, $this->font_color); + $graph->yaxis->SetTickSide(SIDE_LEFT); + $graph->yaxis->SetLabelMargin(8); + $graph->yaxis->HideLine(); + $graph->yaxis->HideTicks(); + $graph->xaxis->SetTitleMargin(15); + + // grid + $graph->ygrid->SetColor($this->grid_color); + $graph->ygrid->SetLineStyle('dotted'); + + // font + $graph->title->SetColor($this->font_color); + $graph->subtitle->SetColor($this->font_color); + $graph->subsubtitle->SetColor($this->font_color); + + // $graph->img->SetAntiAliasing(); + } + + public function SetupPieGraph($graph) + { + + // graph + $graph->SetFrame(false); + + // legend + $graph->legend->SetFillColor('white'); + + $graph->legend->SetFrameWeight(0); + $graph->legend->Pos(0.5, 0.80, 'center', 'top'); + $graph->legend->SetLayout(LEGEND_HOR); + $graph->legend->SetColumns(4); + + $graph->legend->SetShadow(false); + $graph->legend->SetMarkAbsSize(5); + + // title + $graph->title->SetColor($this->font_color); + $graph->subtitle->SetColor($this->font_color); + $graph->subsubtitle->SetColor($this->font_color); + + $graph->SetAntiAliasing(); + } + + public function PreStrokeApply($graph) + { + if ($graph->legend->HasItems()) { + $img = $graph->img; + $height = $img->height; + $graph->SetMargin( + $img->raw_left_margin, + $img->raw_right_margin, + $img->raw_top_margin, + $height * 0.25 + ); + } + } + + public function ApplyPlot($plot) + { + + switch (get_class($plot)) { + case 'GroupBarPlot': + { + foreach ($plot->plots as $_plot) { + $this->ApplyPlot($_plot); + } + break; + } + + case 'AccBarPlot': + { + foreach ($plot->plots as $_plot) { + $this->ApplyPlot($_plot); + } + break; + } + + case 'BarPlot': + { + $plot->Clear(); + + $color = $this->GetNextColor(); + $plot->SetColor($color); + $plot->SetFillColor($color); + //$plot->SetShadow(); + break; + } + + case 'LinePlot': + { + $plot->Clear(); + $plot->SetColor($this->GetNextColor()); + $plot->SetWeight(2); + // $plot->SetBarCenter(); + break; + } + + case 'PiePlot': + { + $plot->SetCenter(0.5, 0.45); + $plot->ShowBorder(false); + $plot->SetSliceColors($this->GetThemeColors()); + break; + } + + case 'PiePlot3D': + { + $plot->SetSliceColors($this->GetThemeColors()); + break; + } + + default: + { + } + } + } +} diff --git a/vendor/amenadiel/jpgraph/src/themes/GreenTheme.php b/vendor/amenadiel/jpgraph/src/themes/GreenTheme.php new file mode 100644 index 0000000000..c35356c95e --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/themes/GreenTheme.php @@ -0,0 +1,177 @@ +img; + $height = $img->height; + $graph->SetMargin($img->left_margin, $img->right_margin, $img->top_margin, $height * 0.25); + */ + $graph->SetFrame(false); + $graph->SetMarginColor('white'); + $graph->SetBackgroundGradient($this->background_color, '#FFFFFF', GRAD_HOR, BGRAD_PLOT); + + // legend + $graph->legend->SetFrameWeight(0); + $graph->legend->Pos(0.5, 0.85, 'center', 'top'); + $graph->legend->SetFillColor('white'); + $graph->legend->SetLayout(LEGEND_HOR); + $graph->legend->SetColumns(3); + $graph->legend->SetShadow(false); + $graph->legend->SetMarkAbsSize(5); + + // xaxis + $graph->xaxis->title->SetColor($this->font_color); + $graph->xaxis->SetColor($this->axis_color, $this->font_color); + $graph->xaxis->SetTickSide(SIDE_BOTTOM); + $graph->xaxis->SetLabelMargin(10); + + // yaxis + $graph->yaxis->title->SetColor($this->font_color); + $graph->yaxis->SetColor($this->axis_color, $this->font_color); + $graph->yaxis->SetTickSide(SIDE_LEFT); + $graph->yaxis->SetLabelMargin(8); + $graph->yaxis->HideLine(); + $graph->yaxis->HideTicks(); + $graph->xaxis->SetTitleMargin(15); + + // grid + $graph->ygrid->SetColor($this->grid_color); + $graph->ygrid->SetLineStyle('dotted'); + + // font + $graph->title->SetColor($this->font_color); + $graph->subtitle->SetColor($this->font_color); + $graph->subsubtitle->SetColor($this->font_color); + + // $graph->img->SetAntiAliasing(); + } + + public function SetupPieGraph($graph) + { + + // graph + $graph->SetFrame(false); + + // legend + $graph->legend->SetFillColor('white'); + /* + $graph->legend->SetFrameWeight(0); + $graph->legend->Pos(0.5, 0.85, 'center', 'top'); + $graph->legend->SetLayout(LEGEND_HOR); + $graph->legend->SetColumns(3); + */ + $graph->legend->SetShadow(false); + $graph->legend->SetMarkAbsSize(5); + + // title + $graph->title->SetColor($this->font_color); + $graph->subtitle->SetColor($this->font_color); + $graph->subsubtitle->SetColor($this->font_color); + + $graph->SetAntiAliasing(); + } + + public function PreStrokeApply($graph) + { + if ($graph->legend->HasItems()) { + $img = $graph->img; + $height = $img->height; + $graph->SetMargin($img->left_margin, $img->right_margin, $img->top_margin, $height * 0.25); + } + } + + public function ApplyPlot($plot) + { + + switch (get_class($plot)) { + case 'GroupBarPlot': + { + foreach ($plot->plots as $_plot) { + $this->ApplyPlot($_plot); + } + break; + } + + case 'AccBarPlot': + { + foreach ($plot->plots as $_plot) { + $this->ApplyPlot($_plot); + } + break; + } + + case 'BarPlot': + { + $plot->Clear(); + + $color = $this->GetNextColor(); + $plot->SetColor($color); + $plot->SetFillColor($color); + $plot->SetShadow('red', 3, 4, false); + break; + } + + case 'LinePlot': + { + $plot->Clear(); + + $plot->SetColor($this->GetNextColor() . '@0.4'); + $plot->SetWeight(2); + break; + } + + case 'PiePlot': + { + $plot->ShowBorder(false); + $plot->SetSliceColors($this->GetThemeColors()); + break; + } + + case 'PiePlot3D': + { + $plot->SetSliceColors($this->GetThemeColors()); + break; + } + + default: + { + } + } + } +} diff --git a/vendor/amenadiel/jpgraph/src/themes/OceanTheme.php b/vendor/amenadiel/jpgraph/src/themes/OceanTheme.php new file mode 100644 index 0000000000..09cb80f5f4 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/themes/OceanTheme.php @@ -0,0 +1,179 @@ +img; + $height = $img->height; + $graph->SetMargin($img->left_margin, $img->right_margin, $img->top_margin, $height * 0.25); + */ + $graph->SetFrame(false); + $graph->SetMarginColor('white'); + $graph->SetBackgroundGradient($this->background_color, '#FFFFFF', GRAD_HOR, BGRAD_PLOT); + + // legend + $graph->legend->SetFrameWeight(0); + $graph->legend->Pos(0.5, 0.85, 'center', 'top'); + $graph->legend->SetFillColor('white'); + $graph->legend->SetLayout(LEGEND_HOR); + $graph->legend->SetColumns(3); + $graph->legend->SetShadow(false); + $graph->legend->SetMarkAbsSize(5); + + // xaxis + $graph->xaxis->title->SetColor($this->font_color); + $graph->xaxis->SetColor($this->axis_color, $this->font_color); + $graph->xaxis->SetTickSide(SIDE_BOTTOM); + $graph->xaxis->SetLabelMargin(10); + + // yaxis + $graph->yaxis->title->SetColor($this->font_color); + $graph->yaxis->SetColor($this->axis_color, $this->font_color); + $graph->yaxis->SetTickSide(SIDE_LEFT); + $graph->yaxis->SetLabelMargin(8); + $graph->yaxis->HideLine(); + $graph->yaxis->HideTicks(); + $graph->xaxis->SetTitleMargin(15); + + // grid + $graph->ygrid->SetColor($this->grid_color); + $graph->ygrid->SetLineStyle('dotted'); + + // font + $graph->title->SetColor($this->font_color); + $graph->subtitle->SetColor($this->font_color); + $graph->subsubtitle->SetColor($this->font_color); + + // $graph->img->SetAntiAliasing(); + } + + public function SetupPieGraph($graph) + { + + // graph + $graph->SetFrame(false); + + // legend + $graph->legend->SetFillColor('white'); + /* + $graph->legend->SetFrameWeight(0); + $graph->legend->Pos(0.5, 0.85, 'center', 'top'); + $graph->legend->SetLayout(LEGEND_HOR); + $graph->legend->SetColumns(3); + */ + $graph->legend->SetShadow(false); + $graph->legend->SetMarkAbsSize(5); + + // title + $graph->title->SetColor($this->font_color); + $graph->subtitle->SetColor($this->font_color); + $graph->subsubtitle->SetColor($this->font_color); + + $graph->SetAntiAliasing(); + } + + public function PreStrokeApply($graph) + { + if ($graph->legend->HasItems()) { + $img = $graph->img; + $height = $img->height; + $graph->SetMargin($img->left_margin, $img->right_margin, $img->top_margin, $height * 0.25); + } + } + + public function ApplyPlot($plot) + { + + switch (get_class($plot)) { + case 'GroupBarPlot': + { + foreach ($plot->plots as $_plot) { + $this->ApplyPlot($_plot); + } + break; + } + + case 'AccBarPlot': + { + foreach ($plot->plots as $_plot) { + $this->ApplyPlot($_plot); + } + break; + } + + case 'BarPlot': + { + $plot->Clear(); + + $color = $this->GetNextColor(); + $plot->SetColor($color); + $plot->SetFillColor($color); + $plot->SetShadow('red', 3, 4, false); + break; + } + + case 'LinePlot': + { + $plot->Clear(); + + $plot->SetColor($this->GetNextColor()); + $plot->SetWeight(2); + break; + } + + case 'PiePlot': + { + $plot->ShowBorder(false); + $plot->SetSliceColors($this->GetThemeColors()); + break; + } + + case 'PiePlot3D': + { + $plot->SetSliceColors($this->GetThemeColors()); + break; + } + + default: + { + } + } + } +} diff --git a/vendor/amenadiel/jpgraph/src/themes/OrangeTheme.php b/vendor/amenadiel/jpgraph/src/themes/OrangeTheme.php new file mode 100644 index 0000000000..67fa9ffb27 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/themes/OrangeTheme.php @@ -0,0 +1,179 @@ +img; + $height = $img->height; + $graph->SetMargin($img->left_margin, $img->right_margin, $img->top_margin, $height * 0.25); + */ + $graph->SetFrame(false); + $graph->SetMarginColor('white'); + $graph->SetBackgroundGradient($this->background_color, '#FFFFFF', GRAD_HOR, BGRAD_PLOT); + + // legend + $graph->legend->SetFrameWeight(0); + $graph->legend->Pos(0.5, 0.85, 'center', 'top'); + $graph->legend->SetFillColor('white'); + $graph->legend->SetLayout(LEGEND_HOR); + $graph->legend->SetColumns(3); + $graph->legend->SetShadow(false); + $graph->legend->SetMarkAbsSize(5); + + // xaxis + $graph->xaxis->title->SetColor($this->font_color); + $graph->xaxis->SetColor($this->axis_color, $this->font_color); + $graph->xaxis->SetTickSide(SIDE_BOTTOM); + $graph->xaxis->SetLabelMargin(10); + + // yaxis + $graph->yaxis->title->SetColor($this->font_color); + $graph->yaxis->SetColor($this->axis_color, $this->font_color); + $graph->yaxis->SetTickSide(SIDE_LEFT); + $graph->yaxis->SetLabelMargin(8); + $graph->yaxis->HideLine(); + $graph->yaxis->HideTicks(); + $graph->xaxis->SetTitleMargin(15); + + // grid + $graph->ygrid->SetColor($this->grid_color); + $graph->ygrid->SetLineStyle('dotted'); + + // font + $graph->title->SetColor($this->font_color); + $graph->subtitle->SetColor($this->font_color); + $graph->subsubtitle->SetColor($this->font_color); + + // $graph->img->SetAntiAliasing(); + } + + public function SetupPieGraph($graph) + { + + // graph + $graph->SetFrame(false); + + // legend + $graph->legend->SetFillColor('white'); + /* + $graph->legend->SetFrameWeight(0); + $graph->legend->Pos(0.5, 0.85, 'center', 'top'); + $graph->legend->SetLayout(LEGEND_HOR); + $graph->legend->SetColumns(3); + */ + $graph->legend->SetShadow(false); + $graph->legend->SetMarkAbsSize(5); + + // title + $graph->title->SetColor($this->font_color); + $graph->subtitle->SetColor($this->font_color); + $graph->subsubtitle->SetColor($this->font_color); + + $graph->SetAntiAliasing(); + } + + public function PreStrokeApply($graph) + { + if ($graph->legend->HasItems()) { + $img = $graph->img; + $height = $img->height; + $graph->SetMargin($img->left_margin, $img->right_margin, $img->top_margin, $height * 0.25); + } + } + + public function ApplyPlot($plot) + { + + switch (get_class($plot)) { + case 'GroupBarPlot': + { + foreach ($plot->plots as $_plot) { + $this->ApplyPlot($_plot); + } + break; + } + + case 'AccBarPlot': + { + foreach ($plot->plots as $_plot) { + $this->ApplyPlot($_plot); + } + break; + } + + case 'BarPlot': + { + $plot->Clear(); + + $color = $this->GetNextColor(); + $plot->SetColor($color); + $plot->SetFillColor($color); + $plot->SetShadow('red', 3, 4, false); + break; + } + + case 'LinePlot': + { + $plot->Clear(); + + $plot->SetColor($this->GetNextColor() . '@0.4'); + $plot->SetWeight(2); + break; + } + + case 'PiePlot': + { + $plot->ShowBorder(false); + $plot->SetSliceColors($this->GetThemeColors()); + break; + } + + case 'PiePlot3D': + { + $plot->SetSliceColors($this->GetThemeColors()); + break; + } + + default: + { + } + } + } +} diff --git a/vendor/amenadiel/jpgraph/src/themes/PastelTheme.php b/vendor/amenadiel/jpgraph/src/themes/PastelTheme.php new file mode 100644 index 0000000000..d9027ce0dc --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/themes/PastelTheme.php @@ -0,0 +1,174 @@ +img; + $height = $img->height; + $graph->SetMargin($img->left_margin, $img->right_margin, $img->top_margin, $height * 0.25); + */ + $graph->SetFrame(false); + $graph->SetMarginColor('white'); + $graph->SetBackgroundGradient($this->background_color, '#FFFFFF', GRAD_HOR, BGRAD_PLOT); + + // legend + $graph->legend->SetFrameWeight(0); + $graph->legend->Pos(0.5, 0.85, 'center', 'top'); + $graph->legend->SetFillColor('white'); + $graph->legend->SetLayout(LEGEND_HOR); + $graph->legend->SetColumns(3); + $graph->legend->SetShadow(false); + $graph->legend->SetMarkAbsSize(5); + + // xaxis + $graph->xaxis->title->SetColor($this->font_color); + $graph->xaxis->SetColor($this->axis_color, $this->font_color); + $graph->xaxis->SetTickSide(SIDE_BOTTOM); + $graph->xaxis->SetLabelMargin(10); + + // yaxis + $graph->yaxis->title->SetColor($this->font_color); + $graph->yaxis->SetColor($this->axis_color, $this->font_color); + $graph->yaxis->SetTickSide(SIDE_LEFT); + $graph->yaxis->SetLabelMargin(8); + $graph->yaxis->HideLine(); + $graph->yaxis->HideTicks(); + $graph->xaxis->SetTitleMargin(15); + + // grid + $graph->ygrid->SetColor($this->grid_color); + $graph->ygrid->SetLineStyle('dotted'); + + // font + $graph->title->SetColor($this->font_color); + $graph->subtitle->SetColor($this->font_color); + $graph->subsubtitle->SetColor($this->font_color); + + // $graph->img->SetAntiAliasing(); + } + + public function SetupPieGraph($graph) + { + + // graph + $graph->SetFrame(false); + + // legend + $graph->legend->SetFillColor('white'); + + $graph->legend->SetFrameWeight(0); + $graph->legend->Pos(0.5, 0.80, 'center', 'top'); + $graph->legend->SetLayout(LEGEND_HOR); + $graph->legend->SetColumns(4); + + $graph->legend->SetShadow(false); + $graph->legend->SetMarkAbsSize(5); + + // title + $graph->title->SetColor($this->font_color); + $graph->subtitle->SetColor($this->font_color); + $graph->subsubtitle->SetColor($this->font_color); + + $graph->SetAntiAliasing(); + } + + public function PreStrokeApply($graph) + { + if ($graph->legend->HasItems()) { + $img = $graph->img; + $height = $img->height; + $graph->SetMargin($img->left_margin, $img->right_margin, $img->top_margin, $height * 0.25); + } + } + + public function ApplyPlot($plot) + { + + switch (get_class($plot)) { + case 'GroupBarPlot': + { + foreach ($plot->plots as $_plot) { + $this->ApplyPlot($_plot); + } + break; + } + + case 'AccBarPlot': + { + foreach ($plot->plots as $_plot) { + $this->ApplyPlot($_plot); + } + break; + } + + case 'BarPlot': + { + $plot->Clear(); + + $color = $this->GetNextColor(); + $plot->SetColor($color); + $plot->SetFillColor($color); + $plot->SetShadow('red', 3, 4, false); + break; + } + + case 'LinePlot': + { + $plot->Clear(); + $plot->SetColor($this->GetNextColor() . '@0.4'); + $plot->SetWeight(2); + // $plot->SetBarCenter(); + break; + } + + case 'PiePlot': + { + $plot->SetCenter(0.5, 0.45); + $plot->ShowBorder(false); + $plot->SetSliceColors($this->GetThemeColors()); + break; + } + + case 'PiePlot3D': + { + $plot->SetSliceColors($this->GetThemeColors()); + break; + } + + default: + { + } + } + } +} diff --git a/vendor/amenadiel/jpgraph/src/themes/RoseTheme.php b/vendor/amenadiel/jpgraph/src/themes/RoseTheme.php new file mode 100644 index 0000000000..bf1e04f438 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/themes/RoseTheme.php @@ -0,0 +1,179 @@ +img; + $height = $img->height; + $graph->SetMargin($img->left_margin, $img->right_margin, $img->top_margin, $height * 0.25); + */ + $graph->SetFrame(false); + $graph->SetMarginColor('white'); + $graph->SetBackgroundGradient($this->background_color, '#FFFFFF', GRAD_HOR, BGRAD_PLOT); + + // legend + $graph->legend->SetFrameWeight(0); + $graph->legend->Pos(0.5, 0.85, 'center', 'top'); + $graph->legend->SetFillColor('white'); + $graph->legend->SetLayout(LEGEND_HOR); + $graph->legend->SetColumns(3); + $graph->legend->SetShadow(false); + $graph->legend->SetMarkAbsSize(5); + + // xaxis + $graph->xaxis->title->SetColor($this->font_color); + $graph->xaxis->SetColor($this->axis_color, $this->font_color); + $graph->xaxis->SetTickSide(SIDE_BOTTOM); + $graph->xaxis->SetLabelMargin(10); + + // yaxis + $graph->yaxis->title->SetColor($this->font_color); + $graph->yaxis->SetColor($this->axis_color, $this->font_color); + $graph->yaxis->SetTickSide(SIDE_LEFT); + $graph->yaxis->SetLabelMargin(8); + $graph->yaxis->HideLine(); + $graph->yaxis->HideTicks(); + $graph->xaxis->SetTitleMargin(15); + + // grid + $graph->ygrid->SetColor($this->grid_color); + $graph->ygrid->SetLineStyle('dotted'); + + // font + $graph->title->SetColor($this->font_color); + $graph->subtitle->SetColor($this->font_color); + $graph->subsubtitle->SetColor($this->font_color); + + // $graph->img->SetAntiAliasing(); + } + + public function SetupPieGraph($graph) + { + + // graph + $graph->SetFrame(false); + + // legend + $graph->legend->SetFillColor('white'); + /* + $graph->legend->SetFrameWeight(0); + $graph->legend->Pos(0.5, 0.85, 'center', 'top'); + $graph->legend->SetLayout(LEGEND_HOR); + $graph->legend->SetColumns(3); + */ + $graph->legend->SetShadow(false); + $graph->legend->SetMarkAbsSize(5); + + // title + $graph->title->SetColor($this->font_color); + $graph->subtitle->SetColor($this->font_color); + $graph->subsubtitle->SetColor($this->font_color); + + $graph->SetAntiAliasing(); + } + + public function PreStrokeApply($graph) + { + if ($graph->legend->HasItems()) { + $img = $graph->img; + $height = $img->height; + $graph->SetMargin($img->left_margin, $img->right_margin, $img->top_margin, $height * 0.25); + } + } + + public function ApplyPlot($plot) + { + + switch (get_class($plot)) { + case 'GroupBarPlot': + { + foreach ($plot->plots as $_plot) { + $this->ApplyPlot($_plot); + } + break; + } + + case 'AccBarPlot': + { + foreach ($plot->plots as $_plot) { + $this->ApplyPlot($_plot); + } + break; + } + + case 'BarPlot': + { + $plot->Clear(); + + $color = $this->GetNextColor(); + $plot->SetColor($color); + $plot->SetFillColor($color); + $plot->SetShadow('red', 3, 4, false); + break; + } + + case 'LinePlot': + { + $plot->Clear(); + + $plot->SetColor($this->GetNextColor() . '@0.4'); + $plot->SetWeight(2); + break; + } + + case 'PiePlot': + { + $plot->ShowBorder(false); + $plot->SetSliceColors($this->GetThemeColors()); + break; + } + + case 'PiePlot3D': + { + $plot->SetSliceColors($this->GetThemeColors()); + break; + } + + default: + { + } + } + } +} diff --git a/vendor/amenadiel/jpgraph/src/themes/SoftyTheme.php b/vendor/amenadiel/jpgraph/src/themes/SoftyTheme.php new file mode 100644 index 0000000000..b240cba489 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/themes/SoftyTheme.php @@ -0,0 +1,206 @@ +SetFrame(false); + $graph->SetMarginColor('white'); + + // legend + $graph->legend->SetFrameWeight(0); + $graph->legend->Pos(0.5, 0.85, 'center', 'top'); + $graph->legend->SetFillColor('white'); + $graph->legend->SetLayout(LEGEND_HOR); + $graph->legend->SetColumns(3); + $graph->legend->SetShadow(false); + $graph->legend->SetMarkAbsSize(5); + + // xaxis + $graph->xaxis->title->SetColor($this->font_color); + $graph->xaxis->SetColor($this->axis_color, $this->font_color); + $graph->xaxis->SetTickSide(SIDE_BOTTOM); + $graph->xaxis->SetLabelMargin(10); + + // yaxis + $graph->yaxis->title->SetColor($this->font_color); + $graph->yaxis->SetColor($this->axis_color, $this->font_color); + $graph->yaxis->SetTickSide(SIDE_LEFT); + $graph->yaxis->SetLabelMargin(8); + $graph->yaxis->HideLine(); + $graph->yaxis->HideTicks(); + $graph->xaxis->SetTitleMargin(15); + + // y2~ + if (isset($graph->y2axis)) { + $graph->y2axis->title->SetColor($this->font_color); + $graph->y2axis->SetColor($this->axis_color, $this->font_color); + $graph->y2axis->SetTickSide(SIDE_LEFT); + $graph->y2axis->SetLabelMargin(8); + $graph->y2axis->HideLine(); + $graph->y2axis->HideTicks(); + } + + // yn + if (isset($graph->y2axis)) { + foreach ($graph->ynaxis as $axis) { + $axis->title->SetColor($this->font_color); + $axis->SetColor($this->axis_color, $this->font_color); + $axis->SetTickSide(SIDE_LEFT); + $axis->SetLabelMargin(8); + $axis->HideLine(); + $axis->HideTicks(); + } + } + + // grid + $graph->ygrid->SetColor($this->grid_color); + $graph->ygrid->SetLineStyle('dotted'); + $graph->ygrid->SetFill(true, '#FFFFFF', $this->background_color); + $graph->xgrid->Show(); + $graph->xgrid->SetColor($this->grid_color); + $graph->xgrid->SetLineStyle('dotted'); + + // font + $graph->title->SetColor($this->font_color); + $graph->subtitle->SetColor($this->font_color); + $graph->subsubtitle->SetColor($this->font_color); + + // $graph->img->SetAntiAliasing(); + } + + public function SetupPieGraph($graph) + { + + // graph + $graph->SetFrame(false); + + // title + $graph->title->SetColor($this->font_color); + $graph->subtitle->SetColor($this->font_color); + $graph->subsubtitle->SetColor($this->font_color); + + $graph->SetAntiAliasing(); + } + + public function PreStrokeApply($graph) + { + if ($graph->legend->HasItems()) { + $img = $graph->img; + $graph->SetMargin($img->left_margin, $img->right_margin, $img->top_margin, $img->height * 0.25); + // $graph->SetMargin(200, $img->right_margin, $img->top_margin, $height * 0.25); + } + } + + public function ApplyPlot($plot) + { + + switch (get_class($plot)) { + case 'BarPlot': + { + $plot->Clear(); + + $color = $this->GetNextColor(); + $plot->SetColor($color); + $plot->SetFillColor($color); + $plot->SetShadow('red', 3, 4, false); + $plot->value->SetAlign('center', 'center'); + break; + } + + case 'LinePlot': + { + $plot->Clear(); + + $plot->SetColor($this->GetNextColor()); + $plot->SetWeight(2); + // $plot->SetBarCenter(); + break; + } + + case 'PiePlot': + { + $plot->ShowBorder(false); + $plot->SetSliceColors($this->GetThemeColors()); + break; + } + + case 'GroupBarPlot': + { + foreach ($plot->plots as $_plot) { + $this->ApplyPlot($_plot); + } + break; + } + + case 'AccBarPlot': + { + $plot->value->SetAlign('center', 'center'); + foreach ($plot->plots as $_plot) { + $this->ApplyPlot($_plot); + $_plot->SetValuePos('center'); + } + break; + } + + case 'ScatterPlot': + { + break; + } + + case 'PiePlot3D': + { + $plot->SetSliceColors($this->GetThemeColors()); + break; + } + + default: + { + } + } + } +} diff --git a/vendor/amenadiel/jpgraph/src/themes/Theme.php b/vendor/amenadiel/jpgraph/src/themes/Theme.php new file mode 100644 index 0000000000..230797ce37 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/themes/Theme.php @@ -0,0 +1,142 @@ +color_index = 0; + } + + /** + * + */ + abstract public function GetColorList(); + + /** + * + */ + abstract public function ApplyPlot($plot); + + /** + * + */ + public function SetupPlot($plot) + { + if (is_array($plot)) { + foreach ($plot as $obj) { + $this->ApplyPlot($obj); + } + } else { + $this->ApplyPlot($plot); + } + } + + /** + * + */ + public function ApplyGraph($graph) + { + + $this->graph = $graph; + $method_name = ''; + $graphClass = explode('\\', get_class($graph)); + $classname = end($graphClass); + + if ($classname == 'Graph') { + $method_name = 'SetupGraph'; + } else { + $method_name = 'Setup' . $classname; + } + + if (method_exists($this, $method_name)) { + $this->$method_name($graph); + } else { + Util\JpGraphError::RaiseL(30001, $method_name, $method_name); //Theme::%s() is not defined. \nPlease make %s(\$graph) function in your theme classs. + } + } + + /** + * + */ + public function PreStrokeApply($graph) + { + } + + /** + * + */ + public function GetThemeColors($num = 30) + { + $result_list = array(); + + $old_index = $this->color_index; + $this->color_index = 0; + $count = 0; + + $i = 0; + while (true) { + for ($j = 0; $j < count($this->GetColorList()); $j++) { + if (++$count > $num) { + break 2; + } + $result_list[] = $this->GetNextColor(); + } + $i++; + } + + $this->color_index = $old_index; + + return $result_list; + } + + /** + * + */ + public function GetNextColor() + { + $color_list = $this->GetColorList(); + + $color = null; + if (isset($color_list[$this->color_index])) { + $color = $color_list[$this->color_index]; + } else { + $color_count = count($color_list); + if ($color_count <= $this->color_index) { + $color_tmp = $color_list[$this->color_index % $color_count]; + $brightness = 1.0 - intval($this->color_index / $color_count) * 0.2; + $rgb = new RGB(); + $color = $color_tmp . ':' . $brightness; + $color = $rgb->Color($color); + $alpha = array_pop($color); + $color = $rgb->tryHexConversion($color); + if ($alpha) { + $color .= '@' . $alpha; + } + } + } + + $this->color_index++; + + return $color; + } + +} // Class diff --git a/vendor/amenadiel/jpgraph/src/themes/UniversalTheme.php b/vendor/amenadiel/jpgraph/src/themes/UniversalTheme.php new file mode 100644 index 0000000000..26a18be8c2 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/themes/UniversalTheme.php @@ -0,0 +1,187 @@ +img; + $height = $img->height; + $graph->SetMargin($img->left_margin, $img->right_margin, $img->top_margin, $height * 0.25); + */ + $graph->SetFrame(false); + $graph->SetMarginColor('white'); + $graph->SetBox(true, '#DADADA'); + // $graph->SetBackgroundGradient($this->background_color, '#FFFFFF', GRAD_HOR, BGRAD_PLOT); + + // legend + $graph->legend->SetFrameWeight(0); + $graph->legend->Pos(0.5, 0.85, 'center', 'top'); + $graph->legend->SetFillColor('white'); + $graph->legend->SetLayout(LEGEND_HOR); + $graph->legend->SetColumns(3); + $graph->legend->SetShadow(false); + $graph->legend->SetMarkAbsSize(5); + + // xaxis + $graph->xaxis->title->SetColor($this->font_color); + $graph->xaxis->SetColor($this->axis_color, $this->font_color); + $graph->xaxis->SetTickSide(SIDE_BOTTOM); + $graph->xaxis->SetLabelMargin(10); + $graph->xaxis->HideTicks(); + $graph->xaxis->SetTitleMargin(15); + //$graph->xaxis->SetLabelMargin(30); + + // yaxis + $graph->yaxis->title->SetColor($this->font_color); + $graph->yaxis->SetColor($this->axis_color, $this->font_color); + $graph->yaxis->SetTickSide(SIDE_LEFT); + $graph->yaxis->SetLabelMargin(8); + // $graph->yaxis->SetTickPositions(array(50, 100, 150)); + // $graph->yaxis->HideLine(); + $graph->yaxis->HideTicks(); + + // grid + $graph->ygrid->SetColor($this->grid_color); + $graph->ygrid->SetFill(true, '#FFFFFF', $this->background_color); + // $graph->ygrid->SetLineStyle('dotted'); + + // font + $graph->title->SetColor($this->font_color); + $graph->subtitle->SetColor($this->font_color); + $graph->subsubtitle->SetColor($this->font_color); + + $graph->img->SetAntiAliasing(); + } + + public function SetupPieGraph($graph) + { + + // graph + $graph->SetFrame(false); + + // legend + $graph->legend->SetFillColor('white'); + + $graph->legend->SetFrameWeight(0); + $graph->legend->Pos(0.5, 0.80, 'center', 'top'); + $graph->legend->SetLayout(LEGEND_HOR); + $graph->legend->SetColumns(4); + + $graph->legend->SetShadow(false); + $graph->legend->SetMarkAbsSize(5); + + // title + $graph->title->SetColor($this->font_color); + $graph->subtitle->SetColor($this->font_color); + $graph->subsubtitle->SetColor($this->font_color); + + $graph->SetAntiAliasing(); + } + + public function PreStrokeApply($graph) + { + if ($graph->legend->HasItems()) { + $img = $graph->img; + $height = $img->height; + $graph->SetMargin( + $img->raw_left_margin, + $img->raw_right_margin, + $img->raw_top_margin, + $height * 0.25 + ); + } + } + + public function ApplyPlot($plot) + { + + switch (get_class($plot)) { + case 'GroupBarPlot': + { + foreach ($plot->plots as $_plot) { + $this->ApplyPlot($_plot); + } + break; + } + + case 'AccBarPlot': + { + foreach ($plot->plots as $_plot) { + $this->ApplyPlot($_plot); + } + break; + } + + case 'BarPlot': + { + $plot->Clear(); + + $color = $this->GetNextColor(); + $plot->SetColor($color); + $plot->SetFillColor($color); + $plot->SetShadow('red', 3, 4, false); + break; + } + + case 'LinePlot': + { + $plot->Clear(); + $plot->SetColor($this->GetNextColor() . '@0.4'); + $plot->SetWeight(2); + break; + } + + case 'PiePlot': + { + $plot->SetCenter(0.5, 0.45); + $plot->ShowBorder(false); + $plot->SetSliceColors($this->GetThemeColors()); + break; + } + + case 'PiePlot3D': + { + $plot->SetSliceColors($this->GetThemeColors()); + break; + } + + default: + { + } + } + } +} diff --git a/vendor/amenadiel/jpgraph/src/themes/VividTheme.php b/vendor/amenadiel/jpgraph/src/themes/VividTheme.php new file mode 100644 index 0000000000..a368f0cf13 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/themes/VividTheme.php @@ -0,0 +1,174 @@ +img; + $height = $img->height; + $graph->SetMargin($img->left_margin, $img->right_margin, $img->top_margin, $height * 0.25); + */ + $graph->SetFrame(false); + $graph->SetMarginColor('white'); + $graph->SetBackgroundGradient($this->background_color, '#FFFFFF', GRAD_HOR, BGRAD_PLOT); + + // legend + $graph->legend->SetFrameWeight(0); + $graph->legend->Pos(0.5, 0.85, 'center', 'top'); + $graph->legend->SetFillColor('white'); + $graph->legend->SetLayout(LEGEND_HOR); + $graph->legend->SetColumns(3); + $graph->legend->SetShadow(false); + $graph->legend->SetMarkAbsSize(5); + + // xaxis + $graph->xaxis->title->SetColor($this->font_color); + $graph->xaxis->SetColor($this->axis_color, $this->font_color); + $graph->xaxis->SetTickSide(SIDE_BOTTOM); + $graph->xaxis->SetLabelMargin(10); + + // yaxis + $graph->yaxis->title->SetColor($this->font_color); + $graph->yaxis->SetColor($this->axis_color, $this->font_color); + $graph->yaxis->SetTickSide(SIDE_LEFT); + $graph->yaxis->SetLabelMargin(8); + $graph->yaxis->HideLine(); + $graph->yaxis->HideTicks(); + $graph->xaxis->SetTitleMargin(15); + + // grid + $graph->ygrid->SetColor($this->grid_color); + $graph->ygrid->SetLineStyle('dotted'); + + // font + $graph->title->SetColor($this->font_color); + $graph->subtitle->SetColor($this->font_color); + $graph->subsubtitle->SetColor($this->font_color); + + // $graph->img->SetAntiAliasing(); + } + + public function SetupPieGraph($graph) + { + + // graph + $graph->SetFrame(false); + + // legend + $graph->legend->SetFillColor('white'); + + $graph->legend->SetFrameWeight(0); + $graph->legend->Pos(0.5, 0.80, 'center', 'top'); + $graph->legend->SetLayout(LEGEND_HOR); + $graph->legend->SetColumns(4); + + $graph->legend->SetShadow(false); + $graph->legend->SetMarkAbsSize(5); + + // title + $graph->title->SetColor($this->font_color); + $graph->subtitle->SetColor($this->font_color); + $graph->subsubtitle->SetColor($this->font_color); + + $graph->SetAntiAliasing(); + } + + public function PreStrokeApply($graph) + { + if ($graph->legend->HasItems()) { + $img = $graph->img; + $height = $img->height; + $graph->SetMargin($img->left_margin, $img->right_margin, $img->top_margin, $height * 0.25); + } + } + + public function ApplyPlot($plot) + { + + switch (get_class($plot)) { + case 'GroupBarPlot': + { + foreach ($plot->plots as $_plot) { + $this->ApplyPlot($_plot); + } + break; + } + + case 'AccBarPlot': + { + foreach ($plot->plots as $_plot) { + $this->ApplyPlot($_plot); + } + break; + } + + case 'BarPlot': + { + $plot->Clear(); + + $color = $this->GetNextColor(); + $plot->SetColor($color); + $plot->SetFillColor($color); + $plot->SetShadow('red', 3, 4, false); + break; + } + + case 'LinePlot': + { + $plot->Clear(); + $plot->SetColor($this->GetNextColor() . '@0.4'); + $plot->SetWeight(2); + // $plot->SetBarCenter(); + break; + } + + case 'PiePlot': + { + $plot->SetCenter(0.5, 0.45); + $plot->ShowBorder(false); + $plot->SetSliceColors($this->GetThemeColors()); + break; + } + + case 'PiePlot3D': + { + $plot->SetSliceColors($this->GetThemeColors()); + break; + } + + default: + { + } + } + } +} diff --git a/vendor/amenadiel/jpgraph/src/util/Bezier.php b/vendor/amenadiel/jpgraph/src/util/Bezier.php new file mode 100644 index 0000000000..c351a58275 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/util/Bezier.php @@ -0,0 +1,112 @@ +n = count($datax); + if ($this->n !== count($datay)) { + JpGraphError::RaiseL(19003); + //('Bezier: Number of X and Y coordinates must be the same'); + } + $idx = 0; + foreach ($datax as $datumx) { + for ($i = 0; $i < $attraction_factor; $i++) { + $this->datax[$idx++] = $datumx; + } + } + $idx = 0; + foreach ($datay as $datumy) { + for ($i = 0; $i < $attraction_factor; $i++) { + $this->datay[$idx++] = $datumy; + } + } + $this->n *= $attraction_factor; + } + + /** + * Return a set of data points that specifies the bezier curve with $steps points + * @param $steps Number of new points to return + * @return array($datax, $datay) + */ + public function Get($steps) + { + $datax = array(); + $datay = array(); + for ($i = 0; $i < $steps; $i++) { + list($datumx, $datumy) = $this->GetPoint((double) $i / (double) $steps); + $datax[$i] = $datumx; + $datay[$i] = $datumy; + } + + $datax[] = end($this->datax); + $datay[] = end($this->datay); + + return array($datax, $datay); + } + + /** + * Return one point on the bezier curve. $mu is the position on the curve where $mu is in the + * range 0 $mu < 1 where 0 is tha start point and 1 is the end point. Note that every newly computed + * point depends on all the existing points + * + * @param $mu Position on the bezier curve + * @return array($x, $y) + */ + public function GetPoint($mu) + { + $n = $this->n - 1; + $k = 0; + $kn = 0; + $nn = 0; + $nkn = 0; + $blend = 0.0; + $newx = 0.0; + $newy = 0.0; + + $muk = 1.0; + $munk = (double) pow(1 - $mu, (double) $n); + + for ($k = 0; $k <= $n; $k++) { + $nn = $n; + $kn = $k; + $nkn = $n - $k; + $blend = $muk * $munk; + $muk *= $mu; + $munk /= (1 - $mu); + while ($nn >= 1) { + $blend *= $nn; + $nn--; + if ($kn > 1) { + $blend /= (double) $kn; + $kn--; + } + if ($nkn > 1) { + $blend /= (double) $nkn; + $nkn--; + } + } + $newx += $this->datax[$k] * $blend; + $newy += $this->datay[$k] * $blend; + } + + return array($newx, $newy); + } +} diff --git a/vendor/amenadiel/jpgraph/src/util/ColorFactory.php b/vendor/amenadiel/jpgraph/src/util/ColorFactory.php new file mode 100644 index 0000000000..d35ac0cda5 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/util/ColorFactory.php @@ -0,0 +1,55 @@ += ColorFactory::$iNum) { + ColorFactory::$iIdx = 0; + } + + return ColorFactory::$iColorList[ColorFactory::$iIdx++]; + } + +} diff --git a/vendor/amenadiel/jpgraph/src/util/DateLocale.php b/vendor/amenadiel/jpgraph/src/util/DateLocale.php new file mode 100644 index 0000000000..07e968cb78 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/util/DateLocale.php @@ -0,0 +1,98 @@ +iDayAbb, 'array'); + settype($this->iShortDay, 'array'); + settype($this->iShortMonth, 'array'); + settype($this->iMonthName, 'array'); + $this->Set('C'); + } + + public function Set($aLocale) + { + if (in_array($aLocale, array_keys($this->iDayAbb))) { + $this->iLocale = $aLocale; + return true; // already cached nothing else to do! + } + + $pLocale = setlocale(LC_TIME, 0); // get current locale for LC_TIME + + if (is_array($aLocale)) { + foreach ($aLocale as $loc) { + $res = @setlocale(LC_TIME, $loc); + if ($res) { + $aLocale = $loc; + break; + } + } + } else { + $res = @setlocale(LC_TIME, $aLocale); + } + + if (!$res) { + JpGraphError::RaiseL(25007, $aLocale); + //("You are trying to use the locale ($aLocale) which your PHP installation does not support. Hint: Use '' to indicate the default locale for this geographic region."); + return false; + } + + $this->iLocale = $aLocale; + for ($i = 0, $ofs = 0 - strftime('%w'); $i < 7; $i++, $ofs++) { + $day = strftime('%a', strtotime("$ofs day")); + $day[0] = strtoupper($day[0]); + $this->iDayAbb[$aLocale][] = $day[0]; + $this->iShortDay[$aLocale][] = $day; + } + + for ($i = 1; $i <= 12; ++$i) { + list($short, $full) = explode('|', strftime("%b|%B", strtotime("2001-$i-01"))); + $this->iShortMonth[$aLocale][] = ucfirst($short); + $this->iMonthName[$aLocale][] = ucfirst($full); + } + + setlocale(LC_TIME, $pLocale); + + return true; + } + + public function GetDayAbb() + { + return $this->iDayAbb[$this->iLocale]; + } + + public function GetShortDay() + { + return $this->iShortDay[$this->iLocale]; + } + + public function GetShortMonth() + { + return $this->iShortMonth[$this->iLocale]; + } + + public function GetShortMonthName($aNbr) + { + return $this->iShortMonth[$this->iLocale][$aNbr]; + } + + public function GetLongMonthName($aNbr) + { + return $this->iMonthName[$this->iLocale][$aNbr]; + } + + public function GetMonth() + { + return $this->iMonthName[$this->iLocale]; + } +} diff --git a/vendor/amenadiel/jpgraph/src/util/DateScaleUtils.php b/vendor/amenadiel/jpgraph/src/util/DateScaleUtils.php new file mode 100644 index 0000000000..babe21a0d4 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/util/DateScaleUtils.php @@ -0,0 +1,369 @@ + self::$endmonth)) { + self::$minTickPositions[$j++] = mktime(0, 0, 0, $m, 1, $y); + } + ++$m; + } + $m = 1; + } + self::$tickPositions[$i++] = mktime(0, 0, 0, 1, 1, $y); + } + break; + case DSUTILS_YEAR2: + $y = self::$startyear; + while ($y <= self::$endyear) { + self::$tickPositions[$i++] = mktime(0, 0, 0, 1, 1, $y); + for ($k = 0; $k < 1; ++$k) { + ++$y; + if ($aMinor) { + self::$minTickPositions[$j++] = mktime(0, 0, 0, 1, 1, $y); + } + } + ++$y; + } + break; + case DSUTILS_YEAR5: + $y = self::$startyear; + while ($y <= self::$endyear) { + self::$tickPositions[$i++] = mktime(0, 0, 0, 1, 1, $y); + for ($k = 0; $k < 4; ++$k) { + ++$y; + if ($aMinor) { + self::$minTickPositions[$j++] = mktime(0, 0, 0, 1, 1, $y); + } + } + ++$y; + } + break; + } + } + + public static function doDaily($aType, $aMinor = false) + { + $m = self::$startmonth; + $y = self::$startyear; + $d = self::$startday; + $h = self::$starthour; + $i = 0; + $j = 0; + + if ($h == 0) { + self::$tickPositions[$i++] = mktime(0, 0, 0, $m, $d, $y); + } + $t = mktime(0, 0, 0, $m, $d, $y); + + switch ($aType) { + case DSUTILS_DAY1: + while ($t <= self::$iMax) { + $t = strtotime('+1 day', $t); + self::$tickPositions[$i++] = $t; + if ($aMinor) { + self::$minTickPositions[$j++] = strtotime('+12 hours', $t); + } + } + break; + case DSUTILS_DAY2: + while ($t <= self::$iMax) { + $t = strtotime('+1 day', $t); + if ($aMinor) { + self::$minTickPositions[$j++] = $t; + } + $t = strtotime('+1 day', $t); + self::$tickPositions[$i++] = $t; + } + break; + case DSUTILS_DAY4: + while ($t <= self::$iMax) { + for ($k = 0; $k < 3; ++$k) { + $t = strtotime('+1 day', $t); + if ($aMinor) { + self::$minTickPositions[$j++] = $t; + } + } + $t = strtotime('+1 day', $t); + self::$tickPositions[$i++] = $t; + } + break; + } + } + + public static function doWeekly($aType, $aMinor = false) + { + $hpd = 3600 * 24; + $hpw = 3600 * 24 * 7; + // Find out week number of min date + $thursday = self::$iMin + $hpd * (3 - (date('w', self::$iMin) + 6) % 7); + $week = 1 + (date('z', $thursday) - (11 - date('w', mktime(0, 0, 0, 1, 1, date('Y', $thursday)))) % 7) / 7; + $daynumber = date('w', self::$iMin); + if ($daynumber == 0) { + $daynumber = 7; + } + + $m = self::$startmonth; + $y = self::$startyear; + $d = self::$startday; + $i = 0; + $j = 0; + // The assumption is that the weeks start on Monday. If the first day + // is later in the week then the first week tick has to be on the following + // week. + if ($daynumber == 1) { + self::$tickPositions[$i++] = mktime(0, 0, 0, $m, $d, $y); + $t = mktime(0, 0, 0, $m, $d, $y) + $hpw; + } else { + $t = mktime(0, 0, 0, $m, $d, $y) + $hpd * (8 - $daynumber); + } + + switch ($aType) { + case DSUTILS_WEEK1: + $cnt = 0; + break; + case DSUTILS_WEEK2: + $cnt = 1; + break; + case DSUTILS_WEEK4: + $cnt = 3; + break; + } + while ($t <= self::$iMax) { + self::$tickPositions[$i++] = $t; + for ($k = 0; $k < $cnt; ++$k) { + $t += $hpw; + if ($aMinor) { + self::$minTickPositions[$j++] = $t; + } + } + $t += $hpw; + } + } + + public static function doMonthly($aType, $aMinor = false) + { + $monthcount = 0; + $m = self::$startmonth; + $y = self::$startyear; + $i = 0; + $j = 0; + + // Skip the first month label if it is before the startdate + if (self::$startday == 1) { + self::$tickPositions[$i++] = mktime(0, 0, 0, $m, 1, $y); + $monthcount = 1; + } + if ($aType == 1) { + if (self::$startday < 15) { + self::$minTickPositions[$j++] = mktime(0, 0, 0, $m, 15, $y); + } + } + ++$m; + + // Loop through all the years included in the scale + for ($y = self::$startyear; $y <= self::$endyear; ++$y) { + // Loop through all the months. There are three cases to consider: + // 1. We are in the first year and must start with the startmonth + // 2. We are in the end year and we must stop at last month of the scale + // 3. A year in between where we run through all the 12 months + $stopmonth = $y == self::$endyear ? self::$endmonth : 12; + while ($m <= $stopmonth) { + switch ($aType) { + case DSUTILS_MONTH1: + // Set minor tick at the middle of the month + if ($aMinor) { + if ($m <= $stopmonth) { + if (!($y == self::$endyear && $m == $stopmonth && self::$endday < 15)) { + self::$minTickPositions[$j++] = mktime(0, 0, 0, $m, 15, $y); + } + + } + } + // Major at month + // Get timestamp of first hour of first day in each month + self::$tickPositions[$i++] = mktime(0, 0, 0, $m, 1, $y); + + break; + case DSUTILS_MONTH2: + if ($aMinor) { + // Set minor tick at start of each month + self::$minTickPositions[$j++] = mktime(0, 0, 0, $m, 1, $y); + } + + // Major at every second month + // Get timestamp of first hour of first day in each month + if ($monthcount % 2 == 0) { + self::$tickPositions[$i++] = mktime(0, 0, 0, $m, 1, $y); + } + break; + case DSUTILS_MONTH3: + if ($aMinor) { + // Set minor tick at start of each month + self::$minTickPositions[$j++] = mktime(0, 0, 0, $m, 1, $y); + } + // Major at every third month + // Get timestamp of first hour of first day in each month + if ($monthcount % 3 == 0) { + self::$tickPositions[$i++] = mktime(0, 0, 0, $m, 1, $y); + } + break; + case DSUTILS_MONTH6: + if ($aMinor) { + // Set minor tick at start of each month + self::$minTickPositions[$j++] = mktime(0, 0, 0, $m, 1, $y); + } + // Major at every third month + // Get timestamp of first hour of first day in each month + if ($monthcount % 6 == 0) { + self::$tickPositions[$i++] = mktime(0, 0, 0, $m, 1, $y); + } + break; + } + ++$m; + ++$monthcount; + } + $m = 1; + } + + // For the case where all dates are within the same month + // we want to make sure we have at least two ticks on the scale + // since the scale want work properly otherwise + if (self::$startmonth == self::$endmonth && self::$startyear == self::$endyear && $aType == 1) { + self::$tickPositions[$i++] = mktime(0, 0, 0, self::$startmonth + 1, 1, self::$startyear); + } + + return array(self::$tickPositions, self::$minTickPositions); + } + + public static function GetTicks($aData, $aType = 1, $aMinor = false, $aEndPoints = false) + { + $n = count($aData); + return self::GetTicksFromMinMax($aData[0], $aData[$n - 1], $aType, $aMinor, $aEndPoints); + } + + public static function GetAutoTicks($aMin, $aMax, $aMaxTicks = 10, $aMinor = false) + { + $diff = $aMax - $aMin; + $spd = 3600 * 24; + $spw = $spd * 7; + $spm = $spd * 30; + $spy = $spd * 352; + + if (self::$iUseWeeks) { + $w = 'W'; + } else { + $w = 'd M'; + } + + // Decision table for suitable scales + // First value: Main decision point + // Second value: Array of formatting depending on divisor for wanted max number of ticks. ,.. + $tt = array( + array($spw, array(1, DSUTILS_DAY1, 'd M', 2, DSUTILS_DAY2, 'd M', -1, DSUTILS_DAY4, 'd M')), + array($spm, array(1, DSUTILS_DAY1, 'd M', 2, DSUTILS_DAY2, 'd M', 4, DSUTILS_DAY4, 'd M', 7, DSUTILS_WEEK1, $w, -1, DSUTILS_WEEK2, $w)), + array($spy, array(1, DSUTILS_DAY1, 'd M', 2, DSUTILS_DAY2, 'd M', 4, DSUTILS_DAY4, 'd M', 7, DSUTILS_WEEK1, $w, 14, DSUTILS_WEEK2, $w, 30, DSUTILS_MONTH1, 'M', 60, DSUTILS_MONTH2, 'M', -1, DSUTILS_MONTH3, 'M')), + array(-1, array(30, DSUTILS_MONTH1, 'M-Y', 60, DSUTILS_MONTH2, 'M-Y', 90, DSUTILS_MONTH3, 'M-Y', 180, DSUTILS_MONTH6, 'M-Y', 352, DSUTILS_YEAR1, 'Y', 704, DSUTILS_YEAR2, 'Y', -1, DSUTILS_YEAR5, 'Y'))); + + $ntt = count($tt); + $nd = floor($diff / $spd); + for ($i = 0; $i < $ntt; ++$i) { + if ($diff <= $tt[$i][0] || $i == $ntt - 1) { + $t = $tt[$i][1]; + $n = count($t) / 3; + for ($j = 0; $j < $n; ++$j) { + if ($nd / $t[3 * $j] <= $aMaxTicks || $j == $n - 1) { + $type = $t[3 * $j + 1]; + $fs = $t[3 * $j + 2]; + list($tickPositions, $minTickPositions) = self::GetTicksFromMinMax($aMin, $aMax, $type, $aMinor); + return array($fs, $tickPositions, $minTickPositions, $type); + } + } + } + } + } + + public static function GetTicksFromMinMax($aMin, $aMax, $aType, $aMinor = false, $aEndPoints = false) + { + self::$starthour = date('G', $aMin); + self::$startmonth = date('n', $aMin); + self::$startday = date('j', $aMin); + self::$startyear = date('Y', $aMin); + self::$endmonth = date('n', $aMax); + self::$endyear = date('Y', $aMax); + self::$endday = date('j', $aMax); + self::$iMin = $aMin; + self::$iMax = $aMax; + + if ($aType <= DSUTILS_MONTH6) { + self::doMonthly($aType, $aMinor); + } elseif ($aType <= DSUTILS_WEEK4) { + self::doWeekly($aType, $aMinor); + } elseif ($aType <= DSUTILS_DAY4) { + self::doDaily($aType, $aMinor); + } elseif ($aType <= DSUTILS_YEAR5) { + self::doYearly($aType, $aMinor); + } else { + JpGraphError::RaiseL(24003); + } + // put a label at the very left data pos + if ($aEndPoints) { + $tickPositions[$i++] = $aData[0]; + } + + // put a label at the very right data pos + if ($aEndPoints) { + $tickPositions[$i] = $aData[$n - 1]; + } + + return array(self::$tickPositions, self::$minTickPositions); + } +} diff --git a/vendor/amenadiel/jpgraph/src/util/ErrMsgText.php b/vendor/amenadiel/jpgraph/src/util/ErrMsgText.php new file mode 100644 index 0000000000..25980d6bbc --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/util/ErrMsgText.php @@ -0,0 +1,107 @@ +lt = $_jpg_messages; + } + + public function Get($errnbr, $a1 = null, $a2 = null, $a3 = null, $a4 = null, $a5 = null) + { + global $__jpg_err_locale; + if (!isset($this->lt[$errnbr])) { + return 'Internal error: The specified error message (' . $errnbr . ') does not exist in the chosen locale (' . $__jpg_err_locale . ')'; + } + $ea = $this->lt[$errnbr]; + $j = 0; + if ($a1 !== null) { + $argv[$j++] = $a1; + if ($a2 !== null) { + $argv[$j++] = $a2; + if ($a3 !== null) { + $argv[$j++] = $a3; + if ($a4 !== null) { + $argv[$j++] = $a4; + if ($a5 !== null) { + $argv[$j++] = $a5; + } + } + } + } + } + $numargs = $j; + if ($ea[1] != $numargs) { + // Error message argument count do not match. + // Just return the error message without arguments. + return $ea[0]; + } + switch ($numargs) { + case 1: + $msg = sprintf($ea[0], $argv[0]); + break; + case 2: + $msg = sprintf($ea[0], $argv[0], $argv[1]); + break; + case 3: + $msg = sprintf($ea[0], $argv[0], $argv[1], $argv[2]); + break; + case 4: + $msg = sprintf($ea[0], $argv[0], $argv[1], $argv[2], $argv[3]); + break; + case 5: + $msg = sprintf($ea[0], $argv[0], $argv[1], $argv[2], $argv[3], $argv[4]); + break; + case 0: + default: + $msg = sprintf($ea[0]); + break; + } + return $msg; + } +} + +// Setup the default handler +global $__jpg_OldHandler; +$__jpg_OldHandler = set_exception_handler(array('Amenadiel\JpGraph\Util\JpGraphException', 'defaultHandler')); + +if (!USE_IMAGE_ERROR_HANDLER) { + JpGraphError::SetImageFlag(false); +} diff --git a/vendor/amenadiel/jpgraph/src/util/FlagCache.php b/vendor/amenadiel/jpgraph/src/util/FlagCache.php new file mode 100644 index 0000000000..fbd705d731 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/util/FlagCache.php @@ -0,0 +1,26 @@ + null, + 2 => null, + 3 => null, + 4 => null, +); +// Only supposed to b called as statics +class FlagCache +{ + + public static function GetFlagImgByName($aSize, $aName) + { + global $_gFlagCache; + require_once 'jpgraph_flags.php'; + if ($_gFlagCache[$aSize] === null) { + $_gFlagCache[$aSize] = new FlagImages($aSize); + } + $f = $_gFlagCache[$aSize]; + $idx = $f->GetIdxByName($aName, $aFullName); + return $f->GetImgByIdx($idx); + } +} diff --git a/vendor/amenadiel/jpgraph/src/util/FuncGenerator.php b/vendor/amenadiel/jpgraph/src/util/FuncGenerator.php new file mode 100644 index 0000000000..c3b67399ef --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/util/FuncGenerator.php @@ -0,0 +1,55 @@ +iFunc = $aFunc; + $this->iXFunc = $aXFunc; + } + + public function E($aXMin, $aXMax, $aSteps = 50) + { + $this->iMin = $aXMin; + $this->iMax = $aXMax; + $this->iStepSize = ($aXMax - $aXMin) / $aSteps; + + if ($this->iXFunc != '') { + $t = 'for($i=' . $aXMin . '; $i<=' . $aXMax . '; $i += ' . $this->iStepSize . ') {$ya[]=' . $this->iFunc . ';$xa[]=' . $this->iXFunc . ';}'; + } elseif ($this->iFunc != '') { + $t = 'for($x=' . $aXMin . '; $x<=' . $aXMax . '; $x += ' . $this->iStepSize . ') {$ya[]=' . $this->iFunc . ';$xa[]=$x;} $x=' . $aXMax . ';$ya[]=' . $this->iFunc . ';$xa[]=$x;'; + } else { + JpGraphError::RaiseL(24001); + } + //('FuncGenerator : No function specified. '); + + @eval($t); + + // If there is an error in the function specifcation this is the only + // way we can discover that. + if (empty($xa) || empty($ya)) { + JpGraphError::RaiseL(24002); + } + //('FuncGenerator : Syntax error in function specification '); + + return array($xa, $ya); + } +} diff --git a/vendor/amenadiel/jpgraph/src/util/GanttConstraint.php b/vendor/amenadiel/jpgraph/src/util/GanttConstraint.php new file mode 100644 index 0000000000..6cba2c4b50 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/util/GanttConstraint.php @@ -0,0 +1,26 @@ +iConstrainType = $aType; + $this->iConstrainRow = $aRow; + $this->iConstrainColor = $aColor; + $this->iConstrainArrowSize = $aArrowSize; + $this->iConstrainArrowType = $aArrowType; + } +} diff --git a/vendor/amenadiel/jpgraph/src/util/JpGraphErrObject.php b/vendor/amenadiel/jpgraph/src/util/JpGraphErrObject.php new file mode 100644 index 0000000000..dfcb99912b --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/util/JpGraphErrObject.php @@ -0,0 +1,61 @@ +iTitle = $aTitle; + } + + public function SetStrokeDest($aDest) + { + $this->iDest = $aDest; + } + + // If aHalt is true then execution can't continue. Typical used for fatal errors + public function Raise($aMsg, $aHalt = false) + { + if ($this->iDest != '') { + if ($this->iDest == 'syslog') { + error_log($this->iTitle . $aMsg); + } else { + $str = '[' . date('r') . '] ' . $this->iTitle . $aMsg . "\n"; + $f = @fopen($this->iDest, 'a'); + if ($f) { + @fwrite($f, $str); + @fclose($f); + } + } + } else { + $aMsg = $this->iTitle . $aMsg; + // Check SAPI and if we are called from the command line + // send the error to STDERR instead + if (PHP_SAPI == 'cli') { + fwrite(STDERR, $aMsg); + } else { + echo $aMsg; + } + } + if ($aHalt) { + exit(1); + } + + } +} diff --git a/vendor/amenadiel/jpgraph/src/util/JpGraphErrObjectImg.php b/vendor/amenadiel/jpgraph/src/util/JpGraphErrObjectImg.php new file mode 100644 index 0000000000..aeaa218daa --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/util/JpGraphErrObjectImg.php @@ -0,0 +1,130 @@ +iTitle . ' ' . $aMsg); + } + + $aMsg = wordwrap($aMsg, 55); + $lines = substr_count($aMsg, "\n"); + + // Create the error icon GD + $erricon = Image\Image::CreateFromString(base64_decode($img_iconerror)); + + // Create an image that contains the error text. + $w = 400; + $h = 100 + 15 * max(0, $lines - 3); + + $img = new Image\Image($w, $h); + + // Drop shadow + $img->SetColor("gray"); + $img->FilledRectangle(5, 5, $w - 1, $h - 1, 10); + $img->SetColor("gray:0.7"); + $img->FilledRectangle(5, 5, $w - 3, $h - 3, 10); + + // Window background + $img->SetColor("lightblue"); + $img->FilledRectangle(1, 1, $w - 5, $h - 5); + $img->CopyCanvasH($img->img, $erricon, 5, 30, 0, 0, 40, 40); + + // Window border + $img->SetColor("black"); + $img->Rectangle(1, 1, $w - 5, $h - 5); + $img->Rectangle(0, 0, $w - 4, $h - 4); + + // Window top row + $img->SetColor("darkred"); + for ($y = 3; $y < 18; $y += 2) { + $img->Line(1, $y, $w - 6, $y); + } + + // "White shadow" + $img->SetColor("white"); + + // Left window edge + $img->Line(2, 2, 2, $h - 5); + $img->Line(2, 2, $w - 6, 2); + + // "Gray button shadow" + $img->SetColor("darkgray"); + + // Gray window shadow + $img->Line(2, $h - 6, $w - 5, $h - 6); + $img->Line(3, $h - 7, $w - 5, $h - 7); + + // Window title + $m = floor($w / 2 - 5); + $l = 110; + $img->SetColor("lightgray:1.3"); + $img->FilledRectangle($m - $l, 2, $m + $l, 16); + + // Stroke text + $img->SetColor("darkred"); + $img->SetFont(FF_FONT2, FS_BOLD); + $img->StrokeText($m - 90, 15, $this->iTitle); + $img->SetColor("black"); + $img->SetFont(FF_FONT1, FS_NORMAL); + $txt = new Text\Text($aMsg, 52, 25); + $txt->SetFont(FF_FONT1); + $txt->Align("left", "top"); + $txt->Stroke($img); + if ($this->iDest) { + $img->Stream($this->iDest); + } else { + $img->Headers(); + $img->Stream(); + } + if ($aHalt) { + die(); + } + + } +} diff --git a/vendor/amenadiel/jpgraph/src/util/JpGraphError.php b/vendor/amenadiel/jpgraph/src/util/JpGraphError.php new file mode 100644 index 0000000000..45784d23ac --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/util/JpGraphError.php @@ -0,0 +1,59 @@ +code}]: {$this->message} at " . basename($this->getFile()) . ":" . $this->getLine() . "\n" . $this->getTraceAsString() . "\n"; + } + + // custom representation of error as an image + public function Stroke() + { + if (JpGraphError::GetImageFlag()) { + $errobj = new JpGraphErrObjectImg(); + $errobj->SetTitle(JpGraphError::GetTitle()); + } else { + $errobj = new JpGraphErrObject(); + $errobj->SetTitle(JpGraphError::GetTitle()); + $errobj->SetStrokeDest(JpGraphError::GetLogFile()); + } + $errobj->Raise($this->getMessage()); + } + + public static function defaultHandler(\Exception $exception) + { + global $__jpg_OldHandler; + if ($exception instanceof JpGraphException) { + $exception->Stroke(); + } else { + // Restore old handler + if ($__jpg_OldHandler !== null) { + set_exception_handler($__jpg_OldHandler); + } + throw $exception; + } + } +} diff --git a/vendor/amenadiel/jpgraph/src/util/JpGraphExceptionL.php b/vendor/amenadiel/jpgraph/src/util/JpGraphExceptionL.php new file mode 100644 index 0000000000..86c6c283ff --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/util/JpGraphExceptionL.php @@ -0,0 +1,14 @@ +Get($errcode, $a1, $a2, $a3, $a4, $a5), 0); + } +} diff --git a/vendor/amenadiel/jpgraph/src/util/JpgTimer.php b/vendor/amenadiel/jpgraph/src/util/JpgTimer.php new file mode 100644 index 0000000000..6645114e74 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/util/JpgTimer.php @@ -0,0 +1,36 @@ +idx = 0; + } + + // Push a new timer start on stack + public function Push() + { + list($ms, $s) = explode(" ", microtime()); + $this->start[$this->idx++] = floor($ms * 1000) + 1000 * $s; + } + + // Pop the latest timer start and return the diff with the + // current time + public function Pop() + { + assert($this->idx > 0); + list($ms, $s) = explode(" ", microtime()); + $etime = floor($ms * 1000) + (1000 * $s); + $this->idx--; + return $etime - $this->start[$this->idx]; + } +} // Class diff --git a/vendor/amenadiel/jpgraph/src/util/LinearRegression.php b/vendor/amenadiel/jpgraph/src/util/LinearRegression.php new file mode 100644 index 0000000000..514a85eb6f --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/util/LinearRegression.php @@ -0,0 +1,100 @@ +ix = $aDataX; + $this->iy = $aDataY; + } + + public function Calc() + { + + $this->icalculated = true; + + $n = count($this->ix); + $sx2 = 0; + $sy2 = 0; + $sxy = 0; + $sx = 0; + $sy = 0; + + for ($i = 0; $i < $n; ++$i) { + $sx2 += $this->ix[$i] * $this->ix[$i]; + $sy2 += $this->iy[$i] * $this->iy[$i]; + $sxy += $this->ix[$i] * $this->iy[$i]; + $sx += $this->ix[$i]; + $sy += $this->iy[$i]; + } + + if ($n * $sx2 - $sx * $sx > __LR_EPSILON) { + $this->ib = ($n * $sxy - $sx * $sy) / ($n * $sx2 - $sx * $sx); + $this->ia = ($sy - $this->ib * $sx) / $n; + + $sx = $this->ib * ($sxy - $sx * $sy / $n); + $sy2 = $sy2 - $sy * $sy / $n; + $sy = $sy2 - $sx; + + $this->iDet = $sx / $sy2; + $this->iCorr = sqrt($this->iDet); + if ($n > 2) { + $this->iStdErr = sqrt($sy / ($n - 2)); + } else { + $this->iStdErr = NAN; + } + } else { + $this->ib = 0; + $this->ia = 0; + } + + } + + public function GetAB() + { + if ($this->icalculated == false) { + $this->Calc(); + } + + return array($this->ia, $this->ib); + } + + public function GetStat() + { + if ($this->icalculated == false) { + $this->Calc(); + } + + return array($this->iStdErr, $this->iCorr, $this->iDet); + } + + public function GetY($aMinX, $aMaxX, $aStep = 1) + { + if ($this->icalculated == false) { + $this->Calc(); + } + + $yy = array(); + $i = 0; + for ($x = $aMinX; $x <= $aMaxX; $x += $aStep) { + $xx[$i] = $x; + $yy[$i++] = $this->ia + $this->ib * $x; + } + + return array($xx, $yy); + } + +} diff --git a/vendor/amenadiel/jpgraph/src/util/RGB.php b/vendor/amenadiel/jpgraph/src/util/RGB.php new file mode 100644 index 0000000000..61110c690a --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/util/RGB.php @@ -0,0 +1,617 @@ +img = $aImg; + + // Conversion array between color names and RGB + $this->rgb_table = array( + 'aqua' => array(0, 255, 255), + 'lime' => array(0, 255, 0), + 'teal' => array(0, 128, 128), + 'whitesmoke' => array(245, 245, 245), + 'gainsboro' => array(220, 220, 220), + 'oldlace' => array(253, 245, 230), + 'linen' => array(250, 240, 230), + 'antiquewhite' => array(250, 235, 215), + 'papayawhip' => array(255, 239, 213), + 'blanchedalmond' => array(255, 235, 205), + 'bisque' => array(255, 228, 196), + 'peachpuff' => array(255, 218, 185), + 'navajowhite' => array(255, 222, 173), + 'moccasin' => array(255, 228, 181), + 'cornsilk' => array(255, 248, 220), + 'ivory' => array(255, 255, 240), + 'lemonchiffon' => array(255, 250, 205), + 'seashell' => array(255, 245, 238), + 'mintcream' => array(245, 255, 250), + 'azure' => array(240, 255, 255), + 'aliceblue' => array(240, 248, 255), + 'lavender' => array(230, 230, 250), + 'lavenderblush' => array(255, 240, 245), + 'mistyrose' => array(255, 228, 225), + 'white' => array(255, 255, 255), + 'black' => array(0, 0, 0), + 'darkslategray' => array(47, 79, 79), + 'dimgray' => array(105, 105, 105), + 'slategray' => array(112, 128, 144), + 'lightslategray' => array(119, 136, 153), + 'gray' => array(190, 190, 190), + 'lightgray' => array(211, 211, 211), + 'midnightblue' => array(25, 25, 112), + 'navy' => array(0, 0, 128), + 'indigo' => array(75, 0, 130), + 'electricindigo' => array(102, 0, 255), + 'deepindigo' => array(138, 43, 226), + 'pigmentindigo' => array(75, 0, 130), + 'indigodye' => array(0, 65, 106), + 'cornflowerblue' => array(100, 149, 237), + 'darkslateblue' => array(72, 61, 139), + 'slateblue' => array(106, 90, 205), + 'mediumslateblue' => array(123, 104, 238), + 'lightslateblue' => array(132, 112, 255), + 'mediumblue' => array(0, 0, 205), + 'royalblue' => array(65, 105, 225), + 'blue' => array(0, 0, 255), + 'dodgerblue' => array(30, 144, 255), + 'deepskyblue' => array(0, 191, 255), + 'skyblue' => array(135, 206, 235), + 'lightskyblue' => array(135, 206, 250), + 'steelblue' => array(70, 130, 180), + 'lightred' => array(211, 167, 168), + 'lightsteelblue' => array(176, 196, 222), + 'lightblue' => array(173, 216, 230), + 'powderblue' => array(176, 224, 230), + 'paleturquoise' => array(175, 238, 238), + 'darkturquoise' => array(0, 206, 209), + 'mediumturquoise' => array(72, 209, 204), + 'turquoise' => array(64, 224, 208), + 'cyan' => array(0, 255, 255), + 'lightcyan' => array(224, 255, 255), + 'cadetblue' => array(95, 158, 160), + 'mediumaquamarine' => array(102, 205, 170), + 'aquamarine' => array(127, 255, 212), + 'darkgreen' => array(0, 100, 0), + 'darkolivegreen' => array(85, 107, 47), + 'darkseagreen' => array(143, 188, 143), + 'seagreen' => array(46, 139, 87), + 'mediumseagreen' => array(60, 179, 113), + 'lightseagreen' => array(32, 178, 170), + 'palegreen' => array(152, 251, 152), + 'springgreen' => array(0, 255, 127), + 'lawngreen' => array(124, 252, 0), + 'green' => array(0, 255, 0), + 'chartreuse' => array(127, 255, 0), + 'mediumspringgreen' => array(0, 250, 154), + 'greenyellow' => array(173, 255, 47), + 'limegreen' => array(50, 205, 50), + 'yellowgreen' => array(154, 205, 50), + 'forestgreen' => array(34, 139, 34), + 'olivedrab' => array(107, 142, 35), + 'darkkhaki' => array(189, 183, 107), + 'khaki' => array(240, 230, 140), + 'palegoldenrod' => array(238, 232, 170), + 'lightgoldenrodyellow' => array(250, 250, 210), + 'lightyellow' => array(255, 255, 200), + 'yellow' => array(255, 255, 0), + 'gold' => array(255, 215, 0), + 'lightgoldenrod' => array(238, 221, 130), + 'goldenrod' => array(218, 165, 32), + 'darkgoldenrod' => array(184, 134, 11), + 'rosybrown' => array(188, 143, 143), + 'indianred' => array(205, 92, 92), + 'saddlebrown' => array(139, 69, 19), + 'sienna' => array(160, 82, 45), + 'peru' => array(205, 133, 63), + 'burlywood' => array(222, 184, 135), + 'beige' => array(245, 245, 220), + 'wheat' => array(245, 222, 179), + 'sandybrown' => array(244, 164, 96), + 'tan' => array(210, 180, 140), + 'chocolate' => array(210, 105, 30), + 'firebrick' => array(178, 34, 34), + 'brown' => array(165, 42, 42), + 'darksalmon' => array(233, 150, 122), + 'salmon' => array(250, 128, 114), + 'lightsalmon' => array(255, 160, 122), + 'orange' => array(255, 165, 0), + 'darkorange' => array(255, 140, 0), + 'coral' => array(255, 127, 80), + 'lightcoral' => array(240, 128, 128), + 'tomato' => array(255, 99, 71), + 'orangered' => array(255, 69, 0), + 'red' => array(255, 0, 0), + 'hotpink' => array(255, 105, 180), + 'deeppink' => array(255, 20, 147), + 'pink' => array(255, 192, 203), + 'lightpink' => array(255, 182, 193), + 'palevioletred' => array(219, 112, 147), + 'maroon' => array(176, 48, 96), + 'mediumvioletred' => array(199, 21, 133), + 'violetred' => array(208, 32, 144), + 'magenta' => array(255, 0, 255), + 'violet' => array(238, 130, 238), + 'plum' => array(221, 160, 221), + 'orchid' => array(218, 112, 214), + 'mediumorchid' => array(186, 85, 211), + 'darkorchid' => array(153, 50, 204), + 'darkviolet' => array(148, 0, 211), + 'blueviolet' => array(138, 43, 226), + 'purple' => array(160, 32, 240), + 'mediumpurple' => array(147, 112, 219), + 'thistle' => array(216, 191, 216), + 'snow1' => array(255, 250, 250), + 'snow2' => array(238, 233, 233), + 'snow3' => array(205, 201, 201), + 'snow4' => array(139, 137, 137), + 'seashell1' => array(255, 245, 238), + 'seashell2' => array(238, 229, 222), + 'seashell3' => array(205, 197, 191), + 'seashell4' => array(139, 134, 130), + 'AntiqueWhite1' => array(255, 239, 219), + 'AntiqueWhite2' => array(238, 223, 204), + 'AntiqueWhite3' => array(205, 192, 176), + 'AntiqueWhite4' => array(139, 131, 120), + 'bisque1' => array(255, 228, 196), + 'bisque2' => array(238, 213, 183), + 'bisque3' => array(205, 183, 158), + 'bisque4' => array(139, 125, 107), + 'peachPuff1' => array(255, 218, 185), + 'peachpuff2' => array(238, 203, 173), + 'peachpuff3' => array(205, 175, 149), + 'peachpuff4' => array(139, 119, 101), + 'navajowhite1' => array(255, 222, 173), + 'navajowhite2' => array(238, 207, 161), + 'navajowhite3' => array(205, 179, 139), + 'navajowhite4' => array(139, 121, 94), + 'lemonchiffon1' => array(255, 250, 205), + 'lemonchiffon2' => array(238, 233, 191), + 'lemonchiffon3' => array(205, 201, 165), + 'lemonchiffon4' => array(139, 137, 112), + 'ivory1' => array(255, 255, 240), + 'ivory2' => array(238, 238, 224), + 'ivory3' => array(205, 205, 193), + 'ivory4' => array(139, 139, 131), + 'honeydew' => array(193, 205, 193), + 'lavenderblush1' => array(255, 240, 245), + 'lavenderblush2' => array(238, 224, 229), + 'lavenderblush3' => array(205, 193, 197), + 'lavenderblush4' => array(139, 131, 134), + 'mistyrose1' => array(255, 228, 225), + 'mistyrose2' => array(238, 213, 210), + 'mistyrose3' => array(205, 183, 181), + 'mistyrose4' => array(139, 125, 123), + 'azure1' => array(240, 255, 255), + 'azure2' => array(224, 238, 238), + 'azure3' => array(193, 205, 205), + 'azure4' => array(131, 139, 139), + 'slateblue1' => array(131, 111, 255), + 'slateblue2' => array(122, 103, 238), + 'slateblue3' => array(105, 89, 205), + 'slateblue4' => array(71, 60, 139), + 'royalblue1' => array(72, 118, 255), + 'royalblue2' => array(67, 110, 238), + 'royalblue3' => array(58, 95, 205), + 'royalblue4' => array(39, 64, 139), + 'dodgerblue1' => array(30, 144, 255), + 'dodgerblue2' => array(28, 134, 238), + 'dodgerblue3' => array(24, 116, 205), + 'dodgerblue4' => array(16, 78, 139), + 'steelblue1' => array(99, 184, 255), + 'steelblue2' => array(92, 172, 238), + 'steelblue3' => array(79, 148, 205), + 'steelblue4' => array(54, 100, 139), + 'deepskyblue1' => array(0, 191, 255), + 'deepskyblue2' => array(0, 178, 238), + 'deepskyblue3' => array(0, 154, 205), + 'deepskyblue4' => array(0, 104, 139), + 'skyblue1' => array(135, 206, 255), + 'skyblue2' => array(126, 192, 238), + 'skyblue3' => array(108, 166, 205), + 'skyblue4' => array(74, 112, 139), + 'lightskyblue1' => array(176, 226, 255), + 'lightskyblue2' => array(164, 211, 238), + 'lightskyblue3' => array(141, 182, 205), + 'lightskyblue4' => array(96, 123, 139), + 'slategray1' => array(198, 226, 255), + 'slategray2' => array(185, 211, 238), + 'slategray3' => array(159, 182, 205), + 'slategray4' => array(108, 123, 139), + 'lightsteelblue1' => array(202, 225, 255), + 'lightsteelblue2' => array(188, 210, 238), + 'lightsteelblue3' => array(162, 181, 205), + 'lightsteelblue4' => array(110, 123, 139), + 'lightblue1' => array(191, 239, 255), + 'lightblue2' => array(178, 223, 238), + 'lightblue3' => array(154, 192, 205), + 'lightblue4' => array(104, 131, 139), + 'lightcyan1' => array(224, 255, 255), + 'lightcyan2' => array(209, 238, 238), + 'lightcyan3' => array(180, 205, 205), + 'lightcyan4' => array(122, 139, 139), + 'paleturquoise1' => array(187, 255, 255), + 'paleturquoise2' => array(174, 238, 238), + 'paleturquoise3' => array(150, 205, 205), + 'paleturquoise4' => array(102, 139, 139), + 'cadetblue1' => array(152, 245, 255), + 'cadetblue2' => array(142, 229, 238), + 'cadetblue3' => array(122, 197, 205), + 'cadetblue4' => array(83, 134, 139), + 'turquoise1' => array(0, 245, 255), + 'turquoise2' => array(0, 229, 238), + 'turquoise3' => array(0, 197, 205), + 'turquoise4' => array(0, 134, 139), + 'cyan1' => array(0, 255, 255), + 'cyan2' => array(0, 238, 238), + 'cyan3' => array(0, 205, 205), + 'cyan4' => array(0, 139, 139), + 'darkslategray1' => array(151, 255, 255), + 'darkslategray2' => array(141, 238, 238), + 'darkslategray3' => array(121, 205, 205), + 'darkslategray4' => array(82, 139, 139), + 'aquamarine1' => array(127, 255, 212), + 'aquamarine2' => array(118, 238, 198), + 'aquamarine3' => array(102, 205, 170), + 'aquamarine4' => array(69, 139, 116), + 'darkseagreen1' => array(193, 255, 193), + 'darkseagreen2' => array(180, 238, 180), + 'darkseagreen3' => array(155, 205, 155), + 'darkseagreen4' => array(105, 139, 105), + 'seagreen1' => array(84, 255, 159), + 'seagreen2' => array(78, 238, 148), + 'seagreen3' => array(67, 205, 128), + 'seagreen4' => array(46, 139, 87), + 'palegreen1' => array(154, 255, 154), + 'palegreen2' => array(144, 238, 144), + 'palegreen3' => array(124, 205, 124), + 'palegreen4' => array(84, 139, 84), + 'springgreen1' => array(0, 255, 127), + 'springgreen2' => array(0, 238, 118), + 'springgreen3' => array(0, 205, 102), + 'springgreen4' => array(0, 139, 69), + 'chartreuse1' => array(127, 255, 0), + 'chartreuse2' => array(118, 238, 0), + 'chartreuse3' => array(102, 205, 0), + 'chartreuse4' => array(69, 139, 0), + 'olivedrab1' => array(192, 255, 62), + 'olivedrab2' => array(179, 238, 58), + 'olivedrab3' => array(154, 205, 50), + 'olivedrab4' => array(105, 139, 34), + 'darkolivegreen1' => array(202, 255, 112), + 'darkolivegreen2' => array(188, 238, 104), + 'darkolivegreen3' => array(162, 205, 90), + 'darkolivegreen4' => array(110, 139, 61), + 'khaki1' => array(255, 246, 143), + 'khaki2' => array(238, 230, 133), + 'khaki3' => array(205, 198, 115), + 'khaki4' => array(139, 134, 78), + 'lightgoldenrod1' => array(255, 236, 139), + 'lightgoldenrod2' => array(238, 220, 130), + 'lightgoldenrod3' => array(205, 190, 112), + 'lightgoldenrod4' => array(139, 129, 76), + 'yellow1' => array(255, 255, 0), + 'yellow2' => array(238, 238, 0), + 'yellow3' => array(205, 205, 0), + 'yellow4' => array(139, 139, 0), + 'gold1' => array(255, 215, 0), + 'gold2' => array(238, 201, 0), + 'gold3' => array(205, 173, 0), + 'gold4' => array(139, 117, 0), + 'goldenrod1' => array(255, 193, 37), + 'goldenrod2' => array(238, 180, 34), + 'goldenrod3' => array(205, 155, 29), + 'goldenrod4' => array(139, 105, 20), + 'darkgoldenrod1' => array(255, 185, 15), + 'darkgoldenrod2' => array(238, 173, 14), + 'darkgoldenrod3' => array(205, 149, 12), + 'darkgoldenrod4' => array(139, 101, 8), + 'rosybrown1' => array(255, 193, 193), + 'rosybrown2' => array(238, 180, 180), + 'rosybrown3' => array(205, 155, 155), + 'rosybrown4' => array(139, 105, 105), + 'indianred1' => array(255, 106, 106), + 'indianred2' => array(238, 99, 99), + 'indianred3' => array(205, 85, 85), + 'indianred4' => array(139, 58, 58), + 'sienna1' => array(255, 130, 71), + 'sienna2' => array(238, 121, 66), + 'sienna3' => array(205, 104, 57), + 'sienna4' => array(139, 71, 38), + 'burlywood1' => array(255, 211, 155), + 'burlywood2' => array(238, 197, 145), + 'burlywood3' => array(205, 170, 125), + 'burlywood4' => array(139, 115, 85), + 'wheat1' => array(255, 231, 186), + 'wheat2' => array(238, 216, 174), + 'wheat3' => array(205, 186, 150), + 'wheat4' => array(139, 126, 102), + 'tan1' => array(255, 165, 79), + 'tan2' => array(238, 154, 73), + 'tan3' => array(205, 133, 63), + 'tan4' => array(139, 90, 43), + 'chocolate1' => array(255, 127, 36), + 'chocolate2' => array(238, 118, 33), + 'chocolate3' => array(205, 102, 29), + 'chocolate4' => array(139, 69, 19), + 'firebrick1' => array(255, 48, 48), + 'firebrick2' => array(238, 44, 44), + 'firebrick3' => array(205, 38, 38), + 'firebrick4' => array(139, 26, 26), + 'brown1' => array(255, 64, 64), + 'brown2' => array(238, 59, 59), + 'brown3' => array(205, 51, 51), + 'brown4' => array(139, 35, 35), + 'salmon1' => array(255, 140, 105), + 'salmon2' => array(238, 130, 98), + 'salmon3' => array(205, 112, 84), + 'salmon4' => array(139, 76, 57), + 'lightsalmon1' => array(255, 160, 122), + 'lightsalmon2' => array(238, 149, 114), + 'lightsalmon3' => array(205, 129, 98), + 'lightsalmon4' => array(139, 87, 66), + 'orange1' => array(255, 165, 0), + 'orange2' => array(238, 154, 0), + 'orange3' => array(205, 133, 0), + 'orange4' => array(139, 90, 0), + 'darkorange1' => array(255, 127, 0), + 'darkorange2' => array(238, 118, 0), + 'darkorange3' => array(205, 102, 0), + 'darkorange4' => array(139, 69, 0), + 'coral1' => array(255, 114, 86), + 'coral2' => array(238, 106, 80), + 'coral3' => array(205, 91, 69), + 'coral4' => array(139, 62, 47), + 'tomato1' => array(255, 99, 71), + 'tomato2' => array(238, 92, 66), + 'tomato3' => array(205, 79, 57), + 'tomato4' => array(139, 54, 38), + 'orangered1' => array(255, 69, 0), + 'orangered2' => array(238, 64, 0), + 'orangered3' => array(205, 55, 0), + 'orangered4' => array(139, 37, 0), + 'deeppink1' => array(255, 20, 147), + 'deeppink2' => array(238, 18, 137), + 'deeppink3' => array(205, 16, 118), + 'deeppink4' => array(139, 10, 80), + 'hotpink1' => array(255, 110, 180), + 'hotpink2' => array(238, 106, 167), + 'hotpink3' => array(205, 96, 144), + 'hotpink4' => array(139, 58, 98), + 'pink1' => array(255, 181, 197), + 'pink2' => array(238, 169, 184), + 'pink3' => array(205, 145, 158), + 'pink4' => array(139, 99, 108), + 'lightpink1' => array(255, 174, 185), + 'lightpink2' => array(238, 162, 173), + 'lightpink3' => array(205, 140, 149), + 'lightpink4' => array(139, 95, 101), + 'palevioletred1' => array(255, 130, 171), + 'palevioletred2' => array(238, 121, 159), + 'palevioletred3' => array(205, 104, 137), + 'palevioletred4' => array(139, 71, 93), + 'maroon1' => array(255, 52, 179), + 'maroon2' => array(238, 48, 167), + 'maroon3' => array(205, 41, 144), + 'maroon4' => array(139, 28, 98), + 'violetred1' => array(255, 62, 150), + 'violetred2' => array(238, 58, 140), + 'violetred3' => array(205, 50, 120), + 'violetred4' => array(139, 34, 82), + 'magenta1' => array(255, 0, 255), + 'magenta2' => array(238, 0, 238), + 'magenta3' => array(205, 0, 205), + 'magenta4' => array(139, 0, 139), + 'mediumred' => array(140, 34, 34), + 'orchid1' => array(255, 131, 250), + 'orchid2' => array(238, 122, 233), + 'orchid3' => array(205, 105, 201), + 'orchid4' => array(139, 71, 137), + 'plum1' => array(255, 187, 255), + 'plum2' => array(238, 174, 238), + 'plum3' => array(205, 150, 205), + 'plum4' => array(139, 102, 139), + 'mediumorchid1' => array(224, 102, 255), + 'mediumorchid2' => array(209, 95, 238), + 'mediumorchid3' => array(180, 82, 205), + 'mediumorchid4' => array(122, 55, 139), + 'darkorchid1' => array(191, 62, 255), + 'darkorchid2' => array(178, 58, 238), + 'darkorchid3' => array(154, 50, 205), + 'darkorchid4' => array(104, 34, 139), + 'purple1' => array(155, 48, 255), + 'purple2' => array(145, 44, 238), + 'purple3' => array(125, 38, 205), + 'purple4' => array(85, 26, 139), + 'mediumpurple1' => array(171, 130, 255), + 'mediumpurple2' => array(159, 121, 238), + 'mediumpurple3' => array(137, 104, 205), + 'mediumpurple4' => array(93, 71, 139), + 'thistle1' => array(255, 225, 255), + 'thistle2' => array(238, 210, 238), + 'thistle3' => array(205, 181, 205), + 'thistle4' => array(139, 123, 139), + 'gray1' => array(10, 10, 10), + 'gray2' => array(40, 40, 30), + 'gray3' => array(70, 70, 70), + 'gray4' => array(100, 100, 100), + 'gray5' => array(130, 130, 130), + 'gray6' => array(160, 160, 160), + 'gray7' => array(190, 190, 190), + 'gray8' => array(210, 210, 210), + 'gray9' => array(240, 240, 240), + 'darkgray' => array(100, 100, 100), + 'darkblue' => array(0, 0, 139), + 'darkcyan' => array(0, 139, 139), + 'darkmagenta' => array(139, 0, 139), + 'darkred' => array(139, 0, 0), + 'silver' => array(192, 192, 192), + 'eggplant' => array(144, 176, 168), + 'lightgreen' => array(144, 238, 144)); + } + + //---------------- + // PUBLIC METHODS + // Colors can be specified as either + // 1. #xxxxxx HTML style + // 2. "colorname" as a named color + // 3. array(r,g,b) RGB triple + // This function translates this to a native RGB format and returns an + // RGB triple. + + public function Color($aColor) + { + if (is_string($aColor)) { + $matches = array(); + // this regex will parse a color string and fill the $matches array as such: + // 0: the full match if any + // 1: a hex string preceded by a hash, can be 3 characters (#fff) or 6 (#ffffff) (4 or 5 also accepted but...) + // 2,3,4: r,g,b values in hex if the first character of the string is # + // 5: all alpha-numeric characters at the beginning of the string if string does not start with # + // 6: alpha value prefixed by @ if supplied + // 7: alpha value with @ stripped + // 8: adjust value prefixed with : if supplied + // 9: adjust value with : stripped + $regex = '/(#([0-9a-fA-F]{1,2})([0-9a-fA-F]{1,2})([0-9a-fA-F]{1,2}))?([\w]+)?(@([\d\.,]+))?(:([\d\.,]+))?/'; + if (!preg_match($regex, $aColor, $matches)) { + JpGraphError::RaiseL(25078, $aColor); //(" Unknown color: $aColor"); + } + if (empty($matches[5])) { + $r = strlen($matches[2]) == 1 ? $matches[2] . $matches[2] : $matches[2]; + $g = strlen($matches[3]) == 1 ? $matches[3] . $matches[3] : $matches[3]; + $b = strlen($matches[4]) == 1 ? $matches[4] . $matches[4] : $matches[4]; + $r = hexdec($r); + $g = hexdec($g); + $b = hexdec($b); + } else { + if (!isset($this->rgb_table[$matches[5]])) { + JpGraphError::RaiseL(25078, $aColor); //(" Unknown color: $aColor"); + } + $r = $this->rgb_table[$matches[5]][0]; + $g = $this->rgb_table[$matches[5]][1]; + $b = $this->rgb_table[$matches[5]][2]; + } + $alpha = isset($matches[7]) ? str_replace(',', '.', $matches[7]) : 0; + $adj = isset($matches[9]) ? str_replace(',', '.', $matches[9]) : 1.0; + + if ($adj < 0) { + JpGraphError::RaiseL(25077); //('Adjustment factor for color must be > 0'); + } + + // Scale adj so that an adj=2 always + // makes the color 100% white (i.e. 255,255,255. + // and adj=1 neutral and adj=0 black. + if ($adj == 1) { + return array($r, $g, $b, $alpha); + } elseif ($adj > 1) { + $m = ($adj - 1.0) * (255 - min(255, min($r, min($g, $b)))); + return array(min(255, $r + $m), min(255, $g + $m), min(255, $b + $m), $alpha); + } elseif ($adj < 1) { + $m = ($adj - 1.0) * max(255, max($r, max($g, $b))); + return array(max(0, $r + $m), max(0, $g + $m), max(0, $b + $m), $alpha); + } + } elseif (is_array($aColor)) { + if (!isset($aColor[3])) { + $aColor[3] = 0; + } + + return $aColor; + } else { + JpGraphError::RaiseL(25079, $aColor, count($aColor)); //(" Unknown color specification: $aColor , size=".count($aColor)); + } + } + + // Compare two colors + // return true if equal + public function Equal($aCol1, $aCol2) + { + $c1 = $this->Color($aCol1); + $c2 = $this->Color($aCol2); + return $c1[0] == $c2[0] && $c1[1] == $c2[1] && $c1[2] == $c2[2]; + } + + // Allocate a new color in the current image + // Return new color index, -1 if no more colors could be allocated + public function Allocate($aColor, $aAlpha = 0.0) + { + list($r, $g, $b, $a) = $this->color($aColor); + // If alpha is specified in the color string then this + // takes precedence over the second argument + if ($a > 0) { + $aAlpha = $a; + } + if ($aAlpha < 0 || $aAlpha > 1) { + JpGraphError::RaiseL(25080); //('Alpha parameter for color must be between 0.0 and 1.0'); + } + return imagecolorresolvealpha($this->img, $r, $g, $b, round($aAlpha * 127)); + } + + // Try to convert an array with three valid numbers to the corresponding hex array + // This is currenly only used in processing the colors for barplots in order to be able + // to handle the case where the color might be specified as an array of colros as well. + // In that case we must be able to find out if an array of values should be interpretated as + // a single color (specifeid as an RGB triple) + public static function tryHexConversion($aColor) + { + if (is_array($aColor)) { + if (count($aColor) == 3) { + if (is_numeric($aColor[0]) && is_numeric($aColor[1]) && is_numeric($aColor[2])) { + if (($aColor[0] >= 0 && $aColor[0] <= 255) && + ($aColor[1] >= 0 && $aColor[1] <= 255) && + ($aColor[2] >= 0 && $aColor[2] <= 255)) { + return sprintf('#%02x%02x%02x', $aColor[0], $aColor[1], $aColor[2]); + } + } + } + } + return $aColor; + } + + // Return a RGB tripple corresponding to a position in the normal light spectrum + // The argumen values is in the range [0, 1] where a value of 0 correponds to blue and + // a value of 1 corresponds to red. Values in betwen is mapped to a linear interpolation + // of the constituting colors in the visible color spectra. + // The $aDynamicRange specified how much of the dynamic range we shold use + // a value of 1.0 give the full dyanmic range and a lower value give more dark + // colors. In the extreme of 0.0 then all colors will be black. + public static function GetSpectrum($aVal, $aDynamicRange = 1.0) + { + if ($aVal < 0 || $aVal > 1.0001) { + return array(0, 0, 0); // Invalid case - just return black + } + + $sat = round(255 * $aDynamicRange); + $a = 0.25; + if ($aVal <= 0.25) { + return array(0, round($sat * $aVal / $a), $sat); + } elseif ($aVal <= 0.5) { + return array(0, $sat, round($sat - $sat * ($aVal - 0.25) / $a)); + } elseif ($aVal <= 0.75) { + return array(round($sat * ($aVal - 0.5) / $a), $sat, 0); + } else { + return array($sat, round($sat - $sat * ($aVal - 0.75) / $a), 0); + } + } + +} // Class diff --git a/vendor/amenadiel/jpgraph/src/util/ReadFileData.php b/vendor/amenadiel/jpgraph/src/util/ReadFileData.php new file mode 100644 index 0000000000..433143b767 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/util/ReadFileData.php @@ -0,0 +1,198 @@ + ',', + // 'enclosure' => '"', + // 'readlength' => 1024, + // 'ignore_first' => false, + // 'first_as_key' => false + // 'escape' => '\', # PHP >= 5.3 only + // + // Returns: + // The number of lines read on success, FALSE on failure + //---------------------------------------------------------------------------- + public static function FromCSV2($aFile, &$aData, $aOptions = array()) + { + $aDefaults = array( + 'separator' => ',', + 'enclosure' => chr(34), + 'escape' => chr(92), + 'readlength' => 1024, + 'ignore_first' => false, + 'first_as_key' => false, + ); + + $aOptions = array_merge( + $aDefaults, is_array($aOptions) ? $aOptions : array()); + + if ($aOptions['first_as_key']) { + $aOptions['ignore_first'] = true; + } + + $rh = @fopen($aFile, 'r'); + + if ($rh === false) { + return false; + } + + $aData = array(); + $aLine = fgetcsv($rh, + $aOptions['readlength'], + $aOptions['separator'], + $aOptions['enclosure'] + /*, $aOptions['escape'] # PHP >= 5.3 only */ + ); + + // Use numeric array keys for the columns by default + // If specified use first lines values as assoc keys instead + $keys = array_keys($aLine); + if ($aOptions['first_as_key']) { + $keys = array_values($aLine); + } + + $num_lines = 0; + $num_cols = count($aLine); + + while ($aLine !== false) { + if (is_array($aLine) && count($aLine) != $num_cols) { + JpGraphError::RaiseL(24004); + // 'ReadCSV2: Column count mismatch in %s line %d' + } + + // fgetcsv returns NULL for empty lines + if (!is_null($aLine)) { + $num_lines++; + + if (!($aOptions['ignore_first'] && $num_lines == 1) && is_numeric($aLine[0])) { + for ($i = 0; $i < $num_cols; $i++) { + $aData[$keys[$i]][] = floatval($aLine[$i]); + } + } + } + + $aLine = fgetcsv($rh, + $aOptions['readlength'], + $aOptions['separator'], + $aOptions['enclosure'] + /*, $aOptions['escape'] # PHP >= 5.3 only*/ + ); + } + + fclose($rh); + + if ($aOptions['ignore_first']) { + $num_lines--; + } + + return $num_lines; + } + + // Read data from two columns in a plain text file + public static function From2Col($aFile, $aCol1, $aCol2, $aSepChar = ' ') + { + $lines = @file($aFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); + if ($lines === false) { + return false; + } + $s = '/[\s]+/'; + if ($aSepChar == ',') { + $s = '/[\s]*,[\s]*/'; + } elseif ($aSepChar == ';') { + $s = '/[\s]*;[\s]*/'; + } + foreach ($lines as $line => $datarow) { + $split = preg_split($s, $datarow); + $aCol1[] = floatval(trim($split[0])); + $aCol2[] = floatval(trim($split[1])); + } + + return count($lines); + } + + // Read data from one columns in a plain text file + public static function From1Col($aFile, $aCol1) + { + $lines = @file($aFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); + if ($lines === false) { + return false; + } + foreach ($lines as $line => $datarow) { + $aCol1[] = floatval(trim($datarow)); + } + + return count($lines); + } + + public static function FromMatrix($aFile, $aSepChar = ' ') + { + $lines = @file($aFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); + if ($lines === false) { + return false; + } + $mat = array(); + $reg = '/' . $aSepChar . '/'; + foreach ($lines as $line => $datarow) { + $row = preg_split($reg, trim($datarow)); + foreach ($row as $key => $cell) { + $row[$key] = floatval(trim($cell)); + } + $mat[] = $row; + } + return $mat; + } + +} diff --git a/vendor/amenadiel/jpgraph/src/util/Rectangle.php b/vendor/amenadiel/jpgraph/src/util/Rectangle.php new file mode 100644 index 0000000000..ec32ed8983 --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/util/Rectangle.php @@ -0,0 +1,18 @@ +x = $aX; + $this->y = $aY; + $this->w = $aWidth; + $this->h = $aHeight; + $this->xe = $aX + $aWidth - 1; + $this->ye = $aY + $aHeight - 1; + } +} diff --git a/vendor/amenadiel/jpgraph/src/util/Spline.php b/vendor/amenadiel/jpgraph/src/util/Spline.php new file mode 100644 index 0000000000..782278ee3e --- /dev/null +++ b/vendor/amenadiel/jpgraph/src/util/Spline.php @@ -0,0 +1,115 @@ +y2 = array(); + $this->xdata = $xdata; + $this->ydata = $ydata; + + $n = count($ydata); + $this->n = $n; + if ($this->n !== count($xdata)) { + JpGraphError::RaiseL(19001); + //('Spline: Number of X and Y coordinates must be the same'); + } + + // Natural spline 2:derivate == 0 at endpoints + $this->y2[0] = 0.0; + $this->y2[$n - 1] = 0.0; + $delta[0] = 0.0; + + // Calculate 2:nd derivate + for ($i = 1; $i < $n - 1; ++$i) { + $d = ($xdata[$i + 1] - $xdata[$i - 1]); + if ($d == 0) { + JpGraphError::RaiseL(19002); + //('Invalid input data for spline. Two or more consecutive input X-values are equal. Each input X-value must differ since from a mathematical point of view it must be a one-to-one mapping, i.e. each X-value must correspond to exactly one Y-value.'); + } + $s = ($xdata[$i] - $xdata[$i - 1]) / $d; + $p = $s * $this->y2[$i - 1] + 2.0; + $this->y2[$i] = ($s - 1.0) / $p; + $delta[$i] = ($ydata[$i + 1] - $ydata[$i]) / ($xdata[$i + 1] - $xdata[$i]) - + ($ydata[$i] - $ydata[$i - 1]) / ($xdata[$i] - $xdata[$i - 1]); + $delta[$i] = (6.0 * $delta[$i] / ($xdata[$i + 1] - $xdata[$i - 1]) - $s * $delta[$i - 1]) / $p; + } + + // Backward substitution + for ($j = $n - 2; $j >= 0; --$j) { + $this->y2[$j] = $this->y2[$j] * $this->y2[$j + 1] + $delta[$j]; + } + } + + // Return the two new data vectors + public function Get($num = 50) + { + $n = $this->n; + $step = ($this->xdata[$n - 1] - $this->xdata[0]) / ($num - 1); + $xnew = array(); + $ynew = array(); + $xnew[0] = $this->xdata[0]; + $ynew[0] = $this->ydata[0]; + for ($j = 1; $j < $num; ++$j) { + $xnew[$j] = $xnew[0] + $j * $step; + $ynew[$j] = $this->Interpolate($xnew[$j]); + } + return array($xnew, $ynew); + } + + // Return a single interpolated Y-value from an x value + public function Interpolate($xpoint) + { + + $max = $this->n - 1; + $min = 0; + + // Binary search to find interval + while ($max - $min > 1) { + $k = ($max + $min) / 2; + if ($this->xdata[$k] > $xpoint) { + $max = $k; + } else { + $min = $k; + } + + } + + // Each interval is interpolated by a 3:degree polynom function + $h = $this->xdata[$max] - $this->xdata[$min]; + + if ($h == 0) { + JpGraphError::RaiseL(19002); + //('Invalid input data for spline. Two or more consecutive input X-values are equal. Each input X-value must differ since from a mathematical point of view it must be a one-to-one mapping, i.e. each X-value must correspond to exactly one Y-value.'); + } + + $a = ($this->xdata[$max] - $xpoint) / $h; + $b = ($xpoint - $this->xdata[$min]) / $h; + return $a * $this->ydata[$min] + $b * $this->ydata[$max] + + (($a * $a * $a - $a) * $this->y2[$min] + ($b * $b * $b - $b) * $this->y2[$max]) * ($h * $h) / 6.0; + } +} + +// EOF diff --git a/vendor/autoload.php b/vendor/autoload.php new file mode 100644 index 0000000000..196ea7ac36 --- /dev/null +++ b/vendor/autoload.php @@ -0,0 +1,7 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier + * @author Jordi Boggiano + * @see http://www.php-fig.org/psr/psr-0/ + * @see http://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + // PSR-4 + private $prefixLengthsPsr4 = array(); + private $prefixDirsPsr4 = array(); + private $fallbackDirsPsr4 = array(); + + // PSR-0 + private $prefixesPsr0 = array(); + private $fallbackDirsPsr0 = array(); + + private $useIncludePath = false; + private $classMap = array(); + private $classMapAuthoritative = false; + private $missingClasses = array(); + private $apcuPrefix; + + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', $this->prefixesPsr0); + } + + return array(); + } + + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param array $classMap Class to filename map + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + */ + public function add($prefix, $paths, $prepend = false) + { + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + (array) $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + (array) $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = (array) $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + (array) $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + (array) $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + (array) $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + (array) $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 base directories + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** + * APCu prefix to use to cache found/not-found classes, if the extension is enabled. + * + * @param string|null $apcuPrefix + */ + public function setApcuPrefix($apcuPrefix) + { + $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null; + } + + /** + * The APCu prefix in use, or null if APCu caching is not enabled. + * + * @return string|null + */ + public function getApcuPrefix() + { + return $this->apcuPrefix; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + } + + /** + * Unregisters this instance as an autoloader. + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return bool|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + includeFile($file); + + return true; + } + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|false The path if found, false otherwise + */ + public function findFile($class) + { + // class map lookup + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { + return false; + } + if (null !== $this->apcuPrefix) { + $file = apcu_fetch($this->apcuPrefix.$class, $hit); + if ($hit) { + return $file; + } + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if (false === $file && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + + if (false === $file) { + // Remember that this class does not exist. + $this->missingClasses[$class] = true; + } + + return $file; + } + + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) { + if (0 === strpos($class, $prefix)) { + foreach ($this->prefixDirsPsr4[$prefix] as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { + return $file; + } + + return false; + } +} + +/** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + */ +function includeFile($file) +{ + include $file; +} diff --git a/lib/yaml/vendor/composer/LICENSE b/vendor/composer/LICENSE similarity index 100% rename from lib/yaml/vendor/composer/LICENSE rename to vendor/composer/LICENSE diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php new file mode 100644 index 0000000000..b37786656a --- /dev/null +++ b/vendor/composer/autoload_classmap.php @@ -0,0 +1,508 @@ + $vendorDir . '/amenadiel/jpgraph/src/graph/Axis.php', + 'Amenadiel\\JpGraph\\Graph\\AxisPrototype' => $vendorDir . '/amenadiel/jpgraph/src/graph/AxisPrototype.php', + 'Amenadiel\\JpGraph\\Graph\\CanvasGraph' => $vendorDir . '/amenadiel/jpgraph/src/graph/CanvasGraph.php', + 'Amenadiel\\JpGraph\\Graph\\CanvasScale' => $vendorDir . '/amenadiel/jpgraph/src/graph/CanvasScale.php', + 'Amenadiel\\JpGraph\\Graph\\DateScale' => $vendorDir . '/amenadiel/jpgraph/src/graph/DateScale.php', + 'Amenadiel\\JpGraph\\Graph\\GanttActivityInfo' => $vendorDir . '/amenadiel/jpgraph/src/graph/GanttActivityInfo.php', + 'Amenadiel\\JpGraph\\Graph\\GanttGraph' => $vendorDir . '/amenadiel/jpgraph/src/graph/GanttGraph.php', + 'Amenadiel\\JpGraph\\Graph\\GanttScale' => $vendorDir . '/amenadiel/jpgraph/src/graph/GanttScale.php', + 'Amenadiel\\JpGraph\\Graph\\Graph' => $vendorDir . '/amenadiel/jpgraph/src/graph/Graph.php', + 'Amenadiel\\JpGraph\\Graph\\Grid' => $vendorDir . '/amenadiel/jpgraph/src/graph/Grid.php', + 'Amenadiel\\JpGraph\\Graph\\HeaderProperty' => $vendorDir . '/amenadiel/jpgraph/src/graph/HeaderProperty.php', + 'Amenadiel\\JpGraph\\Graph\\HorizontalGridLine' => $vendorDir . '/amenadiel/jpgraph/src/graph/HorizontalGridLine.php', + 'Amenadiel\\JpGraph\\Graph\\Legend' => $vendorDir . '/amenadiel/jpgraph/src/graph/Legend.php', + 'Amenadiel\\JpGraph\\Graph\\LineProperty' => $vendorDir . '/amenadiel/jpgraph/src/graph/LineProperty.php', + 'Amenadiel\\JpGraph\\Graph\\LinearScale' => $vendorDir . '/amenadiel/jpgraph/src/graph/LinearScale.php', + 'Amenadiel\\JpGraph\\Graph\\LinearTicks' => $vendorDir . '/amenadiel/jpgraph/src/graph/LinearTicks.php', + 'Amenadiel\\JpGraph\\Graph\\LogScale' => $vendorDir . '/amenadiel/jpgraph/src/graph/LogScale.php', + 'Amenadiel\\JpGraph\\Graph\\LogTicks' => $vendorDir . '/amenadiel/jpgraph/src/graph/LogTicks.php', + 'Amenadiel\\JpGraph\\Graph\\MGraph' => $vendorDir . '/amenadiel/jpgraph/src/graph/MGraph.php', + 'Amenadiel\\JpGraph\\Graph\\PieGraph' => $vendorDir . '/amenadiel/jpgraph/src/graph/PieGraph.php', + 'Amenadiel\\JpGraph\\Graph\\PolarAxis' => $vendorDir . '/amenadiel/jpgraph/src/graph/PolarAxis.php', + 'Amenadiel\\JpGraph\\Graph\\PolarGraph' => $vendorDir . '/amenadiel/jpgraph/src/graph/PolarGraph.php', + 'Amenadiel\\JpGraph\\Graph\\PolarLogScale' => $vendorDir . '/amenadiel/jpgraph/src/graph/PolarLogScale.php', + 'Amenadiel\\JpGraph\\Graph\\PolarScale' => $vendorDir . '/amenadiel/jpgraph/src/graph/PolarScale.php', + 'Amenadiel\\JpGraph\\Graph\\RadarAxis' => $vendorDir . '/amenadiel/jpgraph/src/graph/RadarAxis.php', + 'Amenadiel\\JpGraph\\Graph\\RadarGraph' => $vendorDir . '/amenadiel/jpgraph/src/graph/RadarGraph.php', + 'Amenadiel\\JpGraph\\Graph\\RadarGrid' => $vendorDir . '/amenadiel/jpgraph/src/graph/RadarGrid.php', + 'Amenadiel\\JpGraph\\Graph\\RadarLinearTicks' => $vendorDir . '/amenadiel/jpgraph/src/graph/RadarLinearTicks.php', + 'Amenadiel\\JpGraph\\Graph\\RadarLogTicks' => $vendorDir . '/amenadiel/jpgraph/src/graph/RadarLogTicks.php', + 'Amenadiel\\JpGraph\\Graph\\RadarPlot' => $vendorDir . '/amenadiel/jpgraph/src/graph/RadarGrid.php', + 'Amenadiel\\JpGraph\\Graph\\RectPattern' => $vendorDir . '/amenadiel/jpgraph/src/graph/RectPattern.php', + 'Amenadiel\\JpGraph\\Graph\\RectPattern3DPlane' => $vendorDir . '/amenadiel/jpgraph/src/graph/RectPattern3DPlane.php', + 'Amenadiel\\JpGraph\\Graph\\RectPatternCross' => $vendorDir . '/amenadiel/jpgraph/src/graph/RectPatternCross.php', + 'Amenadiel\\JpGraph\\Graph\\RectPatternDiagCross' => $vendorDir . '/amenadiel/jpgraph/src/graph/RectPatternDiagCross.php', + 'Amenadiel\\JpGraph\\Graph\\RectPatternFactory' => $vendorDir . '/amenadiel/jpgraph/src/graph/RectPatternFactory.php', + 'Amenadiel\\JpGraph\\Graph\\RectPatternHor' => $vendorDir . '/amenadiel/jpgraph/src/graph/RectPatternHor.php', + 'Amenadiel\\JpGraph\\Graph\\RectPatternLDiag' => $vendorDir . '/amenadiel/jpgraph/src/graph/RectPatternLDiag.php', + 'Amenadiel\\JpGraph\\Graph\\RectPatternRDiag' => $vendorDir . '/amenadiel/jpgraph/src/graph/RectPatternRDiag.php', + 'Amenadiel\\JpGraph\\Graph\\RectPatternSolid' => $vendorDir . '/amenadiel/jpgraph/src/graph/RectPatternSolid.php', + 'Amenadiel\\JpGraph\\Graph\\RectPatternVert' => $vendorDir . '/amenadiel/jpgraph/src/graph/RectPatternVert.php', + 'Amenadiel\\JpGraph\\Graph\\Shape' => $vendorDir . '/amenadiel/jpgraph/src/graph/Shape.php', + 'Amenadiel\\JpGraph\\Graph\\SymChar' => $vendorDir . '/amenadiel/jpgraph/src/graph/SymChar.php', + 'Amenadiel\\JpGraph\\Graph\\Ticks' => $vendorDir . '/amenadiel/jpgraph/src/graph/Ticks.php', + 'Amenadiel\\JpGraph\\Graph\\WindroseGraph' => $vendorDir . '/amenadiel/jpgraph/src/graph/WindroseGraph.php', + 'Amenadiel\\JpGraph\\Graph\\WindrosePlotScale' => $vendorDir . '/amenadiel/jpgraph/src/graph/WindrosePlotScale.php', + 'Amenadiel\\JpGraph\\Image\\DigitalLED74' => $vendorDir . '/amenadiel/jpgraph/src/image/DigitalLED74.php', + 'Amenadiel\\JpGraph\\Image\\FieldArrow' => $vendorDir . '/amenadiel/jpgraph/src/image/FieldArrow.php', + 'Amenadiel\\JpGraph\\Image\\FlagImages' => $vendorDir . '/amenadiel/jpgraph/src/image/FlagImages.php', + 'Amenadiel\\JpGraph\\Image\\Footer' => $vendorDir . '/amenadiel/jpgraph/src/image/Footer.php', + 'Amenadiel\\JpGraph\\Image\\GanttLink' => $vendorDir . '/amenadiel/jpgraph/src/image/GanttLink.php', + 'Amenadiel\\JpGraph\\Image\\IconImage' => $vendorDir . '/amenadiel/jpgraph/src/image/IconImage.php', + 'Amenadiel\\JpGraph\\Image\\Image' => $vendorDir . '/amenadiel/jpgraph/src/image/Image.php', + 'Amenadiel\\JpGraph\\Image\\ImgData' => $vendorDir . '/amenadiel/jpgraph/src/image/ImgData.php', + 'Amenadiel\\JpGraph\\Image\\ImgData_Balls' => $vendorDir . '/amenadiel/jpgraph/src/image/ImgData_Balls.php', + 'Amenadiel\\JpGraph\\Image\\ImgData_Bevels' => $vendorDir . '/amenadiel/jpgraph/src/image/ImgData_Bevels.php', + 'Amenadiel\\JpGraph\\Image\\ImgData_Diamonds' => $vendorDir . '/amenadiel/jpgraph/src/image/ImgData_Diamonds.php', + 'Amenadiel\\JpGraph\\Image\\ImgData_PushPins' => $vendorDir . '/amenadiel/jpgraph/src/image/ImgData_PushPins.php', + 'Amenadiel\\JpGraph\\Image\\ImgData_Squares' => $vendorDir . '/amenadiel/jpgraph/src/image/ImgData_Squares.php', + 'Amenadiel\\JpGraph\\Image\\ImgData_Stars' => $vendorDir . '/amenadiel/jpgraph/src/image/ImgData_Stars.php', + 'Amenadiel\\JpGraph\\Image\\ImgStreamCache' => $vendorDir . '/amenadiel/jpgraph/src/image/ImgStreamCache.php', + 'Amenadiel\\JpGraph\\Image\\ImgTrans' => $vendorDir . '/amenadiel/jpgraph/src/image/ImgTrans.php', + 'Amenadiel\\JpGraph\\Image\\LinkArrow' => $vendorDir . '/amenadiel/jpgraph/src/image/LinkArrow.php', + 'Amenadiel\\JpGraph\\Image\\PredefIcons' => $vendorDir . '/amenadiel/jpgraph/src/image/PredefIcons.php', + 'Amenadiel\\JpGraph\\Image\\Progress' => $vendorDir . '/amenadiel/jpgraph/src/image/Progress.php', + 'Amenadiel\\JpGraph\\Image\\RGB' => $vendorDir . '/amenadiel/jpgraph/src/image/RGB.php', + 'Amenadiel\\JpGraph\\Image\\RotImage' => $vendorDir . '/amenadiel/jpgraph/src/image/RotImage.php', + 'Amenadiel\\JpGraph\\Plot\\AccBarPlot' => $vendorDir . '/amenadiel/jpgraph/src/plot/AccBarPlot.php', + 'Amenadiel\\JpGraph\\Plot\\AccLinePlot' => $vendorDir . '/amenadiel/jpgraph/src/plot/AccLinePlot.php', + 'Amenadiel\\JpGraph\\Plot\\BarPlot' => $vendorDir . '/amenadiel/jpgraph/src/plot/BarPlot.php', + 'Amenadiel\\JpGraph\\Plot\\BoxPlot' => $vendorDir . '/amenadiel/jpgraph/src/plot/BoxPlot.php', + 'Amenadiel\\JpGraph\\Plot\\Contour' => $vendorDir . '/amenadiel/jpgraph/src/plot/Contour.php', + 'Amenadiel\\JpGraph\\Plot\\ContourPlot' => $vendorDir . '/amenadiel/jpgraph/src/plot/ContourPlot.php', + 'Amenadiel\\JpGraph\\Plot\\DisplayValue' => $vendorDir . '/amenadiel/jpgraph/src/plot/DisplayValue.php', + 'Amenadiel\\JpGraph\\Plot\\ErrorLinePlot' => $vendorDir . '/amenadiel/jpgraph/src/plot/ErrorLinePlot.php', + 'Amenadiel\\JpGraph\\Plot\\ErrorPlot' => $vendorDir . '/amenadiel/jpgraph/src/plot/ErrorPlot.php', + 'Amenadiel\\JpGraph\\Plot\\FieldPlot' => $vendorDir . '/amenadiel/jpgraph/src/plot/FieldPlot.php', + 'Amenadiel\\JpGraph\\Plot\\GanttBar' => $vendorDir . '/amenadiel/jpgraph/src/plot/GanttBar.php', + 'Amenadiel\\JpGraph\\Plot\\GanttPlotObject' => $vendorDir . '/amenadiel/jpgraph/src/plot/GanttPlotObject.php', + 'Amenadiel\\JpGraph\\Plot\\GanttVLine' => $vendorDir . '/amenadiel/jpgraph/src/plot/GanttVLine.php', + 'Amenadiel\\JpGraph\\Plot\\Gradient' => $vendorDir . '/amenadiel/jpgraph/src/plot/Gradient.php', + 'Amenadiel\\JpGraph\\Plot\\GroupBarPlot' => $vendorDir . '/amenadiel/jpgraph/src/plot/GroupBarPlot.php', + 'Amenadiel\\JpGraph\\Plot\\IconPlot' => $vendorDir . '/amenadiel/jpgraph/src/plot/IconPlot.php', + 'Amenadiel\\JpGraph\\Plot\\LegendStyle' => $vendorDir . '/amenadiel/jpgraph/src/plot/LegendStyle.php', + 'Amenadiel\\JpGraph\\Plot\\LineErrorPlot' => $vendorDir . '/amenadiel/jpgraph/src/plot/LineErrorPlot.php', + 'Amenadiel\\JpGraph\\Plot\\LinePlot' => $vendorDir . '/amenadiel/jpgraph/src/plot/LinePlot.php', + 'Amenadiel\\JpGraph\\Plot\\MeshInterpolate' => $vendorDir . '/amenadiel/jpgraph/src/plot/MeshInterpolate.php', + 'Amenadiel\\JpGraph\\Plot\\MileStone' => $vendorDir . '/amenadiel/jpgraph/src/plot/MileStone.php', + 'Amenadiel\\JpGraph\\Plot\\PiePlot' => $vendorDir . '/amenadiel/jpgraph/src/plot/PiePlot.php', + 'Amenadiel\\JpGraph\\Plot\\PiePlot3D' => $vendorDir . '/amenadiel/jpgraph/src/plot/PiePlot3D.php', + 'Amenadiel\\JpGraph\\Plot\\PiePlotC' => $vendorDir . '/amenadiel/jpgraph/src/plot/PiePlotC.php', + 'Amenadiel\\JpGraph\\Plot\\Plot' => $vendorDir . '/amenadiel/jpgraph/src/plot/Plot.php', + 'Amenadiel\\JpGraph\\Plot\\PlotBand' => $vendorDir . '/amenadiel/jpgraph/src/plot/PlotBand.php', + 'Amenadiel\\JpGraph\\Plot\\PlotLine' => $vendorDir . '/amenadiel/jpgraph/src/plot/PlotLine.php', + 'Amenadiel\\JpGraph\\Plot\\PlotMark' => $vendorDir . '/amenadiel/jpgraph/src/plot/PlotMark.php', + 'Amenadiel\\JpGraph\\Plot\\PolarPlot' => $vendorDir . '/amenadiel/jpgraph/src/plot/PolarPlot.php', + 'Amenadiel\\JpGraph\\Plot\\RadarPlot' => $vendorDir . '/amenadiel/jpgraph/src/plot/RadarPlot.php', + 'Amenadiel\\JpGraph\\Plot\\ScatterPlot' => $vendorDir . '/amenadiel/jpgraph/src/plot/ScatterPlot.php', + 'Amenadiel\\JpGraph\\Plot\\StockPlot' => $vendorDir . '/amenadiel/jpgraph/src/plot/StockPlot.php', + 'Amenadiel\\JpGraph\\Plot\\WindrosePlot' => $vendorDir . '/amenadiel/jpgraph/src/plot/WindrosePlot.php', + 'Amenadiel\\JpGraph\\Text\\CanvasRectangleText' => $vendorDir . '/amenadiel/jpgraph/src/text/CanvasRectangleText.php', + 'Amenadiel\\JpGraph\\Text\\GB2312toUTF8' => $vendorDir . '/amenadiel/jpgraph/src/text/GB2312toUTF8.php', + 'Amenadiel\\JpGraph\\Text\\GTextTable' => $vendorDir . '/amenadiel/jpgraph/src/text/GTextTable.php', + 'Amenadiel\\JpGraph\\Text\\GTextTableCell' => $vendorDir . '/amenadiel/jpgraph/src/text/GTextTableCell.php', + 'Amenadiel\\JpGraph\\Text\\GraphTabTitle' => $vendorDir . '/amenadiel/jpgraph/src/text/GraphTabTitle.php', + 'Amenadiel\\JpGraph\\Text\\LanguageConv' => $vendorDir . '/amenadiel/jpgraph/src/text/LanguageConv.php', + 'Amenadiel\\JpGraph\\Text\\SuperScriptText' => $vendorDir . '/amenadiel/jpgraph/src/text/SuperScriptText.php', + 'Amenadiel\\JpGraph\\Text\\TTF' => $vendorDir . '/amenadiel/jpgraph/src/text/TTF.php', + 'Amenadiel\\JpGraph\\Text\\Text' => $vendorDir . '/amenadiel/jpgraph/src/text/Text.php', + 'Amenadiel\\JpGraph\\Text\\TextProperty' => $vendorDir . '/amenadiel/jpgraph/src/text/TextProperty.php', + 'Amenadiel\\JpGraph\\Text\\TextPropertyBelow' => $vendorDir . '/amenadiel/jpgraph/src/text/TextPropertyBelow.php', + 'Amenadiel\\JpGraph\\Themes\\AquaTheme' => $vendorDir . '/amenadiel/jpgraph/src/themes/AquaTheme.php', + 'Amenadiel\\JpGraph\\Themes\\GreenTheme' => $vendorDir . '/amenadiel/jpgraph/src/themes/GreenTheme.php', + 'Amenadiel\\JpGraph\\Themes\\OceanTheme' => $vendorDir . '/amenadiel/jpgraph/src/themes/OceanTheme.php', + 'Amenadiel\\JpGraph\\Themes\\OrangeTheme' => $vendorDir . '/amenadiel/jpgraph/src/themes/OrangeTheme.php', + 'Amenadiel\\JpGraph\\Themes\\PastelTheme' => $vendorDir . '/amenadiel/jpgraph/src/themes/PastelTheme.php', + 'Amenadiel\\JpGraph\\Themes\\RoseTheme' => $vendorDir . '/amenadiel/jpgraph/src/themes/RoseTheme.php', + 'Amenadiel\\JpGraph\\Themes\\SoftyTheme' => $vendorDir . '/amenadiel/jpgraph/src/themes/SoftyTheme.php', + 'Amenadiel\\JpGraph\\Themes\\Theme' => $vendorDir . '/amenadiel/jpgraph/src/themes/Theme.php', + 'Amenadiel\\JpGraph\\Themes\\UniversalTheme' => $vendorDir . '/amenadiel/jpgraph/src/themes/UniversalTheme.php', + 'Amenadiel\\JpGraph\\Themes\\VividTheme' => $vendorDir . '/amenadiel/jpgraph/src/themes/VividTheme.php', + 'Amenadiel\\JpGraph\\Util\\Bezier' => $vendorDir . '/amenadiel/jpgraph/src/util/Bezier.php', + 'Amenadiel\\JpGraph\\Util\\ColorFactory' => $vendorDir . '/amenadiel/jpgraph/src/util/ColorFactory.php', + 'Amenadiel\\JpGraph\\Util\\DateLocale' => $vendorDir . '/amenadiel/jpgraph/src/util/DateLocale.php', + 'Amenadiel\\JpGraph\\Util\\DateScaleUtils' => $vendorDir . '/amenadiel/jpgraph/src/util/DateScaleUtils.php', + 'Amenadiel\\JpGraph\\Util\\ErrMsgText' => $vendorDir . '/amenadiel/jpgraph/src/util/ErrMsgText.php', + 'Amenadiel\\JpGraph\\Util\\FlagCache' => $vendorDir . '/amenadiel/jpgraph/src/util/FlagCache.php', + 'Amenadiel\\JpGraph\\Util\\FuncGenerator' => $vendorDir . '/amenadiel/jpgraph/src/util/FuncGenerator.php', + 'Amenadiel\\JpGraph\\Util\\GanttConstraint' => $vendorDir . '/amenadiel/jpgraph/src/util/GanttConstraint.php', + 'Amenadiel\\JpGraph\\Util\\JpGraphErrObject' => $vendorDir . '/amenadiel/jpgraph/src/util/JpGraphErrObject.php', + 'Amenadiel\\JpGraph\\Util\\JpGraphErrObjectImg' => $vendorDir . '/amenadiel/jpgraph/src/util/JpGraphErrObjectImg.php', + 'Amenadiel\\JpGraph\\Util\\JpGraphError' => $vendorDir . '/amenadiel/jpgraph/src/util/JpGraphError.php', + 'Amenadiel\\JpGraph\\Util\\JpGraphException' => $vendorDir . '/amenadiel/jpgraph/src/util/JpGraphException.php', + 'Amenadiel\\JpGraph\\Util\\JpGraphExceptionL' => $vendorDir . '/amenadiel/jpgraph/src/util/JpGraphExceptionL.php', + 'Amenadiel\\JpGraph\\Util\\JpgTimer' => $vendorDir . '/amenadiel/jpgraph/src/util/JpgTimer.php', + 'Amenadiel\\JpGraph\\Util\\LinearRegression' => $vendorDir . '/amenadiel/jpgraph/src/util/LinearRegression.php', + 'Amenadiel\\JpGraph\\Util\\RGB' => $vendorDir . '/amenadiel/jpgraph/src/util/RGB.php', + 'Amenadiel\\JpGraph\\Util\\ReadFileData' => $vendorDir . '/amenadiel/jpgraph/src/util/ReadFileData.php', + 'Amenadiel\\JpGraph\\Util\\Rectangle' => $vendorDir . '/amenadiel/jpgraph/src/util/Rectangle.php', + 'Amenadiel\\JpGraph\\Util\\Spline' => $vendorDir . '/amenadiel/jpgraph/src/util/Spline.php', + 'Console_Color2' => $vendorDir . '/pear/console_color2/Console/Color2.php', + 'Console_Table' => $vendorDir . '/pear/console_table/Table.php', + 'Dapphp\\Radius\\EAPPacket' => $vendorDir . '/dapphp/radius/src/EAPPacket.php', + 'Dapphp\\Radius\\MsChapV2Packet' => $vendorDir . '/dapphp/radius/src/MsChapV2Packet.php', + 'Dapphp\\Radius\\Radius' => $vendorDir . '/dapphp/radius/src/Radius.php', + 'Dapphp\\Radius\\VendorId' => $vendorDir . '/dapphp/radius/src/VendorId.php', + 'Datamatrix' => $vendorDir . '/tecnickcom/tcpdf/include/barcodes/datamatrix.php', + 'EasyPeasyICS' => $vendorDir . '/phpmailer/phpmailer/extras/EasyPeasyICS.php', + 'GeSHi' => $vendorDir . '/easybook/geshi/geshi.php', + 'HTMLPurifier' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier.php', + 'HTMLPurifier_Arborize' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Arborize.php', + 'HTMLPurifier_AttrCollections' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrCollections.php', + 'HTMLPurifier_AttrDef' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef.php', + 'HTMLPurifier_AttrDef_CSS' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS.php', + 'HTMLPurifier_AttrDef_CSS_AlphaValue' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/AlphaValue.php', + 'HTMLPurifier_AttrDef_CSS_Background' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Background.php', + 'HTMLPurifier_AttrDef_CSS_BackgroundPosition' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/BackgroundPosition.php', + 'HTMLPurifier_AttrDef_CSS_Border' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Border.php', + 'HTMLPurifier_AttrDef_CSS_Color' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Color.php', + 'HTMLPurifier_AttrDef_CSS_Composite' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Composite.php', + 'HTMLPurifier_AttrDef_CSS_DenyElementDecorator' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php', + 'HTMLPurifier_AttrDef_CSS_Filter' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Filter.php', + 'HTMLPurifier_AttrDef_CSS_Font' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Font.php', + 'HTMLPurifier_AttrDef_CSS_FontFamily' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/FontFamily.php', + 'HTMLPurifier_AttrDef_CSS_Ident' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Ident.php', + 'HTMLPurifier_AttrDef_CSS_ImportantDecorator' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/ImportantDecorator.php', + 'HTMLPurifier_AttrDef_CSS_Length' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Length.php', + 'HTMLPurifier_AttrDef_CSS_ListStyle' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/ListStyle.php', + 'HTMLPurifier_AttrDef_CSS_Multiple' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Multiple.php', + 'HTMLPurifier_AttrDef_CSS_Number' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Number.php', + 'HTMLPurifier_AttrDef_CSS_Percentage' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Percentage.php', + 'HTMLPurifier_AttrDef_CSS_TextDecoration' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/TextDecoration.php', + 'HTMLPurifier_AttrDef_CSS_URI' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/URI.php', + 'HTMLPurifier_AttrDef_Clone' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Clone.php', + 'HTMLPurifier_AttrDef_Enum' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Enum.php', + 'HTMLPurifier_AttrDef_HTML_Bool' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Bool.php', + 'HTMLPurifier_AttrDef_HTML_Class' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Class.php', + 'HTMLPurifier_AttrDef_HTML_Color' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Color.php', + 'HTMLPurifier_AttrDef_HTML_FrameTarget' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/FrameTarget.php', + 'HTMLPurifier_AttrDef_HTML_ID' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/ID.php', + 'HTMLPurifier_AttrDef_HTML_Length' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Length.php', + 'HTMLPurifier_AttrDef_HTML_LinkTypes' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/LinkTypes.php', + 'HTMLPurifier_AttrDef_HTML_MultiLength' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/MultiLength.php', + 'HTMLPurifier_AttrDef_HTML_Nmtokens' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Nmtokens.php', + 'HTMLPurifier_AttrDef_HTML_Pixels' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Pixels.php', + 'HTMLPurifier_AttrDef_Integer' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Integer.php', + 'HTMLPurifier_AttrDef_Lang' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Lang.php', + 'HTMLPurifier_AttrDef_Switch' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Switch.php', + 'HTMLPurifier_AttrDef_Text' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Text.php', + 'HTMLPurifier_AttrDef_URI' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI.php', + 'HTMLPurifier_AttrDef_URI_Email' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Email.php', + 'HTMLPurifier_AttrDef_URI_Email_SimpleCheck' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Email/SimpleCheck.php', + 'HTMLPurifier_AttrDef_URI_Host' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Host.php', + 'HTMLPurifier_AttrDef_URI_IPv4' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/IPv4.php', + 'HTMLPurifier_AttrDef_URI_IPv6' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/IPv6.php', + 'HTMLPurifier_AttrTransform' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform.php', + 'HTMLPurifier_AttrTransform_Background' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Background.php', + 'HTMLPurifier_AttrTransform_BdoDir' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/BdoDir.php', + 'HTMLPurifier_AttrTransform_BgColor' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/BgColor.php', + 'HTMLPurifier_AttrTransform_BoolToCSS' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/BoolToCSS.php', + 'HTMLPurifier_AttrTransform_Border' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Border.php', + 'HTMLPurifier_AttrTransform_EnumToCSS' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/EnumToCSS.php', + 'HTMLPurifier_AttrTransform_ImgRequired' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/ImgRequired.php', + 'HTMLPurifier_AttrTransform_ImgSpace' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/ImgSpace.php', + 'HTMLPurifier_AttrTransform_Input' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Input.php', + 'HTMLPurifier_AttrTransform_Lang' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Lang.php', + 'HTMLPurifier_AttrTransform_Length' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Length.php', + 'HTMLPurifier_AttrTransform_Name' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Name.php', + 'HTMLPurifier_AttrTransform_NameSync' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/NameSync.php', + 'HTMLPurifier_AttrTransform_Nofollow' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Nofollow.php', + 'HTMLPurifier_AttrTransform_SafeEmbed' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/SafeEmbed.php', + 'HTMLPurifier_AttrTransform_SafeObject' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/SafeObject.php', + 'HTMLPurifier_AttrTransform_SafeParam' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/SafeParam.php', + 'HTMLPurifier_AttrTransform_ScriptRequired' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/ScriptRequired.php', + 'HTMLPurifier_AttrTransform_TargetBlank' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/TargetBlank.php', + 'HTMLPurifier_AttrTransform_TargetNoreferrer' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/TargetNoreferrer.php', + 'HTMLPurifier_AttrTransform_Textarea' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Textarea.php', + 'HTMLPurifier_AttrTypes' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTypes.php', + 'HTMLPurifier_AttrValidator' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrValidator.php', + 'HTMLPurifier_Bootstrap' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Bootstrap.php', + 'HTMLPurifier_CSSDefinition' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/CSSDefinition.php', + 'HTMLPurifier_ChildDef' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef.php', + 'HTMLPurifier_ChildDef_Chameleon' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Chameleon.php', + 'HTMLPurifier_ChildDef_Custom' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Custom.php', + 'HTMLPurifier_ChildDef_Empty' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Empty.php', + 'HTMLPurifier_ChildDef_List' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/List.php', + 'HTMLPurifier_ChildDef_Optional' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Optional.php', + 'HTMLPurifier_ChildDef_Required' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Required.php', + 'HTMLPurifier_ChildDef_StrictBlockquote' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/StrictBlockquote.php', + 'HTMLPurifier_ChildDef_Table' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Table.php', + 'HTMLPurifier_Config' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Config.php', + 'HTMLPurifier_ConfigSchema' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema.php', + 'HTMLPurifier_ConfigSchema_Builder_ConfigSchema' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Builder/ConfigSchema.php', + 'HTMLPurifier_ConfigSchema_Builder_Xml' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Builder/Xml.php', + 'HTMLPurifier_ConfigSchema_Exception' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Exception.php', + 'HTMLPurifier_ConfigSchema_Interchange' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange.php', + 'HTMLPurifier_ConfigSchema_InterchangeBuilder' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/InterchangeBuilder.php', + 'HTMLPurifier_ConfigSchema_Interchange_Directive' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange/Directive.php', + 'HTMLPurifier_ConfigSchema_Interchange_Id' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange/Id.php', + 'HTMLPurifier_ConfigSchema_Validator' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Validator.php', + 'HTMLPurifier_ConfigSchema_ValidatorAtom' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/ValidatorAtom.php', + 'HTMLPurifier_ContentSets' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/ContentSets.php', + 'HTMLPurifier_Context' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Context.php', + 'HTMLPurifier_Definition' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Definition.php', + 'HTMLPurifier_DefinitionCache' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache.php', + 'HTMLPurifier_DefinitionCacheFactory' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCacheFactory.php', + 'HTMLPurifier_DefinitionCache_Decorator' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator.php', + 'HTMLPurifier_DefinitionCache_Decorator_Cleanup' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator/Cleanup.php', + 'HTMLPurifier_DefinitionCache_Decorator_Memory' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator/Memory.php', + 'HTMLPurifier_DefinitionCache_Null' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Null.php', + 'HTMLPurifier_DefinitionCache_Serializer' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer.php', + 'HTMLPurifier_Doctype' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Doctype.php', + 'HTMLPurifier_DoctypeRegistry' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/DoctypeRegistry.php', + 'HTMLPurifier_ElementDef' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/ElementDef.php', + 'HTMLPurifier_Encoder' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Encoder.php', + 'HTMLPurifier_EntityLookup' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/EntityLookup.php', + 'HTMLPurifier_EntityParser' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/EntityParser.php', + 'HTMLPurifier_ErrorCollector' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/ErrorCollector.php', + 'HTMLPurifier_ErrorStruct' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/ErrorStruct.php', + 'HTMLPurifier_Exception' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Exception.php', + 'HTMLPurifier_Filter' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Filter.php', + 'HTMLPurifier_Filter_ExtractStyleBlocks' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Filter/ExtractStyleBlocks.php', + 'HTMLPurifier_Filter_YouTube' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Filter/YouTube.php', + 'HTMLPurifier_Generator' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Generator.php', + 'HTMLPurifier_HTMLDefinition' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLDefinition.php', + 'HTMLPurifier_HTMLModule' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule.php', + 'HTMLPurifier_HTMLModuleManager' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModuleManager.php', + 'HTMLPurifier_HTMLModule_Bdo' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Bdo.php', + 'HTMLPurifier_HTMLModule_CommonAttributes' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/CommonAttributes.php', + 'HTMLPurifier_HTMLModule_Edit' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Edit.php', + 'HTMLPurifier_HTMLModule_Forms' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Forms.php', + 'HTMLPurifier_HTMLModule_Hypertext' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Hypertext.php', + 'HTMLPurifier_HTMLModule_Iframe' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Iframe.php', + 'HTMLPurifier_HTMLModule_Image' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Image.php', + 'HTMLPurifier_HTMLModule_Legacy' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Legacy.php', + 'HTMLPurifier_HTMLModule_List' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/List.php', + 'HTMLPurifier_HTMLModule_Name' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Name.php', + 'HTMLPurifier_HTMLModule_Nofollow' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Nofollow.php', + 'HTMLPurifier_HTMLModule_NonXMLCommonAttributes' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/NonXMLCommonAttributes.php', + 'HTMLPurifier_HTMLModule_Object' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Object.php', + 'HTMLPurifier_HTMLModule_Presentation' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Presentation.php', + 'HTMLPurifier_HTMLModule_Proprietary' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Proprietary.php', + 'HTMLPurifier_HTMLModule_Ruby' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Ruby.php', + 'HTMLPurifier_HTMLModule_SafeEmbed' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/SafeEmbed.php', + 'HTMLPurifier_HTMLModule_SafeObject' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/SafeObject.php', + 'HTMLPurifier_HTMLModule_SafeScripting' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/SafeScripting.php', + 'HTMLPurifier_HTMLModule_Scripting' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Scripting.php', + 'HTMLPurifier_HTMLModule_StyleAttribute' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/StyleAttribute.php', + 'HTMLPurifier_HTMLModule_Tables' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tables.php', + 'HTMLPurifier_HTMLModule_Target' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Target.php', + 'HTMLPurifier_HTMLModule_TargetBlank' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/TargetBlank.php', + 'HTMLPurifier_HTMLModule_TargetNoreferrer' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/TargetNoreferrer.php', + 'HTMLPurifier_HTMLModule_Text' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Text.php', + 'HTMLPurifier_HTMLModule_Tidy' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy.php', + 'HTMLPurifier_HTMLModule_Tidy_Name' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/Name.php', + 'HTMLPurifier_HTMLModule_Tidy_Proprietary' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/Proprietary.php', + 'HTMLPurifier_HTMLModule_Tidy_Strict' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/Strict.php', + 'HTMLPurifier_HTMLModule_Tidy_Transitional' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/Transitional.php', + 'HTMLPurifier_HTMLModule_Tidy_XHTML' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/XHTML.php', + 'HTMLPurifier_HTMLModule_Tidy_XHTMLAndHTML4' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/XHTMLAndHTML4.php', + 'HTMLPurifier_HTMLModule_XMLCommonAttributes' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/XMLCommonAttributes.php', + 'HTMLPurifier_IDAccumulator' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/IDAccumulator.php', + 'HTMLPurifier_Injector' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Injector.php', + 'HTMLPurifier_Injector_AutoParagraph' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Injector/AutoParagraph.php', + 'HTMLPurifier_Injector_DisplayLinkURI' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Injector/DisplayLinkURI.php', + 'HTMLPurifier_Injector_Linkify' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Injector/Linkify.php', + 'HTMLPurifier_Injector_PurifierLinkify' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Injector/PurifierLinkify.php', + 'HTMLPurifier_Injector_RemoveEmpty' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Injector/RemoveEmpty.php', + 'HTMLPurifier_Injector_RemoveSpansWithoutAttributes' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Injector/RemoveSpansWithoutAttributes.php', + 'HTMLPurifier_Injector_SafeObject' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Injector/SafeObject.php', + 'HTMLPurifier_Language' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Language.php', + 'HTMLPurifier_LanguageFactory' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/LanguageFactory.php', + 'HTMLPurifier_Language_en_x_test' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Language/classes/en-x-test.php', + 'HTMLPurifier_Length' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Length.php', + 'HTMLPurifier_Lexer' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Lexer.php', + 'HTMLPurifier_Lexer_DOMLex' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/DOMLex.php', + 'HTMLPurifier_Lexer_DirectLex' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/DirectLex.php', + 'HTMLPurifier_Lexer_PH5P' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/PH5P.php', + 'HTMLPurifier_Node' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Node.php', + 'HTMLPurifier_Node_Comment' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Node/Comment.php', + 'HTMLPurifier_Node_Element' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Node/Element.php', + 'HTMLPurifier_Node_Text' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Node/Text.php', + 'HTMLPurifier_PercentEncoder' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/PercentEncoder.php', + 'HTMLPurifier_Printer' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer.php', + 'HTMLPurifier_Printer_CSSDefinition' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/CSSDefinition.php', + 'HTMLPurifier_Printer_ConfigForm' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php', + 'HTMLPurifier_Printer_ConfigForm_NullDecorator' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php', + 'HTMLPurifier_Printer_ConfigForm_bool' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php', + 'HTMLPurifier_Printer_ConfigForm_default' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php', + 'HTMLPurifier_Printer_HTMLDefinition' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/HTMLDefinition.php', + 'HTMLPurifier_PropertyList' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/PropertyList.php', + 'HTMLPurifier_PropertyListIterator' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/PropertyListIterator.php', + 'HTMLPurifier_Queue' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Queue.php', + 'HTMLPurifier_Strategy' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Strategy.php', + 'HTMLPurifier_Strategy_Composite' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/Composite.php', + 'HTMLPurifier_Strategy_Core' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/Core.php', + 'HTMLPurifier_Strategy_FixNesting' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/FixNesting.php', + 'HTMLPurifier_Strategy_MakeWellFormed' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/MakeWellFormed.php', + 'HTMLPurifier_Strategy_RemoveForeignElements' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/RemoveForeignElements.php', + 'HTMLPurifier_Strategy_ValidateAttributes' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/ValidateAttributes.php', + 'HTMLPurifier_StringHash' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/StringHash.php', + 'HTMLPurifier_StringHashParser' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/StringHashParser.php', + 'HTMLPurifier_TagTransform' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/TagTransform.php', + 'HTMLPurifier_TagTransform_Font' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/TagTransform/Font.php', + 'HTMLPurifier_TagTransform_Simple' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/TagTransform/Simple.php', + 'HTMLPurifier_Token' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Token.php', + 'HTMLPurifier_TokenFactory' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/TokenFactory.php', + 'HTMLPurifier_Token_Comment' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Token/Comment.php', + 'HTMLPurifier_Token_Empty' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Token/Empty.php', + 'HTMLPurifier_Token_End' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Token/End.php', + 'HTMLPurifier_Token_Start' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Token/Start.php', + 'HTMLPurifier_Token_Tag' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Token/Tag.php', + 'HTMLPurifier_Token_Text' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Token/Text.php', + 'HTMLPurifier_URI' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/URI.php', + 'HTMLPurifier_URIDefinition' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/URIDefinition.php', + 'HTMLPurifier_URIFilter' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter.php', + 'HTMLPurifier_URIFilter_DisableExternal' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/DisableExternal.php', + 'HTMLPurifier_URIFilter_DisableExternalResources' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/DisableExternalResources.php', + 'HTMLPurifier_URIFilter_DisableResources' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/DisableResources.php', + 'HTMLPurifier_URIFilter_HostBlacklist' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/HostBlacklist.php', + 'HTMLPurifier_URIFilter_MakeAbsolute' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/MakeAbsolute.php', + 'HTMLPurifier_URIFilter_Munge' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/Munge.php', + 'HTMLPurifier_URIFilter_SafeIframe' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/SafeIframe.php', + 'HTMLPurifier_URIParser' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/URIParser.php', + 'HTMLPurifier_URIScheme' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme.php', + 'HTMLPurifier_URISchemeRegistry' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/URISchemeRegistry.php', + 'HTMLPurifier_URIScheme_data' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/data.php', + 'HTMLPurifier_URIScheme_file' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/file.php', + 'HTMLPurifier_URIScheme_ftp' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/ftp.php', + 'HTMLPurifier_URIScheme_http' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/http.php', + 'HTMLPurifier_URIScheme_https' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/https.php', + 'HTMLPurifier_URIScheme_mailto' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/mailto.php', + 'HTMLPurifier_URIScheme_news' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/news.php', + 'HTMLPurifier_URIScheme_nntp' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/nntp.php', + 'HTMLPurifier_URIScheme_tel' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/tel.php', + 'HTMLPurifier_UnitConverter' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/UnitConverter.php', + 'HTMLPurifier_VarParser' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/VarParser.php', + 'HTMLPurifier_VarParserException' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/VarParserException.php', + 'HTMLPurifier_VarParser_Flexible' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/VarParser/Flexible.php', + 'HTMLPurifier_VarParser_Native' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/VarParser/Native.php', + 'HTMLPurifier_Zipper' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Zipper.php', + 'LibreNMS\\Component' => $baseDir . '/LibreNMS/Component.php', + 'LibreNMS\\ComposerHelper' => $baseDir . '/LibreNMS/ComposerHelper.php', + 'LibreNMS\\Exceptions\\FileExistsException' => $baseDir . '/LibreNMS/Exceptions/FileExistsException.php', + 'LibreNMS\\Exceptions\\HostExistsException' => $baseDir . '/LibreNMS/Exceptions/HostExistsException.php', + 'LibreNMS\\Exceptions\\HostIpExistsException' => $baseDir . '/LibreNMS/Exceptions/HostIpExistsException.php', + 'LibreNMS\\Exceptions\\HostUnreachableException' => $baseDir . '/LibreNMS/Exceptions/HostUnreachableException.php', + 'LibreNMS\\Exceptions\\HostUnreachablePingException' => $baseDir . '/LibreNMS/Exceptions/HostUnreachablePingException.php', + 'LibreNMS\\Exceptions\\HostUnreachableSnmpException' => $baseDir . '/LibreNMS/Exceptions/HostUnreachableSnmpException.php', + 'LibreNMS\\Exceptions\\InvalidPortAssocModeException' => $baseDir . '/LibreNMS/Exceptions/InvalidPortAssocModeException.php', + 'LibreNMS\\Exceptions\\SnmpVersionUnsupportedException' => $baseDir . '/LibreNMS/Exceptions/SnmpVersionUnsupportedException.php', + 'LibreNMS\\IRCBot' => $baseDir . '/LibreNMS/IRCBot.php', + 'LibreNMS\\ObjectCache' => $baseDir . '/LibreNMS/ObjectCache.php', + 'LibreNMS\\Plugins' => $baseDir . '/LibreNMS/Plugins.php', + 'LibreNMS\\Proc' => $baseDir . '/LibreNMS/Proc.php', + 'LibreNMS\\RRDRecursiveFilterIterator' => $baseDir . '/LibreNMS/RRDRecursiveFilterIterator.php', + 'LibreNMS\\Tests\\AlertTest' => $baseDir . '/tests/AlertingTest.php', + 'LibreNMS\\Tests\\CommonFunctionsTest' => $baseDir . '/tests/CommonFunctionsTest.php', + 'LibreNMS\\Tests\\DiscoveryTest' => $baseDir . '/tests/OSDiscoveryTest.php', + 'LibreNMS\\Tests\\RrdtoolTest' => $baseDir . '/tests/RrdtoolTest.php', + 'LibreNMS\\Tests\\SyslogTest' => $baseDir . '/tests/SyslogTest.php', + 'LibreNMS\\Tests\\YamlTest' => $baseDir . '/tests/YamlTest.php', + 'PDF417' => $vendorDir . '/tecnickcom/tcpdf/include/barcodes/pdf417.php', + 'PHPMailer' => $vendorDir . '/phpmailer/phpmailer/class.phpmailer.php', + 'PHPMailerOAuth' => $vendorDir . '/phpmailer/phpmailer/class.phpmaileroauth.php', + 'PHPMailerOAuthGoogle' => $vendorDir . '/phpmailer/phpmailer/class.phpmaileroauthgoogle.php', + 'POP3' => $vendorDir . '/phpmailer/phpmailer/class.pop3.php', + 'PhpAmqpLib\\Channel\\AMQPChannel' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Channel/AMQPChannel.php', + 'PhpAmqpLib\\Channel\\AbstractChannel' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Channel/AbstractChannel.php', + 'PhpAmqpLib\\Connection\\AMQPConnection' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AMQPConnection.php', + 'PhpAmqpLib\\Connection\\AMQPSSLConnection' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AMQPSSLConnection.php', + 'PhpAmqpLib\\Connection\\AMQPSocketConnection' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AMQPSocketConnection.php', + 'PhpAmqpLib\\Connection\\AMQPStreamConnection' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AMQPStreamConnection.php', + 'PhpAmqpLib\\Connection\\AbstractConnection' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AbstractConnection.php', + 'PhpAmqpLib\\Exception\\AMQPChannelException' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Exception/AMQPChannelException.php', + 'PhpAmqpLib\\Exception\\AMQPConnectionException' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Exception/AMQPConnectionException.php', + 'PhpAmqpLib\\Exception\\AMQPException' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Exception/AMQPException.php', + 'PhpAmqpLib\\Exception\\AMQPExceptionInterface' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Exception/AMQPExceptionInterface.php', + 'PhpAmqpLib\\Exception\\AMQPOutOfBoundsException' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Exception/AMQPOutOfBoundsException.php', + 'PhpAmqpLib\\Exception\\AMQPProtocolChannelException' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Exception/AMQPProtocolChannelException.php', + 'PhpAmqpLib\\Exception\\AMQPProtocolConnectionException' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Exception/AMQPProtocolConnectionException.php', + 'PhpAmqpLib\\Exception\\AMQPProtocolException' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Exception/AMQPProtocolException.php', + 'PhpAmqpLib\\Exception\\AMQPRuntimeException' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Exception/AMQPRuntimeException.php', + 'PhpAmqpLib\\Exception\\AMQPTimeoutException' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Exception/AMQPTimeoutException.php', + 'PhpAmqpLib\\Helper\\MiscHelper' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Helper/MiscHelper.php', + 'PhpAmqpLib\\Helper\\Protocol\\MethodMap080' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Helper/Protocol/MethodMap080.php', + 'PhpAmqpLib\\Helper\\Protocol\\MethodMap091' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Helper/Protocol/MethodMap091.php', + 'PhpAmqpLib\\Helper\\Protocol\\Protocol080' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Helper/Protocol/Protocol080.php', + 'PhpAmqpLib\\Helper\\Protocol\\Protocol091' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Helper/Protocol/Protocol091.php', + 'PhpAmqpLib\\Helper\\Protocol\\Wait080' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Helper/Protocol/Wait080.php', + 'PhpAmqpLib\\Helper\\Protocol\\Wait091' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Helper/Protocol/Wait091.php', + 'PhpAmqpLib\\Message\\AMQPMessage' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Message/AMQPMessage.php', + 'PhpAmqpLib\\Tests\\Functional\\AbstractPublishConsumeTest' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Functional/AbstractPublishConsumeTest.php', + 'PhpAmqpLib\\Tests\\Functional\\Bug40Test' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Functional/Bug40Test.php', + 'PhpAmqpLib\\Tests\\Functional\\Bug49Test' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Functional/Bug49Test.php', + 'PhpAmqpLib\\Tests\\Functional\\FileTransferTest' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Functional/FileTransferTest.php', + 'PhpAmqpLib\\Tests\\Functional\\SocketPublishConsumeTest' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Functional/SocketPublishConsumeTest.php', + 'PhpAmqpLib\\Tests\\Functional\\StreamPublishConsumeTest' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Functional/StreamPublishConsumeTest.php', + 'PhpAmqpLib\\Tests\\Unit\\AMQPWriterTest' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Unit/Wire/AMQPWriterTest.php', + 'PhpAmqpLib\\Tests\\Unit\\Helper\\Writer\\Protocol091Test' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Unit/Helper/Protocol/Protocol091Test.php', + 'PhpAmqpLib\\Tests\\Unit\\WireTest' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Unit/WireTest.php', + 'PhpAmqpLib\\Wire\\AMQPDecimal' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Wire/AMQPDecimal.php', + 'PhpAmqpLib\\Wire\\AMQPReader' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Wire/AMQPReader.php', + 'PhpAmqpLib\\Wire\\AMQPWriter' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Wire/AMQPWriter.php', + 'PhpAmqpLib\\Wire\\Constants080' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Wire/Constants080.php', + 'PhpAmqpLib\\Wire\\Constants091' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Wire/Constants091.php', + 'PhpAmqpLib\\Wire\\GenericContent' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Wire/GenericContent.php', + 'PhpAmqpLib\\Wire\\IO\\AbstractIO' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/AbstractIO.php', + 'PhpAmqpLib\\Wire\\IO\\SocketIO' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/SocketIO.php', + 'PhpAmqpLib\\Wire\\IO\\StreamIO' => $vendorDir . '/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php', + 'Phpass\\PasswordHash' => $vendorDir . '/xjtuwangke/passwordhash/src/Phpass/PasswordHash.php', + 'QRcode' => $vendorDir . '/tecnickcom/tcpdf/include/barcodes/qrcode.php', + 'SMTP' => $vendorDir . '/phpmailer/phpmailer/class.smtp.php', + 'SlimFlashTest' => $vendorDir . '/slim/slim/tests/Middleware/FlashTest.php', + 'SlimHttpUtilTest' => $vendorDir . '/slim/slim/tests/Http/UtilTest.php', + 'SlimTest' => $vendorDir . '/slim/slim/tests/SlimTest.php', + 'Slim\\Environment' => $vendorDir . '/slim/slim/Slim/Environment.php', + 'Slim\\Exception\\Pass' => $vendorDir . '/slim/slim/Slim/Exception/Pass.php', + 'Slim\\Exception\\Stop' => $vendorDir . '/slim/slim/Slim/Exception/Stop.php', + 'Slim\\Helper\\Set' => $vendorDir . '/slim/slim/Slim/Helper/Set.php', + 'Slim\\Http\\Cookies' => $vendorDir . '/slim/slim/Slim/Http/Cookies.php', + 'Slim\\Http\\Headers' => $vendorDir . '/slim/slim/Slim/Http/Headers.php', + 'Slim\\Http\\Request' => $vendorDir . '/slim/slim/Slim/Http/Request.php', + 'Slim\\Http\\Response' => $vendorDir . '/slim/slim/Slim/Http/Response.php', + 'Slim\\Http\\Util' => $vendorDir . '/slim/slim/Slim/Http/Util.php', + 'Slim\\Log' => $vendorDir . '/slim/slim/Slim/Log.php', + 'Slim\\LogWriter' => $vendorDir . '/slim/slim/Slim/LogWriter.php', + 'Slim\\Middleware' => $vendorDir . '/slim/slim/Slim/Middleware.php', + 'Slim\\Middleware\\ContentTypes' => $vendorDir . '/slim/slim/Slim/Middleware/ContentTypes.php', + 'Slim\\Middleware\\Flash' => $vendorDir . '/slim/slim/Slim/Middleware/Flash.php', + 'Slim\\Middleware\\MethodOverride' => $vendorDir . '/slim/slim/Slim/Middleware/MethodOverride.php', + 'Slim\\Middleware\\PrettyExceptions' => $vendorDir . '/slim/slim/Slim/Middleware/PrettyExceptions.php', + 'Slim\\Middleware\\SessionCookie' => $vendorDir . '/slim/slim/Slim/Middleware/SessionCookie.php', + 'Slim\\Route' => $vendorDir . '/slim/slim/Slim/Route.php', + 'Slim\\Router' => $vendorDir . '/slim/slim/Slim/Router.php', + 'Slim\\Slim' => $vendorDir . '/slim/slim/Slim/Slim.php', + 'Slim\\View' => $vendorDir . '/slim/slim/Slim/View.php', + 'Symfony\\Component\\Yaml\\Dumper' => $vendorDir . '/symfony/yaml/Dumper.php', + 'Symfony\\Component\\Yaml\\Escaper' => $vendorDir . '/symfony/yaml/Escaper.php', + 'Symfony\\Component\\Yaml\\Exception\\DumpException' => $vendorDir . '/symfony/yaml/Exception/DumpException.php', + 'Symfony\\Component\\Yaml\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/yaml/Exception/ExceptionInterface.php', + 'Symfony\\Component\\Yaml\\Exception\\ParseException' => $vendorDir . '/symfony/yaml/Exception/ParseException.php', + 'Symfony\\Component\\Yaml\\Exception\\RuntimeException' => $vendorDir . '/symfony/yaml/Exception/RuntimeException.php', + 'Symfony\\Component\\Yaml\\Inline' => $vendorDir . '/symfony/yaml/Inline.php', + 'Symfony\\Component\\Yaml\\Parser' => $vendorDir . '/symfony/yaml/Parser.php', + 'Symfony\\Component\\Yaml\\Unescaper' => $vendorDir . '/symfony/yaml/Unescaper.php', + 'Symfony\\Component\\Yaml\\Yaml' => $vendorDir . '/symfony/yaml/Yaml.php', + 'TCPDF' => $vendorDir . '/tecnickcom/tcpdf/tcpdf.php', + 'TCPDF2DBarcode' => $vendorDir . '/tecnickcom/tcpdf/tcpdf_barcodes_2d.php', + 'TCPDFBarcode' => $vendorDir . '/tecnickcom/tcpdf/tcpdf_barcodes_1d.php', + 'TCPDF_COLORS' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_colors.php', + 'TCPDF_FILTERS' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_filters.php', + 'TCPDF_FONTS' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_fonts.php', + 'TCPDF_FONT_DATA' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_font_data.php', + 'TCPDF_IMAGES' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_images.php', + 'TCPDF_IMPORT' => $vendorDir . '/tecnickcom/tcpdf/tcpdf_import.php', + 'TCPDF_PARSER' => $vendorDir . '/tecnickcom/tcpdf/tcpdf_parser.php', + 'TCPDF_STATIC' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_static.php', + 'ntlm_sasl_client_class' => $vendorDir . '/phpmailer/phpmailer/extras/ntlm_sasl_client.php', + 'phpmailerException' => $vendorDir . '/phpmailer/phpmailer/class.phpmailer.php', +); diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php new file mode 100644 index 0000000000..c25686b153 --- /dev/null +++ b/vendor/composer/autoload_files.php @@ -0,0 +1,10 @@ + $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php', +); diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php new file mode 100644 index 0000000000..f15785747c --- /dev/null +++ b/vendor/composer/autoload_namespaces.php @@ -0,0 +1,14 @@ + array($vendorDir . '/slim/slim'), + 'Phpass' => array($vendorDir . '/xjtuwangke/passwordhash/src'), + 'PhpAmqpLib' => array($vendorDir . '/php-amqplib/php-amqplib'), + 'HTMLPurifier' => array($vendorDir . '/ezyang/htmlpurifier/library'), + 'Console_Color2' => array($vendorDir . '/pear/console_color2'), +); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php new file mode 100644 index 0000000000..a695d25a66 --- /dev/null +++ b/vendor/composer/autoload_psr4.php @@ -0,0 +1,20 @@ + array($vendorDir . '/symfony/yaml'), + 'LibreNMS\\Tests\\' => array($baseDir . '/tests'), + 'LibreNMS\\' => array($baseDir . '/LibreNMS'), + 'Dapphp\\Radius\\' => array($vendorDir . '/dapphp/radius/src'), + 'Amenadiel\\JpGraph\\Util\\' => array($vendorDir . '/amenadiel/jpgraph/src/util'), + 'Amenadiel\\JpGraph\\Themes\\' => array($vendorDir . '/amenadiel/jpgraph/src/themes'), + 'Amenadiel\\JpGraph\\Text\\' => array($vendorDir . '/amenadiel/jpgraph/src/text'), + 'Amenadiel\\JpGraph\\Plot\\' => array($vendorDir . '/amenadiel/jpgraph/src/plot'), + 'Amenadiel\\JpGraph\\Image\\' => array($vendorDir . '/amenadiel/jpgraph/src/image'), + 'Amenadiel\\JpGraph\\Graph\\' => array($vendorDir . '/amenadiel/jpgraph/src/graph'), + 'Amenadiel\\JpGraph\\' => array($vendorDir . '/amenadiel/jpgraph/src'), +); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php new file mode 100644 index 0000000000..1477e16b46 --- /dev/null +++ b/vendor/composer/autoload_real.php @@ -0,0 +1,70 @@ += 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); + if ($useStaticLoader) { + require_once __DIR__ . '/autoload_static.php'; + + call_user_func(\Composer\Autoload\ComposerStaticInit272059f49825f0adab6de160cf59ca72::getInitializer($loader)); + } else { + $map = require __DIR__ . '/autoload_namespaces.php'; + foreach ($map as $namespace => $path) { + $loader->set($namespace, $path); + } + + $map = require __DIR__ . '/autoload_psr4.php'; + foreach ($map as $namespace => $path) { + $loader->setPsr4($namespace, $path); + } + + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } + } + + $loader->register(true); + + if ($useStaticLoader) { + $includeFiles = Composer\Autoload\ComposerStaticInit272059f49825f0adab6de160cf59ca72::$files; + } else { + $includeFiles = require __DIR__ . '/autoload_files.php'; + } + foreach ($includeFiles as $fileIdentifier => $file) { + composerRequire272059f49825f0adab6de160cf59ca72($fileIdentifier, $file); + } + + return $loader; + } +} + +function composerRequire272059f49825f0adab6de160cf59ca72($fileIdentifier, $file) +{ + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + require $file; + + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + } +} diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php new file mode 100644 index 0000000000..f5ce88204c --- /dev/null +++ b/vendor/composer/autoload_static.php @@ -0,0 +1,633 @@ + __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php', + ); + + public static $prefixLengthsPsr4 = array ( + 'S' => + array ( + 'Symfony\\Component\\Yaml\\' => 23, + ), + 'L' => + array ( + 'LibreNMS\\Tests\\' => 15, + 'LibreNMS\\' => 9, + ), + 'D' => + array ( + 'Dapphp\\Radius\\' => 14, + ), + 'A' => + array ( + 'Amenadiel\\JpGraph\\Util\\' => 23, + 'Amenadiel\\JpGraph\\Themes\\' => 25, + 'Amenadiel\\JpGraph\\Text\\' => 23, + 'Amenadiel\\JpGraph\\Plot\\' => 23, + 'Amenadiel\\JpGraph\\Image\\' => 24, + 'Amenadiel\\JpGraph\\Graph\\' => 24, + 'Amenadiel\\JpGraph\\' => 18, + ), + ); + + public static $prefixDirsPsr4 = array ( + 'Symfony\\Component\\Yaml\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/yaml', + ), + 'LibreNMS\\Tests\\' => + array ( + 0 => __DIR__ . '/../..' . '/tests', + ), + 'LibreNMS\\' => + array ( + 0 => __DIR__ . '/../..' . '/LibreNMS', + ), + 'Dapphp\\Radius\\' => + array ( + 0 => __DIR__ . '/..' . '/dapphp/radius/src', + ), + 'Amenadiel\\JpGraph\\Util\\' => + array ( + 0 => __DIR__ . '/..' . '/amenadiel/jpgraph/src/util', + ), + 'Amenadiel\\JpGraph\\Themes\\' => + array ( + 0 => __DIR__ . '/..' . '/amenadiel/jpgraph/src/themes', + ), + 'Amenadiel\\JpGraph\\Text\\' => + array ( + 0 => __DIR__ . '/..' . '/amenadiel/jpgraph/src/text', + ), + 'Amenadiel\\JpGraph\\Plot\\' => + array ( + 0 => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot', + ), + 'Amenadiel\\JpGraph\\Image\\' => + array ( + 0 => __DIR__ . '/..' . '/amenadiel/jpgraph/src/image', + ), + 'Amenadiel\\JpGraph\\Graph\\' => + array ( + 0 => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph', + ), + 'Amenadiel\\JpGraph\\' => + array ( + 0 => __DIR__ . '/..' . '/amenadiel/jpgraph/src', + ), + ); + + public static $prefixesPsr0 = array ( + 'S' => + array ( + 'Slim' => + array ( + 0 => __DIR__ . '/..' . '/slim/slim', + ), + ), + 'P' => + array ( + 'Phpass' => + array ( + 0 => __DIR__ . '/..' . '/xjtuwangke/passwordhash/src', + ), + 'PhpAmqpLib' => + array ( + 0 => __DIR__ . '/..' . '/php-amqplib/php-amqplib', + ), + ), + 'H' => + array ( + 'HTMLPurifier' => + array ( + 0 => __DIR__ . '/..' . '/ezyang/htmlpurifier/library', + ), + ), + 'C' => + array ( + 'Console_Color2' => + array ( + 0 => __DIR__ . '/..' . '/pear/console_color2', + ), + ), + ); + + public static $classMap = array ( + 'Amenadiel\\JpGraph\\Graph\\Axis' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/Axis.php', + 'Amenadiel\\JpGraph\\Graph\\AxisPrototype' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/AxisPrototype.php', + 'Amenadiel\\JpGraph\\Graph\\CanvasGraph' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/CanvasGraph.php', + 'Amenadiel\\JpGraph\\Graph\\CanvasScale' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/CanvasScale.php', + 'Amenadiel\\JpGraph\\Graph\\DateScale' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/DateScale.php', + 'Amenadiel\\JpGraph\\Graph\\GanttActivityInfo' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/GanttActivityInfo.php', + 'Amenadiel\\JpGraph\\Graph\\GanttGraph' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/GanttGraph.php', + 'Amenadiel\\JpGraph\\Graph\\GanttScale' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/GanttScale.php', + 'Amenadiel\\JpGraph\\Graph\\Graph' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/Graph.php', + 'Amenadiel\\JpGraph\\Graph\\Grid' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/Grid.php', + 'Amenadiel\\JpGraph\\Graph\\HeaderProperty' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/HeaderProperty.php', + 'Amenadiel\\JpGraph\\Graph\\HorizontalGridLine' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/HorizontalGridLine.php', + 'Amenadiel\\JpGraph\\Graph\\Legend' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/Legend.php', + 'Amenadiel\\JpGraph\\Graph\\LineProperty' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/LineProperty.php', + 'Amenadiel\\JpGraph\\Graph\\LinearScale' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/LinearScale.php', + 'Amenadiel\\JpGraph\\Graph\\LinearTicks' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/LinearTicks.php', + 'Amenadiel\\JpGraph\\Graph\\LogScale' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/LogScale.php', + 'Amenadiel\\JpGraph\\Graph\\LogTicks' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/LogTicks.php', + 'Amenadiel\\JpGraph\\Graph\\MGraph' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/MGraph.php', + 'Amenadiel\\JpGraph\\Graph\\PieGraph' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/PieGraph.php', + 'Amenadiel\\JpGraph\\Graph\\PolarAxis' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/PolarAxis.php', + 'Amenadiel\\JpGraph\\Graph\\PolarGraph' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/PolarGraph.php', + 'Amenadiel\\JpGraph\\Graph\\PolarLogScale' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/PolarLogScale.php', + 'Amenadiel\\JpGraph\\Graph\\PolarScale' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/PolarScale.php', + 'Amenadiel\\JpGraph\\Graph\\RadarAxis' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/RadarAxis.php', + 'Amenadiel\\JpGraph\\Graph\\RadarGraph' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/RadarGraph.php', + 'Amenadiel\\JpGraph\\Graph\\RadarGrid' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/RadarGrid.php', + 'Amenadiel\\JpGraph\\Graph\\RadarLinearTicks' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/RadarLinearTicks.php', + 'Amenadiel\\JpGraph\\Graph\\RadarLogTicks' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/RadarLogTicks.php', + 'Amenadiel\\JpGraph\\Graph\\RadarPlot' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/RadarGrid.php', + 'Amenadiel\\JpGraph\\Graph\\RectPattern' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/RectPattern.php', + 'Amenadiel\\JpGraph\\Graph\\RectPattern3DPlane' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/RectPattern3DPlane.php', + 'Amenadiel\\JpGraph\\Graph\\RectPatternCross' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/RectPatternCross.php', + 'Amenadiel\\JpGraph\\Graph\\RectPatternDiagCross' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/RectPatternDiagCross.php', + 'Amenadiel\\JpGraph\\Graph\\RectPatternFactory' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/RectPatternFactory.php', + 'Amenadiel\\JpGraph\\Graph\\RectPatternHor' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/RectPatternHor.php', + 'Amenadiel\\JpGraph\\Graph\\RectPatternLDiag' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/RectPatternLDiag.php', + 'Amenadiel\\JpGraph\\Graph\\RectPatternRDiag' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/RectPatternRDiag.php', + 'Amenadiel\\JpGraph\\Graph\\RectPatternSolid' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/RectPatternSolid.php', + 'Amenadiel\\JpGraph\\Graph\\RectPatternVert' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/RectPatternVert.php', + 'Amenadiel\\JpGraph\\Graph\\Shape' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/Shape.php', + 'Amenadiel\\JpGraph\\Graph\\SymChar' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/SymChar.php', + 'Amenadiel\\JpGraph\\Graph\\Ticks' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/Ticks.php', + 'Amenadiel\\JpGraph\\Graph\\WindroseGraph' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/WindroseGraph.php', + 'Amenadiel\\JpGraph\\Graph\\WindrosePlotScale' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/graph/WindrosePlotScale.php', + 'Amenadiel\\JpGraph\\Image\\DigitalLED74' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/image/DigitalLED74.php', + 'Amenadiel\\JpGraph\\Image\\FieldArrow' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/image/FieldArrow.php', + 'Amenadiel\\JpGraph\\Image\\FlagImages' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/image/FlagImages.php', + 'Amenadiel\\JpGraph\\Image\\Footer' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/image/Footer.php', + 'Amenadiel\\JpGraph\\Image\\GanttLink' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/image/GanttLink.php', + 'Amenadiel\\JpGraph\\Image\\IconImage' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/image/IconImage.php', + 'Amenadiel\\JpGraph\\Image\\Image' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/image/Image.php', + 'Amenadiel\\JpGraph\\Image\\ImgData' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/image/ImgData.php', + 'Amenadiel\\JpGraph\\Image\\ImgData_Balls' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/image/ImgData_Balls.php', + 'Amenadiel\\JpGraph\\Image\\ImgData_Bevels' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/image/ImgData_Bevels.php', + 'Amenadiel\\JpGraph\\Image\\ImgData_Diamonds' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/image/ImgData_Diamonds.php', + 'Amenadiel\\JpGraph\\Image\\ImgData_PushPins' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/image/ImgData_PushPins.php', + 'Amenadiel\\JpGraph\\Image\\ImgData_Squares' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/image/ImgData_Squares.php', + 'Amenadiel\\JpGraph\\Image\\ImgData_Stars' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/image/ImgData_Stars.php', + 'Amenadiel\\JpGraph\\Image\\ImgStreamCache' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/image/ImgStreamCache.php', + 'Amenadiel\\JpGraph\\Image\\ImgTrans' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/image/ImgTrans.php', + 'Amenadiel\\JpGraph\\Image\\LinkArrow' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/image/LinkArrow.php', + 'Amenadiel\\JpGraph\\Image\\PredefIcons' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/image/PredefIcons.php', + 'Amenadiel\\JpGraph\\Image\\Progress' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/image/Progress.php', + 'Amenadiel\\JpGraph\\Image\\RGB' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/image/RGB.php', + 'Amenadiel\\JpGraph\\Image\\RotImage' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/image/RotImage.php', + 'Amenadiel\\JpGraph\\Plot\\AccBarPlot' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot/AccBarPlot.php', + 'Amenadiel\\JpGraph\\Plot\\AccLinePlot' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot/AccLinePlot.php', + 'Amenadiel\\JpGraph\\Plot\\BarPlot' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot/BarPlot.php', + 'Amenadiel\\JpGraph\\Plot\\BoxPlot' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot/BoxPlot.php', + 'Amenadiel\\JpGraph\\Plot\\Contour' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot/Contour.php', + 'Amenadiel\\JpGraph\\Plot\\ContourPlot' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot/ContourPlot.php', + 'Amenadiel\\JpGraph\\Plot\\DisplayValue' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot/DisplayValue.php', + 'Amenadiel\\JpGraph\\Plot\\ErrorLinePlot' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot/ErrorLinePlot.php', + 'Amenadiel\\JpGraph\\Plot\\ErrorPlot' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot/ErrorPlot.php', + 'Amenadiel\\JpGraph\\Plot\\FieldPlot' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot/FieldPlot.php', + 'Amenadiel\\JpGraph\\Plot\\GanttBar' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot/GanttBar.php', + 'Amenadiel\\JpGraph\\Plot\\GanttPlotObject' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot/GanttPlotObject.php', + 'Amenadiel\\JpGraph\\Plot\\GanttVLine' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot/GanttVLine.php', + 'Amenadiel\\JpGraph\\Plot\\Gradient' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot/Gradient.php', + 'Amenadiel\\JpGraph\\Plot\\GroupBarPlot' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot/GroupBarPlot.php', + 'Amenadiel\\JpGraph\\Plot\\IconPlot' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot/IconPlot.php', + 'Amenadiel\\JpGraph\\Plot\\LegendStyle' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot/LegendStyle.php', + 'Amenadiel\\JpGraph\\Plot\\LineErrorPlot' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot/LineErrorPlot.php', + 'Amenadiel\\JpGraph\\Plot\\LinePlot' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot/LinePlot.php', + 'Amenadiel\\JpGraph\\Plot\\MeshInterpolate' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot/MeshInterpolate.php', + 'Amenadiel\\JpGraph\\Plot\\MileStone' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot/MileStone.php', + 'Amenadiel\\JpGraph\\Plot\\PiePlot' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot/PiePlot.php', + 'Amenadiel\\JpGraph\\Plot\\PiePlot3D' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot/PiePlot3D.php', + 'Amenadiel\\JpGraph\\Plot\\PiePlotC' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot/PiePlotC.php', + 'Amenadiel\\JpGraph\\Plot\\Plot' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot/Plot.php', + 'Amenadiel\\JpGraph\\Plot\\PlotBand' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot/PlotBand.php', + 'Amenadiel\\JpGraph\\Plot\\PlotLine' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot/PlotLine.php', + 'Amenadiel\\JpGraph\\Plot\\PlotMark' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot/PlotMark.php', + 'Amenadiel\\JpGraph\\Plot\\PolarPlot' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot/PolarPlot.php', + 'Amenadiel\\JpGraph\\Plot\\RadarPlot' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot/RadarPlot.php', + 'Amenadiel\\JpGraph\\Plot\\ScatterPlot' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot/ScatterPlot.php', + 'Amenadiel\\JpGraph\\Plot\\StockPlot' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot/StockPlot.php', + 'Amenadiel\\JpGraph\\Plot\\WindrosePlot' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/plot/WindrosePlot.php', + 'Amenadiel\\JpGraph\\Text\\CanvasRectangleText' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/text/CanvasRectangleText.php', + 'Amenadiel\\JpGraph\\Text\\GB2312toUTF8' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/text/GB2312toUTF8.php', + 'Amenadiel\\JpGraph\\Text\\GTextTable' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/text/GTextTable.php', + 'Amenadiel\\JpGraph\\Text\\GTextTableCell' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/text/GTextTableCell.php', + 'Amenadiel\\JpGraph\\Text\\GraphTabTitle' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/text/GraphTabTitle.php', + 'Amenadiel\\JpGraph\\Text\\LanguageConv' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/text/LanguageConv.php', + 'Amenadiel\\JpGraph\\Text\\SuperScriptText' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/text/SuperScriptText.php', + 'Amenadiel\\JpGraph\\Text\\TTF' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/text/TTF.php', + 'Amenadiel\\JpGraph\\Text\\Text' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/text/Text.php', + 'Amenadiel\\JpGraph\\Text\\TextProperty' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/text/TextProperty.php', + 'Amenadiel\\JpGraph\\Text\\TextPropertyBelow' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/text/TextPropertyBelow.php', + 'Amenadiel\\JpGraph\\Themes\\AquaTheme' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/themes/AquaTheme.php', + 'Amenadiel\\JpGraph\\Themes\\GreenTheme' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/themes/GreenTheme.php', + 'Amenadiel\\JpGraph\\Themes\\OceanTheme' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/themes/OceanTheme.php', + 'Amenadiel\\JpGraph\\Themes\\OrangeTheme' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/themes/OrangeTheme.php', + 'Amenadiel\\JpGraph\\Themes\\PastelTheme' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/themes/PastelTheme.php', + 'Amenadiel\\JpGraph\\Themes\\RoseTheme' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/themes/RoseTheme.php', + 'Amenadiel\\JpGraph\\Themes\\SoftyTheme' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/themes/SoftyTheme.php', + 'Amenadiel\\JpGraph\\Themes\\Theme' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/themes/Theme.php', + 'Amenadiel\\JpGraph\\Themes\\UniversalTheme' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/themes/UniversalTheme.php', + 'Amenadiel\\JpGraph\\Themes\\VividTheme' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/themes/VividTheme.php', + 'Amenadiel\\JpGraph\\Util\\Bezier' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/util/Bezier.php', + 'Amenadiel\\JpGraph\\Util\\ColorFactory' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/util/ColorFactory.php', + 'Amenadiel\\JpGraph\\Util\\DateLocale' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/util/DateLocale.php', + 'Amenadiel\\JpGraph\\Util\\DateScaleUtils' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/util/DateScaleUtils.php', + 'Amenadiel\\JpGraph\\Util\\ErrMsgText' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/util/ErrMsgText.php', + 'Amenadiel\\JpGraph\\Util\\FlagCache' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/util/FlagCache.php', + 'Amenadiel\\JpGraph\\Util\\FuncGenerator' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/util/FuncGenerator.php', + 'Amenadiel\\JpGraph\\Util\\GanttConstraint' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/util/GanttConstraint.php', + 'Amenadiel\\JpGraph\\Util\\JpGraphErrObject' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/util/JpGraphErrObject.php', + 'Amenadiel\\JpGraph\\Util\\JpGraphErrObjectImg' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/util/JpGraphErrObjectImg.php', + 'Amenadiel\\JpGraph\\Util\\JpGraphError' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/util/JpGraphError.php', + 'Amenadiel\\JpGraph\\Util\\JpGraphException' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/util/JpGraphException.php', + 'Amenadiel\\JpGraph\\Util\\JpGraphExceptionL' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/util/JpGraphExceptionL.php', + 'Amenadiel\\JpGraph\\Util\\JpgTimer' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/util/JpgTimer.php', + 'Amenadiel\\JpGraph\\Util\\LinearRegression' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/util/LinearRegression.php', + 'Amenadiel\\JpGraph\\Util\\RGB' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/util/RGB.php', + 'Amenadiel\\JpGraph\\Util\\ReadFileData' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/util/ReadFileData.php', + 'Amenadiel\\JpGraph\\Util\\Rectangle' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/util/Rectangle.php', + 'Amenadiel\\JpGraph\\Util\\Spline' => __DIR__ . '/..' . '/amenadiel/jpgraph/src/util/Spline.php', + 'Console_Color2' => __DIR__ . '/..' . '/pear/console_color2/Console/Color2.php', + 'Console_Table' => __DIR__ . '/..' . '/pear/console_table/Table.php', + 'Dapphp\\Radius\\EAPPacket' => __DIR__ . '/..' . '/dapphp/radius/src/EAPPacket.php', + 'Dapphp\\Radius\\MsChapV2Packet' => __DIR__ . '/..' . '/dapphp/radius/src/MsChapV2Packet.php', + 'Dapphp\\Radius\\Radius' => __DIR__ . '/..' . '/dapphp/radius/src/Radius.php', + 'Dapphp\\Radius\\VendorId' => __DIR__ . '/..' . '/dapphp/radius/src/VendorId.php', + 'Datamatrix' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/barcodes/datamatrix.php', + 'EasyPeasyICS' => __DIR__ . '/..' . '/phpmailer/phpmailer/extras/EasyPeasyICS.php', + 'GeSHi' => __DIR__ . '/..' . '/easybook/geshi/geshi.php', + 'HTMLPurifier' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier.php', + 'HTMLPurifier_Arborize' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Arborize.php', + 'HTMLPurifier_AttrCollections' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrCollections.php', + 'HTMLPurifier_AttrDef' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef.php', + 'HTMLPurifier_AttrDef_CSS' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS.php', + 'HTMLPurifier_AttrDef_CSS_AlphaValue' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/AlphaValue.php', + 'HTMLPurifier_AttrDef_CSS_Background' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Background.php', + 'HTMLPurifier_AttrDef_CSS_BackgroundPosition' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/BackgroundPosition.php', + 'HTMLPurifier_AttrDef_CSS_Border' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Border.php', + 'HTMLPurifier_AttrDef_CSS_Color' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Color.php', + 'HTMLPurifier_AttrDef_CSS_Composite' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Composite.php', + 'HTMLPurifier_AttrDef_CSS_DenyElementDecorator' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php', + 'HTMLPurifier_AttrDef_CSS_Filter' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Filter.php', + 'HTMLPurifier_AttrDef_CSS_Font' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Font.php', + 'HTMLPurifier_AttrDef_CSS_FontFamily' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/FontFamily.php', + 'HTMLPurifier_AttrDef_CSS_Ident' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Ident.php', + 'HTMLPurifier_AttrDef_CSS_ImportantDecorator' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/ImportantDecorator.php', + 'HTMLPurifier_AttrDef_CSS_Length' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Length.php', + 'HTMLPurifier_AttrDef_CSS_ListStyle' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/ListStyle.php', + 'HTMLPurifier_AttrDef_CSS_Multiple' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Multiple.php', + 'HTMLPurifier_AttrDef_CSS_Number' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Number.php', + 'HTMLPurifier_AttrDef_CSS_Percentage' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Percentage.php', + 'HTMLPurifier_AttrDef_CSS_TextDecoration' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/TextDecoration.php', + 'HTMLPurifier_AttrDef_CSS_URI' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/URI.php', + 'HTMLPurifier_AttrDef_Clone' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Clone.php', + 'HTMLPurifier_AttrDef_Enum' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Enum.php', + 'HTMLPurifier_AttrDef_HTML_Bool' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Bool.php', + 'HTMLPurifier_AttrDef_HTML_Class' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Class.php', + 'HTMLPurifier_AttrDef_HTML_Color' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Color.php', + 'HTMLPurifier_AttrDef_HTML_FrameTarget' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/FrameTarget.php', + 'HTMLPurifier_AttrDef_HTML_ID' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/ID.php', + 'HTMLPurifier_AttrDef_HTML_Length' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Length.php', + 'HTMLPurifier_AttrDef_HTML_LinkTypes' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/LinkTypes.php', + 'HTMLPurifier_AttrDef_HTML_MultiLength' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/MultiLength.php', + 'HTMLPurifier_AttrDef_HTML_Nmtokens' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Nmtokens.php', + 'HTMLPurifier_AttrDef_HTML_Pixels' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Pixels.php', + 'HTMLPurifier_AttrDef_Integer' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Integer.php', + 'HTMLPurifier_AttrDef_Lang' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Lang.php', + 'HTMLPurifier_AttrDef_Switch' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Switch.php', + 'HTMLPurifier_AttrDef_Text' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Text.php', + 'HTMLPurifier_AttrDef_URI' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI.php', + 'HTMLPurifier_AttrDef_URI_Email' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Email.php', + 'HTMLPurifier_AttrDef_URI_Email_SimpleCheck' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Email/SimpleCheck.php', + 'HTMLPurifier_AttrDef_URI_Host' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Host.php', + 'HTMLPurifier_AttrDef_URI_IPv4' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/IPv4.php', + 'HTMLPurifier_AttrDef_URI_IPv6' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/IPv6.php', + 'HTMLPurifier_AttrTransform' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform.php', + 'HTMLPurifier_AttrTransform_Background' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Background.php', + 'HTMLPurifier_AttrTransform_BdoDir' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/BdoDir.php', + 'HTMLPurifier_AttrTransform_BgColor' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/BgColor.php', + 'HTMLPurifier_AttrTransform_BoolToCSS' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/BoolToCSS.php', + 'HTMLPurifier_AttrTransform_Border' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Border.php', + 'HTMLPurifier_AttrTransform_EnumToCSS' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/EnumToCSS.php', + 'HTMLPurifier_AttrTransform_ImgRequired' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/ImgRequired.php', + 'HTMLPurifier_AttrTransform_ImgSpace' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/ImgSpace.php', + 'HTMLPurifier_AttrTransform_Input' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Input.php', + 'HTMLPurifier_AttrTransform_Lang' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Lang.php', + 'HTMLPurifier_AttrTransform_Length' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Length.php', + 'HTMLPurifier_AttrTransform_Name' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Name.php', + 'HTMLPurifier_AttrTransform_NameSync' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/NameSync.php', + 'HTMLPurifier_AttrTransform_Nofollow' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Nofollow.php', + 'HTMLPurifier_AttrTransform_SafeEmbed' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/SafeEmbed.php', + 'HTMLPurifier_AttrTransform_SafeObject' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/SafeObject.php', + 'HTMLPurifier_AttrTransform_SafeParam' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/SafeParam.php', + 'HTMLPurifier_AttrTransform_ScriptRequired' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/ScriptRequired.php', + 'HTMLPurifier_AttrTransform_TargetBlank' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/TargetBlank.php', + 'HTMLPurifier_AttrTransform_TargetNoreferrer' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/TargetNoreferrer.php', + 'HTMLPurifier_AttrTransform_Textarea' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Textarea.php', + 'HTMLPurifier_AttrTypes' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTypes.php', + 'HTMLPurifier_AttrValidator' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrValidator.php', + 'HTMLPurifier_Bootstrap' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Bootstrap.php', + 'HTMLPurifier_CSSDefinition' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/CSSDefinition.php', + 'HTMLPurifier_ChildDef' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef.php', + 'HTMLPurifier_ChildDef_Chameleon' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Chameleon.php', + 'HTMLPurifier_ChildDef_Custom' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Custom.php', + 'HTMLPurifier_ChildDef_Empty' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Empty.php', + 'HTMLPurifier_ChildDef_List' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/List.php', + 'HTMLPurifier_ChildDef_Optional' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Optional.php', + 'HTMLPurifier_ChildDef_Required' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Required.php', + 'HTMLPurifier_ChildDef_StrictBlockquote' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/StrictBlockquote.php', + 'HTMLPurifier_ChildDef_Table' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Table.php', + 'HTMLPurifier_Config' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Config.php', + 'HTMLPurifier_ConfigSchema' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema.php', + 'HTMLPurifier_ConfigSchema_Builder_ConfigSchema' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Builder/ConfigSchema.php', + 'HTMLPurifier_ConfigSchema_Builder_Xml' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Builder/Xml.php', + 'HTMLPurifier_ConfigSchema_Exception' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Exception.php', + 'HTMLPurifier_ConfigSchema_Interchange' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange.php', + 'HTMLPurifier_ConfigSchema_InterchangeBuilder' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/InterchangeBuilder.php', + 'HTMLPurifier_ConfigSchema_Interchange_Directive' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange/Directive.php', + 'HTMLPurifier_ConfigSchema_Interchange_Id' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange/Id.php', + 'HTMLPurifier_ConfigSchema_Validator' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Validator.php', + 'HTMLPurifier_ConfigSchema_ValidatorAtom' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/ValidatorAtom.php', + 'HTMLPurifier_ContentSets' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/ContentSets.php', + 'HTMLPurifier_Context' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Context.php', + 'HTMLPurifier_Definition' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Definition.php', + 'HTMLPurifier_DefinitionCache' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache.php', + 'HTMLPurifier_DefinitionCacheFactory' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCacheFactory.php', + 'HTMLPurifier_DefinitionCache_Decorator' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator.php', + 'HTMLPurifier_DefinitionCache_Decorator_Cleanup' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator/Cleanup.php', + 'HTMLPurifier_DefinitionCache_Decorator_Memory' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator/Memory.php', + 'HTMLPurifier_DefinitionCache_Null' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Null.php', + 'HTMLPurifier_DefinitionCache_Serializer' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer.php', + 'HTMLPurifier_Doctype' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Doctype.php', + 'HTMLPurifier_DoctypeRegistry' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/DoctypeRegistry.php', + 'HTMLPurifier_ElementDef' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/ElementDef.php', + 'HTMLPurifier_Encoder' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Encoder.php', + 'HTMLPurifier_EntityLookup' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/EntityLookup.php', + 'HTMLPurifier_EntityParser' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/EntityParser.php', + 'HTMLPurifier_ErrorCollector' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/ErrorCollector.php', + 'HTMLPurifier_ErrorStruct' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/ErrorStruct.php', + 'HTMLPurifier_Exception' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Exception.php', + 'HTMLPurifier_Filter' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Filter.php', + 'HTMLPurifier_Filter_ExtractStyleBlocks' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Filter/ExtractStyleBlocks.php', + 'HTMLPurifier_Filter_YouTube' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Filter/YouTube.php', + 'HTMLPurifier_Generator' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Generator.php', + 'HTMLPurifier_HTMLDefinition' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLDefinition.php', + 'HTMLPurifier_HTMLModule' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule.php', + 'HTMLPurifier_HTMLModuleManager' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModuleManager.php', + 'HTMLPurifier_HTMLModule_Bdo' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Bdo.php', + 'HTMLPurifier_HTMLModule_CommonAttributes' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/CommonAttributes.php', + 'HTMLPurifier_HTMLModule_Edit' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Edit.php', + 'HTMLPurifier_HTMLModule_Forms' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Forms.php', + 'HTMLPurifier_HTMLModule_Hypertext' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Hypertext.php', + 'HTMLPurifier_HTMLModule_Iframe' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Iframe.php', + 'HTMLPurifier_HTMLModule_Image' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Image.php', + 'HTMLPurifier_HTMLModule_Legacy' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Legacy.php', + 'HTMLPurifier_HTMLModule_List' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/List.php', + 'HTMLPurifier_HTMLModule_Name' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Name.php', + 'HTMLPurifier_HTMLModule_Nofollow' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Nofollow.php', + 'HTMLPurifier_HTMLModule_NonXMLCommonAttributes' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/NonXMLCommonAttributes.php', + 'HTMLPurifier_HTMLModule_Object' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Object.php', + 'HTMLPurifier_HTMLModule_Presentation' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Presentation.php', + 'HTMLPurifier_HTMLModule_Proprietary' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Proprietary.php', + 'HTMLPurifier_HTMLModule_Ruby' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Ruby.php', + 'HTMLPurifier_HTMLModule_SafeEmbed' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/SafeEmbed.php', + 'HTMLPurifier_HTMLModule_SafeObject' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/SafeObject.php', + 'HTMLPurifier_HTMLModule_SafeScripting' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/SafeScripting.php', + 'HTMLPurifier_HTMLModule_Scripting' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Scripting.php', + 'HTMLPurifier_HTMLModule_StyleAttribute' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/StyleAttribute.php', + 'HTMLPurifier_HTMLModule_Tables' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tables.php', + 'HTMLPurifier_HTMLModule_Target' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Target.php', + 'HTMLPurifier_HTMLModule_TargetBlank' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/TargetBlank.php', + 'HTMLPurifier_HTMLModule_TargetNoreferrer' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/TargetNoreferrer.php', + 'HTMLPurifier_HTMLModule_Text' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Text.php', + 'HTMLPurifier_HTMLModule_Tidy' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy.php', + 'HTMLPurifier_HTMLModule_Tidy_Name' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/Name.php', + 'HTMLPurifier_HTMLModule_Tidy_Proprietary' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/Proprietary.php', + 'HTMLPurifier_HTMLModule_Tidy_Strict' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/Strict.php', + 'HTMLPurifier_HTMLModule_Tidy_Transitional' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/Transitional.php', + 'HTMLPurifier_HTMLModule_Tidy_XHTML' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/XHTML.php', + 'HTMLPurifier_HTMLModule_Tidy_XHTMLAndHTML4' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/XHTMLAndHTML4.php', + 'HTMLPurifier_HTMLModule_XMLCommonAttributes' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/XMLCommonAttributes.php', + 'HTMLPurifier_IDAccumulator' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/IDAccumulator.php', + 'HTMLPurifier_Injector' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Injector.php', + 'HTMLPurifier_Injector_AutoParagraph' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Injector/AutoParagraph.php', + 'HTMLPurifier_Injector_DisplayLinkURI' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Injector/DisplayLinkURI.php', + 'HTMLPurifier_Injector_Linkify' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Injector/Linkify.php', + 'HTMLPurifier_Injector_PurifierLinkify' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Injector/PurifierLinkify.php', + 'HTMLPurifier_Injector_RemoveEmpty' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Injector/RemoveEmpty.php', + 'HTMLPurifier_Injector_RemoveSpansWithoutAttributes' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Injector/RemoveSpansWithoutAttributes.php', + 'HTMLPurifier_Injector_SafeObject' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Injector/SafeObject.php', + 'HTMLPurifier_Language' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Language.php', + 'HTMLPurifier_LanguageFactory' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/LanguageFactory.php', + 'HTMLPurifier_Language_en_x_test' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Language/classes/en-x-test.php', + 'HTMLPurifier_Length' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Length.php', + 'HTMLPurifier_Lexer' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Lexer.php', + 'HTMLPurifier_Lexer_DOMLex' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/DOMLex.php', + 'HTMLPurifier_Lexer_DirectLex' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/DirectLex.php', + 'HTMLPurifier_Lexer_PH5P' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/PH5P.php', + 'HTMLPurifier_Node' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Node.php', + 'HTMLPurifier_Node_Comment' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Node/Comment.php', + 'HTMLPurifier_Node_Element' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Node/Element.php', + 'HTMLPurifier_Node_Text' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Node/Text.php', + 'HTMLPurifier_PercentEncoder' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/PercentEncoder.php', + 'HTMLPurifier_Printer' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer.php', + 'HTMLPurifier_Printer_CSSDefinition' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/CSSDefinition.php', + 'HTMLPurifier_Printer_ConfigForm' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php', + 'HTMLPurifier_Printer_ConfigForm_NullDecorator' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php', + 'HTMLPurifier_Printer_ConfigForm_bool' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php', + 'HTMLPurifier_Printer_ConfigForm_default' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php', + 'HTMLPurifier_Printer_HTMLDefinition' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Printer/HTMLDefinition.php', + 'HTMLPurifier_PropertyList' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/PropertyList.php', + 'HTMLPurifier_PropertyListIterator' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/PropertyListIterator.php', + 'HTMLPurifier_Queue' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Queue.php', + 'HTMLPurifier_Strategy' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Strategy.php', + 'HTMLPurifier_Strategy_Composite' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/Composite.php', + 'HTMLPurifier_Strategy_Core' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/Core.php', + 'HTMLPurifier_Strategy_FixNesting' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/FixNesting.php', + 'HTMLPurifier_Strategy_MakeWellFormed' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/MakeWellFormed.php', + 'HTMLPurifier_Strategy_RemoveForeignElements' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/RemoveForeignElements.php', + 'HTMLPurifier_Strategy_ValidateAttributes' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/ValidateAttributes.php', + 'HTMLPurifier_StringHash' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/StringHash.php', + 'HTMLPurifier_StringHashParser' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/StringHashParser.php', + 'HTMLPurifier_TagTransform' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/TagTransform.php', + 'HTMLPurifier_TagTransform_Font' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/TagTransform/Font.php', + 'HTMLPurifier_TagTransform_Simple' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/TagTransform/Simple.php', + 'HTMLPurifier_Token' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Token.php', + 'HTMLPurifier_TokenFactory' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/TokenFactory.php', + 'HTMLPurifier_Token_Comment' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Token/Comment.php', + 'HTMLPurifier_Token_Empty' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Token/Empty.php', + 'HTMLPurifier_Token_End' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Token/End.php', + 'HTMLPurifier_Token_Start' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Token/Start.php', + 'HTMLPurifier_Token_Tag' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Token/Tag.php', + 'HTMLPurifier_Token_Text' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Token/Text.php', + 'HTMLPurifier_URI' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/URI.php', + 'HTMLPurifier_URIDefinition' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/URIDefinition.php', + 'HTMLPurifier_URIFilter' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter.php', + 'HTMLPurifier_URIFilter_DisableExternal' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/DisableExternal.php', + 'HTMLPurifier_URIFilter_DisableExternalResources' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/DisableExternalResources.php', + 'HTMLPurifier_URIFilter_DisableResources' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/DisableResources.php', + 'HTMLPurifier_URIFilter_HostBlacklist' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/HostBlacklist.php', + 'HTMLPurifier_URIFilter_MakeAbsolute' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/MakeAbsolute.php', + 'HTMLPurifier_URIFilter_Munge' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/Munge.php', + 'HTMLPurifier_URIFilter_SafeIframe' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/SafeIframe.php', + 'HTMLPurifier_URIParser' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/URIParser.php', + 'HTMLPurifier_URIScheme' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme.php', + 'HTMLPurifier_URISchemeRegistry' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/URISchemeRegistry.php', + 'HTMLPurifier_URIScheme_data' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/data.php', + 'HTMLPurifier_URIScheme_file' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/file.php', + 'HTMLPurifier_URIScheme_ftp' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/ftp.php', + 'HTMLPurifier_URIScheme_http' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/http.php', + 'HTMLPurifier_URIScheme_https' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/https.php', + 'HTMLPurifier_URIScheme_mailto' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/mailto.php', + 'HTMLPurifier_URIScheme_news' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/news.php', + 'HTMLPurifier_URIScheme_nntp' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/nntp.php', + 'HTMLPurifier_URIScheme_tel' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/tel.php', + 'HTMLPurifier_UnitConverter' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/UnitConverter.php', + 'HTMLPurifier_VarParser' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/VarParser.php', + 'HTMLPurifier_VarParserException' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/VarParserException.php', + 'HTMLPurifier_VarParser_Flexible' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/VarParser/Flexible.php', + 'HTMLPurifier_VarParser_Native' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/VarParser/Native.php', + 'HTMLPurifier_Zipper' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Zipper.php', + 'LibreNMS\\Component' => __DIR__ . '/../..' . '/LibreNMS/Component.php', + 'LibreNMS\\ComposerHelper' => __DIR__ . '/../..' . '/LibreNMS/ComposerHelper.php', + 'LibreNMS\\Exceptions\\FileExistsException' => __DIR__ . '/../..' . '/LibreNMS/Exceptions/FileExistsException.php', + 'LibreNMS\\Exceptions\\HostExistsException' => __DIR__ . '/../..' . '/LibreNMS/Exceptions/HostExistsException.php', + 'LibreNMS\\Exceptions\\HostIpExistsException' => __DIR__ . '/../..' . '/LibreNMS/Exceptions/HostIpExistsException.php', + 'LibreNMS\\Exceptions\\HostUnreachableException' => __DIR__ . '/../..' . '/LibreNMS/Exceptions/HostUnreachableException.php', + 'LibreNMS\\Exceptions\\HostUnreachablePingException' => __DIR__ . '/../..' . '/LibreNMS/Exceptions/HostUnreachablePingException.php', + 'LibreNMS\\Exceptions\\HostUnreachableSnmpException' => __DIR__ . '/../..' . '/LibreNMS/Exceptions/HostUnreachableSnmpException.php', + 'LibreNMS\\Exceptions\\InvalidPortAssocModeException' => __DIR__ . '/../..' . '/LibreNMS/Exceptions/InvalidPortAssocModeException.php', + 'LibreNMS\\Exceptions\\SnmpVersionUnsupportedException' => __DIR__ . '/../..' . '/LibreNMS/Exceptions/SnmpVersionUnsupportedException.php', + 'LibreNMS\\IRCBot' => __DIR__ . '/../..' . '/LibreNMS/IRCBot.php', + 'LibreNMS\\ObjectCache' => __DIR__ . '/../..' . '/LibreNMS/ObjectCache.php', + 'LibreNMS\\Plugins' => __DIR__ . '/../..' . '/LibreNMS/Plugins.php', + 'LibreNMS\\Proc' => __DIR__ . '/../..' . '/LibreNMS/Proc.php', + 'LibreNMS\\RRDRecursiveFilterIterator' => __DIR__ . '/../..' . '/LibreNMS/RRDRecursiveFilterIterator.php', + 'LibreNMS\\Tests\\AlertTest' => __DIR__ . '/../..' . '/tests/AlertingTest.php', + 'LibreNMS\\Tests\\CommonFunctionsTest' => __DIR__ . '/../..' . '/tests/CommonFunctionsTest.php', + 'LibreNMS\\Tests\\DiscoveryTest' => __DIR__ . '/../..' . '/tests/OSDiscoveryTest.php', + 'LibreNMS\\Tests\\RrdtoolTest' => __DIR__ . '/../..' . '/tests/RrdtoolTest.php', + 'LibreNMS\\Tests\\SyslogTest' => __DIR__ . '/../..' . '/tests/SyslogTest.php', + 'LibreNMS\\Tests\\YamlTest' => __DIR__ . '/../..' . '/tests/YamlTest.php', + 'PDF417' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/barcodes/pdf417.php', + 'PHPMailer' => __DIR__ . '/..' . '/phpmailer/phpmailer/class.phpmailer.php', + 'PHPMailerOAuth' => __DIR__ . '/..' . '/phpmailer/phpmailer/class.phpmaileroauth.php', + 'PHPMailerOAuthGoogle' => __DIR__ . '/..' . '/phpmailer/phpmailer/class.phpmaileroauthgoogle.php', + 'POP3' => __DIR__ . '/..' . '/phpmailer/phpmailer/class.pop3.php', + 'PhpAmqpLib\\Channel\\AMQPChannel' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Channel/AMQPChannel.php', + 'PhpAmqpLib\\Channel\\AbstractChannel' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Channel/AbstractChannel.php', + 'PhpAmqpLib\\Connection\\AMQPConnection' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AMQPConnection.php', + 'PhpAmqpLib\\Connection\\AMQPSSLConnection' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AMQPSSLConnection.php', + 'PhpAmqpLib\\Connection\\AMQPSocketConnection' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AMQPSocketConnection.php', + 'PhpAmqpLib\\Connection\\AMQPStreamConnection' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AMQPStreamConnection.php', + 'PhpAmqpLib\\Connection\\AbstractConnection' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AbstractConnection.php', + 'PhpAmqpLib\\Exception\\AMQPChannelException' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Exception/AMQPChannelException.php', + 'PhpAmqpLib\\Exception\\AMQPConnectionException' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Exception/AMQPConnectionException.php', + 'PhpAmqpLib\\Exception\\AMQPException' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Exception/AMQPException.php', + 'PhpAmqpLib\\Exception\\AMQPExceptionInterface' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Exception/AMQPExceptionInterface.php', + 'PhpAmqpLib\\Exception\\AMQPOutOfBoundsException' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Exception/AMQPOutOfBoundsException.php', + 'PhpAmqpLib\\Exception\\AMQPProtocolChannelException' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Exception/AMQPProtocolChannelException.php', + 'PhpAmqpLib\\Exception\\AMQPProtocolConnectionException' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Exception/AMQPProtocolConnectionException.php', + 'PhpAmqpLib\\Exception\\AMQPProtocolException' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Exception/AMQPProtocolException.php', + 'PhpAmqpLib\\Exception\\AMQPRuntimeException' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Exception/AMQPRuntimeException.php', + 'PhpAmqpLib\\Exception\\AMQPTimeoutException' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Exception/AMQPTimeoutException.php', + 'PhpAmqpLib\\Helper\\MiscHelper' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Helper/MiscHelper.php', + 'PhpAmqpLib\\Helper\\Protocol\\MethodMap080' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Helper/Protocol/MethodMap080.php', + 'PhpAmqpLib\\Helper\\Protocol\\MethodMap091' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Helper/Protocol/MethodMap091.php', + 'PhpAmqpLib\\Helper\\Protocol\\Protocol080' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Helper/Protocol/Protocol080.php', + 'PhpAmqpLib\\Helper\\Protocol\\Protocol091' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Helper/Protocol/Protocol091.php', + 'PhpAmqpLib\\Helper\\Protocol\\Wait080' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Helper/Protocol/Wait080.php', + 'PhpAmqpLib\\Helper\\Protocol\\Wait091' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Helper/Protocol/Wait091.php', + 'PhpAmqpLib\\Message\\AMQPMessage' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Message/AMQPMessage.php', + 'PhpAmqpLib\\Tests\\Functional\\AbstractPublishConsumeTest' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Functional/AbstractPublishConsumeTest.php', + 'PhpAmqpLib\\Tests\\Functional\\Bug40Test' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Functional/Bug40Test.php', + 'PhpAmqpLib\\Tests\\Functional\\Bug49Test' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Functional/Bug49Test.php', + 'PhpAmqpLib\\Tests\\Functional\\FileTransferTest' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Functional/FileTransferTest.php', + 'PhpAmqpLib\\Tests\\Functional\\SocketPublishConsumeTest' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Functional/SocketPublishConsumeTest.php', + 'PhpAmqpLib\\Tests\\Functional\\StreamPublishConsumeTest' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Functional/StreamPublishConsumeTest.php', + 'PhpAmqpLib\\Tests\\Unit\\AMQPWriterTest' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Unit/Wire/AMQPWriterTest.php', + 'PhpAmqpLib\\Tests\\Unit\\Helper\\Writer\\Protocol091Test' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Unit/Helper/Protocol/Protocol091Test.php', + 'PhpAmqpLib\\Tests\\Unit\\WireTest' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Unit/WireTest.php', + 'PhpAmqpLib\\Wire\\AMQPDecimal' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Wire/AMQPDecimal.php', + 'PhpAmqpLib\\Wire\\AMQPReader' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Wire/AMQPReader.php', + 'PhpAmqpLib\\Wire\\AMQPWriter' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Wire/AMQPWriter.php', + 'PhpAmqpLib\\Wire\\Constants080' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Wire/Constants080.php', + 'PhpAmqpLib\\Wire\\Constants091' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Wire/Constants091.php', + 'PhpAmqpLib\\Wire\\GenericContent' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Wire/GenericContent.php', + 'PhpAmqpLib\\Wire\\IO\\AbstractIO' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/AbstractIO.php', + 'PhpAmqpLib\\Wire\\IO\\SocketIO' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/SocketIO.php', + 'PhpAmqpLib\\Wire\\IO\\StreamIO' => __DIR__ . '/..' . '/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php', + 'Phpass\\PasswordHash' => __DIR__ . '/..' . '/xjtuwangke/passwordhash/src/Phpass/PasswordHash.php', + 'QRcode' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/barcodes/qrcode.php', + 'SMTP' => __DIR__ . '/..' . '/phpmailer/phpmailer/class.smtp.php', + 'SlimFlashTest' => __DIR__ . '/..' . '/slim/slim/tests/Middleware/FlashTest.php', + 'SlimHttpUtilTest' => __DIR__ . '/..' . '/slim/slim/tests/Http/UtilTest.php', + 'SlimTest' => __DIR__ . '/..' . '/slim/slim/tests/SlimTest.php', + 'Slim\\Environment' => __DIR__ . '/..' . '/slim/slim/Slim/Environment.php', + 'Slim\\Exception\\Pass' => __DIR__ . '/..' . '/slim/slim/Slim/Exception/Pass.php', + 'Slim\\Exception\\Stop' => __DIR__ . '/..' . '/slim/slim/Slim/Exception/Stop.php', + 'Slim\\Helper\\Set' => __DIR__ . '/..' . '/slim/slim/Slim/Helper/Set.php', + 'Slim\\Http\\Cookies' => __DIR__ . '/..' . '/slim/slim/Slim/Http/Cookies.php', + 'Slim\\Http\\Headers' => __DIR__ . '/..' . '/slim/slim/Slim/Http/Headers.php', + 'Slim\\Http\\Request' => __DIR__ . '/..' . '/slim/slim/Slim/Http/Request.php', + 'Slim\\Http\\Response' => __DIR__ . '/..' . '/slim/slim/Slim/Http/Response.php', + 'Slim\\Http\\Util' => __DIR__ . '/..' . '/slim/slim/Slim/Http/Util.php', + 'Slim\\Log' => __DIR__ . '/..' . '/slim/slim/Slim/Log.php', + 'Slim\\LogWriter' => __DIR__ . '/..' . '/slim/slim/Slim/LogWriter.php', + 'Slim\\Middleware' => __DIR__ . '/..' . '/slim/slim/Slim/Middleware.php', + 'Slim\\Middleware\\ContentTypes' => __DIR__ . '/..' . '/slim/slim/Slim/Middleware/ContentTypes.php', + 'Slim\\Middleware\\Flash' => __DIR__ . '/..' . '/slim/slim/Slim/Middleware/Flash.php', + 'Slim\\Middleware\\MethodOverride' => __DIR__ . '/..' . '/slim/slim/Slim/Middleware/MethodOverride.php', + 'Slim\\Middleware\\PrettyExceptions' => __DIR__ . '/..' . '/slim/slim/Slim/Middleware/PrettyExceptions.php', + 'Slim\\Middleware\\SessionCookie' => __DIR__ . '/..' . '/slim/slim/Slim/Middleware/SessionCookie.php', + 'Slim\\Route' => __DIR__ . '/..' . '/slim/slim/Slim/Route.php', + 'Slim\\Router' => __DIR__ . '/..' . '/slim/slim/Slim/Router.php', + 'Slim\\Slim' => __DIR__ . '/..' . '/slim/slim/Slim/Slim.php', + 'Slim\\View' => __DIR__ . '/..' . '/slim/slim/Slim/View.php', + 'Symfony\\Component\\Yaml\\Dumper' => __DIR__ . '/..' . '/symfony/yaml/Dumper.php', + 'Symfony\\Component\\Yaml\\Escaper' => __DIR__ . '/..' . '/symfony/yaml/Escaper.php', + 'Symfony\\Component\\Yaml\\Exception\\DumpException' => __DIR__ . '/..' . '/symfony/yaml/Exception/DumpException.php', + 'Symfony\\Component\\Yaml\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/yaml/Exception/ExceptionInterface.php', + 'Symfony\\Component\\Yaml\\Exception\\ParseException' => __DIR__ . '/..' . '/symfony/yaml/Exception/ParseException.php', + 'Symfony\\Component\\Yaml\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/yaml/Exception/RuntimeException.php', + 'Symfony\\Component\\Yaml\\Inline' => __DIR__ . '/..' . '/symfony/yaml/Inline.php', + 'Symfony\\Component\\Yaml\\Parser' => __DIR__ . '/..' . '/symfony/yaml/Parser.php', + 'Symfony\\Component\\Yaml\\Unescaper' => __DIR__ . '/..' . '/symfony/yaml/Unescaper.php', + 'Symfony\\Component\\Yaml\\Yaml' => __DIR__ . '/..' . '/symfony/yaml/Yaml.php', + 'TCPDF' => __DIR__ . '/..' . '/tecnickcom/tcpdf/tcpdf.php', + 'TCPDF2DBarcode' => __DIR__ . '/..' . '/tecnickcom/tcpdf/tcpdf_barcodes_2d.php', + 'TCPDFBarcode' => __DIR__ . '/..' . '/tecnickcom/tcpdf/tcpdf_barcodes_1d.php', + 'TCPDF_COLORS' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_colors.php', + 'TCPDF_FILTERS' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_filters.php', + 'TCPDF_FONTS' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_fonts.php', + 'TCPDF_FONT_DATA' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_font_data.php', + 'TCPDF_IMAGES' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_images.php', + 'TCPDF_IMPORT' => __DIR__ . '/..' . '/tecnickcom/tcpdf/tcpdf_import.php', + 'TCPDF_PARSER' => __DIR__ . '/..' . '/tecnickcom/tcpdf/tcpdf_parser.php', + 'TCPDF_STATIC' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_static.php', + 'ntlm_sasl_client_class' => __DIR__ . '/..' . '/phpmailer/phpmailer/extras/ntlm_sasl_client.php', + 'phpmailerException' => __DIR__ . '/..' . '/phpmailer/phpmailer/class.phpmailer.php', + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixLengthsPsr4 = ComposerStaticInit272059f49825f0adab6de160cf59ca72::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit272059f49825f0adab6de160cf59ca72::$prefixDirsPsr4; + $loader->prefixesPsr0 = ComposerStaticInit272059f49825f0adab6de160cf59ca72::$prefixesPsr0; + $loader->classMap = ComposerStaticInit272059f49825f0adab6de160cf59ca72::$classMap; + + }, null, ClassLoader::class); + } +} diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json new file mode 100644 index 0000000000..3bfd8067a5 --- /dev/null +++ b/vendor/composer/installed.json @@ -0,0 +1,618 @@ +[ + { + "name": "ezyang/htmlpurifier", + "version": "v4.8.0", + "version_normalized": "4.8.0.0", + "source": { + "type": "git", + "url": "https://github.com/ezyang/htmlpurifier.git", + "reference": "d0c392f77d2f2a3dcf7fcb79e2a1e2b8804e75b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/d0c392f77d2f2a3dcf7fcb79e2a1e2b8804e75b2", + "reference": "d0c392f77d2f2a3dcf7fcb79e2a1e2b8804e75b2", + "shasum": "" + }, + "require": { + "php": ">=5.2" + }, + "time": "2016-07-16T12:58:58+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-0": { + "HTMLPurifier": "library/" + }, + "files": [ + "library/HTMLPurifier.composer.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL" + ], + "authors": [ + { + "name": "Edward Z. Yang", + "email": "admin@htmlpurifier.org", + "homepage": "http://ezyang.com" + } + ], + "description": "Standards compliant HTML filter written in PHP", + "homepage": "http://htmlpurifier.org/", + "keywords": [ + "html" + ] + }, + { + "name": "xjtuwangke/passwordhash", + "version": "dev-master", + "version_normalized": "9999999-dev", + "source": { + "type": "git", + "url": "https://github.com/xjtuwangke/passwordhash.git", + "reference": "a7bcd9705add858cd496bdd8cdc9bbed231e8bb3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/xjtuwangke/passwordhash/zipball/a7bcd9705add858cd496bdd8cdc9bbed231e8bb3", + "reference": "a7bcd9705add858cd496bdd8cdc9bbed231e8bb3", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "time": "2012-08-31T00:00:00+00:00", + "type": "library", + "installation-source": "source", + "autoload": { + "psr-0": { + "Phpass": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Public Domain" + ], + "authors": [ + { + "name": "Solar Designer", + "email": "solar@openwall.com", + "homepage": "http://openwall.com/phpass/" + } + ], + "description": "Portable PHP password hashing framework", + "homepage": "http://github.com/xjtuwangke/passwordhash/", + "keywords": [ + "blowfish", + "crypt", + "password", + "security" + ] + }, + { + "name": "pear/console_color2", + "version": "0.1.2", + "version_normalized": "0.1.2.0", + "source": { + "type": "git", + "url": "https://github.com/pear/Console_Color2.git", + "reference": "cab2b886aa55cc9e23464d1f49edf97bee9f5a63" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pear/Console_Color2/zipball/cab2b886aa55cc9e23464d1f49edf97bee9f5a63", + "reference": "cab2b886aa55cc9e23464d1f49edf97bee9f5a63", + "shasum": "" + }, + "require": { + "php": ">=5.0.0" + }, + "time": "2012-10-23T11:52:18+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-0": { + "Console_Color2": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Daniel O'Connor", + "email": "daniel.oconnor@gmail.com", + "role": "Pear Developer" + }, + { + "name": "Stefan Walk", + "email": "et@php.net" + }, + { + "name": "Scott Mattocks", + "email": "scottmattocks@php.net" + } + ], + "description": "This Class allows you to easily use ANSI console colors in your application.", + "homepage": "https://github.com/pear/Console_Color2", + "keywords": [ + "console" + ] + }, + { + "name": "pear/console_table", + "version": "v1.3.0", + "version_normalized": "1.3.0.0", + "source": { + "type": "git", + "url": "https://github.com/pear/Console_Table.git", + "reference": "64100b9ee81852f4fa17823e55d0b385a544f976" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pear/Console_Table/zipball/64100b9ee81852f4fa17823e55d0b385a544f976", + "reference": "64100b9ee81852f4fa17823e55d0b385a544f976", + "shasum": "" + }, + "require": { + "php": ">=5.2.0" + }, + "suggest": { + "pear/Console_Color2": ">=0.1.2" + }, + "time": "2016-01-21T16:14:31+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "classmap": [ + "Table.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Jan Schneider", + "homepage": "http://pear.php.net/user/yunosh" + }, + { + "name": "Tal Peer", + "homepage": "http://pear.php.net/user/tal" + }, + { + "name": "Xavier Noguer", + "homepage": "http://pear.php.net/user/xnoguer" + }, + { + "name": "Richard Heyes", + "homepage": "http://pear.php.net/user/richard" + } + ], + "description": "Library that makes it easy to build console style tables.", + "homepage": "http://pear.php.net/package/Console_Table/", + "keywords": [ + "console" + ] + }, + { + "name": "slim/slim", + "version": "2.6.2", + "version_normalized": "2.6.2.0", + "source": { + "type": "git", + "url": "https://github.com/slimphp/Slim.git", + "reference": "20a02782f76830b67ae56a5c08eb1f563c351a37" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/slimphp/Slim/zipball/20a02782f76830b67ae56a5c08eb1f563c351a37", + "reference": "20a02782f76830b67ae56a5c08eb1f563c351a37", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "suggest": { + "ext-mcrypt": "Required for HTTP cookie encryption" + }, + "time": "2015-03-08T18:41:17+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-0": { + "Slim": "." + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Josh Lockhart", + "email": "info@joshlockhart.com", + "homepage": "http://www.joshlockhart.com/" + } + ], + "description": "Slim Framework, a PHP micro framework", + "homepage": "http://github.com/codeguy/Slim", + "keywords": [ + "microframework", + "rest", + "router" + ] + }, + { + "name": "easybook/geshi", + "version": "v1.0.8.18", + "version_normalized": "1.0.8.18", + "source": { + "type": "git", + "url": "https://github.com/easybook/geshi.git", + "reference": "4b06bfe8c6fbedd6aad0a0700d650f591386e287" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/easybook/geshi/zipball/4b06bfe8c6fbedd6aad0a0700d650f591386e287", + "reference": "4b06bfe8c6fbedd6aad0a0700d650f591386e287", + "shasum": "" + }, + "require": { + "php": ">4.3.0" + }, + "time": "2016-10-05T07:15:42+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "classmap": [ + "./" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0" + ], + "authors": [ + { + "name": "Nigel McNie", + "email": "nigel@geshi.org" + }, + { + "name": "Benny Baumann", + "email": "BenBE@geshi.org" + } + ], + "description": "GeSHi - Generic Syntax Highlighter. This is an unmodified port of GeSHi project code found on SourceForge.", + "homepage": "http://qbnz.com/highlighter", + "keywords": [ + "highlight", + "highlighter", + "syntax" + ] + }, + { + "name": "amenadiel/jpgraph", + "version": "3.6.6", + "version_normalized": "3.6.6.0", + "source": { + "type": "git", + "url": "https://github.com/HuasoFoundries/jpgraph.git", + "reference": "6596bdfd8c406672bd165bf7754df1130158ddac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/HuasoFoundries/jpgraph/zipball/6596bdfd8c406672bd165bf7754df1130158ddac", + "reference": "6596bdfd8c406672bd165bf7754df1130158ddac", + "shasum": "" + }, + "require": { + "ext-gd": "*", + "php": ">=5.3.0" + }, + "time": "2016-03-11T13:58:40+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Amenadiel\\JpGraph\\": "src/", + "Amenadiel\\JpGraph\\Graph\\": "src/graph", + "Amenadiel\\JpGraph\\Image\\": "src/image", + "Amenadiel\\JpGraph\\Plot\\": "src/plot", + "Amenadiel\\JpGraph\\Text\\": "src/text", + "Amenadiel\\JpGraph\\Themes\\": "src/themes", + "Amenadiel\\JpGraph\\Util\\": "src/util" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "QPL 1.0" + ], + "description": "jpGraph, library to make graphs and charts", + "homepage": "http://jpgraph.net/", + "keywords": [ + "chart", + "data", + "graph", + "jpgraph", + "pie" + ] + }, + { + "name": "tecnickcom/tcpdf", + "version": "6.2.12", + "version_normalized": "6.2.12.0", + "source": { + "type": "git", + "url": "https://github.com/tecnickcom/TCPDF.git", + "reference": "2f732eaa91b5665274689b1d40b285a7bacdc37f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/2f732eaa91b5665274689b1d40b285a7bacdc37f", + "reference": "2f732eaa91b5665274689b1d40b285a7bacdc37f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2015-09-12T10:08:34+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "classmap": [ + "fonts", + "config", + "include", + "tcpdf.php", + "tcpdf_parser.php", + "tcpdf_import.php", + "tcpdf_barcodes_1d.php", + "tcpdf_barcodes_2d.php", + "include/tcpdf_colors.php", + "include/tcpdf_filters.php", + "include/tcpdf_font_data.php", + "include/tcpdf_fonts.php", + "include/tcpdf_images.php", + "include/tcpdf_static.php", + "include/barcodes/datamatrix.php", + "include/barcodes/pdf417.php", + "include/barcodes/qrcode.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPLv3" + ], + "authors": [ + { + "name": "Nicola Asuni", + "email": "info@tecnick.com", + "homepage": "http://nicolaasuni.tecnick.com" + } + ], + "description": "TCPDF is a PHP class for generating PDF documents and barcodes.", + "homepage": "http://www.tcpdf.org/", + "keywords": [ + "PDFD32000-2008", + "TCPDF", + "barcodes", + "datamatrix", + "pdf", + "pdf417", + "qrcode" + ] + }, + { + "name": "dapphp/radius", + "version": "2.5.0", + "version_normalized": "2.5.0.0", + "source": { + "type": "git", + "url": "https://github.com/dapphp/radius.git", + "reference": "72df4f8dc82281e7364b23212bbf16df6232151e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dapphp/radius/zipball/72df4f8dc82281e7364b23212bbf16df6232151e", + "reference": "72df4f8dc82281e7364b23212bbf16df6232151e", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "require-dev": { + "phpunit/phpunit": "dev-master" + }, + "time": "2016-08-01T23:26:47+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Dapphp\\Radius\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0" + ], + "authors": [ + { + "name": "Drew Phillips", + "email": "drew@drew-phillips.com", + "homepage": "https://drew-phillips.com/" + }, + { + "name": "SysCo/al", + "homepage": "http://developer.sysco.ch/php/" + } + ], + "description": "A pure PHP RADIUS client based on the SysCo/al implementation", + "homepage": "https://github.com/dapphp/radius", + "keywords": [ + "Authentication", + "authorization", + "radius" + ] + }, + { + "name": "php-amqplib/php-amqplib", + "version": "v2.0.2", + "version_normalized": "2.0.2.0", + "source": { + "type": "git", + "url": "https://github.com/php-amqplib/php-amqplib.git", + "reference": "682e3365f51c455f7a0bd32173d79922416fe9f0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-amqplib/php-amqplib/zipball/682e3365f51c455f7a0bd32173d79922416fe9f0", + "reference": "682e3365f51c455f7a0bd32173d79922416fe9f0", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2013-02-13T19:43:51+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-0": { + "PhpAmqpLib": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1" + ], + "authors": [ + { + "name": "Alvaro Videla" + } + ], + "description": "This library is a pure PHP implementation of the AMQP protocol. It's been tested against RabbitMQ.", + "homepage": "https://github.com/videlalvaro/php-amqplib/", + "keywords": [ + "message", + "queue", + "rabbitmq" + ] + }, + { + "name": "symfony/yaml", + "version": "v2.8.15", + "version_normalized": "2.8.15.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "befb26a3713c97af90d25dd12e75621ef14d91ff" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/befb26a3713c97af90d25dd12e75621ef14d91ff", + "reference": "befb26a3713c97af90d25dd12e75621ef14d91ff", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "time": "2016-11-14T16:15:57+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com" + }, + { + "name": "phpmailer/phpmailer", + "version": "v5.2.21", + "version_normalized": "5.2.21.0", + "source": { + "type": "git", + "url": "https://github.com/PHPMailer/PHPMailer.git", + "reference": "1d51856b76c06fc687fcd9180efa7a0bed0d761e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/1d51856b76c06fc687fcd9180efa7a0bed0d761e", + "reference": "1d51856b76c06fc687fcd9180efa7a0bed0d761e", + "shasum": "" + }, + "require": { + "php": ">=5.0.0" + }, + "require-dev": { + "phpdocumentor/phpdocumentor": "*", + "phpunit/phpunit": "4.7.*" + }, + "suggest": { + "league/oauth2-google": "Needed for Google XOAUTH2 authentication" + }, + "time": "2016-12-28T15:35:48+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "classmap": [ + "class.phpmailer.php", + "class.phpmaileroauth.php", + "class.phpmaileroauthgoogle.php", + "class.smtp.php", + "class.pop3.php", + "extras/EasyPeasyICS.php", + "extras/ntlm_sasl_client.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1" + ], + "authors": [ + { + "name": "Jim Jagielski", + "email": "jimjag@gmail.com" + }, + { + "name": "Marcus Bointon", + "email": "phpmailer@synchromedia.co.uk" + }, + { + "name": "Andy Prevost", + "email": "codeworxtech@users.sourceforge.net" + }, + { + "name": "Brent R. Matzelle" + } + ], + "description": "PHPMailer is a full-featured email creation and transfer class for PHP" + } +] diff --git a/vendor/dapphp/radius/LICENSE b/vendor/dapphp/radius/LICENSE new file mode 100644 index 0000000000..9cecc1d466 --- /dev/null +++ b/vendor/dapphp/radius/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + {one line to give the program's name and a brief idea of what it does.} + Copyright (C) {year} {name of author} + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + {project} Copyright (C) {year} {fullname} + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/vendor/dapphp/radius/README.md b/vendor/dapphp/radius/README.md new file mode 100644 index 0000000000..5bbb2ea5e8 --- /dev/null +++ b/vendor/dapphp/radius/README.md @@ -0,0 +1,141 @@ +## Name: + +**Dapphp\Radius** - A pure PHP RADIUS client based on the SysCo/al implementation + +## Version: + +**2.5.0** + +## Author: + +Drew Phillips +SysCo/al (http://developer.sysco.ch/php/) + +## Requirements: + +* PHP 5.3 or greater + +## Description: + +**Dapphp\Radius** is a pure PHP RADIUS client for authenticating users against +a RADIUS server in PHP. It currently supports basic RADIUS auth using PAP, +CHAP (MD5), MSCHAP v1, and EAP-MSCHAP v2. The current 2.5.x branch is tested +to work with Microsoft Windows Server 2012 Network Policy Server and FreeRADIUS +2 and above and most likely works with other RADIUS server implementations. +PAP authentication has been tested on Microsoft Radius server IAS, Mideye +RADIUS Server, Radl, RSA SecurID, VASCO Middleware 3.0 server, WinRadius, and +ZyXEL ZyWALL OTP. + +The PHP mcrypt extension is required if using MSCHAP v1 or v2. + +## Installation: + +The recommended way to install `dapphp/radius` is using [Composer](https://getcomposer.org). +If you are already using composer, simple run `composer require dapphp/radius` or add +`dapphp/radius` to your composer.json file's `require` section. + +Standalone installation is also supported and a SPL autoloader is provided. +(Don't use the standalone autoloader if you're using Composer!). + +To install standalone, download the release archive and extract to a location +on your server. In your application, `require_once 'radius/autoload.php';` and +then you can use the class. + +## Examples: + +See the `examples/` directory for working examples (change the server address +and credentials to test). + +## Synopsis: + +setServer('12.34.56.78') // RADIUS server address + ->setSecret('radius shared secret') + ->setNasIpAddress('10.0.1.2') // NAS server address + ->setAttribute(32, 'login'); // NAS identifier + +// PAP authentication; returns true if successful, false otherwise +$authenticated = $client->accessRequest($username, $password); + +// CHAP-MD5 authentication +$client->setChapPassword($password); // set chap password +$authenticated = $client->accessRequest($username); // authenticate, don't specify pw here + +// MSCHAP v1 authentication +$client->setMSChapPassword($password); // set ms chap password (uses mcrypt) +$authenticated = $client->accessRequest($username); + +// EAP-MSCHAP v2 authentication +$authenticated = $client->accessRequestEapMsChapV2($username, $password); + +if ($authenticated === false) { + // false returned on failure + echo sprintf( + "Access-Request failed with error %d (%s).\n", + $client->getErrorCode(), + $client->getErrorMessage() + ); +} else { + // access request was accepted - client authenticated successfully + echo "Success! Received Access-Accept response from RADIUS server.\n"; +} + +## Advanced Usage: + +// Setting vendor specific attributes +// Many vendor IDs are available in \Dapphp\Radius\VendorId +// e.g. \Dapphp\Radius\VendorId::MICROSOFT +$client->setVendorSpecificAttribute($vendorId, $attributeNumber, $rawValue); + +// Retrieving attributes from RADIUS responses after receiving a failure or success response +$value = $client->getAttribute($attributeId); + +// Get an array of all received attributes +$attributes = getReceivedAttributes(); + +// Debugging +// Prior to sending a request, call +$client->setDebug(true); // enable debug output on console +// Shows what attributes are sent and received, and info about the request/response + + +## TODO: + +- Set attributes by name, rather than number +- Vendor specific attribute dictionaries? +- Test with more implementations and confirm working +- Accounting? + +## Copyright: + + Copyright (c) 2008, SysCo systemes de communication sa + SysCo (tm) is a trademark of SysCo systemes de communication sa + (http://www.sysco.ch/) + All rights reserved. + + Copyright (c) 2016, Drew Phillips + (https://drew-phillips.com) + + Pure PHP radius class is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the License, + or (at your option) any later version. + + Pure PHP radius class is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with Pure PHP radius class. + If not, see diff --git a/vendor/dapphp/radius/autoload.php b/vendor/dapphp/radius/autoload.php new file mode 100644 index 0000000000..6bfb2b07a5 --- /dev/null +++ b/vendor/dapphp/radius/autoload.php @@ -0,0 +1,20 @@ + 2) { + if ($parts[0] == 'Dapphp' && $parts[1] == 'Radius') { + require_once __DIR__ . '/src/' . $parts[2] . '.php'; + } + } +}); diff --git a/vendor/dapphp/radius/composer.json b/vendor/dapphp/radius/composer.json new file mode 100644 index 0000000000..f47061441f --- /dev/null +++ b/vendor/dapphp/radius/composer.json @@ -0,0 +1,30 @@ +{ + "name": "dapphp/radius", + "description": "A pure PHP RADIUS client based on the SysCo/al implementation", + "type": "library", + "keywords": ["radius","authentication","authorization"], + "homepage": "https://github.com/dapphp/radius", + "require": { + "php": ">=5.3" + }, + "require-dev": { + "phpunit/phpunit": "dev-master" + }, + "license": "LGPL-3.0", + "authors": [ + { + "name": "Drew Phillips", + "email": "drew@drew-phillips.com", + "homepage": "https://drew-phillips.com/" + }, + { + "name": "SysCo/al", + "homepage": "http://developer.sysco.ch/php/" + } + ], + "autoload": { + "psr-4": { + "Dapphp\\Radius\\": "src/" + } + } +} diff --git a/vendor/dapphp/radius/example/client.php b/vendor/dapphp/radius/example/client.php new file mode 100644 index 0000000000..771190f3c7 --- /dev/null +++ b/vendor/dapphp/radius/example/client.php @@ -0,0 +1,31 @@ +setServer('127.0.0.1') // IP or hostname of RADIUS server + ->setSecret('testing123') // RADIUS shared secret + ->setNasIpAddress('127.0.0.1') // IP or hostname of NAS (device authenticating user) + ->setAttribute(32, 'vpn') // NAS identifier + ->setDebug(); // Enable debug output to screen/console + +// Send access request for a user with username = 'username' and password = 'password!' +$response = $radius->accessRequest('username', 'password!'); + +if ($response === false) { + // false returned on failure + echo sprintf("Access-Request failed with error %d (%s).\n", + $radius->getErrorCode(), + $radius->getErrorMessage() + ); +} else { + // access request was accepted - client authenticated successfully + echo "Success! Received Access-Accept response from RADIUS server.\n"; +} diff --git a/vendor/dapphp/radius/example/eapmschapv2.php b/vendor/dapphp/radius/example/eapmschapv2.php new file mode 100644 index 0000000000..36ecb55e40 --- /dev/null +++ b/vendor/dapphp/radius/example/eapmschapv2.php @@ -0,0 +1,37 @@ +setServer($server) // IP or hostname of RADIUS server + ->setSecret($secret) // RADIUS shared secret + ->setNasIpAddress('127.0.0.1') // IP or hostname of NAS (device authenticating user) + ->setNasPort(20); // NAS port + +// Send access request for user nemo +$response = $radius->accessRequestEapMsChapV2($user, $pass); + +if ($response === false) { + // false returned on failure + echo sprintf("Access-Request failed with error %d (%s).\n", + $radius->getErrorCode(), + $radius->getErrorMessage() + ); +} else { + // access request was accepted - client authenticated successfully + echo "Success! Received Access-Accept response from RADIUS server.\n"; +} diff --git a/vendor/dapphp/radius/example/mschap.php b/vendor/dapphp/radius/example/mschap.php new file mode 100644 index 0000000000..af14fffd4b --- /dev/null +++ b/vendor/dapphp/radius/example/mschap.php @@ -0,0 +1,34 @@ +setServer('192.168.0.20') // IP or hostname of RADIUS server + ->setSecret('xyzzy5461') // RADIUS shared secret + ->setNasIpAddress('127.0.0.1') // IP or hostname of NAS (device authenticating user) + ->setNasPort(20); // NAS port + +$radius->setMSChapPassword('arctangent123$'); // set mschapv1 password for user + +// Send access request for user nemo +$response = $radius->accessRequest('nemo'); + +if ($response === false) { + // false returned on failure + echo sprintf("Access-Request failed with error %d (%s).\n", + $radius->getErrorCode(), + $radius->getErrorMessage() + ); +} else { + // access request was accepted - client authenticated successfully + echo "Success! Received Access-Accept response from RADIUS server.\n"; +} diff --git a/vendor/dapphp/radius/lib/Pear_CHAP.php b/vendor/dapphp/radius/lib/Pear_CHAP.php new file mode 100644 index 0000000000..6055679a2c --- /dev/null +++ b/vendor/dapphp/radius/lib/Pear_CHAP.php @@ -0,0 +1,496 @@ + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The names of the authors may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This code cannot simply be copied and put under the GNU Public License or +any other GPL-like (LGPL, GPL2) License. + + $Id: CHAP.php 302857 2010-08-28 21:12:59Z mbretter $ + +This version of CHAP.php has been modified by Drew Phillips for dapphp/radius. +Modifications remove the PEAR dependency, change from PHP4 OOP to PHP5, and... +Changes are all commented inline throughout the source. +*/ + +// require_once 'PEAR.php'; // removed for dapphp/radius + +/** +* Classes for generating packets for various CHAP Protocols: +* CHAP-MD5: RFC1994 +* MS-CHAPv1: RFC2433 +* MS-CHAPv2: RFC2759 +* +* @package Crypt_CHAP +* @author Michael Bretterklieber +* @access public +* @version $Revision: 302857 $ +*/ + +/** + * class Crypt_CHAP + * + * Abstract base class for CHAP + * + * @package Crypt_CHAP + */ +class Crypt_CHAP /*extends PEAR // removed for dapphp/radius */ +{ + /** + * Random binary challenge + * @var string + */ + public $challenge = null; + //var $challenge = null; // removed for dapphp/radius + + /** + * Binary response + * @var string + */ + public $response = null; + //var $response = null; // removed for dapphp/radius + + /** + * User password + * @var string + */ + public $password = null; + //var $password = null; // removed for dapphp/radius + + /** + * Id of the authentication request. Should incremented after every request. + * @var integer + */ + public $chapid = 1; + //var $chapid = 1; // removed for dapphp/radius + + /** + * Constructor + * + * Generates a random challenge + * @return void + */ + //function Crypt_CHAP() // removed for dapphp/radius + public function __construct() + { + //$this->PEAR(); + $this->generateChallenge(); + } + + /** + * Generates a random binary challenge + * + * @param string $varname Name of the property + * @param integer $size Size of the challenge in Bytes + * @return void + */ + //function generateChallenge($varname = 'challenge', $size = 8) // removed for dapphp/radius + public function generateChallenge($varname = 'challenge', $size = 8) + { + $this->$varname = ''; + for ($i = 0; $i < $size; $i++) { + $this->$varname .= pack('C', 1 + mt_rand() % 255); + } + return $this->$varname; + } + + /** + * Generates the response. Overwrite this. + * + * @return void + */ + //function challengeResponse() // removed for dapphp/radius + public function challengeResponse() + { + } + +} + +/** + * class Crypt_CHAP_MD5 + * + * Generate CHAP-MD5 Packets + * + * @package Crypt_CHAP + */ +class Crypt_CHAP_MD5 extends Crypt_CHAP +{ + + /** + * Generates the response. + * + * CHAP-MD5 uses MD5-Hash for generating the response. The Hash consists + * of the chapid, the plaintext password and the challenge. + * + * @return string + */ + //function challengeResponse() // removed for dapphp/radius + public function challengeResponse() + { + return pack('H*', md5(pack('C', $this->chapid) . $this->password . $this->challenge)); + } +} + +/** + * class Crypt_CHAP_MSv1 + * + * Generate MS-CHAPv1 Packets. MS-CHAP doesen't use the plaintext password, it uses the + * NT-HASH wich is stored in the SAM-Database or in the smbpasswd, if you are using samba. + * The NT-HASH is MD4(str2unicode(plaintextpass)). + * You need the hash extension for this class. + * + * @package Crypt_CHAP + */ +class Crypt_CHAP_MSv1 extends Crypt_CHAP +{ + /** + * Wether using deprecated LM-Responses or not. + * 0 = use LM-Response, 1 = use NT-Response + * @var bool + */ + protected $flags = 1; + //var $flags = 1; // removed for dapphp/radius + + /** + * Constructor + * + * Loads the hash extension + * @return void + */ + //function Crypt_CHAP_MSv1() // removed for dapphp/radius + public function __construct() + { + parent::__construct(); + + // removed for dapphp/radius + //$this->Crypt_CHAP(); + //$this->loadExtension('hash'); + } + + /** + * Generates the NT-HASH from the given plaintext password. + * + * @access public + * @return string + */ + //function ntPasswordHash($password = null) // removed for dapphp/radius + public function ntPasswordHash($password = null) + { + //if (isset($password)) { + if (!is_null($password)) { + return pack('H*',hash('md4', $this->str2unicode($password))); + } else { + return pack('H*',hash('md4', $this->str2unicode($this->password))); + } + } + + /** + * Converts ascii to unicode. + * + * @access public + * @return string + */ + //function str2unicode($str) // removed for dapphp/radius + public function str2unicode($str) + { + $uni = ''; + $str = (string) $str; + for ($i = 0; $i < strlen($str); $i++) { + $a = ord($str{$i}) << 8; + $uni .= sprintf("%X", $a); + } + return pack('H*', $uni); + } + + /** + * Generates the NT-Response. + * + * @access public + * @return string + */ + //function challengeResponse() // removed for dapphp/radius + public function challengeResponse() + { + return $this->_challengeResponse(); + } + + /** + * Generates the NT-Response. + * + * @access public + * @return string + */ + //function ntChallengeResponse() // removed for dapphp/radius + public function ntChallengeResponse() + { + return $this->_challengeResponse(false); + } + + /** + * Generates the LAN-Manager-Response. + * + * @access public + * @return string + */ + //function lmChallengeResponse() // removed for dapphp/radius + public function lmChallengeResponse() + { + return $this->_challengeResponse(true); + } + + /** + * Generates the response. + * + * Generates the response using DES. + * + * @param bool $lm wether generating LAN-Manager-Response + * @access private + * @return string + */ + //function _challengeResponse($lm = false) // removed for dapphp/radius + protected function _challengeResponse($lm = false) + { + if ($lm) { + $hash = $this->lmPasswordHash(); + } else { + $hash = $this->ntPasswordHash(); + } + + while (strlen($hash) < 21) { + $hash .= "\0"; + } + + $td = mcrypt_module_open(MCRYPT_DES, '', MCRYPT_MODE_ECB, ''); + $iv = mcrypt_create_iv (mcrypt_enc_get_iv_size($td), MCRYPT_RAND); + $key = $this->_desAddParity(substr($hash, 0, 7)); + mcrypt_generic_init($td, $key, $iv); + $resp1 = mcrypt_generic($td, $this->challenge); + mcrypt_generic_deinit($td); + + $key = $this->_desAddParity(substr($hash, 7, 7)); + mcrypt_generic_init($td, $key, $iv); + $resp2 = mcrypt_generic($td, $this->challenge); + mcrypt_generic_deinit($td); + + $key = $this->_desAddParity(substr($hash, 14, 7)); + mcrypt_generic_init($td, $key, $iv); + $resp3 = mcrypt_generic($td, $this->challenge); + mcrypt_generic_deinit($td); + mcrypt_module_close($td); + + return $resp1 . $resp2 . $resp3; + } + + /** + * Generates the LAN-Manager-HASH from the given plaintext password. + * + * @access public + * @return string + */ + //function lmPasswordHash($password = null) // removed for dapphp/radius + public function lmPasswordHash($password = null) + { + $plain = isset($password) ? $password : $this->password; + + $plain = substr(strtoupper($plain), 0, 14); + while (strlen($plain) < 14) { + $plain .= "\0"; + } + + return $this->_desHash(substr($plain, 0, 7)) . $this->_desHash(substr($plain, 7, 7)); + } + + /** + * Generates an irreversible HASH. + * + * @access private + * @return string + */ + //function _desHash($plain) // removed for dapphp/radius + private function _desHash($plain) + { + $key = $this->_desAddParity($plain); + $td = mcrypt_module_open(MCRYPT_DES, '', MCRYPT_MODE_ECB, ''); + $iv = mcrypt_create_iv (mcrypt_enc_get_iv_size($td), MCRYPT_RAND); + mcrypt_generic_init($td, $key, $iv); + $hash = mcrypt_generic($td, 'KGS!@#$%'); + mcrypt_generic_deinit($td); + mcrypt_module_close($td); + return $hash; + } + + /** + * Adds the parity bit to the given DES key. + * + * @access private + * @param string $key 7-Bytes Key without parity + * @return string + */ + //function _desAddParity($key) // removed for dapphp/radius + private function _desAddParity($key) + { + static $odd_parity = array( + 1, 1, 2, 2, 4, 4, 7, 7, 8, 8, 11, 11, 13, 13, 14, 14, + 16, 16, 19, 19, 21, 21, 22, 22, 25, 25, 26, 26, 28, 28, 31, 31, + 32, 32, 35, 35, 37, 37, 38, 38, 41, 41, 42, 42, 44, 44, 47, 47, + 49, 49, 50, 50, 52, 52, 55, 55, 56, 56, 59, 59, 61, 61, 62, 62, + 64, 64, 67, 67, 69, 69, 70, 70, 73, 73, 74, 74, 76, 76, 79, 79, + 81, 81, 82, 82, 84, 84, 87, 87, 88, 88, 91, 91, 93, 93, 94, 94, + 97, 97, 98, 98,100,100,103,103,104,104,107,107,109,109,110,110, + 112,112,115,115,117,117,118,118,121,121,122,122,124,124,127,127, + 128,128,131,131,133,133,134,134,137,137,138,138,140,140,143,143, + 145,145,146,146,148,148,151,151,152,152,155,155,157,157,158,158, + 161,161,162,162,164,164,167,167,168,168,171,171,173,173,174,174, + 176,176,179,179,181,181,182,182,185,185,186,186,188,188,191,191, + 193,193,194,194,196,196,199,199,200,200,203,203,205,205,206,206, + 208,208,211,211,213,213,214,214,217,217,218,218,220,220,223,223, + 224,224,227,227,229,229,230,230,233,233,234,234,236,236,239,239, + 241,241,242,242,244,244,247,247,248,248,251,251,253,253,254,254); + + $bin = ''; + for ($i = 0; $i < strlen($key); $i++) { + $bin .= sprintf('%08s', decbin(ord($key{$i}))); + } + + $str1 = explode('-', substr(chunk_split($bin, 7, '-'), 0, -1)); + $x = ''; + foreach($str1 as $s) { + $x .= sprintf('%02s', dechex($odd_parity[bindec($s . '0')])); + } + + return pack('H*', $x); + + } + + /** + * Generates the response-packet. + * + * @param bool $lm wether including LAN-Manager-Response + * @access private + * @return string + */ + //function response($lm = false) // removed for dapphp/radius + public function response($lm = false) + { + $ntresp = $this->ntChallengeResponse(); + if ($lm) { + $lmresp = $this->lmChallengeResponse(); + } else { + $lmresp = str_repeat ("\0", 24); + } + + // Response: LM Response, NT Response, flags (0 = use LM Response, 1 = use NT Response) + return $lmresp . $ntresp . pack('C', !$lm); + } +} + +/** + * class Crypt_CHAP_MSv2 + * + * Generate MS-CHAPv2 Packets. This version of MS-CHAP uses a 16 Bytes authenticator + * challenge and a 16 Bytes peer Challenge. LAN-Manager responses no longer exists + * in this version. The challenge is already a SHA1 challenge hash of both challenges + * and of the username. + * + * @package Crypt_CHAP + */ +class Crypt_CHAP_MSv2 extends Crypt_CHAP_MSv1 +{ + /** + * The username + * @var string + */ + public $username = null; + //var $username = null; // removed for dapphp/radius + + /** + * The 16 Bytes random binary peer challenge + * @var string + */ + public $peerChallenge = null; + //var $peerChallenge = null; // removed for dapphp/radius + + /** + * The 16 Bytes random binary authenticator challenge + * @var string + */ + public $authChallenge = null; + //var $authChallenge = null; // removed for dapphp/radius + + /** + * Constructor + * + * Generates the 16 Bytes peer and authentication challenge + * @return void + */ + //function Crypt_CHAP_MSv2() // removed for dapphp/radius + public function __construct() + { + //$this->Crypt_CHAP_MSv1(); // removed for dapphp/radius + parent::__construct(); + $this->generateChallenge('peerChallenge', 16); + $this->generateChallenge('authChallenge', 16); + } + + /** + * Generates a hash from the NT-HASH. + * + * @access public + * @param string $nthash The NT-HASH + * @return string + */ + //function ntPasswordHashHash($nthash) // removed for dapphp/radius + public function ntPasswordHashHash($nthash) + { + return pack('H*',hash('md4', $nthash)); + } + + /** + * Generates the challenge hash from the peer and the authenticator challenge and + * the username. SHA1 is used for this, but only the first 8 Bytes are used. + * + * @access public + * @return string + */ + //function challengeHash() // removed for dapphp/radius + public function challengeHash() + { + return substr(pack('H*',hash('sha1', $this->peerChallenge . $this->authChallenge . $this->username)), 0, 8); + } + + /** + * Generates the response. + * + * @access public + * @return string + */ + //function challengeResponse() // removed for dapphp/radius + public function challengeResponse() + { + $this->challenge = $this->challengeHash(); + return $this->_challengeResponse(); + } +} diff --git a/vendor/dapphp/radius/phpunit.xml b/vendor/dapphp/radius/phpunit.xml new file mode 100644 index 0000000000..5835f9887c --- /dev/null +++ b/vendor/dapphp/radius/phpunit.xml @@ -0,0 +1,9 @@ + + + + + tests + + + diff --git a/vendor/dapphp/radius/src/EAPPacket.php b/vendor/dapphp/radius/src/EAPPacket.php new file mode 100644 index 0000000000..80487152cd --- /dev/null +++ b/vendor/dapphp/radius/src/EAPPacket.php @@ -0,0 +1,120 @@ +setId($id); + $packet->code = self::CODE_RESPONSE; + $packet->type = self::TYPE_IDENTITY; + $packet->data = $identity; + + return $packet->__toString(); + } + + /** + * Helper function for sending an MSCHAP v2 packet encapsulated in an EAP packet + * + * @param \Dapphp\Radius\MsChapV2Packet $chapPacket The MSCHAP v2 packet to send + * @param int $id The CHAP packet identifier (random if omitted) + * @return string An EAP-MSCHAPv2 packet + */ + public static function mschapv2(\Dapphp\Radius\MsChapV2Packet $chapPacket, $id = null) + { + $packet = new self(); + $packet->setId($id); + $packet->code = self::CODE_RESPONSE; + $packet->type = self::TYPE_EAP_MS_AUTH; + $packet->data = $chapPacket->__toString(); + + return $packet->__toString(); + } + + /** + * Convert a raw EAP packet into a structure + * + * @param string $packet The EAP packet + * @return \Dapphp\Radius\EAPPacket The parsed packet structure + */ + public static function fromString($packet) + { + // TODO: validate incoming packet better + + $p = new self(); + $p->code = ord($packet[0]); + $p->id = ord($packet[1]); + $temp = unpack('n', substr($packet, 2, 2)); + $length = array_shift($temp); + + if (strlen($packet) != $length) { + return false; + } + + $p->type = ord(substr($packet, 4, 1)); + $p->data = substr($packet, 5); + + return $p; + } + + /** + * Set the ID of the EAP packet + * @param int $id The EAP packet ID + * @return \Dapphp\Radius\EAPPacket Fluent interface + */ + public function setId($id = null) + { + if ($id == null) { + $this->id = mt_rand(0, 255); + } else { + $this->id = (int)$id; + } + + return $this; + } + + /** + * Convert the packet to a raw byte string + * + * @return string The packet as a byte string for sending over the wire + */ + public function __toString() + { + return chr($this->code) . + chr($this->id) . + pack('n', 5 + strlen($this->data)) . + chr($this->type) . + $this->data; + } +} diff --git a/vendor/dapphp/radius/src/MsChapV2Packet.php b/vendor/dapphp/radius/src/MsChapV2Packet.php new file mode 100644 index 0000000000..5fa1a53a3c --- /dev/null +++ b/vendor/dapphp/radius/src/MsChapV2Packet.php @@ -0,0 +1,101 @@ +opcode = ord($packet[0]); + $p->msChapId = ord($packet[1]); + $temp = unpack('n', substr($packet, 2, 2)); + $p->msLength = array_shift($temp); + $p->valueSize = ord($packet[4]); + + switch($p->opcode) { + case 1: // challenge + $p->challenge = substr($packet, 5, 16); + $p->name = substr($packet, -($p->msLength + 5 - $p->valueSize - 10)); + break; + + case 2: // response + break; + + case 3: // success + break; + + case 4: // failure + $p->response = substr($packet, 4); + break; + } + + return $p; + } + + /** + * Convert a packet structure to a byte string for sending over the wire + * @return string MSCHAP v2 packet string + */ + public function __toString() + { + $packet = pack('C', $this->opcode) . + chr($this->msChapId) . + "\x00\x00"; // temp length + + switch($this->opcode) { + case self::OPCODE_CHALLENGE: // challenge + $packet .= chr(16); + $packet .= $this->challenge; + $packet .= $this->name; + break; + + case self::OPCODE_RESPONSE: // response + $packet .= chr(49); + $packet .= $this->challenge; + $packet .= str_repeat("\x00", 8); // reserved + $packet .= $this->response; + $packet .= chr(0); // reserved flags + $packet .= $this->name; + break; + + case self::OPCODE_SUCCESS: // success + return chr(3); + } + + $length = pack('n', strlen($packet)); + $packet[2] = $length[0]; + $packet[3] = $length[1]; + + return $packet; + } +} diff --git a/vendor/dapphp/radius/src/Radius.php b/vendor/dapphp/radius/src/Radius.php new file mode 100644 index 0000000000..62a9143cd4 --- /dev/null +++ b/vendor/dapphp/radius/src/Radius.php @@ -0,0 +1,1317 @@ +. + * + * + * @author: SysCo/al + * @author: Drew Phillips + * @since CreationDate: 2008-01-04 + * @copyright (c) 2008 by SysCo systemes de communication sa + * @copyright (c) 2016 by Drew Phillips + * @version 2.5.0 + * @link http://developer.sysco.ch/php/ + * @link developer@sysco.ch + * @link https://github.com/dapphp/radius + * @link drew@drew-phillips.com + */ + +namespace Dapphp\Radius; + +/** + * A pure PHP RADIUS client implementation. + * + * Originally created by SysCo/al based on radius.class.php v1.2.2 + * Modified for PHP5 & PHP7 compatibility by Drew Phillips + * Switched from using ext/sockets to streams. + * + */ +class Radius +{ + /** @var int Access-Request packet type identifier */ + const TYPE_ACCESS_REQUEST = 1; + + /** @var int Access-Accept packet type identifier */ + const TYPE_ACCESS_ACCEPT = 2; + + /** @var int Access-Reject packet type identifier */ + const TYPE_ACCESS_REJECT = 3; + + /** @var int Accounting-Request packet type identifier */ + const TYPE_ACCOUNTING_REQUEST = 4; + + /** @var int Accounting-Response packet type identifier */ + const TYPE_ACCOUNTING_RESPONSE = 5; + + /** @var int Access-Challenge packet type identifier */ + const TYPE_ACCESS_CHALLENGE = 11; + + /** @var int Reserved packet type */ + const TYPE_RESERVED = 255; + + + /** @var string RADIUS server hostname or IP address */ + protected $server; + + /** @var string Shared secret with the RADIUS server */ + protected $secret; + + /** @var string RADIUS suffix (default is '') */ + protected $suffix; + + /** @var int Timeout for receiving UDP response packets (default = 5 seconds) */ + protected $timeout; + + /** @var int Authentication port (default = 1812) */ + protected $authenticationPort; + + /** @var int Accounting port (default = 1813) */ + protected $accountingPort; + + /** @var string Network Access Server (client) IP Address */ + protected $nasIpAddress; + + /** @var string NAS port. Physical port of the NAS authenticating the user */ + protected $nasPort; + + /** @var string Encrypted password, as described in RFC 2865 */ + protected $encryptedPassword; + + /** @var int Request-Authenticator, 16 octets random number */ + protected $requestAuthenticator; + + /** @var int Request-Authenticator from the response */ + protected $responseAuthenticator; + + /** @var string Username to send to the RADIUS server */ + protected $username; + + /** @var string Password for authenticating with the RADIUS server (before encryption) */ + protected $password; + + /** @var int The CHAP identifier for CHAP-Password attributes */ + protected $chapIdentifier; + + /** @var string Identifier field for the packet to be sent */ + protected $identifierToSend; + + /** @var string Identifier field for the received packet */ + protected $identifierReceived; + + /** @var int RADIUS packet type (1=Access-Request, 2=Access-Accept, etc) */ + protected $radiusPacket; + + /** @var int Packet type received in response from RADIUS server */ + protected $radiusPacketReceived; + + /** @var array List of RADIUS attributes to send */ + protected $attributesToSend; + + /** @var array List of attributes received in response */ + protected $attributesReceived; + + /** @var bool Whether or not to enable debug output */ + protected $debug; + + /** @var array RADIUS attributes info array */ + protected $attributesInfo; + + /** @var array RADIUS packet codes info array */ + protected $radiusPackets; + + /** @var int The error code from the last operation */ + protected $errorCode; + + /** @var string The error message from the last operation */ + protected $errorMessage; + + + public function __construct($radiusHost = '127.0.0.1', + $sharedSecret = '', + $radiusSuffix = '', + $timeout = 5, + $authenticationPort = 1812, + $accountingPort = 1813) + { + $this->radiusPackets = array(); + $this->radiusPackets[1] = 'Access-Request'; + $this->radiusPackets[2] = 'Access-Accept'; + $this->radiusPackets[3] = 'Access-Reject'; + $this->radiusPackets[4] = 'Accounting-Request'; + $this->radiusPackets[5] = 'Accounting-Response'; + $this->radiusPackets[11] = 'Access-Challenge'; + $this->radiusPackets[12] = 'Status-Server (experimental)'; + $this->radiusPackets[13] = 'Status-Client (experimental)'; + $this->radiusPackets[255] = 'Reserved'; + + $this->attributesInfo = array(); + $this->attributesInfo[1] = array('User-Name', 'S'); + $this->attributesInfo[2] = array('User-Password', 'S'); + $this->attributesInfo[3] = array('CHAP-Password', 'S'); // Type (1) / Length (1) / CHAP Ident (1) / String + $this->attributesInfo[4] = array('NAS-IP-Address', 'A'); + $this->attributesInfo[5] = array('NAS-Port', 'I'); + $this->attributesInfo[6] = array('Service-Type', 'I'); + $this->attributesInfo[7] = array('Framed-Protocol', 'I'); + $this->attributesInfo[8] = array('Framed-IP-Address', 'A'); + $this->attributesInfo[9] = array('Framed-IP-Netmask', 'A'); + $this->attributesInfo[10] = array('Framed-Routing', 'I'); + $this->attributesInfo[11] = array('Filter-Id', 'T'); + $this->attributesInfo[12] = array('Framed-MTU', 'I'); + $this->attributesInfo[13] = array('Framed-Compression', 'I'); + $this->attributesInfo[14] = array('Login-IP-Host', 'A'); + $this->attributesInfo[15] = array('Login-service', 'I'); + $this->attributesInfo[16] = array('Login-TCP-Port', 'I'); + $this->attributesInfo[17] = array('(unassigned)', ''); + $this->attributesInfo[18] = array('Reply-Message', 'T'); + $this->attributesInfo[19] = array('Callback-Number', 'S'); + $this->attributesInfo[20] = array('Callback-Id', 'S'); + $this->attributesInfo[21] = array('(unassigned)', ''); + $this->attributesInfo[22] = array('Framed-Route', 'T'); + $this->attributesInfo[23] = array('Framed-IPX-Network', 'I'); + $this->attributesInfo[24] = array('State', 'S'); + $this->attributesInfo[25] = array('Class', 'S'); + $this->attributesInfo[26] = array('Vendor-Specific', 'S'); // Type (1) / Length (1) / Vendor-Id (4) / Vendor type (1) / Vendor length (1) / Attribute-Specific... + $this->attributesInfo[27] = array('Session-Timeout', 'I'); + $this->attributesInfo[28] = array('Idle-Timeout', 'I'); + $this->attributesInfo[29] = array('Termination-Action', 'I'); + $this->attributesInfo[30] = array('Called-Station-Id', 'S'); + $this->attributesInfo[31] = array('Calling-Station-Id', 'S'); + $this->attributesInfo[32] = array('NAS-Identifier', 'S'); + $this->attributesInfo[33] = array('Proxy-State', 'S'); + $this->attributesInfo[34] = array('Login-LAT-Service', 'S'); + $this->attributesInfo[35] = array('Login-LAT-Node', 'S'); + $this->attributesInfo[36] = array('Login-LAT-Group', 'S'); + $this->attributesInfo[37] = array('Framed-AppleTalk-Link', 'I'); + $this->attributesInfo[38] = array('Framed-AppleTalk-Network', 'I'); + $this->attributesInfo[39] = array('Framed-AppleTalk-Zone', 'S'); + $this->attributesInfo[60] = array('CHAP-Challenge', 'S'); + $this->attributesInfo[61] = array('NAS-Port-Type', 'I'); + $this->attributesInfo[62] = array('Port-Limit', 'I'); + $this->attributesInfo[63] = array('Login-LAT-Port', 'S'); + $this->attributesInfo[76] = array('Prompt', 'I'); + $this->attributesInfo[79] = array('EAP-Message', 'S'); + $this->attributesInfo[80] = array('Message-Authenticator', 'S'); + + $this->identifierToSend = -1; + $this->chapIdentifier = 1; + + $this->generateRequestAuthenticator() + ->setServer($radiusHost) + ->setSecret($sharedSecret) + ->setAuthenticationPort($authenticationPort) + ->setAccountingPort($accountingPort) + ->setTimeout($timeout) + ->setRadiusSuffix($radiusSuffix); + + $this->clearError() + ->clearDataToSend() + ->clearDataReceived(); + } + + public function getLastError() + { + if (0 < $this->errorCode) { + return $this->errorMessage.' ('.$this->errorCode.')'; + } else { + return ''; + } + } + + public function getErrorCode() + { + return $this->errorCode; + } + + public function getErrorMessage() + { + return $this->errorMessage; + } + + public function setDebug($enabled = true) + { + $this->debug = (true === $enabled); + return $this; + } + + + public function setServer($hostOrIp) + { + $this->server = gethostbyname($hostOrIp); + return $this; + } + + public function setSecret($secret) + { + $this->secret = $secret; + return $this; + } + + public function getSecret() + { + return $this->secret; + } + + + public function setRadiusSuffix($suffix) + { + $this->suffix = $suffix; + return $this; + } + + public function setUsername($username = '') + { + if (false === strpos($username, '@')) + { + $username .= $this->suffix; + } + + $this->username = $username; + $this->setAttribute(1, $this->username); + + return $this; + } + + public function getUsername() + { + return $this->username; + } + + public function setPassword($password) + { + $this->password = $password; + $encryptedPassword = $this->getEncryptedPassword($password, $this->getSecret(), $this->getRequestAuthenticator()); + + $this->setAttribute(2, $encryptedPassword); + + return $this; + } + + public function getPassword() + { + return $this->password; + } + + public function getEncryptedPassword($password, $secret, $requestAuthenticator) + { + $encryptedPassword = ''; + $paddedPassword = $password; + + if (0 != (strlen($password) % 16)) { + $paddedPassword .= str_repeat(chr(0), (16 - strlen($password) % 16)); + } + + $previous = $requestAuthenticator; + + for ($i = 0; $i < (strlen($paddedPassword) / 16); ++$i) { + $temp = md5($secret . $previous); + + $previous = ''; + for ($j = 0; $j <= 15; ++$j) { + $value1 = ord(substr($paddedPassword, ($i * 16) + $j, 1)); + $value2 = hexdec(substr($temp, 2 * $j, 2)); + $xor_result = $value1 ^ $value2; + $previous .= chr($xor_result); + } + $encryptedPassword .= $previous; + } + + return $encryptedPassword; + } + + public function setIncludeMessageAuthenticator($include = true) + { + if ($include) { + $this->setAttribute(80, str_repeat("\x00", 16)); + } else { + $this->removeAttribute(80); + } + + return $this; + } + + public function setChapId($nextId) + { + $this->chapIdentifier = (int)$nextId; + + return $this; + } + + public function getChapId() + { + $id = $this->chapIdentifier; + $this->chapIdentifier++; + + return $id; + } + + public function setChapPassword($password) + { + $chapId = $this->getChapId(); + $chapMd5 = $this->getChapPassword($password, $chapId, $this->getRequestAuthenticator()); + + $this->setAttribute(3, pack('C', $chapId) . $chapMd5); + + return $this; + } + + public function getChapPassword($password, $chapId, $requestAuthenticator) + { + return md5(pack('C', $chapId) . $password . $requestAuthenticator, true); + } + + public function setMsChapPassword($password, $challenge = null) + { + $chap = new \Crypt_CHAP_MSv1(); + $chap->chapid = mt_rand(1, 255); + $chap->password = $password; + if (is_null($challenge)) { + $chap->generateChallenge(); + } else { + $chap->challenge = $challenge; + } + + $response = "\x00\x01" . str_repeat ("\0", 24) . $chap->ntChallengeResponse(); + + $this->setIncludeMessageAuthenticator(); + $this->setVendorSpecificAttribute(VendorId::MICROSOFT, 11, $chap->challenge); + $this->setVendorSpecificAttribute(VendorId::MICROSOFT, 1, $response); + + return $this; + } + + public function setNasIPAddress($hostOrIp = '') + { + if (0 < strlen($hostOrIp)) { + $this->nasIpAddress = gethostbyname($hostOrIp); + } else { + $hostOrIp = @php_uname('n'); + if (empty($hostOrIp)) { + $hostOrIp = (isset($_SERVER['HTTP_HOST'])) ? $_SERVER['HTTP_HOST'] : ''; + } + if (empty($hostOrIp)) { + $hostOrIp = (isset($_SERVER['SERVER_ADDR'])) ? $_SERVER['SERVER_ADDR'] : '0.0.0.0'; + } + + $this->nasIpAddress = gethostbyname($hostOrIp); + } + + $this->setAttribute(4, $this->nasIpAddress); + + return $this; + } + + public function getNasIPAddress() + { + return $this->nasIpAddress; + } + + public function setNasPort($port = 0) + { + $this->nasPort = intval($port); + $this->setAttribute(5, $this->nasPort); + + return $this; + } + + public function getNasPort() + { + return $this->nasPort; + } + + public function setTimeout($timeout = 5) + { + if (intval($timeout) > 0) { + $this->timeout = intval($timeout); + } + + return $this; + } + + public function getTimeout() + { + return $this->timeout; + } + + public function setAuthenticationPort($port) + { + if ((intval($port) > 0) && (intval($port) < 65536)) { + $this->authenticationPort = intval($port); + } + + return $this; + } + + public function getAuthenticationPort() + { + return $this->authenticationPort; + } + + public function setAccountingPort($port) + { + if ((intval($port) > 0) && (intval($port) < 65536)) + { + $this->accountingPort = intval($port); + } + + return $this; + } + + public function getResponsePacket() + { + return $this->radiusPacketReceived; + } + + /** + * Alias of Radius::getAttribute() + * + * @param unknown $type + * @return NULL|unknown + */ + public function getReceivedAttribute($type) + { + return $this->getAttribute($type); + } + + public function getReceivedAttributes() + { + return $this->attributesReceived; + } + + public function getReadableReceivedAttributes() + { + $attributes = ''; + + if (isset($this->attributesReceived)) { + foreach($this->attributesReceived as $receivedAttr) { + $info = $this->getAttributesInfo($receivedAttr[0]); + $attributes .= sprintf('%s: ', $info[0]); + + if (26 == $receivedAttr[0]) { + $vendorArr = $this->decodeVendorSpecificContent($receivedAttr[1]); + foreach($vendorArr as $vendor) { + $attributes .= sprintf('Vendor-Id: %s, Vendor-type: %s, Attribute-specific: %s', + $vendor[0], $vendor[1], $vendor[2]); + } + } else { + $attribues = $receivedAttr[1]; + } + + $attributes .= "
        \n"; + } + } + + return $attributes; + } + + public function getAttribute($type) + { + $value = null; + + if (is_array($this->attributesReceived)) { + foreach($this->attributesReceived as $attr) { + if (intval($type) == $attr[0]) { + $value = $attr; + break; + } + } + } + + return $value; + } + + public function getRadiusPacketInfo($info_index) + { + if (isset($this->radiusPackets[intval($info_index)])) { + return $this->radiusPackets[intval($info_index)]; + } else { + return ''; + } + } + + public function getAttributesInfo($info_index) + { + if (isset($this->attributesInfo[intval($info_index)])) { + return $this->attributesInfo[intval($info_index)]; + } else { + return array('', ''); + } + } + + public function setAttribute($type, $value) + { + $index = -1; + if (is_array($this->attributesToSend)) { + foreach($this->attributesToSend as $i => $attr) { + if (is_array($attr)) { + $tmp = $attr[0]; + } else { + $tmp = $attr; + } + if ($type == ord(substr($tmp, 0, 1))) { + $index = $i; + break; + } + } + } + + $temp = null; + + if (isset($this->attributesInfo[$type])) { + switch ($this->attributesInfo[$type][1]) { + case 'T': + // Text, 1-253 octets containing UTF-8 encoded ISO 10646 characters (RFC 2279). + $temp = chr($type) . chr(2 + strlen($value)) . $value; + break; + case 'S': + // String, 1-253 octets containing binary data (values 0 through 255 decimal, inclusive). + $temp = chr($type) . chr(2 + strlen($value)) . $value; + break; + case 'A': + // Address, 32 bit value, most significant octet first. + $ip = explode('.', $value); + $temp = chr($type) . chr(6) . chr($ip[0]) . chr($ip[1]) . chr($ip[2]) . chr($ip[3]); + break; + case 'I': + // Integer, 32 bit unsigned value, most significant octet first. + $temp = chr($type) . chr(6) . + chr(($value / (256 * 256 * 256)) % 256) . + chr(($value / (256 * 256)) % 256) . + chr(($value / (256)) % 256) . + chr($value % 256); + break; + case 'D': + // Time, 32 bit unsigned value, most significant octet first -- seconds since 00:00:00 UTC, January 1, 1970. (not used in this RFC) + $temp = null; + break; + default: + $temp = null; + } + } + + if ($index > -1) { + if ($type == 26) { // vendor specific + $this->attributesToSend[$index][] = $temp; + $action = 'Added'; + } else { + $this->attributesToSend[$index] = $temp; + $action = 'Modified'; + } + } else { + $this->attributesToSend[] = ($type == 26 /* vendor specific */) ? array($temp) : $temp; + $action = 'Added'; + } + + $info = $this->getAttributesInfo($type); + $this->debugInfo("{$action} Attribute {$type} ({$info[0]}), format {$info[1]}, value {$value}"); + + return $this; + } + + /** + * Get one or all set attributes to send + * + * @param int|null $type RADIUS attribute type, or null for all + * @return mixed array of attributes to send, or null if specific attribute not found, or + */ + public function getAttributesToSend($type = null) + { + if (is_array($this->attributesToSend)) { + if ($type == null) { + return $this->attributesToSend; + } else { + foreach($this->attributesToSend as $i => $attr) { + if (is_array($attr)) { + $tmp = $attr[0]; + } else { + $tmp = $attr; + } + if ($type == ord(substr($tmp, 0, 1))) { + return $this->decodeAttribute(substr($tmp, 2), $type); + } + } + return null; + } + } + + return array(); + } + + public function setVendorSpecificAttribute($vendorId, $attributeType, $attributeValue) + { + $data = pack('N', $vendorId); + $data .= chr($attributeType); + $data .= chr(2 + strlen($attributeValue)); + $data .= $attributeValue; + + $this->setAttribute(26, $data); + + return $this; + } + + public function removeAttribute($type) + { + $index = -1; + if (is_array($this->attributesToSend)) { + foreach($this->attributesToSend as $i => $attr) { + if (is_array($attr)) { + $tmp = $attr[0]; + } else { + $tmp = $attr; + } + if ($type == ord(substr($tmp, 0, 1))) { + unset($this->attributesToSend[$i]); + break; + } + } + } + + return $this; + } + + public function resetAttributes() + { + $this->attributesToSend = null; + return $this; + } + + public function resetVendorSpecificAttributes() + { + $this->removeAttribute(26); + + return $this; + } + + public function decodeVendorSpecificContent($rawValue) + { + $result = array(); + $offset = 0; + $vendorId = (ord(substr($rawValue, 0, 1)) * 256 * 256 * 256) + + (ord(substr($rawValue, 1, 1)) * 256 * 256) + + (ord(substr($rawValue, 2, 1)) * 256) + + ord(substr($rawValue, 3, 1)); + + $offset += 4; + while ($offset < strlen($rawValue)) { + $vendorType = (ord(substr($rawValue, 0 + $offset, 1))); + $vendorLength = (ord(substr($rawValue, 1 + $offset, 1))); + $attributeSpecific = substr($rawValue, 2 + $offset, $vendorLength); + $result[] = array($vendorId, $vendorType, $attributeSpecific); + $offset += $vendorLength; + } + + return $result; + } + + public function accessRequest($username = '', $password = '', $timeout = 0, $state = null) + { + $this->clearDataReceived() + ->clearError() + ->setPacketType(self::TYPE_ACCESS_REQUEST); + + if (0 < strlen($username)) { + $this->setUsername($username); + } + + if (0 < strlen($password)) { + $this->setPassword($password); + } + + if ($state !== null) { + $this->setAttribute(24, $state); + } else { + $this->setAttribute(6, 1); // 1=Login + } + + if (intval($timeout) > 0) { + $this->setTimeout($timeout); + } + + $packetData = $this->generateRadiusPacket(); + + $conn = $this->sendRadiusRequest($packetData); + if (!$conn) { + return false; + } + + $receivedPacket = $this->readRadiusResponse($conn); + @fclose($conn); + + if (!$receivedPacket) { + return false; + } + + if (!$this->parseRadiusResponsePacket($receivedPacket)) { + return false; + } + + if ($this->radiusPacketReceived == self::TYPE_ACCESS_REJECT) { + $this->errorCode = 3; + $this->errorMessage = 'Access rejected'; + } + + return (self::TYPE_ACCESS_ACCEPT == ($this->radiusPacketReceived)); + } + + public function accessRequestEapMsChapV2($username, $password) + { + /* + * RADIUS EAP MSCHAPv2 Process: + * > RADIUS ACCESS_REQUEST w/ EAP identity packet + * < ACCESS_CHALLENGE w/ MSCHAP challenge encapsulated in EAP request + * CHAP packet contains auth_challenge value + * Calculate encrypted password based on challenge for response + * > ACCESS_REQUEST w/ MSCHAP challenge response, peer_challenge & + * encrypted password encapsulated in an EAP response packet + * < ACCESS_CHALLENGE w/ MSCHAP success or failure in EAP packet. + * > ACCESS_REQUEST w/ EAP success packet if challenge was accepted + * + */ + + $attributes = $this->getAttributesToSend(); + + $this->clearDataToSend() + ->clearError() + ->setPacketType(self::TYPE_ACCESS_REQUEST); + + $this->attributesToSend = $attributes; + + $eapPacket = EAPPacket::identity($username); + $this->setUsername($username) + ->setAttribute(79, $eapPacket) + ->setIncludeMessageAuthenticator(); + + $this->accessRequest(); + + if ($this->errorCode) { + return false; + } elseif ($this->radiusPacketReceived != self::TYPE_ACCESS_CHALLENGE) { + $this->errorCode = 102; + $this->errorMessage = 'Access-Request did not get Access-Challenge response'; + return false; + } + + $state = $this->getReceivedAttribute(24); + $eap = $this->getReceivedAttribute(79); + + if ($eap == null) { + $this->errorCode = 102; + $this->errorMessage = 'EAP packet missing from MSCHAP v2 access response'; + return false; + } + + $eap = EAPPacket::fromString($eap); + + if ($eap->type != EAPPacket::TYPE_EAP_MS_AUTH) { + $this->errorCode = 102; + $this->errorMessage = 'EAP type is not EAP_MS_AUTH in access response'; + return false; + } + + $chapPacket = MsChapV2Packet::fromString($eap->data); + + if (!$chapPacket || $chapPacket->opcode != MsChapV2Packet::OPCODE_CHALLENGE) { + $this->errorCode = 102; + $this->errorMessage = 'MSCHAP v2 access response packet missing challenge'; + return false; + } + + $challenge = $chapPacket->challenge; + $chapId = $chapPacket->msChapId; + + $msChapV2 = new \Crypt_CHAP_MSv2; + $msChapV2->username = $username; + $msChapV2->password = $password; + $msChapV2->chapid = $chapPacket->msChapId; + $msChapV2->authChallenge = $challenge; + + $response = $msChapV2->challengeResponse(); + + $chapPacket->opcode = MsChapV2Packet::OPCODE_RESPONSE; + $chapPacket->response = $response; + $chapPacket->name = $username; + $chapPacket->challenge = $msChapV2->peerChallenge; + + $eapPacket = EAPPacket::mschapv2($chapPacket, $chapId); + + $this->clearDataToSend() + ->setPacketType(self::TYPE_ACCESS_REQUEST) + ->setUsername($username) + ->setAttribute(79, $eapPacket) + ->setIncludeMessageAuthenticator(); + + $resp = $this->accessRequest(null, null, 0, $state); + + if ($this->errorCode) { + return false; + } + + $eap = $this->getReceivedAttribute(79); + + if ($eap == null) { + $this->errorCode = 102; + $this->errorMessage = 'EAP packet missing from MSCHAP v2 challenge response'; + return false; + } + + $eap = EAPPacket::fromString($eap); + + if ($eap->type != EAPPacket::TYPE_EAP_MS_AUTH) { + $this->errorCode = 102; + $this->errorMessage = 'EAP type is not EAP_MS_AUTH in access response'; + return false; + } + + $chapPacket = MsChapV2Packet::fromString($eap->data); + + if ($chapPacket->opcode != MsChapV2Packet::OPCODE_SUCCESS) { + $this->errorCode = 3; + + $err = (!empty($chapPacket->response)) ? $chapPacket->response : 'General authentication failure'; + + if (preg_match('/E=(\d+)/', $chapPacket->response, $err)) { + switch($err[1]) { + case '691': + $err = 'Authentication failure, username or password incorrect.'; + break; + + case '646': + $err = 'Authentication failure, restricted logon hours.'; + break; + + case '647': + $err = 'Account disabled'; + break; + + case '648': + $err = 'Password expired'; + break; + + case '649': + $err = 'No dial in permission'; + break; + } + } + + $this->errorMessage = $err; + return false; + } + + // got a success response - send success acknowledgement + + $state = $this->getReceivedAttribute(24); + $chapPacket = new MsChapV2Packet(); + $chapPacket->opcode = MsChapV2Packet::OPCODE_SUCCESS; + + $eapPacket = EAPPacket::mschapv2($chapPacket, $chapId + 1); + + $this->clearDataToSend() + ->setPacketType(self::TYPE_ACCESS_REQUEST) + ->setUsername($username) + ->setAttribute(79, $eapPacket) + ->setIncludeMessageAuthenticator(); + + $resp = $this->accessRequest(null, null, 0, $state); + + if ($resp !== true) { + return false; + } else { + return true; + } + } + + private function sendRadiusRequest($packetData) + { + $packetLen = strlen($packetData); + + $conn = @fsockopen('udp://' . $this->server, $this->authenticationPort, $errno, $errstr); + if (!$conn) { + $this->errorCode = $errno; + $this->errorMessage = $errstr; + return false; + } + + $sent = fwrite($conn, $packetData); + if (!$sent || $packetLen != $sent) { + $this->errorCode = 55; // CURLE_SEND_ERROR + $this->errorMessage = 'Failed to send UDP packet'; + return false; + } + + if ($this->debug) { + $this->debugInfo( + sprintf( + 'Packet type %d (%s) sent', + $this->radiusPacket, + $this->getRadiusPacketInfo($this->radiusPacket) + ) + ); + foreach($this->attributesToSend as $attrs) { + if (!is_array($attrs)) { + $attrs = array($attrs); + } + + foreach($attrs as $attr) { + $attrInfo = $this->getAttributesInfo(ord(substr($attr, 0, 1))); + $this->debugInfo( + sprintf( + 'Attribute %d (%s), length (%d), format %s, value %s', + ord(substr($attr, 0, 1)), + $attrInfo[0], + ord(substr($attr, 1, 1)) - 2, + $attrInfo[1], + $this->decodeAttribute(substr($attr, 2), ord(substr($attr, 0, 1))) + ) + ); + } + } + } + + return $conn; + } + + private function readRadiusResponse($conn) + { + stream_set_blocking($conn, false); + $read = array($conn); + $write = null; + $except = null; + + $receivedPacket = ''; + $packetLen = null; + $elapsed = 0; + + do { + // Loop until the entire packet is read. Even with small packets, + // not all data might get returned in one read on a non-blocking stream. + + $t0 = microtime(true); + $changed = stream_select($read, $write, $except, $this->timeout); + $t1 = microtime(true); + + if ($changed > 0) { + $data = fgets($conn, 1024); + // Try to read as much data from the stream in one pass until 4 + // bytes are read. Once we have 4 bytes, we can determine the + // length of the RADIUS response to know when to stop reading. + + if ($data === false) { + // recv could fail due to ICMP destination unreachable + $this->errorCode = 56; // CURLE_RECV_ERROR + $this->errorMessage = 'Failure with receiving network data'; + return false; + } + + $receivedPacket .= $data; + + if (strlen($receivedPacket) < 4) { + // not enough data to get the size + // this will probably never happen + continue; + } + + if ($packetLen == null) { + // first pass - decode the packet size from response + $packetLen = unpack('n', substr($receivedPacket, 2, 2)); + $packetLen = (int)array_shift($packetLen); + + if ($packetLen < 4 || $packetLen > 65507) { + $this->errorCode = 102; + $this->errorMessage = "Bad packet size in RADIUS response. Got {$packetLen}"; + return false; + } + } + + } elseif ($changed === false) { + $this->errorCode = 2; + $this->errorMessage = 'stream_select returned false'; + return false; + } else { + $this->errorCode = 28; // CURLE_OPERATION_TIMEDOUT + $this->errorMessage = 'Timed out while waiting for RADIUS response'; + return false; + } + + $elapsed += ($t1 - $t0); + } while ($elapsed < $this->timeout && strlen($receivedPacket) < $packetLen); + + return $receivedPacket; + } + + private function parseRadiusResponsePacket($packet) + { + $this->radiusPacketReceived = intval(ord(substr($packet, 0, 1))); + + $this->debugInfo(sprintf( + 'Packet type %d (%s) received', + $this->radiusPacketReceived, + $this->getRadiusPacketInfo($this->getResponsePacket()) + )); + + if ($this->radiusPacketReceived > 0) { + $this->identifierReceived = intval(ord(substr($packet, 1, 1))); + $packetLenRx = unpack('n', substr($packet, 2, 2)); + $packetLenRx = array_shift($packetLenRx); + $this->responseAuthenticator = bin2hex(substr($packet, 4, 16)); + if ($packetLenRx > 20) { + $attrContent = substr($packet, 20); + } else { + $attrContent = ''; + } + + $authCheck = md5( + substr($packet, 0, 4) . + $this->getRequestAuthenticator() . + $attrContent . + $this->getSecret() + ); + + if ($authCheck !== $this->responseAuthenticator) { + $this->errorCode = 101; + $this->errorMessage = 'Response authenticator in received packet did not match expected value'; + return false; + } + + while (strlen($attrContent) > 2) { + $attrType = intval(ord(substr($attrContent, 0, 1))); + $attrLength = intval(ord(substr($attrContent, 1, 1))); + $attrValueRaw = substr($attrContent, 2, $attrLength - 2); + $attrContent = substr($attrContent, $attrLength); + $attrValue = $this->decodeAttribute($attrValueRaw, $attrType); + + $attr = $this->getAttributesInfo($attrType); + if (26 == $attrType) { + $vendorArr = $this->decodeVendorSpecificContent($attrValue); + foreach($vendorArr as $vendor) { + $this->debugInfo( + sprintf( + 'Attribute %d (%s), length %d, format %s, Vendor-Id: %d, Vendor-type: %s, Attribute-specific: %s', + $attrType, $attr[0], $attrLength - 2, + $attr[1], $vendor[0], $vendor[1], $vendor[2] + ) + ); + } + } else { + $this->debugInfo( + sprintf( + 'Attribute %d (%s), length %d, format %s, value %s', + $attrType, $attr[0], $attrLength - 2, $attr[1], $attrValue + ) + ); + } + + // TODO: check message authenticator + + $this->attributesReceived[] = array($attrType, $attrValue); + } + } else { + $this->errorCode = 100; + $this->errorMessage = 'Invalid response packet received'; + return false; + } + + return true; + } + + public function generateRadiusPacket() + { + $hasAuthenticator = false; + $attrContent = ''; + $len = 0; + $offset = null; + foreach($this->attributesToSend as $i => $attr) { + $len = strlen($attrContent); + + if (is_array($attr)) { + // vendor specific (could have multiple attributes) + $attrContent .= implode('', $attr); + } else { + if (ord($attr[0]) == 80) { + // If Message-Authenticator is set, note offset so it can be updated + $hasAuthenticator = true; + $offset = $len + 2; // current length + type(1) + length(1) + } + + $attrContent .= $attr; + } + } + + $attrLen = strlen($attrContent); + $packetLen = 4; // Radius packet code + Identifier + Length high + Length low + $packetLen += strlen($this->getRequestAuthenticator()); // Request-Authenticator + $packetLen += $attrLen; // Attributes + + $packetData = chr($this->radiusPacket); + $packetData .= pack('C', $this->getNextIdentifier()); + $packetData .= pack('n', $packetLen); + $packetData .= $this->getRequestAuthenticator(); + $packetData .= $attrContent; + + if ($hasAuthenticator && !is_null($offset)) { + $messageAuthenticator = hash_hmac('md5', $packetData, $this->secret, true); + // calculate packet hmac, replace hex 0's with actual hash + for ($i = 0; $i < strlen($messageAuthenticator); ++$i) { + $packetData[20 + $offset + $i] = $messageAuthenticator[$i]; + } + } + + return $packetData; + } + + public function setNextIdentifier($identifierToSend = 0) + { + $id = (int)$identifierToSend; + + $this->identifierToSend = $id - 1; + + return $this; + } + + public function getNextIdentifier() + { + $this->identifierToSend = (($this->identifierToSend + 1) % 256); + return $this->identifierToSend; + } + + private function generateRequestAuthenticator() + { + $this->requestAuthenticator = ''; + + for ($c = 0; $c <= 15; ++$c) { + $this->requestAuthenticator .= chr(rand(1, 255)); + } + + return $this; + } + + public function setRequestAuthenticator($requestAuthenticator) + { + if (strlen($requestAuthenticator) != 16) { + return false; + } + + $this->requestAuthenticator = $requestAuthenticator; + + return $this; + } + + public function getRequestAuthenticator() + { + return $this->requestAuthenticator; + } + + protected function clearDataToSend() + { + $this->radiusPacket = 0; + $this->attributesToSend = null; + return $this; + } + + protected function clearDataReceived() + { + $this->radiusPacketReceived = 0; + $this->attributesReceived = null; + return $this; + } + + public function setPacketType($type) + { + $this->radiusPacket = $type; + return $this; + } + + private function clearError() + { + $this->errorCode = 0; + $this->errorMessage = ''; + + return $this; + } + + protected function debugInfo($message) + { + if ($this->debug) { + echo date('Y-m-d H:i:s').' DEBUG: '; + echo $message; + echo "
        \n"; + flush(); + } + } + + private function decodeAttribute($rawValue, $attributeFormat) + { + $value = null; + + if (isset($this->attributesInfo[$attributeFormat])) { + switch ($this->attributesInfo[$attributeFormat][1]) { + case 'T': + $value = $rawValue; + break; + case 'S': + $value = $rawValue; + break; + case 'A': + $value = ord(substr($rawValue, 0, 1)) . '.' . + ord(substr($rawValue, 1, 1)) . '.' . + ord(substr($rawValue, 2, 1)) . '.' . + ord(substr($rawValue, 3, 1)); + break; + case 'I': + $value = (ord(substr($rawValue, 0, 1)) * 256 * 256 * 256) + + (ord(substr($rawValue, 1, 1)) * 256 * 256) + + (ord(substr($rawValue, 2, 1)) * 256) + + ord(substr($rawValue, 3, 1)); + break; + case 'D': + $value = null; + break; + default: + $value = null; + } + } + + return $value; + } +} diff --git a/vendor/dapphp/radius/src/VendorId.php b/vendor/dapphp/radius/src/VendorId.php new file mode 100644 index 0000000000..fbccd1d778 --- /dev/null +++ b/vendor/dapphp/radius/src/VendorId.php @@ -0,0 +1,175 @@ +setAttribute(80, $test); + $attr = $client->getAttributesToSend(80); + $this->assertEquals($test, $attr); + + $client->removeAttribute(80); + $attr = $client->getAttributesToSend(80); + $this->assertEquals(null, $attr); + + // integer value test + $nasPort = 32768; + + $client->setAttribute(5, $nasPort); + $attr = $client->getAttributesToSend(5); + $this->assertEquals($nasPort, $attr); + + $client->removeAttribute(5); + $attr = $client->getAttributesToSend(5); + $this->assertEquals(null, $attr); + } + + public function testGetAttributes() + { + $client = new Radius(); + $username = 'LinusX2@arpa.net'; + $nasIp = '192.168.88.1'; + $nasPort = 64000; + + $expected = ''; // manually constructed hex string + $expected .= chr(1); // username + $expected .= chr(2 + strlen($username)); // length + $expected .= $username; + + $expected .= chr(4); // nas ip + $expected .= chr(6); + $expected .= pack('N', ip2long($nasIp)); + + $expected .= chr(5); // nas port + $expected .= chr(6); + $expected .= pack('N', $nasPort); + + + $client->setUsername($username) + ->setNasIPAddress($nasIp) + ->setNasPort($nasPort); + + $actual = implode('', $client->getAttributesToSend()); + + $this->assertEquals($expected, $actual); + $this->assertEquals($username, $client->getAttributesToSend(1)); + $this->assertEquals($nasIp, $client->getAttributesToSend(4)); + $this->assertEquals($nasPort, $client->getAttributesToSend(5)); + } + + public function testEncryptedPassword() + { + $pass = 'arctangent'; + $secret = 'xyzzy5461'; + $requestAuthenticator = "\x0f\x40\x3f\x94\x73\x97\x80\x57\xbd\x83\xd5\xcb\x98\xf4\x22\x7a"; + $client = new Radius(); + + $expected = "\x0d\xbe\x70\x8d\x93\xd4\x13\xce\x31\x96\xe4\x3f\x78\x2a\x0a\xee"; + $encrypted = $client->getEncryptedPassword($pass, $secret, $requestAuthenticator); + + $this->assertEquals($expected, $encrypted); + } + + public function testEncryptedPassword2() + { + $pass = 'm1cr0$ofT_W1nDoWz*'; + $secret = '%iM8WD3(9bSh4jXNyOH%4W6RE1s4bfQ#0h*n^lOz'; + $requestAuthenticator = "\x7d\x22\x56\x6c\x9d\x2d\x50\x26\x88\xc5\xb3\xf9\x33\x77\x14\x55"; + $client = new Radius(); + + $expected = "\x44\xe0\xac\xdc\xed\x56\x39\x67\xb1\x41\x90\xef\x3e\x10\xca\x2c\xb5\xb0\x5f\xf6\x6c\x31\x87\xf0\x2a\x92\xcb\x65\xeb\x97\x31\x1f"; + $encrypted = $client->getEncryptedPassword($pass, $secret, $requestAuthenticator); + + $this->assertEquals($expected, $encrypted); + } + + public function testAuthenticationPacket() + { + $user = 'nemo'; + $pass = 'arctangent'; + $secret = 'xyzzy5461'; + $nas = '192.168.1.16'; + $nasPort = 3; + + $client = new Radius(); + + $client->setRequestAuthenticator("\x0f\x40\x3f\x94\x73\x97\x80\x57\xbd\x83\xd5\xcb\x98\xf4\x22\x7a"); + + $client->setPacketType(Radius::TYPE_ACCESS_REQUEST) + ->setSecret($secret) + ->setUsername($user) + ->setPassword($pass) + ->setNasIPAddress($nas) + ->setNasPort($nasPort); + + $packet = $client->generateRadiusPacket(); + $pwEnc = "\x0d\xbe\x70\x8d\x93\xd4\x13\xce\x31\x96\xe4\x3f\x78\x2a\x0a\xee"; + $expected = "\x01\x00\x00\x38\x0f\x40\x3f\x94\x73\x97\x80\x57\xbd\x83" + . "\xd5\xcb\x98\xf4\x22\x7a\x01\x06\x6e\x65\x6d\x6f\x02\x12" + . $pwEnc + . "\x04\x06\xc0\xa8\x01\x10\x05\x06\x00\x00\x00\x03"; + + $this->assertEquals($expected, $packet); + } + + public function testFramedAuthPacket() + { + $user = 'flopsy'; + $pass = 'arctangent'; + $reqAuth = "\x2a\xee\x86\xf0\x8d\x0d\x55\x96\x9c\xa5\x97\x8e\x0d\x33\x67\xa2"; + $nas = '192.168.1.16'; + $nasPort = 20; + + $expected = "\x01\x01\x00\x47\x2a\xee\x86\xf0\x8d\x0d\x55\x96\x9c\xa5" + ."\x97\x8e\x0d\x33\x67\xa2\x01\x08\x66\x6c\x6f\x70\x73\x79" + ."\x03\x13\x16\xe9\x75\x57\xc3\x16\x18\x58\x95\xf2\x93\xff" + ."\x63\x44\x07\x72\x75\x04\x06\xc0\xa8\x01\x10\x05\x06\x00" + ."\x00\x00\x14\x06\x06\x00\x00\x00\x02\x07\x06\x00\x00\x00\x01"; + + $client = new Radius(); + $client->getNextIdentifier(); // increment to 1 for test + $client->setChapId(22); + $client->setRequestAuthenticator($reqAuth) + ->setPacketType(Radius::TYPE_ACCESS_REQUEST) + ->setUsername($user) + ->setChapPassword($pass) + ->setNasIPAddress($nas) + ->setNasPort($nasPort) + ->setAttribute(6, 2) // service type (6) = framed (2) + ->setAttribute(7, 1); // framed protocol (7) = ppp (1) + + $packet = $client->generateRadiusPacket(); + + $this->assertEquals($expected, $packet); + } + + public function testHmacMd5() + { + $str = hex2bin('01870082093e4ad125399f8ac4ba6b00ab69a04001066e656d6f04067f0000010506000000145012000000000000000000000000000000001a10000001370b0a740c7921e45e91391a3a00000137013400010000000000000000000000000000000000000000000000004521bd46aebfd2ab3ec21dd6e6bbfa2e4ff325eab720fe37'); + $hash = hash_hmac('md5', $str, 'xyzzy5461', true); + + $expected = '48a3704ac91e8191497a1f3f213eb338'; + $actual = bin2hex($hash); + + $this->assertEquals($expected, $actual); + } + + public function testMsChapV1Packet() + { + $reqId = 135; + $user = 'nemo'; + $pass = 'arctangent123$'; + $secret = 'xyzzy5461'; + $reqAuth = "\x09\x3e\x4a\xd1\x25\x39\x9f\x8a\xc4\xba\x6b\x00\xab\x69\xa0\x40"; + $nas = '127.0.0.1'; + $nasPort = 20; + $challenge = "\x74\x0c\x79\x21\xe4\x5e\x91\x39"; + + $client = new Radius(); + $client->setPacketType(Radius::TYPE_ACCESS_REQUEST) + ->setNextIdentifier($reqId) + ->setRequestAuthenticator($reqAuth) + ->setSecret($secret) + ->setUsername($user) + ->setNasIPAddress($nas) + ->setNasPort($nasPort) + ->setAttribute(80, str_repeat("\x00", 16)) + ->setMsChapPassword($pass, $challenge); + + $packet = $client->generateRadiusPacket(); + + $packet = bin2hex($packet); + $expected = "01870082093e4ad125399f8ac4ba6b00ab69a04001066e656d6f04067f000001050600000014501248a3704ac91e8191497a1f3f213eb3381a10000001370b0a740c7921e45e91391a3a00000137013400010000000000000000000000000000000000000000000000004521bd46aebfd2ab3ec21dd6e6bbfa2e4ff325eab720fe37"; + + $this->assertEquals($expected, $packet); + } + + public function testEapPacketBasic() + { + $p = new EAPPacket(); + $p->code = EAPPacket::CODE_REQUEST; + $p->id = 111; + $p->type = EAPPacket::TYPE_IDENTITY; + $p->data = 'here is some data'; + + $expected = "016f0016016865726520697320736f6d652064617461"; + + $this->assertEquals($expected, bin2hex($p->__toString())); + + $parsed = EAPPacket::fromString($p->__toString()); + + $this->assertEquals(EAPPacket::CODE_REQUEST, $parsed->code); + $this->assertEquals(111, $parsed->id); + $this->assertEquals(EAPPacket::TYPE_IDENTITY, $parsed->type); + $this->assertEquals($p->data, $parsed->data); + + $p2 = new EAPPacket(); + $p2->code = EAPPacket::CODE_RESPONSE; + $p2->id = 128; + $p2->type = EAPPacket::TYPE_NOTIFICATION; + $p2->data = "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x99\x98\x97\x96\x95\x94\x93\x92\x91\x90"; + + $p3 = EAPPacket::fromString($p2->__toString()); + + $this->assertEquals(EAPPacket::CODE_RESPONSE, $p3->code); + $this->assertEquals(128, $p3->id); + $this->assertEquals(2, $p3->type); + $this->assertEquals("\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x99\x98\x97\x96\x95\x94\x93\x92\x91\x90", $p3->data); + } + + public function testEapMsChapV2() + { + $server = getenv('RADIUS_SERVER_ADDR'); + $user = getenv('RADIUS_USER'); + $pass = getenv('RADIUS_PASS'); + $secret = getenv('RADIUS_SECRET'); + + if (!$server) { + $this->markTestSkipped('RADIUS_SERVER_ADDR environment variable not set'); + } elseif (!$user) { + $this->markTestSkipped('RADIUS_USER environment variable not set'); + } elseif (!$pass) { + $this->markTestSkipped('RADIUS_PASS environment variable not set'); + } elseif (!$secret) { + $this->markTestSkipped('RADIUS_SECRET environment variable not set'); + } + + $client = new Radius(); + $client->setServer($server) + ->setSecret($secret); + + $success = $client->accessRequestEapMsChapV2($user, $pass); + + $this->assertTrue($success); + } +} diff --git a/vendor/dapphp/radius/tests/bootstrap.php b/vendor/dapphp/radius/tests/bootstrap.php new file mode 100644 index 0000000000..1634d8db39 --- /dev/null +++ b/vendor/dapphp/radius/tests/bootstrap.php @@ -0,0 +1,3 @@ +` tag from PHP files. + * 11/may/2014: added `sass.php` file to highlight Sass stylesheets. + * 28/sep/2012: added `twig.php` file to highlight Twig templates. diff --git a/vendor/easybook/geshi/composer.json b/vendor/easybook/geshi/composer.json new file mode 100644 index 0000000000..33494664cb --- /dev/null +++ b/vendor/easybook/geshi/composer.json @@ -0,0 +1,24 @@ +{ + "name": "easybook/geshi", + "type": "library", + "description": "GeSHi - Generic Syntax Highlighter. This is an unmodified port of GeSHi project code found on SourceForge.", + "homepage": "http://qbnz.com/highlighter", + "keywords": ["highlighter", "highlight", "syntax"], + "license": "GPL-2.0", + "authors": [ + { + "name": "Benny Baumann", + "email": "BenBE@geshi.org" + }, + { + "name": "Nigel McNie", + "email": "nigel@geshi.org" + } + ], + "require": { + "php": ">4.3.0" + }, + "autoload": { + "classmap": ["./"] + } +} \ No newline at end of file diff --git a/vendor/easybook/geshi/contrib/aliased.php b/vendor/easybook/geshi/contrib/aliased.php new file mode 100644 index 0000000000..cee312899c --- /dev/null +++ b/vendor/easybook/geshi/contrib/aliased.php @@ -0,0 +1,123 @@ + + * @version $Id: aliased.php 2533 2012-08-15 18:49:04Z benbe $ + */ + +// Your config here +define("SOURCE_ROOT", "/var/www/your/source/root/"); + +// Assume you've put geshi in the include_path already +require_once("geshi.php"); + +// Get path info +$path = SOURCE_ROOT.$_SERVER['PATH_INFO']; + +// Check for dickheads trying to use '../' to get to sensitive areas +$base_path_len = strlen(SOURCE_ROOT); +$real_path = realpath($path); +if(strncmp($real_path, SOURCE_ROOT, $base_path_len)) { + exit("Access outside acceptable path."); +} + +// Check file exists +if(!file_exists($path)) { + exit("File not found ($path)."); +} + +// Prepare GeSHi instance +$geshi = new GeSHi(); +$geshi->set_language('text'); +$geshi->load_from_file($path); +$geshi->set_header_type(GESHI_HEADER_PRE); +$geshi->enable_classes(); +$geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS, 10); +$geshi->set_overall_style('color: #000066; border: 1px solid #d0d0d0; background-color: #f0f0f0;', true); +$geshi->set_line_style('font: normal normal 95% \'Courier New\', Courier, monospace; color: #003030;', 'font-weight: bold; color: #006060;', true); +$geshi->set_code_style('color: #000020;', 'color: #000020;'); +$geshi->set_link_styles(GESHI_LINK, 'color: #000060;'); +$geshi->set_link_styles(GESHI_HOVER, 'background-color: #f0f000;'); +$geshi->set_header_content('Source code viewer - ' . $path . ' - ' . $geshi->get_language_name()); +$geshi->set_header_content_style('font-family: Verdana, Arial, sans-serif; color: #808080; font-size: 70%; font-weight: bold; background-color: #f0f0ff; border-bottom: 1px solid #d0d0d0; padding: 2px;'); +$geshi->set_footer_content('Parsed in


        + + diff --git a/vendor/easybook/geshi/contrib/cssgen.php b/vendor/easybook/geshi/contrib/cssgen.php new file mode 100644 index 0000000000..15454f4746 --- /dev/null +++ b/vendor/easybook/geshi/contrib/cssgen.php @@ -0,0 +1,466 @@ + + + + GeSHi CSS Generator :: ' . $title . ' + + + + +

        ' . $title . '

        +'; +} + +function make_footer () +{ + echo ' +'; +} + + +function get_var ( $var_name ) +{ + if ( isset($_GET[$var_name]) ) + { + return str_replace("\'", "'", $_GET[$var_name]); + } + elseif ( isset($_POST[$var_name]) ) + { + return str_replace("\'", "'", $_POST[$var_name]); + } + return null; +} + + + +// +// Unset everything +// +foreach ( $_REQUEST as $var ) +{ + unset($$var); +} +foreach ( array( + '_POST' => 'HTTP_POST_VARS', + '_GET' => 'HTTP_GET_VARS', + '_COOKIE' => 'HTTP_COOKIE_VARS', + '_SERVER' => 'HTTP_SERVER_VARS', + '_ENV' => 'HTTP_ENV_VARS', + '_FILES' => 'HTTP_POST_FILES') as $array => $other ) +{ + if ( !isset($$array) ) + { + $$array = $$other; + } + unset($$other); +} + + +// Get what step we're up to +$step = get_var('step'); + +if ( !$step || $step == 1 ) +{ + $errors = 0; + make_header('Step 1'); + echo "Welcome to the GeSHi CSS generator.
        Searching for GeSHi...          ";
        +
        +    // Find GeSHi
        +    $geshi_path = get_var('geshi-path');
        +    $geshi_lang_path = get_var('geshi-lang-path');
        +
        +    if(strstr($geshi_path, '..')) {
        +        unset($geshi_path);
        +    }
        +    if(strstr($geshi_lang_path, '..')) {
        +        unset($geshi_lang_path);
        +    }
        +
        +    if ( !$geshi_path )
        +    {
        +        $geshi_path = '../geshi.php';
        +    }
        +    if ( !$geshi_lang_path )
        +    {
        +        $geshi_lang_path = '../geshi/';
        +    }
        +
        +    if ( is_file($geshi_path) && is_readable($geshi_path) )
        +    {
        +        // Get file contents and see if GeSHi is in here
        +        $file = @file($geshi_path);
        +        $contents = '';
        +        foreach ( $file as $line )
        +        {
        +            $contents .= $line;
        +        }
        +        if ( strpos($contents, 'Found at ' . realpath($geshi_path) . '';
        +        }
        +        else
        +        {
        +            ++$errors;
        +            $no_geshi_dot_php_error = true;
        +            echo 'Not found';
        +        }
        +    }
        +    else
        +    {
        +        ++$errors;
        +        $no_geshi_dot_php_error = true;
        +        echo 'Not found';
        +    }
        +
        +    // Find language files
        +    echo "\nSearching for language files... ";
        +    if ( is_readable($geshi_lang_path . 'css-gen.cfg') )
        +    {
        +
        +        echo 'Found at ' . realpath($geshi_lang_path) . '';
        +    }
        +    else
        +    {
        +        ++$errors;
        +        $no_lang_dir_error = true;
        +        echo 'Not found';
        +    }
        +    echo "
        \n"; + + if ( $errors > 0 ) + { + // We're gonna have to ask for the paths... + echo 'Unfortunately CSSGen could not detect the following paths. Please input them and press "submit" to try again.'; + echo " +
        "; + if ( $no_geshi_dot_php_error ) + { + echo " +
        geshi.php: "; + } + else + { + echo ''; + } + if ( $no_lang_dir_error ) + { + echo " +
        language files directory: (should have a trailing slash)"; + } + else + { + echo ''; + } + + echo " +
        "; + } + else + { + // no errors - echo continue form + echo 'Everything seems to be detected successfully. Use the button to continue. +

        + +'; + } + + make_footer(); +} +// Step 2 +elseif ( $step == 2 ) +{ + make_header('Step 2'); + + $geshi_path = get_var('geshi-path'); + $geshi_lang_path = get_var('geshi-lang-path'); + + $dh = opendir($geshi_lang_path); + $lang_files = array(); + $file = readdir($dh); + while ( $file !== false ) + { + if ( $file == '.' || $file == '..' || $file == 'CVS' || $file == 'css-gen.cfg' ) + { + $file = readdir($dh); + continue; + } + if(!strstr(file_get_contents($dh . DIRECTORY_SEPARATOR . $file), '$language_data')) { + $file = readdir($dh); + continue; + } + $lang_files[] = $file; + $file = readdir($dh); + } + closedir($dh); + sort($lang_files); + + // Now installed languages are in $lang_files + + echo ' +What languages are you wanting to make this stylesheet for?

        +Detected languages:
        '; + + foreach ( $lang_files as $lang ) + { + $lang = substr($lang, 0, strpos($lang, '.')); + if ($lang) { + echo " $lang
        \n"; + } + } + + echo "Select: All, None, Invert
        \n"; + + echo 'If you\'d like any other languages not detected here to be supported, please enter +them here, one per line:

        +'; + + echo '
        Styles: + + + + + + + + + + + + + + +
        Style for the overall code block:
        Default Styles
        Keywords I (if, do, while etc)
        Keywords II (null, true, false etc)
        Inbuilt Functions (echo, print etc)
        Data Types (int, boolean etc)
        Comments (//, etc)
        Escaped Characters (\n, \t etc)
        Brackets ( ([{}]) etc)
        Strings ("foo" etc)
        Numbers (1, -54, 2.5 etc)
        Methods (Foo.bar() etc)
        '; + + echo ' +
        '; + + make_footer(); +} +// Step 3 +elseif ( $step == 3 ) +{ + make_header('Step 3'); + echo '

        Here is your completed stylesheet. Note that it may not be perfect - no regular expression styles are included for one thing, +you\'ll have to add those yourself (php and xml are just two languages that use them), and line numbers are not included, however +it includes most of the basic information.

        '; + + // Make the stylesheet + $part_selector_1 = ''; + $part_selector_2 = ''; + $part_selector_3 = ''; + + $langs = get_var('langs'); + $extra_langs = trim(get_var('extra-langs')); + if ( $extra_langs != '' ) + { + $l = explode("\r\n", $extra_langs); + foreach ( $l as $lng ) + { + $langs[$lng] = true; + } + } + + + foreach ( $langs as $lang => $dummy ) + { + $part_selector_1 .= ".$lang {PART}, "; + $part_selector_2 .= ".$lang {PART1}, .$lang {PART2}, "; + $part_selector_3 .= ".$lang {PART1}, .$lang {PART2}, .$lang {PART3}, "; + } + $part_selector_1 = substr($part_selector_1, 0, -2); + $part_selector_2 = substr($part_selector_2, 0, -2); + $part_selector_3 = substr($part_selector_3, 0, -2); + + + $default_styles = get_var('default-styles'); + $ol_selector = str_replace('{PART}', 'ol', $part_selector_1); + $overall_styles = get_var('overall'); + $overall_selector = str_replace('{PART}', '', $part_selector_1); + + $stylesheet = "/* GeSHi (c) Nigel McNie 2004 (http://qbnz.com/highlighter) */"; + + if ( $overall != '' ) + { + $stylesheet .= "\n$overall_selector {{$overall_styles}}"; + } + if ( $default_styles != '' ) + { + $default_selector = str_replace(array('{PART1}', '{PART2}'), array('.de1', '.de2'), $part_selector_2); + $stylesheet .= "\n$default_selector {{$default_styles}}"; + } + + // Do keywords + $keywords_1 = get_var('keywords-1'); + $keyword_selector_1 = str_replace('{PART}', '.kw1', $part_selector_1); + if ( $keywords_1 != '' ) + { + $stylesheet .= "\n$keyword_selector_1 {{$keywords_1}}"; + } + + $keywords_2 = get_var('keywords-2'); + $keyword_selector_2 = str_replace('{PART}', '.kw2', $part_selector_1); + if ( $keywords_2 != '' ) + { + $stylesheet .= "\n$keyword_selector_2 {{$keywords_2}}"; + } + + $keywords_3 = get_var('keywords-3'); + $keyword_selector_3 = str_replace('{PART}', '.kw3', $part_selector_1); + if ( $keywords_3 != '' ) + { + $stylesheet .= "\n$keyword_selector_3 {{$keywords_3}}"; + } + + $keywords_4 = get_var('keywords-4'); + $keyword_selector_4 = str_replace('{PART}', '.kw4', $part_selector_1); + if ( $keywords_4 != '' ) + { + $stylesheet .= "\n$keyword_selector_4 {{$keywords_4}}"; + } + + // Do other lexics + $comments = get_var('comments'); + $comment_selector = str_replace(array('{PART1}', '{PART2}', '{PART3}'), array('.co1', '.co2', '.coMULTI'), $part_selector_3); + if ( $comments != '' ) + { + $stylesheet .= "\n$comment_selector {{$comments}}"; + } + + $esc = get_var('escaped-chars'); + $esc_selector = str_replace('{PART}', '.es0', $part_selector_1); + if ( $esc != '' ) + { + $stylesheet .= "\n$esc_selector {{$esc}}"; + } + + $brackets = get_var('brackets'); + $brk_selector = str_replace('{PART}', '.br0', $part_selector_1); + if ( $brackets != '' ) + { + $stylesheet .= "\n$brk_selector {{$brackets}}"; + } + + $strings = get_var('strings'); + $string_selector = str_replace('{PART}', '.st0', $part_selector_1); + if ( $strings != '' ) + { + $stylesheet .= "\n$string_selector {{$strings}}"; + } + + $numbers = get_var('numbers'); + $num_selector = str_replace('{PART}', '.nu0', $part_selector_1); + if ( $numbers != '' ) + { + $stylesheet .= "\n$num_selector {{$numbers}}"; + } + + $methods = get_var('methods'); + $method_selector = str_replace('{PART}', '.me0', $part_selector_1); + if ( $methods != '' ) + { + $stylesheet .= "\n$method_selector {{$methods}}"; + } + + echo "
        $stylesheet
        "; + + make_footer(); +} + + diff --git a/vendor/easybook/geshi/contrib/cssgen2.php b/vendor/easybook/geshi/contrib/cssgen2.php new file mode 100644 index 0000000000..cc3c39cbfa --- /dev/null +++ b/vendor/easybook/geshi/contrib/cssgen2.php @@ -0,0 +1,59 @@ + geshi.css`. + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * @package geshi + * @subpackage contrib + * @author revulo + * @copyright 2008 revulo + * @license http://gnu.org/copyleft/gpl.html GNU GPL + * + */ + +require dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'geshi.php'; +$geshi = new GeSHi; + +$languages = array(); +if ($handle = opendir($geshi->language_path)) { + while (($file = readdir($handle)) !== false) { + $pos = strpos($file, '.'); + if ($pos > 0 && substr($file, $pos) == '.php') { + $languages[] = substr($file, 0, $pos); + } + } + closedir($handle); +} +sort($languages); + +header('Content-Type: application/octet-stream'); +header('Content-Disposition: attachment; filename="geshi.css"'); + +echo "/**\n". + " * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann\n" . + " * (http://qbnz.com/highlighter/ and http://geshi.org/)\n". + " */\n"; + +foreach ($languages as $language) { + $geshi->set_language($language); + // note: the false argument is required for stylesheet generators, see API documentation + $css = $geshi->get_stylesheet(false); + echo preg_replace('/^\/\*\*.*?\*\//s', '', $css); +} diff --git a/vendor/easybook/geshi/contrib/example.php b/vendor/easybook/geshi/contrib/example.php new file mode 100644 index 0000000000..e07399e3d8 --- /dev/null +++ b/vendor/easybook/geshi/contrib/example.php @@ -0,0 +1,217 @@ + tag inside the list items (
      8. ) thus producing valid HTML markup. + // HEADER_PRE puts the
         tag around the list (
          ) which is invalid in HTML 4 and XHTML 1 + // HEADER_DIV puts a
          tag arount the list (valid!) but needs to replace whitespaces with   + // thus producing much larger overhead. You can set the tab width though. + $geshi->set_header_type(GESHI_HEADER_PRE_VALID); + + // Enable CSS classes. You can use get_stylesheet() to output a stylesheet for your code. Using + // CSS classes results in much less output source. + $geshi->enable_classes(); + + // Enable line numbers. We want fancy line numbers, and we want every 5th line number to be fancy + $geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS, 5); + + // Set the style for the PRE around the code. The line numbers are contained within this box (not + // XHTML compliant btw, but if you are liberally minded about these things then you'll appreciate + // the reduced source output). + $geshi->set_overall_style('font: normal normal 90% monospace; color: #000066; border: 1px solid #d0d0d0; background-color: #f0f0f0;', false); + + // Set the style for line numbers. In order to get style for line numbers working, the
        1. element + // is being styled. This means that the code on the line will also be styled, and most of the time + // you don't want this. So the set_code_style reverts styles for the line (by using a
          on the line). + // So the source output looks like this: + // + //
            + //
          1. + + + GeSHi examples + + + +

            GeSHi Example Script

            +

            To use this script, make sure that geshi.php is in the parent directory or in your +include_path, and that the language files are in a subdirectory of GeSHi's directory called geshi/.

            +

            Enter your source and a language to highlight the source in and submit, or just choose a language to +have that language file highlighted in PHP.

            +parse_code(); + echo '
            '; +} +?> +
            +

            Source to highlight

            +

            + +

            +

            Choose a language

            +

            + +

            +

            + + +

            +
            + + + diff --git a/vendor/easybook/geshi/contrib/langcheck.php b/vendor/easybook/geshi/contrib/langcheck.php new file mode 100644 index 0000000000..fa8288beaa --- /dev/null +++ b/vendor/easybook/geshi/contrib/langcheck.php @@ -0,0 +1,769 @@ +'; + $colors = array( + TYPE_NOTICE => '', + TYPE_WARNING => '', + TYPE_ERROR => '', + TYPE_OK => '' + ); + } else { + $end = chr(27).'[0m'; + $colors = array( + TYPE_NOTICE => chr(27).'[1m', + TYPE_WARNING => chr(27).'[1;33m', + TYPE_ERROR => chr(27).'[1;31m', + TYPE_OK => chr(27).'[1;32m' + ); + } + } + + if ( !isset($colors[$level]) ) { + trigger_error("no colors for level $level", E_USER_ERROR); + } + + return $colors[$level].$string.$end; +} + +define ('TYPE_NOTICE', 0); +define ('TYPE_WARNING', 1); +define ('TYPE_ERROR', 2); +define ('TYPE_OK', 3); + +$error_abort = false; +$error_cache = array(); +function output_error_cache(){ + global $error_cache, $error_abort; + + if(count($error_cache)) { + echo colorize(TYPE_ERROR, "Failed"); + if ( PHP_SAPI == 'cli' ) { + echo "\n\n"; + } else { + echo "
              \n"; + } + foreach($error_cache as $error_msg) { + if ( PHP_SAPI == 'cli' ) { + echo "\n"; + } else { + echo "
            1. "; + } + switch($error_msg['t']) { + case TYPE_NOTICE: + $msg = 'NOTICE'; + break; + case TYPE_WARNING: + $msg = 'WARNING'; + break; + case TYPE_ERROR: + $msg = 'ERROR'; + break; + } + echo colorize($error_msg['t'], $msg); + if ( PHP_SAPI == 'cli' ) { + echo "\t" . $error_msg['m']; + } else { + echo " " . $error_msg['m'] . "
            2. "; + } + } + if ( PHP_SAPI == 'cli' ) { + echo "\n"; + } else { + echo "
            \n"; + } + } else { + echo colorize(TYPE_OK, "OK"); + if ( PHP_SAPI == 'cli' ) { + echo "\n"; + } else { + echo "\n
            "; + } + } + echo "\n"; + + $error_cache = array(); +} + +function report_error($type, $message) { + global $error_cache, $error_abort; + + $error_cache[] = array('t' => $type, 'm' => $message); + if(TYPE_ERROR == $type) { + $error_abort = true; + } +} + +function dupfind_strtolower(&$value){ + $value = strtolower($value); +} + +if ( PHP_SAPI != 'cli' ) { ?> + + + + GeSHi Language File Validation Script + + + +

            GeSHi Language File Validation Script

            +

            To use this script, make sure that geshi.php is in the +parent directory or in your include_path, and that the language files are in a +subdirectory of GeSHi's directory called geshi/.

            +

            Everything else will be done by this script automatically. After the script +finished you should see messages of what could cause trouble with GeSHi or where +your language files can be improved. Please be patient, as this might take some time.

            + +
              +
            1. Checking where to find GeSHi installation ... + + + +To use this script, make sure that is in the +parent directory or in your include_path, and that the language files are in a +subdirectory of GeSHi's directory called . + +Everything else will be done by this script automatically. After the script +finished you should see messages of what could cause trouble with GeSHi or where +your language files can be improved. Please be patient, as this might take some time. + + +Checking where to find GeSHi installation ...\n
            2. Listing available language files ... "; + } + + if (!($dir = @opendir(GESHI_LANG_ROOT))) { + report_error(TYPE_ERROR, 'Error requesting listing for available language files!'); + } + + $languages = array(); + + if(!$error_abort) { + while ($file = readdir($dir)) { + if (!$file || $file[0] == '.' || strpos($file, '.php') === false) { + continue; + } + $lang = substr($file, 0, strpos($file, '.')); + if(4 != strlen($file) - strlen($lang)) { + continue; + } + $languages[] = $lang; + } + closedir($dir); + } + + $languages = array_unique($languages); + sort($languages); + + if(!count($languages)) { + report_error(TYPE_WARNING, 'Unable to locate any usable language files in "'.GESHI_LANG_ROOT.'"!'); + } + + output_error_cache(); +} + +if ( PHP_SAPI == 'cli' ) { + if (isset($_SERVER['argv'][1]) && in_array($_SERVER['argv'][1], $languages)) { + $languages = array($_SERVER['argv'][1]); + } +} else { + if (isset($_REQUEST['show']) && in_array($_REQUEST['show'], $languages)) { + $languages = array($_REQUEST['show']); + } +} + +if(!$error_abort) { + foreach ($languages as $lang) { + + if ( PHP_SAPI == 'cli' ) { + echo "Validating language file for '$lang' ...\t\t"; + } else { + echo "
            3. \n
            4. Validating language file for '$lang' ... "; + } + + $langfile = GESHI_LANG_ROOT . $lang . '.php'; + + $language_data = array(); + + if(!is_file($langfile)) { + report_error(TYPE_ERROR, 'The path "' .$langfile. '" does not ressemble a regular file!'); + } elseif(!is_readable($langfile)) { + report_error(TYPE_ERROR, 'Cannot read file "' .$langfile. '"!'); + } else { + $langfile_content = file_get_contents($langfile); + if(preg_match("/\?>(?:\r?\n|\r(?!\n)){2,}\Z/", $langfile_content)) { + report_error(TYPE_ERROR, 'Language file contains trailing empty lines at EOF!'); + } + if(!preg_match("/\?>(?:\r?\n|\r(?!\n))?\Z/", $langfile_content)) { + report_error(TYPE_ERROR, 'Language file contains no PHP end marker at EOF!'); + } + if(preg_match("/\t/", $langfile_content)) { + report_error(TYPE_NOTICE, 'Language file contains unescaped tabulator chars (probably for indentation)!'); + } + if(preg_match('/^(?: )*(?! )(?! \*) /m', $langfile_content)) { + report_error(TYPE_NOTICE, 'Language file contains irregular indentation (other than 4 spaces per indentation level)!'); + } + + if(!preg_match("/\/\*\*((?!\*\/).)*?Author:((?!\*\/).)*?\*\//s", $langfile_content)) { + report_error(TYPE_WARNING, 'Language file does not contain a specification of an author!'); + } + if(!preg_match("/\/\*\*((?!\*\/).)*?Copyright:((?!\*\/).)*?\*\//s", $langfile_content)) { + report_error(TYPE_WARNING, 'Language file does not contain a specification of the copyright!'); + } + if(!preg_match("/\/\*\*((?!\*\/).)*?Release Version:((?!\*\/).)*?\*\//s", $langfile_content)) { + report_error(TYPE_WARNING, 'Language file does not contain a specification of the release version!'); + } + if(!preg_match("/\/\*\*((?!\*\/).)*?Date Started:((?!\*\/).)*?\*\//s", $langfile_content)) { + report_error(TYPE_WARNING, 'Language file does not contain a specification of the date it was started!'); + } + if(!preg_match("/\/\*\*((?!\*\/).)*?This file is part of GeSHi\.((?!\*\/).)*?\*\//s", $langfile_content)) { + report_error(TYPE_WARNING, 'Language file does not state that it belongs to GeSHi!'); + } + if(!preg_match("/\/\*\*((?!\*\/).)*?language file for GeSHi\.((?!\*\/).)*?\*\//s", $langfile_content)) { + report_error(TYPE_WARNING, 'Language file does not state that it is a language file for GeSHi!'); + } + if(!preg_match("/\/\*\*((?!\*\/).)*?GNU General Public License((?!\*\/).)*?\*\//s", $langfile_content)) { + report_error(TYPE_WARNING, 'Language file does not state that it is provided under the terms of the GNU GPL!'); + } + + unset($langfile_content); + + include $langfile; + + if(!isset($language_data)) { + report_error(TYPE_ERROR, 'Language file does not contain a $language_data structure to check!'); + } elseif (!is_array($language_data)) { + report_error(TYPE_ERROR, 'Language file contains a $language_data structure which is not an array!'); + } + } + + if(!$error_abort) { + if(!isset($language_data['LANG_NAME'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'LANG_NAME\'] specification!'); + } elseif (!is_string($language_data['LANG_NAME'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'LANG_NAME\'] specification which is not a string!'); + } + + if(!isset($language_data['COMMENT_SINGLE'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'COMMENT_SIGNLE\'] structure to check!'); + } elseif (!is_array($language_data['COMMENT_SINGLE'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'COMMENT_SINGLE\'] structure which is not an array!'); + } + + if(!isset($language_data['COMMENT_MULTI'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'COMMENT_MULTI\'] structure to check!'); + } elseif (!is_array($language_data['COMMENT_MULTI'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'COMMENT_MULTI\'] structure which is not an array!'); + } + + if(isset($language_data['COMMENT_REGEXP'])) { + if (!is_array($language_data['COMMENT_REGEXP'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'COMMENT_REGEXP\'] structure which is not an array!'); + } + } + + if(!isset($language_data['QUOTEMARKS'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'QUOTEMARKS\'] structure to check!'); + } elseif (!is_array($language_data['QUOTEMARKS'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'QUOTEMARKS\'] structure which is not an array!'); + } + + if(isset($language_data['HARDQUOTE'])) { + if (!is_array($language_data['HARDQUOTE'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'HARDQUOTE\'] structure which is not an array!'); + } + } + + if(!isset($language_data['ESCAPE_CHAR'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'ESCAPE_CHAR\'] specification to check!'); + } elseif (!is_string($language_data['ESCAPE_CHAR'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'ESCAPE_CHAR\'] specification which is not a string!'); + } elseif (1 < strlen($language_data['ESCAPE_CHAR'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'ESCAPE_CHAR\'] specification is not empty or exactly one char!'); + } + + if(!isset($language_data['CASE_KEYWORDS'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'CASE_KEYWORDS\'] specification!'); + } elseif (!is_int($language_data['CASE_KEYWORDS'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'CASE_KEYWORDS\'] specification which is not an integer!'); + } elseif (GESHI_CAPS_NO_CHANGE != $language_data['CASE_KEYWORDS'] && + GESHI_CAPS_LOWER != $language_data['CASE_KEYWORDS'] && + GESHI_CAPS_UPPER != $language_data['CASE_KEYWORDS']) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'CASE_KEYWORDS\'] specification which is neither of GESHI_CAPS_NO_CHANGE, GESHI_CAPS_LOWER nor GESHI_CAPS_UPPER!'); + } + + if(!isset($language_data['KEYWORDS'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'KEYWORDS\'] structure to check!'); + } elseif (!is_array($language_data['KEYWORDS'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'KEYWORDS\'] structure which is not an array!'); + } else { + foreach($language_data['KEYWORDS'] as $kw_key => $kw_value) { + if(!is_integer($kw_key)) { + report_error(TYPE_WARNING, "Language file contains an key '$kw_key' in \$language_data['KEYWORDS'] that is not integer!"); + } elseif (!is_array($kw_value)) { + report_error(TYPE_ERROR, "Language file contains a \$language_data['KEYWORDS']['$kw_value'] structure which is not an array!"); + } + } + } + + if(!isset($language_data['SYMBOLS'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'SYMBOLS\'] structure to check!'); + } elseif (!is_array($language_data['SYMBOLS'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'SYMBOLS\'] structure which is not an array!'); + } + + if(!isset($language_data['CASE_SENSITIVE'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'CASE_SENSITIVE\'] structure to check!'); + } elseif (!is_array($language_data['CASE_SENSITIVE'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'CASE_SENSITIVE\'] structure which is not an array!'); + } else { + foreach($language_data['CASE_SENSITIVE'] as $cs_key => $cs_value) { + if(!is_integer($cs_key)) { + report_error(TYPE_WARNING, "Language file contains an key '$cs_key' in \$language_data['CASE_SENSITIVE'] that is not integer!"); + } elseif (!is_bool($cs_value)) { + report_error(TYPE_ERROR, "Language file contains a Case Sensitivity specification for \$language_data['CASE_SENSITIVE']['$cs_value'] which is not a boolean!"); + } + } + } + + if(!isset($language_data['URLS'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'URLS\'] structure to check!'); + } elseif (!is_array($language_data['URLS'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'URLS\'] structure which is not an array!'); + } else { + foreach($language_data['URLS'] as $url_key => $url_value) { + if(!is_integer($url_key)) { + report_error(TYPE_WARNING, "Language file contains an key '$url_key' in \$language_data['URLS'] that is not integer!"); + } elseif (!is_string($url_value)) { + report_error(TYPE_ERROR, "Language file contains a Documentation URL specification for \$language_data['URLS']['$url_value'] which is not a string!"); + } elseif (preg_match('#&([^;]*(=|$))#U', $url_value)) { + report_error(TYPE_ERROR, "Language file contains unescaped ampersands (&) in \$language_data['URLS']!"); + } + } + } + + if(!isset($language_data['OOLANG'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'OOLANG\'] specification!'); + } elseif (!is_int($language_data['OOLANG']) && !is_bool($language_data['OOLANG'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'OOLANG\'] specification which is neither boolean nor integer!'); + } elseif (false !== $language_data['OOLANG'] && + true !== $language_data['OOLANG'] && + 2 !== $language_data['OOLANG']) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'OOLANG\'] specification which is neither of false, true or 2!'); + } + + if(!isset($language_data['OBJECT_SPLITTERS'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'OBJECT_SPLITTERS\'] structure to check!'); + } elseif (!is_array($language_data['OBJECT_SPLITTERS'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'OBJECT_SPLITTERS\'] structure which is not an array!'); + } + + if(!isset($language_data['REGEXPS'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'REGEXPS\'] structure to check!'); + } elseif (!is_array($language_data['REGEXPS'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'REGEXPS\'] structure which is not an array!'); + } + + if(!isset($language_data['STRICT_MODE_APPLIES'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'STRICT_MODE_APPLIES\'] specification!'); + } elseif (!is_int($language_data['STRICT_MODE_APPLIES'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'STRICT_MODE_APPLIES\'] specification which is not an integer!'); + } elseif (GESHI_MAYBE != $language_data['STRICT_MODE_APPLIES'] && + GESHI_ALWAYS != $language_data['STRICT_MODE_APPLIES'] && + GESHI_NEVER != $language_data['STRICT_MODE_APPLIES']) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'STRICT_MODE_APPLIES\'] specification which is neither of GESHI_MAYBE, GESHI_ALWAYS nor GESHI_NEVER!'); + } + + if(!isset($language_data['SCRIPT_DELIMITERS'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'SCRIPT_DELIMITERS\'] structure to check!'); + } elseif (!is_array($language_data['SCRIPT_DELIMITERS'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'SCRIPT_DELIMITERS\'] structure which is not an array!'); + } + + if(!isset($language_data['HIGHLIGHT_STRICT_BLOCK'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'HIGHLIGHT_STRICT_BLOCK\'] structure to check!'); + } elseif (!is_array($language_data['HIGHLIGHT_STRICT_BLOCK'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'HIGHLIGHT_STRICT_BLOCK\'] structure which is not an array!'); + } + + if(isset($language_data['TAB_WIDTH'])) { + if (!is_int($language_data['TAB_WIDTH'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'TAB_WIDTH\'] specification which is not an integer!'); + } elseif (1 > $language_data['TAB_WIDTH']) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'TAB_WIDTH\'] specification which is less than 1!'); + } + } + + if(isset($language_data['PARSER_CONTROL'])) { + if (!is_array($language_data['PARSER_CONTROL'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'PARSER_CONTROL\'] structure which is not an array!'); + } + } + + if(!isset($language_data['STYLES'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'STYLES\'] structure to check!'); + } elseif (!is_array($language_data['STYLES'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'STYLES\'] structure which is not an array!'); + } else { + $style_arrays = array('KEYWORDS', 'COMMENTS', 'ESCAPE_CHAR', + 'BRACKETS', 'STRINGS', 'NUMBERS', 'METHODS', 'SYMBOLS', + 'REGEXPS', 'SCRIPT'); + foreach($style_arrays as $style_kind) { + if(!isset($language_data['STYLES'][$style_kind])) { + report_error(TYPE_ERROR, "Language file contains no \$language_data['STYLES']['$style_kind'] structure to check!"); + } elseif (!is_array($language_data['STYLES'][$style_kind])) { + report_error(TYPE_ERROR, "Language file contains a \$language_data['STYLES\']['$style_kind'] structure which is not an array!"); + } else { + foreach($language_data['STYLES'][$style_kind] as $sk_key => $sk_value) { + if(!is_int($sk_key) && ('COMMENTS' != $style_kind && 'MULTI' != $sk_key) + && !(('STRINGS' == $style_kind || 'ESCAPE_CHAR' == $style_kind) && 'HARD' == $sk_key)) { + report_error(TYPE_WARNING, "Language file contains an key '$sk_key' in \$language_data['STYLES']['$style_kind'] that is not integer!"); + } elseif (!is_string($sk_value)) { + report_error(TYPE_WARNING, "Language file contains a CSS specification for \$language_data['STYLES']['$style_kind'][$key] which is not a string!"); + } + } + } + } + + unset($style_arrays); + } + } + + if(!$error_abort) { + //Initial sanity checks survived? --> Let's dig deeper! + foreach($language_data['KEYWORDS'] as $key => $keywords) { + if(!isset($language_data['CASE_SENSITIVE'][$key])) { + report_error(TYPE_ERROR, "Language file contains no \$language_data['CASE_SENSITIVE'] specification for keyword group $key!"); + } + if(!isset($language_data['URLS'][$key])) { + report_error(TYPE_ERROR, "Language file contains no \$language_data['URLS'] specification for keyword group $key!"); + } + if(empty($keywords)) { + report_error(TYPE_WARNING, "Language file contains an empty keyword list in \$language_data['KEYWORDS'] for group $key!"); + } + foreach($keywords as $id => $kw) { + if(!is_string($kw)) { + report_error(TYPE_WARNING, "Language file contains an non-string entry at \$language_data['KEYWORDS'][$key][$id]!"); + } elseif (!strlen($kw)) { + report_error(TYPE_ERROR, "Language file contains an empty string entry at \$language_data['KEYWORDS'][$key][$id]!"); + } elseif (preg_match('/^([\(\)\{\}\[\]\^=.,:;\-+\*\/%\$\"\'\?]|&[\w#]\w*;)+$/i', $kw)) { + report_error(TYPE_NOTICE, "Language file contains an keyword ('$kw') at \$language_data['KEYWORDS'][$key][$id] which seems to be better suited for the symbols section!"); + } + } + if(isset($language_data['CASE_SENSITIVE'][$key]) && !$language_data['CASE_SENSITIVE'][$key]) { + array_walk($keywords, 'dupfind_strtolower'); + } + if(count($keywords) != count(array_unique($keywords))) { + $kw_diffs = array_count_values($keywords); + foreach($kw_diffs as $kw => $kw_count) { + if($kw_count > 1) { + report_error(TYPE_WARNING, "Language file contains per-group duplicate keyword '$kw' in \$language_data['KEYWORDS'][$key]!"); + } + } + } + } + + $disallowed_before = "(?|^&"; + $disallowed_after = "(?![a-zA-Z0-9_\|%\\-&;"; + + foreach($language_data['KEYWORDS'] as $key => $keywords) { + foreach($language_data['KEYWORDS'] as $key2 => $keywords2) { + if($key2 <= $key) { + continue; + } + $kw_diffs = array_intersect($keywords, $keywords2); + foreach($kw_diffs as $kw) { + if(isset($language_data['PARSER_CONTROL']['KEYWORDS'])) { + //Check the precondition\post-cindition for the involved keyword groups + $g1_pre = $disallowed_before; + $g2_pre = $disallowed_before; + $g1_post = $disallowed_after; + $g2_post = $disallowed_after; + if(isset($language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_BEFORE'])) { + $g1_pre = $language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_BEFORE']; + $g2_pre = $language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_BEFORE']; + } + if(isset($language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_AFTER'])) { + $g1_post = $language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_AFTER']; + $g2_post = $language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_AFTER']; + } + + if(isset($language_data['PARSER_CONTROL']['KEYWORDS'][$key]['DISALLOWED_BEFORE'])) { + $g1_pre = $language_data['PARSER_CONTROL']['KEYWORDS'][$key]['DISALLOWED_BEFORE']; + } + if(isset($language_data['PARSER_CONTROL']['KEYWORDS'][$key]['DISALLOWED_AFTER'])) { + $g1_post = $language_data['PARSER_CONTROL']['KEYWORDS'][$key]['DISALLOWED_AFTER']; + } + + if(isset($language_data['PARSER_CONTROL']['KEYWORDS'][$key2]['DISALLOWED_BEFORE'])) { + $g2_pre = $language_data['PARSER_CONTROL']['KEYWORDS'][$key2]['DISALLOWED_BEFORE']; + } + if(isset($language_data['PARSER_CONTROL']['KEYWORDS'][$key2]['DISALLOWED_AFTER'])) { + $g2_post = $language_data['PARSER_CONTROL']['KEYWORDS'][$key2]['DISALLOWED_AFTER']; + } + + if($g1_pre != $g2_pre || $g1_post != $g2_post) { + continue; + } + } + report_error(TYPE_WARNING, "Language file contains cross-group duplicate keyword '$kw' in \$language_data['KEYWORDS'][$key] and \$language_data['KEYWORDS'][$key2]!"); + } + } + } + foreach($language_data['CASE_SENSITIVE'] as $key => $keywords) { + if(!isset($language_data['KEYWORDS'][$key]) && $key != GESHI_COMMENTS) { + report_error(TYPE_WARNING, "Language file contains an superfluous \$language_data['CASE_SENSITIVE'] specification for non-existing keyword group $key!"); + } + } + foreach($language_data['URLS'] as $key => $keywords) { + if(!isset($language_data['KEYWORDS'][$key])) { + report_error(TYPE_WARNING, "Language file contains an superfluous \$language_data['URLS'] specification for non-existing keyword group $key!"); + } + } + foreach($language_data['STYLES']['KEYWORDS'] as $key => $keywords) { + if(!isset($language_data['KEYWORDS'][$key])) { + report_error(TYPE_WARNING, "Language file contains an superfluous \$language_data['STYLES']['KEYWORDS'] specification for non-existing keyword group $key!"); + } + } + + foreach($language_data['COMMENT_SINGLE'] as $ck => $cv) { + if(!is_int($ck)) { + report_error(TYPE_WARNING, "Language file contains an key '$ck' in \$language_data['COMMENT_SINGLE'] that is not integer!"); + } + if(!is_string($cv)) { + report_error(TYPE_WARNING, "Language file contains an non-string entry at \$language_data['COMMENT_SINGLE'][$ck]!"); + } + if(!isset($language_data['STYLES']['COMMENTS'][$ck])) { + report_error(TYPE_WARNING, "Language file contains no \$language_data['STYLES']['COMMENTS'] specification for comment group $ck!"); + } + } + if(isset($language_data['COMMENT_REGEXP'])) { + foreach($language_data['COMMENT_REGEXP'] as $ck => $cv) { + if(!is_int($ck)) { + report_error(TYPE_WARNING, "Language file contains an key '$ck' in \$language_data['COMMENT_REGEXP'] that is not integer!"); + } + if(!is_string($cv)) { + report_error(TYPE_WARNING, "Language file contains an non-string entry at \$language_data['COMMENT_REGEXP'][$ck]!"); + } + if(!isset($language_data['STYLES']['COMMENTS'][$ck])) { + report_error(TYPE_WARNING, "Language file contains no \$language_data['STYLES']['COMMENTS'] specification for comment group $ck!"); + } + } + } + foreach($language_data['STYLES']['COMMENTS'] as $ck => $cv) { + if($ck != 'MULTI' && !isset($language_data['COMMENT_SINGLE'][$ck]) && + !isset($language_data['COMMENT_REGEXP'][$ck])) { + report_error(TYPE_NOTICE, "Language file contains an superfluous \$language_data['STYLES']['COMMENTS'] specification for Single Line or Regular-Expression Comment key $ck!"); + } + } + if (isset($language_data['STYLES']['STRINGS']['HARD'])) { + if (empty($language_data['HARDQUOTE'])) { + report_error(TYPE_NOTICE, "Language file contains superfluous \$language_data['STYLES']['STRINGS'] specification for key 'HARD', but no 'HARDQUOTE's are defined!"); + } + unset($language_data['STYLES']['STRINGS']['HARD']); + } + foreach($language_data['STYLES']['STRINGS'] as $sk => $sv) { + if($sk && !isset($language_data['QUOTEMARKS'][$sk])) { + report_error(TYPE_NOTICE, "Language file contains an superfluous \$language_data['STYLES']['STRINGS'] specification for non-existing quotemark key $sk!"); + } + } + + foreach($language_data['REGEXPS'] as $rk => $rv) { + if(!is_int($rk)) { + report_error(TYPE_WARNING, "Language file contains an key '$rk' in \$language_data['REGEXPS'] that is not integer!"); + } + if(is_string($rv)) { + //Check for unmasked / in regular expressions ... + if(empty($rv)) { + report_error(TYPE_WARNING, "Language file contains an empty regular expression at \$language_data['REGEXPS'][$rk]!"); + } else { + if(preg_match("/(?)/s", $rv)) { + report_error(TYPE_WARNING, "Language file contains a regular expression with an unescaped match for a pipe character '|' which needs escaping as '<PIPE>' instead at \$language_data['REGEXPS'][$rk]!"); + } + } + } elseif(is_array($rv)) { + if(!isset($rv[GESHI_SEARCH])) { + report_error(TYPE_ERROR, "Language file contains no GESHI_SEARCH entry in extended regular expression at \$language_data['REGEXPS'][$rk]!"); + } elseif(!is_string($rv[GESHI_SEARCH])) { + report_error(TYPE_ERROR, "Language file contains a GESHI_SEARCH entry in extended regular expression at \$language_data['REGEXPS'][$rk] which is not a string!"); + } else { + if(preg_match("/(?)/s", $rv[GESHI_SEARCH])) { + report_error(TYPE_WARNING, "Language file contains a regular expression with an unescaped match for a pipe character '|' which needs escaping as '<PIPE>' instead at \$language_data['REGEXPS'][$rk]!"); + } + } + if(!isset($rv[GESHI_REPLACE])) { + report_error(TYPE_WARNING, "Language file contains no GESHI_REPLACE entry in extended regular expression at \$language_data['REGEXPS'][$rk]!"); + } elseif(!is_string($rv[GESHI_REPLACE])) { + report_error(TYPE_ERROR, "Language file contains a GESHI_REPLACE entry in extended regular expression at \$language_data['REGEXPS'][$rk] which is not a string!"); + } + if(!isset($rv[GESHI_MODIFIERS])) { + report_error(TYPE_WARNING, "Language file contains no GESHI_MODIFIERS entry in extended regular expression at \$language_data['REGEXPS'][$rk]!"); + } elseif(!is_string($rv[GESHI_MODIFIERS])) { + report_error(TYPE_ERROR, "Language file contains a GESHI_MODIFIERS entry in extended regular expression at \$language_data['REGEXPS'][$rk] which is not a string!"); + } + if(!isset($rv[GESHI_BEFORE])) { + report_error(TYPE_WARNING, "Language file contains no GESHI_BEFORE entry in extended regular expression at \$language_data['REGEXPS'][$rk]!"); + } elseif(!is_string($rv[GESHI_BEFORE])) { + report_error(TYPE_ERROR, "Language file contains a GESHI_BEFORE entry in extended regular expression at \$language_data['REGEXPS'][$rk] which is not a string!"); + } + if(!isset($rv[GESHI_AFTER])) { + report_error(TYPE_WARNING, "Language file contains no GESHI_AFTER entry in extended regular expression at \$language_data['REGEXPS'][$rk]!"); + } elseif(!is_string($rv[GESHI_AFTER])) { + report_error(TYPE_ERROR, "Language file contains a GESHI_AFTER entry in extended regular expression at \$language_data['REGEXPS'][$rk] which is not a string!"); + } + } else { + report_error(TYPE_WARNING, "Language file contains an non-string and non-array entry at \$language_data['REGEXPS'][$rk]!"); + } + if(!isset($language_data['STYLES']['REGEXPS'][$rk])) { + report_error(TYPE_WARNING, "Language file contains no \$language_data['STYLES']['REGEXPS'] specification for regexp group $rk!"); + } + } + foreach($language_data['STYLES']['REGEXPS'] as $rk => $rv) { + if(!isset($language_data['REGEXPS'][$rk])) { + report_error(TYPE_NOTICE, "Language file contains an superfluous \$language_data['STYLES']['REGEXPS'] specification for regexp key $rk!"); + } + } + + + } + + output_error_cache(); + + flush(); + + if($error_abort) { + break; + } + } +} + +$time_end = explode(' ', microtime()); +$time_diff = $time_end[0] + $time_end[1] - $time_start[0] - $time_start[1]; + +if ( PHP_SAPI != 'cli' ) { +?>
            5. +
            + +

            Validation process completed in seconds.

            + + + + + + + +Validation process completed in seconds. + +GeSHi © 2004-2007 Nigel McNie, 2007-2012 Benny Baumann, released under the GNU GPL + + \ No newline at end of file diff --git a/vendor/easybook/geshi/contrib/langwiz.php b/vendor/easybook/geshi/contrib/langwiz.php new file mode 100644 index 0000000000..32d025a95a --- /dev/null +++ b/vendor/easybook/geshi/contrib/langwiz.php @@ -0,0 +1,1158 @@ +Failed

            "; + echo "
              \n"; + foreach($error_cache as $error_msg) { + echo "
            1. "; + switch($error_msg['t']) { + case TYPE_NOTICE: + echo "NOTICE:"; + break; + case TYPE_WARNING: + echo "WARNING:"; + break; + case TYPE_ERROR: + echo "ERROR:"; + break; + } + echo " " . $error_msg['m'] . "
            2. "; + } + echo "
            \n"; + } else { + echo "OK
            "; + } + echo "\n"; + + $error_cache = array(); +} + +function report_error($type, $message) { + global $error_cache, $error_abort; + + $error_cache[] = array('t' => $type, 'm' => $message); + if(TYPE_ERROR == $type) { + $error_abort = true; + } +} + +?> + + + + GeSHi Language File Generator Script + + + +

            GeSHi Language File Generator Script

            +

            To use this script, make sure that geshi.php is in the +parent directory or in your include_path, and that the language files are in a +subdirectory of GeSHi's directory called geshi/.

            +

            If not already done, select a language file below that will be used as +base for the language file to generate or create a blank one. Following this +you can do whatever you like to edit your language file. But note that not all +features are made available through this script.

            + +

            Checking GeSHi installation ... 'example', + 'name' => 'Example' + ); + +$ai = array( + 'name' => 'Benny Baumann', + 'email' => 'BenBE@geshi.org', + 'web' => 'http://qbnz.com/highlighter/' + ); + +$ld = array( + 'cmt' => array( + 'sl' => array( + 1 => array( + 'start' => '//', + 'style' => 'font-style: italic; color: #666666;' + ), + 2 => array( + 'start' => '#', + 'style' => 'font-style: italic; color: #666666;' + ) + ), + 'ml' => array( + 1 => array( + 'start' => '/*', + 'end' => '*/', + 'style' => 'font-style: italic; color: #666666;' + ), + 2 => array( + 'start' => '/**', + 'end' => '*/', + 'style' => 'font-style: italic; color: #006600;' + ) + ), + 'rxc' => array( + 1 => array( + 'rx' => '/Hello RegExp/', + 'style' => 'font-style: italic; color: #666666;' + ) + ) + ), + 'str' => array( + 'qm' => array( + 1 => array( + 'delim' => "'", + 'style' => 'color: #0000FF;' + ), + 2 => array( + 'delim' => """, + 'style' => 'color: #0000FF;' + ) + ), + 'ec' => array( + 'char' => '\\', + 'style' => 'font-weight: bold; color: #000080;' + ), + 'erx' => array( + 1 => array( + 'rx' => '/\{\\\\$\w+\}/', + 'style' => 'font-weight: bold; color: #008080;' + ), + 2 => array( + 'rx'=> '/\{\\\\$\w+\}/', + 'style' => 'font-weight: bold; color: #008080;' + ) + ) + ), + 'kw_case' => 'GESHI_CAPS_NO_CHANGE', + 'kw' => array( + 1 => array( + 'list' => '', + 'case' => '0', + 'style' => 'color: #0000FF; font-weight: bold;', + 'docs' => '' + ) + ), + 'sy' => array( + 0 => array( + 'list' => '', + 'style' => 'color: #0000FF; font-weight: bold;' + ) + ) + ); + +$kw_case_sel = array( + 'GESHI_CAPS_NO_CHANGE' => '', + 'GESHI_CAPS_UPPER' => '', + 'GESHI_CAPS_LOWER' => '' + ); + +$kw_cases_sel = array( + 1 => array( + 0 => '', + 1 => '' + ) + ); +// --- empty variables for values of $_POST - end --- + +echo "

            ";
            +//var_dump($languages);
            +
            +foreach($post_var_names as $varName) { // export wanted variables of $_POST array...
            +    if(array_key_exists($varName, $_POST)) {
            +      $$varName = htmlspecialchars_deep($_POST[$varName]);
            +    }
            +}
            +
            +// determine the selected kw_case...
            +$kw_case_sel[$ld['kw_case']] = ' selected="selected"';
            +
            +// determine the selected kw_cases...
            +for($i = 1; $i <= count($kw_cases_sel); $i += 1) {
            +    $kw_cases_sel[$i][(int) $ld['kw'][$i]['case']] = ' selected="selected"';
            +}
            +
            +$lang = validate_lang();
            +var_dump($lang);
            +echo "
            "; + +?> + +
            +
            + Generic Information + + + + + + + + + + + + +
            + + + +
            + + + +
            +
            + +
            + Author + + + + + + + + + + + + + + + + +
            + + + +
            + + + +
            + + + +
            +
            + +
            + Comments + +
            + Single Line + +
            + Comment Group 1 + + + + + + + + + + + +
            + + + +
            + + + +
            +
            + +
            + Comment Group 2 + + + + + + + + + + + +
            + + + +
            + + + +
            +
            +
            + +
            + Multiple Lines + +
            + Comment Group 1 + + + + + + + + + + + + + + + + +
            + + + +
            + + + +
            + + + +
            +
            + +
            + Comment Group 2 + + + + + + + + + + + + + + + + +
            + + + +
            + + + +
            + + + +
            +
            +
            + +
            + Regular Expressions + +
            + Comment Group 1 + + + + + + + + + + + +
            + + + +
            + + + +
            +
            +
            +
            + +
            + Strings + +
            + String \ Quotes (delimiters, parsed) + +
            + Quotemark Group 1 + + + + + + + + + + + +
            + + + +
            + + + +
            +
            +
            + Quotemark Group 2 + + + + + + + + + + + +
            + + + +
            + + + +
            +
            + + +
            + +
            + Escape Sequences + +
            + Generic Escape Char + + + + + + + + + + + +
            + + + +
            + + + +
            +
            + +
            + Escape Regexp Group 1 + + + + + + + + + + + +
            + + + +
            + + + +
            +
            + +
            + Escape Regexp Group 2 + + + + + + + + + + + +
            + + + +
            + + + +
            +
            +
            +
            + +
            + Keywords + +
            + Case of Keywords + + + + + + +
            + + + +
            +
            + +
            + Keyword Group 1 + + + + + + + + + + + + + + + + + + + + + +
            + + + +
            + + + +
            + + + +
            + + + +
            +
            + +
            + + +
            + Symbols + +
            + Symbols Group 1 + + + + + + + + + + + +
            + + + +
            + + + +
            +
            + +
            + + +
            +
            + Language File Source +set_source($langfile_source); +echo $G->parse_code(); +unset($G); +?> +
            +
            + + +
            + +

            Operation completed in seconds.

            + + + + + "\\\"", + "\\" => "\\\\", + "\0" => "\\0", + "\n" => "\\n", + "\r" => "\\r", + "\t" => "\\t", + "\$" => "\\\$" + ) + ) . '"'; + } else { + return "'" . strtr($str, + array( + "'" => "\\'", + "\\" => "\\\\" + ) + ) . "'"; + } +} + +function validate_lang(){ + $ai = array( + 'name' => 'Benny Baumann', + 'email' => 'BenBE@geshi.org', + 'web' => 'http://qbnz.com/highlighter/' + ); + + $li = array( + 'file' => 'example', + 'desc' => 'Example' + ); + + if(isset($_POST['ld'])) { + $ld = $_POST['ld']; + } else { + $ld = array( + 'cmt' => array( + 'sl' => array( + 1 => array( + 'start' => '//', + 'style' => 'test' + ) + ), + 'ml' => array( + 1 => array( + 'start' => '/*', + 'end' => '*/', + 'style' => 'font-style: italic; color: #666666;' + ) + ), + 'rxc' => array( + 1 => array( + 'rx' => '/Hello/', + 'style' => 'color: #00000' + ) + ) + ), + 'str' => array( + 'qm' => array(), + 'ec' => array( + 'char' => '' + ), + 'erx' => array() + ), + 'kw' => array(), + 'kw_case' => 'GESHI_CAPS_NO_CHANGE', + 'sy' => array() + ); + } + + return array('ai' => $ai, 'li' => $li, 'ld' => $ld); +} + +function gen_langfile($lang){ + $langfile = $lang['li']['file']; + $langdesc = $lang['li']['desc']; + + $langauthor_name = $lang['ai']['name']; + $langauthor_email = $lang['ai']['email']; + $langauthor_web = $lang['ai']['web']; + + $langversion = GESHI_VERSION; + + $langdate = date('Y/m/d'); + $langyear = date('Y'); + + $i = ' '; + $i = array('', $i, $i.$i, $i.$i.$i); + + $src = << ".str_to_phpstring($langdesc).",\n"; + + //Comments + $src .= $i[1] . "'COMMENT_SINGLE' => array(\n"; + foreach($lang['ld']['cmt']['sl'] as $idx_cmt_sl => $tmp_cmt_sl) { + $src .= $i[2] . ((int)$idx_cmt_sl). " => ". str_to_phpstring($tmp_cmt_sl['start']) . ",\n"; + } + $src .= $i[2] . "),\n"; + $src .= $i[1] . "'COMMENT_MULTI' => array(\n"; + foreach($lang['ld']['cmt']['ml'] as $tmp_cmt_ml) { + $src .= $i[2] . str_to_phpstring($tmp_cmt_ml['start']). " => ". str_to_phpstring($tmp_cmt_ml['end']) . ",\n"; + } + $src .= $i[2] . "),\n"; + $src .= $i[1] . "'COMMENT_REGEXP' => array(\n"; + foreach($lang['ld']['cmt']['rxc'] as $idx_cmt_rxc => $tmp_cmt_rxc) { + $src .= $i[2] . ((int)$idx_cmt_rxc). " => ". str_to_phpstring($tmp_cmt_rxc['rx']) . ",\n"; + } + $src .= $i[2] . "),\n"; + + //Case Keywords + $src .= $i[1] . "'CASE_KEYWORDS' => " . $lang['ld']['kw_case'] . ",\n"; + + //Quotes \ Strings + $src .= $i[1] . "'QUOTEMARKS' => array(\n"; + foreach($lang['ld']['str']['qm'] as $idx_str_qm => $tmp_str_qm) { + $src .= $i[2] . ((int)$idx_str_qm). " => ". str_to_phpstring($tmp_str_qm['delim']) . ",\n"; + } + $src .= $i[2] . "),\n"; + $src .= $i[1] . "'ESCAPE_CHAR' => " . str_to_phpstring($lang['ld']['str']['ec']['char']) . ",\n"; + $src .= $i[1] . "'ESCAPE_REGEXP' => array(\n"; + foreach($lang['ld']['str']['erx'] as $idx_str_erx => $tmp_str_erx) { + $src .= $i[2] . ((int)$idx_str_erx). " => ". str_to_phpstring($tmp_str_erx['rx']) . ",\n"; + } + $src .= $i[2] . "),\n"; + + //HardQuotes + $src .= $i[1] . "'HARDQUOTE' => array(\n"; + $src .= $i[2] . "),\n"; + $src .= $i[1] . "'HARDESCAPE' => array(\n"; + $src .= $i[2] . "),\n"; + $src .= $i[1] . "'HARDCHAR' => '',\n"; + + //Numbers + $src .= $i[1] . "'NUMBERS' =>\n"; + $src .= $i[2] . "GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX |\n"; + $src .= $i[2] . "GESHI_NUMBER_FLT_SCI_ZERO,\n"; + + //Keywords + $src .= $i[1] . "'KEYWRODS' => array(\n"; + foreach($lang['ld']['kw'] as $idx_kw => $tmp_kw) { + $src .= $i[2] . ((int)$idx_kw) . " => array(\n"; + if(!is_array($tmp_kw['list'])) { + $tmp_kw['list'] = explode("\n", $tmp_kw['list']); + } + $tmp_kw['list'] = array_map('trim', $tmp_kw['list']); + sort($tmp_kw['list']); + $kw_esc = array_map('str_to_phpstring', $tmp_kw['list']); + $kw_nl = true; + $kw_pos = 0; + foreach($kw_esc as $kw_data) { + if((strlen($kw_data) + $kw_pos > 79) && $kw_pos > strlen($i[3])) { + $src .= "\n"; + $kw_nl = true; + $kw_pos = 0; + } + if($kw_nl) { + $src .= $i[3]; + $kw_pos += strlen($i[3]); + $kw_nl = false; + } + $src .= $kw_data . ', '; + $kw_pos += strlen($kw_data) + 2; + } + $src .= "\n"; + $src .= $i[3] . "),\n"; + } + $src .= $i[2] . "),\n"; + + //Case Sensitivity + $src .= $i[1] . "'CASE_SENSITIVE' => array(\n"; + foreach($lang['ld']['kw'] as $idx_kw => $tmp_kw) { + $src .= $i[2] . ((int)$idx_kw) . " => " . ($tmp_kw['case'] ? 'true' : 'false') . ",\n"; + } + $src .= $i[2] . "),\n"; + + //Symbols + $src .= $i[1] . "'SYMBOLS' => array(\n"; + foreach($lang['ld']['sy'] as $idx_kw => $tmp_kw) { + $src .= $i[2] . ((int)$idx_kw) . " => array(\n"; + $tmp_kw['list'] = (array)$tmp_kw['list']; + sort($tmp_kw['list']); + $kw_esc = array_map('str_to_phpstring', $tmp_kw['list']); + $kw_nl = true; + $kw_pos = strlen($i[3]); + foreach($kw_esc as $kw_data) { + if((strlen($kw_data) + $kw_pos > 79) && $kw_pos > strlen($i[3])) { + $src .= "\n"; + $kw_nl = true; + $kw_pos = 0; + } + if($kw_nl) { + $src .= $i[3]; + $kw_pos += strlen($i[3]); + $kw_nl = false; + } + $src .= $kw_data . ', '; + $kw_pos += strlen($kw_data) + 2; + } + $src .= "\n"; + $src .= $i[3] . "),\n"; + } + $src .= $i[2] . "),\n"; + + //Styles \ CSS + $src .= $i[1] . "'STYLES' => array(\n"; + $src .= $i[2] . "'KEYWRODS' => array(\n"; + foreach($lang['ld']['kw'] as $idx_kw => $tmp_kw) { + $src .= $i[3] . ((int)$idx_kw) . " => " . str_to_phpstring($tmp_kw['style']) . ",\n"; + } + $src .= $i[3] . "),\n"; + $src .= $i[2] . "'COMMENTS' => array(\n"; + foreach($lang['ld']['cmt']['sl'] as $idx_cmt_sl => $tmp_cmt_sl) { + $src .= $i[3] . ((int)$idx_cmt_sl) . " => " . str_to_phpstring($tmp_cmt_sl['style']) . ",\n"; + } + foreach($lang['ld']['cmt']['rxc'] as $idx_cmt_rxc => $tmp_cmt_rxc) { + $src .= $i[3] . ((int)$idx_cmt_rxc) . " => " . str_to_phpstring($tmp_cmt_rxc['style']) . ",\n"; + } + $src .= $i[3] . "'MULTI' => " . str_to_phpstring($lang['ld']['cmt']['ml'][1]['style']) . "\n"; + $src .= $i[3] . "),\n"; + $src .= $i[2] . "'ESCAPE_CHAR' => array(\n"; + foreach($lang['ld']['str']['erx'] as $idx_str_erx => $tmp_str_erx) { + $src .= $i[3] . ((int)$idx_str_erx). " => ". str_to_phpstring($tmp_str_erx['style']) . ",\n"; + } + // 'HARD' => 'color: #000099; font-weight: bold;' + $src .= $i[3] . "),\n"; + $src .= $i[2] . "'BRACKETS' => array(\n"; + $src .= $i[3] . "),\n"; + $src .= $i[2] . "'STRINGS' => array(\n"; + foreach($lang['ld']['str']['qm'] as $idx_str_qm => $tmp_str_qm) { + $src .= $i[3] . ((int)$idx_str_qm). " => ". str_to_phpstring($tmp_str_qm['style']) . ",\n"; + } + // 'HARD' => 'color: #0000ff;' + $src .= $i[3] . "),\n"; + $src .= $i[2] . "'NUMBERS' => array(\n"; + $src .= $i[3] . "),\n"; + $src .= $i[2] . "'METHODS' => array(\n"; + $src .= $i[3] . "),\n"; + $src .= $i[2] . "'SYMBOLS' => array(\n"; + foreach($lang['ld']['sy'] as $idx_kw => $tmp_kw) { + $src .= $i[3] . ((int)$idx_kw) . " => " . str_to_phpstring($tmp_kw['style']) . ",\n"; + } + $src .= $i[3] . "),\n"; + $src .= $i[2] . "'REGEXPS' => array(\n"; + $src .= $i[3] . "),\n"; + $src .= $i[2] . "'SCRIPT' => array(\n"; + $src .= $i[3] . "),\n"; + $src .= $i[2] . "),\n"; + + //Keyword Documentation + $src .= $i[1] . "'URLS' => array(\n"; + foreach($lang['ld']['kw'] as $idx_kw => $tmp_kw) { + $src .= $i[2] . ((int)$idx_kw) . " => " . str_to_phpstring($tmp_kw['docs']) . ",\n"; + } + $src .= $i[2] . "),\n"; + $src .= $i[1] . "'OOLANG' => false,\n"; + $src .= $i[1] . "'OBJECT_SPLITTERS' => array(\n"; + $src .= $i[2] . "),\n"; + $src .= $i[1] . "'REGEXPS' => array(\n"; + $src .= $i[2] . "),\n"; + $src .= $i[1] . "'STRICT_MODE_APPLIES' => GESHI_MAYBE,\n"; + $src .= $i[1] . "'SCRIPT_DELIMITERS' => array(\n"; + $src .= $i[2] . "),\n"; + $src .= $i[1] . "'HIGHLIGHT_STRICT_BLOCK' => array(\n"; + $src .= $i[2] . "),\n"; + $src .= $i[1] . "'TAB_WIDTH' => 4,\n"; + + $src .= << +GESHI_LANGFILE_FOOTER; + + //Reduce source ... + $src = preg_replace('/array\(\s*\)/s', 'array()', $src); + $src = preg_replace('/\,(\s*\))/s', '\1', $src); + $src = preg_replace('/\s+$/m', '', $src); + + return $src; +} + +// vim: shiftwidth=4 softtabstop=4 +?> diff --git a/vendor/easybook/geshi/docs/BUGS b/vendor/easybook/geshi/docs/BUGS new file mode 100644 index 0000000000..8a5cf04694 --- /dev/null +++ b/vendor/easybook/geshi/docs/BUGS @@ -0,0 +1,29 @@ + + BUGS - list of known bugs in GeSHi + Version 1.0.8 + +- Number highlighting is quite poor [possibly better now] +- I'm not happy with URLS - there still could be extra bugs, and it's rather unflexible + (see TODO for a possible fix) +- "Important" sections for some reason seem to have their spans added after every + newline up until the next lexic, instead of stopping at the part. In fact, + context sensitiveness is quite poor... +- Using the extra line number highlighting feature without actually using line numbers + will result in malformed XHTML (not sure about this one though...) +- Slow!!! Especially for source with lots of strings in it. GeSHi will work acceptably + for sourcecode under 5K (for simple language files like SQL, a 100K file can be + highlighted in just 6 seconds), but above about 25K things get a little slow... If + you're using this as part of some larger software, you may want to think about + making some sort of "cache" effect to speed things up and reduce server load. +- The result is built by string replacement instead of by building another string based + on the source, that would be much safer. The focus of releases beyond 1.0.7 will be on + changing this behaviour, which may well fix some of the other bugs mentioned above. +- As of 1.0.7.1, dots (.) are allowed before keywords. This may change highlighting of some + things slightly, if you notice anything odd about the highlighting then please report + it to me. +- Perl/Javascript /.../ regex syntax is only supported basically and there's no + guarantee it is working all the time. +- The
             header output is not XHTML compliant. Please use the 
            header instead. + +Send any bug reports to BenBE@omorphia.de, or submit them via the bug tracker at +sourceforge (http://sourceforge.net/tracker/?group_id=114997&atid=670231) diff --git a/vendor/easybook/geshi/docs/CHANGES b/vendor/easybook/geshi/docs/CHANGES new file mode 100644 index 0000000000..ee510fe02e --- /dev/null +++ b/vendor/easybook/geshi/docs/CHANGES @@ -0,0 +1,923 @@ + + CHANGES - Changelog for GeSHi (geshi.php only) + +Changes to the code are listed under the version they occured in, with who suggested +it by each one (if there's nobody listed as suggesting it I dreamed it up :)). Users +who suggested an idea often also provided the code that was used as a basis for the +changes - thanks to all who suggested these ideas and gave me the code to show me how! + +Language files listed under each version were made by the author beside them, and then +modified by me for consistency/bug fixing. + +Please send any bug reports to BenBE@omorphia.de, or use the bug report tracker +at sourceforge (http://sourceforge.net/tracker/?group_id=114997&atid=670231) + +Version 1.0.8.11 + - Added language files + * ARM (Marat Dukhan) + * Asymptote (Manuel Yguel) + * DCL (Petr Hendl) + * DCPU-16 (Benny Baumann) + * FreeSWITCH (James Rose) + * Haxe (Andy Li, John Liao) + * LDIF (Bruno Harbulot) + * Nagios (Albéric de Pertat) + * Octave (Carnë Draug, Juan Pablo Carbajal) + * ParaSail (sttaft) + * PARI/GP (Charles R Greathouse IV) + * Python for S60 (Sohan Basak) + * Rexx (Jon Wolfers) + * SPARK (Phil Thornley) + * SPARQL (Karima Rafes) + * StoneScript (Archimmersion) + * UPC (Viraj Sinha) + * Urbi (Alexandre Morgand) + * Vedit (Pauli Lindgren) + - Updated aliasd.php contrib script (SF#3073275, count) + - Fallback to "text" when extension is unknown (SF#3514714, murkymark, BenBE) + - detect extensions case-insensitive (SF#3514714, murkymark, BenBE) + - Fixed two bugs within contrib scripts included with each release (BenBE) + - Improvements to language files (BenBE) + * Symbol and char literal handling for Scala (Paul Butcher, BenBE) + * Multiline comments of F# weren't actually multiline (BenBE) + * Support for IPv6 addresses in RFC822 messages (BenBE) + * Properly handle retrieving names from language files (MikeSee, BenBE) + * Changes for improved highlighting of signle line comments and end-of-code indicators + * Missing keywords and improved highlighting of comments + * Problem with DOS/Batch highlighting breaking out at variables (BenBE) + * Addition of MMX/SSE/x86-64 registers and MMX/SSE instructions for + ASM language file(up to 4.2) (Dennis Yurichev) + * Further improvements to ASM language file to introduce all latest + already documented x86 architecture instructions (Marat Dukhan) + * Fixed links for R/S+ language file (Fernando H.F.P. da Rosa) + * Fix a problem with Delphi/Pascal regarding hex numbers/chars (BenBE) + * Fixed a typo and missing keywords for HTML4 and HTML5 (SF#3365452, BenBE) + * Fixed a typo in Modula-3 language file (SF#3358216, BenBE) + * Added missing keywords for MySQL (SF#3290998, ct-bob, BenBE) + * Added missing keywords for Pascal (SF#3176749, BenBE) + * Properly detect the keyword that is to be linked (BenBE) + * Updated VHDL language file (Kevin Thibedeau) + * Added missing keyword for Verilog (SF#3557903, BenBE) + * Fixed typo in Haskell causing a keyword to be missing (SF#3529439, BenBE) + * Fixed Long String handling for Lua (SF#3541510, Tim Starling) + * Updated JavaDoc links for Java language files (SF#3538552, jeneag, BenBE) + * CSS keywords incorrectly highlighted as part of identifiers (SF#3554101, BenBE) + * CSS3 keywords missing from highlighting (SF#3525084, vlaKoff, BenBE) + * Make variable handling compatible to PHP (SF#3489142, BenBE) + * Fixed obsolete MySQL documentation links (SF#3441642, BenBE) + * Add mising keywords for T-SQL (SF#3435026, BenBE) + * Fix discarded text when highlighting TypoScript (SF#3160238, BenBE) +Version 1.0.8.10 + - Added language files + * BASCOM AVR (Michal Goralczyk) + * C: Loadrunner dialect (Stuart Moncrieff) + * CoffeeScript (Trevor Burnham) + * EPC (Thorsten Muehlfelder) + * Euphoria (Nicholas Koceja) + * Falcon (billykater) + * HTML5 (Robert Lidberg) + * LLVM (Azriel Fasten) + * PL/I (Robert Prins) + * ProFTPd (Benny Baumann) + * PyCon (Benny Baumann) + * UnrealScript (pospi) + * YAML (Josh Ventura) + - Small bugfix in LangCheck when looking for language files + - Added '-' to list of RX chars that require explicit escaping (SF#3056454, BenBE) + - Minor changes to boundary checks (SF#3077256, BenBE) + - Improvements to language files (BenBE) + * Major rework of the ALGOL68 language file (Neville Dempsey) + * LangCheck warnings from GO language file (BenBE) + * Some additions to the Objeck language file (Randy Hollines) + * Properly highlight infinity as numbers for J (Ric Sherlock) + * Improved GDB Backtrace language file (Milian Wolff) + * Updated Liberty BASIC language file (Chris Iverson) + * Fixed a small issue with detection of division vs. regular expressions + for ActionScript 3 and JavaScript (Kevin Day) + * Fixed Escape handling for CSS (SF#3080513, yecril71pl, BenBE) + * Additional comment styles for SAS (SF#3024708, ahnolds, BenBE) + * Updated keyword list for TeraTerm (Boris Maisuradze) + * Incorrect handling of /**/ comments in Javascript (BenBE) + * Support for mod_upload_progress in Apache Config files (BenBE) + * Prefix operator handling in F# was broken (BenBE) + * CDATA handling for html4strict (BenBE) + * Common subcommands for Apache, APT, CVS, Git, SVN and YUM for Bash (BenBE) + * Limited support for prompt detection in single line Bash snippets (BenBE) + * Added functions of the C standard library (BenBE) + * Rework of Lua to use GeSHi's features better (BenBE) + * Language file improvements for Python (Zbyszek Szmek) + * Fixed documentation links for Groovy (SF#3152356, lifeisfoo) + * Fixed incorrect highlighting of certain keywords in Erlang (SF#3138853, BenBE) + * Escape chars in C++/C++Qt handled incorrectly (SF#3122706, C. Pötsch) + * Empty parameters of LaTeX commands tipped the highlighting off (SF#3098329, James Oldfield, BenBE) + * Additional Keywords and minor tweaks to Logtalk (Paulo Moura) +Version 1.0.8.9 + - Added language files + * Algol68 (Neville Dempsey) + * E (Kevin Reid) + * FormulaOne (Juro Bystricky) + * Go (Markus Jarderot) + * Liberty BASIC (Chris Iverson) + * MOS 6502/6510 Assemblers (Warren Willmey) + * Motorola 68k assembler (Warren Willmey) + * Objeck Programming Language (Randy Hollines) + * ZXBasic (Jose Rodriguez) + - Added support for $-prefixed hex numbers and @-prefixed octal numbers + - Added Parser Control for languages to tell when numbers are present + inside of non-string parts + - Introduced querying supported/known languages directly + - Introduced querying full language names without loading the language file + - Improvements to language files (BenBE) + * Added loads of keywords for generic SQL highlighting (Jürgen Thomas) +Version 1.0.8.8 + - Added language files + * ChaiScript (Jason Turner & Jonathan Turner) + * Genie (Nicolas Joseph) + * GwBasic (José Gabriel Moya Yangüela) + * HicEst (Georg Petrich) + * Icon (Matt Oates) + * MagikSF (Sjoerd van Leent) + * Modula 2 (Benjamin Kowarsch) + * Oz (Wolfgang Meyer) + * PCRE (BenBE) + * PostgreSQL (Christophe Chauvet) + * q/kdb+ (Ian Roddis) + * RPM Specification Files (Paul Grinberg) + * Unicon (Matt Oates) + * Vala (Nicolas Joseph) + * XBasic (José Gabriel Moya Yangüela) + - Improvements to language files (BenBE) + * Major reworks and improvements to OCaml language file (BenBE) + * Removed duplicate entries from keyword groups of VIM language file (Segaja) + * Properly protect Regexps against GeSHi Black Magic in Matlab (BenBE) + * Added support for Block Comments in PowerShell (BenBE) + * Added some keywords for VB; split into multiple groups (leejkennedy, BenBE) + * Basic Heredoc Support for Ruby (BenBE) +Version 1.0.8.7 + - Added language files + * Autoconf (Mihai Vasilian) + * ECMAScript (Michel Mariani) + * J (Ric Sherlock) + * OpenBSD Packet Filter (David Berard) + * Oxygene / Delphi Prism (Carlo Kok) + - Minor change in INT_BASIC number regexp to support '..' range operator + as to be found in most Pascal-like languages (BenBE) + - Fixed an issue with Hardquotes for empty strings (like '' in Delphi) (BenBE) + - Introduced a fix for improved performance when matching numbers (BenBE) + - Improvements to language files (BenBE) + * Fixed broken links in Prolog language file (BenBE) + * Fixed keywords in generics expressions in Java5 (BenBE) + * Added support for import static in Java5 (BenBE) + * Added Standard Integer Types for C and c++ (BenBE) + * Fixed some regexp issues in Erlang (BenBE) + * Added some missing keywords for Clojure (BenBE) + * Added some missing keywords for Lisp (BenBE) + * Fixed a problem with variable names in Prolog (BenBE) + * Some color changes for AutoIt (BenBE) + * Added support for basic include directive processing for AutoIt (BenBE) + * Added support for ::-style labels as comments (SF#2947393, BenBE) + * Removed backslash as Escape Char in T-SQL (SF#2939199, Bruno Braga) + * Added Nested Comments Support for Haskell (SF#2922317, BenBE) + * Fixed Comments for VIM, added some keywords, proposed porting of + Regular Expression markup from Perl (SF#2818047, psycojoker, BenBE) + * Fixed warnings for Language Check of Tcl (BenBE) +Version 1.0.8.6 + - Added language files + * Clojure (Jess Johnson) + * Cuesheet (Benny Baumann) + * F# (Julien Ortin) + * GAMBAS (Jesus Guardon) + * Logtalk (Paulo Moura) + * MapBasic (Tomasz Berus) + * NewLisp (cormullion) + * Perl 6 (Kodi Arfer) + * Pike (Rick E.) + * SystemVerilog (Sean O'Boyle) + - Reworked parts of the number support (BenBE) + - Improvements to language files (BenBE) + * Fixed broken links in R/S+ language file (BenBE) + * Fixed an issue with if= argument for dd command (BenBE) + * T-SQL should use GESHI_CAPS_NO_CHANGE for keywords (BenBE) + * Fixed missed shorthand arg references in Bash (BenBE) + * Fixed first line not getting highlighted in diff language (BenBE) + * Added some keywords for csharp (RC) +Version 1.0.8.5 + - Added language files + * AutoHotkey (Naveen Garg) + * Awk (George Pollard) + * GADV 4CS (Jason Curl) + * jQuery (Rob Loach) + * PowerBuilder (Doug Porter) + * PureBasic (Gustavo Julio Fiorenza) + * R / S+ (Ron Fredericks, Benilton Carvalho) + - Fixed legitimate numbers sometimes missing from highlighting (BenBE) + - Fixed a problem with URLs allowing to break highlighting (BenBE) + - Allowed for String and Number Styles to be set by the API (BenBE) + - Produce valid CSS when languages start with underscore (BenBE) + - Duplicate newlines with PRE_TABLE-Header but w/o linenumbers (SF#2838958, BenBE) + - Improvements to language files (BenBE) + * Fixed case-insensitively duplicate keywords (BenBE) + * DCS language file contained HARDQUOTE section but no hardquotes (BenBE) + * Some additional headers for Email\mbox highlighting (BenBE) + * Added some more Keywords for robots.txt highlighting (BenBE) + * Added Git commands for bash, ifup/ifdown (BenBE) + * Added support for C# and VB.net delegates (SF#2832253, BenBE) + * Added support for line numbers, file handles and hex\octal numbers for QBasic (BenBE) +Version 1.0.8.4 + - Added language files + * BibTeX (Quinn Taylor) + * CMake (Daniel Nelson) + * Erlang (Benny Baumann, Dan Forest-Barbier, Uwe Dauernheim) + * FO (abas-ERP) (Tan-Vinh Nguyen) + * Property Files (Edy Hinzen) + * Whois (RPSL format) entries (Benny Baumann) + - Changed INT_BASIC number format to allow numbers followed . at EOL (BenBE) + - Higher prority for keywords over regexps (BenBE) + - Added missing set_script_style API function (BenBE) + - Fixed missing check for comment_regexp preference in HardQuotes (BenBE) + - Fixed a problem with Strict Block Detection if the Strict Block Regexp + requires matching groups for itself (BenBE) + - Improvements to language files (BenBE) + * Added PCRE regexp support for Action script (SF#2655644, BenBE) + * Removed some superfluous keywords from ABAP (BenBE) + * Removed duplicate keywords for Progress (BenBE) + * Removed duplicate keywords for T-SQL (BenBE) + * Linking for PowerShell special variables revised (BenBE) + * Fixed linking in ColdFusion (BenBE) + * Fixed linking in LaTeX (BenBE) + * Fixed linking in mIRC Scripting language (BenBE) + * Fixed escape char regexp for C-style languages (BenBE) + * Fixed @""-string handling for C# (SF#2789371, BenBE) + * Fixed Strict Block Detection for PHP blocks (BenBE) + * Changed allowed chars around Powershell operators (SF#2688863, BenBE) + * Minor reordering inside of PHP language file (BenBE) + * Added missing keywords for ActionScript3 language file (SF#2795005, BenBE) + * Added .xrc file extension for XML highlighting (BenBE) +Version 1.0.8.3 + - Added language files + * DCS (Stelio Passaris) + * Locomotive Basic (Nacho Cabanes) + * LSL2 (Linden Scripting Language) (William Fry) + * Modula-3 (Martin Bishop) + * Oberon-2 (Mike Mol) + * Rebol (Lecanu Guillaume) + - Fixed a problem where HardEscapes weren't working when no escape char was given (BenBE) + - Added a PARSER_CONTROL setting to treat whitespace inside of keywords in + the language file as "any whitespace" in the source (i.e. "CREATE TABLE" + in SQL will match "CREATE\s+TABLE" instead of literally matching) (BenBE) + - Added a possibility to allow setting the style for escape characters (BenBE) + - Improvements to language files (BenBE) + * Added some missing Perl keywords and obscure default variables (BenBE) + * Allow for escaped colons to appear in CSS names (BenBE, simon) + * Added multiline continuation suppoert of preprocessor defines for + C, C for Mac, C++ and CC++ with Qt support (BenBE) + * keywords for C-based languages are case-sensitive (BenBE) + * Broken AutoIt highlighting (BenBE) + * Problem with escaped backslash in PHP and D (BenBE) + * Added some more functions for PHP (BenBE) + * Some changes for AppleScript (Stefan Klieme) + * Forbid highlighting keywords followed by / in bash (BenBE) + * Updated the LaTeX file to link some keywords (BenBE) + * Additional text rendered when matching special variables for PowerShell (BenBE) + * Added some more keywords for ABAP (BenBE, Sandra Rossi, Jacob Laursen) +Version 1.0.8.2 + - Added language files + * Brainfuck \ Brainfork (Benny Baumann) + * HQ9+ (Benny Baumann) + * INTERCAL (Benny Baumann) + * LOLcode (Benny Baumann) + * LScript (Beau McGuigan) + * Pixel Bender (Richard Olsson) + * ProvideX (Jeff Wilder) + * VIM Script (Swaroop C H) + * Visual Prolog (Thomas Linder Puls) + * Whitespace (Benny Baumann) + - Changed priority for COMMENT_REGEXP compared to String highlighting (BenBE) + - Fixed correct escaping of spaces inside of URLs (BenBE) + - Updated the list of common file extensions (BenBE) + - Updated the language file check script in contrib/ (BenBE) + - Fixed a problem with link targets resulting in unclickable links (SF#2379120, BenBE) + - Fixed an undefined variable issue in langcheck.php (BenBE) + - Improvements to language files (BenBE) + * eMail Header highlighting now uses the correct delimiters for keywords (BenBE) + * eMail (RFC822\mbox) highlighting now highlights IPs, MIME types and + subfield assignments correctly (BenBE) + * Minor style changes in COBOL to improve loading performance (BenBE) + * Added some missing keywords for D (BenBE) + * Removed duplicate keywords from Progres, SAS and TSQL (BenBE) + * Fixed Heredoc Syntax for Bash (SF#2185319, BenBE) + * Moved symbol-lookalike sequences from keyword groups to separate symbol group + for languages asp, klonec, klonecpp, php, php-brief (BenBE) + * Fixed a lot of duplicate keyword warnings (BenBE) + * Added missing keywords to the Python language file, + introducing support for Python 3.0. (SF#2441839, milian) + * Updated documentation links for TypoScript (SF#2014276, BenBE) + * Fixed a problem with tag and attribute names in XML highlighting (SF#2276119, BenBE) + * Improved MySQL language file (BenBE, JavaWoman) + * Some commentss accidentially mistaken for DocComments (SF#2454897, BenBE) + * Added improved Escape Char handling for c, c_mac, cpp and cpp_qt (SF#2458743, BenBE) +Version 1.0.8.1 + - Added language files + * AviSynth (Ryan Jones) + * eMail \ mbox (Benny Baumann) + * GNU Make (Neil Bird) + * Oracle 11i support (Simon Redhead) + * Prolog (Benny Baumann) + * SciLab (Christophe David) + * TeraTerm macro language (Boris Maisuradze) + - Added support for Escape Regular Expressions (BenBE) + * Implemented C-style Escapes in PHP (BenBE) + * Introduced support for \xAB and \007 style Char Escapes in PHP (BenBE) + * Implemented Variable Highlighting in PHP (BenBE) + * Implemented Variable Highlighting in Bash (milian) + - Fixed a problem with PCRE patterns for Keyword matching sometimes producing + very large strings, that could not be handled by some versions of PCRE lib, + causing broken highlighting an Regexp Compile errors (BenBE, milian) + - Fixed broken highlighting of bash commands like `dbus-send --dest=org.....`, + i.e. the dest was highlighted as variable declaration (milian) + - Fixed broken highlighting of some symbols in their escaped form (BenBE) + ( and were accidentially filtered even though they are valid) + - Fixed a "memory leak" in the *_regexp_caches (milian) + - Fixed broken Escape chars if classes were disabled + - start_line_numbers_at() was ignored when GESHI_HEADER_PRE_TABLE was set (revulo) + - Fixed a problem allowing Remote Code Inclusion under certain circumstances (BenBE) + - Changes to default CSS in order to make the GESHI_HEADER_PRE_TABLE align properly, + even on Windows / Mac systems with strange fonts (milian, revulo, ^RT) + - Minor style changes to the following languages: + * cpp-qt (milian) + * MySQL (BenBE) + * PHP (BenBE) + - Improvements to language files (BenBE, milian) + * Added MinSpareThread\MaxSpareThreads to Apache highlighter (BenBE) + * Added new Keyword group for APT sources.list highlighter (BenBE) + * Fixed highlighting in LaTeX for \begin{} and \end{}, i.e. the stuff inside + the curly braces. (milian, thanks for the report go to Matthias Pospiech) + * Improved String support for D (BenBE) + * MySQL was seriously broken (BenBE) + * Reworked Keyword groups for MySQL to allow for more configuration (BenBE) + * Improved Mirc script language file (milian) + * Improved C++ Qt language file (milian) + * Minor bug with Transpose Operator in Matlab (BenBE, Daniele de Rigo) + * Highlighting of Batch Files for Windows (BenBE) + * Updated AutoIt to include latest changes for AutoIt v3.2.12.1 (BenBE, Thierry) + * Fixed duplicate keyword warnings for Perl, Tcl and Typoscript (BenBE) + * Fixed Doc-URL getting reparsed by highlighted keywords of other groups (BenBE, Jordi Boggiano) +Version 1.0.8 + - Added language files + * APT sources.list (milian) + * Boo (Marcus Griep) + * CIL (Common Intermediate Language, .NET Assembly) (Marcus Griep) + * COBOL (Benny Baumann) + * Gnuplot (milian) + * KLoneC (Mickael Auger) + * KLoneC++ (Mickael Auger) + * PIC16xxx assembler (Phil Mattison) + * POV-Ray (Carl Fürstenberg) + * PowerShell (Frode Aarebrot) + * Progress (Marco Aurelio de Pasqual) + * TypoScript (Jan-Philipp Halle) + * Xorg configuration (milian) + - Make GeSHi's constructor arguments optional, so something like `$foo = new GeSHi;` is possible. (milian) + - Added an optimizer for lists to regular expressions. Using these cached lists results in a speedup of approx. 50%. + The slightly increased memory consumption (~150KB for PHP language file) is more than worth it! (milian) + - Some more memory & speed optimizations all over GeSHi (milian) + * Reduced memory overhead when highlighting keywords (BenBE) + * Keyword Linking now uses considerably less strtolower calls (milian) + * Cache Symbol Search Regexp and make Symbol Highlighting faster (milian) + * Use more native functions like substr_replace and strcasecmp to speed things up (milian) + * Use considerably less strlen() calls on various points by caching the results (milian) + * Properly set comments to be case insensitive where appropriate to increase performance (milian) + * Improve the performance of the strict mode tokenizer, making highlighting of languages like + HTML, ColdFusion or XML faster (milian) + * Setup caches for parsing on demand to make stylesheet generators fast (milian) + - Various improvements to Strict Block Handling (BenBE, milian) + * Added support for RegExp-based Strict Blocks (BenBE) + * Fixed highlighting incorrectly stopping at ?> in PHP (SF#1330968, BenBE) + * Languages with STRICT_MODE_APPLIES = GESHI_MAYBE default to strict mode now. When no highlightable + code is found in this mode, we fallback to the same setting as if GESHI_NEVER was set. That way it + should not be needed to call enable_strictmode() manually. (milian) + - Added new GESHI_HEADER_PRE_VALID type which uses the following markup: (milian) + * With line numbers:
            header
            1. ...
            2. ...
            + * Without line numbers:
            header...CODE...
            + => valid HTML and no need for   indentation + - Added new GESHI_HEADER_PRE_TABLE type which can be used to prevent linenumber-selection in Firefox + on copy'n'paste. (milian) + - set_language will not reset any language settings by default anymore. + * Added $force_reset param for to force full reload of a language. (milian) + * Make sure strict_mode is set properly when doing repeated set_language calls (milian) + - Fixed some problems with old PHP versions (SF#1975625, milian, BenBE) + - Fixed broken use with Suhosin Patch when /e modifier was disabled (SF#2021800, BenBE) + - Added support for external style information files to override language defaults without modifying language files (BenBE) + - The overall_class is now up to the user, and the language-code is _always_ added as a class (milian) + - Fixed Economy Mode for GeSHi::get_stylesheet() - now it just makes so much more sense! (milian) + - Fixed Economy Mode when COMMENT_REGEXP are used (BenBE) + - Changed the default encoding to use UTF-8, due to SF#2037598, BenBE) + - Improved overall string support: + * Added support for multichar string delimiters (SF#1932083, BenBE) + * Fixed problems of unfinished strings and comments producing invalid XHTML (SF#1996353, BenBE) + * Multichar Quotemarks sometimes had inconsistent behaviour (BenBE) + * Support for multiple styles of strings depending on the starter (BenBE) + * Properly handle escapes in strings, i.e. '\\' was not working properly before (milian) + * Fixed escape char support when an escape char is followed by multi-byte chars (SF#2037598, BenBE) + - Improved flexibility in language files (BenBE, milian) + * Added PARSER_CONTROL for OOLANG method highlighting (SF#1923060, BenBE) + * Added possibility to define strict blocks using an Regexp (BenBE) + * Removed explicit escaping of / in Regular Expressions (BenBE) + * Ignoring empty keyword groups when highlighting (milian) + * Make language_permissions configurable in language files via ['PARSER_CONTROL']['ENABLE_FLAGS'] + this makes is_a calls unneeded and thus prevents PHP notices in PHP 5.x (milian) + * Extended support for number formats now covering the most common formats (SF#1923058, BenBE) + * Lifted a limitation that keywords had to have at least 2 subsequent letters (BenBE) + * Changed behaviour of PARSER_CONTROL now allowing to provide the full Lookahead and Lookbehind + expressions used as delimiters inside keywords instead of a simple char group (BenBE) + * Fixed improper handling of newlines in REGEXPS so this does not produce invalid html anylonger (milian) + - Some typos and mistakes in the documentation (BenBE) + - Added a script to contrib/ to verify language files are correct (BenBE) + - Fixed loads of compliancy warnings detected with that automated compliance testing script (BenBE) + - Many other improvements to various language files (BenBE, milian) + * Reduce strict errors & notices for language files (milian) + * Fixed symbol highlighting with C++ sometimes missing keywords after ; and comments (BenBE) + * Improved comment handling with TCL (Lars Hellström, BenBE) + * Fixed broken handling with XML comments (BenBE, SF#1849233) + * Fixed HTML comments spawning multiple lines producing invalid XHTML output (SF#1738173, BenBE) + * Added support for parameters beginning with dash in BASH language (BenBE) + * Support Apache's configuration sections, see http://httpd.apache.org/docs/2.2/sections.html (milian) + * Minor issue with PHP Heredoc and Nowdoc syntax sometimes not getting highlighted (BenBE) + * Updated Objective-C language file (SF#2013961, Quinn Taylor, BenBE) + * Added some keywords for VHDL (beshig, BenBE) + * Fixed severly broken ColdFusion language file (milian) + * Fixed some incorrectly highlighted things with the CSS language file (milian, BenBE) + * Improved Smarty language file (milian) + * Improved CSS language file (milian) + * Improved Pascal language file (milian) + * Improved LaTeX language file (Ðндрей Парамонов, BenBE) + * Fixed a regular expression in mIRC language file that caused a warning message to be issued (BenBE) + * Removed <, > and / from HTML names, now only containing the real tag names (BenBE) + * Use spaces instead of tabs for indendation in language files to have a consistent + coding standard accross geshi files (milian) + * Added some comment styles, keywords and added index highlighting (Chusslove Illich, ЧаÑлав Илић) + - Removed some private methods which were only called at exactly one place (milian) + * format_header_content + * format_footer_content + * get_attributes + - Second part of default style changes. Affected in this release: + * C++ + * C++ (Qt) + * CSS + * VHDL +Version 1.0.7.22 + - Added language files + * glSlang (BenBE) + * KiXtart (Riley McArdle) + * Lotus Notes @Formulas (Richard Civil) + * LotusScript (Richard Civil) + * MXML (David Spurr) + * Scala (Franco Lombardo) + * ActionScript 3 (Jordi Boggiano) + * GNU Gettext .po/.pot (Milian Wolff) + * Verilog (Günter Dannoritzer) + - Fixed a problem not yet addressed in 1.0.7.21 regarding highlighting of + symbols that caused some extra characters to be added in the output or + broke highlighting and standard compliance due to missing escaping of + internally used characters (SF#192320 and SF#1926259, BenBE) + - Fixed missing style information for ocaml language file (The_PHP_Jedi) + - Fixed a bug causing masses of warnings in rendered output if language file + miss style information (The_PHP_Jedi, BenBE) + - Missing tab width information could lead to warnings (BenBE) + - Missing symbol information for ASP (SF#1952038, nfsupport, BenBE) + - Empty delimiter message with OOoBasic (BenBE, Ccornell) + - Escaping of comments in LaTeX ignored (SF#1749806, BenBE) + - Modified Math environment $$ in LaTeX to be non-greedy (BenBE) + - Added possibility to match a regexp as comment (SF#1914640, SF#1945301, SF#1934832, BenBE) + - Introduced C-Style multiline continuation comments (SF#1914640, SF#1945301, BenBE) + - Introduced Fortran Comments (SF#1914640, SF#1934832, BenBE) + - Implemented Heredoc and Nowdoc Syntax for PHP and Perl (SF#1914640, BenBE) + - Implemented Compiler Directives for Delphi (SF#1914640, BenBE) + - Implemented minimalistic support for JavaScript \ Perl Regular Expressions (SF#1786665, SF#1754333, SF#1956631, BenBE) + - Fixed Strings in Matlab to be handled as comments instead of regexps, to prevent keywords being linked (BenBE) + - Applied PARSER_CONTROL fix of C++ for C++-Qt-Derivative (BenBE) + - Fixed incorrect treatment of unequally long multiline comment separators (related to SF #1891630, BenBE) + - Added PARSER_CONTROL settings for keywords in ASM language file (SF#1835148, BenBE) + - Fixed missing CASSE_SENSITIVE entry for DOS language file (SF#1956314, BenBE) + - Fixed accidential highlighting of keywords in argument names (SF#1956456, Milian Wolff, BenBE) + - Fixed yet again some #-related bash problem (SF#1956459, Milian Wolff, BenBE) + - Added backticks as symbols (Milian Wolff) + - Example script remembers selections and source submitted (Milian Wolff) + - Example script allows remembered source and preselected language to be cleared (Milian Wolff) + - Example script now properly includes geshi and doesn't suppress error messages anylonger. (Milian Wolff) + - Code cleanup by using direct string indexing instead of substr with length 1 (Milian Wolff) + - Optimized generation of code parts in strict mode (Milian Wolff) + - Optimized COMMENT_REGEXP by using an incremental regexp cache (Milian Wolff, BenBE) + - Fixed a problem that rarely skipped highlighting of escaped chars which usually should have gotten highlighted (BenBE) + - Optimized generation of highlighted strings to use fast skip forward while highlighting them (Milian Wolff, BenBE) + - Optimization using basic rework of indent function improving tab expansion performance (BenBE) + - Lots of other minor optimizations based on coding style improvements (Milian Wolff) + - Implemented setting to force spans to be closed before newlines, see SF#1727398 (Milian Wolff) + - Added missing credits for D language file to THANKS file (SF#1720899, BenBE) + - Optimization to prevent loading the current language file twice (Milian Wolff) + - Optimization: Use file_get_contents() to load sourcecode from files. + Even if GeSHi worked with PHP 4.1 before, it doesn't now. (Milian Wolff) + - Added description of extra language features (SF#1970248, BenBE) + - Added support for highlighting the C# using and namespace directives (SF #1395677, BenBE) + - Added support for highlighting the Java import and package directives (SF #1395677, BenBE) + - Fixed minor problem in Haskell cuasing accidential start of comment (SF#1987221, BenBE) + - Fixed minor issue causing loads of warnings if a language files defines no symbols (BenBE) + - Updated some aspects of the documentation and included further hints (BenBE) + - First of series of color scheme changes. Affected languages (sofar): + * Assembler (x86) + * Bash + * C + * C# + * Delphi + * Fortran77 + * glSlang + * Java & Java 5 + * JavaScript + * OCaml + * OpenOffice.org Basic + * Pascal + * Perl + * PHP and PHP-Brief +Version 1.0.7.21 + - Added language files + * Basic4GL (Matthew Webb) + - Fixed problem with mIRC language highlighting spaces only (BenBE) + - Language files can now specify a function to be called to decide the + colour of a regular expression match + - Added single quote to Lua (Darrin Roenfanz) + - Compare comments case insensitively (fixes AutoIT comments somewhat) + (Daniel Gordon) + - Fixed symbols not being highlighted at all (SF #1767953, BenBE) + - Fixed brackets not correctly managed (SF #1767954, BenBE) + - Changed default languages for some extensions + - Included color and character information for symbol highlighting in some languages (BenBE) + - Fixed a problem with extension detection if default was used (BenBE) + - Fixed a highlighting problem with the LaTeX language (SF #1776182, BenBE) + - Added a new parameter for enable_highlighting to reduce source duplication (SF #1786104, BenBE) + - Updated doxygen documentation to include since tags and some missing parameters + - Disabled symbol highlighting by default (doesn't affect brackets, cf. documentation) (BenBE) + - Added a check for set_case_keywords for the given param to be supported (BenBE) + - Minor rework of the HTML documentation layout \ W3C compliance (BenBE) + - Fixed highlighting error in bash language avoiding keywords in comments (SF #1786314, SF #1564839, BenBE) + - Fixed template params for C++ and C# not being highlighted (SF #1772919, BenBE) + - Fixed more reported problems about mirc highlighting + - Added some missing keywords for VB.NET + - Fixed some warnings in DOS language file (Florian Angehrn) + - Add possibility to handle more than one extra line style (SF #1698255, German Rumm, BenBE) + - Fixed handling of URLs when output case differs from URL case (SF #1815504, Tom Samstag, BenBE) + - Fixed POD (Plain Old Documentation) format problems breaking highlighting of Perl (SF #1891630, Shannon Wynter, BenBE) + - Fixed a problem with mIRC when & was used for identifiers (SF #1875552, BenBE) +Version 1.0.7.20 + - Added language files + * Genero (logic) and Per (forms) (FOURJ's Genero 4GL) (Lars Gersmann) + * Haskell (Dagit) + * ABAP (Andres Picazo) + * Motorola 68k Assembler (for MC68HC908GP32 Microcontroller) (BenBE) + * Dot (Adrien Friggeri) + - Fixed java documentation search for keywords to actually go to the + documentation (spaze) + - Applied fix for bug 1688864 (bad regexes) (Tim Starling) + - Fixed comment CSS rule in visualfoxpro + - ThinBASIC language update (Eros Olmi) + - mIRC language update (BenBE) + - Fixed outdated documentation URL of Perl language file (RuralMoon by BenBE) + - Fixed tab replacement code not generating the correct number of spaces in + some cases (Guillermo Calvo) + - Fixed two typos in Z80 language file + - Applied fix for bug 1730168 (Daniel Naber) + - Applied fix for bug 1705482 (Jason Frame) + * Configurable line endings (Replace \n by custom string) + * per-language tab-widths (Adjustable for width>=1) + * Included defaults for ASM (x86, m68k, z80), C, C (Mac), C++, C++ (Qt), C#, + Delphi, CSS,, HTML, PHP, PHP (Brief), QBasic, Ruby, XML + - Added a possibility to force generation of a surrounding tag around + the highlighted source + - Applied fix for additional keywords for the bash language + (cf. http://bash.thefreebizhost.com/bash_geshi.php, BenBE / Jan G) + - Fix bad colour definition in GML language (Andreas Gohr) + - Fixed phpdoc comments not being indented one space if they should be (Andy + Hassall) +Version 1.0.7.19 + - Added language files + * X++ (Simon Butcher) + * Rails (Moises Deniz) + - Fixed invalid HTML being generated and doctypes not being highlighted over + multiple lines properly when line numbers are on (Validome) + - Improved the ruby syntax highlighting by basing it off the Rails file + - Changed some regular expressions to possibly help with badly performing + regex support in PHP (Tim Starling) + - Allow {TIME}, {LANGUAGE} and {VERSION} to be used in the header as well as + the normal
            + \ No newline at end of file diff --git a/vendor/easybook/geshi/docs/api/index.html b/vendor/easybook/geshi/docs/api/index.html new file mode 100644 index 0000000000..f499a8f947 --- /dev/null +++ b/vendor/easybook/geshi/docs/api/index.html @@ -0,0 +1,24 @@ + + + + + + GeSHi 1.0.8 + + + + + + + + + + + <H2>Frame Alert</H2> + <P>This document is designed to be viewed using the frames feature. + If you see this message, you are using a non-frame-capable web client.</P> + + + \ No newline at end of file diff --git a/vendor/easybook/geshi/docs/api/li_geshi.html b/vendor/easybook/geshi/docs/api/li_geshi.html new file mode 100644 index 0000000000..f074e378a3 --- /dev/null +++ b/vendor/easybook/geshi/docs/api/li_geshi.html @@ -0,0 +1,46 @@ + + + + + + + + + + +
            geshi
            +
            + +
            + +
            Description
            +
            + Class trees
            + Index of elements
            + Todo List
            +
            + + + + + + + +
            Sub-packagecore
            +
            +
            +
             Classes
            +
            ClassGeSHi
            +
             Functions
            +
            Functiongeshi_highlight
            +
             Files
            +
            Filegeshi.php
            +
            +
            + + +
            +
            +

            phpDocumentor v 1.4.2

            + + \ No newline at end of file diff --git a/vendor/easybook/geshi/docs/api/media/banner.css b/vendor/easybook/geshi/docs/api/media/banner.css new file mode 100644 index 0000000000..032b037f4d --- /dev/null +++ b/vendor/easybook/geshi/docs/api/media/banner.css @@ -0,0 +1,33 @@ +body +{ + background-color: #EEEEEE; + margin: 0px; + padding: 0px; +} + +/* Banner (top bar) classes */ + +.banner { } + +.banner-menu +{ + text-align: right; + clear: both; + padding: .5em; + border-top: 2px solid #AAAAAA; +} + +.banner-title +{ + text-align: right; + font-size: 20pt; + font-weight: bold; + margin: .2em; +} + +.package-selector +{ + background-color: #DDDDDD; + border: 1px solid #AAAAAA; + color: #000090; +} diff --git a/vendor/easybook/geshi/docs/api/media/images/AbstractClass.png b/vendor/easybook/geshi/docs/api/media/images/AbstractClass.png new file mode 100644 index 0000000000..b1f6076099 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/AbstractClass.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/AbstractClass_logo.png b/vendor/easybook/geshi/docs/api/media/images/AbstractClass_logo.png new file mode 100644 index 0000000000..ab21d652c0 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/AbstractClass_logo.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/AbstractMethod.png b/vendor/easybook/geshi/docs/api/media/images/AbstractMethod.png new file mode 100644 index 0000000000..635fa08b94 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/AbstractMethod.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/AbstractPrivateClass.png b/vendor/easybook/geshi/docs/api/media/images/AbstractPrivateClass.png new file mode 100644 index 0000000000..eb2938e872 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/AbstractPrivateClass.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/AbstractPrivateClass_logo.png b/vendor/easybook/geshi/docs/api/media/images/AbstractPrivateClass_logo.png new file mode 100644 index 0000000000..93c1da85bb Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/AbstractPrivateClass_logo.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/AbstractPrivateMethod.png b/vendor/easybook/geshi/docs/api/media/images/AbstractPrivateMethod.png new file mode 100644 index 0000000000..203ce61d9f Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/AbstractPrivateMethod.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/Class.png b/vendor/easybook/geshi/docs/api/media/images/Class.png new file mode 100644 index 0000000000..9ac7daa919 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/Class.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/Class_logo.png b/vendor/easybook/geshi/docs/api/media/images/Class_logo.png new file mode 100644 index 0000000000..2c97193a74 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/Class_logo.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/Constant.png b/vendor/easybook/geshi/docs/api/media/images/Constant.png new file mode 100644 index 0000000000..c3610cb974 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/Constant.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/Constructor.png b/vendor/easybook/geshi/docs/api/media/images/Constructor.png new file mode 100644 index 0000000000..cb78dcd2fe Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/Constructor.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/Destructor.png b/vendor/easybook/geshi/docs/api/media/images/Destructor.png new file mode 100644 index 0000000000..d60215d676 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/Destructor.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/Function.png b/vendor/easybook/geshi/docs/api/media/images/Function.png new file mode 100644 index 0000000000..5f05eb2f3f Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/Function.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/Global.png b/vendor/easybook/geshi/docs/api/media/images/Global.png new file mode 100644 index 0000000000..f00968b7c7 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/Global.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/I.png b/vendor/easybook/geshi/docs/api/media/images/I.png new file mode 100644 index 0000000000..874f1ba518 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/I.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/Index.png b/vendor/easybook/geshi/docs/api/media/images/Index.png new file mode 100644 index 0000000000..09cead5f35 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/Index.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/Interface.png b/vendor/easybook/geshi/docs/api/media/images/Interface.png new file mode 100644 index 0000000000..4ab1592eb5 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/Interface.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/Interface_logo.png b/vendor/easybook/geshi/docs/api/media/images/Interface_logo.png new file mode 100644 index 0000000000..2c97193a74 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/Interface_logo.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/L.png b/vendor/easybook/geshi/docs/api/media/images/L.png new file mode 100644 index 0000000000..dc49c4eec6 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/L.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/Lminus.png b/vendor/easybook/geshi/docs/api/media/images/Lminus.png new file mode 100644 index 0000000000..a7346d2228 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/Lminus.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/Lplus.png b/vendor/easybook/geshi/docs/api/media/images/Lplus.png new file mode 100644 index 0000000000..673ab01b20 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/Lplus.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/Method.png b/vendor/easybook/geshi/docs/api/media/images/Method.png new file mode 100644 index 0000000000..e5b154b542 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/Method.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/Page.png b/vendor/easybook/geshi/docs/api/media/images/Page.png new file mode 100644 index 0000000000..4d3a37711e Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/Page.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/Page_logo.png b/vendor/easybook/geshi/docs/api/media/images/Page_logo.png new file mode 100644 index 0000000000..91437deb26 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/Page_logo.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/PrivateClass.png b/vendor/easybook/geshi/docs/api/media/images/PrivateClass.png new file mode 100644 index 0000000000..88431d4f41 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/PrivateClass.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/PrivateClass_logo.png b/vendor/easybook/geshi/docs/api/media/images/PrivateClass_logo.png new file mode 100644 index 0000000000..c9d3a58a83 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/PrivateClass_logo.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/PrivateMethod.png b/vendor/easybook/geshi/docs/api/media/images/PrivateMethod.png new file mode 100644 index 0000000000..9b9f733569 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/PrivateMethod.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/PrivateVariable.png b/vendor/easybook/geshi/docs/api/media/images/PrivateVariable.png new file mode 100644 index 0000000000..fef0a27395 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/PrivateVariable.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/StaticMethod.png b/vendor/easybook/geshi/docs/api/media/images/StaticMethod.png new file mode 100644 index 0000000000..e5b154b542 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/StaticMethod.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/StaticVariable.png b/vendor/easybook/geshi/docs/api/media/images/StaticVariable.png new file mode 100644 index 0000000000..2a372b487e Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/StaticVariable.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/T.png b/vendor/easybook/geshi/docs/api/media/images/T.png new file mode 100644 index 0000000000..e6f55bd8af Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/T.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/Tminus.png b/vendor/easybook/geshi/docs/api/media/images/Tminus.png new file mode 100644 index 0000000000..226ba0c088 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/Tminus.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/Tplus.png b/vendor/easybook/geshi/docs/api/media/images/Tplus.png new file mode 100644 index 0000000000..e9a3c4eea0 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/Tplus.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/Variable.png b/vendor/easybook/geshi/docs/api/media/images/Variable.png new file mode 100644 index 0000000000..2a372b487e Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/Variable.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/blank.png b/vendor/easybook/geshi/docs/api/media/images/blank.png new file mode 100644 index 0000000000..9c1bda1984 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/blank.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/class_folder.png b/vendor/easybook/geshi/docs/api/media/images/class_folder.png new file mode 100644 index 0000000000..be0face221 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/class_folder.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/empty.png b/vendor/easybook/geshi/docs/api/media/images/empty.png new file mode 100644 index 0000000000..d56838651e Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/empty.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/file.png b/vendor/easybook/geshi/docs/api/media/images/file.png new file mode 100644 index 0000000000..8ff962fd26 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/file.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/folder.png b/vendor/easybook/geshi/docs/api/media/images/folder.png new file mode 100644 index 0000000000..b793328d00 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/folder.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/function_folder.png b/vendor/easybook/geshi/docs/api/media/images/function_folder.png new file mode 100644 index 0000000000..6d8861c767 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/function_folder.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/next_button.png b/vendor/easybook/geshi/docs/api/media/images/next_button.png new file mode 100644 index 0000000000..521f29a891 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/next_button.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/next_button_disabled.png b/vendor/easybook/geshi/docs/api/media/images/next_button_disabled.png new file mode 100644 index 0000000000..def00128c4 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/next_button_disabled.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/package.png b/vendor/easybook/geshi/docs/api/media/images/package.png new file mode 100644 index 0000000000..6fe427a5b7 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/package.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/package_folder.png b/vendor/easybook/geshi/docs/api/media/images/package_folder.png new file mode 100644 index 0000000000..f504b70d44 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/package_folder.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/previous_button.png b/vendor/easybook/geshi/docs/api/media/images/previous_button.png new file mode 100644 index 0000000000..9f0c62d4b1 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/previous_button.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/previous_button_disabled.png b/vendor/easybook/geshi/docs/api/media/images/previous_button_disabled.png new file mode 100644 index 0000000000..850edcfdf7 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/previous_button_disabled.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/private_class_logo.png b/vendor/easybook/geshi/docs/api/media/images/private_class_logo.png new file mode 100644 index 0000000000..c9d3a58a83 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/private_class_logo.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/tutorial.png b/vendor/easybook/geshi/docs/api/media/images/tutorial.png new file mode 100644 index 0000000000..14443d8cde Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/tutorial.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/tutorial_folder.png b/vendor/easybook/geshi/docs/api/media/images/tutorial_folder.png new file mode 100644 index 0000000000..6e28f012a9 Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/tutorial_folder.png differ diff --git a/vendor/easybook/geshi/docs/api/media/images/up_button.png b/vendor/easybook/geshi/docs/api/media/images/up_button.png new file mode 100644 index 0000000000..bd9ff8cd2a Binary files /dev/null and b/vendor/easybook/geshi/docs/api/media/images/up_button.png differ diff --git a/vendor/easybook/geshi/docs/api/media/stylesheet.css b/vendor/easybook/geshi/docs/api/media/stylesheet.css new file mode 100644 index 0000000000..96729b6532 --- /dev/null +++ b/vendor/easybook/geshi/docs/api/media/stylesheet.css @@ -0,0 +1,146 @@ +a { color: #000090; text-decoration: none; } +a:hover, a:active, a:focus { color: highlighttext; background-color: highlight; text-decoration: none; } + +body { background: #FFFFFF; } +body, table { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; } + +a img { border: 0px; } + +/* Page layout/boxes */ + +.info-box { } +.info-box-title { margin: 1em 0em 0em 0em; font-weight: normal; font-size: 14pt; color: #999999; border-bottom: 2px solid #999999; } +.info-box-body { border: 1px solid #999999; padding: .5em; } +.nav-bar { font-size: 8pt; white-space: nowrap; text-align: right; padding: .2em; margin: 0em 0em 1em 0em; } + +.oddrow { background-color: #F8F8F8; border: 1px solid #AAAAAA; padding: .5em; margin-bottom: 1em} +.evenrow { border: 1px solid #AAAAAA; padding: .5em; margin-bottom: 1em} + +.page-body { max-width: 800px; margin: auto; } +.tree { white-space: nowrap; font: icon } +.tree dd { margin-left: 19px } +.tree dl { margin: 0px } +.tree-icon { vertical-align: middle; border: 0px; margin-right: 3px } + +/* Index formatting classes */ + +.index-item-body { margin-top: .5em; margin-bottom: .5em} +.index-item-description { margin-top: .25em } +.index-item-details { font-weight: normal; font-style: italic; font-size: 8pt } +.index-letter-section { background-color: #EEEEEE; border: 1px dotted #999999; padding: .5em; margin-bottom: 1em} +.index-letter-title { font-size: 12pt; font-weight: bold } +.index-letter-menu { text-align: center; margin: 1em } +.index-letter { font-size: 12pt } + +/* Docbook classes */ + +.description {} +.short-description { font-weight: bold; color: #666666; } +.tags { padding-left: 0em; margin-left: 3em; color: #666666; list-style-type: square; } +.parameters { padding-left: 0em; margin-left: 3em; color: #014fbe; list-style-type: square; } +.redefinitions { font-size: 8pt; padding-left: 0em; margin-left: 2em; } +.package { font-weight: bold; } +.package-title { font-weight: bold; font-size: 14pt; border-bottom: 1px solid black } +.package-details { font-size: 85%; } +.sub-package { font-weight: bold; } +.tutorial { border-width: thin; border-color: #0066ff; } +.tutorial-nav-box { width: 100%; border: 1px solid #999999; background-color: #F8F8F8; } +.folder-title { font-style: italic; font-family: Verdana, Arial, Helvetica, sans-serif } + +/* Generic formatting */ + +.field { font-weight: bold; } +.detail { font-size: 8pt; } +.notes { font-style: italic; font-size: 8pt; } +.separator { background-color: #999999; height: 2px; } +.warning { color: #FF6600; } +.disabled { font-style: italic; color: #999999; } + +/* Code elements */ + +.line-number { } + +.class-table { width: 100%; } +.class-table-header { border-bottom: 1px dotted #666666; text-align: left} +.class-name { color: #0000AA; font-weight: bold; } + +.method-summary { color: #009000; padding-left: 1em; font-size: 8pt; } +.method-header { } +.method-definition { margin-bottom: .2em } +.method-title { color: #009000; font-weight: bold; } +.method-name { font-weight: bold; } +.method-signature { font-size: 85%; color: #666666; margin: .5em 0em } +.method-result { font-style: italic; } + +.var-summary { padding-left: 1em; font-size: 8pt; } +.var-header { } +.var-title { color: #014fbe; margin-bottom: .3em } +.var-type { font-style: italic; } +.var-name { font-weight: bold; } +.var-default {} +.var-description { font-weight: normal; color: #000000; } + +.include-title { color: #014fbe;} +.include-type { font-style: italic; } +.include-name { font-weight: bold; } + +.const-title { color: #FF6600; } +.const-name { font-weight: bold; } + +/* Syntax highlighting */ + +.src-code { font-family: 'Courier New', Courier, monospace; font-weight: normal; } +.src-line { font-family: 'Courier New', Courier, monospace; font-weight: normal; } + +.src-code a:link { padding: 1px; text-decoration: underline; color: #0000DD; } +.src-code a:visited { text-decoration: underline; color: #0000DD; } +.src-code a:active { background-color: #FFFF66; color: #008000; } +.src-code a:hover { background-color: #FFFF66; text-decoration: overline underline; color: #008000; } + +.src-comm { color: #666666; } +.src-id { color: #FF6600; font-style: italic; } +.src-inc { color: #0000AA; font-weight: bold; } +.src-key { color: #0000AA; font-weight: bold; } +.src-num { color: #CC0000; } +.src-str { color: #CC0000; } +.src-sym { } +.src-var { } + +.src-php { font-weight: bold; } + +.src-doc { color: #666666; } +.src-doc-close-template { color: #666666 } +.src-doc-coretag { color: #008000; } +.src-doc-inlinetag {} +.src-doc-internal {} +.src-doc-tag { color: #0080CC; } +.src-doc-template { color: #666666 } +.src-doc-type { font-style: italic; color: #444444 } +.src-doc-var { color: #444444 } + +.tute-tag { color: #009999 } +.tute-attribute-name { color: #0000FF } +.tute-attribute-value { color: #0099FF } +.tute-entity { font-weight: bold; } +.tute-comment { font-style: italic } +.tute-inline-tag { color: #636311; font-weight: bold } + +/* tutorial */ + +.authors { } +.author { font-style: italic; font-weight: bold } +.author-blurb { margin: .5em 0em .5em 2em; font-size: 85%; font-weight: normal; font-style: normal } +.example { border: 1px dashed #999999; background-color: #EEEEEE; padding: .5em; } +*[class="example"] { line-height : 1.0em; } +.listing { border: 1px dashed #999999; background-color: #EEEEEE; padding: .5em; white-space: nowrap; } +*[class="listing"] { line-height : 1.0em; } +.release-info { font-size: 85%; font-style: italic; margin: 1em 0em } +.ref-title-box { } +.ref-title { } +.ref-purpose { font-style: italic; color: #666666 } +.ref-synopsis { } +.title { font-weight: bold; border-bottom: 1px solid #999999; color: #999999; } +.cmd-synopsis { margin: 1em 0em } +.cmd-title { font-weight: bold } +.toc { margin-left: 2em; padding-left: 0em } + diff --git a/vendor/easybook/geshi/docs/api/packages.html b/vendor/easybook/geshi/docs/api/packages.html new file mode 100644 index 0000000000..d8c4c04a50 --- /dev/null +++ b/vendor/easybook/geshi/docs/api/packages.html @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/easybook/geshi/docs/api/todolist.html b/vendor/easybook/geshi/docs/api/todolist.html new file mode 100644 index 0000000000..95177c15f8 --- /dev/null +++ b/vendor/easybook/geshi/docs/api/todolist.html @@ -0,0 +1,42 @@ + + + + + + Todo List + + + + +

            Todo List

            +

            geshi

            +

            GeSHi::disable_highlighting()

            +
              +
            • Rewrite with array traversal
            • +
            +

            GeSHi::enable_highlighting()

            +
              +
            • Rewrite with array traversal
            • +
            +

            GeSHi::enable_important_blocks()

            +
              +
            • REMOVE THIS SHIZ FROM GESHI!
            • +
            +

            GeSHi::get_language_name_from_extension()

            +
              +
            • Re-think about how this method works (maybe make it private and/or make it a extension->lang lookup?)
            • +
            • static?
            • +
            +

            GeSHi::highlight_lines_extra()

            +
              +
            • Some data replication here that could be cut down on
            • +
            +

            GeSHi::load_from_file()

            +
              +
            • Complete rethink of this and above method
            • +
            +

            + Documentation generated on Thu, 25 Dec 2008 14:34:53 +0100 by phpDocumentor 1.4.2 +

            + + \ No newline at end of file diff --git a/vendor/easybook/geshi/docs/geshi-doc.html b/vendor/easybook/geshi/docs/geshi-doc.html new file mode 100644 index 0000000000..dc5161f483 --- /dev/null +++ b/vendor/easybook/geshi/docs/geshi-doc.html @@ -0,0 +1,4077 @@ + + + + GeSHi Documentation 1.0.8.11 + + + + + + + + +

            GeSHi Documentation

            + +
            + +

            Version 1.0.8.11

            + +

            The GeSHi Logo

            + +
            +
            Authors:
            +
            © 2004 - 2007 Nigel McNie
            + +
            © 2007 - 2012 Benny Baumann
            + +
            © 2008 - 2009 Milian Wolff
            + +
            GeSHi Website:
            +
            http://qbnz.com/highlighter
            +
            + +
            + +

            This is the documentation for GeSHi - Generic Syntax Highlighter.

            + +

            The most modern version of this document is available on the web - +go to http://qbnz.com/highlighter/documentation.php to view it.

            + +

            Any comments, questions, confusing points? Please get in contact with the developers! We +need all the information we can get to make the use of GeSHi and everything related to it (including this documentation) +a breeze.

            + +

            Contents

            + +
            +
            + +

            1 Introduction

            + +

            GeSHi is exactly what the acronym stands for: a Generic Syntax Highlighter. As long +as you have a language file for almost any computer language - whether it be a +scripting language, object orientated, markup or anything in between - GeSHi can +highlight it! GeSHi is extremely customisable - the same source can be highlighted +multiple times in multiple ways - the same source even with a different language. +GeSHi outputs XHTML strict compliant code1, and can +make use of CSS to save on the amount of output. And what is the cost for all of this? You need +PHP. That’s all!

            + +

            1.1 Features

            + +

            Here are some of the standout features of GeSHi:

            + +
            +
            Programmed in PHP:
            +
            GeSHi is coded entirely in PHP. This means that where ever you have PHP, you +can have GeSHi! Almost any free webhost supports PHP, and GeSHi works fine with PHP > 4.3.02.
            + +
            Support for many languages:
            +
            GeSHi comes with more than 100 languages, including PHP, HTML, CSS, Java, C, Lisp, XML, Perl, Python, +ASM and many more!
            + +
            XHTML compliant output:
            +
            GeSHi produces XHTML compliant output, using stylesheets, so you need not worry about +GeSHi ruining your claims to perfection in the standards department ;)
            + +
            Highly customisable:
            +
            GeSHi allows you to change the style of the output on the fly, use CSS classes or not, use an external +stylesheet or not, use line numbering, change the case of output keywords… the list goes on and on!
            + +
            Flexible:
            +
            Unfortunately, GeSHi is quite load/time intensive for large blocks of code. However, you want speed? +Turn off any features you don’t like, pre-make a stylesheet and use CSS classes to reduce the amount of output and more - +it’s easy to strike a balance that suits you.
            +
            + +

            This is just a taste of what you get with GeSHi - the best syntax highlighter for the web in the world!

            + +

            1.2 About GeSHi

            + +

            GeSHi started as a mod for the phpBB forum system, to enable highlighting of more +languages than the available (which can be roughly estimated to exactly 0 ;)). However, it quickly spawned into an +entire project on its own. But now it has been released, work continues on a mod +for phpBB3 - and hopefully for many forum systems, blogs and other web-based systems.

            + +

            Several systems are using GeSHi now, including:

            + +
              +
            • Dokuwiki - An advanced wiki engine
            • +
            • gtk.php.net - Their manual uses GeSHi for syntax highlighting
            • +
            • WordPress - A powerful blogging system4
            • +
            • PHP-Fusion - A constantly evolving CMS
            • +
            • SQL Manager - A Postgres DBAL
            • +
            • Mambo - A popular open source CMS
            • +
            • MediaWiki - A leader in Wikis[^plugin-only]
            • +
            • TikiWiki - A megapowerful Wiki/CMS
            • +
            • TikiPro - Another powerful Wiki based on TikiWiki
            • +
            • WikkaWiki - A flexible and lightweight Wiki engine
            • +
            • RWeb - A site-building tool
            • +
            + +

            GeSHi is the original work of Nigel McNie. The project was later handed over to Benny Baumann. +Others have helped with aspects of GeSHi also, they’re mentioned in the THANKS file.

            + +

            1.3 Credits

            + +

            Many people have helped out with GeSHi, whether by creating language files, submitting bug +reports, suggesting new ideas or simply pointing out a new idea or something I’d missed. All +of these people have helped to build a better GeSHi, you can see them in the THANKS +file.

            + +

            Do you want your name on this list? Why not make a language file, or submit a valid bug? Or perhaps help me with an +added feature I can’t get my head around, or suggest a new feature, or even port +GeSHi to anothe language? There’s lots you can do to help out, and I need it all :)

            + +

            1.4 Feedback

            + +

            I need your feedback! ANYthing you have to say is fine, whether it be a query, +congratulations, a bug report or complaint, I don’t care! I want to make this software +the best it can be, and I need your help! You can contact me in the following ways:

            + + + +

            Remember, any help I am grateful for :)

            + +

            2 The Basics

            + +

            In this section, you’ll learn a bit about GeSHi, how it works and what it uses, how to install it and how to use +it to perform basic highlighting.

            + +

            2.1 Getting GeSHi work

            + +

            If you’re reading this and don’t have GeSHi, that’s a problem ;). So, how do you get your hands on it?

            + +

            2.1.1 Requirements

            + +

            GeSHi requires the following to be installable:

            + +
              +
            • PHP. It’s untested with anything other below 4.4.X. I hope to extend this range soon. I see no reason why +it won’t work with any version of PHP above 4.3.0.
            • +
            • Approximately 2 megabytes of space. The actual script is small - around 150K - but most of the size comes +from the large number of language files (over 100!). If you’re pushed for space, make sure you don’t upload to +your server the docs/ or contrib/ directory, and you may want to leave out any language files that don’t +take your fancy either.
            • +
            + +

            As you can see, the requirements are very small. If GeSHi does NOT work for you in a particular version of PHP, let +me know why and I’ll fix it.

            + +

            2.1.2 Downloading GeSHi

            + +

            There are several ways to get a copy of GeSHi. The first and easiest way of all is +visiting http://qbnz.com/highlighter/downloads.php to obtain the latest version. +This is suitable especially when you plan on using GeSHi on an production website +or otherwise need a stable copy for flawless operation.

            + +

            If you are somewhat more sophisticated or need a feature just recently implemented +you might consider getting GeSHi by downloading via SVN. There are multiple ways +for doing so and each one has its own advantages and disadvantages. Let’s cover +the various locations in the SVN you might download from:

            + +
              +
            • https://geshi.svn.sourceforge.net/svnroot/geshi/tags/:
              +This directory holds all previous releases of GeSHi each as a subdirectory. By downloading from here you can test your code with various old versions +in case something has been broken recently.
            • +
            • https://geshi.svn.sourceforge.net/svnroot/geshi/branches/RELEASE_1_0_X_STABLE/geshi-1.0.X/src/:
              +This directory is the right place for you if you want to have reasonably current versions of GeSHi but need something that is stable. This directory +is updated once in a while between updates whenever there’s something new but which is already reasonably stable. This branch is used to form the +actual release once the work is done.
            • +
            • https://geshi.svn.sourceforge.net/svnroot/geshi/trunk/geshi-1.0.X/src/:
              +This directory is the working directory where every new feature, patch or improvement is committed to. This directory is updated regularly, but is not +guaranteed to be tested and stable at all times. With this version you’ll always get the latest version of GeSHi out there, but beware of bugs! There +will be loads of them here! So this is absolutely not recommended for productive use!
            • +
            + +

            If you have choosen the right SVN directory for you do a quick +svn co $SVNPATH geshi where $SVNPATH is one of the above paths and your desired version of GeSHi will be +downloaded into an subdirectory called “geshi”. If you got a version of GeSHi +you can go on installing as shown below.

            + +

            2.1.3 Extracting GeSHi

            + +

            Packages come in .zip, .tar.gz and .tar.bz2 format, so there’s no complaining about whether it’s available for +you. *nix users probably want .tar.gz or .tar.bz2 and windows users probably want .zip. +And those lucky to download it directly from SVN don’t even need to bother extracting GeSHi.

            + +

            To extract GeSHi in Linux (.tar.gz):

            + +
              +
            1. Open a shell
            2. +
            3. cd to the directory where the archive lies
            4. +
            5. Type tar -xzvf [filename] where [filename] is the name of the archive (typically GeSHi-1.X.X.tar.gz)
            6. +
            7. GeSHi will be extracted to its own directory
            8. +
            + +

            To extract GeSHi in Windows (.zip):

            + +
              +
            1. Open Explorer
            2. +
            3. Navigate to the directory where the archive lies
            4. +
            5. Extract the archive. The method you use will depend on your configuration. Some people can right-click upon +the archive and select “Extract” from there, others may have to drag the archive and drop it upon an extraction program.
            6. +
            + +

            To extract from .zip you’ll need an unzipping program - unzip in Linux, or 7-Zip, WinZip, WinRAR or similar for Windows.

            + +

            2.1.4 Installing GeSHi

            + +

            Installing GeSHi is a snap, even for those most new to PHP. There’s no tricks involved. Honest!

            + +

            GeSHi is nothing more than a PHP class with related language support files. Those of you familiar with PHP can then +guess how easy the installation will be: simply copy it into your include path somewhere. You can put it wherever you +like in this include path. I recommend that you put the language files in a subdirectory of your include path too - +perhaps the same subdirectory that geshi.php is in. Remember this path for later.

            + +

            If you don’t know what an include path is, don’t worry. Simply copy GeSHi to your webserver. So for example, say your +site is at http://mysite.com/myfolder, you can copy GeSHi to your site so the directory structure is like this:

            + +
            http://mysite.com/myfolder/geshi/[language files]
            +http://mysite.com/myfolder/geshi.php
            +
            + +

            Or you can put it in any subdirectory you like:

            + +
            http://mysite.com/myfolder/includes/geshi/[language files]
            +http://mysite.com/myfolder/includes/geshi.php
            +
            + +
            + +
            Caution:
            + +

            When using GeSHi on a live site, the only directory required is the geshi/ subdirectory. Both contrib/ and docs/ are +worthless, and furthermore, as some people discovered, one of the files in contrib had a security hole (fixed as of 1.0.7.3). +I suggest you delete these directories from any live site they are on.

            + +
            + +

            2.2 Basic Usage

            + +

            Use of GeSHi is very easy. Here’s a simple example:

            + +
            PHP code
            1
            +23
            +45
            +67
            +89
            +1011
            +1213
            +1415
            +1617
            +1819
            +2021
            +2223
            +2425
            +2627
            +28
            //
            +// Include the GeSHi library//
            +include_once 'geshi.php'; 
            +//// Define some source to highlight, a language to use
            +// and the path to the language files//
            + $source = '$foo = 45;
            +for ( $i = 1; $i < $foo; $i++ ){
            +  echo "$foo\n";  --$foo;
            +}';$language = 'php';
            + //
            +// Create a GeSHi object//
            + $geshi = new GeSHi($source, $language);
            + //
            +// And echo the result!//
            +echo $geshi->parse_code();
            + +

            As you can see, there’s only three really important lines:

            + +

            include_once('geshi.php')

            + +

            This line includes the GeSHi class for use

            + +

            $geshi = new GeSHi($source, $language);

            + +

            This line creates a new GeSHi object, holding the source and the language you want to use for highlighting.

            + +

            echo $geshi->parse_code();

            + +

            This line spits out the result :)

            + +

            So as you can see, simple usage of GeSHi is really easy. Just create a new GeSHi object and get the code!

            + +

            Since version 1.0.2, there is a function included with GeSHi called geshi_highlight. This behaves exactly as the php +function highlight_string() behaves - all you do is pass it the language you want to use to highlight and the +path to the language files as well as the source. Here are some examples:

            + +
            PHP code
            1
            +23
            +45
            +67
            +89
            +1011
            +1213
            +1415
            +1617
            +1819
            +2021
            +
            // Simply echo the highlighted code
            +geshi_highlight($source, 'php', $path); 
            +// Get the code back, for use later$code = geshi_highlight($source, 'java', $path, true);
            + // Check if there is an error with parsing this code
            + ob_start();
            +$result = geshi_highlight($source, 'perl', $path);$code = ob_get_contents();
            + ob_end_clean();
            +if ( !$result ){
            +    // There was an error with highlighting...}
            +else{
            +    // All OK :)}
            + +

            However, these are really simple examples and doesn’t even begin to cover all the advanced features of GeSHi. +If you want to learn more, continue on to section 3: Advanced Features.

            + +

            3 Advanced Features

            + +

            This section documents the advanced features of GeSHi - strict mode, using CSS classes, changing styles on the fly, +disabling highlighting of some things and more.

            + +

            In this section there are many code snippets. For all of these, you should assume that the GeSHi library has been +included, and a GeSHi object has been created and is referenced by the variable $geshi. Normally, the +source, language and path used are arbitary.

            + +

            3.1 The Code Container

            + +

            The Code Container has a fundamental effect on the layout of your code before you even begin to style. What is the +Code Container? It’s the bit of markup that goes around your code to contain it. By default your code is surrounded +by a <pre>, but you can also specify a <div>.

            + +

            The <pre> header is the default. If you’re familiar with HTML you’ll know that whitespace is rendered +“as is” by a <pre> element. The advantage for you is that if you use <pre> the whitespace +you use will appear pretty much exactly how it is in the source, and what’s more GeSHi won’t have to add a whole +lot of <br />’s and non-breaking spaces (&nbsp;) to your code to indent it. This saves +you source code (and your valuable visitors waiting time and your bandwidth).

            + +

            But if you don’t like <pre> or it looks stupid in your browser no matter what styles you try to +apply to it or something similar, you might want to use a <div> instead. A <div> will +result in more source - GeSHi will have to insert whitespace markup - but in return you can wrap long lines of code +that would otherwise have your browser’s horizontal scrollbar appear. Of course with <div> you can +not wrap lines if you please. The highlighter demo at the GeSHi home page uses the <div> +approach for this reason.

            + +

            At this stage there isn’t an option to wrap the code in <code> tags (unless you use the function +geshi_highlight), partly because of the inconsistent and unexpected ways stuff in <code> tags is +highlighted. Besides, <code> is an inline element. But this may become an option in future versions.

            + +

            As of GeSHi 1.0.7.2 there is a new header type, that specifies that the code should not be wrapped in anything at all.

            + +

            Another requested addition has been made in GeSHi 1.0.7.20 to force GeSHi to create a block around the highlighted +source even if this wasn’t necessary, thus styles that are applied to the output of GeSHi can directly influence +the code only even if headers and footers are present.

            + +

            To change/set the header to use, you call the set_header_type() method. It has one required argument which +defines the container type. Available are:

            + +
            +
            $geshi->set_header_type(GESHI_HEADER_DIV);
            +
            +

            Puts a <div> around both, code and linenumbers. Whitespace is converted to &nbsp; +sequences (i.e. one whitespace and the html entity of a non-breaking whitespace) to keep your indendation level +in tact. Tabs are converted as well and you can manually define the tab-width. Lines are automatically wrapped. +Linenumbers are created using an ordered list.

            +
            + +
            $geshi->set_header_type(GESHI_HEADER_PRE);
            +
            +

            Wraps code and linenumbers in a <pre> container. This way whitespace is kept as-is and thus +this header produces less overhead then the GESHI_HEADER_DIV header type. Since linenumbers are still +created using an ordered list this header type produces invalid HTML.

            +
            + +
            $geshi->set_header_type(GESHI_HEADER_PRE_VALID);
            +
            Available since 1.0.8
            + +
            +

            When linenumbers are disabled, this behaves just like GESHI_HEADER_PRE. In the other case though, a +<div> is used to wrap the code and linenumbers and the <pre> is put inside the list +items (<li>). This means slightly larger HTML output compared to GESHI_HEADER_PRE, but the +output is valid HTML.

            +
            + +
            $geshi->set_header_type(GESHI_HEADER_PRE_TABLE);
            +
            Available since 1.0.8
            + +
            +

            Once again a <div> tag wraps the output. This time though no ordered list is used to create an ordered list, +but instead we use a table with two cells in a single row. The left cell contains a <pre> tag which holds all +linenumbers. The second cell holds the highlighted code, also wrapped in a <pre> tag, just like with +GESHI_HEADER_PRE.

            +
            + +
            +

            This produces valid HTML and works around the nasty selection behaviour of Firefox and other Gecko based +browsers, see SF#1651996 for more information.

            +
            + +
            $geshi->set_header_type(GESHI_HEADER_NONE);
            +
            Available since 1.0.7.2
            + +
            +

            No wrapper is added.

            +
            +
            + +

            Those are the only arguments you should pass to set_header_type. Passing anything else may cause inconsistencies +in what is used as the Code Container (although it should simply use a <pre>). Better not to risk it.

            + +
            + +
            Note:
            + +

            GESHI_HEADER_DIV, GESHI_HEADER_PRE, etc. are constants, so don’t put them in strings!

            + +
            + +
            + +
            Caution:
            + +

            The default styles for the <pre> and <div> will be different, especially if you use + line numbers!

            + +

            I have found that a <pre> results in code that is smaller than for that of a <div>, you + should rectify this difference by using set_overall_style() if you need to. But be aware of this + difference for if you are changing the header type!

            + +
            + +

            3.2 Line Numbers

            + +

            GeSHi has the ability to add line numbers to your code (see the demo available at http://qbnz.com/highlighter/demo.php +to see what can be achieved). Line numbers are a great way to make your code look professional, especially if you use the +fancy line numbers feature.

            + +

            There are multiple methods for highlighting line numbers, but none of them is perfect. Of the various ways to highlight +line numbers GeSHi itself implements 2 different approaches, but allows you +by the way it generates the code to do the line numbers yourself if necessary - but more on this case later.

            + +

            The easiest approach is using the <ol>-tag for generating the line numbers, but +even though this is the easiest one there’s a big drawback with this one when +using Gecko-engine based browsers like Firefox or Konqueror. In these browsers +this approach will select the line numbers along with the code or will include extra markup in the selection.

            + +

            The other approach has been implemented in the 1.0.8 release of GeSHi with the GESHI_HEADER_PRE_TABLE header type. +When using this header type the line numbers are rendered apart from the source +in a table cell while the actual source is formatted as if the GESHI_HEADER_PRE header had been used. +This approach works with Firefox and other Gecko-based browsers so far although extreme care +has to be taken when applying styles to your source as Windows has some fonts +where bold font is of different height than normal or italic text of the same fontface.

            + +

            3.2.1 Enabling Line Numbers

            + +

            To highlight a source with line numbers, you call the enable_line_numbers() method:

            + +

            $geshi->enable_line_numbers($flag); +Where $flag is one of the following:

            + +
              +
            • GESHI_NORMAL_LINE_NUMBERS - Use normal line numbering
            • +
            • GESHI_FANCY_LINE_NUMBERS - Use fancy line numbering
            • +
            • GESHI_NO_LINE_NUMBERS - Disable line numbers (default)
            • +
            + +

            Normal line numbers means you specify a style for them, and that style gets applied to all of them. Fancy line numbers +means that you can specify a different style for each nth line number. You change the value of n (default 5):

            + +

            $geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS, 37);

            + +

            The second parameter is not used in any other mode. Setting it to 0 is the same as simply using normal line numbers. +Setting it to 1 applies the fancy style to every line number.

            + +
            + +
            Note:
            + +

            The values above are CONSTANTS - so don’t put them in strings!

            + +
            + +

            3.2.2 Styling Line Numbers

            + +

            As of GeSHi 1.0.2, line numbers are added by the use of ordered lists. This solves the old issues of line number +styles inheriting from styles meant for the code. Also, this solves an important issue about selecting code. For +example, line numbers look nice, but when you go to select the code in your browser to copy it? You got the line +numbers too! Not such a good thing, but thankfully this issue is now solved. What is the price? Unfortunately the +whole way that styles are inherited/used has changed for those of you who were familiar with 1.0.1, and there is +quite a bit more HTML involved. So think carefully about these things before you enable line numbers.

            + +

            Now, onto how to style line numbers:

            + +

            Styles are set for line numbers using the set_line_style() method:

            + +

            $geshi->set_line_style('background: #fcfcfc;');

            + +

            If you’re using Fancy Line Numbers mode, you pass a second string for the style of the nth line number:

            + +

            $geshi->set_line_style('background: #fcfcfc;', 'background: #f0f0f0;');

            + +

            The second style will have no effect if you’re not using Fancy Line Numbers mode.

            + +

            By default, the styles you pass overwrite the current styles. Add a boolean “true” after the styles you specify to combine them with the current styles:

            + +
            PHP code
            1
            +23
            +4
            $geshi->set_line_style('background: red;', true);
            + // or, for fancy line numbers
            +$geshi->set_line_style('background: red;', 'background: blue;', true);
            + +
            + +
            Note:
            + +

            Due to a bug with Firefox the issue that should have been fixed with 1.0.2 has reappeared in another form as Firefox + includes extra text\markup into plaintext versions of webpage copies. This can sometimes be useful (actually it’s + used to get the plaintext version of this documentation), but more often is quite annoying. Best practice so far is + to either not use line numbers, or offer the visitor of your page a plaintext version of your source. To learn more + have a look at the SF.net BugTracker Issue #1651996. This will hopefully be fixed in GeSHi version 1.2 + or as soon as Firefox provides webdevelopers with adequate ways to control this feature - whichever comes first!

            + +
            + +
            + +
            Caution:
            + +

            When you set line number styles, the code will inherit those styles! This is the main issue to come out of the 1.0.2 + release. If you want your code to be styled in a predictable manner, you’ll have to call the set_code_style() + method to rectify this problem.

            + +

            Note also that you cannot apply background colours to line numbers unless you use set_overall_style(). + Here’s how you’d style:

            + +
              +
            1. Use set_overall_style() to style the overall code block. For example, you can set the border +style/colour, any margins and padding etc. using this method. In addition: set the background colour for +all the line numbers using this method.

            2. +
            3. Use set_line_style() to style the foreground of the line numbers. For example, you can set the colour, +weight, font, padding etc. of the line numbers using this method.

            4. +
            5. Use set_code_style() to explicitly override the styles you set for line numbers using +set_line_style. For example, if you’d set the line numbers to be bold (or even if you’d only set +the fancy line number style to be bold), and you didn’t actually want your code to be bold, you’d make sure +that font-weight: normal; was in the stylesheet rule you passed to set_code_style().

              + +

              This is the one major change from GeSHi 1.0.1 - make sure you become familiar with this, and make sure that you check +any code you have already styled with 1.0.1 when you upgrade to make sure nothing bad happens to it.

            6. +
            + +
            + +

            3.2.3 Choosing a Start Number

            + +

            As of GeSHi 1.0.2, you can now make the line numbers start at any number, rather than just 1. This feature is useful +if you’re highlighting code from a file from around a certain line number in that file, as an additional guide to +those who will view the code. You set the line numbers by calling the start_line_numbers_at() method:

            + +

            $geshi->start_line_numbers_at($number);

            + +

            $number must be a positive integer (or zero). If it is not, GeSHi will convert it anyway.

            + +

            If you have not enabled line numbers, this will have no effect.

            + +
            + +
            Caution:
            + +

            Although I’d like GeSHi to have XHTML strict compliance, this feature will break compliancy (however transitional + compliancy remains). This is because the only widely supported way to change the start value for line numbers is + by using the start=”number” attribute of the <ol> tag. Although CSS does provide a mechanism for + doing this, it is only supported in Opera versions 7.5 and above (not even Firefox supports this).

            + +
            + +

            3.3 Using CSS Classes

            + +

            Using CSS to highlight your code instead of in-lining the styles is a definate bonus. Not only is it more compliant +(the w3c is deprecating the style attribute in XHTML 2.0) but it results in far less outputted code - up to a whopping +90% saving - which makes a *huge* difference to those unlucky of us on modems!

            + +

            3.3.1 Enabling CSS Classes

            + +

            By default, GeSHi doesn’t use the classes, so it’s easy just to whack out some highlighted code if you need without +worrying about stylesheets. However, if you’re a bit more organised about it, you should use the classes ;). To turn +the use of classes on, you call the enable_classes() method:

            + +

            $geshi->enable_classes();

            + +

            If you want to turn classes OFF for some reason later:

            + +

            $geshi->enable_classes(false);

            + +

            If classes are enabled when parse_code() is called, then the resultant source will use CSS classes in the +output, otherwise it will in-line the styles. The advantages of using classes are great - the reduction in source will +be very noticeable, and what’s more you can use one stylesheet for several different highlights on the same page. In +fact, you can even use an external stylesheet and link to that, saving even more time and source (because stylesheets +are cached by browsers).

            + +
            + +
            Note:
            + +

            There have been problems with inline styles and the Symbol Highlighting added in 1.0.7.21. If you can you should + therefore turn CSS classes ON to avoid those issues. Although latest reworks in 1.0.8 should fix most of those issues.

            + +
            + +
            + +
            Caution:
            + +

            This should be the very first method you call after creating a new GeSHi object! That way, various other methods + can act upon your choice to use classes correctly. In theory, you could call this method just before parsing the + code, but this may result in unexpected behaviour.

            + +
            + +

            3.3.2 Setting the CSS class and ID

            + +

            You can set an overall CSS class and id for the code. This is a good feature that allows you to use the same +stylesheet for many different snippets of code. You call set_overall_class() and set_overall_id +to accomplish this:

            + +
            PHP code
            1
            +2
            $geshi->set_overall_class('mycode');
            +$geshi->set_overall_id('dk48ck');
            + +

            The default classname is the name of the language being used. This means you can use just the one stylesheet for all +sources that use the same language, and incidentally means that you probably won’t have to call these methods too often.

            + +

            CSS IDs are supposed to be unique, and you should use them as such. Basically, you can specify an ID for your code +and then use that ID to highlight that code in a unique way. You’d do this for a block of code that you expressly +wanted to be highlighted in a different way (see the section below on gettting the stylesheet for your code for an example).

            + +
            + +
            Note:
            + +

            As of GeSHi 1.0.8 the class name will always include the language name used for highlighting.

            + +
            + +

            3.3.3 Getting the stylesheet for your code

            + +

            The other half of using CSS classes is getting the stylesheet for use with the classes. GeSHi makes it very easy to +get a stylesheet for your code, with one easy method call:

            + +
            PHP code
            1
            +23
            +45
            +67
            +89
            +1011
            +1213
            +1415
            +1617
            +
            $geshi->enable_classes();
            + // Here we have code that will spit out a header for
            +// a stylesheet. For example: 
            +echo '<html><head><title>Code</title>
            +<style type="text/css"><!--';
            +// Echo out the stylesheet for this code blockecho $geshi->get_stylesheet();
            + // And continue echoing the page
            + echo '-->
            +</style></head><body>';
            + +

            The get_stylesheet() method gets the stylesheet for your code in one easy call. All you need to do +is output it in the correct place. As you can also see, you don’t even have to enable class usage to get the +stylesheet nessecary either - however not enabling classes but using the stylesheet may result in problems later.

            + +

            By default, get_stylesheet() tries to echo the least amount of code possible. Although currently it doesn’t +check to see if a certain lexic is even in the source, you can expect this feature in the future. At least for the +present however, if you explicitly disable the highlighting of a certain lexic, or disable line numbers, the related +CSS will not be outputted. This may be a bad thing for you perhaps you’re going to use the stylesheet for many blocks +of code, some with line numbers, others with some lexic enabled where this source has it disabled. Or perhaps you’re +building an external stylesheet and want all lexics included. So to get around this problem, you do this:

            + +

            $geshi->get_stylesheet(false);

            + +

            This turns economy mode off, and all of the stylesheet will be outputted regardless.

            + +

            Now lets say you have several snippets of code, using the same language. In most of them you don’t mind if they’re +highlighted the same way (in fact, that’s exactly what you want) but in one of them you’d like the source to be +highlighted differently. Here’s how you can do that:

            + +
            PHP code
            1
            +23
            +45
            +67
            +89
            +1011
            +1213
            +1415
            +1617
            +1819
            +2021
            +2223
            +2425
            +2627
            +2829
            +3031
            +3233
            +3435
            +3637
            +3839
            +4041
            +4243
            +4445
            +4647
            +48
            // assume path is the default "geshi/" relative to the current directory
            + $geshi1 = new GeSHi($source1, $lang);
            +$geshi2 = new GeSHi($source2, $lang); 
            +$geshi3 = new GeSHi($source3, $lang); 
            +// Turn classes on for all sources$geshi1->enable_classes();
            + $geshi2->enable_classes();
            +$geshi3->enable_classes(); 
            +// Make $geshi3 unique$geshi3->set_overall_id('different');
            +  
            +//// Methods are called on $geshi3 to change styles...
            +// 
            +echo '<html><head><title>Code</title>
            + <style type="text/css">
            +<!--';
            + // Get the nessecary stylesheets
            +echo $geshi1->get_stylesheet(); 
            +echo $geshi3->get_stylesheet(); 
            +echo '--></style></head>
            +<body>'; 
            + echo 'Code snippet 1:';
            +echo $geshi1->parse_code();echo 'Code snippet 2 (same highlighting as 1):';
            + echo $geshi2->parse_code();
            +echo 'Code snippet 3 (DIFFERENT highlighting):';echo $geshi3->parse_code();
            +  
            +echo '</body></html>';
            + +

            Before version 1.0.2, you needed to set the class of the code you wanted to be unique to the empty string. This +limitation has been removed in version 1.0.2 - if you set the ID of a block of code, all styling will be done based +on that ID alone.

            + +

            3.3.4 Using an External Stylesheet

            + +

            An external stylesheet can reduce even more the amount of code needed to highlight some source. However there are some +drawbacks with this. To use an external stylesheet, it’s up to you to link it in to your document, normally with +the following HTML:

            + +
            HTML code
            1
            +23
            +
            <html>
            +<head><link rel="stylesheet" type="text/css" href="url_to_stylesheet.css" />
            + +

            In your external stylesheet you put CSS declarations for your code. Then just make sure you’re using the correct class (use +set_overall_class() to ensure this) and this should work fine.

            + +

            This method is great if you don’t mind the source always being highlighted the same (in particular, if you’re making a +plugin for a forum/wiki/other system, using an external stylesheet is a good idea!). It saves a small amount of code and +your bandwidth, and it’s relatively easy to just change the stylesheet should you need to. However, using this will render +the methods that change the styles of the code useless, because of course the stylesheet is no longer being dynamically +generated. You can still disable highlighting of certain lexics dynamically, however.

            + +
            + +
            Note:
            + +

            As of version 1.0.2, GeSHi comes with a contrib/ directory, which in it contains a “wizard” script for creating + a stylesheet. Although this script is by no means a complete solution, it will create the necessary rules for the + basic lexics - comments, strings for example. Things not included in the wizard include regular expressions for any + language that uses them (PHP and XML are two languages that use them), and keyword-link styles. However, this script + should take some of the tedium out of the job of making an external stylesheet. Expect a much better version of this + script in version 1.2!

            + +
            + +

            3.4 Changing Styles

            + +

            One of the more powerful features of GeSHi is the ability to change the style of the output dynamically. Why be chained +to the boring styles the language authors make up? You can change almost every single aspect of highlighted code - and +can even say whether something is to be highlighted at all.

            + +

            If you’re confused about “styles”, you probably want to have a quick tutorial in them so you know what you can do with +them. Checkout the homepage of CSS at http://www.w3.org/Style/CSS.

            + +

            3.4.1 The Overall Styles

            + +

            The code outputted by GeSHi is either in a <div> or a <pre> (see the section entitled “The +Code Container”), and this can be styled.

            + +

            $geshi->set_overall_style('... styles ...'); +Where styles is a string containing valid CSS declarations. By default, these styles overwrite the current styles, but you can change this by adding a second parameter:

            + +

            $geshi->set_overall_style('color: blue;', true); +The default styles “shine through” wherever anything isn’t highlighted. Also, you can apply more advanced styles, like position: (fixed|relative) etc, because a <div>/<pre> is a block level element.

            + +
            + +
            Note:
            + +

            Remember that a <div> will by default have a larger font size than a <pre>, as discussed in the section “The Code Container”.

            + +
            + +

            3.4.2 Line Number Styles

            + +

            You may wish to refer to the section [Styling Line Numbers][1] before reading this section.

            + +

            As of version 1.0.2, the way line numbers are generated is different, so therefore the way that they are styled is +different. In particular, now you cannot set the background style of the fancy line numbers to be different from that +of the normal line numbers.

            + +

            Line number styles are set by using the method set_line_style:

            + +

            $geshi->set_line_style($style1, $style2);

            + +

            $style1 is the style of the line numbers by default, and $style2 is the style of the fancy line numbers.

            + +
            + +
            Caution:
            + +

            Things have changed since 1.0.1! This note is very important - please make sure you check this twice before + complaining about line numbers!

            + +

            Because of the way that ordered lists are done in HTML, there really isn’t normally a way to style the actual + numbers in the list. I’ve cheated somewhat with GeSHi - I’ve made it possible to use CSS to style the foreground of + the line numbers. So therefore, you can change the color, font size and type, and padding on them. If you want to + have a pretty background, you must use set_overall_style() to do this, and use set_code_style() + to style the actual code! This is explained in the section above: Styling Line Numbers.

            + +

            In addition, the styles for fancy line numbers is now the difference between the normal styles and the styles you want + to achieve. For example, in GeSHi prior to 1.0.2 you may have done this to style line numbers:

            + +

            $geshi->set_line_style('color: red; font-weight: bold;', 'color: green; font-weight: bold');

            + +

            Now you instead can do this:

            + +

            $geshi->set_line_style('color: red; font-weight: bold;', 'color: green;');

            + +

            The font-weight: bold; will automatically carry through to the fancy styles. This is actually a small + saving in code - but the difference may be confusing for anyone using 1.0.1 at first.

            + +
            + +

            3.4.3 Setting Keyword Styles

            + +

            Perhaps the most regular change you will make will be to the styles of a keyword set. In order to change the styles for +a particular set, you’ll have to know what the set is called first. Sets are numbered from 1 up. Typically, set 1 +contains keywords like if, while, do, for, switch etc, set 2 contains null, false, true etc, set 3 +contains function inbuilt into the language (echo, htmlspecialchars etc. in PHP) and set 4 contains data types and +similar variable modifiers: int, double, real, static etc. However these things are not fixed, and you should +check the language file to see what key you want. Having a familiarity with a language file is definately a plus for +using it.

            + +

            To change the styles for a keyword set, call the set_keyword_group_style() method:

            + +

            $geshi->set_keyword_group_style($group, $styles);

            + +

            Where $group is the group to change the styles for and $styles is a string containing the styles +to apply to that group.

            + +

            By default, the styles you pass overwrite the current styles. Add a boolean true after the styles you specify to +combine them with the current styles:

            + +

            $geshi->set_keyword_group_style(3, 'color: white;', true);

            + +

            3.4.4 Setting Comment Styles

            + +

            To change the styles for a comment group, call the set_comments_style() method:

            + +

            $geshi->set_comments_style($group, $styles);

            + +

            Where $group is either a number corresponding to a single-line comment, or the string 'MULTI' to +specify multiline comments:

            + +
            PHP code
            1
            +2
            $geshi->set_comments_style(1, 'font-style: italic;');
            +$geshi->set_comments_style('MULTI', 'display: hidden;');
            + +

            By default, the styles you pass overwrite the current styles. Add a boolean true after the styles you specify to +combine them with the current styles:

            + +

            $geshi->set_comments_style(1, 'font-weight: 100;', true);

            + +
            + +
            Note:
            + +

            In 1.0.7.22 a new kind of Comments called “COMMENT_REGEXP” has been added. Those are handled by setting single + line comment styles.

            + +
            + +

            3.4.5 Setting Other Styles

            + +

            GeSHi can highlight many other aspects of your source other than just keywords and comments. Strings, Numbers, Methods +and Brackets among other things can all also be highlighted. Here are the related methods:

            + +
            PHP code
            1
            +23
            +45
            +67
            +
            $geshi->set_escape_characters_style($styles[, $preserve_defaults]);
            +$geshi->set_symbols_style($styles[, $preserve_defaults]); 
            +$geshi->set_strings_style($styles[, $preserve_defaults]);$geshi->set_numbers_style($styles[, $preserve_defaults]);
            +$geshi->set_methods_style($key, $styles[, $preserve_defaults]);$geshi->set_regexps_style($key, $styles[, $preserve_defaults]);
            + +

            $styles is a string containing valid stylesheet declarations, while $preserve_defaults should be set +to true if you want your styles to be merged with the previous styles. In the case of set_methods_style(), +you should select a group to set the styles of, check the language files for the number used for each “object splitter”.

            + +

            Like this was possible for set_method_style a new parameter has been introduced for +set_symbols_style too which allows you to select the group of symbols for which you’d like to change your +style. $geshi->set_symbols_style($styles[, $preserve_defaults[, $group]]); If the third parameter is not +given, group 0 is assumed. Furthermore you should note that any changes to group 0 are also reflected in the bracket +style, i.e. a pass-through call to set_bracket_style is made.

            + +
            + +
            Note:
            + +

            Since GeSHi 1.0.8 multiple styles for strings and numbers are supported, though the API doesn’t provide full access yet.

            + +
            + +

            3.5 Case Sensitivity and Auto Casing

            + +

            Controlling the case of the outputted source is an easy job with GeSHi. You can control which keywords are converted in +case, and also control whether keywords are checked in a case sensitive manner.

            + +

            3.5.1 Auto-Caps/NoCaps

            + +

            Auto-Caps/NoCaps is a nifty little feature that capitalises or lowercases automatically certain lexics when they are +styled. I dabble in QuickBASIC, a dialect of BASIC which is well known for it’s capatalisation, and SQL is another +language well known for using caps for readability.

            + +

            To change what case lexics are rendered in, you call the set_case_keywords() method:

            + +

            $geshi->set_case_keywords($caps_modifier);

            + +

            The valid values to pass to this method are:

            + +
              +
            • GESHI_CAPS_NO_CHANGE - Don’t change the case of any lexics, leave as they are found
            • +
            • GESHI_CAPS_UPPER - Uppercase all lexics found
            • +
            • GESHI_CAPS_LOWER - Lowercase all lexics found
            • +
            + +
            + +
            Caution:
            + +

            When I say “lexic”, I mean “keywords”. Any keyword in any keyword array will be modified using this option! + This is one small area of inflexibility I hope to fix in 1.2.X.

            + +
            + +

            I suspect this will only be used to specify GESHI_CAPS_NO_CHANGE to turn off autocaps for languages like SQL +and BASIC variants, like so:

            + +
            PHP code
            1
            +2
            $geshi = new GeSHi($source, 'sql');
            +$geshi->set_case_keywords(GESHI_CAPS_NO_CHANGE); // don't want keywords capatalised
            + +

            All the same, it can be used for some interesting effects:

            + +
            PHP code
            1
            +23
            +4
            $geshi = new GeSHi($source, 'java');
            +// Anyone who's used java knows how picky it is about CapitalLetters...$geshi->set_case_keywords(GESHI_CAPS_LOWER);
            +// No *way* the source will look right now ;)
            + +

            3.5.2 Setting Case Sensitivity

            + +

            Some languages, like PHP, don’t mind what case function names and keywords are in, while others, like Java, depend on +such pickiness to maintain their bad reputations ;). In any event, you can use the set_case_sensitivity() +to change the case sensitiveness of a particular keyword group from the default:

            + +

            $geshi->set_case_sensitivity($key, $sensitivity);

            + +

            Where $key is the key of the group for which you wish to change case sensitivness for (see the language file +for that language), and $sensitivity is a boolean value - true if the keyword is case sensitive, and +false if not.

            + +

            3.6 Changing the Source, Language, Config Options

            + +

            What happens if you want to change the source to be highlighted on the fly, or the language. Or if you want to specify +any of those basic fields after you’ve created a GeSHi object? Well, that’s where these methods come in.

            + +

            3.6.1 Changing the Source Code

            + +

            To change the source code, you call the set_source() method:

            + +

            $geshi->set_source($newsource);

            + +

            Example:

            + +
            PHP code
            1
            +23
            +45
            +67
            +8
            $geshi = new GeSHi($source1, 'php');
            + // Method calls to specify various options...
            + $code1 = $geshi->parse_code();
            + $geshi->set_source($source2);
            +$code2 = $geshi->parse_code();
            + +

            3.6.2 Changing the Language

            + +

            What happens if you want to change the language used for highlighting? Just call set_language():

            + +

            $geshi->set_language('newlanguage');

            + +

            Example:

            + +
            PHP code
            1
            +23
            +45
            +67
            +89
            +10
            $geshi = new GeSHi($source, 'php');
            + $code = $geshi->parse_code();
            + // Highlight GeSHi's output
            +$geshi->set_source($code); 
            +$geshi->set_language('html4strict');$geshi->enable_classes(false);
            +echo $geshi->parse_code();
            + +

            As of GeSHi 1.0.5, you can use the method load_from_file() to load the source code and language from a file. +Simply pass this method a file name and it will attempt to load the source and set the language.

            + +

            $geshi->load_from_file($file_name, $lookup);

            + +

            $file_name is the file name to use, and $lookup is an optional parameter that contains a lookup +array to use for deciding which language to choose. You can use this to override GeSHi’s default lookup array, which +may not contain the extension of the file you’re after, or perhaps does have your extension but under a different +language. The lookup array is of the form:

            + +
            PHP code
            1
            +23
            +4
            array(
            +   'lang_name' => array('extension', 'extension', ...),   'lang_name' ...
            +);
            + +

            Also, you can use the method get_language_name_from_extension() if you need to convert a file extension +to a valid language name. This method will return the empty string if it could not find a match in the lookup, and +like load_from_file it accepts an optional second parameter that contains a lookup array.

            + +
            + +
            Note:
            + +

            Names are case-insensitive - they will be converted to lower case to match a language file however. So if you’re + making a language file, remember it should have a name in lower case.

            + +
            + +
            + +
            Note:
            + +

            What you pass to this method is the name of a language file, minus the .php extension. If you’re writing a plugin + for a particular application, it’s up to you to somehow convert user input into a valid language name.

            + +
            + +
            + +
            Note:
            + +

            Since GeSHi 1.0.8 this function does not reset language settings for an already loaded language. If you want + to highlight code in the same language with different settings add the optional + $force_reset parameter:

            + +

            $geshi->set_language('language', true);

            + +
            + +
            + +
            Caution:
            + +

            GeSHi include()s the language file, so be careful to make sure that users can’t pass some wierd + language name to include any old script! GeSHi tries to strip non-valid characters out of a language name, but + you should always do this your self anyway. In particular, language files are always lower-case, with either + alphanumeric characters, dashes or underscores in their name.

            + +

            At the very least, strip “/” characters out of a language name.

            + +
            + +

            3.6.3 Changing the Language Path

            + +

            What happens if all of a sudden you want to use language files from a different directory from the current +language file location? You call the set_language_path() method:

            + +

            $geshi->set_language_path($newpath);

            + +

            It doesn’t matter whether the path has a trailing slash after it or not - only that it points to a valid folder. +If it doesn’t, that’s your tough luck ;)

            + +

            3.6.4 Changing the Character Set

            + +
            + +
            Note:
            + +

            Although GeSHi itself does not require to know the exact charset of your source you + will need to set this option when processing sources where multi-byte characters can occur. + As of GeSHi 1.0.7.18 internally a rewrite of htmlspecialchars is used + due to a security flaw in that function that is unpatched in even the most recent PHP4 versions and in PHP5 < 5.2. + Although this does no longer explicitely require the charset it is required again + as of GeSHi 1.0.8 to properly handle multi-byte characters (e.g. after an escape char).

            + +
            + +
            + +
            Note:
            + +

            As of GeSHi 1.0.8 the default charset has been changed to UTF-8.

            + +
            + +

            As of version 1.0.3, you can use the method set_encoding() to specify the character set that your source +is in. Valid names are those names that are valid for the PHP mbstring library:

            + +

            $geshi->set_encoding($encoding);

            + +

            There is a table of valid strings for $encoding at the php.net manual linked to above. If you do not +specify an encoding, or specify an invalid encoding, the character set used is ISO-8859-1.

            + +

            3.7 Error Handling

            + +

            What happens if you try to highlight using a language that doesn’t exist? Or if GeSHi can’t read a required file? +The results you get may be confusing. You may check your code over and over, and never find anything wrong. GeSHi +provides ways of finding out if GeSHi itself found anything wrong with what you tried to do. After highlighting, +you can call the error() method:

            + +

            $geshi = new GeSHi('hi', 'thisLangIsNotSupported');

            + +

            echo $geshi->error(); // echoes error message

            + +

            The error message you will get will look like this:

            + +
            +

            GeSHi Error: GeSHi could not find the language thisLangIsNotSupported (using path geshi/) (code 2)

            +
            + +

            The error outputted will be the last error GeSHi came across, just like how mysql_error() works.

            + +

            3.8 Disabling styling of some Lexics

            + +

            One disadvantage of GeSHi is that for large source files using complex languages, it can be quite slow with +every option turned on. Although future releases will concentrate on the speed/resource side of highlighting, +you can gain speed by disabling some of the highlighting options. This is done by using a +series of set_*_highlighting methods:

            + +
            +
            set_keyword_group_highlighting($group, $flag):
            +
            Sets whether a particular $group of keywords is to be highlighted or not. Consult the necessary +language file(s) to see what $group should be for each group (typically a positive integer). +$flag is false if you want to disable highlighting of this group, and true if you want +to re-enable higlighting of this group. If you disable a keyword group then even if the keyword group has a +related URL one will not be generated for that keyword.
            + +
            set_comments_highlighting($group, $flag):
            +
            Sets whether a particular $group of comments is to be highlighted or not. Consult the necessary +language file(s) to see what $group should be for each group (typically a positive integer, or th +string 'MULTI' for multiline comments. $flag is false if you want to disable +highlighting of this group, and true if you want to re-enable highlighting of this group.
            + +
            set_regexps_highlighting($regexp, $flag):
            +
            Sets whether a particular $regexp is to be highlighted or not. Consult the necessary language file(s) +to see what $regexp should be for each regexp (typically a positive integer, or the string 'MULTI' +for multiline comments. $flag is false if you want to disable highlighting of this group, +and true if you want to re-enable highlighting of this group.
            +
            + +

            The following methods:

            + +
              +
            • set_escape_characters_highlighting($flag)
            • +
            • set_symbols_highlighting($flag)
            • +
            • set_strings_highlighting($flag)
            • +
            • set_numbers_highlighting($flag)
            • +
            • set_methods_highlighting($flag)
            • +
            + +

            Work on their respective lexics (e.g. set_methods_highlighting() will disable/enable highlighting of methods). +For each method, if $flag is false then the related lexics will not be highlighted at all (this +means no HTML will surround the lexic like usual, saving on time and bandwidth.

            + +

            In case all highlighting should be disabled or reenabled GeSHi provides two methods called disable_highlighting() +and enable_highlighting($flag). The optional paramter $flag has been added in 1.0.7.21 and specifies +the desired state, i.e. true (default) to turn all highlighting on, or false to turn all +highlighting off. Since 1.0.7.21 the method disnable_highlighting() has become deprecated.

            + +

            3.9 Setting the Tab Width

            + +

            If you’re using the <pre> header, tabs are handled automatically by your browser, and in general you can +count on good results. However, if you’re using the <div> header, you may want to specify a tab +width explicitly.

            + +

            Note that tabs created in this fashion won’t be like normal tabs - there won’t be “tab-stops” as such, instead +tabs will be replaced with the specified number of spaces - just like most editors do.

            + +

            To change the tab width, you call the set_tab_width() method:

            + +

            $geshi->set_tab_width($width);

            + +

            Where $width is the width in spaces that you’d like tabs to be.

            + +

            3.10 Using Strict Mode

            + +

            Some languages like to get tricky, and jump in and out of the file that they’re in. For example, the vast +majority of you reading this will have used a PHP file. And you know that PHP code is only executed if it’s +within delimiters like <?php and ?> (there are others of course…). So what happens if you do the +following in a php file?

            + +

            <img src="<?php echo rand(1, 100) ?>" />

            + +

            When using GeSHi without strict mode, or using a bad highlighter, you’ll end up with scrambled crap, +especially if you’re being slack about where you’re putting your quotes, you could end up with the rest +of your file as bright blue. Fortunately, you can tell GeSHi to be “strict” about just when it highlights +and when it does not, using the enable_strict_mode() method:

            + +

            $geshi->enable_strict_mode($mode);

            + +

            Where $mode is true or not specified to enable strict mode, or false to disable +strict mode if you’ve already turned it and don’t want it now.

            + +
            + +
            Note:
            + +

            As of GeSHi 1.0.8 there is a new way to tell GeSHi when to use Strict Mode + which is somewhat more intelligent than in previous releases. GeSHi now also + allows GESHI_MAYBE, GESHI_NEVER and GESHI_ALWAYS instead of true and false. + Basically GESHI_ALWAYS (true) always enables strict mode, + whereas GESHI_NEVER (false) completely disables strict mode. The new thing is + GESHI_MAYBE which enables strict mode if it finds any sequences of code + that look like strict block delimiters.

            + +

            By the way: That’s why this section had to be changed, as the new documentation + tool we now use, applies this feature and thus auto-detects when strict mode has to be used…

            + +
            + +

            3.11 Adding/Removing Keywords

            + +

            Lets say that you’re working on a large project, with many files, many classes and many functions. Perhaps also you +have the source code on the web and highlighted by GeSHi, perhaps as a front end to CVS, as a learning tool, something +to refer to, whatever. Well, why not highlight the names of the functions and classes your project uses, as well +as the standard functions and classes? Or perhaps you’re not interested in highlighting certain functions, and would +like to remove them? Or maybe you don’t mind if an entire function group goes west in the interest of speed? GeSHi +can handle all of this!

            + +

            3.11.1 Adding a Keyword

            + +

            If you want to add a keyword to an existing keyword group, you use the add_keyword method:

            + +

            $geshi->add_keyword($key, $word);

            + +

            Where $key is the index of the group of keywords you want to add this keyword to, and $word is +the word to add.

            + +

            This implies knowledge of the language file to know the correct index.

            + +

            3.11.2 Removing a Keyword

            + +

            Perhaps you want to remove a keyword from an existing group. Maybe you don’t use it and want to save yourself some time. Whatever the reason, you can remove it using the remove_keyword method:

            + +

            $geshi->remove_keyword($key, $word);

            + +

            Where $key is the index of the group of keywords that you want to remove this keyword from, and +$word is the word to remove.

            + +

            This implies knowledge of the language file to know the correct index - most of the time the keywords you’ll +want to remove will be in group 3, but this is not guaranteed and you should check the language file first.

            + +

            This function is silent - if the keyword is not in the group you specified, nothing awful will happen ;)

            + +

            3.11.3 Adding a Keyword Group

            + +

            Lets say for your big project you have several main functions and classes that you’d like highlighted. Why not +add them as their own group instead of having them highlighted the same way as other keywords? Then you can make +them stand out, and people can instantly see which functions and classes are user defined or inbuilt. Furthermore, +you could set the URL for this group to point at the API documentation of your project.

            + +

            You add a keyword group by using the add_keyword_group method:

            + +

            $geshi->add_keyword_group($key, $styles, $case_sensitive, $words);

            + +

            Where $key is the key that you want to use to refer to this group, $styles is the styles that +you want to use to style this group, $case_sensitive is true or false depending on whether you want +this group of keywords to be case sensitive or not and $words is an array of words (or a string) of which +words to add to this group. For example:

            + +

            $geshi->add_keyword_group(10, 'color: #600000;', false, array('myfunc_1', 'myfunc_2', 'myfunc_3'));

            + +

            Adds a keyword group referenced by index 10, of which all keywords in the group will be dark red, each keyword +can be in any case and which contains the keywords “myfunc_1”, “myfunc_2” and “myfunc_3”.

            + +

            After creating such a keyword group, you may call other GeSHi methods on it, just as you would for any other keyword group.

            + +
            + +
            Caution:
            + +

            If you specify a $key for which there is already a keyword group, the old keyword group will be + overwritten! Most language files don’t use numbers larger than 5, so I recommend you play it safe and use a number + like 10 or 42.

            + +
            + +

            3.11.4 Removing a Keyword Group

            + +

            Perhaps you really need speed? Why not just remove an entire keyword group? GeSHi won’t have to loop through +each keyword checking for its existance, saving much time. You remove a keyword group by using the +remove_keyword_group method:

            + +

            $geshi->remove_keyword_group($key);

            + +

            Where $key is the key of the group you wish to remove. This implies knowleged of the language file.

            + +

            3.12 Headers and Footers for Your Code

            + +

            So you want to add some special information to the highlighted source? GeSHi can do that too! You can specify headers +and footers for your code, style them, and insert information from the highlighted source into your header or footer.

            + +

            3.12.1 Keyword Substitution

            + +

            In your header and footer, you can put special keywords that will be replaced with actual configuration values for +this GeSHi object. The keywords you can use are:

            + +
              +
            • <TIME> or {TIME}: Is replaced by the time it took for the parse_code() method - i.e., +how long it took for your code to be highlighted. The time is returned to three decimal places.
            • +
            • <LANGUAGE> or {LANGUAGE}: Is replaced by a nice, friendly version of the language name used to +highlight this code.
            • +
            • <SPEED> or {SPEED}: Is replaced by the speed at which your source has been processed.
            • +
            • <VERSION> or {VERSION}: The GeSHi version used to highlight the code.
            • +
            + +

            3.12.2 Setting Header Content

            + +

            The header for your code is a <div>, which is inside the containing block. Therefore, it is affected by +the method set_overall_style, and should contain the sort of HTML that belongs in a <div>. +You may use any HTML you like, and format it as an HTML document. You should use valid HTML - convert to entities +any quotemarks or angle brackets you want displayed. You set the header content using the method +set_header_content():

            + +

            $geshi->set_header_content($content);

            + +

            Where $content is the HTML you want to use for the header.

            + + + +

            The footer for your code is a <div>, which is inside the containing block. Therefore, it is affected by +the method set_overall_style, and should contain the sort of HTML that belongs in a <div>. +You may use any HTML you like, and format it as an HTML document. You should use valid HTML - convert to entities +any quotemarks or angle brackets you want displayed. You set the footer content using the method +set_footer_content():

            + +

            $geshi->set_footer_content($content);

            + +

            Where $content is the HTML you want to use for the footer.

            + +

            3.12.4 Styling Header Content

            + +

            You can apply styles to the header content you have set with the set_header_content_style:

            + +

            $geshi->set_header_content_style($styles);

            + +

            Where $styles is the stylesheet declarations you want to use to style the header content.

            + + + +

            You can apply styles to the footer content you have set with the set_footer_content_style:

            + +

            $geshi->set_footer_content_style($styles);

            + +

            Where $styles is the stylesheet declarations you want to use to style the footer content.

            + +

            3.13 Keyword URLs

            + +

            As of version 1.0.2, GeSHi allows you to specify a URL for keyword groups. This URL is used by GeSHi to convert +the keywords in that group into URLs to appropriate documentation. And using add_keyword_group you +can add functions and classes from your own projects and use the URL functionality to provide a link to your +own API documentation.

            + +

            3.13.1 Setting a URL for a Keyword Group

            + +

            To set the URL to be used for a keyword group, you use the set_url_for_keyword_group() method:

            + +

            $geshi->set_url_for_keyword_group($group, $url);

            + +

            Where $group is the keyword group you want to assign the URL for, and $url is the URL for +this group of keywords.

            + +

            You may be wondering how to make each keyword in the group point to the correct URL. You do this by putting +{FNAME} in the URL at the correct place. For example, PHP makes it easy by linking www.php.net/function-name +to the documentation for that function, so the URL used is http://www.php.net/{FNAME}.

            + +

            Of course, when you get to a language like Java, that puts its class documentation in related folders, it gets a +little trickier to work out an appropriate URL (see the Java language file!). I hope to provide some kind of +redirection service at the GeSHi website in the future.

            + +
            + +
            Note:
            + +

            As of Version 1.0.7.21 there have been added two more symbols you can use to link to functions. {FNAMEL} + will generate the lowercase version of the keyword, {FNAMEU} will generate the uppercase version. {FNAME} + will provide the keyword as specified in the language file. Use one of these more specific placeholders + if possible, as they result in less overhead while linking for case insensitive languages.

            + +
            + +

            3.13.2 Disabling a URL for a Keyword Group

            + +

            It’s easy to disable a URL for a keyword group: Simply use the method set_url_for_keyword_group() to pass +an empty string as the URL:

            + +

            $geshi->set_url_for_keyword_group($group, '');

            + +

            3.13.3 Disabling all URLs for Keywords

            + +

            As of GeSHi 1.0.7.18, you can disable all URL linking for keywords:

            + +

            $geshi->enable_keyword_links(false);

            + + + +

            You can also style the function links. You can style their default status, hovered, active and visited status. +All of this is controlled by one method, set_link_styles():

            + +

            $geshi->set_link_styles($mode, $styles);

            + +

            Where $mode is one of four values:

            + +
              +
            • GESHI_LINK: The default style of the links.
            • +
            • GESHI_HOVER: The style of the links when they have focus (the mouse is hovering over them).
            • +
            • GESHI_ACTIVE: The style of the links when they are being clicked.
            • +
            • GESHI_VISITED: The style of links that the user has already visited.
            • +
            + +

            And $styles is the stylesheet declarations to apply to the links.

            + +
            + +
            Note:
            + +

            The names GESHI_LINK, GESHI_HOVER … are constants. Don’t put them in quotes!

            + +
            + +

            3.13.5 Setting the Link Target

            + +

            Perhaps you want to set the target of link attributes, so the manual pages open in a new window? Use the +set_link_target() method:

            + +

            $geshi->set_link_target($target, $styles);

            + +

            Where $target is any valid (X)HTML target value - _blank or _top for example.

            + +

            3.14 Using Contextual Importance

            + +
            + +
            Caution:
            + +

            This functionality is not only buggy, but is proving very hard to implement in 1.1.X. Therefore, this + functionality may well be removed in 1.2.0. You are hereby warned!

            + +
            + +

            This feature allows you to mark a part of your source as important. But as the +implementation its use is deprecated and you should consider using +the “Highlight Lines Extra” feature described below.

            + +

            3.15 Highlighting Special Lines “Extra”

            + +

            An alternative (and more stable) method of highlighting code that is important +is to use extra highlighting by line. Although you may not know what line numbers +contain the important lines, if you do this method is a much more flexible way of +making important lines stand out.

            + +

            3.15.1 Specifying the Lines to Highlight Extra

            + +

            To specify which lines to highlight extra, you pass an array containing the line numbers to highlight_lines_extra():

            + +

            $geshi->highlight_lines_extra($array);

            + +

            The array could be in the form array(2, 3, 4, 7, 12, 344, 4242), made from a DB query, generated +from looking through the source for certain important things and working out what line those things are… +However you get the line numbers, the array should simply be an array of integers.

            + +

            Here’s an example, using the same source as before:

            + +
            PHP code
            1
            +23
            +45
            +67
            +89
            +1011
            +1213
            +1415
            +1617
            +1819
            +2021
            +
            //
            +// Here we go again! This time we'll simply highlight the 8th line//
            +$source = 'public int[][] product ( n, m ){
            +  int [][] ans = new int[n][m];  for ( int i = 0; i < n; i++ )
            +  {    for ( int j = 0; i < m; j++ )
            +    {      ans[i][j] = i * j;
            +    }  }
            +  return ans;}';
            + $geshi = new GeSHi($source, 'java');
            + $geshi->highlight_lines_extra(array(8));
            + echo $geshi->parse_code();
            + +

            Which produces:

            + +
            Java code
            1
            +23
            +45
            +67
            +89
            +1011
            +12
            public int[][] product ( n, m )
            +{  int [][] ans = new int[n][m];
            +  for ( int i = 0; i < n; i++ )  {
            +    for ( int j = 0; i < m; j++ )    {
            +      ans[i][j] = i * j;    }
            +  }  return ans;
            +}
            + +

            What’s more, as you can see the code on a highlighted line is still actually highlighted itself.

            + +

            3.15.2 Styles for the Highlighted Lines

            + +

            Again as with contextual importance, you’re not chained to the yellow theme that is the default. You can +use the set_highlight_lines_extra_style method:

            + +

            $geshi->set_highlight_lines_extra_style($styles);

            + +

            Where $styles is the stylesheet declarations that you want to apply to highlighted lines.

            + +

            3.16 Adding IDs to Each Line

            + +

            Perhaps you’re a javascript junkie? GeSHi provides a way to give each line an ID so you can access that line with +javascript, or perhaps just by plain CSS (though if you want to access lines by CSS you should use the method +in the previous section). To enable IDs you call the enable_ids() method:

            + +

            $geshi->enable_ids($flag);

            + +

            Where $flag is true or not present to enable IDs, and false to disable them again if you need.

            + +

            The ID generated is in the form {overall-css-id}-{line-number}. So for example, if you set the overall CSS id to +be “mycode”, then the IDs for each line would by “mycode-1”, “mycode-2” etc. If there is no CSS ID set, then one is +made up in the form geshi-[4 random characters], but this is not so useful for if you want to do javascript manipulation.

            + +

            3.17 Getting the Time of Styling

            + +

            Once you’ve called parse_code(), you can get the time it took to run the highlighting by calling the +get_time() method:

            + +
            PHP code
            1
            +23
            +45
            +67
            +
            $geshi = new GeSHi($source, $language, $path);
            + $code = mysql_real_escape_string($geshi->parse_code());
            +$time = $geshi->get_time(); 
            +// do something with itmysql_query("INSERT INTO code VALUES ('$code', '$time')");
            + +

            4 Language Files

            + +

            So now you know what features GeSHi offers, and perhaps you’ve even meddled with the source. Or perhaps +you’d like a language file for language X but it doesn’t seem to be supported? Rubbish! GeSHi will highlight +anything, what do you think I coded this for? ^_^ You’ll just have to learn how to make a language file +yourself. And I promise it’s not too hard - and if you’re here you’re in the right place!

            + +

            4.1 An Example Language File

            + +

            Let’s begin by looking at an example language file - the language file for the first language ever supported, +PHP:

            + +
            PHP code
            1
            +23
            +45
            +67
            +89
            +1011
            +1213
            +1415
            +1617
            +1819
            +2021
            +2223
            +2425
            +2627
            +2829
            +3031
            +3233
            +3435
            +3637
            +3839
            +4041
            +4243
            +4445
            +4647
            +4849
            +5051
            +5253
            +5455
            +5657
            +5859
            +6061
            +6263
            +6465
            +6667
            +6869
            +7071
            +7273
            +7475
            +7677
            +7879
            +8081
            +8283
            +8485
            +8687
            +8889
            +9091
            +9293
            +9495
            +9697
            +9899
            +100101
            +102103
            +104105
            +106107
            +108109
            +110111
            +112113
            +114115
            +116117
            +118119
            +120121
            +122123
            +124125
            +126127
            +128129
            +130131
            +132133
            +134135
            +136137
            +138139
            +140141
            +142143
            +144145
            +146147
            +148149
            +150151
            +152153
            +154155
            +156157
            +158159
            +160161
            +162163
            +164165
            +166167
            +168169
            +170171
            +172173
            +174175
            +176177
            +178179
            +180181
            +182183
            +184185
            +186187
            +188189
            +190191
            +192193
            +194195
            +196197
            +198199
            +200201
            +202203
            +204205
            +206207
            +208209
            +210211
            +212213
            +214215
            +216217
            +218219
            +220221
            +222223
            +224225
            +226227
            +228229
            +230231
            +232233
            +234235
            +236237
            +238239
            +240241
            +242243
            +244245
            +246247
            +248249
            +250251
            +252253
            +254255
            +256257
            +258259
            +260261
            +262263
            +264265
            +266267
            +268269
            +270271
            +272273
            +274275
            +276277
            +278279
            +280281
            +282283
            +284285
            +286287
            +288289
            +290291
            +292293
            +294295
            +296297
            +298299
            +300301
            +302303
            +304305
            +306307
            +308309
            +310311
            +312313
            +314315
            +316317
            +318319
            +320321
            +322323
            +324325
            +326327
            +328329
            +330331
            +332333
            +334335
            +336337
            +338339
            +340341
            +342343
            +344345
            +346347
            +348349
            +350351
            +352353
            +354355
            +356357
            +358359
            +360361
            +362363
            +364365
            +366367
            +368369
            +370371
            +372373
            +374375
            +376377
            +378379
            +380381
            +382383
            +384385
            +386387
            +388389
            +390391
            +392393
            +394395
            +396397
            +398399
            +400401
            +402403
            +404405
            +406407
            +408409
            +410411
            +412413
            +414415
            +416417
            +418419
            +420421
            +422423
            +424425
            +426427
            +428429
            +430431
            +432433
            +434435
            +436437
            +438439
            +440441
            +442443
            +444445
            +446447
            +448449
            +450451
            +452453
            +454455
            +456457
            +458459
            +460461
            +462463
            +464465
            +466467
            +468469
            +470471
            +472473
            +474475
            +476477
            +478479
            +480481
            +482483
            +484485
            +486487
            +488489
            +490491
            +492493
            +494495
            +496497
            +498499
            +500501
            +502503
            +504505
            +506507
            +508509
            +510511
            +512513
            +514515
            +516517
            +518519
            +520521
            +522523
            +524525
            +526527
            +528529
            +530531
            +532533
            +534535
            +536537
            +538539
            +540541
            +542543
            +544545
            +546547
            +548549
            +550551
            +552553
            +554555
            +556557
            +558559
            +560561
            +562563
            +564565
            +566567
            +568569
            +570571
            +572573
            +574575
            +576577
            +578579
            +580581
            +582583
            +584585
            +586587
            +588589
            +590591
            +592593
            +594595
            +596597
            +598599
            +600601
            +602603
            +604605
            +606607
            +608609
            +610611
            +612613
            +614615
            +616617
            +618619
            +620621
            +622623
            +624625
            +626627
            +628629
            +630631
            +632633
            +634635
            +636637
            +638639
            +640641
            +642643
            +644645
            +646647
            +648649
            +650651
            +652653
            +654655
            +656657
            +658659
            +660661
            +662663
            +664665
            +666667
            +668669
            +670671
            +672673
            +674675
            +676677
            +678679
            +680681
            +682683
            +684685
            +686687
            +688689
            +690691
            +692693
            +694695
            +696697
            +698699
            +700701
            +702703
            +704705
            +706707
            +708709
            +710711
            +712713
            +714715
            +716717
            +718719
            +720721
            +722723
            +724725
            +726727
            +728729
            +730731
            +732733
            +734735
            +736737
            +738739
            +740741
            +742743
            +744745
            +746747
            +748749
            +750751
            +752753
            +754755
            +756757
            +758759
            +760761
            +762763
            +764765
            +766767
            +768769
            +770771
            +772773
            +774775
            +776777
            +778779
            +780781
            +782783
            +784785
            +786787
            +788789
            +790791
            +792793
            +794795
            +796797
            +798799
            +800801
            +802803
            +804805
            +806807
            +808809
            +810811
            +812813
            +814815
            +816817
            +818819
            +820821
            +822823
            +824825
            +826827
            +828829
            +830831
            +832833
            +834835
            +836837
            +838839
            +840841
            +842843
            +844845
            +846847
            +848849
            +850851
            +852853
            +854855
            +856857
            +858859
            +860861
            +862863
            +864865
            +866867
            +868869
            +870871
            +872873
            +874875
            +876877
            +878879
            +880881
            +882883
            +884885
            +886887
            +888889
            +890891
            +892893
            +894895
            +896897
            +898899
            +900901
            +902903
            +904905
            +906907
            +908909
            +910911
            +912913
            +914915
            +916917
            +918919
            +920921
            +922923
            +924925
            +926927
            +928929
            +930931
            +932933
            +934935
            +936937
            +938939
            +940941
            +942943
            +944945
            +946947
            +948949
            +950951
            +952953
            +954955
            +956957
            +958959
            +960961
            +962963
            +964965
            +966967
            +968969
            +970971
            +972973
            +974975
            +976977
            +978979
            +980981
            +982983
            +984985
            +986987
            +988989
            +990991
            +992993
            +994995
            +996997
            +998999
            +10001001
            +10021003
            +10041005
            +10061007
            +10081009
            +10101011
            +10121013
            +10141015
            +10161017
            +10181019
            +10201021
            +10221023
            +10241025
            +10261027
            +10281029
            +10301031
            +10321033
            +10341035
            +10361037
            +10381039
            +10401041
            +10421043
            +10441045
            +10461047
            +10481049
            +10501051
            +10521053
            +10541055
            +10561057
            +10581059
            +10601061
            +10621063
            +10641065
            +10661067
            +10681069
            +10701071
            +10721073
            +10741075
            +10761077
            +10781079
            +10801081
            +10821083
            +10841085
            +10861087
            +10881089
            +10901091
            +10921093
            +10941095
            +10961097
            +10981099
            +11001101
            +11021103
            +11041105
            +11061107
            +11081109
            +11101111
            +11121113
            +11141115
            +11161117
            +
            <?php
            +/************************************************************************************* * php.php
            + * -------- * Author: Nigel McNie (nigel@geshi.org)
            + * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/) * Release Version: 1.0.8.10
            + * Date Started: 2004/06/20 *
            + * PHP language file for GeSHi. *
            + * CHANGES * -------
            + * 2008/05/23 (1.0.7.22) *  -  Added description of extra language features (SF#1970248)
            + * 2004/11/25 (1.0.3) *  -  Added support for multiple object splitters
            + *  -  Fixed &new problem * 2004/10/27 (1.0.2)
            + *  -  Added URL support *  -  Added extra constants
            + * 2004/08/05 (1.0.1) *  -  Added support for symbols
            + * 2004/07/14 (1.0.0) *  -  First Release
            + * * TODO (updated 2004/07/14)
            + * ------------------------- * * Make sure the last few function I may have missed
            + *   (like eval()) are included for highlighting * * Split to several files - php4, php5 etc
            + * *************************************************************************************
            + * *     This file is part of GeSHi.
            + * *   GeSHi is free software; you can redistribute it and/or modify
            + *   it under the terms of the GNU General Public License as published by *   the Free Software Foundation; either version 2 of the License, or
            + *   (at your option) any later version. *
            + *   GeSHi is distributed in the hope that it will be useful, *   but WITHOUT ANY WARRANTY; without even the implied warranty of
            + *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the *   GNU General Public License for more details.
            + * *   You should have received a copy of the GNU General Public License
            + *   along with GeSHi; if not, write to the Free Software *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
            + * ************************************************************************************/
            + $language_data = array(
            +    'LANG_NAME' => 'PHP',    'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),    'COMMENT_REGEXP' => array(
            +        //Heredoc and Nowdoc syntax        3 => '/<<<\s*?(\'?)([a-zA-Z0-9]+?)\1[^\n]*?\\n.*\\n\\2(?![a-zA-Z0-9])/siU',
            +        // phpdoc comments        4 => '#/\*\*(?![\*\/]).*\*/#sU',
            +        // Advanced # handling        2 => "/#.*?(?:(?=\?\>)|^)/smi"
            +        ),    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),    'ESCAPE_CHAR' => '',
            +    'ESCAPE_REGEXP' => array(        //Simple Single Char Escapes
            +        1 => "#\\\\[nfrtv\$\"\n\\\\]#i",        //Hexadecimal Char Specs
            +        2 => "#\\\\x[\da-fA-F]{1,2}#i",        //Octal Char Specs
            +        3 => "#\\\\[0-7]{1,3}#",        //String Parsing of Variable Names
            +        4 => "#\\$[a-z0-9_]+(?:\\[[a-z0-9_]+\\]|->[a-z0-9_]+)?|(?:\\{\\$|\\$\\{)[a-z0-9_]+(?:\\[('?)[a-z0-9_]*\\1\\]|->[a-z0-9_]+)*\\}#i",        //Experimental extension supporting cascaded {${$var}} syntax
            +        5 => "#\$[a-z0-9_]+(?:\[[a-z0-9_]+\]|->[a-z0-9_]+)?|(?:\{\$|\$\{)[a-z0-9_]+(?:\[('?)[a-z0-9_]*\\1\]|->[a-z0-9_]+)*\}|\{\$(?R)\}#i",        //Format String support in ""-Strings
            +        6 => "#%(?:%|(?:\d+\\\\\\\$)?\\+?(?:\x20|0|'.)?-?(?:\d+|\\*)?(?:\.\d+)?[bcdefFosuxX])#"        ),
            +    'HARDQUOTE' => array("'", "'"),    'HARDESCAPE' => array("'", "\\"),
            +    'HARDCHAR' => "\\",    'NUMBERS' =>
            +        GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX |        GESHI_NUMBER_FLT_SCI_ZERO,
            +    'KEYWORDS' => array(        1 => array(
            +            'as','break','case','continue','default','do','else','elseif',            'endfor','endforeach','endif','endswitch','endwhile','for',
            +            'foreach','if','include','include_once','require','require_once',            'return','switch','throw','while',
            +             'echo','print'
            +            ),        2 => array(
            +            '&amp;new','&lt;/script&gt;','&lt;?php','&lt;script language',            'abstract','class','const','declare','extends','function','global',
            +            'interface','namespace','new','private','protected','public','self',            'use','var'
            +            ),        3 => array(
            +            'abs','acos','acosh','addcslashes','addslashes','aggregate',            'aggregate_methods','aggregate_methods_by_list',
            +            'aggregate_methods_by_regexp','aggregate_properties',            'aggregate_properties_by_list','aggregate_properties_by_regexp',
            +            'aggregation_info','apache_child_terminate','apache_get_modules',            'apache_get_version','apache_getenv','apache_lookup_uri',
            +            'apache_note','apache_request_headers','apache_response_headers',            'apache_setenv','array','array_change_key_case','array_chunk',
            +            'array_combine','array_count_values','array_diff',            'array_diff_assoc','array_diff_key','array_diff_uassoc',
            +            'array_diff_ukey','array_fill','array_fill_keys','array_filter',            'array_flip','array_intersect','array_intersect_assoc',
            +            'array_intersect_key','array_intersect_uassoc',            'array_intersect_ukey','array_key_exists','array_keys','array_map',
            +            'array_merge','array_merge_recursive','array_multisort','array_pad',            'array_pop','array_product','array_push','array_rand',
            +            'array_reduce','array_reverse','array_search','array_shift',            'array_slice','array_splice','array_sum','array_udiff',
            +            'array_udiff_assoc','array_udiff_uassoc','array_uintersect',            'array_uintersect_assoc','array_uintersect_uassoc','array_unique',
            +            'array_unshift','array_values','array_walk','array_walk_recursive',            'arsort','asin','asinh','asort','assert','assert_options','atan',
            +            'atan2','atanh','base_convert','base64_decode','base64_encode',            'basename','bcadd','bccomp','bcdiv','bcmod','bcmul',
            +            'bcompiler_load','bcompiler_load_exe','bcompiler_parse_class',            'bcompiler_read','bcompiler_write_class','bcompiler_write_constant',
            +            'bcompiler_write_exe_footer','bcompiler_write_file',            'bcompiler_write_footer','bcompiler_write_function',
            +            'bcompiler_write_functions_from_file','bcompiler_write_header',            'bcompiler_write_included_filename','bcpow','bcpowmod','bcscale',
            +            'bcsqrt','bcsub','bin2hex','bindec','bindtextdomain',            'bind_textdomain_codeset','bitset_empty','bitset_equal',
            +            'bitset_excl','bitset_fill','bitset_from_array','bitset_from_hash',            'bitset_from_string','bitset_in','bitset_incl',
            +            'bitset_intersection','bitset_invert','bitset_is_empty',            'bitset_subset','bitset_to_array','bitset_to_hash',
            +            'bitset_to_string','bitset_union','blenc_encrypt','bzclose',            'bzcompress','bzdecompress','bzerrno','bzerror','bzerrstr',
            +            'bzflush','bzopen','bzread','bzwrite','cal_days_in_month',            'cal_from_jd','cal_info','cal_to_jd','call_user_func',
            +            'call_user_func_array','call_user_method','call_user_method_array',            'ceil','chdir','checkdate','checkdnsrr','chgrp','chmod','chop',
            +            'chown','chr','chunk_split','class_exists','class_implements',            'class_parents','classkit_aggregate_methods',
            +            'classkit_doc_comments','classkit_import','classkit_method_add',            'classkit_method_copy','classkit_method_redefine',
            +            'classkit_method_remove','classkit_method_rename','clearstatcache',            'closedir','closelog','com_create_guid','com_event_sink',
            +            'com_get_active_object','com_load_typelib','com_message_pump',            'com_print_typeinfo','compact','confirm_phpdoc_compiled',
            +            'connection_aborted','connection_status','constant',            'convert_cyr_string','convert_uudecode','convert_uuencode','copy',
            +            'cos','cosh','count','count_chars','cpdf_add_annotation',            'cpdf_add_outline','cpdf_arc','cpdf_begin_text','cpdf_circle',
            +            'cpdf_clip','cpdf_close','cpdf_closepath',            'cpdf_closepath_fill_stroke','cpdf_closepath_stroke',
            +            'cpdf_continue_text','cpdf_curveto','cpdf_end_text','cpdf_fill',            'cpdf_fill_stroke','cpdf_finalize','cpdf_finalize_page',
            +            'cpdf_global_set_document_limits','cpdf_import_jpeg','cpdf_lineto',            'cpdf_moveto','cpdf_newpath','cpdf_open','cpdf_output_buffer',
            +            'cpdf_page_init','cpdf_rect','cpdf_restore','cpdf_rlineto',            'cpdf_rmoveto','cpdf_rotate','cpdf_rotate_text','cpdf_save',
            +            'cpdf_save_to_file','cpdf_scale','cpdf_set_action_url',            'cpdf_set_char_spacing','cpdf_set_creator','cpdf_set_current_page',
            +            'cpdf_set_font','cpdf_set_font_directories',            'cpdf_set_font_map_file','cpdf_set_horiz_scaling',
            +            'cpdf_set_keywords','cpdf_set_leading','cpdf_set_page_animation',            'cpdf_set_subject','cpdf_set_text_matrix','cpdf_set_text_pos',
            +            'cpdf_set_text_rendering','cpdf_set_text_rise','cpdf_set_title',            'cpdf_set_viewer_preferences','cpdf_set_word_spacing',
            +            'cpdf_setdash','cpdf_setflat','cpdf_setgray','cpdf_setgray_fill',            'cpdf_setgray_stroke','cpdf_setlinecap','cpdf_setlinejoin',
            +            'cpdf_setlinewidth','cpdf_setmiterlimit','cpdf_setrgbcolor',            'cpdf_setrgbcolor_fill','cpdf_setrgbcolor_stroke','cpdf_show',
            +            'cpdf_show_xy','cpdf_stringwidth','cpdf_stroke','cpdf_text',            'cpdf_translate','crack_check','crack_closedict',
            +            'crack_getlastmessage','crack_opendict','crc32','create_function',            'crypt','ctype_alnum','ctype_alpha','ctype_cntrl','ctype_digit',
            +            'ctype_graph','ctype_lower','ctype_print','ctype_punct',            'ctype_space','ctype_upper','ctype_xdigit','curl_close',
            +            'curl_copy_handle','curl_errno','curl_error','curl_exec',            'curl_getinfo','curl_init','curl_multi_add_handle',
            +            'curl_multi_close','curl_multi_exec','curl_multi_getcontent',            'curl_multi_info_read','curl_multi_init','curl_multi_remove_handle',
            +            'curl_multi_select','curl_setopt','curl_setopt_array',            'curl_version','current','cvsclient_connect','cvsclient_log',
            +            'cvsclient_login','cvsclient_retrieve','date','date_create',            'date_date_set','date_default_timezone_get',
            +            'date_default_timezone_set','date_format','date_isodate_set',            'date_modify','date_offset_get','date_parse','date_sun_info',
            +            'date_sunrise','date_sunset','date_time_set','date_timezone_get',            'date_timezone_set','db_id_list','dba_close','dba_delete',
            +            'dba_exists','dba_fetch','dba_firstkey','dba_handlers','dba_insert',            'dba_key_split','dba_list','dba_nextkey','dba_open','dba_optimize',
            +            'dba_popen','dba_replace','dba_sync','dbase_add_record',            'dbase_close','dbase_create','dbase_delete_record',
            +            'dbase_get_header_info','dbase_get_record',            'dbase_get_record_with_names','dbase_numfields','dbase_numrecords',
            +            'dbase_open','dbase_pack','dbase_replace_record',            'dbg_get_all_contexts','dbg_get_all_module_names',
            +            'dbg_get_all_source_lines','dbg_get_context_name',            'dbg_get_module_name','dbg_get_profiler_results',
            +            'dbg_get_source_context','dblist','dbmclose','dbmdelete',            'dbmexists','dbmfetch','dbmfirstkey','dbminsert','dbmnextkey',
            +            'dbmopen','dbmreplace','dbx_close','dbx_compare','dbx_connect',            'dbx_error','dbx_escape_string','dbx_fetch_row','dbx_query',
            +            'dbx_sort','dcgettext','dcngettext','deaggregate','debug_backtrace',            'debug_zval_dump','debugbreak','decbin','dechex','decoct','define',
            +            'defined','define_syslog_variables','deg2rad','dgettext','die',            'dio_close','dio_open','dio_read','dio_seek','dio_stat','dio_write',
            +            'dir','dirname','disk_free_space','disk_total_space',            'diskfreespace','dl','dngettext','docblock_token_name',
            +            'docblock_tokenize','dom_import_simplexml','domxml_add_root',            'domxml_attributes','domxml_children','domxml_doc_add_root',
            +            'domxml_doc_document_element','domxml_doc_get_element_by_id',            'domxml_doc_get_elements_by_tagname','domxml_doc_get_root',
            +            'domxml_doc_set_root','domxml_doc_validate','domxml_doc_xinclude',            'domxml_dump_mem','domxml_dump_mem_file','domxml_dump_node',
            +            'domxml_dumpmem','domxml_elem_get_attribute',            'domxml_elem_set_attribute','domxml_get_attribute','domxml_getattr',
            +            'domxml_html_dump_mem','domxml_new_child','domxml_new_doc',            'domxml_new_xmldoc','domxml_node','domxml_node_add_namespace',
            +            'domxml_node_attributes','domxml_node_children',            'domxml_node_get_content','domxml_node_has_attributes',
            +            'domxml_node_new_child','domxml_node_set_content',            'domxml_node_set_namespace','domxml_node_unlink_node',
            +            'domxml_open_file','domxml_open_mem','domxml_parser',            'domxml_parser_add_chunk','domxml_parser_cdata_section',
            +            'domxml_parser_characters','domxml_parser_comment',            'domxml_parser_end','domxml_parser_end_document',
            +            'domxml_parser_end_element','domxml_parser_entity_reference',            'domxml_parser_get_document','domxml_parser_namespace_decl',
            +            'domxml_parser_processing_instruction',            'domxml_parser_start_document','domxml_parser_start_element',
            +            'domxml_root','domxml_set_attribute','domxml_setattr',            'domxml_substitute_entities_default','domxml_unlink_node',
            +            'domxml_version','domxml_xmltree','doubleval','each','easter_date',            'easter_days','empty','end','ereg','ereg_replace','eregi',
            +            'eregi_replace','error_get_last','error_log','error_reporting',            'escapeshellarg','escapeshellcmd','eval','event_deschedule',
            +            'event_dispatch','event_free','event_handle_signal',            'event_have_events','event_init','event_new','event_pending',
            +            'event_priority_set','event_schedule','event_set','event_timeout',            'exec','exif_imagetype','exif_read_data','exif_tagname',
            +            'exif_thumbnail','exit','exp','explode','expm1','extension_loaded',            'extract','ezmlm_hash','fbird_add_user','fbird_affected_rows',
            +            'fbird_backup','fbird_blob_add','fbird_blob_cancel',            'fbird_blob_close','fbird_blob_create','fbird_blob_echo',
            +            'fbird_blob_get','fbird_blob_import','fbird_blob_info',            'fbird_blob_open','fbird_close','fbird_commit','fbird_commit_ret',
            +            'fbird_connect','fbird_db_info','fbird_delete_user','fbird_drop_db',            'fbird_errcode','fbird_errmsg','fbird_execute','fbird_fetch_assoc',
            +            'fbird_fetch_object','fbird_fetch_row','fbird_field_info',            'fbird_free_event_handler','fbird_free_query','fbird_free_result',
            +            'fbird_gen_id','fbird_maintain_db','fbird_modify_user',            'fbird_name_result','fbird_num_fields','fbird_num_params',
            +            'fbird_param_info','fbird_pconnect','fbird_prepare','fbird_query',            'fbird_restore','fbird_rollback','fbird_rollback_ret',
            +            'fbird_server_info','fbird_service_attach','fbird_service_detach',            'fbird_set_event_handler','fbird_trans','fbird_wait_event','fclose',
            +            'fdf_add_doc_javascript','fdf_add_template','fdf_close',            'fdf_create','fdf_enum_values','fdf_errno','fdf_error','fdf_get_ap',
            +            'fdf_get_attachment','fdf_get_encoding','fdf_get_file',            'fdf_get_flags','fdf_get_opt','fdf_get_status','fdf_get_value',
            +            'fdf_get_version','fdf_header','fdf_next_field_name','fdf_open',            'fdf_open_string','fdf_remove_item','fdf_save','fdf_save_string',
            +            'fdf_set_ap','fdf_set_encoding','fdf_set_file','fdf_set_flags',            'fdf_set_javascript_action','fdf_set_on_import_javascript',
            +            'fdf_set_opt','fdf_set_status','fdf_set_submit_form_action',            'fdf_set_target_frame','fdf_set_value','fdf_set_version','feof',
            +            'fflush','fgetc','fgetcsv','fgets','fgetss','file','file_exists',            'file_get_contents','file_put_contents','fileatime','filectime',
            +            'filegroup','fileinode','filemtime','fileowner','fileperms',            'filepro','filepro_fieldcount','filepro_fieldname',
            +            'filepro_fieldtype','filepro_fieldwidth','filepro_retrieve',            'filepro_rowcount','filesize','filetype','filter_has_var',
            +            'filter_id','filter_input','filter_input_array','filter_list',            'filter_var','filter_var_array','finfo_buffer','finfo_close',
            +            'finfo_file','finfo_open','finfo_set_flags','floatval','flock',            'floor','flush','fmod','fnmatch','fopen','fpassthru','fprintf',
            +            'fputcsv','fputs','fread','frenchtojd','fribidi_charset_info',            'fribidi_get_charsets','fribidi_log2vis','fscanf','fseek',
            +            'fsockopen','fstat','ftell','ftok','ftp_alloc','ftp_cdup',            'ftp_chdir','ftp_chmod','ftp_close','ftp_connect','ftp_delete',
            +            'ftp_exec','ftp_fget','ftp_fput','ftp_get','ftp_get_option',            'ftp_login','ftp_mdtm','ftp_mkdir','ftp_nb_continue','ftp_nb_fget',
            +            'ftp_nb_fput','ftp_nb_get','ftp_nb_put','ftp_nlist','ftp_pasv',            'ftp_put','ftp_pwd','ftp_quit','ftp_raw','ftp_rawlist','ftp_rename',
            +            'ftp_rmdir','ftp_set_option','ftp_site','ftp_size',            'ftp_ssl_connect','ftp_systype','ftruncate','function_exists',
            +            'func_get_arg','func_get_args','func_num_args','fwrite','gd_info',            'getallheaders','getcwd','getdate','getenv','gethostbyaddr',
            +            'gethostbyname','gethostbynamel','getimagesize','getlastmod',            'getmxrr','getmygid','getmyinode','getmypid','getmyuid','getopt',
            +            'getprotobyname','getprotobynumber','getrandmax','getrusage',            'getservbyname','getservbyport','gettext','gettimeofday','gettype',
            +            'get_browser','get_cfg_var','get_class','get_class_methods',            'get_class_vars','get_current_user','get_declared_classes',
            +            'get_defined_constants','get_defined_functions','get_defined_vars',            'get_extension_funcs','get_headers','get_html_translation_table',
            +            'get_included_files','get_include_path','get_loaded_extensions',            'get_magic_quotes_gpc','get_magic_quotes_runtime','get_meta_tags',
            +            'get_object_vars','get_parent_class','get_required_files',            'get_resource_type','glob','gmdate','gmmktime','gmp_abs','gmp_add',
            +            'gmp_and','gmp_clrbit','gmp_cmp','gmp_com','gmp_div','gmp_div_q',            'gmp_div_qr','gmp_div_r','gmp_divexact','gmp_fact','gmp_gcd',
            +            'gmp_gcdext','gmp_hamdist','gmp_init','gmp_intval','gmp_invert',            'gmp_jacobi','gmp_legendre','gmp_mod','gmp_mul','gmp_neg',
            +            'gmp_nextprime','gmp_or','gmp_perfect_square','gmp_popcount',            'gmp_pow','gmp_powm','gmp_prob_prime','gmp_random','gmp_scan0',
            +            'gmp_scan1','gmp_setbit','gmp_sign','gmp_sqrt','gmp_sqrtrem',            'gmp_strval','gmp_sub','gmp_xor','gmstrftime','gopher_parsedir',
            +            'gregoriantojd','gzclose','gzcompress','gzdeflate','gzencode',            'gzeof','gzfile','gzgetc','gzgets','gzgetss','gzinflate','gzopen',
            +            'gzpassthru','gzputs','gzread','gzrewind','gzseek','gztell',            'gzuncompress','gzwrite','hash','hash_algos','hash_file',
            +            'hash_final','hash_hmac','hash_hmac_file','hash_init','hash_update',            'hash_update_file','hash_update_stream','header','headers_list',
            +            'headers_sent','hebrev','hebrevc','hexdec','highlight_file',            'highlight_string','html_doc','html_doc_file','html_entity_decode',
            +            'htmlentities','htmlspecialchars','htmlspecialchars_decode',            'http_build_cookie','http_build_query','http_build_str',
            +            'http_build_url','http_cache_etag','http_cache_last_modified',            'http_chunked_decode','http_date','http_deflate','http_get',
            +            'http_get_request_body','http_get_request_body_stream',            'http_get_request_headers','http_head','http_inflate',
            +            'http_match_etag','http_match_modified','http_match_request_header',            'http_negotiate_charset','http_negotiate_content_type',
            +            'http_negotiate_language','http_parse_cookie','http_parse_headers',            'http_parse_message','http_parse_params',
            +            'http_persistent_handles_clean','http_persistent_handles_count',            'http_persistent_handles_ident','http_post_data','http_post_fields',
            +            'http_put_data','http_put_file','http_put_stream','http_redirect',            'http_request','http_request_body_encode',
            +            'http_request_method_exists','http_request_method_name',            'http_request_method_register','http_request_method_unregister',
            +            'http_send_content_disposition','http_send_content_type',            'http_send_data','http_send_file','http_send_last_modified',
            +            'http_send_status','http_send_stream','http_support',            'http_throttle','hypot','i18n_convert','i18n_discover_encoding',
            +            'i18n_http_input','i18n_http_output','i18n_internal_encoding',            'i18n_ja_jp_hantozen','i18n_mime_header_decode',
            +            'i18n_mime_header_encode','ibase_add_user','ibase_affected_rows',            'ibase_backup','ibase_blob_add','ibase_blob_cancel',
            +            'ibase_blob_close','ibase_blob_create','ibase_blob_echo',            'ibase_blob_get','ibase_blob_import','ibase_blob_info',
            +            'ibase_blob_open','ibase_close','ibase_commit','ibase_commit_ret',            'ibase_connect','ibase_db_info','ibase_delete_user','ibase_drop_db',
            +            'ibase_errcode','ibase_errmsg','ibase_execute','ibase_fetch_assoc',            'ibase_fetch_object','ibase_fetch_row','ibase_field_info',
            +            'ibase_free_event_handler','ibase_free_query','ibase_free_result',            'ibase_gen_id','ibase_maintain_db','ibase_modify_user',
            +            'ibase_name_result','ibase_num_fields','ibase_num_params',            'ibase_param_info','ibase_pconnect','ibase_prepare','ibase_query',
            +            'ibase_restore','ibase_rollback','ibase_rollback_ret',            'ibase_server_info','ibase_service_attach','ibase_service_detach',
            +            'ibase_set_event_handler','ibase_trans','ibase_wait_event','iconv',            'iconv_get_encoding','iconv_mime_decode',
            +            'iconv_mime_decode_headers','iconv_mime_encode',            'iconv_set_encoding','iconv_strlen','iconv_strpos','iconv_strrpos',
            +            'iconv_substr','id3_get_frame_long_name','id3_get_frame_short_name',            'id3_get_genre_id','id3_get_genre_list','id3_get_genre_name',
            +            'id3_get_tag','id3_get_version','id3_remove_tag','id3_set_tag',            'idate','ignore_user_abort','image_type_to_extension',
            +            'image_type_to_mime_type','image2wbmp','imagealphablending',            'imageantialias','imagearc','imagechar','imagecharup',
            +            'imagecolorallocate','imagecolorallocatealpha','imagecolorat',            'imagecolorclosest','imagecolorclosestalpha','imagecolordeallocate',
            +            'imagecolorexact','imagecolorexactalpha','imagecolormatch',            'imagecolorresolve','imagecolorresolvealpha','imagecolorset',
            +            'imagecolorsforindex','imagecolorstotal','imagecolortransparent',            'imageconvolution','imagecopy','imagecopymerge',
            +            'imagecopymergegray','imagecopyresampled','imagecopyresized',            'imagecreate','imagecreatefromgd','imagecreatefromgd2',
            +            'imagecreatefromgd2part','imagecreatefromgif','imagecreatefromjpeg',            'imagecreatefrompng','imagecreatefromstring','imagecreatefromwbmp',
            +            'imagecreatefromxbm','imagecreatetruecolor','imagedashedline',            'imagedestroy','imageellipse','imagefill','imagefilledarc',
            +            'imagefilledellipse','imagefilledpolygon','imagefilledrectangle',            'imagefilltoborder','imagefilter','imagefontheight',
            +            'imagefontwidth','imageftbbox','imagefttext','imagegammacorrect',            'imagegd','imagegd2','imagegif','imagegrabscreen','imagegrabwindow',
            +            'imageinterlace','imageistruecolor','imagejpeg','imagelayereffect',            'imageline','imageloadfont','imagepalettecopy','imagepng',
            +            'imagepolygon','imagepsbbox','imagepsencodefont',            'imagepsextendfont','imagepsfreefont','imagepsloadfont',
            +            'imagepsslantfont','imagepstext','imagerectangle','imagerotate',            'imagesavealpha','imagesetbrush','imagesetpixel','imagesetstyle',
            +            'imagesetthickness','imagesettile','imagestring','imagestringup',            'imagesx','imagesy','imagetruecolortopalette','imagettfbbox',
            +            'imagettftext','imagetypes','imagewbmp','imagexbm','imap_8bit',            'imap_alerts','imap_append','imap_base64','imap_binary','imap_body',
            +            'imap_bodystruct','imap_check','imap_clearflag_full','imap_close',            'imap_create','imap_createmailbox','imap_delete',
            +            'imap_deletemailbox','imap_errors','imap_expunge',            'imap_fetch_overview','imap_fetchbody','imap_fetchheader',
            +            'imap_fetchstructure','imap_fetchtext','imap_get_quota',            'imap_get_quotaroot','imap_getacl','imap_getmailboxes',
            +            'imap_getsubscribed','imap_header','imap_headerinfo','imap_headers',            'imap_last_error','imap_list','imap_listmailbox',
            +            'imap_listsubscribed','imap_lsub','imap_mail','imap_mail_compose',            'imap_mail_copy','imap_mail_move','imap_mailboxmsginfo',
            +            'imap_mime_header_decode','imap_msgno','imap_num_msg',            'imap_num_recent','imap_open','imap_ping','imap_qprint',
            +            'imap_rename','imap_renamemailbox','imap_reopen',            'imap_rfc822_parse_adrlist','imap_rfc822_parse_headers',
            +            'imap_rfc822_write_address','imap_savebody','imap_scan',            'imap_scanmailbox','imap_search','imap_set_quota','imap_setacl',
            +            'imap_setflag_full','imap_sort','imap_status','imap_subscribe',            'imap_thread','imap_timeout','imap_uid','imap_undelete',
            +            'imap_unsubscribe','imap_utf7_decode','imap_utf7_encode',            'imap_utf8','implode','import_request_variables','in_array',
            +            'ini_alter','ini_get','ini_get_all','ini_restore','ini_set',            'intval','ip2long','iptcembed','iptcparse','isset','is_a',
            +            'is_array','is_bool','is_callable','is_dir','is_double',            'is_executable','is_file','is_finite','is_float','is_infinite',
            +            'is_int','is_integer','is_link','is_long','is_nan','is_null',            'is_numeric','is_object','is_readable','is_real','is_resource',
            +            'is_scalar','is_soap_fault','is_string','is_subclass_of',            'is_uploaded_file','is_writable','is_writeable','iterator_apply',
            +            'iterator_count','iterator_to_array','java_last_exception_clear',            'java_last_exception_get','jddayofweek','jdmonthname','jdtofrench',
            +            'jdtogregorian','jdtojewish','jdtojulian','jdtounix','jewishtojd',            'join','jpeg2wbmp','json_decode','json_encode','juliantojd','key',
            +            'key_exists','krsort','ksort','lcg_value','ldap_add','ldap_bind',            'ldap_close','ldap_compare','ldap_connect','ldap_count_entries',
            +            'ldap_delete','ldap_dn2ufn','ldap_err2str','ldap_errno',            'ldap_error','ldap_explode_dn','ldap_first_attribute',
            +            'ldap_first_entry','ldap_first_reference','ldap_free_result',            'ldap_get_attributes','ldap_get_dn','ldap_get_entries',
            +            'ldap_get_option','ldap_get_values','ldap_get_values_len',            'ldap_list','ldap_mod_add','ldap_mod_del','ldap_mod_replace',
            +            'ldap_modify','ldap_next_attribute','ldap_next_entry',            'ldap_next_reference','ldap_parse_reference','ldap_parse_result',
            +            'ldap_read','ldap_rename','ldap_search','ldap_set_option',            'ldap_sort','ldap_start_tls','ldap_unbind','levenshtein',
            +            'libxml_clear_errors','libxml_get_errors','libxml_get_last_error',            'libxml_set_streams_context','libxml_use_internal_errors','link',
            +            'linkinfo','list','localeconv','localtime','log','log1p','log10',            'long2ip','lstat','ltrim','lzf_compress','lzf_decompress',
            +            'lzf_optimized_for','magic_quotes_runtime','mail','max','mbereg',            'mberegi','mberegi_replace','mbereg_match','mbereg_replace',
            +            'mbereg_search','mbereg_search_getpos','mbereg_search_getregs',            'mbereg_search_init','mbereg_search_pos','mbereg_search_regs',
            +            'mbereg_search_setpos','mbregex_encoding','mbsplit','mbstrcut',            'mbstrlen','mbstrpos','mbstrrpos','mbsubstr','mb_check_encoding',
            +            'mb_convert_case','mb_convert_encoding','mb_convert_kana',            'mb_convert_variables','mb_decode_mimeheader',
            +            'mb_decode_numericentity','mb_detect_encoding','mb_detect_order',            'mb_encode_mimeheader','mb_encode_numericentity','mb_ereg',
            +            'mb_eregi','mb_eregi_replace','mb_ereg_match','mb_ereg_replace',            'mb_ereg_search','mb_ereg_search_getpos','mb_ereg_search_getregs',
            +            'mb_ereg_search_init','mb_ereg_search_pos','mb_ereg_search_regs',            'mb_ereg_search_setpos','mb_get_info','mb_http_input',
            +            'mb_http_output','mb_internal_encoding','mb_language',            'mb_list_encodings','mb_output_handler','mb_parse_str',
            +            'mb_preferred_mime_name','mb_regex_encoding','mb_regex_set_options',            'mb_send_mail','mb_split','mb_strcut','mb_strimwidth','mb_stripos',
            +            'mb_stristr','mb_strlen','mb_strpos','mb_strrchr','mb_strrichr',            'mb_strripos','mb_strrpos','mb_strstr','mb_strtolower',
            +            'mb_strtoupper','mb_strwidth','mb_substitute_character','mb_substr',            'mb_substr_count','mcrypt_cbc','mcrypt_cfb','mcrypt_create_iv',
            +            'mcrypt_decrypt','mcrypt_ecb','mcrypt_enc_get_algorithms_name',            'mcrypt_enc_get_block_size','mcrypt_enc_get_iv_size',
            +            'mcrypt_enc_get_key_size','mcrypt_enc_get_modes_name',            'mcrypt_enc_get_supported_key_sizes',
            +            'mcrypt_enc_is_block_algorithm',            'mcrypt_enc_is_block_algorithm_mode','mcrypt_enc_is_block_mode',
            +            'mcrypt_enc_self_test','mcrypt_encrypt','mcrypt_generic',            'mcrypt_generic_deinit','mcrypt_generic_end','mcrypt_generic_init',
            +            'mcrypt_get_block_size','mcrypt_get_cipher_name',            'mcrypt_get_iv_size','mcrypt_get_key_size','mcrypt_list_algorithms',
            +            'mcrypt_list_modes','mcrypt_module_close',            'mcrypt_module_get_algo_block_size',
            +            'mcrypt_module_get_algo_key_size',            'mcrypt_module_get_supported_key_sizes',
            +            'mcrypt_module_is_block_algorithm',            'mcrypt_module_is_block_algorithm_mode',
            +            'mcrypt_module_is_block_mode','mcrypt_module_open',            'mcrypt_module_self_test','mcrypt_ofb','md5','md5_file',
            +            'mdecrypt_generic','memcache_add','memcache_add_server',            'memcache_close','memcache_connect','memcache_debug',
            +            'memcache_decrement','memcache_delete','memcache_flush',            'memcache_get','memcache_get_extended_stats',
            +            'memcache_get_server_status','memcache_get_stats',            'memcache_get_version','memcache_increment','memcache_pconnect',
            +            'memcache_replace','memcache_set','memcache_set_compress_threshold',            'memcache_set_server_params','memory_get_peak_usage',
            +            'memory_get_usage','metaphone','mhash','mhash_count',            'mhash_get_block_size','mhash_get_hash_name','mhash_keygen_s2k',
            +            'method_exists','microtime','mime_content_type','min',            'ming_keypress','ming_setcubicthreshold','ming_setscale',
            +            'ming_useconstants','ming_useswfversion','mkdir','mktime',            'money_format','move_uploaded_file','msql','msql_affected_rows',
            +            'msql_close','msql_connect','msql_create_db','msql_createdb',            'msql_data_seek','msql_db_query','msql_dbname','msql_drop_db',
            +            'msql_dropdb','msql_error','msql_fetch_array','msql_fetch_field',            'msql_fetch_object','msql_fetch_row','msql_field_flags',
            +            'msql_field_len','msql_field_name','msql_field_seek',            'msql_field_table','msql_field_type','msql_fieldflags',
            +            'msql_fieldlen','msql_fieldname','msql_fieldtable','msql_fieldtype',            'msql_free_result','msql_freeresult','msql_list_dbs',
            +            'msql_list_fields','msql_list_tables','msql_listdbs',            'msql_listfields','msql_listtables','msql_num_fields',
            +            'msql_num_rows','msql_numfields','msql_numrows','msql_pconnect',            'msql_query','msql_regcase','msql_result','msql_select_db',
            +            'msql_selectdb','msql_tablename','mssql_bind','mssql_close',            'mssql_connect','mssql_data_seek','mssql_execute',
            +            'mssql_fetch_array','mssql_fetch_assoc','mssql_fetch_batch',            'mssql_fetch_field','mssql_fetch_object','mssql_fetch_row',
            +            'mssql_field_length','mssql_field_name','mssql_field_seek',            'mssql_field_type','mssql_free_result','mssql_free_statement',
            +            'mssql_get_last_message','mssql_guid_string','mssql_init',            'mssql_min_error_severity','mssql_min_message_severity',
            +            'mssql_next_result','mssql_num_fields','mssql_num_rows',            'mssql_pconnect','mssql_query','mssql_result','mssql_rows_affected',
            +            'mssql_select_db','mt_getrandmax','mt_rand','mt_srand','mysql',            'mysql_affected_rows','mysql_client_encoding','mysql_close',
            +            'mysql_connect','mysql_createdb','mysql_create_db',            'mysql_data_seek','mysql_dbname','mysql_db_name','mysql_db_query',
            +            'mysql_dropdb','mysql_drop_db','mysql_errno','mysql_error',            'mysql_escape_string','mysql_fetch_array','mysql_fetch_assoc',
            +            'mysql_fetch_field','mysql_fetch_lengths','mysql_fetch_object',            'mysql_fetch_row','mysql_fieldflags','mysql_fieldlen',
            +            'mysql_fieldname','mysql_fieldtable','mysql_fieldtype',            'mysql_field_flags','mysql_field_len','mysql_field_name',
            +            'mysql_field_seek','mysql_field_table','mysql_field_type',            'mysql_freeresult','mysql_free_result','mysql_get_client_info',
            +            'mysql_get_host_info','mysql_get_proto_info',            'mysql_get_server_info','mysql_info','mysql_insert_id',
            +            'mysql_listdbs','mysql_listfields','mysql_listtables',            'mysql_list_dbs','mysql_list_fields','mysql_list_processes',
            +            'mysql_list_tables','mysql_numfields','mysql_numrows',            'mysql_num_fields','mysql_num_rows','mysql_pconnect','mysql_ping',
            +            'mysql_query','mysql_real_escape_string','mysql_result',            'mysql_selectdb','mysql_select_db','mysql_set_charset','mysql_stat',
            +            'mysql_tablename','mysql_table_name','mysql_thread_id',            'mysql_unbuffered_query','mysqli_affected_rows','mysqli_autocommit',
            +            'mysqli_bind_param','mysqli_bind_result','mysqli_change_user',            'mysqli_character_set_name','mysqli_client_encoding','mysqli_close',
            +            'mysqli_commit','mysqli_connect','mysqli_connect_errno',            'mysqli_connect_error','mysqli_data_seek','mysqli_debug',
            +            'mysqli_disable_reads_from_master','mysqli_disable_rpl_parse',            'mysqli_dump_debug_info','mysqli_embedded_server_end',
            +            'mysqli_embedded_server_start','mysqli_enable_reads_from_master',            'mysqli_enable_rpl_parse','mysqli_errno','mysqli_error',
            +            'mysqli_escape_string','mysqli_execute','mysqli_fetch',            'mysqli_fetch_array','mysqli_fetch_assoc','mysqli_fetch_field',
            +            'mysqli_fetch_field_direct','mysqli_fetch_fields',            'mysqli_fetch_lengths','mysqli_fetch_object','mysqli_fetch_row',
            +            'mysqli_field_count','mysqli_field_seek','mysqli_field_tell',            'mysqli_free_result','mysqli_get_charset','mysqli_get_client_info',
            +            'mysqli_get_client_version','mysqli_get_host_info',            'mysqli_get_metadata','mysqli_get_proto_info',
            +            'mysqli_get_server_info','mysqli_get_server_version',            'mysqli_get_warnings','mysqli_info','mysqli_init',
            +            'mysqli_insert_id','mysqli_kill','mysqli_master_query',            'mysqli_more_results','mysqli_multi_query','mysqli_next_result',
            +            'mysqli_num_fields','mysqli_num_rows','mysqli_options',            'mysqli_param_count','mysqli_ping','mysqli_prepare','mysqli_query',
            +            'mysqli_real_connect','mysqli_real_escape_string',            'mysqli_real_query','mysqli_report','mysqli_rollback',
            +            'mysqli_rpl_parse_enabled','mysqli_rpl_probe',            'mysqli_rpl_query_type','mysqli_select_db','mysqli_send_long_data',
            +            'mysqli_send_query','mysqli_set_charset',            'mysqli_set_local_infile_default','mysqli_set_local_infile_handler',
            +            'mysqli_set_opt','mysqli_slave_query','mysqli_sqlstate',            'mysqli_ssl_set','mysqli_stat','mysqli_stmt_affected_rows',
            +            'mysqli_stmt_attr_get','mysqli_stmt_attr_set',            'mysqli_stmt_bind_param','mysqli_stmt_bind_result',
            +            'mysqli_stmt_close','mysqli_stmt_data_seek','mysqli_stmt_errno',            'mysqli_stmt_error','mysqli_stmt_execute','mysqli_stmt_fetch',
            +            'mysqli_stmt_field_count','mysqli_stmt_free_result',            'mysqli_stmt_get_warnings','mysqli_stmt_init',
            +            'mysqli_stmt_insert_id','mysqli_stmt_num_rows',            'mysqli_stmt_param_count','mysqli_stmt_prepare','mysqli_stmt_reset',
            +            'mysqli_stmt_result_metadata','mysqli_stmt_send_long_data',            'mysqli_stmt_sqlstate','mysqli_stmt_store_result',
            +            'mysqli_store_result','mysqli_thread_id','mysqli_thread_safe',            'mysqli_use_result','mysqli_warning_count','natcasesort','natsort',
            +            'new_xmldoc','next','ngettext','nl2br','nl_langinfo',            'ntuser_getdomaincontroller','ntuser_getusergroups',
            +            'ntuser_getuserinfo','ntuser_getuserlist','number_format',            'ob_clean','ob_deflatehandler','ob_end_clean','ob_end_flush',
            +            'ob_etaghandler','ob_flush','ob_get_clean','ob_get_contents',            'ob_get_flush','ob_get_length','ob_get_level','ob_get_status',
            +            'ob_gzhandler','ob_iconv_handler','ob_implicit_flush',            'ob_inflatehandler','ob_list_handlers','ob_start','ob_tidyhandler',
            +            'octdec','odbc_autocommit','odbc_binmode','odbc_close',            'odbc_close_all','odbc_columnprivileges','odbc_columns',
            +            'odbc_commit','odbc_connect','odbc_cursor','odbc_data_source',            'odbc_do','odbc_error','odbc_errormsg','odbc_exec','odbc_execute',
            +            'odbc_fetch_array','odbc_fetch_into','odbc_fetch_object',            'odbc_fetch_row','odbc_field_len','odbc_field_name',
            +            'odbc_field_num','odbc_field_precision','odbc_field_scale',            'odbc_field_type','odbc_foreignkeys','odbc_free_result',
            +            'odbc_gettypeinfo','odbc_longreadlen','odbc_next_result',            'odbc_num_fields','odbc_num_rows','odbc_pconnect','odbc_prepare',
            +            'odbc_primarykeys','odbc_procedurecolumns','odbc_procedures',            'odbc_result','odbc_result_all','odbc_rollback','odbc_setoption',
            +            'odbc_specialcolumns','odbc_statistics','odbc_tableprivileges',            'odbc_tables','opendir','openlog','openssl_csr_export',
            +            'openssl_csr_export_to_file','openssl_csr_get_public_key',            'openssl_csr_get_subject','openssl_csr_new','openssl_csr_sign',
            +            'openssl_error_string','openssl_free_key','openssl_get_privatekey',            'openssl_get_publickey','openssl_open','openssl_pkcs12_export',
            +            'openssl_pkcs12_export_to_file','openssl_pkcs12_read',            'openssl_pkcs7_decrypt','openssl_pkcs7_encrypt',
            +            'openssl_pkcs7_sign','openssl_pkcs7_verify','openssl_pkey_export',            'openssl_pkey_export_to_file','openssl_pkey_free',
            +            'openssl_pkey_get_details','openssl_pkey_get_private',            'openssl_pkey_get_public','openssl_pkey_new',
            +            'openssl_private_decrypt','openssl_private_encrypt',            'openssl_public_decrypt','openssl_public_encrypt','openssl_seal',
            +            'openssl_sign','openssl_verify','openssl_x509_checkpurpose',            'openssl_x509_check_private_key','openssl_x509_export',
            +            'openssl_x509_export_to_file','openssl_x509_free',            'openssl_x509_parse','openssl_x509_read','ord',
            +            'output_add_rewrite_var','output_reset_rewrite_vars','overload',            'outputdebugstring','pack','parse_ini_file','parse_str','parse_url',
            +            'parsekit_compile_file','parsekit_compile_string',            'parsekit_func_arginfo','parsekit_opcode_flags',
            +            'parsekit_opcode_name','passthru','pathinfo','pclose',            'pdf_add_bookmark','pdf_add_launchlink','pdf_add_locallink',
            +            'pdf_add_nameddest','pdf_add_note','pdf_add_pdflink',            'pdf_add_thumbnail','pdf_add_weblink','pdf_arc','pdf_arcn',
            +            'pdf_attach_file','pdf_begin_font','pdf_begin_glyph',            'pdf_begin_page','pdf_begin_pattern','pdf_begin_template',
            +            'pdf_circle','pdf_clip','pdf_close','pdf_close_image',            'pdf_close_pdi','pdf_close_pdi_page','pdf_closepath',
            +            'pdf_closepath_fill_stroke','pdf_closepath_stroke','pdf_concat',            'pdf_continue_text','pdf_create_gstate','pdf_create_pvf',
            +            'pdf_curveto','pdf_delete','pdf_delete_pvf','pdf_encoding_set_char',            'pdf_end_font','pdf_end_glyph','pdf_end_page','pdf_end_pattern',
            +            'pdf_end_template','pdf_endpath','pdf_fill','pdf_fill_imageblock',            'pdf_fill_pdfblock','pdf_fill_stroke','pdf_fill_textblock',
            +            'pdf_findfont','pdf_fit_image','pdf_fit_pdi_page',            'pdf_fit_textline','pdf_get_apiname','pdf_get_buffer',
            +            'pdf_get_errmsg','pdf_get_errnum','pdf_get_parameter',            'pdf_get_pdi_parameter','pdf_get_pdi_value','pdf_get_value',
            +            'pdf_initgraphics','pdf_lineto','pdf_load_font',            'pdf_load_iccprofile','pdf_load_image','pdf_makespotcolor',
            +            'pdf_moveto','pdf_new','pdf_open_ccitt','pdf_open_file',            'pdf_open_image','pdf_open_image_file','pdf_open_pdi',
            +            'pdf_open_pdi_page','pdf_place_image','pdf_place_pdi_page',            'pdf_process_pdi','pdf_rect','pdf_restore','pdf_rotate','pdf_save',
            +            'pdf_scale','pdf_set_border_color','pdf_set_border_dash',            'pdf_set_border_style','pdf_set_gstate','pdf_set_info',
            +            'pdf_set_parameter','pdf_set_text_pos','pdf_set_value',            'pdf_setcolor','pdf_setdash','pdf_setdashpattern','pdf_setflat',
            +            'pdf_setfont','pdf_setlinecap','pdf_setlinejoin','pdf_setlinewidth',            'pdf_setmatrix','pdf_setmiterlimit','pdf_setpolydash','pdf_shading',
            +            'pdf_shading_pattern','pdf_shfill','pdf_show','pdf_show_boxed',            'pdf_show_xy','pdf_skew','pdf_stringwidth','pdf_stroke',
            +            'pdf_translate','pdo_drivers','pfsockopen','pg_affected_rows',            'pg_cancel_query','pg_clientencoding','pg_client_encoding',
            +            'pg_close','pg_cmdtuples','pg_connect','pg_connection_busy',            'pg_connection_reset','pg_connection_status','pg_convert',
            +            'pg_copy_from','pg_copy_to','pg_dbname','pg_delete','pg_end_copy',            'pg_errormessage','pg_escape_bytea','pg_escape_string','pg_exec',
            +            'pg_execute','pg_fetch_all','pg_fetch_all_columns','pg_fetch_array',            'pg_fetch_assoc','pg_fetch_object','pg_fetch_result','pg_fetch_row',
            +            'pg_fieldisnull','pg_fieldname','pg_fieldnum','pg_fieldprtlen',            'pg_fieldsize','pg_fieldtype','pg_field_is_null','pg_field_name',
            +            'pg_field_num','pg_field_prtlen','pg_field_size','pg_field_table',            'pg_field_type','pg_field_type_oid','pg_free_result',
            +            'pg_freeresult','pg_get_notify','pg_get_pid','pg_get_result',            'pg_getlastoid','pg_host','pg_insert','pg_last_error',
            +            'pg_last_notice','pg_last_oid','pg_loclose','pg_locreate',            'pg_loexport','pg_loimport','pg_loopen','pg_loread','pg_loreadall',
            +            'pg_lounlink','pg_lowrite','pg_lo_close','pg_lo_create',            'pg_lo_export','pg_lo_import','pg_lo_open','pg_lo_read',
            +            'pg_lo_read_all','pg_lo_seek','pg_lo_tell','pg_lo_unlink',            'pg_lo_write','pg_meta_data','pg_numfields','pg_numrows',
            +            'pg_num_fields','pg_num_rows','pg_options','pg_parameter_status',            'pg_pconnect','pg_ping','pg_port','pg_prepare','pg_put_line',
            +            'pg_query','pg_query_params','pg_result','pg_result_error',            'pg_result_error_field','pg_result_seek','pg_result_status',
            +            'pg_select','pg_send_execute','pg_send_prepare','pg_send_query',            'pg_send_query_params','pg_set_client_encoding',
            +            'pg_set_error_verbosity','pg_setclientencoding','pg_trace',            'pg_transaction_status','pg_tty','pg_unescape_bytea','pg_untrace',
            +            'pg_update','pg_version','php_egg_logo_guid','php_ini_loaded_file',            'php_ini_scanned_files','php_logo_guid','php_real_logo_guid',
            +            'php_sapi_name','php_strip_whitespace','php_uname','phpcredits',            'phpdoc_xml_from_string','phpinfo','phpversion','pi','png2wbmp',
            +            'pop3_close','pop3_delete_message','pop3_get_account_size',            'pop3_get_message','pop3_get_message_count',
            +            'pop3_get_message_header','pop3_get_message_ids',            'pop3_get_message_size','pop3_get_message_sizes','pop3_open',
            +            'pop3_undelete','popen','pos','posix_ctermid','posix_errno',            'posix_getcwd','posix_getegid','posix_geteuid','posix_getgid',
            +            'posix_getgrgid','posix_getgrnam','posix_getgroups',            'posix_getlogin','posix_getpgid','posix_getpgrp','posix_getpid',
            +            'posix_getppid','posix_getpwnam','posix_getpwuid','posix_getrlimit',            'posix_getsid','posix_getuid','posix_get_last_error','posix_isatty',
            +            'posix_kill','posix_mkfifo','posix_setegid','posix_seteuid',            'posix_setgid','posix_setpgid','posix_setsid','posix_setuid',
            +            'posix_strerror','posix_times','posix_ttyname','posix_uname','pow',            'preg_grep','preg_last_error','preg_match','preg_match_all',
            +            'preg_quote','preg_replace','preg_replace_callback','preg_split',            'prev','print_r','printf','proc_close','proc_get_status',
            +            'proc_open','proc_terminate','putenv','quoted_printable_decode',            'quotemeta','rad2deg','radius_acct_open','radius_add_server',
            +            'radius_auth_open','radius_close','radius_config',            'radius_create_request','radius_cvt_addr','radius_cvt_int',
            +            'radius_cvt_string','radius_demangle','radius_demangle_mppe_key',            'radius_get_attr','radius_get_vendor_attr','radius_put_addr',
            +            'radius_put_attr','radius_put_int','radius_put_string',            'radius_put_vendor_addr','radius_put_vendor_attr',
            +            'radius_put_vendor_int','radius_put_vendor_string',            'radius_request_authenticator','radius_send_request',
            +            'radius_server_secret','radius_strerror','rand','range',            'rawurldecode','rawurlencode','read_exif_data','readdir','readfile',
            +            'readgzfile','readlink','realpath','reg_close_key','reg_create_key',            'reg_enum_key','reg_enum_value','reg_get_value','reg_open_key',
            +            'reg_set_value','register_shutdown_function',            'register_tick_function','rename','res_close','res_get','res_list',
            +            'res_list_type','res_open','res_set','reset',            'restore_error_handler','restore_include_path','rewind','rewinddir',
            +            'rmdir','round','rsort','rtrim','runkit_class_adopt',            'runkit_class_emancipate','runkit_constant_add',
            +            'runkit_constant_redefine','runkit_constant_remove',            'runkit_default_property_add','runkit_function_add',
            +            'runkit_function_copy','runkit_function_redefine',            'runkit_function_remove','runkit_function_rename','runkit_import',
            +            'runkit_lint','runkit_lint_file','runkit_method_add',            'runkit_method_copy','runkit_method_redefine',
            +            'runkit_method_remove','runkit_method_rename','runkit_object_id',            'runkit_return_value_used','runkit_sandbox_output_handler',
            +            'runkit_superglobals','runkit_zval_inspect','scandir','sem_acquire',            'sem_get','sem_release','sem_remove','serialize',
            +            'session_cache_expire','session_cache_limiter','session_commit',            'session_decode','session_destroy','session_encode',
            +            'session_get_cookie_params','session_id','session_is_registered',            'session_module_name','session_name','session_regenerate_id',
            +            'session_register','session_save_path','session_set_cookie_params',            'session_set_save_handler','session_start','session_unregister',
            +            'session_unset','session_write_close','set_content',            'set_error_handler','set_file_buffer','set_include_path',
            +            'set_magic_quotes_runtime','set_socket_blocking','set_time_limit',            'setcookie','setlocale','setrawcookie','settype','sha1','sha1_file',
            +            'shell_exec','shmop_close','shmop_delete','shmop_open','shmop_read',            'shmop_size','shmop_write','shm_attach','shm_detach','shm_get_var',
            +            'shm_put_var','shm_remove','shm_remove_var','show_source','shuffle',            'similar_text','simplexml_import_dom','simplexml_load_file',
            +            'simplexml_load_string','sin','sinh','sizeof','sleep','smtp_close',            'smtp_cmd_data','smtp_cmd_mail','smtp_cmd_rcpt','smtp_connect',
            +            'snmp_get_quick_print','snmp_get_valueretrieval','snmp_read_mib',            'snmp_set_quick_print','snmp_set_valueretrieval','snmp2_get',
            +            'snmp2_getnext','snmp2_real_walk','snmp2_set','snmp2_walk',            'snmp3_get','snmp3_getnext','snmp3_real_walk','snmp3_set',
            +            'snmp3_walk','snmpget','snmpgetnext','snmprealwalk','snmpset',            'snmpwalk','snmpwalkoid','socket_accept','socket_bind',
            +            'socket_clear_error','socket_close','socket_connect',            'socket_create','socket_create_listen','socket_create_pair',
            +            'socket_getopt','socket_getpeername','socket_getsockname',            'socket_get_option','socket_get_status','socket_iovec_add',
            +            'socket_iovec_alloc','socket_iovec_delete','socket_iovec_fetch',            'socket_iovec_free','socket_iovec_set','socket_last_error',
            +            'socket_listen','socket_read','socket_readv','socket_recv',            'socket_recvfrom','socket_recvmsg','socket_select','socket_send',
            +            'socket_sendmsg','socket_sendto','socket_setopt','socket_set_block',            'socket_set_blocking','socket_set_nonblock','socket_set_option',
            +            'socket_set_timeout','socket_shutdown','socket_strerror',            'socket_write','socket_writev','sort','soundex','spl_autoload',
            +            'spl_autoload_call','spl_autoload_extensions',            'spl_autoload_functions','spl_autoload_register',
            +            'spl_autoload_unregister','spl_classes','spl_object_hash','split',            'spliti','sprintf','sql_regcase','sqlite_array_query',
            +            'sqlite_busy_timeout','sqlite_changes','sqlite_close',            'sqlite_column','sqlite_create_aggregate','sqlite_create_function',
            +            'sqlite_current','sqlite_error_string','sqlite_escape_string',            'sqlite_exec','sqlite_factory','sqlite_fetch_all',
            +            'sqlite_fetch_array','sqlite_fetch_column_types',            'sqlite_fetch_object','sqlite_fetch_single','sqlite_fetch_string',
            +            'sqlite_field_name','sqlite_has_more','sqlite_has_prev',            'sqlite_last_error','sqlite_last_insert_rowid','sqlite_libencoding',
            +            'sqlite_libversion','sqlite_next','sqlite_num_fields',            'sqlite_num_rows','sqlite_open','sqlite_popen','sqlite_prev',
            +            'sqlite_query','sqlite_rewind','sqlite_seek','sqlite_single_query',            'sqlite_udf_decode_binary','sqlite_udf_encode_binary',
            +            'sqlite_unbuffered_query','sqlite_valid','sqrt','srand','sscanf',            'ssh2_auth_hostbased_file','ssh2_auth_none','ssh2_auth_password',
            +            'ssh2_auth_pubkey_file','ssh2_connect','ssh2_exec',            'ssh2_fetch_stream','ssh2_fingerprint','ssh2_forward_accept',
            +            'ssh2_forward_listen','ssh2_methods_negotiated','ssh2_poll',            'ssh2_publickey_add','ssh2_publickey_init','ssh2_publickey_list',
            +            'ssh2_publickey_remove','ssh2_scp_recv','ssh2_scp_send','ssh2_sftp',            'ssh2_sftp_lstat','ssh2_sftp_mkdir','ssh2_sftp_readlink',
            +            'ssh2_sftp_realpath','ssh2_sftp_rename','ssh2_sftp_rmdir',            'ssh2_sftp_stat','ssh2_sftp_symlink','ssh2_sftp_unlink',
            +            'ssh2_shell','ssh2_tunnel','stat','stats_absolute_deviation',            'stats_cdf_beta','stats_cdf_binomial','stats_cdf_cauchy',
            +            'stats_cdf_chisquare','stats_cdf_exponential','stats_cdf_f',            'stats_cdf_gamma','stats_cdf_laplace','stats_cdf_logistic',
            +            'stats_cdf_negative_binomial','stats_cdf_noncentral_chisquare',            'stats_cdf_noncentral_f','stats_cdf_noncentral_t',
            +            'stats_cdf_normal','stats_cdf_poisson','stats_cdf_t',            'stats_cdf_uniform','stats_cdf_weibull','stats_covariance',
            +            'stats_dens_beta','stats_dens_cauchy','stats_dens_chisquare',            'stats_dens_exponential','stats_dens_f','stats_dens_gamma',
            +            'stats_dens_laplace','stats_dens_logistic','stats_dens_normal',            'stats_dens_pmf_binomial','stats_dens_pmf_hypergeometric',
            +            'stats_dens_pmf_negative_binomial','stats_dens_pmf_poisson',            'stats_dens_t','stats_dens_uniform','stats_dens_weibull',
            +            'stats_harmonic_mean','stats_kurtosis','stats_rand_gen_beta',            'stats_rand_gen_chisquare','stats_rand_gen_exponential',
            +            'stats_rand_gen_f','stats_rand_gen_funiform','stats_rand_gen_gamma',            'stats_rand_gen_ipoisson','stats_rand_gen_iuniform',
            +            'stats_rand_gen_noncenral_f','stats_rand_gen_noncentral_chisquare',            'stats_rand_gen_noncentral_t','stats_rand_gen_normal',
            +            'stats_rand_gen_t','stats_rand_getsd','stats_rand_ibinomial',            'stats_rand_ibinomial_negative','stats_rand_ignlgi',
            +            'stats_rand_phrase_to_seeds','stats_rand_ranf','stats_rand_setall',            'stats_skew','stats_standard_deviation','stats_stat_binomial_coef',
            +            'stats_stat_correlation','stats_stat_factorial',            'stats_stat_independent_t','stats_stat_innerproduct',
            +            'stats_stat_paired_t','stats_stat_percentile','stats_stat_powersum',            'stats_variance','strcasecmp','strchr','strcmp','strcoll','strcspn',
            +            'stream_bucket_append','stream_bucket_make_writeable',            'stream_bucket_new','stream_bucket_prepend','stream_context_create',
            +            'stream_context_get_default','stream_context_get_options',            'stream_context_set_default','stream_context_set_option',
            +            'stream_context_set_params','stream_copy_to_stream',            'stream_encoding','stream_filter_append','stream_filter_prepend',
            +            'stream_filter_register','stream_filter_remove',            'stream_get_contents','stream_get_filters','stream_get_line',
            +            'stream_get_meta_data','stream_get_transports',            'stream_get_wrappers','stream_is_local',
            +            'stream_notification_callback','stream_register_wrapper',            'stream_resolve_include_path','stream_select','stream_set_blocking',
            +            'stream_set_timeout','stream_set_write_buffer',            'stream_socket_accept','stream_socket_client',
            +            'stream_socket_enable_crypto','stream_socket_get_name',            'stream_socket_pair','stream_socket_recvfrom',
            +            'stream_socket_sendto','stream_socket_server',            'stream_socket_shutdown','stream_supports_lock',
            +            'stream_wrapper_register','stream_wrapper_restore',            'stream_wrapper_unregister','strftime','stripcslashes','stripos',
            +            'stripslashes','strip_tags','stristr','strlen','strnatcasecmp',            'strnatcmp','strpbrk','strncasecmp','strncmp','strpos','strrchr',
            +            'strrev','strripos','strrpos','strspn','strstr','strtok',            'strtolower','strtotime','strtoupper','strtr','strval',
            +            'str_ireplace','str_pad','str_repeat','str_replace','str_rot13',            'str_split','str_shuffle','str_word_count','substr',
            +            'substr_compare','substr_count','substr_replace','svn_add',            'svn_auth_get_parameter','svn_auth_set_parameter','svn_cat',
            +            'svn_checkout','svn_cleanup','svn_client_version','svn_commit',            'svn_diff','svn_export','svn_fs_abort_txn','svn_fs_apply_text',
            +            'svn_fs_begin_txn2','svn_fs_change_node_prop','svn_fs_check_path',            'svn_fs_contents_changed','svn_fs_copy','svn_fs_delete',
            +            'svn_fs_dir_entries','svn_fs_file_contents','svn_fs_file_length',            'svn_fs_is_dir','svn_fs_is_file','svn_fs_make_dir',
            +            'svn_fs_make_file','svn_fs_node_created_rev','svn_fs_node_prop',            'svn_fs_props_changed','svn_fs_revision_prop',
            +            'svn_fs_revision_root','svn_fs_txn_root','svn_fs_youngest_rev',            'svn_import','svn_info','svn_log','svn_ls','svn_repos_create',
            +            'svn_repos_fs','svn_repos_fs_begin_txn_for_commit',            'svn_repos_fs_commit_txn','svn_repos_hotcopy','svn_repos_open',
            +            'svn_repos_recover','svn_status','svn_update','symlink',            'sys_get_temp_dir','syslog','system','tan','tanh','tempnam',
            +            'textdomain','thread_get','thread_include','thread_lock',            'thread_lock_try','thread_mutex_destroy','thread_mutex_init',
            +            'thread_set','thread_start','thread_unlock','tidy_access_count',            'tidy_clean_repair','tidy_config_count','tidy_diagnose',
            +            'tidy_error_count','tidy_get_body','tidy_get_config',            'tidy_get_error_buffer','tidy_get_head','tidy_get_html',
            +            'tidy_get_html_ver','tidy_get_output','tidy_get_release',            'tidy_get_root','tidy_get_status','tidy_getopt','tidy_is_xhtml',
            +            'tidy_is_xml','tidy_parse_file','tidy_parse_string',            'tidy_repair_file','tidy_repair_string','tidy_warning_count','time',
            +            'timezone_abbreviations_list','timezone_identifiers_list',            'timezone_name_from_abbr','timezone_name_get','timezone_offset_get',
            +            'timezone_open','timezone_transitions_get','tmpfile',            'token_get_all','token_name','touch','trigger_error',
            +            'transliterate','transliterate_filters_get','trim','uasort',            'ucfirst','ucwords','uksort','umask','uniqid','unixtojd','unlink',
            +            'unpack','unregister_tick_function','unserialize','unset',            'urldecode','urlencode','user_error','use_soap_error_handler',
            +            'usleep','usort','utf8_decode','utf8_encode','var_dump',            'var_export','variant_abs','variant_add','variant_and',
            +            'variant_cast','variant_cat','variant_cmp',            'variant_date_from_timestamp','variant_date_to_timestamp',
            +            'variant_div','variant_eqv','variant_fix','variant_get_type',            'variant_idiv','variant_imp','variant_int','variant_mod',
            +            'variant_mul','variant_neg','variant_not','variant_or',            'variant_pow','variant_round','variant_set','variant_set_type',
            +            'variant_sub','variant_xor','version_compare','virtual','vfprintf',            'vprintf','vsprintf','wddx_add_vars','wddx_deserialize',
            +            'wddx_packet_end','wddx_packet_start','wddx_serialize_value',            'wddx_serialize_vars','win_beep','win_browse_file',
            +            'win_browse_folder','win_create_link','win_message_box',            'win_play_wav','win_shell_execute','win32_create_service',
            +            'win32_delete_service','win32_get_last_control_message',            'win32_ps_list_procs','win32_ps_stat_mem','win32_ps_stat_proc',
            +            'win32_query_service_status','win32_scheduler_delete_task',            'win32_scheduler_enum_tasks','win32_scheduler_get_task_info',
            +            'win32_scheduler_run','win32_scheduler_set_task_info',            'win32_set_service_status','win32_start_service',
            +            'win32_start_service_ctrl_dispatcher','win32_stop_service',            'wordwrap','xml_error_string','xml_get_current_byte_index',
            +            'xml_get_current_column_number','xml_get_current_line_number',            'xml_get_error_code','xml_parse','xml_parser_create',
            +            'xml_parser_create_ns','xml_parser_free','xml_parser_get_option',            'xml_parser_set_option','xml_parse_into_struct',
            +            'xml_set_character_data_handler','xml_set_default_handler',            'xml_set_element_handler','xml_set_end_namespace_decl_handler',
            +            'xml_set_external_entity_ref_handler',            'xml_set_notation_decl_handler','xml_set_object',
            +            'xml_set_processing_instruction_handler',            'xml_set_start_namespace_decl_handler',
            +            'xml_set_unparsed_entity_decl_handler','xmldoc','xmldocfile',            'xmlrpc_decode','xmlrpc_decode_request','xmlrpc_encode',
            +            'xmlrpc_encode_request','xmlrpc_get_type','xmlrpc_is_fault',            'xmlrpc_parse_method_descriptions',
            +            'xmlrpc_server_add_introspection_data','xmlrpc_server_call_method',            'xmlrpc_server_create','xmlrpc_server_destroy',
            +            'xmlrpc_server_register_introspection_callback',            'xmlrpc_server_register_method','xmlrpc_set_type','xmltree',
            +            'xmlwriter_end_attribute','xmlwriter_end_cdata',            'xmlwriter_end_comment','xmlwriter_end_document',
            +            'xmlwriter_end_dtd','xmlwriter_end_dtd_attlist',            'xmlwriter_end_dtd_element','xmlwriter_end_dtd_entity',
            +            'xmlwriter_end_element','xmlwriter_end_pi','xmlwriter_flush',            'xmlwriter_full_end_element','xmlwriter_open_memory',
            +            'xmlwriter_open_uri','xmlwriter_output_memory',            'xmlwriter_set_indent','xmlwriter_set_indent_string',
            +            'xmlwriter_start_attribute','xmlwriter_start_attribute_ns',            'xmlwriter_start_cdata','xmlwriter_start_comment',
            +            'xmlwriter_start_document','xmlwriter_start_dtd',            'xmlwriter_start_dtd_attlist','xmlwriter_start_dtd_element',
            +            'xmlwriter_start_dtd_entity','xmlwriter_start_element',            'xmlwriter_start_element_ns','xmlwriter_start_pi','xmlwriter_text',
            +            'xmlwriter_write_attribute','xmlwriter_write_attribute_ns',            'xmlwriter_write_cdata','xmlwriter_write_comment',
            +            'xmlwriter_write_dtd','xmlwriter_write_dtd_attlist',            'xmlwriter_write_dtd_element','xmlwriter_write_dtd_entity',
            +            'xmlwriter_write_element','xmlwriter_write_element_ns',            'xmlwriter_write_pi','xmlwriter_write_raw','xpath_eval',
            +            'xpath_eval_expression','xpath_new_context','xpath_register_ns',            'xpath_register_ns_auto','xptr_eval','xptr_new_context','yp_all',
            +            'yp_cat','yp_errno','yp_err_string','yp_first',            'yp_get_default_domain','yp_master','yp_match','yp_next','yp_order',
            +            'zend_current_obfuscation_level','zend_get_cfg_var','zend_get_id',            'zend_loader_current_file','zend_loader_enabled',
            +            'zend_loader_file_encoded','zend_loader_file_licensed',            'zend_loader_install_license','zend_loader_version',
            +            'zend_logo_guid','zend_match_hostmasks','zend_obfuscate_class_name',            'zend_obfuscate_function_name','zend_optimizer_version',
            +            'zend_runtime_obfuscate','zend_version','zip_close',            'zip_entry_close','zip_entry_compressedsize',
            +            'zip_entry_compressionmethod','zip_entry_filesize','zip_entry_name',            'zip_entry_open','zip_entry_read','zip_open','zip_read',
            +            'zlib_get_coding_type'            ),
            +        4 => array(            'DEFAULT_INCLUDE_PATH', 'DIRECTORY_SEPARATOR', 'E_ALL',
            +            'E_COMPILE_ERROR', 'E_COMPILE_WARNING', 'E_CORE_ERROR',            'E_CORE_WARNING', 'E_ERROR', 'E_NOTICE', 'E_PARSE', 'E_STRICT',
            +            'E_USER_ERROR', 'E_USER_NOTICE', 'E_USER_WARNING', 'E_WARNING',            'ENT_COMPAT','ENT_QUOTES','ENT_NOQUOTES',
            +            'false', 'null', 'PEAR_EXTENSION_DIR', 'PEAR_INSTALL_DIR',            'PHP_BINDIR', 'PHP_CONFIG_FILE_PATH', 'PHP_DATADIR',
            +            'PHP_EXTENSION_DIR', 'PHP_LIBDIR',            'PHP_LOCALSTATEDIR', 'PHP_OS',
            +            'PHP_OUTPUT_HANDLER_CONT', 'PHP_OUTPUT_HANDLER_END',            'PHP_OUTPUT_HANDLER_START', 'PHP_SYSCONFDIR',
            +            'PHP_VERSION', 'true', '__CLASS__', '__FILE__', '__FUNCTION__',            '__LINE__', '__METHOD__'
            +            )        ),
            +    'SYMBOLS' => array(        1 => array(
            +            '<'.'%', '<'.'%=', '%'.'>', '<'.'?', '<'.'?=', '?'.'>'            ),
            +        0 => array(            '(', ')', '[', ']', '{', '}',
            +            '!', '@', '%', '&', '|', '/',            '<', '>',
            +            '=', '-', '+', '*',            '.', ':', ',', ';'
            +            )        ),
            +    'CASE_SENSITIVE' => array(        GESHI_COMMENTS => false,
            +        1 => false,        2 => false,
            +        3 => false,        4 => false
            +        ),    'STYLES' => array(
            +        'KEYWORDS' => array(            1 => 'color: #b1b100;',
            +            2 => 'color: #000000; font-weight: bold;',            3 => 'color: #990000;',
            +            4 => 'color: #009900; font-weight: bold;'            ),
            +        'COMMENTS' => array(            1 => 'color: #666666; font-style: italic;',
            +            2 => 'color: #666666; font-style: italic;',            3 => 'color: #0000cc; font-style: italic;',
            +            4 => 'color: #009933; font-style: italic;',            'MULTI' => 'color: #666666; font-style: italic;'
            +            ),        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;',            1 => 'color: #000099; font-weight: bold;',
            +            2 => 'color: #660099; font-weight: bold;',            3 => 'color: #660099; font-weight: bold;',
            +            4 => 'color: #006699; font-weight: bold;',            5 => 'color: #006699; font-weight: bold; font-style: italic;',
            +            6 => 'color: #009933; font-weight: bold;',            'HARD' => 'color: #000099; font-weight: bold;'
            +            ),        'BRACKETS' => array(
            +            0 => 'color: #009900;'            ),
            +        'STRINGS' => array(            0 => 'color: #0000ff;',
            +            'HARD' => 'color: #0000ff;'            ),
            +        'NUMBERS' => array(            0 => 'color: #cc66cc;',
            +            GESHI_NUMBER_OCT_PREFIX => 'color: #208080;',            GESHI_NUMBER_HEX_PREFIX => 'color: #208080;',
            +            GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;',            ),
            +        'METHODS' => array(            1 => 'color: #004000;',
            +            2 => 'color: #004000;'            ),
            +        'SYMBOLS' => array(            0 => 'color: #339933;',
            +            1 => 'color: #000000; font-weight: bold;'            ),
            +        'REGEXPS' => array(            0 => 'color: #000088;'
            +            ),        'SCRIPT' => array(
            +            0 => '',            1 => '',
            +            2 => '',            3 => '',
            +            4 => '',            5 => ''
            +            )        ),
            +    'URLS' => array(        1 => '',
            +        2 => '',        3 => 'http://www.php.net/{FNAMEL}',
            +        4 => ''        ),
            +    'OOLANG' => true,    'OBJECT_SPLITTERS' => array(
            +        1 => '-&gt;',        2 => '::'
            +        ),    'REGEXPS' => array(
            +        //Variables        0 => "[\\$]+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*"
            +        ),    'STRICT_MODE_APPLIES' => GESHI_MAYBE,
            +    'SCRIPT_DELIMITERS' => array(        0 => array(
            +            '<'.'?php' => '?'.'>'            ),
            +        1 => array(            '<'.'?' => '?'.'>'
            +            ),        2 => array(
            +            '<'.'%' => '%'.'>'            ),
            +        3 => array(            '<script language="php">' => '</script>'
            +            ),        4 => "/(?P<start><\\?(?>php\b)?)(?:".
            +            "(?>[^\"'?\\/<]+)|".            "\\?(?!>)|".
            +            "(?>'(?>[^'\\\\]|\\\\'|\\\\\\\|\\\\)*')|".            "(?>\"(?>[^\"\\\\]|\\\\\"|\\\\\\\\|\\\\)*\")|".
            +            "(?>\\/\\*(?>[^\\*]|(?!\\*\\/)\\*)*\\*\\/)|".            "\\/\\/(?>.*?(?:\\?>|$))|".
            +            "#(?>.*?(?:\\?>|$))|".            "\\/(?=[^*\\/])|".
            +            "<(?!<<)|".            "<<<(?P<phpdoc>\w+)\s.*?\s\k<phpdoc>".
            +            ")*?(?P<end>\\?>|\Z)/sm",        5 => "/(?P<start><%)(?:".
            +            "(?>[^\"'%\\/<]+)|".            "%(?!>)|".
            +            "(?>'(?>[^'\\\\]|\\\\'|\\\\\\\|\\\\)*')|".            "(?>\"(?>[^\\\"\\\\]|\\\\\"|\\\\\\\\|\\\\)*\")|".
            +            "(?>\\/\\*(?>[^\\*]|(?!\\*\\/)\\*)*\\*\\/)|".            "\\/\\/(?>.*?(?:%>|$))|".
            +            "#(?>.*?(?:%>|$))|".            "\\/(?=[^*\\/])|".
            +            "<(?!<<)|".            "<<<(?P<phpdoc>\w+)\s.*?\s\k<phpdoc>".
            +            ")*?(?P<end>%>|\Z)/sm",        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(        0 => true,
            +        1 => true,        2 => true,
            +        3 => true,        4 => true,
            +        5 => true        ),
            +    'TAB_WIDTH' => 4);
            + ?>
            + +

            If you’re remotely familiar with PHP (or even if you’re not), you can see that all that a language file consists of is +a glorified variable assignment. Easy! All a language file does is assign a variable $language_data. Though +still, there’s a lot of indices to that array… but this section is here to break each index down and explain it to you.

            + +

            4.2 Language File Conventions

            + +

            There are several conventions that are used in language files. For ease of use and readability, your language +files should obey the following rules:

            + +
              +
            • Indentation is 4 spaces, not tabs: Use spaces! as editors continiously screw up tabs there should be +no tabs in your documents since it would look differently on every computer otherwise.
            • +
            • Strings are in single quotes: Every string in a language file should be in single quotes (‘), unless you are +specifying a single quote as a quotemark or escape character, in which case they can be in double quotes for +readability; or if you are specifying a REGEXP (see below). This ensures that the language file can be loaded +as fast as possible by PHP as unnecessary parsing can be avoided.
            • +
            • Large arrays are multi-lined: An array with more than three or four values should be broken into multiple +lines. In any case, lines should not be wider than a full-screen window (about 100 chars per line max). +Don’t break the keywords arrays after every keyword.
            • +
            • Ending brackets for multi-lined arrays on a new line: Also with a comma after them, unless the array is +the last one in a parent array. See the PHP language file for examples of where to use commas.
            • +
            • Use GeSHi’s constants: For capatalisation, regular expressions etc. use the GeSHi constants, not +their actual values.
            • +
            • Verbatim header format: Copy the file header verbatim from other language files and modify the values +afterwards. Don’t try to invent own header formats, as your languages else will fail validation!
            • +
            + +

            There are more notes on each convention where it may appear in the language file sections below.

            + +

            4.3 Language File Sections

            + +

            This section will look at all the sections of a language file, and how they relate to the final highlighting result.

            + +

            4.3.1 The Header

            + +

            The header of a language file is the first lines with the big comment and the start of the variable +$language_data:

            + +
            PHP code
            1
            +23
            +45
            +67
            +89
            +1011
            +1213
            +1415
            +1617
            +1819
            +2021
            +2223
            +2425
            +2627
            +2829
            +3031
            +3233
            +3435
            +3637
            +3839
            +4041
            +4243
            +
            <?php
            +/************************************************************************************* * <name-of-language-file.php>
            + * --------------------------------- * Author: <name> (<e-mail address>)
            + * Copyright: (c) 2008 <name> (<website URL>) * Release Version: <GeSHi release>
            + * Date Started: <date started> *
            + * <name-of-language> language file for GeSHi. *
            + * <any-comments...> *
            + * CHANGES * -------
            + * <date-of-release> (<GeSHi release>) *  -  First Release
            + * * TODO (updated <date-of-release>)
            + * ------------------------- * <things-to-do>
            + * *************************************************************************************
            + * *     This file is part of GeSHi.
            + * *   GeSHi is free software; you can redistribute it and/or modify
            + *   it under the terms of the GNU General Public License as published by *   the Free Software Foundation; either version 2 of the License, or
            + *   (at your option) any later version. *
            + *   GeSHi is distributed in the hope that it will be useful, *   but WITHOUT ANY WARRANTY; without even the implied warranty of
            + *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the *   GNU General Public License for more details.
            + * *   You should have received a copy of the GNU General Public License
            + *   along with GeSHi; if not, write to the Free Software *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
            + * ************************************************************************************/
            + $language_data = array (
            + +

            The parts in angle brackets are the parts that you change for your language file. Everything else must remain the same!

            + +

            Here are the parts you should change:

            + +
              +
            • <name-of-language-file.php> - This should become the name of your language file. Language file names are in +lower case and contain only alphanumeric characters, dashes and underscores. Language files end with .php (which +you should put with the name of your language file, eg language.php)
            • +
            • <name> - Your name, or alias.
            • +
            • <e-mail address> - Your e-mail address. If you want your language file included with GeSHi you must +include an e-mail address that refers to an inbox controlled by you.
            • +
            • <website> - A URL of a website of yours (perhaps to a page that deals with your contribution to GeSHi, or +your home page/blog)
            • +
            • <date-started> - The date you started working on the language file. If you can’t remember, guestimate.
            • +
            • <name-of-language> - The name of the language you made this language file for (probably similar to +the language file name).
            • +
            • <any-comments> - Any comments you have to make about this language file, perhaps on where you got the keywords for, +what dialect of the language this language file is for etc etc. If you don’t have any comments, remove the space for them.
            • +
            • <date-of-release - The date you released the language file to the public. If you simply send it to me for inclusion +in a new GeSHi and don’t release it, leave this blank, and I’ll replace it with the date of the GeSHi release that +it is first added to.
            • +
            • <GeSHi release> - This is the version of the release that will contain the changes you made. +So if you have version 1.0.8 of GeSHi running this will be the next version to be released, e.g. 1.0.8.1.
            • +
            + +

            Everything should remain the same.

            + +

            Also: I’m not sure about the copyright on a new language file. I’m not a lawyer, could someone contact me about +whether the copyright for a new language file should be exclusivly the authors, or joint with me (if included in a +GeSHi release)?

            + +

            4.3.2 The First Indices

            + +

            Here is an example from the php language file of the first indices:

            + +
            PHP code
            1
            +23
            +45
            +6
            'LANG_NAME' => 'PHP',
            +'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),'COMMENT_MULTI' => array('/*' => '*/'),
            +'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,'QUOTEMARKS' => array("'", '"'),
            +'ESCAPE_CHAR' => '\\',
            + +

            The first indices are the first few lines of a language file before the KEYWORDS index. These indices specify:

            + +
              +
            • ‘LANG_NAME’: The name of the language. This name should be a human-readable version of the name +(e.g. HTML 4 (transitional) instead of html4trans)
            • +
            • ‘COMMENT_SINGLE’: An array of single-line comments in your language, indexed by integers starting +from 1. A single line comment is a comment that starts at the marker and goes until the end of the line. These +comments may be any length > 0, and since they can be styled individually, can be used for other things than comments +(for example the Java language file defines “import” as a single line comment). If you are making a language that +uses a ’ (apostrophe) as a comment (or in the comment marker somewhere), use double quotes. e.g.: “’”
            • +
            • ‘COMMENT_MULTI’: Used to specify multiline comments, an array in the form ‘OPEN’ => ‘CLOSE’. Unfortunately, +all of these comments you add here will be styled the same way (an area of improvement for GeSHi 1.2.X). +These comment markers may be any length > 0.
            • +
            • ‘CASE_KEYWORDS’: Used to set whether the case of keywords should be changed automatically as they are found. +For example, in an SQL or BASIC dialect you may want all keywords to be upper case. The accepted values for this are:
            • +
            • GESHI_CAPS_UPPER: Convert the case of all keywords to upper case.
            • +
            • GESHI_CAPS_LOWER: Convert the case of all keywords to lower case.
            • +
            • GESHI_CAPS_NO_CHANGE: Don’t change the case of any keyword.
            • +
            • ‘QUOTEMARKS’: Specifies the characters that mark the beginning and end of a string. This is another example +where if your language includes the ’ string delimiter you should use double quotes around it.
            • +
            • ‘ESCAPE_CHAR’: Specifies the escape character used in all strings. If your language does not have an escape +character then make this the empty string (''). This is not an array! If found, any character after an +escape character and the escape character itself will be highlighted differently, and the character after the +escape character cannot end a string.
            • +
            + +

            In some language files you might see here other indices too, but those are dealt with later on.

            + +

            4.3.3 Keywords

            + +

            Keywords will make up the bulk of a language file. In this part you add keywords for your language, including +inbuilt functions, data types, predefined constants etc etc.

            + +

            Here’s a (shortened) example from the php language file:

            + +
            PHP code
            1
            +23
            +45
            +67
            +89
            +1011
            +1213
            +1415
            +1617
            +1819
            +2021
            +2223
            +2425
            +2627
            +2829
            +3031
            +3233
            +3435
            +3637
            +3839
            +40
            'KEYWORDS' => array(
            +    1 => array(        'as', 'break', 'case', 'do', 'else', 'elseif', 'endif',
            +        'endswitch', 'endwhile', 'for', 'foreach', 'if', 'include',        'include_once', 'require', 'require_once', 'return',
            +        'switch', 'while'        ),
            +    2 => array(        '&lt;/script>', '&lt;?', '&lt;?php', '&lt;script language=',
            +        '?>', 'class', 'default', 'DEFAULT_INCLUDE_PATH', 'E_ALL',        'E_COMPILE_ERROR', 'E_COMPILE_WARNING', 'E_CORE_ERROR',
            +        'E_CORE_WARNING', 'E_ERROR', 'E_NOTICE', 'E_PARSE',        'E_USER_ERROR', 'E_USER_NOTICE', 'E_USER_WARNING',
            +        'E_WARNING', 'false', 'function', 'new', 'null',        'PEAR_EXTENSION_DIR', 'PEAR_INSTALL_DIR', 'PHP_BINDIR',
            +        'PHP_CONFIG_FILE_PATH', 'PHP_DATADIR', 'PHP_EXTENSION_DIR',        'PHP_LIBDIR', 'PHP_LOCALSTATEDIR', 'PHP_OS',
            +        'PHP_OUTPUT_HANDLER_CONT', 'PHP_OUTPUT_HANDLER_END',        'PHP_OUTPUT_HANDLER_START', 'PHP_SYSCONFDIR', 'PHP_VERSION',
            +        'true', 'var', '__CLASS__', '__FILE__', '__FUNCTION__',        '__LINE__', '__METHOD__'
            +        ),    3 => array(
            +        'xml_parser_create', 'xml_parser_create_ns',        'xml_parser_free', 'xml_parser_get_option',
            +        'xml_parser_set_option', 'xml_parse_into_struct',        'xml_set_character_data_handler', 'xml_set_default_handler',
            +        'xml_set_element_handler',        'xml_set_end_namespace_decl_handler',
            +        'xml_set_external_entity_ref_handler',        'xml_set_notation_decl_handler', 'xml_set_object',
            +        'xml_set_processing_instruction_handler',        'xml_set_start_namespace_decl_handler',
            +        'xml_set_unparsed_entity_decl_handler', 'yp_all', 'yp_cat',        'yp_errno', 'yp_err_string', 'yp_first',
            +        'yp_get_default_domain', 'yp_master', 'yp_match', 'yp_next',        'yp_order', 'zend_logo_guid', 'zend_version',
            +        'zlib_get_coding_type'        )
            +    ),
            + +

            You can see that the index ‘KEYWORDS’ refers to an array of arrays, indexed by positive integers. In each array, +there are some keywords (in the actual php language file there is in fact many more keywords in the array indexed by 3). +Here are some points to note about these keywords:

            + +
              +
            • Indexed by positive integers: Use nothing else! I may change this in 1.2.X, but for the 1.0.X series, +use positive integers only. Using strings here results in unnecessary overhead degrading performance when +highlighting code with your language file!
            • +
            • Keywords sorted ascending: Keywords should be sorted in ascending order. This is mainly for +readability. An issue with versions before 1.0.8 has been solved, so the reverse sorting order +is no longer required and should thus be avoided. GeSHi itself sorts the keywords internally when +building some of its caches, so the order doesn’t matter, but makes things easier to read and maintain.
            • +
            • Keywords are case sensitive (sometimes): If your language is case-sensitive, the correct casing of the +keywords is defined as the case of the keywords in these keyword arrays. If you check the java language file you +will see that everything is in exact casing. So if any of these keyword arrays are case sensitive, put the +keywords in as their correct case! (note that which groups are case sensitive and which are not is configurable, +see later on). If a keyword group is case insensitive, put the lowercase version of the keyword here +OR in case documentation links require a special casing (other than all lowercase or all uppercase) +the casing required for them use their casing.
            • +
            • Keywords must be in htmlentities() form: All keywords should be written as if they had been +run through the php function htmlentities(). E.g, the keyword is &lt;foo&gt;, not +<foo>
            • +
            • Don’t use keywords to highlight symbols: Just don’t!!! It doesn’t work, and there is seperate support +for symbols since GeSHi 1.0.7.21.
            • +
            • Markup Languages are special cases: Check the html4strict language file for an example: You need to tweak +the Parser control here to tell the surroundings of tagnames. In case of doubt, feel free to ask.
            • +
            + +

            4.3.4 Symbols and Case Sensitivity

            + +

            So you’ve put all the keywords for your language in? Now for a breather before we style them :). Symbols define +what symbols your language uses. These are things like colons, brackets/braces, and other such general punctuation. +No alphanumeric stuff belongs here, just the same as no symbols belong into the keywords section.

            + +

            As of GeSHi version 1.0.7.21 the symbols section can be used in two ways:

            + +
            +
            Flat usage:
            +
            This mode is the suggested way for existing language files and languages that only need few symbols where no +further differentiation is needed or desired. You simply put all the characters in an array under symbols as shown +in the first example below. All symbols in flat usage belong to symbol style group 0.
            + +
            Group usage:
            +
            This is a slightly more enhanced way to provide GeSHi symbol information. To use group you create several subarrays +each containing only a subset of the symbols to highlight. Every array will need to have an unique index thus +you can assign the appropriate styles later.
            +
            + +

            Here’s an example for flat symbol usage

            + +
            PHP code
            1
            +23
            +
            'SYMBOLS' => array(
            +  '(', ')', '[', ']', '{', '}', '!', '@', '|', '&', '+', '-', '*', '/', '%', '=', '<', '>'),
            + +

            which is not too different from the newly introduced group usage shown below:

            + +
            PHP code
            1
            +23
            +45
            +6
            'SYMBOLS' => array(
            +  0 => array('(', ')', '[', ']', '{', '}'),  1 => array('!', '@', '|', '&'),
            +  2 => array('+', '-', '*', '/', '%'),  3 => array('=', '&lt;', '>')
            +),
            + +
            + +
            Note:
            + +

            Please note that versions before 1.0.7.21 will silently ignore this setting.

            + +

            Also note that GeSHi 1.0.7.21 itself had some bugs in Symbol highlighting that could cause + heavily scrambled code output.

            + +
            + +

            The following case sensitivity group alludes to the keywords section: here you can set which keyword groups are case sensitive.

            + +

            In the ‘CASE_SENSITIVE’ group there’s a special key GESHI_COMMENTS which is used to set whether comments are +case sensitive or not (for example, BASIC has the REM statement which while not being case sensitive is still alphanumeric, and +as in the example given before about the Java language file using “import” as a single line comment, this can be +useful sometimes. true if comments are case sensitive, false otherwise. All of the other indices +correspond to indices in the 'KEYWORDS' section (see above).

            + +

            4.3.5 Styles for your Language File

            + +

            This is the fun part! Here you get to choose the colours, fonts, backgrounds and anything else you’d like for your +language file.

            + +

            Here’s an example:

            + +
            PHP code
            1
            +23
            +45
            +67
            +89
            +1011
            +1213
            +1415
            +1617
            +1819
            +2021
            +2223
            +2425
            +2627
            +2829
            +3031
            +3233
            +3435
            +3637
            +3839
            +
            'STYLES' => array(
            +    'KEYWORDS' => array(        1 => 'color: #b1b100;',
            +        2 => 'color: #000000; font-weight: bold;',        3 => 'color: #000066;'
            +        ),    'COMMENTS' => array(
            +        1 => 'color: #808080; font-style: italic;',        2 => 'color: #808080; font-style: italic;',
            +        'MULTI' => 'color: #808080; font-style: italic;'        ),
            +    'ESCAPE_CHAR' => array(        0 => 'color: #000099; font-weight: bold;'
            +        ),    'BRACKETS' => array(
            +        0 => 'color: #66cc66;'        ),
            +    'STRINGS' => array(        0 => 'color: #ff0000;'
            +        ),    'NUMBERS' => array(
            +        0 => 'color: #cc66cc;'        ),
            +    'METHODS' => array(        0 => 'color: #006600;'
            +        ),    'SYMBOLS' => array(
            +        0 => 'color: #66cc66;'        ),
            +    'REGEXPS' => array(        0 => 'color: #0000ff;'
            +        ),    'SCRIPT' => array(
            +        0 => '',        1 => '',
            +        2 => '',        3 => ''
            +        )    ),
            + +

            Note that all style rules should end with a semi-colon! This is important: GeSHi may add extra rules to the rules you +specify (and will do so if a user tries to change your styles on the fly), so the last semi-colon in any stylesheet +rule is important!

            + +

            All strings here should contain valid stylesheet declarations (it’s also fine to have the empty string).

            + +
              +
            • ‘KEYWORDS’: This is an array, from keyword index to style. The index you use is the index you used in +the keywords section to specify the keywords belonging to that group.
            • +
            • ‘COMMENTS’: This is an array, from single-line comment index to style for that index. The index ‘MULTI’ is +used for multiline comments (and cannot be an array). COMMENT_REGEXP use the style given for their key as +if they were single-line comments.
            • +
            • ‘ESCAPE_CHAR’, ‘BRACKETS’ and ‘METHODS’: These are arrays with only one index: 0. You cannot add other indices to +these arrays.
            • +
            • ‘STRINGS’: This defines the various styles for the Quotemarks you defined earlier. If you don’t use +multiple styles for strings there’s only one index: 0. Please also add this index in case no strings are present.
            • +
            • ‘NUMBERS’: This sets the styles used to highlight numbers. The format used here depends on the format used to +set the formats of numbers to highlight. If you just used an integer (bitmask) for numbers, you have to either +specify one key with the respective constant, and\or include a key 0 as a default style. If you used an +array for the number markup, copy the keys used there and assign the styles accordingly.
            • +
            • ‘SYMBOLS’: This provides one key for each symbol group you defined above. If you used the flat usage +make sure you include a key for symbols group 0.
            • +
            • ‘REGEXPS’: This is an array with a style for each matching regex. Also, since 1.0.7.21, you can specify the +name of a function to be called, that will be given the text matched by the regex, each time a match is found. +Note that my testing found that create_function would not work with this due to a PHP bug, so you have to +put the function definition at the top of the language file. Be sure to prefix the function name +with geshi_[languagename]_ as to not conflict with other functions!
            • +
            • ‘SCRIPT’: For languages that use script delimiters, this is where you can style each block of script. For +example, HTML and XML have blocks that begin with < and end with > (i.e. tags) and blocks that begin with & and +end with ; (i.e. character entities), and you can set a style to apply to each whole block. You specify the +delimiters for the blocks below. Note that many languages will not need this feature.
            • +
            + +

            4.3.6 URLs for Functions

            + +

            This section lets you specify a url to visit for each keyword group. Useful for pointing functions at their online +manual entries.

            + +

            Here is an example:

            + +
            PHP code
            1
            +23
            +45
            +6
            'URLS' => array(
            +    1 => '',    2 => '',
            +    3 => 'http://www.php.net/{FNAME}',    4 => ''
            +    ),
            + +

            The indices of this array correspond to the keyword groups you specified in the keywords section. The string {FNAME} +marks where the name of the function is substituted in. So for the example above, if the keyword being highlighted is +“echo”, then the keyword will be a URL pointing to http://www.php.net/echo. Because some languages (Java!) don’t +keep a uniform URL for functions/classes, you may have trouble in creating a URL for that language (though look in the +java language file for a novel solution to it’s problem)

            + +

            4.3.7 Number Highlighting Support

            + +

            If your language supports different formats of numbers (e.g. integers and float representations) and you want +GeSHi to handle them differently you can select from a set of predefined formats.

            + +
            PHP code
            1
            +23
            +4
                'NUMBERS' =>
            +        GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B |        GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI |
            +        GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO,
            + +

            All the formats you want GeSHi to recognize are selected via a bitmask that is built by bitwise OR-ing the format constants. +When styling you use these constants to assign the proper styles. A style not assigned will automatically fallback to style group 0.

            + +
            + +
            Note:
            + +

            For a complete list of formats supported by GeSHi have a look into the sources of geshi.php.

            + +
            + +

            If you want to define your own formats for numbers or when you want to group the style for two or more formats you can use the array syntax.

            + +
            PHP code
            1
            +23
            +45
            +67
            +
                'NUMBERS' => array(
            +        1 => GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE,        2 => GESHI_NUMBER_BIN_PREFIX_0B,
            +        3 => GESHI_NUMBER_OCT_PREFIX,        4 => GESHI_NUMBER_HEX_PREFIX,
            +        5 => GESHI_NUMBER_FLT_NONSCI | GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO        ),
            + +

            This creates 5 style groups 1..5 that will highlight each of the formats specified for each group. +Styling of these groups doesn’t use the constants but uses the indices you just defined.

            + +

            Instead of using those predefined constants you also can assign a PCRE that matches a number when using this advanced format.

            + +
            + +
            Note:
            + +

            The extended format hasn’t been exhaustively been tested. So beware of bugs there.

            + +
            + +

            4.3.8 Object Orientation Support

            + +

            Now we’re reaching the most little-used section of a language file, which includes such goodies as object orientation +support and context support. GeSHi can highlight methods and data fields of objects easily, all you need to do is to +tell it to do so and what the “splitter” is between object/method etc.

            + +

            Here’s an example:

            + +
            PHP code
            1
            +2
            'OOLANG' => true,
            +'OBJECT_SPLITTER' => '-&gt;',
            + +

            If your language has object orientation, the value of 'OOLANG' is true, otherwise it is false. If it is object +orientated, in the 'OBJECT_SPLITTER' value you put the htmlentities() version of the “splitter” between +objects and methods/fields. If it is not, then make this the empty string.

            + +

            4.3.9 Using Regular Expressions

            + +

            Regular expressions are a good way to catch any other lexic that fits certain rules but can’t be listed as a keyword. +A good example is variables in PHP: variables always start with either one or two “$” signs, then alphanumeric +characters (a simplification). This is easy to catch with regular expressions.

            + +

            And new to version 1.0.2, there is an advanced way of using regular expressions to catch certain things but highlight +only part of those things. This is particularly useful for languages like XML.

            + +
            + +
            Caution:
            + +

            Regular expressions use the PCRE syntax (perl-style), not the ereg() style!

            + +
            + +

            Here is an example (this time the PHP file merged with the XML file):

            + +
            PHP code
            1
            +23
            +45
            +67
            +89
            +1011
            +1213
            +1415
            +
            0 => array(
            +    GESHI_SEARCH => '(((xml:)?[a-z\-]+))(=)',    GESHI_REPLACE => '\\1',
            +    GESHI_MODIFIERS => '',    GESHI_BEFORE => '',
            +    GESHI_AFTER => '\\4'    ),
            +1 => array(    GESHI_SEARCH => '(>/?[a-z0-9]*(>)?)',
            +    GESHI_REPLACE => '\\1',    GESHI_MODIFIERS => '',
            +    GESHI_BEFORE => '',    GESHI_AFTER => ''
            +    ),2 => "[\\$]{1,2}[a-zA-Z_][a-zA-Z0-9_]*"
            + +

            As you can see there are two formats. One is the “simple” format used in GeSHi < 1.0.2, and the other is a more +advanced syntax. Firstly, the simple syntax:

            + +
              +
            • May be in double quotes: To make it easier for those who always place their regular expressions in double quotes, +you may place any regular expression here in double quotes if you wish.
            • +
            • Don’t use curly brackets where possible: If you want to use curly brackets (()) then by all means give it a try, +but I’m not sure whether under some circumstances GeSHi may throw a wobbly. You have been warned! If you want to +use brackets, it would be better to use the advanced syntax.
            • +
            • Don’t use the “everything” regex: (That’s the .*? regex). Use advanced syntax instead.
            • +
            + +

            And now for advanced syntax, which gives you much more control over exactly what is highlighted:

            + +
              +
            • GESHI_SEARCH: This element specifies the regular expression to search for. If you plan to capture the output, +use brackets (()). See how in the first example above, most of the regular expression is in one set of brackets +(with the equals sign in other brackets). You should make sure that the part of the regular expression that is +supposed to match what is highlighted is in brackets.
            • +
            • GESHI_REPLACE: This is what the stuff matched by the regular expression will be replaced with. If you’ve +grouped the stuff you want highlighted into brackets in the GESHI_SEARCH element, then you can use \\number +to match that group, where number is a number corresponding to how many open brackets are between the open +bracket of the group you want highlighted and the start of the GESHI_SEARCH string + 1. This may sound confusing, +and it probably is, but if you’re familiar with how PHP’s regular expressions work you should understand. In the +example above, the opening bracket for the stuff we want highlighted is the very first bracket in the string, so +the number of brackets before that bracket and the start of the string is 0. So we add 1 and get our replacement +string of \\1 (whew!).
            • +
            + +

            If you didn’t understand a word of that, make sure that there are brackets around the string in GESHI_SEARCH +and use \\1 for GESHI_REPLACE ;)

            + +
              +
            • GESHI_MODIFIERS: Specify modifiers for your regular expression. If your regular expression includes the +everything matcher (.*?), then your modifiers should include “s” and “i” (e.g. use ‘si’ for this).
            • +
            • GESHI_BEFORE:Specifies a bracket group that should appear before the highlighted match (this bracketed group will +not be highlighted). Use this if you had to match what you wanted by matching part of your regexp string to something +before what you wanted to highlight, and you don’t want that part to disappear in the highlighted result.
            • +
            • GESHI_AFTER:Specifies a bracket group that should appear after the highlighted match (this bracketed group will +not be highlighted). Use this if you had to match what you wanted by matching part of your regexp string to something +after what you wanted to highlight, and you don’t want that part to disappear in the highlighted result.
            • +
            + +

            Is that totally confusing? Here’s the test for if you’re an android or not: If you found that perfectly understandable +then you’re an android ;). Here’s a better example:

            + +

            Let’s say that I’m making a language, and variables in this language always start with a dollar sign ($), are always +written in lowercase letters and always end with an ampersand (&). eg:

            + +

            $foo& = 'bar'

            + +

            I want to highlight only the text between the $ and the &. How do I do that? With simple regular expressions I can’t, +but with advanced, it’s relatively easy:

            + +
            PHP code
            1
            +23
            +45
            +67
            +89
            +1011
            +1213
            +14
            1 => array(
            +    // search for a dollar sign, then one or more of the characters a-z, then an ampersand    GESHI_SEARCH => '(\$)([a-z]+)(&)',
            +    // we wanna highlight the characters, which are in the second bracketed group    GESHI_REPLACE => '\\2',
            +    // no modifiers, since we're not matching the "anything" regex    GESHI_MODIFIERS => '',
            +    // before the highlighted characters should be the first    // bracketed group (always a dollar sign in this example)
            +    GESHI_BEFORE => '\\1',    // after the highlighted characters should be the third
            +    // bracketed group (always an ampersand in this example)    GESHI_AFTER => '\\3'
            +    ),
            + +

            So if someone tried to highlight using my language, all cases of $foo& would turn into:

            + +

            $<span style="color: blue;">foo</span><span style="color: green;">&amp;</span>

            + +

            (which would of course be viewed in a browser to get something like $foo&)

            + +

            4.3.10 Contextual Highlighting and Strict Mode

            + +

            For languages like HTML, it’s good if we can highlight a tag (like <a> for example). But how do we stop +every single “a” in the source getting highlighted? What about for attributes? If I’ve got the word “colspan” in my +text I don’t want that highlighted! So how do you tell GeSHi not to highlight in that case? You do it with “Strict Blocks”.

            + +

            Here is an example:

            + +
            PHP code
            1
            +23
            +45
            +67
            +89
            +1011
            +1213
            +1415
            +1617
            +1819
            +2021
            +2223
            +2425
            +2627
            +
            <? /* ... */
            +'STRICT_MODE_APPLIES' => GESHI_MAYBE,'SCRIPT_DELIMITERS' => array(
            +    0 => array(        '<?php' => '?>'
            +        ),    1 => array(
            +        '<?' => '?>'        ),
            +    2 => array(        '<%' => '%>'
            +        ),    3 => array(
            +        '<script language="php">' => '</script>'        )
            +    4 => "/(<\?(?:php)?)(?:'(?:[^'\\\\]|\\\\.)*?'|\"(?:[^\"\\\\]|\\\\.)*?\"|\/\*(?!\*\/).*?\*\/|.)*?(\?>|\Z)/sm",    5 => "/(<%)(?:'(?:[^'\\\\]|\\\\.)*?'|\"(?:[^\"\\\\]|\\\\.)*?\"|\/\*(?!\*\/).*?\*\/|.)*?(%>|\Z)/sm"
            +    ),'HIGHLIGHT_STRICT_BLOCK' => array(
            +    0 => true,    1 => true,
            +    2 => true,    3 => true,
            +    4 => true,    5 => true
            +    )/* ... */ ?>
            + +

            What is strict mode? Strict mode says that highlighting only occurs inside the blocks you specify. You can see from +the example above that highlighting will only occur if the source is inside <?php ... ?> (though note the +GESHI_MAYBE!). Here are some points about strict highlighting:

            + +
              +
            • ‘STRICT_MODE_APPLIES’: This takes three values (all constants): + +
                +
              • GESHI_ALWAYS: Strict mode always applies for all of the blocks you specify. Users of your language +file cannot turn strict mode off. This should be used for markup languages.
              • +
              • GESHI_NEVER: Strict mode is never used. Users of your language file cannot turn strict mode on. Use this +value if there is no such thing as a block of code that would not be highlighted in your language +(most languages, like C, Java etc. use this because anything in a C file should be highlighted).
              • +
              • GESHI_MAYBE: Strict mode *sometimes* applies. It defaults to “off”. Users can turn strict mode on if +they please. If strict mode is off then everything in the source will be highlighted, even things outside +the strict block markers. If strict mode is on then nothing outside strict block markers will be highlighted.
              • +
            • +
            • ‘SCRIPT_DELIMITERS’: This is an array of script delimiters, in the format of the above. The indices are use in the +‘SCRIPT’ part of the styles section for highlighting everything in a strict block in a certain way. +For example, you could set up your language file to make the background yellow of any code inside a strict +block this way. The delimiters are in the form 'OPEN' => 'CLOSE'. Delimiters can be of any +length > 0. Delimiters are not formatted as if they were run through htmlentities()!
            • +
            • ‘HIGHLIGHT_STRICT_BLOCK’: specifies whether any highlighting should go on inside each block. Most of +the time this should be true, but for example, in the XML language file highlighting is turned off for +blocks beginning with <!DOCTYPE and ending with >. However, you can still +style the overall block using the method described above, and the XML language file does just that.
            • +
            + +
            + +
            Note:
            + +

            The delimiters should be in reverse alphabetical order. Note that in the above example, <?php + comes before <?.

            + +
            + +

            Since GeSHi 1.0.8 instead of specifying an array with starter and ender you may also provide a regular expression +that matches the full block you wish to highlight. If the regular expression match starts at the same position +as a previous array declaration the Regexp match is taken. This is to allow for a fall-back when a preg_match +doesn’t quite work as expected so you still get reasonably well results.

            + +

            If you didn’t get this, you might want to look into the PHP or HTML language files as this feature is used there +to fix some issues that have been there for about 3 years.

            + +
            + +
            Caution:
            + +

            For PHP versions <4.3.3 Strict Block Regexps are completely ignored due to problems in those version + that would cause loads of warning messages otherwise.

            + +
            + +

            4.3.11 Special Parser Settings (Experimental)

            + +

            Sometimes it is necessary for a language to render correctly to tweak some of the assumptions GeSHi usually makes to match the behaviour your language expects. +To achieve this there is an experimental section called 'PARSER_CONTROL' which is optional and should be used only if necessary. +With the help of this section some internal parameters of GeSHi can be set which are not overrideable by the API and thus their use should be limited as much as possible.

            + +

            The syntax of the PARSER_CONTROL basically resembles an array structure simular to the one found in the rest of the language file. All subsections of the PARSER_CONTROL are optional. +If a given setting isn’t present the usual default values of GeSHi are used. +No validation of settings is performed for these settings. Also note that unknown settings are silently ignored.

            + +
            + +
            Caution:
            + +

            All PARSER_CONTROL settings are experimental and subject to change. + So if you need a special setting in a public language file you should consider requesting it upstream. + This is also the reason why documentation on these settings will only cover broad usage information as the underlying implementation might change without further notice.

            + +
            + +

            One of the most common reasons why you might want to use the PARSER_CONTROL settings is to tweak what characters are allowed to surround a keyword. +Usually GeSHi checks for a fixed set of characters like brackets and common symbols that denote the word boundary for a keyword. +If this set conflicts with your language (e.g. - is allowed inside a keyword) or you want to limit the usage of a keyword to certain areas (e.g. for HTML tag names only match after <) you can change those conditions here.

            + +

            Keyword boundary rules can either be set globally (directly within the PARSER_CONTROL’s KEYWORDS section or on a per-group basis. +E.g. the following sample from the HTML language file sets different settings for keyword matching only for Keyword Group 2 and leaves the other groups alone.

            + +
            PHP code
            1
            +23
            +45
            +67
            +8
                'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(            2 => array(
            +                'DISALLOWED_BEFORE' => '(?<=&lt;|&lt;\/)',                'DISALLOWED_AFTER' => '(?=\s|\/|&gt;)',
            +            )        )
            +    )
            + +
            + +
            Note:
            + +

            The name 'DISALLOWED_BEFORE' and 'DISALLOWED_AFTER' might sound confusing at first, since they don’t define what to prevent, but what to match in order to find a keyword. + The reason for this strange naming is based in the original implementation of this feature when Nigel implemented this in the old parser statically. + When this implementation was brought out via the PARSER_CONTROL settings the original naming wasn’t altered since at that time this really was a blacklist of characters. + Later on this implementation was changed from a blacklist of characters to a part of a PCRE regexp, but leaving the name. + The naming might be subject to change though.

            + +
            + +

            Another option you can change since GeSHi 1.0.8.3 is whether to treat spaces within keywords as literals (only a single space as given) or if the space should match any whitespace at that location. +The following code will enable this behaviour for the whole keyword set. As said above you can choose to enable this for single keyword groups only though.

            + +
            PHP code
            1
            +23
            +45
            +
                'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(            'SPACE_AS_WHITESPACE' => true
            +        )    ),
            + +

            Another option of interest might be disabling certain features for a given language. +This might come in handy if the language file you are working on doesn’t support a given function or highlighting certain aspects won’t work properly or would interfere with custom implementations using regular expressions.

            + +
            PHP code
            1
            +23
            +45
            +67
            +89
            +1011
            +12
                'PARSER_CONTROL' => array(
            +        'ENABLE_FLAGS' => array(            'ALL' => GESHI_NEVER,
            +            'NUMBERS' => GESHI_NEVER,            'METHODS' => GESHI_NEVER,
            +            'SCRIPT' => GESHI_NEVER,            'SYMBOLS' => GESHI_NEVER,
            +            'ESCAPE_CHAR' => GESHI_NEVER,            'BRACKETS' => GESHI_NEVER,
            +            'STRINGS' => GESHI_NEVER,        )
            +    )
            + +

            Inside the 'ENABLE_FLAGS' section follows an array of 'name'=>value pairs. +Valid names are the sections below the 'STYLES' section (well, not exactly, but you can look there for what the features are called inside GeSHi). +Valid values are the GeSHi constants GESHI_NEVER (don’t process this feature), GESHI_ALWAYS (always process this feature, ignore the user) and GESHI_MAYBE (listen to the user if he want’s this highlighted). +The value GESHI_MAYBE is the default one and thus needs not to be set explicitely.

            + +

            Another setting available through the PARSER_CONTROL settings is the possibility to limit the allowed characters before an single line comment.

            + +
            PHP code
            1
            +23
            +45
            +
                'PARSER_CONTROL' => array(
            +        'COMMENTS' => array(            'DISALLOWED_BEFORE' => '$'
            +        )    )
            + +

            With the current implementation the DISALLOWED_BEFORE COMMENT-specific setting is a list of characters. But this is subject to change.

            + +
            + +
            Note:
            + +

            There is no 'DISALLOWED_AFTER' setting with the 'COMMENTS'-PARSER_CONTROL.

            + +
            + +

            Another PARSER_CONTROL setting for the environment around certain syntactic constructs refers to the handling of object-oriented languages.

            + +
            PHP code
            1
            +23
            +45
            +67
            +
                'PARSER_CONTROL' => array(
            +        'OOLANG' => array(            'MATCH_BEFORE' => '',
            +            'MATCH_AFTER' => '[a-zA-Z_][a-zA-Z0-9_]*',            'MATCH_SPACES' => '[\s]*'
            +        )    )
            + +
            + +
            Caution:
            + +

            Please note that the settings discussed in this section are experimental and might be changed, removed or altered in their meaning at any time.

            + +
            + +

            4.3.12 Tidying Up

            + +

            All language files should end with:

            + +
            PHP code
            1
            +23
            +
            );
            + ?>
            + +

            That is the string content "\n);\n?>\n".

            + +
            + +
            Caution:
            + +

            Make sure that there is EXACTLY one linebreak character at the end. If you accidentially include more + you might end up with messages like “Headers already sent”.

            + +
            + +

            4.4 Validating your language file

            + +

            Since GeSHi 1.0.8 there is a new script langcheck.php in the contrib directory that scans all +language files it finds in the geshi/ subdirectory of the GeSHi installation for mistakes.

            + +

            Please make sure that your language does not contain any mistakes that this script shows you when sending in +your language file for inclusion into the official release as this saves work for us when including your file. +Also you can be sure your language file will work as expected once your language file validates correctly.

            + +

            Please note that not all of the language files shipped with GeSHi are fully valid yet, but we’re working on it +and are happy about every patch we get!

            + +

            5 Method/Constant Reference

            + +

            I’m afraid I have been lying for a little while about this now! Since 1.0.7 I have been including a phpdoc API for +the sourcecode in the api directory, but have forgot to update the documentation! However, it is available, +and may assist you in coding, especially for plugin coders.

            + +
            + +

            That’s all, folks!

            + +

            I’ve improved the documentation greatly from version 1.0.1, but there may still be problems with it, or it may still +be confusing for you. Or perhaps I was just plain wrong about one point! If so, contact me and I’ll do my best to sort it out.

            + +

            In case you were wondering, I’ve finished development of the 1.0.X thread of GeSHi. The only releases I’ll make in this +thread will be of the bug-fix/add language files type. In particular, version 1.0.2 was a “concept” release - testing +how far I could take the highlighting idea (as well as ideas from others).

            + +

            I’m planning a code rewrite for 1.2.X, which will be based on a new engine - a “psuedo-tokenizer” engine. Hopefully +it will massively reduce the server load and time taken (by almost eliminating regexps), while providing +superior highlighting. But fear not! The interface and method names should all remain the same ^_^ (though I can’t +say the same for language files!)

            + +

            And finally, a couple of people have been asking me: how did you generate that documentation? The amazing answer is: my +brain. And yes, it took a long time, and I don’t recommend doing it this way. And yes, you can borrow the styles if +you like, though flick me an e-mail if you do.

            + +

            Anyway, enough blather from me. Get GeSHi working for you already! :D

            + +
            + +
            +
            Authors:
            +
            © 2004 - 2007 Nigel McNie
            + +
            © 2007 - 2012 Benny Baumann
            + +
            © 2008 - 2009 Milian Wolff
            + +
            GeSHi Website:
            +
            http://qbnz.com/highlighter
            +
            + +
            + +
            +
            +
              + +
            1. +

              The PRE header (see The Code Container) is not valid HTML, you might want +to use one of the other header types instead. 

              +
            2. + +
            3. +

              Support is granted for PHP 4.3.0 and above, but especially 4.3.x cannot be guaranteed to +work due to a lack of test systems. If you are forced to use such old PHP versions complain at your hoster or +contact us if you find compatibility issues so we can try to resolve them. It’s only PHP 4.4.X and above that +is verified to work. 

              +
            4. + +
            5. +

              I am no longer working on this MOD, however if someone else wants to they can contact me for more +information. 

              +
            6. + +
            7. +

              Available as plugin only. In addition, some of the other entries mentioned +here may only have GeSHi available as a plugin. 

              +
            8. + +
            +
            + + \ No newline at end of file diff --git a/vendor/easybook/geshi/docs/geshi-doc.txt b/vendor/easybook/geshi/docs/geshi-doc.txt new file mode 100644 index 0000000000..e0f38ff69f --- /dev/null +++ b/vendor/easybook/geshi/docs/geshi-doc.txt @@ -0,0 +1,1741 @@ +[NOTE: This documentation has simply been copy-pasted from the HTML form and is NOT up to date, I recommend you +read that instead] + +GeSHi Documentation +Version 1.0.7.22 + +Author: Nigel McNie, Benny Baumann +Copyright: © 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann +Email: nigel@geshi.org, BenBE@omorphia.de +GeSHi Website: http://qbnz.com/highlighter + +This is the documentation for GeSHi - Generic Syntax Highlighter. The most modern version of this document is available on the web - go to http://qbnz.com/highlighter/documentation.php to view it. + +Any comments, questions, confusing points? Please contact me! I need all the information I can get to make the use of GeSHi and everything related to it (including this documentation) a breeze. +Contents + + * 1. Introduction + o 1.1 Features + o 1.2 About GeSHi + o 1.3 Credits + o 1.4 Feedback + * 2. The Basics + o 2.1 Getting GeSHi + o 2.2 Installing GeSHi + + 2.2.1 Requirements + + 2.2.2 Extracting GeSHi + + 2.2.3 Installation + o 2.3 Basic Usage + * 3. Advanced Features + o 3.1 The Code Container + o 3.2 Line Numbers + + 3.2.1 Enabling Line Numbers + + 3.2.2 Styling Line Numbers + + 3.2.3 Choosing a Start Number + o 3.3 Using CSS Classes + + 3.3.1 Enabling CSS Classes + + 3.3.2 Setting the CSS Class/ID + + 3.3.3 Getting the Stylesheet + + 3.3.4 Using an External Stylesheet + o 3.4 Changing Styles + + 3.4.1 The Overall Styles + + 3.4.2 Line Number Styles + + 3.4.3 Setting Keyword Styles + + 3.4.4 Setting Comment Styles + + 3.4.5 Setting Other Styles + o 3.5 Case Sensitivity and Auto Casing + + 3.5.1 Auto Caps/Nocaps + + 3.5.2 Setting Case Sensitivity + o 3.6 Changing the Source/Language/Path/Charset + + 3.6.1 Changing the Source Code + + 3.6.2 Changing the Language + + 3.6.3 Changing the Path + + 3.6.4 Changing the Character Set + + 3.6.5 Using load_from_file to change the language and source code + o 3.7 Error Handling + o 3.8 Disabling Styling of Some Lexics + o 3.9 Setting the Tab Width + o 3.10 Using Strict Mode + o 3.11 Adding/Removing Keywords + + 3.11.1 Adding a Keyword + + 3.11.2 Removing a Keyword + + 3.11.3 Adding a Keyword Group + + 3.11.4 Removing a Keyword Group + o 3.12 Headers and Footers for your code + + 3.12.1 Keyword Substitution + + 3.12.2 Setting Header Content + + 3.12.3 Setting Footer Content + + 3.12.4 Styling Header Content + + 3.12.5 Styling Footer Content + o 3.13 Keyword URLs + + 3.13.1 Setting a URL for a Keyword Group + + 3.13.2 Disabling URLs for a Keyword Group + + 3.13.3 Disabling all URLs for Keywords + + 3.13.4 Styling Links + + 3.13.5 Setting the Link Target + o 3.14 Using Contextual Importance + o 3.15 Highlighting Special Lines "Extra" + + Specifying the Lines to Highlight Extra + + Styles for the Highlighted Lines + o 3.16 Adding IDs to Each Line + o 3.17 Getting the Time of Styling + * 4 Language Files + o 4.1 An Example Language File + o 4.2 Language File Conventions + o 4.3 Language File Sections + + 4.3.1 The Header + + 4.3.2 The First Indices + + 4.3.3 Keywords + + 4.3.4 Symbols and Case Sensitivity + + 4.3.5 Styles for your Language Files + + 4.3.6 URLs for Functions + + 4.3.7 Object Orientation Support + + 4.3.8 Using Regular Expressions + + 4.3.9 Contextual Highlighting and Strict Mode + + 4.3.10 Tidying Up + * 5 Method/Constant Reference + +1: Introduction +Top | Contents | Next | Previous + +GeSHi is exactly what the acronym stands for: a Generic Syntax Highlighter. As long as you have a language file for almost any computer language - whether it be a scripting language, object orientated, markup or anything in between - GeSHi can highlight it! GeSHi is extremely customisable - the same source can be highlighted multiple times in multiple ways - the same source even with a different language. GeSHi outputs XHTML strict compliant code*, and can make use of CSS to save on the amount of output. And what is the cost for all of this? You need PHP. That's all! + +*Most of the time. Some languages do not output XHTML strict code, and using line numbers with the PRE header is not legal either. These problems will be fixed in 1.2. +1.1: Features +Top | Contents | Next | Previous + +Here are some of the standout features of GeSHi: + + * Programmed in PHP: GeSHi is coded entirely in PHP. This means that where ever you have PHP, you can have GeSHi! Almost any free webhost supports PHP, and GeSHi works fine with PHP > 4.3.0*. + * Support for many languages: GeSHi comes with about 100 languages, including PHP, HTML, CSS, Java, C, Lisp, XML, Perl, Python, ASM and many more! + * XHTML compliant output: GeSHi produces XHTML compliant output, using stylesheets, so you need not worry about GeSHi ruining your claims to perfection in the standards department ;) + * Highly customisable: GeSHi allows you to change the style of the output on the fly, use CSS classes or not, use an external stylesheet or not, use line numbering, change the case of output keywords... the list goes on and on! + * Flexible: Unfortunately, GeSHi is quite load/time intensive for large blocks of code. However, you want speed? Turn off any features you don't like, pre-make a stylesheet and use CSS classes to reduce the amount of output and more - it's easy to strike a balance that suits you. + +This is just a taste of what you get with GeSHi - the best syntax highlighter for the web in the world! + +*Support is granted for PHP 4.3.0 and above, but especially 4.3.x cannot be guaranteed to work due to a lack of test systems. If you are forced to use such old PHP versions complain at your hoster or contact us if you find compatibility issues so we can try to resolve them. It's only PHP 4.4.X and above that is verified to work. +1.2: About GeSHi +Top | Contents | Next | Previous + +GeSHi started as a mod for the phpBB forum system, to enable highlighting of more languages than the available (which can be roughly estimated to exactly 0 ;)). However, it quickly spawned into an entire project on its own. But now it has been released, work continues on a mod for phpBB* - and hopefully for many forum systems, blogs and other web-based systems. + +*I am no longer working on this MOD, however if someone else wants to they can contact me for more information. + +Several systems are using GeSHi now, including: + + * Dokuwiki - An advanced wiki engine + * gtk.php.net - Their manual uses GeSHi for syntax highlighting + * WordPress - A powerful blogging system* + * PHP-Fusion - A constantly evovling CMS + * SQL Manager - A Postgres DBAL + * Mambo - A popular open source CMS + * MediaWiki - A leader in Wikis* + * TikiWiki - A megapowerful Wiki/CMS + * TikiPro - Another powerful Wiki based on Tikiwiki + * RWeb - A site-building tool + +* Available as plugin only. In addition, some of the other entries mentioned here may only have GeSHi available as a plugin. + +GeSHi is the original work of Nigel McNie. The project was later handed over to Benny Baumann. Others have helped with aspects of GeSHi also, they're mentioned in the THANKS file. +1.3: Credits +Top | Contents | Next | Previous + +Many people have helped out with GeSHi, whether by creating language files, submitting bug reports, suggesting new ideas or simply pointing out a new idea or something I'd missed. All of these people have helped to build a better GeSHi, you can see them in the THANKS file. + +Do you want your name on this list? Why not make a language file, or submit a valid bug? Or perhaps help me with an added feature I can't get my head around, or suggest a new feature, or even port GeSHi to anothe language? There's lots you can do to help out, and I need it all :) +1.4: Feedback +Top | Contents | Next | Previous + +I need your feedback! ANYthing you have to say is fine, whether it be a query, congratulations, a bug report or complaint, I don't care! I want to make this software the best it can be, and I need your help! You can contact me in the following ways: + + * E-mail: nigel@geshi.org + * Forums: Sourceforge.net Forums or GeSHi home forums + +Remember, any help I am grateful for :) +2: The Basics +Top | Contents | Next | Previous + +In this section, you'll learn a bit about GeSHi, how it works and what it uses, how to install it and how to use it to perform basic highlighting. +2.1: Getting GeSHi +Top | Contents | Next | Previous + +If you're reading this and don't have GeSHi, that's a problem ;). So, how do you get your hands on it? Visit http://qbnz.com/highlighter/downloads.php to obtain the latest version. +2.2: Installing GeSHi +Top | Contents | Next | Previous + +Installing GeSHi is a snap, even for those most new to PHP. There's no tricks involved. Honest! +2.2.1: Requirements +Top | Contents | Next | Previous + +GeSHi requires the following to be installable: + + * PHP. It's untested with anything other below 4.4.X. I hope to extend this range soon. I see no reason why it won't work with any version of PHP above 4.3.0. + * Approximately 2 megabytes of space. The actual script is small - around 150K - but most of the size comes from the large number of language files (over 100!). If you're pushed for space, make sure you don't upload to your server the docs/ or contrib/ directory, and you may want to leave out any language files that don't take your fancy either. + +As you can see, the requirements are very small. If GeSHi does NOT work for you in a particular version of PHP, let me know why and I'll fix it. + +Packages come in .zip, .tar.gz and .tar.bz2 format, so there's no complaining about whether it's available for you. *nix users probably want .tar.gz or .tar.bz2 and windows users probably want .zip. +2.2.2: Extracting GeSHi +Top | Contents | Next | Previous + +To extract GeSHi in Linux (.tar.gz): + + 1. Open a shell + 2. cd to the directory where the archive lies + 3. Type tar -xzvf [filename] where [filename] is the name of the archive (typically GeSHi-1.X.X.tar.gz) + 4. GeSHi will be extracted to its own directory + +To extract GeSHi in Windows (.zip): + + 1. Open Explorer + 2. Navigate to the directory where the archive lies + 3. Extract the archive. The method you use will depend on your configuration. Some people can right-click upon the archive and select "Extract" from there, others may have to drag the archive and drop it upon an extraction program. + +To extract from .zip you'll need an unzipping program - unzip in Linux, or Winzip, Winrar or similar for Windows. +2.2.3: Installation +Top | Contents | Next | Previous + +GeSHi is nothing more than a PHP class with related language support files. Those of you familiar with PHP can then guess how easy the installation will be: simply copy it into your include path somewhere. You can put it wherever you like in this include path. I recommend that you put the language files in a subdirectory of your include path too - perhaps the same subdirectory that geshi.php is in. Remember this path for later. + +If you don't know what an include path is, don't worry. Simply copy GeSHi to your webserver. So for example, say your site is at http://mysite.com/myfolder, you can copy GeSHi to your site so the directory structure is like this: + +http://mysite.com/myfolder/geshi/[language files] +http://mysite.com/myfolder/geshi.php + +Or you can put it in any subdirectory you like: + +http://mysite.com/myfolder/includes/geshi/[language files] +http://mysite.com/myfolder/includes/geshi.php + +Caution: + +When using GeSHi on a live site, the only directory required is the geshi/ subdirectory. Both contrib/ and docs/ are worthless, and furthermore, as some people discovered, one of the files in contrib had a security hole (fixed as of 1.0.7.3). I suggest you delete these directories from any live site they are on. +2.3: Basic Usage +Top | Contents | Next | Previous + +Use of GeSHi is very easy. Here's a simple example: +// +// Include the GeSHi library +// +include_once('geshi.php'); + +// +// Define some source to highlight, a language to use +// and the path to the language files +// +$source = '$foo = 45; +for ( $i = 1; $i < $foo; $i++ ) +{ + echo "$foo
            \n"; + --$foo; +}'; +$language = 'php'; +// +// Create a GeSHi object +// +$geshi =& new GeSHi($source, $language); + +// +// And echo the result! +// +echo $geshi->parse_code(); + +As you can see, there's only three really important lines: +include_once('geshi.php'); + +This line includes the GeSHi class for use +$geshi = new GeSHi($source, $language); + +This line creates a new GeSHi object, holding the source and the language you want to use for highlighting. +echo $geshi->parse_code(); + +This line spits out the result :) + +So as you can see, simple usage of GeSHi is really easy. Just create a new GeSHi object and get the code! + +Since version 1.0.2, there is a function included with GeSHi called geshi_highlight. This behaves exactly as the php function highlight_string behaves - all you do is pass it the language you want to use to highlight and the path to the language files as well as the source. Here are some examples: +// Simply echo the highlighted code +geshi_highlight($source, 'php', $path); + +// Get the code back, for use later +$code = geshi_highlight($source, 'java', $path, true) + +// Check if there is an error with parsing this code +ob_start(); +$result = geshi_highlight($source, 'perl', $path); +$code = ob_get_contents(); +ob_end_clean(); +if ( !$result ) +{ + // There was an error with highlighting... +} +else +{ + // All OK :) +} + +However, these are really simple examples and doesn't even begin to cover all the advanced features of GeSHi. If you want to learn more, continue on to section 3: Advanced Features. +3: Advanced Features +Top | Contents | Next | Previous + +This section documents the advanced features of GeSHi - strict mode, using CSS classes, changing styles on the fly, disabling highlighting of some things and more. + +In this section there are many code snippets. For all of these, you should assume that the GeSHi library has been included, and a GeSHi object has been created and is referenced by the variable $geshi. Normally, the source, language and path used are arbitary. +3.1 The Code Container +Top | Contents | Next | Previous + +The Code Container has a fundamental effect on the layout of your code before you even begin to style. What is the Code Container? It's the bit of markup that goes around your code to contain it. By default your code is surrounded by a
            , but you can also specify a 
            . + +The
             header is the default. If you're familiar with HTML you'll know that whitespace is rendered "as is" by a 
             element. The advantage for you is that if you use 
             the whitespace you use will appear pretty much exactly how it is in the source, and what's more GeSHi won't have to add a whole lot of 
            's and non-breaking spaces ( ) to your code to indent it. This saves you source code (and your valuable visitors waiting time and your bandwidth). + +But if you don't like
             or it looks stupid in your browser no matter what styles you try to apply to it or something similar, you might want to use a 
            instead. A
            will result in more source - GeSHi will have to insert whitespace markup - but in return you can wrap long lines of code that would otherwise have your browser's horizontal scrollbar appear. Of course with
            you can *not* wrap lines if you please. The highlighter demo at the GeSHi home page uses the
            approach for this reason. + +At this stage there isn't an option to wrap the code in tags (unless you use the function geshi_highlight), partly because of the inconsistent and unexpected ways stuff in tags is highlighted. Besides, is an inline element. But this may become an option in future versions. + +As of GeSHi 1.0.7.2 there is a new header type, that specifies that the code should not be wrapped in anything at all. + +Another requested addition has been made in GeSHi 1.0.7.20 to force GeSHi to create a block around the highlighted source even if this wasn't necessary, thus styles that are applied to the output of GeSHi can directly influence the code only even if headers and footers are present. + +To change/set the header to use, you call the set_header_type() method: +$geshi->set_header_type(GESHI_HEADER_DIV); +// or... +$geshi->set_header_type(GESHI_HEADER_PRE); // or... +$geshi->set_header_type(GESHI_HEADER_NONE); + +Those are the only three arguments you should pass to set_header_type. Passing anything else may cause inconsistencies in what is used as the Code Container (although it *should* simply use a
            ). Better not to risk it.
            +Note:
            +
            +GESHI_HEADER_DIV, GESHI_HEADER_PRE and GESHI_HEADER_NONE are constants, so don't put them in strings!
            +Caution:
            +
            +The default styles for the 
             and 
            will be different, especially if you use line numbers!. I have found that a
             results in code that is smaller than for that of a 
            , you should rectify this difference by using set_overall_style() if you need to. But be aware of this difference for if you are changing the header type! +3.2: Line Numbers +Top | Contents | Next | Previous + +GeSHi has the ability to add line numbers to your code (see the demo available at http://qbnz.com/highlighter/demo.php to see what can be achieved). Line numbers are a great way to make your code look professional, especially if you use the fancy line numbers feature. +3.2.1: Enabling Line Numbers +Top | Contents | Next | Previous + +To highlight a source with line numbers, you call the enable_line_numbers() method: +$geshi->enable_line_numbers($flag); + +Where $flag is one of the following: + + * GESHI_NORMAL_LINE_NUMBERS - Use normal line numbering + * GESHI_FANCY_LINE_NUMBERS - Use fancy line numbering + * GESHI_NO_LINE_NUMBERS - Disable line numbers (default) + +Normal line numbers means you specify a style for them, and that style gets applied to all of them. Fancy line numbers means that you can specify a different style for each nth line number. You change the value of n (default 5): +$geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS, 37); + +The second parameter is not used in any other mode. Setting it to 0 is the same as simply using normal line numbers. Setting it to 1 applies the fancy style to every line number. +Note: + +The values above are CONSTANTS - so don't put them in strings! +3.2.2 Styling Line Numbers +Top | Contents | Next | Previous + +As of GeSHi 1.0.2, line numbers are added by the use of ordered lists. This solves the old issues of line number styles inheriting from styles meant for the code. Also, this solves an important issue about selecting code. For example, line numbers look nice, but when you go to select the code in your browser to copy it? You got the line numbers too! Not such a good thing, but thankfully this issue is now solved. What is the price? Unfortunately the whole way that styles are inherited/used has changed for those of you who were familiar with 1.0.1, and there is quite a bit more HTML involved. So think carefully about these things before you enable line numbers. + +Now, onto how to style line numbers: + +Styles are set for line numbers using the set_line_style() method: +$geshi->set_line_style('background: #fcfcfc;'); + +If you're using Fancy Line Numbers mode, you pass a second string for the style of the nth line number: +$geshi->set_line_style('background: #fcfcfc;', 'background: #f0f0f0;'); + +The second style will have no effect if you're not using Fancy Line Numbers mode. + +By default, the styles you pass overwrite the current styles. Add a boolean "true" after the styles you specify to combine them with the current styles: +$geshi->set_line_style('background: red;', true); +// or, for fancy line numbers +$geshi->set_line_style('background: red;', 'background: blue;', true); +Note: + +Due to a bug with Firefox the issue that should have been fixed with 1.0.2 has reappeared in another form as Firefox includes extra text\markup into plaintext versions of webpage copies. This can sometimes be useful (actually it's used to get the plaintext version of this documentation), but more often is quite annoying. Best practice so far is to either not use line numbers, or offer the visitor of your page a plaintext version of your source. To learn more have a look at the SF.net BugTracker Issue #1651996. This will hopefully be fixed in GeSHi version 1.2 or as soon as Firefox provides webdevelopers with adequate ways to control this feature - whichever comes first! +Caution: + +When you set line number styles, the code will inherit those styles! This is the main issue to come out of the 1.0.2 release. If you want your code to be styled in a predictable manner, you'll have to call the set_code_style() method to rectify this problem. + +Note also that you cannot apply background colours to line numbers unless you use set_overall_style(). Here's how you'd style: + + 1. Use set_overall_style() to style the overall code block. For example, you can set the border style/colour, any margins and padding etc. using this method. In addition: set the background colour for all the line numbers using this method. + 2. Use set_line_style() to style the foreground of the line numbers. For example, you can set the colour, weight, font, padding etc. of the line numbers using this method. + 3. Use set_code_style() to explicitly override the styles you set for line numbers using set_line_style. For example, if you'd set the line numbers to be bold (or even if you'd only set the fancy line number style to be bold), and you didn't actually want your code to be bold, you'd make sure that font-weight: normal; was in the stylesheet rule you passed to set_code_style + +This is the one major change from GeSHi 1.0.1 - make sure you become familiar with this, and make sure that you check any code you have already styled with 1.0.1 when you upgrade to make sure nothing bad happens to it. +3.2.3: Choosing a Start Number +Top | Contents | Next | Previous + +As of GeSHi 1.0.2, you can now make the line numbers start at any number, rather than just 1. This feature is useful if you're highlighting code from a file from around a certain line number in that file, as an additional guide to those who will view the code. You set the line numbers by calling the start_line_numbers_at() method: +$geshi->start_line_numbers_at($number); + +$number must be a positive integer (or zero). If it is not, GeSHi will convert it anyway. + +If you have not enabled line numbers, this will have no effect. +Caution: + +Although I'd like GeSHi to have XHTML strict compliance, this feature will break compliancy (however transitional compliancy remains). This is because the only widely supported way to change the start value for line numbers is by using the start="number" attribute of the
              tag. Although CSS does provide a mechanism for doing this, it is only supported in Opera versions 7.5 and above (not even Firefox supports this). +3.3: Using CSS Classes +Top | Contents | Next | Previous + +Using CSS to highlight your code instead of in-lining the styles is a definate bonus. Not only is it more compliant (the w3c is deprecating the style attribute in XHTML 2.0) but it results in far less outputted code - up to a whopping 90% saving - which makes a *huge* difference to those unlucky of us on modems! +3.3.1: Enabling CSS Classes +Top | Contents | Next | Previous + +By default, GeSHi doesn't use the classes, so it's easy just to whack out some highlighted code if you need without worrying about stylesheets. However, if you're a bit more organised about it, you should use the classes ;). To turn the use of classes on, you call the enable_classes() method: +$geshi->enable_classes(); + +If you want to turn classes OFF for some reason later: +$geshi->enable_classes(false); + +If classes are enabled when parse_code() is called, then the resultant source will use CSS classes in the output, otherwise it will in-line the styles. The advantages of using classes are great - the reduction in source will be very noticeable, and what's more you can use one stylesheet for several different highlights on the same page. In fact, you can even use an external stylesheet and link to that, saving even more time and source (because stylesheets are cached by browsers). +Note: + +There have been problems with inline styles and the Symbol Highlighting added in 1.0.7.21. If you can you should therefore turn CSS classes ON to avoid those issues. +Caution: + +This should be the very first method you call after creating a new GeSHi object! That way, various other methods can act upon your choice to use classes correctly. In theory, you could call this method just before parsing the code, but this may result in unexpected behaviour. +3.3.2: Setting the CSS class and ID +Top | Contents | Next | Previous + +You can set an overall CSS class and id for the code. This is a good feature that allows you to use the same stylesheet for many different snippets of code. You call set_overall_class() and set_overall_id to accomplish this: +$geshi->set_overall_class('mycode'); +$geshi->set_overall_id('dk48ck'); + +The default classname is the name of the language being used. This means you can use just the one stylesheet for all sources that use the same language, and incidentally means that you probably won't have to call these methods too often. + +CSS IDs are supposed to be unique, and you should use them as such. Basically, you can specify an ID for your code and then use that ID to highlight that code in a unique way. You'd do this for a block of code that you expressly wanted to be highlighted in a different way (see the section below on gettting the stylesheet for your code for an example). +3.3.3: Getting the stylesheet for your code +Top | Contents | Next | Previous + +The other half of using CSS classes is getting the stylesheet for use with the classes. GeSHi makes it very easy to get a stylesheet for your code, with one easy method call: +$geshi->enable_classes(); + +// Here we have code that will spit out a header for +// a stylesheet. For example: + +echo ' +Code + +'; + +The get_stylesheet() method gets the stylesheet for your code in one easy call. All you need to do is output it in the correct place. As you can also see, you don't even have to enable class usage to get the stylesheet nessecary either - however not enabling classes but using the stylesheet may result in problems later. + +By default, get_stylesheet() tries to echo the least amount of code possible. Although currently it doesn't check to see if a certain lexic is even in the source, you can expect this feature in the future. At least for the present however, if you explicitly disable the highlighting of a certain lexic, or disable line numbers, the related CSS will not be outputted. This may be a bad thing for you perhaps you're going to use the stylesheet for many blocks of code, some with line numbers, others with some lexic enabled where this source has it disabled. Or perhaps you're building an external stylesheet and want all lexics included. So to get around this problem, you do this: +$geshi->get_stylesheet(false); + +This turns economy mode off, and all of the stylesheet will be outputted regardless. + +Now lets say you have several snippets of code, using the same language. In most of them you don't mind if they're highlighted the same way (in fact, that's exactly what you want) but in one of them you'd like the source to be highlighted differently. Here's how you can do that: +// assume path is the default "geshi/" relative to the current directory +$geshi1 = new GeSHi($source1, $lang); +$geshi2 = new GeSHi($source2, $lang); +$geshi3 = new GeSHi($source3, $lang); + +// Turn classes on for all sources +$geshi1->enable_classes(); +$geshi2->enable_classes(); +$geshi3->enable_classes(); + +// Make $geshi3 unique +$geshi3->set_overall_id('different'); + +// +// Methods are called on $geshi3 to change styles... +// + +echo ' +Code + +'; + + +echo 'Code snippet 1:'; +echo $geshi1->parse_code(); +echo 'Code snippet 2 (same highlighting as 1):'; +echo $geshi2->parse_code(); +echo 'Code snippet 3 (DIFFERENT highlighting):'; +echo $geshi3->parse_code(); + +echo ''; + +Before version 1.0.2, you needed to set the class of the code you wanted to be unique to the empty string. This limitation has been removed in version 1.0.2 - if you set the ID of a block of code, all styling will be done based on that ID alone. +3.3.4: Using an External Stylesheet +Top | Contents | Next | Previous + +An external stylesheet can reduce even more the amount of code needed to highlight some source. However there are some drawbacks with this. To use an external stylesheet, it's up to you to link it in to your document, normally with the following HTML: + + + + +In your external stylesheet you put CSS declarations for your code. Then just make sure you're using the correct class (use set_overall_class() to ensure this) and this should work fine. + +This method is great if you don't mind the source always being highlighted the same (in particular, if you're making a plugin for a forum/wiki/other system, using an external stylesheet is a good idea!). It saves a small amount of code and your bandwidth, and it's relatively easy to just change the stylesheet should you need to. However, using this will render the methods that change the styles of the code useless, because of course the stylesheet is no longer being dynamically generated. You can still disable highlighting of certain lexics dynamically, however. +Note: + +As of version 1.0.2, GeSHi comes with a contrib/ directory, which in it contains a "wizard" script for creating a stylesheet. Although this script is by no means a complete solution, it will create the necessary rules for the basic lexics - comments, strings for example. Things not included in the wizard include regular expressions for any language that uses them (PHP and XML are two languages that use them), and keyword-link styles. However, this script should take some of the tedium out of the job of making an external stylesheet. Expect a much better version of this script in version 1.2! +3.4: Changing Styles +Top | Contents | Next | Previous + +One of the more powerful features of GeSHi is the ability to change the style of the output dynamically. Why be chained to the boring styles the language authors make up? You can change almost every single aspect of highlighted code - and can even say whether something is to be highlighted at all. + +If you're confused about "styles", you probably want to have a quick tutorial in them so you know what you can do with them. Checkout the homepage of CSS at http://www.w3.org/Style/CSS. +3.4.1: The Overall Styles +Top | Contents | Next | Previous + +The code outputted by GeSHi is either in a
              or a
               (see the section entitled "The Code Container"), and this can be styled.
              +$geshi->set_overall_style('... styles ...');
              +
              +Where styles is a string containing valid CSS declarations. By default, these styles overwrite the current styles, but you can change this by adding a second parameter:
              +$geshi->set_overall_style('color: blue;', true);
              +
              +The default styles "shine through" wherever anything isn't highlighted. Also, you can apply more advanced styles, like position: (fixed|relative) etc, because a 
              /
               is a block level element.
              +Note:
              +
              +Remember that a 
              will by default have a larger font size than a
              , as discussed in the section "The Code Container".
              +3.4.2: Line Number Styles
              +Top | Contents | Next | Previous
              +
              +You may wish to refer to the section Styling Line Numbers before reading this section.
              +
              +As of version 1.0.2, the way line numbers are generated is different, so therefore the way that they are styled is different. In particular, now you cannot set the background style of the fancy line numbers to be different from that of the normal line numbers.
              +
              +Line number styles are set by using the method set_line_style:
              +$geshi->set_line_style($style1, $style2);
              +
              +$style1 is the style of the line numbers by default, and $style2 is the style of the fancy line numbers.
              +Caution:
              +
              +Things have changed since 1.0.1! This note is very important - please make sure you check this twice before complaining about line numbers!
              +
              +Because of the way that ordered lists are done in HTML, there really isn't normally a way to style the actual numbers in the list. I've cheated somewhat with GeSHi - I've made it possible to use CSS to style the foreground of the line numbers. So therefore, you can change the color, font size and type, and padding on them. If you want to have a pretty background, you must use set_overall_style() to do this, and use set_code_style() to style the actual code! This is explained in the section above: Styling Line Numbers.
              +
              +In addition, the styles for fancy line numbers is now the difference between the normal styles and the styles you want to achieve. For example, in GeSHi prior to 1.0.2 you may have done this to style line numbers:
              +$geshi->set_line_style('color: red; font-weight: bold;', 'color: green; font-weight: bold');
              +
              +Now you instead can do this:
              +$geshi->set_line_style('color: red; font-weight: bold;', 'color: green;');
              +
              +The font-weight: bold; will automatically carry through to the fancy styles. This is actually a small saving in code - but the difference may be confusing for anyone using 1.0.1 at first.
              +3.4.3: Setting Keyword Styles
              +Top | Contents | Next | Previous
              +
              +Perhaps the most regular change you will make will be to the styles of a keyword set. In order to change the styles for a particular set, you'll have to know what the set is called first. Sets are numbered from 1 up. Typically, set 1 contains keywords like if, while, do, for, switch etc, set 2 contains null, false, true etc, set 3 contains function inbuilt into the language (echo, htmlspecialchars etc. in PHP) and set 4 contains data types and similar variable modifiers: int, double, real, static etc. However these things are not fixed, and you should check the language file to see what key you want. Having a familiarity with a language file is definately a plus for using it.
              +
              +To change the styles for a keyword set, call the set_keyword_group_style() method:
              +$geshi->set_keyword_group_style($group, $styles);
              +
              +Where $group is the group to change the styles for and $styles is a string containing the styles to apply to that group.
              +
              +By default, the styles you pass overwrite the current styles. Add a boolean true after the styles you specify to combine them with the current styles:
              +$geshi->set_keyword_group_style(3, 'color: white;', true);
              +3.4.4: Setting Comment Styles
              +Top | Contents | Next | Previous
              +
              +To change the styles for a comment group, call the set_comments_style() method:
              +$geshi->set_comments_style($group, $styles);
              +
              +Where $group is either a number corresponding to a single-line comment, or the string 'MULTI' to specify multiline comments:
              +$geshi->set_comments_style(1, 'font-style: italic;');
              +$geshi->set_comments_style('MULTI', 'display: hidden;');
              +
              +By default, the styles you pass overwrite the current styles. Add a boolean true after the styles you specify to combine them with the current styles:
              +$geshi->set_comments_style(1, 'font-weight: 100;', true);
              +Note:
              +
              +In 1.0.7.22 a new kind of Comments called "COMMENT_REGEXP" has been added. Those are handled by setting single line comment styles.
              +3.4.5: Setting Other Styles
              +Top | Contents | Next | Previous
              +
              +GeSHi can highlight many other aspects of your source other than just keywords and comments. Strings, Numbers, Methods and Brackets among other things can all also be highlighted. Here are the related methods:
              +$geshi->set_escape_characters_style($styles[, $preserve_defaults]);
              +$geshi->set_symbols_style($styles[, $preserve_defaults]);
              +$geshi->set_strings_style($styles[, $preserve_defaults]);
              +$geshi->set_numbers_style($styles[, $preserve_defaults]);
              +$geshi->set_methods_style($key, $styles[, $preserve_defaults]);
              +$geshi->set_regexps_style($key, $styles[, $preserve_defaults]);
              +
              +$styles is a string containing valid stylesheet declarations, while $preserve_defaults should be set to true if you want your styles to be merged with the previous styles. In the case of set_methods_style, you should select a group to set the styles of, check the language files for the number used for each "object splitter".
              +
              +Like this was possible for set_method_style a new parameter has been introduced for set_symbols_style too which allows you to select the group of symbols for which you'd like to change your style. $geshi->set_symbols_style($styles[, $preserve_defaults[, $group]]);
              +If the third parameter is not given, group 0 is assumed. Furthermore you should note that any changes to group 0 are also reflected in the bracket style, i.e. a pass-through call to set_bracket_style is made.
              +3.5: Case Sensitivity and Auto Casing
              +Top | Contents | Next | Previous
              +
              +Controlling the case of the outputted source is an easy job with GeSHi. You can control which keywords are converted in case, and also control whether keywords are checked in a case sensitive manner.
              +3.5.1: Auto-Caps/Nocaps
              +Top | Contents | Next | Previous
              +
              +Auto-Caps/Nocaps is a nifty little feature that capitalises or lowercases automatically certain lexics when they are styled. I dabble in QuickBASIC, a dialect of BASIC which is well known for it's capatalisation, and SQL is another language well known for using caps for readability.
              +
              +To change what case lexics are rendered in, you call the set_case_keywords() method:
              +$geshi->set_case_keywords($caps_modifier);
              +
              +The valid values to pass to this method are:
              +
              +    * GESHI_CAPS_NO_CHANGE - Don't change the case of any lexics, leave as they are found
              +    * GESHI_CAPS_UPPER - Uppercase all lexics found
              +    * GESHI_CAPS_LOWER - Lowercase all lexics found
              +
              +Caution:
              +
              +When I say "lexic", I mean "keywords". Any keyword in any keyword array will be modified using this option! This is one small area of inflexibility I hope to fix in 1.2.X.
              +
              +I suspect this will only be used to specify GESHI_CAPS_NO_CHANGE to turn off autocaps for languages like SQL and BASIC variants, like so:
              +$geshi = new GeSHi($source, 'sql');
              +$geshi->set_case_keywords(GESHI_CAPS_NO_CHANGE); // don't want keywords capatalised
              +
              +All the same, it can be used for some interesting effects:
              +$geshi = new GeSHi($source, 'java');
              +// Anyone who's used java knows how picky it is about CapitalLetters...
              +$geshi->set_case_keywords(GESHI_CAPS_LOWER);
              +// No *way* the source will look right now ;)
              +3.5.2: Setting Case Sensitivity
              +Top | Contents | Next | Previous
              +
              +Some languages, like PHP, don't mind what case function names and keywords are in, while others, like Java, depend on such pickiness to maintain their bad reputations ;). In any event, you can use the set_case_sensitivity to change the case sensitiveness of a particular keyword group from the default:
              +$geshi->set_case_sensitivity($key, $sensitivity);
              +
              +Where $key is the key of the group for which you wish to change case sensitivness for (see the language file for that language), and $sensitivity is a boolean value - true if the keyword is case sensitive, and false if not.
              +3.6: Changing the Source, Language, Config Options
              +Top | Contents | Next | Previous
              +
              +What happens if you want to change the source to be highlighted on the fly, or the language. Or if you want to specify any of those basic fields after you've created a GeSHi object? Well, that's where these methods come in.
              +3.6.1: Changing the Source Code
              +Top | Contents | Next | Previous
              +
              +To change the source code, you call the set_source() method:
              +$geshi->set_source($newsource);
              +
              +Example:
              +$geshi = new GeSHi($source1, 'php');
              +
              +// Method calls to specify various options...
              +
              +$code1 = $geshi->parse_code();
              +
              +$geshi->set_source($source2);
              +$code2 = $geshi->parse_code();
              +3.6.2: Changing the Language
              +Top | Contents | Next | Previous
              +
              +What happens if you want to change the language used for highlighting? Just call set_language():
              +$geshi->set_language('newlanguage');
              +
              +Example:
              +$geshi = new GeSHi($source, 'php');
              +
              +$code = $geshi->parse_code();
              +
              +// Highlight GeSHi's output
              +$geshi->set_source($code);
              +$geshi->set_language('html4strict');
              +$geshi->enable_classes(false);
              +echo $geshi->parse_code();
              +Note:
              +
              +Names are case-insensitive - they will be converted to lower case to match a language file however. So if you're making a language file, remember it should have a name in lower case.
              +Note:
              +
              +What you pass to this method is the name of a language file, minus the .php extension. If you're writing a plugin for a particular application, it's up to you to somehow convert user input into a valid language name.
              +Caution:
              +
              +GeSHi include()s the language file, so be careful to make sure that users can't pass some wierd language name to include any old script! GeSHi tries to strip non-valid characters out of a language name, but you should always do this your self anyway. In particular, language files are always lower-case, with either alphanumeric characters, dashes or underscores in their name.
              +
              +At the very least, strip "/" characters out of a language name.
              +3.6.3: Changing the Language Path
              +Top | Contents | Next | Previous
              +
              +What happens if all of a sudden you want to use language files from a different directory from the current language file location? You call the set_language_path() method:
              +$geshi->set_language_path($newpath);
              +
              +It doesn't matter whether the path has a trailing slash after it or not - only that it points to a valid folder. If it doesn't, that's your tough luck ;)
              +3.6.4: Changing the Character Set
              +Top | Contents | Next | Previous
              +Note:
              +
              +As of GeSHi 1.0.7.18, you don't need to use this, as htmlspecialchars is not being used due to a security flaw in it (that is unpatched in even the most recent PHP4 versions, and in PHP5 < 5.2). As long as you set the encoding properly with a php header() call, your foreign characters will be displayed correctly.
              +
              +As of version 1.0.3, you can use the method set_encoding to specify the character set that your source is in. Valid names are those names that are valid for the PHP function htmlentities():
              +$geshi->set_encoding($encoding);
              +
              +There is a table of valid strings for $encoding at the php.net manual linked to above. If you do not specify an encoding, or specify an invalid encoding, the character set used is ISO-8859-1.
              +Using load_from_file to Change the Language and Source Code
              +Top | Contents | Next | Previous
              +
              +As of GeSHi 1.0.5, you can use the method load_from_file to load the source code and language from a file. Simply pass this method a file name and it will attempt to load the source and set the language.
              +$geshi->load_from_file($file_name, $lookup);
              +
              +$file_name is the file name to use, and $lookup is an optional parameter that contains a lookup array to use for deciding which language to choose. You can use this to override GeSHi's default lookup array, which may not contain the extension of the file you're after, or perhaps does have your extension but under a different language. The lookup array is of the form:
              +
              +array(
              +	 *   'lang_name' => array('extension', 'extension', ...),
              +	 *   'lang_name' ...
              +	 * );
              +
              +Also, you can use the method get_language_name_from_extension if you need to convert a file extension to a valid language name. This method will return the empty string if it could not find a match in the lookup, and like load_from_file it accepts an optional second parameter that contains a lookup array.
              +3.7: Error Handling
              +Top | Contents | Next | Previous
              +
              +What happens if you try to highlight using a language that doesn't exist? Or if GeSHi can't read a required file? The results you get may be confusing. You may check your code over and over, and never find anything wrong. GeSHi provides ways of finding out if GeSHi itself found anything wrong with what you tried to do. After highlighting, you can call the error() method:
              +$geshi = new GeSHi('hi', 'thisLangIsNotSupported');
              +
              +echo $geshi->error();  // echoes error message
              +
              +The error message you will get will look like this:
              +
              +    GeSHi Error: GeSHi could not find the language thisLangIsNotSupported (using path geshi/) (code 2)
              +
              +The error outputted will be the last error GeSHi came across, just like how mysql_error() works.
              +3.8: Disabling styling of some Lexics
              +Top | Contents | Next | Previous
              +
              +One disadvantage of GeSHi is that for large source files using complex languages, it can be quite slow with every option turned on. Although future releases will concentrate on the speed/resource side of highlighting, for now you can gain speed increases by disabling some of the highlighting options. This is done by using a series of set_*_highlighting methods:
              +
              +    * set_keyword_group_highlighting($group, $flag): Sets whether a particular $group of keywords is to be highlighted or not. Consult the necessary language file(s) to see what $group should be for each group (typically a positive integer). $flag is false if you want to disable highlighting of this group, and true if you want to re-enable higlighting of this group. If you disable a keyword group then even if the keyword group has a related URL one will not be generated for that keyword.
              +    * set_comments_highlighting($group, $flag): Sets whether a particular $group of comments is to be highlighted or not. Consult the necessary language file(s) to see what $group should be for each group (typically a positive integer, or the string 'MULTI' for multiline comments. $flag is false if you want to disable highlighting of this group, and true if you want to re-enable highlighting of this group.
              +    * set_regexps_highlighting($regexp, $flag): Sets whether a particular $regexp is to be highlighted or not. Consult the necessary language file(s) to see what $regexp should be for each regexp (typically a positive integer, or the string 'MULTI' for multiline comments. $flag is false if you want to disable highlighting of this group, and true if you want to re-enable highlighting of this group.
              +    * The following methods:
              +          o set_escape_characters_highlighting($flag)
              +          o set_symbols_highlighting($flag)
              +          o set_strings_highlighting($flag)
              +          o set_numbers_highlighting($flag)
              +          o set_methods_highlighting($flag)
              +      Work on their respective lexics (e.g. set_methods_highlighting will disable/enable highlighting of methods). For each method, if $flag is false then the related lexics will not be highlighted at all (this means no HTML will surround the lexic like usual, saving on time and bandwidth.
              +
              +In case all highlighting should be disabled or reenabled GeSHi provides two methods called disable_highlighting() and enable_highlighting($flag). The optional paramter $flag has been added in 1.0.7.21 and specifies the desired state, i.e. true (default) to turn all highlighting on, or false to turn all highlighting off. Since 1.0.7.21 the method disnable_highlighting() has become deprecated.
              +3.9: Setting the Tab Width
              +Top | Contents | Next | Previous
              +
              +If you're using the 
               header, tabs are handled automatically by your browser, and in general you can count on good results. However, if you're using the 
              header, you may want to specify a tab width explicitly. + +Note that tabs created in this fashion won't be like normal tabs - there won't be "tab-stops" as such, instead tabs will be replaced with the specified number of spaces. + +To change the tab width, you call the set_tab_width() method: +$geshi->set_tab_width($width); + +Where $width is the width in spaces that you'd like tabs to be. +3.10: Using Strict Mode +Top | Contents | Next | Previous + +Some languages like to get tricky, and jump in and out of the file that they're in. For example, the vast majority of you reading this will have used a PHP file. And you know that PHP code is only executed if it's within delimiters like (there are others of course...). So what happens if you do the following in a php file? + + +Well normally using GeSHi with PHP, or using a bad highlighter, you'll end up with this: + + +What a mess! Especially if you're being slack about where you're putting your quotes, you could end up with the rest of your file as bright red. Fortunately, you can tell GeSHi to be "strict" about just when it highlights and when it does not, using the enable_strict_mode method: +$geshi->enable_strict_mode($mode); + +Where $mode is true or not specified to enable strict mode, or false to disable strict mode if you've already turned it and don't want it now. + +Here's the result: much better! + +3.11: Adding/Removing Keywords +Top | Contents | Next | Previous + +Lets say that you're working on a large project, with many files, many classes and many functions. Perhaps also you have the source code on the web and highlighted by GeSHi, perhaps as a front end to CVS, as a learning tool, something to refer to, whatever. Well, why not highlight the names of the functions and classes *your* project uses, as well as the standard functions and classes? Or perhaps you're not interested in highlighting certain functions, and would like to remove them? Or maybe you don't mind if an entire function group goes west in the interest of speed? GeSHi can handle all of this! +3.11.1: Adding a Keyword +Top | Contents | Next | Previous + +If you want to add a keyword to an existing keyword group, you use the add_keyword method: +$geshi->add_keyword($key, $word); + +Where $key is the index of the group of keywords you want to add this keyword to, and $word is the word to add. + +This implies knowledge of the language file to know the correct index. +Note: + +Keywords should contain at least two alphabetical characters (lower or upper case letters only). This is to enable GeSHi to work much faster by not bothering to try to detect keywords in parts of your source where there is no alphabetical characters. +3.11.2: Removing a Keyword +Top | Contents | Next | Previous + +Perhaps you want to remove a keyword from an existing group. Maybe you don't use it and want to save yourself some time. Whatever the reason, you can remove it using the remove_keyword method: +$geshi->remove_keyword($key, $word); + +Where $key is the index of the gropu of keywords that you want to remove this keyword from, and $word is the word to remove. + +This implies knowledge of the language file to know the correct index - most of the time the keywords you'll want to remove will be in group 3, but this is not guaranteed and you should check the language file first. + +This function is silent - if the keyword is not in the group you specified, nothing awful will happen ;) +3.11.3: Adding a Keyword Group +Top | Contents | Next | Previous + +Lets say for your big project you have several main functions and classes that you'd like highlighted. Why not add them as their own group instead of having them highlighted the same way as other keywords? Then you can make them stand out, and people can instantly see which functions and classes are user defined or inbuilt. Furthermore, you could set the URL for this group to point at the API documentation of your project. + +You add a keyword group by using the add_keyword_group method: +$geshi->add_keyword_group($key, $styles, $case_sensitive, $words); + +Where $key is the key that you want to use to refer to this group, $styles is the styles that you want to use to style this group, $case_sensitive is true or false depending on whether you want this group of keywords to be case sensitive or not and $words is an array of words (or a string) of which words to add to this group. For example: +$geshi->add_keyword_group(10, 'color: #600000;', false, array('myfunc_1', 'myfunc_2', 'myfunc_3')); + +Adds a keyword group referenced by index 10, of which all keywords in the group will be dark red, each keyword can be in any case and which contains the keywords "myfunc_1", "myfunc_2" and "myfunc_3". + +After creating such a keyword group, you may call other GeSHi methods on it, just as you would for any other keyword group. +Caution: + +If you specify a $key for which there is already a keyword group, the old keyword group will be overwritten! Most language files don't use numbers larger than 5, so I recommend you play it safe and use a number like 10 or 42. +3.11.4: Removing a Keyword Group +Top | Contents | Next | Previous + +Perhaps you *really* need speed? Why not just remove an entire keyword group? GeSHi won't have to loop through each keyword checking for its existance, saving much time. You remove a keyword group by using the remove_keyword_group method: +$geshi->remove_keyword_group($key); + +Where $key is the key of the group you wish to remove. This implies knowleged of the language file. +3.12: Headers and Footers for Your Code +Top | Contents | Next | Previous + +So you want to add some special information to the highlighted source? GeSHi can do that too! You can specify headers and footers for your code, style them, and insert information from the highlighted source into your header or footer. +3.12.1: Keyword Substitution +Top | Contents | Next | Previous + +In your header and footer, you can put special keywords that will be replaced with actual configuration values for this GeSHi object. The keywords you can use are: + + *
              '; + } + $parsed_code .= ''; + } + // No line numbers, but still need to handle highlighting lines extra. + // Have to use divs so the full width of the code is highlighted + $close = 0; + for ($i = 0; $i < $n; ++$i) { + // Make lines have at least one space in them if they're empty + // BenBE: Checking emptiness using trim instead of relying on blanks + if ('' == trim($code[$i])) { + $code[$i] = ' '; + } + // fancy lines + if ($this->line_numbers == GESHI_FANCY_LINE_NUMBERS && + $i % $this->line_nth_row == ($this->line_nth_row - 1)) { + // Set the attributes to style the line + if ($this->use_classes) { + $parsed_code .= ''; + } else { + // This style "covers up" the special styles set for special lines + // so that styles applied to special lines don't apply to the actual + // code on that line + $parsed_code .= '' + .''; + } + $close += 2; + } + //Is this some line with extra styles??? + if (in_array($i + 1, $this->highlight_extra_lines)) { + if ($this->use_classes) { + if (isset($this->highlight_extra_lines_styles[$i])) { + $parsed_code .= ""; + } else { + $parsed_code .= ""; + } + } else { + $parsed_code .= "get_line_style($i) . "\">"; + } + ++$close; + } + + $parsed_code .= $code[$i]; + + if ($close) { + $parsed_code .= str_repeat('', $close); + $close = 0; + } + elseif ($i + 1 < $n) { + $parsed_code .= "\n"; + } + unset($code[$i]); + } + + if ($this->header_type == GESHI_HEADER_PRE_VALID || $this->header_type == GESHI_HEADER_PRE_TABLE) { + $parsed_code .= '
              '; + } + if ($this->header_type == GESHI_HEADER_PRE_TABLE && $this->line_numbers != GESHI_NO_LINE_NUMBERS) { + $parsed_code .= ''; + } + } + + $parsed_code .= $this->footer(); + } + + /** + * Creates the header for the code block (with correct attributes) + * + * @return string The header for the code block + * @since 1.0.0 + * @access private + */ + function header() { + // Get attributes needed + /** + * @todo Document behaviour change - class is outputted regardless of whether + * we're using classes or not. Same with style + */ + $attributes = ' class="' . $this->_genCSSName($this->language); + if ($this->overall_class != '') { + $attributes .= " ".$this->_genCSSName($this->overall_class); + } + $attributes .= '"'; + + if ($this->overall_id != '') { + $attributes .= " id=\"{$this->overall_id}\""; + } + if ($this->overall_style != '' && !$this->use_classes) { + $attributes .= ' style="' . $this->overall_style . '"'; + } + + $ol_attributes = ''; + + if ($this->line_numbers_start != 1) { + $ol_attributes .= ' start="' . $this->line_numbers_start . '"'; + } + + // Get the header HTML + $header = $this->header_content; + if ($header) { + if ($this->header_type == GESHI_HEADER_PRE || $this->header_type == GESHI_HEADER_PRE_VALID) { + $header = str_replace("\n", '', $header); + } + $header = $this->replace_keywords($header); + + if ($this->use_classes) { + $attr = ' class="head"'; + } else { + $attr = " style=\"{$this->header_content_style}\""; + } + if ($this->header_type == GESHI_HEADER_PRE_TABLE && $this->line_numbers != GESHI_NO_LINE_NUMBERS) { + $header = "$header"; + } else { + $header = "$header
              "; + } + } + + if (GESHI_HEADER_NONE == $this->header_type) { + if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { + return "$header"; + } + return $header . ($this->force_code_block ? '
              ' : ''); + } + + // Work out what to return and do it + if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { + if ($this->header_type == GESHI_HEADER_PRE) { + return "$header"; + } elseif ($this->header_type == GESHI_HEADER_DIV || + $this->header_type == GESHI_HEADER_PRE_VALID) { + return "$header"; + } elseif ($this->header_type == GESHI_HEADER_PRE_TABLE) { + return "$header"; + } + } else { + if ($this->header_type == GESHI_HEADER_PRE) { + return "$header" . + ($this->force_code_block ? '
              ' : ''); + } else { + return "$header" . + ($this->force_code_block ? '
              ' : ''); + } + } + } + + /** + * Returns the footer for the code block. + * + * @return string The footer for the code block + * @since 1.0.0 + * @access private + */ + function footer() { + $footer = $this->footer_content; + if ($footer) { + if ($this->header_type == GESHI_HEADER_PRE) { + $footer = str_replace("\n", '', $footer);; + } + $footer = $this->replace_keywords($footer); + + if ($this->use_classes) { + $attr = ' class="foot"'; + } else { + $attr = " style=\"{$this->footer_content_style}\""; + } + if ($this->header_type == GESHI_HEADER_PRE_TABLE && $this->line_numbers != GESHI_NO_LINE_NUMBERS) { + $footer = "$footer"; + } else { + $footer = "$footer
              "; + } + } + + if (GESHI_HEADER_NONE == $this->header_type) { + return ($this->line_numbers != GESHI_NO_LINE_NUMBERS) ? '
            ' . $footer : $footer; + } + + if ($this->header_type == GESHI_HEADER_DIV || $this->header_type == GESHI_HEADER_PRE_VALID) { + if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { + return "
          $footer
          "; + } + return ($this->force_code_block ? '
        2. ' : '') . + "$footer"; + } + elseif ($this->header_type == GESHI_HEADER_PRE_TABLE) { + if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { + return "$footer"; + } + return ($this->force_code_block ? '' : '') . + "$footer"; + } + else { + if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { + return "
        $footer
        "; + } + return ($this->force_code_block ? '' : '') . + "$footer"; + } + } + + /** + * Replaces certain keywords in the header and footer with + * certain configuration values + * + * @param string The header or footer content to do replacement on + * @return string The header or footer with replaced keywords + * @since 1.0.2 + * @access private + */ + function replace_keywords($instr) { + $keywords = $replacements = array(); + + $keywords[] = '
          to have no effect at all if there are line numbers + // (
            s have margins that should be destroyed so all layout is + // controlled by the set_overall_style method, which works on the + //
             or 
            container). Additionally, set default styles for lines + if (!$economy_mode || $this->line_numbers != GESHI_NO_LINE_NUMBERS) { + //$stylesheet .= "$selector, {$selector}ol, {$selector}ol li {margin: 0;}\n"; + $stylesheet .= "$selector.de1, $selector.de2 {{$this->code_style}}\n"; + } + + // Add overall styles + // note: neglect economy_mode, empty styles are meaningless + if ($this->overall_style != '') { + $stylesheet .= "$selector {{$this->overall_style}}\n"; + } + + // Add styles for links + // note: economy mode does not make _any_ sense here + // either the style is empty and thus no selector is needed + // or the appropriate key is given. + foreach ($this->link_styles as $key => $style) { + if ($style != '') { + switch ($key) { + case GESHI_LINK: + $stylesheet .= "{$selector}a:link {{$style}}\n"; + break; + case GESHI_HOVER: + $stylesheet .= "{$selector}a:hover {{$style}}\n"; + break; + case GESHI_ACTIVE: + $stylesheet .= "{$selector}a:active {{$style}}\n"; + break; + case GESHI_VISITED: + $stylesheet .= "{$selector}a:visited {{$style}}\n"; + break; + } + } + } + + // Header and footer + // note: neglect economy_mode, empty styles are meaningless + if ($this->header_content_style != '') { + $stylesheet .= "$selector.head {{$this->header_content_style}}\n"; + } + if ($this->footer_content_style != '') { + $stylesheet .= "$selector.foot {{$this->footer_content_style}}\n"; + } + + // Styles for important stuff + // note: neglect economy_mode, empty styles are meaningless + if ($this->important_styles != '') { + $stylesheet .= "$selector.imp {{$this->important_styles}}\n"; + } + + // Simple line number styles + if ((!$economy_mode || $this->line_numbers != GESHI_NO_LINE_NUMBERS) && $this->line_style1 != '') { + $stylesheet .= "{$selector}li, {$selector}.li1 {{$this->line_style1}}\n"; + } + if ((!$economy_mode || $this->line_numbers != GESHI_NO_LINE_NUMBERS) && $this->table_linenumber_style != '') { + $stylesheet .= "{$selector}.ln {{$this->table_linenumber_style}}\n"; + } + // If there is a style set for fancy line numbers, echo it out + if ((!$economy_mode || $this->line_numbers == GESHI_FANCY_LINE_NUMBERS) && $this->line_style2 != '') { + $stylesheet .= "{$selector}.li2 {{$this->line_style2}}\n"; + } + + // note: empty styles are meaningless + foreach ($this->language_data['STYLES']['KEYWORDS'] as $group => $styles) { + if ($styles != '' && (!$economy_mode || + (isset($this->lexic_permissions['KEYWORDS'][$group]) && + $this->lexic_permissions['KEYWORDS'][$group]))) { + $stylesheet .= "$selector.kw$group {{$styles}}\n"; + } + } + foreach ($this->language_data['STYLES']['COMMENTS'] as $group => $styles) { + if ($styles != '' && (!$economy_mode || + (isset($this->lexic_permissions['COMMENTS'][$group]) && + $this->lexic_permissions['COMMENTS'][$group]) || + (!empty($this->language_data['COMMENT_REGEXP']) && + !empty($this->language_data['COMMENT_REGEXP'][$group])))) { + $stylesheet .= "$selector.co$group {{$styles}}\n"; + } + } + foreach ($this->language_data['STYLES']['ESCAPE_CHAR'] as $group => $styles) { + if ($styles != '' && (!$economy_mode || $this->lexic_permissions['ESCAPE_CHAR'])) { + // NEW: since 1.0.8 we have to handle hardescapes + if ($group === 'HARD') { + $group = '_h'; + } + $stylesheet .= "$selector.es$group {{$styles}}\n"; + } + } + foreach ($this->language_data['STYLES']['BRACKETS'] as $group => $styles) { + if ($styles != '' && (!$economy_mode || $this->lexic_permissions['BRACKETS'])) { + $stylesheet .= "$selector.br$group {{$styles}}\n"; + } + } + foreach ($this->language_data['STYLES']['SYMBOLS'] as $group => $styles) { + if ($styles != '' && (!$economy_mode || $this->lexic_permissions['SYMBOLS'])) { + $stylesheet .= "$selector.sy$group {{$styles}}\n"; + } + } + foreach ($this->language_data['STYLES']['STRINGS'] as $group => $styles) { + if ($styles != '' && (!$economy_mode || $this->lexic_permissions['STRINGS'])) { + // NEW: since 1.0.8 we have to handle hardquotes + if ($group === 'HARD') { + $group = '_h'; + } + $stylesheet .= "$selector.st$group {{$styles}}\n"; + } + } + foreach ($this->language_data['STYLES']['NUMBERS'] as $group => $styles) { + if ($styles != '' && (!$economy_mode || $this->lexic_permissions['NUMBERS'])) { + $stylesheet .= "$selector.nu$group {{$styles}}\n"; + } + } + foreach ($this->language_data['STYLES']['METHODS'] as $group => $styles) { + if ($styles != '' && (!$economy_mode || $this->lexic_permissions['METHODS'])) { + $stylesheet .= "$selector.me$group {{$styles}}\n"; + } + } + // note: neglect economy_mode, empty styles are meaningless + foreach ($this->language_data['STYLES']['SCRIPT'] as $group => $styles) { + if ($styles != '') { + $stylesheet .= "$selector.sc$group {{$styles}}\n"; + } + } + foreach ($this->language_data['STYLES']['REGEXPS'] as $group => $styles) { + if ($styles != '' && (!$economy_mode || + (isset($this->lexic_permissions['REGEXPS'][$group]) && + $this->lexic_permissions['REGEXPS'][$group]))) { + if (is_array($this->language_data['REGEXPS'][$group]) && + array_key_exists(GESHI_CLASS, $this->language_data['REGEXPS'][$group])) { + $stylesheet .= "$selector."; + $stylesheet .= $this->language_data['REGEXPS'][$group][GESHI_CLASS]; + $stylesheet .= " {{$styles}}\n"; + } else { + $stylesheet .= "$selector.re$group {{$styles}}\n"; + } + } + } + // Styles for lines being highlighted extra + if (!$economy_mode || (count($this->highlight_extra_lines)!=count($this->highlight_extra_lines_styles))) { + $stylesheet .= "{$selector}.ln-xtra, {$selector}li.ln-xtra, {$selector}div.ln-xtra {{$this->highlight_extra_lines_style}}\n"; + } + $stylesheet .= "{$selector}span.xtra { display:block; }\n"; + foreach ($this->highlight_extra_lines_styles as $lineid => $linestyle) { + $stylesheet .= "{$selector}.lx$lineid, {$selector}li.lx$lineid, {$selector}div.lx$lineid {{$linestyle}}\n"; + } + + return $stylesheet; + } + + /** + * Get's the style that is used for the specified line + * + * @param int The line number information is requested for + * @access private + * @since 1.0.7.21 + */ + function get_line_style($line) { + //$style = null; + $style = null; + if (isset($this->highlight_extra_lines_styles[$line])) { + $style = $this->highlight_extra_lines_styles[$line]; + } else { // if no "extra" style assigned + $style = $this->highlight_extra_lines_style; + } + + return $style; + } + + /** + * this functions creates an optimized regular expression list + * of an array of strings. + * + * Example: + * $list = array('faa', 'foo', 'foobar'); + * => string 'f(aa|oo(bar)?)' + * + * @param $list array of (unquoted) strings + * @param $regexp_delimiter your regular expression delimiter, @see preg_quote() + * @return string for regular expression + * @author Milian Wolff + * @since 1.0.8 + * @access private + */ + function optimize_regexp_list($list, $regexp_delimiter = '/') { + $regex_chars = array('.', '\\', '+', '-', '*', '?', '[', '^', ']', '$', + '(', ')', '{', '}', '=', '!', '<', '>', '|', ':', $regexp_delimiter); + sort($list); + $regexp_list = array(''); + $num_subpatterns = 0; + $list_key = 0; + + // the tokens which we will use to generate the regexp list + $tokens = array(); + $prev_keys = array(); + // go through all entries of the list and generate the token list + $cur_len = 0; + for ($i = 0, $i_max = count($list); $i < $i_max; ++$i) { + if ($cur_len > GESHI_MAX_PCRE_LENGTH) { + // seems like the length of this pcre is growing exorbitantly + $regexp_list[++$list_key] = $this->_optimize_regexp_list_tokens_to_string($tokens); + $num_subpatterns = substr_count($regexp_list[$list_key], '(?:'); + $tokens = array(); + $cur_len = 0; + } + $level = 0; + $entry = preg_quote((string) $list[$i], $regexp_delimiter); + $pointer = &$tokens; + // properly assign the new entry to the correct position in the token array + // possibly generate smaller common denominator keys + while (true) { + // get the common denominator + if (isset($prev_keys[$level])) { + if ($prev_keys[$level] == $entry) { + // this is a duplicate entry, skip it + continue 2; + } + $char = 0; + while (isset($entry[$char]) && isset($prev_keys[$level][$char]) + && $entry[$char] == $prev_keys[$level][$char]) { + ++$char; + } + if ($char > 0) { + // this entry has at least some chars in common with the current key + if ($char == strlen($prev_keys[$level])) { + // current key is totally matched, i.e. this entry has just some bits appended + $pointer = &$pointer[$prev_keys[$level]]; + } else { + // only part of the keys match + $new_key_part1 = substr($prev_keys[$level], 0, $char); + $new_key_part2 = substr($prev_keys[$level], $char); + + if (in_array($new_key_part1[0], $regex_chars) + || in_array($new_key_part2[0], $regex_chars)) { + // this is bad, a regex char as first character + $pointer[$entry] = array('' => true); + array_splice($prev_keys, $level, count($prev_keys), $entry); + $cur_len += strlen($entry); + continue; + } else { + // relocate previous tokens + $pointer[$new_key_part1] = array($new_key_part2 => $pointer[$prev_keys[$level]]); + unset($pointer[$prev_keys[$level]]); + $pointer = &$pointer[$new_key_part1]; + // recreate key index + array_splice($prev_keys, $level, count($prev_keys), array($new_key_part1, $new_key_part2)); + $cur_len += strlen($new_key_part2); + } + } + ++$level; + $entry = substr($entry, $char); + continue; + } + // else: fall trough, i.e. no common denominator was found + } + if ($level == 0 && !empty($tokens)) { + // we can dump current tokens into the string and throw them away afterwards + $new_entry = $this->_optimize_regexp_list_tokens_to_string($tokens); + $new_subpatterns = substr_count($new_entry, '(?:'); + if (GESHI_MAX_PCRE_SUBPATTERNS && $num_subpatterns + $new_subpatterns > GESHI_MAX_PCRE_SUBPATTERNS) { + $regexp_list[++$list_key] = $new_entry; + $num_subpatterns = $new_subpatterns; + } else { + if (!empty($regexp_list[$list_key])) { + $new_entry = '|' . $new_entry; + } + $regexp_list[$list_key] .= $new_entry; + $num_subpatterns += $new_subpatterns; + } + $tokens = array(); + $cur_len = 0; + } + // no further common denominator found + $pointer[$entry] = array('' => true); + array_splice($prev_keys, $level, count($prev_keys), $entry); + + $cur_len += strlen($entry); + break; + } + unset($list[$i]); + } + // make sure the last tokens get converted as well + $new_entry = $this->_optimize_regexp_list_tokens_to_string($tokens); + if (GESHI_MAX_PCRE_SUBPATTERNS && $num_subpatterns + substr_count($new_entry, '(?:') > GESHI_MAX_PCRE_SUBPATTERNS) { + if ( !empty($regexp_list[$list_key]) ) { + ++$list_key; + } + $regexp_list[$list_key] = $new_entry; + } else { + if (!empty($regexp_list[$list_key])) { + $new_entry = '|' . $new_entry; + } + $regexp_list[$list_key] .= $new_entry; + } + return $regexp_list; + } + /** + * this function creates the appropriate regexp string of an token array + * you should not call this function directly, @see $this->optimize_regexp_list(). + * + * @param &$tokens array of tokens + * @param $recursed bool to know wether we recursed or not + * @return string + * @author Milian Wolff + * @since 1.0.8 + * @access private + */ + function _optimize_regexp_list_tokens_to_string(&$tokens, $recursed = false) { + $list = ''; + foreach ($tokens as $token => $sub_tokens) { + $list .= $token; + $close_entry = isset($sub_tokens['']); + unset($sub_tokens['']); + if (!empty($sub_tokens)) { + $list .= '(?:' . $this->_optimize_regexp_list_tokens_to_string($sub_tokens, true) . ')'; + if ($close_entry) { + // make sub_tokens optional + $list .= '?'; + } + } + $list .= '|'; + } + if (!$recursed) { + // do some optimizations + // common trailing strings + // BUGGY! + //$list = preg_replace_callback('#(?<=^|\:|\|)\w+?(\w+)(?:\|.+\1)+(?=\|)#', create_function( + // '$matches', 'return "(?:" . preg_replace("#" . preg_quote($matches[1], "#") . "(?=\||$)#", "", $matches[0]) . ")" . $matches[1];'), $list); + // (?:p)? => p? + $list = preg_replace('#\(\?\:(.)\)\?#', '\1?', $list); + // (?:a|b|c|d|...)? => [abcd...]? + // TODO: a|bb|c => [ac]|bb + static $callback_2; + if (!isset($callback_2)) { + $callback_2 = create_function('$matches', 'return "[" . str_replace("|", "", $matches[1]) . "]";'); + } + $list = preg_replace_callback('#\(\?\:((?:.\|)+.)\)#', $callback_2, $list); + } + // return $list without trailing pipe + return substr($list, 0, -1); + } +} // End Class GeSHi + + +if (!function_exists('geshi_highlight')) { + /** + * Easy way to highlight stuff. Behaves just like highlight_string + * + * @param string The code to highlight + * @param string The language to highlight the code in + * @param string The path to the language files. You can leave this blank if you need + * as from version 1.0.7 the path should be automatically detected + * @param boolean Whether to return the result or to echo + * @return string The code highlighted (if $return is true) + * @since 1.0.2 + */ + function geshi_highlight($string, $language, $path = null, $return = false) { + $geshi = new GeSHi($string, $language, $path); + $geshi->set_header_type(GESHI_HEADER_NONE); + + if ($return) { + return '' . $geshi->parse_code() . ''; + } + + echo '' . $geshi->parse_code() . ''; + + if ($geshi->error()) { + return false; + } + return true; + } +} + diff --git a/vendor/easybook/geshi/geshi/4cs.php b/vendor/easybook/geshi/geshi/4cs.php new file mode 100644 index 0000000000..e5a00645c1 --- /dev/null +++ b/vendor/easybook/geshi/geshi/4cs.php @@ -0,0 +1,137 @@ + 'GADV 4CS', + 'COMMENT_SINGLE' => array(1 => "//"), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'All', 'AllMatches', 'And', 'And_Filters', 'As', 'Asc', 'BasedOn', + 'BestMatch', 'Block', 'Buffer', 'ByRef', 'ByVal', 'Call', 'Channel', + 'Chr', 'Clear', 'Close', 'Confirm', 'Const', 'Continue', 'Cos', + 'Critical', 'Declare', 'Default', 'DefaultChannel', 'DefaultDelayTime', + 'DefaultReceiveMode', 'DefaultResponseTime', '#Define', 'DelayTime', + 'Delete', 'Div', 'Else', '#Else', 'ElseIf', '#ElseIf', 'End', 'EndCritical', + 'EndInlineC', 'EndFunction', 'EndIf', '#EndIf', 'EndInputList', + 'EndLocalChannel', 'EndScenario', 'EndSub', 'EndWhile', 'Error', + 'ErrorLevelOff', 'ErrorLevelOn', 'ErrorLevelSet', 'ErrorLevelSetRaw', + 'Event', 'EventMode', 'EventOff', 'EventOn', 'EventSet', 'EventSetRaw', + 'Execute', 'Exit', 'Exp', 'FileClose', 'FilterClear', 'FileEOF', 'FileOpen', + 'FileRead', 'FileSize', 'FileWrite', 'FilterAdd', 'FilterMode', + 'FilterOff', 'FilterOn', 'For', 'Format', 'Function', 'GoOnline', 'GoTo', + 'Handle', 'Hide', 'If', '#If', '#IfDef', '#IfNDef', 'Ignore', '#Include', + 'InlineC', 'Input', 'InputItem', 'InputList', 'Kill', 'LBound', 'LocalChannel', + 'Local', 'Log', 'Log10', 'LogOff', 'LogOn', 'Loop', 'Message', 'Mod', + 'MonitorChannel', 'MostFormat', 'MostMessage', 'Named', 'Never', 'Next', + 'NoOrder', 'Not', 'Nothing', 'NoWait', 'Numeric', 'OnError', 'OnEvent', + 'Or', 'Or_Filters', 'Order', 'Pass', 'Pow', 'Prototype', 'Quit', 'Raise', + 'Random', 'Receive', 'ReceiveMode', 'ReceiveRaw', 'Redim', 'Remote', 'Repeat', + 'Repeated', 'ResponseTime', 'Resume', 'ResumeCritical', 'RT_Common', + 'RT_Dll_Call', 'RT_FILEIO', 'RT_General', 'RT_HardwareAccess', + 'RT_MessageVariableAccess', 'RT_Scenario', 'RT_VariableAccess', 'Runtime', + 'Scenario', 'ScenarioEnd', 'ScenarioStart', 'ScenarioStatus', 'ScenarioTerminate', + 'Send', 'SendRaw', 'Set', 'SetError', 'Sin', 'Single', 'Show', 'Start', + 'StartCritical', 'Starts', 'Static', 'Step', 'Stop', 'String', 'Sub', + 'System_Error', 'TerminateAllChilds', 'Terminates', 'Then', 'Throw', 'TimeOut', + 'To', 'TooLate', 'Trunc', 'UBound', 'Unexpected', 'Until', 'User_Error', + 'View', 'Wait', 'Warning', 'While', 'XOr' + ), + 2 => array( + 'alias', 'winapi', 'long', 'char', 'double', 'float', 'int', 'short', 'lib' + ) + ), + 'SYMBOLS' => array( + '=', ':=', '<', '>', '<>' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000C0; font-weight: bold;', + 2 => 'color: #808080;' + ), + 'COMMENTS' => array( + 1 => 'color: #008000;' + ), + 'BRACKETS' => array( + 0 => 'color: #000080;' + ), + 'STRINGS' => array( + 0 => 'color: #800080;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #66cc66;' + ), + 'SYMBOLS' => array( + 0 => 'color: #000080;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); diff --git a/vendor/easybook/geshi/geshi/6502acme.php b/vendor/easybook/geshi/geshi/6502acme.php new file mode 100644 index 0000000000..62b7b2994f --- /dev/null +++ b/vendor/easybook/geshi/geshi/6502acme.php @@ -0,0 +1,229 @@ + 'MOS 6502 (6510) ACME Cross Assembler format', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /* 6502/6510 Opcodes. */ + 1 => array( + 'adc', 'and', 'asl', 'bcc', 'bcs', 'beq', 'bit', 'bmi', + 'bne', 'bpl', 'brk', 'bvc', 'bvs', 'clc', 'cld', 'cli', + 'clv', 'cmp', 'cpx', 'cpy', 'dec', 'dex', 'dey', 'eor', + 'inc', 'inx', 'iny', 'jmp', 'jsr', 'lda', 'ldx', 'ldy', + 'lsr', 'nop', 'ora', 'pha', 'php', 'pla', 'plp', 'rol', + 'ror', 'rti', 'rts', 'sbc', 'sec', 'sed', 'sei', 'sta', + 'stx', 'sty', 'tax', 'tay', 'tsx', 'txa', 'txs', 'tya', + ), + /* Index Registers, yes the 6502 has other registers by they are only + * accessable by specific opcodes. The 65816 also has access to the stack pointer S. */ + 2 => array( + 'x', 'y', 's' + ), + /* Directives or "pseudo opcodes" as defined by ACME 0.93 file AllPOs.txt. */ + 3 => array( + '!8', '!08', '!by', '!byte', + '!16', '!wo', '!word', + '!24', '!32', + '!fi', '!fill', + '!align', + '!ct', '!convtab', + '!tx', '!text', + '!pet', + '!raw', + '!scrxor', + '!to', + '!source', + '!bin', '!binary', + '!zn', '!zone', + '!sl', + '!svl', + '!sal', + '!if', '!ifdef', + '!for', + '!set', + '!do', 'while', 'until', + '!eof', '!endoffile', + '!warn', '!error', '!serious', + '!macro', +// , '*=' // Not a valid keyword (uses both * and = signs) moved to symbols instead. + '!initmem', + '!pseudopc', + '!cpu', + '!al', '!as', '!rl', '!rs', + ), + + /* 6502/6510 undocumented opcodes (often referred to as illegal instructions). + * These are present in the 6502/6510 but NOT in the newer CMOS revisions of the 65C02 or 65816. + * As they are undocumented instructions there are no "official" names for them, there are also + * several more that mainly perform various forms of crash and are not supported by ACME 0.93. + */ + 4 => array( + 'anc', 'arr', 'asr', 'dcp', 'dop', 'isc', 'jam', 'lax', + 'rla', 'rra', 'sax', 'sbx', 'slo', 'sre', 'top', + ), + /* 65c02 instructions, MOS added a few (much needed) instructions in the CMOS version of the 6502, but stupidly removed the undocumented/illegal opcodes. + * ACME 0.93 does not support the rmb0-7 and smb0-7 instructions (they are currently rem'ed out). */ + 5 => array( + 'bra', 'phx', 'phy', 'plx', 'ply', 'stz', 'trb', 'tsb' + ), + /* 65816 instructions. */ + 6 => array( + 'brl', 'cop', 'jml', 'jsl', 'mvn', 'mvp', 'pea', 'pei', + 'per', 'phb', 'phd', 'phk', 'plb', 'pld', 'rep', 'rtl', + 'sep', 'tcd', 'tcs', 'tdc', 'tsc', 'txy', 'tyx', 'wdm', + 'xba', 'xce', + ), + /* Deprecated directives or "pseudo opcodes" as defined by ACME 0.93 file AllPOs.txt. */ + 7 => array( + '!cbm', + '!sz', '!subzone', + '!realpc', + ), + /* Math functions, some are aliases for the symbols. */ + 8 => array( + 'not', 'div', 'mod', 'xor', 'or', 'sin', 'cos', 'tan', + 'arcsin', 'arccos', 'arctan', 'int', 'float', + + ), + + ), + 'SYMBOLS' => array( +// '[', ']', '(', ')', '{', '}', // These are already defined by GeSHi as BRACKETS. + '*=', '#', '!', '^', '-', '*', '/', + '%', '+', '-', '<<', '>>', '>>>', + '<', '>', '^', '<=', '<', '>=', '>', '!=', + '=', '&', '|', '<>', + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false, + 7 => false, + 8 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00f; font-weight:bold;', + 2 => 'color: #00f; font-weight:bold;', + 3 => 'color: #080; font-weight:bold;', + 4 => 'color: #f00; font-weight:bold;', + 5 => 'color: #80f; font-weight:bold;', + 6 => 'color: #f08; font-weight:bold;', + 7 => 'color: #a04; font-weight:bold; font-style: italic;', + 8 => 'color: #000;', + ), + 'COMMENTS' => array( + 1 => 'color: #999; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #009; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000;' + ), + 'STRINGS' => array( + 0 => 'color: #080;' + ), + 'NUMBERS' => array( + GESHI_NUMBER_INT_BASIC => 'color: #f00;', + GESHI_NUMBER_HEX_PREFIX_DOLLAR => 'color: #f00;', + GESHI_NUMBER_HEX_PREFIX => 'color: #f00;', + GESHI_NUMBER_BIN_PREFIX_PERCENT => 'color: #f00;', + GESHI_NUMBER_FLT_NONSCI => 'color: #f00;', + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #080;' + ), + 'REGEXPS' => array( + 0 => 'color: #f00;' + , 1 => 'color: #933;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + 8 => '', + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | + GESHI_NUMBER_FLT_NONSCI | + GESHI_NUMBER_HEX_PREFIX_DOLLAR | + GESHI_NUMBER_HEX_PREFIX | + GESHI_NUMBER_BIN_PREFIX_PERCENT, + // AMCE Octal format not support and gets picked up as Decimal unfortunately. + 'REGEXPS' => array( + //ACME .# Binary number format. e.g. %..##..##..## + 0 => '\%[\.\#]{1,64}', + //ACME Local Labels + 1 => '\.[_a-zA-Z][_a-zA-Z0-9]*', + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 8, + 'PARSER_CONTROL' => array( + 'NUMBERS' => array( + 'PRECHECK_RX' => '/[\da-fA-F\.\$\%]/' + ) + ) +); + diff --git a/vendor/easybook/geshi/geshi/6502kickass.php b/vendor/easybook/geshi/geshi/6502kickass.php new file mode 100644 index 0000000000..023a3ff869 --- /dev/null +++ b/vendor/easybook/geshi/geshi/6502kickass.php @@ -0,0 +1,240 @@ + 'MOS 6502 (6510) Kick Assembler format', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /* 6502/6510 Opcodes including undocumented opcodes as Kick Assembler 3.13 does not make a distinction - they are ALL valid. */ + 1 => array( + 'adc', 'ahx', 'alr', 'anc', 'anc2', 'and', 'arr', 'asl', + 'axs', 'bcc', 'bcs', 'beq', 'bit', 'bmi', 'bne', 'bpl', + 'brk', 'bvc', 'bvs', 'clc', 'cld', 'cli', 'clv', 'cmp', + 'cpx', 'cpy', 'dcp', 'dec', 'dex', 'dey', 'eor', 'inc', + 'inx', 'iny', 'isc', 'jmp', 'jsr', 'las', 'lax', 'lda', + 'ldx', 'ldy', 'lsr', 'nop', 'ora', 'pha', 'php', 'pla', + 'plp', 'rla', 'rol', 'ror', 'rra', 'rti', 'rts', 'sax', + 'sbc', 'sbc2', 'sec', 'sed', 'sei', 'shx', 'shy', 'slo', + 'sre', 'sta', 'stx', 'sty', 'tas', 'tax', 'tay', 'tsx', + 'txa', 'txs', 'tya', 'xaa', + ), + /* DTV additional Opcodes. */ + 2 => array( + 'bra', 'sac', 'sir' + ), + /* Index Registers, yes the 6502 has other registers by they are only + * accessable by specific opcodes. */ + 3 => array( + 'x', 'y' + ), + /* Directives. */ + 4 => array( + '.pc', '.pseudopc', 'virtual', '.align', '.byte', '.word', '.text', '.fill', + '.import source', '.import binary', '.import c64', '.import text', '.import', '.print', '.printnow', + '.error', '.var', '.eval', '.const', '.eval const', '.enum', '.label', '.define', '.struct', + 'if', '.for', '.macro', '.function', '.return', '.pseudocommand', '.namespace', '.filenamespace', + '.assert', '.asserterror', + ), + /* Kick Assembler 3.13 Functions/Operators. */ + 5 => array( + 'size', 'charAt', 'substring', 'asNumber', 'asBoolean', 'toIntString', 'toBinaryString', 'toOctalString', + 'toHexString', 'lock', // String functions/operators. + 'get', 'set', 'add', 'remove', 'shuffle', // List functions. + 'put', 'keys', // Hashtable functions. + 'getType', 'getValue', 'CmdArgument', // Pseudo Commands functions. + 'asmCommandSize', // Opcode Constants functions. + 'LoadBinary', 'getSize', + 'LoadSid', 'getData', + 'LoadPicture', 'width', 'height', 'getPixel', 'getSinglecolorByte', 'getMulticolorByte', + 'createFile', 'writeln', + 'cmdLineVars', + 'getX', 'getY', 'getZ', // Vector functions. + 'RotationMatrix', 'ScaleMatrix', 'MoveMatrix', 'PerspectiveMatrix', // Matrix functions. + + ), + + /* Kick Assembler 3.13 Math Functions. */ + 6 => array( + 'abs', 'acos', 'asin', 'atan', 'atan2', 'cbrt', 'ceil', 'cos', 'cosh', + 'exp', 'expm1', 'floor', 'hypot', 'IEEEremainder', 'log', 'log10', + 'log1p', 'max', 'min', 'pow', 'mod', 'random', 'round', 'signum', + 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'toDegrees', 'toRadians', + ), + + /* Kick Assembler 3.13 Objects/Data Types. */ + 7 => array( + 'List', // List() Object. + 'Hashtable', // Hashtable() Object. + 'Vector', // Vector() Object. + 'Matrix', // Matrix() Object. + ), + + /* Kick Assembler 3.13 Constants. */ + 8 => array( + 'PI', 'E', // Math Constants. + 'AT_ABSOLUTE' , 'AT_ABSOLUTEX' , 'AT_ABSOLUTEY' , 'AT_IMMEDIATE', // Pseudo Commands Constants. + 'AT_INDIRECT' , 'AT_IZEROPAGEX' , 'AT_IZEROPAGEY' , 'AT_NONE', + 'BLACK', 'WHITE', 'RED', 'CYAN', 'PURPLE', 'GREEN', 'BLUE', // Colour Constants. + 'YELLOW', 'ORANGE', 'BROWN', 'LIGHT_RED', 'DARK_GRAY', 'GRAY', + 'LIGHT_GREEN', 'LIGHT_BLUE', 'LIGHT_GRAY', + 'C64FILE', // Template Tag names. + 'BF_C64FILE', 'BF_BITMAP_SINGLECOLOR', 'BF_KOALA' , 'BF_FLI', // Binary format constant + ), + + ), + 'SYMBOLS' => array( +// '[', ']', '(', ')', '{', '}', // These are already defined by GeSHi as BRACKETS. + '-', '+', '-', '*', '/', '>', '<', '<<', '>>', '&', '|', '^', '=', '==', + '!=', '>=', '<=', '!', '&&', '||', '#', + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00f; font-weight:bold;', + 2 => 'color: #00f; font-weight:bold;', + 3 => 'color: #00f; font-weight:bold;', + 4 => 'color: #080; font-weight:bold;', + 5 => 'color: #80f; font-weight:bold;', + 6 => 'color: #f08; font-weight:bold;', + 7 => 'color: #a04; font-weight:bold; font-style: italic;', + 8 => 'color: #f08; font-weight:bold;', + ), + 'COMMENTS' => array( + 1 => 'color: #999; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #009; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000;' + ), + 'STRINGS' => array( + 0 => 'color: #080;' + ), + 'NUMBERS' => array( + GESHI_NUMBER_INT_BASIC => 'color: #f00;', + GESHI_NUMBER_HEX_PREFIX_DOLLAR => 'color: #f00;', + GESHI_NUMBER_BIN_PREFIX_PERCENT => 'color: #f00;', + GESHI_NUMBER_FLT_NONSCI => 'color: #f00;', + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #080;' + ), + 'REGEXPS' => array( + 0 => 'color: #933;', + 1 => 'color: #933;', + 2 => 'color: #933;', + 3 => 'color: #00f; font-weight:bold;', + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + 8 => '', + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | + GESHI_NUMBER_FLT_NONSCI | + GESHI_NUMBER_HEX_PREFIX_DOLLAR | + GESHI_NUMBER_BIN_PREFIX_PERCENT, + // AMCE Octal format not support and gets picked up as Decimal unfortunately. + 'REGEXPS' => array( + //Labels end with a collon. + 0 => '[!]{0,1}[_a-zA-Z][_a-zA-Z0-9]*\:', + //Multi Labels (local labels) references start with ! and end with + or - for forward/backward reference. + 1 => '![_a-zA-Z][_a-zA-Z0-9]*[+-]', + //Macros start with a colon :Macro. + 2 => ':[_a-zA-Z][_a-zA-Z0-9]*', + // Opcode Constants, such as LDA_IMM, STA_IZPY are basically all 6502 opcodes + // in UPPER case followed by _underscore_ and the ADDRESS MODE. + // As you might imagine that is rather a lot ( 78 supported Opcodes * 12 Addressing modes = 936 variations) + // So I thought it better and easier to maintain as a regular expression. + // NOTE: The order of the Address Modes must be maintained or it wont work properly (eg. place ZP first and find out!) + 3 => '[A-Z]{3}[2]?_(?:IMM|IND|IZPX|IZPY|ZPX|ZPY|ABSX|ABSY|REL|ABS|ZP)', + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 8, + 'PARSER_CONTROL' => array( + 'NUMBERS' => array( + 'PRECHECK_RX' => '/[\da-fA-F\.\$\%]/' + ), + 'KEYWORDS' => array( + 5 => array ( + 'DISALLOWED_BEFORE' => "(?|^&'\"])" + ), + 6 => array ( + 'DISALLOWED_BEFORE' => "(?|^&'\"])" + ), + 8 => array ( + 'DISALLOWED_BEFORE' => "(?|^&'\"])" + ) + ) + ), +); + diff --git a/vendor/easybook/geshi/geshi/6502tasm.php b/vendor/easybook/geshi/geshi/6502tasm.php new file mode 100644 index 0000000000..1a49aee367 --- /dev/null +++ b/vendor/easybook/geshi/geshi/6502tasm.php @@ -0,0 +1,188 @@ + 'MOS 6502 (6510) TASM/64TASS 1.46 Assembler format', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /* 6502/6510 Opcodes. */ + 1 => array( + 'adc', 'and', 'asl', 'bcc', 'bcs', 'beq', 'bit', 'bmi', + 'bne', 'bpl', 'brk', 'bvc', 'bvs', 'clc', 'cld', 'cli', + 'clv', 'cmp', 'cpx', 'cpy', 'dec', 'dex', 'dey', 'eor', + 'inc', 'inx', 'iny', 'jmp', 'jsr', 'lda', 'ldx', 'ldy', + 'lsr', 'nop', 'ora', 'pha', 'php', 'pla', 'plp', 'rol', + 'ror', 'rti', 'rts', 'sbc', 'sec', 'sed', 'sei', 'sta', + 'stx', 'sty', 'tax', 'tay', 'tsx', 'txa', 'txs', 'tya', + ), + /* Index Registers, yes the 6502 has other registers by they are only + * accessable by specific opcodes. The 65816 also has access to the stack pointer S. */ + 2 => array( + 'x', 'y', 's' + ), + /* Directives. */ + 3 => array( + '.al', '.align', '.as', '.assert', '.binary', '.byte', '.cerror', '.char', + '.comment', '.cpu', '.cwarn', '.databank', '.dpage', '.else', '.elsif', + '.enc', '.endc', '.endif', '.endm', '.endp', '.error', '.fi', '.fill', + '.for', '.here', '.if', '.ifeq', '.ifmi', '.ifne', '.ifpl', + '.include', '.int', '.logical', '.long', '.macro', '.next', '.null', '.offs', + '.page', '.pend', '.proc', '.rept', '.rta', '.shift', '.text', '.warn', '.word', + '.xl', '.xs', +// , '*=' // Not a valid keyword (uses both * and = signs) moved to symbols instead. + ), + + /* 6502/6510 undocumented opcodes (often referred to as illegal instructions). + * These are present in the 6502/6510 but NOT in the newer CMOS revisions of the 65C02 or 65816. + * As they are undocumented instructions there are no "official" names for them, these are the names + * used by 64TASS V1.46. + */ + 4 => array( + 'ahx', 'alr', 'anc', 'ane', 'arr', 'asr', 'axs', 'dcm', + 'dcp', 'ins', 'isb', 'isc', 'jam', 'lae', 'las', 'lax', + 'lds', 'lxa', 'rla', 'rra', 'sax', 'sbx', 'sha', 'shs', + 'shx', 'shy', 'slo', 'sre', 'tas', 'xaa', + ), + /* 65c02 instructions, MOS added a few (much needed) instructions in the + * CMOS version of the 6502, but stupidly removed the undocumented/illegal opcodes. */ + 5 => array( + 'bra', 'dea', 'gra', 'ina', 'phx', 'phy', 'plx', 'ply', + 'stz', 'trb', 'tsb', + ), + /* 65816 instructions. */ + 6 => array( + 'brl', 'cop', 'jml', 'jsl', 'mvn', 'mvp', 'pea', 'pei', + 'per', 'phb', 'phd', 'phk', 'plb', 'pld', 'rep', 'rtl', + 'sep', 'stp', 'swa', 'tad', 'tcd', 'tcs', 'tda', + 'tdc', 'tsa', 'tsc', 'txy', 'tyx', 'wai', 'xba', 'xce', + ), + /* Deprecated directives (or yet to be implemented). */ + 7 => array( + '.global', '.check' + ), + ), + 'SYMBOLS' => array( +// '[', ']', '(', ')', '{', '}', // These are already defined by GeSHi as BRACKETS. + '*=', '#', '<', '>', '`', '=', '<', '>', + '!=', '>=', '<=', '+', '-', '*', '/', '//', '|', + '^', '&', '<<', '>>', '-', '~', '!', + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false, + 7 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00f; font-weight:bold;', + 2 => 'color: #00f; font-weight:bold;', + 3 => 'color: #080; font-weight:bold;', + 4 => 'color: #f00; font-weight:bold;', + 5 => 'color: #80f; font-weight:bold;', + 6 => 'color: #f08; font-weight:bold;', + 7 => 'color: #a04; font-weight:bold; font-style: italic;', + ), + 'COMMENTS' => array( + 1 => 'color: #999; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #009; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000;' + ), + 'STRINGS' => array( + 0 => 'color: #080;' + ), + 'NUMBERS' => array( + GESHI_NUMBER_INT_BASIC => 'color: #f00;', + GESHI_NUMBER_HEX_PREFIX_DOLLAR => 'color: #f00;', + GESHI_NUMBER_BIN_PREFIX_PERCENT => 'color: #f00;', + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #080;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | + GESHI_NUMBER_HEX_PREFIX_DOLLAR | + GESHI_NUMBER_BIN_PREFIX_PERCENT, + // AMCE Octal format not support and gets picked up as Decimal unfortunately. + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 8, + 'PARSER_CONTROL' => array( + 'NUMBERS' => array( + 'PRECHECK_RX' => '/[\da-fA-F\.\$\%]/' + ) + ) +); + diff --git a/vendor/easybook/geshi/geshi/68000devpac.php b/vendor/easybook/geshi/geshi/68000devpac.php new file mode 100644 index 0000000000..a8ac8d9e69 --- /dev/null +++ b/vendor/easybook/geshi/geshi/68000devpac.php @@ -0,0 +1,167 @@ + 'Motorola 68000 - HiSoft Devpac ST 2 Assembler format', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /* Directives. */ + 1 => array( + 'end', 'include', 'incbin', 'opt', 'even', 'cnop', 'dc.b', 'dc.w', + 'dc.l', 'ds.b', 'ds.w', 'ds.l', 'dcb.b', 'dcb.w', 'dcb.l', + 'fail', 'output', '__g2', 'rept', 'endr', 'list', 'nolist', 'plen', + 'llen', 'ttl', 'subttl', 'spc', 'page', 'listchar', 'format', + 'equ', 'equr', 'set', 'reg', 'rs.b', 'rs.w', 'rs.l', 'rsreset', + 'rsset', '__rs', 'ifeq', 'ifne', 'ifgt', 'ifge', 'iflt', 'ifle', 'endc', + 'ifd', 'ifnd', 'ifc', 'ifnc', 'elseif', 'iif', 'macro', 'endm', 'mexit', + 'narg', '\@', 'section', 'text', 'data', 'bss', 'xdef', 'xref', 'org', + 'offset', '__lk', 'comment', + ), + /* 68000 Opcodes. */ + 2 => array( + 'abcd', 'add', 'adda', 'addi', 'addq', 'addx', 'and', 'andi', + 'asl', 'asr', 'bcc', 'bchg', 'bclr', 'bcs', 'beq', 'bge', + 'bgt', 'bhi', 'ble', 'bls', 'blt', 'bmi', 'bne', 'bpl', + 'bra', 'bset', 'bsr', 'btst', 'bvc', 'bvs', 'chk', 'clr', + 'cmp', 'cmpa', 'cmpi', 'cmpm', 'dbcc', 'dbcs', 'dbeq', 'dbf', + 'dbge', 'dbgt', 'dbhi', 'dble', 'dbls', 'dblt', 'dbmi', 'dbne', + 'dbpl', 'dbra', 'dbt', 'dbvc', 'dbvs', 'divs', 'divu', 'eor', + 'eori', 'exg', 'ext','illegal','jmp', 'jsr', 'lea', 'link', + 'lsl', 'lsr', 'move','movea','movem','movep','moveq', 'muls', + 'mulu', 'nbcd', 'neg', 'negx', 'nop', 'not', 'or', 'ori', + 'pea', 'reset', 'rol', 'ror', 'roxl', 'roxr', 'rte', 'rtr', + 'rts', 'sbcd', 'scc', 'scs', 'seq', 'sf', 'sge', 'sgt', + 'shi', 'sle', 'sls', 'slt', 'smi', 'sne', 'spl', 'st', + 'stop', 'sub', 'suba', 'subi', 'subq', 'subx', 'svc', 'svs', + 'swap', 'tas', 'trap','trapv', 'tst', 'unlk', + ), + /* oprand sizes. */ + 3 => array( + 'b', 'w', 'l' , 's' + ), + /* 68000 Registers. */ + 4 => array( + 'd0', 'd1', 'd2', 'd3', 'd4', 'd5', 'd6', 'd7', + 'a0', 'a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7', 'sp', 'usp', 'ssp', + 'pc', 'ccr', 'sr', + ), + ), + 'SYMBOLS' => array( +// '[', ']', '(', ')', '{', '}', // These are already defined by GeSHi as BRACKETS. + '+', '-', '~', '<<', '>>', '&', + '!', '^', '*', '/', '=', '<', '>', + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #f08; font-weight:bold;', + 2 => 'color: #00f; font-weight:bold;', + 3 => 'color: #00f; font-weight:bold;', + 4 => 'color: #080; font-weight:bold;', + ), + 'COMMENTS' => array( + 1 => 'color: #999; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #009; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000;' + ), + 'STRINGS' => array( + 0 => 'color: #080;' + ), + 'NUMBERS' => array( + GESHI_NUMBER_INT_BASIC => 'color: #f00;', + GESHI_NUMBER_HEX_PREFIX_DOLLAR => 'color: #f00;', + GESHI_NUMBER_BIN_PREFIX_PERCENT => 'color: #f00;', + GESHI_NUMBER_OCT_PREFIX_AT => 'color: #f00;', + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #080;' + ), + 'REGEXPS' => array( + 0 => 'color: #933;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | + GESHI_NUMBER_HEX_PREFIX_DOLLAR | + GESHI_NUMBER_OCT_PREFIX_AT | + GESHI_NUMBER_BIN_PREFIX_PERCENT, + 'REGEXPS' => array( + //Labels may end in a colon. + 0 => '(?<=\A\x20|\r|\n|^)[\._a-zA-Z][\._a-zA-Z0-9]*[\:]?[\s]' + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 8, + 'PARSER_CONTROL' => array( + 'NUMBERS' => array( + 'PRECHECK_RX' => '/[\da-fA-F\.\$\%\@]/' + ) + ) +); + diff --git a/vendor/easybook/geshi/geshi/abap.php b/vendor/easybook/geshi/geshi/abap.php new file mode 100644 index 0000000000..14677a2307 --- /dev/null +++ b/vendor/easybook/geshi/geshi/abap.php @@ -0,0 +1,1408 @@ +.htm + * + * CHANGES + * ------- + * 2009/02/25 (1.0.8.3) + * - Some more rework of the language file + * 2009/01/04 (1.0.8.2) + * - Major Release, more than 1000 statements and keywords added = whole abap 7.1 (Sandra Rossi) + * 2007/06/27 (1.0.0) + * - First Release + * + * TODO + * ---- + * - in DATA data TYPE type, 2nd "data" and 2nd "type" are highlighted with data + * style, but should be ignored. Same problem for all words!!! This is quite impossible to + * solve it as we should define syntaxes of all statements (huge effort!) and use a lex + * or something like that instead of regexp I guess. + * - Some words are considered as being statement names (report, tables, etc.) though they + * are used as keyword in some statements. For example: FORM xxxx TABLES itab. It was + * arbitrary decided to define them as statement instead of keyword, because it may be + * useful to have the URL to SAP help for some of them. + * - if a comment is between 2 words of a keyword (for example SEPARATED "comment \n BY), + * it is not considered as a keyword, but it should! + * - for statements like "READ DATASET", GeSHi does not allow to set URLs because these + * statements are determined by REGEXPS. For "READ DATASET", the URL should be + * ABAPREAD_DATASET.htm. If a technical solution is found, be careful : URLs + * are sometimes not valid because the URL does not exist. For example, for "AT NEW" + * statement, the URL should be ABAPAT_ITAB.htm (not ABAPAT_NEW.htm). + * There are many other exceptions. + * Note: for adding this functionality within your php program, you can execute this code: + * function add_urls_to_multi_tokens( $matches ) { + * $url = preg_replace( "/[ \n]+/" , "_" , $matches[3] ); + * if( $url == $matches[3] ) return $matches[0] ; + * else return $matches[1]."".$matches[3]."".$matches[4]; + * } + * $html = $geshi->parse_code(); + * $html = preg_replace_callback( "£(zzz:(control|statement|data);\">)(.+?)()£s", "add_urls_to_multi_tokens", $html ); + * echo $html; + * - Numbers followed by a dot terminating the statement are not properly recognized + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array( + 'LANG_NAME' => 'ABAP', + 'COMMENT_SINGLE' => array( + 1 => '"' + ), + 'COMMENT_MULTI' => array(), + 'COMMENT_REGEXP' => array( + // lines beginning with star at 1st position are comments + // (star anywhere else is not a comment, especially be careful with + // "assign dref->* to " statement) + 2 => '/^\*.*?$/m' + ), + 'CASE_KEYWORDS' => 0, + 'QUOTEMARKS' => array( + 1 => "'", + 2 => "`" + ), + 'ESCAPE_CHAR' => '', + + 'KEYWORDS' => array( + //*********************************************** + // Section 2 : process sequences of several tokens + //*********************************************** + + 7 => array( + 'at new', + 'at end of', + 'at first', + 'at last', + 'loop at', + 'loop at screen', + ), + + 8 => array( + 'private section', + 'protected section', + 'public section', + 'at line-selection', + 'at selection-screen', + 'at user-command', + 'assign component', + 'assign table field', + 'call badi', + 'call customer-function', + 'call customer subscreen', + 'call dialog', + 'call function', + 'call method', + 'call screen', + 'call selection-screen', + 'call transaction', + 'call transformation', + 'close cursor', + 'close dataset', + 'commit work', + 'convert date', + 'convert text', + 'convert time stamp', + 'create data', + 'create object', + 'delete dataset', + 'delete from', + 'describe distance', + 'describe field', + 'describe list', + 'describe table', + 'exec sql', + 'exit from sql', + 'exit from step-loop', + 'export dynpro', + 'export nametab', + 'free memory', + 'generate subroutine-pool', + 'get badi', + 'get bit', + 'get cursor', + 'get dataset', + 'get locale', + 'get parameter', + 'get pf-status', + 'get property', + 'get reference', + 'get run time', + 'get time', + 'get time stamp', + 'import directory', + 'insert report', + 'insert text-pool', + 'leave list-processing', + 'leave program', + 'leave screen', + 'leave to list-processing', + 'leave to transaction', + 'modify line', + 'modify screen', + 'move percentage', + 'open cursor', + 'open dataset', + 'raise event', + 'raise exception', + 'read dataset', + 'read line', + 'read report', + 'read table', + 'read textpool', + 'receive results from function', + 'refresh control', + 'rollback work', + 'set bit', + 'set blank lines', + 'set country', + 'set cursor', + 'set dataset', + 'set extended check', + 'set handler', + 'set hold data', + 'set language', + 'set left scroll-boundary', + 'set locale', + 'set margin', + 'set parameter', + 'set pf-status', + 'set property', + 'set run time analyzer', + 'set run time clock', + 'set screen', + 'set titlebar', + 'set update task', + 'set user-command', + 'suppress dialog', + 'truncate dataset', + 'wait until', + 'wait up to', + ), + + 9 => array( + 'accepting duplicate keys', + 'accepting padding', + 'accepting truncation', + 'according to', + 'actual length', + 'adjacent duplicates', + 'after input', + 'all blob columns', + 'all clob columns', + 'all fields', + 'all methods', + 'all other columns', + 'and mark', + 'and return to screen', + 'and return', + 'and skip first screen', + 'and wait', + 'any table', + 'appendage type', + 'archive mode', + 'archiving parameters', + 'area handle', + 'as checkbox', + 'as icon', + 'as line', + 'as listbox', + 'as person table', + 'as search patterns', + 'as separate unit', + 'as subscreen', + 'as symbol', + 'as text', + 'as window', + 'at cursor-selection', + 'at exit-command', + 'at next application statement', + 'at position', + + 'backup into', + 'before output', + 'before unwind', + 'begin of block', + 'begin of common part', + 'begin of line', + 'begin of screen', + 'begin of tabbed block', + 'begin of version', + 'begin of', + 'big endian', + 'binary mode', + 'binary search', + 'by kernel module', + 'bypassing buffer', + + 'client specified', + 'code page', + 'code page hint', + 'code page into', + 'color black', + 'color blue', + 'color green', + 'color pink', + 'color red', + 'color yellow', + 'compression off', + 'compression on', + 'connect to', + 'corresponding fields of table', + 'corresponding fields of', + 'cover page', + 'cover text', + 'create package', + 'create private', + 'create protected', + 'create public', + 'current position', + + 'data buffer', + 'data values', + 'dataset expiration', + 'daylight saving time', + 'default key', + 'default program', + 'default screen', + 'defining database', + 'deleting leading', + 'deleting trailing', + 'directory entry', + 'display like', + 'display offset', + 'during line-selection', + 'dynamic selections', + + 'edit mask', + 'end of block', + 'end of common part', + 'end of file', + 'end of line', + 'end of screen', + 'end of tabbed block', + 'end of version', + 'end of', + 'endian into', + 'ending at', + 'enhancement options into', + 'enhancement into', + 'environment time format', + 'execute procedure', + 'exporting list to memory', + 'extension type', + + 'field format', + 'field selection', + 'field value into', + 'final methods', + 'first occurrence of', + 'fixed-point arithmetic', + 'for all entries', + 'for all instances', + 'for appending', + 'for columns', + 'for event of', + 'for field', + 'for high', + 'for input', + 'for lines', + 'for low', + 'for node', + 'for output', + 'for select', + 'for table', + 'for testing', + 'for update', + 'for user', + 'frame entry', + 'frame program from', + 'from code page', + 'from context', + 'from database', + 'from logfile id', + 'from number format', + 'from screen', + 'from table', + 'function key', + + 'get connection', + 'global friends', + 'group by', + + 'hashed table of', + 'hashed table', + + 'if found', + 'ignoring case', + 'ignoring conversion errors', + 'ignoring structure boundaries', + 'implementations from', + 'in background', + 'in background task', + 'in background unit', + 'in binary mode', + 'in byte mode', + 'in char-to-hex mode', + 'in character mode', + 'in group', + 'in legacy binary mode', + 'in legacy text mode', + 'in program', + 'in remote task', + 'in text mode', + 'in table', + 'in update task', + 'include bound', + 'include into', + 'include program from', + 'include structure', + 'include type', + 'including gaps', + 'index table', + 'inheriting from', + 'init destination', + 'initial line of', + 'initial line', + 'initial size', + 'internal table', + 'into sortable code', + + 'keep in spool', + 'keeping directory entry', + 'keeping logical unit of work', + 'keeping task', + 'keywords from', + + 'left margin', + 'left outer', + 'levels into', + 'line format', + 'line into', + 'line of', + 'line page', + 'line value from', + 'line value into', + 'lines of', + 'list authority', + 'list dataset', + 'list name', + 'little endian', + 'lob handle for', + 'local friends', + 'locator for', + 'lower case', + + 'main table field', + 'match count', + 'match length', + 'match line', + 'match offset', + 'matchcode object', + 'maximum length', + 'maximum width into', + 'memory id', + 'message into', + 'messages into', + 'modif id', + + 'nesting level', + 'new list identification', + 'next cursor', + 'no database selection', + 'no dialog', + 'no end of line', + 'no fields', + 'no flush', + 'no intervals', + 'no intervals off', + 'no standard page heading', + 'no-extension off', + 'non-unique key', + 'non-unique sorted key', + 'not at end of mode', + 'number of lines', + 'number of pages', + + 'object key', + 'obligatory off', + 'of current page', + 'of page', + 'of program', + 'offset into', + 'on block', + 'on commit', + 'on end of task', + 'on end of', + 'on exit-command', + 'on help-request for', + 'on radiobutton group', + 'on rollback', + 'on value-request for', + 'open for package', + 'option class-coding', + 'option class', + 'option coding', + 'option expand', + 'option syncpoints', + 'options from', + 'order by', + 'overflow into', + + 'package section', + 'package size', + 'preferred parameter', + 'preserving identifier escaping', + 'primary key', + 'print off', + 'print on', + 'program from', + 'program type', + + 'radiobutton groups', + 'radiobutton group', + 'range of', + 'reader for', + 'receive buffer', + 'reduced functionality', + 'ref to data', + 'ref to object', + 'ref to', + + 'reference into', + 'renaming with suffix', + 'replacement character', + 'replacement count', + 'replacement length', + 'replacement line', + 'replacement offset', + 'respecting blanks', + 'respecting case', + 'result into', + 'risk level', + + 'sap cover page', + 'search fkeq', + 'search fkge', + 'search gkeq', + 'search gkge', + 'section of', + 'send buffer', + 'separated by', + 'shared buffer', + 'shared memory', + 'shared memory enabled', + 'skipping byte-order mark', + 'sorted by', + 'sorted table of', + 'sorted table', + 'spool parameters', + 'standard table of', + 'standard table', + 'starting at', + 'starting new task', + 'statements into', + 'structure default', + 'structures into', + + 'table field', + 'table of', + 'text mode', + 'time stamp', + 'time zone', + 'to code page', + 'to column', + 'to context', + 'to first page', + 'to last page', + 'to last line', + 'to line', + 'to lower case', + 'to number format', + 'to page', + 'to sap spool', + 'to upper case', + 'tokens into', + 'transporting no fields', + 'type tableview', + 'type tabstrip', + + 'unicode enabling', + 'up to', + 'upper case', + 'using edit mask', + 'using key', + 'using no edit mask', + 'using screen', + 'using selection-screen', + 'using selection-set', + 'using selection-sets of program', + + 'valid between', + 'valid from', + 'value check', + 'via job', + 'via selection-screen', + 'visible length', + + 'whenever found', + 'with analysis', + 'with byte-order mark', + 'with comments', + 'with current switchstates', + 'with explicit enhancements', + 'with frame', + 'with free selections', + 'with further secondary keys', + 'with header line', + 'with hold', + 'with implicit enhancements', + 'with inactive enhancements', + 'with includes', + 'with key', + 'with linefeed', + 'with list tokenization', + 'with native linefeed', + 'with non-unique key', + 'with null', + 'with pragmas', + 'with precompiled headers', + 'with selection-table', + 'with smart linefeed', + 'with table key', + 'with test code', + 'with type-pools', + 'with unique key', + 'with unix linefeed', + 'with windows linefeed', + 'without further secondary keys', + 'without selection-screen', + 'without spool dynpro', + 'without trmac', + 'word into', + 'writer for' + ), + + //********************************************************** + // Other abap statements + //********************************************************** + 3 => array( + 'add', + 'add-corresponding', + 'aliases', + 'append', + 'assign', + 'at', + 'authority-check', + + 'break-point', + + 'clear', + 'collect', + 'compute', + 'concatenate', + 'condense', + 'class', + 'class-events', + 'class-methods', + 'class-pool', + + 'define', + 'delete', + 'demand', + 'detail', + 'divide', + 'divide-corresponding', + + 'editor-call', + 'end-of-file', + 'end-enhancement-section', + 'end-of-definition', + 'end-of-page', + 'end-of-selection', + 'endclass', + 'endenhancement', + 'endexec', + 'endform', + 'endfunction', + 'endinterface', + 'endmethod', + 'endmodule', + 'endon', + 'endprovide', + 'endselect', + 'enhancement', + 'enhancement-point', + 'enhancement-section', + 'export', + 'extract', + 'events', + + 'fetch', + 'field-groups', + 'find', + 'format', + 'form', + 'free', + 'function-pool', + 'function', + + 'get', + + 'hide', + + 'import', + 'infotypes', + 'input', + 'insert', + 'include', + 'initialization', + 'interface', + 'interface-pool', + 'interfaces', + + 'leave', + 'load-of-program', + 'log-point', + + 'maximum', + 'message', + 'methods', + 'method', + 'minimum', + 'modify', + 'move', + 'move-corresponding', + 'multiply', + 'multiply-corresponding', + + 'new-line', + 'new-page', + 'new-section', + + 'overlay', + + 'pack', + 'perform', + 'position', + 'print-control', + 'program', + 'provide', + 'put', + + 'raise', + 'refresh', + 'reject', + 'replace', + 'report', + 'reserve', + + 'scroll', + 'search', + 'select', + 'selection-screen', + 'shift', + 'skip', + 'sort', + 'split', + 'start-of-selection', + 'submit', + 'subtract', + 'subtract-corresponding', + 'sum', + 'summary', + 'summing', + 'supply', + 'syntax-check', + + 'top-of-page', + 'transfer', + 'translate', + 'type-pool', + + 'uline', + 'unpack', + 'update', + + 'window', + 'write' + + ), + + //********************************************************** + // keywords + //********************************************************** + + 4 => array( + 'abbreviated', + 'abstract', + 'accept', + 'acos', + 'activation', + 'alias', + 'align', + 'all', + 'allocate', + 'and', + 'assigned', + 'any', + 'appending', + 'area', + 'as', + 'ascending', + 'asin', + 'assigning', + 'atan', + 'attributes', + 'avg', + + 'backward', + 'between', + 'bit-and', + 'bit-not', + 'bit-or', + 'bit-set', + 'bit-xor', + 'boolc', + 'boolx', + 'bound', + 'bt', + 'blocks', + 'bounds', + 'boxed', + 'by', + 'byte-ca', + 'byte-cn', + 'byte-co', + 'byte-cs', + 'byte-na', + 'byte-ns', + + 'ca', + 'calling', + 'casting', + 'ceil', + 'center', + 'centered', + 'changing', + 'char_off', + 'charlen', + 'circular', + 'class_constructor', + 'client', + 'clike', + 'close', + 'cmax', + 'cmin', + 'cn', + 'cnt', + 'co', + 'col_background', + 'col_group', + 'col_heading', + 'col_key', + 'col_negative', + 'col_normal', + 'col_positive', + 'col_total', + 'color', + 'column', + 'comment', + 'comparing', + 'components', + 'condition', + 'context', + 'copies', + 'count', + 'country', + 'cpi', + 'creating', + 'critical', + 'concat_lines_of', + 'cos', + 'cosh', + 'count_any_not_of', + 'count_any_of', + 'cp', + 'cs', + 'csequence', + 'currency', + 'current', + 'cx_static_check', + 'cx_root', + 'cx_dynamic_check', + + 'dangerous', + 'database', + 'datainfo', + 'date', + 'dbmaxlen', + 'dd/mm/yy', + 'dd/mm/yyyy', + 'ddmmyy', + 'deallocate', + 'decfloat', + 'decfloat16', + 'decfloat34', + 'decimals', + 'default', + 'deferred', + 'definition', + 'department', + 'descending', + 'destination', + 'disconnect', + 'display-mode', + 'distance', + 'distinct', + 'div', + 'dummy', + + 'encoding', + 'end-lines', + 'engineering', + 'environment', + 'eq', + 'equiv', + 'error_message', + 'errormessage', + 'escape', + 'exact', + 'exception-table', + 'exceptions', + 'exclude', + 'excluding', + 'exists', + 'exp', + 'exponent', + 'exporting', + 'extended_monetary', + + 'field', + 'filter-table', + 'filters', + 'filter', + 'final', + 'find_any_not_of', + 'find_any_of', + 'find_end', + 'floor', + 'first-line', + 'font', + 'forward', + 'for', + 'frac', + 'from_mixed', + 'friends', + 'from', + + 'giving', + 'ge', + 'gt', + + 'handle', + 'harmless', + 'having', + 'head-lines', + 'help-id', + 'help-request', + 'high', + 'hold', + 'hotspot', + + 'id', + 'ids', + 'immediately', + 'implementation', + 'importing', + 'in', + 'initial', + 'incl', + 'including', + 'increment', + 'index', + 'index-line', + 'inner', + 'inout', + 'intensified', + 'into', + 'inverse', + 'is', + 'iso', + + 'join', + + 'key', + 'kind', + + 'log10', + 'language', + 'late', + 'layout', + 'le', + 'lt', + 'left-justified', + 'leftplus', + 'leftspace', + 'left', + 'length', + 'level', + 'like', + 'line-count', + 'line-size', + 'lines', + 'line', + 'load', + 'long', + 'lower', + 'low', + 'lpi', + + 'matches', + 'match', + 'mail', + 'major-id', + 'max', + 'medium', + 'memory', + 'message-id', + 'module', + 'minor-id', + 'min', + 'mm/dd/yyyy', + 'mm/dd/yy', + 'mmddyy', + 'mode', + 'modifier', + 'mod', + 'monetary', + + 'name', + 'nb', + 'ne', + 'next', + 'no-display', + 'no-extension', + 'no-gap', + 'no-gaps', + 'no-grouping', + 'no-heading', + 'no-scrolling', + 'no-sign', + 'no-title', + 'no-topofpage', + 'no-zero', + 'nodes', + 'non-unicode', + 'no', + 'number', + 'nmax', + 'nmin', + 'not', + 'null', + 'numeric', + 'numofchar', + + 'o', + 'objects', + 'obligatory', + 'occurs', + 'offset', + 'off', + 'of', + 'only', + 'open', + 'option', + 'optional', + 'options', + 'output-length', + 'output', + 'out', + 'on change of', + 'or', + 'others', + + 'pad', + 'page', + 'pages', + 'parameter-table', + 'part', + 'performing', + 'pos_high', + 'pos_low', + 'priority', + 'public', + 'pushbutton', + + 'queue-only', + 'quickinfo', + + 'raising', + 'range', + 'read-only', + 'received', + 'receiver', + 'receiving', + 'redefinition', + 'reference', + 'regex', + 'replacing', + 'reset', + 'responsible', + 'result', + 'results', + 'resumable', + 'returncode', + 'returning', + 'right', + 'right-specified', + 'rightplus', + 'rightspace', + 'round', + 'rows', + 'repeat', + 'requested', + 'rescale', + 'reverse', + + 'scale_preserving', + 'scale_preserving_scientific', + 'scientific', + 'scientific_with_leading_zero', + 'screen', + 'scrolling', + 'seconds', + 'segment', + 'shift_left', + 'shift_right', + 'sign', + 'simple', + 'sin', + 'sinh', + 'short', + 'shortdump-id', + 'sign_as_postfix', + 'single', + 'size', + 'some', + 'source', + 'space', + 'spots', + 'stable', + 'state', + 'static', + 'statusinfo', + 'sqrt', + 'string', + 'strlen', + 'structure', + 'style', + 'subkey', + 'submatches', + 'substring', + 'substring_after', + 'substring_before', + 'substring_from', + 'substring_to', + 'super', + 'supplied', + 'switch', + + 'tan', + 'tanh', + 'table_line', + 'table', + 'tab', + 'then', + 'timestamp', + 'times', + 'time', + 'timezone', + 'title-lines', + 'title', + 'top-lines', + 'to', + 'to_lower', + 'to_mixed', + 'to_upper', + 'trace-file', + 'trace-table', + 'transporting', + 'trunc', + 'type', + + 'under', + 'unique', + 'unit', + 'user-command', + 'using', + 'utf-8', + + 'valid', + 'value', + 'value-request', + 'values', + 'vary', + 'varying', + 'version', + + 'warning', + 'where', + 'width', + 'with', + 'word', + 'with-heading', + 'with-title', + + 'xsequence', + 'xstring', + 'xstrlen', + + 'yes', + 'yymmdd', + + 'z', + 'zero' + + ), + + //********************************************************** + // screen statements + //********************************************************** + + 5 => array( + 'call subscreen', + 'chain', + 'endchain', + 'on chain-input', + 'on chain-request', + 'on help-request', + 'on input', + 'on request', + 'on value-request', + 'process' + ), + + //********************************************************** + // internal statements + //********************************************************** + + 6 => array( + 'generate dynpro', + 'generate report', + 'import dynpro', + 'import nametab', + 'include methods', + 'load report', + 'scan abap-source', + 'scan and check abap-source', + 'syntax-check for dynpro', + 'syntax-check for program', + 'syntax-trace', + 'system-call', + 'system-exit', + 'verification-message' + ), + + //********************************************************** + // Control statements + //********************************************************** + + 1 => array( + 'assert', + 'case', + 'catch', + 'check', + 'cleanup', + 'continue', + 'do', + 'else', + 'elseif', + 'endat', + 'endcase', + 'endcatch', + 'endif', + 'enddo', + 'endloop', + 'endtry', + 'endwhile', + 'exit', + 'if', + 'loop', + 'resume', + 'retry', + 'return', + 'stop', + 'try', + 'when', + 'while' + + ), + + //********************************************************** + // variable declaration statements + //********************************************************** + + 2 => array( + 'class-data', + 'controls', + 'constants', + 'data', + 'field-symbols', + 'fields', + 'local', + 'parameters', + 'ranges', + 'select-options', + 'statics', + 'tables', + 'type-pools', + 'types' + ) + ), + 'SYMBOLS' => array( + 0 => array( + '->*', '->', '=>', + '(', ')', '{', '}', '[', ']', '+', '-', '*', '/', '!', '%', '^', '&', ':', ',', '.' + ), + 1 => array( + '>=', '<=', '<', '>', '=' + ), + 2 => array( + '?=' + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false, + 7 => false, + 8 => false, + 9 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000066; text-transform: uppercase; font-weight: bold; zzz:control;', //control statements + 2 => 'color: #cc4050; text-transform: uppercase; font-weight: bold; zzz:data;', //data statements + 3 => 'color: #005066; text-transform: uppercase; font-weight: bold; zzz:statement;', //first token of other statements + 4 => 'color: #500066; text-transform: uppercase; font-weight: bold; zzz:keyword;', // next tokens of other statements ("keywords") + 5 => 'color: #005066; text-transform: uppercase; font-weight: bold; zzz:statement;', + 6 => 'color: #000066; text-transform: uppercase; font-weight: bold; zzz:control;', + 7 => 'color: #000066; text-transform: uppercase; font-weight: bold; zzz:control;', + 8 => 'color: #005066; text-transform: uppercase; font-weight: bold; zzz:statement;', + 9 => 'color: #500066; text-transform: uppercase; font-weight: bold; zzz:keyword;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #339933;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #808080;' + ), + 'STRINGS' => array( + 0 => 'color: #4da619;' + ), + 'NUMBERS' => array( + 0 => 'color: #3399ff;' + ), + 'METHODS' => array( + 1 => 'color: #202020;', + 2 => 'color: #202020;' + ), + 'SYMBOLS' => array( + 0 => 'color: #808080;', + 1 => 'color: #800080;', + 2 => 'color: #0000ff;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => 'http://help.sap.com/abapdocu/en/ABAP{FNAMEU}.htm', + 2 => 'http://help.sap.com/abapdocu/en/ABAP{FNAMEU}.htm', + 3 => 'http://help.sap.com/abapdocu/en/ABAP{FNAMEU}.htm', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + 8 => '', + 9 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '->', + 2 => '=>' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 7 => array( + 'SPACE_AS_WHITESPACE' => true + ), + 8 => array( + 'SPACE_AS_WHITESPACE' => true + ), + 9 => array( + 'SPACE_AS_WHITESPACE' => true + ) + ) + ), + 'TAB_WIDTH' => 4 +); + diff --git a/vendor/easybook/geshi/geshi/actionscript.php b/vendor/easybook/geshi/geshi/actionscript.php new file mode 100644 index 0000000000..f64fc64011 --- /dev/null +++ b/vendor/easybook/geshi/geshi/actionscript.php @@ -0,0 +1,196 @@ + 'ActionScript', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + '#include', 'for', 'foreach', 'each', 'if', 'elseif', 'else', 'while', 'do', 'dowhile', + 'endwhile', 'endif', 'switch', 'case', 'endswitch', 'return', 'break', 'continue', 'in' + ), + 2 => array( + 'null', 'false', 'true', 'var', + 'default', 'function', 'class', + 'new', '_global' + ), + 3 => array( + '#endinitclip', '#initclip', '__proto__', '_accProps', '_alpha', '_currentframe', + '_droptarget', '_focusrect', '_framesloaded', '_height', '_highquality', '_lockroot', + '_name', '_parent', '_quality', '_root', '_rotation', '_soundbuftime', '_target', '_totalframes', + '_url', '_visible', '_width', '_x', '_xmouse', '_xscale', '_y', '_ymouse', '_yscale', 'abs', + 'Accessibility', 'acos', 'activityLevel', 'add', 'addListener', 'addPage', 'addProperty', + 'addRequestHeader', 'align', 'allowDomain', 'allowInsecureDomain', 'and', 'appendChild', + 'apply', 'Arguments', 'Array', 'asfunction', 'asin', 'atan', 'atan2', 'attachAudio', 'attachMovie', + 'attachSound', 'attachVideo', 'attributes', 'autosize', 'avHardwareDisable', 'background', + 'backgroundColor', 'BACKSPACE', 'bandwidth', 'beginFill', 'beginGradientFill', 'blockIndent', + 'bold', 'Boolean', 'border', 'borderColor', 'bottomScroll', 'bufferLength', 'bufferTime', + 'builtInItems', 'bullet', 'Button', 'bytesLoaded', 'bytesTotal', 'call', 'callee', 'caller', + 'Camera', 'capabilities', 'CAPSLOCK', 'caption', 'catch', 'ceil', 'charAt', 'charCodeAt', + 'childNodes', 'chr', 'clear', 'clearInterval', 'cloneNode', 'close', 'Color', 'concat', + 'connect', 'condenseWhite', 'constructor', 'contentType', 'ContextMenu', 'ContextMenuItem', + 'CONTROL', 'copy', 'cos', 'createElement', 'createEmptyMovieClip', 'createTextField', + 'createTextNode', 'currentFps', 'curveTo', 'CustomActions', 'customItems', 'data', 'Date', + 'deblocking', 'delete', 'DELETEKEY', 'docTypeDecl', 'domain', 'DOWN', + 'duplicateMovieClip', 'duration', 'dynamic', 'E', 'embedFonts', 'enabled', + 'END', 'endFill', 'ENTER', 'eq', 'Error', 'ESCAPE(Konstante)', 'escape(Funktion)', 'eval', + 'exactSettings', 'exp', 'extends', 'finally', 'findText', 'firstChild', 'floor', + 'flush', 'focusEnabled', 'font', 'fps', 'fromCharCode', 'fscommand', + 'gain', 'ge', 'get', 'getAscii', 'getBeginIndex', 'getBounds', 'getBytesLoaded', 'getBytesTotal', + 'getCaretIndex', 'getCode', 'getCount', 'getDate', 'getDay', 'getDepth', 'getEndIndex', 'getFocus', + 'getFontList', 'getFullYear', 'getHours', 'getInstanceAtDepth', 'getLocal', 'getMilliseconds', + 'getMinutes', 'getMonth', 'getNewTextFormat', 'getNextHighestDepth', 'getPan', 'getProgress', + 'getProperty', 'getRGB', 'getSeconds', 'getSelected', 'getSelectedText', 'getSize', 'getStyle', + 'getStyleNames', 'getSWFVersion', 'getText', 'getTextExtent', 'getTextFormat', 'getTextSnapshot', + 'getTime', 'getTimer', 'getTimezoneOffset', 'getTransform', 'getURL', 'getUTCDate', 'getUTCDay', + 'getUTCFullYear', 'getUTCHours', 'getUTCMilliseconds', 'getUTCMinutes', 'getUTCMonth', 'getUTCSeconds', + 'getVersion', 'getVolume', 'getYear', 'globalToLocal', 'goto', 'gotoAndPlay', 'gotoAndStop', + 'hasAccessibility', 'hasAudio', 'hasAudioEncoder', 'hasChildNodes', 'hasEmbeddedVideo', 'hasMP3', + 'hasPrinting', 'hasScreenBroadcast', 'hasScreenPlayback', 'hasStreamingAudio', 'hasStreamingVideo', + 'hasVideoEncoder', 'height', 'hide', 'hideBuiltInItems', 'hitArea', 'hitTest', 'hitTestTextNearPos', + 'HOME', 'hscroll', 'html', 'htmlText', 'ID3', 'ifFrameLoaded', 'ignoreWhite', 'implements', + 'import', 'indent', 'index', 'indexOf', 'Infinity', '-Infinity', 'INSERT', 'insertBefore', 'install', + 'instanceof', 'int', 'interface', 'isActive', 'isDebugger', 'isDown', 'isFinite', 'isNaN', 'isToggled', + 'italic', 'join', 'Key', 'language', 'lastChild', 'lastIndexOf', 'le', 'leading', 'LEFT', 'leftMargin', + 'length', 'level', 'lineStyle', 'lineTo', 'list', 'LN10', 'LN2', 'load', 'loadClip', 'loaded', 'loadMovie', + 'loadMovieNum', 'loadSound', 'loadVariables', 'loadVariablesNum', 'LoadVars', 'LocalConnection', + 'localFileReadDisable', 'localToGlobal', 'log', 'LOG10E', 'LOG2E', 'manufacturer', 'Math', 'max', + 'MAX_VALUE', 'maxChars', 'maxhscroll', 'maxscroll', 'mbchr', 'mblength', 'mbord', 'mbsubstring', 'menu', + 'message', 'Microphone', 'min', 'MIN_VALUE', 'MMExecute', 'motionLevel', 'motionTimeOut', 'Mouse', + 'mouseWheelEnabled', 'moveTo', 'Movieclip', 'MovieClipLoader', 'multiline', 'muted', 'name', 'names', 'NaN', + 'ne', 'NEGATIVE_INFINITY', 'NetConnection', 'NetStream', 'newline', 'nextFrame', + 'nextScene', 'nextSibling', 'nodeName', 'nodeType', 'nodeValue', 'not', 'Number', 'Object', + 'on', 'onActivity', 'onChanged', 'onClipEvent', 'onClose', 'onConnect', 'onData', 'onDragOut', + 'onDragOver', 'onEnterFrame', 'onID3', 'onKeyDown', 'onKeyUp', 'onKillFocus', 'onLoad', 'onLoadComplete', + 'onLoadError', 'onLoadInit', 'onLoadProgress', 'onLoadStart', 'onMouseDown', 'onMouseMove', 'onMouseUp', + 'onMouseWheel', 'onPress', 'onRelease', 'onReleaseOutside', 'onResize', 'onRollOut', 'onRollOver', + 'onScroller', 'onSelect', 'onSetFocus', 'onSoundComplete', 'onStatus', 'onUnload', 'onUpdate', 'onXML', + 'or(logischesOR)', 'ord', 'os', 'parentNode', 'parseCSS', 'parseFloat', 'parseInt', 'parseXML', 'password', + 'pause', 'PGDN', 'PGUP', 'PI', 'pixelAspectRatio', 'play', 'playerType', 'pop', 'position', + 'POSITIVE_INFINITY', 'pow', 'prevFrame', 'previousSibling', 'prevScene', 'print', 'printAsBitmap', + 'printAsBitmapNum', 'PrintJob', 'printNum', 'private', 'prototype', 'public', 'push', 'quality', + 'random', 'rate', 'registerClass', 'removeListener', 'removeMovieClip', 'removeNode', 'removeTextField', + 'replaceSel', 'replaceText', 'resolutionX', 'resolutionY', 'restrict', 'reverse', 'RIGHT', + 'rightMargin', 'round', 'scaleMode', 'screenColor', 'screenDPI', 'screenResolutionX', 'screenResolutionY', + 'scroll', 'seek', 'selectable', 'Selection', 'send', 'sendAndLoad', 'separatorBefore', 'serverString', + 'set', 'setvariable', 'setBufferTime', 'setClipboard', 'setDate', 'setFocus', 'setFullYear', 'setGain', + 'setHours', 'setInterval', 'setMask', 'setMilliseconds', 'setMinutes', 'setMode', 'setMonth', + 'setMotionLevel', 'setNewTextFormat', 'setPan', 'setProperty', 'setQuality', 'setRate', 'setRGB', + 'setSeconds', 'setSelectColor', 'setSelected', 'setSelection', 'setSilenceLevel', 'setStyle', + 'setTextFormat', 'setTime', 'setTransform', 'setUseEchoSuppression', 'setUTCDate', 'setUTCFullYear', + 'setUTCHours', 'setUTCMilliseconds', 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds', 'setVolume', + 'setYear', 'SharedObject', 'SHIFT(Konstante)', 'shift(Methode)', 'show', 'showMenu', 'showSettings', + 'silenceLevel', 'silenceTimeout', 'sin', 'size', 'slice', 'smoothing', 'sort', 'sortOn', 'Sound', 'SPACE', + 'splice', 'split', 'sqrt', 'SQRT1_2', 'SQRT2', 'Stage', 'start', 'startDrag', 'static', 'status', 'stop', + 'stopAllSounds', 'stopDrag', 'String', 'StyleSheet(Klasse)', 'styleSheet(Eigenschaft)', 'substr', + 'substring', 'super', 'swapDepths', 'System', 'TAB', 'tabChildren', 'tabEnabled', 'tabIndex', + 'tabStops', 'tan', 'target', 'targetPath', 'tellTarget', 'text', 'textColor', 'TextField', 'TextFormat', + 'textHeight', 'TextSnapshot', 'textWidth', 'this', 'throw', 'time', 'toggleHighQuality', 'toLowerCase', + 'toString', 'toUpperCase', 'trace', 'trackAsMenu', 'try', 'type', 'typeof', 'undefined', + 'underline', 'unescape', 'uninstall', 'unloadClip', 'unloadMovie', 'unLoadMovieNum', 'unshift', 'unwatch', + 'UP', 'updateAfterEvent', 'updateProperties', 'url', 'useCodePage', 'useEchoSuppression', 'useHandCursor', + 'UTC', 'valueOf', 'variable', 'version', 'Video', 'visible', 'void', 'watch', 'width', + 'with', 'wordwrap', 'XML', 'xmlDecl', 'XMLNode', 'XMLSocket' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #0066CC;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array() +); + diff --git a/vendor/easybook/geshi/geshi/actionscript3.php b/vendor/easybook/geshi/geshi/actionscript3.php new file mode 100644 index 0000000000..afe5380c0a --- /dev/null +++ b/vendor/easybook/geshi/geshi/actionscript3.php @@ -0,0 +1,472 @@ + 'ActionScript 3', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array( + //Regular expressions + 2 => "/(?<=[\\s^])(s|tr|y)\\/(?!\s)(?:\\\\.|(?!\n)[^\\/\\\\])+(? GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'with', 'while', 'void', 'undefined', 'typeof', 'try', 'true', + 'throw', 'this', 'switch', 'super', 'set', 'return', 'public', 'protected', + 'private', 'null', 'new', 'is', 'internal', 'instanceof', 'in', + 'import', 'if', 'get', 'for', 'false', 'else', 'each', 'do', + 'delete', 'default', 'continue', 'catch', 'case', 'break', 'as', + 'extends', 'override' + ), + 2 => array( + 'var' + ), + 3 => array( + 'function' + ), + 4 => array( + 'class', 'package' + ), + 6 => array( + 'flash.xml', 'flash.utils', 'flash.ui', 'flash.text', + 'flash.system', 'flash.profiler', 'flash.printing', 'flash.net', + 'flash.media', 'flash.geom', 'flash.filters', 'flash.external', + 'flash.events', 'flash.errors', 'flash.display', + 'flash.accessibility' + ), + 7 => array( + 'zoom', 'year', 'y', 'xmlDecl', 'x', 'writeUnsignedInt', + 'writeUTFBytes', 'writeUTF', 'writeShort', 'writeObject', + 'writeMultiByte', 'writeInt', 'writeFloat', 'writeExternal', + 'writeDynamicProperty', 'writeDynamicProperties', 'writeDouble', + 'writeBytes', 'writeByte', 'writeBoolean', 'wordWrap', + 'willTrigger', 'width', 'volume', 'visible', 'videoWidth', + 'videoHeight', 'version', 'valueOf', 'value', 'usingTLS', + 'useRichTextClipboard', 'useHandCursor', 'useEchoSuppression', + 'useCodePage', 'url', 'uri', 'uploadCompleteData', 'upload', + 'updateProperties', 'updateAfterEvent', 'upState', 'unshift', + 'unlock', 'unload', 'union', 'unescapeMultiByte', 'unescape', + 'underline', 'uncompress', 'type', 'ty', 'tx', 'transparent', + 'translate', 'transformPoint', 'transform', 'trackAsMenu', 'track', + 'trace', 'totalMemory', 'totalFrames', 'topLeft', 'top', + 'togglePause', 'toXMLString', 'toUpperCase', 'toUTCString', + 'toTimeString', 'toString', 'toPrecision', 'toLowerCase', + 'toLocaleUpperCase', 'toLocaleTimeString', 'toLocaleString', + 'toLocaleLowerCase', 'toLocaleDateString', 'toFixed', + 'toExponential', 'toDateString', 'timezoneOffset', 'timerComplete', + 'timer', 'time', 'threshold', 'thickness', 'textWidth', + 'textSnapshot', 'textInput', 'textHeight', 'textColor', 'text', + 'test', 'target', 'tan', 'tabStops', 'tabIndexChange', 'tabIndex', + 'tabEnabledChange', 'tabEnabled', 'tabChildrenChange', + 'tabChildren', 'sync', 'swfVersion', 'swapChildrenAt', + 'swapChildren', 'subtract', 'substring', 'substr', 'styleSheet', + 'styleNames', 'strength', 'stopPropagation', + 'stopImmediatePropagation', 'stopDrag', 'stopAll', 'stop', 'status', + 'startDrag', 'start', 'stageY', 'stageX', 'stageWidth', + 'stageHeight', 'stageFocusRect', 'stage', 'sqrt', 'split', 'splice', + 'source', 'soundTransform', 'soundComplete', 'sortOn', 'sort', + 'songName', 'some', 'socketData', 'smoothing', 'slice', 'size', + 'sin', 'silent', 'silenceTimeout', 'silenceLevel', 'showSettings', + 'showRedrawRegions', 'showDefaultContextMenu', 'show', 'shortcut', + 'shiftKey', 'shift', 'sharpness', 'sharedEvents', 'shadowColor', + 'shadowAlpha', 'settings', 'setUseEchoSuppression', 'setUTCSeconds', + 'setUTCMonth', 'setUTCMinutes', 'setUTCMilliseconds', 'setUTCHours', + 'setUTCFullYear', 'setUTCDate', 'setTimeout', 'setTime', + 'setTextFormat', 'setStyle', 'setSilenceLevel', 'setSettings', + 'setSelection', 'setSelected', 'setSelectColor', 'setSeconds', + 'setQuality', 'setPropertyIsEnumerable', 'setProperty', 'setPixels', + 'setPixel32', 'setPixel', 'setNamespace', 'setName', + 'setMotionLevel', 'setMonth', 'setMode', 'setMinutes', + 'setMilliseconds', 'setLoopback', 'setLoopBack', 'setLocalName', + 'setKeyFrameInterval', 'setInterval', 'setHours', 'setFullYear', + 'setEmpty', 'setDirty', 'setDate', 'setCompositionString', + 'setClipboard', 'setChildren', 'setChildIndex', + 'setAdvancedAntiAliasingTable', 'serverString', 'separatorBefore', + 'sendToURL', 'send', 'selectionEndIndex', 'selectionBeginIndex', + 'selectable', 'select', 'seek', 'securityError', 'securityDomain', + 'secondsUTC', 'seconds', 'search', 'scrollV', 'scrollRect', + 'scrollH', 'scroll', 'screenResolutionY', 'screenResolutionX', + 'screenDPI', 'screenColor', 'scenes', 'scaleY', 'scaleX', + 'scaleMode', 'scale9Grid', 'scale', 'save', 'sandboxType', + 'sameDomain', 'running', 'round', 'rotation', 'rotate', 'root', + 'rollOver', 'rollOut', 'rightToRight', 'rightToLeft', 'rightPeak', + 'rightMargin', 'right', 'rewind', 'reverse', 'resume', 'restrict', + 'resize', 'reset', 'requestHeaders', 'replaceText', + 'replaceSelectedText', 'replace', 'repeatCount', 'render', + 'removedFromStage', 'removed', 'removeNode', 'removeNamespace', + 'removeEventListener', 'removeChildAt', 'removeChild', + 'relatedObject', 'registerFont', 'registerClassAlias', 'redOffset', + 'redMultiplier', 'rect', 'receiveVideo', 'receiveAudio', + 'readUnsignedShort', 'readUnsignedInt', 'readUnsignedByte', + 'readUTFBytes', 'readUTF', 'readShort', 'readObject', + 'readMultiByte', 'readInt', 'readFloat', 'readExternal', + 'readDouble', 'readBytes', 'readByte', 'readBoolean', 'ratios', + 'rate', 'random', 'quality', 'push', 'publish', 'proxyType', + 'prototype', 'propertyIsEnumerable', 'progress', + 'processingInstructions', 'printAsBitmap', 'print', + 'previousSibling', 'preventDefault', 'prevScene', 'prevFrame', + 'prettyPrinting', 'prettyIndent', 'preserveAlpha', 'prependChild', + 'prefix', 'pow', 'position', 'pop', 'polar', 'playerType', 'play', + 'pixelSnapping', 'pixelDissolve', 'pixelBounds', 'pixelAspectRatio', + 'perlinNoise', 'pause', 'parseXML', 'parseInt', 'parseFloat', + 'parseCSS', 'parse', 'parentNode', 'parentDomain', + 'parentAllowsChild', 'parent', 'parameters', 'paperWidth', + 'paperHeight', 'pan', 'paletteMap', 'pageWidth', 'pageHeight', + 'overState', 'outsideCutoff', 'os', 'orientation', 'open', + 'opaqueBackground', 'onPlayStatus', 'onMetaData', 'onCuePoint', + 'offsetPoint', 'offset', 'objectID', 'objectEncoding', 'numLock', + 'numLines', 'numFrames', 'numChildren', 'normalize', 'noise', + 'nodeValue', 'nodeType', 'nodeName', 'nodeKind', 'noAutoLabeling', + 'nextValue', 'nextSibling', 'nextScene', 'nextNameIndex', + 'nextName', 'nextFrame', 'netStatus', 'navigateToURL', + 'namespaceURI', 'namespaceDeclarations', 'namespace', 'names', + 'name', 'muted', 'multiline', 'moveTo', 'mouseY', 'mouseX', + 'mouseWheelEnabled', 'mouseWheel', 'mouseUp', 'mouseTarget', + 'mouseOver', 'mouseOut', 'mouseMove', 'mouseLeave', + 'mouseFocusChange', 'mouseEnabled', 'mouseDown', 'mouseChildren', + 'motionTimeout', 'motionLevel', 'monthUTC', 'month', + 'modificationDate', 'mode', 'minutesUTC', 'minutes', 'min', + 'millisecondsUTC', 'milliseconds', 'method', 'message', 'merge', + 'menuSelect', 'menuItemSelect', 'maxScrollV', 'maxScrollH', + 'maxLevel', 'maxChars', 'max', 'matrixY', 'matrixX', 'matrix', + 'match', 'mask', 'mapPoint', 'mapBitmap', 'map', 'manufacturer', + 'macType', 'loopback', 'loop', 'log', 'lock', 'localeCompare', + 'localY', 'localX', 'localToGlobal', 'localName', + 'localFileReadDisable', 'loaderURL', 'loaderInfo', 'loader', + 'loadPolicyFile', 'loadBytes', 'load', 'liveDelay', 'link', + 'lineTo', 'lineStyle', 'lineGradientStyle', 'level', + 'letterSpacing', 'length', 'leftToRight', 'leftToLeft', 'leftPeak', + 'leftMargin', 'left', 'leading', 'lastIndexOf', 'lastIndex', + 'lastChild', 'language', 'labels', 'knockout', 'keyUp', + 'keyLocation', 'keyFrameInterval', 'keyFocusChange', 'keyDown', + 'keyCode', 'kerning', 'join', 'italic', 'isXMLName', + 'isPrototypeOf', 'isNaN', 'isFocusInaccessible', 'isFinite', + 'isEmpty', 'isDefaultPrevented', 'isDebugger', 'isBuffering', + 'isAttribute', 'isAccessible', 'ioError', 'invert', 'invalidate', + 'intersects', 'intersection', 'interpolate', 'insideCutoff', + 'insertChildBefore', 'insertChildAfter', 'insertBefore', 'inner', + 'init', 'info', 'inflatePoint', 'inflate', 'indexOf', 'index', + 'indent', 'inScopeNamespaces', 'imeComposition', 'ime', + 'ignoreWhitespace', 'ignoreWhite', 'ignoreProcessingInstructions', + 'ignoreComments', 'ignoreCase', 'identity', 'idMap', 'id3', + 'httpStatus', 'htmlText', 'hoursUTC', 'hours', 'hitTestTextNearPos', + 'hitTestState', 'hitTestPoint', 'hitTestObject', 'hitTest', + 'hitArea', 'highlightColor', 'highlightAlpha', 'hideObject', + 'hideBuiltInItems', 'hide', 'height', 'hasVideoEncoder', 'hasTLS', + 'hasStreamingVideo', 'hasStreamingAudio', 'hasSimpleContent', + 'hasScreenPlayback', 'hasScreenBroadcast', 'hasProperty', + 'hasPrinting', 'hasOwnProperty', 'hasMP3', 'hasIME', 'hasGlyphs', + 'hasEventListener', 'hasEmbeddedVideo', 'hasDefinition', + 'hasComplexContent', 'hasChildNodes', 'hasAudioEncoder', 'hasAudio', + 'hasAccessibility', 'gridFitType', 'greenOffset', 'greenMultiplier', + 'graphics', 'gotoAndStop', 'gotoAndPlay', 'globalToLocal', 'global', + 'getUTCSeconds', 'getUTCMonth', 'getUTCMinutes', + 'getUTCMilliseconds', 'getUTCHours', 'getUTCFullYear', 'getUTCDay', + 'getUTCDate', 'getTimezoneOffset', 'getTimer', 'getTime', + 'getTextRunInfo', 'getTextFormat', 'getText', 'getStyle', + 'getStackTrace', 'getSelectedText', 'getSelected', 'getSeconds', + 'getRemote', 'getRect', 'getQualifiedSuperclassName', + 'getQualifiedClassName', 'getProperty', 'getPrefixForNamespace', + 'getPixels', 'getPixel32', 'getPixel', 'getParagraphLength', + 'getObjectsUnderPoint', 'getNamespaceForPrefix', 'getMonth', + 'getMinutes', 'getMilliseconds', 'getMicrophone', 'getLocal', + 'getLineText', 'getLineOffset', 'getLineMetrics', 'getLineLength', + 'getLineIndexOfChar', 'getLineIndexAtPoint', 'getImageReference', + 'getHours', 'getFullYear', 'getFirstCharInParagraph', + 'getDescendants', 'getDefinitionByName', 'getDefinition', 'getDay', + 'getDate', 'getColorBoundsRect', 'getClassByAlias', 'getChildIndex', + 'getChildByName', 'getChildAt', 'getCharIndexAtPoint', + 'getCharBoundaries', 'getCamera', 'getBounds', 'genre', + 'generateFilterRect', 'gain', 'fullYearUTC', 'fullYear', + 'fullScreen', 'fscommand', 'fromCharCode', 'framesLoaded', + 'frameRate', 'frame', 'fps', 'forwardAndBack', 'formatToString', + 'forceSimple', 'forEach', 'fontType', 'fontStyle', 'fontSize', + 'fontName', 'font', 'focusRect', 'focusOut', 'focusIn', 'focus', + 'flush', 'floor', 'floodFill', 'firstChild', 'findText', 'filters', + 'filter', 'fillRect', 'fileList', 'extension', 'extended', 'exp', + 'exec', 'exactSettings', 'every', 'eventPhase', 'escapeMultiByte', + 'escape', 'errorID', 'error', 'equals', 'enumerateFonts', + 'enterFrame', 'endian', 'endFill', 'encodeURIComponent', + 'encodeURI', 'enabled', 'embedFonts', 'elements', + 'dynamicPropertyWriter', 'dropTarget', 'drawRoundRect', 'drawRect', + 'drawEllipse', 'drawCircle', 'draw', 'download', 'downState', + 'doubleClickEnabled', 'doubleClick', 'dotall', 'domain', + 'docTypeDecl', 'doConversion', 'divisor', 'distance', 'dispose', + 'displayState', 'displayMode', 'displayAsPassword', 'dispatchEvent', + 'description', 'describeType', 'descent', 'descendants', + 'deltaTransformPoint', 'delta', 'deleteProperty', 'delay', + 'defaultTextFormat', 'defaultSettings', 'defaultObjectEncoding', + 'decodeURIComponent', 'decodeURI', 'decode', 'deblocking', + 'deactivate', 'dayUTC', 'day', 'dateUTC', 'date', 'dataFormat', + 'data', 'd', 'customItems', 'curveTo', 'currentTarget', + 'currentScene', 'currentLabels', 'currentLabel', 'currentFrame', + 'currentFPS', 'currentDomain', 'currentCount', 'ctrlKey', 'creator', + 'creationDate', 'createTextNode', 'createGradientBox', + 'createElement', 'createBox', 'cos', 'copyPixels', 'copyChannel', + 'copy', 'conversionMode', 'contextMenuOwner', 'contextMenu', + 'contentType', 'contentLoaderInfo', 'content', 'containsRect', + 'containsPoint', 'contains', 'constructor', 'connectedProxyType', + 'connected', 'connect', 'condenseWhite', 'concatenatedMatrix', + 'concatenatedColorTransform', 'concat', 'computeSpectrum', + 'compress', 'componentY', 'componentX', 'complete', 'compare', + 'comments', 'comment', 'colors', 'colorTransform', 'color', 'code', + 'close', 'cloneNode', 'clone', 'client', 'click', 'clearTimeout', + 'clearInterval', 'clear', 'clamp', 'children', 'childNodes', + 'childIndex', 'childAllowsParent', 'child', 'checkPolicyFile', + 'charCount', 'charCodeAt', 'charCode', 'charAt', 'changeList', + 'change', 'ceil', 'caretIndex', 'caption', 'capsLock', 'cancelable', + 'cancel', 'callee', 'callProperty', 'call', 'cacheAsBitmap', 'c', + 'bytesTotal', 'bytesLoaded', 'bytesAvailable', 'buttonMode', + 'buttonDown', 'bullet', 'builtInItems', 'bufferTime', + 'bufferLength', 'bubbles', 'browse', 'bottomScrollV', 'bottomRight', + 'bottom', 'borderColor', 'border', 'bold', 'blurY', 'blurX', + 'blueOffset', 'blueMultiplier', 'blockIndent', 'blendMode', + 'bitmapData', 'bias', 'beginGradientFill', 'beginFill', + 'beginBitmapFill', 'bandwidth', 'backgroundColor', 'background', + 'b', 'available', 'avHardwareDisable', 'autoSize', 'attributes', + 'attribute', 'attachNetStream', 'attachCamera', 'attachAudio', + 'atan2', 'atan', 'asyncError', 'asin', 'ascent', 'artist', + 'areSoundsInaccessible', 'areInaccessibleObjectsUnderPoint', + 'applyFilter', 'apply', 'applicationDomain', 'appendText', + 'appendChild', 'antiAliasType', 'angle', 'alwaysShowSelection', + 'altKey', 'alphas', 'alphaOffset', 'alphaMultiplier', 'alpha', + 'allowInsecureDomain', 'allowDomain', 'align', 'album', + 'addedToStage', 'added', 'addPage', 'addNamespace', 'addHeader', + 'addEventListener', 'addChildAt', 'addChild', 'addCallback', 'add', + 'activityLevel', 'activity', 'active', 'activating', 'activate', + 'actionScriptVersion', 'acos', 'accessibilityProperties', 'abs' + ), + 8 => array( + 'WRAP', 'VERTICAL', 'VARIABLES', + 'UTC', 'UPLOAD_COMPLETE_DATA', 'UP', 'UNLOAD', 'UNKNOWN', + 'UNIQUESORT', 'TOP_RIGHT', 'TOP_LEFT', 'TOP', 'TIMER_COMPLETE', + 'TIMER', 'TEXT_NODE', 'TEXT_INPUT', 'TEXT', 'TAB_INDEX_CHANGE', + 'TAB_ENABLED_CHANGE', 'TAB_CHILDREN_CHANGE', 'TAB', 'SYNC', + 'SUBTRACT', 'SUBPIXEL', 'STATUS', 'STANDARD', 'SQUARE', 'SQRT2', + 'SQRT1_2', 'SPACE', 'SOUND_COMPLETE', 'SOCKET_DATA', 'SHOW_ALL', + 'SHIFT', 'SETTINGS_MANAGER', 'SELECT', 'SECURITY_ERROR', 'SCROLL', + 'SCREEN', 'ROUND', 'ROLL_OVER', 'ROLL_OUT', 'RIGHT', 'RGB', + 'RETURNINDEXEDARRAY', 'RESIZE', 'REPEAT', 'RENDER', + 'REMOVED_FROM_STAGE', 'REMOVED', 'REMOTE', 'REGULAR', 'REFLECT', + 'RED', 'RADIAL', 'PROGRESS', 'PRIVACY', 'POST', 'POSITIVE_INFINITY', + 'PORTRAIT', 'PIXEL', 'PI', 'PENDING', 'PAGE_UP', 'PAGE_DOWN', 'PAD', + 'OVERLAY', 'OUTER', 'OPEN', 'NaN', 'NUM_PAD', 'NUMPAD_SUBTRACT', + 'NUMPAD_MULTIPLY', 'NUMPAD_ENTER', 'NUMPAD_DIVIDE', + 'NUMPAD_DECIMAL', 'NUMPAD_ADD', 'NUMPAD_9', 'NUMPAD_8', 'NUMPAD_7', + 'NUMPAD_6', 'NUMPAD_5', 'NUMPAD_4', 'NUMPAD_3', 'NUMPAD_2', + 'NUMPAD_1', 'NUMPAD_0', 'NUMERIC', 'NO_SCALE', 'NO_BORDER', + 'NORMAL', 'NONE', 'NEVER', 'NET_STATUS', 'NEGATIVE_INFINITY', + 'MULTIPLY', 'MOUSE_WHEEL', 'MOUSE_UP', 'MOUSE_OVER', 'MOUSE_OUT', + 'MOUSE_MOVE', 'MOUSE_LEAVE', 'MOUSE_FOCUS_CHANGE', 'MOUSE_DOWN', + 'MITER', 'MIN_VALUE', 'MICROPHONE', 'MENU_SELECT', + 'MENU_ITEM_SELECT', 'MEDIUM', 'MAX_VALUE', 'LOW', 'LOG2E', 'LOG10E', + 'LOCAL_WITH_NETWORK', 'LOCAL_WITH_FILE', 'LOCAL_TRUSTED', + 'LOCAL_STORAGE', 'LN2', 'LN10', 'LITTLE_ENDIAN', 'LINK', + 'LINEAR_RGB', 'LINEAR', 'LIGHT_COLOR', 'LIGHTEN', 'LEFT', 'LCD', + 'LAYER', 'LANDSCAPE', 'KOREAN', 'KEY_UP', 'KEY_FOCUS_CHANGE', + 'KEY_DOWN', 'JUSTIFY', 'JAPANESE_KATAKANA_HALF', + 'JAPANESE_KATAKANA_FULL', 'JAPANESE_HIRAGANA', 'Infinity', 'ITALIC', + 'IO_ERROR', 'INVERT', 'INSERT', 'INPUT', 'INNER', 'INIT', + 'IME_COMPOSITION', 'IGNORE', 'ID3', 'HTTP_STATUS', 'HORIZONTAL', + 'HOME', 'HIGH', 'HARDLIGHT', 'GREEN', 'GET', 'FULLSCREEN', 'FULL', + 'FOCUS_OUT', 'FOCUS_IN', 'FLUSHED', 'FLASH9', 'FLASH8', 'FLASH7', + 'FLASH6', 'FLASH5', 'FLASH4', 'FLASH3', 'FLASH2', 'FLASH1', 'F9', + 'F8', 'F7', 'F6', 'F5', 'F4', 'F3', 'F2', 'F15', 'F14', 'F13', + 'F12', 'F11', 'F10', 'F1', 'EXACT_FIT', 'ESCAPE', 'ERROR', 'ERASE', + 'ENTER_FRAME', 'ENTER', 'END', 'EMBEDDED', 'ELEMENT_NODE', 'E', + 'DYNAMIC', 'DOWN', 'DOUBLE_CLICK', 'DIFFERENCE', 'DEVICE', + 'DESCENDING', 'DELETE', 'DEFAULT', 'DEACTIVATE', 'DATA', + 'DARK_COLOR', 'DARKEN', 'CRT', 'CONTROL', 'CONNECT', 'COMPLETE', + 'COLOR', 'CLOSE', 'CLICK', 'CLAMP', 'CHINESE', 'CHANGE', 'CENTER', + 'CASEINSENSITIVE', 'CAPTURING_PHASE', 'CAPS_LOCK', 'CANCEL', + 'CAMERA', 'BUBBLING_PHASE', 'BOTTOM_RIGHT', 'BOTTOM_LEFT', 'BOTTOM', + 'BOLD_ITALIC', 'BOLD', 'BLUE', 'BINARY', 'BIG_ENDIAN', 'BEVEL', + 'BEST', 'BACKSPACE', 'AUTO', 'AT_TARGET', 'ASYNC_ERROR', 'AMF3', + 'AMF0', 'ALWAYS', 'ALPHANUMERIC_HALF', 'ALPHANUMERIC_FULL', 'ALPHA', + 'ADVANCED', 'ADDED_TO_STAGE', 'ADDED', 'ADD', 'ACTIVITY', + 'ACTIONSCRIPT3', 'ACTIONSCRIPT2' + ), + //FIX: Must be last in order to avoid conflicts with keywords present + //in other keyword groups, that might get highlighted as part of the URL. + //I know this is not a proper work-around, but should do just fine. + 5 => array( + 'uint', 'int', 'arguments', 'XMLSocket', 'XMLNodeType', 'XMLNode', + 'XMLList', 'XMLDocument', 'XML', 'Video', 'VerifyError', + 'URLVariables', 'URLStream', 'URLRequestMethod', 'URLRequestHeader', + 'URLRequest', 'URLLoaderDataFormat', 'URLLoader', 'URIError', + 'TypeError', 'Transform', 'TimerEvent', 'Timer', 'TextSnapshot', + 'TextRenderer', 'TextLineMetrics', 'TextFormatAlign', 'TextFormat', + 'TextFieldType', 'TextFieldAutoSize', 'TextField', 'TextEvent', + 'TextDisplayMode', 'TextColorType', 'System', 'SyntaxError', + 'SyncEvent', 'StyleSheet', 'String', 'StatusEvent', 'StaticText', + 'StageScaleMode', 'StageQuality', 'StageAlign', 'Stage', + 'StackOverflowError', 'Sprite', 'SpreadMethod', 'SoundTransform', + 'SoundMixer', 'SoundLoaderContext', 'SoundChannel', 'Sound', + 'Socket', 'SimpleButton', 'SharedObjectFlushStatus', 'SharedObject', + 'Shape', 'SecurityPanel', 'SecurityErrorEvent', 'SecurityError', + 'SecurityDomain', 'Security', 'ScriptTimeoutError', 'Scene', + 'SWFVersion', 'Responder', 'RegExp', 'ReferenceError', 'Rectangle', + 'RangeError', 'QName', 'Proxy', 'ProgressEvent', + 'PrintJobOrientation', 'PrintJobOptions', 'PrintJob', 'Point', + 'PixelSnapping', 'ObjectEncoding', 'Object', 'Number', 'NetStream', + 'NetStatusEvent', 'NetConnection', 'Namespace', 'MovieClip', + 'MouseEvent', 'Mouse', 'MorphShape', 'Microphone', 'MemoryError', + 'Matrix', 'Math', 'LocalConnection', 'LoaderInfo', 'LoaderContext', + 'Loader', 'LineScaleMode', 'KeyboardEvent', 'Keyboard', + 'KeyLocation', 'JointStyle', 'InvalidSWFError', + 'InterpolationMethod', 'InteractiveObject', 'IllegalOperationError', + 'IOErrorEvent', 'IOError', 'IMEEvent', 'IMEConversionMode', 'IME', + 'IExternalizable', 'IEventDispatcher', 'IDynamicPropertyWriter', + 'IDynamicPropertyOutput', 'IDataOutput', 'IDataInput', 'ID3Info', + 'IBitmapDrawable', 'HTTPStatusEvent', 'GridFitType', 'Graphics', + 'GradientType', 'GradientGlowFilter', 'GradientBevelFilter', + 'GlowFilter', 'Function', 'FrameLabel', 'FontType', 'FontStyle', + 'Font', 'FocusEvent', 'FileReferenceList', 'FileReference', + 'FileFilter', 'ExternalInterface', 'EventPhase', 'EventDispatcher', + 'Event', 'EvalError', 'ErrorEvent', 'Error', 'Endian', 'EOFError', + 'DropShadowFilter', 'DisplayObjectContainer', 'DisplayObject', + 'DisplacementMapFilterMode', 'DisplacementMapFilter', 'Dictionary', + 'DefinitionError', 'Date', 'DataEvent', 'ConvolutionFilter', + 'ContextMenuItem', 'ContextMenuEvent', 'ContextMenuBuiltInItems', + 'ContextMenu', 'ColorTransform', 'ColorMatrixFilter', 'Class', + 'CapsStyle', 'Capabilities', 'Camera', 'CSMSettings', 'ByteArray', + 'Boolean', 'BlurFilter', 'BlendMode', 'BitmapFilterType', + 'BitmapFilterQuality', 'BitmapFilter', 'BitmapDataChannel', + 'BitmapData', 'Bitmap', 'BevelFilter', 'AsyncErrorEvent', 'Array', + 'ArgumentError', 'ApplicationDomain', 'AntiAliasType', + 'ActivityEvent', 'ActionScriptVersion', 'AccessibilityProperties', + 'Accessibility', 'AVM1Movie' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '!', '%', '&', '*', '|', '/', '<', '>', '^', '-', '+', '~', '?', ':', ';', '.', ',' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0033ff; font-weight: bold;', + 2 => 'color: #6699cc; font-weight: bold;', + 3 => 'color: #339966; font-weight: bold;', + 4 => 'color: #9900cc; font-weight: bold;', + 5 => 'color: #004993;', + 6 => 'color: #004993;', + 7 => 'color: #004993;', + 8 => 'color: #004993;' + ), + 'COMMENTS' => array( + 1 => 'color: #009900; font-style: italic;', + 2 => 'color: #009966; font-style: italic;', + 'MULTI' => 'color: #3f5fbf;' + ), + 'ESCAPE_CHAR' => array( + 0 => '' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #990000;' + ), + 'NUMBERS' => array( + 0 => 'color: #000000; font-weight:bold;' + ), + 'METHODS' => array( + 0 => 'color: #000000;', + ), + 'SYMBOLS' => array( + 0 => 'color: #000066; font-weight: bold;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => 'http://www.google.com/search?q={FNAMEL}%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:{FNAMEL}.html', + 6 => '', + 7 => '', + 8 => '' + ), + 'OOLANG' => false,//Save some time as OO identifiers aren't used + 'OBJECT_SPLITTERS' => array( + // commented out because it's not very relevant for AS, as all properties, methods and constants are dot-accessed. + // I believe it's preferable to have package highlighting for example, which is not possible with this enabled. + // 0 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array() +); + diff --git a/vendor/easybook/geshi/geshi/ada.php b/vendor/easybook/geshi/geshi/ada.php new file mode 100644 index 0000000000..09cc6ea583 --- /dev/null +++ b/vendor/easybook/geshi/geshi/ada.php @@ -0,0 +1,134 @@ + 'Ada', + 'COMMENT_SINGLE' => array(1 => '--'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'begin', 'declare', 'do', 'else', 'elsif', 'exception', 'for', 'if', + 'is', 'loop', 'while', 'then', 'end', 'select', 'case', 'until', + 'goto', 'return' + ), + 2 => array( + 'abs', 'and', 'at', 'mod', 'not', 'or', 'rem', 'xor' + ), + 3 => array( + 'abort', 'abstract', 'accept', 'access', 'aliased', 'all', 'array', + 'body', 'constant', 'delay', 'delta', 'digits', 'entry', 'exit', + 'function', 'generic', 'in', 'interface', 'limited', 'new', 'null', + 'of', 'others', 'out', 'overriding', 'package', 'pragma', 'private', + 'procedure', 'protected', 'raise', 'range', 'record', 'renames', + 'requeue', 'reverse', 'separate', 'subtype', 'synchronized', + 'tagged', 'task', 'terminate', 'type', 'use', 'when', 'with' + ) + ), + 'SYMBOLS' => array( + '(', ')' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00007f;', + 2 => 'color: #0000ff;', + 3 => 'color: #46aa03; font-weight:bold;', + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'COMMENTS' => array( + 1 => 'color: #adadad; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #7f007f;' + ), + 'NUMBERS' => array( + 0 => 'color: #ff0000;' + ), + 'METHODS' => array( + 1 => 'color: #202020;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + diff --git a/vendor/easybook/geshi/geshi/aimms.php b/vendor/easybook/geshi/geshi/aimms.php new file mode 100644 index 0000000000..f46bdd0bcd --- /dev/null +++ b/vendor/easybook/geshi/geshi/aimms.php @@ -0,0 +1,316 @@ + 'AIMMS3', + 'COMMENT_SINGLE' => array(1 => '!'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'HARDQUOTE' => array("'", "'"), + 'HARDESCAPE' => array("'", "\\"), + 'HARDCHAR' => "\\", + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'OBJECT_SPLITTERS' => array(), + 'REGEXPS' => array(), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array(), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'if', 'then', 'else', 'endif', 'elseif', 'for', 'do', 'while' , 'endfor' , 'endwhile', 'break', 'switch', 'endswitch', + 'display', 'return', 'in', 'apply' + + ), + 2 => array( + 'main model' , 'declaration section', 'procedure', 'endprocedure', 'endmodel', 'endsection' , 'set', 'parameter', + 'string parameter', 'element parameter', 'quantity' + ), + 3 => array( + 'identifier', 'index', 'index domain', 'body' + ), + 4 => array( + 'ActiveCard','Card','ConvertUnit','DistributionCumulative','DistributionDensity','DistributionDeviation', + 'DistributionInverseCumulative','DistributionInverseDensity','DistributionKurtosis','DistributionMean', + 'DistributionSkewness','DistributionVariance','Element','EvaluateUnit','First','FormatString','Last', + 'Ord','Unit','Val','Aggregate','AttributeToString','CaseCompareIdentifier','CaseCreateDifferenceFile', + 'CloseDataSource','CreateTimeTable','ConstraintVariables','ConvertReferenceDate','CloneElement', + 'FindNthString','FindReplaceNthString','FindReplaceStrings','FindString','StringOccurrences', + 'CurrentToMoment','CurrentToString','CurrentToTimeSlot','DaylightsavingEndDate','DaylightsavingStartDate', + 'DeclaredSubset','DomainIndex','IndexRange','IsRunningAsViewer','ListingFileCopy','ListingFileDelete', + 'DirectoryGetFiles','DirectoryGetSubdirectories','DirectSQL','Disaggregate','ElementCast','ElementRange', + 'EnvironmentGetString','EnvironmentSetString','errh::Adapt','errh::Attribute','errh::Category', + 'errh::Code','errh::Column','errh::CreationTime','errh::Filename','errh::InsideCategory', + 'errh::IsMarkedAsHandled','errh::Line','errh::MarkAsHandled','errh::Message','errh::Multiplicity', + 'errh::Node','errh::NumberOfLocations','errh::Severity','ExcelAddNewSheet','ExcelAssignParameter', + 'ExcelAssignSet','ExcelAssignTable','ExcelAssignValue','ExcelClearRange','ExcelCloseWorkbook', + 'ExcelColumnName','ExcelColumnNumber','ExcelCopyRange','ExcelCreateWorkbook','ExcelDeleteSheet', + 'ExcelPrint','ExcelRetrieveParameter','ExcelRetrieveSet','ExcelRetrieveTable','ExcelRetrieveValue', + 'ExcelRunMacro','ExcelSaveWorkbook','ExcelSetActiveSheet','ExcelSetUpdateLinksBehavior', + 'ExcelSetVisibility','FindUsedElements','GenerateCUT','GMP::Coefficient::Get', + 'GMP::Coefficient::GetQuadratic','GMP::Coefficient::Set','GMP::Coefficient::SetQuadratic', + 'GMP::Column::Add','GMP::Column::Delete','GMP::Column::Freeze','GMP::Column::GetLowerbound', + 'GMP::Column::GetScale','GMP::Column::GetStatus','GMP::Column::GetType','GMP::Column::GetUpperbound', + 'GMP::Column::SetAsObjective','GMP::Column::SetLowerbound','GMP::Column::SetType', + 'GMP::Column::SetUpperbound','GMP::Column::Unfreeze','GMP::Instance::AddIntegerEliminationRows', + 'GMP::Instance::CalculateSubGradient','GMP::Instance::Copy','GMP::Instance::CreateDual', + 'GMP::Instance::CreateMasterMip','GMP::Instance::CreatePresolved', + 'GMP::SolverSession::CreateProgressCategory','GMP::Instance::CreateProgressCategory', + 'GMP::Instance::CreateSolverSession','GMP::Stochastic::CreateBendersRootproblem', + 'GMP::Instance::Delete','GMP::Instance::DeleteIntegerEliminationRows', + 'GMP::Instance::DeleteSolverSession','GMP::Instance::FindApproximatelyFeasibleSolution', + 'GMP::Instance::FixColumns','GMP::Instance::Generate','GMP::Instance::GenerateRobustCounterpart', + 'GMP::Instance::GenerateStochasticProgram','GMP::SolverSession::GetCallbackInterruptStatus', + 'GMP::SolverSession::WaitForCompletion','GMP::SolverSession::WaitForSingleCompletion', + 'GMP::SolverSession::ExecutionStatus','GMP::Instance::GetDirection','GMP::Instance::GetLinearObjective', + 'GMP::Instance::GetMathematicalProgrammingType','GMP::Instance::GetMemoryUsed', + 'GMP::Instance::GetNumberOfColumns','GMP::Instance::GetNumberOfIndicatorRows', + 'GMP::Instance::GetNumberOfIntegerColumns','GMP::Instance::GetNumberOfNonlinearColumns', + 'GMP::Instance::GetNumberOfNonlinearNonzeros','GMP::Instance::GetNumberOfNonlinearRows', + 'GMP::Instance::GetNumberOfNonzeros','GMP::Instance::GetNumberOfRows', + 'GMP::Instance::GetNumberOfSOS1Rows','GMP::Instance::GetNumberOfSOS2Rows', + 'GMP::Instance::GetObjective','GMP::Instance::GetOptionValue','GMP::Instance::GetSolver', + 'GMP::Instance::GetSymbolicMathematicalProgram','GMP::Instance::MemoryStatistics', + 'GMP::Instance::Rename','GMP::Instance::SetCallbackAddCut','GMP::Instance::SetCallbackBranch', + 'GMP::Instance::SetCallbackHeuristic','GMP::Instance::SetCallbackIncumbent', + 'GMP::Instance::SetCallbackIterations','GMP::Instance::SetCallbackNewIncumbent', + 'GMP::Instance::SetCallbackStatusChange','GMP::Instance::SetCutoff','GMP::Instance::SetDirection', + 'GMP::Instance::SetMathematicalProgrammingType','GMP::Instance::SetSolver','GMP::Instance::Solve', + 'GMP::Stochastic::GetObjectiveBound','GMP::Stochastic::GetRelativeWeight', + 'GMP::Stochastic::GetRepresentativeScenario','GMP::Stochastic::UpdateBendersSubproblem', + 'GMP::Linearization::Add','GMP::Linearization::AddSingle','GMP::Linearization::Delete', + 'GMP::Linearization::GetDeviation','GMP::Linearization::GetDeviationBound', + 'GMP::Linearization::GetLagrangeMultiplier','GMP::Linearization::GetType', + 'GMP::Linearization::GetWeight','GMP::Linearization::RemoveDeviation', + 'GMP::Linearization::SetDeviationBound','GMP::Linearization::SetType', + 'GMP::Linearization::SetWeight','GMP::ProgressWindow::DeleteCategory', + 'GMP::ProgressWindow::DisplayLine','GMP::ProgressWindow::DisplayProgramStatus', + 'GMP::ProgressWindow::DisplaySolver','GMP::ProgressWindow::DisplaySolverStatus', + 'GMP::ProgressWindow::FreezeLine','GMP::ProgressWindow::UnfreezeLine', + 'GMP::QuadraticCoefficient::Get','GMP::QuadraticCoefficient::Set','GMP::Row::Activate', + 'GMP::Stochastic::AddBendersFeasibilityCut','GMP::Stochastic::AddBendersOptimalityCut', + 'GMP::Stochastic::BendersFindFeasibilityReference','GMP::Stochastic::MergeSolution', + 'GMP::Row::Add','GMP::Row::Deactivate','GMP::Row::Delete','GMP::Row::DeleteIndicatorCondition', + 'GMP::Row::Generate','GMP::Row::GetConvex','GMP::Row::GetIndicatorColumn', + 'GMP::Row::GetIndicatorCondition','GMP::Row::GetLeftHandSide','GMP::Row::GetRelaxationOnly', + 'GMP::Row::GetRightHandSide','GMP::Row::GetScale','GMP::Row::GetStatus','GMP::Row::GetType', + 'GMP::Row::SetConvex','GMP::Row::SetIndicatorCondition','GMP::Row::SetLeftHandSide', + 'GMP::Row::SetRelaxationOnly','GMP::Row::SetRightHandSide','GMP::Row::SetType', + 'GMP::Solution::Check','GMP::Solution::Copy','GMP::Solution::Count','GMP::Solution::Delete', + 'GMP::Solution::DeleteAll','GMP::Solution::GetColumnValue','GMP::Solution::GetCPUSecondsUsed', + 'GMP::Solution::GetDistance','GMP::Solution::GetFirstOrderDerivative', + 'GMP::Solution::GetIterationsUsed','GMP::Solution::GetNodesUsed','GMP::Solution::GetLinearObjective', + 'GMP::Solution::GetMemoryUsed','GMP::Solution::GetObjective','GMP::Solution::GetPenalizedObjective', + 'GMP::Solution::GetProgramStatus','GMP::Solution::GetRowValue','GMP::Solution::GetSolutionsSet', + 'GMP::Solution::GetSolverStatus','GMP::Solution::IsDualDegenerated','GMP::Solution::IsInteger', + 'GMP::Solution::IsPrimalDegenerated','GMP::Solution::SetMIPStartFlag','GMP::Solution::Move', + 'GMP::Solution::RandomlyGenerate','GMP::Solution::RetrieveFromModel', + 'GMP::Solution::RetrieveFromSolverSession','GMP::Solution::SendToModel', + 'GMP::Solution::SendToModelSelection','GMP::Solution::SendToSolverSession', + 'GMP::Solution::SetIterationCount','GMP::Solution::SetProgramStatus','GMP::Solution::SetSolverStatus', + 'GMP::Solution::UpdatePenaltyWeights','GMP::Solution::ConstructMean', + 'GMP::SolverSession::AsynchronousExecute','GMP::SolverSession::Execute', + 'GMP::SolverSession::Interrupt','GMP::SolverSession::AddLinearization', + 'GMP::SolverSession::GenerateBranchLowerBound','GMP::SolverSession::GenerateBranchUpperBound', + 'GMP::SolverSession::GenerateBranchRow','GMP::SolverSession::GenerateCut', + 'GMP::SolverSession::GenerateBinaryEliminationRow','GMP::SolverSession::GetCPUSecondsUsed', + 'GMP::SolverSession::GetHost','GMP::SolverSession::GetInstance', + 'GMP::SolverSession::GetIterationsUsed','GMP::SolverSession::GetNodesLeft', + 'GMP::SolverSession::GetNodesUsed','GMP::SolverSession::GetNodeNumber', + 'GMP::SolverSession::GetNodeObjective','GMP::SolverSession::GetNumberOfBranchNodes', + 'GMP::SolverSession::GetLinearObjective','GMP::SolverSession::GetMemoryUsed', + 'GMP::SolverSession::GetObjective','GMP::SolverSession::GetOptionValue', + 'GMP::SolverSession::GetProgramStatus','GMP::SolverSession::GetSolver', + 'GMP::SolverSession::GetSolverStatus','GMP::SolverSession::RejectIncumbent', + 'GMP::Event::Create','GMP::Event::Delete','GMP::Event::Reset','GMP::Event::Set', + 'GMP::SolverSession::SetObjective','GMP::SolverSession::SetOptionValue', + 'GMP::Instance::SetCPUSecondsLimit','GMP::Instance::SetIterationLimit', + 'GMP::Instance::SetMemoryLimit','GMP::Instance::SetOptionValue','GMP::Tuning::SolveSingleMPS', + 'GMP::Tuning::TuneMultipleMPS','GMP::Tuning::TuneSingleGMP', + 'GMP::Solver::GetAsynchronousSessionsLimit','GMP::Robust::EvaluateAdjustableVariables', + 'GenerateXML','GetDatasourceProperty','ReadGeneratedXML','ReadXML','ReferencedIdentifiers', + 'WriteXML','IdentifierAttributes','IdentifierDimension','IsRuntimeIdentifier','IdentifierMemory', + 'IdentifierMemoryStatistics','IdentifierText','IdentifierType','IdentifierUnit','ScalarValue', + 'SectionIdentifiers','SubRange','MemoryInUse','CommitTransaction','RollbackTransaction', + 'MemoryStatistics','me::AllowedAttribute','me::ChangeType','me::ChangeTypeAllowed','me::Children', + 'me::ChildTypeAllowed','me::Compile','me::Create','me::CreateLibrary','me::Delete','me::ExportNode', + 'me::GetAttribute','me::ImportLibrary','me::ImportNode','me::IsRunnable','me::Move','me::Parent', + 'me::Rename','me::SetAttribute','MomentToString','MomentToTimeSlot','OptionGetValue', + 'OptionGetKeywords','OptionGetString','OptionSetString','OptionSetValue','PeriodToString', + 'ProfilerContinue','ProfilerPause','ProfilerRestart','RestoreInactiveElements', + 'RetrieveCurrentVariableValues','SetAddRecursive','SetElementAdd','SetElementRename', + 'SQLColumnData','SQLCreateConnectionString','SQLDriverName','SQLNumberOfColumns', + 'SQLNumberOfDrivers','SQLNumberOfTables','SQLNumberOfViews','SQLTableName','SQLViewName', + 'StartTransaction','StringToElement','StringToMoment','StringToTimeSlot','TestDatabaseColumn', + 'TestDatabaseTable','TestDataSource','TestDate','TimeslotCharacteristic','TimeslotToMoment', + 'TimeslotToString','TimeZoneOffset','VariableConstraints','PageOpen','PageOpenSingle','PageClose', + 'PageGetActive','PageSetFocus','PageGetFocus','PageSetCursor','PageRefreshAll','PageGetChild', + 'PageGetParent','PageGetNext','PageGetPrevious','PageGetNextInTreeWalk','PageGetUsedIdentifiers', + 'PageGetTitle','PageGetAll','PageCopyTableToClipboard','PageCopyTableToExcel','PrintPage', + 'PrintPageCount','PrintStartReport','PrintEndReport','PivotTableReloadState','PivotTableSaveState', + 'PivotTableDeleteState','FileSelect','FileSelectNew','FileDelete','FileExists','FileCopy', + 'FileMove','FileView','FileEdit','FilePrint','FileTime','FileTouch','FileAppend','FileGetSize', + 'DirectorySelect','DirectoryCreate','DirectoryDelete','DirectoryExists','DirectoryCopy', + 'DirectoryMove','DirectoryGetCurrent','DialogProgress','DialogMessage','DialogError', + 'StatusMessage','DialogAsk','DialogGetString','DialogGetDate','DialogGetNumber','DialogGetElement', + 'DialogGetElementByText','DialogGetElementByData','DialogGetPassword','DialogGetColor','CaseNew', + 'CaseFind','CaseCreate','CaseLoadCurrent','CaseMerge','CaseLoadIntoCurrent','CaseSelect', + 'CaseSelectNew','CaseSetCurrent','CaseSave','CaseSaveAll','CaseSaveAs','CaseSelectMultiple', + 'CaseGetChangedStatus','CaseSetChangedStatus','CaseDelete','CaseGetType','CaseGetDatasetReference', + 'CaseWriteToSingleFile','CaseReadFromSingleFile','DatasetNew','DatasetFind','DatasetCreate', + 'DatasetLoadCurrent','DatasetMerge','DatasetLoadIntoCurrent','DatasetSelect','DatasetSelectNew', + 'DatasetSetCurrent','DatasetSave','DatasetSaveAll','DatasetSaveAs','DatasetGetChangedStatus', + 'DatasetSetChangedStatus','DatasetDelete','DatasetGetCategory','DataFileGetName', + 'DataFileGetAcronym','DataFileSetAcronym','DataFileGetComment','DataFileSetComment', + 'DataFileGetPath','DataFileGetTime','DataFileGetOwner','DataFileGetGroup','DataFileReadPermitted', + 'DataFileWritePermitted','DataFileExists','DataFileCopy','DataCategoryContents','CaseTypeContents', + 'CaseTypeCategories','Execute','OpenDocument','TestInternetConnection','GeoFindCoordinates', + 'ShowHelpTopic','Delay','ScheduleAt','ExitAimms','SessionArgument','SessionHasVisibleGUI', + 'ProjectDeveloperMode','DebuggerBreakpoint','ShowProgressWindow','ShowMessageWindow', + 'SolverGetControl','SolverReleaseControl','ProfilerStart','DataManagerImport','DataManagerExport', + 'DataManagerFileNew','DataManagerFileOpen','DataManagerFileGetCurrent','DataImport220', + 'SecurityGetUsers','SecurityGetGroups','UserColorAdd','UserColorDelete','UserColorGetRGB', + 'UserColorModify','LicenseNumber','LicenseType','LicenseStartDate','LicenseExpirationDate', + 'LicenseMaintenanceExpirationDate','VARLicenseExpirationDate','AimmsRevisionString', + 'VARLicenseCreate','HistogramCreate','HistogramDelete','HistogramSetDomain', + 'HistogramAddObservation','HistogramGetFrequencies','HistogramGetBounds', + 'HistogramGetObservationCount','HistogramGetAverage','HistogramGetDeviation', + 'HistogramGetSkewness','HistogramGetKurtosis','DateDifferenceDays','DateDifferenceYearFraction', + 'PriceFractional','PriceDecimal','RateEffective','RateNominal','DepreciationLinearLife', + 'DepreciationLinearRate','DepreciationNonLinearSumOfYear','DepreciationNonLinearLife', + 'DepreciationNonLinearFactor','DepreciationNonLinearRate','DepreciationSum', + 'InvestmentConstantPresentValue','InvestmentConstantFutureValue', + 'InvestmentConstantPeriodicPayment','InvestmentConstantInterestPayment', + 'InvestmentConstantPrincipalPayment','InvestmentConstantCumulativePrincipalPayment', + 'InvestmentConstantCumulativeInterestPayment','InvestmentConstantNumberPeriods', + 'InvestmentConstantRateAll','InvestmentConstantRate','InvestmentVariablePresentValue', + 'InvestmentVariablePresentValueInperiodic','InvestmentSingleFutureValue', + 'InvestmentVariableInternalRateReturnAll','InvestmentVariableInternalRateReturn', + 'InvestmentVariableInternalRateReturnInperiodicAll','InvestmentVariableInternalRateReturnInperiodic', + 'InvestmentVariableInternalRateReturnModified','SecurityDiscountedPrice', + 'SecurityDiscountedRedemption','SecurityDiscountedYield','SecurityDiscountedRate', + 'TreasuryBillPrice','TreasuryBillYield','TreasuryBillBondEquivalent','SecurityMaturityPrice', + 'SecurityMaturityCouponRate','SecurityMaturityYield','SecurityMaturityAccruedInterest', + 'SecurityCouponNumber','SecurityCouponPreviousDate','SecurityCouponNextDate','SecurityCouponDays', + 'SecurityCouponDaysPreSettlement','SecurityCouponDaysPostSettlement','SecurityPeriodicPrice', + 'SecurityPeriodicRedemption','SecurityPeriodicCouponRate','SecurityPeriodicYieldAll', + 'SecurityPeriodicYield','SecurityPeriodicAccruedInterest','SecurityPeriodicDuration', + 'SecurityPeriodicDurationModified','Abs','AtomicUnit','Ceil','Character','CharacterNumber','Cube', + 'Degrees','Div','Exp','FileRead','Floor','Log','Log10','Mapval','Max','Min','Mod','Power', + 'Radians','Round','Sign','Sqr','Sqrt','StringCapitalize','StringLength','StringToLower', + 'StringToUnit','StringToUpper','SubString','Trunc','Binomial','NegativeBinomial','Poisson', + 'Geometric','HyperGeometric','Uniform','Normal','LogNormal','Triangular','Exponential','Weibull', + 'Beta','Gamma','Logistic','Pareto','ExtremeValue','Precision','Factorial','Combination', + 'Permutation','Errorf','Cos','Sin','Tan','ArcCos','ArcSin','ArcTan','Cosh','Sinh','Tanh', + 'ArcCosh','ArcSinh','ArcTanh' + ) + ), + 'SYMBOLS' => array( + 0 => array( + '(', ')', '[', ']', '{', '}', + '%', '&', '|', '/', + '<', '>', '>=' , '<=', ':=', + '=', '-', '+', '*', + '.', ',' + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000FF;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #404040;', + 4 => 'color: #990000; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #808080; font-style: italic ', + 'HARD' => 'color: #808080; font-style: italic' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;', + GESHI_NUMBER_OCT_PREFIX => 'color: #208080;', + GESHI_NUMBER_HEX_PREFIX => 'color: #208080;', + GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;', + ), + 'COMMENTS' => array( + 1 => 'color: #008000; font-style: italic;', + 'MULTI' => 'color: #008000; font-style: italic;' + ), + + 'METHODS' => array( + 1 => 'color: #004000;', + 2 => 'color: #004000;' + ), + 'SYMBOLS' => array( + 0 => 'color: #339933;', + 1 => 'color: #000000; font-weight: bold;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '' + ), + 'ESCAPE_CHAR' => array() + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => false, + 'TAB_WIDTH' => 4 +); diff --git a/vendor/easybook/geshi/geshi/algol68.php b/vendor/easybook/geshi/geshi/algol68.php new file mode 100644 index 0000000000..7383aaeaa1 --- /dev/null +++ b/vendor/easybook/geshi/geshi/algol68.php @@ -0,0 +1,328 @@ + $prebits.$LONGS."(?:".$bl.")".$postbits, + "INT" => $preint.$LONGS."(?:".$il.")".$postint, + "REAL" => $prereal.$LONGS."(?:".$rl.")".$postreal, + + "BOLD" => 'color: #b1b100; font-weight: bold;', + "ITALIC" => 'color: #b1b100;', # procedures traditionally italic # + "NONSTD" => 'color: #FF0000; font-weight: bold;', # RED # + "COMMENT" => 'color: #666666; font-style: italic;' + ); + } +} +$a68=geshi_langfile_algol68_vars(); + +$language_data = array( + 'LANG_NAME' => 'ALGOL 68', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array( + '¢' => '¢', + '£' => '£', + '#' => '#', + ), + 'COMMENT_REGEXP' => array( + 1 => '/\bCO((?:MMENT)?)\b.*?\bCO\\1\b/i', + 2 => '/\bPR((?:AGMAT)?)\b.*?\bPR\\1\b/i', + 3 => '/\bQUOTE\b.*?\bQUOTE\b/i' + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '"', + 'NUMBERS' => GESHI_NUMBER_HEX_SUFFIX, # Warning: Feature!! # +# GESHI_NUMBER_HEX_SUFFIX, # Attempt ignore default # + 'KEYWORDS' => array( +# Extensions + 1 => array('KEEP', 'FINISH', 'USE', 'SYSPROCS', 'IOSTATE', 'USING', 'ENVIRON', 'PROGRAM', 'CONTEXT'), +# 2 => array('CASE', 'IN', 'OUSE', 'IN', 'OUT', 'ESAC', '(', '|', '|:', ')', 'FOR', 'FROM', 'TO', 'BY', 'WHILE', 'DO', 'OD', 'IF', 'THEN', 'ELIF', 'THEN', 'ELSE', 'FI', 'PAR', 'BEGIN', 'EXIT', 'END', 'GO', 'GOTO', 'FORALL', 'UPTO', 'DOWNTO', 'FOREACH', 'ASSERT'), # + 2 => array('CASE', 'IN', 'OUSE', /* 'IN',*/ 'OUT', 'ESAC', 'PAR', 'BEGIN', 'EXIT', 'END', 'GO TO', 'GOTO', 'FOR', 'FROM', 'TO', 'BY', 'WHILE', 'DO', 'OD', 'IF', 'THEN', 'ELIF', /* 'THEN',*/ 'ELSE', 'FI' ), + 3 => array('BITS', 'BOOL', 'BYTES', 'CHAR', 'COMPL', 'INT', 'REAL', 'SEMA', 'STRING', 'VOID'), + 4 => array('MODE', 'OP', 'PRIO', 'PROC', 'FLEX', 'HEAP', 'LOC', 'REF', 'LONG', 'SHORT', 'EITHER'), +# Extensions or deprecated keywords +# 'PIPE': keyword somehow interferes with the internal operation of GeSHi + 5 => array('FORALL', 'UPTO', 'DOWNTO', 'FOREACH', 'ASSERT', 'CTB', 'CT', 'CTAB', 'COMPLEX', 'VECTOR', 'SOUND' /*, 'PIPE'*/), + 6 => array('CHANNEL', 'FILE', 'FORMAT', 'STRUCT', 'UNION', 'OF'), +# '(', '|', '|:', ')', # +# 7 => array('OF', 'AT', '@', 'IS', ':=:', 'ISNT', ':/=:', ':≠:', 'CTB', 'CT', '::', 'CTAB', '::=', 'TRUE', 'FALSE', 'EMPTY', 'NIL', 'â—‹', 'SKIP', '~'), + 7 => array('AT', 'IS', 'ISNT', 'TRUE', 'FALSE', 'EMPTY', 'NIL', 'SKIP'), + 8 => array('NOT', 'UP', 'DOWN', 'LWB', 'UPB', /* '-',*/ 'ABS', 'ARG', 'BIN', 'ENTIER', 'LENG', 'LEVEL', 'ODD', 'REPR', 'ROUND', 'SHORTEN', 'CONJ', 'SIGN'), +# OPERATORS ordered roughtly by PRIORITY # +# 9 => array('¬', '↑', '↓', '⌊', '⌈', '~', '⎩', '⎧'), +# 10 => array('+*', 'I', '+×', '⊥', '!', 'â¨'), + 10 => array('I'), +# 11 => array('SHL', 'SHR', '**', 'UP', 'DOWN', 'LWB', 'UPB', '↑', '↓', '⌊', '⌈', '⎩', '⎧'), + 11 => array('SHL', 'SHR', /*'UP', 'DOWN', 'LWB', 'UPB'*/), +# 12 => array('*', '/', '%', 'OVER', '%*', 'MOD', 'ELEM', '×', '÷', '÷×', '÷*', '%×', 'â–¡', '÷:'), + 12 => array('OVER', 'MOD', 'ELEM'), +# 13 => array('-', '+'), +# 14 => array('<', 'LT', '<=', 'LE', '>=', 'GE', '>', 'GT', '≤', '≥'), + 14 => array('LT', 'LE', 'GE', 'GT'), +# 15 => array('=', 'EQ', '/=', 'NE', '≠', '~='), + 15 => array('EQ', 'NE'), +# 16 => array('&', 'AND', '∧', 'OR', '∨', '/\\', '\\/'), + 16 => array('AND', 'OR'), + 17 => array('MINUSAB', 'PLUSAB', 'TIMESAB', 'DIVAB', 'OVERAB', 'MODAB', 'PLUSTO'), +# 18 => array('-:=', '+:=', '*:=', '/:=', '%:=', '%*:=', '+=:', '×:=', '÷:=', '÷×:=', '÷*:=', '%×:=', '÷::=', 'MINUS', 'PLUS', 'DIV', 'MOD', 'PRUS'), +# Extensions or deprecated keywords + 18 => array('MINUS', 'PLUS', 'DIV', /* 'MOD',*/ 'PRUS', 'IS NOT'), +# Extensions or deprecated keywords + 19 => array('THEF', 'ANDF', 'ORF', 'ANDTH', 'OREL', 'ANDTHEN', 'ORELSE'), +# Built in procedures - from standard prelude # + 20 => array('int lengths', 'intlengths', 'int shorths', 'intshorths', 'max int', 'maxint', 'real lengths', 'reallengths', 'real shorths', 'realshorths', 'bits lengths', 'bitslengths', 'bits shorths', 'bitsshorths', 'bytes lengths', 'byteslengths', 'bytes shorths', 'bytesshorths', 'max abs char', 'maxabschar', 'int width', 'intwidth', 'long int width', 'longintwidth', 'long long int width', 'longlongintwidth', 'real width', 'realwidth', 'long real width', 'longrealwidth', 'long long real width', 'longlongrealwidth', 'exp width', 'expwidth', 'long exp width', 'longexpwidth', 'long long exp width', 'longlongexpwidth', 'bits width', 'bitswidth', 'long bits width', 'longbitswidth', 'long long bits width', 'longlongbitswidth', 'bytes width', 'byteswidth', 'long bytes width', 'longbyteswidth', 'max real', 'maxreal', 'small real', 'smallreal', 'long max int', 'longmaxint', 'long long max int', 'longlongmaxint', 'long max real', 'longmaxreal', 'long small real', 'longsmallreal', 'long long max real', 'longlongmaxreal', 'long long small real', 'longlongsmallreal', 'long max bits', 'longmaxbits', 'long long max bits', 'longlongmaxbits', 'null character', 'nullcharacter', 'blank', 'flip', 'flop', 'error char', 'errorchar', 'exp char', 'expchar', 'newline char', 'newlinechar', 'formfeed char', 'formfeedchar', 'tab char', 'tabchar'), + 21 => array('stand in channel', 'standinchannel', 'stand out channel', 'standoutchannel', 'stand back channel', 'standbackchannel', 'stand draw channel', 'standdrawchannel', 'stand error channel', 'standerrorchannel'), + 22 => array('put possible', 'putpossible', 'get possible', 'getpossible', 'bin possible', 'binpossible', 'set possible', 'setpossible', 'reset possible', 'resetpossible', 'reidf possible', 'reidfpossible', 'draw possible', 'drawpossible', 'compressible', 'on logical file end', 'onlogicalfileend', 'on physical file end', 'onphysicalfileend', 'on line end', 'onlineend', 'on page end', 'onpageend', 'on format end', 'onformatend', 'on value error', 'onvalueerror', 'on open error', 'onopenerror', 'on transput error', 'ontransputerror', 'on format error', 'onformaterror', 'open', 'establish', 'create', 'associate', 'close', 'lock', 'scratch', 'space', 'new line', 'newline', 'print', 'write f', 'writef', 'print f', 'printf', 'write bin', 'writebin', 'print bin', 'printbin', 'read f', 'readf', 'read bin', 'readbin', 'put f', 'putf', 'get f', 'getf', 'make term', 'maketerm', 'make device', 'makedevice', 'idf', 'term', 'read int', 'readint', 'read long int', 'readlongint', 'read long long int', 'readlonglongint', 'read real', 'readreal', 'read long real', 'readlongreal', 'read long long real', 'readlonglongreal', 'read complex', 'readcomplex', 'read long complex', 'readlongcomplex', 'read long long complex', 'readlonglongcomplex', 'read bool', 'readbool', 'read bits', 'readbits', 'read long bits', 'readlongbits', 'read long long bits', 'readlonglongbits', 'read char', 'readchar', 'read string', 'readstring', 'print int', 'printint', 'print long int', 'printlongint', 'print long long int', 'printlonglongint', 'print real', 'printreal', 'print long real', 'printlongreal', 'print long long real', 'printlonglongreal', 'print complex', 'printcomplex', 'print long complex', 'printlongcomplex', 'print long long complex', 'printlonglongcomplex', 'print bool', 'printbool', 'print bits', 'printbits', 'print long bits', 'printlongbits', 'print long long bits', 'printlonglongbits', 'print char', 'printchar', 'print string', 'printstring', 'whole', 'fixed', 'float'), + 23 => array('pi', 'long pi', 'longpi', 'long long pi', 'longlongpi'), + 24 => array('sqrt', 'curt', 'cbrt', 'exp', 'ln', 'log', 'sin', 'arc sin', 'arcsin', 'cos', 'arc cos', 'arccos', 'tan', 'arc tan', 'arctan', 'long sqrt', 'longsqrt', 'long curt', 'longcurt', 'long cbrt', 'longcbrt', 'long exp', 'longexp', 'long ln', 'longln', 'long log', 'longlog', 'long sin', 'longsin', 'long arc sin', 'longarcsin', 'long cos', 'longcos', 'long arc cos', 'longarccos', 'long tan', 'longtan', 'long arc tan', 'longarctan', 'long long sqrt', 'longlongsqrt', 'long long curt', 'longlongcurt', 'long long cbrt', 'longlongcbrt', 'long long exp', 'longlongexp', 'long long ln', 'longlongln', 'long long log', 'longlonglog', 'long long sin', 'longlongsin', 'long long arc sin', 'longlongarcsin', 'long long cos', 'longlongcos', 'long long arc cos', 'longlongarccos', 'long long tan', 'longlongtan', 'long long arc tan', 'longlongarctan'), + 25 => array('first random', 'firstrandom', 'next random', 'nextrandom', 'long next random', 'longnextrandom', 'long long next random', 'longlongnextrandom'), + 26 => array('real', 'bits pack', 'bitspack', 'long bits pack', 'longbitspack', 'long long bits pack', 'longlongbitspack', 'bytes pack', 'bytespack', 'long bytes pack', 'longbytespack', 'char in string', 'charinstring', 'last char in string', 'lastcharinstring', 'string in string', 'stringinstring'), + 27 => array('utc time', 'utctime', 'local time', 'localtime', 'argc', 'argv', 'get env', 'getenv', 'reset errno', 'reseterrno', 'errno', 'strerror'), + 28 => array('sinh', 'long sinh', 'longsinh', 'long long sinh', 'longlongsinh', 'arc sinh', 'arcsinh', 'long arc sinh', 'longarcsinh', 'long long arc sinh', 'longlongarcsinh', 'cosh', 'long cosh', 'longcosh', 'long long cosh', 'longlongcosh', 'arc cosh', 'arccosh', 'long arc cosh', 'longarccosh', 'long long arc cosh', 'longlongarccosh', 'tanh', 'long tanh', 'longtanh', 'long long tanh', 'longlongtanh', 'arc tanh', 'arctanh', 'long arc tanh', 'longarctanh', 'long long arc tanh', 'longlongarctanh', 'arc tan2', 'arctan2', 'long arc tan2', 'longarctan2', 'long long arc tan2', 'longlongarctan2'), + 29 => array('complex sqrt', 'complexsqrt', 'long complex sqrt', 'longcomplexsqrt', 'long long complex sqrt', 'longlongcomplexsqrt', 'complex exp', 'complexexp', 'long complex exp', 'longcomplexexp', 'long long complex exp', 'longlongcomplexexp', 'complex ln', 'complexln', 'long complex ln', 'longcomplexln', 'long long complex ln', 'longlongcomplexln', 'complex sin', 'complexsin', 'long complex sin', 'longcomplexsin', 'long long complex sin', 'longlongcomplexsin', 'complex arc sin', 'complexarcsin', 'long complex arc sin', 'longcomplexarcsin', 'long long complex arc sin', 'longlongcomplexarcsin', 'complex cos', 'complexcos', 'long complex cos', 'longcomplexcos', 'long long complex cos', 'longlongcomplexcos', 'complex arc cos', 'complexarccos', 'long complex arc cos', 'longcomplexarccos', 'long long complex arc cos', 'longlongcomplexarccos', 'complex tan', 'complextan', 'long complex tan', 'longcomplextan', 'long long complex tan', 'longlongcomplextan', 'complex arc tan', 'complexarctan', 'long complex arc tan', 'longcomplexarctan', 'long long complex arc tan', 'longlongcomplexarctan', 'complex sinh', 'complexsinh', 'complex arc sinh', 'complexarcsinh', 'complex cosh', 'complexcosh', 'complex arc cosh', 'complexarccosh', 'complex tanh', 'complextanh', 'complex arc tanh', 'complexarctanh') + ), + 'SYMBOLS' => array( + 1 => array( /* reverse length sorted... */ '÷×:=', '%×:=', ':≠:', '÷*:=', '÷::=', '%*:=', ':/=:', '×:=', '÷:=', '÷×', '%:=', '%×', '*:=', '+:=', '+=:', '+×', '-:=', '/:=', '::=', ':=:', '÷*', '÷:', '↑', '↓', '∧', '∨', '≠', '≤', '≥', '⊥', '⌈', '⌊', '⎧', '⎩', /* 'â¨', */ 'â–¡', 'â—‹', '%*', '**', '+*', '/=', '::', '/\\', '\\/', '<=', '>=', '|:', '~=', '¬', '×', '÷', '!', '%', '&', '(', ')', '*', '+', ',', '-', '/', ':', ';', '<', '=', '>', '?', '@', '[', ']', '^', '{', '|', '}', '~') + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true, +# 9 => true, + 10 => true, + 11 => true, + 12 => true, +# 13 => true, + 14 => true, + 15 => true, + 16 => true, + 17 => true, + 18 => true, + 19 => true, + 20 => true, + 21 => true, + 22 => true, + 23 => true, + 24 => true, + 25 => true, + 26 => true, + 27 => true, + 28 => true, + 29 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => $a68['NONSTD'], 2 => $a68['BOLD'], 3 => $a68['BOLD'], 4 => $a68['BOLD'], + 5 => $a68['NONSTD'], 6 => $a68['BOLD'], 7 => $a68['BOLD'], 8 => $a68['BOLD'], + /* 9 => $a68['BOLD'],*/ 10 => $a68['BOLD'], 11 => $a68['BOLD'], 12 => $a68['BOLD'], + /* 13 => $a68['BOLD'],*/ 14 => $a68['BOLD'], 15 => $a68['BOLD'], 16 => $a68['BOLD'], 17 => $a68['BOLD'], + 18 => $a68['NONSTD'], 19 => $a68['NONSTD'], + 20 => $a68['ITALIC'], 21 => $a68['ITALIC'], 22 => $a68['ITALIC'], 23 => $a68['ITALIC'], + 24 => $a68['ITALIC'], 25 => $a68['ITALIC'], 26 => $a68['ITALIC'], 27 => $a68['ITALIC'], + 28 => $a68['ITALIC'], 29 => $a68['ITALIC'] + ), + 'COMMENTS' => array( + 1 => $a68['COMMENT'], 2 => $a68['COMMENT'], 3 => $a68['COMMENT'], /* 4 => $a68['COMMENT'], + 5 => $a68['COMMENT'],*/ 'MULTI' => $a68['COMMENT'] + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #0000ff;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;', + ), + 'METHODS' => array( + 0 => 'color: #004000;', + 1 => 'color: #004000;' + ), + 'SYMBOLS' => array( + 0 => 'color: #339933;', + 1 => 'color: #339933;' + ), + 'REGEXPS' => array( + 0 => 'color: #cc66cc;', # BITS # + 1 => 'color: #cc66cc;', # REAL # + /* 2 => 'color: #cc66cc;', # INT # */ + ), + 'SCRIPT' => array() + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + 8 => '', +# 9 => '', + 10 => '', + 11 => '', + 12 => '', +# 13 => '', + 14 => '', + 15 => '', + 16 => '', + 17 => '', + 18 => '', + 19 => '', + 20 => '', + 21 => '', + 22 => '', + 23 => '', + 24 => '', + 25 => '', + 26 => '', + 27 => '', + 28 => '', + 29 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 0 => '→', + 1 => 'OF' + ), + 'REGEXPS' => array( + 0 => $a68['BITS'], + 1 => $a68['REAL'] + # 2 => $a68['INT'], # Breaks formatting for some reason # + # 2 => $GESHI_NUMBER_INT_BASIC # Also breaks formatting # + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array() +); + +unset($a68); diff --git a/vendor/easybook/geshi/geshi/apache.php b/vendor/easybook/geshi/geshi/apache.php new file mode 100644 index 0000000000..e54aa23abc --- /dev/null +++ b/vendor/easybook/geshi/geshi/apache.php @@ -0,0 +1,482 @@ + 'Apache configuration', + 'COMMENT_SINGLE' => array(1 => '#'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + /*keywords*/ + 1 => array( + //core.c + 'AcceptFilter','AcceptPathInfo','AccessConfig','AccessFileName', + 'AddDefaultCharset','AddOutputFilterByType','AllowEncodedSlashes', + 'AllowOverride','AuthName','AuthType','ContentDigest', + 'CoreDumpDirectory','DefaultType','DocumentRoot','EnableMMAP', + 'EnableSendfile','ErrorDocument','ErrorLog','FileETag','ForceType', + 'HostnameLookups','Include','LimitInternalRecursion', + 'LimitRequestBody','LimitRequestFields','LimitRequestFieldsize', + 'LimitRequestLine','LimitXMLRequestBody','LogLevel','MaxMemFree', + 'MaxRequestsPerChild','NameVirtualHost','Options','PidFile','Port', + 'Protocol','Require','RLimitCPU','RLimitMEM','RLimitNPROC', + 'Satisfy','ScoreBoardFile','ServerAdmin','ServerAlias','ServerName', + 'ServerPath','ServerRoot','ServerSignature','ServerTokens', + 'SetHandler','SetInputFilter','SetOutputFilter','ThreadStackSize', + 'Timeout','TraceEnable','UseCanonicalName', + 'UseCanonicalPhysicalPort', + + //http_core.c + 'KeepAlive','KeepAliveTimeout','MaxKeepAliveRequests', + + //mod_actions.c + 'Action','Script', + + //mod_alias.c + 'Alias','AliasMatch','Redirect','RedirectMatch','RedirectPermanent', + 'RedirectTemp','ScriptAlias','ScriptAliasMatch', + + //mod_asis.c + + //mod_auth_basic.c + 'AuthBasicAuthoritative','AuthBasicProvider', + + //mod_auth_digest.c + 'AuthDigestAlgorithm','AuthDigestDomain','AuthDigestNcCheck', + 'AuthDigestNonceFormat','AuthDigestNonceLifetime', + 'AuthDigestProvider','AuthDigestQop','AuthDigestShmemSize', + + //mod_authn_alias.c + + //mod_authn_anon.c + 'Anonymous','Anonymous_LogEmail','Anonymous_MustGiveEmail', + 'Anonymous_NoUserId','Anonymous_VerifyEmail', + + //mod_authn_dbd.c + 'AuthDBDUserPWQuery','AuthDBDUserRealmQuery', + + //mod_authn_dbm.c + 'AuthDBMType','AuthDBMUserFile', + + //mod_authn_default.c + 'AuthDefaultAuthoritative', + + //mod_authn_file.c + 'AuthUserFile', + + //mod_authnz_ldap.c + 'AuthLDAPBindDN','AuthLDAPBindPassword','AuthLDAPCharsetConfig', + 'AuthLDAPCompareDNOnServer','AuthLDAPDereferenceAliases', + 'AuthLDAPGroupAttribute','AuthLDAPGroupAttributeIsDN', + 'AuthLDAPRemoteUserAttribute','AuthLDAPRemoteUserIsDN', + 'AuthLDAPURL','AuthzLDAPAuthoritative', + + //mod_authz_dbm.c + 'AuthDBMGroupFile','AuthzDBMAuthoritative','AuthzDBMType', + + //mod_authz_default.c + 'AuthzDefaultAuthoritative', + + //mod_authz_groupfile.c + 'AuthGroupFile','AuthzGroupFileAuthoritative', + + //mod_authz_host.c + 'Allow','Deny','Order', + + //mod_authz_owner.c + 'AuthzOwnerAuthoritative', + + //mod_authz_svn.c + 'AuthzForceUsernameCase','AuthzSVNAccessFile','AuthzSVNAnonymous', + 'AuthzSVNAuthoritative','AuthzSVNNoAuthWhenAnonymousAllowed', + + //mod_authz_user.c + 'AuthzUserAuthoritative', + + //mod_autoindex.c + 'AddAlt','AddAltByEncoding','AddAltByType','AddDescription', + 'AddIcon','AddIconByEncoding','AddIconByType','DefaultIcon', + 'FancyIndexing','HeaderName','IndexHeadInsert','IndexIgnore', + 'IndexOptions','IndexOrderDefault','IndexStyleSheet','ReadmeName', + + //mod_bt.c + 'Tracker','TrackerDetailURL','TrackerFlags','TrackerHashMaxAge', + 'TrackerHashMinAge','TrackerHashWatermark','TrackerHome', + 'TrackerReturnInterval','TrackerReturnMax', + 'TrackerReturnPeerFactor','TrackerReturnPeers','TrackerRootInclude', + 'TrackerStyleSheet', + + //mod_bw.c + 'BandWidth','BandWidthError','BandWidthModule','BandWidthPacket', + 'ForceBandWidthModule','LargeFileLimit','MaxConnection', + 'MinBandWidth', + + //mod_cache.c + 'CacheDefaultExpire','CacheDisable','CacheEnable', + 'CacheIgnoreCacheControl','CacheIgnoreHeaders', + 'CacheIgnoreNoLastMod','CacheIgnoreQueryString', + 'CacheLastModifiedFactor','CacheMaxExpire','CacheStoreNoStore', + 'CacheStorePrivate', + + //mod_cern_meta.c + 'MetaDir','MetaFiles','MetaSuffix', + + //mod_cgi.c + 'ScriptLog','ScriptLogBuffer','ScriptLogLength', + + //mod_charset_lite.c + 'CharsetDefault','CharsetOptions','CharsetSourceEnc', + + //mod_dav.c + 'DAV','DAVDepthInfinity','DAVMinTimeout', + + //mod_dav_fs.c + 'DAVLockDB', + + //mod_dav_lock.c + 'DAVGenericLockDB', + + //mod_dav_svn.c + 'SVNActivitiesDB','SVNAllowBulkUpdates','SVNAutoversioning', + 'SVNIndexXSLT','SVNListParentPath','SVNMasterURI','SVNParentPath', + 'SVNPath','SVNPathAuthz','SVNReposName','SVNSpecialURI', + + //mod_dbd.c + 'DBDExptime','DBDKeep','DBDMax','DBDMin','DBDParams','DBDPersist', + 'DBDPrepareSQL','DBDriver', + + //mod_deflate.c + 'DeflateBufferSize','DeflateCompressionLevel','DeflateFilterNote', + 'DeflateMemLevel','DeflateWindowSize', + + //mod_dir.c + 'DirectoryIndex','DirectorySlash', + + //mod_disk_cache.c + 'CacheDirLength','CacheDirLevels','CacheMaxFileSize', + 'CacheMinFileSize','CacheRoot', + + //mod_dumpio.c + 'DumpIOInput','DumpIOLogLevel','DumpIOOutput', + + //mod_env.c + 'PassEnv','SetEnv','UnsetEnv', + + //mod_expires.c + 'ExpiresActive','ExpiresByType','ExpiresDefault', + + //mod_ext_filter.c + 'ExtFilterDefine','ExtFilterOptions', + + //mod_file_cache.c + 'cachefile','mmapfile', + + //mod_filter.c + 'FilterChain','FilterDeclare','FilterProtocol','FilterProvider', + 'FilterTrace', + + //mod_gnutls.c + 'GnuTLSCache','GnuTLSCacheTimeout','GnuTLSCertificateFile', + 'GnuTLSKeyFile','GnuTLSPGPCertificateFile','GnuTLSPGPKeyFile', + 'GnuTLSClientVerify','GnuTLSClientCAFile','GnuTLSPGPKeyringFile', + 'GnuTLSEnable','GnuTLSDHFile','GnuTLSRSAFile','GnuTLSSRPPasswdFile', + 'GnuTLSSRPPasswdConfFile','GnuTLSPriorities', + 'GnuTLSExportCertificates', + + //mod_headers.c + 'Header','RequestHeader', + + //mod_imagemap.c + 'ImapBase','ImapDefault','ImapMenu', + + //mod_include.c + 'SSIAccessEnable','SSIEndTag','SSIErrorMsg','SSIStartTag', + 'SSITimeFormat','SSIUndefinedEcho','XBitHack', + + //mod_ident.c + 'IdentityCheck','IdentityCheckTimeout', + + //mod_info.c + 'AddModuleInfo', + + //mod_isapi.c + 'ISAPIAppendLogToErrors','ISAPIAppendLogToQuery','ISAPICacheFile', + 'ISAPIFakeAsync','ISAPILogNotSupported','ISAPIReadAheadBuffer', + + //mod_log_config.c + 'BufferedLogs','CookieLog','CustomLog','LogFormat','TransferLog', + + //mod_log_forensic.c + 'ForensicLog', + + //mod_log_rotate.c + 'RotateInterval','RotateLogs','RotateLogsLocalTime', + + //mod_logio.c + + //mod_mem_cache.c + 'MCacheMaxObjectCount','MCacheMaxObjectSize', + 'MCacheMaxStreamingBuffer','MCacheMinObjectSize', + 'MCacheRemovalAlgorithm','MCacheSize', + + //mod_mime.c + 'AddCharset','AddEncoding','AddHandler','AddInputFilter', + 'AddLanguage','AddOutputFilter','AddType','DefaultLanguage', + 'ModMimeUsePathInfo','MultiviewsMatch','RemoveCharset', + 'RemoveEncoding','RemoveHandler','RemoveInputFilter', + 'RemoveLanguage','RemoveOutputFilter','RemoveType','TypesConfig', + + //mod_mime_magic.c + 'MimeMagicFile', + + //mod_negotiation.c + 'CacheNegotiatedDocs','ForceLanguagePriority','LanguagePriority', + + //mod_php5.c + 'php_admin_flag','php_admin_value','php_flag','php_value', + 'PHPINIDir', + + //mod_proxy.c + 'AllowCONNECT','BalancerMember','NoProxy','ProxyBadHeader', + 'ProxyBlock','ProxyDomain','ProxyErrorOverride', + 'ProxyFtpDirCharset','ProxyIOBufferSize','ProxyMaxForwards', + 'ProxyPass','ProxyPassInterpolateEnv','ProxyPassMatch', + 'ProxyPassReverse','ProxyPassReverseCookieDomain', + 'ProxyPassReverseCookiePath','ProxyPreserveHost', + 'ProxyReceiveBufferSize','ProxyRemote','ProxyRemoteMatch', + 'ProxyRequests','ProxySet','ProxyStatus','ProxyTimeout','ProxyVia', + + //mod_proxy_ajp.c + + //mod_proxy_balancer.c + + //mod_proxy_connect.c + + //mod_proxy_ftp.c + + //mod_proxy_http.c + + //mod_rewrite.c + 'RewriteBase','RewriteCond','RewriteEngine','RewriteLock', + 'RewriteLog','RewriteLogLevel','RewriteMap','RewriteOptions', + 'RewriteRule', + + //mod_setenvif.c + 'BrowserMatch','BrowserMatchNoCase','SetEnvIf','SetEnvIfNoCase', + + //mod_so.c + 'LoadFile','LoadModule', + + //mod_speling.c + 'CheckCaseOnly','CheckSpelling', + + //mod_ssl.c + 'SSLCACertificateFile','SSLCACertificatePath','SSLCADNRequestFile', + 'SSLCADNRequestPath','SSLCARevocationFile','SSLCARevocationPath', + 'SSLCertificateChainFile','SSLCertificateFile', + 'SSLCertificateKeyFile','SSLCipherSuite','SSLCryptoDevice', + 'SSLEngine','SSLHonorCipherOrder','SSLMutex','SSLOptions', + 'SSLPassPhraseDialog','SSLProtocol','SSLProxyCACertificateFile', + 'SSLProxyCACertificatePath','SSLProxyCARevocationFile', + 'SSLProxyCARevocationPath','SSLProxyCipherSuite','SSLProxyEngine', + 'SSLProxyMachineCertificateFile','SSLProxyMachineCertificatePath', + 'SSLProxyProtocol','SSLProxyVerify','SSLProxyVerifyDepth', + 'SSLRandomSeed','SSLRenegBufferSize','SSLRequire','SSLRequireSSL', + 'SSLSessionCache','SSLSessionCacheTimeout','SSLUserName', + 'SSLVerifyClient','SSLVerifyDepth', + + //mod_status.c + 'ExtendedStatus','SeeRequestTail', + + //mod_substitute.c + 'Substitute', + + //mod_suexec.c + 'SuexecUserGroup', + + //mod_unique_id.c + + //mod_upload_progress + 'ReportUploads', 'TrackUploads', 'UploadProgressSharedMemorySize', + + //mod_userdir.c + 'UserDir', + + //mod_usertrack.c + 'CookieDomain','CookieExpires','CookieName','CookieStyle', + 'CookieTracking', + + //mod_version.c + + //mod_vhost_alias.c + 'VirtualDocumentRoot','VirtualDocumentRootIP', + 'VirtualScriptAlias','VirtualScriptAliasIP', + + //mod_view.c + 'ViewEnable', + + //mod_win32.c + 'ScriptInterpreterSource', + + //mpm_winnt.c + 'Listen','ListenBacklog','ReceiveBufferSize','SendBufferSize', + 'ThreadLimit','ThreadsPerChild','Win32DisableAcceptEx', + + //mpm_common.c + 'AcceptMutex','AddModule','ClearModuleList','EnableExceptionHook', + 'Group','LockFile','MaxClients','MaxSpareServers','MaxSpareThreads', + 'MinSpareServers','MinSpareThreads','ServerLimit','StartServers', + 'StartThreads','User', + + //util_ldap.c + 'LDAPCacheEntries','LDAPCacheTTL','LDAPConnectionTimeout', + 'LDAPOpCacheEntries','LDAPOpCacheTTL','LDAPSharedCacheFile', + 'LDAPSharedCacheSize','LDAPTrustedClientCert', + 'LDAPTrustedGlobalCert','LDAPTrustedMode','LDAPVerifyServerCert', + + //Unknown Mods ... + 'AgentLog','BindAddress','bs2000account','CacheForceCompletion', + 'CacheGCInterval','CacheSize','NoCache','qsc','RefererIgnore', + 'RefererLog','Resourceconfig','ServerType','SingleListen' + ), + /*keywords 2*/ + 2 => array( + 'all','on','off','standalone','inetd','indexes', + 'force-response-1.0','downgrade-1.0','nokeepalive', + 'includes','followsymlinks','none', + 'x-compress','x-gzip' + ), + /*keywords 3*/ + 3 => array( + //core.c + 'Directory','DirectoryMatch','Files','FilesMatch','IfDefine', + 'IfModule','Limit','LimitExcept','Location','LocationMatch', + 'VirtualHost', + + //mod_authn_alias.c + 'AuthnProviderAlias', + + //mod_proxy.c + 'Proxy','ProxyMatch', + + //mod_version.c + 'IfVersion' + ) + ), + 'SYMBOLS' => array( + '+', '-' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00007f;', + 2 => 'color: #0000ff;', + 3 => 'color: #000000; font-weight:bold;', + ), + 'COMMENTS' => array( + 1 => 'color: #adadad; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #339933;' + ), + 'STRINGS' => array( + 0 => 'color: #7f007f;' + ), + 'NUMBERS' => array( + 0 => 'color: #ff0000;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #008000;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'PARSER_CONTROL' => array( + 'ENABLE_FLAGS' => array( + 'BRACKETS' => GESHI_NEVER, + 'SYMBOLS' => GESHI_NEVER + ), + 'KEYWORDS' => array( + 3 => array( + 'DISALLOWED_BEFORE' => '(?<=<|<\/)', + 'DISALLOWED_AFTER' => '(?=\s|\/|>)', + ) + ) + ) +); + diff --git a/vendor/easybook/geshi/geshi/applescript.php b/vendor/easybook/geshi/geshi/applescript.php new file mode 100644 index 0000000000..23ae9c03d3 --- /dev/null +++ b/vendor/easybook/geshi/geshi/applescript.php @@ -0,0 +1,156 @@ + 'AppleScript', + 'COMMENT_SINGLE' => array(1 => '--'), + 'COMMENT_MULTI' => array( '(*' => '*)'), + 'COMMENT_REGEXP' => array( + 2 => '/(?<=[a-z])\'/i', + 3 => '/(? GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'application','close','count','delete','duplicate','exists','launch','make','move','open', + 'print','quit','reopen','run','save','saving', 'idle', 'path to', 'number', 'alias', 'list', 'text', 'string', + 'integer', 'it','me','version','pi','result','space','tab','anything','case','diacriticals','expansion', + 'hyphens','punctuation','bold','condensed','expanded','hidden','italic','outline','plain', + 'shadow','strikethrough','subscript','superscript','underline','ask','no','yes','false', 'id', + 'true','weekday','monday','mon','tuesday','tue','wednesday','wed','thursday','thu','friday', + 'fri','saturday','sat','sunday','sun','month','january','jan','february','feb','march', + 'mar','april','apr','may','june','jun','july','jul','august','aug','september', 'quote', 'do JavaScript', + 'sep','october','oct','november','nov','december','dec','minutes','hours', 'name', 'default answer', + 'days','weeks', 'folder', 'folders', 'file', 'files', 'window', 'eject', 'disk', 'reveal', 'sleep', + 'shut down', 'restart', 'display dialog', 'buttons', 'invisibles', 'item', 'items', 'delimiters', 'offset of', + 'AppleScript\'s', 'choose file', 'choose folder', 'choose from list', 'beep', 'contents', 'do shell script', + 'paragraph', 'paragraphs', 'missing value', 'quoted form', 'desktop', 'POSIX path', 'POSIX file', + 'activate', 'document', 'adding', 'receiving', 'content', 'new', 'properties', 'info for', 'bounds', + 'selection', 'extension', 'into', 'onto', 'by', 'between', 'against', 'set the clipboard to', 'the clipboard' + ), + 2 => array( + 'each','some','every','whose','where','index','first','second','third','fourth', + 'fifth','sixth','seventh','eighth','ninth','tenth','last','front','back','st','nd', + 'rd','th','middle','named','through','thru','before','after','beginning','the', 'as', + 'div','mod','and','not','or','contains','equal','equals','isnt', 'less', 'greater' + ), + 3 => array( + 'script','property','prop','end','to','set','global','local','on','of', + 'in','given','with','without','return','continue','tell','if','then','else','repeat', + 'times','while','until','from','exit','try','error','considering','ignoring','timeout', + 'transaction','my','get','put','is', 'copy' + ) + ), + 'SYMBOLS' => array( + ')','+','-','^','*','/','&','<','>=','<','<=','=','�' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0066ff;', + 2 => 'color: #ff0033;', + 3 => 'color: #ff0033; font-weight: bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 2 => '', + 3 => 'color: #ff0000;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000000; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #009900;' + ), + 'NUMBERS' => array( + 0 => 'color: #000000;' + ), + 'METHODS' => array( + 1 => 'color: #006600;', + 2 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #000000;' + ), + 'REGEXPS' => array( + 0 => 'color: #339933;', + 4 => 'color: #0066ff;', + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => ',+-=<>/?^&*' + ), + 'REGEXPS' => array( + //Variables + 0 => '[\\$%@]+[a-zA-Z_][a-zA-Z0-9_]*', + //File descriptors + 4 => '<[a-zA-Z_][a-zA-Z0-9_]*>', + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 'SPACE_AS_WHITESPACE' => true + ) + ) +); + diff --git a/vendor/easybook/geshi/geshi/apt_sources.php b/vendor/easybook/geshi/geshi/apt_sources.php new file mode 100644 index 0000000000..8a22d22f5c --- /dev/null +++ b/vendor/easybook/geshi/geshi/apt_sources.php @@ -0,0 +1,154 @@ + 'Apt sources', + 'COMMENT_SINGLE' => array(1 => '#'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array(), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + /*keywords*/ + 1 => array( + 'deb-src', 'deb' + ), + 2 => array( + //Generic + 'stable', 'old-stable', 'testing', 'testing-proposed-updates', + 'unstable', 'unstable-proposed-updates', 'experimental', + 'non-US', 'security', 'volatile', 'volatile-sloppy', + 'apt-build', + 'stable/updates', + //Debian + 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato', 'woody', 'sarge', + 'etch', 'lenny', 'wheezy', 'jessie', 'sid', + //Ubuntu + 'warty', 'warty-updates', 'warty-security', 'warty-proposed', 'warty-backports', + 'hoary', 'hoary-updates', 'hoary-security', 'hoary-proposed', 'hoary-backports', + 'breezy', 'breezy-updates', 'breezy-security', 'breezy-proposed', 'breezy-backports', + 'dapper', 'dapper-updates', 'dapper-security', 'dapper-proposed', 'dapper-backports', + 'edgy', 'edgy-updates', 'edgy-security', 'edgy-proposed', 'edgy-backports', + 'feisty', 'feisty-updates', 'feisty-security', 'feisty-proposed', 'feisty-backports', + 'gutsy', 'gutsy-updates', 'gutsy-security', 'gutsy-proposed', 'gutsy-backports', + 'hardy', 'hardy-updates', 'hardy-security', 'hardy-proposed', 'hardy-backports', + 'intrepid', 'intrepid-updates', 'intrepid-security', 'intrepid-proposed', 'intrepid-backports', + 'jaunty', 'jaunty-updates', 'jaunty-security', 'jaunty-proposed', 'jaunty-backports', + 'karmic', 'karmic-updates', 'karmic-security', 'karmic-proposed', 'karmic-backports', + 'lucid', 'lucid-updates', 'lucid-security', 'lucid-proposed', 'lucid-backports', + 'maverick', 'maverick-updates', 'maverick-security', 'maverick-proposed', 'maverick-backports', + 'natty', 'natty-updates', 'natty-security', 'natty-proposed', 'natty-backports', + 'oneiric', 'oneiric-updates', 'oneiric-security', 'oneiric-proposed', 'oneiric-backports', + 'precise', 'precise-updates', 'precise-security', 'precise-proposed', 'precise-backports', + 'quantal', 'quantal-updates', 'quantal-security', 'quantal-proposed', 'quantal-backports', + 'raring', 'raring-updates', 'raring-security', 'raring-proposed', 'raring-backports', + 'saucy', 'saucy-updates', 'saucy-security', 'saucy-proposed', 'saucy-backports', + 'trusty', 'trusty-updates', 'trusty-security', 'trusty-proposed', 'trusty-backports' + ), + 3 => array( + 'main', 'restricted', 'preview', 'contrib', 'non-free', + 'commercial', 'universe', 'multiverse' + ) + ), + 'REGEXPS' => array( + 0 => "(((http|ftp):\/\/|file:\/)[^\s]+)|(cdrom:\[[^\]]*\][^\s]*)", + ), + 'SYMBOLS' => array( + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => true, + 3 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00007f;', + 2 => 'color: #b1b100;', + 3 => 'color: #b16000;' + ), + 'COMMENTS' => array( + 1 => 'color: #adadad; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + ), + 'BRACKETS' => array( + ), + 'STRINGS' => array( + ), + 'NUMBERS' => array( + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + ), + 'REGEXPS' => array( + 0 => 'color: #009900;', + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'PARSER_CONTROL' => array( + 'ENABLE_FLAGS' => array( + 'NUMBERS' => GESHI_NEVER, + 'METHODS' => GESHI_NEVER, + 'SCRIPT' => GESHI_NEVER, + 'SYMBOLS' => GESHI_NEVER, + 'ESCAPE_CHAR' => GESHI_NEVER, + 'BRACKETS' => GESHI_NEVER, + 'STRINGS' => GESHI_NEVER, + ), + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => '(?|^\/])', + 'DISALLOWED_AFTER' => '(?![a-zA-Z0-9_\|%\\-&\.])' + ) + ), + 'TAB_WIDTH' => 4 +); + diff --git a/vendor/easybook/geshi/geshi/arm.php b/vendor/easybook/geshi/geshi/arm.php new file mode 100644 index 0000000000..d224f02b66 --- /dev/null +++ b/vendor/easybook/geshi/geshi/arm.php @@ -0,0 +1,3317 @@ + 'ARM ASSEMBLER', + 'COMMENT_SINGLE' => array( + 1 => ';' + ), + 'COMMENT_MULTI' => array(), + //Line address prefix suppression + 'COMMENT_REGEXP' => array( + 2 => "/^(?:[0-9a-f]{0,4}:)?[0-9a-f]{4}(?:[0-9a-f]{4})?/mi" + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /* Unconditional Data Processing Instructions */ + 1 => array( + /* Data Processing: Unconditional Addition & Subtraction */ + 'adc.w','adcal.w', + 'adc','adcal', + 'add.w','addal.w', + 'add','addal', + 'addw','addwal', + 'rsb.w','rsbal.w', + 'rsb','rsbal', + 'rsc','rscal', + 'sbc.w','sbcal.w', + 'sbc','sbcal', + 'sub.w','subal.w', + 'sub','subal', + 'neg.w','negal.w', + 'neg','negal', + 'adr.w','adral.w', + 'adr','adral', + /* Data Processing: Unconditional Logical */ + 'and.w','andal.w', + 'and','andal', + 'bic.w','bical.w', + 'bic','bical', + 'orr.w','orral.w', + 'orr','orral', + 'orn.w','ornal.w', + 'orn','ornal', + 'eor.w','eoral.w', + 'eor','eoral', + 'mov.w','moval.w', + 'mov','moval', + 'movw','movwal', + 'movt','movtal', + 'cpy','cpyal', + 'mvn.w','mvnal.w', + 'mvn','mvnal', + /* Data Processing: Unconditional Shifts and Rotates */ + 'asr.w','asral.w', + 'asr','asral', + 'lsl.w','lslal.w', + 'lsl','lslal', + 'lsr.w','lsral.w', + 'lsr','lsral', + 'ror.w','roral.w', + 'ror','roral', + 'rrx','rrxal', + /* Data Processing: Unconditional Word Multiply and Multiply-Add */ + 'mul','mulal', + 'mla','mlaal', + 'mls','mlsal', + 'smull','smullal', + 'muls','mulsal', + 'umull','umullal', + 'smlal','smlalal', + 'umlal','umlalal', + /* Data Processing: Unconditional Halfword Multiply and Multiply-Add (ARMv5TE) */ + 'smulbb','smulbbal', + 'smulbt','smulbtal', + 'smultb','smultbal', + 'smultt','smulttal', + 'smulwb','smulwbal', + 'smulwt','smulwtal', + 'smlalbb','smlalbbal', + 'smlalbt','smlalbtal', + 'smlaltb','smlaltbal', + 'smlaltt','smlalttal', + 'smlabb','smlabbal', + 'smlabt','smlabtal', + 'smlatb','smlatbal', + 'smlatt','smlattal', + 'smlawb','smlawbal', + 'smlawt','smlawtal', + /* Data Processing: Unconditional Bit Operations */ + 'ubfx','ubfxal', + 'sbfx','sbfxal', + 'bfc','bfcal', + 'bfi','bfial', + 'clz','clzal', + /* Data Processing: Unconditional Divide (ARMv7-R) */ + 'sdiv','sdival', + 'udiv','udival' + ), + /* Conditional Data Processing Instructions */ + 2 => array( + /* Data Processing: Conditional Addition & Subtraction */ + 'adceq.w','adcne.w','adccs.w','adchs.w','adccc.w','adclo.w','adcmi.w','adcpl.w','adcvs.w','adcvc.w','adchi.w','adcls.w','adcge.w','adclt.w','adcgt.w','adcle.w', + 'adceq','adcne','adccs','adchs','adccc','adclo','adcmi','adcpl','adcvs','adcvc','adchi','adcls','adcge','adclt','adcgt','adcle', + 'addeq.w','addne.w','addcs.w','addhs.w','addcc.w','addlo.w','addmi.w','addpl.w','addvs.w','addvc.w','addhi.w','addls.w','addge.w','addlt.w','addgt.w','addle.w', + 'addeq','addne','addcs','addhs','addcc','addlo','addmi','addpl','addvs','addvc','addhi','addls','addge','addlt','addgt','addle', + 'addweq','addwne','addwcs','addwhs','addwcc','addwlo','addwmi','addwpl','addwvs','addwvc','addwhi','addwls','addwge','addwlt','addwgt','addwle', + 'rsbeq.w','rsbne.w','rsbcs.w','rsbhs.w','rsbcc.w','rsblo.w','rsbmi.w','rsbpl.w','rsbvs.w','rsbvc.w','rsbhi.w','rsbls.w','rsbge.w','rsblt.w','rsbgt.w','rsble.w', + 'rsbeq','rsbne','rsbcs','rsbhs','rsbcc','rsblo','rsbmi','rsbpl','rsbvs','rsbvc','rsbhi','rsbls','rsbge','rsblt','rsbgt','rsble', + 'rsceq','rscne','rsccs','rschs','rsccc','rsclo','rscmi','rscpl','rscvs','rscvc','rschi','rscls','rscge','rsclt','rscgt','rscle', + 'sbceq.w','sbcne.w','sbccs.w','sbchs.w','sbccc.w','sbclo.w','sbcmi.w','sbcpl.w','sbcvs.w','sbcvc.w','sbchi.w','sbcls.w','sbcge.w','sbclt.w','sbcgt.w','sbcle.w', + 'sbceq','sbcne','sbccs','sbchs','sbccc','sbclo','sbcmi','sbcpl','sbcvs','sbcvc','sbchi','sbcls','sbcge','sbclt','sbcgt','sbcle', + 'subeq.w','subne.w','subcs.w','subhs.w','subcc.w','sublo.w','submi.w','subpl.w','subvs.w','subvc.w','subhi.w','subls.w','subge.w','sublt.w','subgt.w','suble.w', + 'subeq','subne','subcs','subhs','subcc','sublo','submi','subpl','subvs','subvc','subhi','subls','subge','sublt','subgt','suble', + 'negeq.w','negne.w','negcs.w','neghs.w','negcc.w','neglo.w','negmi.w','negpl.w','negvs.w','negvc.w','neghi.w','negls.w','negge.w','neglt.w','neggt.w','negle.w', + 'negeq','negne','negcs','neghs','negcc','neglo','negmi','negpl','negvs','negvc','neghi','negls','negge','neglt','neggt','negle', + 'adreq.w','adrne.w','adrcs.w','adrhs.w','adrcc.w','adrlo.w','adrmi.w','adrpl.w','adrvs.w','adrvc.w','adrhi.w','adrls.w','adrge.w','adrlt.w','adrgt.w','adrle.w', + 'adreq','adrne','adrcs','adrhs','adrcc','adrlo','adrmi','adrpl','adrvs','adrvc','adrhi','adrls','adrge','adrlt','adrgt','adrle', + /* Data Processing: Conditional Logical */ + 'andeq.w','andne.w','andcs.w','andhs.w','andcc.w','andlo.w','andmi.w','andpl.w','andvs.w','andvc.w','andhi.w','andls.w','andge.w','andlt.w','andgt.w','andle.w', + 'andeq','andne','andcs','andhs','andcc','andlo','andmi','andpl','andvs','andvc','andhi','andls','andge','andlt','andgt','andle', + 'biceq.w','bicne.w','biccs.w','bichs.w','biccc.w','biclo.w','bicmi.w','bicpl.w','bicvs.w','bicvc.w','bichi.w','bicls.w','bicge.w','biclt.w','bicgt.w','bicle.w', + 'biceq','bicne','biccs','bichs','biccc','biclo','bicmi','bicpl','bicvs','bicvc','bichi','bicls','bicge','biclt','bicgt','bicle', + 'orreq.w','orrne.w','orrcs.w','orrhs.w','orrcc.w','orrlo.w','orrmi.w','orrpl.w','orrvs.w','orrvc.w','orrhi.w','orrls.w','orrge.w','orrlt.w','orrgt.w','orrle.w', + 'orreq','orrne','orrcs','orrhs','orrcc','orrlo','orrmi','orrpl','orrvs','orrvc','orrhi','orrls','orrge','orrlt','orrgt','orrle', + 'orneq.w','ornne.w','orncs.w','ornhs.w','orncc.w','ornlo.w','ornmi.w','ornpl.w','ornvs.w','ornvc.w','ornhi.w','ornls.w','ornge.w','ornlt.w','orngt.w','ornle.w', + 'orneq','ornne','orncs','ornhs','orncc','ornlo','ornmi','ornpl','ornvs','ornvc','ornhi','ornls','ornge','ornlt','orngt','ornle', + 'eoreq.w','eorne.w','eorcs.w','eorhs.w','eorcc.w','eorlo.w','eormi.w','eorpl.w','eorvs.w','eorvc.w','eorhi.w','eorls.w','eorge.w','eorlt.w','eorgt.w','eorle.w', + 'eoreq','eorne','eorcs','eorhs','eorcc','eorlo','eormi','eorpl','eorvs','eorvc','eorhi','eorls','eorge','eorlt','eorgt','eorle', + 'moveq.w','movne.w','movcs.w','movhs.w','movcc.w','movlo.w','movmi.w','movpl.w','movvs.w','movvc.w','movhi.w','movls.w','movge.w','movlt.w','movgt.w','movle.w', + 'moveq','movne','movcs','movhs','movcc','movlo','movmi','movpl','movvs','movvc','movhi','movls','movge','movlt','movgt','movle', + 'movweq','movwne','movwcs','movwhs','movwcc','movwlo','movwmi','movwpl','movwvs','movwvc','movwhi','movwls','movwge','movwlt','movwgt','movwle', + 'movteq','movtne','movtcs','movths','movtcc','movtlo','movtmi','movtpl','movtvs','movtvc','movthi','movtls','movtge','movtlt','movtgt','movtle', + 'cpyeq','cpyne','cpycs','cpyhs','cpycc','cpylo','cpymi','cpypl','cpyvs','cpyvc','cpyhi','cpyls','cpyge','cpylt','cpygt','cpyle', + 'mvneq.w','mvnne.w','mvncs.w','mvnhs.w','mvncc.w','mvnlo.w','mvnmi.w','mvnpl.w','mvnvs.w','mvnvc.w','mvnhi.w','mvnls.w','mvnge.w','mvnlt.w','mvngt.w','mvnle.w', + 'mvneq','mvnne','mvncs','mvnhs','mvncc','mvnlo','mvnmi','mvnpl','mvnvs','mvnvc','mvnhi','mvnls','mvnge','mvnlt','mvngt','mvnle', + /* Data Processing: Conditional Shifts and Rotates */ + 'asreq.w','asrne.w','asrcs.w','asrhs.w','asrcc.w','asrlo.w','asrmi.w','asrpl.w','asrvs.w','asrvc.w','asrhi.w','asrls.w','asrge.w','asrlt.w','asrgt.w','asrle.w', + 'asreq','asrne','asrcs','asrhs','asrcc','asrlo','asrmi','asrpl','asrvs','asrvc','asrhi','asrls','asrge','asrlt','asrgt','asrle', + 'lsleq.w','lslne.w','lslcs.w','lslhs.w','lslcc.w','lsllo.w','lslmi.w','lslpl.w','lslvs.w','lslvc.w','lslhi.w','lslls.w','lslge.w','lsllt.w','lslgt.w','lslle.w', + 'lsleq','lslne','lslcs','lslhs','lslcc','lsllo','lslmi','lslpl','lslvs','lslvc','lslhi','lslls','lslge','lsllt','lslgt','lslle', + 'lsreq.w','lsrne.w','lsrcs.w','lsrhs.w','lsrcc.w','lsrlo.w','lsrmi.w','lsrpl.w','lsrvs.w','lsrvc.w','lsrhi.w','lsrls.w','lsrge.w','lsrlt.w','lsrgt.w','lsrle.w', + 'lsreq','lsrne','lsrcs','lsrhs','lsrcc','lsrlo','lsrmi','lsrpl','lsrvs','lsrvc','lsrhi','lsrls','lsrge','lsrlt','lsrgt','lsrle', + 'roreq.w','rorne.w','rorcs.w','rorhs.w','rorcc.w','rorlo.w','rormi.w','rorpl.w','rorvs.w','rorvc.w','rorhi.w','rorls.w','rorge.w','rorlt.w','rorgt.w','rorle.w', + 'roreq','rorne','rorcs','rorhs','rorcc','rorlo','rormi','rorpl','rorvs','rorvc','rorhi','rorls','rorge','rorlt','rorgt','rorle', + 'rrxeq','rrxne','rrxcs','rrxhs','rrxcc','rrxlo','rrxmi','rrxpl','rrxvs','rrxvc','rrxhi','rrxls','rrxge','rrxlt','rrxgt','rrxle', + /* Data Processing: Conditional Word Multiply and Multiply-Add */ + 'muleq','mulne','mulcs','mulhs','mulcc','mullo','mulmi','mulpl','mulvs','mulvc','mulhi','mulls','mulge','mullt','mulgt','mulle', + 'mlaeq','mlane','mlacs','mlahs','mlacc','mlalo','mlami','mlapl','mlavs','mlavc','mlahi','mlals','mlage','mlalt','mlagt','mlale', + 'mlseq','mlsne','mlscs','mlshs','mlscc','mlslo','mlsmi','mlspl','mlsvs','mlsvc','mlshi','mlsls','mlsge','mlslt','mlsgt','mlsle', + 'smulleq','smullne','smullcs','smullhs','smullcc','smulllo','smullmi','smullpl','smullvs','smullvc','smullhi','smullls','smullge','smulllt','smullgt','smullle', + 'mulseq','mulsne','mulscs','mulshs','mulscc','mulslo','mulsmi','mulspl','mulsvs','mulsvc','mulshi','mulsls','mulsge','mulslt','mulsgt','mulsle', + 'umulleq','umullne','umullcs','umullhs','umullcc','umulllo','umullmi','umullpl','umullvs','umullvc','umullhi','umullls','umullge','umulllt','umullgt','umullle', + 'smlaleq','smlalne','smlalcs','smlalhs','smlalcc','smlallo','smlalmi','smlalpl','smlalvs','smlalvc','smlalhi','smlalls','smlalge','smlallt','smlalgt','smlalle', + 'umlaleq','umlalne','umlalcs','umlalhs','umlalcc','umlallo','umlalmi','umlalpl','umlalvs','umlalvc','umlalhi','umlalls','umlalge','umlallt','umlalgt','umlalle', + /* Data Processing: Conditional Halfword Multiply and Multiply-Add (ARMv5TE) */ + 'smulbbeq','smulbbne','smulbbcs','smulbbhs','smulbbcc','smulbblo','smulbbmi','smulbbpl','smulbbvs','smulbbvc','smulbbhi','smulbbls','smulbbge','smulbblt','smulbbgt','smulbble', + 'smulbteq','smulbtne','smulbtcs','smulbths','smulbtcc','smulbtlo','smulbtmi','smulbtpl','smulbtvs','smulbtvc','smulbthi','smulbtls','smulbtge','smulbtlt','smulbtgt','smulbtle', + 'smultbeq','smultbne','smultbcs','smultbhs','smultbcc','smultblo','smultbmi','smultbpl','smultbvs','smultbvc','smultbhi','smultbls','smultbge','smultblt','smultbgt','smultble', + 'smultteq','smulttne','smulttcs','smultths','smulttcc','smulttlo','smulttmi','smulttpl','smulttvs','smulttvc','smultthi','smulttls','smulttge','smulttlt','smulttgt','smulttle', + 'smulwbeq','smulwbne','smulwbcs','smulwbhs','smulwbcc','smulwblo','smulwbmi','smulwbpl','smulwbvs','smulwbvc','smulwbhi','smulwbls','smulwbge','smulwblt','smulwbgt','smulwble', + 'smulwteq','smulwtne','smulwtcs','smulwths','smulwtcc','smulwtlo','smulwtmi','smulwtpl','smulwtvs','smulwtvc','smulwthi','smulwtls','smulwtge','smulwtlt','smulwtgt','smulwtle', + 'smlalbbeq','smlalbbne','smlalbbcs','smlalbbhs','smlalbbcc','smlalbblo','smlalbbmi','smlalbbpl','smlalbbvs','smlalbbvc','smlalbbhi','smlalbbls','smlalbbge','smlalbblt','smlalbbgt','smlalbble', + 'smlalbteq','smlalbtne','smlalbtcs','smlalbths','smlalbtcc','smlalbtlo','smlalbtmi','smlalbtpl','smlalbtvs','smlalbtvc','smlalbthi','smlalbtls','smlalbtge','smlalbtlt','smlalbtgt','smlalbtle', + 'smlaltbeq','smlaltbne','smlaltbcs','smlaltbhs','smlaltbcc','smlaltblo','smlaltbmi','smlaltbpl','smlaltbvs','smlaltbvc','smlaltbhi','smlaltbls','smlaltbge','smlaltblt','smlaltbgt','smlaltble', + 'smlaltteq','smlalttne','smlalttcs','smlaltths','smlalttcc','smlalttlo','smlalttmi','smlalttpl','smlalttvs','smlalttvc','smlaltthi','smlalttls','smlalttge','smlalttlt','smlalttgt','smlalttle', + 'smlabbeq','smlabbne','smlabbcs','smlabbhs','smlabbcc','smlabblo','smlabbmi','smlabbpl','smlabbvs','smlabbvc','smlabbhi','smlabbls','smlabbge','smlabblt','smlabbgt','smlabble', + 'smlabteq','smlabtne','smlabtcs','smlabths','smlabtcc','smlabtlo','smlabtmi','smlabtpl','smlabtvs','smlabtvc','smlabthi','smlabtls','smlabtge','smlabtlt','smlabtgt','smlabtle', + 'smlatbeq','smlatbne','smlatbcs','smlatbhs','smlatbcc','smlatblo','smlatbmi','smlatbpl','smlatbvs','smlatbvc','smlatbhi','smlatbls','smlatbge','smlatblt','smlatbgt','smlatble', + 'smlatteq','smlattne','smlattcs','smlatths','smlattcc','smlattlo','smlattmi','smlattpl','smlattvs','smlattvc','smlatthi','smlattls','smlattge','smlattlt','smlattgt','smlattle', + 'smlawbeq','smlawbne','smlawbcs','smlawbhs','smlawbcc','smlawblo','smlawbmi','smlawbpl','smlawbvs','smlawbvc','smlawbhi','smlawbls','smlawbge','smlawblt','smlawbgt','smlawble', + 'smlawteq','smlawtne','smlawtcs','smlawths','smlawtcc','smlawtlo','smlawtmi','smlawtpl','smlawtvs','smlawtvc','smlawthi','smlawtls','smlawtge','smlawtlt','smlawtgt','smlawtle', + /* Data Processing: Conditional Bit Operations */ + 'ubfxeq','ubfxne','ubfxcs','ubfxhs','ubfxcc','ubfxlo','ubfxmi','ubfxpl','ubfxvs','ubfxvc','ubfxhi','ubfxls','ubfxge','ubfxlt','ubfxgt','ubfxle', + 'sbfxeq','sbfxne','sbfxcs','sbfxhs','sbfxcc','sbfxlo','sbfxmi','sbfxpl','sbfxvs','sbfxvc','sbfxhi','sbfxls','sbfxge','sbfxlt','sbfxgt','sbfxle', + 'bfceq','bfcne','bfccs','bfchs','bfccc','bfclo','bfcmi','bfcpl','bfcvs','bfcvc','bfchi','bfcls','bfcge','bfclt','bfcgt','bfcle', + 'bfieq','bfine','bfics','bfihs','bficc','bfilo','bfimi','bfipl','bfivs','bfivc','bfihi','bfils','bfige','bfilt','bfigt','bfile', + 'clzeq','clzne','clzcs','clzhs','clzcc','clzlo','clzmi','clzpl','clzvs','clzvc','clzhi','clzls','clzge','clzlt','clzgt','clzle', + /* ARMv7-R: Conditional Divide */ + 'sdiveq','sdivne','sdivcs','sdivhs','sdivcc','sdivlo','sdivmi','sdivpl','sdivvs','sdivvc','sdivhi','sdivls','sdivge','sdivlt','sdivgt','sdivle', + 'udiveq','udivne','udivcs','udivhs','udivcc','udivlo','udivmi','udivpl','udivvs','udivvc','udivhi','udivls','udivge','udivlt','udivgt','udivle' + ), + /* Unconditional Memory Access */ + 3 => array( + /* Memory Access: Unconditional Memory Loads and Prefetches */ + 'ldm.w','ldmal.w', + 'ldm','ldmal', + 'ldmda','ldmdaal', + 'ldmdb','ldmdbal', + 'ldmib','ldmibal', + 'ldmia','ldmiaal', + 'ldmea','ldmeaal', + 'ldmed','ldmedal', + 'ldmfa','ldmfaal', + 'ldmfd','ldmfdal', + 'ldrd','ldrdal', + 'ldr.w','ldral.w', + 'ldr','ldral', + 'ldrh.w','ldrhal.w', + 'ldrh','ldrhal', + 'ldrb.w','ldrbal.w', + 'ldrb','ldrbal', + 'ldrsh.w','ldrshal.w', + 'ldrsh','ldrshal', + 'ldrsb.w','ldrsbal.w', + 'ldrsb','ldrsbal', + 'ldrt','ldrtal', + 'ldrht','ldrhtal', + 'ldrbt','ldrbtal', + 'ldrsht','ldrshtal', + 'ldrsbt','ldrsbtal', + 'pop.w','popal.w', + 'pop','popal', + 'pld','pldal', + 'pldw','pldwal', + 'pli','plial', + /* Memory Access: Unconditional Memory Stores */ + 'stm.w','stmal.w', + 'stm','stmal', + 'stmda','stmdaal', + 'stmdb','stmdbal', + 'stmib','stmibal', + 'stmia','stmiaal', + 'stmea','stmeaal', + 'stmed','stmedal', + 'stdfa','stdfaal', + 'stdfd','stdfdal', + 'strd','strdal', + 'str.w','stral.w', + 'str','stral', + 'strh.w','strhal.w', + 'strh','strhal', + 'strb.w','strbal.w', + 'strb','strbal', + 'strt','strtal', + 'strht','strhtal', + 'strbt','strbtal', + 'push.w','pushal.w', + 'push','pushal' + ), + /* Conditional Memory Access */ + 4 => array( + /* Memory Access: Conditional Memory Loads and Prefetches */ + 'ldmeq.w','ldmne.w','ldmcs.w','ldmhs.w','ldmcc.w','ldmlo.w','ldmmi.w','ldmpl.w','ldmvs.w','ldmvc.w','ldmhi.w','ldmls.w','ldmge.w','ldmlt.w','ldmgt.w','ldmle.w', + 'ldmeq','ldmne','ldmcs','ldmhs','ldmcc','ldmlo','ldmmi','ldmpl','ldmvs','ldmvc','ldmhi','ldmls','ldmge','ldmlt','ldmgt','ldmle', + 'ldmdaeq','ldmdane','ldmdacs','ldmdahs','ldmdacc','ldmdalo','ldmdami','ldmdapl','ldmdavs','ldmdavc','ldmdahi','ldmdals','ldmdage','ldmdalt','ldmdagt','ldmdale', + 'ldmdbeq','ldmdbne','ldmdbcs','ldmdbhs','ldmdbcc','ldmdblo','ldmdbmi','ldmdbpl','ldmdbvs','ldmdbvc','ldmdbhi','ldmdbls','ldmdbge','ldmdblt','ldmdbgt','ldmdble', + 'ldmibeq','ldmibne','ldmibcs','ldmibhs','ldmibcc','ldmiblo','ldmibmi','ldmibpl','ldmibvs','ldmibvc','ldmibhi','ldmibls','ldmibge','ldmiblt','ldmibgt','ldmible', + 'ldmiaeq','ldmiane','ldmiacs','ldmiahs','ldmiacc','ldmialo','ldmiami','ldmiapl','ldmiavs','ldmiavc','ldmiahi','ldmials','ldmiage','ldmialt','ldmiagt','ldmiale', + 'ldmeaeq','ldmeane','ldmeacs','ldmeahs','ldmeacc','ldmealo','ldmeami','ldmeapl','ldmeavs','ldmeavc','ldmeahi','ldmeals','ldmeage','ldmealt','ldmeagt','ldmeale', + 'ldmedeq','ldmedne','ldmedcs','ldmedhs','ldmedcc','ldmedlo','ldmedmi','ldmedpl','ldmedvs','ldmedvc','ldmedhi','ldmedls','ldmedge','ldmedlt','ldmedgt','ldmedle', + 'ldmfaeq','ldmfane','ldmfacs','ldmfahs','ldmfacc','ldmfalo','ldmfami','ldmfapl','ldmfavs','ldmfavc','ldmfahi','ldmfals','ldmfage','ldmfalt','ldmfagt','ldmfale', + 'ldmfdeq','ldmfdne','ldmfdcs','ldmfdhs','ldmfdcc','ldmfdlo','ldmfdmi','ldmfdpl','ldmfdvs','ldmfdvc','ldmfdhi','ldmfdls','ldmfdge','ldmfdlt','ldmfdgt','ldmfdle', + 'ldrdeq','ldrdne','ldrdcs','ldrdhs','ldrdcc','ldrdlo','ldrdmi','ldrdpl','ldrdvs','ldrdvc','ldrdhi','ldrdls','ldrdge','ldrdlt','ldrdgt','ldrdle', + 'ldreq.w','ldrne.w','ldrcs.w','ldrhs.w','ldrcc.w','ldrlo.w','ldrmi.w','ldrpl.w','ldrvs.w','ldrvc.w','ldrhi.w','ldrls.w','ldrge.w','ldrlt.w','ldrgt.w','ldrle.w', + 'ldreq','ldrne','ldrcs','ldrhs','ldrcc','ldrlo','ldrmi','ldrpl','ldrvs','ldrvc','ldrhi','ldrls','ldrge','ldrlt','ldrgt','ldrle', + 'ldrheq.w','ldrhne.w','ldrhcs.w','ldrhhs.w','ldrhcc.w','ldrhlo.w','ldrhmi.w','ldrhpl.w','ldrhvs.w','ldrhvc.w','ldrhhi.w','ldrhls.w','ldrhge.w','ldrhlt.w','ldrhgt.w','ldrhle.w', + 'ldrheq','ldrhne','ldrhcs','ldrhhs','ldrhcc','ldrhlo','ldrhmi','ldrhpl','ldrhvs','ldrhvc','ldrhhi','ldrhls','ldrhge','ldrhlt','ldrhgt','ldrhle', + 'ldrbeq.w','ldrbne.w','ldrbcs.w','ldrbhs.w','ldrbcc.w','ldrblo.w','ldrbmi.w','ldrbpl.w','ldrbvs.w','ldrbvc.w','ldrbhi.w','ldrbls.w','ldrbge.w','ldrblt.w','ldrbgt.w','ldrble.w', + 'ldrbeq','ldrbne','ldrbcs','ldrbhs','ldrbcc','ldrblo','ldrbmi','ldrbpl','ldrbvs','ldrbvc','ldrbhi','ldrbls','ldrbge','ldrblt','ldrbgt','ldrble', + 'ldrsheq.w','ldrshne.w','ldrshcs.w','ldrshhs.w','ldrshcc.w','ldrshlo.w','ldrshmi.w','ldrshpl.w','ldrshvs.w','ldrshvc.w','ldrshhi.w','ldrshls.w','ldrshge.w','ldrshlt.w','ldrshgt.w','ldrshle.w', + 'ldrsheq','ldrshne','ldrshcs','ldrshhs','ldrshcc','ldrshlo','ldrshmi','ldrshpl','ldrshvs','ldrshvc','ldrshhi','ldrshls','ldrshge','ldrshlt','ldrshgt','ldrshle', + 'ldrsbeq.w','ldrsbne.w','ldrsbcs.w','ldrsbhs.w','ldrsbcc.w','ldrsblo.w','ldrsbmi.w','ldrsbpl.w','ldrsbvs.w','ldrsbvc.w','ldrsbhi.w','ldrsbls.w','ldrsbge.w','ldrsblt.w','ldrsbgt.w','ldrsble.w', + 'ldrsbeq','ldrsbne','ldrsbcs','ldrsbhs','ldrsbcc','ldrsblo','ldrsbmi','ldrsbpl','ldrsbvs','ldrsbvc','ldrsbhi','ldrsbls','ldrsbge','ldrsblt','ldrsbgt','ldrsble', + 'ldrteq','ldrtne','ldrtcs','ldrths','ldrtcc','ldrtlo','ldrtmi','ldrtpl','ldrtvs','ldrtvc','ldrthi','ldrtls','ldrtge','ldrtlt','ldrtgt','ldrtle', + 'ldrhteq','ldrhtne','ldrhtcs','ldrhths','ldrhtcc','ldrhtlo','ldrhtmi','ldrhtpl','ldrhtvs','ldrhtvc','ldrhthi','ldrhtls','ldrhtge','ldrhtlt','ldrhtgt','ldrhtle', + 'ldrbteq','ldrbtne','ldrbtcs','ldrbths','ldrbtcc','ldrbtlo','ldrbtmi','ldrbtpl','ldrbtvs','ldrbtvc','ldrbthi','ldrbtls','ldrbtge','ldrbtlt','ldrbtgt','ldrbtle', + 'ldrshteq','ldrshtne','ldrshtcs','ldrshths','ldrshtcc','ldrshtlo','ldrshtmi','ldrshtpl','ldrshtvs','ldrshtvc','ldrshthi','ldrshtls','ldrshtge','ldrshtlt','ldrshtgt','ldrshtle', + 'ldrsbteq','ldrsbtne','ldrsbtcs','ldrsbths','ldrsbtcc','ldrsbtlo','ldrsbtmi','ldrsbtpl','ldrsbtvs','ldrsbtvc','ldrsbthi','ldrsbtls','ldrsbtge','ldrsbtlt','ldrsbtgt','ldrsbtle', + 'popeq.w','popne.w','popcs.w','pophs.w','popcc.w','poplo.w','popmi.w','poppl.w','popvs.w','popvc.w','pophi.w','popls.w','popge.w','poplt.w','popgt.w','pople.w', + 'popeq','popne','popcs','pophs','popcc','poplo','popmi','poppl','popvs','popvc','pophi','popls','popge','poplt','popgt','pople', + 'pldeq','pldne','pldcs','pldhs','pldcc','pldlo','pldmi','pldpl','pldvs','pldvc','pldhi','pldls','pldge','pldlt','pldgt','pldle', + 'pldweq','pldwne','pldwcs','pldwhs','pldwcc','pldwlo','pldwmi','pldwpl','pldwvs','pldwvc','pldwhi','pldwls','pldwge','pldwlt','pldwgt','pldwle', + 'plieq','pline','plics','plihs','plicc','plilo','plimi','plipl','plivs','plivc','plihi','plils','plige','plilt','pligt','plile', + /* Memory Access: Conditional Memory Stores */ + 'stmeq.w','stmne.w','stmcs.w','stmhs.w','stmcc.w','stmlo.w','stmmi.w','stmpl.w','stmvs.w','stmvc.w','stmhi.w','stmls.w','stmge.w','stmlt.w','stmgt.w','stmle.w', + 'stmeq','stmne','stmcs','stmhs','stmcc','stmlo','stmmi','stmpl','stmvs','stmvc','stmhi','stmls','stmge','stmlt','stmgt','stmle', + 'stmdaeq','stmdane','stmdacs','stmdahs','stmdacc','stmdalo','stmdami','stmdapl','stmdavs','stmdavc','stmdahi','stmdals','stmdage','stmdalt','stmdagt','stmdale', + 'stmdbeq','stmdbne','stmdbcs','stmdbhs','stmdbcc','stmdblo','stmdbmi','stmdbpl','stmdbvs','stmdbvc','stmdbhi','stmdbls','stmdbge','stmdblt','stmdbgt','stmdble', + 'stmibeq','stmibne','stmibcs','stmibhs','stmibcc','stmiblo','stmibmi','stmibpl','stmibvs','stmibvc','stmibhi','stmibls','stmibge','stmiblt','stmibgt','stmible', + 'stmiaeq','stmiane','stmiacs','stmiahs','stmiacc','stmialo','stmiami','stmiapl','stmiavs','stmiavc','stmiahi','stmials','stmiage','stmialt','stmiagt','stmiale', + 'stmeaeq','stmeane','stmeacs','stmeahs','stmeacc','stmealo','stmeami','stmeapl','stmeavs','stmeavc','stmeahi','stmeals','stmeage','stmealt','stmeagt','stmeale', + 'stmedeq','stmedne','stmedcs','stmedhs','stmedcc','stmedlo','stmedmi','stmedpl','stmedvs','stmedvc','stmedhi','stmedls','stmedge','stmedlt','stmedgt','stmedle', + 'stdfaeq','stdfane','stdfacs','stdfahs','stdfacc','stdfalo','stdfami','stdfapl','stdfavs','stdfavc','stdfahi','stdfals','stdfage','stdfalt','stdfagt','stdfale', + 'stdfdeq','stdfdne','stdfdcs','stdfdhs','stdfdcc','stdfdlo','stdfdmi','stdfdpl','stdfdvs','stdfdvc','stdfdhi','stdfdls','stdfdge','stdfdlt','stdfdgt','stdfdle', + 'strdeq','strdne','strdcs','strdhs','strdcc','strdlo','strdmi','strdpl','strdvs','strdvc','strdhi','strdls','strdge','strdlt','strdgt','strdle', + 'streq.w','strne.w','strcs.w','strhs.w','strcc.w','strlo.w','strmi.w','strpl.w','strvs.w','strvc.w','strhi.w','strls.w','strge.w','strlt.w','strgt.w','strle.w', + 'streq','strne','strcs','strhs','strcc','strlo','strmi','strpl','strvs','strvc','strhi','strls','strge','strlt','strgt','strle', + 'strheq.w','strhne.w','strhcs.w','strhhs.w','strhcc.w','strhlo.w','strhmi.w','strhpl.w','strhvs.w','strhvc.w','strhhi.w','strhls.w','strhge.w','strhlt.w','strhgt.w','strhle.w', + 'strheq','strhne','strhcs','strhhs','strhcc','strhlo','strhmi','strhpl','strhvs','strhvc','strhhi','strhls','strhge','strhlt','strhgt','strhle', + 'strbeq.w','strbne.w','strbcs.w','strbhs.w','strbcc.w','strblo.w','strbmi.w','strbpl.w','strbvs.w','strbvc.w','strbhi.w','strbls.w','strbge.w','strblt.w','strbgt.w','strble.w', + 'strbeq','strbne','strbcs','strbhs','strbcc','strblo','strbmi','strbpl','strbvs','strbvc','strbhi','strbls','strbge','strblt','strbgt','strble', + 'strteq','strtne','strtcs','strths','strtcc','strtlo','strtmi','strtpl','strtvs','strtvc','strthi','strtls','strtge','strtlt','strtgt','strtle', + 'strhteq','strhtne','strhtcs','strhths','strhtcc','strhtlo','strhtmi','strhtpl','strhtvs','strhtvc','strhthi','strhtls','strhtge','strhtlt','strhtgt','strhtle', + 'strbteq','strbtne','strbtcs','strbths','strbtcc','strbtlo','strbtmi','strbtpl','strbtvs','strbtvc','strbthi','strbtls','strbtge','strbtlt','strbtgt','strbtle', + 'pusheq.w','pushne.w','pushcs.w','pushhs.w','pushcc.w','pushlo.w','pushmi.w','pushpl.w','pushvs.w','pushvc.w','pushhi.w','pushls.w','pushge.w','pushlt.w','pushgt.w','pushle.w', + 'pusheq','pushne','pushcs','pushhs','pushcc','pushlo','pushmi','pushpl','pushvs','pushvc','pushhi','pushls','pushge','pushlt','pushgt','pushle' + ), + /* Unconditional Flags-Affecting Instructions */ + 5 => array( + /* Set Flags: Unconditional Addition and Subtraction */ + 'adds.w','addsal.w', + 'adds','addsal', + 'subs.w','subsal.w', + 'subs','subsal', + 'rsbs.w','rsbsal.w', + 'rsbs','rsbsal', + 'negs.w','negsal.w', + 'negs','negsal', + 'adcs.w','adcsal.w', + 'adcs','adcsal', + 'sbcs.w','sbcsal.w', + 'sbcs','sbcsal', + 'rscs','rscsal', + 'cmp.w','cmpal.w', + 'cmp','cmpal', + 'cmn.w','cmnal.w', + 'cmn','cmnal', + /* Set Flags: Unconditional Logical */ + 'ands.w','andsal.w', + 'ands','andsal', + 'bics.w','bicsal.w', + 'bics','bicsal', + 'orrs.w','orrsal.w', + 'orrs','orrsal', + 'orns.w','ornsal.w', + 'orns','ornsal', + 'eors.w','eorsal.w', + 'eors','eorsal', + 'mvns.w','mvnsal.w', + 'mvns','mvnsal', + 'movs.w','movsal.w', + 'movs','movsal', + 'teq','teqal', + 'tst.w','tstal.w', + 'tst','tstal', + 'mrs','mrsal', + 'msr','msral', + /* Set Flags: Unconditional Shifts and Rotates */ + 'asrs.w','asrsal.w', + 'asrs','asrsal', + 'lsls.w','lslsal.w', + 'lsls','lslsal', + 'lsrs.w','lsrsal.w', + 'lsrs','lsrsal', + 'rors.w','rorsal.w', + 'rors','rorsal', + 'rrxs','rrxsal', + /* Set Flags: Unconditional Multiply and Multiply-Add */ + 'mlas','mlasal', + 'smulls','smullsal', + 'umulls','umullsal', + 'smlals','smlalsal', + 'umlals','umlalsal' + ), + /* Conditional Flags-Affecting Instructions */ + 6 => array( + /* Set Flags: Conditional Addition and Subtraction */ + 'addseq.w','addsne.w','addscs.w','addshs.w','addscc.w','addslo.w','addsmi.w','addspl.w','addsvs.w','addsvc.w','addshi.w','addsls.w','addsge.w','addslt.w','addsgt.w','addsle.w', + 'addseq','addsne','addscs','addshs','addscc','addslo','addsmi','addspl','addsvs','addsvc','addshi','addsls','addsge','addslt','addsgt','addsle', + 'subseq.w','subsne.w','subscs.w','subshs.w','subscc.w','subslo.w','subsmi.w','subspl.w','subsvs.w','subsvc.w','subshi.w','subsls.w','subsge.w','subslt.w','subsgt.w','subsle.w', + 'subseq','subsne','subscs','subshs','subscc','subslo','subsmi','subspl','subsvs','subsvc','subshi','subsls','subsge','subslt','subsgt','subsle', + 'rsbseq.w','rsbsne.w','rsbscs.w','rsbshs.w','rsbscc.w','rsbslo.w','rsbsmi.w','rsbspl.w','rsbsvs.w','rsbsvc.w','rsbshi.w','rsbsls.w','rsbsge.w','rsbslt.w','rsbsgt.w','rsbsle.w', + 'rsbseq','rsbsne','rsbscs','rsbshs','rsbscc','rsbslo','rsbsmi','rsbspl','rsbsvs','rsbsvc','rsbshi','rsbsls','rsbsge','rsbslt','rsbsgt','rsbsle', + 'negseq.w','negsne.w','negscs.w','negshs.w','negscc.w','negslo.w','negsmi.w','negspl.w','negsvs.w','negsvc.w','negshi.w','negsls.w','negsge.w','negslt.w','negsgt.w','negsle.w', + 'negseq','negsne','negscs','negshs','negscc','negslo','negsmi','negspl','negsvs','negsvc','negshi','negsls','negsge','negslt','negsgt','negsle', + 'adcseq.w','adcsne.w','adcscs.w','adcshs.w','adcscc.w','adcslo.w','adcsmi.w','adcspl.w','adcsvs.w','adcsvc.w','adcshi.w','adcsls.w','adcsge.w','adcslt.w','adcsgt.w','adcsle.w', + 'adcseq','adcsne','adcscs','adcshs','adcscc','adcslo','adcsmi','adcspl','adcsvs','adcsvc','adcshi','adcsls','adcsge','adcslt','adcsgt','adcsle', + 'sbcseq.w','sbcsne.w','sbcscs.w','sbcshs.w','sbcscc.w','sbcslo.w','sbcsmi.w','sbcspl.w','sbcsvs.w','sbcsvc.w','sbcshi.w','sbcsls.w','sbcsge.w','sbcslt.w','sbcsgt.w','sbcsle.w', + 'sbcseq','sbcsne','sbcscs','sbcshs','sbcscc','sbcslo','sbcsmi','sbcspl','sbcsvs','sbcsvc','sbcshi','sbcsls','sbcsge','sbcslt','sbcsgt','sbcsle', + 'rscseq','rscsne','rscscs','rscshs','rscscc','rscslo','rscsmi','rscspl','rscsvs','rscsvc','rscshi','rscsls','rscsge','rscslt','rscsgt','rscsle', + 'cmpeq.w','cmpne.w','cmpcs.w','cmphs.w','cmpcc.w','cmplo.w','cmpmi.w','cmppl.w','cmpvs.w','cmpvc.w','cmphi.w','cmpls.w','cmpge.w','cmplt.w','cmpgt.w','cmple.w', + 'cmpeq','cmpne','cmpcs','cmphs','cmpcc','cmplo','cmpmi','cmppl','cmpvs','cmpvc','cmphi','cmpls','cmpge','cmplt','cmpgt','cmple', + 'cmneq.w','cmnne.w','cmncs.w','cmnhs.w','cmncc.w','cmnlo.w','cmnmi.w','cmnpl.w','cmnvs.w','cmnvc.w','cmnhi.w','cmnls.w','cmnge.w','cmnlt.w','cmngt.w','cmnle.w', + 'cmneq','cmnne','cmncs','cmnhs','cmncc','cmnlo','cmnmi','cmnpl','cmnvs','cmnvc','cmnhi','cmnls','cmnge','cmnlt','cmngt','cmnle', + /* Set Flags: Conditional Logical */ + 'andseq.w','andsne.w','andscs.w','andshs.w','andscc.w','andslo.w','andsmi.w','andspl.w','andsvs.w','andsvc.w','andshi.w','andsls.w','andsge.w','andslt.w','andsgt.w','andsle.w', + 'andseq','andsne','andscs','andshs','andscc','andslo','andsmi','andspl','andsvs','andsvc','andshi','andsls','andsge','andslt','andsgt','andsle', + 'bicseq.w','bicsne.w','bicscs.w','bicshs.w','bicscc.w','bicslo.w','bicsmi.w','bicspl.w','bicsvs.w','bicsvc.w','bicshi.w','bicsls.w','bicsge.w','bicslt.w','bicsgt.w','bicsle.w', + 'bicseq','bicsne','bicscs','bicshs','bicscc','bicslo','bicsmi','bicspl','bicsvs','bicsvc','bicshi','bicsls','bicsge','bicslt','bicsgt','bicsle', + 'orrseq.w','orrsne.w','orrscs.w','orrshs.w','orrscc.w','orrslo.w','orrsmi.w','orrspl.w','orrsvs.w','orrsvc.w','orrshi.w','orrsls.w','orrsge.w','orrslt.w','orrsgt.w','orrsle.w', + 'orrseq','orrsne','orrscs','orrshs','orrscc','orrslo','orrsmi','orrspl','orrsvs','orrsvc','orrshi','orrsls','orrsge','orrslt','orrsgt','orrsle', + 'ornseq.w','ornsne.w','ornscs.w','ornshs.w','ornscc.w','ornslo.w','ornsmi.w','ornspl.w','ornsvs.w','ornsvc.w','ornshi.w','ornsls.w','ornsge.w','ornslt.w','ornsgt.w','ornsle.w', + 'ornseq','ornsne','ornscs','ornshs','ornscc','ornslo','ornsmi','ornspl','ornsvs','ornsvc','ornshi','ornsls','ornsge','ornslt','ornsgt','ornsle', + 'eorseq.w','eorsne.w','eorscs.w','eorshs.w','eorscc.w','eorslo.w','eorsmi.w','eorspl.w','eorsvs.w','eorsvc.w','eorshi.w','eorsls.w','eorsge.w','eorslt.w','eorsgt.w','eorsle.w', + 'eorseq','eorsne','eorscs','eorshs','eorscc','eorslo','eorsmi','eorspl','eorsvs','eorsvc','eorshi','eorsls','eorsge','eorslt','eorsgt','eorsle', + 'mvnseq.w','mvnsne.w','mvnscs.w','mvnshs.w','mvnscc.w','mvnslo.w','mvnsmi.w','mvnspl.w','mvnsvs.w','mvnsvc.w','mvnshi.w','mvnsls.w','mvnsge.w','mvnslt.w','mvnsgt.w','mvnsle.w', + 'mvnseq','mvnsne','mvnscs','mvnshs','mvnscc','mvnslo','mvnsmi','mvnspl','mvnsvs','mvnsvc','mvnshi','mvnsls','mvnsge','mvnslt','mvnsgt','mvnsle', + 'movseq.w','movsne.w','movscs.w','movshs.w','movscc.w','movslo.w','movsmi.w','movspl.w','movsvs.w','movsvc.w','movshi.w','movsls.w','movsge.w','movslt.w','movsgt.w','movsle.w', + 'movseq','movsne','movscs','movshs','movscc','movslo','movsmi','movspl','movsvs','movsvc','movshi','movsls','movsge','movslt','movsgt','movsle', + 'teqeq','teqne','teqcs','teqhs','teqcc','teqlo','teqmi','teqpl','teqvs','teqvc','teqhi','teqls','teqge','teqlt','teqgt','teqle', + 'tsteq.w','tstne.w','tstcs.w','tsths.w','tstcc.w','tstlo.w','tstmi.w','tstpl.w','tstvs.w','tstvc.w','tsthi.w','tstls.w','tstge.w','tstlt.w','tstgt.w','tstle.w', + 'tsteq','tstne','tstcs','tsths','tstcc','tstlo','tstmi','tstpl','tstvs','tstvc','tsthi','tstls','tstge','tstlt','tstgt','tstle', + 'mrseq','mrsne','mrscs','mrshs','mrscc','mrslo','mrsmi','mrspl','mrsvs','mrsvc','mrshi','mrsls','mrsge','mrslt','mrsgt','mrsle', + 'msreq','msrne','msrcs','msrhs','msrcc','msrlo','msrmi','msrpl','msrvs','msrvc','msrhi','msrls','msrge','msrlt','msrgt','msrle', + /* Set Flags: Conditional Shifts and Rotates */ + 'asrseq.w','asrsne.w','asrscs.w','asrshs.w','asrscc.w','asrslo.w','asrsmi.w','asrspl.w','asrsvs.w','asrsvc.w','asrshi.w','asrsls.w','asrsge.w','asrslt.w','asrsgt.w','asrsle.w', + 'asrseq','asrsne','asrscs','asrshs','asrscc','asrslo','asrsmi','asrspl','asrsvs','asrsvc','asrshi','asrsls','asrsge','asrslt','asrsgt','asrsle', + 'lslseq.w','lslsne.w','lslscs.w','lslshs.w','lslscc.w','lslslo.w','lslsmi.w','lslspl.w','lslsvs.w','lslsvc.w','lslshi.w','lslsls.w','lslsge.w','lslslt.w','lslsgt.w','lslsle.w', + 'lslseq','lslsne','lslscs','lslshs','lslscc','lslslo','lslsmi','lslspl','lslsvs','lslsvc','lslshi','lslsls','lslsge','lslslt','lslsgt','lslsle', + 'lsrseq.w','lsrsne.w','lsrscs.w','lsrshs.w','lsrscc.w','lsrslo.w','lsrsmi.w','lsrspl.w','lsrsvs.w','lsrsvc.w','lsrshi.w','lsrsls.w','lsrsge.w','lsrslt.w','lsrsgt.w','lsrsle.w', + 'lsrseq','lsrsne','lsrscs','lsrshs','lsrscc','lsrslo','lsrsmi','lsrspl','lsrsvs','lsrsvc','lsrshi','lsrsls','lsrsge','lsrslt','lsrsgt','lsrsle', + 'rorseq.w','rorsne.w','rorscs.w','rorshs.w','rorscc.w','rorslo.w','rorsmi.w','rorspl.w','rorsvs.w','rorsvc.w','rorshi.w','rorsls.w','rorsge.w','rorslt.w','rorsgt.w','rorsle.w', + 'rorseq','rorsne','rorscs','rorshs','rorscc','rorslo','rorsmi','rorspl','rorsvs','rorsvc','rorshi','rorsls','rorsge','rorslt','rorsgt','rorsle', + 'rrxseq','rrxsne','rrxscs','rrxshs','rrxscc','rrxslo','rrxsmi','rrxspl','rrxsvs','rrxsvc','rrxshi','rrxsls','rrxsge','rrxslt','rrxsgt','rrxsle', + /* Set Flags: Conditional Multiply and Multiply-Add */ + 'mlaseq','mlasne','mlascs','mlashs','mlascc','mlaslo','mlasmi','mlaspl','mlasvs','mlasvc','mlashi','mlasls','mlasge','mlaslt','mlasgt','mlasle', + 'smullseq','smullsne','smullscs','smullshs','smullscc','smullslo','smullsmi','smullspl','smullsvs','smullsvc','smullshi','smullsls','smullsge','smullslt','smullsgt','smullsle', + 'umullseq','umullsne','umullscs','umullshs','umullscc','umullslo','umullsmi','umullspl','umullsvs','umullsvc','umullshi','umullsls','umullsge','umullslt','umullsgt','umullsle', + 'smlalseq','smlalsne','smlalscs','smlalshs','smlalscc','smlalslo','smlalsmi','smlalspl','smlalsvs','smlalsvc','smlalshi','smlalsls','smlalsge','smlalslt','smlalsgt','smlalsle', + 'umlalseq','umlalsne','umlalscs','umlalshs','umlalscc','umlalslo','umlalsmi','umlalspl','umlalsvs','umlalsvc','umlalshi','umlalsls','umlalsge','umlalslt','umlalsgt','umlalsle' + ), + /* Unconditional Flow Control Instructions */ + 7 => array( + /* Flow Control: Unconditional Branch and If-Then-Else */ + 'b.w','bal.w', + 'b','bal', + 'bl','blal', + 'bx','bxal', + 'blx','blxal', + 'bxj','bxjal', + 'cbnz', + 'cbz', + 'tbb','tbbal', + 'tbh','tbhal', + 'it', + 'itt', + 'ite', + 'ittt', + 'itet', + 'itte', + 'itee', + 'itttt', + 'itett', + 'ittet', + 'iteet', + 'ittte', + 'itete', + 'ittee', + 'iteee' + ), + /* Conditional Flow Control Instructions */ + 8 => array( + /* Flow Control: Conditional Branch and If-Then-Else */ + 'beq.w','bne.w','bcs.w','bhs.w','bcc.w','blo.w','bmi.w','bpl.w','bvs.w','bvc.w','bhi.w','bls.w','bge.w','blt.w','bgt.w','ble.w', + 'beq','bne','bcs','bhs','bcc','blo','bmi','bpl','bvs','bvc','bhi','bls','bge','blt','bgt','ble', + 'bleq','blne','blcs','blhs','blcc','bllo','blmi','blpl','blvs','blvc','blhi','blls','blge','bllt','blgt','blle', + 'bxeq','bxne','bxcs','bxhs','bxcc','bxlo','bxmi','bxpl','bxvs','bxvc','bxhi','bxls','bxge','bxlt','bxgt','bxle', + 'blxeq','blxne','blxcs','blxhs','blxcc','blxlo','blxmi','blxpl','blxvs','blxvc','blxhi','blxls','blxge','blxlt','blxgt','blxle', + 'bxjeq','bxjne','bxjcs','bxjhs','bxjcc','bxjlo','bxjmi','bxjpl','bxjvs','bxjvc','bxjhi','bxjls','bxjge','bxjlt','bxjgt','bxjle', + 'tbbeq','tbbne','tbbcs','tbbhs','tbbcc','tbblo','tbbmi','tbbpl','tbbvs','tbbvc','tbbhi','tbbls','tbbge','tbblt','tbbgt','tbble', + 'tbheq','tbhne','tbhcs','tbhhs','tbhcc','tbhlo','tbhmi','tbhpl','tbhvs','tbhvc','tbhhi','tbhls','tbhge','tbhlt','tbhgt','tbhle' + ), + /* Unconditional Syncronization Instructions */ + 9 => array( + /* Synchronization: Unconditional Loads, Stores and Barriers */ + 'ldrexd','ldrexdal', + 'ldrex','ldrexal', + 'ldrexh','ldrexhal', + 'ldrexb','ldrexbal', + 'strexd','strexdal', + 'strex','strexal', + 'strexh','strexhal', + 'strexb','strexbal', + 'clrex','clrexal', + 'swp','swpal', + 'swpb','swpbal', + 'dbc','dbcal', + 'dsb','dsbal', + 'isb','isbal', + 'yield.w','yieldal.w', + 'yield','yieldal', + 'nop.w','nopal.w', + 'nop','nopal' + ), + /* Conditional Syncronization Instructions */ + 10 => array( + /* Synchronization: Conditional Loads, Stores and Barriers */ + 'ldrexdeq','ldrexdne','ldrexdcs','ldrexdhs','ldrexdcc','ldrexdlo','ldrexdmi','ldrexdpl','ldrexdvs','ldrexdvc','ldrexdhi','ldrexdls','ldrexdge','ldrexdlt','ldrexdgt','ldrexdle', + 'ldrexeq','ldrexne','ldrexcs','ldrexhs','ldrexcc','ldrexlo','ldrexmi','ldrexpl','ldrexvs','ldrexvc','ldrexhi','ldrexls','ldrexge','ldrexlt','ldrexgt','ldrexle', + 'ldrexheq','ldrexhne','ldrexhcs','ldrexhhs','ldrexhcc','ldrexhlo','ldrexhmi','ldrexhpl','ldrexhvs','ldrexhvc','ldrexhhi','ldrexhls','ldrexhge','ldrexhlt','ldrexhgt','ldrexhle', + 'ldrexbeq','ldrexbne','ldrexbcs','ldrexbhs','ldrexbcc','ldrexblo','ldrexbmi','ldrexbpl','ldrexbvs','ldrexbvc','ldrexbhi','ldrexbls','ldrexbge','ldrexblt','ldrexbgt','ldrexble', + 'strexdeq','strexdne','strexdcs','strexdhs','strexdcc','strexdlo','strexdmi','strexdpl','strexdvs','strexdvc','strexdhi','strexdls','strexdge','strexdlt','strexdgt','strexdle', + 'strexeq','strexne','strexcs','strexhs','strexcc','strexlo','strexmi','strexpl','strexvs','strexvc','strexhi','strexls','strexge','strexlt','strexgt','strexle', + 'strexheq','strexhne','strexhcs','strexhhs','strexhcc','strexhlo','strexhmi','strexhpl','strexhvs','strexhvc','strexhhi','strexhls','strexhge','strexhlt','strexhgt','strexhle', + 'strexbeq','strexbne','strexbcs','strexbhs','strexbcc','strexblo','strexbmi','strexbpl','strexbvs','strexbvc','strexbhi','strexbls','strexbge','strexblt','strexbgt','strexble', + 'clrexeq','clrexne','clrexcs','clrexhs','clrexcc','clrexlo','clrexmi','clrexpl','clrexvs','clrexvc','clrexhi','clrexls','clrexge','clrexlt','clrexgt','clrexle', + 'swpeq','swpne','swpcs','swphs','swpcc','swplo','swpmi','swppl','swpvs','swpvc','swphi','swpls','swpge','swplt','swpgt','swple', + 'swpbeq','swpbne','swpbcs','swpbhs','swpbcc','swpblo','swpbmi','swpbpl','swpbvs','swpbvc','swpbhi','swpbls','swpbge','swpblt','swpbgt','swpble', + 'dbceq','dbcne','dbccs','dbchs','dbccc','dbclo','dbcmi','dbcpl','dbcvs','dbcvc','dbchi','dbcls','dbcge','dbclt','dbcgt','dbcle', + 'dsbeq','dsbne','dsbcs','dsbhs','dsbcc','dsblo','dsbmi','dsbpl','dsbvs','dsbvc','dsbhi','dsbls','dsbge','dsblt','dsbgt','dsble', + 'isbeq','isbne','isbcs','isbhs','isbcc','isblo','isbmi','isbpl','isbvs','isbvc','isbhi','isbls','isbge','isblt','isbgt','isble', + 'yieldeq.w','yieldne.w','yieldcs.w','yieldhs.w','yieldcc.w','yieldlo.w','yieldmi.w','yieldpl.w','yieldvs.w','yieldvc.w','yieldhi.w','yieldls.w','yieldge.w','yieldlt.w','yieldgt.w','yieldle.w', + 'yieldeq','yieldne','yieldcs','yieldhs','yieldcc','yieldlo','yieldmi','yieldpl','yieldvs','yieldvc','yieldhi','yieldls','yieldge','yieldlt','yieldgt','yieldle', + 'nopeq.w','nopne.w','nopcs.w','nophs.w','nopcc.w','noplo.w','nopmi.w','noppl.w','nopvs.w','nopvc.w','nophi.w','nopls.w','nopge.w','noplt.w','nopgt.w','nople.w', + 'nopeq','nopne','nopcs','nophs','nopcc','noplo','nopmi','noppl','nopvs','nopvc','nophi','nopls','nopge','noplt','nopgt','nople' + ), + /* Unconditional ARMv6 SIMD */ + 11 => array( + /* ARMv6 SIMD: Unconditional Addition, Subtraction & Saturation */ + 'sadd16','sadd16al', + 'sadd8','sadd8al', + 'uadd16','uadd16al', + 'uadd8','uadd8al', + 'ssub16','ssub16al', + 'ssub8','ssub8al', + 'usub16','usub16al', + 'usub8','usub8al', + 'sasx','sasxal', + 'ssax','ssaxal', + 'uasx','uasxal', + 'usax','usaxal', + 'usad8','usad8al', + 'usada8','usada8al', + /* ARMv6 SIMD: Unconditional Halving Addition & Subtraction */ + 'shadd16','shadd16al', + 'shadd8','shadd8al', + 'uhadd16','uhadd16al', + 'uhadd8','uhadd8al', + 'shsub16','shsub16al', + 'shsub8','shsub8al', + 'uhsub16','uhsub16al', + 'uhsub8','uhsub8al', + 'shasx','shasxal', + 'shsax','shsaxal', + 'uhasx','uhasxal', + 'uhsax','uhsaxal', + /* ARMv6 SIMD: Unconditional Saturating Operations */ + 'qadd','qaddal', + 'qadd16','qadd16al', + 'qadd8','qadd8al', + 'uqadd16','uqadd16al', + 'uqadd8','uqadd8al', + 'qsub','qsubal', + 'qsub16','qsub16al', + 'qsub8','qsub8al', + 'uqsub16','uqsub16al', + 'uqsub8','uqsub8al', + 'qasx','qasxal', + 'qsax','qsaxal', + 'uqasx','uqasxal', + 'uqsax','uqsaxal', + 'qdadd','qdaddal', + 'qdsub','qdsubal', + 'ssat','ssatal', + 'ssat16','ssat16al', + 'usat','usatal', + 'usat16','usat16al', + /* ARMv6 SIMD: Unconditional Permutation and Combine Operations */ + 'sxtah','sxtahal', + 'sxtab','sxtabal', + 'sxtab16','sxtab16al', + 'uxtah','uxtahal', + 'uxtab','uxtabal', + 'uxtab16','uxtab16al', + 'sxth.w','sxthal.w', + 'sxth','sxthal', + 'sxtb.w','sxtbal.w', + 'sxtb','sxtbal', + 'sxtb16','sxtb16al', + 'uxth.w','uxthal.w', + 'uxth','uxthal', + 'uxtb.w','uxtbal.w', + 'uxtb','uxtbal', + 'uxtb16','uxtb16al', + 'pkhbt','pkhbtal', + 'pkhtb','pkhtbal', + 'rbit','rbital', + 'rev.w','reval.w', + 'rev','reval', + 'rev16.w','rev16al.w', + 'rev16','rev16al', + 'revsh.w','revshal.w', + 'revsh','revshal', + 'sel','selal', + /* ARMv6 SIMD: Unconditional Multiply and Multiply-Add */ + 'smlad','smladal', + 'smladx','smladxal', + 'smlsd','smlsdal', + 'smlsdx','smlsdxal', + 'smlald','smlaldal', + 'smlaldx','smlaldxal', + 'smlsld','smlsldal', + 'smlsldx','smlsldxal', + 'smmul','smmulal', + 'smmulr','smmulral', + 'smmla','smmlaal', + 'smmlar','smmlaral', + 'smmls','smmlsal', + 'smmlsr','smmlsral', + 'smuad','smuadal', + 'smuadx','smuadxal', + 'smusd','smusdal', + 'smusdx','smusdxal', + 'umaal','umaalal' + ), + /* Conditional ARMv6 SIMD */ + 12 => array( + /* ARMv6 SIMD: Conditional Addition, Subtraction & Saturation */ + 'sadd16eq','sadd16ne','sadd16cs','sadd16hs','sadd16cc','sadd16lo','sadd16mi','sadd16pl','sadd16vs','sadd16vc','sadd16hi','sadd16ls','sadd16ge','sadd16lt','sadd16gt','sadd16le', + 'sadd8eq','sadd8ne','sadd8cs','sadd8hs','sadd8cc','sadd8lo','sadd8mi','sadd8pl','sadd8vs','sadd8vc','sadd8hi','sadd8ls','sadd8ge','sadd8lt','sadd8gt','sadd8le', + 'uadd16eq','uadd16ne','uadd16cs','uadd16hs','uadd16cc','uadd16lo','uadd16mi','uadd16pl','uadd16vs','uadd16vc','uadd16hi','uadd16ls','uadd16ge','uadd16lt','uadd16gt','uadd16le', + 'uadd8eq','uadd8ne','uadd8cs','uadd8hs','uadd8cc','uadd8lo','uadd8mi','uadd8pl','uadd8vs','uadd8vc','uadd8hi','uadd8ls','uadd8ge','uadd8lt','uadd8gt','uadd8le', + 'ssub16eq','ssub16ne','ssub16cs','ssub16hs','ssub16cc','ssub16lo','ssub16mi','ssub16pl','ssub16vs','ssub16vc','ssub16hi','ssub16ls','ssub16ge','ssub16lt','ssub16gt','ssub16le', + 'ssub8eq','ssub8ne','ssub8cs','ssub8hs','ssub8cc','ssub8lo','ssub8mi','ssub8pl','ssub8vs','ssub8vc','ssub8hi','ssub8ls','ssub8ge','ssub8lt','ssub8gt','ssub8le', + 'usub16eq','usub16ne','usub16cs','usub16hs','usub16cc','usub16lo','usub16mi','usub16pl','usub16vs','usub16vc','usub16hi','usub16ls','usub16ge','usub16lt','usub16gt','usub16le', + 'usub8eq','usub8ne','usub8cs','usub8hs','usub8cc','usub8lo','usub8mi','usub8pl','usub8vs','usub8vc','usub8hi','usub8ls','usub8ge','usub8lt','usub8gt','usub8le', + 'sasxeq','sasxne','sasxcs','sasxhs','sasxcc','sasxlo','sasxmi','sasxpl','sasxvs','sasxvc','sasxhi','sasxls','sasxge','sasxlt','sasxgt','sasxle', + 'ssaxeq','ssaxne','ssaxcs','ssaxhs','ssaxcc','ssaxlo','ssaxmi','ssaxpl','ssaxvs','ssaxvc','ssaxhi','ssaxls','ssaxge','ssaxlt','ssaxgt','ssaxle', + 'uasxeq','uasxne','uasxcs','uasxhs','uasxcc','uasxlo','uasxmi','uasxpl','uasxvs','uasxvc','uasxhi','uasxls','uasxge','uasxlt','uasxgt','uasxle', + 'usaxeq','usaxne','usaxcs','usaxhs','usaxcc','usaxlo','usaxmi','usaxpl','usaxvs','usaxvc','usaxhi','usaxls','usaxge','usaxlt','usaxgt','usaxle', + 'usad8eq','usad8ne','usad8cs','usad8hs','usad8cc','usad8lo','usad8mi','usad8pl','usad8vs','usad8vc','usad8hi','usad8ls','usad8ge','usad8lt','usad8gt','usad8le', + 'usada8eq','usada8ne','usada8cs','usada8hs','usada8cc','usada8lo','usada8mi','usada8pl','usada8vs','usada8vc','usada8hi','usada8ls','usada8ge','usada8lt','usada8gt','usada8le', + /* ARMv6 SIMD: Conditional Halving Addition & Subtraction */ + 'shadd16eq','shadd16ne','shadd16cs','shadd16hs','shadd16cc','shadd16lo','shadd16mi','shadd16pl','shadd16vs','shadd16vc','shadd16hi','shadd16ls','shadd16ge','shadd16lt','shadd16gt','shadd16le', + 'shadd8eq','shadd8ne','shadd8cs','shadd8hs','shadd8cc','shadd8lo','shadd8mi','shadd8pl','shadd8vs','shadd8vc','shadd8hi','shadd8ls','shadd8ge','shadd8lt','shadd8gt','shadd8le', + 'uhadd16eq','uhadd16ne','uhadd16cs','uhadd16hs','uhadd16cc','uhadd16lo','uhadd16mi','uhadd16pl','uhadd16vs','uhadd16vc','uhadd16hi','uhadd16ls','uhadd16ge','uhadd16lt','uhadd16gt','uhadd16le', + 'uhadd8eq','uhadd8ne','uhadd8cs','uhadd8hs','uhadd8cc','uhadd8lo','uhadd8mi','uhadd8pl','uhadd8vs','uhadd8vc','uhadd8hi','uhadd8ls','uhadd8ge','uhadd8lt','uhadd8gt','uhadd8le', + 'shsub16eq','shsub16ne','shsub16cs','shsub16hs','shsub16cc','shsub16lo','shsub16mi','shsub16pl','shsub16vs','shsub16vc','shsub16hi','shsub16ls','shsub16ge','shsub16lt','shsub16gt','shsub16le', + 'shsub8eq','shsub8ne','shsub8cs','shsub8hs','shsub8cc','shsub8lo','shsub8mi','shsub8pl','shsub8vs','shsub8vc','shsub8hi','shsub8ls','shsub8ge','shsub8lt','shsub8gt','shsub8le', + 'uhsub16eq','uhsub16ne','uhsub16cs','uhsub16hs','uhsub16cc','uhsub16lo','uhsub16mi','uhsub16pl','uhsub16vs','uhsub16vc','uhsub16hi','uhsub16ls','uhsub16ge','uhsub16lt','uhsub16gt','uhsub16le', + 'uhsub8eq','uhsub8ne','uhsub8cs','uhsub8hs','uhsub8cc','uhsub8lo','uhsub8mi','uhsub8pl','uhsub8vs','uhsub8vc','uhsub8hi','uhsub8ls','uhsub8ge','uhsub8lt','uhsub8gt','uhsub8le', + 'shasxeq','shasxne','shasxcs','shasxhs','shasxcc','shasxlo','shasxmi','shasxpl','shasxvs','shasxvc','shasxhi','shasxls','shasxge','shasxlt','shasxgt','shasxle', + 'shsaxeq','shsaxne','shsaxcs','shsaxhs','shsaxcc','shsaxlo','shsaxmi','shsaxpl','shsaxvs','shsaxvc','shsaxhi','shsaxls','shsaxge','shsaxlt','shsaxgt','shsaxle', + 'uhasxeq','uhasxne','uhasxcs','uhasxhs','uhasxcc','uhasxlo','uhasxmi','uhasxpl','uhasxvs','uhasxvc','uhasxhi','uhasxls','uhasxge','uhasxlt','uhasxgt','uhasxle', + 'uhsaxeq','uhsaxne','uhsaxcs','uhsaxhs','uhsaxcc','uhsaxlo','uhsaxmi','uhsaxpl','uhsaxvs','uhsaxvc','uhsaxhi','uhsaxls','uhsaxge','uhsaxlt','uhsaxgt','uhsaxle', + /* ARMv6 SIMD: Conditional Saturating Operations */ + 'qaddeq','qaddne','qaddcs','qaddhs','qaddcc','qaddlo','qaddmi','qaddpl','qaddvs','qaddvc','qaddhi','qaddls','qaddge','qaddlt','qaddgt','qaddle', + 'qadd16eq','qadd16ne','qadd16cs','qadd16hs','qadd16cc','qadd16lo','qadd16mi','qadd16pl','qadd16vs','qadd16vc','qadd16hi','qadd16ls','qadd16ge','qadd16lt','qadd16gt','qadd16le', + 'qadd8eq','qadd8ne','qadd8cs','qadd8hs','qadd8cc','qadd8lo','qadd8mi','qadd8pl','qadd8vs','qadd8vc','qadd8hi','qadd8ls','qadd8ge','qadd8lt','qadd8gt','qadd8le', + 'uqadd16eq','uqadd16ne','uqadd16cs','uqadd16hs','uqadd16cc','uqadd16lo','uqadd16mi','uqadd16pl','uqadd16vs','uqadd16vc','uqadd16hi','uqadd16ls','uqadd16ge','uqadd16lt','uqadd16gt','uqadd16le', + 'uqadd8eq','uqadd8ne','uqadd8cs','uqadd8hs','uqadd8cc','uqadd8lo','uqadd8mi','uqadd8pl','uqadd8vs','uqadd8vc','uqadd8hi','uqadd8ls','uqadd8ge','uqadd8lt','uqadd8gt','uqadd8le', + 'qsubeq','qsubne','qsubcs','qsubhs','qsubcc','qsublo','qsubmi','qsubpl','qsubvs','qsubvc','qsubhi','qsubls','qsubge','qsublt','qsubgt','qsuble', + 'qsub16eq','qsub16ne','qsub16cs','qsub16hs','qsub16cc','qsub16lo','qsub16mi','qsub16pl','qsub16vs','qsub16vc','qsub16hi','qsub16ls','qsub16ge','qsub16lt','qsub16gt','qsub16le', + 'qsub8eq','qsub8ne','qsub8cs','qsub8hs','qsub8cc','qsub8lo','qsub8mi','qsub8pl','qsub8vs','qsub8vc','qsub8hi','qsub8ls','qsub8ge','qsub8lt','qsub8gt','qsub8le', + 'uqsub16eq','uqsub16ne','uqsub16cs','uqsub16hs','uqsub16cc','uqsub16lo','uqsub16mi','uqsub16pl','uqsub16vs','uqsub16vc','uqsub16hi','uqsub16ls','uqsub16ge','uqsub16lt','uqsub16gt','uqsub16le', + 'uqsub8eq','uqsub8ne','uqsub8cs','uqsub8hs','uqsub8cc','uqsub8lo','uqsub8mi','uqsub8pl','uqsub8vs','uqsub8vc','uqsub8hi','uqsub8ls','uqsub8ge','uqsub8lt','uqsub8gt','uqsub8le', + 'qasxeq','qasxne','qasxcs','qasxhs','qasxcc','qasxlo','qasxmi','qasxpl','qasxvs','qasxvc','qasxhi','qasxls','qasxge','qasxlt','qasxgt','qasxle', + 'qsaxeq','qsaxne','qsaxcs','qsaxhs','qsaxcc','qsaxlo','qsaxmi','qsaxpl','qsaxvs','qsaxvc','qsaxhi','qsaxls','qsaxge','qsaxlt','qsaxgt','qsaxle', + 'uqasxeq','uqasxne','uqasxcs','uqasxhs','uqasxcc','uqasxlo','uqasxmi','uqasxpl','uqasxvs','uqasxvc','uqasxhi','uqasxls','uqasxge','uqasxlt','uqasxgt','uqasxle', + 'uqsaxeq','uqsaxne','uqsaxcs','uqsaxhs','uqsaxcc','uqsaxlo','uqsaxmi','uqsaxpl','uqsaxvs','uqsaxvc','uqsaxhi','uqsaxls','uqsaxge','uqsaxlt','uqsaxgt','uqsaxle', + 'qdaddeq','qdaddne','qdaddcs','qdaddhs','qdaddcc','qdaddlo','qdaddmi','qdaddpl','qdaddvs','qdaddvc','qdaddhi','qdaddls','qdaddge','qdaddlt','qdaddgt','qdaddle', + 'qdsubeq','qdsubne','qdsubcs','qdsubhs','qdsubcc','qdsublo','qdsubmi','qdsubpl','qdsubvs','qdsubvc','qdsubhi','qdsubls','qdsubge','qdsublt','qdsubgt','qdsuble', + 'ssateq','ssatne','ssatcs','ssaths','ssatcc','ssatlo','ssatmi','ssatpl','ssatvs','ssatvc','ssathi','ssatls','ssatge','ssatlt','ssatgt','ssatle', + 'ssat16eq','ssat16ne','ssat16cs','ssat16hs','ssat16cc','ssat16lo','ssat16mi','ssat16pl','ssat16vs','ssat16vc','ssat16hi','ssat16ls','ssat16ge','ssat16lt','ssat16gt','ssat16le', + 'usateq','usatne','usatcs','usaths','usatcc','usatlo','usatmi','usatpl','usatvs','usatvc','usathi','usatls','usatge','usatlt','usatgt','usatle', + 'usat16eq','usat16ne','usat16cs','usat16hs','usat16cc','usat16lo','usat16mi','usat16pl','usat16vs','usat16vc','usat16hi','usat16ls','usat16ge','usat16lt','usat16gt','usat16le', + /* ARMv6 SIMD: Conditional Permutation and Combine Operations */ + 'sxtaheq','sxtahne','sxtahcs','sxtahhs','sxtahcc','sxtahlo','sxtahmi','sxtahpl','sxtahvs','sxtahvc','sxtahhi','sxtahls','sxtahge','sxtahlt','sxtahgt','sxtahle', + 'sxtabeq','sxtabne','sxtabcs','sxtabhs','sxtabcc','sxtablo','sxtabmi','sxtabpl','sxtabvs','sxtabvc','sxtabhi','sxtabls','sxtabge','sxtablt','sxtabgt','sxtable', + 'sxtab16eq','sxtab16ne','sxtab16cs','sxtab16hs','sxtab16cc','sxtab16lo','sxtab16mi','sxtab16pl','sxtab16vs','sxtab16vc','sxtab16hi','sxtab16ls','sxtab16ge','sxtab16lt','sxtab16gt','sxtab16le', + 'uxtaheq','uxtahne','uxtahcs','uxtahhs','uxtahcc','uxtahlo','uxtahmi','uxtahpl','uxtahvs','uxtahvc','uxtahhi','uxtahls','uxtahge','uxtahlt','uxtahgt','uxtahle', + 'uxtabeq','uxtabne','uxtabcs','uxtabhs','uxtabcc','uxtablo','uxtabmi','uxtabpl','uxtabvs','uxtabvc','uxtabhi','uxtabls','uxtabge','uxtablt','uxtabgt','uxtable', + 'uxtab16eq','uxtab16ne','uxtab16cs','uxtab16hs','uxtab16cc','uxtab16lo','uxtab16mi','uxtab16pl','uxtab16vs','uxtab16vc','uxtab16hi','uxtab16ls','uxtab16ge','uxtab16lt','uxtab16gt','uxtab16le', + 'sxtheq.w','sxthne.w','sxthcs.w','sxthhs.w','sxthcc.w','sxthlo.w','sxthmi.w','sxthpl.w','sxthvs.w','sxthvc.w','sxthhi.w','sxthls.w','sxthge.w','sxthlt.w','sxthgt.w','sxthle.w', + 'sxtheq','sxthne','sxthcs','sxthhs','sxthcc','sxthlo','sxthmi','sxthpl','sxthvs','sxthvc','sxthhi','sxthls','sxthge','sxthlt','sxthgt','sxthle', + 'sxtbeq.w','sxtbne.w','sxtbcs.w','sxtbhs.w','sxtbcc.w','sxtblo.w','sxtbmi.w','sxtbpl.w','sxtbvs.w','sxtbvc.w','sxtbhi.w','sxtbls.w','sxtbge.w','sxtblt.w','sxtbgt.w','sxtble.w', + 'sxtbeq','sxtbne','sxtbcs','sxtbhs','sxtbcc','sxtblo','sxtbmi','sxtbpl','sxtbvs','sxtbvc','sxtbhi','sxtbls','sxtbge','sxtblt','sxtbgt','sxtble', + 'sxtb16eq','sxtb16ne','sxtb16cs','sxtb16hs','sxtb16cc','sxtb16lo','sxtb16mi','sxtb16pl','sxtb16vs','sxtb16vc','sxtb16hi','sxtb16ls','sxtb16ge','sxtb16lt','sxtb16gt','sxtb16le', + 'uxtheq.w','uxthne.w','uxthcs.w','uxthhs.w','uxthcc.w','uxthlo.w','uxthmi.w','uxthpl.w','uxthvs.w','uxthvc.w','uxthhi.w','uxthls.w','uxthge.w','uxthlt.w','uxthgt.w','uxthle.w', + 'uxtheq','uxthne','uxthcs','uxthhs','uxthcc','uxthlo','uxthmi','uxthpl','uxthvs','uxthvc','uxthhi','uxthls','uxthge','uxthlt','uxthgt','uxthle', + 'uxtbeq.w','uxtbne.w','uxtbcs.w','uxtbhs.w','uxtbcc.w','uxtblo.w','uxtbmi.w','uxtbpl.w','uxtbvs.w','uxtbvc.w','uxtbhi.w','uxtbls.w','uxtbge.w','uxtblt.w','uxtbgt.w','uxtble.w', + 'uxtbeq','uxtbne','uxtbcs','uxtbhs','uxtbcc','uxtblo','uxtbmi','uxtbpl','uxtbvs','uxtbvc','uxtbhi','uxtbls','uxtbge','uxtblt','uxtbgt','uxtble', + 'uxtb16eq','uxtb16ne','uxtb16cs','uxtb16hs','uxtb16cc','uxtb16lo','uxtb16mi','uxtb16pl','uxtb16vs','uxtb16vc','uxtb16hi','uxtb16ls','uxtb16ge','uxtb16lt','uxtb16gt','uxtb16le', + 'pkhbteq','pkhbtne','pkhbtcs','pkhbths','pkhbtcc','pkhbtlo','pkhbtmi','pkhbtpl','pkhbtvs','pkhbtvc','pkhbthi','pkhbtls','pkhbtge','pkhbtlt','pkhbtgt','pkhbtle', + 'pkhtbeq','pkhtbne','pkhtbcs','pkhtbhs','pkhtbcc','pkhtblo','pkhtbmi','pkhtbpl','pkhtbvs','pkhtbvc','pkhtbhi','pkhtbls','pkhtbge','pkhtblt','pkhtbgt','pkhtble', + 'rbiteq','rbitne','rbitcs','rbiths','rbitcc','rbitlo','rbitmi','rbitpl','rbitvs','rbitvc','rbithi','rbitls','rbitge','rbitlt','rbitgt','rbitle', + 'reveq.w','revne.w','revcs.w','revhs.w','revcc.w','revlo.w','revmi.w','revpl.w','revvs.w','revvc.w','revhi.w','revls.w','revge.w','revlt.w','revgt.w','revle.w', + 'reveq','revne','revcs','revhs','revcc','revlo','revmi','revpl','revvs','revvc','revhi','revls','revge','revlt','revgt','revle', + 'rev16eq.w','rev16ne.w','rev16cs.w','rev16hs.w','rev16cc.w','rev16lo.w','rev16mi.w','rev16pl.w','rev16vs.w','rev16vc.w','rev16hi.w','rev16ls.w','rev16ge.w','rev16lt.w','rev16gt.w','rev16le.w', + 'rev16eq','rev16ne','rev16cs','rev16hs','rev16cc','rev16lo','rev16mi','rev16pl','rev16vs','rev16vc','rev16hi','rev16ls','rev16ge','rev16lt','rev16gt','rev16le', + 'revsheq.w','revshne.w','revshcs.w','revshhs.w','revshcc.w','revshlo.w','revshmi.w','revshpl.w','revshvs.w','revshvc.w','revshhi.w','revshls.w','revshge.w','revshlt.w','revshgt.w','revshle.w', + 'revsheq','revshne','revshcs','revshhs','revshcc','revshlo','revshmi','revshpl','revshvs','revshvc','revshhi','revshls','revshge','revshlt','revshgt','revshle', + 'seleq','selne','selcs','selhs','selcc','sello','selmi','selpl','selvs','selvc','selhi','sells','selge','sellt','selgt','selle', + /* ARMv6 SIMD: Conditional Multiply and Multiply-Add */ + 'smladeq','smladne','smladcs','smladhs','smladcc','smladlo','smladmi','smladpl','smladvs','smladvc','smladhi','smladls','smladge','smladlt','smladgt','smladle', + 'smladxeq','smladxne','smladxcs','smladxhs','smladxcc','smladxlo','smladxmi','smladxpl','smladxvs','smladxvc','smladxhi','smladxls','smladxge','smladxlt','smladxgt','smladxle', + 'smlsdeq','smlsdne','smlsdcs','smlsdhs','smlsdcc','smlsdlo','smlsdmi','smlsdpl','smlsdvs','smlsdvc','smlsdhi','smlsdls','smlsdge','smlsdlt','smlsdgt','smlsdle', + 'smlsdxeq','smlsdxne','smlsdxcs','smlsdxhs','smlsdxcc','smlsdxlo','smlsdxmi','smlsdxpl','smlsdxvs','smlsdxvc','smlsdxhi','smlsdxls','smlsdxge','smlsdxlt','smlsdxgt','smlsdxle', + 'smlaldeq','smlaldne','smlaldcs','smlaldhs','smlaldcc','smlaldlo','smlaldmi','smlaldpl','smlaldvs','smlaldvc','smlaldhi','smlaldls','smlaldge','smlaldlt','smlaldgt','smlaldle', + 'smlaldxeq','smlaldxne','smlaldxcs','smlaldxhs','smlaldxcc','smlaldxlo','smlaldxmi','smlaldxpl','smlaldxvs','smlaldxvc','smlaldxhi','smlaldxls','smlaldxge','smlaldxlt','smlaldxgt','smlaldxle', + 'smlsldeq','smlsldne','smlsldcs','smlsldhs','smlsldcc','smlsldlo','smlsldmi','smlsldpl','smlsldvs','smlsldvc','smlsldhi','smlsldls','smlsldge','smlsldlt','smlsldgt','smlsldle', + 'smlsldxeq','smlsldxne','smlsldxcs','smlsldxhs','smlsldxcc','smlsldxlo','smlsldxmi','smlsldxpl','smlsldxvs','smlsldxvc','smlsldxhi','smlsldxls','smlsldxge','smlsldxlt','smlsldxgt','smlsldxle', + 'smmuleq','smmulne','smmulcs','smmulhs','smmulcc','smmullo','smmulmi','smmulpl','smmulvs','smmulvc','smmulhi','smmulls','smmulge','smmullt','smmulgt','smmulle', + 'smmulreq','smmulrne','smmulrcs','smmulrhs','smmulrcc','smmulrlo','smmulrmi','smmulrpl','smmulrvs','smmulrvc','smmulrhi','smmulrls','smmulrge','smmulrlt','smmulrgt','smmulrle', + 'smmlaeq','smmlane','smmlacs','smmlahs','smmlacc','smmlalo','smmlami','smmlapl','smmlavs','smmlavc','smmlahi','smmlals','smmlage','smmlalt','smmlagt','smmlale', + 'smmlareq','smmlarne','smmlarcs','smmlarhs','smmlarcc','smmlarlo','smmlarmi','smmlarpl','smmlarvs','smmlarvc','smmlarhi','smmlarls','smmlarge','smmlarlt','smmlargt','smmlarle', + 'smmlseq','smmlsne','smmlscs','smmlshs','smmlscc','smmlslo','smmlsmi','smmlspl','smmlsvs','smmlsvc','smmlshi','smmlsls','smmlsge','smmlslt','smmlsgt','smmlsle', + 'smmlsreq','smmlsrne','smmlsrcs','smmlsrhs','smmlsrcc','smmlsrlo','smmlsrmi','smmlsrpl','smmlsrvs','smmlsrvc','smmlsrhi','smmlsrls','smmlsrge','smmlsrlt','smmlsrgt','smmlsrle', + 'smuadeq','smuadne','smuadcs','smuadhs','smuadcc','smuadlo','smuadmi','smuadpl','smuadvs','smuadvc','smuadhi','smuadls','smuadge','smuadlt','smuadgt','smuadle', + 'smuadxeq','smuadxne','smuadxcs','smuadxhs','smuadxcc','smuadxlo','smuadxmi','smuadxpl','smuadxvs','smuadxvc','smuadxhi','smuadxls','smuadxge','smuadxlt','smuadxgt','smuadxle', + 'smusdeq','smusdne','smusdcs','smusdhs','smusdcc','smusdlo','smusdmi','smusdpl','smusdvs','smusdvc','smusdhi','smusdls','smusdge','smusdlt','smusdgt','smusdle', + 'smusdxeq','smusdxne','smusdxcs','smusdxhs','smusdxcc','smusdxlo','smusdxmi','smusdxpl','smusdxvs','smusdxvc','smusdxhi','smusdxls','smusdxge','smusdxlt','smusdxgt','smusdxle', + 'umaaleq','umaalne','umaalcs','umaalhs','umaalcc','umaallo','umaalmi','umaalpl','umaalvs','umaalvc','umaalhi','umaalls','umaalge','umaallt','umaalgt','umaalle' + ), + /* Unconditional Coprocessor Instructions */ + 13 => array( + /* Data Processing: Unconditional Coprocessor Instructions */ + 'cdp','cdpal', + 'cdp2','cdp2al', + 'ldc','ldcal', + 'ldcl','ldclal', + 'ldc2','ldc2al', + 'ldc2l','ldc2lal', + 'stc','stcal', + 'stcl','stclal', + 'stc2','stc2al', + 'stc2l','stc2lal', + 'mcr','mcral', + 'mcr2','mcr2al', + 'mcrr','mcrral', + 'mcrr2','mcrr2al', + 'mrc','mrcal', + 'mrc2','mrc2al', + 'mrrc','mrrcal', + 'mrrc2','mrrc2al' + ), + /* Conditional Coprocessor Instructions */ + 14 => array( + /* Data Processing: Conditional Coprocessor Instructions */ + 'cdpeq','cdpne','cdpcs','cdphs','cdpcc','cdplo','cdpmi','cdppl','cdpvs','cdpvc','cdphi','cdpls','cdpge','cdplt','cdpgt','cdple', + 'cdp2eq','cdp2ne','cdp2cs','cdp2hs','cdp2cc','cdp2lo','cdp2mi','cdp2pl','cdp2vs','cdp2vc','cdp2hi','cdp2ls','cdp2ge','cdp2lt','cdp2gt','cdp2le', + 'ldceq','ldcne','ldccs','ldchs','ldccc','ldclo','ldcmi','ldcpl','ldcvs','ldcvc','ldchi','ldcls','ldcge','ldclt','ldcgt','ldcle', + 'ldcleq','ldclne','ldclcs','ldclhs','ldclcc','ldcllo','ldclmi','ldclpl','ldclvs','ldclvc','ldclhi','ldclls','ldclge','ldcllt','ldclgt','ldclle', + 'ldc2eq','ldc2ne','ldc2cs','ldc2hs','ldc2cc','ldc2lo','ldc2mi','ldc2pl','ldc2vs','ldc2vc','ldc2hi','ldc2ls','ldc2ge','ldc2lt','ldc2gt','ldc2le', + 'ldc2leq','ldc2lne','ldc2lcs','ldc2lhs','ldc2lcc','ldc2llo','ldc2lmi','ldc2lpl','ldc2lvs','ldc2lvc','ldc2lhi','ldc2lls','ldc2lge','ldc2llt','ldc2lgt','ldc2lle', + 'stceq','stcne','stccs','stchs','stccc','stclo','stcmi','stcpl','stcvs','stcvc','stchi','stcls','stcge','stclt','stcgt','stcle', + 'stcleq','stclne','stclcs','stclhs','stclcc','stcllo','stclmi','stclpl','stclvs','stclvc','stclhi','stclls','stclge','stcllt','stclgt','stclle', + 'stc2eq','stc2ne','stc2cs','stc2hs','stc2cc','stc2lo','stc2mi','stc2pl','stc2vs','stc2vc','stc2hi','stc2ls','stc2ge','stc2lt','stc2gt','stc2le', + 'stc2leq','stc2lne','stc2lcs','stc2lhs','stc2lcc','stc2llo','stc2lmi','stc2lpl','stc2lvs','stc2lvc','stc2lhi','stc2lls','stc2lge','stc2llt','stc2lgt','stc2lle', + 'mcreq','mcrne','mcrcs','mcrhs','mcrcc','mcrlo','mcrmi','mcrpl','mcrvs','mcrvc','mcrhi','mcrls','mcrge','mcrlt','mcrgt','mcrle', + 'mcr2eq','mcr2ne','mcr2cs','mcr2hs','mcr2cc','mcr2lo','mcr2mi','mcr2pl','mcr2vs','mcr2vc','mcr2hi','mcr2ls','mcr2ge','mcr2lt','mcr2gt','mcr2le', + 'mcrreq','mcrrne','mcrrcs','mcrrhs','mcrrcc','mcrrlo','mcrrmi','mcrrpl','mcrrvs','mcrrvc','mcrrhi','mcrrls','mcrrge','mcrrlt','mcrrgt','mcrrle', + 'mcrr2eq','mcrr2ne','mcrr2cs','mcrr2hs','mcrr2cc','mcrr2lo','mcrr2mi','mcrr2pl','mcrr2vs','mcrr2vc','mcrr2hi','mcrr2ls','mcrr2ge','mcrr2lt','mcrr2gt','mcrr2le', + 'mrceq','mrcne','mrccs','mrchs','mrccc','mrclo','mrcmi','mrcpl','mrcvs','mrcvc','mrchi','mrcls','mrcge','mrclt','mrcgt','mrcle', + 'mrc2eq','mrc2ne','mrc2cs','mrc2hs','mrc2cc','mrc2lo','mrc2mi','mrc2pl','mrc2vs','mrc2vc','mrc2hi','mrc2ls','mrc2ge','mrc2lt','mrc2gt','mrc2le', + 'mrrceq','mrrcne','mrrccs','mrrchs','mrrccc','mrrclo','mrrcmi','mrrcpl','mrrcvs','mrrcvc','mrrchi','mrrcls','mrrcge','mrrclt','mrrcgt','mrrcle', + 'mrrc2eq','mrrc2ne','mrrc2cs','mrrc2hs','mrrc2cc','mrrc2lo','mrrc2mi','mrrc2pl','mrrc2vs','mrrc2vc','mrrc2hi','mrrc2ls','mrrc2ge','mrrc2lt','mrrc2gt','mrrc2le' + ), + /* Unconditional System Instructions */ + 15 => array( + /* System: Unconditional Debug and State-Change Instructions */ + 'bkpt', + 'dbg','dbgal', + 'setend', + 'svc','svcal', + 'sev.w','seval.w', + 'sev','seval', + 'wfe.w','wfeal.w', + 'wfe','wfeal', + 'wfi.w','wfial.w', + 'wfi','wfial', + /* System: Unconditional ThumbEE Instructions */ + 'enterx', + 'leavex', + 'chka.n','chkaal.n', + 'chka','chkaal', + 'hb.n','hbal.n', + 'hb','hbal', + 'hbl.n','hblal.n', + 'hbl','hblal', + 'hblp.n','hblpal.n', + 'hblp','hblpal', + 'hbp.n','hbpal.n', + 'hbp','hbpal', + /* System: Unconditional Privileged Instructions */ + 'cpsie.n', + 'cpsie.w', + 'cpsie', + 'cpsid.n', + 'cpsid.w', + 'cpsid', + 'smc','smcal', + 'rfeda','rfedaal', + 'rfedb','rfedbal', + 'rfeia','rfeiaal', + 'rfeib','rfeibal', + 'srsda','srsdaal', + 'srsdb','srsdbal', + 'srsia','srsiaal', + 'srsib','srsibal' + ), + /* Conditional System Instructions */ + 16 => array( + /* System: Conditional Debug and State-Change Instructions */ + 'dbgeq','dbgne','dbgcs','dbghs','dbgcc','dbglo','dbgmi','dbgpl','dbgvs','dbgvc','dbghi','dbgls','dbgge','dbglt','dbggt','dbgle', + 'svceq','svcne','svccs','svchs','svccc','svclo','svcmi','svcpl','svcvs','svcvc','svchi','svcls','svcge','svclt','svcgt','svcle', + 'seveq.w','sevne.w','sevcs.w','sevhs.w','sevcc.w','sevlo.w','sevmi.w','sevpl.w','sevvs.w','sevvc.w','sevhi.w','sevls.w','sevge.w','sevlt.w','sevgt.w','sevle.w', + 'seveq','sevne','sevcs','sevhs','sevcc','sevlo','sevmi','sevpl','sevvs','sevvc','sevhi','sevls','sevge','sevlt','sevgt','sevle', + 'wfeeq.w','wfene.w','wfecs.w','wfehs.w','wfecc.w','wfelo.w','wfemi.w','wfepl.w','wfevs.w','wfevc.w','wfehi.w','wfels.w','wfege.w','wfelt.w','wfegt.w','wfele.w', + 'wfeeq','wfene','wfecs','wfehs','wfecc','wfelo','wfemi','wfepl','wfevs','wfevc','wfehi','wfels','wfege','wfelt','wfegt','wfele', + 'wfieq.w','wfine.w','wfics.w','wfihs.w','wficc.w','wfilo.w','wfimi.w','wfipl.w','wfivs.w','wfivc.w','wfihi.w','wfils.w','wfige.w','wfilt.w','wfigt.w','wfile.w', + 'wfieq','wfine','wfics','wfihs','wficc','wfilo','wfimi','wfipl','wfivs','wfivc','wfihi','wfils','wfige','wfilt','wfigt','wfile', + /* System: Conditional ThumbEE Instructions */ + 'chkaeq.n','chkane.n','chkacs.n','chkahs.n','chkacc.n','chkalo.n','chkami.n','chkapl.n','chkavs.n','chkavc.n','chkahi.n','chkals.n','chkage.n','chkalt.n','chkagt.n','chkale.n', + 'chkaeq','chkane','chkacs','chkahs','chkacc','chkalo','chkami','chkapl','chkavs','chkavc','chkahi','chkals','chkage','chkalt','chkagt','chkale', + 'hbeq.n','hbne.n','hbcs.n','hbhs.n','hbcc.n','hblo.n','hbmi.n','hbpl.n','hbvs.n','hbvc.n','hbhi.n','hbls.n','hbge.n','hblt.n','hbgt.n','hble.n', + 'hbeq','hbne','hbcs','hbhs','hbcc','hblo','hbmi','hbpl','hbvs','hbvc','hbhi','hbls','hbge','hblt','hbgt','hble', + 'hbleq.n','hblne.n','hblcs.n','hblhs.n','hblcc.n','hbllo.n','hblmi.n','hblpl.n','hblvs.n','hblvc.n','hblhi.n','hblls.n','hblge.n','hbllt.n','hblgt.n','hblle.n', + 'hbleq','hblne','hblcs','hblhs','hblcc','hbllo','hblmi','hblpl','hblvs','hblvc','hblhi','hblls','hblge','hbllt','hblgt','hblle', + 'hblpeq.n','hblpne.n','hblpcs.n','hblphs.n','hblpcc.n','hblplo.n','hblpmi.n','hblppl.n','hblpvs.n','hblpvc.n','hblphi.n','hblpls.n','hblpge.n','hblplt.n','hblpgt.n','hblple.n', + 'hblpeq','hblpne','hblpcs','hblphs','hblpcc','hblplo','hblpmi','hblppl','hblpvs','hblpvc','hblphi','hblpls','hblpge','hblplt','hblpgt','hblple', + 'hbpeq.n','hbpne.n','hbpcs.n','hbphs.n','hbpcc.n','hbplo.n','hbpmi.n','hbppl.n','hbpvs.n','hbpvc.n','hbphi.n','hbpls.n','hbpge.n','hbplt.n','hbpgt.n','hbple.n', + 'hbpeq','hbpne','hbpcs','hbphs','hbpcc','hbplo','hbpmi','hbppl','hbpvs','hbpvc','hbphi','hbpls','hbpge','hbplt','hbpgt','hbple', + /* System: Conditional Privileged Instructions */ + 'smceq','smcne','smccs','smchs','smccc','smclo','smcmi','smcpl','smcvs','smcvc','smchi','smcls','smcge','smclt','smcgt','smcle', + 'rfedaeq','rfedane','rfedacs','rfedahs','rfedacc','rfedalo','rfedami','rfedapl','rfedavs','rfedavc','rfedahi','rfedals','rfedage','rfedalt','rfedagt','rfedale', + 'rfedbeq','rfedbne','rfedbcs','rfedbhs','rfedbcc','rfedblo','rfedbmi','rfedbpl','rfedbvs','rfedbvc','rfedbhi','rfedbls','rfedbge','rfedblt','rfedbgt','rfedble', + 'rfeiaeq','rfeiane','rfeiacs','rfeiahs','rfeiacc','rfeialo','rfeiami','rfeiapl','rfeiavs','rfeiavc','rfeiahi','rfeials','rfeiage','rfeialt','rfeiagt','rfeiale', + 'rfeibeq','rfeibne','rfeibcs','rfeibhs','rfeibcc','rfeiblo','rfeibmi','rfeibpl','rfeibvs','rfeibvc','rfeibhi','rfeibls','rfeibge','rfeiblt','rfeibgt','rfeible', + 'srsdaeq','srsdane','srsdacs','srsdahs','srsdacc','srsdalo','srsdami','srsdapl','srsdavs','srsdavc','srsdahi','srsdals','srsdage','srsdalt','srsdagt','srsdale', + 'srsdbeq','srsdbne','srsdbcs','srsdbhs','srsdbcc','srsdblo','srsdbmi','srsdbpl','srsdbvs','srsdbvc','srsdbhi','srsdbls','srsdbge','srsdblt','srsdbgt','srsdble', + 'srsiaeq','srsiane','srsiacs','srsiahs','srsiacc','srsialo','srsiami','srsiapl','srsiavs','srsiavc','srsiahi','srsials','srsiage','srsialt','srsiagt','srsiale', + 'srsibeq','srsibne','srsibcs','srsibhs','srsibcc','srsiblo','srsibmi','srsibpl','srsibvs','srsibvc','srsibhi','srsibls','srsibge','srsiblt','srsibgt','srsible' + ), + /* Unconditional WMMX/WMMX2 instructions */ + 17 => array( + /* Unconditional WMMX/WMMX2 SIMD Instructions */ + 'tandcb','tandcbal', + 'tandch','tandchal', + 'tandcw','tandcwal', + 'tbcstb','tbcstbal', + 'tbcsth','tbcsthal', + 'tbcstw','tbcstwal', + 'textrcb','textrcbal', + 'textrch','textrchal', + 'textrcw','textrcwal', + 'textrmsb','textrmsbal', + 'textrmsh','textrmshal', + 'textrmsw','textrmswal', + 'textrmub','textrmubal', + 'textrmuh','textrmuhal', + 'textrmuw','textrmuwal', + 'tinsrb','tinsrbal', + 'tinsrh','tinsrhal', + 'tinsrw','tinsrwal', + 'tmcr','tmcral', + 'tmcrr','tmcrral', + 'tmia','tmiaal', + 'tmiaph','tmiaphal', + 'tmiabb','tmiabbal', + 'tmiabt','tmiabtal', + 'tmiatb','tmiatbal', + 'tmiatt','tmiattal', + 'tmovmskb','tmovmskbal', + 'tmovmskh','tmovmskhal', + 'tmovmskw','tmovmskwal', + 'tmrc','tmrcal', + 'tmrrc','tmrrcal', + 'torcb','torcbal', + 'torch','torchal', + 'torcw','torcwal', + 'torvscb','torvscbal', + 'torvsch','torvschal', + 'torvscw','torvscwal', + 'wabsb','wabsbal', + 'wabsh','wabshal', + 'wabsw','wabswal', + 'wabsdiffb','wabsdiffbal', + 'wabsdiffh','wabsdiffhal', + 'wabsdiffw','wabsdiffwal', + 'waccb','waccbal', + 'wacch','wacchal', + 'waccw','waccwal', + 'waddb','waddbal', + 'waddh','waddhal', + 'waddw','waddwal', + 'waddbc','waddbcal', + 'waddhc','waddhcal', + 'waddwc','waddwcal', + 'waddbss','waddbssal', + 'waddhss','waddhssal', + 'waddwss','waddwssal', + 'waddbus','waddbusal', + 'waddhus','waddhusal', + 'waddwus','waddwusal', + 'waddsubhx','waddsubhxal', + 'waligni','walignial', + 'walignr0','walignr0al', + 'walignr1','walignr1al', + 'walignr2','walignr2al', + 'walignr3','walignr3al', + 'wand','wandal', + 'wandn','wandnal', + 'wavg2b','wavg2bal', + 'wavg2h','wavg2hal', + 'wavg2br','wavg2bral', + 'wavg2hr','wavg2hral', + 'wavg4','wavg4al', + 'wavg4r','wavg4ral', + 'wcmpeqb','wcmpeqbal', + 'wcmpeqh','wcmpeqhal', + 'wcmpeqw','wcmpeqwal', + 'wcmpgtsb','wcmpgtsbal', + 'wcmpgtsh','wcmpgtshal', + 'wcmpgtsw','wcmpgtswal', + 'wcmpgtub','wcmpgtubal', + 'wcmpgtuh','wcmpgtuhal', + 'wcmpgtuw','wcmpgtuwal', + 'wldrb','wldrbal', + 'wldrh','wldrhal', + 'wldrw','wldrwal', + 'wldrd','wldrdal', + 'wmacs','wmacsal', + 'wmacu','wmacual', + 'wmacsz','wmacszal', + 'wmacuz','wmacuzal', + 'wmadds','wmaddsal', + 'wmaddu','wmaddual', + 'wmaddsx','wmaddsxal', + 'wmaddux','wmadduxal', + 'wmaddsn','wmaddsnal', + 'wmaddun','wmaddunal', + 'wmaxsb','wmaxsbal', + 'wmaxsh','wmaxshal', + 'wmaxsw','wmaxswal', + 'wmaxub','wmaxubal', + 'wmaxuh','wmaxuhal', + 'wmaxuw','wmaxuwal', + 'wmerge','wmergeal', + 'wmiabb','wmiabbal', + 'wmiabt','wmiabtal', + 'wmiatb','wmiatbal', + 'wmiatt','wmiattal', + 'wmiabbn','wmiabbnal', + 'wmiabtn','wmiabtnal', + 'wmiatbn','wmiatbnal', + 'wmiattn','wmiattnal', + 'wmiawbb','wmiawbbal', + 'wmiawbt','wmiawbtal', + 'wmiawtb','wmiawtbal', + 'wmiawtt','wmiawttal', + 'wmiawbbn','wmiawbbnal', + 'wmiawbtn','wmiawbtnal', + 'wmiawtbn','wmiawtbnal', + 'wmiawttn','wmiawttnal', + 'wminsb','wminsbal', + 'wminsh','wminshal', + 'wminsw','wminswal', + 'wminub','wminubal', + 'wminuh','wminuhal', + 'wminuw','wminuwal', + 'wmov','wmoval', + 'wmulsm','wmulsmal', + 'wmulsl','wmulslal', + 'wmulum','wmulumal', + 'wmulul','wmululal', + 'wmulsmr','wmulsmral', + 'wmulslr','wmulslral', + 'wmulumr','wmulumral', + 'wmululr','wmululral', + 'wmulwum','wmulwumal', + 'wmulwsm','wmulwsmal', + 'wmulwl','wmulwlal', + 'wmulwumr','wmulwumral', + 'wmulwsmr','wmulwsmral', + 'wor','woral', + 'wpackhss','wpackhssal', + 'wpackwss','wpackwssal', + 'wpackdss','wpackdssal', + 'wpackhus','wpackhusal', + 'wpackwus','wpackwusal', + 'wpackdus','wpackdusal', + 'wqmiabb','wqmiabbal', + 'wqmiabt','wqmiabtal', + 'wqmiatb','wqmiatbal', + 'wqmiatt','wqmiattal', + 'wqmiabbn','wqmiabbnal', + 'wqmiabtn','wqmiabtnal', + 'wqmiatbn','wqmiatbnal', + 'wqmiattn','wqmiattnal', + 'wqmulm','wqmulmal', + 'wqmulmr','wqmulmral', + 'wqmulwm','wqmulwmal', + 'wqmulwmr','wqmulwmral', + 'wrorh','wrorhal', + 'wrorw','wrorwal', + 'wrord','wrordal', + 'wrorhg','wrorhgal', + 'wrorwg','wrorwgal', + 'wrordg','wrordgal', + 'wsadb','wsadbal', + 'wsadh','wsadhal', + 'wsadbz','wsadbzal', + 'wsadhz','wsadhzal', + 'wshufh','wshufhal', + 'wsllh','wsllhal', + 'wsllw','wsllwal', + 'wslld','wslldal', + 'wsllhg','wsllhgal', + 'wsllwg','wsllwgal', + 'wslldg','wslldgal', + 'wsrah','wsrahal', + 'wsraw','wsrawal', + 'wsrad','wsradal', + 'wsrahg','wsrahgal', + 'wsrawg','wsrawgal', + 'wsradg','wsradgal', + 'wsrlh','wsrlhal', + 'wsrlw','wsrlwal', + 'wsrld','wsrldal', + 'wsrlhg','wsrlhgal', + 'wsrlwg','wsrlwgal', + 'wsrldg','wsrldgal', + 'wstrb','wstrbal', + 'wstrh','wstrhal', + 'wstrw','wstrwal', + 'wstrd','wstrdal', + 'wsubb','wsubbal', + 'wsubh','wsubhal', + 'wsubw','wsubwal', + 'wsubbss','wsubbssal', + 'wsubhss','wsubhssal', + 'wsubwss','wsubwssal', + 'wsubbus','wsubbusal', + 'wsubhus','wsubhusal', + 'wsubwus','wsubwusal', + 'wsubaddhx','wsubaddhxal', + 'wunpckehsb','wunpckehsbal', + 'wunpckehsh','wunpckehshal', + 'wunpckehsw','wunpckehswal', + 'wunpckehub','wunpckehubal', + 'wunpckehuh','wunpckehuhal', + 'wunpckehuw','wunpckehuwal', + 'wunpckihb','wunpckihbal', + 'wunpckihh','wunpckihhal', + 'wunpckihw','wunpckihwal', + 'wunpckelsb','wunpckelsbal', + 'wunpckelsh','wunpckelshal', + 'wunpckelsw','wunpckelswal', + 'wunpckelub','wunpckelubal', + 'wunpckeluh','wunpckeluhal', + 'wunpckeluw','wunpckeluwal', + 'wunpckilb','wunpckilbal', + 'wunpckilh','wunpckilhal', + 'wunpckilw','wunpckilwal', + 'wxor','wxoral', + 'wzero','wzeroal' + ), + /* Conditional WMMX/WMMX2 SIMD Instructions */ + 18 => array( + /* Conditional WMMX/WMMX2 SIMD Instructions */ + 'tandcbeq','tandcbne','tandcbcs','tandcbhs','tandcbcc','tandcblo','tandcbmi','tandcbpl','tandcbvs','tandcbvc','tandcbhi','tandcbls','tandcbge','tandcblt','tandcbgt','tandcble', + 'tandcheq','tandchne','tandchcs','tandchhs','tandchcc','tandchlo','tandchmi','tandchpl','tandchvs','tandchvc','tandchhi','tandchls','tandchge','tandchlt','tandchgt','tandchle', + 'tandcweq','tandcwne','tandcwcs','tandcwhs','tandcwcc','tandcwlo','tandcwmi','tandcwpl','tandcwvs','tandcwvc','tandcwhi','tandcwls','tandcwge','tandcwlt','tandcwgt','tandcwle', + 'tbcstbeq','tbcstbne','tbcstbcs','tbcstbhs','tbcstbcc','tbcstblo','tbcstbmi','tbcstbpl','tbcstbvs','tbcstbvc','tbcstbhi','tbcstbls','tbcstbge','tbcstblt','tbcstbgt','tbcstble', + 'tbcstheq','tbcsthne','tbcsthcs','tbcsthhs','tbcsthcc','tbcsthlo','tbcsthmi','tbcsthpl','tbcsthvs','tbcsthvc','tbcsthhi','tbcsthls','tbcsthge','tbcsthlt','tbcsthgt','tbcsthle', + 'tbcstweq','tbcstwne','tbcstwcs','tbcstwhs','tbcstwcc','tbcstwlo','tbcstwmi','tbcstwpl','tbcstwvs','tbcstwvc','tbcstwhi','tbcstwls','tbcstwge','tbcstwlt','tbcstwgt','tbcstwle', + 'textrcbeq','textrcbne','textrcbcs','textrcbhs','textrcbcc','textrcblo','textrcbmi','textrcbpl','textrcbvs','textrcbvc','textrcbhi','textrcbls','textrcbge','textrcblt','textrcbgt','textrcble', + 'textrcheq','textrchne','textrchcs','textrchhs','textrchcc','textrchlo','textrchmi','textrchpl','textrchvs','textrchvc','textrchhi','textrchls','textrchge','textrchlt','textrchgt','textrchle', + 'textrcweq','textrcwne','textrcwcs','textrcwhs','textrcwcc','textrcwlo','textrcwmi','textrcwpl','textrcwvs','textrcwvc','textrcwhi','textrcwls','textrcwge','textrcwlt','textrcwgt','textrcwle', + 'textrmsbeq','textrmsbne','textrmsbcs','textrmsbhs','textrmsbcc','textrmsblo','textrmsbmi','textrmsbpl','textrmsbvs','textrmsbvc','textrmsbhi','textrmsbls','textrmsbge','textrmsblt','textrmsbgt','textrmsble', + 'textrmsheq','textrmshne','textrmshcs','textrmshhs','textrmshcc','textrmshlo','textrmshmi','textrmshpl','textrmshvs','textrmshvc','textrmshhi','textrmshls','textrmshge','textrmshlt','textrmshgt','textrmshle', + 'textrmsweq','textrmswne','textrmswcs','textrmswhs','textrmswcc','textrmswlo','textrmswmi','textrmswpl','textrmswvs','textrmswvc','textrmswhi','textrmswls','textrmswge','textrmswlt','textrmswgt','textrmswle', + 'textrmubeq','textrmubne','textrmubcs','textrmubhs','textrmubcc','textrmublo','textrmubmi','textrmubpl','textrmubvs','textrmubvc','textrmubhi','textrmubls','textrmubge','textrmublt','textrmubgt','textrmuble', + 'textrmuheq','textrmuhne','textrmuhcs','textrmuhhs','textrmuhcc','textrmuhlo','textrmuhmi','textrmuhpl','textrmuhvs','textrmuhvc','textrmuhhi','textrmuhls','textrmuhge','textrmuhlt','textrmuhgt','textrmuhle', + 'textrmuweq','textrmuwne','textrmuwcs','textrmuwhs','textrmuwcc','textrmuwlo','textrmuwmi','textrmuwpl','textrmuwvs','textrmuwvc','textrmuwhi','textrmuwls','textrmuwge','textrmuwlt','textrmuwgt','textrmuwle', + 'tinsrbeq','tinsrbne','tinsrbcs','tinsrbhs','tinsrbcc','tinsrblo','tinsrbmi','tinsrbpl','tinsrbvs','tinsrbvc','tinsrbhi','tinsrbls','tinsrbge','tinsrblt','tinsrbgt','tinsrble', + 'tinsrheq','tinsrhne','tinsrhcs','tinsrhhs','tinsrhcc','tinsrhlo','tinsrhmi','tinsrhpl','tinsrhvs','tinsrhvc','tinsrhhi','tinsrhls','tinsrhge','tinsrhlt','tinsrhgt','tinsrhle', + 'tinsrweq','tinsrwne','tinsrwcs','tinsrwhs','tinsrwcc','tinsrwlo','tinsrwmi','tinsrwpl','tinsrwvs','tinsrwvc','tinsrwhi','tinsrwls','tinsrwge','tinsrwlt','tinsrwgt','tinsrwle', + 'tmcreq','tmcrne','tmcrcs','tmcrhs','tmcrcc','tmcrlo','tmcrmi','tmcrpl','tmcrvs','tmcrvc','tmcrhi','tmcrls','tmcrge','tmcrlt','tmcrgt','tmcrle', + 'tmcrreq','tmcrrne','tmcrrcs','tmcrrhs','tmcrrcc','tmcrrlo','tmcrrmi','tmcrrpl','tmcrrvs','tmcrrvc','tmcrrhi','tmcrrls','tmcrrge','tmcrrlt','tmcrrgt','tmcrrle', + 'tmiaeq','tmiane','tmiacs','tmiahs','tmiacc','tmialo','tmiami','tmiapl','tmiavs','tmiavc','tmiahi','tmials','tmiage','tmialt','tmiagt','tmiale', + 'tmiapheq','tmiaphne','tmiaphcs','tmiaphhs','tmiaphcc','tmiaphlo','tmiaphmi','tmiaphpl','tmiaphvs','tmiaphvc','tmiaphhi','tmiaphls','tmiaphge','tmiaphlt','tmiaphgt','tmiaphle', + 'tmiabbeq','tmiabbne','tmiabbcs','tmiabbhs','tmiabbcc','tmiabblo','tmiabbmi','tmiabbpl','tmiabbvs','tmiabbvc','tmiabbhi','tmiabbls','tmiabbge','tmiabblt','tmiabbgt','tmiabble', + 'tmiabteq','tmiabtne','tmiabtcs','tmiabths','tmiabtcc','tmiabtlo','tmiabtmi','tmiabtpl','tmiabtvs','tmiabtvc','tmiabthi','tmiabtls','tmiabtge','tmiabtlt','tmiabtgt','tmiabtle', + 'tmiatbeq','tmiatbne','tmiatbcs','tmiatbhs','tmiatbcc','tmiatblo','tmiatbmi','tmiatbpl','tmiatbvs','tmiatbvc','tmiatbhi','tmiatbls','tmiatbge','tmiatblt','tmiatbgt','tmiatble', + 'tmiatteq','tmiattne','tmiattcs','tmiatths','tmiattcc','tmiattlo','tmiattmi','tmiattpl','tmiattvs','tmiattvc','tmiatthi','tmiattls','tmiattge','tmiattlt','tmiattgt','tmiattle', + 'tmovmskbeq','tmovmskbne','tmovmskbcs','tmovmskbhs','tmovmskbcc','tmovmskblo','tmovmskbmi','tmovmskbpl','tmovmskbvs','tmovmskbvc','tmovmskbhi','tmovmskbls','tmovmskbge','tmovmskblt','tmovmskbgt','tmovmskble', + 'tmovmskheq','tmovmskhne','tmovmskhcs','tmovmskhhs','tmovmskhcc','tmovmskhlo','tmovmskhmi','tmovmskhpl','tmovmskhvs','tmovmskhvc','tmovmskhhi','tmovmskhls','tmovmskhge','tmovmskhlt','tmovmskhgt','tmovmskhle', + 'tmovmskweq','tmovmskwne','tmovmskwcs','tmovmskwhs','tmovmskwcc','tmovmskwlo','tmovmskwmi','tmovmskwpl','tmovmskwvs','tmovmskwvc','tmovmskwhi','tmovmskwls','tmovmskwge','tmovmskwlt','tmovmskwgt','tmovmskwle', + 'tmrceq','tmrcne','tmrccs','tmrchs','tmrccc','tmrclo','tmrcmi','tmrcpl','tmrcvs','tmrcvc','tmrchi','tmrcls','tmrcge','tmrclt','tmrcgt','tmrcle', + 'tmrrceq','tmrrcne','tmrrccs','tmrrchs','tmrrccc','tmrrclo','tmrrcmi','tmrrcpl','tmrrcvs','tmrrcvc','tmrrchi','tmrrcls','tmrrcge','tmrrclt','tmrrcgt','tmrrcle', + 'torcbeq','torcbne','torcbcs','torcbhs','torcbcc','torcblo','torcbmi','torcbpl','torcbvs','torcbvc','torcbhi','torcbls','torcbge','torcblt','torcbgt','torcble', + 'torcheq','torchne','torchcs','torchhs','torchcc','torchlo','torchmi','torchpl','torchvs','torchvc','torchhi','torchls','torchge','torchlt','torchgt','torchle', + 'torcweq','torcwne','torcwcs','torcwhs','torcwcc','torcwlo','torcwmi','torcwpl','torcwvs','torcwvc','torcwhi','torcwls','torcwge','torcwlt','torcwgt','torcwle', + 'torvscbeq','torvscbne','torvscbcs','torvscbhs','torvscbcc','torvscblo','torvscbmi','torvscbpl','torvscbvs','torvscbvc','torvscbhi','torvscbls','torvscbge','torvscblt','torvscbgt','torvscble', + 'torvscheq','torvschne','torvschcs','torvschhs','torvschcc','torvschlo','torvschmi','torvschpl','torvschvs','torvschvc','torvschhi','torvschls','torvschge','torvschlt','torvschgt','torvschle', + 'torvscweq','torvscwne','torvscwcs','torvscwhs','torvscwcc','torvscwlo','torvscwmi','torvscwpl','torvscwvs','torvscwvc','torvscwhi','torvscwls','torvscwge','torvscwlt','torvscwgt','torvscwle', + 'wabsbeq','wabsbne','wabsbcs','wabsbhs','wabsbcc','wabsblo','wabsbmi','wabsbpl','wabsbvs','wabsbvc','wabsbhi','wabsbls','wabsbge','wabsblt','wabsbgt','wabsble', + 'wabsheq','wabshne','wabshcs','wabshhs','wabshcc','wabshlo','wabshmi','wabshpl','wabshvs','wabshvc','wabshhi','wabshls','wabshge','wabshlt','wabshgt','wabshle', + 'wabsweq','wabswne','wabswcs','wabswhs','wabswcc','wabswlo','wabswmi','wabswpl','wabswvs','wabswvc','wabswhi','wabswls','wabswge','wabswlt','wabswgt','wabswle', + 'wabsdiffbeq','wabsdiffbne','wabsdiffbcs','wabsdiffbhs','wabsdiffbcc','wabsdiffblo','wabsdiffbmi','wabsdiffbpl','wabsdiffbvs','wabsdiffbvc','wabsdiffbhi','wabsdiffbls','wabsdiffbge','wabsdiffblt','wabsdiffbgt','wabsdiffble', + 'wabsdiffheq','wabsdiffhne','wabsdiffhcs','wabsdiffhhs','wabsdiffhcc','wabsdiffhlo','wabsdiffhmi','wabsdiffhpl','wabsdiffhvs','wabsdiffhvc','wabsdiffhhi','wabsdiffhls','wabsdiffhge','wabsdiffhlt','wabsdiffhgt','wabsdiffhle', + 'wabsdiffweq','wabsdiffwne','wabsdiffwcs','wabsdiffwhs','wabsdiffwcc','wabsdiffwlo','wabsdiffwmi','wabsdiffwpl','wabsdiffwvs','wabsdiffwvc','wabsdiffwhi','wabsdiffwls','wabsdiffwge','wabsdiffwlt','wabsdiffwgt','wabsdiffwle', + 'waccbeq','waccbne','waccbcs','waccbhs','waccbcc','waccblo','waccbmi','waccbpl','waccbvs','waccbvc','waccbhi','waccbls','waccbge','waccblt','waccbgt','waccble', + 'waccheq','wacchne','wacchcs','wacchhs','wacchcc','wacchlo','wacchmi','wacchpl','wacchvs','wacchvc','wacchhi','wacchls','wacchge','wacchlt','wacchgt','wacchle', + 'waccweq','waccwne','waccwcs','waccwhs','waccwcc','waccwlo','waccwmi','waccwpl','waccwvs','waccwvc','waccwhi','waccwls','waccwge','waccwlt','waccwgt','waccwle', + 'waddbeq','waddbne','waddbcs','waddbhs','waddbcc','waddblo','waddbmi','waddbpl','waddbvs','waddbvc','waddbhi','waddbls','waddbge','waddblt','waddbgt','waddble', + 'waddheq','waddhne','waddhcs','waddhhs','waddhcc','waddhlo','waddhmi','waddhpl','waddhvs','waddhvc','waddhhi','waddhls','waddhge','waddhlt','waddhgt','waddhle', + 'waddweq','waddwne','waddwcs','waddwhs','waddwcc','waddwlo','waddwmi','waddwpl','waddwvs','waddwvc','waddwhi','waddwls','waddwge','waddwlt','waddwgt','waddwle', + 'waddbceq','waddbcne','waddbccs','waddbchs','waddbccc','waddbclo','waddbcmi','waddbcpl','waddbcvs','waddbcvc','waddbchi','waddbcls','waddbcge','waddbclt','waddbcgt','waddbcle', + 'waddhceq','waddhcne','waddhccs','waddhchs','waddhccc','waddhclo','waddhcmi','waddhcpl','waddhcvs','waddhcvc','waddhchi','waddhcls','waddhcge','waddhclt','waddhcgt','waddhcle', + 'waddwceq','waddwcne','waddwccs','waddwchs','waddwccc','waddwclo','waddwcmi','waddwcpl','waddwcvs','waddwcvc','waddwchi','waddwcls','waddwcge','waddwclt','waddwcgt','waddwcle', + 'waddbsseq','waddbssne','waddbsscs','waddbsshs','waddbsscc','waddbsslo','waddbssmi','waddbsspl','waddbssvs','waddbssvc','waddbsshi','waddbssls','waddbssge','waddbsslt','waddbssgt','waddbssle', + 'waddhsseq','waddhssne','waddhsscs','waddhsshs','waddhsscc','waddhsslo','waddhssmi','waddhsspl','waddhssvs','waddhssvc','waddhsshi','waddhssls','waddhssge','waddhsslt','waddhssgt','waddhssle', + 'waddwsseq','waddwssne','waddwsscs','waddwsshs','waddwsscc','waddwsslo','waddwssmi','waddwsspl','waddwssvs','waddwssvc','waddwsshi','waddwssls','waddwssge','waddwsslt','waddwssgt','waddwssle', + 'waddbuseq','waddbusne','waddbuscs','waddbushs','waddbuscc','waddbuslo','waddbusmi','waddbuspl','waddbusvs','waddbusvc','waddbushi','waddbusls','waddbusge','waddbuslt','waddbusgt','waddbusle', + 'waddhuseq','waddhusne','waddhuscs','waddhushs','waddhuscc','waddhuslo','waddhusmi','waddhuspl','waddhusvs','waddhusvc','waddhushi','waddhusls','waddhusge','waddhuslt','waddhusgt','waddhusle', + 'waddwuseq','waddwusne','waddwuscs','waddwushs','waddwuscc','waddwuslo','waddwusmi','waddwuspl','waddwusvs','waddwusvc','waddwushi','waddwusls','waddwusge','waddwuslt','waddwusgt','waddwusle', + 'waddsubhxeq','waddsubhxne','waddsubhxcs','waddsubhxhs','waddsubhxcc','waddsubhxlo','waddsubhxmi','waddsubhxpl','waddsubhxvs','waddsubhxvc','waddsubhxhi','waddsubhxls','waddsubhxge','waddsubhxlt','waddsubhxgt','waddsubhxle', + 'walignieq','walignine','walignics','walignihs','walignicc','walignilo','walignimi','walignipl','walignivs','walignivc','walignihi','walignils','walignige','walignilt','walignigt','walignile', + 'walignr0eq','walignr0ne','walignr0cs','walignr0hs','walignr0cc','walignr0lo','walignr0mi','walignr0pl','walignr0vs','walignr0vc','walignr0hi','walignr0ls','walignr0ge','walignr0lt','walignr0gt','walignr0le', + 'walignr1eq','walignr1ne','walignr1cs','walignr1hs','walignr1cc','walignr1lo','walignr1mi','walignr1pl','walignr1vs','walignr1vc','walignr1hi','walignr1ls','walignr1ge','walignr1lt','walignr1gt','walignr1le', + 'walignr2eq','walignr2ne','walignr2cs','walignr2hs','walignr2cc','walignr2lo','walignr2mi','walignr2pl','walignr2vs','walignr2vc','walignr2hi','walignr2ls','walignr2ge','walignr2lt','walignr2gt','walignr2le', + 'walignr3eq','walignr3ne','walignr3cs','walignr3hs','walignr3cc','walignr3lo','walignr3mi','walignr3pl','walignr3vs','walignr3vc','walignr3hi','walignr3ls','walignr3ge','walignr3lt','walignr3gt','walignr3le', + 'wandeq','wandne','wandcs','wandhs','wandcc','wandlo','wandmi','wandpl','wandvs','wandvc','wandhi','wandls','wandge','wandlt','wandgt','wandle', + 'wandneq','wandnne','wandncs','wandnhs','wandncc','wandnlo','wandnmi','wandnpl','wandnvs','wandnvc','wandnhi','wandnls','wandnge','wandnlt','wandngt','wandnle', + 'wavg2beq','wavg2bne','wavg2bcs','wavg2bhs','wavg2bcc','wavg2blo','wavg2bmi','wavg2bpl','wavg2bvs','wavg2bvc','wavg2bhi','wavg2bls','wavg2bge','wavg2blt','wavg2bgt','wavg2ble', + 'wavg2heq','wavg2hne','wavg2hcs','wavg2hhs','wavg2hcc','wavg2hlo','wavg2hmi','wavg2hpl','wavg2hvs','wavg2hvc','wavg2hhi','wavg2hls','wavg2hge','wavg2hlt','wavg2hgt','wavg2hle', + 'wavg2breq','wavg2brne','wavg2brcs','wavg2brhs','wavg2brcc','wavg2brlo','wavg2brmi','wavg2brpl','wavg2brvs','wavg2brvc','wavg2brhi','wavg2brls','wavg2brge','wavg2brlt','wavg2brgt','wavg2brle', + 'wavg2hreq','wavg2hrne','wavg2hrcs','wavg2hrhs','wavg2hrcc','wavg2hrlo','wavg2hrmi','wavg2hrpl','wavg2hrvs','wavg2hrvc','wavg2hrhi','wavg2hrls','wavg2hrge','wavg2hrlt','wavg2hrgt','wavg2hrle', + 'wavg4eq','wavg4ne','wavg4cs','wavg4hs','wavg4cc','wavg4lo','wavg4mi','wavg4pl','wavg4vs','wavg4vc','wavg4hi','wavg4ls','wavg4ge','wavg4lt','wavg4gt','wavg4le', + 'wavg4req','wavg4rne','wavg4rcs','wavg4rhs','wavg4rcc','wavg4rlo','wavg4rmi','wavg4rpl','wavg4rvs','wavg4rvc','wavg4rhi','wavg4rls','wavg4rge','wavg4rlt','wavg4rgt','wavg4rle', + 'wcmpeqbeq','wcmpeqbne','wcmpeqbcs','wcmpeqbhs','wcmpeqbcc','wcmpeqblo','wcmpeqbmi','wcmpeqbpl','wcmpeqbvs','wcmpeqbvc','wcmpeqbhi','wcmpeqbls','wcmpeqbge','wcmpeqblt','wcmpeqbgt','wcmpeqble', + 'wcmpeqheq','wcmpeqhne','wcmpeqhcs','wcmpeqhhs','wcmpeqhcc','wcmpeqhlo','wcmpeqhmi','wcmpeqhpl','wcmpeqhvs','wcmpeqhvc','wcmpeqhhi','wcmpeqhls','wcmpeqhge','wcmpeqhlt','wcmpeqhgt','wcmpeqhle', + 'wcmpeqweq','wcmpeqwne','wcmpeqwcs','wcmpeqwhs','wcmpeqwcc','wcmpeqwlo','wcmpeqwmi','wcmpeqwpl','wcmpeqwvs','wcmpeqwvc','wcmpeqwhi','wcmpeqwls','wcmpeqwge','wcmpeqwlt','wcmpeqwgt','wcmpeqwle', + 'wcmpgtsbeq','wcmpgtsbne','wcmpgtsbcs','wcmpgtsbhs','wcmpgtsbcc','wcmpgtsblo','wcmpgtsbmi','wcmpgtsbpl','wcmpgtsbvs','wcmpgtsbvc','wcmpgtsbhi','wcmpgtsbls','wcmpgtsbge','wcmpgtsblt','wcmpgtsbgt','wcmpgtsble', + 'wcmpgtsheq','wcmpgtshne','wcmpgtshcs','wcmpgtshhs','wcmpgtshcc','wcmpgtshlo','wcmpgtshmi','wcmpgtshpl','wcmpgtshvs','wcmpgtshvc','wcmpgtshhi','wcmpgtshls','wcmpgtshge','wcmpgtshlt','wcmpgtshgt','wcmpgtshle', + 'wcmpgtsweq','wcmpgtswne','wcmpgtswcs','wcmpgtswhs','wcmpgtswcc','wcmpgtswlo','wcmpgtswmi','wcmpgtswpl','wcmpgtswvs','wcmpgtswvc','wcmpgtswhi','wcmpgtswls','wcmpgtswge','wcmpgtswlt','wcmpgtswgt','wcmpgtswle', + 'wcmpgtubeq','wcmpgtubne','wcmpgtubcs','wcmpgtubhs','wcmpgtubcc','wcmpgtublo','wcmpgtubmi','wcmpgtubpl','wcmpgtubvs','wcmpgtubvc','wcmpgtubhi','wcmpgtubls','wcmpgtubge','wcmpgtublt','wcmpgtubgt','wcmpgtuble', + 'wcmpgtuheq','wcmpgtuhne','wcmpgtuhcs','wcmpgtuhhs','wcmpgtuhcc','wcmpgtuhlo','wcmpgtuhmi','wcmpgtuhpl','wcmpgtuhvs','wcmpgtuhvc','wcmpgtuhhi','wcmpgtuhls','wcmpgtuhge','wcmpgtuhlt','wcmpgtuhgt','wcmpgtuhle', + 'wcmpgtuweq','wcmpgtuwne','wcmpgtuwcs','wcmpgtuwhs','wcmpgtuwcc','wcmpgtuwlo','wcmpgtuwmi','wcmpgtuwpl','wcmpgtuwvs','wcmpgtuwvc','wcmpgtuwhi','wcmpgtuwls','wcmpgtuwge','wcmpgtuwlt','wcmpgtuwgt','wcmpgtuwle', + 'wldrbeq','wldrbne','wldrbcs','wldrbhs','wldrbcc','wldrblo','wldrbmi','wldrbpl','wldrbvs','wldrbvc','wldrbhi','wldrbls','wldrbge','wldrblt','wldrbgt','wldrble', + 'wldrheq','wldrhne','wldrhcs','wldrhhs','wldrhcc','wldrhlo','wldrhmi','wldrhpl','wldrhvs','wldrhvc','wldrhhi','wldrhls','wldrhge','wldrhlt','wldrhgt','wldrhle', + 'wldrweq','wldrwne','wldrwcs','wldrwhs','wldrwcc','wldrwlo','wldrwmi','wldrwpl','wldrwvs','wldrwvc','wldrwhi','wldrwls','wldrwge','wldrwlt','wldrwgt','wldrwle', + 'wldrdeq','wldrdne','wldrdcs','wldrdhs','wldrdcc','wldrdlo','wldrdmi','wldrdpl','wldrdvs','wldrdvc','wldrdhi','wldrdls','wldrdge','wldrdlt','wldrdgt','wldrdle', + 'wmacseq','wmacsne','wmacscs','wmacshs','wmacscc','wmacslo','wmacsmi','wmacspl','wmacsvs','wmacsvc','wmacshi','wmacsls','wmacsge','wmacslt','wmacsgt','wmacsle', + 'wmacueq','wmacune','wmacucs','wmacuhs','wmacucc','wmaculo','wmacumi','wmacupl','wmacuvs','wmacuvc','wmacuhi','wmaculs','wmacuge','wmacult','wmacugt','wmacule', + 'wmacszeq','wmacszne','wmacszcs','wmacszhs','wmacszcc','wmacszlo','wmacszmi','wmacszpl','wmacszvs','wmacszvc','wmacszhi','wmacszls','wmacszge','wmacszlt','wmacszgt','wmacszle', + 'wmacuzeq','wmacuzne','wmacuzcs','wmacuzhs','wmacuzcc','wmacuzlo','wmacuzmi','wmacuzpl','wmacuzvs','wmacuzvc','wmacuzhi','wmacuzls','wmacuzge','wmacuzlt','wmacuzgt','wmacuzle', + 'wmaddseq','wmaddsne','wmaddscs','wmaddshs','wmaddscc','wmaddslo','wmaddsmi','wmaddspl','wmaddsvs','wmaddsvc','wmaddshi','wmaddsls','wmaddsge','wmaddslt','wmaddsgt','wmaddsle', + 'wmaddueq','wmaddune','wmadducs','wmadduhs','wmadducc','wmaddulo','wmaddumi','wmaddupl','wmadduvs','wmadduvc','wmadduhi','wmadduls','wmadduge','wmaddult','wmaddugt','wmaddule', + 'wmaddsxeq','wmaddsxne','wmaddsxcs','wmaddsxhs','wmaddsxcc','wmaddsxlo','wmaddsxmi','wmaddsxpl','wmaddsxvs','wmaddsxvc','wmaddsxhi','wmaddsxls','wmaddsxge','wmaddsxlt','wmaddsxgt','wmaddsxle', + 'wmadduxeq','wmadduxne','wmadduxcs','wmadduxhs','wmadduxcc','wmadduxlo','wmadduxmi','wmadduxpl','wmadduxvs','wmadduxvc','wmadduxhi','wmadduxls','wmadduxge','wmadduxlt','wmadduxgt','wmadduxle', + 'wmaddsneq','wmaddsnne','wmaddsncs','wmaddsnhs','wmaddsncc','wmaddsnlo','wmaddsnmi','wmaddsnpl','wmaddsnvs','wmaddsnvc','wmaddsnhi','wmaddsnls','wmaddsnge','wmaddsnlt','wmaddsngt','wmaddsnle', + 'wmadduneq','wmaddunne','wmadduncs','wmaddunhs','wmadduncc','wmaddunlo','wmaddunmi','wmaddunpl','wmaddunvs','wmaddunvc','wmaddunhi','wmaddunls','wmaddunge','wmaddunlt','wmaddungt','wmaddunle', + 'wmaxsbeq','wmaxsbne','wmaxsbcs','wmaxsbhs','wmaxsbcc','wmaxsblo','wmaxsbmi','wmaxsbpl','wmaxsbvs','wmaxsbvc','wmaxsbhi','wmaxsbls','wmaxsbge','wmaxsblt','wmaxsbgt','wmaxsble', + 'wmaxsheq','wmaxshne','wmaxshcs','wmaxshhs','wmaxshcc','wmaxshlo','wmaxshmi','wmaxshpl','wmaxshvs','wmaxshvc','wmaxshhi','wmaxshls','wmaxshge','wmaxshlt','wmaxshgt','wmaxshle', + 'wmaxsweq','wmaxswne','wmaxswcs','wmaxswhs','wmaxswcc','wmaxswlo','wmaxswmi','wmaxswpl','wmaxswvs','wmaxswvc','wmaxswhi','wmaxswls','wmaxswge','wmaxswlt','wmaxswgt','wmaxswle', + 'wmaxubeq','wmaxubne','wmaxubcs','wmaxubhs','wmaxubcc','wmaxublo','wmaxubmi','wmaxubpl','wmaxubvs','wmaxubvc','wmaxubhi','wmaxubls','wmaxubge','wmaxublt','wmaxubgt','wmaxuble', + 'wmaxuheq','wmaxuhne','wmaxuhcs','wmaxuhhs','wmaxuhcc','wmaxuhlo','wmaxuhmi','wmaxuhpl','wmaxuhvs','wmaxuhvc','wmaxuhhi','wmaxuhls','wmaxuhge','wmaxuhlt','wmaxuhgt','wmaxuhle', + 'wmaxuweq','wmaxuwne','wmaxuwcs','wmaxuwhs','wmaxuwcc','wmaxuwlo','wmaxuwmi','wmaxuwpl','wmaxuwvs','wmaxuwvc','wmaxuwhi','wmaxuwls','wmaxuwge','wmaxuwlt','wmaxuwgt','wmaxuwle', + 'wmergeeq','wmergene','wmergecs','wmergehs','wmergecc','wmergelo','wmergemi','wmergepl','wmergevs','wmergevc','wmergehi','wmergels','wmergege','wmergelt','wmergegt','wmergele', + 'wmiabbeq','wmiabbne','wmiabbcs','wmiabbhs','wmiabbcc','wmiabblo','wmiabbmi','wmiabbpl','wmiabbvs','wmiabbvc','wmiabbhi','wmiabbls','wmiabbge','wmiabblt','wmiabbgt','wmiabble', + 'wmiabteq','wmiabtne','wmiabtcs','wmiabths','wmiabtcc','wmiabtlo','wmiabtmi','wmiabtpl','wmiabtvs','wmiabtvc','wmiabthi','wmiabtls','wmiabtge','wmiabtlt','wmiabtgt','wmiabtle', + 'wmiatbeq','wmiatbne','wmiatbcs','wmiatbhs','wmiatbcc','wmiatblo','wmiatbmi','wmiatbpl','wmiatbvs','wmiatbvc','wmiatbhi','wmiatbls','wmiatbge','wmiatblt','wmiatbgt','wmiatble', + 'wmiatteq','wmiattne','wmiattcs','wmiatths','wmiattcc','wmiattlo','wmiattmi','wmiattpl','wmiattvs','wmiattvc','wmiatthi','wmiattls','wmiattge','wmiattlt','wmiattgt','wmiattle', + 'wmiabbneq','wmiabbnne','wmiabbncs','wmiabbnhs','wmiabbncc','wmiabbnlo','wmiabbnmi','wmiabbnpl','wmiabbnvs','wmiabbnvc','wmiabbnhi','wmiabbnls','wmiabbnge','wmiabbnlt','wmiabbngt','wmiabbnle', + 'wmiabtneq','wmiabtnne','wmiabtncs','wmiabtnhs','wmiabtncc','wmiabtnlo','wmiabtnmi','wmiabtnpl','wmiabtnvs','wmiabtnvc','wmiabtnhi','wmiabtnls','wmiabtnge','wmiabtnlt','wmiabtngt','wmiabtnle', + 'wmiatbneq','wmiatbnne','wmiatbncs','wmiatbnhs','wmiatbncc','wmiatbnlo','wmiatbnmi','wmiatbnpl','wmiatbnvs','wmiatbnvc','wmiatbnhi','wmiatbnls','wmiatbnge','wmiatbnlt','wmiatbngt','wmiatbnle', + 'wmiattneq','wmiattnne','wmiattncs','wmiattnhs','wmiattncc','wmiattnlo','wmiattnmi','wmiattnpl','wmiattnvs','wmiattnvc','wmiattnhi','wmiattnls','wmiattnge','wmiattnlt','wmiattngt','wmiattnle', + 'wmiawbbeq','wmiawbbne','wmiawbbcs','wmiawbbhs','wmiawbbcc','wmiawbblo','wmiawbbmi','wmiawbbpl','wmiawbbvs','wmiawbbvc','wmiawbbhi','wmiawbbls','wmiawbbge','wmiawbblt','wmiawbbgt','wmiawbble', + 'wmiawbteq','wmiawbtne','wmiawbtcs','wmiawbths','wmiawbtcc','wmiawbtlo','wmiawbtmi','wmiawbtpl','wmiawbtvs','wmiawbtvc','wmiawbthi','wmiawbtls','wmiawbtge','wmiawbtlt','wmiawbtgt','wmiawbtle', + 'wmiawtbeq','wmiawtbne','wmiawtbcs','wmiawtbhs','wmiawtbcc','wmiawtblo','wmiawtbmi','wmiawtbpl','wmiawtbvs','wmiawtbvc','wmiawtbhi','wmiawtbls','wmiawtbge','wmiawtblt','wmiawtbgt','wmiawtble', + 'wmiawtteq','wmiawttne','wmiawttcs','wmiawtths','wmiawttcc','wmiawttlo','wmiawttmi','wmiawttpl','wmiawttvs','wmiawttvc','wmiawtthi','wmiawttls','wmiawttge','wmiawttlt','wmiawttgt','wmiawttle', + 'wmiawbbneq','wmiawbbnne','wmiawbbncs','wmiawbbnhs','wmiawbbncc','wmiawbbnlo','wmiawbbnmi','wmiawbbnpl','wmiawbbnvs','wmiawbbnvc','wmiawbbnhi','wmiawbbnls','wmiawbbnge','wmiawbbnlt','wmiawbbngt','wmiawbbnle', + 'wmiawbtneq','wmiawbtnne','wmiawbtncs','wmiawbtnhs','wmiawbtncc','wmiawbtnlo','wmiawbtnmi','wmiawbtnpl','wmiawbtnvs','wmiawbtnvc','wmiawbtnhi','wmiawbtnls','wmiawbtnge','wmiawbtnlt','wmiawbtngt','wmiawbtnle', + 'wmiawtbneq','wmiawtbnne','wmiawtbncs','wmiawtbnhs','wmiawtbncc','wmiawtbnlo','wmiawtbnmi','wmiawtbnpl','wmiawtbnvs','wmiawtbnvc','wmiawtbnhi','wmiawtbnls','wmiawtbnge','wmiawtbnlt','wmiawtbngt','wmiawtbnle', + 'wmiawttneq','wmiawttnne','wmiawttncs','wmiawttnhs','wmiawttncc','wmiawttnlo','wmiawttnmi','wmiawttnpl','wmiawttnvs','wmiawttnvc','wmiawttnhi','wmiawttnls','wmiawttnge','wmiawttnlt','wmiawttngt','wmiawttnle', + 'wminsbeq','wminsbne','wminsbcs','wminsbhs','wminsbcc','wminsblo','wminsbmi','wminsbpl','wminsbvs','wminsbvc','wminsbhi','wminsbls','wminsbge','wminsblt','wminsbgt','wminsble', + 'wminsheq','wminshne','wminshcs','wminshhs','wminshcc','wminshlo','wminshmi','wminshpl','wminshvs','wminshvc','wminshhi','wminshls','wminshge','wminshlt','wminshgt','wminshle', + 'wminsweq','wminswne','wminswcs','wminswhs','wminswcc','wminswlo','wminswmi','wminswpl','wminswvs','wminswvc','wminswhi','wminswls','wminswge','wminswlt','wminswgt','wminswle', + 'wminubeq','wminubne','wminubcs','wminubhs','wminubcc','wminublo','wminubmi','wminubpl','wminubvs','wminubvc','wminubhi','wminubls','wminubge','wminublt','wminubgt','wminuble', + 'wminuheq','wminuhne','wminuhcs','wminuhhs','wminuhcc','wminuhlo','wminuhmi','wminuhpl','wminuhvs','wminuhvc','wminuhhi','wminuhls','wminuhge','wminuhlt','wminuhgt','wminuhle', + 'wminuweq','wminuwne','wminuwcs','wminuwhs','wminuwcc','wminuwlo','wminuwmi','wminuwpl','wminuwvs','wminuwvc','wminuwhi','wminuwls','wminuwge','wminuwlt','wminuwgt','wminuwle', + 'wmoveq','wmovne','wmovcs','wmovhs','wmovcc','wmovlo','wmovmi','wmovpl','wmovvs','wmovvc','wmovhi','wmovls','wmovge','wmovlt','wmovgt','wmovle', + 'wmulsmeq','wmulsmne','wmulsmcs','wmulsmhs','wmulsmcc','wmulsmlo','wmulsmmi','wmulsmpl','wmulsmvs','wmulsmvc','wmulsmhi','wmulsmls','wmulsmge','wmulsmlt','wmulsmgt','wmulsmle', + 'wmulsleq','wmulslne','wmulslcs','wmulslhs','wmulslcc','wmulsllo','wmulslmi','wmulslpl','wmulslvs','wmulslvc','wmulslhi','wmulslls','wmulslge','wmulsllt','wmulslgt','wmulslle', + 'wmulumeq','wmulumne','wmulumcs','wmulumhs','wmulumcc','wmulumlo','wmulummi','wmulumpl','wmulumvs','wmulumvc','wmulumhi','wmulumls','wmulumge','wmulumlt','wmulumgt','wmulumle', + 'wmululeq','wmululne','wmululcs','wmululhs','wmululcc','wmulullo','wmululmi','wmululpl','wmululvs','wmululvc','wmululhi','wmululls','wmululge','wmulullt','wmululgt','wmululle', + 'wmulsmreq','wmulsmrne','wmulsmrcs','wmulsmrhs','wmulsmrcc','wmulsmrlo','wmulsmrmi','wmulsmrpl','wmulsmrvs','wmulsmrvc','wmulsmrhi','wmulsmrls','wmulsmrge','wmulsmrlt','wmulsmrgt','wmulsmrle', + 'wmulslreq','wmulslrne','wmulslrcs','wmulslrhs','wmulslrcc','wmulslrlo','wmulslrmi','wmulslrpl','wmulslrvs','wmulslrvc','wmulslrhi','wmulslrls','wmulslrge','wmulslrlt','wmulslrgt','wmulslrle', + 'wmulumreq','wmulumrne','wmulumrcs','wmulumrhs','wmulumrcc','wmulumrlo','wmulumrmi','wmulumrpl','wmulumrvs','wmulumrvc','wmulumrhi','wmulumrls','wmulumrge','wmulumrlt','wmulumrgt','wmulumrle', + 'wmululreq','wmululrne','wmululrcs','wmululrhs','wmululrcc','wmululrlo','wmululrmi','wmululrpl','wmululrvs','wmululrvc','wmululrhi','wmululrls','wmululrge','wmululrlt','wmululrgt','wmululrle', + 'wmulwumeq','wmulwumne','wmulwumcs','wmulwumhs','wmulwumcc','wmulwumlo','wmulwummi','wmulwumpl','wmulwumvs','wmulwumvc','wmulwumhi','wmulwumls','wmulwumge','wmulwumlt','wmulwumgt','wmulwumle', + 'wmulwsmeq','wmulwsmne','wmulwsmcs','wmulwsmhs','wmulwsmcc','wmulwsmlo','wmulwsmmi','wmulwsmpl','wmulwsmvs','wmulwsmvc','wmulwsmhi','wmulwsmls','wmulwsmge','wmulwsmlt','wmulwsmgt','wmulwsmle', + 'wmulwleq','wmulwlne','wmulwlcs','wmulwlhs','wmulwlcc','wmulwllo','wmulwlmi','wmulwlpl','wmulwlvs','wmulwlvc','wmulwlhi','wmulwlls','wmulwlge','wmulwllt','wmulwlgt','wmulwlle', + 'wmulwumreq','wmulwumrne','wmulwumrcs','wmulwumrhs','wmulwumrcc','wmulwumrlo','wmulwumrmi','wmulwumrpl','wmulwumrvs','wmulwumrvc','wmulwumrhi','wmulwumrls','wmulwumrge','wmulwumrlt','wmulwumrgt','wmulwumrle', + 'wmulwsmreq','wmulwsmrne','wmulwsmrcs','wmulwsmrhs','wmulwsmrcc','wmulwsmrlo','wmulwsmrmi','wmulwsmrpl','wmulwsmrvs','wmulwsmrvc','wmulwsmrhi','wmulwsmrls','wmulwsmrge','wmulwsmrlt','wmulwsmrgt','wmulwsmrle', + 'woreq','worne','worcs','worhs','worcc','worlo','wormi','worpl','worvs','worvc','worhi','worls','worge','worlt','worgt','worle', + 'wpackhsseq','wpackhssne','wpackhsscs','wpackhsshs','wpackhsscc','wpackhsslo','wpackhssmi','wpackhsspl','wpackhssvs','wpackhssvc','wpackhsshi','wpackhssls','wpackhssge','wpackhsslt','wpackhssgt','wpackhssle', + 'wpackwsseq','wpackwssne','wpackwsscs','wpackwsshs','wpackwsscc','wpackwsslo','wpackwssmi','wpackwsspl','wpackwssvs','wpackwssvc','wpackwsshi','wpackwssls','wpackwssge','wpackwsslt','wpackwssgt','wpackwssle', + 'wpackdsseq','wpackdssne','wpackdsscs','wpackdsshs','wpackdsscc','wpackdsslo','wpackdssmi','wpackdsspl','wpackdssvs','wpackdssvc','wpackdsshi','wpackdssls','wpackdssge','wpackdsslt','wpackdssgt','wpackdssle', + 'wpackhuseq','wpackhusne','wpackhuscs','wpackhushs','wpackhuscc','wpackhuslo','wpackhusmi','wpackhuspl','wpackhusvs','wpackhusvc','wpackhushi','wpackhusls','wpackhusge','wpackhuslt','wpackhusgt','wpackhusle', + 'wpackwuseq','wpackwusne','wpackwuscs','wpackwushs','wpackwuscc','wpackwuslo','wpackwusmi','wpackwuspl','wpackwusvs','wpackwusvc','wpackwushi','wpackwusls','wpackwusge','wpackwuslt','wpackwusgt','wpackwusle', + 'wpackduseq','wpackdusne','wpackduscs','wpackdushs','wpackduscc','wpackduslo','wpackdusmi','wpackduspl','wpackdusvs','wpackdusvc','wpackdushi','wpackdusls','wpackdusge','wpackduslt','wpackdusgt','wpackdusle', + 'wqmiabbeq','wqmiabbne','wqmiabbcs','wqmiabbhs','wqmiabbcc','wqmiabblo','wqmiabbmi','wqmiabbpl','wqmiabbvs','wqmiabbvc','wqmiabbhi','wqmiabbls','wqmiabbge','wqmiabblt','wqmiabbgt','wqmiabble', + 'wqmiabteq','wqmiabtne','wqmiabtcs','wqmiabths','wqmiabtcc','wqmiabtlo','wqmiabtmi','wqmiabtpl','wqmiabtvs','wqmiabtvc','wqmiabthi','wqmiabtls','wqmiabtge','wqmiabtlt','wqmiabtgt','wqmiabtle', + 'wqmiatbeq','wqmiatbne','wqmiatbcs','wqmiatbhs','wqmiatbcc','wqmiatblo','wqmiatbmi','wqmiatbpl','wqmiatbvs','wqmiatbvc','wqmiatbhi','wqmiatbls','wqmiatbge','wqmiatblt','wqmiatbgt','wqmiatble', + 'wqmiatteq','wqmiattne','wqmiattcs','wqmiatths','wqmiattcc','wqmiattlo','wqmiattmi','wqmiattpl','wqmiattvs','wqmiattvc','wqmiatthi','wqmiattls','wqmiattge','wqmiattlt','wqmiattgt','wqmiattle', + 'wqmiabbneq','wqmiabbnne','wqmiabbncs','wqmiabbnhs','wqmiabbncc','wqmiabbnlo','wqmiabbnmi','wqmiabbnpl','wqmiabbnvs','wqmiabbnvc','wqmiabbnhi','wqmiabbnls','wqmiabbnge','wqmiabbnlt','wqmiabbngt','wqmiabbnle', + 'wqmiabtneq','wqmiabtnne','wqmiabtncs','wqmiabtnhs','wqmiabtncc','wqmiabtnlo','wqmiabtnmi','wqmiabtnpl','wqmiabtnvs','wqmiabtnvc','wqmiabtnhi','wqmiabtnls','wqmiabtnge','wqmiabtnlt','wqmiabtngt','wqmiabtnle', + 'wqmiatbneq','wqmiatbnne','wqmiatbncs','wqmiatbnhs','wqmiatbncc','wqmiatbnlo','wqmiatbnmi','wqmiatbnpl','wqmiatbnvs','wqmiatbnvc','wqmiatbnhi','wqmiatbnls','wqmiatbnge','wqmiatbnlt','wqmiatbngt','wqmiatbnle', + 'wqmiattneq','wqmiattnne','wqmiattncs','wqmiattnhs','wqmiattncc','wqmiattnlo','wqmiattnmi','wqmiattnpl','wqmiattnvs','wqmiattnvc','wqmiattnhi','wqmiattnls','wqmiattnge','wqmiattnlt','wqmiattngt','wqmiattnle', + 'wqmulmeq','wqmulmne','wqmulmcs','wqmulmhs','wqmulmcc','wqmulmlo','wqmulmmi','wqmulmpl','wqmulmvs','wqmulmvc','wqmulmhi','wqmulmls','wqmulmge','wqmulmlt','wqmulmgt','wqmulmle', + 'wqmulmreq','wqmulmrne','wqmulmrcs','wqmulmrhs','wqmulmrcc','wqmulmrlo','wqmulmrmi','wqmulmrpl','wqmulmrvs','wqmulmrvc','wqmulmrhi','wqmulmrls','wqmulmrge','wqmulmrlt','wqmulmrgt','wqmulmrle', + 'wqmulwmeq','wqmulwmne','wqmulwmcs','wqmulwmhs','wqmulwmcc','wqmulwmlo','wqmulwmmi','wqmulwmpl','wqmulwmvs','wqmulwmvc','wqmulwmhi','wqmulwmls','wqmulwmge','wqmulwmlt','wqmulwmgt','wqmulwmle', + 'wqmulwmreq','wqmulwmrne','wqmulwmrcs','wqmulwmrhs','wqmulwmrcc','wqmulwmrlo','wqmulwmrmi','wqmulwmrpl','wqmulwmrvs','wqmulwmrvc','wqmulwmrhi','wqmulwmrls','wqmulwmrge','wqmulwmrlt','wqmulwmrgt','wqmulwmrle', + 'wrorheq','wrorhne','wrorhcs','wrorhhs','wrorhcc','wrorhlo','wrorhmi','wrorhpl','wrorhvs','wrorhvc','wrorhhi','wrorhls','wrorhge','wrorhlt','wrorhgt','wrorhle', + 'wrorweq','wrorwne','wrorwcs','wrorwhs','wrorwcc','wrorwlo','wrorwmi','wrorwpl','wrorwvs','wrorwvc','wrorwhi','wrorwls','wrorwge','wrorwlt','wrorwgt','wrorwle', + 'wrordeq','wrordne','wrordcs','wrordhs','wrordcc','wrordlo','wrordmi','wrordpl','wrordvs','wrordvc','wrordhi','wrordls','wrordge','wrordlt','wrordgt','wrordle', + 'wrorhgeq','wrorhgne','wrorhgcs','wrorhghs','wrorhgcc','wrorhglo','wrorhgmi','wrorhgpl','wrorhgvs','wrorhgvc','wrorhghi','wrorhgls','wrorhgge','wrorhglt','wrorhggt','wrorhgle', + 'wrorwgeq','wrorwgne','wrorwgcs','wrorwghs','wrorwgcc','wrorwglo','wrorwgmi','wrorwgpl','wrorwgvs','wrorwgvc','wrorwghi','wrorwgls','wrorwgge','wrorwglt','wrorwggt','wrorwgle', + 'wrordgeq','wrordgne','wrordgcs','wrordghs','wrordgcc','wrordglo','wrordgmi','wrordgpl','wrordgvs','wrordgvc','wrordghi','wrordgls','wrordgge','wrordglt','wrordggt','wrordgle', + 'wsadbeq','wsadbne','wsadbcs','wsadbhs','wsadbcc','wsadblo','wsadbmi','wsadbpl','wsadbvs','wsadbvc','wsadbhi','wsadbls','wsadbge','wsadblt','wsadbgt','wsadble', + 'wsadheq','wsadhne','wsadhcs','wsadhhs','wsadhcc','wsadhlo','wsadhmi','wsadhpl','wsadhvs','wsadhvc','wsadhhi','wsadhls','wsadhge','wsadhlt','wsadhgt','wsadhle', + 'wsadbzeq','wsadbzne','wsadbzcs','wsadbzhs','wsadbzcc','wsadbzlo','wsadbzmi','wsadbzpl','wsadbzvs','wsadbzvc','wsadbzhi','wsadbzls','wsadbzge','wsadbzlt','wsadbzgt','wsadbzle', + 'wsadhzeq','wsadhzne','wsadhzcs','wsadhzhs','wsadhzcc','wsadhzlo','wsadhzmi','wsadhzpl','wsadhzvs','wsadhzvc','wsadhzhi','wsadhzls','wsadhzge','wsadhzlt','wsadhzgt','wsadhzle', + 'wshufheq','wshufhne','wshufhcs','wshufhhs','wshufhcc','wshufhlo','wshufhmi','wshufhpl','wshufhvs','wshufhvc','wshufhhi','wshufhls','wshufhge','wshufhlt','wshufhgt','wshufhle', + 'wsllheq','wsllhne','wsllhcs','wsllhhs','wsllhcc','wsllhlo','wsllhmi','wsllhpl','wsllhvs','wsllhvc','wsllhhi','wsllhls','wsllhge','wsllhlt','wsllhgt','wsllhle', + 'wsllweq','wsllwne','wsllwcs','wsllwhs','wsllwcc','wsllwlo','wsllwmi','wsllwpl','wsllwvs','wsllwvc','wsllwhi','wsllwls','wsllwge','wsllwlt','wsllwgt','wsllwle', + 'wslldeq','wslldne','wslldcs','wslldhs','wslldcc','wslldlo','wslldmi','wslldpl','wslldvs','wslldvc','wslldhi','wslldls','wslldge','wslldlt','wslldgt','wslldle', + 'wsllhgeq','wsllhgne','wsllhgcs','wsllhghs','wsllhgcc','wsllhglo','wsllhgmi','wsllhgpl','wsllhgvs','wsllhgvc','wsllhghi','wsllhgls','wsllhgge','wsllhglt','wsllhggt','wsllhgle', + 'wsllwgeq','wsllwgne','wsllwgcs','wsllwghs','wsllwgcc','wsllwglo','wsllwgmi','wsllwgpl','wsllwgvs','wsllwgvc','wsllwghi','wsllwgls','wsllwgge','wsllwglt','wsllwggt','wsllwgle', + 'wslldgeq','wslldgne','wslldgcs','wslldghs','wslldgcc','wslldglo','wslldgmi','wslldgpl','wslldgvs','wslldgvc','wslldghi','wslldgls','wslldgge','wslldglt','wslldggt','wslldgle', + 'wsraheq','wsrahne','wsrahcs','wsrahhs','wsrahcc','wsrahlo','wsrahmi','wsrahpl','wsrahvs','wsrahvc','wsrahhi','wsrahls','wsrahge','wsrahlt','wsrahgt','wsrahle', + 'wsraweq','wsrawne','wsrawcs','wsrawhs','wsrawcc','wsrawlo','wsrawmi','wsrawpl','wsrawvs','wsrawvc','wsrawhi','wsrawls','wsrawge','wsrawlt','wsrawgt','wsrawle', + 'wsradeq','wsradne','wsradcs','wsradhs','wsradcc','wsradlo','wsradmi','wsradpl','wsradvs','wsradvc','wsradhi','wsradls','wsradge','wsradlt','wsradgt','wsradle', + 'wsrahgeq','wsrahgne','wsrahgcs','wsrahghs','wsrahgcc','wsrahglo','wsrahgmi','wsrahgpl','wsrahgvs','wsrahgvc','wsrahghi','wsrahgls','wsrahgge','wsrahglt','wsrahggt','wsrahgle', + 'wsrawgeq','wsrawgne','wsrawgcs','wsrawghs','wsrawgcc','wsrawglo','wsrawgmi','wsrawgpl','wsrawgvs','wsrawgvc','wsrawghi','wsrawgls','wsrawgge','wsrawglt','wsrawggt','wsrawgle', + 'wsradgeq','wsradgne','wsradgcs','wsradghs','wsradgcc','wsradglo','wsradgmi','wsradgpl','wsradgvs','wsradgvc','wsradghi','wsradgls','wsradgge','wsradglt','wsradggt','wsradgle', + 'wsrlheq','wsrlhne','wsrlhcs','wsrlhhs','wsrlhcc','wsrlhlo','wsrlhmi','wsrlhpl','wsrlhvs','wsrlhvc','wsrlhhi','wsrlhls','wsrlhge','wsrlhlt','wsrlhgt','wsrlhle', + 'wsrlweq','wsrlwne','wsrlwcs','wsrlwhs','wsrlwcc','wsrlwlo','wsrlwmi','wsrlwpl','wsrlwvs','wsrlwvc','wsrlwhi','wsrlwls','wsrlwge','wsrlwlt','wsrlwgt','wsrlwle', + 'wsrldeq','wsrldne','wsrldcs','wsrldhs','wsrldcc','wsrldlo','wsrldmi','wsrldpl','wsrldvs','wsrldvc','wsrldhi','wsrldls','wsrldge','wsrldlt','wsrldgt','wsrldle', + 'wsrlhgeq','wsrlhgne','wsrlhgcs','wsrlhghs','wsrlhgcc','wsrlhglo','wsrlhgmi','wsrlhgpl','wsrlhgvs','wsrlhgvc','wsrlhghi','wsrlhgls','wsrlhgge','wsrlhglt','wsrlhggt','wsrlhgle', + 'wsrlwgeq','wsrlwgne','wsrlwgcs','wsrlwghs','wsrlwgcc','wsrlwglo','wsrlwgmi','wsrlwgpl','wsrlwgvs','wsrlwgvc','wsrlwghi','wsrlwgls','wsrlwgge','wsrlwglt','wsrlwggt','wsrlwgle', + 'wsrldgeq','wsrldgne','wsrldgcs','wsrldghs','wsrldgcc','wsrldglo','wsrldgmi','wsrldgpl','wsrldgvs','wsrldgvc','wsrldghi','wsrldgls','wsrldgge','wsrldglt','wsrldggt','wsrldgle', + 'wstrbeq','wstrbne','wstrbcs','wstrbhs','wstrbcc','wstrblo','wstrbmi','wstrbpl','wstrbvs','wstrbvc','wstrbhi','wstrbls','wstrbge','wstrblt','wstrbgt','wstrble', + 'wstrheq','wstrhne','wstrhcs','wstrhhs','wstrhcc','wstrhlo','wstrhmi','wstrhpl','wstrhvs','wstrhvc','wstrhhi','wstrhls','wstrhge','wstrhlt','wstrhgt','wstrhle', + 'wstrweq','wstrwne','wstrwcs','wstrwhs','wstrwcc','wstrwlo','wstrwmi','wstrwpl','wstrwvs','wstrwvc','wstrwhi','wstrwls','wstrwge','wstrwlt','wstrwgt','wstrwle', + 'wstrdeq','wstrdne','wstrdcs','wstrdhs','wstrdcc','wstrdlo','wstrdmi','wstrdpl','wstrdvs','wstrdvc','wstrdhi','wstrdls','wstrdge','wstrdlt','wstrdgt','wstrdle', + 'wsubbeq','wsubbne','wsubbcs','wsubbhs','wsubbcc','wsubblo','wsubbmi','wsubbpl','wsubbvs','wsubbvc','wsubbhi','wsubbls','wsubbge','wsubblt','wsubbgt','wsubble', + 'wsubheq','wsubhne','wsubhcs','wsubhhs','wsubhcc','wsubhlo','wsubhmi','wsubhpl','wsubhvs','wsubhvc','wsubhhi','wsubhls','wsubhge','wsubhlt','wsubhgt','wsubhle', + 'wsubweq','wsubwne','wsubwcs','wsubwhs','wsubwcc','wsubwlo','wsubwmi','wsubwpl','wsubwvs','wsubwvc','wsubwhi','wsubwls','wsubwge','wsubwlt','wsubwgt','wsubwle', + 'wsubbsseq','wsubbssne','wsubbsscs','wsubbsshs','wsubbsscc','wsubbsslo','wsubbssmi','wsubbsspl','wsubbssvs','wsubbssvc','wsubbsshi','wsubbssls','wsubbssge','wsubbsslt','wsubbssgt','wsubbssle', + 'wsubhsseq','wsubhssne','wsubhsscs','wsubhsshs','wsubhsscc','wsubhsslo','wsubhssmi','wsubhsspl','wsubhssvs','wsubhssvc','wsubhsshi','wsubhssls','wsubhssge','wsubhsslt','wsubhssgt','wsubhssle', + 'wsubwsseq','wsubwssne','wsubwsscs','wsubwsshs','wsubwsscc','wsubwsslo','wsubwssmi','wsubwsspl','wsubwssvs','wsubwssvc','wsubwsshi','wsubwssls','wsubwssge','wsubwsslt','wsubwssgt','wsubwssle', + 'wsubbuseq','wsubbusne','wsubbuscs','wsubbushs','wsubbuscc','wsubbuslo','wsubbusmi','wsubbuspl','wsubbusvs','wsubbusvc','wsubbushi','wsubbusls','wsubbusge','wsubbuslt','wsubbusgt','wsubbusle', + 'wsubhuseq','wsubhusne','wsubhuscs','wsubhushs','wsubhuscc','wsubhuslo','wsubhusmi','wsubhuspl','wsubhusvs','wsubhusvc','wsubhushi','wsubhusls','wsubhusge','wsubhuslt','wsubhusgt','wsubhusle', + 'wsubwuseq','wsubwusne','wsubwuscs','wsubwushs','wsubwuscc','wsubwuslo','wsubwusmi','wsubwuspl','wsubwusvs','wsubwusvc','wsubwushi','wsubwusls','wsubwusge','wsubwuslt','wsubwusgt','wsubwusle', + 'wsubaddhxeq','wsubaddhxne','wsubaddhxcs','wsubaddhxhs','wsubaddhxcc','wsubaddhxlo','wsubaddhxmi','wsubaddhxpl','wsubaddhxvs','wsubaddhxvc','wsubaddhxhi','wsubaddhxls','wsubaddhxge','wsubaddhxlt','wsubaddhxgt','wsubaddhxle', + 'wunpckehsbeq','wunpckehsbne','wunpckehsbcs','wunpckehsbhs','wunpckehsbcc','wunpckehsblo','wunpckehsbmi','wunpckehsbpl','wunpckehsbvs','wunpckehsbvc','wunpckehsbhi','wunpckehsbls','wunpckehsbge','wunpckehsblt','wunpckehsbgt','wunpckehsble', + 'wunpckehsheq','wunpckehshne','wunpckehshcs','wunpckehshhs','wunpckehshcc','wunpckehshlo','wunpckehshmi','wunpckehshpl','wunpckehshvs','wunpckehshvc','wunpckehshhi','wunpckehshls','wunpckehshge','wunpckehshlt','wunpckehshgt','wunpckehshle', + 'wunpckehsweq','wunpckehswne','wunpckehswcs','wunpckehswhs','wunpckehswcc','wunpckehswlo','wunpckehswmi','wunpckehswpl','wunpckehswvs','wunpckehswvc','wunpckehswhi','wunpckehswls','wunpckehswge','wunpckehswlt','wunpckehswgt','wunpckehswle', + 'wunpckehubeq','wunpckehubne','wunpckehubcs','wunpckehubhs','wunpckehubcc','wunpckehublo','wunpckehubmi','wunpckehubpl','wunpckehubvs','wunpckehubvc','wunpckehubhi','wunpckehubls','wunpckehubge','wunpckehublt','wunpckehubgt','wunpckehuble', + 'wunpckehuheq','wunpckehuhne','wunpckehuhcs','wunpckehuhhs','wunpckehuhcc','wunpckehuhlo','wunpckehuhmi','wunpckehuhpl','wunpckehuhvs','wunpckehuhvc','wunpckehuhhi','wunpckehuhls','wunpckehuhge','wunpckehuhlt','wunpckehuhgt','wunpckehuhle', + 'wunpckehuweq','wunpckehuwne','wunpckehuwcs','wunpckehuwhs','wunpckehuwcc','wunpckehuwlo','wunpckehuwmi','wunpckehuwpl','wunpckehuwvs','wunpckehuwvc','wunpckehuwhi','wunpckehuwls','wunpckehuwge','wunpckehuwlt','wunpckehuwgt','wunpckehuwle', + 'wunpckihbeq','wunpckihbne','wunpckihbcs','wunpckihbhs','wunpckihbcc','wunpckihblo','wunpckihbmi','wunpckihbpl','wunpckihbvs','wunpckihbvc','wunpckihbhi','wunpckihbls','wunpckihbge','wunpckihblt','wunpckihbgt','wunpckihble', + 'wunpckihheq','wunpckihhne','wunpckihhcs','wunpckihhhs','wunpckihhcc','wunpckihhlo','wunpckihhmi','wunpckihhpl','wunpckihhvs','wunpckihhvc','wunpckihhhi','wunpckihhls','wunpckihhge','wunpckihhlt','wunpckihhgt','wunpckihhle', + 'wunpckihweq','wunpckihwne','wunpckihwcs','wunpckihwhs','wunpckihwcc','wunpckihwlo','wunpckihwmi','wunpckihwpl','wunpckihwvs','wunpckihwvc','wunpckihwhi','wunpckihwls','wunpckihwge','wunpckihwlt','wunpckihwgt','wunpckihwle', + 'wunpckelsbeq','wunpckelsbne','wunpckelsbcs','wunpckelsbhs','wunpckelsbcc','wunpckelsblo','wunpckelsbmi','wunpckelsbpl','wunpckelsbvs','wunpckelsbvc','wunpckelsbhi','wunpckelsbls','wunpckelsbge','wunpckelsblt','wunpckelsbgt','wunpckelsble', + 'wunpckelsheq','wunpckelshne','wunpckelshcs','wunpckelshhs','wunpckelshcc','wunpckelshlo','wunpckelshmi','wunpckelshpl','wunpckelshvs','wunpckelshvc','wunpckelshhi','wunpckelshls','wunpckelshge','wunpckelshlt','wunpckelshgt','wunpckelshle', + 'wunpckelsweq','wunpckelswne','wunpckelswcs','wunpckelswhs','wunpckelswcc','wunpckelswlo','wunpckelswmi','wunpckelswpl','wunpckelswvs','wunpckelswvc','wunpckelswhi','wunpckelswls','wunpckelswge','wunpckelswlt','wunpckelswgt','wunpckelswle', + 'wunpckelubeq','wunpckelubne','wunpckelubcs','wunpckelubhs','wunpckelubcc','wunpckelublo','wunpckelubmi','wunpckelubpl','wunpckelubvs','wunpckelubvc','wunpckelubhi','wunpckelubls','wunpckelubge','wunpckelublt','wunpckelubgt','wunpckeluble', + 'wunpckeluheq','wunpckeluhne','wunpckeluhcs','wunpckeluhhs','wunpckeluhcc','wunpckeluhlo','wunpckeluhmi','wunpckeluhpl','wunpckeluhvs','wunpckeluhvc','wunpckeluhhi','wunpckeluhls','wunpckeluhge','wunpckeluhlt','wunpckeluhgt','wunpckeluhle', + 'wunpckeluweq','wunpckeluwne','wunpckeluwcs','wunpckeluwhs','wunpckeluwcc','wunpckeluwlo','wunpckeluwmi','wunpckeluwpl','wunpckeluwvs','wunpckeluwvc','wunpckeluwhi','wunpckeluwls','wunpckeluwge','wunpckeluwlt','wunpckeluwgt','wunpckeluwle', + 'wunpckilbeq','wunpckilbne','wunpckilbcs','wunpckilbhs','wunpckilbcc','wunpckilblo','wunpckilbmi','wunpckilbpl','wunpckilbvs','wunpckilbvc','wunpckilbhi','wunpckilbls','wunpckilbge','wunpckilblt','wunpckilbgt','wunpckilble', + 'wunpckilheq','wunpckilhne','wunpckilhcs','wunpckilhhs','wunpckilhcc','wunpckilhlo','wunpckilhmi','wunpckilhpl','wunpckilhvs','wunpckilhvc','wunpckilhhi','wunpckilhls','wunpckilhge','wunpckilhlt','wunpckilhgt','wunpckilhle', + 'wunpckilweq','wunpckilwne','wunpckilwcs','wunpckilwhs','wunpckilwcc','wunpckilwlo','wunpckilwmi','wunpckilwpl','wunpckilwvs','wunpckilwvc','wunpckilwhi','wunpckilwls','wunpckilwge','wunpckilwlt','wunpckilwgt','wunpckilwle', + 'wxoreq','wxorne','wxorcs','wxorhs','wxorcc','wxorlo','wxormi','wxorpl','wxorvs','wxorvc','wxorhi','wxorls','wxorge','wxorlt','wxorgt','wxorle', + 'wzeroeq','wzerone','wzerocs','wzerohs','wzerocc','wzerolo','wzeromi','wzeropl','wzerovs','wzerovc','wzerohi','wzerols','wzeroge','wzerolt','wzerogt','wzerole' + ), + /* Unconditional VFPv3 & NEON SIMD Memory Access Instructions */ + 19 => array( + /* Unconditional VFPv3 & NEON SIMD Memory Access: Loads */ + 'vld.8','vldal.8', + 'vld.16','vldal.16', + 'vld.32','vldal.32', + 'vld.64','vldal.64', + + 'vld1.8','vld1al.8', + 'vld1.16','vld1al.16', + 'vld1.32','vld1al.32', + + 'vld2.8','vld2al.8', + 'vld2.16','vld2al.16', + 'vld2.32','vld2al.32', + + 'vld3.8','vld3al.8', + 'vld3.16','vld3al.16', + 'vld3.32','vld3al.32', + + 'vld4.8','vld4al.8', + 'vld4.16','vld4al.16', + 'vld4.32','vld4al.32', + + 'vldm','vldmal', + 'vldm.32','vldmal.32', + 'vldm.64','vldmal.64', + + 'vldmia','vldmiaal', + 'vldmia.32','vldmiaal.32', + 'vldmia.64','vldmiaal.64', + + 'vldmdb','vldmdbal', + 'vldmdb.32','vldmdbal.32', + 'vldmdb.64','vldmdbal.64', + + 'vldr','vldral', + 'vldr.32','vldral.32', + 'vldr.64','vldral.64', + + 'vpop','vpopal', + 'vpop.32','vpopal.32', + 'vpop.64','vpopal.64', + + /* Unconditional VFPv3 & NEON SIMD Memory Access: Stores */ + 'vst1.8','vst1al.8', + 'vst1.16','vst1al.16', + 'vst1.32','vst1al.32', + 'vst1.64','vst1al.64', + + 'vst2.8','vst2al.8', + 'vst2.16','vst2al.16', + 'vst2.32','vst2al.32', + + 'vst3.8','vst3al.8', + 'vst3.16','vst3al.16', + 'vst3.32','vst3al.32', + + 'vst4.8','vst4al.8', + 'vst4.16','vst4al.16', + 'vst4.32','vst4al.32', + + 'vstm','vstmal', + 'vstm.32','vstmal.32', + 'vstm.64','vstmal.64', + + 'vstmia','vstmiaal', + 'vstmia.32','vstmiaal.32', + 'vstmia.64','vstmiaal.64', + + 'vstmdb','vstmdbal', + 'vstmdb.32','vstmdbal.32', + 'vstmdb.64','vstmdbal.64', + + 'vstr','vstral', + 'vstr.32','vstral.32', + 'vstr.64','vstral.64', + + 'vpush','vpushal', + 'vpush.32','vpushal.32', + 'vpush.64','vpushal.64' + ), + /* Unconditional NEON SIMD Logical Instructions */ + 20 => array( + 'vand','vandal', + 'vand.i8','vandal.i8', + 'vand.i16','vandal.i16', + 'vand.i32','vandal.i32', + 'vand.i64','vandal.i64', + 'vand.s8','vandal.s8', + 'vand.s16','vandal.s16', + 'vand.s32','vandal.s32', + 'vand.s64','vandal.s64', + 'vand.u8','vandal.u8', + 'vand.u16','vandal.u16', + 'vand.u32','vandal.u32', + 'vand.u64','vandal.u64', + 'vand.f32','vandal.f32', + 'vand.f64','vandal.f64', + + 'vbic','vbical', + 'vbic.i8','vbical.i8', + 'vbic.i16','vbical.i16', + 'vbic.i32','vbical.i32', + 'vbic.i64','vbical.i64', + 'vbic.s8','vbical.s8', + 'vbic.s16','vbical.s16', + 'vbic.s32','vbical.s32', + 'vbic.s64','vbical.s64', + 'vbic.u8','vbical.u8', + 'vbic.u16','vbical.u16', + 'vbic.u32','vbical.u32', + 'vbic.u64','vbical.u64', + 'vbic.f32','vbical.f32', + 'vbic.f64','vbical.f64', + + 'vbif','vbifal', + 'vbif.i8','vbifal.i8', + 'vbif.i16','vbifal.i16', + 'vbif.i32','vbifal.i32', + 'vbif.i64','vbifal.i64', + 'vbif.s8','vbifal.s8', + 'vbif.s16','vbifal.s16', + 'vbif.s32','vbifal.s32', + 'vbif.s64','vbifal.s64', + 'vbif.u8','vbifal.u8', + 'vbif.u16','vbifal.u16', + 'vbif.u32','vbifal.u32', + 'vbif.u64','vbifal.u64', + 'vbif.f32','vbifal.f32', + 'vbif.f64','vbifal.f64', + + 'vbit','vbital', + 'vbit.i8','vbital.i8', + 'vbit.i16','vbital.i16', + 'vbit.i32','vbital.i32', + 'vbit.i64','vbital.i64', + 'vbit.s8','vbital.s8', + 'vbit.s16','vbital.s16', + 'vbit.s32','vbital.s32', + 'vbit.s64','vbital.s64', + 'vbit.u8','vbital.u8', + 'vbit.u16','vbital.u16', + 'vbit.u32','vbital.u32', + 'vbit.u64','vbital.u64', + 'vbit.f32','vbital.f32', + 'vbit.f64','vbital.f64', + + 'vbsl','vbslal', + 'vbsl.i8','vbslal.i8', + 'vbsl.i16','vbslal.i16', + 'vbsl.i32','vbslal.i32', + 'vbsl.i64','vbslal.i64', + 'vbsl.s8','vbslal.s8', + 'vbsl.s16','vbslal.s16', + 'vbsl.s32','vbslal.s32', + 'vbsl.s64','vbslal.s64', + 'vbsl.u8','vbslal.u8', + 'vbsl.u16','vbslal.u16', + 'vbsl.u32','vbslal.u32', + 'vbsl.u64','vbslal.u64', + 'vbsl.f32','vbslal.f32', + 'vbsl.f64','vbslal.f64', + + 'veor','veoral', + 'veor.i8','veoral.i8', + 'veor.i16','veoral.i16', + 'veor.i32','veoral.i32', + 'veor.i64','veoral.i64', + 'veor.s8','veoral.s8', + 'veor.s16','veoral.s16', + 'veor.s32','veoral.s32', + 'veor.s64','veoral.s64', + 'veor.u8','veoral.u8', + 'veor.u16','veoral.u16', + 'veor.u32','veoral.u32', + 'veor.u64','veoral.u64', + 'veor.f32','veoral.f32', + 'veor.f64','veoral.f64', + + 'vmov','vmoval', + 'vmov.8','vmoval.8', + 'vmov.16','vmoval.16', + 'vmov.32','vmoval.32', + 'vmov.i8','vmoval.i8', + 'vmov.i16','vmoval.i16', + 'vmov.i32','vmoval.i32', + 'vmov.i64','vmoval.i64', + 'vmov.f32','vmoval.f32', + 'vmov.f64','vmoval.f64', + + 'vmvn','vmvnal', + 'vmvn.s8','vmvnal.s8', + 'vmvn.s16','vmvnal.s16', + 'vmvn.s32','vmvnal.s32', + 'vmvn.s64','vmvnal.s64', + 'vmvn.u8','vmvnal.u8', + 'vmvn.u16','vmvnal.u16', + 'vmvn.u32','vmvnal.u32', + 'vmvn.u64','vmvnal.u64', + 'vmvn.i8','vmvnal.i8', + 'vmvn.i16','vmvnal.i16', + 'vmvn.i32','vmvnal.i32', + 'vmvn.i64','vmvnal.i64', + 'vmvn.f32','vmvnal.f32', + 'vmvn.f64','vmvnal.f64', + + 'vorn','vornal', + 'vorn.s8','vornal.s8', + 'vorn.s16','vornal.s16', + 'vorn.s32','vornal.s32', + 'vorn.s64','vornal.s64', + 'vorn.u8','vornal.u8', + 'vorn.u16','vornal.u16', + 'vorn.u32','vornal.u32', + 'vorn.u64','vornal.u64', + 'vorn.i8','vornal.i8', + 'vorn.i16','vornal.i16', + 'vorn.i32','vornal.i32', + 'vorn.i64','vornal.i64', + 'vorn.f32','vornal.f32', + 'vorn.f64','vornal.f64', + + 'vorr','vorral', + 'vorr.s8','vorral.s8', + 'vorr.s16','vorral.s16', + 'vorr.s32','vorral.s32', + 'vorr.s64','vorral.s64', + 'vorr.u8','vorral.u8', + 'vorr.u16','vorral.u16', + 'vorr.u32','vorral.u32', + 'vorr.u64','vorral.u64', + 'vorr.i8','vorral.i8', + 'vorr.i16','vorral.i16', + 'vorr.i32','vorral.i32', + 'vorr.i64','vorral.i64', + 'vorr.f32','vorral.f32', + 'vorr.f64','vorral.f64', + + 'vswp','vswpal', + 'vswp.s8','vswpal.s8', + 'vswp.s16','vswpal.s16', + 'vswp.s32','vswpal.s32', + 'vswp.s64','vswpal.s64', + 'vswp.u8','vswpal.u8', + 'vswp.u16','vswpal.u16', + 'vswp.u32','vswpal.u32', + 'vswp.u64','vswpal.u64', + 'vswp.i8','vswpal.i8', + 'vswp.i16','vswpal.i16', + 'vswp.i32','vswpal.i32', + 'vswp.i64','vswpal.i64', + 'vswp.f32','vswpal.f32', + 'vswp.f64','vswpal.f64' + ), + /* Unconditional NEON SIMD ARM Registers Interop Instructions */ + 21 => array( + 'vmrs','vmrsal', + 'vmsr','vmsral' + ), + /* Unconditional NEON SIMD Bit/Byte-Level Instructions */ + 22 => array( + 'vcnt.8','vcntal.8', + 'vdup.8','vdupal.8', + + 'vdup.16','vdupal.16', + 'vdup.32','vdupal.32', + + 'vext.8','vextal.8', + 'vext.16','vextal.16', + + 'vext.32','vextal.32', + 'vext.64','vextal.64', + + 'vrev16.8','vrev16al.8', + 'vrev32.8','vrev32al.8', + 'vrev32.16','vrev32al.16', + 'vrev64.8','vrev64al.8', + 'vrev64.16','vrev64al.16', + 'vrev64.32','vrev64al.32', + + 'vsli.8','vslial.8', + 'vsli.16','vslial.16', + 'vsli.32','vslial.32', + 'vsli.64','vslial.64', + + 'vsri.8','vsrial.8', + 'vsri.16','vsrial.16', + 'vsri.32','vsrial.32', + 'vsri.64','vsrial.64', + + 'vtbl.8','vtblal.8', + + 'vtbx','vtbxal', + + 'vtrn.8','vtrnal.8', + 'vtrn.16','vtrnal.16', + 'vtrn.32','vtrnal.32', + + 'vtst.8','vtstal.8', + 'vtst.16','vtstal.16', + 'vtst.32','vtstal.32', + + 'vuzp.8','vuzpal.8', + 'vuzp.16','vuzpal.16', + 'vuzp.32','vuzpal.32', + + 'vzip.8','vzipal.8', + 'vzip.16','vzipal.16', + 'vzip.32','vzipal.32', + + 'vmull.p8','vmullal.p8' + ), + /* Unconditional NEON SIMD Universal Integer Instructions */ + 23 => array( + 'vadd.i8','vaddal.i8', + 'vadd.i16','vaddal.i16', + 'vadd.i32','vaddal.i32', + 'vadd.i64','vaddal.i64', + + 'vsub.i8','vsubal.i8', + 'vsub.i16','vsubal.i16', + 'vsub.i32','vsubal.i32', + 'vsub.i64','vsubal.i64', + + 'vaddhn.i16','vaddhnal.i16', + 'vaddhn.i32','vaddhnal.i32', + 'vaddhn.i64','vaddhnal.i64', + + 'vsubhn.i16','vsubhnal.i16', + 'vsubhn.i32','vsubhnal.i32', + 'vsubhn.i64','vsubhnal.i64', + + 'vraddhn.i16','vraddhnal.i16', + 'vraddhn.i32','vraddhnal.i32', + 'vraddhn.i64','vraddhnal.i64', + + 'vrsubhn.i16','vrsubhnal.i16', + 'vrsubhn.i32','vrsubhnal.i32', + 'vrsubhn.i64','vrsubhnal.i64', + + 'vpadd.i8','vpaddal.i8', + 'vpadd.i16','vpaddal.i16', + 'vpadd.i32','vpaddal.i32', + + 'vceq.i8','vceqal.i8', + 'vceq.i16','vceqal.i16', + 'vceq.i32','vceqal.i32', + + 'vclz.i8','vclzal.i8', + 'vclz.i16','vclzal.i16', + 'vclz.i32','vclzal.i32', + + 'vmovn.i16','vmovnal.i16', + 'vmovn.i32','vmovnal.i32', + 'vmovn.i64','vmovnal.i64', + + 'vmla.s8','vmlaal.s8', + 'vmla.s16','vmlaal.s16', + 'vmla.s32','vmlaal.s32', + 'vmla.u8','vmlaal.u8', + 'vmla.u16','vmlaal.u16', + 'vmla.u32','vmlaal.u32', + 'vmla.i8','vmlaal.i8', + 'vmla.i16','vmlaal.i16', + 'vmla.i32','vmlaal.i32', + + 'vmls.s8','vmlsal.s8', + 'vmls.s16','vmlsal.s16', + 'vmls.s32','vmlsal.s32', + 'vmls.u8','vmlsal.u8', + 'vmls.u16','vmlsal.u16', + 'vmls.u32','vmlsal.u32', + 'vmls.i8','vmlsal.i8', + 'vmls.i16','vmlsal.i16', + 'vmls.i32','vmlsal.i32', + + 'vmul.s8','vmulal.s8', + 'vmul.s16','vmulal.s16', + 'vmul.s32','vmulal.s32', + 'vmul.u8','vmulal.u8', + 'vmul.u16','vmulal.u16', + 'vmul.u32','vmulal.u32', + 'vmul.i8','vmulal.i8', + 'vmul.i16','vmulal.i16', + 'vmul.i32','vmulal.i32', + 'vmul.p8','vmulal.p8', + + 'vrshrn.i16','vrshrnal.i16', + 'vrshrn.i32','vrshrnal.i32', + 'vrshrn.i64','vrshrnal.i64', + + 'vshrn.i16','vshrnal.i16', + 'vshrn.i32','vshrnal.i32', + 'vshrn.i64','vshrnal.i64', + + 'vshl.i8','vshlal.i8', + 'vshl.i16','vshlal.i16', + 'vshl.i32','vshlal.i32', + 'vshl.i64','vshlal.i64', + + 'vshll.i8','vshllal.i8', + 'vshll.i16','vshllal.i16', + 'vshll.i32','vshllal.i32' + ), + /* Unconditional NEON SIMD Signed Integer Instructions */ + 24 => array( + 'vaba.s8','vabaal.s8', + 'vaba.s16','vabaal.s16', + 'vaba.s32','vabaal.s32', + + 'vabal.s8','vabalal.s8', + 'vabal.s16','vabalal.s16', + 'vabal.s32','vabalal.s32', + + 'vabd.s8','vabdal.s8', + 'vabd.s16','vabdal.s16', + 'vabd.s32','vabdal.s32', + + 'vabs.s8','vabsal.s8', + 'vabs.s16','vabsal.s16', + 'vabs.s32','vabsal.s32', + + 'vaddl.s8','vaddlal.s8', + 'vaddl.s16','vaddlal.s16', + 'vaddl.s32','vaddlal.s32', + + 'vcge.s8','vcgeal.s8', + 'vcge.s16','vcgeal.s16', + 'vcge.s32','vcgeal.s32', + + 'vcle.s8','vcleal.s8', + 'vcle.s16','vcleal.s16', + 'vcle.s32','vcleal.s32', + + 'vcgt.s8','vcgtal.s8', + 'vcgt.s16','vcgtal.s16', + 'vcgt.s32','vcgtal.s32', + + 'vclt.s8','vcltal.s8', + 'vclt.s16','vcltal.s16', + 'vclt.s32','vcltal.s32', + + 'vcls.s8','vclsal.s8', + 'vcls.s16','vclsal.s16', + 'vcls.s32','vclsal.s32', + + 'vaddw.s8','vaddwal.s8', + 'vaddw.s16','vaddwal.s16', + 'vaddw.s32','vaddwal.s32', + + 'vhadd.s8','vhaddal.s8', + 'vhadd.s16','vhaddal.s16', + 'vhadd.s32','vhaddal.s32', + + 'vhsub.s8','vhsubal.s8', + 'vhsub.s16','vhsubal.s16', + 'vhsub.s32','vhsubal.s32', + + 'vmax.s8','vmaxal.s8', + 'vmax.s16','vmaxal.s16', + 'vmax.s32','vmaxal.s32', + + 'vmin.s8','vminal.s8', + 'vmin.s16','vminal.s16', + 'vmin.s32','vminal.s32', + + 'vmlal.s8','vmlalal.s8', + 'vmlal.s16','vmlalal.s16', + 'vmlal.s32','vmlalal.s32', + + 'vmlsl.s8','vmlslal.s8', + 'vmlsl.s16','vmlslal.s16', + 'vmlsl.s32','vmlslal.s32', + + 'vneg.s8','vnegal.s8', + 'vneg.s16','vnegal.s16', + 'vneg.s32','vnegal.s32', + + 'vpadal.s8','vpadalal.s8', + 'vpadal.s16','vpadalal.s16', + 'vpadal.s32','vpadalal.s32', + + 'vmovl.s8','vmovlal.s8', + 'vmovl.s16','vmovlal.s16', + 'vmovl.s32','vmovlal.s32', + + 'vmull.s8','vmullal.s8', + 'vmull.s16','vmullal.s16', + 'vmull.s32','vmullal.s32', + + 'vpaddl.s8','vpaddlal.s8', + 'vpaddl.s16','vpaddlal.s16', + 'vpaddl.s32','vpaddlal.s32', + + 'vpmax.s8','vpmaxal.s8', + 'vpmax.s16','vpmaxal.s16', + 'vpmax.s32','vpmaxal.s32', + + 'vpmin.s8','vpminal.s8', + 'vpmin.s16','vpminal.s16', + 'vpmin.s32','vpminal.s32', + + 'vqabs.s8','vqabsal.s8', + 'vqabs.s16','vqabsal.s16', + 'vqabs.s32','vqabsal.s32', + + 'vqadd.s8','vqaddal.s8', + 'vqadd.s16','vqaddal.s16', + 'vqadd.s32','vqaddal.s32', + 'vqadd.s64','vqaddal.s64', + + 'vqdmlal.s16','vqdmlalal.s16', + 'vqdmlal.s32','vqdmlalal.s32', + + 'vqdmlsl.s16','vqdmlslal.s16', + 'vqdmlsl.s32','vqdmlslal.s32', + + 'vqdmulh.s16','vqdmulhal.s16', + 'vqdmulh.s32','vqdmulhal.s32', + + 'vqdmull.s16','vqdmullal.s16', + 'vqdmull.s32','vqdmullal.s32', + + 'vqmovn.s16','vqmovnal.s16', + 'vqmovn.s32','vqmovnal.s32', + 'vqmovn.s64','vqmovnal.s64', + + 'vqmovun.s16','vqmovunal.s16', + 'vqmovun.s32','vqmovunal.s32', + 'vqmovun.s64','vqmovunal.s64', + + 'vqneg.s8','vqnegal.s8', + 'vqneg.s16','vqnegal.s16', + 'vqneg.s32','vqnegal.s32', + + 'vqrdmulh.s16','vqrdmulhal.s16', + 'vqrdmulh.s32','vqrdmulhal.s32', + + 'vqrshl.s8','vqrshlal.s8', + 'vqrshl.s16','vqrshlal.s16', + 'vqrshl.s32','vqrshlal.s32', + 'vqrshl.s64','vqrshlal.s64', + + 'vqrshrn.s16','vqrshrnal.s16', + 'vqrshrn.s32','vqrshrnal.s32', + 'vqrshrn.s64','vqrshrnal.s64', + + 'vqrshrun.s16','vqrshrunal.s16', + 'vqrshrun.s32','vqrshrunal.s32', + 'vqrshrun.s64','vqrshrunal.s64', + + 'vqshl.s8','vqshlal.s8', + 'vqshl.s16','vqshlal.s16', + 'vqshl.s32','vqshlal.s32', + 'vqshl.s64','vqshlal.s64', + + 'vqshlu.s8','vqshlual.s8', + 'vqshlu.s16','vqshlual.s16', + 'vqshlu.s32','vqshlual.s32', + 'vqshlu.s64','vqshlual.s64', + + 'vqshrn.s16','vqshrnal.s16', + 'vqshrn.s32','vqshrnal.s32', + 'vqshrn.s64','vqshrnal.s64', + + 'vqshrun.s16','vqshrunal.s16', + 'vqshrun.s32','vqshrunal.s32', + 'vqshrun.s64','vqshrunal.s64', + + 'vqsub.s8','vqsubal.s8', + 'vqsub.s16','vqsubal.s16', + 'vqsub.s32','vqsubal.s32', + 'vqsub.s64','vqsubal.s64', + + 'vrhadd.s8','vrhaddal.s8', + 'vrhadd.s16','vrhaddal.s16', + 'vrhadd.s32','vrhaddal.s32', + + 'vrshl.s8','vrshlal.s8', + 'vrshl.s16','vrshlal.s16', + 'vrshl.s32','vrshlal.s32', + 'vrshl.s64','vrshlal.s64', + + 'vrshr.s8','vrshral.s8', + 'vrshr.s16','vrshral.s16', + 'vrshr.s32','vrshral.s32', + 'vrshr.s64','vrshral.s64', + + 'vrsra.s8','vrsraal.s8', + 'vrsra.s16','vrsraal.s16', + 'vrsra.s32','vrsraal.s32', + 'vrsra.s64','vrsraal.s64', + + 'vshl.s8','vshlal.s8', + 'vshl.s16','vshlal.s16', + 'vshl.s32','vshlal.s32', + 'vshl.s64','vshlal.s64', + + 'vshll.s8','vshllal.s8', + 'vshll.s16','vshllal.s16', + 'vshll.s32','vshllal.s32', + + 'vshr.s8','vshral.s8', + 'vshr.s16','vshral.s16', + 'vshr.s32','vshral.s32', + 'vshr.s64','vshral.s64', + + 'vsra.s8','vsraal.s8', + 'vsra.s16','vsraal.s16', + 'vsra.s32','vsraal.s32', + 'vsra.s64','vsraal.s64', + + 'vsubl.s8','vsublal.s8', + 'vsubl.s16','vsublal.s16', + 'vsubl.s32','vsublal.s32', + + 'vsubh.s8','vsubhal.s8', + 'vsubh.s16','vsubhal.s16', + 'vsubh.s32','vsubhal.s32' + ), + /* Unconditional NEON SIMD Unsigned Integer Instructions */ + 25 => array( + 'vaba.u8','vabaal.u8', + 'vaba.u16','vabaal.u16', + 'vaba.u32','vabaal.u32', + + 'vabal.u8','vabalal.u8', + 'vabal.u16','vabalal.u16', + 'vabal.u32','vabalal.u32', + + 'vabd.u8','vabdal.u8', + 'vabd.u16','vabdal.u16', + 'vabd.u32','vabdal.u32', + + 'vaddl.u8','vaddlal.u8', + 'vaddl.u16','vaddlal.u16', + 'vaddl.u32','vaddlal.u32', + + 'vsubl.u8','vsublal.u8', + 'vsubl.u16','vsublal.u16', + 'vsubl.u32','vsublal.u32', + + 'vaddw.u8','vaddwal.u8', + 'vaddw.u16','vaddwal.u16', + 'vaddw.u32','vaddwal.u32', + + 'vsubh.u8','vsubhal.u8', + 'vsubh.u16','vsubhal.u16', + 'vsubh.u32','vsubhal.u32', + + 'vhadd.u8','vhaddal.u8', + 'vhadd.u16','vhaddal.u16', + 'vhadd.u32','vhaddal.u32', + + 'vhsub.u8','vhsubal.u8', + 'vhsub.u16','vhsubal.u16', + 'vhsub.u32','vhsubal.u32', + + 'vpadal.u8','vpadalal.u8', + 'vpadal.u16','vpadalal.u16', + 'vpadal.u32','vpadalal.u32', + + 'vpaddl.u8','vpaddlal.u8', + 'vpaddl.u16','vpaddlal.u16', + 'vpaddl.u32','vpaddlal.u32', + + 'vcge.u8','vcgeal.u8', + 'vcge.u16','vcgeal.u16', + 'vcge.u32','vcgeal.u32', + + 'vcle.u8','vcleal.u8', + 'vcle.u16','vcleal.u16', + 'vcle.u32','vcleal.u32', + + 'vcgt.u8','vcgtal.u8', + 'vcgt.u16','vcgtal.u16', + 'vcgt.u32','vcgtal.u32', + + 'vclt.u8','vcltal.u8', + 'vclt.u16','vcltal.u16', + 'vclt.u32','vcltal.u32', + + 'vmax.u8','vmaxal.u8', + 'vmax.u16','vmaxal.u16', + 'vmax.u32','vmaxal.u32', + + 'vmin.u8','vminal.u8', + 'vmin.u16','vminal.u16', + 'vmin.u32','vminal.u32', + + 'vmlal.u8','vmlalal.u8', + 'vmlal.u16','vmlalal.u16', + 'vmlal.u32','vmlalal.u32', + + 'vmlsl.u8','vmlslal.u8', + 'vmlsl.u16','vmlslal.u16', + 'vmlsl.u32','vmlslal.u32', + + 'vmull.u8','vmullal.u8', + 'vmull.u16','vmullal.u16', + 'vmull.u32','vmullal.u32', + + 'vmovl.u8','vmovlal.u8', + 'vmovl.u16','vmovlal.u16', + 'vmovl.u32','vmovlal.u32', + + 'vshl.u8','vshlal.u8', + 'vshl.u16','vshlal.u16', + 'vshl.u32','vshlal.u32', + 'vshl.u64','vshlal.u64', + + 'vshll.u8','vshllal.u8', + 'vshll.u16','vshllal.u16', + 'vshll.u32','vshllal.u32', + + 'vshr.u8','vshral.u8', + 'vshr.u16','vshral.u16', + 'vshr.u32','vshral.u32', + 'vshr.u64','vshral.u64', + + 'vsra.u8','vsraal.u8', + 'vsra.u16','vsraal.u16', + 'vsra.u32','vsraal.u32', + 'vsra.u64','vsraal.u64', + + 'vpmax.u8','vpmaxal.u8', + 'vpmax.u16','vpmaxal.u16', + 'vpmax.u32','vpmaxal.u32', + + 'vpmin.u8','vpminal.u8', + 'vpmin.u16','vpminal.u16', + 'vpmin.u32','vpminal.u32', + + 'vqadd.u8','vqaddal.u8', + 'vqadd.u16','vqaddal.u16', + 'vqadd.u32','vqaddal.u32', + 'vqadd.u64','vqaddal.u64', + + 'vqsub.u8','vqsubal.u8', + 'vqsub.u16','vqsubal.u16', + 'vqsub.u32','vqsubal.u32', + 'vqsub.u64','vqsubal.u64', + + 'vqmovn.u16','vqmovnal.u16', + 'vqmovn.u32','vqmovnal.u32', + 'vqmovn.u64','vqmovnal.u64', + + 'vqshl.u8','vqshlal.u8', + 'vqshl.u16','vqshlal.u16', + 'vqshl.u32','vqshlal.u32', + 'vqshl.u64','vqshlal.u64', + + 'vqshrn.u16','vqshrnal.u16', + 'vqshrn.u32','vqshrnal.u32', + 'vqshrn.u64','vqshrnal.u64', + + 'vqrshl.u8','vqrshlal.u8', + 'vqrshl.u16','vqrshlal.u16', + 'vqrshl.u32','vqrshlal.u32', + 'vqrshl.u64','vqrshlal.u64', + + 'vqrshrn.u16','vqrshrnal.u16', + 'vqrshrn.u32','vqrshrnal.u32', + 'vqrshrn.u64','vqrshrnal.u64', + + 'vrhadd.u8','vrhaddal.u8', + 'vrhadd.u16','vrhaddal.u16', + 'vrhadd.u32','vrhaddal.u32', + + 'vrshl.u8','vrshlal.u8', + 'vrshl.u16','vrshlal.u16', + 'vrshl.u32','vrshlal.u32', + 'vrshl.u64','vrshlal.u64', + + 'vrshr.u8','vrshral.u8', + 'vrshr.u16','vrshral.u16', + 'vrshr.u32','vrshral.u32', + 'vrshr.u64','vrshral.u64', + + 'vrsra.u8','vrsraal.u8', + 'vrsra.u16','vrsraal.u16', + 'vrsra.u32','vrsraal.u32', + 'vrsra.u64','vrsraal.u64' + ), + /* Unconditional VFPv3 & NEON SIMD Floating-Point Instructions */ + 26 => array( + 'vabd.f32','vabdal.f32', + + 'vabs.f32','vabsal.f32', + 'vabs.f64','vabsal.f64', + + 'vacge.f32','vacgeal.f32', + 'vacgt.f32','vacgtal.f32', + 'vacle.f32','vacleal.f32', + 'vaclt.f32','vacltal.f32', + + 'vadd.f32','vaddal.f32', + 'vadd.f64','vaddal.f64', + + 'vceq.f32','vceqal.f32', + 'vcge.f32','vcgeal.f32', + 'vcle.f32','vcleal.f32', + 'vcgt.f32','vcgtal.f32', + 'vclt.f32','vcltal.f32', + + 'vcmp.f32','vcmpal.f32', + 'vcmp.f64','vcmpal.f64', + + 'vcmpe.f32','vcmpeal.f32', + 'vcmpe.f64','vcmpeal.f64', + + 'vcvt.s16.f32','vcvtal.s16.f32', + 'vcvt.s16.f64','vcvtal.s16.f64', + 'vcvt.s32.f32','vcvtal.s32.f32', + 'vcvt.s32.f64','vcvtal.s32.f64', + 'vcvt.u16.f32','vcvtal.u16.f32', + 'vcvt.u16.f64','vcvtal.u16.f64', + 'vcvt.u32.f32','vcvtal.u32.f32', + 'vcvt.u32.f64','vcvtal.u32.f64', + 'vcvt.f16.f32','vcvtal.f16.f32', + 'vcvt.f32.s32','vcvtal.f32.s32', + 'vcvt.f32.u32','vcvtal.f32.u32', + 'vcvt.f32.f16','vcvtal.f32.f16', + 'vcvt.f32.f64','vcvtal.f32.f64', + 'vcvt.f64.s32','vcvtal.f64.s32', + 'vcvt.f64.u32','vcvtal.f64.u32', + 'vcvt.f64.f32','vcvtal.f64.f32', + + 'vcvtr.s32.f32','vcvtral.s32.f32', + 'vcvtr.s32.f64','vcvtral.s32.f64', + 'vcvtr.u32.f32','vcvtral.u32.f32', + 'vcvtr.u32.f64','vcvtral.u32.f64', + + 'vcvtb.f16.f32','vcvtbal.f16.f32', + 'vcvtb.f32.f16','vcvtbal.f32.f16', + + 'vcvtt.f16.f32','vcvttal.f16.f32', + 'vcvtt.f32.f16','vcvttal.f32.f16', + + 'vdiv.f32','vdival.f32', + 'vdiv.f64','vdival.f64', + + 'vmax.f32','vmaxal.f32', + 'vmin.f32','vminal.f32', + + 'vmla.f32','vmlaal.f32', + 'vmla.f64','vmlaal.f64', + + 'vmls.f32','vmlsal.f32', + 'vmls.f64','vmlsal.f64', + + 'vmul.f32','vmulal.f32', + 'vmul.f64','vmulal.f64', + + 'vneg.f32','vnegal.f32', + 'vneg.f64','vnegal.f64', + + 'vnmla.f32','vnmlaal.f32', + 'vnmla.f64','vnmlaal.f64', + + 'vnmls.f32','vnmlsal.f32', + 'vnmls.f64','vnmlsal.f64', + + 'vnmul.f64','vnmulal.f64', + 'vnmul.f32','vnmulal.f32', + + 'vpadd.f32','vpaddal.f32', + + 'vpmax.f32','vpmaxal.f32', + 'vpmin.f32','vpminal.f32', + + 'vrecpe.u32','vrecpeal.u32', + 'vrecpe.f32','vrecpeal.f32', + 'vrecps.f32','vrecpsal.f32', + + 'vrsqrte.u32','vrsqrteal.u32', + 'vrsqrte.f32','vrsqrteal.f32', + 'vrsqrts.f32','vrsqrtsal.f32', + + 'vsqrt.f32','vsqrtal.f32', + 'vsqrt.f64','vsqrtal.f64', + + 'vsub.f32','vsubal.f32', + 'vsub.f64','vsubal.f64' + ), + /* Conditional VFPv3 & NEON SIMD Memory Access Instructions */ + 27 => array( + /* Conditional VFPv3 & NEON SIMD Memory Access: Loads */ + 'vldeq.8','vldne.8','vldcs.8','vldhs.8','vldcc.8','vldlo.8','vldmi.8','vldpl.8','vldvs.8','vldvc.8','vldhi.8','vldls.8','vldge.8','vldlt.8','vldgt.8','vldle.8', + 'vldeq.16','vldne.16','vldcs.16','vldhs.16','vldcc.16','vldlo.16','vldmi.16','vldpl.16','vldvs.16','vldvc.16','vldhi.16','vldls.16','vldge.16','vldlt.16','vldgt.16','vldle.16', + 'vldeq.32','vldne.32','vldcs.32','vldhs.32','vldcc.32','vldlo.32','vldmi.32','vldpl.32','vldvs.32','vldvc.32','vldhi.32','vldls.32','vldge.32','vldlt.32','vldgt.32','vldle.32', + 'vldeq.64','vldne.64','vldcs.64','vldhs.64','vldcc.64','vldlo.64','vldmi.64','vldpl.64','vldvs.64','vldvc.64','vldhi.64','vldls.64','vldge.64','vldlt.64','vldgt.64','vldle.64', + + 'vld1eq.8','vld1ne.8','vld1cs.8','vld1hs.8','vld1cc.8','vld1lo.8','vld1mi.8','vld1pl.8','vld1vs.8','vld1vc.8','vld1hi.8','vld1ls.8','vld1ge.8','vld1lt.8','vld1gt.8','vld1le.8', + 'vld1eq.16','vld1ne.16','vld1cs.16','vld1hs.16','vld1cc.16','vld1lo.16','vld1mi.16','vld1pl.16','vld1vs.16','vld1vc.16','vld1hi.16','vld1ls.16','vld1ge.16','vld1lt.16','vld1gt.16','vld1le.16', + 'vld1eq.32','vld1ne.32','vld1cs.32','vld1hs.32','vld1cc.32','vld1lo.32','vld1mi.32','vld1pl.32','vld1vs.32','vld1vc.32','vld1hi.32','vld1ls.32','vld1ge.32','vld1lt.32','vld1gt.32','vld1le.32', + + 'vld2eq.8','vld2ne.8','vld2cs.8','vld2hs.8','vld2cc.8','vld2lo.8','vld2mi.8','vld2pl.8','vld2vs.8','vld2vc.8','vld2hi.8','vld2ls.8','vld2ge.8','vld2lt.8','vld2gt.8','vld2le.8', + 'vld2eq.16','vld2ne.16','vld2cs.16','vld2hs.16','vld2cc.16','vld2lo.16','vld2mi.16','vld2pl.16','vld2vs.16','vld2vc.16','vld2hi.16','vld2ls.16','vld2ge.16','vld2lt.16','vld2gt.16','vld2le.16', + 'vld2eq.32','vld2ne.32','vld2cs.32','vld2hs.32','vld2cc.32','vld2lo.32','vld2mi.32','vld2pl.32','vld2vs.32','vld2vc.32','vld2hi.32','vld2ls.32','vld2ge.32','vld2lt.32','vld2gt.32','vld2le.32', + + 'vld3eq.8','vld3ne.8','vld3cs.8','vld3hs.8','vld3cc.8','vld3lo.8','vld3mi.8','vld3pl.8','vld3vs.8','vld3vc.8','vld3hi.8','vld3ls.8','vld3ge.8','vld3lt.8','vld3gt.8','vld3le.8', + 'vld3eq.16','vld3ne.16','vld3cs.16','vld3hs.16','vld3cc.16','vld3lo.16','vld3mi.16','vld3pl.16','vld3vs.16','vld3vc.16','vld3hi.16','vld3ls.16','vld3ge.16','vld3lt.16','vld3gt.16','vld3le.16', + 'vld3eq.32','vld3ne.32','vld3cs.32','vld3hs.32','vld3cc.32','vld3lo.32','vld3mi.32','vld3pl.32','vld3vs.32','vld3vc.32','vld3hi.32','vld3ls.32','vld3ge.32','vld3lt.32','vld3gt.32','vld3le.32', + + 'vld4eq.8','vld4ne.8','vld4cs.8','vld4hs.8','vld4cc.8','vld4lo.8','vld4mi.8','vld4pl.8','vld4vs.8','vld4vc.8','vld4hi.8','vld4ls.8','vld4ge.8','vld4lt.8','vld4gt.8','vld4le.8', + 'vld4eq.16','vld4ne.16','vld4cs.16','vld4hs.16','vld4cc.16','vld4lo.16','vld4mi.16','vld4pl.16','vld4vs.16','vld4vc.16','vld4hi.16','vld4ls.16','vld4ge.16','vld4lt.16','vld4gt.16','vld4le.16', + 'vld4eq.32','vld4ne.32','vld4cs.32','vld4hs.32','vld4cc.32','vld4lo.32','vld4mi.32','vld4pl.32','vld4vs.32','vld4vc.32','vld4hi.32','vld4ls.32','vld4ge.32','vld4lt.32','vld4gt.32','vld4le.32', + + 'vldmeq','vldmne','vldmcs','vldmhs','vldmcc','vldmlo','vldmmi','vldmpl','vldmvs','vldmvc','vldmhi','vldmls','vldmge','vldmlt','vldmgt','vldmle', + 'vldmeq.32','vldmne.32','vldmcs.32','vldmhs.32','vldmcc.32','vldmlo.32','vldmmi.32','vldmpl.32','vldmvs.32','vldmvc.32','vldmhi.32','vldmls.32','vldmge.32','vldmlt.32','vldmgt.32','vldmle.32', + 'vldmeq.64','vldmne.64','vldmcs.64','vldmhs.64','vldmcc.64','vldmlo.64','vldmmi.64','vldmpl.64','vldmvs.64','vldmvc.64','vldmhi.64','vldmls.64','vldmge.64','vldmlt.64','vldmgt.64','vldmle.64', + + 'vldmiaeq','vldmiane','vldmiacs','vldmiahs','vldmiacc','vldmialo','vldmiami','vldmiapl','vldmiavs','vldmiavc','vldmiahi','vldmials','vldmiage','vldmialt','vldmiagt','vldmiale', + 'vldmiaeq.32','vldmiane.32','vldmiacs.32','vldmiahs.32','vldmiacc.32','vldmialo.32','vldmiami.32','vldmiapl.32','vldmiavs.32','vldmiavc.32','vldmiahi.32','vldmials.32','vldmiage.32','vldmialt.32','vldmiagt.32','vldmiale.32', + 'vldmiaeq.64','vldmiane.64','vldmiacs.64','vldmiahs.64','vldmiacc.64','vldmialo.64','vldmiami.64','vldmiapl.64','vldmiavs.64','vldmiavc.64','vldmiahi.64','vldmials.64','vldmiage.64','vldmialt.64','vldmiagt.64','vldmiale.64', + + 'vldmdbeq','vldmdbne','vldmdbcs','vldmdbhs','vldmdbcc','vldmdblo','vldmdbmi','vldmdbpl','vldmdbvs','vldmdbvc','vldmdbhi','vldmdbls','vldmdbge','vldmdblt','vldmdbgt','vldmdble', + 'vldmdbeq.32','vldmdbne.32','vldmdbcs.32','vldmdbhs.32','vldmdbcc.32','vldmdblo.32','vldmdbmi.32','vldmdbpl.32','vldmdbvs.32','vldmdbvc.32','vldmdbhi.32','vldmdbls.32','vldmdbge.32','vldmdblt.32','vldmdbgt.32','vldmdble.32', + 'vldmdbeq.64','vldmdbne.64','vldmdbcs.64','vldmdbhs.64','vldmdbcc.64','vldmdblo.64','vldmdbmi.64','vldmdbpl.64','vldmdbvs.64','vldmdbvc.64','vldmdbhi.64','vldmdbls.64','vldmdbge.64','vldmdblt.64','vldmdbgt.64','vldmdble.64', + + 'vldreq','vldrne','vldrcs','vldrhs','vldrcc','vldrlo','vldrmi','vldrpl','vldrvs','vldrvc','vldrhi','vldrls','vldrge','vldrlt','vldrgt','vldrle', + 'vldreq.32','vldrne.32','vldrcs.32','vldrhs.32','vldrcc.32','vldrlo.32','vldrmi.32','vldrpl.32','vldrvs.32','vldrvc.32','vldrhi.32','vldrls.32','vldrge.32','vldrlt.32','vldrgt.32','vldrle.32', + 'vldreq.64','vldrne.64','vldrcs.64','vldrhs.64','vldrcc.64','vldrlo.64','vldrmi.64','vldrpl.64','vldrvs.64','vldrvc.64','vldrhi.64','vldrls.64','vldrge.64','vldrlt.64','vldrgt.64','vldrle.64', + + 'vpopeq','vpopne','vpopcs','vpophs','vpopcc','vpoplo','vpopmi','vpoppl','vpopvs','vpopvc','vpophi','vpopls','vpopge','vpoplt','vpopgt','vpople', + 'vpopeq.32','vpopne.32','vpopcs.32','vpophs.32','vpopcc.32','vpoplo.32','vpopmi.32','vpoppl.32','vpopvs.32','vpopvc.32','vpophi.32','vpopls.32','vpopge.32','vpoplt.32','vpopgt.32','vpople.32', + 'vpopeq.64','vpopne.64','vpopcs.64','vpophs.64','vpopcc.64','vpoplo.64','vpopmi.64','vpoppl.64','vpopvs.64','vpopvc.64','vpophi.64','vpopls.64','vpopge.64','vpoplt.64','vpopgt.64','vpople.64', + + /* Conditional VFPv3 & NEON SIMD Memory Access: Stores */ + 'vst1eq.8','vst1ne.8','vst1cs.8','vst1hs.8','vst1cc.8','vst1lo.8','vst1mi.8','vst1pl.8','vst1vs.8','vst1vc.8','vst1hi.8','vst1ls.8','vst1ge.8','vst1lt.8','vst1gt.8','vst1le.8', + 'vst1eq.16','vst1ne.16','vst1cs.16','vst1hs.16','vst1cc.16','vst1lo.16','vst1mi.16','vst1pl.16','vst1vs.16','vst1vc.16','vst1hi.16','vst1ls.16','vst1ge.16','vst1lt.16','vst1gt.16','vst1le.16', + 'vst1eq.32','vst1ne.32','vst1cs.32','vst1hs.32','vst1cc.32','vst1lo.32','vst1mi.32','vst1pl.32','vst1vs.32','vst1vc.32','vst1hi.32','vst1ls.32','vst1ge.32','vst1lt.32','vst1gt.32','vst1le.32', + 'vst1eq.64','vst1ne.64','vst1cs.64','vst1hs.64','vst1cc.64','vst1lo.64','vst1mi.64','vst1pl.64','vst1vs.64','vst1vc.64','vst1hi.64','vst1ls.64','vst1ge.64','vst1lt.64','vst1gt.64','vst1le.64', + + 'vst2eq.8','vst2ne.8','vst2cs.8','vst2hs.8','vst2cc.8','vst2lo.8','vst2mi.8','vst2pl.8','vst2vs.8','vst2vc.8','vst2hi.8','vst2ls.8','vst2ge.8','vst2lt.8','vst2gt.8','vst2le.8', + 'vst2eq.16','vst2ne.16','vst2cs.16','vst2hs.16','vst2cc.16','vst2lo.16','vst2mi.16','vst2pl.16','vst2vs.16','vst2vc.16','vst2hi.16','vst2ls.16','vst2ge.16','vst2lt.16','vst2gt.16','vst2le.16', + 'vst2eq.32','vst2ne.32','vst2cs.32','vst2hs.32','vst2cc.32','vst2lo.32','vst2mi.32','vst2pl.32','vst2vs.32','vst2vc.32','vst2hi.32','vst2ls.32','vst2ge.32','vst2lt.32','vst2gt.32','vst2le.32', + + 'vst3eq.8','vst3ne.8','vst3cs.8','vst3hs.8','vst3cc.8','vst3lo.8','vst3mi.8','vst3pl.8','vst3vs.8','vst3vc.8','vst3hi.8','vst3ls.8','vst3ge.8','vst3lt.8','vst3gt.8','vst3le.8', + 'vst3eq.16','vst3ne.16','vst3cs.16','vst3hs.16','vst3cc.16','vst3lo.16','vst3mi.16','vst3pl.16','vst3vs.16','vst3vc.16','vst3hi.16','vst3ls.16','vst3ge.16','vst3lt.16','vst3gt.16','vst3le.16', + 'vst3eq.32','vst3ne.32','vst3cs.32','vst3hs.32','vst3cc.32','vst3lo.32','vst3mi.32','vst3pl.32','vst3vs.32','vst3vc.32','vst3hi.32','vst3ls.32','vst3ge.32','vst3lt.32','vst3gt.32','vst3le.32', + + 'vst4eq.8','vst4ne.8','vst4cs.8','vst4hs.8','vst4cc.8','vst4lo.8','vst4mi.8','vst4pl.8','vst4vs.8','vst4vc.8','vst4hi.8','vst4ls.8','vst4ge.8','vst4lt.8','vst4gt.8','vst4le.8', + 'vst4eq.16','vst4ne.16','vst4cs.16','vst4hs.16','vst4cc.16','vst4lo.16','vst4mi.16','vst4pl.16','vst4vs.16','vst4vc.16','vst4hi.16','vst4ls.16','vst4ge.16','vst4lt.16','vst4gt.16','vst4le.16', + 'vst4eq.32','vst4ne.32','vst4cs.32','vst4hs.32','vst4cc.32','vst4lo.32','vst4mi.32','vst4pl.32','vst4vs.32','vst4vc.32','vst4hi.32','vst4ls.32','vst4ge.32','vst4lt.32','vst4gt.32','vst4le.32', + + 'vstmeq','vstmne','vstmcs','vstmhs','vstmcc','vstmlo','vstmmi','vstmpl','vstmvs','vstmvc','vstmhi','vstmls','vstmge','vstmlt','vstmgt','vstmle', + 'vstmeq.32','vstmne.32','vstmcs.32','vstmhs.32','vstmcc.32','vstmlo.32','vstmmi.32','vstmpl.32','vstmvs.32','vstmvc.32','vstmhi.32','vstmls.32','vstmge.32','vstmlt.32','vstmgt.32','vstmle.32', + 'vstmeq.64','vstmne.64','vstmcs.64','vstmhs.64','vstmcc.64','vstmlo.64','vstmmi.64','vstmpl.64','vstmvs.64','vstmvc.64','vstmhi.64','vstmls.64','vstmge.64','vstmlt.64','vstmgt.64','vstmle.64', + + 'vstmiaeq','vstmiane','vstmiacs','vstmiahs','vstmiacc','vstmialo','vstmiami','vstmiapl','vstmiavs','vstmiavc','vstmiahi','vstmials','vstmiage','vstmialt','vstmiagt','vstmiale', + 'vstmiaeq.32','vstmiane.32','vstmiacs.32','vstmiahs.32','vstmiacc.32','vstmialo.32','vstmiami.32','vstmiapl.32','vstmiavs.32','vstmiavc.32','vstmiahi.32','vstmials.32','vstmiage.32','vstmialt.32','vstmiagt.32','vstmiale.32', + 'vstmiaeq.64','vstmiane.64','vstmiacs.64','vstmiahs.64','vstmiacc.64','vstmialo.64','vstmiami.64','vstmiapl.64','vstmiavs.64','vstmiavc.64','vstmiahi.64','vstmials.64','vstmiage.64','vstmialt.64','vstmiagt.64','vstmiale.64', + + 'vstmdbeq','vstmdbne','vstmdbcs','vstmdbhs','vstmdbcc','vstmdblo','vstmdbmi','vstmdbpl','vstmdbvs','vstmdbvc','vstmdbhi','vstmdbls','vstmdbge','vstmdblt','vstmdbgt','vstmdble', + 'vstmdbeq.32','vstmdbne.32','vstmdbcs.32','vstmdbhs.32','vstmdbcc.32','vstmdblo.32','vstmdbmi.32','vstmdbpl.32','vstmdbvs.32','vstmdbvc.32','vstmdbhi.32','vstmdbls.32','vstmdbge.32','vstmdblt.32','vstmdbgt.32','vstmdble.32', + 'vstmdbeq.64','vstmdbne.64','vstmdbcs.64','vstmdbhs.64','vstmdbcc.64','vstmdblo.64','vstmdbmi.64','vstmdbpl.64','vstmdbvs.64','vstmdbvc.64','vstmdbhi.64','vstmdbls.64','vstmdbge.64','vstmdblt.64','vstmdbgt.64','vstmdble.64', + + 'vstreq','vstrne','vstrcs','vstrhs','vstrcc','vstrlo','vstrmi','vstrpl','vstrvs','vstrvc','vstrhi','vstrls','vstrge','vstrlt','vstrgt','vstrle', + 'vstreq.32','vstrne.32','vstrcs.32','vstrhs.32','vstrcc.32','vstrlo.32','vstrmi.32','vstrpl.32','vstrvs.32','vstrvc.32','vstrhi.32','vstrls.32','vstrge.32','vstrlt.32','vstrgt.32','vstrle.32', + 'vstreq.64','vstrne.64','vstrcs.64','vstrhs.64','vstrcc.64','vstrlo.64','vstrmi.64','vstrpl.64','vstrvs.64','vstrvc.64','vstrhi.64','vstrls.64','vstrge.64','vstrlt.64','vstrgt.64','vstrle.64', + + 'vpusheq','vpushne','vpushcs','vpushhs','vpushcc','vpushlo','vpushmi','vpushpl','vpushvs','vpushvc','vpushhi','vpushls','vpushge','vpushlt','vpushgt','vpushle', + 'vpusheq.32','vpushne.32','vpushcs.32','vpushhs.32','vpushcc.32','vpushlo.32','vpushmi.32','vpushpl.32','vpushvs.32','vpushvc.32','vpushhi.32','vpushls.32','vpushge.32','vpushlt.32','vpushgt.32','vpushle.32', + 'vpusheq.64','vpushne.64','vpushcs.64','vpushhs.64','vpushcc.64','vpushlo.64','vpushmi.64','vpushpl.64','vpushvs.64','vpushvc.64','vpushhi.64','vpushls.64','vpushge.64','vpushlt.64','vpushgt.64','vpushle.64' + ), + /* Conditional NEON SIMD Logical Instructions */ + 28 => array( + 'vandeq','vandne','vandcs','vandhs','vandcc','vandlo','vandmi','vandpl','vandvs','vandvc','vandhi','vandls','vandge','vandlt','vandgt','vandle', + 'vandeq.i8','vandne.i8','vandcs.i8','vandhs.i8','vandcc.i8','vandlo.i8','vandmi.i8','vandpl.i8','vandvs.i8','vandvc.i8','vandhi.i8','vandls.i8','vandge.i8','vandlt.i8','vandgt.i8','vandle.i8', + 'vandeq.i16','vandne.i16','vandcs.i16','vandhs.i16','vandcc.i16','vandlo.i16','vandmi.i16','vandpl.i16','vandvs.i16','vandvc.i16','vandhi.i16','vandls.i16','vandge.i16','vandlt.i16','vandgt.i16','vandle.i16', + 'vandeq.i32','vandne.i32','vandcs.i32','vandhs.i32','vandcc.i32','vandlo.i32','vandmi.i32','vandpl.i32','vandvs.i32','vandvc.i32','vandhi.i32','vandls.i32','vandge.i32','vandlt.i32','vandgt.i32','vandle.i32', + 'vandeq.i64','vandne.i64','vandcs.i64','vandhs.i64','vandcc.i64','vandlo.i64','vandmi.i64','vandpl.i64','vandvs.i64','vandvc.i64','vandhi.i64','vandls.i64','vandge.i64','vandlt.i64','vandgt.i64','vandle.i64', + 'vandeq.s8','vandne.s8','vandcs.s8','vandhs.s8','vandcc.s8','vandlo.s8','vandmi.s8','vandpl.s8','vandvs.s8','vandvc.s8','vandhi.s8','vandls.s8','vandge.s8','vandlt.s8','vandgt.s8','vandle.s8', + 'vandeq.s16','vandne.s16','vandcs.s16','vandhs.s16','vandcc.s16','vandlo.s16','vandmi.s16','vandpl.s16','vandvs.s16','vandvc.s16','vandhi.s16','vandls.s16','vandge.s16','vandlt.s16','vandgt.s16','vandle.s16', + 'vandeq.s32','vandne.s32','vandcs.s32','vandhs.s32','vandcc.s32','vandlo.s32','vandmi.s32','vandpl.s32','vandvs.s32','vandvc.s32','vandhi.s32','vandls.s32','vandge.s32','vandlt.s32','vandgt.s32','vandle.s32', + 'vandeq.s64','vandne.s64','vandcs.s64','vandhs.s64','vandcc.s64','vandlo.s64','vandmi.s64','vandpl.s64','vandvs.s64','vandvc.s64','vandhi.s64','vandls.s64','vandge.s64','vandlt.s64','vandgt.s64','vandle.s64', + 'vandeq.u8','vandne.u8','vandcs.u8','vandhs.u8','vandcc.u8','vandlo.u8','vandmi.u8','vandpl.u8','vandvs.u8','vandvc.u8','vandhi.u8','vandls.u8','vandge.u8','vandlt.u8','vandgt.u8','vandle.u8', + 'vandeq.u16','vandne.u16','vandcs.u16','vandhs.u16','vandcc.u16','vandlo.u16','vandmi.u16','vandpl.u16','vandvs.u16','vandvc.u16','vandhi.u16','vandls.u16','vandge.u16','vandlt.u16','vandgt.u16','vandle.u16', + 'vandeq.u32','vandne.u32','vandcs.u32','vandhs.u32','vandcc.u32','vandlo.u32','vandmi.u32','vandpl.u32','vandvs.u32','vandvc.u32','vandhi.u32','vandls.u32','vandge.u32','vandlt.u32','vandgt.u32','vandle.u32', + 'vandeq.u64','vandne.u64','vandcs.u64','vandhs.u64','vandcc.u64','vandlo.u64','vandmi.u64','vandpl.u64','vandvs.u64','vandvc.u64','vandhi.u64','vandls.u64','vandge.u64','vandlt.u64','vandgt.u64','vandle.u64', + 'vandeq.f32','vandne.f32','vandcs.f32','vandhs.f32','vandcc.f32','vandlo.f32','vandmi.f32','vandpl.f32','vandvs.f32','vandvc.f32','vandhi.f32','vandls.f32','vandge.f32','vandlt.f32','vandgt.f32','vandle.f32', + 'vandeq.f64','vandne.f64','vandcs.f64','vandhs.f64','vandcc.f64','vandlo.f64','vandmi.f64','vandpl.f64','vandvs.f64','vandvc.f64','vandhi.f64','vandls.f64','vandge.f64','vandlt.f64','vandgt.f64','vandle.f64', + + 'vbiceq','vbicne','vbiccs','vbichs','vbiccc','vbiclo','vbicmi','vbicpl','vbicvs','vbicvc','vbichi','vbicls','vbicge','vbiclt','vbicgt','vbicle', + 'vbiceq.i8','vbicne.i8','vbiccs.i8','vbichs.i8','vbiccc.i8','vbiclo.i8','vbicmi.i8','vbicpl.i8','vbicvs.i8','vbicvc.i8','vbichi.i8','vbicls.i8','vbicge.i8','vbiclt.i8','vbicgt.i8','vbicle.i8', + 'vbiceq.i16','vbicne.i16','vbiccs.i16','vbichs.i16','vbiccc.i16','vbiclo.i16','vbicmi.i16','vbicpl.i16','vbicvs.i16','vbicvc.i16','vbichi.i16','vbicls.i16','vbicge.i16','vbiclt.i16','vbicgt.i16','vbicle.i16', + 'vbiceq.i32','vbicne.i32','vbiccs.i32','vbichs.i32','vbiccc.i32','vbiclo.i32','vbicmi.i32','vbicpl.i32','vbicvs.i32','vbicvc.i32','vbichi.i32','vbicls.i32','vbicge.i32','vbiclt.i32','vbicgt.i32','vbicle.i32', + 'vbiceq.i64','vbicne.i64','vbiccs.i64','vbichs.i64','vbiccc.i64','vbiclo.i64','vbicmi.i64','vbicpl.i64','vbicvs.i64','vbicvc.i64','vbichi.i64','vbicls.i64','vbicge.i64','vbiclt.i64','vbicgt.i64','vbicle.i64', + 'vbiceq.s8','vbicne.s8','vbiccs.s8','vbichs.s8','vbiccc.s8','vbiclo.s8','vbicmi.s8','vbicpl.s8','vbicvs.s8','vbicvc.s8','vbichi.s8','vbicls.s8','vbicge.s8','vbiclt.s8','vbicgt.s8','vbicle.s8', + 'vbiceq.s16','vbicne.s16','vbiccs.s16','vbichs.s16','vbiccc.s16','vbiclo.s16','vbicmi.s16','vbicpl.s16','vbicvs.s16','vbicvc.s16','vbichi.s16','vbicls.s16','vbicge.s16','vbiclt.s16','vbicgt.s16','vbicle.s16', + 'vbiceq.s32','vbicne.s32','vbiccs.s32','vbichs.s32','vbiccc.s32','vbiclo.s32','vbicmi.s32','vbicpl.s32','vbicvs.s32','vbicvc.s32','vbichi.s32','vbicls.s32','vbicge.s32','vbiclt.s32','vbicgt.s32','vbicle.s32', + 'vbiceq.s64','vbicne.s64','vbiccs.s64','vbichs.s64','vbiccc.s64','vbiclo.s64','vbicmi.s64','vbicpl.s64','vbicvs.s64','vbicvc.s64','vbichi.s64','vbicls.s64','vbicge.s64','vbiclt.s64','vbicgt.s64','vbicle.s64', + 'vbiceq.u8','vbicne.u8','vbiccs.u8','vbichs.u8','vbiccc.u8','vbiclo.u8','vbicmi.u8','vbicpl.u8','vbicvs.u8','vbicvc.u8','vbichi.u8','vbicls.u8','vbicge.u8','vbiclt.u8','vbicgt.u8','vbicle.u8', + 'vbiceq.u16','vbicne.u16','vbiccs.u16','vbichs.u16','vbiccc.u16','vbiclo.u16','vbicmi.u16','vbicpl.u16','vbicvs.u16','vbicvc.u16','vbichi.u16','vbicls.u16','vbicge.u16','vbiclt.u16','vbicgt.u16','vbicle.u16', + 'vbiceq.u32','vbicne.u32','vbiccs.u32','vbichs.u32','vbiccc.u32','vbiclo.u32','vbicmi.u32','vbicpl.u32','vbicvs.u32','vbicvc.u32','vbichi.u32','vbicls.u32','vbicge.u32','vbiclt.u32','vbicgt.u32','vbicle.u32', + 'vbiceq.u64','vbicne.u64','vbiccs.u64','vbichs.u64','vbiccc.u64','vbiclo.u64','vbicmi.u64','vbicpl.u64','vbicvs.u64','vbicvc.u64','vbichi.u64','vbicls.u64','vbicge.u64','vbiclt.u64','vbicgt.u64','vbicle.u64', + 'vbiceq.f32','vbicne.f32','vbiccs.f32','vbichs.f32','vbiccc.f32','vbiclo.f32','vbicmi.f32','vbicpl.f32','vbicvs.f32','vbicvc.f32','vbichi.f32','vbicls.f32','vbicge.f32','vbiclt.f32','vbicgt.f32','vbicle.f32', + 'vbiceq.f64','vbicne.f64','vbiccs.f64','vbichs.f64','vbiccc.f64','vbiclo.f64','vbicmi.f64','vbicpl.f64','vbicvs.f64','vbicvc.f64','vbichi.f64','vbicls.f64','vbicge.f64','vbiclt.f64','vbicgt.f64','vbicle.f64', + + 'vbifeq','vbifne','vbifcs','vbifhs','vbifcc','vbiflo','vbifmi','vbifpl','vbifvs','vbifvc','vbifhi','vbifls','vbifge','vbiflt','vbifgt','vbifle', + 'vbifeq.i8','vbifne.i8','vbifcs.i8','vbifhs.i8','vbifcc.i8','vbiflo.i8','vbifmi.i8','vbifpl.i8','vbifvs.i8','vbifvc.i8','vbifhi.i8','vbifls.i8','vbifge.i8','vbiflt.i8','vbifgt.i8','vbifle.i8', + 'vbifeq.i16','vbifne.i16','vbifcs.i16','vbifhs.i16','vbifcc.i16','vbiflo.i16','vbifmi.i16','vbifpl.i16','vbifvs.i16','vbifvc.i16','vbifhi.i16','vbifls.i16','vbifge.i16','vbiflt.i16','vbifgt.i16','vbifle.i16', + 'vbifeq.i32','vbifne.i32','vbifcs.i32','vbifhs.i32','vbifcc.i32','vbiflo.i32','vbifmi.i32','vbifpl.i32','vbifvs.i32','vbifvc.i32','vbifhi.i32','vbifls.i32','vbifge.i32','vbiflt.i32','vbifgt.i32','vbifle.i32', + 'vbifeq.i64','vbifne.i64','vbifcs.i64','vbifhs.i64','vbifcc.i64','vbiflo.i64','vbifmi.i64','vbifpl.i64','vbifvs.i64','vbifvc.i64','vbifhi.i64','vbifls.i64','vbifge.i64','vbiflt.i64','vbifgt.i64','vbifle.i64', + 'vbifeq.s8','vbifne.s8','vbifcs.s8','vbifhs.s8','vbifcc.s8','vbiflo.s8','vbifmi.s8','vbifpl.s8','vbifvs.s8','vbifvc.s8','vbifhi.s8','vbifls.s8','vbifge.s8','vbiflt.s8','vbifgt.s8','vbifle.s8', + 'vbifeq.s16','vbifne.s16','vbifcs.s16','vbifhs.s16','vbifcc.s16','vbiflo.s16','vbifmi.s16','vbifpl.s16','vbifvs.s16','vbifvc.s16','vbifhi.s16','vbifls.s16','vbifge.s16','vbiflt.s16','vbifgt.s16','vbifle.s16', + 'vbifeq.s32','vbifne.s32','vbifcs.s32','vbifhs.s32','vbifcc.s32','vbiflo.s32','vbifmi.s32','vbifpl.s32','vbifvs.s32','vbifvc.s32','vbifhi.s32','vbifls.s32','vbifge.s32','vbiflt.s32','vbifgt.s32','vbifle.s32', + 'vbifeq.s64','vbifne.s64','vbifcs.s64','vbifhs.s64','vbifcc.s64','vbiflo.s64','vbifmi.s64','vbifpl.s64','vbifvs.s64','vbifvc.s64','vbifhi.s64','vbifls.s64','vbifge.s64','vbiflt.s64','vbifgt.s64','vbifle.s64', + 'vbifeq.u8','vbifne.u8','vbifcs.u8','vbifhs.u8','vbifcc.u8','vbiflo.u8','vbifmi.u8','vbifpl.u8','vbifvs.u8','vbifvc.u8','vbifhi.u8','vbifls.u8','vbifge.u8','vbiflt.u8','vbifgt.u8','vbifle.u8', + 'vbifeq.u16','vbifne.u16','vbifcs.u16','vbifhs.u16','vbifcc.u16','vbiflo.u16','vbifmi.u16','vbifpl.u16','vbifvs.u16','vbifvc.u16','vbifhi.u16','vbifls.u16','vbifge.u16','vbiflt.u16','vbifgt.u16','vbifle.u16', + 'vbifeq.u32','vbifne.u32','vbifcs.u32','vbifhs.u32','vbifcc.u32','vbiflo.u32','vbifmi.u32','vbifpl.u32','vbifvs.u32','vbifvc.u32','vbifhi.u32','vbifls.u32','vbifge.u32','vbiflt.u32','vbifgt.u32','vbifle.u32', + 'vbifeq.u64','vbifne.u64','vbifcs.u64','vbifhs.u64','vbifcc.u64','vbiflo.u64','vbifmi.u64','vbifpl.u64','vbifvs.u64','vbifvc.u64','vbifhi.u64','vbifls.u64','vbifge.u64','vbiflt.u64','vbifgt.u64','vbifle.u64', + 'vbifeq.f32','vbifne.f32','vbifcs.f32','vbifhs.f32','vbifcc.f32','vbiflo.f32','vbifmi.f32','vbifpl.f32','vbifvs.f32','vbifvc.f32','vbifhi.f32','vbifls.f32','vbifge.f32','vbiflt.f32','vbifgt.f32','vbifle.f32', + 'vbifeq.f64','vbifne.f64','vbifcs.f64','vbifhs.f64','vbifcc.f64','vbiflo.f64','vbifmi.f64','vbifpl.f64','vbifvs.f64','vbifvc.f64','vbifhi.f64','vbifls.f64','vbifge.f64','vbiflt.f64','vbifgt.f64','vbifle.f64', + + 'vbiteq','vbitne','vbitcs','vbiths','vbitcc','vbitlo','vbitmi','vbitpl','vbitvs','vbitvc','vbithi','vbitls','vbitge','vbitlt','vbitgt','vbitle', + 'vbiteq.i8','vbitne.i8','vbitcs.i8','vbiths.i8','vbitcc.i8','vbitlo.i8','vbitmi.i8','vbitpl.i8','vbitvs.i8','vbitvc.i8','vbithi.i8','vbitls.i8','vbitge.i8','vbitlt.i8','vbitgt.i8','vbitle.i8', + 'vbiteq.i16','vbitne.i16','vbitcs.i16','vbiths.i16','vbitcc.i16','vbitlo.i16','vbitmi.i16','vbitpl.i16','vbitvs.i16','vbitvc.i16','vbithi.i16','vbitls.i16','vbitge.i16','vbitlt.i16','vbitgt.i16','vbitle.i16', + 'vbiteq.i32','vbitne.i32','vbitcs.i32','vbiths.i32','vbitcc.i32','vbitlo.i32','vbitmi.i32','vbitpl.i32','vbitvs.i32','vbitvc.i32','vbithi.i32','vbitls.i32','vbitge.i32','vbitlt.i32','vbitgt.i32','vbitle.i32', + 'vbiteq.i64','vbitne.i64','vbitcs.i64','vbiths.i64','vbitcc.i64','vbitlo.i64','vbitmi.i64','vbitpl.i64','vbitvs.i64','vbitvc.i64','vbithi.i64','vbitls.i64','vbitge.i64','vbitlt.i64','vbitgt.i64','vbitle.i64', + 'vbiteq.s8','vbitne.s8','vbitcs.s8','vbiths.s8','vbitcc.s8','vbitlo.s8','vbitmi.s8','vbitpl.s8','vbitvs.s8','vbitvc.s8','vbithi.s8','vbitls.s8','vbitge.s8','vbitlt.s8','vbitgt.s8','vbitle.s8', + 'vbiteq.s16','vbitne.s16','vbitcs.s16','vbiths.s16','vbitcc.s16','vbitlo.s16','vbitmi.s16','vbitpl.s16','vbitvs.s16','vbitvc.s16','vbithi.s16','vbitls.s16','vbitge.s16','vbitlt.s16','vbitgt.s16','vbitle.s16', + 'vbiteq.s32','vbitne.s32','vbitcs.s32','vbiths.s32','vbitcc.s32','vbitlo.s32','vbitmi.s32','vbitpl.s32','vbitvs.s32','vbitvc.s32','vbithi.s32','vbitls.s32','vbitge.s32','vbitlt.s32','vbitgt.s32','vbitle.s32', + 'vbiteq.s64','vbitne.s64','vbitcs.s64','vbiths.s64','vbitcc.s64','vbitlo.s64','vbitmi.s64','vbitpl.s64','vbitvs.s64','vbitvc.s64','vbithi.s64','vbitls.s64','vbitge.s64','vbitlt.s64','vbitgt.s64','vbitle.s64', + 'vbiteq.u8','vbitne.u8','vbitcs.u8','vbiths.u8','vbitcc.u8','vbitlo.u8','vbitmi.u8','vbitpl.u8','vbitvs.u8','vbitvc.u8','vbithi.u8','vbitls.u8','vbitge.u8','vbitlt.u8','vbitgt.u8','vbitle.u8', + 'vbiteq.u16','vbitne.u16','vbitcs.u16','vbiths.u16','vbitcc.u16','vbitlo.u16','vbitmi.u16','vbitpl.u16','vbitvs.u16','vbitvc.u16','vbithi.u16','vbitls.u16','vbitge.u16','vbitlt.u16','vbitgt.u16','vbitle.u16', + 'vbiteq.u32','vbitne.u32','vbitcs.u32','vbiths.u32','vbitcc.u32','vbitlo.u32','vbitmi.u32','vbitpl.u32','vbitvs.u32','vbitvc.u32','vbithi.u32','vbitls.u32','vbitge.u32','vbitlt.u32','vbitgt.u32','vbitle.u32', + 'vbiteq.u64','vbitne.u64','vbitcs.u64','vbiths.u64','vbitcc.u64','vbitlo.u64','vbitmi.u64','vbitpl.u64','vbitvs.u64','vbitvc.u64','vbithi.u64','vbitls.u64','vbitge.u64','vbitlt.u64','vbitgt.u64','vbitle.u64', + 'vbiteq.f32','vbitne.f32','vbitcs.f32','vbiths.f32','vbitcc.f32','vbitlo.f32','vbitmi.f32','vbitpl.f32','vbitvs.f32','vbitvc.f32','vbithi.f32','vbitls.f32','vbitge.f32','vbitlt.f32','vbitgt.f32','vbitle.f32', + 'vbiteq.f64','vbitne.f64','vbitcs.f64','vbiths.f64','vbitcc.f64','vbitlo.f64','vbitmi.f64','vbitpl.f64','vbitvs.f64','vbitvc.f64','vbithi.f64','vbitls.f64','vbitge.f64','vbitlt.f64','vbitgt.f64','vbitle.f64', + + 'vbsleq','vbslne','vbslcs','vbslhs','vbslcc','vbsllo','vbslmi','vbslpl','vbslvs','vbslvc','vbslhi','vbslls','vbslge','vbsllt','vbslgt','vbslle', + 'vbsleq.i8','vbslne.i8','vbslcs.i8','vbslhs.i8','vbslcc.i8','vbsllo.i8','vbslmi.i8','vbslpl.i8','vbslvs.i8','vbslvc.i8','vbslhi.i8','vbslls.i8','vbslge.i8','vbsllt.i8','vbslgt.i8','vbslle.i8', + 'vbsleq.i16','vbslne.i16','vbslcs.i16','vbslhs.i16','vbslcc.i16','vbsllo.i16','vbslmi.i16','vbslpl.i16','vbslvs.i16','vbslvc.i16','vbslhi.i16','vbslls.i16','vbslge.i16','vbsllt.i16','vbslgt.i16','vbslle.i16', + 'vbsleq.i32','vbslne.i32','vbslcs.i32','vbslhs.i32','vbslcc.i32','vbsllo.i32','vbslmi.i32','vbslpl.i32','vbslvs.i32','vbslvc.i32','vbslhi.i32','vbslls.i32','vbslge.i32','vbsllt.i32','vbslgt.i32','vbslle.i32', + 'vbsleq.i64','vbslne.i64','vbslcs.i64','vbslhs.i64','vbslcc.i64','vbsllo.i64','vbslmi.i64','vbslpl.i64','vbslvs.i64','vbslvc.i64','vbslhi.i64','vbslls.i64','vbslge.i64','vbsllt.i64','vbslgt.i64','vbslle.i64', + 'vbsleq.s8','vbslne.s8','vbslcs.s8','vbslhs.s8','vbslcc.s8','vbsllo.s8','vbslmi.s8','vbslpl.s8','vbslvs.s8','vbslvc.s8','vbslhi.s8','vbslls.s8','vbslge.s8','vbsllt.s8','vbslgt.s8','vbslle.s8', + 'vbsleq.s16','vbslne.s16','vbslcs.s16','vbslhs.s16','vbslcc.s16','vbsllo.s16','vbslmi.s16','vbslpl.s16','vbslvs.s16','vbslvc.s16','vbslhi.s16','vbslls.s16','vbslge.s16','vbsllt.s16','vbslgt.s16','vbslle.s16', + 'vbsleq.s32','vbslne.s32','vbslcs.s32','vbslhs.s32','vbslcc.s32','vbsllo.s32','vbslmi.s32','vbslpl.s32','vbslvs.s32','vbslvc.s32','vbslhi.s32','vbslls.s32','vbslge.s32','vbsllt.s32','vbslgt.s32','vbslle.s32', + 'vbsleq.s64','vbslne.s64','vbslcs.s64','vbslhs.s64','vbslcc.s64','vbsllo.s64','vbslmi.s64','vbslpl.s64','vbslvs.s64','vbslvc.s64','vbslhi.s64','vbslls.s64','vbslge.s64','vbsllt.s64','vbslgt.s64','vbslle.s64', + 'vbsleq.u8','vbslne.u8','vbslcs.u8','vbslhs.u8','vbslcc.u8','vbsllo.u8','vbslmi.u8','vbslpl.u8','vbslvs.u8','vbslvc.u8','vbslhi.u8','vbslls.u8','vbslge.u8','vbsllt.u8','vbslgt.u8','vbslle.u8', + 'vbsleq.u16','vbslne.u16','vbslcs.u16','vbslhs.u16','vbslcc.u16','vbsllo.u16','vbslmi.u16','vbslpl.u16','vbslvs.u16','vbslvc.u16','vbslhi.u16','vbslls.u16','vbslge.u16','vbsllt.u16','vbslgt.u16','vbslle.u16', + 'vbsleq.u32','vbslne.u32','vbslcs.u32','vbslhs.u32','vbslcc.u32','vbsllo.u32','vbslmi.u32','vbslpl.u32','vbslvs.u32','vbslvc.u32','vbslhi.u32','vbslls.u32','vbslge.u32','vbsllt.u32','vbslgt.u32','vbslle.u32', + 'vbsleq.u64','vbslne.u64','vbslcs.u64','vbslhs.u64','vbslcc.u64','vbsllo.u64','vbslmi.u64','vbslpl.u64','vbslvs.u64','vbslvc.u64','vbslhi.u64','vbslls.u64','vbslge.u64','vbsllt.u64','vbslgt.u64','vbslle.u64', + 'vbsleq.f32','vbslne.f32','vbslcs.f32','vbslhs.f32','vbslcc.f32','vbsllo.f32','vbslmi.f32','vbslpl.f32','vbslvs.f32','vbslvc.f32','vbslhi.f32','vbslls.f32','vbslge.f32','vbsllt.f32','vbslgt.f32','vbslle.f32', + 'vbsleq.f64','vbslne.f64','vbslcs.f64','vbslhs.f64','vbslcc.f64','vbsllo.f64','vbslmi.f64','vbslpl.f64','vbslvs.f64','vbslvc.f64','vbslhi.f64','vbslls.f64','vbslge.f64','vbsllt.f64','vbslgt.f64','vbslle.f64', + + 'veoreq','veorne','veorcs','veorhs','veorcc','veorlo','veormi','veorpl','veorvs','veorvc','veorhi','veorls','veorge','veorlt','veorgt','veorle', + 'veoreq.i8','veorne.i8','veorcs.i8','veorhs.i8','veorcc.i8','veorlo.i8','veormi.i8','veorpl.i8','veorvs.i8','veorvc.i8','veorhi.i8','veorls.i8','veorge.i8','veorlt.i8','veorgt.i8','veorle.i8', + 'veoreq.i16','veorne.i16','veorcs.i16','veorhs.i16','veorcc.i16','veorlo.i16','veormi.i16','veorpl.i16','veorvs.i16','veorvc.i16','veorhi.i16','veorls.i16','veorge.i16','veorlt.i16','veorgt.i16','veorle.i16', + 'veoreq.i32','veorne.i32','veorcs.i32','veorhs.i32','veorcc.i32','veorlo.i32','veormi.i32','veorpl.i32','veorvs.i32','veorvc.i32','veorhi.i32','veorls.i32','veorge.i32','veorlt.i32','veorgt.i32','veorle.i32', + 'veoreq.i64','veorne.i64','veorcs.i64','veorhs.i64','veorcc.i64','veorlo.i64','veormi.i64','veorpl.i64','veorvs.i64','veorvc.i64','veorhi.i64','veorls.i64','veorge.i64','veorlt.i64','veorgt.i64','veorle.i64', + 'veoreq.s8','veorne.s8','veorcs.s8','veorhs.s8','veorcc.s8','veorlo.s8','veormi.s8','veorpl.s8','veorvs.s8','veorvc.s8','veorhi.s8','veorls.s8','veorge.s8','veorlt.s8','veorgt.s8','veorle.s8', + 'veoreq.s16','veorne.s16','veorcs.s16','veorhs.s16','veorcc.s16','veorlo.s16','veormi.s16','veorpl.s16','veorvs.s16','veorvc.s16','veorhi.s16','veorls.s16','veorge.s16','veorlt.s16','veorgt.s16','veorle.s16', + 'veoreq.s32','veorne.s32','veorcs.s32','veorhs.s32','veorcc.s32','veorlo.s32','veormi.s32','veorpl.s32','veorvs.s32','veorvc.s32','veorhi.s32','veorls.s32','veorge.s32','veorlt.s32','veorgt.s32','veorle.s32', + 'veoreq.s64','veorne.s64','veorcs.s64','veorhs.s64','veorcc.s64','veorlo.s64','veormi.s64','veorpl.s64','veorvs.s64','veorvc.s64','veorhi.s64','veorls.s64','veorge.s64','veorlt.s64','veorgt.s64','veorle.s64', + 'veoreq.u8','veorne.u8','veorcs.u8','veorhs.u8','veorcc.u8','veorlo.u8','veormi.u8','veorpl.u8','veorvs.u8','veorvc.u8','veorhi.u8','veorls.u8','veorge.u8','veorlt.u8','veorgt.u8','veorle.u8', + 'veoreq.u16','veorne.u16','veorcs.u16','veorhs.u16','veorcc.u16','veorlo.u16','veormi.u16','veorpl.u16','veorvs.u16','veorvc.u16','veorhi.u16','veorls.u16','veorge.u16','veorlt.u16','veorgt.u16','veorle.u16', + 'veoreq.u32','veorne.u32','veorcs.u32','veorhs.u32','veorcc.u32','veorlo.u32','veormi.u32','veorpl.u32','veorvs.u32','veorvc.u32','veorhi.u32','veorls.u32','veorge.u32','veorlt.u32','veorgt.u32','veorle.u32', + 'veoreq.u64','veorne.u64','veorcs.u64','veorhs.u64','veorcc.u64','veorlo.u64','veormi.u64','veorpl.u64','veorvs.u64','veorvc.u64','veorhi.u64','veorls.u64','veorge.u64','veorlt.u64','veorgt.u64','veorle.u64', + 'veoreq.f32','veorne.f32','veorcs.f32','veorhs.f32','veorcc.f32','veorlo.f32','veormi.f32','veorpl.f32','veorvs.f32','veorvc.f32','veorhi.f32','veorls.f32','veorge.f32','veorlt.f32','veorgt.f32','veorle.f32', + 'veoreq.f64','veorne.f64','veorcs.f64','veorhs.f64','veorcc.f64','veorlo.f64','veormi.f64','veorpl.f64','veorvs.f64','veorvc.f64','veorhi.f64','veorls.f64','veorge.f64','veorlt.f64','veorgt.f64','veorle.f64', + + 'vmoveq','vmovne','vmovcs','vmovhs','vmovcc','vmovlo','vmovmi','vmovpl','vmovvs','vmovvc','vmovhi','vmovls','vmovge','vmovlt','vmovgt','vmovle', + 'vmoveq.8','vmovne.8','vmovcs.8','vmovhs.8','vmovcc.8','vmovlo.8','vmovmi.8','vmovpl.8','vmovvs.8','vmovvc.8','vmovhi.8','vmovls.8','vmovge.8','vmovlt.8','vmovgt.8','vmovle.8', + 'vmoveq.16','vmovne.16','vmovcs.16','vmovhs.16','vmovcc.16','vmovlo.16','vmovmi.16','vmovpl.16','vmovvs.16','vmovvc.16','vmovhi.16','vmovls.16','vmovge.16','vmovlt.16','vmovgt.16','vmovle.16', + 'vmoveq.32','vmovne.32','vmovcs.32','vmovhs.32','vmovcc.32','vmovlo.32','vmovmi.32','vmovpl.32','vmovvs.32','vmovvc.32','vmovhi.32','vmovls.32','vmovge.32','vmovlt.32','vmovgt.32','vmovle.32', + 'vmoveq.i8','vmovne.i8','vmovcs.i8','vmovhs.i8','vmovcc.i8','vmovlo.i8','vmovmi.i8','vmovpl.i8','vmovvs.i8','vmovvc.i8','vmovhi.i8','vmovls.i8','vmovge.i8','vmovlt.i8','vmovgt.i8','vmovle.i8', + 'vmoveq.i16','vmovne.i16','vmovcs.i16','vmovhs.i16','vmovcc.i16','vmovlo.i16','vmovmi.i16','vmovpl.i16','vmovvs.i16','vmovvc.i16','vmovhi.i16','vmovls.i16','vmovge.i16','vmovlt.i16','vmovgt.i16','vmovle.i16', + 'vmoveq.i32','vmovne.i32','vmovcs.i32','vmovhs.i32','vmovcc.i32','vmovlo.i32','vmovmi.i32','vmovpl.i32','vmovvs.i32','vmovvc.i32','vmovhi.i32','vmovls.i32','vmovge.i32','vmovlt.i32','vmovgt.i32','vmovle.i32', + 'vmoveq.i64','vmovne.i64','vmovcs.i64','vmovhs.i64','vmovcc.i64','vmovlo.i64','vmovmi.i64','vmovpl.i64','vmovvs.i64','vmovvc.i64','vmovhi.i64','vmovls.i64','vmovge.i64','vmovlt.i64','vmovgt.i64','vmovle.i64', + 'vmoveq.f32','vmovne.f32','vmovcs.f32','vmovhs.f32','vmovcc.f32','vmovlo.f32','vmovmi.f32','vmovpl.f32','vmovvs.f32','vmovvc.f32','vmovhi.f32','vmovls.f32','vmovge.f32','vmovlt.f32','vmovgt.f32','vmovle.f32', + 'vmoveq.f64','vmovne.f64','vmovcs.f64','vmovhs.f64','vmovcc.f64','vmovlo.f64','vmovmi.f64','vmovpl.f64','vmovvs.f64','vmovvc.f64','vmovhi.f64','vmovls.f64','vmovge.f64','vmovlt.f64','vmovgt.f64','vmovle.f64', + + 'vmvneq','vmvnne','vmvncs','vmvnhs','vmvncc','vmvnlo','vmvnmi','vmvnpl','vmvnvs','vmvnvc','vmvnhi','vmvnls','vmvnge','vmvnlt','vmvngt','vmvnle', + 'vmvneq.s8','vmvnne.s8','vmvncs.s8','vmvnhs.s8','vmvncc.s8','vmvnlo.s8','vmvnmi.s8','vmvnpl.s8','vmvnvs.s8','vmvnvc.s8','vmvnhi.s8','vmvnls.s8','vmvnge.s8','vmvnlt.s8','vmvngt.s8','vmvnle.s8', + 'vmvneq.s16','vmvnne.s16','vmvncs.s16','vmvnhs.s16','vmvncc.s16','vmvnlo.s16','vmvnmi.s16','vmvnpl.s16','vmvnvs.s16','vmvnvc.s16','vmvnhi.s16','vmvnls.s16','vmvnge.s16','vmvnlt.s16','vmvngt.s16','vmvnle.s16', + 'vmvneq.s32','vmvnne.s32','vmvncs.s32','vmvnhs.s32','vmvncc.s32','vmvnlo.s32','vmvnmi.s32','vmvnpl.s32','vmvnvs.s32','vmvnvc.s32','vmvnhi.s32','vmvnls.s32','vmvnge.s32','vmvnlt.s32','vmvngt.s32','vmvnle.s32', + 'vmvneq.s64','vmvnne.s64','vmvncs.s64','vmvnhs.s64','vmvncc.s64','vmvnlo.s64','vmvnmi.s64','vmvnpl.s64','vmvnvs.s64','vmvnvc.s64','vmvnhi.s64','vmvnls.s64','vmvnge.s64','vmvnlt.s64','vmvngt.s64','vmvnle.s64', + 'vmvneq.u8','vmvnne.u8','vmvncs.u8','vmvnhs.u8','vmvncc.u8','vmvnlo.u8','vmvnmi.u8','vmvnpl.u8','vmvnvs.u8','vmvnvc.u8','vmvnhi.u8','vmvnls.u8','vmvnge.u8','vmvnlt.u8','vmvngt.u8','vmvnle.u8', + 'vmvneq.u16','vmvnne.u16','vmvncs.u16','vmvnhs.u16','vmvncc.u16','vmvnlo.u16','vmvnmi.u16','vmvnpl.u16','vmvnvs.u16','vmvnvc.u16','vmvnhi.u16','vmvnls.u16','vmvnge.u16','vmvnlt.u16','vmvngt.u16','vmvnle.u16', + 'vmvneq.u32','vmvnne.u32','vmvncs.u32','vmvnhs.u32','vmvncc.u32','vmvnlo.u32','vmvnmi.u32','vmvnpl.u32','vmvnvs.u32','vmvnvc.u32','vmvnhi.u32','vmvnls.u32','vmvnge.u32','vmvnlt.u32','vmvngt.u32','vmvnle.u32', + 'vmvneq.u64','vmvnne.u64','vmvncs.u64','vmvnhs.u64','vmvncc.u64','vmvnlo.u64','vmvnmi.u64','vmvnpl.u64','vmvnvs.u64','vmvnvc.u64','vmvnhi.u64','vmvnls.u64','vmvnge.u64','vmvnlt.u64','vmvngt.u64','vmvnle.u64', + 'vmvneq.i8','vmvnne.i8','vmvncs.i8','vmvnhs.i8','vmvncc.i8','vmvnlo.i8','vmvnmi.i8','vmvnpl.i8','vmvnvs.i8','vmvnvc.i8','vmvnhi.i8','vmvnls.i8','vmvnge.i8','vmvnlt.i8','vmvngt.i8','vmvnle.i8', + 'vmvneq.i16','vmvnne.i16','vmvncs.i16','vmvnhs.i16','vmvncc.i16','vmvnlo.i16','vmvnmi.i16','vmvnpl.i16','vmvnvs.i16','vmvnvc.i16','vmvnhi.i16','vmvnls.i16','vmvnge.i16','vmvnlt.i16','vmvngt.i16','vmvnle.i16', + 'vmvneq.i32','vmvnne.i32','vmvncs.i32','vmvnhs.i32','vmvncc.i32','vmvnlo.i32','vmvnmi.i32','vmvnpl.i32','vmvnvs.i32','vmvnvc.i32','vmvnhi.i32','vmvnls.i32','vmvnge.i32','vmvnlt.i32','vmvngt.i32','vmvnle.i32', + 'vmvneq.i64','vmvnne.i64','vmvncs.i64','vmvnhs.i64','vmvncc.i64','vmvnlo.i64','vmvnmi.i64','vmvnpl.i64','vmvnvs.i64','vmvnvc.i64','vmvnhi.i64','vmvnls.i64','vmvnge.i64','vmvnlt.i64','vmvngt.i64','vmvnle.i64', + 'vmvneq.f32','vmvnne.f32','vmvncs.f32','vmvnhs.f32','vmvncc.f32','vmvnlo.f32','vmvnmi.f32','vmvnpl.f32','vmvnvs.f32','vmvnvc.f32','vmvnhi.f32','vmvnls.f32','vmvnge.f32','vmvnlt.f32','vmvngt.f32','vmvnle.f32', + 'vmvneq.f64','vmvnne.f64','vmvncs.f64','vmvnhs.f64','vmvncc.f64','vmvnlo.f64','vmvnmi.f64','vmvnpl.f64','vmvnvs.f64','vmvnvc.f64','vmvnhi.f64','vmvnls.f64','vmvnge.f64','vmvnlt.f64','vmvngt.f64','vmvnle.f64', + + 'vorneq','vornne','vorncs','vornhs','vorncc','vornlo','vornmi','vornpl','vornvs','vornvc','vornhi','vornls','vornge','vornlt','vorngt','vornle', + 'vorneq.s8','vornne.s8','vorncs.s8','vornhs.s8','vorncc.s8','vornlo.s8','vornmi.s8','vornpl.s8','vornvs.s8','vornvc.s8','vornhi.s8','vornls.s8','vornge.s8','vornlt.s8','vorngt.s8','vornle.s8', + 'vorneq.s16','vornne.s16','vorncs.s16','vornhs.s16','vorncc.s16','vornlo.s16','vornmi.s16','vornpl.s16','vornvs.s16','vornvc.s16','vornhi.s16','vornls.s16','vornge.s16','vornlt.s16','vorngt.s16','vornle.s16', + 'vorneq.s32','vornne.s32','vorncs.s32','vornhs.s32','vorncc.s32','vornlo.s32','vornmi.s32','vornpl.s32','vornvs.s32','vornvc.s32','vornhi.s32','vornls.s32','vornge.s32','vornlt.s32','vorngt.s32','vornle.s32', + 'vorneq.s64','vornne.s64','vorncs.s64','vornhs.s64','vorncc.s64','vornlo.s64','vornmi.s64','vornpl.s64','vornvs.s64','vornvc.s64','vornhi.s64','vornls.s64','vornge.s64','vornlt.s64','vorngt.s64','vornle.s64', + 'vorneq.u8','vornne.u8','vorncs.u8','vornhs.u8','vorncc.u8','vornlo.u8','vornmi.u8','vornpl.u8','vornvs.u8','vornvc.u8','vornhi.u8','vornls.u8','vornge.u8','vornlt.u8','vorngt.u8','vornle.u8', + 'vorneq.u16','vornne.u16','vorncs.u16','vornhs.u16','vorncc.u16','vornlo.u16','vornmi.u16','vornpl.u16','vornvs.u16','vornvc.u16','vornhi.u16','vornls.u16','vornge.u16','vornlt.u16','vorngt.u16','vornle.u16', + 'vorneq.u32','vornne.u32','vorncs.u32','vornhs.u32','vorncc.u32','vornlo.u32','vornmi.u32','vornpl.u32','vornvs.u32','vornvc.u32','vornhi.u32','vornls.u32','vornge.u32','vornlt.u32','vorngt.u32','vornle.u32', + 'vorneq.u64','vornne.u64','vorncs.u64','vornhs.u64','vorncc.u64','vornlo.u64','vornmi.u64','vornpl.u64','vornvs.u64','vornvc.u64','vornhi.u64','vornls.u64','vornge.u64','vornlt.u64','vorngt.u64','vornle.u64', + 'vorneq.i8','vornne.i8','vorncs.i8','vornhs.i8','vorncc.i8','vornlo.i8','vornmi.i8','vornpl.i8','vornvs.i8','vornvc.i8','vornhi.i8','vornls.i8','vornge.i8','vornlt.i8','vorngt.i8','vornle.i8', + 'vorneq.i16','vornne.i16','vorncs.i16','vornhs.i16','vorncc.i16','vornlo.i16','vornmi.i16','vornpl.i16','vornvs.i16','vornvc.i16','vornhi.i16','vornls.i16','vornge.i16','vornlt.i16','vorngt.i16','vornle.i16', + 'vorneq.i32','vornne.i32','vorncs.i32','vornhs.i32','vorncc.i32','vornlo.i32','vornmi.i32','vornpl.i32','vornvs.i32','vornvc.i32','vornhi.i32','vornls.i32','vornge.i32','vornlt.i32','vorngt.i32','vornle.i32', + 'vorneq.i64','vornne.i64','vorncs.i64','vornhs.i64','vorncc.i64','vornlo.i64','vornmi.i64','vornpl.i64','vornvs.i64','vornvc.i64','vornhi.i64','vornls.i64','vornge.i64','vornlt.i64','vorngt.i64','vornle.i64', + 'vorneq.f32','vornne.f32','vorncs.f32','vornhs.f32','vorncc.f32','vornlo.f32','vornmi.f32','vornpl.f32','vornvs.f32','vornvc.f32','vornhi.f32','vornls.f32','vornge.f32','vornlt.f32','vorngt.f32','vornle.f32', + 'vorneq.f64','vornne.f64','vorncs.f64','vornhs.f64','vorncc.f64','vornlo.f64','vornmi.f64','vornpl.f64','vornvs.f64','vornvc.f64','vornhi.f64','vornls.f64','vornge.f64','vornlt.f64','vorngt.f64','vornle.f64', + + 'vorreq','vorrne','vorrcs','vorrhs','vorrcc','vorrlo','vorrmi','vorrpl','vorrvs','vorrvc','vorrhi','vorrls','vorrge','vorrlt','vorrgt','vorrle', + 'vorreq.s8','vorrne.s8','vorrcs.s8','vorrhs.s8','vorrcc.s8','vorrlo.s8','vorrmi.s8','vorrpl.s8','vorrvs.s8','vorrvc.s8','vorrhi.s8','vorrls.s8','vorrge.s8','vorrlt.s8','vorrgt.s8','vorrle.s8', + 'vorreq.s16','vorrne.s16','vorrcs.s16','vorrhs.s16','vorrcc.s16','vorrlo.s16','vorrmi.s16','vorrpl.s16','vorrvs.s16','vorrvc.s16','vorrhi.s16','vorrls.s16','vorrge.s16','vorrlt.s16','vorrgt.s16','vorrle.s16', + 'vorreq.s32','vorrne.s32','vorrcs.s32','vorrhs.s32','vorrcc.s32','vorrlo.s32','vorrmi.s32','vorrpl.s32','vorrvs.s32','vorrvc.s32','vorrhi.s32','vorrls.s32','vorrge.s32','vorrlt.s32','vorrgt.s32','vorrle.s32', + 'vorreq.s64','vorrne.s64','vorrcs.s64','vorrhs.s64','vorrcc.s64','vorrlo.s64','vorrmi.s64','vorrpl.s64','vorrvs.s64','vorrvc.s64','vorrhi.s64','vorrls.s64','vorrge.s64','vorrlt.s64','vorrgt.s64','vorrle.s64', + 'vorreq.u8','vorrne.u8','vorrcs.u8','vorrhs.u8','vorrcc.u8','vorrlo.u8','vorrmi.u8','vorrpl.u8','vorrvs.u8','vorrvc.u8','vorrhi.u8','vorrls.u8','vorrge.u8','vorrlt.u8','vorrgt.u8','vorrle.u8', + 'vorreq.u16','vorrne.u16','vorrcs.u16','vorrhs.u16','vorrcc.u16','vorrlo.u16','vorrmi.u16','vorrpl.u16','vorrvs.u16','vorrvc.u16','vorrhi.u16','vorrls.u16','vorrge.u16','vorrlt.u16','vorrgt.u16','vorrle.u16', + 'vorreq.u32','vorrne.u32','vorrcs.u32','vorrhs.u32','vorrcc.u32','vorrlo.u32','vorrmi.u32','vorrpl.u32','vorrvs.u32','vorrvc.u32','vorrhi.u32','vorrls.u32','vorrge.u32','vorrlt.u32','vorrgt.u32','vorrle.u32', + 'vorreq.u64','vorrne.u64','vorrcs.u64','vorrhs.u64','vorrcc.u64','vorrlo.u64','vorrmi.u64','vorrpl.u64','vorrvs.u64','vorrvc.u64','vorrhi.u64','vorrls.u64','vorrge.u64','vorrlt.u64','vorrgt.u64','vorrle.u64', + 'vorreq.i8','vorrne.i8','vorrcs.i8','vorrhs.i8','vorrcc.i8','vorrlo.i8','vorrmi.i8','vorrpl.i8','vorrvs.i8','vorrvc.i8','vorrhi.i8','vorrls.i8','vorrge.i8','vorrlt.i8','vorrgt.i8','vorrle.i8', + 'vorreq.i16','vorrne.i16','vorrcs.i16','vorrhs.i16','vorrcc.i16','vorrlo.i16','vorrmi.i16','vorrpl.i16','vorrvs.i16','vorrvc.i16','vorrhi.i16','vorrls.i16','vorrge.i16','vorrlt.i16','vorrgt.i16','vorrle.i16', + 'vorreq.i32','vorrne.i32','vorrcs.i32','vorrhs.i32','vorrcc.i32','vorrlo.i32','vorrmi.i32','vorrpl.i32','vorrvs.i32','vorrvc.i32','vorrhi.i32','vorrls.i32','vorrge.i32','vorrlt.i32','vorrgt.i32','vorrle.i32', + 'vorreq.i64','vorrne.i64','vorrcs.i64','vorrhs.i64','vorrcc.i64','vorrlo.i64','vorrmi.i64','vorrpl.i64','vorrvs.i64','vorrvc.i64','vorrhi.i64','vorrls.i64','vorrge.i64','vorrlt.i64','vorrgt.i64','vorrle.i64', + 'vorreq.f32','vorrne.f32','vorrcs.f32','vorrhs.f32','vorrcc.f32','vorrlo.f32','vorrmi.f32','vorrpl.f32','vorrvs.f32','vorrvc.f32','vorrhi.f32','vorrls.f32','vorrge.f32','vorrlt.f32','vorrgt.f32','vorrle.f32', + 'vorreq.f64','vorrne.f64','vorrcs.f64','vorrhs.f64','vorrcc.f64','vorrlo.f64','vorrmi.f64','vorrpl.f64','vorrvs.f64','vorrvc.f64','vorrhi.f64','vorrls.f64','vorrge.f64','vorrlt.f64','vorrgt.f64','vorrle.f64', + + 'vswpeq','vswpne','vswpcs','vswphs','vswpcc','vswplo','vswpmi','vswppl','vswpvs','vswpvc','vswphi','vswpls','vswpge','vswplt','vswpgt','vswple', + 'vswpeq.s8','vswpne.s8','vswpcs.s8','vswphs.s8','vswpcc.s8','vswplo.s8','vswpmi.s8','vswppl.s8','vswpvs.s8','vswpvc.s8','vswphi.s8','vswpls.s8','vswpge.s8','vswplt.s8','vswpgt.s8','vswple.s8', + 'vswpeq.s16','vswpne.s16','vswpcs.s16','vswphs.s16','vswpcc.s16','vswplo.s16','vswpmi.s16','vswppl.s16','vswpvs.s16','vswpvc.s16','vswphi.s16','vswpls.s16','vswpge.s16','vswplt.s16','vswpgt.s16','vswple.s16', + 'vswpeq.s32','vswpne.s32','vswpcs.s32','vswphs.s32','vswpcc.s32','vswplo.s32','vswpmi.s32','vswppl.s32','vswpvs.s32','vswpvc.s32','vswphi.s32','vswpls.s32','vswpge.s32','vswplt.s32','vswpgt.s32','vswple.s32', + 'vswpeq.s64','vswpne.s64','vswpcs.s64','vswphs.s64','vswpcc.s64','vswplo.s64','vswpmi.s64','vswppl.s64','vswpvs.s64','vswpvc.s64','vswphi.s64','vswpls.s64','vswpge.s64','vswplt.s64','vswpgt.s64','vswple.s64', + 'vswpeq.u8','vswpne.u8','vswpcs.u8','vswphs.u8','vswpcc.u8','vswplo.u8','vswpmi.u8','vswppl.u8','vswpvs.u8','vswpvc.u8','vswphi.u8','vswpls.u8','vswpge.u8','vswplt.u8','vswpgt.u8','vswple.u8', + 'vswpeq.u16','vswpne.u16','vswpcs.u16','vswphs.u16','vswpcc.u16','vswplo.u16','vswpmi.u16','vswppl.u16','vswpvs.u16','vswpvc.u16','vswphi.u16','vswpls.u16','vswpge.u16','vswplt.u16','vswpgt.u16','vswple.u16', + 'vswpeq.u32','vswpne.u32','vswpcs.u32','vswphs.u32','vswpcc.u32','vswplo.u32','vswpmi.u32','vswppl.u32','vswpvs.u32','vswpvc.u32','vswphi.u32','vswpls.u32','vswpge.u32','vswplt.u32','vswpgt.u32','vswple.u32', + 'vswpeq.u64','vswpne.u64','vswpcs.u64','vswphs.u64','vswpcc.u64','vswplo.u64','vswpmi.u64','vswppl.u64','vswpvs.u64','vswpvc.u64','vswphi.u64','vswpls.u64','vswpge.u64','vswplt.u64','vswpgt.u64','vswple.u64', + 'vswpeq.i8','vswpne.i8','vswpcs.i8','vswphs.i8','vswpcc.i8','vswplo.i8','vswpmi.i8','vswppl.i8','vswpvs.i8','vswpvc.i8','vswphi.i8','vswpls.i8','vswpge.i8','vswplt.i8','vswpgt.i8','vswple.i8', + 'vswpeq.i16','vswpne.i16','vswpcs.i16','vswphs.i16','vswpcc.i16','vswplo.i16','vswpmi.i16','vswppl.i16','vswpvs.i16','vswpvc.i16','vswphi.i16','vswpls.i16','vswpge.i16','vswplt.i16','vswpgt.i16','vswple.i16', + 'vswpeq.i32','vswpne.i32','vswpcs.i32','vswphs.i32','vswpcc.i32','vswplo.i32','vswpmi.i32','vswppl.i32','vswpvs.i32','vswpvc.i32','vswphi.i32','vswpls.i32','vswpge.i32','vswplt.i32','vswpgt.i32','vswple.i32', + 'vswpeq.i64','vswpne.i64','vswpcs.i64','vswphs.i64','vswpcc.i64','vswplo.i64','vswpmi.i64','vswppl.i64','vswpvs.i64','vswpvc.i64','vswphi.i64','vswpls.i64','vswpge.i64','vswplt.i64','vswpgt.i64','vswple.i64', + 'vswpeq.f32','vswpne.f32','vswpcs.f32','vswphs.f32','vswpcc.f32','vswplo.f32','vswpmi.f32','vswppl.f32','vswpvs.f32','vswpvc.f32','vswphi.f32','vswpls.f32','vswpge.f32','vswplt.f32','vswpgt.f32','vswple.f32', + 'vswpeq.f64','vswpne.f64','vswpcs.f64','vswphs.f64','vswpcc.f64','vswplo.f64','vswpmi.f64','vswppl.f64','vswpvs.f64','vswpvc.f64','vswphi.f64','vswpls.f64','vswpge.f64','vswplt.f64','vswpgt.f64','vswple.f64' + ), + /* Conditional NEON SIMD ARM Registers Interop Instructions */ + 29 => array( + 'vmrseq','vmrsne','vmrscs','vmrshs','vmrscc','vmrslo','vmrsmi','vmrspl','vmrsvs','vmrsvc','vmrshi','vmrsls','vmrsge','vmrslt','vmrsgt','vmrsle', + 'vmsreq','vmsrne','vmsrcs','vmsrhs','vmsrcc','vmsrlo','vmsrmi','vmsrpl','vmsrvs','vmsrvc','vmsrhi','vmsrls','vmsrge','vmsrlt','vmsrgt','vmsrle' + ), + /* Conditional NEON SIMD Bit/Byte-Level Instructions */ + 30 => array( + 'vcnteq.8','vcntne.8','vcntcs.8','vcnths.8','vcntcc.8','vcntlo.8','vcntmi.8','vcntpl.8','vcntvs.8','vcntvc.8','vcnthi.8','vcntls.8','vcntge.8','vcntlt.8','vcntgt.8','vcntle.8', + 'vdupeq.8','vdupne.8','vdupcs.8','vduphs.8','vdupcc.8','vduplo.8','vdupmi.8','vduppl.8','vdupvs.8','vdupvc.8','vduphi.8','vdupls.8','vdupge.8','vduplt.8','vdupgt.8','vduple.8', + + 'vdupeq.16','vdupne.16','vdupcs.16','vduphs.16','vdupcc.16','vduplo.16','vdupmi.16','vduppl.16','vdupvs.16','vdupvc.16','vduphi.16','vdupls.16','vdupge.16','vduplt.16','vdupgt.16','vduple.16', + 'vdupeq.32','vdupne.32','vdupcs.32','vduphs.32','vdupcc.32','vduplo.32','vdupmi.32','vduppl.32','vdupvs.32','vdupvc.32','vduphi.32','vdupls.32','vdupge.32','vduplt.32','vdupgt.32','vduple.32', + + 'vexteq.8','vextne.8','vextcs.8','vexths.8','vextcc.8','vextlo.8','vextmi.8','vextpl.8','vextvs.8','vextvc.8','vexthi.8','vextls.8','vextge.8','vextlt.8','vextgt.8','vextle.8', + 'vexteq.16','vextne.16','vextcs.16','vexths.16','vextcc.16','vextlo.16','vextmi.16','vextpl.16','vextvs.16','vextvc.16','vexthi.16','vextls.16','vextge.16','vextlt.16','vextgt.16','vextle.16', + + 'vexteq.32','vextne.32','vextcs.32','vexths.32','vextcc.32','vextlo.32','vextmi.32','vextpl.32','vextvs.32','vextvc.32','vexthi.32','vextls.32','vextge.32','vextlt.32','vextgt.32','vextle.32', + 'vexteq.64','vextne.64','vextcs.64','vexths.64','vextcc.64','vextlo.64','vextmi.64','vextpl.64','vextvs.64','vextvc.64','vexthi.64','vextls.64','vextge.64','vextlt.64','vextgt.64','vextle.64', + + 'vrev16eq.8','vrev16ne.8','vrev16cs.8','vrev16hs.8','vrev16cc.8','vrev16lo.8','vrev16mi.8','vrev16pl.8','vrev16vs.8','vrev16vc.8','vrev16hi.8','vrev16ls.8','vrev16ge.8','vrev16lt.8','vrev16gt.8','vrev16le.8', + 'vrev32eq.8','vrev32ne.8','vrev32cs.8','vrev32hs.8','vrev32cc.8','vrev32lo.8','vrev32mi.8','vrev32pl.8','vrev32vs.8','vrev32vc.8','vrev32hi.8','vrev32ls.8','vrev32ge.8','vrev32lt.8','vrev32gt.8','vrev32le.8', + 'vrev32eq.16','vrev32ne.16','vrev32cs.16','vrev32hs.16','vrev32cc.16','vrev32lo.16','vrev32mi.16','vrev32pl.16','vrev32vs.16','vrev32vc.16','vrev32hi.16','vrev32ls.16','vrev32ge.16','vrev32lt.16','vrev32gt.16','vrev32le.16', + 'vrev64eq.8','vrev64ne.8','vrev64cs.8','vrev64hs.8','vrev64cc.8','vrev64lo.8','vrev64mi.8','vrev64pl.8','vrev64vs.8','vrev64vc.8','vrev64hi.8','vrev64ls.8','vrev64ge.8','vrev64lt.8','vrev64gt.8','vrev64le.8', + 'vrev64eq.16','vrev64ne.16','vrev64cs.16','vrev64hs.16','vrev64cc.16','vrev64lo.16','vrev64mi.16','vrev64pl.16','vrev64vs.16','vrev64vc.16','vrev64hi.16','vrev64ls.16','vrev64ge.16','vrev64lt.16','vrev64gt.16','vrev64le.16', + 'vrev64eq.32','vrev64ne.32','vrev64cs.32','vrev64hs.32','vrev64cc.32','vrev64lo.32','vrev64mi.32','vrev64pl.32','vrev64vs.32','vrev64vc.32','vrev64hi.32','vrev64ls.32','vrev64ge.32','vrev64lt.32','vrev64gt.32','vrev64le.32', + + 'vslieq.8','vsline.8','vslics.8','vslihs.8','vslicc.8','vslilo.8','vslimi.8','vslipl.8','vslivs.8','vslivc.8','vslihi.8','vslils.8','vslige.8','vslilt.8','vsligt.8','vslile.8', + 'vslieq.16','vsline.16','vslics.16','vslihs.16','vslicc.16','vslilo.16','vslimi.16','vslipl.16','vslivs.16','vslivc.16','vslihi.16','vslils.16','vslige.16','vslilt.16','vsligt.16','vslile.16', + 'vslieq.32','vsline.32','vslics.32','vslihs.32','vslicc.32','vslilo.32','vslimi.32','vslipl.32','vslivs.32','vslivc.32','vslihi.32','vslils.32','vslige.32','vslilt.32','vsligt.32','vslile.32', + 'vslieq.64','vsline.64','vslics.64','vslihs.64','vslicc.64','vslilo.64','vslimi.64','vslipl.64','vslivs.64','vslivc.64','vslihi.64','vslils.64','vslige.64','vslilt.64','vsligt.64','vslile.64', + + 'vsrieq.8','vsrine.8','vsrics.8','vsrihs.8','vsricc.8','vsrilo.8','vsrimi.8','vsripl.8','vsrivs.8','vsrivc.8','vsrihi.8','vsrils.8','vsrige.8','vsrilt.8','vsrigt.8','vsrile.8', + 'vsrieq.16','vsrine.16','vsrics.16','vsrihs.16','vsricc.16','vsrilo.16','vsrimi.16','vsripl.16','vsrivs.16','vsrivc.16','vsrihi.16','vsrils.16','vsrige.16','vsrilt.16','vsrigt.16','vsrile.16', + 'vsrieq.32','vsrine.32','vsrics.32','vsrihs.32','vsricc.32','vsrilo.32','vsrimi.32','vsripl.32','vsrivs.32','vsrivc.32','vsrihi.32','vsrils.32','vsrige.32','vsrilt.32','vsrigt.32','vsrile.32', + 'vsrieq.64','vsrine.64','vsrics.64','vsrihs.64','vsricc.64','vsrilo.64','vsrimi.64','vsripl.64','vsrivs.64','vsrivc.64','vsrihi.64','vsrils.64','vsrige.64','vsrilt.64','vsrigt.64','vsrile.64', + + 'vtbleq.8','vtblne.8','vtblcs.8','vtblhs.8','vtblcc.8','vtbllo.8','vtblmi.8','vtblpl.8','vtblvs.8','vtblvc.8','vtblhi.8','vtblls.8','vtblge.8','vtbllt.8','vtblgt.8','vtblle.8', + + 'vtbxeq','vtbxne','vtbxcs','vtbxhs','vtbxcc','vtbxlo','vtbxmi','vtbxpl','vtbxvs','vtbxvc','vtbxhi','vtbxls','vtbxge','vtbxlt','vtbxgt','vtbxle', + + 'vtrneq.8','vtrnne.8','vtrncs.8','vtrnhs.8','vtrncc.8','vtrnlo.8','vtrnmi.8','vtrnpl.8','vtrnvs.8','vtrnvc.8','vtrnhi.8','vtrnls.8','vtrnge.8','vtrnlt.8','vtrngt.8','vtrnle.8', + 'vtrneq.16','vtrnne.16','vtrncs.16','vtrnhs.16','vtrncc.16','vtrnlo.16','vtrnmi.16','vtrnpl.16','vtrnvs.16','vtrnvc.16','vtrnhi.16','vtrnls.16','vtrnge.16','vtrnlt.16','vtrngt.16','vtrnle.16', + 'vtrneq.32','vtrnne.32','vtrncs.32','vtrnhs.32','vtrncc.32','vtrnlo.32','vtrnmi.32','vtrnpl.32','vtrnvs.32','vtrnvc.32','vtrnhi.32','vtrnls.32','vtrnge.32','vtrnlt.32','vtrngt.32','vtrnle.32', + + 'vtsteq.8','vtstne.8','vtstcs.8','vtsths.8','vtstcc.8','vtstlo.8','vtstmi.8','vtstpl.8','vtstvs.8','vtstvc.8','vtsthi.8','vtstls.8','vtstge.8','vtstlt.8','vtstgt.8','vtstle.8', + 'vtsteq.16','vtstne.16','vtstcs.16','vtsths.16','vtstcc.16','vtstlo.16','vtstmi.16','vtstpl.16','vtstvs.16','vtstvc.16','vtsthi.16','vtstls.16','vtstge.16','vtstlt.16','vtstgt.16','vtstle.16', + 'vtsteq.32','vtstne.32','vtstcs.32','vtsths.32','vtstcc.32','vtstlo.32','vtstmi.32','vtstpl.32','vtstvs.32','vtstvc.32','vtsthi.32','vtstls.32','vtstge.32','vtstlt.32','vtstgt.32','vtstle.32', + + 'vuzpeq.8','vuzpne.8','vuzpcs.8','vuzphs.8','vuzpcc.8','vuzplo.8','vuzpmi.8','vuzppl.8','vuzpvs.8','vuzpvc.8','vuzphi.8','vuzpls.8','vuzpge.8','vuzplt.8','vuzpgt.8','vuzple.8', + 'vuzpeq.16','vuzpne.16','vuzpcs.16','vuzphs.16','vuzpcc.16','vuzplo.16','vuzpmi.16','vuzppl.16','vuzpvs.16','vuzpvc.16','vuzphi.16','vuzpls.16','vuzpge.16','vuzplt.16','vuzpgt.16','vuzple.16', + 'vuzpeq.32','vuzpne.32','vuzpcs.32','vuzphs.32','vuzpcc.32','vuzplo.32','vuzpmi.32','vuzppl.32','vuzpvs.32','vuzpvc.32','vuzphi.32','vuzpls.32','vuzpge.32','vuzplt.32','vuzpgt.32','vuzple.32', + + 'vzipeq.8','vzipne.8','vzipcs.8','vziphs.8','vzipcc.8','vziplo.8','vzipmi.8','vzippl.8','vzipvs.8','vzipvc.8','vziphi.8','vzipls.8','vzipge.8','vziplt.8','vzipgt.8','vziple.8', + 'vzipeq.16','vzipne.16','vzipcs.16','vziphs.16','vzipcc.16','vziplo.16','vzipmi.16','vzippl.16','vzipvs.16','vzipvc.16','vziphi.16','vzipls.16','vzipge.16','vziplt.16','vzipgt.16','vziple.16', + 'vzipeq.32','vzipne.32','vzipcs.32','vziphs.32','vzipcc.32','vziplo.32','vzipmi.32','vzippl.32','vzipvs.32','vzipvc.32','vziphi.32','vzipls.32','vzipge.32','vziplt.32','vzipgt.32','vziple.32', + + 'vmulleq.p8','vmullne.p8','vmullcs.p8','vmullhs.p8','vmullcc.p8','vmulllo.p8','vmullmi.p8','vmullpl.p8','vmullvs.p8','vmullvc.p8','vmullhi.p8','vmullls.p8','vmullge.p8','vmulllt.p8','vmullgt.p8','vmullle.p8' + ), + /* Conditional NEON SIMD Universal Integer Instructions */ + 31 => array( + 'vaddeq.i8','vaddne.i8','vaddcs.i8','vaddhs.i8','vaddcc.i8','vaddlo.i8','vaddmi.i8','vaddpl.i8','vaddvs.i8','vaddvc.i8','vaddhi.i8','vaddls.i8','vaddge.i8','vaddlt.i8','vaddgt.i8','vaddle.i8', + 'vaddeq.i16','vaddne.i16','vaddcs.i16','vaddhs.i16','vaddcc.i16','vaddlo.i16','vaddmi.i16','vaddpl.i16','vaddvs.i16','vaddvc.i16','vaddhi.i16','vaddls.i16','vaddge.i16','vaddlt.i16','vaddgt.i16','vaddle.i16', + 'vaddeq.i32','vaddne.i32','vaddcs.i32','vaddhs.i32','vaddcc.i32','vaddlo.i32','vaddmi.i32','vaddpl.i32','vaddvs.i32','vaddvc.i32','vaddhi.i32','vaddls.i32','vaddge.i32','vaddlt.i32','vaddgt.i32','vaddle.i32', + 'vaddeq.i64','vaddne.i64','vaddcs.i64','vaddhs.i64','vaddcc.i64','vaddlo.i64','vaddmi.i64','vaddpl.i64','vaddvs.i64','vaddvc.i64','vaddhi.i64','vaddls.i64','vaddge.i64','vaddlt.i64','vaddgt.i64','vaddle.i64', + + 'vsubeq.i8','vsubne.i8','vsubcs.i8','vsubhs.i8','vsubcc.i8','vsublo.i8','vsubmi.i8','vsubpl.i8','vsubvs.i8','vsubvc.i8','vsubhi.i8','vsubls.i8','vsubge.i8','vsublt.i8','vsubgt.i8','vsuble.i8', + 'vsubeq.i16','vsubne.i16','vsubcs.i16','vsubhs.i16','vsubcc.i16','vsublo.i16','vsubmi.i16','vsubpl.i16','vsubvs.i16','vsubvc.i16','vsubhi.i16','vsubls.i16','vsubge.i16','vsublt.i16','vsubgt.i16','vsuble.i16', + 'vsubeq.i32','vsubne.i32','vsubcs.i32','vsubhs.i32','vsubcc.i32','vsublo.i32','vsubmi.i32','vsubpl.i32','vsubvs.i32','vsubvc.i32','vsubhi.i32','vsubls.i32','vsubge.i32','vsublt.i32','vsubgt.i32','vsuble.i32', + 'vsubeq.i64','vsubne.i64','vsubcs.i64','vsubhs.i64','vsubcc.i64','vsublo.i64','vsubmi.i64','vsubpl.i64','vsubvs.i64','vsubvc.i64','vsubhi.i64','vsubls.i64','vsubge.i64','vsublt.i64','vsubgt.i64','vsuble.i64', + + 'vaddhneq.i16','vaddhnne.i16','vaddhncs.i16','vaddhnhs.i16','vaddhncc.i16','vaddhnlo.i16','vaddhnmi.i16','vaddhnpl.i16','vaddhnvs.i16','vaddhnvc.i16','vaddhnhi.i16','vaddhnls.i16','vaddhnge.i16','vaddhnlt.i16','vaddhngt.i16','vaddhnle.i16', + 'vaddhneq.i32','vaddhnne.i32','vaddhncs.i32','vaddhnhs.i32','vaddhncc.i32','vaddhnlo.i32','vaddhnmi.i32','vaddhnpl.i32','vaddhnvs.i32','vaddhnvc.i32','vaddhnhi.i32','vaddhnls.i32','vaddhnge.i32','vaddhnlt.i32','vaddhngt.i32','vaddhnle.i32', + 'vaddhneq.i64','vaddhnne.i64','vaddhncs.i64','vaddhnhs.i64','vaddhncc.i64','vaddhnlo.i64','vaddhnmi.i64','vaddhnpl.i64','vaddhnvs.i64','vaddhnvc.i64','vaddhnhi.i64','vaddhnls.i64','vaddhnge.i64','vaddhnlt.i64','vaddhngt.i64','vaddhnle.i64', + + 'vsubhneq.i16','vsubhnne.i16','vsubhncs.i16','vsubhnhs.i16','vsubhncc.i16','vsubhnlo.i16','vsubhnmi.i16','vsubhnpl.i16','vsubhnvs.i16','vsubhnvc.i16','vsubhnhi.i16','vsubhnls.i16','vsubhnge.i16','vsubhnlt.i16','vsubhngt.i16','vsubhnle.i16', + 'vsubhneq.i32','vsubhnne.i32','vsubhncs.i32','vsubhnhs.i32','vsubhncc.i32','vsubhnlo.i32','vsubhnmi.i32','vsubhnpl.i32','vsubhnvs.i32','vsubhnvc.i32','vsubhnhi.i32','vsubhnls.i32','vsubhnge.i32','vsubhnlt.i32','vsubhngt.i32','vsubhnle.i32', + 'vsubhneq.i64','vsubhnne.i64','vsubhncs.i64','vsubhnhs.i64','vsubhncc.i64','vsubhnlo.i64','vsubhnmi.i64','vsubhnpl.i64','vsubhnvs.i64','vsubhnvc.i64','vsubhnhi.i64','vsubhnls.i64','vsubhnge.i64','vsubhnlt.i64','vsubhngt.i64','vsubhnle.i64', + + 'vraddhneq.i16','vraddhnne.i16','vraddhncs.i16','vraddhnhs.i16','vraddhncc.i16','vraddhnlo.i16','vraddhnmi.i16','vraddhnpl.i16','vraddhnvs.i16','vraddhnvc.i16','vraddhnhi.i16','vraddhnls.i16','vraddhnge.i16','vraddhnlt.i16','vraddhngt.i16','vraddhnle.i16', + 'vraddhneq.i32','vraddhnne.i32','vraddhncs.i32','vraddhnhs.i32','vraddhncc.i32','vraddhnlo.i32','vraddhnmi.i32','vraddhnpl.i32','vraddhnvs.i32','vraddhnvc.i32','vraddhnhi.i32','vraddhnls.i32','vraddhnge.i32','vraddhnlt.i32','vraddhngt.i32','vraddhnle.i32', + 'vraddhneq.i64','vraddhnne.i64','vraddhncs.i64','vraddhnhs.i64','vraddhncc.i64','vraddhnlo.i64','vraddhnmi.i64','vraddhnpl.i64','vraddhnvs.i64','vraddhnvc.i64','vraddhnhi.i64','vraddhnls.i64','vraddhnge.i64','vraddhnlt.i64','vraddhngt.i64','vraddhnle.i64', + + 'vrsubhneq.i16','vrsubhnne.i16','vrsubhncs.i16','vrsubhnhs.i16','vrsubhncc.i16','vrsubhnlo.i16','vrsubhnmi.i16','vrsubhnpl.i16','vrsubhnvs.i16','vrsubhnvc.i16','vrsubhnhi.i16','vrsubhnls.i16','vrsubhnge.i16','vrsubhnlt.i16','vrsubhngt.i16','vrsubhnle.i16', + 'vrsubhneq.i32','vrsubhnne.i32','vrsubhncs.i32','vrsubhnhs.i32','vrsubhncc.i32','vrsubhnlo.i32','vrsubhnmi.i32','vrsubhnpl.i32','vrsubhnvs.i32','vrsubhnvc.i32','vrsubhnhi.i32','vrsubhnls.i32','vrsubhnge.i32','vrsubhnlt.i32','vrsubhngt.i32','vrsubhnle.i32', + 'vrsubhneq.i64','vrsubhnne.i64','vrsubhncs.i64','vrsubhnhs.i64','vrsubhncc.i64','vrsubhnlo.i64','vrsubhnmi.i64','vrsubhnpl.i64','vrsubhnvs.i64','vrsubhnvc.i64','vrsubhnhi.i64','vrsubhnls.i64','vrsubhnge.i64','vrsubhnlt.i64','vrsubhngt.i64','vrsubhnle.i64', + + 'vpaddeq.i8','vpaddne.i8','vpaddcs.i8','vpaddhs.i8','vpaddcc.i8','vpaddlo.i8','vpaddmi.i8','vpaddpl.i8','vpaddvs.i8','vpaddvc.i8','vpaddhi.i8','vpaddls.i8','vpaddge.i8','vpaddlt.i8','vpaddgt.i8','vpaddle.i8', + 'vpaddeq.i16','vpaddne.i16','vpaddcs.i16','vpaddhs.i16','vpaddcc.i16','vpaddlo.i16','vpaddmi.i16','vpaddpl.i16','vpaddvs.i16','vpaddvc.i16','vpaddhi.i16','vpaddls.i16','vpaddge.i16','vpaddlt.i16','vpaddgt.i16','vpaddle.i16', + 'vpaddeq.i32','vpaddne.i32','vpaddcs.i32','vpaddhs.i32','vpaddcc.i32','vpaddlo.i32','vpaddmi.i32','vpaddpl.i32','vpaddvs.i32','vpaddvc.i32','vpaddhi.i32','vpaddls.i32','vpaddge.i32','vpaddlt.i32','vpaddgt.i32','vpaddle.i32', + + 'vceqeq.i8','vceqne.i8','vceqcs.i8','vceqhs.i8','vceqcc.i8','vceqlo.i8','vceqmi.i8','vceqpl.i8','vceqvs.i8','vceqvc.i8','vceqhi.i8','vceqls.i8','vceqge.i8','vceqlt.i8','vceqgt.i8','vceqle.i8', + 'vceqeq.i16','vceqne.i16','vceqcs.i16','vceqhs.i16','vceqcc.i16','vceqlo.i16','vceqmi.i16','vceqpl.i16','vceqvs.i16','vceqvc.i16','vceqhi.i16','vceqls.i16','vceqge.i16','vceqlt.i16','vceqgt.i16','vceqle.i16', + 'vceqeq.i32','vceqne.i32','vceqcs.i32','vceqhs.i32','vceqcc.i32','vceqlo.i32','vceqmi.i32','vceqpl.i32','vceqvs.i32','vceqvc.i32','vceqhi.i32','vceqls.i32','vceqge.i32','vceqlt.i32','vceqgt.i32','vceqle.i32', + + 'vclzeq.i8','vclzne.i8','vclzcs.i8','vclzhs.i8','vclzcc.i8','vclzlo.i8','vclzmi.i8','vclzpl.i8','vclzvs.i8','vclzvc.i8','vclzhi.i8','vclzls.i8','vclzge.i8','vclzlt.i8','vclzgt.i8','vclzle.i8', + 'vclzeq.i16','vclzne.i16','vclzcs.i16','vclzhs.i16','vclzcc.i16','vclzlo.i16','vclzmi.i16','vclzpl.i16','vclzvs.i16','vclzvc.i16','vclzhi.i16','vclzls.i16','vclzge.i16','vclzlt.i16','vclzgt.i16','vclzle.i16', + 'vclzeq.i32','vclzne.i32','vclzcs.i32','vclzhs.i32','vclzcc.i32','vclzlo.i32','vclzmi.i32','vclzpl.i32','vclzvs.i32','vclzvc.i32','vclzhi.i32','vclzls.i32','vclzge.i32','vclzlt.i32','vclzgt.i32','vclzle.i32', + + 'vmovneq.i16','vmovnne.i16','vmovncs.i16','vmovnhs.i16','vmovncc.i16','vmovnlo.i16','vmovnmi.i16','vmovnpl.i16','vmovnvs.i16','vmovnvc.i16','vmovnhi.i16','vmovnls.i16','vmovnge.i16','vmovnlt.i16','vmovngt.i16','vmovnle.i16', + 'vmovneq.i32','vmovnne.i32','vmovncs.i32','vmovnhs.i32','vmovncc.i32','vmovnlo.i32','vmovnmi.i32','vmovnpl.i32','vmovnvs.i32','vmovnvc.i32','vmovnhi.i32','vmovnls.i32','vmovnge.i32','vmovnlt.i32','vmovngt.i32','vmovnle.i32', + 'vmovneq.i64','vmovnne.i64','vmovncs.i64','vmovnhs.i64','vmovncc.i64','vmovnlo.i64','vmovnmi.i64','vmovnpl.i64','vmovnvs.i64','vmovnvc.i64','vmovnhi.i64','vmovnls.i64','vmovnge.i64','vmovnlt.i64','vmovngt.i64','vmovnle.i64', + + 'vmlaeq.s8','vmlane.s8','vmlacs.s8','vmlahs.s8','vmlacc.s8','vmlalo.s8','vmlami.s8','vmlapl.s8','vmlavs.s8','vmlavc.s8','vmlahi.s8','vmlals.s8','vmlage.s8','vmlalt.s8','vmlagt.s8','vmlale.s8', + 'vmlaeq.s16','vmlane.s16','vmlacs.s16','vmlahs.s16','vmlacc.s16','vmlalo.s16','vmlami.s16','vmlapl.s16','vmlavs.s16','vmlavc.s16','vmlahi.s16','vmlals.s16','vmlage.s16','vmlalt.s16','vmlagt.s16','vmlale.s16', + 'vmlaeq.s32','vmlane.s32','vmlacs.s32','vmlahs.s32','vmlacc.s32','vmlalo.s32','vmlami.s32','vmlapl.s32','vmlavs.s32','vmlavc.s32','vmlahi.s32','vmlals.s32','vmlage.s32','vmlalt.s32','vmlagt.s32','vmlale.s32', + 'vmlaeq.u8','vmlane.u8','vmlacs.u8','vmlahs.u8','vmlacc.u8','vmlalo.u8','vmlami.u8','vmlapl.u8','vmlavs.u8','vmlavc.u8','vmlahi.u8','vmlals.u8','vmlage.u8','vmlalt.u8','vmlagt.u8','vmlale.u8', + 'vmlaeq.u16','vmlane.u16','vmlacs.u16','vmlahs.u16','vmlacc.u16','vmlalo.u16','vmlami.u16','vmlapl.u16','vmlavs.u16','vmlavc.u16','vmlahi.u16','vmlals.u16','vmlage.u16','vmlalt.u16','vmlagt.u16','vmlale.u16', + 'vmlaeq.u32','vmlane.u32','vmlacs.u32','vmlahs.u32','vmlacc.u32','vmlalo.u32','vmlami.u32','vmlapl.u32','vmlavs.u32','vmlavc.u32','vmlahi.u32','vmlals.u32','vmlage.u32','vmlalt.u32','vmlagt.u32','vmlale.u32', + 'vmlaeq.i8','vmlane.i8','vmlacs.i8','vmlahs.i8','vmlacc.i8','vmlalo.i8','vmlami.i8','vmlapl.i8','vmlavs.i8','vmlavc.i8','vmlahi.i8','vmlals.i8','vmlage.i8','vmlalt.i8','vmlagt.i8','vmlale.i8', + 'vmlaeq.i16','vmlane.i16','vmlacs.i16','vmlahs.i16','vmlacc.i16','vmlalo.i16','vmlami.i16','vmlapl.i16','vmlavs.i16','vmlavc.i16','vmlahi.i16','vmlals.i16','vmlage.i16','vmlalt.i16','vmlagt.i16','vmlale.i16', + 'vmlaeq.i32','vmlane.i32','vmlacs.i32','vmlahs.i32','vmlacc.i32','vmlalo.i32','vmlami.i32','vmlapl.i32','vmlavs.i32','vmlavc.i32','vmlahi.i32','vmlals.i32','vmlage.i32','vmlalt.i32','vmlagt.i32','vmlale.i32', + + 'vmlseq.s8','vmlsne.s8','vmlscs.s8','vmlshs.s8','vmlscc.s8','vmlslo.s8','vmlsmi.s8','vmlspl.s8','vmlsvs.s8','vmlsvc.s8','vmlshi.s8','vmlsls.s8','vmlsge.s8','vmlslt.s8','vmlsgt.s8','vmlsle.s8', + 'vmlseq.s16','vmlsne.s16','vmlscs.s16','vmlshs.s16','vmlscc.s16','vmlslo.s16','vmlsmi.s16','vmlspl.s16','vmlsvs.s16','vmlsvc.s16','vmlshi.s16','vmlsls.s16','vmlsge.s16','vmlslt.s16','vmlsgt.s16','vmlsle.s16', + 'vmlseq.s32','vmlsne.s32','vmlscs.s32','vmlshs.s32','vmlscc.s32','vmlslo.s32','vmlsmi.s32','vmlspl.s32','vmlsvs.s32','vmlsvc.s32','vmlshi.s32','vmlsls.s32','vmlsge.s32','vmlslt.s32','vmlsgt.s32','vmlsle.s32', + 'vmlseq.u8','vmlsne.u8','vmlscs.u8','vmlshs.u8','vmlscc.u8','vmlslo.u8','vmlsmi.u8','vmlspl.u8','vmlsvs.u8','vmlsvc.u8','vmlshi.u8','vmlsls.u8','vmlsge.u8','vmlslt.u8','vmlsgt.u8','vmlsle.u8', + 'vmlseq.u16','vmlsne.u16','vmlscs.u16','vmlshs.u16','vmlscc.u16','vmlslo.u16','vmlsmi.u16','vmlspl.u16','vmlsvs.u16','vmlsvc.u16','vmlshi.u16','vmlsls.u16','vmlsge.u16','vmlslt.u16','vmlsgt.u16','vmlsle.u16', + 'vmlseq.u32','vmlsne.u32','vmlscs.u32','vmlshs.u32','vmlscc.u32','vmlslo.u32','vmlsmi.u32','vmlspl.u32','vmlsvs.u32','vmlsvc.u32','vmlshi.u32','vmlsls.u32','vmlsge.u32','vmlslt.u32','vmlsgt.u32','vmlsle.u32', + 'vmlseq.i8','vmlsne.i8','vmlscs.i8','vmlshs.i8','vmlscc.i8','vmlslo.i8','vmlsmi.i8','vmlspl.i8','vmlsvs.i8','vmlsvc.i8','vmlshi.i8','vmlsls.i8','vmlsge.i8','vmlslt.i8','vmlsgt.i8','vmlsle.i8', + 'vmlseq.i16','vmlsne.i16','vmlscs.i16','vmlshs.i16','vmlscc.i16','vmlslo.i16','vmlsmi.i16','vmlspl.i16','vmlsvs.i16','vmlsvc.i16','vmlshi.i16','vmlsls.i16','vmlsge.i16','vmlslt.i16','vmlsgt.i16','vmlsle.i16', + 'vmlseq.i32','vmlsne.i32','vmlscs.i32','vmlshs.i32','vmlscc.i32','vmlslo.i32','vmlsmi.i32','vmlspl.i32','vmlsvs.i32','vmlsvc.i32','vmlshi.i32','vmlsls.i32','vmlsge.i32','vmlslt.i32','vmlsgt.i32','vmlsle.i32', + + 'vmuleq.s8','vmulne.s8','vmulcs.s8','vmulhs.s8','vmulcc.s8','vmullo.s8','vmulmi.s8','vmulpl.s8','vmulvs.s8','vmulvc.s8','vmulhi.s8','vmulls.s8','vmulge.s8','vmullt.s8','vmulgt.s8','vmulle.s8', + 'vmuleq.s16','vmulne.s16','vmulcs.s16','vmulhs.s16','vmulcc.s16','vmullo.s16','vmulmi.s16','vmulpl.s16','vmulvs.s16','vmulvc.s16','vmulhi.s16','vmulls.s16','vmulge.s16','vmullt.s16','vmulgt.s16','vmulle.s16', + 'vmuleq.s32','vmulne.s32','vmulcs.s32','vmulhs.s32','vmulcc.s32','vmullo.s32','vmulmi.s32','vmulpl.s32','vmulvs.s32','vmulvc.s32','vmulhi.s32','vmulls.s32','vmulge.s32','vmullt.s32','vmulgt.s32','vmulle.s32', + 'vmuleq.u8','vmulne.u8','vmulcs.u8','vmulhs.u8','vmulcc.u8','vmullo.u8','vmulmi.u8','vmulpl.u8','vmulvs.u8','vmulvc.u8','vmulhi.u8','vmulls.u8','vmulge.u8','vmullt.u8','vmulgt.u8','vmulle.u8', + 'vmuleq.u16','vmulne.u16','vmulcs.u16','vmulhs.u16','vmulcc.u16','vmullo.u16','vmulmi.u16','vmulpl.u16','vmulvs.u16','vmulvc.u16','vmulhi.u16','vmulls.u16','vmulge.u16','vmullt.u16','vmulgt.u16','vmulle.u16', + 'vmuleq.u32','vmulne.u32','vmulcs.u32','vmulhs.u32','vmulcc.u32','vmullo.u32','vmulmi.u32','vmulpl.u32','vmulvs.u32','vmulvc.u32','vmulhi.u32','vmulls.u32','vmulge.u32','vmullt.u32','vmulgt.u32','vmulle.u32', + 'vmuleq.i8','vmulne.i8','vmulcs.i8','vmulhs.i8','vmulcc.i8','vmullo.i8','vmulmi.i8','vmulpl.i8','vmulvs.i8','vmulvc.i8','vmulhi.i8','vmulls.i8','vmulge.i8','vmullt.i8','vmulgt.i8','vmulle.i8', + 'vmuleq.i16','vmulne.i16','vmulcs.i16','vmulhs.i16','vmulcc.i16','vmullo.i16','vmulmi.i16','vmulpl.i16','vmulvs.i16','vmulvc.i16','vmulhi.i16','vmulls.i16','vmulge.i16','vmullt.i16','vmulgt.i16','vmulle.i16', + 'vmuleq.i32','vmulne.i32','vmulcs.i32','vmulhs.i32','vmulcc.i32','vmullo.i32','vmulmi.i32','vmulpl.i32','vmulvs.i32','vmulvc.i32','vmulhi.i32','vmulls.i32','vmulge.i32','vmullt.i32','vmulgt.i32','vmulle.i32', + 'vmuleq.p8','vmulne.p8','vmulcs.p8','vmulhs.p8','vmulcc.p8','vmullo.p8','vmulmi.p8','vmulpl.p8','vmulvs.p8','vmulvc.p8','vmulhi.p8','vmulls.p8','vmulge.p8','vmullt.p8','vmulgt.p8','vmulle.p8', + + 'vrshrneq.i16','vrshrnne.i16','vrshrncs.i16','vrshrnhs.i16','vrshrncc.i16','vrshrnlo.i16','vrshrnmi.i16','vrshrnpl.i16','vrshrnvs.i16','vrshrnvc.i16','vrshrnhi.i16','vrshrnls.i16','vrshrnge.i16','vrshrnlt.i16','vrshrngt.i16','vrshrnle.i16', + 'vrshrneq.i32','vrshrnne.i32','vrshrncs.i32','vrshrnhs.i32','vrshrncc.i32','vrshrnlo.i32','vrshrnmi.i32','vrshrnpl.i32','vrshrnvs.i32','vrshrnvc.i32','vrshrnhi.i32','vrshrnls.i32','vrshrnge.i32','vrshrnlt.i32','vrshrngt.i32','vrshrnle.i32', + 'vrshrneq.i64','vrshrnne.i64','vrshrncs.i64','vrshrnhs.i64','vrshrncc.i64','vrshrnlo.i64','vrshrnmi.i64','vrshrnpl.i64','vrshrnvs.i64','vrshrnvc.i64','vrshrnhi.i64','vrshrnls.i64','vrshrnge.i64','vrshrnlt.i64','vrshrngt.i64','vrshrnle.i64', + + 'vshrneq.i16','vshrnne.i16','vshrncs.i16','vshrnhs.i16','vshrncc.i16','vshrnlo.i16','vshrnmi.i16','vshrnpl.i16','vshrnvs.i16','vshrnvc.i16','vshrnhi.i16','vshrnls.i16','vshrnge.i16','vshrnlt.i16','vshrngt.i16','vshrnle.i16', + 'vshrneq.i32','vshrnne.i32','vshrncs.i32','vshrnhs.i32','vshrncc.i32','vshrnlo.i32','vshrnmi.i32','vshrnpl.i32','vshrnvs.i32','vshrnvc.i32','vshrnhi.i32','vshrnls.i32','vshrnge.i32','vshrnlt.i32','vshrngt.i32','vshrnle.i32', + 'vshrneq.i64','vshrnne.i64','vshrncs.i64','vshrnhs.i64','vshrncc.i64','vshrnlo.i64','vshrnmi.i64','vshrnpl.i64','vshrnvs.i64','vshrnvc.i64','vshrnhi.i64','vshrnls.i64','vshrnge.i64','vshrnlt.i64','vshrngt.i64','vshrnle.i64', + + 'vshleq.i8','vshlne.i8','vshlcs.i8','vshlhs.i8','vshlcc.i8','vshllo.i8','vshlmi.i8','vshlpl.i8','vshlvs.i8','vshlvc.i8','vshlhi.i8','vshlls.i8','vshlge.i8','vshllt.i8','vshlgt.i8','vshlle.i8', + 'vshleq.i16','vshlne.i16','vshlcs.i16','vshlhs.i16','vshlcc.i16','vshllo.i16','vshlmi.i16','vshlpl.i16','vshlvs.i16','vshlvc.i16','vshlhi.i16','vshlls.i16','vshlge.i16','vshllt.i16','vshlgt.i16','vshlle.i16', + 'vshleq.i32','vshlne.i32','vshlcs.i32','vshlhs.i32','vshlcc.i32','vshllo.i32','vshlmi.i32','vshlpl.i32','vshlvs.i32','vshlvc.i32','vshlhi.i32','vshlls.i32','vshlge.i32','vshllt.i32','vshlgt.i32','vshlle.i32', + 'vshleq.i64','vshlne.i64','vshlcs.i64','vshlhs.i64','vshlcc.i64','vshllo.i64','vshlmi.i64','vshlpl.i64','vshlvs.i64','vshlvc.i64','vshlhi.i64','vshlls.i64','vshlge.i64','vshllt.i64','vshlgt.i64','vshlle.i64', + + 'vshlleq.i8','vshllne.i8','vshllcs.i8','vshllhs.i8','vshllcc.i8','vshlllo.i8','vshllmi.i8','vshllpl.i8','vshllvs.i8','vshllvc.i8','vshllhi.i8','vshllls.i8','vshllge.i8','vshlllt.i8','vshllgt.i8','vshllle.i8', + 'vshlleq.i16','vshllne.i16','vshllcs.i16','vshllhs.i16','vshllcc.i16','vshlllo.i16','vshllmi.i16','vshllpl.i16','vshllvs.i16','vshllvc.i16','vshllhi.i16','vshllls.i16','vshllge.i16','vshlllt.i16','vshllgt.i16','vshllle.i16', + 'vshlleq.i32','vshllne.i32','vshllcs.i32','vshllhs.i32','vshllcc.i32','vshlllo.i32','vshllmi.i32','vshllpl.i32','vshllvs.i32','vshllvc.i32','vshllhi.i32','vshllls.i32','vshllge.i32','vshlllt.i32','vshllgt.i32','vshllle.i32' + ), + /* Conditional NEON SIMD Signed Integer Instructions */ + 32 => array( + 'vabaeq.s8','vabane.s8','vabacs.s8','vabahs.s8','vabacc.s8','vabalo.s8','vabami.s8','vabapl.s8','vabavs.s8','vabavc.s8','vabahi.s8','vabals.s8','vabage.s8','vabalt.s8','vabagt.s8','vabale.s8', + 'vabaeq.s16','vabane.s16','vabacs.s16','vabahs.s16','vabacc.s16','vabalo.s16','vabami.s16','vabapl.s16','vabavs.s16','vabavc.s16','vabahi.s16','vabals.s16','vabage.s16','vabalt.s16','vabagt.s16','vabale.s16', + 'vabaeq.s32','vabane.s32','vabacs.s32','vabahs.s32','vabacc.s32','vabalo.s32','vabami.s32','vabapl.s32','vabavs.s32','vabavc.s32','vabahi.s32','vabals.s32','vabage.s32','vabalt.s32','vabagt.s32','vabale.s32', + + 'vabaleq.s8','vabalne.s8','vabalcs.s8','vabalhs.s8','vabalcc.s8','vaballo.s8','vabalmi.s8','vabalpl.s8','vabalvs.s8','vabalvc.s8','vabalhi.s8','vaballs.s8','vabalge.s8','vaballt.s8','vabalgt.s8','vaballe.s8', + 'vabaleq.s16','vabalne.s16','vabalcs.s16','vabalhs.s16','vabalcc.s16','vaballo.s16','vabalmi.s16','vabalpl.s16','vabalvs.s16','vabalvc.s16','vabalhi.s16','vaballs.s16','vabalge.s16','vaballt.s16','vabalgt.s16','vaballe.s16', + 'vabaleq.s32','vabalne.s32','vabalcs.s32','vabalhs.s32','vabalcc.s32','vaballo.s32','vabalmi.s32','vabalpl.s32','vabalvs.s32','vabalvc.s32','vabalhi.s32','vaballs.s32','vabalge.s32','vaballt.s32','vabalgt.s32','vaballe.s32', + + 'vabdeq.s8','vabdne.s8','vabdcs.s8','vabdhs.s8','vabdcc.s8','vabdlo.s8','vabdmi.s8','vabdpl.s8','vabdvs.s8','vabdvc.s8','vabdhi.s8','vabdls.s8','vabdge.s8','vabdlt.s8','vabdgt.s8','vabdle.s8', + 'vabdeq.s16','vabdne.s16','vabdcs.s16','vabdhs.s16','vabdcc.s16','vabdlo.s16','vabdmi.s16','vabdpl.s16','vabdvs.s16','vabdvc.s16','vabdhi.s16','vabdls.s16','vabdge.s16','vabdlt.s16','vabdgt.s16','vabdle.s16', + 'vabdeq.s32','vabdne.s32','vabdcs.s32','vabdhs.s32','vabdcc.s32','vabdlo.s32','vabdmi.s32','vabdpl.s32','vabdvs.s32','vabdvc.s32','vabdhi.s32','vabdls.s32','vabdge.s32','vabdlt.s32','vabdgt.s32','vabdle.s32', + + 'vabseq.s8','vabsne.s8','vabscs.s8','vabshs.s8','vabscc.s8','vabslo.s8','vabsmi.s8','vabspl.s8','vabsvs.s8','vabsvc.s8','vabshi.s8','vabsls.s8','vabsge.s8','vabslt.s8','vabsgt.s8','vabsle.s8', + 'vabseq.s16','vabsne.s16','vabscs.s16','vabshs.s16','vabscc.s16','vabslo.s16','vabsmi.s16','vabspl.s16','vabsvs.s16','vabsvc.s16','vabshi.s16','vabsls.s16','vabsge.s16','vabslt.s16','vabsgt.s16','vabsle.s16', + 'vabseq.s32','vabsne.s32','vabscs.s32','vabshs.s32','vabscc.s32','vabslo.s32','vabsmi.s32','vabspl.s32','vabsvs.s32','vabsvc.s32','vabshi.s32','vabsls.s32','vabsge.s32','vabslt.s32','vabsgt.s32','vabsle.s32', + + 'vaddleq.s8','vaddlne.s8','vaddlcs.s8','vaddlhs.s8','vaddlcc.s8','vaddllo.s8','vaddlmi.s8','vaddlpl.s8','vaddlvs.s8','vaddlvc.s8','vaddlhi.s8','vaddlls.s8','vaddlge.s8','vaddllt.s8','vaddlgt.s8','vaddlle.s8', + 'vaddleq.s16','vaddlne.s16','vaddlcs.s16','vaddlhs.s16','vaddlcc.s16','vaddllo.s16','vaddlmi.s16','vaddlpl.s16','vaddlvs.s16','vaddlvc.s16','vaddlhi.s16','vaddlls.s16','vaddlge.s16','vaddllt.s16','vaddlgt.s16','vaddlle.s16', + 'vaddleq.s32','vaddlne.s32','vaddlcs.s32','vaddlhs.s32','vaddlcc.s32','vaddllo.s32','vaddlmi.s32','vaddlpl.s32','vaddlvs.s32','vaddlvc.s32','vaddlhi.s32','vaddlls.s32','vaddlge.s32','vaddllt.s32','vaddlgt.s32','vaddlle.s32', + + 'vcgeeq.s8','vcgene.s8','vcgecs.s8','vcgehs.s8','vcgecc.s8','vcgelo.s8','vcgemi.s8','vcgepl.s8','vcgevs.s8','vcgevc.s8','vcgehi.s8','vcgels.s8','vcgege.s8','vcgelt.s8','vcgegt.s8','vcgele.s8', + 'vcgeeq.s16','vcgene.s16','vcgecs.s16','vcgehs.s16','vcgecc.s16','vcgelo.s16','vcgemi.s16','vcgepl.s16','vcgevs.s16','vcgevc.s16','vcgehi.s16','vcgels.s16','vcgege.s16','vcgelt.s16','vcgegt.s16','vcgele.s16', + 'vcgeeq.s32','vcgene.s32','vcgecs.s32','vcgehs.s32','vcgecc.s32','vcgelo.s32','vcgemi.s32','vcgepl.s32','vcgevs.s32','vcgevc.s32','vcgehi.s32','vcgels.s32','vcgege.s32','vcgelt.s32','vcgegt.s32','vcgele.s32', + + 'vcleeq.s8','vclene.s8','vclecs.s8','vclehs.s8','vclecc.s8','vclelo.s8','vclemi.s8','vclepl.s8','vclevs.s8','vclevc.s8','vclehi.s8','vclels.s8','vclege.s8','vclelt.s8','vclegt.s8','vclele.s8', + 'vcleeq.s16','vclene.s16','vclecs.s16','vclehs.s16','vclecc.s16','vclelo.s16','vclemi.s16','vclepl.s16','vclevs.s16','vclevc.s16','vclehi.s16','vclels.s16','vclege.s16','vclelt.s16','vclegt.s16','vclele.s16', + 'vcleeq.s32','vclene.s32','vclecs.s32','vclehs.s32','vclecc.s32','vclelo.s32','vclemi.s32','vclepl.s32','vclevs.s32','vclevc.s32','vclehi.s32','vclels.s32','vclege.s32','vclelt.s32','vclegt.s32','vclele.s32', + + 'vcgteq.s8','vcgtne.s8','vcgtcs.s8','vcgths.s8','vcgtcc.s8','vcgtlo.s8','vcgtmi.s8','vcgtpl.s8','vcgtvs.s8','vcgtvc.s8','vcgthi.s8','vcgtls.s8','vcgtge.s8','vcgtlt.s8','vcgtgt.s8','vcgtle.s8', + 'vcgteq.s16','vcgtne.s16','vcgtcs.s16','vcgths.s16','vcgtcc.s16','vcgtlo.s16','vcgtmi.s16','vcgtpl.s16','vcgtvs.s16','vcgtvc.s16','vcgthi.s16','vcgtls.s16','vcgtge.s16','vcgtlt.s16','vcgtgt.s16','vcgtle.s16', + 'vcgteq.s32','vcgtne.s32','vcgtcs.s32','vcgths.s32','vcgtcc.s32','vcgtlo.s32','vcgtmi.s32','vcgtpl.s32','vcgtvs.s32','vcgtvc.s32','vcgthi.s32','vcgtls.s32','vcgtge.s32','vcgtlt.s32','vcgtgt.s32','vcgtle.s32', + + 'vclteq.s8','vcltne.s8','vcltcs.s8','vclths.s8','vcltcc.s8','vcltlo.s8','vcltmi.s8','vcltpl.s8','vcltvs.s8','vcltvc.s8','vclthi.s8','vcltls.s8','vcltge.s8','vcltlt.s8','vcltgt.s8','vcltle.s8', + 'vclteq.s16','vcltne.s16','vcltcs.s16','vclths.s16','vcltcc.s16','vcltlo.s16','vcltmi.s16','vcltpl.s16','vcltvs.s16','vcltvc.s16','vclthi.s16','vcltls.s16','vcltge.s16','vcltlt.s16','vcltgt.s16','vcltle.s16', + 'vclteq.s32','vcltne.s32','vcltcs.s32','vclths.s32','vcltcc.s32','vcltlo.s32','vcltmi.s32','vcltpl.s32','vcltvs.s32','vcltvc.s32','vclthi.s32','vcltls.s32','vcltge.s32','vcltlt.s32','vcltgt.s32','vcltle.s32', + + 'vclseq.s8','vclsne.s8','vclscs.s8','vclshs.s8','vclscc.s8','vclslo.s8','vclsmi.s8','vclspl.s8','vclsvs.s8','vclsvc.s8','vclshi.s8','vclsls.s8','vclsge.s8','vclslt.s8','vclsgt.s8','vclsle.s8', + 'vclseq.s16','vclsne.s16','vclscs.s16','vclshs.s16','vclscc.s16','vclslo.s16','vclsmi.s16','vclspl.s16','vclsvs.s16','vclsvc.s16','vclshi.s16','vclsls.s16','vclsge.s16','vclslt.s16','vclsgt.s16','vclsle.s16', + 'vclseq.s32','vclsne.s32','vclscs.s32','vclshs.s32','vclscc.s32','vclslo.s32','vclsmi.s32','vclspl.s32','vclsvs.s32','vclsvc.s32','vclshi.s32','vclsls.s32','vclsge.s32','vclslt.s32','vclsgt.s32','vclsle.s32', + + 'vaddweq.s8','vaddwne.s8','vaddwcs.s8','vaddwhs.s8','vaddwcc.s8','vaddwlo.s8','vaddwmi.s8','vaddwpl.s8','vaddwvs.s8','vaddwvc.s8','vaddwhi.s8','vaddwls.s8','vaddwge.s8','vaddwlt.s8','vaddwgt.s8','vaddwle.s8', + 'vaddweq.s16','vaddwne.s16','vaddwcs.s16','vaddwhs.s16','vaddwcc.s16','vaddwlo.s16','vaddwmi.s16','vaddwpl.s16','vaddwvs.s16','vaddwvc.s16','vaddwhi.s16','vaddwls.s16','vaddwge.s16','vaddwlt.s16','vaddwgt.s16','vaddwle.s16', + 'vaddweq.s32','vaddwne.s32','vaddwcs.s32','vaddwhs.s32','vaddwcc.s32','vaddwlo.s32','vaddwmi.s32','vaddwpl.s32','vaddwvs.s32','vaddwvc.s32','vaddwhi.s32','vaddwls.s32','vaddwge.s32','vaddwlt.s32','vaddwgt.s32','vaddwle.s32', + + 'vhaddeq.s8','vhaddne.s8','vhaddcs.s8','vhaddhs.s8','vhaddcc.s8','vhaddlo.s8','vhaddmi.s8','vhaddpl.s8','vhaddvs.s8','vhaddvc.s8','vhaddhi.s8','vhaddls.s8','vhaddge.s8','vhaddlt.s8','vhaddgt.s8','vhaddle.s8', + 'vhaddeq.s16','vhaddne.s16','vhaddcs.s16','vhaddhs.s16','vhaddcc.s16','vhaddlo.s16','vhaddmi.s16','vhaddpl.s16','vhaddvs.s16','vhaddvc.s16','vhaddhi.s16','vhaddls.s16','vhaddge.s16','vhaddlt.s16','vhaddgt.s16','vhaddle.s16', + 'vhaddeq.s32','vhaddne.s32','vhaddcs.s32','vhaddhs.s32','vhaddcc.s32','vhaddlo.s32','vhaddmi.s32','vhaddpl.s32','vhaddvs.s32','vhaddvc.s32','vhaddhi.s32','vhaddls.s32','vhaddge.s32','vhaddlt.s32','vhaddgt.s32','vhaddle.s32', + + 'vhsubeq.s8','vhsubne.s8','vhsubcs.s8','vhsubhs.s8','vhsubcc.s8','vhsublo.s8','vhsubmi.s8','vhsubpl.s8','vhsubvs.s8','vhsubvc.s8','vhsubhi.s8','vhsubls.s8','vhsubge.s8','vhsublt.s8','vhsubgt.s8','vhsuble.s8', + 'vhsubeq.s16','vhsubne.s16','vhsubcs.s16','vhsubhs.s16','vhsubcc.s16','vhsublo.s16','vhsubmi.s16','vhsubpl.s16','vhsubvs.s16','vhsubvc.s16','vhsubhi.s16','vhsubls.s16','vhsubge.s16','vhsublt.s16','vhsubgt.s16','vhsuble.s16', + 'vhsubeq.s32','vhsubne.s32','vhsubcs.s32','vhsubhs.s32','vhsubcc.s32','vhsublo.s32','vhsubmi.s32','vhsubpl.s32','vhsubvs.s32','vhsubvc.s32','vhsubhi.s32','vhsubls.s32','vhsubge.s32','vhsublt.s32','vhsubgt.s32','vhsuble.s32', + + 'vmaxeq.s8','vmaxne.s8','vmaxcs.s8','vmaxhs.s8','vmaxcc.s8','vmaxlo.s8','vmaxmi.s8','vmaxpl.s8','vmaxvs.s8','vmaxvc.s8','vmaxhi.s8','vmaxls.s8','vmaxge.s8','vmaxlt.s8','vmaxgt.s8','vmaxle.s8', + 'vmaxeq.s16','vmaxne.s16','vmaxcs.s16','vmaxhs.s16','vmaxcc.s16','vmaxlo.s16','vmaxmi.s16','vmaxpl.s16','vmaxvs.s16','vmaxvc.s16','vmaxhi.s16','vmaxls.s16','vmaxge.s16','vmaxlt.s16','vmaxgt.s16','vmaxle.s16', + 'vmaxeq.s32','vmaxne.s32','vmaxcs.s32','vmaxhs.s32','vmaxcc.s32','vmaxlo.s32','vmaxmi.s32','vmaxpl.s32','vmaxvs.s32','vmaxvc.s32','vmaxhi.s32','vmaxls.s32','vmaxge.s32','vmaxlt.s32','vmaxgt.s32','vmaxle.s32', + + 'vmineq.s8','vminne.s8','vmincs.s8','vminhs.s8','vmincc.s8','vminlo.s8','vminmi.s8','vminpl.s8','vminvs.s8','vminvc.s8','vminhi.s8','vminls.s8','vminge.s8','vminlt.s8','vmingt.s8','vminle.s8', + 'vmineq.s16','vminne.s16','vmincs.s16','vminhs.s16','vmincc.s16','vminlo.s16','vminmi.s16','vminpl.s16','vminvs.s16','vminvc.s16','vminhi.s16','vminls.s16','vminge.s16','vminlt.s16','vmingt.s16','vminle.s16', + 'vmineq.s32','vminne.s32','vmincs.s32','vminhs.s32','vmincc.s32','vminlo.s32','vminmi.s32','vminpl.s32','vminvs.s32','vminvc.s32','vminhi.s32','vminls.s32','vminge.s32','vminlt.s32','vmingt.s32','vminle.s32', + + 'vmlaleq.s8','vmlalne.s8','vmlalcs.s8','vmlalhs.s8','vmlalcc.s8','vmlallo.s8','vmlalmi.s8','vmlalpl.s8','vmlalvs.s8','vmlalvc.s8','vmlalhi.s8','vmlalls.s8','vmlalge.s8','vmlallt.s8','vmlalgt.s8','vmlalle.s8', + 'vmlaleq.s16','vmlalne.s16','vmlalcs.s16','vmlalhs.s16','vmlalcc.s16','vmlallo.s16','vmlalmi.s16','vmlalpl.s16','vmlalvs.s16','vmlalvc.s16','vmlalhi.s16','vmlalls.s16','vmlalge.s16','vmlallt.s16','vmlalgt.s16','vmlalle.s16', + 'vmlaleq.s32','vmlalne.s32','vmlalcs.s32','vmlalhs.s32','vmlalcc.s32','vmlallo.s32','vmlalmi.s32','vmlalpl.s32','vmlalvs.s32','vmlalvc.s32','vmlalhi.s32','vmlalls.s32','vmlalge.s32','vmlallt.s32','vmlalgt.s32','vmlalle.s32', + + 'vmlsleq.s8','vmlslne.s8','vmlslcs.s8','vmlslhs.s8','vmlslcc.s8','vmlsllo.s8','vmlslmi.s8','vmlslpl.s8','vmlslvs.s8','vmlslvc.s8','vmlslhi.s8','vmlslls.s8','vmlslge.s8','vmlsllt.s8','vmlslgt.s8','vmlslle.s8', + 'vmlsleq.s16','vmlslne.s16','vmlslcs.s16','vmlslhs.s16','vmlslcc.s16','vmlsllo.s16','vmlslmi.s16','vmlslpl.s16','vmlslvs.s16','vmlslvc.s16','vmlslhi.s16','vmlslls.s16','vmlslge.s16','vmlsllt.s16','vmlslgt.s16','vmlslle.s16', + 'vmlsleq.s32','vmlslne.s32','vmlslcs.s32','vmlslhs.s32','vmlslcc.s32','vmlsllo.s32','vmlslmi.s32','vmlslpl.s32','vmlslvs.s32','vmlslvc.s32','vmlslhi.s32','vmlslls.s32','vmlslge.s32','vmlsllt.s32','vmlslgt.s32','vmlslle.s32', + + 'vnegeq.s8','vnegne.s8','vnegcs.s8','vneghs.s8','vnegcc.s8','vneglo.s8','vnegmi.s8','vnegpl.s8','vnegvs.s8','vnegvc.s8','vneghi.s8','vnegls.s8','vnegge.s8','vneglt.s8','vneggt.s8','vnegle.s8', + 'vnegeq.s16','vnegne.s16','vnegcs.s16','vneghs.s16','vnegcc.s16','vneglo.s16','vnegmi.s16','vnegpl.s16','vnegvs.s16','vnegvc.s16','vneghi.s16','vnegls.s16','vnegge.s16','vneglt.s16','vneggt.s16','vnegle.s16', + 'vnegeq.s32','vnegne.s32','vnegcs.s32','vneghs.s32','vnegcc.s32','vneglo.s32','vnegmi.s32','vnegpl.s32','vnegvs.s32','vnegvc.s32','vneghi.s32','vnegls.s32','vnegge.s32','vneglt.s32','vneggt.s32','vnegle.s32', + + 'vpadaleq.s8','vpadalne.s8','vpadalcs.s8','vpadalhs.s8','vpadalcc.s8','vpadallo.s8','vpadalmi.s8','vpadalpl.s8','vpadalvs.s8','vpadalvc.s8','vpadalhi.s8','vpadalls.s8','vpadalge.s8','vpadallt.s8','vpadalgt.s8','vpadalle.s8', + 'vpadaleq.s16','vpadalne.s16','vpadalcs.s16','vpadalhs.s16','vpadalcc.s16','vpadallo.s16','vpadalmi.s16','vpadalpl.s16','vpadalvs.s16','vpadalvc.s16','vpadalhi.s16','vpadalls.s16','vpadalge.s16','vpadallt.s16','vpadalgt.s16','vpadalle.s16', + 'vpadaleq.s32','vpadalne.s32','vpadalcs.s32','vpadalhs.s32','vpadalcc.s32','vpadallo.s32','vpadalmi.s32','vpadalpl.s32','vpadalvs.s32','vpadalvc.s32','vpadalhi.s32','vpadalls.s32','vpadalge.s32','vpadallt.s32','vpadalgt.s32','vpadalle.s32', + + 'vmovleq.s8','vmovlne.s8','vmovlcs.s8','vmovlhs.s8','vmovlcc.s8','vmovllo.s8','vmovlmi.s8','vmovlpl.s8','vmovlvs.s8','vmovlvc.s8','vmovlhi.s8','vmovlls.s8','vmovlge.s8','vmovllt.s8','vmovlgt.s8','vmovlle.s8', + 'vmovleq.s16','vmovlne.s16','vmovlcs.s16','vmovlhs.s16','vmovlcc.s16','vmovllo.s16','vmovlmi.s16','vmovlpl.s16','vmovlvs.s16','vmovlvc.s16','vmovlhi.s16','vmovlls.s16','vmovlge.s16','vmovllt.s16','vmovlgt.s16','vmovlle.s16', + 'vmovleq.s32','vmovlne.s32','vmovlcs.s32','vmovlhs.s32','vmovlcc.s32','vmovllo.s32','vmovlmi.s32','vmovlpl.s32','vmovlvs.s32','vmovlvc.s32','vmovlhi.s32','vmovlls.s32','vmovlge.s32','vmovllt.s32','vmovlgt.s32','vmovlle.s32', + + 'vmulleq.s8','vmullne.s8','vmullcs.s8','vmullhs.s8','vmullcc.s8','vmulllo.s8','vmullmi.s8','vmullpl.s8','vmullvs.s8','vmullvc.s8','vmullhi.s8','vmullls.s8','vmullge.s8','vmulllt.s8','vmullgt.s8','vmullle.s8', + 'vmulleq.s16','vmullne.s16','vmullcs.s16','vmullhs.s16','vmullcc.s16','vmulllo.s16','vmullmi.s16','vmullpl.s16','vmullvs.s16','vmullvc.s16','vmullhi.s16','vmullls.s16','vmullge.s16','vmulllt.s16','vmullgt.s16','vmullle.s16', + 'vmulleq.s32','vmullne.s32','vmullcs.s32','vmullhs.s32','vmullcc.s32','vmulllo.s32','vmullmi.s32','vmullpl.s32','vmullvs.s32','vmullvc.s32','vmullhi.s32','vmullls.s32','vmullge.s32','vmulllt.s32','vmullgt.s32','vmullle.s32', + + 'vpaddleq.s8','vpaddlne.s8','vpaddlcs.s8','vpaddlhs.s8','vpaddlcc.s8','vpaddllo.s8','vpaddlmi.s8','vpaddlpl.s8','vpaddlvs.s8','vpaddlvc.s8','vpaddlhi.s8','vpaddlls.s8','vpaddlge.s8','vpaddllt.s8','vpaddlgt.s8','vpaddlle.s8', + 'vpaddleq.s16','vpaddlne.s16','vpaddlcs.s16','vpaddlhs.s16','vpaddlcc.s16','vpaddllo.s16','vpaddlmi.s16','vpaddlpl.s16','vpaddlvs.s16','vpaddlvc.s16','vpaddlhi.s16','vpaddlls.s16','vpaddlge.s16','vpaddllt.s16','vpaddlgt.s16','vpaddlle.s16', + 'vpaddleq.s32','vpaddlne.s32','vpaddlcs.s32','vpaddlhs.s32','vpaddlcc.s32','vpaddllo.s32','vpaddlmi.s32','vpaddlpl.s32','vpaddlvs.s32','vpaddlvc.s32','vpaddlhi.s32','vpaddlls.s32','vpaddlge.s32','vpaddllt.s32','vpaddlgt.s32','vpaddlle.s32', + + 'vpmaxeq.s8','vpmaxne.s8','vpmaxcs.s8','vpmaxhs.s8','vpmaxcc.s8','vpmaxlo.s8','vpmaxmi.s8','vpmaxpl.s8','vpmaxvs.s8','vpmaxvc.s8','vpmaxhi.s8','vpmaxls.s8','vpmaxge.s8','vpmaxlt.s8','vpmaxgt.s8','vpmaxle.s8', + 'vpmaxeq.s16','vpmaxne.s16','vpmaxcs.s16','vpmaxhs.s16','vpmaxcc.s16','vpmaxlo.s16','vpmaxmi.s16','vpmaxpl.s16','vpmaxvs.s16','vpmaxvc.s16','vpmaxhi.s16','vpmaxls.s16','vpmaxge.s16','vpmaxlt.s16','vpmaxgt.s16','vpmaxle.s16', + 'vpmaxeq.s32','vpmaxne.s32','vpmaxcs.s32','vpmaxhs.s32','vpmaxcc.s32','vpmaxlo.s32','vpmaxmi.s32','vpmaxpl.s32','vpmaxvs.s32','vpmaxvc.s32','vpmaxhi.s32','vpmaxls.s32','vpmaxge.s32','vpmaxlt.s32','vpmaxgt.s32','vpmaxle.s32', + + 'vpmineq.s8','vpminne.s8','vpmincs.s8','vpminhs.s8','vpmincc.s8','vpminlo.s8','vpminmi.s8','vpminpl.s8','vpminvs.s8','vpminvc.s8','vpminhi.s8','vpminls.s8','vpminge.s8','vpminlt.s8','vpmingt.s8','vpminle.s8', + 'vpmineq.s16','vpminne.s16','vpmincs.s16','vpminhs.s16','vpmincc.s16','vpminlo.s16','vpminmi.s16','vpminpl.s16','vpminvs.s16','vpminvc.s16','vpminhi.s16','vpminls.s16','vpminge.s16','vpminlt.s16','vpmingt.s16','vpminle.s16', + 'vpmineq.s32','vpminne.s32','vpmincs.s32','vpminhs.s32','vpmincc.s32','vpminlo.s32','vpminmi.s32','vpminpl.s32','vpminvs.s32','vpminvc.s32','vpminhi.s32','vpminls.s32','vpminge.s32','vpminlt.s32','vpmingt.s32','vpminle.s32', + + 'vqabseq.s8','vqabsne.s8','vqabscs.s8','vqabshs.s8','vqabscc.s8','vqabslo.s8','vqabsmi.s8','vqabspl.s8','vqabsvs.s8','vqabsvc.s8','vqabshi.s8','vqabsls.s8','vqabsge.s8','vqabslt.s8','vqabsgt.s8','vqabsle.s8', + 'vqabseq.s16','vqabsne.s16','vqabscs.s16','vqabshs.s16','vqabscc.s16','vqabslo.s16','vqabsmi.s16','vqabspl.s16','vqabsvs.s16','vqabsvc.s16','vqabshi.s16','vqabsls.s16','vqabsge.s16','vqabslt.s16','vqabsgt.s16','vqabsle.s16', + 'vqabseq.s32','vqabsne.s32','vqabscs.s32','vqabshs.s32','vqabscc.s32','vqabslo.s32','vqabsmi.s32','vqabspl.s32','vqabsvs.s32','vqabsvc.s32','vqabshi.s32','vqabsls.s32','vqabsge.s32','vqabslt.s32','vqabsgt.s32','vqabsle.s32', + + 'vqaddeq.s8','vqaddne.s8','vqaddcs.s8','vqaddhs.s8','vqaddcc.s8','vqaddlo.s8','vqaddmi.s8','vqaddpl.s8','vqaddvs.s8','vqaddvc.s8','vqaddhi.s8','vqaddls.s8','vqaddge.s8','vqaddlt.s8','vqaddgt.s8','vqaddle.s8', + 'vqaddeq.s16','vqaddne.s16','vqaddcs.s16','vqaddhs.s16','vqaddcc.s16','vqaddlo.s16','vqaddmi.s16','vqaddpl.s16','vqaddvs.s16','vqaddvc.s16','vqaddhi.s16','vqaddls.s16','vqaddge.s16','vqaddlt.s16','vqaddgt.s16','vqaddle.s16', + 'vqaddeq.s32','vqaddne.s32','vqaddcs.s32','vqaddhs.s32','vqaddcc.s32','vqaddlo.s32','vqaddmi.s32','vqaddpl.s32','vqaddvs.s32','vqaddvc.s32','vqaddhi.s32','vqaddls.s32','vqaddge.s32','vqaddlt.s32','vqaddgt.s32','vqaddle.s32', + 'vqaddeq.s64','vqaddne.s64','vqaddcs.s64','vqaddhs.s64','vqaddcc.s64','vqaddlo.s64','vqaddmi.s64','vqaddpl.s64','vqaddvs.s64','vqaddvc.s64','vqaddhi.s64','vqaddls.s64','vqaddge.s64','vqaddlt.s64','vqaddgt.s64','vqaddle.s64', + + 'vqdmlaleq.s16','vqdmlalne.s16','vqdmlalcs.s16','vqdmlalhs.s16','vqdmlalcc.s16','vqdmlallo.s16','vqdmlalmi.s16','vqdmlalpl.s16','vqdmlalvs.s16','vqdmlalvc.s16','vqdmlalhi.s16','vqdmlalls.s16','vqdmlalge.s16','vqdmlallt.s16','vqdmlalgt.s16','vqdmlalle.s16', + 'vqdmlaleq.s32','vqdmlalne.s32','vqdmlalcs.s32','vqdmlalhs.s32','vqdmlalcc.s32','vqdmlallo.s32','vqdmlalmi.s32','vqdmlalpl.s32','vqdmlalvs.s32','vqdmlalvc.s32','vqdmlalhi.s32','vqdmlalls.s32','vqdmlalge.s32','vqdmlallt.s32','vqdmlalgt.s32','vqdmlalle.s32', + + 'vqdmlsleq.s16','vqdmlslne.s16','vqdmlslcs.s16','vqdmlslhs.s16','vqdmlslcc.s16','vqdmlsllo.s16','vqdmlslmi.s16','vqdmlslpl.s16','vqdmlslvs.s16','vqdmlslvc.s16','vqdmlslhi.s16','vqdmlslls.s16','vqdmlslge.s16','vqdmlsllt.s16','vqdmlslgt.s16','vqdmlslle.s16', + 'vqdmlsleq.s32','vqdmlslne.s32','vqdmlslcs.s32','vqdmlslhs.s32','vqdmlslcc.s32','vqdmlsllo.s32','vqdmlslmi.s32','vqdmlslpl.s32','vqdmlslvs.s32','vqdmlslvc.s32','vqdmlslhi.s32','vqdmlslls.s32','vqdmlslge.s32','vqdmlsllt.s32','vqdmlslgt.s32','vqdmlslle.s32', + + 'vqdmulheq.s16','vqdmulhne.s16','vqdmulhcs.s16','vqdmulhhs.s16','vqdmulhcc.s16','vqdmulhlo.s16','vqdmulhmi.s16','vqdmulhpl.s16','vqdmulhvs.s16','vqdmulhvc.s16','vqdmulhhi.s16','vqdmulhls.s16','vqdmulhge.s16','vqdmulhlt.s16','vqdmulhgt.s16','vqdmulhle.s16', + 'vqdmulheq.s32','vqdmulhne.s32','vqdmulhcs.s32','vqdmulhhs.s32','vqdmulhcc.s32','vqdmulhlo.s32','vqdmulhmi.s32','vqdmulhpl.s32','vqdmulhvs.s32','vqdmulhvc.s32','vqdmulhhi.s32','vqdmulhls.s32','vqdmulhge.s32','vqdmulhlt.s32','vqdmulhgt.s32','vqdmulhle.s32', + + 'vqdmulleq.s16','vqdmullne.s16','vqdmullcs.s16','vqdmullhs.s16','vqdmullcc.s16','vqdmulllo.s16','vqdmullmi.s16','vqdmullpl.s16','vqdmullvs.s16','vqdmullvc.s16','vqdmullhi.s16','vqdmullls.s16','vqdmullge.s16','vqdmulllt.s16','vqdmullgt.s16','vqdmullle.s16', + 'vqdmulleq.s32','vqdmullne.s32','vqdmullcs.s32','vqdmullhs.s32','vqdmullcc.s32','vqdmulllo.s32','vqdmullmi.s32','vqdmullpl.s32','vqdmullvs.s32','vqdmullvc.s32','vqdmullhi.s32','vqdmullls.s32','vqdmullge.s32','vqdmulllt.s32','vqdmullgt.s32','vqdmullle.s32', + + 'vqmovneq.s16','vqmovnne.s16','vqmovncs.s16','vqmovnhs.s16','vqmovncc.s16','vqmovnlo.s16','vqmovnmi.s16','vqmovnpl.s16','vqmovnvs.s16','vqmovnvc.s16','vqmovnhi.s16','vqmovnls.s16','vqmovnge.s16','vqmovnlt.s16','vqmovngt.s16','vqmovnle.s16', + 'vqmovneq.s32','vqmovnne.s32','vqmovncs.s32','vqmovnhs.s32','vqmovncc.s32','vqmovnlo.s32','vqmovnmi.s32','vqmovnpl.s32','vqmovnvs.s32','vqmovnvc.s32','vqmovnhi.s32','vqmovnls.s32','vqmovnge.s32','vqmovnlt.s32','vqmovngt.s32','vqmovnle.s32', + 'vqmovneq.s64','vqmovnne.s64','vqmovncs.s64','vqmovnhs.s64','vqmovncc.s64','vqmovnlo.s64','vqmovnmi.s64','vqmovnpl.s64','vqmovnvs.s64','vqmovnvc.s64','vqmovnhi.s64','vqmovnls.s64','vqmovnge.s64','vqmovnlt.s64','vqmovngt.s64','vqmovnle.s64', + + 'vqmovuneq.s16','vqmovunne.s16','vqmovuncs.s16','vqmovunhs.s16','vqmovuncc.s16','vqmovunlo.s16','vqmovunmi.s16','vqmovunpl.s16','vqmovunvs.s16','vqmovunvc.s16','vqmovunhi.s16','vqmovunls.s16','vqmovunge.s16','vqmovunlt.s16','vqmovungt.s16','vqmovunle.s16', + 'vqmovuneq.s32','vqmovunne.s32','vqmovuncs.s32','vqmovunhs.s32','vqmovuncc.s32','vqmovunlo.s32','vqmovunmi.s32','vqmovunpl.s32','vqmovunvs.s32','vqmovunvc.s32','vqmovunhi.s32','vqmovunls.s32','vqmovunge.s32','vqmovunlt.s32','vqmovungt.s32','vqmovunle.s32', + 'vqmovuneq.s64','vqmovunne.s64','vqmovuncs.s64','vqmovunhs.s64','vqmovuncc.s64','vqmovunlo.s64','vqmovunmi.s64','vqmovunpl.s64','vqmovunvs.s64','vqmovunvc.s64','vqmovunhi.s64','vqmovunls.s64','vqmovunge.s64','vqmovunlt.s64','vqmovungt.s64','vqmovunle.s64', + + 'vqnegeq.s8','vqnegne.s8','vqnegcs.s8','vqneghs.s8','vqnegcc.s8','vqneglo.s8','vqnegmi.s8','vqnegpl.s8','vqnegvs.s8','vqnegvc.s8','vqneghi.s8','vqnegls.s8','vqnegge.s8','vqneglt.s8','vqneggt.s8','vqnegle.s8', + 'vqnegeq.s16','vqnegne.s16','vqnegcs.s16','vqneghs.s16','vqnegcc.s16','vqneglo.s16','vqnegmi.s16','vqnegpl.s16','vqnegvs.s16','vqnegvc.s16','vqneghi.s16','vqnegls.s16','vqnegge.s16','vqneglt.s16','vqneggt.s16','vqnegle.s16', + 'vqnegeq.s32','vqnegne.s32','vqnegcs.s32','vqneghs.s32','vqnegcc.s32','vqneglo.s32','vqnegmi.s32','vqnegpl.s32','vqnegvs.s32','vqnegvc.s32','vqneghi.s32','vqnegls.s32','vqnegge.s32','vqneglt.s32','vqneggt.s32','vqnegle.s32', + + 'vqrdmulheq.s16','vqrdmulhne.s16','vqrdmulhcs.s16','vqrdmulhhs.s16','vqrdmulhcc.s16','vqrdmulhlo.s16','vqrdmulhmi.s16','vqrdmulhpl.s16','vqrdmulhvs.s16','vqrdmulhvc.s16','vqrdmulhhi.s16','vqrdmulhls.s16','vqrdmulhge.s16','vqrdmulhlt.s16','vqrdmulhgt.s16','vqrdmulhle.s16', + 'vqrdmulheq.s32','vqrdmulhne.s32','vqrdmulhcs.s32','vqrdmulhhs.s32','vqrdmulhcc.s32','vqrdmulhlo.s32','vqrdmulhmi.s32','vqrdmulhpl.s32','vqrdmulhvs.s32','vqrdmulhvc.s32','vqrdmulhhi.s32','vqrdmulhls.s32','vqrdmulhge.s32','vqrdmulhlt.s32','vqrdmulhgt.s32','vqrdmulhle.s32', + + 'vqrshleq.s8','vqrshlne.s8','vqrshlcs.s8','vqrshlhs.s8','vqrshlcc.s8','vqrshllo.s8','vqrshlmi.s8','vqrshlpl.s8','vqrshlvs.s8','vqrshlvc.s8','vqrshlhi.s8','vqrshlls.s8','vqrshlge.s8','vqrshllt.s8','vqrshlgt.s8','vqrshlle.s8', + 'vqrshleq.s16','vqrshlne.s16','vqrshlcs.s16','vqrshlhs.s16','vqrshlcc.s16','vqrshllo.s16','vqrshlmi.s16','vqrshlpl.s16','vqrshlvs.s16','vqrshlvc.s16','vqrshlhi.s16','vqrshlls.s16','vqrshlge.s16','vqrshllt.s16','vqrshlgt.s16','vqrshlle.s16', + 'vqrshleq.s32','vqrshlne.s32','vqrshlcs.s32','vqrshlhs.s32','vqrshlcc.s32','vqrshllo.s32','vqrshlmi.s32','vqrshlpl.s32','vqrshlvs.s32','vqrshlvc.s32','vqrshlhi.s32','vqrshlls.s32','vqrshlge.s32','vqrshllt.s32','vqrshlgt.s32','vqrshlle.s32', + 'vqrshleq.s64','vqrshlne.s64','vqrshlcs.s64','vqrshlhs.s64','vqrshlcc.s64','vqrshllo.s64','vqrshlmi.s64','vqrshlpl.s64','vqrshlvs.s64','vqrshlvc.s64','vqrshlhi.s64','vqrshlls.s64','vqrshlge.s64','vqrshllt.s64','vqrshlgt.s64','vqrshlle.s64', + + 'vqrshrneq.s16','vqrshrnne.s16','vqrshrncs.s16','vqrshrnhs.s16','vqrshrncc.s16','vqrshrnlo.s16','vqrshrnmi.s16','vqrshrnpl.s16','vqrshrnvs.s16','vqrshrnvc.s16','vqrshrnhi.s16','vqrshrnls.s16','vqrshrnge.s16','vqrshrnlt.s16','vqrshrngt.s16','vqrshrnle.s16', + 'vqrshrneq.s32','vqrshrnne.s32','vqrshrncs.s32','vqrshrnhs.s32','vqrshrncc.s32','vqrshrnlo.s32','vqrshrnmi.s32','vqrshrnpl.s32','vqrshrnvs.s32','vqrshrnvc.s32','vqrshrnhi.s32','vqrshrnls.s32','vqrshrnge.s32','vqrshrnlt.s32','vqrshrngt.s32','vqrshrnle.s32', + 'vqrshrneq.s64','vqrshrnne.s64','vqrshrncs.s64','vqrshrnhs.s64','vqrshrncc.s64','vqrshrnlo.s64','vqrshrnmi.s64','vqrshrnpl.s64','vqrshrnvs.s64','vqrshrnvc.s64','vqrshrnhi.s64','vqrshrnls.s64','vqrshrnge.s64','vqrshrnlt.s64','vqrshrngt.s64','vqrshrnle.s64', + + 'vqrshruneq.s16','vqrshrunne.s16','vqrshruncs.s16','vqrshrunhs.s16','vqrshruncc.s16','vqrshrunlo.s16','vqrshrunmi.s16','vqrshrunpl.s16','vqrshrunvs.s16','vqrshrunvc.s16','vqrshrunhi.s16','vqrshrunls.s16','vqrshrunge.s16','vqrshrunlt.s16','vqrshrungt.s16','vqrshrunle.s16', + 'vqrshruneq.s32','vqrshrunne.s32','vqrshruncs.s32','vqrshrunhs.s32','vqrshruncc.s32','vqrshrunlo.s32','vqrshrunmi.s32','vqrshrunpl.s32','vqrshrunvs.s32','vqrshrunvc.s32','vqrshrunhi.s32','vqrshrunls.s32','vqrshrunge.s32','vqrshrunlt.s32','vqrshrungt.s32','vqrshrunle.s32', + 'vqrshruneq.s64','vqrshrunne.s64','vqrshruncs.s64','vqrshrunhs.s64','vqrshruncc.s64','vqrshrunlo.s64','vqrshrunmi.s64','vqrshrunpl.s64','vqrshrunvs.s64','vqrshrunvc.s64','vqrshrunhi.s64','vqrshrunls.s64','vqrshrunge.s64','vqrshrunlt.s64','vqrshrungt.s64','vqrshrunle.s64', + + 'vqshleq.s8','vqshlne.s8','vqshlcs.s8','vqshlhs.s8','vqshlcc.s8','vqshllo.s8','vqshlmi.s8','vqshlpl.s8','vqshlvs.s8','vqshlvc.s8','vqshlhi.s8','vqshlls.s8','vqshlge.s8','vqshllt.s8','vqshlgt.s8','vqshlle.s8', + 'vqshleq.s16','vqshlne.s16','vqshlcs.s16','vqshlhs.s16','vqshlcc.s16','vqshllo.s16','vqshlmi.s16','vqshlpl.s16','vqshlvs.s16','vqshlvc.s16','vqshlhi.s16','vqshlls.s16','vqshlge.s16','vqshllt.s16','vqshlgt.s16','vqshlle.s16', + 'vqshleq.s32','vqshlne.s32','vqshlcs.s32','vqshlhs.s32','vqshlcc.s32','vqshllo.s32','vqshlmi.s32','vqshlpl.s32','vqshlvs.s32','vqshlvc.s32','vqshlhi.s32','vqshlls.s32','vqshlge.s32','vqshllt.s32','vqshlgt.s32','vqshlle.s32', + 'vqshleq.s64','vqshlne.s64','vqshlcs.s64','vqshlhs.s64','vqshlcc.s64','vqshllo.s64','vqshlmi.s64','vqshlpl.s64','vqshlvs.s64','vqshlvc.s64','vqshlhi.s64','vqshlls.s64','vqshlge.s64','vqshllt.s64','vqshlgt.s64','vqshlle.s64', + + 'vqshlueq.s8','vqshlune.s8','vqshlucs.s8','vqshluhs.s8','vqshlucc.s8','vqshlulo.s8','vqshlumi.s8','vqshlupl.s8','vqshluvs.s8','vqshluvc.s8','vqshluhi.s8','vqshluls.s8','vqshluge.s8','vqshlult.s8','vqshlugt.s8','vqshlule.s8', + 'vqshlueq.s16','vqshlune.s16','vqshlucs.s16','vqshluhs.s16','vqshlucc.s16','vqshlulo.s16','vqshlumi.s16','vqshlupl.s16','vqshluvs.s16','vqshluvc.s16','vqshluhi.s16','vqshluls.s16','vqshluge.s16','vqshlult.s16','vqshlugt.s16','vqshlule.s16', + 'vqshlueq.s32','vqshlune.s32','vqshlucs.s32','vqshluhs.s32','vqshlucc.s32','vqshlulo.s32','vqshlumi.s32','vqshlupl.s32','vqshluvs.s32','vqshluvc.s32','vqshluhi.s32','vqshluls.s32','vqshluge.s32','vqshlult.s32','vqshlugt.s32','vqshlule.s32', + 'vqshlueq.s64','vqshlune.s64','vqshlucs.s64','vqshluhs.s64','vqshlucc.s64','vqshlulo.s64','vqshlumi.s64','vqshlupl.s64','vqshluvs.s64','vqshluvc.s64','vqshluhi.s64','vqshluls.s64','vqshluge.s64','vqshlult.s64','vqshlugt.s64','vqshlule.s64', + + 'vqshrneq.s16','vqshrnne.s16','vqshrncs.s16','vqshrnhs.s16','vqshrncc.s16','vqshrnlo.s16','vqshrnmi.s16','vqshrnpl.s16','vqshrnvs.s16','vqshrnvc.s16','vqshrnhi.s16','vqshrnls.s16','vqshrnge.s16','vqshrnlt.s16','vqshrngt.s16','vqshrnle.s16', + 'vqshrneq.s32','vqshrnne.s32','vqshrncs.s32','vqshrnhs.s32','vqshrncc.s32','vqshrnlo.s32','vqshrnmi.s32','vqshrnpl.s32','vqshrnvs.s32','vqshrnvc.s32','vqshrnhi.s32','vqshrnls.s32','vqshrnge.s32','vqshrnlt.s32','vqshrngt.s32','vqshrnle.s32', + 'vqshrneq.s64','vqshrnne.s64','vqshrncs.s64','vqshrnhs.s64','vqshrncc.s64','vqshrnlo.s64','vqshrnmi.s64','vqshrnpl.s64','vqshrnvs.s64','vqshrnvc.s64','vqshrnhi.s64','vqshrnls.s64','vqshrnge.s64','vqshrnlt.s64','vqshrngt.s64','vqshrnle.s64', + + 'vqshruneq.s16','vqshrunne.s16','vqshruncs.s16','vqshrunhs.s16','vqshruncc.s16','vqshrunlo.s16','vqshrunmi.s16','vqshrunpl.s16','vqshrunvs.s16','vqshrunvc.s16','vqshrunhi.s16','vqshrunls.s16','vqshrunge.s16','vqshrunlt.s16','vqshrungt.s16','vqshrunle.s16', + 'vqshruneq.s32','vqshrunne.s32','vqshruncs.s32','vqshrunhs.s32','vqshruncc.s32','vqshrunlo.s32','vqshrunmi.s32','vqshrunpl.s32','vqshrunvs.s32','vqshrunvc.s32','vqshrunhi.s32','vqshrunls.s32','vqshrunge.s32','vqshrunlt.s32','vqshrungt.s32','vqshrunle.s32', + 'vqshruneq.s64','vqshrunne.s64','vqshruncs.s64','vqshrunhs.s64','vqshruncc.s64','vqshrunlo.s64','vqshrunmi.s64','vqshrunpl.s64','vqshrunvs.s64','vqshrunvc.s64','vqshrunhi.s64','vqshrunls.s64','vqshrunge.s64','vqshrunlt.s64','vqshrungt.s64','vqshrunle.s64', + + 'vqsubeq.s8','vqsubne.s8','vqsubcs.s8','vqsubhs.s8','vqsubcc.s8','vqsublo.s8','vqsubmi.s8','vqsubpl.s8','vqsubvs.s8','vqsubvc.s8','vqsubhi.s8','vqsubls.s8','vqsubge.s8','vqsublt.s8','vqsubgt.s8','vqsuble.s8', + 'vqsubeq.s16','vqsubne.s16','vqsubcs.s16','vqsubhs.s16','vqsubcc.s16','vqsublo.s16','vqsubmi.s16','vqsubpl.s16','vqsubvs.s16','vqsubvc.s16','vqsubhi.s16','vqsubls.s16','vqsubge.s16','vqsublt.s16','vqsubgt.s16','vqsuble.s16', + 'vqsubeq.s32','vqsubne.s32','vqsubcs.s32','vqsubhs.s32','vqsubcc.s32','vqsublo.s32','vqsubmi.s32','vqsubpl.s32','vqsubvs.s32','vqsubvc.s32','vqsubhi.s32','vqsubls.s32','vqsubge.s32','vqsublt.s32','vqsubgt.s32','vqsuble.s32', + 'vqsubeq.s64','vqsubne.s64','vqsubcs.s64','vqsubhs.s64','vqsubcc.s64','vqsublo.s64','vqsubmi.s64','vqsubpl.s64','vqsubvs.s64','vqsubvc.s64','vqsubhi.s64','vqsubls.s64','vqsubge.s64','vqsublt.s64','vqsubgt.s64','vqsuble.s64', + + 'vrhaddeq.s8','vrhaddne.s8','vrhaddcs.s8','vrhaddhs.s8','vrhaddcc.s8','vrhaddlo.s8','vrhaddmi.s8','vrhaddpl.s8','vrhaddvs.s8','vrhaddvc.s8','vrhaddhi.s8','vrhaddls.s8','vrhaddge.s8','vrhaddlt.s8','vrhaddgt.s8','vrhaddle.s8', + 'vrhaddeq.s16','vrhaddne.s16','vrhaddcs.s16','vrhaddhs.s16','vrhaddcc.s16','vrhaddlo.s16','vrhaddmi.s16','vrhaddpl.s16','vrhaddvs.s16','vrhaddvc.s16','vrhaddhi.s16','vrhaddls.s16','vrhaddge.s16','vrhaddlt.s16','vrhaddgt.s16','vrhaddle.s16', + 'vrhaddeq.s32','vrhaddne.s32','vrhaddcs.s32','vrhaddhs.s32','vrhaddcc.s32','vrhaddlo.s32','vrhaddmi.s32','vrhaddpl.s32','vrhaddvs.s32','vrhaddvc.s32','vrhaddhi.s32','vrhaddls.s32','vrhaddge.s32','vrhaddlt.s32','vrhaddgt.s32','vrhaddle.s32', + + 'vrshleq.s8','vrshlne.s8','vrshlcs.s8','vrshlhs.s8','vrshlcc.s8','vrshllo.s8','vrshlmi.s8','vrshlpl.s8','vrshlvs.s8','vrshlvc.s8','vrshlhi.s8','vrshlls.s8','vrshlge.s8','vrshllt.s8','vrshlgt.s8','vrshlle.s8', + 'vrshleq.s16','vrshlne.s16','vrshlcs.s16','vrshlhs.s16','vrshlcc.s16','vrshllo.s16','vrshlmi.s16','vrshlpl.s16','vrshlvs.s16','vrshlvc.s16','vrshlhi.s16','vrshlls.s16','vrshlge.s16','vrshllt.s16','vrshlgt.s16','vrshlle.s16', + 'vrshleq.s32','vrshlne.s32','vrshlcs.s32','vrshlhs.s32','vrshlcc.s32','vrshllo.s32','vrshlmi.s32','vrshlpl.s32','vrshlvs.s32','vrshlvc.s32','vrshlhi.s32','vrshlls.s32','vrshlge.s32','vrshllt.s32','vrshlgt.s32','vrshlle.s32', + 'vrshleq.s64','vrshlne.s64','vrshlcs.s64','vrshlhs.s64','vrshlcc.s64','vrshllo.s64','vrshlmi.s64','vrshlpl.s64','vrshlvs.s64','vrshlvc.s64','vrshlhi.s64','vrshlls.s64','vrshlge.s64','vrshllt.s64','vrshlgt.s64','vrshlle.s64', + + 'vrshreq.s8','vrshrne.s8','vrshrcs.s8','vrshrhs.s8','vrshrcc.s8','vrshrlo.s8','vrshrmi.s8','vrshrpl.s8','vrshrvs.s8','vrshrvc.s8','vrshrhi.s8','vrshrls.s8','vrshrge.s8','vrshrlt.s8','vrshrgt.s8','vrshrle.s8', + 'vrshreq.s16','vrshrne.s16','vrshrcs.s16','vrshrhs.s16','vrshrcc.s16','vrshrlo.s16','vrshrmi.s16','vrshrpl.s16','vrshrvs.s16','vrshrvc.s16','vrshrhi.s16','vrshrls.s16','vrshrge.s16','vrshrlt.s16','vrshrgt.s16','vrshrle.s16', + 'vrshreq.s32','vrshrne.s32','vrshrcs.s32','vrshrhs.s32','vrshrcc.s32','vrshrlo.s32','vrshrmi.s32','vrshrpl.s32','vrshrvs.s32','vrshrvc.s32','vrshrhi.s32','vrshrls.s32','vrshrge.s32','vrshrlt.s32','vrshrgt.s32','vrshrle.s32', + 'vrshreq.s64','vrshrne.s64','vrshrcs.s64','vrshrhs.s64','vrshrcc.s64','vrshrlo.s64','vrshrmi.s64','vrshrpl.s64','vrshrvs.s64','vrshrvc.s64','vrshrhi.s64','vrshrls.s64','vrshrge.s64','vrshrlt.s64','vrshrgt.s64','vrshrle.s64', + + 'vrsraeq.s8','vrsrane.s8','vrsracs.s8','vrsrahs.s8','vrsracc.s8','vrsralo.s8','vrsrami.s8','vrsrapl.s8','vrsravs.s8','vrsravc.s8','vrsrahi.s8','vrsrals.s8','vrsrage.s8','vrsralt.s8','vrsragt.s8','vrsrale.s8', + 'vrsraeq.s16','vrsrane.s16','vrsracs.s16','vrsrahs.s16','vrsracc.s16','vrsralo.s16','vrsrami.s16','vrsrapl.s16','vrsravs.s16','vrsravc.s16','vrsrahi.s16','vrsrals.s16','vrsrage.s16','vrsralt.s16','vrsragt.s16','vrsrale.s16', + 'vrsraeq.s32','vrsrane.s32','vrsracs.s32','vrsrahs.s32','vrsracc.s32','vrsralo.s32','vrsrami.s32','vrsrapl.s32','vrsravs.s32','vrsravc.s32','vrsrahi.s32','vrsrals.s32','vrsrage.s32','vrsralt.s32','vrsragt.s32','vrsrale.s32', + 'vrsraeq.s64','vrsrane.s64','vrsracs.s64','vrsrahs.s64','vrsracc.s64','vrsralo.s64','vrsrami.s64','vrsrapl.s64','vrsravs.s64','vrsravc.s64','vrsrahi.s64','vrsrals.s64','vrsrage.s64','vrsralt.s64','vrsragt.s64','vrsrale.s64', + + 'vshleq.s8','vshlne.s8','vshlcs.s8','vshlhs.s8','vshlcc.s8','vshllo.s8','vshlmi.s8','vshlpl.s8','vshlvs.s8','vshlvc.s8','vshlhi.s8','vshlls.s8','vshlge.s8','vshllt.s8','vshlgt.s8','vshlle.s8', + 'vshleq.s16','vshlne.s16','vshlcs.s16','vshlhs.s16','vshlcc.s16','vshllo.s16','vshlmi.s16','vshlpl.s16','vshlvs.s16','vshlvc.s16','vshlhi.s16','vshlls.s16','vshlge.s16','vshllt.s16','vshlgt.s16','vshlle.s16', + 'vshleq.s32','vshlne.s32','vshlcs.s32','vshlhs.s32','vshlcc.s32','vshllo.s32','vshlmi.s32','vshlpl.s32','vshlvs.s32','vshlvc.s32','vshlhi.s32','vshlls.s32','vshlge.s32','vshllt.s32','vshlgt.s32','vshlle.s32', + 'vshleq.s64','vshlne.s64','vshlcs.s64','vshlhs.s64','vshlcc.s64','vshllo.s64','vshlmi.s64','vshlpl.s64','vshlvs.s64','vshlvc.s64','vshlhi.s64','vshlls.s64','vshlge.s64','vshllt.s64','vshlgt.s64','vshlle.s64', + + 'vshlleq.s8','vshllne.s8','vshllcs.s8','vshllhs.s8','vshllcc.s8','vshlllo.s8','vshllmi.s8','vshllpl.s8','vshllvs.s8','vshllvc.s8','vshllhi.s8','vshllls.s8','vshllge.s8','vshlllt.s8','vshllgt.s8','vshllle.s8', + 'vshlleq.s16','vshllne.s16','vshllcs.s16','vshllhs.s16','vshllcc.s16','vshlllo.s16','vshllmi.s16','vshllpl.s16','vshllvs.s16','vshllvc.s16','vshllhi.s16','vshllls.s16','vshllge.s16','vshlllt.s16','vshllgt.s16','vshllle.s16', + 'vshlleq.s32','vshllne.s32','vshllcs.s32','vshllhs.s32','vshllcc.s32','vshlllo.s32','vshllmi.s32','vshllpl.s32','vshllvs.s32','vshllvc.s32','vshllhi.s32','vshllls.s32','vshllge.s32','vshlllt.s32','vshllgt.s32','vshllle.s32', + + 'vshreq.s8','vshrne.s8','vshrcs.s8','vshrhs.s8','vshrcc.s8','vshrlo.s8','vshrmi.s8','vshrpl.s8','vshrvs.s8','vshrvc.s8','vshrhi.s8','vshrls.s8','vshrge.s8','vshrlt.s8','vshrgt.s8','vshrle.s8', + 'vshreq.s16','vshrne.s16','vshrcs.s16','vshrhs.s16','vshrcc.s16','vshrlo.s16','vshrmi.s16','vshrpl.s16','vshrvs.s16','vshrvc.s16','vshrhi.s16','vshrls.s16','vshrge.s16','vshrlt.s16','vshrgt.s16','vshrle.s16', + 'vshreq.s32','vshrne.s32','vshrcs.s32','vshrhs.s32','vshrcc.s32','vshrlo.s32','vshrmi.s32','vshrpl.s32','vshrvs.s32','vshrvc.s32','vshrhi.s32','vshrls.s32','vshrge.s32','vshrlt.s32','vshrgt.s32','vshrle.s32', + 'vshreq.s64','vshrne.s64','vshrcs.s64','vshrhs.s64','vshrcc.s64','vshrlo.s64','vshrmi.s64','vshrpl.s64','vshrvs.s64','vshrvc.s64','vshrhi.s64','vshrls.s64','vshrge.s64','vshrlt.s64','vshrgt.s64','vshrle.s64', + + 'vsraeq.s8','vsrane.s8','vsracs.s8','vsrahs.s8','vsracc.s8','vsralo.s8','vsrami.s8','vsrapl.s8','vsravs.s8','vsravc.s8','vsrahi.s8','vsrals.s8','vsrage.s8','vsralt.s8','vsragt.s8','vsrale.s8', + 'vsraeq.s16','vsrane.s16','vsracs.s16','vsrahs.s16','vsracc.s16','vsralo.s16','vsrami.s16','vsrapl.s16','vsravs.s16','vsravc.s16','vsrahi.s16','vsrals.s16','vsrage.s16','vsralt.s16','vsragt.s16','vsrale.s16', + 'vsraeq.s32','vsrane.s32','vsracs.s32','vsrahs.s32','vsracc.s32','vsralo.s32','vsrami.s32','vsrapl.s32','vsravs.s32','vsravc.s32','vsrahi.s32','vsrals.s32','vsrage.s32','vsralt.s32','vsragt.s32','vsrale.s32', + 'vsraeq.s64','vsrane.s64','vsracs.s64','vsrahs.s64','vsracc.s64','vsralo.s64','vsrami.s64','vsrapl.s64','vsravs.s64','vsravc.s64','vsrahi.s64','vsrals.s64','vsrage.s64','vsralt.s64','vsragt.s64','vsrale.s64', + + 'vsubleq.s8','vsublne.s8','vsublcs.s8','vsublhs.s8','vsublcc.s8','vsubllo.s8','vsublmi.s8','vsublpl.s8','vsublvs.s8','vsublvc.s8','vsublhi.s8','vsublls.s8','vsublge.s8','vsubllt.s8','vsublgt.s8','vsublle.s8', + 'vsubleq.s16','vsublne.s16','vsublcs.s16','vsublhs.s16','vsublcc.s16','vsubllo.s16','vsublmi.s16','vsublpl.s16','vsublvs.s16','vsublvc.s16','vsublhi.s16','vsublls.s16','vsublge.s16','vsubllt.s16','vsublgt.s16','vsublle.s16', + 'vsubleq.s32','vsublne.s32','vsublcs.s32','vsublhs.s32','vsublcc.s32','vsubllo.s32','vsublmi.s32','vsublpl.s32','vsublvs.s32','vsublvc.s32','vsublhi.s32','vsublls.s32','vsublge.s32','vsubllt.s32','vsublgt.s32','vsublle.s32', + + 'vsubheq.s8','vsubhne.s8','vsubhcs.s8','vsubhhs.s8','vsubhcc.s8','vsubhlo.s8','vsubhmi.s8','vsubhpl.s8','vsubhvs.s8','vsubhvc.s8','vsubhhi.s8','vsubhls.s8','vsubhge.s8','vsubhlt.s8','vsubhgt.s8','vsubhle.s8', + 'vsubheq.s16','vsubhne.s16','vsubhcs.s16','vsubhhs.s16','vsubhcc.s16','vsubhlo.s16','vsubhmi.s16','vsubhpl.s16','vsubhvs.s16','vsubhvc.s16','vsubhhi.s16','vsubhls.s16','vsubhge.s16','vsubhlt.s16','vsubhgt.s16','vsubhle.s16', + 'vsubheq.s32','vsubhne.s32','vsubhcs.s32','vsubhhs.s32','vsubhcc.s32','vsubhlo.s32','vsubhmi.s32','vsubhpl.s32','vsubhvs.s32','vsubhvc.s32','vsubhhi.s32','vsubhls.s32','vsubhge.s32','vsubhlt.s32','vsubhgt.s32','vsubhle.s32' + ), + /* Conditional NEON SIMD Unsigned Integer Instructions */ + 33 => array( + 'vabaeq.u8','vabane.u8','vabacs.u8','vabahs.u8','vabacc.u8','vabalo.u8','vabami.u8','vabapl.u8','vabavs.u8','vabavc.u8','vabahi.u8','vabals.u8','vabage.u8','vabalt.u8','vabagt.u8','vabale.u8', + 'vabaeq.u16','vabane.u16','vabacs.u16','vabahs.u16','vabacc.u16','vabalo.u16','vabami.u16','vabapl.u16','vabavs.u16','vabavc.u16','vabahi.u16','vabals.u16','vabage.u16','vabalt.u16','vabagt.u16','vabale.u16', + 'vabaeq.u32','vabane.u32','vabacs.u32','vabahs.u32','vabacc.u32','vabalo.u32','vabami.u32','vabapl.u32','vabavs.u32','vabavc.u32','vabahi.u32','vabals.u32','vabage.u32','vabalt.u32','vabagt.u32','vabale.u32', + + 'vabaleq.u8','vabalne.u8','vabalcs.u8','vabalhs.u8','vabalcc.u8','vaballo.u8','vabalmi.u8','vabalpl.u8','vabalvs.u8','vabalvc.u8','vabalhi.u8','vaballs.u8','vabalge.u8','vaballt.u8','vabalgt.u8','vaballe.u8', + 'vabaleq.u16','vabalne.u16','vabalcs.u16','vabalhs.u16','vabalcc.u16','vaballo.u16','vabalmi.u16','vabalpl.u16','vabalvs.u16','vabalvc.u16','vabalhi.u16','vaballs.u16','vabalge.u16','vaballt.u16','vabalgt.u16','vaballe.u16', + 'vabaleq.u32','vabalne.u32','vabalcs.u32','vabalhs.u32','vabalcc.u32','vaballo.u32','vabalmi.u32','vabalpl.u32','vabalvs.u32','vabalvc.u32','vabalhi.u32','vaballs.u32','vabalge.u32','vaballt.u32','vabalgt.u32','vaballe.u32', + + 'vabdeq.u8','vabdne.u8','vabdcs.u8','vabdhs.u8','vabdcc.u8','vabdlo.u8','vabdmi.u8','vabdpl.u8','vabdvs.u8','vabdvc.u8','vabdhi.u8','vabdls.u8','vabdge.u8','vabdlt.u8','vabdgt.u8','vabdle.u8', + 'vabdeq.u16','vabdne.u16','vabdcs.u16','vabdhs.u16','vabdcc.u16','vabdlo.u16','vabdmi.u16','vabdpl.u16','vabdvs.u16','vabdvc.u16','vabdhi.u16','vabdls.u16','vabdge.u16','vabdlt.u16','vabdgt.u16','vabdle.u16', + 'vabdeq.u32','vabdne.u32','vabdcs.u32','vabdhs.u32','vabdcc.u32','vabdlo.u32','vabdmi.u32','vabdpl.u32','vabdvs.u32','vabdvc.u32','vabdhi.u32','vabdls.u32','vabdge.u32','vabdlt.u32','vabdgt.u32','vabdle.u32', + + 'vaddleq.u8','vaddlne.u8','vaddlcs.u8','vaddlhs.u8','vaddlcc.u8','vaddllo.u8','vaddlmi.u8','vaddlpl.u8','vaddlvs.u8','vaddlvc.u8','vaddlhi.u8','vaddlls.u8','vaddlge.u8','vaddllt.u8','vaddlgt.u8','vaddlle.u8', + 'vaddleq.u16','vaddlne.u16','vaddlcs.u16','vaddlhs.u16','vaddlcc.u16','vaddllo.u16','vaddlmi.u16','vaddlpl.u16','vaddlvs.u16','vaddlvc.u16','vaddlhi.u16','vaddlls.u16','vaddlge.u16','vaddllt.u16','vaddlgt.u16','vaddlle.u16', + 'vaddleq.u32','vaddlne.u32','vaddlcs.u32','vaddlhs.u32','vaddlcc.u32','vaddllo.u32','vaddlmi.u32','vaddlpl.u32','vaddlvs.u32','vaddlvc.u32','vaddlhi.u32','vaddlls.u32','vaddlge.u32','vaddllt.u32','vaddlgt.u32','vaddlle.u32', + + 'vsubleq.u8','vsublne.u8','vsublcs.u8','vsublhs.u8','vsublcc.u8','vsubllo.u8','vsublmi.u8','vsublpl.u8','vsublvs.u8','vsublvc.u8','vsublhi.u8','vsublls.u8','vsublge.u8','vsubllt.u8','vsublgt.u8','vsublle.u8', + 'vsubleq.u16','vsublne.u16','vsublcs.u16','vsublhs.u16','vsublcc.u16','vsubllo.u16','vsublmi.u16','vsublpl.u16','vsublvs.u16','vsublvc.u16','vsublhi.u16','vsublls.u16','vsublge.u16','vsubllt.u16','vsublgt.u16','vsublle.u16', + 'vsubleq.u32','vsublne.u32','vsublcs.u32','vsublhs.u32','vsublcc.u32','vsubllo.u32','vsublmi.u32','vsublpl.u32','vsublvs.u32','vsublvc.u32','vsublhi.u32','vsublls.u32','vsublge.u32','vsubllt.u32','vsublgt.u32','vsublle.u32', + + 'vaddweq.u8','vaddwne.u8','vaddwcs.u8','vaddwhs.u8','vaddwcc.u8','vaddwlo.u8','vaddwmi.u8','vaddwpl.u8','vaddwvs.u8','vaddwvc.u8','vaddwhi.u8','vaddwls.u8','vaddwge.u8','vaddwlt.u8','vaddwgt.u8','vaddwle.u8', + 'vaddweq.u16','vaddwne.u16','vaddwcs.u16','vaddwhs.u16','vaddwcc.u16','vaddwlo.u16','vaddwmi.u16','vaddwpl.u16','vaddwvs.u16','vaddwvc.u16','vaddwhi.u16','vaddwls.u16','vaddwge.u16','vaddwlt.u16','vaddwgt.u16','vaddwle.u16', + 'vaddweq.u32','vaddwne.u32','vaddwcs.u32','vaddwhs.u32','vaddwcc.u32','vaddwlo.u32','vaddwmi.u32','vaddwpl.u32','vaddwvs.u32','vaddwvc.u32','vaddwhi.u32','vaddwls.u32','vaddwge.u32','vaddwlt.u32','vaddwgt.u32','vaddwle.u32', + + 'vsubheq.u8','vsubhne.u8','vsubhcs.u8','vsubhhs.u8','vsubhcc.u8','vsubhlo.u8','vsubhmi.u8','vsubhpl.u8','vsubhvs.u8','vsubhvc.u8','vsubhhi.u8','vsubhls.u8','vsubhge.u8','vsubhlt.u8','vsubhgt.u8','vsubhle.u8', + 'vsubheq.u16','vsubhne.u16','vsubhcs.u16','vsubhhs.u16','vsubhcc.u16','vsubhlo.u16','vsubhmi.u16','vsubhpl.u16','vsubhvs.u16','vsubhvc.u16','vsubhhi.u16','vsubhls.u16','vsubhge.u16','vsubhlt.u16','vsubhgt.u16','vsubhle.u16', + 'vsubheq.u32','vsubhne.u32','vsubhcs.u32','vsubhhs.u32','vsubhcc.u32','vsubhlo.u32','vsubhmi.u32','vsubhpl.u32','vsubhvs.u32','vsubhvc.u32','vsubhhi.u32','vsubhls.u32','vsubhge.u32','vsubhlt.u32','vsubhgt.u32','vsubhle.u32', + + 'vhaddeq.u8','vhaddne.u8','vhaddcs.u8','vhaddhs.u8','vhaddcc.u8','vhaddlo.u8','vhaddmi.u8','vhaddpl.u8','vhaddvs.u8','vhaddvc.u8','vhaddhi.u8','vhaddls.u8','vhaddge.u8','vhaddlt.u8','vhaddgt.u8','vhaddle.u8', + 'vhaddeq.u16','vhaddne.u16','vhaddcs.u16','vhaddhs.u16','vhaddcc.u16','vhaddlo.u16','vhaddmi.u16','vhaddpl.u16','vhaddvs.u16','vhaddvc.u16','vhaddhi.u16','vhaddls.u16','vhaddge.u16','vhaddlt.u16','vhaddgt.u16','vhaddle.u16', + 'vhaddeq.u32','vhaddne.u32','vhaddcs.u32','vhaddhs.u32','vhaddcc.u32','vhaddlo.u32','vhaddmi.u32','vhaddpl.u32','vhaddvs.u32','vhaddvc.u32','vhaddhi.u32','vhaddls.u32','vhaddge.u32','vhaddlt.u32','vhaddgt.u32','vhaddle.u32', + + 'vhsubeq.u8','vhsubne.u8','vhsubcs.u8','vhsubhs.u8','vhsubcc.u8','vhsublo.u8','vhsubmi.u8','vhsubpl.u8','vhsubvs.u8','vhsubvc.u8','vhsubhi.u8','vhsubls.u8','vhsubge.u8','vhsublt.u8','vhsubgt.u8','vhsuble.u8', + 'vhsubeq.u16','vhsubne.u16','vhsubcs.u16','vhsubhs.u16','vhsubcc.u16','vhsublo.u16','vhsubmi.u16','vhsubpl.u16','vhsubvs.u16','vhsubvc.u16','vhsubhi.u16','vhsubls.u16','vhsubge.u16','vhsublt.u16','vhsubgt.u16','vhsuble.u16', + 'vhsubeq.u32','vhsubne.u32','vhsubcs.u32','vhsubhs.u32','vhsubcc.u32','vhsublo.u32','vhsubmi.u32','vhsubpl.u32','vhsubvs.u32','vhsubvc.u32','vhsubhi.u32','vhsubls.u32','vhsubge.u32','vhsublt.u32','vhsubgt.u32','vhsuble.u32', + + 'vpadaleq.u8','vpadalne.u8','vpadalcs.u8','vpadalhs.u8','vpadalcc.u8','vpadallo.u8','vpadalmi.u8','vpadalpl.u8','vpadalvs.u8','vpadalvc.u8','vpadalhi.u8','vpadalls.u8','vpadalge.u8','vpadallt.u8','vpadalgt.u8','vpadalle.u8', + 'vpadaleq.u16','vpadalne.u16','vpadalcs.u16','vpadalhs.u16','vpadalcc.u16','vpadallo.u16','vpadalmi.u16','vpadalpl.u16','vpadalvs.u16','vpadalvc.u16','vpadalhi.u16','vpadalls.u16','vpadalge.u16','vpadallt.u16','vpadalgt.u16','vpadalle.u16', + 'vpadaleq.u32','vpadalne.u32','vpadalcs.u32','vpadalhs.u32','vpadalcc.u32','vpadallo.u32','vpadalmi.u32','vpadalpl.u32','vpadalvs.u32','vpadalvc.u32','vpadalhi.u32','vpadalls.u32','vpadalge.u32','vpadallt.u32','vpadalgt.u32','vpadalle.u32', + + 'vpaddleq.u8','vpaddlne.u8','vpaddlcs.u8','vpaddlhs.u8','vpaddlcc.u8','vpaddllo.u8','vpaddlmi.u8','vpaddlpl.u8','vpaddlvs.u8','vpaddlvc.u8','vpaddlhi.u8','vpaddlls.u8','vpaddlge.u8','vpaddllt.u8','vpaddlgt.u8','vpaddlle.u8', + 'vpaddleq.u16','vpaddlne.u16','vpaddlcs.u16','vpaddlhs.u16','vpaddlcc.u16','vpaddllo.u16','vpaddlmi.u16','vpaddlpl.u16','vpaddlvs.u16','vpaddlvc.u16','vpaddlhi.u16','vpaddlls.u16','vpaddlge.u16','vpaddllt.u16','vpaddlgt.u16','vpaddlle.u16', + 'vpaddleq.u32','vpaddlne.u32','vpaddlcs.u32','vpaddlhs.u32','vpaddlcc.u32','vpaddllo.u32','vpaddlmi.u32','vpaddlpl.u32','vpaddlvs.u32','vpaddlvc.u32','vpaddlhi.u32','vpaddlls.u32','vpaddlge.u32','vpaddllt.u32','vpaddlgt.u32','vpaddlle.u32', + + 'vcgeeq.u8','vcgene.u8','vcgecs.u8','vcgehs.u8','vcgecc.u8','vcgelo.u8','vcgemi.u8','vcgepl.u8','vcgevs.u8','vcgevc.u8','vcgehi.u8','vcgels.u8','vcgege.u8','vcgelt.u8','vcgegt.u8','vcgele.u8', + 'vcgeeq.u16','vcgene.u16','vcgecs.u16','vcgehs.u16','vcgecc.u16','vcgelo.u16','vcgemi.u16','vcgepl.u16','vcgevs.u16','vcgevc.u16','vcgehi.u16','vcgels.u16','vcgege.u16','vcgelt.u16','vcgegt.u16','vcgele.u16', + 'vcgeeq.u32','vcgene.u32','vcgecs.u32','vcgehs.u32','vcgecc.u32','vcgelo.u32','vcgemi.u32','vcgepl.u32','vcgevs.u32','vcgevc.u32','vcgehi.u32','vcgels.u32','vcgege.u32','vcgelt.u32','vcgegt.u32','vcgele.u32', + + 'vcleeq.u8','vclene.u8','vclecs.u8','vclehs.u8','vclecc.u8','vclelo.u8','vclemi.u8','vclepl.u8','vclevs.u8','vclevc.u8','vclehi.u8','vclels.u8','vclege.u8','vclelt.u8','vclegt.u8','vclele.u8', + 'vcleeq.u16','vclene.u16','vclecs.u16','vclehs.u16','vclecc.u16','vclelo.u16','vclemi.u16','vclepl.u16','vclevs.u16','vclevc.u16','vclehi.u16','vclels.u16','vclege.u16','vclelt.u16','vclegt.u16','vclele.u16', + 'vcleeq.u32','vclene.u32','vclecs.u32','vclehs.u32','vclecc.u32','vclelo.u32','vclemi.u32','vclepl.u32','vclevs.u32','vclevc.u32','vclehi.u32','vclels.u32','vclege.u32','vclelt.u32','vclegt.u32','vclele.u32', + + 'vcgteq.u8','vcgtne.u8','vcgtcs.u8','vcgths.u8','vcgtcc.u8','vcgtlo.u8','vcgtmi.u8','vcgtpl.u8','vcgtvs.u8','vcgtvc.u8','vcgthi.u8','vcgtls.u8','vcgtge.u8','vcgtlt.u8','vcgtgt.u8','vcgtle.u8', + 'vcgteq.u16','vcgtne.u16','vcgtcs.u16','vcgths.u16','vcgtcc.u16','vcgtlo.u16','vcgtmi.u16','vcgtpl.u16','vcgtvs.u16','vcgtvc.u16','vcgthi.u16','vcgtls.u16','vcgtge.u16','vcgtlt.u16','vcgtgt.u16','vcgtle.u16', + 'vcgteq.u32','vcgtne.u32','vcgtcs.u32','vcgths.u32','vcgtcc.u32','vcgtlo.u32','vcgtmi.u32','vcgtpl.u32','vcgtvs.u32','vcgtvc.u32','vcgthi.u32','vcgtls.u32','vcgtge.u32','vcgtlt.u32','vcgtgt.u32','vcgtle.u32', + + 'vclteq.u8','vcltne.u8','vcltcs.u8','vclths.u8','vcltcc.u8','vcltlo.u8','vcltmi.u8','vcltpl.u8','vcltvs.u8','vcltvc.u8','vclthi.u8','vcltls.u8','vcltge.u8','vcltlt.u8','vcltgt.u8','vcltle.u8', + 'vclteq.u16','vcltne.u16','vcltcs.u16','vclths.u16','vcltcc.u16','vcltlo.u16','vcltmi.u16','vcltpl.u16','vcltvs.u16','vcltvc.u16','vclthi.u16','vcltls.u16','vcltge.u16','vcltlt.u16','vcltgt.u16','vcltle.u16', + 'vclteq.u32','vcltne.u32','vcltcs.u32','vclths.u32','vcltcc.u32','vcltlo.u32','vcltmi.u32','vcltpl.u32','vcltvs.u32','vcltvc.u32','vclthi.u32','vcltls.u32','vcltge.u32','vcltlt.u32','vcltgt.u32','vcltle.u32', + + 'vmaxeq.u8','vmaxne.u8','vmaxcs.u8','vmaxhs.u8','vmaxcc.u8','vmaxlo.u8','vmaxmi.u8','vmaxpl.u8','vmaxvs.u8','vmaxvc.u8','vmaxhi.u8','vmaxls.u8','vmaxge.u8','vmaxlt.u8','vmaxgt.u8','vmaxle.u8', + 'vmaxeq.u16','vmaxne.u16','vmaxcs.u16','vmaxhs.u16','vmaxcc.u16','vmaxlo.u16','vmaxmi.u16','vmaxpl.u16','vmaxvs.u16','vmaxvc.u16','vmaxhi.u16','vmaxls.u16','vmaxge.u16','vmaxlt.u16','vmaxgt.u16','vmaxle.u16', + 'vmaxeq.u32','vmaxne.u32','vmaxcs.u32','vmaxhs.u32','vmaxcc.u32','vmaxlo.u32','vmaxmi.u32','vmaxpl.u32','vmaxvs.u32','vmaxvc.u32','vmaxhi.u32','vmaxls.u32','vmaxge.u32','vmaxlt.u32','vmaxgt.u32','vmaxle.u32', + + 'vmineq.u8','vminne.u8','vmincs.u8','vminhs.u8','vmincc.u8','vminlo.u8','vminmi.u8','vminpl.u8','vminvs.u8','vminvc.u8','vminhi.u8','vminls.u8','vminge.u8','vminlt.u8','vmingt.u8','vminle.u8', + 'vmineq.u16','vminne.u16','vmincs.u16','vminhs.u16','vmincc.u16','vminlo.u16','vminmi.u16','vminpl.u16','vminvs.u16','vminvc.u16','vminhi.u16','vminls.u16','vminge.u16','vminlt.u16','vmingt.u16','vminle.u16', + 'vmineq.u32','vminne.u32','vmincs.u32','vminhs.u32','vmincc.u32','vminlo.u32','vminmi.u32','vminpl.u32','vminvs.u32','vminvc.u32','vminhi.u32','vminls.u32','vminge.u32','vminlt.u32','vmingt.u32','vminle.u32', + + 'vmlaleq.u8','vmlalne.u8','vmlalcs.u8','vmlalhs.u8','vmlalcc.u8','vmlallo.u8','vmlalmi.u8','vmlalpl.u8','vmlalvs.u8','vmlalvc.u8','vmlalhi.u8','vmlalls.u8','vmlalge.u8','vmlallt.u8','vmlalgt.u8','vmlalle.u8', + 'vmlaleq.u16','vmlalne.u16','vmlalcs.u16','vmlalhs.u16','vmlalcc.u16','vmlallo.u16','vmlalmi.u16','vmlalpl.u16','vmlalvs.u16','vmlalvc.u16','vmlalhi.u16','vmlalls.u16','vmlalge.u16','vmlallt.u16','vmlalgt.u16','vmlalle.u16', + 'vmlaleq.u32','vmlalne.u32','vmlalcs.u32','vmlalhs.u32','vmlalcc.u32','vmlallo.u32','vmlalmi.u32','vmlalpl.u32','vmlalvs.u32','vmlalvc.u32','vmlalhi.u32','vmlalls.u32','vmlalge.u32','vmlallt.u32','vmlalgt.u32','vmlalle.u32', + + 'vmlsleq.u8','vmlslne.u8','vmlslcs.u8','vmlslhs.u8','vmlslcc.u8','vmlsllo.u8','vmlslmi.u8','vmlslpl.u8','vmlslvs.u8','vmlslvc.u8','vmlslhi.u8','vmlslls.u8','vmlslge.u8','vmlsllt.u8','vmlslgt.u8','vmlslle.u8', + 'vmlsleq.u16','vmlslne.u16','vmlslcs.u16','vmlslhs.u16','vmlslcc.u16','vmlsllo.u16','vmlslmi.u16','vmlslpl.u16','vmlslvs.u16','vmlslvc.u16','vmlslhi.u16','vmlslls.u16','vmlslge.u16','vmlsllt.u16','vmlslgt.u16','vmlslle.u16', + 'vmlsleq.u32','vmlslne.u32','vmlslcs.u32','vmlslhs.u32','vmlslcc.u32','vmlsllo.u32','vmlslmi.u32','vmlslpl.u32','vmlslvs.u32','vmlslvc.u32','vmlslhi.u32','vmlslls.u32','vmlslge.u32','vmlsllt.u32','vmlslgt.u32','vmlslle.u32', + + 'vmulleq.u8','vmullne.u8','vmullcs.u8','vmullhs.u8','vmullcc.u8','vmulllo.u8','vmullmi.u8','vmullpl.u8','vmullvs.u8','vmullvc.u8','vmullhi.u8','vmullls.u8','vmullge.u8','vmulllt.u8','vmullgt.u8','vmullle.u8', + 'vmulleq.u16','vmullne.u16','vmullcs.u16','vmullhs.u16','vmullcc.u16','vmulllo.u16','vmullmi.u16','vmullpl.u16','vmullvs.u16','vmullvc.u16','vmullhi.u16','vmullls.u16','vmullge.u16','vmulllt.u16','vmullgt.u16','vmullle.u16', + 'vmulleq.u32','vmullne.u32','vmullcs.u32','vmullhs.u32','vmullcc.u32','vmulllo.u32','vmullmi.u32','vmullpl.u32','vmullvs.u32','vmullvc.u32','vmullhi.u32','vmullls.u32','vmullge.u32','vmulllt.u32','vmullgt.u32','vmullle.u32', + + 'vmovleq.u8','vmovlne.u8','vmovlcs.u8','vmovlhs.u8','vmovlcc.u8','vmovllo.u8','vmovlmi.u8','vmovlpl.u8','vmovlvs.u8','vmovlvc.u8','vmovlhi.u8','vmovlls.u8','vmovlge.u8','vmovllt.u8','vmovlgt.u8','vmovlle.u8', + 'vmovleq.u16','vmovlne.u16','vmovlcs.u16','vmovlhs.u16','vmovlcc.u16','vmovllo.u16','vmovlmi.u16','vmovlpl.u16','vmovlvs.u16','vmovlvc.u16','vmovlhi.u16','vmovlls.u16','vmovlge.u16','vmovllt.u16','vmovlgt.u16','vmovlle.u16', + 'vmovleq.u32','vmovlne.u32','vmovlcs.u32','vmovlhs.u32','vmovlcc.u32','vmovllo.u32','vmovlmi.u32','vmovlpl.u32','vmovlvs.u32','vmovlvc.u32','vmovlhi.u32','vmovlls.u32','vmovlge.u32','vmovllt.u32','vmovlgt.u32','vmovlle.u32', + + 'vshleq.u8','vshlne.u8','vshlcs.u8','vshlhs.u8','vshlcc.u8','vshllo.u8','vshlmi.u8','vshlpl.u8','vshlvs.u8','vshlvc.u8','vshlhi.u8','vshlls.u8','vshlge.u8','vshllt.u8','vshlgt.u8','vshlle.u8', + 'vshleq.u16','vshlne.u16','vshlcs.u16','vshlhs.u16','vshlcc.u16','vshllo.u16','vshlmi.u16','vshlpl.u16','vshlvs.u16','vshlvc.u16','vshlhi.u16','vshlls.u16','vshlge.u16','vshllt.u16','vshlgt.u16','vshlle.u16', + 'vshleq.u32','vshlne.u32','vshlcs.u32','vshlhs.u32','vshlcc.u32','vshllo.u32','vshlmi.u32','vshlpl.u32','vshlvs.u32','vshlvc.u32','vshlhi.u32','vshlls.u32','vshlge.u32','vshllt.u32','vshlgt.u32','vshlle.u32', + 'vshleq.u64','vshlne.u64','vshlcs.u64','vshlhs.u64','vshlcc.u64','vshllo.u64','vshlmi.u64','vshlpl.u64','vshlvs.u64','vshlvc.u64','vshlhi.u64','vshlls.u64','vshlge.u64','vshllt.u64','vshlgt.u64','vshlle.u64', + + 'vshlleq.u8','vshllne.u8','vshllcs.u8','vshllhs.u8','vshllcc.u8','vshlllo.u8','vshllmi.u8','vshllpl.u8','vshllvs.u8','vshllvc.u8','vshllhi.u8','vshllls.u8','vshllge.u8','vshlllt.u8','vshllgt.u8','vshllle.u8', + 'vshlleq.u16','vshllne.u16','vshllcs.u16','vshllhs.u16','vshllcc.u16','vshlllo.u16','vshllmi.u16','vshllpl.u16','vshllvs.u16','vshllvc.u16','vshllhi.u16','vshllls.u16','vshllge.u16','vshlllt.u16','vshllgt.u16','vshllle.u16', + 'vshlleq.u32','vshllne.u32','vshllcs.u32','vshllhs.u32','vshllcc.u32','vshlllo.u32','vshllmi.u32','vshllpl.u32','vshllvs.u32','vshllvc.u32','vshllhi.u32','vshllls.u32','vshllge.u32','vshlllt.u32','vshllgt.u32','vshllle.u32', + + 'vshreq.u8','vshrne.u8','vshrcs.u8','vshrhs.u8','vshrcc.u8','vshrlo.u8','vshrmi.u8','vshrpl.u8','vshrvs.u8','vshrvc.u8','vshrhi.u8','vshrls.u8','vshrge.u8','vshrlt.u8','vshrgt.u8','vshrle.u8', + 'vshreq.u16','vshrne.u16','vshrcs.u16','vshrhs.u16','vshrcc.u16','vshrlo.u16','vshrmi.u16','vshrpl.u16','vshrvs.u16','vshrvc.u16','vshrhi.u16','vshrls.u16','vshrge.u16','vshrlt.u16','vshrgt.u16','vshrle.u16', + 'vshreq.u32','vshrne.u32','vshrcs.u32','vshrhs.u32','vshrcc.u32','vshrlo.u32','vshrmi.u32','vshrpl.u32','vshrvs.u32','vshrvc.u32','vshrhi.u32','vshrls.u32','vshrge.u32','vshrlt.u32','vshrgt.u32','vshrle.u32', + 'vshreq.u64','vshrne.u64','vshrcs.u64','vshrhs.u64','vshrcc.u64','vshrlo.u64','vshrmi.u64','vshrpl.u64','vshrvs.u64','vshrvc.u64','vshrhi.u64','vshrls.u64','vshrge.u64','vshrlt.u64','vshrgt.u64','vshrle.u64', + + 'vsraeq.u8','vsrane.u8','vsracs.u8','vsrahs.u8','vsracc.u8','vsralo.u8','vsrami.u8','vsrapl.u8','vsravs.u8','vsravc.u8','vsrahi.u8','vsrals.u8','vsrage.u8','vsralt.u8','vsragt.u8','vsrale.u8', + 'vsraeq.u16','vsrane.u16','vsracs.u16','vsrahs.u16','vsracc.u16','vsralo.u16','vsrami.u16','vsrapl.u16','vsravs.u16','vsravc.u16','vsrahi.u16','vsrals.u16','vsrage.u16','vsralt.u16','vsragt.u16','vsrale.u16', + 'vsraeq.u32','vsrane.u32','vsracs.u32','vsrahs.u32','vsracc.u32','vsralo.u32','vsrami.u32','vsrapl.u32','vsravs.u32','vsravc.u32','vsrahi.u32','vsrals.u32','vsrage.u32','vsralt.u32','vsragt.u32','vsrale.u32', + 'vsraeq.u64','vsrane.u64','vsracs.u64','vsrahs.u64','vsracc.u64','vsralo.u64','vsrami.u64','vsrapl.u64','vsravs.u64','vsravc.u64','vsrahi.u64','vsrals.u64','vsrage.u64','vsralt.u64','vsragt.u64','vsrale.u64', + + 'vpmaxeq.u8','vpmaxne.u8','vpmaxcs.u8','vpmaxhs.u8','vpmaxcc.u8','vpmaxlo.u8','vpmaxmi.u8','vpmaxpl.u8','vpmaxvs.u8','vpmaxvc.u8','vpmaxhi.u8','vpmaxls.u8','vpmaxge.u8','vpmaxlt.u8','vpmaxgt.u8','vpmaxle.u8', + 'vpmaxeq.u16','vpmaxne.u16','vpmaxcs.u16','vpmaxhs.u16','vpmaxcc.u16','vpmaxlo.u16','vpmaxmi.u16','vpmaxpl.u16','vpmaxvs.u16','vpmaxvc.u16','vpmaxhi.u16','vpmaxls.u16','vpmaxge.u16','vpmaxlt.u16','vpmaxgt.u16','vpmaxle.u16', + 'vpmaxeq.u32','vpmaxne.u32','vpmaxcs.u32','vpmaxhs.u32','vpmaxcc.u32','vpmaxlo.u32','vpmaxmi.u32','vpmaxpl.u32','vpmaxvs.u32','vpmaxvc.u32','vpmaxhi.u32','vpmaxls.u32','vpmaxge.u32','vpmaxlt.u32','vpmaxgt.u32','vpmaxle.u32', + + 'vpmineq.u8','vpminne.u8','vpmincs.u8','vpminhs.u8','vpmincc.u8','vpminlo.u8','vpminmi.u8','vpminpl.u8','vpminvs.u8','vpminvc.u8','vpminhi.u8','vpminls.u8','vpminge.u8','vpminlt.u8','vpmingt.u8','vpminle.u8', + 'vpmineq.u16','vpminne.u16','vpmincs.u16','vpminhs.u16','vpmincc.u16','vpminlo.u16','vpminmi.u16','vpminpl.u16','vpminvs.u16','vpminvc.u16','vpminhi.u16','vpminls.u16','vpminge.u16','vpminlt.u16','vpmingt.u16','vpminle.u16', + 'vpmineq.u32','vpminne.u32','vpmincs.u32','vpminhs.u32','vpmincc.u32','vpminlo.u32','vpminmi.u32','vpminpl.u32','vpminvs.u32','vpminvc.u32','vpminhi.u32','vpminls.u32','vpminge.u32','vpminlt.u32','vpmingt.u32','vpminle.u32', + + 'vqaddeq.u8','vqaddne.u8','vqaddcs.u8','vqaddhs.u8','vqaddcc.u8','vqaddlo.u8','vqaddmi.u8','vqaddpl.u8','vqaddvs.u8','vqaddvc.u8','vqaddhi.u8','vqaddls.u8','vqaddge.u8','vqaddlt.u8','vqaddgt.u8','vqaddle.u8', + 'vqaddeq.u16','vqaddne.u16','vqaddcs.u16','vqaddhs.u16','vqaddcc.u16','vqaddlo.u16','vqaddmi.u16','vqaddpl.u16','vqaddvs.u16','vqaddvc.u16','vqaddhi.u16','vqaddls.u16','vqaddge.u16','vqaddlt.u16','vqaddgt.u16','vqaddle.u16', + 'vqaddeq.u32','vqaddne.u32','vqaddcs.u32','vqaddhs.u32','vqaddcc.u32','vqaddlo.u32','vqaddmi.u32','vqaddpl.u32','vqaddvs.u32','vqaddvc.u32','vqaddhi.u32','vqaddls.u32','vqaddge.u32','vqaddlt.u32','vqaddgt.u32','vqaddle.u32', + 'vqaddeq.u64','vqaddne.u64','vqaddcs.u64','vqaddhs.u64','vqaddcc.u64','vqaddlo.u64','vqaddmi.u64','vqaddpl.u64','vqaddvs.u64','vqaddvc.u64','vqaddhi.u64','vqaddls.u64','vqaddge.u64','vqaddlt.u64','vqaddgt.u64','vqaddle.u64', + + 'vqsubeq.u8','vqsubne.u8','vqsubcs.u8','vqsubhs.u8','vqsubcc.u8','vqsublo.u8','vqsubmi.u8','vqsubpl.u8','vqsubvs.u8','vqsubvc.u8','vqsubhi.u8','vqsubls.u8','vqsubge.u8','vqsublt.u8','vqsubgt.u8','vqsuble.u8', + 'vqsubeq.u16','vqsubne.u16','vqsubcs.u16','vqsubhs.u16','vqsubcc.u16','vqsublo.u16','vqsubmi.u16','vqsubpl.u16','vqsubvs.u16','vqsubvc.u16','vqsubhi.u16','vqsubls.u16','vqsubge.u16','vqsublt.u16','vqsubgt.u16','vqsuble.u16', + 'vqsubeq.u32','vqsubne.u32','vqsubcs.u32','vqsubhs.u32','vqsubcc.u32','vqsublo.u32','vqsubmi.u32','vqsubpl.u32','vqsubvs.u32','vqsubvc.u32','vqsubhi.u32','vqsubls.u32','vqsubge.u32','vqsublt.u32','vqsubgt.u32','vqsuble.u32', + 'vqsubeq.u64','vqsubne.u64','vqsubcs.u64','vqsubhs.u64','vqsubcc.u64','vqsublo.u64','vqsubmi.u64','vqsubpl.u64','vqsubvs.u64','vqsubvc.u64','vqsubhi.u64','vqsubls.u64','vqsubge.u64','vqsublt.u64','vqsubgt.u64','vqsuble.u64', + + 'vqmovneq.u16','vqmovnne.u16','vqmovncs.u16','vqmovnhs.u16','vqmovncc.u16','vqmovnlo.u16','vqmovnmi.u16','vqmovnpl.u16','vqmovnvs.u16','vqmovnvc.u16','vqmovnhi.u16','vqmovnls.u16','vqmovnge.u16','vqmovnlt.u16','vqmovngt.u16','vqmovnle.u16', + 'vqmovneq.u32','vqmovnne.u32','vqmovncs.u32','vqmovnhs.u32','vqmovncc.u32','vqmovnlo.u32','vqmovnmi.u32','vqmovnpl.u32','vqmovnvs.u32','vqmovnvc.u32','vqmovnhi.u32','vqmovnls.u32','vqmovnge.u32','vqmovnlt.u32','vqmovngt.u32','vqmovnle.u32', + 'vqmovneq.u64','vqmovnne.u64','vqmovncs.u64','vqmovnhs.u64','vqmovncc.u64','vqmovnlo.u64','vqmovnmi.u64','vqmovnpl.u64','vqmovnvs.u64','vqmovnvc.u64','vqmovnhi.u64','vqmovnls.u64','vqmovnge.u64','vqmovnlt.u64','vqmovngt.u64','vqmovnle.u64', + + 'vqshleq.u8','vqshlne.u8','vqshlcs.u8','vqshlhs.u8','vqshlcc.u8','vqshllo.u8','vqshlmi.u8','vqshlpl.u8','vqshlvs.u8','vqshlvc.u8','vqshlhi.u8','vqshlls.u8','vqshlge.u8','vqshllt.u8','vqshlgt.u8','vqshlle.u8', + 'vqshleq.u16','vqshlne.u16','vqshlcs.u16','vqshlhs.u16','vqshlcc.u16','vqshllo.u16','vqshlmi.u16','vqshlpl.u16','vqshlvs.u16','vqshlvc.u16','vqshlhi.u16','vqshlls.u16','vqshlge.u16','vqshllt.u16','vqshlgt.u16','vqshlle.u16', + 'vqshleq.u32','vqshlne.u32','vqshlcs.u32','vqshlhs.u32','vqshlcc.u32','vqshllo.u32','vqshlmi.u32','vqshlpl.u32','vqshlvs.u32','vqshlvc.u32','vqshlhi.u32','vqshlls.u32','vqshlge.u32','vqshllt.u32','vqshlgt.u32','vqshlle.u32', + 'vqshleq.u64','vqshlne.u64','vqshlcs.u64','vqshlhs.u64','vqshlcc.u64','vqshllo.u64','vqshlmi.u64','vqshlpl.u64','vqshlvs.u64','vqshlvc.u64','vqshlhi.u64','vqshlls.u64','vqshlge.u64','vqshllt.u64','vqshlgt.u64','vqshlle.u64', + + 'vqshrneq.u16','vqshrnne.u16','vqshrncs.u16','vqshrnhs.u16','vqshrncc.u16','vqshrnlo.u16','vqshrnmi.u16','vqshrnpl.u16','vqshrnvs.u16','vqshrnvc.u16','vqshrnhi.u16','vqshrnls.u16','vqshrnge.u16','vqshrnlt.u16','vqshrngt.u16','vqshrnle.u16', + 'vqshrneq.u32','vqshrnne.u32','vqshrncs.u32','vqshrnhs.u32','vqshrncc.u32','vqshrnlo.u32','vqshrnmi.u32','vqshrnpl.u32','vqshrnvs.u32','vqshrnvc.u32','vqshrnhi.u32','vqshrnls.u32','vqshrnge.u32','vqshrnlt.u32','vqshrngt.u32','vqshrnle.u32', + 'vqshrneq.u64','vqshrnne.u64','vqshrncs.u64','vqshrnhs.u64','vqshrncc.u64','vqshrnlo.u64','vqshrnmi.u64','vqshrnpl.u64','vqshrnvs.u64','vqshrnvc.u64','vqshrnhi.u64','vqshrnls.u64','vqshrnge.u64','vqshrnlt.u64','vqshrngt.u64','vqshrnle.u64', + + 'vqrshleq.u8','vqrshlne.u8','vqrshlcs.u8','vqrshlhs.u8','vqrshlcc.u8','vqrshllo.u8','vqrshlmi.u8','vqrshlpl.u8','vqrshlvs.u8','vqrshlvc.u8','vqrshlhi.u8','vqrshlls.u8','vqrshlge.u8','vqrshllt.u8','vqrshlgt.u8','vqrshlle.u8', + 'vqrshleq.u16','vqrshlne.u16','vqrshlcs.u16','vqrshlhs.u16','vqrshlcc.u16','vqrshllo.u16','vqrshlmi.u16','vqrshlpl.u16','vqrshlvs.u16','vqrshlvc.u16','vqrshlhi.u16','vqrshlls.u16','vqrshlge.u16','vqrshllt.u16','vqrshlgt.u16','vqrshlle.u16', + 'vqrshleq.u32','vqrshlne.u32','vqrshlcs.u32','vqrshlhs.u32','vqrshlcc.u32','vqrshllo.u32','vqrshlmi.u32','vqrshlpl.u32','vqrshlvs.u32','vqrshlvc.u32','vqrshlhi.u32','vqrshlls.u32','vqrshlge.u32','vqrshllt.u32','vqrshlgt.u32','vqrshlle.u32', + 'vqrshleq.u64','vqrshlne.u64','vqrshlcs.u64','vqrshlhs.u64','vqrshlcc.u64','vqrshllo.u64','vqrshlmi.u64','vqrshlpl.u64','vqrshlvs.u64','vqrshlvc.u64','vqrshlhi.u64','vqrshlls.u64','vqrshlge.u64','vqrshllt.u64','vqrshlgt.u64','vqrshlle.u64', + + 'vqrshrneq.u16','vqrshrnne.u16','vqrshrncs.u16','vqrshrnhs.u16','vqrshrncc.u16','vqrshrnlo.u16','vqrshrnmi.u16','vqrshrnpl.u16','vqrshrnvs.u16','vqrshrnvc.u16','vqrshrnhi.u16','vqrshrnls.u16','vqrshrnge.u16','vqrshrnlt.u16','vqrshrngt.u16','vqrshrnle.u16', + 'vqrshrneq.u32','vqrshrnne.u32','vqrshrncs.u32','vqrshrnhs.u32','vqrshrncc.u32','vqrshrnlo.u32','vqrshrnmi.u32','vqrshrnpl.u32','vqrshrnvs.u32','vqrshrnvc.u32','vqrshrnhi.u32','vqrshrnls.u32','vqrshrnge.u32','vqrshrnlt.u32','vqrshrngt.u32','vqrshrnle.u32', + 'vqrshrneq.u64','vqrshrnne.u64','vqrshrncs.u64','vqrshrnhs.u64','vqrshrncc.u64','vqrshrnlo.u64','vqrshrnmi.u64','vqrshrnpl.u64','vqrshrnvs.u64','vqrshrnvc.u64','vqrshrnhi.u64','vqrshrnls.u64','vqrshrnge.u64','vqrshrnlt.u64','vqrshrngt.u64','vqrshrnle.u64', + + 'vrhaddeq.u8','vrhaddne.u8','vrhaddcs.u8','vrhaddhs.u8','vrhaddcc.u8','vrhaddlo.u8','vrhaddmi.u8','vrhaddpl.u8','vrhaddvs.u8','vrhaddvc.u8','vrhaddhi.u8','vrhaddls.u8','vrhaddge.u8','vrhaddlt.u8','vrhaddgt.u8','vrhaddle.u8', + 'vrhaddeq.u16','vrhaddne.u16','vrhaddcs.u16','vrhaddhs.u16','vrhaddcc.u16','vrhaddlo.u16','vrhaddmi.u16','vrhaddpl.u16','vrhaddvs.u16','vrhaddvc.u16','vrhaddhi.u16','vrhaddls.u16','vrhaddge.u16','vrhaddlt.u16','vrhaddgt.u16','vrhaddle.u16', + 'vrhaddeq.u32','vrhaddne.u32','vrhaddcs.u32','vrhaddhs.u32','vrhaddcc.u32','vrhaddlo.u32','vrhaddmi.u32','vrhaddpl.u32','vrhaddvs.u32','vrhaddvc.u32','vrhaddhi.u32','vrhaddls.u32','vrhaddge.u32','vrhaddlt.u32','vrhaddgt.u32','vrhaddle.u32', + + 'vrshleq.u8','vrshlne.u8','vrshlcs.u8','vrshlhs.u8','vrshlcc.u8','vrshllo.u8','vrshlmi.u8','vrshlpl.u8','vrshlvs.u8','vrshlvc.u8','vrshlhi.u8','vrshlls.u8','vrshlge.u8','vrshllt.u8','vrshlgt.u8','vrshlle.u8', + 'vrshleq.u16','vrshlne.u16','vrshlcs.u16','vrshlhs.u16','vrshlcc.u16','vrshllo.u16','vrshlmi.u16','vrshlpl.u16','vrshlvs.u16','vrshlvc.u16','vrshlhi.u16','vrshlls.u16','vrshlge.u16','vrshllt.u16','vrshlgt.u16','vrshlle.u16', + 'vrshleq.u32','vrshlne.u32','vrshlcs.u32','vrshlhs.u32','vrshlcc.u32','vrshllo.u32','vrshlmi.u32','vrshlpl.u32','vrshlvs.u32','vrshlvc.u32','vrshlhi.u32','vrshlls.u32','vrshlge.u32','vrshllt.u32','vrshlgt.u32','vrshlle.u32', + 'vrshleq.u64','vrshlne.u64','vrshlcs.u64','vrshlhs.u64','vrshlcc.u64','vrshllo.u64','vrshlmi.u64','vrshlpl.u64','vrshlvs.u64','vrshlvc.u64','vrshlhi.u64','vrshlls.u64','vrshlge.u64','vrshllt.u64','vrshlgt.u64','vrshlle.u64', + + 'vrshreq.u8','vrshrne.u8','vrshrcs.u8','vrshrhs.u8','vrshrcc.u8','vrshrlo.u8','vrshrmi.u8','vrshrpl.u8','vrshrvs.u8','vrshrvc.u8','vrshrhi.u8','vrshrls.u8','vrshrge.u8','vrshrlt.u8','vrshrgt.u8','vrshrle.u8', + 'vrshreq.u16','vrshrne.u16','vrshrcs.u16','vrshrhs.u16','vrshrcc.u16','vrshrlo.u16','vrshrmi.u16','vrshrpl.u16','vrshrvs.u16','vrshrvc.u16','vrshrhi.u16','vrshrls.u16','vrshrge.u16','vrshrlt.u16','vrshrgt.u16','vrshrle.u16', + 'vrshreq.u32','vrshrne.u32','vrshrcs.u32','vrshrhs.u32','vrshrcc.u32','vrshrlo.u32','vrshrmi.u32','vrshrpl.u32','vrshrvs.u32','vrshrvc.u32','vrshrhi.u32','vrshrls.u32','vrshrge.u32','vrshrlt.u32','vrshrgt.u32','vrshrle.u32', + 'vrshreq.u64','vrshrne.u64','vrshrcs.u64','vrshrhs.u64','vrshrcc.u64','vrshrlo.u64','vrshrmi.u64','vrshrpl.u64','vrshrvs.u64','vrshrvc.u64','vrshrhi.u64','vrshrls.u64','vrshrge.u64','vrshrlt.u64','vrshrgt.u64','vrshrle.u64', + + 'vrsraeq.u8','vrsrane.u8','vrsracs.u8','vrsrahs.u8','vrsracc.u8','vrsralo.u8','vrsrami.u8','vrsrapl.u8','vrsravs.u8','vrsravc.u8','vrsrahi.u8','vrsrals.u8','vrsrage.u8','vrsralt.u8','vrsragt.u8','vrsrale.u8', + 'vrsraeq.u16','vrsrane.u16','vrsracs.u16','vrsrahs.u16','vrsracc.u16','vrsralo.u16','vrsrami.u16','vrsrapl.u16','vrsravs.u16','vrsravc.u16','vrsrahi.u16','vrsrals.u16','vrsrage.u16','vrsralt.u16','vrsragt.u16','vrsrale.u16', + 'vrsraeq.u32','vrsrane.u32','vrsracs.u32','vrsrahs.u32','vrsracc.u32','vrsralo.u32','vrsrami.u32','vrsrapl.u32','vrsravs.u32','vrsravc.u32','vrsrahi.u32','vrsrals.u32','vrsrage.u32','vrsralt.u32','vrsragt.u32','vrsrale.u32', + 'vrsraeq.u64','vrsrane.u64','vrsracs.u64','vrsrahs.u64','vrsracc.u64','vrsralo.u64','vrsrami.u64','vrsrapl.u64','vrsravs.u64','vrsravc.u64','vrsrahi.u64','vrsrals.u64','vrsrage.u64','vrsralt.u64','vrsragt.u64','vrsrale.u64', + ), + /* Conditional VFPv3 & NEON SIMD Floating-Point Instructions */ + 34 => array( + 'vabdeq.f32','vabdne.f32','vabdcs.f32','vabdhs.f32','vabdcc.f32','vabdlo.f32','vabdmi.f32','vabdpl.f32','vabdvs.f32','vabdvc.f32','vabdhi.f32','vabdls.f32','vabdge.f32','vabdlt.f32','vabdgt.f32','vabdle.f32', + + 'vabseq.f32','vabsne.f32','vabscs.f32','vabshs.f32','vabscc.f32','vabslo.f32','vabsmi.f32','vabspl.f32','vabsvs.f32','vabsvc.f32','vabshi.f32','vabsls.f32','vabsge.f32','vabslt.f32','vabsgt.f32','vabsle.f32', + 'vabseq.f64','vabsne.f64','vabscs.f64','vabshs.f64','vabscc.f64','vabslo.f64','vabsmi.f64','vabspl.f64','vabsvs.f64','vabsvc.f64','vabshi.f64','vabsls.f64','vabsge.f64','vabslt.f64','vabsgt.f64','vabsle.f64', + + 'vacgeeq.f32','vacgene.f32','vacgecs.f32','vacgehs.f32','vacgecc.f32','vacgelo.f32','vacgemi.f32','vacgepl.f32','vacgevs.f32','vacgevc.f32','vacgehi.f32','vacgels.f32','vacgege.f32','vacgelt.f32','vacgegt.f32','vacgele.f32', + 'vacgteq.f32','vacgtne.f32','vacgtcs.f32','vacgths.f32','vacgtcc.f32','vacgtlo.f32','vacgtmi.f32','vacgtpl.f32','vacgtvs.f32','vacgtvc.f32','vacgthi.f32','vacgtls.f32','vacgtge.f32','vacgtlt.f32','vacgtgt.f32','vacgtle.f32', + 'vacleeq.f32','vaclene.f32','vaclecs.f32','vaclehs.f32','vaclecc.f32','vaclelo.f32','vaclemi.f32','vaclepl.f32','vaclevs.f32','vaclevc.f32','vaclehi.f32','vaclels.f32','vaclege.f32','vaclelt.f32','vaclegt.f32','vaclele.f32', + 'vaclteq.f32','vacltne.f32','vacltcs.f32','vaclths.f32','vacltcc.f32','vacltlo.f32','vacltmi.f32','vacltpl.f32','vacltvs.f32','vacltvc.f32','vaclthi.f32','vacltls.f32','vacltge.f32','vacltlt.f32','vacltgt.f32','vacltle.f32', + + 'vaddeq.f32','vaddne.f32','vaddcs.f32','vaddhs.f32','vaddcc.f32','vaddlo.f32','vaddmi.f32','vaddpl.f32','vaddvs.f32','vaddvc.f32','vaddhi.f32','vaddls.f32','vaddge.f32','vaddlt.f32','vaddgt.f32','vaddle.f32', + 'vaddeq.f64','vaddne.f64','vaddcs.f64','vaddhs.f64','vaddcc.f64','vaddlo.f64','vaddmi.f64','vaddpl.f64','vaddvs.f64','vaddvc.f64','vaddhi.f64','vaddls.f64','vaddge.f64','vaddlt.f64','vaddgt.f64','vaddle.f64', + + 'vceqeq.f32','vceqne.f32','vceqcs.f32','vceqhs.f32','vceqcc.f32','vceqlo.f32','vceqmi.f32','vceqpl.f32','vceqvs.f32','vceqvc.f32','vceqhi.f32','vceqls.f32','vceqge.f32','vceqlt.f32','vceqgt.f32','vceqle.f32', + 'vcgeeq.f32','vcgene.f32','vcgecs.f32','vcgehs.f32','vcgecc.f32','vcgelo.f32','vcgemi.f32','vcgepl.f32','vcgevs.f32','vcgevc.f32','vcgehi.f32','vcgels.f32','vcgege.f32','vcgelt.f32','vcgegt.f32','vcgele.f32', + 'vcleeq.f32','vclene.f32','vclecs.f32','vclehs.f32','vclecc.f32','vclelo.f32','vclemi.f32','vclepl.f32','vclevs.f32','vclevc.f32','vclehi.f32','vclels.f32','vclege.f32','vclelt.f32','vclegt.f32','vclele.f32', + 'vcgteq.f32','vcgtne.f32','vcgtcs.f32','vcgths.f32','vcgtcc.f32','vcgtlo.f32','vcgtmi.f32','vcgtpl.f32','vcgtvs.f32','vcgtvc.f32','vcgthi.f32','vcgtls.f32','vcgtge.f32','vcgtlt.f32','vcgtgt.f32','vcgtle.f32', + 'vclteq.f32','vcltne.f32','vcltcs.f32','vclths.f32','vcltcc.f32','vcltlo.f32','vcltmi.f32','vcltpl.f32','vcltvs.f32','vcltvc.f32','vclthi.f32','vcltls.f32','vcltge.f32','vcltlt.f32','vcltgt.f32','vcltle.f32', + + 'vcmpeq.f32','vcmpne.f32','vcmpcs.f32','vcmphs.f32','vcmpcc.f32','vcmplo.f32','vcmpmi.f32','vcmppl.f32','vcmpvs.f32','vcmpvc.f32','vcmphi.f32','vcmpls.f32','vcmpge.f32','vcmplt.f32','vcmpgt.f32','vcmple.f32', + 'vcmpeq.f64','vcmpne.f64','vcmpcs.f64','vcmphs.f64','vcmpcc.f64','vcmplo.f64','vcmpmi.f64','vcmppl.f64','vcmpvs.f64','vcmpvc.f64','vcmphi.f64','vcmpls.f64','vcmpge.f64','vcmplt.f64','vcmpgt.f64','vcmple.f64', + + 'vcmpeeq.f32','vcmpene.f32','vcmpecs.f32','vcmpehs.f32','vcmpecc.f32','vcmpelo.f32','vcmpemi.f32','vcmpepl.f32','vcmpevs.f32','vcmpevc.f32','vcmpehi.f32','vcmpels.f32','vcmpege.f32','vcmpelt.f32','vcmpegt.f32','vcmpele.f32', + 'vcmpeeq.f64','vcmpene.f64','vcmpecs.f64','vcmpehs.f64','vcmpecc.f64','vcmpelo.f64','vcmpemi.f64','vcmpepl.f64','vcmpevs.f64','vcmpevc.f64','vcmpehi.f64','vcmpels.f64','vcmpege.f64','vcmpelt.f64','vcmpegt.f64','vcmpele.f64', + + 'vcvteq.s16.f32','vcvtne.s16.f32','vcvtcs.s16.f32','vcvths.s16.f32','vcvtcc.s16.f32','vcvtlo.s16.f32','vcvtmi.s16.f32','vcvtpl.s16.f32','vcvtvs.s16.f32','vcvtvc.s16.f32','vcvthi.s16.f32','vcvtls.s16.f32','vcvtge.s16.f32','vcvtlt.s16.f32','vcvtgt.s16.f32','vcvtle.s16.f32', + 'vcvteq.s16.f64','vcvtne.s16.f64','vcvtcs.s16.f64','vcvths.s16.f64','vcvtcc.s16.f64','vcvtlo.s16.f64','vcvtmi.s16.f64','vcvtpl.s16.f64','vcvtvs.s16.f64','vcvtvc.s16.f64','vcvthi.s16.f64','vcvtls.s16.f64','vcvtge.s16.f64','vcvtlt.s16.f64','vcvtgt.s16.f64','vcvtle.s16.f64', + 'vcvteq.s32.f32','vcvtne.s32.f32','vcvtcs.s32.f32','vcvths.s32.f32','vcvtcc.s32.f32','vcvtlo.s32.f32','vcvtmi.s32.f32','vcvtpl.s32.f32','vcvtvs.s32.f32','vcvtvc.s32.f32','vcvthi.s32.f32','vcvtls.s32.f32','vcvtge.s32.f32','vcvtlt.s32.f32','vcvtgt.s32.f32','vcvtle.s32.f32', + 'vcvteq.s32.f64','vcvtne.s32.f64','vcvtcs.s32.f64','vcvths.s32.f64','vcvtcc.s32.f64','vcvtlo.s32.f64','vcvtmi.s32.f64','vcvtpl.s32.f64','vcvtvs.s32.f64','vcvtvc.s32.f64','vcvthi.s32.f64','vcvtls.s32.f64','vcvtge.s32.f64','vcvtlt.s32.f64','vcvtgt.s32.f64','vcvtle.s32.f64', + 'vcvteq.u16.f32','vcvtne.u16.f32','vcvtcs.u16.f32','vcvths.u16.f32','vcvtcc.u16.f32','vcvtlo.u16.f32','vcvtmi.u16.f32','vcvtpl.u16.f32','vcvtvs.u16.f32','vcvtvc.u16.f32','vcvthi.u16.f32','vcvtls.u16.f32','vcvtge.u16.f32','vcvtlt.u16.f32','vcvtgt.u16.f32','vcvtle.u16.f32', + 'vcvteq.u16.f64','vcvtne.u16.f64','vcvtcs.u16.f64','vcvths.u16.f64','vcvtcc.u16.f64','vcvtlo.u16.f64','vcvtmi.u16.f64','vcvtpl.u16.f64','vcvtvs.u16.f64','vcvtvc.u16.f64','vcvthi.u16.f64','vcvtls.u16.f64','vcvtge.u16.f64','vcvtlt.u16.f64','vcvtgt.u16.f64','vcvtle.u16.f64', + 'vcvteq.u32.f32','vcvtne.u32.f32','vcvtcs.u32.f32','vcvths.u32.f32','vcvtcc.u32.f32','vcvtlo.u32.f32','vcvtmi.u32.f32','vcvtpl.u32.f32','vcvtvs.u32.f32','vcvtvc.u32.f32','vcvthi.u32.f32','vcvtls.u32.f32','vcvtge.u32.f32','vcvtlt.u32.f32','vcvtgt.u32.f32','vcvtle.u32.f32', + 'vcvteq.u32.f64','vcvtne.u32.f64','vcvtcs.u32.f64','vcvths.u32.f64','vcvtcc.u32.f64','vcvtlo.u32.f64','vcvtmi.u32.f64','vcvtpl.u32.f64','vcvtvs.u32.f64','vcvtvc.u32.f64','vcvthi.u32.f64','vcvtls.u32.f64','vcvtge.u32.f64','vcvtlt.u32.f64','vcvtgt.u32.f64','vcvtle.u32.f64', + 'vcvteq.f16.f32','vcvtne.f16.f32','vcvtcs.f16.f32','vcvths.f16.f32','vcvtcc.f16.f32','vcvtlo.f16.f32','vcvtmi.f16.f32','vcvtpl.f16.f32','vcvtvs.f16.f32','vcvtvc.f16.f32','vcvthi.f16.f32','vcvtls.f16.f32','vcvtge.f16.f32','vcvtlt.f16.f32','vcvtgt.f16.f32','vcvtle.f16.f32', + 'vcvteq.f32.s32','vcvtne.f32.s32','vcvtcs.f32.s32','vcvths.f32.s32','vcvtcc.f32.s32','vcvtlo.f32.s32','vcvtmi.f32.s32','vcvtpl.f32.s32','vcvtvs.f32.s32','vcvtvc.f32.s32','vcvthi.f32.s32','vcvtls.f32.s32','vcvtge.f32.s32','vcvtlt.f32.s32','vcvtgt.f32.s32','vcvtle.f32.s32', + 'vcvteq.f32.u32','vcvtne.f32.u32','vcvtcs.f32.u32','vcvths.f32.u32','vcvtcc.f32.u32','vcvtlo.f32.u32','vcvtmi.f32.u32','vcvtpl.f32.u32','vcvtvs.f32.u32','vcvtvc.f32.u32','vcvthi.f32.u32','vcvtls.f32.u32','vcvtge.f32.u32','vcvtlt.f32.u32','vcvtgt.f32.u32','vcvtle.f32.u32', + 'vcvteq.f32.f16','vcvtne.f32.f16','vcvtcs.f32.f16','vcvths.f32.f16','vcvtcc.f32.f16','vcvtlo.f32.f16','vcvtmi.f32.f16','vcvtpl.f32.f16','vcvtvs.f32.f16','vcvtvc.f32.f16','vcvthi.f32.f16','vcvtls.f32.f16','vcvtge.f32.f16','vcvtlt.f32.f16','vcvtgt.f32.f16','vcvtle.f32.f16', + 'vcvteq.f32.f64','vcvtne.f32.f64','vcvtcs.f32.f64','vcvths.f32.f64','vcvtcc.f32.f64','vcvtlo.f32.f64','vcvtmi.f32.f64','vcvtpl.f32.f64','vcvtvs.f32.f64','vcvtvc.f32.f64','vcvthi.f32.f64','vcvtls.f32.f64','vcvtge.f32.f64','vcvtlt.f32.f64','vcvtgt.f32.f64','vcvtle.f32.f64', + 'vcvteq.f64.s32','vcvtne.f64.s32','vcvtcs.f64.s32','vcvths.f64.s32','vcvtcc.f64.s32','vcvtlo.f64.s32','vcvtmi.f64.s32','vcvtpl.f64.s32','vcvtvs.f64.s32','vcvtvc.f64.s32','vcvthi.f64.s32','vcvtls.f64.s32','vcvtge.f64.s32','vcvtlt.f64.s32','vcvtgt.f64.s32','vcvtle.f64.s32', + 'vcvteq.f64.u32','vcvtne.f64.u32','vcvtcs.f64.u32','vcvths.f64.u32','vcvtcc.f64.u32','vcvtlo.f64.u32','vcvtmi.f64.u32','vcvtpl.f64.u32','vcvtvs.f64.u32','vcvtvc.f64.u32','vcvthi.f64.u32','vcvtls.f64.u32','vcvtge.f64.u32','vcvtlt.f64.u32','vcvtgt.f64.u32','vcvtle.f64.u32', + 'vcvteq.f64.f32','vcvtne.f64.f32','vcvtcs.f64.f32','vcvths.f64.f32','vcvtcc.f64.f32','vcvtlo.f64.f32','vcvtmi.f64.f32','vcvtpl.f64.f32','vcvtvs.f64.f32','vcvtvc.f64.f32','vcvthi.f64.f32','vcvtls.f64.f32','vcvtge.f64.f32','vcvtlt.f64.f32','vcvtgt.f64.f32','vcvtle.f64.f32', + + 'vcvtreq.s32.f32','vcvtrne.s32.f32','vcvtrcs.s32.f32','vcvtrhs.s32.f32','vcvtrcc.s32.f32','vcvtrlo.s32.f32','vcvtrmi.s32.f32','vcvtrpl.s32.f32','vcvtrvs.s32.f32','vcvtrvc.s32.f32','vcvtrhi.s32.f32','vcvtrls.s32.f32','vcvtrge.s32.f32','vcvtrlt.s32.f32','vcvtrgt.s32.f32','vcvtrle.s32.f32', + 'vcvtreq.s32.f64','vcvtrne.s32.f64','vcvtrcs.s32.f64','vcvtrhs.s32.f64','vcvtrcc.s32.f64','vcvtrlo.s32.f64','vcvtrmi.s32.f64','vcvtrpl.s32.f64','vcvtrvs.s32.f64','vcvtrvc.s32.f64','vcvtrhi.s32.f64','vcvtrls.s32.f64','vcvtrge.s32.f64','vcvtrlt.s32.f64','vcvtrgt.s32.f64','vcvtrle.s32.f64', + 'vcvtreq.u32.f32','vcvtrne.u32.f32','vcvtrcs.u32.f32','vcvtrhs.u32.f32','vcvtrcc.u32.f32','vcvtrlo.u32.f32','vcvtrmi.u32.f32','vcvtrpl.u32.f32','vcvtrvs.u32.f32','vcvtrvc.u32.f32','vcvtrhi.u32.f32','vcvtrls.u32.f32','vcvtrge.u32.f32','vcvtrlt.u32.f32','vcvtrgt.u32.f32','vcvtrle.u32.f32', + 'vcvtreq.u32.f64','vcvtrne.u32.f64','vcvtrcs.u32.f64','vcvtrhs.u32.f64','vcvtrcc.u32.f64','vcvtrlo.u32.f64','vcvtrmi.u32.f64','vcvtrpl.u32.f64','vcvtrvs.u32.f64','vcvtrvc.u32.f64','vcvtrhi.u32.f64','vcvtrls.u32.f64','vcvtrge.u32.f64','vcvtrlt.u32.f64','vcvtrgt.u32.f64','vcvtrle.u32.f64', + + 'vcvtbeq.f16.f32','vcvtbne.f16.f32','vcvtbcs.f16.f32','vcvtbhs.f16.f32','vcvtbcc.f16.f32','vcvtblo.f16.f32','vcvtbmi.f16.f32','vcvtbpl.f16.f32','vcvtbvs.f16.f32','vcvtbvc.f16.f32','vcvtbhi.f16.f32','vcvtbls.f16.f32','vcvtbge.f16.f32','vcvtblt.f16.f32','vcvtbgt.f16.f32','vcvtble.f16.f32', + 'vcvtbeq.f32.f16','vcvtbne.f32.f16','vcvtbcs.f32.f16','vcvtbhs.f32.f16','vcvtbcc.f32.f16','vcvtblo.f32.f16','vcvtbmi.f32.f16','vcvtbpl.f32.f16','vcvtbvs.f32.f16','vcvtbvc.f32.f16','vcvtbhi.f32.f16','vcvtbls.f32.f16','vcvtbge.f32.f16','vcvtblt.f32.f16','vcvtbgt.f32.f16','vcvtble.f32.f16', + + 'vcvtteq.f16.f32','vcvttne.f16.f32','vcvttcs.f16.f32','vcvtths.f16.f32','vcvttcc.f16.f32','vcvttlo.f16.f32','vcvttmi.f16.f32','vcvttpl.f16.f32','vcvttvs.f16.f32','vcvttvc.f16.f32','vcvtthi.f16.f32','vcvttls.f16.f32','vcvttge.f16.f32','vcvttlt.f16.f32','vcvttgt.f16.f32','vcvttle.f16.f32', + 'vcvtteq.f32.f16','vcvttne.f32.f16','vcvttcs.f32.f16','vcvtths.f32.f16','vcvttcc.f32.f16','vcvttlo.f32.f16','vcvttmi.f32.f16','vcvttpl.f32.f16','vcvttvs.f32.f16','vcvttvc.f32.f16','vcvtthi.f32.f16','vcvttls.f32.f16','vcvttge.f32.f16','vcvttlt.f32.f16','vcvttgt.f32.f16','vcvttle.f32.f16', + + 'vdiveq.f32','vdivne.f32','vdivcs.f32','vdivhs.f32','vdivcc.f32','vdivlo.f32','vdivmi.f32','vdivpl.f32','vdivvs.f32','vdivvc.f32','vdivhi.f32','vdivls.f32','vdivge.f32','vdivlt.f32','vdivgt.f32','vdivle.f32', + 'vdiveq.f64','vdivne.f64','vdivcs.f64','vdivhs.f64','vdivcc.f64','vdivlo.f64','vdivmi.f64','vdivpl.f64','vdivvs.f64','vdivvc.f64','vdivhi.f64','vdivls.f64','vdivge.f64','vdivlt.f64','vdivgt.f64','vdivle.f64', + + 'vmaxeq.f32','vmaxne.f32','vmaxcs.f32','vmaxhs.f32','vmaxcc.f32','vmaxlo.f32','vmaxmi.f32','vmaxpl.f32','vmaxvs.f32','vmaxvc.f32','vmaxhi.f32','vmaxls.f32','vmaxge.f32','vmaxlt.f32','vmaxgt.f32','vmaxle.f32', + 'vmineq.f32','vminne.f32','vmincs.f32','vminhs.f32','vmincc.f32','vminlo.f32','vminmi.f32','vminpl.f32','vminvs.f32','vminvc.f32','vminhi.f32','vminls.f32','vminge.f32','vminlt.f32','vmingt.f32','vminle.f32', + + 'vmlaeq.f32','vmlane.f32','vmlacs.f32','vmlahs.f32','vmlacc.f32','vmlalo.f32','vmlami.f32','vmlapl.f32','vmlavs.f32','vmlavc.f32','vmlahi.f32','vmlals.f32','vmlage.f32','vmlalt.f32','vmlagt.f32','vmlale.f32', + 'vmlaeq.f64','vmlane.f64','vmlacs.f64','vmlahs.f64','vmlacc.f64','vmlalo.f64','vmlami.f64','vmlapl.f64','vmlavs.f64','vmlavc.f64','vmlahi.f64','vmlals.f64','vmlage.f64','vmlalt.f64','vmlagt.f64','vmlale.f64', + + 'vmlseq.f32','vmlsne.f32','vmlscs.f32','vmlshs.f32','vmlscc.f32','vmlslo.f32','vmlsmi.f32','vmlspl.f32','vmlsvs.f32','vmlsvc.f32','vmlshi.f32','vmlsls.f32','vmlsge.f32','vmlslt.f32','vmlsgt.f32','vmlsle.f32', + 'vmlseq.f64','vmlsne.f64','vmlscs.f64','vmlshs.f64','vmlscc.f64','vmlslo.f64','vmlsmi.f64','vmlspl.f64','vmlsvs.f64','vmlsvc.f64','vmlshi.f64','vmlsls.f64','vmlsge.f64','vmlslt.f64','vmlsgt.f64','vmlsle.f64', + + 'vmuleq.f32','vmulne.f32','vmulcs.f32','vmulhs.f32','vmulcc.f32','vmullo.f32','vmulmi.f32','vmulpl.f32','vmulvs.f32','vmulvc.f32','vmulhi.f32','vmulls.f32','vmulge.f32','vmullt.f32','vmulgt.f32','vmulle.f32', + 'vmuleq.f64','vmulne.f64','vmulcs.f64','vmulhs.f64','vmulcc.f64','vmullo.f64','vmulmi.f64','vmulpl.f64','vmulvs.f64','vmulvc.f64','vmulhi.f64','vmulls.f64','vmulge.f64','vmullt.f64','vmulgt.f64','vmulle.f64', + + 'vnegeq.f32','vnegne.f32','vnegcs.f32','vneghs.f32','vnegcc.f32','vneglo.f32','vnegmi.f32','vnegpl.f32','vnegvs.f32','vnegvc.f32','vneghi.f32','vnegls.f32','vnegge.f32','vneglt.f32','vneggt.f32','vnegle.f32', + 'vnegeq.f64','vnegne.f64','vnegcs.f64','vneghs.f64','vnegcc.f64','vneglo.f64','vnegmi.f64','vnegpl.f64','vnegvs.f64','vnegvc.f64','vneghi.f64','vnegls.f64','vnegge.f64','vneglt.f64','vneggt.f64','vnegle.f64', + + 'vnmlaeq.f32','vnmlane.f32','vnmlacs.f32','vnmlahs.f32','vnmlacc.f32','vnmlalo.f32','vnmlami.f32','vnmlapl.f32','vnmlavs.f32','vnmlavc.f32','vnmlahi.f32','vnmlals.f32','vnmlage.f32','vnmlalt.f32','vnmlagt.f32','vnmlale.f32', + 'vnmlaeq.f64','vnmlane.f64','vnmlacs.f64','vnmlahs.f64','vnmlacc.f64','vnmlalo.f64','vnmlami.f64','vnmlapl.f64','vnmlavs.f64','vnmlavc.f64','vnmlahi.f64','vnmlals.f64','vnmlage.f64','vnmlalt.f64','vnmlagt.f64','vnmlale.f64', + + 'vnmlseq.f32','vnmlsne.f32','vnmlscs.f32','vnmlshs.f32','vnmlscc.f32','vnmlslo.f32','vnmlsmi.f32','vnmlspl.f32','vnmlsvs.f32','vnmlsvc.f32','vnmlshi.f32','vnmlsls.f32','vnmlsge.f32','vnmlslt.f32','vnmlsgt.f32','vnmlsle.f32', + 'vnmlseq.f64','vnmlsne.f64','vnmlscs.f64','vnmlshs.f64','vnmlscc.f64','vnmlslo.f64','vnmlsmi.f64','vnmlspl.f64','vnmlsvs.f64','vnmlsvc.f64','vnmlshi.f64','vnmlsls.f64','vnmlsge.f64','vnmlslt.f64','vnmlsgt.f64','vnmlsle.f64', + + 'vnmuleq.f64','vnmulne.f64','vnmulcs.f64','vnmulhs.f64','vnmulcc.f64','vnmullo.f64','vnmulmi.f64','vnmulpl.f64','vnmulvs.f64','vnmulvc.f64','vnmulhi.f64','vnmulls.f64','vnmulge.f64','vnmullt.f64','vnmulgt.f64','vnmulle.f64', + 'vnmuleq.f32','vnmulne.f32','vnmulcs.f32','vnmulhs.f32','vnmulcc.f32','vnmullo.f32','vnmulmi.f32','vnmulpl.f32','vnmulvs.f32','vnmulvc.f32','vnmulhi.f32','vnmulls.f32','vnmulge.f32','vnmullt.f32','vnmulgt.f32','vnmulle.f32', + + 'vpaddeq.f32','vpaddne.f32','vpaddcs.f32','vpaddhs.f32','vpaddcc.f32','vpaddlo.f32','vpaddmi.f32','vpaddpl.f32','vpaddvs.f32','vpaddvc.f32','vpaddhi.f32','vpaddls.f32','vpaddge.f32','vpaddlt.f32','vpaddgt.f32','vpaddle.f32', + + 'vpmaxeq.f32','vpmaxne.f32','vpmaxcs.f32','vpmaxhs.f32','vpmaxcc.f32','vpmaxlo.f32','vpmaxmi.f32','vpmaxpl.f32','vpmaxvs.f32','vpmaxvc.f32','vpmaxhi.f32','vpmaxls.f32','vpmaxge.f32','vpmaxlt.f32','vpmaxgt.f32','vpmaxle.f32', + 'vpmineq.f32','vpminne.f32','vpmincs.f32','vpminhs.f32','vpmincc.f32','vpminlo.f32','vpminmi.f32','vpminpl.f32','vpminvs.f32','vpminvc.f32','vpminhi.f32','vpminls.f32','vpminge.f32','vpminlt.f32','vpmingt.f32','vpminle.f32', + + 'vrecpeeq.u32','vrecpene.u32','vrecpecs.u32','vrecpehs.u32','vrecpecc.u32','vrecpelo.u32','vrecpemi.u32','vrecpepl.u32','vrecpevs.u32','vrecpevc.u32','vrecpehi.u32','vrecpels.u32','vrecpege.u32','vrecpelt.u32','vrecpegt.u32','vrecpele.u32', + 'vrecpeeq.f32','vrecpene.f32','vrecpecs.f32','vrecpehs.f32','vrecpecc.f32','vrecpelo.f32','vrecpemi.f32','vrecpepl.f32','vrecpevs.f32','vrecpevc.f32','vrecpehi.f32','vrecpels.f32','vrecpege.f32','vrecpelt.f32','vrecpegt.f32','vrecpele.f32', + 'vrecpseq.f32','vrecpsne.f32','vrecpscs.f32','vrecpshs.f32','vrecpscc.f32','vrecpslo.f32','vrecpsmi.f32','vrecpspl.f32','vrecpsvs.f32','vrecpsvc.f32','vrecpshi.f32','vrecpsls.f32','vrecpsge.f32','vrecpslt.f32','vrecpsgt.f32','vrecpsle.f32', + + 'vrsqrteeq.u32','vrsqrtene.u32','vrsqrtecs.u32','vrsqrtehs.u32','vrsqrtecc.u32','vrsqrtelo.u32','vrsqrtemi.u32','vrsqrtepl.u32','vrsqrtevs.u32','vrsqrtevc.u32','vrsqrtehi.u32','vrsqrtels.u32','vrsqrtege.u32','vrsqrtelt.u32','vrsqrtegt.u32','vrsqrtele.u32', + 'vrsqrteeq.f32','vrsqrtene.f32','vrsqrtecs.f32','vrsqrtehs.f32','vrsqrtecc.f32','vrsqrtelo.f32','vrsqrtemi.f32','vrsqrtepl.f32','vrsqrtevs.f32','vrsqrtevc.f32','vrsqrtehi.f32','vrsqrtels.f32','vrsqrtege.f32','vrsqrtelt.f32','vrsqrtegt.f32','vrsqrtele.f32', + 'vrsqrtseq.f32','vrsqrtsne.f32','vrsqrtscs.f32','vrsqrtshs.f32','vrsqrtscc.f32','vrsqrtslo.f32','vrsqrtsmi.f32','vrsqrtspl.f32','vrsqrtsvs.f32','vrsqrtsvc.f32','vrsqrtshi.f32','vrsqrtsls.f32','vrsqrtsge.f32','vrsqrtslt.f32','vrsqrtsgt.f32','vrsqrtsle.f32', + + 'vsqrteq.f32','vsqrtne.f32','vsqrtcs.f32','vsqrths.f32','vsqrtcc.f32','vsqrtlo.f32','vsqrtmi.f32','vsqrtpl.f32','vsqrtvs.f32','vsqrtvc.f32','vsqrthi.f32','vsqrtls.f32','vsqrtge.f32','vsqrtlt.f32','vsqrtgt.f32','vsqrtle.f32', + 'vsqrteq.f64','vsqrtne.f64','vsqrtcs.f64','vsqrths.f64','vsqrtcc.f64','vsqrtlo.f64','vsqrtmi.f64','vsqrtpl.f64','vsqrtvs.f64','vsqrtvc.f64','vsqrthi.f64','vsqrtls.f64','vsqrtge.f64','vsqrtlt.f64','vsqrtgt.f64','vsqrtle.f64', + + 'vsubeq.f32','vsubne.f32','vsubcs.f32','vsubhs.f32','vsubcc.f32','vsublo.f32','vsubmi.f32','vsubpl.f32','vsubvs.f32','vsubvc.f32','vsubhi.f32','vsubls.f32','vsubge.f32','vsublt.f32','vsubgt.f32','vsuble.f32', + 'vsubeq.f64','vsubne.f64','vsubcs.f64','vsubhs.f64','vsubcc.f64','vsublo.f64','vsubmi.f64','vsubpl.f64','vsubvs.f64','vsubvc.f64','vsubhi.f64','vsubls.f64','vsubge.f64','vsublt.f64','vsubgt.f64','vsuble.f64' + ), + /* Registers */ + 35 => array( + /* General-Purpose Registers */ + 'r0','r1','r2','r3','r4','r5','r6','r7', + 'r8','r9','r10','r11','r12','r13','r14','r15', + /* Scratch Registers */ + 'a1','a2','a3','a4', + /* Variable Registers */ + 'v1','v2','v3','v4','v5','v6','v7','v8', + /* Other Synonims for General-Purpose Registers */ + 'sb','sl','fp','ip','sp','lr','pc', + /* WMMX Data Registers */ + 'wr0','wr1','wr2','wr3','wr4','wr5','wr6','wr7', + 'wr8','wr9','wr10','wr11','wr12','wr13','wr14','wr15', + /* WMMX Control Registers */ + 'wcid','wcon','wcssf','wcasf', + /* WMMX-Mapped General-Purpose Registers */ + 'wcgr0','wcgr1','wcgr2','wcgr3', + /* VFPv3 Registers */ + 's0','s1','s2','s3','s4','s5','s6','s7', + 's8','s9','s10','s11','s12','s13','s14','s15', + 's16','s17','s18','s19','s20','s21','s22','s23', + 's24','s25','s26','s27','s28','s29','s30','s31', + /* VFPv3/NEON Registers */ + 'd0','d1','d2','d3','d4','d5','d6','d7', + 'd8','d9','d10','d11','d12','d13','d14','d15', + 'd16','d17','d18','d19','d20','d21','d22','d23', + 'd24','d25','d26','d27','d28','d29','d30','d31', + /* NEON Registers */ + 'q0','q1','q2','q3','q4','q5','q6','q7', + 'q8','q9','q10','q11','q12','q13','q14','q15' + ) + ), + 'SYMBOLS' => array( + '[', ']', '(', ')', + '+', '-', '*', '/', '%', + '.', ',', ';', ':' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false, + 7 => false, + 8 => false, + 9 => false, + 10 => false, + 11 => false, + 12 => false, + 13 => false, + 14 => false, + 15 => false, + 16 => false, + 17 => false, + 18 => false, + 19 => false, + 20 => false, + 21 => false, + 22 => false, + 23 => false, + 24 => false, + 25 => false, + 26 => false, + 27 => false, + 28 => false, + 29 => false, + 30 => false, + 31 => false, + 32 => false, + 33 => false, + 34 => false, + 35 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + /* Unconditional Data Processing Instructions */ + 1 => 'color: #00007f; font-weight: normal; font-style: normal;', + /* Conditional Data Processing Instructions */ + 2 => 'color: #00007f; font-weight: normal; font-style: italic;', + /* Unconditional Memory Access Instructions */ + 3 => 'color: #00007f; font-weight: normal; font-style: normal;', + /* Conditional Memory Access Instructions */ + 4 => 'color: #00007f; font-weight: normal; font-style: italic;', + /* Unconditional Flags Changing Instructions */ + 5 => 'color: #00007f; font-weight: bold; font-style: normal;', + /* Conditional Flags Changing Instructions */ + 6 => 'color: #00007f; font-weight: bold; font-style: italic;', + /* Unconditional Flow Control Instructions */ + 7 => 'color: #0000ff; font-weight: normal; font-style: normal;', + /* Conditional Flow Control Instructions */ + 8 => 'color: #0000ff; font-weight: normal; font-style: italic;', + /* Unconditional Syncronization Instructions */ + 9 => 'color: #00007f; font-weight: normal; font-style: normal;', + /* Conditional Syncronization Instructions */ + 10 => 'color: #00007f; font-weight: normal; font-style: italic;', + /* Unonditional ARMv6 SIMD */ + 11 => 'color: #b00040; font-weight: normal; font-style: normal;', + /* Conditional ARMv6 SIMD */ + 12 => 'color: #b00040; font-weight: normal; font-style: italic;', + /* Unconditional Coprocessor Instructions */ + 13 => 'color: #00007f; font-weight: normal; font-style: normal;', + /* Conditional Coprocessor Instructions */ + 14 => 'color: #00007f; font-weight: bold; font-style: italic;', + /* Unconditional System Instructions */ + 15 => 'color: #00007f; font-weight: normal; font-style: normal;', + /* Conditional System Instructions */ + 16 => 'color: #00007f; font-weight: bold; font-style: italic;', + /* Unconditional WMMX/WMMX2 SIMD Instructions */ + 17 => 'color: #b00040; font-weight: normal; font-style: normal;', + /* Conditional WMMX/WMMX2 SIMD Instructions */ + 18 => 'color: #b00040; font-weight: normal; font-style: italic;', + /* Unconditional VFPv3 & NEON SIMD Memory Access Instructions */ + 19 => 'color: #b00040; font-weight: normal; font-style: normal;', + /* Unconditional NEON SIMD Logical Instructions */ + 20 => 'color: #b00040; font-weight: normal; font-style: italic;', + /* Unconditional NEON SIMD ARM Registers Interop Instructions */ + 21 => 'color: #b00040; font-weight: normal; font-style: italic;', + /* Unconditional NEON SIMD Bit/Byte-Level Instructions */ + 22 => 'color: #b00040; font-weight: normal; font-style: italic;', + /* Unconditional NEON SIMD Universal Integer Instructions */ + 23 => 'color: #b00040; font-weight: normal; font-style: italic;', + /* Unconditional NEON SIMD Signed Integer Instructions */ + 24 => 'color: #b00040; font-weight: normal; font-style: italic;', + /* Unconditional NEON SIMD Unsigned Integer Instructions */ + 25 => 'color: #b00040; font-weight: normal; font-style: italic;', + /* Unconditional VFPv3 & NEON SIMD Floating-Point Instructions */ + 26 => 'color: #b00040; font-weight: normal; font-style: italic;', + /* Conditional VFPv3 & NEON SIMD Memory Access Instructions */ + 27 => 'color: #b00040; font-weight: normal; font-style: italic;', + /* Conditional NEON SIMD Logical Instructions */ + 28 => 'color: #b00040; font-weight: normal; font-style: italic;', + /* Conditional NEON SIMD ARM Registers Interop Instructions */ + 29 => 'color: #b00040; font-weight: normal; font-style: italic;', + /* Conditional NEON SIMD Bit/Byte-Level Instructions */ + 30 => 'color: #b00040; font-weight: normal; font-style: italic;', + /* Conditional NEON SIMD Universal Integer Instructions */ + 31 => 'color: #b00040; font-weight: normal; font-style: italic;', + /* Conditional NEON SIMD Signed Integer Instructions */ + 32 => 'color: #b00040; font-weight: normal; font-style: italic;', + /* Conditional NEON SIMD Unsigned Integer Instructions */ + 33 => 'color: #b00040; font-weight: normal; font-style: italic;', + /* Conditional VFPv3 & NEON SIMD Floating-Point Instructions */ + 34 => 'color: #b00040; font-weight: normal; font-style: italic;', + /* Registers */ + 35 => 'color: #46aa03; font-weight: bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 2 => 'color: #adadad; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900; font-weight: bold;' + ), + 'STRINGS' => array( + 0 => 'color: #7f007f;' + ), + 'NUMBERS' => array( + 0 => 'color: #ff0000;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #339933;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + 8 => '', + 9 => '', + 10 => '', + 11 => '', + 12 => '', + 13 => '', + 14 => '', + 15 => '', + 16 => '', + 17 => '', + 18 => '', + 19 => '', + 20 => '', + 21 => '', + 22 => '', + 23 => '', + 24 => '', + 25 => '', + 26 => '', + 27 => '', + 28 => '', + 29 => '', + 30 => '', + 31 => '', + 32 => '', + 33 => '', + 34 => '', + 35 => '' + ), + 'NUMBERS' => + GESHI_NUMBER_BIN_PREFIX_PERCENT | + GESHI_NUMBER_BIN_SUFFIX | + GESHI_NUMBER_HEX_PREFIX | + GESHI_NUMBER_HEX_SUFFIX | + GESHI_NUMBER_OCT_SUFFIX | + GESHI_NUMBER_INT_BASIC | + GESHI_NUMBER_FLT_NONSCI | + GESHI_NUMBER_FLT_NONSCI_F | + GESHI_NUMBER_FLT_SCI_ZERO, + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 8, + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => "(?|^])", + 'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_<\|%])" + ) + ) +); + diff --git a/vendor/easybook/geshi/geshi/asm.php b/vendor/easybook/geshi/geshi/asm.php new file mode 100644 index 0000000000..53ce805d34 --- /dev/null +++ b/vendor/easybook/geshi/geshi/asm.php @@ -0,0 +1,602 @@ + 'ASM', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(), + //Line address prefix suppression + 'COMMENT_REGEXP' => array(2 => "/^(?:[0-9a-f]{0,4}:)?[0-9a-f]{4}(?:[0-9a-f]{4})?/mi"), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /* General-Purpose */ + 1 => array( + /* BCD instructions */ + 'aaa','aad','aam','aas','daa','das', + /* Control flow instructions */ + 'ja','jae','jb','jbe','jc','je','jg','jge','jl','jle','jmp','jna', + 'jnae','jnb','jnbe','jnc','jne','jng','jnge','jnl','jnle','jno','jnp','jns','jnz', + 'jo','jp','jpe','jpo','js','jz','jcxz','jecxz','jrcxz','loop','loope','loopne', + 'call','ret','enter','leave','syscall','sysenter','int','into', + /* Predicate instructions */ + 'seta','setae','setb','setbe','setc','sete','setg','setge','setl','setle','setna', + 'setnae','setnb','setnbe','setnc','setne','setng','setnge','setnl','setnle','setno', + 'setnp','setns','setnz','seto','setp','setpe','setpo','sets','setz','salc', + /* Conditional move instructions */ + 'cmovo','cmovno','cmovb','cmovc','cmovnae','cmovae','cmovnb','cmovnc','cmove','cmovz', + 'cmovne','cmovnz','cmovbe','cmovna','cmova','cmovnbe','cmovs','cmovns','cmovp','cmovpe', + 'cmovnp','cmovpo','cmovl','cmovnge','cmovge','cmovnl','cmovle','cmovng','cmovg','cmovnle', + /* ALU instructions */ + 'add','sub','adc','sbb','neg','cmp','inc','dec','and','or','xor','not','test', + 'shl','shr','sal','sar','shld','shrd','rol','ror','rcl','rcr', + 'cbw','cwd','cwde','cdq','cdqe','cqo','bsf','bsr','bt','btc','btr','bts', + 'idiv','imul','div','mul','bswap','nop', + /* Memory instructions */ + 'lea','mov','movsx','movsxd','movzx','xlatb','bound','xchg','xadd','cmpxchg','cmpxchg8b','cmpxchg16b', + /* Stack instructions */ + 'push','pop','pusha','popa','pushad','popad','pushf','popf','pushfd','popfd','pushfq','popfq', + /* EFLAGS manipulations instructions */ + 'clc','cld','stc','std','cmc','lahf','sahf', + /* Prefix instructions */ + 'lock','rep','repe','repz','repne','repnz', + /* String instructions */ + 'cmps','cmpsb','cmpsw',/*'cmpsd',*/ 'cmpsq', /*CMPSD conflicts with the SSE2 instructions of the same name*/ + 'movs','movsb','movsw',/*'movsd',*/ 'movsq', /*MOVSD conflicts with the SSE2 instructions of the same name*/ + 'scas','scasb','scasw','scasd','scasq', + 'stos','stosb','stosw','stosd','stosq', + 'lods','lodsb','lodsw','lodsd','lodsq', + /* Information instructions */ + 'cpuid','rdtsc','rdtscp','rdpmc','xgetbv', + 'sgdt','sidt','sldt','smsw','str','lar', + /* LWP instructions */ + 'llwpcb','slwpcb','lwpval','lwpins', + /* Instructions from miscellaneous extensions */ + 'crc32','popcnt','lzcnt','tzcnt','movbe','pclmulqdq','rdrand', + /* FSGSBASE instructions */ + 'rdfsbase','rdgsbase','wrfsbase','wrgsbase', + /* BMI1 instructions */ + 'andn','bextr','blsi','blsmk','blsr', + /* BMI2 instructions */ + 'bzhi','mulx','pdep','pext','rorx','sarx','shlx','shrx', + /* TBM instructions */ + 'blcfill','blci','blcic','blcmsk','blcs','blsfill','blsic','t1mskc','tzmsk', + /* Legacy instructions */ + 'arpl','ud2','lds','les','lfs','lgs','lss','lsl','verr','verw', + /* Privileged instructions */ + 'cli','sti','clts','hlt','rsm','in','insb','insw','insd', + 'out','outsb','outsw','outsd','clflush','invd','invlpg','invpcid','wbinvd', + 'iret','iretd','iretq','sysexit','sysret','lidt','lgdt','lldt','lmsw','ltr', + 'monitor','mwait','rdmsr','wrmsr','swapgs', + 'fxsave','fxsave64','fxrstor','fxrstor64', + 'xsave','xsaveopt','xrstor','xsetbv','getsec', + /* VMX instructions */ + 'invept','invvpid','vmcall','vmclear','vmlaunch','vmresume', + 'vmptrld','vmptrst','vmread','vmwrite','vmxoff','vmxon', + /* SVM (AMD-V) instructions */ + 'invlpga','skinit','clgi','stgi','vmload','vmsave','vmmcall','vmrun' + ), + /*FPU*/ + 2 => array( + 'f2xm1','fabs','fadd','faddp','fbld','fbstp','fchs','fclex','fcom','fcomp','fcompp','fdecstp', + 'fdisi','fdiv','fdivp','fdivr','fdivrp','feni','ffree','fiadd','ficom','ficomp','fidiv', + 'fidivr','fild','fimul','fincstp','finit','fist','fistp','fisub','fisubr','fld','fld1', + 'fldcw','fldenv','fldenvw','fldl2e','fldl2t','fldlg2','fldln2','fldpi','fldz','fmul', + 'fmulp','fnclex','fndisi','fneni','fninit','fnop','fnsave','fnsavew','fnstcw','fnstenv', + 'fnstenvw','fnstsw','fpatan','fprem','fptan','frndint','frstor','frstorw','fsave', + 'fsavew','fscale','fsqrt','fst','fstcw','fstenv','fstenvw','fstp','fstsw','fsub','fsubp', + 'fsubr','fsubrp','ftst','fwait','fxam','fxch','fxtract','fyl2x','fyl2xp1', + 'fsetpm','fcos','fldenvd','fnsaved','fnstenvd','fprem1','frstord','fsaved','fsin','fsincos', + 'fstenvd','fucom','fucomp','fucompp','ffreep', + /* FCMOV instructions */ + 'fcomi','fcomip','fucomi','fucomip', + 'fcmovb','fcmove','fcmovbe','fcmovu','fcmovnb','fcmovne','fcmovnbe','fcmovnu', + /* SSE3 instructions */ + 'fisttp' + ), + /*SIMD*/ + 3 => array( + /* MMX instructions */ + 'movd','movq', + 'paddb','paddw','paddd','paddsb','paddsw','paddusb','paddusw', + 'psubb','psubw','psubd','psubsb','psubsw','psubusb','psubusw', + 'pand','pandn','por','pxor', + 'pcmpeqb','pcmpeqd','pcmpeqw','pcmpgtb','pcmpgtd','pcmpgtw', + 'pmaddwd','pmulhw','pmullw', + 'psllw','pslld','psllq','psrlw','psrld','psrlq','psraw','psrad', + 'packuswb','packsswb','packssdw', + 'punpcklbw','punpcklwd','punpckldq','punpckhbw','punpckhwd','punpckhdq', + 'emms', + /* MMX+ instructions */ + 'pavgb','pavgw', + 'pextrw','pinsrw','pmovmskb', + 'pmaxsw','pmaxub','pminsw','pminub', + 'pmulhuw','psadbw','pshufw', + 'prefetchnta','prefetcht0','prefetcht1','prefetcht2', + 'maskmovq','movntq','sfence', + /* EMMX instructions (only available on Cyrix MediaGXm) */ + 'paddsiw','psubsiw', + /*'pmulhrw',*/'pmachriw','pmulhriw', /* PMULHRW conflicts with the 3dnow! instruction of the same name */ + 'pmagw','pdistib','paveb', + 'pmvzb','pmvnzb','pmvlzb','pmvgezb', + /* 3dnow! instructions! */ + 'pfacc','pfadd','pfsub','pfsubr','pfmul', + 'pfcmpeq','pfcmpge','pfcmpgt', + 'pfmax','pfmin', + 'pfrcp','pfrcpit1','pfrcpit2','pfrsqit1','pfrsqrt', + 'pi2fd','pf2id', + 'pavgusb','pmulhrw', + 'femms', + /* 3dnow!+ instructions */ + 'pfnacc','pfpnacc','pi2fw','pf2iw','pswapd', + /* 3dnow! Geode instructions */ + 'pfrsqrtv','pfrcpv', + /* 3dnow! Prefetch instructions */ + 'prefetch','prefetchw', + /* SSE instructions */ + 'addss','addps','subss','subps', + 'mulss','mulps','divss','divps','sqrtss','sqrtps', + 'rcpss','rcpps','rsqrtss','rsqrtps', + 'maxss','maxps','minss','minps', + 'cmpss','comiss','ucomiss','cmpps', + 'cmpeqss','cmpltss','cmpless','cmpunordss','cmpneqss','cmpnltss','cmpnless','cmpordss', + 'cmpeqps','cmpltps','cmpleps','cmpunordps','cmpneqps','cmpnltps','cmpnleps','cmpordps', + 'andnps','andps','orps','xorps', + 'cvtsi2ss','cvtss2si','cvttss2si', + 'cvtpi2ps','cvtps2pi','cvttps2pi', + 'movss','movlps','movhps','movlhps','movhlps','movaps','movups','movntps','movmskps', + 'shufps','unpckhps','unpcklps', + 'ldmxcsr','stmxcsr', + /* SSE2 instructions */ + 'addpd','addsd','subpd','subsd', + 'mulsd','mulpd','divsd','divpd','sqrtsd','sqrtpd', + 'maxsd','maxpd','minsd','minpd', + 'cmpsd','comisd','ucomisd','cmppd', + 'cmpeqsd','cmpltsd','cmplesd','cmpunordsd','cmpneqsd','cmpnltsd','cmpnlesd','cmpordsd', + 'cmpeqpd','cmpltpd','cmplepd','cmpunordpd','cmpneqpd','cmpnltpd','cmpnlepd','cmpordpd', + 'andnpd','andpd','orpd','xorpd', + 'cvtsd2ss','cvtpd2ps','cvtss2sd','cvtps2pd', + 'cvtdq2ps','cvtps2dq','cvttps2dq', + 'cvtdq2pd','cvtpd2dq','cvttpd2dq', + 'cvtsi2sd','cvtsd2si','cvttsd2si', + 'cvtpi2pd','cvtpd2pi','cvttpd2pi', + 'movsd','movlpd','movhpd','movapd','movupd','movntpd','movmskpd', + 'shufpd','unpckhpd','unpcklpd', + 'movnti','movdqa','movdqu','movntdq','maskmovdqu', + 'movdq2q','movq2dq', + 'paddq','psubq','pmuludq', + 'pslldq','psrldq', + 'punpcklqdq','punpckhqdq', + 'pshufhw','pshuflw','pshufd', + 'lfence','mfence', + /* SSE3 instructions */ + 'addsubps','addsubpd', + 'haddps','haddpd','hsubps','hsubpd', + 'movsldup','movshdup','movddup', + 'lddqu', + /* SSSE3 instructions */ + 'psignb','psignw','psignd', + 'pabsb','pabsw','pabsd', + 'palignr','pshufb', + 'pmulhrsw','pmaddubsw', + 'phaddw','phaddd','phaddsw', + 'phsubw','phsubd','phsubsw', + /* SSE4A instructions */ + 'extrq','insertq','movntsd','movntss', + /* SSE4.1 instructions */ + 'mpsadbw','phminposuw', + 'pmuldq','pmulld', + 'dpps','dppd', + 'blendps','blendpd','blendvps','blendvpd','pblendvb','pblendw', + 'pmaxsb','pmaxuw','pmaxsd','pmaxud','pminsb','pminuw','pminsd','pminud', + 'roundps','roundss','roundpd','roundsd', + 'insertps','pinsrb','pinsrd','pinsrq', + 'extractps','pextrb','pextrd','pextrq', + 'pmovsxbw','pmovsxbd','pmovsxbq','pmovsxwd','pmovsxwq','pmovsxdq', + 'pmovzxbw','pmovzxbd','pmovzxbq','pmovzxwd','pmovzxwq','pmovzxdq', + 'ptest', + 'pcmpeqq', + 'packusdw', + 'movntdqa', + /* SSE4.2 instructions */ + 'pcmpgtq', + 'pcmpestri','pcmpestrm','pcmpistri','pcmpistrm', + /* AES instructions */ + 'aesenc','aesenclast','aesdec','aesdeclast','aeskeygenassist','aesimc', + /* VIA Padlock instructions */ + 'xcryptcbc','xcryptcfb','xcryptctr','xcryptecb','xcryptofb', + 'xsha1','xsha256','montmul','xstore', + /* AVX instructions */ + 'vaddss','vaddps','vaddsd','vaddpd','vsubss','vsubps','vsubsd','vsubpd', + 'vaddsubps','vaddsubpd', + 'vhaddps','vhaddpd','vhsubps','vhsubpd', + 'vmulss','vmulps','vmulsd','vmulpd', + 'vmaxss','vmaxps','vmaxsd','vmaxpd','vminss','vminps','vminsd','vminpd', + 'vandps','vandpd','vandnps','vandnpd','vorps','vorpd','vxorps','vxorpd', + 'vblendps','vblendpd','vblendvps','vblendvpd', + 'vcmpss','vcomiss','vucomiss','vcmpsd','vcomisd','vucomisd','vcmpps','vcmppd', + 'vcmpeqss','vcmpltss','vcmpless','vcmpunordss','vcmpneqss','vcmpnltss','vcmpnless','vcmpordss', + 'vcmpeq_uqss','vcmpngess','vcmpngtss','vcmpfalsess','vcmpneq_oqss','vcmpgess','vcmpgtss','vcmptruess', + 'vcmpeq_osss','vcmplt_oqss','vcmple_oqss','vcmpunord_sss','vcmpneq_usss','vcmpnlt_uqss','vcmpnle_uqss','vcmpord_sss', + 'vcmpeq_usss','vcmpnge_uqss','vcmpngt_uqss','vcmpfalse_osss','vcmpneq_osss','vcmpge_oqss','vcmpgt_oqss','vcmptrue_usss', + 'vcmpeqps','vcmpltps','vcmpleps','vcmpunordps','vcmpneqps','vcmpnltps','vcmpnleps','vcmpordps', + 'vcmpeq_uqps','vcmpngeps','vcmpngtps','vcmpfalseps','vcmpneq_oqps','vcmpgeps','vcmpgtps','vcmptrueps', + 'vcmpeq_osps','vcmplt_oqps','vcmple_oqps','vcmpunord_sps','vcmpneq_usps','vcmpnlt_uqps','vcmpnle_uqps','vcmpord_sps', + 'vcmpeq_usps','vcmpnge_uqps','vcmpngt_uqps','vcmpfalse_osps','vcmpneq_osps','vcmpge_oqps','vcmpgt_oqps','vcmptrue_usps', + 'vcmpeqsd','vcmpltsd','vcmplesd','vcmpunordsd','vcmpneqsd','vcmpnltsd','vcmpnlesd','vcmpordsd', + 'vcmpeq_uqsd','vcmpngesd','vcmpngtsd','vcmpfalsesd','vcmpneq_oqsd','vcmpgesd','vcmpgtsd','vcmptruesd', + 'vcmpeq_ossd','vcmplt_oqsd','vcmple_oqsd','vcmpunord_ssd','vcmpneq_ussd','vcmpnlt_uqsd','vcmpnle_uqsd','vcmpord_ssd', + 'vcmpeq_ussd','vcmpnge_uqsd','vcmpngt_uqsd','vcmpfalse_ossd','vcmpneq_ossd','vcmpge_oqsd','vcmpgt_oqsd','vcmptrue_ussd', + 'vcmpeqpd','vcmpltpd','vcmplepd','vcmpunordpd','vcmpneqpd','vcmpnltpd','vcmpnlepd','vcmpordpd', + 'vcmpeq_uqpd','vcmpngepd','vcmpngtpd','vcmpfalsepd','vcmpneq_oqpd','vcmpgepd','vcmpgtpd','vcmptruepd', + 'vcmpeq_ospd','vcmplt_oqpd','vcmple_oqpd','vcmpunord_spd','vcmpneq_uspd','vcmpnlt_uqpd','vcmpnle_uqpd','vcmpord_spd', + 'vcmpeq_uspd','vcmpnge_uqpd','vcmpngt_uqpd','vcmpfalse_ospd','vcmpneq_ospd','vcmpge_oqpd','vcmpgt_oqpd','vcmptrue_uspd', + 'vcvtsd2ss','vcvtpd2ps','vcvtss2sd','vcvtps2pd', + 'vcvtsi2ss','vcvtss2si','vcvttss2si', + 'vcvtpi2ps','vcvtps2pi','vcvttps2pi', + 'vcvtdq2ps','vcvtps2dq','vcvttps2dq', + 'vcvtdq2pd','vcvtpd2dq','vcvttpd2dq', + 'vcvtsi2sd','vcvtsd2si','vcvttsd2si', + 'vcvtpi2pd','vcvtpd2pi','vcvttpd2pi', + 'vdivss','vdivps','vdivsd','vdivpd','vsqrtss','vsqrtps','vsqrtsd','vsqrtpd', + 'vdpps','vdppd', + 'vmaskmovps','vmaskmovpd', + 'vmovss','vmovsd','vmovaps','vmovapd','vmovups','vmovupd','vmovntps','vmovntpd', + 'vmovhlps','vmovlhps','vmovlps','vmovlpd','vmovhps','vmovhpd', + 'vmovsldup','vmovshdup','vmovddup', + 'vmovmskps','vmovmskpd', + 'vroundss','vroundps','vroundsd','vroundpd', + 'vrcpss','vrcpps','vrsqrtss','vrsqrtps', + 'vunpcklps','vunpckhps','vunpcklpd','vunpckhpd', + 'vbroadcastss','vbroadcastsd','vbroadcastf128', + 'vextractps','vinsertps','vextractf128','vinsertf128', + 'vshufps','vshufpd','vpermilps','vpermilpd','vperm2f128', + 'vtestps','vtestpd', + 'vpaddb','vpaddusb','vpaddsb','vpaddw','vpaddusw','vpaddsw','vpaddd','vpaddq', + 'vpsubb','vpsubusb','vpsubsb','vpsubw','vpsubusw','vpsubsw','vpsubd','vpsubq', + 'vphaddw','vphaddsw','vphaddd','vphsubw','vphsubsw','vphsubd', + 'vpsllw','vpslld','vpsllq','vpsrlw','vpsrld','vpsrlq','vpsraw','vpsrad', + 'vpand','vpandn','vpor','vpxor', + 'vpblendwb','vpblendw', + 'vpsignb','vpsignw','vpsignd', + 'vpavgb','vpavgw', + 'vpabsb','vpabsw','vpabsd', + 'vmovd','vmovq','vmovdqa','vmovdqu','vlddqu','vmovntdq','vmovntdqa','vmaskmovdqu', + 'vpmovsxbw','vpmovsxbd','vpmovsxbq','vpmovsxwd','vpmovsxwq','vpmovsxdq', + 'vpmovzxbw','vpmovzxbd','vpmovzxbq','vpmovzxwd','vpmovzxwq','vpmovzxdq', + 'vpackuswb','vpacksswb','vpackusdw','vpackssdw', + 'vpcmpeqb','vpcmpeqw','vpcmpeqd','vpcmpeqq','vpcmpgtb','vpcmpgtw','vpcmpgtd','vpcmpgtq', + 'vpmaddubsw','vpmaddwd', + 'vpmullw','vpmulhuw','vpmulhw','vpmulhrsw','vpmulld','vpmuludq','vpmuldq', + 'vpmaxub','vpmaxsb','vpmaxuw','vpmaxsw','vpmaxud','vpmaxsd', + 'vpminub','vpminsb','vpminuw','vpminsw','vpminud','vpminsd', + 'vpmovmskb','vptest', + 'vpunpcklbw','vpunpcklwd','vpunpckldq','vpunpcklqdq', + 'vpunpckhbw','vpunpckhwd','vpunpckhdq','vpunpckhqdq', + 'vpslldq','vpsrldq','vpalignr', + 'vpshufb','vpshuflw','vpshufhw','vpshufd', + 'vpextrb','vpextrw','vpextrd','vpextrq','vpinsrb','vpinsrw','vpinsrd','vpinsrq', + 'vpsadbw','vmpsadbw','vphminposuw', + 'vpcmpestri','vpcmpestrm','vpcmpistri','vpcmpistrm', + 'vpclmulqdq','vaesenc','vaesenclast','vaesdec','vaesdeclast','vaeskeygenassist','vaesimc', + 'vldmxcsr','vstmxcsr','vzeroall','vzeroupper', + /* AVX2 instructions */ + 'vbroadcasti128','vpbroadcastb','vpbroadcastw','vpbroadcastd','vpbroadcastq', + 'vpblendd', + 'vpermd','vpermq','vperm2i128', + 'vextracti128','vinserti128', + 'vpmaskmovd','vpmaskmovq', + 'vpsllvd','vpsllvq','vpsravd','vpsrlvd', + 'vpgatherdd','vpgatherqd','vgatherdq','vgatherqq', + 'vpermps','vpermpd', + 'vgatherdpd','vgatherqpd','vgatherdps','vgatherqps', + /* XOP instructions */ + 'vfrczss','vfrczps','vfrczsd','vfrczpd', + 'vpermil2ps','vperlil2pd', + 'vpcomub','vpcomb','vpcomuw','vpcomw','vpcomud','vpcomd','vpcomuq','vpcomq', + 'vphaddubw','vphaddbw','vphaddubd','vphaddbd','vphaddubq','vphaddbq', + 'vphadduwd','vphaddwd','vphadduwq','vphaddwq','vphaddudq','vphadddq', + 'vphsubbw','vphsubwd','vphsubdq', + 'vpmacsdd','vpmacssdd','vpmacsdql','vpmacssdql','vpmacsdqh','vpmacssdqh', + 'vpmacsww','vpmacssww','vpmacswd','vpmacsswd', + 'vpmadcswd','vpmadcsswd', + 'vpcmov','vpperm', + 'vprotb','vprotw','vprotd','vprotq', + 'vpshab','vpshaw','vpshad','vpshaq', + 'vpshlb','vpshlw','vpshld','vpshlq', + /* CVT16 instructions */ + 'vcvtph2ps','vcvtps2ph', + /* FMA4 instructions */ + 'vfmaddss','vfmaddps','vfmaddsd','vfmaddpd', + 'vfmsubss','vfmsubps','vfmsubsd','vfmsubpd', + 'vnfmaddss','vnfmaddps','vnfmaddsd','vnfmaddpd', + 'vnfmsubss','vnfmsubps','vnfmsubsd','vnfmsubpd', + 'vfmaddsubps','vfmaddsubpd','vfmsubaddps','vfmsubaddpd', + /* FMA3 instructions */ + 'vfmadd132ss','vfmadd213ss','vfmadd231ss', + 'vfmadd132ps','vfmadd213ps','vfmadd231ps', + 'vfmadd132sd','vfmadd213sd','vfmadd231sd', + 'vfmadd132pd','vfmadd213pd','vfmadd231pd', + 'vfmaddsub132ps','vfmaddsub213ps','vfmaddsub231ps', + 'vfmaddsub132pd','vfmaddsub213pd','vfmaddsub231pd', + 'vfmsubadd132ps','vfmsubadd213ps','vfmsubadd231ps', + 'vfmsubadd132pd','vfmsubadd213pd','vfmsubadd231pd', + 'vfmsub132ss','vfmsub213ss','vfmsub231ss', + 'vfmsub132ps','vfmsub213ps','vfmsub231ps', + 'vfmsub132sd','vfmsub213sd','vfmsub231sd', + 'vfmsub132pd','vfmsub213pd','vfmsub231pd', + 'vfnmadd132ss','vfnmadd213ss','vfnmadd231ss', + 'vfnmadd132ps','vfnmadd213ps','vfnmadd231ps', + 'vfnmadd132sd','vfnmadd213sd','vfnmadd231sd', + 'vfnmadd132pd','vfnmadd213pd','vfnmadd231pd', + 'vfnmsub132ss','vfnmsub213ss','vfnmsub231ss', + 'vfnmsub132ps','vfnmsub213ps','vfnmsub231ps', + 'vfnmsub132sd','vfnmsub213sd','vfnmsub231sd', + 'vfnmsub132pd','vfnmsub213pd','vfnmsub231pd' + ), + /*registers*/ + 4 => array( + /* General-Purpose Registers */ + 'al','ah','bl','bh','cl','ch','dl','dh','sil','dil','bpl','spl', + 'r8b','r9b','r10b','r11b','r12b','r13b','r14b','r15b', + 'ax','bx','cx','dx','si','di','bp','sp', + 'r8w','r9w','r10w','r11w','r12w','r13w','r14w','r15w', + 'eax','ebx','ecx','edx','esi','edi','ebp','esp', + 'r8d','r9d','r10d','r11d','r12d','r13d','r14d','r15d', + 'rax','rcx','rdx','rbx','rsp','rbp','rsi','rdi', + 'r8','r9','r10','r11','r12','r13','r14','r15', + /* Debug Registers */ + 'dr0','dr1','dr2','dr3','dr6','dr7', + /* Control Registers */ + 'cr0','cr2','cr3','cr4','cr8', + /* Test Registers (Supported on Intel 486 only) */ + 'tr3','tr4','tr5','tr6','tr7', + /* Segment Registers */ + 'cs','ds','es','fs','gs','ss', + /* FPU Registers */ + 'st','st0','st1','st2','st3','st4','st5','st6','st7', + /* MMX Registers */ + 'mm0','mm1','mm2','mm3','mm4','mm5','mm6','mm7', + /* SSE Registers */ + 'xmm0','xmm1','xmm2','xmm3','xmm4','xmm5','xmm6','xmm7', + 'xmm8','xmm9','xmm10','xmm11','xmm12','xmm13','xmm14','xmm15', + /* AVX Registers */ + 'ymm0','ymm1','ymm2','ymm3','ymm4','ymm5','ymm6','ymm7', + 'ymm8','ymm9','ymm10','ymm11','ymm12','ymm13','ymm14','ymm15' + ), + /*Directive*/ + 5 => array( + 'db','dw','dd','dq','dt','do','dy', + 'resb','resw','resd','resq','rest','reso','resy','incbin','equ','times','safeseh', + '__utf16__','__utf32__', + 'default','cpu','float','start','imagebase','osabi', + '..start','..imagebase','..gotpc','..gotoff','..gottpoff','..got','..plt','..sym','..tlsie', + 'section','segment','__sect__','group','absolute', + '.bss','.comment','.data','.lbss','.ldata','.lrodata','.rdata','.rodata','.tbss','.tdata','.text', + 'alloc','bss','code','exec','data','noalloc','nobits','noexec','nowrite','progbits','rdata','tls','write', + 'private','public','common','stack','overlay','class', + 'extern','global','import','export', + '%define','%idefine','%xdefine','%ixdefine','%assign','%undef', + '%defstr','%idefstr','%deftok','%ideftok', + '%strcat','%strlen','%substr', + '%macro','%imacro','%rmacro','%exitmacro','%endmacro','%unmacro', + '%if','%ifn','%elif','%elifn','%else','%endif', + '%ifdef','%ifndef','%elifdef','%elifndef', + '%ifmacro','%ifnmacro','%elifmacro','%elifnmacro', + '%ifctx','%ifnctx','%elifctx','%elifnctx', + '%ifidn','%ifnidn','%elifidn','%elifnidn', + '%ifidni','%ifnidni','%elifidni','%elifnidni', + '%ifid','%ifnid','%elifid','%elifnid', + '%ifnum','%ifnnum','%elifnum','%elifnnum', + '%ifstr','%ifnstr','%elifstr','%elifnstr', + '%iftoken','%ifntoken','%eliftoken','%elifntoken', + '%ifempty','%ifnempty','%elifempty','%elifnempty', + '%ifenv','%ifnenv','%elifenv','%elifnenv', + '%rep','%exitrep','%endrep', + '%while','%exitwhile','%endwhile', + '%include','%pathsearch','%depend','%use', + '%push','%pop','%repl','%arg','%local','%stacksize','flat','flat64','large','small', + '%error','%warning','%fatal', + '%00','.nolist','%rotate','%line','%!','%final','%clear', + 'struc','endstruc','istruc','at','iend', + 'align','alignb','sectalign', + 'bits','use16','use32','use64', + '__nasm_major__','__nasm_minor__','__nasm_subminor__','___nasm_patchlevel__', + '__nasm_version_id__','__nasm_ver__', + '__file__','__line__','__pass__','__bits__','__output_format__', + '__date__','__time__','__date_num__','__time_num__','__posix_time__', + '__utc_date__','__utc_time__','__utc_date_num__','__utc_time_num__', + '__float_daz__','__float_round__','__float__', + /* Keywords from standard packages */ + '__use_altreg__', + '__use_smartalign__','smartalign','__alignmode__', + '__use_fp__','__infinity__','__nan__','__qnan__','__snan__', + '__float8__','__float16__','__float32__','__float64__','__float80m__','__float80e__','__float128l__','__float128h__' + ), + /*Operands*/ + 6 => array( + 'a16','a32','a64','o16','o32','o64','strict', + 'byte','word','dword','qword','tword','oword','yword','nosplit', + '%0','%1','%2','%3','%4','%5','%6','%7','%8','%9', + 'abs','rel', + 'seg','wrt' + ) + ), + 'SYMBOLS' => array( + 1 => array( + '[', ']', '(', ')', + '+', '-', '*', '/', '%', + '.', ',', ';', ':' + ), + 2 => array( + '$','$$','%+','%?','%??' + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00007f; font-weight: bold;', + 2 => 'color: #0000ff;', + 3 => 'color: #b00040;', + 4 => 'color: #46aa03; font-weight: bold;', + 5 => 'color: #0000ff; font-weight: bold;', + 6 => 'color: #0000ff; font-weight: bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 2 => 'color: #adadad; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900; font-weight: bold;' + ), + 'STRINGS' => array( + 0 => 'color: #7f007f;' + ), + 'NUMBERS' => array( + 0 => 'color: #ff0000;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 1 => 'color: #339933;', + 2 => 'color: #0000ff; font-weight: bold;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '' + ), + 'NUMBERS' => + GESHI_NUMBER_BIN_PREFIX_PERCENT | + GESHI_NUMBER_BIN_SUFFIX | + GESHI_NUMBER_HEX_PREFIX | + GESHI_NUMBER_HEX_SUFFIX | + GESHI_NUMBER_OCT_SUFFIX | + GESHI_NUMBER_INT_BASIC | + GESHI_NUMBER_FLT_NONSCI | + GESHI_NUMBER_FLT_NONSCI_F | + GESHI_NUMBER_FLT_SCI_ZERO, + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 8, + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => "(?|^])", + 'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_<\|%])" + ) + ) +); + diff --git a/vendor/easybook/geshi/geshi/asp.php b/vendor/easybook/geshi/geshi/asp.php new file mode 100644 index 0000000000..cd69efdf32 --- /dev/null +++ b/vendor/easybook/geshi/geshi/asp.php @@ -0,0 +1,163 @@ + 'ASP', + 'COMMENT_SINGLE' => array(1 => "'", 2 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'include', 'file', 'Const', 'Dim', 'Option', 'Explicit', 'Implicit', 'Set', 'Select', 'ReDim', 'Preserve', + 'ByVal', 'ByRef', 'End', 'Private', 'Public', 'If', 'Then', 'Else', 'ElseIf', 'Case', 'With', 'NOT', + 'While', 'Wend', 'For', 'Loop', 'Do', 'Request', 'Response', 'Server', 'ADODB', 'Session', 'Application', + 'Each', 'In', 'Get', 'Next', 'INT', 'CINT', 'CBOOL', 'CDATE', 'CBYTE', 'CCUR', 'CDBL', 'CLNG', 'CSNG', + 'CSTR', 'Fix', 'Is', 'Sgn', 'String', 'Boolean', 'Currency', 'Me', 'Single', 'Long', 'Integer', 'Byte', + 'Variant', 'Double', 'To', 'Let', 'Xor', 'Resume', 'On', 'Error', 'Imp', 'GoTo', 'Call', 'Global' + ), + 2 => array( + 'Null', 'Nothing', 'And', + 'False', + 'True', 'var', 'Or', 'BOF', 'EOF', 'xor', + 'Function', 'Class', 'New', 'Sub' + ), + 3 => array( + 'CreateObject', 'Write', 'Redirect', 'Cookies', 'BinaryRead', 'ClientCertificate', 'Form', 'QueryString', + 'ServerVariables', 'TotalBytes', 'AddHeader', 'AppendToLog', 'BinaryWrite', 'Buffer', 'CacheControl', + 'Charset', 'Clear', 'ContentType', 'End()', 'Expires', 'ExpiresAbsolute', 'Flush()', 'IsClientConnected', + 'PICS', 'Status', 'Connection', 'Recordset', 'Execute', 'Abandon', 'Lock', 'UnLock', 'Command', 'Fields', + 'Properties', 'Property', 'Send', 'Replace', 'InStr', 'TRIM', 'NOW', 'Day', 'Month', 'Hour', 'Minute', 'Second', + 'Year', 'MonthName', 'LCase', 'UCase', 'Abs', 'Array', 'As', 'LEN', 'MoveFirst', 'MoveLast', 'MovePrevious', + 'MoveNext', 'LBound', 'UBound', 'Transfer', 'Open', 'Close', 'MapPath', 'FileExists', 'OpenTextFile', 'ReadAll' + ) + ), + 'SYMBOLS' => array( + 1 => array( + '<%', '%>' + ), + 0 => array( + '(', ')', '[', ']', '!', '@', '%', '&', '*', '|', '/', '<', '>', + ';', ':', '?', '='), + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #990099; font-weight: bold;', + 2 => 'color: #0000ff; font-weight: bold;', + 3 => 'color: #330066;' + ), + 'COMMENTS' => array( + 1 => 'color: #008000;', + 2 => 'color: #ff6600;', + 'MULTI' => 'color: #008000;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #006600; font-weight:bold;' + ), + 'STRINGS' => array( + 0 => 'color: #cc0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #800000;' + ), + 'METHODS' => array( + 1 => 'color: #9900cc;' + ), + 'SYMBOLS' => array( + 0 => 'color: #006600; font-weight: bold;', + 1 => 'color: #000000; font-weight: bold;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + 2 => '', + 3 => '' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + 0 => array( + '<%' => '%>' + ), + 1 => array( + '' + ), + 2 => array( + '' + ), + 3 => "/(?P<%=?)(?:\"[^\"]*?\"|\/\*(?!\*\/).*?\*\/|.)*?(?P%>|\Z)/sm" + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true, + 1 => true, + 2 => true, + 3 => true + ) +); + diff --git a/vendor/easybook/geshi/geshi/asymptote.php b/vendor/easybook/geshi/geshi/asymptote.php new file mode 100644 index 0000000000..295cb0a568 --- /dev/null +++ b/vendor/easybook/geshi/geshi/asymptote.php @@ -0,0 +1,192 @@ + 'asymptote', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array( + //Multiline-continued single-line comments + 1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m', + //Multiline-continued preprocessor define + 2 => '/#(?:\\\\\\\\|\\\\\\n|.)*$/m' + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'ESCAPE_REGEXP' => array( + //Simple Single Char Escapes + 1 => "#\\\\[\\\\abfnrtv\'\"?\n]#i", + //Hexadecimal Char Specs + 2 => "#\\\\x[\da-fA-F]{2}#", + //Hexadecimal Char Specs + 3 => "#\\\\u[\da-fA-F]{4}#", + //Hexadecimal Char Specs + 4 => "#\\\\U[\da-fA-F]{8}#", + //Octal Char Specs + 5 => "#\\\\[0-7]{1,3}#" + ), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B | + GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI | + GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO, + 'KEYWORDS' => array( + 1 => array( + 'and','controls','tension','atleast','curl','if','else','while','for','do','return','break','continue','struct','typedef','new','access','import','unravel','from','include','quote','static','public','private','restricted','this','explicit','true','false','null','cycle','newframe','operator' + ), + 2 => array( + 'Braid','FitResult','Label','Legend','Segment','Solution','TreeNode','abscissa','arc','arrowhead','binarytree','binarytreeNode','block','bool','bool3','bounds','bqe','circle','conic','coord','coordsys','cputime','ellipse','file','filltype','frame','grid3','guide','horner','hsv','hyperbola','indexedTransform','int','inversion','key','light','line','linefit','marginT','marker','mass','object','pair','parabola','path','path3','pen','picture','point','position','projection','real','revolution','scaleT','scientific','segment','side','slice','solution','splitface','string','surface','tensionSpecifier','ticklocate','ticksgridT','tickvalues','transform','transformation','tree','triangle','trilinear','triple','vector','vertex','void'), + 3 => array( + 'AND','Arc','ArcArrow','ArcArrows','Arrow','Arrows','Automatic','AvantGarde','BBox','BWRainbow','BWRainbow2','Bar','Bars','BeginArcArrow','BeginArrow','BeginBar','BeginDotMargin','BeginMargin','BeginPenMargin','Blank','Bookman','Bottom','BottomTop','Bounds','Break','Broken','BrokenLog','CLZ','CTZ','Ceil','Circle','CircleBarIntervalMarker','Cos','Courier','CrossIntervalMarker','DOSendl','DOSnewl','DefaultFormat','DefaultLogFormat','Degrees','Dir','DotMargin','DotMargins','Dotted','Draw','Drawline','Embed','EndArcArrow','EndArrow','EndBar','EndDotMargin','EndMargin','EndPenMargin','Fill','FillDraw','Floor','Format','Full','Gaussian','Gaussrand','Gaussrandpair', + 'Gradient','Grayscale','Helvetica','Hermite','HookHead','InOutTicks','InTicks','Jn','Label','Landscape','Left','LeftRight','LeftTicks','Legend','Linear','Link','Log','LogFormat','Margin','Margins','Mark','MidArcArrow','MidArrow','NOT','NewCenturySchoolBook','NoBox','NoMargin','NoModifier','NoTicks','NoTicks3','NoZero','NoZeroFormat','None','OR','OmitFormat','OmitTick','OmitTickInterval','OmitTickIntervals','OutTicks','Ox','Oy','Palatino','PaletteTicks','Pen','PenMargin','PenMargins','Pentype','Portrait','RadialShade','RadialShadeDraw','Rainbow','Range','Relative','Right','RightTicks','Rotate','Round','SQR','Scale','ScaleX','ScaleY','ScaleZ','Seascape','Segment','Shift','Sin','Slant','Spline','StickIntervalMarker','Straight','Symbol','Tan','TeXify','Ticks','Ticks3','TildeIntervalMarker','TimesRoman','Top','TrueMargin','UnFill','UpsideDown','Wheel','X','XEquals','XOR','XY','XYEquals','XYZero','XYgrid','XZEquals','XZZero','XZero','XZgrid','Y','YEquals','YXgrid','YZ','YZEquals','YZZero','YZero','YZgrid','Yn','Z','ZX','ZXgrid','ZYgrid','ZapfChancery','ZapfDingbats','_begingroup3','_cputime','_draw','_eval','_image','_labelpath','_projection','_strokepath','_texpath','aCos','aSin','aTan','abort','abs','accel','acos','acosh','acot','acsc','activatequote','add', + 'addArrow','addMargins','addSaveFunction','addpenarc','addpenline','adjust','alias','align','all','altitude','angabscissa','angle','angpoint','animate','annotate','anticomplementary','antipedal','apply','approximate','arc','arcarrowsize','arccircle','arcdir','arcfromcenter','arcfromfocus','arclength','arcnodesnumber','arcpoint','arcsubtended','arcsubtendedcenter','arctime','arctopath','array','arrow','arrow2','arrowbase','arrowbasepoints','arrowsize','asec','asin','asinh','ask','assert','asy','asycode','asydir','asyfigure','asyfilecode','asyinclude','asywrite','atan','atan2','atanh','atbreakpoint','atexit','attach','attract','atupdate','autoformat','autoscale','autoscale3','axes','axes3','axialshade','axis','axiscoverage','azimuth','babel','background','bangles','bar','barmarksize','barsize','basealign','baseline','bbox','beep','begin','beginclip','begingroup','beginpoint','between','bevel','bezier','bezierP','bezierPP','bezierPPP','bezulate','bibliography','bibliographystyle','binarytree','binarytreeNode','binomial','binput','bins','bisector','bisectorpoint','bispline','blend','blockconnector','boutput','box','bqe','breakpoint','breakpoints','brick','buildRestoreDefaults','buildRestoreThunk','buildcycle','bulletcolor','byte','calculateScaling','canonical','canonicalcartesiansystem','cartesiansystem','case1','case2','case3','case4','cbrt','cd','ceil','center','centerToFocus', + 'centroid','cevian','change2','changecoordsys','checkSegment','checkconditionlength','checker','checkincreasing','checklengths','checkposition','checktriangle','choose','circle','circlebarframe','circlemarkradius','circlenodesnumber','circumcenter','circumcircle','clamped','clear','clip','clipdraw','close','cmyk','code','colatitude','collect','collinear','color','colorless','colors','colorspace','comma','compassmark','complement','complementary','concat','concurrent','cone','conic','conicnodesnumber','conictype','conj','connect','connected','connectedindex','containmentTree','contains','contour','contour3','contouredges','controlSpecifier','convert','coordinates','coordsys','copy','copyPairOrTriple','cos','cosh','cot','countIntersections','cputime','crop','cropcode','cross', + 'crossframe','crosshatch','crossmarksize','csc','cubicroots','curabscissa','curlSpecifier','curpoint','currentarrow','currentexitfunction','currentmomarrow','currentpolarconicroutine','curve','cut','cutafter','cutbefore','cyclic','cylinder','deactivatequote','debugger','deconstruct','defaultdir','defaultformat','defaultpen','defined','degenerate','degrees','delete','deletepreamble','determinant','diagonal','diamond','diffdiv','dir','dirSpecifier','dirtime','display','distance', + 'divisors','do_overpaint','dot','dotframe','dotsize','downcase','draw','drawAll','drawDoubleLine','drawFermion','drawGhost','drawGluon','drawMomArrow','drawPRCcylinder','drawPRCdisk','drawPRCsphere','drawPRCtube','drawPhoton','drawScalar','drawVertex','drawVertexBox','drawVertexBoxO','drawVertexBoxX','drawVertexO','drawVertexOX','drawVertexTriangle','drawVertexTriangleO','drawVertexX','drawarrow','drawarrow2','drawline','drawpixel','drawtick','duplicate','elle','ellipse','ellipsenodesnumber','embed','embed3','empty','enclose','end','endScript','endclip','endgroup','endgroup3','endl','endpoint','endpoints','eof','eol','equation','equations','erase','erasestep','erf','erfc','error','errorbar','errorbars','eval','excenter','excircle','exit','exitXasyMode','exitfunction','exp','expfactors','expi','expm1','exradius','extend','extension','extouch','fabs','factorial','fermat','fft','fhorner','figure','file','filecode','fill','filldraw','filloutside','fillrule','filltype','find','finite','finiteDifferenceJacobian','firstcut','firstframe','fit','fit2','fixedscaling','floor','flush','fmdefaults','fmod','focusToCenter','font','fontcommand','fontsize','foot','format','frac','frequency','fromCenter','fromFocus','fspline','functionshade','gamma','generate_random_backtrace','generateticks','gergonne','getc','getint','getpair','getreal','getstring','gettriple','gluon','gouraudshade','graph','graphic','gray','grestore','grid','grid3','gsave','halfbox','hatch','hdiffdiv','hermite','hex','histogram','history','hline','hprojection', + 'hsv','hyperbola','hyperbolanodesnumber','hyperlink','hypot','identity','image','incenter','incentral','incircle','increasing','incrementposition','indexedTransform','indexedfigure','initXasyMode','initdefaults','input','inradius','insert','inside','integrate','interactive','interior','interp','interpolate','intersect','intersection','intersectionpoint','intersectionpoints','intersections','intouch','inverse','inversion','invisible','is3D','isCCW','isDuplicate','isogonal','isogonalconjugate','isotomic','isotomicconjugate','isparabola','italic','item','jobname','key','kurtosis','kurtosisexcess','label','labelaxis','labelmargin','labelpath','labels','labeltick','labelx','labelx3','labely','labely3','labelz','labelz3','lastcut','latex','latitude','latticeshade','layer','layout','ldexp','leastsquares','legend','legenditem','length','lexorder','lift','light','limits','line','linear','linecap','lineinversion','linejoin','linemargin','lineskip','linetype','linewidth','link','list','lm_enorm','lm_evaluate_default','lm_lmdif','lm_lmpar','lm_minimize','lm_print_default','lm_print_quiet','lm_qrfac','lm_qrsolv','locale','locate', + 'locatefile','location','log','log10','log1p','logaxiscoverage','longitude','lookup','makeNode','makedraw','makepen','map','margin','markangle','markangleradius','markanglespace','markarc','marker','markinterval','marknodes','markrightangle','markuniform','mass','masscenter','massformat','math','max','max3','maxAfterTransform','maxbezier','maxbound','maxcoords','maxlength','maxratio','maxtimes','mean','medial','median','midpoint','min','min3','minAfterTransform','minbezier','minbound','minipage','minratio','mintimes','miterlimit','mktemp','momArrowPath','momarrowsize','monotonic','multifigure','nativeformat','natural','needshipout','newl','newpage','newslide','newton','newtree','nextframe','nextnormal','nextpage','nib','nodabscissa','none','norm','normalvideo','notaknot','nowarn','numberpage','nurb','object','offset','onpath','opacity','opposite','orientation','origin','orthic','orthocentercenter','outformat','outline','outname','outprefix','output','overloadedMessage','overwrite','pack','pad','pairs','palette','parabola','parabolanodesnumber','parallel','parallelogram','partialsum','path','path3','pattern','pause','pdf','pedal','periodic','perp','perpendicular','perpendicularmark','phantom','phi1','phi2','phi3','photon','piecewisestraight','point','polar','polarconicroutine','polargraph','polygon','postcontrol','postscript','pow10','ppoint','prc','prc0','precision','precontrol','prepend','printBytecode','print_random_addresses','project','projection','purge','pwhermite','quadrant','quadraticroots','quantize','quarticroots','quotient','radialshade','radians','radicalcenter','radicalline','radius','rand','randompath','rd','readline','realmult','realquarticroots','rectangle','rectangular','rectify','reflect','relabscissa','relative','relativedistance','reldir','relpoint','reltime','remainder','remark','removeDuplicates','rename','replace','report','resetdefaultpen','restore','restoredefaults','reverse','reversevideo','rf','rfind','rgb','rgba','rgbint','rms', + 'rotate','rotateO','rotation','round','roundbox','roundedpath','roundrectangle','same','samecoordsys','sameside','sample','save','savedefaults','saveline','scale','scale3','scaleO','scaleT','scaleless','scientific','search','searchindex','searchtree','sec','secondaryX','secondaryY','seconds','section','sector','seek','seekeof','segment','sequence','setcontour','setpens','sgn','sgnd','sharpangle','sharpdegrees','shift','shiftless','shipout','shipout3','show','side','simeq','simpson','sin','sinh','size','size3','skewness','skip','slant','sleep','slope','slopefield','solve','solveBVP','sort','sourceline','sphere','split','sqrt','square','srand','standardizecoordsys','startScript','stdev','step','stickframe','stickmarksize','stickmarkspace','stop','straight','straightness','string','stripdirectory','stripextension','stripfile','stripsuffix','strokepath','subdivide','subitem','subpath','substr','sum','surface','symmedial','symmedian','system', + 'tab','tableau','tan','tangent','tangential','tangents','tanh','tell','tensionSpecifier','tensorshade','tex','texcolor','texify','texpath','texpreamble','texreset','texshipout','texsize','textpath','thick','thin','tick','tickMax','tickMax3','tickMin','tickMin3','ticklabelshift','ticklocate','tildeframe','tildemarksize','tile','tiling','time','times','title','titlepage','topbox','transform','transformation','transpose','trembleFuzz','triangle','triangleAbc','triangleabc','triangulate','tricoef','tridiagonal','trilinear','trim','truepoint','tube','uncycle','unfill','uniform','unique','unit','unitrand','unitsize','unityroot','unstraighten','upcase','updatefunction','uperiodic','upscale','uptodate','usepackage','usersetting','usetypescript','usleep','value','variance','variancebiased','vbox','vector','vectorfield','verbatim','view','vline','vperiodic','vprojection','warn','warning','windingnumber','write','xaxis','xaxis3','xaxis3At','xaxisAt','xequals','xinput','xlimits','xoutput','xpart','xscale','xscaleO','xtick','xtick3','xtrans','yaxis','yaxis3','yaxis3At','yaxisAt','yequals','ylimits','ypart','yscale','yscaleO','ytick','ytick3','ytrans','zaxis3','zaxis3At','zero','zero3','zlimits','zpart','ztick','ztick3','ztrans' + ), + 4 => array( + 'AliceBlue','Align','Allow','AntiqueWhite','Apricot','Aqua','Aquamarine','Aspect','Azure','BeginPoint','Beige','Bisque','Bittersweet','Black','BlanchedAlmond','Blue','BlueGreen','BlueViolet','Both','Break','BrickRed','Brown','BurlyWood','BurntOrange','CCW','CW','CadetBlue','CarnationPink','Center','Centered','Cerulean','Chartreuse','Chocolate','Coeff','Coral','CornflowerBlue','Cornsilk','Crimson','Crop','Cyan','Dandelion','DarkBlue','DarkCyan','DarkGoldenrod','DarkGray','DarkGreen','DarkKhaki','DarkMagenta','DarkOliveGreen','DarkOrange','DarkOrchid','DarkRed','DarkSalmon','DarkSeaGreen','DarkSlateBlue','DarkSlateGray','DarkTurquoise','DarkViolet','DeepPink','DeepSkyBlue','DefaultHead','DimGray','DodgerBlue','Dotted','Down','Draw','E','ENE','EPS','ESE','E_Euler','E_PC','E_RK2','E_RK3BS','Emerald','EndPoint','Euler','Fill','FillDraw','FireBrick','FloralWhite','ForestGreen','Fuchsia','Gainsboro','GhostWhite','Gold','Goldenrod','Gray','Green','GreenYellow','Honeydew','HookHead','Horizontal','HotPink','I','IgnoreAspect','IndianRed','Indigo','Ivory','JOIN_IN','JOIN_OUT','JungleGreen','Khaki','LM_DWARF','LM_MACHEP','LM_SQRT_DWARF','LM_SQRT_GIANT','LM_USERTOL','Label','Lavender','LavenderBlush','LawnGreen','Left','LeftJustified','LeftSide','LemonChiffon','LightBlue','LightCoral','LightCyan','LightGoldenrodYellow', + 'LightGreen','LightGrey','LightPink','LightSalmon','LightSeaGreen','LightSkyBlue','LightSlateGray','LightSteelBlue','LightYellow','Lime','LimeGreen','Linear','Linen','Log','Logarithmic','Magenta','Mahogany','Mark','MarkFill','Maroon','Max','MediumAquamarine','MediumBlue','MediumOrchid','MediumPurple','MediumSeaGreen','MediumSlateBlue','MediumSpringGreen','MediumTurquoise','MediumVioletRed','Melon','MidPoint','MidnightBlue','Min','MintCream','MistyRose','Moccasin','Move','MoveQuiet','Mulberry','N','NE','NNE','NNW','NW','NavajoWhite','Navy','NavyBlue','NoAlign','NoCrop','NoFill','NoSide','OldLace','Olive','OliveDrab','OliveGreen','Orange','OrangeRed','Orchid','Ox','Oy','PC','PaleGoldenrod','PaleGreen','PaleTurquoise','PaleVioletRed','PapayaWhip','Peach','PeachPuff','Periwinkle','Peru','PineGreen','Pink','Plum','PowderBlue','ProcessBlue','Purple','RK2','RK3','RK3BS','RK4','RK5','RK5DP','RK5F','RawSienna','Red','RedOrange','RedViolet','Rhodamine','Right','RightJustified','RightSide','RosyBrown','RoyalBlue','RoyalPurple','RubineRed','S','SE','SSE','SSW','SW','SaddleBrown','Salmon','SandyBrown','SeaGreen','Seashell','Sepia','Sienna','Silver','SimpleHead','SkyBlue','SlateBlue','SlateGray','Snow','SpringGreen','SteelBlue','Suppress','SuppressQuiet','Tan','TeXHead','Teal','TealBlue','Thistle','Ticksize','Tomato', + 'Turquoise','UnFill','Up','VERSION','Value','Vertical','Violet','VioletRed','W','WNW','WSW','Wheat','White','WhiteSmoke','WildStrawberry','XYAlign','YAlign','Yellow','YellowGreen','YellowOrange','addpenarc','addpenline','align','allowstepping','angularsystem','animationdelay','appendsuffix','arcarrowangle','arcarrowfactor','arrow2sizelimit','arrowangle','arrowbarb','arrowdir','arrowfactor','arrowhookfactor','arrowlength','arrowsizelimit','arrowtexfactor','authorpen','axis','axiscoverage','axislabelfactor','background','backgroundcolor','backgroundpen','barfactor','barmarksizefactor','basealign','baselinetemplate','beveljoin','bigvertexpen','bigvertexsize','black','blue','bm','bottom','bp','brown','bullet','byfoci','byvertices','camerafactor','chartreuse','circlemarkradiusfactor','circlenodesnumberfactor','circleprecision','circlescale','cm','codefile','codepen','codeskip','colorPen','coloredNodes','coloredSegments', + 'conditionlength','conicnodesfactor','count','cputimeformat','crossmarksizefactor','currentcoordsys','currentlight','currentpatterns','currentpen','currentpicture','currentposition','currentprojection','curvilinearsystem','cuttings','cyan','darkblue','darkbrown','darkcyan','darkgray','darkgreen','darkgrey','darkmagenta','darkolive','darkred','dashdotted','dashed','datepen','dateskip','debuggerlines','debugging','deepblue','deepcyan','deepgray','deepgreen','deepgrey','deepmagenta','deepred','default','defaultControl','defaultS','defaultbackpen','defaultcoordsys','defaultexcursion','defaultfilename','defaultformat','defaultmassformat','defaultpen','diagnostics','differentlengths','dot','dotfactor','dotframe','dotted','doublelinepen','doublelinespacing','down','duplicateFuzz','edge','ellipsenodesnumberfactor','eps','epsgeo','epsilon','evenodd','expansionfactor','extendcap','exterior','fermionpen','figureborder','figuremattpen','file3','firstnode','firststep','foregroundcolor','fuchsia','fuzz','gapfactor','ghostpen','gluonamplitude','gluonpen','gluonratio','gray','green','grey','hatchepsilon','havepagenumber','heavyblue','heavycyan','heavygray','heavygreen','heavygrey','heavymagenta','heavyred','hline','hwratio','hyperbola','hyperbolanodesnumberfactor','identity4','ignore','inXasyMode','inch','inches','includegraphicscommand','inf','infinity','institutionpen','intMax','intMin','interior','invert','invisible','itempen','itemskip','itemstep','labelmargin','landscape','lastnode','left','legendhskip','legendlinelength', + 'legendmargin','legendmarkersize','legendmaxrelativewidth','legendvskip','lightblue','lightcyan','lightgray','lightgreen','lightgrey','lightmagenta','lightolive','lightred','lightyellow','line','linemargin','lm_infmsg','lm_shortmsg','longdashdotted','longdashed','magenta','magneticRadius','mantissaBits','markangleradius','markangleradiusfactor','markanglespace','markanglespacefactor','mediumblue','mediumcyan','mediumgray','mediumgreen','mediumgrey','mediummagenta','mediumred','mediumyellow','middle','minDistDefault','minblockheight','minblockwidth','mincirclediameter','minipagemargin','minipagewidth','minvertexangle','miterjoin','mm','momarrowfactor','momarrowlength','momarrowmargin','momarrowoffset','momarrowpen','monoPen','morepoints','nCircle','newbulletcolor','ngraph','nil','nmesh','nobasealign','nodeMarginDefault','nodesystem','nomarker','nopoint','noprimary','nullpath','nullpen','numarray','ocgindex','oldbulletcolor','olive','orange','origin','overpaint','page','pageheight','pagemargin','pagenumberalign','pagenumberpen','pagenumberposition','pagewidth','paleblue','palecyan','palegray','palegreen','palegrey', + 'palemagenta','palered','paleyellow','parabolanodesnumberfactor','perpfactor','phi','photonamplitude','photonpen','photonratio','pi','pink','plain','plain_bounds','plain_scaling','plus','preamblenodes','pt','purple','r3','r4a','r4b','randMax','realDigits','realEpsilon','realMax','realMin','red','relativesystem','reverse','right','roundcap','roundjoin','royalblue','salmon','saveFunctions','scalarpen','sequencereal','settings','shipped','signedtrailingzero','solid','springgreen','sqrtEpsilon','squarecap','squarepen','startposition','stdin','stdout','stepfactor','stepfraction','steppagenumberpen','stepping','stickframe','stickmarksizefactor','stickmarkspacefactor','swap','textpen','ticksize','tildeframe','tildemarksizefactor','tinv','titlealign','titlepagepen','titlepageposition','titlepen','titleskip','top','trailingzero','treeLevelStep','treeMinNodeWidth','treeNodeStep','trembleAngle','trembleFrequency','trembleRandom','undefined','unitcircle','unitsquare','up','urlpen','urlskip','version','vertexpen','vertexsize','viewportmargin','viewportsize','vline','white','wye','xformStack','yellow','ylabelwidth','zerotickfuzz','zerowinding' + ) + ), + 'SYMBOLS' => array( + 0 => array( + '(', ')', '{', '}', '[', ']' + ), + 1 => array('<', '>','='), + 2 => array('+', '-', '*', '/', '%'), + 3 => array('!', '^', '&', '|'), + 4 => array('?', ':', ';'), + 5 => array('..') + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #990000;', + 4 => 'color: #009900; font-weight: bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666;', + 2 => 'color: #339900;', + 'MULTI' => 'color: #ff0000; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;', + 1 => 'color: #000099; font-weight: bold;', + 2 => 'color: #660099; font-weight: bold;', + 3 => 'color: #660099; font-weight: bold;', + 4 => 'color: #660099; font-weight: bold;', + 5 => 'color: #006699; font-weight: bold;', + 'HARD' => '', + ), + 'BRACKETS' => array( + 0 => 'color: #008000;' + ), + 'STRINGS' => array( + 0 => 'color: #FF0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #0000dd;', + GESHI_NUMBER_BIN_PREFIX_0B => 'color: #208080;', + GESHI_NUMBER_OCT_PREFIX => 'color: #208080;', + GESHI_NUMBER_HEX_PREFIX => 'color: #208080;', + GESHI_NUMBER_FLT_SCI_SHORT => 'color:#800080;', + GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;', + GESHI_NUMBER_FLT_NONSCI_F => 'color:#800080;', + GESHI_NUMBER_FLT_NONSCI => 'color:#800080;' + ), + 'METHODS' => array( + 1 => 'color: #007788;', + 2 => 'color: #007788;' + ), + 'SYMBOLS' => array( + 0 => 'color: #008000;', + 1 => 'color: #000080;', + 2 => 'color: #000040;', + 3 => 'color: #000040;', + 4 => 'color: #008080;', + 5 => 'color: #009080;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.', + 2 => '::' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => "(? "(?![a-zA-Z0-9_\|%\\-])" + ) + ) +); diff --git a/vendor/easybook/geshi/geshi/autoconf.php b/vendor/easybook/geshi/geshi/autoconf.php new file mode 100644 index 0000000000..40bb90f532 --- /dev/null +++ b/vendor/easybook/geshi/geshi/autoconf.php @@ -0,0 +1,511 @@ + 'Autoconf', + 'COMMENT_SINGLE' => array(2 => '#'), + 'COMMENT_MULTI' => array(), + 'COMMENT_REGEXP' => array( + //Multiline-continued single-line comments + 1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m', + //Multiline-continued preprocessor define + 2 => '/#(?:\\\\\\\\|\\\\\\n|.)*$/m', + //Single Line comment started by dnl + 3 => '/(? GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'ESCAPE_REGEXP' => array(), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B | + GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI | + GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO, + 'KEYWORDS' => array( + 1 => array( + 'AC_ACT_IFELSE', + 'AC_AIX', + 'AC_ALLOCA', + 'AC_ARG_ARRAY', + 'AC_ARG_ENABLE', + 'AC_ARG_PROGRAM', + 'AC_ARG_VAR', + 'AC_ARG_WITH', + 'AC_AUTOCONF_VERSION', + 'AC_BEFORE', + 'AC_C_BACKSLASH_A', + 'AC_C_BIGENDIAN', + 'AC_C_CHAR_UNSIGNED', + 'AC_C_CONST', + 'AC_C_CROSS', + 'AC_C_FLEXIBLE_ARRAY_MEMBER', + 'AC_C_INLINE', + 'AC_C_LONG_DOUBLE', + 'AC_C_PROTOTYPES', + 'AC_C_RESTRICT', + 'AC_C_STRINGIZE', + 'AC_C_TYPEOF', + 'AC_C_VARARRAYS', + 'AC_C_VOLATILE', + 'AC_CACHE_CHECK', + 'AC_CACHE_LOAD', + 'AC_CACHE_SAVE', + 'AC_CACHE_VAL', + 'AC_CANONICAL_BUILD', + 'AC_CANONICAL_HOST', + 'AC_CANONICAL_SYSTEM', + 'AC_CANONICAL_TARGET', + 'AC_CHAR_UNSIGNED', + 'AC_CHECK_ALIGNOF', + 'AC_CHECK_DECL', + 'AC_CHECK_DECLS', + 'AC_CHECK_DECLS_ONCE', + 'AC_CHECK_FILE', + 'AC_CHECK_FILES', + 'AC_CHECK_FUNC', + 'AC_CHECK_FUNCS', + 'AC_CHECK_FUNCS_ONCE', + 'AC_CHECK_HEADER', + 'AC_CHECK_HEADERS', + 'AC_CHECK_HEADERS_ONCE', + 'AC_CHECK_LIB', + 'AC_CHECK_MEMBER', + 'AC_CHECK_MEMBERS', + 'AC_CHECK_PROG', + 'AC_CHECK_PROGS', + 'AC_CHECK_SIZEOF', + 'AC_CHECK_TARGET_TOOL', + 'AC_CHECK_TARGET_TOOLS', + 'AC_CHECK_TOOL', + 'AC_CHECK_TOOLS', + 'AC_CHECK_TYPE', + 'AC_CHECK_TYPES', + 'AC_CHECKING', + 'AC_COMPILE_CHECK', + 'AC_COMPILE_IFELSE', + 'AC_COMPUTE_INT', + 'AC_CONFIG_AUX_DIR', + 'AC_CONFIG_COMMANDS', + 'AC_CONFIG_COMMANDS_POST', + 'AC_CONFIG_COMMANDS_PRE', + 'AC_CONFIG_FILES', + 'AC_CONFIG_HEADERS', + 'AC_CONFIG_ITEMS', + 'AC_CONFIG_LIBOBJ_DIR', + 'AC_CONFIG_LINKS', + 'AC_CONFIG_MACRO_DIR', + 'AC_CONFIG_SRCDIR', + 'AC_CONFIG_SUBDIRS', + 'AC_CONFIG_TESTDIR', + 'AC_CONST', + 'AC_COPYRIGHT', + 'AC_CROSS_CHECK', + 'AC_CYGWIN', + 'AC_DATAROOTDIR_CHECKED', + 'AC_DECL_SYS_SIGLIST', + 'AC_DECL_YYTEXT', + 'AC_DEFINE', + 'AC_DEFINE_UNQUOTED', + 'AC_DEFUN', + 'AC_DEFUN_ONCE', + 'AC_DIAGNOSE', + 'AC_DIR_HEADER', + 'AC_DISABLE_OPTION_CHECKING', + 'AC_DYNIX_SEQ', + 'AC_EGREP_CPP', + 'AC_EGREP_HEADER', + 'AC_EMXOS2', + 'AC_ENABLE', + 'AC_ERLANG_CHECK_LIB', + 'AC_ERLANG_NEED_ERL', + 'AC_ERLANG_NEED_ERLC', + 'AC_ERLANG_PATH_ERL', + 'AC_ERLANG_PATH_ERLC', + 'AC_ERLANG_SUBST_ERTS_VER', + 'AC_ERLANG_SUBST_INSTALL_LIB_DIR', + 'AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR', + 'AC_ERLANG_SUBST_LIB_DIR', + 'AC_ERLANG_SUBST_ROOT_DIR', + 'AC_ERROR', + 'AC_EXEEXT', + 'AC_F77_DUMMY_MAIN', + 'AC_F77_FUNC', + 'AC_F77_LIBRARY_LDFLAGS', + 'AC_F77_MAIN', + 'AC_F77_WRAPPERS', + 'AC_FATAL', + 'AC_FC_FREEFORM', + 'AC_FC_FUNC', + 'AC_FC_LIBRARY_LDFLAGS', + 'AC_FC_MAIN', + 'AC_FC_SRCEXT', + 'AC_FC_WRAPPERS', + 'AC_FIND_X', + 'AC_FIND_XTRA', + 'AC_FOREACH', + 'AC_FUNC_ALLOCA', + 'AC_FUNC_CHECK', + 'AC_FUNC_CHOWN', + 'AC_FUNC_CLOSEDIR_VOID', + 'AC_FUNC_ERROR_AT_LINE', + 'AC_FUNC_FNMATCH', + 'AC_FUNC_FNMATCH_GNU', + 'AC_FUNC_FORK', + 'AC_FUNC_FSEEKO', + 'AC_FUNC_GETGROUPS', + 'AC_FUNC_GETLOADAVG', + 'AC_FUNC_GETMNTENT', + 'AC_FUNC_GETPGRP', + 'AC_FUNC_LSTAT', + 'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK', + 'AC_FUNC_MALLOC', + 'AC_FUNC_MBRTOWC', + 'AC_FUNC_MEMCMP', + 'AC_FUNC_MKTIME', + 'AC_FUNC_MMAP', + 'AC_FUNC_OBSTACK', + 'AC_FUNC_REALLOC', + 'AC_FUNC_SELECT_ARGTYPES', + 'AC_FUNC_SETPGRP', + 'AC_FUNC_SETVBUF_REVERSED', + 'AC_FUNC_STAT', + 'AC_FUNC_STRCOLL', + 'AC_FUNC_STRERROR_R', + 'AC_FUNC_STRFTIME', + 'AC_FUNC_STRNLEN', + 'AC_FUNC_STRTOD', + 'AC_FUNC_STRTOLD', + 'AC_FUNC_UTIME_NULL', + 'AC_FUNC_VPRINTF', + 'AC_FUNC_WAIT3', + 'AC_GCC_TRADITIONAL', + 'AC_GETGROUPS_T', + 'AC_GETLOADAVG', + 'AC_GNU_SOURCE', + 'AC_HAVE_FUNCS', + 'AC_HAVE_HEADERS', + 'AC_HAVE_LIBRARY', + 'AC_HAVE_POUNDBANG', + 'AC_HEADER_ASSERT', + 'AC_HEADER_CHECK', + 'AC_HEADER_DIRENT', + 'AC_HEADER_EGREP', + 'AC_HEADER_MAJOR', + 'AC_HEADER_RESOLV', + 'AC_HEADER_STAT', + 'AC_HEADER_STDBOOL', + 'AC_HEADER_STDC', + 'AC_HEADER_SYS_WAIT', + 'AC_HEADER_TIME', + 'AC_HEADER_TIOCGWINSZ', + 'AC_HELP_STRING', + 'AC_INCLUDES_DEFAULT', + 'AC_INIT', + 'AC_INLINE', + 'AC_INT_16_BITS', + 'AC_IRIX_SUN', + 'AC_ISC_POSIX', + 'AC_LANG_ASSERT', + 'AC_LANG_C', + 'AC_LANG_CALL', + 'AC_LANG_CONFTEST', + 'AC_LANG_CPLUSPLUS', + 'AC_LANG_FORTRAN77', + 'AC_LANG_FUNC_LINK_TRY', + 'AC_LANG_POP', + 'AC_LANG_PROGRAM', + 'AC_LANG_PUSH', + 'AC_LANG_RESTORE', + 'AC_LANG_SAVE', + 'AC_LANG_SOURCE', + 'AC_LANG_WERROR', + 'AC_LIBOBJ', + 'AC_LIBSOURCE', + 'AC_LIBSOURCES', + 'AC_LINK_FILES', + 'AC_LINK_IFELSE', + 'AC_LN_S', + 'AC_LONG_64_BITS', + 'AC_LONG_DOUBLE', + 'AC_LONG_FILE_NAMES', + 'AC_MAJOR_HEADER', + 'AC_MEMORY_H', + 'AC_MINGW32', + 'AC_MINIX', + 'AC_MINUS_C_MINUS_O', + 'AC_MMAP', + 'AC_MODE_T', + 'AC_MSG_CHECKING', + 'AC_MSG_ERROR', + 'AC_MSG_FAILURE', + 'AC_MSG_NOTICE', + 'AC_MSG_RESULT', + 'AC_MSG_WARN', + 'AC_OBJEXT', + 'AC_OBSOLETE', + 'AC_OFF_T', + 'AC_OPENMP', + 'AC_OUTPUT', + 'AC_OUTPUT_COMMANDS', + 'AC_PACKAGE_BUGREPORT', + 'AC_PACKAGE_NAME', + 'AC_PACKAGE_STRING', + 'AC_PACKAGE_TARNAME', + 'AC_PACKAGE_URL', + 'AC_PACKAGE_VERSION', + 'AC_PATH_PROG', + 'AC_PATH_PROGS', + 'AC_PATH_PROGS_FEATURE_CHECK', + 'AC_PATH_TARGET_TOOL', + 'AC_PATH_TOOL', + 'AC_PATH_X', + 'AC_PATH_XTRA', + 'AC_PID_T', + 'AC_PREFIX', + 'AC_PREFIX_DEFAULT', + 'AC_PREFIX_PROGRAM', + 'AC_PREPROC_IFELSE', + 'AC_PREREQ', + 'AC_PRESERVE_HELP_ORDER', + 'AC_PROG_AWK', + 'AC_PROG_CC', + 'AC_PROG_CC_C89', + 'AC_PROG_CC_C99', + 'AC_PROG_CC_C_O', + 'AC_PROG_CC_STDC', + 'AC_PROG_CPP', + 'AC_PROG_CPP_WERROR', + 'AC_PROG_CXX', + 'AC_PROG_CXX_C_O', + 'AC_PROG_CXXCPP', + 'AC_PROG_EGREP', + 'AC_PROG_F77', + 'AC_PROG_F77_C_O', + 'AC_PROG_FC', + 'AC_PROG_FC_C_O', + 'AC_PROG_FGREP', + 'AC_PROG_GCC_TRADITIONAL', + 'AC_PROG_GREP', + 'AC_PROG_INSTALL', + 'AC_PROG_LEX', + 'AC_PROG_LN_S', + 'AC_PROG_MAKE_SET', + 'AC_PROG_MKDIR_P', + 'AC_PROG_OBJC', + 'AC_PROG_OBJCPP', + 'AC_PROG_OBJCXX', + 'AC_PROG_OBJCXXCPP', + 'AC_PROG_RANLIB', + 'AC_PROG_SED', + 'AC_PROG_YACC', + 'AC_PROGRAM_CHECK', + 'AC_PROGRAM_EGREP', + 'AC_PROGRAM_PATH', + 'AC_PROGRAMS_CHECK', + 'AC_PROGRAMS_PATH', + 'AC_REMOTE_TAPE', + 'AC_REPLACE_FNMATCH', + 'AC_REPLACE_FUNCS', + 'AC_REQUIRE', + 'AC_REQUIRE_AUX_FILE', + 'AC_REQUIRE_CPP', + 'AC_RESTARTABLE_SYSCALLS', + 'AC_RETSIGTYPE', + 'AC_REVISION', + 'AC_RSH', + 'AC_RUN_IFELSE', + 'AC_SCO_INTL', + 'AC_SEARCH_LIBS', + 'AC_SET_MAKE', + 'AC_SETVBUF_REVERSED', + 'AC_SIZE_T', + 'AC_SIZEOF_TYPE', + 'AC_ST_BLKSIZE', + 'AC_ST_BLOCKS', + 'AC_ST_RDEV', + 'AC_STAT_MACROS_BROKEN', + 'AC_STDC_HEADERS', + 'AC_STRCOLL', + 'AC_STRUCT_DIRENT_D_INO', + 'AC_STRUCT_DIRENT_D_TYPE', + 'AC_STRUCT_ST_BLKSIZE', + 'AC_STRUCT_ST_BLOCKS', + 'AC_STRUCT_ST_RDEV', + 'AC_STRUCT_TIMEZONE', + 'AC_STRUCT_TM', + 'AC_SUBST', + 'AC_SUBST_FILE', + 'AC_SYS_INTERPRETER', + 'AC_SYS_LARGEFILE', + 'AC_SYS_LONG_FILE_NAMES', + 'AC_SYS_POSIX_TERMIOS', + 'AC_SYS_RESTARTABLE_SYSCALLS', + 'AC_SYS_SIGLIST_DECLARED', + 'AC_TEST_CPP', + 'AC_TEST_PROGRAM', + 'AC_TIME_WITH_SYS_TIME', + 'AC_TIMEZONE', + 'AC_TRY_ACT', + 'AC_TRY_COMPILE', + 'AC_TRY_CPP', + 'AC_TRY_LINK', + 'AC_TRY_LINK_FUNC', + 'AC_TRY_RUN', + 'AC_TYPE_GETGROUPS', + 'AC_TYPE_INT16_T', + 'AC_TYPE_INT32_T', + 'AC_TYPE_INT64_T', + 'AC_TYPE_INT8_T', + 'AC_TYPE_INTMAX_T', + 'AC_TYPE_INTPTR_T', + 'AC_TYPE_LONG_DOUBLE', + 'AC_TYPE_LONG_DOUBLE_WIDER', + 'AC_TYPE_LONG_LONG_INT', + 'AC_TYPE_MBSTATE_T', + 'AC_TYPE_MODE_T', + 'AC_TYPE_OFF_T', + 'AC_TYPE_PID_T', + 'AC_TYPE_SIGNAL', + 'AC_TYPE_SIZE_T', + 'AC_TYPE_SSIZE_T', + 'AC_TYPE_UID_T', + 'AC_TYPE_UINT16_T', + 'AC_TYPE_UINT32_T', + 'AC_TYPE_UINT64_T', + 'AC_TYPE_UINT8_T', + 'AC_TYPE_UINTMAX_T', + 'AC_TYPE_UINTPTR_T', + 'AC_TYPE_UNSIGNED_LONG_LONG_INT', + 'AC_UID_T', + 'AC_UNISTD_H', + 'AC_USE_SYSTEM_EXTENSIONS', + 'AC_USG', + 'AC_UTIME_NULL', + 'AC_VALIDATE_CACHED_SYSTEM_TUPLE', + 'AC_VERBOSE', + 'AC_VFORK', + 'AC_VPRINTF', + 'AC_WAIT3', + 'AC_WARN', + 'AC_WARNING', + 'AC_WITH', + 'AC_WORDS_BIGENDIAN', + 'AC_XENIX_DIR', + 'AC_YYTEXT_POINTER', + 'AH_BOTTOM', + 'AH_HEADER', + 'AH_TEMPLATE', + 'AH_TOP', + 'AH_VERBATIM', + 'AU_ALIAS', + 'AU_DEFUN'), + ), + 'SYMBOLS' => array('(', ')', '[', ']', '!', '@', '%', '&', '*', '|', '/', '<', '>', ';;', '`'), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00ffff;', + ), + 'COMMENTS' => array( + 1 => 'color: #666666;', + 2 => 'color: #339900;', + 3 => 'color: #666666;', + 'MULTI' => 'color: #ff0000; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099;', + 1 => 'color: #000099;', + 2 => 'color: #660099;', + 3 => 'color: #660099;', + 4 => 'color: #660099;', + 5 => 'color: #006699;', + 'HARD' => '', + ), + 'BRACKETS' => array( + 0 => 'color: #008000;' + ), + 'STRINGS' => array( + 0 => 'color: #996600;' + ), + 'NUMBERS' => array( + 0 => 'color: #0000dd;', + GESHI_NUMBER_BIN_PREFIX_0B => 'color: #208080;', + GESHI_NUMBER_OCT_PREFIX => 'color: #208080;', + GESHI_NUMBER_HEX_PREFIX => 'color: #208080;', + GESHI_NUMBER_FLT_SCI_SHORT => 'color:#800080;', + GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;', + GESHI_NUMBER_FLT_NONSCI_F => 'color:#800080;', + GESHI_NUMBER_FLT_NONSCI => 'color:#800080;' + ), + 'METHODS' => array( + 1 => 'color: #202020;', + 2 => 'color: #202020;' + ), + 'SYMBOLS' => array( + 0 => 'color: #008000;', + 1 => 'color: #000080;', + 2 => 'color: #000040;', + 3 => 'color: #000040;', + 4 => 'color: #008080;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'COMMENTS' => array( + 'DISALLOWED_BEFORE' => '$' + ), + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => "(? "(?![\.\-a-zA-Z0-9_%\\/])" + ) + ) +); + diff --git a/vendor/easybook/geshi/geshi/autohotkey.php b/vendor/easybook/geshi/geshi/autohotkey.php new file mode 100644 index 0000000000..d907927b40 --- /dev/null +++ b/vendor/easybook/geshi/geshi/autohotkey.php @@ -0,0 +1,372 @@ + 'Autohotkey', + 'COMMENT_SINGLE' => array( + 1 => ';' + ), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'while','if','and','or','else','return' + ), + 2 => array( + // built in variables + 'A_AhkPath','A_AhkVersion','A_AppData','A_AppDataCommon', + 'A_AutoTrim','A_BatchLines','A_CaretX','A_CaretY', + 'A_ComputerName','A_ControlDelay','A_Cursor','A_DD', + 'A_DDD','A_DDDD','A_DefaultMouseSpeed','A_Desktop', + 'A_DesktopCommon','A_DetectHiddenText','A_DetectHiddenWindows','A_EndChar', + 'A_EventInfo','A_ExitReason','A_FormatFloat','A_FormatInteger', + 'A_Gui','A_GuiEvent','A_GuiControl','A_GuiControlEvent', + 'A_GuiHeight','A_GuiWidth','A_GuiX','A_GuiY', + 'A_Hour','A_IconFile','A_IconHidden','A_IconNumber', + 'A_IconTip','A_Index','A_IPAddress1','A_IPAddress2', + 'A_IPAddress3','A_IPAddress4','A_ISAdmin','A_IsCompiled', + 'A_IsCritical','A_IsPaused','A_IsSuspended','A_KeyDelay', + 'A_Language','A_LastError','A_LineFile','A_LineNumber', + 'A_LoopField','A_LoopFileAttrib','A_LoopFileDir','A_LoopFileExt', + 'A_LoopFileFullPath','A_LoopFileLongPath','A_LoopFileName','A_LoopFileShortName', + 'A_LoopFileShortPath','A_LoopFileSize','A_LoopFileSizeKB','A_LoopFileSizeMB', + 'A_LoopFileTimeAccessed','A_LoopFileTimeCreated','A_LoopFileTimeModified','A_LoopReadLine', + 'A_LoopRegKey','A_LoopRegName','A_LoopRegSubkey','A_LoopRegTimeModified', + 'A_LoopRegType','A_MDAY','A_Min','A_MM', + 'A_MMM','A_MMMM','A_Mon','A_MouseDelay', + 'A_MSec','A_MyDocuments','A_Now','A_NowUTC', + 'A_NumBatchLines','A_OSType','A_OSVersion','A_PriorHotkey', + 'A_ProgramFiles','A_Programs','A_ProgramsCommon','A_ScreenHeight', + 'A_ScreenWidth','A_ScriptDir','A_ScriptFullPath','A_ScriptName', + 'A_Sec','A_Space','A_StartMenu','A_StartMenuCommon', + 'A_Startup','A_StartupCommon','A_StringCaseSense','A_Tab', + 'A_Temp','A_ThisFunc','A_ThisHotkey','A_ThisLabel', + 'A_ThisMenu','A_ThisMenuItem','A_ThisMenuItemPos','A_TickCount', + 'A_TimeIdle','A_TimeIdlePhysical','A_TimeSincePriorHotkey','A_TimeSinceThisHotkey', + 'A_TitleMatchMode','A_TitleMatchModeSpeed','A_UserName','A_WDay', + 'A_WinDelay','A_WinDir','A_WorkingDir','A_YDay', + 'A_YEAR','A_YWeek','A_YYYY','Clipboard', + 'ClipboardAll','ComSpec','ErrorLevel','ProgramFiles', + ), + 3 => array( + 'AutoTrim', + 'BlockInput','Break','Click', + 'ClipWait','Continue','Control', + 'ControlClick','ControlFocus','ControlGet', + 'ControlGetFocus','ControlGetPos','ControlGetText', + 'ControlMove','ControlSend','ControlSendRaw', + 'ControlSetText','CoordMode','Critical', + 'DetectHiddenText','DetectHiddenWindows','DllCall','Drive', + 'DriveGet','DriveSpaceFree', + 'Else','EnvAdd','EnvDiv', + 'EnvGet','EnvMult','EnvSet', + 'EnvSub','EnvUpdate','Exit', + 'ExitApp','FileAppend','FileCopy', + 'FileCopyDir','FileCreateDir','FileCreateShortcut', + 'FileDelete','FileGetAttrib','FileGetShortcut', + 'FileGetSize','FileGetTime','FileGetVersion', + 'FileInstall','FileMove','FileMoveDir', + 'FileRead','FileReadLine','FileRecycle', + 'FileRecycleEmpty','FileRemoveDir','FileSelectFile', + 'FileSelectFolder','FileSetAttrib','FileSetTime', + 'FormatTime','Gosub', + 'Goto','GroupActivate','GroupAdd', + 'GroupClose','GroupDeactivate','Gui', + 'GuiControl','GuiControlGet','Hotkey', + 'IfExist','IfGreater','IfGreaterOrEqual', + 'IfInString','IfLess','IfLessOrEqual', + 'IfMsgBox','IfNotEqual','IfNotExist', + 'IfNotInString','IfWinActive','IfWinExist', + 'IfWinNotActive','IfWinNotExist','ImageSearch', + 'IniDelete','IniRead','IniWrite', + 'Input','InputBox','KeyHistory', + 'KeyWait','ListHotkeys','ListLines', + 'ListVars','Loop', + 'Menu','MouseClick','MouseClickDrag', + 'MouseGetPos','MouseMove','MsgBox', + 'OnMessage','OnExit','OutputDebug', + 'PixelGetColor','PixelSearch','PostMessage', + 'Process','Progress','Random', + 'RegExMatch','RegExReplace','RegisterCallback', + 'RegDelete','RegRead','RegWrite', + 'Reload','Repeat','Return', + 'Run','RunAs','RunWait', + 'Send','SendEvent','SendInput', + 'SendMessage','SendMode','SendPlay', + 'SendRaw','SetBatchLines','SetCapslockState', + 'SetControlDelay','SetDefaultMouseSpeed','SetEnv', + 'SetFormat','SetKeyDelay','SetMouseDelay', + 'SetNumlockState','SetScrollLockState','SetStoreCapslockMode', + 'SetTimer','SetTitleMatchMode','SetWinDelay', + 'SetWorkingDir','Shutdown','Sleep', + 'Sort','SoundBeep','SoundGet', + 'SoundGetWaveVolume','SoundPlay','SoundSet', + 'SoundSetWaveVolume','SplashImage','SplashTextOff', + 'SplashTextOn','SplitPath','StatusBarGetText', + 'StatusBarWait','StringCaseSense','StringGetPos', + 'StringLeft','StringLen','StringLower', + 'StringMid','StringReplace','StringRight', + 'StringSplit','StringTrimLeft','StringTrimRight', + 'StringUpper','Suspend','SysGet', + 'Thread','ToolTip','Transform', + 'TrayTip','URLDownloadToFile','While', + 'VarSetCapacity', + 'WinActivate','WinActivateBottom','WinClose', + 'WinGet','WinGetActiveStats','WinGetActiveTitle', + 'WinGetClass','WinGetPos','WinGetText', + 'WinGetTitle','WinHide','WinKill', + 'WinMaximize','WinMenuSelectItem','WinMinimize', + 'WinMinimizeAll','WinMinimizeAllUndo','WinMove', + 'WinRestore','WinSet','WinSetTitle', + 'WinShow','WinWait','WinWaitActive', + 'WinWaitClose','WinWaitNotActive' + ), + 4 => array( + 'Abs','ACos','Asc','ASin', + 'ATan','Ceil','Chr','Cos', + 'Exp','FileExist','Floor', + 'GetKeyState','IL_Add','IL_Create','IL_Destroy', + 'InStr','IsFunc','IsLabel','Ln', + 'Log','LV_Add','LV_Delete','LV_DeleteCol', + 'LV_GetCount','LV_GetNext','LV_GetText','LV_Insert', + 'LV_InsertCol','LV_Modify','LV_ModifyCol','LV_SetImageList', + 'Mod','NumGet','NumPut', + 'Round', + 'SB_SetIcon','SB_SetParts','SB_SetText','Sin', + 'Sqrt','StrLen','SubStr','Tan', + 'TV_Add','TV_Delete','TV_GetChild','TV_GetCount', + 'TV_GetNext','TV_Get','TV_GetParent','TV_GetPrev', + 'TV_GetSelection','TV_GetText','TV_Modify', + 'WinActive','WinExist' + ), + 5 => array( + // #Directives + 'AllowSameLineComments','ClipboardTimeout','CommentFlag', + 'ErrorStdOut','EscapeChar','HotkeyInterval', + 'HotkeyModifierTimeout','Hotstring','IfWinActive', + 'IfWinExist','IfWinNotActive','IfWinNotExist', + 'Include','IncludeAgain','InstallKeybdHook', + 'InstallMouseHook','KeyHistory','LTrim', + 'MaxHotkeysPerInterval','MaxMem','MaxThreads', + 'MaxThreadsBuffer','MaxThreadsPerHotkey','NoEnv', + 'NoTrayIcon','Persistent','SingleInstance', + 'UseHook','WinActivateForce' + ), + 6 => array( + 'Shift','LShift','RShift', + 'Alt','LAlt','RAlt', + 'LControl','RControl', + 'Ctrl','LCtrl','RCtrl', + 'LWin','RWin','AppsKey', + 'AltDown','AltUp','ShiftDown', + 'ShiftUp','CtrlDown','CtrlUp', + 'LWinDown','LWinUp','RWinDown', + 'RWinUp','LButton','RButton', + 'MButton','WheelUp','WheelDown', + 'WheelLeft','WheelRight','XButton1', + 'XButton2','Joy1','Joy2', + 'Joy3','Joy4','Joy5', + 'Joy6','Joy7','Joy8', + 'Joy9','Joy10','Joy11', + 'Joy12','Joy13','Joy14', + 'Joy15','Joy16','Joy17', + 'Joy18','Joy19','Joy20', + 'Joy21','Joy22','Joy23', + 'Joy24','Joy25','Joy26', + 'Joy27','Joy28','Joy29', + 'Joy30','Joy31','Joy32', + 'JoyX','JoyY','JoyZ', + 'JoyR','JoyU','JoyV', + 'JoyPOV','JoyName','JoyButtons', + 'JoyAxes','JoyInfo','Space', + 'Tab','Enter', + 'Escape','Esc','BackSpace', + 'BS','Delete','Del', + 'Insert','Ins','PGUP', + 'PGDN','Home','End', + 'Up','Down','Left', + 'Right','PrintScreen','CtrlBreak', + 'Pause','ScrollLock','CapsLock', + 'NumLock','Numpad0','Numpad1', + 'Numpad2','Numpad3','Numpad4', + 'Numpad5','Numpad6','Numpad7', + 'Numpad8','Numpad9','NumpadMult', + 'NumpadAdd','NumpadSub','NumpadDiv', + 'NumpadDot','NumpadDel','NumpadIns', + 'NumpadClear','NumpadUp','NumpadDown', + 'NumpadLeft','NumpadRight','NumpadHome', + 'NumpadEnd','NumpadPgup','NumpadPgdn', + 'NumpadEnter','F1','F2', + 'F3','F4','F5', + 'F6','F7','F8', + 'F9','F10','F11', + 'F12','F13','F14', + 'F15','F16','F17', + 'F18','F19','F20', + 'F21','F22','F23', + 'F24','Browser_Back','Browser_Forward', + 'Browser_Refresh','Browser_Stop','Browser_Search', + 'Browser_Favorites','Browser_Home','Volume_Mute', + 'Volume_Down','Volume_Up','Media_Next', + 'Media_Prev','Media_Stop','Media_Play_Pause', + 'Launch_Mail','Launch_Media','Launch_App1', + 'Launch_App2' + ), + 7 => array( + // Gui commands + 'Add', + 'Show', 'Submit', 'Cancel', 'Destroy', + 'Font', 'Color', 'Margin', 'Flash', 'Default', + 'GuiEscape','GuiClose','GuiSize','GuiContextMenu','GuiDropFilesTabStop', + ), + 8 => array( + // Gui Controls + 'Button', + 'Checkbox','Radio','DropDownList','DDL', + 'ComboBox','ListBox','ListView', + 'Text', 'Edit', 'UpDown', 'Picture', + 'TreeView','DateTime', 'MonthCal', + 'Slider' + ) + ), + 'SYMBOLS' => array( + '(',')','[',']', + '+','-','*','/','&','^', + '=','+=','-=','*=','/=','&=', + '==','<','<=','>','>=',':=', + ',','.' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false, + 7 => false, + 8 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #AAAAFF; font-weight: bold;', // reserved #blue + 2 => 'color: #88FF88;', // BIV yellow + 3 => 'color: #FF00FF; font-style: italic;', // commands purple + 4 => 'color: #888844; font-weight: bold;', // functions #0080FF + 5 => 'color: #000000; font-style: italic;', // directives #black + 6 => 'color: #FF0000; font-style: italic;', // hotkeys #red + 7 => 'color: #000000; font-style: italic;', // gui commands #black + 8 => 'color: #000000; font-style: italic;' // gui controls + ), + 'COMMENTS' => array( + 'MULTI' => 'font-style: italic; color: #669900;', + 1 => 'font-style: italic; color: #009933;' + ), + 'ESCAPE_CHAR' => array( + 0 => '' + ), + 'BRACKETS' => array( + 0 => 'color: #00FF00; font-weight: bold;' + ), + 'STRINGS' => array( + 0 => 'font-weight: bold; color: #008080;' + ), + 'NUMBERS' => array( + 0 => 'color: #0000dd;' + ), + 'METHODS' => array( + 1 => 'color: #0000FF; font-style: italic; font-weight: italic;' + ), + 'SYMBOLS' => array( + 0 => 'color: #000000; font-weight: italic;' + ), + 'REGEXPS' => array( + 0 => 'font-weight: italic; color: #A00A0;', + 1 => 'color: #CC0000; font-style: italic;', + 2 => 'color: #DD0000; font-style: italic;', + 3 => 'color: #88FF88;' + ), + 'SCRIPT' => array( + ) + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + 1 => '_' + ), + 'REGEXPS' => array( + //Variables + 0 => '%[a-zA-Z_][a-zA-Z0-9_]*%', + //hotstrings + 1 => '::[\w\d]+::', + //labels + 2 => '\w[\w\d]+:\s', + //Built-in Variables + 3 => '\bA_\w+\b(?![^<]*>)' + ), + 'URLS' => array( + 1 => '', + 2 => 'http://www.autohotkey.com/docs/Variables.htm#{FNAME}', + 3 => 'http://www.autohotkey.com/docs/commands/{FNAME}.htm', + 4 => 'http://www.autohotkey.com/docs/Functions.htm#BuiltIn', + 5 => 'http://www.autohotkey.com/docs/commands/_{FNAME}.htm', + 6 => '', + 7 => 'http://www.autohotkey.com/docs/commands/Gui.htm#{FNAME}', + 8 => 'http://www.autohotkey.com/docs/commands/GuiControls.htm#{FNAME}' + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true, + 1 => true, + 2 => true, + 3 => true + ), + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 5 => array( + 'DISALLOWED_BEFORE' => '(? 'AutoIt', + 'COMMENT_SINGLE' => array(';'), + 'COMMENT_MULTI' => array( + '#comments-start' => '#comments-end', + '#cs' => '#ce'), + 'COMMENT_REGEXP' => array( + 0 => '/(? '/(?<=include)\s+<.*?>/' + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'And','ByRef','Case','Const','ContinueCase','ContinueLoop', + 'Default','Dim','Do','Else','ElseIf','EndFunc','EndIf','EndSelect', + 'EndSwitch','EndWith','Enum','Exit','ExitLoop','False','For','Func', + 'Global','If','In','Local','Next','Not','Or','ReDim','Return', + 'Select','Step','Switch','Then','To','True','Until','WEnd','While', + 'With' + ), + 2 => array( + '@AppDataCommonDir','@AppDataDir','@AutoItExe','@AutoItPID', + '@AutoItUnicode','@AutoItVersion','@AutoItX64','@COM_EventObj', + '@CommonFilesDir','@Compiled','@ComputerName','@ComSpec','@CR', + '@CRLF','@DesktopCommonDir','@DesktopDepth','@DesktopDir', + '@DesktopHeight','@DesktopRefresh','@DesktopWidth', + '@DocumentsCommonDir','@error','@exitCode','@exitMethod', + '@extended','@FavoritesCommonDir','@FavoritesDir','@GUI_CtrlHandle', + '@GUI_CtrlId','@GUI_DragFile','@GUI_DragId','@GUI_DropId', + '@GUI_WinHandle','@HomeDrive','@HomePath','@HomeShare', + '@HotKeyPressed','@HOUR','@InetGetActive','@InetGetBytesRead', + '@IPAddress1','@IPAddress2','@IPAddress3','@IPAddress4','@KBLayout', + '@LF','@LogonDNSDomain','@LogonDomain','@LogonServer','@MDAY', + '@MIN','@MON','@MyDocumentsDir','@NumParams','@OSBuild','@OSLang', + '@OSServicePack','@OSTYPE','@OSVersion','@ProcessorArch', + '@ProgramFilesDir','@ProgramsCommonDir','@ProgramsDir','@ScriptDir', + '@ScriptFullPath','@ScriptLineNumber','@ScriptName','@SEC', + '@StartMenuCommonDir','@StartMenuDir','@StartupCommonDir', + '@StartupDir','@SW_DISABLE','@SW_ENABLE','@SW_HIDE','@SW_LOCK', + '@SW_MAXIMIZE','@SW_MINIMIZE','@SW_RESTORE','@SW_SHOW', + '@SW_SHOWDEFAULT','@SW_SHOWMAXIMIZED','@SW_SHOWMINIMIZED', + '@SW_SHOWMINNOACTIVE','@SW_SHOWNA','@SW_SHOWNOACTIVATE', + '@SW_SHOWNORMAL','@SW_UNLOCK','@SystemDir','@TAB','@TempDir', + '@TRAY_ID','@TrayIconFlashing','@TrayIconVisible','@UserName', + '@UserProfileDir','@WDAY','@WindowsDir','@WorkingDir','@YDAY', + '@YEAR' + ), + 3 => array( + 'Abs','ACos','AdlibDisable','AdlibEnable','Asc','AscW','ASin', + 'Assign','ATan','AutoItSetOption','AutoItWinGetTitle', + 'AutoItWinSetTitle','Beep','Binary','BinaryLen','BinaryMid', + 'BinaryToString','BitAND','BitNOT','BitOR','BitRotate','BitShift', + 'BitXOR','BlockInput','Break','Call','CDTray','Ceiling','Chr', + 'ChrW','ClipGet','ClipPut','ConsoleRead','ConsoleWrite', + 'ConsoleWriteError','ControlClick','ControlCommand', + 'ControlDisable','ControlEnable','ControlFocus','ControlGetFocus', + 'ControlGetHandle','ControlGetPos','ControlGetText','ControlHide', + 'ControlListView','ControlMove','ControlSend','ControlSetText', + 'ControlShow','ControlTreeView','Cos','Dec','DirCopy','DirCreate', + 'DirGetSize','DirMove','DirRemove','DllCall','DllCallbackFree', + 'DllCallbackGetPtr','DllCallbackRegister','DllClose','DllOpen', + 'DllStructCreate','DllStructGetData','DllStructGetPtr', + 'DllStructGetSize','DllStructSetData','DriveGetDrive', + 'DriveGetFileSystem','DriveGetLabel','DriveGetSerial', + 'DriveGetType','DriveMapAdd','DriveMapDel','DriveMapGet', + 'DriveSetLabel','DriveSpaceFree','DriveSpaceTotal','DriveStatus', + 'EnvGet','EnvSet','EnvUpdate','Eval','Execute','Exp', + 'FileChangeDir','FileClose','FileCopy','FileCreateNTFSLink', + 'FileCreateShortcut','FileDelete','FileExists','FileFindFirstFile', + 'FileFindNextFile','FileGetAttrib','FileGetLongName', + 'FileGetShortcut','FileGetShortName','FileGetSize','FileGetTime', + 'FileGetVersion','FileInstall','FileMove','FileOpen', + 'FileOpenDialog','FileRead','FileReadLine','FileRecycle', + 'FileRecycleEmpty','FileSaveDialog','FileSelectFolder', + 'FileSetAttrib','FileSetTime','FileWrite','FileWriteLine','Floor', + 'FtpSetProxy','GUICreate','GUICtrlCreateAvi','GUICtrlCreateButton', + 'GUICtrlCreateCheckbox','GUICtrlCreateCombo', + 'GUICtrlCreateContextMenu','GUICtrlCreateDate','GUICtrlCreateDummy', + 'GUICtrlCreateEdit','GUICtrlCreateGraphic','GUICtrlCreateGroup', + 'GUICtrlCreateIcon','GUICtrlCreateInput','GUICtrlCreateLabel', + 'GUICtrlCreateList','GUICtrlCreateListView', + 'GUICtrlCreateListViewItem','GUICtrlCreateMenu', + 'GUICtrlCreateMenuItem','GUICtrlCreateMonthCal','GUICtrlCreateObj', + 'GUICtrlCreatePic','GUICtrlCreateProgress','GUICtrlCreateRadio', + 'GUICtrlCreateSlider','GUICtrlCreateTab','GUICtrlCreateTabItem', + 'GUICtrlCreateTreeView','GUICtrlCreateTreeViewItem', + 'GUICtrlCreateUpdown','GUICtrlDelete','GUICtrlGetHandle', + 'GUICtrlGetState','GUICtrlRead','GUICtrlRecvMsg', + 'GUICtrlRegisterListViewSort','GUICtrlSendMsg','GUICtrlSendToDummy', + 'GUICtrlSetBkColor','GUICtrlSetColor','GUICtrlSetCursor', + 'GUICtrlSetData','GUICtrlSetFont','GUICtrlSetDefColor', + 'GUICtrlSetDefBkColor','GUICtrlSetGraphic','GUICtrlSetImage', + 'GUICtrlSetLimit','GUICtrlSetOnEvent','GUICtrlSetPos', + 'GUICtrlSetResizing','GUICtrlSetState','GUICtrlSetStyle', + 'GUICtrlSetTip','GUIDelete','GUIGetCursorInfo','GUIGetMsg', + 'GUIGetStyle','GUIRegisterMsg','GUISetAccelerators()', + 'GUISetBkColor','GUISetCoord','GUISetCursor','GUISetFont', + 'GUISetHelp','GUISetIcon','GUISetOnEvent','GUISetState', + 'GUISetStyle','GUIStartGroup','GUISwitch','Hex','HotKeySet', + 'HttpSetProxy','HWnd','InetGet','InetGetSize','IniDelete','IniRead', + 'IniReadSection','IniReadSectionNames','IniRenameSection', + 'IniWrite','IniWriteSection','InputBox','Int','IsAdmin','IsArray', + 'IsBinary','IsBool','IsDeclared','IsDllStruct','IsFloat','IsHWnd', + 'IsInt','IsKeyword','IsNumber','IsObj','IsPtr','IsString','Log', + 'MemGetStats','Mod','MouseClick','MouseClickDrag','MouseDown', + 'MouseGetCursor','MouseGetPos','MouseMove','MouseUp','MouseWheel', + 'MsgBox','Number','ObjCreate','ObjEvent','ObjGet','ObjName','Opt', + 'Ping','PixelChecksum','PixelGetColor','PixelSearch','PluginClose', + 'PluginOpen','ProcessClose','ProcessExists','ProcessGetStats', + 'ProcessList','ProcessSetPriority','ProcessWait','ProcessWaitClose', + 'ProgressOff','ProgressOn','ProgressSet','Ptr','Random','RegDelete', + 'RegEnumKey','RegEnumVal','RegRead','RegWrite','Round','Run', + 'RunAs','RunAsWait','RunWait','Send','SendKeepActive','SetError', + 'SetExtended','ShellExecute','ShellExecuteWait','Shutdown','Sin', + 'Sleep','SoundPlay','SoundSetWaveVolume','SplashImageOn', + 'SplashOff','SplashTextOn','Sqrt','SRandom','StatusbarGetText', + 'StderrRead','StdinWrite','StdioClose','StdoutRead','String', + 'StringAddCR','StringCompare','StringFormat','StringInStr', + 'StringIsAlNum','StringIsAlpha','StringIsASCII','StringIsDigit', + 'StringIsFloat','StringIsInt','StringIsLower','StringIsSpace', + 'StringIsUpper','StringIsXDigit','StringLeft','StringLen', + 'StringLower','StringMid','StringRegExp','StringRegExpReplace', + 'StringReplace','StringRight','StringSplit','StringStripCR', + 'StringStripWS','StringToBinary','StringTrimLeft','StringTrimRight', + 'StringUpper','Tan','TCPAccept','TCPCloseSocket','TCPConnect', + 'TCPListen','TCPNameToIP','TCPRecv','TCPSend','TCPShutdown', + 'TCPStartup','TimerDiff','TimerInit','ToolTip','TrayCreateItem', + 'TrayCreateMenu','TrayGetMsg','TrayItemDelete','TrayItemGetHandle', + 'TrayItemGetState','TrayItemGetText','TrayItemSetOnEvent', + 'TrayItemSetState','TrayItemSetText','TraySetClick','TraySetIcon', + 'TraySetOnEvent','TraySetPauseIcon','TraySetState','TraySetToolTip', + 'TrayTip','UBound','UDPBind','UDPCloseSocket','UDPOpen','UDPRecv', + 'UDPSend','UDPShutdown','UDPStartup','VarGetType','WinActivate', + 'WinActive','WinClose','WinExists','WinFlash','WinGetCaretPos', + 'WinGetClassList','WinGetClientSize','WinGetHandle','WinGetPos', + 'WinGetProcess','WinGetState','WinGetText','WinGetTitle','WinKill', + 'WinList','WinMenuSelectItem','WinMinimizeAll','WinMinimizeAllUndo', + 'WinMove','WinSetOnTop','WinSetState','WinSetTitle','WinSetTrans', + 'WinWait','WinWaitActive','WinWaitClose','WinWaitNotActive' + ), + 4 => array( + 'ArrayAdd','ArrayBinarySearch','ArrayConcatenate','ArrayDelete', + 'ArrayDisplay','ArrayFindAll','ArrayInsert','ArrayMax', + 'ArrayMaxIndex','ArrayMin','ArrayMinIndex','ArrayPop','ArrayPush', + 'ArrayReverse','ArraySearch','ArraySort','ArraySwap','ArrayToClip', + 'ArrayToString','ArrayTrim','ChooseColor','ChooseFont', + 'ClipBoard_ChangeChain','ClipBoard_Close','ClipBoard_CountFormats', + 'ClipBoard_Empty','ClipBoard_EnumFormats','ClipBoard_FormatStr', + 'ClipBoard_GetData','ClipBoard_GetDataEx','ClipBoard_GetFormatName', + 'ClipBoard_GetOpenWindow','ClipBoard_GetOwner', + 'ClipBoard_GetPriorityFormat','ClipBoard_GetSequenceNumber', + 'ClipBoard_GetViewer','ClipBoard_IsFormatAvailable', + 'ClipBoard_Open','ClipBoard_RegisterFormat','ClipBoard_SetData', + 'ClipBoard_SetDataEx','ClipBoard_SetViewer','ClipPutFile', + 'ColorConvertHSLtoRGB','ColorConvertRGBtoHSL','ColorGetBlue', + 'ColorGetGreen','ColorGetRed','Date_Time_CompareFileTime', + 'Date_Time_DOSDateTimeToArray','Date_Time_DOSDateTimeToFileTime', + 'Date_Time_DOSDateTimeToStr','Date_Time_DOSDateToArray', + 'Date_Time_DOSDateToStr','Date_Time_DOSTimeToArray', + 'Date_Time_DOSTimeToStr','Date_Time_EncodeFileTime', + 'Date_Time_EncodeSystemTime','Date_Time_FileTimeToArray', + 'Date_Time_FileTimeToDOSDateTime', + 'Date_Time_FileTimeToLocalFileTime','Date_Time_FileTimeToStr', + 'Date_Time_FileTimeToSystemTime','Date_Time_GetFileTime', + 'Date_Time_GetLocalTime','Date_Time_GetSystemTime', + 'Date_Time_GetSystemTimeAdjustment', + 'Date_Time_GetSystemTimeAsFileTime', + 'Date_Time_GetSystemTimes','Date_Time_GetTickCount', + 'Date_Time_GetTimeZoneInformation', + 'Date_Time_LocalFileTimeToFileTime','Date_Time_SetFileTime', + 'Date_Time_SetLocalTime','Date_Time_SetSystemTime', + 'Date_Time_SetSystemTimeAdjustment', + 'Date_Time_SetTimeZoneInformation','Date_Time_SystemTimeToArray', + 'Date_Time_SystemTimeToDateStr','Date_Time_SystemTimeToDateTimeStr', + 'Date_Time_SystemTimeToFileTime','Date_Time_SystemTimeToTimeStr', + 'Date_Time_SystemTimeToTzSpecificLocalTime', + 'Date_Time_TzSpecificLocalTimeToSystemTime','DateAdd', + 'DateDayOfWeek','DateDaysInMonth','DateDiff','DateIsLeapYear', + 'DateIsValid','DateTimeFormat','DateTimeSplit','DateToDayOfWeek', + 'DateToDayOfWeekISO','DateToDayValue','DateToMonth', + 'DayValueToDate','DebugBugReportEnv','DebugOut','DebugSetup', + 'Degree','EventLog__Backup','EventLog__Clear','EventLog__Close', + 'EventLog__Count','EventLog__DeregisterSource','EventLog__Full', + 'EventLog__Notify','EventLog__Oldest','EventLog__Open', + 'EventLog__OpenBackup','EventLog__Read','EventLog__RegisterSource', + 'EventLog__Report','FileCountLines','FileCreate','FileListToArray', + 'FilePrint','FileReadToArray','FileWriteFromArray', + 'FileWriteLog','FileWriteToLine','GDIPlus_ArrowCapCreate', + 'GDIPlus_ArrowCapDispose','GDIPlus_ArrowCapGetFillState', + 'GDIPlus_ArrowCapGetHeight','GDIPlus_ArrowCapGetMiddleInset', + 'GDIPlus_ArrowCapGetWidth','GDIPlus_ArrowCapSetFillState', + 'GDIPlus_ArrowCapSetHeight','GDIPlus_ArrowCapSetMiddleInset', + 'GDIPlus_ArrowCapSetWidth','GDIPlus_BitmapCloneArea', + 'GDIPlus_BitmapCreateFromFile','GDIPlus_BitmapCreateFromGraphics', + 'GDIPlus_BitmapCreateFromHBITMAP', + 'GDIPlus_BitmapCreateHBITMAPFromBitmap','GDIPlus_BitmapDispose', + 'GDIPlus_BitmapLockBits','GDIPlus_BitmapUnlockBits', + 'GDIPlus_BrushClone','GDIPlus_BrushCreateSolid', + 'GDIPlus_BrushDispose','GDIPlus_BrushGetType', + 'GDIPlus_CustomLineCapDispose','GDIPlus_Decoders', + 'GDIPlus_DecodersGetCount','GDIPlus_DecodersGetSize', + 'GDIPlus_Encoders','GDIPlus_EncodersGetCLSID', + 'GDIPlus_EncodersGetCount','GDIPlus_EncodersGetParamList', + 'GDIPlus_EncodersGetParamListSize','GDIPlus_EncodersGetSize', + 'GDIPlus_FontCreate','GDIPlus_FontDispose', + 'GDIPlus_FontFamilyCreate','GDIPlus_FontFamilyDispose', + 'GDIPlus_GraphicsClear','GDIPlus_GraphicsCreateFromHDC', + 'GDIPlus_GraphicsCreateFromHWND','GDIPlus_GraphicsDispose', + 'GDIPlus_GraphicsDrawArc','GDIPlus_GraphicsDrawBezier', + 'GDIPlus_GraphicsDrawClosedCurve','GDIPlus_GraphicsDrawCurve', + 'GDIPlus_GraphicsDrawEllipse','GDIPlus_GraphicsDrawImage', + 'GDIPlus_GraphicsDrawImageRect','GDIPlus_GraphicsDrawImageRectRect', + 'GDIPlus_GraphicsDrawLine','GDIPlus_GraphicsDrawPie', + 'GDIPlus_GraphicsDrawPolygon','GDIPlus_GraphicsDrawRect', + 'GDIPlus_GraphicsDrawString','GDIPlus_GraphicsDrawStringEx', + 'GDIPlus_GraphicsFillClosedCurve','GDIPlus_GraphicsFillEllipse', + 'GDIPlus_GraphicsFillPie','GDIPlus_GraphicsFillRect', + 'GDIPlus_GraphicsGetDC','GDIPlus_GraphicsGetSmoothingMode', + 'GDIPlus_GraphicsMeasureString','GDIPlus_GraphicsReleaseDC', + 'GDIPlus_GraphicsSetSmoothingMode','GDIPlus_GraphicsSetTransform', + 'GDIPlus_ImageDispose','GDIPlus_ImageGetGraphicsContext', + 'GDIPlus_ImageGetHeight','GDIPlus_ImageGetWidth', + 'GDIPlus_ImageLoadFromFile','GDIPlus_ImageSaveToFile', + 'GDIPlus_ImageSaveToFileEx','GDIPlus_MatrixCreate', + 'GDIPlus_MatrixDispose','GDIPlus_MatrixRotate','GDIPlus_ParamAdd', + 'GDIPlus_ParamInit','GDIPlus_PenCreate','GDIPlus_PenDispose', + 'GDIPlus_PenGetAlignment','GDIPlus_PenGetColor', + 'GDIPlus_PenGetCustomEndCap','GDIPlus_PenGetDashCap', + 'GDIPlus_PenGetDashStyle','GDIPlus_PenGetEndCap', + 'GDIPlus_PenGetWidth','GDIPlus_PenSetAlignment', + 'GDIPlus_PenSetColor','GDIPlus_PenSetCustomEndCap', + 'GDIPlus_PenSetDashCap','GDIPlus_PenSetDashStyle', + 'GDIPlus_PenSetEndCap','GDIPlus_PenSetWidth','GDIPlus_RectFCreate', + 'GDIPlus_Shutdown','GDIPlus_Startup','GDIPlus_StringFormatCreate', + 'GDIPlus_StringFormatDispose','GetIP','GUICtrlAVI_Close', + 'GUICtrlAVI_Create','GUICtrlAVI_Destroy','GUICtrlAVI_Open', + 'GUICtrlAVI_OpenEx','GUICtrlAVI_Play','GUICtrlAVI_Seek', + 'GUICtrlAVI_Show','GUICtrlAVI_Stop','GUICtrlButton_Click', + 'GUICtrlButton_Create','GUICtrlButton_Destroy', + 'GUICtrlButton_Enable','GUICtrlButton_GetCheck', + 'GUICtrlButton_GetFocus','GUICtrlButton_GetIdealSize', + 'GUICtrlButton_GetImage','GUICtrlButton_GetImageList', + 'GUICtrlButton_GetState','GUICtrlButton_GetText', + 'GUICtrlButton_GetTextMargin','GUICtrlButton_SetCheck', + 'GUICtrlButton_SetFocus','GUICtrlButton_SetImage', + 'GUICtrlButton_SetImageList','GUICtrlButton_SetSize', + 'GUICtrlButton_SetState','GUICtrlButton_SetStyle', + 'GUICtrlButton_SetText','GUICtrlButton_SetTextMargin', + 'GUICtrlButton_Show','GUICtrlComboBox_AddDir', + 'GUICtrlComboBox_AddString','GUICtrlComboBox_AutoComplete', + 'GUICtrlComboBox_BeginUpdate','GUICtrlComboBox_Create', + 'GUICtrlComboBox_DeleteString','GUICtrlComboBox_Destroy', + 'GUICtrlComboBox_EndUpdate','GUICtrlComboBox_FindString', + 'GUICtrlComboBox_FindStringExact','GUICtrlComboBox_GetComboBoxInfo', + 'GUICtrlComboBox_GetCount','GUICtrlComboBox_GetCurSel', + 'GUICtrlComboBox_GetDroppedControlRect', + 'GUICtrlComboBox_GetDroppedControlRectEx', + 'GUICtrlComboBox_GetDroppedState','GUICtrlComboBox_GetDroppedWidth', + 'GUICtrlComboBox_GetEditSel','GUICtrlComboBox_GetEditText', + 'GUICtrlComboBox_GetExtendedUI', + 'GUICtrlComboBox_GetHorizontalExtent', + 'GUICtrlComboBox_GetItemHeight','GUICtrlComboBox_GetLBText', + 'GUICtrlComboBox_GetLBTextLen','GUICtrlComboBox_GetList', + 'GUICtrlComboBox_GetListArray','GUICtrlComboBox_GetLocale', + 'GUICtrlComboBox_GetLocaleCountry','GUICtrlComboBox_GetLocaleLang', + 'GUICtrlComboBox_GetLocalePrimLang', + 'GUICtrlComboBox_GetLocaleSubLang','GUICtrlComboBox_GetMinVisible', + 'GUICtrlComboBox_GetTopIndex','GUICtrlComboBox_InitStorage', + 'GUICtrlComboBox_InsertString','GUICtrlComboBox_LimitText', + 'GUICtrlComboBox_ReplaceEditSel','GUICtrlComboBox_ResetContent', + 'GUICtrlComboBox_SelectString','GUICtrlComboBox_SetCurSel', + 'GUICtrlComboBox_SetDroppedWidth','GUICtrlComboBox_SetEditSel', + 'GUICtrlComboBox_SetEditText','GUICtrlComboBox_SetExtendedUI', + 'GUICtrlComboBox_SetHorizontalExtent', + 'GUICtrlComboBox_SetItemHeight','GUICtrlComboBox_SetMinVisible', + 'GUICtrlComboBox_SetTopIndex','GUICtrlComboBox_ShowDropDown', + 'GUICtrlComboBoxEx_AddDir','GUICtrlComboBoxEx_AddString', + 'GUICtrlComboBoxEx_BeginUpdate','GUICtrlComboBoxEx_Create', + 'GUICtrlComboBoxEx_CreateSolidBitMap', + 'GUICtrlComboBoxEx_DeleteString','GUICtrlComboBoxEx_Destroy', + 'GUICtrlComboBoxEx_EndUpdate','GUICtrlComboBoxEx_FindStringExact', + 'GUICtrlComboBoxEx_GetComboBoxInfo', + 'GUICtrlComboBoxEx_GetComboControl','GUICtrlComboBoxEx_GetCount', + 'GUICtrlComboBoxEx_GetCurSel', + 'GUICtrlComboBoxEx_GetDroppedControlRect', + 'GUICtrlComboBoxEx_GetDroppedControlRectEx', + 'GUICtrlComboBoxEx_GetDroppedState', + 'GUICtrlComboBoxEx_GetDroppedWidth', + 'GUICtrlComboBoxEx_GetEditControl','GUICtrlComboBoxEx_GetEditSel', + 'GUICtrlComboBoxEx_GetEditText', + 'GUICtrlComboBoxEx_GetExtendedStyle', + 'GUICtrlComboBoxEx_GetExtendedUI','GUICtrlComboBoxEx_GetImageList', + 'GUICtrlComboBoxEx_GetItem','GUICtrlComboBoxEx_GetItemEx', + 'GUICtrlComboBoxEx_GetItemHeight','GUICtrlComboBoxEx_GetItemImage', + 'GUICtrlComboBoxEx_GetItemIndent', + 'GUICtrlComboBoxEx_GetItemOverlayImage', + 'GUICtrlComboBoxEx_GetItemParam', + 'GUICtrlComboBoxEx_GetItemSelectedImage', + 'GUICtrlComboBoxEx_GetItemText','GUICtrlComboBoxEx_GetItemTextLen', + 'GUICtrlComboBoxEx_GetList','GUICtrlComboBoxEx_GetListArray', + 'GUICtrlComboBoxEx_GetLocale','GUICtrlComboBoxEx_GetLocaleCountry', + 'GUICtrlComboBoxEx_GetLocaleLang', + 'GUICtrlComboBoxEx_GetLocalePrimLang', + 'GUICtrlComboBoxEx_GetLocaleSubLang', + 'GUICtrlComboBoxEx_GetMinVisible','GUICtrlComboBoxEx_GetTopIndex', + 'GUICtrlComboBoxEx_InitStorage','GUICtrlComboBoxEx_InsertString', + 'GUICtrlComboBoxEx_LimitText','GUICtrlComboBoxEx_ReplaceEditSel', + 'GUICtrlComboBoxEx_ResetContent','GUICtrlComboBoxEx_SetCurSel', + 'GUICtrlComboBoxEx_SetDroppedWidth','GUICtrlComboBoxEx_SetEditSel', + 'GUICtrlComboBoxEx_SetEditText', + 'GUICtrlComboBoxEx_SetExtendedStyle', + 'GUICtrlComboBoxEx_SetExtendedUI','GUICtrlComboBoxEx_SetImageList', + 'GUICtrlComboBoxEx_SetItem','GUICtrlComboBoxEx_SetItemEx', + 'GUICtrlComboBoxEx_SetItemHeight','GUICtrlComboBoxEx_SetItemImage', + 'GUICtrlComboBoxEx_SetItemIndent', + 'GUICtrlComboBoxEx_SetItemOverlayImage', + 'GUICtrlComboBoxEx_SetItemParam', + 'GUICtrlComboBoxEx_SetItemSelectedImage', + 'GUICtrlComboBoxEx_SetMinVisible','GUICtrlComboBoxEx_SetTopIndex', + 'GUICtrlComboBoxEx_ShowDropDown','GUICtrlDTP_Create', + 'GUICtrlDTP_Destroy','GUICtrlDTP_GetMCColor','GUICtrlDTP_GetMCFont', + 'GUICtrlDTP_GetMonthCal','GUICtrlDTP_GetRange', + 'GUICtrlDTP_GetRangeEx','GUICtrlDTP_GetSystemTime', + 'GUICtrlDTP_GetSystemTimeEx','GUICtrlDTP_SetFormat', + 'GUICtrlDTP_SetMCColor','GUICtrlDTP_SetMCFont', + 'GUICtrlDTP_SetRange','GUICtrlDTP_SetRangeEx', + 'GUICtrlDTP_SetSystemTime','GUICtrlDTP_SetSystemTimeEx', + 'GUICtrlEdit_AppendText','GUICtrlEdit_BeginUpdate', + 'GUICtrlEdit_CanUndo','GUICtrlEdit_CharFromPos', + 'GUICtrlEdit_Create','GUICtrlEdit_Destroy', + 'GUICtrlEdit_EmptyUndoBuffer','GUICtrlEdit_EndUpdate', + 'GUICtrlEdit_Find','GUICtrlEdit_FmtLines', + 'GUICtrlEdit_GetFirstVisibleLine','GUICtrlEdit_GetLimitText', + 'GUICtrlEdit_GetLine','GUICtrlEdit_GetLineCount', + 'GUICtrlEdit_GetMargins','GUICtrlEdit_GetModify', + 'GUICtrlEdit_GetPasswordChar','GUICtrlEdit_GetRECT', + 'GUICtrlEdit_GetRECTEx','GUICtrlEdit_GetSel','GUICtrlEdit_GetText', + 'GUICtrlEdit_GetTextLen','GUICtrlEdit_HideBalloonTip', + 'GUICtrlEdit_InsertText','GUICtrlEdit_LineFromChar', + 'GUICtrlEdit_LineIndex','GUICtrlEdit_LineLength', + 'GUICtrlEdit_LineScroll','GUICtrlEdit_PosFromChar', + 'GUICtrlEdit_ReplaceSel','GUICtrlEdit_Scroll', + 'GUICtrlEdit_SetLimitText','GUICtrlEdit_SetMargins', + 'GUICtrlEdit_SetModify','GUICtrlEdit_SetPasswordChar', + 'GUICtrlEdit_SetReadOnly','GUICtrlEdit_SetRECT', + 'GUICtrlEdit_SetRECTEx','GUICtrlEdit_SetRECTNP', + 'GUICtrlEdit_SetRectNPEx','GUICtrlEdit_SetSel', + 'GUICtrlEdit_SetTabStops','GUICtrlEdit_SetText', + 'GUICtrlEdit_ShowBalloonTip','GUICtrlEdit_Undo', + 'GUICtrlHeader_AddItem','GUICtrlHeader_ClearFilter', + 'GUICtrlHeader_ClearFilterAll','GUICtrlHeader_Create', + 'GUICtrlHeader_CreateDragImage','GUICtrlHeader_DeleteItem', + 'GUICtrlHeader_Destroy','GUICtrlHeader_EditFilter', + 'GUICtrlHeader_GetBitmapMargin','GUICtrlHeader_GetImageList', + 'GUICtrlHeader_GetItem','GUICtrlHeader_GetItemAlign', + 'GUICtrlHeader_GetItemBitmap','GUICtrlHeader_GetItemCount', + 'GUICtrlHeader_GetItemDisplay','GUICtrlHeader_GetItemFlags', + 'GUICtrlHeader_GetItemFormat','GUICtrlHeader_GetItemImage', + 'GUICtrlHeader_GetItemOrder','GUICtrlHeader_GetItemParam', + 'GUICtrlHeader_GetItemRect','GUICtrlHeader_GetItemRectEx', + 'GUICtrlHeader_GetItemText','GUICtrlHeader_GetItemWidth', + 'GUICtrlHeader_GetOrderArray','GUICtrlHeader_GetUnicodeFormat', + 'GUICtrlHeader_HitTest','GUICtrlHeader_InsertItem', + 'GUICtrlHeader_Layout','GUICtrlHeader_OrderToIndex', + 'GUICtrlHeader_SetBitmapMargin', + 'GUICtrlHeader_SetFilterChangeTimeout', + 'GUICtrlHeader_SetHotDivider','GUICtrlHeader_SetImageList', + 'GUICtrlHeader_SetItem','GUICtrlHeader_SetItemAlign', + 'GUICtrlHeader_SetItemBitmap','GUICtrlHeader_SetItemDisplay', + 'GUICtrlHeader_SetItemFlags','GUICtrlHeader_SetItemFormat', + 'GUICtrlHeader_SetItemImage','GUICtrlHeader_SetItemOrder', + 'GUICtrlHeader_SetItemParam','GUICtrlHeader_SetItemText', + 'GUICtrlHeader_SetItemWidth','GUICtrlHeader_SetOrderArray', + 'GUICtrlHeader_SetUnicodeFormat','GUICtrlIpAddress_ClearAddress', + 'GUICtrlIpAddress_Create','GUICtrlIpAddress_Destroy', + 'GUICtrlIpAddress_Get','GUICtrlIpAddress_GetArray', + 'GUICtrlIpAddress_GetEx','GUICtrlIpAddress_IsBlank', + 'GUICtrlIpAddress_Set','GUICtrlIpAddress_SetArray', + 'GUICtrlIpAddress_SetEx','GUICtrlIpAddress_SetFocus', + 'GUICtrlIpAddress_SetFont','GUICtrlIpAddress_SetRange', + 'GUICtrlIpAddress_ShowHide','GUICtrlListBox_AddFile', + 'GUICtrlListBox_AddString','GUICtrlListBox_BeginUpdate', + 'GUICtrlListBox_Create','GUICtrlListBox_DeleteString', + 'GUICtrlListBox_Destroy','GUICtrlListBox_Dir', + 'GUICtrlListBox_EndUpdate','GUICtrlListBox_FindInText', + 'GUICtrlListBox_FindString','GUICtrlListBox_GetAnchorIndex', + 'GUICtrlListBox_GetCaretIndex','GUICtrlListBox_GetCount', + 'GUICtrlListBox_GetCurSel','GUICtrlListBox_GetHorizontalExtent', + 'GUICtrlListBox_GetItemData','GUICtrlListBox_GetItemHeight', + 'GUICtrlListBox_GetItemRect','GUICtrlListBox_GetItemRectEx', + 'GUICtrlListBox_GetListBoxInfo','GUICtrlListBox_GetLocale', + 'GUICtrlListBox_GetLocaleCountry','GUICtrlListBox_GetLocaleLang', + 'GUICtrlListBox_GetLocalePrimLang', + 'GUICtrlListBox_GetLocaleSubLang','GUICtrlListBox_GetSel', + 'GUICtrlListBox_GetSelCount','GUICtrlListBox_GetSelItems', + 'GUICtrlListBox_GetSelItemsText','GUICtrlListBox_GetText', + 'GUICtrlListBox_GetTextLen','GUICtrlListBox_GetTopIndex', + 'GUICtrlListBox_InitStorage','GUICtrlListBox_InsertString', + 'GUICtrlListBox_ItemFromPoint','GUICtrlListBox_ReplaceString', + 'GUICtrlListBox_ResetContent','GUICtrlListBox_SelectString', + 'GUICtrlListBox_SelItemRange','GUICtrlListBox_SelItemRangeEx', + 'GUICtrlListBox_SetAnchorIndex','GUICtrlListBox_SetCaretIndex', + 'GUICtrlListBox_SetColumnWidth','GUICtrlListBox_SetCurSel', + 'GUICtrlListBox_SetHorizontalExtent','GUICtrlListBox_SetItemData', + 'GUICtrlListBox_SetItemHeight','GUICtrlListBox_SetLocale', + 'GUICtrlListBox_SetSel','GUICtrlListBox_SetTabStops', + 'GUICtrlListBox_SetTopIndex','GUICtrlListBox_Sort', + 'GUICtrlListBox_SwapString','GUICtrlListBox_UpdateHScroll', + 'GUICtrlListView_AddArray','GUICtrlListView_AddColumn', + 'GUICtrlListView_AddItem','GUICtrlListView_AddSubItem', + 'GUICtrlListView_ApproximateViewHeight', + 'GUICtrlListView_ApproximateViewRect', + 'GUICtrlListView_ApproximateViewWidth','GUICtrlListView_Arrange', + 'GUICtrlListView_BeginUpdate','GUICtrlListView_CancelEditLabel', + 'GUICtrlListView_ClickItem','GUICtrlListView_CopyItems', + 'GUICtrlListView_Create','GUICtrlListView_CreateDragImage', + 'GUICtrlListView_CreateSolidBitMap', + 'GUICtrlListView_DeleteAllItems','GUICtrlListView_DeleteColumn', + 'GUICtrlListView_DeleteItem','GUICtrlListView_DeleteItemsSelected', + 'GUICtrlListView_Destroy','GUICtrlListView_DrawDragImage', + 'GUICtrlListView_EditLabel','GUICtrlListView_EnableGroupView', + 'GUICtrlListView_EndUpdate','GUICtrlListView_EnsureVisible', + 'GUICtrlListView_FindInText','GUICtrlListView_FindItem', + 'GUICtrlListView_FindNearest','GUICtrlListView_FindParam', + 'GUICtrlListView_FindText','GUICtrlListView_GetBkColor', + 'GUICtrlListView_GetBkImage','GUICtrlListView_GetCallbackMask', + 'GUICtrlListView_GetColumn','GUICtrlListView_GetColumnCount', + 'GUICtrlListView_GetColumnOrder', + 'GUICtrlListView_GetColumnOrderArray', + 'GUICtrlListView_GetColumnWidth','GUICtrlListView_GetCounterPage', + 'GUICtrlListView_GetEditControl', + 'GUICtrlListView_GetExtendedListViewStyle', + 'GUICtrlListView_GetGroupInfo', + 'GUICtrlListView_GetGroupViewEnabled','GUICtrlListView_GetHeader', + 'GUICtrlListView_GetHotCursor','GUICtrlListView_GetHotItem', + 'GUICtrlListView_GetHoverTime','GUICtrlListView_GetImageList', + 'GUICtrlListView_GetISearchString','GUICtrlListView_GetItem', + 'GUICtrlListView_GetItemChecked','GUICtrlListView_GetItemCount', + 'GUICtrlListView_GetItemCut','GUICtrlListView_GetItemDropHilited', + 'GUICtrlListView_GetItemEx','GUICtrlListView_GetItemFocused', + 'GUICtrlListView_GetItemGroupID','GUICtrlListView_GetItemImage', + 'GUICtrlListView_GetItemIndent','GUICtrlListView_GetItemParam', + 'GUICtrlListView_GetItemPosition', + 'GUICtrlListView_GetItemPositionX', + 'GUICtrlListView_GetItemPositionY','GUICtrlListView_GetItemRect', + 'GUICtrlListView_GetItemRectEx','GUICtrlListView_GetItemSelected', + 'GUICtrlListView_GetItemSpacing','GUICtrlListView_GetItemSpacingX', + 'GUICtrlListView_GetItemSpacingY','GUICtrlListView_GetItemState', + 'GUICtrlListView_GetItemStateImage','GUICtrlListView_GetItemText', + 'GUICtrlListView_GetItemTextArray', + 'GUICtrlListView_GetItemTextString','GUICtrlListView_GetNextItem', + 'GUICtrlListView_GetNumberOfWorkAreas','GUICtrlListView_GetOrigin', + 'GUICtrlListView_GetOriginX','GUICtrlListView_GetOriginY', + 'GUICtrlListView_GetOutlineColor', + 'GUICtrlListView_GetSelectedColumn', + 'GUICtrlListView_GetSelectedCount', + 'GUICtrlListView_GetSelectedIndices', + 'GUICtrlListView_GetSelectionMark','GUICtrlListView_GetStringWidth', + 'GUICtrlListView_GetSubItemRect','GUICtrlListView_GetTextBkColor', + 'GUICtrlListView_GetTextColor','GUICtrlListView_GetToolTips', + 'GUICtrlListView_GetTopIndex','GUICtrlListView_GetUnicodeFormat', + 'GUICtrlListView_GetView','GUICtrlListView_GetViewDetails', + 'GUICtrlListView_GetViewLarge','GUICtrlListView_GetViewList', + 'GUICtrlListView_GetViewRect','GUICtrlListView_GetViewSmall', + 'GUICtrlListView_GetViewTile','GUICtrlListView_HideColumn', + 'GUICtrlListView_HitTest','GUICtrlListView_InsertColumn', + 'GUICtrlListView_InsertGroup','GUICtrlListView_InsertItem', + 'GUICtrlListView_JustifyColumn','GUICtrlListView_MapIDToIndex', + 'GUICtrlListView_MapIndexToID','GUICtrlListView_RedrawItems', + 'GUICtrlListView_RegisterSortCallBack', + 'GUICtrlListView_RemoveAllGroups','GUICtrlListView_RemoveGroup', + 'GUICtrlListView_Scroll','GUICtrlListView_SetBkColor', + 'GUICtrlListView_SetBkImage','GUICtrlListView_SetCallBackMask', + 'GUICtrlListView_SetColumn','GUICtrlListView_SetColumnOrder', + 'GUICtrlListView_SetColumnOrderArray', + 'GUICtrlListView_SetColumnWidth', + 'GUICtrlListView_SetExtendedListViewStyle', + 'GUICtrlListView_SetGroupInfo','GUICtrlListView_SetHotItem', + 'GUICtrlListView_SetHoverTime','GUICtrlListView_SetIconSpacing', + 'GUICtrlListView_SetImageList','GUICtrlListView_SetItem', + 'GUICtrlListView_SetItemChecked','GUICtrlListView_SetItemCount', + 'GUICtrlListView_SetItemCut','GUICtrlListView_SetItemDropHilited', + 'GUICtrlListView_SetItemEx','GUICtrlListView_SetItemFocused', + 'GUICtrlListView_SetItemGroupID','GUICtrlListView_SetItemImage', + 'GUICtrlListView_SetItemIndent','GUICtrlListView_SetItemParam', + 'GUICtrlListView_SetItemPosition', + 'GUICtrlListView_SetItemPosition32', + 'GUICtrlListView_SetItemSelected','GUICtrlListView_SetItemState', + 'GUICtrlListView_SetItemStateImage','GUICtrlListView_SetItemText', + 'GUICtrlListView_SetOutlineColor', + 'GUICtrlListView_SetSelectedColumn', + 'GUICtrlListView_SetSelectionMark','GUICtrlListView_SetTextBkColor', + 'GUICtrlListView_SetTextColor','GUICtrlListView_SetToolTips', + 'GUICtrlListView_SetUnicodeFormat','GUICtrlListView_SetView', + 'GUICtrlListView_SetWorkAreas','GUICtrlListView_SimpleSort', + 'GUICtrlListView_SortItems','GUICtrlListView_SubItemHitTest', + 'GUICtrlListView_UnRegisterSortCallBack', + 'GUICtrlMenu_AddMenuItem','GUICtrlMenu_AppendMenu', + 'GUICtrlMenu_CheckMenuItem','GUICtrlMenu_CheckRadioItem', + 'GUICtrlMenu_CreateMenu','GUICtrlMenu_CreatePopup', + 'GUICtrlMenu_DeleteMenu','GUICtrlMenu_DestroyMenu', + 'GUICtrlMenu_DrawMenuBar','GUICtrlMenu_EnableMenuItem', + 'GUICtrlMenu_FindItem','GUICtrlMenu_FindParent', + 'GUICtrlMenu_GetItemBmp','GUICtrlMenu_GetItemBmpChecked', + 'GUICtrlMenu_GetItemBmpUnchecked','GUICtrlMenu_GetItemChecked', + 'GUICtrlMenu_GetItemCount','GUICtrlMenu_GetItemData', + 'GUICtrlMenu_GetItemDefault','GUICtrlMenu_GetItemDisabled', + 'GUICtrlMenu_GetItemEnabled','GUICtrlMenu_GetItemGrayed', + 'GUICtrlMenu_GetItemHighlighted','GUICtrlMenu_GetItemID', + 'GUICtrlMenu_GetItemInfo','GUICtrlMenu_GetItemRect', + 'GUICtrlMenu_GetItemRectEx','GUICtrlMenu_GetItemState', + 'GUICtrlMenu_GetItemStateEx','GUICtrlMenu_GetItemSubMenu', + 'GUICtrlMenu_GetItemText','GUICtrlMenu_GetItemType', + 'GUICtrlMenu_GetMenu','GUICtrlMenu_GetMenuBackground', + 'GUICtrlMenu_GetMenuBarInfo','GUICtrlMenu_GetMenuContextHelpID', + 'GUICtrlMenu_GetMenuData','GUICtrlMenu_GetMenuDefaultItem', + 'GUICtrlMenu_GetMenuHeight','GUICtrlMenu_GetMenuInfo', + 'GUICtrlMenu_GetMenuStyle','GUICtrlMenu_GetSystemMenu', + 'GUICtrlMenu_InsertMenuItem','GUICtrlMenu_InsertMenuItemEx', + 'GUICtrlMenu_IsMenu','GUICtrlMenu_LoadMenu', + 'GUICtrlMenu_MapAccelerator','GUICtrlMenu_MenuItemFromPoint', + 'GUICtrlMenu_RemoveMenu','GUICtrlMenu_SetItemBitmaps', + 'GUICtrlMenu_SetItemBmp','GUICtrlMenu_SetItemBmpChecked', + 'GUICtrlMenu_SetItemBmpUnchecked','GUICtrlMenu_SetItemChecked', + 'GUICtrlMenu_SetItemData','GUICtrlMenu_SetItemDefault', + 'GUICtrlMenu_SetItemDisabled','GUICtrlMenu_SetItemEnabled', + 'GUICtrlMenu_SetItemGrayed','GUICtrlMenu_SetItemHighlighted', + 'GUICtrlMenu_SetItemID','GUICtrlMenu_SetItemInfo', + 'GUICtrlMenu_SetItemState','GUICtrlMenu_SetItemSubMenu', + 'GUICtrlMenu_SetItemText','GUICtrlMenu_SetItemType', + 'GUICtrlMenu_SetMenu','GUICtrlMenu_SetMenuBackground', + 'GUICtrlMenu_SetMenuContextHelpID','GUICtrlMenu_SetMenuData', + 'GUICtrlMenu_SetMenuDefaultItem','GUICtrlMenu_SetMenuHeight', + 'GUICtrlMenu_SetMenuInfo','GUICtrlMenu_SetMenuStyle', + 'GUICtrlMenu_TrackPopupMenu','GUICtrlMonthCal_Create', + 'GUICtrlMonthCal_Destroy','GUICtrlMonthCal_GetColor', + 'GUICtrlMonthCal_GetColorArray','GUICtrlMonthCal_GetCurSel', + 'GUICtrlMonthCal_GetCurSelStr','GUICtrlMonthCal_GetFirstDOW', + 'GUICtrlMonthCal_GetFirstDOWStr','GUICtrlMonthCal_GetMaxSelCount', + 'GUICtrlMonthCal_GetMaxTodayWidth', + 'GUICtrlMonthCal_GetMinReqHeight','GUICtrlMonthCal_GetMinReqRect', + 'GUICtrlMonthCal_GetMinReqRectArray', + 'GUICtrlMonthCal_GetMinReqWidth','GUICtrlMonthCal_GetMonthDelta', + 'GUICtrlMonthCal_GetMonthRange','GUICtrlMonthCal_GetMonthRangeMax', + 'GUICtrlMonthCal_GetMonthRangeMaxStr', + 'GUICtrlMonthCal_GetMonthRangeMin', + 'GUICtrlMonthCal_GetMonthRangeMinStr', + 'GUICtrlMonthCal_GetMonthRangeSpan','GUICtrlMonthCal_GetRange', + 'GUICtrlMonthCal_GetRangeMax','GUICtrlMonthCal_GetRangeMaxStr', + 'GUICtrlMonthCal_GetRangeMin','GUICtrlMonthCal_GetRangeMinStr', + 'GUICtrlMonthCal_GetSelRange','GUICtrlMonthCal_GetSelRangeMax', + 'GUICtrlMonthCal_GetSelRangeMaxStr', + 'GUICtrlMonthCal_GetSelRangeMin', + 'GUICtrlMonthCal_GetSelRangeMinStr','GUICtrlMonthCal_GetToday', + 'GUICtrlMonthCal_GetTodayStr','GUICtrlMonthCal_GetUnicodeFormat', + 'GUICtrlMonthCal_HitTest','GUICtrlMonthCal_SetColor', + 'GUICtrlMonthCal_SetCurSel','GUICtrlMonthCal_SetDayState', + 'GUICtrlMonthCal_SetFirstDOW','GUICtrlMonthCal_SetMaxSelCount', + 'GUICtrlMonthCal_SetMonthDelta','GUICtrlMonthCal_SetRange', + 'GUICtrlMonthCal_SetSelRange','GUICtrlMonthCal_SetToday', + 'GUICtrlMonthCal_SetUnicodeFormat','GUICtrlRebar_AddBand', + 'GUICtrlRebar_AddToolBarBand','GUICtrlRebar_BeginDrag', + 'GUICtrlRebar_Create','GUICtrlRebar_DeleteBand', + 'GUICtrlRebar_Destroy','GUICtrlRebar_DragMove', + 'GUICtrlRebar_EndDrag','GUICtrlRebar_GetBandBackColor', + 'GUICtrlRebar_GetBandBorders','GUICtrlRebar_GetBandBordersEx', + 'GUICtrlRebar_GetBandChildHandle','GUICtrlRebar_GetBandChildSize', + 'GUICtrlRebar_GetBandCount','GUICtrlRebar_GetBandForeColor', + 'GUICtrlRebar_GetBandHeaderSize','GUICtrlRebar_GetBandID', + 'GUICtrlRebar_GetBandIdealSize','GUICtrlRebar_GetBandLength', + 'GUICtrlRebar_GetBandLParam','GUICtrlRebar_GetBandMargins', + 'GUICtrlRebar_GetBandMarginsEx','GUICtrlRebar_GetBandRect', + 'GUICtrlRebar_GetBandRectEx','GUICtrlRebar_GetBandStyle', + 'GUICtrlRebar_GetBandStyleBreak', + 'GUICtrlRebar_GetBandStyleChildEdge', + 'GUICtrlRebar_GetBandStyleFixedBMP', + 'GUICtrlRebar_GetBandStyleFixedSize', + 'GUICtrlRebar_GetBandStyleGripperAlways', + 'GUICtrlRebar_GetBandStyleHidden', + 'GUICtrlRebar_GetBandStyleHideTitle', + 'GUICtrlRebar_GetBandStyleNoGripper', + 'GUICtrlRebar_GetBandStyleTopAlign', + 'GUICtrlRebar_GetBandStyleUseChevron', + 'GUICtrlRebar_GetBandStyleVariableHeight', + 'GUICtrlRebar_GetBandText','GUICtrlRebar_GetBarHeight', + 'GUICtrlRebar_GetBKColor','GUICtrlRebar_GetColorScheme', + 'GUICtrlRebar_GetRowCount','GUICtrlRebar_GetRowHeight', + 'GUICtrlRebar_GetTextColor','GUICtrlRebar_GetToolTips', + 'GUICtrlRebar_GetUnicodeFormat','GUICtrlRebar_HitTest', + 'GUICtrlRebar_IDToIndex','GUICtrlRebar_MaximizeBand', + 'GUICtrlRebar_MinimizeBand','GUICtrlRebar_MoveBand', + 'GUICtrlRebar_SetBandBackColor','GUICtrlRebar_SetBandForeColor', + 'GUICtrlRebar_SetBandHeaderSize','GUICtrlRebar_SetBandID', + 'GUICtrlRebar_SetBandIdealSize','GUICtrlRebar_SetBandLength', + 'GUICtrlRebar_SetBandLParam','GUICtrlRebar_SetBandStyle', + 'GUICtrlRebar_SetBandStyleBreak', + 'GUICtrlRebar_SetBandStyleChildEdge', + 'GUICtrlRebar_SetBandStyleFixedBMP', + 'GUICtrlRebar_SetBandStyleFixedSize', + 'GUICtrlRebar_SetBandStyleGripperAlways', + 'GUICtrlRebar_SetBandStyleHidden', + 'GUICtrlRebar_SetBandStyleHideTitle', + 'GUICtrlRebar_SetBandStyleNoGripper', + 'GUICtrlRebar_SetBandStyleTopAlign', + 'GUICtrlRebar_SetBandStyleUseChevron', + 'GUICtrlRebar_SetBandStyleVariableHeight', + 'GUICtrlRebar_SetBandText','GUICtrlRebar_SetBKColor', + 'GUICtrlRebar_SetColorScheme','GUICtrlRebar_SetTextColor', + 'GUICtrlRebar_SetToolTips','GUICtrlRebar_SetUnicodeFormat', + 'GUICtrlRebar_ShowBand','GUICtrlSlider_ClearSel', + 'GUICtrlSlider_ClearTics','GUICtrlSlider_Create', + 'GUICtrlSlider_Destroy','GUICtrlSlider_GetBuddy', + 'GUICtrlSlider_GetChannelRect','GUICtrlSlider_GetLineSize', + 'GUICtrlSlider_GetNumTics','GUICtrlSlider_GetPageSize', + 'GUICtrlSlider_GetPos','GUICtrlSlider_GetPTics', + 'GUICtrlSlider_GetRange','GUICtrlSlider_GetRangeMax', + 'GUICtrlSlider_GetRangeMin','GUICtrlSlider_GetSel', + 'GUICtrlSlider_GetSelEnd','GUICtrlSlider_GetSelStart', + 'GUICtrlSlider_GetThumbLength','GUICtrlSlider_GetThumbRect', + 'GUICtrlSlider_GetThumbRectEx','GUICtrlSlider_GetTic', + 'GUICtrlSlider_GetTicPos','GUICtrlSlider_GetToolTips', + 'GUICtrlSlider_GetUnicodeFormat','GUICtrlSlider_SetBuddy', + 'GUICtrlSlider_SetLineSize','GUICtrlSlider_SetPageSize', + 'GUICtrlSlider_SetPos','GUICtrlSlider_SetRange', + 'GUICtrlSlider_SetRangeMax','GUICtrlSlider_SetRangeMin', + 'GUICtrlSlider_SetSel','GUICtrlSlider_SetSelEnd', + 'GUICtrlSlider_SetSelStart','GUICtrlSlider_SetThumbLength', + 'GUICtrlSlider_SetTic','GUICtrlSlider_SetTicFreq', + 'GUICtrlSlider_SetTipSide','GUICtrlSlider_SetToolTips', + 'GUICtrlSlider_SetUnicodeFormat','GUICtrlStatusBar_Create', + 'GUICtrlStatusBar_Destroy','GUICtrlStatusBar_EmbedControl', + 'GUICtrlStatusBar_GetBorders','GUICtrlStatusBar_GetBordersHorz', + 'GUICtrlStatusBar_GetBordersRect','GUICtrlStatusBar_GetBordersVert', + 'GUICtrlStatusBar_GetCount','GUICtrlStatusBar_GetHeight', + 'GUICtrlStatusBar_GetIcon','GUICtrlStatusBar_GetParts', + 'GUICtrlStatusBar_GetRect','GUICtrlStatusBar_GetRectEx', + 'GUICtrlStatusBar_GetText','GUICtrlStatusBar_GetTextFlags', + 'GUICtrlStatusBar_GetTextLength','GUICtrlStatusBar_GetTextLengthEx', + 'GUICtrlStatusBar_GetTipText','GUICtrlStatusBar_GetUnicodeFormat', + 'GUICtrlStatusBar_GetWidth','GUICtrlStatusBar_IsSimple', + 'GUICtrlStatusBar_Resize','GUICtrlStatusBar_SetBkColor', + 'GUICtrlStatusBar_SetIcon','GUICtrlStatusBar_SetMinHeight', + 'GUICtrlStatusBar_SetParts','GUICtrlStatusBar_SetSimple', + 'GUICtrlStatusBar_SetText','GUICtrlStatusBar_SetTipText', + 'GUICtrlStatusBar_SetUnicodeFormat','GUICtrlStatusBar_ShowHide', + 'GUICtrlTab_Create','GUICtrlTab_DeleteAllItems', + 'GUICtrlTab_DeleteItem','GUICtrlTab_DeselectAll', + 'GUICtrlTab_Destroy','GUICtrlTab_FindTab','GUICtrlTab_GetCurFocus', + 'GUICtrlTab_GetCurSel','GUICtrlTab_GetDisplayRect', + 'GUICtrlTab_GetDisplayRectEx','GUICtrlTab_GetExtendedStyle', + 'GUICtrlTab_GetImageList','GUICtrlTab_GetItem', + 'GUICtrlTab_GetItemCount','GUICtrlTab_GetItemImage', + 'GUICtrlTab_GetItemParam','GUICtrlTab_GetItemRect', + 'GUICtrlTab_GetItemRectEx','GUICtrlTab_GetItemState', + 'GUICtrlTab_GetItemText','GUICtrlTab_GetRowCount', + 'GUICtrlTab_GetToolTips','GUICtrlTab_GetUnicodeFormat', + 'GUICtrlTab_HighlightItem','GUICtrlTab_HitTest', + 'GUICtrlTab_InsertItem','GUICtrlTab_RemoveImage', + 'GUICtrlTab_SetCurFocus','GUICtrlTab_SetCurSel', + 'GUICtrlTab_SetExtendedStyle','GUICtrlTab_SetImageList', + 'GUICtrlTab_SetItem','GUICtrlTab_SetItemImage', + 'GUICtrlTab_SetItemParam','GUICtrlTab_SetItemSize', + 'GUICtrlTab_SetItemState','GUICtrlTab_SetItemText', + 'GUICtrlTab_SetMinTabWidth','GUICtrlTab_SetPadding', + 'GUICtrlTab_SetToolTips','GUICtrlTab_SetUnicodeFormat', + 'GUICtrlToolbar_AddBitmap','GUICtrlToolbar_AddButton', + 'GUICtrlToolbar_AddButtonSep','GUICtrlToolbar_AddString', + 'GUICtrlToolbar_ButtonCount','GUICtrlToolbar_CheckButton', + 'GUICtrlToolbar_ClickAccel','GUICtrlToolbar_ClickButton', + 'GUICtrlToolbar_ClickIndex','GUICtrlToolbar_CommandToIndex', + 'GUICtrlToolbar_Create','GUICtrlToolbar_Customize', + 'GUICtrlToolbar_DeleteButton','GUICtrlToolbar_Destroy', + 'GUICtrlToolbar_EnableButton','GUICtrlToolbar_FindToolbar', + 'GUICtrlToolbar_GetAnchorHighlight','GUICtrlToolbar_GetBitmapFlags', + 'GUICtrlToolbar_GetButtonBitmap','GUICtrlToolbar_GetButtonInfo', + 'GUICtrlToolbar_GetButtonInfoEx','GUICtrlToolbar_GetButtonParam', + 'GUICtrlToolbar_GetButtonRect','GUICtrlToolbar_GetButtonRectEx', + 'GUICtrlToolbar_GetButtonSize','GUICtrlToolbar_GetButtonState', + 'GUICtrlToolbar_GetButtonStyle','GUICtrlToolbar_GetButtonText', + 'GUICtrlToolbar_GetColorScheme', + 'GUICtrlToolbar_GetDisabledImageList', + 'GUICtrlToolbar_GetExtendedStyle','GUICtrlToolbar_GetHotImageList', + 'GUICtrlToolbar_GetHotItem','GUICtrlToolbar_GetImageList', + 'GUICtrlToolbar_GetInsertMark','GUICtrlToolbar_GetInsertMarkColor', + 'GUICtrlToolbar_GetMaxSize','GUICtrlToolbar_GetMetrics', + 'GUICtrlToolbar_GetPadding','GUICtrlToolbar_GetRows', + 'GUICtrlToolbar_GetString','GUICtrlToolbar_GetStyle', + 'GUICtrlToolbar_GetStyleAltDrag', + 'GUICtrlToolbar_GetStyleCustomErase','GUICtrlToolbar_GetStyleFlat', + 'GUICtrlToolbar_GetStyleList','GUICtrlToolbar_GetStyleRegisterDrop', + 'GUICtrlToolbar_GetStyleToolTips', + 'GUICtrlToolbar_GetStyleTransparent', + 'GUICtrlToolbar_GetStyleWrapable','GUICtrlToolbar_GetTextRows', + 'GUICtrlToolbar_GetToolTips','GUICtrlToolbar_GetUnicodeFormat', + 'GUICtrlToolbar_HideButton','GUICtrlToolbar_HighlightButton', + 'GUICtrlToolbar_HitTest','GUICtrlToolbar_IndexToCommand', + 'GUICtrlToolbar_InsertButton','GUICtrlToolbar_InsertMarkHitTest', + 'GUICtrlToolbar_IsButtonChecked','GUICtrlToolbar_IsButtonEnabled', + 'GUICtrlToolbar_IsButtonHidden', + 'GUICtrlToolbar_IsButtonHighlighted', + 'GUICtrlToolbar_IsButtonIndeterminate', + 'GUICtrlToolbar_IsButtonPressed','GUICtrlToolbar_LoadBitmap', + 'GUICtrlToolbar_LoadImages','GUICtrlToolbar_MapAccelerator', + 'GUICtrlToolbar_MoveButton','GUICtrlToolbar_PressButton', + 'GUICtrlToolbar_SetAnchorHighlight','GUICtrlToolbar_SetBitmapSize', + 'GUICtrlToolbar_SetButtonBitMap','GUICtrlToolbar_SetButtonInfo', + 'GUICtrlToolbar_SetButtonInfoEx','GUICtrlToolbar_SetButtonParam', + 'GUICtrlToolbar_SetButtonSize','GUICtrlToolbar_SetButtonState', + 'GUICtrlToolbar_SetButtonStyle','GUICtrlToolbar_SetButtonText', + 'GUICtrlToolbar_SetButtonWidth','GUICtrlToolbar_SetCmdID', + 'GUICtrlToolbar_SetColorScheme', + 'GUICtrlToolbar_SetDisabledImageList', + 'GUICtrlToolbar_SetDrawTextFlags','GUICtrlToolbar_SetExtendedStyle', + 'GUICtrlToolbar_SetHotImageList','GUICtrlToolbar_SetHotItem', + 'GUICtrlToolbar_SetImageList','GUICtrlToolbar_SetIndent', + 'GUICtrlToolbar_SetIndeterminate','GUICtrlToolbar_SetInsertMark', + 'GUICtrlToolbar_SetInsertMarkColor','GUICtrlToolbar_SetMaxTextRows', + 'GUICtrlToolbar_SetMetrics','GUICtrlToolbar_SetPadding', + 'GUICtrlToolbar_SetParent','GUICtrlToolbar_SetRows', + 'GUICtrlToolbar_SetStyle','GUICtrlToolbar_SetStyleAltDrag', + 'GUICtrlToolbar_SetStyleCustomErase','GUICtrlToolbar_SetStyleFlat', + 'GUICtrlToolbar_SetStyleList','GUICtrlToolbar_SetStyleRegisterDrop', + 'GUICtrlToolbar_SetStyleToolTips', + 'GUICtrlToolbar_SetStyleTransparent', + 'GUICtrlToolbar_SetStyleWrapable','GUICtrlToolbar_SetToolTips', + 'GUICtrlToolbar_SetUnicodeFormat','GUICtrlToolbar_SetWindowTheme', + 'GUICtrlTreeView_Add','GUICtrlTreeView_AddChild', + 'GUICtrlTreeView_AddChildFirst','GUICtrlTreeView_AddFirst', + 'GUICtrlTreeView_BeginUpdate','GUICtrlTreeView_ClickItem', + 'GUICtrlTreeView_Create','GUICtrlTreeView_CreateDragImage', + 'GUICtrlTreeView_CreateSolidBitMap','GUICtrlTreeView_Delete', + 'GUICtrlTreeView_DeleteAll','GUICtrlTreeView_DeleteChildren', + 'GUICtrlTreeView_Destroy','GUICtrlTreeView_DisplayRect', + 'GUICtrlTreeView_DisplayRectEx','GUICtrlTreeView_EditText', + 'GUICtrlTreeView_EndEdit','GUICtrlTreeView_EndUpdate', + 'GUICtrlTreeView_EnsureVisible','GUICtrlTreeView_Expand', + 'GUICtrlTreeView_ExpandedOnce','GUICtrlTreeView_FindItem', + 'GUICtrlTreeView_FindItemEx','GUICtrlTreeView_GetBkColor', + 'GUICtrlTreeView_GetBold','GUICtrlTreeView_GetChecked', + 'GUICtrlTreeView_GetChildCount','GUICtrlTreeView_GetChildren', + 'GUICtrlTreeView_GetCount','GUICtrlTreeView_GetCut', + 'GUICtrlTreeView_GetDropTarget','GUICtrlTreeView_GetEditControl', + 'GUICtrlTreeView_GetExpanded','GUICtrlTreeView_GetFirstChild', + 'GUICtrlTreeView_GetFirstItem','GUICtrlTreeView_GetFirstVisible', + 'GUICtrlTreeView_GetFocused','GUICtrlTreeView_GetHeight', + 'GUICtrlTreeView_GetImageIndex', + 'GUICtrlTreeView_GetImageListIconHandle', + 'GUICtrlTreeView_GetIndent','GUICtrlTreeView_GetInsertMarkColor', + 'GUICtrlTreeView_GetISearchString','GUICtrlTreeView_GetItemByIndex', + 'GUICtrlTreeView_GetItemHandle','GUICtrlTreeView_GetItemParam', + 'GUICtrlTreeView_GetLastChild','GUICtrlTreeView_GetLineColor', + 'GUICtrlTreeView_GetNext','GUICtrlTreeView_GetNextChild', + 'GUICtrlTreeView_GetNextSibling','GUICtrlTreeView_GetNextVisible', + 'GUICtrlTreeView_GetNormalImageList', + 'GUICtrlTreeView_GetParentHandle','GUICtrlTreeView_GetParentParam', + 'GUICtrlTreeView_GetPrev','GUICtrlTreeView_GetPrevChild', + 'GUICtrlTreeView_GetPrevSibling','GUICtrlTreeView_GetPrevVisible', + 'GUICtrlTreeView_GetScrollTime','GUICtrlTreeView_GetSelected', + 'GUICtrlTreeView_GetSelectedImageIndex', + 'GUICtrlTreeView_GetSelection','GUICtrlTreeView_GetSiblingCount', + 'GUICtrlTreeView_GetState','GUICtrlTreeView_GetStateImageIndex', + 'GUICtrlTreeView_GetStateImageList','GUICtrlTreeView_GetText', + 'GUICtrlTreeView_GetTextColor','GUICtrlTreeView_GetToolTips', + 'GUICtrlTreeView_GetTree','GUICtrlTreeView_GetUnicodeFormat', + 'GUICtrlTreeView_GetVisible','GUICtrlTreeView_GetVisibleCount', + 'GUICtrlTreeView_HitTest','GUICtrlTreeView_HitTestEx', + 'GUICtrlTreeView_HitTestItem','GUICtrlTreeView_Index', + 'GUICtrlTreeView_InsertItem','GUICtrlTreeView_IsFirstItem', + 'GUICtrlTreeView_IsParent','GUICtrlTreeView_Level', + 'GUICtrlTreeView_SelectItem','GUICtrlTreeView_SelectItemByIndex', + 'GUICtrlTreeView_SetBkColor','GUICtrlTreeView_SetBold', + 'GUICtrlTreeView_SetChecked','GUICtrlTreeView_SetCheckedByIndex', + 'GUICtrlTreeView_SetChildren','GUICtrlTreeView_SetCut', + 'GUICtrlTreeView_SetDropTarget','GUICtrlTreeView_SetFocused', + 'GUICtrlTreeView_SetHeight','GUICtrlTreeView_SetIcon', + 'GUICtrlTreeView_SetImageIndex','GUICtrlTreeView_SetIndent', + 'GUICtrlTreeView_SetInsertMark', + 'GUICtrlTreeView_SetInsertMarkColor', + 'GUICtrlTreeView_SetItemHeight','GUICtrlTreeView_SetItemParam', + 'GUICtrlTreeView_SetLineColor','GUICtrlTreeView_SetNormalImageList', + 'GUICtrlTreeView_SetScrollTime','GUICtrlTreeView_SetSelected', + 'GUICtrlTreeView_SetSelectedImageIndex','GUICtrlTreeView_SetState', + 'GUICtrlTreeView_SetStateImageIndex', + 'GUICtrlTreeView_SetStateImageList','GUICtrlTreeView_SetText', + 'GUICtrlTreeView_SetTextColor','GUICtrlTreeView_SetToolTips', + 'GUICtrlTreeView_SetUnicodeFormat','GUICtrlTreeView_Sort', + 'GUIImageList_Add','GUIImageList_AddBitmap','GUIImageList_AddIcon', + 'GUIImageList_AddMasked','GUIImageList_BeginDrag', + 'GUIImageList_Copy','GUIImageList_Create','GUIImageList_Destroy', + 'GUIImageList_DestroyIcon','GUIImageList_DragEnter', + 'GUIImageList_DragLeave','GUIImageList_DragMove', + 'GUIImageList_Draw','GUIImageList_DrawEx','GUIImageList_Duplicate', + 'GUIImageList_EndDrag','GUIImageList_GetBkColor', + 'GUIImageList_GetIcon','GUIImageList_GetIconHeight', + 'GUIImageList_GetIconSize','GUIImageList_GetIconSizeEx', + 'GUIImageList_GetIconWidth','GUIImageList_GetImageCount', + 'GUIImageList_GetImageInfoEx','GUIImageList_Remove', + 'GUIImageList_ReplaceIcon','GUIImageList_SetBkColor', + 'GUIImageList_SetIconSize','GUIImageList_SetImageCount', + 'GUIImageList_Swap','GUIScrollBars_EnableScrollBar', + 'GUIScrollBars_GetScrollBarInfoEx','GUIScrollBars_GetScrollBarRect', + 'GUIScrollBars_GetScrollBarRGState', + 'GUIScrollBars_GetScrollBarXYLineButton', + 'GUIScrollBars_GetScrollBarXYThumbBottom', + 'GUIScrollBars_GetScrollBarXYThumbTop', + 'GUIScrollBars_GetScrollInfo','GUIScrollBars_GetScrollInfoEx', + 'GUIScrollBars_GetScrollInfoMax','GUIScrollBars_GetScrollInfoMin', + 'GUIScrollBars_GetScrollInfoPage','GUIScrollBars_GetScrollInfoPos', + 'GUIScrollBars_GetScrollInfoTrackPos','GUIScrollBars_GetScrollPos', + 'GUIScrollBars_GetScrollRange','GUIScrollBars_Init', + 'GUIScrollBars_ScrollWindow','GUIScrollBars_SetScrollInfo', + 'GUIScrollBars_SetScrollInfoMax','GUIScrollBars_SetScrollInfoMin', + 'GUIScrollBars_SetScrollInfoPage','GUIScrollBars_SetScrollInfoPos', + 'GUIScrollBars_SetScrollRange','GUIScrollBars_ShowScrollBar', + 'GUIToolTip_Activate','GUIToolTip_AddTool','GUIToolTip_AdjustRect', + 'GUIToolTip_BitsToTTF','GUIToolTip_Create','GUIToolTip_DelTool', + 'GUIToolTip_Destroy','GUIToolTip_EnumTools', + 'GUIToolTip_GetBubbleHeight','GUIToolTip_GetBubbleSize', + 'GUIToolTip_GetBubbleWidth','GUIToolTip_GetCurrentTool', + 'GUIToolTip_GetDelayTime','GUIToolTip_GetMargin', + 'GUIToolTip_GetMarginEx','GUIToolTip_GetMaxTipWidth', + 'GUIToolTip_GetText','GUIToolTip_GetTipBkColor', + 'GUIToolTip_GetTipTextColor','GUIToolTip_GetTitleBitMap', + 'GUIToolTip_GetTitleText','GUIToolTip_GetToolCount', + 'GUIToolTip_GetToolInfo','GUIToolTip_HitTest', + 'GUIToolTip_NewToolRect','GUIToolTip_Pop','GUIToolTip_PopUp', + 'GUIToolTip_SetDelayTime','GUIToolTip_SetMargin', + 'GUIToolTip_SetMaxTipWidth','GUIToolTip_SetTipBkColor', + 'GUIToolTip_SetTipTextColor','GUIToolTip_SetTitle', + 'GUIToolTip_SetToolInfo','GUIToolTip_SetWindowTheme', + 'GUIToolTip_ToolExists','GUIToolTip_ToolToArray', + 'GUIToolTip_TrackActivate','GUIToolTip_TrackPosition', + 'GUIToolTip_TTFToBits','GUIToolTip_Update', + 'GUIToolTip_UpdateTipText','HexToString','IE_Example', + 'IE_Introduction','IE_VersionInfo','IEAction','IEAttach', + 'IEBodyReadHTML','IEBodyReadText','IEBodyWriteHTML','IECreate', + 'IECreateEmbedded','IEDocGetObj','IEDocInsertHTML', + 'IEDocInsertText','IEDocReadHTML','IEDocWriteHTML', + 'IEErrorHandlerDeRegister','IEErrorHandlerRegister','IEErrorNotify', + 'IEFormElementCheckBoxSelect','IEFormElementGetCollection', + 'IEFormElementGetObjByName','IEFormElementGetValue', + 'IEFormElementOptionSelect','IEFormElementRadioSelect', + 'IEFormElementSetValue','IEFormGetCollection','IEFormGetObjByName', + 'IEFormImageClick','IEFormReset','IEFormSubmit', + 'IEFrameGetCollection','IEFrameGetObjByName','IEGetObjById', + 'IEGetObjByName','IEHeadInsertEventScript','IEImgClick', + 'IEImgGetCollection','IEIsFrameSet','IELinkClickByIndex', + 'IELinkClickByText','IELinkGetCollection','IELoadWait', + 'IELoadWaitTimeout','IENavigate','IEPropertyGet','IEPropertySet', + 'IEQuit','IETableGetCollection','IETableWriteToArray', + 'IETagNameAllGetCollection','IETagNameGetCollection','Iif', + 'INetExplorerCapable','INetGetSource','INetMail','INetSmtpMail', + 'IsPressed','MathCheckDiv','Max','MemGlobalAlloc','MemGlobalFree', + 'MemGlobalLock','MemGlobalSize','MemGlobalUnlock','MemMoveMemory', + 'MemMsgBox','MemShowError','MemVirtualAlloc','MemVirtualAllocEx', + 'MemVirtualFree','MemVirtualFreeEx','Min','MouseTrap', + 'NamedPipes_CallNamedPipe','NamedPipes_ConnectNamedPipe', + 'NamedPipes_CreateNamedPipe','NamedPipes_CreatePipe', + 'NamedPipes_DisconnectNamedPipe', + 'NamedPipes_GetNamedPipeHandleState','NamedPipes_GetNamedPipeInfo', + 'NamedPipes_PeekNamedPipe','NamedPipes_SetNamedPipeHandleState', + 'NamedPipes_TransactNamedPipe','NamedPipes_WaitNamedPipe', + 'Net_Share_ConnectionEnum','Net_Share_FileClose', + 'Net_Share_FileEnum','Net_Share_FileGetInfo','Net_Share_PermStr', + 'Net_Share_ResourceStr','Net_Share_SessionDel', + 'Net_Share_SessionEnum','Net_Share_SessionGetInfo', + 'Net_Share_ShareAdd','Net_Share_ShareCheck','Net_Share_ShareDel', + 'Net_Share_ShareEnum','Net_Share_ShareGetInfo', + 'Net_Share_ShareSetInfo','Net_Share_StatisticsGetSvr', + 'Net_Share_StatisticsGetWrk','Now','NowCalc','NowCalcDate', + 'NowDate','NowTime','PathFull','PathMake','PathSplit', + 'ProcessGetName','ProcessGetPriority','Radian', + 'ReplaceStringInFile','RunDOS','ScreenCapture_Capture', + 'ScreenCapture_CaptureWnd','ScreenCapture_SaveImage', + 'ScreenCapture_SetBMPFormat','ScreenCapture_SetJPGQuality', + 'ScreenCapture_SetTIFColorDepth','ScreenCapture_SetTIFCompression', + 'Security__AdjustTokenPrivileges','Security__GetAccountSid', + 'Security__GetLengthSid','Security__GetTokenInformation', + 'Security__ImpersonateSelf','Security__IsValidSid', + 'Security__LookupAccountName','Security__LookupAccountSid', + 'Security__LookupPrivilegeValue','Security__OpenProcessToken', + 'Security__OpenThreadToken','Security__OpenThreadTokenEx', + 'Security__SetPrivilege','Security__SidToStringSid', + 'Security__SidTypeStr','Security__StringSidToSid','SendMessage', + 'SendMessageA','SetDate','SetTime','Singleton','SoundClose', + 'SoundLength','SoundOpen','SoundPause','SoundPlay','SoundPos', + 'SoundResume','SoundSeek','SoundStatus','SoundStop', + 'SQLite_Changes','SQLite_Close','SQLite_Display2DResult', + 'SQLite_Encode','SQLite_ErrCode','SQLite_ErrMsg','SQLite_Escape', + 'SQLite_Exec','SQLite_FetchData','SQLite_FetchNames', + 'SQLite_GetTable','SQLite_GetTable2d','SQLite_LastInsertRowID', + 'SQLite_LibVersion','SQLite_Open','SQLite_Query', + 'SQLite_QueryFinalize','SQLite_QueryReset','SQLite_QuerySingleRow', + 'SQLite_SaveMode','SQLite_SetTimeout','SQLite_Shutdown', + 'SQLite_SQLiteExe','SQLite_Startup','SQLite_TotalChanges', + 'StringAddComma','StringBetween','StringEncrypt','StringInsert', + 'StringProper','StringRepeat','StringReverse','StringSplit', + 'StringToHex','TCPIpToName','TempFile','TicksToTime','Timer_Diff', + 'Timer_GetTimerID','Timer_Init','Timer_KillAllTimers', + 'Timer_KillTimer','Timer_SetTimer','TimeToTicks','VersionCompare', + 'viClose','viExecCommand','viFindGpib','viGpibBusReset','viGTL', + 'viOpen','viSetAttribute','viSetTimeout','WeekNumberISO', + 'WinAPI_AttachConsole','WinAPI_AttachThreadInput','WinAPI_Beep', + 'WinAPI_BitBlt','WinAPI_CallNextHookEx','WinAPI_Check', + 'WinAPI_ClientToScreen','WinAPI_CloseHandle', + 'WinAPI_CommDlgExtendedError','WinAPI_CopyIcon', + 'WinAPI_CreateBitmap','WinAPI_CreateCompatibleBitmap', + 'WinAPI_CreateCompatibleDC','WinAPI_CreateEvent', + 'WinAPI_CreateFile','WinAPI_CreateFont','WinAPI_CreateFontIndirect', + 'WinAPI_CreateProcess','WinAPI_CreateSolidBitmap', + 'WinAPI_CreateSolidBrush','WinAPI_CreateWindowEx', + 'WinAPI_DefWindowProc','WinAPI_DeleteDC','WinAPI_DeleteObject', + 'WinAPI_DestroyIcon','WinAPI_DestroyWindow','WinAPI_DrawEdge', + 'WinAPI_DrawFrameControl','WinAPI_DrawIcon','WinAPI_DrawIconEx', + 'WinAPI_DrawText','WinAPI_EnableWindow','WinAPI_EnumDisplayDevices', + 'WinAPI_EnumWindows','WinAPI_EnumWindowsPopup', + 'WinAPI_EnumWindowsTop','WinAPI_ExpandEnvironmentStrings', + 'WinAPI_ExtractIconEx','WinAPI_FatalAppExit','WinAPI_FillRect', + 'WinAPI_FindExecutable','WinAPI_FindWindow','WinAPI_FlashWindow', + 'WinAPI_FlashWindowEx','WinAPI_FloatToInt', + 'WinAPI_FlushFileBuffers','WinAPI_FormatMessage','WinAPI_FrameRect', + 'WinAPI_FreeLibrary','WinAPI_GetAncestor','WinAPI_GetAsyncKeyState', + 'WinAPI_GetClassName','WinAPI_GetClientHeight', + 'WinAPI_GetClientRect','WinAPI_GetClientWidth', + 'WinAPI_GetCurrentProcess','WinAPI_GetCurrentProcessID', + 'WinAPI_GetCurrentThread','WinAPI_GetCurrentThreadId', + 'WinAPI_GetCursorInfo','WinAPI_GetDC','WinAPI_GetDesktopWindow', + 'WinAPI_GetDeviceCaps','WinAPI_GetDIBits','WinAPI_GetDlgCtrlID', + 'WinAPI_GetDlgItem','WinAPI_GetFileSizeEx','WinAPI_GetFocus', + 'WinAPI_GetForegroundWindow','WinAPI_GetIconInfo', + 'WinAPI_GetLastError','WinAPI_GetLastErrorMessage', + 'WinAPI_GetModuleHandle','WinAPI_GetMousePos','WinAPI_GetMousePosX', + 'WinAPI_GetMousePosY','WinAPI_GetObject','WinAPI_GetOpenFileName', + 'WinAPI_GetOverlappedResult','WinAPI_GetParent', + 'WinAPI_GetProcessAffinityMask','WinAPI_GetSaveFileName', + 'WinAPI_GetStdHandle','WinAPI_GetStockObject','WinAPI_GetSysColor', + 'WinAPI_GetSysColorBrush','WinAPI_GetSystemMetrics', + 'WinAPI_GetTextExtentPoint32','WinAPI_GetWindow', + 'WinAPI_GetWindowDC','WinAPI_GetWindowHeight', + 'WinAPI_GetWindowLong','WinAPI_GetWindowRect', + 'WinAPI_GetWindowText','WinAPI_GetWindowThreadProcessId', + 'WinAPI_GetWindowWidth','WinAPI_GetXYFromPoint', + 'WinAPI_GlobalMemStatus','WinAPI_GUIDFromString', + 'WinAPI_GUIDFromStringEx','WinAPI_HiWord','WinAPI_InProcess', + 'WinAPI_IntToFloat','WinAPI_InvalidateRect','WinAPI_IsClassName', + 'WinAPI_IsWindow','WinAPI_IsWindowVisible','WinAPI_LoadBitmap', + 'WinAPI_LoadImage','WinAPI_LoadLibrary','WinAPI_LoadLibraryEx', + 'WinAPI_LoadShell32Icon','WinAPI_LoadString','WinAPI_LocalFree', + 'WinAPI_LoWord','WinAPI_MakeDWord','WinAPI_MAKELANGID', + 'WinAPI_MAKELCID','WinAPI_MakeLong','WinAPI_MessageBeep', + 'WinAPI_Mouse_Event','WinAPI_MoveWindow','WinAPI_MsgBox', + 'WinAPI_MulDiv','WinAPI_MultiByteToWideChar', + 'WinAPI_MultiByteToWideCharEx','WinAPI_OpenProcess', + 'WinAPI_PointFromRect','WinAPI_PostMessage','WinAPI_PrimaryLangId', + 'WinAPI_PtInRect','WinAPI_ReadFile','WinAPI_ReadProcessMemory', + 'WinAPI_RectIsEmpty','WinAPI_RedrawWindow', + 'WinAPI_RegisterWindowMessage','WinAPI_ReleaseCapture', + 'WinAPI_ReleaseDC','WinAPI_ScreenToClient','WinAPI_SelectObject', + 'WinAPI_SetBkColor','WinAPI_SetCapture','WinAPI_SetCursor', + 'WinAPI_SetDefaultPrinter','WinAPI_SetDIBits','WinAPI_SetEvent', + 'WinAPI_SetFocus','WinAPI_SetFont','WinAPI_SetHandleInformation', + 'WinAPI_SetLastError','WinAPI_SetParent', + 'WinAPI_SetProcessAffinityMask','WinAPI_SetSysColors', + 'WinAPI_SetTextColor','WinAPI_SetWindowLong','WinAPI_SetWindowPos', + 'WinAPI_SetWindowsHookEx','WinAPI_SetWindowText', + 'WinAPI_ShowCursor','WinAPI_ShowError','WinAPI_ShowMsg', + 'WinAPI_ShowWindow','WinAPI_StringFromGUID','WinAPI_SubLangId', + 'WinAPI_SystemParametersInfo','WinAPI_TwipsPerPixelX', + 'WinAPI_TwipsPerPixelY','WinAPI_UnhookWindowsHookEx', + 'WinAPI_UpdateLayeredWindow','WinAPI_UpdateWindow', + 'WinAPI_ValidateClassName','WinAPI_WaitForInputIdle', + 'WinAPI_WaitForMultipleObjects','WinAPI_WaitForSingleObject', + 'WinAPI_WideCharToMultiByte','WinAPI_WindowFromPoint', + 'WinAPI_WriteConsole','WinAPI_WriteFile', + 'WinAPI_WriteProcessMemory','WinNet_AddConnection', + 'WinNet_AddConnection2','WinNet_AddConnection3', + 'WinNet_CancelConnection','WinNet_CancelConnection2', + 'WinNet_CloseEnum','WinNet_ConnectionDialog', + 'WinNet_ConnectionDialog1','WinNet_DisconnectDialog', + 'WinNet_DisconnectDialog1','WinNet_EnumResource', + 'WinNet_GetConnection','WinNet_GetConnectionPerformance', + 'WinNet_GetLastError','WinNet_GetNetworkInformation', + 'WinNet_GetProviderName','WinNet_GetResourceInformation', + 'WinNet_GetResourceParent','WinNet_GetUniversalName', + 'WinNet_GetUser','WinNet_OpenEnum','WinNet_RestoreConnection', + 'WinNet_UseConnection','Word_VersionInfo','WordAttach','WordCreate', + 'WordDocAdd','WordDocAddLink','WordDocAddPicture','WordDocClose', + 'WordDocFindReplace','WordDocGetCollection', + 'WordDocLinkGetCollection','WordDocOpen','WordDocPrint', + 'WordDocPropertyGet','WordDocPropertySet','WordDocSave', + 'WordDocSaveAs','WordErrorHandlerDeRegister', + 'WordErrorHandlerRegister','WordErrorNotify','WordMacroRun', + 'WordPropertyGet','WordPropertySet','WordQuit' + ), + 5 => array( + 'ce','comments-end','comments-start','cs','include','include-once', + 'NoTrayIcon','RequireAdmin' + ), + 6 => array( + 'AutoIt3Wrapper_Au3Check_Parameters', + 'AutoIt3Wrapper_Au3Check_Stop_OnWarning', + 'AutoIt3Wrapper_Change2CUI','AutoIt3Wrapper_Compression', + 'AutoIt3Wrapper_cvsWrapper_Parameters','AutoIt3Wrapper_Icon', + 'AutoIt3Wrapper_Outfile','AutoIt3Wrapper_Outfile_Type', + 'AutoIt3Wrapper_Plugin_Funcs','AutoIt3Wrapper_Res_Comment', + 'AutoIt3Wrapper_Res_Description','AutoIt3Wrapper_Res_Field', + 'AutoIt3Wrapper_Res_File_Add','AutoIt3Wrapper_Res_Fileversion', + 'AutoIt3Wrapper_Res_FileVersion_AutoIncrement', + 'AutoIt3Wrapper_Res_Icon_Add','AutoIt3Wrapper_Res_Language', + 'AutoIt3Wrapper_Res_LegalCopyright', + 'AutoIt3Wrapper_res_requestedExecutionLevel', + 'AutoIt3Wrapper_Res_SaveSource','AutoIt3Wrapper_Run_After', + 'AutoIt3Wrapper_Run_Au3check','AutoIt3Wrapper_Run_Before', + 'AutoIt3Wrapper_Run_cvsWrapper','AutoIt3Wrapper_Run_Debug_Mode', + 'AutoIt3Wrapper_Run_Obfuscator','AutoIt3Wrapper_Run_Tidy', + 'AutoIt3Wrapper_Tidy_Stop_OnError','AutoIt3Wrapper_UseAnsi', + 'AutoIt3Wrapper_UseUpx','AutoIt3Wrapper_UseX64', + 'AutoIt3Wrapper_Version','EndRegion','forceref', + 'Obfuscator_Ignore_Funcs','Obfuscator_Ignore_Variables', + 'Obfuscator_Parameters','Region','Tidy_Parameters' + ) + ), + 'SYMBOLS' => array( + '(',')','[',']', + '+','-','*','/','&','^', + '=','+=','-=','*=','/=','&=', + '==','<','<=','>','>=', + ',','.' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000FF; font-weight: bold;', + 2 => 'color: #800000; font-weight: bold;', + 3 => 'color: #000080; font-style: italic; font-weight: bold;', + 4 => 'color: #0080FF; font-style: italic; font-weight: bold;', + 5 => 'color: #F000FF; font-style: italic;', + 6 => 'color: #A00FF0; font-style: italic;' + ), + 'COMMENTS' => array( + 'MULTI' => 'font-style: italic; color: #669900;', + 0 => 'font-style: italic; color: #009933;', + 1 => 'font-style: italic; color: #9977BB;', + ), + 'ESCAPE_CHAR' => array( + 0 => '' + ), + 'BRACKETS' => array( + 0 => 'color: #FF0000; font-weight: bold;' + ), + 'STRINGS' => array( + 0 => 'font-weight: bold; color: #9977BB;' + ), + 'NUMBERS' => array( + 0 => 'color: #AC00A9; font-style: italic; font-weight: bold;' + ), + 'METHODS' => array( + 1 => 'color: #0000FF; font-style: italic; font-weight: bold;' + ), + 'SYMBOLS' => array( + 0 => 'color: #FF0000; font-weight: bold;' + ), + 'REGEXPS' => array( + 0 => 'font-weight: bold; color: #AA0000;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => 'http://www.autoitscript.com/autoit3/docs/keywords.htm', + 2 => 'http://www.autoitscript.com/autoit3/docs/macros.htm', + 3 => 'http://www.autoitscript.com/autoit3/docs/functions/{FNAME}.htm', + 4 => '', + 5 => '', + 6 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + //Variables + 0 => '[\\$%@]+[a-zA-Z_][a-zA-Z0-9_]*' + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true, + 1 => true, + 2 => true, + 3 => true + ), + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 4 => array( + 'DISALLOWED_BEFORE' => '(? array( + 'DISALLOWED_BEFORE' => '(? array( + 'DISALLOWED_BEFORE' => '(? 'AviSynth', + 'COMMENT_SINGLE' => array(1 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/', '[*' => '*]'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + // Reserved words. + 1 => array( + 'try', 'cache', 'function', 'global', 'return' + ), + // Constants / special variables. + 2 => array( + 'true', 'yes', 'false', 'no', '__END__' + ), + // Internal Filters. + 3 => array( + 'AviSource', 'AviFileSource', 'AddBorders', 'AlignedSplice', 'AssumeFPS', 'AssumeScaledFPS', + 'AssumeFrameBased', 'AssumeFieldBased', 'AssumeBFF', 'AssumeTFF', 'Amplify', 'AmplifydB', + 'AssumeSampleRate', 'AudioDub', 'AudioDubEx', 'Animate', 'ApplyRange', + 'BicubicResize', 'BilinearResize', 'BlackmanResize', 'Blur', 'Bob', 'BlankClip', 'Blackness', + 'ColorYUV', 'ConvertBackToYUY2', 'ConvertToRGB', 'ConvertToRGB24', 'ConvertToRGB32', + 'ConvertToYUY2', 'ConvertToY8', 'ConvertToYV411', 'ConvertToYV12', 'ConvertToYV16', 'ConvertToYV24', + 'ColorKeyMask', 'Crop', 'CropBottom', 'ChangeFPS', 'ConvertFPS', 'ComplementParity', 'ConvertAudioTo8bit', + 'ConvertAudioTo16bit', 'ConvertAudioTo24bit', 'ConvertAudioTo32bit', 'ConvertAudioToFloat', 'ConvertToMono', + 'ConditionalFilter', 'ConditionalReader', 'ColorBars', 'Compare', + 'DirectShowSource', 'DeleteFrame', 'Dissolve', 'DuplicateFrame', 'DoubleWeave', 'DelayAudio', + 'EnsureVBRMP3Sync', + 'FixLuminance', 'FlipHorizontal', 'FlipVertical', 'FixBrokenChromaUpsampling', 'FadeIn0', 'FadeIn', + 'FadeIn2', 'FadeOut0', 'FadeOut', 'FadeOut2', 'FadeIO0', 'FadeIO', 'FadeIO2', 'FreezeFrame', 'FrameEvaluate', + 'GreyScale', 'GaussResize', 'GeneralConvolution', 'GetChannel', 'GetLeftChannel', 'GetRightChannel', + 'HorizontalReduceBy2', 'Histogram', + 'ImageReader', 'ImageSource', 'ImageWriter', 'Invert', 'Interleave', 'Info', + 'KillAudio', 'KillVideo', + 'Levels', 'Limiter', 'Layer', 'Letterbox', 'LanczosResize', 'Lanczos4Resize', 'Loop', + 'MergeARGB', 'MergeRGB', 'MergeChroma', 'MergeLuma', 'Merge', 'Mask', 'MaskHS', 'MergeChannels', 'MixAudio', + 'MonoToStereo', 'MessageClip', + 'Normalize', + 'OpenDMLSource', 'Overlay', + 'PointResize', 'PeculiarBlend', 'Pulldown', + 'RGBAdjust', 'ResetMask', 'Reverse', 'ResampleAudio', 'ReduceBy2', + 'SegmentedAviSource', 'SegmentedDirectShowSource', 'SoundOut', 'ShowAlpha', 'ShowRed', 'ShowGreen', + 'ShowBlue', 'SwapUV', 'Subtract', 'SincResize', 'Spline16Resize', 'Spline36Resize', 'Spline64Resize', + 'SelectEven', 'SelectOdd', 'SelectEvery', 'SelectRangeEvery', 'Sharpen', 'SpatialSoften', 'SeparateFields', + 'ShowFiveVersions', 'ShowFrameNumber', 'ShowSMPTE', 'ShowTime', 'StackHorizontal', 'StackVertical', 'Subtitle', + 'SwapFields', 'SuperEQ', 'SSRC', 'ScriptClip', + 'Tweak', 'TurnLeft', 'TurnRight', 'Turn180', 'TemporalSoften', 'TimeStretch', 'TCPServer', 'TCPSource', 'Trim', + 'Tone', + 'UToY', 'UToY8', 'UnalignedSplice', + 'VToY', 'VToY8', 'VerticalReduceBy2', 'Version', + 'WavSource', 'Weave', 'WriteFile', 'WriteFileIf', 'WriteFileStart', 'WriteFileEnd', + 'YToUV' + ), + // Internal functions. + 4 => array( + 'Abs', 'Apply', 'Assert', 'AverageLuma', 'AverageChromaU', 'AverageChromaV', + 'Ceil', 'Cos', 'Chr', 'ChromaUDifference', 'ChromaVDifference', + 'Defined', 'Default', + 'Exp', 'Exist', 'Eval', + 'Floor', 'Frac', 'Float', 'Findstr', 'GetMTMode', + 'HexValue', + 'Int', 'IsBool', 'IsClip', 'IsFloat', 'IsInt', 'IsString', 'Import', + 'LoadPlugin', 'Log', 'LCase', 'LeftStr', 'LumaDifference', 'LoadVirtualDubPlugin', 'LoadVFAPIPlugin', + 'LoadCPlugin', 'Load_Stdcall_Plugin', + 'Max', 'MulDiv', 'MidStr', + 'NOP', + 'OPT_AllowFloatAudio', 'OPT_UseWaveExtensible', + 'Pi', 'Pow', + 'Round', 'Rand', 'RevStr', 'RightStr', 'RGBDifference', 'RGBDifferenceFromPrevious', 'RGBDifferenceToNext', + 'Sin', 'Sqrt', 'Sign', 'Spline', 'StrLen', 'String', 'Select', 'SetMemoryMax', 'SetWorkingDir', 'SetMTMode', + 'SetPlanarLegacyAlignment', + 'Time', + 'UCase', 'UDifferenceFromPrevious', 'UDifferenceToNext', 'UPlaneMax', 'UPlaneMin', 'UPlaneMedian', + 'UPlaneMinMaxDifference', + 'Value', 'VersionNumber', 'VersionString', 'VDifferenceFromPrevious', 'VDifferenceToNext', 'VPlaneMax', + 'VPlaneMin', 'VPlaneMedian', 'VPlaneMinMaxDifference', + 'YDifferenceFromPrevious', 'YDifferenceToNext', 'YPlaneMax', 'YPlaneMin', 'YPlaneMedian', + 'YPlaneMinMaxDifference' + ) + ), + 'SYMBOLS' => array( + '+', '++', '-', '--', '/', '*', '%', + '=', '==', '<', '<=', '>', '>=', '<>', '!=', + '!', '?', ':', + '|', '||', '&&', + '\\', + '(', ')', '{', '}', + '.', ',' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color:#9966CC; font-weight:bold;', + 2 => 'color:#0000FF; font-weight:bold;', + 3 => 'color:#CC3300; font-weight:bold;', + 4 => 'color:#660000; font-weight:bold;' + ), + 'COMMENTS' => array( + 1 => 'color:#008000; font-style:italic;', + 'MULTI' => 'color:#000080; font-style:italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color:#000099;' + ), + 'BRACKETS' => array( + 0 => 'color:#006600; font-weight:bold;' + ), + 'STRINGS' => array( + 0 => 'color:#996600;' + ), + 'NUMBERS' => array( + 0 => 'color:#006666;' + ), + 'METHODS' => array( + 1 => 'color:#9900CC;' + ), + 'SYMBOLS' => array( + 0 => 'color:#006600; font-weight:bold;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => 'http://avisynth.org/mediawiki/{FNAME}', + 4 => '' + ), + 'REGEXPS' => array( + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); + diff --git a/vendor/easybook/geshi/geshi/awk.php b/vendor/easybook/geshi/geshi/awk.php new file mode 100644 index 0000000000..46fe49f878 --- /dev/null +++ b/vendor/easybook/geshi/geshi/awk.php @@ -0,0 +1,156 @@ + 'awk', + 'COMMENT_SINGLE' => array( + 1 => '#' + ), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array ( + 1 => array( + 'for', 'in', 'if', 'else', 'while', 'do', 'continue', 'break' + ), + 2 => array( + 'BEGIN', 'END' + ), + 3 => array( + 'ARGC', 'ARGV', 'CONVFMT', 'ENVIRON', + 'FILENAME', 'FNR', 'FS', 'NF', 'NR', 'OFMT', + 'OFS','ORS','RLENGTH','RS','RSTART','SUBSEP' + ), + 4 => array( + 'gsub','index','length','match','split', + 'sprintf','sub','substr','tolower','toupper', + 'atan2','cos','exp','int','log','rand', + 'sin','sqrt','srand' + ), + 5 => array( + 'print','printf','getline','close','fflush','system' + ), + 6 => array( + 'function', 'return' + ) + ), + 'SYMBOLS' => array ( + 0 => array( + '(',')','[',']','{','}' + ), + 1 => array( + '!','||','&&' + ), + 2 => array( + '<','>','<=','>=','==','!=' + ), + 3 => array( + '+','-','*','/','%','^','++','--' + ), + 4 => array( + '~','!~' + ), + 5 => array( + '?',':' + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000000; font-weight: bold;', + 2 => 'color: #C20CB9; font-weight: bold;', + 3 => 'color: #4107D5; font-weight: bold;', + 4 => 'color: #07D589; font-weight: bold;', + 5 => 'color: #0BD507; font-weight: bold;', + 6 => 'color: #078CD5; font-weight: bold;' + ), + 'COMMENTS' => array( + 1 => 'color:#808080;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'SYMBOLS' => array( + 0 => 'color:black;', + 1 => 'color:black;', + 2 => 'color:black;', + 3 => 'color:black;', + 4 => 'color:#C4C364;', + 5 => 'color:black;font-weight:bold;'), + 'SCRIPT' => array(), + 'REGEXPS' => array( + 0 => 'color:#000088;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #000000;' + ), + 'BRACKETS' => array( + 0 => 'color: #7a0874; font-weight: bold;' + ), + 'METHODS' => array() + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array (), + 'REGEXPS' => array( + 0 => "\\$[a-zA-Z0-9_]+" + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array (), + 'HIGHLIGHT_STRICT_BLOCK' => array() +); diff --git a/vendor/easybook/geshi/geshi/bascomavr.php b/vendor/easybook/geshi/geshi/bascomavr.php new file mode 100644 index 0000000000..5fc562baa4 --- /dev/null +++ b/vendor/easybook/geshi/geshi/bascomavr.php @@ -0,0 +1,184 @@ + 'BASCOM AVR', + 'COMMENT_SINGLE' => array(1 => "'"), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + // Navy Blue Bold Keywords + '1WRESET' , '1WREAD' , '1WWRITE' , '1WSEARCHFIRST' , '1WSEARCHNEXT' ,'1WVERIFY' , '1WIRECOUNT', + 'CONFIG' , 'ACI' , 'ADC' , 'BCCARD' , 'CLOCK' , 'COM1' , + 'COM2' , 'PS2EMU' , 'ATEMU' , 'I2CSLAVE' , + 'INPUT', 'OUTPUT', 'GRAPHLCD' , 'KEYBOARD' , 'TIMER0' , 'TIMER1' , + 'LCDBUS' , 'LCDMODE' , '1WIRE' , 'LCD' , 'SERIALOUT' , + 'SERIALIN' , 'SPI' , 'LCDPIN' , 'SDA' , 'SCL' , + 'WATCHDOG' , 'PORT' , 'COUNTER0', 'COUNTER1' , 'TCPIP' , 'TWISLAVE' , + 'X10' , 'XRAM' , 'USB', + 'BCD' , 'GRAY2BIN' , 'BIN2GRAY' , 'BIN' , 'MAKEBCD' , 'MAKEDEC' , 'MAKEINT' , 'FORMAT' , 'FUSING' , 'BINVAL' , + 'CRC8' , 'CRC16' , 'CRC16UNI' , 'CRC32' , 'HIGH' , 'HIGHW' , 'LOW', + 'DATE' , 'TIME' , 'DATE$' , 'TIME$' , 'DAYOFWEEK' , 'DAYOFYEAR' , 'SECOFDAY' , 'SECELAPSED' , 'SYSDAY' , 'SYSSEC' , 'SYSSECELAPSED', + 'WAIT' , 'WAITMS' , 'WAITUS' , 'DELAY', + 'BSAVE' , 'BLOAD' , 'GET' , 'VER' , 'DISKFREE' , 'DIR' , 'DriveReset' , 'DriveInit' , 'LINE' , 'INITFILESYSTEM' , + 'EOF' , 'WRITE' , 'FLUSH' , 'FREEFILE' , 'FILEATTR' , 'FILEDATE' , 'FILETIME' , 'FILEDATETIME' , 'FILELEN' , 'SEEK' , + 'KILL' , 'DriveGetIdentity' , 'DriveWriteSector' , 'DriveReadSector' , 'LOC' , 'LOF' , 'PUT' , 'OPEN' , 'CLOSE', + 'GLCDCMD' , 'GLCDDATA' , 'SETFONT' , 'PSET' , 'SHOWPIC' , 'SHOWPICE' , 'CIRCLE' , 'BOX', + 'I2CINIT' , 'I2CRECEIVE' , 'I2CSEND' , 'I2CSTART','I2CSTOP','I2CRBYTE','I2CWBYTE', + 'ALIAS' , 'BITWAIT' , 'TOGGLE' , 'RESET' , 'SET' , 'SHIFTIN' , 'SHIFTOUT' , 'DEBOUNCE' , 'PULSEIN' , 'PULSEOUT', + 'IDLE' , 'POWERDOWN' , 'POWERSAVE' , 'ON', 'INTERRUPT' , 'ENABLE' , 'DISABLE' , 'START' , 'VERSION' , 'CLOCKDIVISION' , 'CRYSTAL' , 'STOP', + 'ADR' , 'ADR2' , 'WRITEEEPROM' , 'CPEEK' , 'CPEEKH' , 'PEEK' , 'POKE' , 'OUT' , 'READEEPROM' , 'DATA' , 'INP' , 'READ' , 'RESTORE' , 'LOOKDOWN' , 'LOOKUP' , 'LOOKUPSTR' , 'LOAD' , 'LOADADR' , 'LOADLABEL' , 'LOADWORDADR' , 'MEMCOPY', + 'RC5SEND' , 'RC6SEND' , 'GETRC5' , 'SONYSEND', + 'BAUD' , 'BAUD1', 'BUFSPACE' , 'CLEAR', 'ECHO' , 'WAITKEY' , 'ISCHARWAITING' , 'INKEY' , 'INPUTBIN' , 'INPUTHEX' , 'PRINT', 'PRINT1','PRINT0', 'PRINTBIN' , 'SERIN' , 'SEROUT' , 'SPC' , 'MAKEMODBUS', + 'SPIIN' , 'SPIINIT' , 'SPIMOVE' , 'SPIOUT', 'SINGLE', + 'ASC' , 'UCASE' , 'LCASE' , 'TRIM' , 'SPLIT' , 'LTRIM' , 'INSTR' , 'SPACE' , 'RTRIM' , 'LEFT' , 'LEN' , 'MID' , 'RIGHT' , 'VAL' , 'STR' , 'CHR' , 'CHECKSUM' , 'HEX' , 'HEXVAL', + 'BASE64DEC' , 'BASE64ENC' , 'IP2STR' , 'UDPREAD' , 'UDPWRITE' , 'UDPWRITESTR' , 'TCPWRITE' , 'TCPWRITESTR' , 'TCPREAD' , 'GETDSTIP' , 'GETDSTPORT' , 'SOCKETSTAT' , 'SOCKETCONNECT' , 'SOCKETLISTEN' , 'GETSOCKET' , 'CLOSESOCKET' , + 'SETTCP' , 'GETTCPREGS' , 'SETTCPREGS' , 'SETIPPROTOCOL' , 'TCPCHECKSUM', + 'HOME' , 'CURSOR' , 'UPPERLINE' , 'THIRDLINE' , 'INITLCD' , 'LOWERLINE' , 'LCDAT' , 'FOURTHLINE' , 'DISPLAY' , 'LCDCONTRAST' , 'LOCATE' , 'SHIFTCURSOR' , 'DEFLCDCHAR' , 'SHIFTLCD' , 'CLS', + 'ACOS' , 'ASIN' , 'ATN' , 'ATN2' , 'EXP' , 'RAD2DEG' , 'FRAC' , 'TAN' , 'TANH' , 'COS' , 'COSH' , 'LOG' , 'LOG10' , 'ROUND' , 'ABS' , 'INT' , 'MAX' , 'MIN' , 'SQR' , 'SGN' , 'POWER' , 'SIN' , 'SINH' , 'FIX' , 'INCR' , 'DECR' , 'DEG2RAD', + 'DBG' , 'DEBUG', 'DTMFOUT' , 'ENCODER' , 'GETADC' , 'GETKBD' , 'GETATKBD' , 'GETRC' , 'VALUE' , 'POPALL' , 'PS2MOUSEXY' , 'PUSHALL' , + 'RETURN' , 'RND' , 'ROTATE' , 'SENDSCAN' , 'SENDSCANKBD' , 'SHIFT' , 'SOUND' , 'STCHECK' , 'SWAP' , 'VARPTR' , 'X10DETECT' , 'X10SEND' , 'READMAGCARD' , 'REM' , 'BITS' , 'BYVAL' , 'CALL' , 'READHITAG', + 'Buffered', 'Size', 'Dummy', 'Parity', 'None', 'Stopbits', 'Databits', 'Clockpol', 'Synchrone', 'Prescaler', 'Reference', 'int0', 'int1', 'Interrupts', + 'Auto', 'avcc', 'ack', 'nack', 'Pin', 'Db4', 'Db3', 'Db2', 'Db1', 'Db7', 'Db6', 'Db5', 'Db0', 'e', 'rs', 'twi', + ), + 2 => array( + // Red Lowercase Keywords + '$ASM' , '$BAUD' , '$BAUD1' , '$BGF' , '$BOOT' , '$CRYSTAL' , '$DATA' , '$DBG' , '$DEFAULT' , '$EEPLEAVE' , '$EEPROM' , + '$EEPROMHEX' , '$EXTERNAL' , '$HWSTACK' , '$INC' , '$INCLUDE' , '$INITMICRO' , '$LCD' , '$LCDRS' , '$LCDPUTCTRL' , + '$LCDPUTDATA' , '$LCDVFO' , '$LIB' , '$LOADER' , '$LOADERSIZE' , '$MAP' , '$NOCOMPILE' , '$NOINIT' , '$NORAMCLEAR' , + '$PROG' , '$PROGRAMMER' , '$REGFILE' , '$RESOURCE' , '$ROMSTART', '$SERIALINPUT', '$SERIALINPUT1' , '$SERIALINPUT2LCD' , + '$SERIALOUTPUT' , '$SERIALOUTPUT1' , '$SIM' , '$SWSTACK' , '$TIMEOUT' , '$TINY' , '$WAITSTATE' , '$XRAMSIZE' , '$XRAMSTART', '$XA', + '#IF' , '#ELSE' , '#ENDIF', '$framesize' + ), + 3 => array( + // Blue Lowercase Keywords + 'IF', 'THEN', 'ELSE', 'END', 'WHILE', 'WEND', 'DO', 'LOOP', 'SELECT', 'CASE', 'FOR', 'NEXT', + 'GOSUB' , 'GOTO' , 'LOCAL' , 'SUB' , 'DEFBIT', 'DEFBYTE', 'DEFINT', 'DEFWORD', 'DEFLNG', 'DEFSNG', 'DEFDBL', + 'CONST', 'DECLARE', 'FUNCTION', 'DIM', 'EXIT', 'LONG', 'INTEGER', 'BYTE', 'AS', 'STRING', 'WORD' + ), + 4 => array( + //light blue + 'PINA.0', 'PINA.1', 'PINA.2', 'PINA.3', 'PINA.4', 'PINA.5', 'PINA.6', 'PINA.7', + 'PINB.0', 'PINB.1', 'PINB.2', 'PINB.3', 'PINB.4', 'PINB.5', 'PINB.6', 'PINB.7', + 'PINC.0', 'PINC.1', 'PINC.2', 'PINC.3', 'PINC.4', 'PINC.5', 'PINC.6', 'PINC.7', + 'PIND.0', 'PIND.1', 'PIND.2', 'PIND.3', 'PIND.4', 'PIND.5', 'PIND.6', 'PIND.7', + 'PINE.0', 'PINE.1', 'PINE.2', 'PINE.3', 'PINE.4', 'PINE.5', 'PINE.6', 'PINE.7', + 'PINF.0', 'PINF.1', 'PINF.2', 'PINF.3', 'PINF.4', 'PINF.5', 'PINF.6', 'PINF.7', + + 'PORTA.0', 'PORTA.1', 'PORTA.2', 'PORTA.3', 'PORTA.4', 'PORTA.5', 'PORTA.6', 'PORTA.7', + 'PORTB.0', 'PORTB.1', 'PORTB.2', 'PORTB.3', 'PORTB.4', 'PORTB.5', 'PORTB.6', 'PORTB.7', + 'PORTC.0', 'PORTC.1', 'PORTC.2', 'PORTC.3', 'PORTC.4', 'PORTC.5', 'PORTC.6', 'PORTC.7', + 'PORTD.0', 'PORTD.1', 'PORTD.2', 'PORTD.3', 'PORTD.4', 'PORTD.5', 'PORTD.6', 'PORTD.7', + 'PORTE.0', 'PORTE.1', 'PORTE.2', 'PORTE.3', 'PORTE.4', 'PORTE.5', 'PORTE.6', 'PORTE.7', + 'PORTF.0', 'PORTF.1', 'PORTF.2', 'PORTF.3', 'PORTF.4', 'PORTF.5', 'PORTF.6', 'PORTF.7', + + 'DDRA.0', 'DDRA.1', 'DDRA.2', 'DDRA.3', 'DDRA.4', 'DDRA.5', 'DDRA.6', 'DDRA.7', + 'DDRB.0', 'DDRB.1', 'DDRB.2', 'DDRB.3', 'DDRB.4', 'DDRB.5', 'DDRB.6', 'DDRB.7', + 'DDRC.0', 'DDRC.1', 'DDRC.2', 'DDRC.3', 'DDRC.4', 'DDRC.5', 'DDRC.6', 'DDRC.7', + 'DDRD.0', 'DDRD.1', 'DDRD.2', 'DDRD.3', 'DDRD.4', 'DDRD.5', 'DDRD.6', 'DDRD.7', + 'DDRE.0', 'DDRE.1', 'DDRE.2', 'DDRE.3', 'DDRE.4', 'DDRE.5', 'DDRE.6', 'DDRE.7', + 'DDRF.0', 'DDRF.1', 'DDRF.2', 'DDRF.3', 'DDRF.4', 'DDRF.5', 'DDRF.6', 'DDRF.7', + + 'DDRA','DDRB','DDRC','DDRD','DDRE','DDRF', + 'PORTA','PORTB','PORTC','PORTD','PORTE','PORTF', + 'PINA','PINB','PINC','PIND','PINE','PINF', + ) + ), + 'SYMBOLS' => array( + '=', '<', '>', '>=', '<=', '+', '-', '*', '/', '%', '(', ')', '{', '}', '[', ']', ';', ':', '$', '&H' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000080; font-weight: bold;', + 2 => 'color: #FF0000;', + 3 => 'color: #0000FF;', + 4 => 'color: #0080FF;', + ), + 'COMMENTS' => array( + 1 => 'color: #657CC4; font-style: italic;' + ), + 'BRACKETS' => array( + 0 => 'color: #000080;' + ), + 'STRINGS' => array( + 0 => 'color: #008000;' + ), + 'NUMBERS' => array( + 0 => 'color: #000080; font-weight: bold;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #0000FF;' + ), + 'ESCAPE_CHAR' => array( + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); + diff --git a/vendor/easybook/geshi/geshi/bash.php b/vendor/easybook/geshi/geshi/bash.php new file mode 100644 index 0000000000..495bb9d769 --- /dev/null +++ b/vendor/easybook/geshi/geshi/bash.php @@ -0,0 +1,473 @@ + 'Bash', + // Bash DOES have single line comments with # markers. But bash also has + // the $# variable, so comments need special handling (see sf.net + // 1564839) + 'COMMENT_SINGLE' => array('#'), + 'COMMENT_MULTI' => array(), + 'COMMENT_REGEXP' => array( + //Variables + 1 => "/\\$\\{[^\\n\\}]*?\\}/i", + //BASH-style Heredoc + 2 => '/<<-?\s*?(\'?)([a-zA-Z0-9]+)\1\\n.*\\n\\2(?![a-zA-Z0-9])/siU', + //Escaped String Starters + 3 => "/\\\\['\"]/siU", + // Single-Line Shell usage: Hide the prompt at the beginning + /* 4 => "/\A(?!#!)\s*(?>[\w:@\\/\\-\\._~]*[$#]\s?)?(?=[^\n]+\n?\Z)|^(?!#!)(\w+@)?[\w\\-\\.]+(:~?)[\w\\/\\-\\._]*?[$#]\s?/ms" */ + 4 => "/\A(?!#!)(?:(?>[\w:@\\/\\-\\._~]*)[$#]\s?)(?=(?>[^\n]+)\n?\Z)|^(?!#!)(?:\w+@)?(?>[\w\\-\\.]+)(?>:~?[\w\\/\\-\\._]*?)?[$#]\s?/sm" + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'HARDQUOTE' => array("'", "'"), + 'HARDESCAPE' => array("\'"), + 'ESCAPE_CHAR' => '', + 'ESCAPE_REGEXP' => array( + //Simple Single Char Escapes + 1 => "#\\\\[nfrtv\\$\\\"\n]#i", + // $var + 2 => "#\\$[a-z_][a-z0-9_]*#i", + // ${...} + 3 => "/\\$\\{[^\\n\\}]*?\\}/i", + // $(...) + 4 => "/\\$\\([^\\n\\)]*?\\)/i", + // `...` + 5 => "/`[^`]*`/" + ), + 'KEYWORDS' => array( + 1 => array( + 'case', 'do', 'done', 'elif', 'else', 'esac', 'fi', 'for', 'function', + 'if', 'in', 'select', 'set', 'then', 'until', 'while', 'time' + ), + 2 => array( + 'aclocal', 'aconnect', 'apachectl', 'apache2ctl', 'aplay', 'apm', + 'apmsleep', 'apropos', 'apt-cache', 'apt-cdrom', 'apt-config', + 'apt-file', 'apt-ftparchive', 'apt-get', 'apt-key', 'apt-listbugs', + 'apt-listchanges', 'apt-mark', 'apt-mirror', 'apt-sortpkgs', + 'apt-src', 'apticron', 'aptitude', 'aptsh', 'apxs', 'apxs2', 'ar', + 'arch', 'arecord', 'as', 'as86', 'ash', 'autoconf', 'autoheader', + 'automake', 'awk', + + 'apachectl start', 'apachectl stop', 'apachectl restart', + 'apachectl graceful', 'apachectl graceful-stop', + 'apachectl configtest', 'apachectl status', 'apachectl fullstatus', + 'apachectl help', 'apache2ctl start', 'apache2ctl stop', + 'apache2ctl restart', 'apache2ctl graceful', + 'apache2ctl graceful-stop', 'apache2ctl configtest', + 'apache2ctl status', 'apache2ctl fullstatus', 'apache2ctl help', + + 'apt-cache add', 'apt-cache depends', 'apt-cache dotty', + 'apt-cache dump', 'apt-cache dumpavail', 'apt-cache gencaches', + 'apt-cache pkgnames', 'apt-cache policy', 'apt-cache rdepends', + 'apt-cache search', 'apt-cache show', 'apt-cache showauto', + 'apt-cache showpkg', 'apt-cache showsrc', 'apt-cache stats', + 'apt-cache unmet', 'apt-cache xvcg', 'apt-cdrom add', + 'apt-cdrom ident', 'apt-config dump', 'apt-config shell', + 'apt-file find', 'apt-file list', 'apt-file purge', + 'apt-file search', 'apt-file shot', 'apt-file update', + 'apt-get autoclean', 'apt-get autoremove', 'apt-get build-dep', + 'apt-get check', 'apt-get clean', 'apt-get dist-upgrade', + 'apt-get dselect-upgrade', 'apt-get install', 'apt-get markauto', + 'apt-get purge', 'apt-get remove', 'apt-get source', + 'apt-get unmarkauto', 'apt-get update', 'apt-get upgrade', + 'apt-key add', 'apt-key adv', 'apt-key del', 'apt-key export', + 'apt-key exportall', 'apt-key finger', 'apt-key list', + 'apt-key net-update', 'apt-key update', 'apt-listbugs apt', + 'apt-listbugs list', 'apt-listbugs rss', 'apt-src build', + 'apt-src clean', 'apt-src import', 'apt-src install', + 'apt-src list', 'apt-src location', 'apt-src name', + 'apt-src remove', 'apt-src update', 'apt-src upgrade', + 'apt-src version', + + 'aptitude autoclean', 'aptitude build-dep', 'aptitude changelog', + 'aptitude clean', 'aptitude download', 'aptitude forbid-version', + 'aptitude forget-new', 'aptitude full-upgrade', 'aptitude hold', + 'aptitude install', 'aptitude markauto', 'aptitude purge', + 'aptitude reinstall', 'aptitude remove', 'aptitude safe-upgrade', + 'aptitude search', 'aptitude show', 'aptitude unhold', + 'aptitude unmarkauto', 'aptitude update', 'aptitude versions', + 'aptitude why', 'aptitude why-not', + + 'basename', 'bash', 'batctl', 'bc', 'bison', 'bunzip2', 'bzcat', + 'bzcmp', 'bzdiff', 'bzegrep', 'bzfgrep', 'bzgrep', + 'bzip2', 'bzip2recover', 'bzless', 'bzmore', + + 'c++', 'cal', 'cat', 'chattr', 'cc', 'cdda2wav', 'cdparanoia', + 'cdrdao', 'cd-read', 'cdrecord', 'chfn', 'chgrp', 'chmod', + 'chown', 'chroot', 'chsh', 'chvt', 'clear', 'cmp', 'comm', 'co', + 'col', 'cp', 'cpio', 'cpp', 'csh', 'cut', 'cvs', 'cvs-pserver', + + 'cvs add', 'cvs admin', 'cvs annotate', 'cvs checkout', + 'cvs commit', 'cvs diff', 'cvs edit', 'cvs editors', 'cvs export', + 'cvs history', 'cvs import', 'cvs init', 'cvs log', 'cvs login', + 'cvs logout', 'cvs ls', 'cvs pserver', 'cvs rannotate', + 'cvs rdiff', 'cvs release', 'cvs remove', 'cvs rlog', 'cvs rls', + 'cvs rtag', 'cvs server', 'cvs status', 'cvs tag', 'cvs unedit', + 'cvs update', 'cvs version', 'cvs watch', 'cvs watchers', + + 'dash', 'date', 'dc', 'dch', 'dcop', 'dd', 'ddate', 'ddd', + 'deallocvt', 'debconf', 'defoma', 'depmod', 'df', 'dh', + 'dialog', 'diff', 'diff3', 'dig', 'dir', 'dircolors', 'directomatic', + 'dirname', 'dmesg', 'dnsdomainname', 'domainname', 'dpkg', + 'dselect', 'du', 'dumpkeys', + + 'ed', 'egrep', 'env', 'expr', + + 'false', 'fbset', 'fdisk', 'ffmpeg', 'fgconsole','fgrep', 'file', + 'find', 'flex', 'flex++', 'fmt', 'free', 'ftp', 'funzip', 'fuser', + + 'g++', 'gawk', 'gc','gcc', 'gdb', 'getent', 'getkeycodes', + 'getopt', 'gettext', 'gettextize', 'gimp', 'gimp-remote', + 'gimptool', 'gmake', 'gocr', 'grep', 'groups', 'gs', 'gunzip', + 'gzexe', 'gzip', + + 'git', 'git add', 'git add--interactive', 'git am', 'git annotate', + 'git apply', 'git archive', 'git bisect', 'git bisect--helper', + 'git blame', 'git branch', 'git bundle', 'git cat-file', + 'git check-attr', 'git checkout', 'git checkout-index', + 'git check-ref-format', 'git cherry', 'git cherry-pick', + 'git clean', 'git clone', 'git commit', 'git commit-tree', + 'git config', 'git count-objects', 'git daemon', 'git describe', + 'git diff', 'git diff-files', 'git diff-index', 'git difftool', + 'git difftool--helper', 'git diff-tree', 'git fast-export', + 'git fast-import', 'git fetch', 'git fetch-pack', + 'git filter-branch', 'git fmt-merge-msg', 'git for-each-ref', + 'git format-patch', 'git fsck', 'git fsck-objects', 'git gc', + 'git get-tar-commit-id', 'git grep', 'git hash-object', 'git help', + 'git http-backend', 'git http-fetch', 'git http-push', + 'git imap-send', 'git index-pack', 'git init', 'git init-db', + 'git instaweb', 'git log', 'git lost-found', 'git ls-files', + 'git ls-remote', 'git ls-tree', 'git mailinfo', 'git mailsplit', + 'git merge', 'git merge-base', 'git merge-file', 'git merge-index', + 'git merge-octopus', 'git merge-one-file', 'git merge-ours', + 'git merge-recursive', 'git merge-resolve', 'git merge-subtree', + 'git mergetool', 'git merge-tree', 'git mktag', 'git mktree', + 'git mv', 'git name-rev', 'git notes', 'git pack-objects', + 'git pack-redundant', 'git pack-refs', 'git patch-id', + 'git peek-remote', 'git prune', 'git prune-packed', 'git pull', + 'git push', 'git quiltimport', 'git read-tree', 'git rebase', + 'git rebase--interactive', 'git receive-pack', 'git reflog', + 'git relink', 'git remote', 'git remote-ftp', 'git remote-ftps', + 'git remote-http', 'git remote-https', 'git remote-testgit', + 'git repack', 'git replace', 'git repo-config', 'git request-pull', + 'git rerere', 'git reset', 'git revert', 'git rev-list', + 'git rev-parse', 'git rm', 'git send-pack', 'git shell', + 'git shortlog', 'git show', 'git show-branch', 'git show-index', + 'git show-ref', 'git stage', 'git stash', 'git status', + 'git stripspace', 'git submodule', 'git symbolic-ref', 'git tag', + 'git tar-tree', 'git unpack-file', 'git unpack-objects', + 'git update-index', 'git update-ref', 'git update-server-info', + 'git upload-archive', 'git upload-pack', 'git var', + 'git verify-pack', 'git verify-tag', 'git web--browse', + 'git whatchanged', 'git write-tree', + + 'gitaction', 'git-add', 'git-add--interactive', 'git-am', + 'git-annotate', 'git-apply', 'git-archive', 'git-bisect', + 'git-bisect--helper', 'git-blame', 'git-branch', 'git-bundle', + 'git-cat-file', 'git-check-attr', 'git-checkout', + 'git-checkout-index', 'git-check-ref-format', 'git-cherry', + 'git-cherry-pick', 'git-clean', 'git-clone', 'git-commit', + 'git-commit-tree', 'git-config', 'git-count-objects', 'git-daemon', + 'git-describe', 'git-diff', 'git-diff-files', 'git-diff-index', + 'git-difftool', 'git-difftool--helper', 'git-diff-tree', + 'gitdpkgname', 'git-fast-export', 'git-fast-import', 'git-fetch', + 'git-fetch-pack', 'git-fetch--tool', 'git-filter-branch', 'gitfm', + 'git-fmt-merge-msg', 'git-for-each-ref', 'git-format-patch', + 'git-fsck', 'git-fsck-objects', 'git-gc', 'git-get-tar-commit-id', + 'git-grep', 'git-hash-object', 'git-help', 'git-http-fetch', + 'git-http-push', 'git-imap-send', 'git-index-pack', 'git-init', + 'git-init-db', 'git-instaweb', 'gitkeys', 'git-log', + 'git-lost-found', 'git-ls-files', 'git-ls-remote', 'git-ls-tree', + 'git-mailinfo', 'git-mailsplit', 'git-merge', 'git-merge-base', + 'git-merge-file', 'git-merge-index', 'git-merge-octopus', + 'git-merge-one-file', 'git-merge-ours', 'git-merge-recursive', + 'git-merge-resolve', 'git-merge-subtree', 'git-mergetool', + 'git-mergetool--lib', 'git-merge-tree', 'gitmkdirs', 'git-mktag', + 'git-mktree', 'gitmount', 'git-mv', 'git-name-rev', + 'git-pack-objects', 'git-pack-redundant', 'git-pack-refs', + 'git-parse-remote', 'git-patch-id', 'git-peek-remote', 'git-prune', + 'git-prune-packed', 'gitps', 'git-pull', 'git-push', + 'git-quiltimport', 'git-read-tree', 'git-rebase', + 'git-rebase--interactive', 'git-receive-pack', 'git-reflog', + 'gitregrep', 'git-relink', 'git-remote', 'git-repack', + 'git-repo-config', 'git-request-pull', 'git-rerere', 'git-reset', + 'git-revert', 'git-rev-list', 'git-rev-parse', 'gitrfgrep', + 'gitrgrep', 'git-rm', 'git-send-pack', 'git-shell', 'git-shortlog', + 'git-show', 'git-show-branch', 'git-show-index', 'git-show-ref', + 'git-sh-setup', 'git-stage', 'git-stash', 'git-status', + 'git-stripspace', 'git-submodule', 'git-svn', 'git-symbolic-ref', + 'git-tag', 'git-tar-tree', 'gitunpack', 'git-unpack-file', + 'git-unpack-objects', 'git-update-index', 'git-update-ref', + 'git-update-server-info', 'git-upload-archive', 'git-upload-pack', + 'git-var', 'git-verify-pack', 'git-verify-tag', 'gitview', + 'git-web--browse', 'git-whatchanged', 'gitwhich', 'gitwipe', + 'git-write-tree', 'gitxgrep', + + 'head', 'hexdump', 'hostname', 'htop', + + 'id', 'ifconfig', 'ifdown', 'ifup', 'igawk', 'install', + + 'ip', 'ip addr', 'ip addrlabel', 'ip link', 'ip maddr', 'ip mroute', + 'ip neigh', 'ip route', 'ip rule', 'ip tunnel', 'ip xfrm', + + 'jar', 'java', 'javac', 'join', + + 'kbd_mode','kbdrate', 'kdialog', 'kfile', 'kill', 'killall', + + 'lame', 'last', 'lastb', 'ld', 'ld86', 'ldd', 'less', 'lex', 'link', + 'ln', 'loadkeys', 'loadunimap', 'locate', 'lockfile', 'login', + 'logname', 'lp', 'lpr', 'ls', 'lsattr', 'lsmod', 'lsmod.old', + 'lspci', 'ltrace', 'lynx', + + 'm4', 'make', 'man', 'mapscrn', 'mesg', 'mkdir', 'mkfifo', + 'mknod', 'mktemp', 'more', 'mount', 'mplayer', 'msgfmt', 'mv', + + 'namei', 'nano', 'nasm', 'nawk', 'netstat', 'nice', + 'nisdomainname', 'nl', 'nm', 'nm86', 'nmap', 'nohup', 'nop', + + 'od', 'openvt', + + 'passwd', 'patch', 'pbzip2', 'pcregrep', 'pcretest', 'perl', + 'perror', 'pgawk', 'pidof', 'pigz', 'ping', 'pr', 'procmail', + 'prune', 'ps', 'pstree', 'ps2ascii', 'ps2epsi', 'ps2frag', + 'ps2pdf', 'ps2ps', 'psbook', 'psmerge', 'psnup', 'psresize', + 'psselect', 'pstops', + + 'rbash', 'rcs', 'rcs2log', 'read', 'readlink', 'red', 'resizecons', + 'rev', 'rm', 'rmdir', 'rsh', 'run-parts', + + 'sash', 'scp', 'screen', 'sed', 'seq', 'sendmail', 'setfont', + 'setkeycodes', 'setleds', 'setmetamode', 'setserial', 'setterm', + 'sh', 'showkey', 'shred', 'size', 'size86', 'skill', 'sleep', + 'slogin', 'snice', 'sort', 'sox', 'split', 'ssed', 'ssh', 'ssh-add', + 'ssh-agent', 'ssh-keygen', 'ssh-keyscan', 'sshfs', 'stat', 'strace', + 'strings', 'strip', 'stty', 'su', 'sudo', 'suidperl', 'sum', 'svn', + 'svnadmin', 'svndumpfilter', 'svnlook', 'svnmerge', 'svnmucc', + 'svnserve', 'svnshell', 'svnsync', 'svnversion', 'svnwrap', 'sync', + + 'svn add', 'svn ann', 'svn annotate', 'svn blame', 'svn cat', + 'svn changelist', 'svn checkout', 'svn ci', 'svn cl', 'svn cleanup', + 'svn co', 'svn commit', 'svn copy', 'svn cp', 'svn del', + 'svn delete', 'svn di', 'svn diff', 'svn export', 'svn help', + 'svn import', 'svn info', 'svn list', 'svn lock', 'svn log', + 'svn ls', 'svn merge', 'svn mergeinfo', 'svn mkdir', 'svn move', + 'svn mv', 'svn patch', 'svn pd', 'svn pdel', 'svn pe', 'svn pedit', + 'svn pg', 'svn pget', 'svn pl', 'svn plist', 'svn praise', + 'svn propdel', 'svn propedit', 'svn propget', 'svn proplist', + 'svn propset', 'svn ps', 'svn pset', 'svn relocate', 'svn remove', + 'svn rename', 'svn resolve', 'svn resolved', 'svn revert', 'svn rm', + 'svn st', 'svn stat', 'svn status', 'svn sw', 'svn switch', + 'svn unlock', 'svn up', 'svn update', 'svn upgrade', + + 'svnadmin crashtest', 'svnadmin create', 'svnadmin deltify', + 'svnadmin dump', 'svnadmin help', 'svnadmin hotcopy', + 'svnadmin list-dblogs', 'svnadmin list-unused-dblogs', + 'svnadmin load', 'svnadmin lslocks', 'svnadmin lstxns', + 'svnadmin pack', 'svnadmin recover', 'svnadmin rmlocks', + 'svnadmin rmtxns', 'svnadmin setlog', 'svnadmin setrevprop', + 'svnadmin setuuid', 'svnadmin upgrade', 'svnadmin verify', + + 'svndumpfilter exclude', 'svndumpfilter help', + 'svndumpfilter include', + + 'svnlook author', 'svnlook cat', 'svnlook changed', 'svnlook date', + 'svnlook diff', 'svnlook dirs-changed', 'svnlook filesize', + 'svnlook help', 'svnlook history', 'svnlook info', 'svnlook lock', + 'svnlook log', 'svnlook pg', 'svnlook pget', 'svnlook pl', + 'svnlook plist', 'svnlook propget', 'svnlook proplist', + 'svnlook tree', 'svnlook uuid', 'svnlook youngest', + + 'svnrdump dump', 'svnrdump help', 'svnrdump load', + + 'svnsync copy-revprops', 'svnsync help', 'svnsync info', + 'svnsync init', 'svnsync initialize', 'svnsync sync', + 'svnsync synchronize', + + 'tac', 'tail', 'tar', 'tee', 'tempfile', 'touch', 'tr', 'tree', + 'true', + + 'umount', 'uname', 'unicode_start', 'unicode_stop', 'uniq', + 'unlink', 'unzip', 'updatedb', 'updmap', 'uptime', 'users', + 'utmpdump', 'uuidgen', + + 'valgrind', 'vdir', 'vi', 'vim', 'vmstat', + + 'w', 'wall', 'watch', 'wc', 'wget', 'whatis', 'whereis', + 'which', 'whiptail', 'who', 'whoami', 'whois', 'wine', 'wineboot', + 'winebuild', 'winecfg', 'wineconsole', 'winedbg', 'winedump', + 'winefile', 'wodim', 'write', + + 'xargs', 'xhost', 'xmodmap', 'xset', + + 'yacc', 'yes', 'ypdomainname', 'yum', + + 'yum check-update', 'yum clean', 'yum deplist', 'yum erase', + 'yum groupinfo', 'yum groupinstall', 'yum grouplist', + 'yum groupremove', 'yum groupupdate', 'yum info', 'yum install', + 'yum list', 'yum localinstall', 'yum localupdate', 'yum makecache', + 'yum provides', 'yum remove', 'yum resolvedep', 'yum search', + 'yum shell', 'yum update', 'yum upgrade', 'yum whatprovides', + + 'zcat', 'zcmp', 'zdiff', 'zdump', 'zegrep', 'zfgrep', 'zforce', + 'zgrep', 'zip', 'zipgrep', 'zipinfo', 'zless', 'zmore', 'znew', + 'zsh', 'zsoelim' + ), + 3 => array( + 'alias', 'bg', 'bind', 'break', 'builtin', 'cd', 'command', + 'compgen', 'complete', 'continue', 'declare', 'dirs', 'disown', + 'echo', 'enable', 'eval', 'exec', 'exit', 'export', 'fc', + 'fg', 'getopts', 'hash', 'help', 'history', 'jobs', 'let', + 'local', 'logout', 'popd', 'printf', 'pushd', 'pwd', 'readonly', + 'return', 'shift', 'shopt', 'source', 'suspend', 'test', 'times', + 'trap', 'type', 'typeset', 'ulimit', 'umask', 'unalias', 'unset', + 'wait' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '!', '@', '%', '&', '*', '|', '/', '<', '>', ';;', '`' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000000; font-weight: bold;', + 2 => 'color: #c20cb9; font-weight: bold;', + 3 => 'color: #7a0874; font-weight: bold;' + ), + 'COMMENTS' => array( + 0 => 'color: #666666; font-style: italic;', + 1 => 'color: #800000;', + 2 => 'color: #cc0000; font-style: italic;', + 3 => 'color: #000000; font-weight: bold;', + 4 => 'color: #666666;' + ), + 'ESCAPE_CHAR' => array( + 1 => 'color: #000099; font-weight: bold;', + 2 => 'color: #007800;', + 3 => 'color: #007800;', + 4 => 'color: #007800;', + 5 => 'color: #780078;', + 'HARD' => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #7a0874; font-weight: bold;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;', + 'HARD' => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #000000;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #000000; font-weight: bold;' + ), + 'REGEXPS' => array( + 0 => 'color: #007800;', + 1 => 'color: #007800;', + 2 => 'color: #007800;', + 4 => 'color: #007800;', + 5 => 'color: #660033;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + //Variables (will be handled by comment_regexps) + 0 => "\\$\\{[a-zA-Z_][a-zA-Z0-9_]*?\\}", + //Variables without braces + 1 => "\\$[a-zA-Z_][a-zA-Z0-9_]*", + //Variable assignment + 2 => "(? "\\$[*#\$\\-\\?!\d]", + //Parameters of commands + 5 => "(?<=\s)--?[0-9a-zA-Z\-]+(?=[\s=]|<(?:SEMI|PIPE)>|$)" + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'COMMENTS' => array( + 'DISALLOWED_BEFORE' => '$' + ), + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => "(? "(?![\.\-a-zA-Z0-9_%=\\/:])", + 2 => array( + 'SPACE_AS_WHITESPACE' => false + ) + ) + ) +); + diff --git a/vendor/easybook/geshi/geshi/basic4gl.php b/vendor/easybook/geshi/geshi/basic4gl.php new file mode 100644 index 0000000000..112fb6967c --- /dev/null +++ b/vendor/easybook/geshi/geshi/basic4gl.php @@ -0,0 +1,339 @@ + 'Basic4GL', + 'COMMENT_SINGLE' => array(1 => "'"), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + + // Navy Blue Bold Keywords + + 'true','rnd_max','m_pi','m_e','false','VK_ZOOM','VK_UP','VK_TAB','VK_SUBTRACT','VK_SPACE','VK_SNAPSHOT', + 'VK_SHIFT','VK_SEPARATOR','VK_SELECT','VK_SCROLL','VK_RWIN','VK_RSHIFT','VK_RMENU','VK_RIGHT','VK_RETURN', + 'VK_RCONTROL','VK_RBUTTON','VK_PROCESSKEY','VK_PRIOR','VK_PRINT','VK_PLAY','VK_PAUSE','VK_NUMPAD9','VK_NUMPAD8', + 'VK_NUMPAD7','VK_NUMPAD6','VK_NUMPAD5','VK_NUMPAD4','VK_NUMPAD3','VK_NUMPAD2','VK_NUMPAD1','VK_NUMPAD0', + 'VK_NUMLOCK','VK_NONCONVERT','VK_NEXT','VK_MULTIPLY','VK_MODECHANGE','VK_MENU','VK_MBUTTON','VK_LWIN', + 'VK_LSHIFT','VK_LMENU','VK_LEFT','VK_LCONTROL','VK_LBUTTON','VK_KANJI','VK_KANA','VK_JUNJA','VK_INSERT', + 'VK_HOME','VK_HELP','VK_HANJA','VK_HANGUL','VK_HANGEUL','VK_FINAL','VK_F9','VK_F8','VK_F7','VK_F6','VK_F5', + 'VK_F4','VK_F3','VK_F24','VK_F23','VK_F22','VK_F21','VK_F20','VK_F2','VK_F19','VK_F18','VK_F17','VK_F16', + 'VK_F15','VK_F14','VK_F13','VK_F12','VK_F11','VK_F10','VK_F1','VK_EXSEL','VK_EXECUTE','VK_ESCAPE','VK_EREOF', + 'VK_END','VK_DOWN','VK_DIVIDE','VK_DELETE','VK_DECIMAL','VK_CRSEL','VK_CONVERT','VK_CONTROL','VK_CLEAR', + 'VK_CAPITAL','VK_CANCEL','VK_BACK','VK_ATTN','VK_APPS','VK_ADD','VK_ACCEPT','TEXT_SIMPLE','TEXT_OVERLAID', + 'TEXT_BUFFERED','SPR_TILEMAP','SPR_SPRITE','SPR_INVALID','MOUSE_RBUTTON','MOUSE_MBUTTON','MOUSE_LBUTTON', + 'GL_ZOOM_Y','GL_ZOOM_X','GL_ZERO','GL_XOR','GL_WIN_swap_hint','GL_WIN_draw_range_elements','GL_VIEWPORT_BIT', + 'GL_VIEWPORT','GL_VERTEX_ARRAY_TYPE_EXT','GL_VERTEX_ARRAY_TYPE','GL_VERTEX_ARRAY_STRIDE_EXT','GL_VERTEX_ARRAY_STRIDE', + 'GL_VERTEX_ARRAY_SIZE_EXT','GL_VERTEX_ARRAY_SIZE','GL_VERTEX_ARRAY_POINTER_EXT','GL_VERTEX_ARRAY_POINTER', + 'GL_VERTEX_ARRAY_EXT','GL_VERTEX_ARRAY_COUNT_EXT','GL_VERTEX_ARRAY','GL_VERSION_1_1','GL_VERSION','GL_VENDOR', + 'GL_V3F','GL_V2F','GL_UNSIGNED_SHORT','GL_UNSIGNED_INT','GL_UNSIGNED_BYTE','GL_UNPACK_SWAP_BYTES','GL_UNPACK_SKIP_ROWS', + 'GL_UNPACK_SKIP_PIXELS','GL_UNPACK_ROW_LENGTH','GL_UNPACK_LSB_FIRST','GL_UNPACK_ALIGNMENT','GL_TRUE','GL_TRIANGLE_STRIP', + 'GL_TRIANGLE_FAN','GL_TRIANGLES','GL_TRANSFORM_BIT','GL_TEXTURE_WRAP_T','GL_TEXTURE_WRAP_S','GL_TEXTURE_WIDTH', + 'GL_TEXTURE_STACK_DEPTH','GL_TEXTURE_RESIDENT','GL_TEXTURE_RED_SIZE','GL_TEXTURE_PRIORITY','GL_TEXTURE_MIN_FILTER', + 'GL_TEXTURE_MATRIX','GL_TEXTURE_MAG_FILTER','GL_TEXTURE_LUMINANCE_SIZE','GL_TEXTURE_INTERNAL_FORMAT','GL_TEXTURE_INTENSITY_SIZE', + 'GL_TEXTURE_HEIGHT','GL_TEXTURE_GREEN_SIZE','GL_TEXTURE_GEN_T','GL_TEXTURE_GEN_S','GL_TEXTURE_GEN_R','GL_TEXTURE_GEN_Q', + 'GL_TEXTURE_GEN_MODE','GL_TEXTURE_ENV_MODE','GL_TEXTURE_ENV_COLOR','GL_TEXTURE_ENV','GL_TEXTURE_COORD_ARRAY_TYPE_EXT', + 'GL_TEXTURE_COORD_ARRAY_TYPE','GL_TEXTURE_COORD_ARRAY_STRIDE_EXT','GL_TEXTURE_COORD_ARRAY_STRIDE','GL_TEXTURE_COORD_ARRAY_SIZE_EXT', + 'GL_TEXTURE_COORD_ARRAY_SIZE','GL_TEXTURE_COORD_ARRAY_POINTER_EXT','GL_TEXTURE_COORD_ARRAY_POINTER','GL_TEXTURE_COORD_ARRAY_EXT', + 'GL_TEXTURE_COORD_ARRAY_COUNT_EXT','GL_TEXTURE_COORD_ARRAY','GL_TEXTURE_COMPONENTS','GL_TEXTURE_BORDER_COLOR','GL_TEXTURE_BORDER', + 'GL_TEXTURE_BLUE_SIZE','GL_TEXTURE_BIT','GL_TEXTURE_BINDING_2D','GL_TEXTURE_BINDING_1D','GL_TEXTURE_ALPHA_SIZE', + 'GL_TEXTURE_2D','GL_TEXTURE_1D','GL_TEXTURE9_ARB','GL_TEXTURE9','GL_TEXTURE8_ARB','GL_TEXTURE8','GL_TEXTURE7_ARB', + 'GL_TEXTURE7','GL_TEXTURE6_ARB','GL_TEXTURE6','GL_TEXTURE5_ARB','GL_TEXTURE5','GL_TEXTURE4_ARB','GL_TEXTURE4', + 'GL_TEXTURE3_ARB','GL_TEXTURE31_ARB','GL_TEXTURE31','GL_TEXTURE30_ARB','GL_TEXTURE30','GL_TEXTURE3','GL_TEXTURE2_ARB', + 'GL_TEXTURE29_ARB','GL_TEXTURE29','GL_TEXTURE28_ARB','GL_TEXTURE28','GL_TEXTURE27_ARB','GL_TEXTURE27','GL_TEXTURE26_ARB', + 'GL_TEXTURE26','GL_TEXTURE25_ARB','GL_TEXTURE25','GL_TEXTURE24_ARB','GL_TEXTURE24','GL_TEXTURE23_ARB','GL_TEXTURE23', + 'GL_TEXTURE22_ARB','GL_TEXTURE22','GL_TEXTURE21_ARB','GL_TEXTURE21','GL_TEXTURE20_ARB','GL_TEXTURE20','GL_TEXTURE2', + 'GL_TEXTURE1_ARB','GL_TEXTURE19_ARB','GL_TEXTURE19','GL_TEXTURE18_ARB','GL_TEXTURE18','GL_TEXTURE17_ARB', + 'GL_TEXTURE17','GL_TEXTURE16_ARB','GL_TEXTURE16','GL_TEXTURE15_ARB','GL_TEXTURE15','GL_TEXTURE14_ARB','GL_TEXTURE14', + 'GL_TEXTURE13_ARB','GL_TEXTURE13','GL_TEXTURE12_ARB','GL_TEXTURE12','GL_TEXTURE11_ARB','GL_TEXTURE11','GL_TEXTURE10_ARB', + 'GL_TEXTURE10','GL_TEXTURE1','GL_TEXTURE0_ARB','GL_TEXTURE0','GL_TEXTURE','GL_T4F_V4F','GL_T4F_C4F_N3F_V4F','GL_T2F_V3F', + 'GL_T2F_N3F_V3F','GL_T2F_C4UB_V3F','GL_T2F_C4F_N3F_V3F','GL_T2F_C3F_V3F','GL_T','GL_SUBPIXEL_BITS','GL_STEREO', + 'GL_STENCIL_WRITEMASK','GL_STENCIL_VALUE_MASK','GL_STENCIL_TEST','GL_STENCIL_REF','GL_STENCIL_PASS_DEPTH_PASS', + 'GL_STENCIL_PASS_DEPTH_FAIL','GL_STENCIL_INDEX','GL_STENCIL_FUNC','GL_STENCIL_FAIL','GL_STENCIL_CLEAR_VALUE', + 'GL_STENCIL_BUFFER_BIT','GL_STENCIL_BITS','GL_STENCIL','GL_STACK_UNDERFLOW','GL_STACK_OVERFLOW','GL_SRC_COLOR', + 'GL_SRC_ALPHA_SATURATE','GL_SRC_ALPHA','GL_SPOT_EXPONENT','GL_SPOT_DIRECTION','GL_SPOT_CUTOFF','GL_SPHERE_MAP', + 'GL_SPECULAR','GL_SOURCE2_RGB_EXT','GL_SOURCE2_RGB','GL_SOURCE2_ALPHA_EXT','GL_SOURCE2_ALPHA','GL_SOURCE1_RGB_EXT', + 'GL_SOURCE1_RGB','GL_SOURCE1_ALPHA_EXT','GL_SOURCE1_ALPHA','GL_SOURCE0_RGB_EXT','GL_SOURCE0_RGB','GL_SOURCE0_ALPHA_EXT', + 'GL_SOURCE0_ALPHA','GL_SMOOTH','GL_SHORT','GL_SHININESS','GL_SHADE_MODEL','GL_SET','GL_SELECTION_BUFFER_SIZE', + 'GL_SELECTION_BUFFER_POINTER','GL_SELECT','GL_SCISSOR_TEST','GL_SCISSOR_BOX','GL_SCISSOR_BIT','GL_S','GL_RIGHT', + 'GL_RGB_SCALE_EXT','GL_RGB_SCALE','GL_RGBA_MODE','GL_RGBA8','GL_RGBA4','GL_RGBA2','GL_RGBA16','GL_RGBA12','GL_RGBA', + 'GL_RGB8','GL_RGB5_A1','GL_RGB5','GL_RGB4','GL_RGB16','GL_RGB12','GL_RGB10_A2','GL_RGB10','GL_RGB','GL_RETURN', + 'GL_REPLACE','GL_REPEAT','GL_RENDER_MODE','GL_RENDERER','GL_RENDER','GL_RED_SCALE','GL_RED_BITS','GL_RED_BIAS', + 'GL_RED','GL_READ_BUFFER','GL_R3_G3_B2','GL_R','GL_QUAD_STRIP','GL_QUADS','GL_QUADRATIC_ATTENUATION','GL_Q', + 'GL_PROXY_TEXTURE_2D','GL_PROXY_TEXTURE_1D','GL_PROJECTION_STACK_DEPTH','GL_PROJECTION_MATRIX','GL_PROJECTION', + 'GL_PRIMARY_COLOR_EXT','GL_PRIMARY_COLOR','GL_PREVIOUS_EXT','GL_PREVIOUS','GL_POSITION','GL_POLYGON_TOKEN', + 'GL_POLYGON_STIPPLE_BIT','GL_POLYGON_STIPPLE','GL_POLYGON_SMOOTH_HINT','GL_POLYGON_SMOOTH','GL_POLYGON_OFFSET_UNITS', + 'GL_POLYGON_OFFSET_POINT','GL_POLYGON_OFFSET_LINE','GL_POLYGON_OFFSET_FILL','GL_POLYGON_OFFSET_FACTOR','GL_POLYGON_MODE', + 'GL_POLYGON_BIT','GL_POLYGON','GL_POINT_TOKEN','GL_POINT_SMOOTH_HINT','GL_POINT_SMOOTH','GL_POINT_SIZE_RANGE', + 'GL_POINT_SIZE_GRANULARITY','GL_POINT_SIZE','GL_POINT_BIT','GL_POINTS','GL_POINT','GL_PIXEL_MODE_BIT', + 'GL_PIXEL_MAP_S_TO_S_SIZE','GL_PIXEL_MAP_S_TO_S','GL_PIXEL_MAP_R_TO_R_SIZE','GL_PIXEL_MAP_R_TO_R','GL_PIXEL_MAP_I_TO_R_SIZE', + 'GL_PIXEL_MAP_I_TO_R','GL_PIXEL_MAP_I_TO_I_SIZE','GL_PIXEL_MAP_I_TO_I','GL_PIXEL_MAP_I_TO_G_SIZE','GL_PIXEL_MAP_I_TO_G', + 'GL_PIXEL_MAP_I_TO_B_SIZE','GL_PIXEL_MAP_I_TO_B','GL_PIXEL_MAP_I_TO_A_SIZE','GL_PIXEL_MAP_I_TO_A','GL_PIXEL_MAP_G_TO_G_SIZE', + 'GL_PIXEL_MAP_G_TO_G','GL_PIXEL_MAP_B_TO_B_SIZE','GL_PIXEL_MAP_B_TO_B','GL_PIXEL_MAP_A_TO_A_SIZE','GL_PIXEL_MAP_A_TO_A', + 'GL_PHONG_WIN','GL_PHONG_HINT_WIN','GL_PERSPECTIVE_CORRECTION_HINT','GL_PASS_THROUGH_TOKEN','GL_PACK_SWAP_BYTES', + 'GL_PACK_SKIP_ROWS','GL_PACK_SKIP_PIXELS','GL_PACK_ROW_LENGTH','GL_PACK_LSB_FIRST','GL_PACK_ALIGNMENT','GL_OUT_OF_MEMORY', + 'GL_OR_REVERSE','GL_OR_INVERTED','GL_ORDER','GL_OR','GL_OPERAND2_RGB_EXT','GL_OPERAND2_RGB','GL_OPERAND2_ALPHA_EXT', + 'GL_OPERAND2_ALPHA','GL_OPERAND1_RGB_EXT','GL_OPERAND1_RGB','GL_OPERAND1_ALPHA_EXT','GL_OPERAND1_ALPHA','GL_OPERAND0_RGB_EXT', + 'GL_OPERAND0_RGB','GL_OPERAND0_ALPHA_EXT','GL_OPERAND0_ALPHA','GL_ONE_MINUS_SRC_COLOR','GL_ONE_MINUS_SRC_ALPHA', + 'GL_ONE_MINUS_DST_COLOR','GL_ONE_MINUS_DST_ALPHA','GL_ONE','GL_OBJECT_PLANE','GL_OBJECT_LINEAR','GL_NO_ERROR', + 'GL_NOTEQUAL','GL_NORMAL_ARRAY_TYPE_EXT','GL_NORMAL_ARRAY_TYPE','GL_NORMAL_ARRAY_STRIDE_EXT','GL_NORMAL_ARRAY_STRIDE', + 'GL_NORMAL_ARRAY_POINTER_EXT','GL_NORMAL_ARRAY_POINTER','GL_NORMAL_ARRAY_EXT','GL_NORMAL_ARRAY_COUNT_EXT', + 'GL_NORMAL_ARRAY','GL_NORMALIZE','GL_NOR','GL_NOOP','GL_NONE','GL_NICEST','GL_NEVER','GL_NEAREST_MIPMAP_NEAREST','GL_NEAREST_MIPMAP_LINEAR', + 'GL_NEAREST','GL_NAND','GL_NAME_STACK_DEPTH','GL_N3F_V3F','GL_MULT','GL_MODULATE','GL_MODELVIEW_STACK_DEPTH','GL_MODELVIEW_MATRIX', + 'GL_MODELVIEW','GL_MAX_VIEWPORT_DIMS','GL_MAX_TEXTURE_UNITS_ARB','GL_MAX_TEXTURE_UNITS','GL_MAX_TEXTURE_STACK_DEPTH', + 'GL_MAX_TEXTURE_SIZE','GL_MAX_PROJECTION_STACK_DEPTH','GL_MAX_PIXEL_MAP_TABLE','GL_MAX_NAME_STACK_DEPTH','GL_MAX_MODELVIEW_STACK_DEPTH', + 'GL_MAX_LIST_NESTING','GL_MAX_LIGHTS','GL_MAX_EVAL_ORDER','GL_MAX_ELEMENTS_VERTICES_WIN','GL_MAX_ELEMENTS_INDICES_WIN', + 'GL_MAX_CLIP_PLANES','GL_MAX_CLIENT_ATTRIB_STACK_DEPTH','GL_MAX_ATTRIB_STACK_DEPTH','GL_MATRIX_MODE','GL_MAP_STENCIL', + 'GL_MAP_COLOR','GL_MAP2_VERTEX_4','GL_MAP2_VERTEX_3','GL_MAP2_TEXTURE_COORD_4','GL_MAP2_TEXTURE_COORD_3','GL_MAP2_TEXTURE_COORD_2', + 'GL_MAP2_TEXTURE_COORD_1','GL_MAP2_NORMAL','GL_MAP2_INDEX','GL_MAP2_GRID_SEGMENTS','GL_MAP2_GRID_DOMAIN','GL_MAP2_COLOR_4', + 'GL_MAP1_VERTEX_4','GL_MAP1_VERTEX_3','GL_MAP1_TEXTURE_COORD_4','GL_MAP1_TEXTURE_COORD_3','GL_MAP1_TEXTURE_COORD_2', + 'GL_MAP1_TEXTURE_COORD_1','GL_MAP1_NORMAL','GL_MAP1_INDEX','GL_MAP1_GRID_SEGMENTS','GL_MAP1_GRID_DOMAIN', + 'GL_MAP1_COLOR_4','GL_LUMINANCE_ALPHA','GL_LUMINANCE8_ALPHA8','GL_LUMINANCE8','GL_LUMINANCE6_ALPHA2','GL_LUMINANCE4_ALPHA4', + 'GL_LUMINANCE4','GL_LUMINANCE16_ALPHA16','GL_LUMINANCE16','GL_LUMINANCE12_ALPHA4','GL_LUMINANCE12_ALPHA12','GL_LUMINANCE12', + 'GL_LUMINANCE','GL_LOGIC_OP_MODE','GL_LOGIC_OP','GL_LOAD','GL_LIST_MODE','GL_LIST_INDEX','GL_LIST_BIT', + 'GL_LIST_BASE','GL_LINE_WIDTH_RANGE','GL_LINE_WIDTH_GRANULARITY','GL_LINE_WIDTH','GL_LINE_TOKEN','GL_LINE_STRIP','GL_LINE_STIPPLE_REPEAT', + 'GL_LINE_STIPPLE_PATTERN','GL_LINE_STIPPLE','GL_LINE_SMOOTH_HINT','GL_LINE_SMOOTH','GL_LINE_RESET_TOKEN','GL_LINE_LOOP', + 'GL_LINE_BIT','GL_LINES','GL_LINEAR_MIPMAP_NEAREST','GL_LINEAR_MIPMAP_LINEAR','GL_LINEAR_ATTENUATION','GL_LINEAR', + 'GL_LINE','GL_LIGHT_MODEL_TWO_SIDE','GL_LIGHT_MODEL_LOCAL_VIEWER','GL_LIGHT_MODEL_AMBIENT','GL_LIGHTING_BIT', + 'GL_LIGHTING','GL_LIGHT7','GL_LIGHT6','GL_LIGHT5','GL_LIGHT4','GL_LIGHT3','GL_LIGHT2','GL_LIGHT1','GL_LIGHT0', + 'GL_LESS','GL_LEQUAL','GL_LEFT','GL_KEEP','GL_INVERT','GL_INVALID_VALUE','GL_INVALID_OPERATION','GL_INVALID_ENUM','GL_INTERPOLATE_EXT', + 'GL_INTERPOLATE','GL_INTENSITY8','GL_INTENSITY4','GL_INTENSITY16','GL_INTENSITY12','GL_INTENSITY','GL_INT', + 'GL_INDEX_WRITEMASK','GL_INDEX_SHIFT','GL_INDEX_OFFSET','GL_INDEX_MODE','GL_INDEX_LOGIC_OP','GL_INDEX_CLEAR_VALUE','GL_INDEX_BITS', + 'GL_INDEX_ARRAY_TYPE_EXT','GL_INDEX_ARRAY_TYPE','GL_INDEX_ARRAY_STRIDE_EXT','GL_INDEX_ARRAY_STRIDE','GL_INDEX_ARRAY_POINTER_EXT', + 'GL_INDEX_ARRAY_POINTER','GL_INDEX_ARRAY_EXT','GL_INDEX_ARRAY_COUNT_EXT','GL_INDEX_ARRAY','GL_INCR','GL_HINT_BIT', + 'GL_GREEN_SCALE','GL_GREEN_BITS','GL_GREEN_BIAS','GL_GREEN','GL_GREATER','GL_GEQUAL','GL_FRONT_RIGHT','GL_FRONT_LEFT', + 'GL_FRONT_FACE','GL_FRONT_AND_BACK','GL_FRONT','GL_FOG_START','GL_FOG_SPECULAR_TEXTURE_WIN','GL_FOG_MODE','GL_FOG_INDEX', + 'GL_FOG_HINT','GL_FOG_END','GL_FOG_DENSITY','GL_FOG_COLOR','GL_FOG_BIT','GL_FOG','GL_FLOAT','GL_FLAT','GL_FILL', + 'GL_FEEDBACK_BUFFER_TYPE','GL_FEEDBACK_BUFFER_SIZE','GL_FEEDBACK_BUFFER_POINTER','GL_FEEDBACK','GL_FASTEST','GL_FALSE', + 'GL_EYE_PLANE','GL_EYE_LINEAR','GL_EXT_vertex_array','GL_EXT_paletted_texture','GL_EXT_bgra','GL_EXTENSIONS','GL_EXP2', + 'GL_EXP','GL_EVAL_BIT','GL_EQUIV','GL_EQUAL','GL_ENABLE_BIT','GL_EMISSION','GL_EDGE_FLAG_ARRAY_STRIDE_EXT','GL_EDGE_FLAG_ARRAY_STRIDE', + 'GL_EDGE_FLAG_ARRAY_POINTER_EXT','GL_EDGE_FLAG_ARRAY_POINTER','GL_EDGE_FLAG_ARRAY_EXT','GL_EDGE_FLAG_ARRAY_COUNT_EXT','GL_EDGE_FLAG_ARRAY', + 'GL_EDGE_FLAG','GL_DST_COLOR','GL_DST_ALPHA','GL_DRAW_PIXEL_TOKEN','GL_DRAW_BUFFER','GL_DOUBLE_EXT','GL_DOUBLEBUFFER', + 'GL_DOUBLE','GL_DONT_CARE','GL_DOMAIN','GL_DITHER','GL_DIFFUSE','GL_DEPTH_WRITEMASK','GL_DEPTH_TEST','GL_DEPTH_SCALE', + 'GL_DEPTH_RANGE','GL_DEPTH_FUNC','GL_DEPTH_COMPONENT','GL_DEPTH_CLEAR_VALUE','GL_DEPTH_BUFFER_BIT','GL_DEPTH_BITS', + 'GL_DEPTH_BIAS','GL_DEPTH','GL_DECR','GL_DECAL','GL_CW','GL_CURRENT_TEXTURE_COORDS','GL_CURRENT_RASTER_TEXTURE_COORDS','GL_CURRENT_RASTER_POSITION_VALID', + 'GL_CURRENT_RASTER_POSITION','GL_CURRENT_RASTER_INDEX','GL_CURRENT_RASTER_DISTANCE','GL_CURRENT_RASTER_COLOR','GL_CURRENT_NORMAL', + 'GL_CURRENT_INDEX','GL_CURRENT_COLOR','GL_CURRENT_BIT','GL_CULL_FACE_MODE','GL_CULL_FACE','GL_COPY_PIXEL_TOKEN', + 'GL_COPY_INVERTED','GL_COPY','GL_CONSTANT_EXT','GL_CONSTANT_ATTENUATION','GL_CONSTANT','GL_COMPILE_AND_EXECUTE','GL_COMPILE','GL_COMBINE_RGB_EXT', + 'GL_COMBINE_RGB','GL_COMBINE_EXT','GL_COMBINE_ALPHA_EXT','GL_COMBINE_ALPHA','GL_COMBINE','GL_COLOR_WRITEMASK', + 'GL_COLOR_TABLE_WIDTH_EXT','GL_COLOR_TABLE_RED_SIZE_EXT','GL_COLOR_TABLE_LUMINANCE_SIZE_EXT','GL_COLOR_TABLE_INTENSITY_SIZE_EXT', + 'GL_COLOR_TABLE_GREEN_SIZE_EXT','GL_COLOR_TABLE_FORMAT_EXT','GL_COLOR_TABLE_BLUE_SIZE_EXT','GL_COLOR_TABLE_ALPHA_SIZE_EXT', + 'GL_COLOR_MATERIAL_PARAMETER','GL_COLOR_MATERIAL_FACE','GL_COLOR_MATERIAL','GL_COLOR_LOGIC_OP','GL_COLOR_INDEXES', + 'GL_COLOR_INDEX8_EXT','GL_COLOR_INDEX4_EXT','GL_COLOR_INDEX2_EXT','GL_COLOR_INDEX1_EXT','GL_COLOR_INDEX16_EXT', + 'GL_COLOR_INDEX12_EXT','GL_COLOR_INDEX','GL_COLOR_CLEAR_VALUE','GL_COLOR_BUFFER_BIT','GL_COLOR_ARRAY_TYPE_EXT', + 'GL_COLOR_ARRAY_TYPE','GL_COLOR_ARRAY_STRIDE_EXT','GL_COLOR_ARRAY_STRIDE','GL_COLOR_ARRAY_SIZE_EXT','GL_COLOR_ARRAY_SIZE', + 'GL_COLOR_ARRAY_POINTER_EXT','GL_COLOR_ARRAY_POINTER','GL_COLOR_ARRAY_EXT','GL_COLOR_ARRAY_COUNT_EXT','GL_COLOR_ARRAY', + 'GL_COLOR','GL_COEFF','GL_CLIP_PLANE5','GL_CLIP_PLANE4','GL_CLIP_PLANE3','GL_CLIP_PLANE2','GL_CLIP_PLANE1','GL_CLIP_PLANE0', + 'GL_CLIENT_VERTEX_ARRAY_BIT','GL_CLIENT_PIXEL_STORE_BIT','GL_CLIENT_ATTRIB_STACK_DEPTH','GL_CLIENT_ALL_ATTRIB_BITS', + 'GL_CLIENT_ACTIVE_TEXTURE_ARB','GL_CLIENT_ACTIVE_TEXTURE','GL_CLEAR','GL_CLAMP','GL_CCW','GL_C4UB_V3F','GL_C4UB_V2F', + 'GL_C4F_N3F_V3F','GL_C3F_V3F','GL_BYTE','GL_BLUE_SCALE','GL_BLUE_BITS','GL_BLUE_BIAS','GL_BLUE','GL_BLEND_SRC','GL_BLEND_DST', + 'GL_BLEND','GL_BITMAP_TOKEN','GL_BITMAP','GL_BGR_EXT','GL_BGRA_EXT','GL_BACK_RIGHT','GL_BACK_LEFT','GL_BACK', + 'GL_AUX_BUFFERS','GL_AUX3','GL_AUX2','GL_AUX1','GL_AUX0','GL_AUTO_NORMAL','GL_ATTRIB_STACK_DEPTH','GL_AND_REVERSE', + 'GL_AND_INVERTED','GL_AND','GL_AMBIENT_AND_DIFFUSE','GL_AMBIENT','GL_ALWAYS','GL_ALPHA_TEST_REF','GL_ALPHA_TEST_FUNC', + 'GL_ALPHA_TEST','GL_ALPHA_SCALE','GL_ALPHA_BITS','GL_ALPHA_BIAS','GL_ALPHA8','GL_ALPHA4','GL_ALPHA16','GL_ALPHA12', + 'GL_ALPHA','GL_ALL_ATTRIB_BITS','GL_ADD_SIGNED_EXT','GL_ADD_SIGNED','GL_ADD','GL_ACTIVE_TEXTURE_ARB','GL_ACTIVE_TEXTURE', + 'GL_ACCUM_RED_BITS','GL_ACCUM_GREEN_BITS','GL_ACCUM_CLEAR_VALUE','GL_ACCUM_BUFFER_BIT','GL_ACCUM_BLUE_BITS','GL_ACCUM_ALPHA_BITS', + 'GL_ACCUM','GL_4_BYTES','GL_4D_COLOR_TEXTURE','GL_3_BYTES','GL_3D_COLOR_TEXTURE','GL_3D_COLOR','GL_3D','GL_2_BYTES', + 'GL_2D','GLU_V_STEP','GLU_VERTEX','GLU_VERSION_1_2','GLU_VERSION_1_1','GLU_VERSION','GLU_U_STEP','GLU_UNKNOWN','GLU_TRUE', + 'GLU_TESS_WINDING_RULE','GLU_TESS_WINDING_POSITIVE','GLU_TESS_WINDING_ODD','GLU_TESS_WINDING_NONZERO','GLU_TESS_WINDING_NEGATIVE', + 'GLU_TESS_WINDING_ABS_GEQ_TWO','GLU_TESS_VERTEX_DATA','GLU_TESS_VERTEX','GLU_TESS_TOLERANCE','GLU_TESS_NEED_COMBINE_CALLBACK','GLU_TESS_MISSING_END_POLYGON', + 'GLU_TESS_MISSING_END_CONTOUR','GLU_TESS_MISSING_BEGIN_POLYGON','GLU_TESS_MISSING_BEGIN_CONTOUR','GLU_TESS_ERROR_DATA', + 'GLU_TESS_ERROR8','GLU_TESS_ERROR7','GLU_TESS_ERROR6','GLU_TESS_ERROR5','GLU_TESS_ERROR4','GLU_TESS_ERROR3','GLU_TESS_ERROR2', + 'GLU_TESS_ERROR1','GLU_TESS_ERROR','GLU_TESS_END_DATA','GLU_TESS_END','GLU_TESS_EDGE_FLAG_DATA','GLU_TESS_EDGE_FLAG', + 'GLU_TESS_COORD_TOO_LARGE','GLU_TESS_COMBINE_DATA','GLU_TESS_COMBINE','GLU_TESS_BOUNDARY_ONLY','GLU_TESS_BEGIN_DATA', + 'GLU_TESS_BEGIN','GLU_SMOOTH','GLU_SILHOUETTE','GLU_SAMPLING_TOLERANCE','GLU_SAMPLING_METHOD','GLU_POINT','GLU_PATH_LENGTH', + 'GLU_PARAMETRIC_TOLERANCE','GLU_PARAMETRIC_ERROR','GLU_OUT_OF_MEMORY','GLU_OUTSIDE','GLU_OUTLINE_POLYGON','GLU_OUTLINE_PATCH', + 'GLU_NURBS_ERROR9','GLU_NURBS_ERROR8','GLU_NURBS_ERROR7','GLU_NURBS_ERROR6','GLU_NURBS_ERROR5','GLU_NURBS_ERROR4', + 'GLU_NURBS_ERROR37','GLU_NURBS_ERROR36','GLU_NURBS_ERROR35','GLU_NURBS_ERROR34','GLU_NURBS_ERROR33','GLU_NURBS_ERROR32', + 'GLU_NURBS_ERROR31','GLU_NURBS_ERROR30','GLU_NURBS_ERROR3','GLU_NURBS_ERROR29','GLU_NURBS_ERROR28','GLU_NURBS_ERROR27','GLU_NURBS_ERROR26', + 'GLU_NURBS_ERROR25','GLU_NURBS_ERROR24','GLU_NURBS_ERROR23','GLU_NURBS_ERROR22','GLU_NURBS_ERROR21','GLU_NURBS_ERROR20', + 'GLU_NURBS_ERROR2','GLU_NURBS_ERROR19','GLU_NURBS_ERROR18','GLU_NURBS_ERROR17','GLU_NURBS_ERROR16','GLU_NURBS_ERROR15','GLU_NURBS_ERROR14', + 'GLU_NURBS_ERROR13','GLU_NURBS_ERROR12','GLU_NURBS_ERROR11','GLU_NURBS_ERROR10','GLU_NURBS_ERROR1','GLU_NONE', + 'GLU_MAP1_TRIM_3','GLU_MAP1_TRIM_2','GLU_LINE','GLU_INVALID_VALUE','GLU_INVALID_ENUM','GLU_INTERIOR','GLU_INSIDE','GLU_INCOMPATIBLE_GL_VERSION', + 'GLU_FLAT','GLU_FILL','GLU_FALSE','GLU_EXTERIOR','GLU_EXTENSIONS','GLU_ERROR','GLU_END','GLU_EDGE_FLAG','GLU_DOMAIN_DISTANCE', + 'GLU_DISPLAY_MODE','GLU_CW','GLU_CULLING','GLU_CCW','GLU_BEGIN','GLU_AUTO_LOAD_MATRIX','CHANNEL_UNORDERED','CHANNEL_ORDERED', + 'CHANNEL_MAX' + ), + 2 => array( + + // Red Lowercase Keywords + + 'WriteWord','WriteString','WriteReal','WriteLine','WriteInt','WriteFloat','WriteDouble','WriteChar','WriteByte', + 'windowwidth','windowheight','waittimer','Vec4','Vec3','Vec2','val','UpdateJoystick','ucase$','Transpose','tickcount', + 'textscroll','textrows','textmode','textcols','tanh','tand','tan','synctimercatchup','synctimer','swapbuffers', + 'str$','stopsoundvoice','stopsounds','stopmusic','sqrt','sqr','sprzorder','spryvel','sprytiles','sprysize','spryrepeat', + 'spryflip','sprycentre','spry','sprxvel','sprxtiles','sprxsize','sprxrepeat','sprxflip','sprxcentre','sprx', + 'sprvisible','sprvel','sprtype','sprtop','sprspin','sprsolid','sprsetzorder','sprsetyvel','sprsetysize','sprsetyrepeat', + 'sprsetyflip','sprsetycentre','sprsety','sprsetxvel','sprsetxsize','sprsetxrepeat','sprsetxflip','sprsetxcentre', + 'sprsetx','sprsetvisible','sprsetvel','sprsettiles','sprsettextures','sprsettexture','sprsetspin','sprsetsolid', + 'sprsetsize','sprsetscale','sprsetpos','sprsetparallax','sprsetframe','sprsetcolor','sprsetanimspeed','sprsetanimloop', + 'sprsetangle','sprsetalpha','sprscale','sprright','sprpos','sprparallax','sprleft','spriteareawidth','spriteareaheight', + 'sprframe','sprcolor','sprcameraz','sprcameray','sprcamerax','sprcamerasetz','sprcamerasety','sprcamerasetx', + 'sprcamerasetpos','sprcamerasetfov','sprcamerasetangle','sprcamerapos','sprcamerafov','sprcameraangle', + 'sprbottom','spranimspeed','spranimloop','spranimdone','sprangle','spralpha','spraddtextures','spraddtexture', + 'sounderror','sleep','sind','sin','showcursor','sgn','settextscroll','setmusicvolume','SendMessage','Seek', + 'scankeydown','RTInvert','rnd','right$','resizetext','resizespritearea','RejectConnection','ReceiveMessage','ReadWord', + 'ReadText','ReadReal','ReadLine','ReadInt','ReadFloat','ReadDouble','ReadChar','ReadByte','randomize','printr', + 'print','pow','playsound','playmusic','performancecounter','Orthonormalize','OpenFileWrite','OpenFileRead','Normalize', + 'newtilemap','newsprite','NewServer','NewConnection','musicplaying','mouse_yd','mouse_y','mouse_xd','mouse_x', + 'mouse_wheel','mouse_button','mid$','MessageSmoothed','MessageReliable','MessagePending','MessageChannel','maxtextureunits', + 'MatrixZero','MatrixTranslate','MatrixScale','MatrixRotateZ','MatrixRotateY','MatrixRotateX','MatrixRotate','MatrixIdentity', + 'MatrixCrossProduct','MatrixBasis','log','locate','loadtexture','loadsound','loadmipmaptexture','loadmipmapimagestrip', + 'loadimagestrip','loadimage','Length','len','left$','lcase$','keydown','Joy_Y','Joy_X','Joy_Up','Joy_Right','Joy_Left', + 'Joy_Keys','Joy_Down','Joy_Button','Joy_3','Joy_2','Joy_1','Joy_0','int','inscankey','input$','inkey$','inittimer', + 'imagewidth','imagestripframes','imageheight','imageformat','imagedatatype','hidecursor','glViewport','glVertex4sv', + 'glVertex4s','glVertex4iv','glVertex4i','glVertex4fv','glVertex4f','glVertex4dv','glVertex4d','glVertex3sv','glVertex3s', + 'glVertex3iv','glVertex3i','glVertex3fv','glVertex3f','glVertex3dv','glVertex3d','glVertex2sv','glVertex2s','glVertex2iv', + 'glVertex2i','glVertex2fv','glVertex2f','glVertex2dv','glVertex2d','gluPerspective','gluOrtho2D','gluLookAt', + 'glubuild2dmipmaps','glTranslatef','glTranslated','gltexsubimage2d','glTexParameteriv','glTexParameteri', + 'glTexParameterfv','glTexParameterf','glteximage2d','glTexGeniv','glTexGeni','glTexGenfv','glTexGenf','glTexGendv', + 'glTexGend','glTexEnviv','glTexEnvi','glTexEnvfv','glTexEnvf','glTexCoord4sv','glTexCoord4s','glTexCoord4iv','glTexCoord4i', + 'glTexCoord4fv','glTexCoord4f','glTexCoord4dv','glTexCoord4d','glTexCoord3sv','glTexCoord3s','glTexCoord3iv','glTexCoord3i', + 'glTexCoord3fv','glTexCoord3f','glTexCoord3dv','glTexCoord3d','glTexCoord2sv','glTexCoord2s','glTexCoord2iv','glTexCoord2i', + 'glTexCoord2fv','glTexCoord2f','glTexCoord2dv','glTexCoord2d','glTexCoord1sv','glTexCoord1s','glTexCoord1iv','glTexCoord1i','glTexCoord1fv', + 'glTexCoord1f','glTexCoord1dv','glTexCoord1d','glStencilOp','glStencilMask','glStencilFunc','glShadeModel','glSelectBuffer', + 'glScissor','glScalef','glScaled','glRotatef','glRotated','glRenderMode','glRectsv','glRects','glRectiv','glRecti', + 'glRectfv','glRectf','glRectdv','glRectd','glReadBuffer','glRasterPos4sv','glRasterPos4s','glRasterPos4iv', + 'glRasterPos4i','glRasterPos4fv','glRasterPos4f','glRasterPos4dv','glRasterPos4d','glRasterPos3sv','glRasterPos3s', + 'glRasterPos3iv','glRasterPos3i','glRasterPos3fv','glRasterPos3f','glRasterPos3dv','glRasterPos3d','glRasterPos2sv', + 'glRasterPos2s','glRasterPos2iv','glRasterPos2i','glRasterPos2fv','glRasterPos2f','glRasterPos2dv','glRasterPos2d', + 'glPushName','glPushMatrix','glPushClientAttrib','glPushAttrib','glPrioritizeTextures','glPopName','glPopMatrix', + 'glPopClientAttrib','glPopAttrib','glpolygonstipple','glPolygonOffset','glPolygonMode','glPointSize','glPixelZoom', + 'glPixelTransferi','glPixelTransferf','glPixelStorei','glPixelStoref','glPassThrough','glOrtho','glNormal3sv','glNormal3s', + 'glNormal3iv','glNormal3i','glNormal3fv','glNormal3f','glNormal3dv','glNormal3d','glNormal3bv','glNormal3b','glNewList', + 'glMultMatrixf','glMultMatrixd','glmultitexcoord2f','glmultitexcoord2d','glMatrixMode','glMaterialiv','glMateriali', + 'glMaterialfv','glMaterialf','glMapGrid2f','glMapGrid2d','glMapGrid1f','glMapGrid1d','glLogicOp','glLoadName','glLoadMatrixf', + 'glLoadMatrixd','glLoadIdentity','glListBase','glLineWidth','glLineStipple','glLightModeliv','glLightModeli','glLightModelfv', + 'glLightModelf','glLightiv','glLighti','glLightfv','glLightf','glIsTexture','glIsList','glIsEnabled','glInitNames', + 'glIndexubv','glIndexub','glIndexsv','glIndexs','glIndexMask','glIndexiv','glIndexi','glIndexfv','glIndexf','glIndexdv', + 'glIndexd','glHint','glGetTexParameteriv','glGetTexParameterfv','glGetTexLevelParameteriv','glGetTexLevelParameterfv', + 'glGetTexGeniv','glGetTexGenfv','glGetTexGendv','glGetTexEnviv','glGetTexEnvfv','glgetstring','glgetpolygonstipple','glGetPixelMapuiv', + 'glGetMaterialiv','glGetMaterialfv','glGetLightiv','glGetLightfv','glGetIntegerv','glGetFloatv', + 'glGetError','glGetDoublev','glGetClipPlane','glGetBooleanv','glgentextures','glgentexture', + 'glgenlists','glFrustum','glFrontFace','glFogiv','glFogi','glFogfv','glFogf','glFlush','glFinish','glFeedbackBuffer', + 'glEvalPoint2','glEvalPoint1','glEvalMesh2','glEvalMesh1','glEvalCoord2fv','glEvalCoord2f','glEvalCoord2dv','glEvalCoord2d', + 'glEvalCoord1fv','glEvalCoord1f','glEvalCoord1dv','glEvalCoord1d','glEndList','glEnd','glEnableClientState','glEnable', + 'glEdgeFlagv','glEdgeFlag','glDrawBuffer','glDrawArrays','glDisableClientState','glDisable','glDepthRange','glDepthMask', + 'glDepthFunc','gldeletetextures','gldeletetexture','gldeletelists','glCullFace','glCopyTexSubImage2D','glCopyTexSubImage1D', + 'glCopyTexImage2D','glCopyTexImage1D','glColorMaterial','glColorMask','glColor4usv','glColor4us','glColor4uiv','glColor4ui', + 'glColor4ubv','glColor4ub','glColor4sv','glColor4s','glColor4iv','glColor4i','glColor4fv','glColor4f','glColor4dv', + 'glColor4d','glColor4bv','glColor4b','glColor3usv','glColor3us','glColor3uiv','glColor3ui','glColor3ubv','glColor3ub', + 'glColor3sv','glColor3s','glColor3iv','glColor3i','glColor3fv','glColor3f','glColor3dv','glColor3d','glColor3bv', + 'glColor3b','glClipPlane','glClearStencil','glClearIndex','glClearDepth','glClearColor','glClearAccum','glClear', + 'glcalllists','glCallList','glBlendFunc','glBindTexture','glBegin','glArrayElement','glAreTexturesResident', + 'glAlphaFunc','glactivetexture','glAccum','font','FindNextFile','FindFirstFile','FindClose','FileError', + 'extensionsupported','exp','execute','EndOfFile','drawtext','divbyzero','Determinant','deletesprite','deletesound', + 'DeleteServer','deleteimage','DeleteConnection','defaultfont','CrossProduct','cosd','cos','copysprite','ConnectionPending', + 'ConnectionHandShaking','ConnectionConnected','ConnectionAddress','compilererrorline','compilererrorcol','compilererror', + 'compilefile','compile','color','cls','CloseFile','clearregion','clearline','clearkeys','chr$','charat$','bindsprite', + 'beep','atnd','atn2d','atn2','atn','atand','asc','argcount','arg','animatesprites','AcceptConnection','abs' + ), + 3 => array( + + // Blue Lowercase Keywords + + 'xor','while','wend','until','type','traditional_print','traditional','to','then','struc','string','step','single', + 'run','return','reset','read','or','null','not','next','lor','loop','language','land','integer','input','if', + 'goto','gosub','for','endstruc','endif','end','elseif','else','double','do','dim','data','const','basic4gl','as', + 'and','alloc' + ) + + ), + 'SYMBOLS' => array( + '=', '<', '>', '>=', '<=', '+', '-', '*', '/', '%', '(', ')', '{', '}', '[', ']', '&', ';', ':', '$' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000080; font-weight: bold;', + 2 => 'color: #FF0000;', + 3 => 'color: #0000FF;' + ), + 'COMMENTS' => array( + 1 => 'color: #657CC4; font-style: italic;' + ), + 'BRACKETS' => array( + 0 => 'color: #000080;' + ), + 'STRINGS' => array( + 0 => 'color: #008000;' + ), + 'NUMBERS' => array( + 0 => 'color: #000080; font-weight: bold;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #0000FF;' + ), + 'ESCAPE_CHAR' => array( + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); diff --git a/vendor/easybook/geshi/geshi/batch.php b/vendor/easybook/geshi/geshi/batch.php new file mode 100644 index 0000000000..7d1ca635ba --- /dev/null +++ b/vendor/easybook/geshi/geshi/batch.php @@ -0,0 +1,138 @@ + 'Windows Batch file', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array(), + 'COMMENT_REGEXP' => array( + 100 => '/(?:^|[&|])\\s*(?:rem|::)[^\\n]*/msi', + 101 => '/[\\/-]\\S*/si', + 102 => '/^\s*:[^:]\\S*/msi', + 103 => '/(?:([%!])[^"\'~ ][^"\' ]*\\1|%%?(?:~[dpnxsatz]*)?[^"\'])/si' + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'ESCAPE_REGEXP' => array( + 100 => '/(?:([%!])\\S+\\1|%%(?:~[dpnxsatz]*)?[^"\'])/si' + ), + 'KEYWORDS' => array( + 1 => array( + 'echo', 'set', 'for', 'if', 'exit', 'else', 'do', 'not', 'defined', 'exist' + ), + 2 => array( + "ASSOC", "ATTRIB", "BREAK", "BCDEDIT", "CACLS", "CD", + "CHCP", "CHDIR", "CHKDSK", "CHKNTFS", "CLS", "CMD", "COLOR", + "COMP", "COMPACT", "CONVERT", "COPY", "DATE", "DEL", "DIR", + "DISKCOMP", "DISKCOPY", "DISKPART", "DOSKEY", "DRIVERQUERY", "ECHO", "ENDLOCAL", + "ERASE", "EXIT", "FC", "FIND", "FINDSTR", "FOR", "FORMAT", + "FSUTIL", "FTYPE", "GPRESULT", "GRAFTABL", "HELP", "ICACLS", + "IF", "LABEL", "MD", "MKDIR", "MKLINK", "MODE", "MORE", + "MOVE", "OPENFILES", "PATH", "PAUSE", "POPD", "PRINT", "PROMPT", + "PUSHD", "RD", "RECOVER", "REN", "RENAME", "REPLACE", "RMDIR", + "ROBOCOPY", "SET", "SETLOCAL", "SC", "SCHTASKS", "SHIFT", "SHUTDOWN", + "SORT", "START", "SUBST", "SYSTEMINFO", "TASKLIST", "TASKKILL", "TIME", + "TITLE", "TREE", "TYPE", "VER", "VERIFY", "VOL", "XCOPY", + "WMIC", "CSCRIPT" + ), + 3 => array( + "enabledelayedexpansion", "enableextensions" + ) + ), + 'SYMBOLS' => array( + '(', ')', '+', '-', '~', '^', '@', '&', '*', '|', '/', '<', '>' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #800080; font-weight: bold;', + 2 => 'color: #0080FF; font-weight: bold;', + 3 => 'color: #0000FF; font-weight: bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #888888;', + 2 => 'color: #FF1010; font-weight: bold;', + 101 => 'color: #44aa44; font-weight: bold;', + 100 => 'color: #888888;', + 102 => 'color: #990000; font-weight: bold;', + 103 => 'color: #000099; font-weight: bold;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 100 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66; font-weight: bold;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;', + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 0 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #44aa44; font-weight: bold;' + ), + 'REGEXPS' => array( + 0 => 'color: #990000; font-weight: bold', + 1 => 'color: #800080; font-weight: bold;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array(), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array(), + 'REGEXPS' => array( + 0 => array( + GESHI_SEARCH => "((?:goto|call)\\s*)(\\S+)", + GESHI_REPLACE => "\\2", + GESHI_BEFORE => "\\1", + GESHI_MODIFIERS => "si", + GESHI_AFTER => "" + ) , + 1 => "goto|call" + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); diff --git a/vendor/easybook/geshi/geshi/bf.php b/vendor/easybook/geshi/geshi/bf.php new file mode 100644 index 0000000000..be95bc7755 --- /dev/null +++ b/vendor/easybook/geshi/geshi/bf.php @@ -0,0 +1,114 @@ + 'Brainfuck', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array(), + 'COMMENT_REGEXP' => array(1 => '/[^\n+\-<>\[\]\.\,Y]+/s'), + 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, + 'QUOTEMARKS' => array(), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + ), + 'SYMBOLS' => array( + 0 => array('+', '-'), + 1 => array('[', ']'), + 2 => array('<', '>'), + 3 => array('.', ','), + 4 => array('Y') //Brainfork Extension ;-) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;' + ), + 'BRACKETS' => array( + 0 => 'color: #660000;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #006600;', + 1 => 'color: #660000;', + 2 => 'color: #000066;', + 3 => 'color: #666600;', + 4 => 'color: #660066;' + ), + 'ESCAPE_CHAR' => array( + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'ENABLE_FLAGS' => array( + 'STRINGS' => GESHI_NEVER, + 'NUMBERS' => GESHI_NEVER, + 'BRACKETS' => GESHI_NEVER + ), + 'KEYWORDS' => array( + 'DISALLOW_BEFORE' => '', + 'DISALLOW_AFTER' => '' + ) + ) +); + diff --git a/vendor/easybook/geshi/geshi/bibtex.php b/vendor/easybook/geshi/geshi/bibtex.php new file mode 100644 index 0000000000..862c637f6d --- /dev/null +++ b/vendor/easybook/geshi/geshi/bibtex.php @@ -0,0 +1,182 @@ + 'BibTeX', + 'OOLANG' => false, + 'COMMENT_SINGLE' => array( + 1 => '%%' + ), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array(), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 0 => array( + '@comment','@preamble','@string' + ), + // Standard entry types + 1 => array( + '@article','@book','@booklet','@conference','@inbook', + '@incollection','@inproceedings','@manual','@mastersthesis', + '@misc','@phdthesis','@proceedings','@techreport','@unpublished' + ), + // Custom entry types + 2 => array( + '@collection','@patent','@webpage' + ), + // Standard entry field names + 3 => array( + 'address','annote','author','booktitle','chapter','crossref', + 'edition','editor','howpublished','institution','journal','key', + 'month','note','number','organization','pages','publisher','school', + 'series','title','type','volume','year' + ), + // Custom entry field names + 4 => array( + 'abstract','affiliation','chaptername','cited-by','cites', + 'contents','copyright','date-added','date-modified','doi','eprint', + 'isbn','issn','keywords','language','lccn','lib-congress', + 'location','price','rating','read','size','source','url' + ) + ), + 'URLS' => array( + 0 => '', + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'SYMBOLS' => array( + '{', '}', '#', '=', ',' + ), + 'CASE_SENSITIVE' => array( + 1 => false, + 2 => false, + 3 => false, + 4 => false, + GESHI_COMMENTS => false, + ), + // Define the colors for the groups listed above + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #C02020;', // Standard entry types + 2 => 'color: #C02020;', // Custom entry types + 3 => 'color: #C08020;', // Standard entry field names + 4 => 'color: #C08020;' // Custom entry field names + ), + 'COMMENTS' => array( + 1 => 'color: #2C922C; font-style: italic;' + ), + 'STRINGS' => array( + 0 => 'color: #2020C0;' + ), + 'SYMBOLS' => array( + 0 => 'color: #E02020;' + ), + 'REGEXPS' => array( + 1 => 'color: #2020C0;', // {...} + 2 => 'color: #C08020;', // BibDesk fields + 3 => 'color: #800000;' // LaTeX commands + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000000; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #E02020;' + ), + 'NUMBERS' => array( + ), + 'METHODS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'REGEXPS' => array( + // {parameters} + 1 => array( + GESHI_SEARCH => "(?<=\\{)(?:\\{(?R)\\}|[^\\{\\}])*(?=\\})", + GESHI_REPLACE => '\0', + GESHI_MODIFIERS => 's', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + 2 => array( + GESHI_SEARCH => "\bBdsk-(File|Url)-\d+", + GESHI_REPLACE => '\0', + GESHI_MODIFIERS => 'Us', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + 3 => array( + GESHI_SEARCH => "\\\\[A-Za-z0-9]*+", + GESHI_REPLACE => '\0', + GESHI_MODIFIERS => 'Us', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'OBJECT_SPLITTERS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'PARSER_CONTROL' => array( + 'ENABLE_FLAGS' => array( + 'NUMBERS' => GESHI_NEVER + ), + 'KEYWORDS' => array( + 3 => array( + 'DISALLOWED_AFTER' => '(?=\s*=)' + ), + 4 => array( + 'DISALLOWED_AFTER' => '(?=\s*=)' + ), + ) + ) +); + diff --git a/vendor/easybook/geshi/geshi/blitzbasic.php b/vendor/easybook/geshi/geshi/blitzbasic.php new file mode 100644 index 0000000000..c90f45bfa9 --- /dev/null +++ b/vendor/easybook/geshi/geshi/blitzbasic.php @@ -0,0 +1,183 @@ + 'BlitzBasic', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'If','EndIf','ElseIf','Else','While','Wend','Return','Next','Include','End Type','End Select','End If','End Function','End','Select', + 'Type','Forever','For','Or','And','AppTitle','Case','Goto','Gosub','Step','Stop','Int','Last','False','Then','To','True','Until','Float', + 'String','Before','Not' + ), + 2 => array( + // All Functions - 2D BB and 3D BB + 'Xor','WriteString','WriteShort','WritePixelFast','WritePixel','WriteLine','WriteInt','WriteFloat','WriteFile','WriteBytes', + 'WriteByte','Write','WaitTimer','WaitMouse','WaitKey','WaitJoy','VWait','Viewport', + 'Upper','UpdateGamma','UnlockBuffer','UDPTimeouts','UDPStreamPort','UDPStreamIP','UDPMsgPort','UDPMsgIP', + 'Trim','TotalVidMem','TileImage','TileBlock','TFormImage','TFormFilter','Text', + 'TCPTimeouts','TCPStreamPort','TCPStreamIP','Tan','SystemProperty','StringWidth','StringHeight','Str','StopNetGame', + 'StopChannel','StartNetGame','Sqr','SoundVolume','SoundPitch','SoundPan','Sin','Shr', + 'ShowPointer','Shl','Sgn','SetGfxDriver','SetGamma','SetFont','SetEnv','SetBuffer','SendUDPMsg','SendNetMsg', + 'SeekFile','SeedRnd','ScanLine','ScaleImage','SaveImage','SaveBuffer','Sar','RuntimeError','RSet', + 'RotateImage','RndSeed','Rnd','Right','ResumeChannel','Restore','ResizeImage','ResizeBank','Replace', + 'Repeat','RecvUDPMsg','RecvNetMsg','RectsOverlap','Rect','ReadString','ReadShort','ReadPixelFast','ReadPixel','ReadLine', + 'ReadInt','ReadFloat','ReadFile','ReadDir','ReadBytes','ReadByte','ReadAvail','Read','Rand','Print', + 'PokeShort','PokeInt','PokeFloat','PokeByte','Plot','PlaySound','PlayMusic','PlayCDTrack','Pi','PeekShort', + 'PeekInt','PeekFloat','PeekByte','PauseChannel','Oval','Origin','OpenTCPStream','OpenMovie','OpenFile', + 'Null','NextFile','New','NetPlayerName','NetPlayerLocal','NetMsgType','NetMsgTo','NetMsgFrom', + 'NetMsgData','MovieWidth','MoviePlaying','MovieHeight','MoveMouse','MouseZSpeed','MouseZ','MouseYSpeed','MouseY','MouseXSpeed', + 'MouseX','MouseHit','MouseDown','Mod','Millisecs','MidHandle','Mid','MaskImage','LSet','Lower', + 'LoopSound','Log10','Log','LockBuffer','Locate','Local','LoadSound','LoadImage','LoadFont','LoadBuffer', + 'LoadAnimImage','Line','Len','Left','KeyHit','KeyDown','JoyZDir','JoyZ','JoyYDir', + 'JoyYaw','JoyY','JoyXDir','JoyX','JoyVDir','JoyV','JoyUDir','JoyU','JoyType','JoyRoll', + 'JoyPitch','JoyHit','JoyHat','JoyDown','JoinNetGame','Instr','Insert','Input', + 'ImageYHandle','ImageXHandle','ImageWidth','ImagesOverlap','ImagesCollide','ImageRectOverlap','ImageRectCollide','ImageHeight','ImageBuffer', + 'HostNetGame','HostIP','HidePointer','Hex','HandleImage','GraphicsWidth','GraphicsHeight','GraphicsDepth','GraphicsBuffer','Graphics', + 'GrabImage','Global','GFXModeWidth','GFXModeHeight','GfxModeExists','GFXModeDepth','GfxDriverName','GetMouse', + 'GetKey','GetJoy','GetEnv','GetColor','GammaRed','GammaGreen','GammaBlue','Function','FrontBuffer','FreeTimer', + 'FreeSound','FreeImage','FreeFont','FreeBank','FontWidth','FontHeight','FlushMouse','FlushKeys', + 'FlushJoy','Floor','Flip','First','FileType','FileSize','FilePos','Field', + 'Exp','Exit','ExecFile','Eof','EndGraphics','Each','DrawMovie','DrawImageRect','DrawImage','DrawBlockRect','DrawBlock', + 'DottedIP','Dim','DeleteNetPlayer','DeleteFile','DeleteDir','Delete','Delay','Default','DebugLog','Data', + 'CurrentTime','CurrentDir','CurrentDate','CreateUDPStream','CreateTimer','CreateTCPServer','CreateNetPlayer','CreateImage','CreateDir','CreateBank', + 'CountHostIPs','CountGFXModes','CountGfxDrivers','Cos','CopyStream','CopyRect','CopyPixelFast','CopyPixel','CopyImage','CopyFile', + 'CopyBank','Const','CommandLine','ColorRed','ColorGreen','ColorBlue','Color','ClsColor','Cls','CloseUDPStream', + 'CloseTCPStream','CloseTCPServer','CloseMovie','CloseFile','CloseDir','Chr','ChannelVolume','ChannelPlaying','ChannelPitch','ChannelPan', + 'ChangeDir','Ceil','CallDLL','Bin','BankSize','BackBuffer','AvailVidMem','AutoMidHandle', + 'ATan2','ATan','ASin','Asc','After','ACos','AcceptTCPStream','Abs', + // 3D Commands + 'Wireframe','Windowed3D','WBuffer','VertexZ','VertexY', + 'VertexX','VertexW','VertexV','VertexU','VertexTexCoords','VertexRed','VertexNZ','VertexNY','VertexNX','VertexNormal', + 'VertexGreen','VertexCoords','VertexColor','VertexBlue','VertexAlpha','VectorYaw','VectorPitch','UpdateWorld','UpdateNormals','TurnEntity', + 'TrisRendered','TriangleVertex','TranslateEntity','TFormVector','TFormPoint','TFormNormal','TFormedZ','TFormedY','TFormedX','TextureWidth', + 'TextureName','TextureHeight','TextureFilter','TextureCoords','TextureBuffer','TextureBlend','TerrainZ','TerrainY','TerrainX','TerrainSize', + 'TerrainShading','TerrainHeight','TerrainDetail','SpriteViewMode','ShowEntity','SetCubeFace','SetAnimTime','SetAnimKey','ScaleTexture','ScaleSprite', + 'ScaleMesh','ScaleEntity','RotateTexture','RotateSprite','RotateMesh','RotateEntity','ResetEntity','RenderWorld','ProjectedZ','ProjectedY', + 'ProjectedX','PositionTexture','PositionMesh','PositionEntity','PointEntity','PickedZ','PickedY','PickedX','PickedTriangle','PickedTime', + 'PickedSurface','PickedNZ','PickedNY','PickedNX','PickedEntity','PaintSurface','PaintMesh','PaintEntity','NameEntity','MoveEntity', + 'ModifyTerrain','MeshWidth','MeshHeight','MeshesIntersect','MeshDepth','MD2AnimTime','MD2AnimLength','MD2Animating','LoadTexture','LoadTerrain', + 'LoadSprite','LoadMesh','LoadMD2','LoaderMatrix','LoadBSP','LoadBrush','LoadAnimTexture','LoadAnimSeq','LoadAnimMesh','Load3DSound', + 'LinePick','LightRange','LightMesh','LightConeAngles','LightColor','HWMultiTex','HideEntity','HandleSprite','Graphics3D','GfxMode3DExists', + 'GfxMode3D','GfxDriverCaps3D','GfxDriver3D','GetSurfaceBrush','GetSurface','GetParent','GetMatElement','GetEntityType','GetEntityBrush','GetChild', + 'GetBrushTexture','FreeTexture','FreeEntity','FreeBrush','FlipMesh','FitMesh','FindSurface','FindChild','ExtractAnimSeq','EntityZ', + 'EntityYaw','EntityY','EntityX','EntityVisible','EntityType','EntityTexture','EntityShininess','EntityRoll','EntityRadius','EntityPitch', + 'EntityPickMode','EntityPick','EntityParent','EntityOrder','EntityName','EntityInView','EntityFX','EntityDistance','EntityColor','EntityCollided', + 'EntityBox','EntityBlend','EntityAutoFade','EntityAlpha','EmitSound','Dither','DeltaYaw','DeltaPitch','CreateTexture','CreateTerrain', + 'CreateSurface','CreateSprite','CreateSphere','CreatePlane','CreatePivot','CreateMirror','CreateMesh','CreateListener','CreateLight','CreateCylinder', + 'CreateCube','CreateCone','CreateCamera','CreateBrush','CountVertices','CountTriangles','CountSurfaces','CountGfxModes3D','CountCollisions','CountChildren', + 'CopyMesh','CopyEntity','CollisionZ','CollisionY','CollisionX','CollisionTriangle','CollisionTime','CollisionSurface','Collisions','CollisionNZ', + 'CollisionNY','CollisionNX','CollisionEntity','ClearWorld','ClearTextureFilters','ClearSurface','ClearCollisions','CaptureWorld','CameraZoom','CameraViewport', + 'CameraRange','CameraProjMode','CameraProject','CameraPick','CameraFogRange','CameraFogMode','CameraFogColor','CameraClsMode','CameraClsColor','BSPLighting', + 'BSPAmbientLight','BrushTexture','BrushShininess','BrushFX','BrushColor','BrushBlend','BrushAlpha','AntiAlias','AnimTime','AnimSeq', + 'AnimLength','Animating','AnimateMD2','Animate','AmbientLight','AlignToVector','AddVertex','AddTriangle','AddMesh','AddAnimSeq', + ) + ), + 'SYMBOLS' => array( + '(',')' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000066; font-weight: bold;', + 2 => 'color: #0000ff;' + ), + 'COMMENTS' => array( + 1 => 'color: #D9D100; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000066;' + ), + 'STRINGS' => array( + 0 => 'color: #009900;' + ), + 'NUMBERS' => array( + 0 => 'color: #CC0000;' + ), + 'METHODS' => array( + 1 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #000066;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + ) + ), + 'URLS' => array( + 1 => '', + 2 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + 1 => '\\' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => false, + 1 => false + ) +); diff --git a/vendor/easybook/geshi/geshi/bnf.php b/vendor/easybook/geshi/geshi/bnf.php new file mode 100644 index 0000000000..0bf95f1653 --- /dev/null +++ b/vendor/easybook/geshi/geshi/bnf.php @@ -0,0 +1,118 @@ + 'bnf', + 'COMMENT_SINGLE' => array(';'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"', "'"), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array(), + 'SYMBOLS' => array( + 0 => array('(', ')'), + 1 => array('<', '>'), + 2 => array('[', ']'), + 3 => array('{', '}'), + 4 => array('=', '*', '/', '|', ':'), + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false + ), + 'STYLES' => array( + 'KEYWORDS' => array(), + 'COMMENTS' => array( + 0 => 'color: #666666; font-style: italic;', // Single Line comments + ), + 'ESCAPE_CHAR' => array( + 0 => '' + ), + 'BRACKETS' => array( + 0 => '' + ), + 'STRINGS' => array( + 0 => 'color: #a00;', + 1 => 'color: #a00;' + ), + 'NUMBERS' => array( + 0 => '' + ), + 'METHODS' => array( + 0 => '' + ), + 'SYMBOLS' => array( + 0 => 'color: #000066; font-weight: bold;', // Round brackets + 1 => 'color: #000066; font-weight: bold;', // Angel Brackets + 2 => 'color: #000066; font-weight: bold;', // Square Brackets + 3 => 'color: #000066; font-weight: bold;', // BRaces + 4 => 'color: #006600; font-weight: bold;', // Other operator symbols + ), + 'REGEXPS' => array( + 0 => 'color: #007;', + ), + 'SCRIPT' => array( + 0 => '' + ) + ), + 'URLS' => array(), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array(), + 'REGEXPS' => array( + //terminal symbols + 0 => array( + GESHI_SEARCH => '(<)([^&]+?)(>)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3' + ), + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + diff --git a/vendor/easybook/geshi/geshi/boo.php b/vendor/easybook/geshi/geshi/boo.php new file mode 100644 index 0000000000..15944f42a0 --- /dev/null +++ b/vendor/easybook/geshi/geshi/boo.php @@ -0,0 +1,215 @@ + 'Boo', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'''", "'", '"""', '"'), + 'HARDQUOTE' => array('"""', '"""'), + 'HARDESCAPE' => array('\"""'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array(//Namespace + 'namespace', 'import', 'from' + ), + 2 => array(//Jump + 'yield', 'return', 'goto', 'continue', 'break' + ), + 3 => array(//Conditional + 'while', 'unless', 'then', 'in', 'if', 'for', 'else', 'elif' + ), + 4 => array(//Property + 'set', 'get' + ), + 5 => array(//Exception + 'try', 'raise', 'failure', 'except', 'ensure' + ), + 6 => array(//Visibility + 'public', 'private', 'protected', 'internal' + ), + 7 => array(//Define + 'struct', 'ref', 'of', 'interface', 'event', 'enum', 'do', 'destructor', 'def', 'constructor', 'class' + ), + 8 => array(//Cast + 'typeof', 'cast', 'as' + ), + 9 => array(//BiMacro + 'yieldAll', 'using', 'unchecked', 'rawArayIndexing', 'print', 'normalArrayIndexing', 'lock', + 'debug', 'checked', 'assert' + ), + 10 => array(//BiAttr + 'required', 'property', 'meta', 'getter', 'default' + ), + 11 => array(//BiFunc + 'zip', 'shellp', 'shellm', 'shell', 'reversed', 'range', 'prompt', + 'matrix', 'map', 'len', 'join', 'iterator', 'gets', 'enumerate', 'cat', 'array' + ), + 12 => array(//HiFunc + '__switch__', '__initobj__', '__eval__', '__addressof__', 'quack' + ), + 13 => array(//Primitive + 'void', 'ushort', 'ulong', 'uint', 'true', 'timespan', 'string', 'single', + 'short', 'sbyte', 'regex', 'object', 'null', 'long', 'int', 'false', 'duck', + 'double', 'decimal', 'date', 'char', 'callable', 'byte', 'bool' + ), + 14 => array(//Operator + 'not', 'or', 'and', 'is', 'isa', + ), + 15 => array(//Modifier + 'virtual', 'transient', 'static', 'partial', 'override', 'final', 'abstract' + ), + 16 => array(//Access + 'super', 'self' + ), + 17 => array(//Pass + 'pass' + ) + ), + 'SYMBOLS' => array( + '[|', '|]', '${', '(', ')', '[', ']', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>', '+', '-', ';' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true, + 9 => true, + 10 => true, + 11 => true, + 12 => true, + 13 => true, + 14 => true, + 15 => true, + 16 => true, + 17 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color:green;font-weight:bold;', + 2 => 'color:navy;', + 3 => 'color:blue;font-weight:bold;', + 4 => 'color:#8B4513;', + 5 => 'color:teal;font-weight:bold;', + 6 => 'color:blue;font-weight:bold;', + 7 => 'color:blue;font-weight:bold;', + 8 => 'color:blue;font-weight:bold;', + 9 => 'color:maroon;', + 10 => 'color:maroon;', + 11 => 'color:purple;', + 12 => 'color:#4B0082;', + 13 => 'color:purple;font-weight:bold;', + 14 => 'color:#008B8B;font-weight:bold;', + 15 => 'color:brown;', + 16 => 'color:black;font-weight:bold;', + 17 => 'color:gray;' + ), + 'COMMENTS' => array( + 1 => 'color: #999999; font-style: italic;', + 2 => 'color: #999999; font-style: italic;', + 'MULTI' => 'color: #008000; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #0000FF; font-weight: bold;', + 'HARD' => 'color: #0000FF; font-weight: bold;', + ), + 'BRACKETS' => array( + 0 => 'color: #006400;' + ), + 'STRINGS' => array( + 0 => 'color: #008000;', + 'HARD' => 'color: #008000;' + ), + 'NUMBERS' => array( + 0 => 'color: #00008B;' + ), + 'METHODS' => array( + 0 => 'color: 000000;', + 1 => 'color: 000000;' + ), + 'SYMBOLS' => array( + 0 => 'color: #006400;' + ), + 'REGEXPS' => array( + #0 => 'color: #0066ff;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + 8 => '', + 9 => '', + 10 => '', + 11 => '', + 12 => '', + 13 => '', + 14 => '', + 15 => '', + 16 => '', + 17 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 0 => '.', + 1 => '::' + ), + 'REGEXPS' => array( + #0 => '%(@)?\/(?:(?(1)[^\/\\\\\r\n]+|[^\/\\\\\r\n \t]+)|\\\\[\/\\\\\w+()|.*?$^[\]{}\d])+\/%' + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); diff --git a/vendor/easybook/geshi/geshi/c.php b/vendor/easybook/geshi/geshi/c.php new file mode 100644 index 0000000000..ce8e9b7704 --- /dev/null +++ b/vendor/easybook/geshi/geshi/c.php @@ -0,0 +1,280 @@ + 'C', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array( + //Multiline-continued single-line comments + 1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m', + //Multiline-continued preprocessor define + 2 => '/#(?:\\\\\\\\|\\\\\\n|.)*$/m' + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'ESCAPE_REGEXP' => array( + //Simple Single Char Escapes + 1 => "#\\\\[\\\\abfnrtv\'\"?\n]#i", + //Hexadecimal Char Specs + 2 => "#\\\\x[\da-fA-F]{2}#", + //Hexadecimal Char Specs + 3 => "#\\\\u[\da-fA-F]{4}#", + //Hexadecimal Char Specs + 4 => "#\\\\U[\da-fA-F]{8}#", + //Octal Char Specs + 5 => "#\\\\[0-7]{1,3}#" + ), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B | + GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI | + GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO, + 'KEYWORDS' => array( + 1 => array( + 'if', 'return', 'while', 'case', 'continue', 'default', + 'do', 'else', 'for', 'switch', 'goto' + ), + 2 => array( + 'null', 'false', 'break', 'true', 'function', 'enum', 'extern', 'inline' + ), + 3 => array( + // assert.h + 'assert', + + //complex.h + 'cabs', 'cacos', 'cacosh', 'carg', 'casin', 'casinh', 'catan', + 'catanh', 'ccos', 'ccosh', 'cexp', 'cimag', 'cis', 'clog', 'conj', + 'cpow', 'cproj', 'creal', 'csin', 'csinh', 'csqrt', 'ctan', 'ctanh', + + //ctype.h + 'digittoint', 'isalnum', 'isalpha', 'isascii', 'isblank', 'iscntrl', + 'isdigit', 'isgraph', 'islower', 'isprint', 'ispunct', 'isspace', + 'isupper', 'isxdigit', 'toascii', 'tolower', 'toupper', + + //inttypes.h + 'imaxabs', 'imaxdiv', 'strtoimax', 'strtoumax', 'wcstoimax', + 'wcstoumax', + + //locale.h + 'localeconv', 'setlocale', + + //math.h + 'acos', 'asin', 'atan', 'atan2', 'ceil', 'cos', 'cosh', 'exp', + 'fabs', 'floor', 'frexp', 'ldexp', 'log', 'log10', 'modf', 'pow', + 'sin', 'sinh', 'sqrt', 'tan', 'tanh', + + //setjmp.h + 'longjmp', 'setjmp', + + //signal.h + 'raise', + + //stdarg.h + 'va_arg', 'va_copy', 'va_end', 'va_start', + + //stddef.h + 'offsetof', + + //stdio.h + 'clearerr', 'fclose', 'fdopen', 'feof', 'ferror', 'fflush', 'fgetc', + 'fgetpos', 'fgets', 'fopen', 'fprintf', 'fputc', 'fputchar', + 'fputs', 'fread', 'freopen', 'fscanf', 'fseek', 'fsetpos', 'ftell', + 'fwrite', 'getc', 'getch', 'getchar', 'gets', 'perror', 'printf', + 'putc', 'putchar', 'puts', 'remove', 'rename', 'rewind', 'scanf', + 'setbuf', 'setvbuf', 'snprintf', 'sprintf', 'sscanf', 'tmpfile', + 'tmpnam', 'ungetc', 'vfprintf', 'vfscanf', 'vprintf', 'vscanf', + 'vsprintf', 'vsscanf', + + //stdlib.h + 'abort', 'abs', 'atexit', 'atof', 'atoi', 'atol', 'bsearch', + 'calloc', 'div', 'exit', 'free', 'getenv', 'itoa', 'labs', 'ldiv', + 'ltoa', 'malloc', 'qsort', 'rand', 'realloc', 'srand', 'strtod', + 'strtol', 'strtoul', 'system', + + //string.h + 'memchr', 'memcmp', 'memcpy', 'memmove', 'memset', 'strcat', + 'strchr', 'strcmp', 'strcoll', 'strcpy', 'strcspn', 'strerror', + 'strlen', 'strncat', 'strncmp', 'strncpy', 'strpbrk', 'strrchr', + 'strspn', 'strstr', 'strtok', 'strxfrm', + + //time.h + 'asctime', 'clock', 'ctime', 'difftime', 'gmtime', 'localtime', + 'mktime', 'strftime', 'time', + + //wchar.h + 'btowc', 'fgetwc', 'fgetws', 'fputwc', 'fputws', 'fwide', + 'fwprintf', 'fwscanf', 'getwc', 'getwchar', 'mbrlen', 'mbrtowc', + 'mbsinit', 'mbsrtowcs', 'putwc', 'putwchar', 'swprintf', 'swscanf', + 'ungetwc', 'vfwprintf', 'vswprintf', 'vwprintf', 'wcrtomb', + 'wcscat', 'wcschr', 'wcscmp', 'wcscoll', 'wcscpy', 'wcscspn', + 'wcsftime', 'wcslen', 'wcsncat', 'wcsncmp', 'wcsncpy', 'wcspbrk', + 'wcsrchr', 'wcsrtombs', 'wcsspn', 'wcsstr', 'wcstod', 'wcstok', + 'wcstol', 'wcstoul', 'wcsxfrm', 'wctob', 'wmemchr', 'wmemcmp', + 'wmemcpy', 'wmemmove', 'wmemset', 'wprintf', 'wscanf', + + //wctype.h + 'iswalnum', 'iswalpha', 'iswcntrl', 'iswctype', 'iswdigit', + 'iswgraph', 'iswlower', 'iswprint', 'iswpunct', 'iswspace', + 'iswupper', 'iswxdigit', 'towctrans', 'towlower', 'towupper', + 'wctrans', 'wctype' + ), + 4 => array( + 'auto', 'char', 'const', 'double', 'float', 'int', 'long', + 'register', 'short', 'signed', 'sizeof', 'static', 'struct', + 'typedef', 'union', 'unsigned', 'void', 'volatile', 'wchar_t', + + 'int8', 'int16', 'int32', 'int64', + 'uint8', 'uint16', 'uint32', 'uint64', + + 'int_fast8_t', 'int_fast16_t', 'int_fast32_t', 'int_fast64_t', + 'uint_fast8_t', 'uint_fast16_t', 'uint_fast32_t', 'uint_fast64_t', + + 'int_least8_t', 'int_least16_t', 'int_least32_t', 'int_least64_t', + 'uint_least8_t', 'uint_least16_t', 'uint_least32_t', 'uint_least64_t', + + 'int8_t', 'int16_t', 'int32_t', 'int64_t', + 'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t', + + 'intmax_t', 'uintmax_t', 'intptr_t', 'uintptr_t', + 'size_t', 'off_t' + ), + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', + '+', '-', '*', '/', '%', + '=', '<', '>', + '!', '^', '&', '|', + '?', ':', + ';', ',' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #000066;', + 4 => 'color: #993333;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 2 => 'color: #339933;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;', + 1 => 'color: #000099; font-weight: bold;', + 2 => 'color: #660099; font-weight: bold;', + 3 => 'color: #660099; font-weight: bold;', + 4 => 'color: #660099; font-weight: bold;', + 5 => 'color: #006699; font-weight: bold;', + 'HARD' => '', + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #0000dd;', + GESHI_NUMBER_BIN_PREFIX_0B => 'color: #208080;', + GESHI_NUMBER_OCT_PREFIX => 'color: #208080;', + GESHI_NUMBER_HEX_PREFIX => 'color: #208080;', + GESHI_NUMBER_FLT_SCI_SHORT => 'color:#800080;', + GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;', + GESHI_NUMBER_FLT_NONSCI_F => 'color:#800080;', + GESHI_NUMBER_FLT_NONSCI => 'color:#800080;' + ), + 'METHODS' => array( + 1 => 'color: #202020;', + 2 => 'color: #202020;' + ), + 'SYMBOLS' => array( + 0 => 'color: #339933;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => 'http://www.opengroup.org/onlinepubs/009695399/functions/{FNAMEL}.html', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.', + 2 => '::' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); + diff --git a/vendor/easybook/geshi/geshi/c_loadrunner.php b/vendor/easybook/geshi/geshi/c_loadrunner.php new file mode 100644 index 0000000000..1dc3380d3e --- /dev/null +++ b/vendor/easybook/geshi/geshi/c_loadrunner.php @@ -0,0 +1,322 @@ + 'C (LoadRunner)', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + // Escape characters within strings (like \\) are not highlighted differently in LoadRunner, so + // I am using GeSHi escape characters (or regular expressions) to highlight LoadRunner {parameters}. + // LoadRunner {parameters} must begin with a letter and contain only alphanumeric characters and '_' + 'ESCAPE_REGEXP' => array( + 0 => "#\{[a-zA-Z]{1}[a-zA-Z_]{0,}\}#", + ), + + // Keywords + 'KEYWORDS' => array( + // Keywords from http://en.wikipedia.org/wiki/C_syntax + 1 => array( + 'auto', 'break', 'case', 'char', 'const', 'continue', 'default', + 'do', 'double', 'else', 'enum', 'extern', 'float', 'for', 'goto', + 'if', 'inline', 'int', 'long', 'register', 'restrict', 'return', + 'short', 'signed', 'sizeof', 'static', 'struct', 'switch', + 'typedef', 'union', 'unsigned', 'void', 'volatile', 'while', + '_Bool', '_Complex', '_Imaginary' + ), + // C preprocessor directives from http://en.wikipedia.org/wiki/C_preprocessor + 2 => array( + '#define', '#if', '#ifdef', '#ifndef', '#include', '#else', '#elif', '#endif', '#pragma', '#undef' + ), + // Functions from lrun.h + 3 => array( + 'lr_start_transaction', 'lr_start_sub_transaction', 'lr_start_transaction_instance', 'lr_end_transaction', + 'lr_end_sub_transaction', 'lr_end_transaction_instance', 'lr_stop_transaction', 'lr_stop_transaction_instance', + 'lr_resume_transaction', 'lr_resume_transaction_instance', 'lr_wasted_time', 'lr_set_transaction', 'lr_user_data_point', + 'lr_user_data_point_instance', 'lr_user_data_point_ex', 'lr_user_data_point_instance_ex', 'lr_get_transaction_duration', + 'lr_get_trans_instance_duration', 'lr_get_transaction_think_time', 'lr_get_trans_instance_think_time', + 'lr_get_transaction_wasted_time', 'lr_get_trans_instance_wasted_time', 'lr_get_transaction_status', + 'lr_get_trans_instance_status', 'lr_set_transaction_status', 'lr_set_transaction_status_by_name', + 'lr_set_transaction_instance_status', 'lr_start_timer', 'lr_end_timer', 'lr_rendezvous', 'lr_rendezvous_ex', + 'lr_get_vuser_ip', 'lr_whoami', 'lr_get_host_name', 'lr_get_master_host_name', 'lr_get_attrib_long', + 'lr_get_attrib_string', 'lr_get_attrib_double', 'lr_paramarr_idx', 'lr_paramarr_random', 'lr_paramarr_len', + 'lr_param_unique', 'lr_param_sprintf', 'lr_load_dll', 'lr_continue_on_error', 'lr_decrypt', 'lr_abort', 'lr_exit', + 'lr_peek_events', 'lr_think_time', 'lr_debug_message', 'lr_log_message', 'lr_message', 'lr_error_message', + 'lr_output_message', 'lr_vuser_status_message', 'lr_fail_trans_with_error', 'lr_next_row', 'lr_advance_param', + 'lr_eval_string', 'lr_eval_string_ext', 'lr_eval_string_ext_free', 'lr_param_increment', 'lr_save_var', + 'lr_save_string', 'lr_save_int', 'lr_save_datetime', 'lr_save_searched_string', 'lr_set_debug_message', + 'lr_get_debug_message', 'lr_enable_ip_spoofing', 'lr_disable_ip_spoofing', 'lr_convert_string_encoding' + ), + // Constants from lrun.h + 4 => array( + 'DP_FLAGS_NO_LOG', 'DP_FLAGS_STANDARD_LOG', 'DP_FLAGS_EXTENDED_LOG', 'merc_timer_handle_t', 'LR_EXIT_VUSER', + 'LR_EXIT_ACTION_AND_CONTINUE', 'LR_EXIT_ITERATION_AND_CONTINUE', 'LR_EXIT_VUSER_AFTER_ITERATION', + 'LR_EXIT_VUSER_AFTER_ACTION', 'LR_EXIT_MAIN_ITERATION_AND_CONTINUE', 'LR_MSG_CLASS_DISABLE_LOG', + 'LR_MSG_CLASS_STANDARD_LOG', 'LR_MSG_CLASS_RETURNED_DATA', 'LR_MSG_CLASS_PARAMETERS', 'LR_MSG_CLASS_ADVANCED_TRACE', + 'LR_MSG_CLASS_EXTENDED_LOG', 'LR_MSG_CLASS_SENT_DATA', 'LR_MSG_CLASS_JIT_LOG_ON_ERROR', 'LR_SWITCH_OFF', 'LR_SWITCH_ON', + 'LR_SWITCH_DEFAULT', 'ONE_DAY', 'ONE_HOUR', 'ONE_MIN', 'DATE_NOW', 'TIME_NOW', 'LR_MSG_CLASS_BRIEF_LOG', + 'LR_MSG_CLASS_RESULT_DATA', 'LR_MSG_CLASS_FULL_TRACE', 'LR_MSG_CLASS_AUTO_LOG', 'LR_MSG_OFF', 'LR_MSG_ON', + 'LR_MSG_DEFAULT' + ), + // Functions from web_api.h + 5 => array( + 'web_reg_add_cookie', 'web_report_data_point', 'web_text_link', 'web_element', 'web_image_link', 'web_static_image', + 'web_image_submit', 'web_button', 'web_edit_field', 'web_radio_group', 'web_check_box', 'web_list', 'web_text_area', + 'web_map_area', 'web_eval_java_script', 'web_reg_dialog', 'web_reg_cross_step_download', 'web_browser', + 'web_set_rts_key', 'web_save_param_length', 'web_save_timestamp_param', 'web_load_cache', 'web_dump_cache', + 'web_add_cookie_ex' + ), + // Constants from web_api.h + 6 => array( + 'DESCRIPTION', 'ACTION', 'VERIFICATION', 'LR_NOT_FOUND', 'HTTP_INFO_TOTAL_REQUEST_STAT', + 'HTTP_INFO_TOTAL_RESPONSE_STAT', 'LRW_OPT_STOP_VUSER_ON_ERROR', 'LRW_OPT_DISPLAY_IMAGE_BODY' + ), + // Functions from as_web.h + 7 => array( + 'web_add_filter', 'web_add_auto_filter', 'web_add_auto_header', 'web_add_header', 'web_add_cookie', + 'web_cleanup_auto_headers', 'web_cleanup_cookies', 'web_concurrent_end', 'web_concurrent_start', 'web_create_html_param', + 'web_create_html_param_ex', 'web_custom_request', 'web_disable_keep_alive', 'web_enable_keep_alive', 'web_find', + 'web_get_int_property', 'web_image', 'web_image_check', 'web_link', 'web_global_verification', 'web_reg_find', + 'web_reg_save_param', 'web_convert_param', 'web_remove_auto_filter', 'web_remove_auto_header', 'web_revert_auto_header', + 'web_remove_cookie', 'web_save_header', 'web_set_certificate', 'web_set_certificate_ex', 'web_set_connections_limit', + 'web_set_max_html_param_len', 'web_set_max_retries', 'web_set_proxy', 'web_set_proxy_bypass', 'web_set_secure_proxy', + 'web_set_sockets_option', 'web_set_option', 'web_set_timeout', 'web_set_user', 'web_sjis_to_euc_param', + 'web_submit_data', 'web_submit_form', 'web_url', 'web_set_proxy_bypass_local', 'web_cache_cleanup', + 'web_create_html_query', 'web_create_radio_button_param', 'web_switch_net_layer' + ), + // Constants from as_web.h + 8 => array( + 'ENDFORM', 'LAST', 'ENDITEM', 'EXTRARES', 'ITEMDATA', 'STARTHIDDENS', 'ENDHIDDENS', 'CONNECT', 'RECEIVE', 'RESOLVE', + 'STEP', 'REQUEST', 'RESPONSE', 'STARTQUERY', 'ENDQUERY', 'INPROPS', 'OUTPROPS', 'ENDPROPS', 'RAW_BODY_START', + 'RAW_BODY_END', 'HTTP_INFO_RETURN_CODE', 'HTTP_INFO_DOWNLOAD_SIZE', 'HTTP_INFO_DOWNLOAD_TIME', + 'LRW_NET_SOCKET_OPT_LOAD_VERIFY_FILE', 'LRW_NET_SOCKET_OPT_DEFAULT_VERIFY_PATH', 'LRW_NET_SOCKET_OPT_SSL_VERSION', + 'LRW_NET_SOCKET_OPT_SSL_CIPHER_LIST', 'LRW_NET_SOCKET_OPT_SO_REUSE_ADDRESS', 'LRW_NET_SOCKET_OPT_USER_IP_ADDRESS', + 'LRW_NET_SOCKET_OPT_IP_ADDRESS_BY_INDEX', 'LRW_NET_SOCKET_OPT_HELP', 'LRW_NET_SOCKET_OPT_PRINT_USER_IP_ADDRESS_LIST', + 'LRW_OPT_HTML_CHAR_REF_BACKWARD_COMPATIBILITY', 'LRW_OPT_VALUE_YES', 'LRW_OPT_VALUE_NO' + ), + // Functions from as_sapgui.h + 9 => array( + 'sapgui_open_connection', 'sapgui_open_connection_ex', 'sapgui_logon', 'sapgui_create_session', + 'sapgui_create_new_session', 'sapgui_call_method', 'sapgui_call_method_ex', 'sapgui_set_property', + 'sapgui_get_property', 'sapgui_set_collection_property', 'sapgui_active_object_from_parent_method', + 'sapgui_active_object_from_parent_property', 'sapgui_call_method_of_active_object', + 'sapgui_call_method_of_active_object_ex', 'sapgui_set_property_of_active_object', 'sapgui_get_property_of_active_object', + 'sapgui_select_active_connection', 'sapgui_select_active_session', 'sapgui_select_active_window ', + 'sapgui_status_bar_get_text', 'sapgui_status_bar_get_param', 'sapgui_status_bar_get_type', 'sapgui_get_status_bar_text', + 'sapgui_get_active_window_title', 'sapgui_is_object_available', 'sapgui_is_tab_selected', 'sapgui_is_object_changeable', + 'sapgui_set_ok_code', 'sapgui_send_vkey', 'sapgui_resize_window', 'sapgui_window_resize', 'sapgui_window_maximize', + 'sapgui_window_close', 'sapgui_window_restore', 'sapgui_window_scroll_to_row', 'sapgui_press_button', + 'sapgui_select_radio_button', 'sapgui_set_password', 'sapgui_set_text', 'sapgui_select_menu', 'sapgui_select_tab', + 'sapgui_set_checkbox', 'sapgui_set_focus', 'sapgui_select_combobox_entry', 'sapgui_get_ok_code', + 'sapgui_is_radio_button_selected', 'sapgui_get_text', 'sapgui_is_checkbox_selected', 'sapgui_table_set_focus', + 'sapgui_table_press_button', 'sapgui_table_select_radio_button', 'sapgui_table_set_password', 'sapgui_table_set_text', + 'sapgui_table_set_checkbox', 'sapgui_table_select_combobox_entry', 'sapgui_table_set_row_selected', + 'sapgui_table_set_column_selected', 'sapgui_table_set_column_width', 'sapgui_table_reorder', 'sapgui_table_fill_data', + 'sapgui_table_get_text', 'sapgui_table_is_radio_button_selected', 'sapgui_table_is_checkbox_selected', + 'sapgui_table_is_row_selected', 'sapgui_table_is_column_selected', 'sapgui_table_get_column_width', + 'sapgui_grid_clear_selection', 'sapgui_grid_select_all', 'sapgui_grid_selection_changed', + 'sapgui_grid_press_column_header', 'sapgui_grid_select_cell', 'sapgui_grid_select_rows', 'sapgui_grid_select_column', + 'sapgui_grid_deselect_column', 'sapgui_grid_select_columns', 'sapgui_grid_select_cells', 'sapgui_grid_select_cell_row', + 'sapgui_grid_select_cell_column', 'sapgui_grid_set_column_order', 'sapgui_grid_set_column_width', + 'sapgui_grid_scroll_to_row', 'sapgui_grid_double_click', 'sapgui_grid_click', 'sapgui_grid_press_button', + 'sapgui_grid_press_total_row', 'sapgui_grid_set_cell_data', 'sapgui_grid_set_checkbox', + 'sapgui_grid_double_click_current_cell', 'sapgui_grid_click_current_cell', 'sapgui_grid_press_button_current_cell', + 'sapgui_grid_press_total_row_current_cell', 'sapgui_grid_press_F1', 'sapgui_grid_press_F4', 'sapgui_grid_press_ENTER', + 'sapgui_grid_press_toolbar_button', 'sapgui_grid_press_toolbar_context_button', 'sapgui_grid_open_context_menu', + 'sapgui_grid_select_context_menu', 'sapgui_grid_select_toolbar_menu', 'sapgui_grid_fill_data', + 'sapgui_grid_get_current_cell_row', 'sapgui_grid_get_current_cell_column', 'sapgui_grid_get_rows_count', + 'sapgui_grid_get_columns_count', 'sapgui_grid_get_cell_data', 'sapgui_grid_is_checkbox_selected', + 'sapgui_tree_scroll_to_node', 'sapgui_tree_set_hierarchy_header_width', 'sapgui_tree_set_selected_node', + 'sapgui_tree_double_click_node', 'sapgui_tree_press_key', 'sapgui_tree_press_button', 'sapgui_tree_set_checkbox', + 'sapgui_tree_double_click_item', 'sapgui_tree_click_link', 'sapgui_tree_open_default_context_menu', + 'sapgui_tree_open_node_context_menu', 'sapgui_tree_open_header_context_menu', 'sapgui_tree_open_item_context_menu', + 'sapgui_tree_select_context_menu', 'sapgui_tree_select_item', 'sapgui_tree_select_node', 'sapgui_tree_unselect_node', + 'sapgui_tree_unselect_all', 'sapgui_tree_select_column', 'sapgui_tree_unselect_column', 'sapgui_tree_set_column_order', + 'sapgui_tree_collapse_node', 'sapgui_tree_expand_node', 'sapgui_tree_scroll_to_item', 'sapgui_tree_set_column_width', + 'sapgui_tree_press_header', 'sapgui_tree_is_checkbox_selected', 'sapgui_tree_get_node_text', 'sapgui_tree_get_item_text', + 'sapgui_calendar_scroll_to_date', 'sapgui_calendar_focus_date', 'sapgui_calendar_select_interval', + 'sapgui_apogrid_select_all', 'sapgui_apogrid_clear_selection', 'sapgui_apogrid_select_cell', + 'sapgui_apogrid_deselect_cell', 'sapgui_apogrid_select_row', 'sapgui_apogrid_deselect_row', + 'sapgui_apogrid_select_column', 'sapgui_apogrid_deselect_column', 'sapgui_apogrid_scroll_to_row', + 'sapgui_apogrid_scroll_to_column', 'sapgui_apogrid_double_click', 'sapgui_apogrid_set_cell_data', + 'sapgui_apogrid_get_cell_data', 'sapgui_apogrid_is_cell_changeable', 'sapgui_apogrid_get_cell_format', + 'sapgui_apogrid_get_cell_tooltip', 'sapgui_apogrid_press_ENTER', 'sapgui_apogrid_open_cell_context_menu', + 'sapgui_apogrid_select_context_menu_item', 'sapgui_text_edit_scroll_to_line', 'sapgui_text_edit_set_selection_indexes', + 'sapgui_text_edit_set_unprotected_text_part', 'sapgui_text_edit_get_first_visible_line', + 'sapgui_text_edit_get_selection_index_start', 'sapgui_text_edit_get_selection_index_end', + 'sapgui_text_edit_get_number_of_unprotected_text_parts', 'sapgui_text_edit_double_click', + 'sapgui_text_edit_single_file_dropped', 'sapgui_text_edit_multiple_files_dropped', 'sapgui_text_edit_press_F1', + 'sapgui_text_edit_press_F4', 'sapgui_text_edit_open_context_menu', 'sapgui_text_edit_select_context_menu', + 'sapgui_text_edit_modified_status_changed', 'sapgui_htmlviewer_send_event', 'sapgui_htmlviewer_dom_get_property', + 'sapgui_toolbar_press_button', 'sapgui_toolbar_press_context_button', 'sapgui_toolbar_select_menu_item', + 'sapgui_toolbar_select_menu_item_by_text', 'sapgui_toolbar_select_context_menu_item', + 'sapgui_toolbar_select_context_menu_item_by_text' + ), + // Constants from as_sapgui.h + 10 => array( + 'BEGIN_OPTIONAL', 'END_OPTIONAL', 'al-keys', 'ENTER', 'HELP', 'F2', 'BACK', 'F4', 'F5', 'F6', 'F7', 'F8', 'F9', + 'F10', 'F11', 'ESC', 'SHIFT_F1', 'SHIFT_F2', 'SHIFT_F3', 'SHIFT_F4', 'SHIFT_F5', 'SHIFT_F6', 'SHIFT_F7', 'SHIFT_F8', + 'SHIFT_F9', 'SHIFT_F10', 'SHIFT_F11', 'SHIFT_F12', 'CTRL_F1', 'CTRL_F2', 'CTRL_F3', 'CTRL_F4', 'CTRL_F5', 'CTRL_F6', + 'CTRL_F7', 'CTRL_F8', 'CTRL_F9', 'CTRL_F10', 'CTRL_F11', 'CTRL_F12', 'CTRL_SHIFT_F1', 'CTRL_SHIFT_F2', 'CTRL_SHIFT_F3', + 'CTRL_SHIFT_F4', 'CTRL_SHIFT_F5', 'CTRL_SHIFT_F6', 'CTRL_SHIFT_F7', 'CTRL_SHIFT_F8', 'CTRL_SHIFT_F9', 'CTRL_SHIFT_F10', + 'CTRL_SHIFT_F11', 'CTRL_SHIFT_F12', 'CANCEL', 'CTRL_F', 'CTRL_PAGE_UP', 'PAGE_UP', 'PAGE_DOWN', 'CTRL_PAGE_DOWN', + 'CTRL_G', 'CTRL_P' + ), + ), + + // Symbols and Case Sensitivity + // Symbols from: http://en.wikipedia.org/wiki/C_syntax + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', + '+', '-', '*', '/', '%', + '=', '<', '>', '!', '^', '&', '|', '?', ':', ';', ',' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, // Standard C reserved keywords + 2 => true, // C preprocessor directives + 3 => true, // Functions from lrun.h + 4 => true, // Constants from lrun.h + 5 => true, // Functions from web_api.h + 6 => true, // Constants from web_api.h + 7 => true, // Functions from as_web.h + 8 => true, // Constants from as_web.h + 9 => true, // Functions from as_sapgui.h + 10 => true, // Constants from as_sapgui.h + ), + + // Styles + 'STYLES' => array( + 'KEYWORDS' => array( + // Functions are brown, constants and reserved words are blue + 1 => 'color: #0000ff;', // Standard C reserved keywords + 2 => 'color: #0000ff;', // C preprocessor directives + 3 => 'color: #8a0000;', // Functions from lrun.h + 4 => 'color: #0000ff;', // Constants from lrun.h + 5 => 'color: #8a0000;', // Functions from web_api.h + 6 => 'color: #0000ff;', // Constants from web_api.h + 7 => 'color: #8a0000;', // Functions from as_web.h + 8 => 'color: #0000ff;', // Constants from as_web.h + 9 => 'color: #8a0000;', // Functions from as_sapgui.h + 10 => 'color: #0000ff;', // Constants from as_sapgui.h + ), + 'COMMENTS' => array( + // Comments are grey + 1 => 'color: #9b9b9b;', + 'MULTI' => 'color: #9b9b9b;' + ), + 'ESCAPE_CHAR' => array( + // GeSHi cannot define a separate style for ESCAPE_REGEXP. The style for ESCAPE_CHAR also applies to ESCAPE_REGEXP. + // This is used for LoadRunner {parameters} + // {parameters} are pink + 0 => 'color: #c000c0;' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + // Strings are green + 0 => 'color: #008080;' + ), + 'NUMBERS' => array( + // Numbers are green + 0 => 'color: #008080;', + GESHI_NUMBER_BIN_PREFIX_0B => 'color: #008080;', + GESHI_NUMBER_OCT_PREFIX => 'color: #008080;', + GESHI_NUMBER_HEX_PREFIX => 'color: #008080;', + GESHI_NUMBER_FLT_SCI_SHORT => 'color:#008080;', + GESHI_NUMBER_FLT_SCI_ZERO => 'color:#008080;', + GESHI_NUMBER_FLT_NONSCI_F => 'color:#008080;', + GESHI_NUMBER_FLT_NONSCI => 'color:#008080;' + ), + 'METHODS' => array( + 1 => 'color: #000000;' + ), + 'SYMBOLS' => array( + 0 => 'color: #000000;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + + // URLs for Functions + 'URLS' => array( + 1 => '', // Standard C reserved keywords + 2 => '', // C preprocessor directives + 3 => '', // Functions from lrun.h + 4 => '', // Constants from lrun.h + 5 => '', // Functions from web_api.h + 6 => '', // Constants from web_api.h + 7 => '', // Functions from as_web.h + 8 => '', // Constants from as_web.h + 9 => '', // Functions from as_sapgui.h + 10 => '', // Constants from as_sapgui.h + ), + + // Object Orientation + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + + // Regular Expressions + // Note that REGEXPS are not applied within strings. + 'REGEXPS' => array( + ), + + // Contextual Highlighting and Strict Mode + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + + // Tabs + // Note that if you are using
             tags for your code, then the browser chooses how many spaces your tabs will translate to.
            +    'TAB_WIDTH' => 4
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/c_mac.php b/vendor/easybook/geshi/geshi/c_mac.php
            new file mode 100644
            index 0000000000..ca7fe6ce9a
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/c_mac.php
            @@ -0,0 +1,226 @@
            + 'C (Mac)',
            +    'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(
            +        //Multiline-continued single-line comments
            +        1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m',
            +        //Multiline-continued preprocessor define
            +        2 => '/#(?:\\\\\\\\|\\\\\\n|.)*$/m'
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'ESCAPE_REGEXP' => array(
            +        //Simple Single Char Escapes
            +        1 => "#\\\\[\\\\abfnrtv\'\"?\n]#i",
            +        //Hexadecimal Char Specs
            +        2 => "#\\\\x[\da-fA-F]{2}#",
            +        //Hexadecimal Char Specs
            +        3 => "#\\\\u[\da-fA-F]{4}#",
            +        //Hexadecimal Char Specs
            +        4 => "#\\\\U[\da-fA-F]{8}#",
            +        //Octal Char Specs
            +        5 => "#\\\\[0-7]{1,3}#"
            +        ),
            +    'NUMBERS' =>
            +        GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B |
            +        GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI |
            +        GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO,
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'if', 'return', 'while', 'case', 'continue', 'default',
            +            'do', 'else', 'for', 'switch', 'goto'
            +            ),
            +        2 => array(
            +            'NULL', 'false', 'break', 'true', 'enum', 'errno', 'EDOM',
            +            'ERANGE', 'FLT_RADIX', 'FLT_ROUNDS', 'FLT_DIG', 'DBL_DIG', 'LDBL_DIG',
            +            'FLT_EPSILON', 'DBL_EPSILON', 'LDBL_EPSILON', 'FLT_MANT_DIG', 'DBL_MANT_DIG',
            +            'LDBL_MANT_DIG', 'FLT_MAX', 'DBL_MAX', 'LDBL_MAX', 'FLT_MAX_EXP', 'DBL_MAX_EXP',
            +            'LDBL_MAX_EXP', 'FLT_MIN', 'DBL_MIN', 'LDBL_MIN', 'FLT_MIN_EXP', 'DBL_MIN_EXP',
            +            'LDBL_MIN_EXP', 'CHAR_BIT', 'CHAR_MAX', 'CHAR_MIN', 'SCHAR_MAX', 'SCHAR_MIN',
            +            'UCHAR_MAX', 'SHRT_MAX', 'SHRT_MIN', 'USHRT_MAX', 'INT_MAX', 'INT_MIN',
            +            'UINT_MAX', 'LONG_MAX', 'LONG_MIN', 'ULONG_MAX', 'HUGE_VAL', 'SIGABRT',
            +            'SIGFPE', 'SIGILL', 'SIGINT', 'SIGSEGV', 'SIGTERM', 'SIG_DFL', 'SIG_ERR',
            +            'SIG_IGN', 'BUFSIZ', 'EOF', 'FILENAME_MAX', 'FOPEN_MAX', 'L_tmpnam',
            +            'SEEK_CUR', 'SEEK_END', 'SEEK_SET', 'TMP_MAX', 'stdin', 'stdout', 'stderr',
            +            'EXIT_FAILURE', 'EXIT_SUCCESS', 'RAND_MAX', 'CLOCKS_PER_SEC',
            +            // Mac-specific constants:
            +            'kCFAllocatorDefault'
            +            ),
            +        3 => array(
            +            'printf', 'fprintf', 'snprintf', 'sprintf', 'assert',
            +            'isalnum', 'isalpha', 'isdigit', 'iscntrl', 'isgraph', 'islower', 'isprint',
            +            'ispunct', 'isspace', 'isupper', 'isxdigit', 'tolower', 'toupper',
            +            'exp', 'log', 'log10', 'pow', 'sqrt', 'ceil', 'floor', 'fabs', 'ldexp',
            +            'frexp', 'modf', 'fmod', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'atan2',
            +            'sinh', 'cosh', 'tanh', 'setjmp', 'longjmp',
            +            'va_start', 'va_arg', 'va_end', 'offsetof', 'sizeof', 'fopen', 'freopen',
            +            'fflush', 'fclose', 'remove', 'rename', 'tmpfile', 'tmpname', 'setvbuf',
            +            'setbuf', 'vfprintf', 'vprintf', 'vsprintf', 'fscanf', 'scanf', 'sscanf',
            +            'fgetc', 'fgets', 'fputc', 'fputs', 'getc', 'getchar', 'gets', 'putc',
            +            'putchar', 'puts', 'ungetc', 'fread', 'fwrite', 'fseek', 'ftell', 'rewind',
            +            'fgetpos', 'fsetpos', 'clearerr', 'feof', 'ferror', 'perror', 'abs', 'labs',
            +            'div', 'ldiv', 'atof', 'atoi', 'atol', 'strtod', 'strtol', 'strtoul', 'calloc',
            +            'malloc', 'realloc', 'free', 'abort', 'exit', 'atexit', 'system', 'getenv',
            +            'bsearch', 'qsort', 'rand', 'srand', 'strcpy', 'strncpy', 'strcat', 'strncat',
            +            'strcmp', 'strncmp', 'strcoll', 'strchr', 'strrchr', 'strspn', 'strcspn',
            +            'strpbrk', 'strstr', 'strlen', 'strerror', 'strtok', 'strxfrm', 'memcpy',
            +            'memmove', 'memcmp', 'memchr', 'memset', 'clock', 'time', 'difftime', 'mktime',
            +            'asctime', 'ctime', 'gmtime', 'localtime', 'strftime'
            +            ),
            +        4 => array(
            +            'auto', 'char', 'const', 'double',  'float', 'int', 'long',
            +            'register', 'short', 'signed', 'static', 'struct',
            +            'typedef', 'union', 'unsigned', 'void', 'volatile', 'extern', 'jmp_buf',
            +            'signal', 'raise', 'va_list', 'ptrdiff_t', 'size_t', 'FILE', 'fpos_t',
            +            'div_t', 'ldiv_t', 'clock_t', 'time_t', 'tm', 'wchar_t',
            +
            +            'int8', 'int16', 'int32', 'int64',
            +            'uint8', 'uint16', 'uint32', 'uint64',
            +
            +            'int_fast8_t', 'int_fast16_t', 'int_fast32_t', 'int_fast64_t',
            +            'uint_fast8_t', 'uint_fast16_t', 'uint_fast32_t', 'uint_fast64_t',
            +
            +            'int_least8_t', 'int_least16_t', 'int_least32_t', 'int_least64_t',
            +            'uint_least8_t', 'uint_least16_t', 'uint_least32_t', 'uint_least64_t',
            +
            +            'int8_t', 'int16_t', 'int32_t', 'int64_t',
            +            'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t',
            +
            +            'intmax_t', 'uintmax_t', 'intptr_t', 'uintptr_t',
            +
            +            // Mac-specific types:
            +            'CFArrayRef', 'CFDictionaryRef', 'CFMutableDictionaryRef', 'CFBundleRef', 'CFSetRef', 'CFStringRef',
            +            'CFURLRef', 'CFLocaleRef', 'CFDateFormatterRef', 'CFNumberFormatterRef', 'CFPropertyListRef',
            +            'CFTreeRef', 'CFWriteStreamRef', 'CFCharacterSetRef', 'CFMutableStringRef', 'CFNotificationRef',
            +            'CFReadStreamRef', 'CFNull', 'CFAllocatorRef', 'CFBagRef', 'CFBinaryHeapRef',
            +            'CFBitVectorRef', 'CFBooleanRef', 'CFDataRef', 'CFDateRef', 'CFMachPortRef', 'CFMessagePortRef',
            +            'CFMutableArrayRef', 'CFMutableBagRef', 'CFMutableBitVectorRef', 'CFMutableCharacterSetRef',
            +            'CFMutableDataRef', 'CFMutableSetRef', 'CFNumberRef', 'CFPlugInRef', 'CFPlugInInstanceRef',
            +            'CFRunLoopRef', 'CFRunLoopObserverRef', 'CFRunLoopSourceRef', 'CFRunLoopTimerRef', 'CFSocketRef',
            +            'CFTimeZoneRef', 'CFTypeRef', 'CFUserNotificationRef', 'CFUUIDRef', 'CFXMLNodeRef', 'CFXMLParserRef',
            +            'CFXMLTreeRef'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0000ff;',
            +            2 => 'color: #0000ff;',
            +            3 => 'color: #0000dd;',
            +            4 => 'color: #0000ff;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #ff0000;',
            +            2 => 'color: #339900;',
            +            'MULTI' => 'color: #ff0000; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;',
            +            1 => 'color: #000099; font-weight: bold;',
            +            2 => 'color: #660099; font-weight: bold;',
            +            3 => 'color: #660099; font-weight: bold;',
            +            4 => 'color: #660099; font-weight: bold;',
            +            5 => 'color: #006699; font-weight: bold;',
            +            'HARD' => '',
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #666666;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #0000dd;',
            +            GESHI_NUMBER_BIN_PREFIX_0B => 'color: #208080;',
            +            GESHI_NUMBER_OCT_PREFIX => 'color: #208080;',
            +            GESHI_NUMBER_HEX_PREFIX => 'color: #208080;',
            +            GESHI_NUMBER_FLT_SCI_SHORT => 'color:#800080;',
            +            GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;',
            +            GESHI_NUMBER_FLT_NONSCI_F => 'color:#800080;',
            +            GESHI_NUMBER_FLT_NONSCI => 'color:#800080;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #00eeff;',
            +            2 => 'color: #00eeff;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => 'http://www.opengroup.org/onlinepubs/009695399/functions/{FNAMEL}.html',
            +        4 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.',
            +        2 => '::'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/c_winapi.php b/vendor/easybook/geshi/geshi/c_winapi.php
            new file mode 100644
            index 0000000000..1252e7b92b
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/c_winapi.php
            @@ -0,0 +1,870 @@
            + 'C (WinAPI)',
            +    'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(
            +        //Multiline-continued single-line comments
            +        1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m',
            +        //Multiline-continued preprocessor define
            +        2 => '/#(?:\\\\\\\\|\\\\\\n|.)*$/m'
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'ESCAPE_REGEXP' => array(
            +        //Simple Single Char Escapes
            +        1 => "#\\\\[\\\\abfnrtv\'\"?\n]#i",
            +        //Hexadecimal Char Specs
            +        2 => "#\\\\x[\da-fA-F]{2}#",
            +        //Hexadecimal Char Specs
            +        3 => "#\\\\u[\da-fA-F]{4}#",
            +        //Hexadecimal Char Specs
            +        4 => "#\\\\U[\da-fA-F]{8}#",
            +        //Octal Char Specs
            +        5 => "#\\\\[0-7]{1,3}#"
            +        ),
            +    'NUMBERS' =>
            +        GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B |
            +        GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI |
            +        GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO,
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'if', 'return', 'while', 'case', 'continue', 'default',
            +            'do', 'else', 'for', 'switch', 'goto'
            +            ),
            +        2 => array(
            +            'null', 'false', 'break', 'true', 'function', 'enum', 'extern', 'inline'
            +            ),
            +        3 => array(
            +            // assert.h
            +            'assert',
            +
            +            //complex.h
            +            'cabs', 'cacos', 'cacosh', 'carg', 'casin', 'casinh', 'catan',
            +            'catanh', 'ccos', 'ccosh', 'cexp', 'cimag', 'cis', 'clog', 'conj',
            +            'cpow', 'cproj', 'creal', 'csin', 'csinh', 'csqrt', 'ctan', 'ctanh',
            +
            +            //ctype.h
            +            'digittoint', 'isalnum', 'isalpha', 'isascii', 'isblank', 'iscntrl',
            +            'isdigit', 'isgraph', 'islower', 'isprint', 'ispunct', 'isspace',
            +            'isupper', 'isxdigit', 'toascii', 'tolower', 'toupper',
            +
            +            //inttypes.h
            +            'imaxabs', 'imaxdiv', 'strtoimax', 'strtoumax', 'wcstoimax',
            +            'wcstoumax',
            +
            +            //locale.h
            +            'localeconv', 'setlocale',
            +
            +            //math.h
            +            'acos', 'asin', 'atan', 'atan2', 'ceil', 'cos', 'cosh', 'exp',
            +            'fabs', 'floor', 'frexp', 'ldexp', 'log', 'log10', 'modf', 'pow',
            +            'sin', 'sinh', 'sqrt', 'tan', 'tanh',
            +
            +            //setjmp.h
            +            'longjmp', 'setjmp',
            +
            +            //signal.h
            +            'raise',
            +
            +            //stdarg.h
            +            'va_arg', 'va_copy', 'va_end', 'va_start',
            +
            +            //stddef.h
            +            'offsetof',
            +
            +            //stdio.h
            +            'clearerr', 'fclose', 'fdopen', 'feof', 'ferror', 'fflush', 'fgetc',
            +            'fgetpos', 'fgets', 'fopen', 'fprintf', 'fputc', 'fputchar',
            +            'fputs', 'fread', 'freopen', 'fscanf', 'fseek', 'fsetpos', 'ftell',
            +            'fwrite', 'getc', 'getch', 'getchar', 'gets', 'perror', 'printf',
            +            'putc', 'putchar', 'puts', 'remove', 'rename', 'rewind', 'scanf',
            +            'setbuf', 'setvbuf', 'snprintf', 'sprintf', 'sscanf', 'tmpfile',
            +            'tmpnam', 'ungetc', 'vfprintf', 'vfscanf', 'vprintf', 'vscanf',
            +            'vsprintf', 'vsscanf',
            +
            +            //stdlib.h
            +            'abort', 'abs', 'atexit', 'atof', 'atoi', 'atol', 'bsearch',
            +            'calloc', 'div', 'exit', 'free', 'getenv', 'itoa', 'labs', 'ldiv',
            +            'ltoa', 'malloc', 'qsort', 'rand', 'realloc', 'srand', 'strtod',
            +            'strtol', 'strtoul', 'system',
            +
            +            //string.h
            +            'memchr', 'memcmp', 'memcpy', 'memmove', 'memset', 'strcat',
            +            'strchr', 'strcmp', 'strcoll', 'strcpy', 'strcspn', 'strerror',
            +            'strlen', 'strncat', 'strncmp', 'strncpy', 'strpbrk', 'strrchr',
            +            'strspn', 'strstr', 'strtok', 'strxfrm',
            +
            +            //time.h
            +            'asctime', 'clock', 'ctime', 'difftime', 'gmtime', 'localtime',
            +            'mktime', 'strftime', 'time',
            +
            +            //wchar.h
            +            'btowc', 'fgetwc', 'fgetws', 'fputwc', 'fputws', 'fwide',
            +            'fwprintf', 'fwscanf', 'getwc', 'getwchar', 'mbrlen', 'mbrtowc',
            +            'mbsinit', 'mbsrtowcs', 'putwc', 'putwchar', 'swprintf', 'swscanf',
            +            'ungetwc', 'vfwprintf', 'vswprintf', 'vwprintf', 'wcrtomb',
            +            'wcscat', 'wcschr', 'wcscmp', 'wcscoll', 'wcscpy', 'wcscspn',
            +            'wcsftime', 'wcslen', 'wcsncat', 'wcsncmp', 'wcsncpy', 'wcspbrk',
            +            'wcsrchr', 'wcsrtombs', 'wcsspn', 'wcsstr', 'wcstod', 'wcstok',
            +            'wcstol', 'wcstoul', 'wcsxfrm', 'wctob', 'wmemchr', 'wmemcmp',
            +            'wmemcpy', 'wmemmove', 'wmemset', 'wprintf', 'wscanf',
            +
            +            //wctype.h
            +            'iswalnum', 'iswalpha', 'iswcntrl', 'iswctype', 'iswdigit',
            +            'iswgraph', 'iswlower', 'iswprint', 'iswpunct', 'iswspace',
            +            'iswupper', 'iswxdigit', 'towctrans', 'towlower', 'towupper',
            +            'wctrans', 'wctype'
            +            ),
            +        4 => array(
            +            'auto', 'char', 'const', 'double',  'float', 'int', 'long',
            +            'register', 'short', 'signed', 'sizeof', 'static', 'struct',
            +            'typedef', 'union', 'unsigned', 'void', 'volatile', 'wchar_t',
            +
            +            'int8', 'int16', 'int32', 'int64',
            +            'uint8', 'uint16', 'uint32', 'uint64',
            +
            +            'int_fast8_t', 'int_fast16_t', 'int_fast32_t', 'int_fast64_t',
            +            'uint_fast8_t', 'uint_fast16_t', 'uint_fast32_t', 'uint_fast64_t',
            +
            +            'int_least8_t', 'int_least16_t', 'int_least32_t', 'int_least64_t',
            +            'uint_least8_t', 'uint_least16_t', 'uint_least32_t', 'uint_least64_t',
            +
            +            'int8_t', 'int16_t', 'int32_t', 'int64_t',
            +            'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t',
            +
            +            'intmax_t', 'uintmax_t', 'intptr_t', 'uintptr_t',
            +            'size_t', 'off_t'
            +            ),
            +        // Public API
            +        5 => array(
            +            'AssignProcessToJobObject', 'CommandLineToArgvW', 'ConvertThreadToFiber',
            +            'CreateFiber', 'CreateJobObjectA', 'CreateJobObjectW', 'CreateProcessA',
            +            'CreateProcessAsUserA', 'CreateProcessAsUserW', 'CreateProcessW',
            +            'CreateRemoteThread', 'CreateThread', 'DeleteFiber', 'ExitProcess',
            +            'ExitThread', 'FreeEnvironmentStringsA', 'FreeEnvironmentStringsW',
            +            'GetCommandLineA', 'GetCommandLineW', 'GetCurrentProcess',
            +            'GetCurrentProcessId', 'GetCurrentThread', 'GetCurrentThreadId',
            +            'GetEnvironmentStringsA', 'GetEnvironmentStringsW',
            +            'GetEnvironmentVariableA', 'GetEnvironmentVariableW', 'GetExitCodeProcess',
            +            'GetExitCodeThread', 'GetGuiResources', 'GetPriorityClass',
            +            'GetProcessAffinityMask', 'GetProcessPriorityBoost',
            +            'GetProcessShutdownParameters', 'GetProcessTimes', 'GetProcessVersion',
            +            'GetProcessWorkingSetSize', 'GetStartupInfoA', 'GetStartupInfoW',
            +            'GetThreadPriority', 'GetThreadPriorityBoost', 'GetThreadTimes',
            +            'OpenJobObjectA', 'OpenJobObjectW', 'OpenProcess',
            +            'QueryInformationJobObject', 'ResumeThread', 'SetEnvironmentVariableA',
            +            'SetEnvironmentVariableW', 'SetInformationJobObject', 'SetPriorityClass',
            +            'SetProcessAffinityMask', 'SetProcessPriorityBoost',
            +            'SetProcessShutdownParameters', 'SetProcessWorkingSetSize',
            +            'SetThreadAffinityMask', 'SetThreadIdealProcessor', 'SetThreadPriority',
            +            'SetThreadPriorityBoost', 'Sleep', 'SleepEx', 'SuspendThread',
            +            'SwitchToFiber', 'SwitchToThread', 'TerminateJobObject', 'TerminateProcess',
            +            'TerminateThread', 'WaitForInputIdle', 'WinExec',
            +
            +            '_hread', '_hwrite', '_lclose', '_lcreat', '_llseek', '_lopen', '_lread',
            +            '_lwrite', 'AreFileApisANSI', 'CancelIo', 'CopyFileA', 'CopyFileW',
            +            'CreateDirectoryA', 'CreateDirectoryExA', 'CreateDirectoryExW',
            +            'CreateDirectoryW', 'CreateFileA', 'CreateFileW', 'DeleteFileA',
            +            'DeleteFileW', 'FindClose', 'FindCloseChangeNotification',
            +            'FindFirstChangeNotificationA', 'FindFirstChangeNotificationW',
            +            'FindFirstFileA', 'FindFirstFileW', 'FindNextFileA', 'FindNextFileW',
            +            'FlushFileBuffers', 'GetCurrentDirectoryA', 'GetCurrentDirectoryW',
            +            'GetDiskFreeSpaceA', 'GetDiskFreeSpaceExA', 'GetDiskFreeSpaceExW',
            +            'GetDiskFreeSpaceW', 'GetDriveTypeA', 'GetDriveTypeW', 'GetFileAttributesA',
            +            'GetFileAttributesExA', 'GetFileAttributesExW', 'GetFileAttributesW',
            +            'GetFileInformationByHandle', 'GetFileSize', 'GetFileType',
            +            'GetFullPathNameA', 'GetFullPathNameW', 'GetLogicalDrives',
            +            'GetLogicalDriveStringsA', 'GetLogicalDriveStringsW', 'GetLongPathNameA',
            +            'GetLongPathNameW', 'GetShortPathNameA', 'GetShortPathNameW',
            +            'GetTempFileNameA', 'GetTempFileNameW', 'GetTempPathA', 'GetTempPathW',
            +            'LockFile', 'MoveFileA', 'MoveFileW', 'MulDiv', 'OpenFile',
            +            'QueryDosDeviceA', 'QueryDosDeviceW', 'ReadFile', 'ReadFileEx',
            +            'RemoveDirectoryA', 'RemoveDirectoryW', 'SearchPathA', 'SearchPathW',
            +            'SetCurrentDirectoryA', 'SetCurrentDirectoryW', 'SetEndOfFile',
            +            'SetFileApisToANSI', 'SetFileApisToOEM', 'SetFileAttributesA',
            +            'SetFileAttributesW', 'SetFilePointer', 'SetHandleCount',
            +            'SetVolumeLabelA', 'SetVolumeLabelW', 'UnlockFile', 'WriteFile',
            +            'WriteFileEx',
            +
            +            'DeviceIoControl',
            +
            +            'GetModuleFileNameA', 'GetModuleFileNameW', 'GetProcAddress',
            +            'LoadLibraryA', 'LoadLibraryExA', 'LoadLibraryExW', 'LoadLibraryW',
            +            'LoadModule',
            +
            +            'GetPrivateProfileIntA', 'GetPrivateProfileIntW',
            +            'GetPrivateProfileSectionA', 'GetPrivateProfileSectionNamesA',
            +            'GetPrivateProfileSectionNamesW', 'GetPrivateProfileSectionW',
            +            'GetPrivateProfileStringA', 'GetPrivateProfileStringW',
            +            'GetPrivateProfileStructA', 'GetPrivateProfileStructW',
            +            'GetProfileIntA', 'GetProfileIntW', 'GetProfileSectionA',
            +            'GetProfileSectionW', 'GetProfileStringA', 'GetProfileStringW',
            +            'RegCloseKey', 'RegConnectRegistryA', 'RegConnectRegistryW',
            +            'RegCreateKeyA', 'RegCreateKeyExA', 'RegCreateKeyExW',
            +            'RegCreateKeyW', 'RegDeleteKeyA', 'RegDeleteKeyW', 'RegDeleteValueA',
            +            'RegDeleteValueW', 'RegEnumKeyA', 'RegEnumKeyExA', 'RegEnumKeyExW',
            +            'RegEnumKeyW', 'RegEnumValueA', 'RegEnumValueW', 'RegFlushKey',
            +            'RegGetKeySecurity', 'RegLoadKeyA', 'RegLoadKeyW',
            +            'RegNotifyChangeKeyValue', 'RegOpenKeyA', 'RegOpenKeyExA', 'RegOpenKeyExW',
            +            'RegOpenKeyW', 'RegOverridePredefKey', 'RegQueryInfoKeyA',
            +            'RegQueryInfoKeyW', 'RegQueryMultipleValuesA', 'RegQueryMultipleValuesW',
            +            'RegQueryValueA', 'RegQueryValueExA', 'RegQueryValueExW', 'RegQueryValueW',
            +            'RegReplaceKeyA', 'RegReplaceKeyW', 'RegRestoreKeyA', 'RegRestoreKeyW',
            +            'RegSaveKeyA', 'RegSaveKeyW', 'RegSetKeySecurity', 'RegSetValueA',
            +            'RegSetValueExA', 'RegSetValueExW', 'RegSetValueW', 'RegUnLoadKeyA',
            +            'RegUnLoadKeyW', 'WritePrivateProfileSectionA', 'WritePrivateProfileSectionW',
            +            'WritePrivateProfileStringA', 'WritePrivateProfileStringW',
            +            'WritePrivateProfileStructA', 'WritePrivateProfileStructW',
            +            'WriteProfileSectionA', 'WriteProfileSectionW', 'WriteProfileStringA',
            +            'WriteProfileStringW',
            +
            +            'AccessCheck', 'AccessCheckAndAuditAlarmA', 'AccessCheckAndAuditAlarmW',
            +            'AccessCheckByType', 'AccessCheckByTypeAndAuditAlarmA',
            +            'AccessCheckByTypeAndAuditAlarmW', 'AccessCheckByTypeResultList',
            +            'AccessCheckByTypeResultListAndAuditAlarmA', 'AccessCheckByTypeResultListAndAuditAlarmW',
            +            'AddAccessAllowedAce', 'AddAccessAllowedAceEx', 'AddAccessAllowedObjectAce',
            +            'AddAccessDeniedAce', 'AddAccessDeniedAceEx', 'AddAccessDeniedObjectAce',
            +            'AddAce', 'AddAuditAccessAce', 'AddAuditAccessAceEx', 'AddAuditAccessObjectAce',
            +            'AdjustTokenGroups', 'AdjustTokenPrivileges', 'AllocateAndInitializeSid',
            +            'AllocateLocallyUniqueId', 'AreAllAccessesGranted', 'AreAnyAccessesGranted',
            +            'BuildExplicitAccessWithNameA', 'BuildExplicitAccessWithNameW',
            +            'BuildImpersonateExplicitAccessWithNameA', 'BuildImpersonateExplicitAccessWithNameW',
            +            'BuildImpersonateTrusteeA', 'BuildImpersonateTrusteeW', 'BuildSecurityDescriptorA',
            +            'BuildSecurityDescriptorW', 'BuildTrusteeWithNameA', 'BuildTrusteeWithNameW',
            +            'BuildTrusteeWithSidA', 'BuildTrusteeWithSidW',
            +            'ConvertToAutoInheritPrivateObjectSecurity', 'CopySid', 'CreatePrivateObjectSecurity',
            +            'CreatePrivateObjectSecurityEx', 'CreateRestrictedToken', 'DeleteAce',
            +            'DestroyPrivateObjectSecurity', 'DuplicateToken', 'DuplicateTokenEx',
            +            'EqualPrefixSid', 'EqualSid', 'FindFirstFreeAce', 'FreeSid', 'GetAce',
            +            'GetAclInformation', 'GetAuditedPermissionsFromAclA', 'GetAuditedPermissionsFromAclW',
            +            'GetEffectiveRightsFromAclA', 'GetEffectiveRightsFromAclW',
            +            'GetExplicitEntriesFromAclA', 'GetExplicitEntriesFromAclW', 'GetFileSecurityA',
            +            'GetFileSecurityW', 'GetKernelObjectSecurity', 'GetLengthSid', 'GetMultipleTrusteeA',
            +            'GetMultipleTrusteeOperationA', 'GetMultipleTrusteeOperationW', 'GetMultipleTrusteeW',
            +            'GetNamedSecurityInfoA', 'GetNamedSecurityInfoW', 'GetPrivateObjectSecurity',
            +            'GetSecurityDescriptorControl', 'GetSecurityDescriptorDacl',
            +            'GetSecurityDescriptorGroup', 'GetSecurityDescriptorLength',
            +            'GetSecurityDescriptorOwner', 'GetSecurityDescriptorSacl', 'GetSecurityInfo',
            +            'GetSidIdentifierAuthority', 'GetSidLengthRequired', 'GetSidSubAuthority',
            +            'GetSidSubAuthorityCount', 'GetTokenInformation', 'GetTrusteeFormA',
            +            'GetTrusteeFormW', 'GetTrusteeNameA', 'GetTrusteeNameW', 'GetTrusteeTypeA',
            +            'GetTrusteeTypeW', 'GetUserObjectSecurity', 'ImpersonateLoggedOnUser',
            +            'ImpersonateNamedPipeClient', 'ImpersonateSelf', 'InitializeAcl',
            +            'InitializeSecurityDescriptor', 'InitializeSid', 'IsTokenRestricted', 'IsValidAcl',
            +            'IsValidSecurityDescriptor', 'IsValidSid', 'LogonUserA', 'LogonUserW',
            +            'LookupAccountNameA', 'LookupAccountNameW', 'LookupAccountSidA', 'LookupAccountSidW',
            +            'LookupPrivilegeDisplayNameA', 'LookupPrivilegeDisplayNameW', 'LookupPrivilegeNameA',
            +            'LookupPrivilegeNameW', 'LookupPrivilegeValueA', 'LookupPrivilegeValueW',
            +            'LookupSecurityDescriptorPartsA', 'LookupSecurityDescriptorPartsW', 'MakeAbsoluteSD',
            +            'MakeSelfRelativeSD', 'MapGenericMask', 'ObjectCloseAuditAlarmA',
            +            'ObjectCloseAuditAlarmW', 'ObjectDeleteAuditAlarmA', 'ObjectDeleteAuditAlarmW',
            +            'ObjectOpenAuditAlarmA', 'ObjectOpenAuditAlarmW', 'ObjectPrivilegeAuditAlarmA',
            +            'ObjectPrivilegeAuditAlarmW', 'OpenProcessToken', 'OpenThreadToken', 'PrivilegeCheck',
            +            'PrivilegedServiceAuditAlarmA', 'PrivilegedServiceAuditAlarmW', 'RevertToSelf',
            +            'SetAclInformation', 'SetEntriesInAclA', 'SetEntriesInAclW', 'SetFileSecurityA',
            +            'SetFileSecurityW', 'SetKernelObjectSecurity', 'SetNamedSecurityInfoA',
            +            'SetNamedSecurityInfoW', 'SetPrivateObjectSecurity', 'SetPrivateObjectSecurityEx',
            +            'SetSecurityDescriptorControl', 'SetSecurityDescriptorDacl',
            +            'SetSecurityDescriptorGroup', 'SetSecurityDescriptorOwner',
            +            'SetSecurityDescriptorSacl', 'SetSecurityInfo', 'SetThreadToken',
            +            'SetTokenInformation', 'SetUserObjectSecurity', 'ChangeServiceConfig2A',
            +            'ChangeServiceConfig2W', 'ChangeServiceConfigA', 'ChangeServiceConfigW',
            +            'CloseServiceHandle', 'ControlService', 'CreateServiceA', 'CreateServiceW',
            +            'DeleteService', 'EnumDependentServicesA', 'EnumDependentServicesW',
            +            'EnumServicesStatusA', 'EnumServicesStatusW', 'GetServiceDisplayNameA',
            +            'GetServiceDisplayNameW', 'GetServiceKeyNameA', 'GetServiceKeyNameW',
            +            'LockServiceDatabase', 'NotifyBootConfigStatus', 'OpenSCManagerA', 'OpenSCManagerW',
            +            'OpenServiceA', 'OpenServiceW', 'QueryServiceConfig2A', 'QueryServiceConfig2W',
            +            'QueryServiceConfigA', 'QueryServiceConfigW', 'QueryServiceLockStatusA',
            +            'QueryServiceLockStatusW', 'QueryServiceObjectSecurity', 'QueryServiceStatus',
            +            'RegisterServiceCtrlHandlerA', 'RegisterServiceCtrlHandlerW',
            +            'SetServiceObjectSecurity', 'SetServiceStatus', 'StartServiceA',
            +            'StartServiceCtrlDispatcherA', 'StartServiceCtrlDispatcherW', 'StartServiceW',
            +            'UnlockServiceDatabase',
            +
            +            'MultinetGetConnectionPerformanceA', 'MultinetGetConnectionPerformanceW',
            +            'NetAlertRaise', 'NetAlertRaiseEx', 'NetApiBufferAllocate', 'NetApiBufferFree',
            +            'NetApiBufferReallocate', 'NetApiBufferSize', 'NetConnectionEnum', 'NetFileClose',
            +            'NetFileGetInfo', 'NetGetAnyDCName', 'NetGetDCName', 'NetGetDisplayInformationIndex',
            +            'NetGroupAdd', 'NetGroupAddUser', 'NetGroupDel', 'NetGroupDelUser', 'NetGroupEnum',
            +            'NetGroupGetInfo', 'NetGroupGetUsers', 'NetGroupSetInfo', 'NetGroupSetUsers',
            +            'NetLocalGroupAdd', 'NetLocalGroupAddMember', 'NetLocalGroupAddMembers',
            +            'NetLocalGroupDel', 'NetLocalGroupDelMember', 'NetLocalGroupDelMembers',
            +            'NetLocalGroupEnum', 'NetLocalGroupGetInfo', 'NetLocalGroupGetMembers',
            +            'NetLocalGroupSetInfo', 'NetLocalGroupSetMembers', 'NetMessageBufferSend',
            +            'NetMessageNameAdd', 'NetMessageNameDel', 'NetMessageNameEnum',
            +            'NetMessageNameGetInfo', 'NetQueryDisplayInformation', 'NetRemoteComputerSupports',
            +            'NetRemoteTOd', 'NetReplExportDirAdd', 'NetReplExportDirDel', 'NetReplExportDirEnum',
            +            'NetReplExportDirGetInfo', 'NetReplExportDirLock', 'NetReplExportDirSetInfo',
            +            'NetReplExportDirUnlock', 'NetReplGetInfo', 'NetReplImportDirAdd',
            +            'NetReplImportDirDel', 'NetReplImportDirEnum', 'NetReplImportDirGetInfo',
            +            'NetReplImportDirLock', 'NetReplImportDirUnlock', 'NetReplSetInfo',
            +            'NetScheduleJobAdd', 'NetScheduleJobDel', 'NetScheduleJobEnum',
            +            'NetScheduleJobGetInfo', 'NetServerComputerNameAdd', 'NetServerComputerNameDel',
            +            'NetServerDiskEnum', 'NetServerEnum', 'NetServerEnumEx', 'NetServerGetInfo',
            +            'NetServerSetInfo', 'NetServerTransportAdd', 'NetServerTransportAddEx',
            +            'NetServerTransportDel', 'NetServerTransportEnum', 'NetSessionDel', 'NetSessionEnum',
            +            'NetSessionGetInfo', 'NetShareAdd', 'NetShareCheck', 'NetShareDel', 'NetShareEnum',
            +            'NetShareGetInfo', 'NetShareSetInfo', 'NetStatisticsGet', 'NetUseAdd', 'NetUseDel',
            +            'NetUseEnum', 'NetUseGetInfo', 'NetUserAdd', 'NetUserChangePassword', 'NetUserDel',
            +            'NetUserEnum', 'NetUserGetGroups', 'NetUserGetInfo', 'NetUserGetLocalGroups',
            +            'NetUserModalsGet', 'NetUserModalsSet', 'NetUserSetGroups', 'NetUserSetInfo',
            +            'NetWkstaGetInfo', 'NetWkstaSetInfo', 'NetWkstaTransportAdd', 'NetWkstaTransportDel',
            +            'NetWkstaTransportEnum', 'NetWkstaUserEnum', 'NetWkstaUserGetInfo',
            +            'NetWkstaUserSetInfo', 'WNetAddConnection2A', 'WNetAddConnection2W',
            +            'WNetAddConnection3A', 'WNetAddConnection3W', 'WNetAddConnectionA',
            +            'WNetAddConnectionW', 'WNetCancelConnection2A', 'WNetCancelConnection2W',
            +            'WNetCancelConnectionA', 'WNetCancelConnectionW', 'WNetCloseEnum',
            +            'WNetConnectionDialog', 'WNetConnectionDialog1A', 'WNetConnectionDialog1W',
            +            'WNetDisconnectDialog', 'WNetDisconnectDialog1A', 'WNetDisconnectDialog1W',
            +            'WNetEnumResourceA', 'WNetEnumResourceW', 'WNetGetConnectionA', 'WNetGetConnectionW',
            +            'WNetGetLastErrorA', 'WNetGetLastErrorW', 'WNetGetNetworkInformationA',
            +            'WNetGetNetworkInformationW', 'WNetGetProviderNameA', 'WNetGetProviderNameW',
            +            'WNetGetResourceInformationA', 'WNetGetResourceInformationW',
            +            'WNetGetResourceParentA', 'WNetGetResourceParentW', 'WNetGetUniversalNameA',
            +            'WNetGetUniversalNameW', 'WNetGetUserA', 'WNetGetUserW', 'WNetOpenEnumA',
            +            'WNetOpenEnumW', 'WNetUseConnectionA', 'WnetUseConnectionW',
            +
            +            'accept', 'bind', 'closesocket', 'connect', 'gethostbyaddr', 'gethostbyname',
            +            'gethostname', 'getpeername', 'getprotobyname', 'getprotobynumber', 'getservbyname',
            +            'getservbyport', 'getsockname', 'getsockopt', 'htonl', 'htons', 'inet_addr',
            +            'inet_ntoa', 'ioctlsocket', 'listen', 'ntohl', 'ntohs', 'recv', 'recvfrom', 'select',
            +            'send', 'sendto', 'setsockopt', 'shutdown', 'socket', 'WSAAccept',
            +            'WSAAddressToStringA', 'WSAAddressToStringW', 'WSAAsyncGetHostByAddr',
            +            'WSAAsyncGetHostByName', 'WSAAsyncGetProtoByName', 'WSAAsyncGetProtoByNumber',
            +            'WSAAsyncGetServByName', 'WSAAsyncGetServByPort', 'WSAAsyncSelect',
            +            'WSACancelAsyncRequest', 'WSACancelBlockingCall', 'WSACleanup', 'WSACloseEvent',
            +            'WSAConnect', 'WSACreateEvent', 'WSADuplicateSocketA', 'WSADuplicateSocketW',
            +            'WSAEnumNameSpaceProvidersA', 'WSAEnumNameSpaceProvidersW', 'WSAEnumNetworkEvents',
            +            'WSAEnumProtocolsA', 'WSAEnumProtocolsW', 'WSAEventSelect', 'WSAGetLastError',
            +            'WSAGetOverlappedResult', 'WSAGetQOSByName', 'WSAGetServiceClassInfoA',
            +            'WSAGetServiceClassInfoW', 'WSAGetServiceClassNameByClassIdA',
            +            'WSAGetServiceClassNameByClassIdW', 'WSAHtonl', 'WSAHtons', 'WSAInstallServiceClassA',
            +            'WSAInstallServiceClassW', 'WSAIoctl', 'WSAIsBlocking', 'WSAJoinLeaf',
            +            'WSALookupServiceBeginA', 'WSALookupServiceBeginW', 'WSALookupServiceEnd',
            +            'WSALookupServiceNextA', 'WSALookupServiceNextW', 'WSANtohl', 'WSANtohs',
            +            'WSAProviderConfigChange', 'WSARecv', 'WSARecvDisconnect', 'WSARecvFrom',
            +            'WSARemoveServiceClass', 'WSAResetEvent', 'WSASend', 'WSASendDisconnect', 'WSASendTo',
            +            'WSASetBlockingHook', 'WSASetEvent', 'WSASetLastError', 'WSASetServiceA',
            +            'WSASetServiceW', 'WSASocketA', 'WSASocketW', 'WSAStartup', 'WSAStringToAddressA',
            +            'WSAStringToAddressW', 'WSAUnhookBlockingHook', 'WSAWaitForMultipleEvents',
            +            'WSCDeinstallProvider', 'WSCEnableNSProvider', 'WSCEnumProtocols',
            +            'WSCGetProviderPath', 'WSCInstallNameSpace', 'WSCInstallProvider',
            +            'WSCUnInstallNameSpace',
            +
            +            'ContinueDebugEvent', 'DebugActiveProcess', 'DebugBreak', 'FatalExit',
            +            'FlushInstructionCache', 'GetThreadContext', 'GetThreadSelectorEntry',
            +            'IsDebuggerPresent', 'OutputDebugStringA', 'OutputDebugStringW', 'ReadProcessMemory',
            +            'SetDebugErrorLevel', 'SetThreadContext', 'WaitForDebugEvent', 'WriteProcessMemory',
            +
            +            'CloseHandle', 'DuplicateHandle', 'GetHandleInformation', 'SetHandleInformation',
            +
            +            'AdjustWindowRect', 'AdjustWindowRectEx', 'AllowSetForegroundWindow',
            +            'AnimateWindow', 'AnyPopup', 'ArrangeIconicWindows', 'BeginDeferWindowPos',
            +            'BringWindowToTop', 'CascadeWindows', 'ChildWindowFromPoint',
            +            'ChildWindowFromPointEx', 'CloseWindow', 'CreateWindowExA', 'CreateWindowExW',
            +            'DeferWindowPos', 'DestroyWindow', 'EndDeferWindowPos', 'EnumChildWindows',
            +            'EnumThreadWindows', 'EnumWindows', 'FindWindowA', 'FindWindowExA', 'FindWindowExW',
            +            'FindWindowW', 'GetAltTabInfoA', 'GetAltTabInfoW', 'GetAncestor', 'GetClientRect',
            +            'GetDesktopWindow', 'GetForegroundWindow', 'GetGUIThreadInfo', 'GetLastActivePopup',
            +            'GetLayout', 'GetParent', 'GetProcessDefaultLayout', 'GetTitleBarInf', 'GetTopWindow',
            +            'GetWindow', 'GetWindowInfo', 'GetWindowModuleFileNameA', 'GetWindowModuleFileNameW',
            +            'GetWindowPlacement', 'GetWindowRect', 'GetWindowTextA', 'GetWindowTextLengthA',
            +            'GetWindowTextLengthW', 'GetWindowTextW', 'GetWindowThreadProcessId', 'IsChild',
            +            'IsIconic', 'IsWindow', 'IsWindowUnicode', 'IsWindowVisible', 'IsZoomed',
            +            'LockSetForegroundWindow', 'MoveWindow', 'OpenIcon', 'RealChildWindowFromPoint',
            +            'RealGetWindowClassA', 'RealGetWindowClassW', 'SetForegroundWindow',
            +            'SetLayeredWindowAttributes', 'SetLayout', 'SetParent', 'SetProcessDefaultLayout',
            +            'SetWindowPlacement', 'SetWindowPos', 'SetWindowTextA', 'SetWindowTextW',
            +            'ShowOwnedPopups', 'ShowWindow', 'ShowWindowAsync', 'TileWindows',
            +            'UpdateLayeredWindow', 'WindowFromPoint',
            +
            +            'CreateDialogIndirectParamA', 'CreateDialogIndirectParamW', 'CreateDialogParamA',
            +            'CreateDialogParamW', 'DefDlgProcA', 'DefDlgProcW', 'DialogBoxIndirectParamA',
            +            'DialogBoxIndirectParamW', 'DialogBoxParamA', 'DialogBoxParamW', 'EndDialog',
            +            'GetDialogBaseUnits', 'GetDlgCtrlID', 'GetDlgItem', 'GetDlgItemInt',
            +            'GetDlgItemTextA', 'GetDlgItemTextW', 'GetNextDlgGroupItem', 'GetNextDlgTabItem',
            +            'IsDialogMessageA', 'IsDialogMessageW', 'MapDialogRect', 'MessageBoxA',
            +            'MessageBoxExA', 'MessageBoxExW', 'MessageBoxIndirectA', 'MessageBoxIndirectW',
            +            'MessageBoxW', 'SendDlgItemMessageA', 'SendDlgItemMessageW', 'SetDlgItemInt',
            +            'SetDlgItemTextA', 'SetDlgItemTextW',
            +
            +            'GetWriteWatch', 'GlobalMemoryStatus', 'GlobalMemoryStatusEx', 'IsBadCodePtr',
            +            'IsBadReadPtr', 'IsBadStringPtrA', 'IsBadStringPtrW', 'IsBadWritePtr',
            +            'ResetWriteWatch', 'AllocateUserPhysicalPages', 'FreeUserPhysicalPages',
            +            'MapUserPhysicalPages', 'MapUserPhysicalPagesScatter', 'GlobalAlloc', 'GlobalFlags',
            +            'GlobalFree', 'GlobalHandle', 'GlobalLock', 'GlobalReAlloc', 'GlobalSize',
            +            'GlobalUnlock', 'LocalAlloc', 'LocalFlags', 'LocalFree', 'LocalHandle', 'LocalLock',
            +            'LocalReAlloc', 'LocalSize', 'LocalUnlock', 'GetProcessHeap', 'GetProcessHeaps',
            +            'HeapAlloc', 'HeapCompact', 'HeapCreate', 'HeapDestroy', 'HeapFree', 'HeapLock',
            +            'HeapReAlloc', 'HeapSize', 'HeapUnlock', 'HeapValidate', 'HeapWalk', 'VirtualAlloc',
            +            'VirtualAllocEx', 'VirtualFree', 'VirtualFreeEx', 'VirtualLock', 'VirtualProtect',
            +            'VirtualProtectEx', 'VirtualQuery', 'VirtualQueryEx', 'VirtualUnlock',
            +            'GetFreeSpace', 'GlobalCompact', 'GlobalFix', 'GlobalUnfix', 'GlobalUnWire',
            +            'GlobalWire', 'IsBadHugeReadPtr', 'IsBadHugeWritePtr', 'LocalCompact', 'LocalShrink',
            +
            +            'GetClassInfoA', 'GetClassInfoW', 'GetClassInfoExA', 'GetClassInfoExW',
            +            'GetClassLongA', 'GetClassLongW', 'GetClassLongPtrA', 'GetClassLongPtrW',
            +            'RegisterClassA', 'RegisterClassW', 'RegisterClassExA', 'RegisterClassExW',
            +            'SetClassLongA', 'SetClassLongW', 'SetClassLongPtrA', 'SetClassLongPtrW',
            +            'SetWindowLongA', 'SetWindowLongW', 'SetWindowLongPtrA', 'SetWindowLongPtrW',
            +            'UnregisterClassA', 'UnregisterClassW', 'GetClassWord', 'GetWindowWord',
            +            'SetClassWord', 'SetWindowWord'
            +            ),
            +        // Native API
            +        6 => array(
            +            'CsrAllocateCaptureBuffer', 'CsrAllocateCapturePointer', 'CsrAllocateMessagePointer',
            +            'CsrCaptureMessageBuffer', 'CsrCaptureMessageString', 'CsrCaptureTimeout',
            +            'CsrClientCallServer', 'CsrClientConnectToServer', 'CsrFreeCaptureBuffer',
            +            'CsrIdentifyAlertableThread', 'CsrNewThread', 'CsrProbeForRead', 'CsrProbeForWrite',
            +            'CsrSetPriorityClass',
            +
            +            'LdrAccessResource', 'LdrDisableThreadCalloutsForDll', 'LdrEnumResources',
            +            'LdrFindEntryForAddress', 'LdrFindResource_U', 'LdrFindResourceDirectory_U',
            +            'LdrGetDllHandle', 'LdrGetProcedureAddress', 'LdrInitializeThunk', 'LdrLoadDll',
            +            'LdrProcessRelocationBlock', 'LdrQueryImageFileExecutionOptions',
            +            'LdrQueryProcessModuleInformation', 'LdrShutdownProcess', 'LdrShutdownThread',
            +            'LdrUnloadDll', 'LdrVerifyImageMatchesChecksum',
            +
            +            'NtAcceptConnectPort', 'ZwAcceptConnectPort', 'NtCompleteConnectPort',
            +            'ZwCompleteConnectPort', 'NtConnectPort', 'ZwConnectPort', 'NtCreatePort',
            +            'ZwCreatePort', 'NtImpersonateClientOfPort', 'ZwImpersonateClientOfPort',
            +            'NtListenPort', 'ZwListenPort', 'NtQueryInformationPort', 'ZwQueryInformationPort',
            +            'NtReadRequestData', 'ZwReadRequestData', 'NtReplyPort', 'ZwReplyPort',
            +            'NtReplyWaitReceivePort', 'ZwReplyWaitReceivePort', 'NtReplyWaitReplyPort',
            +            'ZwReplyWaitReplyPort', 'NtRequestPort', 'ZwRequestPort', 'NtRequestWaitReplyPort',
            +            'ZwRequestWaitReplyPort', 'NtSecureConnectPort', 'ZwSecureConnectPort',
            +            'NtWriteRequestData', 'ZwWriteRequestData',
            +
            +            'NtAccessCheck', 'ZwAccessCheck', 'NtAccessCheckAndAuditAlarm',
            +            'ZwAccessCheckAndAuditAlarm', 'NtAccessCheckByType', 'ZwAccessCheckByType',
            +            'NtAccessCheckByTypeAndAuditAlarm', 'ZwAccessCheckByTypeAndAuditAlarm',
            +            'NtAccessCheckByTypeResultList', 'ZwAccessCheckByTypeResultList',
            +            'NtAdjustGroupsToken', 'ZwAdjustGroupsToken', 'NtAdjustPrivilegesToken',
            +            'ZwAdjustPrivilegesToken', 'NtCloseObjectAuditAlarm', 'ZwCloseObjectAuditAlarm',
            +            'NtCreateToken', 'ZwCreateToken', 'NtDeleteObjectAuditAlarm',
            +            'ZwDeleteObjectAuditAlarm', 'NtDuplicateToken', 'ZwDuplicateToken',
            +            'NtFilterToken', 'ZwFilterToken', 'NtImpersonateThread', 'ZwImpersonateThread',
            +            'NtOpenObjectAuditAlarm', 'ZwOpenObjectAuditAlarm', 'NtOpenProcessToken',
            +            'ZwOpenProcessToken', 'NtOpenThreadToken', 'ZwOpenThreadToken', 'NtPrivilegeCheck',
            +            'ZwPrivilegeCheck', 'NtPrivilegedServiceAuditAlarm', 'ZwPrivilegedServiceAuditAlarm',
            +            'NtPrivilegeObjectAuditAlarm', 'ZwPrivilegeObjectAuditAlarm',
            +            'NtQueryInformationToken', 'ZwQueryInformationToken', 'NtQuerySecurityObject',
            +            'ZwQuerySecurityObject', 'NtSetInformationToken', 'ZwSetInformationToken',
            +            'NtSetSecurityObject', 'ZwSetSecurityObject',
            +
            +            'NtAddAtom', 'ZwAddAtom', 'NtDeleteAtom', 'ZwDeleteAtom', 'NtFindAtom', 'ZwFindAtom',
            +            'NtQueryInformationAtom', 'ZwQueryInformationAtom',
            +
            +            'NtAlertResumeThread', 'ZwAlertResumeThread', 'NtAlertThread', 'ZwAlertThread',
            +            'NtCreateProcess', 'ZwCreateProcess', 'NtCreateThread', 'ZwCreateThread',
            +            'NtCurrentTeb', 'NtDelayExecution', 'ZwDelayExecution', 'NtGetContextThread',
            +            'ZwGetContextThread', 'NtOpenProcess', 'ZwOpenProcess', 'NtOpenThread',
            +            'ZwOpenThread', 'NtQueryInformationProcess', 'ZwQueryInformationProcess',
            +            'NtQueryInformationThread', 'ZwQueryInformationThread', 'NtQueueApcThread',
            +            'ZwQueueApcThread', 'NtResumeThread', 'ZwResumeThread', 'NtSetContextThread',
            +            'ZwSetContextThread', 'NtSetHighWaitLowThread', 'ZwSetHighWaitLowThread',
            +            'NtSetInformationProcess', 'ZwSetInformationProcess', 'NtSetInformationThread',
            +            'ZwSetInformationThread', 'NtSetLowWaitHighThread', 'ZwSetLowWaitHighThread',
            +            'NtSuspendThread', 'ZwSuspendThread', 'NtTerminateProcess', 'ZwTerminateProcess',
            +            'NtTerminateThread', 'ZwTerminateThread', 'NtTestAlert', 'ZwTestAlert',
            +            'NtYieldExecution', 'ZwYieldExecution',
            +
            +            'NtAllocateVirtualMemory', 'ZwAllocateVirtualMemory', 'NtAllocateVirtualMemory64',
            +            'ZwAllocateVirtualMemory64', 'NtAreMappedFilesTheSame', 'ZwAreMappedFilesTheSame',
            +            'NtCreateSection', 'ZwCreateSection', 'NtExtendSection', 'ZwExtendSection',
            +            'NtFlushVirtualMemory', 'ZwFlushVirtualMemory', 'NtFreeVirtualMemory',
            +            'ZwFreeVirtualMemory', 'NtFreeVirtualMemory64', 'ZwFreeVirtualMemory64',
            +            'NtLockVirtualMemory', 'ZwLockVirtualMemory', 'NtMapViewOfSection',
            +            'ZwMapViewOfSection', 'NtMapViewOfVlmSection', 'ZwMapViewOfVlmSection',
            +            'NtOpenSection', 'ZwOpenSection', 'NtProtectVirtualMemory', 'ZwProtectVirtualMemory',
            +            'NtProtectVirtualMemory64', 'ZwProtectVirtualMemory64', 'NtQueryVirtualMemory',
            +            'ZwQueryVirtualMemory', 'NtQueryVirtualMemory64', 'ZwQueryVirtualMemory64',
            +            'NtReadVirtualMemory', 'ZwReadVirtualMemory', 'NtReadVirtualMemory64',
            +            'ZwReadVirtualMemory64', 'NtUnlockVirtualMemory', 'ZwUnlockVirtualMemory',
            +            'NtUnmapViewOfSection', 'ZwUnmapViewOfSection', 'NtUnmapViewOfVlmSection',
            +            'ZwUnmapViewOfVlmSection', 'NtWriteVirtualMemory', 'ZwWriteVirtualMemory',
            +            'NtWriteVirtualMemory64', 'ZwWriteVirtualMemory64',
            +
            +            'NtAssignProcessToJobObject', 'ZwAssignProcessToJobObject', 'NtCreateJobObject',
            +            'ZwCreateJobObject', 'NtOpenJobObject', 'ZwOpenJobObject',
            +            'NtQueryInformationJobObject', 'ZwQueryInformationJobObject',
            +            'NtSetInformationJobObject', 'ZwSetInformationJobObject', 'NtTerminateJobObject',
            +            'ZwTerminateJobObject',
            +
            +            'NtCancelIoFile', 'ZwCancelIoFile', 'NtCreateFile', 'ZwCreateFile',
            +            'NtCreateIoCompletion', 'ZwCreateIoCompletion', 'NtDeleteFile', 'ZwDeleteFile',
            +            'NtDeviceIoControlFile', 'ZwDeviceIoControlFile', 'NtFlushBuffersFile',
            +            'ZwFlushBuffersFile', 'NtFsControlFile', 'ZwFsControlFile', 'NtLockFile', 'ZwLockFile',
            +            'NtNotifyChangeDirectoryFile', 'ZwNotifyChangeDirectoryFile', 'NtOpenFile',
            +            'ZwOpenFile', 'NtOpenIoCompletion', 'ZwOpenIoCompletion', 'NtQueryAttributesFile',
            +            'ZwQueryAttributesFile', 'NtQueryDirectoryFile', 'ZwQueryDirectoryFile',
            +            'NtQueryEaFile', 'ZwQueryEaFile', 'NtQueryIoCompletion', 'ZwQueryIoCompletion',
            +            'NtQueryQuotaInformationFile', 'ZwQueryQuotaInformationFile',
            +            'NtQueryVolumeInformationFile', 'ZwQueryVolumeInformationFile', 'NtReadFile',
            +            'ZwReadFile', 'NtReadFile64', 'ZwReadFile64', 'NtReadFileScatter', 'ZwReadFileScatter',
            +            'NtRemoveIoCompletion', 'ZwRemoveIoCompletion', 'NtSetEaFile', 'ZwSetEaFile',
            +            'NtSetInformationFile', 'ZwSetInformationFile', 'NtSetIoCompletion',
            +            'ZwSetIoCompletion', 'NtSetQuotaInformationFile', 'ZwSetQuotaInformationFile',
            +            'NtSetVolumeInformationFile', 'ZwSetVolumeInformationFile', 'NtUnlockFile',
            +            'ZwUnlockFile', 'NtWriteFile', 'ZwWriteFile', 'NtWriteFile64','ZwWriteFile64',
            +            'NtWriteFileGather', 'ZwWriteFileGather', 'NtQueryFullAttributesFile',
            +            'ZwQueryFullAttributesFile', 'NtQueryInformationFile', 'ZwQueryInformationFile',
            +
            +            'RtlAbortRXact', 'RtlAbsoluteToSelfRelativeSD', 'RtlAcquirePebLock',
            +            'RtlAcquireResourceExclusive', 'RtlAcquireResourceShared', 'RtlAddAccessAllowedAce',
            +            'RtlAddAccessDeniedAce', 'RtlAddAce', 'RtlAddActionToRXact', 'RtlAddAtomToAtomTable',
            +            'RtlAddAttributeActionToRXact', 'RtlAddAuditAccessAce', 'RtlAddCompoundAce',
            +            'RtlAdjustPrivilege', 'RtlAllocateAndInitializeSid', 'RtlAllocateHandle',
            +            'RtlAllocateHeap', 'RtlAnsiCharToUnicodeChar', 'RtlAnsiStringToUnicodeSize',
            +            'RtlAnsiStringToUnicodeString', 'RtlAppendAsciizToString', 'RtlAppendStringToString',
            +            'RtlAppendUnicodeStringToString', 'RtlAppendUnicodeToString', 'RtlApplyRXact',
            +            'RtlApplyRXactNoFlush', 'RtlAreAllAccessesGranted', 'RtlAreAnyAccessesGranted',
            +            'RtlAreBitsClear', 'RtlAreBitsSet', 'RtlAssert', 'RtlCaptureStackBackTrace',
            +            'RtlCharToInteger', 'RtlCheckRegistryKey', 'RtlClearAllBits', 'RtlClearBits',
            +            'RtlClosePropertySet', 'RtlCompactHeap', 'RtlCompareMemory', 'RtlCompareMemoryUlong',
            +            'RtlCompareString', 'RtlCompareUnicodeString', 'RtlCompareVariants',
            +            'RtlCompressBuffer', 'RtlConsoleMultiByteToUnicodeN', 'RtlConvertExclusiveToShared',
            +            'RtlConvertLongToLargeInteger', 'RtlConvertPropertyToVariant',
            +            'RtlConvertSharedToExclusive', 'RtlConvertSidToUnicodeString',
            +            'RtlConvertUiListToApiList', 'RtlConvertUlongToLargeInteger',
            +            'RtlConvertVariantToProperty', 'RtlCopyLuid', 'RtlCopyLuidAndAttributesArray',
            +            'RtlCopySecurityDescriptor', 'RtlCopySid', 'RtlCopySidAndAttributesArray',
            +            'RtlCopyString', 'RtlCopyUnicodeString', 'RtlCreateAcl', 'RtlCreateAndSetSD',
            +            'RtlCreateAtomTable', 'RtlCreateEnvironment', 'RtlCreateHeap',
            +            'RtlCreateProcessParameters', 'RtlCreatePropertySet', 'RtlCreateQueryDebugBuffer',
            +            'RtlCreateRegistryKey', 'RtlCreateSecurityDescriptor', 'RtlCreateTagHeap',
            +            'RtlCreateUnicodeString', 'RtlCreateUnicodeStringFromAsciiz', 'RtlCreateUserProcess',
            +            'RtlCreateUserSecurityObject', 'RtlCreateUserThread', 'RtlCustomCPToUnicodeN',
            +            'RtlCutoverTimeToSystemTime', 'RtlDecompressBuffer', 'RtlDecompressFragment',
            +            'RtlDelete', 'RtlDeleteAce', 'RtlDeleteAtomFromAtomTable', 'RtlDeleteCriticalSection',
            +            'RtlDeleteElementGenericTable', 'RtlDeleteNoSplay', 'RtlDeleteRegistryValue',
            +            'RtlDeleteResource', 'RtlDeleteSecurityObject', 'RtlDeNormalizeProcessParams',
            +            'RtlDestroyAtomTable', 'RtlDestroyEnvironment', 'RtlDestroyHandleTable',
            +            'RtlDestroyHeap', 'RtlDestroyProcessParameters', 'RtlDestroyQueryDebugBuffer',
            +            'RtlDetermineDosPathNameType_U', 'RtlDoesFileExists_U', 'RtlDosPathNameToNtPathName_U',
            +            'RtlDosSearchPath_U', 'RtlDowncaseUnicodeString', 'RtlDumpResource',
            +            'RtlEmptyAtomTable', 'RtlEnlargedIntegerMultiply', 'RtlEnlargedUnsignedDivide',
            +            'RtlEnlargedUnsignedMultiply', 'RtlEnterCriticalSection', 'RtlEnumerateGenericTable',
            +            'RtlEnumerateGenericTableWithoutSplaying', 'RtlEnumerateProperties',
            +            'RtlEnumProcessHeaps', 'RtlEqualComputerName', 'RtlEqualDomainName', 'RtlEqualLuid',
            +            'RtlEqualPrefixSid', 'RtlEqualSid', 'RtlEqualString', 'RtlEqualUnicodeString',
            +            'RtlEraseUnicodeString', 'RtlExpandEnvironmentStrings_U', 'RtlExtendedIntegerMultiply',
            +            'RtlExtendedLargeIntegerDivide', 'RtlExtendedMagicDivide', 'RtlExtendHeap',
            +            'RtlFillMemory', 'RtlFillMemoryUlong', 'RtlFindClearBits', 'RtlFindClearBitsAndSet',
            +            'RtlFindLongestRunClear', 'RtlFindLongestRunSet', 'RtlFindMessage', 'RtlFindSetBits',
            +            'RtlFindSetBitsAndClear', 'RtlFirstFreeAce', 'RtlFlushPropertySet',
            +            'RtlFormatCurrentUserKeyPath', 'RtlFormatMessage', 'RtlFreeAnsiString',
            +            'RtlFreeHandle', 'RtlFreeHeap', 'RtlFreeOemString', 'RtlFreeSid',
            +            'RtlFreeUnicodeString', 'RtlFreeUserThreadStack', 'RtlGenerate8dot3Name', 'RtlGetAce',
            +            'RtlGetCallersAddress', 'RtlGetCompressionWorkSpaceSize',
            +            'RtlGetControlSecurityDescriptor', 'RtlGetCurrentDirectory_U',
            +            'RtlGetDaclSecurityDescriptor', 'RtlGetElementGenericTable', 'RtlGetFullPathName_U',
            +            'RtlGetGroupSecurityDescriptor', 'RtlGetLongestNtPathLength', 'RtlGetNtGlobalFlags',
            +            'RtlGetNtProductType', 'RtlGetOwnerSecurityDescriptor', 'RtlGetProcessHeaps',
            +            'RtlGetSaclSecurityDescriptor', 'RtlGetUserInfoHeap', 'RtlGuidToPropertySetName',
            +            'RtlIdentifierAuthoritySid', 'RtlImageDirectoryEntryToData', 'RtlImageNtHeader',
            +            'RtlImageRvaToSection', 'RtlImageRvaToVa', 'RtlImpersonateSelf', 'RtlInitAnsiString',
            +            'RtlInitCodePageTable', 'RtlInitializeAtomPackage', 'RtlInitializeBitMap',
            +            'RtlInitializeContext', 'RtlInitializeCriticalSection',
            +            'RtlInitializeCriticalSectionAndSpinCount', 'RtlInitializeGenericTable',
            +            'RtlInitializeHandleTable', 'RtlInitializeResource', 'RtlInitializeRXact',
            +            'RtlInitializeSid', 'RtlInitNlsTables', 'RtlInitString', 'RtlInitUnicodeString',
            +            'RtlInsertElementGenericTable', 'RtlIntegerToChar', 'RtlIntegerToUnicodeString',
            +            'RtlIsDosDeviceName_U', 'RtlIsGenericTableEmpty', 'RtlIsNameLegalDOS8Dot3',
            +            'RtlIsTextUnicode', 'RtlIsValidHandle', 'RtlIsValidIndexHandle', 'RtlLargeIntegerAdd',
            +            'RtlLargeIntegerArithmeticShift', 'RtlLargeIntegerDivide', 'RtlLargeIntegerNegate',
            +            'RtlLargeIntegerShiftLeft', 'RtlLargeIntegerShiftRight', 'RtlLargeIntegerSubtract',
            +            'RtlLargeIntegerToChar', 'RtlLeaveCriticalSection', 'RtlLengthRequiredSid',
            +            'RtlLengthSecurityDescriptor', 'RtlLengthSid', 'RtlLocalTimeToSystemTime',
            +            'RtlLockHeap', 'RtlLookupAtomInAtomTable', 'RtlLookupElementGenericTable',
            +            'RtlMakeSelfRelativeSD', 'RtlMapGenericMask', 'RtlMoveMemory',
            +            'RtlMultiByteToUnicodeN', 'RtlMultiByteToUnicodeSize', 'RtlNewInstanceSecurityObject',
            +            'RtlNewSecurityGrantedAccess', 'RtlNewSecurityObject', 'RtlNormalizeProcessParams',
            +            'RtlNtStatusToDosError', 'RtlNumberGenericTableElements', 'RtlNumberOfClearBits',
            +            'RtlNumberOfSetBits', 'RtlOemStringToUnicodeSize', 'RtlOemStringToUnicodeString',
            +            'RtlOemToUnicodeN', 'RtlOnMappedStreamEvent', 'RtlOpenCurrentUser',
            +            'RtlPcToFileHeader', 'RtlPinAtomInAtomTable', 'RtlpNtCreateKey',
            +            'RtlpNtEnumerateSubKey', 'RtlpNtMakeTemporaryKey', 'RtlpNtOpenKey',
            +            'RtlpNtQueryValueKey', 'RtlpNtSetValueKey', 'RtlPrefixString',
            +            'RtlPrefixUnicodeString', 'RtlPropertySetNameToGuid', 'RtlProtectHeap',
            +            'RtlpUnWaitCriticalSection', 'RtlpWaitForCriticalSection', 'RtlQueryAtomInAtomTable',
            +            'RtlQueryEnvironmentVariable_U', 'RtlQueryInformationAcl',
            +            'RtlQueryProcessBackTraceInformation', 'RtlQueryProcessDebugInformation',
            +            'RtlQueryProcessHeapInformation', 'RtlQueryProcessLockInformation',
            +            'RtlQueryProperties', 'RtlQueryPropertyNames', 'RtlQueryPropertySet',
            +            'RtlQueryRegistryValues', 'RtlQuerySecurityObject', 'RtlQueryTagHeap',
            +            'RtlQueryTimeZoneInformation', 'RtlRaiseException', 'RtlRaiseStatus', 'RtlRandom',
            +            'RtlReAllocateHeap', 'RtlRealPredecessor', 'RtlRealSuccessor', 'RtlReleasePebLock',
            +            'RtlReleaseResource', 'RtlRemoteCall', 'RtlResetRtlTranslations',
            +            'RtlRunDecodeUnicodeString', 'RtlRunEncodeUnicodeString', 'RtlSecondsSince1970ToTime',
            +            'RtlSecondsSince1980ToTime', 'RtlSelfRelativeToAbsoluteSD', 'RtlSetAllBits',
            +            'RtlSetAttributesSecurityDescriptor', 'RtlSetBits', 'RtlSetCriticalSectionSpinCount',
            +            'RtlSetCurrentDirectory_U', 'RtlSetCurrentEnvironment', 'RtlSetDaclSecurityDescriptor',
            +            'RtlSetEnvironmentVariable', 'RtlSetGroupSecurityDescriptor', 'RtlSetInformationAcl',
            +            'RtlSetOwnerSecurityDescriptor', 'RtlSetProperties', 'RtlSetPropertyNames',
            +            'RtlSetPropertySetClassId', 'RtlSetSaclSecurityDescriptor', 'RtlSetSecurityObject',
            +            'RtlSetTimeZoneInformation', 'RtlSetUnicodeCallouts', 'RtlSetUserFlagsHeap',
            +            'RtlSetUserValueHeap', 'RtlSizeHeap', 'RtlSplay', 'RtlStartRXact',
            +            'RtlSubAuthorityCountSid', 'RtlSubAuthoritySid', 'RtlSubtreePredecessor',
            +            'RtlSubtreeSuccessor', 'RtlSystemTimeToLocalTime', 'RtlTimeFieldsToTime',
            +            'RtlTimeToElapsedTimeFields', 'RtlTimeToSecondsSince1970', 'RtlTimeToSecondsSince1980',
            +            'RtlTimeToTimeFields', 'RtlTryEnterCriticalSection', 'RtlUnicodeStringToAnsiSize',
            +            'RtlUnicodeStringToAnsiString', 'RtlUnicodeStringToCountedOemString',
            +            'RtlUnicodeStringToInteger', 'RtlUnicodeStringToOemSize',
            +            'RtlUnicodeStringToOemString', 'RtlUnicodeToCustomCPN', 'RtlUnicodeToMultiByteN',
            +            'RtlUnicodeToMultiByteSize', 'RtlUnicodeToOemN', 'RtlUniform', 'RtlUnlockHeap',
            +            'RtlUnwind', 'RtlUpcaseUnicodeChar', 'RtlUpcaseUnicodeString',
            +            'RtlUpcaseUnicodeStringToAnsiString', 'RtlUpcaseUnicodeStringToCountedOemString',
            +            'RtlUpcaseUnicodeStringToOemString', 'RtlUpcaseUnicodeToCustomCPN',
            +            'RtlUpcaseUnicodeToMultiByteN', 'RtlUpcaseUnicodeToOemN', 'RtlUpperChar',
            +            'RtlUpperString', 'RtlUsageHeap', 'RtlValidAcl', 'RtlValidateHeap',
            +            'RtlValidateProcessHeaps', 'RtlValidSecurityDescriptor', 'RtlValidSid', 'RtlWalkHeap',
            +            'RtlWriteRegistryValue', 'RtlxAnsiStringToUnicodeSize', 'RtlxOemStringToUnicodeSize',
            +            'RtlxUnicodeStringToAnsiSize', 'RtlxUnicodeStringToOemSize', 'RtlZeroHeap',
            +            'RtlZeroMemory',
            +
            +            'NtCancelTimer', 'ZwCancelTimer', 'NtCreateTimer', 'ZwCreateTimer', 'NtGetTickCount',
            +            'ZwGetTickCount', 'NtOpenTimer', 'ZwOpenTimer', 'NtQueryPerformanceCounter',
            +            'ZwQueryPerformanceCounter', 'NtQuerySystemTime', 'ZwQuerySystemTime', 'NtQueryTimer',
            +            'ZwQueryTimer', 'NtQueryTimerResolution', 'ZwQueryTimerResolution', 'NtSetSystemTime',
            +            'ZwSetSystemTime', 'NtSetTimer', 'ZwSetTimer', 'NtSetTimerResolution',
            +            'ZwSetTimerResolution',
            +
            +            'NtClearEvent', 'ZwClearEvent', 'NtCreateEvent', 'ZwCreateEvent', 'NtCreateEventPair',
            +            'ZwCreateEventPair', 'NtCreateMutant', 'ZwCreateMutant', 'NtCreateSemaphore',
            +            'ZwCreateSemaphore', 'NtOpenEvent', 'ZwOpenEvent', 'NtOpenEventPair',
            +            'ZwOpenEventPair', 'NtOpenMutant', 'ZwOpenMutant', 'NtOpenSemaphore',
            +            'ZwOpenSemaphore', 'NtPulseEvent', 'ZwPulseEvent', 'NtQueryEvent', 'ZwQueryEvent',
            +            'NtQueryMutant', 'ZwQueryMutant', 'NtQuerySemaphore', 'ZwQuerySemaphore',
            +            'NtReleaseMutant', 'ZwReleaseMutant', 'NtReleaseProcessMutant',
            +            'ZwReleaseProcessMutant', 'NtReleaseSemaphore', 'ZwReleaseSemaphore',
            +            'NtReleaseThreadMutant', 'ZwReleaseThreadMutant', 'NtResetEvent', 'ZwResetEvent',
            +            'NtSetEvent', 'ZwSetEvent', 'NtSetHighEventPair', 'ZwSetHighEventPair',
            +            'NtSetHighWaitLowEventPair', 'ZwSetHighWaitLowEventPair', 'NtSetLowEventPair',
            +            'ZwSetLowEventPair', 'NtSetLowWaitHighEventPair', 'ZwSetLowWaitHighEventPair',
            +            'NtSignalAndWaitForSingleObject', 'ZwSignalAndWaitForSingleObject',
            +            'NtWaitForMultipleObjects', 'ZwWaitForMultipleObjects', 'NtWaitForSingleObject',
            +            'ZwWaitForSingleObject', 'NtWaitHighEventPair', 'ZwWaitHighEventPair',
            +            'NtWaitLowEventPair', 'ZwWaitLowEventPair',
            +
            +            'NtClose', 'ZwClose', 'NtCreateDirectoryObject', 'ZwCreateDirectoryObject',
            +            'NtCreateSymbolicLinkObject', 'ZwCreateSymbolicLinkObject',
            +            'NtDuplicateObject', 'ZwDuplicateObject', 'NtMakeTemporaryObject',
            +            'ZwMakeTemporaryObject', 'NtOpenDirectoryObject', 'ZwOpenDirectoryObject',
            +            'NtOpenSymbolicLinkObject', 'ZwOpenSymbolicLinkObject', 'NtQueryDirectoryObject',
            +            'ZwQueryDirectoryObject', 'NtQueryObject', 'ZwQueryObject',
            +            'NtQuerySymbolicLinkObject', 'ZwQuerySymbolicLinkObject', 'NtSetInformationObject',
            +            'ZwSetInformationObject',
            +
            +            'NtContinue', 'ZwContinue', 'NtRaiseException', 'ZwRaiseException',
            +            'NtRaiseHardError', 'ZwRaiseHardError', 'NtSetDefaultHardErrorPort',
            +            'ZwSetDefaultHardErrorPort',
            +
            +            'NtCreateChannel', 'ZwCreateChannel', 'NtListenChannel', 'ZwListenChannel',
            +            'NtOpenChannel', 'ZwOpenChannel', 'NtReplyWaitSendChannel', 'ZwReplyWaitSendChannel',
            +            'NtSendWaitReplyChannel', 'ZwSendWaitReplyChannel', 'NtSetContextChannel',
            +            'ZwSetContextChannel',
            +
            +            'NtCreateKey', 'ZwCreateKey', 'NtDeleteKey', 'ZwDeleteKey', 'NtDeleteValueKey',
            +            'ZwDeleteValueKey', 'NtEnumerateKey', 'ZwEnumerateKey', 'NtEnumerateValueKey',
            +            'ZwEnumerateValueKey', 'NtFlushKey', 'ZwFlushKey', 'NtInitializeRegistry',
            +            'ZwInitializeRegistry', 'NtLoadKey', 'ZwLoadKey', 'NtLoadKey2', 'ZwLoadKey2',
            +            'NtNotifyChangeKey', 'ZwNotifyChangeKey', 'NtOpenKey', 'ZwOpenKey', 'NtQueryKey',
            +            'ZwQueryKey', 'NtQueryMultipleValueKey', 'ZwQueryMultipleValueKey',
            +            'NtQueryMultiplValueKey', 'ZwQueryMultiplValueKey', 'NtQueryValueKey',
            +            'ZwQueryValueKey', 'NtReplaceKey', 'ZwReplaceKey', 'NtRestoreKey', 'ZwRestoreKey',
            +            'NtSaveKey', 'ZwSaveKey', 'NtSetInformationKey', 'ZwSetInformationKey',
            +            'NtSetValueKey', 'ZwSetValueKey', 'NtUnloadKey', 'ZwUnloadKey',
            +
            +            'NtCreateMailslotFile', 'ZwCreateMailslotFile', 'NtCreateNamedPipeFile',
            +            'ZwCreateNamedPipeFile', 'NtCreatePagingFile', 'ZwCreatePagingFile',
            +
            +            'NtCreateProfile', 'ZwCreateProfile', 'NtQueryIntervalProfile',
            +            'ZwQueryIntervalProfile', 'NtRegisterThreadTerminatePort',
            +            'ZwRegisterThreadTerminatePort', 'NtSetIntervalProfile', 'ZwSetIntervalProfile',
            +            'NtStartProfile', 'ZwStartProfile', 'NtStopProfile', 'ZwStopProfile',
            +            'NtSystemDebugControl', 'ZwSystemDebugControl',
            +
            +            'NtEnumerateBus', 'ZwEnumerateBus', 'NtFlushInstructionCache',
            +            'ZwFlushInstructionCache', 'NtFlushWriteBuffer', 'ZwFlushWriteBuffer',
            +            'NtSetLdtEntries', 'ZwSetLdtEntries',
            +
            +            'NtGetPlugPlayEvent', 'ZwGetPlugPlayEvent', 'NtPlugPlayControl', 'ZwPlugPlayControl',
            +
            +            'NtInitiatePowerAction', 'ZwInitiatePowerAction', 'NtPowerInformation',
            +            'ZwPowerInformation', 'NtRequestWakeupLatency', 'ZwRequestWakeupLatency',
            +            'NtSetSystemPowerState', 'ZwSetSystemPowerState', 'NtSetThreadExecutionState',
            +            'ZwSetThreadExecutionState',
            +
            +            'NtLoadDriver', 'ZwLoadDriver', 'NtRegisterNewDevice', 'ZwRegisterNewDevice',
            +            'NtUnloadDriver', 'ZwUnloadDriver',
            +
            +            'NtQueryDefaultLocale', 'ZwQueryDefaultLocale', 'NtQueryDefaultUILanguage',
            +            'ZwQueryDefaultUILanguage', 'NtQuerySystemEnvironmentValue',
            +            'ZwQuerySystemEnvironmentValue', 'NtSetDefaultLocale', 'ZwSetDefaultLocale',
            +            'NtSetDefaultUILanguage', 'ZwSetDefaultUILanguage', 'NtSetSystemEnvironmentValue',
            +            'ZwSetSystemEnvironmentValue',
            +
            +            'DbgBreakPoint', 'DbgPrint', 'DbgPrompt', 'DbgSsHandleKmApiMsg', 'DbgSsInitialize',
            +            'DbgUiConnectToDbg', 'DbgUiContinue', 'DbgUiWaitStateChange', 'DbgUserBreakPoint',
            +            'KiRaiseUserExceptionDispatcher', 'KiUserApcDispatcher', 'KiUserCallbackDispatcher',
            +            'KiUserExceptionDispatcher', 'NlsAnsiCodePage', 'NlsMbCodePageTag',
            +            'NlsMbOemCodePageTag', 'NtAllocateLocallyUniqueId', 'ZwAllocateLocallyUniqueId',
            +            'NtAllocateUuids', 'ZwAllocateUuids', 'NtCallbackReturn', 'ZwCallbackReturn',
            +            'NtDisplayString', 'ZwDisplayString', 'NtQueryOleDirectoryFile',
            +            'ZwQueryOleDirectoryFile', 'NtQuerySection', 'ZwQuerySection',
            +            'NtQuerySystemInformation', 'ZwQuerySystemInformation', 'NtSetSystemInformation',
            +            'ZwSetSystemInformation', 'NtShutdownSystem', 'ZwShutdownSystem', 'NtVdmControl',
            +            'ZwVdmControl', 'NtW32Call', 'ZwW32Call', 'PfxFindPrefix', 'PfxInitialize',
            +            'PfxInsertPrefix', 'PfxRemovePrefix', 'PropertyLengthAsVariant', 'RestoreEm87Context',
            +            'SaveEm87Context'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '{', '}', '[', ']',
            +        '+', '-', '*', '/', '%',
            +        '=', '<', '>',
            +        '!', '^', '&', '|',
            +        '?', ':',
            +        ';', ','
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        5 => true,
            +        6 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;',
            +            2 => 'color: #000000; font-weight: bold;',
            +            3 => 'color: #000066;',
            +            4 => 'color: #993333;',
            +            5 => 'color: #4000dd;',
            +            6 => 'color: #4000dd;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; font-style: italic;',
            +            2 => 'color: #339933;',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;',
            +            1 => 'color: #000099; font-weight: bold;',
            +            2 => 'color: #660099; font-weight: bold;',
            +            3 => 'color: #660099; font-weight: bold;',
            +            4 => 'color: #660099; font-weight: bold;',
            +            5 => 'color: #006699; font-weight: bold;',
            +            'HARD' => '',
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #0000dd;',
            +            GESHI_NUMBER_BIN_PREFIX_0B => 'color: #208080;',
            +            GESHI_NUMBER_OCT_PREFIX => 'color: #208080;',
            +            GESHI_NUMBER_HEX_PREFIX => 'color: #208080;',
            +            GESHI_NUMBER_FLT_SCI_SHORT => 'color:#800080;',
            +            GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;',
            +            GESHI_NUMBER_FLT_NONSCI_F => 'color:#800080;',
            +            GESHI_NUMBER_FLT_NONSCI => 'color:#800080;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #202020;',
            +            2 => 'color: #202020;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #339933;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => 'http://www.opengroup.org/onlinepubs/009695399/functions/{FNAMEL}.html',
            +        4 => '',
            +        5 => 'http://www.google.com/search?q={FNAMEL}+msdn.microsoft.com',
            +        6 => 'http://www.google.com/search?q={FNAMEL}+msdn.microsoft.com'
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.',
            +        2 => '::'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4
            +);
            diff --git a/vendor/easybook/geshi/geshi/caddcl.php b/vendor/easybook/geshi/geshi/caddcl.php
            new file mode 100644
            index 0000000000..0135a7aec9
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/caddcl.php
            @@ -0,0 +1,124 @@
            + 'CAD DCL',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'boxed_column','boxed_radio_column','boxed_radio_row','boxed_row',
            +            'column','concatenation','button','dialog','edit_box','image','image_button',
            +            'errtile','list_box','ok_cancel','ok_cancel_help','ok_cancel_help_errtile',
            +            'ok_cancel_help_info','ok_only','paragraph','popup_list','radio_button',
            +            'radio_column','radio_row','row','slider','spacer','spacer_0','spacer_1','text',
            +            'text_part','toggle',
            +            'action','alignment','allow_accept','aspect_ratio','big_increment',
            +            'children_alignment','children_fixed_height',
            +            'children_fixed_width','color',
            +            'edit_limit','edit_width','fixed_height','fixed_width',
            +            'height','initial_focus','is_cancel','is_default',
            +            'is_enabled','is_tab_stop','is-bold','key','label','layout','list',
            +            'max_value','min_value','mnemonic','multiple_select','password_char',
            +            'small_increment','tabs','tab_truncate','value','width',
            +            'false','true','left','right','centered','top','bottom',
            +            'dialog_line','dialog_foreground','dialog_background',
            +            'graphics_background','black','red','yellow','green','cyan',
            +            'blue','magenta','whitegraphics_foreground',
            +            'horizontal','vertical'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/cadlisp.php b/vendor/easybook/geshi/geshi/cadlisp.php
            new file mode 100644
            index 0000000000..41d72ca278
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/cadlisp.php
            @@ -0,0 +1,184 @@
            + 'CAD Lisp',
            +    'COMMENT_SINGLE' => array(1 => ";"),
            +    'COMMENT_MULTI' => array(";|" => "|;"),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'abs','acad_colordlg','acad_helpdlg','acad_strlsort','action_tile',
            +            'add_list','alert','alloc','and','angle','angtof','angtos','append','apply',
            +            'arx','arxload','arxunload','ascii','assoc','atan','atof','atoi','atom',
            +            'atoms-family','autoarxload','autoload','Boole','boundp','caddr',
            +            'cadr','car','cdr','chr','client_data_tile','close','command','cond',
            +            'cons','cos','cvunit','defun','defun-q','defun-q-list-ref',
            +            'defun-q-list-set','dictadd','dictnext','dictremove','dictrename',
            +            'dictsearch','dimx_tile','dimy_tile','distance','distof','done_dialog',
            +            'end_image','end_list','entdel','entget','entlast','entmake',
            +            'entmakex','entmod','entnext','entsel','entupd','eq','equal','eval','exit',
            +            'exp','expand','expt','fill_image','findfile','fix','float','foreach','function',
            +            'gc','gcd','get_attr','get_tile','getangle','getcfg','getcname','getcorner',
            +            'getdist','getenv','getfiled','getint','getkword','getorient','getpoint',
            +            'getreal','getstring','getvar','graphscr','grclear','grdraw','grread','grtext',
            +            'grvecs','handent','help','if','initdia','initget','inters','itoa','lambda','last',
            +            'layoutlist','length','list','listp','load','load_dialog','log','logand','logior',
            +            'lsh','mapcar','max','mem','member','menucmd','menugroup','min','minusp','mode_tile',
            +            'namedobjdict','nentsel','nentselp','new_dialog','nil','not','nth','null',
            +            'numberp','open','or','osnap','polar','prin1','princ','print','progn','prompt',
            +            'quit','quote','read','read-char','read-line','redraw','regapp','rem','repeat',
            +            'reverse','rtos','set','set_tile','setcfg','setenv','setfunhelp','setq','setvar',
            +            'setview','sin','slide_image','snvalid','sqrt','ssadd','ssdel','ssget','ssgetfirst',
            +            'sslength','ssmemb','ssname','ssnamex','sssetfirst','start_dialog','start_image',
            +            'start_list','startapp','strcase','strcat','strlen','subst','substr','t','tablet',
            +            'tblnext','tblobjname','tblsearch','term_dialog','terpri','textbox','textpage',
            +            'textscr','trace','trans','type','unload_dialog','untrace','vector_image','ver',
            +            'vports','wcmatch','while','write-char','write-line','xdroom','xdsize','zerop',
            +            'vl-acad-defun','vl-acad-undefun','vl-arx-import','vlax-3D-point',
            +            'vlax-add-cmd','vlax-create-object','vlax-curve-getArea',
            +            'vlax-curve-getClosestPointTo','vlax-curve-getClosestPointToProjection',
            +            'vlax-curve-getDistAtParam','vlax-curve-getDistAtPoint',
            +            'vlax-curve-getEndParam','vlax-curve-getEndPoint',
            +            'vlax-curve-getFirstDeriv','vlax-curve-getParamAtDist',
            +            'vlax-curve-getParamAtPoint','vlax-curve-getPointAtDist',
            +            'vlax-curve-getPointAtParam','vlax-curve-getSecondDeriv',
            +            'vlax-curve-getStartParam','vlax-curve-getStartPoint',
            +            'vlax-curve-isClosed','vlax-curve-isPeriodic','vlax-curve-isPlanar',
            +            'vlax-dump-object','vlax-erased-p','vlax-for','vlax-get-acad-object',
            +            'vlax-get-object','vlax-get-or-create-object','vlax-get-property',
            +            'vlax-import-type-library','vlax-invoke-method','vlax-ldata-delete',
            +            'vlax-ldata-get','vlax-ldata-list','vlax-ldata-put','vlax-ldata-test',
            +            'vlax-make-safearray','vlax-make-variant','vlax-map-collection',
            +            'vlax-method-applicable-p','vlax-object-released-p','vlax-product-key',
            +            'vlax-property-available-p','vlax-put-property','vlax-read-enabled-p',
            +            'vlax-release-object','vlax-remove-cmd','vlax-safearray-fill',
            +            'vlax-safearray-get-dim','vlax-safearray-get-element',
            +            'vlax-safearray-get-l-bound','vlax-safearray-get-u-bound',
            +            'vlax-safearray-put-element','vlax-safearray-type','vlax-tmatrix',
            +            'vlax-typeinfo-available-p','vlax-variant-change-type',
            +            'vlax-variant-type','vlax-variant-value','vlax-write-enabled-p',
            +            'vl-bb-ref','vl-bb-set','vl-catch-all-apply','vl-catch-all-error-message',
            +            'vl-catch-all-error-p','vl-cmdf','vl-consp','vl-directory-files','vl-doc-export',
            +            'vl-doc-import','vl-doc-ref','vl-doc-set','vl-every','vl-exit-with-error',
            +            'vl-exit-with-value','vl-file-copy','vl-file-delete','vl-file-directory-p',
            +            'vl-filename-base','vl-filename-directory','vl-filename-extension',
            +            'vl-filename-mktemp','vl-file-rename','vl-file-size','vl-file-systime',
            +            'vl-get-resource','vlisp-compile','vl-list-exported-functions',
            +            'vl-list-length','vl-list-loaded-vlx','vl-load-all','vl-load-com',
            +            'vl-load-reactors','vl-member-if','vl-member-if-not','vl-position',
            +            'vl-prin1-to-string','vl-princ-to-string','vl-propagate','vlr-acdb-reactor',
            +            'vlr-add','vlr-added-p','vlr-beep-reaction','vlr-command-reactor',
            +            'vlr-current-reaction-name','vlr-data','vlr-data-set',
            +            'vlr-deepclone-reactor','vlr-docmanager-reactor','vlr-dwg-reactor',
            +            'vlr-dxf-reactor','vlr-editor-reactor','vl-registry-delete',
            +            'vl-registry-descendents','vl-registry-read','vl-registry-write',
            +            'vl-remove','vl-remove-if','vl-remove-if-not','vlr-insert-reactor',
            +            'vlr-linker-reactor','vlr-lisp-reactor','vlr-miscellaneous-reactor',
            +            'vlr-mouse-reactor','vlr-notification','vlr-object-reactor',
            +            'vlr-owner-add','vlr-owner-remove','vlr-owners','vlr-pers','vlr-pers-list',
            +            'vlr-pers-p','vlr-pers-release','vlr-reaction-names','vlr-reactions',
            +            'vlr-reaction-set','vlr-reactors','vlr-remove','vlr-remove-all',
            +            'vlr-set-notification','vlr-sysvar-reactor','vlr-toolbar-reactor',
            +            'vlr-trace-reaction','vlr-type','vlr-types','vlr-undo-reactor',
            +            'vlr-wblock-reactor','vlr-window-reactor','vlr-xref-reactor',
            +            'vl-some','vl-sort','vl-sort-i','vl-string-elt','vl-string-left-trim',
            +            'vl-string-mismatch','vl-string-position','vl-string-right-trim',
            +            'vl-string-search','vl-string-subst','vl-string-translate','vl-string-trim',
            +            'vl-symbol-name','vl-symbolp','vl-symbol-value','vl-unload-vlx','vl-vbaload',
            +            'vl-vbarun','vl-vlx-loaded-p'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '{', '}', '[', ']', '!', '%', '^', '&', '/','+','-','*','=','<','>'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/cfdg.php b/vendor/easybook/geshi/geshi/cfdg.php
            new file mode 100644
            index 0000000000..eeb7c2f3d4
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/cfdg.php
            @@ -0,0 +1,122 @@
            +
            + * Copyright: (c) 2006 John Horigan http://www.ozonehouse.com/john/
            + * Release Version: 1.0.8.11
            + * Date Started: 2006/03/11
            + *
            + * CFDG language file for GeSHi.
            + *
            + * CHANGES
            + * -------
            + * 2006/03/11 (1.0.0)
            + *  -  First Release
            + *
            + * TODO (updated 2006/03/11)
            + * -------------------------
            + *
            + *************************************************************************************
            + *
            + *     This file is part of GeSHi.
            + *
            + *   GeSHi is free software; you can redistribute it and/or modify
            + *   it under the terms of the GNU General Public License as published by
            + *   the Free Software Foundation; either version 2 of the License, or
            + *   (at your option) any later version.
            + *
            + *   GeSHi is distributed in the hope that it will be useful,
            + *   but WITHOUT ANY WARRANTY; without even the implied warranty of
            + *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
            + *   GNU General Public License for more details.
            + *
            + *   You should have received a copy of the GNU General Public License
            + *   along with GeSHi; if not, write to the Free Software
            + *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
            + *
            + ************************************************************************************/
            +
            +$language_data = array (
            +    'LANG_NAME' => 'CFDG',
            +    'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'include', 'startshape', 'rule', 'background'
            +            ),
            +        2 => array(
            +            'SQUARE', 'CIRCLE', 'TRIANGLE',
            +            ),
            +        3 => array(
            +            'b','brightness','h','hue','sat','saturation',
            +            'a','alpha','x','y','z','s','size',
            +            'r','rotate','f','flip','skew','xml_set_object'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '[', ']', '{', '}', '*', '|'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #717100;',
            +            2 => 'color: #000000; font-weight: bold;',
            +            3 => 'color: #006666;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;',
            +            2 => 'color: #808080; font-style: italic;',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #006600;',
            +            2 => 'color: #006600;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            0 => '',
            +            1 => '',
            +            2 => '',
            +            3 => ''
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/cfm.php b/vendor/easybook/geshi/geshi/cfm.php
            new file mode 100644
            index 0000000000..8829ace4d2
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/cfm.php
            @@ -0,0 +1,298 @@
            + 'ColdFusion',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        /* CFM Tags */
            +        1 => array(
            +            'cfabort', 'cfapplet', 'cfapplication', 'cfargument', 'cfassociate',
            +            'cfbreak', 'cfcache', 'cfcase', 'cfcatch', 'cfchart', 'cfchartdata',
            +            'cfchartseries', 'cfcol', 'cfcollection', 'cfcomponent',
            +            'cfcontent', 'cfcookie', 'cfdefaultcase', 'cfdirectory',
            +            'cfdocument', 'cfdocumentitem', 'cfdocumentsection', 'cfdump',
            +            'cfelse', 'cfelseif', 'cferror', 'cfexecute', 'cfexit', 'cffile',
            +            'cfflush', 'cfform', 'cfformgroup', 'cfformitem', 'cfftp',
            +            'cffunction', 'cfgrid', 'cfgridcolumn', 'cfgridrow', 'cfgridupdate',
            +            'cfheader', 'cfhtmlhead', 'cfhttp', 'cfhttpparam', 'cfif',
            +            'cfimport', 'cfinclude', 'cfindex', 'cfinput', 'cfinsert',
            +            'cfinvoke', 'cfinvokeargument', 'cfldap', 'cflocation', 'cflock',
            +            'cflog', 'cflogin', 'cfloginuser', 'cflogout', 'cfloop', 'cfmail',
            +            'cfmailparam', 'cfmailpart', 'cfmodule', 'cfNTauthenticate',
            +            'cfobject', 'cfobjectcache', 'cfoutput', 'cfparam', 'cfpop',
            +            'cfprocessingdirective', 'cfprocparam',
            +            'cfprocresult', 'cfproperty', 'cfquery', 'cfqueryparam',
            +            'cfregistry', 'cfreport', 'cfreportparam', 'cfrethrow', 'cfreturn',
            +            'cfsavecontent', 'cfschedule', 'cfscript', 'cfsearch', 'cfselect',
            +            'cfset', 'cfsetting', 'cfsilent', 'cfstoredproc',
            +            'cfswitch', 'cftable', 'cftextarea', 'cfthrow', 'cftimer',
            +            'cftrace', 'cftransaction', 'cftree', 'cftreeitem', 'cftry',
            +            'cfupdate', 'cfwddx'
            +            ),
            +        /* HTML Tags */
            +        2 => array(
            +            'a', 'abbr', 'acronym', 'address', 'applet',
            +
            +            'base', 'basefont', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'b',
            +
            +            'caption', 'center', 'cite', 'code', 'colgroup', 'col',
            +
            +            'dd', 'del', 'dfn', 'dir', 'div', 'dl', 'dt',
            +
            +            'em',
            +
            +            'fieldset', 'font', 'form', 'frame', 'frameset',
            +
            +            'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'html',
            +
            +            'iframe', 'ilayer', 'img', 'input', 'ins', 'isindex', 'i',
            +
            +            'kbd',
            +
            +            'label', 'legend', 'link', 'li',
            +
            +            'map', 'meta',
            +
            +            'noframes', 'noscript',
            +
            +            'object', 'ol', 'optgroup', 'option',
            +
            +            'param', 'pre', 'p',
            +
            +            'q',
            +
            +            'samp', 'script', 'select', 'small', 'span', 'strike', 'strong', 'style', 'sub', 'sup', 's',
            +
            +            'table', 'tbody', 'td', 'textarea', 'text', 'tfoot', 'thead', 'th', 'title', 'tr', 'tt',
            +
            +            'ul', 'u',
            +
            +            'var',
            +            ),
            +        /* HTML attributes */
            +        3 => array(
            +            'abbr', 'accept-charset', 'accept', 'accesskey', 'action', 'align', 'alink', 'alt', 'archive', 'axis',
            +            'background', 'bgcolor', 'border',
            +            'cellpadding', 'cellspacing', 'char', 'charoff', 'charset', 'checked', 'cite', 'class', 'classid', 'clear', 'code', 'codebase', 'codetype', 'color', 'cols', 'colspan', 'compact', 'content', 'coords',
            +            'data', 'datetime', 'declare', 'defer', 'dir', 'disabled',
            +            'enctype',
            +            'face', 'for', 'frame', 'frameborder',
            +            'headers', 'height', 'href', 'hreflang', 'hspace', 'http-equiv',
            +            'id', 'ismap',
            +            'label', 'lang', 'language', 'link', 'longdesc',
            +            'marginheight', 'marginwidth', 'maxlength', 'media', 'method', 'multiple',
            +            'name', 'nohref', 'noresize', 'noshade', 'nowrap',
            +            'object', 'onblur', 'onchange', 'onclick', 'ondblclick', 'onfocus', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onreset', 'onselect', 'onsubmit', 'onunload',
            +            'profile', 'prompt',
            +            'readonly', 'rel', 'rev', 'rowspan', 'rows', 'rules',
            +            'scheme', 'scope', 'scrolling', 'selected', 'shape', 'size', 'span', 'src', 'standby', 'start', 'style', 'summary',
            +            'tabindex', 'target', 'text', 'title', 'type',
            +            'usemap',
            +            'valign', 'value', 'valuetype', 'version', 'vlink', 'vspace',
            +            'width'
            +            ),
            +        /* CFM Script delimeters */
            +        4 => array(
            +            'var', 'function', 'while', 'if','else'
            +            ),
            +        /* CFM Functions */
            +        5 => array(
            +            'Abs', 'GetFunctionList', 'LSTimeFormat','ACos','GetGatewayHelper','LTrim','AddSOAPRequestHeader','GetHttpRequestData',
            +            'Max','AddSOAPResponseHeader','GetHttpTimeString','Mid','ArrayAppend','GetLocale','Min','ArrayAvg','GetLocaleDisplayName',
            +            'Minute','ArrayClear','GetMetaData','Month','ArrayDeleteAt','GetMetricData','MonthAsString','ArrayInsertAt','GetPageContext',
            +            'Now','ArrayIsEmpty','GetProfileSections','NumberFormat','ArrayLen','GetProfileString','ParagraphFormat','ArrayMax',
            +            'GetLocalHostIP','ParseDateTime','ArrayMin','GetSOAPRequest','Pi','ArrayNew','GetSOAPRequestHeader','PreserveSingleQuotes',
            +            'ArrayPrepend','GetSOAPResponse','Quarter','ArrayResize','GetSOAPResponseHeader','QueryAddColumn','ArraySet',
            +            'GetTempDirectory','QueryAddRow','ArraySort','QueryNew','ArraySum','GetTempFile','QuerySetCell',
            +            'ArraySwap','GetTickCount','QuotedValueList','ArrayToList','GetTimeZoneInfo','Rand','Asc','GetToken','Randomize',
            +            'ASin','Hash','RandRange','Atn','Hour','REFind','BinaryDecode','HTMLCodeFormat','REFindNoCase','BinaryEncode',
            +            'HTMLEditFormat','ReleaseComObject','BitAnd','IIf','RemoveChars','BitMaskClear','IncrementValue','RepeatString',
            +            'BitMaskRead','InputBaseN','Replace','BitMaskSet','Insert','ReplaceList','BitNot','Int','ReplaceNoCase','BitOr',
            +            'IsArray','REReplace','BitSHLN','IsBinary','REReplaceNoCase','BitSHRN','IsBoolean','Reverse','BitXor','IsCustomFunction',
            +            'Right','Ceiling','IsDate','RJustify','CharsetDecode','IsDebugMode','Round','CharsetEncode','IsDefined','RTrim',
            +            'Chr','IsLeapYear','Second','CJustify','IsLocalHost','SendGatewayMessage','Compare','IsNumeric','SetEncoding',
            +            'CompareNoCase','IsNumericDate','SetLocale','Cos','IsObject','SetProfileString','CreateDate','IsQuery','SetVariable',
            +            'CreateDateTime','IsSimpleValue','Sgn','CreateObject','IsSOAPRequest','Sin','CreateODBCDate','IsStruct','SpanExcluding',
            +            'CreateODBCDateTime','IsUserInRole','SpanIncluding','CreateODBCTime','IsValid','Sqr','CreateTime','IsWDDX','StripCR',
            +            'CreateTimeSpan','IsXML','StructAppend','CreateUUID','IsXmlAttribute','StructClear','DateAdd','IsXmlDoc','StructCopy',
            +            'DateCompare','IsXmlElem','StructCount','DateConvert','IsXmlNode','StructDelete','DateDiff','IsXmlRoot','StructFind',
            +            'DateFormat','JavaCast','StructFindKey','DatePart','JSStringFormat','StructFindValue','Day','LCase','StructGet',
            +            'DayOfWeek','Left','StructInsert','DayOfWeekAsString','Len','StructIsEmpty','DayOfYear','ListAppend','StructKeyArray',
            +            'DaysInMonth','ListChangeDelims','StructKeyExists','DaysInYear','ListContains','StructKeyList','DE','ListContainsNoCase',
            +            'StructNew','DecimalFormat','ListDeleteAt','StructSort','DecrementValue','ListFind','StructUpdate','Decrypt','ListFindNoCase',
            +            'Tan','DecryptBinary','ListFirst','TimeFormat','DeleteClientVariable','ListGetAt','ToBase64','DirectoryExists',
            +            'ListInsertAt','ToBinary','DollarFormat','ListLast','ToScript','Duplicate','ListLen','ToString','Encrypt','ListPrepend',
            +            'Trim','EncryptBinary','ListQualify','UCase','Evaluate','ListRest','URLDecode','Exp','ListSetAt','URLEncodedFormat',
            +            'ExpandPath','ListSort','URLSessionFormat','FileExists','ListToArray','Val','Find','ListValueCount','ValueList',
            +            'FindNoCase','ListValueCountNoCase','Week','FindOneOf','LJustify','Wrap','FirstDayOfMonth','Log','WriteOutput',
            +            'Fix','Log10','XmlChildPos','FormatBaseN','LSCurrencyFormat','XmlElemNew','GetAuthUser','LSDateFormat','XmlFormat',
            +            'GetBaseTagData','LSEuroCurrencyFormat','XmlGetNodeType','GetBaseTagList','LSIsCurrency','XmlNew','GetBaseTemplatePath',
            +            'LSIsDate','XmlParse','GetClientVariablesList','LSIsNumeric','XmlSearch','GetCurrentTemplatePath','LSNumberFormat',
            +            'XmlTransform','GetDirectoryFromPath','LSParseCurrency','XmlValidate','GetEncoding','LSParseDateTime','Year',
            +            'GetException','LSParseEuroCurrency','YesNoFormat','GetFileFromPath','LSParseNumber'
            +            ),
            +        /* CFM Attributes */
            +        6 => array(
            +            'dbtype','connectstring','datasource','username','password','query','delimeter','description','required','hint','default','access','from','to','list','index'
            +            ),
            +        7 => array(
            +            'EQ', 'GT', 'LT', 'GTE', 'LTE', 'IS', 'LIKE', 'NEQ'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '/', '=', '{', '}', '(', ')', '[', ']', '<', '>', '&'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        5 => false,
            +        6 => false,
            +        7 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #990000; font-weight: bold;',
            +            2 => 'color: #000000; font-weight: bold;',
            +            3 => 'color: #0000FF;',
            +            4 => 'color: #000000; font-weight: bold;',
            +            5 => 'color: #0000FF;',
            +            6 => 'color: #0000FF;',
            +            7 => 'color: #0000FF;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #0000FF;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #FF0000;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #0000FF;'
            +            ),
            +        'SCRIPT' => array(
            +            0 => 'color: #808080; font-style: italic;',
            +            1 => 'color: #00bbdd;',
            +            2 => 'color: #0000FF;',
            +            3 => 'color: #000099;',
            +            4 => 'color: #333333;',
            +            5 => 'color: #333333;'
            +            ),
            +        'REGEXPS' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => 'http://december.com/html/4/element/{FNAMEL}.html',
            +        3 => '',
            +        4 => '',
            +        5 => '',
            +        6 => '',
            +        7 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_ALWAYS,
            +    'SCRIPT_DELIMITERS' => array(
            +        0 => array(
            +            ''
            +            ),
            +        1 => array(
            +            ' '>'
            +            ),
            +        2 => "/(?!<#)(?:(?:##)*)(#)[a-zA-Z0-9_\.\(\)]+(#)/",
            +        3 => array(
            +            '' => ''
            +            ),
            +        4 => array(
            +            '<' => '>'
            +            ),
            +        5 => '/((?!])+?(>)/si'
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        0 => false,
            +        1 => false,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        5 => true
            +        ),
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            1 => array(
            +                'DISALLOWED_BEFORE' => '(?<=<|<\/)',
            +                'DISALLOWED_AFTER' => '(?=\s|\/|>)',
            +                ),
            +            2 => array(
            +                'DISALLOWED_BEFORE' => '(?<=<|<\/)',
            +                'DISALLOWED_AFTER' => '(?=\s|\/|>)',
            +                ),
            +            3 => array(
            +                'DISALLOWED_BEFORE' => '(?|^])', // allow ; before keywords
            +                'DISALLOWED_AFTER' => '(?![a-zA-Z0-9_\|%\\-])', // allow & after keywords
            +                ),
            +            7 => array(
            +                'DISALLOWED_BEFORE' => '(?&|^])', // allow ; before keywords
            +                'DISALLOWED_AFTER' => '(?![a-zA-Z0-9_\|%\\-])', // allow & after keywords
            +                )
            +            )
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/chaiscript.php b/vendor/easybook/geshi/geshi/chaiscript.php
            new file mode 100644
            index 0000000000..b3ce86f6ed
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/chaiscript.php
            @@ -0,0 +1,139 @@
            + 'ChaiScript',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    //Regular Expressions
            +    'COMMENT_REGEXP' => array(2 => "/(?<=[\\s^])s\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])m?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\,\\;\\)])/iU"),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'break', 'else', 'elseif', 'eval', 'for', 'if', 'return', 'while', 'try', 'catch', 'finally',
            +            ),
            +        2 => array(
            +            'def', 'false', 'fun', 'true', 'var', 'attr',
            +            ),
            +        3 => array(
            +            // built in functions
            +            'throw',
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '[', ']', '{', '}',
            +        '+', '-', '*', '/', '%',
            +        '!', '@', '&', '|', '^',
            +        '<', '>', '=',
            +        ',', ';', '?', ':'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000066; font-weight: bold;',
            +            2 => 'color: #003366; font-weight: bold;',
            +            3 => 'color: #000066;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #006600; font-style: italic;',
            +            2 => 'color: #009966; font-style: italic;',
            +            'MULTI' => 'color: #006600; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #3366CC;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #CC0000;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #660066;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #339933;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            0 => '',
            +            1 => '',
            +            2 => '',
            +            3 => ''
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_MAYBE,
            +    'SCRIPT_DELIMITERS' => array(
            +        0 => array(
            +            ),
            +        1 => array(
            +            )
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        0 => true,
            +        1 => true
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/chapel.php b/vendor/easybook/geshi/geshi/chapel.php
            new file mode 100644
            index 0000000000..d0e50e6149
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/chapel.php
            @@ -0,0 +1,169 @@
            + 'Chapel',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'ESCAPE_REGEXP' => array(
            +        ),
            +    'NUMBERS' =>
            +        GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B |
            +        GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI | GESHI_NUMBER_FLT_NONSCI_F |
            +        GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO,
            +    'KEYWORDS' => array(
            +        // statements
            +        1 => array(
            +            'atomic', 'begin', 'break', 'class', 'cobegin', 'coforall',
            +            'continue', 'do', 'else', 'export', 'extern', 'for', 'forall', 'if',
            +            'iter', 'inline', 'label', 'let', 'local', 'module',
            +            'otherwise', 'proc', 'record', 'return', 'select', 'serial',
            +            'then', 'use', 'var', 'when', 'where', 'while', 'yield'
            +            ),
            +        // literals
            +        2 => array(
            +            'nil', 'true', 'false'
            +            ),
            +        // built-in functions
            +        3 => array(
            +            'by', 'delete', 'dmapped', 'domain', 'enum', 'index', 'min',
            +            'minloc', 'max', 'maxloc', 'new', 'range', 'reduce', 'scan',
            +            'sparse', 'subdomain', 'sync', 'union', 'zip'
            +            ),
            +        // built-in types
            +        4 => array(
            +            'config', 'const', 'in', 'inout', 'opaque', 'on', 'out', 'param',
            +            'ref', 'single', 'type'
            +            ),
            +        // library types
            +        5 => array(
            +            'void', 'bool', 'int', 'uint', 'real', 'imag', 'complex', 'string',
            +            'locale'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '{', '}', '[', ']',
            +        '+', '-', '*', '/', '%',
            +        '=', '<', '>',
            +        '!', '^', '&', '|',
            +        '?', ':',
            +        ';', ','
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        5 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;',
            +            2 => 'color: #000000; font-weight: bold;',
            +            3 => 'color: #000066;',
            +            4 => 'color: #993333;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; font-style: italic;',
            +            //2 => 'color: #339933;',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;',
            +            1 => 'color: #000099; font-weight: bold;',
            +            2 => 'color: #660099; font-weight: bold;',
            +            3 => 'color: #660099; font-weight: bold;',
            +            4 => 'color: #660099; font-weight: bold;',
            +            5 => 'color: #006699; font-weight: bold;',
            +            'HARD' => '',
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #0000dd;',
            +            GESHI_NUMBER_BIN_PREFIX_0B => 'color: #208080;',
            +            GESHI_NUMBER_OCT_PREFIX => 'color: #208080;',
            +            GESHI_NUMBER_HEX_PREFIX => 'color: #208080;',
            +            GESHI_NUMBER_FLT_SCI_SHORT => 'color:#800080;',
            +            GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;',
            +            GESHI_NUMBER_FLT_NONSCI_F => 'color:#800080;',
            +            GESHI_NUMBER_FLT_NONSCI => 'color:#800080;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #202020;',
            +            2 => 'color: #202020;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #339933;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.',
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4
            +);
            diff --git a/vendor/easybook/geshi/geshi/cil.php b/vendor/easybook/geshi/geshi/cil.php
            new file mode 100644
            index 0000000000..a108f2498c
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/cil.php
            @@ -0,0 +1,194 @@
            + 'CIL',
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'COMMENT_SINGLE' => array('//'),
            +    'COMMENT_MULTI' => array(),
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(//Dotted
            +            '.zeroinit', '.vtfixup', '.vtentry', '.vtable', '.ver', '.try', '.subsystem', '.size', '.set', '.removeon',
            +            '.publickeytoken', '.publickey', '.property', '.permissionset', '.permission', '.pdirect', '.param', '.pack',
            +            '.override', '.other', '.namespace', '.mresource', '.module', '.method', '.maxstack', '.manifestres', '.locals',
            +            '.localized', '.locale', '.line', '.language', '.import', '.imagebase', '.hash', '.get', '.fire', '.file', '.field',
            +            '.export', '.event', '.entrypoint', '.emitbyte', '.data', '.custom', '.culture', '.ctor', '.corflags', '.class',
            +            '.cctor', '.assembly', '.addon'
            +            ),
            +        2 => array(//Attributes
            +            'wrapper', 'with', 'winapi', 'virtual', 'vector', 'vararg', 'value', 'userdefined', 'unused', 'unmanagedexp',
            +            'unmanaged', 'unicode', 'to', 'tls', 'thiscall', 'synchronized', 'struct', 'strict', 'storage', 'stdcall',
            +            'static', 'specialname', 'special', 'serializable', 'sequential', 'sealed', 'runtime', 'rtspecialname', 'request',
            +            'reqsecobj', 'reqrefuse', 'reqopt', 'reqmin', 'record', 'public', 'privatescope', 'private', 'preservesig',
            +            'prejitgrant', 'prejitdeny', 'platformapi', 'pinvokeimpl', 'pinned', 'permitonly', 'out', 'optil', 'opt',
            +            'notserialized', 'notremotable', 'not_in_gc_heap', 'noprocess', 'noncaslinkdemand', 'noncasinheritance',
            +            'noncasdemand', 'nometadata', 'nomangle', 'nomachine', 'noinlining', 'noappdomain', 'newslot', 'nested', 'native',
            +            'modreq', 'modopt', 'marshal', 'managed', 'literal', 'linkcheck', 'lcid', 'lasterr', 'internalcall', 'interface',
            +            'instance', 'initonly', 'init', 'inheritcheck', 'in', 'import', 'implicitres', 'implicitcom', 'implements',
            +            'illegal', 'il', 'hidebysig', 'handler', 'fromunmanaged', 'forwardref', 'fixed', 'finally', 'final', 'filter',
            +            'filetime', 'field', 'fault', 'fastcall', 'famorassem', 'family', 'famandassem', 'extern', 'extends', 'explicit',
            +            'error', 'enum', 'endmac', 'deny', 'demand', 'default', 'custom', 'compilercontrolled', 'clsid', 'class', 'cil',
            +            'cf', 'cdecl', 'catch', 'beforefieldinit', 'autochar', 'auto', 'at', 'assert', 'assembly', 'as', 'any', 'ansi',
            +            'alignment', 'algorithm', 'abstract'
            +            ),
            +        3 => array(//Types
            +            'wchar', 'void', 'variant', 'unsigned', 'valuetype', 'typedref', 'tbstr', 'sysstring', 'syschar', 'string',
            +            'streamed_object', 'stream', 'stored_object', 'safearray', 'objectref', 'object', 'nullref', 'method', 'lpwstr',
            +            'lpvoid', 'lptstr', 'lpstruct', 'lpstr', 'iunknown', 'int64', 'int32', 'int16', 'int8', 'int', 'idispatch',
            +            'hresult', 'float64', 'float32', 'float', 'decimal', 'date', 'currency', 'char', 'carray', 'byvalstr',
            +            'bytearray', 'boxed', 'bool', 'blob_object', 'blob', 'array'
            +            ),
            +        4 => array(//Prefix
            +            'volatile', 'unaligned', 'tail', 'readonly', 'no', 'constrained'
            +            ),
            +        5 => array(//Suffix
            +            'un', 'u8', 'u4', 'u2', 'u1', 'u', 's', 'ref', 'r8', 'r4', 'm1', 'i8', 'i4', 'i2', 'i1', 'i'#, '.8', '.7', '.6', '.5', '.4', '.3', '.2', '.1', '.0'
            +            ),
            +        6 => array(//Base
            +            'xor', 'switch', 'sub', 'stloc',
            +            'stind', 'starg',
            +            'shr', 'shl', 'ret', 'rem', 'pop', 'or', 'not', 'nop', 'neg', 'mul',
            +            'localloc', 'leave', 'ldnull', 'ldloca',
            +            'ldloc', 'ldind', 'ldftn', 'ldc', 'ldarga',
            +            'ldarg', 'jmp', 'initblk', 'endfinally', 'endfilter',
            +            'endfault', 'dup', 'div', 'cpblk', 'conv', 'clt', 'ckfinite', 'cgt', 'ceq', 'calli',
            +            'call', 'brzero', 'brtrue', 'brnull', 'brinst',
            +            'brfalse', 'break', 'br', 'bne', 'blt', 'ble', 'bgt', 'bge', 'beq', 'arglist',
            +            'and', 'add'
            +            ),
            +        7 => array(//Object
            +            'unbox.any', 'unbox', 'throw', 'stsfld', 'stobj', 'stfld', 'stelem', 'sizeof', 'rethrow', 'refanyval', 'refanytype', 'newobj',
            +            'newarr', 'mkrefany', 'ldvirtftn', 'ldtoken', 'ldstr', 'ldsflda', 'ldsfld', 'ldobj', 'ldlen', 'ldflda', 'ldfld',
            +            'ldelema', 'ldelem', 'isinst', 'initobj', 'cpobj', 'castclass',
            +            'callvirt', 'callmostderived', 'box'
            +            ),
            +        8 => array(//Other
            +            'prefixref', 'prefix7', 'prefix6', 'prefix5', 'prefix4', 'prefix3', 'prefix2', 'prefix1', 'prefix0'
            +            ),
            +        9 => array(//Literal
            +            'true', 'null', 'false'
            +            ),
            +        10 => array(//Comment-like
            +            '#line', '^THE_END^'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '[', ']', '{', '}', '!', '!!'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        5 => true,
            +        6 => true,
            +        7 => true,
            +        8 => true,
            +        9 => true,
            +        10 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color:maroon;font-weight:bold;',
            +            2 => 'color:blue;font-weight:bold;',
            +            3 => 'color:purple;font-weight:bold;',
            +            4 => 'color:teal;',
            +            5 => 'color:blue;',
            +            6 => 'color:blue;',
            +            7 => 'color:blue;',
            +            8 => 'color:blue;',
            +            9 => 'color:00008B',
            +            10 => 'color:gray'
            +            ),
            +        'COMMENTS' => array(
            +            0 => 'color:gray;font-style:italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #008000; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #006400;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #008000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #00008B;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #000033;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #006400;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color:blue;'
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => '',
            +        6 => '',
            +        7 => '',
            +        8 => '',
            +        9 => '',
            +        10 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '::'
            +        ),
            +    'REGEXPS' => array(
            +        0 => '(?<=ldc\\.i4\\.)[0-8]|(?<=(?:ldarg|ldloc|stloc)\\.)[0-3]' # Pickup the opcodes that end with integers
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4
            +);
            diff --git a/vendor/easybook/geshi/geshi/clojure.php b/vendor/easybook/geshi/geshi/clojure.php
            new file mode 100644
            index 0000000000..0e8f8edbb1
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/clojure.php
            @@ -0,0 +1,133 @@
            + 'Clojure',
            +    'COMMENT_SINGLE' => array(1 => ';'),
            +    'COMMENT_MULTI' => array(';|' => '|;'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'defn', 'defn-', 'defmulti', 'defmethod', 'defmacro', 'deftest',
            +            'defstruct', 'def', 'defonce', 'let', 'letfn', 'do', 'cond', 'condp',
            +            'for', 'loop', 'recur', 'when', 'when-not', 'when-let', 'when-first',
            +            'if', 'if-let', 'if-not', 'doto', 'and', 'or','not','aget','aset',
            +            'dosync', 'doseq', 'dotimes', 'dorun', 'doall',
            +            'load', 'import', 'unimport', 'ns', 'in-ns', 'refer', 'print',
            +            'try', 'catch', 'finally', 'throw', 'fn', 'update-in',
            +            'with-open', 'with-local-vars', 'binding',
            +            'gen-class', 'gen-and-load-class', 'gen-and-save-class',
            +            'implement', 'proxy', 'lazy-cons', 'with-meta',
            +            'struct', 'struct-map', 'delay', 'locking', 'sync', 'time', 'apply',
            +            'remove', 'merge', 'interleave', 'interpose', 'distinct',
            +            'cons', 'concat', 'lazy-cat', 'cycle', 'rest', 'frest', 'drop',
            +            'drop-while', 'nthrest', 'take', 'take-while', 'take-nth', 'butlast',
            +            'reverse', 'sort', 'sort-by', 'split-at', 'partition', 'split-with',
            +            'first', 'ffirst', 'rfirst', 'zipmap', 'into', 'set', 'vec',
            +            'to-array-2d', 'not-empty', 'seq?', 'not-every?', 'every?', 'not-any?',
            +            'map', 'mapcat', 'vector?', 'list?', 'hash-map', 'reduce', 'filter',
            +            'vals', 'keys', 'rseq', 'subseq', 'rsubseq', 'count', 'empty?',
            +            'fnseq', 'repeatedly', 'iterate', 'drop-last',
            +            'repeat', 'replicate', 'range',  'into-array',
            +            'line-seq', 'resultset-seq', 're-seq', 're-find', 'tree-seq', 'file-seq',
            +            'iterator-seq', 'enumeration-seq', 'declare',  'xml-seq',
            +            'symbol?', 'string?', 'vector', 'conj', 'str',
            +            'pos?', 'neg?', 'zero?', 'nil?', 'inc', 'dec', 'format',
            +            'alter', 'commute', 'ref-set', 'floor', 'assoc', 'send', 'send-off'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '{', '}', '[', ']', '!', '%', '^', '&', '/','+','-','*','=','<','>',';','|', '.', '..', '->',
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => true,
            +        1 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            0 => 'color: #555;',
            +            1 => 'color: #555;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +            '::', ':'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/cmake.php b/vendor/easybook/geshi/geshi/cmake.php
            new file mode 100644
            index 0000000000..01630eb890
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/cmake.php
            @@ -0,0 +1,180 @@
            + ()
            + *  -  First Release
            + *
            + * TODO (updated )
            + * -------------------------
            + *
            + *************************************************************************************
            + *
            + *     This file is part of GeSHi.
            + *
            + *   GeSHi is free software; you can redistribute it and/or modify
            + *   it under the terms of the GNU General Public License as published by
            + *   the Free Software Foundation; either version 2 of the License, or
            + *   (at your option) any later version.
            + *
            + *   GeSHi is distributed in the hope that it will be useful,
            + *   but WITHOUT ANY WARRANTY; without even the implied warranty of
            + *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
            + *   GNU General Public License for more details.
            + *
            + *   You should have received a copy of the GNU General Public License
            + *   along with GeSHi; if not, write to the Free Software
            + *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
            + *
            + ************************************************************************************/
            +
            +$language_data = array (
            +    'LANG_NAME' => 'CMake',
            +    'COMMENT_SINGLE' => array(1 => '#'),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'ESCAPE_REGEXP' => array(
            +        // Quoted variables ${...}
            +        1 => "/\\$(ENV)?\\{[^\\n\\}]*?\\}/i",
            +        // Quoted registry keys [...]
            +        2 => "/\\[HKEY[^\n\\]]*?]/i"
            +        ),
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'add_custom_command', 'add_custom_target', 'add_definitions',
            +            'add_dependencies', 'add_executable', 'add_library',
            +            'add_subdirectory', 'add_test', 'aux_source_directory', 'break',
            +            'build_command', 'cmake_minimum_required', 'cmake_policy',
            +            'configure_file', 'create_test_sourcelist', 'define_property',
            +            'else', 'elseif', 'enable_language', 'enable_testing',
            +            'endforeach', 'endfunction', 'endif', 'endmacro',
            +            'endwhile', 'execute_process', 'export', 'file', 'find_file',
            +            'find_library', 'find_package', 'find_path', 'find_program',
            +            'fltk_wrap_ui', 'foreach', 'function', 'get_cmake_property',
            +            'get_directory_property', 'get_filename_component', 'get_property',
            +            'get_source_file_property', 'get_target_property',
            +            'get_test_property', 'if', 'include', 'include_directories',
            +            'include_external_msproject', 'include_regular_expression',
            +            'install', 'link_directories', 'list', 'load_cache',
            +            'load_command', 'macro', 'mark_as_advanced', 'math', 'message',
            +            'option', 'output_required_files', 'project', 'qt_wrap_cpp',
            +            'qt_wrap_ui', 'remove_definitions', 'return', 'separate_arguments',
            +            'set', 'set_directory_properties', 'set_property',
            +            'set_source_files_properties', 'set_target_properties',
            +            'set_tests_properties', 'site_name', 'source_group', 'string',
            +            'target_link_libraries', 'try_compile', 'try_run', 'unset',
            +            'variable_watch', 'while'
            +            ),
            +        2 => array(
            +            // Deprecated commands
            +            'build_name', 'exec_program', 'export_library_dependencies',
            +            'install_files', 'install_programs', 'install_targets',
            +            'link_libraries', 'make_directory', 'remove', 'subdir_depends',
            +            'subdirs', 'use_mangled_mesa', 'utility_source',
            +            'variable_requires', 'write_file'
            +            ),
            +        3 => array(
            +            // Special command arguments, this list is not comprehesive.
            +            'AND', 'APPEND', 'ASCII', 'BOOL', 'CACHE', 'COMMAND', 'COMMENT',
            +            'COMPARE', 'CONFIGURE', 'DEFINED', 'DEPENDS', 'DIRECTORY',
            +            'EQUAL', 'EXCLUDE_FROM_ALL', 'EXISTS', 'FALSE', 'FATAL_ERROR',
            +            'FILEPATH', 'FIND', 'FORCE', 'GET', 'GLOBAL', 'GREATER',
            +            'IMPLICIT_DEPENDS', 'INSERT', 'INTERNAL', 'IS_ABSOLUTE',
            +            'IS_DIRECTORY', 'IS_NEWER_THAN', 'LENGTH', 'LESS',
            +            'MAIN_DEPENDENCY', 'MATCH', 'MATCHALL', 'MATCHES', 'MODULE', 'NOT',
            +            'NOTFOUND', 'OFF', 'ON', 'OR', 'OUTPUT', 'PARENT_SCOPE', 'PATH',
            +            'POLICY', 'POST_BUILD', 'PRE_BUILD', 'PRE_LINK', 'PROPERTY',
            +            'RANDOM', 'REGEX', 'REMOVE_AT', 'REMOVE_DUPLICATES', 'REMOVE_ITEM',
            +            'REPLACE', 'REVERSE', 'SEND_ERROR', 'SHARED', 'SORT', 'SOURCE',
            +            'STATIC', 'STATUS', 'STREQUAL', 'STRGREATER', 'STRING', 'STRIP',
            +            'STRLESS', 'SUBSTRING', 'TARGET', 'TEST', 'TOLOWER', 'TOUPPER',
            +            'TRUE', 'VERBATIM', 'VERSION', 'VERSION_EQUAL', 'VERSION_GREATOR',
            +            'VERSION_LESS', 'WORKING_DIRECTORY',
            +            )
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => true
            +        ),
            +    'SYMBOLS' => array(
            +        0 => array('(', ')')
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #1f3f81; font-style: bold;',
            +            2 => 'color: #1f3f81;',
            +            3 => 'color: #077807; font-sytle: italic;'
            +            ),
            +        'BRACKETS' => array(),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;',
            +            1 => 'color: #b08000;',
            +            2 => 'color: #0000cd;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #912f11;',
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #197d8b;'
            +            ),
            +        'NUMBERS' => array(),
            +        'METHODS' => array(),
            +        'REGEXPS' => array(
            +            0 => 'color: #b08000;',
            +            1 => 'color: #0000cd;'
            +            ),
            +        'SCRIPT' => array()
            +        ),
            +    'URLS' => array(
            +        1 => 'http://www.cmake.org/cmake/help/cmake2.6docs.html#command:{FNAMEL}',
            +        2 => 'http://www.cmake.org/cmake/help/cmake2.6docs.html#command:{FNAMEL}',
            +        3 => '',
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(),
            +    'REGEXPS' => array(
            +        // Unquoted variables
            +        0 => "\\$(ENV)?\\{[^\\n}]*?\\}",
            +        // Unquoted registry keys
            +        1 => "\\[HKEY[^\n\\]]*?]"
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(),
            +    'TAB_WIDTH' => 4,
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            // These keywords cannot come after a open paren
            +            1 => array(
            +                'DISALLOWED_AFTER' =>  '(?= *\()'
            +                ),
            +            2 => array(
            +                'DISALLOWED_AFTER' =>  '(?= *\()'
            +                )
            +            ),
            +        'ENABLE_FLAGS' => array(
            +            'BRACKETS' => GESHI_NEVER,
            +            'METHODS' => GESHI_NEVER,
            +            'NUMBERS' => GESHI_NEVER
            +            )
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/cobol.php b/vendor/easybook/geshi/geshi/cobol.php
            new file mode 100644
            index 0000000000..1280a4c7e9
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/cobol.php
            @@ -0,0 +1,457 @@
            + 'COBOL',
            +    'COMMENT_SINGLE' => array(
            +        1 => '*>', // COBOL 2002 inline comment
            +        2 => '>>'  // COBOL compiler directive indicator
            +        ),
            +    'COMMENT_MULTI' => array(),
            +    'COMMENT_REGEXP' => array(
            +        1 => '/^......(\*.*?$)/m', // Fixed-form comment
            +        2 => '/\$SET.*/i'          // MF compiler directive indicator
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"', "'"),
            +    'ESCAPE_CHAR' => '',
            +    'NUMBERS' =>
            +        GESHI_NUMBER_INT_BASIC |
            +        GESHI_NUMBER_FLT_NONSCI |
            +        GESHI_NUMBER_FLT_SCI_SHORT |
            +        GESHI_NUMBER_FLT_SCI_ZERO,
            +    'KEYWORDS' => array(
            +        // Statements containing spaces. These are separate to other statements
            +        // so that they are highlighted correctly.
            +        1 => array(
            +            'DELETE FILE', 'GO TO', 'NEXT SENTENCE', 'XML GENERATE',
            +            'XML PARSE'
            +            ),
            +
            +        2 => array( // Other Reserved Words
            +            '3-D', 'ABSENT', 'ABSTRACT', 'ACCESS', 'ACQUIRE',
            +            'ACTION', 'ACTIVE-CLASS', 'ACTIVE-X', 'ACTUAL', 'ADDRESS',
            +            'ADDRESS-ARRAY', 'ADDRESS-OFFSET', 'ADJUSTABLE-COLUMNS',
            +            'ADVANCING', 'AFP-5A', 'AFTER', 'ALIGNED', 'ALIGNMENT', 'ALL',
            +            'ALLOW', 'ALLOWING', 'ALPHABET', 'ALPHABETIC',
            +            'ALPHABETIC-LOWER', 'ALPHABETIC-UPPER', 'ALPHANUMERIC',
            +            'ALPHANUMERIC-EDITED', 'ALSO', 'ALTERNATE', 'AND', 'ANY',
            +            'ANYCASE',
            +            'APPLY', 'ARE', 'AREA', 'AREAS', 'ARGUMENT-NUMBER',
            +            'ARGUMENT-VALUE',
            +            'ARITHMETIC', 'AS', 'ASCENDING',
            +            'ASSEMBLY-ATTRIBUTES', 'ASSIGN', 'AT', 'ATTRIBUTE', 'AUTHOR',
            +            'AUTO', 'AUTO-DECIMAL', 'AUTO-HYPHEN-SKIP', 'AUTO-MINIMIZE',
            +            'AUTO-RESIZE', 'AUTO-SKIP', 'AUTO-SPIN', 'AUTOMATIC',
            +            'AUTOTERMINATE', 'AWAY-FROM-ZERO',
            +            'AX-EVENT-LIST', 'B-AND', 'B-EXOR', 'B-LEFT',
            +            'B-NOT', 'B-OR', 'B-RIGHT', 'B-XOR', 'BACKGROUND-COLOR',
            +            'BACKGROUND-COLOUR', 'BACKGROUND-HIGH', 'BACKGROUND-LOW',
            +            'BACKGROUND-STANDARD', 'BACKWARD', 'BAR', 'BASED', 'BASIS', 'BEEP',
            +            'BEFORE', 'BEGINNING', 'BELL', 'BINARY', 'BINARY-CHAR',
            +            'BINARY-DOUBLE', 'BINARY-LONG', 'BINARY-SHORT', 'BIND', 'BIT',
            +            'BITMAP', 'BITMAP-END', 'BITMAP-HANDLE', 'BITMAP-NUMBER',
            +            'BITMAP-RAW-HEIGHT', 'BITMAP-RAW-WIDTH', 'BITMAP-SCALE',
            +            'BITMAP-START', 'BITMAP-TIMER', 'BITMAP-TRAILING', 'BITMAP-WIDTH',
            +            'BLANK', 'BLINK', 'BLINKING', 'BLOB', 'BLOB-FILE', 'BLOB-LOCATOR',
            +            'BLOCK', 'BOLD', 'BOOLEAN', 'BOTTOM', 'BOX', 'BOXED', 'BROWSING',
            +            'BUSY', 'BUTTONS', 'BY', 'C01', 'C02', 'C03', 'C04',
            +            'C05',
            +            'C06', 'C07', 'C08', 'C09', 'C10', 'C11', 'C12', 'CALENDAR-FONT',
            +            'CALLED', 'CANCEL-BUTTON', 'CAPACITY', 'CATCH', 'CBL',
            +            'CBL-CTR', 'CCOL', 'CD', 'CELL', 'CELL-COLOR', 'CELL-DATA',
            +            'CELL-FONT', 'CELL-PROTECTION', 'CELLS', 'CENTER', 'CENTERED',
            +            'CENTERED-HEADINGS', 'CENTURY-DATE', 'CENTURY-DAY', 'CF', 'CH',
            +            'CHAINING', 'CHANGED', 'CHAR-VARYING',
            +            'CHARACTER',
            +            'CHARACTERS', 'CHART', 'CHECK-BOX', 'CHECKING', 'CLASS',
            +            'CLASS-ATTRIBUTES', 'CLASS-CONTROL', 'CLASS-ID', 'CLASS-OBJECT',
            +            'CLASSIFICATION',
            +            'CLEAR-SELECTION', 'CLINE', 'CLINES', 'CLOB', 'CLOB-FILE',
            +            'CLOB-LOCATOR', 'CLOCK-UNITS', 'COBOL', 'CODE', 'CODE-SET',
            +            'COERCION', 'COL', 'COLLATING', 'COLORS', 'COLOUR',
            +            'COLOURS', 'COLS', 'COLUMN', 'COLUMN-COLOR', 'COLUMN-DIVIDERS',
            +            'COLUMN-FONT', 'COLUMN-HEADINGS', 'COLUMN-PROTECTION', 'COLUMNS',
            +            'COM-REG', 'COMBO-BOX', 'COMMA', 'COMMITMENT', 'COMMON',
            +            'COMMUNICATION', 'COMP', 'COMP-0', 'COMP-1', 'COMP-2', 'COMP-3',
            +            'COMP-4', 'COMP-5', 'COMP-6', 'COMP-X', 'COMPRESSION',
            +            'COMPUTATIONAL', 'COMPUTATIONAL-0', 'COMPUTATIONAL-1',
            +            'COMPUTATIONAL-2', 'COMPUTATIONAL-3', 'COMPUTATIONAL-4',
            +            'COMPUTATIONAL-5', 'COMPUTATIONAL-6', 'COMPUTATIONAL-X',
            +            'CONDITION-VALUE', 'CONFIGURATION', 'CONSOLE', 'CONSTANT',
            +            'CONSTRAIN', 'CONSTRAINTS', 'CONTAINS', 'CONTENT',
            +            'CONTROL', 'CONTROL-AREA', 'CONTROLS', 'CONTROLS-UNCROPPED',
            +            'CONVERSION', 'CONVERT', 'CONVERTING', 'COPY-SELECTION',
            +            'CORE-INDEX', 'CORR', 'CORRESPONDING', 'COUNT',
            +            'CREATING', 'CRT', 'CRT-UNDER', 'CSIZE', 'CSP', 'CURRENCY',
            +            'CURSOR', 'CURSOR-COL', 'CURSOR-COLOR',
            +            'CURSOR-FRAME-WIDTH', 'CURSOR-ROW', 'CURSOR-X', 'CURSOR-Y',
            +            'CUSTOM-ATTRIBUTE', 'CUSTOM-PRINT-TEMPLATE', 'CYCLE', 'CYL-INDEX',
            +            'CYL-OVERFLOW', 'DASHED', 'DATA', 'DATA-COLUMNS',
            +            'DATA-POINTER', 'DATA-TYPES', 'DATABASE-KEY', 'DATABASE-KEY-LONG',
            +            'DATE', 'DATE-COMPILED', 'DATE-ENTRY', 'DATE-RECORD',
            +            'DATE-WRITTEN', 'DAY', 'DAY-OF-WEEK', 'DBCLOB', 'DBCLOB-FILE',
            +            'DBCLOB-LOCATOR', 'DBCS', 'DE', 'DEBUG', 'DEBUG-CONTENTS',
            +            'DEBUG-ITEM', 'DEBUG-LINE', 'DEBUG-NAME', 'DEBUG-SUB-1',
            +            'DEBUG-SUB-2', 'DEBUG-SUB-3', 'DEBUGGING', 'DECIMAL',
            +            'DECIMAL-POINT', 'DECLARATIVES', 'DEFAULT',
            +            'DEFAULT-BUTTON', 'DEFAULT-FONT', 'DEFINITION',
            +            'DELEGATE-ID', 'DELIMITED', 'DELIMITER', 'DEPENDING',
            +            'DESCENDING', 'DESTINATION', 'DESTROY', 'DETAIL', 'DICTIONARY',
            +            'DISABLE', 'DISC', 'DISJOINING', 'DISK', 'DISP',
            +            'DISPLAY-1', 'DISPLAY-COLUMNS', 'DISPLAY-FORMAT', 'DISPLAY-ST',
            +            'DIVIDER-COLOR', 'DIVIDERS', 'DIVISION', 'DOT-DASH',
            +            'DOTTED', 'DOWN', 'DRAG-COLOR', 'DRAW', 'DROP', 'DROP-DOWN',
            +            'DROP-LIST', 'DUPLICATES', 'DYNAMIC', 'EBCDIC', 'EC', 'ECHO', 'EGCS',
            +            'EGI', 'EJECT', 'ELEMENTARY', 'ELSE', 'EMI', 'EMPTY-CHECK',
            +            'ENABLE', 'ENABLED', 'END', 'END-ACCEPT', 'END-ADD', 'END-CALL',
            +            'END-CHAIN', 'END-COLOR', 'END-COMPUTE', 'END-DELEGATE',
            +            'END-DELETE', 'END-DISPLAY', 'END-DIVIDE', 'END-EVALUATE',
            +            'END-IF', 'END-INVOKE', 'END-MODIFY', 'END-MOVE', 'END-MULTIPLY',
            +            'END-OF-PAGE', 'END-PERFORM', 'END-READ', 'END-RECEIVE',
            +            'END-RETURN', 'END-REWRITE', 'END-SEARCH', 'END-START',
            +            'END-STRING', 'END-SUBTRACT', 'END-SYNC', 'END-TRY',
            +            'END-UNSTRING', 'END-WAIT', 'END-WRITE', 'END-XML', 'ENDING',
            +            'ENGRAVED', 'ENSURE-VISIBLE', 'ENTRY-CONVENTION',
            +            'ENTRY-FIELD',
            +            'ENTRY-REASON', 'ENUM', 'ENUM-ID', 'ENVIRONMENT',
            +            'ENVIRONMENT-NAME', 'ENVIRONMENT-VALUE', 'EOL', 'EOP',
            +            'EOS', 'EQUAL', 'EQUALS', 'ERASE', 'ERROR', 'ESCAPE',
            +            'ESCAPE-BUTTON', 'ESI', 'EVENT', 'EVENT-LIST',
            +            'EVENT-POINTER', 'EVERY', 'EXCEEDS', 'EXCEPTION',
            +            'EXCEPTION-OBJECT', 'EXCEPTION-VALUE', 'EXCESS-3',
            +            'EXCLUDE-EVENT-LIST', 'EXCLUSIVE',
            +            'EXPAND', 'EXPANDS', 'EXTEND', 'EXTENDED',
            +            'EXTENDED-SEARCH', 'EXTENSION', 'EXTERNAL', 'EXTERNAL-FORM',
            +            'EXTERNALLY-DESCRIBED-KEY', 'FACTORY', 'FALSE', 'FD',
            +            'FH--FCD', 'FH--KEYDEF', 'FILE', 'FILE-CONTROL', 'FILE-ID',
            +            'FILE-LIMIT', 'FILE-LIMITS', 'FILE-NAME', 'FILE-POS', 'FILL-COLOR',
            +            'FILL-COLOR2', 'FILL-PERCENT', 'FILLER', 'FINAL', 'FINALLY',
            +            'FINISH-REASON', 'FIRST', 'FIXED', 'FIXED-FONT', 'FIXED-WIDTH',
            +            'FLAT', 'FLAT-BUTTONS', 'FLOAT-BINARY-7', 'FLOAT-BINARY-16',
            +            'FLOAT-BINARY-34', 'FLOAT-DECIMAL-16', 'FLOAT-DECIMAL-34',
            +            'FLOAT-EXTENDED', 'FLOAT-LONG',
            +            'FLOAT-SHORT', 'FLOATING', 'FONT', 'FOOTING', 'FOR',
            +            'FOREGROUND-COLOR', 'FOREGROUND-COLOUR', 'FOREVER', 'FORMAT',
            +            'FRAME', 'FRAMED', 'FROM', 'FULL', 'FULL-HEIGHT',
            +            'FUNCTION', 'FUNCTION-ID', 'FUNCTION-POINTER', 'GENERATE',
            +            'GET', 'GETTER', 'GIVING', 'GLOBAL', 'GO-BACK', 'GO-FORWARD',
            +            'GO-HOME', 'GO-SEARCH', 'GRAPHICAL', 'GREATER', 'GRID',
            +            'GRIP', 'GROUP', 'GROUP-USAGE', 'GROUP-VALUE', 'HANDLE',
            +            'HAS-CHILDREN', 'HEADING', 'HEADING-COLOR', 'HEADING-DIVIDER-COLOR',
            +            'HEADING-FONT', 'HEAVY', 'HEIGHT', 'HEIGHT-IN-CELLS', 'HELP-ID',
            +            'HIDDEN-DATA', 'HIGH', 'HIGH-COLOR', 'HIGH-VALUE', 'HIGH-VALUES',
            +            'HIGHLIGHT', 'HORIZONTAL', 'HOT-TRACK', 'HSCROLL', 'HSCROLL-POS',
            +            'I-O', 'I-O-CONTROL', 'ICON', 'ID', 'IDENTIFICATION',
            +            'IDENTIFIED', 'IFINITY', 'IGNORE', 'IGNORING', 'IMPLEMENTS', 'IN',
            +            'INDEPENDENT', 'INDEX', 'INDEXED', 'INDEXER', 'INDEXER-ID', 'INDIC',
            +            'INDICATE', 'INDICATOR', 'INDICATORS', 'INDIRECT',
            +            'INHERITING', 'INHERITS',
            +            'INITIAL', 'INITIALIZED', 'INPUT',
            +            'INPUT-OUTPUT', 'INQUIRE', 'INSERT', 'INSERT-ROWS',
            +            'INSERTION-INDEX', 'INSTALLATION', 'INSTANCE',
            +            'INTERFACE', 'INTERFACE-ID', 'INTERMEDIATE',
            +            'INTERNAL', 'INTO', 'INTRINSIC',
            +            'INVALID', 'INVOKED', 'IS', 'ITEM', 'ITEM-BOLD',
            +            'ITEM-ID', 'ITEM-TEXT', 'ITEM-TO-ADD', 'ITEM-TO-DELETE',
            +            'ITEM-TO-EMPTY', 'ITEM-VALUE', 'ITERATOR', 'ITERATOR-ID', 'J',
            +            'JOINED', 'JOINING', 'JUST', 'JUSTIFIED', 'KANJI',
            +            'KEPT', 'KEY', 'KEY-YY', 'KEYBOARD', 'LABEL', 'LABEL-OFFSET',
            +            'LARGE-FONT', 'LAST', 'LAST-ROW', 'LAYOUT-DATA', 'LAYOUT-MANAGER',
            +            'LC_ALL', 'LC_COLLATE', 'LC_CTYPE', 'LC_CURRENCY', 'LC_MESSAGES',
            +            'LC_MONETARY', 'LC_NUMERIC', 'LC_TIME', 'LEADING', 'LEADING-SHIFT',
            +            'LEAVE', 'LEFT', 'LEFT-JUSTIFY', 'LEFT-TEXT', 'LEFTLINE',
            +            'LENGTH-CHECK', 'LESS', 'LIMIT', 'LIMITS', 'LIN', 'LINAGE',
            +            'LINAGE-COUNTER', 'LINE', 'LINE-COUNTER', 'LINES', 'LINES-AT-ROOT',
            +            'LINK', 'LINKAGE', 'LIST', 'LIST-BOX', 'LM-RESIZE', 'LOCAL-STORAGE',
            +            'LOCALE', 'LOCK', 'LOCKING', 'LONG-DATE', 'LONG-VARBINARY',
            +            'LONG-VARCHAR', 'LOW', 'LOW-COLOR', 'LOW-VALUE', 'LOW-VALUES',
            +            'LOWER', 'LOWERED', 'LOWLIGHT', 'MANUAL', 'MASS-UPDATE',
            +            'MASTER-INDEX', 'MAX-HEIGHT', 'MAX-LINES', 'MAX-PROGRESS',
            +            'MAX-SIZE', 'MAX-TEXT', 'MAX-VAL', 'MAX-WIDTH', 'MDI-CHILD',
            +            'MDI-FRAME', 'MEDIUM-FONT', 'MEMORY', 'MENU', 'MESSAGE',
            +            'MESSAGES', 'METACLASS', 'METHOD', 'METHOD-ID', 'MIN-HEIGHT',
            +            'MIN-LINES', 'MIN-SIZE', 'MIN-VAL', 'MIN-WIDTH', 'MODAL', 'MODE',
            +            'MODELESS', 'MODIFIED', 'MODULES', 'MONITOR-POINTER',
            +            'MORE-LABELS', 'MULTILINE',
            +            'MUTEX-POINTER', 'NAME', 'NAMED', 'NATIONAL',
            +            'NATIONAL-EDITED', 'NATIVE', 'NAVIGATE-URL', 'NCHAR',
            +            'NEAREST-AWAY-FROM-ZERO', 'NEAREST-EVEN', 'NEAREST-TOWARD-ZERO',
            +            'NEGATIVE', 'NEGATIVE-INFINITY',
            +            'NESTED', 'NET-EVENT-LIST', 'NEW', 'NEWABLE', 'NEXT ', 'NEXT-ITEM',
            +            'NO', 'NO-AUTO-DEFAULT', 'NO-AUTOSEL', 'NO-BOX', 'NO-CELL-DRAG',
            +            'NO-CLOSE', 'NO-DIVIDERS', 'NO-ECHO', 'NO-F4', 'NO-FOCUS',
            +            'NO-GROUP-TAB', 'NO-KEY-LETTER', 'NO-SEARCH', 'NO-TAB', 'NO-UPDOWN',
            +            'NOMINAL', 'NONE', 'NORMAL', 'NOT', 'NOT-A-NUMBER', 'NOTIFY',
            +            'NOTIFY-CHANGE', 'NOTIFY-DBLCLICK', 'NOTIFY-SELCHANGE',
            +            'NSTD-REELS', 'NULL', 'NULLS', 'NUM-COL-HEADINGS',
            +            'NUM-ROW-HEADINGS', 'NUM-ROWS', 'NUMBER', 'NUMBERS', 'NUMERIC',
            +            'NUMERIC-EDITED', 'NUMERIC-FILL', 'O-FILL', 'OBJECT',
            +            'OBJECT-COMPUTER', 'OBJECT-ID', 'OBJECT-REFERENCE',
            +            'OBJECT-STORAGE', 'OCCURS', 'OF', 'OFF', 'OK-BUTTON', 'OMITTED',
            +            'ONLY', 'OOSTACKPTR', 'OPERATOR', 'OPERATOR-ID',
            +            'OPTIONAL', 'OPTIONS', 'OR', 'ORDER', 'ORGANIZATION', 'OTHER',
            +            'OTHERWISE', 'OUTPUT', 'OVERFLOW', 'OVERLAP-LEFT', 'OVERLAP-TOP',
            +            'OVERLAPPED', 'OVERLINE', 'OVERRIDE', 'PACKED-DECIMAL',
            +            'PADDING', 'PAGE', 'PAGE-COUNTER', 'PAGE-SETUP', 'PAGE-SIZE',
            +            'PAGED', 'PANEL-INDEX', 'PANEL-STYLE', 'PANEL-TEXT', 'PANEL-WIDTHS',
            +            'PARAGRAPH', 'PARAMS', 'PARENT', 'PARSE', 'PARTIAL', 'PASSWORD',
            +            'PERMANENT', 'PF', 'PH', 'PIC', 'PICTURE', 'PIXEL',
            +            'PIXELS', 'PLACEMENT', 'PLUS', 'POINTER', 'POP-UP', 'POSITION',
            +            'POSITION-SHIFT', 'POSITIONING', 'POSITIVE', 'POSITIVE-INFINITY',
            +            'PREFIXED', 'PREFIXING', 'PRESENT',
            +            'PREVIOUS', 'PRINT', 'PRINT-CONTROL', 'PRINT-NO-PROMPT',
            +            'PRINT-PREVIEW', 'PRINT-SWITCH', 'PRINTER', 'PRINTER-1', 'PRINTING',
            +            'PRIOR', 'PRIORITY', 'PRIVATE', 'PROCEDURE', 'PROCEDURE-POINTER',
            +            'PROCEDURES', 'PROCEED', 'PROCESS', 'PROCESSING', 'PROGRAM',
            +            'PROGRAM-ID', 'PROGRAM-POINTER', 'PROGRESS', 'PROHIBITED',
            +            'PROMPT', 'PROPERTIES',
            +            'PROPERTY', 'PROPERTY-ID', 'PROPERTY-VALUE', 'PROTECTED',
            +            'PROTOTYPE', 'PUBLIC', 'PURGE', 'PUSH-BUTTON', 'QUERY-INDEX',
            +            'QUEUE', 'QUOTE', 'QUOTES', 'RADIO-BUTTON', 'RAISED',
            +            'RAISING', 'RD', 'READ-ONLY', 'READING',
            +            'READY', 'RECORD', 'RECORD-DATA', 'RECORD-OVERFLOW',
            +            'RECORD-TO-ADD', 'RECORD-TO-DELETE', 'RECORDING', 'RECORDS',
            +            'RECURSIVE', 'REDEFINE', 'REDEFINES', 'REDEFINITION', 'REEL',
            +            'REFERENCE', 'REFERENCES', 'REFRESH', 'REGION-COLOR', 'RELATION',
            +            'RELATIVE', 'RELOAD', 'REMAINDER', 'REMARKS', 'REMOVAL',
            +            'RENAMES', 'REORG-CRITERIA', 'REPEATED', 'REPLACE', 'REPLACING',
            +            'REPORT', 'REPORTING', 'REPORTS', 'REPOSITORY', 'REQUIRED',
            +            'REPRESENTS-NOT-A-NUMBER',
            +            'REREAD', 'RERUN', 'RESERVE', 'RESET-GRID', 'RESET-LIST',
            +            'RESET-TABS', 'RESIZABLE', 'RESTRICTED', 'RESULT-SET-LOCATOR',
            +            'RETRY', 'RETURN-CODE', 'RETURNING',
            +            'REVERSE-VIDEO', 'REVERSED', 'REWIND', 'RF', 'RH',
            +            'RIGHT', 'RIGHT-ALIGN', 'RIGHT-JUSTIFY', 'RIMMED',
            +            'ROLLING', 'ROUNDED', 'ROUNDING', 'ROW-COLOR', 'ROW-COLOR-PATTERN',
            +            'ROW-DIVIDERS', 'ROW-FONT', 'ROW-HEADINGS', 'ROW-PROTECTION',
            +            'ROWID', 'RUN', 'S01', 'S02', 'S03', 'S04', 'S05', 'SAME',
            +            'SAVE-AS', 'SAVE-AS-NO-PROMPT', 'SCREEN', 'SCROLL', 'SCROLL-BAR',
            +            'SD', 'SEARCH-OPTIONS', 'SEARCH-TEXT', 'SECONDS',
            +            'SECTION', 'SECURE', 'SECURITY', 'SEEK', 'SEGMENT', 'SEGMENT-LIMIT',
            +            'SELECT-ALL', 'SELECTION-INDEX', 'SELECTION-TEXT',
            +            'SELECTIVE', 'SELF', 'SELF-ACT', 'SELFCLASS', 'SEMAPHORE-POINTER',
            +            'SEND', 'SENTENCE', 'SEPARATE', 'SEPARATION', 'SEQUENCE',
            +            'SEQUENTIAL', 'SETTER', 'SHADING', 'SHADOW',
            +            'SHARING', 'SHIFT-IN', 'SHIFT-OUT', 'SHORT-DATE', 'SHOW-LINES',
            +            'SHOW-NONE', 'SHOW-SEL-ALWAYS', 'SIGNED', 'SIGNED-INT',
            +            'SIGNED-LONG', 'SIGNED-SHORT', 'SIZE', 'SKIP1',
            +            'SKIP2', 'SKIP3', 'SMALL-FONT', 'SORT-CONTROL',
            +            'SORT-CORE-SIZE', 'SORT-FILE-SIZE', 'SORT-MERGE', 'SORT-MESSAGE',
            +            'SORT-MODE-SIZE', 'SORT-OPTION', 'SORT-ORDER', 'SORT-RETURN',
            +            'SORT-TAPE', 'SORT-TAPES', 'SOURCE', 'SOURCE-COMPUTER', 'SOURCES',
            +            'SPACE', 'SPACE-FILL', 'SPACES', 'SPECIAL-NAMES', 'SPINNER', 'SQL',
            +            'SQUARE', 'STANDARD', 'STANDARD-1', 'STANDARD-2', 'STANDARD-3',
            +            'STANDARD-BINARY', 'STANDARD-DECIMAL',
            +            'START-X', 'START-Y', 'STARTING', 'STATEMENT', 'STATIC',
            +            'STATIC-LIST',
            +            'STATUS', 'STATUS-BAR', 'STATUS-TEXT', 'STEP',
            +            'STOP-BROWSER', 'STRONG', 'STYLE', 'SUB-QUEUE-1',
            +            'SUB-QUEUE-2', 'SUB-QUEUE-3', 'SUBFILE', 'SUBWINDOW',
            +            'SUFFIXING', 'SUPER', 'SYMBOL', 'SYMBOLIC',
            +            'SYNCHRONIZED', 'SYSIN', 'SYSIPT', 'SYSLST', 'SYSOUT',
            +            'SYSPCH', 'SYSPUNCH', 'SYSTEM', 'SYSTEM-DEFAULT', 'SYSTEM-INFO',
            +            'TAB', 'TAB-CONTROL', 'TAB-TO-ADD', 'TAB-TO-DELETE', 'TABLE',
            +            'TALLY', 'TALLYING', 'TAPE', 'TAPES', 'TEMPORARY', 'TERMINAL',
            +            'TERMINAL-INFO', 'TERMINATION-VALUE', 'TEST', 'TEXT',
            +            'THAN', 'THEN', 'THREAD', 'THREAD-LOCAL', 'THREAD-LOCAL-STORAGE',
            +            'THREAD-POINTER', 'THROUGH', 'THRU', 'THUMB-POSITION',
            +            'TILED-HEADINGS', 'TIME', 'TIME-OF-DAY', 'TIME-OUT', 'TIME-RECORD',
            +            'TIMEOUT', 'TIMES', 'TIMESTAMP', 'TIMESTAMP-OFFSET',
            +            'TIMESTAMP-OFFSET-RECORD', 'TIMESTAMP-RECORD', 'TITLE', 'TITLE-BAR',
            +            'TITLE-POSITION', 'TO', 'TOOL-BAR', 'TOP', 'TOTALED', 'TOTALING',
            +            'TOWARD-GREATER', 'TOWARD-LESSER',
            +            'TRACE', 'TRACK-AREA', 'TRACK-LIMIT', 'TRACK-THUMB', 'TRACKS',
            +            'TRADITIONAL-FONT', 'TRAILING', 'TRAILING-SHIFT', 'TRAILING-SIGN',
            +            'TRANSACTION', 'TRANSPARENT', 'TRANSPARENT-COLOR',
            +            'TREE-VIEW', 'TRUE', 'TRUNCATION', 'TYPE', 'TYPEDEF', 'UCS-4',
            +            'UNDERLINE', 'UNDERLINED', 'UNEQUAL', 'UNFRAMED', 'UNIT', 'UNITS',
            +            'UNIVERSAL', 'UNSIGNED', 'UNSIGNED-INT', 'UNSIGNED-LONG',
            +            'UNSIGNED-SHORT',
            +            'UNSORTED', 'UP', 'UPDATE', 'UNTIL', 'UPON', 'UPPER',
            +            'UPSI-0', 'UPSI-1', 'UPSI-2', 'UPSI-3', 'UPSI-4', 'UPSI-5',
            +            'UPSI-6', 'UPSI-7', 'USAGE', 'USE-ALT', 'USE-RETURN',
            +            'USE-TAB', 'USER', 'USER-COLORS', 'USER-DEFAULT', 'USER-GRAY',
            +            'USER-WHITE', 'USING', 'UTF-16', 'UTF-8', 'VALID',
            +            'VAL-STATUS', 'VALIDATE-STATUS',
            +            'VALUE', 'VALUE-FORMAT', 'VALUES', 'VALUETYPE', 'VALUETYPE-ID',
            +            'VARBINARY', 'VARIABLE', 'VARIANT', 'VARYING', 'VERTICAL',
            +            'VERY-HEAVY', 'VIRTUAL-WIDTH', 'VISIBLE', 'VPADDING', 'VSCROLL',
            +            'VSCROLL-BAR', 'VSCROLL-POS', 'VTOP', 'WEB-BROWSER', 'WHEN',
            +            'WHERE', 'WIDTH', 'WIDTH-IN-CELLS', 'WINDOW',
            +            'WITH', 'WORDS', 'WORKING-STORAGE', 'WRAP', 'WRITE-ONLY',
            +            'WRITE-VERIFY', 'WRITING', ' XML', 'XML ', 'XML-CODE', 'XML-EVENT',
            +            'XML-NTEXT', 'XML-TEXT', 'YIELDING', 'YYYYDDD', 'YYYYMMDD', 'ZERO',
            +            'ZERO-FILL', 'ZEROES', 'ZEROS'
            +            ),
            +        3 => array( // Statement Keywords containing no spaces.
            +            'ACCEPT', 'ADD', 'ALTER', 'ALLOCATE', 'ATTACH', 'CALL', 'CANCEL',
            +            'CHAIN', 'CREATE',
            +            'CLOSE', 'COLOR', 'COMPUTE', 'COMMIT', 'CONTINUE',
            +            'COPY', 'DECLARE', 'DELEGATE', 'DELETE', 'DETACH', 'DISPLAY',
            +            'DIVIDE',
            +            'ENTER', 'ENTRY', 'EVALUATE', 'EXAMINE',
            +            'EXEC', 'EXECUTE', 'EXHIBIT', 'EXIT', 'FREE', 'GOBACK',
            +            'IF',  'INITIALIZE', 'INITIATE', 'INSPECT', 'INVOKE', 'MERGE',
            +            'MODIFY', 'MOVE', 'MULTIPLY', 'NOTE', 'ON', 'OPEN',
            +            'PERFORM', 'RAISE', 'READ', 'RECEIVE', 'RELEASE', 'RETURN',
            +            'RESET', 'RESUME',
            +            'REWRITE', 'ROLLBACK', 'SEARCH', 'SELECT', 'SERVICE', 'SET', 'SORT',
            +            'START', 'STOP', 'STRING', 'SUBTRACT', 'SYNC',
            +            'SUPPRESS', 'TERMINATE',
            +            'TRANSFORM', 'TRY', 'UNLOCKFILE', 'UNLOCK', 'UNSTRING', 'USE',
            +            'VALIDATE', 'WAIT', 'WRITE'
            +            ),
            +        4 => array( // Intrinsic functions
            +            'ABS', 'ACOS', 'ANNUITY', 'ASIN', 'ATAN', 'BOOLEAN-OF-INTEGER',
            +            'BYTE-LENGTH', 'CHAR', 'CHAR-NATIONAL',
            +            'COS', 'COMBINED-DATETIME', 'CONCATENATE', 'CURRENT-DATE',
            +            'DATE-OF-INTEGER', 'DATE-TO-YYYYMMDD', 'DAY-TO-YYYYDDD',
            +            'DAY-OF-INTEGER', 'DISPLAY-OF', 'E', 'EXCEPTION-FILE',
            +            'EXCEPTION-FILE-N', 'EXCEPTION-LOCATION',
            +            'EXCEPTION-LOCATION-N', 'EXCEPTION-STATEMENT', 'EXCEPTION-STATUS',
            +            'EXP', 'EXP10', 'FACTORIAL', 'FORMATTED-CURRENT-DATE',
            +            'FORMATTED-DATE', 'FORMATTED-DATETIME', 'FORMATTED-TIME',
            +            'FRACTION-PART', 'HIGHEST-ALGEBRAIC', 'INTEGER',
            +            'INTEGER-OF-BOOLEAN', 'INTEGER-OF-DATE', 'INTEGER-OF-DAY',
            +            'INTEGER-OF-FORMATTED-DATE', 'INTEGER-PART', 'LENGTH',
            +            'LOCALE-COMPARE',
            +            'LOCALE-DATE', 'LOCALE-TIME', 'LOCALE-TIME-FROM-SECONDS',
            +            'LOCALE-TIME-FROM-SECS', 'LOG',
            +            'LOG10', 'LOWER-CASE', 'LOWEST-ALGEBRAIC',
            +            'MAX', 'MEAN', 'MEDIAN', 'MIDRANGE',
            +            'MIN', 'MOD', 'NATIONAL-OF', 'NUMVAL', 'NUMVAL-C', 'NUMVAL-F',
            +            'ORD', 'ORD-MAX', 'ORD-MIN',
            +            'PI', 'PRESENT-VALUE', 'RANDOM', 'RANGE', 'REM', 'REVERSE',
            +            'SECONDS-FROM-FORMATTED-TIME', 'SIGN', 'SIN', 'SQRT',
            +            'SECONDS-PAST-MIDNIGHT', 'STANDARD-DEVIATION', 'STANDARD-COMPARE',
            +            'STORED-CHAR-LENGTH',
            +            'SUBSTITUTE', 'SUBSTITUE-CASE', 'SUM', 'TAN', 'TEST-DATE-YYYYMMDD',
            +            'TEST-DAY-YYYYDDD', 'TEST-FORMATTED-TIME', 'TEST-NUMVAL',
            +            'TEST-NUMVAL-C', 'TEST-NUMVAL-F',
            +            'TRIM', 'UPPER-CASE', 'VARIANCE', 'YEAR-TO-YYYY', 'WHEN-COMPILED'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        //  Arithmetic and comparison operators must be surrounded by spaces.
            +        ' + ', ' - ', ' * ', ' / ', ' ** ', ' ^ ',
            +        '.', ',',
            +        ' = ', ' < ', ' > ', ' >= ', ' <= ', ' <> ',
            +        '(', ')', '[', ']'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000000; font-weight: bold;',
            +            2 => 'color: #008000; font-weight: bold;',
            +            3 => 'color: #000000; font-weight: bold;',
            +            4 => 'color: #9d7700;',
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #a0a0a0; font-style: italic;',
            +            2 => 'color: #000080; font-weight: bold;',
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #339933;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #993399;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #800080;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #000066;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '::'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4,
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            'DISALLOWED_BEFORE' => '(? 'CoffeeScript',
            +    'COMMENT_SINGLE' => array(1 => '#'),
            +    'COMMENT_MULTI' => array('###' => '###'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    //Longest quotemarks ALWAYS first
            +    'QUOTEMARKS' => array('"""', "'''", '"', "'"),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +
            +        /*
            +        ** Set 1: control keywords
            +        */
            +        1 => array(
            +            'break', 'by', 'catch', 'continue', 'else', 'finally', 'for', 'in', 'of', 'if',
            +            'return', 'switch', 'then', 'throw', 'try', 'unless', 'when', 'while', 'until'
            +            ),
            +
            +        /*
            +        ** Set 2: logic keywords
            +        */
            +        2 => array(
            +            'and', 'or', 'is', 'isnt', 'not'
            +            ),
            +
            +        /*
            +        ** Set 3: other keywords
            +        */
            +        3 => array(
            +            'instanceof', 'new', 'delete', 'typeof',
            +            'class', 'super', 'this', 'extends'
            +            ),
            +
            +        /*
            +        ** Set 4: constants
            +        */
            +        4 => array(
            +            'true', 'false', 'on', 'off', 'yes', 'no',
            +            'Infinity', 'NaN', 'undefined', 'null'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +            '(', ')', '[', ']', '{', '}', '*', '&', '|', '%', '!', ',', ';', '<', '>', '?', '`',
            +            '+', '-', '*', '/', '->', '=>', '<<', '>>', '@', ':', '^'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #ff7700;font-weight:bold;',
            +            2 => 'color: #008000;',
            +            3 => 'color: #dc143c;',
            +            4 => 'color: #0000cd;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: black;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #483d8b;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #ff4500;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: black;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_MAYBE,
            +    'SCRIPT_DELIMITERS' => array(
            +        0 => array(
            +            ''
            +            )
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        0 => true
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/cpp-qt.php b/vendor/easybook/geshi/geshi/cpp-qt.php
            new file mode 100644
            index 0000000000..dd7a615819
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/cpp-qt.php
            @@ -0,0 +1,569 @@
            + 'C++ (Qt)',
            +    'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(
            +        //Multiline-continued single-line comments
            +        1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m',
            +        //Multiline-continued preprocessor define
            +        2 => '/#(?:\\\\\\\\|\\\\\\n|.)*$/m',
            +        //C++ 11 string literal extensions
            +        3 => '/(?:L|u8?|U)(?=")/',
            +        //C++ 11 string literal extensions (raw)
            +        4 => '/R"([^()\s\\\\]*)\((?:(?!\)\\1").)*\)\\1"/ms'
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'ESCAPE_REGEXP' => array(
            +        //Simple Single Char Escapes
            +        1 => "#\\\\[abfnrtv\\\'\"?\n]#i",
            +        //Hexadecimal Char Specs
            +        2 => "#\\\\x[\da-fA-F]{2}#",
            +        //Hexadecimal Char Specs
            +        3 => "#\\\\u[\da-fA-F]{4}#",
            +        //Hexadecimal Char Specs
            +        4 => "#\\\\U[\da-fA-F]{8}#",
            +        //Octal Char Specs
            +        5 => "#\\\\[0-7]{1,3}#"
            +        ),
            +    'NUMBERS' =>
            +        GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B |
            +        GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI |
            +        GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO,
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'case', 'continue', 'default', 'do', 'else', 'for', 'goto', 'if', 'return',
            +            'switch', 'while', 'delete', 'new', 'this'
            +            ),
            +        2 => array(
            +            'NULL', 'false', 'break', 'true', 'enum', 'errno', 'EDOM',
            +            'ERANGE', 'FLT_RADIX', 'FLT_ROUNDS', 'FLT_DIG', 'DBL_DIG', 'LDBL_DIG',
            +            'FLT_EPSILON', 'DBL_EPSILON', 'LDBL_EPSILON', 'FLT_MANT_DIG', 'DBL_MANT_DIG',
            +            'LDBL_MANT_DIG', 'FLT_MAX', 'DBL_MAX', 'LDBL_MAX', 'FLT_MAX_EXP', 'DBL_MAX_EXP',
            +            'LDBL_MAX_EXP', 'FLT_MIN', 'DBL_MIN', 'LDBL_MIN', 'FLT_MIN_EXP', 'DBL_MIN_EXP',
            +            'LDBL_MIN_EXP', 'CHAR_BIT', 'CHAR_MAX', 'CHAR_MIN', 'SCHAR_MAX', 'SCHAR_MIN',
            +            'UCHAR_MAX', 'SHRT_MAX', 'SHRT_MIN', 'USHRT_MAX', 'INT_MAX', 'INT_MIN',
            +            'UINT_MAX', 'LONG_MAX', 'LONG_MIN', 'ULONG_MAX', 'HUGE_VAL', 'SIGABRT',
            +            'SIGFPE', 'SIGILL', 'SIGINT', 'SIGSEGV', 'SIGTERM', 'SIG_DFL', 'SIG_ERR',
            +            'SIG_IGN', 'BUFSIZ', 'EOF', 'FILENAME_MAX', 'FOPEN_MAX', 'L_tmpnam',
            +            'SEEK_CUR', 'SEEK_END', 'SEEK_SET', 'TMP_MAX', 'stdin', 'stdout', 'stderr',
            +            'EXIT_FAILURE', 'EXIT_SUCCESS', 'RAND_MAX', 'CLOCKS_PER_SEC',
            +            'virtual', 'public', 'private', 'protected', 'template', 'using', 'namespace',
            +            'try', 'catch', 'inline', 'dynamic_cast', 'const_cast', 'reinterpret_cast',
            +            'static_cast', 'explicit', 'friend', 'typename', 'typeid', 'class' ,
            +            'foreach','connect', 'Q_OBJECT' , 'slots' , 'signals', 'Q_SIGNALS', 'Q_SLOTS',
            +            'Q_FOREACH', 'QCOMPARE', 'QVERIFY', 'qDebug', 'kDebug', 'QBENCHMARK'
            +            ),
            +        3 => array(
            +            'cin', 'cerr', 'clog', 'cout',
            +            'printf', 'fprintf', 'snprintf', 'sprintf', 'assert',
            +            'isalnum', 'isalpha', 'isdigit', 'iscntrl', 'isgraph', 'islower', 'isprint',
            +            'ispunct', 'isspace', 'isupper', 'isxdigit', 'tolower', 'toupper',
            +            'exp', 'log', 'log10', 'pow', 'sqrt', 'ceil', 'floor', 'fabs', 'ldexp',
            +            'frexp', 'modf', 'fmod', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'atan2',
            +            'sinh', 'cosh', 'tanh', 'setjmp', 'longjmp',
            +            'va_start', 'va_arg', 'va_end', 'offsetof', 'sizeof', 'fopen', 'freopen',
            +            'fflush', 'fclose', 'remove', 'rename', 'tmpfile', 'tmpname', 'setvbuf',
            +            'setbuf', 'vfprintf', 'vprintf', 'vsprintf', 'fscanf', 'scanf', 'sscanf',
            +            'fgetc', 'fgets', 'fputc', 'fputs', 'getc', 'getchar', 'gets', 'putc',
            +            'putchar', 'puts', 'ungetc', 'fread', 'fwrite', 'fseek', 'ftell', 'rewind',
            +            'fgetpos', 'fsetpos', 'clearerr', 'feof', 'ferror', 'perror', 'abs', 'labs',
            +            'div', 'ldiv', 'atof', 'atoi', 'atol', 'strtod', 'strtol', 'strtoul', 'calloc',
            +            'malloc', 'realloc', 'free', 'abort', 'exit', 'atexit', 'system', 'getenv',
            +            'bsearch', 'qsort', 'rand', 'srand', 'strcpy', 'strncpy', 'strcat', 'strncat',
            +            'strcmp', 'strncmp', 'strcoll', 'strchr', 'strrchr', 'strspn', 'strcspn',
            +            'strpbrk', 'strstr', 'strlen', 'strerror', 'strtok', 'strxfrm', 'memcpy',
            +            'memmove', 'memcmp', 'memchr', 'memset', 'clock', 'time', 'difftime', 'mktime',
            +            'asctime', 'ctime', 'gmtime', 'localtime', 'strftime'
            +            ),
            +        4 => array(
            +            'auto', 'bool', 'char', 'const', 'double', 'float', 'int', 'long', 'longint',
            +            'register', 'short', 'shortint', 'signed', 'static', 'struct',
            +            'typedef', 'union', 'unsigned', 'void', 'volatile', 'extern', 'jmp_buf',
            +            'signal', 'raise', 'va_list', 'ptrdiff_t', 'size_t', 'FILE', 'fpos_t',
            +            'div_t', 'ldiv_t', 'clock_t', 'time_t', 'tm', 'wchar_t',
            +
            +            'int8', 'int16', 'int32', 'int64',
            +            'uint8', 'uint16', 'uint32', 'uint64',
            +
            +            'int_fast8_t', 'int_fast16_t', 'int_fast32_t', 'int_fast64_t',
            +            'uint_fast8_t', 'uint_fast16_t', 'uint_fast32_t', 'uint_fast64_t',
            +
            +            'int_least8_t', 'int_least16_t', 'int_least32_t', 'int_least64_t',
            +            'uint_least8_t', 'uint_least16_t', 'uint_least32_t', 'uint_least64_t',
            +
            +            'int8_t', 'int16_t', 'int32_t', 'int64_t',
            +            'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t',
            +
            +            'intmax_t', 'uintmax_t', 'intptr_t', 'uintptr_t'
            +            ),
            +        5 => array(
            +            "Q_UINT16", "Q_UINT32", "Q_UINT64", "Q_UINT8", "Q_ULLONG",
            +            "Q_ULONG", "Q3Accel", "Q3Action", "Q3ActionGroup", "Q3AsciiBucket",
            +            "Q3AsciiCache", "Q3AsciiCacheIterator", "Q3AsciiDict",
            +            "Q3AsciiDictIterator", "Q3BaseBucket", "Q3BoxLayout", "Q3Button",
            +            "Q3ButtonGroup", "Q3Cache", "Q3CacheIterator", "Q3Canvas",
            +            "Q3CanvasEllipse", "Q3CanvasItem", "Q3CanvasItemList",
            +            "Q3CanvasLine", "Q3CanvasPixmap", "Q3CanvasPixmapArray",
            +            "Q3CanvasPolygon", "Q3CanvasPolygonalItem", "Q3CanvasRectangle",
            +            "Q3CanvasSpline", "Q3CanvasSprite", "Q3CanvasText", "Q3CanvasView",
            +            "Q3CheckListItem", "Q3CheckTableItem", "Q3CleanupHandler",
            +            "Q3ColorDrag", "Q3ComboBox", "Q3ComboTableItem", "Q3CString",
            +            "Q3DataBrowser", "Q3DataTable", "Q3DataView", "Q3DateEdit",
            +            "Q3DateTimeEdit", "Q3DateTimeEditBase", "Q3DeepCopy", "Q3Dict",
            +            "Q3DictIterator", "Q3Dns", "Q3DnsSocket", "Q3DockArea",
            +            "Q3DockAreaLayout", "Q3DockWindow", "Q3DragObject", "Q3DropSite",
            +            "Q3EditorFactory", "Q3FileDialog", "Q3FileIconProvider",
            +            "Q3FilePreview", "Q3Frame", "Q3Ftp", "Q3GArray", "Q3GCache",
            +            "Q3GCacheIterator", "Q3GDict", "Q3GDictIterator", "Q3GList",
            +            "Q3GListIterator", "Q3GListStdIterator", "Q3Grid", "Q3GridLayout",
            +            "Q3GridView", "Q3GroupBox", "Q3GVector", "Q3HBox", "Q3HBoxLayout",
            +            "Q3HButtonGroup", "Q3Header", "Q3HGroupBox", "Q3Http",
            +            "Q3HttpHeader", "Q3HttpRequestHeader", "Q3HttpResponseHeader",
            +            "Q3IconDrag", "Q3IconDragItem", "Q3IconView", "Q3IconViewItem",
            +            "Q3ImageDrag", "Q3IntBucket", "Q3IntCache", "Q3IntCacheIterator",
            +            "Q3IntDict", "Q3IntDictIterator", "Q3ListBox", "Q3ListBoxItem",
            +            "Q3ListBoxPixmap", "Q3ListBoxText", "Q3ListView", "Q3ListViewItem",
            +            "Q3ListViewItemIterator", "Q3LNode", "Q3LocalFs", "Q3MainWindow",
            +            "Q3MemArray", "Q3MimeSourceFactory", "Q3MultiLineEdit",
            +            "Q3NetworkOperation", "Q3NetworkProtocol", "Q3NetworkProtocolDict",
            +            "Q3NetworkProtocolFactory", "Q3NetworkProtocolFactoryBase",
            +            "Q3ObjectDictionary", "Q3PaintDeviceMetrics", "Q3Painter",
            +            "Q3Picture", "Q3PointArray", "Q3PolygonScanner", "Q3PopupMenu",
            +            "Q3Process", "Q3ProgressBar", "Q3ProgressDialog", "Q3PtrBucket",
            +            "Q3PtrCollection", "Q3PtrDict", "Q3PtrDictIterator", "Q3PtrList",
            +            "Q3PtrListIterator", "Q3PtrListStdIterator", "Q3PtrQueue",
            +            "Q3PtrStack", "Q3PtrVector", "Q3RangeControl", "Q3ScrollView",
            +            "Q3Semaphore", "Q3ServerSocket", "Q3Shared", "Q3Signal",
            +            "Q3SimpleRichText", "Q3SingleCleanupHandler", "Q3Socket",
            +            "Q3SocketDevice", "Q3SortedList", "Q3SpinWidget", "Q3SqlCursor",
            +            "Q3SqlEditorFactory", "Q3SqlFieldInfo", "Q3SqlFieldInfoList",
            +            "Q3SqlForm", "Q3SqlPropertyMap", "Q3SqlRecordInfo",
            +            "Q3SqlSelectCursor", "Q3StoredDrag", "Q3StrIList", "Q3StringBucket",
            +            "Q3StrIVec", "Q3StrList", "Q3StrListIterator", "Q3StrVec",
            +            "Q3StyleSheet", "Q3StyleSheetItem", "Q3SyntaxHighlighter",
            +            "Q3TabDialog", "Q3Table", "Q3TableItem", "Q3TableSelection",
            +            "Q3TextBrowser", "Q3TextDrag", "Q3TextEdit",
            +            "Q3TextEditOptimPrivate", "Q3TextStream", "Q3TextView",
            +            "Q3TimeEdit", "Q3ToolBar", "Q3TSFUNC", "Q3UriDrag", "Q3Url",
            +            "Q3UrlOperator", "Q3ValueList", "Q3ValueListConstIterator",
            +            "Q3ValueListIterator", "Q3ValueStack", "Q3ValueVector", "Q3VBox",
            +            "Q3VBoxLayout", "Q3VButtonGroup", "Q3VGroupBox", "Q3WhatsThis",
            +            "Q3WidgetStack", "Q3Wizard", "QAbstractButton",
            +            "QAbstractEventDispatcher", "QAbstractExtensionFactory",
            +            "QAbstractExtensionManager", "QAbstractFileEngine",
            +            "QAbstractFileEngineHandler", "QAbstractFileEngineIterator",
            +            "QAbstractFormBuilder", "QAbstractGraphicsShapeItem",
            +            "QAbstractItemDelegate", "QAbstractItemModel", "QAbstractItemView",
            +            "QAbstractListModel", "QAbstractMessageHandler",
            +            "QAbstractNetworkCache", "QAbstractPageSetupDialog",
            +            "QAbstractPrintDialog", "QAbstractProxyModel",
            +            "QAbstractScrollArea", "QAbstractSlider", "QAbstractSocket",
            +            "QAbstractSpinBox", "QAbstractTableModel",
            +            "QAbstractTextDocumentLayout", "QAbstractUndoItem",
            +            "QAbstractUriResolver", "QAbstractXmlNodeModel",
            +            "QAbstractXmlReceiver", "QAccessible", "QAccessible2Interface",
            +            "QAccessibleApplication", "QAccessibleBridge",
            +            "QAccessibleBridgeFactoryInterface", "QAccessibleBridgePlugin",
            +            "QAccessibleEditableTextInterface", "QAccessibleEvent",
            +            "QAccessibleFactoryInterface", "QAccessibleInterface",
            +            "QAccessibleInterfaceEx", "QAccessibleObject",
            +            "QAccessibleObjectEx", "QAccessiblePlugin",
            +            "QAccessibleSimpleEditableTextInterface",
            +            "QAccessibleTableInterface", "QAccessibleTextInterface",
            +            "QAccessibleValueInterface", "QAccessibleWidget",
            +            "QAccessibleWidgetEx", "QAction", "QActionEvent", "QActionGroup",
            +            "QApplication", "QArgument", "QAssistantClient", "QAtomicInt",
            +            "QAtomicPointer", "QAuthenticator", "QBasicAtomicInt",
            +            "QBasicAtomicPointer", "QBasicTimer", "QBitArray", "QBitmap",
            +            "QBitRef", "QBool", "QBoxLayout", "QBrush", "QBrushData", "QBuffer",
            +            "QButtonGroup", "QByteArray", "QByteArrayMatcher", "QByteRef",
            +            "QCache", "QCalendarWidget", "QCDEStyle", "QChar", "QCharRef",
            +            "QCheckBox", "QChildEvent", "QCleanlooksStyle", "QClipboard",
            +            "QClipboardEvent", "QCloseEvent", "QColor", "QColorDialog",
            +            "QColorGroup", "QColormap", "QColumnView", "QComboBox",
            +            "QCommandLinkButton", "QCommonStyle", "QCompleter",
            +            "QConicalGradient", "QConstString", "QContextMenuEvent", "QCOORD",
            +            "QCoreApplication", "QCryptographicHash", "QCursor", "QCursorShape",
            +            "QCustomEvent", "QDataStream", "QDataWidgetMapper", "QDate",
            +            "QDateEdit", "QDateTime", "QDateTimeEdit", "QDB2Driver",
            +            "QDB2Result", "QDBusAbstractAdaptor", "QDBusAbstractInterface",
            +            "QDBusArgument", "QDBusConnection", "QDBusConnectionInterface",
            +            "QDBusContext", "QDBusError", "QDBusInterface", "QDBusMessage",
            +            "QDBusMetaType", "QDBusObjectPath", "QDBusPendingCall",
            +            "QDBusPendingCallWatcher", "QDBusPendingReply",
            +            "QDBusPendingReplyData", "QDBusReply", "QDBusServer",
            +            "QDBusSignature", "QDBusVariant", "QDebug",
            +            "QDesignerActionEditorInterface", "QDesignerBrushManagerInterface",
            +            "QDesignerComponents", "QDesignerContainerExtension",
            +            "QDesignerCustomWidgetCollectionInterface",
            +            "QDesignerCustomWidgetInterface", "QDesignerDnDItemInterface",
            +            "QDesignerDynamicPropertySheetExtension", "QDesignerExportWidget",
            +            "QDesignerExtraInfoExtension", "QDesignerFormEditorInterface",
            +            "QDesignerFormEditorPluginInterface", "QDesignerFormWindowCursorInterface",
            +            "QDesignerFormWindowInterface", "QDesignerFormWindowManagerInterface",
            +            "QDesignerFormWindowToolInterface",
            +            "QDesignerIconCacheInterface", "QDesignerIntegrationInterface",
            +            "QDesignerLanguageExtension", "QDesignerLayoutDecorationExtension",
            +            "QDesignerMemberSheetExtension", "QDesignerMetaDataBaseInterface",
            +            "QDesignerMetaDataBaseItemInterface",
            +            "QDesignerObjectInspectorInterface", "QDesignerPromotionInterface",
            +            "QDesignerPropertyEditorInterface",
            +            "QDesignerPropertySheetExtension", "QDesignerResourceBrowserInterface",
            +            "QDesignerTaskMenuExtension", "QDesignerWidgetBoxInterface",
            +            "QDesignerWidgetDataBaseInterface", "QDesignerWidgetDataBaseItemInterface",
            +            "QDesignerWidgetFactoryInterface", "QDesktopServices",
            +            "QDesktopWidget", "QDial", "QDialog", "QDialogButtonBox", "QDir",
            +            "QDirIterator", "QDirModel", "QDockWidget", "QDomAttr",
            +            "QDomCDATASection", "QDomCharacterData", "QDomComment",
            +            "QDomDocument", "QDomDocumentFragment", "QDomDocumentType",
            +            "QDomElement", "QDomEntity", "QDomEntityReference",
            +            "QDomImplementation", "QDomNamedNodeMap", "QDomNode",
            +            "QDomNodeList", "QDomNotation", "QDomProcessingInstruction",
            +            "QDomText", "QDoubleSpinBox", "QDoubleValidator", "QDrag",
            +            "QDragEnterEvent", "QDragLeaveEvent", "QDragMoveEvent",
            +            "QDragResponseEvent", "QDropEvent", "QDynamicPropertyChangeEvent",
            +            "QErrorMessage", "QEvent", "QEventLoop", "QEventSizeOfChecker",
            +            "QExplicitlySharedDataPointer", "QExtensionFactory",
            +            "QExtensionManager", "QFactoryInterface", "QFile", "QFileDialog",
            +            "QFileIconProvider", "QFileInfo", "QFileInfoList",
            +            "QFileInfoListIterator", "QFileOpenEvent", "QFileSystemModel",
            +            "QFileSystemWatcher", "QFlag", "QFlags", "QFocusEvent",
            +            "QFocusFrame", "QFont", "QFontComboBox", "QFontDatabase",
            +            "QFontDialog", "QFontInfo", "QFontMetrics", "QFontMetricsF",
            +            "QForeachContainer", "QForeachContainerBase", "QFormBuilder",
            +            "QFormLayout", "QFrame", "QFSFileEngine", "QFtp", "QFuture",
            +            "QFutureInterface", "QFutureInterfaceBase", "QFutureIterator",
            +            "QFutureSynchronizer", "QFutureWatcher", "QFutureWatcherBase",
            +            "QGenericArgument", "QGenericReturnArgument", "QGLColormap",
            +            "QGLContext", "QGLFormat", "QGLFramebufferObject", "QGlobalStatic",
            +            "QGlobalStaticDeleter", "QGLPixelBuffer", "QGLWidget", "QGradient",
            +            "QGradientStop", "QGradientStops", "QGraphicsEllipseItem",
            +            "QGraphicsGridLayout", "QGraphicsItem", "QGraphicsItemAnimation",
            +            "QGraphicsItemGroup", "QGraphicsLayout", "QGraphicsLayoutItem",
            +            "QGraphicsLinearLayout", "QGraphicsLineItem", "QGraphicsPathItem",
            +            "QGraphicsPixmapItem", "QGraphicsPolygonItem",
            +            "QGraphicsProxyWidget", "QGraphicsRectItem", "QGraphicsScene",
            +            "QGraphicsSceneContextMenuEvent", "QGraphicsSceneDragDropEvent",
            +            "QGraphicsSceneEvent", "QGraphicsSceneHelpEvent",
            +            "QGraphicsSceneHoverEvent", "QGraphicsSceneMouseEvent",
            +            "QGraphicsSceneMoveEvent", "QGraphicsSceneResizeEvent",
            +            "QGraphicsSceneWheelEvent", "QGraphicsSimpleTextItem",
            +            "QGraphicsSvgItem", "QGraphicsTextItem", "QGraphicsView",
            +            "QGraphicsWidget", "QGridLayout", "QGroupBox", "QGtkStyle", "QHash",
            +            "QHashData", "QHashDummyNode", "QHashDummyValue", "QHashIterator",
            +            "QHashNode", "QHBoxLayout", "QHeaderView", "QHelpContentItem",
            +            "QHelpContentModel", "QHelpContentWidget", "QHelpEngine",
            +            "QHelpEngineCore", "QHelpEvent", "QHelpGlobal", "QHelpIndexModel",
            +            "QHelpIndexWidget", "QHelpSearchEngine", "QHelpSearchQuery",
            +            "QHelpSearchQueryWidget", "QHelpSearchResultWidget", "QHideEvent",
            +            "QHostAddress", "QHostInfo", "QHoverEvent", "QHttp", "QHttpHeader",
            +            "QHttpRequestHeader", "QHttpResponseHeader", "QIBaseDriver",
            +            "QIBaseResult", "QIcon", "QIconDragEvent", "QIconEngine",
            +            "QIconEngineFactoryInterface", "QIconEngineFactoryInterfaceV2",
            +            "QIconEnginePlugin", "QIconEnginePluginV2", "QIconEngineV2",
            +            "QIconSet", "QImage", "QImageIOHandler",
            +            "QImageIOHandlerFactoryInterface", "QImageIOPlugin", "QImageReader",
            +            "QImageTextKeyLang", "QImageWriter", "QIncompatibleFlag",
            +            "QInputContext", "QInputContextFactory",
            +            "QInputContextFactoryInterface", "QInputContextPlugin",
            +            "QInputDialog", "QInputEvent", "QInputMethodEvent", "Q_INT16",
            +            "Q_INT32", "Q_INT64", "Q_INT8", "QInternal", "QIntForSize",
            +            "QIntForType", "QIntValidator", "QIODevice", "Q_IPV6ADDR",
            +            "QIPv6Address", "QItemDelegate", "QItemEditorCreator",
            +            "QItemEditorCreatorBase", "QItemEditorFactory", "QItemSelection",
            +            "QItemSelectionModel", "QItemSelectionRange", "QKeyEvent",
            +            "QKeySequence", "QLabel", "QLatin1Char", "QLatin1String", "QLayout",
            +            "QLayoutItem", "QLayoutIterator", "QLCDNumber", "QLibrary",
            +            "QLibraryInfo", "QLine", "QLinearGradient", "QLineEdit", "QLineF",
            +            "QLinkedList", "QLinkedListData", "QLinkedListIterator",
            +            "QLinkedListNode", "QList", "QListData", "QListIterator",
            +            "QListView", "QListWidget", "QListWidgetItem", "Q_LLONG", "QLocale",
            +            "QLocalServer", "QLocalSocket", "Q_LONG", "QMacCompatGLenum",
            +            "QMacCompatGLint", "QMacCompatGLuint", "QMacGLCompatTypes",
            +            "QMacMime", "QMacPasteboardMime", "QMainWindow", "QMap", "QMapData",
            +            "QMapIterator", "QMapNode", "QMapPayloadNode", "QMatrix",
            +            "QMdiArea", "QMdiSubWindow", "QMenu", "QMenuBar",
            +            "QMenubarUpdatedEvent", "QMenuItem", "QMessageBox",
            +            "QMetaClassInfo", "QMetaEnum", "QMetaMethod", "QMetaObject",
            +            "QMetaObjectExtraData", "QMetaProperty", "QMetaType", "QMetaTypeId",
            +            "QMetaTypeId2", "QMimeData", "QMimeSource", "QModelIndex",
            +            "QModelIndexList", "QMotifStyle", "QMouseEvent", "QMoveEvent",
            +            "QMovie", "QMultiHash", "QMultiMap", "QMutableFutureIterator",
            +            "QMutableHashIterator", "QMutableLinkedListIterator",
            +            "QMutableListIterator", "QMutableMapIterator",
            +            "QMutableSetIterator", "QMutableStringListIterator",
            +            "QMutableVectorIterator", "QMutex", "QMutexLocker", "QMYSQLDriver",
            +            "QMYSQLResult", "QNetworkAccessManager", "QNetworkAddressEntry",
            +            "QNetworkCacheMetaData", "QNetworkCookie", "QNetworkCookieJar",
            +            "QNetworkDiskCache", "QNetworkInterface", "QNetworkProxy",
            +            "QNetworkProxyFactory", "QNetworkProxyQuery", "QNetworkReply",
            +            "QNetworkRequest", "QNoDebug", "QNoImplicitBoolCast", "QObject",
            +            "QObjectCleanupHandler", "QObjectData", "QObjectList",
            +            "QObjectUserData", "QOCIDriver", "QOCIResult", "QODBCDriver",
            +            "QODBCResult", "QPageSetupDialog", "QPaintDevice", "QPaintEngine",
            +            "QPaintEngineState", "QPainter", "QPainterPath",
            +            "QPainterPathPrivate", "QPainterPathStroker", "QPaintEvent",
            +            "QPair", "QPalette", "QPen", "QPersistentModelIndex", "QPicture",
            +            "QPictureFormatInterface", "QPictureFormatPlugin", "QPictureIO",
            +            "Q_PID", "QPixmap", "QPixmapCache", "QPlainTextDocumentLayout",
            +            "QPlainTextEdit", "QPlastiqueStyle", "QPluginLoader", "QPoint",
            +            "QPointer", "QPointF", "QPolygon", "QPolygonF", "QPrintDialog",
            +            "QPrintEngine", "QPrinter", "QPrinterInfo", "QPrintPreviewDialog",
            +            "QPrintPreviewWidget", "QProcess", "QProgressBar",
            +            "QProgressDialog", "QProxyModel", "QPSQLDriver", "QPSQLResult",
            +            "QPushButton", "QQueue", "QRadialGradient", "QRadioButton",
            +            "QReadLocker", "QReadWriteLock", "QRect", "QRectF", "QRegExp",
            +            "QRegExpValidator", "QRegion", "QResizeEvent", "QResource",
            +            "QReturnArgument", "QRgb", "QRubberBand", "QRunnable",
            +            "QScriptable", "QScriptClass", "QScriptClassPropertyIterator",
            +            "QScriptContext", "QScriptContextInfo", "QScriptContextInfoList",
            +            "QScriptEngine", "QScriptEngineAgent", "QScriptEngineDebugger",
            +            "QScriptExtensionInterface", "QScriptExtensionPlugin",
            +            "QScriptString", "QScriptSyntaxCheckResult", "QScriptValue",
            +            "QScriptValueIterator", "QScriptValueList", "QScrollArea",
            +            "QScrollBar", "QSemaphore", "QSessionManager", "QSet",
            +            "QSetIterator", "QSettings", "QSharedData", "QSharedDataPointer",
            +            "QSharedMemory", "QSharedPointer", "QShortcut", "QShortcutEvent",
            +            "QShowEvent", "QSignalMapper", "QSignalSpy", "QSimpleXmlNodeModel",
            +            "QSize", "QSizeF", "QSizeGrip", "QSizePolicy", "QSlider",
            +            "QSocketNotifier", "QSortFilterProxyModel", "QSound",
            +            "QSourceLocation", "QSpacerItem", "QSpinBox", "QSplashScreen",
            +            "QSplitter", "QSplitterHandle", "QSpontaneKeyEvent", "QSqlDatabase",
            +            "QSqlDriver", "QSqlDriverCreator", "QSqlDriverCreatorBase",
            +            "QSqlDriverFactoryInterface", "QSqlDriverPlugin", "QSqlError",
            +            "QSqlField", "QSqlIndex", "QSQLite2Driver", "QSQLite2Result",
            +            "QSQLiteDriver", "QSQLiteResult", "QSqlQuery", "QSqlQueryModel",
            +            "QSqlRecord", "QSqlRelation", "QSqlRelationalDelegate",
            +            "QSqlRelationalTableModel", "QSqlResult", "QSqlTableModel", "QSsl",
            +            "QSslCertificate", "QSslCipher", "QSslConfiguration", "QSslError",
            +            "QSslKey", "QSslSocket", "QStack", "QStackedLayout",
            +            "QStackedWidget", "QStandardItem", "QStandardItemEditorCreator",
            +            "QStandardItemModel", "QStatusBar", "QStatusTipEvent",
            +            "QStdWString", "QString", "QStringList", "QStringListIterator",
            +            "QStringListModel", "QStringMatcher", "QStringRef", "QStyle",
            +            "QStyledItemDelegate", "QStyleFactory", "QStyleFactoryInterface",
            +            "QStyleHintReturn", "QStyleHintReturnMask",
            +            "QStyleHintReturnVariant", "QStyleOption", "QStyleOptionButton",
            +            "QStyleOptionComboBox", "QStyleOptionComplex",
            +            "QStyleOptionDockWidget", "QStyleOptionDockWidgetV2",
            +            "QStyleOptionFocusRect", "QStyleOptionFrame", "QStyleOptionFrameV2",
            +            "QStyleOptionFrameV3", "QStyleOptionGraphicsItem",
            +            "QStyleOptionGroupBox", "QStyleOptionHeader",
            +            "QStyleOptionMenuItem", "QStyleOptionProgressBar",
            +            "QStyleOptionProgressBarV2", "QStyleOptionQ3DockWindow",
            +            "QStyleOptionQ3ListView", "QStyleOptionQ3ListViewItem",
            +            "QStyleOptionRubberBand", "QStyleOptionSizeGrip",
            +            "QStyleOptionSlider", "QStyleOptionSpinBox", "QStyleOptionTab",
            +            "QStyleOptionTabBarBase", "QStyleOptionTabBarBaseV2",
            +            "QStyleOptionTabV2", "QStyleOptionTabV3",
            +            "QStyleOptionTabWidgetFrame", "QStyleOptionTitleBar",
            +            "QStyleOptionToolBar", "QStyleOptionToolBox",
            +            "QStyleOptionToolBoxV2", "QStyleOptionToolButton",
            +            "QStyleOptionViewItem", "QStyleOptionViewItemV2",
            +            "QStyleOptionViewItemV3", "QStyleOptionViewItemV4", "QStylePainter",
            +            "QStylePlugin", "QSvgGenerator", "QSvgRenderer", "QSvgWidget",
            +            "QSyntaxHighlighter", "QSysInfo", "QSystemLocale",
            +            "QSystemSemaphore", "QSystemTrayIcon", "Qt", "Qt3Support",
            +            "QTabBar", "QTabletEvent", "QTableView", "QTableWidget",
            +            "QTableWidgetItem", "QTableWidgetSelectionRange", "QTabWidget",
            +            "QtAlgorithms", "QtAssistant", "QtCleanUpFunction",
            +            "QtConcurrentFilter", "QtConcurrentMap", "QtConcurrentRun",
            +            "QtContainerFwd", "QtCore", "QTcpServer", "QTcpSocket", "QtDBus",
            +            "QtDebug", "QtDesigner", "QTDSDriver", "QTDSResult",
            +            "QTemporaryFile", "QtEndian", "QTest", "QTestAccessibility",
            +            "QTestAccessibilityEvent", "QTestData", "QTestDelayEvent",
            +            "QTestEvent", "QTestEventList", "QTestEventLoop",
            +            "QTestKeyClicksEvent", "QTestKeyEvent", "QTestMouseEvent",
            +            "QtEvents", "QTextBlock", "QTextBlockFormat", "QTextBlockGroup",
            +            "QTextBlockUserData", "QTextBoundaryFinder", "QTextBrowser",
            +            "QTextCharFormat", "QTextCodec", "QTextCodecFactoryInterface",
            +            "QTextCodecPlugin", "QTextCursor", "QTextDecoder", "QTextDocument",
            +            "QTextDocumentFragment", "QTextDocumentWriter", "QTextEdit",
            +            "QTextEncoder", "QTextFormat", "QTextFragment", "QTextFrame",
            +            "QTextFrameFormat", "QTextFrameLayoutData", "QTextImageFormat",
            +            "QTextInlineObject", "QTextIStream", "QTextItem", "QTextLayout",
            +            "QTextLength", "QTextLine", "QTextList", "QTextListFormat",
            +            "QTextObject", "QTextObjectInterface", "QTextOption",
            +            "QTextOStream", "QTextStream", "QTextStreamFunction",
            +            "QTextStreamManipulator", "QTextTable", "QTextTableCell",
            +            "QTextTableCellFormat", "QTextTableFormat", "QtGlobal", "QtGui",
            +            "QtHelp", "QThread", "QThreadPool", "QThreadStorage",
            +            "QThreadStorageData", "QTime", "QTimeEdit", "QTimeLine", "QTimer",
            +            "QTimerEvent", "QtMsgHandler", "QtNetwork", "QToolBar",
            +            "QToolBarChangeEvent", "QToolBox", "QToolButton", "QToolTip",
            +            "QtOpenGL", "QtPlugin", "QtPluginInstanceFunction", "QTransform",
            +            "QTranslator", "QTreeView", "QTreeWidget", "QTreeWidgetItem",
            +            "QTreeWidgetItemIterator", "QTS", "QtScript", "QtScriptTools",
            +            "QtSql", "QtSvg", "QtTest", "QtUiTools", "QtWebKit", "QtXml",
            +            "QtXmlPatterns", "QTypeInfo", "QUdpSocket", "QUiLoader",
            +            "QUintForSize", "QUintForType", "QUndoCommand", "QUndoGroup",
            +            "QUndoStack", "QUndoView", "QUnixPrintWidget", "QUpdateLaterEvent",
            +            "QUrl", "QUrlInfo", "QUuid", "QValidator", "QVariant",
            +            "QVariantComparisonHelper", "QVariantHash", "QVariantList",
            +            "QVariantMap", "QVarLengthArray", "QVBoxLayout", "QVector",
            +            "QVectorData", "QVectorIterator", "QVectorTypedData",
            +            "QWaitCondition", "QWeakPointer", "QWebDatabase", "QWebFrame",
            +            "QWebHistory", "QWebHistoryInterface", "QWebHistoryItem",
            +            "QWebHitTestResult", "QWebPage", "QWebPluginFactory",
            +            "QWebSecurityOrigin", "QWebSettings", "QWebView", "QWhatsThis",
            +            "QWhatsThisClickedEvent", "QWheelEvent", "QWidget", "QWidgetAction",
            +            "QWidgetData", "QWidgetItem", "QWidgetItemV2", "QWidgetList",
            +            "QWidgetMapper", "QWidgetSet", "QWindowsCEStyle", "QWindowsMime",
            +            "QWindowsMobileStyle", "QWindowsStyle", "QWindowStateChangeEvent",
            +            "QWindowsVistaStyle", "QWindowsXPStyle", "QWizard", "QWizardPage",
            +            "QWMatrix", "QWorkspace", "QWriteLocker", "QX11EmbedContainer",
            +            "QX11EmbedWidget", "QX11Info", "QXmlAttributes",
            +            "QXmlContentHandler", "QXmlDeclHandler", "QXmlDefaultHandler",
            +            "QXmlDTDHandler", "QXmlEntityResolver", "QXmlErrorHandler",
            +            "QXmlFormatter", "QXmlInputSource", "QXmlItem",
            +            "QXmlLexicalHandler", "QXmlLocator", "QXmlName", "QXmlNamePool",
            +            "QXmlNamespaceSupport", "QXmlNodeModelIndex", "QXmlParseException",
            +            "QXmlQuery", "QXmlReader", "QXmlResultItems", "QXmlSerializer",
            +            "QXmlSimpleReader", "QXmlStreamAttribute", "QXmlStreamAttributes",
            +            "QXmlStreamEntityDeclaration", "QXmlStreamEntityDeclarations",
            +            "QXmlStreamEntityResolver", "QXmlStreamNamespaceDeclaration",
            +            "QXmlStreamNamespaceDeclarations", "QXmlStreamNotationDeclaration",
            +            "QXmlStreamNotationDeclarations", "QXmlStreamReader",
            +            "QXmlStreamStringRef", "QXmlStreamWriter"
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':', ',', ';', '|', '<', '>'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        5 => true,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000000; font-weight:bold;',
            +            2 => 'color: #0057AE;',
            +            3 => 'color: #2B74C7;',
            +            4 => 'color: #0057AE;',
            +            5 => 'color: #22aadd;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #888888;',
            +            2 => 'color: #006E28;',
            +            3 => 'color: #BF0303;',
            +            4 => 'color: #BF0303;',
            +            'MULTI' => 'color: #888888; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;',
            +            1 => 'color: #000099; font-weight: bold;',
            +            2 => 'color: #660099; font-weight: bold;',
            +            3 => 'color: #660099; font-weight: bold;',
            +            4 => 'color: #660099; font-weight: bold;',
            +            5 => 'color: #006699; font-weight: bold;',
            +            'HARD' => '',
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #006E28;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #BF0303;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #B08000;',
            +            GESHI_NUMBER_BIN_PREFIX_0B => 'color: #208080;',
            +            GESHI_NUMBER_OCT_PREFIX => 'color: #208080;',
            +            GESHI_NUMBER_HEX_PREFIX => 'color: #208080;',
            +            GESHI_NUMBER_FLT_SCI_SHORT => 'color:#800080;',
            +            GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;',
            +            GESHI_NUMBER_FLT_NONSCI_F => 'color:#800080;',
            +            GESHI_NUMBER_FLT_NONSCI => 'color:#800080;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #2B74C7;',
            +            2 => 'color: #2B74C7;',
            +            3 => 'color: #2B74C7;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #006E28;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => 'http://doc.qt.io/qt-5/{FNAMEL}.html'
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.',
            +        2 => '::',
            +        3 => '->',
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4,
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            'DISALLOWED_BEFORE' => "(?|^])",
            +            'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_<\|%\\-])"
            +        ),
            +        'OOLANG' => array(
            +            'MATCH_AFTER' => '~?[a-zA-Z][a-zA-Z0-9_]*',
            +        )
            +    )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/cpp-winapi.php b/vendor/easybook/geshi/geshi/cpp-winapi.php
            new file mode 100644
            index 0000000000..ddc70b6882
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/cpp-winapi.php
            @@ -0,0 +1,836 @@
            + 'C++ (WinAPI)',
            +    'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(
            +        //Multiline-continued single-line comments
            +        1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m',
            +        //Multiline-continued preprocessor define
            +        2 => '/#(?:\\\\\\\\|\\\\\\n|.)*$/m',
            +        //C++ 11 string literal extensions
            +        3 => '/(?:L|u8?|U)(?=")/',
            +        //C++ 11 string literal extensions (raw)
            +        4 => '/R"([^()\s\\\\]*)\((?:(?!\)\\1").)*\)\\1"/ms'
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'ESCAPE_REGEXP' => array(
            +        //Simple Single Char Escapes
            +        1 => "#\\\\[abfnrtv\\\'\"?\n]#i",
            +        //Hexadecimal Char Specs
            +        2 => "#\\\\x[\da-fA-F]{2}#",
            +        //Hexadecimal Char Specs
            +        3 => "#\\\\u[\da-fA-F]{4}#",
            +        //Hexadecimal Char Specs
            +        4 => "#\\\\U[\da-fA-F]{8}#",
            +        //Octal Char Specs
            +        5 => "#\\\\[0-7]{1,3}#"
            +        ),
            +    'NUMBERS' =>
            +        GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B |
            +        GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI |
            +        GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO,
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'break', 'case', 'continue', 'default', 'do', 'else', 'for', 'goto', 'if', 'return',
            +            'switch', 'throw', 'while'
            +            ),
            +        2 => array(
            +            'NULL', 'false', 'true', 'enum', 'errno', 'EDOM',
            +            'ERANGE', 'FLT_RADIX', 'FLT_ROUNDS', 'FLT_DIG', 'DBL_DIG', 'LDBL_DIG',
            +            'FLT_EPSILON', 'DBL_EPSILON', 'LDBL_EPSILON', 'FLT_MANT_DIG', 'DBL_MANT_DIG',
            +            'LDBL_MANT_DIG', 'FLT_MAX', 'DBL_MAX', 'LDBL_MAX', 'FLT_MAX_EXP', 'DBL_MAX_EXP',
            +            'LDBL_MAX_EXP', 'FLT_MIN', 'DBL_MIN', 'LDBL_MIN', 'FLT_MIN_EXP', 'DBL_MIN_EXP',
            +            'LDBL_MIN_EXP', 'CHAR_BIT', 'CHAR_MAX', 'CHAR_MIN', 'SCHAR_MAX', 'SCHAR_MIN',
            +            'UCHAR_MAX', 'SHRT_MAX', 'SHRT_MIN', 'USHRT_MAX', 'INT_MAX', 'INT_MIN',
            +            'UINT_MAX', 'LONG_MAX', 'LONG_MIN', 'ULONG_MAX', 'HUGE_VAL', 'SIGABRT',
            +            'SIGFPE', 'SIGILL', 'SIGINT', 'SIGSEGV', 'SIGTERM', 'SIG_DFL', 'SIG_ERR',
            +            'SIG_IGN', 'BUFSIZ', 'EOF', 'FILENAME_MAX', 'FOPEN_MAX', 'L_tmpnam',
            +            'SEEK_CUR', 'SEEK_END', 'SEEK_SET', 'TMP_MAX', 'stdin', 'stdout', 'stderr',
            +            'EXIT_FAILURE', 'EXIT_SUCCESS', 'RAND_MAX', 'CLOCKS_PER_SEC',
            +            'virtual', 'public', 'private', 'protected', 'template', 'using', 'namespace',
            +            'try', 'catch', 'inline', 'dynamic_cast', 'const_cast', 'reinterpret_cast',
            +            'static_cast', 'explicit', 'friend', 'typename', 'typeid', 'class'
            +            ),
            +        3 => array(
            +            'cin', 'cerr', 'clog', 'cout', 'delete', 'new', 'this',
            +            'printf', 'fprintf', 'snprintf', 'sprintf', 'assert',
            +            'isalnum', 'isalpha', 'isdigit', 'iscntrl', 'isgraph', 'islower', 'isprint',
            +            'ispunct', 'isspace', 'isupper', 'isxdigit', 'tolower', 'toupper',
            +            'exp', 'log', 'log10', 'pow', 'sqrt', 'ceil', 'floor', 'fabs', 'ldexp',
            +            'frexp', 'modf', 'fmod', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'atan2',
            +            'sinh', 'cosh', 'tanh', 'setjmp', 'longjmp',
            +            'va_start', 'va_arg', 'va_end', 'offsetof', 'sizeof', 'fopen', 'freopen',
            +            'fflush', 'fclose', 'remove', 'rename', 'tmpfile', 'tmpname', 'setvbuf',
            +            'setbuf', 'vfprintf', 'vprintf', 'vsprintf', 'fscanf', 'scanf', 'sscanf',
            +            'fgetc', 'fgets', 'fputc', 'fputs', 'getc', 'getchar', 'gets', 'putc',
            +            'putchar', 'puts', 'ungetc', 'fread', 'fwrite', 'fseek', 'ftell', 'rewind',
            +            'fgetpos', 'fsetpos', 'clearerr', 'feof', 'ferror', 'perror', 'abs', 'labs',
            +            'div', 'ldiv', 'atof', 'atoi', 'atol', 'strtod', 'strtol', 'strtoul', 'calloc',
            +            'malloc', 'realloc', 'free', 'abort', 'exit', 'atexit', 'system', 'getenv',
            +            'bsearch', 'qsort', 'rand', 'srand', 'strcpy', 'strncpy', 'strcat', 'strncat',
            +            'strcmp', 'strncmp', 'strcoll', 'strchr', 'strrchr', 'strspn', 'strcspn',
            +            'strpbrk', 'strstr', 'strlen', 'strerror', 'strtok', 'strxfrm', 'memcpy',
            +            'memmove', 'memcmp', 'memchr', 'memset', 'clock', 'time', 'difftime', 'mktime',
            +            'asctime', 'ctime', 'gmtime', 'localtime', 'strftime'
            +            ),
            +        4 => array(
            +            'auto', 'bool', 'char', 'const', 'double', 'float', 'int', 'long', 'longint',
            +            'register', 'short', 'shortint', 'signed', 'static', 'struct',
            +            'typedef', 'union', 'unsigned', 'void', 'volatile', 'extern', 'jmp_buf',
            +            'signal', 'raise', 'va_list', 'ptrdiff_t', 'size_t', 'FILE', 'fpos_t',
            +            'div_t', 'ldiv_t', 'clock_t', 'time_t', 'tm', 'wchar_t',
            +
            +            'int8', 'int16', 'int32', 'int64',
            +            'uint8', 'uint16', 'uint32', 'uint64',
            +
            +            'int_fast8_t', 'int_fast16_t', 'int_fast32_t', 'int_fast64_t',
            +            'uint_fast8_t', 'uint_fast16_t', 'uint_fast32_t', 'uint_fast64_t',
            +
            +            'int_least8_t', 'int_least16_t', 'int_least32_t', 'int_least64_t',
            +            'uint_least8_t', 'uint_least16_t', 'uint_least32_t', 'uint_least64_t',
            +
            +            'int8_t', 'int16_t', 'int32_t', 'int64_t',
            +            'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t',
            +
            +            'intmax_t', 'uintmax_t', 'intptr_t', 'uintptr_t'
            +            ),
            +        // Public API
            +        5 => array(
            +            'AssignProcessToJobObject', 'CommandLineToArgvW', 'ConvertThreadToFiber',
            +            'CreateFiber', 'CreateJobObjectA', 'CreateJobObjectW', 'CreateProcessA',
            +            'CreateProcessAsUserA', 'CreateProcessAsUserW', 'CreateProcessW',
            +            'CreateRemoteThread', 'CreateThread', 'DeleteFiber', 'ExitProcess',
            +            'ExitThread', 'FreeEnvironmentStringsA', 'FreeEnvironmentStringsW',
            +            'GetCommandLineA', 'GetCommandLineW', 'GetCurrentProcess',
            +            'GetCurrentProcessId', 'GetCurrentThread', 'GetCurrentThreadId',
            +            'GetEnvironmentStringsA', 'GetEnvironmentStringsW',
            +            'GetEnvironmentVariableA', 'GetEnvironmentVariableW', 'GetExitCodeProcess',
            +            'GetExitCodeThread', 'GetGuiResources', 'GetPriorityClass',
            +            'GetProcessAffinityMask', 'GetProcessPriorityBoost',
            +            'GetProcessShutdownParameters', 'GetProcessTimes', 'GetProcessVersion',
            +            'GetProcessWorkingSetSize', 'GetStartupInfoA', 'GetStartupInfoW',
            +            'GetThreadPriority', 'GetThreadPriorityBoost', 'GetThreadTimes',
            +            'OpenJobObjectA', 'OpenJobObjectW', 'OpenProcess',
            +            'QueryInformationJobObject', 'ResumeThread', 'SetEnvironmentVariableA',
            +            'SetEnvironmentVariableW', 'SetInformationJobObject', 'SetPriorityClass',
            +            'SetProcessAffinityMask', 'SetProcessPriorityBoost',
            +            'SetProcessShutdownParameters', 'SetProcessWorkingSetSize',
            +            'SetThreadAffinityMask', 'SetThreadIdealProcessor', 'SetThreadPriority',
            +            'SetThreadPriorityBoost', 'Sleep', 'SleepEx', 'SuspendThread',
            +            'SwitchToFiber', 'SwitchToThread', 'TerminateJobObject', 'TerminateProcess',
            +            'TerminateThread', 'WaitForInputIdle', 'WinExec',
            +
            +            '_hread', '_hwrite', '_lclose', '_lcreat', '_llseek', '_lopen', '_lread',
            +            '_lwrite', 'AreFileApisANSI', 'CancelIo', 'CopyFileA', 'CopyFileW',
            +            'CreateDirectoryA', 'CreateDirectoryExA', 'CreateDirectoryExW',
            +            'CreateDirectoryW', 'CreateFileA', 'CreateFileW', 'DeleteFileA',
            +            'DeleteFileW', 'FindClose', 'FindCloseChangeNotification',
            +            'FindFirstChangeNotificationA', 'FindFirstChangeNotificationW',
            +            'FindFirstFileA', 'FindFirstFileW', 'FindNextFileA', 'FindNextFileW',
            +            'FlushFileBuffers', 'GetCurrentDirectoryA', 'GetCurrentDirectoryW',
            +            'GetDiskFreeSpaceA', 'GetDiskFreeSpaceExA', 'GetDiskFreeSpaceExW',
            +            'GetDiskFreeSpaceW', 'GetDriveTypeA', 'GetDriveTypeW', 'GetFileAttributesA',
            +            'GetFileAttributesExA', 'GetFileAttributesExW', 'GetFileAttributesW',
            +            'GetFileInformationByHandle', 'GetFileSize', 'GetFileType',
            +            'GetFullPathNameA', 'GetFullPathNameW', 'GetLogicalDrives',
            +            'GetLogicalDriveStringsA', 'GetLogicalDriveStringsW', 'GetLongPathNameA',
            +            'GetLongPathNameW', 'GetShortPathNameA', 'GetShortPathNameW',
            +            'GetTempFileNameA', 'GetTempFileNameW', 'GetTempPathA', 'GetTempPathW',
            +            'LockFile', 'MoveFileA', 'MoveFileW', 'MulDiv', 'OpenFile',
            +            'QueryDosDeviceA', 'QueryDosDeviceW', 'ReadFile', 'ReadFileEx',
            +            'RemoveDirectoryA', 'RemoveDirectoryW', 'SearchPathA', 'SearchPathW',
            +            'SetCurrentDirectoryA', 'SetCurrentDirectoryW', 'SetEndOfFile',
            +            'SetFileApisToANSI', 'SetFileApisToOEM', 'SetFileAttributesA',
            +            'SetFileAttributesW', 'SetFilePointer', 'SetHandleCount',
            +            'SetVolumeLabelA', 'SetVolumeLabelW', 'UnlockFile', 'WriteFile',
            +            'WriteFileEx',
            +
            +            'DeviceIoControl',
            +
            +            'GetModuleFileNameA', 'GetModuleFileNameW', 'GetProcAddress',
            +            'LoadLibraryA', 'LoadLibraryExA', 'LoadLibraryExW', 'LoadLibraryW',
            +            'LoadModule',
            +
            +            'GetPrivateProfileIntA', 'GetPrivateProfileIntW',
            +            'GetPrivateProfileSectionA', 'GetPrivateProfileSectionNamesA',
            +            'GetPrivateProfileSectionNamesW', 'GetPrivateProfileSectionW',
            +            'GetPrivateProfileStringA', 'GetPrivateProfileStringW',
            +            'GetPrivateProfileStructA', 'GetPrivateProfileStructW',
            +            'GetProfileIntA', 'GetProfileIntW', 'GetProfileSectionA',
            +            'GetProfileSectionW', 'GetProfileStringA', 'GetProfileStringW',
            +            'RegCloseKey', 'RegConnectRegistryA', 'RegConnectRegistryW',
            +            'RegCreateKeyA', 'RegCreateKeyExA', 'RegCreateKeyExW',
            +            'RegCreateKeyW', 'RegDeleteKeyA', 'RegDeleteKeyW', 'RegDeleteValueA',
            +            'RegDeleteValueW', 'RegEnumKeyA', 'RegEnumKeyExA', 'RegEnumKeyExW',
            +            'RegEnumKeyW', 'RegEnumValueA', 'RegEnumValueW', 'RegFlushKey',
            +            'RegGetKeySecurity', 'RegLoadKeyA', 'RegLoadKeyW',
            +            'RegNotifyChangeKeyValue', 'RegOpenKeyA', 'RegOpenKeyExA', 'RegOpenKeyExW',
            +            'RegOpenKeyW', 'RegOverridePredefKey', 'RegQueryInfoKeyA',
            +            'RegQueryInfoKeyW', 'RegQueryMultipleValuesA', 'RegQueryMultipleValuesW',
            +            'RegQueryValueA', 'RegQueryValueExA', 'RegQueryValueExW', 'RegQueryValueW',
            +            'RegReplaceKeyA', 'RegReplaceKeyW', 'RegRestoreKeyA', 'RegRestoreKeyW',
            +            'RegSaveKeyA', 'RegSaveKeyW', 'RegSetKeySecurity', 'RegSetValueA',
            +            'RegSetValueExA', 'RegSetValueExW', 'RegSetValueW', 'RegUnLoadKeyA',
            +            'RegUnLoadKeyW', 'WritePrivateProfileSectionA', 'WritePrivateProfileSectionW',
            +            'WritePrivateProfileStringA', 'WritePrivateProfileStringW',
            +            'WritePrivateProfileStructA', 'WritePrivateProfileStructW',
            +            'WriteProfileSectionA', 'WriteProfileSectionW', 'WriteProfileStringA',
            +            'WriteProfileStringW',
            +
            +            'AccessCheck', 'AccessCheckAndAuditAlarmA', 'AccessCheckAndAuditAlarmW',
            +            'AccessCheckByType', 'AccessCheckByTypeAndAuditAlarmA',
            +            'AccessCheckByTypeAndAuditAlarmW', 'AccessCheckByTypeResultList',
            +            'AccessCheckByTypeResultListAndAuditAlarmA', 'AccessCheckByTypeResultListAndAuditAlarmW',
            +            'AddAccessAllowedAce', 'AddAccessAllowedAceEx', 'AddAccessAllowedObjectAce',
            +            'AddAccessDeniedAce', 'AddAccessDeniedAceEx', 'AddAccessDeniedObjectAce',
            +            'AddAce', 'AddAuditAccessAce', 'AddAuditAccessAceEx', 'AddAuditAccessObjectAce',
            +            'AdjustTokenGroups', 'AdjustTokenPrivileges', 'AllocateAndInitializeSid',
            +            'AllocateLocallyUniqueId', 'AreAllAccessesGranted', 'AreAnyAccessesGranted',
            +            'BuildExplicitAccessWithNameA', 'BuildExplicitAccessWithNameW',
            +            'BuildImpersonateExplicitAccessWithNameA', 'BuildImpersonateExplicitAccessWithNameW',
            +            'BuildImpersonateTrusteeA', 'BuildImpersonateTrusteeW', 'BuildSecurityDescriptorA',
            +            'BuildSecurityDescriptorW', 'BuildTrusteeWithNameA', 'BuildTrusteeWithNameW',
            +            'BuildTrusteeWithSidA', 'BuildTrusteeWithSidW',
            +            'ConvertToAutoInheritPrivateObjectSecurity', 'CopySid', 'CreatePrivateObjectSecurity',
            +            'CreatePrivateObjectSecurityEx', 'CreateRestrictedToken', 'DeleteAce',
            +            'DestroyPrivateObjectSecurity', 'DuplicateToken', 'DuplicateTokenEx',
            +            'EqualPrefixSid', 'EqualSid', 'FindFirstFreeAce', 'FreeSid', 'GetAce',
            +            'GetAclInformation', 'GetAuditedPermissionsFromAclA', 'GetAuditedPermissionsFromAclW',
            +            'GetEffectiveRightsFromAclA', 'GetEffectiveRightsFromAclW',
            +            'GetExplicitEntriesFromAclA', 'GetExplicitEntriesFromAclW', 'GetFileSecurityA',
            +            'GetFileSecurityW', 'GetKernelObjectSecurity', 'GetLengthSid', 'GetMultipleTrusteeA',
            +            'GetMultipleTrusteeOperationA', 'GetMultipleTrusteeOperationW', 'GetMultipleTrusteeW',
            +            'GetNamedSecurityInfoA', 'GetNamedSecurityInfoW', 'GetPrivateObjectSecurity',
            +            'GetSecurityDescriptorControl', 'GetSecurityDescriptorDacl',
            +            'GetSecurityDescriptorGroup', 'GetSecurityDescriptorLength',
            +            'GetSecurityDescriptorOwner', 'GetSecurityDescriptorSacl', 'GetSecurityInfo',
            +            'GetSidIdentifierAuthority', 'GetSidLengthRequired', 'GetSidSubAuthority',
            +            'GetSidSubAuthorityCount', 'GetTokenInformation', 'GetTrusteeFormA',
            +            'GetTrusteeFormW', 'GetTrusteeNameA', 'GetTrusteeNameW', 'GetTrusteeTypeA',
            +            'GetTrusteeTypeW', 'GetUserObjectSecurity', 'ImpersonateLoggedOnUser',
            +            'ImpersonateNamedPipeClient', 'ImpersonateSelf', 'InitializeAcl',
            +            'InitializeSecurityDescriptor', 'InitializeSid', 'IsTokenRestricted', 'IsValidAcl',
            +            'IsValidSecurityDescriptor', 'IsValidSid', 'LogonUserA', 'LogonUserW',
            +            'LookupAccountNameA', 'LookupAccountNameW', 'LookupAccountSidA', 'LookupAccountSidW',
            +            'LookupPrivilegeDisplayNameA', 'LookupPrivilegeDisplayNameW', 'LookupPrivilegeNameA',
            +            'LookupPrivilegeNameW', 'LookupPrivilegeValueA', 'LookupPrivilegeValueW',
            +            'LookupSecurityDescriptorPartsA', 'LookupSecurityDescriptorPartsW', 'MakeAbsoluteSD',
            +            'MakeSelfRelativeSD', 'MapGenericMask', 'ObjectCloseAuditAlarmA',
            +            'ObjectCloseAuditAlarmW', 'ObjectDeleteAuditAlarmA', 'ObjectDeleteAuditAlarmW',
            +            'ObjectOpenAuditAlarmA', 'ObjectOpenAuditAlarmW', 'ObjectPrivilegeAuditAlarmA',
            +            'ObjectPrivilegeAuditAlarmW', 'OpenProcessToken', 'OpenThreadToken', 'PrivilegeCheck',
            +            'PrivilegedServiceAuditAlarmA', 'PrivilegedServiceAuditAlarmW', 'RevertToSelf',
            +            'SetAclInformation', 'SetEntriesInAclA', 'SetEntriesInAclW', 'SetFileSecurityA',
            +            'SetFileSecurityW', 'SetKernelObjectSecurity', 'SetNamedSecurityInfoA',
            +            'SetNamedSecurityInfoW', 'SetPrivateObjectSecurity', 'SetPrivateObjectSecurityEx',
            +            'SetSecurityDescriptorControl', 'SetSecurityDescriptorDacl',
            +            'SetSecurityDescriptorGroup', 'SetSecurityDescriptorOwner',
            +            'SetSecurityDescriptorSacl', 'SetSecurityInfo', 'SetThreadToken',
            +            'SetTokenInformation', 'SetUserObjectSecurity', 'ChangeServiceConfig2A',
            +            'ChangeServiceConfig2W', 'ChangeServiceConfigA', 'ChangeServiceConfigW',
            +            'CloseServiceHandle', 'ControlService', 'CreateServiceA', 'CreateServiceW',
            +            'DeleteService', 'EnumDependentServicesA', 'EnumDependentServicesW',
            +            'EnumServicesStatusA', 'EnumServicesStatusW', 'GetServiceDisplayNameA',
            +            'GetServiceDisplayNameW', 'GetServiceKeyNameA', 'GetServiceKeyNameW',
            +            'LockServiceDatabase', 'NotifyBootConfigStatus', 'OpenSCManagerA', 'OpenSCManagerW',
            +            'OpenServiceA', 'OpenServiceW', 'QueryServiceConfig2A', 'QueryServiceConfig2W',
            +            'QueryServiceConfigA', 'QueryServiceConfigW', 'QueryServiceLockStatusA',
            +            'QueryServiceLockStatusW', 'QueryServiceObjectSecurity', 'QueryServiceStatus',
            +            'RegisterServiceCtrlHandlerA', 'RegisterServiceCtrlHandlerW',
            +            'SetServiceObjectSecurity', 'SetServiceStatus', 'StartServiceA',
            +            'StartServiceCtrlDispatcherA', 'StartServiceCtrlDispatcherW', 'StartServiceW',
            +            'UnlockServiceDatabase',
            +
            +            'MultinetGetConnectionPerformanceA', 'MultinetGetConnectionPerformanceW',
            +            'NetAlertRaise', 'NetAlertRaiseEx', 'NetApiBufferAllocate', 'NetApiBufferFree',
            +            'NetApiBufferReallocate', 'NetApiBufferSize', 'NetConnectionEnum', 'NetFileClose',
            +            'NetFileGetInfo', 'NetGetAnyDCName', 'NetGetDCName', 'NetGetDisplayInformationIndex',
            +            'NetGroupAdd', 'NetGroupAddUser', 'NetGroupDel', 'NetGroupDelUser', 'NetGroupEnum',
            +            'NetGroupGetInfo', 'NetGroupGetUsers', 'NetGroupSetInfo', 'NetGroupSetUsers',
            +            'NetLocalGroupAdd', 'NetLocalGroupAddMember', 'NetLocalGroupAddMembers',
            +            'NetLocalGroupDel', 'NetLocalGroupDelMember', 'NetLocalGroupDelMembers',
            +            'NetLocalGroupEnum', 'NetLocalGroupGetInfo', 'NetLocalGroupGetMembers',
            +            'NetLocalGroupSetInfo', 'NetLocalGroupSetMembers', 'NetMessageBufferSend',
            +            'NetMessageNameAdd', 'NetMessageNameDel', 'NetMessageNameEnum',
            +            'NetMessageNameGetInfo', 'NetQueryDisplayInformation', 'NetRemoteComputerSupports',
            +            'NetRemoteTOd', 'NetReplExportDirAdd', 'NetReplExportDirDel', 'NetReplExportDirEnum',
            +            'NetReplExportDirGetInfo', 'NetReplExportDirLock', 'NetReplExportDirSetInfo',
            +            'NetReplExportDirUnlock', 'NetReplGetInfo', 'NetReplImportDirAdd',
            +            'NetReplImportDirDel', 'NetReplImportDirEnum', 'NetReplImportDirGetInfo',
            +            'NetReplImportDirLock', 'NetReplImportDirUnlock', 'NetReplSetInfo',
            +            'NetScheduleJobAdd', 'NetScheduleJobDel', 'NetScheduleJobEnum',
            +            'NetScheduleJobGetInfo', 'NetServerComputerNameAdd', 'NetServerComputerNameDel',
            +            'NetServerDiskEnum', 'NetServerEnum', 'NetServerEnumEx', 'NetServerGetInfo',
            +            'NetServerSetInfo', 'NetServerTransportAdd', 'NetServerTransportAddEx',
            +            'NetServerTransportDel', 'NetServerTransportEnum', 'NetSessionDel', 'NetSessionEnum',
            +            'NetSessionGetInfo', 'NetShareAdd', 'NetShareCheck', 'NetShareDel', 'NetShareEnum',
            +            'NetShareGetInfo', 'NetShareSetInfo', 'NetStatisticsGet', 'NetUseAdd', 'NetUseDel',
            +            'NetUseEnum', 'NetUseGetInfo', 'NetUserAdd', 'NetUserChangePassword', 'NetUserDel',
            +            'NetUserEnum', 'NetUserGetGroups', 'NetUserGetInfo', 'NetUserGetLocalGroups',
            +            'NetUserModalsGet', 'NetUserModalsSet', 'NetUserSetGroups', 'NetUserSetInfo',
            +            'NetWkstaGetInfo', 'NetWkstaSetInfo', 'NetWkstaTransportAdd', 'NetWkstaTransportDel',
            +            'NetWkstaTransportEnum', 'NetWkstaUserEnum', 'NetWkstaUserGetInfo',
            +            'NetWkstaUserSetInfo', 'WNetAddConnection2A', 'WNetAddConnection2W',
            +            'WNetAddConnection3A', 'WNetAddConnection3W', 'WNetAddConnectionA',
            +            'WNetAddConnectionW', 'WNetCancelConnection2A', 'WNetCancelConnection2W',
            +            'WNetCancelConnectionA', 'WNetCancelConnectionW', 'WNetCloseEnum',
            +            'WNetConnectionDialog', 'WNetConnectionDialog1A', 'WNetConnectionDialog1W',
            +            'WNetDisconnectDialog', 'WNetDisconnectDialog1A', 'WNetDisconnectDialog1W',
            +            'WNetEnumResourceA', 'WNetEnumResourceW', 'WNetGetConnectionA', 'WNetGetConnectionW',
            +            'WNetGetLastErrorA', 'WNetGetLastErrorW', 'WNetGetNetworkInformationA',
            +            'WNetGetNetworkInformationW', 'WNetGetProviderNameA', 'WNetGetProviderNameW',
            +            'WNetGetResourceInformationA', 'WNetGetResourceInformationW',
            +            'WNetGetResourceParentA', 'WNetGetResourceParentW', 'WNetGetUniversalNameA',
            +            'WNetGetUniversalNameW', 'WNetGetUserA', 'WNetGetUserW', 'WNetOpenEnumA',
            +            'WNetOpenEnumW', 'WNetUseConnectionA', 'WnetUseConnectionW',
            +
            +            'accept', 'bind', 'closesocket', 'connect', 'gethostbyaddr', 'gethostbyname',
            +            'gethostname', 'getpeername', 'getprotobyname', 'getprotobynumber', 'getservbyname',
            +            'getservbyport', 'getsockname', 'getsockopt', 'htonl', 'htons', 'inet_addr',
            +            'inet_ntoa', 'ioctlsocket', 'listen', 'ntohl', 'ntohs', 'recv', 'recvfrom', 'select',
            +            'send', 'sendto', 'setsockopt', 'shutdown', 'socket', 'WSAAccept',
            +            'WSAAddressToStringA', 'WSAAddressToStringW', 'WSAAsyncGetHostByAddr',
            +            'WSAAsyncGetHostByName', 'WSAAsyncGetProtoByName', 'WSAAsyncGetProtoByNumber',
            +            'WSAAsyncGetServByName', 'WSAAsyncGetServByPort', 'WSAAsyncSelect',
            +            'WSACancelAsyncRequest', 'WSACancelBlockingCall', 'WSACleanup', 'WSACloseEvent',
            +            'WSAConnect', 'WSACreateEvent', 'WSADuplicateSocketA', 'WSADuplicateSocketW',
            +            'WSAEnumNameSpaceProvidersA', 'WSAEnumNameSpaceProvidersW', 'WSAEnumNetworkEvents',
            +            'WSAEnumProtocolsA', 'WSAEnumProtocolsW', 'WSAEventSelect', 'WSAGetLastError',
            +            'WSAGetOverlappedResult', 'WSAGetQOSByName', 'WSAGetServiceClassInfoA',
            +            'WSAGetServiceClassInfoW', 'WSAGetServiceClassNameByClassIdA',
            +            'WSAGetServiceClassNameByClassIdW', 'WSAHtonl', 'WSAHtons', 'WSAInstallServiceClassA',
            +            'WSAInstallServiceClassW', 'WSAIoctl', 'WSAIsBlocking', 'WSAJoinLeaf',
            +            'WSALookupServiceBeginA', 'WSALookupServiceBeginW', 'WSALookupServiceEnd',
            +            'WSALookupServiceNextA', 'WSALookupServiceNextW', 'WSANtohl', 'WSANtohs',
            +            'WSAProviderConfigChange', 'WSARecv', 'WSARecvDisconnect', 'WSARecvFrom',
            +            'WSARemoveServiceClass', 'WSAResetEvent', 'WSASend', 'WSASendDisconnect', 'WSASendTo',
            +            'WSASetBlockingHook', 'WSASetEvent', 'WSASetLastError', 'WSASetServiceA',
            +            'WSASetServiceW', 'WSASocketA', 'WSASocketW', 'WSAStartup', 'WSAStringToAddressA',
            +            'WSAStringToAddressW', 'WSAUnhookBlockingHook', 'WSAWaitForMultipleEvents',
            +            'WSCDeinstallProvider', 'WSCEnableNSProvider', 'WSCEnumProtocols',
            +            'WSCGetProviderPath', 'WSCInstallNameSpace', 'WSCInstallProvider',
            +            'WSCUnInstallNameSpace',
            +
            +            'ContinueDebugEvent', 'DebugActiveProcess', 'DebugBreak', 'FatalExit',
            +            'FlushInstructionCache', 'GetThreadContext', 'GetThreadSelectorEntry',
            +            'IsDebuggerPresent', 'OutputDebugStringA', 'OutputDebugStringW', 'ReadProcessMemory',
            +            'SetDebugErrorLevel', 'SetThreadContext', 'WaitForDebugEvent', 'WriteProcessMemory',
            +
            +            'CloseHandle', 'DuplicateHandle', 'GetHandleInformation', 'SetHandleInformation',
            +
            +            'AdjustWindowRect', 'AdjustWindowRectEx', 'AllowSetForegroundWindow',
            +            'AnimateWindow', 'AnyPopup', 'ArrangeIconicWindows', 'BeginDeferWindowPos',
            +            'BringWindowToTop', 'CascadeWindows', 'ChildWindowFromPoint',
            +            'ChildWindowFromPointEx', 'CloseWindow', 'CreateWindowExA', 'CreateWindowExW',
            +            'DeferWindowPos', 'DestroyWindow', 'EndDeferWindowPos', 'EnumChildWindows',
            +            'EnumThreadWindows', 'EnumWindows', 'FindWindowA', 'FindWindowExA', 'FindWindowExW',
            +            'FindWindowW', 'GetAltTabInfoA', 'GetAltTabInfoW', 'GetAncestor', 'GetClientRect',
            +            'GetDesktopWindow', 'GetForegroundWindow', 'GetGUIThreadInfo', 'GetLastActivePopup',
            +            'GetLayout', 'GetParent', 'GetProcessDefaultLayout', 'GetTitleBarInf', 'GetTopWindow',
            +            'GetWindow', 'GetWindowInfo', 'GetWindowModuleFileNameA', 'GetWindowModuleFileNameW',
            +            'GetWindowPlacement', 'GetWindowRect', 'GetWindowTextA', 'GetWindowTextLengthA',
            +            'GetWindowTextLengthW', 'GetWindowTextW', 'GetWindowThreadProcessId', 'IsChild',
            +            'IsIconic', 'IsWindow', 'IsWindowUnicode', 'IsWindowVisible', 'IsZoomed',
            +            'LockSetForegroundWindow', 'MoveWindow', 'OpenIcon', 'RealChildWindowFromPoint',
            +            'RealGetWindowClassA', 'RealGetWindowClassW', 'SetForegroundWindow',
            +            'SetLayeredWindowAttributes', 'SetLayout', 'SetParent', 'SetProcessDefaultLayout',
            +            'SetWindowPlacement', 'SetWindowPos', 'SetWindowTextA', 'SetWindowTextW',
            +            'ShowOwnedPopups', 'ShowWindow', 'ShowWindowAsync', 'TileWindows',
            +            'UpdateLayeredWindow', 'WindowFromPoint',
            +
            +            'CreateDialogIndirectParamA', 'CreateDialogIndirectParamW', 'CreateDialogParamA',
            +            'CreateDialogParamW', 'DefDlgProcA', 'DefDlgProcW', 'DialogBoxIndirectParamA',
            +            'DialogBoxIndirectParamW', 'DialogBoxParamA', 'DialogBoxParamW', 'EndDialog',
            +            'GetDialogBaseUnits', 'GetDlgCtrlID', 'GetDlgItem', 'GetDlgItemInt',
            +            'GetDlgItemTextA', 'GetDlgItemTextW', 'GetNextDlgGroupItem', 'GetNextDlgTabItem',
            +            'IsDialogMessageA', 'IsDialogMessageW', 'MapDialogRect', 'MessageBoxA',
            +            'MessageBoxExA', 'MessageBoxExW', 'MessageBoxIndirectA', 'MessageBoxIndirectW',
            +            'MessageBoxW', 'SendDlgItemMessageA', 'SendDlgItemMessageW', 'SetDlgItemInt',
            +            'SetDlgItemTextA', 'SetDlgItemTextW',
            +
            +            'GetWriteWatch', 'GlobalMemoryStatus', 'GlobalMemoryStatusEx', 'IsBadCodePtr',
            +            'IsBadReadPtr', 'IsBadStringPtrA', 'IsBadStringPtrW', 'IsBadWritePtr',
            +            'ResetWriteWatch', 'AllocateUserPhysicalPages', 'FreeUserPhysicalPages',
            +            'MapUserPhysicalPages', 'MapUserPhysicalPagesScatter', 'GlobalAlloc', 'GlobalFlags',
            +            'GlobalFree', 'GlobalHandle', 'GlobalLock', 'GlobalReAlloc', 'GlobalSize',
            +            'GlobalUnlock', 'LocalAlloc', 'LocalFlags', 'LocalFree', 'LocalHandle', 'LocalLock',
            +            'LocalReAlloc', 'LocalSize', 'LocalUnlock', 'GetProcessHeap', 'GetProcessHeaps',
            +            'HeapAlloc', 'HeapCompact', 'HeapCreate', 'HeapDestroy', 'HeapFree', 'HeapLock',
            +            'HeapReAlloc', 'HeapSize', 'HeapUnlock', 'HeapValidate', 'HeapWalk', 'VirtualAlloc',
            +            'VirtualAllocEx', 'VirtualFree', 'VirtualFreeEx', 'VirtualLock', 'VirtualProtect',
            +            'VirtualProtectEx', 'VirtualQuery', 'VirtualQueryEx', 'VirtualUnlock',
            +            'GetFreeSpace', 'GlobalCompact', 'GlobalFix', 'GlobalUnfix', 'GlobalUnWire',
            +            'GlobalWire', 'IsBadHugeReadPtr', 'IsBadHugeWritePtr', 'LocalCompact', 'LocalShrink',
            +
            +            'GetClassInfoA', 'GetClassInfoW', 'GetClassInfoExA', 'GetClassInfoExW',
            +            'GetClassLongA', 'GetClassLongW', 'GetClassLongPtrA', 'GetClassLongPtrW',
            +            'RegisterClassA', 'RegisterClassW', 'RegisterClassExA', 'RegisterClassExW',
            +            'SetClassLongA', 'SetClassLongW', 'SetClassLongPtrA', 'SetClassLongPtrW',
            +            'SetWindowLongA', 'SetWindowLongW', 'SetWindowLongPtrA', 'SetWindowLongPtrW',
            +            'UnregisterClassA', 'UnregisterClassW', 'GetClassWord', 'GetWindowWord',
            +            'SetClassWord', 'SetWindowWord'
            +            ),
            +        // Native API
            +        6 => array(
            +            'CsrAllocateCaptureBuffer', 'CsrAllocateCapturePointer', 'CsrAllocateMessagePointer',
            +            'CsrCaptureMessageBuffer', 'CsrCaptureMessageString', 'CsrCaptureTimeout',
            +            'CsrClientCallServer', 'CsrClientConnectToServer', 'CsrFreeCaptureBuffer',
            +            'CsrIdentifyAlertableThread', 'CsrNewThread', 'CsrProbeForRead', 'CsrProbeForWrite',
            +            'CsrSetPriorityClass',
            +
            +            'LdrAccessResource', 'LdrDisableThreadCalloutsForDll', 'LdrEnumResources',
            +            'LdrFindEntryForAddress', 'LdrFindResource_U', 'LdrFindResourceDirectory_U',
            +            'LdrGetDllHandle', 'LdrGetProcedureAddress', 'LdrInitializeThunk', 'LdrLoadDll',
            +            'LdrProcessRelocationBlock', 'LdrQueryImageFileExecutionOptions',
            +            'LdrQueryProcessModuleInformation', 'LdrShutdownProcess', 'LdrShutdownThread',
            +            'LdrUnloadDll', 'LdrVerifyImageMatchesChecksum',
            +
            +            'NtAcceptConnectPort', 'ZwAcceptConnectPort', 'NtCompleteConnectPort',
            +            'ZwCompleteConnectPort', 'NtConnectPort', 'ZwConnectPort', 'NtCreatePort',
            +            'ZwCreatePort', 'NtImpersonateClientOfPort', 'ZwImpersonateClientOfPort',
            +            'NtListenPort', 'ZwListenPort', 'NtQueryInformationPort', 'ZwQueryInformationPort',
            +            'NtReadRequestData', 'ZwReadRequestData', 'NtReplyPort', 'ZwReplyPort',
            +            'NtReplyWaitReceivePort', 'ZwReplyWaitReceivePort', 'NtReplyWaitReplyPort',
            +            'ZwReplyWaitReplyPort', 'NtRequestPort', 'ZwRequestPort', 'NtRequestWaitReplyPort',
            +            'ZwRequestWaitReplyPort', 'NtSecureConnectPort', 'ZwSecureConnectPort',
            +            'NtWriteRequestData', 'ZwWriteRequestData',
            +
            +            'NtAccessCheck', 'ZwAccessCheck', 'NtAccessCheckAndAuditAlarm',
            +            'ZwAccessCheckAndAuditAlarm', 'NtAccessCheckByType', 'ZwAccessCheckByType',
            +            'NtAccessCheckByTypeAndAuditAlarm', 'ZwAccessCheckByTypeAndAuditAlarm',
            +            'NtAccessCheckByTypeResultList', 'ZwAccessCheckByTypeResultList',
            +            'NtAdjustGroupsToken', 'ZwAdjustGroupsToken', 'NtAdjustPrivilegesToken',
            +            'ZwAdjustPrivilegesToken', 'NtCloseObjectAuditAlarm', 'ZwCloseObjectAuditAlarm',
            +            'NtCreateToken', 'ZwCreateToken', 'NtDeleteObjectAuditAlarm',
            +            'ZwDeleteObjectAuditAlarm', 'NtDuplicateToken', 'ZwDuplicateToken',
            +            'NtFilterToken', 'ZwFilterToken', 'NtImpersonateThread', 'ZwImpersonateThread',
            +            'NtOpenObjectAuditAlarm', 'ZwOpenObjectAuditAlarm', 'NtOpenProcessToken',
            +            'ZwOpenProcessToken', 'NtOpenThreadToken', 'ZwOpenThreadToken', 'NtPrivilegeCheck',
            +            'ZwPrivilegeCheck', 'NtPrivilegedServiceAuditAlarm', 'ZwPrivilegedServiceAuditAlarm',
            +            'NtPrivilegeObjectAuditAlarm', 'ZwPrivilegeObjectAuditAlarm',
            +            'NtQueryInformationToken', 'ZwQueryInformationToken', 'NtQuerySecurityObject',
            +            'ZwQuerySecurityObject', 'NtSetInformationToken', 'ZwSetInformationToken',
            +            'NtSetSecurityObject', 'ZwSetSecurityObject',
            +
            +            'NtAddAtom', 'ZwAddAtom', 'NtDeleteAtom', 'ZwDeleteAtom', 'NtFindAtom', 'ZwFindAtom',
            +            'NtQueryInformationAtom', 'ZwQueryInformationAtom',
            +
            +            'NtAlertResumeThread', 'ZwAlertResumeThread', 'NtAlertThread', 'ZwAlertThread',
            +            'NtCreateProcess', 'ZwCreateProcess', 'NtCreateThread', 'ZwCreateThread',
            +            'NtCurrentTeb', 'NtDelayExecution', 'ZwDelayExecution', 'NtGetContextThread',
            +            'ZwGetContextThread', 'NtOpenProcess', 'ZwOpenProcess', 'NtOpenThread',
            +            'ZwOpenThread', 'NtQueryInformationProcess', 'ZwQueryInformationProcess',
            +            'NtQueryInformationThread', 'ZwQueryInformationThread', 'NtQueueApcThread',
            +            'ZwQueueApcThread', 'NtResumeThread', 'ZwResumeThread', 'NtSetContextThread',
            +            'ZwSetContextThread', 'NtSetHighWaitLowThread', 'ZwSetHighWaitLowThread',
            +            'NtSetInformationProcess', 'ZwSetInformationProcess', 'NtSetInformationThread',
            +            'ZwSetInformationThread', 'NtSetLowWaitHighThread', 'ZwSetLowWaitHighThread',
            +            'NtSuspendThread', 'ZwSuspendThread', 'NtTerminateProcess', 'ZwTerminateProcess',
            +            'NtTerminateThread', 'ZwTerminateThread', 'NtTestAlert', 'ZwTestAlert',
            +            'NtYieldExecution', 'ZwYieldExecution',
            +
            +            'NtAllocateVirtualMemory', 'ZwAllocateVirtualMemory', 'NtAllocateVirtualMemory64',
            +            'ZwAllocateVirtualMemory64', 'NtAreMappedFilesTheSame', 'ZwAreMappedFilesTheSame',
            +            'NtCreateSection', 'ZwCreateSection', 'NtExtendSection', 'ZwExtendSection',
            +            'NtFlushVirtualMemory', 'ZwFlushVirtualMemory', 'NtFreeVirtualMemory',
            +            'ZwFreeVirtualMemory', 'NtFreeVirtualMemory64', 'ZwFreeVirtualMemory64',
            +            'NtLockVirtualMemory', 'ZwLockVirtualMemory', 'NtMapViewOfSection',
            +            'ZwMapViewOfSection', 'NtMapViewOfVlmSection', 'ZwMapViewOfVlmSection',
            +            'NtOpenSection', 'ZwOpenSection', 'NtProtectVirtualMemory', 'ZwProtectVirtualMemory',
            +            'NtProtectVirtualMemory64', 'ZwProtectVirtualMemory64', 'NtQueryVirtualMemory',
            +            'ZwQueryVirtualMemory', 'NtQueryVirtualMemory64', 'ZwQueryVirtualMemory64',
            +            'NtReadVirtualMemory', 'ZwReadVirtualMemory', 'NtReadVirtualMemory64',
            +            'ZwReadVirtualMemory64', 'NtUnlockVirtualMemory', 'ZwUnlockVirtualMemory',
            +            'NtUnmapViewOfSection', 'ZwUnmapViewOfSection', 'NtUnmapViewOfVlmSection',
            +            'ZwUnmapViewOfVlmSection', 'NtWriteVirtualMemory', 'ZwWriteVirtualMemory',
            +            'NtWriteVirtualMemory64', 'ZwWriteVirtualMemory64',
            +
            +            'NtAssignProcessToJobObject', 'ZwAssignProcessToJobObject', 'NtCreateJobObject',
            +            'ZwCreateJobObject', 'NtOpenJobObject', 'ZwOpenJobObject',
            +            'NtQueryInformationJobObject', 'ZwQueryInformationJobObject',
            +            'NtSetInformationJobObject', 'ZwSetInformationJobObject', 'NtTerminateJobObject',
            +            'ZwTerminateJobObject',
            +
            +            'NtCancelIoFile', 'ZwCancelIoFile', 'NtCreateFile', 'ZwCreateFile',
            +            'NtCreateIoCompletion', 'ZwCreateIoCompletion', 'NtDeleteFile', 'ZwDeleteFile',
            +            'NtDeviceIoControlFile', 'ZwDeviceIoControlFile', 'NtFlushBuffersFile',
            +            'ZwFlushBuffersFile', 'NtFsControlFile', 'ZwFsControlFile', 'NtLockFile', 'ZwLockFile',
            +            'NtNotifyChangeDirectoryFile', 'ZwNotifyChangeDirectoryFile', 'NtOpenFile',
            +            'ZwOpenFile', 'NtOpenIoCompletion', 'ZwOpenIoCompletion', 'NtQueryAttributesFile',
            +            'ZwQueryAttributesFile', 'NtQueryDirectoryFile', 'ZwQueryDirectoryFile',
            +            'NtQueryEaFile', 'ZwQueryEaFile', 'NtQueryIoCompletion', 'ZwQueryIoCompletion',
            +            'NtQueryQuotaInformationFile', 'ZwQueryQuotaInformationFile',
            +            'NtQueryVolumeInformationFile', 'ZwQueryVolumeInformationFile', 'NtReadFile',
            +            'ZwReadFile', 'NtReadFile64', 'ZwReadFile64', 'NtReadFileScatter', 'ZwReadFileScatter',
            +            'NtRemoveIoCompletion', 'ZwRemoveIoCompletion', 'NtSetEaFile', 'ZwSetEaFile',
            +            'NtSetInformationFile', 'ZwSetInformationFile', 'NtSetIoCompletion',
            +            'ZwSetIoCompletion', 'NtSetQuotaInformationFile', 'ZwSetQuotaInformationFile',
            +            'NtSetVolumeInformationFile', 'ZwSetVolumeInformationFile', 'NtUnlockFile',
            +            'ZwUnlockFile', 'NtWriteFile', 'ZwWriteFile', 'NtWriteFile64','ZwWriteFile64',
            +            'NtWriteFileGather', 'ZwWriteFileGather', 'NtQueryFullAttributesFile',
            +            'ZwQueryFullAttributesFile', 'NtQueryInformationFile', 'ZwQueryInformationFile',
            +
            +            'RtlAbortRXact', 'RtlAbsoluteToSelfRelativeSD', 'RtlAcquirePebLock',
            +            'RtlAcquireResourceExclusive', 'RtlAcquireResourceShared', 'RtlAddAccessAllowedAce',
            +            'RtlAddAccessDeniedAce', 'RtlAddAce', 'RtlAddActionToRXact', 'RtlAddAtomToAtomTable',
            +            'RtlAddAttributeActionToRXact', 'RtlAddAuditAccessAce', 'RtlAddCompoundAce',
            +            'RtlAdjustPrivilege', 'RtlAllocateAndInitializeSid', 'RtlAllocateHandle',
            +            'RtlAllocateHeap', 'RtlAnsiCharToUnicodeChar', 'RtlAnsiStringToUnicodeSize',
            +            'RtlAnsiStringToUnicodeString', 'RtlAppendAsciizToString', 'RtlAppendStringToString',
            +            'RtlAppendUnicodeStringToString', 'RtlAppendUnicodeToString', 'RtlApplyRXact',
            +            'RtlApplyRXactNoFlush', 'RtlAreAllAccessesGranted', 'RtlAreAnyAccessesGranted',
            +            'RtlAreBitsClear', 'RtlAreBitsSet', 'RtlAssert', 'RtlCaptureStackBackTrace',
            +            'RtlCharToInteger', 'RtlCheckRegistryKey', 'RtlClearAllBits', 'RtlClearBits',
            +            'RtlClosePropertySet', 'RtlCompactHeap', 'RtlCompareMemory', 'RtlCompareMemoryUlong',
            +            'RtlCompareString', 'RtlCompareUnicodeString', 'RtlCompareVariants',
            +            'RtlCompressBuffer', 'RtlConsoleMultiByteToUnicodeN', 'RtlConvertExclusiveToShared',
            +            'RtlConvertLongToLargeInteger', 'RtlConvertPropertyToVariant',
            +            'RtlConvertSharedToExclusive', 'RtlConvertSidToUnicodeString',
            +            'RtlConvertUiListToApiList', 'RtlConvertUlongToLargeInteger',
            +            'RtlConvertVariantToProperty', 'RtlCopyLuid', 'RtlCopyLuidAndAttributesArray',
            +            'RtlCopySecurityDescriptor', 'RtlCopySid', 'RtlCopySidAndAttributesArray',
            +            'RtlCopyString', 'RtlCopyUnicodeString', 'RtlCreateAcl', 'RtlCreateAndSetSD',
            +            'RtlCreateAtomTable', 'RtlCreateEnvironment', 'RtlCreateHeap',
            +            'RtlCreateProcessParameters', 'RtlCreatePropertySet', 'RtlCreateQueryDebugBuffer',
            +            'RtlCreateRegistryKey', 'RtlCreateSecurityDescriptor', 'RtlCreateTagHeap',
            +            'RtlCreateUnicodeString', 'RtlCreateUnicodeStringFromAsciiz', 'RtlCreateUserProcess',
            +            'RtlCreateUserSecurityObject', 'RtlCreateUserThread', 'RtlCustomCPToUnicodeN',
            +            'RtlCutoverTimeToSystemTime', 'RtlDecompressBuffer', 'RtlDecompressFragment',
            +            'RtlDelete', 'RtlDeleteAce', 'RtlDeleteAtomFromAtomTable', 'RtlDeleteCriticalSection',
            +            'RtlDeleteElementGenericTable', 'RtlDeleteNoSplay', 'RtlDeleteRegistryValue',
            +            'RtlDeleteResource', 'RtlDeleteSecurityObject', 'RtlDeNormalizeProcessParams',
            +            'RtlDestroyAtomTable', 'RtlDestroyEnvironment', 'RtlDestroyHandleTable',
            +            'RtlDestroyHeap', 'RtlDestroyProcessParameters', 'RtlDestroyQueryDebugBuffer',
            +            'RtlDetermineDosPathNameType_U', 'RtlDoesFileExists_U', 'RtlDosPathNameToNtPathName_U',
            +            'RtlDosSearchPath_U', 'RtlDowncaseUnicodeString', 'RtlDumpResource',
            +            'RtlEmptyAtomTable', 'RtlEnlargedIntegerMultiply', 'RtlEnlargedUnsignedDivide',
            +            'RtlEnlargedUnsignedMultiply', 'RtlEnterCriticalSection', 'RtlEnumerateGenericTable',
            +            'RtlEnumerateGenericTableWithoutSplaying', 'RtlEnumerateProperties',
            +            'RtlEnumProcessHeaps', 'RtlEqualComputerName', 'RtlEqualDomainName', 'RtlEqualLuid',
            +            'RtlEqualPrefixSid', 'RtlEqualSid', 'RtlEqualString', 'RtlEqualUnicodeString',
            +            'RtlEraseUnicodeString', 'RtlExpandEnvironmentStrings_U', 'RtlExtendedIntegerMultiply',
            +            'RtlExtendedLargeIntegerDivide', 'RtlExtendedMagicDivide', 'RtlExtendHeap',
            +            'RtlFillMemory', 'RtlFillMemoryUlong', 'RtlFindClearBits', 'RtlFindClearBitsAndSet',
            +            'RtlFindLongestRunClear', 'RtlFindLongestRunSet', 'RtlFindMessage', 'RtlFindSetBits',
            +            'RtlFindSetBitsAndClear', 'RtlFirstFreeAce', 'RtlFlushPropertySet',
            +            'RtlFormatCurrentUserKeyPath', 'RtlFormatMessage', 'RtlFreeAnsiString',
            +            'RtlFreeHandle', 'RtlFreeHeap', 'RtlFreeOemString', 'RtlFreeSid',
            +            'RtlFreeUnicodeString', 'RtlFreeUserThreadStack', 'RtlGenerate8dot3Name', 'RtlGetAce',
            +            'RtlGetCallersAddress', 'RtlGetCompressionWorkSpaceSize',
            +            'RtlGetControlSecurityDescriptor', 'RtlGetCurrentDirectory_U',
            +            'RtlGetDaclSecurityDescriptor', 'RtlGetElementGenericTable', 'RtlGetFullPathName_U',
            +            'RtlGetGroupSecurityDescriptor', 'RtlGetLongestNtPathLength', 'RtlGetNtGlobalFlags',
            +            'RtlGetNtProductType', 'RtlGetOwnerSecurityDescriptor', 'RtlGetProcessHeaps',
            +            'RtlGetSaclSecurityDescriptor', 'RtlGetUserInfoHeap', 'RtlGuidToPropertySetName',
            +            'RtlIdentifierAuthoritySid', 'RtlImageDirectoryEntryToData', 'RtlImageNtHeader',
            +            'RtlImageRvaToSection', 'RtlImageRvaToVa', 'RtlImpersonateSelf', 'RtlInitAnsiString',
            +            'RtlInitCodePageTable', 'RtlInitializeAtomPackage', 'RtlInitializeBitMap',
            +            'RtlInitializeContext', 'RtlInitializeCriticalSection',
            +            'RtlInitializeCriticalSectionAndSpinCount', 'RtlInitializeGenericTable',
            +            'RtlInitializeHandleTable', 'RtlInitializeResource', 'RtlInitializeRXact',
            +            'RtlInitializeSid', 'RtlInitNlsTables', 'RtlInitString', 'RtlInitUnicodeString',
            +            'RtlInsertElementGenericTable', 'RtlIntegerToChar', 'RtlIntegerToUnicodeString',
            +            'RtlIsDosDeviceName_U', 'RtlIsGenericTableEmpty', 'RtlIsNameLegalDOS8Dot3',
            +            'RtlIsTextUnicode', 'RtlIsValidHandle', 'RtlIsValidIndexHandle', 'RtlLargeIntegerAdd',
            +            'RtlLargeIntegerArithmeticShift', 'RtlLargeIntegerDivide', 'RtlLargeIntegerNegate',
            +            'RtlLargeIntegerShiftLeft', 'RtlLargeIntegerShiftRight', 'RtlLargeIntegerSubtract',
            +            'RtlLargeIntegerToChar', 'RtlLeaveCriticalSection', 'RtlLengthRequiredSid',
            +            'RtlLengthSecurityDescriptor', 'RtlLengthSid', 'RtlLocalTimeToSystemTime',
            +            'RtlLockHeap', 'RtlLookupAtomInAtomTable', 'RtlLookupElementGenericTable',
            +            'RtlMakeSelfRelativeSD', 'RtlMapGenericMask', 'RtlMoveMemory',
            +            'RtlMultiByteToUnicodeN', 'RtlMultiByteToUnicodeSize', 'RtlNewInstanceSecurityObject',
            +            'RtlNewSecurityGrantedAccess', 'RtlNewSecurityObject', 'RtlNormalizeProcessParams',
            +            'RtlNtStatusToDosError', 'RtlNumberGenericTableElements', 'RtlNumberOfClearBits',
            +            'RtlNumberOfSetBits', 'RtlOemStringToUnicodeSize', 'RtlOemStringToUnicodeString',
            +            'RtlOemToUnicodeN', 'RtlOnMappedStreamEvent', 'RtlOpenCurrentUser',
            +            'RtlPcToFileHeader', 'RtlPinAtomInAtomTable', 'RtlpNtCreateKey',
            +            'RtlpNtEnumerateSubKey', 'RtlpNtMakeTemporaryKey', 'RtlpNtOpenKey',
            +            'RtlpNtQueryValueKey', 'RtlpNtSetValueKey', 'RtlPrefixString',
            +            'RtlPrefixUnicodeString', 'RtlPropertySetNameToGuid', 'RtlProtectHeap',
            +            'RtlpUnWaitCriticalSection', 'RtlpWaitForCriticalSection', 'RtlQueryAtomInAtomTable',
            +            'RtlQueryEnvironmentVariable_U', 'RtlQueryInformationAcl',
            +            'RtlQueryProcessBackTraceInformation', 'RtlQueryProcessDebugInformation',
            +            'RtlQueryProcessHeapInformation', 'RtlQueryProcessLockInformation',
            +            'RtlQueryProperties', 'RtlQueryPropertyNames', 'RtlQueryPropertySet',
            +            'RtlQueryRegistryValues', 'RtlQuerySecurityObject', 'RtlQueryTagHeap',
            +            'RtlQueryTimeZoneInformation', 'RtlRaiseException', 'RtlRaiseStatus', 'RtlRandom',
            +            'RtlReAllocateHeap', 'RtlRealPredecessor', 'RtlRealSuccessor', 'RtlReleasePebLock',
            +            'RtlReleaseResource', 'RtlRemoteCall', 'RtlResetRtlTranslations',
            +            'RtlRunDecodeUnicodeString', 'RtlRunEncodeUnicodeString', 'RtlSecondsSince1970ToTime',
            +            'RtlSecondsSince1980ToTime', 'RtlSelfRelativeToAbsoluteSD', 'RtlSetAllBits',
            +            'RtlSetAttributesSecurityDescriptor', 'RtlSetBits', 'RtlSetCriticalSectionSpinCount',
            +            'RtlSetCurrentDirectory_U', 'RtlSetCurrentEnvironment', 'RtlSetDaclSecurityDescriptor',
            +            'RtlSetEnvironmentVariable', 'RtlSetGroupSecurityDescriptor', 'RtlSetInformationAcl',
            +            'RtlSetOwnerSecurityDescriptor', 'RtlSetProperties', 'RtlSetPropertyNames',
            +            'RtlSetPropertySetClassId', 'RtlSetSaclSecurityDescriptor', 'RtlSetSecurityObject',
            +            'RtlSetTimeZoneInformation', 'RtlSetUnicodeCallouts', 'RtlSetUserFlagsHeap',
            +            'RtlSetUserValueHeap', 'RtlSizeHeap', 'RtlSplay', 'RtlStartRXact',
            +            'RtlSubAuthorityCountSid', 'RtlSubAuthoritySid', 'RtlSubtreePredecessor',
            +            'RtlSubtreeSuccessor', 'RtlSystemTimeToLocalTime', 'RtlTimeFieldsToTime',
            +            'RtlTimeToElapsedTimeFields', 'RtlTimeToSecondsSince1970', 'RtlTimeToSecondsSince1980',
            +            'RtlTimeToTimeFields', 'RtlTryEnterCriticalSection', 'RtlUnicodeStringToAnsiSize',
            +            'RtlUnicodeStringToAnsiString', 'RtlUnicodeStringToCountedOemString',
            +            'RtlUnicodeStringToInteger', 'RtlUnicodeStringToOemSize',
            +            'RtlUnicodeStringToOemString', 'RtlUnicodeToCustomCPN', 'RtlUnicodeToMultiByteN',
            +            'RtlUnicodeToMultiByteSize', 'RtlUnicodeToOemN', 'RtlUniform', 'RtlUnlockHeap',
            +            'RtlUnwind', 'RtlUpcaseUnicodeChar', 'RtlUpcaseUnicodeString',
            +            'RtlUpcaseUnicodeStringToAnsiString', 'RtlUpcaseUnicodeStringToCountedOemString',
            +            'RtlUpcaseUnicodeStringToOemString', 'RtlUpcaseUnicodeToCustomCPN',
            +            'RtlUpcaseUnicodeToMultiByteN', 'RtlUpcaseUnicodeToOemN', 'RtlUpperChar',
            +            'RtlUpperString', 'RtlUsageHeap', 'RtlValidAcl', 'RtlValidateHeap',
            +            'RtlValidateProcessHeaps', 'RtlValidSecurityDescriptor', 'RtlValidSid', 'RtlWalkHeap',
            +            'RtlWriteRegistryValue', 'RtlxAnsiStringToUnicodeSize', 'RtlxOemStringToUnicodeSize',
            +            'RtlxUnicodeStringToAnsiSize', 'RtlxUnicodeStringToOemSize', 'RtlZeroHeap',
            +            'RtlZeroMemory',
            +
            +            'NtCancelTimer', 'ZwCancelTimer', 'NtCreateTimer', 'ZwCreateTimer', 'NtGetTickCount',
            +            'ZwGetTickCount', 'NtOpenTimer', 'ZwOpenTimer', 'NtQueryPerformanceCounter',
            +            'ZwQueryPerformanceCounter', 'NtQuerySystemTime', 'ZwQuerySystemTime', 'NtQueryTimer',
            +            'ZwQueryTimer', 'NtQueryTimerResolution', 'ZwQueryTimerResolution', 'NtSetSystemTime',
            +            'ZwSetSystemTime', 'NtSetTimer', 'ZwSetTimer', 'NtSetTimerResolution',
            +            'ZwSetTimerResolution',
            +
            +            'NtClearEvent', 'ZwClearEvent', 'NtCreateEvent', 'ZwCreateEvent', 'NtCreateEventPair',
            +            'ZwCreateEventPair', 'NtCreateMutant', 'ZwCreateMutant', 'NtCreateSemaphore',
            +            'ZwCreateSemaphore', 'NtOpenEvent', 'ZwOpenEvent', 'NtOpenEventPair',
            +            'ZwOpenEventPair', 'NtOpenMutant', 'ZwOpenMutant', 'NtOpenSemaphore',
            +            'ZwOpenSemaphore', 'NtPulseEvent', 'ZwPulseEvent', 'NtQueryEvent', 'ZwQueryEvent',
            +            'NtQueryMutant', 'ZwQueryMutant', 'NtQuerySemaphore', 'ZwQuerySemaphore',
            +            'NtReleaseMutant', 'ZwReleaseMutant', 'NtReleaseProcessMutant',
            +            'ZwReleaseProcessMutant', 'NtReleaseSemaphore', 'ZwReleaseSemaphore',
            +            'NtReleaseThreadMutant', 'ZwReleaseThreadMutant', 'NtResetEvent', 'ZwResetEvent',
            +            'NtSetEvent', 'ZwSetEvent', 'NtSetHighEventPair', 'ZwSetHighEventPair',
            +            'NtSetHighWaitLowEventPair', 'ZwSetHighWaitLowEventPair', 'NtSetLowEventPair',
            +            'ZwSetLowEventPair', 'NtSetLowWaitHighEventPair', 'ZwSetLowWaitHighEventPair',
            +            'NtSignalAndWaitForSingleObject', 'ZwSignalAndWaitForSingleObject',
            +            'NtWaitForMultipleObjects', 'ZwWaitForMultipleObjects', 'NtWaitForSingleObject',
            +            'ZwWaitForSingleObject', 'NtWaitHighEventPair', 'ZwWaitHighEventPair',
            +            'NtWaitLowEventPair', 'ZwWaitLowEventPair',
            +
            +            'NtClose', 'ZwClose', 'NtCreateDirectoryObject', 'ZwCreateDirectoryObject',
            +            'NtCreateSymbolicLinkObject', 'ZwCreateSymbolicLinkObject',
            +            'NtDuplicateObject', 'ZwDuplicateObject', 'NtMakeTemporaryObject',
            +            'ZwMakeTemporaryObject', 'NtOpenDirectoryObject', 'ZwOpenDirectoryObject',
            +            'NtOpenSymbolicLinkObject', 'ZwOpenSymbolicLinkObject', 'NtQueryDirectoryObject',
            +            'ZwQueryDirectoryObject', 'NtQueryObject', 'ZwQueryObject',
            +            'NtQuerySymbolicLinkObject', 'ZwQuerySymbolicLinkObject', 'NtSetInformationObject',
            +            'ZwSetInformationObject',
            +
            +            'NtContinue', 'ZwContinue', 'NtRaiseException', 'ZwRaiseException',
            +            'NtRaiseHardError', 'ZwRaiseHardError', 'NtSetDefaultHardErrorPort',
            +            'ZwSetDefaultHardErrorPort',
            +
            +            'NtCreateChannel', 'ZwCreateChannel', 'NtListenChannel', 'ZwListenChannel',
            +            'NtOpenChannel', 'ZwOpenChannel', 'NtReplyWaitSendChannel', 'ZwReplyWaitSendChannel',
            +            'NtSendWaitReplyChannel', 'ZwSendWaitReplyChannel', 'NtSetContextChannel',
            +            'ZwSetContextChannel',
            +
            +            'NtCreateKey', 'ZwCreateKey', 'NtDeleteKey', 'ZwDeleteKey', 'NtDeleteValueKey',
            +            'ZwDeleteValueKey', 'NtEnumerateKey', 'ZwEnumerateKey', 'NtEnumerateValueKey',
            +            'ZwEnumerateValueKey', 'NtFlushKey', 'ZwFlushKey', 'NtInitializeRegistry',
            +            'ZwInitializeRegistry', 'NtLoadKey', 'ZwLoadKey', 'NtLoadKey2', 'ZwLoadKey2',
            +            'NtNotifyChangeKey', 'ZwNotifyChangeKey', 'NtOpenKey', 'ZwOpenKey', 'NtQueryKey',
            +            'ZwQueryKey', 'NtQueryMultipleValueKey', 'ZwQueryMultipleValueKey',
            +            'NtQueryMultiplValueKey', 'ZwQueryMultiplValueKey', 'NtQueryValueKey',
            +            'ZwQueryValueKey', 'NtReplaceKey', 'ZwReplaceKey', 'NtRestoreKey', 'ZwRestoreKey',
            +            'NtSaveKey', 'ZwSaveKey', 'NtSetInformationKey', 'ZwSetInformationKey',
            +            'NtSetValueKey', 'ZwSetValueKey', 'NtUnloadKey', 'ZwUnloadKey',
            +
            +            'NtCreateMailslotFile', 'ZwCreateMailslotFile', 'NtCreateNamedPipeFile',
            +            'ZwCreateNamedPipeFile', 'NtCreatePagingFile', 'ZwCreatePagingFile',
            +
            +            'NtCreateProfile', 'ZwCreateProfile', 'NtQueryIntervalProfile',
            +            'ZwQueryIntervalProfile', 'NtRegisterThreadTerminatePort',
            +            'ZwRegisterThreadTerminatePort', 'NtSetIntervalProfile', 'ZwSetIntervalProfile',
            +            'NtStartProfile', 'ZwStartProfile', 'NtStopProfile', 'ZwStopProfile',
            +            'NtSystemDebugControl', 'ZwSystemDebugControl',
            +
            +            'NtEnumerateBus', 'ZwEnumerateBus', 'NtFlushInstructionCache',
            +            'ZwFlushInstructionCache', 'NtFlushWriteBuffer', 'ZwFlushWriteBuffer',
            +            'NtSetLdtEntries', 'ZwSetLdtEntries',
            +
            +            'NtGetPlugPlayEvent', 'ZwGetPlugPlayEvent', 'NtPlugPlayControl', 'ZwPlugPlayControl',
            +
            +            'NtInitiatePowerAction', 'ZwInitiatePowerAction', 'NtPowerInformation',
            +            'ZwPowerInformation', 'NtRequestWakeupLatency', 'ZwRequestWakeupLatency',
            +            'NtSetSystemPowerState', 'ZwSetSystemPowerState', 'NtSetThreadExecutionState',
            +            'ZwSetThreadExecutionState',
            +
            +            'NtLoadDriver', 'ZwLoadDriver', 'NtRegisterNewDevice', 'ZwRegisterNewDevice',
            +            'NtUnloadDriver', 'ZwUnloadDriver',
            +
            +            'NtQueryDefaultLocale', 'ZwQueryDefaultLocale', 'NtQueryDefaultUILanguage',
            +            'ZwQueryDefaultUILanguage', 'NtQuerySystemEnvironmentValue',
            +            'ZwQuerySystemEnvironmentValue', 'NtSetDefaultLocale', 'ZwSetDefaultLocale',
            +            'NtSetDefaultUILanguage', 'ZwSetDefaultUILanguage', 'NtSetSystemEnvironmentValue',
            +            'ZwSetSystemEnvironmentValue',
            +
            +            'DbgBreakPoint', 'DbgPrint', 'DbgPrompt', 'DbgSsHandleKmApiMsg', 'DbgSsInitialize',
            +            'DbgUiConnectToDbg', 'DbgUiContinue', 'DbgUiWaitStateChange', 'DbgUserBreakPoint',
            +            'KiRaiseUserExceptionDispatcher', 'KiUserApcDispatcher', 'KiUserCallbackDispatcher',
            +            'KiUserExceptionDispatcher', 'NlsAnsiCodePage', 'NlsMbCodePageTag',
            +            'NlsMbOemCodePageTag', 'NtAllocateLocallyUniqueId', 'ZwAllocateLocallyUniqueId',
            +            'NtAllocateUuids', 'ZwAllocateUuids', 'NtCallbackReturn', 'ZwCallbackReturn',
            +            'NtDisplayString', 'ZwDisplayString', 'NtQueryOleDirectoryFile',
            +            'ZwQueryOleDirectoryFile', 'NtQuerySection', 'ZwQuerySection',
            +            'NtQuerySystemInformation', 'ZwQuerySystemInformation', 'NtSetSystemInformation',
            +            'ZwSetSystemInformation', 'NtShutdownSystem', 'ZwShutdownSystem', 'NtVdmControl',
            +            'ZwVdmControl', 'NtW32Call', 'ZwW32Call', 'PfxFindPrefix', 'PfxInitialize',
            +            'PfxInsertPrefix', 'PfxRemovePrefix', 'PropertyLengthAsVariant', 'RestoreEm87Context',
            +            'SaveEm87Context'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        0 => array('(', ')', '{', '}', '[', ']'),
            +        1 => array('<', '>','='),
            +        2 => array('+', '-', '*', '/', '%'),
            +        3 => array('!', '^', '&', '|'),
            +        4 => array('?', ':', ';')
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        5 => true,
            +        6 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0000ff;',
            +            2 => 'color: #0000ff;',
            +            3 => 'color: #0000dd;',
            +            4 => 'color: #0000ff;',
            +            5 => 'color: #4000dd;',
            +            6 => 'color: #4000dd;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666;',
            +            2 => 'color: #339900;',
            +            3 => 'color: #FF0000;',
            +            4 => 'color: #FF0000;',
            +            'MULTI' => 'color: #ff0000; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;',
            +            1 => 'color: #000099; font-weight: bold;',
            +            2 => 'color: #660099; font-weight: bold;',
            +            3 => 'color: #660099; font-weight: bold;',
            +            4 => 'color: #660099; font-weight: bold;',
            +            5 => 'color: #006699; font-weight: bold;',
            +            'HARD' => '',
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #008000;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #FF0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #0000dd;',
            +            GESHI_NUMBER_BIN_PREFIX_0B => 'color: #208080;',
            +            GESHI_NUMBER_OCT_PREFIX => 'color: #208080;',
            +            GESHI_NUMBER_HEX_PREFIX => 'color: #208080;',
            +            GESHI_NUMBER_FLT_SCI_SHORT => 'color:#800080;',
            +            GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;',
            +            GESHI_NUMBER_FLT_NONSCI_F => 'color:#800080;',
            +            GESHI_NUMBER_FLT_NONSCI => 'color:#800080;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #007788;',
            +            2 => 'color: #007788;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #008000;',
            +            1 => 'color: #000080;',
            +            2 => 'color: #000040;',
            +            3 => 'color: #000040;',
            +            4 => 'color: #008080;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => 'http://www.google.com/search?q={FNAMEL}+msdn.microsoft.com',
            +        6 => 'http://www.google.com/search?q={FNAMEL}+msdn.microsoft.com'
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.',
            +        2 => '::'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4,
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            'DISALLOWED_BEFORE' => "(? "(?![a-zA-Z0-9_\|%\\-])"
            +        )
            +    )
            +);
            diff --git a/vendor/easybook/geshi/geshi/cpp.php b/vendor/easybook/geshi/geshi/cpp.php
            new file mode 100644
            index 0000000000..d9290dbdd0
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/cpp.php
            @@ -0,0 +1,245 @@
            + 'C++',
            +    'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(
            +        //Multiline-continued single-line comments
            +        1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m',
            +        //Multiline-continued preprocessor define
            +        2 => '/#(?:\\\\\\\\|\\\\\\n|.)*$/m',
            +        //C++ 11 string literal extensions
            +        3 => '/(?:L|u8?|U)(?=")/',
            +        //C++ 11 string literal extensions (raw)
            +        4 => '/R"([^()\s\\\\]*)\((?:(?!\)\\1").)*\)\\1"/ms'
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'ESCAPE_REGEXP' => array(
            +        //Simple Single Char Escapes
            +        1 => "#\\\\[abfnrtv\\\'\"?\n]#",
            +        //Hexadecimal Char Specs
            +        2 => "#\\\\x[\da-fA-F]{2}#",
            +        //Hexadecimal Char Specs
            +        3 => "#\\\\u[\da-fA-F]{4}#",
            +        //Hexadecimal Char Specs
            +        4 => "#\\\\U[\da-fA-F]{8}#",
            +        //Octal Char Specs
            +        5 => "#\\\\[0-7]{1,3}#"
            +        ),
            +    'NUMBERS' =>
            +        GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B |
            +        GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI |
            +        GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO,
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'break', 'case', 'continue', 'default', 'do', 'else', 'for', 'goto', 'if', 'return',
            +            'switch', 'throw', 'while'
            +            ),
            +        2 => array(
            +            'NULL', 'false', 'true', 'enum', 'errno', 'EDOM',
            +            'ERANGE', 'FLT_RADIX', 'FLT_ROUNDS', 'FLT_DIG', 'DBL_DIG', 'LDBL_DIG',
            +            'FLT_EPSILON', 'DBL_EPSILON', 'LDBL_EPSILON', 'FLT_MANT_DIG', 'DBL_MANT_DIG',
            +            'LDBL_MANT_DIG', 'FLT_MAX', 'DBL_MAX', 'LDBL_MAX', 'FLT_MAX_EXP', 'DBL_MAX_EXP',
            +            'LDBL_MAX_EXP', 'FLT_MIN', 'DBL_MIN', 'LDBL_MIN', 'FLT_MIN_EXP', 'DBL_MIN_EXP',
            +            'LDBL_MIN_EXP', 'CHAR_BIT', 'CHAR_MAX', 'CHAR_MIN', 'SCHAR_MAX', 'SCHAR_MIN',
            +            'UCHAR_MAX', 'SHRT_MAX', 'SHRT_MIN', 'USHRT_MAX', 'INT_MAX', 'INT_MIN',
            +            'UINT_MAX', 'LONG_MAX', 'LONG_MIN', 'ULONG_MAX', 'HUGE_VAL', 'SIGABRT',
            +            'SIGFPE', 'SIGILL', 'SIGINT', 'SIGSEGV', 'SIGTERM', 'SIG_DFL', 'SIG_ERR',
            +            'SIG_IGN', 'BUFSIZ', 'EOF', 'FILENAME_MAX', 'FOPEN_MAX', 'L_tmpnam',
            +            'SEEK_CUR', 'SEEK_END', 'SEEK_SET', 'TMP_MAX', 'stdin', 'stdout', 'stderr',
            +            'EXIT_FAILURE', 'EXIT_SUCCESS', 'RAND_MAX', 'CLOCKS_PER_SEC',
            +            'virtual', 'public', 'private', 'protected', 'template', 'using', 'namespace',
            +            'try', 'catch', 'inline', 'dynamic_cast', 'const_cast', 'reinterpret_cast',
            +            'static_cast', 'explicit', 'friend', 'typename', 'typeid', 'class'
            +            ),
            +        3 => array(
            +            'cin', 'cerr', 'clog', 'cout', 'delete', 'new', 'this',
            +            'printf', 'fprintf', 'snprintf', 'sprintf', 'assert',
            +            'isalnum', 'isalpha', 'isdigit', 'iscntrl', 'isgraph', 'islower', 'isprint',
            +            'ispunct', 'isspace', 'isupper', 'isxdigit', 'tolower', 'toupper',
            +            'exp', 'log', 'log10', 'pow', 'sqrt', 'ceil', 'floor', 'fabs', 'ldexp',
            +            'frexp', 'modf', 'fmod', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'atan2',
            +            'sinh', 'cosh', 'tanh', 'setjmp', 'longjmp',
            +            'va_start', 'va_arg', 'va_end', 'offsetof', 'sizeof', 'fopen', 'freopen',
            +            'fflush', 'fclose', 'remove', 'rename', 'tmpfile', 'tmpname', 'setvbuf',
            +            'setbuf', 'vfprintf', 'vprintf', 'vsprintf', 'fscanf', 'scanf', 'sscanf',
            +            'fgetc', 'fgets', 'fputc', 'fputs', 'getc', 'getchar', 'gets', 'putc',
            +            'putchar', 'puts', 'ungetc', 'fread', 'fwrite', 'fseek', 'ftell', 'rewind',
            +            'fgetpos', 'fsetpos', 'clearerr', 'feof', 'ferror', 'perror', 'abs', 'labs',
            +            'div', 'ldiv', 'atof', 'atoi', 'atol', 'strtod', 'strtol', 'strtoul', 'calloc',
            +            'malloc', 'realloc', 'free', 'abort', 'exit', 'atexit', 'system', 'getenv',
            +            'bsearch', 'qsort', 'rand', 'srand', 'strcpy', 'strncpy', 'strcat', 'strncat',
            +            'strcmp', 'strncmp', 'strcoll', 'strchr', 'strrchr', 'strspn', 'strcspn',
            +            'strpbrk', 'strstr', 'strlen', 'strerror', 'strtok', 'strxfrm', 'memcpy',
            +            'memmove', 'memcmp', 'memchr', 'memset', 'clock', 'time', 'difftime', 'mktime',
            +            'asctime', 'ctime', 'gmtime', 'localtime', 'strftime'
            +            ),
            +        4 => array(
            +            'auto', 'bool', 'char', 'const', 'double', 'float', 'int', 'long', 'longint',
            +            'register', 'short', 'shortint', 'signed', 'static', 'struct',
            +            'typedef', 'union', 'unsigned', 'void', 'volatile', 'extern', 'jmp_buf',
            +            'signal', 'raise', 'va_list', 'ptrdiff_t', 'size_t', 'FILE', 'fpos_t',
            +            'div_t', 'ldiv_t', 'clock_t', 'time_t', 'tm', 'wchar_t',
            +
            +            'int8', 'int16', 'int32', 'int64',
            +            'uint8', 'uint16', 'uint32', 'uint64',
            +
            +            'int_fast8_t', 'int_fast16_t', 'int_fast32_t', 'int_fast64_t',
            +            'uint_fast8_t', 'uint_fast16_t', 'uint_fast32_t', 'uint_fast64_t',
            +
            +            'int_least8_t', 'int_least16_t', 'int_least32_t', 'int_least64_t',
            +            'uint_least8_t', 'uint_least16_t', 'uint_least32_t', 'uint_least64_t',
            +
            +            'int8_t', 'int16_t', 'int32_t', 'int64_t',
            +            'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t',
            +
            +            'intmax_t', 'uintmax_t', 'intptr_t', 'uintptr_t'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        0 => array('(', ')', '{', '}', '[', ']'),
            +        1 => array('<', '>','='),
            +        2 => array('+', '-', '*', '/', '%'),
            +        3 => array('!', '^', '&', '|'),
            +        4 => array('?', ':', ';')
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0000ff;',
            +            2 => 'color: #0000ff;',
            +            3 => 'color: #0000dd;',
            +            4 => 'color: #0000ff;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666;',
            +            2 => 'color: #339900;',
            +            3 => 'color: #FF0000;',
            +            4 => 'color: #FF0000;',
            +            'MULTI' => 'color: #ff0000; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;',
            +            1 => 'color: #000099; font-weight: bold;',
            +            2 => 'color: #660099; font-weight: bold;',
            +            3 => 'color: #660099; font-weight: bold;',
            +            4 => 'color: #660099; font-weight: bold;',
            +            5 => 'color: #006699; font-weight: bold;',
            +            'HARD' => '',
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #008000;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #FF0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #0000dd;',
            +            GESHI_NUMBER_BIN_PREFIX_0B => 'color: #208080;',
            +            GESHI_NUMBER_OCT_PREFIX => 'color: #208080;',
            +            GESHI_NUMBER_HEX_PREFIX => 'color: #208080;',
            +            GESHI_NUMBER_FLT_SCI_SHORT => 'color:#800080;',
            +            GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;',
            +            GESHI_NUMBER_FLT_NONSCI_F => 'color:#800080;',
            +            GESHI_NUMBER_FLT_NONSCI => 'color:#800080;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #007788;',
            +            2 => 'color: #007788;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #008000;',
            +            1 => 'color: #000080;',
            +            2 => 'color: #000040;',
            +            3 => 'color: #000040;',
            +            4 => 'color: #008080;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.',
            +        2 => '::'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4,
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            'DISALLOWED_BEFORE' => "(? "(?![a-zA-Z0-9_\|%\\-])"
            +        )
            +    )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/csharp.php b/vendor/easybook/geshi/geshi/csharp.php
            new file mode 100644
            index 0000000000..b9294e31ef
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/csharp.php
            @@ -0,0 +1,259 @@
            + 'C#',
            +    'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(
            +        //Using and Namespace directives (basic support)
            +        //Please note that the alias syntax for using is not supported
            +        3 => '/(?:(?<=using[\\n\\s])|(?<=namespace[\\n\\s]))[\\n\\s]*([a-zA-Z0-9_]+\\.)*[a-zA-Z0-9_]+[\n\s]*(?=[;=])/i'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'HARDQUOTE' => array('@"', '"'),
            +    'HARDESCAPE' => array('"'),
            +    'HARDCHAR' => '"',
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'abstract', 'add', 'as', 'async', 'await', 'base',
            +            'break', 'by', 'case', 'catch', 'const', 'continue',
            +            'default', 'do', 'else', 'event', 'explicit', 'extern', 'false',
            +            'finally', 'fixed', 'for', 'foreach', 'from', 'get', 'goto', 'group', 'if',
            +            'implicit', 'in', 'into', 'internal', 'join', 'lock', 'namespace', 'null',
            +            'operator', 'out', 'override', 'params', 'partial', 'private',
            +            'protected', 'public', 'readonly', 'remove', 'ref', 'return', 'sealed',
            +            'select', 'set', 'stackalloc', 'static', 'switch', 'this', 'throw', 'true',
            +            'try', 'unsafe', 'using', 'var', 'value', 'virtual', 'volatile', 'where',
            +            'while', 'yield'
            +            ),
            +        2 => array(
            +            '#elif', '#endif', '#endregion', '#else', '#error', '#define', '#if',
            +            '#line', '#pragma', '#region', '#undef', '#warning'
            +            ),
            +        3 => array(
            +            'checked', 'is', 'new', 'nameof', 'sizeof', 'typeof', 'unchecked'
            +            ),
            +        4 => array(
            +            'bool', 'byte', 'char', 'class', 'decimal', 'delegate', 'double',
            +            'dynamic', 'enum', 'float', 'int', 'interface', 'long', 'object', 'sbyte',
            +            'short', 'string', 'struct', 'uint', 'ulong', 'ushort', 'void'
            +            ),
            +        5 => array(
            +            'Microsoft.Win32',
            +            'System',
            +            'System.CodeDOM',
            +            'System.CodeDOM.Compiler',
            +            'System.Collections',
            +            'System.Collections.Bases',
            +            'System.ComponentModel',
            +            'System.ComponentModel.Design',
            +            'System.ComponentModel.Design.CodeModel',
            +            'System.Configuration',
            +            'System.Configuration.Assemblies',
            +            'System.Configuration.Core',
            +            'System.Configuration.Install',
            +            'System.Configuration.Interceptors',
            +            'System.Configuration.Schema',
            +            'System.Configuration.Web',
            +            'System.Core',
            +            'System.Data',
            +            'System.Data.ADO',
            +            'System.Data.Design',
            +            'System.Data.Internal',
            +            'System.Data.SQL',
            +            'System.Data.SQLTypes',
            +            'System.Data.XML',
            +            'System.Data.XML.DOM',
            +            'System.Data.XML.XPath',
            +            'System.Data.XML.XSLT',
            +            'System.Diagnostics',
            +            'System.Diagnostics.SymbolStore',
            +            'System.DirectoryServices',
            +            'System.Drawing',
            +            'System.Drawing.Design',
            +            'System.Drawing.Drawing2D',
            +            'System.Drawing.Imaging',
            +            'System.Drawing.Printing',
            +            'System.Drawing.Text',
            +            'System.Globalization',
            +            'System.IO',
            +            'System.IO.IsolatedStorage',
            +            'System.Messaging',
            +            'System.Net',
            +            'System.Net.Sockets',
            +            'System.NewXml',
            +            'System.NewXml.XPath',
            +            'System.NewXml.Xsl',
            +            'System.Reflection',
            +            'System.Reflection.Emit',
            +            'System.Resources',
            +            'System.Runtime.InteropServices',
            +            'System.Runtime.InteropServices.Expando',
            +            'System.Runtime.Remoting',
            +            'System.Runtime.Serialization',
            +            'System.Runtime.Serialization.Formatters',
            +            'System.Runtime.Serialization.Formatters.Binary',
            +            'System.Security',
            +            'System.Security.Cryptography',
            +            'System.Security.Cryptography.X509Certificates',
            +            'System.Security.Permissions',
            +            'System.Security.Policy',
            +            'System.Security.Principal',
            +            'System.ServiceProcess',
            +            'System.Text',
            +            'System.Text.RegularExpressions',
            +            'System.Threading',
            +            'System.Timers',
            +            'System.Web',
            +            'System.Web.Caching',
            +            'System.Web.Configuration',
            +            'System.Web.Security',
            +            'System.Web.Services',
            +            'System.Web.Services.Description',
            +            'System.Web.Services.Discovery',
            +            'System.Web.Services.Protocols',
            +            'System.Web.UI',
            +            'System.Web.UI.Design',
            +            'System.Web.UI.Design.WebControls',
            +            'System.Web.UI.Design.WebControls.ListControls',
            +            'System.Web.UI.HtmlControls',
            +            'System.Web.UI.WebControls',
            +            'System.WinForms',
            +            'System.WinForms.ComponentModel',
            +            'System.WinForms.Design',
            +            'System.Xml',
            +            'System.Xml.Serialization',
            +            'System.Xml.Serialization.Code',
            +            'System.Xml.Serialization.Schema'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '+', '-', '*', '?', '=', '/', '%', '&', '>', '<', '^', '!', ':', ';',
            +        '(', ')', '{', '}', '[', ']', '|', '.'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        5 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0600FF; font-weight: bold;',
            +            2 => 'color: #FF8000; font-weight: bold;',
            +            3 => 'color: #008000;',
            +            4 => 'color: #6666cc; font-weight: bold;',
            +            5 => 'color: #000000;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #008080; font-style: italic;',
            +            2 => 'color: #008080;',
            +            3 => 'color: #008080;',
            +            'MULTI' => 'color: #008080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #008080; font-weight: bold;',
            +            'HARD' => 'color: #008080; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #008000;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #666666;',
            +            'HARD' => 'color: #666666;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #FF0000;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #0000FF;',
            +            2 => 'color: #0000FF;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #008000;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => 'http://www.google.com/search?q={FNAMEL}+msdn.microsoft.com',
            +        4 => '',
            +        5 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.',
            +        2 => '::'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4,
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            'DISALLOWED_BEFORE' => "(?|^])",
            +            'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_%\\-])"
            +        )
            +    )
            +);
            +
            +
            diff --git a/vendor/easybook/geshi/geshi/css.php b/vendor/easybook/geshi/geshi/css.php
            new file mode 100644
            index 0000000000..6f923a8eb3
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/css.php
            @@ -0,0 +1,237 @@
            + 'CSS',
            +    'COMMENT_SINGLE' => array(1 => '@'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(
            +        2 => "/(?<=\\()\\s*(?:(?:[a-z0-9]+?:\\/\\/)?[a-z0-9_\\-\\.\\/:]+?)?[a-z]+?\\.[a-z]+?(\\?[^\)]+?)?\\s*?(?=\\))/i"
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"', "'"),
            +    'ESCAPE_CHAR' => '',
            +    'ESCAPE_REGEXP' => array(
            +        //Simple Single Char Escapes
            +        //1 => "#\\\\[nfrtv\$\"\n\\\\]#i",
            +        //Hexadecimal Char Specs
            +        2 => "#\\\\[\da-fA-F]{1,6}\s?#i",
            +        //Unicode Char Specs
            +        //3 => "#\\\\u[\da-fA-F]{1,8}#i",
            +        ),
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'align-items', 'align-self', 'align-content',
            +            'aqua', 'azimuth', 'background-attachment', 'background-color',
            +            'background-image', 'background-position', 'background-repeat',
            +            'background', 'black', 'blue', 'border-bottom-color',
            +            'border-radius', 'border-top-left-radius', 'border-top-right-radius',
            +            'border-bottom-right-radius', 'border-bottom-left-radius',
            +            'border-bottom-style', 'border-bottom-width', 'border-image-source',
            +            'border-image-slice', 'border-image-width', 'border-image-outset',
            +            'border-image-repeat', 'border-image', 'border-left-color',
            +            'border-left-style', 'border-left-width', 'border-right',
            +            'border-right-color', 'border-right-style', 'border-right-width',
            +            'border-top-color', 'border-top-style',
            +            'border-top-width','border-bottom', 'border-collapse',
            +            'border-left', 'border-width', 'border-color', 'border-spacing',
            +            'border-style', 'border-top', 'border', 'box-shadow',
            +            'break-after', 'break-before', 'break-inside', 'column-count',
            +            'column-fill', 'column-gap', 'column-rule', 'column-rule-color',
            +            'column-rule-style', 'column-rule-width', 'columns', 'column-span',
            +            'column-width', 'caption-side', 'clear',
            +            'clip', 'color', 'content', 'counter-increment', 'counter-reset',
            +            'cue-after', 'cue-before', 'cue', 'cursor', 'direction', 'display',
            +            'elevation', 'empty-cells', 'flex-direction', 'flex-grow',
            +            'flex-wrap', 'flex-shrink', 'flex-basis', 'flex-flow', 'flex',
            +
            +            'float', 'font-family', 'font-size',
            +            'font-size-adjust', 'font-stretch', 'font-style', 'font-variant',
            +            'font-weight', 'font', 'justify-content', 'line-height', 'letter-spacing',
            +            'list-style', 'list-style-image', 'list-style-position',
            +            'list-style-type', 'margin-bottom', 'margin-left', 'margin-right',
            +            'margin-top', 'margin', 'marker-offset', 'marks', 'max-height',
            +            'max-width', 'min-height', 'min-width', 'order', 'orphans', 'outline',
            +            'outline-color', 'outline-style', 'outline-width', 'overflow',
            +            'padding-bottom', 'padding-left', 'padding-right', 'padding-top',
            +            'padding', 'page', 'page-break-after', 'page-break-before',
            +            'page-break-inside', 'pause-after', 'pause-before', 'pause',
            +            'pitch', 'pitch-range', 'play-during', 'position', 'quotes',
            +            'richness', 'right', 'size', 'speak-header', 'speak-numeral',
            +            'speak-punctuation', 'speak', 'speech-rate', 'stress',
            +            'table-layout', 'text-align', 'text-decoration', 'text-indent',
            +            'text-shadow', 'text-transform', 'top', 'unicode-bidi',
            +            'vertical-align', 'visibility', 'voice-family', 'volume',
            +            'white-space', 'widows', 'width', 'word-spacing', 'z-index',
            +            'bottom', 'left', 'height'
            +            ),
            +        2 => array(
            +            'above', 'absolute', 'always', 'armenian', 'aural', 'auto',
            +            'avoid', 'baseline', 'behind', 'below', 'bidi-override', 'blink',
            +            'block', 'bold', 'bolder', 'both', 'capitalize', 'center-left',
            +            'center-right', 'center', 'circle', 'cjk-ideographic',
            +            'close-quote', 'collapse', 'column', 'column-reverse', 'condensed', 'continuous', 'crop',
            +            'crosshair', 'cross', 'cursive', 'dashed', 'decimal-leading-zero',
            +            'decimal', 'default', 'digits', 'disc', 'dotted', 'double',
            +            'ease-in', 'ease-out',
            +            'e-resize', 'embed', 'extra-condensed', 'extra-expanded',
            +            'expanded', 'fantasy', 'far-left', 'far-right', 'faster', 'fast',
            +            'fixed', 'flex-end', 'flex-start', 'fuchsia', 'georgian', 'gray', 'green', 'groove',
            +            'hebrew', 'help', 'hidden', 'hide', 'higher', 'high',
            +            'hiragana-iroha', 'hiragana', 'icon', 'inherit', 'inline-table',
            +            'inline', 'inset', 'inside', 'invert', 'italic', 'justify',
            +            'katakana-iroha', 'katakana', 'landscape', 'larger', 'large',
            +            'left-side', 'leftwards', 'level', 'lighter', 'lime',
            +            'line-through', 'list-item', 'loud', 'lower-alpha', 'lower-greek',
            +            'lower-roman', 'lowercase', 'ltr', 'lower', 'low', 'maroon',
            +            'medium', 'message-box', 'middle', 'mix', 'monospace', 'n-resize',
            +            'narrower', 'navy', 'ne-resize', 'no-close-quote',
            +            'no-open-quote', 'no-repeat', 'none', 'normal', 'nowrap',
            +            'nw-resize', 'oblique', 'olive', 'once', 'open-quote', 'outset',
            +            'outside', 'overline', 'pointer', 'portrait', 'purple', 'px',
            +            'red', 'relative', 'repeat-x', 'repeat-y', 'repeat', 'rgb',
            +            'ridge', 'right-side', 'rightwards', 'row', 'row-reverse', 's-resize', 'sans-serif',
            +            'scroll', 'se-resize', 'semi-condensed', 'semi-expanded',
            +            'separate', 'serif', 'show', 'silent', 'silver', 'slow', 'slower',
            +            'small-caps', 'small-caption', 'smaller', 'soft', 'solid',
            +            'space-around', 'space-between',
            +            'spell-out', 'square', 'static', 'status-bar', 'stretch', 'super',
            +            'sw-resize', 'table-caption', 'table-cell', 'table-column',
            +            'table-column-group', 'table-footer-group', 'table-header-group',
            +            'table-row', 'table-row-group', 'teal', 'text', 'text-bottom',
            +            'text-top', 'thick', 'thin', 'transparent', 'ultra-condensed',
            +            'ultra-expanded', 'underline', 'upper-alpha', 'upper-latin',
            +            'upper-roman', 'uppercase', 'url', 'visible', 'w-resize', 'wait',
            +            'white', 'wider', 'wrap', 'wrap-reverse', 'x-fast', 'x-high', 'x-large', 'x-loud',
            +            'x-low', 'x-small', 'x-soft', 'xx-large', 'xx-small', 'yellow',
            +            'yes'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '{', '}', ':', ';',
            +        '>', '+', '*', ',', '^', '='
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000000; font-weight: bold;',
            +            2 => 'color: #993333;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #a1a100;',
            +            2 => 'color: #ff0000; font-style: italic;',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;',
            +            //1 => 'color: #000099; font-weight: bold;',
            +            2 => 'color: #000099; font-weight: bold;'
            +            //3 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #00AA00;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #00AA00;'
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #cc00cc;',
            +            1 => 'color: #6666ff;',
            +            2 => 'color: #3333ff;',
            +            3 => 'color: #933;'
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        //DOM Node ID
            +        0 => '\#[a-zA-Z0-9\-_]+(?:\\\\:[a-zA-Z0-9\-_]+)*',
            +        //CSS classname
            +        1 => '\.(?!\d)[a-zA-Z0-9\-_]+(?:\\\\:[a-zA-Z0-9\-_]+)*\b(?=[\{\.#\s,:].|<\|)',
            +        //CSS Pseudo classes
            +        //note: & is needed for > (i.e. > )
            +        2 => '(? '[+\-]?(\d+|(\d*\.\d+))(em|ex|pt|px|cm|in|%)',
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4,
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            'DISALLOWED_AFTER' => '(?![\-a-zA-Z0-9_\|%\\-&\.])',
            +            'DISALLOWED_BEFORE' => '(? 'Cuesheet',
            +    'COMMENT_SINGLE' => array(1 => ';'),
            +    'COMMENT_MULTI' => array(),
            +    'COMMENT_REGEXP' => array(
            +        //Single-Line Comments using REM command
            +        1 => "/(?<=\bREM\b).*?$/im",
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_UPPER,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'CATALOG','CDTEXTFILE','FILE','FLAGS','INDEX','ISRC','PERFORMER',
            +            'POSTGAP','PREGAP','REM','SONGWRITER','TITLE','TRACK'
            +            ),
            +        2 => array(
            +            'AIFF', 'BINARY', 'MOTOROLA', 'MP3', 'WAVE'
            +            ),
            +        3 => array(
            +            '4CH', 'DCP', 'PRE', 'SCMS'
            +            ),
            +        4 => array(
            +            'AUDIO', 'CDG', 'MODE1/2048', 'MODE1/2336', 'MODE2/2336',
            +            'MODE2/2352', 'CDI/2336', 'CDI/2352'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        ':'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000000; font-weight: bold;',
            +            2 => 'color: #000066; font-weight: bold;',
            +            3 => 'color: #000066; font-weight: bold;',
            +            4 => 'color: #000066; font-weight: bold;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080;',
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #0000ff;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #0000ff;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #006600;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #000066;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099;'
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            1 => 'color: #000099;',
            +            2 => 'color: #009900;',
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => 'http://digitalx.org/cuesheetsyntax.php#{FNAMEL}',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        2 => '\b[A-Za-z0-9]{5}\d{7}\b',
            +        1 => '(?<=[\s:]|^)\d+(?=[\s:]|$)',
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 2,
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            'DISALLOWED_BEFORE' => '(? '(?![\w\.])',
            +            )
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/d.php b/vendor/easybook/geshi/geshi/d.php
            new file mode 100644
            index 0000000000..db5fbf0e71
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/d.php
            @@ -0,0 +1,251 @@
            + 'D',
            +    'COMMENT_SINGLE' => array(2 => '///', 1 => '//'),
            +    'COMMENT_MULTI' => array('/*' => '*/', '/+' => '+/'),
            +    'COMMENT_REGEXP' => array(
            +        // doxygen comments
            +        3 => '#/\*\*(?![\*\/]).*\*/#sU',
            +        // raw strings
            +        4 => '#r"[^"]*"#s',
            +        // Script Style interpreter comment
            +        5 => "/\A#!(?=\\/).*?$/m"
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"', "'"),
            +    'ESCAPE_CHAR' => '',
            +    'ESCAPE_REGEXP' => array(
            +        //Simple Single Char Escapes
            +        1 => "#\\\\[abfnrtv\\'\"?\n\\\\]#i",
            +        //Hexadecimal Char Specs
            +        2 => "#\\\\x[\da-fA-F]{2}#",
            +        //Hexadecimal Char Specs
            +        3 => "#\\\\u[\da-fA-F]{4}#",
            +        //Hexadecimal Char Specs
            +        4 => "#\\\\U[\da-fA-F]{8}#",
            +        //Octal Char Specs
            +        5 => "#\\\\[0-7]{1,3}#",
            +        //Named entity escapes
            +        /*6 => "#\\\\&(?:quot|amp|lt|gt|OElig|oelig|Scaron|scaron|Yuml|circ|tilde|".
            +            "ensp|emsp|thinsp|zwnj|zwj|lrm|rlm|ndash|mdash|lsquo|rsquo|sbquo|".
            +            "ldquo|rdquo|bdquo|dagger|Dagger|permil|lsaquo|rsaquo|euro|nbsp|".
            +            "iexcl|cent|pound|curren|yen|brvbar|sect|uml|copy|ordf|laquo|not|".
            +            "shy|reg|macr|deg|plusmn|sup2|sup3|acute|micro|para|middot|cedil|".
            +            "sup1|ordm|raquo|frac14|frac12|frac34|iquest|Agrave|Aacute|Acirc|".
            +            "Atilde|Auml|Aring|AElig|Ccedil|Egrave|Eacute|Ecirc|Euml|Igrave|".
            +            "Iacute|Icirc|Iuml|ETH|Ntilde|Ograve|Oacute|Ocirc|Otilde|Ouml|".
            +            "times|Oslash|Ugrave|Uacute|Ucirc|Uuml|Yacute|THORN|szlig|agrave|".
            +            "aacute|acirc|atilde|auml|aring|aelig|ccedil|egrave|eacute|ecirc|".
            +            "euml|igrave|iacute|icirc|iuml|eth|ntilde|ograve|oacute|ocirc|".
            +            "otilde|ouml|divide|oslash|ugrave|uacute|ucirc|uuml|yacute|thorn|".
            +            "yuml|fnof|Alpha|Beta|Gamma|Delta|Epsilon|Zeta|Eta|Theta|Iota|".
            +            "Kappa|Lambda|Mu|Nu|Xi|Omicron|Pi|Rho|Sigma|Tau|Upsilon|Phi|Chi|".
            +            "Psi|Omega|alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|".
            +            "kappa|lambda|mu|nu|xi|omicron|pi|rho|sigmaf|sigma|tau|upsilon|".
            +            "phi|chi|psi|omega|thetasym|upsih|piv|bull|hellip|prime|Prime|".
            +            "oline|frasl|weierp|image|real|trade|alefsym|larr|uarr|rarr|darr|".
            +            "harr|crarr|lArr|uArr|rArr|dArr|hArr|forall|part|exist|empty|".
            +            "nabla|isin|notin|ni|prod|sum|minus|lowast|radic|prop|infin|ang|".
            +            "and|or|cap|cup|int|there4|sim|cong|asymp|ne|equiv|le|ge|sub|sup|".
            +            "nsub|sube|supe|oplus|otimes|perp|sdot|lceil|rceil|lfloor|rfloor|".
            +            "lang|rang|loz|spades|clubs|hearts|diams);#",*/
            +        // optimized:
            +        6 => "#\\\\&(?:A(?:Elig|acute|circ|grave|lpha|ring|tilde|uml)|Beta|".
            +            "C(?:cedil|hi)|D(?:agger|elta)|E(?:TH|acute|circ|grave|psilon|ta|uml)|".
            +            "Gamma|I(?:acute|circ|grave|ota|uml)|Kappa|Lambda|Mu|N(?:tilde|u)|".
            +            "O(?:Elig|acute|circ|grave|m(?:ega|icron)|slash|tilde|uml)|".
            +            "P(?:hi|i|rime|si)|Rho|S(?:caron|igma)|T(?:HORN|au|heta)|".
            +            "U(?:acute|circ|grave|psilon|uml)|Xi|Y(?:acute|uml)|Zeta|".
            +            "a(?:acute|c(?:irc|ute)|elig|grave|l(?:efsym|pha)|mp|n[dg]|ring|".
            +            "symp|tilde|uml)|b(?:dquo|eta|rvbar|ull)|c(?:ap|cedil|e(?:dil|nt)|".
            +            "hi|irc|lubs|o(?:ng|py)|rarr|u(?:p|rren))|d(?:Arr|a(?:gger|rr)|".
            +            "e(?:g|lta)|i(?:ams|vide))|e(?:acute|circ|grave|m(?:pty|sp)|nsp|".
            +            "psilon|quiv|t[ah]|u(?:ml|ro)|xist)|f(?:nof|orall|ra(?:c(?:1[24]|34)|sl))|".
            +            "g(?:amma|e|t)|h(?:Arr|arr|e(?:arts|llip))|i(?:acute|circ|excl|grave|mage|".
            +            "n(?:fin|t)|ota|quest|sin|uml)|kappa|l(?:Arr|a(?:mbda|ng|quo|rr)|ceil|".
            +            "dquo|e|floor|o(?:wast|z)|rm|s(?:aquo|quo)|t)|m(?:acr|dash|".
            +            "i(?:cro|ddot|nus)|u)|n(?:abla|bsp|dash|e|i|ot(?:in)?|sub|tilde|u)|".
            +            "o(?:acute|circ|elig|grave|line|m(?:ega|icron)|plus|r(?:d[fm])?|".
            +            "slash|ti(?:lde|mes)|uml)|p(?:ar[at]|er(?:mil|p)|hi|iv?|lusmn|ound|".
            +            "r(?:ime|o[dp])|si)|quot|r(?:Arr|a(?:dic|ng|quo|rr)|ceil|dquo|e(?:al|g)|".
            +            "floor|ho|lm|s(?:aquo|quo))|s(?:bquo|caron|dot|ect|hy|i(?:gmaf?|m)|".
            +            "pades|u(?:be?|m|p[123e]?)|zlig)|t(?:au|h(?:e(?:re4|ta(?:sym)?)|insp|".
            +            "orn)|i(?:lde|mes)|rade)|u(?:Arr|a(?:cute|rr)|circ|grave|ml|".
            +            "psi(?:h|lon)|uml)|weierp|xi|y(?:acute|en|uml)|z(?:eta|w(?:j|nj)));#",
            +        ),
            +    'HARDQUOTE' => array('`', '`'),
            +    'HARDESCAPE' => array(),
            +    'NUMBERS' =>
            +        GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B |
            +        GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI |
            +        GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO,
            +    'KEYWORDS' => array(
            +        1 => array(
            +                'break', 'case', 'continue', 'do', 'else',
            +                'for', 'foreach', 'goto', 'if', 'return',
            +                'switch', 'while', 'foreach_reverse'
            +            ),
            +        2 => array(
            +                'alias', 'asm', 'assert', 'body', 'cast',
            +                'catch', 'default', 'delegate', 'delete',
            +                'extern', 'false', 'finally', 'function',
            +                'import', 'in', 'inout',
            +                'invariant', 'is', 'lazy', 'mixin', 'module', 'new',
            +                'null', 'out', 'pragma', 'ref', 'super', 'this',
            +                'throw', 'true', 'try', 'typeid',
            +                'typeof', 'union', 'with', 'scope'
            +            ),
            +        3 => array(
            +                'ClassInfo', 'Error', 'Exception',
            +                'Interface', 'Object', 'IMonitor',
            +                'OffsetTypeInfo', 'Throwable',
            +                'TypeInfo_Class', 'TypeInfo', '__traits',
            +                '__EOF__', '__FILE__', '__LINE__',
            +            ),
            +        4 => array(
            +                'abstract', 'align', 'auto', 'bit', 'bool',
            +                'byte', 'cdouble', 'cfloat', 'char',
            +                'class', 'const', 'creal', 'dchar', 'dstring', 'debug',
            +                'deprecated', 'double', 'enum', 'export',
            +                'final', 'float', 'idouble', 'ifloat', 'immutable', 'int',
            +                'interface', 'ireal', 'long', 'nothrow', 'override',
            +                'package', 'private', 'protected', 'ptrdiff_t',
            +                'public', 'real', 'short', 'shared', 'size_t',
            +                'static', 'string', 'struct', 'synchronized',
            +                'template', 'ubyte', 'ucent', 'uint',
            +                'ulong', 'unittest', 'ushort', 'version',
            +                'void', 'volatile', 'wchar', 'wstring',
            +                '__gshared', '@disable', '@property', 'pure', 'safe'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '[', ']', '{', '}', '?', '!', ';', ':', ',', '...', '..',
            +        '+', '-', '*', '/', '%', '&', '|', '^', '<', '>', '=', '~',
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;',
            +            2 => 'color: #000000; font-weight: bold;',
            +            3 => 'color: #aaaadd; font-weight: bold;',
            +            4 => 'color: #993333;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;',
            +            2 => 'color: #009933; font-style: italic;',
            +            3 => 'color: #009933; font-style: italic;',
            +            4 => 'color: #ff0000;',
            +            5 => 'color: #0040ff;',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;',
            +            1 => 'color: #000099; font-weight: bold;',
            +            2 => 'color: #660099; font-weight: bold;',
            +            3 => 'color: #660099; font-weight: bold;',
            +            4 => 'color: #660099; font-weight: bold;',
            +            5 => 'color: #006699; font-weight: bold;',
            +            6 => 'color: #666699; font-weight: bold; font-style: italic;',
            +            'HARD' => '',
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;',
            +            'HARD' => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #0000dd;',
            +            GESHI_NUMBER_BIN_PREFIX_0B => 'color: #208080;',
            +            GESHI_NUMBER_OCT_PREFIX => 'color: #208080;',
            +            GESHI_NUMBER_HEX_PREFIX => 'color: #208080;',
            +            GESHI_NUMBER_FLT_SCI_SHORT => 'color:#800080;',
            +            GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;',
            +            GESHI_NUMBER_FLT_NONSCI_F => 'color:#800080;',
            +            GESHI_NUMBER_FLT_NONSCI => 'color:#800080;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #006600;',
            +            2 => 'color: #006600;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.',
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/dart.php b/vendor/easybook/geshi/geshi/dart.php
            new file mode 100644
            index 0000000000..932e13e874
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/dart.php
            @@ -0,0 +1,159 @@
            + 'Dart',
            +
            +    'COMMENT_SINGLE' => array('//'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(),
            +
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'ESCAPE_REGEXP' => array(
            +        //Simple Single Char Escapes
            +        1 => "#\\\\[\\\\nrfbtv\'\"?\n]#i",
            +        //Hexadecimal Char Specs
            +        2 => "#\\\\x[\da-fA-F]{2}#",
            +        //Hexadecimal Char Specs
            +        3 => "#\\\\u[\da-fA-F]{4}#",
            +        4 => "#\\\\u\\{[\da-fA-F]*\\}#"
            +        ),
            +    'NUMBERS' =>
            +        GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE |
            +        GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI |
            +        GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO,
            +
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'abstract', 'as', 'assert', 'break', 'case', 'catch', 'class',
            +            'const', 'continue', 'default', 'do', 'dynamic', 'else', 'export',
            +            'extends', 'external', 'factory', 'false', 'final', 'finally',
            +            'for', 'get', 'if', 'implements', 'import', 'in', 'is', 'library',
            +            'new', 'null', 'operator', 'part', 'return', 'set', 'static',
            +            'super', 'switch', 'this', 'throw', 'true', 'try', 'typedef', 'var',
            +            'while', 'with'
            +            ),
            +        2 => array(
            +            'double', 'bool', 'int', 'num', 'void'
            +            ),
            +        ),
            +
            +    'SYMBOLS' => array(
            +        0 => array('(', ')', '{', '}', '[', ']'),
            +        1 => array('+', '-', '*', '/', '%', '~'),
            +        2 => array('&', '|', '^'),
            +        3 => array('=', '!', '<', '>'),
            +        4 => array('?', ':'),
            +        5 => array('..'),
            +        6 => array(';', ',')
            +        ),
            +
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        ),
            +
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'font-weight: bold;',
            +            2 => 'color: #445588; font-weight: bold;'
            +            ),
            +        'COMMENTS' => array(
            +            0 => 'color: #999988; font-style: italic;',
            +            'MULTI' => 'color: #999988; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;',
            +            1 => 'color: #000099; font-weight: bold;',
            +            2 => 'color: #660099; font-weight: bold;',
            +            3 => 'color: #660099; font-weight: bold;',
            +            4 => 'color: #660099; font-weight: bold;',
            +            5 => 'color: #006699; font-weight: bold;',
            +            'HARD' => ''
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #d14;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #009999;',
            +            GESHI_NUMBER_HEX_PREFIX => 'color: #208080;',
            +            GESHI_NUMBER_FLT_SCI_SHORT => 'color:#800080;',
            +            GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;',
            +            GESHI_NUMBER_FLT_NONSCI_F => 'color:#800080;',
            +            GESHI_NUMBER_FLT_NONSCI => 'color:#800080;'
            +            ),
            +        'BRACKETS' => array(''),
            +        'METHODS' => array(
            +            1 => 'color: #006633;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'font-weight: bold;',
            +            1 => 'font-weight: bold;',
            +            2 => 'font-weight: bold;',
            +            3 => 'font-weight: bold;',
            +            4 => 'font-weight: bold;',
            +            5 => 'font-weight: bold;',
            +            6 => 'font-weight: bold;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4
            +);
            diff --git a/vendor/easybook/geshi/geshi/dcl.php b/vendor/easybook/geshi/geshi/dcl.php
            new file mode 100644
            index 0000000000..b041e044b4
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/dcl.php
            @@ -0,0 +1,191 @@
            + 'DCL',
            +    'COMMENT_SINGLE' => array('$!', '!'),
            +    'COMMENT_MULTI' => array(),
            +    'COMMENT_REGEXP' => array(
            +        2 => '/(?<=\$)\s*sql\s+.*?(?:quit|exit);?\s*?$/sim' // do not highlight inline sql
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'HARDESCAPE' => array(),
            +    'ESCAPE_CHAR' => '',
            +    'ESCAPE_REGEXP' => array(
            +        1 => "/''[a-zA-Z\\-_]+'/"
            +        ),
            +    'KEYWORDS' => array(
            +        1 => array( // commands
            +            'ACCOUNTING', 'ALLOCATE', 'ANALYZE', 'APPEND', 'ASSIGN', 'ATTACH', 'BACKUP',
            +            'CALL', 'CANCEL', 'CHECKSUM', 'CLOSE', 'CONNECT', 'CONTINUE', 'CONVERT',
            +            'COPY', 'CREATE', 'DEALLOCATE', 'DEASSIGN', 'DEBUG', 'DECK',
            +            'DECRYPT', 'DEFINE', 'DELETE', 'DEPOSIT', 'DIFFERENCES', 'DIRECTORY',
            +            'DISABLE',  'AUTOSTART', 'DISCONNECT', 'DISMOUNT', 'DUMP', 'EDIT', 'ENABLE',
            +            'ENCRYPT', 'ENDSUBROUTINE', 'EOD', 'EOJ', 'EXAMINE', 'EXCHANGE',
            +            'EXIT', 'FONT', 'GOSUB', 'GOTO', 'HELP', 'IF', 'THEN', 'ELSE', 'ENDIF', 'INITIALIZE', 'INQUIRE',
            +            'INSTALL', 'JAVA', 'JOB', 'LIBRARY', 'LICENSE', 'LINK', 'LOGIN', 'LOGOUT',
            +            'MACRO', 'MAIL', 'MERGE', 'MESSAGE', 'MONITOR', 'MOUNT', 'NCS', 'ON', 'OPEN',
            +            'PASSWORD', 'PATCH', 'PHONE', 'PIPE', 'PPPD', 'PRINT', 'PRODUCT', 'PURGE',
            +            'READ', 'RECALL', 'RENAME', 'REPLY', 'REQUEST', 'RETURN', 'RMU', 'RUN', 'RUNOFF',
            +            'SEARCH', 'SET', 'SET AUDIT', 'SET BOOTBLOCK', 'SET BROADCAST',
            +            'SET CACHE', 'SET CARD_READER', 'SET CLUSTER', 'SET COMMAND', 'SET CONTROL',
            +            'SET CPU', 'SET DAY', 'SET DEFAULT', 'SET DEVICE', 'SET DIRECTORY',
            +            'SET DISPLAY', 'SET ENTRY', 'SET FILE', 'SET HOST', 'SET IMAGE', 'SET KEY',
            +            'SET LOGINS', 'SET MAGTAPE', 'SET MESSAGE', 'SET NETWORK', 'SET ON', 'SET OUTPUT_RATE',
            +            'SET PASSWORD', 'SET PREFERRED_PATH', 'SET PREFIX', 'SET PRINTER', 'SET PROCESS',
            +            'SET PROMPT', 'SET PROTECTION', 'SET QUEUE', 'SET RESTART_VALUE',
            +            'SET RIGHTS_LIST', 'SET RMS_DEFAULT', 'SET ROOT', 'SET SECURITY',
            +            'SET SERVER ACME_SERVER', 'SET SERVER REGISTRY_SERVER', 'SET SERVER SECURITY_SERVER',
            +            'SET SHADOW', 'SET SYMBOL', 'SET TERMINAL', 'SET TIME', 'SET VERIFY',
            +            'SET VOLUME', 'SET WORKING_SET', 'SHOW', 'SHOW AUDIT',
            +            'SHOW BROADCAST', 'SHOW CLUSTER', 'SHOW CPU', 'SHOW DEFAULT', 'SHOW DEVICES',
            +            'SHOW DISPLAY', 'SHOW ENTRY', 'SHOW ERROR', 'SHOW FASTPATH', 'SHOW IMAGE',
            +            'SHOW INTRUSION', 'SHOW KEY', 'SHOW LICENSE', 'SHOW LOGICAL', 'SHOW MEMORY',
            +            'SHOW NETWORK', 'SHOW PRINTER', 'SHOW PROCESS', 'SHOW PROTECTION', 'SHOW QUEUE',
            +            'SHOW QUOTA', 'SHOW RMS_DEFAULT', 'SHOW ROOT', 'SHOW SECURITY',
            +            'SHOW SERVER ACME_SERVER', 'SHOW SERVER REGISTRY_SERVER', 'SHOW SHADOW',
            +            'SHOW STATUS', 'SHOW SYMBOL', 'SHOW SYSTEM', 'SHOW TERMINAL', 'SHOW TIME',
            +            'SHOW TRANSLATION', 'SHOW USERS', 'SHOW WORKING_SET', 'SHOW ZONE', 'SORT',
            +            'SPAWN', 'START', 'STOP', 'SUBMIT', 'SUBROUTINE', 'SYNCHRONIZE', 'TYPE',
            +            'UNLOCK', 'VIEW', 'WAIT', 'WRITE', 'XAUTH'
            +            ),
            +        2 => array( // lexical functions
            +            'F$CONTEXT', 'F$CSID', 'F$CUNITS', 'F$CVSI', 'F$CVTIME', 'F$CVUI',
            +            'F$DELTA_TIME', 'F$DEVICE', 'F$DIRECTORY', 'F$EDIT', 'F$ELEMENT',
            +            'F$ENVIRONMENT', 'F$EXTRACT', 'F$FAO', 'F$FID_TO_NAME', 'F$FILE_ATTRIBUTES',
            +            'F$GETDVI', 'F$GETENV', 'F$GETJPI', 'F$GETQUI', 'F$GETSYI', 'F$IDENTIFIER',
            +            'F$INTEGER', 'F$LENGTH', 'F$LICENSE', 'F$LOCATE', 'F$MATCH_WILD', 'F$MESSAGE',
            +            'F$MODE', 'F$MULTIPATH', 'F$PARSE', 'F$PID', 'F$PRIVILEGE', 'F$PROCESS',
            +            'F$SEARCH', 'F$SETPRV', 'F$STRING', 'F$TIME', 'F$TRNLNM', 'F$TYPE', 'F$UNIQUE',
            +            'F$USER', 'F$VERIFY'
            +            ),
            +        3 => array( // special variables etc
            +            'sql$database', 'P1', 'P2', 'P3', 'P4', 'P5', 'P6', 'P7', 'P8', 'P9',
            +            '$status', '$severity', 'sys$login', 'sys$system',
            +            'sys$input', 'sys$output', 'sys$pipe'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '[', ']', '@', '&', '|', '<', '>', '-',
            +        '.eqs.', '.eq.', '.lt.', '.lts.', '.gt.', '.gts.', '.ne.', '.nes.',
            +        '.le.', '.ge.', '.ges.', '.les.',
            +        '.EQS.', '.EQ.', '.LT.', '.LTS.', '.GT.', '.GTS.', '.NE.', '.NES.',
            +        '.LE.', '.GE.', '.GES.', '.LES.',
            +        '.and.', '.or.', '.not.',
            +        '.AND.', '.OR.', '.NOT.',
            +        '==', ':==', '=', ':='
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000099; font-weight: bold;',
            +            2 => 'color: #0066FF;',
            +            3 => 'color: #993300;'
            +            ),
            +        'COMMENTS' => array(
            +            0 => 'color: #666666; font-style: italic;',
            +            1 => 'color: #666666; font-style: italic;',
            +            2 => 'color: #9999FF; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #006666;',
            +            1 => 'color: #0099FF;',
            +            2 => 'color: red;',
            +            3 => 'color: #007800;',
            +            4 => 'color: #007800;',
            +            5 => 'color: #780078;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #7a0874; font-weight: bold;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #000000; font-weight: bold;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #0099FF;',                     // variables
            +            1 => 'color: #0000FF;',                     // qualifiers
            +            2 => 'color: #FF6600; font-weight: bold;'   // labels
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        // variables
            +        0 => "'[a-zA-Z_\\-$]+'",
            +        // qualifiers and parameters
            +        1 => "(?:\/[a-zA-Z_\/]+)[\s=]",
            +        // labels
            +        2 => '(?<=\$)\s*[a-zA-Z\-_]+:'
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4,
            +    'PARSER_CONTROL' => array(
            +        'COMMENTS' => array(
            +        ),
            +        'KEYWORDS' => array(
            +        )
            +    )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/dcpu16.php b/vendor/easybook/geshi/geshi/dcpu16.php
            new file mode 100644
            index 0000000000..2b55db023a
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/dcpu16.php
            @@ -0,0 +1,130 @@
            + 'DCPU-16 Assembly',
            +    'COMMENT_SINGLE' => array(1 => ';'),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'NUMBERS' => GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_HEX_PREFIX,
            +    'KEYWORDS' => array(
            +        /*CPU*/
            +        1 => array(
            +            'set','add','sub','mul','div','mod','shl','shr','and','bor','xor',
            +            'ife','ifn','ifg','ifb',
            +            'jsr'
            +            ),
            +        /*registers*/
            +        2 => array(
            +            'a','b','c','x','y','z','i','j',
            +            'pc','sp','o',
            +            'pop','peek','push' //Special cases with DCPU-16
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '[', ']', '+', '-', ','
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000088; font-weight:bold;',
            +            2 => 'color: #0000ff;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #adadad; font-style: italic;',
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000088;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #7f007f;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #880000;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #008000;'
            +            ),
            +        'REGEXPS' => array(
            +            2 => 'color: #993333;'
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => 'http://0x10c.com/doc/dcpu-16.txt',
            +        2 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        //Hex numbers
            +        //0 => '0[0-9a-fA-F]{1,32}[hH]',
            +        //Binary numbers
            +        //1 => '\%[01]{1,64}|[01]{1,64}[bB]?(?![^<]*>)',
            +        //Labels
            +        2 => '^:[_a-zA-Z][_a-zA-Z0-9]?(?=\s|$)'
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4,
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            'DISALLOWED_BEFORE' => "(? "(?![a-zA-Z0-9_\|%\\-])"
            +            )
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/dcs.php b/vendor/easybook/geshi/geshi/dcs.php
            new file mode 100644
            index 0000000000..67b6cd48ac
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/dcs.php
            @@ -0,0 +1,181 @@
            + 'DCS',
            +    'COMMENT_SINGLE' => array(
            +        1 => ';'
            +        ),
            +    'COMMENT_MULTI' => array(
            +        ),
            +    'COMMENT_REGEXP' => array(
            +        // Highlight embedded C code in a separate color:
            +        2 => '/\bINSERT_C_CODE\b.*?\bEND_C_CODE\b/ims'
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_UPPER,
            +    'QUOTEMARKS' => array(
            +        '"'
            +        ),
            +    'ESCAPE_CHAR' => '',
            +    'ESCAPE_REGEXP' => '',
            +    'NUMBERS' =>
            +        GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_FLT_SCI_ZERO,
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'abs', 'ascii_value', 'bit_value', 'blank_date', 'calc_unit_values', 'cm',
            +            'complete_months', 'complete_years', 'correct', 'create_input_file', 'cy',
            +            'date_convert', 'day', 'del_output_separator',
            +            'delete_existing_output_files', 'div', 'ex', 'exact_years', 'exp',
            +            'extract_date', 'failed_validation', 'file_number', 'first_record',
            +            'fract', 'fund_fac_a', 'fund_fac_b', 'fund_fac_c', 'fund_fac_d',
            +            'fund_fac_e', 'fund_fac_f', 'fund_fac_g', 'fund_fac_h', 'fund_fac_i',
            +            'fund_fac_j', 'fund_fac_k', 'fund_fac_l', 'fund_fac_m', 'fund_fac_n',
            +            'fund_fac_o', 'fund_fac_p', 'fund_fac_q', 'fund_fac_r', 'fund_fac_s',
            +            'fund_fac_t', 'fund_fac_u', 'fund_fac_v', 'fund_fac_w', 'fund_fac_x',
            +            'fund_fac_y', 'fund_fac_z', 'group', 'group_record',
            +            'input_file_date_time', 'input_file_extension', 'input_file_location',
            +            'input_file_name', 'int', 'invalid', 'last_record', 'leap_year', 'len',
            +            'ln', 'log', 'main_format_name', 'max', 'max_num_subrecords', 'message',
            +            'min', 'mod', 'month', 'months_add', 'months_sub', 'nearest_months',
            +            'nearest_years', 'next_record', 'nm', 'no_of_current_records',
            +            'no_of_records', 'numval', 'ny', 'output', 'output_array_as_constants',
            +            'output_file_path', 'output_record', 'pmdf_output', 'previous', 'rand',
            +            're_start', 'read_generic_table', 'read_generic_table_text',
            +            'read_input_footer', 'read_input_footer_text', 'read_input_header',
            +            'read_input_header_text', 'record_count', 'record_suppressed', 'round',
            +            'round_down', 'round_near', 'round_up', 'run_dcs_program', 'run_parameter',
            +            'run_parameter_text', 'set_main_record', 'set_num_subrecords',
            +            'sort_array', 'sort_current_records', 'sort_input', 'strval', 'substr',
            +            'summarise', 'summarise_record', 'summarise_units',
            +            'summarise_units_record', 'suppress_record', 'table_correct',
            +            'table_validate', 'terminate', 'time', 'today', 'trim', 'ubound', 'year',
            +            'years_add', 'years_sub'
            +            ),
            +        2 => array(
            +            'and', 'as', 'begin', 'boolean', 'byref', 'byval', 'call', 'case', 'date',
            +            'default', 'do', 'else', 'elseif', 'end_c_code', 'endfor', 'endfunction',
            +            'endif', 'endproc', 'endswitch', 'endwhile', 'eq',
            +            'explicit_declarations', 'false', 'for', 'from', 'function', 'ge', 'gt',
            +            'if', 'insert_c_code', 'integer', 'le', 'loop', 'lt', 'ne', 'not',
            +            'number', 'or', 'private', 'proc', 'public', 'quitloop', 'return',
            +            'short', 'step', 'switch', 'text', 'then', 'to', 'true', 'while'
            +            ),
            +        3 => array(
            +            // These keywords are not highlighted by the DCS IDE but we may as well
            +            // keep track of them anyway:
            +            'mp_file', 'odbc_file'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '[', ']',
            +        '=', '<', '>',
            +        '+', '-', '*', '/', '^',
            +        ':', ','
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: red;',
            +            2 => 'color: blue;',
            +            3 => 'color: black;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: black; background-color: silver;',
            +            // Colors for highlighting embedded C code:
            +            2 => 'color: maroon; background-color: pink;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: black;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: green;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: green;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: black;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/delphi.php b/vendor/easybook/geshi/geshi/delphi.php
            new file mode 100644
            index 0000000000..34d0fd7bff
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/delphi.php
            @@ -0,0 +1,299 @@
            + 'Delphi',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array('(*' => '*)', '{' => '}'),
            +    //Compiler directives
            +    'COMMENT_REGEXP' => array(2 => '/\\{\\$.*?}|\\(\\*\\$.*?\\*\\)/U'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'"),
            +    'ESCAPE_CHAR' => '',
            +
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'Abstract', 'And', 'Array', 'As', 'Asm', 'At', 'Begin', 'Case',
            +            'Class', 'Const', 'Constructor', 'Contains', 'Default', 'delayed', 'Destructor',
            +            'DispInterface', 'Div', 'Do', 'DownTo', 'Else', 'End', 'Except',
            +            'Export', 'Exports', 'External', 'File', 'Finalization', 'Finally', 'For',
            +            'Function', 'Generic', 'Goto', 'If', 'Implementation', 'In', 'Inherited',
            +            'Initialization', 'Inline', 'Interface', 'Is', 'Label', 'Library', 'Message',
            +            'Mod', 'Nil', 'Not', 'Object', 'Of', 'On', 'Or', 'Overload', 'Override',
            +            'Package', 'Packed', 'Private', 'Procedure', 'Program', 'Property',
            +            'Protected', 'Public', 'Published', 'Read', 'Raise', 'Record', 'Register',
            +            'Repeat', 'Requires', 'Resourcestring', 'Set', 'Shl', 'Shr', 'Specialize', 'Stored',
            +            'Then', 'ThreadVar', 'To', 'Try', 'Type', 'Unit', 'Until', 'Uses', 'Var',
            +            'Virtual', 'While', 'With', 'Write', 'Xor', 'assembler', 'far',
            +            'near', 'pascal', 'cdecl', 'safecall', 'stdcall', 'varargs'
            +            ),
            +        2 => array(
            +            'false', 'self', 'true',
            +            ),
            +        3 => array(
            +            'Abs', 'AcquireExceptionObject', 'Addr', 'AnsiToUtf8', 'Append', 'ArcTan',
            +            'Assert', 'AssignFile', 'Assigned', 'BeginThread', 'BlockRead',
            +            'BlockWrite', 'Break', 'ChDir', 'Chr', 'Close', 'CloseFile',
            +            'CompToCurrency', 'CompToDouble', 'Concat', 'Continue', 'Copy', 'Cos',
            +            'Dec', 'Delete', 'Dispose', 'DoubleToComp', 'EndThread', 'EnumModules',
            +            'EnumResourceModules', 'Eof', 'Eoln', 'Erase', 'ExceptAddr',
            +            'ExceptObject', 'Exclude', 'Exit', 'Exp', 'FilePos', 'FileSize',
            +            'FillChar', 'Finalize', 'FindClassHInstance', 'FindHInstance',
            +            'FindResourceHInstance', 'Flush', 'Frac', 'FreeMem', 'Get8087CW',
            +            'GetDir', 'GetLastError', 'GetMem', 'GetMemoryManager',
            +            'GetModuleFileName', 'GetVariantManager', 'Halt', 'Hi', 'High',
            +            'IOResult', 'Inc', 'Include', 'Initialize', 'Insert', 'Int',
            +            'IsMemoryManagerSet', 'IsVariantManagerSet', 'Length', 'Ln', 'Lo', 'Low',
            +            'MkDir', 'Move', 'New', 'Odd', 'OleStrToStrVar', 'OleStrToString', 'Ord',
            +            'PUCS4Chars', 'ParamCount', 'ParamStr', 'Pi', 'Pos', 'Pred', 'Ptr',
            +            'Random', 'Randomize', 'Read', 'ReadLn', 'ReallocMem',
            +            'ReleaseExceptionObject', 'Rename', 'Reset', 'Rewrite', 'RmDir', 'Round',
            +            'RunError', 'Seek', 'SeekEof', 'SeekEoln', 'Set8087CW', 'SetLength',
            +            'SetLineBreakStyle', 'SetMemoryManager', 'SetString', 'SetTextBuf',
            +            'SetVariantManager', 'Sin', 'SizeOf', 'Slice', 'Sqr', 'Sqrt', 'Str',
            +            'StringOfChar', 'StringToOleStr', 'StringToWideChar', 'Succ', 'Swap',
            +            'Trunc', 'Truncate', 'TypeInfo', 'UCS4StringToWideString', 'UTF8Decode',
            +            'UTF8Encode', 'UnicodeToUtf8', 'UniqueString', 'UpCase', 'Utf8ToAnsi',
            +            'Utf8ToUnicode', 'Val', 'VarArrayRedim', 'VarClear',
            +            'WideCharLenToStrVar', 'WideCharLenToString', 'WideCharToStrVar',
            +            'WideCharToString', 'WideStringToUCS4String', 'Write', 'WriteLn',
            +
            +            'Abort', 'AddExitProc', 'AddTerminateProc', 'AdjustLineBreaks', 'AllocMem',
            +            'AnsiCompareFileName', 'AnsiCompareStr', 'AnsiCompareText',
            +            'AnsiDequotedStr', 'AnsiExtractQuotedStr', 'AnsiLastChar',
            +            'AnsiLowerCase', 'AnsiLowerCaseFileName', 'AnsiPos', 'AnsiQuotedStr',
            +            'AnsiSameStr', 'AnsiSameText', 'AnsiStrComp', 'AnsiStrIComp',
            +            'AnsiStrLComp', 'AnsiStrLIComp', 'AnsiStrLastChar', 'AnsiStrLower',
            +            'AnsiStrPos', 'AnsiStrRScan', 'AnsiStrScan', 'AnsiStrUpper',
            +            'AnsiUpperCase', 'AnsiUpperCaseFileName', 'AppendStr', 'AssignStr',
            +            'Beep', 'BoolToStr', 'ByteToCharIndex', 'ByteToCharLen', 'ByteType',
            +            'CallTerminateProcs', 'ChangeFileExt', 'CharLength', 'CharToByteIndex',
            +            'CharToByteLen', 'CompareMem', 'CompareStr', 'CompareText', 'CreateDir',
            +            'CreateGUID', 'CurrToStr', 'CurrToStrF', 'CurrentYear', 'Date',
            +            'DateTimeToFileDate', 'DateTimeToStr', 'DateTimeToString',
            +            'DateTimeToSystemTime', 'DateTimeToTimeStamp', 'DateToStr', 'DayOfWeek',
            +            'DecodeDate', 'DecodeDateFully', 'DecodeTime', 'DeleteFile',
            +            'DirectoryExists', 'DiskFree', 'DiskSize', 'DisposeStr', 'EncodeDate',
            +            'EncodeTime', 'ExceptionErrorMessage', 'ExcludeTrailingBackslash',
            +            'ExcludeTrailingPathDelimiter', 'ExpandFileName', 'ExpandFileNameCase',
            +            'ExpandUNCFileName', 'ExtractFileDir', 'ExtractFileDrive',
            +            'ExtractFileExt', 'ExtractFileName', 'ExtractFilePath',
            +            'ExtractRelativePath', 'ExtractShortPathName', 'FileAge', 'FileClose',
            +            'FileCreate', 'FileDateToDateTime', 'FileExists', 'FileGetAttr',
            +            'FileGetDate', 'FileIsReadOnly', 'FileOpen', 'FileRead', 'FileSearch',
            +            'FileSeek', 'FileSetAttr', 'FileSetDate', 'FileSetReadOnly', 'FileWrite',
            +            'FinalizePackage', 'FindClose', 'FindCmdLineSwitch', 'FindFirst',
            +            'FindNext', 'FloatToCurr', 'FloatToDateTime', 'FloatToDecimal',
            +            'FloatToStr', 'FloatToStrF', 'FloatToText', 'FloatToTextFmt',
            +            'FmtLoadStr', 'FmtStr', 'ForceDirectories', 'Format', 'FormatBuf',
            +            'FormatCurr', 'FormatDateTime', 'FormatFloat', 'FreeAndNil',
            +            'GUIDToString', 'GetCurrentDir', 'GetEnvironmentVariable',
            +            'GetFileVersion', 'GetFormatSettings', 'GetLocaleFormatSettings',
            +            'GetModuleName', 'GetPackageDescription', 'GetPackageInfo', 'GetTime',
            +            'IncAMonth', 'IncMonth', 'IncludeTrailingBackslash',
            +            'IncludeTrailingPathDelimiter', 'InitializePackage', 'IntToHex',
            +            'IntToStr', 'InterlockedDecrement', 'InterlockedExchange',
            +            'InterlockedExchangeAdd', 'InterlockedIncrement', 'IsDelimiter',
            +            'IsEqualGUID', 'IsLeapYear', 'IsPathDelimiter', 'IsValidIdent',
            +            'Languages', 'LastDelimiter', 'LoadPackage', 'LoadStr', 'LowerCase',
            +            'MSecsToTimeStamp', 'NewStr', 'NextCharIndex', 'Now', 'OutOfMemoryError',
            +            'QuotedStr', 'RaiseLastOSError', 'RaiseLastWin32Error', 'RemoveDir',
            +            'RenameFile', 'ReplaceDate', 'ReplaceTime', 'SafeLoadLibrary',
            +            'SameFileName', 'SameText', 'SetCurrentDir', 'ShowException', 'Sleep',
            +            'StrAlloc', 'StrBufSize', 'StrByteType', 'StrCat', 'StrCharLength',
            +            'StrComp', 'StrCopy', 'StrDispose', 'StrECopy', 'StrEnd', 'StrFmt',
            +            'StrIComp', 'StrLCat', 'StrLComp', 'StrLCopy', 'StrLFmt', 'StrLIComp',
            +            'StrLen', 'StrLower', 'StrMove', 'StrNew', 'StrNextChar', 'StrPCopy',
            +            'StrPLCopy', 'StrPas', 'StrPos', 'StrRScan', 'StrScan', 'StrToBool',
            +            'StrToBoolDef', 'StrToCurr', 'StrToCurrDef', 'StrToDate', 'StrToDateDef',
            +            'StrToDateTime', 'StrToDateTimeDef', 'StrToFloat', 'StrToFloatDef',
            +            'StrToInt', 'StrToInt64', 'StrToInt64Def', 'StrToIntDef', 'StrToTime',
            +            'StrToTimeDef', 'StrUpper', 'StringReplace', 'StringToGUID', 'Supports',
            +            'SysErrorMessage', 'SystemTimeToDateTime', 'TextToFloat', 'Time',
            +            'TimeStampToDateTime', 'TimeStampToMSecs', 'TimeToStr', 'Trim',
            +            'TrimLeft', 'TrimRight', 'TryEncodeDate', 'TryEncodeTime',
            +            'TryFloatToCurr', 'TryFloatToDateTime', 'TryStrToBool', 'TryStrToCurr',
            +            'TryStrToDate', 'TryStrToDateTime', 'TryStrToFloat', 'TryStrToInt',
            +            'TryStrToInt64', 'TryStrToTime', 'UnloadPackage', 'UpperCase',
            +            'WideCompareStr', 'WideCompareText', 'WideFmtStr', 'WideFormat',
            +            'WideFormatBuf', 'WideLowerCase', 'WideSameStr', 'WideSameText',
            +            'WideUpperCase', 'Win32Check', 'WrapText',
            +
            +            'ActivateClassGroup', 'AllocateHwnd', 'BinToHex', 'CheckSynchronize',
            +            'CollectionsEqual', 'CountGenerations', 'DeallocateHwnd', 'EqualRect',
            +            'ExtractStrings', 'FindClass', 'FindGlobalComponent', 'GetClass',
            +            'GroupDescendantsWith', 'HexToBin', 'IdentToInt',
            +            'InitInheritedComponent', 'IntToIdent', 'InvalidPoint',
            +            'IsUniqueGlobalComponentName', 'LineStart', 'ObjectBinaryToText',
            +            'ObjectResourceToText', 'ObjectTextToBinary', 'ObjectTextToResource',
            +            'PointsEqual', 'ReadComponentRes', 'ReadComponentResEx',
            +            'ReadComponentResFile', 'Rect', 'RegisterClass', 'RegisterClassAlias',
            +            'RegisterClasses', 'RegisterComponents', 'RegisterIntegerConsts',
            +            'RegisterNoIcon', 'RegisterNonActiveX', 'SmallPoint', 'StartClassGroup',
            +            'TestStreamFormat', 'UnregisterClass', 'UnregisterClasses',
            +            'UnregisterIntegerConsts', 'UnregisterModuleClasses',
            +            'WriteComponentResFile',
            +
            +            'ArcCos', 'ArcCosh', 'ArcCot', 'ArcCotH', 'ArcCsc', 'ArcCscH', 'ArcSec',
            +            'ArcSecH', 'ArcSin', 'ArcSinh', 'ArcTan2', 'ArcTanh', 'Ceil',
            +            'CompareValue', 'Cosecant', 'Cosh', 'Cot', 'CotH', 'Cotan', 'Csc', 'CscH',
            +            'CycleToDeg', 'CycleToGrad', 'CycleToRad', 'DegToCycle', 'DegToGrad',
            +            'DegToRad', 'DivMod', 'DoubleDecliningBalance', 'EnsureRange', 'Floor',
            +            'Frexp', 'FutureValue', 'GetExceptionMask', 'GetPrecisionMode',
            +            'GetRoundMode', 'GradToCycle', 'GradToDeg', 'GradToRad', 'Hypot',
            +            'InRange', 'IntPower', 'InterestPayment', 'InterestRate',
            +            'InternalRateOfReturn', 'IsInfinite', 'IsNan', 'IsZero', 'Ldexp', 'LnXP1',
            +            'Log10', 'Log2', 'LogN', 'Max', 'MaxIntValue', 'MaxValue', 'Mean',
            +            'MeanAndStdDev', 'Min', 'MinIntValue', 'MinValue', 'MomentSkewKurtosis',
            +            'NetPresentValue', 'Norm', 'NumberOfPeriods', 'Payment', 'PeriodPayment',
            +            'Poly', 'PopnStdDev', 'PopnVariance', 'Power', 'PresentValue',
            +            'RadToCycle', 'RadToDeg', 'RadToGrad', 'RandG', 'RandomRange', 'RoundTo',
            +            'SLNDepreciation', 'SYDDepreciation', 'SameValue', 'Sec', 'SecH',
            +            'Secant', 'SetExceptionMask', 'SetPrecisionMode', 'SetRoundMode', 'Sign',
            +            'SimpleRoundTo', 'SinCos', 'Sinh', 'StdDev', 'Sum', 'SumInt',
            +            'SumOfSquares', 'SumsAndSquares', 'Tan', 'Tanh', 'TotalVariance',
            +            'Variance'
            +            ),
            +        4 => array(
            +            'AnsiChar', 'AnsiString', 'Bool', 'Boolean', 'Byte', 'ByteBool', 'Cardinal', 'Char',
            +            'Comp', 'Currency', 'DWORD', 'Double', 'Extended', 'Int64', 'Integer', 'IUnknown',
            +            'LongBool', 'LongInt', 'LongWord', 'PAnsiChar', 'PAnsiString', 'PBool', 'PBoolean', 'PByte',
            +            'PByteArray', 'PCardinal', 'PChar', 'PComp', 'PCurrency', 'PDWORD', 'PDate', 'PDateTime',
            +            'PDouble', 'PExtended', 'PInt64', 'PInteger', 'PLongInt', 'PLongWord', 'Pointer', 'PPointer',
            +            'PShortInt', 'PShortString', 'PSingle', 'PSmallInt', 'PString', 'PHandle', 'PVariant', 'PWord',
            +            'PWordArray', 'PWordBool', 'PWideChar', 'PWideString', 'Real', 'Real48', 'ShortInt', 'ShortString',
            +            'Single', 'SmallInt', 'String', 'TClass', 'TDate', 'TDateTime', 'TextFile', 'THandle',
            +            'TObject', 'TTime', 'Variant', 'WideChar', 'WideString', 'Word', 'WordBool'
            +            ),
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        ),
            +    'SYMBOLS' => array(
            +        0 => array('(', ')', '[', ']'),
            +        1 => array('.', ',', ':', ';'),
            +        2 => array('@', '^'),
            +        3 => array('=', '+', '-', '*', '/')
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000000; font-weight: bold;',
            +            2 => 'color: #000000; font-weight: bold;',
            +            3 => 'color: #000066;',
            +            4 => 'color: #000066; font-weight: bold;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;',
            +            2 => 'color: #008000; font-style: italic;',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #ff0000; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000066;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #0000ff;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #006600;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #0000cc;',
            +            1 => 'color: #ff0000;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #000066;',
            +            1 => 'color: #000066;',
            +            2 => 'color: #000066;',
            +            3 => 'color: #000066;'
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        //Hex numbers
            +        0 => '(? '\#(?:\$[0-9a-fA-F]{1,4}|\d{1,5})'
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 2,
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            3 => array(
            +                'DISALLOWED_AFTER' => '(?=\s*[(;])'
            +                )
            +            )
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/diff.php b/vendor/easybook/geshi/geshi/diff.php
            new file mode 100644
            index 0000000000..1c72be96cc
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/diff.php
            @@ -0,0 +1,195 @@
            + 'Diff',
            +    'COMMENT_SINGLE' => array(),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array(),
            +    'ESCAPE_CHAR' => ' ',
            +    'KEYWORDS' => array(
            +            1 => array(
            +                '\ No newline at end of file'
            +            ),
            +//            2 => array(
            +//                '***************' /* This only seems to works in some cases? */
            +//            ),
            +        ),
            +    'SYMBOLS' => array(
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        1 => false,
            +//        2 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #aaaaaa; font-style: italic;',
            +//            2 => 'color: #dd6611;',
            +            ),
            +        'COMMENTS' => array(
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => ''
            +            ),
            +        'BRACKETS' => array(
            +            0 => ''
            +            ),
            +        'STRINGS' => array(
            +            0 => ''
            +            ),
            +        'NUMBERS' => array(
            +            0 => ''
            +            ),
            +        'METHODS' => array(
            +            0 => ''
            +            ),
            +        'SYMBOLS' => array(
            +            0 => ''
            +            ),
            +        'SCRIPT' => array(
            +            0 => ''
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #440088;',
            +            1 => 'color: #991111;',
            +            2 => 'color: #00b000;',
            +            3 => 'color: #888822;',
            +            4 => 'color: #888822;',
            +            5 => 'color: #0011dd;',
            +            6 => 'color: #440088;',
            +            7 => 'color: #991111;',
            +            8 => 'color: #00b000;',
            +            9 => 'color: #888822;',
            +            ),
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +//        2 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(),
            +    'REGEXPS' => array(
            +        0 => "[0-9,]+[acd][0-9,]+",
            +        //Removed lines
            +        1 => array(
            +            GESHI_SEARCH => '(^|(?<=\A\s))\\<.*$',
            +            GESHI_REPLACE => '\\0',
            +            GESHI_MODIFIERS => 'm',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        //Inserted lines
            +        2 => array(
            +            GESHI_SEARCH => '(^|(?<=\A\s))\\>.*$',
            +            GESHI_REPLACE => '\\0',
            +            GESHI_MODIFIERS => 'm',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        //Location line
            +        3 => array(
            +            GESHI_SEARCH => '(^|(?<=\A\s))-{3}\\s.*$',
            +            GESHI_REPLACE => '\\0',
            +            GESHI_MODIFIERS => 'm',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        //Inserted line
            +        4 => array(
            +            GESHI_SEARCH => '(^|(?<=\A\s))(\\+){3}\\s.*$',
            +            GESHI_REPLACE => '\\0',
            +            GESHI_MODIFIERS => 'm',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        //Modified line
            +        5 => array(
            +            GESHI_SEARCH => '(^|(?<=\A\s))\\!.*$',
            +            GESHI_REPLACE => '\\0',
            +            GESHI_MODIFIERS => 'm',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        //File specification
            +        6 => array(
            +            GESHI_SEARCH => '(^|(?<=\A\s))[\\@]{2}.*$',
            +            GESHI_REPLACE => '\\0',
            +            GESHI_MODIFIERS => 'm',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        //Removed line
            +        7 => array(
            +            GESHI_SEARCH => '(^|(?<=\A\s))\\-.*$',
            +            GESHI_REPLACE => '\\0',
            +            GESHI_MODIFIERS => 'm',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        //Inserted line
            +        8 => array(
            +            GESHI_SEARCH => '(^|(?<=\A\s))\\+.*$',
            +            GESHI_REPLACE => '\\0',
            +            GESHI_MODIFIERS => 'm',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        //File specification
            +        9 => array(
            +            GESHI_SEARCH => '(^|(?<=\A\s))(\\*){3}\\s.*$',
            +            GESHI_REPLACE => '\\0',
            +            GESHI_MODIFIERS => 'm',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/div.php b/vendor/easybook/geshi/geshi/div.php
            new file mode 100644
            index 0000000000..fb8a72a16e
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/div.php
            @@ -0,0 +1,124 @@
            + 'DIV',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_UPPER,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'while','until','to','switch','step','return','repeat','loop','if','from','frame','for','end','elseif',
            +            'else','default','debug','continue','clone','case','break','begin'
            +            ),
            +        2 => array(
            +            'xor','whoami','type','sizeof','pointer','or','offset','not','neg','mod','id','dup','and','_ne','_lt',
            +            '_le','_gt','_ge','_eq'
            +            ),
            +        3 => array(
            +            'setup_program','program','process','private','local','import','global','function','const',
            +            'compiler_options'
            +            ),
            +        4 => array(
            +            'word','struct','string','int','byte'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '(',')','[',']','=','+','-','*','/','!','%','^','&',':',';',',','<','>'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0040b1;',
            +            2 => 'color: #000000;',
            +            3 => 'color: #000066; font-weight: bold;',
            +            4 => 'color: #993333;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => ''
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #44aa44;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            0 => 'color: #202020;',
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #44aa44;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/dos.php b/vendor/easybook/geshi/geshi/dos.php
            new file mode 100644
            index 0000000000..f466a3cfa0
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/dos.php
            @@ -0,0 +1,226 @@
            + 'DOS',
            +    'COMMENT_SINGLE' => array(),
            +    'COMMENT_MULTI' => array(),
            +    //DOS comment lines
            +    'COMMENT_REGEXP' => array(
            +        1 => "/^\s*@?REM\b.*$/mi",
            +        2 => "/^\s*::.*$/m",
            +        3 => "/\^./"
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array(),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        /* Flow control keywords */
            +        1 => array(
            +            'if', 'else', 'goto', 'shift',
            +            'for', 'in', 'do',
            +            'call', 'exit'
            +            ),
            +        /* IF statement keywords */
            +        2 => array(
            +            'not', 'exist', 'errorlevel',
            +            'defined',
            +            'equ', 'neq', 'lss', 'leq', 'gtr', 'geq'
            +            ),
            +        /* Internal commands */
            +        3 => array(
            +            'cd', 'md', 'rd', 'chdir', 'mkdir', 'rmdir', 'dir',
            +            'del', 'copy', 'move', 'ren', 'rename',
            +            'echo',
            +            'setlocal', 'endlocal', 'set',
            +            'pause',
            +            'pushd', 'popd', 'title', 'verify'
            +            ),
            +        /* Special files */
            +        4 => array(
            +            'prn', 'nul', 'lpt3', 'lpt2', 'lpt1', 'con',
            +            'com4', 'com3', 'com2', 'com1', 'aux'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '@', '%', '!', '|', '<', '>', '&'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #00b100; font-weight: bold;',
            +            2 => 'color: #000000; font-weight: bold;',
            +            3 => 'color: #b1b100; font-weight: bold;',
            +            4 => 'color: #0000ff; font-weight: bold;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;',
            +            2 => 'color: #b100b1; font-style: italic;',
            +            3 => 'color: #33cc33;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #ff0000; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #33cc33;',
            +            1 => 'color: #33cc33;'
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #b100b1; font-weight: bold;',
            +            1 => 'color: #448844;',
            +            2 => 'color: #448888;',
            +            3 => 'color: #448888;'
            +            )
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'URLS' => array(
            +        1 => 'http://www.ss64.com/nt/{FNAMEL}.html',
            +        2 => 'http://www.ss64.com/nt/{FNAMEL}.html',
            +        3 => 'http://www.ss64.com/nt/{FNAMEL}.html',
            +        4 => 'http://www.ss64.com/nt/{FNAMEL}.html'
            +        ),
            +    'REGEXPS' => array(
            +        /* Label */
            +        0 => array(
            +/*            GESHI_SEARCH => '((?si:[@\s]+GOTO\s+|\s+:)[\s]*)((? '((?si:[@\s]+GOTO\s+|\s+:)[\s]*)((? '\\2',
            +            GESHI_MODIFIERS => 'si',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => ''
            +        ),
            +        /* Variable assignement */
            +        1 => array(
            +/*            GESHI_SEARCH => '(SET[\s]+(?si:\/A[\s]+|\/P[\s]+|))([^=\s\n]+)([\s]*=)',*/
            +            GESHI_SEARCH => '(SET\s+(?si:\\/A\s+|\\/P\s+)?)([^=\n]+)(\s*=)',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => 'si',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => '\\3'
            +            ),
            +        /* Arguments or variable evaluation */
            +        2 => array(
            +/*            GESHI_SEARCH => '(%)([\d*]|[^%\s]*(?=%))((? '(!(?:!(?=[a-z0-9]))?)([\d*]|(?:~[adfnpstxz]*(?:$\w+:)?)?[a-z0-9](?!\w)|[^!>\n]*(?=!))((?)',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => 'si',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => '\\3'
            +            ),
            +        /* Arguments or variable evaluation */
            +        3 => array(
            +/*            GESHI_SEARCH => '(%)([\d*]|[^%\s]*(?=%))((? '(%(?:%(?=[a-z0-9]))?)([\d*]|(?:~[adfnpstxz]*(?:$\w+:)?)?[a-z0-9](?!\w)|[^%\n]*(?=%))((? '\\2',
            +            GESHI_MODIFIERS => 'si',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => '\\3'
            +            )
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4,
            +    'PARSER_CONTROL' => array(
            +        'ENABLE_FLAGS' => array(
            +            'BRACKETS' => GESHI_NEVER,
            +            'NUMBERS' => GESHI_NEVER
            +            ),
            +        'KEYWORDS' => array(
            +            1 => array(
            +                'DISALLOWED_BEFORE' => '(? array(
            +                'DISALLOWED_BEFORE' => '(? array(
            +                'DISALLOWED_BEFORE' => '(? array(
            +                'DISALLOWED_BEFORE' => '(? 'dot',
            +    'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'URL', 'arrowhead', 'arrowsize', 'arrowtail', 'bb', 'bgcolor', 'bottomlabel',
            +            'center', 'clusterrank', 'color', 'comment', 'constraint', 'decorate',
            +            'dir', 'distortion', 'fillcolor', 'fixedsize', 'fontcolor',
            +            'fontname', 'fontsize', 'group', 'headclip', 'headlabel', 'headport',
            +            'height', 'id', 'label', 'labelangle', 'labeldistance', 'labelfontcolor',
            +            'labelfontname', 'labelfontsize', 'layer', 'layers', 'margin', 'mclimit',
            +            'minlen', 'nodesep', 'nslimit', 'ordering', 'orientation', 'page',
            +            'pagedir', 'peripheries', 'port_label_distance', 'quantum', 'rank', 'rankdir',
            +            'ranksep', 'ratio', 'regular', 'rotate', 'samehead', 'sametail', 'searchsize',
            +            'shape', 'shapefile', 'showboxes', 'sides', 'size', 'skew', 'style',
            +            'tailclip', 'taillabel', 'tailport', 'toplabel', 'weight', 'width'
            +            ),
            +        2 => array(
            +            'node', 'graph', 'digraph', 'strict', 'edge', 'subgraph'
            +            ),
            +        3 => array(
            +            'Mcircle', 'Mdiamond', 'Mrecord', 'Msquare', 'auto', 'back', 'bold',
            +            'both', 'box', 'circle', 'compress', 'dashed', 'diamond', 'dot',
            +            'dotted', 'doublecircle', 'doubleoctagon', 'egg', 'ellipse', 'epsf',
            +            'false', 'fill', 'filled', 'forward', 'global', 'hexagon', 'house',
            +            'inv', 'invdot', 'invhouse', 'invis', 'invodot', 'invtrapezium',
            +            'invtriangle', 'local', 'max', 'min', 'none', 'normal', 'octagon',
            +            'odot', 'out', 'parallelogram', 'plaintext', 'polygon', 'record',
            +            'same', 'solid', 'trapezium', 'triangle', 'tripleoctagon', 'true'
            +            ),
            +        4 => array(
            +            'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'black',
            +            'blanchedalmond', 'blue', 'blueviolet', 'brown', 'burlywood', 'cadetblue',
            +            'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson',
            +            'cyan', 'darkgoldenrod', 'darkgreen', 'darkkhaki', 'darkolivegreen',
            +            'darkorange', 'darkorchid', 'darksalmon', 'darkseagreen', 'darkslateblue',
            +            'darkslategray', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue',
            +            'dimgray', 'dodgerblue', 'firebrick', 'forestgreen', 'gainsboro', 'ghostwhite',
            +            'gold', 'goldenrod', 'gray', 'green', 'greenyellow', 'honeydew', 'hotpink',
            +            'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush',
            +            'lawngreen', 'lemonchiffon', 'lightblue', 'lightcyan', 'lightgoldenrod',
            +            'lightgoldenrodyellow', 'lightgray', 'lightpink', 'lightsalmon',
            +            'lightseagreen', 'lightskyblue', 'lightslateblue', 'lightslategray',
            +            'lightyellow', 'limegreen', 'linen', 'magenta', 'maroon', 'mediumaquamarine',
            +            'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen',
            +            'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred',
            +            'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'navy',
            +            'navyblue', 'oldlace', 'olivedrab', 'oralwhite', 'orange', 'orangered',
            +            'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred',
            +            'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'purple',
            +            'red', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'salmon2', 'sandybrown',
            +            'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'snow',
            +            'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet',
            +            'violetred', 'wheat', 'white', 'whitesmoke', 'yellow', 'yellowgreen'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '[', ']', '{', '}', '-', '+', '*', '/', '<', '>', '!', '~', '%', '&', '|', '='
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000066;',
            +            2 => 'color: #000000; font-weight: bold;',
            +            3 => 'color: #993333;',
            +            4 => 'color: #b1b100;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;',
            +            2 => 'color: #339933;',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #af624d; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(),
            +    'REGEXPS' => array(),
            +    'STRICT_MODE_APPLIES' => GESHI_MAYBE,
            +    'SCRIPT_DELIMITERS' => array(),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        0 => true,
            +        1 => true,
            +        2 => true,
            +        3 => true
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/e.php b/vendor/easybook/geshi/geshi/e.php
            new file mode 100644
            index 0000000000..aacc001485
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/e.php
            @@ -0,0 +1,207 @@
            + 'E',
            +    'COMMENT_SINGLE' => array(1 => '#'),
            +    'COMMENT_MULTI' => array('/**' => '*/'), // Note: This is method doc, not a general comment syntax.
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +
            +    // FIXME: The escaping inside ` is actually doubling of any interior `, $, or @ -- backslash is NOT special
            +    'QUOTEMARKS' => array('\'', '"', '`'),
            +    'ESCAPE_CHAR' => '\\',
            +
            +    'KEYWORDS' => array(
            +        // builtin control structures
            +        1 => array(
            +            'accum', 'break', 'try', 'continue', 'if', 'while', 'for', 'switch'
            +            ),
            +
            +        // control structures subsidiary keywords
            +        2 => array(
            +            'catch', 'else', 'finally', 'in', 'exit'
            +            ),
            +
            +        // named operators
            +        3 => array(
            +            'fn', 'via'
            +            ),
            +
            +        // variable/function/object definers
            +        4 => array(
            +            'def', 'bind', 'var'
            +            ),
            +
            +        // object definition subsidiary keywords
            +        5 => array(
            +            'extends', 'as', 'implements', 'guards', 'match', 'to', 'method'
            +            ),
            +
            +        // builtin nouns in safeEnv
            +        6 => array(
            +            'null', 'false', 'true', 'throw', '__loop', '__makeList',
            +            '__makeMap', '__makeProtocolDesc', '__makeMessageDesc',
            +            '__makeParamDesc', 'any', 'void', 'boolean', '__makeOrderedSpace',
            +            'ValueGuard', '__MatchContext', 'require', '__makeVerbFacet', 'NaN',
            +            'Infinity', '__identityFunc', '__makeInt', '__makeFinalSlot',
            +            '__makeVarSlot', '__makeGuardedSlot', '__makeGuard', '__makeTwine',
            +            '__makeSourceSpan', '__auditedBy', 'Guard', 'near', 'pbc',
            +            'PassByCopy', 'DeepPassByCopy', 'Data', 'Persistent', 'DeepFrozen',
            +            'int', 'float64', 'char', 'String', 'Twine', 'TextWriter', 'List',
            +            'Map', 'nullOk', 'Tuple', '__Portrayal', 'notNull', 'vow', 'rcvr',
            +            'SturdyRef', 'simple__quasiParser', 'twine__quasiParser',
            +            'rx__quasiParser', 'e__quasiParser', 'epatt__quasiParser',
            +            'sml__quasiParser', 'term__quasiParser', 'traceln', '__equalizer',
            +            '__comparer', 'Ref', 'E', 'promiseAllFulfilled', 'EIO', 'help',
            +            'safeScope', '__eval', 'resource__uriGetter', 'type__uriGetter',
            +            'import__uriGetter', 'elib__uriGetter', 'elang__uriGetter',
            +            'opaque__uriGetter'
            +            ),
            +
            +        // builtin nouns in privilegedEnv
            +        7 => array(
            +            'file__uriGetter', 'fileURL__uriGetter', 'jar__uriGetter',
            +            'http__uriGetter', 'ftp__uriGetter', 'gopher__uriGetter',
            +            'news__uriGetter', 'cap__uriGetter', 'makeCommand', 'stdout',
            +            'stderr', 'stdin', 'print', 'println', 'interp', 'entropy', 'timer',
            +            'introducer', 'identityMgr', 'makeSturdyRef', 'timeMachine',
            +            'unsafe__uriGetter', 'currentVat', 'rune', 'awt__uriGetter',
            +            'swing__uriGetter', 'JPanel__quasiParser', 'swt__uriGetter',
            +            'currentDisplay', 'swtGrid__quasiParser', 'swtGrid`',
            +            'privilegedScope'
            +            ),
            +
            +        // reserved keywords
            +        8 => array(
            +            'abstract', 'an', 'assert', 'attribute', 'be', 'begin', 'behalf',
            +            'belief', 'believe', 'believes', 'case', 'class', 'const',
            +            'constructor', 'declare', 'default', 'define', 'defmacro',
            +            'delicate', 'deprecated', 'dispatch', 'do', 'encapsulate',
            +            'encapsulated', 'encapsulates', 'end', 'ensure', 'enum', 'eventual',
            +            'eventually', 'export', 'facet', 'forall', 'function', 'given',
            +            'hidden', 'hides', 'inline', 'is', 'know', 'knows', 'lambda', 'let',
            +            'methods', 'module', 'namespace', 'native', 'obeys', 'octet',
            +            'oneway', 'operator', 'package', 'private', 'protected', 'public',
            +            'raises', 'reliance', 'reliant', 'relies', 'rely', 'reveal', 'sake',
            +            'signed', 'static', 'struct', 'suchthat', 'supports', 'suspect',
            +            'suspects', 'synchronized', 'this', 'transient', 'truncatable',
            +            'typedef', 'unsigned', 'unum', 'uses', 'using', 'utf8', 'utf16',
            +            'virtual', 'volatile', 'wstring'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        1 => array(
            +            '(', ')', '{', '}', '[', ']', '+', '-', '*', '/', '%', '=', '<', '>', '!', '^', '&', '|', '?', ':', ';', ','
            +            )
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        5 => true,
            +        6 => true,
            +        7 => true,
            +        8 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;',
            +            2 => 'color: #b1b100;',
            +            3 => 'color: #b1b100;',
            +            4 => 'color: #b1b100;',
            +            5 => 'color: #b1b100;',
            +            6 => 'color: #b1b100;',
            +            7 => 'color: #b1b100;',
            +            8 => 'color: #b1b100;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; font-style: italic;',
            +            'MULTI' => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #0000ff;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;',
            +            ),
            +        'METHODS' => array(
            +            0 => 'color: #004000;'
            +            ),
            +        'SYMBOLS' => array(
            +            1 => 'color: #339933;'
            +            ),
            +        'REGEXPS' => array(),
            +        'SCRIPT' => array()
            +        ),
            +    'URLS' => array(
            +        1 => 'http://wiki.erights.org/wiki/{FNAME}',
            +        2 => 'http://wiki.erights.org/wiki/{FNAME}',
            +        3 => 'http://wiki.erights.org/wiki/{FNAME}',
            +        4 => 'http://wiki.erights.org/wiki/{FNAME}',
            +        5 => 'http://wiki.erights.org/wiki/{FNAME}',
            +        6 => 'http://wiki.erights.org/wiki/{FNAME}',
            +        7 => 'http://wiki.erights.org/wiki/{FNAME}',
            +        8 => 'http://wiki.erights.org/wiki/{FNAME}'
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.',
            +        2 => '<-',
            +        3 => '::'
            +        ),
            +    'REGEXPS' => array(),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(),
            +    'HIGHLIGHT_STRICT_BLOCK' => array()
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/ecmascript.php b/vendor/easybook/geshi/geshi/ecmascript.php
            new file mode 100644
            index 0000000000..cae1192477
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/ecmascript.php
            @@ -0,0 +1,209 @@
            + 'ECMAScript',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    // Regular Expression Literals
            +    'COMMENT_REGEXP' => array(2 => "/(?<=[\\s^])s\\/(?:\\\\.|(?!\n)[^\\*\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\*\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])m?\\/(?:\\\\.|(?!\n)[^\\*\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\,\\;\\)])/iU"),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'ESCAPE_REGEXP' => array(
            +        //Simple Single Char Escapes
            +        1 => "#\\\\[\\\\abfnrtv\'\"?\n]#i",
            +        //Hexadecimal Char Specs
            +        2 => "#\\\\x[\da-fA-F]{2}#",
            +        //Hexadecimal Char Specs
            +        3 => "#\\\\u[\da-fA-F]{4}#",
            +        //Hexadecimal Char Specs
            +        4 => "#\\\\U[\da-fA-F]{8}#",
            +        //Octal Char Specs
            +        5 => "#\\\\[0-7]{1,3}#"
            +        ),
            +    'NUMBERS' =>
            +        GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B |
            +        GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI |
            +        GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO,
            +    'KEYWORDS' => array(
            +        1 => array( // Reserved literals
            +            'false', 'true',
            +            'null'
            +            ),
            +        2 => array( // Main keywords
            +            'break', 'case', 'catch', 'continue', 'default', 'delete', 'do', 'else',
            +            'finally', 'for', 'function', 'if', 'in', 'instanceof', 'new', 'return',
            +            'switch', 'this', 'throw', 'try', 'typeof', 'var', 'void', 'while',
            +            'with'
            +            ),
            +        3 => array( // Extra keywords or keywords reserved for future use
            +            'abstract', 'as', 'boolean', 'byte', 'char', 'class', 'const', 'debugger',
            +            'double', 'enum', 'export', 'extends', 'final', 'float', 'goto', 'implements',
            +            'import', 'int', 'interface', 'is', 'long', 'native', 'namespace', 'package',
            +            'private', 'protected', 'public', 'short', 'static', 'super', 'synchronized', 'throws',
            +            'transient', 'use', 'volatile'
            +            ),
            +        4 => array( // Operators
            +            'get', 'set'
            +            ),
            +        5 => array( // Built-in object classes
            +            'Array', 'Boolean', 'Date', 'EvalError', 'Error', 'Function', 'Math', 'Number',
            +            'Object', 'RangeError', 'ReferenceError', 'RegExp', 'String', 'SyntaxError', 'TypeError', 'URIError'
            +            ),
            +        6 => array( // Global properties
            +            'Infinity', 'NaN', 'undefined'
            +            ),
            +        7 => array( // Global methods
            +            'decodeURI', 'decodeURIComponent', 'encodeURI', 'encodeURIComponent',
            +            'eval', 'isFinite', 'isNaN', 'parseFloat', 'parseInt',
            +            // The escape and unescape functions do not work properly for non-ASCII characters and have been deprecated.
            +            // In JavaScript 1.5 and later, use encodeURI, decodeURI, encodeURIComponent, and decodeURIComponent.
            +            'escape', 'unescape'
            +            ),
            +        8 => array( // Function's arguments
            +            'arguments'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '[', ']', '{', '}',
            +        '+', '-', '*', '/', '%',
            +        '!', '.', '&', '|', '^',
            +        '<', '>', '=', '~',
            +        ',', ';', '?', ':'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        5 => true,
            +        6 => true,
            +        7 => true,
            +        8 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #009999;',
            +            2 => 'color: #1500C8;',
            +            3 => 'color: #1500C8;',
            +            4 => 'color: #1500C8;',
            +            5 => 'color: #1500C8;',
            +            6 => 'color: #1500C8;',
            +            7 => 'color: #1500C8;',
            +            8 => 'color: #1500C8;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; font-style: italic;',
            +            2 => 'color: #CC0000;',
            +            'MULTI' => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #3366CC;',
            +            1 => 'color: #3366CC;',
            +            2 => 'color: #3366CC;',
            +            3 => 'color: #3366CC;',
            +            4 => 'color: #3366CC;',
            +            5 => 'color: #3366CC;',
            +            'HARD' => '',
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #008800;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #9900FF;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #FF00FF;',
            +            GESHI_NUMBER_BIN_PREFIX_0B => 'color: #FF00FF;',
            +            GESHI_NUMBER_OCT_PREFIX => 'color: #FF00FF;',
            +            GESHI_NUMBER_HEX_PREFIX => 'color: #FF00FF;',
            +            GESHI_NUMBER_FLT_SCI_SHORT => 'color: #FF00FF;',
            +            GESHI_NUMBER_FLT_SCI_ZERO => 'color: #FF00FF;',
            +            GESHI_NUMBER_FLT_NONSCI_F => 'color: #FF00FF;',
            +            GESHI_NUMBER_FLT_NONSCI => 'color: #FF00FF;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #660066;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #339933;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            0 => '',
            +            1 => '',
            +            2 => '',
            +            3 => ''
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => '',
            +        6 => '',
            +        7 => '',
            +        8 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/eiffel.php b/vendor/easybook/geshi/geshi/eiffel.php
            new file mode 100644
            index 0000000000..807d23f944
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/eiffel.php
            @@ -0,0 +1,393 @@
            + 'Eiffel',
            +    'COMMENT_SINGLE' => array(1 => '--'),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '%',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'separate',
            +            'invariant',
            +            'inherit',
            +            'indexing',
            +            'feature',
            +            'expanded',
            +            'deferred',
            +            'class'
            +            ),
            +        2 => array(
            +            'xor',
            +            'when',
            +            'variant',
            +            'until',
            +            'unique',
            +            'undefine',
            +            'then',
            +            'strip',
            +            'select',
            +            'retry',
            +            'rescue',
            +            'require',
            +            'rename',
            +            'reference',
            +            'redefine',
            +            'prefix',
            +            'or',
            +            'once',
            +            'old',
            +            'obsolete',
            +            'not',
            +            'loop',
            +            'local',
            +            'like',
            +            'is',
            +            'inspect',
            +            'infix',
            +            'include',
            +            'implies',
            +            'if',
            +            'frozen',
            +            'from',
            +            'external',
            +            'export',
            +            'ensure',
            +            'end',
            +            'elseif',
            +            'else',
            +            'do',
            +            'creation',
            +            'create',
            +            'check',
            +            'as',
            +            'and',
            +            'alias',
            +            'agent'
            +            ),
            +        3 => array(
            +            'Void',
            +            'True',
            +            'Result',
            +            'Precursor',
            +            'False',
            +            'Current'
            +            ),
            +        4 => array(
            +            'UNIX_SIGNALS',
            +            'UNIX_FILE_INFO',
            +            'UNBOUNDED',
            +            'TWO_WAY_TREE_CURSOR',
            +            'TWO_WAY_TREE',
            +            'TWO_WAY_SORTED_SET',
            +            'TWO_WAY_LIST',
            +            'TWO_WAY_CURSOR_TREE',
            +            'TWO_WAY_CIRCULAR',
            +            'TWO_WAY_CHAIN_ITERATOR',
            +            'TUPLE',
            +            'TREE',
            +            'TRAVERSABLE',
            +            'TO_SPECIAL',
            +            'THREAD_CONTROL',
            +            'THREAD_ATTRIBUTES',
            +            'THREAD',
            +            'TABLE',
            +            'SUBSET',
            +            'STRING_HANDLER',
            +            'STRING',
            +            'STREAM',
            +            'STORABLE',
            +            'STD_FILES',
            +            'STACK',
            +            'SPECIAL',
            +            'SORTED_TWO_WAY_LIST',
            +            'SORTED_STRUCT',
            +            'SORTED_LIST',
            +            'SINGLE_MATH',
            +            'SET',
            +            'SEQUENCE',
            +            'SEQ_STRING',
            +            'SEMAPHORE',
            +            'ROUTINE',
            +            'RESIZABLE',
            +            'RECURSIVE_TREE_CURSOR',
            +            'RECURSIVE_CURSOR_TREE',
            +            'REAL_REF',
            +            'REAL',
            +            'RAW_FILE',
            +            'RANDOM',
            +            'QUEUE',
            +            'PROXY',
            +            'PROFILING_SETTING',
            +            'PROCEDURE',
            +            'PRIORITY_QUEUE',
            +            'PRIMES',
            +            'PRECOMP',
            +            'POINTER_REF',
            +            'POINTER',
            +            'PLATFORM',
            +            'PLAIN_TEXT_FILE',
            +            'PATH_NAME',
            +            'PART_SORTED_TWO_WAY_LIST',
            +            'PART_SORTED_SET',
            +            'PART_SORTED_LIST',
            +            'PART_COMPARABLE',
            +            'OPERATING_ENVIRONMENT',
            +            'ONCE_CONTROL',
            +            'OBJECT_OWNER',
            +            'OBJECT_CONTROL',
            +            'NUMERIC',
            +            'NONE',
            +            'MUTEX',
            +            'MULTI_ARRAY_LIST',
            +            'MULTAR_LIST_CURSOR',
            +            'MEMORY',
            +            'MEM_INFO',
            +            'MEM_CONST',
            +            'MATH_CONST',
            +            'LIST',
            +            'LINKED_TREE_CURSOR',
            +            'LINKED_TREE',
            +            'LINKED_STACK',
            +            'LINKED_SET',
            +            'LINKED_QUEUE',
            +            'LINKED_PRIORITY_QUEUE',
            +            'LINKED_LIST_CURSOR',
            +            'LINKED_LIST',
            +            'LINKED_CURSOR_TREE',
            +            'LINKED_CIRCULAR',
            +            'LINKABLE',
            +            'LINEAR_ITERATOR',
            +            'LINEAR',
            +            'ITERATOR',
            +            'IO_MEDIUM',
            +            'INTERNAL',
            +            'INTEGER_REF',
            +            'INTEGER_INTERVAL',
            +            'INTEGER',
            +            'INFINITE',
            +            'INDEXABLE',
            +            'IDENTIFIED_CONTROLLER',
            +            'IDENTIFIED',
            +            'HIERARCHICAL',
            +            'HEAP_PRIORITY_QUEUE',
            +            'HASHABLE',
            +            'HASH_TABLE_CURSOR',
            +            'HASH_TABLE',
            +            'GENERAL',
            +            'GC_INFO',
            +            'FUNCTION',
            +            'FORMAT_INTEGER',
            +            'FORMAT_DOUBLE',
            +            'FIXED_TREE',
            +            'FIXED_LIST',
            +            'FIXED',
            +            'FINITE',
            +            'FILE_NAME',
            +            'FILE',
            +            'FIBONACCI',
            +            'EXECUTION_ENVIRONMENT',
            +            'EXCEPTIONS',
            +            'EXCEP_CONST',
            +            'DYNAMIC_TREE',
            +            'DYNAMIC_LIST',
            +            'DYNAMIC_CIRCULAR',
            +            'DYNAMIC_CHAIN',
            +            'DOUBLE_REF',
            +            'DOUBLE_MATH',
            +            'DOUBLE',
            +            'DISPENSER',
            +            'DIRECTORY_NAME',
            +            'DIRECTORY',
            +            'DECLARATOR',
            +            'DEBUG_OUTPUT',
            +            'CURSOR_TREE_ITERATOR',
            +            'CURSOR_TREE',
            +            'CURSOR_STRUCTURE',
            +            'CURSOR',
            +            'COUNTABLE_SEQUENCE',
            +            'COUNTABLE',
            +            'CONTAINER',
            +            'CONSOLE',
            +            'CONDITION_VARIABLE',
            +            'COMPARABLE_STRUCT',
            +            'COMPARABLE_SET',
            +            'COMPARABLE',
            +            'COMPACT_TREE_CURSOR',
            +            'COMPACT_CURSOR_TREE',
            +            'COLLECTION',
            +            'CIRCULAR_CURSOR',
            +            'CIRCULAR',
            +            'CHARACTER_REF',
            +            'CHARACTER',
            +            'CHAIN',
            +            'CELL',
            +            'BOX',
            +            'BOUNDED_STACK',
            +            'BOUNDED_QUEUE',
            +            'BOUNDED',
            +            'BOOLEAN_REF',
            +            'BOOLEAN',
            +            'BOOL_STRING',
            +            'BIT_REF',
            +            'BINARY_TREE',
            +            'BINARY_SEARCH_TREE_SET',
            +            'BINARY_SEARCH_TREE',
            +            'BILINEAR',
            +            'BI_LINKABLE',
            +            'BASIC_ROUTINES',
            +            'BAG',
            +            'ASCII',
            +            'ARRAYED_TREE',
            +            'ARRAYED_STACK',
            +            'ARRAYED_QUEUE',
            +            'ARRAYED_LIST_CURSOR',
            +            'ARRAYED_LIST',
            +            'ARRAYED_CIRCULAR',
            +            'ARRAY2',
            +            'ARRAY',
            +            'ARGUMENTS',
            +            'ANY',
            +            'ACTIVE'
            +            ),
            +        5 => array(
            +            'yes',
            +            'visible',
            +            'trace',
            +            'system',
            +            'root',
            +            'profile',
            +            'override_cluster',
            +            'object',
            +            'no',
            +            'multithreaded',
            +            'msil_generation_type',
            +            'line_generation',
            +            'library',
            +            'inlining_size',
            +            'inlining',
            +            'include_path',
            +            'il_verifiable',
            +            'exclude',
            +            'exception_trace',
            +            'dynamic_runtime',
            +            'dotnet_naming_convention',
            +            'disabled_debug',
            +            'default',
            +            'debug',
            +            'dead_code_removal',
            +            'console_application',
            +            'cluster',
            +            'cls_compliant',
            +            'check_vape',
            +            'assertion',
            +            'array_optimization',
            +            'all',
            +            'address_expression'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '+', '-', '*', '?', '=', '/', '%', '&', '>', '<', '^', '!', '|', ':',
            +        '(', ')', '{', '}', '[', ']', '#'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => true,
            +        5 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0600FF; font-weight: bold;',
            +            2 => 'color: #0600FF; font-weight: bold;',
            +            3 => 'color: #800080;',
            +            4 => 'color: #800000',
            +            5 => 'color: #603000;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #008000; font-style: italic;',
            +            'MULTI' => ''
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #005070; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #FF0000;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #0080A0;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #FF0000;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #000060;',
            +            2 => 'color: #000050;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #600000;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => 'http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+{FNAMEL}&btnI=I%27m+Feeling+Lucky',
            +        5 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/email.php b/vendor/easybook/geshi/geshi/email.php
            new file mode 100644
            index 0000000000..4d26c4f95c
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/email.php
            @@ -0,0 +1,221 @@
            + 'eMail (mbox)',
            +    'COMMENT_SINGLE' => array(),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'HTTP', 'SMTP', 'ASMTP', 'ESMTP'
            +            ),
            +        2 => array(
            +            'Authentication-Results','Comment','Content-Description','Content-Type',
            +            'Content-Disposition','Content-Transfer-Encoding','Delivered-To',
            +            'Dkim-Signature','Domainkey-Signature','In-Reply-To','Message-Id',
            +            'MIME-Version','OpenPGP','Received','Received-SPF','References',
            +            'Reply-To', 'Resend-From','Resend-To','Return-Path','User-Agent'
            +            ),
            +        3 => array(
            +            'Date','From','Sender','Subject','To','CC'
            +            ),
            +        4 => array(
            +            'by', 'for', 'from', 'id', 'with'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        ':', ';', '<', '>', '[', ']'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => false,
            +        3 => false,
            +        4 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0000FF; font-weight: bold;',
            +            2 => 'color: #000000; font-weight: bold;',
            +            3 => 'color: #800000; font-weight: bold;',
            +            4 => 'font-weight: bold;',
            +            ),
            +        'COMMENTS' => array(
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'SCRIPT' => array(
            +            0 => 'color: #000040;',
            +            ),
            +        'REGEXPS' => array(
            +            1 => 'color: #000000; font-weight: bold;',
            +            2 => 'color: #0000FF;',
            +            3 => 'color: #008000;',
            +            4 => 'color: #0000FF; font-weight: bold;',
            +            5 => 'font-weight: bold;',
            +            6 => 'color: #400080;'
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        // Non-Standard-Header
            +        1 => array(
            +            GESHI_SEARCH => "(?<=\A\x20|\n)x-[a-z0-9\-]*(?=\s*:|\s*<)",
            +            GESHI_REPLACE => "\\0",
            +            GESHI_MODIFIERS => "smi",
            +            GESHI_BEFORE => "",
            +            GESHI_AFTER => ""
            +            ),
            +        //Email-Adresses or Mail-IDs
            +        2 => array(
            +            GESHI_SEARCH => "\b(?\"?)[\w\.\-]+\k@(?!-)[\w\-]+(? "\\0",
            +            GESHI_MODIFIERS => "mi",
            +            GESHI_BEFORE => "",
            +            GESHI_AFTER => ""
            +            ),
            +        //Date values in RFC format
            +        3 => array(
            +            GESHI_SEARCH => "\b(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s+\d\d?\s+" .
            +                "(?:Jan|Feb|Mar|apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s+" .
            +                "\d{4}\s+\d\d?:\d\d:\d\d\s+[+\-]\d{4}(?:\s+\(\w+\))?",
            +            GESHI_REPLACE => "\\0",
            +            GESHI_MODIFIERS => "mi",
            +            GESHI_BEFORE => "",
            +            GESHI_AFTER => ""
            +            ),
            +        //IP addresses
            +        4 => array(
            +            GESHI_SEARCH => "(?<=\s)\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(?=\s)|".
            +                "(?<=\[)\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(?=\])|".
            +                "(?<==)\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(?=<)|".
            +
            +                "(?<=\s)(?:[a-f\d]{1,4}\:)+(?:[a-f\d]{0,4})?(?:\:[a-f\d]{1,4})+(?=\s)|".
            +                "(?<=\[)(?:[a-f\d]{1,4}\:)+(?:[a-f\d]{0,4})?(?:\:[a-f\d]{1,4})+(?=\])|".
            +                "(?<==)(?:[a-f\d]{1,4}\:)+(?:[a-f\d]{0,4})?(?:\:[a-f\d]{1,4})+(?=<)|".
            +
            +                "(?<=\s)\:(?:\:[a-f\d]{1,4})+(?=\s)|".
            +                "(?<=\[)\:(?:\:[a-f\d]{1,4})+(?=\])|".
            +                "(?<==)\:(?:\:[a-f\d]{1,4})+(?=<)|".
            +
            +                "(?<=\s)(?:[a-f\d]{1,4}\:)+\:(?=\s)|".
            +                "(?<=\[)(?:[a-f\d]{1,4}\:)+\:(?=\])|".
            +                "(?<==)(?:[a-f\d]{1,4}\:)+\:(?=<)",
            +            GESHI_REPLACE => "\\0",
            +            GESHI_MODIFIERS => "i",
            +            GESHI_BEFORE => "",
            +            GESHI_AFTER => ""
            +            ),
            +        //Field-Assignments
            +        5 => array(
            +            GESHI_SEARCH => "(?<=\s)[A-Z0-9\-\.]+(?==(?:$|\s$|[^\s=]))",
            +            GESHI_REPLACE => "\\0",
            +            GESHI_MODIFIERS => "mi",
            +            GESHI_BEFORE => "",
            +            GESHI_AFTER => ""
            +            ),
            +        //MIME type
            +        6 => array(
            +            GESHI_SEARCH => "(?<=\s)(?:audio|application|image|multipart|text|".
            +                "video|x-[a-z0-9\-]+)\/[a-z0-9][a-z0-9\-]*(?=\s|<|$)",
            +            GESHI_REPLACE => "\\0",
            +            GESHI_MODIFIERS => "m",
            +            GESHI_BEFORE => "",
            +            GESHI_AFTER => ""
            +            )
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_ALWAYS,
            +    'SCRIPT_DELIMITERS' => array(
            +        0 => "/(?P^)[A-Za-z][a-zA-Z0-9\-]*\s*:\s*(?:.|(?=\n\s)\n)*(?P$)/m"
            +    ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        0 => true,
            +        ),
            +    'TAB_WIDTH' => 4,
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            2 => array(
            +                'DISALLOWED_BEFORE' => '(?<=\A\x20|\n)',
            +                'DISALLOWED_AFTER' => '(?=\s*:)',
            +            ),
            +            3 => array(
            +                'DISALLOWED_BEFORE' => '(?<=\A\x20|\n)',
            +                'DISALLOWED_AFTER' => '(?=\s*:)',
            +            ),
            +            4 => array(
            +                'DISALLOWED_BEFORE' => '(?<=\s)',
            +                'DISALLOWED_AFTER' => '(?=\s|\b)',
            +            )
            +        ),
            +        'ENABLE_FLAGS' => array(
            +            'BRACKETS' => GESHI_NEVER,
            +            'COMMENTS' => GESHI_NEVER,
            +            'NUMBERS' => GESHI_NEVER
            +        )
            +    )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/epc.php b/vendor/easybook/geshi/geshi/epc.php
            new file mode 100644
            index 0000000000..6519943a9e
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/epc.php
            @@ -0,0 +1,153 @@
            + 'EPC',
            +    'COMMENT_SINGLE' => array('//'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(
            +        //[Sections]
            +        //1 => "/^\\[.*\\]/"
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array(
            +        0 => '"',
            +        1 => '$'
            +        ),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'if', 'then', 'else', 'endif',
            +            'and', 'or', 'xor', 'hysteresis'
            +            ),
            +        2 => array(
            +            'read', 'write', 'event',
            +            'gettime', 'settime', 'getdate', 'setdate', 'gettimedate', 'settimedate',
            +            'hour', 'minute', 'second', 'changehour', 'changeminute', 'changesecond',
            +            'date', 'month', 'day', 'dayofweek', 'sun', 'azimuth', 'elevation',
            +            'sunrisehour', 'sunriseminute', 'sunsethour', 'sunsetminute',
            +            'wtime', 'htime', 'mtime', 'stime',
            +            'cwtime', 'chtime', 'cmtime', 'cstime',
            +            'delay', 'after', 'cycle',
            +            'readflash', 'writeflash',
            +            'abs', 'acos', 'asin', 'atan', 'cos', 'ceil', 'average', 'exp', 'floor',
            +            'log', 'max', 'min', 'mod', 'pow', 'sqrt', 'sin', 'tan', 'change', 'convert',
            +            'eval', 'systemstart', 'random', 'comobject', 'sleep', 'scene', 'storescene', 'callscene',
            +            'find', 'stringcast', 'stringset', 'stringformat', 'split', 'size',
            +            'readrs232'. 'sendrs232', 'address', 'readknx',
            +            'readudp', 'sendudp', 'connecttcp', 'closetcp', 'readtcp', 'sendtcp',
            +            'resolve', 'sendmail',
            +            'button', 'webbutton', 'chart', 'webchart', 'webdisplay', 'getslider', 'pshifter', 'mpshifter',
            +            'getpslider', 'mbutton', 'mbbutton', 'mchart', 'mpchart', 'mpbutton', 'pdisplay', 'pchart',
            +            'pbutton', 'setslider', 'setpslider', 'slider', 'pslider', 'page', 'line', 'header',
            +            'footer', 'none', 'plink', 'link', 'frame', 'dframe'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        0 => array(
            +            '%', 'b01',
            +            ),
            +        1 => array(
            +            '+', '-', '==', '>=', '=<',
            +            ),
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #e63ec3;',
            +            2 => 'color: #e63ec3;'
            +            ),
            +        'COMMENTS' => array(
            +            0 => 'color: #0000ff;'
            +            //1 => 'color: #ffa500;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            1 => 'color: #000099;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #8a0808;',
            +            1 => 'color: #6e6e6e;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #0b610b;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #0b610b;',
            +            1 => 'color: #e63ec3;'
            +            ),
            +        'REGEXPS' => array(
            +            1 => 'color: #0b610b;'
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        // Numbers, e.g. 255u08
            +        1 => "[0-9]*[subf][0136][12468]"
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4,
            +    'PARSER_CONTROL' => array(
            +        'COMMENTS' => array(
            +            'DISALLOWED_BEFORE' => '$'
            +        ),
            +        'KEYWORDS' => array(
            +            'DISALLOWED_BEFORE' => "(?  "(?![\.\-a-zA-Z0-9_%=\\/])"
            +        )
            +    )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/erlang.php b/vendor/easybook/geshi/geshi/erlang.php
            new file mode 100644
            index 0000000000..d9e2e7ee4a
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/erlang.php
            @@ -0,0 +1,440 @@
            +'
            + *
            + *************************************************************************************
            + *
            + *     This file is part of GeSHi.
            + *
            + *   GeSHi is free software; you can redistribute it and/or modify
            + *   it under the terms of the GNU General Public License as published by
            + *   the Free Software Foundation; either version 2 of the License, or
            + *   (at your option) any later version.
            + *
            + *   GeSHi is distributed in the hope that it will be useful,
            + *   but WITHOUT ANY WARRANTY; without even the implied warranty of
            + *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
            + *   GNU General Public License for more details.
            + *
            + *   You should have received a copy of the GNU General Public License
            + *   along with GeSHi; if not, write to the Free Software
            + *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
            + *
            + ************************************************************************************/
            +
            +$language_data = array(
            +    'LANG_NAME' => 'Erlang',
            +    'COMMENT_SINGLE' => array(1 => '%'),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'HARDQUOTE' => array("'", "'"),
            +    'HARDESCAPE' => array("'", "\\"),
            +    'HARDCHAR' => "\\",
            +    'ESCAPE_CHAR' => '\\',
            +    'NUMBERS' => GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_FLT_SCI_ZERO,
            +    'KEYWORDS' => array(
            +        //Control flow keywrods
            +        1 => array(
            +            'after', 'andalso', 'begin', 'case', 'catch', 'end', 'fun', 'if',
            +            'of', 'orelse', 'receive', 'try', 'when', 'query'
            +            ),
            +        //Binary operators
            +        2 => array(
            +            'and', 'band', 'bnot', 'bor', 'bsl', 'bsr', 'bxor', 'div', 'not',
            +            'or', 'rem', 'xor'
            +            ),
            +        3 => array(
            +            'abs', 'alive', 'apply', 'atom_to_list', 'binary_to_list',
            +            'binary_to_term', 'concat_binary', 'date', 'disconnect_node',
            +            'element', 'erase', 'exit', 'float', 'float_to_list', 'get',
            +            'get_keys', 'group_leader', 'halt', 'hd', 'integer_to_list',
            +            'is_alive', 'length', 'link', 'list_to_atom', 'list_to_binary',
            +            'list_to_float', 'list_to_integer', 'list_to_pid', 'list_to_tuple',
            +            'load_module', 'make_ref', 'monitor_node', 'node', 'nodes', 'now',
            +            'open_port', 'pid_to_list', 'process_flag', 'process_info',
            +            'process', 'put', 'register', 'registered', 'round', 'self',
            +            'setelement', 'size', 'spawn', 'spawn_link', 'split_binary',
            +            'statistics', 'term_to_binary', 'throw', 'time', 'tl', 'trunc',
            +            'tuple_to_list', 'unlink', 'unregister', 'whereis'
            +            ),
            +        // Built-In Functions
            +        4 => array(
            +            'atom', 'binary', 'constant', 'function', 'integer', 'is_atom',
            +            'is_binary', 'is_constant', 'is_function', 'is_integer', 'is_list',
            +            'is_number', 'is_pid', 'is_reference', 'is_record', 'list',
            +            'number', 'pid', 'ports', 'port_close', 'port_info', 'reference'
            +            ),
            +        // Erlang/OTP internal modules (scary one)
            +        5 => array(
            +            'alarm_handler', 'any', 'app', 'application', 'appmon', 'appup',
            +            'array', 'asn1ct', 'asn1rt', 'auth', 'base64', 'beam_lib', 'c',
            +            'calendar', 'code', 'common_test_app', 'compile', 'config',
            +            'corba', 'corba_object', 'cosEventApp', 'CosEventChannelAdmin',
            +            'CosEventChannelAdmin_ConsumerAdmin',
            +            'CosEventChannelAdmin_EventChannel',
            +            'CosEventChannelAdmin_ProxyPullConsumer',
            +            'CosEventChannelAdmin_ProxyPullSupplier',
            +            'CosEventChannelAdmin_ProxyPushConsumer',
            +            'CosEventChannelAdmin_ProxyPushSupplier',
            +            'CosEventChannelAdmin_SupplierAdmin', 'CosEventDomainAdmin',
            +            'CosEventDomainAdmin_EventDomain',
            +            'CosEventDomainAdmin_EventDomainFactory',
            +            'cosEventDomainApp', 'CosFileTransfer_Directory',
            +            'CosFileTransfer_File', 'CosFileTransfer_FileIterator',
            +            'CosFileTransfer_FileTransferSession',
            +            'CosFileTransfer_VirtualFileSystem',
            +            'cosFileTransferApp', 'CosNaming', 'CosNaming_BindingIterator',
            +            'CosNaming_NamingContext', 'CosNaming_NamingContextExt',
            +            'CosNotification', 'CosNotification_AdminPropertiesAdmin',
            +            'CosNotification_QoSAdmin', 'cosNotificationApp',
            +            'CosNotifyChannelAdmin_ConsumerAdmin',
            +            'CosNotifyChannelAdmin_EventChannel',
            +            'CosNotifyChannelAdmin_EventChannelFactory',
            +            'CosNotifyChannelAdmin_ProxyConsumer',
            +            'CosNotifyChannelAdmin_ProxyPullConsumer',
            +            'CosNotifyChannelAdmin_ProxyPullSupplier',
            +            'CosNotifyChannelAdmin_ProxyPushConsumer',
            +            'CosNotifyChannelAdmin_ProxyPushSupplier',
            +            'CosNotifyChannelAdmin_ProxySupplier',
            +            'CosNotifyChannelAdmin_SequenceProxyPullConsumer',
            +            'CosNotifyChannelAdmin_SequenceProxyPullSupplier',
            +            'CosNotifyChannelAdmin_SequenceProxyPushConsumer',
            +            'CosNotifyChannelAdmin_SequenceProxyPushSupplier',
            +            'CosNotifyChannelAdmin_StructuredProxyPullConsumer',
            +            'CosNotifyChannelAdmin_StructuredProxyPullSupplier',
            +            'CosNotifyChannelAdmin_StructuredProxyPushConsumer',
            +            'CosNotifyChannelAdmin_StructuredProxyPushSupplier',
            +            'CosNotifyChannelAdmin_SupplierAdmin',
            +            'CosNotifyComm_NotifyPublish', 'CosNotifyComm_NotifySubscribe',
            +            'CosNotifyFilter_Filter', 'CosNotifyFilter_FilterAdmin',
            +            'CosNotifyFilter_FilterFactory', 'CosNotifyFilter_MappingFilter',
            +            'cosProperty', 'CosPropertyService_PropertiesIterator',
            +            'CosPropertyService_PropertyNamesIterator',
            +            'CosPropertyService_PropertySet',
            +            'CosPropertyService_PropertySetDef',
            +            'CosPropertyService_PropertySetDefFactory',
            +            'CosPropertyService_PropertySetFactory', 'cosTime',
            +            'CosTime_TimeService', 'CosTime_TIO', 'CosTime_UTO',
            +            'CosTimerEvent_TimerEventHandler',
            +            'CosTimerEvent_TimerEventService', 'cosTransactions',
            +            'CosTransactions_Control', 'CosTransactions_Coordinator',
            +            'CosTransactions_RecoveryCoordinator', 'CosTransactions_Resource',
            +            'CosTransactions_SubtransactionAwareResource',
            +            'CosTransactions_Terminator', 'CosTransactions_TransactionFactory',
            +            'cover', 'cprof', 'cpu_sup', 'crashdump', 'crypto', 'crypto_app',
            +            'ct', 'ct_cover', 'ct_ftp', 'ct_master', 'ct_rpc', 'ct_snmp',
            +            'ct_ssh', 'ct_telnet', 'dbg', 'debugger', 'dets', 'dialyzer',
            +            'dict', 'digraph', 'digraph_utils', 'disk_log', 'disksup',
            +            'docb_gen', 'docb_transform', 'docb_xml_check', 'docbuilder_app',
            +            'driver_entry', 'edoc', 'edoc_doclet', 'edoc_extract',
            +            'edoc_layout', 'edoc_lib', 'edoc_run', 'egd', 'ei', 'ei_connect',
            +            'epmd', 'epp', 'epp_dodger', 'eprof', 'erl', 'erl_boot_server',
            +            'erl_call', 'erl_comment_scan', 'erl_connect', 'erl_ddll',
            +            'erl_driver', 'erl_error', 'erl_eterm', 'erl_eval',
            +            'erl_expand_records', 'erl_format', 'erl_global', 'erl_id_trans',
            +            'erl_internal', 'erl_lint', 'erl_malloc', 'erl_marshal',
            +            'erl_parse', 'erl_pp', 'erl_prettypr', 'erl_prim_loader',
            +            'erl_prim_loader_stub', 'erl_recomment', 'erl_scan',
            +            'erl_set_memory_block', 'erl_syntax', 'erl_syntax_lib', 'erl_tar',
            +            'erl_tidy', 'erlang', 'erlang_mode', 'erlang_stub', 'erlc',
            +            'erlsrv', 'error_handler', 'error_logger', 'erts_alloc',
            +            'erts_alloc_config', 'escript', 'et', 'et_collector',
            +            'et_selector', 'et_viewer', 'etop', 'ets', 'eunit', 'file',
            +            'file_sorter', 'filelib', 'filename', 'fixed', 'fprof', 'ftp',
            +            'gb_sets', 'gb_trees', 'gen_event', 'gen_fsm', 'gen_sctp',
            +            'gen_server', 'gen_tcp', 'gen_udp', 'gl', 'global', 'global_group',
            +            'glu', 'gs', 'heart', 'http', 'httpd', 'httpd_conf',
            +            'httpd_socket', 'httpd_util', 'i', 'ic', 'ic_c_protocol',
            +            'ic_clib', 'igor', 'inet', 'inets', 'init', 'init_stub',
            +            'instrument', 'int', 'interceptors', 'inviso', 'inviso_as_lib',
            +            'inviso_lfm', 'inviso_lfm_tpfreader', 'inviso_rt',
            +            'inviso_rt_meta', 'io', 'io_lib', 'kernel_app', 'lib', 'lists',
            +            'lname', 'lname_component', 'log_mf_h', 'make', 'math', 'megaco',
            +            'megaco_codec_meas', 'megaco_codec_transform',
            +            'megaco_edist_compress', 'megaco_encoder', 'megaco_flex_scanner',
            +            'megaco_tcp', 'megaco_transport', 'megaco_udp', 'megaco_user',
            +            'memsup', 'mnesia', 'mnesia_frag_hash', 'mnesia_registry',
            +            'mod_alias', 'mod_auth', 'mod_esi', 'mod_security',
            +            'Module_Interface', 'ms_transform', 'net_adm', 'net_kernel',
            +            'new_ssl', 'nteventlog', 'observer_app', 'odbc', 'orber',
            +            'orber_acl', 'orber_diagnostics', 'orber_ifr', 'orber_tc',
            +            'orddict', 'ordsets', 'os', 'os_mon', 'os_mon_mib', 'os_sup',
            +            'otp_mib', 'overload', 'packages', 'percept', 'percept_profile',
            +            'pg', 'pg2', 'pman', 'pool', 'prettypr', 'proc_lib', 'proplists',
            +            'public_key', 'qlc', 'queue', 'random', 'rb', 're', 'regexp',
            +            'registry', 'rel', 'release_handler', 'reltool', 'relup', 'rpc',
            +            'run_erl', 'run_test', 'runtime_tools_app', 'sasl_app', 'script',
            +            'seq_trace', 'sets', 'shell', 'shell_default', 'slave', 'snmp',
            +            'snmp_app', 'snmp_community_mib', 'snmp_framework_mib',
            +            'snmp_generic', 'snmp_index', 'snmp_notification_mib', 'snmp_pdus',
            +            'snmp_standard_mib', 'snmp_target_mib', 'snmp_user_based_sm_mib',
            +            'snmp_view_based_acm_mib', 'snmpa', 'snmpa_conf', 'snmpa_error',
            +            'snmpa_error_io', 'snmpa_error_logger', 'snmpa_error_report',
            +            'snmpa_local_db', 'snmpa_mpd', 'snmpa_network_interface',
            +            'snmpa_network_interface_filter',
            +            'snmpa_notification_delivery_info_receiver',
            +            'snmpa_notification_filter', 'snmpa_supervisor', 'snmpc', 'snmpm',
            +            'snmpm_conf', 'snmpm_mpd', 'snmpm_network_interface', 'snmpm_user',
            +            'sofs', 'ssh', 'ssh_channel', 'ssh_connection', 'ssh_sftp',
            +            'ssh_sftpd', 'ssl', 'ssl_app', 'ssl_pkix', 'start', 'start_erl',
            +            'start_webtool', 'stdlib_app', 'string', 'supervisor',
            +            'supervisor_bridge', 'sys', 'systools', 'tags', 'test_server',
            +            'test_server_app', 'test_server_ctrl', 'tftp', 'timer', 'toolbar',
            +            'ttb', 'tv', 'unicode', 'unix_telnet', 'user', 'webtool', 'werl',
            +            'win32reg', 'wrap_log_reader', 'wx', 'wx_misc', 'wx_object',
            +            'wxAcceleratorEntry', 'wxAcceleratorTable', 'wxArtProvider',
            +            'wxAuiDockArt', 'wxAuiManager', 'wxAuiNotebook', 'wxAuiPaneInfo',
            +            'wxAuiTabArt', 'wxBitmap', 'wxBitmapButton', 'wxBitmapDataObject',
            +            'wxBoxSizer', 'wxBrush', 'wxBufferedDC', 'wxBufferedPaintDC',
            +            'wxButton', 'wxCalendarCtrl', 'wxCalendarDateAttr',
            +            'wxCalendarEvent', 'wxCaret', 'wxCheckBox', 'wxCheckListBox',
            +            'wxChildFocusEvent', 'wxChoice', 'wxClientDC', 'wxClipboard',
            +            'wxCloseEvent', 'wxColourData', 'wxColourDialog',
            +            'wxColourPickerCtrl', 'wxColourPickerEvent', 'wxComboBox',
            +            'wxCommandEvent', 'wxContextMenuEvent', 'wxControl',
            +            'wxControlWithItems', 'wxCursor', 'wxDataObject', 'wxDateEvent',
            +            'wxDatePickerCtrl', 'wxDC', 'wxDialog', 'wxDirDialog',
            +            'wxDirPickerCtrl', 'wxDisplayChangedEvent', 'wxEraseEvent',
            +            'wxEvent', 'wxEvtHandler', 'wxFileDataObject', 'wxFileDialog',
            +            'wxFileDirPickerEvent', 'wxFilePickerCtrl', 'wxFindReplaceData',
            +            'wxFindReplaceDialog', 'wxFlexGridSizer', 'wxFocusEvent', 'wxFont',
            +            'wxFontData', 'wxFontDialog', 'wxFontPickerCtrl',
            +            'wxFontPickerEvent', 'wxFrame', 'wxGauge', 'wxGBSizerItem',
            +            'wxGenericDirCtrl', 'wxGLCanvas', 'wxGraphicsBrush',
            +            'wxGraphicsContext', 'wxGraphicsFont', 'wxGraphicsMatrix',
            +            'wxGraphicsObject', 'wxGraphicsPath', 'wxGraphicsPen',
            +            'wxGraphicsRenderer', 'wxGrid', 'wxGridBagSizer', 'wxGridCellAttr',
            +            'wxGridCellEditor', 'wxGridCellRenderer', 'wxGridEvent',
            +            'wxGridSizer', 'wxHelpEvent', 'wxHtmlEasyPrinting', 'wxIcon',
            +            'wxIconBundle', 'wxIconizeEvent', 'wxIdleEvent', 'wxImage',
            +            'wxImageList', 'wxJoystickEvent', 'wxKeyEvent',
            +            'wxLayoutAlgorithm', 'wxListBox', 'wxListCtrl', 'wxListEvent',
            +            'wxListItem', 'wxListView', 'wxMask', 'wxMaximizeEvent',
            +            'wxMDIChildFrame', 'wxMDIClientWindow', 'wxMDIParentFrame',
            +            'wxMemoryDC', 'wxMenu', 'wxMenuBar', 'wxMenuEvent', 'wxMenuItem',
            +            'wxMessageDialog', 'wxMiniFrame', 'wxMirrorDC',
            +            'wxMouseCaptureChangedEvent', 'wxMouseEvent', 'wxMoveEvent',
            +            'wxMultiChoiceDialog', 'wxNavigationKeyEvent', 'wxNcPaintEvent',
            +            'wxNotebook', 'wxNotebookEvent', 'wxNotifyEvent',
            +            'wxPageSetupDialog', 'wxPageSetupDialogData', 'wxPaintDC',
            +            'wxPaintEvent', 'wxPalette', 'wxPaletteChangedEvent', 'wxPanel',
            +            'wxPasswordEntryDialog', 'wxPen', 'wxPickerBase', 'wxPostScriptDC',
            +            'wxPreviewCanvas', 'wxPreviewControlBar', 'wxPreviewFrame',
            +            'wxPrintData', 'wxPrintDialog', 'wxPrintDialogData', 'wxPrinter',
            +            'wxPrintout', 'wxPrintPreview', 'wxProgressDialog',
            +            'wxQueryNewPaletteEvent', 'wxRadioBox', 'wxRadioButton',
            +            'wxRegion', 'wxSashEvent', 'wxSashLayoutWindow', 'wxSashWindow',
            +            'wxScreenDC', 'wxScrollBar', 'wxScrolledWindow', 'wxScrollEvent',
            +            'wxScrollWinEvent', 'wxSetCursorEvent', 'wxShowEvent',
            +            'wxSingleChoiceDialog', 'wxSizeEvent', 'wxSizer', 'wxSizerFlags',
            +            'wxSizerItem', 'wxSlider', 'wxSpinButton', 'wxSpinCtrl',
            +            'wxSpinEvent', 'wxSplashScreen', 'wxSplitterEvent',
            +            'wxSplitterWindow', 'wxStaticBitmap', 'wxStaticBox',
            +            'wxStaticBoxSizer', 'wxStaticLine', 'wxStaticText', 'wxStatusBar',
            +            'wxStdDialogButtonSizer', 'wxStyledTextCtrl', 'wxStyledTextEvent',
            +            'wxSysColourChangedEvent', 'wxTextAttr', 'wxTextCtrl',
            +            'wxTextDataObject', 'wxTextEntryDialog', 'wxToggleButton',
            +            'wxToolBar', 'wxToolTip', 'wxTopLevelWindow', 'wxTreeCtrl',
            +            'wxTreeEvent', 'wxUpdateUIEvent', 'wxWindow', 'wxWindowCreateEvent',
            +            'wxWindowDC', 'wxWindowDestroyEvent', 'wxXmlResource', 'xmerl',
            +            'xmerl_eventp', 'xmerl_scan', 'xmerl_xpath', 'xmerl_xs',
            +            'xmerl_xsd', 'xref', 'yecc', 'zip', 'zlib', 'zlib_stub'
            +            ),
            +        // Binary modifiers
            +        6 => array(
            +            'big', 'binary', 'float', 'integer', 'little', 'signed', 'unit', 'unsigned'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        0 => array('(', ')', '[', ']', '{', '}'),
            +        1 => array('->', ',', ';', '.'),
            +        2 => array('<<', '>>'),
            +        3 => array('=', '||', '-', '+', '*', '/', '++', '--', '!', '<', '>', '>=',
            +                    '=<', '==', '/=', '=:=', '=/=')
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        5 => true,
            +        6 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #186895;',
            +            2 => 'color: #014ea4;',
            +            3 => 'color: #fa6fff;',
            +            4 => 'color: #fa6fff;',
            +            5 => 'color: #ff4e18;',
            +            6 => 'color: #9d4f37;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; font-style: italic;',
            +            'MULTI' => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;',
            +            'HARD' => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #109ab8;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff7800;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #ff9600;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #006600;',
            +            2 => 'color: #006600;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #004866;',
            +            1 => 'color: #6bb810;',
            +            2 => 'color: #ee3800;',
            +            3 => 'color: #014ea4;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #6941fd;',
            +            1 => 'color: #d400ed;',
            +            2 => 'color: #5400b3;',
            +            3 => 'color: #ff3c00;',
            +            4 => 'color: #6941fd;',
            +            5 => 'color: #45b3e6;',
            +            6 => 'color: #ff9600;',
            +            7 => 'color: #d400ed;',
            +            8 => 'color: #ff9600;'
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => 'http://erlang.org/doc/man/{FNAME}.html',
            +        6 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '->',
            +        2 => ':'
            +        ),
            +    'REGEXPS' => array(
            +        //�Macro definitions
            +        0 => array(
            +            GESHI_SEARCH => '(-define\s*\()([a-zA-Z0-9_]+)(\(|,)',
            +            GESHI_REPLACE => '\2',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\1',
            +            GESHI_AFTER => '\3'
            +            ),
            +        // Record definitions
            +        1 => array(
            +            GESHI_SEARCH => '(-record\s*\()([a-zA-Z0-9_]+)(,)',
            +            GESHI_REPLACE => '\2',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\1',
            +            GESHI_AFTER => '\3'
            +            ),
            +        // Precompiler directives
            +        2 => array(
            +            GESHI_SEARCH => '(-)([a-z][a-zA-Z0-9_]*)(\()',
            +            GESHI_REPLACE => '\2',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\1',
            +            GESHI_AFTER => '\3'
            +            ),
            +        // Functions
            +        3 => array(
            +            GESHI_SEARCH => '([a-z]\w*|\'\w*\')(\s*\()',
            +            GESHI_REPLACE => '\1',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => '\2'
            +            ),
            +        // Macros
            +        4 => array(
            +            GESHI_SEARCH => '(\?)([a-zA-Z0-9_]+)',
            +            GESHI_REPLACE => '\2',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\1',
            +            GESHI_AFTER => ''
            +            ),
            +        // Variables - With hack to avoid interfering wish GeSHi internals
            +        5 => array(
            +            GESHI_SEARCH => '([([{,<+*-\/=\s!]|<)(?!(?:PIPE|SEMI|DOT|NUM|REG3XP\d*)\W)([A-Z_]\w*)(?!\w)',
            +            GESHI_REPLACE => '\2',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\1',
            +            GESHI_AFTER => ''
            +            ),
            +        // ASCII�codes
            +        6 => '(\$[a-zA-Z0-9_])',
            +        // Records
            +        7 => array(
            +            GESHI_SEARCH => '(#)([a-z][a-zA-Z0-9_]*)(\.|\{)',
            +            GESHI_REPLACE => '\2',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\1',
            +            GESHI_AFTER => '\3'
            +            ),
            +        // Numbers with a different radix
            +        8 => '(?<=>)(#[a-zA-Z0-9]*)'
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(),
            +    'TAB_WIDTH' => 4,
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            3 => array(
            +                'DISALLOWED_BEFORE' => '(? ''//'(?=\s*\()'
            +            ),
            +            5 => array(
            +                'DISALLOWED_BEFORE' => '(?<=\'|)',
            +                'DISALLOWED_AFTER' => '(?=(\'|):)'
            +            ),
            +            6 => array(
            +                'DISALLOWED_BEFORE' => '(?<=\/|-)',
            +                'DISALLOWED_AFTER' => ''
            +            )
            +        )
            +    ),
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/euphoria.php b/vendor/easybook/geshi/geshi/euphoria.php
            new file mode 100644
            index 0000000000..3a3cbfca3a
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/euphoria.php
            @@ -0,0 +1,139 @@
            + (1.0.8.9)
            + *  -  First Release
            + *
            + * TODO (updated )
            + * -------------------------
            + * seperate the funtions from the procedures, and have a slight color change for each.
            + *
            + *************************************************************************************
            + *
            + *     This file is part of GeSHi.
            + *
            + *   GeSHi is free software; you can redistribute it and/or modify
            + *   it under the terms of the GNU General Public License as published by
            + *   the Free Software Foundation; either version 2 of the License, or
            + *   (at your option) any later version.
            + *
            + *   GeSHi is distributed in the hope that it will be useful,
            + *   but WITHOUT ANY WARRANTY; without even the implied warranty of
            + *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
            + *   GNU General Public License for more details.
            + *
            + *   You should have received a copy of the GNU General Public License
            + *   along with GeSHi; if not, write to the Free Software
            + *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
            + *
            + ************************************************************************************/
            +
            +$language_data = array (
            +    'LANG_NAME' => 'Euphoria',
            +    'COMMENT_SINGLE' => array(1 => '--'),
            +    'COMMENT_MULTI' => array(), //Euphoria doesn't support multi-line comments
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array( // keywords
            +            'and', 'by', 'constant', 'do', 'else', 'elsif', 'end', 'exit',
            +            'for', 'function', 'global', 'if', 'include', 'not', 'or',
            +            'procedure', 'return', 'then', 'to', 'type', 'while', 'with',
            +            'without', 'xor'
            +            ),
            +        2 => array( // built-ins
            +            'abort', 'and_bits', 'append', 'arctan', 'atom', 'c_func', 'call',
            +            'c_proc', 'call_func', 'call_proc', 'clear_screen', 'close', 'compare',
            +            'command_line', 'cos', 'date', 'equal', 'find', 'find_from', 'floor',
            +            'getc', 'getenv', 'gets', 'get_key', 'get_pixel', 'integer', 'length',
            +            'log', 'machine_func', 'machine_proc', 'match', 'match_from',
            +            'mem_copy', 'mem_set', 'not_bits', 'object', 'open', 'or_bits', 'peek',
            +            'peek4s', 'peek4u', 'pixel', 'platform', 'poke', 'poke4', 'position',
            +            'power', 'prepend', 'print', 'printf', 'profile', 'puts', 'rand',
            +            'remainder', 'repeat', 'routine_id', 'sequence', 'sin', 'sprintf',
            +            'sqrt', 'system', 'system_exec', 'tan', 'task_clock_stop',
            +            'task_clock_start', 'task_create', 'task_list', 'task_schedule',
            +            'task_self', 'task_status', 'task_suspend', 'task_yield', 'time',
            +            'trace', 'xor_bits'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        0 => array(
            +            '(', ')', '{', '}', '[', ']'
            +            ),
            +        1 => array(
            +            '+', '-', '*', '/', '=', '&', '^'
            +            ),
            +        2 => array(
            +            '&', '?', ','
            +            )
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0000ff; font-weight: bold;', // keywords
            +            2 => 'color: #cc33ff; font-weight: bold;', // builtins
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #ff0000; font-style: italic;',
            +            'MULTI' => '' // doesn't exist
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #009900; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #999900; font-weight: bold;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #00cc00;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc33cc; font-style: italic'
            +            ),
            +        'METHODS' => array( // Doesn't exist in Euphoria.  Everything is a function =)
            +            0 => ''
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #999900;', // brackets
            +            1 => 'color: #333333;', // operators
            +            2 => 'color: #333333; font-style: bold' // print+concat
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array( // Never included in scripts.
            +            )
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/ezt.php b/vendor/easybook/geshi/geshi/ezt.php
            new file mode 100644
            index 0000000000..74d8d52045
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/ezt.php
            @@ -0,0 +1,134 @@
            + 'EZT',
            +    'COMMENT_SINGLE' => array(),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_UPPER,
            +    'COMMENT_REGEXP' => array(
            +        // First character of the line is an asterisk. Rest of the line is spaces/null
            +        0 => '/\*(\s|\D)?(\n)/',
            +        // Asterisk followed by any character & then a non numeric character.
            +        // This is to prevent expressions such as 25 * 4 from being marked as a comment
            +        // Note: 25*4 - 100 will mark *4 - 100 as a comment. Pls. space out expressions
            +        // In any case, 25*4 will result in an Easytrieve error
            +        1 => '/\*.([^0-9\n])+.*(\n)/'
            +        ),
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'CONTROL','DEFINE','DISPLAY','DO','ELSE','END-DO','END-IF',
            +            'END-PROC','FILE','GET','GOTO','HEADING','IF','JOB','LINE',
            +            'PARM','PERFORM','POINT','PRINT','PROC','PUT','READ','RECORD',
            +            'REPORT','RETRIEVE','SEARCH','SELECT','SEQUENCE','SORT','STOP',
            +            'TITLE','WRITE'
            +            ),
            +        // Procedure Keywords (Names of specific procedures)
            +        2 => array (
            +            'AFTER-BREAK','AFTER-LINE','BEFORE-BREAK','BEFORE-LINE',
            +            'ENDPAGE','REPORT-INPUT','TERMINATION',
            +            ),
            +        // Macro names, Parameters
            +        3 => array (
            +            'COMPILE','CONCAT','DESC','GETDATE','MASK','PUNCH',
            +            'VALUE','SYNTAX','NEWPAGE','SKIP','COL','TALLY',
            +            'WITH'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(',')','=','&',',','*','>','<','%'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false
            +        //4 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #FF0000;',
            +            2 => 'color: #21A502;',
            +            3 => 'color: #FF00FF;'
            +            ),
            +        'COMMENTS' => array(
            +            0 => 'color: #0000FF; font-style: italic;',
            +            1 => 'color: #0000FF; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => ''
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #FF7400;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #66CC66;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #736205;'
            +            ),
            +        'METHODS' => array(
            +            1 => '',
            +            2 => ''
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #FF7400;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #E01B6A;'
            +            ),
            +        'SCRIPT' => array(
            +            0 => ''
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(),
            +    'REGEXPS' => array(
            +        // We are trying to highlight Macro names here which preceded by %
            +        0 => '(%)([a-zA-Z0-9])+(\s|\n)'
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array()
            +);
            diff --git a/vendor/easybook/geshi/geshi/f1.php b/vendor/easybook/geshi/geshi/f1.php
            new file mode 100644
            index 0000000000..e35a07f9ac
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/f1.php
            @@ -0,0 +1,150 @@
            + 'Formula One',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array('{' => '}'),
            +    'COMMENT_REGEXP' => array(
            +        //Nested Comments
            +        2 =>  "/(\{(?:\{.*\}|[^\{])*\})/m"
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'",'"'),
            +    'ESCAPE_CHAR' => '',
            +    'ESCAPE_REGEXP' => array(
            +        //Simple Single Char Escapes
            +        1 => "#\\\\[\\\\nrt\'\"?\n]#i",
            +        //Hexadecimal Char Specs (Utf16 codes, Unicode versions only)
            +        2 => "#\\\\u[\da-fA-F]{4}#",
            +        ),
            +    'NUMBERS' =>
            +        GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE |
            +        GESHI_NUMBER_BIN_PREFIX_0B |
            +        GESHI_NUMBER_OCT_PREFIX_0O |
            +        GESHI_NUMBER_HEX_PREFIX |
            +        GESHI_NUMBER_FLT_NONSCI |
            +        GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO,
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'pred','proc','subr','else','elsif','iff','if','then','false','true',
            +            'case','of','use','local','mod','end','list','file','all','one','max','min','rel',
            +            'external','Nil','_stdcall','_cdecl','_addressof','_pred','_file','_line'
            +            ),
            +        2 => array(
            +            'Ascii','Bin','I','L','P','R','S','U'
            +            ),
            +        3 => array(
            +            'Append','in','Dupl','Len','Print','_AllDifferent','_AllAscending',
            +            '_AllDescending','_Ascending','_Descending'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        0 => array('(', ')', '[', ']'),
            +        1 => array('<', '>','='),
            +        2 => array('+', '-', '*', '/'),
            +        3 => array('&', '|'),
            +        4 => array(':', ';')
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0000ff;',
            +            2 => 'color: #000080;',
            +            3 => 'color: #000080;',
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #008000; font-style: italic;',
            +            2 => 'color: #008000; font-style: italic;',
            +            'MULTI' => 'color: #008000; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;',
            +            1 => 'color: #000099; font-weight: bold;',
            +            2 => 'color: #009999; font-weight: bold;',
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #800000;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #202020;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #000000;',
            +            1 => 'color: #000000;',
            +            2 => 'color: #000000;',
            +            3 => 'color: #000000;',
            +            4 => 'color: #000000;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => 'http://www.f1compiler.com/f1helponline/f1_runtime_library.html#{FNAME}'
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/falcon.php b/vendor/easybook/geshi/geshi/falcon.php
            new file mode 100644
            index 0000000000..43957750f6
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/falcon.php
            @@ -0,0 +1,217 @@
            + (1.0.8.10)
            + *  -  First Release
            + *
            + *************************************************************************************
            + *
            + *     This file is part of GeSHi.
            + *
            + *   GeSHi is free software; you can redistribute it and/or modify
            + *   it under the terms of the GNU General Public License as published by
            + *   the Free Software Foundation; either version 2 of the License, or
            + *   (at your option) any later version.
            + *
            + *   GeSHi is distributed in the hope that it will be useful,
            + *   but WITHOUT ANY WARRANTY; without even the implied warranty of
            + *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
            + *   GNU General Public License for more details.
            + *
            + *   You should have received a copy of the GNU General Public License
            + *   along with GeSHi; if not, write to the Free Software
            + *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
            + * ************************************************************************************/
            +
            +$language_data = array (
            +    'LANG_NAME' => 'Falcon',
            +    'COMMENT_SINGLE' => array( 1 => '//' ),
            +    'COMMENT_MULTI' => array( '/*' => '*/' ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array( "'", '"' ),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'break','case','catch','class','const','continue','def','default',
            +            'dropping','elif','else','end','enum','for','forfirst','forlast',
            +            'formiddle','from','function','global','if','init','innerfunc',
            +            'launch','loop','object','raise','return','select','state','static',
            +            'switch','try','while'
            +        ),
            +        2 => array(
            +            'false','nil','true',
            +        ),
            +        3 => array(
            +            'and','as','eq','fself','in','not','notin','or','provides','self','to'
            +        ),
            +        4 => array(
            +            'directive','export','import','load','macro'
            +        ),
            +        5 => array(
            +            'ArrayType','BooleanType','ClassMethodType','ClassType','DictionaryType',
            +            'FunctionType','MemBufType','MethodType','NilType','NumericType','ObjectType',
            +            'RangeType','StringType','LBindType'
            +        ),
            +        6 => array(
            +            "CurrentTime","IOStream","InputStream","MemBufFromPtr","OutputStream",
            +            "PageDict","ParseRFC2822","abs","acos","all",
            +            "allp","any","anyp","argd","argv",
            +            "arrayAdd","arrayBuffer","arrayCompact","arrayDel","arrayDelAll",
            +            "arrayFill","arrayFind","arrayHead","arrayIns","arrayMerge",
            +            "arrayNM","arrayRemove","arrayResize","arrayScan","arraySort",
            +            "arrayTail","asin","assert","atan","atan2",
            +            "attributes","baseClass","beginCritical","bless","brigade",
            +            "broadcast","cascade","ceil","choice","chr",
            +            "className","clone","combinations","compare","consume",
            +            "cos","deg2rad","deoob","derivedFrom","describe",
            +            "deserialize","dictBack","dictBest","dictClear","dictFill",
            +            "dictFind","dictFront","dictGet","dictKeys","dictMerge",
            +            "dictRemove","dictSet","dictValues","dirChange","dirCurrent",
            +            "dirMake","dirMakeLink","dirReadLink","dirRemove","dolist",
            +            "endCritical","epoch","eval","exit","exp",
            +            "factorial","fileChgroup","fileChmod","fileChown","fileCopy",
            +            "fileExt","fileMove","fileName","fileNameMerge","filePath",
            +            "fileRemove","fileType","fileUnit","filter","fint",
            +            "firstOf","floop","floor","fract","getAssert",
            +            "getEnviron","getProperty","getSlot","getSystemEncoding","getenv",
            +            "iff","include","input","inspect","int",
            +            "isBound","isCallable","isoob","lbind","len",
            +            "let","lit","log","map","max",
            +            "metaclass","min","numeric","oob","ord",
            +            "paramCount","paramIsRef","paramSet","parameter","passvp",
            +            "permutations","pow","print","printl","properties",
            +            "rad2deg","random","randomChoice","randomDice","randomGrab",
            +            "randomPick","randomSeed","randomWalk","readURI","reduce",
            +            "retract","round","seconds","serialize","set",
            +            "setProperty","setenv","sin","sleep","stdErr",
            +            "stdErrRaw","stdIn","stdInRaw","stdOut","stdOutRaw",
            +            "strBack","strBackFind","strBackTrim","strBuffer","strCmpIgnoreCase",
            +            "strEndsWith","strEscape","strEsq","strFill","strFind",
            +            "strFromMemBuf","strFront","strFrontTrim","strLower","strMerge",
            +            "strReplace","strReplicate","strSplit","strSplitTrimmed","strStartsWith",
            +            "strToMemBuf","strTrim","strUnescape","strUnesq","strUpper",
            +            "strWildcardMatch","subscribe","systemErrorDescription","tan","times",
            +            "toString","transcodeFrom","transcodeTo","typeOf","unsetenv",
            +            "unsubscribe","valof","vmFalconPath","vmIsMain","vmModuleName",
            +            "vmModuleVersionInfo","vmSearchPath","vmSystemType","vmVersionInfo","vmVersionName",
            +            "writeURI","xmap","yield","yieldOut"
            +        ),
            +        7 => array(
            +            "AccessError","Array","BOM","Base64","Class",
            +            "ClassMethod","CloneError","CmdlineParser","CodeError","Continuation",
            +            "Dictionary","Directory","Error","FileStat","Format",
            +            "Function","GarbagePointer","GenericError","Integer","InterruptedError",
            +            "IoError","Iterator","LateBinding","List","MathError",
            +            "MemoryBuffer","MessageError","Method","Numeric","Object",
            +            "ParamError","ParseError","Path","Range","Semaphore",
            +            "Sequence","Set","Stream","String","StringStream",
            +            "SyntaxError","Table","TableError","TimeStamp","TimeZone",
            +            "Tokenizer","TypeError","URI","VMSlot"
            +        ),
            +        8 => array(
            +            "args","scriptName","scriptPath"
            +        ),
            +        9 => array(
            +            "GC"
            +        ),
            +    ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => 'http://falconpl.org/project_docs/core/functions.html#typeOf',
            +        6 => 'http://falconpl.org/project_docs/core/functions.html#{FNAME}',
            +        7 => 'http://falconpl.org/project_docs/core/class_{FNAME}.html',
            +        8 => 'http://falconpl.org/project_docs/core/globals.html#{FNAME}',
            +        9 => 'http://falconpl.org/project_docs/core/object_{FNAME}.html)'
            +    ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        5 => true,
            +        6 => true,
            +        7 => true,
            +        8 => true,
            +        9 => true
            +    ),
            +    'SYMBOLS' => array(
            +        '(',')','$','%','&','/','{','[',']','=','}','?','+','-','#','*','@',
            +        '<','>','|',',',':',';','\\','^'
            +    ),
            +    'REGEXPS' => array(
            +        0 => array(
            +            GESHI_SEARCH => '(\[)([a-zA-Z_]|\c{C})(?:[a-zA-Z0-9_]|\p{C})*(\])',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => '\\3',
            +
            +        ),
            +    ),
            +    'STRICT_MODE_APPLIES' => GESHI_MAYBE,
            +    'SCRIPT_DELIMITERS' => array(
            +        0 => array( ' '?>' )
            +    ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        0 => true
            +    ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000080;font-weight:bold;',
            +            2 => 'color: #800000;font-weight:bold;',
            +            3 => 'color: #800000;font-weight:bold;',
            +            4 => 'color: #000080;font-weight:bold;',
            +            5 => 'color: #000000;font-weight:bold;',
            +            6 => 'font-weight:bold;',
            +            7 => 'font-weight:bold;',
            +            8 => 'font-weight:bold;'
            +        ),
            +        'COMMENTS' => array(
            +            1 => 'color: #29B900;',
            +            'MULTI' => 'color: #008080'
            +        ),
            +        'STRINGS' => array(
            +            0 => 'color: #800000'
            +        ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000000'
            +        ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #800000'
            +        ),
            +        'NUMBERS' => array(
            +            0 => 'color: #000000'
            +        ),
            +        'METHODS' => array(
            +            0 => 'color: #000000'
            +        ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #8B0513'
            +        ),
            +        'SCRIPT' => array(
            +            0 => ''
            +        ),
            +        'REGEXPS' => array(
            +            0 => 'color: #FF00FF'
            +        )
            +    ),
            +
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        '.'
            +    )
            +);
            diff --git a/vendor/easybook/geshi/geshi/fo.php b/vendor/easybook/geshi/geshi/fo.php
            new file mode 100644
            index 0000000000..c4b6d11ee4
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/fo.php
            @@ -0,0 +1,326 @@
            + 'FO (abas-ERP)',
            +    'COMMENT_SINGLE' => array(1 => '..'),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        //Control Flow
            +        1 => array(
            +            /* see http://www.abas.de/sub_de/kunden/help/hd/html/9.html */
            +
            +            /* fo keywords, part 1: control flow */
            +            '.weiter', '.continue'
            +
            +            /* this language works with goto's only*/
            +            ),
            +
            +        //FO Keywords
            +        2 => array(
            +            /* fo keywords, part 2 */
            +            '.fo', '.formel', '.formula',
            +            '.zuweisen', '.assign',
            +            '.fehler', '.error',
            +            '.ende', '.end'
            +            ),
            +
            +        //Java Keywords
            +        3 => array(
            +            /* Java keywords, part 3: primitive data types */
            +            '.art', '.type',
            +            'integer', 'real', 'bool', 'text', 'datum', 'woche', 'termin', 'zeit',
            +            'mehr', 'MEHR'
            +            ),
            +
            +        //Reserved words in fo literals
            +        4 => array(
            +            /* other reserved words in fo literals */
            +            /* should be styled to look similar to numbers and Strings */
            +            'false', 'null', 'true',
            +            'OBJEKT',
            +            'VORGANG', 'PROCESS',
            +            'OFFEN', 'OPEN',
            +            'ABORT',
            +            'AN', 'ADDEDTO',
            +            'AUF', 'NEW',
            +            'BILDSCHIRM', 'TERMINAL',
            +            'PC',
            +            'MASKE', 'SCREEN',
            +            'ZEILE', 'LINE'
            +            ),
            +
            +        // interpreter settings
            +        5 => array (
            +            '..!INTERPRETER', 'DEBUG'
            +            ),
            +
            +        // database commands
            +        6 => array (
            +            '.hole', '.hol', '.select',
            +            '.lade', '.load',
            +            '.aktion', '.action',
            +            '.belegen', '.occupy',
            +            '.bringe', '.rewrite',
            +            '.dazu', '.add',
            +            '.löschen', '.delete',
            +            '.mache', '.make',
            +            '.merke', '.reserve',
            +            '.setze', '.set',
            +            'SPERREN', 'LOCK',
            +            'TEIL', 'PART',
            +            'KEINESPERRE',
            +            'AMASKE', 'ASCREEN',
            +            'BETRIEB', 'WORK-ORDER',
            +            'NUMERISCH', 'NUMERICAL',
            +            'VORSCHLAG', 'SUGGESTION',
            +            'OBLIGO', 'OUTSTANDING',
            +            'LISTE', 'LIST',
            +            'DRUCK', 'PRINT',
            +            'ÃœBERNAHME', 'TAGEOVER',
            +            'ABLAGE', 'FILINGSYSTEM',
            +            'BDE', 'PDC',
            +            'BINDUNG', 'ALLOCATION',
            +            'BUCHUNG', 'ENTRY',
            +            'COLLI', 'SERIAL',
            +            'DATEI', 'FILE',
            +            'VERKAUF', 'SALES',
            +            'EINKAUF', 'PURCHASING',
            +            'EXEMPLAR', 'EXAMPLE',
            +            'FERTIGUNG', 'PRODUCTION',
            +            'FIFO',
            +            'GRUPPE', 'GROUP',
            +            'JAHR', 'YEAR',
            +            'JOURNAL',
            +            'KOPF', 'HEADER',
            +            'KOSTEN',
            +            'LIFO',
            +            'LMENGE', 'SQUANTITY',
            +            'LOHNFERTIGUNG', 'SUBCONTRACTING',
            +            'LPLATZ', 'LOCATION',
            +            'MBELEGUNG', 'MACHLOADING',
            +            'MONAT', 'MONTH', 'MZ',
            +            'NACHRICHT', 'MESSAGE',
            +            'PLAN', 'TARGET',
            +            'REGIONEN', 'REGIONS',
            +            'SERVICEANFRAGE', 'SERVICEREQUEST',
            +            'VERWENDUNG', 'APPLICATION',
            +            'WEITER', 'CONTINUE',
            +            'ABBRUCH', 'CANCEL',
            +            'ABLAGEKENNZEICHEN', 'FILLINGCODE',
            +            'ALLEIN', 'SINGLEUSER',
            +            'AUFZAEHLTYP', 'ENUMERATION-TYPE',
            +            'AUSGABE', 'OUTPUT',
            +            'DEZPUNKT', 'DECPOINT'
            +            ),
            +
            +        // output settings
            +        7 => array (
            +            '.absatz', '.para',
            +            '.blocksatz', '.justified',
            +            '.flattersatz', '.unjustified',
            +            '.format',
            +            '.box',
            +            '.drucken', '.print',
            +            '.gedruckt', '.printed',
            +            '.länge', '.length',
            +            '.links', '.left',
            +            '.rechts', '.right',
            +            '.oben', '.up',
            +            '.unten', '.down',
            +            '.seite', '.page',
            +            '.tabellensatz', '.tablerecord',
            +            '.trenner', '.separator',
            +            'ARCHIV'
            +            ),
            +
            +        // text commands
            +        8 => array (
            +            '.text',
            +            '.atext',
            +            '.println',
            +            '.uebersetzen', '.translate'
            +            ),
            +
            +        // I/O commands
            +        9 => array (
            +            '.aus', '.ausgabe', '.output',
            +            '.ein', '.eingabe', '.input',
            +            '.datei', '.file',
            +            '.lesen', '.read',
            +            '.sortiere', '.sort',
            +            '-ÖFFNEN', '-OPEN',
            +            '-TEST',
            +            '-LESEN', '-READ',
            +            'VON', 'FROM'
            +            ),
            +
            +        //system
            +        10 => array (
            +            '.browser',
            +            '.kommando', '.command',
            +            '.system', '.dde',
            +            '.editiere', '.edit',
            +            '.hilfe', '.help',
            +            '.kopieren', '.copy',
            +            '.pc.clip',
            +            '.pc.copy',
            +            '.pc.dll',
            +            '.pc.exec',
            +            '.pc.open',
            +            'DIAGNOSE', 'ERRORREPORT',
            +            'DOPPELPUNKT', 'COLON',
            +            'ERSETZUNG', 'REPLACEMENT',
            +            'WARTEN', 'PARALLEL'
            +            ),
            +
            +        //fibu/accounting specific commands
            +        11 => array (
            +            '.budget',
            +            '.chart',
            +            'VKZ',
            +            'KONTO', 'ACCOUNT',
            +            'AUSZUG', 'STATEMENT',
            +            'WAEHRUNG', 'CURRENCY',
            +            'WAEHRUNGSKURS', 'EXCHANGERATE',
            +            'AUSWAEHR', 'FORCURR',
            +            'BUCHUNGSKREIS', 'SET OF BOOKS'
            +            ),
            +
            +        // efop - extended flexible surface
            +        12 => array (
            +            '.cursor',
            +            '.farbe', '.colour',
            +            '.fenster', '.window',
            +            '.hinweis', '.note',
            +            '.menue', '.menu',
            +            '.schutz', '.protection',
            +            '.zeigen', '.view',
            +            '.zeile', '.line',
            +            'VORDERGRUND', 'FOREGROUND',
            +            'HINTERGRUND', 'BACKGROUND',
            +            'SOFORT', 'IMMEDIATELY',
            +            'AKTUALISIEREN', 'UPDATE',
            +            'FENSTERSCHLIESSEN', 'CLOSEWINDOWS'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        0 => array('(', ')', '[', ']', '{', '}', '*', '&', '%', ';', '<', '>'),
            +        1 => array('?', '!')
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        /* all fo keywords are case sensitive, don't have to but I like this type of coding */
            +        1 => true, 2 => true, 3 => true, 4 => true,
            +        5 => true, 6 => true, 7 => true, 8 => true, 9 => true,
            +        10 => true, 11 => true, 12 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000000; font-weight: bold;',
            +            2 => 'color: #000000; font-weight: bold;',
            +            3 => 'color: #006600; font-weight: bold;',
            +            4 => 'color: #006600; font-weight: bold;',
            +            5 => 'color: #003399; font-weight: bold;',
            +            6 => 'color: #003399; font-weight: bold;',
            +            7 => 'color: #003399; font-weight: bold;',
            +            8 => 'color: #003399; font-weight: bold;',
            +            9 => 'color: #003399; font-weight: bold;',
            +            10 => 'color: #003399; font-weight: bold;',
            +            11 => 'color: #003399; font-weight: bold;',
            +            12 => 'color: #003399; font-weight: bold;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; font-style: italic;',
            +            //2 => 'color: #006699;',
            +            'MULTI' => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #0000ff;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #006633;',
            +            2 => 'color: #006633;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #339933;',
            +            1 => 'color: #000000; font-weight: bold;'
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => '',
            +        6 => '',
            +        7 => '',
            +        8 => '',
            +        9 => '',
            +        10 => '',
            +        11 => '',
            +        12 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/fortran.php b/vendor/easybook/geshi/geshi/fortran.php
            new file mode 100644
            index 0000000000..a77b6e7fae
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/fortran.php
            @@ -0,0 +1,158 @@
            +'Fortran',
            +    'COMMENT_SINGLE'=> array(1 =>'!',2=>'Cf2py'),
            +    'COMMENT_MULTI'=> array(),
            +    //Fortran Comments
            +    'COMMENT_REGEXP' => array(1 => '/^C.*?$/mi'),
            +    'CASE_KEYWORDS'=> GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS'=> array("'",'"'),
            +    'ESCAPE_CHAR'=>'\\',
            +    'KEYWORDS'=> array(
            +        1 => array(
            +            'allocate','block','call','case','contains','continue','cycle','deallocate',
            +            'default','do','else','elseif','elsewhere','end','enddo','endif','endwhere',
            +            'entry','exit','function','go','goto','if','interface','module','nullify','only',
            +            'operator','procedure','program','recursive','return','select','stop',
            +            'subroutine','then','to','where','while',
            +            'access','action','advance','blank','blocksize','carriagecontrol',
            +            'delim','direct','eor','err','exist','file','flen','fmt','form','formatted',
            +            'iostat','name','named','nextrec','nml','number','opened','pad','position',
            +            'readwrite','recl','sequential','status','unformatted','unit'
            +            ),
            +        2 => array(
            +            '.AND.','.EQ.','.EQV.','.GE.','.GT.','.LE.','.LT.','.NE.','.NEQV.','.NOT.',
            +            '.OR.','.TRUE.','.FALSE.'
            +            ),
            +        3 => array(
            +            'allocatable','character','common','complex','data','dimension','double',
            +            'equivalence','external','implicit','in','inout','integer','intent','intrinsic',
            +            'kind','logical','namelist','none','optional','out','parameter','pointer',
            +            'private','public','real','result','save','sequence','target','type','use'
            +            ),
            +        4 => array(
            +            'abs','achar','acos','adjustl','adjustr','aimag','aint','all','allocated',
            +            'anint','any','asin','atan','atan2','bit_size','break','btest','carg',
            +            'ceiling','char','cmplx','conjg','cos','cosh','cpu_time','count','cshift',
            +            'date_and_time','dble','digits','dim','dot_product','dprod dvchk',
            +            'eoshift','epsilon','error','exp','exponent','floor','flush','fraction',
            +            'getcl','huge','iachar','iand','ibclr','ibits','ibset','ichar','ieor','index',
            +            'int','intrup','invalop','ior','iostat_msg','ishft','ishftc','lbound',
            +            'len','len_trim','lge','lgt','lle','llt','log','log10','matmul','max','maxexponent',
            +            'maxloc','maxval','merge','min','minexponent','minloc','minval','mod','modulo',
            +            'mvbits','nbreak','ndperr','ndpexc','nearest','nint','not','offset','ovefl',
            +            'pack','precfill','precision','present','product','prompt','radix',
            +            'random_number','random_seed','range','repeat','reshape','rrspacing',
            +            'scale','scan','segment','selected_int_kind','selected_real_kind',
            +            'set_exponent','shape','sign','sin','sinh','size','spacing','spread','sqrt',
            +            'sum system','system_clock','tan','tanh','timer','tiny','transfer','transpose',
            +            'trim','ubound','undfl','unpack','val','verify'
            +            ),
            +        ),
            +    'SYMBOLS'=> array(
            +        '(',')','{','}','[',']','=','+','-','*','/','!','%','^','&',':'
            +        ),
            +    'CASE_SENSITIVE'=> array(
            +        GESHI_COMMENTS => true,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        ),
            +    'STYLES'=> array(
            +        'KEYWORDS'=> array(
            +            1 =>'color: #b1b100;',
            +            2 =>'color: #000000; font-weight: bold;',
            +            3 =>'color: #000066;',
            +            4 =>'color: #993333;'
            +            ),
            +        'COMMENTS'=> array(
            +            1 =>'color: #666666; font-style: italic;',
            +            2 =>'color: #339933;',
            +            'MULTI'=>'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR'=> array(
            +            0 =>'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS'=> array(
            +            0 =>'color: #009900;'
            +            ),
            +        'STRINGS'=> array(
            +            0 =>'color: #ff0000;'
            +            ),
            +        'NUMBERS'=> array(
            +            0 =>'color: #cc66cc;'
            +            ),
            +        'METHODS'=> array(
            +            1 =>'color: #202020;',
            +            2 =>'color: #202020;'
            +            ),
            +        'SYMBOLS'=> array(
            +            0 =>'color: #339933;'
            +            ),
            +        'REGEXPS'=> array(
            +            ),
            +        'SCRIPT'=> array(
            +            )
            +        ),
            +    'URLS'=> array(
            +        1 =>'',
            +        2 =>'',
            +        3 =>'',
            +        4 =>''
            +        ),
            +    'OOLANG'=> true,
            +    'OBJECT_SPLITTERS'=> array(
            +        1 =>'.',
            +        2 =>'::'
            +        ),
            +    'REGEXPS'=> array(
            +        ),
            +    'STRICT_MODE_APPLIES'=> GESHI_NEVER,
            +    'SCRIPT_DELIMITERS'=> array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK'=> array(
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/freebasic.php b/vendor/easybook/geshi/geshi/freebasic.php
            new file mode 100644
            index 0000000000..c542644966
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/freebasic.php
            @@ -0,0 +1,139 @@
            + 'FreeBasic',
            +    'COMMENT_SINGLE' => array(1 => "'", 2 => '#'),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            "append", "as", "asc", "asin", "asm", "atan2", "atn", "beep", "bin", "binary", "bit",
            +            "bitreset", "bitset", "bload", "bsave", "byref", "byte", "byval", "call",
            +            "callocate", "case", "cbyte", "cdbl", "cdecl", "chain", "chdir", "chr", "cint",
            +            "circle", "clear", "clng", "clngint", "close", "cls", "color", "command",
            +            "common", "cons", "const", "continue", "cos", "cshort", "csign", "csng",
            +            "csrlin", "cubyte", "cuint", "culngint", "cunsg", "curdir", "cushort", "custom",
            +            "cvd", "cvi", "cvl", "cvlongint", "cvs", "cvshort", "data", "date",
            +            "deallocate", "declare", "defbyte", "defdbl", "defined", "defint", "deflng",
            +            "deflngint", "defshort", "defsng", "defstr", "defubyte", "defuint",
            +            "defulngint", "defushort", "dim", "dir", "do", "double", "draw", "dylibload",
            +            "dylibsymbol", "else", "elseif", "end", "enum", "environ", 'environ$', "eof",
            +            "eqv", "erase", "err", "error", "exec", "exepath", "exit", "exp", "export",
            +            "extern", "field", "fix", "flip", "for", "fre", "freefile", "function", "get",
            +            "getjoystick", "getkey", "getmouse", "gosub", "goto", "hex", "hibyte", "hiword",
            +            "if", "iif", "imagecreate", "imagedestroy", "imp", "inkey", "inp", "input",
            +            "instr", "int", "integer", "is", "kill", "lbound", "lcase", "left", "len",
            +            "let", "lib", "line", "lobyte", "loc", "local", "locate", "lock", "lof", "log",
            +            "long", "longint", "loop", "loword", "lset", "ltrim", "mid", "mkd", "mkdir",
            +            "mki", "mkl", "mklongint", "mks", "mkshort", "mod", "multikey", "mutexcreate",
            +            "mutexdestroy", "mutexlock", "mutexunlock", "name", "next", "not", "oct", "on",
            +            "once", "open", "option", "or", "out", "output", "overload", "paint", "palette",
            +            "pascal", "pcopy", "peek", "peeki", "peeks", "pipe", "pmap", "point", "pointer",
            +            "poke", "pokei", "pokes", "pos", "preserve", "preset", "print", "private",
            +            "procptr", "pset", "ptr", "public", "put", "random", "randomize", "read",
            +            "reallocate", "redim", "rem", "reset", "restore", "resume",
            +            "return", "rgb", "rgba", "right", "rmdir", "rnd", "rset", "rtrim", "run",
            +            "sadd", "screen", "screencopy", "screeninfo", "screenlock", "screenptr",
            +            "screenres", "screenset", "screensync", "screenunlock", "seek", "statement",
            +            "selectcase", "setdate", "setenviron", "setmouse",
            +            "settime", "sgn", "shared", "shell", "shl", "short", "shr", "sin", "single",
            +            "sizeof", "sleep", "space", "spc", "sqr", "static", "stdcall", "step", "stop",
            +            "str", "string", "strptr", "sub", "swap", "system", "tab", "tan",
            +            "then", "threadcreate", "threadwait", "time", "timer", "to", "trans",
            +            "trim", "type", "ubound", "ubyte", "ucase", "uinteger", "ulongint", "union",
            +            "unlock", "unsigned", "until", "ushort", "using", "va_arg", "va_first",
            +            "va_next", "val", "val64", "valint", "varptr", "view", "viewprint", "wait",
            +            "wend", "while", "width", "window", "windowtitle", "with", "write", "xor",
            +            "zstring", "explicit", "escape", "true", "false"
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080;',
            +            2 => 'color: #339933;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099;'
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/freeswitch.php b/vendor/easybook/geshi/geshi/freeswitch.php
            new file mode 100644
            index 0000000000..5412e6d69f
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/freeswitch.php
            @@ -0,0 +1,166 @@
            + 'FreeSWITCH',
            +    'COMMENT_SINGLE' => array(1 => '#'),
            +    'COMMENT_MULTI' => array(),
            +    'COMMENT_REGEXP' => array(1 => "/^Comment:.*?$/m"),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array(),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +//        1 => array(
            +//            'Disallow', 'Request-rate', 'Robot-version',
            +//            'Sitemap', 'User-agent', 'Visit-time'
            +//            )
            +        ),
            +    'SYMBOLS' => array(
            +//        ':'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false
            +        ),
            +
            +//order is important. regexes will overwrite most things....
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +//            1 => 'color: #FF0000; font-weight: bold;',//red
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;',
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +//            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +//            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +//            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +//            0 => 'color: #66cc66;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: firebrick; font-weight: bold;',
            +            1 => 'color: cornflowerblue; font-weight: bold;',
            +            2 => 'color: goldenrod; font-weight: bold;',
            +            3 => 'color: green; font-weight: bold;',
            +            4 => 'color: dimgrey; font-style: italic;',
            +            5 => 'color: green; font-weight: bold;',
            +            6 => 'color: firebrick; font-weight: bold;',
            +            7 => 'color: indigo; font-weight: italic;'
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +//        1 => 'http://www.robotstxt.org/wc/norobots.html'
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        0 => array(
            +            GESHI_SEARCH => '(^.*ERROR.*)',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => 'im',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        1 => array(
            +            GESHI_SEARCH => '(^.*NOTICE.*)',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => 'im',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        2 => array(
            +            GESHI_SEARCH => '(^.*DEBUG.*)',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => 'm',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        3 => array(
            +            GESHI_SEARCH => '(^.*INFO.*|.*info\(.*|^Channel.*|^Caller.*|^variable.*)',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => 'm',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        4 => array(
            +            GESHI_SEARCH => '(^Dialplan.*)',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => 'im',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        5 => array(
            +            GESHI_SEARCH => '(Regex\ \(PASS\))',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        6 => array(
            +            GESHI_SEARCH => '(Regex\ \(FAIL\))',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        7 => array(
            +            GESHI_SEARCH => '(\d{7,15})',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            )
            +        ),
            +
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/fsharp.php b/vendor/easybook/geshi/geshi/fsharp.php
            new file mode 100644
            index 0000000000..5743e4ef43
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/fsharp.php
            @@ -0,0 +1,212 @@
            + 'F#',
            +    'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(3 => '/\(\*(?!\)).*?\*\)/s'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'HARDQUOTE' => array('@"', '"'),
            +    'HARDESCAPE' => array('"'),
            +    'HARDCHAR' => '"',
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        /* main F# keywords */
            +        /* section 3.4 */
            +        1 => array(
            +            'abstract', 'and', 'as', 'assert', 'base', 'begin', 'class', 'default', 'delegate', 'do', 'done',
            +            'downcast', 'downto', 'elif', 'else', 'end', 'exception', 'extern', 'false', 'finally', 'for',
            +            'fun', 'function', 'if', 'in', 'inherit', 'inline', 'interface', 'internal', 'lazy', 'let',
            +            'match', 'member', 'module', 'mutable', 'namespace', 'new', 'not', 'null', 'of', 'open', 'or',
            +            'override', 'private', 'public', 'rec', 'return', 'sig', 'static', 'struct', 'then', 'to',
            +            'true', 'try', 'type', 'upcast', 'use', 'val', 'void', 'when', 'while', 'with', 'yield',
            +            'asr', 'land', 'lor', 'lsl', 'lsr', 'lxor', 'mod',
            +            /* identifiers are reserved for future use by F# */
            +            'atomic', 'break', 'checked', 'component', 'const', 'constraint', 'constructor',
            +            'continue', 'eager', 'fixed', 'fori', 'functor', 'global', 'include', 'method', 'mixin',
            +            'object', 'parallel', 'params', 'process', 'protected', 'pure', 'sealed', 'tailcall',
            +            'trait', 'virtual', 'volatile',
            +            /* take monads into account */
            +            'let!', 'yield!'
            +            ),
            +        /* define names of main libraries in F# Core, so we can link to it
            +         * http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/manual/namespaces.html
            +         */
            +        2 => array(
            +            'Array', 'Array2D', 'Array3D', 'Array4D', 'ComparisonIdentity', 'HashIdentity', 'List',
            +            'Map', 'Seq', 'SequenceExpressionHelpers', 'Set', 'CommonExtensions', 'Event',
            +            'ExtraTopLevelOperators', 'LanguagePrimitives', 'NumericLiterals', 'Operators',
            +            'OptimizedClosures', 'Option', 'String', 'NativePtr', 'Printf'
            +            ),
            +        /* 17.2 & 17.3 */
            +        3 => array(
            +            'abs', 'acos', 'asin', 'atan', 'atan2', 'ceil', 'cos', 'cosh', 'exp',
            +            'floor', 'log', 'log10', 'pown', 'round', 'sign', 'sin', 'sinh', 'sqrt',
            +            'tan', 'tanh',
            +            'ignore',
            +            'fst', 'snd',
            +            'stdin', 'stdout', 'stderr',
            +            'KeyValue',
            +            'max', 'min'
            +            ),
            +        /* Pervasives Types & Overloaded Conversion Functions */
            +        4 => array(
            +            'bool', 'byref', 'byte', 'char', 'decimal', 'double', 'exn', 'float', 'float32',
            +            'FuncConvert', 'ilsigptr', 'int', 'int16', 'int32', 'int64', 'int8',
            +            'nativeint', 'nativeptr', 'obj', 'option', 'ref', 'sbyte', 'single', 'string', 'uint16',
            +            'uint32', 'uint64', 'uint8', 'unativeint', 'unit',
            +            'enum',
            +            'async', 'seq', 'dict'
            +            ),
            +        /* 17.2 Exceptions */
            +        5 => array (
            +            'failwith', 'invalidArg', 'raise', 'rethrow'
            +            ),
            +        /* 3.3 Conditional compilation & 13.3 Compiler Directives + light / light off */
            +        6 => array(
            +            '(*IF-FSHARP', 'ENDIF-FSHARP*)', '(*F#', 'F#*)', '(*IF-OCAML', 'ENDIF-OCAML*)',
            +            '#light',
            +            '#if', '#else', '#endif', '#indent', '#nowarn', '#r', '#reference',
            +            '#I', '#Include', '#load', '#time', '#help', '#q', '#quit',
            +            ),
            +        /* 3.11 Pre-processor Declarations / Identifier Replacements */
            +        7 => array(
            +            '__SOURCE_DIRECTORY__', '__SOURCE_FILE__', '__LINE__'
            +            ),
            +        /* 17.2 Object Transformation Operators */
            +        8 => array(
            +            'box', 'hash', 'sizeof', 'typeof', 'typedefof', 'unbox'
            +            )
            +        ),
            +    /* 17.2 basic operators + the yield and yield! arrows */
            +    'SYMBOLS' => array(
            +        1 => array('+', '-', '/', '*', '**', '%', '~-'),
            +        2 => array('<', '<=', '>', '<=', '=', '<>'),
            +        3 => array('<<<', '>>>', '^^^', '&&&', '|||', '~~~'),
            +        4 => array('|>', '>>', '<|', '<<'),
            +        5 => array('!', '->', '->>'),
            +        6 => array('[',']','(',')','{','}', '[|', '|]', '(|', '|)'),
            +        7 => array(':=', ';', ';;')
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true, /* keywords */
            +        2 => true, /* modules */
            +        3 => true, /* pervasives functions */
            +        4 => true, /* types and overloaded conversion operators */
            +        5 => true, /* exceptions */
            +        6 => true, /* conditional compilation & compiler Directives */
            +        7 => true, /* pre-processor declarations / identifier replacements */
            +        8 => true  /* object transformation operators */
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #06c; font-weight: bold;', /* nice blue */
            +            2 => 'color: #06c; font-weight: bold;', /* nice blue */
            +            3 => 'color: #06c; font-weight: bold;', /* nice blue */
            +            4 => 'color: #06c; font-weight: bold;', /* nice blue */
            +            5 => 'color: #06c; font-weight: bold;', /* nice blue */
            +            6 => 'color: #06c; font-weight: bold;', /* nice blue */
            +            7 => 'color: #06c; font-weight: bold;', /* nice blue */
            +            8 => 'color: #06c; font-weight: bold;' /* nice blue */
            +            ),
            +        'COMMENTS' => array(
            +            'MULTI' => 'color: #5d478b; font-style: italic;', /* light purple */
            +            1 => 'color: #5d478b; font-style: italic;',
            +            2 => 'color: #5d478b; font-style: italic;', /* light purple */
            +            3 => 'color: #5d478b; font-style: italic;' /* light purple */
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #6c6;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #3cb371;' /* nice green */
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #c6c;' /* pink */
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #060;' /* dark green */
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #a52a2a;' /* maroon */
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        /* some of keywords are Pervasives functions (land, lxor, asr, ...) */
            +        1 => '',
            +        2 => 'http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/manual/namespaces.html',
            +        3 => '',
            +        4 => '',
            +        5 => '',
            +        6 => '',
            +        7 => '',
            +        8 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4,
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            'DISALLOWED_BEFORE' => "(?|^])",
            +            'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_<\|%\\-])"
            +        )
            +    )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/gambas.php b/vendor/easybook/geshi/geshi/gambas.php
            new file mode 100644
            index 0000000000..295edd0c4b
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/gambas.php
            @@ -0,0 +1,213 @@
            + 'GAMBAS',
            +    'COMMENT_SINGLE' => array(1 => "'"),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'NUMBERS' =>
            +        GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX |
            +        GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO,
            +    'KEYWORDS' => array(
            +        //keywords
            +        1 => array(
            +            'APPEND', 'AS', 'BREAK', 'BYREF', 'CASE', 'CATCH', 'CLASS', 'CLOSE', 'CONST', 'CONTINUE', 'COPY',
            +            'CREATE', 'DEBUG', 'DEC', 'DEFAULT', 'DIM', 'DO', 'EACH', 'ELSE', 'END', 'ENDIF', 'ERROR', 'EVENT', 'EXEC',
            +            'EXPORT', 'EXTERN', 'FALSE', 'FINALLY', 'FLUSH', 'FOR', 'FUNCTION', 'GOTO', 'IF', 'IN', 'INC', 'INHERITS',
            +            'INPUT', 'FROM', 'IS', 'KILL', 'LAST', 'LIBRARY', 'LIKE', 'LINE INPUT', 'LINK', 'LOCK', 'LOOP', 'ME',
            +            'MKDIR', 'MOVE', 'NEW', 'NEXT', 'NULL', 'OPEN', 'OPTIONAL', 'OUTPUT', 'PIPE', 'PRINT', 'PRIVATE',
            +            'PROCEDURE', 'PROPERTY', 'PUBLIC', 'QUIT', 'RAISE', 'RANDOMIZE', 'READ', 'REPEAT', 'RETURN', 'RMDIR',
            +            'SEEK', 'SELECT', 'SHELL', 'SLEEP', 'STATIC', 'STEP', 'STOP', 'SUB', 'SUPER', 'SWAP', 'THEN', 'TO',
            +            'TRUE', 'TRY', 'UNLOCK', 'UNTIL', 'WAIT', 'WATCH', 'WEND', 'WHILE', 'WITH', 'WRITE'
            +            ),
            +        //functions
            +        2 => array(
            +            'Abs', 'Access', 'Acos', 'Acosh', 'Alloc', 'Ang', 'Asc', 'ASin', 'ASinh', 'Asl', 'Asr', 'Assign', 'Atan',
            +            'ATan2', 'ATanh',
            +            'BChg', 'BClr', 'Bin', 'BSet', 'BTst',
            +            'CBool', 'Cbr', 'CByte', 'CDate', 'CFloat', 'Choose', 'Chr', 'CInt', 'CLong', 'Comp', 'Conv', 'Cos',
            +            'Cosh', 'CShort', 'CSng', 'CStr',
            +            'DateAdd', 'DateDiff', 'Day', 'DConv', 'Deg', 'DFree', 'Dir',
            +            'Eof', 'Eval', 'Exist', 'Exp', 'Exp10', 'Exp2', 'Expm',
            +            'Fix', 'Format', 'Frac', 'Free',
            +            'Hex', 'Hour', 'Hyp',
            +            'Iif', 'InStr', 'Int', 'IsAscii', 'IsBlank', 'IsBoolean', 'IsByte', 'IsDate', 'IsDigit', 'IsDir',
            +            'IsFloat', 'IsHexa', 'IsInteger', 'IsLCase', 'IsLetter', 'IsLong', 'IsNull', 'IsNumber', 'IsObject',
            +            'IsPunct', 'IsShort', 'IsSingle', 'IsSpace', 'IsString', 'IsUCase', 'IsVariant',
            +            'LCase', 'Left', 'Len', 'Lof', 'Log', 'Log10', 'Log2', 'Logp', 'Lsl', 'Lsr', 'LTrim',
            +            'Mag', 'Max', 'Mid', 'Min', 'Minute', 'Month', 'Now', 'Quote',
            +            'Rad', 'RDir', 'Realloc', 'Replace', 'Right', 'RInStr', 'Rnd', 'Rol', 'Ror', 'Round', 'RTrim',
            +            'Scan', 'SConv', 'Second', 'Seek', 'Sgn', 'Shl', 'Shr', 'Sin', 'Sinh', 'Space', 'Split', 'Sqr',
            +            'Stat', 'Str', 'StrPtr', 'Subst',
            +            'Tan', 'Tanh', 'Temp$', 'Time', 'Timer', 'Tr', 'Trim', 'TypeOf',
            +            'UCase', 'Unquote', 'Val', 'VarPtr', 'Week', 'WeekDay', 'Year'
            +            ),
            +        //string functions
            +        3 => array(
            +            'Bin$', 'Chr$', 'Conv$', 'DConv$', 'Format$', 'Hex$', 'LCase$', 'Left$', 'LTrim$', 'Mid$', 'Quote$',
            +            'Replace$', 'Right$', 'SConv$', 'Space$', 'Str$', 'String$', 'Subst$', 'Tr$', 'Trim$', 'UCase$',
            +            'Unquote$'
            +            ),
            +        //datatypes
            +        4 => array(
            +            'Boolean', 'Byte', 'Short', 'Integer', 'Long', 'Single', 'Float', 'Date', 'String', 'Variant', 'Object',
            +            'Pointer', 'File'
            +            ),
            +        //operators
            +        5 => array(
            +            'AND', 'DIV', 'MOD', 'NOT', 'OR', 'XOR'
            +            ),
            +        //objects/classes
            +        6 => array(
            +            'Application', 'Array', 'Byte[]', 'Collection', 'Component', 'Enum', 'Observer', 'Param', 'Process',
            +            'Stream', 'System', 'User', 'Chart', 'Compress', 'Crypt', 'Blob', 'Connection', 'DB', 'Database',
            +            'DatabaseUser', 'Field', 'Index', 'Result', 'ResultField', 'Table', 'DataBrowser', 'DataCombo',
            +            'DataControl', 'DataSource', 'DataView', 'Desktop', 'DesktopFile', 'Balloon', 'ColorButton',
            +            'ColorChooser', 'DateChooser', 'DirChooser', 'DirView', 'Expander', 'FileChooser', 'FileView',
            +            'FontChooser', 'InputBox', 'ListContainer', 'SidePanel', 'Stock', 'TableView', 'ToolPanel', 'ValueBox',
            +            'Wizard', 'Dialog', 'ToolBar', 'WorkSpace', 'DnsClient', 'SerialPort', 'ServerSocket', 'Socket',
            +            'UdpSocket', 'FtpClient', 'HttpClient', 'SmtpClient', 'Regexp', 'Action', 'Button', 'CheckBox',
            +            'ColumnView', 'ComboBox', 'Draw', 'Container', 'Control', 'Cursor', 'DrawingArea', 'Embedder',
            +            'Font', 'Form', 'Frame', 'GridView', 'HBox', 'HPanel', 'HSplit', 'IconView', 'Image', 'Key', 'Label',
            +            'Line', 'ListBox', 'ListView', 'Menu', 'Message', 'Mouse', 'MovieBox', 'Panel', 'Picture', 'PictureBox',
            +            'ProgressBar', 'RadioButton', 'ScrollBar', 'ScrollView', 'Separator', 'Slider', 'SpinBox', 'TabStrip',
            +            'TextArea', 'TextBox', 'TextLabel', 'ToggleButton', 'TrayIcon', 'TreeView', 'VBox', 'VPanel', 'VSplit',
            +            'Watcher', 'Window', 'Dial', 'Editor', 'LCDNumber', 'Printer', 'TextEdit', 'WebBrowser', 'GLarea',
            +            'Report', 'ReportCloner', 'ReportContainer', 'ReportControl', 'ReportDrawing', 'ReportField', 'ReportHBox',
            +            'ReportImage', 'ReportLabel', 'ReportSection', 'ReportSpecialField', 'ReportTextLabel', 'ReportVBox',
            +            'CDRom', 'Channel', 'Music', 'Sound', 'Settings', 'VideoDevice', 'Vb', 'CGI', 'HTML', 'Request', 'Response',
            +            'Session', 'XmlDocument', 'XmlNode', 'XmlReader', 'XmlReaderNodeType', 'XmlWriter', 'RpcArray', 'RpcClient',
            +            'RpcFunction', 'RpcServer', 'RpcStruct', 'RpcType', 'XmlRpc', 'Xslt'
            +            ),
            +        //constants
            +        7 => array(
            +            'Pi'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '&', '&=', '&/', '*', '*=', '+', '+=', '-', '-=', '//', '/', '/=', '=', '==', '\\', '\\=',
            +        '^', '^=', '[', ']', '{', '}', '<', '>', '<>', '<=', '>='
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        5 => false,
            +        6 => false,
            +        7 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0600FF; font-weight: bold;',          // Keywords
            +            2 => 'color: #8B1433;',                             // Functions
            +            3 => 'color: #8B1433;',                             // String Functions
            +            4 => 'color: #0600FF;',                             // Data Types
            +            5 => 'color: #1E90FF;',                             // Operators
            +            6 => 'color: #0600FF;',                             // Objects/Components
            +            7 => 'color: #0600FF;'                              // Constants
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #1A5B1A; font-style: italic;',
            +            'MULTI' => 'color: #1A5B1A; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #008080;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #612188;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #7E4B05;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #FF0000;',
            +            GESHI_NUMBER_INT_BASIC => 'color: #FF0000;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #0000FF;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #6132B2;'
            +            ),
            +        'REGEXPS' => array(
            +            //3 => 'color: #8B1433;'  //fakes '$' colour matched by REGEXP
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => 'http://gambasdoc.org/help/lang/{FNAMEL}',
            +        2 => 'http://gambasdoc.org/help/lang/{FNAMEL}',
            +        3 => 'http://www.google.com/search?hl=en&q={FNAMEL}+site:http://gambasdoc.org/help/lang/&btnI=I%27m%20Feeling%20Lucky',
            +        4 => 'http://gambasdoc.org/help/lang/type/{FNAMEL}',
            +        5 => 'http://gambasdoc.org/help/lang/{FNAMEL}',
            +        6 => 'http://www.google.com/search?hl=en&q={FNAMEL}+site:http://gambasdoc.org/&btnI=I%27m%20Feeling%20Lucky',
            +        7 => 'http://gambasdoc.org/help/lang/{FNAMEL}'
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 =>'.'
            +        ),
            +    'REGEXPS' => array(
            +        //3 => "\\$(?!\\w)"   //matches '$' at the end of Keyword
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_MAYBE,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            2 => array(
            +                'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_\|%\\-&;\$])"
            +                )
            +            )
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/gdb.php b/vendor/easybook/geshi/geshi/gdb.php
            new file mode 100644
            index 0000000000..9f63d25b09
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/gdb.php
            @@ -0,0 +1,196 @@
            + 'GDB',
            +    'COMMENT_SINGLE' => array(),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        0 => array(
            +            'Application',
            +            'signal',
            +            ),
            +        1 => array(
            +            'Segmentation fault',
            +            '[KCrash Handler]',
            +            ),
            +        ),
            +    'NUMBERS' => false,
            +    'SYMBOLS' => array(
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        0 => true,
            +        1 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            0 => 'font-weight:bold;',
            +            1 => 'font-weight:bold; color: #ff0000;'
            +            ),
            +        'COMMENTS' => array(
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => ''
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'font-weight:bold;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #933;'
            +            ),
            +        'NUMBERS' => array(
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #000066; font-weight:bold;',
            +            1 => 'color: #006600;',
            +            2 => 'color: #B07E00;',
            +            3 => 'color: #0057AE; text-style:italic;',
            +            4 => 'color: #0057AE; text-style:italic;',
            +            5 => 'color: #442886;',
            +            6 => 'color: #442886; font-weight:bold;',
            +            7 => 'color: #FF0000; font-weight:bold;',
            +            8 => 'color: #006E26;',
            +            9 => 'color: #555;',
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        0 => '',
            +        1 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        //[Current Thread...], [KCrash Handler] etc.
            +        0 => array(
            +            GESHI_SEARCH => '^\[.+\]',
            +            GESHI_REPLACE => '\\0',
            +            GESHI_MODIFIERS => 'm',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        //stack number
            +        1 => array(
            +            GESHI_SEARCH => '^#\d+',
            +            GESHI_REPLACE => '\\0',
            +            GESHI_MODIFIERS => 'm',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        //Thread X (Thread...)
            +        2 => array(
            +            GESHI_SEARCH => '^Thread \d.+$',
            +            GESHI_REPLACE => '\\0',
            +            GESHI_MODIFIERS => 'm',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        //Files with linenumbers
            +        3 => array(
            +            GESHI_SEARCH => '(at\s+)(.+)(:\d+\s*)$',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => 'm',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => '\\3'
            +            ),
            +        //Libs without linenumbers
            +        4 => array(
            +            GESHI_SEARCH => '(from\s+)(.+)(\s*)$',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => 'm',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => '\\3'
            +            ),
            +        //Line numbers
            +        5 => array(
            +            GESHI_SEARCH => '(:)(\d+)(\s*)$',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => 'm',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => '\\3'
            +            ),
            +        //Location
            +        6 => array(
            +            GESHI_SEARCH => '(\s+)(in\s+)?([^ 0-9][^ ]*)([ \n]+\()',
            +            GESHI_REPLACE => '\\3',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\\1\\2',
            +            GESHI_AFTER => '\\4'
            +            ),
            +        // interesting parts: abort, qFatal, assertions, null ptrs, ...
            +        7 => array(
            +            GESHI_SEARCH => '\b((?:\*__GI_)?(?:__assert_fail|abort)|qFatal|0x0)\b([^\.]|$)',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => '\\2'
            +            ),
            +        // Namespace / Classes
            +        8 => array(
            +            GESHI_SEARCH => '\b(\w+)(::)',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => 'U',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => '\\2'
            +            ),
            +        // make ptr adresses and  uninteresting
            +        9 => '\b(?:0x[a-f0-9]{2,}|value\s+optimized\s+out)\b'
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'PARSER_CONTROL' => array(
            +        'ENABLE_FLAGS' => array(
            +            'NUMBERS' => false
            +            ),
            +        )
            +);
            +
            +// kate: replace-tabs on; indent-width 4;
            diff --git a/vendor/easybook/geshi/geshi/genero.php b/vendor/easybook/geshi/geshi/genero.php
            new file mode 100644
            index 0000000000..2ab24855f4
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/genero.php
            @@ -0,0 +1,461 @@
            + 'genero',
            +    'COMMENT_SINGLE' => array(1 => '--', 2 => '#'),
            +    'COMMENT_MULTI' => array('{' => '}'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            "ABSOLUTE",
            +            "ACCEPT",
            +            "ACTION",
            +            "ADD",
            +            "AFTER",
            +            "ALL",
            +            "ALTER",
            +            "AND",
            +            "ANY",
            +            "APPEND",
            +            "APPLICATION",
            +            "AS",
            +            "AT",
            +            "ATTRIBUTE",
            +            "ATTRIBUTES",
            +            "AUDIT",
            +            "AVG",
            +            "BEFORE",
            +            "BEGIN",
            +            "BETWEEN",
            +            "BORDER",
            +            "BOTTOM",
            +            "BREAKPOINT",
            +            "BUFFER",
            +            "BUFFERED",
            +            "BY",
            +            "CALL",
            +            "CANCEL",
            +            "CASE",
            +            "CENTURY",
            +            "CHANGE",
            +            "CHECK",
            +            "CLEAR",
            +            "CLIPPED",
            +            "CLOSE",
            +            "CLUSTER",
            +            "COLUMN",
            +            "COLUMNS",
            +            "COMMAND",
            +            "COMMENT",
            +            "COMMIT",
            +            "COMMITTED",
            +            "CONCURRENT ",
            +            "CONNECT",
            +            "CONNECTION",
            +            "CONSTANT",
            +            "CONSTRAINED",
            +            "CONSTRAINT",
            +            "CONSTRUCT",
            +            "CONTINUE",
            +            "CONTROL",
            +            "COUNT",
            +            "CREATE",
            +            "CROSS",
            +            "CURRENT",
            +            "DATABASE",
            +            "DBA",
            +            "DEC",
            +            "DECLARE",
            +            "DEFAULT",
            +            "DEFAULTS",
            +            "DEFER",
            +            "DEFINE",
            +            "DELETE",
            +            "DELIMITER",
            +            "DESCRIBE",
            +            "DESTINATION",
            +            "DIM",
            +            "DIALOG",
            +            "DIMENSION",
            +            "DIRTY",
            +            "DISCONNECT",
            +            "DISPLAY",
            +            "DISTINCT",
            +            "DORMANT",
            +            "DOWN",
            +            "DROP",
            +            "DYNAMIC",
            +            "ELSE",
            +            "END",
            +            "ERROR",
            +            "ESCAPE",
            +            "EVERY",
            +            "EXCLUSIVE",
            +            "EXECUTE",
            +            "EXISTS",
            +            "EXIT",
            +            "EXPLAIN",
            +            "EXTEND",
            +            "EXTENT",
            +            "EXTERNAL",
            +            "FETCH",
            +            "FGL_DRAWBOX",
            +            "FIELD",
            +            "FIELD_TOUCHED",
            +            "FILE",
            +            "FILL",
            +            "FINISH",
            +            "FIRST",
            +            "FLOAT",
            +            "FLUSH",
            +            "FOR",
            +            "FOREACH",
            +            "FORM",
            +            "FORMAT",
            +            "FOUND",
            +            "FRACTION",
            +            "FREE",
            +            "FROM",
            +            "FULL",
            +            "FUNCTION",
            +            "GET_FLDBUF",
            +            "GLOBALS",
            +            "GO",
            +            "GOTO",
            +            "GRANT",
            +            "GROUP",
            +            "HAVING",
            +            "HEADER",
            +            "HELP",
            +            "HIDE",
            +            "HOLD",
            +            "HOUR",
            +            "IDLE",
            +            "IF",
            +            "IMAGE",
            +            "IMMEDIATE",
            +            "IN",
            +            "INDEX",
            +            "INFIELD",
            +            "INITIALIZE",
            +            "INNER",
            +            "INPUT",
            +            "INSERT",
            +            "INTERRUPT",
            +            "INTERVAL",
            +            "INTO",
            +            "INVISIBLE",
            +            "IS",
            +            "ISOLATION",
            +            "JOIN",
            +            "KEEP",
            +            "KEY",
            +            "LABEL",
            +            "LAST",
            +            "LEFT",
            +            "LENGTH",
            +            "LET",
            +            "LIKE",
            +            "LINE",
            +            "LINENO",
            +            "LINES",
            +            "LOAD",
            +            "LOCATE",
            +            "LOCK",
            +            "LOG",
            +            "LSTR",
            +            "MAIN",
            +            "MARGIN",
            +            "MATCHES",
            +            "MAX",
            +            "MAXCOUNT",
            +            "MDY",
            +            "MEMORY",
            +            "MENU",
            +            "MESSAGE",
            +            "MIN",
            +            "MINUTE",
            +            "MOD",
            +            "MODE",
            +            "MODIFY",
            +            "MONEY",
            +            "NAME",
            +            "NEED",
            +            "NEXT",
            +            "NO",
            +            "NORMAL",
            +            "NOT",
            +            "NOTFOUND",
            +            "NULL",
            +            "NUMERIC",
            +            "OF",
            +            "ON",
            +            "OPEN",
            +            "OPTION",
            +            "OPTIONS",
            +            "OR",
            +            "ORDER",
            +            "OTHERWISE",
            +            "OUTER",
            +            "OUTPUT",
            +            "PAGE",
            +            "PAGENO",
            +            "PAUSE",
            +            "PERCENT",
            +            "PICTURE",
            +            "PIPE",
            +            "PRECISION",
            +            "PREPARE",
            +            "PREVIOUS",
            +            "PRINT",
            +            "PRINTER",
            +            "PRINTX",
            +            "PRIOR",
            +            "PRIVILEGES",
            +            "PROCEDURE",
            +            "PROGRAM",
            +            "PROMPT",
            +            "PUBLIC",
            +            "PUT",
            +            "QUIT",
            +            "READ",
            +            "REAL",
            +            "RECORD",
            +            "RECOVER",
            +            "RED ",
            +            "RELATIVE",
            +            "RENAME",
            +            "REOPTIMIZATION",
            +            "REPEATABLE",
            +            "REPORT",
            +            "RESOURCE",
            +            "RETURN",
            +            "RETURNING",
            +            "REVERSE",
            +            "REVOKE",
            +            "RIGHT",
            +            "ROLLBACK",
            +            "ROLLFORWARD",
            +            "ROW",
            +            "ROWS",
            +            "RUN",
            +            "SCHEMA",
            +            "SCREEN",
            +            "SCROLL",
            +            "SECOND",
            +            "SELECT",
            +            "SERIAL",
            +            "SET",
            +            "SFMT",
            +            "SHARE",
            +            "SHIFT",
            +            "SHOW",
            +            "SIGNAL ",
            +            "SIZE",
            +            "SKIP",
            +            "SLEEP",
            +            "SOME",
            +            "SPACE",
            +            "SPACES",
            +            "SQL",
            +            "SQLERRMESSAGE",
            +            "SQLERROR",
            +            "SQLSTATE",
            +            "STABILITY",
            +            "START",
            +            "STATISTICS",
            +            "STEP",
            +            "STOP",
            +            "STYLE",
            +            "SUM",
            +            "SYNONYM",
            +            "TABLE",
            +            "TEMP",
            +            "TERMINATE",
            +            "TEXT",
            +            "THEN",
            +            "THROUGH",
            +            "THRU",
            +            "TO",
            +            "TODAY",
            +            "TOP",
            +            "TRAILER",
            +            "TRANSACTION ",
            +            "UNBUFFERED",
            +            "UNCONSTRAINED",
            +            "UNDERLINE",
            +            "UNION",
            +            "UNIQUE",
            +            "UNITS",
            +            "UNLOAD",
            +            "UNLOCK",
            +            "UP",
            +            "UPDATE",
            +            "USE",
            +            "USER",
            +            "USING",
            +            "VALIDATE",
            +            "VALUE",
            +            "VALUES",
            +            "VARCHAR",
            +            "VIEW",
            +            "WAIT",
            +            "WAITING",
            +            "WARNING",
            +            "WHEN",
            +            "WHENEVER",
            +            "WHERE",
            +            "WHILE",
            +            "WINDOW",
            +            "WITH",
            +            "WITHOUT",
            +            "WORDWRAP",
            +            "WORK",
            +            "WRAP"
            +            ),
            +        2 => array(
            +            '&IFDEF', '&ENDIF'
            +            ),
            +        3 => array(
            +            "ARRAY",
            +            "BYTE",
            +            "CHAR",
            +            "CHARACTER",
            +            "CURSOR",
            +            "DATE",
            +            "DATETIME",
            +            "DECIMAL",
            +            "DOUBLE",
            +            "FALSE",
            +            "INT",
            +            "INTEGER",
            +            "SMALLFLOAT",
            +            "SMALLINT",
            +            "STRING",
            +            "TIME",
            +            "TRUE"
            +            ),
            +        4 => array(
            +            "BLACK",
            +            "BLINK",
            +            "BLUE",
            +            "BOLD",
            +            "ANSI",
            +            "ASC",
            +            "ASCENDING",
            +            "ASCII",
            +            "CYAN",
            +            "DESC",
            +            "DESCENDING",
            +            "GREEN",
            +            "MAGENTA",
            +            "OFF",
            +            "WHITE",
            +            "YELLOW",
            +            "YEAR",
            +            "DAY",
            +            "MONTH",
            +            "WEEKDAY"
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '+', '-', '*', '?', '=', '/', '%', '>', '<', '^', '!', '|', ':',
            +        '(', ')', '[', ']'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0600FF;',
            +            2 => 'color: #0000FF; font-weight: bold;',
            +            3 => 'color: #008000;',
            +            4 => 'color: #FF0000;',
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #008080; font-style: italic;',
            +            2 => 'color: #008080;',
            +            'MULTI' => 'color: #008080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #008080; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #808080;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #FF0000;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #0000FF;',
            +            2 => 'color: #0000FF;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #008000;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/genie.php b/vendor/easybook/geshi/geshi/genie.php
            new file mode 100644
            index 0000000000..3bab1b7b77
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/genie.php
            @@ -0,0 +1,155 @@
            + 'Genie',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(
            +        //Using and Namespace directives (basic support)
            +        //Please note that the alias syntax for using is not supported
            +        3 => '/(?:(?<=using[\\n\\s])|(?<=namespace[\\n\\s]))[\\n\\s]*([a-zA-Z0-9_]+\\.)*[a-zA-Z0-9_]+[\n\s]*(?=[;=])/i'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'HARDQUOTE' => array('@"', '"'),
            +    'HARDESCAPE' => array('""'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'and', 'as', 'abstract', 'break', 'case', 'cast', 'catch', 'const',
            +            'construct', 'continue', 'default', 'def', 'delete', 'div',
            +            'dynamic', 'do', 'downto', 'else', 'ensures', 'except', 'extern',
            +            'false', 'final', 'finally', 'for', 'foreach', 'get', 'if', 'in',
            +            'init', 'inline', 'internal', 'implements', 'lock', 'not', 'null',
            +            'of', 'or', 'otherwise', 'out', 'override', 'pass', 'raise',
            +            'raises', 'readonly', 'ref', 'requires', 'self', 'set', 'static',
            +            'super', 'switch', 'to', 'true', 'try', 'unless', 'uses', 'var', 'virtual',
            +            'volatile', 'void', 'when', 'while'
            +            ),
            +//        2 => array(
            +//            ),
            +        3 => array(
            +            'is', 'isa', 'new', 'owned', 'sizeof', 'typeof', 'unchecked',
            +            'unowned', 'weak'
            +            ),
            +        4 => array(
            +            'bool', 'byte', 'class', 'char', 'date', 'datetime', 'decimal', 'delegate',
            +            'double', 'enum', 'event', 'exception', 'float', 'int', 'interface',
            +            'long', 'object', 'prop', 'sbyte', 'short', 'single', 'string',
            +            'struct', 'ulong', 'ushort'
            +            ),
            +//        5 => array(
            +//            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '+', '-', '*', '?', '=', '/', '%', '&', '>', '<', '^', '!', ':', ';',
            +        '(', ')', '{', '}', '[', ']', '|'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +//        2 => false,
            +        3 => false,
            +        4 => false,
            +//        5 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0600FF;',
            +//            2 => 'color: #FF8000; font-weight: bold;',
            +            3 => 'color: #008000;',
            +            4 => 'color: #FF0000;',
            +//            5 => 'color: #000000;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #008080; font-style: italic;',
            +//            2 => 'color: #008080;',
            +            3 => 'color: #008080;',
            +            'MULTI' => 'color: #008080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #008080; font-weight: bold;',
            +            'HARD' => 'color: #008080; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #666666;',
            +            'HARD' => 'color: #666666;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #FF0000;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #0000FF;',
            +            2 => 'color: #0000FF;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #008000;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +//        2 => '',
            +        3 => '',
            +        4 => '',
            +//        5 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4,
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            'DISALLOWED_BEFORE' => "(?|^])",
            +            'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_<\|%\\-])"
            +        )
            +    )
            +);
            diff --git a/vendor/easybook/geshi/geshi/gettext.php b/vendor/easybook/geshi/geshi/gettext.php
            new file mode 100644
            index 0000000000..eb928bf6cb
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/gettext.php
            @@ -0,0 +1,95 @@
            + 'GNU Gettext',
            +    'COMMENT_SINGLE' => array('#:', '#.', '#,', '#|', '#'),
            +    'COMMENT_MULTI' => array(),
            +    'COMMENT_REGEXP' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array('msgctxt', 'msgid_plural', 'msgid', 'msgstr'),
            +    ),
            +    'SYMBOLS' => array(),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +    ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000000; font-weight: bold;'
            +        ),
            +        'COMMENTS' => array(
            +            0 => 'color: #000099;',
            +            1 => 'color: #000099;',
            +            2 => 'color: #000099;',
            +            3 => 'color: #006666;',
            +            4 => 'color: #666666; font-style: italic;',
            +        ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +        ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +        ),
            +        'REGEXPS' => array(),
            +        'SYMBOLS' => array(),
            +        'NUMBERS' => array(
            +            0 => 'color: #000099;'
            +        ),
            +        'METHODS' => array(),
            +        'SCRIPT' => array(),
            +        'BRACKETS' => array(
            +            0 => 'color: #000099;'
            +        ),
            +    ),
            +    'URLS' => array(
            +        1 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(),
            +    'REGEXPS' => array(),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4,
            +);
            diff --git a/vendor/easybook/geshi/geshi/glsl.php b/vendor/easybook/geshi/geshi/glsl.php
            new file mode 100644
            index 0000000000..d254bb90f8
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/glsl.php
            @@ -0,0 +1,204 @@
            + 'glSlang',
            +    'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(
            +        //Multiline-continued single-line comments
            +        1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m',
            +        //Multiline-continued preprocessor define
            +        2 => '/#(?:\\\\\\\\|\\\\\\n|.)*$/m'
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'if', 'else', 'for', 'while', 'do', 'break', 'continue', 'asm',
            +            'switch', 'case', 'default', 'return', 'discard',
            +            'namespace', 'using', 'sizeof', 'cast'
            +            ),
            +        2 => array(
            +            'const', 'uniform', 'attribute', 'centroid', 'varying', 'invariant',
            +            'in', 'out', 'inout', 'input', 'output', 'typedef', 'volatile',
            +            'public', 'static', 'extern', 'external', 'packed',
            +            'inline', 'noinline', 'noperspective', 'flat'
            +            ),
            +        3 => array(
            +            'void', 'bool', 'int', 'long', 'short', 'float', 'half', 'fixed',
            +            'unsigned', 'lowp', 'mediump', 'highp', 'precision',
            +            'vec2', 'vec3', 'vec4', 'bvec2', 'bvec3', 'bvec4',
            +            'dvec2', 'dvec3', 'dvec4', 'fvec2', 'fvec3', 'fvec4',
            +            'hvec2', 'hvec3', 'hvec4', 'ivec2', 'ivec3', 'ivec4',
            +            'mat2', 'mat3', 'mat4', 'mat2x2', 'mat3x2', 'mat4x2',
            +            'mat2x3', 'mat3x3', 'mat4x3', 'mat2x4', 'mat3x4', 'mat4x4',
            +            'sampler1D', 'sampler2D', 'sampler3D', 'samplerCube',
            +            'sampler1DShadow', 'sampler2DShadow',
            +            'struct', 'class', 'union', 'enum', 'interface', 'template'
            +            ),
            +        4 => array(
            +            'this', 'false', 'true'
            +            ),
            +        5 => array(
            +            'radians', 'degrees', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan',
            +            'pow', 'exp2', 'log2', 'sqrt', 'inversesqrt', 'abs', 'sign', 'ceil',
            +            'floor', 'fract', 'mod', 'min', 'max', 'clamp', 'mix', 'step',
            +            'smoothstep', 'length', 'distance', 'dot', 'cross', 'normalize',
            +            'ftransform', 'faceforward', 'reflect', 'matrixCompMult', 'equal',
            +            'lessThan', 'lessThanEqual', 'greaterThan', 'greaterThanEqual',
            +            'notEqual', 'any', 'all', 'not', 'texture1D', 'texture1DProj',
            +            'texture1DLod', 'texture1DProjLod', 'texture2D', 'texture2DProj',
            +            'texture2DLod', 'texture2DProjLod', 'texture3D', 'texture3DProj',
            +            'texture3DLod', 'texture3DProjLod', 'textureCube', 'textureCubeLod',
            +            'shadow1D', 'shadow1DProj', 'shadow1DLod', 'shadow1DProjLod',
            +            'shadow2D', 'shadow2DProj', 'shadow2DLod', 'shadow2DProjLod',
            +            'noise1', 'noise2', 'noise3', 'noise4'
            +            ),
            +        6 => array(
            +            'gl_Position', 'gl_PointSize', 'gl_ClipVertex', 'gl_FragColor',
            +            'gl_FragData', 'gl_FragDepth', 'gl_FragCoord', 'gl_FrontFacing',
            +            'gl_Color', 'gl_SecondaryColor', 'gl_Normal', 'gl_Vertex',
            +            'gl_MultiTexCoord0', 'gl_MultiTexCoord1', 'gl_MultiTexCoord2',
            +            'gl_MultiTexCoord3', 'gl_MultiTexCoord4', 'gl_MultiTexCoord5',
            +            'gl_MultiTexCoord6', 'gl_MultiTexCoord7', 'gl_FogCoord',
            +            'gl_MaxLights', 'gl_MaxClipPlanes', 'gl_MaxTextureUnits',
            +            'gl_MaxTextureCoords', 'gl_MaxVertexAttribs', 'gl_MaxVaryingFloats',
            +            'gl_MaxVertexUniformComponents', 'gl_MaxVertexTextureImageUnits',
            +            'gl_MaxCombinedTextureImageUnits', 'gl_MaxTextureImageUnits',
            +            'gl_MaxFragmentUniformComponents', 'gl_MaxDrawBuffers', 'gl_Point',
            +            'gl_ModelViewMatrix', 'gl_ProjectionMatrix', 'gl_FrontMaterial',
            +            'gl_ModelViewProjectionMatrix', 'gl_TextureMatrix', 'gl_ClipPlane',
            +            'gl_NormalMatrix', 'gl_ModelViewMatrixInverse', 'gl_BackMaterial',
            +            'gl_ProjectionMatrixInverse', 'gl_ModelViewProjectionMatrixInverse',
            +            'gl_TextureMatrixInverse', 'gl_ModelViewMatrixTranspose', 'gl_Fog',
            +            'gl_ProjectionMatrixTranspose', 'gl_NormalScale', 'gl_DepthRange',
            +            'gl_odelViewProjectionMatrixTranspose', 'gl_TextureMatrixTranspose',
            +            'gl_ModelViewMatrixInverseTranspose', 'gl_LightSource',
            +            'gl_ProjectionMatrixInverseTranspose', 'gl_LightModel',
            +            'gl_ModelViewProjectionMatrixInverseTranspose', 'gl_TexCoord',
            +            'gl_TextureMatrixInverseTranspose', 'gl_TextureEnvColor',
            +            'gl_FrontLightModelProduct', 'gl_BackLightModelProduct',
            +            'gl_FrontLightProduct', 'gl_BackLightProduct', 'gl_ObjectPlaneS',
            +            'gl_ObjectPlaneT', 'gl_ObjectPlaneR', 'gl_ObjectPlaneQ',
            +            'gl_EyePlaneS', 'gl_EyePlaneT', 'gl_EyePlaneR', 'gl_EyePlaneQ',
            +            'gl_FrontColor', 'gl_BackColor', 'gl_FrontSecondaryColor',
            +            'gl_BackSecondaryColor', 'gl_FogFragCoord', 'gl_PointCoord'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^',
            +        '&', '?', ':', '.', '|', ';', ',', '<', '>'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        5 => true,
            +        6 => true,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000000; font-weight: bold;',
            +            2 => 'color: #333399; font-weight: bold;',
            +            3 => 'color: #000066; font-weight: bold;',
            +            4 => 'color: #333399; font-weight: bold;',
            +            5 => 'color: #993333; font-weight: bold;',
            +            6 => 'color: #551111;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; font-style: italic;',
            +            2 => 'color: #009900;',
            +            'MULTI' => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000066;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #0000ff;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #006600;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #000066;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => '',
            +        6 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4,
            +    'PARSER_CONTROL' => array(
            +        'OOLANG' => array(
            +            'MATCH_BEFORE' => '',
            +            'MATCH_AFTER' => '[a-zA-Z_][a-zA-Z0-9_]*',
            +            'MATCH_SPACES' => '[\s]*'
            +        )
            +    )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/gml.php b/vendor/easybook/geshi/geshi/gml.php
            new file mode 100644
            index 0000000000..58387b38af
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/gml.php
            @@ -0,0 +1,504 @@
            +5 and KEYWORDS=>6 sections (actually, they were empty).
            + *     I was planning of using those for the GML functions available only in the
            + *     registered version of the program, but not anymore.
            + *
            + * 2005/06/26 (1.0.3)
            + *  -  First Release.
            + *
            + * TODO (updated 2005/11/11)
            + * -------------------------
            + *  -  Test it for a while and make the appropiate corrections.
            + *
            + *************************************************************************************
            + *
            + *     This file is part of GeSHi.
            + *
            + *   GeSHi is free software; you can redistribute it and/or modify
            + *   it under the terms of the GNU General Public License as published by
            + *   the Free Software Foundation; either version 2 of the License, or
            + *   (at your option) any later version.
            + *
            + *   GeSHi is distributed in the hope that it will be useful,
            + *   but WITHOUT ANY WARRANTY; without even the implied warranty of
            + *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
            + *   GNU General Public License for more details.
            + *
            + *   You should have received a copy of the GNU General Public License
            + *   along with GeSHi; if not, write to the Free Software
            + *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
            + *
            + ************************************************************************************/
            +
            +$language_data = array (
            +    'LANG_NAME' => 'GML',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'"),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        // language keywords
            +        1 => array(
            +            'break', 'continue', 'do', 'until', 'if', 'else',
            +            'exit', 'for', 'repeat', 'return', 'switch',
            +            'case', 'default', 'var', 'while', 'with', 'div', 'mod',
            +            // GML Language overview
            +            'self', 'other', 'all', 'noone', 'global',
            +            ),
            +        // modifiers and built-in variables
            +        2 => array(
            +            // Game play
            +            'x','y','xprevious','yprevious','xstart','ystart','hspeed','vspeed','direction','speed',
            +            'friction','gravity','gravity_direction',
            +            'path_index','path_position','path_positionprevious','path_speed','path_orientation',
            +            'path_endaction',
            +            'object_index','id','mask_index','solid','persistent','instance_count','instance_id',
            +            'room_speed','fps','current_time','current_year','current_month','current_day','current_weekday',
            +            'current_hour','current_minute','current_second','alarm','timeline_index','timeline_position',
            +            'timeline_speed',
            +            'room','room_first','room_last','room_width','room_height','room_caption','room_persistent',
            +            'score','lives','health','show_score','show_lives','show_health','caption_score','caption_lives',
            +            'caption_health',
            +            'event_type','event_number','event_object','event_action',
            +            'error_occurred','error_last',
            +            // User interaction
            +            'keyboard_lastkey','keyboard_key','keyboard_lastchar','keyboard_string',
            +            'mouse_x','mouse_y','mouse_button','mouse_lastbutton',
            +            // Game Graphics
            +            'sprite_index','sprite_width','sprite_height','sprite_xoffset','sprite_yoffset',
            +            'image_number','image_index','image_speed','image_xscale','image_yscale','image_angle',
            +            'image_alpha','image_blend','bbox_left','bbox_right','bbox_top','bbox_bottom',
            +            'background_color','background_showcolor','background_visible','background_foreground',
            +            'background_index','background_x','background_y','background_width','background_height',
            +            'background_htiled','background_vtiled','background_xscale','background_yscale',
            +            'background_hspeed','background_vspeed','background_blend','background_alpha',
            +            'background','left, top, width, height','depth','visible','xscale','yscale','blend','alpha',
            +            'view_enabled','view_current','view_visible','view_yview','view_wview','view_hview','view_xport',
            +            'view_yport','view_wport','view_hport','view_angle','view_hborder','view_vborder','view_hspeed',
            +            'view_vspeed','view_object',
            +            'transition_kind',
            +            // Files, registry and executing programs
            +            'game_id','working_directory','temp_directory',
            +            'secure_mode',
            +            // Creating particles
            +            'xmin', 'xmax', 'ymin', 'ymax','shape','distribution','particle type','number',
            +            'force','dist','kind','additive', 'parttype1', 'parttype2'
            +            ),
            +        // functions
            +        3 => array(
            +            // Computing things
            +            'random','choose','abs','sign','round','floor','ceil','frac','sqrt','sqr','power','exp','ln',
            +            'log2','log10','logn','sin','cos','tan','arcsin','arccos','arctan','arctan2','degtorad',
            +            'radtodeg','min','max','mean','median','point_distance','point_direction','lengthdir_x',
            +            'lengthdir_y','is_real','is_string',
            +            'chr','ord','real','string','string_format','string_length','string_pos','string_copy',
            +            'string_char_at','string_delete','string_insert','string_replace','string_replace_all',
            +            'string_count','string_lower','string_upper','string_repeat','string_letters','string_digits',
            +            'string_lettersdigits','clipboard_has_text','clipboard_get_text','clipboard_set_text',
            +            'date_current_datetime','date_current_date','date_current_time','date_create_datetime',
            +            'date_create_date','date_create_time','date_valid_datetime','date_valid_date','date_valid_time',
            +            'date_inc_year','date_inc_month','date_inc_week','date_inc_day','date_inc_hour',
            +            'date_inc_minute','date_inc_second','date_get_year','date_get_month','date_get_week',
            +            'date_get_day','date_get_hour', 'date_get_minute','date_get_second','date_get_weekday',
            +            'date_get_day_of_year','date_get_hour_of_year','date_get_minute_of_year',
            +            'date_get_second_of_year','date_year_span','date_month_span','date_week_span','date_day_span',
            +            'date_hour_span','date_minute_span','date_second_span','date_compare_datetime',
            +            'date_compare_date','date_compare_time','date_date_of','date_time_of','date_datetime_string',
            +            'date_date_string','date_time_string','date_days_in_month','date_days_in_year','date_leap_year',
            +            'date_is_today',
            +            // Game play
            +            'motion_set','motion_add','place_free','place_empty','place_meeting','place_snapped',
            +            'move_random','move_snap','move_wrap','move_towards_point','move_bounce_solid','move_bounce_all',
            +            'move_contact_solid','move_contact_all','move_outside_solid','move_outside_all',
            +            'distance_to_point','distance_to_object','position_empty','position_meeting',
            +            'path_start','path_end',
            +            'mp_linear_step','mp_linear_step_object','mp_potential_step','mp_potential_step_object',
            +            'mp_potential_settings','mp_linear_path','mp_linear_path_object', 'mp_potential_path',
            +            'mp_potential_path_object','mp_grid_create','mp_grid_destroy','mp_grid_clear_all',
            +            'mp_grid_clear_cell','mp_grid_clear_rectangle','mp_grid_add_cell','mp_grid_add_rectangle',
            +            'mp_grid_add_instances','mp_grid_path','mp_grid_draw',
            +            'collision_point','collision_rectangle','collision_circle','collision_ellipse','collision_line',
            +            'instance_find','instance_exists','instance_number','instance_position','instance_nearest',
            +            'instance_furthest','instance_place','instance_create','instance_copy','instance_destroy',
            +            'instance_change','position_destroy','position_change',
            +            'instance_deactivate_all','instance_deactivate_object','instance_deactivate_region',
            +            'instance_activate_all','instance_activate_object','instance_activate_region',
            +            'sleep',
            +            'room_goto','room_goto_previous','room_goto_next','room_restart','room_previous','room_next',
            +            'game_end','game_restart','game_save','game_load',
            +            'event_perform', 'event_perform_object','event_user','event_inherited',
            +            'show_debug_message','variable_global_exists','variable_local_exists','variable_global_get',
            +            'variable_global_array_get','variable_global_array2_get','variable_local_get',
            +            'variable_local_array_get','variable_local_array2_get','variable_global_set',
            +            'variable_global_array_set','variable_global_array2_set','variable_local_set',
            +            'variable_local_array_set','variable_local_array2_set','set_program_priority',
            +            // User interaction
            +            'keyboard_set_map','keyboard_get_map','keyboard_unset_map','keyboard_check',
            +            'keyboard_check_pressed','keyboard_check_released','keyboard_check_direct',
            +            'keyboard_get_numlock','keyboard_set_numlock','keyboard_key_press','keyboard_key_release',
            +            'keyboard_clear','io_clear','io_handle','keyboard_wait',
            +            'mouse_check_button','mouse_check_button_pressed','mouse_check_button_released','mouse_clear',
            +            'mouse_wait',
            +            'joystick_exists','joystick_name','joystick_axes','joystick_buttons','joystick_has_pov',
            +            'joystick_direction','joystick_check_button','joystick_xpos','joystick_ypos','joystick_zpos',
            +            'joystick_rpos','joystick_upos','joystick_vpos','joystick_pov',
            +            // Game Graphics
            +            'draw_sprite','draw_sprite_stretched','draw_sprite_tiled','draw_sprite_part','draw_background',
            +            'draw_background_stretched','draw_background_tiled','draw_background_part','draw_sprite_ext',
            +            'draw_sprite_stretched_ext','draw_sprite_tiled_ext','draw_sprite_part_ext','draw_sprite_general',
            +            'draw_background_ext','draw_background_stretched_ext','draw_background_tiled_ext',
            +            'draw_background_part_ext','draw_background_general',
            +            'draw_clear','draw_clear_alpha','draw_point','draw_line','draw_rectangle','draw_roundrect',
            +            'draw_triangle','draw_circle','draw_ellipse','draw_arrow','draw_button','draw_path',
            +            'draw_healthbar','draw_set_color','draw_set_alpha','draw_get_color','draw_get_alpha',
            +            'make_color_rgb','make_color_hsv','color_get_red','color_get_green','color_get_blue',
            +            'color_get_hue','color_get_saturation','color_get_value','merge_color','draw_getpixel',
            +            'screen_save','screen_save_part',
            +            'draw_set_font','draw_set_halign','draw_set_valign','draw_text','draw_text_ext','string_width',
            +            'string_height','string_width_ext','string_height_ext','draw_text_transformed',
            +            'draw_text_ext_transformed','draw_text_color','draw_text_ext_color',
            +            'draw_text_transformed_color','draw_text_ext_transformed_color',
            +            'draw_point_color','draw_line_color','draw_rectangle_color','draw_roundrect_color',
            +            'draw_triangle_color','draw_circle_color','draw_ellipse_color','draw_primitive_begin',
            +            'draw_vertex','draw_vertex_color','draw_primitive_end','sprite_get_texture',
            +            'background_get_texture','texture_preload','texture_set_priority',
            +            'texture_get_width','texture_get_height','draw_primitive_begin_texture','draw_vertex_texture',
            +            'draw_vertex_texture_color','texture_set_interpolation',
            +            'texture_set_blending','texture_set_repeat','draw_set_blend_mode','draw_set_blend_mode_ext',
            +            'surface_create','surface_free','surface_exists','surface_get_width','surface_get_height',
            +            'surface_get_texture','surface_set_target','surface_reset_target','surface_getpixel',
            +            'surface_save','surface_save_part','draw_surface','draw_surface_stretched','draw_surface_tiled',
            +            'draw_surface_part','draw_surface_ext','draw_surface_stretched_ext','draw_surface_tiled_ext',
            +            'draw_surface_part_ext','draw_surface_general','surface_copy','surface_copy_part',
            +            'tile_add','tile_delete','tile_exists','tile_get_x','tile_get_y','tile_get_left','tile_get_top',
            +            'tile_get_width','tile_get_height','tile_get_depth','tile_get_visible','tile_get_xscale',
            +            'tile_get_yscale','tile_get_background','tile_get_blend','tile_get_alpha','tile_set_position',
            +            'tile_set_region','tile_set_background','tile_set_visible','tile_set_depth','tile_set_scale',
            +            'tile_set_blend','tile_set_alpha','tile_layer_hide','tile_layer_show','tile_layer_delete',
            +            'tile_layer_shift','tile_layer_find','tile_layer_delete_at','tile_layer_depth',
            +            'display_get_width','display_get_height','display_get_colordepth','display_get_frequency',
            +            'display_set_size','display_set_colordepth','display_set_frequency','display_set_all',
            +            'display_test_all','display_reset','display_mouse_get_x','display_mouse_get_y','display_mouse_set',
            +            'window_set_visible','window_get_visible','window_set_fullscreen','window_get_fullscreen',
            +            'window_set_showborder','window_get_showborder','window_set_showicons','window_get_showicons',
            +            'window_set_stayontop','window_get_stayontop','window_set_sizeable','window_get_sizeable',
            +            'window_set_caption','window_get_caption','window_set_cursor', 'window_get_cursor',
            +            'window_set_color','window_get_color','window_set_region_scale','window_get_region_scale',
            +            'window_set_position','window_set_size','window_set_rectangle','window_center','window_default',
            +            'window_get_x','window_get_y','window_get_width','window_get_height','window_mouse_get_x',
            +            'window_mouse_get_y','window_mouse_set',
            +            'window_set_region_size','window_get_region_width','window_get_region_height',
            +            'window_view_mouse_get_x','window_view_mouse_get_y','window_view_mouse_set',
            +            'window_views_mouse_get_x','window_views_mouse_get_y','window_views_mouse_set',
            +            'screen_redraw','screen_refresh','set_automatic_draw','set_synchronization','screen_wait_vsync',
            +            // Sound and music)
            +            'sound_play','sound_loop','sound_stop','sound_stop_all','sound_isplaying','sound_volume',
            +            'sound_global_volume','sound_fade','sound_pan','sound_background_tempo','sound_set_search_directory',
            +            'sound_effect_set','sound_effect_chorus','sound_effect_echo',    'sound_effect_flanger',
            +            'sound_effect_gargle','sound_effect_reverb','sound_effect_compressor','sound_effect_equalizer',
            +            'sound_3d_set_sound_position','sound_3d_set_sound_velocity','sound_3d_set_sound_distance',
            +            'sound_3d_set_sound_cone',
            +            'cd_init','cd_present','cd_number','cd_playing','cd_paused','cd_track','cd_length',
            +            'cd_track_length','cd_position','cd_track_position','cd_play','cd_stop','cd_pause','cd_resume',
            +            'cd_set_position','cd_set_track_position','cd_open_door','cd_close_door','MCI_command',
            +            // Splash screens, highscores, and other pop-ups
            +            'show_text','show_image','show_video','show_info','load_info',
            +            'show_message','show_message_ext','show_question','get_integer','get_string',
            +            'message_background','message_alpha','message_button','message_text_font','message_button_font',
            +            'message_input_font','message_mouse_color','message_input_color','message_caption',
            +            'message_position','message_size','show_menu','show_menu_pos','get_color','get_open_filename',
            +            'get_save_filename','get_directory','get_directory_alt','show_error',
            +            'highscore_show','highscore_set_background','highscore_set_border','highscore_set_font',
            +            'highscore_set_colors','highscore_set_strings','highscore_show_ext','highscore_clear',
            +            'highscore_add','highscore_add_current','highscore_value','highscore_name','draw_highscore',
            +            // Resources
            +            'sprite_exists','sprite_get_name','sprite_get_number','sprite_get_width','sprite_get_height',
            +            'sprite_get_transparent','sprite_get_smooth','sprite_get_preload','sprite_get_xoffset',
            +            'sprite_get_yoffset','sprite_get_bbox_left','sprite_get_bbox_right','sprite_get_bbox_top',
            +            'sprite_get_bbox_bottom','sprite_get_bbox_mode','sprite_get_precise',
            +            'sound_exists','sound_get_name','sound_get_kind','sound_get_preload','sound_discard',
            +            'sound_restore',
            +            'background_exists','background_get_name','background_get_width','background_get_height',
            +            'background_get_transparent','background_get_smooth','background_get_preload',
            +            'font_exists','font_get_name','font_get_fontname','font_get_bold','font_get_italic',
            +            'font_get_first','font_get_last',
            +            'path_exists','path_get_name','path_get_length','path_get_kind','path_get_closed',
            +            'path_get_precision','path_get_number','path_get_point_x','path_get_point_y',
            +            'path_get_point_speed','path_get_x','path_get_y','path_get_speed',
            +            'script_exists','script_get_name','script_get_text',
            +            'timeline_exists','timeline_get_name',
            +            'object_exists','object_get_name','object_get_sprite','object_get_solid','object_get_visible',
            +            'object_get_depth','object_get_persistent','object_get_mask','object_get_parent',
            +            'object_is_ancestor',
            +            'room_exists','room_get_name',
            +            // Changing resources
            +            'sprite_set_offset','sprite_set_bbox_mode','sprite_set_bbox','sprite_set_precise',
            +            'sprite_duplicate','sprite_assign','sprite_merge','sprite_add','sprite_replace',
            +            'sprite_create_from_screen','sprite_add_from_screen','sprite_create_from_surface',
            +            'sprite_add_from_surface','sprite_delete','sprite_set_alpha_from_sprite',
            +            'sound_add','sound_replace','sound_delete',
            +            'background_duplicate','background_assign','background_add','background_replace',
            +            'background_create_color','background_create_gradient','background_create_from_screen',
            +            'background_create_from_surface','background_delete','background_set_alpha_from_background',
            +            'font_add','font_add_sprite','font_replace_sprite','font_delete',
            +            'path_set_kind','path_set_closed','path_set_precision','path_add','path_delete','path_duplicate',
            +            'path_assign','path_append','path_add_point','path_insert_point','path_change_point',
            +            'path_delete_point','path_clear_points','path_reverse','path_mirror','path_flip','path_rotate',
            +            'path_scale','path_shift',
            +            'execute_string','execute_file','script_execute',
            +            'timeline_add','timeline_delete','timeline_moment_add','timeline_moment_clear',
            +            'object_set_sprite','object_set_solid','object_set_visible','object_set_depth',
            +            'object_set_persistent','object_set_mask','object_set_parent','object_add','object_delete',
            +            'object_event_add','object_event_clear',
            +            'room_set_width','room_set_height','room_set_caption','room_set_persistent','room_set_code',
            +            'room_set_background_color','room_set_background','room_set_view','room_set_view_enabled',
            +            'room_add','room_duplicate','room_assign','room_instance_add','room_instance_clear',
            +            'room_tile_add','room_tile_add_ext','room_tile_clear',
            +            // Files, registry and executing programs
            +            'file_text_open_read','file_text_open_write','file_text_open_append','file_text_close',
            +            'file_text_write_string','file_text_write_real','file_text_writeln','file_text_read_string',
            +            'file_text_read_real','file_text_readln','file_text_eof','file_exists','file_delete',
            +            'file_rename','file_copy','directory_exists','directory_create','file_find_first',
            +            'file_find_next','file_find_close','file_attributes', 'filename_name','filename_path',
            +            'filename_dir','filename_drive','filename_ext','filename_change_ext','file_bin_open',
            +            'file_bin_rewrite','file_bin_close','file_bin_size','file_bin_position','file_bin_seek',
            +            'file_bin_write_byte','file_bin_read_byte','parameter_count','parameter_string',
            +            'environment_get_variable',
            +            'registry_write_string','registry_write_real','registry_read_string','registry_read_real',
            +            'registry_exists','registry_write_string_ext','registry_write_real_ext',
            +            'registry_read_string_ext','registry_read_real_ext','registry_exists_ext','registry_set_root',
            +            'ini_open','ini_close','ini_read_string','ini_read_real','ini_write_string','ini_write_real',
            +            'ini_key_exists','ini_section_exists','ini_key_delete','ini_section_delete',
            +            'execute_program','execute_shell',
            +            // Data structures
            +            'ds_stack_create','ds_stack_destroy','ds_stack_clear','ds_stack_size','ds_stack_empty',
            +            'ds_stack_push','ds_stack_pop','ds_stack_top',
            +            'ds_queue_create','ds_queue_destroy','ds_queue_clear','ds_queue_size','ds_queue_empty',
            +            'ds_queue_enqueue','ds_queue_dequeue','ds_queue_head','ds_queue_tail',
            +            'ds_list_create','ds_list_destroy','ds_list_clear','ds_list_size','ds_list_empty','ds_list_add',
            +            'ds_list_insert','ds_list_replace','ds_list_delete','ds_list_find_index','ds_list_find_value',
            +            'ds_list_sort',
            +            'ds_map_create','ds_map_destroy','ds_map_clear','ds_map_size','ds_map_empty','ds_map_add',
            +            'ds_map_replace','ds_map_delete','ds_map_exists','ds_map_find_value','ds_map_find_previous',
            +            'ds_map_find_next','ds_map_find_first','ds_map_find_last',
            +            'ds_priority_create','ds_priority_destroy','ds_priority_clear','ds_priority_size',
            +            'ds_priority_empty','ds_priority_add','ds_priority_change_priority','ds_priority_find_priority',
            +            'ds_priority_delete_value','ds_priority_delete_min','ds_priority_find_min',
            +            'ds_priority_delete_max','ds_priority_find_max',
            +            'ds_grid_create','ds_grid_destroy','ds_grid_resize','ds_grid_width','ds_grid_height',
            +            'ds_grid_clear','ds_grid_set','ds_grid_add','ds_grid_multiply','ds_grid_set_region',
            +            'ds_grid_add_region','ds_grid_multiply_region','ds_grid_set_disk','ds_grid_add_disk',
            +            'ds_grid_multiply_disk','ds_grid_get','ds_grid_get_sum','ds_grid_get_max','ds_grid_get_min',
            +            'ds_grid_get_mean','ds_grid_get_disk_sum','ds_grid_get_disk_min','ds_grid_get_disk_max',
            +            'ds_grid_get_disk_mean','ds_grid_value_exists','ds_grid_value_x','ds_grid_value_y',
            +            'ds_grid_value_disk_exists','ds_grid_value_disk_x','ds_grid_value_disk_y',
            +            // Creating particles
            +            'effect_create_below','effect_create_above','effect_clear',
            +            'part_type_create','part_type_destroy','part_type_exists','part_type_clear','part_type_shape',
            +            'part_type_sprite','part_type_size','part_type_scale',
            +            'part_type_orientation','part_type_color1','part_type_color2','part_type_color3',
            +            'part_type_color_mix','part_type_color_rgb','part_type_color_hsv',
            +            'part_type_alpha1','part_type_alpha2','part_type_alpha3','part_type_blend','part_type_life',
            +            'part_type_step','part_type_death','part_type_speed','part_type_direction','part_type_gravity',
            +            'part_system_create','part_system_destroy','part_system_exists','part_system_clear',
            +            'part_system_draw_order','part_system_depth','part_system_position',
            +            'part_system_automatic_update','part_system_automatic_draw','part_system_update',
            +            'part_system_drawit','part_particles_create','part_particles_create_color',
            +            'part_particles_clear','part_particles_count',
            +            'part_emitter_create','part_emitter_destroy','part_emitter_destroy_all','part_emitter_exists',
            +            'part_emitter_clear','part_emitter_region','part_emitter_burst','part_emitter_stream',
            +            'part_attractor_create','part_attractor_destroy','part_attractor_destroy_all',
            +            'part_attractor_exists','part_attractor_clear','part_attractor_position','part_attractor_force',
            +            'part_destroyer_create','part_destroyer_destroy','part_destroyer_destroy_all',
            +            'part_destroyer_exists','part_destroyer_clear','part_destroyer_region',
            +            'part_deflector_create','part_deflector_destroy','part_deflector_destroy_all',
            +            'part_deflector_exists','part_deflector_clear','part_deflector_region','part_deflector_kind',
            +            'part_deflector_friction',
            +            'part_changer_create','part_changer_destroy','part_changer_destroy_all','part_changer_exists',
            +            'part_changer_clear','part_changer_region','part_changer_types','part_changer_kind',
            +            // Multiplayer games
            +            'mplay_init_ipx','mplay_init_tcpip','mplay_init_modem','mplay_init_serial',
            +            'mplay_connect_status','mplay_end','mplay_ipaddress',
            +            'mplay_session_create','mplay_session_find','mplay_session_name','mplay_session_join',
            +            'mplay_session_mode','mplay_session_status','mplay_session_end',
            +            'mplay_player_find','mplay_player_name','mplay_player_id',
            +            'mplay_data_write','mplay_data_read','mplay_data_mode',
            +            'mplay_message_send','mplay_message_send_guaranteed','mplay_message_receive','mplay_message_id',
            +            'mplay_message_value','mplay_message_player','mplay_message_name','mplay_message_count',
            +            'mplay_message_clear',
            +            // Using DLL's
            +            'external_define','external_call','external_free','window_handle',
            +            // 3D Graphics
            +            'd3d_start','d3d_end','d3d_set_hidden','d3d_set_perspective',
            +            'd3d_set_depth',
            +            'd3d_primitive_begin','d3d_vertex','d3d_vertex_color','d3d_primitive_end',
            +            'd3d_primitive_begin_texture','d3d_vertex_texture','d3d_vertex_texture_color','d3d_set_culling',
            +            'd3d_draw_block','d3d_draw_cylinder','d3d_draw_cone','d3d_draw_ellipsoid','d3d_draw_wall',
            +            'd3d_draw_floor',
            +            'd3d_set_projection','d3d_set_projection_ext','d3d_set_projection_ortho',
            +            'd3d_set_projection_perspective',
            +            'd3d_transform_set_identity','d3d_transform_set_translation','d3d_transform_set_scaling',
            +            'd3d_transform_set_rotation_x','d3d_transform_set_rotation_y','d3d_transform_set_rotation_z',
            +            'd3d_transform_set_rotation_axis','d3d_transform_add_translation','d3d_transform_add_scaling',
            +            'd3d_transform_add_rotation_x','d3d_transform_add_rotation_y','d3d_transform_add_rotation_z',
            +            'd3d_transform_add_rotation_axis','d3d_transform_stack_clear','d3d_transform_stack_empty',
            +            'd3d_transform_stack_push','d3d_transform_stack_pop','d3d_transform_stack_top',
            +            'd3d_transform_stack_discard',
            +            'd3d_set_fog',
            +            'd3d_set_lighting','d3d_set_shading','d3d_light_define_direction','d3d_light_define_point',
            +            'd3d_light_enable','d3d_vertex_normal','d3d_vertex_normal_color','d3d_vertex_normal_texture',
            +            'd3d_vertex_normal_texture_color',
            +            'd3d_model_create','d3d_model_destroy','d3d_model_clear','d3d_model_save','d3d_model_load',
            +            'd3d_model_draw','d3d_model_primitive_begin','d3d_model_vertex','d3d_model_vertex_color',
            +            'd3d_model_vertex_texture','d3d_model_vertex_texture_color','d3d_model_vertex_normal',
            +            'd3d_model_vertex_normal_color','d3d_model_vertex_normal_texture',
            +            'd3d_model_vertex_normal_texture_color','d3d_model_primitive_end','d3d_model_block',
            +            'd3d_model_cylinder','d3d_model_cone','d3d_model_ellipsoid','d3d_model_wall','d3d_model_floor'
            +            ),
            +        // constants
            +        4 => array(
            +            'true', 'false', 'pi',
            +            'ev_destroy','ev_step','ev_alarm','ev_keyboard','ev_mouse','ev_collision','ev_other','ev_draw',
            +            'ev_keypress','ev_keyrelease','ev_left_button','ev_right_button','ev_middle_button',
            +            'ev_no_button','ev_left_press','ev_right_press','ev_middle_press','ev_left_release',
            +            'ev_right_release','ev_middle_release','ev_mouse_enter','ev_mouse_leave','ev_mouse_wheel_up',
            +            'ev_mouse_wheel_down','ev_global_left_button','ev_global_right_button','ev_global_middle_button',
            +            'ev_global_left_press','ev_global_right_press','ev_global_middle_press','ev_global_left_release',
            +            'ev_global_right_release','ev_global_middle_release','ev_joystick1_left','ev_joystick1_right',
            +            'ev_joystick1_up','ev_joystick1_down','ev_joystick1_button1','ev_joystick1_button2',
            +            'ev_joystick1_button3','ev_joystick1_button4','ev_joystick1_button5','ev_joystick1_button6',
            +            'ev_joystick1_button7','ev_joystick1_button8','ev_joystick2_left','ev_joystick2_right',
            +            'ev_joystick2_up','ev_joystick2_down','ev_joystick2_button1','ev_joystick2_button2',
            +            'ev_joystick2_button3','ev_joystick2_button4','ev_joystick2_button5','ev_joystick2_button6',
            +            'ev_joystick2_button7','ev_joystick2_button8',
            +            'ev_outside','ev_boundary','ev_game_start','ev_game_end','ev_room_start','ev_room_end',
            +            'ev_no_more_lives','ev_no_more_health','ev_animation_end','ev_end_of_path','ev_user0','ev_user1',
            +            'ev_user2','ev_user3','ev_user4','ev_user5','ev_user6','ev_user7','ev_user8','ev_user9',
            +            'ev_user10','ev_user11','ev_user12','ev_user13','ev_user14','ev_user15','ev_step_normal',
            +            'ev_step_begin','ev_step_end',
            +            'vk_nokey','vk_anykey','vk_left','vk_right','vk_up','vk_down','vk_enter','vk_escape','vk_space',
            +            'vk_shift','vk_control','vk_alt','vk_backspace','vk_tab','vk_home','vk_end','vk_delete',
            +            'vk_insert','vk_pageup','vk_pagedown','vk_pause','vk_printscreen',
            +            'vk_f1','vk_f2','vk_f3','vk_f4','vk_f5','vk_f6','vk_f7','vk_f8','vk_f9','vk_f10','vk_f11','vk_f12',
            +            'vk_numpad0','vk_numpad1','vk_numpad2','vk_numpad3','vk_numpad4','vk_numpad5','vk_numpad6',
            +            'vk_numpad7','vk_numpad8','vk_numpad9', 'vk_multiply','vk_divide','vk_add','vk_subtract',
            +            'vk_decimal','vk_lshift','vk_lcontrol','vk_lalt','vk_rshift','vk_rcontrol','vk_ralt',
            +            'c_aqua','c_black','c_blue','c_dkgray','c_fuchsia','c_gray','c_green','c_lime','c_ltgray',
            +            'c_maroon','c_navy','c_olive','c_purple','c_red','c_silver','c_teal','c_white','c_yellow',
            +            'fa_left', 'fa_center','fa_right','fa_top','fa_middle','fa_bottom',
            +            'pr_pointlist','pr_linelist','pr_linestrip','pr_trianglelist','pr_trianglestrip',
            +            'pr_trianglefan',
            +            'cr_none','cr_arrow','cr_cross','cr_beam','cr_size_nesw','cr_size_ns','cr_size_nwse',
            +            'cr_size_we','cr_uparrow','cr_hourglass','cr_drag','cr_nodrop','cr_hsplit','cr_vsplit',
            +            'cr_multidrag','cr_sqlwait','cr_no','cr_appstart','cr_help','cr_handpoint','cr_size_all',
            +            'se_chorus','se_echo','se_flanger','se_gargle','se_reverb','se_compressor','se_equalizer',
            +            'fa_readonly','fa_hidden','fa_sysfile','fa_volumeid','fa_directory','fa_archive',
            +            'pt_shape_pixel','pt_shape_disk','pt_shape_square','pt_shape_line','pt_shape_star',
            +            'pt_shape_circle','pt_shape_ring','pt_shape_sphere','pt_shape_flare','pt_shape_spark',
            +            'pt_shape_explosion','pt_shape_cloud','pt_shape_smoke','pt_shape_snow',
            +            'ps_shape_rectangle','ps_shape_ellipse ','ps_shape_diamond','ps_shape_line',
            +            'ps_distr_linear','ps_distr_gaussian','ps_force_constant','ps_force_linear','ps_force_quadratic',
            +            'ps_deflect_horizontal', 'ps_deflect_vertical',
            +            'ps_change_motion','ps_change_shape','ps_change_all'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '{', '}', '[', ']',
            +        '&&', '||', '^^', '&', '|', '^',
            +        '<', '<=', '==', '!=', '>', '>=', '=',
            +        '<<', '>>',
            +        '+=', '-=', '*=', '/=',
            +        '+', '-', '*', '/',
            +        '!', '~', ',', ';'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'font-weight: bold; color: #000000;',
            +            2 => 'font-weight: bold; color: #000000;',
            +            3 => 'color: navy;',
            +            4 => 'color: #663300;',
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'font-style: italic; color: green;',
            +            'MULTI' => 'font-style: italic; color: green;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000000;' //'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #202020;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66; font-weight: bold;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/gnuplot.php b/vendor/easybook/geshi/geshi/gnuplot.php
            new file mode 100644
            index 0000000000..272ecfaf23
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/gnuplot.php
            @@ -0,0 +1,295 @@
            + 'Gnuplot',
            +    'COMMENT_SINGLE' => array(1 => '#'),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('`', '"', "'"),
            +    'ESCAPE_CHAR' => '\\',
            +    'NUMBERS' =>
            +        GESHI_NUMBER_INT_BASIC |
            +        GESHI_NUMBER_FLT_NONSCI |
            +        GESHI_NUMBER_FLT_SCI_SHORT |
            +        GESHI_NUMBER_FLT_SCI_ZERO,
            +    'KEYWORDS' => array(
            +        // copy output of help command, indent properly and use this replace regexp:
            +        // ([a-z0-9_\-]+)(( )+|$)          =>     '\1',\3
            +
            +        // commands as found in `help commands`
            +        1 => array(
            +            'bind', 'call', 'cd', 'clear',
            +            'exit', 'fit', 'help', 'history',
            +            'if', 'load', 'lower', 'pause',
            +            'plot', 'print', 'pwd', 'quit',
            +            'raise', 'replot', 'reread', 'reset',
            +            'save', 'set', 'shell', 'show',
            +            'splot', 'system', 'test', 'unset',
            +            'update'
            +            ),
            +        2 => array(
            +            // set commands as returned by `help set`
            +            'angles', 'arrow', 'autoscale', 'bars',
            +            'bmargin', 'border', 'boxwidth', 'cbdata',
            +            'cbdtics', 'cblabel', 'cbmtics', 'cbrange',
            +            'cbtics', 'clabel', 'clip', 'cntrparam',
            +            'colorbox', 'contour', 'datafile', 'date_specifiers',
            +            'decimalsign', 'dgrid3d', 'dummy', 'encoding',
            +            'fontpath', 'format', 'grid',
            +            'hidden3d', 'historysize', 'isosamples', 'key',
            +            'label', 'lmargin', 'loadpath', 'locale',
            +            'log', 'logscale', 'macros', 'mapping',
            +            'margin', 'missing', 'mouse', 'multiplot',
            +            'mx2tics', 'mxtics', 'my2tics', 'mytics',
            +            'mztics', 'object', 'offsets', 'origin',
            +            'output', 'palette', 'parametric', 'pm3d',
            +            'pointsize', 'polar', 'rmargin',
            +            'rrange', 'samples', 'size', 'style',
            +            'surface', 'table', 'term', 'terminal',
            +            'termoption', 'tics', 'ticscale', 'ticslevel',
            +            'time_specifiers', 'timefmt', 'timestamp', 'title',
            +            'trange', 'urange', 'view',
            +            'vrange', 'x2data', 'x2dtics', 'x2label',
            +            'x2mtics', 'x2range', 'x2tics', 'x2zeroaxis',
            +            'xdata', 'xdtics', 'xlabel', 'xmtics',
            +            'xrange', 'xtics', 'xyplane', 'xzeroaxis',
            +            'y2data', 'y2dtics', 'y2label', 'y2mtics',
            +            'y2range', 'y2tics', 'y2zeroaxis', 'ydata',
            +            'ydtics', 'ylabel', 'ymtics', 'yrange',
            +            'ytics', 'yzeroaxis', 'zdata', 'zdtics',
            +            'zero', 'zeroaxis', 'zlabel', 'zmtics',
            +            'zrange', 'ztics', 'zzeroaxis',
            +            // same but with leading no
            +            'noangles', 'noarrow', 'noautoscale', 'nobars',
            +            'nobmargin', 'noborder', 'noboxwidth', 'nocbdata',
            +            'nocbdtics', 'nocblabel', 'nocbmtics', 'nocbrange',
            +            'nocbtics', 'noclabel', 'noclip', 'nocntrparam',
            +            'nocolorbox', 'nocontour', 'nodatafile', 'nodate_specifiers',
            +            'nodecimalsign', 'nodgrid3d', 'nodummy', 'noencoding',
            +            'nofit', 'nofontpath', 'noformat', 'nogrid',
            +            'nohidden3d', 'nohistorysize', 'noisosamples', 'nokey',
            +            'nolabel', 'nolmargin', 'noloadpath', 'nolocale',
            +            'nolog', 'nologscale', 'nomacros', 'nomapping',
            +            'nomargin', 'nomissing', 'nomouse', 'nomultiplot',
            +            'nomx2tics', 'nomxtics', 'nomy2tics', 'nomytics',
            +            'nomztics', 'noobject', 'nooffsets', 'noorigin',
            +            'nooutput', 'nopalette', 'noparametric', 'nopm3d',
            +            'nopointsize', 'nopolar', 'noprint', 'normargin',
            +            'norrange', 'nosamples', 'nosize', 'nostyle',
            +            'nosurface', 'notable', 'noterm', 'noterminal',
            +            'notermoption', 'notics', 'noticscale', 'noticslevel',
            +            'notime_specifiers', 'notimefmt', 'notimestamp', 'notitle',
            +            'notmargin', 'notrange', 'nourange', 'noview',
            +            'novrange', 'nox2data', 'nox2dtics', 'nox2label',
            +            'nox2mtics', 'nox2range', 'nox2tics', 'nox2zeroaxis',
            +            'noxdata', 'noxdtics', 'noxlabel', 'noxmtics',
            +            'noxrange', 'noxtics', 'noxyplane', 'noxzeroaxis',
            +            'noy2data', 'noy2dtics', 'noy2label', 'noy2mtics',
            +            'noy2range', 'noy2tics', 'noy2zeroaxis', 'noydata',
            +            'noydtics', 'noylabel', 'noymtics', 'noyrange',
            +            'noytics', 'noyzeroaxis', 'nozdata', 'nozdtics',
            +            'nozero', 'nozeroaxis', 'nozlabel', 'nozmtics',
            +            'nozrange', 'noztics', 'nozzeroaxis',
            +            ),
            +        3 => array(
            +            // predefined variables
            +            'pi', 'NaN', 'GNUTERM',
            +            'GPVAL_X_MIN', 'GPVAL_X_MAX', 'GPVAL_Y_MIN', 'GPVAL_Y_MAX',
            +            'GPVAL_TERM', 'GPVAL_TERMOPTIONS', 'GPVAL_OUTPUT',
            +            'GPVAL_VERSION', 'GPVAL_PATcHLEVEL', 'GPVAL_COMPILE_OPTIONS',
            +            'MOUSE_KEY', 'MOUSE_X', 'MOUSE_X2', 'MOUSE_Y', 'MOUSE_Y2',
            +            'MOUSE_BUTTON', 'MOUSE_SHIFT', 'MOUSE_ALT', 'MOUSE_CTRL'
            +            ),
            +        4 => array(
            +            // predefined functions `help functions`
            +            'abs', 'acos', 'acosh', 'arg',
            +            'asin', 'asinh', 'atan', 'atan2',
            +            'atanh', 'besj0', 'besj1', 'besy0',
            +            'besy1', 'ceil', 'column', 'cos',
            +            'cosh', 'defined', 'erf', 'erfc',
            +            'exists', 'exp', 'floor', 'gamma',
            +            'gprintf', 'ibeta', 'igamma', 'imag',
            +            'int', 'inverf', 'invnorm', 'lambertw',
            +            'lgamma', 'log10', 'norm',
            +            'rand', 'random', 'real', 'sgn',
            +            'sin', 'sinh', 'sprintf', 'sqrt',
            +            'stringcolumn', 'strlen', 'strstrt', 'substr',
            +            'tan', 'tanh', 'timecolumn',
            +            'tm_hour', 'tm_mday', 'tm_min', 'tm_mon',
            +            'tm_sec', 'tm_wday', 'tm_yday', 'tm_year',
            +            'valid', 'word', 'words',
            +            ),
            +        5 => array(
            +            // mixed arguments
            +            // there is no sane way to get these ones easily...
            +            'autofreq', 'x', 'y', 'z',
            +            'lt', 'linetype', 'lw', 'linewidth', 'ls', 'linestyle',
            +            'out', 'rotate by', 'screen',
            +            'enhanced', 'via',
            +            // `help set key`
            +            'on', 'off', 'default', 'inside', 'outside', 'tmargin',
            +            'at', 'left', 'right', 'center', 'top', 'bottom', 'vertical', 'horizontal', 'Left', 'Right',
            +            'noreverse', 'reverse', 'noinvert', 'invert', 'samplen', 'spacing', 'width', 'height',
            +            'noautotitle', 'autotitle', 'noenhanced', 'nobox', 'box',
            +
            +            // help set terminal postscript
            +            'landscape', 'portrait', 'eps', 'defaultplex', 'simplex', 'duplex',
            +            'fontfile', 'add', 'delete', 'nofontfiles', 'level1', 'leveldefault',
            +            'color', 'colour', 'monochrome', 'solid', 'dashed', 'dashlength', 'dl',
            +            'rounded', 'butt', 'palfuncparam', 'blacktext', 'colortext', 'colourtext',
            +            'font',
            +
            +            // help set terminal png
            +            'notransparent', 'transparent', 'nointerlace', 'interlace',
            +            'notruecolor', 'truecolor', 'tiny', 'small', 'medium', 'large', 'giant',
            +            'nocrop', 'crop',
            +
            +            // `help plot`
            +            'acsplines', 'bezier', 'binary', 'csplines',
            +            'every',
            +            'example', 'frequency', 'index', 'matrix',
            +            'ranges', 'sbezier', 'smooth',
            +            'special-filenames', 'thru',
            +            'unique', 'using', 'with',
            +
            +            // `help plotting styles`
            +            'boxerrorbars', 'boxes', 'boxxyerrorbars', 'candlesticks',
            +            'dots', 'errorbars', 'errorlines', 'filledcurves',
            +            'financebars', 'fsteps', 'histeps', 'histograms',
            +            'image', 'impulses', 'labels', 'lines',
            +            'linespoints', 'points', 'rgbimage', 'steps',
            +            'vectors', 'xerrorbars', 'xerrorlines', 'xyerrorbars',
            +            'xyerrorlines', 'yerrorbars', 'yerrorlines',
            +
            +
            +            // terminals `help terminals`
            +            'aed512', 'aed767', 'aifm', 'bitgraph',
            +            'cgm', 'corel', 'dumb', 'dxf',
            +            'eepic', 'emf', 'emtex', 'epslatex',
            +            'epson-180dpi', 'epson-60dpi', 'epson-lx800', 'fig',
            +            'gif', 'gpic', 'hp2623a', 'hp2648',
            +            'hp500c', 'hpdj', 'hpgl', 'hpljii',
            +            'hppj', 'imagen', 'jpeg', 'kc-tek40xx',
            +            'km-tek40xx', 'latex', 'mf', 'mif',
            +            'mp', 'nec-cp6', 'okidata', 'pbm',
            +            'pcl5', 'png', 'pop', 'postscript',
            +            'pslatex', 'pstex', 'pstricks', 'push',
            +            'qms', 'regis', 'selanar', 'starc',
            +            'svg', 'tandy-60dpi', 'tek40xx', 'tek410x',
            +            'texdraw', 'tgif', 'tkcanvas', 'tpic',
            +            'vttek', 'x11', 'xlib',
            +            )
            +        ),
            +    'REGEXPS' => array(
            +        //Variable assignment
            +        0 => "(?\w])([a-zA-Z_][a-zA-Z0-9_]*)\s*=",
            +        //Numbers with unit
            +        1 => "(?<=^|\s)([0-9]*\.?[0-9]+\s*cm)"
            +        ),
            +    'SYMBOLS' => array(
            +        '-', '+', '~', '!', '$',
            +        '*', '/', '%', '=', '<', '>', '&',
            +        '^', '|', '.', 'eq', 'ne', '?:', ':', '`', ','
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        5 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;',
            +            2 => 'color: #990000;',
            +            3 => 'color: #550000;',
            +            4 => 'color: #7a0874;',
            +            5 => 'color: #448888;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #adadad; font-style: italic;',
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight:bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000099; font-weight:bold;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #0000ff;',
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #000; font-weight: bold;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #007800;',
            +            1 => 'color: #cc66cc;'
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => 'http://www.google.com/search?q=%22set+{FNAME}%22+site%3Ahttp%3A%2F%2Fwww.gnuplot.info%2Fdocs%2F&btnI=lucky',
            +        3 => '',
            +        4 => '',
            +        5 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            4 => array(
            +                'DISALLOWED_AFTER' =>  "(?![\.\-a-zA-Z0-9_%])"
            +            )
            +        )
            +    ),
            +    'TAB_WIDTH' => 4
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/go.php b/vendor/easybook/geshi/geshi/go.php
            new file mode 100644
            index 0000000000..38f23c9d62
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/go.php
            @@ -0,0 +1,374 @@
            + 'Go',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(
            +        # Raw strings (escapes and linebreaks ignored)
            +        2 => "#`[^`]*`#"
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"', "'"),
            +    'ESCAPE_CHAR' => '',
            +    'ESCAPE_REGEXP' => array(
            +        1 => "#\\\\[abfnrtv\\\\\'\"]#",
            +        2 => "#\\\\[0-7]{3}#",
            +        3 => "#\\\\x[0-9a-fA-F]{2}#",
            +        4 => "#\\\\u[0-9a-fA-F]{4}#",
            +        5 => "#\\\\U[0-9a-fA-F]{8}#"
            +        ),
            +    'NUMBERS' => array(
            +        # integer literals (possibly imaginary)
            +        0 => '\b([1-9][0-9]*i?|0[0-7]*|0[xX][0-9a-f]+|0[0-9]*i)\b',
            +        # real floating point literals
            +        1 => '\b((?:\d+\.\d*(?:[Ee][+-]?\d+\b)?|\.\d+(?:[Ee][+-]?\d+)?|\d+[Ee][+-]?\d+)?)\b',
            +        # imaginary floating point literals
            +        2 => '\b((?:\d+\.\d*(?:[Ee][+-]?\d+)?|\.\d+(?:[Ee][+-]?\d+)?|\d+[Ee][+-]?\d+)?i)\b'
            +        ),
            +    'KEYWORDS' => array(
            +        # statements
            +        1 => array(
            +            'break', 'case', 'const', 'continue', 'default', 'defer', 'else',
            +            'fallthrough', 'for', 'go', 'goto', 'if', 'import', 'package',
            +            'range', 'return', 'select', 'switch', 'type', 'var'
            +            ),
            +        # literals
            +        2 => array(
            +            'nil', 'true', 'false'
            +            ),
            +        # built-in functions
            +        3 => array(
            +            'close', 'closed', 'len', 'cap', 'new', 'make', 'copy', 'cmplx',
            +            'real', 'imag', 'panic', 'recover', 'print', 'println'
            +            ),
            +        # built-in types
            +        4 => array(
            +            'chan', 'func', 'interface', 'map', 'struct', 'bool', 'uint8',
            +            'uint16', 'uint32', 'uint64', 'int8', 'int16', 'int32', 'int64',
            +            'float32', 'float64', 'complex64', 'complex128', 'byte', 'uint',
            +            'int', 'float', 'complex', 'uintptr', 'string'
            +            ),
            +        # library types
            +        5 => array(
            +            'aes.Cipher', 'aes.KeySizeError', 'ascii85.CorruptInputError', 'asn1.BitString',
            +            'asn1.RawValue', 'asn1.StructuralError', 'asn1.SyntaxError', 'ast.ChanDir',
            +            'ast.Comment', 'ast.CommentGroup', 'ast.Decl', 'ast.Expr', 'ast.Field',
            +            'ast.FieldList', 'ast.File', 'ast.Filter', 'ast.MergeMode', 'ast.Node',
            +            'ast.ObjKind', 'ast.Object', 'ast.Package', 'ast.Scope', 'ast.Stmt',
            +            'ast.Visitor', 'av.Color', 'av.Image', 'av.Window', 'base64.CorruptInputError',
            +            'base64.Encoding', 'big.Int', 'big.Word', 'bignum.Integer', 'bignum.Rational',
            +            'binary.ByteOrder', 'block.Cipher', 'block.EAXTagError', 'blowfish.Cipher',
            +            'blowfish.KeySizeError', 'bufio.BufSizeError', 'bufio.Error', 'bufio.ReadWriter',
            +            'bufio.Reader', 'bufio.Writer', 'bytes.Buffer', 'datafmt.Environment',
            +            'datafmt.Format', 'datafmt.Formatter', 'datafmt.FormatterMap', 'datafmt.State',
            +            'doc.Filter', 'doc.FuncDoc', 'doc.PackageDoc', 'doc.TypeDoc', 'doc.ValueDoc',
            +            'draw.Color', 'draw.Context', 'draw.Image', 'draw.Mouse', 'draw.Op',
            +            'draw.Point', 'draw.Rectangle', 'dwarf.AddrType', 'dwarf.ArrayType',
            +            'dwarf.Attr', 'dwarf.BasicType', 'dwarf.BoolType', 'dwarf.CharType',
            +            'dwarf.CommonType', 'dwarf.ComplexType', 'dwarf.Data', 'dwarf.DecodeError',
            +            'dwarf.DotDotDotType', 'dwarf.Entry', 'dwarf.EnumType', 'dwarf.EnumValue',
            +            'dwarf.Field', 'dwarf.FloatType', 'dwarf.FuncType', 'dwarf.IntType',
            +            'dwarf.Offset', 'dwarf.PtrType', 'dwarf.QualType', 'dwarf.Reader',
            +            'dwarf.StructField', 'dwarf.StructType', 'dwarf.Tag', 'dwarf.Type',
            +            'dwarf.TypedefType', 'dwarf.UcharType', 'dwarf.UintType', 'dwarf.VoidType',
            +            'elf.Class', 'elf.Data', 'elf.Dyn32', 'elf.Dyn64', 'elf.DynFlag', 'elf.DynTag',
            +            'elf.File', 'elf.FileHeader', 'elf.FormatError', 'elf.Header32', 'elf.Header64',
            +            'elf.Machine', 'elf.NType', 'elf.OSABI', 'elf.Prog', 'elf.Prog32', 'elf.Prog64',
            +            'elf.ProgFlag', 'elf.ProgHeader', 'elf.ProgType', 'elf.R_386', 'elf.R_ALPHA',
            +            'elf.R_ARM', 'elf.R_PPC', 'elf.R_SPARC', 'elf.R_X86_64', 'elf.Rel32',
            +            'elf.Rel64', 'elf.Rela32', 'elf.Rela64', 'elf.Section', 'elf.Section32',
            +            'elf.Section64', 'elf.SectionFlag', 'elf.SectionHeader', 'elf.SectionIndex',
            +            'elf.SectionType', 'elf.Sym32', 'elf.Sym64', 'elf.SymBind', 'elf.SymType',
            +            'elf.SymVis', 'elf.Symbol', 'elf.Type', 'elf.Version', 'eval.ArrayType',
            +            'eval.ArrayValue', 'eval.BoolValue', 'eval.BoundedType', 'eval.ChanType',
            +            'eval.Code', 'eval.Constant', 'eval.Def', 'eval.DivByZeroError',
            +            'eval.FloatValue', 'eval.Frame', 'eval.Func', 'eval.FuncDecl', 'eval.FuncType',
            +            'eval.FuncValue', 'eval.IMethod', 'eval.IdealFloatValue', 'eval.IdealIntValue',
            +            'eval.IndexError', 'eval.IntValue', 'eval.Interface', 'eval.InterfaceType',
            +            'eval.InterfaceValue', 'eval.KeyError', 'eval.Map', 'eval.MapType',
            +            'eval.MapValue', 'eval.Method', 'eval.MultiType', 'eval.NamedType',
            +            'eval.NegativeCapacityError', 'eval.NegativeLengthError', 'eval.NilPointerError',
            +            'eval.PtrType', 'eval.PtrValue', 'eval.RedefinitionError', 'eval.Scope',
            +            'eval.Slice', 'eval.SliceError', 'eval.SliceType', 'eval.SliceValue',
            +            'eval.StringValue', 'eval.StructField', 'eval.StructType', 'eval.StructValue',
            +            'eval.Thread', 'eval.Type', 'eval.UintValue', 'eval.Value', 'eval.Variable',
            +            'eval.World', 'exec.Cmd', 'expvar.Int', 'expvar.IntFunc', 'expvar.KeyValue',
            +            'expvar.Map', 'expvar.String', 'expvar.StringFunc', 'expvar.Var', 'flag.Flag',
            +            'flag.Value', 'flate.CorruptInputError', 'flate.InternalError',
            +            'flate.ReadError', 'flate.Reader', 'flate.WriteError', 'flate.WrongValueError',
            +            'fmt.Formatter', 'fmt.GoStringer', 'fmt.State', 'fmt.Stringer',
            +            'git85.CorruptInputError', 'gob.Decoder', 'gob.Encoder', 'gosym.DecodingError',
            +            'gosym.Func', 'gosym.LineTable', 'gosym.Obj', 'gosym.Sym', 'gosym.Table',
            +            'gosym.UnknownFileError', 'gosym.UnknownLineError', 'gzip.Deflater',
            +            'gzip.Header', 'gzip.Inflater', 'hash.Hash', 'hash.Hash32', 'hash.Hash64',
            +            'heap.Interface', 'hex.InvalidHexCharError', 'hex.OddLengthInputError',
            +            'http.ClientConn', 'http.Conn', 'http.Handler', 'http.HandlerFunc',
            +            'http.ProtocolError', 'http.Request', 'http.Response', 'http.ServeMux',
            +            'http.ServerConn', 'http.URL', 'http.URLError', 'http.URLEscapeError',
            +            'image.Alpha', 'image.AlphaColor', 'image.Color', 'image.ColorImage',
            +            'image.ColorModel', 'image.ColorModelFunc', 'image.Image', 'image.NRGBA',
            +            'image.NRGBA64', 'image.NRGBA64Color', 'image.NRGBAColor', 'image.Paletted',
            +            'image.RGBA', 'image.RGBA64', 'image.RGBA64Color', 'image.RGBAColor',
            +            'io.Closer', 'io.Error', 'io.PipeReader', 'io.PipeWriter', 'io.ReadByter',
            +            'io.ReadCloser', 'io.ReadSeeker', 'io.ReadWriteCloser', 'io.ReadWriteSeeker',
            +            'io.ReadWriter', 'io.Reader', 'io.ReaderAt', 'io.ReaderFrom', 'io.SectionReader',
            +            'io.Seeker', 'io.WriteCloser', 'io.WriteSeeker', 'io.Writer', 'io.WriterAt',
            +            'io.WriterTo', 'iterable.Func', 'iterable.Group', 'iterable.Grouper',
            +            'iterable.Injector', 'iterable.Iterable', 'jpeg.FormatError', 'jpeg.Reader',
            +            'jpeg.UnsupportedError', 'json.Decoder', 'json.Encoder',
            +            'json.InvalidUnmarshalError', 'json.Marshaler', 'json.MarshalerError',
            +            'json.SyntaxError', 'json.UnmarshalTypeError', 'json.Unmarshaler',
            +            'json.UnsupportedTypeError', 'list.Element', 'list.List', 'log.Logger',
            +            'macho.Cpu', 'macho.File', 'macho.FileHeader', 'macho.FormatError', 'macho.Load',
            +            'macho.LoadCmd', 'macho.Regs386', 'macho.RegsAMD64', 'macho.Section',
            +            'macho.Section32', 'macho.Section64', 'macho.SectionHeader', 'macho.Segment',
            +            'macho.Segment32', 'macho.Segment64', 'macho.SegmentHeader', 'macho.Thread',
            +            'macho.Type', 'net.Addr', 'net.AddrError', 'net.Conn', 'net.DNSConfigError',
            +            'net.DNSError', 'net.Error', 'net.InvalidAddrError', 'net.InvalidConnError',
            +            'net.Listener', 'net.OpError', 'net.PacketConn', 'net.TCPAddr', 'net.TCPConn',
            +            'net.TCPListener', 'net.UDPAddr', 'net.UDPConn', 'net.UnixAddr', 'net.UnixConn',
            +            'net.UnixListener', 'net.UnknownNetworkError', 'net.UnknownSocketError',
            +            'netchan.Dir', 'netchan.Exporter', 'netchan.Importer', 'nntp.Article',
            +            'nntp.Conn', 'nntp.Error', 'nntp.Group', 'nntp.ProtocolError', 'ogle.Arch',
            +            'ogle.ArchAlignedMultiple', 'ogle.ArchLSB', 'ogle.Breakpoint', 'ogle.Event',
            +            'ogle.EventAction', 'ogle.EventHandler', 'ogle.EventHook', 'ogle.FormatError',
            +            'ogle.Frame', 'ogle.Goroutine', 'ogle.GoroutineCreate', 'ogle.GoroutineExit',
            +            'ogle.NoCurrentGoroutine', 'ogle.NotOnStack', 'ogle.Process',
            +            'ogle.ProcessNotStopped', 'ogle.ReadOnlyError', 'ogle.RemoteMismatchError',
            +            'ogle.UnknownArchitecture', 'ogle.UnknownGoroutine', 'ogle.UsageError',
            +            'os.Errno', 'os.Error', 'os.ErrorString', 'os.File', 'os.FileInfo',
            +            'os.LinkError', 'os.PathError', 'os.SyscallError', 'os.Waitmsg', 'patch.Diff',
            +            'patch.File', 'patch.GitBinaryLiteral', 'patch.Op', 'patch.Set',
            +            'patch.SyntaxError', 'patch.TextChunk', 'patch.Verb', 'path.Visitor',
            +            'pdp1.HaltError', 'pdp1.LoopError', 'pdp1.Trapper', 'pdp1.UnknownInstrError',
            +            'pdp1.Word', 'pem.Block', 'png.FormatError', 'png.IDATDecodingError',
            +            'png.UnsupportedError', 'printer.Config', 'printer.HTMLTag', 'printer.Styler',
            +            'proc.Breakpoint', 'proc.Cause', 'proc.Process', 'proc.ProcessExited',
            +            'proc.Regs', 'proc.Signal', 'proc.Stopped', 'proc.Thread', 'proc.ThreadCreate',
            +            'proc.ThreadExit', 'proc.Word', 'quick.CheckEqualError', 'quick.CheckError',
            +            'quick.Config', 'quick.Generator', 'quick.SetupError', 'rand.Rand',
            +            'rand.Source', 'rand.Zipf', 'rc4.Cipher', 'rc4.KeySizeError',
            +            'reflect.ArrayOrSliceType', 'reflect.ArrayOrSliceValue', 'reflect.ArrayType',
            +            'reflect.ArrayValue', 'reflect.BoolType', 'reflect.BoolValue', 'reflect.ChanDir',
            +            'reflect.ChanType', 'reflect.ChanValue', 'reflect.Complex128Type',
            +            'reflect.Complex128Value', 'reflect.Complex64Type', 'reflect.Complex64Value',
            +            'reflect.ComplexType', 'reflect.ComplexValue', 'reflect.Float32Type',
            +            'reflect.Float32Value', 'reflect.Float64Type', 'reflect.Float64Value',
            +            'reflect.FloatType', 'reflect.FloatValue', 'reflect.FuncType',
            +            'reflect.FuncValue', 'reflect.Int16Type', 'reflect.Int16Value',
            +            'reflect.Int32Type', 'reflect.Int32Value', 'reflect.Int64Type',
            +            'reflect.Int64Value', 'reflect.Int8Type', 'reflect.Int8Value', 'reflect.IntType',
            +            'reflect.IntValue', 'reflect.InterfaceType', 'reflect.InterfaceValue',
            +            'reflect.MapType', 'reflect.MapValue', 'reflect.Method', 'reflect.PtrType',
            +            'reflect.PtrValue', 'reflect.SliceHeader', 'reflect.SliceType',
            +            'reflect.SliceValue', 'reflect.StringHeader', 'reflect.StringType',
            +            'reflect.StringValue', 'reflect.StructField', 'reflect.StructType',
            +            'reflect.StructValue', 'reflect.Type', 'reflect.Uint16Type',
            +            'reflect.Uint16Value', 'reflect.Uint32Type', 'reflect.Uint32Value',
            +            'reflect.Uint64Type', 'reflect.Uint64Value', 'reflect.Uint8Type',
            +            'reflect.Uint8Value', 'reflect.UintType', 'reflect.UintValue',
            +            'reflect.UintptrType', 'reflect.UintptrValue', 'reflect.UnsafePointerType',
            +            'reflect.UnsafePointerValue', 'reflect.Value', 'regexp.Error', 'regexp.Regexp',
            +            'ring.Ring', 'rpc.Call', 'rpc.Client', 'rpc.ClientCodec', 'rpc.InvalidRequest',
            +            'rpc.Request', 'rpc.Response', 'rpc.ServerCodec', 'rsa.DecryptionError',
            +            'rsa.MessageTooLongError', 'rsa.PKCS1v15Hash', 'rsa.PrivateKey', 'rsa.PublicKey',
            +            'rsa.VerificationError', 'runtime.ArrayType', 'runtime.BoolType',
            +            'runtime.ChanDir', 'runtime.ChanType', 'runtime.Complex128Type',
            +            'runtime.Complex64Type', 'runtime.ComplexType', 'runtime.Error',
            +            'runtime.Float32Type', 'runtime.Float64Type', 'runtime.FloatType',
            +            'runtime.Func', 'runtime.FuncType', 'runtime.Int16Type', 'runtime.Int32Type',
            +            'runtime.Int64Type', 'runtime.Int8Type', 'runtime.IntType',
            +            'runtime.InterfaceType', 'runtime.Itable', 'runtime.MapType',
            +            'runtime.MemProfileRecord', 'runtime.MemStatsType', 'runtime.PtrType',
            +            'runtime.SliceType', 'runtime.StringType', 'runtime.StructType', 'runtime.Type',
            +            'runtime.TypeAssertionError', 'runtime.Uint16Type', 'runtime.Uint32Type',
            +            'runtime.Uint64Type', 'runtime.Uint8Type', 'runtime.UintType',
            +            'runtime.UintptrType', 'runtime.UnsafePointerType', 'scanner.Error',
            +            'scanner.ErrorHandler', 'scanner.ErrorVector', 'scanner.Position',
            +            'scanner.Scanner', 'script.Close', 'script.Closed', 'script.Event',
            +            'script.ReceivedUnexpected', 'script.Recv', 'script.RecvMatch', 'script.Send',
            +            'script.SetupError', 'signal.Signal', 'signal.UnixSignal', 'sort.Interface',
            +            'srpc.Client', 'srpc.Errno', 'srpc.Handler', 'srpc.RPC', 'strconv.NumError',
            +            'strings.Reader', 'sync.Mutex', 'sync.RWMutex',
            +            'syscall.ByHandleFileInformation', 'syscall.Cmsghdr', 'syscall.Dirent',
            +            'syscall.EpollEvent', 'syscall.Fbootstraptransfer_t', 'syscall.FdSet',
            +            'syscall.Filetime', 'syscall.Flock_t', 'syscall.Fstore_t', 'syscall.Iovec',
            +            'syscall.Kevent_t', 'syscall.Linger', 'syscall.Log2phys_t', 'syscall.Msghdr',
            +            'syscall.Overlapped', 'syscall.PtraceRegs', 'syscall.Radvisory_t',
            +            'syscall.RawSockaddr', 'syscall.RawSockaddrAny', 'syscall.RawSockaddrInet4',
            +            'syscall.RawSockaddrInet6', 'syscall.RawSockaddrUnix', 'syscall.Rlimit',
            +            'syscall.Rusage', 'syscall.Sockaddr', 'syscall.SockaddrInet4',
            +            'syscall.SockaddrInet6', 'syscall.SockaddrUnix', 'syscall.Stat_t',
            +            'syscall.Statfs_t', 'syscall.Sysinfo_t', 'syscall.Time_t', 'syscall.Timespec',
            +            'syscall.Timeval', 'syscall.Timex', 'syscall.Tms', 'syscall.Ustat_t',
            +            'syscall.Utimbuf', 'syscall.Utsname', 'syscall.WaitStatus',
            +            'syscall.Win32finddata', 'syslog.Priority', 'syslog.Writer', 'tabwriter.Writer',
            +            'tar.Header', 'tar.Reader', 'tar.Writer', 'template.Error',
            +            'template.FormatterMap', 'template.Template', 'testing.Benchmark',
            +            'testing.Regexp', 'testing.Test', 'time.ParseError', 'time.Ticker', 'time.Time',
            +            'tls.CASet', 'tls.Certificate', 'tls.Config', 'tls.Conn', 'tls.ConnectionState',
            +            'tls.Listener', 'token.Position', 'token.Token', 'unicode.CaseRange',
            +            'unicode.Range', 'unsafe.ArbitraryType', 'vector.LessInterface',
            +            'websocket.Conn', 'websocket.Draft75Handler', 'websocket.Handler',
            +            'websocket.ProtocolError', 'websocket.WebSocketAddr', 'x509.Certificate',
            +            'x509.ConstraintViolationError', 'x509.KeyUsage', 'x509.Name',
            +            'x509.PublicKeyAlgorithm', 'x509.SignatureAlgorithm',
            +            'x509.UnhandledCriticalExtension', 'x509.UnsupportedAlgorithmError', 'xml.Attr',
            +            'xml.EndElement', 'xml.Name', 'xml.Parser', 'xml.ProcInst', 'xml.StartElement',
            +            'xml.SyntaxError', 'xml.Token', 'xml.UnmarshalError', 'xtea.Cipher',
            +            'xtea.KeySizeError'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        # delimiters
            +        1 => array(
            +            '(', ')', '{', '}', '[', ']', ',', ':', ';'
            +            ),
            +        # assignments
            +        2 => array(
            +            '<<=', '!=', '%=', '&=', '&^=', '*=', '+=', '-=', '/=', ':=', '>>=',
            +            '^=', '|=', '=', '++', '--'
            +            ),
            +        # operators
            +        3 => array(
            +            '<=', '<', '==', '>', '>=', '&&', '!', '||', '&', '&^', '|', '^',
            +            '>>', '<<', '*', '%', '+', '-', '.', '/', '<-'),
            +        # vararg
            +        4 => array(
            +            '...'
            +            )
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        5 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            # statements
            +            1 => 'color: #b1b100; font-weight: bold;',
            +            # literals
            +            2 => 'color: #000000; font-weight: bold;',
            +            # built-in functions
            +            3 => 'color: #000066;',
            +            # built-in types
            +            4 => 'color: #993333;',
            +            # library types
            +            5 => 'color: #003399;'
            +            ),
            +        'COMMENTS' => array(
            +            # single-line comments
            +            1 => 'color: #666666; font-style: italic;',
            +            # raw strings
            +            2 => 'color: #0000ff;',
            +            # multi-line comments
            +            'MULTI' => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            # simple escape
            +            1 => 'color: #000099; font-weight: bold;',
            +            # octal escape
            +            2 => 'color: #000099;',
            +            # hex escape
            +            3 => 'color: #000099;',
            +            # unicode escape
            +            4 => 'color: #000099;',
            +            # long unicode escape
            +            5 => 'color: #000099;'
            +            ),
            +        'BRACKETS' => array(
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #0000ff;',
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            0 => 'color: #004000;'
            +            ),
            +        'SYMBOLS' => array(
            +            # delimiters
            +            1 => 'color: #339933;',
            +            # assignments
            +            2 => 'color: #339933;',
            +            # operators
            +            3 => 'color: #339933;',
            +            # vararg (highlighted as a keyword)
            +            4 => 'color: #000000; font-weight: bold;'
            +            ),
            +        'REGEXPS' => array(
            +            # If CSS classes are enabled, these would be highlighted as numbers (nu0)
            +            # integer literals (possibly imaginary)
            +            //0 => 'color: #cc66cc;',
            +            # real floating point literals
            +            //1 => 'color: #cc66cc;',
            +            # imaginary floating point literals
            +            //2 => 'color: #cc66cc;'
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => 'http://golang.org/search?q={FNAME}'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(1 => '.'),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(),
            +    'PARSER_CONTROL' => array(
            +        'ENABLE_FLAGS' => array(
            +            'BRACKETS' => GESHI_NEVER, # handled by symbols
            +            )
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/groovy.php b/vendor/easybook/geshi/geshi/groovy.php
            new file mode 100644
            index 0000000000..021dc1f2e5
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/groovy.php
            @@ -0,0 +1,1010 @@
            + 'Groovy',
            +    'COMMENT_SINGLE' => array(1 => '//', 3 => '#'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(
            +        //Import and Package directives (Basic Support only)
            +        2 => '/(?:(?<=import[\\n\\s])|(?<=package[\\n\\s]))[\\n\\s]*([a-zA-Z0-9_]+\\.)*([a-zA-Z0-9_]+|\*)(?=[\n\s;])/i',
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'''", '"""', "'", '"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'case', 'do', 'else', 'for', 'foreach', 'if', 'in', 'switch',
            +            'while',
            +            ),
            +        2 => array(
            +            'abstract', 'as', 'assert', 'break', 'catch', 'class', 'const',
            +            'continue', 'def', 'default', 'enum', 'extends',
            +            'false', 'final', 'finally', 'goto', 'implements', 'import',
            +            'instanceof', 'interface', 'native', 'new', 'null',
            +            'package', 'private', 'property', 'protected',
            +            'public', 'return', 'static', 'strictfp', 'super',
            +            'synchronized', 'this', 'throw', 'throws',
            +            'transient', 'true', 'try', 'volatile'
            +            ),
            +        3 => array(
            +            'AbstractAction', 'AbstractBorder', 'AbstractButton',
            +            'AbstractCellEditor', 'AbstractCollection',
            +            'AbstractColorChooserPanel', 'AbstractDocument',
            +            'AbstractDocument.AttributeContext',
            +            'AbstractDocument.Content',
            +            'AbstractDocument.ElementEdit',
            +            'AbstractLayoutCache',
            +            'AbstractLayoutCache.NodeDimensions', 'AbstractList',
            +            'AbstractListModel', 'AbstractMap',
            +            'AbstractMethodError', 'AbstractSequentialList',
            +            'AbstractSet', 'AbstractTableModel',
            +            'AbstractUndoableEdit', 'AbstractWriter',
            +            'AccessControlContext', 'AccessControlException',
            +            'AccessController', 'AccessException', 'Accessible',
            +            'AccessibleAction', 'AccessibleBundle',
            +            'AccessibleComponent', 'AccessibleContext',
            +            'AccessibleHyperlink', 'AccessibleHypertext',
            +            'AccessibleIcon', 'AccessibleObject',
            +            'AccessibleRelation', 'AccessibleRelationSet',
            +            'AccessibleResourceBundle', 'AccessibleRole',
            +            'AccessibleSelection', 'AccessibleState',
            +            'AccessibleStateSet', 'AccessibleTable',
            +            'AccessibleTableModelChange', 'AccessibleText',
            +            'AccessibleValue', 'Acl', 'AclEntry',
            +            'AclNotFoundException', 'Action', 'ActionEvent',
            +            'ActionListener', 'ActionMap', 'ActionMapUIResource',
            +            'Activatable', 'ActivateFailedException',
            +            'ActivationDesc', 'ActivationException',
            +            'ActivationGroup', 'ActivationGroupDesc',
            +            'ActivationGroupDesc.CommandEnvironment',
            +            'ActivationGroupID', 'ActivationID',
            +            'ActivationInstantiator', 'ActivationMonitor',
            +            'ActivationSystem', 'Activator', 'ActiveEvent',
            +            'Adjustable', 'AdjustmentEvent',
            +            'AdjustmentListener', 'Adler32', 'AffineTransform',
            +            'AffineTransformOp', 'AlgorithmParameterGenerator',
            +            'AlgorithmParameterGeneratorSpi',
            +            'AlgorithmParameters', 'AlgorithmParameterSpec',
            +            'AlgorithmParametersSpi', 'AllPermission',
            +            'AlphaComposite', 'AlreadyBound',
            +            'AlreadyBoundException', 'AlreadyBoundHelper',
            +            'AlreadyBoundHolder', 'AncestorEvent',
            +            'AncestorListener', 'Annotation', 'Any', 'AnyHolder',
            +            'AnySeqHelper', 'AnySeqHolder', 'Applet',
            +            'AppletContext', 'AppletInitializer', 'AppletStub',
            +            'ApplicationException', 'Arc2D', 'Arc2D.Double',
            +            'Arc2D.Float', 'Area', 'AreaAveragingScaleFilter',
            +            'ARG_IN', 'ARG_INOUT', 'ARG_OUT',
            +            'ArithmeticException', 'Array',
            +            'ArrayIndexOutOfBoundsException', 'ArrayList',
            +            'Arrays', 'ArrayStoreException', 'AsyncBoxView',
            +            'Attribute', 'AttributedCharacterIterator',
            +            'AttributedCharacterIterator.Attribute',
            +            'AttributedString', 'AttributeInUseException',
            +            'AttributeList', 'AttributeModificationException',
            +            'Attributes', 'Attributes.Name', 'AttributeSet',
            +            'AttributeSet.CharacterAttribute',
            +            'AttributeSet.ColorAttribute',
            +            'AttributeSet.FontAttribute',
            +            'AttributeSet.ParagraphAttribute', 'AudioClip',
            +            'AudioFileFormat', 'AudioFileFormat.Type',
            +            'AudioFileReader', 'AudioFileWriter', 'AudioFormat',
            +            'AudioFormat.Encoding', 'AudioInputStream',
            +            'AudioPermission', 'AudioSystem',
            +            'AuthenticationException',
            +            'AuthenticationNotSupportedException',
            +            'Authenticator', 'Autoscroll', 'AWTError',
            +            'AWTEvent', 'AWTEventListener',
            +            'AWTEventMulticaster', 'AWTException',
            +            'AWTPermission', 'BadKind', 'BadLocationException',
            +            'BAD_CONTEXT', 'BAD_INV_ORDER', 'BAD_OPERATION',
            +            'BAD_PARAM', 'BAD_POLICY', 'BAD_POLICY_TYPE',
            +            'BAD_POLICY_VALUE', 'BAD_TYPECODE', 'BandCombineOp',
            +            'BandedSampleModel', 'BasicArrowButton',
            +            'BasicAttribute', 'BasicAttributes', 'BasicBorders',
            +            'BasicBorders.ButtonBorder',
            +            'BasicBorders.FieldBorder',
            +            'BasicBorders.MarginBorder',
            +            'BasicBorders.MenuBarBorder',
            +            'BasicBorders.RadioButtonBorder',
            +            'BasicBorders.SplitPaneBorder',
            +            'BasicBorders.ToggleButtonBorder',
            +            'BasicButtonListener', 'BasicButtonUI',
            +            'BasicCheckBoxMenuItemUI', 'BasicCheckBoxUI',
            +            'BasicColorChooserUI', 'BasicComboBoxEditor',
            +            'BasicComboBoxEditor.UIResource',
            +            'BasicComboBoxRenderer',
            +            'BasicComboBoxRenderer.UIResource',
            +            'BasicComboBoxUI', 'BasicComboPopup',
            +            'BasicDesktopIconUI', 'BasicDesktopPaneUI',
            +            'BasicDirectoryModel', 'BasicEditorPaneUI',
            +            'BasicFileChooserUI', 'BasicGraphicsUtils',
            +            'BasicHTML', 'BasicIconFactory',
            +            'BasicInternalFrameTitlePane',
            +            'BasicInternalFrameUI', 'BasicLabelUI',
            +            'BasicListUI', 'BasicLookAndFeel', 'BasicMenuBarUI',
            +            'BasicMenuItemUI', 'BasicMenuUI',
            +            'BasicOptionPaneUI',
            +            'BasicOptionPaneUI.ButtonAreaLayout', 'BasicPanelUI',
            +            'BasicPasswordFieldUI', 'BasicPermission',
            +            'BasicPopupMenuSeparatorUI', 'BasicPopupMenuUI',
            +            'BasicProgressBarUI', 'BasicRadioButtonMenuItemUI',
            +            'BasicRadioButtonUI', 'BasicRootPaneUI',
            +            'BasicScrollBarUI', 'BasicScrollPaneUI',
            +            'BasicSeparatorUI', 'BasicSliderUI',
            +            'BasicSplitPaneDivider', 'BasicSplitPaneUI',
            +            'BasicStroke', 'BasicTabbedPaneUI',
            +            'BasicTableHeaderUI', 'BasicTableUI',
            +            'BasicTextAreaUI', 'BasicTextFieldUI',
            +            'BasicTextPaneUI', 'BasicTextUI',
            +            'BasicTextUI.BasicCaret',
            +            'BasicTextUI.BasicHighlighter',
            +            'BasicToggleButtonUI', 'BasicToolBarSeparatorUI',
            +            'BasicToolBarUI', 'BasicToolTipUI', 'BasicTreeUI',
            +            'BasicViewportUI', 'BatchUpdateException',
            +            'BeanContext', 'BeanContextChild',
            +            'BeanContextChildComponentProxy',
            +            'BeanContextChildSupport',
            +            'BeanContextContainerProxy', 'BeanContextEvent',
            +            'BeanContextMembershipEvent',
            +            'BeanContextMembershipListener', 'BeanContextProxy',
            +            'BeanContextServiceAvailableEvent',
            +            'BeanContextServiceProvider',
            +            'BeanContextServiceProviderBeanInfo',
            +            'BeanContextServiceRevokedEvent',
            +            'BeanContextServiceRevokedListener',
            +            'BeanContextServices', 'BeanContextServicesListener',
            +            'BeanContextServicesSupport',
            +            'BeanContextServicesSupport.BCSSServiceProvider',
            +            'BeanContextSupport',
            +            'BeanContextSupport.BCSIterator', 'BeanDescriptor',
            +            'BeanInfo', 'Beans', 'BevelBorder', 'BigDecimal',
            +            'BigInteger', 'BinaryRefAddr', 'BindException',
            +            'Binding', 'BindingHelper', 'BindingHolder',
            +            'BindingIterator', 'BindingIteratorHelper',
            +            'BindingIteratorHolder', 'BindingIteratorOperations',
            +            'BindingListHelper', 'BindingListHolder',
            +            'BindingType', 'BindingTypeHelper',
            +            'BindingTypeHolder', 'BitSet', 'Blob', 'BlockView',
            +            'Book', 'Boolean', 'BooleanControl',
            +            'BooleanControl.Type', 'BooleanHolder',
            +            'BooleanSeqHelper', 'BooleanSeqHolder', 'Border',
            +            'BorderFactory', 'BorderLayout', 'BorderUIResource',
            +            'BorderUIResource.BevelBorderUIResource',
            +            'BorderUIResource.CompoundBorderUIResource',
            +            'BorderUIResource.EmptyBorderUIResource',
            +            'BorderUIResource.EtchedBorderUIResource',
            +            'BorderUIResource.LineBorderUIResource',
            +            'BorderUIResource.MatteBorderUIResource',
            +            'BorderUIResource.TitledBorderUIResource',
            +            'BoundedRangeModel', 'Bounds', 'Box', 'Box.Filler',
            +            'BoxedValueHelper', 'BoxLayout', 'BoxView',
            +            'BreakIterator', 'BufferedImage',
            +            'BufferedImageFilter', 'BufferedImageOp',
            +            'BufferedInputStream', 'BufferedOutputStream',
            +            'BufferedReader', 'BufferedWriter', 'Button',
            +            'ButtonGroup', 'ButtonModel', 'ButtonUI', 'Byte',
            +            'ByteArrayInputStream', 'ByteArrayOutputStream',
            +            'ByteHolder', 'ByteLookupTable', 'Calendar',
            +            'CallableStatement', 'CannotProceed',
            +            'CannotProceedException', 'CannotProceedHelper',
            +            'CannotProceedHolder', 'CannotRedoException',
            +            'CannotUndoException', 'Canvas', 'CardLayout',
            +            'Caret', 'CaretEvent', 'CaretListener', 'CellEditor',
            +            'CellEditorListener', 'CellRendererPane',
            +            'Certificate', 'Certificate.CertificateRep',
            +            'CertificateEncodingException',
            +            'CertificateException',
            +            'CertificateExpiredException', 'CertificateFactory',
            +            'CertificateFactorySpi',
            +            'CertificateNotYetValidException',
            +            'CertificateParsingException',
            +            'ChangedCharSetException', 'ChangeEvent',
            +            'ChangeListener', 'Character', 'Character.Subset',
            +            'Character.UnicodeBlock', 'CharacterIterator',
            +            'CharArrayReader', 'CharArrayWriter',
            +            'CharConversionException', 'CharHolder',
            +            'CharSeqHelper', 'CharSeqHolder', 'Checkbox',
            +            'CheckboxGroup', 'CheckboxMenuItem',
            +            'CheckedInputStream', 'CheckedOutputStream',
            +            'Checksum', 'Choice', 'ChoiceFormat', 'Class',
            +            'ClassCastException', 'ClassCircularityError',
            +            'ClassDesc', 'ClassFormatError', 'ClassLoader',
            +            'ClassNotFoundException', 'Clip', 'Clipboard',
            +            'ClipboardOwner', 'Clob', 'Cloneable',
            +            'CloneNotSupportedException', 'CMMException',
            +            'CodeSource', 'CollationElementIterator',
            +            'CollationKey', 'Collator', 'Collection',
            +            'Collections', 'Color',
            +            'ColorChooserComponentFactory', 'ColorChooserUI',
            +            'ColorConvertOp', 'ColorModel',
            +            'ColorSelectionModel', 'ColorSpace',
            +            'ColorUIResource', 'ComboBoxEditor', 'ComboBoxModel',
            +            'ComboBoxUI', 'ComboPopup', 'CommunicationException',
            +            'COMM_FAILURE', 'Comparable', 'Comparator',
            +            'Compiler', 'CompletionStatus',
            +            'CompletionStatusHelper', 'Component',
            +            'ComponentAdapter', 'ComponentColorModel',
            +            'ComponentEvent', 'ComponentInputMap',
            +            'ComponentInputMapUIResource', 'ComponentListener',
            +            'ComponentOrientation', 'ComponentSampleModel',
            +            'ComponentUI', 'ComponentView', 'Composite',
            +            'CompositeContext', 'CompositeName', 'CompositeView',
            +            'CompoundBorder', 'CompoundControl',
            +            'CompoundControl.Type', 'CompoundEdit',
            +            'CompoundName', 'ConcurrentModificationException',
            +            'ConfigurationException', 'ConnectException',
            +            'ConnectIOException', 'Connection', 'Constructor',
            +            'Container', 'ContainerAdapter', 'ContainerEvent',
            +            'ContainerListener', 'ContentHandler',
            +            'ContentHandlerFactory', 'ContentModel', 'Context',
            +            'ContextList', 'ContextNotEmptyException',
            +            'ContextualRenderedImageFactory', 'Control',
            +            'Control.Type', 'ControlFactory',
            +            'ControllerEventListener', 'ConvolveOp', 'CRC32',
            +            'CRL', 'CRLException', 'CropImageFilter', 'CSS',
            +            'CSS.Attribute', 'CTX_RESTRICT_SCOPE',
            +            'CubicCurve2D', 'CubicCurve2D.Double',
            +            'CubicCurve2D.Float', 'Current', 'CurrentHelper',
            +            'CurrentHolder', 'CurrentOperations', 'Cursor',
            +            'Customizer', 'CustomMarshal', 'CustomValue',
            +            'DatabaseMetaData', 'DataBuffer', 'DataBufferByte',
            +            'DataBufferInt', 'DataBufferShort',
            +            'DataBufferUShort', 'DataFlavor',
            +            'DataFormatException', 'DatagramPacket',
            +            'DatagramSocket', 'DatagramSocketImpl',
            +            'DatagramSocketImplFactory', 'DataInput',
            +            'DataInputStream', 'DataLine', 'DataLine.Info',
            +            'DataOutput', 'DataOutputStream', 'DataTruncation',
            +            'DATA_CONVERSION', 'Date', 'DateFormat',
            +            'DateFormatSymbols', 'DebugGraphics',
            +            'DecimalFormat', 'DecimalFormatSymbols',
            +            'DefaultBoundedRangeModel', 'DefaultButtonModel',
            +            'DefaultCaret', 'DefaultCellEditor',
            +            'DefaultColorSelectionModel', 'DefaultComboBoxModel',
            +            'DefaultDesktopManager', 'DefaultEditorKit',
            +            'DefaultEditorKit.BeepAction',
            +            'DefaultEditorKit.CopyAction',
            +            'DefaultEditorKit.CutAction',
            +            'DefaultEditorKit.DefaultKeyTypedAction',
            +            'DefaultEditorKit.InsertBreakAction',
            +            'DefaultEditorKit.InsertContentAction',
            +            'DefaultEditorKit.InsertTabAction',
            +            'DefaultEditorKit.PasteAction,',
            +            'DefaultFocusManager', 'DefaultHighlighter',
            +            'DefaultHighlighter.DefaultHighlightPainter',
            +            'DefaultListCellRenderer',
            +            'DefaultListCellRenderer.UIResource',
            +            'DefaultListModel', 'DefaultListSelectionModel',
            +            'DefaultMenuLayout', 'DefaultMetalTheme',
            +            'DefaultMutableTreeNode',
            +            'DefaultSingleSelectionModel',
            +            'DefaultStyledDocument',
            +            'DefaultStyledDocument.AttributeUndoableEdit',
            +            'DefaultStyledDocument.ElementSpec',
            +            'DefaultTableCellRenderer',
            +            'DefaultTableCellRenderer.UIResource',
            +            'DefaultTableColumnModel', 'DefaultTableModel',
            +            'DefaultTextUI', 'DefaultTreeCellEditor',
            +            'DefaultTreeCellRenderer', 'DefaultTreeModel',
            +            'DefaultTreeSelectionModel', 'DefinitionKind',
            +            'DefinitionKindHelper', 'Deflater',
            +            'DeflaterOutputStream', 'Delegate', 'DesignMode',
            +            'DesktopIconUI', 'DesktopManager', 'DesktopPaneUI',
            +            'DGC', 'Dialog', 'Dictionary', 'DigestException',
            +            'DigestInputStream', 'DigestOutputStream',
            +            'Dimension', 'Dimension2D', 'DimensionUIResource',
            +            'DirContext', 'DirectColorModel', 'DirectoryManager',
            +            'DirObjectFactory', 'DirStateFactory',
            +            'DirStateFactory.Result', 'DnDConstants', 'Document',
            +            'DocumentEvent', 'DocumentEvent.ElementChange',
            +            'DocumentEvent.EventType', 'DocumentListener',
            +            'DocumentParser', 'DomainCombiner', 'DomainManager',
            +            'DomainManagerOperations', 'Double', 'DoubleHolder',
            +            'DoubleSeqHelper', 'DoubleSeqHolder',
            +            'DragGestureEvent', 'DragGestureListener',
            +            'DragGestureRecognizer', 'DragSource',
            +            'DragSourceContext', 'DragSourceDragEvent',
            +            'DragSourceDropEvent', 'DragSourceEvent',
            +            'DragSourceListener', 'Driver', 'DriverManager',
            +            'DriverPropertyInfo', 'DropTarget',
            +            'DropTarget.DropTargetAutoScroller',
            +            'DropTargetContext', 'DropTargetDragEvent',
            +            'DropTargetDropEvent', 'DropTargetEvent',
            +            'DropTargetListener', 'DSAKey',
            +            'DSAKeyPairGenerator', 'DSAParameterSpec',
            +            'DSAParams', 'DSAPrivateKey', 'DSAPrivateKeySpec',
            +            'DSAPublicKey', 'DSAPublicKeySpec', 'DTD',
            +            'DTDConstants', 'DynamicImplementation', 'DynAny',
            +            'DynArray', 'DynEnum', 'DynFixed', 'DynSequence',
            +            'DynStruct', 'DynUnion', 'DynValue', 'EditorKit',
            +            'Element', 'ElementIterator', 'Ellipse2D',
            +            'Ellipse2D.Double', 'Ellipse2D.Float', 'EmptyBorder',
            +            'EmptyStackException', 'EncodedKeySpec', 'Entity',
            +            'EnumControl', 'EnumControl.Type', 'Enumeration',
            +            'Environment', 'EOFException', 'Error',
            +            'EtchedBorder', 'Event', 'EventContext',
            +            'EventDirContext', 'EventListener',
            +            'EventListenerList', 'EventObject', 'EventQueue',
            +            'EventSetDescriptor', 'Exception',
            +            'ExceptionInInitializerError', 'ExceptionList',
            +            'ExpandVetoException', 'ExportException',
            +            'ExtendedRequest', 'ExtendedResponse',
            +            'Externalizable', 'FeatureDescriptor', 'Field',
            +            'FieldNameHelper', 'FieldPosition', 'FieldView',
            +            'File', 'FileChooserUI', 'FileDescriptor',
            +            'FileDialog', 'FileFilter', 'FileInputStream',
            +            'FilenameFilter', 'FileNameMap',
            +            'FileNotFoundException', 'FileOutputStream',
            +            'FilePermission', 'FileReader', 'FileSystemView',
            +            'FileView', 'FileWriter', 'FilteredImageSource',
            +            'FilterInputStream', 'FilterOutputStream',
            +            'FilterReader', 'FilterWriter',
            +            'FixedHeightLayoutCache', 'FixedHolder',
            +            'FlatteningPathIterator', 'FlavorMap', 'Float',
            +            'FloatControl', 'FloatControl.Type', 'FloatHolder',
            +            'FloatSeqHelper', 'FloatSeqHolder', 'FlowLayout',
            +            'FlowView', 'FlowView.FlowStrategy', 'FocusAdapter',
            +            'FocusEvent', 'FocusListener', 'FocusManager',
            +            'Font', 'FontFormatException', 'FontMetrics',
            +            'FontRenderContext', 'FontUIResource', 'Format',
            +            'FormatConversionProvider', 'FormView', 'Frame',
            +            'FREE_MEM', 'GapContent', 'GeneralPath',
            +            'GeneralSecurityException', 'GlyphJustificationInfo',
            +            'GlyphMetrics', 'GlyphVector', 'GlyphView',
            +            'GlyphView.GlyphPainter', 'GradientPaint',
            +            'GraphicAttribute', 'Graphics', 'Graphics2D',
            +            'GraphicsConfigTemplate', 'GraphicsConfiguration',
            +            'GraphicsDevice', 'GraphicsEnvironment',
            +            'GrayFilter', 'GregorianCalendar',
            +            'GridBagConstraints', 'GridBagLayout', 'GridLayout',
            +            'Group', 'Guard', 'GuardedObject', 'GZIPInputStream',
            +            'GZIPOutputStream', 'HasControls', 'HashMap',
            +            'HashSet', 'Hashtable', 'HierarchyBoundsAdapter',
            +            'HierarchyBoundsListener', 'HierarchyEvent',
            +            'HierarchyListener', 'Highlighter',
            +            'Highlighter.Highlight',
            +            'Highlighter.HighlightPainter', 'HTML',
            +            'HTML.Attribute', 'HTML.Tag', 'HTML.UnknownTag',
            +            'HTMLDocument', 'HTMLDocument.Iterator',
            +            'HTMLEditorKit', 'HTMLEditorKit.HTMLFactory',
            +            'HTMLEditorKit.HTMLTextAction',
            +            'HTMLEditorKit.InsertHTMLTextAction',
            +            'HTMLEditorKit.LinkController',
            +            'HTMLEditorKit.Parser',
            +            'HTMLEditorKit.ParserCallback',
            +            'HTMLFrameHyperlinkEvent', 'HTMLWriter',
            +            'HttpURLConnection', 'HyperlinkEvent',
            +            'HyperlinkEvent.EventType', 'HyperlinkListener',
            +            'ICC_ColorSpace', 'ICC_Profile', 'ICC_ProfileGray',
            +            'ICC_ProfileRGB', 'Icon', 'IconUIResource',
            +            'IconView', 'IdentifierHelper', 'Identity',
            +            'IdentityScope', 'IDLEntity', 'IDLType',
            +            'IDLTypeHelper', 'IDLTypeOperations',
            +            'IllegalAccessError', 'IllegalAccessException',
            +            'IllegalArgumentException',
            +            'IllegalComponentStateException',
            +            'IllegalMonitorStateException',
            +            'IllegalPathStateException', 'IllegalStateException',
            +            'IllegalThreadStateException', 'Image',
            +            'ImageConsumer', 'ImageFilter',
            +            'ImageGraphicAttribute', 'ImageIcon',
            +            'ImageObserver', 'ImageProducer',
            +            'ImagingOpException', 'IMP_LIMIT',
            +            'IncompatibleClassChangeError',
            +            'InconsistentTypeCode', 'IndexColorModel',
            +            'IndexedPropertyDescriptor',
            +            'IndexOutOfBoundsException', 'IndirectionException',
            +            'InetAddress', 'Inflater', 'InflaterInputStream',
            +            'InheritableThreadLocal', 'InitialContext',
            +            'InitialContextFactory',
            +            'InitialContextFactoryBuilder', 'InitialDirContext',
            +            'INITIALIZE', 'Initializer', 'InitialLdapContext',
            +            'InlineView', 'InputContext', 'InputEvent',
            +            'InputMap', 'InputMapUIResource', 'InputMethod',
            +            'InputMethodContext', 'InputMethodDescriptor',
            +            'InputMethodEvent', 'InputMethodHighlight',
            +            'InputMethodListener', 'InputMethodRequests',
            +            'InputStream', 'InputStreamReader', 'InputSubset',
            +            'InputVerifier', 'Insets', 'InsetsUIResource',
            +            'InstantiationError', 'InstantiationException',
            +            'Instrument', 'InsufficientResourcesException',
            +            'Integer', 'INTERNAL', 'InternalError',
            +            'InternalFrameAdapter', 'InternalFrameEvent',
            +            'InternalFrameListener', 'InternalFrameUI',
            +            'InterruptedException', 'InterruptedIOException',
            +            'InterruptedNamingException', 'INTF_REPOS',
            +            'IntHolder', 'IntrospectionException',
            +            'Introspector', 'Invalid',
            +            'InvalidAlgorithmParameterException',
            +            'InvalidAttributeIdentifierException',
            +            'InvalidAttributesException',
            +            'InvalidAttributeValueException',
            +            'InvalidClassException',
            +            'InvalidDnDOperationException',
            +            'InvalidKeyException', 'InvalidKeySpecException',
            +            'InvalidMidiDataException', 'InvalidName',
            +            'InvalidNameException', 'InvalidNameHelper',
            +            'InvalidNameHolder', 'InvalidObjectException',
            +            'InvalidParameterException',
            +            'InvalidParameterSpecException',
            +            'InvalidSearchControlsException',
            +            'InvalidSearchFilterException', 'InvalidSeq',
            +            'InvalidTransactionException', 'InvalidValue',
            +            'INVALID_TRANSACTION', 'InvocationEvent',
            +            'InvocationHandler', 'InvocationTargetException',
            +            'InvokeHandler', 'INV_FLAG', 'INV_IDENT',
            +            'INV_OBJREF', 'INV_POLICY', 'IOException',
            +            'IRObject', 'IRObjectOperations', 'IstringHelper',
            +            'ItemEvent', 'ItemListener', 'ItemSelectable',
            +            'Iterator', 'JApplet', 'JarEntry', 'JarException',
            +            'JarFile', 'JarInputStream', 'JarOutputStream',
            +            'JarURLConnection', 'JButton', 'JCheckBox',
            +            'JCheckBoxMenuItem', 'JColorChooser', 'JComboBox',
            +            'JComboBox.KeySelectionManager', 'JComponent',
            +            'JDesktopPane', 'JDialog', 'JEditorPane',
            +            'JFileChooser', 'JFrame', 'JInternalFrame',
            +            'JInternalFrame.JDesktopIcon', 'JLabel',
            +            'JLayeredPane', 'JList', 'JMenu', 'JMenuBar',
            +            'JMenuItem', 'JobAttributes',
            +            'JobAttributes.DefaultSelectionType',
            +            'JobAttributes.DestinationType',
            +            'JobAttributes.DialogType',
            +            'JobAttributes.MultipleDocumentHandlingType',
            +            'JobAttributes.SidesType', 'JOptionPane', 'JPanel',
            +            'JPasswordField', 'JPopupMenu',
            +            'JPopupMenu.Separator', 'JProgressBar',
            +            'JRadioButton', 'JRadioButtonMenuItem', 'JRootPane',
            +            'JScrollBar', 'JScrollPane', 'JSeparator', 'JSlider',
            +            'JSplitPane', 'JTabbedPane', 'JTable',
            +            'JTableHeader', 'JTextArea', 'JTextComponent',
            +            'JTextComponent.KeyBinding', 'JTextField',
            +            'JTextPane', 'JToggleButton',
            +            'JToggleButton.ToggleButtonModel', 'JToolBar',
            +            'JToolBar.Separator', 'JToolTip', 'JTree',
            +            'JTree.DynamicUtilTreeNode',
            +            'JTree.EmptySelectionModel', 'JViewport', 'JWindow',
            +            'Kernel', 'Key', 'KeyAdapter', 'KeyEvent',
            +            'KeyException', 'KeyFactory', 'KeyFactorySpi',
            +            'KeyListener', 'KeyManagementException', 'Keymap',
            +            'KeyPair', 'KeyPairGenerator', 'KeyPairGeneratorSpi',
            +            'KeySpec', 'KeyStore', 'KeyStoreException',
            +            'KeyStoreSpi', 'KeyStroke', 'Label', 'LabelUI',
            +            'LabelView', 'LastOwnerException',
            +            'LayeredHighlighter',
            +            'LayeredHighlighter.LayerPainter', 'LayoutManager',
            +            'LayoutManager2', 'LayoutQueue', 'LdapContext',
            +            'LdapReferralException', 'Lease',
            +            'LimitExceededException', 'Line', 'Line.Info',
            +            'Line2D', 'Line2D.Double', 'Line2D.Float',
            +            'LineBorder', 'LineBreakMeasurer', 'LineEvent',
            +            'LineEvent.Type', 'LineListener', 'LineMetrics',
            +            'LineNumberInputStream', 'LineNumberReader',
            +            'LineUnavailableException', 'LinkageError',
            +            'LinkedList', 'LinkException', 'LinkLoopException',
            +            'LinkRef', 'List', 'ListCellRenderer',
            +            'ListDataEvent', 'ListDataListener', 'ListIterator',
            +            'ListModel', 'ListResourceBundle',
            +            'ListSelectionEvent', 'ListSelectionListener',
            +            'ListSelectionModel', 'ListUI', 'ListView',
            +            'LoaderHandler', 'Locale', 'LocateRegistry',
            +            'LogStream', 'Long', 'LongHolder',
            +            'LongLongSeqHelper', 'LongLongSeqHolder',
            +            'LongSeqHelper', 'LongSeqHolder', 'LookAndFeel',
            +            'LookupOp', 'LookupTable', 'MalformedLinkException',
            +            'MalformedURLException', 'Manifest', 'Map',
            +            'Map.Entry', 'MARSHAL', 'MarshalException',
            +            'MarshalledObject', 'Math', 'MatteBorder',
            +            'MediaTracker', 'Member', 'MemoryImageSource',
            +            'Menu', 'MenuBar', 'MenuBarUI', 'MenuComponent',
            +            'MenuContainer', 'MenuDragMouseEvent',
            +            'MenuDragMouseListener', 'MenuElement', 'MenuEvent',
            +            'MenuItem', 'MenuItemUI', 'MenuKeyEvent',
            +            'MenuKeyListener', 'MenuListener',
            +            'MenuSelectionManager', 'MenuShortcut',
            +            'MessageDigest', 'MessageDigestSpi', 'MessageFormat',
            +            'MetaEventListener', 'MetalBorders',
            +            'MetalBorders.ButtonBorder',
            +            'MetalBorders.Flush3DBorder',
            +            'MetalBorders.InternalFrameBorder',
            +            'MetalBorders.MenuBarBorder',
            +            'MetalBorders.MenuItemBorder',
            +            'MetalBorders.OptionDialogBorder',
            +            'MetalBorders.PaletteBorder',
            +            'MetalBorders.PopupMenuBorder',
            +            'MetalBorders.RolloverButtonBorder',
            +            'MetalBorders.ScrollPaneBorder',
            +            'MetalBorders.TableHeaderBorder',
            +            'MetalBorders.TextFieldBorder',
            +            'MetalBorders.ToggleButtonBorder',
            +            'MetalBorders.ToolBarBorder', 'MetalButtonUI',
            +            'MetalCheckBoxIcon', 'MetalCheckBoxUI',
            +            'MetalComboBoxButton', 'MetalComboBoxEditor',
            +            'MetalComboBoxEditor.UIResource',
            +            'MetalComboBoxIcon', 'MetalComboBoxUI',
            +            'MetalDesktopIconUI', 'MetalFileChooserUI',
            +            'MetalIconFactory', 'MetalIconFactory.FileIcon16',
            +            'MetalIconFactory.FolderIcon16',
            +            'MetalIconFactory.PaletteCloseIcon',
            +            'MetalIconFactory.TreeControlIcon',
            +            'MetalIconFactory.TreeFolderIcon',
            +            'MetalIconFactory.TreeLeafIcon',
            +            'MetalInternalFrameTitlePane',
            +            'MetalInternalFrameUI', 'MetalLabelUI',
            +            'MetalLookAndFeel', 'MetalPopupMenuSeparatorUI',
            +            'MetalProgressBarUI', 'MetalRadioButtonUI',
            +            'MetalScrollBarUI', 'MetalScrollButton',
            +            'MetalScrollPaneUI', 'MetalSeparatorUI',
            +            'MetalSliderUI', 'MetalSplitPaneUI',
            +            'MetalTabbedPaneUI', 'MetalTextFieldUI',
            +            'MetalTheme', 'MetalToggleButtonUI',
            +            'MetalToolBarUI', 'MetalToolTipUI', 'MetalTreeUI',
            +            'MetaMessage', 'Method', 'MethodDescriptor',
            +            'MidiChannel', 'MidiDevice', 'MidiDevice.Info',
            +            'MidiDeviceProvider', 'MidiEvent', 'MidiFileFormat',
            +            'MidiFileReader', 'MidiFileWriter', 'MidiMessage',
            +            'MidiSystem', 'MidiUnavailableException',
            +            'MimeTypeParseException', 'MinimalHTMLWriter',
            +            'MissingResourceException', 'Mixer', 'Mixer.Info',
            +            'MixerProvider', 'ModificationItem', 'Modifier',
            +            'MouseAdapter', 'MouseDragGestureRecognizer',
            +            'MouseEvent', 'MouseInputAdapter',
            +            'MouseInputListener', 'MouseListener',
            +            'MouseMotionAdapter', 'MouseMotionListener',
            +            'MultiButtonUI', 'MulticastSocket',
            +            'MultiColorChooserUI', 'MultiComboBoxUI',
            +            'MultiDesktopIconUI', 'MultiDesktopPaneUI',
            +            'MultiFileChooserUI', 'MultiInternalFrameUI',
            +            'MultiLabelUI', 'MultiListUI', 'MultiLookAndFeel',
            +            'MultiMenuBarUI', 'MultiMenuItemUI',
            +            'MultiOptionPaneUI', 'MultiPanelUI',
            +            'MultiPixelPackedSampleModel', 'MultipleMaster',
            +            'MultiPopupMenuUI', 'MultiProgressBarUI',
            +            'MultiScrollBarUI', 'MultiScrollPaneUI',
            +            'MultiSeparatorUI', 'MultiSliderUI',
            +            'MultiSplitPaneUI', 'MultiTabbedPaneUI',
            +            'MultiTableHeaderUI', 'MultiTableUI', 'MultiTextUI',
            +            'MultiToolBarUI', 'MultiToolTipUI', 'MultiTreeUI',
            +            'MultiViewportUI', 'MutableAttributeSet',
            +            'MutableComboBoxModel', 'MutableTreeNode', 'Name',
            +            'NameAlreadyBoundException', 'NameClassPair',
            +            'NameComponent', 'NameComponentHelper',
            +            'NameComponentHolder', 'NamedValue', 'NameHelper',
            +            'NameHolder', 'NameNotFoundException', 'NameParser',
            +            'NamespaceChangeListener', 'NameValuePair',
            +            'NameValuePairHelper', 'Naming', 'NamingContext',
            +            'NamingContextHelper', 'NamingContextHolder',
            +            'NamingContextOperations', 'NamingEnumeration',
            +            'NamingEvent', 'NamingException',
            +            'NamingExceptionEvent', 'NamingListener',
            +            'NamingManager', 'NamingSecurityException',
            +            'NegativeArraySizeException', 'NetPermission',
            +            'NoClassDefFoundError', 'NoInitialContextException',
            +            'NoninvertibleTransformException',
            +            'NoPermissionException', 'NoRouteToHostException',
            +            'NoSuchAlgorithmException',
            +            'NoSuchAttributeException', 'NoSuchElementException',
            +            'NoSuchFieldError', 'NoSuchFieldException',
            +            'NoSuchMethodError', 'NoSuchMethodException',
            +            'NoSuchObjectException', 'NoSuchProviderException',
            +            'NotActiveException', 'NotBoundException',
            +            'NotContextException', 'NotEmpty', 'NotEmptyHelper',
            +            'NotEmptyHolder', 'NotFound', 'NotFoundHelper',
            +            'NotFoundHolder', 'NotFoundReason',
            +            'NotFoundReasonHelper', 'NotFoundReasonHolder',
            +            'NotOwnerException', 'NotSerializableException',
            +            'NO_IMPLEMENT', 'NO_MEMORY', 'NO_PERMISSION',
            +            'NO_RESOURCES', 'NO_RESPONSE',
            +            'NullPointerException', 'Number', 'NumberFormat',
            +            'NumberFormatException', 'NVList', 'Object',
            +            'ObjectChangeListener', 'ObjectFactory',
            +            'ObjectFactoryBuilder', 'ObjectHelper',
            +            'ObjectHolder', 'ObjectImpl', 'ObjectInput',
            +            'ObjectInputStream', 'ObjectInputStream.GetField',
            +            'ObjectInputValidation', 'ObjectOutput',
            +            'ObjectOutputStream', 'ObjectOutputStream.PutField',
            +            'ObjectStreamClass', 'ObjectStreamConstants',
            +            'ObjectStreamException', 'ObjectStreamField',
            +            'ObjectView', 'OBJECT_NOT_EXIST', 'ObjID',
            +            'OBJ_ADAPTER', 'Observable', 'Observer',
            +            'OctetSeqHelper', 'OctetSeqHolder', 'OMGVMCID',
            +            'OpenType', 'Operation',
            +            'OperationNotSupportedException', 'Option',
            +            'OptionalDataException', 'OptionPaneUI', 'ORB',
            +            'OutOfMemoryError', 'OutputStream',
            +            'OutputStreamWriter', 'OverlayLayout', 'Owner',
            +            'Package', 'PackedColorModel', 'Pageable',
            +            'PageAttributes', 'PageAttributes.ColorType',
            +            'PageAttributes.MediaType',
            +            'PageAttributes.OrientationRequestedType',
            +            'PageAttributes.OriginType',
            +            'PageAttributes.PrintQualityType', 'PageFormat',
            +            'Paint', 'PaintContext', 'PaintEvent', 'Panel',
            +            'PanelUI', 'Paper', 'ParagraphView',
            +            'ParameterBlock', 'ParameterDescriptor',
            +            'ParseException', 'ParsePosition', 'Parser',
            +            'ParserDelegator', 'PartialResultException',
            +            'PasswordAuthentication', 'PasswordView', 'Patch',
            +            'PathIterator', 'Permission', 'PermissionCollection',
            +            'Permissions', 'PERSIST_STORE', 'PhantomReference',
            +            'PipedInputStream', 'PipedOutputStream',
            +            'PipedReader', 'PipedWriter', 'PixelGrabber',
            +            'PixelInterleavedSampleModel', 'PKCS8EncodedKeySpec',
            +            'PlainDocument', 'PlainView', 'Point', 'Point2D',
            +            'Point2D.Double', 'Point2D.Float', 'Policy',
            +            'PolicyError', 'PolicyHelper', 'PolicyHolder',
            +            'PolicyListHelper', 'PolicyListHolder',
            +            'PolicyOperations', 'PolicyTypeHelper', 'Polygon',
            +            'PopupMenu', 'PopupMenuEvent', 'PopupMenuListener',
            +            'PopupMenuUI', 'Port', 'Port.Info',
            +            'PortableRemoteObject',
            +            'PortableRemoteObjectDelegate', 'Position',
            +            'Position.Bias', 'PreparedStatement', 'Principal',
            +            'PrincipalHolder', 'Printable',
            +            'PrinterAbortException', 'PrinterException',
            +            'PrinterGraphics', 'PrinterIOException',
            +            'PrinterJob', 'PrintGraphics', 'PrintJob',
            +            'PrintStream', 'PrintWriter', 'PrivateKey',
            +            'PRIVATE_MEMBER', 'PrivilegedAction',
            +            'PrivilegedActionException',
            +            'PrivilegedExceptionAction', 'Process',
            +            'ProfileDataException', 'ProgressBarUI',
            +            'ProgressMonitor', 'ProgressMonitorInputStream',
            +            'Properties', 'PropertyChangeEvent',
            +            'PropertyChangeListener', 'PropertyChangeSupport',
            +            'PropertyDescriptor', 'PropertyEditor',
            +            'PropertyEditorManager', 'PropertyEditorSupport',
            +            'PropertyPermission', 'PropertyResourceBundle',
            +            'PropertyVetoException', 'ProtectionDomain',
            +            'ProtocolException', 'Provider', 'ProviderException',
            +            'Proxy', 'PublicKey', 'PUBLIC_MEMBER',
            +            'PushbackInputStream', 'PushbackReader',
            +            'QuadCurve2D', 'QuadCurve2D.Double',
            +            'QuadCurve2D.Float', 'Random', 'RandomAccessFile',
            +            'Raster', 'RasterFormatException', 'RasterOp',
            +            'Reader', 'Receiver', 'Rectangle', 'Rectangle2D',
            +            'Rectangle2D.Double', 'Rectangle2D.Float',
            +            'RectangularShape', 'Ref', 'RefAddr', 'Reference',
            +            'Referenceable', 'ReferenceQueue',
            +            'ReferralException', 'ReflectPermission', 'Registry',
            +            'RegistryHandler', 'RemarshalException', 'Remote',
            +            'RemoteCall', 'RemoteException', 'RemoteObject',
            +            'RemoteRef', 'RemoteServer', 'RemoteStub',
            +            'RenderableImage', 'RenderableImageOp',
            +            'RenderableImageProducer', 'RenderContext',
            +            'RenderedImage', 'RenderedImageFactory', 'Renderer',
            +            'RenderingHints', 'RenderingHints.Key',
            +            'RepaintManager', 'ReplicateScaleFilter',
            +            'Repository', 'RepositoryIdHelper', 'Request',
            +            'RescaleOp', 'Resolver', 'ResolveResult',
            +            'ResourceBundle', 'ResponseHandler', 'ResultSet',
            +            'ResultSetMetaData', 'ReverbType', 'RGBImageFilter',
            +            'RMIClassLoader', 'RMIClientSocketFactory',
            +            'RMIFailureHandler', 'RMISecurityException',
            +            'RMISecurityManager', 'RMIServerSocketFactory',
            +            'RMISocketFactory', 'Robot', 'RootPaneContainer',
            +            'RootPaneUI', 'RoundRectangle2D',
            +            'RoundRectangle2D.Double', 'RoundRectangle2D.Float',
            +            'RowMapper', 'RSAKey', 'RSAKeyGenParameterSpec',
            +            'RSAPrivateCrtKey', 'RSAPrivateCrtKeySpec',
            +            'RSAPrivateKey', 'RSAPrivateKeySpec', 'RSAPublicKey',
            +            'RSAPublicKeySpec', 'RTFEditorKit',
            +            'RuleBasedCollator', 'Runnable', 'Runtime',
            +            'RunTime', 'RuntimeException', 'RunTimeOperations',
            +            'RuntimePermission', 'SampleModel',
            +            'SchemaViolationException', 'Scrollable',
            +            'Scrollbar', 'ScrollBarUI', 'ScrollPane',
            +            'ScrollPaneConstants', 'ScrollPaneLayout',
            +            'ScrollPaneLayout.UIResource', 'ScrollPaneUI',
            +            'SearchControls', 'SearchResult',
            +            'SecureClassLoader', 'SecureRandom',
            +            'SecureRandomSpi', 'Security', 'SecurityException',
            +            'SecurityManager', 'SecurityPermission', 'Segment',
            +            'SeparatorUI', 'Sequence', 'SequenceInputStream',
            +            'Sequencer', 'Sequencer.SyncMode', 'Serializable',
            +            'SerializablePermission', 'ServantObject',
            +            'ServerCloneException', 'ServerError',
            +            'ServerException', 'ServerNotActiveException',
            +            'ServerRef', 'ServerRequest',
            +            'ServerRuntimeException', 'ServerSocket',
            +            'ServiceDetail', 'ServiceDetailHelper',
            +            'ServiceInformation', 'ServiceInformationHelper',
            +            'ServiceInformationHolder',
            +            'ServiceUnavailableException', 'Set',
            +            'SetOverrideType', 'SetOverrideTypeHelper', 'Shape',
            +            'ShapeGraphicAttribute', 'Short', 'ShortHolder',
            +            'ShortLookupTable', 'ShortMessage', 'ShortSeqHelper',
            +            'ShortSeqHolder', 'Signature', 'SignatureException',
            +            'SignatureSpi', 'SignedObject', 'Signer',
            +            'SimpleAttributeSet', 'SimpleBeanInfo',
            +            'SimpleDateFormat', 'SimpleTimeZone',
            +            'SinglePixelPackedSampleModel',
            +            'SingleSelectionModel', 'SizeLimitExceededException',
            +            'SizeRequirements', 'SizeSequence', 'Skeleton',
            +            'SkeletonMismatchException',
            +            'SkeletonNotFoundException', 'SliderUI', 'Socket',
            +            'SocketException', 'SocketImpl', 'SocketImplFactory',
            +            'SocketOptions', 'SocketPermission',
            +            'SocketSecurityException', 'SoftBevelBorder',
            +            'SoftReference', 'SortedMap', 'SortedSet',
            +            'Soundbank', 'SoundbankReader', 'SoundbankResource',
            +            'SourceDataLine', 'SplitPaneUI', 'SQLData',
            +            'SQLException', 'SQLInput', 'SQLOutput',
            +            'SQLPermission', 'SQLWarning', 'Stack',
            +            'StackOverflowError', 'StateEdit', 'StateEditable',
            +            'StateFactory', 'Statement', 'Streamable',
            +            'StreamableValue', 'StreamCorruptedException',
            +            'StreamTokenizer', 'StrictMath', 'String',
            +            'StringBuffer', 'StringBufferInputStream',
            +            'StringCharacterIterator', 'StringContent',
            +            'StringHolder', 'StringIndexOutOfBoundsException',
            +            'StringReader', 'StringRefAddr', 'StringSelection',
            +            'StringTokenizer', 'StringValueHelper',
            +            'StringWriter', 'Stroke', 'Struct', 'StructMember',
            +            'StructMemberHelper', 'Stub', 'StubDelegate',
            +            'StubNotFoundException', 'Style', 'StyleConstants',
            +            'StyleConstants.CharacterConstants',
            +            'StyleConstants.ColorConstants',
            +            'StyleConstants.FontConstants',
            +            'StyleConstants.ParagraphConstants', 'StyleContext',
            +            'StyledDocument', 'StyledEditorKit',
            +            'StyledEditorKit.AlignmentAction',
            +            'StyledEditorKit.BoldAction',
            +            'StyledEditorKit.FontFamilyAction',
            +            'StyledEditorKit.FontSizeAction',
            +            'StyledEditorKit.ForegroundAction',
            +            'StyledEditorKit.ItalicAction',
            +            'StyledEditorKit.StyledTextAction',
            +            'StyledEditorKit.UnderlineAction', 'StyleSheet',
            +            'StyleSheet.BoxPainter', 'StyleSheet.ListPainter',
            +            'SwingConstants', 'SwingPropertyChangeSupport',
            +            'SwingUtilities', 'SyncFailedException',
            +            'Synthesizer', 'SysexMessage', 'System',
            +            'SystemColor', 'SystemException', 'SystemFlavorMap',
            +            'TabableView', 'TabbedPaneUI', 'TabExpander',
            +            'TableCellEditor', 'TableCellRenderer',
            +            'TableColumn', 'TableColumnModel',
            +            'TableColumnModelEvent', 'TableColumnModelListener',
            +            'TableHeaderUI', 'TableModel', 'TableModelEvent',
            +            'TableModelListener', 'TableUI', 'TableView',
            +            'TabSet', 'TabStop', 'TagElement', 'TargetDataLine',
            +            'TCKind', 'TextAction', 'TextArea', 'TextAttribute',
            +            'TextComponent', 'TextEvent', 'TextField',
            +            'TextHitInfo', 'TextLayout',
            +            'TextLayout.CaretPolicy', 'TextListener',
            +            'TextMeasurer', 'TextUI', 'TexturePaint', 'Thread',
            +            'ThreadDeath', 'ThreadGroup', 'ThreadLocal',
            +            'Throwable', 'Tie', 'TileObserver', 'Time',
            +            'TimeLimitExceededException', 'Timer', 'TimerTask',
            +            'Timestamp', 'TimeZone', 'TitledBorder', 'ToolBarUI',
            +            'Toolkit', 'ToolTipManager', 'ToolTipUI',
            +            'TooManyListenersException', 'Track',
            +            'TransactionRequiredException',
            +            'TransactionRolledbackException',
            +            'TRANSACTION_REQUIRED', 'TRANSACTION_ROLLEDBACK',
            +            'Transferable', 'TransformAttribute', 'TRANSIENT',
            +            'Transmitter', 'Transparency', 'TreeCellEditor',
            +            'TreeCellRenderer', 'TreeExpansionEvent',
            +            'TreeExpansionListener', 'TreeMap', 'TreeModel',
            +            'TreeModelEvent', 'TreeModelListener', 'TreeNode',
            +            'TreePath', 'TreeSelectionEvent',
            +            'TreeSelectionListener', 'TreeSelectionModel',
            +            'TreeSet', 'TreeUI', 'TreeWillExpandListener',
            +            'TypeCode', 'TypeCodeHolder', 'TypeMismatch',
            +            'Types', 'UID', 'UIDefaults',
            +            'UIDefaults.ActiveValue', 'UIDefaults.LazyInputMap',
            +            'UIDefaults.LazyValue', 'UIDefaults.ProxyLazyValue',
            +            'UIManager', 'UIManager.LookAndFeelInfo',
            +            'UIResource', 'ULongLongSeqHelper',
            +            'ULongLongSeqHolder', 'ULongSeqHelper',
            +            'ULongSeqHolder', 'UndeclaredThrowableException',
            +            'UndoableEdit', 'UndoableEditEvent',
            +            'UndoableEditListener', 'UndoableEditSupport',
            +            'UndoManager', 'UnexpectedException',
            +            'UnicastRemoteObject', 'UnionMember',
            +            'UnionMemberHelper', 'UNKNOWN', 'UnknownError',
            +            'UnknownException', 'UnknownGroupException',
            +            'UnknownHostException', 'UnknownObjectException',
            +            'UnknownServiceException', 'UnknownUserException',
            +            'UnmarshalException', 'UnrecoverableKeyException',
            +            'Unreferenced', 'UnresolvedPermission',
            +            'UnsatisfiedLinkError', 'UnsolicitedNotification',
            +            'UnsolicitedNotificationEvent',
            +            'UnsolicitedNotificationListener',
            +            'UnsupportedAudioFileException',
            +            'UnsupportedClassVersionError',
            +            'UnsupportedEncodingException',
            +            'UnsupportedFlavorException',
            +            'UnsupportedLookAndFeelException',
            +            'UnsupportedOperationException',
            +            'UNSUPPORTED_POLICY', 'UNSUPPORTED_POLICY_VALUE',
            +            'URL', 'URLClassLoader', 'URLConnection',
            +            'URLDecoder', 'URLEncoder', 'URLStreamHandler',
            +            'URLStreamHandlerFactory', 'UserException',
            +            'UShortSeqHelper', 'UShortSeqHolder',
            +            'UTFDataFormatException', 'Util', 'UtilDelegate',
            +            'Utilities', 'ValueBase', 'ValueBaseHelper',
            +            'ValueBaseHolder', 'ValueFactory', 'ValueHandler',
            +            'ValueMember', 'ValueMemberHelper',
            +            'VariableHeightLayoutCache', 'Vector', 'VerifyError',
            +            'VersionSpecHelper', 'VetoableChangeListener',
            +            'VetoableChangeSupport', 'View', 'ViewFactory',
            +            'ViewportLayout', 'ViewportUI',
            +            'VirtualMachineError', 'Visibility',
            +            'VisibilityHelper', 'VMID', 'VM_ABSTRACT',
            +            'VM_CUSTOM', 'VM_NONE', 'VM_TRUNCATABLE',
            +            'VoiceStatus', 'Void', 'WCharSeqHelper',
            +            'WCharSeqHolder', 'WeakHashMap', 'WeakReference',
            +            'Window', 'WindowAdapter', 'WindowConstants',
            +            'WindowEvent', 'WindowListener', 'WrappedPlainView',
            +            'WritableRaster', 'WritableRenderedImage',
            +            'WriteAbortedException', 'Writer',
            +            'WrongTransaction', 'WStringValueHelper',
            +            'X509Certificate', 'X509CRL', 'X509CRLEntry',
            +            'X509EncodedKeySpec', 'X509Extension', 'ZipEntry',
            +            'ZipException', 'ZipFile', 'ZipInputStream',
            +            'ZipOutputStream', 'ZoneView',
            +            '_BindingIteratorImplBase', '_BindingIteratorStub',
            +            '_IDLTypeStub', '_NamingContextImplBase',
            +            '_NamingContextStub', '_PolicyStub', '_Remote_Stub'
            +            ),
            +        4 => array(
            +            'boolean', 'byte', 'char', 'double', 'float', 'int', 'long',
            +            'short', 'void'
            +            ),
            +        5 => array(
            +            'allProperties', 'asImmutable', 'asSynchronized', 'collect',
            +            'count', 'each', 'eachProperty', 'eachPropertyName',
            +            'eachWithIndex', 'find', 'findAll', 'findIndexOf',
            +            'flatten', 'get', 'grep', 'inject', 'intersect',
            +            'join', 'max', 'min', 'pop', 'reverse',
            +            'reverseEach', 'size', 'sort', 'subMap', 'toList'
            +            ),
            +        6 => array(
            +            'center', 'contains', 'eachMatch', 'padLeft', 'padRight',
            +            'toCharacter', 'tokenize', 'toLong', 'toURL'
            +            ),
            +        7 => array(
            +            'append', 'eachByte', 'eachFile', 'eachFileRecurse', 'eachLine',
            +            'eachLines', 'encodeBase64', 'filterLine', 'getText',
            +            'splitEachLine', 'transformChar', 'transformLine',
            +            'withOutputStream', 'withPrintWriter', 'withReader',
            +            'withStream', 'withStreams', 'withWriter',
            +            'withWriterAppend', 'write', 'writeLine'
            +            ),
            +        8 => array(
            +            'dump', 'getLastMatcher', 'inspect', 'invokeMethod', 'print',
            +            'println', 'start', 'startDaemon', 'step', 'times',
            +            'upto', 'use'
            +            ),
            +        9 => array(
            +            'call', 'close', 'eachRow', 'execute', 'executeUpdate', 'Sql'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '[', ']', '{', '}', '*', '&', '%', '!', ';', '<', '>', '?', '|', '=',
            +        '=>', '||', '-', '+', '<<', '<<<', '&&'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => true,
            +        1 => false,
            +        2 => false,
            +        3 => true,
            +        4 => true,
            +        5 => true,
            +        6 => true,
            +        7 => true,
            +        8 => true,
            +        9 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;',
            +            2 => 'color: #000000; font-weight: bold;',
            +            3 => 'color: #aaaadd; font-weight: bold;',
            +            4 => 'color: #993333;',
            +            5 => 'color: #663399;',
            +            6 => 'color: #CC0099;',
            +            7 => 'color: #FFCC33;',
            +            8 => 'color: #993399;',
            +            9 => 'color: #993399; font-weight: bold;'
            +            ),
            +        'COMMENTS' => array(
            +            1=> 'color: #808080; font-style: italic;',
            +            2=> 'color: #a1a100;',
            +            3=> 'color: #808080; font-style: italic;',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #006600;',
            +            2 => 'color: #006600;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #0000ff;'
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => 'http://www.google.de/search?q=site%3Agroovy.codehaus.org/%20{FNAMEL}',
            +        2 => 'http://www.google.de/search?q=site%3Agroovy.codehaus.org/%20{FNAMEL}',
            +        3 => 'http://www.google.de/search?as_q={FNAME}&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1%2E5%2E0%2Fdocs%2Fapi%2F',
            +        4 => 'http://www.google.de/search?q=site%3Agroovy.codehaus.org/%20{FNAME}',
            +        5 => 'http://www.google.de/search?q=site%3Agroovy.codehaus.org/%20{FNAME}',
            +        6 => 'http://www.google.de/search?q=site%3Agroovy.codehaus.org/%20{FNAME}',
            +        7 => 'http://www.google.de/search?q=site%3Agroovy.codehaus.org/%20{FNAME}',
            +        8 => 'http://www.google.de/search?q=site%3Agroovy.codehaus.org/%20{FNAME}',
            +        9 => 'http://www.google.de/search?q=site%3Agroovy.codehaus.org/%20{FNAME}'
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        //Variables
            +        0 => '\\$\\{[a-zA-Z_][a-zA-Z0-9_]*\\}'
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/gwbasic.php b/vendor/easybook/geshi/geshi/gwbasic.php
            new file mode 100644
            index 0000000000..a42b09b73a
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/gwbasic.php
            @@ -0,0 +1,152 @@
            + 'GwBasic',
            +    'COMMENT_SINGLE' => array(1 => "'", 2=> "REM"),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +    /* Statements */
            +        1 => array('END','FOR','NEXT','DATA','INPUT','DIM','READ','LET',
            +            'GOTO','RUN','IF','RESTORE','GOSUB','RETURN','REM',
            +            'STOP','PRINT','CLEAR','LIST','NEW','ON','WAIT','DEF',
            +            'POKE','CONT','OUT','LPRINT','LLIST','WIDTH','ELSE',
            +            'TRON','TROFF','SWAP','ERASE','EDIT','ERROR','RESUME',
            +            'DELETE','AUTO','RENUM','DEFSTR','DEFINT','DEFSNG',
            +            'DEFDBL','LINE','WHILE','WEND','CALL','WRITE','OPTION',
            +            'RANDOMIZE','OPEN','CLOSE','LOAD','MERGE','SAVE',
            +            'COLOR','CLS','MOTOR','BSAVE','BLOAD','SOUND','BEEP',
            +            'PSET','PRESET','SCREEN','KEY','LOCATE','TO','THEN',
            +            'STEP','USR','FN','SPC','NOT','ERL','ERR','STRING',
            +            'USING','INSTR','VARPTR','CSRLIN','POINT','OFF',
            +            'FILES','FIELD','SYSTEM','NAME','LSET','RSET','KILL',
            +            'PUT','GET','RESET','COMMON','CHAIN','PAINT','COM',
            +            'CIRCLE','DRAW','PLAY','TIMER','IOCTL','CHDIR','MKDIR',
            +            'RMDIR','SHELL','VIEW','WINDOW','PMAP','PALETTE','LCOPY',
            +            'CALLS','PCOPY','LOCK','UNLOCK','RANDOM','APPEND',
            +            ),
            +        2 => array(
            +            /* Functions */
            +            'CVI','CVS','CVD','MKI','MKS','MKD','ENVIRON',
            +            'LEFT','RIGHT','MID','SGN','INT','ABS',
            +            'SQR','SIN','LOG','EXP','COS','TAN','ATN',
            +            'FRE','INP','POS','LEN','STR','VAL','ASC',
            +            'CHR','PEEK','SPACE','OCT','HEX','LPOS',
            +            'CINT','CSNG','CDBL','FIX','PEN','STICK',
            +            'STRIG','EOF','LOC','LOF'
            +            ),
            +        3 => array(
            +            /* alpha Operators */
            +            'AND','OR','XOR','EQV','IMP','MOD'
            +            ),
            +        4 => array(
            +            /* parameterless functions */
            +            'INKEY','DATE','TIME','ERDEV','RND'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        0 => array(
            +            '>','=','<','+','-','*','/','^','\\'
            +            ),
            +        1 => array(
            +            '?'
            +            )
            +        ),
            +    'CASE_SENSITIVE' => array(
            +            GESHI_COMMENTS => false,
            +            1 => false,
            +            2 => false,
            +            3 => false,
            +            4 => false
            +            ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #00a1a1;font-weight: bold',
            +            2 => 'color: #000066;font-weight: bold',
            +            3 => 'color: #00a166;font-weight: bold',
            +            4 => 'color: #0066a1;font-weight: bold'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080;',
            +            2 => 'color: #808080;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +        /* Same as KEYWORDS[3] (and, or, not...) */
            +            0 => 'color: #00a166;font-weight: bold',
            +            1 => 'color: #00a1a1;font-weight: bold',
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099;'
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            1 => 'color: #708090'
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        1 => '^[0-9]+ '
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/haskell.php b/vendor/easybook/geshi/geshi/haskell.php
            new file mode 100644
            index 0000000000..7780142039
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/haskell.php
            @@ -0,0 +1,201 @@
            + 'Haskell',
            +    'COMMENT_SINGLE' => array( 1 => '--'),
            +    'COMMENT_MULTI' => array('{-' => '-}'),
            +    'COMMENT_REGEXP' => array(
            +        2 => "/-->/",
            +        3 => "/{-(?:(?R)|.)-}/s", //Nested Comments
            +        ),
            +    'CASE_KEYWORDS' => 0,
            +    'QUOTEMARKS' => array('"',"'"),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        /* main haskell keywords */
            +        1 => array(
            +            'as',
            +            'case', 'of', 'class', 'data', 'default',
            +            'deriving', 'do', 'forall', 'hiding', 'if', 'then',
            +            'else', 'import', 'infix', 'infixl', 'infixr',
            +            'instance', 'let', 'in', 'module', 'newtype',
            +            'qualified', 'type', 'where'
            +            ),
            +        /* define names of main librarys, so we can link to it */
            +        2 => array(
            +            'Foreign', 'Numeric', 'Prelude'
            +            ),
            +        /* just link to Prelude functions, cause it's the default opened library when starting Haskell */
            +        3 => array(
            +            'not', 'otherwise', 'maybe',
            +            'either', 'fst', 'snd', 'curry', 'uncurry',
            +            'compare',
            +            'max', 'min', 'succ', 'pred', 'toEnum', 'fromEnum',
            +            'enumFrom', 'enumFromThen', 'enumFromTo',
            +            'enumFromThenTo', 'minBound', 'maxBound',
            +            'negate', 'abs', 'signum',
            +            'fromInteger', 'toRational', 'quot', 'rem',
            +            'div', 'mod', 'quotRem', 'divMod', 'toInteger',
            +            'recip', 'fromRational', 'pi', 'exp',
            +            'log', 'sqrt', 'logBase', 'sin', 'cos',
            +            'tan', 'asin', 'acos', 'atan', 'sinh', 'cosh',
            +            'tanh', 'asinh', 'acosh', 'atanh',
            +            'properFraction', 'truncate', 'round', 'ceiling',
            +            'floor', 'floatRadix', 'floatDigits', 'floatRange',
            +            'decodeFloat', 'encodeFloat', 'exponent',
            +            'significand', 'scaleFloat', 'isNaN', 'isInfinite',
            +            'isDenomalized', 'isNegativeZero', 'isIEEE',
            +            'atan2', 'subtract', 'even', 'odd', 'gcd',
            +            'lcm', 'fromIntegral', 'realToFrac',
            +            'return', 'fail', 'fmap',
            +            'mapM', 'mapM_', 'sequence', 'sequence_',
            +            'id', 'const','flip',
            +            'until', 'asTypeOf', 'error', 'undefined',
            +            'seq','map','filter', 'head',
            +            'last', 'tail', 'init', 'null', 'length',
            +            'reverse', 'foldl', 'foldl1', 'foldr',
            +            'foldr1', 'and', 'or', 'any', 'all', 'sum',
            +            'product', 'concat', 'concatMap', 'maximum',
            +            'minimum', 'scanl', 'scanl1', 'scanr', 'scanr1',
            +            'iterate', 'repeat', 'cycle', 'take', 'drop',
            +            'splitAt', 'takeWhile', 'dropWhile', 'span',
            +            'break', 'elem', 'notElem', 'lookup', 'zip',
            +            'zip3', 'zipWith', 'zipWith3', 'unzip', 'unzip3',
            +            'lines', 'words', 'unlines',
            +            'unwords', 'showPrec', 'show', 'showList',
            +            'shows', 'showChar', 'showString', 'showParen',
            +            'readsPrec', 'readList', 'reads', 'readParen',
            +            'read', 'lex', 'putChar', 'putStr', 'putStrLn',
            +            'print', 'getChar', 'getLine', 'getContents',
            +            'interact', 'readFile', 'writeFile', 'appendFile',
            +            'readIO', 'readLn', 'ioError', 'userError', 'catch'
            +            ),
            +        /* here Prelude Types */
            +        4 => array (
            +            'Bool', 'Maybe', 'Either', 'Ord', 'Ordering',
            +            'Char', 'String', 'Eq', 'Enum', 'Bounded',
            +            'Int', 'Integer', 'Float', 'Double', 'Rational',
            +            'Num', 'Real', 'Integral', 'Fractional',
            +            'Floating', 'RealFrac', 'RealFloat', 'Monad',
            +            'Functor', 'Show', 'ShowS', 'Read', 'ReadS',
            +            'IO'
            +            ),
            +        /* finally Prelude Exceptions */
            +        5 => array (
            +            'IOError', 'IOException'
            +            )
            +        ),
            +    /* highlighting symbols is really important in Haskell */
            +    'SYMBOLS' => array(
            +        '|', '->', '<-', '@', '!', '::', '_', '~', '=', '?',
            +        '&&', '||', '==', '/=', '<', '<=', '>',
            +        '>=','+', '-', '*','/', '%', '**', '^', '^^',
            +        '>>=', '>>', '=<<',  '$', '.', ',', '$!',
            +        '++', '!!'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true, /* functions name are case seinsitive */
            +        3 => true, /* types name too */
            +        4 => true, /* finally exceptions too */
            +        5 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #06c; font-weight: bold;', /* nice blue */
            +            2 => 'color: #06c; font-weight: bold;', /* blue as well */
            +            3 => 'font-weight: bold;', /* make the preduled functions bold */
            +            4 => 'color: #cccc00; font-weight: bold;', /* give types a different bg */
            +            5 => 'color: maroon;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #5d478b; font-style: italic;',
            +            2 => 'color: #339933; font-weight: bold;',
            +            3 => 'color: #5d478b; font-style: italic;', /* light purple */
            +            'MULTI' => 'color: #5d478b; font-style: italic;' /* light purple */
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'background-color: #3cb371; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: green;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'background-color: #3cb371;' /* nice green */
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: red;' /* pink */
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #060;' /* dark green */
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #339933; font-weight: bold;'
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        /* some of keywords are Prelude functions */
            +        1 => '',
            +        /* link to the wanted library */
            +        2 => 'http://haskell.org/ghc/docs/latest/html/libraries/base/{FNAME}.html',
            +        /* link to Prelude functions */
            +        3 => 'http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:{FNAME}',
            +        /* link to Prelude types */
            +        4 => 'http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#t:{FNAME}',
            +        /* link to Prelude exceptions */
            +        5 => 'http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#t:{FNAME}',
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/haxe.php b/vendor/easybook/geshi/geshi/haxe.php
            new file mode 100644
            index 0000000000..84c717eb97
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/haxe.php
            @@ -0,0 +1,160 @@
            + 'Haxe',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(
            +        //Import and Package directives (Basic Support only)
            +        2 => '/(?:(?<=import[\\n\\s])|(?<=using[\\n\\s])|(?<=package[\\n\\s]))[\\n\\s]*([a-zA-Z0-9_]+\\.)*([a-zA-Z0-9_]+|\*)(?=[\n\s;])/i',
            +        // Haxe comments
            +        3 => '#/\*\*(?![\*\/]).*\*/#sU',
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            //http://haxe.org/ref/keywords
            +            'break', 'callback', 'case', 'cast', 'catch', 'class', 'continue', 'default', 'do', 'dynamic',
            +            'else', 'enum', 'extends', 'extern', /*'false',*/ 'for', 'function', 'here', 'if',
            +            'implements', 'import', 'in', 'inline', 'interface', 'never', 'new', /*'null',*/ 'override',
            +            'package', 'private', 'public', 'return', 'static', 'super', 'switch', 'this', 'throw',
            +            'trace', /*'true',*/ 'try', 'typedef', 'untyped', 'using', 'var', 'while',
            +            'macro', '$type',
            +            ),
            +        2 => array(
            +            //primitive values
            +            'null', 'false', 'true',
            +            ),
            +        3 => array(
            +            //global types
            +            'Array', 'ArrayAccess', /*'Bool',*/ 'Class', 'Date', 'DateTools', 'Dynamic',
            +            'EReg', 'Enum', 'EnumValue', /*'Float',*/ 'Hash', /*'Int',*/ 'IntHash', 'IntIter',
            +            'Iterable', 'Iterator', 'Lambda', 'List', 'Math', 'Null', 'Reflect', 'Std',
            +            /*'String',*/ 'StringBuf', 'StringTools', 'Sys', 'Type', /*'UInt',*/ 'ValueType',
            +            /*'Void',*/ 'Xml', 'XmlType',
            +            ),
            +        4 => array(
            +            //primitive types
            +            'Void', 'Bool', 'Int', 'Float', 'UInt', 'String',
            +            ),
            +        5 => array(
            +            //compiler switches
            +            "#if", "#elseif", "#else", "#end", "#error",
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        //http://haxe.org/manual/operators
            +        '++', '--',
            +        '%',
            +        '*', '/',
            +        '+', '-',
            +        '<<', '>>', '>>>',
            +        '|', '&', '^',
            +        '==', '!=', '>', '>=', '<', '<=',
            +        '...',
            +        '&&',
            +        '||',
            +        '?', ':',
            +        '=', '+=', '-=', '/=', '*=', '<<=', '>>=', '>>>=', '|=', '&=', '^=',
            +        '(', ')', '[', ']', '{', '}', ';',
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        5 => true,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #6699cc; font-weight: bold;',
            +            2 => 'color: #000066; font-weight: bold;',
            +            3 => 'color: #03F; ',
            +            4 => 'color: #000033; font-weight: bold;',
            +            5 => 'color: #330000; font-weight: bold;',
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; font-style: italic;',
            +            2 => 'color: #006699;',
            +            3 => 'color: #008000; font-style: italic; font-weight: bold;',
            +            3 => 'color: #008000; font-style: italic; font-weight: bold;',
            +            'MULTI' => 'color: #666666; font-style: italic;',
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;',
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000000;',
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #FF0000;',
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;',
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #006633;',
            +            2 => 'color: #006633;',
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #339933;',
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => '',
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.',
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/hicest.php b/vendor/easybook/geshi/geshi/hicest.php
            new file mode 100644
            index 0000000000..2eead82e88
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/hicest.php
            @@ -0,0 +1,107 @@
            + 'HicEst',
            +    'COMMENT_SINGLE' => array(1 => '!'),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"', '\''),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            '$cmd_line', 'abs', 'acos', 'alarm', 'alias', 'allocate', 'appendix', 'asin', 'atan', 'axis', 'beep',
            +            'call', 'ceiling', 'char', 'character', 'com', 'continue', 'cos', 'cosh', 'data', 'diffeq', 'dimension', 'dlg', 'dll',
            +            'do', 'edit', 'else', 'elseif', 'end', 'enddo', 'endif', 'exp', 'floor', 'function', 'fuz', 'goto', 'iand', 'ichar',
            +            'ieor', 'if', 'index', 'init', 'int', 'intpol', 'ior', 'key', 'len', 'len_trim', 'line', 'lock', 'log', 'max', 'maxloc',
            +            'min', 'minloc', 'mod', 'nint', 'not', 'open', 'pop', 'ran', 'read', 'real', 'return', 'rgb', 'roots', 'sign', 'sin',
            +            'sinh', 'solve', 'sort', 'subroutine', 'sum', 'system', 'tan', 'tanh', 'then', 'time', 'use', 'window', 'write', 'xeq'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        1 => array(
            +            '(', ')', '+', '-', '*', '/', '=', '<', '>', '!', '^', ':', ','
            +            ),
            +        2 => array(
            +            '$', '$$'
            +            )
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #ff0000;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; font-style: italic;',
            +            'MULTI' => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #0000ff;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;',
            +            ),
            +        'METHODS' => array(
            +            0 => 'color: #004000;'
            +            ),
            +        'SYMBOLS' => array(
            +            1 => 'color: #339933;',
            +            2 => 'color: #ff0000;'
            +            ),
            +        'REGEXPS' => array(),
            +        'SCRIPT' => array()
            +        ),
            +    'URLS' => array(1 => ''),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(),
            +    'REGEXPS' => array(),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(),
            +    'HIGHLIGHT_STRICT_BLOCK' => array()
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/hq9plus.php b/vendor/easybook/geshi/geshi/hq9plus.php
            new file mode 100644
            index 0000000000..5b62589cc4
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/hq9plus.php
            @@ -0,0 +1,102 @@
            + 'HQ9+',
            +    'COMMENT_SINGLE' => array(),
            +    'COMMENT_MULTI' => array(),
            +    'COMMENT_REGEXP' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_UPPER,
            +    'QUOTEMARKS' => array(),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        ),
            +    'SYMBOLS' => array(
            +        'H', 'Q', '9', '+', 'h', 'q'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            ),
            +        'COMMENTS' => array(
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #a16000;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4,
            +    'PARSER_CONTROL' => array(
            +        'ENABLE_FLAGS' => array(
            +            'KEYWORDS' => GESHI_NEVER,
            +            'COMMENTS' => GESHI_NEVER,
            +            'STRINGS' => GESHI_NEVER,
            +            'REGEXPS' => GESHI_NEVER,
            +            'NUMBERS' => GESHI_NEVER
            +            )
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/html4strict.php b/vendor/easybook/geshi/geshi/html4strict.php
            new file mode 100644
            index 0000000000..2fc5185f8b
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/html4strict.php
            @@ -0,0 +1,189 @@
            + 'HTML',
            +    'COMMENT_SINGLE' => array(),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        2 => array(
            +            'a', 'abbr', 'acronym', 'address', 'applet', 'area',
            +            'base', 'basefont', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'b',
            +            'caption', 'center', 'cite', 'code', 'colgroup', 'col',
            +            'dd', 'del', 'dfn', 'dir', 'div', 'dl', 'dt',
            +            'em',
            +            'fieldset', 'font', 'form', 'frame', 'frameset',
            +            'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'html',
            +            'iframe', 'ilayer', 'img', 'input', 'ins', 'isindex', 'i',
            +            'kbd',
            +            'label', 'legend', 'link', 'li',
            +            'map', 'meta',
            +            'noframes', 'noscript',
            +            'object', 'ol', 'optgroup', 'option',
            +            'param', 'pre', 'p',
            +            'q',
            +            'samp', 'script', 'select', 'small', 'span', 'strike', 'strong', 'style', 'sub', 'sup', 's',
            +            'table', 'tbody', 'td', 'textarea', 'text', 'tfoot', 'thead', 'th', 'title', 'tr', 'tt',
            +            'ul', 'u',
            +            'var',
            +            ),
            +        3 => array(
            +            'abbr', 'accept-charset', 'accept', 'accesskey', 'action', 'align', 'alink', 'alt', 'archive', 'axis',
            +            'background', 'bgcolor', 'border',
            +            'cellpadding', 'cellspacing', 'char', 'charoff', 'charset', 'checked', 'cite', 'class', 'classid', 'clear', 'code', 'codebase', 'codetype', 'color', 'cols', 'colspan', 'compact', 'content', 'coords',
            +            'data', 'datetime', 'declare', 'defer', 'dir', 'disabled',
            +            'enctype',
            +            'face', 'for', 'frame', 'frameborder',
            +            'headers', 'height', 'href', 'hreflang', 'hspace', 'http-equiv',
            +            'id', 'ismap',
            +            'label', 'lang', 'language', 'link', 'longdesc',
            +            'marginheight', 'marginwidth', 'maxlength', 'media', 'method', 'multiple',
            +            'name', 'nohref', 'noresize', 'noshade', 'nowrap',
            +            'object', 'onblur', 'onchange', 'onclick', 'ondblclick', 'onfocus', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onreset', 'onselect', 'onsubmit', 'onunload',
            +            'profile', 'prompt',
            +            'readonly', 'rel', 'rev', 'rowspan', 'rows', 'rules',
            +            'scheme', 'scope', 'scrolling', 'selected', 'shape', 'size', 'span', 'src', 'standby', 'start', 'style', 'summary',
            +            'tabindex', 'target', 'text', 'title', 'type',
            +            'usemap',
            +            'valign', 'value', 'valuetype', 'version', 'vlink', 'vspace',
            +            'width'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '/', '='
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        2 => false,
            +        3 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            2 => 'color: #000000; font-weight: bold;',
            +            3 => 'color: #000066;'
            +            ),
            +        'COMMENTS' => array(
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'SCRIPT' => array(
            +            -2 => 'color: #404040;', // CDATA
            +            -1 => 'color: #808080; font-style: italic;', // comments
            +            0 => 'color: #00bbdd;',
            +            1 => 'color: #ddbb00;',
            +            2 => 'color: #009900;'
            +            ),
            +        'REGEXPS' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        2 => 'http://december.com/html/4/element/{FNAMEL}.html',
            +        3 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_ALWAYS,
            +    'SCRIPT_DELIMITERS' => array(
            +        -2 => array(
            +            ' ']]>'
            +            ),
            +        -1 => array(
            +            ''
            +            ),
            +        0 => array(
            +            ' '>'
            +            ),
            +        1 => array(
            +            '&' => ';'
            +            ),
            +        2 => array(
            +            '<' => '>'
            +            )
            +    ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        -2 => false,
            +        -1 => false,
            +        0 => false,
            +        1 => false,
            +        2 => true
            +        ),
            +    'TAB_WIDTH' => 4,
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            2 => array(
            +                'DISALLOWED_BEFORE' => '(?<=<|<\/)',
            +                'DISALLOWED_AFTER' => '(?=\s|\/|>)',
            +            )
            +        )
            +    )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/html5.php b/vendor/easybook/geshi/geshi/html5.php
            new file mode 100644
            index 0000000000..543156b1e0
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/html5.php
            @@ -0,0 +1,211 @@
            + 'HTML5',
            +    'COMMENT_SINGLE' => array(),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        2 => array(
            +            'a', 'abbr', 'address', 'article', 'area', 'aside', 'audio',
            +
            +            'base', 'bdo', 'blockquote', 'body', 'br', 'button', 'b',
            +
            +            'caption', 'cite', 'code', 'colgroup', 'col', 'canvas', 'command', 'datalist', 'details',
            +
            +            'dd', 'del', 'dfn', 'div', 'dl', 'dt',
            +
            +            'em', 'embed',
            +
            +            'fieldset', 'form', 'figcaption', 'figure', 'footer',
            +
            +            'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'html', 'header', 'hgroup',
            +
            +            'iframe', 'ilayer', 'img', 'input', 'ins', 'isindex', 'i',
            +
            +            'kbd', 'keygen',
            +
            +            'label', 'legend', 'link', 'li',
            +
            +            'map', 'meta', 'mark', 'meter',
            +
            +            'noscript', 'nav',
            +
            +            'object', 'ol', 'optgroup', 'option', 'output',
            +
            +            'param', 'pre', 'p', 'progress',
            +
            +            'q',
            +
            +            'rp', 'rt', 'ruby',
            +
            +            'samp', 'script', 'select', 'small', 'span', 'strong', 'style', 'sub', 'sup', 's', 'section', 'source', 'summary',
            +
            +            'table', 'tbody', 'td', 'textarea', 'text', 'tfoot', 'thead', 'th', 'title', 'tr', 'time',
            +
            +            'ul',
            +
            +            'var', 'video',
            +
            +            'wbr',
            +            ),
            +        3 => array(
            +            'abbr', 'accept-charset', 'accept', 'accesskey', 'action', 'align', 'alink', 'alt', 'archive', 'axis', 'autocomplete', 'autofocus',
            +            'background', 'bgcolor', 'border',
            +            'cellpadding', 'cellspacing', 'char', 'charoff', 'charset', 'checked', 'cite', 'class', 'classid', 'clear', 'code', 'codebase', 'codetype', 'color', 'cols', 'colspan', 'compact', 'content', 'coords', 'contenteditable', 'contextmenu',
            +            'data', 'datetime', 'declare', 'defer', 'dir', 'disabled', 'draggable', 'dropzone',
            +            'enctype',
            +            'face', 'for', 'frame', 'frameborder', 'form', 'formaction', 'formenctype', 'formmethod', 'formnovalidate', 'formtarget',
            +            'headers', 'height', 'href', 'hreflang', 'hspace', 'http-equiv', 'hidden',
            +            'id', 'ismap',
            +            'label', 'lang', 'language', 'link', 'longdesc',
            +            'marginheight', 'marginwidth', 'maxlength', 'media', 'method', 'multiple', 'min', 'max',
            +            'name', 'nohref', 'noresize', 'noshade', 'nowrap', 'novalidate',
            +            'object', 'onblur', 'onchange', 'onclick', 'ondblclick', 'onfocus', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onselect', 'onsubmit', 'onunload', 'onafterprint', 'onbeforeprint', 'onbeforeonload', 'onerror', 'onhaschange', 'onmessage', 'onoffline', 'ononline', 'onpagehide', 'onpageshow', 'onpopstate', 'onredo', 'onresize', 'onstorage', 'onundo', 'oncontextmenu', 'onformchange', 'onforminput', 'oninput', 'oninvalid', 'ondrag', 'ondragend', 'ondragenter', 'ondragleave', 'ondragover', 'ondragstart', 'ondrop', 'onmousewheel', 'onscroll', 'oncanplay', 'oncanplaythrough', 'ondurationchange', 'onemptied', 'onended', 'onloadeddata', 'onloadedmetadata', 'onloadstart', 'onpause', 'onplay', 'onplaying', 'onprogress', 'onratechange', 'onreadystatechange', 'onseeked', 'onseeking', 'onstalled', 'onsuspend', 'ontimeupdate', 'onvolumechange', 'onwaiting',
            +            'profile', 'prompt', 'pattern', 'placeholder',
            +            'readonly', 'rel', 'rev', 'rowspan', 'rows', 'rules', 'required',
            +            'scheme', 'scope', 'scrolling', 'selected', 'shape', 'size', 'span', 'src', 'standby', 'start', 'style', 'summary', 'spellcheck', 'step',
            +            'tabindex', 'target', 'text', 'title', 'type',
            +            'usemap',
            +            'valign', 'value', 'valuetype', 'version', 'vlink', 'vspace',
            +            'width'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '/', '='
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        2 => false,
            +        3 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            2 => 'color: #000000; font-weight: bold;',
            +            3 => 'color: #000066;'
            +            ),
            +        'COMMENTS' => array(
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'SCRIPT' => array(
            +            -2 => 'color: #404040;', // CDATA
            +            -1 => 'color: #808080; font-style: italic;', // comments
            +            0 => 'color: #00bbdd;',
            +            1 => 'color: #ddbb00;',
            +            2 => 'color: #009900;'
            +            ),
            +        'REGEXPS' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        2 => 'http://december.com/html/4/element/{FNAMEL}.html',
            +        3 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_ALWAYS,
            +    'SCRIPT_DELIMITERS' => array(
            +        -2 => array(
            +            ' ']]>'
            +            ),
            +        -1 => array(
            +            ''
            +            ),
            +        0 => array(
            +            ' '>'
            +            ),
            +        1 => array(
            +            '&' => ';'
            +            ),
            +        2 => array(
            +            '<' => '>'
            +            )
            +    ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        -2 => false,
            +        -1 => false,
            +        0 => false,
            +        1 => false,
            +        2 => true
            +        ),
            +    'TAB_WIDTH' => 4,
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            2 => array(
            +                'DISALLOWED_BEFORE' => '(?<=<|<\/)',
            +                'DISALLOWED_AFTER' => '(?=\s|\/|>)',
            +            )
            +        )
            +    )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/icon.php b/vendor/easybook/geshi/geshi/icon.php
            new file mode 100644
            index 0000000000..b93616d65a
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/icon.php
            @@ -0,0 +1,211 @@
            + 'Icon',
            +    'COMMENT_SINGLE' => array(1 => '#'),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"', '\''),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'break', 'case', 'continue', 'create', 'default', 'do', 'else',
            +            'end', 'every', 'fail', 'for', 'if', 'import', 'initial',
            +            'initially', 'invocable', 'link', 'next', 'not', 'of', 'package',
            +            'procedure', 'record', 'repeat', 'return', 'switch', 'suspend',
            +            'then', 'to', 'until', 'while'
            +            ),
            +        2 => array(
            +            'global', 'local', 'static'
            +            ),
            +        3 => array(
            +            'allocated', 'ascii', 'clock', 'collections',
            +            'column', 'cset', 'current', 'date', 'dateline', 'digits',
            +            'dump', 'e', 'error', 'errornumber', 'errortext',
            +            'errorvalue', 'errout', 'eventcode', 'eventsource', 'eventvalue',
            +            'fail', 'features', 'file', 'host', 'input', 'lcase',
            +            'letters', 'level', 'line', 'main', 'now', 'null',
            +            'output', 'phi', 'pi', 'pos', 'progname', 'random',
            +            'regions', 'source', 'storage', 'subject', 'syserr', 'time',
            +            'trace', 'ucase', 'version', 'col', 'control', 'interval',
            +            'ldrag', 'lpress', 'lrelease', 'mdrag', 'meta', 'mpress',
            +            'mrelease', 'rdrag', 'resize', 'row', 'rpress', 'rrelease',
            +            'shift', 'window', 'x', 'y'
            +            ),
            +        4 => array(
            +            'abs', 'acos', 'any', 'args', 'asin', 'atan', 'bal', 'center', 'char',
            +            'chmod', 'close', 'cofail', 'collect', 'copy', 'cos', 'cset', 'ctime', 'delay', 'delete',
            +            'detab', 'display', 'dtor', 'entab', 'errorclear', 'event', 'eventmask', 'EvGet', 'exit',
            +            'exp', 'fetch', 'fieldnames', 'find', 'flock', 'flush', 'function', 'get', 'getch',
            +            'getche', 'getenv', 'gettimeofday', 'globalnames', 'gtime', 'iand', 'icom', 'image',
            +            'insert', 'integer', 'ior', 'ishift', 'ixor', 'key', 'left', 'list', 'load', 'loadfunc',
            +            'localnames', 'log', 'many', 'map', 'match', 'member', 'mkdir', 'move', 'name', 'numeric',
            +            'open', 'opmask', 'ord', 'paramnames', 'parent', 'pipe', 'pop', 'pos', 'proc', 'pull',
            +            'push', 'put', 'read', 'reads', 'real', 'receive', 'remove', 'rename', 'repl', 'reverse',
            +            'right', 'rmdir', 'rtod', 'runerr', 'seek', 'select', 'send', 'seq', 'serial', 'set',
            +            'setenv', 'sort', 'sortf', 'sql', 'sqrt', 'stat', 'stop', 'string', 'system', 'tab',
            +            'table', 'tan', 'trap', 'trim', 'truncate', 'type', 'upto', 'utime', 'variable', 'where',
            +            'write', 'writes'
            +            ),
            +        5 => array(
            +            'Active', 'Alert', 'Bg', 'Clip', 'Clone', 'Color', 'ColorValue',
            +            'CopyArea', 'Couple', 'DrawArc', 'DrawCircle', 'DrawCurve', 'DrawCylinder', 'DrawDisk',
            +            'DrawImage', 'DrawLine', 'DrawPoint', 'DrawPolygon', 'DrawRectangle', 'DrawSegment',
            +            'DrawSphere', 'DrawString', 'DrawTorus', 'EraseArea', 'Event', 'Fg', 'FillArc',
            +            'FillCircle', 'FillPolygon', 'FillRectangle', 'Font', 'FreeColor', 'GotoRC', 'GotoXY',
            +            'IdentifyMatrix', 'Lower', 'MatrixMode', 'NewColor', 'PaletteChars', 'PaletteColor',
            +            'PaletteKey', 'Pattern', 'Pending', 'Pixel', 'PopMatrix', 'PushMatrix', 'PushRotate',
            +            'PushScale', 'PushTranslate', 'QueryPointer', 'Raise', 'ReadImage', 'Refresh', 'Rotate',
            +            'Scale', 'Texcoord', 'TextWidth', 'Texture', 'Translate', 'Uncouple', 'WAttrib',
            +            'WDefault', 'WFlush', 'WindowContents', 'WriteImage', 'WSync'
            +            ),
            +        6 => array(
            +            'define', 'include', 'ifdef', 'ifndef', 'else', 'endif', 'error',
            +            'line', 'undef'
            +            ),
            +        7 => array(
            +            '_V9', '_AMIGA', '_ACORN', '_CMS', '_MACINTOSH', '_MSDOS_386',
            +            '_MS_WINDOWS_NT', '_MSDOS', '_MVS', '_OS2', '_POR', 'T', '_UNIX', '_POSIX', '_DBM',
            +            '_VMS', '_ASCII', '_EBCDIC', '_CO_EXPRESSIONS', '_CONSOLE_WINDOW', '_DYNAMIC_LOADING',
            +            '_EVENT_MONITOR', '_EXTERNAL_FUNCTIONS', '_KEYBOARD_FUNCTIONS', '_LARGE_INTEGERS',
            +            '_MULTITASKING', '_PIPES', '_RECORD_IO', '_SYSTEM_FUNCTION', '_MESSAGING', '_GRAPHICS',
            +            '_X_WINDOW_SYSTEM', '_MS_WINDOWS', '_WIN32', '_PRESENTATION_MGR', '_ARM_FUNCTIONS',
            +            '_DOS_FUNCTIONS'
            +            ),
            +        8 => array(
            +            'line'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        1 => array(
            +            '(', ')', '{', '}', '[', ']', '+', '-', '*', '/', '\\', '%', '=', '<', '>', '!', '^',
            +            '&', '|', '?', ':', ';', ',', '.', '~', '@'
            +            ),
            +        2 => array(
            +            '$(', '$)', '$<', '$>', '$'
            +            )
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        5 => true,
            +        6 => true,
            +        7 => true,
            +        8 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;',
            +            2 => 'color: #b1b100;',
            +            3 => 'color: #b1b100;',
            +            4 => 'color: #b1b100;',
            +            5 => 'color: #b1b100;',
            +            6 => 'color: #b1b100;',
            +            7 => 'color: #b1b100;',
            +            8 => 'color: #b1b100;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; font-style: italic;',
            +            'MULTI' => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #0000ff;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;',
            +            ),
            +        'METHODS' => array(
            +            0 => 'color: #004000;'
            +            ),
            +        'SYMBOLS' => array(
            +            1 => 'color: #339933;',
            +            2 => 'color: #b1b100;'
            +            ),
            +        'REGEXPS' => array(),
            +        'SCRIPT' => array()
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => '',
            +        6 => '',
            +        7 => '',
            +        8 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(1 => '.'),
            +    'REGEXPS' => array(),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(),
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            3 => array(
            +                'DISALLOWED_BEFORE' => '(?<=&)'
            +                ),
            +            4 => array(
            +                'DISALLOWED_BEFORE' => "(? "(?![a-zA-Z0-9_\"\'])"
            +                ),
            +            6 => array(
            +                'DISALLOWED_BEFORE' => '(?<=\$)'
            +                ),
            +            8 => array(
            +                'DISALLOWED_BEFORE' => '(?<=#)'
            +                )
            +            )
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/idl.php b/vendor/easybook/geshi/geshi/idl.php
            new file mode 100644
            index 0000000000..a2b6f57e1c
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/idl.php
            @@ -0,0 +1,121 @@
            + 'Uno Idl',
            +    'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'published', 'get', 'set', 'service', 'singleton', 'type', 'module', 'interface', 'struct',
            +            'const', 'constants', 'exception', 'enum', 'raises', 'typedef'
            +            ),
            +        2 => array(
            +            'bound', 'maybeambiguous', 'maybedefault', 'maybevoid', 'oneway', 'optional',
            +            'readonly', 'in', 'out', 'inout', 'attribute', 'transient', 'removable'
            +            ),
            +        3 => array(
            +            'True', 'False', 'TRUE', 'FALSE'
            +            ),
            +        4 => array(
            +            'string', 'long', 'byte', 'hyper', 'boolean', 'any', 'char', 'double',
            +            'void', 'sequence', 'unsigned'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':', ';', '...'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #990078; font-weight: bold',
            +            2 => 'color: #36dd1c;',
            +            3 => 'color: #990078; font-weight: bold',
            +            4 => 'color: #0000ec;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #3f7f5f;',
            +            2 => 'color: #808080;',
            +            'MULTI' => 'color: #4080ff; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #666666; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #808080;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #0000dd;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '::'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/ini.php b/vendor/easybook/geshi/geshi/ini.php
            new file mode 100644
            index 0000000000..f0a8edeaa7
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/ini.php
            @@ -0,0 +1,127 @@
            + 'INI',
            +    'COMMENT_SINGLE' => array(),
            +    'COMMENT_MULTI' => array(),
            +    'COMMENT_REGEXP' => array(0 => '/^\s*;.*?$/m'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        ),
            +    'SYMBOLS' => array(
            +        '[', ']', '='
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            ),
            +        'COMMENTS' => array(
            +            0 => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => ''
            +            ),
            +        'BRACKETS' => array(
            +            0 => ''
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #933;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => ''
            +            ),
            +        'METHODS' => array(
            +            0 => ''
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #000066; font-weight:bold;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #000066; font-weight:bold;',
            +            1 => 'color: #000099;',
            +            2 => 'color: #660066;'
            +            ),
            +        'SCRIPT' => array(
            +            0 => ''
            +            )
            +        ),
            +    'URLS' => array(
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        //Section names
            +        0 => '\[.+\]',
            +        //Entry names
            +        1 => array(
            +            GESHI_SEARCH => '^(\s*)([a-zA-Z0-9_\-]+)(\s*=)',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => 'm',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => '\\3'
            +            ),
            +        //Entry values
            +        2 => array(
            +            // Evil hackery to get around GeSHi bug: <>" and ; are added so s can be matched
            +            // Explicit match on variable names because if a comment is before the first < of the span
            +            // gets chewed up...
            +            GESHI_SEARCH => '([<>";a-zA-Z0-9_]+\s*)=(.*)',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\\1=',
            +            GESHI_AFTER => ''
            +            )
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/inno.php b/vendor/easybook/geshi/geshi/inno.php
            new file mode 100644
            index 0000000000..192054cf1b
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/inno.php
            @@ -0,0 +1,210 @@
            + 'Inno',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array('(*' => '*)'),
            +    'CASE_KEYWORDS' => 0,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'Setup','Types','Components','Tasks','Dirs','Files','Icons','INI',
            +            'InstallDelete','Languages','Messages','CustomMessage',
            +            'LangOptions','Registry','RUN','UninstallDelete','UninstallRun',
            +            'app','win','sys','syswow64','src','sd','pf','pf32','pf64','cf',
            +            'cf32','cf64','tmp','fonts','dao','group','localappdata','sendto',
            +            'userappdata','commonappdata','userdesktop','commondesktop',
            +            'userdocs','commondocs','userfavorites','commonfavorites',
            +            'userprograms','commonprograms','userstartmenu','commonstartmenu',
            +            'userstartup','commonstartup','usertemplates','commontemplates'
            +            ),
            +        2 => array(
            +            'nil', 'false', 'true', 'var', 'type', 'const','And', 'Array', 'As', 'Begin', 'Case', 'Class', 'Constructor', 'Destructor', 'Div', 'Do', 'DownTo', 'Else',
            +            'End', 'Except', 'File', 'Finally', 'For', 'Function', 'Goto', 'If', 'Implementation', 'In', 'Inherited', 'Interface',
            +            'Is', 'Mod', 'Not', 'Object', 'Of', 'On', 'Or', 'Packed', 'Procedure', 'Property', 'Raise', 'Record',
            +            'Repeat', 'Set', 'Shl', 'Shr', 'Then', 'ThreadVar', 'To', 'Try', 'Unit', 'Until', 'Uses', 'While', 'With', 'Xor',
            +
            +            'HKCC','HKCR','HKCU','HKLM','HKU','alwaysoverwrite','alwaysskipifsameorolder','append',
            +            'binary','classic','closeonexit','comparetimestamp','confirmoverwrite',
            +            'createkeyifdoesntexist','createonlyiffileexists','createvalueifdoesntexist',
            +            'deleteafterinstall','deletekey','deletevalue','dirifempty','dontcloseonexit',
            +            'dontcopy','dontcreatekey','disablenouninstallwarning','dword','exclusive','expandsz',
            +            'external','files','filesandordirs','fixed','fontisnttruetype','ignoreversion','iscustom','isreadme',
            +            'modern','multisz','new','noerror','none','normal','nowait','onlyifdestfileexists',
            +            'onlyifdoesntexist','onlyifnewer','overwrite','overwritereadonly','postinstall',
            +            'preservestringtype','promptifolder','regserver','regtypelib','restart','restartreplace',
            +            'runhidden','runmaximized','runminimized','sharedfile','shellexec','showcheckbox',
            +            'skipifnotsilent','skipifsilent','silent','skipifdoesntexist',
            +            'skipifsourcedoesntexist','sortfilesbyextension','unchecked','uninsalwaysuninstall',
            +            'uninsclearvalue','uninsdeleteentry','uninsdeletekey','uninsdeletekeyifempty',
            +            'uninsdeletesection','uninsdeletesectionifempty','uninsdeletevalue',
            +            'uninsneveruninstall','useapppaths','verysilent','waituntilidle'
            +            ),
            +        3 => array(
            +            'Abs', 'Addr', 'AnsiCompareStr', 'AnsiCompareText', 'AnsiContainsStr', 'AnsiEndsStr', 'AnsiIndexStr', 'AnsiLeftStr',
            +            'AnsiLowerCase', 'AnsiMatchStr', 'AnsiMidStr', 'AnsiPos', 'AnsiReplaceStr', 'AnsiReverseString', 'AnsiRightStr',
            +            'AnsiStartsStr', 'AnsiUpperCase', 'ArcCos', 'ArcSin', 'ArcTan', 'Assigned', 'BeginThread', 'Bounds', 'CelsiusToFahrenheit',
            +            'ChangeFileExt', 'Chr', 'CompareStr', 'CompareText', 'Concat', 'Convert', 'Copy', 'Cos', 'CreateDir', 'CurrToStr',
            +            'CurrToStrF', 'Date', 'DateTimeToFileDate', 'DateTimeToStr', 'DateToStr', 'DayOfTheMonth', 'DayOfTheWeek', 'DayOfTheYear',
            +            'DayOfWeek', 'DaysBetween', 'DaysInAMonth', 'DaysInAYear', 'DaySpan', 'DegToRad', 'DeleteFile', 'DiskFree', 'DiskSize',
            +            'DupeString', 'EncodeDate', 'EncodeDateTime', 'EncodeTime', 'EndOfADay', 'EndOfAMonth', 'Eof', 'Eoln', 'Exp', 'ExtractFileDir',
            +            'ExtractFileDrive', 'ExtractFileExt', 'ExtractFileName', 'ExtractFilePath', 'FahrenheitToCelsius', 'FileAge',
            +            'FileDateToDateTime', 'FileExists', 'FilePos', 'FileSearch', 'FileSetDate', 'FileSize', 'FindClose', 'FindCmdLineSwitch',
            +            'FindFirst', 'FindNext', 'FloatToStr', 'FloatToStrF', 'Format', 'FormatCurr', 'FormatDateTime', 'FormatFloat', 'Frac',
            +            'GetCurrentDir', 'GetLastError', 'GetMem', 'High', 'IncDay', 'IncMinute', 'IncMonth', 'IncYear', 'InputBox',
            +            'InputQuery', 'Int', 'IntToHex', 'IntToStr', 'IOResult', 'IsInfinite', 'IsLeapYear', 'IsMultiThread', 'IsNaN',
            +            'LastDelimiter', 'Length', 'Ln', 'Lo', 'Log10', 'Low', 'LowerCase', 'Max', 'Mean', 'MessageDlg', 'MessageDlgPos',
            +            'MonthOfTheYear', 'Now', 'Odd', 'Ord', 'ParamCount', 'ParamStr', 'Pi', 'Point', 'PointsEqual', 'Pos', 'Pred',
            +            'Printer', 'PromptForFileName', 'PtInRect', 'RadToDeg', 'Random', 'RandomRange', 'RecodeDate', 'RecodeTime', 'Rect',
            +            'RemoveDir', 'RenameFile', 'Round', 'SeekEof', 'SeekEoln', 'SelectDirectory', 'SetCurrentDir', 'Sin', 'SizeOf',
            +            'Slice', 'Sqr', 'Sqrt', 'StringOfChar', 'StringReplace', 'StringToWideChar', 'StrToCurr', 'StrToDate', 'StrToDateTime',
            +            'StrToFloat', 'StrToInt', 'StrToInt64', 'StrToInt64Def', 'StrToIntDef', 'StrToTime', 'StuffString', 'Succ', 'Sum', 'Tan',
            +            'Time', 'TimeToStr', 'Tomorrow', 'Trunc', 'UpCase', 'UpperCase', 'VarType', 'WideCharToString', 'WrapText', 'Yesterday',
            +            'Append', 'AppendStr', 'Assign', 'AssignFile', 'AssignPrn', 'Beep', 'BlockRead', 'BlockWrite', 'Break',
            +            'ChDir', 'Close', 'CloseFile', 'Continue', 'DateTimeToString', 'Dec', 'DecodeDate', 'DecodeDateTime',
            +            'DecodeTime', 'Delete', 'Dispose', 'EndThread', 'Erase', 'Exclude', 'Exit', 'FillChar', 'Flush', 'FreeAndNil',
            +            'FreeMem', 'GetDir', 'GetLocaleFormatSettings', 'Halt', 'Inc', 'Include', 'Insert', 'MkDir', 'Move', 'New',
            +            'ProcessPath', 'Randomize', 'Read', 'ReadLn', 'ReallocMem', 'Rename', 'ReplaceDate', 'ReplaceTime',
            +            'Reset', 'ReWrite', 'RmDir', 'RunError', 'Seek', 'SetLength', 'SetString', 'ShowMessage', 'ShowMessageFmt',
            +            'ShowMessagePos', 'Str', 'Truncate', 'Val', 'Write', 'WriteLn',
            +
            +            'AdminPrivilegesRequired','AfterInstall','AllowCancelDuringInstall','AllowNoIcons','AllowRootDirectory','AllowUNCPath','AlwaysRestart','AlwaysShowComponentsList','AlwaysShowDirOnReadyPage','AlwaysShowGroupOnReadyPage ','AlwaysUsePersonalGroup','AppComments','AppContact','AppCopyright','AppendDefaultDirName',
            +            'AppendDefaultGroupName','AppId','AppModifyPath','AppMutex','AppName','AppPublisher',
            +            'AppPublisherURL','AppReadmeFile','AppSupportURL','AppUpdatesURL','AppVerName','AppVersion',
            +            'Attribs','BackColor','BackColor2','BackColorDirection','BackSolid','BeforeInstall',
            +            'ChangesAssociations','ChangesEnvironment','Check','CodeFile','Comment','Compression','CopyMode',
            +            'CreateAppDir','CreateUninstallRegKey','DefaultDirName','DefaultGroupName',
            +            'DefaultUserInfoName','DefaultUserInfoOrg','DefaultUserInfoSerial',
            +            'Description','DestDir','DestName','DirExistsWarning',
            +            'DisableDirPage','DisableFinishedPage',
            +            'DisableProgramGroupPage','DisableReadyMemo','DisableReadyPage',
            +            'DisableStartupPrompt','DiskClusterSize','DiskSliceSize','DiskSpaceMBLabel',
            +            'DiskSpanning','DontMergeDuplicateFiles','EnableDirDoesntExistWarning','Encryption',
            +            'Excludes','ExtraDiskSpaceRequired','Filename','Flags','FlatComponentsList','FontInstall',
            +            'GroupDescription','HotKey','IconFilename','IconIndex','InfoAfterFile','InfoBeforeFile',
            +            'InternalCompressLevel','Key','LanguageDetectionMethod',
            +            'LicenseFile','MergeDuplicateFiles','MessagesFile','MinVersion','Name',
            +            'OnlyBelowVersion','OutputBaseFilename','OutputManifestFile','OutputDir',
            +            'Parameters','Password','Permissions','PrivilegesRequired','ReserveBytes',
            +            'RestartIfNeededByRun','Root','RunOnceId','Section','SetupIconFile',
            +            'ShowComponentSizes','ShowLanguageDialog','ShowTasksTreeLines','SlicesPerDisk',
            +            'SolidCompression','Source','SourceDir','StatusMsg','Subkey',
            +            'TimeStampRounding','TimeStampsInUTC','TouchDate','TouchTime','Type',
            +            'UninstallDisplayIcon','UninstallDisplayName','UninstallFilesDir','UninstallIconFile',
            +            'UninstallLogMode','UninstallRestartComputer','UninstallStyle','Uninstallable',
            +            'UpdateUninstallLogAppName','UsePreviousAppDir','UsePreviousGroup',
            +            'UsePreviousTasks','UsePreviousSetupType','UsePreviousUserInfo',
            +            'UserInfoPage','UseSetupLdr','ValueData','ValueName','ValueType',
            +            'VersionInfoVersion','VersionInfoCompany','VersionInfoDescription','VersionInfoTextVersion',
            +            'WindowResizable','WindowShowCaption','WindowStartMaximized',
            +            'WindowVisible','WizardImageBackColor','WizardImageFile','WizardImageStretch','WizardSmallImageBackColor','WizardSmallImageFile','WizardStyle','WorkingDir'
            +            ),
            +        4 => array(
            +            'AnsiChar', 'AnsiString', 'Boolean', 'Byte', 'Cardinal', 'Char', 'Comp', 'Currency', 'Double', 'Extended',
            +            'Int64', 'Integer', 'LongInt', 'LongWord', 'PAnsiChar', 'PAnsiString', 'PChar', 'PCurrency', 'PDateTime',
            +            'PExtended', 'PInt64', 'Pointer', 'PShortString', 'PString', 'PVariant', 'PWideChar', 'PWideString',
            +            'Real', 'Real48', 'ShortInt', 'ShortString', 'Single', 'SmallInt', 'String', 'TBits', 'TConvType', 'TDateTime',
            +            'Text', 'TextFile', 'TFloatFormat', 'TFormatSettings', 'TList', 'TObject', 'TOpenDialog', 'TPoint',
            +            'TPrintDialog', 'TRect', 'TReplaceFlags', 'TSaveDialog', 'TSearchRec', 'TStringList', 'TSysCharSet',
            +            'TThreadFunc', 'Variant', 'WideChar', 'WideString', 'Word'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '[', ']', '{', '}', '@', '%', '&', '*', '|', '/', '<', '>'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000000; font-weight: bold;',/*bold Black*/
            +            2 => 'color: #000000;font-style: italic;',/*Black*/
            +            3 => 'color: #0000FF;',/*blue*/
            +            4 => 'color: #CC0000;'/*red*/
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #33FF00; font-style: italic;',
            +            'MULTI' => 'color: #33FF00; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #006600;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #000000; font-weight: bold;',
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/intercal.php b/vendor/easybook/geshi/geshi/intercal.php
            new file mode 100644
            index 0000000000..afbeb10dc9
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/intercal.php
            @@ -0,0 +1,121 @@
            + 'INTERCAL',
            +    'COMMENT_SINGLE' => array(),
            +    'COMMENT_MULTI' => array(),
            +    'COMMENT_REGEXP' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_UPPER,
            +    'QUOTEMARKS' => array(),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        //Politeness
            +        1 => array(
            +            'DO', 'DOES', 'DONT', 'DON\'T', 'NOT', 'PLEASE', 'PLEASENT', 'PLEASEN\'T', 'MAYBE'
            +            ),
            +        //Statements
            +        2 => array(
            +            'STASH', 'RETRIEVE', 'NEXT', 'RESUME', 'FORGET', 'ABSTAIN', 'ABSTAINING',
            +            'COME', 'FROM', 'CALCULATING', 'REINSTATE', 'IGNORE', 'REMEMBER',
            +            'WRITE', 'IN', 'READ', 'OUT', 'GIVE', 'UP'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '.', ',', ':', ';', '#',
            +        '~', '$', '&', '?',
            +        '\'', '"', '<-'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000080; font-weight: bold;',
            +            2 => 'color: #000080; font-weight: bold;'
            +            ),
            +        'COMMENTS' => array(
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            1 => 'color: #808080; font-style: italic;'
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        1 => '^\(\d+\)'
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4,
            +    'PARSER_CONTROL' => array(
            +        'ENABLE_FLAGS' => array(
            +            'COMMENTS' => GESHI_NEVER,
            +            'STRINGS' => GESHI_NEVER,
            +            'NUMBERS' => GESHI_NEVER
            +            )
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/io.php b/vendor/easybook/geshi/geshi/io.php
            new file mode 100644
            index 0000000000..d23984e8f5
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/io.php
            @@ -0,0 +1,136 @@
            + 'Io',
            +    'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'and', 'break', 'else', 'elseif', 'exit', 'for', 'foreach', 'if', 'ifFalse', 'ifNil',
            +            'ifTrue', 'or', 'pass', 'raise', 'return', 'then', 'try', 'wait', 'while', 'yield'
            +            ),
            +        2 => array(
            +            'activate', 'activeCoroCount', 'asString', 'block', 'catch', 'clone', 'collectGarbage',
            +            'compileString', 'continue', 'do', 'doFile', 'doMessage', 'doString', 'forward',
            +            'getSlot', 'getenv', 'hasSlot', 'isActive', 'isNil', 'isResumable', 'list', 'message',
            +            'method', 'parent', 'pause', 'perform', 'performWithArgList', 'print', 'proto',
            +            'raiseResumable', 'removeSlot', 'resend', 'resume', 'schedulerSleepSeconds', 'self',
            +            'sender', 'setSchedulerSleepSeconds', 'setSlot', 'shallowCopy', 'slotNames', 'super',
            +            'system', 'thisBlock', 'thisContext', 'thisMessage', 'type', 'uniqueId', 'updateSlot',
            +            'write'
            +            ),
            +        3 => array(
            +            'Array', 'AudioDevice', 'AudioMixer', 'Block', 'Box', 'Buffer', 'CFunction', 'CGI',
            +            'Color', 'Curses', 'DBM', 'DNSResolver', 'DOConnection', 'DOProxy', 'DOServer',
            +            'Date', 'Directory', 'Duration', 'DynLib', 'Error', 'Exception', 'FFT', 'File',
            +            'Fnmatch', 'Font', 'Future', 'GL', 'GLE', 'GLScissor', 'GLU', 'GLUCylinder',
            +            'GLUQuadric', 'GLUSphere', 'GLUT', 'Host', 'Image', 'Importer', 'LinkList', 'List',
            +            'Lobby', 'Locals', 'MD5', 'MP3Decoder', 'MP3Encoder', 'Map', 'Message', 'Movie',
            +            'NULL', 'Nil', 'Nop', 'Notifiction', 'Number', 'Object', 'OpenGL', 'Point', 'Protos',
            +            'Regex', 'SGMLTag', 'SQLite', 'Server', 'ShowMessage', 'SleepyCat', 'SleepyCatCursor',
            +            'Socket', 'SocketManager', 'Sound', 'Soup', 'Store', 'String', 'Tree', 'UDPSender',
            +            'UDPReceiver', 'URL', 'User', 'Warning', 'WeakLink'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '[', ']', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;',
            +            2 => 'color: #000000; font-weight: bold;',
            +            3 => 'color: #000066;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;',
            +            2 => 'color: #808080; font-style: italic;',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #006600;',
            +            2 => 'color: #006600;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            0 => ''
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/ispfpanel.php b/vendor/easybook/geshi/geshi/ispfpanel.php
            new file mode 100644
            index 0000000000..c028978501
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/ispfpanel.php
            @@ -0,0 +1,165 @@
            + 'ISPF Panel',
            +    'COMMENT_SINGLE' => array(),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_UPPER,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        // Panel Definition Statements
            +        1 => array(
            +            ')CCSID',')PANEL',')ATTR',')ABC',')ABCINIT',')ABCPROC',')BODY',')MODEL',
            +            ')AREA',')INIT',')REINIT',')PROC',')FIELD',')HELP',')LIST',')PNTS',')END'
            +            ),
            +        // File-Tailoring Skeletons
            +        2 => array (
            +            ')DEFAULT',')BLANK', ')CM', ')DO', ')DOT', ')ELSE', ')ENDSEL',
            +            ')ENDDO', ')ENDDOT', ')IF', ')IM', ')ITERATE', ')LEAVE', ')NOP', ')SEL',
            +            ')SET', ')TB', ')TBA'
            +            ),
            +        // Control Variables
            +        3 => array (
            +            '.ALARM','.ATTR','.ATTRCHAR','.AUTOSEL','.CSRPOS','.CSRROW','.CURSOR','.HELP',
            +            '.HHELP','.KANA','.MSG','.NRET','.PFKEY','.RESP','.TRAIL','.ZVARS'
            +            ),
            +        // Keywords
            +        4 => array (
            +            'WINDOW','ALARM','ATTN','BARRIER','HILITE','CAPS',
            +            'CKBOX','CLEAR','CMD','COLOR','COMBO','CSRGRP','CUADYN',
            +            'SKIP','INTENS','AREA','EXTEND',
            +            'DESC','ASIS','VGET','VPUT','JUST','BATSCRD','BATSCRW',
            +            'BDBCS','BDISPMAX','BIT','BKGRND','BREDIMAX','PAD','PADC',
            +            'PAS','CHINESES','CHINESET','DANISH','DATAMOD','DDLIST',
            +            'DEPTH','DUMP','ENGLISH','ERROR','EXIT','EXPAND','FIELD',
            +            'FORMAT','FRENCH','GE','GERMAN','IMAGE','IND','TYPE',
            +            'ITALIAN','JAPANESE','KOREAN','LCOL','LEN','LIND','LISTBOX',
            +            'MODE','NEST','NOJUMP','NOKANA','NUMERIC','OUTLINE','PARM',
            +            'PGM','PORTUGESE','RADIO','RCOL','REP','RIND','ROWS',
            +            'SCALE','SCROLL','SFIHDR','SGERMAN','SIND','SPANISH',
            +            'UPPERENG','WIDTH'
            +            ),
            +        // Parameters
            +        5 => array (
            +            'ADDPOP','ALPHA','ALPHAB','DYNAMIC','SCRL',
            +            'CCSID','COMMAND','DSNAME','DSNAMEF','DSNAMEFM',
            +            'DSNAMEPQ','DSNAMEQ','EBCDIC','ENBLDUMP','ENUM',// 'EXTEND',
            +            'FI','FILEID','FRAME','GUI','GUISCRD','GUISCRW','HEX',
            +            'HIGH','IDATE','IN','INCLUDE','INPUT','ITIME','JDATE',
            +            'JSTD','KEYLIST','LANG','LEFT','LIST','LISTV','LISTVX',
            +            'LISTX','LMSG','LOGO','LOW','MIX','NAME','NAMEF','NB',
            +            'NEWAPPL','NEWPOOL','NOCHECK','NOLOGO','NON','NONBLANK',
            +            'NULLS','NUM','OFF','ON','OPT','OUT','OUTPUT','PANEL',
            +            /* 'PGM',*/'PICT','PICTN','POSITION','TBDISPL','PROFILE',
            +            'QUERY','RANGE','REVERSE','RIGHT','SHARED','SMSG',
            +            'STDDATE','STDTIME','TERMSTAT','TERMTRAC','TEST',
            +            'TESTX','TEXT','TRACE','TRACEX','USCORE','USER',
            +            'USERMOD','WSCMD','WSCMDV'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '(',')','=','&',',','*','#','+','&','%','_','-','@','!'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        5 => false
            +        ),
            +    'STYLES' => array(
            +        'BKGROUND' => 'background-color: #000000; color: #00FFFF;',
            +        'KEYWORDS' => array(
            +            1 => 'color: #FF0000;',
            +            2 => 'color: #21A502;',
            +            3 => 'color: #FF00FF;',
            +            4 => 'color: #876C00;',
            +            5 => 'color: #00FF00;'
            +            ),
            +        'COMMENTS' => array(
            +            0 => 'color: #002EB8; font-style: italic;',
            +            //1 => 'color: #002EB8; font-style: italic;',
            +            //2 => 'color: #002EB8; font-style: italic;',
            +            'MULTI' => 'color: #002EB8; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => ''
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #FF7400;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #700000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #FF6633;'
            +            ),
            +        'METHODS' => array(
            +            1 => '',
            +            2 => ''
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #FF7400;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #6B1F6B;'
            +            ),
            +        'SCRIPT' => array(
            +            0 => ''
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(),
            +    'REGEXPS' => array(
            +        // Variables Defined in the Panel
            +        0 => '&[a-zA-Z]{1,8}[0-9]{0,}',
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array()
            +);
            diff --git a/vendor/easybook/geshi/geshi/j.php b/vendor/easybook/geshi/geshi/j.php
            new file mode 100644
            index 0000000000..fe8cb11a63
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/j.php
            @@ -0,0 +1,188 @@
            + 'J',
            +    'COMMENT_SINGLE' => array(),
            +    'COMMENT_MULTI' => array(),
            +    'COMMENT_REGEXP' => array(
            +        1 => '/(? '/(?<=\bNote\b).*?$\s+\)(?:(?!\n)\s)*$/sm',   //multiline comments in Note
            +        3 => "/'[^']*?$/m"                        //incomplete strings/open quotes
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array(),
            +    'ESCAPE_CHAR' => '',
            +    'HARDQUOTE' => array("'", "'"),
            +    'HARDESCAPE' => array("'"),
            +    'HARDCHAR' => "'",
            +    'NUMBERS' => array(
            +        0 => '\b(?:_?\d+(?:\.\d+)?(?:x|[bejprx]_?[\da-z]+(?:\.[\da-z]+)?)?|__?)(?![\w\.\:])',
            +        ),
            +    'KEYWORDS' => array(
            +        //Control words
            +        1 => array(
            +            'assert.', 'break.', 'case.', 'catch.', 'catcht.', 'continue.', 'do.',
            +            'else.', 'elseif.', 'end.', 'fcase.', 'for.', 'goto.', 'if.', 'label.',
            +            'return.', 'select.', 'throw.', 'trap.', 'try.', 'while.', 'whilst.'
            +            ),
            +        //Arguments
            +        2 => array(
            +            'm', 'n', 'u', 'v', 'x', 'y'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        //Punctuation
            +        0 => array(
            +            '(', ')'
            +            )
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        //6 => true,
            +        //7 => true,
            +        //8 => true,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0000ff; font-weight: bold;',
            +            2 => 'color: #0000cc; font-weight: bold;',
            +            //6 => 'color: #000000; font-weight: bold;',
            +            //7 => 'color: #000000; font-weight: bold;',
            +            //8 => 'color: #000000; font-weight: bold;',
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; font-style: italic;',
            +            2 => 'color: #666666; font-style: italic; font-weight: bold;',
            +            3 => 'color: #ff00ff; ',                      //open quote
            +            'MULTI' => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            'HARD' => 'font-weight: bold;',
            +            0 => '',
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            'HARD' => 'color: #ff0000;',
            +            0 => 'color: #ff0000;',
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #009999; font-weight: bold;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #009900; font-weight: bold;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #0000ff; font-weight: bold;',   //for_xyz. - same as kw1
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '', //'http://www.jsoftware.com/help/dictionary/ctrl.htm',
            +        2 => '',
            +        //6 => '', //'http://www.jsoftware.com/jwiki/Vocabulary',
            +        //7 => '', //'http://www.jsoftware.com/jwiki/Vocabulary',
            +        //8 => '', //'http://www.jsoftware.com/jwiki/Vocabulary',
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        0 => '\b(for|goto|label)_[a-zA-Z]\w*\.',   //for_xyz. - should be kw1
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'PARSER_CONTROL' => array(
            +        'ENABLE_FLAGS' => array(
            +            'BRACKETS' => GESHI_NEVER,
            +            ),
            +        'NUMBERS' => array(
            +            'PRECHECK_RX' => '#[\d_]#',            // underscore is valid number
            +            ),
            +        'KEYWORDS' => array(
            +            //Control words
            +            2 => array(
            +                'DISALLOWED_BEFORE' => '(? '(?![\w\.\:])',
            +                ),
            +            //Primtives starting with a symbol (except . or :)
            +            6 => array(
            +                'DISALLOWED_BEFORE' => '(?!K)',    // effect should be to allow anything
            +                'DISALLOWED_AFTER' => '(?=.*)',
            +                ),
            +            //Primtives starting with a letter
            +            7 => array(
            +                'DISALLOWED_BEFORE' => '(? '(?=.*)',
            +                ),
            +            //Primtives starting with symbol . or :
            +            8 => array(
            +                'DISALLOWED_BEFORE' => '(?<=\s)',
            +                'DISALLOWED_AFTER' => '(?=.*)',
            +                ),
            +            )
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/java.php b/vendor/easybook/geshi/geshi/java.php
            new file mode 100644
            index 0000000000..f384c4d841
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/java.php
            @@ -0,0 +1,981 @@
            + 'Java',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(
            +        //Import and Package directives (Basic Support only)
            +        2 => '/(?:(?<=import[\\n\\s])|(?<=package[\\n\\s]))[\\n\\s]*([a-zA-Z0-9_]+\\.)*([a-zA-Z0-9_]+|\*)(?=[\n\s;])/i',
            +        // javadoc comments
            +        3 => '#/\*\*(?![\*\/]).*\*/#sU'
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'for', 'foreach', 'if', 'else', 'while', 'do',
            +            'switch', 'case',  'return', 'public',
            +            'private', 'protected', 'extends', 'break', 'class',
            +            'new', 'try', 'catch', 'throws', 'finally', 'implements',
            +            'interface', 'throw', 'final', 'native', 'synchronized', 'this',
            +            'abstract', 'transient', 'instanceof', 'assert', 'continue',
            +            'default', 'enum', 'package', 'static', 'strictfp', 'super',
            +            'volatile', 'const', 'goto', 'import'
            +            ),
            +        2 => array(
            +            'null', 'false', 'true'
            +            ),
            +        3 => array(
            +            'AbstractAction', 'AbstractBorder', 'AbstractButton',
            +            'AbstractCellEditor', 'AbstractCollection',
            +            'AbstractColorChooserPanel', 'AbstractDocument',
            +            'AbstractDocument.AttributeContext',
            +            'AbstractDocument.Content',
            +            'AbstractDocument.ElementEdit',
            +            'AbstractLayoutCache',
            +            'AbstractLayoutCache.NodeDimensions', 'AbstractList',
            +            'AbstractListModel', 'AbstractMap',
            +            'AbstractMethodError', 'AbstractSequentialList',
            +            'AbstractSet', 'AbstractTableModel',
            +            'AbstractUndoableEdit', 'AbstractWriter',
            +            'AccessControlContext', 'AccessControlException',
            +            'AccessController', 'AccessException', 'Accessible',
            +            'AccessibleAction', 'AccessibleBundle',
            +            'AccessibleComponent', 'AccessibleContext',
            +            'AccessibleHyperlink', 'AccessibleHypertext',
            +            'AccessibleIcon', 'AccessibleObject',
            +            'AccessibleRelation', 'AccessibleRelationSet',
            +            'AccessibleResourceBundle', 'AccessibleRole',
            +            'AccessibleSelection', 'AccessibleState',
            +            'AccessibleStateSet', 'AccessibleTable',
            +            'AccessibleTableModelChange', 'AccessibleText',
            +            'AccessibleValue', 'Acl', 'AclEntry',
            +            'AclNotFoundException', 'Action', 'ActionEvent',
            +            'ActionListener', 'ActionMap', 'ActionMapUIResource',
            +            'Activatable', 'ActivateFailedException',
            +            'ActivationDesc', 'ActivationException',
            +            'ActivationGroup', 'ActivationGroupDesc',
            +            'ActivationGroupDesc.CommandEnvironment',
            +            'ActivationGroupID', 'ActivationID',
            +            'ActivationInstantiator', 'ActivationMonitor',
            +            'ActivationSystem', 'Activator', 'ActiveEvent',
            +            'Adjustable', 'AdjustmentEvent',
            +            'AdjustmentListener', 'Adler32', 'AffineTransform',
            +            'AffineTransformOp', 'AlgorithmParameterGenerator',
            +            'AlgorithmParameterGeneratorSpi',
            +            'AlgorithmParameters', 'AlgorithmParameterSpec',
            +            'AlgorithmParametersSpi', 'AllPermission',
            +            'AlphaComposite', 'AlreadyBound',
            +            'AlreadyBoundException', 'AlreadyBoundHelper',
            +            'AlreadyBoundHolder', 'AncestorEvent',
            +            'AncestorListener', 'Annotation', 'Any', 'AnyHolder',
            +            'AnySeqHelper', 'AnySeqHolder', 'Applet',
            +            'AppletContext', 'AppletInitializer', 'AppletStub',
            +            'ApplicationException', 'Arc2D', 'Arc2D.Double',
            +            'Arc2D.Float', 'Area', 'AreaAveragingScaleFilter',
            +            'ARG_IN', 'ARG_INOUT', 'ARG_OUT',
            +            'ArithmeticException', 'Array',
            +            'ArrayIndexOutOfBoundsException', 'ArrayList',
            +            'Arrays', 'ArrayStoreException', 'AsyncBoxView',
            +            'Attribute', 'AttributedCharacterIterator',
            +            'AttributedCharacterIterator.Attribute',
            +            'AttributedString', 'AttributeInUseException',
            +            'AttributeList', 'AttributeModificationException',
            +            'Attributes', 'Attributes.Name', 'AttributeSet',
            +            'AttributeSet.CharacterAttribute',
            +            'AttributeSet.ColorAttribute',
            +            'AttributeSet.FontAttribute',
            +            'AttributeSet.ParagraphAttribute', 'AudioClip',
            +            'AudioFileFormat', 'AudioFileFormat.Type',
            +            'AudioFileReader', 'AudioFileWriter', 'AudioFormat',
            +            'AudioFormat.Encoding', 'AudioInputStream',
            +            'AudioPermission', 'AudioSystem',
            +            'AuthenticationException',
            +            'AuthenticationNotSupportedException',
            +            'Authenticator', 'Autoscroll', 'AWTError',
            +            'AWTEvent', 'AWTEventListener',
            +            'AWTEventMulticaster', 'AWTException',
            +            'AWTPermission', 'BadKind', 'BadLocationException',
            +            'BAD_CONTEXT', 'BAD_INV_ORDER', 'BAD_OPERATION',
            +            'BAD_PARAM', 'BAD_POLICY', 'BAD_POLICY_TYPE',
            +            'BAD_POLICY_VALUE', 'BAD_TYPECODE', 'BandCombineOp',
            +            'BandedSampleModel', 'BasicArrowButton',
            +            'BasicAttribute', 'BasicAttributes', 'BasicBorders',
            +            'BasicBorders.ButtonBorder',
            +            'BasicBorders.FieldBorder',
            +            'BasicBorders.MarginBorder',
            +            'BasicBorders.MenuBarBorder',
            +            'BasicBorders.RadioButtonBorder',
            +            'BasicBorders.SplitPaneBorder',
            +            'BasicBorders.ToggleButtonBorder',
            +            'BasicButtonListener', 'BasicButtonUI',
            +            'BasicCheckBoxMenuItemUI', 'BasicCheckBoxUI',
            +            'BasicColorChooserUI', 'BasicComboBoxEditor',
            +            'BasicComboBoxEditor.UIResource',
            +            'BasicComboBoxRenderer',
            +            'BasicComboBoxRenderer.UIResource',
            +            'BasicComboBoxUI', 'BasicComboPopup',
            +            'BasicDesktopIconUI', 'BasicDesktopPaneUI',
            +            'BasicDirectoryModel', 'BasicEditorPaneUI',
            +            'BasicFileChooserUI', 'BasicGraphicsUtils',
            +            'BasicHTML', 'BasicIconFactory',
            +            'BasicInternalFrameTitlePane',
            +            'BasicInternalFrameUI', 'BasicLabelUI',
            +            'BasicListUI', 'BasicLookAndFeel', 'BasicMenuBarUI',
            +            'BasicMenuItemUI', 'BasicMenuUI',
            +            'BasicOptionPaneUI',
            +            'BasicOptionPaneUI.ButtonAreaLayout', 'BasicPanelUI',
            +            'BasicPasswordFieldUI', 'BasicPermission',
            +            'BasicPopupMenuSeparatorUI', 'BasicPopupMenuUI',
            +            'BasicProgressBarUI', 'BasicRadioButtonMenuItemUI',
            +            'BasicRadioButtonUI', 'BasicRootPaneUI',
            +            'BasicScrollBarUI', 'BasicScrollPaneUI',
            +            'BasicSeparatorUI', 'BasicSliderUI',
            +            'BasicSplitPaneDivider', 'BasicSplitPaneUI',
            +            'BasicStroke', 'BasicTabbedPaneUI',
            +            'BasicTableHeaderUI', 'BasicTableUI',
            +            'BasicTextAreaUI', 'BasicTextFieldUI',
            +            'BasicTextPaneUI', 'BasicTextUI',
            +            'BasicTextUI.BasicCaret',
            +            'BasicTextUI.BasicHighlighter',
            +            'BasicToggleButtonUI', 'BasicToolBarSeparatorUI',
            +            'BasicToolBarUI', 'BasicToolTipUI', 'BasicTreeUI',
            +            'BasicViewportUI', 'BatchUpdateException',
            +            'BeanContext', 'BeanContextChild',
            +            'BeanContextChildComponentProxy',
            +            'BeanContextChildSupport',
            +            'BeanContextContainerProxy', 'BeanContextEvent',
            +            'BeanContextMembershipEvent',
            +            'BeanContextMembershipListener', 'BeanContextProxy',
            +            'BeanContextServiceAvailableEvent',
            +            'BeanContextServiceProvider',
            +            'BeanContextServiceProviderBeanInfo',
            +            'BeanContextServiceRevokedEvent',
            +            'BeanContextServiceRevokedListener',
            +            'BeanContextServices', 'BeanContextServicesListener',
            +            'BeanContextServicesSupport',
            +            'BeanContextServicesSupport.BCSSServiceProvider',
            +            'BeanContextSupport',
            +            'BeanContextSupport.BCSIterator', 'BeanDescriptor',
            +            'BeanInfo', 'Beans', 'BevelBorder', 'BigDecimal',
            +            'BigInteger', 'BinaryRefAddr', 'BindException',
            +            'Binding', 'BindingHelper', 'BindingHolder',
            +            'BindingIterator', 'BindingIteratorHelper',
            +            'BindingIteratorHolder', 'BindingIteratorOperations',
            +            'BindingListHelper', 'BindingListHolder',
            +            'BindingType', 'BindingTypeHelper',
            +            'BindingTypeHolder', 'BitSet', 'Blob', 'BlockView',
            +            'Book', 'Boolean', 'BooleanControl',
            +            'BooleanControl.Type', 'BooleanHolder',
            +            'BooleanSeqHelper', 'BooleanSeqHolder', 'Border',
            +            'BorderFactory', 'BorderLayout', 'BorderUIResource',
            +            'BorderUIResource.BevelBorderUIResource',
            +            'BorderUIResource.CompoundBorderUIResource',
            +            'BorderUIResource.EmptyBorderUIResource',
            +            'BorderUIResource.EtchedBorderUIResource',
            +            'BorderUIResource.LineBorderUIResource',
            +            'BorderUIResource.MatteBorderUIResource',
            +            'BorderUIResource.TitledBorderUIResource',
            +            'BoundedRangeModel', 'Bounds', 'Box', 'Box.Filler',
            +            'BoxedValueHelper', 'BoxLayout', 'BoxView',
            +            'BreakIterator', 'BufferedImage',
            +            'BufferedImageFilter', 'BufferedImageOp',
            +            'BufferedInputStream', 'BufferedOutputStream',
            +            'BufferedReader', 'BufferedWriter', 'Button',
            +            'ButtonGroup', 'ButtonModel', 'ButtonUI', 'Byte',
            +            'ByteArrayInputStream', 'ByteArrayOutputStream',
            +            'ByteHolder', 'ByteLookupTable', 'Calendar',
            +            'CallableStatement', 'CannotProceed',
            +            'CannotProceedException', 'CannotProceedHelper',
            +            'CannotProceedHolder', 'CannotRedoException',
            +            'CannotUndoException', 'Canvas', 'CardLayout',
            +            'Caret', 'CaretEvent', 'CaretListener', 'CellEditor',
            +            'CellEditorListener', 'CellRendererPane',
            +            'Certificate', 'Certificate.CertificateRep',
            +            'CertificateEncodingException',
            +            'CertificateException',
            +            'CertificateExpiredException', 'CertificateFactory',
            +            'CertificateFactorySpi',
            +            'CertificateNotYetValidException',
            +            'CertificateParsingException',
            +            'ChangedCharSetException', 'ChangeEvent',
            +            'ChangeListener', 'Character', 'Character.Subset',
            +            'Character.UnicodeBlock', 'CharacterIterator',
            +            'CharArrayReader', 'CharArrayWriter',
            +            'CharConversionException', 'CharHolder',
            +            'CharSeqHelper', 'CharSeqHolder', 'Checkbox',
            +            'CheckboxGroup', 'CheckboxMenuItem',
            +            'CheckedInputStream', 'CheckedOutputStream',
            +            'Checksum', 'Choice', 'ChoiceFormat', 'Class',
            +            'ClassCastException', 'ClassCircularityError',
            +            'ClassDesc', 'ClassFormatError', 'ClassLoader',
            +            'ClassNotFoundException', 'Clip', 'Clipboard',
            +            'ClipboardOwner', 'Clob', 'Cloneable',
            +            'CloneNotSupportedException', 'CMMException',
            +            'CodeSource', 'CollationElementIterator',
            +            'CollationKey', 'Collator', 'Collection',
            +            'Collections', 'Color',
            +            'ColorChooserComponentFactory', 'ColorChooserUI',
            +            'ColorConvertOp', 'ColorModel',
            +            'ColorSelectionModel', 'ColorSpace',
            +            'ColorUIResource', 'ComboBoxEditor', 'ComboBoxModel',
            +            'ComboBoxUI', 'ComboPopup', 'CommunicationException',
            +            'COMM_FAILURE', 'Comparable', 'Comparator',
            +            'Compiler', 'CompletionStatus',
            +            'CompletionStatusHelper', 'Component',
            +            'ComponentAdapter', 'ComponentColorModel',
            +            'ComponentEvent', 'ComponentInputMap',
            +            'ComponentInputMapUIResource', 'ComponentListener',
            +            'ComponentOrientation', 'ComponentSampleModel',
            +            'ComponentUI', 'ComponentView', 'Composite',
            +            'CompositeContext', 'CompositeName', 'CompositeView',
            +            'CompoundBorder', 'CompoundControl',
            +            'CompoundControl.Type', 'CompoundEdit',
            +            'CompoundName', 'ConcurrentModificationException',
            +            'ConfigurationException', 'ConnectException',
            +            'ConnectIOException', 'Connection', 'Constructor', 'Container',
            +            'ContainerAdapter', 'ContainerEvent',
            +            'ContainerListener', 'ContentHandler',
            +            'ContentHandlerFactory', 'ContentModel', 'Context',
            +            'ContextList', 'ContextNotEmptyException',
            +            'ContextualRenderedImageFactory', 'Control',
            +            'Control.Type', 'ControlFactory',
            +            'ControllerEventListener', 'ConvolveOp', 'CRC32',
            +            'CRL', 'CRLException', 'CropImageFilter', 'CSS',
            +            'CSS.Attribute', 'CTX_RESTRICT_SCOPE',
            +            'CubicCurve2D', 'CubicCurve2D.Double',
            +            'CubicCurve2D.Float', 'Current', 'CurrentHelper',
            +            'CurrentHolder', 'CurrentOperations', 'Cursor',
            +            'Customizer', 'CustomMarshal', 'CustomValue',
            +            'DatabaseMetaData', 'DataBuffer', 'DataBufferByte',
            +            'DataBufferInt', 'DataBufferShort',
            +            'DataBufferUShort', 'DataFlavor',
            +            'DataFormatException', 'DatagramPacket',
            +            'DatagramSocket', 'DatagramSocketImpl',
            +            'DatagramSocketImplFactory', 'DataInput',
            +            'DataInputStream', 'DataLine', 'DataLine.Info',
            +            'DataOutput', 'DataOutputStream',
            +            'DataTruncation', 'DATA_CONVERSION', 'Date',
            +            'DateFormat', 'DateFormatSymbols', 'DebugGraphics',
            +            'DecimalFormat', 'DecimalFormatSymbols',
            +            'DefaultBoundedRangeModel', 'DefaultButtonModel',
            +            'DefaultCaret', 'DefaultCellEditor',
            +            'DefaultColorSelectionModel', 'DefaultComboBoxModel',
            +            'DefaultDesktopManager', 'DefaultEditorKit',
            +            'DefaultEditorKit.BeepAction',
            +            'DefaultEditorKit.CopyAction',
            +            'DefaultEditorKit.CutAction',
            +            'DefaultEditorKit.DefaultKeyTypedAction',
            +            'DefaultEditorKit.InsertBreakAction',
            +            'DefaultEditorKit.InsertContentAction',
            +            'DefaultEditorKit.InsertTabAction',
            +            'DefaultEditorKit.PasteAction,',
            +            'DefaultFocusManager', 'DefaultHighlighter',
            +            'DefaultHighlighter.DefaultHighlightPainter',
            +            'DefaultListCellRenderer',
            +            'DefaultListCellRenderer.UIResource',
            +            'DefaultListModel', 'DefaultListSelectionModel',
            +            'DefaultMenuLayout', 'DefaultMetalTheme',
            +            'DefaultMutableTreeNode',
            +            'DefaultSingleSelectionModel',
            +            'DefaultStyledDocument',
            +            'DefaultStyledDocument.AttributeUndoableEdit',
            +            'DefaultStyledDocument.ElementSpec',
            +            'DefaultTableCellRenderer',
            +            'DefaultTableCellRenderer.UIResource',
            +            'DefaultTableColumnModel', 'DefaultTableModel',
            +            'DefaultTextUI', 'DefaultTreeCellEditor',
            +            'DefaultTreeCellRenderer', 'DefaultTreeModel',
            +            'DefaultTreeSelectionModel', 'DefinitionKind',
            +            'DefinitionKindHelper', 'Deflater',
            +            'DeflaterOutputStream', 'Delegate', 'DesignMode',
            +            'DesktopIconUI', 'DesktopManager', 'DesktopPaneUI',
            +            'DGC', 'Dialog', 'Dictionary', 'DigestException',
            +            'DigestInputStream', 'DigestOutputStream',
            +            'Dimension', 'Dimension2D', 'DimensionUIResource',
            +            'DirContext', 'DirectColorModel', 'DirectoryManager',
            +            'DirObjectFactory', 'DirStateFactory',
            +            'DirStateFactory.Result', 'DnDConstants', 'Document',
            +            'DocumentEvent', 'DocumentEvent.ElementChange',
            +            'DocumentEvent.EventType', 'DocumentListener',
            +            'DocumentParser', 'DomainCombiner', 'DomainManager',
            +            'DomainManagerOperations', 'Double', 'DoubleHolder',
            +            'DoubleSeqHelper', 'DoubleSeqHolder',
            +            'DragGestureEvent', 'DragGestureListener',
            +            'DragGestureRecognizer', 'DragSource',
            +            'DragSourceContext', 'DragSourceDragEvent',
            +            'DragSourceDropEvent', 'DragSourceEvent',
            +            'DragSourceListener', 'Driver', 'DriverManager',
            +            'DriverPropertyInfo', 'DropTarget',
            +            'DropTarget.DropTargetAutoScroller',
            +            'DropTargetContext', 'DropTargetDragEvent',
            +            'DropTargetDropEvent', 'DropTargetEvent',
            +            'DropTargetListener', 'DSAKey',
            +            'DSAKeyPairGenerator', 'DSAParameterSpec',
            +            'DSAParams', 'DSAPrivateKey', 'DSAPrivateKeySpec',
            +            'DSAPublicKey', 'DSAPublicKeySpec', 'DTD',
            +            'DTDConstants', 'DynamicImplementation', 'DynAny',
            +            'DynArray', 'DynEnum', 'DynFixed', 'DynSequence',
            +            'DynStruct', 'DynUnion', 'DynValue', 'EditorKit',
            +            'Element', 'ElementIterator', 'Ellipse2D',
            +            'Ellipse2D.Double', 'Ellipse2D.Float', 'EmptyBorder',
            +            'EmptyStackException', 'EncodedKeySpec', 'Entity',
            +            'EnumControl', 'EnumControl.Type', 'Enumeration',
            +            'Environment', 'EOFException', 'Error',
            +            'EtchedBorder', 'Event', 'EventContext',
            +            'EventDirContext', 'EventListener',
            +            'EventListenerList', 'EventObject', 'EventQueue',
            +            'EventSetDescriptor', 'Exception',
            +            'ExceptionInInitializerError', 'ExceptionList',
            +            'ExpandVetoException', 'ExportException',
            +            'ExtendedRequest', 'ExtendedResponse',
            +            'Externalizable', 'FeatureDescriptor', 'Field',
            +            'FieldNameHelper', 'FieldPosition', 'FieldView',
            +            'File', 'FileChooserUI', 'FileDescriptor',
            +            'FileDialog', 'FileFilter',
            +            'FileInputStream', 'FilenameFilter', 'FileNameMap',
            +            'FileNotFoundException', 'FileOutputStream',
            +            'FilePermission', 'FileReader', 'FileSystemView',
            +            'FileView', 'FileWriter', 'FilteredImageSource',
            +            'FilterInputStream', 'FilterOutputStream',
            +            'FilterReader', 'FilterWriter',
            +            'FixedHeightLayoutCache', 'FixedHolder',
            +            'FlatteningPathIterator', 'FlavorMap', 'Float',
            +            'FloatControl', 'FloatControl.Type', 'FloatHolder',
            +            'FloatSeqHelper', 'FloatSeqHolder', 'FlowLayout',
            +            'FlowView', 'FlowView.FlowStrategy', 'FocusAdapter',
            +            'FocusEvent', 'FocusListener', 'FocusManager',
            +            'Font', 'FontFormatException', 'FontMetrics',
            +            'FontRenderContext', 'FontUIResource', 'Format',
            +            'FormatConversionProvider', 'FormView', 'Frame',
            +            'FREE_MEM', 'GapContent', 'GeneralPath',
            +            'GeneralSecurityException', 'GlyphJustificationInfo',
            +            'GlyphMetrics', 'GlyphVector', 'GlyphView',
            +            'GlyphView.GlyphPainter', 'GradientPaint',
            +            'GraphicAttribute', 'Graphics', 'Graphics2D',
            +            'GraphicsConfigTemplate', 'GraphicsConfiguration',
            +            'GraphicsDevice', 'GraphicsEnvironment',
            +            'GrayFilter', 'GregorianCalendar',
            +            'GridBagConstraints', 'GridBagLayout', 'GridLayout',
            +            'Group', 'Guard', 'GuardedObject', 'GZIPInputStream',
            +            'GZIPOutputStream', 'HasControls', 'HashMap',
            +            'HashSet', 'Hashtable', 'HierarchyBoundsAdapter',
            +            'HierarchyBoundsListener', 'HierarchyEvent',
            +            'HierarchyListener', 'Highlighter',
            +            'Highlighter.Highlight',
            +            'Highlighter.HighlightPainter', 'HTML',
            +            'HTML.Attribute', 'HTML.Tag', 'HTML.UnknownTag',
            +            'HTMLDocument', 'HTMLDocument.Iterator',
            +            'HTMLEditorKit', 'HTMLEditorKit.HTMLFactory',
            +            'HTMLEditorKit.HTMLTextAction',
            +            'HTMLEditorKit.InsertHTMLTextAction',
            +            'HTMLEditorKit.LinkController',
            +            'HTMLEditorKit.Parser',
            +            'HTMLEditorKit.ParserCallback',
            +            'HTMLFrameHyperlinkEvent', 'HTMLWriter',
            +            'HttpURLConnection', 'HyperlinkEvent',
            +            'HyperlinkEvent.EventType', 'HyperlinkListener',
            +            'ICC_ColorSpace', 'ICC_Profile', 'ICC_ProfileGray',
            +            'ICC_ProfileRGB', 'Icon', 'IconUIResource',
            +            'IconView', 'IdentifierHelper', 'Identity',
            +            'IdentityScope', 'IDLEntity', 'IDLType',
            +            'IDLTypeHelper', 'IDLTypeOperations',
            +            'IllegalAccessError', 'IllegalAccessException',
            +            'IllegalArgumentException',
            +            'IllegalComponentStateException',
            +            'IllegalMonitorStateException',
            +            'IllegalPathStateException', 'IllegalStateException',
            +            'IllegalThreadStateException', 'Image',
            +            'ImageConsumer', 'ImageFilter',
            +            'ImageGraphicAttribute', 'ImageIcon',
            +            'ImageObserver', 'ImageProducer',
            +            'ImagingOpException', 'IMP_LIMIT',
            +            'IncompatibleClassChangeError',
            +            'InconsistentTypeCode', 'IndexColorModel',
            +            'IndexedPropertyDescriptor',
            +            'IndexOutOfBoundsException', 'IndirectionException',
            +            'InetAddress', 'Inflater', 'InflaterInputStream',
            +            'InheritableThreadLocal', 'InitialContext',
            +            'InitialContextFactory',
            +            'InitialContextFactoryBuilder', 'InitialDirContext',
            +            'INITIALIZE', 'Initializer', 'InitialLdapContext',
            +            'InlineView', 'InputContext', 'InputEvent',
            +            'InputMap', 'InputMapUIResource', 'InputMethod',
            +            'InputMethodContext', 'InputMethodDescriptor',
            +            'InputMethodEvent', 'InputMethodHighlight',
            +            'InputMethodListener', 'InputMethodRequests',
            +            'InputStream',
            +            'InputStreamReader', 'InputSubset', 'InputVerifier',
            +            'Insets', 'InsetsUIResource', 'InstantiationError',
            +            'InstantiationException', 'Instrument',
            +            'InsufficientResourcesException', 'Integer',
            +            'INTERNAL', 'InternalError', 'InternalFrameAdapter',
            +            'InternalFrameEvent', 'InternalFrameListener',
            +            'InternalFrameUI', 'InterruptedException',
            +            'InterruptedIOException',
            +            'InterruptedNamingException', 'INTF_REPOS',
            +            'IntHolder', 'IntrospectionException',
            +            'Introspector', 'Invalid',
            +            'InvalidAlgorithmParameterException',
            +            'InvalidAttributeIdentifierException',
            +            'InvalidAttributesException',
            +            'InvalidAttributeValueException',
            +            'InvalidClassException',
            +            'InvalidDnDOperationException',
            +            'InvalidKeyException', 'InvalidKeySpecException',
            +            'InvalidMidiDataException', 'InvalidName',
            +            'InvalidNameException',
            +            'InvalidNameHelper', 'InvalidNameHolder',
            +            'InvalidObjectException',
            +            'InvalidParameterException',
            +            'InvalidParameterSpecException',
            +            'InvalidSearchControlsException',
            +            'InvalidSearchFilterException', 'InvalidSeq',
            +            'InvalidTransactionException', 'InvalidValue',
            +            'INVALID_TRANSACTION', 'InvocationEvent',
            +            'InvocationHandler', 'InvocationTargetException',
            +            'InvokeHandler', 'INV_FLAG', 'INV_IDENT',
            +            'INV_OBJREF', 'INV_POLICY', 'IOException',
            +            'IRObject', 'IRObjectOperations', 'IstringHelper',
            +            'ItemEvent', 'ItemListener', 'ItemSelectable',
            +            'Iterator', 'JApplet', 'JarEntry', 'JarException',
            +            'JarFile', 'JarInputStream', 'JarOutputStream',
            +            'JarURLConnection', 'JButton', 'JCheckBox',
            +            'JCheckBoxMenuItem', 'JColorChooser', 'JComboBox',
            +            'JComboBox.KeySelectionManager', 'JComponent',
            +            'JDesktopPane', 'JDialog', 'JEditorPane',
            +            'JFileChooser', 'JFrame', 'JInternalFrame',
            +            'JInternalFrame.JDesktopIcon', 'JLabel',
            +            'JLayeredPane', 'JList', 'JMenu', 'JMenuBar',
            +            'JMenuItem', 'JobAttributes',
            +            'JobAttributes.DefaultSelectionType',
            +            'JobAttributes.DestinationType',
            +            'JobAttributes.DialogType',
            +            'JobAttributes.MultipleDocumentHandlingType',
            +            'JobAttributes.SidesType', 'JOptionPane', 'JPanel',
            +            'JPasswordField', 'JPopupMenu',
            +            'JPopupMenu.Separator', 'JProgressBar',
            +            'JRadioButton', 'JRadioButtonMenuItem', 'JRootPane',
            +            'JScrollBar', 'JScrollPane', 'JSeparator', 'JSlider',
            +            'JSplitPane', 'JTabbedPane', 'JTable',
            +            'JTableHeader', 'JTextArea', 'JTextComponent',
            +            'JTextComponent.KeyBinding', 'JTextField',
            +            'JTextPane', 'JToggleButton',
            +            'JToggleButton.ToggleButtonModel', 'JToolBar',
            +            'JToolBar.Separator', 'JToolTip', 'JTree',
            +            'JTree.DynamicUtilTreeNode',
            +            'JTree.EmptySelectionModel', 'JViewport', 'JWindow',
            +            'Kernel', 'Key', 'KeyAdapter', 'KeyEvent',
            +            'KeyException', 'KeyFactory', 'KeyFactorySpi',
            +            'KeyListener', 'KeyManagementException', 'Keymap',
            +            'KeyPair', 'KeyPairGenerator', 'KeyPairGeneratorSpi',
            +            'KeySpec', 'KeyStore', 'KeyStoreException',
            +            'KeyStoreSpi', 'KeyStroke', 'Label', 'LabelUI',
            +            'LabelView', 'LastOwnerException',
            +            'LayeredHighlighter',
            +            'LayeredHighlighter.LayerPainter', 'LayoutManager',
            +            'LayoutManager2', 'LayoutQueue', 'LdapContext',
            +            'LdapReferralException', 'Lease',
            +            'LimitExceededException', 'Line', 'Line.Info',
            +            'Line2D', 'Line2D.Double', 'Line2D.Float',
            +            'LineBorder', 'LineBreakMeasurer', 'LineEvent',
            +            'LineEvent.Type', 'LineListener', 'LineMetrics',
            +            'LineNumberInputStream', 'LineNumberReader',
            +            'LineUnavailableException', 'LinkageError',
            +            'LinkedList', 'LinkException', 'LinkLoopException',
            +            'LinkRef', 'List', 'ListCellRenderer',
            +            'ListDataEvent', 'ListDataListener', 'ListIterator',
            +            'ListModel', 'ListResourceBundle',
            +            'ListSelectionEvent', 'ListSelectionListener',
            +            'ListSelectionModel', 'ListUI', 'ListView',
            +            'LoaderHandler', 'Locale', 'LocateRegistry',
            +            'LogStream', 'Long', 'LongHolder',
            +            'LongLongSeqHelper', 'LongLongSeqHolder',
            +            'LongSeqHelper', 'LongSeqHolder', 'LookAndFeel',
            +            'LookupOp', 'LookupTable', 'MalformedLinkException',
            +            'MalformedURLException', 'Manifest', 'Map',
            +            'Map.Entry', 'MARSHAL', 'MarshalException',
            +            'MarshalledObject', 'Math', 'MatteBorder',
            +            'MediaTracker', 'Member', 'MemoryImageSource',
            +            'Menu', 'MenuBar', 'MenuBarUI', 'MenuComponent',
            +            'MenuContainer', 'MenuDragMouseEvent',
            +            'MenuDragMouseListener', 'MenuElement', 'MenuEvent',
            +            'MenuItem', 'MenuItemUI', 'MenuKeyEvent',
            +            'MenuKeyListener', 'MenuListener',
            +            'MenuSelectionManager', 'MenuShortcut',
            +            'MessageDigest', 'MessageDigestSpi', 'MessageFormat',
            +            'MetaEventListener', 'MetalBorders',
            +            'MetalBorders.ButtonBorder',
            +            'MetalBorders.Flush3DBorder',
            +            'MetalBorders.InternalFrameBorder',
            +            'MetalBorders.MenuBarBorder',
            +            'MetalBorders.MenuItemBorder',
            +            'MetalBorders.OptionDialogBorder',
            +            'MetalBorders.PaletteBorder',
            +            'MetalBorders.PopupMenuBorder',
            +            'MetalBorders.RolloverButtonBorder',
            +            'MetalBorders.ScrollPaneBorder',
            +            'MetalBorders.TableHeaderBorder',
            +            'MetalBorders.TextFieldBorder',
            +            'MetalBorders.ToggleButtonBorder',
            +            'MetalBorders.ToolBarBorder', 'MetalButtonUI',
            +            'MetalCheckBoxIcon', 'MetalCheckBoxUI',
            +            'MetalComboBoxButton', 'MetalComboBoxEditor',
            +            'MetalComboBoxEditor.UIResource',
            +            'MetalComboBoxIcon', 'MetalComboBoxUI',
            +            'MetalDesktopIconUI', 'MetalFileChooserUI',
            +            'MetalIconFactory', 'MetalIconFactory.FileIcon16',
            +            'MetalIconFactory.FolderIcon16',
            +            'MetalIconFactory.PaletteCloseIcon',
            +            'MetalIconFactory.TreeControlIcon',
            +            'MetalIconFactory.TreeFolderIcon',
            +            'MetalIconFactory.TreeLeafIcon',
            +            'MetalInternalFrameTitlePane',
            +            'MetalInternalFrameUI', 'MetalLabelUI',
            +            'MetalLookAndFeel', 'MetalPopupMenuSeparatorUI',
            +            'MetalProgressBarUI', 'MetalRadioButtonUI',
            +            'MetalScrollBarUI', 'MetalScrollButton',
            +            'MetalScrollPaneUI', 'MetalSeparatorUI',
            +            'MetalSliderUI', 'MetalSplitPaneUI',
            +            'MetalTabbedPaneUI', 'MetalTextFieldUI',
            +            'MetalTheme', 'MetalToggleButtonUI',
            +            'MetalToolBarUI', 'MetalToolTipUI', 'MetalTreeUI',
            +            'MetaMessage', 'Method', 'MethodDescriptor',
            +            'MidiChannel', 'MidiDevice', 'MidiDevice.Info',
            +            'MidiDeviceProvider', 'MidiEvent', 'MidiFileFormat',
            +            'MidiFileReader', 'MidiFileWriter', 'MidiMessage',
            +            'MidiSystem', 'MidiUnavailableException',
            +            'MimeTypeParseException', 'MinimalHTMLWriter',
            +            'MissingResourceException', 'Mixer', 'Mixer.Info',
            +            'MixerProvider', 'ModificationItem', 'Modifier',
            +            'MouseAdapter', 'MouseDragGestureRecognizer',
            +            'MouseEvent', 'MouseInputAdapter',
            +            'MouseInputListener', 'MouseListener',
            +            'MouseMotionAdapter', 'MouseMotionListener',
            +            'MultiButtonUI', 'MulticastSocket',
            +            'MultiColorChooserUI', 'MultiComboBoxUI',
            +            'MultiDesktopIconUI', 'MultiDesktopPaneUI',
            +            'MultiFileChooserUI', 'MultiInternalFrameUI',
            +            'MultiLabelUI', 'MultiListUI', 'MultiLookAndFeel',
            +            'MultiMenuBarUI', 'MultiMenuItemUI',
            +            'MultiOptionPaneUI', 'MultiPanelUI',
            +            'MultiPixelPackedSampleModel', 'MultipleMaster',
            +            'MultiPopupMenuUI', 'MultiProgressBarUI',
            +            'MultiScrollBarUI', 'MultiScrollPaneUI',
            +            'MultiSeparatorUI', 'MultiSliderUI',
            +            'MultiSplitPaneUI', 'MultiTabbedPaneUI',
            +            'MultiTableHeaderUI', 'MultiTableUI', 'MultiTextUI',
            +            'MultiToolBarUI', 'MultiToolTipUI', 'MultiTreeUI',
            +            'MultiViewportUI', 'MutableAttributeSet',
            +            'MutableComboBoxModel', 'MutableTreeNode', 'Name',
            +            'NameAlreadyBoundException', 'NameClassPair',
            +            'NameComponent', 'NameComponentHelper',
            +            'NameComponentHolder', 'NamedValue', 'NameHelper',
            +            'NameHolder', 'NameNotFoundException', 'NameParser',
            +            'NamespaceChangeListener', 'NameValuePair',
            +            'NameValuePairHelper', 'Naming', 'NamingContext',
            +            'NamingContextHelper', 'NamingContextHolder',
            +            'NamingContextOperations', 'NamingEnumeration',
            +            'NamingEvent', 'NamingException',
            +            'NamingExceptionEvent', 'NamingListener',
            +            'NamingManager', 'NamingSecurityException',
            +            'NegativeArraySizeException', 'NetPermission',
            +            'NoClassDefFoundError', 'NoInitialContextException',
            +            'NoninvertibleTransformException',
            +            'NoPermissionException', 'NoRouteToHostException',
            +            'NoSuchAlgorithmException',
            +            'NoSuchAttributeException', 'NoSuchElementException',
            +            'NoSuchFieldError', 'NoSuchFieldException',
            +            'NoSuchMethodError', 'NoSuchMethodException',
            +            'NoSuchObjectException', 'NoSuchProviderException',
            +            'NotActiveException', 'NotBoundException',
            +            'NotContextException', 'NotEmpty', 'NotEmptyHelper',
            +            'NotEmptyHolder', 'NotFound', 'NotFoundHelper',
            +            'NotFoundHolder', 'NotFoundReason',
            +            'NotFoundReasonHelper', 'NotFoundReasonHolder',
            +            'NotOwnerException', 'NotSerializableException',
            +            'NO_IMPLEMENT', 'NO_MEMORY', 'NO_PERMISSION',
            +            'NO_RESOURCES', 'NO_RESPONSE',
            +            'NullPointerException', 'Number', 'NumberFormat',
            +            'NumberFormatException', 'NVList', 'Object',
            +            'ObjectChangeListener', 'ObjectFactory',
            +            'ObjectFactoryBuilder', 'ObjectHelper',
            +            'ObjectHolder', 'ObjectImpl',
            +            'ObjectInput', 'ObjectInputStream',
            +            'ObjectInputStream.GetField',
            +            'ObjectInputValidation', 'ObjectOutput',
            +            'ObjectOutputStream', 'ObjectOutputStream.PutField',
            +            'ObjectStreamClass', 'ObjectStreamConstants',
            +            'ObjectStreamException', 'ObjectStreamField',
            +            'ObjectView', 'OBJECT_NOT_EXIST', 'ObjID',
            +            'OBJ_ADAPTER', 'Observable', 'Observer',
            +            'OctetSeqHelper', 'OctetSeqHolder', 'OMGVMCID',
            +            'OpenType', 'Operation',
            +            'OperationNotSupportedException', 'Option',
            +            'OptionalDataException', 'OptionPaneUI', 'ORB',
            +            'OutOfMemoryError', 'OutputStream',
            +            'OutputStreamWriter', 'OverlayLayout', 'Owner',
            +            'Package', 'PackedColorModel', 'Pageable',
            +            'PageAttributes', 'PageAttributes.ColorType',
            +            'PageAttributes.MediaType',
            +            'PageAttributes.OrientationRequestedType',
            +            'PageAttributes.OriginType',
            +            'PageAttributes.PrintQualityType', 'PageFormat',
            +            'Paint', 'PaintContext', 'PaintEvent', 'Panel',
            +            'PanelUI', 'Paper', 'ParagraphView',
            +            'ParameterBlock', 'ParameterDescriptor',
            +            'ParseException', 'ParsePosition', 'Parser',
            +            'ParserDelegator', 'PartialResultException',
            +            'PasswordAuthentication', 'PasswordView', 'Patch',
            +            'PathIterator', 'Permission',
            +            'PermissionCollection', 'Permissions',
            +            'PERSIST_STORE', 'PhantomReference',
            +            'PipedInputStream', 'PipedOutputStream',
            +            'PipedReader', 'PipedWriter', 'PixelGrabber',
            +            'PixelInterleavedSampleModel', 'PKCS8EncodedKeySpec',
            +            'PlainDocument', 'PlainView', 'Point', 'Point2D',
            +            'Point2D.Double', 'Point2D.Float', 'Policy',
            +            'PolicyError', 'PolicyHelper',
            +            'PolicyHolder', 'PolicyListHelper',
            +            'PolicyListHolder', 'PolicyOperations',
            +            'PolicyTypeHelper', 'Polygon', 'PopupMenu',
            +            'PopupMenuEvent', 'PopupMenuListener', 'PopupMenuUI',
            +            'Port', 'Port.Info', 'PortableRemoteObject',
            +            'PortableRemoteObjectDelegate', 'Position',
            +            'Position.Bias', 'PreparedStatement', 'Principal',
            +            'PrincipalHolder', 'Printable',
            +            'PrinterAbortException', 'PrinterException',
            +            'PrinterGraphics', 'PrinterIOException',
            +            'PrinterJob', 'PrintGraphics', 'PrintJob',
            +            'PrintStream', 'PrintWriter', 'PrivateKey',
            +            'PRIVATE_MEMBER', 'PrivilegedAction',
            +            'PrivilegedActionException',
            +            'PrivilegedExceptionAction', 'Process',
            +            'ProfileDataException', 'ProgressBarUI',
            +            'ProgressMonitor', 'ProgressMonitorInputStream',
            +            'Properties', 'PropertyChangeEvent',
            +            'PropertyChangeListener', 'PropertyChangeSupport',
            +            'PropertyDescriptor', 'PropertyEditor',
            +            'PropertyEditorManager', 'PropertyEditorSupport',
            +            'PropertyPermission', 'PropertyResourceBundle',
            +            'PropertyVetoException', 'ProtectionDomain',
            +            'ProtocolException', 'Provider', 'ProviderException',
            +            'Proxy', 'PublicKey', 'PUBLIC_MEMBER',
            +            'PushbackInputStream', 'PushbackReader',
            +            'QuadCurve2D', 'QuadCurve2D.Double',
            +            'QuadCurve2D.Float', 'Random', 'RandomAccessFile',
            +            'Raster', 'RasterFormatException', 'RasterOp',
            +            'Reader', 'Receiver', 'Rectangle', 'Rectangle2D',
            +            'Rectangle2D.Double', 'Rectangle2D.Float',
            +            'RectangularShape', 'Ref', 'RefAddr', 'Reference',
            +            'Referenceable', 'ReferenceQueue',
            +            'ReferralException', 'ReflectPermission', 'Registry',
            +            'RegistryHandler', 'RemarshalException', 'Remote',
            +            'RemoteCall', 'RemoteException', 'RemoteObject',
            +            'RemoteRef', 'RemoteServer', 'RemoteStub',
            +            'RenderableImage', 'RenderableImageOp',
            +            'RenderableImageProducer', 'RenderContext',
            +            'RenderedImage', 'RenderedImageFactory', 'Renderer',
            +            'RenderingHints', 'RenderingHints.Key',
            +            'RepaintManager', 'ReplicateScaleFilter',
            +            'Repository', 'RepositoryIdHelper', 'Request',
            +            'RescaleOp', 'Resolver', 'ResolveResult',
            +            'ResourceBundle', 'ResponseHandler', 'ResultSet',
            +            'ResultSetMetaData', 'ReverbType', 'RGBImageFilter',
            +            'RMIClassLoader', 'RMIClientSocketFactory',
            +            'RMIFailureHandler', 'RMISecurityException',
            +            'RMISecurityManager', 'RMIServerSocketFactory',
            +            'RMISocketFactory', 'Robot', 'RootPaneContainer',
            +            'RootPaneUI', 'RoundRectangle2D',
            +            'RoundRectangle2D.Double', 'RoundRectangle2D.Float',
            +            'RowMapper', 'RSAKey', 'RSAKeyGenParameterSpec',
            +            'RSAPrivateCrtKey', 'RSAPrivateCrtKeySpec',
            +            'RSAPrivateKey', 'RSAPrivateKeySpec', 'RSAPublicKey',
            +            'RSAPublicKeySpec', 'RTFEditorKit',
            +            'RuleBasedCollator', 'Runnable', 'RunTime',
            +            'Runtime', 'RuntimeException', 'RunTimeOperations',
            +            'RuntimePermission', 'SampleModel',
            +            'SchemaViolationException', 'Scrollable',
            +            'Scrollbar', 'ScrollBarUI', 'ScrollPane',
            +            'ScrollPaneConstants', 'ScrollPaneLayout',
            +            'ScrollPaneLayout.UIResource', 'ScrollPaneUI',
            +            'SearchControls', 'SearchResult',
            +            'SecureClassLoader', 'SecureRandom',
            +            'SecureRandomSpi', 'Security', 'SecurityException',
            +            'SecurityManager', 'SecurityPermission', 'Segment',
            +            'SeparatorUI', 'Sequence', 'SequenceInputStream',
            +            'Sequencer', 'Sequencer.SyncMode', 'Serializable',
            +            'SerializablePermission', 'ServantObject',
            +            'ServerCloneException', 'ServerError',
            +            'ServerException', 'ServerNotActiveException',
            +            'ServerRef', 'ServerRequest',
            +            'ServerRuntimeException', 'ServerSocket',
            +            'ServiceDetail', 'ServiceDetailHelper',
            +            'ServiceInformation', 'ServiceInformationHelper',
            +            'ServiceInformationHolder',
            +            'ServiceUnavailableException', 'Set',
            +            'SetOverrideType', 'SetOverrideTypeHelper', 'Shape',
            +            'ShapeGraphicAttribute', 'Short', 'ShortHolder',
            +            'ShortLookupTable', 'ShortMessage', 'ShortSeqHelper',
            +            'ShortSeqHolder', 'Signature', 'SignatureException',
            +            'SignatureSpi', 'SignedObject', 'Signer',
            +            'SimpleAttributeSet', 'SimpleBeanInfo',
            +            'SimpleDateFormat', 'SimpleTimeZone',
            +            'SinglePixelPackedSampleModel',
            +            'SingleSelectionModel', 'SizeLimitExceededException',
            +            'SizeRequirements', 'SizeSequence', 'Skeleton',
            +            'SkeletonMismatchException',
            +            'SkeletonNotFoundException', 'SliderUI', 'Socket',
            +            'SocketException', 'SocketImpl', 'SocketImplFactory',
            +            'SocketOptions', 'SocketPermission',
            +            'SocketSecurityException', 'SoftBevelBorder',
            +            'SoftReference', 'SortedMap', 'SortedSet',
            +            'Soundbank', 'SoundbankReader', 'SoundbankResource',
            +            'SourceDataLine', 'SplitPaneUI', 'SQLData',
            +            'SQLException', 'SQLInput', 'SQLOutput',
            +            'SQLPermission', 'SQLWarning', 'Stack',
            +            'StackOverflowError', 'StateEdit', 'StateEditable',
            +            'StateFactory', 'Statement', 'Streamable',
            +            'StreamableValue', 'StreamCorruptedException',
            +            'StreamTokenizer', 'StrictMath', 'String',
            +            'StringBuffer', 'StringBufferInputStream',
            +            'StringCharacterIterator', 'StringContent',
            +            'StringHolder', 'StringIndexOutOfBoundsException',
            +            'StringReader', 'StringRefAddr', 'StringSelection',
            +            'StringTokenizer', 'StringValueHelper',
            +            'StringWriter', 'Stroke', 'Struct', 'StructMember',
            +            'StructMemberHelper', 'Stub', 'StubDelegate',
            +            'StubNotFoundException', 'Style', 'StyleConstants',
            +            'StyleConstants.CharacterConstants',
            +            'StyleConstants.ColorConstants',
            +            'StyleConstants.FontConstants',
            +            'StyleConstants.ParagraphConstants', 'StyleContext',
            +            'StyledDocument', 'StyledEditorKit',
            +            'StyledEditorKit.AlignmentAction',
            +            'StyledEditorKit.BoldAction',
            +            'StyledEditorKit.FontFamilyAction',
            +            'StyledEditorKit.FontSizeAction',
            +            'StyledEditorKit.ForegroundAction',
            +            'StyledEditorKit.ItalicAction',
            +            'StyledEditorKit.StyledTextAction',
            +            'StyledEditorKit.UnderlineAction', 'StyleSheet',
            +            'StyleSheet.BoxPainter', 'StyleSheet.ListPainter',
            +            'SwingConstants', 'SwingPropertyChangeSupport',
            +            'SwingUtilities', 'SyncFailedException',
            +            'Synthesizer', 'SysexMessage', 'System',
            +            'SystemColor', 'SystemException', 'SystemFlavorMap',
            +            'TabableView', 'TabbedPaneUI', 'TabExpander',
            +            'TableCellEditor', 'TableCellRenderer',
            +            'TableColumn', 'TableColumnModel',
            +            'TableColumnModelEvent', 'TableColumnModelListener',
            +            'TableHeaderUI', 'TableModel', 'TableModelEvent',
            +            'TableModelListener', 'TableUI', 'TableView',
            +            'TabSet', 'TabStop', 'TagElement', 'TargetDataLine',
            +            'TCKind', 'TextAction', 'TextArea', 'TextAttribute',
            +            'TextComponent', 'TextEvent', 'TextField',
            +            'TextHitInfo', 'TextLayout',
            +            'TextLayout.CaretPolicy', 'TextListener',
            +            'TextMeasurer', 'TextUI', 'TexturePaint', 'Thread',
            +            'ThreadDeath', 'ThreadGroup', 'ThreadLocal',
            +            'Throwable', 'Tie', 'TileObserver', 'Time',
            +            'TimeLimitExceededException', 'Timer',
            +            'TimerTask', 'Timestamp', 'TimeZone', 'TitledBorder',
            +            'ToolBarUI', 'Toolkit', 'ToolTipManager',
            +            'ToolTipUI', 'TooManyListenersException', 'Track',
            +            'TransactionRequiredException',
            +            'TransactionRolledbackException',
            +            'TRANSACTION_REQUIRED', 'TRANSACTION_ROLLEDBACK',
            +            'Transferable', 'TransformAttribute', 'TRANSIENT',
            +            'Transmitter', 'Transparency', 'TreeCellEditor',
            +            'TreeCellRenderer', 'TreeExpansionEvent',
            +            'TreeExpansionListener', 'TreeMap', 'TreeModel',
            +            'TreeModelEvent', 'TreeModelListener', 'TreeNode',
            +            'TreePath', 'TreeSelectionEvent',
            +            'TreeSelectionListener', 'TreeSelectionModel',
            +            'TreeSet', 'TreeUI', 'TreeWillExpandListener',
            +            'TypeCode', 'TypeCodeHolder', 'TypeMismatch',
            +            'Types', 'UID', 'UIDefaults',
            +            'UIDefaults.ActiveValue', 'UIDefaults.LazyInputMap',
            +            'UIDefaults.LazyValue', 'UIDefaults.ProxyLazyValue',
            +            'UIManager', 'UIManager.LookAndFeelInfo',
            +            'UIResource', 'ULongLongSeqHelper',
            +            'ULongLongSeqHolder', 'ULongSeqHelper',
            +            'ULongSeqHolder', 'UndeclaredThrowableException',
            +            'UndoableEdit', 'UndoableEditEvent',
            +            'UndoableEditListener', 'UndoableEditSupport',
            +            'UndoManager', 'UnexpectedException',
            +            'UnicastRemoteObject', 'UnionMember',
            +            'UnionMemberHelper', 'UNKNOWN', 'UnknownError',
            +            'UnknownException', 'UnknownGroupException',
            +            'UnknownHostException',
            +            'UnknownObjectException', 'UnknownServiceException',
            +            'UnknownUserException', 'UnmarshalException',
            +            'UnrecoverableKeyException', 'Unreferenced',
            +            'UnresolvedPermission', 'UnsatisfiedLinkError',
            +            'UnsolicitedNotification',
            +            'UnsolicitedNotificationEvent',
            +            'UnsolicitedNotificationListener',
            +            'UnsupportedAudioFileException',
            +            'UnsupportedClassVersionError',
            +            'UnsupportedEncodingException',
            +            'UnsupportedFlavorException',
            +            'UnsupportedLookAndFeelException',
            +            'UnsupportedOperationException',
            +            'UNSUPPORTED_POLICY', 'UNSUPPORTED_POLICY_VALUE',
            +            'URL', 'URLClassLoader', 'URLConnection',
            +            'URLDecoder', 'URLEncoder', 'URLStreamHandler',
            +            'URLStreamHandlerFactory', 'UserException',
            +            'UShortSeqHelper', 'UShortSeqHolder',
            +            'UTFDataFormatException', 'Util', 'UtilDelegate',
            +            'Utilities', 'ValueBase', 'ValueBaseHelper',
            +            'ValueBaseHolder', 'ValueFactory', 'ValueHandler',
            +            'ValueMember', 'ValueMemberHelper',
            +            'VariableHeightLayoutCache', 'Vector', 'VerifyError',
            +            'VersionSpecHelper', 'VetoableChangeListener',
            +            'VetoableChangeSupport', 'View', 'ViewFactory',
            +            'ViewportLayout', 'ViewportUI',
            +            'VirtualMachineError', 'Visibility',
            +            'VisibilityHelper', 'VMID', 'VM_ABSTRACT',
            +            'VM_CUSTOM', 'VM_NONE', 'VM_TRUNCATABLE',
            +            'VoiceStatus', 'Void', 'WCharSeqHelper',
            +            'WCharSeqHolder', 'WeakHashMap', 'WeakReference',
            +            'Window', 'WindowAdapter', 'WindowConstants',
            +            'WindowEvent', 'WindowListener', 'WrappedPlainView',
            +            'WritableRaster', 'WritableRenderedImage',
            +            'WriteAbortedException', 'Writer',
            +            'WrongTransaction', 'WStringValueHelper',
            +            'X509Certificate', 'X509CRL', 'X509CRLEntry',
            +            'X509EncodedKeySpec', 'X509Extension', 'ZipEntry',
            +            'ZipException', 'ZipFile', 'ZipInputStream',
            +            'ZipOutputStream', 'ZoneView',
            +            '_BindingIteratorImplBase', '_BindingIteratorStub',
            +            '_IDLTypeStub', '_NamingContextImplBase',
            +            '_NamingContextStub', '_PolicyStub', '_Remote_Stub'
            +            ),
            +        4 => array(
            +            'void', 'double', 'int', 'boolean', 'byte', 'short', 'long', 'char', 'float'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '[', ']', '{', '}',
            +        '+', '-', '*', '/', '%',
            +        '!', '&', '|', '^',
            +        '<', '>', '=',
            +        '?', ':', ';',
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => true,
            +        4 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000000; font-weight: bold;',
            +            2 => 'color: #000066; font-weight: bold;',
            +            3 => 'color: #003399;',
            +            4 => 'color: #000066; font-weight: bold;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; font-style: italic;',
            +            2 => 'color: #006699;',
            +            3 => 'color: #008000; font-style: italic; font-weight: bold;',
            +            3 => 'color: #008000; font-style: italic; font-weight: bold;',
            +            'MULTI' => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #0000ff;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #006633;',
            +            2 => 'color: #006633;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #339933;'
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => 'http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+{FNAMEL}',
            +        4 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/java5.php b/vendor/easybook/geshi/geshi/java5.php
            new file mode 100644
            index 0000000000..5d74d988b4
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/java5.php
            @@ -0,0 +1,1035 @@
            + 'Java(TM) 2 Platform Standard Edition 5.0',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(
            +        //Import and Package directives (Basic Support only)
            +        2 => '/(?:(?<=import[\\n\\s](?!static))|(?<=import[\\n\\s]static[\\n\\s])|(?<=package[\\n\\s]))[\\n\\s]*([a-zA-Z0-9_]+\\.)*([a-zA-Z0-9_]+|\*)(?=[\n\s;])/i',
            +        // javadoc comments
            +        3 => '#/\*\*(?![\*\/]).*\*/#sU'
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            /* see the authoritative list of all 50 Java keywords at */
            +            /* http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#229308 */
            +
            +            /* java keywords, part 1: control flow */
            +            'case', 'default', 'do', 'else', 'for',
            +            'goto', 'if', 'switch', 'while'
            +
            +            /* IMO 'break', 'continue', 'return' and 'throw' */
            +                        /* should also be added to this group, as they   */
            +            /* also manage the control flow,                 */
            +            /* arguably 'try'/'catch'/'finally' as well      */
            +            ),
            +        2 => array(
            +            /* java keywords, part 2 */
            +
            +            'break', 'continue', 'return', 'throw',
            +            'try', 'catch', 'finally',
            +
            +            'abstract', 'assert', 'class', 'const', 'enum', 'extends',
            +            'final', 'implements', 'import', 'instanceof', 'interface',
            +            'native', 'new', 'package', 'private', 'protected',
            +            'public', 'static', 'strictfp', 'super', 'synchronized',
            +            'this', 'throws', 'transient', 'volatile'
            +            ),
            +        3 => array(
            +            /* Java keywords, part 3: primitive data types and 'void' */
            +            'boolean', 'byte', 'char', 'double',
            +            'float', 'int', 'long', 'short', 'void'
            +            ),
            +        4 => array(
            +            /* other reserved words in Java: literals */
            +            /* should be styled to look similar to numbers and Strings */
            +            'false', 'null', 'true'
            +            ),
            +        5 => array (
            +            'Applet', 'AppletContext', 'AppletStub', 'AudioClip'
            +            ),
            +        6 => array (
            +            'AWTError', 'AWTEvent', 'AWTEventMulticaster', 'AWTException', 'AWTKeyStroke', 'AWTPermission', 'ActiveEvent', 'Adjustable', 'AlphaComposite', 'BasicStroke', 'BorderLayout', 'BufferCapabilities', 'BufferCapabilities.FlipContents', 'Button', 'Canvas', 'CardLayout', 'Checkbox', 'CheckboxGroup', 'CheckboxMenuItem', 'Choice', 'Color', 'Component', 'ComponentOrientation', 'Composite', 'CompositeContext', 'Container', 'ContainerOrderFocusTraversalPolicy', 'Cursor', 'DefaultFocusTraversalPolicy', 'DefaultKeyboardFocusManager', 'Dialog', 'Dimension', 'DisplayMode', 'EventQueue', 'FileDialog', 'FlowLayout', 'FocusTraversalPolicy', 'Font', 'FontFormatException', 'FontMetrics', 'Frame', 'GradientPaint', 'Graphics', 'Graphics2D', 'GraphicsConfigTemplate', 'GraphicsConfiguration', 'GraphicsDevice', 'GraphicsEnvironment', 'GridBagConstraints', 'GridBagLayout', 'GridLayout', 'HeadlessException', 'IllegalComponentStateException', 'Image', 'ImageCapabilities', 'Insets', 'ItemSelectable', 'JobAttributes',
            +            'JobAttributes.DefaultSelectionType', 'JobAttributes.DestinationType', 'JobAttributes.DialogType', 'JobAttributes.MultipleDocumentHandlingType', 'JobAttributes.SidesType', 'KeyEventDispatcher', 'KeyEventPostProcessor', 'KeyboardFocusManager', 'Label', 'LayoutManager', 'LayoutManager2', 'MediaTracker', 'Menu', 'MenuBar', 'MenuComponent', 'MenuContainer', 'MenuItem', 'MenuShortcut', 'MouseInfo', 'PageAttributes', 'PageAttributes.ColorType', 'PageAttributes.MediaType', 'PageAttributes.OrientationRequestedType', 'PageAttributes.OriginType', 'PageAttributes.PrintQualityType', 'Paint', 'PaintContext', 'Panel', 'Point', 'PointerInfo', 'Polygon', 'PopupMenu', 'PrintGraphics', 'PrintJob', 'Rectangle', 'RenderingHints', 'RenderingHints.Key', 'Robot', 'ScrollPane', 'ScrollPaneAdjustable', 'Scrollbar', 'Shape', 'Stroke', 'SystemColor', 'TextArea', 'TextComponent', 'TextField', 'TexturePaint', 'Toolkit', 'Transparency', 'Window'
            +            ),
            +        7 => array (
            +            'CMMException', 'ColorSpace', 'ICC_ColorSpace', 'ICC_Profile', 'ICC_ProfileGray', 'ICC_ProfileRGB', 'ProfileDataException'
            +            ),
            +        8 => array (
            +            'Clipboard', 'ClipboardOwner', 'DataFlavor', 'FlavorEvent', 'FlavorListener', 'FlavorMap', 'FlavorTable', 'MimeTypeParseException', 'StringSelection', 'SystemFlavorMap', 'Transferable', 'UnsupportedFlavorException'
            +            ),
            +        9 => array (
            +            'Autoscroll', 'DnDConstants', 'DragGestureEvent', 'DragGestureListener', 'DragGestureRecognizer', 'DragSource', 'DragSourceAdapter', 'DragSourceContext', 'DragSourceDragEvent', 'DragSourceDropEvent', 'DragSourceEvent', 'DragSourceListener', 'DragSourceMotionListener', 'DropTarget', 'DropTarget.DropTargetAutoScroller', 'DropTargetAdapter', 'DropTargetContext', 'DropTargetDragEvent', 'DropTargetDropEvent', 'DropTargetEvent', 'DropTargetListener', 'InvalidDnDOperationException', 'MouseDragGestureRecognizer'
            +            ),
            +        10 => array (
            +            'AWTEventListener', 'AWTEventListenerProxy', 'ActionEvent', 'ActionListener', 'AdjustmentEvent', 'AdjustmentListener', 'ComponentAdapter', 'ComponentEvent', 'ComponentListener', 'ContainerAdapter', 'ContainerEvent', 'ContainerListener', 'FocusAdapter', 'FocusEvent', 'FocusListener', 'HierarchyBoundsAdapter', 'HierarchyBoundsListener', 'HierarchyEvent', 'HierarchyListener', 'InputEvent', 'InputMethodEvent', 'InputMethodListener', 'InvocationEvent', 'ItemEvent', 'ItemListener', 'KeyAdapter', 'KeyEvent', 'KeyListener', 'MouseAdapter', 'MouseListener', 'MouseMotionAdapter', 'MouseMotionListener', 'MouseWheelEvent', 'MouseWheelListener', 'PaintEvent', 'TextEvent', 'TextListener', 'WindowAdapter', 'WindowEvent', 'WindowFocusListener', 'WindowListener', 'WindowStateListener'
            +            ),
            +        11 => array (
            +            'FontRenderContext', 'GlyphJustificationInfo', 'GlyphMetrics', 'GlyphVector', 'GraphicAttribute', 'ImageGraphicAttribute', 'LineBreakMeasurer', 'LineMetrics', 'MultipleMaster', 'NumericShaper', 'ShapeGraphicAttribute', 'TextAttribute', 'TextHitInfo', 'TextLayout', 'TextLayout.CaretPolicy', 'TextMeasurer', 'TransformAttribute'
            +            ),
            +        12 => array (
            +            'AffineTransform', 'Arc2D', 'Arc2D.Double', 'Arc2D.Float', 'Area', 'CubicCurve2D', 'CubicCurve2D.Double', 'CubicCurve2D.Float', 'Dimension2D', 'Ellipse2D', 'Ellipse2D.Double', 'Ellipse2D.Float', 'FlatteningPathIterator', 'GeneralPath', 'IllegalPathStateException', 'Line2D', 'Line2D.Double', 'Line2D.Float', 'NoninvertibleTransformException', 'PathIterator', 'Point2D', 'Point2D.Double', 'Point2D.Float', 'QuadCurve2D', 'QuadCurve2D.Double', 'QuadCurve2D.Float', 'Rectangle2D', 'Rectangle2D.Double', 'Rectangle2D.Float', 'RectangularShape', 'RoundRectangle2D', 'RoundRectangle2D.Double', 'RoundRectangle2D.Float'
            +            ),
            +        13 => array (
            +            'InputContext', 'InputMethodHighlight', 'InputMethodRequests', 'InputSubset'
            +            ),
            +        14 => array (
            +            'InputMethod', 'InputMethodContext', 'InputMethodDescriptor'
            +            ),
            +        15 => array (
            +            'AffineTransformOp', 'AreaAveragingScaleFilter', 'BandCombineOp', 'BandedSampleModel', 'BufferStrategy', 'BufferedImage', 'BufferedImageFilter', 'BufferedImageOp', 'ByteLookupTable', 'ColorConvertOp', 'ColorModel', 'ComponentColorModel', 'ComponentSampleModel', 'ConvolveOp', 'CropImageFilter', 'DataBuffer', 'DataBufferByte', 'DataBufferDouble', 'DataBufferFloat', 'DataBufferInt', 'DataBufferShort', 'DataBufferUShort', 'DirectColorModel', 'FilteredImageSource', 'ImageConsumer', 'ImageFilter', 'ImageObserver', 'ImageProducer', 'ImagingOpException', 'IndexColorModel', 'Kernel', 'LookupOp', 'LookupTable', 'MemoryImageSource', 'MultiPixelPackedSampleModel', 'PackedColorModel', 'PixelGrabber', 'PixelInterleavedSampleModel', 'RGBImageFilter', 'Raster', 'RasterFormatException', 'RasterOp', 'RenderedImage', 'ReplicateScaleFilter', 'RescaleOp', 'SampleModel', 'ShortLookupTable', 'SinglePixelPackedSampleModel', 'TileObserver', 'VolatileImage', 'WritableRaster', 'WritableRenderedImage'
            +            ),
            +        16 => array (
            +            'ContextualRenderedImageFactory', 'ParameterBlock', 'RenderContext', 'RenderableImage', 'RenderableImageOp', 'RenderableImageProducer', 'RenderedImageFactory'
            +            ),
            +        17 => array (
            +            'Book', 'PageFormat', 'Pageable', 'Paper', 'Printable', 'PrinterAbortException', 'PrinterException', 'PrinterGraphics', 'PrinterIOException', 'PrinterJob'
            +            ),
            +        18 => array (
            +            'AppletInitializer', 'BeanDescriptor', 'BeanInfo', 'Beans', 'Customizer', 'DefaultPersistenceDelegate', 'DesignMode', 'Encoder', 'EventHandler', 'EventSetDescriptor', 'ExceptionListener', 'Expression', 'FeatureDescriptor', 'IndexedPropertyChangeEvent', 'IndexedPropertyDescriptor', 'Introspector', 'MethodDescriptor', 'ParameterDescriptor', 'PersistenceDelegate', 'PropertyChangeEvent', 'PropertyChangeListener', 'PropertyChangeListenerProxy', 'PropertyChangeSupport', 'PropertyDescriptor', 'PropertyEditor', 'PropertyEditorManager', 'PropertyEditorSupport', 'PropertyVetoException', 'SimpleBeanInfo', 'VetoableChangeListener', 'VetoableChangeListenerProxy', 'VetoableChangeSupport', 'Visibility', 'XMLDecoder', 'XMLEncoder'
            +            ),
            +        19 => array (
            +            'BeanContext', 'BeanContextChild', 'BeanContextChildComponentProxy', 'BeanContextChildSupport', 'BeanContextContainerProxy', 'BeanContextEvent', 'BeanContextMembershipEvent', 'BeanContextMembershipListener', 'BeanContextProxy', 'BeanContextServiceAvailableEvent', 'BeanContextServiceProvider', 'BeanContextServiceProviderBeanInfo', 'BeanContextServiceRevokedEvent', 'BeanContextServiceRevokedListener', 'BeanContextServices', 'BeanContextServicesListener', 'BeanContextServicesSupport', 'BeanContextServicesSupport.BCSSServiceProvider', 'BeanContextSupport', 'BeanContextSupport.BCSIterator'
            +            ),
            +        20 => array (
            +            'BufferedInputStream', 'BufferedOutputStream', 'BufferedReader', 'BufferedWriter', 'ByteArrayInputStream', 'ByteArrayOutputStream', 'CharArrayReader', 'CharArrayWriter', 'CharConversionException', 'Closeable', 'DataInput', 'DataOutput', 'EOFException', 'Externalizable', 'File', 'FileDescriptor', 'FileInputStream', 'FileNotFoundException', 'FileOutputStream', 'FilePermission', 'FileReader', 'FileWriter', 'FilenameFilter', 'FilterInputStream', 'FilterOutputStream', 'FilterReader', 'FilterWriter', 'Flushable', 'IOException', 'InputStreamReader', 'InterruptedIOException', 'InvalidClassException', 'InvalidObjectException', 'LineNumberInputStream', 'LineNumberReader', 'NotActiveException', 'NotSerializableException', 'ObjectInput', 'ObjectInputStream', 'ObjectInputStream.GetField', 'ObjectInputValidation', 'ObjectOutput', 'ObjectOutputStream', 'ObjectOutputStream.PutField', 'ObjectStreamClass', 'ObjectStreamConstants', 'ObjectStreamException', 'ObjectStreamField', 'OptionalDataException', 'OutputStreamWriter',
            +            'PipedInputStream', 'PipedOutputStream', 'PipedReader', 'PipedWriter', 'PrintStream', 'PrintWriter', 'PushbackInputStream', 'PushbackReader', 'RandomAccessFile', 'Reader', 'SequenceInputStream', 'Serializable', 'SerializablePermission', 'StreamCorruptedException', 'StreamTokenizer', 'StringBufferInputStream', 'StringReader', 'StringWriter', 'SyncFailedException', 'UTFDataFormatException', 'UnsupportedEncodingException', 'WriteAbortedException', 'Writer'
            +            ),
            +        21 => array (
            +            'AbstractMethodError', 'Appendable', 'ArithmeticException', 'ArrayIndexOutOfBoundsException', 'ArrayStoreException', 'AssertionError', 'Boolean', 'Byte', 'CharSequence', 'Character', 'Character.Subset', 'Character.UnicodeBlock', 'Class', 'ClassCastException', 'ClassCircularityError', 'ClassFormatError', 'ClassLoader', 'ClassNotFoundException', 'CloneNotSupportedException', 'Cloneable', 'Comparable', 'Compiler', 'Deprecated', 'Double', 'Enum', 'EnumConstantNotPresentException', 'Error', 'Exception', 'ExceptionInInitializerError', 'Float', 'IllegalAccessError', 'IllegalAccessException', 'IllegalArgumentException', 'IllegalMonitorStateException', 'IllegalStateException', 'IllegalThreadStateException', 'IncompatibleClassChangeError', 'IndexOutOfBoundsException', 'InheritableThreadLocal', 'InstantiationError', 'InstantiationException', 'Integer', 'InternalError', 'InterruptedException', 'Iterable', 'LinkageError', 'Long', 'Math', 'NegativeArraySizeException', 'NoClassDefFoundError', 'NoSuchFieldError',
            +            'NoSuchFieldException', 'NoSuchMethodError', 'NoSuchMethodException', 'NullPointerException', 'Number', 'NumberFormatException', 'OutOfMemoryError', 'Override', 'Package', 'Process', 'ProcessBuilder', 'Readable', 'Runnable', 'Runtime', 'RuntimeException', 'RuntimePermission', 'SecurityException', 'SecurityManager', 'Short', 'StackOverflowError', 'StackTraceElement', 'StrictMath', 'String', 'StringBuffer', 'StringBuilder', 'StringIndexOutOfBoundsException', 'SuppressWarnings', 'System', 'Thread', 'Thread.State', 'Thread.UncaughtExceptionHandler', 'ThreadDeath', 'ThreadGroup', 'ThreadLocal', 'Throwable', 'TypeNotPresentException', 'UnknownError', 'UnsatisfiedLinkError', 'UnsupportedClassVersionError', 'UnsupportedOperationException', 'VerifyError', 'VirtualMachineError', 'Void'
            +            ),
            +        22 => array (
            +            'AnnotationFormatError', 'AnnotationTypeMismatchException', 'Documented', 'ElementType', 'IncompleteAnnotationException', 'Inherited', 'Retention', 'RetentionPolicy', 'Target'
            +            ),
            +        23 => array (
            +            'ClassDefinition', 'ClassFileTransformer', 'IllegalClassFormatException', 'Instrumentation', 'UnmodifiableClassException'
            +            ),
            +        24 => array (
            +            'ClassLoadingMXBean', 'CompilationMXBean', 'GarbageCollectorMXBean', 'ManagementFactory', 'ManagementPermission', 'MemoryMXBean', 'MemoryManagerMXBean', 'MemoryNotificationInfo', 'MemoryPoolMXBean', 'MemoryType', 'MemoryUsage', 'OperatingSystemMXBean', 'RuntimeMXBean', 'ThreadInfo', 'ThreadMXBean'
            +            ),
            +        25 => array (
            +            'PhantomReference', 'ReferenceQueue', 'SoftReference', 'WeakReference'
            +            ),
            +        26 => array (
            +            'AccessibleObject', 'AnnotatedElement', 'Constructor', 'Field', 'GenericArrayType', 'GenericDeclaration', 'GenericSignatureFormatError', 'InvocationHandler', 'InvocationTargetException', 'MalformedParameterizedTypeException', 'Member', 'Method', 'Modifier', 'ParameterizedType', 'ReflectPermission', 'Type', 'TypeVariable', 'UndeclaredThrowableException', 'WildcardType'
            +            ),
            +        27 => array (
            +            'BigDecimal', 'BigInteger', 'MathContext', 'RoundingMode'
            +            ),
            +        28 => array (
            +            'Authenticator', 'Authenticator.RequestorType', 'BindException', 'CacheRequest', 'CacheResponse', 'ContentHandlerFactory', 'CookieHandler', 'DatagramPacket', 'DatagramSocket', 'DatagramSocketImpl', 'DatagramSocketImplFactory', 'FileNameMap', 'HttpRetryException', 'HttpURLConnection', 'Inet4Address', 'Inet6Address', 'InetAddress', 'InetSocketAddress', 'JarURLConnection', 'MalformedURLException', 'MulticastSocket', 'NetPermission', 'NetworkInterface', 'NoRouteToHostException', 'PasswordAuthentication', 'PortUnreachableException', 'ProtocolException', 'Proxy.Type', 'ProxySelector', 'ResponseCache', 'SecureCacheResponse', 'ServerSocket', 'Socket', 'SocketAddress', 'SocketException', 'SocketImpl', 'SocketImplFactory', 'SocketOptions', 'SocketPermission', 'SocketTimeoutException', 'URI', 'URISyntaxException', 'URL', 'URLClassLoader', 'URLConnection', 'URLDecoder', 'URLEncoder', 'URLStreamHandler', 'URLStreamHandlerFactory', 'UnknownServiceException'
            +            ),
            +        29 => array (
            +            'Buffer', 'BufferOverflowException', 'BufferUnderflowException', 'ByteBuffer', 'ByteOrder', 'CharBuffer', 'DoubleBuffer', 'FloatBuffer', 'IntBuffer', 'InvalidMarkException', 'LongBuffer', 'MappedByteBuffer', 'ReadOnlyBufferException', 'ShortBuffer'
            +            ),
            +        30 => array (
            +            'AlreadyConnectedException', 'AsynchronousCloseException', 'ByteChannel', 'CancelledKeyException', 'Channel', 'Channels', 'ClosedByInterruptException', 'ClosedChannelException', 'ClosedSelectorException', 'ConnectionPendingException', 'DatagramChannel', 'FileChannel', 'FileChannel.MapMode', 'FileLock', 'FileLockInterruptionException', 'GatheringByteChannel', 'IllegalBlockingModeException', 'IllegalSelectorException', 'InterruptibleChannel', 'NoConnectionPendingException', 'NonReadableChannelException', 'NonWritableChannelException', 'NotYetBoundException', 'NotYetConnectedException', 'OverlappingFileLockException', 'Pipe', 'Pipe.SinkChannel', 'Pipe.SourceChannel', 'ReadableByteChannel', 'ScatteringByteChannel', 'SelectableChannel', 'SelectionKey', 'Selector', 'ServerSocketChannel', 'SocketChannel', 'UnresolvedAddressException', 'UnsupportedAddressTypeException', 'WritableByteChannel'
            +            ),
            +        31 => array (
            +            'AbstractInterruptibleChannel', 'AbstractSelectableChannel', 'AbstractSelectionKey', 'AbstractSelector', 'SelectorProvider'
            +            ),
            +        32 => array (
            +            'CharacterCodingException', 'Charset', 'CharsetDecoder', 'CharsetEncoder', 'CoderMalfunctionError', 'CoderResult', 'CodingErrorAction', 'IllegalCharsetNameException', 'MalformedInputException', 'UnmappableCharacterException', 'UnsupportedCharsetException'
            +            ),
            +        33 => array (
            +            'CharsetProvider'
            +            ),
            +        34 => array (
            +            'AccessException', 'AlreadyBoundException', 'ConnectIOException', 'MarshalException', 'MarshalledObject', 'Naming', 'NoSuchObjectException', 'NotBoundException', 'RMISecurityException', 'RMISecurityManager', 'Remote', 'RemoteException', 'ServerError', 'ServerException', 'ServerRuntimeException', 'StubNotFoundException', 'UnexpectedException', 'UnmarshalException'
            +            ),
            +        35 => array (
            +            'Activatable', 'ActivateFailedException', 'ActivationDesc', 'ActivationException', 'ActivationGroup', 'ActivationGroupDesc', 'ActivationGroupDesc.CommandEnvironment', 'ActivationGroupID', 'ActivationGroup_Stub', 'ActivationID', 'ActivationInstantiator', 'ActivationMonitor', 'ActivationSystem', 'Activator', 'UnknownGroupException', 'UnknownObjectException'
            +            ),
            +        36 => array (
            +            'DGC', 'Lease', 'VMID'
            +            ),
            +        37 => array (
            +            'LocateRegistry', 'Registry', 'RegistryHandler'
            +            ),
            +        38 => array (
            +            'ExportException', 'LoaderHandler', 'LogStream', 'ObjID', 'Operation', 'RMIClassLoader', 'RMIClassLoaderSpi', 'RMIClientSocketFactory', 'RMIFailureHandler', 'RMIServerSocketFactory', 'RMISocketFactory', 'RemoteCall', 'RemoteObject', 'RemoteObjectInvocationHandler', 'RemoteRef', 'RemoteServer', 'RemoteStub', 'ServerCloneException', 'ServerNotActiveException', 'ServerRef', 'Skeleton', 'SkeletonMismatchException', 'SkeletonNotFoundException', 'SocketSecurityException', 'UID', 'UnicastRemoteObject', 'Unreferenced'
            +            ),
            +        39 => array (
            +            'AccessControlContext', 'AccessControlException', 'AccessController', 'AlgorithmParameterGenerator', 'AlgorithmParameterGeneratorSpi', 'AlgorithmParameters', 'AlgorithmParametersSpi', 'AllPermission', 'AuthProvider', 'BasicPermission', 'CodeSigner', 'CodeSource', 'DigestException', 'DigestInputStream', 'DigestOutputStream', 'DomainCombiner', 'GeneralSecurityException', 'Guard', 'GuardedObject', 'Identity', 'IdentityScope', 'InvalidAlgorithmParameterException', 'InvalidParameterException', 'Key', 'KeyException', 'KeyFactory', 'KeyFactorySpi', 'KeyManagementException', 'KeyPair', 'KeyPairGenerator', 'KeyPairGeneratorSpi', 'KeyRep', 'KeyRep.Type', 'KeyStore', 'KeyStore.Builder', 'KeyStore.CallbackHandlerProtection', 'KeyStore.Entry', 'KeyStore.LoadStoreParameter', 'KeyStore.PasswordProtection', 'KeyStore.PrivateKeyEntry', 'KeyStore.ProtectionParameter', 'KeyStore.SecretKeyEntry', 'KeyStore.TrustedCertificateEntry', 'KeyStoreException', 'KeyStoreSpi', 'MessageDigest', 'MessageDigestSpi',
            +            'NoSuchAlgorithmException', 'NoSuchProviderException', 'PermissionCollection', 'Permissions', 'PrivateKey', 'PrivilegedAction', 'PrivilegedActionException', 'PrivilegedExceptionAction', 'ProtectionDomain', 'Provider', 'Provider.Service', 'ProviderException', 'PublicKey', 'SecureClassLoader', 'SecureRandom', 'SecureRandomSpi', 'Security', 'SecurityPermission', 'Signature', 'SignatureException', 'SignatureSpi', 'SignedObject', 'Signer', 'UnrecoverableEntryException', 'UnrecoverableKeyException', 'UnresolvedPermission'
            +            ),
            +        40 => array (
            +            'Acl', 'AclEntry', 'AclNotFoundException', 'Group', 'LastOwnerException', 'NotOwnerException', 'Owner'
            +            ),
            +        41 => array (
            +            'CRL', 'CRLException', 'CRLSelector', 'CertPath', 'CertPath.CertPathRep', 'CertPathBuilder', 'CertPathBuilderException', 'CertPathBuilderResult', 'CertPathBuilderSpi', 'CertPathParameters', 'CertPathValidator', 'CertPathValidatorException', 'CertPathValidatorResult', 'CertPathValidatorSpi', 'CertSelector', 'CertStore', 'CertStoreException', 'CertStoreParameters', 'CertStoreSpi', 'Certificate.CertificateRep', 'CertificateFactory', 'CertificateFactorySpi', 'CollectionCertStoreParameters', 'LDAPCertStoreParameters', 'PKIXBuilderParameters', 'PKIXCertPathBuilderResult', 'PKIXCertPathChecker', 'PKIXCertPathValidatorResult', 'PKIXParameters', 'PolicyNode', 'PolicyQualifierInfo', 'TrustAnchor', 'X509CRL', 'X509CRLEntry', 'X509CRLSelector', 'X509CertSelector', 'X509Extension'
            +            ),
            +        42 => array (
            +            'DSAKey', 'DSAKeyPairGenerator', 'DSAParams', 'DSAPrivateKey', 'DSAPublicKey', 'ECKey', 'ECPrivateKey', 'ECPublicKey', 'RSAKey', 'RSAMultiPrimePrivateCrtKey', 'RSAPrivateCrtKey', 'RSAPrivateKey', 'RSAPublicKey'
            +            ),
            +        43 => array (
            +            'AlgorithmParameterSpec', 'DSAParameterSpec', 'DSAPrivateKeySpec', 'DSAPublicKeySpec', 'ECField', 'ECFieldF2m', 'ECFieldFp', 'ECGenParameterSpec', 'ECParameterSpec', 'ECPoint', 'ECPrivateKeySpec', 'ECPublicKeySpec', 'EllipticCurve', 'EncodedKeySpec', 'InvalidKeySpecException', 'InvalidParameterSpecException', 'KeySpec', 'MGF1ParameterSpec', 'PKCS8EncodedKeySpec', 'PSSParameterSpec', 'RSAKeyGenParameterSpec', 'RSAMultiPrimePrivateCrtKeySpec', 'RSAOtherPrimeInfo', 'RSAPrivateCrtKeySpec', 'RSAPrivateKeySpec', 'RSAPublicKeySpec', 'X509EncodedKeySpec'
            +            ),
            +        44 => array (
            +            'BatchUpdateException', 'Blob', 'CallableStatement', 'Clob', 'Connection', 'DataTruncation', 'DatabaseMetaData', 'Driver', 'DriverManager', 'DriverPropertyInfo', 'ParameterMetaData', 'PreparedStatement', 'Ref', 'ResultSet', 'ResultSetMetaData', 'SQLData', 'SQLException', 'SQLInput', 'SQLOutput', 'SQLPermission', 'SQLWarning', 'Savepoint', 'Struct', 'Time', 'Types'
            +            ),
            +        45 => array (
            +            'AttributedCharacterIterator', 'AttributedCharacterIterator.Attribute', 'AttributedString', 'Bidi', 'BreakIterator', 'CharacterIterator', 'ChoiceFormat', 'CollationElementIterator', 'CollationKey', 'Collator', 'DateFormat', 'DateFormat.Field', 'DateFormatSymbols', 'DecimalFormat', 'DecimalFormatSymbols', 'FieldPosition', 'Format', 'Format.Field', 'MessageFormat', 'MessageFormat.Field', 'NumberFormat', 'NumberFormat.Field', 'ParseException', 'ParsePosition', 'RuleBasedCollator', 'SimpleDateFormat', 'StringCharacterIterator'
            +            ),
            +        46 => array (
            +            'AbstractCollection', 'AbstractList', 'AbstractMap', 'AbstractQueue', 'AbstractSequentialList', 'AbstractSet', 'ArrayList', 'Arrays', 'BitSet', 'Calendar', 'Collection', 'Collections', 'Comparator', 'ConcurrentModificationException', 'Currency', 'Dictionary', 'DuplicateFormatFlagsException', 'EmptyStackException', 'EnumMap', 'EnumSet', 'Enumeration', 'EventListenerProxy', 'EventObject', 'FormatFlagsConversionMismatchException', 'Formattable', 'FormattableFlags', 'Formatter.BigDecimalLayoutForm', 'FormatterClosedException', 'GregorianCalendar', 'HashMap', 'HashSet', 'Hashtable', 'IdentityHashMap', 'IllegalFormatCodePointException', 'IllegalFormatConversionException', 'IllegalFormatException', 'IllegalFormatFlagsException', 'IllegalFormatPrecisionException', 'IllegalFormatWidthException', 'InputMismatchException', 'InvalidPropertiesFormatException', 'Iterator', 'LinkedHashMap', 'LinkedHashSet', 'LinkedList', 'ListIterator', 'ListResourceBundle', 'Locale', 'Map', 'Map.Entry', 'MissingFormatArgumentException',
            +            'MissingFormatWidthException', 'MissingResourceException', 'NoSuchElementException', 'Observable', 'Observer', 'PriorityQueue', 'Properties', 'PropertyPermission', 'PropertyResourceBundle', 'Queue', 'Random', 'RandomAccess', 'ResourceBundle', 'Scanner', 'Set', 'SimpleTimeZone', 'SortedMap', 'SortedSet', 'Stack', 'StringTokenizer', 'TimeZone', 'TimerTask', 'TooManyListenersException', 'TreeMap', 'TreeSet', 'UUID', 'UnknownFormatConversionException', 'UnknownFormatFlagsException', 'Vector', 'WeakHashMap'
            +            ),
            +        47 => array (
            +            'AbstractExecutorService', 'ArrayBlockingQueue', 'BlockingQueue', 'BrokenBarrierException', 'Callable', 'CancellationException', 'CompletionService', 'ConcurrentHashMap', 'ConcurrentLinkedQueue', 'ConcurrentMap', 'CopyOnWriteArrayList', 'CopyOnWriteArraySet', 'CountDownLatch', 'CyclicBarrier', 'DelayQueue', 'Delayed', 'Exchanger', 'ExecutionException', 'Executor', 'ExecutorCompletionService', 'ExecutorService', 'Executors', 'Future', 'FutureTask', 'LinkedBlockingQueue', 'PriorityBlockingQueue', 'RejectedExecutionException', 'RejectedExecutionHandler', 'ScheduledExecutorService', 'ScheduledFuture', 'ScheduledThreadPoolExecutor', 'Semaphore', 'SynchronousQueue', 'ThreadFactory', 'ThreadPoolExecutor', 'ThreadPoolExecutor.AbortPolicy', 'ThreadPoolExecutor.CallerRunsPolicy', 'ThreadPoolExecutor.DiscardOldestPolicy', 'ThreadPoolExecutor.DiscardPolicy', 'TimeUnit', 'TimeoutException'
            +            ),
            +        48 => array (
            +            'AtomicBoolean', 'AtomicInteger', 'AtomicIntegerArray', 'AtomicIntegerFieldUpdater', 'AtomicLong', 'AtomicLongArray', 'AtomicLongFieldUpdater', 'AtomicMarkableReference', 'AtomicReference', 'AtomicReferenceArray', 'AtomicReferenceFieldUpdater', 'AtomicStampedReference'
            +            ),
            +        49 => array (
            +            'AbstractQueuedSynchronizer', 'Condition', 'Lock', 'LockSupport', 'ReadWriteLock', 'ReentrantLock', 'ReentrantReadWriteLock', 'ReentrantReadWriteLock.ReadLock', 'ReentrantReadWriteLock.WriteLock'
            +            ),
            +        50 => array (
            +            'Attributes.Name', 'JarEntry', 'JarException', 'JarFile', 'JarInputStream', 'JarOutputStream', 'Manifest', 'Pack200', 'Pack200.Packer', 'Pack200.Unpacker'
            +            ),
            +        51 => array (
            +            'ConsoleHandler', 'ErrorManager', 'FileHandler', 'Filter', 'Handler', 'Level', 'LogManager', 'LogRecord', 'Logger', 'LoggingMXBean', 'LoggingPermission', 'MemoryHandler', 'SimpleFormatter', 'SocketHandler', 'StreamHandler', 'XMLFormatter'
            +            ),
            +        52 => array (
            +            'AbstractPreferences', 'BackingStoreException', 'InvalidPreferencesFormatException', 'NodeChangeEvent', 'NodeChangeListener', 'PreferenceChangeEvent', 'PreferenceChangeListener', 'Preferences', 'PreferencesFactory'
            +            ),
            +        53 => array (
            +            'MatchResult', 'Matcher', 'Pattern', 'PatternSyntaxException'
            +            ),
            +        54 => array (
            +            'Adler32', 'CRC32', 'CheckedInputStream', 'CheckedOutputStream', 'Checksum', 'DataFormatException', 'Deflater', 'DeflaterOutputStream', 'GZIPInputStream', 'GZIPOutputStream', 'Inflater', 'InflaterInputStream', 'ZipEntry', 'ZipException', 'ZipFile', 'ZipInputStream', 'ZipOutputStream'
            +            ),
            +        55 => array (
            +            'Accessible', 'AccessibleAction', 'AccessibleAttributeSequence', 'AccessibleBundle', 'AccessibleComponent', 'AccessibleContext', 'AccessibleEditableText', 'AccessibleExtendedComponent', 'AccessibleExtendedTable', 'AccessibleExtendedText', 'AccessibleHyperlink', 'AccessibleHypertext', 'AccessibleIcon', 'AccessibleKeyBinding', 'AccessibleRelation', 'AccessibleRelationSet', 'AccessibleResourceBundle', 'AccessibleRole', 'AccessibleSelection', 'AccessibleState', 'AccessibleStateSet', 'AccessibleStreamable', 'AccessibleTable', 'AccessibleTableModelChange', 'AccessibleText', 'AccessibleTextSequence', 'AccessibleValue'
            +            ),
            +        56 => array (
            +            'ActivityCompletedException', 'ActivityRequiredException', 'InvalidActivityException'
            +            ),
            +        57 => array (
            +            'BadPaddingException', 'Cipher', 'CipherInputStream', 'CipherOutputStream', 'CipherSpi', 'EncryptedPrivateKeyInfo', 'ExemptionMechanism', 'ExemptionMechanismException', 'ExemptionMechanismSpi', 'IllegalBlockSizeException', 'KeyAgreement', 'KeyAgreementSpi', 'KeyGenerator', 'KeyGeneratorSpi', 'Mac', 'MacSpi', 'NoSuchPaddingException', 'NullCipher', 'SealedObject', 'SecretKey', 'SecretKeyFactory', 'SecretKeyFactorySpi', 'ShortBufferException'
            +            ),
            +        58 => array (
            +            'DHKey', 'DHPrivateKey', 'DHPublicKey', 'PBEKey'
            +            ),
            +        59 => array (
            +            'DESKeySpec', 'DESedeKeySpec', 'DHGenParameterSpec', 'DHParameterSpec', 'DHPrivateKeySpec', 'DHPublicKeySpec', 'IvParameterSpec', 'OAEPParameterSpec', 'PBEKeySpec', 'PBEParameterSpec', 'PSource', 'PSource.PSpecified', 'RC2ParameterSpec', 'RC5ParameterSpec', 'SecretKeySpec'
            +            ),
            +        60 => array (
            +            'IIOException', 'IIOImage', 'IIOParam', 'IIOParamController', 'ImageIO', 'ImageReadParam', 'ImageReader', 'ImageTranscoder', 'ImageTypeSpecifier', 'ImageWriteParam', 'ImageWriter'
            +            ),
            +        61 => array (
            +            'IIOReadProgressListener', 'IIOReadUpdateListener', 'IIOReadWarningListener', 'IIOWriteProgressListener', 'IIOWriteWarningListener'
            +            ),
            +        62 => array (
            +            'IIOInvalidTreeException', 'IIOMetadata', 'IIOMetadataController', 'IIOMetadataFormat', 'IIOMetadataFormatImpl', 'IIOMetadataNode'
            +            ),
            +        63 => array (
            +            'BMPImageWriteParam'
            +            ),
            +        64 => array (
            +            'JPEGHuffmanTable', 'JPEGImageReadParam', 'JPEGImageWriteParam', 'JPEGQTable'
            +            ),
            +        65 => array (
            +            'IIORegistry', 'IIOServiceProvider', 'ImageInputStreamSpi', 'ImageOutputStreamSpi', 'ImageReaderSpi', 'ImageReaderWriterSpi', 'ImageTranscoderSpi', 'ImageWriterSpi', 'RegisterableService', 'ServiceRegistry', 'ServiceRegistry.Filter'
            +            ),
            +        66 => array (
            +            'FileCacheImageInputStream', 'FileCacheImageOutputStream', 'FileImageInputStream', 'FileImageOutputStream', 'IIOByteBuffer', 'ImageInputStream', 'ImageInputStreamImpl', 'ImageOutputStream', 'ImageOutputStreamImpl', 'MemoryCacheImageInputStream', 'MemoryCacheImageOutputStream'
            +            ),
            +        67 => array (
            +            'AttributeChangeNotification', 'AttributeChangeNotificationFilter', 'AttributeNotFoundException', 'AttributeValueExp', 'BadAttributeValueExpException', 'BadBinaryOpValueExpException', 'BadStringOperationException', 'Descriptor', 'DescriptorAccess', 'DynamicMBean', 'InstanceAlreadyExistsException', 'InstanceNotFoundException', 'InvalidApplicationException', 'JMException', 'JMRuntimeException', 'ListenerNotFoundException', 'MBeanAttributeInfo', 'MBeanConstructorInfo', 'MBeanException', 'MBeanFeatureInfo', 'MBeanInfo', 'MBeanNotificationInfo', 'MBeanOperationInfo', 'MBeanParameterInfo', 'MBeanPermission', 'MBeanRegistration', 'MBeanRegistrationException', 'MBeanServer', 'MBeanServerBuilder', 'MBeanServerConnection', 'MBeanServerDelegate', 'MBeanServerDelegateMBean', 'MBeanServerFactory', 'MBeanServerInvocationHandler', 'MBeanServerNotification', 'MBeanServerPermission', 'MBeanTrustPermission', 'MalformedObjectNameException', 'NotCompliantMBeanException', 'Notification', 'NotificationBroadcaster',
            +            'NotificationBroadcasterSupport', 'NotificationEmitter', 'NotificationFilter', 'NotificationFilterSupport', 'NotificationListener', 'ObjectInstance', 'ObjectName', 'OperationsException', 'PersistentMBean', 'Query', 'QueryEval', 'QueryExp', 'ReflectionException', 'RuntimeErrorException', 'RuntimeMBeanException', 'RuntimeOperationsException', 'ServiceNotFoundException', 'StandardMBean', 'StringValueExp', 'ValueExp'
            +            ),
            +        68 => array (
            +            'ClassLoaderRepository', 'MLet', 'MLetMBean', 'PrivateClassLoader', 'PrivateMLet'
            +            ),
            +        69 => array (
            +            'DescriptorSupport', 'InvalidTargetObjectTypeException', 'ModelMBean', 'ModelMBeanAttributeInfo', 'ModelMBeanConstructorInfo', 'ModelMBeanInfo', 'ModelMBeanInfoSupport', 'ModelMBeanNotificationBroadcaster', 'ModelMBeanNotificationInfo', 'ModelMBeanOperationInfo', 'RequiredModelMBean', 'XMLParseException'
            +            ),
            +        70 => array (
            +            'CounterMonitor', 'CounterMonitorMBean', 'GaugeMonitor', 'GaugeMonitorMBean', 'Monitor', 'MonitorMBean', 'MonitorNotification', 'MonitorSettingException', 'StringMonitor', 'StringMonitorMBean'
            +            ),
            +        71 => array (
            +            'ArrayType', 'CompositeData', 'CompositeDataSupport', 'CompositeType', 'InvalidOpenTypeException', 'KeyAlreadyExistsException', 'OpenDataException', 'OpenMBeanAttributeInfo', 'OpenMBeanAttributeInfoSupport', 'OpenMBeanConstructorInfo', 'OpenMBeanConstructorInfoSupport', 'OpenMBeanInfo', 'OpenMBeanInfoSupport', 'OpenMBeanOperationInfo', 'OpenMBeanOperationInfoSupport', 'OpenMBeanParameterInfo', 'OpenMBeanParameterInfoSupport', 'SimpleType', 'TabularData', 'TabularDataSupport', 'TabularType'
            +            ),
            +        72 => array (
            +            'InvalidRelationIdException', 'InvalidRelationServiceException', 'InvalidRelationTypeException', 'InvalidRoleInfoException', 'InvalidRoleValueException', 'MBeanServerNotificationFilter', 'Relation', 'RelationException', 'RelationNotFoundException', 'RelationNotification', 'RelationService', 'RelationServiceMBean', 'RelationServiceNotRegisteredException', 'RelationSupport', 'RelationSupportMBean', 'RelationType', 'RelationTypeNotFoundException', 'RelationTypeSupport', 'Role', 'RoleInfo', 'RoleInfoNotFoundException', 'RoleList', 'RoleNotFoundException', 'RoleResult', 'RoleStatus', 'RoleUnresolved', 'RoleUnresolvedList'
            +            ),
            +        73 => array (
            +            'JMXAuthenticator', 'JMXConnectionNotification', 'JMXConnector', 'JMXConnectorFactory', 'JMXConnectorProvider', 'JMXConnectorServer', 'JMXConnectorServerFactory', 'JMXConnectorServerMBean', 'JMXConnectorServerProvider', 'JMXPrincipal', 'JMXProviderException', 'JMXServerErrorException', 'JMXServiceURL', 'MBeanServerForwarder', 'NotificationResult', 'SubjectDelegationPermission', 'TargetedNotification'
            +            ),
            +        74 => array (
            +            'RMIConnection', 'RMIConnectionImpl', 'RMIConnectionImpl_Stub', 'RMIConnector', 'RMIConnectorServer', 'RMIIIOPServerImpl', 'RMIJRMPServerImpl', 'RMIServer', 'RMIServerImpl', 'RMIServerImpl_Stub'
            +            ),
            +        75 => array (
            +            'TimerAlarmClockNotification', 'TimerMBean', 'TimerNotification'
            +            ),
            +        76 => array (
            +            'AuthenticationNotSupportedException', 'BinaryRefAddr', 'CannotProceedException', 'CommunicationException', 'CompositeName', 'CompoundName', 'ConfigurationException', 'ContextNotEmptyException', 'InitialContext', 'InsufficientResourcesException', 'InterruptedNamingException', 'InvalidNameException', 'LimitExceededException', 'LinkException', 'LinkLoopException', 'LinkRef', 'MalformedLinkException', 'Name', 'NameAlreadyBoundException', 'NameClassPair', 'NameNotFoundException', 'NameParser', 'NamingEnumeration', 'NamingException', 'NamingSecurityException', 'NoInitialContextException', 'NoPermissionException', 'NotContextException', 'OperationNotSupportedException', 'PartialResultException', 'RefAddr', 'Referenceable', 'ReferralException', 'ServiceUnavailableException', 'SizeLimitExceededException', 'StringRefAddr', 'TimeLimitExceededException'
            +            ),
            +        77 => array (
            +            'AttributeInUseException', 'AttributeModificationException', 'BasicAttribute', 'BasicAttributes', 'DirContext', 'InitialDirContext', 'InvalidAttributeIdentifierException', 'InvalidAttributesException', 'InvalidSearchControlsException', 'InvalidSearchFilterException', 'ModificationItem', 'NoSuchAttributeException', 'SchemaViolationException', 'SearchControls', 'SearchResult'
            +            ),
            +        78 => array (
            +            'EventContext', 'EventDirContext', 'NamespaceChangeListener', 'NamingEvent', 'NamingExceptionEvent', 'NamingListener', 'ObjectChangeListener'
            +            ),
            +        79 => array (
            +            'BasicControl', 'ControlFactory', 'ExtendedRequest', 'ExtendedResponse', 'HasControls', 'InitialLdapContext', 'LdapContext', 'LdapName', 'LdapReferralException', 'ManageReferralControl', 'PagedResultsControl', 'PagedResultsResponseControl', 'Rdn', 'SortControl', 'SortKey', 'SortResponseControl', 'StartTlsRequest', 'StartTlsResponse', 'UnsolicitedNotification', 'UnsolicitedNotificationEvent', 'UnsolicitedNotificationListener'
            +            ),
            +        80 => array (
            +            'DirObjectFactory', 'DirStateFactory', 'DirStateFactory.Result', 'DirectoryManager', 'InitialContextFactory', 'InitialContextFactoryBuilder', 'NamingManager', 'ObjectFactory', 'ObjectFactoryBuilder', 'ResolveResult', 'Resolver', 'StateFactory'
            +            ),
            +        81 => array (
            +            'ServerSocketFactory', 'SocketFactory'
            +            ),
            +        82 => array (
            +            'CertPathTrustManagerParameters', 'HandshakeCompletedEvent', 'HandshakeCompletedListener', 'HostnameVerifier', 'HttpsURLConnection', 'KeyManager', 'KeyManagerFactory', 'KeyManagerFactorySpi', 'KeyStoreBuilderParameters', 'ManagerFactoryParameters', 'SSLContext', 'SSLContextSpi', 'SSLEngine', 'SSLEngineResult', 'SSLEngineResult.HandshakeStatus', 'SSLEngineResult.Status', 'SSLException', 'SSLHandshakeException', 'SSLKeyException', 'SSLPeerUnverifiedException', 'SSLPermission', 'SSLProtocolException', 'SSLServerSocket', 'SSLServerSocketFactory', 'SSLSession', 'SSLSessionBindingEvent', 'SSLSessionBindingListener', 'SSLSessionContext', 'SSLSocket', 'SSLSocketFactory', 'TrustManager', 'TrustManagerFactory', 'TrustManagerFactorySpi', 'X509ExtendedKeyManager', 'X509KeyManager', 'X509TrustManager'
            +            ),
            +        83 => array (
            +            'AttributeException', 'CancelablePrintJob', 'Doc', 'DocFlavor', 'DocFlavor.BYTE_ARRAY', 'DocFlavor.CHAR_ARRAY', 'DocFlavor.INPUT_STREAM', 'DocFlavor.READER', 'DocFlavor.SERVICE_FORMATTED', 'DocFlavor.STRING', 'DocFlavor.URL', 'DocPrintJob', 'FlavorException', 'MultiDoc', 'MultiDocPrintJob', 'MultiDocPrintService', 'PrintException', 'PrintService', 'PrintServiceLookup', 'ServiceUI', 'ServiceUIFactory', 'SimpleDoc', 'StreamPrintService', 'StreamPrintServiceFactory', 'URIException'
            +            ),
            +        84 => array (
            +            'AttributeSetUtilities', 'DateTimeSyntax', 'DocAttribute', 'DocAttributeSet', 'EnumSyntax', 'HashAttributeSet', 'HashDocAttributeSet', 'HashPrintJobAttributeSet', 'HashPrintRequestAttributeSet', 'HashPrintServiceAttributeSet', 'IntegerSyntax', 'PrintJobAttribute', 'PrintJobAttributeSet', 'PrintRequestAttribute', 'PrintRequestAttributeSet', 'PrintServiceAttribute', 'PrintServiceAttributeSet', 'ResolutionSyntax', 'SetOfIntegerSyntax', 'Size2DSyntax', 'SupportedValuesAttribute', 'TextSyntax', 'URISyntax', 'UnmodifiableSetException'
            +            ),
            +        85 => array (
            +            'Chromaticity', 'ColorSupported', 'Compression', 'Copies', 'CopiesSupported', 'DateTimeAtCompleted', 'DateTimeAtCreation', 'DateTimeAtProcessing', 'Destination', 'DocumentName', 'Fidelity', 'Finishings', 'JobHoldUntil', 'JobImpressions', 'JobImpressionsCompleted', 'JobImpressionsSupported', 'JobKOctets', 'JobKOctetsProcessed', 'JobKOctetsSupported', 'JobMediaSheets', 'JobMediaSheetsCompleted', 'JobMediaSheetsSupported', 'JobMessageFromOperator', 'JobName', 'JobOriginatingUserName', 'JobPriority', 'JobPrioritySupported', 'JobSheets', 'JobState', 'JobStateReason', 'JobStateReasons', 'Media', 'MediaName', 'MediaPrintableArea', 'MediaSize', 'MediaSize.Engineering', 'MediaSize.ISO', 'MediaSize.JIS', 'MediaSize.NA', 'MediaSize.Other', 'MediaSizeName', 'MediaTray', 'MultipleDocumentHandling', 'NumberOfDocuments', 'NumberOfInterveningJobs', 'NumberUp', 'NumberUpSupported', 'OrientationRequested', 'OutputDeviceAssigned', 'PDLOverrideSupported', 'PageRanges', 'PagesPerMinute', 'PagesPerMinuteColor',
            +            'PresentationDirection', 'PrintQuality', 'PrinterInfo', 'PrinterIsAcceptingJobs', 'PrinterLocation', 'PrinterMakeAndModel', 'PrinterMessageFromOperator', 'PrinterMoreInfo', 'PrinterMoreInfoManufacturer', 'PrinterName', 'PrinterResolution', 'PrinterState', 'PrinterStateReason', 'PrinterStateReasons', 'PrinterURI', 'QueuedJobCount', 'ReferenceUriSchemesSupported', 'RequestingUserName', 'Severity', 'SheetCollate', 'Sides'
            +            ),
            +        86 => array (
            +            'PrintEvent', 'PrintJobAdapter', 'PrintJobAttributeEvent', 'PrintJobAttributeListener', 'PrintJobEvent', 'PrintJobListener', 'PrintServiceAttributeEvent', 'PrintServiceAttributeListener'
            +            ),
            +        87 => array (
            +            'PortableRemoteObject'
            +            ),
            +        88 => array (
            +            'ClassDesc', 'PortableRemoteObjectDelegate', 'Stub', 'StubDelegate', 'Tie', 'Util', 'UtilDelegate', 'ValueHandler', 'ValueHandlerMultiFormat'
            +            ),
            +        89 => array (
            +            'SslRMIClientSocketFactory', 'SslRMIServerSocketFactory'
            +            ),
            +        90 => array (
            +            'AuthPermission', 'DestroyFailedException', 'Destroyable', 'PrivateCredentialPermission', 'RefreshFailedException', 'Refreshable', 'Subject', 'SubjectDomainCombiner'
            +            ),
            +        91 => array (
            +            'Callback', 'CallbackHandler', 'ChoiceCallback', 'ConfirmationCallback', 'LanguageCallback', 'NameCallback', 'PasswordCallback', 'TextInputCallback', 'TextOutputCallback', 'UnsupportedCallbackException'
            +            ),
            +        92 => array (
            +            'DelegationPermission', 'KerberosKey', 'KerberosPrincipal', 'KerberosTicket', 'ServicePermission'
            +            ),
            +        93 => array (
            +            'AccountException', 'AccountExpiredException', 'AccountLockedException', 'AccountNotFoundException', 'AppConfigurationEntry', 'AppConfigurationEntry.LoginModuleControlFlag', 'Configuration', 'CredentialException', 'CredentialExpiredException', 'CredentialNotFoundException', 'FailedLoginException', 'LoginContext', 'LoginException'
            +            ),
            +        94 => array (
            +            'LoginModule'
            +            ),
            +        95 => array (
            +            'X500Principal', 'X500PrivateCredential'
            +            ),
            +        96 => array (
            +            'AuthorizeCallback', 'RealmCallback', 'RealmChoiceCallback', 'Sasl', 'SaslClient', 'SaslClientFactory', 'SaslException', 'SaslServer', 'SaslServerFactory'
            +            ),
            +        97 => array (
            +            'ControllerEventListener', 'Instrument', 'InvalidMidiDataException', 'MetaEventListener', 'MetaMessage', 'MidiChannel', 'MidiDevice', 'MidiDevice.Info', 'MidiEvent', 'MidiFileFormat', 'MidiMessage', 'MidiSystem', 'MidiUnavailableException', 'Patch', 'Receiver', 'Sequence', 'Sequencer', 'Sequencer.SyncMode', 'ShortMessage', 'Soundbank', 'SoundbankResource', 'Synthesizer', 'SysexMessage', 'Track', 'Transmitter', 'VoiceStatus'
            +            ),
            +        98 => array (
            +            'MidiDeviceProvider', 'MidiFileReader', 'MidiFileWriter', 'SoundbankReader'
            +            ),
            +        99 => array (
            +            'AudioFileFormat', 'AudioFileFormat.Type', 'AudioFormat', 'AudioFormat.Encoding', 'AudioInputStream', 'AudioPermission', 'AudioSystem', 'BooleanControl', 'BooleanControl.Type', 'Clip', 'CompoundControl', 'CompoundControl.Type', 'Control.Type', 'DataLine', 'DataLine.Info', 'EnumControl', 'EnumControl.Type', 'FloatControl', 'FloatControl.Type', 'Line', 'Line.Info', 'LineEvent', 'LineEvent.Type', 'LineListener', 'LineUnavailableException', 'Mixer', 'Mixer.Info', 'Port', 'Port.Info', 'ReverbType', 'SourceDataLine', 'TargetDataLine', 'UnsupportedAudioFileException'
            +            ),
            +        100 => array (
            +            'AudioFileReader', 'AudioFileWriter', 'FormatConversionProvider', 'MixerProvider'
            +            ),
            +        101 => array (
            +            'ConnectionEvent', 'ConnectionEventListener', 'ConnectionPoolDataSource', 'DataSource', 'PooledConnection', 'RowSet', 'RowSetEvent', 'RowSetInternal', 'RowSetListener', 'RowSetMetaData', 'RowSetReader', 'RowSetWriter', 'XAConnection', 'XADataSource'
            +            ),
            +        102 => array (
            +            'BaseRowSet', 'CachedRowSet', 'FilteredRowSet', 'JdbcRowSet', 'JoinRowSet', 'Joinable', 'Predicate', 'RowSetMetaDataImpl', 'RowSetWarning', 'WebRowSet'
            +            ),
            +        103 => array (
            +            'SQLInputImpl', 'SQLOutputImpl', 'SerialArray', 'SerialBlob', 'SerialClob', 'SerialDatalink', 'SerialException', 'SerialJavaObject', 'SerialRef', 'SerialStruct'
            +            ),
            +        104 => array (
            +            'SyncFactory', 'SyncFactoryException', 'SyncProvider', 'SyncProviderException', 'SyncResolver', 'TransactionalWriter', 'XmlReader', 'XmlWriter'
            +            ),
            +        105 => array (
            +            'AbstractAction', 'AbstractButton', 'AbstractCellEditor', 'AbstractListModel', 'AbstractSpinnerModel', 'Action', 'ActionMap', 'BorderFactory', 'BoundedRangeModel', 'Box', 'Box.Filler', 'BoxLayout', 'ButtonGroup', 'ButtonModel', 'CellEditor', 'CellRendererPane', 'ComboBoxEditor', 'ComboBoxModel', 'ComponentInputMap', 'DebugGraphics', 'DefaultBoundedRangeModel', 'DefaultButtonModel', 'DefaultCellEditor', 'DefaultComboBoxModel', 'DefaultDesktopManager', 'DefaultFocusManager', 'DefaultListCellRenderer', 'DefaultListCellRenderer.UIResource', 'DefaultListModel', 'DefaultListSelectionModel', 'DefaultSingleSelectionModel', 'DesktopManager', 'FocusManager', 'GrayFilter', 'Icon', 'ImageIcon', 'InputMap', 'InputVerifier', 'InternalFrameFocusTraversalPolicy', 'JApplet', 'JButton', 'JCheckBox', 'JCheckBoxMenuItem', 'JColorChooser', 'JComboBox', 'JComboBox.KeySelectionManager', 'JComponent', 'JDesktopPane', 'JDialog', 'JEditorPane', 'JFileChooser', 'JFormattedTextField', 'JFormattedTextField.AbstractFormatter',
            +            'JFormattedTextField.AbstractFormatterFactory', 'JFrame', 'JInternalFrame', 'JInternalFrame.JDesktopIcon', 'JLabel', 'JLayeredPane', 'JList', 'JMenu', 'JMenuBar', 'JMenuItem', 'JOptionPane', 'JPanel', 'JPasswordField', 'JPopupMenu', 'JPopupMenu.Separator', 'JProgressBar', 'JRadioButton', 'JRadioButtonMenuItem', 'JRootPane', 'JScrollBar', 'JScrollPane', 'JSeparator', 'JSlider', 'JSpinner', 'JSpinner.DateEditor', 'JSpinner.DefaultEditor', 'JSpinner.ListEditor', 'JSpinner.NumberEditor', 'JSplitPane', 'JTabbedPane', 'JTable', 'JTable.PrintMode', 'JTextArea', 'JTextField', 'JTextPane', 'JToggleButton', 'JToggleButton.ToggleButtonModel', 'JToolBar', 'JToolBar.Separator', 'JToolTip', 'JTree', 'JTree.DynamicUtilTreeNode', 'JTree.EmptySelectionModel', 'JViewport', 'JWindow', 'KeyStroke', 'LayoutFocusTraversalPolicy', 'ListCellRenderer', 'ListModel', 'ListSelectionModel', 'LookAndFeel', 'MenuElement', 'MenuSelectionManager', 'MutableComboBoxModel', 'OverlayLayout', 'Popup', 'PopupFactory', 'ProgressMonitor',
            +            'ProgressMonitorInputStream', 'Renderer', 'RepaintManager', 'RootPaneContainer', 'ScrollPaneConstants', 'ScrollPaneLayout', 'ScrollPaneLayout.UIResource', 'Scrollable', 'SingleSelectionModel', 'SizeRequirements', 'SizeSequence', 'SortingFocusTraversalPolicy', 'SpinnerDateModel', 'SpinnerListModel', 'SpinnerModel', 'SpinnerNumberModel', 'Spring', 'SpringLayout', 'SpringLayout.Constraints', 'SwingConstants', 'SwingUtilities', 'ToolTipManager', 'TransferHandler', 'UIDefaults', 'UIDefaults.ActiveValue', 'UIDefaults.LazyInputMap', 'UIDefaults.LazyValue', 'UIDefaults.ProxyLazyValue', 'UIManager', 'UIManager.LookAndFeelInfo', 'UnsupportedLookAndFeelException', 'ViewportLayout', 'WindowConstants'
            +            ),
            +        106 => array (
            +            'AbstractBorder', 'BevelBorder', 'Border', 'CompoundBorder', 'EmptyBorder', 'EtchedBorder', 'LineBorder', 'MatteBorder', 'SoftBevelBorder', 'TitledBorder'
            +            ),
            +        107 => array (
            +            'AbstractColorChooserPanel', 'ColorChooserComponentFactory', 'ColorSelectionModel', 'DefaultColorSelectionModel'
            +            ),
            +        108 => array (
            +            'AncestorEvent', 'AncestorListener', 'CaretEvent', 'CaretListener', 'CellEditorListener', 'ChangeEvent', 'ChangeListener', 'DocumentEvent.ElementChange', 'DocumentEvent.EventType', 'DocumentListener', 'EventListenerList', 'HyperlinkEvent', 'HyperlinkEvent.EventType', 'HyperlinkListener', 'InternalFrameAdapter', 'InternalFrameEvent', 'InternalFrameListener', 'ListDataEvent', 'ListDataListener', 'ListSelectionEvent', 'ListSelectionListener', 'MenuDragMouseEvent', 'MenuDragMouseListener', 'MenuEvent', 'MenuKeyEvent', 'MenuKeyListener', 'MenuListener', 'MouseInputAdapter', 'MouseInputListener', 'PopupMenuEvent', 'PopupMenuListener', 'SwingPropertyChangeSupport', 'TableColumnModelEvent', 'TableColumnModelListener', 'TableModelEvent', 'TableModelListener', 'TreeExpansionEvent', 'TreeExpansionListener', 'TreeModelEvent', 'TreeModelListener', 'TreeSelectionEvent', 'TreeSelectionListener', 'TreeWillExpandListener', 'UndoableEditEvent', 'UndoableEditListener'
            +            ),
            +        109 => array (
            +            'FileSystemView', 'FileView'
            +            ),
            +        110 => array (
            +            'ActionMapUIResource', 'BorderUIResource', 'BorderUIResource.BevelBorderUIResource', 'BorderUIResource.CompoundBorderUIResource', 'BorderUIResource.EmptyBorderUIResource', 'BorderUIResource.EtchedBorderUIResource', 'BorderUIResource.LineBorderUIResource', 'BorderUIResource.MatteBorderUIResource', 'BorderUIResource.TitledBorderUIResource', 'ButtonUI', 'ColorChooserUI', 'ColorUIResource', 'ComboBoxUI', 'ComponentInputMapUIResource', 'ComponentUI', 'DesktopIconUI', 'DesktopPaneUI', 'DimensionUIResource', 'FileChooserUI', 'FontUIResource', 'IconUIResource', 'InputMapUIResource', 'InsetsUIResource', 'InternalFrameUI', 'LabelUI', 'ListUI', 'MenuBarUI', 'MenuItemUI', 'OptionPaneUI', 'PanelUI', 'PopupMenuUI', 'ProgressBarUI', 'RootPaneUI', 'ScrollBarUI', 'ScrollPaneUI', 'SeparatorUI', 'SliderUI', 'SpinnerUI', 'SplitPaneUI', 'TabbedPaneUI', 'TableHeaderUI', 'TableUI', 'TextUI', 'ToolBarUI', 'ToolTipUI', 'TreeUI', 'UIResource', 'ViewportUI'
            +            ),
            +        111 => array (
            +            'BasicArrowButton', 'BasicBorders', 'BasicBorders.ButtonBorder', 'BasicBorders.FieldBorder', 'BasicBorders.MarginBorder', 'BasicBorders.MenuBarBorder', 'BasicBorders.RadioButtonBorder', 'BasicBorders.RolloverButtonBorder', 'BasicBorders.SplitPaneBorder', 'BasicBorders.ToggleButtonBorder', 'BasicButtonListener', 'BasicButtonUI', 'BasicCheckBoxMenuItemUI', 'BasicCheckBoxUI', 'BasicColorChooserUI', 'BasicComboBoxEditor', 'BasicComboBoxEditor.UIResource', 'BasicComboBoxRenderer', 'BasicComboBoxRenderer.UIResource', 'BasicComboBoxUI', 'BasicComboPopup', 'BasicDesktopIconUI', 'BasicDesktopPaneUI', 'BasicDirectoryModel', 'BasicEditorPaneUI', 'BasicFileChooserUI', 'BasicFormattedTextFieldUI', 'BasicGraphicsUtils', 'BasicHTML', 'BasicIconFactory', 'BasicInternalFrameTitlePane', 'BasicInternalFrameUI', 'BasicLabelUI', 'BasicListUI', 'BasicLookAndFeel', 'BasicMenuBarUI', 'BasicMenuItemUI', 'BasicMenuUI', 'BasicOptionPaneUI', 'BasicOptionPaneUI.ButtonAreaLayout', 'BasicPanelUI', 'BasicPasswordFieldUI',
            +            'BasicPopupMenuSeparatorUI', 'BasicPopupMenuUI', 'BasicProgressBarUI', 'BasicRadioButtonMenuItemUI', 'BasicRadioButtonUI', 'BasicRootPaneUI', 'BasicScrollBarUI', 'BasicScrollPaneUI', 'BasicSeparatorUI', 'BasicSliderUI', 'BasicSpinnerUI', 'BasicSplitPaneDivider', 'BasicSplitPaneUI', 'BasicTabbedPaneUI', 'BasicTableHeaderUI', 'BasicTableUI', 'BasicTextAreaUI', 'BasicTextFieldUI', 'BasicTextPaneUI', 'BasicTextUI', 'BasicTextUI.BasicCaret', 'BasicTextUI.BasicHighlighter', 'BasicToggleButtonUI', 'BasicToolBarSeparatorUI', 'BasicToolBarUI', 'BasicToolTipUI', 'BasicTreeUI', 'BasicViewportUI', 'ComboPopup', 'DefaultMenuLayout'
            +            ),
            +        112 => array (
            +            'DefaultMetalTheme', 'MetalBorders', 'MetalBorders.ButtonBorder', 'MetalBorders.Flush3DBorder', 'MetalBorders.InternalFrameBorder', 'MetalBorders.MenuBarBorder', 'MetalBorders.MenuItemBorder', 'MetalBorders.OptionDialogBorder', 'MetalBorders.PaletteBorder', 'MetalBorders.PopupMenuBorder', 'MetalBorders.RolloverButtonBorder', 'MetalBorders.ScrollPaneBorder', 'MetalBorders.TableHeaderBorder', 'MetalBorders.TextFieldBorder', 'MetalBorders.ToggleButtonBorder', 'MetalBorders.ToolBarBorder', 'MetalButtonUI', 'MetalCheckBoxIcon', 'MetalCheckBoxUI', 'MetalComboBoxButton', 'MetalComboBoxEditor', 'MetalComboBoxEditor.UIResource', 'MetalComboBoxIcon', 'MetalComboBoxUI', 'MetalDesktopIconUI', 'MetalFileChooserUI', 'MetalIconFactory', 'MetalIconFactory.FileIcon16', 'MetalIconFactory.FolderIcon16', 'MetalIconFactory.PaletteCloseIcon', 'MetalIconFactory.TreeControlIcon', 'MetalIconFactory.TreeFolderIcon', 'MetalIconFactory.TreeLeafIcon', 'MetalInternalFrameTitlePane', 'MetalInternalFrameUI', 'MetalLabelUI',
            +            'MetalLookAndFeel', 'MetalMenuBarUI', 'MetalPopupMenuSeparatorUI', 'MetalProgressBarUI', 'MetalRadioButtonUI', 'MetalRootPaneUI', 'MetalScrollBarUI', 'MetalScrollButton', 'MetalScrollPaneUI', 'MetalSeparatorUI', 'MetalSliderUI', 'MetalSplitPaneUI', 'MetalTabbedPaneUI', 'MetalTextFieldUI', 'MetalTheme', 'MetalToggleButtonUI', 'MetalToolBarUI', 'MetalToolTipUI', 'MetalTreeUI', 'OceanTheme'
            +            ),
            +        113 => array (
            +            'MultiButtonUI', 'MultiColorChooserUI', 'MultiComboBoxUI', 'MultiDesktopIconUI', 'MultiDesktopPaneUI', 'MultiFileChooserUI', 'MultiInternalFrameUI', 'MultiLabelUI', 'MultiListUI', 'MultiLookAndFeel', 'MultiMenuBarUI', 'MultiMenuItemUI', 'MultiOptionPaneUI', 'MultiPanelUI', 'MultiPopupMenuUI', 'MultiProgressBarUI', 'MultiRootPaneUI', 'MultiScrollBarUI', 'MultiScrollPaneUI', 'MultiSeparatorUI', 'MultiSliderUI', 'MultiSpinnerUI', 'MultiSplitPaneUI', 'MultiTabbedPaneUI', 'MultiTableHeaderUI', 'MultiTableUI', 'MultiTextUI', 'MultiToolBarUI', 'MultiToolTipUI', 'MultiTreeUI', 'MultiViewportUI'
            +            ),
            +        114 => array (
            +            'ColorType', 'Region', 'SynthConstants', 'SynthContext', 'SynthGraphicsUtils', 'SynthLookAndFeel', 'SynthPainter', 'SynthStyle', 'SynthStyleFactory'
            +            ),
            +        115 => array (
            +            'AbstractTableModel', 'DefaultTableCellRenderer', 'DefaultTableCellRenderer.UIResource', 'DefaultTableColumnModel', 'DefaultTableModel', 'JTableHeader', 'TableCellEditor', 'TableCellRenderer', 'TableColumn', 'TableColumnModel', 'TableModel'
            +            ),
            +        116 => array (
            +            'AbstractDocument', 'AbstractDocument.AttributeContext', 'AbstractDocument.Content', 'AbstractDocument.ElementEdit', 'AbstractWriter', 'AsyncBoxView', 'AttributeSet.CharacterAttribute', 'AttributeSet.ColorAttribute', 'AttributeSet.FontAttribute', 'AttributeSet.ParagraphAttribute', 'BadLocationException', 'BoxView', 'Caret', 'ChangedCharSetException', 'ComponentView', 'CompositeView', 'DateFormatter', 'DefaultCaret', 'DefaultEditorKit', 'DefaultEditorKit.BeepAction', 'DefaultEditorKit.CopyAction', 'DefaultEditorKit.CutAction', 'DefaultEditorKit.DefaultKeyTypedAction', 'DefaultEditorKit.InsertBreakAction', 'DefaultEditorKit.InsertContentAction', 'DefaultEditorKit.InsertTabAction', 'DefaultEditorKit.PasteAction', 'DefaultFormatter', 'DefaultFormatterFactory', 'DefaultHighlighter', 'DefaultHighlighter.DefaultHighlightPainter', 'DefaultStyledDocument', 'DefaultStyledDocument.AttributeUndoableEdit', 'DefaultStyledDocument.ElementSpec', 'DefaultTextUI', 'DocumentFilter', 'DocumentFilter.FilterBypass',
            +            'EditorKit', 'ElementIterator', 'FieldView', 'FlowView', 'FlowView.FlowStrategy', 'GapContent', 'GlyphView', 'GlyphView.GlyphPainter', 'Highlighter', 'Highlighter.Highlight', 'Highlighter.HighlightPainter', 'IconView', 'InternationalFormatter', 'JTextComponent', 'JTextComponent.KeyBinding', 'Keymap', 'LabelView', 'LayeredHighlighter', 'LayeredHighlighter.LayerPainter', 'LayoutQueue', 'MaskFormatter', 'MutableAttributeSet', 'NavigationFilter', 'NavigationFilter.FilterBypass', 'NumberFormatter', 'PasswordView', 'PlainDocument', 'PlainView', 'Position', 'Position.Bias', 'Segment', 'SimpleAttributeSet', 'StringContent', 'Style', 'StyleConstants', 'StyleConstants.CharacterConstants', 'StyleConstants.ColorConstants', 'StyleConstants.FontConstants', 'StyleConstants.ParagraphConstants', 'StyleContext', 'StyledDocument', 'StyledEditorKit', 'StyledEditorKit.AlignmentAction', 'StyledEditorKit.BoldAction', 'StyledEditorKit.FontFamilyAction', 'StyledEditorKit.FontSizeAction', 'StyledEditorKit.ForegroundAction',
            +            'StyledEditorKit.ItalicAction', 'StyledEditorKit.StyledTextAction', 'StyledEditorKit.UnderlineAction', 'TabExpander', 'TabSet', 'TabStop', 'TabableView', 'TableView', 'TextAction', 'Utilities', 'View', 'ViewFactory', 'WrappedPlainView', 'ZoneView'
            +            ),
            +        117 => array (
            +            'BlockView', 'CSS', 'CSS.Attribute', 'FormSubmitEvent', 'FormSubmitEvent.MethodType', 'FormView', 'HTML', 'HTML.Attribute', 'HTML.Tag', 'HTML.UnknownTag', 'HTMLDocument', 'HTMLDocument.Iterator', 'HTMLEditorKit', 'HTMLEditorKit.HTMLFactory', 'HTMLEditorKit.HTMLTextAction', 'HTMLEditorKit.InsertHTMLTextAction', 'HTMLEditorKit.LinkController', 'HTMLEditorKit.Parser', 'HTMLEditorKit.ParserCallback', 'HTMLFrameHyperlinkEvent', 'HTMLWriter', 'ImageView', 'InlineView', 'ListView', 'MinimalHTMLWriter', 'ObjectView', 'Option', 'StyleSheet', 'StyleSheet.BoxPainter', 'StyleSheet.ListPainter'
            +            ),
            +        118 => array (
            +            'ContentModel', 'DTD', 'DTDConstants', 'DocumentParser', 'ParserDelegator', 'TagElement'
            +            ),
            +        119 => array (
            +            'RTFEditorKit'
            +            ),
            +        120 => array (
            +            'AbstractLayoutCache', 'AbstractLayoutCache.NodeDimensions', 'DefaultMutableTreeNode', 'DefaultTreeCellEditor', 'DefaultTreeCellRenderer', 'DefaultTreeModel', 'DefaultTreeSelectionModel', 'ExpandVetoException', 'FixedHeightLayoutCache', 'MutableTreeNode', 'RowMapper', 'TreeCellEditor', 'TreeCellRenderer', 'TreeModel', 'TreeNode', 'TreePath', 'TreeSelectionModel', 'VariableHeightLayoutCache'
            +            ),
            +        121 => array (
            +            'AbstractUndoableEdit', 'CannotRedoException', 'CannotUndoException', 'CompoundEdit', 'StateEdit', 'StateEditable', 'UndoManager', 'UndoableEdit', 'UndoableEditSupport'
            +            ),
            +        122 => array (
            +            'InvalidTransactionException', 'TransactionRequiredException', 'TransactionRolledbackException'
            +            ),
            +        123 => array (
            +            'XAException', 'XAResource', 'Xid'
            +            ),
            +        124 => array (
            +            'XMLConstants'
            +            ),
            +        125 => array (
            +            'DatatypeConfigurationException', 'DatatypeConstants', 'DatatypeConstants.Field', 'DatatypeFactory', 'Duration', 'XMLGregorianCalendar'
            +            ),
            +        126 => array (
            +            'NamespaceContext', 'QName'
            +            ),
            +        127 => array (
            +            'DocumentBuilder', 'DocumentBuilderFactory', 'FactoryConfigurationError', 'ParserConfigurationException', 'SAXParser', 'SAXParserFactory'
            +            ),
            +        128 => array (
            +            'ErrorListener', 'OutputKeys', 'Result', 'Source', 'SourceLocator', 'Templates', 'Transformer', 'TransformerConfigurationException', 'TransformerException', 'TransformerFactory', 'TransformerFactoryConfigurationError', 'URIResolver'
            +            ),
            +        129 => array (
            +            'DOMResult', 'DOMSource'
            +            ),
            +        130 => array (
            +            'SAXResult', 'SAXSource', 'SAXTransformerFactory', 'TemplatesHandler', 'TransformerHandler'
            +            ),
            +        131 => array (
            +            'StreamResult', 'StreamSource'
            +            ),
            +        132 => array (
            +            'Schema', 'SchemaFactory', 'SchemaFactoryLoader', 'TypeInfoProvider', 'Validator', 'ValidatorHandler'
            +            ),
            +        133 => array (
            +            'XPath', 'XPathConstants', 'XPathException', 'XPathExpression', 'XPathExpressionException', 'XPathFactory', 'XPathFactoryConfigurationException', 'XPathFunction', 'XPathFunctionException', 'XPathFunctionResolver', 'XPathVariableResolver'
            +            ),
            +        134 => array (
            +            'ChannelBinding', 'GSSContext', 'GSSCredential', 'GSSException', 'GSSManager', 'GSSName', 'MessageProp', 'Oid'
            +            ),
            +        135 => array (
            +            'ACTIVITY_COMPLETED', 'ACTIVITY_REQUIRED', 'ARG_IN', 'ARG_INOUT', 'ARG_OUT', 'Any', 'AnyHolder', 'AnySeqHolder', 'BAD_CONTEXT', 'BAD_INV_ORDER', 'BAD_OPERATION', 'BAD_PARAM', 'BAD_POLICY', 'BAD_POLICY_TYPE', 'BAD_POLICY_VALUE', 'BAD_QOS', 'BAD_TYPECODE', 'BooleanHolder', 'BooleanSeqHelper', 'BooleanSeqHolder', 'ByteHolder', 'CODESET_INCOMPATIBLE', 'COMM_FAILURE', 'CTX_RESTRICT_SCOPE', 'CharHolder', 'CharSeqHelper', 'CharSeqHolder', 'CompletionStatus', 'CompletionStatusHelper', 'ContextList', 'CurrentHolder', 'CustomMarshal', 'DATA_CONVERSION', 'DefinitionKind', 'DefinitionKindHelper', 'DomainManager', 'DomainManagerOperations', 'DoubleHolder', 'DoubleSeqHelper', 'DoubleSeqHolder', 'Environment', 'ExceptionList', 'FREE_MEM', 'FixedHolder', 'FloatHolder', 'FloatSeqHelper', 'FloatSeqHolder', 'IDLType', 'IDLTypeHelper', 'IDLTypeOperations', 'IMP_LIMIT', 'INITIALIZE', 'INTERNAL', 'INTF_REPOS', 'INVALID_ACTIVITY', 'INVALID_TRANSACTION', 'INV_FLAG', 'INV_IDENT', 'INV_OBJREF', 'INV_POLICY', 'IRObject',
            +            'IRObjectOperations', 'IdentifierHelper', 'IntHolder', 'LocalObject', 'LongHolder', 'LongLongSeqHelper', 'LongLongSeqHolder', 'LongSeqHelper', 'LongSeqHolder', 'MARSHAL', 'NO_IMPLEMENT', 'NO_MEMORY', 'NO_PERMISSION', 'NO_RESOURCES', 'NO_RESPONSE', 'NVList', 'NamedValue', 'OBJECT_NOT_EXIST', 'OBJ_ADAPTER', 'OMGVMCID', 'ObjectHelper', 'ObjectHolder', 'OctetSeqHelper', 'OctetSeqHolder', 'PERSIST_STORE', 'PRIVATE_MEMBER', 'PUBLIC_MEMBER', 'ParameterMode', 'ParameterModeHelper', 'ParameterModeHolder', 'PolicyError', 'PolicyErrorCodeHelper', 'PolicyErrorHelper', 'PolicyErrorHolder', 'PolicyHelper', 'PolicyHolder', 'PolicyListHelper', 'PolicyListHolder', 'PolicyOperations', 'PolicyTypeHelper', 'PrincipalHolder', 'REBIND', 'RepositoryIdHelper', 'Request', 'ServerRequest', 'ServiceDetail', 'ServiceDetailHelper', 'ServiceInformation', 'ServiceInformationHelper', 'ServiceInformationHolder', 'SetOverrideType', 'SetOverrideTypeHelper', 'ShortHolder', 'ShortSeqHelper', 'ShortSeqHolder', 'StringHolder',
            +            'StringSeqHelper', 'StringSeqHolder', 'StringValueHelper', 'StructMember', 'StructMemberHelper', 'SystemException', 'TCKind', 'TIMEOUT', 'TRANSACTION_MODE', 'TRANSACTION_REQUIRED', 'TRANSACTION_ROLLEDBACK', 'TRANSACTION_UNAVAILABLE', 'TRANSIENT', 'TypeCode', 'TypeCodeHolder', 'ULongLongSeqHelper', 'ULongLongSeqHolder', 'ULongSeqHelper', 'ULongSeqHolder', 'UNSUPPORTED_POLICY', 'UNSUPPORTED_POLICY_VALUE', 'UShortSeqHelper', 'UShortSeqHolder', 'UnionMember', 'UnionMemberHelper', 'UnknownUserException', 'UnknownUserExceptionHelper', 'UnknownUserExceptionHolder', 'UserException', 'VM_ABSTRACT', 'VM_CUSTOM', 'VM_NONE', 'VM_TRUNCATABLE', 'ValueBaseHelper', 'ValueBaseHolder', 'ValueMember', 'ValueMemberHelper', 'VersionSpecHelper', 'VisibilityHelper', 'WCharSeqHelper', 'WCharSeqHolder', 'WStringSeqHelper', 'WStringSeqHolder', 'WStringValueHelper', 'WrongTransaction', 'WrongTransactionHelper', 'WrongTransactionHolder', '_IDLTypeStub', '_PolicyStub'
            +            ),
            +        136 => array (
            +            'Invalid', 'InvalidSeq'
            +            ),
            +        137 => array (
            +            'BadKind'
            +            ),
            +        138 => array (
            +            'ApplicationException', 'BoxedValueHelper', 'CustomValue', 'IDLEntity', 'IndirectionException', 'InvokeHandler', 'RemarshalException', 'ResponseHandler', 'ServantObject', 'Streamable', 'StreamableValue', 'UnknownException', 'ValueBase', 'ValueFactory', 'ValueInputStream', 'ValueOutputStream'
            +            ),
            +        139 => array (
            +            'BindingHelper', 'BindingHolder', 'BindingIterator', 'BindingIteratorHelper', 'BindingIteratorHolder', 'BindingIteratorOperations', 'BindingIteratorPOA', 'BindingListHelper', 'BindingListHolder', 'BindingType', 'BindingTypeHelper', 'BindingTypeHolder', 'IstringHelper', 'NameComponent', 'NameComponentHelper', 'NameComponentHolder', 'NameHelper', 'NameHolder', 'NamingContext', 'NamingContextExt', 'NamingContextExtHelper', 'NamingContextExtHolder', 'NamingContextExtOperations', 'NamingContextExtPOA', 'NamingContextHelper', 'NamingContextHolder', 'NamingContextOperations', 'NamingContextPOA', '_BindingIteratorImplBase', '_BindingIteratorStub', '_NamingContextExtStub', '_NamingContextImplBase', '_NamingContextStub'
            +            ),
            +        140 => array (
            +            'AddressHelper', 'InvalidAddress', 'InvalidAddressHelper', 'InvalidAddressHolder', 'StringNameHelper', 'URLStringHelper'
            +            ),
            +        141 => array (
            +            'AlreadyBound', 'AlreadyBoundHelper', 'AlreadyBoundHolder', 'CannotProceed', 'CannotProceedHelper', 'CannotProceedHolder', 'InvalidNameHolder', 'NotEmpty', 'NotEmptyHelper', 'NotEmptyHolder', 'NotFound', 'NotFoundHelper', 'NotFoundHolder', 'NotFoundReason', 'NotFoundReasonHelper', 'NotFoundReasonHolder'
            +            ),
            +        142 => array (
            +            'Parameter'
            +            ),
            +        143 => array (
            +            'DynAnyFactory', 'DynAnyFactoryHelper', 'DynAnyFactoryOperations', 'DynAnyHelper', 'DynAnyOperations', 'DynAnySeqHelper', 'DynArrayHelper', 'DynArrayOperations', 'DynEnumHelper', 'DynEnumOperations', 'DynFixedHelper', 'DynFixedOperations', 'DynSequenceHelper', 'DynSequenceOperations', 'DynStructHelper', 'DynStructOperations', 'DynUnionHelper', 'DynUnionOperations', 'DynValueBox', 'DynValueBoxOperations', 'DynValueCommon', 'DynValueCommonOperations', 'DynValueHelper', 'DynValueOperations', 'NameDynAnyPair', 'NameDynAnyPairHelper', 'NameDynAnyPairSeqHelper', 'NameValuePairSeqHelper', '_DynAnyFactoryStub', '_DynAnyStub', '_DynArrayStub', '_DynEnumStub', '_DynFixedStub', '_DynSequenceStub', '_DynStructStub', '_DynUnionStub', '_DynValueStub'
            +            ),
            +        144 => array (
            +            'InconsistentTypeCodeHelper'
            +            ),
            +        145 => array (
            +            'InvalidValueHelper'
            +            ),
            +        146 => array (
            +            'CodeSets', 'Codec', 'CodecFactory', 'CodecFactoryHelper', 'CodecFactoryOperations', 'CodecOperations', 'ComponentIdHelper', 'ENCODING_CDR_ENCAPS', 'Encoding', 'ExceptionDetailMessage', 'IOR', 'IORHelper', 'IORHolder', 'MultipleComponentProfileHelper', 'MultipleComponentProfileHolder', 'ProfileIdHelper', 'RMICustomMaxStreamFormat', 'ServiceContext', 'ServiceContextHelper', 'ServiceContextHolder', 'ServiceContextListHelper', 'ServiceContextListHolder', 'ServiceIdHelper', 'TAG_ALTERNATE_IIOP_ADDRESS', 'TAG_CODE_SETS', 'TAG_INTERNET_IOP', 'TAG_JAVA_CODEBASE', 'TAG_MULTIPLE_COMPONENTS', 'TAG_ORB_TYPE', 'TAG_POLICIES', 'TAG_RMI_CUSTOM_MAX_STREAM_FORMAT', 'TaggedComponent', 'TaggedComponentHelper', 'TaggedComponentHolder', 'TaggedProfile', 'TaggedProfileHelper', 'TaggedProfileHolder', 'TransactionService'
            +            ),
            +        147 => array (
            +            'UnknownEncoding', 'UnknownEncodingHelper'
            +            ),
            +        148 => array (
            +            'FormatMismatch', 'FormatMismatchHelper', 'InvalidTypeForEncoding', 'InvalidTypeForEncodingHelper'
            +            ),
            +        149 => array (
            +            'SYNC_WITH_TRANSPORT', 'SyncScopeHelper'
            +            ),
            +        150 => array (
            +            'ACTIVE', 'AdapterManagerIdHelper', 'AdapterNameHelper', 'AdapterStateHelper', 'ClientRequestInfo', 'ClientRequestInfoOperations', 'ClientRequestInterceptor', 'ClientRequestInterceptorOperations', 'DISCARDING', 'HOLDING', 'INACTIVE', 'IORInfo', 'IORInfoOperations', 'IORInterceptor', 'IORInterceptorOperations', 'IORInterceptor_3_0', 'IORInterceptor_3_0Helper', 'IORInterceptor_3_0Holder', 'IORInterceptor_3_0Operations', 'Interceptor', 'InterceptorOperations', 'InvalidSlot', 'InvalidSlotHelper', 'LOCATION_FORWARD', 'NON_EXISTENT', 'ORBIdHelper', 'ORBInitInfo', 'ORBInitInfoOperations', 'ORBInitializer', 'ORBInitializerOperations', 'ObjectReferenceFactory', 'ObjectReferenceFactoryHelper', 'ObjectReferenceFactoryHolder', 'ObjectReferenceTemplate', 'ObjectReferenceTemplateHelper', 'ObjectReferenceTemplateHolder', 'ObjectReferenceTemplateSeqHelper', 'ObjectReferenceTemplateSeqHolder', 'PolicyFactory', 'PolicyFactoryOperations', 'RequestInfo', 'RequestInfoOperations', 'SUCCESSFUL', 'SYSTEM_EXCEPTION',
            +            'ServerIdHelper', 'ServerRequestInfo', 'ServerRequestInfoOperations', 'ServerRequestInterceptor', 'ServerRequestInterceptorOperations', 'TRANSPORT_RETRY', 'USER_EXCEPTION'
            +            ),
            +        151 => array (
            +            'DuplicateName', 'DuplicateNameHelper'
            +            ),
            +        152 => array (
            +            'AdapterActivator', 'AdapterActivatorOperations', 'ID_ASSIGNMENT_POLICY_ID', 'ID_UNIQUENESS_POLICY_ID', 'IMPLICIT_ACTIVATION_POLICY_ID', 'IdAssignmentPolicy', 'IdAssignmentPolicyOperations', 'IdAssignmentPolicyValue', 'IdUniquenessPolicy', 'IdUniquenessPolicyOperations', 'IdUniquenessPolicyValue', 'ImplicitActivationPolicy', 'ImplicitActivationPolicyOperations', 'ImplicitActivationPolicyValue', 'LIFESPAN_POLICY_ID', 'LifespanPolicy', 'LifespanPolicyOperations', 'LifespanPolicyValue', 'POA', 'POAHelper', 'POAManager', 'POAManagerOperations', 'POAOperations', 'REQUEST_PROCESSING_POLICY_ID', 'RequestProcessingPolicy', 'RequestProcessingPolicyOperations', 'RequestProcessingPolicyValue', 'SERVANT_RETENTION_POLICY_ID', 'Servant', 'ServantActivator', 'ServantActivatorHelper', 'ServantActivatorOperations', 'ServantActivatorPOA', 'ServantLocator', 'ServantLocatorHelper', 'ServantLocatorOperations', 'ServantLocatorPOA', 'ServantManager', 'ServantManagerOperations', 'ServantRetentionPolicy',
            +            'ServantRetentionPolicyOperations', 'ServantRetentionPolicyValue', 'THREAD_POLICY_ID', 'ThreadPolicy', 'ThreadPolicyOperations', 'ThreadPolicyValue', '_ServantActivatorStub', '_ServantLocatorStub'
            +            ),
            +        153 => array (
            +            'NoContext', 'NoContextHelper'
            +            ),
            +        154 => array (
            +            'AdapterInactive', 'AdapterInactiveHelper', 'State'
            +            ),
            +        155 => array (
            +            'AdapterAlreadyExists', 'AdapterAlreadyExistsHelper', 'AdapterNonExistent', 'AdapterNonExistentHelper', 'InvalidPolicy', 'InvalidPolicyHelper', 'NoServant', 'NoServantHelper', 'ObjectAlreadyActive', 'ObjectAlreadyActiveHelper', 'ObjectNotActive', 'ObjectNotActiveHelper', 'ServantAlreadyActive', 'ServantAlreadyActiveHelper', 'ServantNotActive', 'ServantNotActiveHelper', 'WrongAdapter', 'WrongAdapterHelper', 'WrongPolicy', 'WrongPolicyHelper'
            +            ),
            +        156 => array (
            +            'CookieHolder'
            +            ),
            +        157 => array (
            +            'RunTime', 'RunTimeOperations'
            +            ),
            +        158 => array (
            +            '_Remote_Stub'
            +            ),
            +        159 => array (
            +            'Attr', 'CDATASection', 'CharacterData', 'Comment', 'DOMConfiguration', 'DOMError', 'DOMErrorHandler', 'DOMException', 'DOMImplementation', 'DOMImplementationList', 'DOMImplementationSource', 'DOMStringList', 'DocumentFragment', 'DocumentType', 'EntityReference', 'NameList', 'NamedNodeMap', 'Node', 'NodeList', 'Notation', 'ProcessingInstruction', 'Text', 'TypeInfo', 'UserDataHandler'
            +            ),
            +        160 => array (
            +            'DOMImplementationRegistry'
            +            ),
            +        161 => array (
            +            'EventException', 'EventTarget', 'MutationEvent', 'UIEvent'
            +            ),
            +        162 => array (
            +            'DOMImplementationLS', 'LSException', 'LSInput', 'LSLoadEvent', 'LSOutput', 'LSParser', 'LSParserFilter', 'LSProgressEvent', 'LSResourceResolver', 'LSSerializer', 'LSSerializerFilter'
            +            ),
            +        163 => array (
            +            'DTDHandler', 'DocumentHandler', 'EntityResolver', 'ErrorHandler', 'HandlerBase', 'InputSource', 'Locator', 'SAXException', 'SAXNotRecognizedException', 'SAXNotSupportedException', 'SAXParseException', 'XMLFilter', 'XMLReader'
            +            ),
            +        164 => array (
            +            'Attributes2', 'Attributes2Impl', 'DeclHandler', 'DefaultHandler2', 'EntityResolver2', 'LexicalHandler', 'Locator2', 'Locator2Impl'
            +            ),
            +        165 => array (
            +            'AttributeListImpl', 'AttributesImpl', 'DefaultHandler', 'LocatorImpl', 'NamespaceSupport', 'ParserAdapter', 'ParserFactory', 'XMLFilterImpl', 'XMLReaderAdapter', 'XMLReaderFactory'
            +            ),
            +        /* ambiguous class names (appear in more than one package) */
            +        166 => array (
            +            'Annotation', 'AnySeqHelper', 'Array', 'Attribute', 'AttributeList', 'AttributeSet', 'Attributes', 'AuthenticationException', 'Binding', 'Bounds', 'Certificate', 'CertificateEncodingException', 'CertificateException', 'CertificateExpiredException', 'CertificateNotYetValidException', 'CertificateParsingException', 'ConnectException', 'ContentHandler', 'Context', 'Control', 'Current', 'CurrentHelper', 'CurrentOperations', 'DOMLocator', 'DataInputStream', 'DataOutputStream', 'Date', 'DefaultLoaderRepository', 'Delegate', 'Document', 'DocumentEvent', 'DynAny', 'DynArray', 'DynEnum', 'DynFixed', 'DynSequence', 'DynStruct', 'DynUnion', 'DynValue', 'DynamicImplementation', 'Element', 'Entity', 'Event', 'EventListener', 'FieldNameHelper', 'FileFilter', 'Formatter', 'ForwardRequest', 'ForwardRequestHelper', 'InconsistentTypeCode', 'InputStream', 'IntrospectionException', 'InvalidAttributeValueException', 'InvalidKeyException', 'InvalidName', 'InvalidNameHelper', 'InvalidValue', 'List', 'MouseEvent',
            +            'NameValuePair', 'NameValuePairHelper', 'ORB', 'Object', 'ObjectIdHelper', 'ObjectImpl', 'OpenType', 'OutputStream', 'ParagraphView', 'Parser', 'Permission', 'Policy', 'Principal', 'Proxy', 'Reference', 'Statement', 'Timer', 'Timestamp', 'TypeMismatch', 'TypeMismatchHelper', 'UNKNOWN', 'UnknownHostException', 'X509Certificate'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '[', ']', '{', '}', '*', '&', '%', '!', ';', '<', '>', '?'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        /* all Java keywords are case sensitive */
            +        1 => true, 2 => true, 3 => true, 4 => true,
            +        5 => true, 6 => true, 7 => true, 8 => true, 9 => true,
            +        10 => true, 11 => true, 12 => true, 13 => true, 14 => true,
            +        15 => true, 16 => true, 17 => true, 18 => true, 19 => true,
            +        20 => true, 21 => true, 22 => true, 23 => true, 24 => true,
            +        25 => true, 26 => true, 27 => true, 28 => true, 29 => true,
            +        30 => true, 31 => true, 32 => true, 33 => true, 34 => true,
            +        35 => true, 36 => true, 37 => true, 38 => true, 39 => true,
            +        40 => true, 41 => true, 42 => true, 43 => true, 44 => true,
            +        45 => true, 46 => true, 47 => true, 48 => true, 49 => true,
            +        50 => true, 51 => true, 52 => true, 53 => true, 54 => true,
            +        55 => true, 56 => true, 57 => true, 58 => true, 59 => true,
            +        60 => true, 61 => true, 62 => true, 63 => true, 64 => true,
            +        65 => true, 66 => true, 67 => true, 68 => true, 69 => true,
            +        70 => true, 71 => true, 72 => true, 73 => true, 74 => true,
            +        75 => true, 76 => true, 77 => true, 78 => true, 79 => true,
            +        80 => true, 81 => true, 82 => true, 83 => true, 84 => true,
            +        85 => true, 86 => true, 87 => true, 88 => true, 89 => true,
            +        90 => true, 91 => true, 92 => true, 93 => true, 94 => true,
            +        95 => true, 96 => true, 97 => true, 98 => true, 99 => true,
            +        100 => true, 101 => true, 102 => true, 103 => true, 104 => true,
            +        105 => true, 106 => true, 107 => true, 108 => true, 109 => true,
            +        110 => true, 111 => true, 112 => true, 113 => true, 114 => true,
            +        115 => true, 116 => true, 117 => true, 118 => true, 119 => true,
            +        120 => true, 121 => true, 122 => true, 123 => true, 124 => true,
            +        125 => true, 126 => true, 127 => true, 128 => true, 129 => true,
            +        130 => true, 131 => true, 132 => true, 133 => true, 134 => true,
            +        135 => true, 136 => true, 137 => true, 138 => true, 139 => true,
            +        140 => true, 141 => true, 142 => true, 143 => true, 144 => true,
            +        145 => true, 146 => true, 147 => true, 148 => true, 149 => true,
            +        150 => true, 151 => true, 152 => true, 153 => true, 154 => true,
            +        155 => true, 156 => true, 157 => true, 158 => true, 159 => true,
            +        160 => true, 161 => true, 162 => true, 163 => true, 164 => true,
            +        165 => true, 166 => true
            +    ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000000;  font-weight: bold;',
            +            2 => 'color: #000000; font-weight: bold;',
            +            3 => 'color: #006600; font-weight: bold;',
            +            4 => 'color: #006600; font-weight: bold;',
            +            5 => 'color: #003399; font-weight: bold;',
            +            6 => 'color: #003399; font-weight: bold;',
            +            7 => 'color: #003399; font-weight: bold;',
            +            8 => 'color: #003399; font-weight: bold;',
            +            9 => 'color: #003399; font-weight: bold;',
            +            10 => 'color: #003399; font-weight: bold;',
            +            11 => 'color: #003399; font-weight: bold;',
            +            12 => 'color: #003399; font-weight: bold;',
            +            13 => 'color: #003399; font-weight: bold;',
            +            14 => 'color: #003399; font-weight: bold;',
            +            15 => 'color: #003399; font-weight: bold;',
            +            16 => 'color: #003399; font-weight: bold;',
            +            17 => 'color: #003399; font-weight: bold;',
            +            18 => 'color: #003399; font-weight: bold;',
            +            19 => 'color: #003399; font-weight: bold;',
            +            20 => 'color: #003399; font-weight: bold;',
            +            21 => 'color: #003399; font-weight: bold;',
            +            22 => 'color: #003399; font-weight: bold;',
            +            23 => 'color: #003399; font-weight: bold;',
            +            24 => 'color: #003399; font-weight: bold;',
            +            25 => 'color: #003399; font-weight: bold;',
            +            26 => 'color: #003399; font-weight: bold;',
            +            27 => 'color: #003399; font-weight: bold;',
            +            28 => 'color: #003399; font-weight: bold;',
            +            29 => 'color: #003399; font-weight: bold;',
            +            30 => 'color: #003399; font-weight: bold;',
            +            31 => 'color: #003399; font-weight: bold;',
            +            32 => 'color: #003399; font-weight: bold;',
            +            33 => 'color: #003399; font-weight: bold;',
            +            34 => 'color: #003399; font-weight: bold;',
            +            35 => 'color: #003399; font-weight: bold;',
            +            36 => 'color: #003399; font-weight: bold;',
            +            37 => 'color: #003399; font-weight: bold;',
            +            38 => 'color: #003399; font-weight: bold;',
            +            39 => 'color: #003399; font-weight: bold;',
            +            40 => 'color: #003399; font-weight: bold;',
            +            41 => 'color: #003399; font-weight: bold;',
            +            42 => 'color: #003399; font-weight: bold;',
            +            43 => 'color: #003399; font-weight: bold;',
            +            44 => 'color: #003399; font-weight: bold;',
            +            45 => 'color: #003399; font-weight: bold;',
            +            46 => 'color: #003399; font-weight: bold;',
            +            47 => 'color: #003399; font-weight: bold;',
            +            48 => 'color: #003399; font-weight: bold;',
            +            49 => 'color: #003399; font-weight: bold;',
            +            50 => 'color: #003399; font-weight: bold;',
            +            51 => 'color: #003399; font-weight: bold;',
            +            52 => 'color: #003399; font-weight: bold;',
            +            53 => 'color: #003399; font-weight: bold;',
            +            54 => 'color: #003399; font-weight: bold;',
            +            55 => 'color: #003399; font-weight: bold;',
            +            56 => 'color: #003399; font-weight: bold;',
            +            57 => 'color: #003399; font-weight: bold;',
            +            58 => 'color: #003399; font-weight: bold;',
            +            59 => 'color: #003399; font-weight: bold;',
            +            60 => 'color: #003399; font-weight: bold;',
            +            61 => 'color: #003399; font-weight: bold;',
            +            62 => 'color: #003399; font-weight: bold;',
            +            63 => 'color: #003399; font-weight: bold;',
            +            64 => 'color: #003399; font-weight: bold;',
            +            65 => 'color: #003399; font-weight: bold;',
            +            66 => 'color: #003399; font-weight: bold;',
            +            67 => 'color: #003399; font-weight: bold;',
            +            68 => 'color: #003399; font-weight: bold;',
            +            69 => 'color: #003399; font-weight: bold;',
            +            70 => 'color: #003399; font-weight: bold;',
            +            71 => 'color: #003399; font-weight: bold;',
            +            72 => 'color: #003399; font-weight: bold;',
            +            73 => 'color: #003399; font-weight: bold;',
            +            74 => 'color: #003399; font-weight: bold;',
            +            75 => 'color: #003399; font-weight: bold;',
            +            76 => 'color: #003399; font-weight: bold;',
            +            77 => 'color: #003399; font-weight: bold;',
            +            78 => 'color: #003399; font-weight: bold;',
            +            79 => 'color: #003399; font-weight: bold;',
            +            80 => 'color: #003399; font-weight: bold;',
            +            81 => 'color: #003399; font-weight: bold;',
            +            82 => 'color: #003399; font-weight: bold;',
            +            83 => 'color: #003399; font-weight: bold;',
            +            84 => 'color: #003399; font-weight: bold;',
            +            85 => 'color: #003399; font-weight: bold;',
            +            86 => 'color: #003399; font-weight: bold;',
            +            87 => 'color: #003399; font-weight: bold;',
            +            88 => 'color: #003399; font-weight: bold;',
            +            89 => 'color: #003399; font-weight: bold;',
            +            90 => 'color: #003399; font-weight: bold;',
            +            91 => 'color: #003399; font-weight: bold;',
            +            92 => 'color: #003399; font-weight: bold;',
            +            93 => 'color: #003399; font-weight: bold;',
            +            94 => 'color: #003399; font-weight: bold;',
            +            95 => 'color: #003399; font-weight: bold;',
            +            96 => 'color: #003399; font-weight: bold;',
            +            97 => 'color: #003399; font-weight: bold;',
            +            98 => 'color: #003399; font-weight: bold;',
            +            99 => 'color: #003399; font-weight: bold;',
            +            100 => 'color: #003399; font-weight: bold;',
            +            101 => 'color: #003399; font-weight: bold;',
            +            102 => 'color: #003399; font-weight: bold;',
            +            103 => 'color: #003399; font-weight: bold;',
            +            104 => 'color: #003399; font-weight: bold;',
            +            105 => 'color: #003399; font-weight: bold;',
            +            106 => 'color: #003399; font-weight: bold;',
            +            107 => 'color: #003399; font-weight: bold;',
            +            108 => 'color: #003399; font-weight: bold;',
            +            109 => 'color: #003399; font-weight: bold;',
            +            110 => 'color: #003399; font-weight: bold;',
            +            111 => 'color: #003399; font-weight: bold;',
            +            112 => 'color: #003399; font-weight: bold;',
            +            113 => 'color: #003399; font-weight: bold;',
            +            114 => 'color: #003399; font-weight: bold;',
            +            115 => 'color: #003399; font-weight: bold;',
            +            116 => 'color: #003399; font-weight: bold;',
            +            117 => 'color: #003399; font-weight: bold;',
            +            118 => 'color: #003399; font-weight: bold;',
            +            119 => 'color: #003399; font-weight: bold;',
            +            120 => 'color: #003399; font-weight: bold;',
            +            121 => 'color: #003399; font-weight: bold;',
            +            122 => 'color: #003399; font-weight: bold;',
            +            123 => 'color: #003399; font-weight: bold;',
            +            124 => 'color: #003399; font-weight: bold;',
            +            125 => 'color: #003399; font-weight: bold;',
            +            126 => 'color: #003399; font-weight: bold;',
            +            127 => 'color: #003399; font-weight: bold;',
            +            128 => 'color: #003399; font-weight: bold;',
            +            129 => 'color: #003399; font-weight: bold;',
            +            130 => 'color: #003399; font-weight: bold;',
            +            131 => 'color: #003399; font-weight: bold;',
            +            132 => 'color: #003399; font-weight: bold;',
            +            133 => 'color: #003399; font-weight: bold;',
            +            134 => 'color: #003399; font-weight: bold;',
            +            135 => 'color: #003399; font-weight: bold;',
            +            136 => 'color: #003399; font-weight: bold;',
            +            137 => 'color: #003399; font-weight: bold;',
            +            138 => 'color: #003399; font-weight: bold;',
            +            139 => 'color: #003399; font-weight: bold;',
            +            140 => 'color: #003399; font-weight: bold;',
            +            141 => 'color: #003399; font-weight: bold;',
            +            142 => 'color: #003399; font-weight: bold;',
            +            143 => 'color: #003399; font-weight: bold;',
            +            144 => 'color: #003399; font-weight: bold;',
            +            145 => 'color: #003399; font-weight: bold;',
            +            146 => 'color: #003399; font-weight: bold;',
            +            147 => 'color: #003399; font-weight: bold;',
            +            148 => 'color: #003399; font-weight: bold;',
            +            149 => 'color: #003399; font-weight: bold;',
            +            150 => 'color: #003399; font-weight: bold;',
            +            151 => 'color: #003399; font-weight: bold;',
            +            152 => 'color: #003399; font-weight: bold;',
            +            153 => 'color: #003399; font-weight: bold;',
            +            154 => 'color: #003399; font-weight: bold;',
            +            155 => 'color: #003399; font-weight: bold;',
            +            156 => 'color: #003399; font-weight: bold;',
            +            157 => 'color: #003399; font-weight: bold;',
            +            158 => 'color: #003399; font-weight: bold;',
            +            159 => 'color: #003399; font-weight: bold;',
            +            160 => 'color: #003399; font-weight: bold;',
            +            161 => 'color: #003399; font-weight: bold;',
            +            162 => 'color: #003399; font-weight: bold;',
            +            163 => 'color: #003399; font-weight: bold;',
            +            164 => 'color: #003399; font-weight: bold;',
            +            165 => 'color: #003399; font-weight: bold;',
            +            166 => 'color: #003399; font-weight: bold;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; font-style: italic;',
            +            2 => 'color: #006699;',
            +            3 => 'color: #008000; font-style: italic; font-weight: bold;',
            +            'MULTI' => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #0000ff;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #006633;',
            +            2 => 'color: #006633;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #339933;'
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => 'http://docs.oracle.com/javase/7/docs/api/java/applet/{FNAME}.html',
            +        6 => 'http://docs.oracle.com/javase/7/docs/api/java/awt/{FNAME}.html',
            +        7 => 'http://docs.oracle.com/javase/7/docs/api/java/awt/color/{FNAME}.html',
            +        8 => 'http://docs.oracle.com/javase/7/docs/api/java/awt/datatransfer/{FNAME}.html',
            +        9 => 'http://docs.oracle.com/javase/7/docs/api/java/awt/dnd/{FNAME}.html',
            +        10 => 'http://docs.oracle.com/javase/7/docs/api/java/awt/event/{FNAME}.html',
            +        11 => 'http://docs.oracle.com/javase/7/docs/api/java/awt/font/{FNAME}.html',
            +        12 => 'http://docs.oracle.com/javase/7/docs/api/java/awt/geom/{FNAME}.html',
            +        13 => 'http://docs.oracle.com/javase/7/docs/api/java/awt/im/{FNAME}.html',
            +        14 => 'http://docs.oracle.com/javase/7/docs/api/java/awt/im/spi/{FNAME}.html',
            +        15 => 'http://docs.oracle.com/javase/7/docs/api/java/awt/image/{FNAME}.html',
            +        16 => 'http://docs.oracle.com/javase/7/docs/api/java/awt/image/renderable/{FNAME}.html',
            +        17 => 'http://docs.oracle.com/javase/7/docs/api/java/awt/print/{FNAME}.html',
            +        18 => 'http://docs.oracle.com/javase/7/docs/api/java/beans/{FNAME}.html',
            +        19 => 'http://docs.oracle.com/javase/7/docs/api/java/beans/beancontext/{FNAME}.html',
            +        20 => 'http://docs.oracle.com/javase/7/docs/api/java/io/{FNAME}.html',
            +        21 => 'http://docs.oracle.com/javase/7/docs/api/java/lang/{FNAME}.html',
            +        22 => 'http://docs.oracle.com/javase/7/docs/api/java/lang/annotation/{FNAME}.html',
            +        23 => 'http://docs.oracle.com/javase/7/docs/api/java/lang/instrument/{FNAME}.html',
            +        24 => 'http://docs.oracle.com/javase/7/docs/api/java/lang/management/{FNAME}.html',
            +        25 => 'http://docs.oracle.com/javase/7/docs/api/java/lang/ref/{FNAME}.html',
            +        26 => 'http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/{FNAME}.html',
            +        27 => 'http://docs.oracle.com/javase/7/docs/api/java/math/{FNAME}.html',
            +        28 => 'http://docs.oracle.com/javase/7/docs/api/java/net/{FNAME}.html',
            +        29 => 'http://docs.oracle.com/javase/7/docs/api/java/nio/{FNAME}.html',
            +        30 => 'http://docs.oracle.com/javase/7/docs/api/java/nio/channels/{FNAME}.html',
            +        31 => 'http://docs.oracle.com/javase/7/docs/api/java/nio/channels/spi/{FNAME}.html',
            +        32 => 'http://docs.oracle.com/javase/7/docs/api/java/nio/charset/{FNAME}.html',
            +        33 => 'http://docs.oracle.com/javase/7/docs/api/java/nio/charset/spi/{FNAME}.html',
            +        34 => 'http://docs.oracle.com/javase/7/docs/api/java/rmi/{FNAME}.html',
            +        35 => 'http://docs.oracle.com/javase/7/docs/api/java/rmi/activation/{FNAME}.html',
            +        36 => 'http://docs.oracle.com/javase/7/docs/api/java/rmi/dgc/{FNAME}.html',
            +        37 => 'http://docs.oracle.com/javase/7/docs/api/java/rmi/registry/{FNAME}.html',
            +        38 => 'http://docs.oracle.com/javase/7/docs/api/java/rmi/server/{FNAME}.html',
            +        39 => 'http://docs.oracle.com/javase/7/docs/api/java/security/{FNAME}.html',
            +        40 => 'http://docs.oracle.com/javase/7/docs/api/java/security/acl/{FNAME}.html',
            +        41 => 'http://docs.oracle.com/javase/7/docs/api/java/security/cert/{FNAME}.html',
            +        42 => 'http://docs.oracle.com/javase/7/docs/api/java/security/interfaces/{FNAME}.html',
            +        43 => 'http://docs.oracle.com/javase/7/docs/api/java/security/spec/{FNAME}.html',
            +        44 => 'http://docs.oracle.com/javase/7/docs/api/java/sql/{FNAME}.html',
            +        45 => 'http://docs.oracle.com/javase/7/docs/api/java/text/{FNAME}.html',
            +        46 => 'http://docs.oracle.com/javase/7/docs/api/java/util/{FNAME}.html',
            +        47 => 'http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/{FNAME}.html',
            +        48 => 'http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/{FNAME}.html',
            +        49 => 'http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/{FNAME}.html',
            +        50 => 'http://docs.oracle.com/javase/7/docs/api/java/util/jar/{FNAME}.html',
            +        51 => 'http://docs.oracle.com/javase/7/docs/api/java/util/logging/{FNAME}.html',
            +        52 => 'http://docs.oracle.com/javase/7/docs/api/java/util/prefs/{FNAME}.html',
            +        53 => 'http://docs.oracle.com/javase/7/docs/api/java/util/regex/{FNAME}.html',
            +        54 => 'http://docs.oracle.com/javase/7/docs/api/java/util/zip/{FNAME}.html',
            +        55 => 'http://docs.oracle.com/javase/7/docs/api/javax/accessibility/{FNAME}.html',
            +        56 => 'http://docs.oracle.com/javase/7/docs/api/javax/activity/{FNAME}.html',
            +        57 => 'http://docs.oracle.com/javase/7/docs/api/javax/crypto/{FNAME}.html',
            +        58 => 'http://docs.oracle.com/javase/7/docs/api/javax/crypto/interfaces/{FNAME}.html',
            +        59 => 'http://docs.oracle.com/javase/7/docs/api/javax/crypto/spec/{FNAME}.html',
            +        60 => 'http://docs.oracle.com/javase/7/docs/api/javax/imageio/{FNAME}.html',
            +        61 => 'http://docs.oracle.com/javase/7/docs/api/javax/imageio/event/{FNAME}.html',
            +        62 => 'http://docs.oracle.com/javase/7/docs/api/javax/imageio/metadata/{FNAME}.html',
            +        63 => 'http://docs.oracle.com/javase/7/docs/api/javax/imageio/plugins/bmp/{FNAME}.html',
            +        64 => 'http://docs.oracle.com/javase/7/docs/api/javax/imageio/plugins/jpeg/{FNAME}.html',
            +        65 => 'http://docs.oracle.com/javase/7/docs/api/javax/imageio/spi/{FNAME}.html',
            +        66 => 'http://docs.oracle.com/javase/7/docs/api/javax/imageio/stream/{FNAME}.html',
            +        67 => 'http://docs.oracle.com/javase/7/docs/api/javax/management/{FNAME}.html',
            +        68 => 'http://docs.oracle.com/javase/7/docs/api/javax/management/loading/{FNAME}.html',
            +        69 => 'http://docs.oracle.com/javase/7/docs/api/javax/management/modelmbean/{FNAME}.html',
            +        70 => 'http://docs.oracle.com/javase/7/docs/api/javax/management/monitor/{FNAME}.html',
            +        71 => 'http://docs.oracle.com/javase/7/docs/api/javax/management/openmbean/{FNAME}.html',
            +        72 => 'http://docs.oracle.com/javase/7/docs/api/javax/management/relation/{FNAME}.html',
            +        73 => 'http://docs.oracle.com/javase/7/docs/api/javax/management/remote/{FNAME}.html',
            +        74 => 'http://docs.oracle.com/javase/7/docs/api/javax/management/remote/rmi/{FNAME}.html',
            +        75 => 'http://docs.oracle.com/javase/7/docs/api/javax/management/timer/{FNAME}.html',
            +        76 => 'http://docs.oracle.com/javase/7/docs/api/javax/naming/{FNAME}.html',
            +        77 => 'http://docs.oracle.com/javase/7/docs/api/javax/naming/directory/{FNAME}.html',
            +        78 => 'http://docs.oracle.com/javase/7/docs/api/javax/naming/event/{FNAME}.html',
            +        79 => 'http://docs.oracle.com/javase/7/docs/api/javax/naming/ldap/{FNAME}.html',
            +        80 => 'http://docs.oracle.com/javase/7/docs/api/javax/naming/spi/{FNAME}.html',
            +        81 => 'http://docs.oracle.com/javase/7/docs/api/javax/net/{FNAME}.html',
            +        82 => 'http://docs.oracle.com/javase/7/docs/api/javax/net/ssl/{FNAME}.html',
            +        83 => 'http://docs.oracle.com/javase/7/docs/api/javax/print/{FNAME}.html',
            +        84 => 'http://docs.oracle.com/javase/7/docs/api/javax/print/attribute/{FNAME}.html',
            +        85 => 'http://docs.oracle.com/javase/7/docs/api/javax/print/attribute/standard/{FNAME}.html',
            +        86 => 'http://docs.oracle.com/javase/7/docs/api/javax/print/event/{FNAME}.html',
            +        87 => 'http://docs.oracle.com/javase/7/docs/api/javax/rmi/{FNAME}.html',
            +        88 => 'http://docs.oracle.com/javase/7/docs/api/javax/rmi/CORBA/{FNAME}.html',
            +        89 => 'http://docs.oracle.com/javase/7/docs/api/javax/rmi/ssl/{FNAME}.html',
            +        90 => 'http://docs.oracle.com/javase/7/docs/api/javax/security/auth/{FNAME}.html',
            +        91 => 'http://docs.oracle.com/javase/7/docs/api/javax/security/auth/callback/{FNAME}.html',
            +        92 => 'http://docs.oracle.com/javase/7/docs/api/javax/security/auth/kerberos/{FNAME}.html',
            +        93 => 'http://docs.oracle.com/javase/7/docs/api/javax/security/auth/login/{FNAME}.html',
            +        94 => 'http://docs.oracle.com/javase/7/docs/api/javax/security/auth/spi/{FNAME}.html',
            +        95 => 'http://docs.oracle.com/javase/7/docs/api/javax/security/auth/x500/{FNAME}.html',
            +        96 => 'http://docs.oracle.com/javase/7/docs/api/javax/security/sasl/{FNAME}.html',
            +        97 => 'http://docs.oracle.com/javase/7/docs/api/javax/sound/midi/{FNAME}.html',
            +        98 => 'http://docs.oracle.com/javase/7/docs/api/javax/sound/midi/spi/{FNAME}.html',
            +        99 => 'http://docs.oracle.com/javase/7/docs/api/javax/sound/sampled/{FNAME}.html',
            +        100 => 'http://docs.oracle.com/javase/7/docs/api/javax/sound/sampled/spi/{FNAME}.html',
            +        101 => 'http://docs.oracle.com/javase/7/docs/api/javax/sql/{FNAME}.html',
            +        102 => 'http://docs.oracle.com/javase/7/docs/api/javax/sql/rowset/{FNAME}.html',
            +        103 => 'http://docs.oracle.com/javase/7/docs/api/javax/sql/rowset/serial/{FNAME}.html',
            +        104 => 'http://docs.oracle.com/javase/7/docs/api/javax/sql/rowset/spi/{FNAME}.html',
            +        105 => 'http://docs.oracle.com/javase/7/docs/api/javax/swing/{FNAME}.html',
            +        106 => 'http://docs.oracle.com/javase/7/docs/api/javax/swing/border/{FNAME}.html',
            +        107 => 'http://docs.oracle.com/javase/7/docs/api/javax/swing/colorchooser/{FNAME}.html',
            +        108 => 'http://docs.oracle.com/javase/7/docs/api/javax/swing/event/{FNAME}.html',
            +        109 => 'http://docs.oracle.com/javase/7/docs/api/javax/swing/filechooser/{FNAME}.html',
            +        110 => 'http://docs.oracle.com/javase/7/docs/api/javax/swing/plaf/{FNAME}.html',
            +        111 => 'http://docs.oracle.com/javase/7/docs/api/javax/swing/plaf/basic/{FNAME}.html',
            +        112 => 'http://docs.oracle.com/javase/7/docs/api/javax/swing/plaf/metal/{FNAME}.html',
            +        113 => 'http://docs.oracle.com/javase/7/docs/api/javax/swing/plaf/multi/{FNAME}.html',
            +        114 => 'http://docs.oracle.com/javase/7/docs/api/javax/swing/plaf/synth/{FNAME}.html',
            +        115 => 'http://docs.oracle.com/javase/7/docs/api/javax/swing/table/{FNAME}.html',
            +        116 => 'http://docs.oracle.com/javase/7/docs/api/javax/swing/text/{FNAME}.html',
            +        117 => 'http://docs.oracle.com/javase/7/docs/api/javax/swing/text/html/{FNAME}.html',
            +        118 => 'http://docs.oracle.com/javase/7/docs/api/javax/swing/text/html/parser/{FNAME}.html',
            +        119 => 'http://docs.oracle.com/javase/7/docs/api/javax/swing/text/rtf/{FNAME}.html',
            +        120 => 'http://docs.oracle.com/javase/7/docs/api/javax/swing/tree/{FNAME}.html',
            +        121 => 'http://docs.oracle.com/javase/7/docs/api/javax/swing/undo/{FNAME}.html',
            +        122 => 'http://docs.oracle.com/javase/7/docs/api/javax/transaction/{FNAME}.html',
            +        123 => 'http://docs.oracle.com/javase/7/docs/api/javax/transaction/xa/{FNAME}.html',
            +        124 => 'http://docs.oracle.com/javase/7/docs/api/javax/xml/{FNAME}.html',
            +        125 => 'http://docs.oracle.com/javase/7/docs/api/javax/xml/datatype/{FNAME}.html',
            +        126 => 'http://docs.oracle.com/javase/7/docs/api/javax/xml/namespace/{FNAME}.html',
            +        127 => 'http://docs.oracle.com/javase/7/docs/api/javax/xml/parsers/{FNAME}.html',
            +        128 => 'http://docs.oracle.com/javase/7/docs/api/javax/xml/transform/{FNAME}.html',
            +        129 => 'http://docs.oracle.com/javase/7/docs/api/javax/xml/transform/dom/{FNAME}.html',
            +        130 => 'http://docs.oracle.com/javase/7/docs/api/javax/xml/transform/sax/{FNAME}.html',
            +        131 => 'http://docs.oracle.com/javase/7/docs/api/javax/xml/transform/stream/{FNAME}.html',
            +        132 => 'http://docs.oracle.com/javase/7/docs/api/javax/xml/validation/{FNAME}.html',
            +        133 => 'http://docs.oracle.com/javase/7/docs/api/javax/xml/xpath/{FNAME}.html',
            +        134 => 'http://docs.oracle.com/javase/7/docs/api/org/ietf/jgss/{FNAME}.html',
            +        135 => 'http://docs.oracle.com/javase/7/docs/api/org/omg/CORBA/{FNAME}.html',
            +        136 => 'http://docs.oracle.com/javase/7/docs/api/org/omg/CORBA/DynAnyPackage/{FNAME}.html',
            +        137 => 'http://docs.oracle.com/javase/7/docs/api/org/omg/CORBA/TypeCodePackage/{FNAME}.html',
            +        138 => 'http://docs.oracle.com/javase/7/docs/api/org/omg/CORBA/portable/{FNAME}.html',
            +        139 => 'http://docs.oracle.com/javase/7/docs/api/org/omg/CosNaming/{FNAME}.html',
            +        140 => 'http://docs.oracle.com/javase/7/docs/api/org/omg/CosNaming/NamingContextExtPackage/{FNAME}.html',
            +        141 => 'http://docs.oracle.com/javase/7/docs/api/org/omg/CosNaming/NamingContextPackage/{FNAME}.html',
            +        142 => 'http://docs.oracle.com/javase/7/docs/api/org/omg/Dynamic/{FNAME}.html',
            +        143 => 'http://docs.oracle.com/javase/7/docs/api/org/omg/DynamicAny/{FNAME}.html',
            +        144 => 'http://docs.oracle.com/javase/7/docs/api/org/omg/DynamicAny/DynAnyFactoryPackage/{FNAME}.html',
            +        145 => 'http://docs.oracle.com/javase/7/docs/api/org/omg/DynamicAny/DynAnyPackage/{FNAME}.html',
            +        146 => 'http://docs.oracle.com/javase/7/docs/api/org/omg/IOP/{FNAME}.html',
            +        147 => 'http://docs.oracle.com/javase/7/docs/api/org/omg/IOP/CodecFactoryPackage/{FNAME}.html',
            +        148 => 'http://docs.oracle.com/javase/7/docs/api/org/omg/IOP/CodecPackage/{FNAME}.html',
            +        149 => 'http://docs.oracle.com/javase/7/docs/api/org/omg/Messaging/{FNAME}.html',
            +        150 => 'http://docs.oracle.com/javase/7/docs/api/org/omg/PortableInterceptor/{FNAME}.html',
            +        151 => 'http://docs.oracle.com/javase/7/docs/api/org/omg/PortableInterceptor/ORBInitInfoPackage/{FNAME}.html',
            +        152 => 'http://docs.oracle.com/javase/7/docs/api/org/omg/PortableServer/{FNAME}.html',
            +        153 => 'http://docs.oracle.com/javase/7/docs/api/org/omg/PortableServer/CurrentPackage/{FNAME}.html',
            +        154 => 'http://docs.oracle.com/javase/7/docs/api/org/omg/PortableServer/POAManagerPackage/{FNAME}.html',
            +        155 => 'http://docs.oracle.com/javase/7/docs/api/org/omg/PortableServer/POAPackage/{FNAME}.html',
            +        156 => 'http://docs.oracle.com/javase/7/docs/api/org/omg/PortableServer/ServantLocatorPackage/{FNAME}.html',
            +        157 => 'http://docs.oracle.com/javase/7/docs/api/org/omg/SendingContext/{FNAME}.html',
            +        158 => 'http://docs.oracle.com/javase/7/docs/api/org/omg/stub/java/rmi/{FNAME}.html',
            +        159 => 'http://docs.oracle.com/javase/7/docs/api/org/w3c/dom/{FNAME}.html',
            +        160 => 'http://docs.oracle.com/javase/7/docs/api/org/w3c/dom/bootstrap/{FNAME}.html',
            +        161 => 'http://docs.oracle.com/javase/7/docs/api/org/w3c/dom/events/{FNAME}.html',
            +        162 => 'http://docs.oracle.com/javase/7/docs/api/org/w3c/dom/ls/{FNAME}.html',
            +        163 => 'http://docs.oracle.com/javase/7/docs/api/org/xml/sax/{FNAME}.html',
            +        164 => 'http://docs.oracle.com/javase/7/docs/api/org/xml/sax/ext/{FNAME}.html',
            +        165 => 'http://docs.oracle.com/javase/7/docs/api/org/xml/sax/helpers/{FNAME}.html',
            +        /* ambiguous class names (appear in more than one package) */
            +        166 => 'http://www.google.com/search?sitesearch=docs.oracle.com&q=allinurl%3Ajavase+docs+api+{FNAME}'
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        /* Java does not use '::' */
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            'DISALLOWED_BEFORE' => '(?|^&"\'])',
            +            'DISALLOWED_AFTER' => '(?![a-zA-Z0-9_\|%\\-;"\'])'
            +            )
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/javascript.php b/vendor/easybook/geshi/geshi/javascript.php
            new file mode 100644
            index 0000000000..d2d854c141
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/javascript.php
            @@ -0,0 +1,173 @@
            + 'Javascript',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(
            +        //Regular Expressions
            +        2 => "/(?<=[\\s^])(s|tr|y)\\/(?!\*)(?!\s)(?:\\\\.|(?!\n)[^\\/\\\\])+(? GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            //reserved/keywords; also some non-reserved keywords
            +            'break','case','catch','const','continue',
            +            'default','delete','do',
            +            'else',
            +            'finally','for','function',
            +            'get','goto',
            +            'if','in','instanceof',
            +            'new',
            +            'prototype',
            +            'return',
            +            'set','static','switch',
            +            'this','throw','try','typeof',
            +            'var','void'
            +            ),
            +        2 => array(
            +            //reserved/non-keywords; metaconstants
            +            'false','null','true','undefined','NaN','Infinity'
            +            ),
            +        3 => array(
            +            //magic properties/functions
            +            '__proto__','__defineGetter__','__defineSetter__','hasOwnProperty','hasProperty'
            +            ),
            +        4 => array(
            +            //type constructors
            +            'Object', 'Function', 'Date', 'Math', 'String', 'Number', 'Boolean', 'Array'
            +            ),
            +        5 => array(
            +            //reserved, but invalid in language
            +            'abstract','boolean','byte','char','class','debugger','double','enum','export','extends',
            +            'final','float','implements','import','int','interface','long','native',
            +            'short','super','synchronized','throws','transient','volatile'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '[', ']', '{', '}',
            +        '+', '-', '*', '/', '%',
            +        '!', '@', '&', '|', '^',
            +        '<', '>', '=',
            +        ',', ';', '?', ':'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        5 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000066; font-weight: bold;',
            +            2 => 'color: #003366; font-weight: bold;',
            +            3 => 'color: #000066;',
            +            5 => 'color: #FF0000;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #006600; font-style: italic;',
            +            2 => 'color: #009966; font-style: italic;',
            +            'MULTI' => 'color: #006600; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #3366CC;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #CC0000;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #660066;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #339933;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            0 => '',
            +            1 => '',
            +            2 => '',
            +            3 => ''
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => ''
            +    ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_MAYBE,
            +    'SCRIPT_DELIMITERS' => array(
            +        0 => array(
            +            ''
            +            ),
            +        1 => array(
            +            ''
            +            )
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        0 => true,
            +        1 => true
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/jcl.php b/vendor/easybook/geshi/geshi/jcl.php
            new file mode 100644
            index 0000000000..7d9c548257
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/jcl.php
            @@ -0,0 +1,155 @@
            + 'JCL',
            +    'COMMENT_SINGLE' => array(),
            +    'COMMENT_MULTI' => array(),
            +    'COMMENT_REGEXP' => array(
            +        // Comments identified using REGEX
            +        // Comments start with //* but should not be followed by % (TWS) or + (some JES3 stmts)
            +        3 => "\/\/\*[^%](.*?)(\n)"
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_UPPER,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'COMMAND', 'CNTL', 'DD', 'ENDCNTL', 'EXEC', 'IF', 'THEN', 'ELSE',
            +            'ENDIF', 'JCLLIB', 'JOB', 'OUTPUT', 'PEND',
            +            'PROC', 'SET', 'XMIT'
            +            ),
            +        2 => array (
            +            'PGM','CLASS','NOTIFY','MSGCLASS','DSN','KEYLEN','LABEL','LIKE',
            +            'RECFM','LRECL','DCB','DSORG','BLKSIZE','SPACE','STORCLAS',
            +            'DUMMY','DYNAM','AVGREC','BURST','DISP','UNIT','VOLUME',
            +            'MSGLEVEL','REGION'
            +            ),
            +        // Keywords set 3: DFSORT, ICETOOL
            +        3 => array (
            +            'ALTSEQ','DEBUG','END','INCLUDE','INREC','MERGE','MODS','OMIT',
            +            'OPTION','OUTFIL','OUTREC','RECORD','SORT','SUM',
            +            'COPY','COUNT','DEFAULTS','DISPLAY','MODE','OCCUR','RANGE',
            +            'SELECT','STATS','UNIQUE','VERIFY'
            +            ),
            +        // Keywords set 4: IDCAMS
            +        4 => array (
            +            'ALTER','BLDINDEX','CNVTCAT','DEFINE','ALIAS','ALTERNATEINDEX',
            +            'CLUSTER','GENERATIONDATAGROUP','GDG','NONVSAM','PAGESPACE','PATH',
            +            /* 'SPACE',*/'USERCATALOG','DELETE','EXAMINE','EXPORT','DISCONNECT',
            +            'EXPORTRA','IMPORT','CONNECT','IMPORTRA','LISTCAT','LISTCRA',
            +            'PRINT','REPRO','RESETCAT'//,'VERIFY'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(',')','=',',','>','<'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #FF0000;',
            +            2 => 'color: #21A502;',
            +            3 => 'color: #FF00FF;',
            +            4 => 'color: #876C00;'
            +            ),
            +        'COMMENTS' => array(
            +            0 => 'color: #0000FF;',
            +            //1 => 'color: #0000FF;',
            +            //2 => 'color: #0000FF;',
            +            3 => 'color: #0000FF;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => ''
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #FF7400;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #66CC66;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #336633;'
            +            ),
            +        'METHODS' => array(
            +            1 => '',
            +            2 => ''
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #FF7400;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #6B1F6B;',
            +            1 => 'color: #6B1F6B;',
            +            2 => 'color: #6B1F6B;'
            +            ),
            +        'SCRIPT' => array(
            +            0 => ''
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        // JCL book at IBM Bookshelf is http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/IEA2B680/CONTENTS?SHELF=&DT=20080604022956#3.1
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(),
            +    'REGEXPS' => array(
            +        // The following regular expressions solves three purposes
            +        // - Identify Temp Variables in JCL (e.g. &&TEMP)
            +        // - Symbolic variables in JCL (e.g. &SYSUID)
            +        // - TWS OPC Variables (e.g. %OPC)
            +        // Thanks to Simon for pointing me to this
            +        0 => '&&[a-zA-Z]{1,8}[0-9]{0,}',
            +        1 => '&[a-zA-Z]{1,8}[0-9]{0,}',
            +        2 => '&|\?|%[a-zA-Z]{1,8}[0-9]{0,}'
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array()
            +);
            diff --git a/vendor/easybook/geshi/geshi/jquery.php b/vendor/easybook/geshi/geshi/jquery.php
            new file mode 100644
            index 0000000000..17a6a21e2c
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/jquery.php
            @@ -0,0 +1,237 @@
            + 'jQuery',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    //Regular Expressions
            +    'COMMENT_REGEXP' => array(2 => "/(?<=[\\s^])s\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])m?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\,\\;\\)])/iU"),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do',
            +            'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item',
            +            'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void',
            +            'while', 'write', 'with'
            +            ),
            +        2 => array(
            +            'class', 'const', 'default', 'debugger', 'export', 'extends', 'false',
            +            'function', 'import', 'namespace', 'new', 'null', 'package', 'private',
            +            'protected', 'public', 'super', 'true', 'use', 'var'
            +            ),
            +        3 => array(
            +            // common functions for Window object
            +            'alert', 'back', 'close', 'confirm', 'forward', 'home',
            +            'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove',
            +            'onresize', 'onunload', 'open', 'print', 'prompt', 'status',
            +            //'blur', 'focus', 'scroll', // Duplicate with kw9
            +            //'stop', //Duplicate with kw10
            +            ),
            +        4 => array(
            +            // jQuery Core Functions
            +            'jQuery', 'each', 'size', 'length', 'selector', 'context', 'eq',
            +            'index', 'data', 'removeData', 'queue', 'dequeue', 'noConflict'
            +            //'get', //Duplicate with kw11
            +            ),
            +        5 => array(
            +            // jQuery Attribute Functions
            +            'attr', 'removeAttr', 'addClass', 'hasClass', 'removeClass', 'toggleClass',
            +            'html', 'text', 'val',
            +            ),
            +        6 => array(
            +            // jQuery Traversing Functions
            +            'filter', 'not', 'slice', 'add', 'children', 'closest',
            +            'contents', 'find', 'next', 'nextAll', 'parent', 'parents',
            +            'prev', 'prevAll', 'siblings', 'andSelf', 'end',
            +            //'is',  //Dup with kw1
            +            //'offsetParent', //Duplicate with kw8
            +            //'map', //Duplicate with kw12
            +            ),
            +        7 => array(
            +            // jQuery Manipulation Functions
            +            'append', 'appendTo', 'prepend', 'prependTo', 'after', 'before', 'insertAfter',
            +            'insertBefore', 'wrap', 'wrapAll', 'wrapInner', 'replaceWith', 'replaceAll',
            +            'empty', 'remove', 'clone',
            +            ),
            +        8 => array(
            +            // jQuery CSS Functions
            +            'css', 'offset', 'offsetParent', 'position', 'scrollTop', 'scrollLeft',
            +            'height', 'width', 'innerHeight', 'innerWidth', 'outerHeight', 'outerWidth',
            +            ),
            +        9 => array(
            +            // jQuery Events Functions
            +            'ready', 'bind', 'one', 'trigger', 'triggerHandler', 'unbind', 'live',
            +            'die', 'hover', 'blur', 'change', 'click', 'dblclick', 'error',
            +            'focus', 'keydown', 'keypress', 'keyup', 'mousedown', 'mouseenter',
            +            'mouseleave', 'mousemove', 'mouseout', 'mouseover', 'mouseup', 'resize',
            +            'scroll', 'select', 'submit', 'unload',
            +            //'toggle', //Duplicate with kw10
            +            //'load', //Duplicate with kw11
            +            ),
            +        10 => array(
            +            // jQuery Effects Functions
            +            'show', 'hide', 'toggle', 'slideDown', 'slideUp', 'slideToggle', 'fadeIn',
            +            'fadeOut', 'fadeTo', 'animate', 'stop',
            +            ),
            +        11 => array(
            +            // jQuery Ajax Functions
            +            'ajax', 'load', 'get', 'getJSON', 'getScript', 'post', 'ajaxComplete',
            +            'ajaxError', 'ajaxSend', 'ajaxStart', 'ajaxStop', 'ajaxSuccess', 'ajaxSetup',
            +            'serialize', 'serializeArray',
            +            ),
            +        12 => array(
            +            // jQuery Utility Functions
            +            'support', 'browser', 'version', 'boxModal', 'extend', 'grep', 'makeArray',
            +            'map', 'inArray', 'merge', 'unique', 'isArray', 'isFunction', 'trim',
            +            'param',
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        0 => array(
            +            '(', ')', '[', ']', '{', '}',
            +            '+', '-', '*', '/', '%',
            +            '!', '@', '&', '|', '^',
            +            '<', '>', '=',
            +            ',', ';', '?', ':'
            +            ),
            +        1 => array(
            +            '$'
            +            )
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        5 => false,
            +        6 => false,
            +        7 => false,
            +        8 => false,
            +        9 => false,
            +        10 => false,
            +        11 => false,
            +        12 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000066; font-weight: bold;',
            +            2 => 'color: #003366; font-weight: bold;',
            +            3 => 'color: #000066;',
            +            4 => 'color: #000066;',
            +            5 => 'color: #000066;',
            +            6 => 'color: #000066;',
            +            7 => 'color: #000066;',
            +            8 => 'color: #000066;',
            +            9 => 'color: #000066;',
            +            10 => 'color: #000066;',
            +            11 => 'color: #000066;',
            +            12 => 'color: #000066;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #006600; font-style: italic;',
            +            2 => 'color: #009966; font-style: italic;',
            +            'MULTI' => 'color: #006600; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #3366CC;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #CC0000;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #660066;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #339933;',
            +            1 => 'color: #000066;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            0 => '',
            +            1 => '',
            +            2 => '',
            +            3 => ''
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => 'http://docs.jquery.com/Core/{FNAME}',
            +        5 => 'http://docs.jquery.com/Attributes/{FNAME}',
            +        6 => 'http://docs.jquery.com/Traversing/{FNAME}',
            +        7 => 'http://docs.jquery.com/Manipulation/{FNAME}',
            +        8 => 'http://docs.jquery.com/CSS/{FNAME}',
            +        9 => 'http://docs.jquery.com/Events/{FNAME}',
            +        10 => 'http://docs.jquery.com/Effects/{FNAME}',
            +        11 => 'http://docs.jquery.com/Ajax/{FNAME}',
            +        12 => 'http://docs.jquery.com/Utilities/{FNAME}'
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_MAYBE,
            +    'SCRIPT_DELIMITERS' => array(
            +        0 => array(
            +            ''
            +            ),
            +        1 => array(
            +            ''
            +            )
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        0 => true,
            +        1 => true
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/kixtart.php b/vendor/easybook/geshi/geshi/kixtart.php
            new file mode 100644
            index 0000000000..42ffa42ecd
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/kixtart.php
            @@ -0,0 +1,327 @@
            + 'KiXtart',
            +    'COMMENT_SINGLE' => array(1 => ';'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'While', 'Loop',
            +            'Use',
            +            'Small',
            +            'Sleep',
            +            'Shell',
            +            'SetTime',
            +            'SetM',
            +            'SetL',
            +            'Set',
            +            'Select', 'Case',
            +            'Run',
            +            'Return',
            +            'Redim',
            +            'RD',
            +            'Quit',
            +            'Play',
            +            'Move',
            +            'MD',
            +            'Include',
            +            'If', 'Else', 'Endif',
            +            'GoTo',
            +            'GoSub',
            +            'Go',
            +            'Global',
            +            'GetS',
            +            'Get',
            +            'Function', 'Endfunction',
            +            'For', 'Next',
            +            'Each',
            +            'FlushKb',
            +            'Exit',
            +            'Do', 'Until',
            +            'Display',
            +            'Dim',
            +            'Del',
            +            'Debug',
            +            'Copy',
            +            'Cookie1',
            +            'Color',
            +            'CLS',
            +            'CD',
            +            'Call',
            +            'Break',
            +            'Big',
            +            'Beep',
            +            ),
            +        2 => array(
            +            '@Address',
            +            '@Build',
            +            '@Color',
            +            '@Comment',
            +            '@CPU',
            +            '@CRLF',
            +            '@CSD',
            +            '@CurDir',
            +            '@Date',
            +            '@Day',
            +            '@Domain',
            +            '@DOS',
            +            '@Error',
            +            '@FullName',
            +            '@HomeDir',
            +            '@HomeDrive',
            +            '@HomeShr',
            +            '@HostName',
            +            '@InWin',
            +            '@IPaddressX',
            +            '@KiX',
            +            '@LanRoot',
            +            '@LDomain',
            +            '@LDrive',
            +            '@LM',
            +            '@LogonMode',
            +            '@LongHomeDir',
            +            '@LServer',
            +            '@MaxPWAge',
            +            '@MDayNo',
            +            '@MHz',
            +            '@MonthNo',
            +            '@Month',
            +            '@MSecs',
            +            '@OnWoW64',
            +            '@PID',
            +            '@PrimaryGroup',
            +            '@Priv',
            +            '@ProductSuite',
            +            '@ProductType',
            +            '@PWAge',
            +            '@RAS',
            +            '@Result',
            +            '@RServer',
            +            '@ScriptDir',
            +            '@ScriptExe',
            +            '@ScriptName',
            +            '@SError',
            +            '@SID',
            +            '@Site',
            +            '@StartDir',
            +            '@SysLang',
            +            '@Ticks',
            +            '@Time',
            +            '@TsSession',
            +            '@UserID',
            +            '@UserLang',
            +            '@WDayNo',
            +            '@Wksta',
            +            '@WUserID',
            +            '@YDayNo',
            +            '@Year',
            +            ),
            +        3 => array(
            +            'WriteValue',
            +            'WriteProfileString',
            +            'WriteLine',
            +            'VarTypeName',
            +            'VarType',
            +            'Val',
            +            'UnloadHive',
            +            'UCase',
            +            'Ubound',
            +            'Trim',
            +            'Substr',
            +            'SRnd',
            +            'Split',
            +            'SidToName',
            +            'ShutDown',
            +            'ShowProgramGroup',
            +            'SetWallpaper',
            +            'SetTitle',
            +            'SetSystemState',
            +            'SetOption',
            +            'SetFocus',
            +            'SetFileAttr',
            +            'SetDefaultPrinter',
            +            'SetConsole',
            +            'SetAscii',
            +            'SendMessage',
            +            'SendKeys',
            +            'SaveKey',
            +            'RTrim',
            +            'Round',
            +            'Rnd',
            +            'Right',
            +            'RedirectOutput',
            +            'ReadValue',
            +            'ReadType',
            +            'ReadProfileString',
            +            'ReadLine',
            +            'Open',
            +            'MessageBox',
            +            'MemorySize',
            +            'LTrim',
            +            'Logoff',
            +            'LogEvent',
            +            'LoadKey',
            +            'LoadHive',
            +            'Len',
            +            'Left',
            +            'LCase',
            +            'KeyExist',
            +            'KbHit',
            +            'Join',
            +            'IsDeclared',
            +            'Int',
            +            'InStrRev',
            +            'InStr',
            +            'InGroup',
            +            'IIF',
            +            'GetObject',
            +            'GetFileVersion',
            +            'GetFileTime',
            +            'GetFileSize',
            +            'GetFileAttr',
            +            'GetDiskSpace',
            +            'FreeFileHandle',
            +            'FormatNumber',
            +            'Fix',
            +            'ExpandEnvironmentVars',
            +            'Exist',
            +            'Execute',
            +            'EnumValue',
            +            'EnumLocalGroup',
            +            'EnumKey',
            +            'EnumIpInfo',
            +            'EnumGroup',
            +            'Dir',
            +            'DelValue',
            +            'DelTree',
            +            'DelProgramItem',
            +            'DelProgramGroup',
            +            'DelPrinterConnection',
            +            'DelKey',
            +            'DecToHex',
            +            'CStr',
            +            'CreateObject',
            +            'CompareFileTimes',
            +            'Close',
            +            'ClearEventLog',
            +            'CInt',
            +            'Chr',
            +            'CDbl',
            +            'Box',
            +            'BackupEventLog',
            +            'At',
            +            'AScan',
            +            'Asc',
            +            'AddProgramItem',
            +            'AddProgramGroup',
            +            'AddPrinterConnection',
            +            'AddKey',
            +            'Abs'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '[', ']', '?', ':', '+', '-', '*', '/', '&', '|', '^', '~', '<', '>', '='
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;',
            +            2 => 'color: #000000; font-weight: bold;',
            +            3 => 'color: #000066;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #006600;',
            +            2 => 'color: #006600;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => 'http://www.kixtart.org/manual/Commands/{FNAMEL}.htm',
            +        2 => '',
            +        3 => 'http://www.kixtart.org/manual/Functions/{FNAMEL}.htm'
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        0 => true,
            +        1 => true,
            +        2 => true,
            +        3 => true
            +        ),
            +    'TAB_WIDTH' => 4
            +);
            diff --git a/vendor/easybook/geshi/geshi/klonec.php b/vendor/easybook/geshi/geshi/klonec.php
            new file mode 100644
            index 0000000000..4831b13b7b
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/klonec.php
            @@ -0,0 +1,280 @@
            + 'KLone C',
            +    'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),//#pour precede les include de C
            +    'COMMENT_MULTI' => array('/*' => '*/', '' ),//comentaires C et KLone suivi de ceux pour HTML
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(//mots-cles C
            +            'if', 'return', 'while', 'case', 'class', 'continue', 'default',
            +            'do', 'else', 'for', 'switch', 'goto',
            +            'null', 'break', 'true', 'enum', 'extern', 'inline', 'false'
            +            ),
            +        2 => array(//mots-cles KLone
            +            'out', 'request', 'response',
            +            ),
            +        3 => array(//fonctions C usuelles
            +            'printf', 'malloc', 'fopen', 'fclose', 'free', 'fputs', 'fgets', 'feof', 'fwrite',
            +            'perror', 'ferror', 'qsort', 'stats', 'sscanf', 'scanf',
            +            'strdup', 'strcpy', 'strcmp', 'strncpy', 'strcasecmp', 'cat', 'strcat', 'strstr',
            +            'strlen', 'strtof', 'strtod', 'strtok', 'towlower', 'towupper',
            +            'cd', 'system', 'exit', 'exec', 'fork', 'vfork', 'kill', 'signal', 'syslog',
            +            'usleep', 'utime', 'wait', 'waitpid', 'waitid',
            +            'ceil', 'eval', 'round', 'floor',
            +            'atoi', 'atol', 'abs', 'cos', 'sin', 'tan', 'acos', 'asin', 'atan', 'exp',
            +            'time', 'ctime', 'localtime', 'asctime', 'gmtime', 'difftime', 'date'
            +            ),
            +        4 => array(//fonctions KLone usuelles
            +            'request_get_cookies', 'request_get_cookie', 'request_get_args', 'request_get_arg',
            +            'request_io', 'request_get_uri', 'request_get_filename', 'request_get_query_string', 'request_get_path_info',
            +            'request_get_if_modified_since', 'request_get_http', 'request_get_client_request',
            +            'request_get_content_length', 'request_get_uploads', 'request_get_uploaded_file',
            +            'request_get_method', 'request_get_protocol', 'request_get_resolved_filename',
            +            'request_get_resolved_path_info', 'request_get_addr', 'request_get_peer_addr',
            +            'request_get_header', 'request_get_field', 'request_get_field_value',
            +            'response_set_content_encoding', 'response_disable_caching', 'response_enable_caching',
            +            'response_set_cookie', 'response_set_method', 'response_get_method',
            +            'response_print_header', 'response_set_field', 'response_del_field',
            +            'response_set_content_type', 'response_set_date', 'response_set_last_modified',
            +            'response_set_content_length', 'response_get_status', 'response_get_header',
            +            'response_io', 'response_redirect', 'response_set_status',
            +            'session_get_vars', 'session_get', 'session_set', 'session_age', 'session_clean', 'session_del',
            +            'io_type', 'io_pipe', 'io_dup', 'io_copy', 'io_seek', 'io_tell', 'io_close',
            +            'io_free', 'io_read', 'io_printf', 'io_flush', 'io_write', 'io_putc', 'io_getc',
            +            'io_get_until', 'io_gets', 'io_codec_add_head', 'io_codec_add_tail',
            +            'io_codecs_remove', 'io_name_set', 'io_name_get'
            +            ),
            +        5 => array(//types C
            +            'auto', 'char', 'const', 'double',  'float', 'int', 'long',
            +            'register', 'short', 'signed', 'sizeof', 'static', 'string', 'struct',
            +            'typedef', 'union', 'unsigned', 'void', 'volatile',
            +            'wchar_t', 'time_t', 'FILE'
            +            ),
            +        6 => array(//mots-cles HTML
            +            'a', 'abbr', 'acronym', 'address', 'applet',
            +
            +            'base', 'basefont', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'b',
            +
            +            'caption', 'center', 'cite', 'code', 'colgroup', 'col',
            +
            +            'dd', 'del', 'dfn', 'dir', 'div', 'dl', 'dt',
            +
            +            'em',
            +
            +            'fieldset', 'font', 'form', 'frame', 'frameset',
            +
            +            'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'html',
            +
            +            'iframe', 'ilayer', 'img', 'input', 'ins', 'isindex', 'i',
            +
            +            'kbd',
            +
            +            'label', 'legend', 'link', 'li',
            +
            +            'map', 'meta',
            +
            +            'noframes', 'noscript',
            +
            +            'object', 'ol', 'optgroup', 'option',
            +
            +            'param', 'pre', 'p',
            +
            +            'q',
            +
            +            'samp', 'script', 'select', 'small', 'span', 'strike', 'strong', 'style', 'sub', 'sup', 's',
            +
            +            'table', 'tbody', 'td', 'textarea', 'text', 'tfoot', 'thead', 'th', 'title', 'tr', 'tt',
            +
            +            'ul', 'u',
            +
            +            'var',
            +            ),
            +        7 => array(//autres mots-cles HTML
            +            'abbr', 'accept-charset', 'accept', 'accesskey', 'action', 'align', 'alink', 'alt', 'archive', 'axis',
            +            'background', 'bgcolor', 'border',
            +            'cellpadding', 'cellspacing', 'char', 'charoff', 'charset', 'checked', 'cite', 'class', 'classid', 'clear', 'code', 'codebase', 'codetype', 'color', 'cols', 'colspan', 'compact', 'content', 'coords',
            +            'data', 'datetime', 'declare', 'defer', 'dir', 'disabled',
            +            'enctype',
            +            'face', 'for', 'frame', 'frameborder',
            +            'headers', 'height', 'href', 'hreflang', 'hspace', 'http-equiv',
            +            'id', 'ismap',
            +            'label', 'lang', 'language', 'link', 'longdesc',
            +            'marginheight', 'marginwidth', 'maxlength', 'media', 'method', 'multiple',
            +            'name', 'nohref', 'noresize', 'noshade', 'nowrap',
            +            'object', 'onblur', 'onchange', 'onclick', 'ondblclick', 'onfocus', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onreset', 'onselect', 'onsubmit', 'onunload',
            +            'profile', 'prompt',
            +            'readonly', 'rel', 'rev', 'rowspan', 'rows', 'rules',
            +            'scheme', 'scope', 'scrolling', 'selected', 'shape', 'size', 'span', 'src', 'standby', 'start', 'style', 'summary',
            +            'tabindex', 'target', 'text', 'title', 'type',
            +            'usemap',
            +            'valign', 'value', 'valuetype', 'version', 'vlink', 'vspace',
            +            'width'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        1 => array(
            +            '<%=', '<%!', '<%', '%>'
            +            ),
            +        0 => array(
            +            '(', ')', '[', ']', '{', '}',
            +            '!', '%', '&', '|', '/',
            +            '<', '>',
            +            '=', '-', '+', '*',
            +            '.', ':', ',', ';', '^'
            +            )
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        5 => false,
            +        6 => false,
            +        7 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100; font-weight: bold;',//pour les mots-cles C
            +            2 => 'color: #000000; font-weight: bold;',//pour les mots-cles KLone
            +            3 => 'color: #6600FF;',//pour les fonctions C
            +            4 => 'color: #6600FF;',//pour les fonctions Klone
            +            5 => 'color: #0099FF; font-weight: bold;',//pour les types C
            +            6 => 'color: #990099; font-weight: bold;',//pour les mots-cles HTML
            +            7 => 'color: #000066;'//pour les autres mots-cles HTML
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;',//commentaire sur une ligne C et KLone
            +            2 => 'color: #339933;',//pour les #... en C
            +            'MULTI' => 'color: #808080; font-style: italic;'//commentaire sur plusieurs lignes C et KLone
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #006600;',
            +            2 => 'color: #006600;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #000000;',
            +            1 => 'color: #000000; font-weight: bold;'
            +            ),
            +        'REGEXPS' => array(),
            +        'SCRIPT' => array(
            +            0 => 'background-color:#ffccff; font-weight: bold; color:#000000;',
            +            1 => '',
            +            2 => '',
            +            3 => 'color: #00bbdd; font-weight: bold;',
            +            4 => 'color: #ddbb00;',
            +            5 => 'color: #009900;'
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => 'http://www.opengroup.org/onlinepubs/009695399/functions/{FNAMEL}.html',
            +        4 => 'http://www.koanlogic.com/klone/api/html/globals.html',
            +        5 => '',
            +        6 => 'http://december.com/html/4/element/{FNAMEL}.html',
            +        7 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.',
            +        2 => '::'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_ALWAYS,
            +    'SCRIPT_DELIMITERS' => array(
            +        //delimiteurs pour KLone
            +        0 => array(
            +            '<%=' => '%>'
            +            ),
            +        1 => array(
            +            '<%!' => '%>'
            +            ),
            +        2 => array(
            +            '<%' => '%>'
            +            ),
            +        //delimiteur pour HTML
            +        3 => array(
            +            ' '>'
            +            ),
            +        4 => array(
            +            '&' => ';'
            +            ),
            +        5 => array(
            +            '<' => '>'
            +            )
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        0 => false,
            +        1 => true,
            +        2 => true,
            +        3 => false,
            +        4 => false,
            +        5 => true
            +        ),
            +    'TAB_WIDTH' => 4,
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            6 => array(
            +                'DISALLOWED_BEFORE' => '(?<=<|<\/)',
            +                'DISALLOWED_AFTER' => '(?=\s|\/|>)',
            +            ),
            +            7 => array(
            +                'DISALLOWED_AFTER' => '(?=\s*=)',
            +            )
            +        )
            +    )
            +);
            diff --git a/vendor/easybook/geshi/geshi/klonecpp.php b/vendor/easybook/geshi/geshi/klonecpp.php
            new file mode 100644
            index 0000000000..d0368202dd
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/klonecpp.php
            @@ -0,0 +1,308 @@
            + 'KLone C++',
            +    'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),//#pour precede les include de C
            +    'COMMENT_MULTI' => array('/*' => '*/', '' ),//comentaires C et KLone suivi de ceux pour HTML
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(//mots-cles C++
            +            'if', 'return', 'while', 'case', 'continue', 'default',
            +            'do', 'else', 'for', 'switch', 'goto',
            +            'break', 'true', 'enum', 'extern', 'inline', 'false',
            +            'errno', 'stdin', 'stdout', 'stderr',
            +            'virtual', 'public', 'private', 'protected', 'template', 'using', 'namespace',
            +            'try', 'catch', 'dynamic_cast', 'const_cast', 'reinterpret_cast',
            +            'static_cast', 'explicit', 'friend', 'typename', 'typeid', 'class',
            +            'EDOM', 'ERANGE', 'FLT_RADIX', 'FLT_ROUNDS', 'FLT_DIG', 'DBL_DIG', 'LDBL_DIG',
            +            'FLT_EPSILON', 'DBL_EPSILON', 'LDBL_EPSILON', 'FLT_MANT_DIG', 'DBL_MANT_DIG',
            +            'LDBL_MANT_DIG', 'FLT_MAX', 'DBL_MAX', 'LDBL_MAX', 'FLT_MAX_EXP', 'DBL_MAX_EXP',
            +            'LDBL_MAX_EXP', 'FLT_MIN', 'DBL_MIN', 'LDBL_MIN', 'FLT_MIN_EXP', 'DBL_MIN_EXP',
            +            'LDBL_MIN_EXP', 'CHAR_BIT', 'CHAR_MAX', 'CHAR_MIN', 'SCHAR_MAX', 'SCHAR_MIN',
            +            'UCHAR_MAX', 'SHRT_MAX', 'SHRT_MIN', 'USHRT_MAX', 'INT_MAX', 'INT_MIN',
            +            'UINT_MAX', 'LONG_MAX', 'LONG_MIN', 'ULONG_MAX', 'HUGE_VAL', 'SIGABRT',
            +            'SIGFPE', 'SIGILL', 'SIGINT', 'SIGSEGV', 'SIGTERM', 'SIG_DFL', 'SIG_ERR',
            +            'SIG_IGN', 'BUFSIZ', 'EOF', 'FILENAME_MAX', 'FOPEN_MAX', 'L_tmpnam', 'NULL',
            +            'SEEK_CUR', 'SEEK_END', 'SEEK_SET', 'TMP_MAX',
            +            'EXIT_FAILURE', 'EXIT_SUCCESS', 'RAND_MAX', 'CLOCKS_PER_SEC'
            +            ),
            +        2 => array(//mots-cles KLone
            +            'out', 'request', 'response',
            +            ),
            +        3 => array(//fonctions C++ usuelles
            +            'cin', 'cerr', 'clog', 'cout', 'delete', 'new', 'this',
            +            'printf', 'fprintf', 'snprintf', 'sprintf', 'assert',
            +            'isalnum', 'isalpha', 'isdigit', 'iscntrl', 'isgraph', 'islower', 'isprint',
            +            'ispunct', 'isspace', 'isupper', 'isxdigit', 'tolower', 'toupper',
            +            'exp', 'log', 'log10', 'pow', 'sqrt', 'ceil', 'floor', 'fabs', 'ldexp',
            +            'frexp', 'modf', 'fmod', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'atan2',
            +            'sinh', 'cosh', 'tanh', 'setjmp', 'longjmp',
            +            'va_start', 'va_arg', 'va_end', 'offsetof', 'sizeof', 'fopen', 'freopen',
            +            'fflush', 'fclose', 'remove', 'rename', 'tmpfile', 'tmpname', 'setvbuf',
            +            'setbuf', 'vfprintf', 'vprintf', 'vsprintf', 'fscanf', 'scanf', 'sscanf',
            +            'fgetc', 'fgets', 'fputc', 'fputs', 'getc', 'getchar', 'gets', 'putc',
            +            'putchar', 'puts', 'ungetc', 'fread', 'fwrite', 'fseek', 'ftell', 'rewind',
            +            'fgetpos', 'fsetpos', 'clearerr', 'feof', 'ferror', 'perror', 'abs', 'labs',
            +            'div', 'ldiv', 'atof', 'atoi', 'atol', 'strtod', 'strtol', 'strtoul', 'calloc',
            +            'malloc', 'realloc', 'free', 'abort', 'exit', 'atexit', 'system', 'getenv',
            +            'bsearch', 'qsort', 'rand', 'srand', 'strcpy', 'strncpy', 'strcat', 'strncat',
            +            'strcmp', 'strncmp', 'strcoll', 'strchr', 'strrchr', 'strspn', 'strcspn',
            +            'strpbrk', 'strstr', 'strlen', 'strerror', 'strtok', 'strxfrm', 'memcpy',
            +            'memmove', 'memcmp', 'memchr', 'memset', 'clock', 'time', 'difftime', 'mktime',
            +            'asctime', 'ctime', 'gmtime', 'localtime', 'strftime'
            +            ),
            +        4 => array(//fonctions KLone usuelles
            +            'request_get_cookies', 'request_get_cookie', 'request_get_args', 'request_get_arg',
            +            'request_io', 'request_get_uri', 'request_get_filename', 'request_get_query_string', 'request_get_path_info',
            +            'request_get_if_modified_since', 'request_get_http', 'request_get_client_request',
            +            'request_get_content_length', 'request_get_uploads', 'request_get_uploaded_file',
            +            'request_get_method', 'request_get_protocol', 'request_get_resolved_filename',
            +            'request_get_resolved_path_info', 'request_get_addr', 'request_get_peer_addr',
            +            'request_get_header', 'request_get_field', 'request_get_field_value',
            +            'response_set_content_encoding', 'response_disable_caching', 'response_enable_caching',
            +            'response_set_cookie', 'response_set_method', 'response_get_method',
            +            'response_print_header', 'response_set_field', 'response_del_field',
            +            'response_set_content_type', 'response_set_date', 'response_set_last_modified',
            +            'response_set_content_length', 'response_get_status', 'response_get_header',
            +            'response_io', 'response_redirect', 'response_set_status',
            +            'session_get_vars', 'session_get', 'session_set', 'session_age', 'session_clean', 'session_del',
            +            'io_type', 'io_pipe', 'io_dup', 'io_copy', 'io_seek', 'io_tell', 'io_close',
            +            'io_free', 'io_read', 'io_printf', 'io_flush', 'io_write', 'io_putc', 'io_getc',
            +            'io_get_until', 'io_gets', 'io_codec_add_head', 'io_codec_add_tail',
            +            'io_codecs_remove', 'io_name_set', 'io_name_get'
            +            ),
            +        5 => array(//types C++
            +            'auto', 'bool', 'char', 'const', 'double', 'float', 'int', 'long', 'longint',
            +            'register', 'short', 'shortint', 'signed', 'static', 'struct',
            +            'typedef', 'union', 'unsigned', 'void', 'volatile', 'jmp_buf',
            +            'signal', 'raise', 'va_list', 'ptrdiff_t', 'size_t', 'FILE', 'fpos_t',
            +            'div_t', 'ldiv_t', 'clock_t', 'time_t', 'tm',
            +            'string', 'wchar_t'
            +            ),
            +        6 => array(//mots-cles HTML
            +            'a', 'abbr', 'acronym', 'address', 'applet',
            +
            +            'base', 'basefont', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'b',
            +
            +            'caption', 'center', 'cite', 'code', 'colgroup', 'col',
            +
            +            'dd', 'del', 'dfn', 'dir', 'div', 'dl', 'dt',
            +
            +            'em',
            +
            +            'fieldset', 'font', 'form', 'frame', 'frameset',
            +
            +            'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'html',
            +
            +            'iframe', 'ilayer', 'img', 'input', 'ins', 'isindex', 'i',
            +
            +            'kbd',
            +
            +            'label', 'legend', 'link', 'li',
            +
            +            'map', 'meta',
            +
            +            'noframes', 'noscript',
            +
            +            'object', 'ol', 'optgroup', 'option',
            +
            +            'param', 'pre', 'p',
            +
            +            'q',
            +
            +            'samp', 'script', 'select', 'small', 'span', 'strike', 'strong', 'style', 'sub', 'sup', 's',
            +
            +            'table', 'tbody', 'td', 'textarea', 'text', 'tfoot', 'thead', 'th', 'title', 'tr', 'tt',
            +
            +            'ul', 'u',
            +
            +            'var',
            +            ),
            +        7 => array(//autres mots-cles HTML
            +            'abbr', 'accept-charset', 'accept', 'accesskey', 'action', 'align', 'alink', 'alt', 'archive', 'axis',
            +            'background', 'bgcolor', 'border',
            +            'cellpadding', 'cellspacing', 'char', 'charoff', 'charset', 'checked', 'cite', 'class', 'classid', 'clear', 'code', 'codebase', 'codetype', 'color', 'cols', 'colspan', 'compact', 'content', 'coords',
            +            'data', 'datetime', 'declare', 'defer', 'dir', 'disabled',
            +            'enctype',
            +            'face', 'for', 'frame', 'frameborder',
            +            'headers', 'height', 'href', 'hreflang', 'hspace', 'http-equiv',
            +            'id', 'ismap',
            +            'label', 'lang', 'language', 'link', 'longdesc',
            +            'marginheight', 'marginwidth', 'maxlength', 'media', 'method', 'multiple',
            +            'name', 'nohref', 'noresize', 'noshade', 'nowrap',
            +            'object', 'onblur', 'onchange', 'onclick', 'ondblclick', 'onfocus', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onreset', 'onselect', 'onsubmit', 'onunload',
            +            'profile', 'prompt',
            +            'readonly', 'rel', 'rev', 'rowspan', 'rows', 'rules',
            +            'scheme', 'scope', 'scrolling', 'selected', 'shape', 'size', 'span', 'src', 'standby', 'start', 'style', 'summary',
            +            'tabindex', 'target', 'text', 'title', 'type',
            +            'usemap',
            +            'valign', 'value', 'valuetype', 'version', 'vlink', 'vspace',
            +            'width'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        1 => array(
            +            '<%=', '<%!', '<%', '%>'
            +            ),
            +        0 => array(
            +            '(', ')', '[', ']', '{', '}',
            +            '!', '%', '&', '|', '/',
            +            '<', '>',
            +            '=', '-', '+', '*',
            +            '.', ':', ',', ';', '^'
            +            )
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        5 => false,
            +        6 => false,
            +        7 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100; font-weight: bold;',//pour les mots-cles C++
            +            2 => 'color: #000000; font-weight: bold;',//pour les mots-cles KLone
            +            3 => 'color: #6600FF;',//pour les fonctions C++
            +            4 => 'color: #6600FF;',//pour les fonctions Klone
            +            5 => 'color: #0099FF; font-weight: bold;',//pour les types C++
            +            6 => 'color: #990099; font-weight: bold;',//pour les mots-cles HTML
            +            7 => 'color: #000066;'//pour les autres mots-cles HTML
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;',//commentaire sur une ligne C++ et KLone
            +            2 => 'color: #339933;',//pour les #... en C++
            +            'MULTI' => 'color: #808080; font-style: italic;'//commentaire sur plusieurs lignes C++ et KLone
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #006600;',
            +            2 => 'color: #006600;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #000000;',
            +            1 => 'color: #000000; font-weight: bold;'
            +            ),
            +        'REGEXPS' => array(),
            +        'SCRIPT' => array(
            +            0 => 'background-color:#ffccff; font-weight: bold; color:#000000;',
            +            1 => '',
            +            2 => '',
            +            3 => 'color: #00bbdd; font-weight: bold;',
            +            4 => 'color: #ddbb00;',
            +            5 => 'color: #009900;'
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => 'http://www.opengroup.org/onlinepubs/009695399/functions/{FNAMEL}.html',
            +        4 => 'http://www.koanlogic.com/klone/api/html/globals.html',
            +        5 => '',
            +        6 => 'http://december.com/html/4/element/{FNAMEL}.html',
            +        7 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.',
            +        2 => '::'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_ALWAYS,
            +    'SCRIPT_DELIMITERS' => array(
            +        //delimiteurs pour KLone
            +        0 => array(
            +            '<%=' => '%>'
            +            ),
            +        1 => array(
            +            '<%!' => '%>'
            +            ),
            +        2 => array(
            +            '<%' => '%>'
            +            ),
            +        //delimiteur pour HTML
            +        3 => array(
            +            ' '>'
            +            ),
            +        4 => array(
            +            '&' => ';'
            +            ),
            +        5 => array(
            +            '<' => '>'
            +            )
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        0 => false,
            +        1 => true,
            +        2 => true,
            +        3 => false,
            +        4 => false,
            +        5 => true
            +        ),
            +    'TAB_WIDTH' => 4,
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            6 => array(
            +                'DISALLOWED_BEFORE' => '(?<=<|<\/)',
            +                'DISALLOWED_AFTER' => '(?=\s|\/|>)',
            +            ),
            +            7 => array(
            +                'DISALLOWED_AFTER' => '(?=\s*=)',
            +            )
            +        )
            +    )
            +);
            diff --git a/vendor/easybook/geshi/geshi/latex.php b/vendor/easybook/geshi/geshi/latex.php
            new file mode 100644
            index 0000000000..6925a16f0a
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/latex.php
            @@ -0,0 +1,222 @@
            + 'LaTeX',
            +    'COMMENT_SINGLE' => array(
            +        1 => '%'
            +        ),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array(),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'addlinespace','and','address','appendix','author','backmatter',
            +            'bfseries','bibitem','bigskip','blindtext','caption','captionabove',
            +            'captionbelow','cdot','centering','chapter','cite','color',
            +            'colorbox','date','dedication','def','definecolor','documentclass',
            +            'edef','else','email','emph','eqref','extratitle','fbox','fi',
            +            'flushleft','flushright','footnote','frac','frontmatter',
            +            'graphicspath','hfil','hfill','hfilll','hline','hspace','huge','ifx','include',
            +            'includegraphics','infty','input','int','item','itemsep',
            +            'KOMAoption','KOMAoptions','label','LaTeX','left','let','limits',
            +            'listfiles','listoffigures','listoftables','lowertitleback',
            +            'mainmatter','makeatletter','makeatother','makebox','makeindex',
            +            'maketitle','mbox','mediumskip','newcommand','newenvironment',
            +            'newpage','nocite','nonumber','pagestyle','par','paragraph',
            +            'parbox','parident','parskip','partial','publishers','raggedleft',
            +            'raggedright','raisebox','ref','renewcommand','renewenvironment',
            +            'right','rule','section','setlength','sffamily','subject',
            +            'subparagraph','subsection','subsubsection','subtitle','sum',
            +            'table','tableofcontents','textbf','textcolor','textit',
            +            'textnormal','textsuperscript','texttt','textwidth','thanks','title',
            +            'titlehead','today','ttfamily','uppertitleback','urlstyle',
            +            'usepackage','vfil','vfill','vfilll','vspace'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        "&", "\\", "{", "}", "[", "]"
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        1 => true,
            +        GESHI_COMMENTS => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #800000;',
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #2C922C; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 =>  'color: #000000; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            ),
            +        'STRINGS' => array(
            +            0 =>  'color: #000000;'
            +            ),
            +        'NUMBERS' => array(
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 =>  'color: #E02020; '
            +            ),
            +        'REGEXPS' => array(
            +            1 => 'color: #8020E0; font-weight: normal;',  // Math inner
            +            2 => 'color: #C08020; font-weight: normal;', // [Option]
            +            3 => 'color: #8020E0; font-weight: normal;', // Maths
            +            4 => 'color: #800000; font-weight: normal;', // Structure: Labels
            +            5 => 'color: #00008B; font-weight: bold;',  // Structure (\section{->x<-})
            +            6 => 'color: #800000; font-weight: normal;', // Structure (\section)
            +            7 => 'color: #0000D0; font-weight: normal;', // Environment \end or \begin{->x<-} (brighter blue)
            +            8 => 'color: #C00000; font-weight: normal;', // Structure \end or \begin
            +            9 => 'color: #2020C0; font-weight: normal;', // {...}
            +            10 => 'color: #800000; font-weight: normal;', // \%, \& etc.
            +            11 => 'color: #E00000; font-weight: normal;', // \@keyword
            +            12 => 'color: #800000; font-weight: normal;', // \keyword
            +        ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => 'http://www.golatex.de/wiki/index.php?title=%5C{FNAME}',
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        // Math inner
            +        1 => array(
            +            GESHI_SEARCH => "(\\\\begin\\{(equation|displaymath|eqnarray|subeqnarray|math|multline|gather|align|alignat|flalign)\\})(.*)(\\\\end\\{\\2\\})",
            +            GESHI_REPLACE => '\3',
            +            GESHI_MODIFIERS => 'Us',
            +            GESHI_BEFORE => '\1',
            +            GESHI_AFTER => '\4'
            +            ),
            +        // [options]
            +        2 => array(
            +            GESHI_SEARCH => "(?<=\[).*(?=\])",
            +            GESHI_REPLACE => '\0',
            +            GESHI_MODIFIERS => 'Us',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        // Math mode with $ ... $
            +        3 => array(
            +            GESHI_SEARCH => "\\$.+\\$",
            +            GESHI_REPLACE => '\0',
            +            GESHI_MODIFIERS => 'Us',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        // Structure: Label
            +        4 => "\\\\(?:label|pageref|ref|cite)(?=[^a-zA-Z])",
            +        // Structure: sections
            +        5 => array(
            +            GESHI_SEARCH => "(\\\\(?:part|chapter|(?:sub){0,2}section|(?:sub)?paragraph|addpart|addchap|addsec)\*?\\{)(.*)(?=\\})",
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => 'U',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => ''
            +            ),
            +        // Structure: sections
            +        6 => "\\\\(?:part|chapter|(?:sub){0,2}section|(?:sub)?paragraph|addpart|addchap|addsec)\*?(?=[^a-zA-Z])",
            +        // environment \begin{} and \end{} (i.e. the things inside the {})
            +        7 => array(
            +            GESHI_SEARCH => "(\\\\(?:begin|end)\\{)(.*)(?=\\})",
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => 'U',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => ''
            +            ),
            +        // Structure \begin and \end
            +        8 => "\\\\(?:end|begin)(?=[^a-zA-Z])",
            +        // {parameters}
            +        9 => array(
            +            GESHI_SEARCH => "(?<=\\{)(?!<\|!REG3XP5!>).*?(?=\\})",
            +            GESHI_REPLACE => '\0',
            +            GESHI_MODIFIERS => 'Us',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        // \%, \& usw.
            +        10 => "\\\\(?:[_$%]|&)",
            +        //  \@keywords
            +        11 => "(?)\\\\@[a-zA-Z]+\*?",
            +        // \keywords
            +        12 => "(?)\\\\[a-zA-Z]+\*?",
            +
            +// ---------------------------------------------
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'PARSER_CONTROL' => array(
            +        'COMMENTS' => array(
            +            'DISALLOWED_BEFORE' => '\\'
            +        ),
            +        'KEYWORDS' => array(
            +            'DISALLOWED_BEFORE' => "(?<=\\\\)",
            +            'DISALLOWED_AFTER' => "(?![A-Za-z0-9])"
            +        ),
            +        'ENABLE_FLAGS' => array(
            +            'NUMBERS' => GESHI_NEVER,
            +            'BRACKETS' => GESHI_NEVER
            +        )
            +    )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/lb.php b/vendor/easybook/geshi/geshi/lb.php
            new file mode 100644
            index 0000000000..8746ad26de
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/lb.php
            @@ -0,0 +1,161 @@
            + 'Liberty BASIC',
            +    'COMMENT_SINGLE' => array(1 => '\''),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'and', 'append', 'as', 'beep', 'bmpbutton', 'bmpsave', 'boolean',
            +            'button', 'byref', 'call', 'callback', 'calldll', 'callfn', 'case',
            +            'checkbox', 'close', 'cls', 'colordialog', 'combobox', 'confirm',
            +            'cursor', 'data', 'dialog', 'dim', 'dll', 'do', 'double', 'dump',
            +            'dword', 'else', 'end', 'error', 'exit', 'field', 'filedialog',
            +            'files', 'fontdialog', 'for', 'function', 'get', 'gettrim',
            +            'global', 'gosub', 'goto', 'graphicbox', 'graphics', 'groupbox',
            +            'if', 'input', 'kill', 'let', 'line', 'listbox', 'loadbmp',
            +            'locate', 'long', 'loop', 'lprint', 'mainwin', 'maphandle', 'menu',
            +            'mod', 'name', 'next', 'nomainwin', 'none', 'notice', 'on',
            +            'oncomerror', 'or', 'open', 'out', 'output', 'password', 'playmidi',
            +            'playwave', 'popupmenu', 'print', 'printerdialog', 'prompt', 'ptr',
            +            'put', 'radiobutton', 'random', 'randomize', 'read', 'readjoystick',
            +            'redim', 'rem', 'restore', 'resume', 'return', 'run', 'scan',
            +            'seek', 'select', 'short', 'sort', 'statictext', 'stop', 'stopmidi',
            +            'struct', 'stylebits', 'sub', 'text', 'textbox', 'texteditor',
            +            'then', 'timer', 'titlebar', 'to', 'trace', 'ulong', 'unloadbmp',
            +            'until', 'ushort', 'void', 'wait', 'window', 'wend', 'while',
            +            'word', 'xor'
            +            ),
            +        2 => array(
            +            'abs', 'acs', 'asc', 'asn', 'atn', 'chr$', 'cos', 'date$',
            +            'dechex$', 'eof', 'eval', 'eval$', 'exp', 'hbmp', 'hexdec', 'hwnd',
            +            'inp', 'input$', 'inputto$', 'instr', 'int', 'left$', 'len', 'lof',
            +            'log', 'lower$', 'max', 'midipos', 'mid$', 'min', 'mkdir', 'not',
            +            'right$', 'rmdir', 'rnd', 'sin', 'space$', 'sqr', 'str$', 'tab',
            +            'tan', 'time$', 'trim$', 'txcount', 'upper$', 'using', 'val',
            +            'winstring', 'word$'
            +            ),
            +        3 => array(
            +            'BackgroundColor$', 'Com', 'ComboboxColor$', 'ComError', 'ComErrorNumber',
            +            'CommandLine$', 'ComPortNumber', 'DefaultDir$',
            +            'DisplayHeight', 'DisplayWidth', 'Drives$', 'Err', 'Err$',
            +            'ForegroundColor$', 'Inkey$', 'Joy1x', 'Joy1y', 'Joy1z',
            +            'Joy1button1', 'Joy1button2', 'Joy2x', 'Joy2y', 'Joy2z',
            +            'Joy2button1', 'Joy2button2', 'ListboxColor$', 'MouseX', 'MouseY', 'Platform$',
            +            'PrintCollate', 'PrintCopies', 'PrinterFont$', 'PrinterName$', 'StartupDir$',
            +            'TextboxColor$', 'TexteditorColor$', 'Version$', 'WindowHeight',
            +            'WindowWidth', 'UpperLeftX', 'UpperLeftY'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        1 => array(
            +            '(', ')', '[', ']', '+', '-', '*', '/', '%', '=', '<', '>', ':', ',', '#'
            +            )
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0000FF;',
            +            2 => 'color: #AD0080;',
            +            3 => 'color: #008080;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; font-style: italic;',
            +            'MULTI' => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #008000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #FF0000;',
            +            ),
            +        'METHODS' => array(
            +            0 => 'color: #004000;'
            +            ),
            +        'SYMBOLS' => array(
            +            1 => 'color: #339933;'
            +            ),
            +        'REGEXPS' => array(),
            +        'SCRIPT' => array()
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(),
            +    'REGEXPS' => array(),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(),
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            2 => array(
            +                //In LB, the second keyword list is a list of built-in functions,
            +                //and their names should not be highlighted unless being used
            +                //as a function name.
            +                'DISALLOWED_AFTER' => '(?=\s*\()'
            +                )
            +            )
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/ldif.php b/vendor/easybook/geshi/geshi/ldif.php
            new file mode 100644
            index 0000000000..c085683958
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/ldif.php
            @@ -0,0 +1,115 @@
            + 'LDIF',
            +    'COMMENT_SINGLE' => array(1 => '#'),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array(),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        ),
            +    'SYMBOLS' => array(
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => ''
            +            ),
            +        'BRACKETS' => array(
            +            0 => ''
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #933;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => ''
            +            ),
            +        'METHODS' => array(
            +            0 => ''
            +            ),
            +        'SYMBOLS' => array(
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #000066; font-weight: bold;',
            +            1 => 'color: #FF0000;'
            +            ),
            +        'SCRIPT' => array(
            +            0 => ''
            +            )
            +        ),
            +    'URLS' => array(
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        0 => array(
            +            GESHI_SEARCH => '([a-zA-Z0-9_]+):(.+)',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ':\\2'
            +            ),
            +        1 => array(
            +            // Evil hackery to get around GeSHi bug: <>" and ; are added so s can be matched
            +            // Explicit match on variable names because if a comment is before the first < of the span
            +            // gets chewed up...
            +            GESHI_SEARCH => '([<>";a-zA-Z0-9_]+):(.+)',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\\1:',
            +            GESHI_AFTER => ''
            +            )
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/lisp.php b/vendor/easybook/geshi/geshi/lisp.php
            new file mode 100644
            index 0000000000..a2301914e0
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/lisp.php
            @@ -0,0 +1,147 @@
            + 'Lisp',
            +    'COMMENT_SINGLE' => array(1 => ';'),
            +    'COMMENT_MULTI' => array(';|' => '|;'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'not','defun','princ','when',
            +            'eval','apply','funcall','quote','identity','function',
            +            'complement','backquote','lambda','set','setq','setf',
            +            'defmacro','gensym','make','symbol','intern',
            +            'name','value','plist','get',
            +            'getf','putprop','remprop','hash','array','aref',
            +            'car','cdr','caar','cadr','cdar','cddr','caaar','caadr','cadar',
            +            'caddr','cdaar','cdadr','cddar','cdddr','caaaar','caaadr',
            +            'caadar','caaddr','cadaar','cadadr','caddar','cadddr',
            +            'cdaaar','cdaadr','cdadar','cdaddr','cddaar','cddadr',
            +            'cdddar','cddddr','cons','list','append','reverse','last','nth',
            +            'nthcdr','member','assoc','subst','sublis','nsubst',
            +            'nsublis','remove','length',
            +            'mapc','mapcar','mapl','maplist','mapcan','mapcon','rplaca',
            +            'rplacd','nconc','delete','atom','symbolp','numberp',
            +            'boundp','null','listp','consp','minusp','zerop','plusp',
            +            'evenp','oddp','eq','eql','equal','cond','case','and','or',
            +            'let','l','if','prog','prog1','prog2','progn','go','return',
            +            'do','dolist','dotimes','catch','throw','error','cerror','break',
            +            'continue','errset','baktrace','evalhook','truncate','float',
            +            'rem','min','max','abs','sin','cos','tan','expt','exp','sqrt',
            +            'random','logand','logior','logxor','lognot','bignums','logeqv',
            +            'lognand','lognor','logorc2','logtest','logbitp','logcount',
            +            'integer','nil','parse-integer','make-list','print','write'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '{', '}', '[', ']',
            +        '!', '%', '^', '&',
            +        ' + ',' - ',' * ',' / ',
            +        '=','<','>',
            +        '.',':',',',';',
            +        '|'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            0 => 'color: #555;',
            +            1 => 'color: #555;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        '::', ':'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            'DISALLOWED_BEFORE' => '(? array(
            +            'MATCH_AFTER' => '[a-zA-Z][a-zA-Z0-9_\-]*'
            +            )
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/llvm.php b/vendor/easybook/geshi/geshi/llvm.php
            new file mode 100644
            index 0000000000..b0fbce72d3
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/llvm.php
            @@ -0,0 +1,384 @@
            + 'LLVM Intermediate Representation',
            +    'COMMENT_SINGLE' => array(1 => ';'),
            +    'COMMENT_MULTI' => array(),
            +    'HARDQUOTE' => array("\"", "\""),
            +    'HARDESCAPE' => array("\"", "\\"),
            +    'HARDCHAR' => "\\",
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '',
            +    'ESCAPE_REGEXP' => array(
            +        //Simple Single Char Escapes
            +        // 1 => "#\\\\[nfrtv\$\"\n\\\\]#i",
            +        //Hexadecimal Char Specs
            +        // 2 => "#\\\\x[\da-fA-F]{1,2}#i",
            +        //Octal Char Specs
            +        // 3 => "#\\\\[0-7]{1,3}#",
            +        //String Parsing of Variable Names
            +        // 4 => "#\\$[a-z0-9_]+(?:\\[[a-z0-9_]+\\]|->[a-z0-9_]+)?|(?:\\{\\$|\\$\\{)[a-z0-9_]+(?:\\[('?)[a-z0-9_]*\\1\\]|->[a-z0-9_]+)*\\}#i",
            +        //Experimental extension supporting cascaded {${$var}} syntax
            +        // 5 => "#\$[a-z0-9_]+(?:\[[a-z0-9_]+\]|->[a-z0-9_]+)?|(?:\{\$|\$\{)[a-z0-9_]+(?:\[('?)[a-z0-9_]*\\1\]|->[a-z0-9_]+)*\}|\{\$(?R)\}#i",
            +        //Format String support in ""-Strings
            +        // 6 => "#%(?:%|(?:\d+\\\\\\\$)?\\+?(?:\x20|0|'.)?-?(?:\d+|\\*)?(?:\.\d+)?[bcdefFosuxX])#"
            +        ),
            +    'NUMBERS' =>
            +    GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_SCI_ZERO,
            +    'KEYWORDS' => array(
            +        0 => array(
            +            'to', 'nuw', 'nsw', 'align', 'inbounds', 'entry', 'return'
            +            ),
            +        //Terminator Instructions
            +        1 => array(
            +            'ret', 'br', 'switch', 'indirectbr', 'invoke', 'unwind', 'unreachable'
            +            ),
            +        //Binary Operations
            +        2 => array(
            +            'add', 'fadd', 'sub', 'fsub', 'mul', 'fmul', 'udiv', 'sdiv', 'fdiv', 'urem', 'frem', 'srem'
            +            ),
            +        //Bitwise Binary Operations
            +        3 => array(
            +            'shl', 'lshr', 'ashr', 'and', 'or', 'xor'
            +            ),
            +        //Vector Operations
            +        4 => array(
            +            'extractelement', 'insertelement', 'shufflevector'
            +            ),
            +        //Aggregate Operations
            +        5 => array(
            +            'extractvalue', 'insertvalue'
            +            ),
            +        //Memory Access and Addressing Operations
            +        6 => array(
            +            'alloca', 'load', 'store', 'getelementptr'
            +            ),
            +        //Conversion Operations
            +        7 => array(
            +            'trunc', 'zext', 'sext', 'fptrunc', 'fpext', 'fptoui', 'fptosi',
            +            'uitofp', 'sitofp', 'ptrtoint', 'inttoptr', 'bitcast'
            +            ),
            +        //Other Operations
            +        8 => array(
            +            'icmp', 'fcmp', 'phi', 'select', 'call', 'va_arg'
            +            ),
            +        //Linkage Types
            +        9 => array(
            +            'private', 'linker_private', 'linker_private_weak', 'linker_private_weak_def_auto',
            +            'internal', 'available_externally', 'linkonce', 'common', 'weak', 'appending',
            +            'extern_weak', 'linkonce_odr', 'weak_odr', 'externally visible', 'dllimport', 'dllexport',
            +            ),
            +        //Calling Conventions
            +        10 => array(
            +            'ccc', 'fastcc', 'coldcc', 'cc 10'
            +            ),
            +        //Named Types
            +        11 => array(
            +            'type'
            +            ),
            +        //Parameter Attributes
            +        12 => array(
            +            'zeroext', 'signext', 'inreg', 'byval', 'sret', 'noalias', 'nocapture', 'nest'
            +            ),
            +        //Function Attributes
            +        13 => array(
            +            'alignstack', 'alwaysinline', 'inlinehint', 'naked', 'noimplicitfloat', 'noinline', 'noredzone', 'noreturn',
            +            'nounwind', 'optsize', 'readnone', 'readonly', 'ssp', 'sspreq',
            +            ),
            +        //Module-Level Inline Assembly
            +        14 => array(
            +            'module asm'
            +            ),
            +        //Data Layout
            +        15 => array(
            +            'target datalayout'
            +            ),
            +        //Primitive Types
            +        16 => array(
            +            'x86mmx',
            +            'void',
            +            'label',
            +            'metadata',
            +            'opaque'
            +            ),
            +        //Floating Point Types
            +        17 => array(
            +            'float', 'double', 'fp128', 'x86_fp80', 'ppc_fp128',
            +            ),
            +        //Simple Constants
            +        18 => array(
            +            'false', 'true', 'null'
            +            ),
            +        //Global Variable and Function Addresses
            +        19 => array(
            +            'global', 'addrspace', 'constant', 'section'
            +            ),
            +        //Functions
            +        20 => array(
            +            'declare', 'define'
            +            ),
            +        //Complex Constants
            +        21 => array(
            +            'zeroinitializer'
            +            ),
            +        //Undefined Values
            +        22 => array(
            +            'undef'
            +            ),
            +        //Addresses of Basic Blocks
            +        23 => array(
            +            'blockaddress'
            +            ),
            +        //Visibility Styles
            +        24 => array(
            +            'default', 'hidden', 'protected'
            +            ),
            +        25 => array(
            +            'volatile'
            +            ),
            +        26 => array(
            +            'tail'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        0 => array(
            +            '(', ')', '[', ']', '{', '}',
            +            '!', '@', '%', '&', '|', '/',
            +            '<', '>',
            +            '=', '-', '+', '*',
            +            '.', ':', ',', ';'
            +            )
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        5 => true,
            +        6 => true,
            +        7 => true,
            +        8 => true,
            +        9 => true,
            +        10 => true,
            +        11 => true,
            +        12 => true,
            +        13 => true,
            +        14 => true,
            +        15 => true,
            +        16 => true,
            +        17 => true,
            +        18 => true,
            +        19 => true,
            +        20 => true,
            +        21 => true,
            +        22 => true,
            +        23 => true,
            +        24 => true,
            +        25 => true,
            +        26 => true,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            0 => 'color: #209090;',
            +            1 => 'color: #0000F0;',
            +            2 => 'color: #00F000; font-weight: bold;',
            +            3 => 'color: #F00000;',
            +            4 => 'color: #00F0F0; font-weight: bold;',
            +            5 => 'color: #F000F0; font-weight: bold;',
            +            6 => 'color: #403020; font-weight: bold;',
            +            7 => 'color: #909090; font-weight: bold;',
            +            8 => 'color: #009090; font-weight: bold;',
            +            9 => 'color: #900090; font-weight: bold;',
            +            10 => 'color: #909000; font-weight: bold;',
            +            11 => 'color: #000090; font-weight: bold;',
            +            12 => 'color: #900000; font-weight: bold;',
            +            13 => 'color: #009000; font-weight: bold;',
            +            14 => 'color: #F0F090; font-weight: bold;',
            +            15 => 'color: #F090F0; font-weight: bold;',
            +            16 => 'color: #90F0F0; font-weight: bold;',
            +            17 => 'color: #9090F0; font-weight: bold;',
            +            18 => 'color: #90F090; font-weight: bold;',
            +            19 => 'color: #F09090; font-weight: bold;',
            +            20 => 'color: #4040F0; font-weight: bold;',
            +            21 => 'color: #40F040; font-weight: bold;',
            +            22 => 'color: #F04040; font-weight: bold;',
            +            23 => 'color: #F0F040; font-weight: bold;',
            +            24 => 'color: #F040F0; font-weight: bold;',
            +            25 => 'color: #40F0F0; font-weight: bold;',
            +            26 => 'color: #904040; font-weight: bold;',
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; font-style: italic;',
            +            'MULTI' => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;',
            +            1 => 'color: #000099; font-weight: bold;',
            +            2 => 'color: #660099; font-weight: bold;',
            +            3 => 'color: #660099; font-weight: bold;',
            +            4 => 'color: #006699; font-weight: bold;',
            +            5 => 'color: #006699; font-weight: bold; font-style: italic;',
            +            6 => 'color: #009933; font-weight: bold;',
            +            'HARD' => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #0000ff;',
            +            'HARD' => 'color: #0000ff;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;',
            +            GESHI_NUMBER_OCT_PREFIX => 'color: #208080;',
            +            GESHI_NUMBER_HEX_PREFIX => 'color: #208080;',
            +            GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;',
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #004000;',
            +            2 => 'color: #004000;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #339933;',
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #007088;',
            +            1 => 'color: #007088;',
            +            // 2 => 'color: #000088;',
            +            3 => 'color: #700088;',
            +            4 => 'color: #010088;',
            +            // 5 => 'color: #610088;',
            +            // 6 => 'color: #616088;',
            +            // 7 => 'color: #616988;',
            +            // 8 => 'color: #616908;',
            +            9 => 'color: #6109F8;',
            +            ),
            +        'SCRIPT' => array(
            +            0 => '',
            +            1 => '',
            +            2 => '',
            +            3 => '',
            +            4 => '',
            +            5 => ''
            +            )
            +        ),
            +    'URLS' => array(
            +        0 => '',
            +        1 => 'http://llvm.org/docs/LangRef.html#i_{FNAME}',
            +        2 => 'http://llvm.org/docs/LangRef.html#i_{FNAME}',
            +        3 => 'http://llvm.org/docs/LangRef.html#i_{FNAME}',
            +        4 => 'http://llvm.org/docs/LangRef.html#i_{FNAME}',
            +        5 => 'http://llvm.org/docs/LangRef.html#i_{FNAME}',
            +        6 => 'http://llvm.org/docs/LangRef.html#i_{FNAME}',
            +        7 => 'http://llvm.org/docs/LangRef.html#i_{FNAME}',
            +        8 => 'http://llvm.org/docs/LangRef.html#i_{FNAME}',
            +        9 => 'http://llvm.org/docs/LangRef.html#linkage_{FNAME}',
            +        10 => 'http://llvm.org/docs/LangRef.html#callingconv',
            +        11 => 'http://llvm.org/docs/LangRef.html#namedtypes',
            +        12 => 'http://llvm.org/docs/LangRef.html#paramattrs',
            +        13 => 'http://llvm.org/docs/LangRef.html#fnattrs',
            +        14 => 'http://llvm.org/docs/LangRef.html#moduleasm',
            +        15 => 'http://llvm.org/docs/LangRef.html#datalayout',
            +        16 => 'http://llvm.org/docs/LangRef.html#t_{FNAME}',
            +        17 => 'http://llvm.org/docs/LangRef.html#t_floating',
            +        18 => 'http://llvm.org/docs/LangRef.html#simpleconstants',
            +        19 => 'http://llvm.org/docs/LangRef.html#globalvars',
            +        20 => 'http://llvm.org/docs/LangRef.html#functionstructure',
            +        21 => 'http://llvm.org/docs/LangRef.html#complexconstants',
            +        22 => 'http://llvm.org/docs/LangRef.html#undefvalues',
            +        23 => 'http://llvm.org/docs/LangRef.html#blockaddress',
            +        24 => 'http://llvm.org/docs/LangRef.html#visibility',
            +        25 => 'http://llvm.org/docs/LangRef.html#volatile',
            +        26 => 'http://llvm.org/docs/LangRef.html#i_call',
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        //Variables
            +        0 => '%[-a-zA-Z$\._][-a-zA-Z$\._0-9]*',
            +        //Labels
            +        // 1 => '[-a-zA-Z$\._0-9]+:',
            +        1 => '(?]*<)',
            +        //Strings
            +        // 2 => '"[^"]+"',
            +        //Unnamed variable slots
            +        3 => '%[-]?[0-9]+',
            +        //Integer Types
            +        4 => array(
            +            GESHI_SEARCH => '(? '\\0',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        //Comments
            +        // 5 => ';.*',
            +        //Integer literals
            +        // 6 => '\\b[-]?[0-9]+\\b',
            +        //Floating point constants
            +        // 7 => '\\b[-+]?[0-9]+\.[0-9]*\([eE][-+]?[0-9]+\)?\\b',
            +        //Hex constants
            +        // 8 => '\\b0x[0-9A-Fa-f]+\\b',
            +        //Global variables
            +        9 => array(
            +            GESHI_SEARCH => '@[-a-zA-Z$\._][-a-zA-Z$\._0-9]*',
            +            GESHI_REPLACE => '\\0',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_MAYBE,
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        0 => true,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        5 => true
            +        ),
            +    'SCRIPT_DELIMITERS' => array(),
            +    'TAB_WIDTH' => 4
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/locobasic.php b/vendor/easybook/geshi/geshi/locobasic.php
            new file mode 100644
            index 0000000000..47de30e284
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/locobasic.php
            @@ -0,0 +1,129 @@
            + 'Locomotive Basic',
            +    'COMMENT_SINGLE' => array(1 => "'", 2 => 'REM'),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            "AFTER", "AND", "AUTO", "BORDER", "BREAK", "CALL", "CAT", "CHAIN",
            +            "CLEAR", "CLG", "CLS", "CLOSEIN", "CLOSEOUT", "CONT", "CURSOR",
            +            "DATA", "DEF", "DEFINT", "DEFREAL", "DEFSTR", "DEG", "DELETE",
            +            "DERR", "DI", "DIM", "DRAW", "DRAWR", "EDIT", "EI", "ELSE", "END",
            +            "ENV", "ENT", "EOF", "ERASE", "ERL", "ERR", "ERROR", "EVERY",
            +            "FILL", "FN", "FOR", "FRAME", "GOSUB", "GOTO", "GRAPHICS", "HIMEM",
            +            "IF", "INK", "INPUT", "KEY", "LET", "LINE", "LIST", "LOAD",
            +            "LOCATE", "MASK", "MEMORY", "MERGE", "MODE", "MOVE", "MOVER", "NEW",
            +            "NEXT", "NOT", "ON", "OPENIN", "OPENOUT", "OR", "ORIGIN", "PAPER",
            +            "PEEK", "PEN", "PLOT", "PLOTR", "POKE", "PRINT", "RAD", "RANDOMIZE",
            +            "READ", "RELEASE", "REMAIN", "RENUM", "RESTORE", "RESUME", "RETURN",
            +            "RUN", "SAVE", "SPEED", "SOUND", "SPC", "SQ", "STEP", "STOP", "SWAP",
            +            "SYMBOL", "TAB", "TAG", "TAGOFF", "TEST", "TESTR", "TIME", "TO",
            +            "THEN", "TRON", "TROFF", "USING", "WAIT", "WEND", "WHILE", "WIDTH",
            +            "WINDOW", "WRITE", "XOR", "ZONE"
            +            ),
            +        2 => array(
            +            "ABS", "ASC", "ATN", "BIN", "CHR", "CINT", "COPYCHR", "COS",
            +            "CREAL", "DEC", "FIX", "FRE", "EXP", "HEX", "INKEY", "INP", "INSTR",
            +            "INT", "JOY", "LEFT", "LEN", "LOG", "LOG10", "LOWER", "MAX", "MID",
            +            "MIN", "MOD", "OUT", "PI", "POS", "RIGHT", "RND", "ROUND", "SGN",
            +            "SIN", "SPACE", "SQR", "STR", "STRING", "TAN", "UNT", "UPPER",
            +            "VAL", "VPOS", "XPOS", "YPOS"
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000088; font-weight: bold;',
            +            2 => 'color: #AA00AA; font-weight: bold;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080;',
            +            2 => 'color: #808080;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #008800;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #0044ff;'
            +            ),
            +        'METHODS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099;'
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/logtalk.php b/vendor/easybook/geshi/geshi/logtalk.php
            new file mode 100644
            index 0000000000..da249eb248
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/logtalk.php
            @@ -0,0 +1,344 @@
            + 'Logtalk',
            +    'COMMENT_SINGLE' => array(1 => '%'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(2 => "/0'./sim"),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'"),
            +    'HARDQUOTE' => array('"', '"'),
            +    'HARDESCAPE' => array(),
            +    'ESCAPE_CHAR' => '',
            +    'ESCAPE_REGEXP' => array(
            +        //Simple Single Char Escapes
            +        1 => "#\\\\[\\\\abfnrtv\'\"?\n]#i",
            +        //Hexadecimal Char Specs
            +        2 => "#\\\\x[\da-fA-F]+\\\\#",
            +        //Octal Char Specs
            +        3 => "#\\\\[0-7]+\\\\#"
            +        ),
            +    'NUMBERS' =>
            +        GESHI_NUMBER_INT_BASIC |
            +        GESHI_NUMBER_BIN_PREFIX_0B |
            +        GESHI_NUMBER_OCT_PREFIX_0O |
            +        GESHI_NUMBER_HEX_PREFIX |
            +        GESHI_NUMBER_FLT_NONSCI |
            +        GESHI_NUMBER_FLT_SCI_ZERO,
            +    'KEYWORDS' => array(
            +        // Directives (with arguments)
            +        1 => array(
            +            // file directives
            +            'encoding', 'ensure_loaded',
            +            // flag directives
            +            'set_logtalk_flag', 'set_prolog_flag',
            +            // entity opening directives
            +            'category', 'object', 'protocol',
            +            // predicate scope directives
            +            'private', 'protected', 'public',
            +            // conditional compilation directives
            +            'elif', 'if',
            +            // entity directives
            +            'calls', 'initialization', 'op', 'uses',
            +            // predicate directives
            +            'alias', 'coinductive', 'discontiguous', 'dynamic', 'mode', 'info', 'meta_predicate', 'multifile', 'synchronized',
            +            // module directives
            +            'export', 'module', 'reexport', 'use_module'
            +            ),
            +        // Directives (no arguments)
            +        2 => array(
            +            // entity directives
            +            'dynamic',
            +            // multi-threading directives
            +            'synchronized', 'threaded',
            +            // entity closing directives
            +            'end_category', 'end_object', 'end_protocol',
            +            // conditional compilation directives
            +            'else', 'endif'
            +            ),
            +        // Entity relations
            +        3 => array(
            +            'complements', 'extends', 'imports', 'implements','instantiates', 'specializes'
            +            ),
            +        // Built-in predicates (with arguments)
            +        4 => array(
            +            // event handlers
            +            'after', 'before',
            +            // execution-context methods
            +            'parameter', 'self', 'sender', 'this',
            +            // predicate reflection
            +            'current_predicate', 'predicate_property',
            +            // DCGs and term expansion
            +            'expand_goal', 'expand_term', 'goal_expansion', 'phrase', 'term_expansion',
            +            // entity
            +            'abolish_category', 'abolish_object', 'abolish_protocol',
            +            'create_category', 'create_object', 'create_protocol',
            +            'current_category', 'current_object', 'current_protocol',
            +            'category_property', 'object_property', 'protocol_property',
            +            // entity relations
            +            'complements_object', 'conforms_to_protocol',
            +            'extends_category', 'extends_object', 'extends_protocol',
            +            'implements_protocol', 'imports_category',
            +            'instantiates_class', 'specializes_class',
            +            // events
            +            'abolish_events', 'current_event', 'define_events',
            +            // flags
            +            'current_logtalk_flag', 'set_logtalk_flag',
            +            'current_prolog_flag', 'set_prolog_flag',
            +            // compiling, loading, and library path
            +            'logtalk_compile', 'logtalk_library_path', 'logtalk_load',
            +            // database
            +            'abolish', 'asserta', 'assertz', 'clause', 'retract', 'retractall',
            +            // control
            +            'call', 'catch', 'ignore', 'once', 'throw',
            +            // all solutions predicates
            +            'bagof', 'findall', 'forall', 'setof',
            +            // multi-threading meta-predicates
            +            'threaded',
            +            'threaded_call', 'threaded_once', 'threaded_ignore', 'threaded_exit', 'threaded_peek',
            +            'threaded_wait', 'threaded_notify',
            +            // term unification
            +            'unify_with_occurs_check',
            +            // atomic term processing
            +            'atom_chars', 'atom_codes', 'atom_concat', 'atom_length',
            +            'number_chars', 'number_codes',
            +            'char_code',
            +            // term creation and decomposition
            +            'arg', 'copy_term', 'functor', 'numbervars',
            +            // term testing
            +            'atom', 'atomic', 'callable', 'compound', 'float', 'ground', 'integer', 'nonvar', 'number', 'sub_atom', 'var',
            +            // term comparison
            +            'compare',
            +            // stream selection and control
            +            'current_input', 'current_output', 'set_input', 'set_output',
            +            'open', 'close', 'flush_output', 'stream_property',
            +            'at_end_of_stream', 'set_stream_position',
            +            // character and byte input/output predicates
            +            'get_byte', 'get_char', 'get_code',
            +            'peek_byte', 'peek_char', 'peek_code',
            +            'put_byte', 'put_char', 'put_code',
            +            'nl',
            +            // term input/output predicates
            +            'current_op', 'op',
            +            'write', 'writeq', 'write_canonical', 'write_term',
            +            'read', 'read_term',
            +            'char_conversion', 'current_char_conversion',
            +            // hooks
            +            'halt',
            +            // sorting
            +            'keysort', 'sort'
            +            ),
            +        // Built-in predicates (no arguments)
            +        5 => array(
            +            // control
            +            'fail', 'repeat', 'true',
            +            // character and byte input/output predicates
            +            'nl',
            +            // implementation defined hooks functions
            +            'halt',
            +            // arithemtic evaluation
            +            'is',
            +            // stream selection and control
            +            'at_end_of_stream', 'flush_output'
            +            ),
            +        // Evaluable functors (with arguments)
            +        6 => array(
            +            'float_integer_part', 'float_fractional_part',
            +            'rem', 'mod', 'abs', 'sign', 'floor', 'truncate', 'round', 'ceiling',
            +            'cos', 'atan', 'exp', 'log', 'sin', 'sqrt'
            +            ),
            +        // Evaluable functors (no arguments)
            +        7 => array(
            +            'e', 'pi', 'mod', 'rem'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        0 => array(
            +            // external call
            +            '{', '}'
            +            ),
            +        1 => array(
            +            // arithemtic comparison
            +            '=:=', '=\=', '<', '=<', '>=', '>',
            +            // term comparison
            +            '<<', '>>', '/\\', '\\/', '\\',
            +            // bitwise functors
            +            '==', '\==', '@<', '@=<', '@>=', '@>',
            +            // evaluable functors
            +            '+', '-', '*', '/', '**',
            +            // logic and control
            +            '!', '\\+', ';',
            +            // message sending operators
            +            '::', '^^', ':',
            +            // grammar rule and conditional functors
            +            '-->', '->',
            +            // mode operators
            +            '@', '?',
            +            // term to list predicate
            +            '=..',
            +            // unification
            +            '=', '\\='
            +            ),
            +        2 => array(
            +            // clause and directive functors
            +            ':-'
            +            )
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        5 => true,
            +        6 => true,
            +        7 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #2e4dc9;',
            +            2 => 'color: #2e4dc9;',
            +            3 => 'color: #2e4dc9;',
            +            4 => 'color: #9d4f37;',
            +            5 => 'color: #9d4f37;',
            +            6 => 'color: #9d4f37;',
            +            7 => 'color: #9d4f37;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #430000;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #60a0b0; font-style: italic;',
            +            2 => 'color: #430000;',
            +            'MULTI' => 'color: #60a0b0; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #9f0000; font-weight: bold;',
            +            1 => 'color: #9f0000; font-weight: bold;',
            +            2 => 'color: #9f0000; font-weight: bold;',
            +            3 => 'color: #9f0000; font-weight: bold;',
            +            'HARD' => '',
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #666666;font-weight: bold;',
            +            1 => 'color: #666666;font-weight: bold;',
            +            2 => 'color: #000000;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #9f0000;',
            +            'HARD' => 'color: #9f0000;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #848484;'
            +            ),
            +        'SCRIPT' => array()
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => '',
            +        6 => '',
            +        7 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '::'
            +        ),
            +    'REGEXPS' => array(
            +        // variables
            +        0 => '\b(?!(?:PIPE|SEMI|REG3XP\d*)[^a-zA-Z0-9_])[A-Z_][a-zA-Z0-9_]*(?![a-zA-Z0-9_])'
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(),
            +    'TAB_WIDTH' => 4,
            +    'PARSER_CONTROL' => array(
            +        'ENABLE_FLAGS' => array(
            +            'BRACKETS' => GESHI_NEVER
            +        ),
            +        'KEYWORDS' => array(
            +            1 => array(
            +                'DISALLOWED_BEFORE' => '(?<=:-\s)',
            +                'DISALLOWED_AFTER' => '(?=\()'
            +            ),
            +            2 => array(
            +                'DISALLOWED_BEFORE' => '(?<=:-\s)',
            +                'DISALLOWED_AFTER' => '(?=\.)'
            +            ),
            +            3 => array(
            +                'DISALLOWED_BEFORE' => '(?|^&\'"])',
            +                'DISALLOWED_AFTER' => '(?=\()'
            +            ),
            +            4 => array(
            +                'DISALLOWED_BEFORE' => '(?|^&\'"])',
            +                'DISALLOWED_AFTER' => '(?=\()'
            +            ),
            +            5 => array(
            +                'DISALLOWED_BEFORE' => '(?|^&\'"])',
            +                'DISALLOWED_AFTER' => '(?![a-zA-Z0-9_\|%\\-&\'"])'
            +            ),
            +            6 => array(
            +                'DISALLOWED_BEFORE' => '(?|^&\'"])',
            +                'DISALLOWED_AFTER' => '(?=\()'
            +            ),
            +            7 => array(
            +                'DISALLOWED_BEFORE' => '(?|^&\'"])',
            +                'DISALLOWED_AFTER' => '(?![a-zA-Z0-9_\|%\\-&\'"])'
            +            )
            +        )
            +    ),
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/lolcode.php b/vendor/easybook/geshi/geshi/lolcode.php
            new file mode 100644
            index 0000000000..c8e623acf0
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/lolcode.php
            @@ -0,0 +1,151 @@
            + 'LOLcode',
            +    'COMMENT_SINGLE' => array(),
            +    'COMMENT_MULTI' => array(),
            +    'COMMENT_REGEXP' => array(
            +        1 => "/\bBTW\b.*$/im",
            +        2 => "/(^|\b)(?:OBTW\b.+?\bTLDR|LOL\b.+?\/LOL)(\b|$)/si"
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_UPPER,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '',
            +    'ESCAPE_REGEXP' => array(
            +        1 => '/:[)>o":]/',
            +        2 => '/:\([\da-f]+\)/i',
            +        3 => '/:\{\w+\}/i',
            +        4 => '/:\[\w+\]/i',
            +        ),
            +    'KEYWORDS' => array(
            +        //Statements
            +        1 => array(
            +            'VISIBLE', 'HAI', 'KTHX', 'KTHXBYE', 'SMOOSH', 'GIMMEH', 'PLZ',
            +            'ON', 'INVISIBLE', 'R', 'ITZ', 'GTFO', 'COMPLAIN', 'GIMME',
            +
            +            'OPEN', 'FILE', 'I HAS A', 'AWSUM THX', 'O NOES', 'CAN', 'HAS', 'HAZ',
            +            'HOW DOES I', 'IF U SAY SO', 'FOUND YR', 'BORROW', 'OWN', 'ALONG',
            +            'WITH', 'WIT', 'LOOK', 'AT', 'AWSUM', 'THX'
            +            ),
            +        //Conditionals
            +        2 => array(
            +            'IZ', 'YARLY', 'NOWAI', 'WTF?', 'MEBBE', 'OMG', 'OMGWTF',
            +            'ORLY?', 'OF', 'NOPE', 'SO', 'IM', 'MAI',
            +
            +            'O RLY?', 'SUM', 'BOTH SAEM', 'DIFFRINT', 'BOTH', 'EITHER', 'WON',
            +            'DIFF', 'PRODUKT', 'QUOSHUNT', 'MOD', 'MKAY', 'OK', 'THING',
            +            'BIGNESS'
            +            ),
            +        //Repetition
            +        3 => array(
            +            'IN', 'OUTTA', 'LOOP', 'WHILE'
            +            ),
            +        //Operators \Math
            +        4 => array(
            +            'AN', 'AND', 'NOT', 'UP', 'YR', 'UPPIN', 'NERF', 'NERFIN', 'NERFZ',
            +            'SMASHING', 'UR', 'KINDA', 'LIKE', 'SAEM', 'BIG', 'SMALL',
            +            'BIGGR', 'SMALLR', 'BIGGER', 'SMALLER', 'GOOD', 'CUTE', 'THAN'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '.', ',', '?',
            +        '!!'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #008000;',
            +            2 => 'color: #000080;',
            +            3 => 'color: #000080;',
            +            4 => 'color: #800000;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; style: italic;',
            +            2 => 'color: #666666; style: italic;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            'SPACE_AS_WHITESPACE' => true
            +            )
            +        ),
            +    'TAB_WIDTH' => 4
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/lotusformulas.php b/vendor/easybook/geshi/geshi/lotusformulas.php
            new file mode 100644
            index 0000000000..18d6f7822b
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/lotusformulas.php
            @@ -0,0 +1,316 @@
            + 'Lotus Notes @Formulas',
            +    'COMMENT_SINGLE' => array(1 => "'"),
            +    'COMMENT_MULTI' => array('REM' => ';'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array (
            +            '[ZoomPreview]', '[WorkspaceStackReplicaIcons]',
            +            '[WorkspaceProperties]', '[WindowWorkspace]',
            +            '[WindowTile]', '[WindowRestore]', '[WindowNext]',
            +            '[WindowMinimizeAll]', '[WindowMinimize]', '[WindowMaximizeAll]',
            +            '[WindowMaximize]', '[WindowCascade]', '[ViewSwitchForm]',
            +            '[ViewShowUnread]', '[ViewShowServerNames]', '[ViewShowSearchBar]',
            +            '[ViewShowRuler]', '[ViewShowPageBreaks]', '[ViewShowOnlyUnread]',
            +            '[ViewShowOnlySelected]', '[ViewShowOnlySearchResults]',
            +            '[ViewShowOnlyCategories]', '[ViewShowObject]',
            +            '[ViewShowFieldHelp]', '[ViewRenamePerson]', '[ViewRefreshUnread]',
            +            '[ViewRefreshFields]', '[ViewNavigatorsNone]',
            +            '[ViewNavigatorsFolders]', '[ViewMoveName]', '[ViewHorizScrollbar]',
            +            '[ViewExpandWithChildren]', '[ViewExpandAll]', '[ViewExpand]',
            +            '[ViewCollapseAll]', '[ViewCollapse]', '[ViewChange]',
            +            '[ViewCertify]', '[ViewBesideFolders]', '[ViewBelowFolders]',
            +            '[ViewArrangeIcons]', '[V3EditPrevField]', '[V3EditNextField]',
            +            '[UserIDSwitch]', '[UserIDSetPassword]', '[UserIDMergeCopy]',
            +            '[UserIDInfo]', '[UserIDEncryptionKeys]', '[UserIDCreateSafeCopy]',
            +            '[UserIDClearPassword]', '[UserIDCertificates]',
            +            '[ToolsUserLogoff]', '[ToolsSpellCheck]', '[ToolsSmartIcons]',
            +            '[ToolsSetupUserSetup]', '[ToolsSetupPorts]', '[ToolsSetupMail]',
            +            '[ToolsSetupLocation]', '[ToolsScanUnreadSelected]',
            +            '[ToolsScanUnreadPreferred]', '[ToolsScanUnreadChoose]',
            +            '[ToolsRunMacro]', '[ToolsRunBackgroundMacros]', '[ToolsReplicate]',
            +            '[ToolsRefreshSelectedDocs]', '[ToolsRefreshAllDocs]',
            +            '[ToolsMarkSelectedUnread]', '[ToolsMarkSelectedRead]',
            +            '[ToolsMarkAllUnread]', '[ToolsMarkAllRead]', '[ToolsHangUp]',
            +            '[ToolsCategorize]', '[ToolsCall]', '[TextUnderline]',
            +            '[TextSpacingSingle]', '[TextSpacingOneAndaHalf]',
            +            '[TextSpacingDouble]', '[TextSetFontSize]', '[TextSetFontFace]',
            +            '[TextSetFontColor]', '[TextReduceFont]', '[TextPermanentPen]',
            +            '[TextParagraphStyles]', '[TextParagraph]', '[TextOutdent]',
            +            '[TextNumbers]', '[TextNormal]', '[TextItalic]', '[TextFont]',
            +            '[TextEnlargeFont]', '[TextCycleSpacing]', '[TextBullet]',
            +            '[TextBold]', '[TextAlignRight]', '[TextAlignNone]',
            +            '[TextAlignLeft]', '[TextAlignFull]', '[TextAlignCenter]',
            +            '[SwitchView]', '[SwitchForm]', '[StyleCycleKey]',
            +            '[SmartIconsNextSet]', '[SmartIconsFloating]', '[ShowProperties]',
            +            '[ShowHidePreviewPane]', '[ShowHideParentPreview]',
            +            '[ShowHideLinkPreview]', '[ShowHideIMContactList]',
            +            '[SetCurrentLocation]', '[SendInstantMessage]',
            +            '[SectionRemoveHeader]', '[SectionProperties]',
            +            '[SectionExpandAll]', '[SectionExpand]', '[SectionDefineEditors]',
            +            '[SectionCollapseAll]', '[SectionCollapse]', '[RunScheduledAgents]',
            +            '[RunAgent]', '[ReplicatorStop]', '[ReplicatorStart]',
            +            '[ReplicatorSendReceiveMail]', '[ReplicatorSendMail]',
            +            '[ReplicatorReplicateWithServer]', '[ReplicatorReplicateSelected]',
            +            '[ReplicatorReplicateNext]', '[ReplicatorReplicateHigh]',
            +            '[Replicator]', '[RenameDatabase]', '[RemoveFromFolder]',
            +            '[RemoteDebugLotusScript]', '[ReloadWindow]', '[RefreshWindow]',
            +            '[RefreshParentNote]', '[RefreshHideFormulas]', '[RefreshFrame]',
            +            '[PublishDatabase]', '[PictureProperties]', '[PasteBitmapAsObject]',
            +            '[PasteBitmapAsBackground]', '[OpenView]', '[OpenPage]',
            +            '[OpenNavigator]', '[OpenInNewWindow]', '[OpenHelpDocument]',
            +            '[OpenFrameset]', '[OpenDocument]', '[OpenCalendar]',
            +            '[ObjectProperties]', '[ObjectOpen]', '[ObjectDisplayAs]',
            +            '[NavPrevUnread]', '[NavPrevSelected]', '[NavPrevMain]',
            +            '[NavPrev]', '[NavNextUnread]', '[NavNextSelected]',
            +            '[NavNextMain]', '[NavNext]', '[NavigatorTest]',
            +            '[NavigatorProperties]', '[NavigateToBacklink]',
            +            '[NavigatePrevUnread]', '[NavigatePrevSelected]',
            +            '[NavigatePrevMain]', '[NavigatePrevHighlight]', '[NavigatePrev]',
            +            '[NavigateNextUnread]', '[NavigateNextSelected]',
            +            '[NavigateNextMain]', '[NavigateNextHighlight]', '[NavigateNext]',
            +            '[MoveToTrash]', '[MailSendPublicKey]', '[MailSendEncryptionKey]',
            +            '[MailSendCertificateRequest]', '[MailSend]', '[MailScanUnread]',
            +            '[MailRequestNewPublicKey]', '[MailRequestNewName]',
            +            '[MailRequestCrossCert]', '[MailOpen]', '[MailForwardAsAttachment]',
            +            '[MailForward]', '[MailComposeMemo]', '[MailAddress]',
            +            '[LayoutProperties]', '[LayoutElementSendToBack]',
            +            '[LayoutElementProperties]', '[LayoutElementBringToFront]',
            +            '[LayoutAddText]', '[LayoutAddGraphic]', '[InsertSubform]',
            +            '[HotspotProperties]', '[HotspotClear]', '[HelpUsingDatabase]',
            +            '[HelpAboutNotes]', '[HelpAboutDatabase]', '[GoUpLevel]',
            +            '[FormTestDocument]', '[FormActions]', '[FolderRename]',
            +            '[FolderProperties]', '[FolderMove]', '[FolderExpandWithChildren]',
            +            '[FolderExpandAll]', '[FolderExpand]', '[FolderDocuments]',
            +            '[FolderCustomize]', '[FolderCollapse]', '[Folder]',
            +            '[FindFreeTimeDialog]', '[FileSaveNewVersion]', '[FileSave]',
            +            '[FilePrintSetup]', '[FilePrint]', '[FilePageSetup]',
            +            '[FileOpenDBRepID]', '[FileOpenDatabase]', '[FileNewReplica]',
            +            '[FileNewDatabase]', '[FileImport]', '[FileFullTextUpdate]',
            +            '[FileFullTextInfo]', '[FileFullTextDelete]',
            +            '[FileFullTextCreate]', '[FileExport]', '[FileExit]',
            +            '[FileDatabaseUseServer]', '[FileDatabaseRemove]',
            +            '[FileDatabaseInfo]', '[FileDatabaseDelete]', '[FileDatabaseCopy]',
            +            '[FileDatabaseCompact]', '[FileDatabaseACL]', '[FileCloseWindow]',
            +            '[ExitNotes]', '[Execute]', '[ExchangeUnreadMarks]', '[EmptyTrash]',
            +            '[EditUp]', '[EditUntruncate]', '[EditUndo]', '[EditTop]',
            +            '[EditTableInsertRowColumn]', '[EditTableFormat]',
            +            '[EditTableDeleteRowColumn]', '[EditShowHideHiddenChars]',
            +            '[EditSelectByDate]', '[EditSelectAll]', '[EditRight]',
            +            '[EditRestoreDocument]', '[EditResizePicture]',
            +            '[EditQuoteSelection]', '[EditProfileDocument]', '[EditProfile]',
            +            '[EditPrevField]', '[EditPhoneNumbers]', '[EditPasteSpecial]',
            +            '[EditPaste]', '[EditOpenLink]', '[EditNextField]',
            +            '[EditMakeDocLink]', '[EditLocations]', '[EditLinks]', '[EditLeft]',
            +            '[EditInsertText]', '[EditInsertTable]', '[EditInsertPopup]',
            +            '[EditInsertPageBreak]', '[EditInsertObject]',
            +            '[EditInsertFileAttachment]', '[EditInsertButton]',
            +            '[EditIndentFirstLine]', '[EditIndent]', '[EditHorizScrollbar]',
            +            '[EditHeaderFooter]', '[EditGotoField]', '[EditFindNext]',
            +            '[EditFindInPreview]', '[EditFind]', '[EditEncryptionKeys]',
            +            '[EditDown]', '[EditDocument]', '[EditDetach]', '[EditDeselectAll]',
            +            '[EditCut]', '[EditCopy]', '[EditClear]', '[EditButton]',
            +            '[EditBottom]', '[DiscoverFolders]', '[Directories]',
            +            '[DialingRules]', '[DesignViewSelectFormula]', '[DesignViews]',
            +            '[DesignViewNewColumn]', '[DesignViewFormFormula]',
            +            '[DesignViewEditActions]', '[DesignViewColumnDef]',
            +            '[DesignViewAttributes]', '[DesignViewAppendColumn]',
            +            '[DesignSynopsis]', '[DesignSharedFields]', '[DesignReplace]',
            +            '[DesignRefresh]', '[DesignMacros]', '[DesignIcon]',
            +            '[DesignHelpUsingDocument]', '[DesignHelpAboutDocument]',
            +            '[DesignFormWindowTitle]', '[DesignFormUseField]',
            +            '[DesignFormShareField]', '[DesignForms]', '[DesignFormNewField]',
            +            '[DesignFormFieldDef]', '[DesignFormAttributes]',
            +            '[DesignDocumentInfo]', '[DebugLotusScript]',
            +            '[DatabaseReplSettings]', '[DatabaseDelete]', '[CreateView]',
            +            '[CreateTextbox]', '[CreateSubForm]', '[CreateSection]',
            +            '[CreateRectangularHotspot]', '[CreateRectangle]',
            +            '[CreatePolyline]', '[CreatePolygon]', '[CreateNavigator]',
            +            '[CreateLayoutRegion]', '[CreateForm]', '[CreateFolder]',
            +            '[CreateEllipse]', '[CreateControlledAccessSection]',
            +            '[CreateAgent]', '[CreateAction]', '[CopySelectedAsTable]',
            +            '[ComposeWithReference]', '[Compose]', '[CloseWindow]', '[Clear]',
            +            '[ChooseFolders]', '[CalendarGoTo]', '[CalendarFormat]',
            +            '[AttachmentView]', '[AttachmentProperties]', '[AttachmentLaunch]',
            +            '[AttachmentDetachAll]', '[AgentTestRun]', '[AgentSetServerName]',
            +            '[AgentRun]', '[AgentLog]', '[AgentEnableDisable]', '[AgentEdit]',
            +            '[AdminTraceConnection]', '[AdminStatisticsConfig]',
            +            '[AdminSendMailTrace]', '[AdminRemoteConsole]',
            +            '[AdminRegisterUser]', '[AdminRegisterServer]',
            +            '[AdminRegisterFromFile]', '[AdminOutgoingMail]',
            +            '[AdminOpenUsersView]', '[AdminOpenStatistics]',
            +            '[AdminOpenServersView]', '[AdminOpenServerLog]',
            +            '[AdminOpenGroupsView]', '[AdminOpenCertLog]', '[AdminOpenCatalog]',
            +            '[AdminOpenAddressBook]', '[AdminNewOrgUnit]',
            +            '[AdminNewOrganization]', '[Administration]',
            +            '[AdminIDFileSetPassword]', '[AdminIDFileExamine]',
            +            '[AdminIDFileClearPassword]', '[AdminDatabaseQuotas]',
            +            '[AdminDatabaseAnalysis]', '[AdminCrossCertifyKey]',
            +            '[AdminCrossCertifyIDFile]', '[AdminCreateGroup]', '[AdminCertify]',
            +            '[AddToIMContactList]', '[AddDatabaseRepID]', '[AddDatabase]',
            +            '[AddBookmark]'
            +            ),
            +        2 => array(
            +            'SELECT', 'FIELD', 'ENVIRONMENT', 'DEFAULT', '@Zone ', '@Yesterday',
            +            '@Yes', '@Year', '@Word', '@Wide', '@While', '@Weekday',
            +            '@WebDbName', '@ViewTitle', '@ViewShowThisUnread', '@Version',
            +            '@VerifyPassword', '@ValidateInternetAddress', '@V4UserAccess',
            +            '@V3UserName', '@V2If', '@UserRoles', '@UserPrivileges',
            +            '@UserNamesList', '@UserNameLanguage', '@UserName', '@UserAccess',
            +            '@UrlQueryString', '@URLOpen', '@URLHistory', '@URLGetHeader',
            +            '@URLEncode', '@URLDecode', '@UpperCase', '@UpdateFormulaContext',
            +            '@Unique', '@UndeleteDocument', '@Unavailable', '@True', '@Trim',
            +            '@Transform', '@ToTime', '@ToNumber', '@Tomorrow', '@Today',
            +            '@TimeZoneToText', '@TimeToTextInZone', '@TimeMerge', '@Time',
            +            '@ThisValue', '@ThisName', '@TextToTime', '@TextToNumber', '@Text',
            +            '@TemplateVersion', '@Tan', '@Sum', '@Success', '@Subset',
            +            '@StatusBar', '@Sqrt', '@Soundex', '@Sort', '@Sin', '@Sign',
            +            '@SetViewInfo', '@SetTargetFrame', '@SetProfileField',
            +            '@SetHTTPHeader', '@SetField', '@SetEnvironment', '@SetDocField',
            +            '@Set', '@ServerName', '@ServerAccess', '@Select', '@Second',
            +            '@Round', '@RightBack', '@Right', '@Return', '@Responses',
            +            '@ReplicaID', '@ReplaceSubstring', '@Replace', '@Repeat',
            +            '@RegQueryValue', '@RefreshECL', '@Random', '@ProperCase',
            +            '@Prompt', '@Power', '@PostedCommand', '@PolicyIsFieldLocked',
            +            '@Platform', '@PickList', '@Pi', '@PasswordQuality', '@Password',
            +            '@OrgDir', '@OptimizeMailAddress', '@OpenInNewWindow', '@Now',
            +            '@Nothing', '@NoteID', '@No', '@NewLine', '@Narrow', '@NameLookup',
            +            '@Name', '@Month', '@Modulo', '@Modified', '@Minute', '@Min',
            +            '@MiddleBack', '@Middle', '@Member', '@Max', '@Matches',
            +            '@MailSignPreference', '@MailSend', '@MailSavePreference',
            +            '@MailEncryptSentPreference', '@MailEncryptSavedPreference',
            +            '@MailDbName', '@LowerCase', '@Log', '@Locale', '@Ln', '@Like',
            +            '@Length', '@LeftBack', '@Left', '@LDAPServer', '@LaunchApp',
            +            '@LanguagePreference', '@Keywords', '@IsVirtualizedDirectory',
            +            '@IsValid', '@IsUsingJavaElement', '@IsUnavailable', '@IsTime',
            +            '@IsText', '@IsResponseDoc', '@IsNumber', '@IsNull', '@IsNotMember',
            +            '@IsNewDoc', '@IsModalHelp', '@IsMember', '@IsExpandable',
            +            '@IsError', '@IsEmbeddedInsideWCT', '@IsDocTruncated',
            +            '@IsDocBeingSaved', '@IsDocBeingRecalculated', '@IsDocBeingMailed',
            +            '@IsDocBeingLoaded', '@IsDocBeingEdited', '@IsDB2', '@IsCategory',
            +            '@IsAvailable', '@IsAppInstalled', '@IsAgentEnabled', '@Integer',
            +            '@InheritedDocumentUniqueID', '@Implode', '@IfError', '@If',
            +            '@Hour', '@HashPassword', '@HardDeleteDocument', '@GetViewInfo',
            +            '@GetProfileField', '@GetPortsList', '@GetIMContactListGroupNames',
            +            '@GetHTTPHeader', '@GetFocusTable', '@GetField', '@GetDocField',
            +            '@GetCurrentTimeZone', '@GetAddressBooks', '@FormLanguage', '@For',
            +            '@FontList', '@FloatEq', '@FileDir', '@False', '@Failure',
            +            '@Explode', '@Exp', '@Eval', '@Error', '@Environment', '@Ends',
            +            '@EnableAlarms', '@Elements', '@EditUserECL', '@EditECL',
            +            '@DoWhile', '@Domain', '@DocumentUniqueID', '@DocSiblings',
            +            '@DocParentNumber', '@DocOmmittedLength', '@DocNumber', '@DocMark',
            +            '@DocLock', '@DocLevel', '@DocLength', '@DocFields',
            +            '@DocDescendants', '@DocChildren', '@Do', '@DialogBox',
            +            '@DeleteField', '@DeleteDocument', '@DDETerminate', '@DDEPoke',
            +            '@DDEInitiate', '@DDEExecute', '@DbTitle', '@DbName', '@DbManager',
            +            '@DbLookup', '@DbExists', '@DbCommand', '@DbColumn', '@DB2Schema',
            +            '@Day', '@Date', '@Created', '@Count', '@Cos', '@Contains',
            +            '@ConfigFile', '@Compare', '@Command', '@ClientType',
            +            '@CheckFormulaSyntax', '@CheckAlarms', '@Char', '@Certificate',
            +            '@BusinessDays', '@BrowserInfo', '@Begins', '@Author',
            +            '@Attachments', '@AttachmentNames', '@AttachmentModifiedTimes',
            +            '@AttachmentLengths', '@ATan2', '@ATan', '@ASin', '@Ascii',
            +            '@AllDescendants', '@AllChildren', '@All', '@AdminECLIsLocked',
            +            '@Adjust', '@AddToFolder', '@ACos', '@Accessed', '@AbstractSimple',
            +            '@Abstract', '@Abs'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #800000;',
            +            2 => 'color: #0000FF;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #008000;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #FF00FF;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #FF00FF;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #0000AA;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099;'
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 2
            +    );
            diff --git a/vendor/easybook/geshi/geshi/lotusscript.php b/vendor/easybook/geshi/geshi/lotusscript.php
            new file mode 100644
            index 0000000000..5d8b6d596a
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/lotusscript.php
            @@ -0,0 +1,189 @@
            + 'LotusScript',
            +    'COMMENT_SINGLE' => array(1 => "'"),
            +    'COMMENT_MULTI' => array('%REM' => '%END REM'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"' , "|"),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array (
            +            'Yield', 'Year', 'Xor', 'Write', 'With', 'Width', 'While', 'Wend',
            +            'Weekday', 'VarType', 'Variant', 'Val', 'UString', 'UString$',
            +            'UseLSX', 'Use', 'Until', 'Unlock', 'Unicode', 'Uni', 'UChr',
            +            'UChr$', 'UCase', 'UCase$', 'UBound', 'TypeName', 'Type', 'TRUE',
            +            'Trim', 'Trim$', 'Today', 'To', 'TimeValue', 'TimeSerial', 'Timer',
            +            'TimeNumber', 'Time', 'Time$', 'Then', 'Text', 'Tan', 'Tab', 'Sub',
            +            'StrToken', 'StrToken$', 'StrRightBack', 'StrRightBack$',
            +            'StrRight', 'StrRight$', 'StrLeftBack', 'StrLeftBack$', 'StrLeft',
            +            'StrLeft$', 'String', 'String$', 'StrConv', 'StrCompare', 'StrComp',
            +            'Str', 'Str$', 'Stop', 'Step', 'Static', 'Sqr', 'Split', 'Spc',
            +            'Space', 'Space$', 'Sleep', 'Single', 'Sin', 'Shell', 'Shared',
            +            'Sgn', 'SetFileAttr', 'SetAttr', 'Set', 'SendKeys', 'Select',
            +            'Seek', 'Second', 'RTrim', 'RTrim$', 'RSet', 'Round', 'Rnd',
            +            'RmDir', 'RightC', 'RightC$', 'RightBP', 'RightBP$', 'RightB',
            +            'RightB$', 'Right', 'Right$', 'Return', 'Resume', 'Reset',
            +            'Replace', 'Remove', 'Rem', 'ReDim', 'Read', 'Randomize',
            +            'Random', 'Put', 'Public', 'Property', 'Private', 'Print',
            +            'Preserve', 'Pitch', 'PI', 'Output', 'Or', 'Option', 'Open', 'On',
            +            'Oct', 'Oct$', 'NULL', 'Now', 'NOTHING', 'Not', 'NoPitch', 'NoCase',
            +            'Next', 'New', 'Name', 'MsgBox', 'Month', 'Mod', 'MkDir', 'Minute',
            +            'MidC', 'MidC$', 'MidBP', 'MidBP$', 'MidB', 'MidB$', 'Mid', 'Mid$',
            +            'MessageBox', 'Me', 'LTrim', 'LTrim$', 'LSServer', 'LSI_Info',
            +            'LSet', 'Loop', 'Long', 'Log', 'LOF', 'Lock', 'LOC', 'LMBCS',
            +            'ListTag', 'List', 'Line', 'Like', 'Lib', 'Let', 'LenC', 'LenBP',
            +            'LenB', 'Len', 'LeftC', 'LeftC$', 'LeftBP', 'LeftBP$', 'LeftB',
            +            'LeftB$', 'Left', 'Left$', 'LCase', 'LCase$', 'LBound', 'Kill',
            +            'Join', 'IsUnknown', 'IsScalar', 'IsObject', 'IsNumeric', 'IsNull',
            +            'IsList', 'IsEmpty', 'IsElement', 'IsDate', 'IsArray', 'IsA', 'Is',
            +            'Integer', 'Int', 'InStrC', 'InStrBP', 'InStrB', 'InStr', 'InputBP',
            +            'InputBP$', 'InputBox', 'InputBox$', 'InputB', 'InputB$', 'Input',
            +            'Input$', 'In', 'IMSetMode', 'Implode', 'Implode$', 'Imp',
            +            'IMEStatus', 'If', 'Hour', 'Hex', 'Hex$', 'Goto', 'GoSub',
            +            'GetThreadInfo', 'GetFileAttr', 'GetAttr', 'Get', 'Function',
            +            'FullTrim', 'From', 'FreeFile', 'Fraction', 'Format', 'Format$',
            +            'ForAll', 'For', 'Fix', 'FileLen', 'FileDateTime', 'FileCopy',
            +            'FileAttr', 'FALSE', 'Explicit', 'Exp', 'Exit', 'Execute', 'Event',
            +            'Evaluate', 'Error', 'Error$', 'Err', 'Erl', 'Erase', 'Eqv', 'EOF',
            +            'Environ', 'Environ$', 'End', 'ElseIf', 'Else', 'Double', 'DoEvents',
            +            'Do', 'Dir', 'Dir$', 'Dim', 'DestroyLock', 'Delete', 'DefVar',
            +            'DefStr', 'DefSng', 'DefLng', 'DefInt', 'DefDbl', 'DefCur',
            +            'DefByte', 'DefBool', 'Declare', 'Day', 'DateValue', 'DateSerial',
            +            'DateNumber', 'Date', 'Date$', 'DataType', 'CVDate', 'CVar',
            +            'Currency', 'CurDrive', 'CurDrive$', 'CurDir', 'CurDir$', 'CStr',
            +            'CSng', 'CreateLock', 'Cos', 'Const', 'Compare', 'Command',
            +            'Command$', 'CodeUnlock', 'CodeLockCheck', 'CodeLock', 'Close',
            +            'CLng', 'Class', 'CInt', 'Chr', 'Chr$', 'ChDrive', 'ChDir', 'CDbl',
            +            'CDat', 'CCur', 'CByte', 'CBool', 'Case', 'Call', 'ByVal', 'Byte',
            +            'Boolean', 'Bind', 'Binary', 'Bin', 'Bin$', 'Beep', 'Base', 'Atn2',
            +            'Atn', 'ASin', 'Asc', 'As', 'ArrayUnique', 'ArrayReplace',
            +            'ArrayGetIndex', 'ArrayAppend', 'Append', 'AppActivate', 'Any',
            +            'And', 'Alias', 'ActivateApp', 'ACos', 'Access', 'Abs', '%Include',
            +            '%If', '%END', '%ElseIf', '%Else'
            +            ),
            +        2 => array (
            +            'NotesXSLTransformer', 'NotesXMLProcessor', 'NotesViewNavigator',
            +            'NotesViewEntryCollection', 'NotesViewEntry', 'NotesViewColumn',
            +            'NotesView', 'NotesUIWorkspace', 'NotesUIView', 'NotesUIScheduler',
            +            'NotesUIDocument', 'NotesUIDatabase', 'NotesTimer', 'NotesStream',
            +            'NotesSession', 'NotesSAXParser', 'NotesSAXException',
            +            'NotesSAXAttributeList', 'NotesRichTextTable', 'NotesRichTextTab',
            +            'NotesRichTextStyle', 'NotesRichTextSection', 'NotesRichTextRange',
            +            'NotesRichTextParagraphStyle', 'NotesRichTextNavigator',
            +            'NotesRichTextItem', 'NotesRichTextDocLink',
            +            'NotesReplicationEntry', 'NotesReplication', 'NotesRegistration',
            +            'NotesOutlineEntry', 'NotesOutline', 'NotesNoteCollection',
            +            'NotesNewsLetter', 'NotesName', 'NotesMIMEHeader',
            +            'NotesMIMEEntity', 'NotesLog', 'NotesItem', 'NotesInternational',
            +            'NotesForm', 'NotesEmbeddedObject', 'NotesDXLImporter',
            +            'NotesDXLExporter', 'NotesDOMXMLDeclNode', 'NotesDOMTextNode',
            +            'NotesDOMProcessingInstructionNode', 'NotesDOMParser',
            +            'NotesDOMNotationNode', 'NotesDOMNodeList', 'NotesDOMNode',
            +            'NotesDOMNamedNodeMap', 'NotesDOMEntityReferenceNode',
            +            'NotesDOMEntityNode', 'NotesDOMElementNode',
            +            'NotesDOMDocumentTypeNode', 'NotesDOMDocumentNode',
            +            'NotesDOMDocumentFragmentNode', 'NotesDOMCommentNode',
            +            'NotesDOMCharacterDataNote', 'NotesDOMCDATASectionNode',
            +            'NotesDOMAttributeNode', 'NotesDocumentCollection', 'NotesDocument',
            +            'NotesDbDirectory', 'NotesDateTime', 'NotesDateRange',
            +            'NotesDatabase', 'NotesColorObject', 'NotesAgent',
            +            'NotesAdministrationProcess', 'NotesACLEntry', 'NotesACL',
            +            'Navigator', 'Field', 'Button'
            +            )
            +        ) ,
            +    'SYMBOLS' => array(
            +        '(', ')'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0000FF;',
            +            2 => 'color: #0000EE;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #008000;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #FF00FF;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #0000AA;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #006600;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099;'
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 2
            +);
            diff --git a/vendor/easybook/geshi/geshi/lscript.php b/vendor/easybook/geshi/geshi/lscript.php
            new file mode 100644
            index 0000000000..0f404f817b
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/lscript.php
            @@ -0,0 +1,386 @@
            + 'LScript',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +    //Yes, I'm aware these are out of order,
            +    //I had to rearrange and couldn't be bothered changing the numbers...
            +        7 => array(
            +            '@data', '@define', '@else', '@end', '@fpdepth', '@if', '@include',
            +            '@insert', '@library', '@localipc', '@name', '@save', '@script',
            +            '@sequence', '@version', '@warnings'
            +            ),
            +        1 => array(
            +            'break', 'case', 'continue', 'else', 'end', 'false', 'for',
            +            'foreach', 'if', 'return', 'switch', 'true', 'while',
            +            ),
            +        3 => array(
            +            'active', 'alertlevel', 'alpha', 'alphaprefix', 'animfilename', 'autokeycreate',
            +            'backdroptype', 'blue', 'boxthreshold', 'button',
            +            'channelsvisible', 'childrenvisible', 'compfg', 'compbg', 'compfgalpha',
            +            'coneangles', 'cosine', 'count', 'ctl', 'curFilename', 'curFrame',
            +            'currenttime', 'curTime', 'curType',
            +            'depth', 'diffshade', 'diffuse', 'dimensions', 'displayopts', 'dynamicupdate',
            +            'end', 'eta',
            +            'filename', 'flags', 'fogtype', 'fps', 'frame', 'frameend', 'frameheight',
            +            'framestart', 'framestep', 'framewidth',
            +            'generalopts', 'genus', 'geometry', 'gNorm', 'goal', 'green',
            +            'h', 'hasAlpha', 'height',
            +            'id', 'innerlimit', 'isColor',
            +            'keyCount', 'keys',
            +            'limiteregion', 'locked', 'luminous',
            +            'maxsamplesperpixel', 'minsamplesperpixel', 'mirror', 'motionx', 'motiony',
            +            'name', 'newFilename', 'newFrame', 'newTime', 'newType', 'null', 'numthreads',
            +            'objID', 'oPos', 'outerlimit', 'oXfrm',
            +            'parent', 'pixel', 'pixelaspect', 'point', 'points', 'pointcount', 'polNum',
            +            'polycount', 'polygon', 'polygons', 'postBehavior', 'preBehavior', 'previewend',
            +            'previewstart', 'previewstep',
            +            'range', 'rawblue', 'rawgreen', 'rawred', 'rayLength', 'raySource', 'red',
            +            'reflectblue', 'reflectgreen', 'reflectred', 'recursiondepth', 'renderend',
            +            'renderopts', 'renderstart', 'renderstep', 'rendertype', 'restlength',
            +            'rgbprefix', 'roughness',
            +            'selected', 'setColor', 'setPattern', 'shading', 'shadow', 'shadows',
            +            'shadowtype', 'size', 'source', 'special', 'specshade', 'specular',
            +            'spotsize', 'start', 'sx', 'sy', 'sz',
            +            'target', 'totallayers', 'totalpoints', 'totalpolygons', 'trans', 'transparency',
            +            'type',
            +            'value', 'view', 'visible', 'visibility',
            +            'w', 'width', 'wNorm', 'wPos', 'wXfrm',
            +            'x', 'xoffset',
            +            'y', 'yoffset',
            +            'z'
            +            ),
            +        4 => array(
            +            'addLayer', 'addParticle', 'alphaspot', 'ambient', 'asAsc', 'asBin',
            +            'asInt', 'asNum', 'asStr', 'asVec', 'attach', 'axislocks',
            +            'backdropColor', 'backdropRay', 'backdropSqueeze', 'bone', 'blurLength',
            +            'close', 'color', 'contains', 'copy', 'createKey',
            +            'deleteKey', 'detach', 'drawCircle', 'drawLine', 'drawPoint', 'drawText',
            +            'drawTriangle',
            +            'edit', 'eof', 'event',
            +            'firstChannel', 'firstLayer', 'firstSelect', 'focalLength', 'fogColor',
            +            'fogMaxAmount', 'fogMaxDist', 'fogMinAmount', 'fogMinDist',
            +            'fovAngles', 'fStop', 'firstChild', 'focalDistance',
            +            'get', 'getChannelGroup', 'getEnvelope', 'getForward', 'getKeyBias',
            +            'getKeyContinuity', 'getKeyCurve', 'getKeyHermite', 'getKeyTension',
            +            'getKeyTime', 'getKeyValue', 'getParticle', 'getPivot', 'getPosition',
            +            'getRight', 'getRotation', 'getSelect', 'getScaling', 'getTag', 'getTexture',
            +            'getUp', 'getValue', 'getWorldPosition', 'getWorldForward', 'getWorldRight',
            +            'getWorldRotation', 'getWorldUp', 'globalBlur', 'globalMask', 'globalResolution',
            +            'hasCCEnd', 'hasCCStart',
            +            'illuminate', 'indexOf', 'isAscii', 'isAlnum', 'isAlpha', 'isBone',
            +            'isCamera', 'isChannel', 'isChannelGroup', 'isCntrl', 'isCurve', 'isDigit',
            +            'isEnvelope', 'isImage', 'isInt', 'isLight', 'isLower', 'isMapped', 'isMesh',
            +            'isNil', 'isNum', 'IsOpen', 'isOriginal', 'isPrint', 'isPunct', 'isScene',
            +            'isSpace', 'isStr', 'isUpper', 'isValid', 'isVMap', 'isVec', 'isXDigit',
            +            'keyExists',
            +            'layer', 'layerName', 'layerVisible', 'limits', 'line', 'linecount', 'load', 'luma',
            +            'next', 'nextLayer', 'nextSelect', 'nextChannel', 'nextChild', 'nl',
            +            'offset', 'open',
            +            'pack', 'param', 'parse', 'paste', 'persist', 'polygonCount', 'position',
            +            'rayCast', 'rayTrace', 'read', 'readByte', 'readInt', 'readNumber',
            +            'readDouble', 'readShort', 'readString', 'readVector', 'reduce',
            +            'remParticle', 'renderCamera', 'reopen', 'replace', 'reset', 'restParam',
            +            'rewind', 'rgb', 'rgbambient', 'rgbcolor', 'rgbspot',
            +            'save', 'schemaPosition', 'select', 'set', 'setChannelGroup', 'setKeyBias',
            +            'setKeyContinuity', 'setKeyCurve',
            +            'setKeyHermite', 'setKeyTension', 'setKeyValue', 'setParticle', 'setPoints',
            +            'setTag', 'setValue', 'server', 'serverFlags', 'sortA', 'sortD', 'surface',
            +            'trunc',
            +            'write', 'writeln', 'writeByte', 'writeData', 'writeNumber', 'writeDouble',
            +            'writeShort', 'writeString', 'writeVector',
            +            'vertex', 'vertexCount',
            +            'zoomFactor'
            +            ),
            +        2 => array(
            +            'abs', 'acos', 'angle', 'append', 'ascii', 'asin', 'atan',
            +            'binary',
            +            'ceil', 'center', 'chdir', 'clearimage', 'cloned', 'comringattach',
            +            'comringdecode', 'comringdetach', 'comringencode', 'comringmsg', 'cos',
            +            'cosh', 'cot', 'cross2d', 'cross3d', 'csc', 'ctlstring', 'ctlinteger',
            +            'ctlnumber', 'ctlvector', 'ctldistance', 'ctlchoice', 'ctltext',
            +            'ctlcolor', 'ctlsurface', 'ctlfont', 'ctlpopup', 'ctledit', 'ctlpercent',
            +            'ctlangle', 'ctlrgb', 'ctlhsv', 'ctlcheckbox', 'ctlstate', 'ctlfilename',
            +            'ctlbutton', 'ctllistbox', 'ctlslider', 'ctlminislider', 'ctlsep', 'ctlimage',
            +            'ctltab', 'ctlallitems', 'ctlmeshitems', 'ctlcameraitems', 'ctllightitems',
            +            'ctlboneitems', 'ctlimageitems', 'ctlchannel', 'ctlviewport', 'Control_Management',
            +            'ctlpage', 'ctlgroup', 'ctlposition', 'ctlactive', 'ctlvisible', 'ctlalign',
            +            'ctlrefresh', 'ctlmenu', 'ctlinfo',
            +            'date', 'debug', 'deg', 'dot2d', 'dot3d', 'drawborder', 'drawbox', 'drawcircle',
            +            'drawelipse', 'drawerase', 'drawfillcircle', 'drawfillelipse', 'drawline',
            +            'drawpixel', 'drawtext', 'drawtextwidth', 'drawtextheight', 'dump',
            +            'error', 'exp', 'expose', 'extent',
            +            'fac', 'filecrc', 'filedelete', 'fileexists', 'filefind', 'filerename',
            +            'filestat', 'floor', 'format', 'frac', 'fullpath',
            +            'gamma', 'getdir', 'getenv', 'getfile', 'getfirstitem', 'getsep', 'getvalue',
            +            'globalrecall', 'globalstore',
            +            'hash', 'hex', 'hostBuild', 'hostVersion', 'hypot',
            +            'info', 'integer',
            +            'library', 'licenseId', 'lscriptVersion', 'load', 'loadimage', 'log', 'log10',
            +            'matchdirs', 'matchfiles', 'max', 'min', 'mkdir', 'mod', 'monend', 'moninit', 'monstep',
            +            'nil', 'normalize', 'number',
            +            'octal', 'overlayglyph',
            +            'parse', 'platform', 'pow',
            +            'rad', 'random', 'randu', 'range', 'read', 'readdouble', 'readInt', 'readNumber',
            +            'readShort', 'recall', 'regexp', 'reqabort', 'reqbegin', 'reqend', 'reqisopen',
            +            'reqkeyboard', 'reqopen', 'reqposition', 'reqpost', 'reqredraw',
            +            'reqsize', 'reqresize', 'requpdate', 'rmdir', 'round', 'runningUnder',
            +            'save', 'sec', 'select', 'selector', 'setdesc', 'setvalue', 'sin', 'sinh', 'size',
            +            'sizeof', 'sleep', 'spawn', 'split', 'sqrt', 'step', 'store', 'string', 'strleft',
            +            'strlower', 'strright', 'strsub', 'strupper',
            +            'tan', 'tanh', 'targetobject', 'terminate', 'text', 'time',
            +            'wait', 'warn', 'when', 'write', 'writeDouble', 'writeInt', 'writeNumber', 'writeShort',
            +            'var', 'vector', 'visitnodes', 'vmag',
            +            ),
            +        5 => array(
            +            'addcurve', 'addpoint', 'addpolygon', 'addquad', 'addtriangle', 'alignpols',
            +            'autoflex', 'axisdrill',
            +            'bend', 'bevel', 'boolean', 'boundingbox',
            +            'changepart', 'changesurface', 'close', 'closeall', 'cmdseq', 'copy', 'copysurface',
            +            'createsurface', 'cut',
            +            'deformregion', 'delete',
            +            'editbegin', 'editend', 'exit', 'extrude',
            +            'fixedflex', 'flip', 'fontclear', 'fontcount', 'fontindex', 'fontload',
            +            'fontname', 'fracsubdivide', 'freezecurves',
            +            'getdefaultsurface',
            +            'jitter',
            +            'lathe', 'layerName', 'layerVisible', 'lyrbg', 'lyrdata', 'lyrempty', 'lyremptybg',
            +            'lyremptyfg', 'lyrfg', 'lyrsetbg', 'lyrsetfg', 'lyrswap',
            +            'magnet', 'make4patch', 'makeball', 'makebox', 'makecone', 'makedisc',
            +            'maketesball', 'maketext', 'mergepoints', 'mergepols', 'meshedit', 'mirror',
            +            'morphpols', 'move',
            +            'new', 'nextsurface',
            +            'paste', 'pathclone', 'pathextrude', 'pixel', 'pointcount', 'pointinfo',
            +            'pointmove', 'pole', 'polycount', 'polyinfo', 'polynormal', 'polypointcount',
            +            'polypoints', 'polysurface',
            +            'quantize',
            +            'railclone', 'railextrude', 'redo', 'removepols', 'rempoint', 'rempoly',
            +            'renamesurface', 'revert', 'rotate',
            +            'scale', 'selhide', 'selinvert', 'selmode', 'selpoint', 'selpolygon', 'selunhide',
            +            'selectvmap', 'setlayername', 'setobject', 'setpivot', 'setsurface', 'shapebevel',
            +            'shear', 'skinpols', 'smooth', 'smoothcurves', 'smoothscale', 'smoothshift',
            +            'soliddrill', 'splitpols', 'subdivide', 'swaphidden',
            +            'taper', 'triple', 'toggleCCend', 'toggleCCstart', 'togglepatches', 'twist',
            +            'undo', 'undogroupend', 'undogroupbegin', 'unifypols', 'unweld',
            +            'vortex',
            +            'weldaverage', 'weldpoints'
            +            ),
            +        6 => array(
            +            'About', 'AboutOpenGL', 'AdaptiveSampling', 'AdaptiveThreshold',
            +            'AddAreaLight', 'AddBone', 'AddButton', 'AddCamera', 'AddChildBone',
            +            'AddDistantLight', 'AddEnvelope', 'AddLinearLight', 'AddNull',
            +            'AddPartigon', 'AddPlugins', 'AddPointLight', 'AddPosition',
            +            'AddRotation', 'AddScale', 'AddSpotlight', 'AddToSelection',
            +            'AdjustRegionTool', 'AffectCaustics', 'AffectDiffuse', 'AffectOpenGL',
            +            'AffectSpecular', 'AlertLevel', 'AmbientColor', 'AmbientIntensity',
            +            'Antialiasing', 'ApertureHeight', 'ApplyServer', 'AreaLight',
            +            'AutoConfirm', 'AutoFrameAdvance', 'AutoKey',
            +            'BackdropColor', 'BackView', 'BController', 'BLimits', 'BLurLength', 'BoneActive',
            +            'BoneFalloffType', 'BoneJointComp', 'BoneJointCompAmounts', 'BoneJointCompParent',
            +            'BoneLimitedRange', 'BoneMaxRange', 'BoneMinRange', 'BoneMuscleFlex',
            +            'BoneMuscleFlexAmounts', 'BoneMuscleFlexParent', 'BoneNormalization',
            +            'BoneRestLength', 'BoneRestPosition', 'BoneRestRotation', 'BoneSource',
            +            'BoneStrength', 'BoneStrengthMultiply', 'BoneWeightMapName', 'BoneWeightMapOnly',
            +            'BoneWeightShade', 'BoneXRay', 'BottomView', 'BoundingBoxThreshold',
            +            'BStiffness',
            +            'CacheCaustics', 'CacheRadiosity', 'CacheShadowMap',
            +            'CameraMask', 'CameraView', 'CameraZoomTool', 'CastShadow', 'CausticIntensity',
            +            'CenterItem', 'CenterMouse', 'ChangeTool', 'ClearAllBones', 'ClearAllCameras',
            +            'ClearAllLights', 'ClearAllObjects', 'ClearAudio', 'ClearScene', 'ClearSelected',
            +            'Clone', 'CommandHistory', 'CommandInput', 'Compositing', 'ConeAngleTool',
            +            'ContentDirectory', 'CreateKey',
            +            'DecreaseGrid', 'DeleteKey', 'DepthBufferAA', 'DepthOfField', 'DisplayOptions',
            +            'DistantLight', 'DrawAntialiasing', 'DrawBones', 'DrawChildBones', 'DynamicUpdate',
            +            'EditBones', 'EditCameras', 'EditKeys', 'EditLights',
            +            'EditMenus', 'EditObjects', 'EditPlugins', 'EditServer', 'EnableCaustics',
            +            'EnableDeformations', 'EnableIK', 'EnableLensFlares', 'EnableRadiosity', 'EnableServer',
            +            'EnableShadowMaps', 'EnableVIPER', 'EnableVolumetricLights', 'EnableXH',
            +            'EnableYP', 'EnableZB', 'EnahancedAA', 'ExcludeLight', 'ExcludeObject',
            +            'EyeSeparation',
            +            'FasterBones', 'FirstFrame', 'FirstItem', 'FitAll', 'FitSelected',
            +            'FlareIntensity', 'FlareOptions', 'FocalDistance', 'FogColor', 'FogMaxAmount',
            +            'FogMaxDistance', 'FogMinAmount', 'FogMinDistance', 'FogType', 'FractionalFrames',
            +            'FrameSize', 'FramesPerSecond', 'FrameStep', 'FreePreview', 'FrontView', 'FullTimeIK',
            +            'GeneralOptions', 'Generics', 'GlobalApertureHeight', 'GlobalBlurLength',
            +            'GlobalFrameSize', 'GlobalIllumination', 'GlobalMaskPosition', 'GlobalMotionBlur',
            +            'GlobalParticleBlur', 'GlobalPixelAspect', 'GlobalResolutionMulitplier', 'GoalItem',
            +            'GoalStrength', 'GoToFrame', 'GradientBackdrop', 'GraphEditor', 'GridSize', 'GroundColor',
            +            'HController', 'HideToolbar', 'HideWindows', 'HLimits', 'HStiffness',
            +            'ImageEditor', 'ImageProcessing', 'IncludeLight', 'IncludeObject', 'IncreaseGrid',
            +            'IndirectBounces', 'Item_SetWindowPos', 'ItemActive', 'ItemColor', 'ItemLock',
            +            'ItemProperties', 'ItemVisibilty',
            +            'KeepGoalWithinReach',
            +            'LastFrame', 'LastItem', 'LastPluginInterface', 'Layout_SetWindowPos',
            +            'Layout_SetWindowSize', 'LeftView', 'LensFlare', 'LensFStop', 'LightColor',
            +            'LightConeAngle', 'LightEdgeAngle', 'LightFalloffType', 'LightIntensity',
            +            'LightIntensityTool', 'LightQuality', 'LightRange', 'LightView', 'LimitB',
            +            'LimitDynamicRange', 'LimitedRegion', 'LimitH', 'LimitP', 'LinearLight',
            +            'LoadAudio', 'LoadFromScene', 'LoadMotion', 'LoadObject', 'LoadObjectLayer',
            +            'LoadPreview', 'LoadScene', 'LocalCoordinateSystem',
            +            'MakePreview', 'MaskColor', 'MaskPosition', 'MasterPlugins', 'MatchGoalOrientation',
            +            'MatteColor', 'MatteObject', 'MetaballResolution', 'Model', 'MorphAmount',
            +            'MorphAmountTool', 'MorphMTSE', 'MorphSurfaces', 'MorphTarget', 'MotionBlur',
            +            'MotionBlurDOFPreview', 'MotionOptions', 'MovePathTool', 'MovePivotTool', 'MoveTool',
            +            'NadirColor', 'NetRender', 'NextFrame', 'NextItem', 'NextKey', 'NextSibling',
            +            'NextViewLayout', 'NoiseReduction', 'Numeric',
            +            'ObjectDissolve',
            +            'ParentCoordinateSystem', 'ParentInPlace', 'ParentItem',
            +            'ParticleBlur', 'PathAlignLookAhead', 'PathAlignMaxLookSteps', 'PathAlignReliableDist',
            +            'Pause', 'PController', 'PerspectiveView',
            +            'PivotPosition', 'PivotRotation', 'PixelAspect', 'PlayAudio', 'PlayBackward',
            +            'PlayForward', 'PlayPreview', 'PLimits', 'PointLight', 'PolygonEdgeColor',
            +            'PolygonEdgeFlags', 'PolygonEdgeThickness', 'PolygonEdgeZScale', 'PolygonSize',
            +            'Position', 'Presets', 'PreviewFirstFrame', 'PreviewFrameStep', 'PreviewLastFrame',
            +            'PreviewOptions', 'PreviousFrame', 'PreviousItem', 'PreviousKey', 'PreviousSibling',
            +            'PreviousViewLayout', 'PStiffness',
            +            'Quit',
            +            'RadiosityIntensity', 'RadiosityTolerance', 'RadiosityType', 'RayRecursionLimit',
            +            'RayTraceReflection', 'RayTraceShadows',
            +            'RayTraceTransparency', 'ReceiveShadow', 'RecentContentDirs', 'RecentScenes',
            +            'ReconstructionFilter', 'RecordMaxAngles', 'RecordMinAngles', 'RecordPivotRotation',
            +            'RecordRestPosition', 'Redraw', 'RedrawNow', 'Refresh', 'RefreshNow', 'RegionPosition',
            +            'RemoveEnvelope', 'RemoveFromSelection', 'RemoveServer', 'Rename', 'RenderFrame',
            +            'RenderOptions', 'RenderScene', 'RenderSelected', 'RenderThreads',
            +            'ReplaceObjectLayer', 'ReplaceWithNull', 'ReplaceWithObject', 'Reset',
            +            'ResolutionMultiplier', 'RestLengthTool', 'RightView', 'RotatePivotTool',
            +            'RotateTool', 'Rotation',
            +            'SaveAllObjects', 'SaveCommandList', 'SaveCommandMessages',
            +            'SaveEndomorph', 'SaveLight', 'SaveLWSC1', 'SaveMotion', 'SaveObject', 'SaveObjectCopy',
            +            'SavePreview', 'SaveScene', 'SaveSceneAs', 'SaveSceneCopy', 'SaveTransformed',
            +            'SaveViewLayout', 'Scale', 'Scene_SetWindowPos', 'Scene_SetWindowSize',
            +            'SceneEditor', 'SchematicPosition', 'SchematicView', 'SelectAllBones',
            +            'SelectAllCameras', 'SelectAllLights', 'SelectAllObjects', 'SelectByName',
            +            'SelectChild', 'SelectItem', 'SelectParent', 'SelfShadow', 'ShadowColor',
            +            'ShadowExclusion', 'ShadowMapAngle', 'ShadowMapFitCone', 'ShadowMapFuzziness',
            +            'ShadowMapSize', 'ShadowType', 'ShowCages', 'ShowFieldChart', 'ShowHandles',
            +            'ShowIKChains', 'ShowMotionPaths', 'ShowSafeAreas', 'ShowTargetLines',
            +            'ShrinkEdgesWithDistance', 'SingleView', 'SizeTool', 'SkelegonsToBones', 'SkyColor',
            +            'Spotlight', 'SquashTool', 'Statistics', 'StatusMsg', 'Stereoscopic', 'StretchTool',
            +            'SubdivisionOrder', 'SubPatchLevel', 'SurfaceEditor', 'Synchronize',
            +            'TargetItem', 'TopView',
            +            'UnaffectedByFog', 'UnaffectedByIK', 'Undo', 'UnseenByAlphaChannel', 'UnseenByCamera',
            +            'UnseenByRays', 'UseGlobalResolution', 'UseGlobalBlur', 'UseGlobalMask',
            +            'UseMorphedPositions',
            +            'ViewLayout', 'VIPER', 'VolumetricLighting',
            +            'VolumetricLightingOptions', 'VolumetricRadiosity', 'Volumetrics',
            +            'WorldCoordinateSystem',
            +            'XYView', 'XZView',
            +            'ZenithColor', 'ZoomFactor', 'ZoomIn', 'ZoomInX2', 'ZoomOut', 'ZoomOutX2', 'ZYView',
            +            'Camera', 'Channel', 'ChannelGroup', 'Envelope', 'File', 'Glyph', 'Icon', 'Image',
            +            'Light', 'Mesh', 'Scene', 'Surface', 'VMap'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '{', '}', '[', ']', '=', '<', '>', '+', '-', '*', '/', '!', '%', '&', '@'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => true,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        5 => false,
            +        6 => false,
            +        7 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000000; font-weight: bold;',
            +            2 => 'color: #FF6820; font-weight: bold;', //LS_COMMANDS
            +            3 => 'color: #007F7F; font-weight: bold;', //LS_MEMBERS
            +            4 => 'color: #800080; font-weight: bold;', //LS_METHODS
            +            5 => 'color: #51BD95; font-weight: bold;', //LS_MODELER
            +            6 => 'color: #416F85; font-weight: bold;', //LS_GENERAL
            +            7 => 'color: #C92929; font-weight: bold;'  //LS_COMMANDS (cont)
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #7F7F7F;',
            +            'MULTI' => 'color: #7F7F7F;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #0040A0;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #00C800;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #6953AC;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #0040A0;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => '',
            +        6 => '',
            +        7 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4,
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            3 => array(
            +                'DISALLOWED_BEFORE' => '(?<=\.)'
            +                ),
            +            4 => array(
            +                'DISALLOWED_BEFORE' => '(?<=\.)'
            +                )
            +            )
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/lsl2.php b/vendor/easybook/geshi/geshi/lsl2.php
            new file mode 100644
            index 0000000000..dd0bcce8bf
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/lsl2.php
            @@ -0,0 +1,1257 @@
            + 'LSL2',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +// Generated by LSL2 Derived Files Generator. Database version: 0.0.20130627001; output module version: 0.0.20130619000
            +        1 => array( // flow control
            +            'do',
            +            'else',
            +            'for',
            +            'if',
            +            'jump',
            +            'return',
            +            'state',
            +            'while',
            +            ),
            +        2 => array( // manifest constants
            +            'ACTIVE',
            +            'AGENT',
            +            'AGENT_ALWAYS_RUN',
            +            'AGENT_ATTACHMENTS',
            +            'AGENT_AUTOPILOT',
            +            'AGENT_AWAY',
            +            'AGENT_BUSY',
            +            'AGENT_BY_LEGACY_NAME',
            +            'AGENT_BY_USERNAME',
            +            'AGENT_CROUCHING',
            +            'AGENT_FLYING',
            +            'AGENT_IN_AIR',
            +            'AGENT_LIST_PARCEL',
            +            'AGENT_LIST_PARCEL_OWNER',
            +            'AGENT_LIST_REGION',
            +            'AGENT_MOUSELOOK',
            +            'AGENT_ON_OBJECT',
            +            'AGENT_SCRIPTED',
            +            'AGENT_SITTING',
            +            'AGENT_TYPING',
            +            'AGENT_WALKING',
            +            'ALL_SIDES',
            +            'ANIM_ON',
            +            'ATTACH_AVATAR_CENTER',
            +            'ATTACH_BACK',
            +            'ATTACH_BELLY',
            +            'ATTACH_CHEST',
            +            'ATTACH_CHIN',
            +            'ATTACH_HEAD',
            +            'ATTACH_HUD_BOTTOM',
            +            'ATTACH_HUD_BOTTOM_LEFT',
            +            'ATTACH_HUD_BOTTOM_RIGHT',
            +            'ATTACH_HUD_CENTER_1',
            +            'ATTACH_HUD_CENTER_2',
            +            'ATTACH_HUD_TOP_CENTER',
            +            'ATTACH_HUD_TOP_LEFT',
            +            'ATTACH_HUD_TOP_RIGHT',
            +            'ATTACH_LEAR',
            +            'ATTACH_LEFT_PEC',
            +            'ATTACH_LEYE',
            +            'ATTACH_LFOOT',
            +            'ATTACH_LHAND',
            +            'ATTACH_LHIP',
            +            'ATTACH_LLARM',
            +            'ATTACH_LLLEG',
            +            'ATTACH_LSHOULDER',
            +            'ATTACH_LUARM',
            +            'ATTACH_LULEG',
            +            'ATTACH_MOUTH',
            +            'ATTACH_NECK',
            +            'ATTACH_NOSE',
            +            'ATTACH_PELVIS',
            +            'ATTACH_REAR',
            +            'ATTACH_REYE',
            +            'ATTACH_RFOOT',
            +            'ATTACH_RHAND',
            +            'ATTACH_RHIP',
            +            'ATTACH_RIGHT_PEC',
            +            'ATTACH_RLARM',
            +            'ATTACH_RLLEG',
            +            'ATTACH_RSHOULDER',
            +            'ATTACH_RUARM',
            +            'ATTACH_RULEG',
            +            'AVOID_CHARACTERS',
            +            'AVOID_DYNAMIC_OBSTACLES',
            +            'AVOID_NONE',
            +            'CAMERA_ACTIVE',
            +            'CAMERA_BEHINDNESS_ANGLE',
            +            'CAMERA_BEHINDNESS_LAG',
            +            'CAMERA_DISTANCE',
            +            'CAMERA_FOCUS',
            +            'CAMERA_FOCUS_LAG',
            +            'CAMERA_FOCUS_LOCKED',
            +            'CAMERA_FOCUS_OFFSET',
            +            'CAMERA_FOCUS_THRESHOLD',
            +            'CAMERA_PITCH',
            +            'CAMERA_POSITION',
            +            'CAMERA_POSITION_LAG',
            +            'CAMERA_POSITION_LOCKED',
            +            'CAMERA_POSITION_THRESHOLD',
            +            'CHANGED_ALLOWED_DROP',
            +            'CHANGED_COLOR',
            +            'CHANGED_INVENTORY',
            +            'CHANGED_LINK',
            +            'CHANGED_MEDIA',
            +            'CHANGED_OWNER',
            +            'CHANGED_REGION',
            +            'CHANGED_REGION_START',
            +            'CHANGED_SCALE',
            +            'CHANGED_SHAPE',
            +            'CHANGED_TELEPORT',
            +            'CHANGED_TEXTURE',
            +            'CHARACTER_ACCOUNT_FOR_SKIPPED_FRAMES',
            +            'CHARACTER_AVOIDANCE_MODE',
            +            'CHARACTER_CMD_JUMP',
            +            'CHARACTER_CMD_SMOOTH_STOP',
            +            'CHARACTER_CMD_STOP',
            +            'CHARACTER_DESIRED_SPEED',
            +            'CHARACTER_DESIRED_TURN_SPEED',
            +            'CHARACTER_LENGTH',
            +            'CHARACTER_MAX_ACCEL',
            +            'CHARACTER_MAX_DECEL',
            +            'CHARACTER_MAX_SPEED',
            +            'CHARACTER_MAX_TURN_RADIUS',
            +            'CHARACTER_ORIENTATION',
            +            'CHARACTER_RADIUS',
            +            'CHARACTER_STAY_WITHIN_PARCEL',
            +            'CHARACTER_TYPE',
            +            'CHARACTER_TYPE_A',
            +            'CHARACTER_TYPE_B',
            +            'CHARACTER_TYPE_C',
            +            'CHARACTER_TYPE_D',
            +            'CHARACTER_TYPE_NONE',
            +            'CLICK_ACTION_BUY',
            +            'CLICK_ACTION_NONE',
            +            'CLICK_ACTION_OPEN',
            +            'CLICK_ACTION_OPEN_MEDIA',
            +            'CLICK_ACTION_PAY',
            +            'CLICK_ACTION_PLAY',
            +            'CLICK_ACTION_SIT',
            +            'CLICK_ACTION_TOUCH',
            +            'CONTENT_TYPE_ATOM',
            +            'CONTENT_TYPE_FORM',
            +            'CONTENT_TYPE_HTML',
            +            'CONTENT_TYPE_JSON',
            +            'CONTENT_TYPE_LLSD',
            +            'CONTENT_TYPE_RSS',
            +            'CONTENT_TYPE_TEXT',
            +            'CONTENT_TYPE_XHTML',
            +            'CONTENT_TYPE_XML',
            +            'CONTROL_BACK',
            +            'CONTROL_DOWN',
            +            'CONTROL_FWD',
            +            'CONTROL_LBUTTON',
            +            'CONTROL_LEFT',
            +            'CONTROL_ML_LBUTTON',
            +            'CONTROL_RIGHT',
            +            'CONTROL_ROT_LEFT',
            +            'CONTROL_ROT_RIGHT',
            +            'CONTROL_UP',
            +            'DATA_BORN',
            +            'DATA_NAME',
            +            'DATA_ONLINE',
            +            'DATA_PAYINFO',
            +            'DATA_SIM_POS',
            +            'DATA_SIM_RATING',
            +            'DATA_SIM_STATUS',
            +            'DEBUG_CHANNEL',
            +            'DEG_TO_RAD',
            +            'DENSITY',
            +            'EOF',
            +            'ERR_GENERIC',
            +            'ERR_MALFORMED_PARAMS',
            +            'ERR_PARCEL_PERMISSIONS',
            +            'ERR_RUNTIME_PERMISSIONS',
            +            'ERR_THROTTLED',
            +            'ESTATE_ACCESS_ALLOWED_AGENT_ADD',
            +            'ESTATE_ACCESS_ALLOWED_AGENT_REMOVE',
            +            'ESTATE_ACCESS_ALLOWED_GROUP_ADD',
            +            'ESTATE_ACCESS_ALLOWED_GROUP_REMOVE',
            +            'ESTATE_ACCESS_BANNED_AGENT_ADD',
            +            'ESTATE_ACCESS_BANNED_AGENT_REMOVE',
            +            'FALSE',
            +            'FORCE_DIRECT_PATH',
            +            'FRICTION',
            +            'GCNP_RADIUS',
            +            'GCNP_STATIC',
            +            'GRAVITY_MULTIPLIER',
            +            'HORIZONTAL',
            +            'HTTP_BODY_MAXLENGTH',
            +            'HTTP_BODY_TRUNCATED',
            +            'HTTP_CUSTOM_HEADER',
            +            'HTTP_METHOD',
            +            'HTTP_MIMETYPE',
            +            'HTTP_PRAGMA_NO_CACHE',
            +            'HTTP_VERBOSE_THROTTLE',
            +            'HTTP_VERIFY_CERT',
            +            'INVENTORY_ALL',
            +            'INVENTORY_ANIMATION',
            +            'INVENTORY_BODYPART',
            +            'INVENTORY_CLOTHING',
            +            'INVENTORY_GESTURE',
            +            'INVENTORY_LANDMARK',
            +            'INVENTORY_NONE',
            +            'INVENTORY_NOTECARD',
            +            'INVENTORY_OBJECT',
            +            'INVENTORY_SCRIPT',
            +            'INVENTORY_SOUND',
            +            'INVENTORY_TEXTURE',
            +            'JSON_APPEND',
            +            'JSON_ARRAY',
            +            'JSON_FALSE',
            +            'JSON_INVALID',
            +            'JSON_NULL',
            +            'JSON_NUMBER',
            +            'JSON_OBJECT',
            +            'JSON_STRING',
            +            'JSON_TRUE',
            +            'KFM_CMD_PAUSE',
            +            'KFM_CMD_PLAY',
            +            'KFM_CMD_SET_MODE',
            +            'KFM_CMD_STOP',
            +            'KFM_COMMAND',
            +            'KFM_DATA',
            +            'KFM_FORWARD',
            +            'KFM_LOOP',
            +            'KFM_MODE',
            +            'KFM_PING_PONG',
            +            'KFM_REVERSE',
            +            'KFM_ROTATION',
            +            'KFM_TRANSLATION',
            +            'LAND_LARGE_BRUSH',
            +            'LAND_LEVEL',
            +            'LAND_LOWER',
            +            'LAND_MEDIUM_BRUSH',
            +            'LAND_NOISE',
            +            'LAND_RAISE',
            +            'LAND_REVERT',
            +            'LAND_SMALL_BRUSH',
            +            'LAND_SMOOTH',
            +            'LINK_ALL_CHILDREN',
            +            'LINK_ALL_OTHERS',
            +            'LINK_ROOT',
            +            'LINK_SET',
            +            'LINK_THIS',
            +            'LIST_STAT_GEOMETRIC_MEAN',
            +            'LIST_STAT_MAX',
            +            'LIST_STAT_MEAN',
            +            'LIST_STAT_MEDIAN',
            +            'LIST_STAT_MIN',
            +            'LIST_STAT_NUM_COUNT',
            +            'LIST_STAT_RANGE',
            +            'LIST_STAT_STD_DEV',
            +            'LIST_STAT_SUM',
            +            'LIST_STAT_SUM_SQUARES',
            +            'LOOP',
            +            'MASK_BASE',
            +            'MASK_EVERYONE',
            +            'MASK_GROUP',
            +            'MASK_NEXT',
            +            'MASK_OWNER',
            +            'NULL_KEY',
            +            'OBJECT_ATTACHED_POINT',
            +            'OBJECT_CHARACTER_TIME',
            +            'OBJECT_CREATOR',
            +            'OBJECT_DESC',
            +            'OBJECT_GROUP',
            +            'OBJECT_NAME',
            +            'OBJECT_OWNER',
            +            'OBJECT_PATHFINDING_TYPE',
            +            'OBJECT_PHANTOM',
            +            'OBJECT_PHYSICS',
            +            'OBJECT_PHYSICS_COST',
            +            'OBJECT_POS',
            +            'OBJECT_PRIM_EQUIVALENCE',
            +            'OBJECT_RETURN_PARCEL',
            +            'OBJECT_RETURN_PARCEL_OWNER',
            +            'OBJECT_RETURN_REGION',
            +            'OBJECT_ROOT',
            +            'OBJECT_ROT',
            +            'OBJECT_RUNNING_SCRIPT_COUNT',
            +            'OBJECT_SCRIPT_MEMORY',
            +            'OBJECT_SCRIPT_TIME',
            +            'OBJECT_SERVER_COST',
            +            'OBJECT_STREAMING_COST',
            +            'OBJECT_TEMP_ON_REZ',
            +            'OBJECT_TOTAL_SCRIPT_COUNT',
            +            'OBJECT_UNKNOWN_DETAIL',
            +            'OBJECT_VELOCITY',
            +            'OPT_AVATAR',
            +            'OPT_CHARACTER',
            +            'OPT_EXCLUSION_VOLUME',
            +            'OPT_LEGACY_LINKSET',
            +            'OPT_MATERIAL_VOLUME',
            +            'OPT_OTHER',
            +            'OPT_STATIC_OBSTACLE',
            +            'OPT_WALKABLE',
            +            'PARCEL_COUNT_GROUP',
            +            'PARCEL_COUNT_OTHER',
            +            'PARCEL_COUNT_OWNER',
            +            'PARCEL_COUNT_SELECTED',
            +            'PARCEL_COUNT_TEMP',
            +            'PARCEL_COUNT_TOTAL',
            +            'PARCEL_DETAILS_AREA',
            +            'PARCEL_DETAILS_DESC',
            +            'PARCEL_DETAILS_GROUP',
            +            'PARCEL_DETAILS_ID',
            +            'PARCEL_DETAILS_NAME',
            +            'PARCEL_DETAILS_OWNER',
            +            'PARCEL_DETAILS_SEE_AVATARS',
            +            'PARCEL_FLAG_ALLOW_ALL_OBJECT_ENTRY',
            +            'PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS',
            +            'PARCEL_FLAG_ALLOW_CREATE_OBJECTS',
            +            'PARCEL_FLAG_ALLOW_DAMAGE',
            +            'PARCEL_FLAG_ALLOW_FLY',
            +            'PARCEL_FLAG_ALLOW_GROUP_OBJECT_ENTRY',
            +            'PARCEL_FLAG_ALLOW_GROUP_SCRIPTS',
            +            'PARCEL_FLAG_ALLOW_LANDMARK',
            +            'PARCEL_FLAG_ALLOW_SCRIPTS',
            +            'PARCEL_FLAG_ALLOW_TERRAFORM',
            +            'PARCEL_FLAG_LOCAL_SOUND_ONLY',
            +            'PARCEL_FLAG_RESTRICT_PUSHOBJECT',
            +            'PARCEL_FLAG_USE_ACCESS_GROUP',
            +            'PARCEL_FLAG_USE_ACCESS_LIST',
            +            'PARCEL_FLAG_USE_BAN_LIST',
            +            'PARCEL_FLAG_USE_LAND_PASS_LIST',
            +            'PARCEL_MEDIA_COMMAND_AGENT',
            +            'PARCEL_MEDIA_COMMAND_AUTO_ALIGN',
            +            'PARCEL_MEDIA_COMMAND_DESC',
            +            'PARCEL_MEDIA_COMMAND_LOOP',
            +            'PARCEL_MEDIA_COMMAND_LOOP_SET',
            +            'PARCEL_MEDIA_COMMAND_PAUSE',
            +            'PARCEL_MEDIA_COMMAND_PLAY',
            +            'PARCEL_MEDIA_COMMAND_SIZE',
            +            'PARCEL_MEDIA_COMMAND_STOP',
            +            'PARCEL_MEDIA_COMMAND_TEXTURE',
            +            'PARCEL_MEDIA_COMMAND_TIME',
            +            'PARCEL_MEDIA_COMMAND_TYPE',
            +            'PARCEL_MEDIA_COMMAND_UNLOAD',
            +            'PARCEL_MEDIA_COMMAND_URL',
            +            'PASSIVE',
            +            'PATROL_PAUSE_AT_WAYPOINTS',
            +            'PAYMENT_INFO_ON_FILE',
            +            'PAYMENT_INFO_USED',
            +            'PAY_DEFAULT',
            +            'PAY_HIDE',
            +            'PERMISSION_ATTACH',
            +            'PERMISSION_CHANGE_LINKS',
            +            'PERMISSION_CONTROL_CAMERA',
            +            'PERMISSION_DEBIT',
            +            'PERMISSION_OVERRIDE_ANIMATIONS',
            +            'PERMISSION_RETURN_OBJECTS',
            +            'PERMISSION_SILENT_ESTATE_MANAGEMENT',
            +            'PERMISSION_TAKE_CONTROLS',
            +            'PERMISSION_TELEPORT',
            +            'PERMISSION_TRACK_CAMERA',
            +            'PERMISSION_TRIGGER_ANIMATION',
            +            'PERM_ALL',
            +            'PERM_COPY',
            +            'PERM_MODIFY',
            +            'PERM_MOVE',
            +            'PERM_TRANSFER',
            +            'PI',
            +            'PING_PONG',
            +            'PI_BY_TWO',
            +            'PRIM_BUMP_BARK',
            +            'PRIM_BUMP_BLOBS',
            +            'PRIM_BUMP_BRICKS',
            +            'PRIM_BUMP_BRIGHT',
            +            'PRIM_BUMP_CHECKER',
            +            'PRIM_BUMP_CONCRETE',
            +            'PRIM_BUMP_DARK',
            +            'PRIM_BUMP_DISKS',
            +            'PRIM_BUMP_GRAVEL',
            +            'PRIM_BUMP_LARGETILE',
            +            'PRIM_BUMP_NONE',
            +            'PRIM_BUMP_SHINY',
            +            'PRIM_BUMP_SIDING',
            +            'PRIM_BUMP_STONE',
            +            'PRIM_BUMP_STUCCO',
            +            'PRIM_BUMP_SUCTION',
            +            'PRIM_BUMP_TILE',
            +            'PRIM_BUMP_WEAVE',
            +            'PRIM_BUMP_WOOD',
            +            'PRIM_COLOR',
            +            'PRIM_DESC',
            +            'PRIM_FLEXIBLE',
            +            'PRIM_FULLBRIGHT',
            +            'PRIM_GLOW',
            +            'PRIM_HOLE_CIRCLE',
            +            'PRIM_HOLE_DEFAULT',
            +            'PRIM_HOLE_SQUARE',
            +            'PRIM_HOLE_TRIANGLE',
            +            'PRIM_LINK_TARGET',
            +            'PRIM_MATERIAL',
            +            'PRIM_MATERIAL_FLESH',
            +            'PRIM_MATERIAL_GLASS',
            +            'PRIM_MATERIAL_METAL',
            +            'PRIM_MATERIAL_PLASTIC',
            +            'PRIM_MATERIAL_RUBBER',
            +            'PRIM_MATERIAL_STONE',
            +            'PRIM_MATERIAL_WOOD',
            +            'PRIM_MEDIA_ALT_IMAGE_ENABLE',
            +            'PRIM_MEDIA_AUTO_LOOP',
            +            'PRIM_MEDIA_AUTO_PLAY',
            +            'PRIM_MEDIA_AUTO_SCALE',
            +            'PRIM_MEDIA_AUTO_ZOOM',
            +            'PRIM_MEDIA_CONTROLS',
            +            'PRIM_MEDIA_CONTROLS_MINI',
            +            'PRIM_MEDIA_CONTROLS_STANDARD',
            +            'PRIM_MEDIA_CURRENT_URL',
            +            'PRIM_MEDIA_FIRST_CLICK_INTERACT',
            +            'PRIM_MEDIA_HEIGHT_PIXELS',
            +            'PRIM_MEDIA_HOME_URL',
            +            'PRIM_MEDIA_MAX_HEIGHT_PIXELS',
            +            'PRIM_MEDIA_MAX_URL_LENGTH',
            +            'PRIM_MEDIA_MAX_WHITELIST_COUNT',
            +            'PRIM_MEDIA_MAX_WHITELIST_SIZE',
            +            'PRIM_MEDIA_MAX_WIDTH_PIXELS',
            +            'PRIM_MEDIA_PARAM_MAX',
            +            'PRIM_MEDIA_PERMS_CONTROL',
            +            'PRIM_MEDIA_PERMS_INTERACT',
            +            'PRIM_MEDIA_PERM_ANYONE',
            +            'PRIM_MEDIA_PERM_GROUP',
            +            'PRIM_MEDIA_PERM_NONE',
            +            'PRIM_MEDIA_PERM_OWNER',
            +            'PRIM_MEDIA_WHITELIST',
            +            'PRIM_MEDIA_WHITELIST_ENABLE',
            +            'PRIM_MEDIA_WIDTH_PIXELS',
            +            'PRIM_NAME',
            +            'PRIM_OMEGA',
            +            'PRIM_PHANTOM',
            +            'PRIM_PHYSICS',
            +            'PRIM_PHYSICS_SHAPE_CONVEX',
            +            'PRIM_PHYSICS_SHAPE_NONE',
            +            'PRIM_PHYSICS_SHAPE_PRIM',
            +            'PRIM_PHYSICS_SHAPE_TYPE',
            +            'PRIM_POINT_LIGHT',
            +            'PRIM_POSITION',
            +            'PRIM_POS_LOCAL',
            +            'PRIM_ROTATION',
            +            'PRIM_ROT_LOCAL',
            +            'PRIM_SCULPT_FLAG_INVERT',
            +            'PRIM_SCULPT_FLAG_MIRROR',
            +            'PRIM_SCULPT_TYPE_CYLINDER',
            +            'PRIM_SCULPT_TYPE_MASK',
            +            'PRIM_SCULPT_TYPE_PLANE',
            +            'PRIM_SCULPT_TYPE_SPHERE',
            +            'PRIM_SCULPT_TYPE_TORUS',
            +            'PRIM_SHINY_HIGH',
            +            'PRIM_SHINY_LOW',
            +            'PRIM_SHINY_MEDIUM',
            +            'PRIM_SHINY_NONE',
            +            'PRIM_SIZE',
            +            'PRIM_SLICE',
            +            'PRIM_TEMP_ON_REZ',
            +            'PRIM_TEXGEN',
            +            'PRIM_TEXGEN_DEFAULT',
            +            'PRIM_TEXGEN_PLANAR',
            +            'PRIM_TEXT',
            +            'PRIM_TEXTURE',
            +            'PRIM_TYPE',
            +            'PRIM_TYPE_BOX',
            +            'PRIM_TYPE_CYLINDER',
            +            'PRIM_TYPE_PRISM',
            +            'PRIM_TYPE_RING',
            +            'PRIM_TYPE_SCULPT',
            +            'PRIM_TYPE_SPHERE',
            +            'PRIM_TYPE_TORUS',
            +            'PRIM_TYPE_TUBE',
            +            'PROFILE_NONE',
            +            'PROFILE_SCRIPT_MEMORY',
            +            'PSYS_PART_BOUNCE_MASK',
            +            'PSYS_PART_EMISSIVE_MASK',
            +            'PSYS_PART_END_ALPHA',
            +            'PSYS_PART_END_COLOR',
            +            'PSYS_PART_END_SCALE',
            +            'PSYS_PART_FLAGS',
            +            'PSYS_PART_FOLLOW_SRC_MASK',
            +            'PSYS_PART_FOLLOW_VELOCITY_MASK',
            +            'PSYS_PART_INTERP_COLOR_MASK',
            +            'PSYS_PART_INTERP_SCALE_MASK',
            +            'PSYS_PART_MAX_AGE',
            +            'PSYS_PART_START_ALPHA',
            +            'PSYS_PART_START_COLOR',
            +            'PSYS_PART_START_SCALE',
            +            'PSYS_PART_TARGET_LINEAR_MASK',
            +            'PSYS_PART_TARGET_POS_MASK',
            +            'PSYS_PART_WIND_MASK',
            +            'PSYS_SRC_ACCEL',
            +            'PSYS_SRC_ANGLE_BEGIN',
            +            'PSYS_SRC_ANGLE_END',
            +            'PSYS_SRC_BURST_PART_COUNT',
            +            'PSYS_SRC_BURST_RADIUS',
            +            'PSYS_SRC_BURST_RATE',
            +            'PSYS_SRC_BURST_SPEED_MAX',
            +            'PSYS_SRC_BURST_SPEED_MIN',
            +            'PSYS_SRC_MAX_AGE',
            +            'PSYS_SRC_OMEGA',
            +            'PSYS_SRC_PATTERN',
            +            'PSYS_SRC_PATTERN_ANGLE',
            +            'PSYS_SRC_PATTERN_ANGLE_CONE',
            +            'PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY',
            +            'PSYS_SRC_PATTERN_DROP',
            +            'PSYS_SRC_PATTERN_EXPLODE',
            +            'PSYS_SRC_TARGET_KEY',
            +            'PSYS_SRC_TEXTURE',
            +            'PUBLIC_CHANNEL',
            +            'PURSUIT_FUZZ_FACTOR',
            +            'PURSUIT_GOAL_TOLERANCE',
            +            'PURSUIT_INTERCEPT',
            +            'PURSUIT_OFFSET',
            +            'PU_EVADE_HIDDEN',
            +            'PU_EVADE_SPOTTED',
            +            'PU_FAILURE_DYNAMIC_PATHFINDING_DISABLED',
            +            'PU_FAILURE_INVALID_GOAL',
            +            'PU_FAILURE_INVALID_START',
            +            'PU_FAILURE_NO_NAVMESH',
            +            'PU_FAILURE_NO_VALID_DESTINATION',
            +            'PU_FAILURE_OTHER',
            +            'PU_FAILURE_PARCEL_UNREACHABLE',
            +            'PU_FAILURE_TARGET_GONE',
            +            'PU_FAILURE_UNREACHABLE',
            +            'PU_GOAL_REACHED',
            +            'PU_SLOWDOWN_DISTANCE_REACHED',
            +            'RAD_TO_DEG',
            +            'RCERR_CAST_TIME_EXCEEDED',
            +            'RCERR_SIM_PERF_LOW',
            +            'RCERR_UNKNOWN',
            +            'RC_DATA_FLAGS',
            +            'RC_DETECT_PHANTOM',
            +            'RC_GET_LINK_NUM',
            +            'RC_GET_NORMAL',
            +            'RC_GET_ROOT_KEY',
            +            'RC_MAX_HITS',
            +            'RC_REJECT_AGENTS',
            +            'RC_REJECT_LAND',
            +            'RC_REJECT_NONPHYSICAL',
            +            'RC_REJECT_PHYSICAL',
            +            'RC_REJECT_TYPES',
            +            'REGION_FLAG_ALLOW_DAMAGE',
            +            'REGION_FLAG_ALLOW_DIRECT_TELEPORT',
            +            'REGION_FLAG_BLOCK_FLY',
            +            'REGION_FLAG_BLOCK_TERRAFORM',
            +            'REGION_FLAG_DISABLE_COLLISIONS',
            +            'REGION_FLAG_DISABLE_PHYSICS',
            +            'REGION_FLAG_FIXED_SUN',
            +            'REGION_FLAG_RESTRICT_PUSHOBJECT',
            +            'REGION_FLAG_SANDBOX',
            +            'REMOTE_DATA_CHANNEL',
            +            'REMOTE_DATA_REPLY',
            +            'REMOTE_DATA_REQUEST',
            +            'REQUIRE_LINE_OF_SIGHT',
            +            'RESTITUTION',
            +            'REVERSE',
            +            'ROTATE',
            +            'SCALE',
            +            'SCRIPTED',
            +            'SIM_STAT_PCT_CHARS_STEPPED',
            +            'SMOOTH',
            +            'SQRT2',
            +            'STATUS_BLOCK_GRAB',
            +            'STATUS_BLOCK_GRAB_OBJECT',
            +            'STATUS_BOUNDS_ERROR',
            +            'STATUS_CAST_SHADOWS',
            +            'STATUS_DIE_AT_EDGE',
            +            'STATUS_INTERNAL_ERROR',
            +            'STATUS_MALFORMED_PARAMS',
            +            'STATUS_NOT_FOUND',
            +            'STATUS_NOT_SUPPORTED',
            +            'STATUS_OK',
            +            'STATUS_PHANTOM',
            +            'STATUS_PHYSICS',
            +            'STATUS_RETURN_AT_EDGE',
            +            'STATUS_ROTATE_X',
            +            'STATUS_ROTATE_Y',
            +            'STATUS_ROTATE_Z',
            +            'STATUS_SANDBOX',
            +            'STATUS_TYPE_MISMATCH',
            +            'STATUS_WHITELIST_FAILED',
            +            'STRING_TRIM',
            +            'STRING_TRIM_HEAD',
            +            'STRING_TRIM_TAIL',
            +            'TEXTURE_BLANK',
            +            'TEXTURE_DEFAULT',
            +            'TEXTURE_MEDIA',
            +            'TEXTURE_PLYWOOD',
            +            'TEXTURE_TRANSPARENT',
            +            'TOUCH_INVALID_FACE',
            +            'TOUCH_INVALID_TEXCOORD',
            +            'TOUCH_INVALID_VECTOR',
            +            'TRAVERSAL_TYPE',
            +            'TRAVERSAL_TYPE_FAST',
            +            'TRAVERSAL_TYPE_NONE',
            +            'TRAVERSAL_TYPE_SLOW',
            +            'TRUE',
            +            'TWO_PI',
            +            'TYPE_FLOAT',
            +            'TYPE_INTEGER',
            +            'TYPE_INVALID',
            +            'TYPE_KEY',
            +            'TYPE_ROTATION',
            +            'TYPE_STRING',
            +            'TYPE_VECTOR',
            +            'URL_REQUEST_DENIED',
            +            'URL_REQUEST_GRANTED',
            +            'VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY',
            +            'VEHICLE_ANGULAR_DEFLECTION_TIMESCALE',
            +            'VEHICLE_ANGULAR_FRICTION_TIMESCALE',
            +            'VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE',
            +            'VEHICLE_ANGULAR_MOTOR_DIRECTION',
            +            'VEHICLE_ANGULAR_MOTOR_TIMESCALE',
            +            'VEHICLE_BANKING_EFFICIENCY',
            +            'VEHICLE_BANKING_MIX',
            +            'VEHICLE_BANKING_TIMESCALE',
            +            'VEHICLE_BUOYANCY',
            +            'VEHICLE_FLAG_CAMERA_DECOUPLED',
            +            'VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT',
            +            'VEHICLE_FLAG_HOVER_TERRAIN_ONLY',
            +            'VEHICLE_FLAG_HOVER_UP_ONLY',
            +            'VEHICLE_FLAG_HOVER_WATER_ONLY',
            +            'VEHICLE_FLAG_LIMIT_MOTOR_UP',
            +            'VEHICLE_FLAG_LIMIT_ROLL_ONLY',
            +            'VEHICLE_FLAG_MOUSELOOK_BANK',
            +            'VEHICLE_FLAG_MOUSELOOK_STEER',
            +            'VEHICLE_FLAG_NO_DEFLECTION_UP',
            +            'VEHICLE_HOVER_EFFICIENCY',
            +            'VEHICLE_HOVER_HEIGHT',
            +            'VEHICLE_HOVER_TIMESCALE',
            +            'VEHICLE_LINEAR_DEFLECTION_EFFICIENCY',
            +            'VEHICLE_LINEAR_DEFLECTION_TIMESCALE',
            +            'VEHICLE_LINEAR_FRICTION_TIMESCALE',
            +            'VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE',
            +            'VEHICLE_LINEAR_MOTOR_DIRECTION',
            +            'VEHICLE_LINEAR_MOTOR_OFFSET',
            +            'VEHICLE_LINEAR_MOTOR_TIMESCALE',
            +            'VEHICLE_REFERENCE_FRAME',
            +            'VEHICLE_TYPE_AIRPLANE',
            +            'VEHICLE_TYPE_BALLOON',
            +            'VEHICLE_TYPE_BOAT',
            +            'VEHICLE_TYPE_CAR',
            +            'VEHICLE_TYPE_NONE',
            +            'VEHICLE_TYPE_SLED',
            +            'VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY',
            +            'VEHICLE_VERTICAL_ATTRACTION_TIMESCALE',
            +            'VERTICAL',
            +            'WANDER_PAUSE_AT_WAYPOINTS',
            +            'ZERO_ROTATION',
            +            'ZERO_VECTOR',
            +            ),
            +        3 => array( // handlers
            +            'at_rot_target',
            +            'at_target',
            +            'attach',
            +            'changed',
            +            'collision',
            +            'collision_end',
            +            'collision_start',
            +            'control',
            +            'dataserver',
            +            'email',
            +            'http_request',
            +            'http_response',
            +            'land_collision',
            +            'land_collision_end',
            +            'land_collision_start',
            +            'link_message',
            +            'listen',
            +            'money',
            +            'moving_end',
            +            'moving_start',
            +            'no_sensor',
            +            'not_at_rot_target',
            +            'not_at_target',
            +            'object_rez',
            +            'on_rez',
            +            'path_update',
            +            'remote_data',
            +            'run_time_permissions',
            +            'sensor',
            +            'state_entry',
            +            'state_exit',
            +            'timer',
            +            'touch',
            +            'touch_end',
            +            'touch_start',
            +            'transaction_result',
            +            ),
            +        4 => array( // data types
            +            'float',
            +            'integer',
            +            'key',
            +            'list',
            +            'quaternion',
            +            'rotation',
            +            'string',
            +            'vector',
            +            ),
            +        5 => array( // library
            +            'default',
            +            'llAbs',
            +            'llAcos',
            +            'llAddToLandBanList',
            +            'llAddToLandPassList',
            +            'llAdjustSoundVolume',
            +            'llAllowInventoryDrop',
            +            'llAngleBetween',
            +            'llApplyImpulse',
            +            'llApplyRotationalImpulse',
            +            'llAsin',
            +            'llAtan2',
            +            'llAttachToAvatar',
            +            'llAttachToAvatarTemp',
            +            'llAvatarOnLinkSitTarget',
            +            'llAvatarOnSitTarget',
            +            'llAxes2Rot',
            +            'llAxisAngle2Rot',
            +            'llBase64ToInteger',
            +            'llBase64ToString',
            +            'llBreakAllLinks',
            +            'llBreakLink',
            +            'llCastRay',
            +            'llCeil',
            +            'llClearCameraParams',
            +            'llClearLinkMedia',
            +            'llClearPrimMedia',
            +            'llCloseRemoteDataChannel',
            +            'llCollisionFilter',
            +            'llCollisionSound',
            +            'llCos',
            +            'llCreateCharacter',
            +            'llCreateLink',
            +            'llCSV2List',
            +            'llDeleteCharacter',
            +            'llDeleteSubList',
            +            'llDeleteSubString',
            +            'llDetachFromAvatar',
            +            'llDetectedGrab',
            +            'llDetectedGroup',
            +            'llDetectedKey',
            +            'llDetectedLinkNumber',
            +            'llDetectedName',
            +            'llDetectedOwner',
            +            'llDetectedPos',
            +            'llDetectedRot',
            +            'llDetectedTouchBinormal',
            +            'llDetectedTouchFace',
            +            'llDetectedTouchNormal',
            +            'llDetectedTouchPos',
            +            'llDetectedTouchST',
            +            'llDetectedTouchUV',
            +            'llDetectedType',
            +            'llDetectedVel',
            +            'llDialog',
            +            'llDie',
            +            'llDumpList2String',
            +            'llEdgeOfWorld',
            +            'llEjectFromLand',
            +            'llEmail',
            +            'llEscapeURL',
            +            'llEuler2Rot',
            +            'llEvade',
            +            'llExecCharacterCmd',
            +            'llFabs',
            +            'llFleeFrom',
            +            'llFloor',
            +            'llForceMouselook',
            +            'llFrand',
            +            'llGenerateKey',
            +            'llGetAccel',
            +            'llGetAgentInfo',
            +            'llGetAgentLanguage',
            +            'llGetAgentList',
            +            'llGetAgentSize',
            +            'llGetAlpha',
            +            'llGetAndResetTime',
            +            'llGetAnimation',
            +            'llGetAnimationList',
            +            'llGetAnimationOverride',
            +            'llGetAttached',
            +            'llGetBoundingBox',
            +            'llGetCameraPos',
            +            'llGetCameraRot',
            +            'llGetCenterOfMass',
            +            'llGetClosestNavPoint',
            +            'llGetColor',
            +            'llGetCreator',
            +            'llGetDate',
            +            'llGetDisplayName',
            +            'llGetEnergy',
            +            'llGetEnv',
            +            'llGetForce',
            +            'llGetFreeMemory',
            +            'llGetFreeURLs',
            +            'llGetGeometricCenter',
            +            'llGetGMTclock',
            +            'llGetHTTPHeader',
            +            'llGetInventoryCreator',
            +            'llGetInventoryKey',
            +            'llGetInventoryName',
            +            'llGetInventoryNumber',
            +            'llGetInventoryPermMask',
            +            'llGetInventoryType',
            +            'llGetKey',
            +            'llGetLandOwnerAt',
            +            'llGetLinkKey',
            +            'llGetLinkMedia',
            +            'llGetLinkName',
            +            'llGetLinkNumber',
            +            'llGetLinkNumberOfSides',
            +            'llGetLinkPrimitiveParams',
            +            'llGetListEntryType',
            +            'llGetListLength',
            +            'llGetLocalPos',
            +            'llGetLocalRot',
            +            'llGetMass',
            +            'llGetMassMKS',
            +            'llGetMemoryLimit',
            +            'llGetNextEmail',
            +            'llGetNotecardLine',
            +            'llGetNumberOfNotecardLines',
            +            'llGetNumberOfPrims',
            +            'llGetNumberOfSides',
            +            'llGetObjectDesc',
            +            'llGetObjectDetails',
            +            'llGetObjectMass',
            +            'llGetObjectName',
            +            'llGetObjectPermMask',
            +            'llGetObjectPrimCount',
            +            'llGetOmega',
            +            'llGetOwner',
            +            'llGetOwnerKey',
            +            'llGetParcelDetails',
            +            'llGetParcelFlags',
            +            'llGetParcelMaxPrims',
            +            'llGetParcelMusicURL',
            +            'llGetParcelPrimCount',
            +            'llGetParcelPrimOwners',
            +            'llGetPermissions',
            +            'llGetPermissionsKey',
            +            'llGetPhysicsMaterial',
            +            'llGetPos',
            +            'llGetPrimitiveParams',
            +            'llGetPrimMediaParams',
            +            'llGetRegionAgentCount',
            +            'llGetRegionCorner',
            +            'llGetRegionFlags',
            +            'llGetRegionFPS',
            +            'llGetRegionName',
            +            'llGetRegionTimeDilation',
            +            'llGetRootPosition',
            +            'llGetRootRotation',
            +            'llGetRot',
            +            'llGetScale',
            +            'llGetScriptName',
            +            'llGetScriptState',
            +            'llGetSimStats',
            +            'llGetSimulatorHostname',
            +            'llGetSPMaxMemory',
            +            'llGetStartParameter',
            +            'llGetStaticPath',
            +            'llGetStatus',
            +            'llGetSubString',
            +            'llGetSunDirection',
            +            'llGetTexture',
            +            'llGetTextureOffset',
            +            'llGetTextureRot',
            +            'llGetTextureScale',
            +            'llGetTime',
            +            'llGetTimeOfDay',
            +            'llGetTimestamp',
            +            'llGetTorque',
            +            'llGetUnixTime',
            +            'llGetUsedMemory',
            +            'llGetUsername',
            +            'llGetVel',
            +            'llGetWallclock',
            +            'llGiveInventory',
            +            'llGiveInventoryList',
            +            'llGiveMoney',
            +            'llGround',
            +            'llGroundContour',
            +            'llGroundNormal',
            +            'llGroundRepel',
            +            'llGroundSlope',
            +            'llHTTPRequest',
            +            'llHTTPResponse',
            +            'llInsertString',
            +            'llInstantMessage',
            +            'llIntegerToBase64',
            +            'llJson2List',
            +            'llJsonGetValue',
            +            'llJsonSetValue',
            +            'llJsonValueType',
            +            'llKey2Name',
            +            'llLinkParticleSystem',
            +            'llLinkSitTarget',
            +            'llList2CSV',
            +            'llList2Float',
            +            'llList2Integer',
            +            'llList2Json',
            +            'llList2Key',
            +            'llList2List',
            +            'llList2ListStrided',
            +            'llList2Rot',
            +            'llList2String',
            +            'llList2Vector',
            +            'llListen',
            +            'llListenControl',
            +            'llListenRemove',
            +            'llListFindList',
            +            'llListInsertList',
            +            'llListRandomize',
            +            'llListReplaceList',
            +            'llListSort',
            +            'llListStatistics',
            +            'llLoadURL',
            +            'llLog',
            +            'llLog10',
            +            'llLookAt',
            +            'llLoopSound',
            +            'llLoopSoundMaster',
            +            'llLoopSoundSlave',
            +            'llManageEstateAccess',
            +            'llMapDestination',
            +            'llMD5String',
            +            'llMessageLinked',
            +            'llMinEventDelay',
            +            'llModifyLand',
            +            'llModPow',
            +            'llMoveToTarget',
            +            'llNavigateTo',
            +            'llOffsetTexture',
            +            'llOpenRemoteDataChannel',
            +            'llOverMyLand',
            +            'llOwnerSay',
            +            'llParcelMediaCommandList',
            +            'llParcelMediaQuery',
            +            'llParseString2List',
            +            'llParseStringKeepNulls',
            +            'llParticleSystem',
            +            'llPassCollisions',
            +            'llPassTouches',
            +            'llPatrolPoints',
            +            'llPlaySound',
            +            'llPlaySoundSlave',
            +            'llPow',
            +            'llPreloadSound',
            +            'llPursue',
            +            'llPushObject',
            +            'llRegionSay',
            +            'llRegionSayTo',
            +            'llReleaseControls',
            +            'llReleaseURL',
            +            'llRemoteDataReply',
            +            'llRemoteLoadScriptPin',
            +            'llRemoveFromLandBanList',
            +            'llRemoveFromLandPassList',
            +            'llRemoveInventory',
            +            'llRemoveVehicleFlags',
            +            'llRequestAgentData',
            +            'llRequestDisplayName',
            +            'llRequestInventoryData',
            +            'llRequestPermissions',
            +            'llRequestSecureURL',
            +            'llRequestSimulatorData',
            +            'llRequestURL',
            +            'llRequestUsername',
            +            'llResetAnimationOverride',
            +            'llResetLandBanList',
            +            'llResetLandPassList',
            +            'llResetOtherScript',
            +            'llResetScript',
            +            'llResetTime',
            +            'llReturnObjectsByID',
            +            'llReturnObjectsByOwner',
            +            'llRezAtRoot',
            +            'llRezObject',
            +            'llRot2Angle',
            +            'llRot2Axis',
            +            'llRot2Euler',
            +            'llRot2Fwd',
            +            'llRot2Left',
            +            'llRot2Up',
            +            'llRotateTexture',
            +            'llRotBetween',
            +            'llRotLookAt',
            +            'llRotTarget',
            +            'llRotTargetRemove',
            +            'llRound',
            +            'llSameGroup',
            +            'llSay',
            +            'llScaleTexture',
            +            'llScriptDanger',
            +            'llScriptProfiler',
            +            'llSendRemoteData',
            +            'llSensor',
            +            'llSensorRemove',
            +            'llSensorRepeat',
            +            'llSetAlpha',
            +            'llSetAngularVelocity',
            +            'llSetAnimationOverride',
            +            'llSetBuoyancy',
            +            'llSetCameraAtOffset',
            +            'llSetCameraEyeOffset',
            +            'llSetCameraParams',
            +            'llSetClickAction',
            +            'llSetColor',
            +            'llSetContentType',
            +            'llSetDamage',
            +            'llSetForce',
            +            'llSetForceAndTorque',
            +            'llSetHoverHeight',
            +            'llSetKeyframedMotion',
            +            'llSetLinkAlpha',
            +            'llSetLinkCamera',
            +            'llSetLinkColor',
            +            'llSetLinkMedia',
            +            'llSetLinkPrimitiveParams',
            +            'llSetLinkPrimitiveParamsFast',
            +            'llSetLinkTexture',
            +            'llSetLinkTextureAnim',
            +            'llSetLocalRot',
            +            'llSetMemoryLimit',
            +            'llSetObjectDesc',
            +            'llSetObjectName',
            +            'llSetParcelMusicURL',
            +            'llSetPayPrice',
            +            'llSetPhysicsMaterial',
            +            'llSetPos',
            +            'llSetPrimitiveParams',
            +            'llSetPrimMediaParams',
            +            'llSetRegionPos',
            +            'llSetRemoteScriptAccessPin',
            +            'llSetRot',
            +            'llSetScale',
            +            'llSetScriptState',
            +            'llSetSitText',
            +            'llSetSoundQueueing',
            +            'llSetSoundRadius',
            +            'llSetStatus',
            +            'llSetText',
            +            'llSetTexture',
            +            'llSetTextureAnim',
            +            'llSetTimerEvent',
            +            'llSetTorque',
            +            'llSetTouchText',
            +            'llSetVehicleFlags',
            +            'llSetVehicleFloatParam',
            +            'llSetVehicleRotationParam',
            +            'llSetVehicleType',
            +            'llSetVehicleVectorParam',
            +            'llSetVelocity',
            +            'llSHA1String',
            +            'llShout',
            +            'llSin',
            +            'llSitTarget',
            +            'llSleep',
            +            'llSqrt',
            +            'llStartAnimation',
            +            'llStopAnimation',
            +            'llStopHover',
            +            'llStopLookAt',
            +            'llStopMoveToTarget',
            +            'llStopSound',
            +            'llStringLength',
            +            'llStringToBase64',
            +            'llStringTrim',
            +            'llSubStringIndex',
            +            'llTakeControls',
            +            'llTan',
            +            'llTarget',
            +            'llTargetOmega',
            +            'llTargetRemove',
            +            'llTeleportAgent',
            +            'llTeleportAgentGlobalCoords',
            +            'llTeleportAgentHome',
            +            'llTextBox',
            +            'llToLower',
            +            'llToUpper',
            +            'llTransferLindenDollars',
            +            'llTriggerSound',
            +            'llTriggerSoundLimited',
            +            'llUnescapeURL',
            +            'llUnSit',
            +            'llUpdateCharacter',
            +            'llVecDist',
            +            'llVecMag',
            +            'llVecNorm',
            +            'llVolumeDetect',
            +            'llWanderWithin',
            +            'llWater',
            +            'llWhisper',
            +            'llWind',
            +            'llXorBase64',
            +            'print',
            +            ),
            +        6 => array( // deprecated
            +            'ATTACH_LPEC',
            +            'ATTACH_RPEC',
            +            'DATA_RATING',
            +            'PERMISSION_CHANGE_JOINTS',
            +            'PERMISSION_CHANGE_PERMISSIONS',
            +            'PERMISSION_RELEASE_OWNERSHIP',
            +            'PERMISSION_REMAP_CONTROLS',
            +            'PRIM_CAST_SHADOWS',
            +            'PRIM_MATERIAL_LIGHT',
            +            'PSYS_SRC_INNERANGLE',
            +            'PSYS_SRC_OBJ_REL_MASK',
            +            'PSYS_SRC_OUTERANGLE',
            +            'VEHICLE_FLAG_NO_FLY_UP',
            +            'llCloud',
            +            'llMakeExplosion',
            +            'llMakeFire',
            +            'llMakeFountain',
            +            'llMakeSmoke',
            +            'llRemoteDataSetRegion',
            +            'llSound',
            +            'llSoundPreload',
            +            'llXorBase64Strings',
            +            'llXorBase64StringsCorrect',
            +            ),
            +        7 => array( // unimplemented
            +            'event',
            +            'llCollisionSprite',
            +            'llPointAt',
            +            'llRefreshPrimURL',
            +            'llReleaseCamera',
            +            'llRemoteLoadScript',
            +            'llSetPrimURL',
            +            'llStopPointAt',
            +            'llTakeCamera',
            +            ),
            +        8 => array( // God mode
            +            'llGodLikeRezObject',
            +            'llSetInventoryPermMask',
            +            'llSetObjectPermMask',
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '{', '}', '(', ')', '[', ']',
            +        '=', '+', '-', '*', '/',
            +        '+=', '-=', '*=', '/=', '++', '--',
            +        '!', '%', '&', '|', '&&', '||',
            +        '==', '!=', '<', '>', '<=', '>=',
            +        '~', '<<', '>>', '^', ':',
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => true,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        5 => true,
            +        6 => true,
            +        7 => true,
            +        8 => true,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0000ff;',
            +            2 => 'color: #000080;',
            +            3 => 'color: #008080;',
            +            4 => 'color: #228b22;',
            +            5 => 'color: #b22222;',
            +            6 => 'color: #8b0000; background-color: #ffff00;',
            +            7 => 'color: #8b0000; background-color: #fa8072;',
            +            8 => 'color: #000000; background-color: #ba55d3;',
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #ff7f50; font-style: italic;',
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #006400;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => 'http://wiki.secondlife.com/wiki/{FNAME}',
            +        4 => 'http://wiki.secondlife.com/wiki/{FNAME}',
            +        5 => 'http://wiki.secondlife.com/wiki/{FNAME}',
            +        6 => 'http://wiki.secondlife.com/wiki/{FNAME}',
            +        7 => 'http://wiki.secondlife.com/wiki/{FNAME}',
            +        8 => 'http://wiki.secondlife.com/wiki/{FNAME}',
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/lua.php b/vendor/easybook/geshi/geshi/lua.php
            new file mode 100644
            index 0000000000..985cb8c272
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/lua.php
            @@ -0,0 +1,175 @@
            + 'Lua',
            +    'COMMENT_SINGLE' => array(1 => "--"),
            +    'COMMENT_MULTI' => array('--[[' => ']]'),
            +    'COMMENT_REGEXP' => array(2 => '/\[(=*)\[.*?\]\1\]/s'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'ESCAPE_REGEXP' => array(
            +        //Simple Single Char Escapes
            +        1 => "#\\\\[\\\\abfnrtv\'\"]#i",
            +        //Octal Char Specs
            +        2 => "#\\\\\\d{1,3}#"
            +        ),
            +    'NUMBERS' =>
            +        GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_HEX_PREFIX |
            +        GESHI_NUMBER_FLT_NONSCI | GESHI_NUMBER_FLT_NONSCI_F |
            +        GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO,
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'break','do','else','elseif','end','for','function','if',
            +            'local','repeat','return','then','until','while'
            +            ),
            +        2 => array(
            +            'and','in','not','or'
            +            ),
            +        3 => array(
            +            '_VERSION','assert','collectgarbage','dofile','error','gcinfo','loadfile','loadstring',
            +            'print','tonumber','tostring','type','unpack',
            +            '_ALERT','_ERRORMESSAGE','_INPUT','_PROMPT','_OUTPUT',
            +            '_STDERR','_STDIN','_STDOUT','call','dostring','foreach','foreachi','getn','globals','newtype',
            +            'rawget','rawset','require','sort','tinsert','tremove',
            +            'abs','acos','asin','atan','atan2','ceil','cos','deg','exp',
            +            'floor','format','frexp','gsub','ldexp','log','log10','max','min','mod','rad','random','randomseed',
            +            'sin','sqrt','strbyte','strchar','strfind','strlen','strlower','strrep','strsub','strupper','tan',
            +            'openfile','closefile','readfrom','writeto','appendto',
            +            'remove','rename','flush','seek','tmpfile','tmpname','read','write',
            +            'clock','date','difftime','execute','exit','getenv','setlocale','time',
            +            '_G','getfenv','getmetatable','ipairs','loadlib','next','pairs','pcall',
            +            'rawegal','setfenv','setmetatable','xpcall',
            +            'string.byte','string.char','string.dump','string.find','string.len',
            +            'string.lower','string.rep','string.sub','string.upper','string.format','string.gfind','string.gsub',
            +            'table.concat','table.foreach','table.foreachi','table.getn','table.sort','table.insert','table.remove','table.setn',
            +            'math.abs','math.acos','math.asin','math.atan','math.atan2','math.ceil','math.cos','math.deg','math.exp',
            +            'math.floor','math.frexp','math.ldexp','math.log','math.log10','math.max','math.min','math.mod',
            +            'math.pi','math.rad','math.random','math.randomseed','math.sin','math.sqrt','math.tan',
            +            'coroutine.create','coroutine.resume','coroutine.status',
            +            'coroutine.wrap','coroutine.yield',
            +            'io.close','io.flush','io.input','io.lines','io.open','io.output','io.read','io.tmpfile','io.type','io.write',
            +            'io.stdin','io.stdout','io.stderr',
            +            'os.clock','os.date','os.difftime','os.execute','os.exit','os.getenv','os.remove','os.rename',
            +            'os.setlocale','os.time','os.tmpname',
            +            'string','table','math','coroutine','io','os','debug'
            +            ),
            +        4 => array(
            +            'nil', 'false', 'true'
            +            ),
            +        5 => array(
            +            'Nil', 'Boolean', 'Number', 'String', 'Userdata', 'Thread', 'Table'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '+', '-', '*', '/', '%', '^', '#',
            +        '==', '~=', '<=', '>=', '<', '>', '=',
            +        '(', ')', '{', '}', '[', ']',
            +        ';', ':', ',', '.', '..', '...'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        5 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #aa9900; font-weight: bold;',
            +            2 => 'color: #aa9900; font-weight: bold;',
            +            3 => 'color: #0000aa;',
            +            4 => 'color: #aa9900;',
            +            5 => 'color: #aa9900;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;',
            +            2 => 'color: #ff0000;',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;',
            +            1 => 'color: #000099; font-weight: bold;',
            +            2 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff6666;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            0 => 'color: #aa9900;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/m68k.php b/vendor/easybook/geshi/geshi/m68k.php
            new file mode 100644
            index 0000000000..983c288ecb
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/m68k.php
            @@ -0,0 +1,141 @@
            + 'Motorola 68000 Assembler',
            +    'COMMENT_SINGLE' => array(1 => ';'),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        /*CPU*/
            +        1 => array(
            +            'adc','add','ais','aix','and','asl','asr','bcc','bclr','bcs','beq',
            +            'bge','bgt','bhcc','bhcs','bhi','bhs','bih','bil','bit','ble','blo',
            +            'bls','blt','bmc','bmi','bms','bne','bpl','bra','brclr','brn',
            +            'brset','bset','bsr','cbeq','clc','cli','clr','cmp','com','cphx',
            +            'cpx','daa','dbnz','dec','div','eor','inc','jmp','jsr','lda','ldhx',
            +            'ldx','lsl','lsr','mov','mul','neg','nop','nsa','ora','psha','pshh',
            +            'pshx','pula','pulh','pulx','rol','ror','rsp','rti','rts','sbc',
            +            'sec','sei','sta','sthx','stop','stx','sub','swi','tap','tax','tpa',
            +            'tst','tsx','txa','txs','wait'
            +        ),
            +        /*registers*/
            +        2 => array(
            +            'a','h','x',
            +            'hx','sp'
            +            ),
            +        /*Directive*/
            +        3 => array(
            +            '#define','#endif','#else','#ifdef','#ifndef','#include','#undef',
            +            '.db','.dd','.df','.dq','.dt','.dw','.end','.org','equ'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        ','
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0000ff; font-weight:bold;',
            +            2 => 'color: #0000ff;',
            +            3 => 'color: #46aa03; font-weight:bold;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #adadad; font-style: italic;',
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #0000ff;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #7f007f;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #dd22dd;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #008000;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #22bbff;',
            +            1 => 'color: #22bbff;',
            +            2 => 'color: #993333;'
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        //Hex numbers
            +        0 => '#?0[0-9a-fA-F]{1,32}[hH]',
            +        //Binary numbers
            +        1 => '\%[01]{1,64}[bB]',
            +        //Labels
            +        2 => '^[_a-zA-Z][_a-zA-Z0-9]*?\:'
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 8
            +);
            diff --git a/vendor/easybook/geshi/geshi/magiksf.php b/vendor/easybook/geshi/geshi/magiksf.php
            new file mode 100644
            index 0000000000..9aefbc6eb6
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/magiksf.php
            @@ -0,0 +1,192 @@
            + null,
            +    'LANG_NAME' => 'MagikSF',
            +    'COMMENT_SINGLE' => array(1 => '##', 2 => '#%', 3 => '#'),
            +    'COMMENT_MULTI' => array("_pragma(" => ")"),
            +    //Multiline-continued single-line comments
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            '_block', '_endblock', '_proc', '_endproc', '_loop', '_endloop',
            +            '_method', '_endmethod',
            +            '_protect', '_endprotect', '_protection', '_locking',
            +            '_continue',
            +            ),
            +        2 => array(
            +            '_self', '_thisthread', '_pragma', '_private', '_abstract',
            +            '_local', '_global', '_dynamic', '_package', '_constant',
            +            '_import', '_iter', '_lock', '_optional', '_recursive', '_super'
            +            ),
            +        3 => array(
            +            '_if', '_endif', '_then', '_else', '_elif', '_orif', '_andif', '_for', '_over',
            +            '_try', '_endtry', '_when', '_throw', '_catch', '_endcatch', '_handling',
            +            '_finally', '_loopbody', '_return', '_leave', '_with'
            +            ),
            +        4 => array(
            +            '_false', '_true', '_maybe', '_unset', '_no_way'
            +            ),
            +        5 => array(
            +            '_mod', '_div', '_or', '_and', '_cf', '_is', '_isnt', '_not', '_gather', '_scatter',
            +            '_allresults', '_clone', '_xor'
            +            ),
            +        6 => array(
            +            'def_slotted_exemplar', 'write_string', 'write', 'condition',
            +            'record_transaction', 'gis_program_manager', 'perform', 'define_shared_constant',
            +            'property_list', 'rope', 'def_property', 'def_mixin'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '{', '}', '[', ']',
            +        '+', '-', '*', '/', '**',
            +        '=', '<', '>', '<<', '>>',
            +        ',', '$',
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        5 => false,
            +        6 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000000; font-weight: bold;',
            +            2 => 'color: #ff3f3f;',
            +            3 => 'color: #3f7f3f; font-weight: bold;',
            +            4 => 'color: #cc66cc;',
            +            5 => 'color: #ff3fff; font-weight: bold;',
            +            6 => 'font-weight: bold;',
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #339933; font-weight: bold;',
            +            2 => 'color: #993333;',
            +            3 => 'color: #339933;',
            +            'MULTI' => 'color: #7f7f7f; font-style: italic',
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #ff3f3f;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #202020;',
            +            2 => 'color: #202020;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #ff3f3f;'
            +            ),
            +        'REGEXPS' => array(
            +            1 => 'color: #3f3fff;',
            +            2 => 'color: #3f3fff;',
            +            3 => 'color: #cc66cc;',
            +            4 => 'color: #7f3f7f; font-style: italic;',
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => '',
            +        6 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        1 => array(
            +            GESHI_SEARCH => '\b[a-zA-Z0-9_]+:', // package identifiers
            +            GESHI_REPLACE => '\\0',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        2 => array(
            +            GESHI_SEARCH => ':(?:[a-zA-Z0-9!?_]+|(?:[].*?[]))*', //symbols
            +            GESHI_REPLACE => '\\0',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        3 => array(
            +            GESHI_SEARCH => '%space|%tab|%newline|%.', //characters
            +            GESHI_REPLACE => '\\0',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        4 => array(
            +            GESHI_SEARCH => '@(?:[a-zA-Z0-9!?_]+|(?:[].*?[]))*', //symbols
            +            GESHI_REPLACE => '\\0',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/make.php b/vendor/easybook/geshi/geshi/make.php
            new file mode 100644
            index 0000000000..24dda4a1dd
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/make.php
            @@ -0,0 +1,151 @@
            +
            + * Copyright: (c) 2008 Neil Bird
            + * Release Version: 1.0.8.11
            + * Date Started: 2008/08/26
            + *
            + * make language file for GeSHi.
            + *
            + * (GNU make specific)
            + *
            + * CHANGES
            + * -------
            + * 2008/09/05 (1.0.0)
            + *  -  First Release
            + *
            + *************************************************************************************
            + *
            + *     This file is part of GeSHi.
            + *
            + *   GeSHi is free software; you can redistribute it and/or modify
            + *   it under the terms of the GNU General Public License as published by
            + *   the Free Software Foundation; either version 2 of the License, or
            + *   (at your option) any later version.
            + *
            + *   GeSHi is distributed in the hope that it will be useful,
            + *   but WITHOUT ANY WARRANTY; without even the implied warranty of
            + *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
            + *   GNU General Public License for more details.
            + *
            + *   You should have received a copy of the GNU General Public License
            + *   along with GeSHi; if not, write to the Free Software
            + *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
            + *
            + ************************************************************************************/
            +
            +$language_data = array (
            +    'LANG_NAME' => 'GNU make',
            +    'COMMENT_SINGLE' => array(1 => '#'),
            +    'COMMENT_REGEXP' => array(
            +        //Escaped String Starters
            +        2 => "/\\\\['\"]/siU"
            +        ),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            // core
            +            'ifeq', 'else', 'endif', 'ifneq', 'ifdef', 'ifndef',
            +            'include', 'vpath', 'export', 'unexport', 'override',
            +            'info', 'warning', 'error'
            +            ),
            +        2 => array(
            +            // macros, literals
            +            '.SUFFIXES', '.PHONY', '.DEFAULT', '.PRECIOUS', '.IGNORE', '.SILENT', '.EXPORT_ALL_VARIABLES', '.KEEP_STATE',
            +            '.LIBPATTERNS', '.NOTPARALLEL', '.DELETE_ON_ERROR', '.INTERMEDIATE', '.POSIX', '.SECONDARY'
            +            ),
            +        /*
            +        3 => array(
            +            // funcs - see regex
            +            //'subst', 'addprefix', 'addsuffix', 'basename', 'call', 'dir', 'error', 'eval', 'filter-out', 'filter',
            +            //'findstring', 'firstword', 'foreach', 'if', 'join', 'notdir', 'origin', 'patsubst', 'shell', 'sort', 'strip',
            +            //'suffix', 'warning', 'wildcard', 'word', 'wordlist', 'words'
            +            )*/
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '[', ']', '{', '}',
            +        '!', '@', '%', '&', '|', '/',
            +        '<', '>',
            +        '=', '-', '+', '*',
            +        '.', ':', ',', ';',
            +        '$'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        //3 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #666622; font-weight: bold;',
            +            2 => 'color: #990000;',
            +            //3 => 'color: #000000; font-weight: bold;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #339900; font-style: italic;',
            +            2 => 'color: #000099; font-weight: bold;',
            +            'MULTI' => ''
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(  # keep same as symbols so as to make ${} and $() equiv.
            +            0 => 'color: #004400;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #CC2200;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #CC2200;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #004400;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #000088; font-weight: bold;',
            +            1 => 'color: #0000CC; font-weight: bold;',
            +            2 => 'color: #000088;'
            +            ),
            +        'SCRIPT' => array(),
            +        'METHODS' => array()
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        //3 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(),
            +    'REGEXPS' => array(
            +        //Simple variables
            +        0 => "\\$(?:[^{(&]|&(?:amp|lt|gt);)",
            +        //Complex variables/functions [built-ins]
            +        1 => array(
            +            GESHI_SEARCH => '(\\$[({])(subst|addprefix|addsuffix|basename|call|dir|error|eval|filter-out|filter,|findstring|firstword|foreach|if|join|notdir|origin|patsubst|shell|sort|strip,|suffix|warning|wildcard|word|wordlist|words)([ })])',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => '\\3'
            +            ),
            +            //Complex variables/functions [others]
            +        2 => array(
            +            GESHI_SEARCH => '(\\$[({])([A-Za-z_][A-Za-z_0-9]*)([ })])',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => '\\3'
            +            ),
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(),
            +    'TAB_WIDTH' => 8
            +// vim: set sw=4 sts=4 :
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/mapbasic.php b/vendor/easybook/geshi/geshi/mapbasic.php
            new file mode 100644
            index 0000000000..4441d64016
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/mapbasic.php
            @@ -0,0 +1,907 @@
            + 'MapBasic',
            +    'COMMENT_SINGLE' => array(1 => "'"),
            +    'COMMENT_MULTI' => array(),
            +    'COMMENT_REGEXP' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +/*
            +        1 - Statements + Clauses + Data Types + Logical Operators, Geographical Operators + SQL
            +        2 - Special Procedures
            +        3 - Functions
            +        4 - Constants
            +        5 - Extended keywords (case sensitive)
            +*/
            +        1 => array(
            +            'Add', 'Alias', 'All', 'Alter', 'And', 'Any', 'Application', 'Arc',
            +            'Area', 'As', 'AutoLabel', 'Bar', 'Beep', 'Begin', 'Bind',
            +            'Browse', 'Brush', 'BrushPicker', 'Button', 'ButtonPad',
            +            'ButtonPads', 'BY', 'Call', 'CancelButton', 'Cartographic', 'Case',
            +            'CharSet', 'Check', 'CheckBox', 'Clean', 'Close', 'Collection',
            +            'Column', 'Combine', 'Command', 'Commit', 'Connection',
            +            'ConnectionNumber', 'Contains', 'Continue', 'Control', 'CoordSys',
            +            'Create', 'Cutter', 'Date', 'Datum', 'DDEExecute', 'DDEPoke',
            +            'DDETerminate', 'DDETerminateAll', 'Declare', 'Default', 'Define',
            +            'Delete', 'Dialog', 'Digitizer', 'Dim', 'Disaggregate',
            +            'Disconnect', 'Distance', 'Do', 'Document', 'DocumentWindow',
            +            'Drag', 'Drop', 'EditText', 'Ellipse', 'Enclose', 'End', 'Entire',
            +            'Entirely', 'Erase', 'Error', 'Event', 'Exit', 'Export',
            +            'Farthest', 'Fetch', 'File', 'Find', 'Float', 'FME', 'Font',
            +            'FontPicker', 'For', 'Format', 'Frame', 'From', 'Function',
            +            'Geocode', 'Get', 'Global', 'Goto', 'Graph', 'Grid', 'GROUP',
            +            'GroupBox', 'Handler', 'If', 'Import', 'In', 'Include', 'Index',
            +            'Info', 'Input', 'Insert', 'Integer', 'Intersect', 'Intersects',
            +            'INTO', 'Isogram', 'Item', 'Kill', 'Layout', 'Legend', 'Line',
            +            'Link', 'ListBox', 'Logical', 'Loop', 'Map', 'Map3D', 'MapInfo',
            +            'MapInfoDialog', 'Menu', 'Merge', 'Metadata', 'Method', 'Mod',
            +            'Move', 'MultiListBox', 'MultiPoint', 'MWS', 'Nearest', 'Next',
            +            'NOSELECT', 'Not', 'Note', 'Object', 'Objects', 'Offset',
            +            'OKButton', 'OnError', 'Open', 'Or', 'ORDER', 'Overlay', 'Pack',
            +            'Paper', 'Part', 'Partly', 'Pen', 'PenPicker', 'Pline', 'Point',
            +            'PopupMenu', 'Preserve', 'Print', 'PrintWin', 'PrismMap',
            +            'Processing', 'Program', 'ProgressBar', 'ProgressBars', 'Put',
            +            'RadioGroup', 'Randomize', 'Ranges', 'Rect', 'ReDim',
            +            'Redistricter', 'Refresh', 'Region', 'Register', 'Relief',
            +            'Reload', 'Remove', 'Rename', 'Report', 'Reproject', 'Resolution',
            +            'Resume', 'Rollback', 'RoundRect', 'RowID', 'Run', 'Save', 'Seek',
            +            'Select', 'Selection', 'Server', 'Set', 'Shade', 'SmallInt',
            +            'Snap', 'Split', 'StaticText', 'StatusBar', 'Stop', 'String',
            +            'Style', 'Styles', 'Sub', 'Symbol', 'SymbolPicker', 'Symbols',
            +            'Table', 'Target', 'Terminate', 'Text', 'Then', 'Threshold',
            +            'Timeout', 'To', 'Transaction', 'Transform', 'Type', 'UnDim',
            +            'Units', 'Unlink', 'Update', 'Using', 'VALUES', 'Version',
            +            'Versioning', 'Wend', 'WFS', 'WHERE', 'While', 'Window', 'Within',
            +            'Workspace', 'Write'
            +            ),
            +        2 => array(
            +            'EndHandler', 'ForegroundTaskSwitchHandler', 'Main',
            +            'RemoteMapGenHandler', 'RemoteMsgHandler', 'SelChangedHandler',
            +            'ToolHandler', 'WinChangedHandler', 'WinClosedHandler',
            +            'WinFocusChangedHandler'
            +            ),
            +        3 => array(
            +            'Abs', 'Acos', 'ApplicationDirectory$', 'AreaOverlap', 'Asc',
            +            'Asin', 'Ask', 'Atn', 'Avg', 'Buffer', 'ButtonPadInfo',
            +            'CartesianArea', 'CartesianBuffer', 'CartesianConnectObjects',
            +            'CartesianDistance', 'CartesianObjectDistance',
            +            'CartesianObjectLen', 'CartesianOffset', 'CartesianOffsetXY',
            +            'CartesianPerimeter', 'Centroid', 'CentroidX', 'CentroidY',
            +            'ChooseProjection$', 'Chr$', 'ColumnInfo', 'CommandInfo',
            +            'ConnectObjects', 'ControlPointInfo', 'ConvertToPline',
            +            'ConvertToRegion', 'ConvexHull', 'CoordSysName$', 'Cos', 'Count',
            +            'CreateCircle', 'CreateLine', 'CreatePoint', 'CreateText',
            +            'CurDate', 'CurrentBorderPen', 'CurrentBrush', 'CurrentFont',
            +            'CurrentLinePen', 'CurrentPen', 'CurrentSymbol', 'DateWindow',
            +            'Day', 'DDEInitiate', 'DDERequest$', 'DeformatNumber$', 'EOF',
            +            'EOT', 'EPSGToCoordSysString$', 'Err', 'Error$', 'Exp',
            +            'ExtractNodes', 'FileAttr', 'FileExists', 'FileOpenDlg',
            +            'FileSaveAsDlg', 'Fix', 'Format$', 'FormatDate$', 'FormatNumber$',
            +            'FrontWindow', 'GeocodeInfo', 'GetFolderPath$', 'GetGridCellValue',
            +            'GetMetadata$', 'GetSeamlessSheet', 'GridTableInfo',
            +            'HomeDirectory$', 'InStr', 'Int', 'IntersectNodes',
            +            'IsGridCellNull', 'IsogramInfo', 'IsPenWidthPixels',
            +            'LabelFindByID', 'LabelFindFirst', 'LabelFindNext', 'LabelInfo',
            +            'LayerInfo', 'LCase$', 'Left$', 'LegendFrameInfo', 'LegendInfo',
            +            'LegendStyleInfo', 'Len', 'Like', 'LocateFile$', 'LOF', 'Log',
            +            'LTrim$', 'MakeBrush', 'MakeCustomSymbol', 'MakeFont',
            +            'MakeFontSymbol', 'MakePen', 'MakeSymbol', 'Map3DInfo',
            +            'MapperInfo', 'Max', 'Maximum', 'MBR', 'MenuItemInfoByHandler',
            +            'MenuItemInfoByID', 'MGRSToPoint', 'MICloseContent',
            +            'MICloseFtpConnection', 'MICloseFtpFileFind',
            +            'MICloseHttpConnection', 'MICloseHttpFile', 'MICloseSession',
            +            'MICreateSession', 'MICreateSessionFull', 'Mid$', 'MidByte$',
            +            'MIErrorDlg', 'MIFindFtpFile', 'MIFindNextFtpFile', 'MIGetContent',
            +            'MIGetContentBuffer', 'MIGetContentLen', 'MIGetContentString',
            +            'MIGetContentToFile', 'MIGetContentType',
            +            'MIGetCurrentFtpDirectory', 'MIGetErrorCode', 'MIGetErrorMessage',
            +            'MIGetFileURL', 'MIGetFtpConnection', 'MIGetFtpFile',
            +            'MIGetFtpFileFind', 'MIGetFtpFileName', 'MIGetHttpConnection',
            +            'MIIsFtpDirectory', 'MIIsFtpDots', 'Min', 'Minimum',
            +            'MIOpenRequest', 'MIOpenRequestFull', 'MIParseURL', 'MIPutFtpFile',
            +            'MIQueryInfo', 'MIQueryInfoStatusCode', 'MISaveContent',
            +            'MISendRequest', 'MISendSimpleRequest', 'MISetCurrentFtpDirectory',
            +            'MISetSessionTimeout', 'MIXmlAttributeListDestroy',
            +            'MIXmlDocumentCreate', 'MIXmlDocumentDestroy',
            +            'MIXmlDocumentGetNamespaces', 'MIXmlDocumentGetRootNode',
            +            'MIXmlDocumentLoad', 'MIXmlDocumentLoadXML',
            +            'MIXmlDocumentLoadXMLString', 'MIXmlDocumentSetProperty',
            +            'MIXmlGetAttributeList', 'MIXmlGetChildList',
            +            'MIXmlGetNextAttribute', 'MIXmlGetNextNode', 'MIXmlNodeDestroy',
            +            'MIXmlNodeGetAttributeValue', 'MIXmlNodeGetFirstChild',
            +            'MIXmlNodeGetName', 'MIXmlNodeGetParent', 'MIXmlNodeGetText',
            +            'MIXmlNodeGetValue', 'MIXmlNodeListDestroy', 'MIXmlSCDestroy',
            +            'MIXmlSCGetLength', 'MIXmlSCGetNamespace', 'MIXmlSelectNodes',
            +            'MIXmlSelectSingleNode', 'Month', 'NumAllWindows', 'NumberToDate',
            +            'NumCols', 'NumTables', 'NumWindows', 'ObjectDistance',
            +            'ObjectGeography', 'ObjectInfo', 'ObjectLen', 'ObjectNodeHasM',
            +            'ObjectNodeHasZ', 'ObjectNodeM', 'ObjectNodeX', 'ObjectNodeY',
            +            'ObjectNodeZ', 'OffsetXY', 'Overlap', 'OverlayNodes',
            +            'PathToDirectory$', 'PathToFileName$', 'PathToTableName$',
            +            'PenWidthToPoints', 'Perimeter', 'PointsToPenWidth',
            +            'PointToMGRS$', 'PrismMapInfo', 'ProgramDirectory$', 'Proper$',
            +            'ProportionOverlap', 'RasterTableInfo', 'ReadControlValue',
            +            'RegionInfo', 'RemoteQueryHandler', 'RGB', 'Right$', 'Rnd',
            +            'Rotate', 'RotateAtPoint', 'Round', 'RTrim$', 'SearchInfo',
            +            'SearchPoint', 'SearchRect', 'SelectionInfo', 'Server_ColumnInfo',
            +            'Server_Connect', 'Server_ConnectInfo', 'Server_DriverInfo',
            +            'Server_EOT', 'Server_Execute', 'Server_GetODBCHConn',
            +            'Server_GetODBCHStmt', 'Server_NumCols', 'Server_NumDrivers',
            +            'SessionInfo', 'Sgn', 'Sin', 'Space$', 'SphericalArea',
            +            'SphericalConnectObjects', 'SphericalDistance',
            +            'SphericalObjectDistance', 'SphericalObjectLen', 'SphericalOffset',
            +            'SphericalOffsetXY', 'SphericalPerimeter', 'Sqr', 'Str$',
            +            'String$', 'StringCompare', 'StringCompareIntl', 'StringToDate',
            +            'StyleAttr', 'Sum', 'SystemInfo', 'TableInfo', 'Tan',
            +            'TempFileName$', 'TextSize', 'Time', 'Timer', 'TriggerControl',
            +            'TrueFileName$', 'UBound', 'UCase$', 'UnitAbbr$', 'UnitName$',
            +            'Val', 'Weekday', 'WindowID', 'WindowInfo', 'WtAvg', 'Year'
            +            ),
            +        4 => array(
            +            'BLACK', 'BLUE', 'BRUSH_BACKCOLOR', 'BRUSH_FORECOLOR',
            +            'BRUSH_PATTERN', 'BTNPAD_INFO_FLOATING', 'BTNPAD_INFO_NBTNS',
            +            'BTNPAD_INFO_WIDTH', 'BTNPAD_INFO_WINID', 'BTNPAD_INFO_X',
            +            'BTNPAD_INFO_Y', 'CLS', 'CMD_INFO_CTRL', 'CMD_INFO_CUSTOM_OBJ',
            +            'CMD_INFO_DLG_DBL', 'CMD_INFO_DLG_OK', 'CMD_INFO_EDIT_ASK',
            +            'CMD_INFO_EDIT_DISCARD', 'CMD_INFO_EDIT_SAVE',
            +            'CMD_INFO_EDIT_STATUS', 'CMD_INFO_EDIT_TABLE', 'CMD_INFO_FIND_RC',
            +            'CMD_INFO_FIND_ROWID', 'CMD_INFO_HL_FILE_NAME',
            +            'CMD_INFO_HL_LAYER_ID', 'CMD_INFO_HL_ROWID',
            +            'CMD_INFO_HL_TABLE_NAME', 'CMD_INFO_HL_WINDOW_ID',
            +            'CMD_INFO_INTERRUPT', 'CMD_INFO_MENUITEM', 'CMD_INFO_MSG',
            +            'CMD_INFO_ROWID', 'CMD_INFO_SELTYPE', 'CMD_INFO_SHIFT',
            +            'CMD_INFO_STATUS', 'CMD_INFO_TASK_SWITCH', 'CMD_INFO_TOOLBTN',
            +            'CMD_INFO_WIN', 'CMD_INFO_X', 'CMD_INFO_X2', 'CMD_INFO_XCMD',
            +            'CMD_INFO_Y', 'CMD_INFO_Y2', 'COL_INFO_DECPLACES',
            +            'COL_INFO_EDITABLE', 'COL_INFO_INDEXED', 'COL_INFO_NAME',
            +            'COL_INFO_NUM', 'COL_INFO_TYPE', 'COL_INFO_WIDTH', 'COL_TYPE_CHAR',
            +            'COL_TYPE_DATE', 'COL_TYPE_DATETIME', 'COL_TYPE_DECIMAL',
            +            'COL_TYPE_FLOAT', 'COL_TYPE_GRAPHIC', 'COL_TYPE_INTEGER',
            +            'COL_TYPE_LOGICAL', 'COL_TYPE_SMALLINT', 'COL_TYPE_TIME', 'CYAN',
            +            'DATE_WIN_CURPROG', 'DATE_WIN_SESSION', 'DEG_2_RAD',
            +            'DICTIONARY_ADDRESS_ONLY', 'DICTIONARY_ALL',
            +            'DICTIONARY_PREFER_ADDRESS', 'DICTIONARY_PREFER_USER',
            +            'DICTIONARY_USER_ONLY', 'DM_CUSTOM_CIRCLE', 'DM_CUSTOM_ELLIPSE',
            +            'DM_CUSTOM_LINE', 'DM_CUSTOM_POINT', 'DM_CUSTOM_POLYGON',
            +            'DM_CUSTOM_POLYLINE', 'DM_CUSTOM_RECT', 'DMPAPER_10X11',
            +            'DMPAPER_10X14', 'DMPAPER_11X17', 'DMPAPER_12X11', 'DMPAPER_15X11',
            +            'DMPAPER_9X11', 'DMPAPER_A_PLUS', 'DMPAPER_A2', 'DMPAPER_A3',
            +            'DMPAPER_A3_EXTRA', 'DMPAPER_A3_EXTRA_TRANSVERSE',
            +            'DMPAPER_A3_ROTATED', 'DMPAPER_A3_TRANSVERSE', 'DMPAPER_A4',
            +            'DMPAPER_A4_EXTRA', 'DMPAPER_A4_PLUS', 'DMPAPER_A4_ROTATED',
            +            'DMPAPER_A4_TRANSVERSE', 'DMPAPER_A4SMALL', 'DMPAPER_A5',
            +            'DMPAPER_A5_EXTRA', 'DMPAPER_A5_ROTATED', 'DMPAPER_A5_TRANSVERSE',
            +            'DMPAPER_A6', 'DMPAPER_A6_ROTATED', 'DMPAPER_B_PLUS', 'DMPAPER_B4',
            +            'DMPAPER_B4_JIS_ROTATED', 'DMPAPER_B5', 'DMPAPER_B5_EXTRA',
            +            'DMPAPER_B5_JIS_ROTATED', 'DMPAPER_B5_TRANSVERSE',
            +            'DMPAPER_B6_JIS', 'DMPAPER_B6_JIS_ROTATED', 'DMPAPER_CSHEET',
            +            'DMPAPER_DBL_JAPANESE_POSTCARD',
            +            'DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED', 'DMPAPER_DSHEET',
            +            'DMPAPER_ENV_10', 'DMPAPER_ENV_11', 'DMPAPER_ENV_12',
            +            'DMPAPER_ENV_14', 'DMPAPER_ENV_9', 'DMPAPER_ENV_B4',
            +            'DMPAPER_ENV_B5', 'DMPAPER_ENV_B6', 'DMPAPER_ENV_C3',
            +            'DMPAPER_ENV_C4', 'DMPAPER_ENV_C5', 'DMPAPER_ENV_C6',
            +            'DMPAPER_ENV_C65', 'DMPAPER_ENV_DL', 'DMPAPER_ENV_INVITE',
            +            'DMPAPER_ENV_ITALY', 'DMPAPER_ENV_MONARCH', 'DMPAPER_ENV_PERSONAL',
            +            'DMPAPER_ESHEET', 'DMPAPER_EXECUTIVE',
            +            'DMPAPER_FANFOLD_LGL_GERMAN', 'DMPAPER_FANFOLD_STD_GERMAN',
            +            'DMPAPER_FANFOLD_US', 'DMPAPER_FIRST', 'DMPAPER_FOLIO',
            +            'DMPAPER_ISO_B4', 'DMPAPER_JAPANESE_POSTCARD',
            +            'DMPAPER_JAPANESE_POSTCARD_ROTATED', 'DMPAPER_JENV_CHOU3',
            +            'DMPAPER_JENV_CHOU3_ROTATED', 'DMPAPER_JENV_CHOU4',
            +            'DMPAPER_JENV_CHOU4_ROTATED', 'DMPAPER_JENV_KAKU2',
            +            'DMPAPER_JENV_KAKU2_ROTATED', 'DMPAPER_JENV_KAKU3',
            +            'DMPAPER_JENV_KAKU3_ROTATED', 'DMPAPER_JENV_YOU4',
            +            'DMPAPER_JENV_YOU4_ROTATED', 'DMPAPER_LEDGER', 'DMPAPER_LEGAL',
            +            'DMPAPER_LEGAL_EXTRA', 'DMPAPER_LETTER', 'DMPAPER_LETTER_EXTRA',
            +            'DMPAPER_LETTER_EXTRA_TRANSVERSE', 'DMPAPER_LETTER_PLUS',
            +            'DMPAPER_LETTER_ROTATED', 'DMPAPER_LETTER_TRANSVERSE',
            +            'DMPAPER_LETTERSMALL', 'DMPAPER_NOTE', 'DMPAPER_P16K',
            +            'DMPAPER_P16K_ROTATED', 'DMPAPER_P32K', 'DMPAPER_P32K_ROTATED',
            +            'DMPAPER_P32KBIG', 'DMPAPER_P32KBIG_ROTATED', 'DMPAPER_PENV_1',
            +            'DMPAPER_PENV_1_ROTATED', 'DMPAPER_PENV_10',
            +            'DMPAPER_PENV_10_ROTATED', 'DMPAPER_PENV_2',
            +            'DMPAPER_PENV_2_ROTATED', 'DMPAPER_PENV_3',
            +            'DMPAPER_PENV_3_ROTATED', 'DMPAPER_PENV_4',
            +            'DMPAPER_PENV_4_ROTATED', 'DMPAPER_PENV_5',
            +            'DMPAPER_PENV_5_ROTATED', 'DMPAPER_PENV_6',
            +            'DMPAPER_PENV_6_ROTATED', 'DMPAPER_PENV_7',
            +            'DMPAPER_PENV_7_ROTATED', 'DMPAPER_PENV_8',
            +            'DMPAPER_PENV_8_ROTATED', 'DMPAPER_PENV_9',
            +            'DMPAPER_PENV_9_ROTATED', 'DMPAPER_QUARTO', 'DMPAPER_RESERVED_48',
            +            'DMPAPER_RESERVED_49', 'DMPAPER_STATEMENT', 'DMPAPER_TABLOID',
            +            'DMPAPER_TABLOID_EXTRA', 'DMPAPER_USER', 'ERR_BAD_WINDOW',
            +            'ERR_BAD_WINDOW_NUM', 'ERR_CANT_ACCESS_FILE',
            +            'ERR_CANT_INITIATE_LINK', 'ERR_CMD_NOT_SUPPORTED',
            +            'ERR_FCN_ARG_RANGE', 'ERR_FCN_INVALID_FMT',
            +            'ERR_FCN_OBJ_FETCH_FAILED', 'ERR_FILEMGR_NOTOPEN',
            +            'ERR_FP_MATH_LIB_DOMAIN', 'ERR_FP_MATH_LIB_RANGE',
            +            'ERR_INVALID_CHANNEL', 'ERR_INVALID_READ_CONTROL',
            +            'ERR_INVALID_TRIG_CONTROL', 'ERR_NO_FIELD',
            +            'ERR_NO_RESPONSE_FROM_APP', 'ERR_NULL_SELECTION',
            +            'ERR_PROCESS_FAILED_IN_APP', 'ERR_TABLE_NOT_FOUND',
            +            'ERR_WANT_MAPPER_WIN', 'FALSE', 'FILE_ATTR_FILESIZE',
            +            'FILE_ATTR_MODE', 'FILTER_ALL_DIRECTIONS_1',
            +            'FILTER_ALL_DIRECTIONS_2', 'FILTER_DIAGONALLY',
            +            'FILTER_HORIZONTALLY', 'FILTER_VERTICALLY',
            +            'FILTER_VERTICALLY_AND_HORIZONTALLY', 'FOLDER_APPDATA',
            +            'FOLDER_COMMON_APPDATA', 'FOLDER_COMMON_DOCS',
            +            'FOLDER_LOCAL_APPDATA', 'FOLDER_MI_APPDATA',
            +            'FOLDER_MI_COMMON_APPDATA', 'FOLDER_MI_LOCAL_APPDATA',
            +            'FOLDER_MI_PREFERENCE', 'FOLDER_MYDOCS', 'FOLDER_MYPICS',
            +            'FONT_BACKCOLOR', 'FONT_FORECOLOR', 'FONT_NAME', 'FONT_POINTSIZE',
            +            'FONT_STYLE', 'FRAME_INFO_BORDER_PEN', 'FRAME_INFO_COLUMN',
            +            'FRAME_INFO_HEIGHT', 'FRAME_INFO_LABEL', 'FRAME_INFO_MAP_LAYER_ID',
            +            'FRAME_INFO_NUM_STYLES', 'FRAME_INFO_POS_X', 'FRAME_INFO_POS_Y',
            +            'FRAME_INFO_REFRESHABLE', 'FRAME_INFO_SUBTITLE',
            +            'FRAME_INFO_SUBTITLE_FONT', 'FRAME_INFO_TITLE',
            +            'FRAME_INFO_TITLE_FONT', 'FRAME_INFO_TYPE', 'FRAME_INFO_VISIBLE',
            +            'FRAME_INFO_WIDTH', 'FRAME_TYPE_STYLE', 'FRAME_TYPE_THEME',
            +            'GEO_CONTROL_POINT_X', 'GEO_CONTROL_POINT_Y', 'GEOCODE_BATCH_SIZE',
            +            'GEOCODE_COUNT_GEOCODED', 'GEOCODE_COUNT_NOTGEOCODED',
            +            'GEOCODE_COUNTRY_SUBDIVISION', 'GEOCODE_COUNTRY_SUBDIVISION2',
            +            'GEOCODE_DICTIONARY', 'GEOCODE_FALLBACK_GEOGRAPHIC',
            +            'GEOCODE_FALLBACK_POSTAL', 'GEOCODE_MAX_BATCH_SIZE',
            +            'GEOCODE_MIXED_CASE', 'GEOCODE_MUNICIPALITY',
            +            'GEOCODE_MUNICIPALITY2', 'GEOCODE_OFFSET_CENTER',
            +            'GEOCODE_OFFSET_CENTER_UNITS', 'GEOCODE_OFFSET_END',
            +            'GEOCODE_OFFSET_END_UNITS', 'GEOCODE_PASSTHROUGH',
            +            'GEOCODE_POSTAL_CODE', 'GEOCODE_RESULT_MARK_MULTIPLE',
            +            'GEOCODE_STREET_NAME', 'GEOCODE_STREET_NUMBER',
            +            'GEOCODE_UNABLE_TO_CONVERT_DATA', 'GREEN',
            +            'GRID_TAB_INFO_HAS_HILLSHADE', 'GRID_TAB_INFO_MAX_VALUE',
            +            'GRID_TAB_INFO_MIN_VALUE', 'HOTLINK_INFO_ENABLED',
            +            'HOTLINK_INFO_EXPR', 'HOTLINK_INFO_MODE', 'HOTLINK_INFO_RELATIVE',
            +            'HOTLINK_MODE_BOTH', 'HOTLINK_MODE_LABEL', 'HOTLINK_MODE_OBJ',
            +            'IMAGE_CLASS_BILEVEL', 'IMAGE_CLASS_GREYSCALE',
            +            'IMAGE_CLASS_PALETTE', 'IMAGE_CLASS_RGB', 'IMAGE_TYPE_GRID',
            +            'IMAGE_TYPE_RASTER', 'INCL_ALL', 'INCL_COMMON', 'INCL_CROSSINGS',
            +            'ISOGRAM_AMBIENT_SPEED_DIST_UNIT',
            +            'ISOGRAM_AMBIENT_SPEED_TIME_UNIT', 'ISOGRAM_BANDING',
            +            'ISOGRAM_BATCH_SIZE', 'ISOGRAM_DEFAULT_AMBIENT_SPEED',
            +            'ISOGRAM_MAJOR_POLYGON_ONLY', 'ISOGRAM_MAJOR_ROADS_ONLY',
            +            'ISOGRAM_MAX_BANDS', 'ISOGRAM_MAX_BATCH_SIZE',
            +            'ISOGRAM_MAX_DISTANCE', 'ISOGRAM_MAX_DISTANCE_UNITS',
            +            'ISOGRAM_MAX_OFFROAD_DIST', 'ISOGRAM_MAX_OFFROAD_DIST_UNITS',
            +            'ISOGRAM_MAX_TIME', 'ISOGRAM_MAX_TIME_UNITS',
            +            'ISOGRAM_POINTS_ONLY', 'ISOGRAM_PROPAGATION_FACTOR',
            +            'ISOGRAM_RECORDS_INSERTED', 'ISOGRAM_RECORDS_NOTINSERTED',
            +            'ISOGRAM_RETURN_HOLES', 'ISOGRAM_SIMPLIFICATION_FACTOR',
            +            'LABEL_INFO_ANCHORX', 'LABEL_INFO_ANCHORY', 'LABEL_INFO_DRAWN',
            +            'LABEL_INFO_EDIT', 'LABEL_INFO_EDIT_ANCHOR',
            +            'LABEL_INFO_EDIT_ANGLE', 'LABEL_INFO_EDIT_FONT',
            +            'LABEL_INFO_EDIT_OFFSET', 'LABEL_INFO_EDIT_PEN',
            +            'LABEL_INFO_EDIT_POSITION', 'LABEL_INFO_EDIT_TEXT',
            +            'LABEL_INFO_EDIT_TEXTARROW', 'LABEL_INFO_EDIT_TEXTLINE',
            +            'LABEL_INFO_EDIT_VISIBILITY', 'LABEL_INFO_OBJECT',
            +            'LABEL_INFO_OFFSET', 'LABEL_INFO_ORIENTATION',
            +            'LABEL_INFO_POSITION', 'LABEL_INFO_ROWID', 'LABEL_INFO_SELECT',
            +            'LABEL_INFO_TABLE', 'LAYER_INFO_ARROWS', 'LAYER_INFO_CENTROIDS',
            +            'LAYER_INFO_COSMETIC', 'LAYER_INFO_DISPLAY',
            +            'LAYER_INFO_DISPLAY_GLOBAL', 'LAYER_INFO_DISPLAY_GRAPHIC',
            +            'LAYER_INFO_DISPLAY_OFF', 'LAYER_INFO_DISPLAY_VALUE',
            +            'LAYER_INFO_EDITABLE', 'LAYER_INFO_HOTLINK_COUNT',
            +            'LAYER_INFO_HOTLINK_EXPR', 'LAYER_INFO_HOTLINK_MODE',
            +            'LAYER_INFO_HOTLINK_RELATIVE', 'LAYER_INFO_LABEL_ALPHA',
            +            'LAYER_INFO_LABEL_ORIENT_CURVED',
            +            'LAYER_INFO_LABEL_ORIENT_HORIZONTAL',
            +            'LAYER_INFO_LABEL_ORIENT_PARALLEL', 'LAYER_INFO_LAYER_ALPHA',
            +            'LAYER_INFO_LAYER_TRANSLUCENCY', 'LAYER_INFO_LBL_AUTODISPLAY',
            +            'LAYER_INFO_LBL_CURFONT', 'LAYER_INFO_LBL_DUPLICATES',
            +            'LAYER_INFO_LBL_EXPR', 'LAYER_INFO_LBL_FONT', 'LAYER_INFO_LBL_LT',
            +            'LAYER_INFO_LBL_LT_ARROW', 'LAYER_INFO_LBL_LT_NONE',
            +            'LAYER_INFO_LBL_LT_SIMPLE', 'LAYER_INFO_LBL_MAX',
            +            'LAYER_INFO_LBL_OFFSET', 'LAYER_INFO_LBL_ORIENTATION',
            +            'LAYER_INFO_LBL_OVERLAP', 'LAYER_INFO_LBL_PARALLEL',
            +            'LAYER_INFO_LBL_PARTIALSEGS', 'LAYER_INFO_LBL_POS',
            +            'LAYER_INFO_LBL_POS_BC', 'LAYER_INFO_LBL_POS_BL',
            +            'LAYER_INFO_LBL_POS_BR', 'LAYER_INFO_LBL_POS_CC',
            +            'LAYER_INFO_LBL_POS_CL', 'LAYER_INFO_LBL_POS_CR',
            +            'LAYER_INFO_LBL_POS_TC', 'LAYER_INFO_LBL_POS_TL',
            +            'LAYER_INFO_LBL_POS_TR', 'LAYER_INFO_LBL_VIS_OFF',
            +            'LAYER_INFO_LBL_VIS_ON', 'LAYER_INFO_LBL_VIS_ZOOM',
            +            'LAYER_INFO_LBL_VISIBILITY', 'LAYER_INFO_LBL_ZOOM_MAX',
            +            'LAYER_INFO_LBL_ZOOM_MIN', 'LAYER_INFO_NAME', 'LAYER_INFO_NODES',
            +            'LAYER_INFO_OVR_BRUSH', 'LAYER_INFO_OVR_FONT',
            +            'LAYER_INFO_OVR_LINE', 'LAYER_INFO_OVR_PEN',
            +            'LAYER_INFO_OVR_SYMBOL', 'LAYER_INFO_PATH',
            +            'LAYER_INFO_SELECTABLE', 'LAYER_INFO_TYPE',
            +            'LAYER_INFO_TYPE_COSMETIC', 'LAYER_INFO_TYPE_GRID',
            +            'LAYER_INFO_TYPE_IMAGE', 'LAYER_INFO_TYPE_NORMAL',
            +            'LAYER_INFO_TYPE_THEMATIC', 'LAYER_INFO_TYPE_WMS',
            +            'LAYER_INFO_ZOOM_LAYERED', 'LAYER_INFO_ZOOM_MAX',
            +            'LAYER_INFO_ZOOM_MIN', 'LEGEND_INFO_MAP_ID',
            +            'LEGEND_INFO_NUM_FRAMES', 'LEGEND_INFO_ORIENTATION',
            +            'LEGEND_INFO_STYLE_SAMPLE_SIZE', 'LEGEND_STYLE_INFO_FONT',
            +            'LEGEND_STYLE_INFO_OBJ', 'LEGEND_STYLE_INFO_TEXT',
            +            'LOCATE_ABB_FILE', 'LOCATE_CLR_FILE', 'LOCATE_CUSTSYMB_DIR',
            +            'LOCATE_DEF_WOR', 'LOCATE_FNT_FILE', 'LOCATE_GEOCODE_SERVERLIST',
            +            'LOCATE_GRAPH_DIR', 'LOCATE_LAYOUT_TEMPLATE_DIR',
            +            'LOCATE_MNU_FILE', 'LOCATE_PEN_FILE', 'LOCATE_PREF_FILE',
            +            'LOCATE_PRJ_FILE', 'LOCATE_ROUTING_SERVERLIST',
            +            'LOCATE_THMTMPLT_DIR', 'LOCATE_WFS_SERVERLIST',
            +            'LOCATE_WMS_SERVERLIST', 'M_3DMAP_CLONE_VIEW',
            +            'M_3DMAP_PREVIOUS_VIEW', 'M_3DMAP_PROPERTIES',
            +            'M_3DMAP_REFRESH_GRID_TEXTURE', 'M_3DMAP_VIEW_ENTIRE_GRID',
            +            'M_3DMAP_VIEWPOINT_CONTROL', 'M_3DMAP_WIREFRAME',
            +            'M_ANALYZE_CALC_STATISTICS', 'M_ANALYZE_CUSTOMIZE_LEGEND',
            +            'M_ANALYZE_FIND', 'M_ANALYZE_FIND_SELECTION',
            +            'M_ANALYZE_INVERTSELECT', 'M_ANALYZE_SELECT',
            +            'M_ANALYZE_SELECTALL', 'M_ANALYZE_SHADE', 'M_ANALYZE_SQLQUERY',
            +            'M_ANALYZE_UNSELECT', 'M_BROWSE_EDIT', 'M_BROWSE_GRID',
            +            'M_BROWSE_NEW_RECORD', 'M_BROWSE_OPTIONS', 'M_BROWSE_PICK_FIELDS',
            +            'M_DBMS_OPEN_ODBC', 'M_EDIT_CLEAR', 'M_EDIT_CLEAROBJ',
            +            'M_EDIT_COPY', 'M_EDIT_CUT', 'M_EDIT_GETINFO', 'M_EDIT_NEW_ROW',
            +            'M_EDIT_PASTE', 'M_EDIT_PREFERENCES', 'M_EDIT_PREFERENCES_COUNTRY',
            +            'M_EDIT_PREFERENCES_FILE', 'M_EDIT_PREFERENCES_IMAGE_PROC',
            +            'M_EDIT_PREFERENCES_LAYOUT', 'M_EDIT_PREFERENCES_LEGEND',
            +            'M_EDIT_PREFERENCES_MAP', 'M_EDIT_PREFERENCES_OUTPUT',
            +            'M_EDIT_PREFERENCES_PATH', 'M_EDIT_PREFERENCES_PRINTER',
            +            'M_EDIT_PREFERENCES_STYLES', 'M_EDIT_PREFERENCES_SYSTEM',
            +            'M_EDIT_PREFERENCES_WEBSERVICES', 'M_EDIT_RESHAPE', 'M_EDIT_UNDO',
            +            'M_FILE_ABOUT', 'M_FILE_ADD_WORKSPACE', 'M_FILE_CLOSE',
            +            'M_FILE_CLOSE_ALL', 'M_FILE_CLOSE_ODBC', 'M_FILE_EXIT',
            +            'M_FILE_HELP', 'M_FILE_NEW', 'M_FILE_OPEN', 'M_FILE_OPEN_ODBC',
            +            'M_FILE_OPEN_ODBC_CONN', 'M_FILE_OPEN_UNIVERSAL_DATA',
            +            'M_FILE_OPEN_WFS', 'M_FILE_OPEN_WMS', 'M_FILE_PAGE_SETUP',
            +            'M_FILE_PRINT', 'M_FILE_PRINT_SETUP', 'M_FILE_REVERT',
            +            'M_FILE_RUN', 'M_FILE_SAVE', 'M_FILE_SAVE_COPY_AS',
            +            'M_FILE_SAVE_QUERY', 'M_FILE_SAVE_WINDOW_AS',
            +            'M_FILE_SAVE_WORKSPACE', 'M_FORMAT_CUSTOM_COLORS',
            +            'M_FORMAT_PICK_FILL', 'M_FORMAT_PICK_FONT', 'M_FORMAT_PICK_LINE',
            +            'M_FORMAT_PICK_SYMBOL', 'M_GRAPH_3D_VIEWING_ANGLE',
            +            'M_GRAPH_FORMATING', 'M_GRAPH_GENERAL_OPTIONS',
            +            'M_GRAPH_GRID_SCALES', 'M_GRAPH_LABEL_AXIS',
            +            'M_GRAPH_SAVE_AS_TEMPLATE', 'M_GRAPH_SERIES',
            +            'M_GRAPH_SERIES_OPTIONS', 'M_GRAPH_TITLES', 'M_GRAPH_TYPE',
            +            'M_GRAPH_VALUE_AXIS', 'M_HELP_ABOUT', 'M_HELP_CHECK_FOR_UPDATE',
            +            'M_HELP_CONNECT_MIFORUM', 'M_HELP_CONTENTS',
            +            'M_HELP_CONTEXTSENSITIVE', 'M_HELP_HELPMODE',
            +            'M_HELP_MAPINFO_3DGRAPH_HELP', 'M_HELP_MAPINFO_CONNECT_SERVICES',
            +            'M_HELP_MAPINFO_WWW', 'M_HELP_MAPINFO_WWW_STORE',
            +            'M_HELP_MAPINFO_WWW_TUTORIAL', 'M_HELP_SEARCH',
            +            'M_HELP_TECHSUPPORT', 'M_HELP_USE_HELP', 'M_LAYOUT_ACTUAL',
            +            'M_LAYOUT_ALIGN', 'M_LAYOUT_AUTOSCROLL_ONOFF',
            +            'M_LAYOUT_BRING2FRONT', 'M_LAYOUT_CHANGE_VIEW',
            +            'M_LAYOUT_DISPLAYOPTIONS', 'M_LAYOUT_DROPSHADOWS',
            +            'M_LAYOUT_ENTIRE', 'M_LAYOUT_LAYOUT_SIZE', 'M_LAYOUT_PREVIOUS',
            +            'M_LAYOUT_SEND2BACK', 'M_LEGEND_ADD_FRAMES', 'M_LEGEND_DELETE',
            +            'M_LEGEND_PROPERTIES', 'M_LEGEND_REFRESH', 'M_MAP_AUTOLABEL',
            +            'M_MAP_AUTOSCROLL_ONOFF', 'M_MAP_CHANGE_VIEW',
            +            'M_MAP_CLEAR_COSMETIC', 'M_MAP_CLEAR_CUSTOM_LABELS',
            +            'M_MAP_CLIP_REGION_ONOFF', 'M_MAP_CLONE_MAPPER',
            +            'M_MAP_CREATE_3DMAP', 'M_MAP_CREATE_LEGEND',
            +            'M_MAP_CREATE_PRISMMAP', 'M_MAP_ENTIRE_LAYER',
            +            'M_MAP_LAYER_CONTROL', 'M_MAP_MODIFY_THEMATIC', 'M_MAP_OPTIONS',
            +            'M_MAP_PREVIOUS', 'M_MAP_PROJECTION', 'M_MAP_SAVE_COSMETIC',
            +            'M_MAP_SET_CLIP_REGION', 'M_MAP_SETUNITS', 'M_MAP_SETUPDIGITIZER',
            +            'M_MAP_THEMATIC', 'M_MAPBASIC_CLEAR', 'M_MAPBASIC_SAVECONTENTS',
            +            'M_OBJECTS_BREAKPOLY', 'M_OBJECTS_BUFFER',
            +            'M_OBJECTS_CHECK_REGIONS', 'M_OBJECTS_CLEAN',
            +            'M_OBJECTS_CLEAR_TARGET', 'M_OBJECTS_COMBINE',
            +            'M_OBJECTS_CONVEX_HULL', 'M_OBJECTS_CVT_PGON',
            +            'M_OBJECTS_CVT_PLINE', 'M_OBJECTS_DISAGG',
            +            'M_OBJECTS_DRIVE_REGION', 'M_OBJECTS_ENCLOSE', 'M_OBJECTS_ERASE',
            +            'M_OBJECTS_ERASE_OUT', 'M_OBJECTS_MERGE', 'M_OBJECTS_OFFSET',
            +            'M_OBJECTS_OVERLAY', 'M_OBJECTS_POLYLINE_SPLIT',
            +            'M_OBJECTS_POLYLINE_SPLIT_AT_NODE', 'M_OBJECTS_RESHAPE',
            +            'M_OBJECTS_ROTATE', 'M_OBJECTS_SET_TARGET', 'M_OBJECTS_SMOOTH',
            +            'M_OBJECTS_SNAP', 'M_OBJECTS_SPLIT', 'M_OBJECTS_UNSMOOTH',
            +            'M_OBJECTS_VORONOI', 'M_ORACLE_CREATE_WORKSPACE',
            +            'M_ORACLE_DELETE_WORKSPACE', 'M_ORACLE_MERGE_PARENT',
            +            'M_ORACLE_REFRESH_FROM_PARENT', 'M_ORACLE_VERSION_ENABLE_OFF',
            +            'M_ORACLE_VERSION_ENABLE_ON', 'M_QUERY_CALC_STATISTICS',
            +            'M_QUERY_FIND', 'M_QUERY_FIND_ADDRESS', 'M_QUERY_FIND_SELECTION',
            +            'M_QUERY_FIND_SELECTION_CURRENT_MAP', 'M_QUERY_INVERTSELECT',
            +            'M_QUERY_SELECT', 'M_QUERY_SELECTALL', 'M_QUERY_SQLQUERY',
            +            'M_QUERY_UNSELECT', 'M_REDISTRICT_ADD', 'M_REDISTRICT_ASSIGN',
            +            'M_REDISTRICT_DELETE', 'M_REDISTRICT_OPTIONS',
            +            'M_REDISTRICT_TARGET', 'M_SENDMAIL_CURRENTWINDOW',
            +            'M_SENDMAIL_WORKSPACE', 'M_TABLE_APPEND', 'M_TABLE_BUFFER',
            +            'M_TABLE_CHANGESYMBOL', 'M_TABLE_CREATE_POINTS', 'M_TABLE_DELETE',
            +            'M_TABLE_DRIVE_REGION', 'M_TABLE_EXPORT', 'M_TABLE_GEOCODE',
            +            'M_TABLE_IMPORT', 'M_TABLE_MAKEMAPPABLE',
            +            'M_TABLE_MERGE_USING_COLUMN', 'M_TABLE_MODIFY_STRUCTURE',
            +            'M_TABLE_PACK', 'M_TABLE_RASTER_REG', 'M_TABLE_RASTER_STYLE',
            +            'M_TABLE_REFRESH', 'M_TABLE_RENAME',
            +            'M_TABLE_UNIVERSAL_DATA_REFRESH', 'M_TABLE_UNLINK',
            +            'M_TABLE_UPDATE_COLUMN', 'M_TABLE_VORONOI', 'M_TABLE_WEB_GEOCODE',
            +            'M_TABLE_WFS_PROPS', 'M_TABLE_WFS_REFRESH', 'M_TABLE_WMS_PROPS',
            +            'M_TOOLS_ADD_NODE', 'M_TOOLS_ARC', 'M_TOOLS_CRYSTAL_REPORTS_NEW',
            +            'M_TOOLS_CRYSTAL_REPORTS_OPEN', 'M_TOOLS_DRAGWINDOW',
            +            'M_TOOLS_ELLIPSE', 'M_TOOLS_EXPAND', 'M_TOOLS_FRAME',
            +            'M_TOOLS_HOTLINK', 'M_TOOLS_LABELER', 'M_TOOLS_LINE',
            +            'M_TOOLS_MAPBASIC', 'M_TOOLS_PNT_QUERY', 'M_TOOLS_POINT',
            +            'M_TOOLS_POLYGON', 'M_TOOLS_POLYLINE', 'M_TOOLS_RASTER_REG',
            +            'M_TOOLS_RECENTER', 'M_TOOLS_RECTANGLE', 'M_TOOLS_ROUNDEDRECT',
            +            'M_TOOLS_RULER', 'M_TOOLS_RUN', 'M_TOOLS_SEARCH_BOUNDARY',
            +            'M_TOOLS_SEARCH_POLYGON', 'M_TOOLS_SEARCH_RADIUS',
            +            'M_TOOLS_SEARCH_RECT', 'M_TOOLS_SELECTOR', 'M_TOOLS_SHRINK',
            +            'M_TOOLS_TEXT', 'M_TOOLS_TOOL_MANAGER', 'M_WINDOW_ARRANGEICONS',
            +            'M_WINDOW_BROWSE', 'M_WINDOW_BUTTONPAD', 'M_WINDOW_CASCADE',
            +            'M_WINDOW_EXPORT_WINDOW', 'M_WINDOW_FIRST', 'M_WINDOW_GRAPH',
            +            'M_WINDOW_LAYOUT', 'M_WINDOW_LEGEND', 'M_WINDOW_MAP',
            +            'M_WINDOW_MAPBASIC', 'M_WINDOW_MORE', 'M_WINDOW_REDISTRICT',
            +            'M_WINDOW_REDRAW', 'M_WINDOW_STATISTICS', 'M_WINDOW_STATUSBAR',
            +            'M_WINDOW_TILE', 'M_WINDOW_TOOL_PALETTE', 'MAGENTA',
            +            'MAP3D_INFO_BACKGROUND', 'MAP3D_INFO_CAMERA_CLIP_FAR',
            +            'MAP3D_INFO_CAMERA_CLIP_NEAR', 'MAP3D_INFO_CAMERA_FOCAL_X',
            +            'MAP3D_INFO_CAMERA_FOCAL_Y', 'MAP3D_INFO_CAMERA_FOCAL_Z',
            +            'MAP3D_INFO_CAMERA_VPN_1', 'MAP3D_INFO_CAMERA_VPN_2',
            +            'MAP3D_INFO_CAMERA_VPN_3', 'MAP3D_INFO_CAMERA_VU_1',
            +            'MAP3D_INFO_CAMERA_VU_2', 'MAP3D_INFO_CAMERA_VU_3',
            +            'MAP3D_INFO_CAMERA_X', 'MAP3D_INFO_CAMERA_Y',
            +            'MAP3D_INFO_CAMERA_Z', 'MAP3D_INFO_LIGHT_COLOR',
            +            'MAP3D_INFO_LIGHT_X', 'MAP3D_INFO_LIGHT_Y', 'MAP3D_INFO_LIGHT_Z',
            +            'MAP3D_INFO_RESOLUTION_X', 'MAP3D_INFO_RESOLUTION_Y',
            +            'MAP3D_INFO_SCALE', 'MAP3D_INFO_UNITS', 'MAPPER_INFO_AREAUNITS',
            +            'MAPPER_INFO_CENTERX', 'MAPPER_INFO_CENTERY',
            +            'MAPPER_INFO_CLIP_DISPLAY_ALL', 'MAPPER_INFO_CLIP_DISPLAY_POLYOBJ',
            +            'MAPPER_INFO_CLIP_OVERLAY', 'MAPPER_INFO_CLIP_REGION',
            +            'MAPPER_INFO_CLIP_TYPE', 'MAPPER_INFO_COORDSYS_CLAUSE',
            +            'MAPPER_INFO_COORDSYS_CLAUSE_WITH_BOUNDS',
            +            'MAPPER_INFO_COORDSYS_NAME', 'MAPPER_INFO_DISPLAY',
            +            'MAPPER_INFO_DISPLAY_DECIMAL', 'MAPPER_INFO_DISPLAY_DEGMINSEC',
            +            'MAPPER_INFO_DISPLAY_DMS', 'MAPPER_INFO_DISPLAY_MGRS',
            +            'MAPPER_INFO_DISPLAY_POSITION', 'MAPPER_INFO_DISPLAY_SCALE',
            +            'MAPPER_INFO_DISPLAY_ZOOM', 'MAPPER_INFO_DIST_CALC_TYPE',
            +            'MAPPER_INFO_DIST_CARTESIAN', 'MAPPER_INFO_DIST_SPHERICAL',
            +            'MAPPER_INFO_DISTUNITS', 'MAPPER_INFO_EDIT_LAYER',
            +            'MAPPER_INFO_LAYERS', 'MAPPER_INFO_MAXX', 'MAPPER_INFO_MAXY',
            +            'MAPPER_INFO_MERGE_MAP', 'MAPPER_INFO_MINX', 'MAPPER_INFO_MINY',
            +            'MAPPER_INFO_MOVE_DUPLICATE_NODES', 'MAPPER_INFO_NUM_THEMATIC',
            +            'MAPPER_INFO_REPROJECTION', 'MAPPER_INFO_RESAMPLING',
            +            'MAPPER_INFO_SCALE', 'MAPPER_INFO_SCROLLBARS',
            +            'MAPPER_INFO_XYUNITS', 'MAPPER_INFO_ZOOM', 'MAX_STRING_LENGTH',
            +            'MENUITEM_INFO_ACCELERATOR', 'MENUITEM_INFO_CHECKABLE',
            +            'MENUITEM_INFO_CHECKED', 'MENUITEM_INFO_ENABLED',
            +            'MENUITEM_INFO_HANDLER', 'MENUITEM_INFO_HELPMSG',
            +            'MENUITEM_INFO_ID', 'MENUITEM_INFO_SHOWHIDEABLE',
            +            'MENUITEM_INFO_TEXT', 'MI_CURSOR_ARROW', 'MI_CURSOR_CHANGE_WIDTH',
            +            'MI_CURSOR_CROSSHAIR', 'MI_CURSOR_DRAG_OBJ',
            +            'MI_CURSOR_FINGER_LEFT', 'MI_CURSOR_FINGER_UP',
            +            'MI_CURSOR_GRABBER', 'MI_CURSOR_IBEAM', 'MI_CURSOR_IBEAM_CROSS',
            +            'MI_CURSOR_ZOOM_IN', 'MI_CURSOR_ZOOM_OUT', 'MI_ICON_ADD_NODE',
            +            'MI_ICON_ARC', 'MI_ICON_ARROW', 'MI_ICON_ARROW_1',
            +            'MI_ICON_ARROW_10', 'MI_ICON_ARROW_11', 'MI_ICON_ARROW_12',
            +            'MI_ICON_ARROW_13', 'MI_ICON_ARROW_14', 'MI_ICON_ARROW_15',
            +            'MI_ICON_ARROW_16', 'MI_ICON_ARROW_17', 'MI_ICON_ARROW_18',
            +            'MI_ICON_ARROW_19', 'MI_ICON_ARROW_2', 'MI_ICON_ARROW_20',
            +            'MI_ICON_ARROW_21', 'MI_ICON_ARROW_3', 'MI_ICON_ARROW_4',
            +            'MI_ICON_ARROW_5', 'MI_ICON_ARROW_6', 'MI_ICON_ARROW_7',
            +            'MI_ICON_ARROW_8', 'MI_ICON_ARROW_9', 'MI_ICON_CLIP_MODE',
            +            'MI_ICON_CLIP_REGION', 'MI_ICON_CLOSE_ALL',
            +            'MI_ICON_COMMUNICATION_1', 'MI_ICON_COMMUNICATION_10',
            +            'MI_ICON_COMMUNICATION_11', 'MI_ICON_COMMUNICATION_12',
            +            'MI_ICON_COMMUNICATION_2', 'MI_ICON_COMMUNICATION_3',
            +            'MI_ICON_COMMUNICATION_4', 'MI_ICON_COMMUNICATION_5',
            +            'MI_ICON_COMMUNICATION_6', 'MI_ICON_COMMUNICATION_7',
            +            'MI_ICON_COMMUNICATION_8', 'MI_ICON_COMMUNICATION_9',
            +            'MI_ICON_COMPASS_CIRCLE_TA', 'MI_ICON_COMPASS_CONTRACT',
            +            'MI_ICON_COMPASS_EXPAND', 'MI_ICON_COMPASS_POLY_TA',
            +            'MI_ICON_COMPASS_TAG', 'MI_ICON_COMPASS_UNTAG', 'MI_ICON_COPY',
            +            'MI_ICON_CROSSHAIR', 'MI_ICON_CUT', 'MI_ICON_DISTRICT_MANY',
            +            'MI_ICON_DISTRICT_SAME', 'MI_ICON_DRAG_HANDLE', 'MI_ICON_ELLIPSE',
            +            'MI_ICON_EMERGENCY_1', 'MI_ICON_EMERGENCY_10',
            +            'MI_ICON_EMERGENCY_11', 'MI_ICON_EMERGENCY_12',
            +            'MI_ICON_EMERGENCY_13', 'MI_ICON_EMERGENCY_14',
            +            'MI_ICON_EMERGENCY_15', 'MI_ICON_EMERGENCY_16',
            +            'MI_ICON_EMERGENCY_17', 'MI_ICON_EMERGENCY_18',
            +            'MI_ICON_EMERGENCY_2', 'MI_ICON_EMERGENCY_3',
            +            'MI_ICON_EMERGENCY_4', 'MI_ICON_EMERGENCY_5',
            +            'MI_ICON_EMERGENCY_6', 'MI_ICON_EMERGENCY_7',
            +            'MI_ICON_EMERGENCY_8', 'MI_ICON_EMERGENCY_9', 'MI_ICON_GRABBER',
            +            'MI_ICON_GRAPH_SELECT', 'MI_ICON_HELP', 'MI_ICON_HOT_LINK',
            +            'MI_ICON_INFO', 'MI_ICON_INVERTSELECT', 'MI_ICON_LABEL',
            +            'MI_ICON_LAYERS', 'MI_ICON_LEGEND', 'MI_ICON_LETTERS_A',
            +            'MI_ICON_LETTERS_B', 'MI_ICON_LETTERS_C', 'MI_ICON_LETTERS_D',
            +            'MI_ICON_LETTERS_E', 'MI_ICON_LETTERS_F', 'MI_ICON_LETTERS_G',
            +            'MI_ICON_LETTERS_H', 'MI_ICON_LETTERS_I', 'MI_ICON_LETTERS_J',
            +            'MI_ICON_LETTERS_K', 'MI_ICON_LETTERS_L', 'MI_ICON_LETTERS_M',
            +            'MI_ICON_LETTERS_N', 'MI_ICON_LETTERS_O', 'MI_ICON_LETTERS_P',
            +            'MI_ICON_LETTERS_Q', 'MI_ICON_LETTERS_R', 'MI_ICON_LETTERS_S',
            +            'MI_ICON_LETTERS_T', 'MI_ICON_LETTERS_U', 'MI_ICON_LETTERS_V',
            +            'MI_ICON_LETTERS_W', 'MI_ICON_LETTERS_X', 'MI_ICON_LETTERS_Y',
            +            'MI_ICON_LETTERS_Z', 'MI_ICON_LINE', 'MI_ICON_LINE_STYLE',
            +            'MI_ICON_MAPSYMB_1', 'MI_ICON_MAPSYMB_10', 'MI_ICON_MAPSYMB_11',
            +            'MI_ICON_MAPSYMB_12', 'MI_ICON_MAPSYMB_13', 'MI_ICON_MAPSYMB_14',
            +            'MI_ICON_MAPSYMB_15', 'MI_ICON_MAPSYMB_16', 'MI_ICON_MAPSYMB_17',
            +            'MI_ICON_MAPSYMB_18', 'MI_ICON_MAPSYMB_19', 'MI_ICON_MAPSYMB_2',
            +            'MI_ICON_MAPSYMB_20', 'MI_ICON_MAPSYMB_21', 'MI_ICON_MAPSYMB_22',
            +            'MI_ICON_MAPSYMB_23', 'MI_ICON_MAPSYMB_24', 'MI_ICON_MAPSYMB_25',
            +            'MI_ICON_MAPSYMB_26', 'MI_ICON_MAPSYMB_3', 'MI_ICON_MAPSYMB_4',
            +            'MI_ICON_MAPSYMB_5', 'MI_ICON_MAPSYMB_6', 'MI_ICON_MAPSYMB_7',
            +            'MI_ICON_MAPSYMB_8', 'MI_ICON_MAPSYMB_9', 'MI_ICON_MARITIME_1',
            +            'MI_ICON_MARITIME_10', 'MI_ICON_MARITIME_2', 'MI_ICON_MARITIME_3',
            +            'MI_ICON_MARITIME_4', 'MI_ICON_MARITIME_5', 'MI_ICON_MARITIME_6',
            +            'MI_ICON_MARITIME_7', 'MI_ICON_MARITIME_8', 'MI_ICON_MARITIME_9',
            +            'MI_ICON_MB_1', 'MI_ICON_MB_10', 'MI_ICON_MB_11', 'MI_ICON_MB_12',
            +            'MI_ICON_MB_13', 'MI_ICON_MB_14', 'MI_ICON_MB_2', 'MI_ICON_MB_3',
            +            'MI_ICON_MB_4', 'MI_ICON_MB_5', 'MI_ICON_MB_6', 'MI_ICON_MB_7',
            +            'MI_ICON_MB_8', 'MI_ICON_MB_9', 'MI_ICON_MISC_1',
            +            'MI_ICON_MISC_10', 'MI_ICON_MISC_11', 'MI_ICON_MISC_12',
            +            'MI_ICON_MISC_13', 'MI_ICON_MISC_14', 'MI_ICON_MISC_15',
            +            'MI_ICON_MISC_16', 'MI_ICON_MISC_17', 'MI_ICON_MISC_18',
            +            'MI_ICON_MISC_19', 'MI_ICON_MISC_2', 'MI_ICON_MISC_20',
            +            'MI_ICON_MISC_21', 'MI_ICON_MISC_22', 'MI_ICON_MISC_23',
            +            'MI_ICON_MISC_24', 'MI_ICON_MISC_25', 'MI_ICON_MISC_26',
            +            'MI_ICON_MISC_27', 'MI_ICON_MISC_28', 'MI_ICON_MISC_29',
            +            'MI_ICON_MISC_3', 'MI_ICON_MISC_30', 'MI_ICON_MISC_31',
            +            'MI_ICON_MISC_4', 'MI_ICON_MISC_5', 'MI_ICON_MISC_6',
            +            'MI_ICON_MISC_7', 'MI_ICON_MISC_8', 'MI_ICON_MISC_9',
            +            'MI_ICON_NEW_DOC', 'MI_ICON_NUMBERS_1', 'MI_ICON_NUMBERS_10',
            +            'MI_ICON_NUMBERS_11', 'MI_ICON_NUMBERS_12', 'MI_ICON_NUMBERS_13',
            +            'MI_ICON_NUMBERS_14', 'MI_ICON_NUMBERS_15', 'MI_ICON_NUMBERS_16',
            +            'MI_ICON_NUMBERS_17', 'MI_ICON_NUMBERS_18', 'MI_ICON_NUMBERS_19',
            +            'MI_ICON_NUMBERS_2', 'MI_ICON_NUMBERS_20', 'MI_ICON_NUMBERS_21',
            +            'MI_ICON_NUMBERS_22', 'MI_ICON_NUMBERS_23', 'MI_ICON_NUMBERS_24',
            +            'MI_ICON_NUMBERS_25', 'MI_ICON_NUMBERS_26', 'MI_ICON_NUMBERS_27',
            +            'MI_ICON_NUMBERS_28', 'MI_ICON_NUMBERS_29', 'MI_ICON_NUMBERS_3',
            +            'MI_ICON_NUMBERS_30', 'MI_ICON_NUMBERS_31', 'MI_ICON_NUMBERS_32',
            +            'MI_ICON_NUMBERS_4', 'MI_ICON_NUMBERS_5', 'MI_ICON_NUMBERS_6',
            +            'MI_ICON_NUMBERS_7', 'MI_ICON_NUMBERS_8', 'MI_ICON_NUMBERS_9',
            +            'MI_ICON_ODBC_DISCONNECT', 'MI_ICON_ODBC_MAPPABLE',
            +            'MI_ICON_ODBC_OPEN', 'MI_ICON_ODBC_REFRESH', 'MI_ICON_ODBC_SYMBOL',
            +            'MI_ICON_ODBC_UNLINK', 'MI_ICON_OPEN_FILE', 'MI_ICON_OPEN_WOR',
            +            'MI_ICON_OPENWFS', 'MI_ICON_OPENWMS', 'MI_ICON_PASTE',
            +            'MI_ICON_POLYGON', 'MI_ICON_POLYLINE', 'MI_ICON_PRINT',
            +            'MI_ICON_REALESTATE_1', 'MI_ICON_REALESTATE_10',
            +            'MI_ICON_REALESTATE_11', 'MI_ICON_REALESTATE_12',
            +            'MI_ICON_REALESTATE_13', 'MI_ICON_REALESTATE_14',
            +            'MI_ICON_REALESTATE_15', 'MI_ICON_REALESTATE_16',
            +            'MI_ICON_REALESTATE_17', 'MI_ICON_REALESTATE_18',
            +            'MI_ICON_REALESTATE_19', 'MI_ICON_REALESTATE_2',
            +            'MI_ICON_REALESTATE_20', 'MI_ICON_REALESTATE_21',
            +            'MI_ICON_REALESTATE_22', 'MI_ICON_REALESTATE_23',
            +            'MI_ICON_REALESTATE_3', 'MI_ICON_REALESTATE_4',
            +            'MI_ICON_REALESTATE_5', 'MI_ICON_REALESTATE_6',
            +            'MI_ICON_REALESTATE_7', 'MI_ICON_REALESTATE_8',
            +            'MI_ICON_REALESTATE_9', 'MI_ICON_RECT', 'MI_ICON_REGION_STYLE',
            +            'MI_ICON_RESHAPE', 'MI_ICON_ROUND_RECT', 'MI_ICON_RULER',
            +            'MI_ICON_RUN', 'MI_ICON_SAVE_FILE', 'MI_ICON_SAVE_WIN',
            +            'MI_ICON_SAVE_WOR', 'MI_ICON_SEARCH_BDY', 'MI_ICON_SEARCH_POLYGON',
            +            'MI_ICON_SEARCH_RADIUS', 'MI_ICON_SEARCH_RECT', 'MI_ICON_SIGNS_1',
            +            'MI_ICON_SIGNS_10', 'MI_ICON_SIGNS_11', 'MI_ICON_SIGNS_12',
            +            'MI_ICON_SIGNS_13', 'MI_ICON_SIGNS_14', 'MI_ICON_SIGNS_15',
            +            'MI_ICON_SIGNS_16', 'MI_ICON_SIGNS_17', 'MI_ICON_SIGNS_18',
            +            'MI_ICON_SIGNS_19', 'MI_ICON_SIGNS_2', 'MI_ICON_SIGNS_3',
            +            'MI_ICON_SIGNS_4', 'MI_ICON_SIGNS_5', 'MI_ICON_SIGNS_6',
            +            'MI_ICON_SIGNS_7', 'MI_ICON_SIGNS_8', 'MI_ICON_SIGNS_9',
            +            'MI_ICON_STATISTICS', 'MI_ICON_SYMBOL', 'MI_ICON_SYMBOL_STYLE',
            +            'MI_ICON_TEXT', 'MI_ICON_TEXT_STYLE', 'MI_ICON_TRANSPORT_1',
            +            'MI_ICON_TRANSPORT_10', 'MI_ICON_TRANSPORT_11',
            +            'MI_ICON_TRANSPORT_12', 'MI_ICON_TRANSPORT_13',
            +            'MI_ICON_TRANSPORT_14', 'MI_ICON_TRANSPORT_15',
            +            'MI_ICON_TRANSPORT_16', 'MI_ICON_TRANSPORT_17',
            +            'MI_ICON_TRANSPORT_18', 'MI_ICON_TRANSPORT_19',
            +            'MI_ICON_TRANSPORT_2', 'MI_ICON_TRANSPORT_20',
            +            'MI_ICON_TRANSPORT_21', 'MI_ICON_TRANSPORT_22',
            +            'MI_ICON_TRANSPORT_23', 'MI_ICON_TRANSPORT_24',
            +            'MI_ICON_TRANSPORT_25', 'MI_ICON_TRANSPORT_26',
            +            'MI_ICON_TRANSPORT_27', 'MI_ICON_TRANSPORT_3',
            +            'MI_ICON_TRANSPORT_4', 'MI_ICON_TRANSPORT_5',
            +            'MI_ICON_TRANSPORT_6', 'MI_ICON_TRANSPORT_7',
            +            'MI_ICON_TRANSPORT_8', 'MI_ICON_TRANSPORT_9', 'MI_ICON_UNDO',
            +            'MI_ICON_UNSELECT_ALL', 'MI_ICON_WINDOW_FRAME', 'MI_ICON_WRENCH',
            +            'MI_ICON_ZOOM_IN', 'MI_ICON_ZOOM_OUT', 'MI_ICON_ZOOM_QUESTION',
            +            'MI_ICONS_MAPS_1', 'MI_ICONS_MAPS_10', 'MI_ICONS_MAPS_11',
            +            'MI_ICONS_MAPS_12', 'MI_ICONS_MAPS_13', 'MI_ICONS_MAPS_14',
            +            'MI_ICONS_MAPS_15', 'MI_ICONS_MAPS_2', 'MI_ICONS_MAPS_3',
            +            'MI_ICONS_MAPS_4', 'MI_ICONS_MAPS_5', 'MI_ICONS_MAPS_6',
            +            'MI_ICONS_MAPS_7', 'MI_ICONS_MAPS_8', 'MI_ICONS_MAPS_9',
            +            'MIPLATFORM_HP', 'MIPLATFORM_MAC68K', 'MIPLATFORM_POWERMAC',
            +            'MIPLATFORM_SPECIAL', 'MIPLATFORM_SUN', 'MIPLATFORM_WIN16',
            +            'MIPLATFORM_WIN32', 'MODE_APPEND', 'MODE_BINARY', 'MODE_INPUT',
            +            'MODE_OUTPUT', 'MODE_RANDOM', 'OBJ_ARC', 'OBJ_ELLIPSE',
            +            'OBJ_FRAME', 'OBJ_GEO_ARCBEGANGLE', 'OBJ_GEO_ARCENDANGLE',
            +            'OBJ_GEO_CENTROID', 'OBJ_GEO_LINEBEGX', 'OBJ_GEO_LINEBEGY',
            +            'OBJ_GEO_LINEENDX', 'OBJ_GEO_LINEENDY', 'OBJ_GEO_MAXX',
            +            'OBJ_GEO_MAXY', 'OBJ_GEO_MINX', 'OBJ_GEO_MINY', 'OBJ_GEO_POINTM',
            +            'OBJ_GEO_POINTX', 'OBJ_GEO_POINTY', 'OBJ_GEO_POINTZ',
            +            'OBJ_GEO_ROUNDRADIUS', 'OBJ_GEO_TEXTANGLE', 'OBJ_GEO_TEXTLINEX',
            +            'OBJ_GEO_TEXTLINEY', 'OBJ_INFO_BRUSH', 'OBJ_INFO_FILLFRAME',
            +            'OBJ_INFO_FRAMETITLE', 'OBJ_INFO_FRAMEWIN', 'OBJ_INFO_HAS_M',
            +            'OBJ_INFO_HAS_Z', 'OBJ_INFO_MPOINT', 'OBJ_INFO_NONEMPTY',
            +            'OBJ_INFO_NPNTS', 'OBJ_INFO_NPOLYGONS', 'OBJ_INFO_PEN',
            +            'OBJ_INFO_PLINE', 'OBJ_INFO_REGION', 'OBJ_INFO_SMOOTH',
            +            'OBJ_INFO_SYMBOL', 'OBJ_INFO_TEXTARROW', 'OBJ_INFO_TEXTFONT',
            +            'OBJ_INFO_TEXTJUSTIFY', 'OBJ_INFO_TEXTSPACING',
            +            'OBJ_INFO_TEXTSTRING', 'OBJ_INFO_TYPE', 'OBJ_INFO_Z_UNIT',
            +            'OBJ_INFO_Z_UNIT_SET', 'OBJ_LINE', 'OBJ_PLINE', 'OBJ_POINT',
            +            'OBJ_RECT', 'OBJ_REGION', 'OBJ_ROUNDRECT', 'OBJ_TEXT',
            +            'OBJ_TYPE_ARC', 'OBJ_TYPE_COLLECTION', 'OBJ_TYPE_ELLIPSE',
            +            'OBJ_TYPE_FRAME', 'OBJ_TYPE_LINE', 'OBJ_TYPE_MPOINT',
            +            'OBJ_TYPE_PLINE', 'OBJ_TYPE_POINT', 'OBJ_TYPE_RECT',
            +            'OBJ_TYPE_REGION', 'OBJ_TYPE_ROUNDRECT', 'OBJ_TYPE_TEXT',
            +            'ORIENTATION_CUSTOM', 'ORIENTATION_LANDSCAPE',
            +            'ORIENTATION_PORTRAIT', 'PEN_COLOR', 'PEN_INDEX',
            +            'PEN_INTERLEAVED', 'PEN_PATTERN', 'PEN_WIDTH', 'PLATFORM_MAC',
            +            'PLATFORM_MOTIF', 'PLATFORM_SPECIAL', 'PLATFORM_WIN',
            +            'PLATFORM_X11', 'PLATFORM_XOL', 'PRISMMAP_INFO_BACKGROUND',
            +            'PRISMMAP_INFO_CAMERA_CLIP_FAR', 'PRISMMAP_INFO_CAMERA_CLIP_NEAR',
            +            'PRISMMAP_INFO_CAMERA_FOCAL_X', 'PRISMMAP_INFO_CAMERA_FOCAL_Y',
            +            'PRISMMAP_INFO_CAMERA_FOCAL_Z', 'PRISMMAP_INFO_CAMERA_VPN_1',
            +            'PRISMMAP_INFO_CAMERA_VPN_2', 'PRISMMAP_INFO_CAMERA_VPN_3',
            +            'PRISMMAP_INFO_CAMERA_VU_1', 'PRISMMAP_INFO_CAMERA_VU_2',
            +            'PRISMMAP_INFO_CAMERA_VU_3', 'PRISMMAP_INFO_CAMERA_X',
            +            'PRISMMAP_INFO_CAMERA_Y', 'PRISMMAP_INFO_CAMERA_Z',
            +            'PRISMMAP_INFO_INFOTIP_EXPR', 'PRISMMAP_INFO_LIGHT_COLOR',
            +            'PRISMMAP_INFO_LIGHT_X', 'PRISMMAP_INFO_LIGHT_Y',
            +            'PRISMMAP_INFO_LIGHT_Z', 'PRISMMAP_INFO_SCALE', 'RAD_2_DEG',
            +            'RASTER_CONTROL_POINT_X', 'RASTER_CONTROL_POINT_Y',
            +            'RASTER_TAB_INFO_ALPHA', 'RASTER_TAB_INFO_BITS_PER_PIXEL',
            +            'RASTER_TAB_INFO_BRIGHTNESS', 'RASTER_TAB_INFO_CONTRAST',
            +            'RASTER_TAB_INFO_DISPLAY_TRANSPARENT', 'RASTER_TAB_INFO_GREYSCALE',
            +            'RASTER_TAB_INFO_HEIGHT', 'RASTER_TAB_INFO_IMAGE_CLASS',
            +            'RASTER_TAB_INFO_IMAGE_NAME', 'RASTER_TAB_INFO_IMAGE_TYPE',
            +            'RASTER_TAB_INFO_NUM_CONTROL_POINTS',
            +            'RASTER_TAB_INFO_TRANSPARENT_COLOR', 'RASTER_TAB_INFO_WIDTH',
            +            'RED', 'REGION_INFO_IS_CLOCKWISE', 'SEARCH_INFO_ROW',
            +            'SEARCH_INFO_TABLE', 'SECONDS_PER_DAY', 'SEL_INFO_NROWS',
            +            'SEL_INFO_SELNAME', 'SEL_INFO_TABLENAME',
            +            'SESSION_INFO_AREA_UNITS', 'SESSION_INFO_COORDSYS_CLAUSE',
            +            'SESSION_INFO_DISTANCE_UNITS', 'SESSION_INFO_PAPER_UNITS',
            +            'SRV_COL_INFO_ALIAS', 'SRV_COL_INFO_NAME',
            +            'SRV_COL_INFO_PRECISION', 'SRV_COL_INFO_SCALE',
            +            'SRV_COL_INFO_STATUS', 'SRV_COL_INFO_TYPE', 'SRV_COL_INFO_VALUE',
            +            'SRV_COL_INFO_WIDTH', 'SRV_COL_TYPE_BIN_STRING',
            +            'SRV_COL_TYPE_CHAR', 'SRV_COL_TYPE_DATE', 'SRV_COL_TYPE_DECIMAL',
            +            'SRV_COL_TYPE_FIXED_LEN_STRING', 'SRV_COL_TYPE_FLOAT',
            +            'SRV_COL_TYPE_INTEGER', 'SRV_COL_TYPE_LOGICAL',
            +            'SRV_COL_TYPE_NONE', 'SRV_COL_TYPE_SMALLINT',
            +            'SRV_CONNECT_INFO_DB_NAME', 'SRV_CONNECT_INFO_DRIVER_NAME',
            +            'SRV_CONNECT_INFO_DS_NAME', 'SRV_CONNECT_INFO_QUOTE_CHAR',
            +            'SRV_CONNECT_INFO_SQL_USER_ID', 'SRV_DRV_DATA_SOURCE',
            +            'SRV_DRV_INFO_NAME', 'SRV_DRV_INFO_NAME_LIST', 'SRV_ERROR',
            +            'SRV_FETCH_FIRST', 'SRV_FETCH_LAST', 'SRV_FETCH_NEXT',
            +            'SRV_FETCH_PREV', 'SRV_INVALID_HANDLE', 'SRV_NEED_DATA',
            +            'SRV_NO_MORE_DATA', 'SRV_NULL_DATA', 'SRV_SUCCESS',
            +            'SRV_SUCCESS_WITH_INFO', 'SRV_TRUNCATED_DATA',
            +            'SRV_WM_HIST_NO_OVERWRITE', 'SRV_WM_HIST_NONE',
            +            'SRV_WM_HIST_OVERWRITE', 'STR_EQ', 'STR_GT', 'STR_LT',
            +            'STYLE_SAMPLE_SIZE_LARGE', 'STYLE_SAMPLE_SIZE_SMALL',
            +            'SWITCHING_INTO_MAPINFO', 'SWITCHING_OUT_OF_MAPINFO',
            +            'SYMBOL_ANGLE', 'SYMBOL_CODE', 'SYMBOL_COLOR',
            +            'SYMBOL_CUSTOM_NAME', 'SYMBOL_CUSTOM_STYLE', 'SYMBOL_FONT_NAME',
            +            'SYMBOL_FONT_STYLE', 'SYMBOL_KIND', 'SYMBOL_KIND_CUSTOM',
            +            'SYMBOL_KIND_FONT', 'SYMBOL_KIND_VECTOR', 'SYMBOL_POINTSIZE',
            +            'SYS_INFO_APPIDISPATCH', 'SYS_INFO_APPLICATIONWND',
            +            'SYS_INFO_APPVERSION', 'SYS_INFO_CHARSET',
            +            'SYS_INFO_COPYPROTECTED', 'SYS_INFO_DATE_FORMAT',
            +            'SYS_INFO_DDESTATUS', 'SYS_INFO_DIG_INSTALLED',
            +            'SYS_INFO_DIG_MODE', 'SYS_INFO_MAPINFOWND',
            +            'SYS_INFO_MDICLIENTWND', 'SYS_INFO_MIBUILD_NUMBER',
            +            'SYS_INFO_MIPLATFORM', 'SYS_INFO_MIVERSION',
            +            'SYS_INFO_NUMBER_FORMAT', 'SYS_INFO_PLATFORM',
            +            'SYS_INFO_PRODUCTLEVEL', 'SYS_INFO_RUNTIME',
            +            'TAB_GEO_CONTROL_POINT_X', 'TAB_GEO_CONTROL_POINT_Y',
            +            'TAB_INFO_BROWSER_LIST', 'TAB_INFO_COORDSYS_CLAUSE',
            +            'TAB_INFO_COORDSYS_CLAUSE_WITHOUT_BOUNDS',
            +            'TAB_INFO_COORDSYS_MAXX', 'TAB_INFO_COORDSYS_MAXY',
            +            'TAB_INFO_COORDSYS_MINX', 'TAB_INFO_COORDSYS_MINY',
            +            'TAB_INFO_COORDSYS_NAME', 'TAB_INFO_EDITED', 'TAB_INFO_FASTEDIT',
            +            'TAB_INFO_MAPPABLE', 'TAB_INFO_MAPPABLE_TABLE', 'TAB_INFO_MAXX',
            +            'TAB_INFO_MAXY', 'TAB_INFO_MINX', 'TAB_INFO_MINY', 'TAB_INFO_NAME',
            +            'TAB_INFO_NCOLS', 'TAB_INFO_NREFS', 'TAB_INFO_NROWS',
            +            'TAB_INFO_NUM', 'TAB_INFO_READONLY', 'TAB_INFO_SEAMLESS',
            +            'TAB_INFO_SUPPORT_MZ', 'TAB_INFO_TABFILE', 'TAB_INFO_TEMP',
            +            'TAB_INFO_THEME_METADATA', 'TAB_INFO_TYPE', 'TAB_INFO_UNDO',
            +            'TAB_INFO_USERBROWSE', 'TAB_INFO_USERCLOSE',
            +            'TAB_INFO_USERDISPLAYMAP', 'TAB_INFO_USEREDITABLE',
            +            'TAB_INFO_USERMAP', 'TAB_INFO_USERREMOVEMAP', 'TAB_INFO_Z_UNIT',
            +            'TAB_INFO_Z_UNIT_SET', 'TAB_TYPE_BASE', 'TAB_TYPE_FME',
            +            'TAB_TYPE_IMAGE', 'TAB_TYPE_LINKED', 'TAB_TYPE_RESULT',
            +            'TAB_TYPE_VIEW', 'TAB_TYPE_WFS', 'TAB_TYPE_WMS', 'TRUE', 'WHITE',
            +            'WIN_3DMAP', 'WIN_BROWSER', 'WIN_BUTTONPAD', 'WIN_CART_LEGEND',
            +            'WIN_GRAPH', 'WIN_HELP', 'WIN_INFO', 'WIN_INFO_AUTOSCROLL',
            +            'WIN_INFO_CLONEWINDOW', 'WIN_INFO_ENHANCED_RENDERING',
            +            'WIN_INFO_EXPORT_ANTIALIASING', 'WIN_INFO_EXPORT_BORDER',
            +            'WIN_INFO_EXPORT_DITHER', 'WIN_INFO_EXPORT_FILTER',
            +            'WIN_INFO_EXPORT_MASKSIZE', 'WIN_INFO_EXPORT_THRESHOLD',
            +            'WIN_INFO_EXPORT_TRANSPRASTER', 'WIN_INFO_EXPORT_TRANSPVECTOR',
            +            'WIN_INFO_EXPORT_TRUECOLOR', 'WIN_INFO_HEIGHT',
            +            'WIN_INFO_LEGENDS_MAP', 'WIN_INFO_NAME', 'WIN_INFO_OPEN',
            +            'WIN_INFO_PRINTER_BORDER', 'WIN_INFO_PRINTER_BOTTOMMARGIN',
            +            'WIN_INFO_PRINTER_COPIES', 'WIN_INFO_PRINTER_DITHER',
            +            'WIN_INFO_PRINTER_LEFTMARGIN', 'WIN_INFO_PRINTER_METHOD',
            +            'WIN_INFO_PRINTER_NAME', 'WIN_INFO_PRINTER_ORIENT',
            +            'WIN_INFO_PRINTER_PAPERSIZE', 'WIN_INFO_PRINTER_RIGHTMARGIN',
            +            'WIN_INFO_PRINTER_SCALE_PATTERNS', 'WIN_INFO_PRINTER_TOPMARGIN',
            +            'WIN_INFO_PRINTER_TRANSPRASTER', 'WIN_INFO_PRINTER_TRANSPVECTOR',
            +            'WIN_INFO_PRINTER_TRUECOLOR', 'WIN_INFO_SMARTPAN',
            +            'WIN_INFO_SMOOTH_IMAGE', 'WIN_INFO_SMOOTH_TEXT',
            +            'WIN_INFO_SMOOTH_VECTOR', 'WIN_INFO_SNAPMODE',
            +            'WIN_INFO_SNAPTHRESHOLD', 'WIN_INFO_STATE',
            +            'WIN_INFO_SYSMENUCLOSE', 'WIN_INFO_TABLE', 'WIN_INFO_TOPMOST',
            +            'WIN_INFO_TYPE', 'WIN_INFO_WIDTH', 'WIN_INFO_WINDOWID',
            +            'WIN_INFO_WND', 'WIN_INFO_WORKSPACE', 'WIN_INFO_X', 'WIN_INFO_Y',
            +            'WIN_LAYOUT', 'WIN_LEGEND', 'WIN_MAPBASIC', 'WIN_MAPINFO',
            +            'WIN_MAPPER', 'WIN_MESSAGE', 'WIN_PENPICKER',
            +            'WIN_PRINTER_LANDSCAPE', 'WIN_PRINTER_PORTRAIT', 'WIN_RULER',
            +            'WIN_STATE_MAXIMIZED', 'WIN_STATE_MINIMIZED', 'WIN_STATE_NORMAL',
            +            'WIN_STATISTICS', 'WIN_STYLE_CHILD', 'WIN_STYLE_POPUP',
            +            'WIN_STYLE_POPUP_FULLCAPTION', 'WIN_STYLE_STANDARD',
            +            'WIN_SYMBOLPICKER', 'WIN_TOOLBAR', 'WIN_TOOLPICKER', 'YELLOW'
            +            ),
            +        5 => array(
            +            'Abbrs', 'Above', 'Access', 'Active', 'Address', 'Advanced',
            +            'Affine', 'Align', 'Alpha', 'alpha_value', 'Always', 'Angle',
            +            'Animate', 'Antialiasing', 'Append', 'Apply', 'ApplyUpdates',
            +            'Arrow', 'Ascending', 'ASCII', 'At', 'AttributeData', 'Auto',
            +            'Autoflip', 'Autokey', 'Automatic', 'Autoscroll', 'Axis',
            +            'Background', 'Banding', 'Batch', 'Behind', 'Below', 'Bend',
            +            'Binary', 'Blocks', 'Border', 'BorderPen', 'Bottom', 'Bounds',
            +            'ByteOrder', 'ByVal', 'Calling', 'Camera', 'Candidates',
            +            'Cartesian', 'Cell', 'Center', 'Change', 'Char', 'Circle',
            +            'Clipping', 'CloseMatchesOnly', 'ClosestAddr', 'Color', 'Columns',
            +            'Contents', 'ControlPoints', 'Copies', 'Copyright', 'Counter',
            +            'Country', 'CountrySecondarySubdivision', 'CountrySubdivision',
            +            'Cross', 'CubicConvolution', 'Cull', 'Cursor', 'Custom', 'Data',
            +            'DBF', 'DDE', 'Decimal', 'DecimalPlaces', 'DefaultAmbientSpeed',
            +            'DefaultPropagationFactor', 'DeformatNumber', 'Delimiter',
            +            'Density', 'DenyWrite', 'Descending', 'Destroy', 'Device',
            +            'Dictionary', 'DInfo', 'Disable', 'DiscardUpdates', 'Display',
            +            'Dither', 'DrawMode', 'DropKey', 'Droplines', 'Duplicates',
            +            'Dynamic', 'Earth', 'East', 'EditLayerPopup', 'Elevation', 'Else',
            +            'ElseIf', 'Emf', 'Enable', 'Envinsa', 'ErrorDiffusion', 'Extents',
            +            'Fallback', 'FastEdit', 'FillFrame', 'Filter', 'First', 'Fit',
            +            'Fixed', 'FocalPoint', 'Footnote', 'Force', 'FromMapCatalog',
            +            'Front', 'Gap', 'Geographic', 'Geography', 'Graduated', 'Graphic',
            +            'Gutter', 'Half', 'Halftone', 'Handles', 'Height', 'Help',
            +            'HelpMsg', 'Hide', 'Hierarchical', 'HIGHLOW', 'History', 'Icon',
            +            'ID', 'Ignore', 'Image', 'Inflect', 'Inset', 'Inside',
            +            'Interactive', 'Internal', 'Interpolate', 'IntersectingStreet',
            +            'Justify', 'Key', 'Label', 'Labels', 'Landscape', 'Large', 'Last',
            +            'Layer', 'Left', 'Lib', 'Light', 'LinePen', 'Lines', 'Linestyle',
            +            'Longitude', 'LOWHIGH', 'Major', 'MajorPolygonOnly',
            +            'MajorRoadsOnly', 'MapBounds', 'MapMarker', 'MapString', 'Margins',
            +            'MarkMultiple', 'MaskSize', 'Match', 'MaxOffRoadDistance',
            +            'Message', 'MICODE', 'Minor', 'MixedCase', 'Mode', 'ModifierKeys',
            +            'Modify', 'Multiple', 'MultiPolygonRgns', 'Municipality',
            +            'MunicipalitySubdivision', 'Name', 'NATIVE', 'NearestNeighbor',
            +            'NoCollision', 'Node', 'Nodes', 'NoIndex', 'None', 'Nonearth',
            +            'NoRefresh', 'Normalized', 'North', 'Number', 'ObjectType', 'ODBC',
            +            'Off', 'OK', 'OLE', 'On', 'Options', 'Orientation', 'OtherBdy',
            +            'Output', 'Outside', 'Overlapped', 'Overwrite', 'Pagebreaks',
            +            'Pan', 'Papersize', 'Parent', 'PassThrough', 'Password',
            +            'Patterns', 'Per', 'Percent', 'Percentage', 'Permanent',
            +            'PersistentCache', 'Pie', 'Pitch', 'Placename', 'PointsOnly',
            +            'PolyObj', 'Portrait', 'Position', 'PostalCode', 'Prefer',
            +            'Preferences', 'Prev', 'Printer', 'Projection', 'PushButton',
            +            'Quantile', 'Query', 'Random', 'Range', 'Raster', 'Read',
            +            'ReadOnly', 'Rec', 'Redraw', 'Refine', 'Regionstyle', 'RemoveData',
            +            'Replace', 'Reprojection', 'Resampling', 'Restore', 'ResultCode',
            +            'ReturnHoles', 'Right', 'Roll', 'ROP', 'Rotated', 'Row', 'Ruler',
            +            'Scale', 'ScrollBars', 'Seamless', 'SecondaryPostalCode',
            +            'SelfInt', 'Separator', 'Series', 'Service', 'SetKey',
            +            'SetTraverse', 'Shades', 'Show', 'Simple', 'SimplificationFactor',
            +            'Size', 'Small', 'Smart', 'Smooth', 'South', 'Spacing',
            +            'SPATIALWARE', 'Spherical', 'Square', 'Stacked', 'Step', 'Store',
            +            'Street', 'StreetName', 'StreetNumber', 'StyleType', 'Subtitle',
            +            'SysMenuClose', 'Thin', 'Tick', 'Title', 'TitleAxisY',
            +            'TitleGroup', 'Titles', 'TitleSeries', 'ToggleButton', 'Tolerance',
            +            'ToolbarPosition', 'ToolButton', 'Toolkit', 'Top', 'Translucency',
            +            'translucency_percent', 'Transparency', 'Transparent', 'Traverse',
            +            'TrueColor', 'Uncheck', 'Undo', 'Union', 'Unit', 'Until', 'URL',
            +            'Use', 'User', 'UserBrowse', 'UserClose', 'UserDisplayMap',
            +            'UserEdit', 'UserMap', 'UserRemoveMap', 'Value', 'Variable',
            +            'Vary', 'Vector', 'Versioned', 'View', 'ViewDisplayPopup',
            +            'VisibleOnly', 'VMDefault', 'VMGrid', 'VMRaster', 'Voronoi',
            +            'Warnings', 'Wedge', 'West', 'Width', 'With', 'XY', 'XYINDEX',
            +            'Yaw', 'Zoom'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +            //Numeric/String Operators + Comparison Operators
            +            '(', ')', '[', ']', '+', '-', '*', '/', '\\', '^', '&',
            +            '=', '<', '>'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        5 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0000ff;',        //Statements + Clauses + Data Types + Logical Operators, Geographical Operators + SQL
            +            2 => 'color: #2391af;',        //Special Procedures
            +            3 => 'color: #2391af;',        //Functions
            +            4 => 'color: #c635cb;',        //Constants
            +            5 => 'color: #0000ff;'         //Extended keywords (case sensitive)
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #008000;',
            +            'MULTI' => 'color: #008000;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #a31515;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #12198b;',            //Table Attributes
            +            1 => 'color: #2391af;'             //Data Types
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +            //Table Attribute
            +            0 => "[\\.]{1}[a-zA-Z0-9_]+",
            +            //Data Type
            +            1 => "(?xi) \\s+ as \\s+ (Alias|Brush|Date|Float|Font|Integer|Logical|Object|Pen|SmallInt|String|Symbol)"
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/matlab.php b/vendor/easybook/geshi/geshi/matlab.php
            new file mode 100644
            index 0000000000..e228a08718
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/matlab.php
            @@ -0,0 +1,226 @@
            + 'Matlab M',
            +    'COMMENT_SINGLE' => array(1 => '%'),
            +    'COMMENT_MULTI' => array(),
            +    //Matlab Strings
            +    'COMMENT_REGEXP' => array(
            +        2 => "/(? GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array(),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'break', 'case', 'catch', 'continue', 'elseif', 'else', 'end', 'for',
            +            'function', 'global', 'if', 'otherwise', 'persistent', 'return',
            +            'switch', 'try', 'while'
            +            ),
            +        2 => array(
            +            'all','any','exist','is','logical','mislocked',
            +
            +            'abs','acos','acosh','acot','acoth','acsc','acsch','airy','angle',
            +            'ans','area','asec','asech','asin','asinh','atan','atan2','atanh',
            +            'auread','autumn','auwrite','axes','axis','balance','bar','bar3',
            +            'bar3h','barh','besselh','besseli','besselj','besselk','Bessely',
            +            'beta','betainc','betaln','bicg','bicgstab','bin2dec','bitand',
            +            'bitcmp','bitget','bitmax','bitor','bitset','bitshift','bitxor',
            +            'blkdiag','bone','box','brighten','builtin','bwcontr','calendar',
            +            'camdolly','camlight','camlookat','camorbit','campan','campos',
            +            'camproj','camroll','camtarget','camup','camva','camzoom','capture',
            +            'cart2pol','cart2sph','cat','caxis','cdf2rdf','ceil','cell',
            +            'cell2struct','celldisp','cellfun','cellplot','cellstr','cgs',
            +            'char','chol','cholinc','cholupdate','cla','clabel','class','clc',
            +            'clf','clg','clock','close','colmmd','colorbar','colorcube',
            +            'colordef','colormap','colperm','comet','comet3','compan','compass',
            +            'complex','computer','cond','condeig','condest','coneplot','conj',
            +            'contour','contourc','contourf','contourslice','contrast','conv',
            +            'conv2','convhull','cool','copper','copyobj','corrcoef','cos',
            +            'cosh','cot','coth','cov','cplxpair','cputime','cross','csc','csch',
            +            'cumprod','cumsum','cumtrapz','cylinder','daspect','date','datenum',
            +            'datestr','datetick','datevec','dbclear','dbcont','dbdown',
            +            'dblquad','dbmex','dbquit','dbstack','dbstatus','dbstep','dbstop',
            +            'dbtype','dbup','deblank','dec2bin','dec2hex','deconv','del2',
            +            'delaunay','det','diag','dialog','diff','diffuse','dlmread',
            +            'dlmwrite','dmperm','double','dragrect','drawnow','dsearch','eig',
            +            'eigs','ellipj','ellipke','eomday','eps','erf','erfc','erfcx',
            +            'erfiny','error','errorbar','errordlg','etime','eval','evalc',
            +            'evalin','exp','expint','expm','eye','ezcontour','ezcontourf',
            +            'ezmesh','ezmeshc','ezplot','ezplot3','ezpolar','ezsurf','ezsurfc',
            +            'factor','factorial','fclose','feather','feof','ferror','feval',
            +            'fft','fft2','fftshift','fgetl','fgets','fieldnames','figure',
            +            'fill','fill3','filter','filter2','find','findfigs','findobj',
            +            'findstr','fix','flag','flipdim','fliplr','flipud','floor','flops',
            +            'fmin','fmins','fopen','fplot','fprintf','fread','frewind','fscanf',
            +            'fseek','ftell','full','funm','fwrite','fzero','gallery','gamma',
            +            'gammainc','gammaln','gca','gcbo','gcd','gcf','gco','get',
            +            'getfield','ginput','gmres','gradient','gray','graymon','grid',
            +            'griddata','gsvd','gtext','hadamard','hankel','hdf','helpdlg',
            +            'hess','hex2dec','hex2num','hidden','hilb','hist','hold','hot',
            +            'hsv','hsv2rgb','i','ifft','ifft2','ifftn','ifftshift','imag',
            +            'image','imfinfo','imread','imwrite','ind2sub','Inf','inferiorto',
            +            'inline','inpolygon','input','inputdlg','inputname','int16',
            +            'int2str','int32','int8','interp1','interp2','interp3','interpft',
            +            'interpn','intersect','inv','invhilb','ipermute','isa','ishandle',
            +            'ismember','isocaps','isonormals','isosurface','j','jet','keyboard',
            +            'lcm','legend','legendre','light','lighting','lightingangle',
            +            'lin2mu','line','lines','linspace','listdlg','loadobj','log',
            +            'log10','log2','loglog','logm','logspace','lower','lscov','lu',
            +            'luinc','magic','mat2str','material','max','mean','median','menu',
            +            'menuedit','mesh','meshc','meshgrid','min','mod','msgbox','mu2lin',
            +            'NaN','nargchk','nargin','nargout','nchoosek','ndgrid','ndims',
            +            'newplot','nextpow2','nnls','nnz','nonzeros','norm','normest','now',
            +            'null','num2cell','num2str','nzmax','ode113,','ode15s,','ode23s,',
            +            'ode23t,','ode23tb','ode45,','odefile','odeget','odeset','ones',
            +            'orient','orth','pagedlg','pareto','pascal','patch','pause',
            +            'pbaspect','pcg','pcolor','peaks','perms','permute','pi','pie',
            +            'pie3','pinv','plot','plot3','plotmatrix','plotyy','pol2cart',
            +            'polar','poly','polyarea','polyder','polyeig','polyfit','polyval',
            +            'polyvalm','pow2','primes','print','printdlg','printopt','prism',
            +            'prod','propedit','qmr','qr','qrdelete','qrinsert','qrupdate',
            +            'quad','questdlg','quiver','quiver3','qz','rand','randn','randperm',
            +            'rank','rat','rats','rbbox','rcond','real','realmax','realmin',
            +            'rectangle','reducepatch','reducevolume','refresh','rem','repmat',
            +            'reset','reshape','residue','rgb2hsv','rgbplot','ribbon','rmfield',
            +            'roots','rose','rot90','rotate','rotate3d','round','rref',
            +            'rrefmovie','rsf2csf','saveobj','scatter','scatter3','schur',
            +            'script','sec','sech','selectmoveresize','semilogx','semilogy',
            +            'set','setdiff','setfield','setxor','shading','shg','shiftdim',
            +            'shrinkfaces','sign','sin','single','sinh','slice','smooth3','sort',
            +            'sortrows','sound','soundsc','spalloc','sparse','spconvert',
            +            'spdiags','specular','speye','spfun','sph2cart','sphere','spinmap',
            +            'spline','spones','spparms','sprand','sprandn','sprandsym','spring',
            +            'sprintf','sqrt','sqrtm','squeeze','sscanf','stairs','std','stem',
            +            'stem3','str2double','str2num','strcat','strcmp','strcmpi',
            +            'stream2','stream3','streamline','strings','strjust','strmatch',
            +            'strncmp','strrep','strtok','struct','struct2cell','strvcat',
            +            'sub2ind','subplot','subspace','subvolume','sum','summer',
            +            'superiorto','surf','surf2patch','surface','surfc','surfl',
            +            'surfnorm','svd','svds','symmmd','symrcm','symvar','tan','tanh',
            +            'texlabel','text Create','textread','textwrap','tic','title','toc',
            +            'toeplitz','trace','trapz','tril','trimesh','trisurf','triu',
            +            'tsearch','uicontext Create','uicontextmenu','uicontrol',
            +            'uigetfile','uimenu','uint32','uint8','uiputfile','uiresume',
            +            'uisetcolor','uisetfont','uiwait Used','union','unique','unwrap',
            +            'upper','var','varargin','varargout','vectorize','view','viewmtx',
            +            'voronoi','waitbar','waitforbuttonpress','warndlg','warning',
            +            'waterfall','wavread','wavwrite','weekday','whitebg','wilkinson',
            +            'winter','wk1read','wk1write','xlabel','xlim','ylabel','ylim',
            +            'zeros','zlabel','zlim','zoom',
            +            //'[Keywords 6]',
            +            'addpath','cd','clear','copyfile','delete','diary','dir','disp',
            +            'doc','docopt','echo','edit','fileparts','format','fullfile','help',
            +            'helpdesk','helpwin','home','inmem','lasterr','lastwarn','length',
            +            'load','lookfor','ls','matlabrc','matlabroot','mkdir','mlock',
            +            'more','munlock','open','openvar','pack','partialpath','path',
            +            'pathtool','profile','profreport','pwd','quit','rmpath','save',
            +            'saveas','size','tempdir','tempname','type','ver','version','web',
            +            'what','whatsnew','which','who','whos','workspace'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '...'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        //3 => false,
            +        //4 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0000FF;',
            +            2 => 'color: #0000FF;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #228B22;',
            +            2 => 'color:#A020F0;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => ''
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #080;'
            +            ),
            +        'STRINGS' => array(
            +            //0 => 'color: #A020F0;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #33f;'
            +            ),
            +        'METHODS' => array(
            +            1 => '',
            +            2 => ''
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #080;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #33f;'
            +            ),
            +        'SCRIPT' => array(
            +            0 => ''
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => 'http://www.mathworks.com/access/helpdesk/help/techdoc/ref/{FNAMEL}.html'
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.',
            +        2 => '::'
            +        ),
            +    'REGEXPS' => array(
            +        //Complex numbers
            +        0 => '(?html)'
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/mirc.php b/vendor/easybook/geshi/geshi/mirc.php
            new file mode 100644
            index 0000000000..3de6d09bad
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/mirc.php
            @@ -0,0 +1,170 @@
            + 'mIRC Scripting',
            +    'COMMENT_SINGLE' => array(1 => ';'),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array(),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'alias', 'menu', 'dialog',
            +            ),
            +        2 => array(
            +            'if', 'elseif', 'else', 'while', 'return', 'goto', 'var'
            +            ),
            +        3 => array(
            +            'action','ajinvite','amsg','ame','anick','aop','auser',
            +            'avoice','auto','autojoin','away','background','ban','beep',
            +            'channel','clear','clearall','clipboard','close','closemsg','color',
            +            'copy','creq','ctcp','ctcpreply','ctcps','dcc','dde','ddeserver',
            +            'debug','describe','disable','disconnect','dlevel','dll','dns',
            +            'dqwindow','ebeeps','echo','editbox','emailaddr','enable','events',
            +            'exit','filter','findtext','finger','flash','flood','flush',
            +            'flushini','font','fsend','fserve','fullname','ghide','gload',
            +            'gmove','gopts','gplay','gpoint','gqreq','groups','gshow','gsize',
            +            'gstop','gtalk','gunload','guser','help','hop','ignore','invite',
            +            'join','kick','linesep','links','list','load','loadbuf','localinfo',
            +            'log','me','mdi','mkdir','mnick','mode','msg','names','nick','noop',
            +            'notice','notify','omsg','onotice','part','partall','pdcc',
            +            'perform','ping','play','pop','protect','pvoice','qmsg','qme',
            +            'query','queryrn','quit','raw','remini','remote','remove','rename',
            +            'enwin','resetidle','rlevel','rmdir','run','ruser','save','savebuf',
            +            'saveini','say','server','showmirc','sline','sound','speak','splay',
            +            'sreq','strip','time',
            +            //'timer[N/name]', //Handled as a regular expression below ...
            +            'timers','timestamp','titlebar','tnick','tokenize','topic','ulist',
            +            'unload','updatenl','url','uwho','window','winhelp','write',
            +            'writeini','who','whois','whowas'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '{', '}', '[', ']', '/'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #994444;',
            +            2 => 'color: #000000; font-weight: bold;',
            +            3 => 'color: #990000; font-weight: bold;',
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;',
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #FF0000;',
            +            ),
            +        'STRINGS' => array(
            +            ),
            +        'NUMBERS' => array(
            +            0 => '',
            +            ),
            +        'METHODS' => array(
            +            0 => 'color: #008000;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #FF0000;',
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #000099;',
            +            1 => 'color: #990000;',
            +            2 => 'color: #000099;',
            +            3 => 'color: #888800;',
            +            4 => 'color: #888800;',
            +            5 => 'color: #000099;',
            +            6 => 'color: #990000; font-weight: bold;',
            +            7 => 'color: #990000; font-weight: bold;'
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => 'http://www.mirc.com/{FNAMEL}'
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array('.'),
            +    'REGEXPS' => array(
            +        //Variable names
            +        0 => '\$[a-zA-Z0-9]+',
            +        //Variable names
            +        1 => '(%|&)[\w\x80-\xFE]+',
            +        //Client to Client Protocol handling
            +        2 => '(on|ctcp) (!|@|&)?(\d|\*):[a-zA-Z]+:',
            +        /*4 => array(
            +            GESHI_SEARCH => '((on|ctcp) (!|@|&)?(\d|\*):(Action|Active|Agent|AppActive|Ban|Chat|Close|Connect|Ctcp|CtcpReply|DccServer|DeHelp|DeOp|DeVoice|Dialog|Dns|Error|Exit|FileRcvd|FileSent|GetFail|Help|Hotlink|Input|Invite|Join|KeyDown|KeyUp|Kick|Load|Logon|MidiEnd|Mode|Mp3End|Nick|NoSound|Notice|Notify|Op|Open|Part|Ping|Pong|PlayEnd|Quit|Raw|RawMode|SendFail|Serv|ServerMode|ServerOp|Signal|Snotice|Start|Text|Topic|UnBan|Unload|Unotify|User|Mode|Voice|Wallops|WaveEnd):)',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => 'i',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),*/
            +        //Channel names
            +        3 => '(#|@)[a-zA-Z0-9]+',
            +        4 => '-[a-z\d]+',
            +        //Raw protocol handling
            +        5 => 'raw (\d|\*):',
            +        //Timer handling
            +        6 => '(?|:|\/)\/timer(?!s\b)[0-9a-zA-Z_]+',
            +        // /...
            +        7 => '(?|:|\/|\w)\/[a-zA-Z][a-zA-Z0-9]*(?!>)'
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'PARSER_CONTROL' => array(
            +        'ENABLE_FLAGS' => array(
            +            'NUMBERS' => GESHI_NEVER
            +            ),
            +        'KEYWORDS' => array(
            +            'DISALLOWED_BEFORE' => '(? 'MMIX',
            +    'COMMENT_SINGLE' => array(1 => ';', 2 => '%'),
            +    'COMMENT_MULTI' => array(),
            +    //Line address prefix suppression
            +    'COMMENT_REGEXP' => array(
            +        3 => "/^\s*(?!\s)[^\w].*$/m",
            +        4 => "/^\s*[0-9a-f]{12,16}+(?:\s+[0-9a-f]+(?:\.{3}[0-9a-f]{2,})?)?:/mi"
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'NUMBERS' => array(
            +        1 => '(? '#[\da-fA-F]+',
            +        3 => '\$\d+'
            +        ),
            +    'KEYWORDS' => array(
            +        /*CPU*/
            +        1 => array(
            +            '16ADDU','2ADDU','4ADDU','8ADDU','ADD','ADDU','AND','ANDN','ANDNH',
            +            'ANDNL','ANDNMH','ANDNML','BDIF','BEV','BN','BNN','BNP','BNZ','BOD',
            +            'BP','BZ','CMP','CMPU','CSEV','CSN','CSNN','CSNP','CSNZ','CSOD',
            +            'CSP','CSWAP','CSZ','DIV','DIVU','FADD','FCMP','FCMPE','FDIV',
            +            'FEQL','FEQLE','FINT','FIX','FIXU','FLOT','FLOTU','FMUL','FREM',
            +            'FSQRT','FSUB','FUN','FUNE','GET','GETA','GO','INCH','INCL','INCMH',
            +            'INCML','JMP','LDA','LDB','LDBU','LDHT','LDO','LDOU','LDSF','LDT',
            +            'LDTU','LDUNC','LDVTS','LDW','LDWU','MOR','MUL','MULU','MUX','MXOR',
            +            'NAND','NEG','NEGU','NOR','NXOR','ODIF','OR','ORH','ORL','ORMH',
            +            'ORML','ORN','PBEV','PBN','PBNN','PBNP','PBNZ','PBOD','PBP','PBZ',
            +            'POP','PREGO','PRELD','PREST','PUSHGO','PUSHJ','PUT','RESUME','SADD',
            +            'SAVE','SETH','SETL','SETMH','SETML','SFLOT','SFLOTU','SL','SLU',
            +            'SR','SRU','STB','STBU','STCO','STHT','STO','STOU','STSF','STT',
            +            'STTU','STUNC','STW','STWU','SUB','SUBU','SWYM','SYNC','SYNCD',
            +            'SYNCID','TDIF','TRAP','TRIP','UNSAVE','WDIF','XOR','ZSEV','ZSN',
            +            'ZSNN','ZSNP','ZSNZ','ZSOD','ZSP','ZSZ'
            +            ),
            +        2 => array(
            +            'BSPEC','BYTE','ESPEC','GREG','IS','LOC','LOCAL','OCTA',
            +            'PREFIX','SET','TETRA','WYDE'
            +            ),
            +        /*registers*/
            +        3 => array(
            +            'rA','rB','rC','rD','rE','rF','rG','rH','rI','rJ','rK','rL','rM',
            +            'rN','rO','rP','rQ','rR','rS','rT','rU','rV','rW','rX','rY','rZ',
            +            'rBB','rTT','rWW','rXX','rYY','rZZ'
            +            ),
            +//        /*Directive*/
            +//        4 => array(
            +//            ),
            +//        /*Operands*/
            +//        5 => array(
            +//            )
            +        ),
            +    'SYMBOLS' => array(
            +        '[', ']', '(', ')',
            +        '+', '-', '*', '/', '%',
            +        '.', ',', ';', ':',
            +        '<<','>>'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => false,
            +        3 => true,
            +//        4 => false,
            +//        5 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #00007f; font-weight: bold;',
            +            2 => 'color: #0000ff; font-weight: bold;',
            +            3 => 'color: #00007f;',
            +//            4 => 'color: #000000; font-weight: bold;',
            +//            5 => 'color: #000000; font-weight: bold;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; font-style: italic;',
            +            2 => 'color: #666666; font-style: italic;',
            +            3 => 'color: #666666; font-style: italic;',
            +            4 => 'color: #adadad; font-style: italic;',
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900; font-weight: bold;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #7f007f;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #0000ff;',
            +            1 => 'color: #0000ff;',
            +            2 => 'color: #0000ff;',
            +            3 => 'color: #00007f;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #339933;'
            +            ),
            +        'REGEXPS' => array(
            +//            0 => 'color: #0000ff;',
            +//            1 => 'color: #0000ff;'
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +//        4 => '',
            +//        5 => ''
            +        ),
            +/*
            +    'NUMBERS' =>
            +        GESHI_NUMBER_BIN_PREFIX_PERCENT |
            +        GESHI_NUMBER_BIN_SUFFIX |
            +        GESHI_NUMBER_HEX_PREFIX |
            +        GESHI_NUMBER_HEX_SUFFIX |
            +        GESHI_NUMBER_OCT_SUFFIX |
            +        GESHI_NUMBER_INT_BASIC |
            +        GESHI_NUMBER_FLT_NONSCI |
            +        GESHI_NUMBER_FLT_NONSCI_F |
            +        GESHI_NUMBER_FLT_SCI_ZERO,
            +*/
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        //Hex numbers
            +//        0 => /*  */ "(?<=([\\s\\(\\)\\[\\],;.:+\\-\\/*]))(?:[0-9][0-9a-fA-F]{0,31}[hH]|0x[0-9a-fA-F]{1,32})(?=([\\s\\(\\)\\[\\],;.:+\\-\\/*]))",
            +        //Binary numbers
            +//        1 => "(?<=([\\s\\(\\)\\[\\],;.:+\\-\\/*]))[01]{1,64}[bB](?=([\\s\\(\\)\\[\\],;.:+\\-\\/*]))"
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 8,
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            'DISALLOWED_BEFORE' => "(?|^])",
            +            'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_<\|%])"
            +        )
            +    )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/modula2.php b/vendor/easybook/geshi/geshi/modula2.php
            new file mode 100644
            index 0000000000..3b7ae8acf2
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/modula2.php
            @@ -0,0 +1,135 @@
            + 'Modula-2',
            +    'COMMENT_MULTI' => array('(*' => '*)'),
            +    'COMMENT_SINGLE' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'HARDQUOTE' => array("'", "'"),
            +    'HARDESCAPE' => array("''"),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array( /* reserved words */
            +            'AND', 'ARRAY', 'BEGIN', 'BY', 'CASE', 'CONST', 'DEFINITION',
            +            'DIV', 'DO', 'ELSE', 'ELSIF', 'END', 'EXIT', 'EXPORT', 'FOR',
            +            'FROM', 'IF', 'IMPLEMENTATION', 'IMPORT', 'IN', 'LOOP', 'MOD',
            +            'MODULE', 'NOT', 'OF', 'OR', 'POINTER', 'PROCEDURE', 'QUALIFIED',
            +            'RECORD', 'REPEAT', 'RETURN', 'SET', 'THEN', 'TO', 'TYPE',
            +            'UNTIL', 'VAR', 'WHILE', 'WITH'
            +            ),
            +        2 => array( /* pervasive constants */
            +            'NIL', 'FALSE', 'TRUE',
            +            ),
            +        3 => array( /* pervasive types */
            +            'BITSET', 'CAP', 'CHR', 'DEC', 'DISPOSE', 'EXCL', 'FLOAT',
            +            'HALT', 'HIGH', 'INC', 'INCL', 'MAX', 'MIN', 'NEW', 'ODD', 'ORD',
            +            'SIZE', 'TRUNC', 'VAL'
            +            ),
            +        4 => array( /* pervasive functions and macros */
            +            'ABS', 'BOOLEAN', 'CARDINAL', 'CHAR', 'INTEGER',
            +            'LONGCARD', 'LONGINT', 'LONGREAL', 'PROC', 'REAL'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        ',', ':', '=', '+', '-', '*', '/', '#', '~'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000000; font-weight: bold;',
            +            2 => 'color: #000000; font-weight: bold;',
            +            3 => 'color: #000066;',
            +            4 => 'color: #000066; font-weight: bold;'
            +            ),
            +        'COMMENTS' => array(
            +            'MULTI' => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;',
            +            'HARD' => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;',
            +            'HARD' => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #0066ee;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #339933;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => ''
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/modula3.php b/vendor/easybook/geshi/geshi/modula3.php
            new file mode 100644
            index 0000000000..7f6e0153af
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/modula3.php
            @@ -0,0 +1,134 @@
            + 'Modula-3',
            +    'COMMENT_SINGLE' => array(),
            +    'COMMENT_MULTI' => array('(*' => '*)'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'HARDQUOTE' => array("'", "'"),
            +    'HARDESCAPE' => array("''"),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'AND', 'ANY', 'ARRAY', 'AS', 'BEGIN', 'BITS', 'BRANDED', 'BY', 'CASE',
            +            'CONST', 'DIV', 'DO', 'ELSE', 'ELSIF', 'END', 'EVAL', 'EXCEPT', 'EXCEPTION',
            +            'EXIT', 'EXPORTS', 'FINALLY', 'FOR', 'FROM', 'GENERIC', 'IF', 'IMPORT', 'IN',
            +            'INTERFACE', 'LOCK', 'LOOP', 'METHODS', 'MOD', 'MODULE', 'NOT', 'OBJECT', 'OF',
            +            'OR', 'OVERRIDES', 'PROCEDURE', 'RAISE', 'RAISES', 'READONLY', 'RECORD', 'REF',
            +            'REPEAT', 'RETURN', 'REVEAL', 'ROOT', 'SET', 'THEN', 'TO', 'TRY', 'TYPE', 'TYPECASE',
            +            'UNSAFE', 'UNTIL', 'UNTRACED', 'VALUE', 'VAR', 'WHILE', 'WITH'
            +            ),
            +        2 => array(
            +            'NIL', 'NULL', 'FALSE', 'TRUE',
            +            ),
            +        3 => array(
            +            'ABS','ADR','ADRSIZE','BITSIZE','BYTESIZE','CEILING','DEC','DISPOSE',
            +            'EXTENDED','FIRST','FLOAT','FLOOR','INC','ISTYPE','LAST','LOOPHOLE','MAX','MIN',
            +            'NARROW','NEW','NUMBER','ORD','ROUND','SUBARRAY','TRUNC','TYPECODE', 'VAL'
            +            ),
            +        4 => array(
            +            'ADDRESS', 'BOOLEAN', 'CARDINAL', 'CHAR', 'INTEGER',
            +            'LONGREAL', 'MUTEX', 'REAL', 'REFANY', 'TEXT'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        ',', ':', '=', '+', '-', '*', '/', '#'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000000; font-weight: bold;',
            +            2 => 'color: #000000; font-weight: bold;',
            +            3 => 'color: #000066;',
            +            4 => 'color: #000066; font-weight: bold;'
            +            ),
            +        'COMMENTS' => array(
            +            'MULTI' => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;',
            +            'HARD' => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;',
            +            'HARD' => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #0066ee;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #339933;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/mpasm.php b/vendor/easybook/geshi/geshi/mpasm.php
            new file mode 100644
            index 0000000000..a0e1ef8fff
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/mpasm.php
            @@ -0,0 +1,162 @@
            + 'Microchip Assembler',
            +    'COMMENT_SINGLE' => array(1 => ';'),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        /*Directive Language*/
            +        4 => array(
            +            'CONSTANT', '#DEFINE', 'END', 'EQU', 'ERROR', 'ERROR-LEVEL', '#INCLUDE', 'LIST',
            +            'MESSG', 'NOLIST', 'ORG', 'PAGE', 'PROCESSOR', 'RADIX', 'SET', 'SPACE', 'SUBTITLE',
            +            'TITLE', '#UNDEFINE', 'VARIABLE', 'ELSE', 'ENDIF', 'ENDW', 'IF', 'IFDEF', 'IFNDEF',
            +            'WHILE', '__BADRAM', 'CBLOCK', '__CONFIG', 'DA', 'DATA', 'DB', 'DE', 'DT', 'DW',
            +            'ENDC', 'FILL', '__IDLOCS', '__MAXRAM', 'RES', 'ENDM', 'EXITM', 'EXPAND', 'LOCAL',
            +            'MACRO', 'NOEXPAND', 'BANKISEL', 'BANKSEL', 'CODE', 'EXTERN', 'GLOBAL', 'IDATA',
            +            'PAGESEL', 'UDATA', 'UDATA_ACS', 'UDATA_OVR', 'UDATA_SHR'
            +            ),
            +        /* 12&14-bit Specific Instruction Set*/
            +        1 => array(
            +            'andlw', 'call', 'clrwdt', 'goto', 'iorlw', 'movlw', 'option', 'retlw', 'sleep',
            +            'tris', 'xorlw', 'addwf', 'andwf', 'clrf', 'clrw', 'comf', 'decf', 'decfsz', 'incf',
            +            'incfsz', 'iorwf', 'movf', 'nop', 'rlf', 'rrf', 'subwf', 'swapf', 'xorwf',
            +            'bcf', 'bsf', 'btfsc', 'btfss',
            +            'addlw', 'retfie', 'return', 'sublw', 'addcf', 'adddcf', 'b', 'bc', 'bdc',
            +            'bnc', 'bndc', 'bnz', 'bz', 'clrc', 'clrdc', 'clrz', 'lcall', 'lgoto', 'movfw',
            +            'negf', 'setc', 'setdc', 'setz', 'skpc', 'skpdc', 'skpnc', 'skpndc', 'skpnz', 'skpz',
            +            'subcf', 'subdcf', 'tstf'
            +            ),
            +        /* 16-bit Specific Instructiob Set */
            +        2 => array (
            +            'movfp', 'movlb', 'movlp', 'movpf', 'movwf', 'tablrd', 'tablwt', 'tlrd', 'tlwt',
            +            'addwfc', 'daw', 'mullw', 'negw', 'rlcf', 'rlncf', 'rrcf', 'rrncf', 'setf', 'subwfb',
            +            'btg', 'cpfseq', 'cpfsgt', 'cpfslt', 'dcfsnz', 'infsnz', 'tstfsz', 'lfsr', 'bnn',
            +            'bnov', 'bra', 'pop', 'push', 'rcall', 'reset'
            +            ),
            +        /* Registers */
            +        3 => array(
            +            'INDF', 'TMR0', 'PCL', 'STATUS', 'FSR', 'PORTA', 'PORTB', 'PORTC', 'PORTD', 'PORTE',
            +            'PCLATH', 'INTCON', 'PIR1', 'PIR2', 'TMR1L', 'TMR1H', 'T1CON', 'TMR2', 'T2CON', 'TMR2L',
            +            'TMR2H', 'TMR0H', 'TMR0L', 'SSPBUF', 'SSPCON', 'CCPR1L', 'CCPR1H', 'CCP1CON', 'RCSTA',
            +            'TXREG', 'RCREG', 'CCPR2L', 'CCPR2H', 'CCP2CON', 'OPTION', 'TRISA', 'TRISB', 'TRISC',
            +            'TRISD', 'TRISE', 'PIE2', 'PIE1', 'PR2', 'SSPADD', 'SSPSTAT', 'TXSTA', 'SPBRG'
            +            ),
            +        /*Operands*/
            +        5 => array(
            +            'high','low'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '[', ']', '(', ')'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        5 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #00007f;',
            +            2 => 'color: #0000ff;',
            +            3 => 'color: #007f00;',
            +            4 => 'color: #46aa03; font-weight:bold;',
            +            5 => 'color: #7f0000;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #adadad; font-style: italic;',
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #7f007f;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #ff0000;',
            +            1 => 'color: #ff0000;'
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        //Hex numbers
            +        0 => '[0-9a-fA-F]{1,32}[hH]',
            +        //Binary numbers
            +        1 => '[01]{1,64}[bB]'
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/mxml.php b/vendor/easybook/geshi/geshi/mxml.php
            new file mode 100644
            index 0000000000..60dfe5f32c
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/mxml.php
            @@ -0,0 +1,143 @@
            + 'MXML',
            +    'COMMENT_SINGLE' => array(),
            +    'COMMENT_MULTI' => array(''),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        ),
            +    'SYMBOLS' => array(
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            ),
            +        'COMMENTS' => array(
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'SCRIPT' => array(
            +            0 => 'color: #00bbdd;',
            +            1 => 'color: #ddbb00;',
            +            2 => 'color: #339933;',
            +            3 => 'color: #000000;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'font-weight: bold; color: black;',
            +            1 => 'color: #7400FF;',
            +            2 => 'color: #7400FF;'
            +            )
            +        ),
            +    'URLS' => array(
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        // xml declaration
            +        0 => array(
            +            GESHI_SEARCH => '(<[\/?|(\?xml)]?[a-z0-9_\-:]*(\?>))',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => 'i',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        // opening tags
            +        1 => array(
            +            GESHI_SEARCH => '(<\/?[a-z]+:[a-z]+)',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => 'i',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        // closing tags
            +        2 => array(
            +            GESHI_SEARCH => '(\/?>)',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => 'i',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            )
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_ALWAYS,
            +    'SCRIPT_DELIMITERS' => array(
            +        0 => array(
            +            ' '>'
            +            ),
            +        1 => array(
            +            '&' => ';'
            +            ),
            +        2 => array(
            +            //' ']]>'
            +            '' => ''
            +            ),
            +        3 => array(
            +            '<' => '>'
            +            )
            +    ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        0 => false,
            +        1 => false,
            +        2 => false,
            +        3 => true
            +        ),
            +    'TAB_WIDTH' => 4
            +);
            diff --git a/vendor/easybook/geshi/geshi/mysql.php b/vendor/easybook/geshi/geshi/mysql.php
            new file mode 100644
            index 0000000000..d21f96a737
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/mysql.php
            @@ -0,0 +1,474 @@
            + 'MySQL',
            +    //'COMMENT_SINGLE' => array(1 =>'--', 2 => '#'),    // '--' MUST be folowed by whitespace,not necessarily a space
            +    'COMMENT_SINGLE' => array(
            +        1 =>'-- ',
            +        2 => '#'
            +        ),
            +    'COMMENT_REGEXP' => array(
            +        1 => "/(?:--\s).*?$/",                          // double dash followed by any whitespace
            +        ),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,            // @@@ would be nice if this could be defined per group!
            +    'QUOTEMARKS' => array("'", '"', '`'),
            +    'ESCAPE_CHAR' => '\\',                              // by default only, can be specified
            +    'ESCAPE_REGEXP' => array(
            +        1 => "/[_%]/",                                  // search wildcards
            +        ),
            +    'NUMBERS' =>
            +        GESHI_NUMBER_INT_BASIC |
            +        GESHI_NUMBER_OCT_PREFIX |
            +        GESHI_NUMBER_HEX_PREFIX |
            +        GESHI_NUMBER_FLT_NONSCI |
            +        GESHI_NUMBER_FLT_SCI_SHORT |
            +        GESHI_NUMBER_FLT_SCI_ZERO,
            +    'KEYWORDS' => array(
            +        1 => array(
            +            // Mix: statement keywords and keywords that don't fit in any other
            +            // category, or have multiple usage/meanings
            +            'ACTION','ADD','AFTER','ALGORITHM','ALL','ALTER','ANALYZE','ANY',
            +            'ASC','AS','BDB','BEGIN','BERKELEYDB','BINARY','BTREE','CALL',
            +            'CASCADED','CASCADE','CHAIN','CHANGE','CHECK','COLUMNS','COLUMN',
            +            'COMMENT','COMMIT','COMMITTED','CONSTRAINT','CONTAINS SQL',
            +            'CONSISTENT','CONVERT','CREATE','CROSS','DATA','DATABASES',
            +            'DECLARE','DEFINER','DELAYED','DELETE','DESCRIBE','DESC',
            +            'DETERMINISTIC','DISABLE','DISCARD','DISTINCTROW','DISTINCT','DO',
            +            'DROP','DUMPFILE','DUPLICATE KEY','ENABLE','ENCLOSED BY','ENGINE',
            +            'ERRORS','ESCAPED BY','EXISTS','EXPLAIN','EXTENDED','FIELDS',
            +            'FIRST','FOR EACH ROW','FORCE','FOREIGN KEY','FROM','FULL',
            +            'FUNCTION','GLOBAL','GRANT','GROUP BY','HANDLER','HASH','HAVING',
            +            'HELP','HIGH_PRIORITY','IF NOT EXISTS','IGNORE','IMPORT','INDEX',
            +            'INFILE','INNER','INNODB','INOUT','INTO','INVOKER',
            +            'ISOLATION LEVEL','JOIN','KEYS','KEY','KILL','LANGUAGE SQL','LAST',
            +            'LIMIT','LINES','LOAD','LOCAL','LOCK','LOW_PRIORITY',
            +            'MASTER_SERVER_ID','MATCH','MERGE','MIDDLEINT','MODIFIES SQL DATA',
            +            'MODIFY','MRG_MYISAM','NATURAL','NEXT','NO SQL','NO','ON',
            +            'OPTIMIZE','OPTIONALLY','OPTION','ORDER BY','OUTER','OUTFILE','OUT',
            +            'PARTIAL','PARTITION','PREV','PRIMARY KEY','PRIVILEGES','PROCEDURE',
            +            'PURGE','QUICK','READS SQL DATA','READ','REFERENCES','RELEASE',
            +            'RENAME','REORGANIZE','REPEATABLE','REQUIRE','RESTRICT','RETURNS',
            +            'REVOKE','ROLLBACK','ROUTINE','RTREE','SAVEPOINT','SELECT',
            +            'SERIALIZABLE','SESSION','SET','SHARE MODE','SHOW','SIMPLE',
            +            'SNAPSHOT','SOME','SONAME','SQL SECURITY','SQL_BIG_RESULT',
            +            'SQL_BUFFER_RESULT','SQL_CACHE','SQL_CALC_FOUND_ROWS',
            +            'SQL_NO_CACHE','SQL_SMALL_RESULT','SSL','START','STARTING BY',
            +            'STATUS','STRAIGHT_JOIN','STRIPED','TABLESPACE','TABLES','TABLE',
            +            'TEMPORARY','TEMPTABLE','TERMINATED BY','TO','TRANSACTIONS',
            +            'TRANSACTION','TRIGGER','TYPES','TYPE','UNCOMMITTED','UNDEFINED',
            +            'UNION','UNLOCK_TABLES','UPDATE','USAGE','USE','USER_RESOURCES',
            +            'USING','VALUES','VALUE','VIEW','WARNINGS','WHERE','WITH ROLLUP',
            +            'WITH','WORK','WRITE',
            +            ),
            +        2 => array(     //No ( must follow
            +            // Mix: statement keywords distinguished from functions by the same name
            +            "CURRENT_USER", "DATABASE", "IN", "INSERT", "DEFAULT", "REPLACE", "SCHEMA", "TRUNCATE"
            +            ),
            +        3 => array(
            +            // Values (Constants)
            +            'FALSE','NULL','TRUE',
            +            ),
            +        4 => array(
            +            // Column Data Types
            +            'BIGINT','BIT','BLOB','BOOLEAN','BOOL','CHARACTER VARYING',
            +            'CHAR VARYING','DATETIME','DECIMAL','DEC','DOUBLE PRECISION',
            +            'DOUBLE','ENUM','FIXED','FLOAT','GEOMETRYCOLLECTION','GEOMETRY',
            +            'INTEGER','INT','LINESTRING','LONGBLOB','LONGTEXT','MEDIUMBLOB',
            +            'MEDIUMINT','MEDIUMTEXT','MULTIPOINT','MULTILINESTRING',
            +            'MULTIPOLYGON','NATIONAL CHARACTER','NATIONAL CHARACTER VARYING',
            +            'NATIONAL CHAR VARYING','NATIONAL VARCHAR','NCHAR VARCHAR','NCHAR',
            +            'NUMERIC','POINT','POLYGON','REAL','SERIAL',
            +            'SMALLINT','TEXT','TIMESTAMP','TINYBLOB','TINYINT',
            +            'TINYTEXT','VARBINARY','VARCHARACTER','VARCHAR',
            +            ),
            +        5 => array(     //No ( must follow
            +            // Column data types distinguished from functions by the same name
            +            "CHAR", "DATE", "TIME"
            +            ),
            +        6 => array(
            +            // Table, Column & Index Attributes
            +            'AUTO_INCREMENT','AVG_ROW_LENGTH','BOTH','CHECKSUM','CONNECTION',
            +            'DATA DIRECTORY','DEFAULT NULL','DELAY_KEY_WRITE','FULLTEXT',
            +            'INDEX DIRECTORY','INSERT_METHOD','LEADING','MAX_ROWS','MIN_ROWS',
            +            'NOT NULL','PACK_KEYS','ROW_FORMAT','SERIAL DEFAULT VALUE','SIGNED',
            +            'SPATIAL','TRAILING','UNIQUE','UNSIGNED','ZEROFILL'
            +            ),
            +        7 => array(     //No ( must follow
            +            // Column attribute distinguished from function by the same name
            +            "CHARSET"
            +            ),
            +        8 => array(
            +            // Date and Time Unit Specifiers
            +            'DAY_HOUR','DAY_MICROSECOND','DAY_MINUTE','DAY_SECOND',
            +            'HOUR_MICROSECOND','HOUR_MINUTE','HOUR_SECOND',
            +            'MINUTE_MICROSECOND','MINUTE_SECOND',
            +            'SECOND_MICROSECOND','YEAR_MONTH'
            +            ),
            +        9 => array(     //No ( must follow
            +            // Date-time unit specifiers distinguished from functions by the same name
            +            "DAY", "HOUR", "MICROSECOND", "MINUTE", "MONTH", "QUARTER", "SECOND", "WEEK", "YEAR"
            +            ),
            +        10 => array(
            +            // Operators (see also Symbols)
            +            'AND','BETWEEN','CHARACTER SET','COLLATE','DIV','IS NOT NULL',
            +            'IS NOT','IS NULL','IS','LIKE','NOT','OFFSET','OR','REGEXP','RLIKE',
            +            'SOUNDS LIKE','XOR'
            +            ),
            +        11 => array(     //No ( must follow
            +            // Operator distinghuished from function by the same name
            +            "INTERVAL"
            +            ),
            +        12 => array(
            +            // Control Flow (functions)
            +            'CASE','ELSE','END','IFNULL','IF','NULLIF','THEN','WHEN',
            +            ),
            +        13 => array(
            +            // String Functions
            +            'ASCII','BIN','BIT_LENGTH','CHAR_LENGTH','CHARACTER_LENGTH',
            +            'CONCAT_WS','CONCAT','ELT','EXPORT_SET','FIELD',
            +            'FIND_IN_SET','FORMAT','HEX','INSTR','LCASE','LEFT','LENGTH',
            +            'LOAD_FILE','LOCATE','LOWER','LPAD','LTRIM','MAKE_SET','MID',
            +            'OCTET_LENGTH','ORD','POSITION','QUOTE','REPEAT','REVERSE',
            +            'RIGHT','RPAD','RTRIM','SOUNDEX','SPACE','STRCMP','SUBSTRING_INDEX',
            +            'SUBSTRING','TRIM','UCASE','UNHEX','UPPER',
            +            ),
            +        14 => array(     //A ( must follow
            +            // String functions distinguished from other keywords by the same name
            +            "INSERT", "REPLACE", "CHAR"
            +            ),
            +        15 => array(
            +            // Numeric Functions
            +            'ABS','ACOS','ASIN','ATAN2','ATAN','CEILING','CEIL',
            +            'CONV','COS','COT','CRC32','DEGREES','EXP','FLOOR','LN','LOG10',
            +            'LOG2','LOG','MOD','OCT','PI','POWER','POW','RADIANS','RAND',
            +            'ROUND','SIGN','SIN','SQRT','TAN',
            +            ),
            +        16 => array(     //A ( must follow
            +            // Numeric function distinguished from other keyword by the same name
            +            "TRUNCATE"
            +            ),
            +        17 => array(
            +            // Date and Time Functions
            +            'ADDDATE','ADDTIME','CONVERT_TZ','CURDATE','CURRENT_DATE',
            +            'CURRENT_TIME','CURRENT_TIMESTAMP','CURTIME','DATE_ADD',
            +            'DATE_FORMAT','DATE_SUB','DATEDIFF','DAYNAME','DAYOFMONTH',
            +            'DAYOFWEEK','DAYOFYEAR','EXTRACT','FROM_DAYS','FROM_UNIXTIME',
            +            'GET_FORMAT','LAST_DAY','LOCALTIME','LOCALTIMESTAMP','MAKEDATE',
            +            'MAKETIME','MONTHNAME','NOW','PERIOD_ADD',
            +            'PERIOD_DIFF','SEC_TO_TIME','STR_TO_DATE','SUBDATE','SUBTIME',
            +            'SYSDATE','TIME_FORMAT','TIME_TO_SEC',
            +            'TIMESTAMPADD','TIMESTAMPDIFF','TO_DAYS',
            +            'UNIX_TIMESTAMP','UTC_DATE','UTC_TIME','UTC_TIMESTAMP','WEEKDAY',
            +            'WEEKOFYEAR','YEARWEEK',
            +            ),
            +        18 => array(     //A ( must follow
            +            // Date-time functions distinguished from other keywords by the same name
            +            "DATE", "DAY", "HOUR", "MICROSECOND", "MINUTE", "MONTH", "QUARTER",
            +            "SECOND", "TIME", "WEEK", "YEAR"
            +            ),
            +        19 => array(
            +            // Comparison Functions
            +            'COALESCE','GREATEST','ISNULL','LEAST',
            +            ),
            +        20 => array(     //A ( must follow
            +            // Comparison functions distinguished from other keywords by the same name
            +            "IN", "INTERVAL"
            +            ),
            +        21 => array(
            +            // Encryption and Compression Functions
            +            'AES_DECRYPT','AES_ENCRYPT','COMPRESS','DECODE','DES_DECRYPT',
            +            'DES_ENCRYPT','ENCODE','ENCRYPT','MD5','OLD_PASSWORD','PASSWORD',
            +            'SHA1','SHA','UNCOMPRESS','UNCOMPRESSED_LENGTH',
            +            ),
            +        22 => array(
            +            // GROUP BY (aggregate) Functions
            +            'AVG','BIT_AND','BIT_OR','BIT_XOR','COUNT','GROUP_CONCAT',
            +            'MAX','MIN','STDDEV_POP','STDDEV_SAMP','STDDEV','STD','SUM',
            +            'VAR_POP','VAR_SAMP','VARIANCE',
            +            ),
            +        23 => array(
            +            // Information Functions
            +            'BENCHMARK','COERCIBILITY','COLLATION','CONNECTION_ID',
            +            'FOUND_ROWS','LAST_INSERT_ID','ROW_COUNT',
            +            'SESSION_USER','SYSTEM_USER','USER','VERSION',
            +            ),
            +        24 => array(     //A ( must follow
            +            // Information functions distinguished from other keywords by the same name
            +            "CURRENT_USER", "DATABASE", "SCHEMA", "CHARSET"
            +            ),
            +        25 => array(
            +            // Miscellaneous Functions
            +            'ExtractValue','BIT_COUNT','GET_LOCK','INET_ATON','INET_NTOA',
            +            'IS_FREE_LOCK','IS_USED_LOCK','MASTER_POS_WAIT','NAME_CONST',
            +            'RELEASE_LOCK','SLEEP','UpdateXML','UUID',
            +            ),
            +        26 => array(     //A ( must follow
            +            // Miscellaneous function distinguished from other keyword by the same name
            +            "DEFAULT"
            +            ),
            +        27 => array(
            +            // Geometry Functions
            +            'Area','AsBinary','AsText','AsWKB','AsWKT','Boundary','Buffer',
            +            'Centroid','Contains','ConvexHull','Crosses',
            +            'Difference','Dimension','Disjoint','Distance',
            +            'EndPoint','Envelope','Equals','ExteriorRing',
            +            'GLength','GeomCollFromText','GeomCollFromWKB','GeomFromText',
            +            'GeomFromWKB','GeometryCollectionFromText',
            +            'GeometryCollectionFromWKB','GeometryFromText','GeometryFromWKB',
            +            'GeometryN','GeometryType',
            +            'InteriorRingN','Intersection','Intersects','IsClosed','IsEmpty',
            +            'IsRing','IsSimple',
            +            'LineFromText','LineFromWKB','LineStringFromText',
            +            'LineStringFromWKB',
            +            'MBRContains','MBRDisjoint','MBREqual','MBRIntersects',
            +            'MBROverlaps','MBRTouches','MBRWithin','MLineFromText',
            +            'MLineFromWKB','MPointFromText','MPointFromWKB','MPolyFromText',
            +            'MPolyFromWKB','MultiLineStringFromText','MultiLineStringFromWKB',
            +            'MultiPointFromText','MultiPointFromWKB','MultiPolygonFromText',
            +            'MultiPolygonFromWKB',
            +            'NumGeometries','NumInteriorRings','NumPoints',
            +            'Overlaps',
            +            'PointFromText','PointFromWKB','PointN','PointOnSurface',
            +            'PolyFromText','PolyFromWKB','PolygonFromText','PolygonFromWKB',
            +            'Related','SRID','StartPoint','SymDifference',
            +            'Touches',
            +            'Union',
            +            'Within',
            +            'X',
            +            'Y',
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        1 => array(
            +            /* Operators */
            +            '=', ':=',                                      // assignment operators
            +            '||', '&&', '!',                                // locical operators
            +            '=', '<=>', '>=', '>', '<=', '<', '<>', '!=',   // comparison operators
            +            '|', '&', '^', '~', '<<', '>>',                 // bitwise operators
            +            '-', '+', '*', '/', '%',                        // numerical operators
            +            ),
            +        2 => array(
            +            /* Other syntactical symbols */
            +            '(', ')',
            +            ',', ';',
            +            ),
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        5 => false,
            +        6 => false,
            +        7 => false,
            +        8 => false,
            +        9 => false,
            +        10 => false,
            +        11 => false,
            +        12 => false,
            +        13 => false,
            +        13 => false,
            +        14 => false,
            +        15 => false,
            +        16 => false,
            +        17 => false,
            +        18 => false,
            +        19 => false,
            +        20 => false,
            +        21 => false,
            +        22 => false,
            +        23 => false,
            +        24 => false,
            +        25 => false,
            +        26 => false,
            +        27 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #990099; font-weight: bold;',      // mix
            +            2 => 'color: #990099; font-weight: bold;',      // mix
            +            3 => 'color: #9900FF; font-weight: bold;',      // constants
            +            4 => 'color: #999900; font-weight: bold;',      // column data types
            +            5 => 'color: #999900; font-weight: bold;',      // column data types
            +            6 => 'color: #FF9900; font-weight: bold;',      // attributes
            +            7 => 'color: #FF9900; font-weight: bold;',      // attributes
            +            8 => 'color: #9900FF; font-weight: bold;',      // date-time units
            +            9 => 'color: #9900FF; font-weight: bold;',      // date-time units
            +
            +            10 => 'color: #CC0099; font-weight: bold;',      // operators
            +            11 => 'color: #CC0099; font-weight: bold;',      // operators
            +
            +            12 => 'color: #009900;',     // control flow (functions)
            +            13 => 'color: #000099;',     // string functions
            +            14 => 'color: #000099;',     // string functions
            +            15 => 'color: #000099;',     // numeric functions
            +            16 => 'color: #000099;',     // numeric functions
            +            17 => 'color: #000099;',     // date-time functions
            +            18 => 'color: #000099;',     // date-time functions
            +            19 => 'color: #000099;',     // comparison functions
            +            20 => 'color: #000099;',     // comparison functions
            +            21 => 'color: #000099;',     // encryption functions
            +            22 => 'color: #000099;',     // aggregate functions
            +            23 => 'color: #000099;',     // information functions
            +            24 => 'color: #000099;',     // information functions
            +            25 => 'color: #000099;',     // miscellaneous functions
            +            26 => 'color: #000099;',     // miscellaneous functions
            +            27 => 'color: #00CC00;',     // geometry functions
            +            ),
            +        'COMMENTS' => array(
            +            'MULTI' => 'color: #808000; font-style: italic;',
            +            1 => 'color: #808080; font-style: italic;',
            +            2 => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #004000; font-weight: bold;',
            +            1 => 'color: #008080; font-weight: bold;'       // search wildcards
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #FF00FF;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #008000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #008080;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            1 => 'color: #CC0099;',         // operators
            +            2 => 'color: #000033;',         // syntax
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => 'http://search.oracle.com/search/search?group=MySQL&q={FNAME}',
            +        2 => 'http://search.oracle.com/search/search?group=MySQL&q={FNAME}',
            +        3 => 'http://search.oracle.com/search/search?group=MySQL&q={FNAME}',
            +        4 => 'http://search.oracle.com/search/search?group=MySQL&q={FNAME}',
            +        5 => 'http://search.oracle.com/search/search?group=MySQL&q={FNAME}',
            +        6 => 'http://search.oracle.com/search/search?group=MySQL&q={FNAME}',
            +        7 => 'http://search.oracle.com/search/search?group=MySQL&q={FNAME}',
            +        8 => 'http://search.oracle.com/search/search?group=MySQL&q={FNAME}',
            +        9 => 'http://search.oracle.com/search/search?group=MySQL&q={FNAME}',
            +
            +        10 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/non-typed-operators.html',
            +        11 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/non-typed-operators.html',
            +
            +        12 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/control-flow-functions.html',
            +        13 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/string-functions.html',
            +        14 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/string-functions.html',
            +        15 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/numeric-functions.html',
            +        16 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/numeric-functions.html',
            +        17 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/date-and-time-functions.html',
            +        18 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/date-and-time-functions.html',
            +        19 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/comparison-operators.html',
            +        20 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/comparison-operators.html',
            +        21 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/encryption-functions.html',
            +        22 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/group-by-functions-and-modifiers.html',
            +        23 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/information-functions.html',
            +        24 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/information-functions.html',
            +        25 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/func-op-summary-ref.html',
            +        26 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/func-op-summary-ref.html',
            +        27 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/analysing-spatial-information.html',
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4,
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            2 => array(
            +                'DISALLOWED_AFTER' => '(?![\(\w])'
            +                ),
            +            5 => array(
            +                'DISALLOWED_AFTER' => '(?![\(\w])'
            +                ),
            +            7 => array(
            +                'DISALLOWED_AFTER' => '(?![\(\w])'
            +                ),
            +            9 => array(
            +                'DISALLOWED_AFTER' => '(?![\(\w])'
            +                ),
            +            11 => array(
            +                'DISALLOWED_AFTER' => '(?![\(\w])'
            +                ),
            +
            +            14 => array(
            +                'DISALLOWED_AFTER' => '(?=\()'
            +                ),
            +            16 => array(
            +                'DISALLOWED_AFTER' => '(?=\()'
            +                ),
            +            18 => array(
            +                'DISALLOWED_AFTER' => '(?=\()'
            +                ),
            +            20 => array(
            +                'DISALLOWED_AFTER' => '(?=\()'
            +                ),
            +            24 => array(
            +                'DISALLOWED_AFTER' => '(?=\()'
            +                ),
            +            26 => array(
            +                'DISALLOWED_AFTER' => '(?=\()'
            +                )
            +            )
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/nagios.php b/vendor/easybook/geshi/geshi/nagios.php
            new file mode 100644
            index 0000000000..47254311ce
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/nagios.php
            @@ -0,0 +1,223 @@
            +
            + * Copyright: (c) 2012 Albéric de Pertat (https://github.com/adepertat/geshi-nagios)
            + * Release Version: 1.0.8.11
            + * Date Started: 2012/01/19
            + *
            + * Nagios language file for GeSHi.
            + *
            + * CHANGES
            + * -------
            + * 2012/01/19 (1.0.0)
            + *  -  First Release
            + *
            + * TODO (updated 2012/01/19)
            + * -------------------------
            + *
            + *************************************************************************************
            + *
            + *     This file is part of GeSHi.
            + *
            + *   GeSHi is free software; you can redistribute it and/or modify
            + *   it under the terms of the GNU General Public License as published by
            + *   the Free Software Foundation; either version 2 of the License, or
            + *   (at your option) any later version.
            + *
            + *   GeSHi is distributed in the hope that it will be useful,
            + *   but WITHOUT ANY WARRANTY; without even the implied warranty of
            + *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
            + *   GNU General Public License for more details.
            + *
            + *   You should have received a copy of the GNU General Public License
            + *   along with GeSHi; if not, write to the Free Software
            + *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
            + *
            + ************************************************************************************/
            +
            +$language_data = array(
            +    'LANG_NAME' => 'Nagios',
            +    'COMMENT_SINGLE' => array(1 => ';', 2 => '#'),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'HARDQUOTE' => array("'", "'"),
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '\'',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'define'
            +            ),
            +        2 => array(
            +            'command', 'contact', 'contactgroup', 'host', 'hostdependency',
            +            'hostescalation', 'hostextinfo', 'hostgroup', 'service',
            +            'servicedependency', 'serviceescalation',
            +            'serviceextinfo', 'servicegroup', 'timeperiod'
            +            ),
            +        3 => array(
            +            'active_checks_enabled', 'passive_checks_enabled', 'alias',
            +            'display_name', 'host_name', 'address', 'hostgroups', 'parents',
            +            'hostgroup_members', 'members', 'service_description',
            +            'servicegroups', 'is_volatile', 'servicegroup_name',
            +            'servicegroup_members', 'contact_name', 'contactgroups', 'email',
            +            'pager', 'can_submit_commands', 'contactgroup_name',
            +            'contactgroup_members', 'host_notifications_enabled',
            +            'service_notifications_enabled', 'host_notification_period',
            +            'service_notification_period', 'host_notification_options',
            +            'service_notification_options', 'host_notification_commands',
            +            'service_notification_commands', 'check_command',
            +            'check_freshness', 'check_interval', 'check_period', 'contacts',
            +            'contact_groups', 'event_handler', 'event_handler_enabled',
            +            'flap_detection_enabled', 'flap_detection_options',
            +            'freshness_threshold', 'initial_state', 'low_flap_threshold',
            +            'high_flap_threshold', 'max_check_attempts',
            +            'notification_interval', 'first_notification_delay',
            +            'notification_period', 'notification_options',
            +            'notifications_enabled', 'stalking_options', 'notes', 'notes_url',
            +            'action_url', 'icon_image', 'icon_image_alt', 'vrml_image',
            +            'statusmap_image', '2d_coords', '3d_coords', 'obsess_over_host',
            +            'obsess_over_hostver_service', 'process_perf_data',
            +            'retain_status_information', 'retain_nonstatus_information',
            +            'retry_interval', 'register', 'use', 'name', 'timeperiod_name',
            +            'exclude', 'command_name', 'command_line', 'dependent_host_name',
            +            'dependent_hostgroup_name', 'dependent_service_description',
            +            'inherits_parent', 'execution_failure_criteria',
            +            'notification_failure_criteria', 'dependency_period',
            +            'first_notification', 'last_notification', 'escalation_period',
            +            'escalation_options'
            +            ),
            +        4 => array(
            +            'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday',
            +            'sunday', 'january', 'february', 'march', 'april', 'may', 'june',
            +            'july', 'august', 'september', 'october', 'november', 'december',
            +            'day'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        0 => array(
            +            '{', '}', ',', '+'
            +            )
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'font-weight:bold;color:#FFDCA8;',
            +            2 => 'font-weight:bold;color #FFA858;',
            +            3 => 'font-weight:bold;color:#00C0C0;',
            +            4 => 'font-weight:bold;color:#C0C0FF;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'font-weight:bold;color:#000000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => ''
            +            ),
            +        'COMMENTS' => array(
            +            0 => 'color: #AAAAAA; font-style: italic;',
            +            1 => 'color: #AAAAAA; font-style: italic;',
            +            2 => 'color: #AAAAAA; font-style: italic;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #660066;',
            +            'HARD' => 'color: #660066;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #006600;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'font-weight:bold;color:#808080;',
            +            1 => 'font-weight:bold;color:#000080;',
            +            2 => 'font-weight:bold;color:red;',
            +            3 => 'font-weight:bold;color:#808000;',
            +            4 => 'font-weight:bold;color:blue;',
            +            5 => 'font-weight:bold;color:#C0FFC0;',
            +            ),
            +        'SCRIPT' => array(
            +            0 => '',
            +            )
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '\\'
            +        ),
            +    'REGEXPS' => array(
            +        // Custom macros
            +        0 => array(
            +            GESHI_SEARCH => '(\$[a-zA-Z_]+\$)',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => '',
            +            ),
            +        // Custom macro definitions
            +        1 => array(
            +            GESHI_SEARCH => '(\A|\s)(_[a-zA-Z_]+)',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => '',
            +            ),
            +        // $USERxx$
            +        2 => array(
            +            GESHI_SEARCH => '(\$USER[0-9]+\$)',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => '',
            +            ),
            +        // $ARGxx$
            +        3 => array(
            +            GESHI_SEARCH => '(\$ARG[1-9]\$)',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => '',
            +            ),
            +        // register 0
            +        4 => array(
            +            GESHI_SEARCH => '(\bregister[\\x20\\t]+[01])',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => '',
            +            ),
            +        // use
            +        5 => array(
            +            GESHI_SEARCH => '(use[\\x20\\t]+[^\\x20\\t]+)([\\x20\\t]*[$;#])',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => '',
            +            ),
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        0 => false
            +        ),
            +    'TAB_WIDTH' => 4,
            +    'PARSER_CONTROL' => array(
            +        'ENABLE_FLAGS' => array(
            +            'NUMBERS' => GESHI_NEVER
            +            )
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/netrexx.php b/vendor/easybook/geshi/geshi/netrexx.php
            new file mode 100644
            index 0000000000..b038aa4d51
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/netrexx.php
            @@ -0,0 +1,161 @@
            + 'NetRexx',
            +    'COMMENT_SINGLE' => array(1 => '--'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'class', 'do', 'exit', 'if', 'import', 'iterate', 'leave',
            +            'loop', 'nop', 'numeric', 'package', 'parse', 'properties',
            +            'return', 'say', 'select', 'signal', 'trace'
            +            ),
            +        2 => array(
            +            'abstract', 'adapter', 'all', 'ask', 'binary', 'case',
            +            'constant', 'dependent', 'deprecated', 'extends', 'final',
            +            'implements', 'inheritable', 'interface', 'label', 'methods',
            +            'native', 'off', 'private', 'protect', 'public', 'results',
            +            'returns', 'shared', 'signals', 'source', 'static',
            +            'transient', 'unused', 'uses', 'version', 'volatile'
            +            ),
            +        3 => array(
            +            'catch', 'else', 'end', 'finally', 'otherwise', 'then', 'when'
            +            ),
            +        4 => array(
            +            'rc', 'result', 'self', 'sigl', 'super'
            +            ),
            +        5 => array(
            +            'placeholderforoorexxdirectives'
            +            ),
            +        6 => array(
            +            'abbrev', 'abs', 'b2x', 'c2d', 'c2x', 'center', 'centre',
            +            'changestr', 'compare', 'copies', 'copyindexed', 'countstr',
            +            'd2c', 'd2x', 'datatype', 'delstr', 'delword', 'exists',
            +            'formword', 'hashcode', 'insert', 'lastpos', 'left', 'lower',
            +            'max', 'min', 'noteq', 'noteqs', 'opadd', 'opand', 'opcc',
            +            'opccblank', 'opdiv', 'opdivi', 'opeq', 'opeqs', 'opgt',
            +            'opgteq', 'opgteqs', 'opgts', 'oplt', 'oplteq', 'oplteqs',
            +            'oplts', 'opminus', 'opmult', 'opnot', 'opor', 'opplus',
            +            'oppow', 'oprem', 'opsub', 'opxor', 'overlay', 'pos position',
            +            'reverse', 'right', 'sequence', 'setdigits', 'setform',
            +            'sign', 'space', 'strip', 'substr', 'subword', 'toboolean',
            +            'tobyte', 'tochar', 'todouble', 'tofloat', 'toint', 'tolong',
            +            'toshort', 'tostring', 'translate', 'trunc', 'upper',
            +            'verify', 'word', 'wordindex', 'wordlength', 'wordpos',
            +            'words', 'x2b', 'x2c', 'x2d'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '<', '>', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':',
            +        '<', '>'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => true,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        5 => false,
            +        6 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;',
            +            2 => 'color: #ff0000; font-weight: bold;',
            +            3 => 'color: #00ff00; font-weight: bold;',
            +            4 => 'color: #0000ff; font-weight: bold;',
            +            5 => 'color: #880088; font-weight: bold;',
            +            6 => 'color: #888800; font-weight: bold;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666;',
            +            'MULTI' => 'color: #808080;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #202020;',
            +            2 => 'color: #202020;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => '',
            +        6 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4
            +);
            diff --git a/vendor/easybook/geshi/geshi/newlisp.php b/vendor/easybook/geshi/geshi/newlisp.php
            new file mode 100644
            index 0000000000..2e064743e1
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/newlisp.php
            @@ -0,0 +1,190 @@
            + 'newlisp',
            +    'COMMENT_SINGLE' => array(1 => ';', 2 => '#'),
            +    'COMMENT_MULTI' => array('[text]' => '[/text]', '{' => '}'), // also used for strings
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'NUMBERS' => GESHI_NUMBER_INT_BASIC |  GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_SCI_ZERO,
            +    'TAB_WIDTH' => 2,
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'NaN?','abort','abs','acos','acosh','add','address','amb','and',
            +            'append','append-file','apply','args','array','array-list','array?',
            +            'asin','asinh','assoc','atan','atan2','atanh','atom?','base64-dec',
            +            'base64-enc','bayes-query','bayes-train','begin','beta','betai',
            +            'bind','binomial','bits','callback','case','catch','ceil',
            +            'change-dir','char','chop','clean','close','command-event','cond',
            +            'cons','constant','context','context?','copy','copy-file','cos',
            +            'cosh','count','cpymem','crc32','crit-chi2','crit-z','current-line',
            +            'curry','date','date-value','debug','dec','def-new','default',
            +            'define','define-macro','delete','delete-file','delete-url',
            +            'destroy','det','device','difference','directory','directory?',
            +            'div','do-until','do-while','doargs','dolist','dostring','dotimes',
            +            'dotree','dump','dup','empty?','encrypt','ends-with','env','erf',
            +            'error-event','estack','eval','eval-string','exec','exists','exit',
            +            'exp','expand','explode','factor','fft','file-info','file?',
            +            'filter','find','find-all','first','flat','float','float?','floor',
            +            'flt','for','for-all','fork','format','fv','gammai','gammaln','gcd',
            +            'get-char','get-float','get-int','get-long','get-string','get-url',
            +            'global','global?','if','if-not','ifft','import','inc','index',
            +            'inf?','int','integer','integer?','intersect','invert','irr','join',
            +            'lambda','lambda?','last','last-error','legal?','length','let',
            +            'letex','letn','list','list?','load','local','log','lookup',
            +            'lower-case','macro?','main-args','make-dir','map','mat','match',
            +            'max','member','min','mod','mul','multiply','name','net-accept',
            +            'net-close','net-connect','net-error','net-eval','net-interface',
            +            'net-listen','net-local','net-lookup','net-peek','net-peer',
            +            'net-ping','net-receive','net-receive-from','net-receive-udp',
            +            'net-select','net-send','net-send-to','net-send-udp','net-service',
            +            'net-sessions','new','nil','nil?','normal','not','now','nper','npv',
            +            'nth','null?','number?','open','or','pack','parse','parse-date',
            +            'peek','pipe','pmt','pop','pop-assoc','post-url','pow',
            +            'pretty-print','primitive?','print','println','prob-chi2','prob-z',
            +            'process','prompt-event','protected?','push','put-url','pv','quote',
            +            'quote?','rand','random','randomize','read-buffer','read-char',
            +            'read-expr','read-file','read-key','read-line','read-utf8',
            +            'real-path','receive','ref','ref-all','regex','regex-comp',
            +            'remove-dir','rename-file','replace','reset','rest','reverse',
            +            'rotate','round','save','search','seed','seek','select','semaphore',
            +            'send','sequence','series','set','set-locale','set-ref',
            +            'set-ref-all','setf','setq','sgn','share','signal','silent','sin',
            +            'sinh','sleep','slice','sort','source','spawn','sqrt','starts-with',
            +            'string','string?','sub','swap','sym','symbol?','symbols','sync',
            +            'sys-error','sys-info','tan','tanh','throw','throw-error','time',
            +            'time-of-day','timer','title-case','trace','trace-highlight',
            +            'transpose','trim','true','true?','unicode','unify','unique',
            +            'unless','unpack','until','upper-case','utf8','utf8len','uuid',
            +            'wait-pid','when','while','write-buffer','write-char','write-file',
            +            'write-line','xfer-event','xml-error','xml-parse','xml-type-tags',
            +            'zero?'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        0 => array(
            +            '(', ')','\''
            +            ),
            +        1 => array(
            +            '!','!=','$','%','&','*','+','-','/',':',
            +            '<','<<','<=','=','>','>=','>>','^','|'
            +            )
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0000AA;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;',
            +            2 => 'color: #808080; font-style: italic;',
            +            'MULTI' => 'color: #00aa00; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #777700;'
            +            ),
            +        'METHODS' => array(
            +            0 => 'color: #000099;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #AA0000;',
            +            1 => 'color: #0000AA;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #00aa00;',
            +            1 => 'color: #00aa00;',
            +            2 => 'color: #00aa00;',
            +            3 => 'color: #00aa00;',
            +            4 => 'color: #00aa00;',
            +            5 => 'color: #AA0000;'
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => 'http://www.newlisp.org/downloads/newlisp_manual.html#{FNAME}'
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(':'),
            +    'REGEXPS' => array(
            +        // tags in newlispdoc
            +        0 => "\s+@\S*?\s+",
            +        // dollar sign symbols
            +        1 => "[\\$]\w*",
            +        // curly-braced string literals
            +        2 => "{[^{}]*?}",
            +        // [text] multi-line strings
            +        3 => "(?s)\[text\].*\[\/text\](?-s)",
            +        // [code] multi-line blocks
            +        4 => "(?s)\[code\].*\[\/code\](?-s)",
            +        // variable references
            +        5 => "'[\w\-]+"
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'PARSER_CONTROL' => array(
            +        'OOLANG' => array(
            +            'MATCH_AFTER' => '[a-zA-Z][a-zA-Z0-9_\-]*'
            +            ),
            +        'KEYWORDS' => array(
            +            'DISALLOWED_BEFORE' => '(?<=[^\w\-])',
            +            )
            +        ),
            +
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/nginx.php b/vendor/easybook/geshi/geshi/nginx.php
            new file mode 100644
            index 0000000000..0d4fe3b4f9
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/nginx.php
            @@ -0,0 +1,868 @@
            + 'nginx',
            +    'COMMENT_SINGLE' => array(1 => '#'),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array( // core module
            +            // http://wiki.nginx.org/CoreModule
            +            // http://nginx.org/en/docs/ngx_core_module.html
            +            'daemon',
            +            'debug_points',
            +            'env',
            +            'error_log',
            +            'events',
            +            'include',
            +            'lock_file',
            +            'master_process',
            +            'pcre_jit',
            +            'pid',
            +            'ssl_engine',
            +            'timer_resolution',
            +            'user',
            +            'worker_cpu_affinity',
            +            'worker_priority',
            +            'worker_processes',
            +            'worker_rlimit_core',
            +            'worker_rlimit_nofile',
            +            'worker_rlimit_sigpending',
            +            'working_directory',
            +            // see EventsModule due to organization of wiki
            +            //'accept_mutex',
            +            //'accept_mutex_delay',
            +            //'debug_connection',
            +            //'multi_accept',
            +            //'use',
            +            //'worker_connections',
            +            ),
            +        2 => array( // events module
            +            // http://wiki.nginx.org/EventsModule
            +            // http://nginx.org/en/docs/ngx_core_module.html
            +            'accept_mutex',
            +            'accept_mutex_delay',
            +            'debug_connection',
            +            'devpoll_changes',
            +            'devpoll_events',
            +            'kqueue_changes',
            +            'kqueue_events',
            +            'epoll_events',
            +            'multi_accept',
            +            'rtsig_signo',
            +            'rtsig_overflow_events',
            +            'rtsig_overflow_test',
            +            'rtsig_overflow_threshold',
            +            'use',
            +            'worker_connections',
            +            ),
            +        3 => array( // http module
            +            // http://wiki.nginx.org/HttpCoreModule
            +            // http://nginx.org/en/docs/http/ngx_http_core_module.html
            +            'aio',
            +            'alias',
            +            'chunked_transfer_encoding',
            +            'client_body_buffer_size',
            +            'client_body_in_file_only',
            +            'client_body_in_single_buffer',
            +            'client_body_temp_path',
            +            'client_body_timeout',
            +            'client_header_buffer_size',
            +            'client_header_timeout',
            +            'client_max_body_size',
            +            'connection_pool_size',
            +            'default_type',
            +            'directio',
            +            'directio_alignment',
            +            'disable_symlinks',
            +            'error_page',
            +            'etag',
            +            'http',
            +            'if_modified_since',
            +            'ignore_invalid_headers',
            +            'internal',
            +            'keepalive_disable',
            +            'keepalive_requests',
            +            'keepalive_timeout',
            +            'large_client_header_buffers',
            +            'limit_except',
            +            'limit_rate',
            +            'limit_rate_after',
            +            'lingering_close',
            +            'lingering_time',
            +            'lingering_timeout',
            +            'listen',
            +            'location',
            +            'log_not_found',
            +            'log_subrequest',
            +            'max_ranges',
            +            'merge_slashes',
            +            'msie_padding',
            +            'msie_refresh',
            +            'open_file_cache',
            +            'open_file_cache_errors',
            +            'open_file_cache_min_uses',
            +            'open_file_cache_valid',
            +            'optimize_server_names',
            +            'port_in_redirect',
            +            'postpone_output',
            +            'read_ahead',
            +            'recursive_error_pages',
            +            'request_pool_size',
            +            'reset_timedout_connection',
            +            'resolver',
            +            'resolver_timeout',
            +            'root',
            +            'satisfy',
            +            'satisfy_any',
            +            'send_lowat',
            +            'send_timeout',
            +            'sendfile',
            +            'sendfile_max_chunk',
            +            'server',
            +            'server_name',
            +            'server_name_in_redirect',
            +            'server_names_hash_bucket_size',
            +            'server_names_hash_max_size',
            +            'server_tokens',
            +            'tcp_nodelay',
            +            'tcp_nopush',
            +            'try_files',
            +            'types',
            +            'types_hash_bucket_size',
            +            'types_hash_max_size',
            +            'underscores_in_headers',
            +            'variables_hash_bucket_size',
            +            'variables_hash_max_size',
            +            ),
            +        4 => array( // upstream module
            +            // http://wiki.nginx.org/HttpUpstreamModule
            +            // http://nginx.org/en/docs/http/ngx_http_upstream_module.html
            +            'ip_hash',
            +            'keepalive',
            +            'least_conn',
            +            // Use the documentation from the core module since every conf will have at least one of those.
            +            //'server',
            +            'upstream',
            +            ),
            +        5 => array( // access module
            +            // http://wiki.nginx.org/HttpAccessModule
            +            // http://nginx.org/en/docs/http/ngx_http_access_module.html
            +            'deny',
            +            'allow',
            +            ),
            +        6 => array( // auth basic module
            +            // http://wiki.nginx.org/HttpAuthBasicModule
            +            // http://nginx.org/en/docs/http/ngx_http_auth_basic_module.html
            +            'auth_basic',
            +            'auth_basic_user_file'
            +            ),
            +        7 => array( // auto index module
            +            // http://wiki.nginx.org/HttpAutoindexModule
            +            // http://nginx.org/en/docs/http/ngx_http_autoindex_module.html
            +            'autoindex',
            +            'autoindex_exact_size',
            +            'autoindex_localtime',
            +            ),
            +        8 => array( // browser module
            +            // http://wiki.nginx.org/HttpBrowserModule
            +            // http://nginx.org/en/docs/http/ngx_http_browser_module.html
            +            'ancient_browser',
            +            'ancient_browser_value',
            +            'modern_browser',
            +            'modern_browser_value',
            +            ),
            +        9 => array( // charset module
            +            // http://wiki.nginx.org/HttpCharsetModule
            +            // http://nginx.org/en/docs/http/ngx_http_charset_module.html
            +            'charset',
            +            'charset_map',
            +            'charset_types',
            +            'override_charset',
            +            'source_charset',
            +            ),
            +        10 => array( // empty gif module
            +            // http://wiki.nginx.org/HttpEmptyGifModule
            +            // http://nginx.org/en/docs/http/ngx_http_empty_gif_module.html
            +            'empty_gif',
            +            ),
            +        11 => array( // fastcgi module
            +            // http://wiki.nginx.org/HttpFastcgiModule
            +            // http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html
            +            'fastcgi_bind',
            +            'fastcgi_buffer_size',
            +            'fastcgi_buffers',
            +            'fastcgi_busy_buffers_size',
            +            'fastcgi_cache',
            +            'fastcgi_cache_bypass',
            +            'fastcgi_cache_key',
            +            'fastcgi_cache_lock',
            +            'fastcgi_cache_lock_timeout',
            +            'fastcgi_cache_methods',
            +            'fastcgi_cache_min_uses',
            +            'fastcgi_cache_path',
            +            'fastcgi_cache_use_stale',
            +            'fastcgi_cache_valid',
            +            'fastcgi_connect_timeout',
            +            'fastcgi_hide_header',
            +            'fastcgi_ignore_client_abort',
            +            'fastcgi_ignore_headers',
            +            'fastcgi_index',
            +            'fastcgi_intercept_errors',
            +            'fastcgi_keep_conn',
            +            'fastcgi_max_temp_file_size',
            +            'fastcgi_next_upstream',
            +            'fastcgi_no_cache',
            +            'fastcgi_param',
            +            'fastcgi_pass',
            +            'fastcgi_pass_header',
            +            'fastcgi_pass_request_body',
            +            'fastcgi_pass_request_headers',
            +            'fastcgi_read_timeout',
            +            'fastcgi_redirect_errors',
            +            'fastcgi_send_timeout',
            +            'fastcgi_split_path_info',
            +            'fastcgi_store',
            +            'fastcgi_store_access',
            +            'fastcgi_temp_file_write_size',
            +            'fastcgi_temp_path',
            +            ),
            +        12 => array( // geo module
            +            // http://wiki.nginx.org/HttpGeoModule
            +            // http://nginx.org/en/docs/http/ngx_http_geo_module.html
            +            'geo'
            +            ),
            +        13 => array( // gzip module
            +            // http://wiki.nginx.org/HttpGzipModule
            +            // http://nginx.org/en/docs/http/ngx_http_gzip_module.html
            +            'gzip',
            +            'gzip_buffers',
            +            'gzip_comp_level',
            +            'gzip_disable',
            +            'gzip_min_length',
            +            'gzip_http_version',
            +            'gzip_proxied',
            +            'gzip_types',
            +            'gzip_vary',
            +            ),
            +        14 => array( // headers module
            +            // http://wiki.nginx.org/HttpHeadersModule
            +            // http://nginx.org/en/docs/http/ngx_http_headers_module.html
            +            'add_header',
            +            'expires',
            +            ),
            +        15 => array( // index module
            +            // http://wiki.nginx.org/HttpIndexModule
            +            // http://nginx.org/en/docs/http/ngx_http_index_module.html
            +            'index',
            +            ),
            +        16 => array( // limit requests module
            +            // http://wiki.nginx.org/HttpLimitReqModule
            +            // http://nginx.org/en/docs/http/ngx_http_limit_req_module.html
            +            'limit_req',
            +            'limit_req_log_level',
            +            'limit_req_zone',
            +            ),
            +        17 => array( // referer module
            +            // http://wiki.nginx.org/HttpRefererModule
            +            // http://nginx.org/en/docs/http/ngx_http_referer_module.html
            +            'referer_hash_bucket_size',
            +            'referer_hash_max_size',
            +            'valid_referers',
            +            ),
            +        18 => array( // limit zone module
            +            // deprecated in 1.1.8
            +            // http://wiki.nginx.org/HttpLimitZoneModule
            +            'limit_zone',
            +            // Covered by documentation for ngx_http_limit_conn_module
            +            //'limit_conn',
            +            ),
            +        19 => array( // limit connection module
            +            // http://wiki.nginx.org/HttpLimitConnModule
            +            // http://nginx.org/en/docs/http/ngx_http_limit_conn_module.html
            +            'limit_conn',
            +            'limit_conn_zone',
            +            'limit_conn_log_level',
            +            ),
            +        20 => array( // log module
            +            // http://wiki.nginx.org/HttpLogModule
            +            // http://nginx.org/en/docs/http/ngx_http_log_module.html
            +            'access_log',
            +            'log_format',
            +            // Appears to be deprecated
            +            'log_format_combined',
            +            'open_log_file_cache',
            +            ),
            +        21 => array( // map module
            +            // http://wiki.nginx.org/HttpMapModule
            +            // http://nginx.org/en/docs/http/ngx_http_map_module.html
            +            'map',
            +            'map_hash_max_size',
            +            'map_hash_bucket_size',
            +            ),
            +        22 => array( // memcached module
            +            // http://wiki.nginx.org/HttpMemcachedModule
            +            // http://nginx.org/en/docs/http/ngx_http_memcached_module.html
            +            'memcached_buffer_size',
            +            'memcached_connect_timeout',
            +            'memcached_next_upstream',
            +            'memcached_pass',
            +            'memcached_read_timeout',
            +            'memcached_send_timeout',
            +            ),
            +        23 => array( // proxy module
            +            // http://wiki.nginx.org/HttpProxyModule
            +            // http://nginx.org/en/docs/http/ngx_http_proxy_module.html
            +            'proxy_bind',
            +            'proxy_buffer_size',
            +            'proxy_buffering',
            +            'proxy_buffers',
            +            'proxy_busy_buffers_size',
            +            'proxy_cache',
            +            'proxy_cache_bypass',
            +            'proxy_cache_key',
            +            'proxy_cache_lock',
            +            'proxy_cache_lock_timeout',
            +            'proxy_cache_methods',
            +            'proxy_cache_min_uses',
            +            'proxy_cache_path',
            +            'proxy_cache_use_stale',
            +            'proxy_cache_valid',
            +            'proxy_connect_timeout',
            +            'proxy_cookie_domain',
            +            'proxy_cookie_path',
            +            'proxy_headers_hash_bucket_size',
            +            'proxy_headers_hash_max_size',
            +            'proxy_hide_header',
            +            'proxy_http_version',
            +            'proxy_ignore_client_abort',
            +            'proxy_ignore_headers',
            +            'proxy_intercept_errors',
            +            'proxy_max_temp_file_size',
            +            'proxy_method',
            +            'proxy_next_upstream',
            +            'proxy_no_cache',
            +            'proxy_pass',
            +            'proxy_pass_header',
            +            'proxy_pass_request_body',
            +            'proxy_pass_request_headers',
            +            'proxy_redirect',
            +            'proxy_read_timeout',
            +            'proxy_redirect_errors',
            +            'proxy_send_lowat',
            +            'proxy_send_timeout',
            +            'proxy_set_body',
            +            'proxy_set_header',
            +            'proxy_ssl_session_reuse',
            +            'proxy_store',
            +            'proxy_store_access',
            +            'proxy_temp_file_write_size',
            +            'proxy_temp_path',
            +            'proxy_upstream_fail_timeout',
            +            'proxy_upstream_max_fails',
            +            ),
            +        24 => array( // rewrite module
            +            // http://wiki.nginx.org/HttpRewriteModule
            +            // http://nginx.org/en/docs/http/ngx_http_rewrite_module.html
            +            'break',
            +            'if',
            +            'return',
            +            'rewrite',
            +            'rewrite_log',
            +            'set',
            +            'uninitialized_variable_warn',
            +            ),
            +        25 => array( // ssi module
            +            // http://wiki.nginx.org/HttpSsiModule
            +            // http://nginx.org/en/docs/http/ngx_http_ssi_module.html
            +            'ssi',
            +            'ssi_silent_errors',
            +            'ssi_types',
            +            'ssi_value_length',
            +            ),
            +        26 => array( // user id module
            +            // http://wiki.nginx.org/HttpUseridModule
            +            // http://nginx.org/en/docs/http/ngx_http_userid_module.html
            +            'userid',
            +            'userid_domain',
            +            'userid_expires',
            +            'userid_name',
            +            'userid_p3p',
            +            'userid_path',
            +            'userid_service',
            +            ),
            +        27 => array( // addition module
            +            // http://wiki.nginx.org/HttpAdditionModule
            +            // http://nginx.org/en/docs/http/ngx_http_addition_module.html
            +            'add_before_body',
            +            'add_after_body',
            +            'addition_types',
            +            ),
            +        28 => array( // embedded Perl module
            +            // http://wiki.nginx.org/HttpPerlModule
            +            // http://nginx.org/en/docs/http/ngx_http_perl_module.html
            +            'perl',
            +            'perl_modules',
            +            'perl_require',
            +            'perl_set',
            +            ),
            +        29 => array( // flash video files module
            +            // http://wiki.nginx.org/HttpFlvModule
            +            // http://nginx.org/en/docs/http/ngx_http_flv_module.html
            +            'flv',
            +            ),
            +        30 => array( // gzip precompression module
            +            // http://wiki.nginx.org/HttpGzipStaticModule
            +            // http://nginx.org/en/docs/http/ngx_http_gzip_static_module.html
            +            'gzip_static',
            +            // Removed to remove duplication with ngx_http_gzip_module
            +            //'gzip_http_version',
            +            //'gzip_proxied',
            +            //'gzip_disable',
            +            //'gzip_vary',
            +            ),
            +        31 => array( // random index module
            +            // http://wiki.nginx.org/HttpRandomIndexModule
            +            // http://nginx.org/en/docs/http/ngx_http_random_index_module.html
            +            'random_index',
            +            ),
            +        32 => array( // real ip module
            +            // http://wiki.nginx.org/HttpRealipModule
            +            // http://nginx.org/en/docs/http/ngx_http_realip_module.html
            +            'set_real_ip_from',
            +            'real_ip_header',
            +            'real_ip_recursive',
            +            ),
            +        33 => array( // https module
            +            // http://wiki.nginx.org/HttpSslModule
            +            // http://nginx.org/en/docs/http/ngx_http_ssl_module.html
            +            'ssl',
            +            'ssl_certificate',
            +            'ssl_certificate_key',
            +            'ssl_ciphers',
            +            'ssl_client_certificate',
            +            'ssl_crl',
            +            'ssl_dhparam',
            +            // Use the documentation for the core module since it links to the
            +            // original properly
            +            //'ssl_engine',
            +            'ssl_prefer_server_ciphers',
            +            'ssl_protocols',
            +            'ssl_session_cache',
            +            'ssl_session_timeout',
            +            'ssl_verify_client',
            +            'ssl_verify_depth',
            +            ),
            +        34 => array( // status module
            +            // http://wiki.nginx.org/HttpStubStatusModule
            +            'stub_status',
            +            ),
            +        35 => array( // substitution module
            +            // http://wiki.nginx.org/HttpSubModule
            +            // http://nginx.org/en/docs/http/ngx_http_sub_module.html
            +            'sub_filter',
            +            'sub_filter_once',
            +            'sub_filter_types',
            +            ),
            +        36 => array( // NginxHttpDavModule
            +            // http://wiki.nginx.org/HttpDavModule
            +            // http://nginx.org/en/docs/http/ngx_http_dav_module.html
            +            'dav_access',
            +            'dav_methods',
            +            'create_full_put_path',
            +            'min_delete_depth',
            +            ),
            +        37 => array( // Google performance tools module
            +            // http://wiki.nginx.org/GooglePerftoolsModule
            +            'google_perftools_profiles',
            +            ),
            +        38 => array( // xslt module
            +            // http://wiki.nginx.org/HttpXsltModule
            +            // http://nginx.org/en/docs/http/ngx_http_xslt_module.html
            +            'xslt_entities',
            +            'xslt_param',
            +            'xslt_string_param',
            +            'xslt_stylesheet',
            +            'xslt_types',
            +            ),
            +        39 => array( // uWSGI module
            +            // http://wiki.nginx.org/HttpUwsgiModule
            +            'uwsgi_bind',
            +            'uwsgi_buffer_size',
            +            'uwsgi_buffering',
            +            'uwsgi_buffers',
            +            'uwsgi_busy_buffers_size',
            +            'uwsgi_cache',
            +            'uwsgi_cache_bypass',
            +            'uwsgi_cache_key',
            +            'uwsgi_cache_lock',
            +            'uwsgi_cache_lock_timeout',
            +            'uwsgi_cache_methods',
            +            'uwsgi_cache_min_uses',
            +            'uwsgi_cache_path',
            +            'uwsgi_cache_use_stale',
            +            'uwsgi_cache_valid',
            +            'uwsgi_connect_timeout',
            +            'uwsgi_hide_header',
            +            'uwsgi_ignore_client_abort',
            +            'uwsgi_ignore_headers',
            +            'uwsgi_intercept_errors',
            +            'uwsgi_max_temp_file_size',
            +            'uwsgi_modifier',
            +            'uwsgi_next_upstream',
            +            'uwsgi_no_cache',
            +            'uwsgi_param',
            +            'uwsgi_pass',
            +            'uwsgi_pass_header',
            +            'uwsgi_pass_request_body',
            +            'uwsgi_pass_request_headers',
            +            'uwsgi_read_timeout',
            +            'uwsgi_send_timeout',
            +            'uwsgi_store',
            +            'uwsgi_store_access',
            +            'uwsgi_string',
            +            'uwsgi_temp_file_write_size',
            +            'uwsgi_temp_path',
            +            ),
            +        40 => array( // SCGI module
            +            // http://wiki.nginx.org/HttpScgiModule
            +            // Note: These directives were pulled from nginx 1.2.3
            +            //       ngx_http_scgi_module.c source file.
            +            'scgi_bind',
            +            'scgi_buffering',
            +            'scgi_buffers',
            +            'scgi_buffer_size',
            +            'scgi_busy_buffers_size',
            +            'scgi_cache',
            +            'scgi_cache_bypass',
            +            'scgi_cache_key',
            +            'scgi_cache_lock',
            +            'scgi_cache_lock_timeout',
            +            'scgi_cache_methods',
            +            'scgi_cache_min_uses',
            +            'scgi_cache_path',
            +            'scgi_cache_use_stale',
            +            'scgi_cache_valid',
            +            'scgi_connect_timeout',
            +            'scgi_hide_header',
            +            'scgi_ignore_client_abort',
            +            'scgi_ignore_headers',
            +            'scgi_intercept_errors',
            +            'scgi_max_temp_file_size',
            +            'scgi_next_upstream',
            +            'scgi_no_cache',
            +            'scgi_param',
            +            'scgi_pass',
            +            'scgi_pass_header',
            +            'scgi_pass_request_body',
            +            'scgi_pass_request_headers',
            +            'scgi_read_timeout',
            +            'scgi_send_timeout',
            +            'scgi_store',
            +            'scgi_store_access',
            +            'scgi_temp_file_write_size',
            +            'scgi_temp_path',
            +            ),
            +        41 => array( // split clients module
            +            // http://wiki.nginx.org/HttpSplitClientsModule
            +            // http://nginx.org/en/docs/http/ngx_http_split_clients_module.html
            +            'split_clients',
            +            ),
            +        42 => array( // X-Accel module
            +            // http://wiki.nginx.org/X-accel
            +            'X-Accel-Redirect',
            +            'X-Accel-Buffering',
            +            'X-Accel-Charset',
            +            'X-Accel-Expires',
            +            'X-Accel-Limit-Rate',
            +            ),
            +        43 => array( // degradation module
            +            // http://wiki.nginx.org/HttpDegradationModule
            +            'degradation',
            +            'degrade',
            +            ),
            +        44 => array( // GeoIP module
            +            // http://wiki.nginx.org/HttpGeoipModule
            +            // http://nginx.org/en/docs/http/ngx_http_geoip_module.html
            +            'geoip_country',
            +            'geoip_city',
            +            'geoip_proxy',
            +            'geoip_proxy_recursive',
            +            ),
            +        45 => array( // Image filter module
            +            // http://wiki.nginx.org/HttpImageFilterModule
            +            // http://nginx.org/en/docs/http/ngx_http_image_filter_module.html
            +            'image_filter',
            +            'image_filter_buffer',
            +            'image_filter_jpeg_quality',
            +            'image_filter_sharpen',
            +            'image_filter_transparency',
            +            ),
            +        46 => array( // MP4 module
            +            // http://wiki.nginx.org/HttpMp4Module
            +            // http://nginx.org/en/docs/http/ngx_http_mp4_module.html
            +            'mp4',
            +            'mp4_buffer_size',
            +            'mp4_max_buffer_size',
            +            ),
            +        47 => array( // Secure Link module
            +            // http://wiki.nginx.org/HttpSecureLinkModule
            +            // http://nginx.org/en/docs/http/ngx_http_secure_link_module.html
            +            'secure_link',
            +            'secure_link_md',
            +            'secure_link_secret',
            +            ),
            +        48 => array( // Mail Core module
            +            // http://wiki.nginx.org/MailCoreModule
            +            'auth',
            +            'imap_capabilities',
            +            'imap_client_buffer',
            +            'pop_auth',
            +            'pop_capabilities',
            +            'protocol',
            +            'smtp_auth',
            +            'smtp_capabilities',
            +            'so_keepalive',
            +            'timeout',
            +            // Removed to prioritize documentation for core module
            +            //'listen',
            +            //'server',
            +            //'server_name',
            +            ),
            +        49 => array( // Mail Auth module
            +            // http://wiki.nginx.org/MailAuthModule
            +            'auth_http',
            +            'auth_http_header',
            +            'auth_http_timeout',
            +            ),
            +        50 => array( // Mail Proxy module
            +            // http://wiki.nginx.org/MailProxyModule
            +            'proxy',
            +            'proxy_buffer',
            +            'proxy_pass_error_message',
            +            'proxy_timeout',
            +            'xclient',
            +            ),
            +        51 => array( // Mail SSL module
            +            // http://wiki.nginx.org/MailSslModule
            +            // Removed to prioritize documentation for http
            +            //'ssl',
            +            //'ssl_certificate',
            +            //'ssl_certificate_key',
            +            //'ssl_ciphers',
            +            //'ssl_prefer_server_ciphers',
            +            //'ssl_protocols',
            +            //'ssl_session_cache',
            +            //'ssl_session_timeout',
            +            'starttls',
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '{', '}', '=', '~', ';'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => true,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        5 => true,
            +        6 => true,
            +        7 => true,
            +        8 => true,
            +        9 => true,
            +        10 => true,
            +        11 => true,
            +        12 => true,
            +        13 => true,
            +        14 => true,
            +        15 => true,
            +        16 => true,
            +        17 => true,
            +        18 => true,
            +        19 => true,
            +        20 => true,
            +        21 => true,
            +        22 => true,
            +        23 => true,
            +        24 => true,
            +        25 => true,
            +        26 => true,
            +        27 => true,
            +        28 => true,
            +        29 => true,
            +        30 => true,
            +        31 => true,
            +        32 => true,
            +        33 => true,
            +        34 => true,
            +        35 => true,
            +        36 => true,
            +        37 => true,
            +        38 => true,
            +        39 => true,
            +        40 => true,
            +        41 => true,
            +        42 => true,
            +        43 => true,
            +        44 => true,
            +        45 => true,
            +        46 => true,
            +        47 => true,
            +        48 => true,
            +        49 => true,
            +        50 => true,
            +        51 => true,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;',
            +            2 => 'color: #000000; font-weight: bold;',
            +            3 => 'color: #000066;',
            +            4 => 'color: #993333;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;',
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #202020;',
            +            2 => 'color: #202020;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #000066;',
            +            4 => 'color: #000000; font-weight: bold;',
            +        ),
            +        'SCRIPT' => array()
            +        ),
            +    'URLS' => array(
            +        1 => 'http://wiki.nginx.org/CoreModule#{FNAME}',
            +        2 => 'http://wiki.nginx.org/NginxHttpEventsModule#{FNAME}',
            +        3 => 'http://wiki.nginx.org/NginxHttpCoreModule#{FNAME}',
            +        4 => 'http://wiki.nginx.org/NginxHttpUpstreamModule#{FNAME}',
            +        5 => 'http://wiki.nginx.org/NginxHttpAccessModule#{FNAME}',
            +        6 => 'http://wiki.nginx.org/NginxHttpAuthBasicModule#{FNAME}',
            +        7 => 'http://wiki.nginx.org/NginxHttpAutoIndexModule#{FNAME}',
            +        8 => 'http://wiki.nginx.org/NginxHttpBrowserModule#{FNAME}',
            +        9 => 'http://wiki.nginx.org/NginxHttpCharsetModule#{FNAME}',
            +        10 => 'http://wiki.nginx.org/NginxHttpEmptyGifModule#{FNAME}',
            +        11 => 'http://wiki.nginx.org/NginxHttpFcgiModule#{FNAME}',
            +        12 => 'http://wiki.nginx.org/NginxHttpGeoModule#{FNAME}',
            +        13 => 'http://wiki.nginx.org/NginxHttpGzipModule#{FNAME}',
            +        14 => 'http://wiki.nginx.org/NginxHttpHeadersModule#{FNAME}',
            +        15 => 'http://wiki.nginx.org/NginxHttpIndexModule#{FNAME}',
            +        16 => 'http://wiki.nginx.org/HttpLimitReqModule#{FNAME}',
            +        17 => 'http://wiki.nginx.org/NginxHttpRefererModule#{FNAME}',
            +        18 => 'http://wiki.nginx.org/NginxHttpLimitZoneModule#{FNAME}',
            +        19 => 'http://wiki.nginx.org/HttpLimitConnModule#{FNAME}',
            +        20 => 'http://wiki.nginx.org/NginxHttpLogModule#{FNAME}',
            +        21 => 'http://wiki.nginx.org/NginxHttpMapModule#{FNAME}',
            +        22 => 'http://wiki.nginx.org/NginxHttpMemcachedModule#{FNAME}',
            +        23 => 'http://wiki.nginx.org/NginxHttpProxyModule#{FNAME}',
            +        24 => 'http://wiki.nginx.org/NginxHttpRewriteModule#{FNAME}',
            +        25 => 'http://wiki.nginx.org/NginxHttpSsiModule#{FNAME}',
            +        26 => 'http://wiki.nginx.org/NginxHttpUserIdModule#{FNAME}',
            +        27 => 'http://wiki.nginx.org/NginxHttpAdditionModule#{FNAME}',
            +        28 => 'http://wiki.nginx.org/NginxHttpEmbeddedPerlModule#{FNAME}',
            +        29 => 'http://wiki.nginx.org/NginxHttpFlvStreamModule#{FNAME}',
            +        30 => 'http://wiki.nginx.org/NginxHttpGzipStaticModule#{FNAME}',
            +        31 => 'http://wiki.nginx.org/NginxHttpRandomIndexModule#{FNAME}',
            +        32 => 'http://wiki.nginx.org/NginxHttpRealIpModule#{FNAME}',
            +        33 => 'http://wiki.nginx.org/NginxHttpSslModule#{FNAME}',
            +        34 => 'http://wiki.nginx.org/NginxHttpStubStatusModule#{FNAME}',
            +        35 => 'http://wiki.nginx.org/NginxHttpSubModule#{FNAME}',
            +        36 => 'http://wiki.nginx.org/NginxHttpDavModule#{FNAME}',
            +        37 => 'http://wiki.nginx.org/NginxHttpGooglePerfToolsModule#{FNAME}',
            +        38 => 'http://wiki.nginx.org/NginxHttpXsltModule#{FNAME}',
            +        39 => 'http://wiki.nginx.org/NginxHttpUwsgiModule#{FNAME}',
            +        40 => 'http://wiki.nginx.org/HttpScgiModule',
            +        41 => 'http://wiki.nginx.org/HttpSplitClientsModule#{FNAME}',
            +        42 => 'http://wiki.nginx.org/X-accel#{FNAME}',
            +        43 => 'http://wiki.nginx.org/HttpDegradationModule#{FNAME}',
            +        44 => 'http://wiki.nginx.org/HttpGeoipModule#{FNAME}',
            +        45 => 'http://wiki.nginx.org/HttpImageFilterModule#{FNAME}',
            +        46 => 'http://wiki.nginx.org/HttpMp4Module#{FNAME}',
            +        47 => 'http://wiki.nginx.org/HttpSecureLinkModule#{FNAME}',
            +        48 => 'http://wiki.nginx.org/MailCoreModule#{FNAME}',
            +        49 => 'http://wiki.nginx.org/MailAuthModule#{FNAME}',
            +        50 => 'http://wiki.nginx.org/MailProxyModule#{FNAME}',
            +        51 => 'http://wiki.nginx.org/MailSslModule#{FNAME}',
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(),
            +    'REGEXPS' => array(
            +        0 => '[\\$%@]+[a-zA-Z_][a-zA-Z0-9_]*',
            +        4 => '<[a-zA-Z_][a-zA-Z0-9_]*>',
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(),
            +    'HIGHLIGHT_STRICT_BLOCK' => array()
            +);
            diff --git a/vendor/easybook/geshi/geshi/nsis.php b/vendor/easybook/geshi/geshi/nsis.php
            new file mode 100644
            index 0000000000..29ba952b4a
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/nsis.php
            @@ -0,0 +1,349 @@
            + 'NSIS',
            +    'COMMENT_SINGLE' => array(1 => ';', 2 => '#'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'",'"','`'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            '!appendfile', '!addIncludeDir', '!addplugindir', '!cd', '!define', '!delfile', '!echo', '!else',
            +            '!endif', '!error', '!execute', '!ifdef', '!ifmacrodef', '!ifmacrondef', '!ifndef', '!include',
            +            '!insertmacro', '!macro', '!macroend', '!packhdr', '!tempfile', '!system', '!undef', '!verbose',
            +            '!warning'
            +            ),
            +        2 => array(
            +            'AddBrandingImage', 'AllowRootDirInstall', 'AutoCloseWindow', 'BGFont',
            +            'BGGradient', 'BrandingText', 'Caption', 'ChangeUI', 'CheckBitmap', 'CompletedText', 'ComponentText',
            +            'CRCCheck', 'DetailsButtonText', 'DirShow', 'DirText', 'DirVar', 'DirVerify', 'FileErrorText',
            +            'Function', 'FunctionEnd', 'Icon', 'InstallButtonText', 'InstallColors', 'InstallDir',
            +            'InstallDirRegKey', 'InstProgressFlags', 'InstType', 'LangString', 'LangStringUP', 'LicenseBkColor',
            +            'LicenseData', 'LicenseForceSelection', 'LicenseLangString', 'LicenseText', 'LoadLanguageFile',
            +            'MiscButtonText', 'Name', 'OutFile', 'Page', 'PageEx', 'PageExEnd', 'Section',
            +            'SectionEnd', 'SectionGroup', 'SectionGroupEnd', 'SetCompressor', 'SetFont', 'ShowInstDetails',
            +            'ShowUninstDetails', 'SilentInstall', 'SilentUnInstall', 'SpaceTexts', 'SubCaption', 'SubSection',
            +            'SubSectionEnd', 'UninstallButtonText', 'UninstallCaption', 'UninstallIcon', 'UninstallSubCaption',
            +            'UninstallText', 'UninstPage', 'Var', 'VIAddVersionKey', 'VIProductVersion', 'WindowIcon', 'XPStyle'
            +            ),
            +        3 => array(
            +            'AddSize', 'AllowSkipFiles', 'FileBufSize', 'GetInstDirError', 'PageCallbacks',
            +            'SectionIn', 'SetCompress', 'SetCompressionLevel', 'SetCompressorDictSize',
            +            'SetDatablockOptimize', 'SetDateSave', 'SetOverwrite', 'SetPluginUnload'
            +            ),
            +        4 => array(
            +            'Abort', 'BringToFront', 'Call', 'CallInstDLL', 'ClearErrors', 'CopyFiles','CreateDirectory',
            +            'CreateFont', 'CreateShortCut', 'Delete', 'DeleteINISec', 'DeleteINIStr', 'DeleteRegKey',
            +            'DeleteRegValue', 'DetailPrint', 'EnableWindow', 'EnumRegKey', 'EnumRegValue', 'Exch', 'Exec',
            +            'ExecShell', 'ExecWait', 'ExpandEnvStrings', 'File', 'FileClose', 'FileOpen', 'FileRead',
            +            'FileReadByte', 'FileSeek', 'FileWrite', 'FileWriteByte', 'FindClose', 'FindFirst', 'FindNext',
            +            'FindWindow', 'FlushINI', 'GetCurInstType', 'GetCurrentAddress', 'GetDlgItem', 'GetDLLVersion',
            +            'GetDLLVersionLocal', 'GetErrorLevel', 'GetFileTime', 'GetFileTimeLocal', 'GetFullPathName',
            +            'GetFunctionAddress', 'GetLabelAddress', 'GetTempFileName', 'GetWindowText', 'Goto', 'HideWindow',
            +            'IfAbort', 'IfErrors', 'IfFileExists', 'IfRebootFlag', 'IfSilent', 'InitPluginsDir', 'InstTypeGetText',
            +            'InstTypeSetText', 'IntCmp', 'IntCmpU', 'IntFmt', 'IntOp', 'IsWindow', 'LockWindow', 'LogSet', 'LogText',
            +            'MessageBox', 'Nop', 'Pop', 'Push', 'Quit', 'ReadEnvStr', 'ReadIniStr', 'ReadRegDWORD', 'ReadRegStr',
            +            'Reboot', 'RegDLL', 'Rename', 'ReserveFile', 'Return', 'RMDir', 'SearchPath', 'SectionGetFlags',
            +            'SectionGetInstTypes', 'SectionGetSize', 'SectionGetText', 'SectionSetFlags', 'SectionSetInstTypes',
            +            'SectionSetSize', 'SectionSetText', 'SendMessage', 'SetAutoClose', 'SetBrandingImage', 'SetCtlColors',
            +            'SetCurInstType', 'SetDetailsPrint', 'SetDetailsView', 'SetErrorLevel', 'SetErrors', 'SetFileAttributes',
            +            'SetOutPath', 'SetRebootFlag', 'SetShellVarContext', 'SetSilent', 'ShowWindow', 'Sleep', 'StrCmp',
            +            'StrCpy', 'StrLen', 'UnRegDLL', 'WriteINIStr', 'WriteRegBin', 'WriteRegDWORD', 'WriteRegExpandStr',
            +            'WriteRegStr', 'WriteUninstaller'
            +            ),
            +        5 => array(
            +            'all', 'alwaysoff', 'ARCHIVE', 'auto', 'both', 'bzip2', 'checkbox', 'components', 'current',
            +            'custom', 'directory', 'false', 'FILE_ATTRIBUTE_ARCHIVE', 'FILE_ATTRIBUTE_HIDDEN', 'FILE_ATTRIBUTE_NORMAL',
            +            'FILE_ATTRIBUTE_OFFLINE', 'FILE_ATTRIBUTE_READONLY', 'FILE_ATTRIBUTE_SYSTEM,TEMPORARY',
            +            'FILE_ATTRIBUTE_TEMPORARY', 'force', 'HIDDEN', 'hide', 'HKCC', 'HKCR', 'HKCU', 'HKDD', 'HKEY_CLASSES_ROOT',
            +            'HKEY_CURRENT_CONFIG', 'HKEY_CURRENT_USER', 'HKEY_DYN_DATA', 'HKEY_LOCAL_MACHINE', 'HKEY_PERFORMANCE_DATA',
            +            'HKEY_USERS', 'HKLM', 'HKPD', 'HKU', 'IDABORT', 'IDCANCEL', 'IDIGNORE', 'IDNO', 'IDOK', 'IDRETRY', 'IDYES',
            +            'ifdiff', 'ifnewer', 'instfiles', 'lastused', 'leave', 'license', 'listonly', 'lzma', 'manual',
            +            'MB_ABORTRETRYIGNORE', 'MB_DEFBUTTON1', 'MB_DEFBUTTON2', 'MB_DEFBUTTON3', 'MB_DEFBUTTON4',
            +            'MB_ICONEXCLAMATION', 'MB_ICONINFORMATION', 'MB_ICONQUESTION', 'MB_ICONSTOP', 'MB_OK', 'MB_OKCANCEL',
            +            'MB_RETRYCANCEL', 'MB_RIGHT', 'MB_SETFOREGROUND', 'MB_TOPMOST', 'MB_YESNO', 'MB_YESNOCANCEL', 'nevershow',
            +            'none', 'normal', 'off', 'OFFLINE', 'on', 'radiobuttons', 'READONLY', 'RO', 'SHCTX', 'SHELL_CONTEXT', 'show',
            +            'silent', 'silentlog', 'SW_HIDE', 'SW_SHOWMAXIMIZED', 'SW_SHOWMINIMIZED', 'SW_SHOWNORMAL', 'SYSTEM',
            +            'textonly', 'true', 'try', 'uninstConfirm', 'zlib'
            +            ),
            +        6 => array(
            +            '/a', '/components', '/COMPONENTSONLYONCUSTOM', '/CUSTOMSTRING', '/e', '/FILESONLY', '/FINAL', '/gray', '/GLOBAL',
            +            '/ifempty', '/IMGID', '/ITALIC', '/lang', '/NOCUSTOM', '/nonfatal', '/NOUNLOAD', '/oname', '/r', '/REBOOTOK',
            +            '/RESIZETOFIT', '/SOLID', '/SD', '/SHORT', '/silent', '/STRIKE', '/TIMEOUT', '/TRIMCENTER', '/TRIMLEFT',
            +            '/TRIMRIGHT', '/UNDERLINE', '/windows', '/x'
            +            ),
            +        7 => array(
            +            '.onGUIEnd', '.onGUIInit', '.onInit', '.onInstFailed', '.onInstSuccess', '.onMouseOverSection',
            +            '.onRebootFailed', '.onSelChange', '.onUserAbort', '.onVerifyInstDir', 'un.onGUIEnd', 'un.onGUIInit',
            +            'un.onInit', 'un.onRebootFailed', 'un.onUninstFailed', 'un.onUninstSuccess', 'un.onUserAbort'
            +            ),
            +        8 => array(
            +            'MUI.nsh', '"${NSISDIR}\Contrib\Modern UI\System.nsh"', 'MUI_SYSVERSION', 'MUI_ICON', 'MUI_UNICON',
            +            'MUI_HEADERIMAGE', 'MUI_HEADERIMAGE_BITMAP', 'MUI_HEADERIMAGE_BITMAP_NOSTRETCH', 'MUI_HEADERIMAGE_BITMAP_RTL',
            +            'MUI_HEADERIMAGE_BITMAP_RTL_NOSTRETCH', 'MUI_HEADERIMAGE_UNBITMAP', 'MUI_HEADERIMAGE_UNBITMAP_NOSTRETCH',
            +            'MUI_HEADERIMAGE_UNBITMAP_RTL', 'MUI_HEADERIMAGE_UNBITMAP_RTL_NOSTRETCH', 'MUI_HEADERIMAGE_RIGHT', 'MUI_BGCOLOR',
            +            'MUI_UI', 'MUI_UI_HEADERIMAGE', 'MUI_UI_HEADERIMAGE_RIGHT', 'MUI_UI_COMPONENTSPAGE_SMALLDESC',
            +            'MUI_UI_COMPONENTSPAGE_NODESC', 'MUI_WELCOMEFINISHPAGE_BITMAP', 'MUI_WELCOMEFINISHPAGE_BITMAP_NOSTRETCH',
            +            'MUI_WELCOMEFINISHPAGE_INI', 'MUI_UNWELCOMEFINISHPAGE_BITMAP', 'MUI_UNWELCOMEFINISHPAGE_BITMAP_NOSTRETCH',
            +            'MUI_UNWELCOMEFINISHPAGE_INI', 'MUI_LICENSEPAGE_BGCOLOR', 'MUI_COMPONENTSPAGE_CHECKBITMAP',
            +            'MUI_COMPONENTSPAGE_SMALLDESC', 'MUI_COMPONENTSPAGE_NODESC', 'MUI_INSTFILESPAGE_COLORS',
            +            'MUI_INSTFILESPAGE_PROGRESSBAR', 'MUI_FINISHPAGE_NOAUTOCLOSE', 'MUI_UNFINISHPAGE_NOAUTOCLOSE',
            +            'MUI_ABORTWARNING', 'MUI_ABORTWARNING_TEXT', 'MUI_UNABORTWARNING', 'MUI_UNABORTWARNING_TEXT',
            +            'MUI_PAGE_WELCOME', 'MUI_PAGE_LICENSE', 'MUI_PAGE_COMPONENTS', 'MUI_PAGE_DIRECTORY',
            +            'MUI_PAGE_STARTMENU', 'MUI_PAGE_INSTFILES', 'MUI_PAGE_FINISH', 'MUI_UNPAGE_WELCOME',
            +            'MUI_UNPAGE_CONFIRM', 'MUI_UNPAGE_LICENSE', 'MUI_UNPAGE_COMPONENTS', 'MUI_UNPAGE_DIRECTORY',
            +            'MUI_UNPAGE_INSTFILES', 'MUI_UNPAGE_FINISH', 'MUI_PAGE_HEADER_TEXT', 'MUI_PAGE_HEADER_SUBTEXT',
            +            'MUI_WELCOMEPAGE_TITLE', 'MUI_WELCOMEPAGE_TITLE_3LINES', 'MUI_WELCOMEPAGE_TEXT',
            +            'MUI_LICENSEPAGE_TEXT_TOP', 'MUI_LICENSEPAGE_TEXT_BOTTOM', 'MUI_LICENSEPAGE_BUTTON',
            +            'MUI_LICENSEPAGE_CHECKBOX', 'MUI_LICENSEPAGE_CHECKBOX_TEXT', 'MUI_LICENSEPAGE_RADIOBUTTONS',
            +            'MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_ACCEPT', 'MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_DECLINE',
            +            'MUI_COMPONENTSPAGE_TEXT_TOP', 'MUI_COMPONENTSPAGE_TEXT_COMPLIST', 'MUI_COMPONENTSPAGE_TEXT_INSTTYPE',
            +            'MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE', 'MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO',
            +            'MUI_DIRECTORYPAGE_TEXT_TOP', 'MUI_DIRECTORYPAGE_TEXT_DESTINATION', 'MUI_DIRECTORYPAGE_VARIABLE',
            +            'MUI_DIRECTORYPAGE_VERIFYONLEAVE', 'MUI_STARTMENU_WRITE_BEGIN', 'MUI_STARTMENU_WRITE_END',
            +            'MUI_STARTMENUPAGE_TEXT_TOP', 'MUI_STARTMENUPAGE_TEXT_CHECKBOX', 'MUI_STARTMENUPAGE_DEFAULTFOLDER',
            +            'MUI_STARTMENUPAGE_NODISABLE', 'MUI_STARTMENUPAGE_REGISTRY_ROOT', 'MUI_STARTMENUPAGE_REGISTRY_KEY',
            +            'MUI_STARTMENUPAGE_REGISTRY_VALUENAME', 'MUI_INSTFILESPAGE_FINISHHEADER_TEXT',
            +            'MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT', 'MUI_INSTFILESPAGE_ABORTHEADER_TEXT',
            +            'MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT', 'MUI_FINISHPAGE_TITLE', 'MUI_FINISHPAGE_TITLE_3LINES',
            +            'MUI_FINISHPAGE_TEXT', 'MUI_FINISHPAGE_TEXT_LARGE', 'MUI_FINISHPAGE_BUTTON',
            +            'MUI_FINISHPAGE_TEXT_REBOOT', 'MUI_FINISHPAGE_TEXT_REBOOTNOW', 'MUI_FINISHPAGE_TEXT_REBOOTLATER',
            +            'MUI_FINISHPAGE_RUN', 'MUI_FINISHPAGE_RUN_TEXT', 'MUI_FINISHPAGE_RUN_PARAMETERS',
            +            'MUI_FINISHPAGE_RUN_NOTCHECKED', 'MUI_FINISHPAGE_RUN_FUNCTION', 'MUI_FINISHPAGE_SHOWREADME',
            +            'MUI_FINISHPAGE_SHOWREADME_TEXT', 'MUI_FINISHPAGE_SHOWREADME_NOTCHECKED',
            +            'MUI_FINISHPAGE_SHOWREADME_FUNCTION', 'MUI_FINISHPAGE_LINK', 'MUI_FINISHPAGE_LINK_LOCATION',
            +            'MUI_FINISHPAGE_LINK_COLOR', 'MUI_FINISHPAGE_NOREBOOTSUPPORT', 'MUI_UNCONFIRMPAGE_TEXT_TOP',
            +            'MUI_UNCONFIRMPAGE_TEXT_LOCATION', 'MUI_LANGUAGE', 'MUI_LANGDLL_DISPLAY',
            +            'MUI_LANGDLL_REGISTRY_ROOT', 'MUI_LANGDLL_REGISTRY_KEY', 'MUI_LANGDLL_REGISTRY_VALUENAME',
            +            'MUI_LANGDLL_WINDOWTITLE', 'MUI_LANGDLL_INFO', 'MUI_LANGDLL_ALWAYSSHOW',
            +            'MUI_RESERVEFILE_INSTALLOPTIONS', 'MUI_RESERVEFILE_LANGDLL', 'MUI_FUNCTION_DESCRIPTION_BEGIN',
            +            'MUI_DESCRIPTION_TEXT', 'MUI_FUNCTION_DESCRIPTION_END', 'MUI_INSTALLOPTIONS_EXTRACT',
            +            'MUI_INSTALLOPTIONS_EXTRACT_AS', 'MUI_HEADER_TEXT', 'MUI_INSTALLOPTIONS_DISPLAY',
            +            'MUI_INSTALLOPTIONS_INITDIALOG', 'MUI_INSTALLOPTIONS_SHOW',
            +            'MUI_INSTALLOPTIONS_DISPLAY_RETURN', 'MUI_INSTALLOPTIONS_SHOW_RETURN',
            +            'MUI_INSTALLOPTIONS_READ', 'MUI_INSTALLOPTIONS_WRITE',
            +            'MUI_CUSTOMFUNCTION_GUIINIT', 'MUI_CUSTOMFUNCTION_UNGUIINIT',
            +            'MUI_CUSTOMFUNCTION_ABORT', 'MUI_CUSTOMFUNCTION_UNABORT',
            +            'MUI_PAGE_CUSTOMFUNCTION_PRE', 'MUI_PAGE_CUSTOMFUNCTION_SHOW', 'MUI_PAGE_CUSTOMFUNCTION_LEAVE',
            +            'MUI_WELCOMEFINISHPAGE_CUSTOMFUNCTION_INIT'
            +            ),
            +        9 => array(
            +            'LogicLib.nsh', '${LOGICLIB}', 'LOGICLIB_STRCMP', 'LOGICLIB_INT64CMP', 'LOGICLIB_SECTIONCMP', '${If}', '${Unless}',
            +            '${ElseIf}', '${ElseUnless}', '${Else}', '${EndIf}', '${EndUnless}', '${AndIf}', '${AndUnless}',
            +            '${OrIf}', '${OrUnless}', '${IfThen}', '${IfCmd}', '${Select}', '${Case2}', '${Case3}',
            +            '${Case4}', '${Case5}', '${CaseElse}', '${Default}', '${EndSelect}', '${Switch}',
            +            '${Case}', '${EndSwitch}', '${Do}', '${DoWhile}', '${UntilWhile}', '${Continue}', '${Break}',
            +            '${Loop}', '${LoopWhile}', '${LoopUntil}', '${While}', '${ExitWhile}', '${EndWhile}', '${For}',
            +            '${ForEach}', '${ExitFor}', '${Next}', '${Abort}', '${Errors}', '${RebootFlag}', '${Silent}',
            +            '${FileExists}', '${Cmd}', '${SectionIsSelected}', '${SectionIsSectionGroup}',
            +            '${SectionIsSectionGroupEnd}', '${SectionIsBold}', '${SectionIsReadOnly}',
            +            '${SectionIsExpanded}', '${SectionIsPartiallySelected}'
            +            ),
            +        10 => array(
            +            'StrFunc.nsh', '${STRFUNC}', '${StrCase}', '${StrClb}', '${StrIOToNSIS}', '${StrLoc}', '${StrNSISToIO}', '${StrRep}',
            +            '${StrSort}', '${StrStr}', '${StrStrAdv}', '${StrTok}', '${StrTrimNewLines}'
            +            ),
            +        11 => array(
            +            'UpgradeDLL.nsh', 'UPGRADEDLL_INCLUDED', 'UpgradeDLL'
            +            ),
            +        12 => array(
            +            'Sections.nsh', 'SECTIONS_INCLUDED', '${SF_SELECTED}', '${SF_SECGRP}', '${SF_SUBSEC}', '${SF_SECGRPEND}',
            +            '${SF_SUBSECEND}', '${SF_BOLD}', '${SF_RO}', '${SF_EXPAND}', '${SF_PSELECTED}', '${SF_TOGGLED}',
            +            '${SF_NAMECHG}', '${SECTION_OFF}', 'SelectSection', 'UnselectSection', 'ReverseSection',
            +            'StartRadioButtons', 'RadioButton', 'EndRadioButtons', '${INSTTYPE_0}', '${INSTTYPE_1}', '${INSTTYPE_2}',
            +            '${INSTTYPE_3}', '${INSTTYPE_4}', '${INSTTYPE_5}', '${INSTTYPE_6}', '${INSTTYPE_7}', '${INSTTYPE_8}',
            +            '${INSTTYPE_9}', '${INSTTYPE_10}', '${INSTTYPE_11}', '${INSTTYPE_12}', '${INSTTYPE_13}', '${INSTTYPE_14}',
            +            '${INSTTYPE_15}', '${INSTTYPE_16}', '${INSTTYPE_17}', '${INSTTYPE_18}', '${INSTTYPE_19}', '${INSTTYPE_20}',
            +            '${INSTTYPE_21}', '${INSTTYPE_22}', '${INSTTYPE_23}', '${INSTTYPE_24}', '${INSTTYPE_25}', '${INSTTYPE_26}',
            +            '${INSTTYPE_27}', '${INSTTYPE_28}', '${INSTTYPE_29}', '${INSTTYPE_30}', '${INSTTYPE_31}', '${INSTTYPE_32}',
            +            'SetSectionInInstType', 'ClearSectionInInstType', 'SetSectionFlag', 'ClearSectionFlag', 'SectionFlagIsSet'
            +            ),
            +        13 => array(
            +            'Colors.nsh', 'WHITE', 'BLACK', 'YELLOW', 'RED', 'GREEN', 'BLUE', 'MAGENTA', 'CYAN', 'rgb2hex'
            +            ),
            +        14 => array(
            +            'FileFunc.nsh', '${Locate}', '${GetSize}', '${DriveSpace}', '${GetDrives}', '${GetTime}', '${GetFileAttributes}', '${GetFileVersion}', '${GetExeName}', '${GetExePath}', '${GetParameters}', '${GetOptions}', '${GetRoot}', '${GetParent}', '${GetFileName}', '${GetBaseName}', '${GetFileExt}', '${BannerTrimPath}', '${DirState}', '${RefreshShellIcons}'
            +            ),
            +        15 => array(
            +            'TextFunc.nsh', '${LineFind}', '${LineRead}', '${FileReadFromEnd}', '${LineSum}', '${FileJoin}', '${TextCompare}', '${ConfigRead}', '${ConfigWrite}', '${FileRecode}', '${TrimNewLines}'
            +            ),
            +        16 => array(
            +            'WordFunc.nsh', '${WordFind}', '${WordFind2X}', '${WordFind3X}', '${WordReplace}', '${WordAdd}', '${WordInsert}', '${StrFilter}', '${VersionCompare}', '${VersionConvert}'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        5 => false,
            +        6 => false,
            +        7 => false,
            +        8 => false,
            +        9 => false,
            +        10 => false,
            +        11 => false,
            +        12 => false,
            +        13 => false,
            +        14 => false,
            +        15 => false,
            +        16 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000066; font-weight:bold;',
            +            2 => 'color: #000066;',
            +            3 => 'color: #003366;',
            +            4 => 'color: #000099;',
            +            5 => 'color: #ff6600;',
            +            6 => 'color: #ff6600;',
            +            7 => 'color: #006600;',
            +            8 => 'color: #006600;',
            +            9 => 'color: #006600;',
            +            10 => 'color: #006600;',
            +            11 => 'color: #006600;',
            +            12 => 'color: #006600;',
            +            13 => 'color: #006600;',
            +            14 => 'color: #006600;',
            +            15 => 'color: #006600;',
            +            16 => 'color: #006600;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; font-style: italic;',
            +            2 => 'color: #666666; font-style: italic;',
            +            'MULTI' => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #660066; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => ''
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #660066;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => ''
            +            ),
            +        'METHODS' => array(
            +            0 => ''
            +            ),
            +        'SYMBOLS' => array(
            +            0 => ''
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #660000;',
            +            1 => 'color: #660000;',
            +            2 => 'color: #660000;',
            +            3 => 'color: #660000;',
            +            4 => 'color: #660000;',
            +            5 => 'color: #660000;',
            +            6 => 'color: #660000;',
            +            7 => 'color: #000099;',
            +            8 => 'color: #003399;'
            +            ),
            +        'SCRIPT' => array(
            +            0 => ''
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => '',
            +        6 => '',
            +        7 => '',
            +        8 => '',
            +        9 => '',
            +        10 => '',
            +        11 => '',
            +        12 => '',
            +        13 => '',
            +        14 => '',
            +        15 => '',
            +        16 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        0 => '\$\$',
            +        1 => '\$\\r',
            +        2 => '\$\\n',
            +        3 => '\$\\t',
            +        4 => '\$[a-zA-Z0-9_]+',
            +        5 => '\$\{.{1,256}\}',
            +        6 => '\$\\\(.{1,256}\\\)',
            +        7 => array(
            +            GESHI_SEARCH => '([^:\/\\\*\?\"\<\>(?:)\s]*?)(::)([^:\/\\\*\?\"\<\>(?:)\s]*?)',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => '\\2\\3'
            +            ),
            +        8 => array(
            +            GESHI_SEARCH => '([^:\/\\\*\?\"\<\>(?:)\s]*?)(::)([^:\/\\\*\?\"\<\>(?:)]*?\s)',
            +            GESHI_REPLACE => '\\3',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\\1\\2',
            +            GESHI_AFTER => ''
            +            )
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/oberon2.php b/vendor/easybook/geshi/geshi/oberon2.php
            new file mode 100644
            index 0000000000..777bc8d9d1
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/oberon2.php
            @@ -0,0 +1,134 @@
            + 'Oberon-2',
            +    'COMMENT_SINGLE' => array(),
            +    'COMMENT_MULTI' => array('(*' => '*)'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'HARDQUOTE' => array("'", "'"),
            +    'HARDESCAPE' => array("''"),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'ARRAY', 'BEGIN', 'BY', 'CASE',
            +            'CONST', 'DIV', 'DO', 'ELSE', 'ELSIF', 'END',
            +            'EXIT', 'FOR', 'IF', 'IMPORT', 'IN', 'IS',
            +            'LOOP', 'MOD', 'MODULE', 'OF',
            +            'OR', 'POINTER', 'PROCEDURE', 'RECORD',
            +            'REPEAT', 'RETURN', 'THEN', 'TO',
            +            'TYPE', 'UNTIL', 'VAR', 'WHILE', 'WITH'
            +            ),
            +        2 => array(
            +            'NIL', 'FALSE', 'TRUE',
            +            ),
            +        3 => array(
            +            'ABS', 'ASH', 'ASSERT', 'CAP', 'CHR', 'COPY', 'DEC',
            +            'ENTIER', 'EXCL', 'HALT', 'INC', 'INCL', 'LEN',
            +            'LONG', 'MAX', 'MIN', 'NEW', 'ODD', 'ORD', 'SHORT', 'SIZE'
            +            ),
            +        4 => array(
            +            'BOOLEAN', 'CHAR', 'SHORTINT', 'LONGINT',
            +            'INTEGER', 'LONGREAL', 'REAL', 'SET', 'PTR'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        ',', ':', '=', '+', '-', '*', '/', '#', '~'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000000; font-weight: bold;',
            +            2 => 'color: #000000; font-weight: bold;',
            +            3 => 'color: #000066;',
            +            4 => 'color: #000066; font-weight: bold;'
            +            ),
            +        'COMMENTS' => array(
            +            'MULTI' => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;',
            +            'HARD' => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;',
            +            'HARD' => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #0066ee;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #339933;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/objc.php b/vendor/easybook/geshi/geshi/objc.php
            new file mode 100644
            index 0000000000..52576c16a5
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/objc.php
            @@ -0,0 +1,356 @@
            + 'Objective-C',
            +    'COMMENT_SINGLE' => array(
            +        //Compiler directives
            +        1 => '#',
            +        //Single line C-Comments
            +        2 => '//'
            +        ),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(
            +        //Multiline Continuation for single-line comment
            +        2 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m',
            +        //Pseudo-Highlighting of the @-sign before strings
            +        3 => "/@(?=\")/"
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"', "'"),
            +    'ESCAPE_CHAR' => '\\',
            +
            +    'KEYWORDS' => array(
            +        // Objective-C keywords
            +        1 => array(
            +            'while', 'switch', 'return', 'in', 'if', 'goto', 'foreach', 'for',
            +            'else', 'do', 'default', 'continue', 'case', '@try', '@throw',
            +            '@synthesize', '@synchronized', '@selector', '@public', '@protocol',
            +            '@protected', '@property', '@private', '@interface',
            +            '@implementation', '@finally', '@end', '@encode', '@defs', '@class',
            +            '@catch'
            +            ),
            +        // Macros and constants
            +        2 => array(
            +            'YES', 'USHRT_MAX', 'ULONG_MAX', 'UINT_MAX', 'UCHAR_MAX', 'true',
            +            'TMP_MAX', 'stdout', 'stdin', 'stderr', 'SIGTERM', 'SIGSEGV',
            +            'SIGINT', 'SIGILL', 'SIG_IGN', 'SIGFPE', 'SIG_ERR', 'SIG_DFL',
            +            'SIGABRT', 'SHRT_MIN', 'SHRT_MAX', 'SEEK_SET', 'SEEK_END',
            +            'SEEK_CUR', 'SCHAR_MIN', 'SCHAR_MAX', 'RAND_MAX', 'NULL',
            +            'NO', 'nil', 'Nil', 'L_tmpnam', 'LONG_MIN', 'LONG_MAX',
            +            'LDBL_MIN_EXP', 'LDBL_MIN', 'LDBL_MAX_EXP', 'LDBL_MAX',
            +            'LDBL_MANT_DIG', 'LDBL_EPSILON', 'LDBL_DIG', 'INT_MIN', 'INT_MAX',
            +            'HUGE_VAL', 'FOPEN_MAX', 'FLT_ROUNDS', 'FLT_RADIX', 'FLT_MIN_EXP',
            +            'FLT_MIN', 'FLT_MAX_EXP', 'FLT_MAX', 'FLT_MANT_DIG', 'FLT_EPSILON',
            +            'FLT_DIG', 'FILENAME_MAX', 'false', 'EXIT_SUCCESS', 'EXIT_FAILURE',
            +            'errno', 'ERANGE', 'EOF', 'enum', 'EDOM', 'DBL_MIN_EXP', 'DBL_MIN',
            +            'DBL_MAX_EXP', 'DBL_MAX', 'DBL_MANT_DIG', 'DBL_EPSILON', 'DBL_DIG',
            +            'CLOCKS_PER_SEC', 'CHAR_MIN', 'CHAR_MAX', 'CHAR_BIT', 'BUFSIZ',
            +            'break'
            +            ),
            +        // C standard library functions
            +        3 => array(
            +            'vsprintf', 'vprintf', 'vfprintf', 'va_start', 'va_end', 'va_arg',
            +            'ungetc', 'toupper', 'tolower', 'tmpname', 'tmpfile', 'time',
            +            'tanh', 'tan', 'system', 'strxfrm', 'strtoul', 'strtol', 'strtok',
            +            'strtod', 'strstr', 'strspn', 'strrchr', 'strpbrk', 'strncpy',
            +            'strncmp', 'strncat', 'strlen', 'strftime', 'strerror', 'strcspn',
            +            'strcpy', 'strcoll', 'strcmp', 'strchr', 'strcat', 'sscanf',
            +            'srand', 'sqrt', 'sprintf', 'snprintf', 'sizeof', 'sinh', 'sin',
            +            'setvbuf', 'setjmp', 'setbuf', 'scanf', 'rewind', 'rename',
            +            'remove', 'realloc', 'rand', 'qsort', 'puts', 'putchar', 'putc',
            +            'printf', 'pow', 'perror', 'offsetof', 'modf', 'mktime', 'memset',
            +            'memmove', 'memcpy', 'memcmp', 'memchr', 'malloc', 'longjmp',
            +            'log10', 'log', 'localtime', 'ldiv', 'ldexp', 'labs', 'isxdigit',
            +            'isupper', 'isspace', 'ispunct', 'isprint', 'islower',
            +            'isgraph', 'isdigit', 'iscntrl', 'isalpha', 'isalnum', 'gmtime',
            +            'gets', 'getenv', 'getchar', 'getc', 'fwrite', 'ftell', 'fsetpos',
            +            'fseek', 'fscanf', 'frexp', 'freopen', 'free', 'fread', 'fputs',
            +            'fputc', 'fprintf', 'fopen', 'fmod', 'floor', 'fgets', 'fgetpos',
            +            'fgetc', 'fflush', 'ferror', 'feof', 'fclose', 'fabs', 'exp',
            +            'exit', 'div', 'difftime', 'ctime', 'cosh', 'cos', 'clock',
            +            'clearerr', 'ceil', 'calloc', 'bsearch', 'atol', 'atoi', 'atof',
            +            'atexit', 'atan2', 'atan', 'assert', 'asin', 'asctime', 'acos',
            +            'abs', 'abort'
            +            ),
            +        // Data types (C, Objective-C, Cocoa)
            +        4 => array(
            +            'volatile', 'void', 'va_list', 'unsigned', 'union', 'typedef', 'tm',
            +            'time_t', 'struct', 'string', 'static', 'size_t',
            +            'signed', 'signal', 'short', 'SEL', 'register', 'raise',
            +            'ptrdiff_t', 'NSZone', 'NSRect', 'NSRange', 'NSPoint', 'long',
            +            'ldiv_t', 'jmp_buf', 'int', 'IMP', 'id', 'fpos_t', 'float', 'FILE',
            +            'extern', 'double', 'div_t', 'const', 'clock_t', 'Class', 'char',
            +            'BOOL', 'auto'
            +            ),
            +        // Foundation classes
            +        5 => array(
            +            'NSXMLParser', 'NSXMLNode', 'NSXMLElement', 'NSXMLDTDNode',
            +            'NSXMLDTD', 'NSXMLDocument', 'NSWhoseSpecifier',
            +            'NSValueTransformer', 'NSValue', 'NSUserDefaults', 'NSURLResponse',
            +            'NSURLRequest', 'NSURLProtocol', 'NSURLProtectionSpace',
            +            'NSURLHandle', 'NSURLDownload', 'NSURLCredentialStorage',
            +            'NSURLCredential', 'NSURLConnection', 'NSURLCache',
            +            'NSURLAuthenticationChallenge', 'NSURL', 'NSUniqueIDSpecifier',
            +            'NSUndoManager', 'NSUnarchiver', 'NSTimeZone', 'NSTimer',
            +            'NSThread', 'NSTask', 'NSString', 'NSStream', 'NSSpellServer',
            +            'NSSpecifierTest', 'NSSortDescriptor', 'NSSocketPortNameServer',
            +            'NSSocketPort', 'NSSetCommand', 'NSSet', 'NSSerializer',
            +            'NSScriptWhoseTest', 'NSScriptSuiteRegistry',
            +            'NSScriptObjectSpecifier', 'NSScriptExecutionContext',
            +            'NSScriptCommandDescription', 'NSScriptCommand',
            +            'NSScriptCoercionHandler', 'NSScriptClassDescription', 'NSScanner',
            +            'NSRunLoop', 'NSRelativeSpecifier', 'NSRecursiveLock',
            +            'NSRangeSpecifier', 'NSRandomSpecifier', 'NSQuitCommand', 'NSProxy',
            +            'NSProtocolChecker', 'NSPropertySpecifier',
            +            'NSPropertyListSerialization', 'NSProcessInfo', 'NSPredicate',
            +            'NSPositionalSpecifier', 'NSPortNameServer', 'NSPortMessage',
            +            'NSPortCoder', 'NSPort', 'NSPointerFunctions', 'NSPointerArray',
            +            'NSPipe', 'NSOutputStream', 'NSOperationQueue', 'NSOperation',
            +            'NSObject', 'NSNumberFormatter', 'NSNumber', 'NSNull',
            +            'NSNotificationQueue', 'NSNotificationCenter', 'NSNotification',
            +            'NSNetServiceBrowser', 'NSNetService', 'NSNameSpecifier',
            +            'NSMutableURLRequest', 'NSMutableString', 'NSMutableSet',
            +            'NSMutableIndexSet', 'NSMutableDictionary', 'NSMutableData',
            +            'NSMutableCharacterSet', 'NSMutableAttributedString',
            +            'NSMutableArray', 'NSMoveCommand', 'NSMiddleSpecifier',
            +            'NSMethodSignature', 'NSMetadataQueryResultGroup',
            +            'NSMetadataQueryAttributeValueTuple', 'NSMetadataQuery',
            +            'NSMetadataItem', 'NSMessagePortNameServer', 'NSMessagePort',
            +            'NSMapTable', 'NSMachPort', 'NSMachBootstrapServer',
            +            'NSLogicalTest', 'NSLock', 'NSLocale', 'NSKeyedUnarchiver',
            +            'NSKeyedArchiver', 'NSInvocationOperation', 'NSInvocation',
            +            'NSInputStream', 'NSIndexSpecifier', 'NSIndexSet', 'NSIndexPath',
            +            'NSHTTPURLResponse', 'NSHTTPCookieStorage', 'NSHTTPCookie',
            +            'NSHost', 'NSHashTable', 'NSGetCommand', 'NSGarbageCollector',
            +            'NSFormatter', 'NSFileManager', 'NSFileHandle', 'NSExpression',
            +            'NSExistsCommand', 'NSException', 'NSError', 'NSEnumerator',
            +            'NSDistributedNotificationCenter', 'NSDistributedLock',
            +            'NSDistantObjectRequest', 'NSDistantObject',
            +            'NSDirectoryEnumerator', 'NSDictionary', 'NSDeserializer',
            +            'NSDeleteCommand', 'NSDecimalNumberHandler', 'NSDecimalNumber',
            +            'NSDateFormatter', 'NSDateComponents', 'NSDate', 'NSData',
            +            'NSCreateCommand', 'NSCountedSet', 'NSCountCommand', 'NSConnection',
            +            'NSConditionLock', 'NSCondition', 'NSCompoundPredicate',
            +            'NSComparisonPredicate', 'NSCoder', 'NSCloseCommand',
            +            'NSCloneCommand', 'NSClassDescription', 'NSCharacterSet',
            +            'NSCalendarDate', 'NSCalendar', 'NSCachedURLResponse', 'NSBundle',
            +            'NSAutoreleasePool', 'NSAttributedString', 'NSAssertionHandler',
            +            'NSArray', 'NSArchiver', 'NSAppleScript', 'NSAppleEventManager',
            +            'NSAppleEventDescriptor', 'NSAffineTransform'
            +            ),
            +        // Foundation protocols
            +        6 => array(
            +            'NSURLProtocolClient', 'NSURLHandleClient', 'NSURLClient',
            +            'NSURLAuthenticationChallengeSender', 'NSScriptObjectSpecifiers',
            +            'NSScriptKeyValueCoding', 'NSScriptingComparisonMethods',
            +            'NSObjCTypeSerializationCallBack', 'NSMutableCopying',
            +            'NSLocking', 'NSKeyValueObserving', 'NSKeyValueCoding',
            +            'NSFastEnumeration', 'NSErrorRecoveryAttempting',
            +            'NSDecimalNumberBehaviors', 'NSCopying', 'NSComparisonMethods',
            +            'NSCoding'
            +            ),
            +        // AppKit classes
            +        7 => array(
            +            'NSWorkspace', 'NSWindowController', 'NSWindow', 'NSViewController',
            +            'NSViewAnimation', 'NSView', 'NSUserDefaultsController',
            +            'NSTypesetter', 'NSTreeNode', 'NSTreeController', 'NSTrackingArea',
            +            'NSToolbarItemGroup', 'NSToolbarItem', 'NSToolbar',
            +            'NSTokenFieldCell', 'NSTokenField', 'NSTextView',
            +            'NSTextTableBlock', 'NSTextTable', 'NSTextTab', 'NSTextStorage',
            +            'NSTextList', 'NSTextFieldCell', 'NSTextField', 'NSTextContainer',
            +            'NSTextBlock', 'NSTextAttachmentCell', 'NSTextAttachment', 'NSText',
            +            'NSTabViewItem', 'NSTabView', 'NSTableView', 'NSTableHeaderView',
            +            'NSTableHeaderCell', 'NSTableColumn', 'NSStepperCell', 'NSStepper',
            +            'NSStatusItem', 'NSStatusBar', 'NSSplitView', 'NSSpellChecker',
            +            'NSSpeechSynthesizer', 'NSSpeechRecognizer', 'NSSound',
            +            'NSSliderCell', 'NSSlider', 'NSSimpleHorizontalTypesetter',
            +            'NSShadow', 'NSSegmentedControl', 'NSSegmentedCell',
            +            'NSSecureTextFieldCell', 'NSSecureTextField', 'NSSearchFieldCell',
            +            'NSSearchField', 'NSScrollView', 'NSScroller', 'NSScreen',
            +            'NSSavePanel', 'NSRulerView', 'NSRulerMarker', 'NSRuleEditor',
            +            'NSResponder', 'NSQuickDrawView', 'NSProgressIndicator',
            +            'NSPrintPanel', 'NSPrintOperation', 'NSPrintInfo', 'NSPrinter',
            +            'NSPredicateEditorRowTemplate', 'NSPredicateEditor',
            +            'NSPopUpButtonCell', 'NSPopUpButton', 'NSPICTImageRep',
            +            'NSPersistentDocument', 'NSPDFImageRep', 'NSPathControl',
            +            'NSPathComponentCell', 'NSPathCell', 'NSPasteboard',
            +            'NSParagraphStyle', 'NSPanel', 'NSPageLayout', 'NSOutlineView',
            +            'NSOpenPanel', 'NSOpenGLView', 'NSOpenGLPixelFormat',
            +            'NSOpenGLPixelBuffer', 'NSOpenGLContext', 'NSObjectController',
            +            'NSNibOutletConnector', 'NSNibControlConnector', 'NSNibConnector',
            +            'NSNib', 'NSMutableParagraphStyle', 'NSMovieView', 'NSMovie',
            +            'NSMenuView', 'NSMenuItemCell', 'NSMenuItem', 'NSMenu', 'NSMatrix',
            +            'NSLevelIndicatorCell', 'NSLevelIndicator', 'NSLayoutManager',
            +            'NSInputServer', 'NSInputManager', 'NSImageView', 'NSImageRep',
            +            'NSImageCell', 'NSImage', 'NSHelpManager', 'NSGraphicsContext',
            +            'NSGradient', 'NSGlyphInfo', 'NSGlyphGenerator', 'NSFormCell',
            +            'NSForm', 'NSFontPanel', 'NSFontManager', 'NSFontDescriptor',
            +            'NSFont', 'NSFileWrapper', 'NSEvent', 'NSEPSImageRep', 'NSDrawer',
            +            'NSDocumentController', 'NSDocument', 'NSDockTile',
            +            'NSDictionaryController', 'NSDatePickerCell', 'NSDatePicker',
            +            'NSCustomImageRep', 'NSCursor', 'NSController', 'NSControl',
            +            'NSComboBoxCell', 'NSComboBox', 'NSColorWell', 'NSColorSpace',
            +            'NSColorPicker', 'NSColorPanel', 'NSColorList', 'NSColor',
            +            'NSCollectionViewItem', 'NSCollectionView', 'NSClipView',
            +            'NSCIImageRep', 'NSCell', 'NSCachedImageRep', 'NSButtonCell',
            +            'NSButton', 'NSBrowserCell', 'NSBrowser', 'NSBox',
            +            'NSBitmapImageRep', 'NSBezierPath', 'NSATSTypesetter',
            +            'NSArrayController', 'NSApplication', 'NSAnimationContext',
            +            'NSAnimation', 'NSAlert', 'NSActionCell'
            +            ),
            +        // AppKit protocols
            +        8 => array(
            +            'NSWindowScripting', 'NSValidatedUserInterfaceItem',
            +            'NSUserInterfaceValidations', 'NSToolTipOwner',
            +            'NSToolbarItemValidation', 'NSTextInput',
            +            'NSTableDataSource', 'NSServicesRequests',
            +            'NSPrintPanelAccessorizing', 'NSPlaceholders',
            +            'NSPathControlDelegate', 'NSPathCellDelegate',
            +            'NSOutlineViewDataSource', 'NSNibAwaking', 'NSMenuValidation',
            +            'NSKeyValueBindingCreation', 'NSInputServiceProvider',
            +            'NSInputServerMouseTracker', 'NSIgnoreMisspelledWords',
            +            'NSGlyphStorage', 'NSFontPanelValidation', 'NSEditorRegistration',
            +            'NSEditor', 'NSDraggingSource', 'NSDraggingInfo',
            +            'NSDraggingDestination', 'NSDictionaryControllerKeyValuePair',
            +            'NSComboBoxDataSource', 'NSComboBoxCellDataSource',
            +            'NSColorPickingDefault', 'NSColorPickingCustom', 'NSChangeSpelling',
            +            'NSAnimatablePropertyContainer', 'NSAccessibility'
            +            ),
            +        // CoreData classes
            +        9 => array(
            +            'NSRelationshipDescription', 'NSPropertyMapping',
            +            'NSPropertyDescription', 'NSPersistentStoreCoordinator',
            +            'NSPersistentStore', 'NSMigrationManager', 'NSMappingModel',
            +            'NSManagedObjectModel', 'NSManagedObjectID',
            +            'NSManagedObjectContext', 'NSManagedObject',
            +            'NSFetchRequestExpression', 'NSFetchRequest',
            +            'NSFetchedPropertyDescription', 'NSEntityMigrationPolicy',
            +            'NSEntityMapping', 'NSEntityDescription', 'NSAttributeDescription',
            +            'NSAtomicStoreCacheNode', 'NSAtomicStore'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => true,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        5 => true,
            +        6 => true,
            +        7 => true,
            +        8 => true,
            +        9 => true
            +        ),
            +    // Define the colors for the groups listed above
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #a61390;', // Objective-C keywords
            +            2 => 'color: #a61390;', // Macros and constants
            +            3 => 'color: #a61390;', // C standard library functions
            +            4 => 'color: #a61390;', // data types
            +            5 => 'color: #400080;', // Foundation classes
            +            6 => 'color: #2a6f76;', // Foundation protocols
            +            7 => 'color: #400080;', // AppKit classes
            +            8 => 'color: #2a6f76;', // AppKit protocols
            +            9 => 'color: #400080;' // CoreData classes
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #6e371a;', // Preprocessor directives
            +            2 => 'color: #11740a; font-style: italic;', // Normal C single-line comments
            +            3 => 'color: #bf1d1a;', // Q-sign in front of Strings
            +            'MULTI' => 'color: #11740a; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #2400d9;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #002200;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #bf1d1a;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #2400d9;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #002200;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => 'http://www.opengroup.org/onlinepubs/009695399/functions/{FNAME}.html',
            +        4 => '',
            +        5 => 'http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/{FNAME}_Class/',
            +        6 => 'http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Protocols/{FNAME}_Protocol/',
            +        7 => 'http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/{FNAME}_Class/',
            +        8 => 'http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Protocols/{FNAME}_Protocol/',
            +        9 => 'http://developer.apple.com/documentation/Cocoa/Reference/CoreDataFramework/Classes/{FNAME}_Class/'
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/objeck.php b/vendor/easybook/geshi/geshi/objeck.php
            new file mode 100644
            index 0000000000..d0e3ae42b7
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/objeck.php
            @@ -0,0 +1,115 @@
            + 'Objeck Programming Language',
            +    'COMMENT_SINGLE' => array(1 => '#'),
            +    'COMMENT_MULTI' => array('#~' => '~#'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'virtual', 'if', 'else', 'do', 'while', 'use', 'bundle', 'native',
            +            'static', 'public', 'private', 'class', 'function', 'method',
            +            'select', 'other', 'enum', 'for', 'each', 'label', 'return', 'from'
            +            ),
            +        2 => array(
            +            'Byte', 'Int', 'Nil', 'Float', 'Char', 'Bool', 'String'
            +            ),
            +        3 => array(
            +            'true', 'false'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        1 => array(
            +            '(', ')', '{', '}', '[', ']', '+', '-', '*', '/', '%', '=', '<', '>', '&', '|', ':', ';', ',', '+=', '-=', '*=', '/=',
            +            )
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;',
            +            2 => 'color: #b1b100;',
            +            3 => 'color: #b1b100;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; font-style: italic;',
            +            'MULTI' => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #0000ff;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;',
            +            ),
            +        'METHODS' => array(
            +            0 => 'color: #004000;'
            +            ),
            +        'SYMBOLS' => array(
            +            1 => 'color: #339933;'
            +            ),
            +        'REGEXPS' => array(),
            +        'SCRIPT' => array()
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '->'
            +        ),
            +    'REGEXPS' => array(),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(),
            +    'HIGHLIGHT_STRICT_BLOCK' => array()
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/ocaml-brief.php b/vendor/easybook/geshi/geshi/ocaml-brief.php
            new file mode 100644
            index 0000000000..c5fee2feca
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/ocaml-brief.php
            @@ -0,0 +1,110 @@
            + 'OCaml (brief)',
            +    'COMMENT_SINGLE' => array(),
            +    'COMMENT_MULTI' => array('(*' => '*)'),
            +    'CASE_KEYWORDS' => 0,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => "",
            +    'KEYWORDS' => array(
            +        /* main OCaml keywords */
            +        1 => array(
            +            'and', 'as', 'asr', 'begin', 'class', 'closed', 'constraint', 'do', 'done', 'downto', 'else',
            +            'end', 'exception', 'external', 'failwith', 'false', 'flush', 'for', 'fun', 'function', 'functor',
            +            'if', 'in', 'include', 'inherit',  'incr', 'land', 'let', 'load', 'los', 'lsl', 'lsr', 'lxor',
            +            'match', 'method', 'mod', 'module', 'mutable', 'new', 'not', 'of', 'open', 'option', 'or', 'parser',
            +            'private', 'ref', 'rec', 'raise', 'regexp', 'sig', 'struct', 'stdout', 'stdin', 'stderr', 'then',
            +            'to', 'true', 'try', 'type', 'val', 'virtual', 'when', 'while', 'with'
            +            )
            +        ),
            +    /* highlighting symbols is really important in OCaml */
            +    'SYMBOLS' => array(
            +        ';', '!', ':', '.', '=', '%', '^', '*', '-', '/', '+',
            +        '>', '<', '(', ')', '[', ']', '&', '|', '#', "'"
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #06c; font-weight: bold;' /* nice blue */
            +            ),
            +        'COMMENTS' => array(
            +            'MULTI' => 'color: #5d478b; font-style: italic;' /* light purple */
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #6c6;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #3cb371;' /* nice green */
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #c6c;' /* pink */
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #060;' /* dark green */
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #a52a2a;' /* maroon */
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/ocaml.php b/vendor/easybook/geshi/geshi/ocaml.php
            new file mode 100644
            index 0000000000..6d63b0dd8a
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/ocaml.php
            @@ -0,0 +1,186 @@
            + 'OCaml',
            +    'COMMENT_SINGLE' => array(),
            +    'COMMENT_MULTI' => array('(*' => '*)'),
            +    'COMMENT_REGEXP' => array(1 => '/\(\*(?:(?R)|.)+?\*\)/s'),
            +    'CASE_KEYWORDS' => 0,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => "",
            +    'KEYWORDS' => array(
            +        /* main OCaml keywords */
            +        1 => array(
            +            'and', 'as', 'asr', 'begin', 'class', 'closed', 'constraint', 'do', 'done', 'downto', 'else',
            +            'end', 'exception', 'external', 'failwith', 'false', 'for', 'fun', 'function', 'functor',
            +            'if', 'in', 'include', 'inherit',  'incr', 'land', 'let', 'load', 'los', 'lsl', 'lsr', 'lxor',
            +            'match', 'method', 'mod', 'module', 'mutable', 'new', 'not', 'of', 'open', 'option', 'or', 'parser',
            +            'private', 'ref', 'rec', 'raise', 'regexp', 'sig', 'struct', 'stdout', 'stdin', 'stderr', 'then',
            +            'to', 'true', 'try', 'type', 'val', 'virtual', 'when', 'while', 'with'
            +            ),
            +        /* define names of main librarys, so we can link to it */
            +        2 => array(
            +            'Arg', 'Arith_status', 'Array', //'Array1', 'Array2', 'Array3',
            +            'ArrayLabels', 'Big_int', 'Bigarray', 'Buffer', 'Callback',
            +            'CamlinternalLazy', 'CamlinternalMod', 'CamlinternalOO', 'Char',
            +            'Complex', 'Condition', 'Dbm', 'Digest', 'Dynlink', 'Event',
            +            'Filename', 'Format', 'Gc', 'Genlex', 'Graphics', 'GraphicsX11',
            +            'Hashtbl', 'Int32', 'Int64', 'Lazy', 'Lexing', 'List', 'ListLabels',
            +            'Map', 'Marshal', 'MoreLabels', 'Mutex', 'Nativeint', 'Num', 'Obj',
            +            'Oo', 'Parsing', 'Pervasives', 'Printexc', 'Printf', 'Queue',
            +            'Random', 'Scanf', 'Set', 'Sort', 'Stack', 'StdLabels', 'Str',
            +            'Stream', 'String', 'StringLabels', 'Sys', 'Thread', 'ThreadUnix',
            +            'Tk', 'Unix', 'UnixLabels', 'Weak'
            +            ),
            +        /* just link to the Pervasives functions library, cause it's the default opened library when starting OCaml */
            +        3 => array(
            +            'abs', 'abs_float', 'acos', 'asin', 'at_exit', 'atan', 'atan2',
            +            'bool_of_string', 'ceil', 'char_of_int', 'classify_float',
            +            'close_in', 'close_in_noerr', 'close_out', 'close_out_noerr',
            +            'compare', 'cos', 'cosh', 'decr', 'epsilon_float', 'exit', 'exp',
            +            'float', 'float_of_int', 'float_of_string', 'floor', 'flush',
            +            'flush_all', 'format_of_string', 'frexp', 'fst', 'ignore',
            +            'in_channel_length', 'infinity', 'input', 'input_binary_int',
            +            'input_byte', 'input_char', 'input_line', 'input_value',
            +            'int_of_char', 'int_of_float', 'int_of_string', 'invalid_arg',
            +            'ldexp', 'log', 'log10', 'max', 'max_float', 'max_int', 'min',
            +            'min_float', 'min_int', 'mod_float', 'modf', 'nan', 'open_in',
            +            'open_in_bin', 'open_in_gen', 'open_out', 'open_out_bin',
            +            'open_out_gen', 'out_channel_length', 'output', 'output_binary_int',
            +            'output_byte', 'output_char', 'output_string', 'output_value',
            +            'pos_in', 'pos_out',  'pred', 'prerr_char', 'prerr_endline',
            +            'prerr_float', 'prerr_int', 'prerr_newline', 'prerr_string',
            +            'print_char', 'print_endline', 'print_float', 'print_int',
            +            'print_newline', 'print_string', 'read_float', 'read_int',
            +            'read_line', 'really_input', 'seek_in', 'seek_out',
            +            'set_binary_mode_in', 'set_binary_mode_out', 'sin', 'sinh', 'snd',
            +            'sqrt', 'string_of_bool', 'string_of_float', 'string_of_format',
            +            'string_of_int', 'succ', 'tan', 'tanh', 'truncate'
            +            ),
            +        /* here Pervasives Types */
            +        4 => array (
            +            'array','bool','char','exn','file_descr','format','fpclass',
            +            'in_channel','int','int32','int64','list','nativeint','open_flag',
            +            'out_channel','string','Sys_error','unit'
            +            ),
            +        /* finally Pervasives Exceptions */
            +        5 => array (
            +            'Exit', 'Invalid_Argument', 'Failure', 'Division_by_zero'
            +            )
            +        ),
            +    /* highlighting symbols is really important in OCaml */
            +    'SYMBOLS' => array(
            +        '+.', '-.', '*.', '/.', '[<', '>]',
            +        ';', '!', ':', '.', '=', '%', '^', '*', '-', '/', '+',
            +        '>', '<', '(', ')', '[', ']', '&', '|', '#', "'",
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => true, /* functions name are case sensitive */
            +        3 => true, /* types name too */
            +        4 => true, /* pervasives types */
            +        5 => true  /* pervasives exceptions */
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #06c; font-weight: bold;', /* nice blue */
            +            2 => 'color: #06c; font-weight: bold;', /* nice blue */
            +            3 => 'color: #06c; font-weight: bold;', /* nice blue */
            +            4 => 'color: #06c; font-weight: bold;', /* nice blue */
            +            5 => 'color: #06c; font-weight: bold;' /* nice blue */
            +            ),
            +        'COMMENTS' => array(
            +            'MULTI' => 'color: #5d478b; font-style: italic;', /* light purple */
            +            1 => 'color: #5d478b; font-style: italic;' /* light purple */
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #a52a2a;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #3cb371;' /* nice green */
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #c6c;' /* pink */
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #060;' /* dark green */
            +            ),
            +        'REGEXPS' => array(
            +            1 => 'font-weight:bold; color:#339933;',
            +            2 => 'font-weight:bold; color:#993399;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #a52a2a;' /* maroon */
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        /* some of keywords are Pervasives functions (land, lxor, asr, ...) */
            +        1 => '',
            +        /* link to the wanted library */
            +        2 => 'http://caml.inria.fr/pub/docs/manual-ocaml/libref/{FNAME}.html',
            +        /* link to Pervasives functions */
            +        3 => 'http://caml.inria.fr/pub/docs/manual-ocaml/libref/Pervasives.html#VAL{FNAME}',
            +        /* link to Pervasives type */
            +        4 => 'http://caml.inria.fr/pub/docs/manual-ocaml/libref/Pervasives.html#TYPE{FNAME}',
            +        /* link to Pervasives exceptions */
            +        5 => 'http://caml.inria.fr/pub/docs/manual-ocaml/libref/Pervasives.html#EXCEPTION{FNAME}'
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        1 => '~\w+',
            +        2 => '`(?=(?-i:[a-z]))\w*',
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/octave.php b/vendor/easybook/geshi/geshi/octave.php
            new file mode 100644
            index 0000000000..7bab9b1389
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/octave.php
            @@ -0,0 +1,513 @@
            + 'GNU Octave',
            +    'COMMENT_SINGLE' => array(1 => '#', 2 => '%'),
            +    // we can't use COMMENT_MULTI since start and end of block comments need to
            +    // be alone on the line (optionally, with whitespace). See COMMENT_REGEXP
            +    'COMMENT_MULTI' => array(),
            +    // we can't use QUOTEMARKS, not even HARDQUOTE, see COMMENT_REGEXP
            +    'QUOTEMARKS' => array(),
            +    'ESCAPE_CHAR' => '',
            +    'COMMENT_REGEXP' => array(
            +        // Single quote strings: we can't use QUOTEMARKS here since new
            +        // lines will break the string. Plus, single quote strings do not even
            +        // allow for continuation markers, only double quote strings allow it.
            +        // Also, to do not misdetect the transpose operator ' as the start of a
            +        // string we assert to not follow a variable name (letters, digits and
            +        // underscores) or a closing bracket (round, square or curly) or a dot
            +        // (to form the array transpose operator ".'" ).
            +        3 => "/(? '/"(.|(\.\.\.|\\\)(\s)*?\n)*?(? "/^\s*?[%#]{\s*?$.*?^\s*?[%#]}\s*?$/ms",
            +        // Packaging system: comes here so that pkg can also be used in the
            +        // function form. The list of pkg commands is optional to the match so
            +        // that at least pkg is highlighted if new commands are implemented
            +        6 => "/\bpkg(?!\s*\()\s+((un)?install|update|(un)?load|list|(global|local)_list|describe|prefix|(re)?build)?\b/",
            +        // Function handles
            +        7 => "/@([a-z_][a-z1-9_]*)?/i",
            +        ),
            +    'NUMBERS' =>
            +        GESHI_NUMBER_INT_BASIC |
            +        GESHI_NUMBER_OCT_PREFIX |
            +        GESHI_NUMBER_HEX_PREFIX |
            +        GESHI_NUMBER_FLT_SCI_ZERO,
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'KEYWORDS' => array(
            +        // Data types
            +        1 => array(
            +            'cell', 'char', 'double', 'uint8', 'uint16', 'uint32', 'uint64',
            +            'int8','int16', 'int32', 'int64', 'logical', 'single', 'struct'
            +            ),
            +        // Storage type
            +        2 => array(
            +            'global', 'persistent', 'static'
            +            ),
            +        // Internal variable
            +        3 => array(
            +            'ans'
            +            ),
            +        // Reserved words
            +        4 => array(
            +            'break', 'case', 'catch', 'continue', 'do', 'else', 'elseif', 'end',
            +            'end_try_catch', 'end_unwind_protect', 'endfor', 'endfunction',
            +            'endif', 'endparfor', 'endswitch', 'endwhile', 'for', 'function',
            +            'if', 'otherwise', 'parfor', 'return',
            +            'switch', 'try', 'until', 'unwind_protect',
            +            'unwind_protect_cleanup', 'varargin', 'varargout', 'while'
            +            ),
            +        // Built in
            +        5 => array(
            +            'P_tmpdir', 'abs', 'acos', 'acosh',
            +            'add_input_event_hook', 'addlistener', 'addpath', 'addproperty',
            +            'all', 'allow_noninteger_range_as_index', 'and', 'angle', 'any',
            +            'arg', 'argnames', 'argv', 'asin', 'asinh', 'assignin', 'atan',
            +            'atan2', 'atanh', 'atexit', 'autoload', 'available_graphics_toolkits',
            +            'beep_on_error', 'bitand', 'bitmax', 'bitor', 'bitshift', 'bitxor',
            +            'builtin', 'canonicalize_file_name', 'cat', 'cbrt', 'cd', 'ceil',
            +            'cell2struct', 'cellstr', 'chdir', 'class', 'clc',
            +            'clear', 'columns', 'command_line_path', 'completion_append_char',
            +            'completion_matches', 'complex', 'confirm_recursive_rmdir', 'conj',
            +            'cos', 'cosh', 'cputime', 'crash_dumps_octave_core', 'ctranspose',
            +            'cumprod', 'cumsum', 'dbclear', 'dbcont', 'dbdown', 'dbnext',
            +            'dbquit', 'dbstack', 'dbstatus', 'dbstep', 'dbstop', 'dbtype', 'dbup',
            +            'dbwhere', 'debug_on_error', 'debug_on_interrupt', 'debug_on_warning',
            +            'default_save_options', 'dellistener', 'diag', 'diary', 'diff',
            +            'disp', 'do_braindead_shortcircuit_evaluation', 'do_string_escapes',
            +            'doc_cache_file', 'drawnow', 'dup2', 'echo',
            +            'echo_executing_commands', 'edit_history','eq', 'erf', 'erfc',
            +            'erfcx', 'erfinv', 'errno', 'errno_list', 'error', 'eval', 'evalin',
            +            'exec', 'exist', 'exit', 'exp', 'expm1', 'eye', 'fclear',
            +            'fclose', 'fcntl', 'fdisp', 'feof', 'ferror', 'feval', 'fflush',
            +            'fgetl', 'fgets', 'fieldnames', 'file_in_loadpath', 'file_in_path',
            +            'filemarker', 'filesep', 'find_dir_in_path', 'finite', 'fix',
            +            'fixed_point_format', 'floor', 'fmod', 'fnmatch', 'fopen', 'fork',
            +            'format', 'formula', 'fprintf', 'fputs', 'fread', 'freport',
            +            'frewind', 'fscanf', 'fseek', 'fskipl', 'ftell', 'full', 'func2str',
            +            'functions', 'fwrite', 'gamma', 'gammaln', 'ge', 'genpath', 'get',
            +            'get_help_text', 'get_help_text_from_file', 'getegid', 'getenv',
            +            'geteuid', 'getgid', 'gethostname', 'getpgrp', 'getpid', 'getppid',
            +            'getuid', 'glob', 'gt', 'history', 'history_control', 'history_file',
            +            'history_size', 'history_timestamp_format_string', 'home', 'horzcat',
            +            'hypot', 'ifelse', 'ignore_function_time_stamp', 'imag',
            +            'inferiorto', 'info_file', 'info_program', 'inline', 'input',
            +            'intmax', 'intmin', 'ipermute',
            +            'is_absolute_filename', 'is_dq_string', 'is_function_handle',
            +            'is_rooted_relative_filename', 'is_sq_string', 'isalnum', 'isalpha',
            +            'isargout', 'isascii', 'isbool', 'iscell', 'iscellstr', 'ischar',
            +            'iscntrl', 'iscomplex', 'isdebugmode', 'isdigit', 'isempty',
            +            'isfield', 'isfinite', 'isfloat', 'isglobal', 'isgraph', 'ishandle',
            +            'isieee', 'isindex', 'isinf', 'isinteger', 'iskeyword', 'islogical',
            +            'islower', 'ismatrix', 'ismethod', 'isna', 'isnan', 'isnull',
            +            'isnumeric', 'isobject', 'isprint', 'ispunct', 'isreal', 'issorted',
            +            'isspace', 'issparse', 'isstruct', 'isupper', 'isvarname', 'isxdigit',
            +            'kbhit', 'keyboard', 'kill', 'lasterr', 'lasterror', 'lastwarn',
            +            'ldivide', 'le', 'length', 'lgamma', 'link', 'linspace',
            +            'list_in_columns', 'load', 'loaded_graphics_toolkits', 'log', 'log10',
            +            'log1p', 'log2', 'lower', 'lstat', 'lt',
            +            'make_absolute_filename', 'makeinfo_program', 'max_recursion_depth',
            +            'merge', 'methods', 'mfilename', 'minus', 'mislocked',
            +            'missing_function_hook', 'mkdir', 'mkfifo', 'mkstemp', 'mldivide',
            +            'mlock', 'mod', 'more', 'mpower', 'mrdivide', 'mtimes', 'munlock',
            +            'nargin', 'nargout', 'native_float_format', 'ndims', 'ne',
            +            'nfields', 'nnz', 'norm', 'not', 'nth_element', 'numel', 'nzmax',
            +            'octave_config_info', 'octave_core_file_limit',
            +            'octave_core_file_name', 'octave_core_file_options',
            +            'octave_tmp_file_name', 'onCleanup', 'ones',
            +            'optimize_subsasgn_calls', 'or', 'output_max_field_width',
            +            'output_precision', 'page_output_immediately', 'page_screen_output',
            +            'path', 'pathsep', 'pause', 'pclose', 'permute', 'pipe', 'plus',
            +            'popen', 'popen2', 'power', 'print_empty_dimensions',
            +            'print_struct_array_contents', 'printf', 'prod',
            +            'program_invocation_name', 'program_name', 'putenv', 'puts', 'pwd',
            +            'quit', 'rats', 'rdivide', 're_read_readline_init_file',
            +            'read_readline_init_file', 'readdir', 'readlink', 'real', 'realmax',
            +            'realmin', 'register_graphics_toolkit', 'rehash', 'rem',
            +            'remove_input_event_hook', 'rename', 'repelems', 'reset', 'reshape',
            +            'resize', 'restoredefaultpath', 'rethrow', 'rmdir', 'rmfield',
            +            'rmpath', 'round', 'roundb', 'rows', 'run_history', 'save',
            +            'save_header_format_string', 'save_precision', 'saving_history',
            +            'scanf', 'set', 'setenv', 'sighup_dumps_octave_core', 'sign',
            +            'sigterm_dumps_octave_core', 'silent_functions', 'sin',
            +            'sinh', 'size', 'size_equal', 'sizemax', 'sizeof', 'sleep', 'sort',
            +            'source', 'spalloc', 'sparse', 'sparse_auto_mutate',
            +            'split_long_rows', 'sprintf', 'sqrt', 'squeeze', 'sscanf', 'stat',
            +            'stderr', 'stdin', 'stdout', 'str2func', 'strcmp', 'strcmpi',
            +            'string_fill_char', 'strncmp', 'strncmpi', 'struct2cell',
            +            'struct_levels_to_print', 'strvcat', 'subsasgn', 'subsref', 'sum',
            +            'sumsq', 'superiorto', 'suppress_verbose_help_message', 'symlink',
            +            'system', 'tan', 'tanh', 'terminal_size', 'tic', 'tilde_expand',
            +            'times', 'tmpfile', 'tmpnam', 'toascii', 'toc', 'tolower', 'toupper',
            +            'transpose', 'typeinfo',
            +            'umask', 'uminus', 'uname', 'undo_string_escapes', 'unlink',
            +            'uplus', 'upper', 'usage', 'usleep', 'vec', 'vectorize', 'vertcat',
            +            'waitfor', 'waitpid', 'warning', 'warranty', 'who', 'whos',
            +            'whos_line_format', 'yes_or_no', 'zeros'
            +            ),
            +        // Octave functions
            +        6 => array(
            +            'accumarray', 'accumdim', 'acosd', 'acot', 'acotd', 'acoth', 'acsc',
            +            'acscd', 'acsch', 'addpref', 'addtodate', 'allchild', 'amd',
            +            'ancestor', 'anova', 'arch_fit', 'arch_rnd', 'arch_test',
            +            'area', 'arma_rnd', 'asctime', 'asec', 'asecd', 'asech', 'asind',
            +            'assert', 'atand', 'autoreg_matrix', 'autumn',
            +            'axes', 'axis', 'balance', 'bar', 'barh', 'bartlett', 'bartlett_test',
            +            'base2dec', 'beep', 'bessel', 'besselj', 'beta', 'betacdf',
            +            'betainc', 'betainv', 'betaln', 'betapdf', 'betarnd', 'bicg',
            +            'bicgstab', 'bicubic', 'bin2dec', 'bincoeff', 'binocdf', 'binoinv',
            +            'binopdf', 'binornd', 'bitcmp', 'bitget', 'bitset', 'blackman',
            +            'blanks', 'blkdiag', 'bone', 'box', 'brighten', 'bsxfun',
            +            'bug_report', 'bunzip2', 'bzip2', 'calendar', 'cart2pol', 'cart2sph',
            +            'cast', 'cauchy_cdf', 'cauchy_inv', 'cauchy_pdf', 'cauchy_rnd',
            +            'caxis', 'ccolamd', 'cell2mat', 'celldisp', 'cellfun',
            +            'center', 'cgs', 'chi2cdf', 'chi2inv', 'chi2pdf', 'chi2rnd',
            +            'chisquare_test_homogeneity', 'chisquare_test_independence', 'chol',
            +            'chop', 'circshift', 'cla', 'clabel', 'clf', 'clock',
            +            'cloglog', 'close', 'closereq', 'colamd', 'colloc', 'colon',
            +            'colorbar', 'colormap', 'colperm', 'colstyle', 'comet', 'comet3',
            +            'comma', 'common_size', 'commutation_matrix', 'compan',
            +            'compare_versions', 'compass', 'computer', 'cond', 'condest',
            +            'contour', 'contour3', 'contourc', 'contourf', 'contrast', 'conv',
            +            'conv2', 'convhull', 'convhulln', 'cool', 'copper', 'copyfile',
            +            'cor_test', 'corr', 'cosd', 'cot', 'cotd', 'coth', 'cov',
            +            'cplxpair', 'cross', 'csc', 'cscd', 'csch', 'cstrcat',
            +            'csvread', 'csvwrite', 'ctime', 'cumtrapz', 'curl', 'cylinder',
            +            'daspect', 'daspk', 'dasrt', 'dassl', 'date', 'datenum', 'datestr',
            +            'datetick', 'datevec', 'dblquad', 'deal', 'deblank', 'debug',
            +            'dec2base', 'dec2bin', 'dec2hex', 'deconv', 'del2', 'delaunay',
            +            'delaunay3', 'delaunayn', 'delete', 'demo', 'det', 'detrend',
            +            'diffpara', 'diffuse', 'dir', 'discrete_cdf', 'discrete_inv',
            +            'discrete_pdf', 'discrete_rnd', 'display', 'divergence',
            +            'dlmread', 'dlmwrite', 'dmperm', 'doc', 'dos', 'dot', 'dsearch',
            +            'dsearchn', 'dump_prefs', 'duplication_matrix', 'durbinlevinson',
            +            'edit', 'eig', 'eigs', 'ellipsoid', 'empirical_cdf', 'empirical_inv',
            +            'empirical_pdf', 'empirical_rnd', 'eomday', 'errorbar',
            +            'etime', 'etreeplot', 'example', 'expcdf', 'expinv', 'expm', 'exppdf',
            +            'exprnd', 'ezcontour', 'ezcontourf', 'ezmesh', 'ezmeshc', 'ezplot',
            +            'ezplot3', 'ezpolar', 'ezsurf', 'ezsurfc', 'f_test_regression',
            +            'fact', 'factor', 'factorial', 'fail', 'fcdf', 'feather', 'fft',
            +            'fft2', 'fftconv', 'fftfilt', 'fftn', 'fftshift', 'fftw', 'figure',
            +            'fileattrib', 'fileparts', 'fileread', 'fill', 'filter', 'filter2',
            +            'find', 'findall', 'findobj', 'findstr', 'finv', 'flag', 'flipdim',
            +            'fliplr', 'flipud', 'fminbnd', 'fminunc', 'fpdf', 'fplot',
            +            'fractdiff', 'freqz', 'freqz_plot', 'frnd', 'fsolve',
            +            'fullfile', 'fzero', 'gamcdf', 'gaminv', 'gammainc',
            +            'gampdf', 'gamrnd', 'gca', 'gcbf', 'gcbo', 'gcd', 'gcf',
            +            'gen_doc_cache', 'genvarname', 'geocdf', 'geoinv', 'geopdf', 'geornd',
            +            'get_first_help_sentence', 'getappdata', 'getfield', 'getgrent',
            +            'getpref', 'getpwent', 'getrusage', 'ginput', 'givens', 'glpk',
            +            'gls', 'gmap40', 'gmres', 'gnuplot_binary', 'gplot',
            +            'gradient', 'graphics_toolkit', 'gray', 'gray2ind', 'grid',
            +            'griddata', 'griddata3', 'griddatan', 'gtext', 'guidata',
            +            'guihandles', 'gunzip', 'gzip', 'hadamard', 'hamming', 'hankel',
            +            'hanning', 'help', 'hess', 'hex2dec', 'hex2num', 'hggroup', 'hidden',
            +            'hilb', 'hist', 'histc', 'hold', 'hot', 'hotelling_test',
            +            'hotelling_test_2', 'housh', 'hsv', 'hsv2rgb', 'hurst', 'hygecdf',
            +            'hygeinv', 'hygepdf', 'hygernd', 'idivide', 'ifftshift', 'image',
            +            'imagesc', 'imfinfo', 'imread', 'imshow', 'imwrite', 'ind2gray',
            +            'ind2rgb', 'index', 'info', 'inpolygon', 'inputname', 'int2str',
            +            'interp1', 'interp1q', 'interp2', 'interp3', 'interpft', 'interpn',
            +            'intersect', 'inv', 'invhilb', 'iqr',
            +            'is_leap_year', 'is_valid_file_id',
            +            'isa', 'isappdata', 'iscolumn', 'isdefinite', 'isdeployed', 'isdir',
            +            'isequal', 'isequalwithequalnans', 'isfigure', 'ishermitian',
            +            'ishghandle', 'ishold', 'isletter', 'ismac', 'ismember', 'isocolors',
            +            'isonormals', 'isosurface', 'ispc', 'ispref', 'isprime', 'isprop',
            +            'isrow', 'isscalar', 'issquare', 'isstrprop', 'issymmetric',
            +            'isunix', 'isvector', 'jet', 'kendall', 'kolmogorov_smirnov_cdf',
            +            'kolmogorov_smirnov_test', 'kolmogorov_smirnov_test_2', 'kron',
            +            'kruskal_wallis_test', 'krylov', 'kurtosis', 'laplace_cdf',
            +            'laplace_inv', 'laplace_pdf', 'laplace_rnd', 'lcm', 'legend',
            +            'legendre', 'license', 'lin2mu', 'line', 'linkprop', 'list_primes',
            +            'loadaudio', 'loadobj', 'logistic_cdf', 'logistic_inv',
            +            'logistic_pdf', 'logistic_regression', 'logistic_rnd', 'logit',
            +            'loglog', 'loglogerr', 'logm', 'logncdf', 'logninv', 'lognpdf',
            +            'lognrnd', 'logspace', 'lookfor', 'lookup', 'ls', 'ls_command',
            +            'lsode', 'lsqnonneg', 'lu', 'luinc', 'magic', 'mahalanobis', 'manova',
            +            'mat2str', 'matlabroot', 'matrix_type', 'max', 'mcnemar_test',
            +            'md5sum', 'mean', 'meansq', 'median', 'menu', 'mesh', 'meshc',
            +            'meshgrid', 'meshz', 'mex', 'mexext', 'mgorth', 'mkoctfile', 'mkpp',
            +            'mode', 'moment', 'movefile', 'mpoles', 'mu2lin', 'namelengthmax',
            +            'nargchk', 'narginchk', 'nargoutchk', 'nbincdf', 'nbininv', 'nbinpdf',
            +            'nbinrnd', 'nchoosek', 'ndgrid', 'newplot', 'news', 'nextpow2',
            +            'nonzeros', 'normcdf', 'normest', 'norminv', 'normpdf', 'normrnd',
            +            'now', 'nproc', 'nthargout', 'nthroot', 'ntsc2rgb', 'null', 'num2str',
            +            'ocean', 'ols', 'onenormest', 'optimget', 'optimset', 'orderfields',
            +            'orient', 'orth', 'pack', 'paren', 'pareto', 'parseparams', 'pascal',
            +            'patch', 'pathdef', 'pbaspect', 'pcg', 'pchip', 'pcolor', 'pcr',
            +            'peaks', 'periodogram', 'perl', 'perms', 'pie', 'pie3',
            +            'pink', 'pinv', 'pkg', 'planerot', 'playaudio', 'plot', 'plot3',
            +            'plotmatrix', 'plotyy', 'poisscdf', 'poissinv', 'poisspdf',
            +            'poissrnd', 'pol2cart', 'polar', 'poly', 'polyaffine', 'polyarea',
            +            'polyder', 'polyfit', 'polygcd', 'polyint', 'polyout',
            +            'polyreduce', 'polyval', 'polyvalm', 'postpad', 'pow2', 'powerset',
            +            'ppder', 'ppint', 'ppjumps', 'ppplot', 'ppval', 'pqpnonneg',
            +            'prctile', 'prepad', 'primes', 'print', 'printAllBuiltins',
            +            'print_usage', 'prism', 'probit', 'profexplore', 'profile',
            +            'profshow', 'prop_test_2', 'python', 'qp', 'qqplot', 'qr', 'quad',
            +            'quadcc', 'quadgk', 'quadl', 'quadv', 'quantile', 'quiver', 'quiver3',
            +            'qz', 'qzhess', 'rainbow', 'rand', 'randi', 'range', 'rank', 'ranks',
            +            'rat', 'rcond', 'reallog', 'realpow', 'realsqrt', 'record',
            +            'rectangle', 'rectint', 'recycle', 'refresh', 'refreshdata', 'regexp',
            +            'regexptranslate', 'repmat', 'residue', 'rgb2hsv',
            +            'rgb2ind', 'rgb2ntsc', 'ribbon', 'rindex', 'rmappdata', 'rmpref',
            +            'roots', 'rose', 'rosser', 'rot90', 'rotdim', 'rref', 'run',
            +            'run_count', 'run_test', 'rundemos', 'runlength', 'runtests',
            +            'saveas', 'saveaudio', 'saveobj', 'savepath', 'scatter',
            +            'scatter3', 'schur', 'sec', 'secd', 'sech', 'semicolon', 'semilogx',
            +            'semilogxerr', 'semilogy', 'semilogyerr', 'setappdata', 'setaudio',
            +            'setdiff', 'setfield', 'setpref', 'setxor', 'shading',
            +            'shg', 'shift', 'shiftdim', 'sign_test', 'sinc', 'sind',
            +            'sinetone', 'sinewave', 'skewness', 'slice', 'sombrero', 'sortrows',
            +            'spaugment', 'spconvert', 'spdiags', 'spearman', 'spectral_adf',
            +            'spectral_xdf', 'specular', 'speed', 'spencer', 'speye', 'spfun',
            +            'sph2cart', 'sphere', 'spinmap', 'spline', 'spones', 'spparms',
            +            'sprand', 'sprandn', 'sprandsym', 'spring', 'spstats', 'spy', 'sqp',
            +            'sqrtm', 'stairs', 'statistics', 'std', 'stdnormal_cdf',
            +            'stdnormal_inv', 'stdnormal_pdf', 'stdnormal_rnd', 'stem', 'stem3',
            +            'stft', 'str2double', 'str2num', 'strcat', 'strchr',
            +            'strfind', 'strjust', 'strmatch', 'strread', 'strsplit', 'strtok',
            +            'strtrim', 'strtrunc', 'structfun', 'sub2ind',
            +            'subplot', 'subsindex', 'subspace', 'substr', 'substruct', 'summer',
            +            'surf', 'surface', 'surfc', 'surfl', 'surfnorm', 'svd', 'svds',
            +            'swapbytes', 'syl', 'symbfact', 'symrcm',
            +            'symvar', 'synthesis', 't_test', 't_test_2', 't_test_regression',
            +            'table', 'tand', 'tar', 'tcdf', 'tempdir', 'tempname', 'test', 'text',
            +            'textread', 'textscan', 'time', 'tinv', 'title', 'toeplitz', 'tpdf',
            +            'trace', 'trapz', 'treelayout', 'treeplot', 'tril', 'trimesh',
            +            'triplequad', 'triplot', 'trisurf', 'trnd', 'tsearch', 'tsearchn',
            +            'type', 'typecast', 'u_test', 'uicontextmenu', 'uicontrol',
            +            'uigetdir', 'uigetfile', 'uimenu', 'uipanel', 'uipushtool',
            +            'uiputfile', 'uiresume', 'uitoggletool', 'uitoolbar', 'uiwait',
            +            'unidcdf', 'unidinv', 'unidpdf', 'unidrnd', 'unifcdf', 'unifinv',
            +            'unifpdf', 'unifrnd', 'unimplemented', 'union', 'unique', 'unix',
            +            'unmkpp', 'unpack', 'untabify', 'untar', 'unwrap', 'unzip',
            +            'urlwrite', 'usejava', 'validatestring', 'vander', 'var',
            +            'var_test', 'vech', 'ver', 'version', 'view', 'voronoi', 'voronoin',
            +            'waitbar', 'waitforbuttonpress', 'warning_ids', 'wavread', 'wavwrite',
            +            'wblcdf', 'wblinv', 'wblpdf', 'wblrnd', 'weekday',
            +            'welch_test', 'what', 'which',
            +            'white', 'whitebg', 'wienrnd', 'wilcoxon_test', 'wilkinson', 'winter',
            +            'xlabel', 'xlim', 'xor', 'ylabel', 'ylim', 'yulewalker', 'z_test',
            +            'z_test_2', 'zip', 'zlabel', 'zlim', 'zscore', 'airy', 'arrayfun',
            +            'besselh', 'besseli', 'besselk', 'bessely', 'bitpack', 'bitunpack',
            +            'blkmm', 'cellindexmat', 'cellslices', 'chol2inv', 'choldelete',
            +            'cholinsert', 'cholinv', 'cholshift', 'cholupdate', 'convn',
            +            'csymamd', 'cummax', 'cummin', 'daspk_options', 'dasrt_options',
            +            'dassl_options', 'endgrent', 'endpwent', 'etree', 'getgrgid',
            +            'getgrnam', 'getpwnam', 'getpwuid', 'gmtime', 'gui_mode', 'ifft',
            +            'ifft2', 'ifftn', 'ind2sub', 'inverse', 'localtime', 'lsode_options',
            +            'luupdate', 'mat2cell', 'min', 'mktime', 'mouse_wheel_zoom',
            +            'num2cell', 'num2hex', 'qrdelete', 'qrinsert', 'qrshift', 'qrupdate',
            +            'quad_options', 'rande', 'randg', 'randn', 'randp', 'randperm',
            +            'regexpi', 'regexprep', 'rsf2csf', 'setgrent', 'setpwent', 'sprank',
            +            'strftime', 'strptime', 'strrep', 'svd_driver', 'symamd', 'triu',
            +            'urlread'
            +            ),
            +        // Private builtin
            +        7 => array(
            +            '__accumarray_max__', '__accumarray_min__', '__accumarray_sum__',
            +            '__accumdim_sum__', '__builtins__', '__calc_dimensions__',
            +            '__current_scope__', '__display_tokens__', '__dump_symtab_info__',
            +            '__end__', '__get__', '__go_axes__', '__go_axes_init__',
            +            '__go_delete__', '__go_execute_callback__', '__go_figure__',
            +            '__go_figure_handles__', '__go_handles__', '__go_hggroup__',
            +            '__go_image__', '__go_line__', '__go_patch__', '__go_surface__',
            +            '__go_text__', '__go_uicontextmenu__', '__go_uicontrol__',
            +            '__go_uimenu__', '__go_uipanel__', '__go_uipushtool__',
            +            '__go_uitoggletool__', '__go_uitoolbar__', '__gud_mode__',
            +            '__image_pixel_size__', '__is_handle_visible__', '__isa_parent__',
            +            '__keywords__', '__lexer_debug_flag__', '__list_functions__',
            +            '__operators__', '__parent_classes__', '__parser_debug_flag__',
            +            '__pathorig__', '__profiler_data__', '__profiler_enable__',
            +            '__profiler_reset__', '__request_drawnow__', '__sort_rows_idx__',
            +            '__token_count__', '__varval__', '__version_info__', '__which__'
            +        ),
            +        // Private Octave functions
            +        8 => array(
            +            '__all_opts__', '__contourc__', '__delaunayn__', '__dispatch__',
            +            '__dsearchn__', '__finish__', '__fltk_uigetfile__',
            +            '__glpk__', '__gnuplot_drawnow__', '__init_fltk__',
            +            '__init_gnuplot__', '__lin_interpn__', '__magick_read__',
            +            '__makeinfo__', '__pchip_deriv__', '__plt_get_axis_arg__', '__qp__',
            +            '__voronoi__', '__fltk_maxtime__', '__fltk_redraw__', '__ftp__',
            +            '__ftp_ascii__', '__ftp_binary__', '__ftp_close__', '__ftp_cwd__',
            +            '__ftp_delete__', '__ftp_dir__', '__ftp_mget__', '__ftp_mkdir__',
            +            '__ftp_mode__', '__ftp_mput__', '__ftp_pwd__', '__ftp_rename__',
            +            '__ftp_rmdir__', '__magick_finfo__', '__magick_format_list__',
            +            '__magick_write__'
            +            ),
            +        // Builtin Global Variables
            +        9 => array(
            +            'EDITOR', 'EXEC_PATH', 'F_DUPFD', 'F_GETFD', 'F_GETFL', 'F_SETFD',
            +            'F_SETFL', 'IMAGE_PATH', 'OCTAVE_HOME',
            +            'OCTAVE_VERSION', 'O_APPEND', 'O_ASYNC', 'O_CREAT', 'O_EXCL',
            +            'O_NONBLOCK', 'O_RDONLY', 'O_RDWR', 'O_SYNC', 'O_TRUNC', 'O_WRONLY',
            +            'PAGER', 'PAGER_FLAGS', 'PS1', 'PS2', 'PS4', 'SEEK_CUR', 'SEEK_END',
            +            'SEEK_SET', 'SIG', 'S_ISBLK', 'S_ISCHR', 'S_ISDIR', 'S_ISFIFO',
            +            'S_ISLNK', 'S_ISREG', 'S_ISSOCK', 'WCONTINUE', 'WCOREDUMP',
            +            'WEXITSTATUS', 'WIFCONTINUED', 'WIFEXITED', 'WIFSIGNALED',
            +            'WIFSTOPPED', 'WNOHANG', 'WSTOPSIG', 'WTERMSIG', 'WUNTRACED'
            +            ),
            +        // Constant functions
            +        10 => array (
            +            'e', 'eps', 'inf', 'Inf', 'nan', 'NaN', 'NA', 'pi', 'i', 'I', 'j',
            +            'J', 'true', 'false'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        // Comparison & logical
            +        0 => array(
            +            '!', '!=', '&', '&&','|', '||', '~', '~=',
            +            '<', '<=', '==', '>', '>='
            +            ),
            +        // Aritmethical
            +        1 => array(
            +            '*', '**', '+', '++', '-', '--', '/', "\\","'"
            +            ),
            +        // Elementwise arithmetical
            +        2 => array(
            +            '.*', '.**','./', '.^', '^',".\\",".'"
            +            ),
            +        // Arithmetical & assignation
            +        3 => array(
            +            '*=','+=','-=','/=','\=','**=','^=',
            +            '.*=','.+=','.-=','./=','.\=','.**=','.^=','='
            +            ),
            +        // Indexer
            +        4 => array(
            +            ':'
            +            ),
            +        // Delimiters
            +        5 => array(
            +            ',', '...', ';'
            +            ),
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => true,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        5 => true,
            +        6 => true,
            +        7 => true,
            +        8 => true,
            +        9 => true,
            +        10 => true,
            +        ),
            +    'URLS' => array(
            +        1 => 'http://octave.sourceforge.net/octave/function/{FNAME}.html',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => 'http://octave.sourceforge.net/octave/function/{FNAME}.html',
            +        6 => 'http://octave.sourceforge.net/octave/function/{FNAME}.html',
            +        7 => '',
            +        8 => '',
            +        9 => 'http://octave.sourceforge.net/octave/function/{FNAME}.html',
            +        10 => 'http://octave.sourceforge.net/octave/function/{FNAME}.html',
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.',
            +        ),
            +    'REGEXPS' => array(),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(),
            +    'STYLES' => array(
            +        'COMMENTS' => array(
            +            1 => 'color: #0000FF; font-style: italic;', // single quote strings
            +            2 => 'color: #0000FF; font-style: italic;', // double quote strings
            +            3 => 'color: #FF00FF; font-style: italic;', // single quote strings
            +            4 => 'color: #FF00FF; font-style: italic;', // double quote strings
            +            5 => 'color: #0000FF; font-style: italic;', // block comments
            +            6 => 'color: #996600; font-weight:bold;',   // packaging system
            +            7 => 'color: #006600; font-weight:bold;',   // function handles
            +            'MULTI' => 'color: #0000FF; font-style: italic;',
            +            ),
            +        'KEYWORDS' => array(
            +            1 => 'color: #2E8B57; font-weight:bold;',   // Data types
            +            2 => 'color: #2E8B57;',                     // Storage type
            +            3 => 'color: #0000FF; font-weight:bold;',   // Internal variable
            +            4 => 'color: #990000; font-weight:bold;',   // Reserved words
            +            5 => 'color: #008A8C; font-weight:bold;',   // Built-in
            +            6 => 'color: #008A8C;',                     // Octave functions
            +            9 => 'color: #000000; font-weight:bold;',   // Builtin Global Variables
            +            10 => 'color: #008A8C; font-weight:bold;',  // Constant functions
            +            ),
            +        'ESCAPE_CHAR' => array(),
            +        'BRACKETS' => array(
            +            0 => 'color: #080;',
            +            ),
            +        'STRINGS' => array(
            +            // strings were specified on the COMMENT_REGEXP section
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;',
            +            GESHI_NUMBER_OCT_PREFIX => 'color: #208080;',
            +            GESHI_NUMBER_HEX_PREFIX => 'color: #208080;',
            +            GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;',
            +            ),
            +        'METHODS' => array(),
            +        'SYMBOLS' => array(
            +            0 => 'color: #FF9696; font-weight:bold;',   // Comparison & logical
            +            1 => 'color: #CC0000; font-weight:bold;',   // Aritmethical
            +            2 => 'color: #993333; font-weight:bold;',   // Elementwise arithmetical
            +            3 => 'color: #FF0000; font-weight:bold;',   // Arithmetical & assignation
            +            4 => 'color: #33F;',                        // Indexer
            +            5 => 'color: #33F;',                        // Delimiters
            +            ),
            +        'REGEXPS' => array(),
            +        'SCRIPT' => array(),
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/oobas.php b/vendor/easybook/geshi/geshi/oobas.php
            new file mode 100644
            index 0000000000..25c345bbb9
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/oobas.php
            @@ -0,0 +1,133 @@
            + 'OpenOffice.org Basic',
            +    'COMMENT_SINGLE' => array(1 => "'"),
            +    'COMMENT_MULTI' => array(),
            +    //Single-Line comments using REM keyword
            +    'COMMENT_REGEXP' => array(2 => '/\bREM.*?$/i'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'dim','private','public','global','as','if','redim','true','set','byval',
            +            'false','bool','double','integer','long','object','single','variant',
            +            'msgbox','print','inputbox','green','blue','red','qbcolor',
            +            'rgb','open','close','reset','freefile','get','input','line',
            +            'put','write','loc','seek','eof','lof','chdir','chdrive',
            +            'curdir','dir','fileattr','filecopy','filedatetime','fileexists',
            +            'filelen','getattr','kill','mkdir','name','rmdir','setattr',
            +            'dateserial','datevalue','day','month','weekday','year','cdatetoiso',
            +            'cdatefromiso','hour','minute','second','timeserial','timevalue',
            +            'date','now','time','timer','erl','err','error','on','goto','resume',
            +            'and','eqv','imp','not','or','xor','mod','atn','cos','sin','tan','log',
            +            'exp','rnd','randomize','sqr','fix','int','abs','sgn','hex','oct',
            +            'it','then','else','select','case','iif','do','loop','for','next','to',
            +            'while','wend','gosub','return','call','choose','declare',
            +            'end','exit','freelibrary','function','rem','stop','sub','switch','with',
            +            'cbool','cdate','cdbl','cint','clng','const','csng','cstr','defbool',
            +            'defdate','defdbl','defint','deflng','asc','chr','str','val','cbyte',
            +            'space','string','format','lcase','left','lset','ltrim','mid','right',
            +            'rset','rtrim','trim','ucase','split','join','converttourl','convertfromurl',
            +            'instr','len','strcomp','beep','shell','wait','getsystemticks','environ',
            +            'getsolarversion','getguitype','twipsperpixelx','twipsperpixely',
            +            'createunostruct','createunoservice','getprocessservicemanager',
            +            'createunodialog','createunolistener','createunovalue','thiscomponent',
            +            'globalscope'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '='
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080;',
            +            2 => 'color: #808080;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #006600;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099;'
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/oorexx.php b/vendor/easybook/geshi/geshi/oorexx.php
            new file mode 100644
            index 0000000000..15cdd92e7c
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/oorexx.php
            @@ -0,0 +1,169 @@
            + 'ooRexx',
            +    'COMMENT_SINGLE' => array(1 => '--'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'address', 'arg', 'attribute', 'call', 'constant', 'do',
            +            'drop', 'exit', 'if',
            +            'interpret', 'iterate', 'leave', 'loop', 'nop', 'numeric',
            +            'parse', 'procedure', 'pull', 'push', 'queue',
            +            'raise', 'reply', 'return', 'say', 'select', 'signal',
            +            'use'
            +            ),
            +        2 => array(
            +            'abstract', 'any', 'arguments', 'array', 'by',
            +            'continue', 'digits', 'engineering', 'error',
            +            'expose', 'external', 'failure', 'for', 'forever',
            +            'forward', 'get', 'guard', 'guarded', 'halt',
            +            'inherit', 'library', 'lostdigits', 'message',
            +            'metaclass', 'mixinclass', 'name', 'nomethod', 'nostring',
            +            'notready', 'novalue', 'off', 'on', 'options', 'over',
            +            'private', 'protected', 'public', 'scientific', 'set',
            +            'source', 'subclass', 'syntax', 'to', 'unguarded',
            +            'unprotected', 'until', 'user',
            +            'version', 'while', 'with'
            +            ),
            +        3 => array(
            +            'else', 'end', 'otherwise', 'then', 'when'
            +            ),
            +        4 => array(
            +            'rc', 'result', 'self', 'sigl', 'super'
            +            ),
            +        5 => array(
            +            '::attribute', '::class', '::constant', '::method',
            +            '::optins', '::requires', '::routine'
            +            ),
            +        6 => array(
            +            'abbrev', 'abs', 'beep', 'bitand', 'bitor',
            +            'bitxor', 'b2x', 'center', 'centre', 'changestr', 'charin',
            +            'charout', 'chars', 'compare', 'condition', 'copies',
            +            'countstr', 'c2d', 'c2x', 'datatype', 'date', 'delstr',
            +            'delword', 'directory', 'd2c', 'd2x', 'endlocal',
            +            'errortext', 'filespec', 'form', 'format', 'fuzz', 'insert',
            +            'lastpos', 'left', 'length', 'linein', 'lineout', 'lines',
            +            'lower', 'max', 'min', 'overlay', 'pos', 'qualify', 'queued',
            +            'random', 'reverse', 'right', 'rxfuncadd', 'rxfuncdrop',
            +            'rxfuncquery', 'rxqueue', 'setlocal', 'sign', 'sourceline',
            +            'space', 'stream', 'strip', 'substr', 'subword', 'symbol',
            +            'time', 'trace', 'translate', 'trunc', 'upper', 'userid',
            +            'value', 'var', 'verify', 'word', 'wordindex', 'wordlength',
            +            'wordpos', 'words', 'xrange', 'x2b', 'x2c', 'x2d'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '<', '>', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':',
            +        '<', '>'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => true,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        5 => false,
            +        6 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;',
            +            2 => 'color: #ff0000; font-weight: bold;',
            +            3 => 'color: #00ff00; font-weight: bold;',
            +            4 => 'color: #0000ff; font-weight: bold;',
            +            5 => 'color: #880088; font-weight: bold;',
            +            6 => 'color: #888800; font-weight: bold;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666;',
            +            'MULTI' => 'color: #808080;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #202020;',
            +            2 => 'color: #202020;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => '',
            +        6 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4
            +);
            diff --git a/vendor/easybook/geshi/geshi/oracle11.php b/vendor/easybook/geshi/geshi/oracle11.php
            new file mode 100644
            index 0000000000..97b147f5d1
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/oracle11.php
            @@ -0,0 +1,612 @@
            + 'Oracle 11 SQL',
            +    'COMMENT_SINGLE' => array(1 => '--'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_UPPER,
            +    'QUOTEMARKS' => array("'", '"', '`'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +//Put your package names here - e.g. select distinct ''''|| lower(name) || ''',' from user_source;
            +//        6 => array(
            +//            ),
            +
            +//Put your table names here - e.g. select distinct ''''|| lower(table_name) || ''',' from user_tables;
            +//        5 => array(
            +//            ),
            +
            +//Put your view names here - e.g. select distinct ''''|| lower(view_name) || ''',' from user_views;
            +//        4 => array(
            +//            ),
            +
            +//Put your table field names here - e.g. select distinct ''''|| lower(column_name) || ''',' from user_tab_columns;
            +//        3 => array(
            +//            ),
            +
            +        //Put ORACLE reserved keywords here (11i).  I like mine uppercase.
            +        1 => array(
            +            'ABS',
            +            'ACCESS',
            +            'ACOS',
            +            'ADD',
            +            'ADD_MONTHS',
            +            'ALL',
            +            'ALTER',
            +            'ANALYZE',
            +            'AND',
            +            'ANY',
            +            'APPENDCHILDXML',
            +            'ARRAY',
            +            'AS',
            +            'ASC',
            +            'ASCII',
            +            'ASCIISTR',
            +            'ASIN',
            +            'ASSOCIATE',
            +            'AT',
            +            'ATAN',
            +            'ATAN2',
            +            'AUDIT',
            +            'AUTHID',
            +            'AVG',
            +            'BEGIN',
            +            'BETWEEN',
            +            'BFILENAME',
            +            'BIN_TO_NUM',
            +            'BINARY_INTEGER',
            +            'BITAND',
            +            'BODY',
            +            'BOOLEAN',
            +            'BULK',
            +            'BY',
            +            'CALL',
            +            'CARDINALITY',
            +            'CASCADE',
            +            'CASE',
            +            'CAST',
            +            'CEIL',
            +            'CHAR',
            +            'CHAR_BASE',
            +            'CHARTOROWID',
            +            'CHECK',
            +            'CHR',
            +            'CLOSE',
            +            'CLUSTER',
            +            'CLUSTER_ID',
            +            'CLUSTER_PROBABILITY',
            +            'CLUSTER_SET',
            +            'COALESCE',
            +            'COLLECT',
            +            'COLUMN',
            +            'COMMENT',
            +            'COMMIT',
            +            'COMPOSE',
            +            'COMPRESS',
            +            'CONCAT',
            +            'CONNECT',
            +            'CONSTANT',
            +            'CONSTRAINT',
            +            'CONSTRAINTS',
            +            'CONTEXT',
            +            'CONTROLFILE',
            +            'CONVERT',
            +            'CORR',
            +            'CORR_K',
            +            'CORR_S',
            +            'COS',
            +            'COSH',
            +            'COST',
            +            'COUNT',
            +            'COVAR_POP',
            +            'COVAR_SAMP',
            +            'CREATE',
            +            'CUBE_TABLE',
            +            'CUME_DIST',
            +            'CURRENT',
            +            'CURRENT_DATE',
            +            'CURRENT_TIMESTAMP',
            +            'CURRVAL',
            +            'CURSOR',
            +            'CV',
            +            'DATABASE',
            +            'DATAOBJ_TO_PARTITION',
            +            'DATE',
            +            'DAY',
            +            'DBTIMEZONE',
            +            'DECIMAL',
            +            'DECLARE',
            +            'DECODE',
            +            'DECOMPOSE',
            +            'DEFAULT',
            +            'DELETE',
            +            'DELETEXML',
            +            'DENSE_RANK',
            +            'DEPTH',
            +            'DEREF',
            +            'DESC',
            +            'DIMENSION',
            +            'DIRECTORY',
            +            'DISASSOCIATE',
            +            'DISTINCT',
            +            'DO',
            +            'DROP',
            +            'DUMP',
            +            'ELSE',
            +            'ELSIF',
            +            'EMPTY_BLOB',
            +            'EMPTY_CLOB',
            +            'END',
            +            'EXCEPTION',
            +            'EXCLUSIVE',
            +            'EXEC',
            +            'EXECUTE',
            +            'EXISTS',
            +            'EXISTSNODE',
            +            'EXIT',
            +            'EXP',
            +            'EXPLAIN',
            +            'EXTENDS',
            +            'EXTRACT',
            +            'EXTRACTVALUE',
            +            'FALSE',
            +            'FEATURE_ID',
            +            'FEATURE_SET',
            +            'FEATURE_VALUE',
            +            'FETCH',
            +            'FILE',
            +            'FIRST',
            +            'FIRST_VALUE',
            +            'FLOAT',
            +            'FLOOR',
            +            'FOR',
            +            'FORALL',
            +            'FROM',
            +            'FROM_TZ',
            +            'FUNCTION',
            +            'GOTO',
            +            'GRANT',
            +            'GREATEST',
            +            'GROUP',
            +            'GROUP_ID',
            +            'GROUPING',
            +            'GROUPING_ID',
            +            'HAVING',
            +            'HEAP',
            +            'HEXTORAW',
            +            'HOUR',
            +            'IDENTIFIED',
            +            'IF',
            +            'IMMEDIATE',
            +            'IN',
            +            'INCREMENT',
            +            'INDEX',
            +            'INDEXTYPE',
            +            'INDICATOR',
            +            'INITCAP',
            +            'INITIAL',
            +            'INSERT',
            +            'INSERTCHILDXML',
            +            'INSERTXMLBEFORE',
            +            'INSTR',
            +            'INSTRB',
            +            'INTEGER',
            +            'INTERFACE',
            +            'INTERSECT',
            +            'INTERVAL',
            +            'INTO',
            +            'IS',
            +            'ISOLATION',
            +            'ITERATION_NUMBER',
            +            'JAVA',
            +            'KEY',
            +            'LAG',
            +            'LAST',
            +            'LAST_DAY',
            +            'LAST_VALUE',
            +            'LEAD',
            +            'LEAST',
            +            'LENGTH',
            +            'LENGTHB',
            +            'LEVEL',
            +            'LIBRARY',
            +            'LIKE',
            +            'LIMITED',
            +            'LINK',
            +            'LN',
            +            'LNNVL',
            +            'LOCALTIMESTAMP',
            +            'LOCK',
            +            'LOG',
            +            'LONG',
            +            'LOOP',
            +            'LOWER',
            +            'LPAD',
            +            'LTRIM',
            +            'MAKE_REF',
            +            'MATERIALIZED',
            +            'MAX',
            +            'MAXEXTENTS',
            +            'MEDIAN',
            +            'MIN',
            +            'MINUS',
            +            'MINUTE',
            +            'MLSLABEL',
            +            'MOD',
            +            'MODE',
            +            'MODIFY',
            +            'MONTH',
            +            'MONTHS_BETWEEN',
            +            'NANVL',
            +            'NATURAL',
            +            'NATURALN',
            +            'NCHR',
            +            'NEW',
            +            'NEW_TIME',
            +            'NEXT_DAY',
            +            'NEXTVAL',
            +            'NLS_CHARSET_DECL_LEN',
            +            'NLS_CHARSET_ID',
            +            'NLS_CHARSET_NAME',
            +            'NLS_INITCAP',
            +            'NLS_LOWER',
            +            'NLS_UPPER',
            +            'NLSSORT',
            +            'NOAUDIT',
            +            'NOCOMPRESS',
            +            'NOCOPY',
            +            'NOT',
            +            'NOWAIT',
            +            'NTILE',
            +            'NULL',
            +            'NULLIF',
            +            'NUMBER',
            +            'NUMBER_BASE',
            +            'NUMTODSINTERVAL',
            +            'NUMTOYMINTERVAL',
            +            'NVL',
            +            'NVL2',
            +            'OCIROWID',
            +            'OF',
            +            'OFFLINE',
            +            'ON',
            +            'ONLINE',
            +            'OPAQUE',
            +            'OPEN',
            +            'OPERATOR',
            +            'OPTION',
            +            'OR',
            +            'ORA_HASH',
            +            'ORDER',
            +            'ORGANIZATION',
            +            'OTHERS',
            +            'OUT',
            +            'OUTLINE',
            +            'PACKAGE',
            +            'PARTITION',
            +            'PATH',
            +            'PCTFREE',
            +            'PERCENT_RANK',
            +            'PERCENTILE_CONT',
            +            'PERCENTILE_DISC',
            +            'PLAN',
            +            'PLS_INTEGER',
            +            'POSITIVE',
            +            'POSITIVEN',
            +            'POWER',
            +            'POWERMULTISET',
            +            'POWERMULTISET_BY_CARDINALITY',
            +            'PRAGMA',
            +            'PREDICTION',
            +            'PREDICTION_BOUNDS',
            +            'PREDICTION_COST',
            +            'PREDICTION_DETAILS',
            +            'PREDICTION_PROBABILITY',
            +            'PREDICTION_SET',
            +            'PRESENTNNV',
            +            'PRESENTV',
            +            'PREVIOUS',
            +            'PRIMARY',
            +            'PRIOR',
            +            'PRIVATE',
            +            'PRIVILEGES',
            +            'PROCEDURE',
            +            'PROFILE',
            +            'PUBLIC',
            +            'RAISE',
            +            'RANGE',
            +            'RANK',
            +            'RATIO_TO_REPORT',
            +            'RAW',
            +            'RAWTOHEX',
            +            'RAWTONHEX',
            +            'REAL',
            +            'RECORD',
            +            'REF',
            +            'REFTOHEX',
            +            'REGEXP_COUNT',
            +            'REGEXP_INSTR',
            +            'REGEXP_REPLACE',
            +            'REGEXP_SUBSTR',
            +            'REGR_AVGX',
            +            'REGR_AVGY',
            +            'REGR_COUNT',
            +            'REGR_INTERCEPT',
            +            'REGR_R2',
            +            'REGR_SLOPE',
            +            'REGR_SXX',
            +            'REGR_SXY',
            +            'REGR_SYY',
            +            'RELEASE',
            +            'REMAINDER',
            +            'RENAME',
            +            'REPLACE',
            +            'RESOURCE',
            +            'RETURN',
            +            'RETURNING',
            +            'REVERSE',
            +            'REVOKE',
            +            'ROLE',
            +            'ROLLBACK',
            +            'ROUND',
            +            'ROW',
            +            'ROW_NUMBER',
            +            'ROWID',
            +            'ROWIDTOCHAR',
            +            'ROWIDTONCHAR',
            +            'ROWNUM',
            +            'ROWS',
            +            'ROWTYPE',
            +            'RPAD',
            +            'RTRIM',
            +            'SAVEPOINT',
            +            'SCHEMA',
            +            'SCN_TO_TIMESTAMP',
            +            'SECOND',
            +            'SEGMENT',
            +            'SELECT',
            +            'SEPERATE',
            +            'SEQUENCE',
            +            'SESSION',
            +            'SESSIONTIMEZONE',
            +            'SET',
            +            'SHARE',
            +            'SIGN',
            +            'SIN',
            +            'SINH',
            +            'SIZE',
            +            'SMALLINT',
            +            'SOUNDEX',
            +            'SPACE',
            +            'SQL',
            +            'SQLCODE',
            +            'SQLERRM',
            +            'SQRT',
            +            'START',
            +            'STATISTICS',
            +            'STATS_BINOMIAL_TEST',
            +            'STATS_CROSSTAB',
            +            'STATS_F_TEST',
            +            'STATS_KS_TEST',
            +            'STATS_MODE',
            +            'STATS_MW_TEST',
            +            'STATS_ONE_WAY_ANOVA',
            +            'STATS_T_TEST_INDEP',
            +            'STATS_T_TEST_INDEPU',
            +            'STATS_T_TEST_ONE',
            +            'STATS_T_TEST_PAIRED',
            +            'STATS_WSR_TEST',
            +            'STDDEV',
            +            'STDDEV_POP',
            +            'STDDEV_SAMP',
            +            'STOP',
            +            'SUBSTR',
            +            'SUBSTRB',
            +            'SUBTYPE',
            +            'SUCCESSFUL',
            +            'SUM',
            +            'SYNONYM',
            +            'SYS_CONNECT_BY_PATH',
            +            'SYS_CONTEXT',
            +            'SYS_DBURIGEN',
            +            'SYS_EXTRACT_UTC',
            +            'SYS_GUID',
            +            'SYS_TYPEID',
            +            'SYS_XMLAGG',
            +            'SYS_XMLGEN',
            +            'SYSDATE',
            +            'SYSTEM',
            +            'SYSTIMESTAMP',
            +            'TABLE',
            +            'TABLESPACE',
            +            'TAN',
            +            'TANH',
            +            'TEMPORARY',
            +            'THEN',
            +            'TIME',
            +            'TIMESTAMP',
            +            'TIMESTAMP_TO_SCN',
            +            'TIMEZONE_ABBR',
            +            'TIMEZONE_HOUR',
            +            'TIMEZONE_MINUTE',
            +            'TIMEZONE_REGION',
            +            'TIMING',
            +            'TO',
            +            'TO_BINARY_DOUBLE',
            +            'TO_BINARY_FLOAT',
            +            'TO_CHAR',
            +            'TO_CLOB',
            +            'TO_DATE',
            +            'TO_DSINTERVAL',
            +            'TO_LOB',
            +            'TO_MULTI_BYTE',
            +            'TO_NCHAR',
            +            'TO_NCLOB',
            +            'TO_NUMBER',
            +            'TO_SINGLE_BYTE',
            +            'TO_TIMESTAMP',
            +            'TO_TIMESTAMP_TZ',
            +            'TO_YMINTERVAL',
            +            'TRANSACTION',
            +            'TRANSLATE',
            +            'TREAT',
            +            'TRIGGER',
            +            'TRIM',
            +            'TRUE',
            +            'TRUNC',
            +            'TRUNCATE',
            +            'TYPE',
            +            'TZ_OFFSET',
            +            'UI',
            +            'UID',
            +            'UNION',
            +            'UNIQUE',
            +            'UNISTR',
            +            'UPDATE',
            +            'UPDATEXML',
            +            'UPPER',
            +            'USE',
            +            'USER',
            +            'USERENV',
            +            'USING',
            +            'VALIDATE',
            +            'VALUE',
            +            'VALUES',
            +            'VAR_POP',
            +            'VAR_SAMP',
            +            'VARCHAR',
            +            'VARCHAR2',
            +            'VARIANCE',
            +            'VIEW',
            +            'VSIZE',
            +            'WHEN',
            +            'WHENEVER',
            +            'WHERE',
            +            'WHILE',
            +            'WIDTH_BUCKET',
            +            'WITH',
            +            'WORK',
            +            'WRITE',
            +            'XMLAGG',
            +            'XMLCAST',
            +            'XMLCDATA',
            +            'XMLCOLATTVAL',
            +            'XMLCOMMENT',
            +            'XMLCONCAT',
            +            'XMLDIFF',
            +            'XMLELEMENT',
            +            'XMLEXISTS',
            +            'XMLFOREST',
            +            'XMLPARSE',
            +            'XMLPATCH',
            +            'XMLPI',
            +            'XMLQUERY',
            +            'XMLROOT',
            +            'XMLSEQUENCE',
            +            'XMLSERIALIZE',
            +            'XMLTABLE',
            +            'XMLTRANSFORM',
            +            'YEAR',
            +            'ZONE'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '=', '<', '>', '|', '+', '-', '*', '/', ','
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +//        3 => false,
            +//        4 => false,
            +//        5 => false,
            +//        6 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #993333; font-weight: bold; text-transform: uppercase;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;',
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #ff0000;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +//        3 => '',
            +//        4 => '',
            +//        5 => '',
            +//        6 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/oracle8.php b/vendor/easybook/geshi/geshi/oracle8.php
            new file mode 100644
            index 0000000000..b49390806c
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/oracle8.php
            @@ -0,0 +1,494 @@
            + 'Oracle 8 SQL',
            +    'COMMENT_SINGLE' => array(1 => '--'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_UPPER,
            +    'QUOTEMARKS' => array("'", '"', '`'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +//Put your package names here - e.g. select distinct ''''|| lower(name) || ''',' from user_source;
            +//        6 => array(
            +//            ),
            +
            +//Put your table names here - e.g. select distinct ''''|| lower(table_name) || ''',' from user_tables;
            +//        5 => array(
            +//            ),
            +
            +//Put your view names here - e.g. select distinct ''''|| lower(view_name) || ''',' from user_views;
            +//        4 => array(
            +//            ),
            +
            +//Put your table field names here - e.g. select distinct ''''|| lower(column_name) || ''',' from user_tab_columns;
            +//        3 => array(
            +//            ),
            +
            +//Put ORACLE reserved keywords here (8.1.7).  I like mine uppercase.
            +        1 => array(
            +            'ABS',
            +            'ACCESS',
            +            'ACOS',
            +            'ADD',
            +            'ADD_MONTHS',
            +            'ALL',
            +            'ALTER',
            +            'ANALYZE',
            +            'AND',
            +            'ANY',
            +            'ARRAY',
            +            'AS',
            +            'ASC',
            +            'ASCII',
            +            'ASIN',
            +            'ASSOCIATE',
            +            'AT',
            +            'ATAN',
            +            'ATAN2',
            +            'AUDIT',
            +            'AUTHID',
            +            'AVG',
            +            'BEGIN',
            +            'BETWEEN',
            +            'BFILENAME',
            +            'BINARY_INTEGER',
            +            'BITAND',
            +            'BODY',
            +            'BOOLEAN',
            +            'BULK',
            +            'BY',
            +            'CALL',
            +            'CASCADE',
            +            'CASE',
            +            'CEIL',
            +            'CHAR',
            +            'CHAR_BASE',
            +            'CHARTOROWID',
            +            'CHECK',
            +            'CHR',
            +            'CLOSE',
            +            'CLUSTER',
            +            'COALESCE',
            +            'COLLECT',
            +            'COLUMN',
            +            'COMMENT',
            +            'COMMIT',
            +            'COMPRESS',
            +            'CONCAT',
            +            'CONNECT',
            +            'CONSTANT',
            +            'CONSTRAINT',
            +            'CONSTRAINTS',
            +            'CONTEXT',
            +            'CONTROLFILE',
            +            'CONVERT',
            +            'CORR',
            +            'COS',
            +            'COSH',
            +            'COST',
            +            'COUNT',
            +            'COVAR_POP',
            +            'COVAR_SAMP',
            +            'CREATE',
            +            'CUME_DIST',
            +            'CURRENT',
            +            'CURRVAL',
            +            'CURSOR',
            +            'DATABASE',
            +            'DATE',
            +            'DAY',
            +            'DECIMAL',
            +            'DECLARE',
            +            'DECODE',
            +            'DEFAULT',
            +            'DELETE',
            +            'DENSE_RANK',
            +            'DEREF',
            +            'DESC',
            +            'DIMENSION',
            +            'DIRECTORY',
            +            'DISASSOCIATE',
            +            'DISTINCT',
            +            'DO',
            +            'DROP',
            +            'DUMP',
            +            'ELSE',
            +            'ELSIF',
            +            'EMPTY_BLOB',
            +            'EMPTY_CLOB',
            +            'END',
            +            'EXCEPTION',
            +            'EXCLUSIVE',
            +            'EXEC',
            +            'EXECUTE',
            +            'EXISTS',
            +            'EXIT',
            +            'EXP',
            +            'EXPLAIN',
            +            'EXTENDS',
            +            'EXTRACT',
            +            'FALSE',
            +            'FETCH',
            +            'FILE',
            +            'FIRST_VALUE',
            +            'FLOAT',
            +            'FLOOR',
            +            'FOR',
            +            'FORALL',
            +            'FROM',
            +            'FUNCTION',
            +            'GOTO',
            +            'GRANT',
            +            'GREATEST',
            +            'GROUP',
            +            'GROUPING',
            +            'HAVING',
            +            'HEAP',
            +            'HEXTORAW',
            +            'HOUR',
            +            'IDENTIFIED',
            +            'IF',
            +            'IMMEDIATE',
            +            'IN',
            +            'INCREMENT',
            +            'INDEX',
            +            'INDEXTYPE',
            +            'INDICATOR',
            +            'INITCAP',
            +            'INITIAL',
            +            'INSERT',
            +            'INSTR',
            +            'INSTRB',
            +            'INTEGER',
            +            'INTERFACE',
            +            'INTERSECT',
            +            'INTERVAL',
            +            'INTO',
            +            'IS',
            +            'ISOLATION',
            +            'JAVA',
            +            'KEY',
            +            'LAG',
            +            'LAST_DAY',
            +            'LAST_VALUE',
            +            'LEAD',
            +            'LEAST',
            +            'LENGTH',
            +            'LENGTHB',
            +            'LEVEL',
            +            'LIBRARY',
            +            'LIKE',
            +            'LIMITED',
            +            'LINK',
            +            'LN',
            +            'LOCK',
            +            'LOG',
            +            'LONG',
            +            'LOOP',
            +            'LOWER',
            +            'LPAD',
            +            'LTRIM',
            +            'MAKE_REF',
            +            'MATERIALIZED',
            +            'MAX',
            +            'MAXEXTENTS',
            +            'MIN',
            +            'MINUS',
            +            'MINUTE',
            +            'MLSLABEL',
            +            'MOD',
            +            'MODE',
            +            'MODIFY',
            +            'MONTH',
            +            'MONTHS_BETWEEN',
            +            'NATURAL',
            +            'NATURALN',
            +            'NEW',
            +            'NEW_TIME',
            +            'NEXT_DAY',
            +            'NEXTVAL',
            +            'NLS_CHARSET_DECL_LEN',
            +            'NLS_CHARSET_ID',
            +            'NLS_CHARSET_NAME',
            +            'NLS_INITCAP',
            +            'NLS_LOWER',
            +            'NLS_UPPER',
            +            'NLSSORT',
            +            'NOAUDIT',
            +            'NOCOMPRESS',
            +            'NOCOPY',
            +            'NOT',
            +            'NOWAIT',
            +            'NTILE',
            +            'NULL',
            +            'NULLIF',
            +            'NUMBER',
            +            'NUMBER_BASE',
            +            'NUMTODSINTERVAL',
            +            'NUMTOYMINTERVAL',
            +            'NVL',
            +            'NVL2',
            +            'OCIROWID',
            +            'OF',
            +            'OFFLINE',
            +            'ON',
            +            'ONLINE',
            +            'OPAQUE',
            +            'OPEN',
            +            'OPERATOR',
            +            'OPTION',
            +            'OR',
            +            'ORDER',
            +            'ORGANIZATION',
            +            'OTHERS',
            +            'OUT',
            +            'OUTLINE',
            +            'PACKAGE',
            +            'PARTITION',
            +            'PCTFREE',
            +            'PERCENT_RANK',
            +            'PLAN',
            +            'PLS_INTEGER',
            +            'POSITIVE',
            +            'POSITIVEN',
            +            'POWER',
            +            'PRAGMA',
            +            'PRIMARY',
            +            'PRIOR',
            +            'PRIVATE',
            +            'PRIVILEGES',
            +            'PROCEDURE',
            +            'PROFILE',
            +            'PUBLIC',
            +            'RAISE',
            +            'RANGE',
            +            'RANK',
            +            'RATIO_TO_REPORT',
            +            'RAW',
            +            'RAWTOHEX',
            +            'REAL',
            +            'RECORD',
            +            'REF',
            +            'REFTOHEX',
            +            'REGR_AVGX',
            +            'REGR_AVGY',
            +            'REGR_COUNT',
            +            'REGR_INTERCEPT',
            +            'REGR_R2',
            +            'REGR_SLOPE',
            +            'REGR_SXX',
            +            'REGR_SXY',
            +            'REGR_SYY',
            +            'RELEASE',
            +            'RENAME',
            +            'REPLACE',
            +            'RESOURCE',
            +            'RETURN',
            +            'RETURNING',
            +            'REVERSE',
            +            'REVOKE',
            +            'ROLE',
            +            'ROLLBACK',
            +            'ROUND',
            +            'ROW',
            +            'ROW_NUMBER',
            +            'ROWID',
            +            'ROWIDTOCHAR',
            +            'ROWNUM',
            +            'ROWS',
            +            'ROWTYPE',
            +            'RPAD',
            +            'RTRIM',
            +            'SAVEPOINT',
            +            'SCHEMA',
            +            'SECOND',
            +            'SEGMENT',
            +            'SELECT',
            +            'SEPERATE',
            +            'SEQUENCE',
            +            'SESSION',
            +            'SET',
            +            'SHARE',
            +            'SIGN',
            +            'SIN',
            +            'SINH',
            +            'SIZE',
            +            'SMALLINT',
            +            'SOUNDEX',
            +            'SPACE',
            +            'SQL',
            +            'SQLCODE',
            +            'SQLERRM',
            +            'SQRT',
            +            'START',
            +            'STATISTICS',
            +            'STDDEV',
            +            'STDDEV_POP',
            +            'STDDEV_SAMP',
            +            'STOP',
            +            'SUBSTR',
            +            'SUBSTRB',
            +            'SUBTYPE',
            +            'SUCCESSFUL',
            +            'SUM',
            +            'SYNONYM',
            +            'SYS_CONTEXT',
            +            'SYS_GUID',
            +            'SYSDATE',
            +            'SYSTEM',
            +            'TABLE',
            +            'TABLESPACE',
            +            'TAN',
            +            'TANH',
            +            'TEMPORARY',
            +            'THEN',
            +            'TIME',
            +            'TIMESTAMP',
            +            'TIMEZONE_ABBR',
            +            'TIMEZONE_HOUR',
            +            'TIMEZONE_MINUTE',
            +            'TIMEZONE_REGION',
            +            'TIMING',
            +            'TO',
            +            'TO_CHAR',
            +            'TO_DATE',
            +            'TO_LOB',
            +            'TO_MULTI_BYTE',
            +            'TO_NUMBER',
            +            'TO_SINGLE_BYTE',
            +            'TRANSACTION',
            +            'TRANSLATE',
            +            'TRIGGER',
            +            'TRIM',
            +            'TRUE',
            +            'TRUNC',
            +            'TRUNCATE',
            +            'TYPE',
            +            'UI',
            +            'UID',
            +            'UNION',
            +            'UNIQUE',
            +            'UPDATE',
            +            'UPPER',
            +            'USE',
            +            'USER',
            +            'USERENV',
            +            'USING',
            +            'VALIDATE',
            +            'VALUE',
            +            'VALUES',
            +            'VAR_POP',
            +            'VAR_SAMP',
            +            'VARCHAR',
            +            'VARCHAR2',
            +            'VARIANCE',
            +            'VIEW',
            +            'VSIZE',
            +            'WHEN',
            +            'WHENEVER',
            +            'WHERE',
            +            'WHILE',
            +            'WITH',
            +            'WORK',
            +            'WRITE',
            +            'YEAR',
            +            'ZONE'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '=', '<', '>', '|', '+', '-', '*', '/', ','
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +//        3 => false,
            +//        4 => false,
            +//        5 => false,
            +//        6 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #993333; font-weight: bold; text-transform: uppercase;'
            +//Add the styles for groups 3-6 here when used
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #ff0000;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +//        3 => '',
            +//        4 => '',
            +//        5 => '',
            +//        6 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/oxygene.php b/vendor/easybook/geshi/geshi/oxygene.php
            new file mode 100644
            index 0000000000..dc3bbb3ff0
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/oxygene.php
            @@ -0,0 +1,153 @@
            + 'Oxygene (Delphi Prism)',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array('(*' => '*)', '{' => '}'),
            +    //Compiler directives
            +    'COMMENT_REGEXP' => array(2 => '/{\\$.*?}|\\(\\*\\$.*?\\*\\)/U'),
            +    'CASE_KEYWORDS' => 0,
            +    'QUOTEMARKS' => array("'"),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'and',   'begin', 'case', 'const',  'div', 'do', 'downto', 'else',
            +            'end',  'for',  'function', 'if', 'in', 'mod', 'not', 'of', 'or',
            +            'procedure', 'repeat', 'record', 'set', 'shl', 'shr', 'then', 'to',
            +            'type', 'until', 'uses', 'var','while', 'with', 'xor', 'exit', 'break',
            +            'class', 'constructor', 'inherited', 'private', 'public', 'protected',
            +            'property', 'As', 'Is', 'Unit', 'Continue', 'Try', 'Except', 'Forward',
            +            'Interface','Implementation', 'nil', 'out', 'loop', 'namespace', 'true',
            +            'false', 'new', 'ensure', 'require', 'on', 'event', 'delegate', 'method',
            +            'raise', 'assembly', 'module', 'using','locking', 'old', 'invariants', 'operator',
            +            'self', 'async', 'finalizer', 'where', 'yield', 'nullable', 'Future',
            +            'From',  'Finally', 'dynamic'
            +            ),
            +        2 => array(
            +            'override', 'virtual', 'External', 'read', 'add', 'remove','final', 'abstract',
            +            'empty', 'global', 'locked', 'sealed', 'reintroduce', 'implements', 'each',
            +            'default', 'partial', 'finalize', 'enum', 'flags', 'result', 'readonly', 'unsafe',
            +            'pinned', 'matching', 'static', 'has', 'step', 'iterator', 'inline', 'nested',
            +            'Implies', 'Select', 'Order', 'By', 'Desc', 'Asc', 'Group', 'Join', 'Take',
            +            'Skip', 'Concat', 'Union', 'Reverse', 'Distinct', 'Into', 'Equals', 'params',
            +            'sequence', 'index', 'notify', 'Parallel', 'create', 'array', 'Queryable', 'Aspect',
            +            'volatile', 'write'
            +            ),
            +        3 => array(
            +            'chr', 'ord', 'inc', 'dec', 'assert', 'iff', 'assigned','futureAssigned', 'length', 'low', 'high', 'typeOf', 'sizeOf', 'disposeAndNil', 'Coalesce', 'unquote'
            +            ),
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +//        4 => false,
            +        ),
            +    'SYMBOLS' => array(
            +        0 => array('(', ')', '[', ']'),
            +        1 => array('.', ',', ':', ';'),
            +        2 => array('@', '^'),
            +        3 => array('=', '+', '-', '*', '/')
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000000; font-weight: bold;',
            +            2 => 'color: #000000; font-weight: bold;',
            +            3 => 'color: #000066;',
            +//            4 => 'color: #000066; font-weight: bold;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;',
            +            2 => 'color: #008000; font-style: italic;',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #ff0000; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000066;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #0000ff;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #000000;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #9ac;',
            +            1 => 'color: #ff0000;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #000066;',
            +            1 => 'color: #000066;',
            +            2 => 'color: #000066;',
            +            3 => 'color: #000066;'
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +//        4 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        //Hex numbers
            +        0 => '\$[0-9a-fA-F]+',
            +        //Characters
            +        1 => '\#\$?[0-9]{1,3}'
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 2
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/oz.php b/vendor/easybook/geshi/geshi/oz.php
            new file mode 100644
            index 0000000000..2bdb7854b7
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/oz.php
            @@ -0,0 +1,143 @@
            + 'OZ',
            +    'COMMENT_SINGLE' => array(1 => '%'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"','\''),
            +    'ESCAPE_CHAR' => '\\',
            +    'NUMBERS' => array(),
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'declare','local','in','end','proc','fun','functor','require','prepare',
            +            'import','export','define','at','case','then','else','of','elseof',
            +            'elsecase','if','elseif','class','from','prop','attr','feat','meth',
            +            'self','true','false','unit','div','mod','andthen','orelse','cond','or',
            +            'dis','choice','not','thread','try','catch','finally','raise','lock',
            +            'skip','fail','for','do'
            +            )
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true
            +        ),
            +    'SYMBOLS' => array(
            +        '@', '!', '|', '<-', ':=', '<', '>', '=<', '>=', '<=', '#', '~', '.',
            +        '*', '-', '+', '/', '<:', '>:', '=:', '=<:', '>=:', '\\=', '\\=:', ',',
            +        '!!', '...', '==', '::', ':::'
            +        ),
            +    'STYLES' => array(
            +        'REGEXPS' => array(
            +            1 => 'color: #0000ff;',
            +            2 => 'color: #00a030;',
            +            3 => 'color: #bc8f8f;',
            +            4 => 'color: #0000ff;',
            +            5 => 'color: #a020f0;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #bc8f8f;'
            +            ),
            +        'KEYWORDS' => array(
            +            1 => 'color: #a020f0;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #B22222;',
            +            'MULTI' => 'color: #B22222;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #bc8f8f;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #a020f0;'
            +            ),
            +        'BRACKETS' => array(),
            +        'NUMBERS' => array(),
            +        'METHODS' => array(),
            +        'SCRIPT' => array()
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(),
            +    'STRICT_MODE_APPLIES' => GESHI_MAYBE,
            +    'SCRIPT_DELIMITERS' => array(),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(),
            +    'URLS' => array(
            +        1 => ''
            +        ),
            +    'REGEXPS' => array(
            +        // function and procedure definition
            +        1 => array(
            +            GESHI_SEARCH => "(proc|fun)([^{}\n\)]*)(\\{)([\$A-Z\300-\326\330-\336][A-Z\300-\326\330-\336a-z\337-\366\370-\3770-9_.]*)",
            +            GESHI_REPLACE => '\4',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\1\2\3',
            +            GESHI_AFTER => ''
            +            ),
            +        // class definition
            +        2 => array(
            +            GESHI_SEARCH => "(class)([^A-Z\$]*)([\$A-Z\300-\326\330-\336][A-Z\300-\326\330-\336a-z\337-\366\370-\3770-9_.]*)",
            +            GESHI_REPLACE => '\3\4',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\1\2',
            +            GESHI_AFTER => ''
            +            ),
            +        // single character
            +        3 => array(
            +            GESHI_SEARCH => "&.",
            +            GESHI_REPLACE => '\0',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        // method definition
            +        4 => array(
            +            GESHI_SEARCH => "(meth)([^a-zA-Z]+)([a-zA-Z\300-\326\330-\336][A-Z\300-\326\330-\336a-z\337-\366\370-\3770-9]*)",
            +            GESHI_REPLACE => '\3',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\1\2',
            +            GESHI_AFTER => ''
            +            ),
            +        // highlight "[]"
            +        // ([] is actually a keyword, but that causes problems in validation; putting it into symbols doesn't work.)
            +        5 => array(
            +            GESHI_SEARCH => "\[\]",
            +            GESHI_REPLACE => '\0',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            )
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/parasail.php b/vendor/easybook/geshi/geshi/parasail.php
            new file mode 100644
            index 0000000000..be00c86e72
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/parasail.php
            @@ -0,0 +1,132 @@
            + 'ParaSail',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array('{' => '}'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'all', 'block', 'case', 'continue', 'each',
            +            'else', 'elsif', 'exit', 'for',
            +            'forward', 'if', 'loop', 'return', 'reverse', 'some',
            +            'then', 'until', 'while', 'with'
            +            ),
            +        2 => array(
            +            'abs', 'and','in', 'mod', 'not', 'null', 'or', 'rem', 'xor'
            +            ),
            +        3 => array(
            +            'abstract', 'class',
            +            'concurrent', 'const', 
            +            'end', 'extends', 'exports', 
            +            'func', 'global', 'implements', 'import',
            +            'interface', 'is', 'lambda', 'locked', 
            +            'new', 'of', 'op', 'optional',
            +            'private', 'queued', 'ref',
            +            'separate', 'type', 'var',
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '[', ']', '<', '>'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #00007f;',
            +            2 => 'color: #0000ff;',
            +            3 => 'color: #46aa03; font-weight:bold;',
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #adadad; font-style: italic;',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #7f007f;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #202020;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/parigp.php b/vendor/easybook/geshi/geshi/parigp.php
            new file mode 100644
            index 0000000000..1a5d4a73ec
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/parigp.php
            @@ -0,0 +1,293 @@
            + 'PARI/GP',
            +    'COMMENT_SINGLE' => array(1 => '\\\\'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'NUMBERS' => array(
            +        # Integers
            +        1 => GESHI_NUMBER_INT_BASIC,
            +        # Reals
            +        2 => GESHI_NUMBER_FLT_SCI_ZERO
            +        ),
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'abs','acos','acosh','addhelp','addprimes','agm','alarm','algdep',
            +            'alias','allocatemem','apply','arg','asin','asinh','atan','atanh',
            +            'bernfrac','bernpol','bernreal','bernvec','besselh1','besselh2',
            +            'besseli','besselj','besseljh','besselk','besseln','bestappr',
            +            'bestapprPade','bezout','bezoutres','bigomega','binary','binomial',
            +            'bitand','bitneg','bitnegimply','bitor','bittest','bitxor',
            +            'bnfcertify','bnfcompress','bnfdecodemodule','bnfinit',
            +            'bnfisintnorm','bnfisnorm','bnfisprincipal','bnfissunit',
            +            'bnfisunit','bnfnarrow','bnfsignunit','bnfsunit','bnrclassno',
            +            'bnrclassnolist','bnrconductor','bnrconductorofchar','bnrdisc',
            +            'bnrdisclist','bnrinit','bnrisconductor','bnrisprincipal','bnrL1',
            +            'bnrrootnumber','bnrstark','break','breakpoint','Catalan','ceil',
            +            'centerlift','charpoly','chinese','cmp','Col','component','concat',
            +            'conj','conjvec','content','contfrac','contfracpnqn','core',
            +            'coredisc','cos','cosh','cotan','dbg_down','dbg_err','dbg_up',
            +            'dbg_x','default','denominator','deriv','derivnum','diffop',
            +            'digits','dilog','dirdiv','direuler','dirmul','dirzetak','divisors',
            +            'divrem','eint1','elladd','ellak','ellan','ellanalyticrank','ellap',
            +            'ellbil','ellcard','ellchangecurve','ellchangepoint',
            +            'ellconvertname','elldivpol','elleisnum','elleta','ellffinit',
            +            'ellfromj','ellgenerators','ellglobalred','ellgroup','ellheegner',
            +            'ellheight','ellheightmatrix','ellidentify','ellinit',
            +            'ellisoncurve','ellj','ellL1','elllocalred','elllog','elllseries',
            +            'ellminimalmodel','ellmodulareqn','ellmul','ellneg','ellorder',
            +            'ellordinate','ellpointtoz','ellrootno','ellsearch','ellsigma',
            +            'ellsub','elltaniyama','elltatepairing','elltors','ellweilpairing',
            +            'ellwp','ellzeta','ellztopoint','erfc','errname','error','eta','Euler',
            +            'eulerphi','eval','exp','extern','externstr','factor','factorback',
            +            'factorcantor','factorff','factorial','factorint','factormod',
            +            'factornf','factorpadic','ffgen','ffinit','fflog','ffnbirred',
            +            'fforder','ffprimroot','fibonacci','floor','for','forcomposite','fordiv','forell',
            +            'forprime','forqfvec','forstep','forsubgroup','forvec','frac','galoisexport',
            +            'galoisfixedfield','galoisgetpol','galoisidentify','galoisinit',
            +            'galoisisabelian','galoisisnormal','galoispermtopol',
            +            'galoissubcyclo','galoissubfields','galoissubgroups','gamma',
            +            'gammah','gcd','getenv','getheap','getrand','getstack','gettime',
            +            'global','hammingweight','hilbert','hyperu','I','idealadd',
            +            'idealaddtoone','idealappr','idealchinese','idealcoprime',
            +            'idealdiv','idealfactor','idealfactorback','idealfrobenius',
            +            'idealhnf','idealintersect','idealinv','ideallist','ideallistarch',
            +            'ideallog','idealmin','idealmul','idealnorm','idealnumden',
            +            'idealpow','idealprimedec','idealramgroups','idealred','idealstar',
            +            'idealtwoelt','idealval','if','iferr','iferrname','imag','incgam','incgamc','input',
            +            'install','intcirc','intformal','intfouriercos','intfourierexp',
            +            'intfouriersin','intfuncinit','intlaplaceinv','intmellininv',
            +            'intmellininvshort','intnum','intnuminit','intnuminitgen',
            +            'intnumromb','intnumstep','isfundamental','ispolygonal','ispower','ispowerful',
            +            'isprime','isprimepower','ispseudoprime','issquare','issquarefree','istotient',
            +            'kill','kronecker','lcm','length','lex','lift','lindep','List',
            +            'listcreate','listinsert','listkill','listpop','listput','listsort',
            +            'lngamma','local','log','Mat','matadjoint','matalgtobasis',
            +            'matbasistoalg','matcompanion','matconcat','matcontent','matdet','matdetint',
            +            'matdiagonal','mateigen','matfrobenius','mathess','mathilbert',
            +            'mathnf','mathnfmod','mathnfmodid','matid','matimage',
            +            'matimagecompl','matindexrank','matintersect','matinverseimage',
            +            'matisdiagonal','matker','matkerint','matmuldiagonal',
            +            'matmultodiagonal','matpascal','matrank','matrix','matrixqz',
            +            'matsize','matsnf','matsolve','matsolvemod','matsupplement',
            +            'mattranspose','max','min','minpoly','Mod','modreverse','moebius',
            +            'my','newtonpoly','next','nextprime','nfalgtobasis','nfbasis',
            +            'nfbasistoalg','nfdetint','nfdisc','nfeltadd','nfeltdiv',
            +            'nfeltdiveuc','nfeltdivmodpr','nfeltdivrem','nfeltmod','nfeltmul',
            +            'nfeltmulmodpr','nfeltnorm','nfeltpow','nfeltpowmodpr',
            +            'nfeltreduce','nfeltreducemodpr','nfelttrace','nfeltval','nffactor',
            +            'nffactorback','nffactormod','nfgaloisapply','nfgaloisconj',
            +            'nfhilbert','nfhnf','nfhnfmod','nfinit','nfisideal','nfisincl',
            +            'nfisisom','nfkermodpr','nfmodprinit','nfnewprec','nfroots',
            +            'nfrootsof1','nfsnf','nfsolvemodpr','nfsubfields','norm','norml2',
            +            'numbpart','numdiv','numerator','numtoperm','O','omega','padicappr',
            +            'padicfields','padicprec','partitions','permtonum','Pi','plot',
            +            'plotbox','plotclip','plotcolor','plotcopy','plotcursor','plotdraw',
            +            'ploth','plothraw','plothsizes','plotinit','plotkill','plotlines',
            +            'plotlinetype','plotmove','plotpoints','plotpointsize',
            +            'plotpointtype','plotrbox','plotrecth','plotrecthraw','plotrline',
            +            'plotrmove','plotrpoint','plotscale','plotstring','Pol',
            +            'polchebyshev','polcoeff','polcompositum','polcyclo','polcyclofactors','poldegree',
            +            'poldisc','poldiscreduced','polgalois','polgraeffe','polhensellift',
            +            'polhermite','polinterpolate','poliscyclo','poliscycloprod',
            +            'polisirreducible','pollead','pollegendre','polrecip','polred',
            +            'polredabs','polredbest','polredord','polresultant','Polrev','polroots',
            +            'polrootsff','polrootsmod','polrootspadic','polsturm','polsubcyclo',
            +            'polsylvestermatrix','polsym','poltchebi','poltschirnhaus',
            +            'polylog','polzagier','precision','precprime','prime','primepi',
            +            'primes','print','print1','printf','printsep','printtex','prod','prodeuler',
            +            'prodinf','psdraw','psi','psploth','psplothraw','Qfb','qfbclassno',
            +            'qfbcompraw','qfbhclassno','qfbnucomp','qfbnupow','qfbpowraw',
            +            'qfbprimeform','qfbred','qfbsolve','qfgaussred','qfjacobi','qflll',
            +            'qflllgram','qfminim','qfperfection','qfrep','qfsign',
            +            'quadclassunit','quaddisc','quadgen','quadhilbert','quadpoly',
            +            'quadray','quadregulator','quadunit','quit','random','randomprime','read',
            +            'readvec','real','removeprimes','return','rnfalgtobasis','rnfbasis',
            +            'rnfbasistoalg','rnfcharpoly','rnfconductor','rnfdedekind','rnfdet',
            +            'rnfdisc','rnfeltabstorel','rnfeltdown','rnfeltreltoabs','rnfeltup',
            +            'rnfequation','rnfhnfbasis','rnfidealabstorel','rnfidealdown',
            +            'rnfidealhnf','rnfidealmul','rnfidealnormabs','rnfidealnormrel',
            +            'rnfidealreltoabs','rnfidealtwoelt','rnfidealup','rnfinit',
            +            'rnfisabelian','rnfisfree','rnfisnorm','rnfisnorminit','rnfkummer',
            +            'rnflllgram','rnfnormgroup','rnfpolred','rnfpolredabs',
            +            'rnfpseudobasis','rnfsteinitz','round','select','Ser','serconvol',
            +            'serlaplace','serreverse','Set','setbinop','setintersect',
            +            'setisset','setminus','setrand','setsearch','setunion','shift',
            +            'shiftmul','sigma','sign','simplify','sin','sinh','sizebyte',
            +            'sizedigit','solve','sqr','sqrt','sqrtint','sqrtn','sqrtnint','stirling','Str',
            +            'Strchr','Strexpand','Strprintf','Strtex','subgrouplist','subst',
            +            'substpol','substvec','sum','sumalt','sumdedekind','sumdiv','sumdivmult','sumdigits',
            +            'sumformal','suminf','sumnum','sumnumalt','sumnuminit','sumpos','system','tan',
            +            'tanh','taylor','teichmuller','theta','thetanullk','thue',
            +            'thueinit','trace','trap','truncate','type','until','valuation',
            +            'variable','Vec','vecextract','vecmax','vecmin','Vecrev',
            +            'vecsearch','Vecsmall','vecsort','vector','vectorsmall','vectorv',
            +            'version','warning','weber','whatnow','while','write','write1',
            +            'writebin','writetex','zeta','zetak','zetakinit','zncoppersmith',
            +            'znlog','znorder','znprimroot','znstar'
            +            ),
            +
            +        2 => array(
            +            'void','bool','negbool','small','int',/*'real',*/'mp','var','lg','pol',
            +            'vecsmall','vec','list','str','genstr','gen','typ'
            +            ),
            +
            +        3 => array(
            +            'TeXstyle','breakloop','colors','compatible','datadir','debug',
            +            'debugfiles','debugmem','echo','factor_add_primes','factor_proven',
            +            'format','graphcolormap','graphcolors','help','histfile','histsize',
            +            'lines','linewrap',/*'log',*/'logfile','new_galois_format','output',
            +            'parisize','path','prettyprinter','primelimit','prompt_cont',
            +            'prompt','psfile','readline','realprecision','recover','secure',
            +            'seriesprecision',/*'simplify',*/'sopath','strictmatch','timer'
            +            ),
            +
            +        4 => array(
            +            '"e_ARCH"','"e_BUG"','"e_FILE"','"e_IMPL"','"e_PACKAGE"','"e_DIM"',
            +            '"e_FLAG"','"e_NOTFUNC"','"e_OP"','"e_TYPE"','"e_TYPE2"',
            +            '"e_PRIORITY"','"e_VAR"','"e_DOMAIN"','"e_MAXPRIME"','"e_MEM"',
            +            '"e_OVERFLOW"','"e_PREC"','"e_STACK"','"e_ALARM"','"e_USER"',
            +            '"e_CONSTPOL"','"e_COPRIME"','"e_INV"','"e_IRREDPOL"','"e_MISC"',
            +            '"e_MODULUS"','"e_NEGVAL"','"e_PRIME"','"e_ROOTS0"','"e_SQRTN"'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        1 => array(
            +            '(',')','{','}','[',']','+','-','*','/','%','=','<','>','!','^','&','|','?',';',':',',','\\','\''
            +            )
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0000ff;',
            +            2 => 'color: #e07022;',
            +            3 => 'color: #00d2d2;',
            +            4 => 'color: #00d2d2;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #008000;',
            +            'MULTI' => 'color: #008000;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #111111; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #002222;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #800080;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #666666;',
            +            1 => 'color: #666666;',
            +            2 => 'color: #666666;'
            +            ),
            +        'METHODS' => array(
            +            0 => 'color: #004000;'
            +            ),
            +        'SYMBOLS' => array(
            +            1 => 'color: #339933;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #e07022',    # Should be the same as keyword group 2
            +            1 => 'color: #555555',
            +            2 => 'color: #0000ff'     # Should be the same as keyword group 1
            +            ),
            +        'SCRIPT' => array()
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        0 => array( # types marked on variables
            +            GESHI_SEARCH => '(? '\\1',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '"',
            +            GESHI_AFTER => '"'
            +            ),
            +        1 => array( # literal variables
            +            GESHI_SEARCH => '(? '\\1',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        2 => array( # member functions
            +            GESHI_SEARCH => '(?<=[.])(a[1-6]|b[2-8]|c[4-6]|area|bid|bnf|clgp|cyc|diff|disc|[efjp]|fu|gen|index|mod|nf|no|omega|pol|reg|roots|sign|r[12]|t2|tate|tu|zk|zkst)\b',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            )
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        2 => array(
            +            '[a-zA-Z][a-zA-Z0-9_]*:' => ''
            +            ),
            +        3 => array(
            +            'default(' => ''
            +            ),
            +        4 => array(
            +            'iferrname(' => ''
            +            ),
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array()
            +);
            diff --git a/vendor/easybook/geshi/geshi/pascal.php b/vendor/easybook/geshi/geshi/pascal.php
            new file mode 100644
            index 0000000000..43e6437041
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/pascal.php
            @@ -0,0 +1,164 @@
            + 'Pascal',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array('(*' => '*)', '{' => '}'),
            +    //Compiler directives
            +    'COMMENT_REGEXP' => array(2 => '/\\{\\$.*?}|\\(\\*\\$.*?\\*\\)/U'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'"),
            +    'ESCAPE_CHAR' => '',
            +
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'absolute','asm','assembler','begin','break','case','catch','cdecl',
            +            'const','constructor','default','destructor','div','do','downto',
            +            'else','end','except','export','exports','external','far',
            +            'finalization','finally','for','forward','function','goto','if',
            +            'implementation','in','index','inherited','initialization','inline',
            +            'interface','interrupt','label','library','mod','name','not','of',
            +            'or','overload','override','private','procedure','program',
            +            'property','protected','public','published','raise','repeat',
            +            'resourcestring','shl','shr','stdcall','stored','switch','then',
            +            'to','try','type','unit','until','uses','var','while','with','xor'
            +            ),
            +        2 => array(
            +            'nil', 'false', 'true',
            +            ),
            +        3 => array(
            +            'abs','and','arc','arctan','blockread','blockwrite','chr','dispose',
            +            'cos','eof','eoln','exp','get','ln','new','odd','ord','ordinal',
            +            'pred','read','readln','sin','sqrt','succ','write','writeln'
            +            ),
            +        4 => array(
            +            'ansistring','array','boolean','byte','bytebool','char','file',
            +            'integer','longbool','longint','object','packed','pointer','real',
            +            'record','set','shortint','smallint','string','union','word'
            +            ),
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        ),
            +    'SYMBOLS' => array(
            +        0 => array('(', ')', '[', ']'),
            +        1 => array('.', ',', ':', ';'),
            +        2 => array('@', '^'),
            +        3 => array('=', '+', '-', '*', '/')
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000000; font-weight: bold;',
            +            2 => 'color: #000000; font-weight: bold;',
            +            3 => 'color: #000066;',
            +            4 => 'color: #000066; font-weight: bold;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;',
            +            2 => 'color: #008000; font-style: italic;',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #ff0000; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;',
            +            //'HARD' => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #006600;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #0000cc;',
            +            1 => 'color: #ff0000;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #000066;',
            +            1 => 'color: #000066;',
            +            2 => 'color: #000066;',
            +            3 => 'color: #000066;'
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        //Hex numbers
            +        0 => '\$[0-9a-fA-F]+',
            +        //Characters
            +        1 => '\#(?:\$[0-9a-fA-F]{1,2}|\d{1,3})'
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/pcre.php b/vendor/easybook/geshi/geshi/pcre.php
            new file mode 100644
            index 0000000000..14d6982a35
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/pcre.php
            @@ -0,0 +1,187 @@
            + 'PCRE',
            +    'COMMENT_SINGLE' => array(),
            +    'COMMENT_MULTI' => array(
            +        ),
            +    'COMMENT_REGEXP' => array(
            +        // Non-matching groups
            +        1 => "/(?<=\()\?(?::|(?=\())/",
            +
            +        // Modifier groups
            +        2 => "/(?<=\()\?[cdegimopsuxUX\-]+(?::|(?=\)))/",
            +
            +        // Look-Aheads
            +        3 => "/(?<=\()\?[!=]/",
            +
            +        // Look-Behinds
            +        4 => "/(?<=\()\?<[!=]/",
            +
            +        // Forward Matching
            +        5 => "/(?<=\()\?>/",
            +
            +        // Recursive Matching
            +        6 => "/(?<=\()\?R(?=\))/",
            +
            +        // Named Subpattern
            +        7 => "/(?<=\()\?(?:P?<\w+>|\d+(?=\))|P[=>]\w+(?=\)))/",
            +
            +        // Back Reference
            +        8 => "/\\\\(?:[1-9]\d?|g\d+|g\{(?:-?\d+|\w+)\}|k<\w+>|k'\w+'|k\{\w+\})/",
            +
            +        // Byte sequence: Octal
            +        9 => "/\\\\[0-7]{2,3}/",
            +
            +        // Byte sequence: Hex
            +        10 => "/\\\\x[0-9a-fA-F]{2}/",
            +
            +        // Byte sequence: Hex
            +        11 => "/\\\\u[0-9a-fA-F]{4}/",
            +
            +        // Byte sequence: Hex
            +        12 => "/\\\\U[0-9a-fA-F]{8}/",
            +
            +        // Byte sequence: Unicode
            +        13 => "/\\\\[pP]\{[^}\n]+\}/",
            +
            +        // One-Char Escapes
            +        14 => "/\\\\[abdefnrstvwzABCDGSWXZ\\\\\\.\[\]\(\)\{\}\^\\\$\?\+\*]/",
            +
            +        // Byte sequence: Control-X sequence
            +        15 => "/\\\\c./",
            +
            +        // Quantifier
            +        16 => "/\{(?:\d+,?|\d*,\d+)\}/",
            +
            +        // Comment Subpattern
            +        17 => "/(?<=\()\?#[^\)]*/",
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array(),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        ),
            +    'SYMBOLS' => array(
            +        0 => array('.'),
            +        1 => array('(', ')'),
            +        2 => array('[', ']', '|'),
            +        3 => array('^', '$'),
            +        4 => array('?', '+', '*'),
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #993333; font-weight: bold;',
            +            2 => 'color: #cc3300; font-weight: bold;',
            +            3 => 'color: #cc0066; font-weight: bold;',
            +            4 => 'color: #cc0066; font-weight: bold;',
            +            5 => 'color: #cc6600; font-weight: bold;',
            +            6 => 'color: #cc00cc; font-weight: bold;',
            +            7 => 'color: #cc9900; font-weight: bold; font-style: italic;',
            +            8 => 'color: #cc9900; font-style: italic;',
            +            9 => 'color: #669933; font-style: italic;',
            +            10 => 'color: #339933; font-style: italic;',
            +            11 => 'color: #339966; font-style: italic;',
            +            12 => 'color: #339999; font-style: italic;',
            +            13 => 'color: #663399; font-style: italic;',
            +            14 => 'color: #999933; font-style: italic;',
            +            15 => 'color: #993399; font-style: italic;',
            +            16 => 'color: #333399; font-style: italic;',
            +            17 => 'color: #666666; font-style: italic;',
            +            'MULTI' => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;',
            +            'HARD' => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;',
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #006600;',
            +            2 => 'color: #006600;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #333399; font-weight: bold;',
            +            1 => 'color: #993333; font-weight: bold;',
            +            2 => 'color: #339933; font-weight: bold;',
            +            3 => 'color: #333399; font-weight: bold;',
            +            4 => 'color: #333399; font-style: italic;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'PARSER_CONTROL' => array(
            +        'ENABLE_FLAGS' => array(
            +            'BRACKETS' => GESHI_NEVER,
            +            'NUMBERS' => GESHI_NEVER
            +        )
            +    )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/per.php b/vendor/easybook/geshi/geshi/per.php
            new file mode 100644
            index 0000000000..c3b5d15082
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/per.php
            @@ -0,0 +1,300 @@
            + 'per',
            +    'COMMENT_SINGLE' => array(1 => '--', 2 => '#'),
            +    'COMMENT_MULTI' => array('{' => '}'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            "ACCELERATOR",
            +            "ACCELERATOR2",
            +            "ACTION",
            +            "ALT",
            +            "AND",
            +            "AUTO",
            +            "AUTONEXT",
            +            "AUTOSCALE",
            +            "BETWEEN",
            +            "BOTH",
            +            "BUTTON",
            +            "BUTTONEDIT",
            +            "BUTTONTEXTHIDDEN",
            +            "BY",
            +            "BYTE",
            +            "CANVAS",
            +            "CENTER",
            +            "CHECKBOX",
            +            "CLASS",
            +            "COLOR",
            +            "COLUMNS",
            +            "COMBOBOX",
            +            "COMMAND",
            +            "COMMENT",
            +            "COMMENTS",
            +            "COMPACT",
            +            "COMPRESS",
            +            "CONFIG",
            +            "CONTROL",
            +            "CURRENT",
            +            "DATABASE",
            +            "DATEEDIT",
            +            "DEC",
            +            "DEFAULT",
            +            "DEFAULTS",
            +            "DELIMITERS",
            +            "DISPLAY",
            +            "DISPLAYONLY",
            +            "DOWNSHIFT",
            +            "DYNAMIC",
            +            "EDIT",
            +            "FIXED",
            +            "FOLDER",
            +            "FONTPITCH",
            +            "FORMAT",
            +            "FORMONLY",
            +            "GRID",
            +            "GRIDCHILDRENINPARENT",
            +            "GROUP",
            +            "HBOX",
            +            "HEIGHT",
            +            "HIDDEN",
            +            "HORIZONTAL",
            +            "INCLUDE",
            +            "INITIAL",
            +            "INITIALIZER",
            +            "INPUT",
            +            "INSTRUCTIONS",
            +            "INTERVAL",
            +            "INVISIBLE",
            +            "IS",
            +            "ITEM",
            +            "ITEMS",
            +            "JUSTIFY",
            +            "KEY",
            +            "KEYS",
            +            "LABEL",
            +            "LEFT",
            +            "LIKE",
            +            "LINES",
            +            "MATCHES",
            +            "NAME",
            +            "NOENTRY",
            +            "NONCOMPRESS",
            +            "NORMAL",
            +            "NOT",
            +            "NOUPDATE",
            +            "OPTIONS",
            +            "OR",
            +            "ORIENTATION",
            +            "PACKED",
            +            "PAGE",
            +            "PICTURE",
            +            "PIXELHEIGHT",
            +            "PIXELS",
            +            "PIXELWIDTH",
            +            "POINTS",
            +            "PROGRAM",
            +            "PROGRESSBAR",
            +            "QUERYCLEAR",
            +            "QUERYEDITABLE",
            +            "RADIOGROUP",
            +            "RECORD",
            +            "REQUIRED",
            +            "REVERSE",
            +            "RIGHT",
            +            "SAMPLE",
            +            "SCREEN",
            +            "SCROLL",
            +            "SCROLLBARS",
            +            "SCROLLGRID",
            +            "SECOND",
            +            "SEPARATOR",
            +            "SHIFT",
            +            "SIZE",
            +            "SIZEPOLICY",
            +            "SMALLFLOAT",
            +            "SMALLINT",
            +            "SPACING",
            +            "STRETCH",
            +            "STYLE",
            +            "TABINDEX",
            +            "TABLE",
            +            "TAG",
            +            "TEXT",
            +            "TEXTEDIT",
            +            "THROUGH",
            +            "THRU",
            +            "TITLE",
            +            "TO",
            +            "TOOLBAR",
            +            "TOPMENU",
            +            "TYPE",
            +            "UNHIDABLE",
            +            "UNHIDABLECOLUMNS",
            +            "UNMOVABLE",
            +            "UNMOVABLECOLUMNS",
            +            "UNSIZABLE",
            +            "UNSIZABLECOLUMNS",
            +            "UNSORTABLE",
            +            "UNSORTABLECOLUMNS",
            +            "UPSHIFT",
            +            "USER",
            +            "VALIDATE",
            +            "VALUECHECKED",
            +            "VALUEMAX",
            +            "VALUEMIN",
            +            "VALUEUNCHECKED",
            +            "VARCHAR",
            +            "VARIABLE",
            +            "VBOX",
            +            "VERIFY",
            +            "VERSION",
            +            "VERTICAL",
            +            "TIMESTAMP",
            +            "WANTCOLUMNSANCHORED", /* to be removed! */
            +            "WANTFIXEDPAGESIZE",
            +            "WANTNORETURNS",
            +            "WANTTABS",
            +            "WHERE",
            +            "WIDGET",
            +            "WIDTH",
            +            "WINDOWSTYLE",
            +            "WITHOUT",
            +            "WORDWRAP",
            +            "X",
            +            "Y",
            +            "ZEROFILL",
            +            "SCHEMA",
            +            "ATTRIBUTES",
            +            "TABLES",
            +            "LAYOUT",
            +            "END"
            +            ),
            +        2 => array(
            +            "YEAR",
            +            "BLACK",
            +            "BLINK",
            +            "BLUE",
            +            "YELLOW",
            +            "WHITE",
            +            "UNDERLINE",
            +            "CENTURY",
            +            "FRACTION",
            +            "CHAR",
            +            "CHARACTER",
            +            "CHARACTERS",
            +            "CYAN",
            +            "DATE",
            +            "DATETIME",
            +            "DAY",
            +            "DECIMAL",
            +            "FALSE",
            +            "FLOAT",
            +            "GREEN",
            +            "HOUR",
            +            "INT",
            +            "INTEGER",
            +            "MAGENTA",
            +            "MINUTE",
            +            "MONEY",
            +            "NONE",
            +            "NULL",
            +            "REAL",
            +            "RED",
            +            "TRUE",
            +            "TODAY",
            +            "MONTH",
            +            "IMAGE"
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '+', '-', '*', '?', '=', '/', '%', '>', '<', '^', '!', '|', ':',
            +        '(', ')', '[', ']'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0600FF;',
            +            2 => 'color: #0000FF; font-weight: bold;',
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #008080; font-style: italic;',
            +            2 => 'color: #008080;',
            +            'MULTI' => 'color: green'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #008080; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #808080;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #FF0000;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #0000FF;',
            +            2 => 'color: #0000FF;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #008000;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/perl.php b/vendor/easybook/geshi/geshi/perl.php
            new file mode 100644
            index 0000000000..c3c32337b8
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/perl.php
            @@ -0,0 +1,218 @@
            + 'Perl',
            +    'COMMENT_SINGLE' => array(1 => '#'),
            +    'COMMENT_MULTI' => array(
            +        '=back' => '=cut',
            +        '=head' => '=cut',
            +        '=item' => '=cut',
            +        '=over' => '=cut',
            +        '=begin' => '=cut',
            +        '=end' => '=cut',
            +        '=for' => '=cut',
            +        '=encoding' => '=cut',
            +        '=pod' => '=cut'
            +        ),
            +    'COMMENT_REGEXP' => array(
            +        //Regular expressions
            +        2 => "/(?<=[\\s^])(s|tr|y)\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])*\\/[msixpogcde]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])(m|q[qrwx]?)?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[msixpogc]*(?=[\\s$\\.\\,\\;\\)])/iU",
            +        //Regular expression match variables
            +        3 => '/\$\d+/',
            +        //Heredoc
            +        4 => '/<<\s*?([\'"]?)([a-zA-Z0-9]+)\1;[^\n]*?\\n.*\\n\\2(?![a-zA-Z0-9])/siU',
            +        //Predefined variables
            +        5 => '/\$(\^[a-zA-Z]?|[\*\$`\'&_\.,+\-~:;\\\\\/"\|%=\?!@#<>\(\)\[\]])(?!\w)|@[_+\-]|%[!]|\$(?=\{)/',
            +        ),
            +    'NUMBERS' => array(
            +        // Includes rules for decimal, octal (0777), hexidecimal (0xDEADBEEF),
            +        // binary (0b101010) numbers, amended to work with underscores (since
            +        // Perl allows you to use underscores in number literals)
            +        0 => '(?:(? GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"','`'),
            +    'HARDQUOTE' => array("'", "'"),            // An optional 2-element array defining the beginning and end of a hard-quoted string
            +    'HARDESCAPE' => array('\\\'',),
            +        // Things that must still be escaped inside a hard-quoted string
            +        // If HARDQUOTE is defined, HARDESCAPE must be defined
            +        // This will not work unless the first character of each element is either in the
            +        // QUOTEMARKS array or is the ESCAPE_CHAR
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'case', 'do', 'else', 'elsif', 'for', 'if', 'then', 'until', 'while', 'foreach', 'my',
            +            'xor', 'or', 'and', 'unless', 'next', 'last', 'redo', 'not', 'our',
            +            'reset', 'continue', 'cmp', 'ne', 'eq', 'lt', 'gt', 'le', 'ge',
            +            ),
            +        2 => array(
            +            'use', 'sub', 'new', '__END__', '__DATA__', '__DIE__', '__WARN__', 'BEGIN',
            +            'STDIN', 'STDOUT', 'STDERR', 'ARGV', 'ARGVOUT'
            +            ),
            +        3 => array(
            +            'abs', 'accept', 'alarm', 'atan2', 'bind', 'binmode', 'bless',
            +            'caller', 'chdir', 'chmod', 'chomp', 'chop', 'chown', 'chr',
            +            'chroot', 'close', 'closedir', 'connect', 'cos',
            +            'crypt', 'dbmclose', 'dbmopen', 'defined', 'delete', 'die',
            +            'dump', 'each', 'endgrent', 'endhostent', 'endnetent', 'endprotoent',
            +            'endpwent', 'endservent', 'eof', 'eval', 'exec', 'exists', 'exit',
            +            'exp', 'fcntl', 'fileno', 'flock', 'fork', 'format', 'formline',
            +            'getc', 'getgrent', 'getgrgid', 'getgrnam', 'gethostbyaddr',
            +            'gethostbyname', 'gethostent', 'getlogin', 'getnetbyaddr', 'getnetbyname',
            +            'getnetent', 'getpeername', 'getpgrp', 'getppid', 'getpriority',
            +            'getprotobyname', 'getprotobynumber', 'getprotoent', 'getpwent',
            +            'getpwnam', 'getpwuid', 'getservbyname', 'getservbyport', 'getservent',
            +            'getsockname', 'getsockopt', 'given', 'glob', 'gmtime', 'goto', 'grep',
            +            'hex', 'import', 'index', 'int', 'ioctl', 'join', 'keys', 'kill',
            +            'lc', 'lcfirst', 'length', 'link', 'listen', 'local',
            +            'localtime', 'log', 'lstat', 'm', 'map', 'mkdir', 'msgctl', 'msgget',
            +            'msgrcv', 'msgsnd', 'no', 'oct', 'open', 'opendir',
            +            'ord', 'pack', 'package', 'pipe', 'pop', 'pos', 'print',
            +            'printf', 'prototype', 'push', 'qq', 'qr', 'quotemeta', 'qw',
            +            'qx', 'q', 'rand', 'read', 'readdir', 'readline', 'readlink', 'readpipe',
            +            'recv', 'ref', 'rename', 'require', 'return',
            +            'reverse', 'rewinddir', 'rindex', 'rmdir', 's', 'say', 'scalar', 'seek',
            +            'seekdir', 'select', 'semctl', 'semget', 'semop', 'send', 'setgrent',
            +            'sethostent', 'setnetent', 'setpgrp', 'setpriority', 'setprotoent',
            +            'setpwent', 'setservent', 'setsockopt', 'shift', 'shmctl', 'shmget',
            +            'shmread', 'shmwrite', 'shutdown', 'sin', 'sleep', 'socket', 'socketpair',
            +            'sort', 'splice', 'split', 'sprintf', 'sqrt', 'srand', 'stat', 'state',
            +            'study', 'substr', 'symlink', 'syscall', 'sysopen', 'sysread',
            +            'sysseek', 'system', 'syswrite', 'tell', 'telldir', 'tie', 'tied',
            +            'time', 'times', 'tr', 'truncate', 'uc', 'ucfirst', 'umask', 'undef',
            +            'unlink', 'unpack', 'unshift', 'untie', 'utime', 'values',
            +            'vec', 'wait', 'waitpid', 'wantarray', 'warn', 'when', 'write', 'y'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '<', '>', '=',
            +        '!', '@', '~', '&', '|', '^',
            +        '+','-', '*', '/', '%',
            +        ',', ';', '?', '.', ':'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;',
            +            2 => 'color: #000000; font-weight: bold;',
            +            3 => 'color: #000066;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; font-style: italic;',
            +            2 => 'color: #009966; font-style: italic;',
            +            3 => 'color: #0000ff;',
            +            4 => 'color: #cc0000; font-style: italic;',
            +            5 => 'color: #0000ff;',
            +            'MULTI' => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;',
            +            'HARD' => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;',
            +            'HARD' => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #006600;',
            +            2 => 'color: #006600;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #339933;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #0000ff;',
            +            4 => 'color: #009999;',
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => 'http://perldoc.perl.org/functions/{FNAMEL}.html'
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '->',
            +        2 => '::'
            +        ),
            +    'REGEXPS' => array(
            +        //Variable
            +        0 => '(?:\$[\$#]?|\\\\(?:[@%*]?|\\\\*\$|&)|%[$]?|@[$]?|\*[$]?|&[$]?)[a-zA-Z_][a-zA-Z0-9_]*',
            +        //File Descriptor
            +        4 => '<[a-zA-Z_][a-zA-Z0-9_]*>',
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'PARSER_CONTROL' => array(
            +        'COMMENTS' => array(
            +            'DISALLOWED_BEFORE' => '$'
            +        )
            +    )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/perl6.php b/vendor/easybook/geshi/geshi/perl6.php
            new file mode 100644
            index 0000000000..f2f65e8553
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/perl6.php
            @@ -0,0 +1,196 @@
            + 'Perl 6',
            +    'COMMENT_SINGLE' => array(1 => '#'),
            +    'COMMENT_MULTI' => array('=begin' => '=end'),
            +    'COMMENT_REGEXP' => array(
            +        //Regular expressions
            +        2 => "/(?<=[\\s^])(s|tr|y)\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])*\\/[msixpogcde]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])(m|q[qrwx]?)?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[msixpogc]*(?=[\\s$\\.\\,\\;\\)])/iU",
            +        //Regular expression match variables
            +        3 => '/\$\d+/',
            +        //Heredoc
            +        4 => '/<<\s*?([\'"]?)([a-zA-Z0-9]+)\1;[^\n]*?\\n.*\\n\\2(?![a-zA-Z0-9])/siU',
            +        //Beastly hack to finish highlighting each POD block
            +        5 => '((?<==end) .+)'
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'HARDQUOTE' => array("'", "'"),            // An optional 2-element array defining the beginning and end of a hard-quoted string
            +    'HARDESCAPE' => array('\\\''),
            +        // Things that must still be escaped inside a hard-quoted string
            +        // If HARDQUOTE is defined, HARDESCAPE must be defined
            +        // This will not work unless the first character of each element is either in the
            +        // QUOTEMARKS array or is the ESCAPE_CHAR
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'do', 'else', 'elsif', 'for', 'if', 'then', 'until',
            +            'while', 'loop', 'repeat', 'my', 'xor', 'or', 'and',
            +            'unless', 'next', 'last', 'redo', 'not', 'our', 'let',
            +            'temp', 'state', 'enum', 'constant', 'continue', 'cmp',
            +            'ne', 'eq', 'lt', 'gt', 'le', 'ge', 'leg', 'div', 'X',
            +            'Z', 'x', 'xx', 'given', 'when', 'default', 'has',
            +            'returns', 'of', 'is', 'does', 'where', 'subset', 'but',
            +            'True', 'False', 'return', 'die', 'fail'
            +            ),
            +        2 => array(
            +            'use', 'sub', 'multi', 'method', 'submethod', 'proto',
            +            'class', 'role', 'grammar', 'regex', 'token', 'rule',
            +            'new', 'BEGIN', 'END', 'CHECK', 'INIT', 'START', 'FIRST',
            +            'ENTER', 'LEAVE', 'KEEP', 'UNDO', 'NEXT', 'LAST', 'PRE',
            +            'POST', 'CATCH', 'CONTROL', 'BUILD'
            +            ),
            +        3 => array(
            +            'all', 'any', 'cat', 'classify', 'defined', 'grep', 'first',
            +            'keys', 'kv', 'join', 'map', 'max', 'min', 'none', 'one', 'pairs',
            +            'print', 'printf', 'roundrobin', 'pick', 'reduce', 'reverse', 'say',
            +            'shape', 'sort', 'srand', 'undefine', 'uri', 'values', 'warn', 'zip',
            +
            +            # Container
            +            'rotate', 'comb', 'end', 'elems', 'delete',
            +            'exists', 'pop', 'push', 'shift', 'splice',
            +            'unshift', 'invert', 'decode',
            +
            +            # Numeric
            +            'succ', 'pred', 'abs', 'exp', 'log',
            +            'log10', 'rand', 'roots', 'cis', 'unpolar', 'i', 'floor',
            +            'ceiling', 'round', 'truncate', 'sign', 'sqrt',
            +            'polar', 're', 'im', 'I', 'atan2', 'nude',
            +            'denominator', 'numerator',
            +
            +            # Str
            +            'p5chop', 'chop', 'p5chomp', 'chomp', 'lc', 'lcfirst',
            +            'uc', 'ucfirst', 'normalize', 'samecase', 'sameaccent',
            +            'capitalize', 'length', 'chars', 'graphs', 'codes',
            +            'bytes', 'encode', 'index', 'pack', 'quotemeta', 'rindex',
            +            'split', 'words', 'flip', 'sprintf', 'fmt',
            +            'substr', 'trim', 'unpack', 'match', 'subst', 'trans'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '<', '>', '=',
            +        '!', '@', '~', '&', '|', '^',
            +        '+','-', '*', '/', '%',
            +        ',', ';', '?', '.', ':',
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;',
            +            2 => 'color: #000000; font-weight: bold;',
            +            3 => 'color: #000066;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; font-style: italic;',
            +            2 => 'color: #009966; font-style: italic;',
            +            3 => 'color: #0000ff;',
            +            4 => 'color: #cc0000; font-style: italic;',
            +            5 => 'color: #666666; font-style: italic;',
            +            'MULTI' => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;',
            +            'HARD' => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;',
            +            'HARD' => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #006600;',
            +            2 => 'color: #006600;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #339933;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #0000ff;',
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.',
            +        2 => '::'
            +        ),
            +    'REGEXPS' => array(
            +        //Variable
            +        0 => '(?:[$@%]|&)(?:(?:[\^:*?!~]|<)?[a-zA-Z_][a-zA-Z0-9_]*|(?=\.))'
            +        # We treat the . twigil specially so the name can be highlighted as an
            +        # object field (via OBJECT_SPLITTERS).
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'PARSER_CONTROL' => array(
            +        'COMMENTS' => array(
            +            'DISALLOWED_BEFORE' => '$'
            +        )
            +    )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/pf.php b/vendor/easybook/geshi/geshi/pf.php
            new file mode 100644
            index 0000000000..06fad7353b
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/pf.php
            @@ -0,0 +1,177 @@
            + 'OpenBSD Packet Filter',
            +    'COMMENT_SINGLE' => array('#'),
            +    'COMMENT_MULTI' => array(),
            +    'COMMENT_REGEXP' => array(
            +        1 => "/\\$\\{[^\\n\\}]*?\\}/i",
            +        2 => '/<<-?\s*?(\'?)([a-zA-Z0-9]+)\1\\n.*\\n\\2(?![a-zA-Z0-9])/siU',
            +        3 => "/\\\\['\"]/siU"
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'HARDQUOTE' => array("'", "'"),
            +    'HARDESCAPE' => array("\'"),
            +    'ESCAPE_CHAR' => '',
            +    'ESCAPE_REGEXP' => array(
            +        1 => "#\\\\[nfrtv\\$\\\"\n]#i",
            +        2 => "#\\$[a-z_][a-z0-9_]*#i",
            +        3 => "/\\$\\{[^\\n\\}]*?\\}/i",
            +        4 => "/\\$\\([^\\n\\)]*?\\)/i",
            +        5 => "/`[^`]*`/"
            +        ),
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'pass'
            +        ),
            +        2 => array(
            +            'block'
            +            ),
            +        3 => array(
            +            'quick','keep','state','antispoof','table','persist','file','scrub',
            +            'set','skip','flags','on'
            +            ),
            +        4 => array(
            +            'in','out','proto'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '[', ']', '!', '@', '%', '&', '*', '|', '/', '<', '>', ';;', '`','='
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #009900; font-weight: bold;',
            +            2 => 'color: #990000; font-weight: bold;',
            +            3 => 'color: #7a0874;',
            +            4 => 'color: #336699;'
            +            ),
            +        'COMMENTS' => array(
            +            0 => 'color: #666666; font-style: italic;',
            +            1 => 'color: #800000;',
            +            2 => 'color: #cc0000; font-style: italic;',
            +            3 => 'color: #000000; font-weight: bold;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            1 => 'color: #000099; font-weight: bold;',
            +            2 => 'color: #007800;',
            +            3 => 'color: #007800;',
            +            4 => 'color: #007800;',
            +            5 => 'color: #780078;',
            +            'HARD' => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #7a0874; font-weight: bold;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #CC0000;',
            +            'HARD' => 'color: #CC0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #ff00cc;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #000000; font-weight: bold;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #007800;',
            +            1 => 'color: #007800;',
            +            2 => 'color: #007800;',
            +            4 => 'color: #007800;',
            +            5 => 'color: #660033;',
            +            6 => 'color: #000099; font-weight: bold;',
            +            7 => 'color: #0000ff;',
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        //Variables (will be handled by comment_regexps)
            +        0 => "\\$\\{[a-zA-Z_][a-zA-Z0-9_]*?\\}",
            +        //Variables without braces
            +        1 => "\\$[a-zA-Z_][a-zA-Z0-9_]*",
            +        //Variable assignment
            +        2 => "(? "\\$[*#\$\\-\\?!]",
            +        //Parameters of commands
            +        5 => "(?<=\s)--?[0-9a-zA-Z\-]+(?=[\s=]|$)",
            +        //IPs
            +        6 => "([0-9]{1,3}\.){3}[0-9]{1,3}",
            +        //Tables
            +        7 => "(<(.*)>)"
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +    ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4,
            +    'PARSER_CONTROL' => array(
            +        'COMMENTS' => array(
            +            'DISALLOWED_BEFORE' => '$'
            +        ),
            +        'KEYWORDS' => array(
            +            'DISALLOWED_BEFORE' => "(?  "(?![\.\-a-zA-Z0-9_%\\/])"
            +        )
            +    )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/php-brief.php b/vendor/easybook/geshi/geshi/php-brief.php
            new file mode 100644
            index 0000000000..c88e7cbdf8
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/php-brief.php
            @@ -0,0 +1,221 @@
            + 'PHP (brief)',
            +    'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    //Heredoc and Nowdoc syntax
            +    'COMMENT_REGEXP' => array(3 => '/<<<\s*?(\'?)([a-zA-Z0-9]+)\1[^\n]*?\\n.*\\n\\2(?![a-zA-Z0-9])/siU'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'HARDQUOTE' => array("'", "'"),
            +    'HARDESCAPE' => array("\'"),
            +    'NUMBERS' =>
            +        GESHI_NUMBER_INT_BASIC |  GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX |
            +        GESHI_NUMBER_FLT_SCI_ZERO,
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'include', 'require', 'include_once', 'require_once',
            +            'for', 'as', 'foreach', 'if', 'elseif', 'else', 'while', 'do', 'endwhile', 'endif', 'switch', 'case', 'endswitch',
            +            'return', 'break'
            +            ),
            +        2 => array(
            +            'null', '__LINE__', '__FILE__',
            +            'false', '<?php',
            +            'true', 'var', 'default',
            +            'function', 'class', 'new', '&new', 'public', 'private', 'interface', 'extends',
            +            'const', 'self'
            +            ),
            +        3 => array(
            +            'func_num_args', 'func_get_arg', 'func_get_args', 'strlen', 'strcmp', 'strncmp', 'strcasecmp', 'strncasecmp', 'each', 'error_reporting', 'define', 'defined',
            +            'trigger_error', 'user_error', 'set_error_handler', 'restore_error_handler', 'get_declared_classes', 'get_loaded_extensions',
            +            'extension_loaded', 'get_extension_funcs', 'debug_backtrace',
            +            'constant', 'bin2hex', 'sleep', 'usleep', 'time', 'mktime', 'gmmktime', 'strftime', 'gmstrftime', 'strtotime', 'date', 'gmdate', 'getdate', 'localtime', 'checkdate', 'flush', 'wordwrap', 'htmlspecialchars', 'htmlentities', 'html_entity_decode', 'md5', 'md5_file', 'crc32', 'getimagesize', 'image_type_to_mime_type', 'phpinfo', 'phpversion', 'phpcredits', 'strnatcmp', 'strnatcasecmp', 'substr_count', 'strspn', 'strcspn', 'strtok', 'strtoupper', 'strtolower', 'strpos', 'strrpos', 'strrev', 'hebrev', 'hebrevc', 'nl2br', 'basename', 'dirname', 'pathinfo', 'stripslashes', 'stripcslashes', 'strstr', 'stristr', 'strrchr', 'str_shuffle', 'str_word_count', 'strcoll', 'substr', 'substr_replace', 'quotemeta', 'ucfirst', 'ucwords', 'strtr', 'addslashes', 'addcslashes', 'rtrim', 'str_replace', 'str_repeat', 'count_chars', 'chunk_split', 'trim', 'ltrim', 'strip_tags', 'similar_text', 'explode', 'implode', 'setlocale', 'localeconv',
            +            'parse_str', 'str_pad', 'chop', 'strchr', 'sprintf', 'printf', 'vprintf', 'vsprintf', 'sscanf', 'fscanf', 'parse_url', 'urlencode', 'urldecode', 'rawurlencode', 'rawurldecode', 'readlink', 'linkinfo', 'link', 'unlink', 'exec', 'system', 'escapeshellcmd', 'escapeshellarg', 'passthru', 'shell_exec', 'proc_open', 'proc_close', 'rand', 'srand', 'getrandmax', 'mt_rand', 'mt_srand', 'mt_getrandmax', 'base64_decode', 'base64_encode', 'abs', 'ceil', 'floor', 'round', 'is_finite', 'is_nan', 'is_infinite', 'bindec', 'hexdec', 'octdec', 'decbin', 'decoct', 'dechex', 'base_convert', 'number_format', 'fmod', 'ip2long', 'long2ip', 'getenv', 'putenv', 'getopt', 'microtime', 'gettimeofday', 'getrusage', 'uniqid', 'quoted_printable_decode', 'set_time_limit', 'get_cfg_var', 'magic_quotes_runtime', 'set_magic_quotes_runtime', 'get_magic_quotes_gpc', 'get_magic_quotes_runtime',
            +            'import_request_variables', 'error_log', 'serialize', 'unserialize', 'memory_get_usage', 'var_dump', 'var_export', 'debug_zval_dump', 'print_r','highlight_file', 'show_source', 'highlight_string', 'ini_get', 'ini_get_all', 'ini_set', 'ini_alter', 'ini_restore', 'get_include_path', 'set_include_path', 'restore_include_path', 'setcookie', 'header', 'headers_sent', 'connection_aborted', 'connection_status', 'ignore_user_abort', 'parse_ini_file', 'is_uploaded_file', 'move_uploaded_file', 'intval', 'floatval', 'doubleval', 'strval', 'gettype', 'settype', 'is_null', 'is_resource', 'is_bool', 'is_long', 'is_float', 'is_int', 'is_integer', 'is_double', 'is_real', 'is_numeric', 'is_string', 'is_array', 'is_object', 'is_scalar',
            +            'ereg', 'ereg_replace', 'eregi', 'eregi_replace', 'split', 'spliti', 'join', 'sql_regcase', 'dl', 'pclose', 'popen', 'readfile', 'rewind', 'rmdir', 'umask', 'fclose', 'feof', 'fgetc', 'fgets', 'fgetss', 'fread', 'fopen', 'fpassthru', 'ftruncate', 'fstat', 'fseek', 'ftell', 'fflush', 'fwrite', 'fputs', 'mkdir', 'rename', 'copy', 'tempnam', 'tmpfile', 'file', 'file_get_contents', 'stream_select', 'stream_context_create', 'stream_context_set_params', 'stream_context_set_option', 'stream_context_get_options', 'stream_filter_prepend', 'stream_filter_append', 'fgetcsv', 'flock', 'get_meta_tags', 'stream_set_write_buffer', 'set_file_buffer', 'set_socket_blocking', 'stream_set_blocking', 'socket_set_blocking', 'stream_get_meta_data', 'stream_register_wrapper', 'stream_wrapper_register', 'stream_set_timeout', 'socket_set_timeout', 'socket_get_status', 'realpath', 'fnmatch', 'fsockopen', 'pfsockopen', 'pack', 'unpack', 'get_browser', 'crypt', 'opendir', 'closedir', 'chdir', 'getcwd', 'rewinddir', 'readdir', 'dir', 'glob', 'fileatime', 'filectime', 'filegroup', 'fileinode', 'filemtime', 'fileowner', 'fileperms', 'filesize', 'filetype', 'file_exists', 'is_writable', 'is_writeable', 'is_readable', 'is_executable', 'is_file', 'is_dir', 'is_link', 'stat', 'lstat', 'chown',
            +            'touch', 'clearstatcache', 'mail', 'ob_start', 'ob_flush', 'ob_clean', 'ob_end_flush', 'ob_end_clean', 'ob_get_flush', 'ob_get_clean', 'ob_get_length', 'ob_get_level', 'ob_get_status', 'ob_get_contents', 'ob_implicit_flush', 'ob_list_handlers', 'ksort', 'krsort', 'natsort', 'natcasesort', 'asort', 'arsort', 'sort', 'rsort', 'usort', 'uasort', 'uksort', 'shuffle', 'array_walk', 'count', 'end', 'prev', 'next', 'reset', 'current', 'key', 'min', 'max', 'in_array', 'array_search', 'extract', 'compact', 'array_fill', 'range', 'array_multisort', 'array_push', 'array_pop', 'array_shift', 'array_unshift', 'array_splice', 'array_slice', 'array_merge', 'array_merge_recursive', 'array_keys', 'array_values', 'array_count_values', 'array_reverse', 'array_reduce', 'array_pad', 'array_flip', 'array_change_key_case', 'array_rand', 'array_unique', 'array_intersect', 'array_intersect_assoc', 'array_diff', 'array_diff_assoc', 'array_sum', 'array_filter', 'array_map', 'array_chunk', 'array_key_exists', 'pos', 'sizeof', 'key_exists', 'assert', 'assert_options', 'version_compare', 'ftok', 'str_rot13', 'aggregate',
            +            'session_name', 'session_module_name', 'session_save_path', 'session_id', 'session_regenerate_id', 'session_decode', 'session_register', 'session_unregister', 'session_is_registered', 'session_encode',
            +            'session_start', 'session_destroy', 'session_unset', 'session_set_save_handler', 'session_cache_limiter', 'session_cache_expire', 'session_set_cookie_params', 'session_get_cookie_params', 'session_write_close', 'preg_match', 'preg_match_all', 'preg_replace', 'preg_replace_callback', 'preg_split', 'preg_quote', 'preg_grep', 'overload', 'ctype_alnum', 'ctype_alpha', 'ctype_cntrl', 'ctype_digit', 'ctype_lower', 'ctype_graph', 'ctype_print', 'ctype_punct', 'ctype_space', 'ctype_upper', 'ctype_xdigit', 'virtual', 'apache_request_headers', 'apache_note', 'apache_lookup_uri', 'apache_child_terminate', 'apache_setenv', 'apache_response_headers', 'apache_get_version', 'getallheaders', 'mysql_connect', 'mysql_pconnect', 'mysql_close', 'mysql_select_db', 'mysql_create_db', 'mysql_drop_db', 'mysql_query', 'mysql_unbuffered_query', 'mysql_db_query', 'mysql_list_dbs', 'mysql_list_tables', 'mysql_list_fields', 'mysql_list_processes', 'mysql_error', 'mysql_errno', 'mysql_affected_rows', 'mysql_insert_id', 'mysql_result', 'mysql_num_rows', 'mysql_num_fields', 'mysql_fetch_row', 'mysql_fetch_array', 'mysql_fetch_assoc', 'mysql_fetch_object', 'mysql_data_seek', 'mysql_fetch_lengths', 'mysql_fetch_field', 'mysql_field_seek', 'mysql_free_result', 'mysql_field_name', 'mysql_field_table', 'mysql_field_len', 'mysql_field_type', 'mysql_field_flags', 'mysql_escape_string', 'mysql_real_escape_string', 'mysql_stat',
            +            'mysql_thread_id', 'mysql_client_encoding', 'mysql_get_client_info', 'mysql_get_host_info', 'mysql_get_proto_info', 'mysql_get_server_info', 'mysql_info', 'mysql', 'mysql_fieldname', 'mysql_fieldtable', 'mysql_fieldlen', 'mysql_fieldtype', 'mysql_fieldflags', 'mysql_selectdb', 'mysql_createdb', 'mysql_dropdb', 'mysql_freeresult', 'mysql_numfields', 'mysql_numrows', 'mysql_listdbs', 'mysql_listtables', 'mysql_listfields', 'mysql_db_name', 'mysql_dbname', 'mysql_tablename', 'mysql_table_name', 'pg_connect', 'pg_pconnect', 'pg_close', 'pg_connection_status', 'pg_connection_busy', 'pg_connection_reset', 'pg_host', 'pg_dbname', 'pg_port', 'pg_tty', 'pg_options', 'pg_ping', 'pg_query', 'pg_send_query', 'pg_cancel_query', 'pg_fetch_result', 'pg_fetch_row', 'pg_fetch_assoc', 'pg_fetch_array', 'pg_fetch_object', 'pg_fetch_all', 'pg_affected_rows', 'pg_get_result', 'pg_result_seek', 'pg_result_status', 'pg_free_result', 'pg_last_oid', 'pg_num_rows', 'pg_num_fields', 'pg_field_name', 'pg_field_num', 'pg_field_size', 'pg_field_type', 'pg_field_prtlen', 'pg_field_is_null', 'pg_get_notify', 'pg_get_pid', 'pg_result_error', 'pg_last_error', 'pg_last_notice', 'pg_put_line', 'pg_end_copy', 'pg_copy_to', 'pg_copy_from',
            +            'pg_trace', 'pg_untrace', 'pg_lo_create', 'pg_lo_unlink', 'pg_lo_open', 'pg_lo_close', 'pg_lo_read', 'pg_lo_write', 'pg_lo_read_all', 'pg_lo_import', 'pg_lo_export', 'pg_lo_seek', 'pg_lo_tell', 'pg_escape_string', 'pg_escape_bytea', 'pg_unescape_bytea', 'pg_client_encoding', 'pg_set_client_encoding', 'pg_meta_data', 'pg_convert', 'pg_insert', 'pg_update', 'pg_delete', 'pg_select', 'pg_exec', 'pg_getlastoid', 'pg_cmdtuples', 'pg_errormessage', 'pg_numrows', 'pg_numfields', 'pg_fieldname', 'pg_fieldsize', 'pg_fieldtype', 'pg_fieldnum', 'pg_fieldprtlen', 'pg_fieldisnull', 'pg_freeresult', 'pg_result', 'pg_loreadall', 'pg_locreate', 'pg_lounlink', 'pg_loopen', 'pg_loclose', 'pg_loread', 'pg_lowrite', 'pg_loimport', 'pg_loexport',
            +            'echo', 'print', 'global', 'static', 'exit', 'array', 'empty', 'eval', 'isset', 'unset', 'die'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        1 => array(
            +            '<%', '<%=', '%>', ''
            +            ),
            +        0 => array(
            +            '(', ')', '[', ']', '{', '}',
            +            '!', '@', '%', '&', '|', '/',
            +            '<', '>',
            +            '=', '-', '+', '*',
            +            '.', ':', ',', ';'
            +            )
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;',
            +            2 => 'color: #000000; font-weight: bold;',
            +            3 => 'color: #990000;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; font-style: italic;',
            +            2 => 'color: #666666; font-style: italic;',
            +            3 => 'color: #0000cc; font-style: italic;',
            +            'MULTI' => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;',
            +            'HARD' => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #0000ff;',
            +            'HARD' => 'color: #0000ff;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;',
            +            GESHI_NUMBER_OCT_PREFIX => 'color: #208080;',
            +            GESHI_NUMBER_HEX_PREFIX => 'color: #208080;',
            +            GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;',
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #004000;',
            +            2 => 'color: #004000;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #339933;',
            +            1 => 'color: #000000; font-weight: bold;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #0000ff;'
            +            ),
            +        'SCRIPT' => array(
            +            0 => '',
            +            1 => '',
            +            2 => '',
            +            3 => '',
            +            4 => '',
            +            5 => ''
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => 'http://www.php.net/{FNAMEL}'
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '->',
            +        2 => '::'
            +        ),
            +    'REGEXPS' => array(
            +        //Variables
            +        0 => "[\\$]+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*"
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_MAYBE,
            +    'SCRIPT_DELIMITERS' => array(
            +        0 => array(
            +            ' '?>'
            +            ),
            +        1 => array(
            +            ' '?>'
            +            ),
            +        2 => array(
            +            '<%' => '%>'
            +            ),
            +        3 => array(
            +            ''
            +            ),
            +        4 => "/(?P<\\?(?>php\b)?)(?:".
            +            "(?>[^\"'?\\/<]+)|".
            +            "\\?(?!>)|".
            +            "(?>'(?>[^'\\\\]|\\\\'|\\\\\\\|\\\\)*')|".
            +            "(?>\"(?>[^\"\\\\]|\\\\\"|\\\\\\\\|\\\\)*\")|".
            +            "(?>\\/\\*(?>[^\\*]|(?!\\*\\/)\\*)*\\*\\/)|".
            +            "\\/\\/(?>.*?$)|".
            +            "\\/(?=[^*\\/])|".
            +            "<(?!<<)|".
            +            "<<<(?P\w+)\s.*?\s\k".
            +            ")*(?P\\?>|\Z)/sm",
            +        5 => "/(?P<%)(?:".
            +            "(?>[^\"'%\\/<]+)|".
            +            "%(?!>)|".
            +            "(?>'(?>[^'\\\\]|\\\\'|\\\\\\\|\\\\)*')|".
            +            "(?>\"(?>[^\\\"\\\\]|\\\\\"|\\\\\\\\|\\\\)*\")|".
            +            "(?>\\/\\*(?>[^\\*]|(?!\\*\\/)\\*)*\\*\\/)|".
            +            "\\/\\/(?>.*?$)|".
            +            "\\/(?=[^*\\/])|".
            +            "<(?!<<)|".
            +            "<<<(?P\w+)\s.*?\s\k".
            +            ")*(?P%>)/sm"
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        0 => true,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        5 => true
            +        ),
            +    'TAB_WIDTH' => 4
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/php.php b/vendor/easybook/geshi/geshi/php.php
            new file mode 100644
            index 0000000000..7b5c16e189
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/php.php
            @@ -0,0 +1,1115 @@
            + 'PHP',
            +    'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(
            +        //Heredoc and Nowdoc syntax
            +        3 => '/<<<\s*?(\'?)([a-zA-Z0-9]+?)\1[^\n]*?\\n.*\\n\\2(?![a-zA-Z0-9])/siU',
            +        // phpdoc comments
            +        4 => '#/\*\*(?![\*\/]).*\*/#sU',
            +        // Advanced # handling
            +        2 => "/#.*?(?:(?=\?\>)|^)/smi"
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '',
            +    'ESCAPE_REGEXP' => array(
            +        //Simple Single Char Escapes
            +        1 => "#\\\\[nfrtv\$\"\n\\\\]#i",
            +        //Hexadecimal Char Specs
            +        2 => "#\\\\x[\da-fA-F]{1,2}#i",
            +        //Octal Char Specs
            +        3 => "#\\\\[0-7]{1,3}#",
            +        //String Parsing of Variable Names
            +        4 => "#\\$[a-z0-9_]+(?:\\[[a-z0-9_]+\\]|->[a-z0-9_]+)?|(?:\\{\\$|\\$\\{)[a-z0-9_]+(?:\\[('?)[a-z0-9_]*\\1\\]|->[a-z0-9_]+)*\\}#i",
            +        //Experimental extension supporting cascaded {${$var}} syntax
            +        5 => "#\$[a-z0-9_]+(?:\[[a-z0-9_]+\]|->[a-z0-9_]+)?|(?:\{\$|\$\{)[a-z0-9_]+(?:\[('?)[a-z0-9_]*\\1\]|->[a-z0-9_]+)*\}|\{\$(?R)\}#i",
            +        //Format String support in ""-Strings
            +        6 => "#%(?:%|(?:\d+\\\\\\\$)?\\+?(?:\x20|0|'.)?-?(?:\d+|\\*)?(?:\.\d+)?[bcdefFosuxX])#"
            +        ),
            +    'HARDQUOTE' => array("'", "'"),
            +    'HARDESCAPE' => array("'", "\\"),
            +    'HARDCHAR' => "\\",
            +    'NUMBERS' =>
            +        GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX |
            +        GESHI_NUMBER_FLT_SCI_ZERO,
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'as','break','case','continue','default','do','else','elseif',
            +            'endfor','endforeach','endif','endswitch','endwhile','for',
            +            'foreach','if','include','include_once','require','require_once',
            +            'return','switch','throw','while',
            +
            +            'echo','print'
            +            ),
            +        2 => array(
            +            '&new','</script>','<?php','<script language',
            +            'abstract','class','const','declare','extends','function','global',
            +            'interface','namespace','new','private','protected','public','self',
            +            'use','var'
            +            ),
            +        3 => array(
            +            'abs','acos','acosh','addcslashes','addslashes','aggregate',
            +            'aggregate_methods','aggregate_methods_by_list',
            +            'aggregate_methods_by_regexp','aggregate_properties',
            +            'aggregate_properties_by_list','aggregate_properties_by_regexp',
            +            'aggregation_info','apache_child_terminate','apache_get_modules',
            +            'apache_get_version','apache_getenv','apache_lookup_uri',
            +            'apache_note','apache_request_headers','apache_response_headers',
            +            'apache_setenv','array','array_change_key_case','array_chunk',
            +            'array_combine','array_count_values','array_diff',
            +            'array_diff_assoc','array_diff_key','array_diff_uassoc',
            +            'array_diff_ukey','array_fill','array_fill_keys','array_filter',
            +            'array_flip','array_intersect','array_intersect_assoc',
            +            'array_intersect_key','array_intersect_uassoc',
            +            'array_intersect_ukey','array_key_exists','array_keys','array_map',
            +            'array_merge','array_merge_recursive','array_multisort','array_pad',
            +            'array_pop','array_product','array_push','array_rand',
            +            'array_reduce','array_reverse','array_search','array_shift',
            +            'array_slice','array_splice','array_sum','array_udiff',
            +            'array_udiff_assoc','array_udiff_uassoc','array_uintersect',
            +            'array_uintersect_assoc','array_uintersect_uassoc','array_unique',
            +            'array_unshift','array_values','array_walk','array_walk_recursive',
            +            'arsort','asin','asinh','asort','assert','assert_options','atan',
            +            'atan2','atanh','base_convert','base64_decode','base64_encode',
            +            'basename','bcadd','bccomp','bcdiv','bcmod','bcmul',
            +            'bcompiler_load','bcompiler_load_exe','bcompiler_parse_class',
            +            'bcompiler_read','bcompiler_write_class','bcompiler_write_constant',
            +            'bcompiler_write_exe_footer','bcompiler_write_file',
            +            'bcompiler_write_footer','bcompiler_write_function',
            +            'bcompiler_write_functions_from_file','bcompiler_write_header',
            +            'bcompiler_write_included_filename','bcpow','bcpowmod','bcscale',
            +            'bcsqrt','bcsub','bin2hex','bindec','bindtextdomain',
            +            'bind_textdomain_codeset','bitset_empty','bitset_equal',
            +            'bitset_excl','bitset_fill','bitset_from_array','bitset_from_hash',
            +            'bitset_from_string','bitset_in','bitset_incl',
            +            'bitset_intersection','bitset_invert','bitset_is_empty',
            +            'bitset_subset','bitset_to_array','bitset_to_hash',
            +            'bitset_to_string','bitset_union','blenc_encrypt','bzclose',
            +            'bzcompress','bzdecompress','bzerrno','bzerror','bzerrstr',
            +            'bzflush','bzopen','bzread','bzwrite','cal_days_in_month',
            +            'cal_from_jd','cal_info','cal_to_jd','call_user_func',
            +            'call_user_func_array','call_user_method','call_user_method_array',
            +            'ceil','chdir','checkdate','checkdnsrr','chgrp','chmod','chop',
            +            'chown','chr','chunk_split','class_exists','class_implements',
            +            'class_parents','classkit_aggregate_methods',
            +            'classkit_doc_comments','classkit_import','classkit_method_add',
            +            'classkit_method_copy','classkit_method_redefine',
            +            'classkit_method_remove','classkit_method_rename','clearstatcache',
            +            'closedir','closelog','com_create_guid','com_event_sink',
            +            'com_get_active_object','com_load_typelib','com_message_pump',
            +            'com_print_typeinfo','compact','confirm_phpdoc_compiled',
            +            'connection_aborted','connection_status','constant',
            +            'convert_cyr_string','convert_uudecode','convert_uuencode','copy',
            +            'cos','cosh','count','count_chars','cpdf_add_annotation',
            +            'cpdf_add_outline','cpdf_arc','cpdf_begin_text','cpdf_circle',
            +            'cpdf_clip','cpdf_close','cpdf_closepath',
            +            'cpdf_closepath_fill_stroke','cpdf_closepath_stroke',
            +            'cpdf_continue_text','cpdf_curveto','cpdf_end_text','cpdf_fill',
            +            'cpdf_fill_stroke','cpdf_finalize','cpdf_finalize_page',
            +            'cpdf_global_set_document_limits','cpdf_import_jpeg','cpdf_lineto',
            +            'cpdf_moveto','cpdf_newpath','cpdf_open','cpdf_output_buffer',
            +            'cpdf_page_init','cpdf_rect','cpdf_restore','cpdf_rlineto',
            +            'cpdf_rmoveto','cpdf_rotate','cpdf_rotate_text','cpdf_save',
            +            'cpdf_save_to_file','cpdf_scale','cpdf_set_action_url',
            +            'cpdf_set_char_spacing','cpdf_set_creator','cpdf_set_current_page',
            +            'cpdf_set_font','cpdf_set_font_directories',
            +            'cpdf_set_font_map_file','cpdf_set_horiz_scaling',
            +            'cpdf_set_keywords','cpdf_set_leading','cpdf_set_page_animation',
            +            'cpdf_set_subject','cpdf_set_text_matrix','cpdf_set_text_pos',
            +            'cpdf_set_text_rendering','cpdf_set_text_rise','cpdf_set_title',
            +            'cpdf_set_viewer_preferences','cpdf_set_word_spacing',
            +            'cpdf_setdash','cpdf_setflat','cpdf_setgray','cpdf_setgray_fill',
            +            'cpdf_setgray_stroke','cpdf_setlinecap','cpdf_setlinejoin',
            +            'cpdf_setlinewidth','cpdf_setmiterlimit','cpdf_setrgbcolor',
            +            'cpdf_setrgbcolor_fill','cpdf_setrgbcolor_stroke','cpdf_show',
            +            'cpdf_show_xy','cpdf_stringwidth','cpdf_stroke','cpdf_text',
            +            'cpdf_translate','crack_check','crack_closedict',
            +            'crack_getlastmessage','crack_opendict','crc32','create_function',
            +            'crypt','ctype_alnum','ctype_alpha','ctype_cntrl','ctype_digit',
            +            'ctype_graph','ctype_lower','ctype_print','ctype_punct',
            +            'ctype_space','ctype_upper','ctype_xdigit','curl_close',
            +            'curl_copy_handle','curl_errno','curl_error','curl_exec',
            +            'curl_getinfo','curl_init','curl_multi_add_handle',
            +            'curl_multi_close','curl_multi_exec','curl_multi_getcontent',
            +            'curl_multi_info_read','curl_multi_init','curl_multi_remove_handle',
            +            'curl_multi_select','curl_setopt','curl_setopt_array',
            +            'curl_version','current','cvsclient_connect','cvsclient_log',
            +            'cvsclient_login','cvsclient_retrieve','date','date_create',
            +            'date_date_set','date_default_timezone_get',
            +            'date_default_timezone_set','date_format','date_isodate_set',
            +            'date_modify','date_offset_get','date_parse','date_sun_info',
            +            'date_sunrise','date_sunset','date_time_set','date_timezone_get',
            +            'date_timezone_set','db_id_list','dba_close','dba_delete',
            +            'dba_exists','dba_fetch','dba_firstkey','dba_handlers','dba_insert',
            +            'dba_key_split','dba_list','dba_nextkey','dba_open','dba_optimize',
            +            'dba_popen','dba_replace','dba_sync','dbase_add_record',
            +            'dbase_close','dbase_create','dbase_delete_record',
            +            'dbase_get_header_info','dbase_get_record',
            +            'dbase_get_record_with_names','dbase_numfields','dbase_numrecords',
            +            'dbase_open','dbase_pack','dbase_replace_record',
            +            'dbg_get_all_contexts','dbg_get_all_module_names',
            +            'dbg_get_all_source_lines','dbg_get_context_name',
            +            'dbg_get_module_name','dbg_get_profiler_results',
            +            'dbg_get_source_context','dblist','dbmclose','dbmdelete',
            +            'dbmexists','dbmfetch','dbmfirstkey','dbminsert','dbmnextkey',
            +            'dbmopen','dbmreplace','dbx_close','dbx_compare','dbx_connect',
            +            'dbx_error','dbx_escape_string','dbx_fetch_row','dbx_query',
            +            'dbx_sort','dcgettext','dcngettext','deaggregate','debug_backtrace',
            +            'debug_zval_dump','debugbreak','decbin','dechex','decoct','define',
            +            'defined','define_syslog_variables','deg2rad','dgettext','die',
            +            'dio_close','dio_open','dio_read','dio_seek','dio_stat','dio_write',
            +            'dir','dirname','disk_free_space','disk_total_space',
            +            'diskfreespace','dl','dngettext','docblock_token_name',
            +            'docblock_tokenize','dom_import_simplexml','domxml_add_root',
            +            'domxml_attributes','domxml_children','domxml_doc_add_root',
            +            'domxml_doc_document_element','domxml_doc_get_element_by_id',
            +            'domxml_doc_get_elements_by_tagname','domxml_doc_get_root',
            +            'domxml_doc_set_root','domxml_doc_validate','domxml_doc_xinclude',
            +            'domxml_dump_mem','domxml_dump_mem_file','domxml_dump_node',
            +            'domxml_dumpmem','domxml_elem_get_attribute',
            +            'domxml_elem_set_attribute','domxml_get_attribute','domxml_getattr',
            +            'domxml_html_dump_mem','domxml_new_child','domxml_new_doc',
            +            'domxml_new_xmldoc','domxml_node','domxml_node_add_namespace',
            +            'domxml_node_attributes','domxml_node_children',
            +            'domxml_node_get_content','domxml_node_has_attributes',
            +            'domxml_node_new_child','domxml_node_set_content',
            +            'domxml_node_set_namespace','domxml_node_unlink_node',
            +            'domxml_open_file','domxml_open_mem','domxml_parser',
            +            'domxml_parser_add_chunk','domxml_parser_cdata_section',
            +            'domxml_parser_characters','domxml_parser_comment',
            +            'domxml_parser_end','domxml_parser_end_document',
            +            'domxml_parser_end_element','domxml_parser_entity_reference',
            +            'domxml_parser_get_document','domxml_parser_namespace_decl',
            +            'domxml_parser_processing_instruction',
            +            'domxml_parser_start_document','domxml_parser_start_element',
            +            'domxml_root','domxml_set_attribute','domxml_setattr',
            +            'domxml_substitute_entities_default','domxml_unlink_node',
            +            'domxml_version','domxml_xmltree','doubleval','each','easter_date',
            +            'easter_days','empty','end','ereg','ereg_replace','eregi',
            +            'eregi_replace','error_get_last','error_log','error_reporting',
            +            'escapeshellarg','escapeshellcmd','eval','event_deschedule',
            +            'event_dispatch','event_free','event_handle_signal',
            +            'event_have_events','event_init','event_new','event_pending',
            +            'event_priority_set','event_schedule','event_set','event_timeout',
            +            'exec','exif_imagetype','exif_read_data','exif_tagname',
            +            'exif_thumbnail','exit','exp','explode','expm1','extension_loaded',
            +            'extract','ezmlm_hash','fbird_add_user','fbird_affected_rows',
            +            'fbird_backup','fbird_blob_add','fbird_blob_cancel',
            +            'fbird_blob_close','fbird_blob_create','fbird_blob_echo',
            +            'fbird_blob_get','fbird_blob_import','fbird_blob_info',
            +            'fbird_blob_open','fbird_close','fbird_commit','fbird_commit_ret',
            +            'fbird_connect','fbird_db_info','fbird_delete_user','fbird_drop_db',
            +            'fbird_errcode','fbird_errmsg','fbird_execute','fbird_fetch_assoc',
            +            'fbird_fetch_object','fbird_fetch_row','fbird_field_info',
            +            'fbird_free_event_handler','fbird_free_query','fbird_free_result',
            +            'fbird_gen_id','fbird_maintain_db','fbird_modify_user',
            +            'fbird_name_result','fbird_num_fields','fbird_num_params',
            +            'fbird_param_info','fbird_pconnect','fbird_prepare','fbird_query',
            +            'fbird_restore','fbird_rollback','fbird_rollback_ret',
            +            'fbird_server_info','fbird_service_attach','fbird_service_detach',
            +            'fbird_set_event_handler','fbird_trans','fbird_wait_event','fclose',
            +            'fdf_add_doc_javascript','fdf_add_template','fdf_close',
            +            'fdf_create','fdf_enum_values','fdf_errno','fdf_error','fdf_get_ap',
            +            'fdf_get_attachment','fdf_get_encoding','fdf_get_file',
            +            'fdf_get_flags','fdf_get_opt','fdf_get_status','fdf_get_value',
            +            'fdf_get_version','fdf_header','fdf_next_field_name','fdf_open',
            +            'fdf_open_string','fdf_remove_item','fdf_save','fdf_save_string',
            +            'fdf_set_ap','fdf_set_encoding','fdf_set_file','fdf_set_flags',
            +            'fdf_set_javascript_action','fdf_set_on_import_javascript',
            +            'fdf_set_opt','fdf_set_status','fdf_set_submit_form_action',
            +            'fdf_set_target_frame','fdf_set_value','fdf_set_version','feof',
            +            'fflush','fgetc','fgetcsv','fgets','fgetss','file','file_exists',
            +            'file_get_contents','file_put_contents','fileatime','filectime',
            +            'filegroup','fileinode','filemtime','fileowner','fileperms',
            +            'filepro','filepro_fieldcount','filepro_fieldname',
            +            'filepro_fieldtype','filepro_fieldwidth','filepro_retrieve',
            +            'filepro_rowcount','filesize','filetype','filter_has_var',
            +            'filter_id','filter_input','filter_input_array','filter_list',
            +            'filter_var','filter_var_array','finfo_buffer','finfo_close',
            +            'finfo_file','finfo_open','finfo_set_flags','floatval','flock',
            +            'floor','flush','fmod','fnmatch','fopen','fpassthru','fprintf',
            +            'fputcsv','fputs','fread','frenchtojd','fribidi_charset_info',
            +            'fribidi_get_charsets','fribidi_log2vis','fscanf','fseek',
            +            'fsockopen','fstat','ftell','ftok','ftp_alloc','ftp_cdup',
            +            'ftp_chdir','ftp_chmod','ftp_close','ftp_connect','ftp_delete',
            +            'ftp_exec','ftp_fget','ftp_fput','ftp_get','ftp_get_option',
            +            'ftp_login','ftp_mdtm','ftp_mkdir','ftp_nb_continue','ftp_nb_fget',
            +            'ftp_nb_fput','ftp_nb_get','ftp_nb_put','ftp_nlist','ftp_pasv',
            +            'ftp_put','ftp_pwd','ftp_quit','ftp_raw','ftp_rawlist','ftp_rename',
            +            'ftp_rmdir','ftp_set_option','ftp_site','ftp_size',
            +            'ftp_ssl_connect','ftp_systype','ftruncate','function_exists',
            +            'func_get_arg','func_get_args','func_num_args','fwrite','gd_info',
            +            'getallheaders','getcwd','getdate','getenv','gethostbyaddr',
            +            'gethostbyname','gethostbynamel','getimagesize','getlastmod',
            +            'getmxrr','getmygid','getmyinode','getmypid','getmyuid','getopt',
            +            'getprotobyname','getprotobynumber','getrandmax','getrusage',
            +            'getservbyname','getservbyport','gettext','gettimeofday','gettype',
            +            'get_browser','get_cfg_var','get_class','get_class_methods',
            +            'get_class_vars','get_current_user','get_declared_classes',
            +            'get_defined_constants','get_defined_functions','get_defined_vars',
            +            'get_extension_funcs','get_headers','get_html_translation_table',
            +            'get_included_files','get_include_path','get_loaded_extensions',
            +            'get_magic_quotes_gpc','get_magic_quotes_runtime','get_meta_tags',
            +            'get_object_vars','get_parent_class','get_required_files',
            +            'get_resource_type','glob','gmdate','gmmktime','gmp_abs','gmp_add',
            +            'gmp_and','gmp_clrbit','gmp_cmp','gmp_com','gmp_div','gmp_div_q',
            +            'gmp_div_qr','gmp_div_r','gmp_divexact','gmp_fact','gmp_gcd',
            +            'gmp_gcdext','gmp_hamdist','gmp_init','gmp_intval','gmp_invert',
            +            'gmp_jacobi','gmp_legendre','gmp_mod','gmp_mul','gmp_neg',
            +            'gmp_nextprime','gmp_or','gmp_perfect_square','gmp_popcount',
            +            'gmp_pow','gmp_powm','gmp_prob_prime','gmp_random','gmp_scan0',
            +            'gmp_scan1','gmp_setbit','gmp_sign','gmp_sqrt','gmp_sqrtrem',
            +            'gmp_strval','gmp_sub','gmp_xor','gmstrftime','gopher_parsedir',
            +            'gregoriantojd','gzclose','gzcompress','gzdeflate','gzencode',
            +            'gzeof','gzfile','gzgetc','gzgets','gzgetss','gzinflate','gzopen',
            +            'gzpassthru','gzputs','gzread','gzrewind','gzseek','gztell',
            +            'gzuncompress','gzwrite','hash','hash_algos','hash_file',
            +            'hash_final','hash_hmac','hash_hmac_file','hash_init','hash_update',
            +            'hash_update_file','hash_update_stream','header','headers_list',
            +            'headers_sent','hebrev','hebrevc','hexdec','highlight_file',
            +            'highlight_string','html_doc','html_doc_file','html_entity_decode',
            +            'htmlentities','htmlspecialchars','htmlspecialchars_decode',
            +            'http_build_cookie','http_build_query','http_build_str',
            +            'http_build_url','http_cache_etag','http_cache_last_modified',
            +            'http_chunked_decode','http_date','http_deflate','http_get',
            +            'http_get_request_body','http_get_request_body_stream',
            +            'http_get_request_headers','http_head','http_inflate',
            +            'http_match_etag','http_match_modified','http_match_request_header',
            +            'http_negotiate_charset','http_negotiate_content_type',
            +            'http_negotiate_language','http_parse_cookie','http_parse_headers',
            +            'http_parse_message','http_parse_params',
            +            'http_persistent_handles_clean','http_persistent_handles_count',
            +            'http_persistent_handles_ident','http_post_data','http_post_fields',
            +            'http_put_data','http_put_file','http_put_stream','http_redirect',
            +            'http_request','http_request_body_encode',
            +            'http_request_method_exists','http_request_method_name',
            +            'http_request_method_register','http_request_method_unregister',
            +            'http_send_content_disposition','http_send_content_type',
            +            'http_send_data','http_send_file','http_send_last_modified',
            +            'http_send_status','http_send_stream','http_support',
            +            'http_throttle','hypot','i18n_convert','i18n_discover_encoding',
            +            'i18n_http_input','i18n_http_output','i18n_internal_encoding',
            +            'i18n_ja_jp_hantozen','i18n_mime_header_decode',
            +            'i18n_mime_header_encode','ibase_add_user','ibase_affected_rows',
            +            'ibase_backup','ibase_blob_add','ibase_blob_cancel',
            +            'ibase_blob_close','ibase_blob_create','ibase_blob_echo',
            +            'ibase_blob_get','ibase_blob_import','ibase_blob_info',
            +            'ibase_blob_open','ibase_close','ibase_commit','ibase_commit_ret',
            +            'ibase_connect','ibase_db_info','ibase_delete_user','ibase_drop_db',
            +            'ibase_errcode','ibase_errmsg','ibase_execute','ibase_fetch_assoc',
            +            'ibase_fetch_object','ibase_fetch_row','ibase_field_info',
            +            'ibase_free_event_handler','ibase_free_query','ibase_free_result',
            +            'ibase_gen_id','ibase_maintain_db','ibase_modify_user',
            +            'ibase_name_result','ibase_num_fields','ibase_num_params',
            +            'ibase_param_info','ibase_pconnect','ibase_prepare','ibase_query',
            +            'ibase_restore','ibase_rollback','ibase_rollback_ret',
            +            'ibase_server_info','ibase_service_attach','ibase_service_detach',
            +            'ibase_set_event_handler','ibase_trans','ibase_wait_event','iconv',
            +            'iconv_get_encoding','iconv_mime_decode',
            +            'iconv_mime_decode_headers','iconv_mime_encode',
            +            'iconv_set_encoding','iconv_strlen','iconv_strpos','iconv_strrpos',
            +            'iconv_substr','id3_get_frame_long_name','id3_get_frame_short_name',
            +            'id3_get_genre_id','id3_get_genre_list','id3_get_genre_name',
            +            'id3_get_tag','id3_get_version','id3_remove_tag','id3_set_tag',
            +            'idate','ignore_user_abort','image_type_to_extension',
            +            'image_type_to_mime_type','image2wbmp','imagealphablending',
            +            'imageantialias','imagearc','imagechar','imagecharup',
            +            'imagecolorallocate','imagecolorallocatealpha','imagecolorat',
            +            'imagecolorclosest','imagecolorclosestalpha','imagecolordeallocate',
            +            'imagecolorexact','imagecolorexactalpha','imagecolormatch',
            +            'imagecolorresolve','imagecolorresolvealpha','imagecolorset',
            +            'imagecolorsforindex','imagecolorstotal','imagecolortransparent',
            +            'imageconvolution','imagecopy','imagecopymerge',
            +            'imagecopymergegray','imagecopyresampled','imagecopyresized',
            +            'imagecreate','imagecreatefromgd','imagecreatefromgd2',
            +            'imagecreatefromgd2part','imagecreatefromgif','imagecreatefromjpeg',
            +            'imagecreatefrompng','imagecreatefromstring','imagecreatefromwbmp',
            +            'imagecreatefromxbm','imagecreatetruecolor','imagedashedline',
            +            'imagedestroy','imageellipse','imagefill','imagefilledarc',
            +            'imagefilledellipse','imagefilledpolygon','imagefilledrectangle',
            +            'imagefilltoborder','imagefilter','imagefontheight',
            +            'imagefontwidth','imageftbbox','imagefttext','imagegammacorrect',
            +            'imagegd','imagegd2','imagegif','imagegrabscreen','imagegrabwindow',
            +            'imageinterlace','imageistruecolor','imagejpeg','imagelayereffect',
            +            'imageline','imageloadfont','imagepalettecopy','imagepng',
            +            'imagepolygon','imagepsbbox','imagepsencodefont',
            +            'imagepsextendfont','imagepsfreefont','imagepsloadfont',
            +            'imagepsslantfont','imagepstext','imagerectangle','imagerotate',
            +            'imagesavealpha','imagesetbrush','imagesetpixel','imagesetstyle',
            +            'imagesetthickness','imagesettile','imagestring','imagestringup',
            +            'imagesx','imagesy','imagetruecolortopalette','imagettfbbox',
            +            'imagettftext','imagetypes','imagewbmp','imagexbm','imap_8bit',
            +            'imap_alerts','imap_append','imap_base64','imap_binary','imap_body',
            +            'imap_bodystruct','imap_check','imap_clearflag_full','imap_close',
            +            'imap_create','imap_createmailbox','imap_delete',
            +            'imap_deletemailbox','imap_errors','imap_expunge',
            +            'imap_fetch_overview','imap_fetchbody','imap_fetchheader',
            +            'imap_fetchstructure','imap_fetchtext','imap_get_quota',
            +            'imap_get_quotaroot','imap_getacl','imap_getmailboxes',
            +            'imap_getsubscribed','imap_header','imap_headerinfo','imap_headers',
            +            'imap_last_error','imap_list','imap_listmailbox',
            +            'imap_listsubscribed','imap_lsub','imap_mail','imap_mail_compose',
            +            'imap_mail_copy','imap_mail_move','imap_mailboxmsginfo',
            +            'imap_mime_header_decode','imap_msgno','imap_num_msg',
            +            'imap_num_recent','imap_open','imap_ping','imap_qprint',
            +            'imap_rename','imap_renamemailbox','imap_reopen',
            +            'imap_rfc822_parse_adrlist','imap_rfc822_parse_headers',
            +            'imap_rfc822_write_address','imap_savebody','imap_scan',
            +            'imap_scanmailbox','imap_search','imap_set_quota','imap_setacl',
            +            'imap_setflag_full','imap_sort','imap_status','imap_subscribe',
            +            'imap_thread','imap_timeout','imap_uid','imap_undelete',
            +            'imap_unsubscribe','imap_utf7_decode','imap_utf7_encode',
            +            'imap_utf8','implode','import_request_variables','in_array',
            +            'ini_alter','ini_get','ini_get_all','ini_restore','ini_set',
            +            'intval','ip2long','iptcembed','iptcparse','isset','is_a',
            +            'is_array','is_bool','is_callable','is_dir','is_double',
            +            'is_executable','is_file','is_finite','is_float','is_infinite',
            +            'is_int','is_integer','is_link','is_long','is_nan','is_null',
            +            'is_numeric','is_object','is_readable','is_real','is_resource',
            +            'is_scalar','is_soap_fault','is_string','is_subclass_of',
            +            'is_uploaded_file','is_writable','is_writeable','iterator_apply',
            +            'iterator_count','iterator_to_array','java_last_exception_clear',
            +            'java_last_exception_get','jddayofweek','jdmonthname','jdtofrench',
            +            'jdtogregorian','jdtojewish','jdtojulian','jdtounix','jewishtojd',
            +            'join','jpeg2wbmp','json_decode','json_encode','juliantojd','key',
            +            'key_exists','krsort','ksort','lcg_value','ldap_add','ldap_bind',
            +            'ldap_close','ldap_compare','ldap_connect','ldap_count_entries',
            +            'ldap_delete','ldap_dn2ufn','ldap_err2str','ldap_errno',
            +            'ldap_error','ldap_explode_dn','ldap_first_attribute',
            +            'ldap_first_entry','ldap_first_reference','ldap_free_result',
            +            'ldap_get_attributes','ldap_get_dn','ldap_get_entries',
            +            'ldap_get_option','ldap_get_values','ldap_get_values_len',
            +            'ldap_list','ldap_mod_add','ldap_mod_del','ldap_mod_replace',
            +            'ldap_modify','ldap_next_attribute','ldap_next_entry',
            +            'ldap_next_reference','ldap_parse_reference','ldap_parse_result',
            +            'ldap_read','ldap_rename','ldap_search','ldap_set_option',
            +            'ldap_sort','ldap_start_tls','ldap_unbind','levenshtein',
            +            'libxml_clear_errors','libxml_get_errors','libxml_get_last_error',
            +            'libxml_set_streams_context','libxml_use_internal_errors','link',
            +            'linkinfo','list','localeconv','localtime','log','log1p','log10',
            +            'long2ip','lstat','ltrim','lzf_compress','lzf_decompress',
            +            'lzf_optimized_for','magic_quotes_runtime','mail','max','mbereg',
            +            'mberegi','mberegi_replace','mbereg_match','mbereg_replace',
            +            'mbereg_search','mbereg_search_getpos','mbereg_search_getregs',
            +            'mbereg_search_init','mbereg_search_pos','mbereg_search_regs',
            +            'mbereg_search_setpos','mbregex_encoding','mbsplit','mbstrcut',
            +            'mbstrlen','mbstrpos','mbstrrpos','mbsubstr','mb_check_encoding',
            +            'mb_convert_case','mb_convert_encoding','mb_convert_kana',
            +            'mb_convert_variables','mb_decode_mimeheader',
            +            'mb_decode_numericentity','mb_detect_encoding','mb_detect_order',
            +            'mb_encode_mimeheader','mb_encode_numericentity','mb_ereg',
            +            'mb_eregi','mb_eregi_replace','mb_ereg_match','mb_ereg_replace',
            +            'mb_ereg_search','mb_ereg_search_getpos','mb_ereg_search_getregs',
            +            'mb_ereg_search_init','mb_ereg_search_pos','mb_ereg_search_regs',
            +            'mb_ereg_search_setpos','mb_get_info','mb_http_input',
            +            'mb_http_output','mb_internal_encoding','mb_language',
            +            'mb_list_encodings','mb_output_handler','mb_parse_str',
            +            'mb_preferred_mime_name','mb_regex_encoding','mb_regex_set_options',
            +            'mb_send_mail','mb_split','mb_strcut','mb_strimwidth','mb_stripos',
            +            'mb_stristr','mb_strlen','mb_strpos','mb_strrchr','mb_strrichr',
            +            'mb_strripos','mb_strrpos','mb_strstr','mb_strtolower',
            +            'mb_strtoupper','mb_strwidth','mb_substitute_character','mb_substr',
            +            'mb_substr_count','mcrypt_cbc','mcrypt_cfb','mcrypt_create_iv',
            +            'mcrypt_decrypt','mcrypt_ecb','mcrypt_enc_get_algorithms_name',
            +            'mcrypt_enc_get_block_size','mcrypt_enc_get_iv_size',
            +            'mcrypt_enc_get_key_size','mcrypt_enc_get_modes_name',
            +            'mcrypt_enc_get_supported_key_sizes',
            +            'mcrypt_enc_is_block_algorithm',
            +            'mcrypt_enc_is_block_algorithm_mode','mcrypt_enc_is_block_mode',
            +            'mcrypt_enc_self_test','mcrypt_encrypt','mcrypt_generic',
            +            'mcrypt_generic_deinit','mcrypt_generic_end','mcrypt_generic_init',
            +            'mcrypt_get_block_size','mcrypt_get_cipher_name',
            +            'mcrypt_get_iv_size','mcrypt_get_key_size','mcrypt_list_algorithms',
            +            'mcrypt_list_modes','mcrypt_module_close',
            +            'mcrypt_module_get_algo_block_size',
            +            'mcrypt_module_get_algo_key_size',
            +            'mcrypt_module_get_supported_key_sizes',
            +            'mcrypt_module_is_block_algorithm',
            +            'mcrypt_module_is_block_algorithm_mode',
            +            'mcrypt_module_is_block_mode','mcrypt_module_open',
            +            'mcrypt_module_self_test','mcrypt_ofb','md5','md5_file',
            +            'mdecrypt_generic','memcache_add','memcache_add_server',
            +            'memcache_close','memcache_connect','memcache_debug',
            +            'memcache_decrement','memcache_delete','memcache_flush',
            +            'memcache_get','memcache_get_extended_stats',
            +            'memcache_get_server_status','memcache_get_stats',
            +            'memcache_get_version','memcache_increment','memcache_pconnect',
            +            'memcache_replace','memcache_set','memcache_set_compress_threshold',
            +            'memcache_set_server_params','memory_get_peak_usage',
            +            'memory_get_usage','metaphone','mhash','mhash_count',
            +            'mhash_get_block_size','mhash_get_hash_name','mhash_keygen_s2k',
            +            'method_exists','microtime','mime_content_type','min',
            +            'ming_keypress','ming_setcubicthreshold','ming_setscale',
            +            'ming_useconstants','ming_useswfversion','mkdir','mktime',
            +            'money_format','move_uploaded_file','msql','msql_affected_rows',
            +            'msql_close','msql_connect','msql_create_db','msql_createdb',
            +            'msql_data_seek','msql_db_query','msql_dbname','msql_drop_db',
            +            'msql_dropdb','msql_error','msql_fetch_array','msql_fetch_field',
            +            'msql_fetch_object','msql_fetch_row','msql_field_flags',
            +            'msql_field_len','msql_field_name','msql_field_seek',
            +            'msql_field_table','msql_field_type','msql_fieldflags',
            +            'msql_fieldlen','msql_fieldname','msql_fieldtable','msql_fieldtype',
            +            'msql_free_result','msql_freeresult','msql_list_dbs',
            +            'msql_list_fields','msql_list_tables','msql_listdbs',
            +            'msql_listfields','msql_listtables','msql_num_fields',
            +            'msql_num_rows','msql_numfields','msql_numrows','msql_pconnect',
            +            'msql_query','msql_regcase','msql_result','msql_select_db',
            +            'msql_selectdb','msql_tablename','mssql_bind','mssql_close',
            +            'mssql_connect','mssql_data_seek','mssql_execute',
            +            'mssql_fetch_array','mssql_fetch_assoc','mssql_fetch_batch',
            +            'mssql_fetch_field','mssql_fetch_object','mssql_fetch_row',
            +            'mssql_field_length','mssql_field_name','mssql_field_seek',
            +            'mssql_field_type','mssql_free_result','mssql_free_statement',
            +            'mssql_get_last_message','mssql_guid_string','mssql_init',
            +            'mssql_min_error_severity','mssql_min_message_severity',
            +            'mssql_next_result','mssql_num_fields','mssql_num_rows',
            +            'mssql_pconnect','mssql_query','mssql_result','mssql_rows_affected',
            +            'mssql_select_db','mt_getrandmax','mt_rand','mt_srand','mysql',
            +            'mysql_affected_rows','mysql_client_encoding','mysql_close',
            +            'mysql_connect','mysql_createdb','mysql_create_db',
            +            'mysql_data_seek','mysql_dbname','mysql_db_name','mysql_db_query',
            +            'mysql_dropdb','mysql_drop_db','mysql_errno','mysql_error',
            +            'mysql_escape_string','mysql_fetch_array','mysql_fetch_assoc',
            +            'mysql_fetch_field','mysql_fetch_lengths','mysql_fetch_object',
            +            'mysql_fetch_row','mysql_fieldflags','mysql_fieldlen',
            +            'mysql_fieldname','mysql_fieldtable','mysql_fieldtype',
            +            'mysql_field_flags','mysql_field_len','mysql_field_name',
            +            'mysql_field_seek','mysql_field_table','mysql_field_type',
            +            'mysql_freeresult','mysql_free_result','mysql_get_client_info',
            +            'mysql_get_host_info','mysql_get_proto_info',
            +            'mysql_get_server_info','mysql_info','mysql_insert_id',
            +            'mysql_listdbs','mysql_listfields','mysql_listtables',
            +            'mysql_list_dbs','mysql_list_fields','mysql_list_processes',
            +            'mysql_list_tables','mysql_numfields','mysql_numrows',
            +            'mysql_num_fields','mysql_num_rows','mysql_pconnect','mysql_ping',
            +            'mysql_query','mysql_real_escape_string','mysql_result',
            +            'mysql_selectdb','mysql_select_db','mysql_set_charset','mysql_stat',
            +            'mysql_tablename','mysql_table_name','mysql_thread_id',
            +            'mysql_unbuffered_query','mysqli_affected_rows','mysqli_autocommit',
            +            'mysqli_bind_param','mysqli_bind_result','mysqli_change_user',
            +            'mysqli_character_set_name','mysqli_client_encoding','mysqli_close',
            +            'mysqli_commit','mysqli_connect','mysqli_connect_errno',
            +            'mysqli_connect_error','mysqli_data_seek','mysqli_debug',
            +            'mysqli_disable_reads_from_master','mysqli_disable_rpl_parse',
            +            'mysqli_dump_debug_info','mysqli_embedded_server_end',
            +            'mysqli_embedded_server_start','mysqli_enable_reads_from_master',
            +            'mysqli_enable_rpl_parse','mysqli_errno','mysqli_error',
            +            'mysqli_escape_string','mysqli_execute','mysqli_fetch',
            +            'mysqli_fetch_array','mysqli_fetch_assoc','mysqli_fetch_field',
            +            'mysqli_fetch_field_direct','mysqli_fetch_fields',
            +            'mysqli_fetch_lengths','mysqli_fetch_object','mysqli_fetch_row',
            +            'mysqli_field_count','mysqli_field_seek','mysqli_field_tell',
            +            'mysqli_free_result','mysqli_get_charset','mysqli_get_client_info',
            +            'mysqli_get_client_version','mysqli_get_host_info',
            +            'mysqli_get_metadata','mysqli_get_proto_info',
            +            'mysqli_get_server_info','mysqli_get_server_version',
            +            'mysqli_get_warnings','mysqli_info','mysqli_init',
            +            'mysqli_insert_id','mysqli_kill','mysqli_master_query',
            +            'mysqli_more_results','mysqli_multi_query','mysqli_next_result',
            +            'mysqli_num_fields','mysqli_num_rows','mysqli_options',
            +            'mysqli_param_count','mysqli_ping','mysqli_prepare','mysqli_query',
            +            'mysqli_real_connect','mysqli_real_escape_string',
            +            'mysqli_real_query','mysqli_report','mysqli_rollback',
            +            'mysqli_rpl_parse_enabled','mysqli_rpl_probe',
            +            'mysqli_rpl_query_type','mysqli_select_db','mysqli_send_long_data',
            +            'mysqli_send_query','mysqli_set_charset',
            +            'mysqli_set_local_infile_default','mysqli_set_local_infile_handler',
            +            'mysqli_set_opt','mysqli_slave_query','mysqli_sqlstate',
            +            'mysqli_ssl_set','mysqli_stat','mysqli_stmt_affected_rows',
            +            'mysqli_stmt_attr_get','mysqli_stmt_attr_set',
            +            'mysqli_stmt_bind_param','mysqli_stmt_bind_result',
            +            'mysqli_stmt_close','mysqli_stmt_data_seek','mysqli_stmt_errno',
            +            'mysqli_stmt_error','mysqli_stmt_execute','mysqli_stmt_fetch',
            +            'mysqli_stmt_field_count','mysqli_stmt_free_result',
            +            'mysqli_stmt_get_warnings','mysqli_stmt_init',
            +            'mysqli_stmt_insert_id','mysqli_stmt_num_rows',
            +            'mysqli_stmt_param_count','mysqli_stmt_prepare','mysqli_stmt_reset',
            +            'mysqli_stmt_result_metadata','mysqli_stmt_send_long_data',
            +            'mysqli_stmt_sqlstate','mysqli_stmt_store_result',
            +            'mysqli_store_result','mysqli_thread_id','mysqli_thread_safe',
            +            'mysqli_use_result','mysqli_warning_count','natcasesort','natsort',
            +            'new_xmldoc','next','ngettext','nl2br','nl_langinfo',
            +            'ntuser_getdomaincontroller','ntuser_getusergroups',
            +            'ntuser_getuserinfo','ntuser_getuserlist','number_format',
            +            'ob_clean','ob_deflatehandler','ob_end_clean','ob_end_flush',
            +            'ob_etaghandler','ob_flush','ob_get_clean','ob_get_contents',
            +            'ob_get_flush','ob_get_length','ob_get_level','ob_get_status',
            +            'ob_gzhandler','ob_iconv_handler','ob_implicit_flush',
            +            'ob_inflatehandler','ob_list_handlers','ob_start','ob_tidyhandler',
            +            'octdec','odbc_autocommit','odbc_binmode','odbc_close',
            +            'odbc_close_all','odbc_columnprivileges','odbc_columns',
            +            'odbc_commit','odbc_connect','odbc_cursor','odbc_data_source',
            +            'odbc_do','odbc_error','odbc_errormsg','odbc_exec','odbc_execute',
            +            'odbc_fetch_array','odbc_fetch_into','odbc_fetch_object',
            +            'odbc_fetch_row','odbc_field_len','odbc_field_name',
            +            'odbc_field_num','odbc_field_precision','odbc_field_scale',
            +            'odbc_field_type','odbc_foreignkeys','odbc_free_result',
            +            'odbc_gettypeinfo','odbc_longreadlen','odbc_next_result',
            +            'odbc_num_fields','odbc_num_rows','odbc_pconnect','odbc_prepare',
            +            'odbc_primarykeys','odbc_procedurecolumns','odbc_procedures',
            +            'odbc_result','odbc_result_all','odbc_rollback','odbc_setoption',
            +            'odbc_specialcolumns','odbc_statistics','odbc_tableprivileges',
            +            'odbc_tables','opendir','openlog','openssl_csr_export',
            +            'openssl_csr_export_to_file','openssl_csr_get_public_key',
            +            'openssl_csr_get_subject','openssl_csr_new','openssl_csr_sign',
            +            'openssl_error_string','openssl_free_key','openssl_get_privatekey',
            +            'openssl_get_publickey','openssl_open','openssl_pkcs12_export',
            +            'openssl_pkcs12_export_to_file','openssl_pkcs12_read',
            +            'openssl_pkcs7_decrypt','openssl_pkcs7_encrypt',
            +            'openssl_pkcs7_sign','openssl_pkcs7_verify','openssl_pkey_export',
            +            'openssl_pkey_export_to_file','openssl_pkey_free',
            +            'openssl_pkey_get_details','openssl_pkey_get_private',
            +            'openssl_pkey_get_public','openssl_pkey_new',
            +            'openssl_private_decrypt','openssl_private_encrypt',
            +            'openssl_public_decrypt','openssl_public_encrypt','openssl_seal',
            +            'openssl_sign','openssl_verify','openssl_x509_checkpurpose',
            +            'openssl_x509_check_private_key','openssl_x509_export',
            +            'openssl_x509_export_to_file','openssl_x509_free',
            +            'openssl_x509_parse','openssl_x509_read','ord',
            +            'output_add_rewrite_var','output_reset_rewrite_vars','overload',
            +            'outputdebugstring','pack','parse_ini_file','parse_str','parse_url',
            +            'parsekit_compile_file','parsekit_compile_string',
            +            'parsekit_func_arginfo','parsekit_opcode_flags',
            +            'parsekit_opcode_name','passthru','pathinfo','pclose',
            +            'pdf_add_bookmark','pdf_add_launchlink','pdf_add_locallink',
            +            'pdf_add_nameddest','pdf_add_note','pdf_add_pdflink',
            +            'pdf_add_thumbnail','pdf_add_weblink','pdf_arc','pdf_arcn',
            +            'pdf_attach_file','pdf_begin_font','pdf_begin_glyph',
            +            'pdf_begin_page','pdf_begin_pattern','pdf_begin_template',
            +            'pdf_circle','pdf_clip','pdf_close','pdf_close_image',
            +            'pdf_close_pdi','pdf_close_pdi_page','pdf_closepath',
            +            'pdf_closepath_fill_stroke','pdf_closepath_stroke','pdf_concat',
            +            'pdf_continue_text','pdf_create_gstate','pdf_create_pvf',
            +            'pdf_curveto','pdf_delete','pdf_delete_pvf','pdf_encoding_set_char',
            +            'pdf_end_font','pdf_end_glyph','pdf_end_page','pdf_end_pattern',
            +            'pdf_end_template','pdf_endpath','pdf_fill','pdf_fill_imageblock',
            +            'pdf_fill_pdfblock','pdf_fill_stroke','pdf_fill_textblock',
            +            'pdf_findfont','pdf_fit_image','pdf_fit_pdi_page',
            +            'pdf_fit_textline','pdf_get_apiname','pdf_get_buffer',
            +            'pdf_get_errmsg','pdf_get_errnum','pdf_get_parameter',
            +            'pdf_get_pdi_parameter','pdf_get_pdi_value','pdf_get_value',
            +            'pdf_initgraphics','pdf_lineto','pdf_load_font',
            +            'pdf_load_iccprofile','pdf_load_image','pdf_makespotcolor',
            +            'pdf_moveto','pdf_new','pdf_open_ccitt','pdf_open_file',
            +            'pdf_open_image','pdf_open_image_file','pdf_open_pdi',
            +            'pdf_open_pdi_page','pdf_place_image','pdf_place_pdi_page',
            +            'pdf_process_pdi','pdf_rect','pdf_restore','pdf_rotate','pdf_save',
            +            'pdf_scale','pdf_set_border_color','pdf_set_border_dash',
            +            'pdf_set_border_style','pdf_set_gstate','pdf_set_info',
            +            'pdf_set_parameter','pdf_set_text_pos','pdf_set_value',
            +            'pdf_setcolor','pdf_setdash','pdf_setdashpattern','pdf_setflat',
            +            'pdf_setfont','pdf_setlinecap','pdf_setlinejoin','pdf_setlinewidth',
            +            'pdf_setmatrix','pdf_setmiterlimit','pdf_setpolydash','pdf_shading',
            +            'pdf_shading_pattern','pdf_shfill','pdf_show','pdf_show_boxed',
            +            'pdf_show_xy','pdf_skew','pdf_stringwidth','pdf_stroke',
            +            'pdf_translate','pdo_drivers','pfsockopen','pg_affected_rows',
            +            'pg_cancel_query','pg_clientencoding','pg_client_encoding',
            +            'pg_close','pg_cmdtuples','pg_connect','pg_connection_busy',
            +            'pg_connection_reset','pg_connection_status','pg_convert',
            +            'pg_copy_from','pg_copy_to','pg_dbname','pg_delete','pg_end_copy',
            +            'pg_errormessage','pg_escape_bytea','pg_escape_string','pg_exec',
            +            'pg_execute','pg_fetch_all','pg_fetch_all_columns','pg_fetch_array',
            +            'pg_fetch_assoc','pg_fetch_object','pg_fetch_result','pg_fetch_row',
            +            'pg_fieldisnull','pg_fieldname','pg_fieldnum','pg_fieldprtlen',
            +            'pg_fieldsize','pg_fieldtype','pg_field_is_null','pg_field_name',
            +            'pg_field_num','pg_field_prtlen','pg_field_size','pg_field_table',
            +            'pg_field_type','pg_field_type_oid','pg_free_result',
            +            'pg_freeresult','pg_get_notify','pg_get_pid','pg_get_result',
            +            'pg_getlastoid','pg_host','pg_insert','pg_last_error',
            +            'pg_last_notice','pg_last_oid','pg_loclose','pg_locreate',
            +            'pg_loexport','pg_loimport','pg_loopen','pg_loread','pg_loreadall',
            +            'pg_lounlink','pg_lowrite','pg_lo_close','pg_lo_create',
            +            'pg_lo_export','pg_lo_import','pg_lo_open','pg_lo_read',
            +            'pg_lo_read_all','pg_lo_seek','pg_lo_tell','pg_lo_unlink',
            +            'pg_lo_write','pg_meta_data','pg_numfields','pg_numrows',
            +            'pg_num_fields','pg_num_rows','pg_options','pg_parameter_status',
            +            'pg_pconnect','pg_ping','pg_port','pg_prepare','pg_put_line',
            +            'pg_query','pg_query_params','pg_result','pg_result_error',
            +            'pg_result_error_field','pg_result_seek','pg_result_status',
            +            'pg_select','pg_send_execute','pg_send_prepare','pg_send_query',
            +            'pg_send_query_params','pg_set_client_encoding',
            +            'pg_set_error_verbosity','pg_setclientencoding','pg_trace',
            +            'pg_transaction_status','pg_tty','pg_unescape_bytea','pg_untrace',
            +            'pg_update','pg_version','php_egg_logo_guid','php_ini_loaded_file',
            +            'php_ini_scanned_files','php_logo_guid','php_real_logo_guid',
            +            'php_sapi_name','php_strip_whitespace','php_uname','phpcredits',
            +            'phpdoc_xml_from_string','phpinfo','phpversion','pi','png2wbmp',
            +            'pop3_close','pop3_delete_message','pop3_get_account_size',
            +            'pop3_get_message','pop3_get_message_count',
            +            'pop3_get_message_header','pop3_get_message_ids',
            +            'pop3_get_message_size','pop3_get_message_sizes','pop3_open',
            +            'pop3_undelete','popen','pos','posix_ctermid','posix_errno',
            +            'posix_getcwd','posix_getegid','posix_geteuid','posix_getgid',
            +            'posix_getgrgid','posix_getgrnam','posix_getgroups',
            +            'posix_getlogin','posix_getpgid','posix_getpgrp','posix_getpid',
            +            'posix_getppid','posix_getpwnam','posix_getpwuid','posix_getrlimit',
            +            'posix_getsid','posix_getuid','posix_get_last_error','posix_isatty',
            +            'posix_kill','posix_mkfifo','posix_setegid','posix_seteuid',
            +            'posix_setgid','posix_setpgid','posix_setsid','posix_setuid',
            +            'posix_strerror','posix_times','posix_ttyname','posix_uname','pow',
            +            'preg_grep','preg_last_error','preg_match','preg_match_all',
            +            'preg_quote','preg_replace','preg_replace_callback','preg_split',
            +            'prev','print_r','printf','proc_close','proc_get_status',
            +            'proc_open','proc_terminate','putenv','quoted_printable_decode',
            +            'quotemeta','rad2deg','radius_acct_open','radius_add_server',
            +            'radius_auth_open','radius_close','radius_config',
            +            'radius_create_request','radius_cvt_addr','radius_cvt_int',
            +            'radius_cvt_string','radius_demangle','radius_demangle_mppe_key',
            +            'radius_get_attr','radius_get_vendor_attr','radius_put_addr',
            +            'radius_put_attr','radius_put_int','radius_put_string',
            +            'radius_put_vendor_addr','radius_put_vendor_attr',
            +            'radius_put_vendor_int','radius_put_vendor_string',
            +            'radius_request_authenticator','radius_send_request',
            +            'radius_server_secret','radius_strerror','rand','range',
            +            'rawurldecode','rawurlencode','read_exif_data','readdir','readfile',
            +            'readgzfile','readlink','realpath','reg_close_key','reg_create_key',
            +            'reg_enum_key','reg_enum_value','reg_get_value','reg_open_key',
            +            'reg_set_value','register_shutdown_function',
            +            'register_tick_function','rename','res_close','res_get','res_list',
            +            'res_list_type','res_open','res_set','reset',
            +            'restore_error_handler','restore_include_path','rewind','rewinddir',
            +            'rmdir','round','rsort','rtrim','runkit_class_adopt',
            +            'runkit_class_emancipate','runkit_constant_add',
            +            'runkit_constant_redefine','runkit_constant_remove',
            +            'runkit_default_property_add','runkit_function_add',
            +            'runkit_function_copy','runkit_function_redefine',
            +            'runkit_function_remove','runkit_function_rename','runkit_import',
            +            'runkit_lint','runkit_lint_file','runkit_method_add',
            +            'runkit_method_copy','runkit_method_redefine',
            +            'runkit_method_remove','runkit_method_rename','runkit_object_id',
            +            'runkit_return_value_used','runkit_sandbox_output_handler',
            +            'runkit_superglobals','runkit_zval_inspect','scandir','sem_acquire',
            +            'sem_get','sem_release','sem_remove','serialize',
            +            'session_cache_expire','session_cache_limiter','session_commit',
            +            'session_decode','session_destroy','session_encode',
            +            'session_get_cookie_params','session_id','session_is_registered',
            +            'session_module_name','session_name','session_regenerate_id',
            +            'session_register','session_save_path','session_set_cookie_params',
            +            'session_set_save_handler','session_start','session_unregister',
            +            'session_unset','session_write_close','set_content',
            +            'set_error_handler','set_file_buffer','set_include_path',
            +            'set_magic_quotes_runtime','set_socket_blocking','set_time_limit',
            +            'setcookie','setlocale','setrawcookie','settype','sha1','sha1_file',
            +            'shell_exec','shmop_close','shmop_delete','shmop_open','shmop_read',
            +            'shmop_size','shmop_write','shm_attach','shm_detach','shm_get_var',
            +            'shm_put_var','shm_remove','shm_remove_var','show_source','shuffle',
            +            'similar_text','simplexml_import_dom','simplexml_load_file',
            +            'simplexml_load_string','sin','sinh','sizeof','sleep','smtp_close',
            +            'smtp_cmd_data','smtp_cmd_mail','smtp_cmd_rcpt','smtp_connect',
            +            'snmp_get_quick_print','snmp_get_valueretrieval','snmp_read_mib',
            +            'snmp_set_quick_print','snmp_set_valueretrieval','snmp2_get',
            +            'snmp2_getnext','snmp2_real_walk','snmp2_set','snmp2_walk',
            +            'snmp3_get','snmp3_getnext','snmp3_real_walk','snmp3_set',
            +            'snmp3_walk','snmpget','snmpgetnext','snmprealwalk','snmpset',
            +            'snmpwalk','snmpwalkoid','socket_accept','socket_bind',
            +            'socket_clear_error','socket_close','socket_connect',
            +            'socket_create','socket_create_listen','socket_create_pair',
            +            'socket_getopt','socket_getpeername','socket_getsockname',
            +            'socket_get_option','socket_get_status','socket_iovec_add',
            +            'socket_iovec_alloc','socket_iovec_delete','socket_iovec_fetch',
            +            'socket_iovec_free','socket_iovec_set','socket_last_error',
            +            'socket_listen','socket_read','socket_readv','socket_recv',
            +            'socket_recvfrom','socket_recvmsg','socket_select','socket_send',
            +            'socket_sendmsg','socket_sendto','socket_setopt','socket_set_block',
            +            'socket_set_blocking','socket_set_nonblock','socket_set_option',
            +            'socket_set_timeout','socket_shutdown','socket_strerror',
            +            'socket_write','socket_writev','sort','soundex','spl_autoload',
            +            'spl_autoload_call','spl_autoload_extensions',
            +            'spl_autoload_functions','spl_autoload_register',
            +            'spl_autoload_unregister','spl_classes','spl_object_hash','split',
            +            'spliti','sprintf','sql_regcase','sqlite_array_query',
            +            'sqlite_busy_timeout','sqlite_changes','sqlite_close',
            +            'sqlite_column','sqlite_create_aggregate','sqlite_create_function',
            +            'sqlite_current','sqlite_error_string','sqlite_escape_string',
            +            'sqlite_exec','sqlite_factory','sqlite_fetch_all',
            +            'sqlite_fetch_array','sqlite_fetch_column_types',
            +            'sqlite_fetch_object','sqlite_fetch_single','sqlite_fetch_string',
            +            'sqlite_field_name','sqlite_has_more','sqlite_has_prev',
            +            'sqlite_last_error','sqlite_last_insert_rowid','sqlite_libencoding',
            +            'sqlite_libversion','sqlite_next','sqlite_num_fields',
            +            'sqlite_num_rows','sqlite_open','sqlite_popen','sqlite_prev',
            +            'sqlite_query','sqlite_rewind','sqlite_seek','sqlite_single_query',
            +            'sqlite_udf_decode_binary','sqlite_udf_encode_binary',
            +            'sqlite_unbuffered_query','sqlite_valid','sqrt','srand','sscanf',
            +            'ssh2_auth_hostbased_file','ssh2_auth_none','ssh2_auth_password',
            +            'ssh2_auth_pubkey_file','ssh2_connect','ssh2_exec',
            +            'ssh2_fetch_stream','ssh2_fingerprint','ssh2_forward_accept',
            +            'ssh2_forward_listen','ssh2_methods_negotiated','ssh2_poll',
            +            'ssh2_publickey_add','ssh2_publickey_init','ssh2_publickey_list',
            +            'ssh2_publickey_remove','ssh2_scp_recv','ssh2_scp_send','ssh2_sftp',
            +            'ssh2_sftp_lstat','ssh2_sftp_mkdir','ssh2_sftp_readlink',
            +            'ssh2_sftp_realpath','ssh2_sftp_rename','ssh2_sftp_rmdir',
            +            'ssh2_sftp_stat','ssh2_sftp_symlink','ssh2_sftp_unlink',
            +            'ssh2_shell','ssh2_tunnel','stat','stats_absolute_deviation',
            +            'stats_cdf_beta','stats_cdf_binomial','stats_cdf_cauchy',
            +            'stats_cdf_chisquare','stats_cdf_exponential','stats_cdf_f',
            +            'stats_cdf_gamma','stats_cdf_laplace','stats_cdf_logistic',
            +            'stats_cdf_negative_binomial','stats_cdf_noncentral_chisquare',
            +            'stats_cdf_noncentral_f','stats_cdf_noncentral_t',
            +            'stats_cdf_normal','stats_cdf_poisson','stats_cdf_t',
            +            'stats_cdf_uniform','stats_cdf_weibull','stats_covariance',
            +            'stats_dens_beta','stats_dens_cauchy','stats_dens_chisquare',
            +            'stats_dens_exponential','stats_dens_f','stats_dens_gamma',
            +            'stats_dens_laplace','stats_dens_logistic','stats_dens_normal',
            +            'stats_dens_pmf_binomial','stats_dens_pmf_hypergeometric',
            +            'stats_dens_pmf_negative_binomial','stats_dens_pmf_poisson',
            +            'stats_dens_t','stats_dens_uniform','stats_dens_weibull',
            +            'stats_harmonic_mean','stats_kurtosis','stats_rand_gen_beta',
            +            'stats_rand_gen_chisquare','stats_rand_gen_exponential',
            +            'stats_rand_gen_f','stats_rand_gen_funiform','stats_rand_gen_gamma',
            +            'stats_rand_gen_ipoisson','stats_rand_gen_iuniform',
            +            'stats_rand_gen_noncenral_f','stats_rand_gen_noncentral_chisquare',
            +            'stats_rand_gen_noncentral_t','stats_rand_gen_normal',
            +            'stats_rand_gen_t','stats_rand_getsd','stats_rand_ibinomial',
            +            'stats_rand_ibinomial_negative','stats_rand_ignlgi',
            +            'stats_rand_phrase_to_seeds','stats_rand_ranf','stats_rand_setall',
            +            'stats_skew','stats_standard_deviation','stats_stat_binomial_coef',
            +            'stats_stat_correlation','stats_stat_factorial',
            +            'stats_stat_independent_t','stats_stat_innerproduct',
            +            'stats_stat_paired_t','stats_stat_percentile','stats_stat_powersum',
            +            'stats_variance','strcasecmp','strchr','strcmp','strcoll','strcspn',
            +            'stream_bucket_append','stream_bucket_make_writeable',
            +            'stream_bucket_new','stream_bucket_prepend','stream_context_create',
            +            'stream_context_get_default','stream_context_get_options',
            +            'stream_context_set_default','stream_context_set_option',
            +            'stream_context_set_params','stream_copy_to_stream',
            +            'stream_encoding','stream_filter_append','stream_filter_prepend',
            +            'stream_filter_register','stream_filter_remove',
            +            'stream_get_contents','stream_get_filters','stream_get_line',
            +            'stream_get_meta_data','stream_get_transports',
            +            'stream_get_wrappers','stream_is_local',
            +            'stream_notification_callback','stream_register_wrapper',
            +            'stream_resolve_include_path','stream_select','stream_set_blocking',
            +            'stream_set_timeout','stream_set_write_buffer',
            +            'stream_socket_accept','stream_socket_client',
            +            'stream_socket_enable_crypto','stream_socket_get_name',
            +            'stream_socket_pair','stream_socket_recvfrom',
            +            'stream_socket_sendto','stream_socket_server',
            +            'stream_socket_shutdown','stream_supports_lock',
            +            'stream_wrapper_register','stream_wrapper_restore',
            +            'stream_wrapper_unregister','strftime','stripcslashes','stripos',
            +            'stripslashes','strip_tags','stristr','strlen','strnatcasecmp',
            +            'strnatcmp','strpbrk','strncasecmp','strncmp','strpos','strrchr',
            +            'strrev','strripos','strrpos','strspn','strstr','strtok',
            +            'strtolower','strtotime','strtoupper','strtr','strval',
            +            'str_ireplace','str_pad','str_repeat','str_replace','str_rot13',
            +            'str_split','str_shuffle','str_word_count','substr',
            +            'substr_compare','substr_count','substr_replace','svn_add',
            +            'svn_auth_get_parameter','svn_auth_set_parameter','svn_cat',
            +            'svn_checkout','svn_cleanup','svn_client_version','svn_commit',
            +            'svn_diff','svn_export','svn_fs_abort_txn','svn_fs_apply_text',
            +            'svn_fs_begin_txn2','svn_fs_change_node_prop','svn_fs_check_path',
            +            'svn_fs_contents_changed','svn_fs_copy','svn_fs_delete',
            +            'svn_fs_dir_entries','svn_fs_file_contents','svn_fs_file_length',
            +            'svn_fs_is_dir','svn_fs_is_file','svn_fs_make_dir',
            +            'svn_fs_make_file','svn_fs_node_created_rev','svn_fs_node_prop',
            +            'svn_fs_props_changed','svn_fs_revision_prop',
            +            'svn_fs_revision_root','svn_fs_txn_root','svn_fs_youngest_rev',
            +            'svn_import','svn_info','svn_log','svn_ls','svn_repos_create',
            +            'svn_repos_fs','svn_repos_fs_begin_txn_for_commit',
            +            'svn_repos_fs_commit_txn','svn_repos_hotcopy','svn_repos_open',
            +            'svn_repos_recover','svn_status','svn_update','symlink',
            +            'sys_get_temp_dir','syslog','system','tan','tanh','tempnam',
            +            'textdomain','thread_get','thread_include','thread_lock',
            +            'thread_lock_try','thread_mutex_destroy','thread_mutex_init',
            +            'thread_set','thread_start','thread_unlock','tidy_access_count',
            +            'tidy_clean_repair','tidy_config_count','tidy_diagnose',
            +            'tidy_error_count','tidy_get_body','tidy_get_config',
            +            'tidy_get_error_buffer','tidy_get_head','tidy_get_html',
            +            'tidy_get_html_ver','tidy_get_output','tidy_get_release',
            +            'tidy_get_root','tidy_get_status','tidy_getopt','tidy_is_xhtml',
            +            'tidy_is_xml','tidy_parse_file','tidy_parse_string',
            +            'tidy_repair_file','tidy_repair_string','tidy_warning_count','time',
            +            'timezone_abbreviations_list','timezone_identifiers_list',
            +            'timezone_name_from_abbr','timezone_name_get','timezone_offset_get',
            +            'timezone_open','timezone_transitions_get','tmpfile',
            +            'token_get_all','token_name','touch','trigger_error',
            +            'transliterate','transliterate_filters_get','trim','uasort',
            +            'ucfirst','ucwords','uksort','umask','uniqid','unixtojd','unlink',
            +            'unpack','unregister_tick_function','unserialize','unset',
            +            'urldecode','urlencode','user_error','use_soap_error_handler',
            +            'usleep','usort','utf8_decode','utf8_encode','var_dump',
            +            'var_export','variant_abs','variant_add','variant_and',
            +            'variant_cast','variant_cat','variant_cmp',
            +            'variant_date_from_timestamp','variant_date_to_timestamp',
            +            'variant_div','variant_eqv','variant_fix','variant_get_type',
            +            'variant_idiv','variant_imp','variant_int','variant_mod',
            +            'variant_mul','variant_neg','variant_not','variant_or',
            +            'variant_pow','variant_round','variant_set','variant_set_type',
            +            'variant_sub','variant_xor','version_compare','virtual','vfprintf',
            +            'vprintf','vsprintf','wddx_add_vars','wddx_deserialize',
            +            'wddx_packet_end','wddx_packet_start','wddx_serialize_value',
            +            'wddx_serialize_vars','win_beep','win_browse_file',
            +            'win_browse_folder','win_create_link','win_message_box',
            +            'win_play_wav','win_shell_execute','win32_create_service',
            +            'win32_delete_service','win32_get_last_control_message',
            +            'win32_ps_list_procs','win32_ps_stat_mem','win32_ps_stat_proc',
            +            'win32_query_service_status','win32_scheduler_delete_task',
            +            'win32_scheduler_enum_tasks','win32_scheduler_get_task_info',
            +            'win32_scheduler_run','win32_scheduler_set_task_info',
            +            'win32_set_service_status','win32_start_service',
            +            'win32_start_service_ctrl_dispatcher','win32_stop_service',
            +            'wordwrap','xml_error_string','xml_get_current_byte_index',
            +            'xml_get_current_column_number','xml_get_current_line_number',
            +            'xml_get_error_code','xml_parse','xml_parser_create',
            +            'xml_parser_create_ns','xml_parser_free','xml_parser_get_option',
            +            'xml_parser_set_option','xml_parse_into_struct',
            +            'xml_set_character_data_handler','xml_set_default_handler',
            +            'xml_set_element_handler','xml_set_end_namespace_decl_handler',
            +            'xml_set_external_entity_ref_handler',
            +            'xml_set_notation_decl_handler','xml_set_object',
            +            'xml_set_processing_instruction_handler',
            +            'xml_set_start_namespace_decl_handler',
            +            'xml_set_unparsed_entity_decl_handler','xmldoc','xmldocfile',
            +            'xmlrpc_decode','xmlrpc_decode_request','xmlrpc_encode',
            +            'xmlrpc_encode_request','xmlrpc_get_type','xmlrpc_is_fault',
            +            'xmlrpc_parse_method_descriptions',
            +            'xmlrpc_server_add_introspection_data','xmlrpc_server_call_method',
            +            'xmlrpc_server_create','xmlrpc_server_destroy',
            +            'xmlrpc_server_register_introspection_callback',
            +            'xmlrpc_server_register_method','xmlrpc_set_type','xmltree',
            +            'xmlwriter_end_attribute','xmlwriter_end_cdata',
            +            'xmlwriter_end_comment','xmlwriter_end_document',
            +            'xmlwriter_end_dtd','xmlwriter_end_dtd_attlist',
            +            'xmlwriter_end_dtd_element','xmlwriter_end_dtd_entity',
            +            'xmlwriter_end_element','xmlwriter_end_pi','xmlwriter_flush',
            +            'xmlwriter_full_end_element','xmlwriter_open_memory',
            +            'xmlwriter_open_uri','xmlwriter_output_memory',
            +            'xmlwriter_set_indent','xmlwriter_set_indent_string',
            +            'xmlwriter_start_attribute','xmlwriter_start_attribute_ns',
            +            'xmlwriter_start_cdata','xmlwriter_start_comment',
            +            'xmlwriter_start_document','xmlwriter_start_dtd',
            +            'xmlwriter_start_dtd_attlist','xmlwriter_start_dtd_element',
            +            'xmlwriter_start_dtd_entity','xmlwriter_start_element',
            +            'xmlwriter_start_element_ns','xmlwriter_start_pi','xmlwriter_text',
            +            'xmlwriter_write_attribute','xmlwriter_write_attribute_ns',
            +            'xmlwriter_write_cdata','xmlwriter_write_comment',
            +            'xmlwriter_write_dtd','xmlwriter_write_dtd_attlist',
            +            'xmlwriter_write_dtd_element','xmlwriter_write_dtd_entity',
            +            'xmlwriter_write_element','xmlwriter_write_element_ns',
            +            'xmlwriter_write_pi','xmlwriter_write_raw','xpath_eval',
            +            'xpath_eval_expression','xpath_new_context','xpath_register_ns',
            +            'xpath_register_ns_auto','xptr_eval','xptr_new_context','yp_all',
            +            'yp_cat','yp_errno','yp_err_string','yp_first',
            +            'yp_get_default_domain','yp_master','yp_match','yp_next','yp_order',
            +            'zend_current_obfuscation_level','zend_get_cfg_var','zend_get_id',
            +            'zend_loader_current_file','zend_loader_enabled',
            +            'zend_loader_file_encoded','zend_loader_file_licensed',
            +            'zend_loader_install_license','zend_loader_version',
            +            'zend_logo_guid','zend_match_hostmasks','zend_obfuscate_class_name',
            +            'zend_obfuscate_function_name','zend_optimizer_version',
            +            'zend_runtime_obfuscate','zend_version','zip_close',
            +            'zip_entry_close','zip_entry_compressedsize',
            +            'zip_entry_compressionmethod','zip_entry_filesize','zip_entry_name',
            +            'zip_entry_open','zip_entry_read','zip_open','zip_read',
            +            'zlib_get_coding_type'
            +            ),
            +        4 => array(
            +            'DEFAULT_INCLUDE_PATH', 'DIRECTORY_SEPARATOR', 'E_ALL',
            +            'E_COMPILE_ERROR', 'E_COMPILE_WARNING', 'E_CORE_ERROR',
            +            'E_CORE_WARNING', 'E_ERROR', 'E_NOTICE', 'E_PARSE', 'E_STRICT',
            +            'E_USER_ERROR', 'E_USER_NOTICE', 'E_USER_WARNING', 'E_WARNING',
            +            'ENT_COMPAT','ENT_QUOTES','ENT_NOQUOTES',
            +            'false', 'null', 'PEAR_EXTENSION_DIR', 'PEAR_INSTALL_DIR',
            +            'PHP_BINDIR', 'PHP_CONFIG_FILE_PATH', 'PHP_DATADIR',
            +            'PHP_EXTENSION_DIR', 'PHP_LIBDIR',
            +            'PHP_LOCALSTATEDIR', 'PHP_OS',
            +            'PHP_OUTPUT_HANDLER_CONT', 'PHP_OUTPUT_HANDLER_END',
            +            'PHP_OUTPUT_HANDLER_START', 'PHP_SYSCONFDIR',
            +            'PHP_VERSION', 'true', '__CLASS__', '__FILE__', '__FUNCTION__',
            +            '__LINE__', '__METHOD__'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        1 => array(
            +            '<'.'%', '<'.'%=', '%'.'>', '<'.'?', '<'.'?=', '?'.'>'
            +            ),
            +        0 => array(
            +            '(', ')', '[', ']', '{', '}',
            +            '!', '@', '%', '&', '|', '/',
            +            '<', '>',
            +            '=', '-', '+', '*',
            +            '.', ':', ',', ';'
            +            )
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;',
            +            2 => 'color: #000000; font-weight: bold;',
            +            3 => 'color: #990000;',
            +            4 => 'color: #009900; font-weight: bold;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; font-style: italic;',
            +            2 => 'color: #666666; font-style: italic;',
            +            3 => 'color: #0000cc; font-style: italic;',
            +            4 => 'color: #009933; font-style: italic;',
            +            'MULTI' => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;',
            +            1 => 'color: #000099; font-weight: bold;',
            +            2 => 'color: #660099; font-weight: bold;',
            +            3 => 'color: #660099; font-weight: bold;',
            +            4 => 'color: #006699; font-weight: bold;',
            +            5 => 'color: #006699; font-weight: bold; font-style: italic;',
            +            6 => 'color: #009933; font-weight: bold;',
            +            'HARD' => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #0000ff;',
            +            'HARD' => 'color: #0000ff;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;',
            +            GESHI_NUMBER_OCT_PREFIX => 'color: #208080;',
            +            GESHI_NUMBER_HEX_PREFIX => 'color: #208080;',
            +            GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;',
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #004000;',
            +            2 => 'color: #004000;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #339933;',
            +            1 => 'color: #000000; font-weight: bold;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #000088;'
            +            ),
            +        'SCRIPT' => array(
            +            0 => '',
            +            1 => '',
            +            2 => '',
            +            3 => '',
            +            4 => '',
            +            5 => ''
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => 'http://www.php.net/{FNAMEL}',
            +        4 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '->',
            +        2 => '::'
            +        ),
            +    'REGEXPS' => array(
            +        //Variables
            +        0 => "[\\$]+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*"
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_MAYBE,
            +    'SCRIPT_DELIMITERS' => array(
            +        0 => array(
            +            '<'.'?php' => '?'.'>'
            +            ),
            +        1 => array(
            +            '<'.'?' => '?'.'>'
            +            ),
            +        2 => array(
            +            '<'.'%' => '%'.'>'
            +            ),
            +        3 => array(
            +            ''
            +            ),
            +        4 => "/(?P<\\?(?>php\b)?)(?:".
            +            "(?>[^\"'?\\/<]+)|".
            +            "\\?(?!>)|".
            +            "(?>'(?>[^'\\\\]|\\\\'|\\\\\\\|\\\\)*')|".
            +            "(?>\"(?>[^\"\\\\]|\\\\\"|\\\\\\\\|\\\\)*\")|".
            +            "(?>\\/\\*(?>[^\\*]|(?!\\*\\/)\\*)*\\*\\/)|".
            +            "\\/\\/(?>.*?(?:\\?>|$))|".
            +            "#(?>.*?(?:\\?>|$))|".
            +            "\\/(?=[^*\\/])|".
            +            "<(?!<<)|".
            +            "<<<(?P\w+)\s.*?\s\k".
            +            ")*?(?P\\?>|\Z)/sm",
            +        5 => "/(?P<%)(?:".
            +            "(?>[^\"'%\\/<]+)|".
            +            "%(?!>)|".
            +            "(?>'(?>[^'\\\\]|\\\\'|\\\\\\\|\\\\)*')|".
            +            "(?>\"(?>[^\\\"\\\\]|\\\\\"|\\\\\\\\|\\\\)*\")|".
            +            "(?>\\/\\*(?>[^\\*]|(?!\\*\\/)\\*)*\\*\\/)|".
            +            "\\/\\/(?>.*?(?:%>|$))|".
            +            "#(?>.*?(?:%>|$))|".
            +            "\\/(?=[^*\\/])|".
            +            "<(?!<<)|".
            +            "<<<(?P\w+)\s.*?\s\k".
            +            ")*?(?P%>|\Z)/sm",
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        0 => true,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        5 => true
            +        ),
            +    'TAB_WIDTH' => 4
            +);
            diff --git a/vendor/easybook/geshi/geshi/pic16.php b/vendor/easybook/geshi/geshi/pic16.php
            new file mode 100644
            index 0000000000..2e28f17b62
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/pic16.php
            @@ -0,0 +1,139 @@
            + 'PIC16',
            +    'COMMENT_SINGLE' => array(1 => ';'),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        /*Instructions*/
            +        1 => array(
            +            'addcf','adddcf','addlw','addwf','andlw','andwf','bc','bcf','bdc',
            +            'bnc','bndc','bnz','bsf','btfsc','btfss','bz','call','clrc','clrdc',
            +            'clrf','clrw','clrwdt','clrz','comf','decf','goto','incf','incfsz',
            +            'iorlw','iorwf','lcall','lgoto','movf','movfw','movlw','movwf',
            +            'option','negf','nop','retfie','retlw','return','rlf','rrf','setc',
            +            'setdc','setz','skpc','skpdc','skpnc','skpndc','skpnz','skpz',
            +            'sleep','subcf','subdcf','sublw','subwf','swapf','tris','tstf',
            +            'xorlw','xorwf'
            +            ),
            +        /*Registers*/
            +        2 => array(
            +            'INDF','TMR0','OPTION','PCL','STATUS','FSR','PORTA','PORTB','PORTC',
            +            'PORTD','PORTE','PORTF','TRISA','TRISB','TRISC','TRISD','TRISE',
            +            'TRISF','PCLATH','INTCON','PIR1','PIE1','PCON','CMCON','VRCON',
            +            'F','W'
            +            ),
            +        /*Directives*/
            +        3 => array(
            +            '_BADRAM','BANKISEL','BANKSEL','CBLOCK','CODE','_CONFIG','CONSTANT',
            +            'DA','DATA','DB','DE','#DEFINE','DT','DW','ELSE','END','ENDC',
            +            'ENDIF','ENDM','ENDW','EQU','ERROR','ERRORLEVEL','EXITM','EXPAND',
            +            'EXTERN','FILL','GLOBAL','IDATA','_IDLOCS','IF','IFDEF','IFNDEF',
            +            'INCLUDE','#INCLUDE','LIST','LOCAL','MACRO','_MAXRAM','MESSG',
            +            'NOEXPAND','NOLIST','ORG','PAGE','PAGESEL','PROCESSOR','RADIX',
            +            'RES','SET','SPACE','SUBTITLE','TITLE','UDATA','UDATA_ACS',
            +            'UDATA_OVR','UDATA_SHR','#UNDEFINE','VARIABLE','WHILE',
            +            'D','H','O','B','A'
            +            ),
            +        ),
            +    'SYMBOLS' => array('=','.',',',':'),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0000a0; font-weight: bold;',
            +            2 => 'color: #aa3300; font-weight: bold;',
            +            3 => 'color: #0000ff;',
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #00a000;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #0000ff;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff7700;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #ff7700;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #7777ff;'
            +            ),
            +        'REGEXPS' => array(),
            +        'SCRIPT' => array()
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(),
            +    'NUMBERS' =>
            +        GESHI_NUMBER_INT_BASIC |
            +        GESHI_NUMBER_BIN_SUFFIX |
            +        GESHI_NUMBER_HEX_PREFIX |
            +        GESHI_NUMBER_HEX_SUFFIX,
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(),
            +    'TAB_WIDTH' => 4,
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            'DISALLOWED_BEFORE' => "a-zA-Z0-9\$_\|\#>|^",
            +            'DISALLOWED_AFTER' => "a-zA-Z0-9_<\|%"
            +            )
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/pike.php b/vendor/easybook/geshi/geshi/pike.php
            new file mode 100644
            index 0000000000..dcc53092d3
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/pike.php
            @@ -0,0 +1,101 @@
            + 'Pike',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'goto', 'break', 'continue', 'return', 'case', 'default', 'if',
            +            'else', 'switch', 'while', 'foreach', 'do', 'for', 'gauge',
            +            'destruct', 'lambda', 'inherit', 'import', 'typeof', 'catch',
            +            'inline', 'nomask', 'private', 'protected', 'public', 'static'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        1 => array(
            +            '(', ')', '{', '}', '[', ']', '+', '-', '*', '/', '%', '=', '!', '&', '|', '?', ';'
            +            )
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; font-style: italic;',
            +            'MULTI' => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #0000ff;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;',
            +            ),
            +        'METHODS' => array(
            +            0 => 'color: #004000;'
            +            ),
            +        'SYMBOLS' => array(
            +            1 => 'color: #339933;'
            +            ),
            +        'REGEXPS' => array(),
            +        'SCRIPT' => array()
            +        ),
            +    'URLS' => array(1 => ''),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(1 => '.'),
            +    'REGEXPS' => array(),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(),
            +    'HIGHLIGHT_STRICT_BLOCK' => array()
            +);
            diff --git a/vendor/easybook/geshi/geshi/pixelbender.php b/vendor/easybook/geshi/geshi/pixelbender.php
            new file mode 100644
            index 0000000000..6a2c8dea09
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/pixelbender.php
            @@ -0,0 +1,174 @@
            + 'Pixel Bender 1.0',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'languageVersion', 'kernel'
            +            ),
            +        2 => array(
            +            'import', 'parameter', 'dependent', 'const', 'input', 'output',
            +            'evaluatePixel', 'evaluateDependents', 'needed', 'changed', 'generated'
            +            ),
            +        3 => array(
            +            'bool', 'bool2', 'bool3', 'bool4', 'int', 'int2', 'int3', 'int4',
            +            'float', 'float2', 'float3', 'float4', 'float2x2', 'float3x3', 'float4x4',
            +            'pixel2', 'pixel3', 'pixel4', 'region', 'image1', 'image2', 'image3', 'image4',
            +            'imageRef', 'void'
            +            ),
            +        4 => array(
            +            'in', 'out', 'inout', 'if', 'else', 'for', 'while', 'do', 'break',
            +            'continue', 'return'
            +            ),
            +        5 => array(
            +            'radians', 'degrees', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'pow',
            +            'exp', 'exp2', 'log', 'log2', 'sqrt', 'inverseSqrt', 'abs', 'sign', 'floor',
            +            'ceil', 'fract', 'mod', 'min', 'max', 'step', 'clamp', 'mix', 'smoothStep',
            +            'length', 'distance', 'dot', 'cross', 'normalize', 'matrixCompMult', 'lessThan',
            +            'lessThanEqual', 'greaterThan', 'greaterThanEqual', 'equal', 'notEqual', 'any',
            +            'all', 'not', 'nowhere', 'everywhere', 'transform', 'union', 'intersect',
            +            'outset', 'inset', 'bounds', 'isEmpty', 'sample', 'sampleLinear', 'sampleNearest',
            +            'outCoord', 'dod', 'pixelSize', 'pixelAspectRatio'
            +            ),
            +        6 => array(
            +            'namespace', 'vendor', 'version', 'minValue', 'maxValue', 'defaultValue', 'description'
            +            ),
            +        7 => array(
            +            '#if', '#endif', '#ifdef', '#elif', 'defined', '#define',
            +            'AIF_ATI', 'AIF_NVIDIA', 'AIF_FLASH_TARGET'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '[', ']', '{', '}', '!', '%', '&', '|', '+', '-', '*', '/', '=', '<', '>', '?', ':'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        5 => true,
            +        6 => true,
            +        7 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0033ff;',
            +            2 => 'color: #0033ff; font-weight: bold;',
            +            3 => 'color: #0033ff;',
            +            4 => 'color: #9900cc; font-weight: bold;',
            +            5 => 'color: #333333;',
            +            6 => 'color: #666666;',
            +            7 => 'color: #990000;',
            +        ),
            +        'COMMENTS' => array(
            +            1 => 'color: #009900;',
            +            'MULTI' => 'color: #3f5fbf;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => ''
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #990000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #000000; font-weight:bold;'
            +            ),
            +        'METHODS' => array(
            +            0 => 'color: #000000;',
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #000000; font-weight: bold;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => '',
            +        6 => '',
            +        7 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array('.'),
            +    'REGEXPS' => array(),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(),
            +    'HIGHLIGHT_STRICT_BLOCK' => array()
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/pli.php b/vendor/easybook/geshi/geshi/pli.php
            new file mode 100644
            index 0000000000..292da5b54b
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/pli.php
            @@ -0,0 +1,199 @@
            + 'PL/I',
            +    'COMMENT_SINGLE' => array(),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"', '\''),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'abnormal', 'abs', 'acos', 'acosf', 'add', 'addbuff', 'addr',
            +            'addrdata', 'alias', 'aligned', 'all', 'alloc', 'allocate',
            +            'allocation', 'allocn', 'allocsize', 'any', 'anycondition', 'area',
            +            'ascii', 'asin', 'asinf', 'asm', 'asmtdli', 'assembler',
            +            'assignable', 'atan', 'atand', 'atanf', 'atanh', 'attach',
            +            'attention', 'attn', 'auto', 'automatic', 'availablearea',
            +            'backwards', 'based', 'begin', 'bigendian', 'bin', 'binary',
            +            'binaryvalue', 'bind', 'binvalue', 'bit', 'bitloc', 'bitlocation',
            +            'bkwd', 'blksize', 'bool', 'buf', 'buffered', 'buffers', 'bufnd',
            +            'bufni', 'bufoff', 'bufsp', 'builtin', 'bx', 'by', 'byaddr', 'byte',
            +            'byvalue', 'b4', 'call', 'cast', 'cds', 'ceil', 'center',
            +            'centerleft', 'centerright', 'centre', 'centreleft', 'centreright',
            +            'char', 'character', 'charg', 'chargraphic', 'charval', 'check',
            +            'checkstg', 'close', 'cmpat', 'cobol', 'col', 'collate', 'column',
            +            'comment', 'compare', 'compiledate', 'compiletime', 'completion',
            +            'complex', 'cond', 'condition', 'conjg', 'conn', 'connected',
            +            'consecutive', 'controlled', 'conv', 'conversion', 'copy', 'cos',
            +            'cosd', 'cosf', 'cosh', 'count', 'counter', 'cpln', 'cplx', 'cs',
            +            'cstg', 'ctl', 'ctlasa', 'ctl360', 'currentsize', 'currentstorage',
            +            'data', 'datafield', 'date', 'datetime', 'days', 'daystodate',
            +            'daystosecs', 'db', 'dcl', 'dec', 'decimal', 'declare', 'def',
            +            'default', 'define', 'defined', 'delay', 'delete', 'descriptor',
            +            'descriptors', 'detach', 'dft', 'dim', 'dimacross', 'dimension',
            +            'direct', 'display', 'divide', 'do', 'downthru', 'edit', 'else',
            +            'empty', 'end', 'endfile', 'endpage', 'entry', 'entryaddr', 'env',
            +            'environment', 'epsilon', 'erf', 'erfc', 'error', 'event', 'excl',
            +            'exclusive', 'exit', 'exp', 'expf', 'exponent', 'exports', 'ext',
            +            'external', 'fb', 'fbs', 'fetch', 'file', 'fileddint', 'fileddtest',
            +            'fileddword', 'fileid', 'fileopen', 'fileread', 'fileseek',
            +            'filetell', 'filewrite', 'finish', 'first', 'fixed', 'fixedbin',
            +            'fixeddec', 'fixedoverflow', 'float', 'floatbin', 'floatdec',
            +            'floor', 'flush', 'fofl', 'format', 'fortran', 'free', 'from',
            +            'fromalien', 'fs', 'gamma', 'generic', 'genkey', 'get', 'getenv',
            +            'go', 'goto', 'graphic', 'gx', 'handle', 'hbound', 'hex', 'hexadec',
            +            'heximage', 'high', 'huge', 'iand', 'ieee', 'ieor', 'if', 'ignore',
            +            'imag', 'in', 'index', 'indexarea', 'indexed', 'init', 'initial',
            +            'inline', 'inonly', 'inot', 'inout', 'input', 'int', 'inter',
            +            'internal', 'into', 'invalidop', 'ior', 'irred', 'irreducible',
            +            'isfinite', 'isigned', 'isinf', 'isll', 'ismain', 'isnan',
            +            'isnormal', 'isrl', 'iszero', 'iunsigned', 'key', 'keyed',
            +            'keyfrom', 'keylength', 'keyloc', 'keyto', 'label', 'last',
            +            'lbound', 'leave', 'left', 'length', 'like', 'limited', 'line',
            +            'lineno', 'linesize', 'linkage', 'list', 'littleendian', 'loc',
            +            'locate', 'location', 'log', 'logf', 'loggamma', 'log10', 'log10f',
            +            'log2', 'low', 'lowercase', 'lower2', 'maccol', 'maclmar',
            +            'macname', 'macrmar', 'main', 'max', 'maxexp', 'maxlength',
            +            'memconvert', 'memcu12', 'memcu14', 'memcu21', 'memcu24', 'memcu41',
            +            'memcu42', 'memindex', 'memsearch', 'memsearchr', 'memverify',
            +            'memverifyr', 'min', 'minexp', 'mod', 'mpstr', 'multiply', 'name',
            +            'native', 'ncp', 'new', 'nocharg', 'nochargraphic', 'nocheck',
            +            'nocmpat', 'noconv', 'noconversion', 'nodescriptor', 'noexecops',
            +            'nofixedoverflow', 'nofofl', 'noinline', 'nolock', 'nomap',
            +            'nomapin', 'nomapout', 'nonasgn', 'nonassignable', 'nonconnected',
            +            'nonnative', 'noofl', 'nooverflow', 'norescan', 'normal', 'nosize',
            +            'nostrg', 'nostringrange', 'nostringsize', 'nostrz', 'nosubrg',
            +            'nosubscriptrange', 'noufl', 'nounderflow', 'nowrite', 'nozdiv',
            +            'nozerodivide', 'null', 'offset', 'offsetadd', 'offsetdiff',
            +            'offsetsubtract', 'offsetvalue', 'ofl', 'omitted', 'on', 'onarea',
            +            'onchar', 'oncode', 'oncondcond', 'oncondid', 'oncount', 'onfile',
            +            'ongsource', 'onkey', 'online', 'onloc', 'onoffset', 'onsource',
            +            'onsubcode', 'onwchar', 'onwsource', 'open', 'optional', 'options',
            +            'order', 'ordinal', 'ordinalname', 'ordinalpred', 'ordinalsucc',
            +            'other', 'otherwise', 'outonly', 'output', 'overflow', 'package',
            +            'packagename', 'page', 'pageno', 'pagesize', 'parameter', 'parmset',
            +            'password', 'pending', 'pic', 'picspec', 'picture', 'places',
            +            'pliascii', 'plicanc', 'plickpt', 'plidelete', 'plidump',
            +            'pliebcdic', 'plifill', 'plifree', 'plimove', 'pliover', 'plirest',
            +            'pliretc', 'pliretv', 'plisaxa', 'plisaxb', 'plisaxc', 'plisaxd',
            +            'plisrta', 'plisrtb', 'plisrtc', 'plisrtd', 'plitdli', 'plitran11',
            +            'plitran12', 'plitran21', 'plitran22', 'pointer', 'pointeradd',
            +            'pointerdiff', 'pointersubtract', 'pointervalue', 'poly', 'pos',
            +            'position', 'prec', 'precision', 'pred', 'present', 'print',
            +            'priority', 'proc', 'procedure', 'procedurename', 'procname',
            +            'prod', 'ptr', 'ptradd', 'ptrdiff', 'ptrsubtract', 'ptrvalue',
            +            'put', 'putenv', 'quote', 'radix', 'raise2', 'random', 'range',
            +            'rank', 'read', 'real', 'record', 'recsize', 'recursive', 'red',
            +            'reducible', 'reentrant', 'refer', 'regional', 'reg12', 'release',
            +            'rem', 'reorder', 'repattern', 'repeat', 'replaceby2', 'reply',
            +            'reread', 'rescan', 'reserved', 'reserves', 'resignal', 'respec',
            +            'retcode', 'return', 'returns', 'reuse', 'reverse', 'revert',
            +            'rewrite', 'right', 'round', 'rounddec', 'samekey', 'scalarvarying',
            +            'scale', 'search', 'searchr', 'secs', 'secstodate', 'secstodays',
            +            'select', 'seql', 'sequential', 'serialize4', 'set', 'sign',
            +            'signal', 'signed', 'sin', 'sind', 'sinf', 'sinh', 'sis', 'size',
            +            'skip', 'snap', 'sourcefile', 'sourceline', 'sqrt', 'sqrtf',
            +            'stackaddr', 'statement', 'static', 'status', 'stg', 'stmt', 'stop',
            +            'storage', 'stream', 'strg', 'string', 'stringrange', 'stringsize',
            +            'structure', 'strz', 'subrg', 'subscriptrange', 'substr',
            +            'subtract', 'succ', 'sum', 'suppress', 'sysin', 'sysnull',
            +            'sysparm', 'sysprint', 'system', 'sysversion', 'tally', 'tan',
            +            'tand', 'tanf', 'tanh', 'task', 'then', 'thread', 'threadid',
            +            'time', 'tiny', 'title', 'to', 'total', 'tpk', 'tpm', 'transient',
            +            'translate', 'transmit', 'trim', 'trkofl', 'trunc', 'type', 'ufl',
            +            'ulength', 'ulength16', 'ulength8', 'unal', 'unaligned',
            +            'unallocated', 'unbuf', 'unbuffered', 'undefinedfile', 'underflow',
            +            'undf', 'unlock', 'unsigned', 'unspec', 'until', 'update', 'upos',
            +            'uppercase', 'upthru', 'usubstr', 'usurrogate', 'uvalid', 'uwidth',
            +            'valid', 'validdate', 'value', 'var', 'varglist', 'vargsize',
            +            'variable', 'varying', 'varyingz', 'vb', 'vbs', 'verify', 'verifyr',
            +            'vs', 'vsam', 'wait', 'wchar', 'wcharval', 'weekday', 'when',
            +            'whigh', 'while', 'widechar', 'wlow', 'write', 'xmlchar', 'y4date',
            +            'y4julian', 'y4year', 'zdiv', 'zerodivide'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        1 => array(
            +            '+', '-', '*', '/', '=', '<', '>', '&', '^', '|', ':', '(', ')', ';', ','
            +            )
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;'
            +            ),
            +        'COMMENTS' => array(
            +            'MULTI' => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #0000ff;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;',
            +            ),
            +        'METHODS' => array(
            +            0 => 'color: #004000;'
            +            ),
            +        'SYMBOLS' => array(
            +            1 => 'color: #339933;'
            +            ),
            +        'REGEXPS' => array(),
            +        'SCRIPT' => array()
            +        ),
            +    'URLS' => array(1 => ''),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(1 => '.'),
            +    'REGEXPS' => array(),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(),
            +    'HIGHLIGHT_STRICT_BLOCK' => array()
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/plsql.php b/vendor/easybook/geshi/geshi/plsql.php
            new file mode 100644
            index 0000000000..58f7c90f4b
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/plsql.php
            @@ -0,0 +1,254 @@
            +
            + * Copyright: (c) 2006 Victor Engmark (http://l0b0.net/)
            + * Release Version: 1.0.8.11
            + * Date Started: 2006/10/26
            + *
            + * Oracle 9.2 PL/SQL language file for GeSHi.
            + * Formatting is based on the default setup of TOAD 8.6.
            + *
            + * CHANGES
            + * -------
            + * 2006/10/27 (1.0.0)
            + *    -    First Release
            + *
            + * TODO (updated 2006/10/27)
            + * -------------------------
            + * * Add < and > to brackets
            + * * Remove symbols which are also comment delimiters / quote marks?
            + *
            + *************************************************************************************
            + *
            + *         This file is part of GeSHi.
            + *
            + *     GeSHi is free software; you can redistribute it and/or modify
            + *     it under the terms of the GNU General Public License as published by
            + *     the Free Software Foundation; either version 2 of the License, or
            + *     (at your option) any later version.
            + *
            + *     GeSHi is distributed in the hope that it will be useful,
            + *     but WITHOUT ANY WARRANTY; without even the implied warranty of
            + *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.    See the
            + *     GNU General Public License for more details.
            + *
            + *     You should have received a copy of the GNU General Public License
            + *     along with GeSHi; if not, write to the Free Software
            + *     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA    02111-1307    USA
            + *
            + ************************************************************************************/
            +
            +$language_data = array (
            +    'LANG_NAME' => 'PL/SQL',
            +    'COMMENT_SINGLE' => array(1 =>'--'), //http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96624/02_funds.htm#2930
            +    'COMMENT_MULTI' => array('/*' => '*/'), //http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96624/02_funds.htm#2950
            +    'CASE_KEYWORDS' => GESHI_CAPS_UPPER,
            +    'QUOTEMARKS' => array("'", '"'), //http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96624/02_funds.htm
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        //PL/SQL reserved keywords (http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96624/f_words.htm#LNPLS019)
            +        1 => array('ZONE', 'YEAR', 'WRITE', 'WORK', 'WITH', 'WHILE', 'WHERE',
            +        'WHENEVER', 'WHEN', 'VIEW', 'VARCHAR2', 'VARCHAR', 'VALUES',
            +        'VALIDATE', 'USE', 'UPDATE', 'UNIQUE', 'UNION', 'TYPE', 'TRUE',
            +        'TRIGGER', 'TO', 'TIMEZONE_REGION', 'TIMEZONE_MINUTE', 'TIMEZONE_HOUR',
            +        'TIMEZONE_ABBR', 'TIMESTAMP', 'TIME', 'THEN', 'TABLE', 'SYNONYM',
            +        'SUCCESSFUL', 'SUBTYPE', 'START', 'SQLERRM', 'SQLCODE', 'SQL', 'SPACE',
            +        'SMALLINT', 'SHARE', 'SET', 'SEPARATE', 'SELECT', 'SECOND',
            +        'SAVEPOINT', 'ROWTYPE', 'ROWNUM', 'ROWID', 'ROW', 'ROLLBACK',
            +        'REVERSE', 'RETURN', 'RELEASE', 'RECORD', 'REAL', 'RAW', 'RANGE',
            +        'RAISE', 'PUBLIC', 'PROCEDURE', 'PRIVATE', 'PRIOR', 'PRAGMA',
            +        'POSITIVEN', 'POSITIVE', 'PLS_INTEGER', 'PCTFREE', 'PARTITION',
            +        'PACKAGE', 'OUT', 'OTHERS', 'ORGANIZATION', 'ORDER', 'OR', 'OPTION',
            +        'OPERATOR', 'OPEN', 'OPAQUE', 'ON', 'OF', 'OCIROWID', 'NUMBER_BASE',
            +        'NUMBER', 'NULL', 'NOWAIT', 'NOT', 'NOCOPY', 'NEXTVAL', 'NEW',
            +        'NATURALN', 'NATURAL', 'MONTH', 'MODE', 'MLSLABEL', 'MINUTE', 'MINUS',
            +        'LOOP', 'LONG', 'LOCK', 'LIMITED', 'LIKE', 'LEVEL', 'JAVA',
            +        'ISOLATION', 'IS', 'INTO', 'INTERVAL', 'INTERSECT', 'INTERFACE',
            +        'INTEGER', 'INSERT', 'INDICATOR', 'INDEX', 'IN', 'IMMEDIATE', 'IF',
            +        'HOUR', 'HEAP', 'HAVING', 'GROUP', 'GOTO', 'FUNCTION', 'FROM',
            +        'FORALL', 'FOR', 'FLOAT', 'FETCH', 'FALSE', 'EXTENDS', 'EXIT',
            +        'EXISTS', 'EXECUTE', 'EXCLUSIVE', 'EXCEPTION', 'END', 'ELSIF', 'ELSE',
            +        'DROP', 'DO', 'DISTINCT', 'DESC', 'DELETE', 'DEFAULT', 'DECLARE',
            +        'DECIMAL', 'DAY', 'DATE', 'CURSOR', 'CURRVAL', 'CURRENT', 'CREATE',
            +        'CONSTANT', 'CONNECT', 'COMPRESS', 'COMMIT', 'COMMENT', 'COLLECT',
            +        'CLUSTER', 'CLOSE', 'CHECK', 'CHAR_BASE', 'CHAR', 'CASE', 'BY', 'BULK',
            +        'BOOLEAN', 'BODY', 'BINARY_INTEGER', 'BETWEEN', 'BEGIN', 'AUTHID',
            +        'AT', 'ASC', 'AS', 'ARRAY', 'ANY', 'AND', 'ALTER', 'ALL'),
            +        //SQL functions (http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96540/toc.htm & http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96540/functions101a.htm#85925)
            +        2 => array('XMLTRANSFORM', 'XMLSEQUENCE', 'XMLFOREST', 'XMLELEMENT',
            +        'XMLCONCAT', 'XMLCOLATTVAL', 'XMLAGG', 'WIDTH_BUCKET', 'VSIZE',
            +        'VARIANCE', 'VAR_SAMP', 'VAR_POP', 'VALUE', 'USERENV', 'USER', 'UPPER',
            +        'UPDATEXML', 'UNISTR', 'UID', 'TZ_OFFSET', 'TRUNC', 'TRIM', 'TREAT',
            +        'TRANSLATE', 'TO_YMINTERVAL', 'TO_TIMESTAMP_TZ', 'TO_TIMESTAMP',
            +        'TO_SINGLE_BYTE', 'TO_NUMBER', 'TO_NCLOB', 'TO_NCHAR', 'TO_MULTI_BYTE',
            +        'TO_LOB', 'TO_DSINTERVAL', 'TO_DATE', 'TO_CLOB', 'TO_CHAR', 'TANH',
            +        'TAN', 'SYSTIMESTAMP', 'SYSDATE', 'SYS_XMLGEN', 'SYS_XMLAGG',
            +        'SYS_TYPEID', 'SYS_GUID', 'SYS_EXTRACT_UTC', 'SYS_DBURIGEN',
            +        'SYS_CONTEXT', 'SYS_CONNECT_BY_PATH', 'SUM', 'SUBSTR', 'STDDEV_SAMP',
            +        'STDDEV_POP', 'STDDEV', 'SQRT', 'SOUNDEX', 'SINH', 'SIN', 'SIGN',
            +        'SESSIONTIMEZONE', 'RTRIM', 'RPAD', 'ROWIDTONCHAR', 'ROWIDTOCHAR',
            +        'ROW_NUMBER', 'ROUND', 'REPLACE', 'REGR_SYY', 'REGR_SXY', 'REGR_SXX',
            +        'REGR_SLOPE', 'REGR_R2', 'REGR_INTERCEPT', 'REGR_COUNT', 'REGR_AVGY',
            +        'REGR_AVGX', 'REFTOHEX', 'REF', 'RAWTONHEX', 'RAWTOHEX',
            +        'RATIO_TO_REPORT', 'RANK', 'POWER', 'PERCENTILE_DISC',
            +        'PERCENTILE_CONT', 'PERCENT_RANK', 'PATH', 'NVL2', 'NVL',
            +        'NUMTOYMINTERVAL', 'NUMTODSINTERVAL', 'NULLIF', 'NTILE', 'NLSSORT',
            +        'NLS_UPPER', 'NLS_LOWER', 'NLS_INITCAP', 'NLS_CHARSET_NAME',
            +        'NLS_CHARSET_ID', 'NLS_CHARSET_DECL_LEN', 'NEXT_DAY', 'NEW_TIME',
            +        'NCHR', 'MONTHS_BETWEEN', 'MOD', 'MIN', 'MAX', 'MAKE_REF', 'LTRIM',
            +        'LPAD', 'LOWER', 'LOG', 'LOCALTIMESTAMP', 'LN', 'LENGTH', 'LEAST',
            +        'LEAD', 'LAST_VALUE', 'LAST_DAY', 'LAST', 'LAG', 'INSTR', 'INITCAP',
            +        'HEXTORAW', 'GROUPING_ID', 'GROUPING', 'GROUP_ID', 'GREATEST',
            +        'FROM_TZ', 'FLOOR', 'FIRST_VALUE', 'FIRST', 'EXTRACTVALUE', 'EXTRACT',
            +        'EXP', 'EXISTSNODE', 'EMPTY_CLOB', 'EMPTY_BLOB', 'DUMP', 'DEREF',
            +        'DEPTH', 'DENSE_RANK', 'DECOMPOSE', 'DECODE', 'DBTIMEZONE',
            +        'CURRENT_TIMESTAMP', 'CURRENT_DATE', 'CUME_DIST', 'COVAR_SAMP',
            +        'COVAR_POP', 'COUNT', 'COSH', 'COS', 'CORR', 'CONVERT', 'CONCAT',
            +        'COMPOSE', 'COALESCE', 'CHR', 'CHARTOROWID', 'CEIL', 'CAST', 'BITAND',
            +        'BIN_TO_NUM', 'BFILENAME', 'AVG', 'ATAN2', 'ATAN', 'ASIN', 'ASCIISTR',
            +        'ASCII', 'ADD_MONTHS', 'ACOS', 'ABS'),
            +        //PL/SQL packages (http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96612/intro2.htm#1025672)
            +        3 => array('UTL_URL', 'UTL_TCP', 'UTL_SMTP', 'UTL_REF', 'UTL_RAW',
            +        'UTL_PG', 'UTL_INADDR', 'UTL_HTTP', 'UTL_FILE', 'UTL_ENCODE',
            +        'UTL_COLL', 'SDO_UTIL', 'SDO_TUNE', 'SDO_MIGRATE', 'SDO_LRS',
            +        'SDO_GEOM', 'SDO_CS', 'DMBS_XMLQUERY', 'DMBS_FLASHBACK',
            +        'DMBS_DEFER_SYS', 'DEBUG_EXTPROC', 'DBMS_XSLPROCESSOR', 'DBMS_XPLAN',
            +        'DBMS_XMLSCHEMA', 'DBMS_XMLSAVE', 'DBMS_XMLPARSER', 'DBMS_XMLGEN',
            +        'DBMS_XMLDOM', 'DBMS_XDBT', 'DBMS_XDB_VERSION', 'DBMS_XDB', 'DBMS_WM',
            +        'DBMS_UTILITY', 'DBMS_TYPES', 'DBMS_TTS', 'DBMS_TRANSFORM',
            +        'DBMS_TRANSACTION', 'DBMS_TRACE', 'DBMS_STRM_A', 'DBMS_STRM',
            +        'DBMS_STORAGE_MAP', 'DBMS_STATS', 'DBMS_SQL', 'DBMS_SPACE_ADMIN',
            +        'DBMS_SPACE', 'DBMS_SHARED_POOL', 'DBMS_SESSION', 'DBMS_RULE_ADM',
            +        'DBMS_RULE', 'DBMS_ROWID', 'DBMS_RLS', 'DBMS_RESUMABLE',
            +        'DBMS_RESOURCE_MANAGER_PRIVS', 'DBMS_RESOURCE_MANAGER', 'DBMS_REPUTIL',
            +        'DBMS_REPCAT_RGT', 'DBMS_REPCAT_INSTATIATE', 'DBMS_REPCAT_ADMIN',
            +        'DBMS_REPCAT', 'DBMS_REPAIR', 'DBMS_REFRESH', 'DBMS_REDEFINITION',
            +        'DBMS_RECTIFIER_DIFF', 'DBMS_RANDOM', 'DBMS_PROPAGATION_ADM',
            +        'DBMS_PROFILER', 'DBMS_PIPE', 'DBMS_PCLXUTIL', 'DBMS_OUTPUT',
            +        'DBMS_OUTLN_EDIT', 'DBMS_OUTLN', 'DBMS_ORACLE_TRACE_USER',
            +        'DBMS_ORACLE_TRACE_AGENT', 'DBMS_OLAP', 'DBMS_OFFLINE_SNAPSHOT',
            +        'DBMS_OFFLINE_OG', 'DBMS_ODCI', 'DBMS_OBFUSCATION_TOOLKIT',
            +        'DBMS_MVIEW', 'DBMS_MGWMSG', 'DBMS_MGWADM', 'DBMS_METADATA',
            +        'DBMS_LOGSTDBY', 'DBMS_LOGMNR_D', 'DBMS_LOGMNR_CDC_SUBSCRIBE',
            +        'DBMS_LOGMNR_CDC_PUBLISH', 'DBMS_LOGMNR', 'DBMS_LOCK', 'DBMS_LOB',
            +        'DBMS_LIBCACHE', 'DBMS_LDAP', 'DBMS_JOB', 'DBMS_IOT',
            +        'DBMS_HS_PASSTHROUGH', 'DBMS_FGA', 'DBMS_DISTRIBUTED_TRUST_ADMIN',
            +        'DBMS_DESCRIBE', 'DBMS_DEFER_QUERY', 'DBMS_DEFER', 'DBMS_DEBUG',
            +        'DBMS_DDL', 'DBMS_CAPTURE_ADM', 'DBMS_AW', 'DBMS_AQELM', 'DBMS_AQADM',
            +        'DBMS_AQ', 'DBMS_APPLY_ADM', 'DBMS_APPLICATION_INFO', 'DBMS_ALERT',
            +        'CWM2_OLAP_AW_ACCESS'),
            +        //PL/SQL predefined exceptions (http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96624/07_errs.htm#784)
            +        4 => array('ZERO_DIVIDE', 'VALUE_ERROR', 'TOO_MANY_ROWS',
            +        'TIMEOUT_ON_RESOURCE', 'SYS_INVALID_ROWID', 'SUBSCRIPT_OUTSIDE_LIMIT',
            +        'SUBSCRIPT_BEYOND_COUNT', 'STORAGE_ERROR', 'SELF_IS_NULL',
            +        'ROWTYPE_MISMATCH', 'PROGRAM_ERROR', 'NOT_LOGGED_ON', 'NO_DATA_FOUND',
            +        'LOGIN_DENIED', 'INVALID_NUMBER', 'INVALID_CURSOR', 'DUP_VAL_ON_INDEX',
            +        'CURSOR_ALREADY_OPEN', 'COLLECTION_IS_NULL', 'CASE_NOT_FOUND',
            +        'ACCESS_INTO_NULL'),
            +        //Static data dictionary views (http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96536/ch2.htm)
            +        5 => array('USER_REPSITES', 'USER_REPSCHEMA',
            +        'USER_REPRESOLUTION_STATISTICS', 'USER_REPRESOLUTION_METHOD',
            +        'USER_REPRESOLUTION', 'USER_REPRESOL_STATS_CONTROL', 'USER_REPPROP',
            +        'USER_REPPRIORITY_GROUP', 'USER_REPPRIORITY',
            +        'USER_REPPARAMETER_COLUMN', 'USER_REPOBJECT', 'USER_REPKEY_COLUMNS',
            +        'USER_REPGROUPED_COLUMN', 'USER_REPGROUP_PRIVILEGES', 'USER_REPGROUP',
            +        'USER_REPGENOBJECTS', 'USER_REPGENERATED', 'USER_REPFLAVORS',
            +        'USER_REPFLAVOR_OBJECTS', 'USER_REPFLAVOR_COLUMNS', 'USER_REPDDL',
            +        'USER_REPCONFLICT', 'USER_REPCOLUMN_GROUP', 'USER_REPCOLUMN',
            +        'USER_REPCATLOG', 'USER_REPCAT_USER_PARM_VALUES',
            +        'USER_REPCAT_USER_AUTHORIZATIONS', 'USER_REPCAT_TEMPLATE_SITES',
            +        'USER_REPCAT_TEMPLATE_PARMS', 'USER_REPCAT_TEMPLATE_OBJECTS',
            +        'USER_REPCAT_REFRESH_TEMPLATES', 'USER_REPCAT', 'USER_REPAUDIT_COLUMN',
            +        'USER_REPAUDIT_ATTRIBUTE', 'DBA_REPSITES_NEW', 'DBA_REPSITES',
            +        'DBA_REPSCHEMA', 'DBA_REPRESOLUTION_STATISTICS',
            +        'DBA_REPRESOLUTION_METHOD', 'DBA_REPRESOLUTION',
            +        'DBA_REPRESOL_STATS_CONTROL', 'DBA_REPPROP', 'DBA_REPPRIORITY_GROUP',
            +        'DBA_REPPRIORITY', 'DBA_REPPARAMETER_COLUMN', 'DBA_REPOBJECT',
            +        'DBA_REPKEY_COLUMNS', 'DBA_REPGROUPED_COLUMN',
            +        'DBA_REPGROUP_PRIVILEGES', 'DBA_REPGROUP', 'DBA_REPGENOBJECTS',
            +        'DBA_REPGENERATED', 'DBA_REPFLAVORS', 'DBA_REPFLAVOR_OBJECTS',
            +        'DBA_REPFLAVOR_COLUMNS', 'DBA_REPEXTENSIONS', 'DBA_REPDDL',
            +        'DBA_REPCONFLICT', 'DBA_REPCOLUMN_GROUP', 'DBA_REPCOLUMN',
            +        'DBA_REPCATLOG', 'DBA_REPCAT_USER_PARM_VALUES',
            +        'DBA_REPCAT_USER_AUTHORIZATIONS', 'DBA_REPCAT_TEMPLATE_SITES',
            +        'DBA_REPCAT_TEMPLATE_PARMS', 'DBA_REPCAT_TEMPLATE_OBJECTS',
            +        'DBA_REPCAT_REFRESH_TEMPLATES', 'DBA_REPCAT_EXCEPTIONS', 'DBA_REPCAT',
            +        'DBA_REPAUDIT_COLUMN', 'DBA_REPAUDIT_ATTRIBUTE', 'ALL_REPSITES',
            +        'ALL_REPSCHEMA', 'ALL_REPRESOLUTION_STATISTICS',
            +        'ALL_REPRESOLUTION_METHOD', 'ALL_REPRESOLUTION',
            +        'ALL_REPRESOL_STATS_CONTROL', 'ALL_REPPROP', 'ALL_REPPRIORITY_GROUP',
            +        'ALL_REPPRIORITY', 'ALL_REPPARAMETER_COLUMN', 'ALL_REPOBJECT',
            +        'ALL_REPKEY_COLUMNS', 'ALL_REPGROUPED_COLUMN',
            +        'ALL_REPGROUP_PRIVILEGES', 'ALL_REPGROUP', 'ALL_REPGENOBJECTS',
            +        'ALL_REPGENERATED', 'ALL_REPFLAVORS', 'ALL_REPFLAVOR_OBJECTS',
            +        'ALL_REPFLAVOR_COLUMNS', 'ALL_REPDDL', 'ALL_REPCONFLICT',
            +        'ALL_REPCOLUMN_GROUP', 'ALL_REPCOLUMN', 'ALL_REPCATLOG',
            +        'ALL_REPCAT_USER_PARM_VALUES', 'ALL_REPCAT_USER_AUTHORIZATIONS',
            +        'ALL_REPCAT_TEMPLATE_SITES', 'ALL_REPCAT_TEMPLATE_PARMS',
            +        'ALL_REPCAT_TEMPLATE_OBJECTS', 'ALL_REPCAT_REFRESH_TEMPLATES',
            +        'ALL_REPCAT', 'ALL_REPAUDIT_COLUMN', 'ALL_REPAUDIT_ATTRIBUTE')
            +        ),
            +    'SYMBOLS' => array(
            +        //PL/SQL delimiters (http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96624/02_funds.htm#2732)
            +        '+', '%', "'", '.', '/', '(', ')', ':', ',', '*', '"', '=', '<', '>', '@', ';', '-', ':=', '=>', '||', '**', '<<', '>>', '/*', '*/', '..', '<>', '!=', '~=', '^=', '<=', '>='
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        5 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #00F;',
            +            2 => 'color: #000;',
            +            3 => 'color: #00F;',
            +            4 => 'color: #F00;',
            +            5 => 'color: #800;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #080; font-style: italic;',
            +            'MULTI' => 'color: #080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #00F;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #F00;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #800;'
            +            ),
            +        'METHODS' => array(
            +            0 => 'color: #0F0;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #00F;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            0 => 'color: #0F0;'
            +            )
            +        ),
            +        'URLS' => array(
            +            1 => 'http://www.oracle.com/pls/db92/db92.drilldown?word={FNAMEU}',
            +            2 => 'http://www.oracle.com/pls/db92/db92.drilldown?word={FNAMEU}',
            +            3 => 'http://www.oracle.com/pls/db92/db92.drilldown?word={FNAMEU}',
            +            4 => 'http://www.oracle.com/pls/db92/db92.drilldown?word={FNAMEU}',
            +            5 => 'http://www.oracle.com/pls/db92/db92.drilldown?word={FNAMEU}'
            +            ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(),
            +    'REGEXPS' => array(),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(),
            +    'HIGHLIGHT_STRICT_BLOCK' => array()
            +);
            diff --git a/vendor/easybook/geshi/geshi/postgresql.php b/vendor/easybook/geshi/geshi/postgresql.php
            new file mode 100644
            index 0000000000..c12e0e6675
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/postgresql.php
            @@ -0,0 +1,287 @@
            + 2010-05-03
            + * Copyright: (c) 2007 Christophe Chauvet (http://kryskool.org/), Nigel McNie (http://qbnz.com/highlighter)
            + * Release Version: 1.0.8.11
            + * Date Started: 2007/07/20
            + *
            + * PostgreSQL language file for GeSHi.
            + *
            + * CHANGES
            + * -------
            + * 2007/07/20 (1.0.0)
            + *  -  First Release
            + *
            + * TODO (updated 2007/07/20)
            + * -------------------------
            + *
            + *************************************************************************************
            + *
            + *     This file is part of GeSHi.
            + *
            + *   GeSHi is free software; you can redistribute it and/or modify
            + *   it under the terms of the GNU General Public License as published by
            + *   the Free Software Foundation; either version 2 of the License, or
            + *   (at your option) any later version.
            + *
            + *   GeSHi is distributed in the hope that it will be useful,
            + *   but WITHOUT ANY WARRANTY; without even the implied warranty of
            + *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
            + *   GNU General Public License for more details.
            + *
            + *   You should have received a copy of the GNU General Public License
            + *   along with GeSHi; if not, write to the Free Software
            + *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
            + *
            + ************************************************************************************/
            +
            +$language_data = array (
            +    'LANG_NAME' => 'PostgreSQL',
            +    'COMMENT_SINGLE' => array(1 => '--'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"', '`'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        //Put PostgreSQL reserved keywords here.  I like mine uppercase.
            +        1 => array(
            +            'ABORT','ABSOLUTE','ACCESS','ACTION','ADD','ADMIN','AFTER',
            +            'AGGREGATE','ALL','ALSO','ALTER','ALWAYS','ANALYSE','ANALYZE','AND',
            +            'ANY','AS','ASC,','ASSERTION','ASSIGNMENT','ASYMMETRIC','AT',
            +            'AUTHORIZATION','BACKWARD','BEFORE','BEGIN','BETWEEN','BOTH','BY',
            +            'CACHE','CALLED','CASCADE','CASCADED','CASE','CAST','CATALOG',
            +            'CHAIN','CHARACTERISTICS','CHECK','CHECKPOINT','CLASS','CLOSE',
            +            'CLUSTER','COALESCE','COLLATE','COLUMN','COMMENT','COMMIT',
            +            'COMMITTED','CONCURRENTLY','CONFIGURATION','CONNECTION',
            +            'CONSTRAINT','CONSTRAINTS','CONTENT','CONTINUE','CONVERSION','COPY',
            +            'COST','CREATE','CREATEDB','CREATEROLE','CREATEUSER','CROSS','CSV',
            +            'CURRENT','CURRENT_CATALOG','CURRENT_DATE','CURRENT_ROLE',
            +            'CURRENT_SCHEMA','CURRENT_TIME','CURRENT_TIMESTAMP','CURRENT_USER',
            +            'CURSOR','CYCLE','DATA','DATABASE','DAY','DEALLOCATE','DEC',
            +            'DECLARE','DEFAULT','DEFAULTS','DEFERRABLE','DEFERRED','DEFINER',
            +            'DELETE','DELIMITER','DELIMITERS','DESC','DICTIONARY','DISABLE',
            +            'DISCARD','DISTINCT','DO','DOCUMENT','DOMAIN','DOUBLE','DROP',
            +            'EACH','ELSE','ENABLE','ENCODING','ENCRYPTED','END','ESCAPE',
            +            'EXCEPT','EXCLUDING','EXCLUSIVE','EXECUTE','EXISTS','EXPLAIN',
            +            'EXTERNAL','EXTRACT','FALSE','FAMILY','FETCH','FIRST','FOLLOWING',
            +            'FOR','FORCE','FOREIGN','FORWARD','FREEZE','FROM','FULL','FUNCTION',
            +            'GLOBAL','GRANT','GRANTED','GREATEST','GROUP','HANDLER','HAVING',
            +            'HEADER','HOLD','HOUR','IDENTITY','IF','ILIKE','IMMEDIATE',
            +            'IMMUTABLE','IMPLICIT','IN','INCLUDING','INCREMENT','INDEX',
            +            'INDEXES','INHERIT','INHERITS','INITIALLY','INNER','INOUT','INPUT',
            +            'INSENSITIVE','INSERT','INSTEAD','INTERSECT','INTO','INVOKER','IS',
            +            'ISNULL','ISOLATION','JOIN','KEY','LANCOMPILER','LANGUAGE','LARGE',
            +            'LAST','LC_COLLATE','LC_CTYPE','LEADING','LEAST','LEFT','LEVEL',
            +            'LIKE','LIMIT','LISTEN','LOAD','LOCAL','LOCALTIME','LOCALTIMESTAMP',
            +            'LOCATION','LOCK','LOGIN','LOOP','MAPPING','MATCH','MAXVALUE',
            +            'MINUTE','MINVALUE','MODE','MONTH','MOVE','NAME','NAMES','NATIONAL',
            +            'NATURAL','NEW','NEXT','NO','NOCREATEDB','NOCREATEROLE',
            +            'NOCREATEUSER','NOINHERIT','NOLOGIN','NONE','NOSUPERUSER','NOT',
            +            'NOTHING','NOTIFY','NOTNULL','NOWAIT','NULL','NULLIF','NULLS',
            +            'NUMERIC','OBJECT','OF','OFF','OFFSET','OIDS','OLD','ON','ONLY',
            +            'OPERATOR','OPTION','OPTIONS','OR','ORDER','OUT','OUTER','OVER',
            +            'OVERLAPS','OVERLAY','OWNED','OWNER','PARSER','PARTIAL','PARTITION',
            +            'PASSWORD','PLACING','PLANS','POSITION','PRECEDING','PRECISION',
            +            'PREPARE','PREPARED','PRESERVE','PRIMARY','PRIOR','PRIVILEGES',
            +            'PROCEDURAL','PROCEDURE','QUOTE','RANGE','READ','REASSIGN',
            +            'RECHECK','RECURSIVE','REFERENCES','REINDEX','RELATIVE','RELEASE',
            +            'RENAME','REPEATABLE','REPLACE','REPLICA','RESET','RESTART',
            +            'RESTRICT','RETURN','RETURNING','RETURNS','REVOKE','RIGHT','ROLE',
            +            'ROLLBACK','ROW','ROWS','RULE','SAVEPOINT','SCHEMA','SCROLL',
            +            'SEARCH','SECOND',
            +            'SECURITY','SELECT','SEQUENCE','SERIALIZABLE','SERVER','SESSION',
            +            'SESSION_USER','SET','SETOF','SHARE','SHOW','SIMILAR','SIMPLE',
            +            'SOME','STABLE','STANDALONE','START','STATEMENT','STATISTICS',
            +            'STDIN','STDOUT','STORAGE','STRICT','STRIP','SUPERUSER',
            +            'SYMMETRIC','SYSID','SYSTEM','TABLE','TABLESPACE','TEMP','TEMPLATE',
            +            'TEMPORARY','THEN','TO','TRAILING','TRANSACTION','TREAT','TRIGGER',
            +            'TRUE','TRUNCATE','TRUSTED','TYPE','UNBOUNDED','UNCOMMITTED',
            +            'UNENCRYPTED','UNION','UNIQUE','UNKNOWN','UNLISTEN','UNTIL',
            +            'UPDATE','USER','USING','VACUUM','VALID','VALIDATOR','VALUE',
            +            'VALUES','VARIADIC','VERBOSE','VERSION','VIEW','VOLATILE','WHEN',
            +            'WHERE','WHILE','WHITESPACE','WINDOW','WITH','WITHOUT','WORK','WRAPPER',
            +            'WRITE','XMLATTRIBUTES','XMLCONCAT','XMLELEMENT','XMLFOREST',
            +            'XMLPARSE','XMLPI','XMLROOT','XMLSERIALIZE','YEAR','YES','ZONE'
            +            ),
            +
            +        //Put functions here
            +        3 => array(
            +            // mathematical functions
            +            'ABS','CBRT','CEIL','CEILING','DEGREES','DIV','EXP','FLOOR','LN',
            +            'LOG','MOD','PI','POWER','RADIANS','RANDOM','ROUND','SETSEED',
            +            'SIGN','SQRT','TRUNC','WIDTH_BUCKET',
            +            // trigonometric functions
            +            'ACOS','ASIN','ATAN','ATAN2','COS','COT','SIN','TAN',
            +            // string functions
            +            'BIT_LENGTH','CHAR_LENGTH','CHARACTER_LENGTH','LOWER',
            +            'OCTET_LENGTH','POSITION','SUBSTRING','TRIM','UPPER',
            +            // other string functions
            +            'ASCII','BTRIM','CHR','CONVERT','CONVERT_FROM','CONVERT_TO',
            +            'DECODE','ENCODE','INITCAP','LENGTH','LPAD','LTRIM','MD5',
            +            'PG_CLIENT_ENCODING','QUOTE_IDENT','QUOTE_LITERAL','QUOTE_NULLABLE',
            +            'REGEXP_MATCHES','REGEXP_REPLACE','REGEXP_SPLIT_TO_ARRAY',
            +            'REGEXP_SPLIT_TO_TABLE','REPEAT','RPAD','RTRIM','SPLIT_PART',
            +            'STRPOS','SUBSTR','TO_ASCII','TO_HEX','TRANSLATE',
            +            // binary string functions
            +            'GET_BIT','GET_BYTE','SET_BIT','SET_BYTE',
            +            // data type formatting functions
            +            'TO_CHAR','TO_DATE','TO_NUMBER','TO_TIMESTAMP',
            +            // date/time functions
            +            'AGE','CLOCK_TIMESTAMP','DATE_PART','DATE_TRUNC','EXTRACT',
            +            'ISFINITE','JUSTIFY_DAYS','JUSTIFY_HOURS','JUSTIFY_INTERVAL','NOW',
            +            'STATEMENT_TIMESTAMP','TIMEOFDAY','TRANSACTION_TIMESTAMP',
            +            // enum support functions
            +            'ENUM_FIRST','ENUM_LAST','ENUM_RANGE',
            +            // geometric functions
            +            'AREA','CENTER','DIAMETER','HEIGHT','ISCLOSED','ISOPEN','NPOINTS',
            +            'PCLOSE','POPEN','RADIUS','WIDTH',
            +            'BOX','CIRCLE','LSEG','PATH','POINT','POLYGON',
            +            // cidr and inet functions
            +            'ABBREV','BROADCAST','FAMILY','HOST','HOSTMASK','MASKLEN','NETMASK',
            +            'NETWORK','SET_MASKLEN',
            +            // text search functions
            +            'TO_TSVECTOR','SETWEIGHT','STRIP','TO_TSQUERY','PLAINTO_TSQUERY',
            +            'NUMNODE','QUERYTREE','TS_RANK','TS_RANK_CD','TS_HEADLINE',
            +            'TS_REWRITE','GET_CURRENT_TS_CONFIG','TSVECTOR_UPDATE_TRIGGER',
            +            'TSVECTOR_UPDATE_TRIGGER_COLUMN',
            +            'TS_DEBUG','TS_LEXISE','TS_PARSE','TS_TOKEN_TYPE','TS_STAT',
            +            // XML functions
            +            'XMLCOMMENT','XMLCONCAT','XMLELEMENT','XMLFOREST','XMLPI','XMLROOT',
            +            'XMLAGG','XPATH','TABLE_TO_XMLSCHEMA','QUERY_TO_XMLSCHEMA',
            +            'CURSOR_TO_XMLSCHEMA','TABLE_TO_XML_AND_XMLSCHEMA',
            +            'QUERY_TO_XML_AND_XMLSCHEMA','SCHEMA_TO_XML','SCHEMA_TO_XMLSCHEMA',
            +            'SCHEMA_TO_XML_AND_XMLSCHEMA','DATABASE_TO_XML',
            +            'DATABASE_TO_XMLSCHEMA','DATABASE_TO_XML_AND_XMLSCHEMA',
            +            // sequence manipulating functions
            +            'CURRVAL','LASTVAL','NEXTVAL','SETVAL',
            +            // conditional expressions
            +            'COALESCE','NULLIF','GREATEST','LEAST',
            +            // array functions
            +            'ARRAY_APPEND','ARRAY_CAT','ARRAY_NDIMS','ARRAY_DIMS','ARRAY_FILL',
            +            'ARRAY_LENGTH','ARRAY_LOWER','ARRAY_PREPEND','ARRAY_TO_STRING',
            +            'ARRAY_UPPER','STRING_TO_ARRAY','UNNEST',
            +            // aggregate functions
            +            'ARRAY_AGG','AVG','BIT_AND','BIT_OR','BOOL_AND','BOOL_OR','COUNT',
            +            'EVERY','MAX','MIN','STRING_AGG','SUM',
            +            // statistic aggregate functions
            +            'CORR','COVAR_POP','COVAR_SAMP','REGR_AVGX','REGR_AVGY',
            +            'REGR_COUNT','REGR_INTERCEPT','REGR_R2','REGR_SLOPE','REGR_SXX',
            +            'REGR_SXY','REGR_SYY','STDDEV','STDDEV_POP','STDDEV_SAMP',
            +            'VARIANCE','VAR_POP','VAR_SAMP',
            +            // window functions
            +            'ROW_NUMBER','RANK','DENSE_RANK','PERCENT_RANK','CUME_DIST','NTILE',
            +            'LAG','LEAD','FIRST_VALUE','LAST_VALUE','NTH_VALUE',
            +            // set returning functions
            +            'GENERATE_SERIES','GENERATE_SUBSCRIPTS'
            +            // system information functions not currently included
            +            ),
            +
            +        //Put your postgresql var
            +        4 => array(
            +            'client_encoding',
            +            'standard_conforming_strings'
            +            ),
            +
            +        //Put your data types here
            +        5 => array(
            +            'ARRAY','ABSTIME','BIGINT','BIGSERIAL','BINARY','BIT','BIT VARYING',
            +            'BOOLEAN','BOX','BYTEA','CHAR','CHARACTER','CHARACTER VARYING',
            +            'CIDR','CIRCLE','DATE','DECIMAL','DOUBLE PRECISION','ENUM','FLOAT',
            +            'INET','INT','INTEGER','INTERVAL','NCHAR','REAL','SMALLINT','TEXT',
            +            'TIME','TIMESTAMP','VARCHAR','XML',
            +            ),
            +
            +        //        //Put your package names here
            +        //        6 => array(
            +        //            ),
            +
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '=', '<', '>', '|'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        3 => false,
            +        4 => false,
            +        5 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            // regular keywords
            +            1 => 'color: #000000; font-weight: bold; text-transform: uppercase;',
            +            // inbuilt functions
            +            3 => 'color: #333399; font-weight: bold; text-transform: uppercase;',
            +            // postgresql var(?)
            +            4 => 'color: #993333; font-weight: bold; text-transform: uppercase;',
            +            // data types
            +            5 => 'color: #993333; font-weight: bold; text-transform: uppercase;',
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;',
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #ff0000;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        3 => '',
            +        4 => 'http://paste.postgresql.fr/wiki/desc.php?def={FNAME}',
            +        5 => '',
            +        ),
            +
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            1 => array(
            +                'DISALLOWED_AFTER' => '(?![\(\w])'
            +                ),
            +
            +            3 => array(
            +                'DISALLOWED_AFTER' => '(?=\()'
            +                ),
            +
            +            4 => array(
            +                'DISALLOWED_AFTER' => '(?![\(\w])'
            +                ),
            +
            +            5 => array(
            +                'DISALLOWED_AFTER' => '(?![\(\w])'
            +                ),
            +            )
            +        )
            +
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/povray.php b/vendor/easybook/geshi/geshi/povray.php
            new file mode 100644
            index 0000000000..83411b6bf8
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/povray.php
            @@ -0,0 +1,199 @@
            + 'POVRAY',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'yes', 'wrinkles', 'wood', 'width', 'waves', 'water_level', 'warp', 'vturbulence',
            +            'vstr', 'vrotate', 'vnormalize', 'vlength', 'vcross', 'vaxis_rotate', 'variance', 'v_steps',
            +            'uv_mapping', 'utf8', 'use_index', 'use_colour', 'use_color', 'use_alpha', 'up', 'undef',
            +            'ultra_wide_angle', 'u_steps', 'type', 'turbulence', 'turb_depth', 'ttf', 'true', 'triangle_wave',
            +            'translate', 'transform', 'trace', 'toroidal', 'tolerance', 'tiles', 'tile2', 'tightness',
            +            'tiff', 'threshold', 'thickness', 'tga', 'texture_map', 'target', 'sys', 'sum',
            +            'substr', 'sturm', 'strupr', 'strlwr', 'strength', 'str', 'statistics', 'sqr',
            +            'spotted', 'spotlight', 'split_union', 'spline', 'spiral2', 'spiral1', 'spherical', 'specular',
            +            'spacing', 'solid', 'smooth', 'slope', 'slice', 'sky', 'size', 'sine_wave',
            +            'shadowless', 'scattering', 'scallop_wave', 'scale', 'save_file', 'samples', 'roughness', 'rotate',
            +            'ripples', 'right', 'rgbt', 'rgbft', 'rgbf', 'rgb', 'repeat', 'render',
            +            'refraction', 'reflection_exponent', 'recursion_limit', 'reciprocal', 'ratio', 'ramp_wave', 'radius', 'radial',
            +            'quilted', 'quick_colour', 'quick_color', 'quaternion', 'quadratic_spline', 'pwr', 'projected_through', 'prod',
            +            'pretrace_start', 'pretrace_end', 'precompute', 'precision', 'ppm', 'pow', 'pot', 'poly_wave',
            +            'point_at', 'png', 'planar', 'pigment_pattern', 'pi', 'phong_size', 'phong', 'phase',
            +            'pgm', 'perspective', 'pattern', 'pass_through', 'parallel', 'panoramic', 'orthographic', 'orientation',
            +            'orient', 'open', 'onion', 'once', 'on', 'omnimax', 'omega', 'offset',
            +            'off', 'octaves', 'number_of_waves', 'noise_generator', 'no_shadow', 'no_reflection', 'no_image', 'no_bump_scale',
            +            'no', 'nearest_count', 'natural_spline', 'mortar', 'minimum_reuse', 'min_extent', 'metric', 'method',
            +            'metallic', 'media_interaction', 'media_attenuation', 'media', 'max_trace_level', 'max_trace', 'max_sample', 'max_iteration',
            +            'max_intersections', 'max_gradient', 'max_extent', 'matrix', 'material_map', 'marble', 'map_type', 'mandel',
            +            'major_radius', 'magnet', 'low_error_factor', 'look_at', 'location', 'load_file', 'linear_sweep', 'linear_spline',
            +            'leopard', 'lambda', 'julia', 'jpeg', 'jitter', 'irid_wavelength', 'ior', 'inverse',
            +            'intervals', 'interpolate', 'internal', 'inside_vector', 'inside', 'initial_frame', 'initial_clock', 'image_width',
            +            'image_pattern', 'image_height', 'iff', 'hypercomplex', 'hollow', 'hierarchy', 'hf_gray_16', 'hexagon',
            +            'gray_threshold', 'granite', 'gradient', 'global_lights', 'gif', 'gather', 'fresnel', 'frequency',
            +            'frame_number', 'form', 'fog_type', 'fog_offset', 'fog_alt', 'focal_point', 'flip', 'flatness',
            +            'fisheye', 'final_frame', 'final_clock', 'false', 'falloff_angle', 'falloff', 'fade_power', 'fade_distance',
            +            'fade_colour', 'fade_color', 'facets', 'extinction', 'exterior', 'exponent', 'expand_thresholds', 'evaluate',
            +            'error_bound', 'emission', 'eccentricity', 'double_illuminate', 'distance', 'dist_exp', 'dispersion_samples', 'dispersion',
            +            'direction', 'diffuse', 'df3', 'dents', 'density_map', 'density_file', 'density', 'cylindrical',
            +            'cutaway_textures', 'cubic_wave', 'cubic_spline', 'cube', 'crand', 'crackle', 'count', 'coords',
            +            'control1', 'control0', 'conserve_energy', 'conic_sweep', 'confidence', 'concat', 'composite', 'component',
            +            'colour_map', 'colour', 'color', 'collect', 'clock_on', 'clock_delta', 'clock', 'circular',
            +            'chr', 'checker', 'charset', 'cells', 'caustics', 'bumps', 'bump_size', 'brilliance',
            +            'brightness', 'brick_size', 'brick', 'bozo', 'boxed', 'blur_samples', 'black_hole', 'bezier_spline',
            +            'b_spline', 'average', 'autostop', 'assumed_gamma', 'ascii', 'array', 'area_light', 'arc_angle',
            +            'append', 'aperture', 'angle', 'ambient_light', 'ambient', 'always_sample', 'altitude', 'alpha',
            +            'all_intersections', 'all', 'agate_turb', 'agate', 'adc_bailout', 'adaptive', 'accuracy', 'absorption',
            +            'aa_threshold', 'aa_level', 'reflection'
            +            ),
            +        2 => array(
            +            'abs', 'acos', 'acosh', 'asc', 'asin', 'asinh', 'atan', 'atanh',
            +            'atan2', 'ceil', 'cos', 'cosh', 'defined', 'degrees', 'dimensions', 'dimension_size',
            +            'div', 'exp', 'file_exists', 'floor', 'int', 'ln', 'log', 'max',
            +            'min', 'mod', 'pov', 'radians', 'rand', 'seed', 'select', 'sin',
            +            'sinh', 'sqrt', 'strcmp', 'strlen', 'tan', 'tanh', 'val', 'vdot',
            +            'vlenght',
            +            ),
            +        3 => array (
            +            'x', 'y', 'z', 't', 'u', 'v', 'red', 'blue',
            +            'green', 'filter', 'transmit', 'gray', 'e',
            +            ),
            +        4 => array (
            +            'camera', 'background', 'fog', 'sky_sphere', 'rainbow', 'global_settings', 'radiosity', 'photon',
            +            'object', 'blob', 'sphere', 'cylinder', 'box', 'cone', 'height_field', 'julia_fractal',
            +            'lathe', 'prism', 'sphere_sweep', 'superellipsoid', 'sor', 'text', 'torus', 'bicubic_patch',
            +            'disc', 'mesh', 'triangle', 'smooth_triangle', 'mesh2', 'vertex_vectors', 'normal_vectors', 'uv_vectors',
            +            'texture_list', 'face_indices', 'normal_indices', 'uv_indices', 'texture', 'polygon', 'plane', 'poly',
            +            'cubic', 'quartic', 'quadric', 'isosurface', 'function', 'contained_by', 'parametric', 'pigment',
            +            'union', 'intersection', 'difference', 'merge', 'light_source', 'looks_like', 'light_group', 'clipped_by',
            +            'bounded_by', 'interior', 'material', 'interior_texture', 'normal', 'finish', 'color_map', 'pigment_map',
            +            'image_map', 'bump_map', 'slope_map', 'normal_map', 'irid', 'photons',
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '[', ']', '{', '}', '!',
            +        '@', '%', '&', '*', '|', '/', '<',
            +        '>', '+', '-', '.', '=', '<=', '>=',
            +        '!=',
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #a63123;',
            +            2 => 'color: #2312bc;',
            +            3 => 'color: #cc1122; font-weight: bold;',
            +            4 => 'color: #116688; font-weight: bold;',
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;',
            +//            2 => 'color: #808080; font-style: italic;',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66aa;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #006600;',
            +            2 => 'color: #006600;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #6666cc; font-weight: bold;',
            +            1 => 'color: #66cc66; font-weight: bold;',
            +            2 => 'color: #66cc66; font-weight: bold;'
            +            ),
            +        'SCRIPT' => array(
            +            0 => '',
            +            1 => '',
            +            2 => '',
            +            3 => ''
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        # normal hash lines
            +        0 => '\#(?!(include|declare|local|fopen|fclose|read|write|default|version|if|else|end|ifdef|ifndef|switch|case|range|break|while|debug|error|warning|macro) )[[:word:]]*',
            +        # syntax functions hash thingis
            +        1 => "\#(include|declare|local|fopen|fclose|read|write|default|version|if|else|end|ifdef|ifndef|switch|case|range|break|while|debug|error|warning|macro)",
            +        2 => array(
            +            GESHI_SEARCH  => "([a-zA-Z]+)(\n)(.*)(\n)(\\1;?)",
            +            GESHI_REPLACE => '\3',
            +            GESHI_BEFORE => '\1\2',
            +            GESHI_AFTER => '\4\5',
            +            GESHI_MODIFIERS => 'siU'
            +            )
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_MAYBE,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        0 => true,
            +        1 => true,
            +        2 => true,
            +        3 => true
            +        ),
            +    'TAB_WIDTH' => 4
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/powerbuilder.php b/vendor/easybook/geshi/geshi/powerbuilder.php
            new file mode 100644
            index 0000000000..a055953475
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/powerbuilder.php
            @@ -0,0 +1,417 @@
            + 'PowerBuilder',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '~',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'alias', 'and', 'autoinstantiate', 'call',
            +            'case', 'catch', 'choose', 'close', 'commit', 'connect',
            +            'constant', 'continue', 'create', 'cursor', 'declare',
            +            'delete', 'describe', 'descriptor', 'destroy', 'disconnect',
            +            'do', 'dynamic', 'else', 'elseif', 'end', 'enumerated',
            +            'event', 'execute', 'exit', 'external', 'false', 'fetch',
            +            'first', 'for', 'forward', 'from', 'function', 'global',
            +            'goto', 'halt', 'if', 'immediate', 'indirect', 'insert',
            +            'into', 'intrinsic', 'is', 'last', 'library', 'loop', 'next',
            +            'not', 'of', 'on', 'open', 'or', 'parent', 'post', 'prepare',
            +            'prior', 'private', 'privateread', 'privatewrite', 'procedure',
            +            'protected', 'protectedread', 'protectedwrite', 'prototypes',
            +            'public', 'readonly', 'ref', 'return', 'rollback', 'rpcfunc',
            +            'select', 'selectblob', 'shared', 'static', 'step', 'subroutine',
            +            'super', 'system', 'systemread', 'systemwrite', 'then', 'this',
            +            'to', 'trigger', 'true', 'try', 'type', 'until', 'update', 'updateblob',
            +            'using', 'variables', 'where', 'while', 'with', 'within'
            +            ),
            +        2 => array (
            +            'blob', 'boolean', 'char', 'character', 'date', 'datetime',
            +            'dec', 'decimal',
            +            'double', 'int', 'integer', 'long', 'real', 'string', 'time',
            +            'uint', 'ulong', 'unsignedint', 'unsignedinteger', 'unsignedlong'
            +            ),
            +        3 => array (
            +            'abortretryignore!', 'actbegin!', 'acterror!', 'actesql!',
            +            'actgarbagecollect!', 'activate!', 'activatemanually!',
            +            'activateondoubleclick!',
            +            'activateongetfocus!', 'actline!', 'actobjectcreate!', 'actobjectdestroy!',
            +            'actprofile!', 'actroutine!', 'acttrace!', 'actual!',
            +            'actuser!', 'adoresultset!', 'adtdate!', 'adtdatetime!',
            +            'adtdefault!', 'adtdouble!', 'adttext!', 'adttime!',
            +            'aix!', 'alignatbottom!', 'alignatleft!', 'alignatright!',
            +            'alignattop!', 'all!', 'allowpartialchanges!', 'alpha!',
            +            'ansi!', 'any!', 'anycase!', 'anyfont!',
            +            'append!', 'application!', 'arabiccharset!', 'area3d!',
            +            'areagraph!', 'arraybounds!', 'arrow!', 'ascending!',
            +            'asstatement!', 'atbottom!', 'atleft!', 'atright!',
            +            'attop!', 'autosize!', 'background!', 'balticcharset!',
            +            'bar3dgraph!', 'bar3dobjgraph!', 'bargraph!', 'barstack3dobjgraph!',
            +            'barstackgraph!', 'bdiagonal!', 'beam!', 'begin!',
            +            'begindrag!', 'beginlabeledit!', 'beginrightdrag!', 'behind!',
            +            'blob!', 'bold!', 'boolean!', 'bottom!',
            +            'boundedarray!', 'box!', 'byreferenceargument!', 'byvalueargument!',
            +            'cancel!', 'cascade!', 'cascaded!', 'category!',
            +            'center!', 'character!', 'charsetansi!', 'charsetansiarabic!',
            +            'charsetansihebrew!', 'charsetdbcsjapanese!', 'charsetunicode!', 'checkbox!',
            +            'child!', 'childtreeitem!', 'chinesebig5!', 'classdefinition!',
            +            'classdefinitionobject!', 'classorstructuretype!', 'clicked!', 'clip!',
            +            'clipboard!', 'clipformatbitmap!', 'clipformatdib!', 'clipformatdif!',
            +            'clipformatenhmetafile!', 'clipformathdrop!', 'clipformatlocale!',
            +            'clipformatmetafilepict!',
            +            'clipformatoemtext!', 'clipformatpalette!', 'clipformatpendata!', 'clipformatriff!',
            +            'clipformatsylk!', 'clipformattext!', 'clipformattiff!', 'clipformatunicodetext!',
            +            'clipformatwave!', 'clock!', 'close!', 'closequery!',
            +            'col3dgraph!', 'col3dobjgraph!', 'colgraph!',
            +            'colstack3dobjgraph!', 'colstackgraph!', 'columnclick!', 'commandbutton!',
            +            'connection!', 'connectioninfo!', 'connectobject!', 'connectprivilege!',
            +            'connectwithadminprivilege!', 'constructor!', 'containsany!', 'containsembeddedonly!',
            +            'containslinkedonly!', 'contextinformation!', 'contextkeyword!', 'continuous!',
            +            'corbaobject!', 'corbaunion!', 'cplusplus!', 'cross!',
            +            'csv!', 'cumulative!', 'cumulativepercent!', 'currenttreeitem!',
            +            'customvisual!', 'dash!', 'dashdot!', 'dashdotdot!',
            +            'data!', 'datachange!', 'datamodified!', 'datastore!',
            +            'datawindow!', 'datawindowchild!', 'date!', 'datemask!',
            +            'datetime!', 'datetimemask!', 'dbase2!', 'dbase3!',
            +            'dberror!', 'deactivate!', 'decimal!', 'decimalmask!',
            +            'decorative!', 'default!', 'defaultcharset!', 'delete!',
            +            'deleteallitems!', 'deleteitem!', 'descending!', 'desktop!',
            +            'destructor!', 'detail!', 'diamond!', 'dif!',
            +            'dirall!', 'dirapplication!', 'dirdatawindow!', 'directionall!',
            +            'directiondown!', 'directionleft!', 'directionright!', 'directionup!',
            +            'dirfunction!', 'dirmenu!', 'dirpipeline!', 'dirproject!',
            +            'dirquery!', 'dirstructure!', 'diruserobject!', 'dirwindow!',
            +            'displayasactivexdocument!', 'displayascontent!', 'displayasicon!', 'dot!',
            +            'double!', 'doubleclicked!', 'dragdrop!', 'dragenter!',
            +            'dragleave!', 'dragobject!', 'dragwithin!', 'drawobject!',
            +            'dropdownlistbox!', 'dropdownpicturelistbox!', 'drophighlighttreeitem!', 'dwobject!',
            +            'dynamicdescriptionarea!', 'dynamicstagingarea!', 'easteuropecharset!', 'editchanged!',
            +            'editmask!', 'editmenu!', 'end!', 'endlabeledit!',
            +            'enterprise!', 'enterpriseonlyfeature!', 'enumeratedtype!', 'enumerationdefinition!',
            +            'enumerationitemdefinition!', 'environment!', 'error!', 'errorlogging!',
            +            'eventnotexisterror!', 'eventwrongprototypeerror!', 'excel!', 'excel5!',
            +            'exceptionfail!', 'exceptionignore!', 'exceptionretry!',
            +            'exceptionsubstitutereturnvalue!',
            +            'exclamation!', 'exclude!', 'exportapplication!', 'exportdatawindow!',
            +            'exportfunction!', 'exportmenu!', 'exportpipeline!', 'exportproject!',
            +            'exportquery!', 'exportstructure!', 'exportuserobject!', 'exportwindow!',
            +            'externalvisual!', 'extobject!', 'failonanyconflict!', 'fdiagonal!',
            +            'featurenotsupportederror!', 'filealreadyopenerror!', 'filecloseerror!',
            +            'fileexists!',
            +            'fileinvalidformaterror!', 'filemenu!', 'filenotopenerror!', 'filenotseterror!',
            +            'filereaderror!', 'filetyperichtext!', 'filetypetext!', 'filewriteerror!',
            +            'filter!', 'first!', 'firstvisibletreeitem!', 'fixed!',
            +            'floating!', 'focusrect!', 'footer!', 'foreground!',
            +            'frombeginning!', 'fromcurrent!', 'fromend!', 'functionobject!',
            +            'gb231charset!', 'getfocus!', 'graph!', 'graphicobject!',
            +            'graxis!', 'grdispattr!', 'greekcharset!', 'groupbox!',
            +            'hand!', 'hangeul!', 'header!', 'hebrewcharset!',
            +            'helpmenu!', 'hide!', 'horizontal!', 'hotlinkalarm!',
            +            'hourglass!', 'hppa!', 'hprogressbar!', 'hpux!',
            +            'hscrollbar!', 'hticksonboth!', 'hticksonbottom!', 'hticksonneither!',
            +            'hticksontop!', 'htmltable!', 'htrackbar!', 'i286!',
            +            'i386!', 'i486!', 'icon!', 'icons!',
            +            'idle!', 'importdatawindow!', 'indent!', 'index!',
            +            'inet!', 'information!', 'inplace!', 'inputfieldselected!',
            +            'insertitem!', 'inside!', 'integer!', 'internetresult!',
            +            'italic!', 'itemchanged!', 'itemchanging!', 'itemcollapsed!',
            +            'itemcollapsing!', 'itemerror!', 'itemexpanded!', 'itemexpanding!',
            +            'itemfocuschanged!', 'itempopulate!', 'jaguarorb!', 'johabcharset!',
            +            'justify!', 'key!', 'key0!', 'key1!',
            +            'key2!', 'key3!', 'key4!', 'key5!',
            +            'key6!', 'key7!', 'key8!', 'key9!',
            +            'keya!', 'keyadd!', 'keyalt!', 'keyapps!',
            +            'keyb!', 'keyback!', 'keybackquote!', 'keybackslash!',
            +            'keyc!', 'keycapslock!', 'keycomma!', 'keycontrol!',
            +            'keyd!', 'keydash!', 'keydecimal!', 'keydelete!',
            +            'keydivide!', 'keydownarrow!', 'keye!', 'keyend!',
            +            'keyenter!', 'keyequal!', 'keyescape!', 'keyf!',
            +            'keyf1!', 'keyf10!', 'keyf11!', 'keyf12!',
            +            'keyf2!', 'keyf3!', 'keyf4!', 'keyf5!',
            +            'keyf6!', 'keyf7!', 'keyf8!', 'keyf9!',
            +            'keyg!', 'keyh!', 'keyhome!', 'keyi!',
            +            'keyinsert!', 'keyj!', 'keyk!', 'keyl!',
            +            'keyleftarrow!', 'keyleftbracket!', 'keyleftbutton!', 'keyleftwindows!',
            +            'keym!', 'keymiddlebutton!', 'keymultiply!', 'keyn!',
            +            'keynull!', 'keynumlock!', 'keynumpad0!', 'keynumpad1!',
            +            'keynumpad2!', 'keynumpad3!', 'keynumpad4!', 'keynumpad5!',
            +            'keynumpad6!', 'keynumpad7!', 'keynumpad8!', 'keynumpad9!',
            +            'keyo!', 'keyp!', 'keypagedown!', 'keypageup!',
            +            'keypause!', 'keyperiod!', 'keyprintscreen!', 'keyq!',
            +            'keyquote!', 'keyr!', 'keyrightarrow!', 'keyrightbracket!',
            +            'keyrightbutton!', 'keyrightwindows!', 'keys!', 'keyscrolllock!',
            +            'keysemicolon!', 'keyshift!', 'keyslash!', 'keyspacebar!',
            +            'keysubtract!', 'keyt!', 'keytab!', 'keyu!',
            +            'keyuparrow!', 'keyv!', 'keyw!', 'keyword!',
            +            'keyx!', 'keyy!', 'keyz!', 'languageafrikaans!',
            +            'languagealbanian!', 'languagearabicalgeria!', 'languagearabicbahrain!',
            +            'languagearabicegypt!',
            +            'languagearabiciraq!', 'languagearabicjordan!', 'languagearabickuwait!',
            +            'languagearabiclebanon!',
            +            'languagearabiclibya!', 'languagearabicmorocco!', 'languagearabicoman!',
            +            'languagearabicqatar!',
            +            'languagearabicsaudiarabia!', 'languagearabicsyria!', 'languagearabictunisia!',
            +            'languagearabicuae!',
            +            'languagearabicyemen!', 'languagebasque!', 'languagebulgarian!', 'languagebyelorussian!',
            +            'languagecatalan!', 'languagechinese!', 'languagechinesehongkong!', 'languagechinesesimplified!',
            +            'languagechinesesingapore!', 'languagechinesetraditional!', 'languagecroatian!', 'languageczech!',
            +            'languagedanish!', 'languagedutch!', 'languagedutchbelgian!', 'languagedutchneutral!',
            +            'languageenglish!', 'languageenglishaustralian!', 'languageenglishcanadian!',
            +            'languageenglishirish!',
            +            'languageenglishnewzealand!', 'languageenglishsouthafrica!', 'languageenglishuk!',
            +            'languageenglishus!',
            +            'languageestonian!', 'languagefaeroese!', 'languagefarsi!', 'languagefinnish!',
            +            'languagefrench!', 'languagefrenchbelgian!', 'languagefrenchcanadian!', 'languagefrenchluxembourg!',
            +            'languagefrenchneutral!', 'languagefrenchswiss!', 'languagegerman!', 'languagegermanaustrian!',
            +            'languagegermanliechtenstein!', 'languagegermanluxembourg!', 'languagegermanneutral!',
            +            'languagegermanswiss!',
            +            'languagegreek!', 'languagehebrew!', 'languagehindi!', 'languagehungarian!',
            +            'languageicelandic!', 'languageindonesian!', 'languageitalian!', 'languageitalianneutral!',
            +            'languageitalianswiss!', 'languagejapanese!', 'languagekorean!', 'languagekoreanjohab!',
            +            'languagelatvian!', 'languagelithuanian!', 'languagemacedonian!', 'languagemaltese!',
            +            'languageneutral!', 'languagenorwegian!', 'languagenorwegianbokmal!', 'languagenorwegiannynorsk!',
            +            'languagepolish!', 'languageportuguese!', 'languageportuguese_brazilian!',
            +            'languageportugueseneutral!',
            +            'languagerhaetoromanic!', 'languageromanian!', 'languageromanianmoldavia!', 'languagerussian!',
            +            'languagerussianmoldavia!', 'languagesami!', 'languageserbian!', 'languageslovak!',
            +            'languageslovenian!', 'languagesorbian!', 'languagesortnative!', 'languagesortunicode!',
            +            'languagespanish!', 'languagespanishcastilian!', 'languagespanishmexican!', 'languagespanishmodern!',
            +            'languagesutu!', 'languageswedish!', 'languagesystemdefault!', 'languagethai!',
            +            'languagetsonga!', 'languagetswana!', 'languageturkish!', 'languageukrainian!',
            +            'languageurdu!', 'languageuserdefault!', 'languagevenda!', 'languagexhosa!',
            +            'languagezulu!', 'last!', 'layer!', 'layered!',
            +            'Left!', 'leftmargin!', 'line!', 'line3d!',
            +            'linear!', 'linecolor!', 'linedown!', 'linegraph!',
            +            'lineleft!', 'linemode!', 'lineright!', 'lineup!',
            +            'linkupdateautomatic!', 'linkupdatemanual!', 'listbox!', 'listview!',
            +            'listviewitem!', 'listviewlargeicon!', 'listviewlist!', 'listviewreport!',
            +            'listviewsmallicon!', 'lockread!', 'lockreadwrite!', 'lockwrite!',
            +            'log10!', 'loge!', 'long!', 'losefocus!',
            +            'lower!', 'lowered!', 'm68000!', 'm68020!',
            +            'm68030!', 'm68040!', 'maccharset!', 'macintosh!',
            +            'mailattach!', 'mailbcc!', 'mailbodyasfile!', 'mailcc!',
            +            'maildownload!', 'mailentiremessage!', 'mailenvelopeonly!', 'mailfiledescription!',
            +            'mailmessage!', 'mailnewsession!', 'mailnewsessionwithdownload!', 'mailole!',
            +            'mailolestatic!', 'mailoriginator!', 'mailrecipient!', 'mailreturnaccessdenied!',
            +            'mailreturnattachmentnotfound!', 'mailreturnattachmentopenfailure!',
            +            'mailreturnattachmentwritefailure!', 'mailreturndiskfull!',
            +            'mailreturnfailure!', 'mailreturninsufficientmemory!', 'mailreturninvalidmessage!',
            +            'mailreturnloginfailure!',
            +            'mailreturnmessageinuse!', 'mailreturnnomessages!', 'mailreturnsuccess!', 'mailreturntexttoolarge!',
            +            'mailreturntoomanyfiles!', 'mailreturntoomanyrecipients!', 'mailreturntoomanysessions!',
            +            'mailreturnunknownrecipient!',
            +            'mailreturnuserabort!', 'mailsession!', 'mailsuppressattachments!', 'mailto!',
            +            'main!', 'maximized!', 'mdi!', 'mdiclient!',
            +            'mdihelp!', 'menu!', 'menucascade!', 'menuitemtypeabout!',
            +            'menuitemtypeexit!', 'menuitemtypehelp!', 'menuitemtypenormal!', 'merge!',
            +            'message!', 'minimized!', 'mips!', 'modelexistserror!',
            +            'modelnotexistserror!', 'modern!', 'modified!', 'mousedown!',
            +            'mousemove!', 'mouseup!', 'moved!', 'multiline!',
            +            'multilineedit!', 'mutexcreateerror!', 'new!', 'newmodified!',
            +            'next!', 'nexttreeitem!', 'nextvisibletreeitem!', 'noborder!',
            +            'noconnectprivilege!', 'nolegend!', 'none!', 'nonvisualobject!',
            +            'normal!', 'nosymbol!', 'notic!', 'notmodified!',
            +            'notopmost!', 'notype!', 'numericmask!', 'objhandle!',
            +            'oem!', 'off!', 'offsite!', 'ok!',
            +            'okcancel!', 'olecontrol!', 'olecustomcontrol!', 'oleobject!',
            +            'olestorage!', 'olestream!', 'oletxnobject!', 'omcontrol!',
            +            'omcustomcontrol!', 'omembeddedcontrol!', 'omobject!', 'omstorage!',
            +            'omstream!', 'open!', 'orb!', 'original!',
            +            'osf1!', 'other!', 'outside!', 'oval!',
            +            'pagedown!', 'pageleft!', 'pageright!', 'pageup!',
            +            'parenttreeitem!', 'pbtocppobject!', 'pentium!', 'percentage!',
            +            'picture!', 'picturebutton!', 'picturehyperlink!', 'picturelistbox!',
            +            'pictureselected!', 'pie3d!', 'piegraph!', 'pipeend!',
            +            'pipeline!', 'pipemeter!', 'pipestart!', 'popup!',
            +            'powerobject!', 'powerpc!', 'powerrs!', 'ppc601!',
            +            'ppc603!', 'ppc604!', 'previewdelete!', 'previewfunctionreselectrow!',
            +            'previewfunctionretrieve!', 'previewfunctionupdate!', 'previewinsert!', 'previewselect!',
            +            'previewupdate!', 'previoustreeitem!', 'previousvisibletreeitem!', 'primary!',
            +            'printend!', 'printfooter!', 'printheader!', 'printpage!',
            +            'printstart!', 'prior!', 'private!', 'process!',
            +            'profilecall!', 'profileclass!', 'profileline!', 'profileroutine!',
            +            'profiling!', 'protected!', 'psreport!', 'public!',
            +            'question!', 'radiobutton!', 'raised!', 'rbuttondown!',
            +            'rbuttonup!', 'read!', 'readonlyargument!', 'real!',
            +            'rectangle!', 'regbinary!', 'regexpandstring!', 'reglink!',
            +            'regmultistring!', 'regstring!', 'regulong!', 'regulongbigendian!',
            +            'remoteexec!', 'remotehotlinkstart!', 'remotehotlinkstop!', 'remoteobject!',
            +            'remoterequest!', 'remotesend!', 'rename!', 'replace!',
            +            'resize!', 'resizeborder!', 'response!', 'resultset!',
            +            'resultsets!', 'retrieveend!', 'retrieverow!', 'retrievestart!',
            +            'retrycancel!', 'richtextedit!', 'Right!', 'rightclicked!',
            +            'rightdoubleclicked!', 'rightmargin!', 'rnddays!', 'rnddefault!',
            +            'rndhours!', 'rndmicroseconds!', 'rndminutes!', 'rndmonths!',
            +            'rndnumber!', 'rndseconds!', 'rndyears!', 'roman!',
            +            'roottreeitem!', 'roundrectangle!', 'routineesql!', 'routineevent!',
            +            'routinefunction!', 'routinegarbagecollection!', 'routineobjectcreation!',
            +            'routineobjectdestruction!',
            +            'routineroot!', 'rowfocuschanged!', 'russiancharset!', 'save!',
            +            'scalartype!', 'scattergraph!', 'script!', 'scriptdefinition!',
            +            'scriptevent!', 'scriptfunction!', 'scrollhorizontal!', 'scrollvertical!',
            +            'selected!', 'selectionchanged!', 'selectionchanging!', 'series!',
            +            'service!', 'shade!', 'shadowbox!', 'shared!',
            +            'sharedobjectcreateinstanceerror!', 'sharedobjectcreatepbsessionerror!',
            +            'sharedobjectexistserror!', 'sharedobjectnotexistserror!',
            +            'shiftjis!', 'show!', 'simpletype!', 'simpletypedefinition!',
            +            'singlelineedit!', 'size!', 'sizenesw!', 'sizens!',
            +            'sizenwse!', 'sizewe!', 'sol2!', 'solid!',
            +            'sort!', 'sourcepblerror!', 'spacing1!', 'spacing15!',
            +            'spacing2!', 'sparc!', 'sqlinsert!', 'sqlpreview!',
            +            'square!', 'sslcallback!', 'sslserviceprovider!', 'statichyperlink!',
            +            'statictext!', 'stgdenynone!', 'stgdenyread!', 'stgdenywrite!',
            +            'stgexclusive!', 'stgread!', 'stgreadwrite!', 'stgwrite!',
            +            'stopsign!', 'straddle!', 'streammode!', 'stretch!',
            +            'strikeout!', 'string!', 'stringmask!', 'structure!',
            +            'stylebox!', 'stylelowered!', 'styleraised!', 'styleshadowbox!',
            +            'subscript!', 'success!', 'superscript!', 'swiss!',
            +            'sylk!', 'symbol!', 'symbolhollowbox!', 'symbolhollowcircle!',
            +            'symbolhollowdiamond!', 'symbolhollowdownarrow!', 'symbolhollowuparrow!', 'symbolplus!',
            +            'symbolsolidbox!', 'symbolsolidcircle!', 'symbolsoliddiamond!', 'symbolsoliddownarrow!',
            +            'symbolsoliduparrow!', 'symbolstar!', 'symbolx!', 'system!',
            +            'systemerror!', 'systemfunctions!', 'systemkey!', 'tab!',
            +            'tabsonbottom!', 'tabsonbottomandtop!', 'tabsonleft!', 'tabsonleftandright!',
            +            'tabsonright!', 'tabsonrightandleft!', 'tabsontop!', 'tabsontopandbottom!',
            +            'text!', 'thaicharset!', 'thread!', 'tile!',
            +            'tilehorizontal!', 'time!', 'timemask!', 'timer!',
            +            'timernone!', 'timing!', 'tobottom!', 'toolbarmoved!',
            +            'top!', 'topic!', 'topmost!', 'totop!',
            +            'traceactivitynode!', 'traceatomic!', 'tracebeginend!', 'traceerror!',
            +            'traceesql!', 'tracefile!', 'tracegarbagecollect!', 'tracegeneralerror!',
            +            'tracein!', 'traceline!', 'tracenomorenodes!', 'tracenotstartederror!',
            +            'traceobject!', 'traceout!', 'traceroutine!', 'tracestartederror!',
            +            'tracetree!', 'tracetreeerror!', 'tracetreeesql!', 'tracetreegarbagecollect!',
            +            'tracetreeline!', 'tracetreenode!', 'tracetreeobject!', 'tracetreeroutine!',
            +            'tracetreeuser!', 'traceuser!', 'transaction!', 'transactionserver!',
            +            'transparent!', 'transport!', 'treeview!', 'treeviewitem!',
            +            'turkishcharset!', 'typeboolean!', 'typecategory!', 'typecategoryaxis!',
            +            'typecategorylabel!', 'typedata!', 'typedate!', 'typedatetime!',
            +            'typedecimal!', 'typedefinition!', 'typedouble!', 'typegraph!',
            +            'typeinteger!', 'typelegend!', 'typelong!', 'typereal!',
            +            'typeseries!', 'typeseriesaxis!', 'typeserieslabel!', 'typestring!',
            +            'typetime!', 'typetitle!', 'typeuint!', 'typeulong!',
            +            'typeunknown!', 'typevalueaxis!', 'typevaluelabel!', 'ultrasparc!',
            +            'unboundedarray!', 'underline!', 'underlined!', 'unsignedinteger!',
            +            'unsignedlong!', 'unsorted!', 'uparrow!', 'updateend!',
            +            'updatestart!', 'upper!', 'userdefinedsort!', 'userobject!',
            +            'variable!', 'variableargument!', 'variablecardinalitydefinition!', 'variabledefinition!',
            +            'variableglobal!', 'variableinstance!', 'variablelocal!', 'variableshared!',
            +            'varlistargument!', 'vbxvisual!', 'vcenter!', 'vertical!',
            +            'vietnamesecharset!', 'viewchange!', 'vprogressbar!', 'vscrollbar!',
            +            'vticksonboth!', 'vticksonleft!', 'vticksonneither!', 'vticksonright!',
            +            'vtrackbar!', 'window!', 'windowmenu!', 'windowobject!',
            +            'windows!', 'windowsnt!', 'wk1!', 'wks!',
            +            'wmf!', 'write!', 'xpixelstounits!', 'xunitstopixels!',
            +            'xvalue!', 'yesno!', 'yesnocancel!', 'ypixelstounits!',
            +            'yunitstopixels!',
            +            'yvalue!',
            +            'zoom!'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +            0 => array('(', ')', '[', ']', '{', '}'),
            +            1 => array('|'),
            +            2 => array('+', '-', '*', '/'),
            +            3 => array('=', '<', '>', '^')
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #008000; font-weight: bold;',
            +            2 => 'color: #990099; font-weight: bold;',
            +            3 => 'color: #330099; font-weight: bold;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #0000ff; font-weight: bold;',
            +            'MULTI' => 'color: #0000ff; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #800000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #330099; font-weight: bold;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #000000;',
            +            1 => 'color: #ffff00; background-color:#993300; font-weight: bold',
            +            2 => 'color: #000000;',
            +            3 => 'color: #000000;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #800000; font-weight: bold;'
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/powershell.php b/vendor/easybook/geshi/geshi/powershell.php
            new file mode 100644
            index 0000000000..f1842cff3d
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/powershell.php
            @@ -0,0 +1,276 @@
            + 'PowerShell',
            +    'COMMENT_SINGLE' => array(1 => '#'),
            +    'COMMENT_MULTI' => array('<#' => '#>'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '`',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            // Cmdlets
            +            'Add-Content', 'Add-History', 'Add-Member', 'Add-PSSnapin', 'Clear-Content', 'Clear-Item',
            +            'Clear-ItemProperty', 'Clear-Variable', 'Compare-Object', 'ConvertFrom-SecureString',
            +            'Convert-Path', 'ConvertTo-Html', 'ConvertTo-SecureString', 'Copy-Item', 'Copy-ItemProperty',
            +            'Export-Alias', 'Export-Clixml', 'Export-Console', 'Export-Csv', 'ForEach-Object',
            +            'Format-Custom', 'Format-List', 'Format-Table', 'Format-Wide', 'Get-Acl', 'Get-Alias',
            +            'Get-AuthenticodeSignature', 'Get-ChildItem', 'Get-Command', 'Get-Content', 'Get-Credential',
            +            'Get-Culture', 'Get-Date', 'Get-EventLog', 'Get-ExecutionPolicy', 'Get-Help', 'Get-History',
            +            'Get-Host', 'Get-Item', 'Get-ItemProperty', 'Get-Location', 'Get-Member',
            +            'Get-PfxCertificate', 'Get-Process', 'Get-PSDrive', 'Get-PSProvider', 'Get-PSSnapin',
            +            'Get-Service', 'Get-TraceSource', 'Get-UICulture', 'Get-Unique', 'Get-Variable',
            +            'Get-WmiObject', 'Group-Object', 'Import-Alias', 'Import-Clixml', 'Import-Csv',
            +            'Invoke-Expression', 'Invoke-History', 'Invoke-Item', 'Join-Path', 'Measure-Command',
            +            'Measure-Object', 'Move-Item', 'Move-ItemProperty', 'New-Alias', 'New-Item',
            +            'New-ItemProperty', 'New-Object', 'New-PSDrive', 'New-Service', 'New-TimeSpan',
            +            'New-Variable', 'Out-Default', 'Out-File', 'Out-Host', 'Out-Null', 'Out-Printer',
            +            'Out-String', 'Pop-Location', 'Push-Location', 'Read-Host', 'Remove-Item',
            +            'Remove-ItemProperty', 'Remove-PSDrive', 'Remove-PSSnapin', 'Remove-Variable', 'Rename-Item',
            +            'Rename-ItemProperty', 'Resolve-Path', 'Restart-Service', 'Resume-Service', 'Select-Object',
            +            'Select-String', 'Set-Acl', 'Set-Alias', 'Set-AuthenticodeSignature', 'Set-Content',
            +            'Set-Date', 'Set-ExecutionPolicy', 'Set-Item', 'Set-ItemProperty', 'Set-Location',
            +            'Set-PSDebug', 'Set-Service', 'Set-TraceSource', 'Set-Variable', 'Sort-Object', 'Split-Path',
            +            'Start-Service', 'Start-Sleep', 'Start-Transcript', 'Stop-Process', 'Stop-Service',
            +            'Stop-Transcript', 'Suspend-Service', 'Tee-Object', 'Test-Path', 'Trace-Command',
            +            'Update-FormatData', 'Update-TypeData', 'Where-Object', 'Write-Debug', 'Write-Error',
            +            'Write-Host', 'Write-Output', 'Write-Progress', 'Write-Verbose', 'Write-Warning'
            +            ),
            +        2 => array(
            +            // Aliases
            +            'ac', 'asnp', 'clc', 'cli', 'clp', 'clv', 'cpi', 'cpp', 'cvpa', 'diff', 'epal', 'epcsv', 'fc',
            +            'fl', 'ft', 'fw', 'gal', 'gc', 'gci', 'gcm', 'gdr', 'ghy', 'gi', 'gl', 'gm',
            +            'gp', 'gps', 'group', 'gsv', 'gsnp', 'gu', 'gv', 'gwmi', 'iex', 'ihy', 'ii', 'ipal', 'ipcsv',
            +            'mi', 'mp', 'nal', 'ndr', 'ni', 'nv', 'oh', 'rdr', 'ri', 'rni', 'rnp', 'rp', 'rsnp', 'rv',
            +            'rvpa', 'sal', 'sasv', 'sc', 'select', 'si', 'sl', 'sleep', 'sort', 'sp', 'spps', 'spsv', 'sv',
            +            'tee', 'write', 'cat', 'cd', 'clear', 'cp', 'h', 'history', 'kill', 'lp', 'ls',
            +            'mount', 'mv', 'popd', 'ps', 'pushd', 'pwd', 'r', 'rm', 'rmdir', 'echo', 'cls', 'chdir',
            +            'copy', 'del', 'dir', 'erase', 'move', 'rd', 'ren', 'set', 'type'
            +            ),
            +        3 => array(
            +            // Reserved words
            +            'break', 'continue', 'do', 'for', 'foreach', 'while', 'if', 'switch', 'until', 'where',
            +            'function', 'filter', 'else', 'elseif', 'in', 'return', 'param', 'throw', 'trap'
            +            ),
            +        4 => array(
            +            // Operators
            +            '-eq', '-ne', '-gt', '-ge', '-lt', '-le', '-ieq', '-ine', '-igt', '-ige', '-ilt', '-ile',
            +            '-ceq', '-cne', '-cgt', '-cge', '-clt', '-cle', '-like', '-notlike', '-match', '-notmatch',
            +            '-ilike', '-inotlike', '-imatch', '-inotmatch', '-clike', '-cnotlike', '-cmatch', '-cnotmatch',
            +            '-contains', '-notcontains', '-icontains', '-inotcontains', '-ccontains', '-cnotcontains',
            +            '-isnot', '-is', '-as', '-replace', '-ireplace', '-creplace', '-and', '-or', '-band', '-bor',
            +            '-not', '-bnot', '-f', '-casesensitive', '-exact', '-file', '-regex', '-wildcard'
            +            ),
            +        5 => array(
            +            // Options
            +            '-Year', '-Wrap', '-Word', '-Width', '-WhatIf', '-Wait', '-View', '-Verbose', '-Verb',
            +            '-Variable', '-ValueOnly', '-Value', '-Unique', '-UFormat', '-TypeName', '-Trace', '-TotalCount',
            +            '-Title', '-TimestampServer', '-TargetObject', '-Syntax', '-SyncWindow', '-Sum', '-String',
            +            '-Strict', '-Stream', '-Step', '-Status', '-Static', '-StartupType', '-Start', '-StackName',
            +            '-Stack', '-SourceId', '-SimpleMatch', '-ShowError', '-Separator', '-SecureString', '-SecureKey',
            +            '-SecondValue', '-SecondsRemaining', '-Seconds', '-Second', '-Scope', '-Root', '-Role',
            +            '-Resolve', '-RemoveListener', '-RemoveFileListener', '-Registered', '-ReferenceObject',
            +            '-Recurse', '-RecommendedAction', '-ReadCount', '-Quiet', '-Query', '-Qualifier', '-PSSnapin',
            +            '-PSProvider', '-PSHost', '-PSDrive', '-PropertyType', '-Property', '-Prompt', '-Process',
            +            '-PrependPath', '-PercentComplete', '-Pattern', '-PathType', '-Path', '-PassThru', '-ParentId',
            +            '-Parent', '-Parameter', '-Paging', '-OutVariable', '-OutBuffer', '-Option', '-OnType', '-Off',
            +            '-Object', '-Noun', '-NoTypeInformation', '-NoQualifier', '-NoNewline', '-NoElement',
            +            '-NoClobber', '-NewName', '-Newest', '-Namespace', '-Name', '-Month', '-Minutes', '-Minute',
            +            '-Minimum', '-Milliseconds', '-Message', '-MemberType', '-Maximum', '-LogName', '-LiteralPath',
            +            '-LiteralName', '-ListenerOption', '-List', '-Line', '-Leaf', '-Last', '-Key', '-ItemType',
            +            '-IsValid', '-IsAbsolute', '-InputObject', '-IncludeEqual', '-IncludeChain', '-Include',
            +            '-IgnoreWhiteSpace', '-Id', '-Hours', '-Hour', '-HideTableHeaders', '-Head', '-GroupBy',
            +            '-Functionality', '-Full', '-Format', '-ForegroundColor', '-Force', '-First', '-FilterScript',
            +            '-Filter', '-FilePath', '-Expression', '-ExpandProperty', '-Expand', '-ExecutionPolicy',
            +            '-ExcludeProperty', '-ExcludeDifferent', '-Exclude', '-Exception', '-Examples', '-ErrorVariable',
            +            '-ErrorRecord', '-ErrorId', '-ErrorAction', '-End', '-Encoding', '-DisplayName', '-DisplayHint',
            +            '-DisplayError', '-DifferenceObject', '-Detailed', '-Destination', '-Description', '-Descending',
            +            '-Depth', '-DependsOn', '-Delimiter', '-Debugger', '-Debug', '-Days', '-Day', '-Date',
            +            '-CurrentOperation', '-Culture', '-Credential', '-Count', '-Container', '-Confirm',
            +            '-ComputerName', '-Component', '-Completed', '-ComObject', '-CommandType', '-Command',
            +            '-Column', '-Class', '-ChildPath', '-Character', '-Certificate', '-CategoryTargetType',
            +            '-CategoryTargetName', '-CategoryReason', '-CategoryActivity', '-Category', '-CaseSensitive',
            +            '-Body', '-BinaryPathName', '-Begin', '-BackgroundColor', '-Average', '-AutoSize', '-Audit',
            +            '-AsString', '-AsSecureString', '-AsPlainText', '-As', '-ArgumentList', '-AppendPath', '-Append',
            +            '-Adjust', '-Activity', '-AclObject'
            +            ),
            +        6 => array(
            +            '_','args','DebugPreference','Error','ErrorActionPreference',
            +            'foreach','Home','Host','Input','LASTEXITCODE','MaximumAliasCount',
            +            'MaximumDriveCount','MaximumFunctionCount','MaximumHistoryCount',
            +            'MaximumVariableCount','OFS','PsHome',
            +            'ReportErrorShowExceptionClass','ReportErrorShowInnerException',
            +            'ReportErrorShowSource','ReportErrorShowStackTrace',
            +            'ShouldProcessPreference','ShouldProcessReturnPreference',
            +            'StackTrace','VerbosePreference','WarningPreference','PWD'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '[', ']', '{', '}', '=', '<', '>', '@', '|', '&', ',', '?',
            +        '+=', '-=', '*=', '/=', '%=', '*', '/', '%', '!', '+', '-', '++', '--'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        5 => false,
            +        6 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #008080; font-weight: bold;',
            +            2 => 'color: #008080; font-weight: bold;',
            +            3 => 'color: #0000FF;',
            +            4 => 'color: #FF0000;',
            +            5 => 'color: #008080; font-style: italic;',
            +            6 => 'color: #000080;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #008000;',
            +            'MULTI' => 'color: #008000;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #008080; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #800000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #804000;'
            +            ),
            +        'METHODS' => array(
            +            0 => 'color: pink;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: pink;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #800080;',
            +            3 => 'color: #008080;',
            +            4 => 'color: #008080;',
            +            5 => 'color: #800000;',
            +            6 => 'color: #000080;'
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => '',
            +        6 => 'about:blank',
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        // special after pipe
            +        3 => array(
            +            GESHI_SEARCH => '(\[)(int|long|string|char|bool|byte|double|decimal|float|single|regex|array|xml|scriptblock|switch|hashtable|type|ref|psobject|wmi|wmisearcher|wmiclass|object)((\[.*\])?\])',
            +            GESHI_REPLACE => '\2',
            +            GESHI_MODIFIERS => 'si',
            +            GESHI_BEFORE => '\1',
            +            GESHI_AFTER => '\3'
            +            ),
            +        // Classes
            +        4 => array(
            +            GESHI_SEARCH => '(\[)(System\.Reflection\.Assembly|System\.Net\.CredentialCache|Microsoft\.SharePoint\.SPFileLevel|Microsoft\.SharePoint\.Publishing\.PublishingWeb|Microsoft\.SharePoint\.Publishing|Microsoft\.SharePoint\.SPWeb)(\])',
            +            GESHI_REPLACE => '\2',
            +            GESHI_MODIFIERS => 'i',
            +            GESHI_BEFORE => '\1',
            +            GESHI_AFTER => '\3'
            +            ),
            +        // Members
            +        // There's about a hundred million of these, add the ones you need as you need them
            +        5 => array (
            +            GESHI_SEARCH => '(::)(ReflectionOnlyLoadFrom|ReflectionOnlyLoad|ReferenceEquals|LoadWithPartialName|LoadFrom|LoadFile|Load|GetExecutingAssembly|GetEntryAssembly|GetCallingAssembly|GetAssembly|Equals|DefaultNetworkCredentials|DefaultCredentials|CreateQualifiedName|Checkout|Draft|Published|IsPublishingWeb)',
            +            GESHI_REPLACE => '\2',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\1',
            +            GESHI_AFTER => ''
            +            ),
            +        // Special variables
            +        6 => array(
            +            GESHI_SEARCH => '(\$)(\$[_\^]?|\?)(?!\w)',
            +            GESHI_REPLACE => '\1\2',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        // variables
            +        //BenBE: Please note that changes here and in Keyword group 6 have to be synchronized in order to work properly.
            +        //This Regexp must only match, if keyword group 6 doesn't. If this assumption fails
            +        //Highlighting of the keywords will be incomplete or incorrect!
            +        0 => "(?)[\\\$](\w+)(?=[^|\w])",
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            4 => array(
            +                'DISALLOWED_AFTER' => '(?![a-zA-Z])',
            +                'DISALLOWED_BEFORE' => ''
            +                ),
            +            6 => array(
            +                'DISALLOWED_BEFORE' => '(?)\$'
            +                )
            +            )
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/proftpd.php b/vendor/easybook/geshi/geshi/proftpd.php
            new file mode 100644
            index 0000000000..bd00fefe1c
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/proftpd.php
            @@ -0,0 +1,373 @@
            + 'ProFTPd configuration',
            +    'COMMENT_SINGLE' => array(1 => '#'),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        /*keywords*/
            +        1 => array(
            +            //mod_auth
            +            'AccessDenyMsg', 'AccessGrantMsg', 'AnonRejectePasswords',
            +            'AnonRequirePassword', 'AuthAliasOnly', 'AuthUsingAlias',
            +            'CreateHome', 'DefaultChdir', 'DefaultRoot', 'GroupPassword',
            +            'LoginPasswordPrompt', 'MaxClients', 'MaxClientsPerClass',
            +            'MaxClientsPerHost', 'MaxClientsPerUser', 'MaxConnectionsPerHost',
            +            'MaxHostsPerUser', 'MaxLoginAttempts', 'RequireValidShell',
            +            'RootLogin', 'RootRevoke', 'TimeoutLogin', 'TimeoutSession',
            +            'UseFtpUsers', 'UserAlias', 'UserDirRoot', 'UserPassword',
            +
            +            //mod_auth_file
            +            'AuthGroupFile', 'AuthUserFile',
            +
            +            //mod_auth_pam
            +            'AuthPAM', 'AuthPAMConfig',
            +
            +            //mod_auth_unix
            +            'PersistentPasswd',
            +
            +            //mod_ban
            +            'BanControlsACLs', 'BanEngine', 'BanLog', 'BanMessage', 'BanOnEvent',
            +            'BanTable',
            +
            +            //mod_cap
            +            'CapabilitiesEngine', 'CapabilitiesSet',
            +
            +            //mod_core
            +            'Allow', 'AllowAll', 'AllowClass', 'AllowFilter',
            +            'AllowForeignAddress', 'AllowGroup', 'AllowOverride',
            +            'AllowRetrieveRestart', 'AllowStoreRestart', 'AllowUser',
            +            'AnonymousGroup', 'AuthOrder', 'Bind', 'CDPath', 'Class', 'Classes',
            +            'CommandBufferSize', 'DebugLevel', 'DefaultAddress',
            +            'DefaultServer', 'DefaultTransferMode', 'DeferWelcome', 'Define',
            +            'Deny', 'DenyAll', 'DenyClass', 'DenyFilter', 'DenyGroup',
            +            'DenyUser', 'DisplayChdir', 'DisplayConnect', 'DisplayFirstChdir',
            +            'DisplayGoAway', 'DisplayLogin', 'DisplayQuit', 'From', 'Group',
            +            'GroupOwner', 'HideFiles', 'HideGroup', 'HideNoAccess', 'HideUser',
            +            'IdentLookups', 'IgnoreHidden', 'Include', 'MasqueradeAddress',
            +            'MaxConnectionRate', 'MaxInstances', 'MultilineRFC2228', 'Order',
            +            'PassivePorts', 'PathAllowFilter', 'PathDenyFilter', 'PidFile',
            +            'Port', 'RLimitCPU', 'RLimitMemory', 'RLimitOpenFiles', 'Satisfy',
            +            'ScoreboardFile', 'ServerAdmin', 'ServerIdent', 'ServerName',
            +            'ServerType', 'SetEnv', 'SocketBindTight', 'SocketOptions',
            +            'SyslogFacility', 'SyslogLevel', 'tcpBackLog', 'tcpNoDelay',
            +            'TimeoutIdle', 'TimeoutLinger', 'TimesGMT', 'TransferLog', 'Umask',
            +            'UnsetEnv', 'UseIPv6', 'User', 'UseReverseDNS', 'UserOwner',
            +            'UseUTF8', 'WtmpLog',
            +
            +            //mod_ctrls_admin
            +            'AdminControlsACLs', 'AdminControlsEngine',
            +
            +            //mod_delay
            +            'DelayEngine', 'DelayTable',
            +
            +            //mod_dynmasq
            +            'DynMasqRefresh',
            +
            +            //mod_exec
            +            'ExecBeforeCommand', 'ExecEngine', 'ExecEnviron', 'ExecLog',
            +            'ExecOnCommand', 'ExecOnConnect', 'ExecOnError', 'ExecOnEvent',
            +            'ExecOnExit', 'ExecOnRestart', 'ExecOptions', 'ExecTimeout',
            +
            +            //mod_ldap
            +            'LDAPAliasDereference', 'LDAPAttr', 'LDAPAuthBinds',
            +            'LDAPDefaultAuthScheme', 'LDAPDefaultGID', 'LDAPDefaultUID',
            +            'LDAPDNInfo', 'LDAPDoAuth', 'LDAPDoGIDLookups',
            +            'LDAPDoQuotaLookups', 'LDAPDoUIDLookups',
            +            'LDAPForceGeneratedHomedir', 'LDAPForceHomedirOnDemand',
            +            'LDAPGenerateHomedir', 'LDAPGenerateHomedirPrefix',
            +            'LDAPGenerateHomedirPrefixNoUsername', 'LDAPHomedirOnDemand',
            +            'LDAPHomedirOnDemandPrefix', 'LDAPHomedirOnDemandPrefixNoUsername',
            +            'LDAPHomedirOnDemandSuffix', 'LDAPNegativeCache',
            +            'LDAPProtocolVersion', 'LDAPQueryTimeout', 'LDAPSearchScope',
            +            'LDAPServer',
            +
            +            //mod_load
            +            'MaxLoad',
            +
            +            //mod_log
            +            'AllowLogSymlinks', 'ExtendedLog', 'LogFormat', 'ServerLog',
            +            'SystemLog',
            +
            +            //mod_ls'
            +            'DirFakeGroup', 'DirFakeMode', 'DirFakeUser', 'ListOptions',
            +            'ShowSymlinks', 'UseGlobbing',
            +
            +            //mod_quotatab
            +            'QuotaDirectoryTally', 'QuotaDisplayUnits', 'QuotaEngine',
            +            'QuotaExcludeFilter', 'QuotaLimitTable', 'QuotaLock', 'QuotaLog',
            +            'QuotaOptions', 'QuotaShowQuotas', 'QuotaTallyTable',
            +
            +            //mod_quotatab_file
            +
            +            //mod_quotatab_ldap
            +
            +            //mod_quotatab_sql
            +
            +            //mod_radius
            +            'RadiusAcctServer', 'RadiusAuthServer', 'RadiusEngine',
            +            'RadiusGroupInfo', 'RadiusLog', 'RadiusNASIdentifier',
            +            'RadiusQuotaInfo', 'RadiusRealm', 'RadiusUserInfo', 'RadiusVendor',
            +
            +            //mod_ratio
            +            'AnonRatio', 'ByteRatioErrMsg', 'CwdRatioMsg', 'FileRatioErrMsg',
            +            'GroupRatio', 'HostRatio', 'LeechRatioMsg', 'RatioFile', 'Ratios',
            +            'RatioTempFile', 'SaveRatios', 'UserRatio',
            +
            +            //mod_readme
            +            'DisplayReadme',
            +
            +            //mod_rewrite
            +            'RewriteCondition', 'RewriteEngine', 'RewriteLock', 'RewriteLog',
            +            'RewriteMap', 'RewriteRule',
            +
            +            //mod_sftp
            +            'SFTPAcceptEnv', 'SFTPAuthMethods', 'SFTPAuthorizedHostKeys',
            +            'SFTPAuthorizedUserKeys', 'SFTPCiphers', 'SFTPClientMatch',
            +            'SFTPCompression', 'SFTPCryptoDevice', 'SFTPDHParamFile',
            +            'SFTPDigests', 'SFTPDisplayBanner', 'SFTPEngine', 'SFTPExtensions',
            +            'SFTPHostKey', 'SFTPKeyBlacklist', 'SFTPKeyExchanges', 'SFTPLog',
            +            'SFTPMaxChannels', 'SFTPOptions', 'SFTPPassPhraseProvider',
            +            'SFTPRekey', 'SFTPTrafficPolicy',
            +
            +            //mod_sftp_pam
            +            'SFTPPAMEngine', 'SFTPPAMOptions', 'SFTPPAMServiceName',
            +
            +            //mod_sftp_sql
            +
            +            //mod_shaper
            +            'ShaperAll', 'ShaperControlsACLs', 'ShaperEngine', 'ShaperLog',
            +            'ShaperSession', 'ShaperTable',
            +
            +            //mod_sql
            +            'SQLAuthenticate', 'SQLAuthTypes', 'SQLBackend', 'SQLConnectInfo',
            +            'SQLDefaultGID', 'SQLDefaultHomedir', 'SQLDefaultUID', 'SQLEngine',
            +            'SQLGroupInfo', 'SQLGroupWhereClause', 'SQLHomedirOnDemand',
            +            'SQLLog', 'SQLLogFile', 'SQLMinID', 'SQLMinUserGID',
            +            'SQLMinUserUID', 'SQLNamedQuery', 'SQLNegativeCache', 'SQLOptions',
            +            'SQLRatios', 'SQLRatioStats', 'SQLShowInfo', 'SQLUserInfo',
            +            'SQLUserWhereClause',
            +
            +            //mod_sql_passwd
            +            'SQLPasswordEncoding', 'SQLPasswordEngine', 'SQLPasswordSaltFile',
            +            'SQLPasswordUserSalt',
            +
            +            //mod_tls
            +            'TLSCACertificateFile', 'TLSCACertificatePath',
            +            'TLSCARevocationFile', 'TLSCARevocationPath',
            +            'TLSCertificateChainFile', 'TLSCipherSuite', 'TLSControlsACLs',
            +            'TLSCryptoDevice', 'TLSDHParamFile', 'TLSDSACertificateFile',
            +            'TLSDSACertificateKeyFile', 'TLSEngine', 'TLSLog', 'TLSOptions',
            +            'TLSPKCS12File', 'TLSPassPhraseProvider', 'TLSProtocol',
            +            'TLSRandomSeed', 'TLSRenegotiate', 'TLSRequired',
            +            'TLSRSACertificateFile', 'TLSRSACertificateKeyFile',
            +            'TLSSessionCache', 'TLSTimeoutHandshake', 'TLSVerifyClient',
            +            'TLSVerifyDepth', 'TLSVerifyOrder',
            +
            +            //mod_tls_shmcache
            +
            +            //mod_unique_id
            +            'UniqueIDEngine',
            +
            +            //mod_wrap
            +            'TCPAccessFiles', 'TCPAccessSyslogLevels', 'TCPGroupAccessFiles',
            +            'TCPServiceName', 'TCPUserAccessFiles',
            +
            +            //mod_wrap2
            +            'WrapAllowMsg', 'WrapDenyMsg', 'WrapEngine', 'WrapGroupTables',
            +            'WrapLog', 'WrapServiceName', 'WrapTables', 'WrapUserTables',
            +
            +            //mod_wrap2_file
            +
            +            //mod_wrap2_sql
            +
            +            //mod_xfer
            +            'AllowOverwrite', 'DeleteAbortedStores', 'DisplayFileTransfer',
            +            'HiddenStor', 'HiddenStores', 'MaxRetrieveFileSize',
            +            'MaxStoreFileSize', 'StoreUniquePrefix', 'TimeoutNoTransfer',
            +            'TimeoutStalled', 'TransferRate', 'UseSendfile',
            +
            +            //unknown
            +            'ScoreboardPath', 'ScoreboardScrub'
            +            ),
            +        /*keywords 3*/
            +        3 => array(
            +            //mod_core
            +            'Anonymous',
            +            'Class',
            +            'Directory',
            +            'IfDefine',
            +            'IfModule',
            +            'Limit',
            +            'VirtualHost',
            +
            +            //mod_ifsession
            +            'IfClass', 'IfGroup', 'IfUser',
            +
            +            //mod_version
            +            'IfVersion'
            +            ),
            +        /*permissions*/
            +        4 => array(
            +            //mod_core
            +            'ALL',
            +            'CDUP',
            +            'CMD',
            +            'CWD',
            +            'DELE',
            +            'DIRS',
            +            'LOGIN',
            +            'MKD',
            +            'READ',
            +            'RETR',
            +            'RMD',
            +            'RNFR',
            +            'RNTO',
            +            'STOR',
            +            'WRITE',
            +            'XCWD',
            +            'XMKD',
            +            'XRMD',
            +
            +            //mod_copy
            +            'SITE_CPFR', 'SITE_CPTO',
            +
            +            //mod_quotatab
            +            'SITE_QUOTA',
            +
            +            //mod_site
            +            'SITE_HELP', 'SITE_CHMOD', 'SITE_CHGRP',
            +
            +            //mod_site_misc
            +            'SITE_MKDIR', 'SITE_RMDIR', 'SITE_SYMLINK', 'SITE_UTIME',
            +            ),
            +        /*keywords 2*/
            +        2 => array(
            +            'all','on','off','yes','no',
            +            'standalone', 'inetd',
            +            'default', 'auth', 'write',
            +            'internet', 'local', 'limit', 'ip',
            +            'from'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '+', '-'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #00007f;',
            +            2 => 'color: #0000ff;',
            +            3 => 'color: #000000; font-weight:bold;',
            +            4 => 'color: #000080; font-weight:bold;',
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #adadad; font-style: italic;',
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #339933;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #7f007f;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #008000;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => 'http://www.google.com/search?hl=en&q={FNAMEL}+site:www.proftpd.org+inurl:docs&btnI=I%27m%20Feeling%20Lucky',
            +        2 => '',
            +        3 => 'http://www.google.com/search?hl=en&q={FNAMEL}+site:www.proftpd.org+inurl:docs&btnI=I%27m%20Feeling%20Lucky',
            +        4 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'PARSER_CONTROL' => array(
            +        'ENABLE_FLAGS' => array(
            +            'BRACKETS' => GESHI_NEVER,
            +            'SYMBOLS' => GESHI_NEVER
            +        ),
            +        'KEYWORDS' => array(
            +            2 => array(
            +                'DISALLOWED_BEFORE' => '(?<=\s)(? '(?!\+)(?!\w)',
            +            ),
            +            3 => array(
            +                'DISALLOWED_BEFORE' => '(?<=<|<\/)',
            +                'DISALLOWED_AFTER' => '(?=\s|\/|>)',
            +            ),
            +            4 => array(
            +                'DISALLOWED_BEFORE' => '(?<=\s)(? '(?!\+)(?=\/|(?:\s+\w+)*\s*>)',
            +            )
            +        )
            +    )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/progress.php b/vendor/easybook/geshi/geshi/progress.php
            new file mode 100644
            index 0000000000..50a8a6d941
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/progress.php
            @@ -0,0 +1,484 @@
            + 'Progress',
            +    'COMMENT_SINGLE' => array(),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_UPPER,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array (
            +        1 => array(
            +            'ACCUMULATE','APPLY','ASSIGN','BELL','QUERY',
            +            'BUFFER-COMPARE','BUFFER-COPY','CALL','CASE',
            +            'CHOOSE','CLASS','CLOSE QUERY','each','WHERE',
            +            'CLOSE STORED-PROCEDURE','COLOR','COMPILE','CONNECT',
            +            'CONSTRUCTOR','COPY-LOB','CREATE','CREATE ALIAS',
            +            'CREATE BROWSE','CREATE BUFFER','CREATE CALL','CREATE CLIENT-PRINCIPAL',
            +            'CREATE DATABASE','CREATE DATASET','CREATE DATA-SOURCE','CREATE QUERY',
            +            'CREATE SAX-attributeS','CREATE SAX-READER','CREATE SAX-WRITER','CREATE SERVER',
            +            'CREATE SERVER-SOCKET','CREATE SOAP-HEADER','CREATE SOAP-HEADER-ENTRYREF','CREATE SOCKET',
            +            'CREATE TEMP-TABLE','CREATE WIDGET','CREATE widget-POOL','CREATE X-DOCUMENT',
            +            'CREATE X-NODEREF','CURRENT-LANGUAGE','CURRENT-VALUE','DDE ADVISE',
            +            'DDE EXECUTE','DDE GET','DDE INITIATE','DDE REQUEST',
            +            'DDE SEND','DDE TERMINATE','DEFINE BROWSE','DEFINE BUFFER','DEFINE',
            +            'DEFINE BUTTON','DEFINE DATASET','DEFINE DATA-SOURCE','DEFINE FRAME','DEF','VAR',
            +            'DEFINE IMAGE','DEFINE MENU','DEFINE PARAMETER','DEFINE property','PARAM',
            +            'DEFINE QUERY','DEFINE RECTANGLE','DEFINE STREAM','DEFINE SUB-MENU',
            +            'DEFINE TEMP-TABLE','DEFINE WORKFILE','DEFINE WORK-TABLE',
            +            'DELETE','DELETE ALIAS','DELETE object','DELETE PROCEDURE',
            +            'DELETE widget','DELETE widget-POOL','DESTRUCTOR','DICTIONARY',
            +            'DISABLE','DISABLE TRIGGERS','DISCONNECT','DISPLAY',
            +            'DO','DOS','DOWN','DYNAMIC-CURRENT-VALUE',
            +            'ELSE','EMPTY TEMP-TABLE','ENABLE','END',
            +            'ENTRY','FIND','AND',
            +            'FIX-CODEPAGE','FOR','FORM','FRAME-VALUE',
            +            'GET','GET-KEY-VALUE','HIDE','IF',
            +            'IMPORT','INPUT CLEAR','INPUT CLOSE','INPUT FROM','input',
            +            'INPUT THROUGH','INPUT-OUTPUT CLOSE','INPUT-OUTPUT THROUGH',
            +            'INTERFACE','LEAVE','BREAK',
            +            'LOAD-PICTURE','MESSAGE','method','NEXT','prev',
            +            'NEXT-PROMPT','ON','OPEN QUERY','OS-APPEND',
            +            'OS-COMMAND','OS-COPY','OS-CREATE-DIR','OS-DELETE',
            +            'OS-RENAME','OUTPUT CLOSE','OUTPUT THROUGH','OUTPUT TO',
            +            'OVERLAY','PAGE','PAUSE','PROCEDURE',
            +            'PROCESS EVENTS','PROMPT-FOR','PROMSGS','PROPATH',
            +            'PUBLISH','PUT','PUT CURSOR','PUT SCREEN',
            +            'PUT-BITS','PUT-BYTE','PUT-BYTES','PUT-DOUBLE',
            +            'PUT-FLOAT','PUT-INT64','PUT-KEY-VALUE','PUT-LONG',
            +            'PUT-SHORT','PUT-STRING','PUT-UNSIGNED-LONG','PUT-UNSIGNED-SHORT',
            +            'QUIT','RAW-TRANSFER','READKEY','RELEASE',
            +            'RELEASE EXTERNAL','RELEASE object','REPEAT','REPOSITION',
            +            'RUN','RUN STORED-PROCEDURE','RUN SUPER',
            +            'SAVE CACHE','SCROLL','SEEK','SET',
            +            'SET-BYTE-ORDER','SET-POINTER-VALUE','SET-SIZE','SHOW-STATS',
            +            'STATUS','STOP','SUBSCRIBE','SUBSTRING',
            +            'system-DIALOG COLOR','system-DIALOG FONT','system-DIALOG GET-DIR','system-DIALOG GET-FILE',
            +            'system-DIALOG PRINTER-SETUP','system-HELP','THEN','THIS-object',
            +            'TRANSACTION-MODE AUTOMATIC','TRIGGER PROCEDURE','UNDERLINE','UNDO',
            +            'UNIX','UNLOAD','UNSUBSCRIBE','UP','STRING',
            +            'UPDATE','USE','USING','substr','SKIP','CLOSE',
            +            'VIEW','WAIT-FOR','MODULO','NE','AVAIL',
            +            'NOT','OR','&GLOBAL-DEFINE','&IF','UNFORMATTED','NO-PAUSE',
            +            '&THEN','&ELSEIF','&ELSE','&ENDIF','OPEN','NO-WAIT',
            +            '&MESSAGE','&SCOPED-DEFINE','&UNDEFINE','DEFINED',
            +            'BROWSE','BUTTON','COMBO-BOX','CONTROL-FRAME',
            +            'DIALOG-BOX','EDITOR','FIELD-GROUP','FILL-IN',
            +            'FRAME','IMAGE','LITERAL','MENU',
            +            'MENU-ITEM','RADIO-SET','RECTANGLE','SELECTION-LIST',
            +            'SLIDER','SUB-MENU','TEXT','TOGGLE-BOX',
            +            'WINDOW','WITH','AT','OF','EDITING','ON ENDKEY','output',
            +            'ON ERROR','ON QUIT','ON STOP','PRESELECT',
            +            'QUERY-TUNING','SIZE','Trigger','VIEW-AS','ALERT-BOX',
            +            'Buffer','Data-relation','ProDataSet','SAX-attributes',
            +            'SAX-reader','SAX-writer','Server socket','SOAP-fault',
            +            'SOAP-header','SOAP-header-entryref','Socket','Temp-table',
            +            'X-noderef','Height','Left','Top','TO',
            +            'Width','ACTIVE-WINDOW','AUDIT-CONTROL','FIRST','LAST',
            +            'AUDIT-POLICY','CLIPBOARD','CODEBASE-LOCATOR','COLOR-TABLE',
            +            'COMPILER','COM-SELF','DEBUGGER','DEFAULT-WINDOW',
            +            'ERROR-STATUS','FILE-INFO','FOCUS','FONT-TABLE',
            +            'LAST-EVENT','LOG-MANAGER','RCODE-INFO','SECURITY-POLICY',
            +            'SELF','SESSION','SOURCE-PROCEDURE','TARGET-PROCEDURE','NO-LOCK','NO-error',
            +            'THIS-PROCEDURE','WEB-CONTEXT','FUNCTION','RETURNS','NO-UNDO'
            +            ),
            +        2 => array(
            +            'ACCEPT-CHANGES','ACCEPT-ROW-CHANGES','ADD-BUFFER','ADD-CALC-COLUMN',
            +            'ADD-COLUMNS-FROM','ADD-EVENTS-PROCEDURE','ADD-FIELDS-FROM','ADD-FIRST',
            +            'ADD-HEADER-ENTRY','ADD-INDEX-FIELD','ADD-LAST','ADD-LIKE-COLUMN',
            +            'ADD-LIKE-FIELD','ADD-LIKE-INDEX','ADD-NEW-FIELD','ADD-NEW-INDEX',
            +            'ADD-RELATION','ADD-SCHEMA-LOCATION','ADD-SOURCE-BUFFER','ADD-SUPER-PROCEDURE',
            +            'APPEND-CHILD','APPLY-CALLBACK','ATTACH-DATA-SOURCE','AUTHENTICATION-FAILED',
            +            'BEGIN-EVENT-GROUP','BUFFER-CREATE',
            +            'BUFFER-DELETE','BUFFER-RELEASE','BUFFER-VALIDATE',
            +            'CANCEL-BREAK','CANCEL-REQUESTS','CLEAR','CLEAR-APPL-CONTEXT',
            +            'CLEAR-LOG','CLEAR-SELECTION','CLEAR-SORT-ARROWS','CLONE-NODE',
            +            'CLOSE-LOG','CONNECTED','CONVERT-TO-OFFSET',
            +            'COPY-DATASET','COPY-SAX-attributeS','COPY-TEMP-TABLE','CREATE-LIKE',
            +            'CREATE-NODE','CREATE-NODE-NAMESPACE','CREATE-RESULT-LIST-ENTRY','DEBUG',
            +            'DECLARE-NAMESPACE','DELETE-CHAR','DELETE-CURRENT-ROW',
            +            'DELETE-HEADER-ENTRY','DELETE-LINE','DELETE-NODE','DELETE-RESULT-LIST-ENTRY',
            +            'DELETE-SELECTED-ROW','DELETE-SELECTED-ROWS','DESELECT-FOCUSED-ROW','DESELECT-ROWS',
            +            'DESELECT-SELECTED-ROW','DETACH-DATA-SOURCE','DISABLE-CONNECTIONS',
            +            'DISABLE-DUMP-TRIGGERS','DISABLE-LOAD-TRIGGERS','DISPLAY-MESSAGE',
            +            'DUMP-LOGGING-NOW','EDIT-CLEAR','EDIT-COPY','EDIT-CUT',
            +            'EDIT-PASTE','EDIT-UNDO','EMPTY-DATASET','EMPTY-TEMP-TABLE',
            +            'ENABLE-CONNECTIONS','ENABLE-EVENTS','ENCRYPT-AUDIT-MAC-KEY',
            +            'END-DOCUMENT','END-ELEMENT','END-EVENT-GROUP','END-FILE-DROP',
            +            'EXPORT','EXPORT-PRINCIPAL','FETCH-SELECTED-ROW',
            +            'FILL','FIND-BY-ROWID','FIND-CURRENT','FIND-FIRST',
            +            'FIND-LAST','FIND-UNIQUE','GET-attribute','GET-attribute-NODE',
            +            'GET-BINARY-DATA','GET-BLUE-VALUE','GET-BROWSE-COLUMN','GET-BUFFER-HANDLE',
            +            'GET-BYTES-AVAILABLE','GET-CALLBACK-PROC-CONTEXT','GET-CALLBACK-PROC-NAME','GET-CGI-LIST',
            +            'GET-CGI-LONG-VALUE','GET-CGI-VALUE','GET-CHANGES','GET-CHILD',
            +            'GET-CHILD-RELATION','GET-CONFIG-VALUE','GET-CURRENT','GET-DATASET-BUFFER',
            +            'GET-DOCUMENT-ELEMENT','GET-DROPPED-FILE','GET-DYNAMIC','GET-ERROR-COLUMN ',
            +            'GET-ERROR-ROW ','GET-FILE-NAME ','GET-FILE-OFFSET ','GET-FIRST',
            +            'GET-GREEN-VALUE','GET-HEADER-ENTRY','GET-INDEX-BY-NAMESPACE-NAME','GET-INDEX-BY-QNAME',
            +            'GET-ITERATION','GET-LAST','GET-LOCALNAME-BY-INDEX','GET-MESSAGE',
            +            'GET-NEXT','GET-NODE','GET-NUMBER','GET-PARENT',
            +            'GET-PREV','GET-PRINTERS','GET-property','GET-QNAME-BY-INDEX',
            +            'GET-RED-VALUE','GET-RELATION','GET-REPOSITIONED-ROW','GET-RGB-VALUE',
            +            'GET-SELECTED-widget','GET-SERIALIZED','GET-SIGNATURE','GET-SOCKET-OPTION',
            +            'GET-SOURCE-BUFFER','GET-TAB-ITEM','GET-TEXT-HEIGHT-CHARS','GET-TEXT-HEIGHT-PIXELS',
            +            'GET-TEXT-WIDTH-CHARS','GET-TEXT-WIDTH-PIXELS','GET-TOP-BUFFER','GET-TYPE-BY-INDEX',
            +            'GET-TYPE-BY-NAMESPACE-NAME','GET-TYPE-BY-QNAME','GET-URI-BY-INDEX','GET-VALUE-BY-INDEX',
            +            'GET-VALUE-BY-NAMESPACE-NAME','GET-VALUE-BY-QNAME','GET-WAIT-STATE','IMPORT-NODE',
            +            'IMPORT-PRINCIPAL','INCREMENT-EXCLUSIVE-ID','INITIALIZE-DOCUMENT-TYPE',
            +            'INITIATE','INSERT','INSERT-attribute','INSERT-BACKTAB',
            +            'INSERT-BEFORE','INSERT-FILE','INSERT-ROW','INSERT-STRING',
            +            'INSERT-TAB','INVOKE','IS-ROW-SELECTED','IS-SELECTED',
            +            'LIST-property-NAMES','LOAD','LoadControls','LOAD-DOMAINS',
            +            'LOAD-ICON','LOAD-IMAGE','LOAD-IMAGE-DOWN','LOAD-IMAGE-INSENSITIVE',
            +            'LOAD-IMAGE-UP','LOAD-MOUSE-POINTER','LOAD-SMALL-ICON','LOCK-REGISTRATION',
            +            'LOG-AUDIT-EVENT','LOGOUT','LONGCHAR-TO-NODE-VALUE','LOOKUP',
            +            'MEMPTR-TO-NODE-VALUE','MERGE-CHANGES','MERGE-ROW-CHANGES','MOVE-AFTER-TAB-ITEM',
            +            'MOVE-BEFORE-TAB-ITEM','MOVE-COLUMN','MOVE-TO-BOTTOM','MOVE-TO-EOF',
            +            'MOVE-TO-TOP','NODE-VALUE-TO-LONGCHAR','NODE-VALUE-TO-MEMPTR','NORMALIZE',
            +            'QUERY-CLOSE','QUERY-OPEN','QUERY-PREPARE',
            +            'READ','READ-FILE','READ-XML','READ-XMLSCHEMA',
            +            'REFRESH','REFRESH-AUDIT-POLICY','REGISTER-DOMAIN','REJECT-CHANGES',
            +            'REJECT-ROW-CHANGES','REMOVE-attribute','REMOVE-CHILD','REMOVE-EVENTS-PROCEDURE',
            +            'REMOVE-SUPER-PROCEDURE','REPLACE','REPLACE-CHILD','REPLACE-SELECTION-TEXT',
            +            'REPOSITION-BACKWARD','REPOSITION-FORWARD','REPOSITION-TO-ROW','REPOSITION-TO-ROWID',
            +            'RESET','SAVE','SAVE-FILE','SAVE-ROW-CHANGES',
            +            'SAX-PARSE','SAX-PARSE-FIRST','SAX-PARSE-NEXT','SCROLL-TO-CURRENT-ROW',
            +            'SCROLL-TO-ITEM','SCROLL-TO-SELECTED-ROW','SEAL','SEARCH',
            +            'SELECT-ALL','SELECT-FOCUSED-ROW','SELECT-NEXT-ROW','SELECT-PREV-ROW',
            +            'SELECT-ROW','SET-ACTOR','SET-APPL-CONTEXT','SET-attribute',
            +            'SET-attribute-NODE','SET-BLUE-VALUE','SET-BREAK','SET-BUFFERS',
            +            'SET-CALLBACK','SET-CALLBACK-PROCEDURE','SET-CLIENT','SET-COMMIT',
            +            'SET-CONNECT-PROCEDURE','SET-DYNAMIC','SET-GREEN-VALUE','SET-INPUT-SOURCE',
            +            'SET-MUST-UNDERSTAND','SET-NODE','SET-NUMERIC-FORMAT','SET-OUTPUT-DESTINATION',
            +            'SET-PARAMETER','SET-property','SET-READ-RESPONSE-PROCEDURE','SET-RED-VALUE',
            +            'SET-REPOSITIONED-ROW','SET-RGB-VALUE','SET-ROLLBACK','SET-SELECTION',
            +            'SET-SERIALIZED','SET-SOCKET-OPTION','SET-SORT-ARROW','SET-WAIT-STATE',
            +            'START-DOCUMENT','START-ELEMENT','STOP-PARSING','SYNCHRONIZE',
            +            'TEMP-TABLE-PREPARE','UPDATE-attribute','URL-DECODE','URL-ENCODE',
            +            'VALIDATE','VALIDATE-SEAL','WRITE','WRITE-CDATA','USE-INDEX',
            +            'WRITE-CHARACTERS','WRITE-COMMENT','WRITE-DATA-ELEMENT','WRITE-EMPTY-ELEMENT',
            +            'WRITE-ENTITY-REF','WRITE-EXTERNAL-DTD','WRITE-FRAGMENT','WRITE-MESSAGE',
            +            'WRITE-PROCESSING-INSTRUCTION','WRITE-XML','WRITE-XMLSCHEMA','FALSE','true'
            +            ),
            +        3 => array(
            +            'ABSOLUTE','ACCUM','ADD-INTERVAL','ALIAS','mod',
            +            'AMBIGUOUS','ASC','AUDIT-ENABLED','AVAILABLE',
            +            'BASE64-DECODE','BASE64-ENCODE','CAN-DO','CAN-FIND',
            +            'CAN-QUERY','CAN-SET','CAPS','CAST','OS-DIR',
            +            'CHR','CODEPAGE-CONVERT','COMPARE',
            +            'COUNT-OF','CURRENT-CHANGED','CURRENT-RESULT-ROW','DATASERVERS',
            +            'DATA-SOURCE-MODIFIED','DATETIME','DATETIME-TZ',
            +            'DAY','DBCODEPAGE','DBCOLLATION','DBNAME',
            +            'DBPARAM','DBRESTRICTIONS','DBTASKID','DBTYPE',
            +            'DBVERSION','DECIMAL','DECRYPT','DYNAMIC-function',
            +            'DYNAMIC-NEXT-VALUE','ENCODE','ENCRYPT','ENTERED',
            +            'ERROR','ETIME','EXP','ENDKEY','END-error',
            +            'FIRST-OF','FRAME-DB','FRAME-DOWN',
            +            'FRAME-FIELD','FRAME-FILE','FRAME-INDEX','FRAME-LINE',
            +            'GATEWAYS','GENERATE-PBE-KEY','GENERATE-PBE-SALT','GENERATE-RANDOM-KEY',
            +            'GENERATE-UUID','GET-BITS','GET-BYTE','GET-BYTE-ORDER',
            +            'GET-BYTES','GET-CODEPAGE','GET-CODEPAGES','GET-COLLATION',
            +            'GET-COLLATIONS','GET-DOUBLE','GET-FLOAT','GET-INT64',
            +            'GET-LONG','GET-POINTER-VALUE','GET-SHORT','GET-SIZE',
            +            'GET-STRING','GET-UNSIGNED-LONG','GET-UNSIGNED-SHORT','GO-PENDING',
            +            'GUID','HEX-DECODE','INDEX',
            +            'INT64','INTEGER','INTERVAL','IS-ATTR-SPACE',
            +            'IS-CODEPAGE-FIXED','IS-COLUMN-CODEPAGE','IS-LEAD-BYTE','ISO-DATE',
            +            'KBLABEL','KEYCODE','KEYFUNCTION','KEYLABEL',
            +            'KEYWORD','KEYWORD-ALL','LASTKEY',
            +            'LAST-OF','LC','LDBNAME','LEFT-TRIM',
            +            'LIBRARY','LINE-COUNTER','LIST-EVENTS','LIST-QUERY-ATTRS',
            +            'LIST-SET-ATTRS','LIST-widgetS','LOCKED',
            +            'LOGICAL','MAXIMUM','MD5-DIGEST',
            +            'MEMBER','MESSAGE-LINES','MINIMUM','MONTH',
            +            'MTIME','NEW','NEXT-VALUE','SHARED',
            +            'NOT ENTERED','NOW','NUM-ALIASES','NUM-DBS',
            +            'NUM-ENTRIES','NUM-RESULTS','OPSYS','OS-DRIVES',
            +            'OS-ERROR','OS-GETENV','PAGE-NUMBER','PAGE-SIZE',
            +            'PDBNAME','PROC-HANDLE','PROC-STATUS','PROGRAM-NAME',
            +            'PROGRESS','PROVERSION','QUERY-OFF-END','QUOTER',
            +            'RANDOM','RAW','RECID','REJECTED',
            +            'RETRY','RETURN-VALUE','RGB-VALUE',
            +            'RIGHT-TRIM','R-INDEX','ROUND','ROWID','LENGTH',
            +            'SDBNAME','SET-DB-CLIENT','SETUSERID',
            +            'SHA1-DIGEST','SQRT','SUBSTITUTE','VARIABLE',
            +            'SUPER','TERMINAL','TIME','TIMEZONE','external',
            +            'TODAY','TO-ROWID','TRIM','TRUNCATE','return',
            +            'TYPE-OF','USERID','VALID-EVENT','VALID-HANDLE',
            +            'VALID-object','WEEKDAY','YEAR','BEGINS','VALUE',
            +            'EQ','GE','GT','LE','LT','MATCHES','AS','BY','LIKE'
            +            ),
            +        4 => array(
            +            'ACCELERATOR','ACTIVE','ACTOR','ADM-DATA',
            +            'AFTER-BUFFER','AFTER-ROWID','AFTER-TABLE','ALLOW-COLUMN-SEARCHING',
            +            'ALWAYS-ON-TOP','APPL-ALERT-BOXES','APPL-CONTEXT-ID','APPSERVER-INFO',
            +            'APPSERVER-PASSWORD','APPSERVER-USERID','ASYNCHRONOUS','ASYNC-REQUEST-COUNT',
            +            'ASYNC-REQUEST-HANDLE','ATTACHED-PAIRLIST','attribute-NAMES','ATTR-SPACE',
            +            'AUDIT-EVENT-CONTEXT','AUTO-COMPLETION','AUTO-DELETE','AUTO-DELETE-XML',
            +            'AUTO-END-KEY','AUTO-GO','AUTO-INDENT','AUTO-RESIZE',
            +            'AUTO-RETURN','AUTO-SYNCHRONIZE','AUTO-VALIDATE','AUTO-ZAP',
            +            'AVAILABLE-FORMATS','BACKGROUND','BASE-ADE','BASIC-LOGGING',
            +            'BATCH-MODE','BATCH-SIZE','BEFORE-BUFFER','BEFORE-ROWID',
            +            'BEFORE-TABLE','BGCOLOR','BLANK','BLOCK-ITERATION-DISPLAY',
            +            'BORDER-BOTTOM-CHARS','BORDER-BOTTOM-PIXELS','BORDER-LEFT-CHARS','BORDER-LEFT-PIXELS',
            +            'BORDER-RIGHT-CHARS','BORDER-RIGHT-PIXELS','BORDER-TOP-CHARS','BORDER-TOP-PIXELS',
            +            'BOX','BOX-SELECTABLE','BUFFER-CHARS','BUFFER-FIELD',
            +            'BUFFER-HANDLE','BUFFER-LINES','BUFFER-NAME','BUFFER-VALUE',
            +            'BYTES-READ','BYTES-WRITTEN','CACHE','CALL-NAME',
            +            'CALL-TYPE','CANCEL-BUTTON','CANCELLED','CAN-CREATE',
            +            'CAN-DELETE','CAN-READ','CAN-WRITE','CAREFUL-PAINT',
            +            'CASE-SENSITIVE','CENTERED','CHARSET','CHECKED',
            +            'CHILD-BUFFER','CHILD-NUM','CLASS-TYPE','CLIENT-CONNECTION-ID',
            +            'CLIENT-TTY','CLIENT-TYPE','CLIENT-WORKSTATION','CODE',
            +            'CODEPAGE','COLUMN','COLUMN-BGCOLOR','COLUMN-DCOLOR',
            +            'COLUMN-FGCOLOR','COLUMN-FONT','COLUMN-LABEL','COLUMN-MOVABLE',
            +            'COLUMN-PFCOLOR','COLUMN-READ-ONLY','COLUMN-RESIZABLE','COLUMN-SCROLLING',
            +            'COM-HANDLE','COMPLETE','CONFIG-NAME','CONTEXT-HELP',
            +            'CONTEXT-HELP-FILE','CONTEXT-HELP-ID','CONTROL-BOX','CONVERT-3D-COLORS',
            +            'CPCASE','CPCOLL','CPINTERNAL','CPLOG',
            +            'CPPRINT','CPRCODEIN','CPRCODEOUT','CPSTREAM',
            +            'CPTERM','CRC-VALUE','CURRENT-COLUMN','CURRENT-ENVIRONMENT',
            +            'CURRENT-ITERATION','CURRENT-ROW-MODIFIED','CURRENT-WINDOW','CURSOR-CHAR',
            +            'CURSOR-LINE','CURSOR-OFFSET','DATA-ENTRY-RETURN','DATASET',
            +            'DATA-SOURCE','DATA-SOURCE-COMPLETE-MAP','DATA-TYPE','DATE-FORMAT',
            +            'DB-REFERENCES','DCOLOR','DDE-ERROR','DDE-ID',
            +            'DDE-ITEM','DDE-NAME','DDE-TOPIC','DEBLANK',
            +            'DEBUG-ALERT','DECIMALS','DEFAULT','DEFAULT-BUFFER-HANDLE',
            +            'DEFAULT-BUTTON','DEFAULT-COMMIT','DELIMITER','DISABLE-AUTO-ZAP',
            +            'DISPLAY-TIMEZONE','DISPLAY-TYPE','DOMAIN-DESCRIPTION','DOMAIN-NAME',
            +            'DOMAIN-TYPE','DRAG-ENABLED','DROP-TARGET','DYNAMIC',
            +            'EDGE-CHARS','EDGE-PIXELS','EDIT-CAN-PASTE','EDIT-CAN-UNDO',
            +            'EMPTY','ENCODING','ENCRYPTION-SALT','END-USER-PROMPT',
            +            'ENTRY-TYPES-LIST','ERROR-COLUMN','ERROR-object-DETAIL','ERROR-ROW',
            +            'ERROR-STRING','EVENT-GROUP-ID','EVENT-PROCEDURE','EVENT-PROCEDURE-CONTEXT',
            +            'EVENT-TYPE','EXCLUSIVE-ID','EXECUTION-LOG','EXPAND',
            +            'EXPANDABLE','FGCOLOR','FILE-CREATE-DATE','FILE-CREATE-TIME',
            +            'FILE-MOD-DATE','FILE-MOD-TIME','FILE-NAME','FILE-OFFSET',
            +            'FILE-SIZE','FILE-TYPE','FILLED','FILL-MODE',
            +            'FILL-WHERE-STRING','FIRST-ASYNC-REQUEST','FIRST-BUFFER','FIRST-CHILD',
            +            'FIRST-COLUMN','FIRST-DATASET','FIRST-DATA-SOURCE','FIRST-object',
            +            'FIRST-PROCEDURE','FIRST-QUERY','FIRST-SERVER','FIRST-SERVER-SOCKET',
            +            'FIRST-SOCKET','FIRST-TAB-ITEM','FIT-LAST-COLUMN','FLAT-BUTTON',
            +            'FOCUSED-ROW','FOCUSED-ROW-SELECTED','FONT','FOREGROUND',
            +            'FORMAT','FORMATTED','FORM-INPUT','FORM-LONG-INPUT',
            +            'FORWARD-ONLY','FRAGMENT','FRAME-COL','FRAME-NAME',
            +            'FRAME-ROW','FRAME-SPACING','FRAME-X','FRAME-Y',
            +            'FREQUENCY','FULL-HEIGHT-CHARS','FULL-HEIGHT-PIXELS','FULL-PATHNAME',
            +            'FULL-WIDTH-CHARS','FULL-WIDTH-PIXELS','GRAPHIC-EDGE',
            +            'GRID-FACTOR-HORIZONTAL','GRID-FACTOR-VERTICAL','GRID-SNAP','GRID-UNIT-HEIGHT-CHARS',
            +            'GRID-UNIT-HEIGHT-PIXELS','GRID-UNIT-WIDTH-CHARS','GRID-UNIT-WIDTH-PIXELS','GRID-VISIBLE',
            +            'GROUP-BOX','HANDLE','HANDLER','HAS-LOBS',
            +            'HAS-RECORDS','HEIGHT-CHARS','HEIGHT-PIXELS','HELP',
            +            'HIDDEN','HORIZONTAL','HTML-CHARSET','HTML-END-OF-LINE',
            +            'HTML-END-OF-PAGE','HTML-FRAME-BEGIN','HTML-FRAME-END','HTML-HEADER-BEGIN',
            +            'HTML-HEADER-END','HTML-TITLE-BEGIN','HTML-TITLE-END','HWND',
            +            'ICFPARAMETER','ICON','IGNORE-CURRENT-MODIFIED','IMAGE-DOWN',
            +            'IMAGE-INSENSITIVE','IMAGE-UP','IMMEDIATE-DISPLAY','INDEX-INFORMATION',
            +            'IN-HANDLE','INHERIT-BGCOLOR','INHERIT-FGCOLOR','INITIAL','INIT',
            +            'INNER-CHARS','INNER-LINES','INPUT-VALUE','INSTANTIATING-PROCEDURE',
            +            'INTERNAL-ENTRIES','IS-CLASS','IS-OPEN','IS-PARAMETER-SET',
            +            'IS-XML','ITEMS-PER-ROW','KEEP-CONNECTION-OPEN','KEEP-FRAME-Z-ORDER',
            +            'KEEP-SECURITY-CACHE','KEY','KEYS','LABEL',
            +            'LABEL-BGCOLOR','LABEL-DCOLOR','LABEL-FGCOLOR','LABEL-FONT',
            +            'LABELS','LANGUAGES','LARGE','LARGE-TO-SMALL',
            +            'LAST-ASYNC-REQUEST','LAST-BATCH','LAST-CHILD','LAST-object',
            +            'LAST-PROCEDURE','LAST-SERVER','LAST-SERVER-SOCKET','LAST-SOCKET',
            +            'LAST-TAB-ITEM','LINE','LIST-ITEM-PAIRS','LIST-ITEMS',
            +            'LITERAL-QUESTION','LOCAL-HOST','LOCAL-NAME','LOCAL-PORT',
            +            'LOCATOR-COLUMN-NUMBER','LOCATOR-LINE-NUMBER','LOCATOR-PUBLIC-ID','LOCATOR-system-ID',
            +            'LOCATOR-TYPE','LOG-ENTRY-TYPES','LOGFILE-NAME','LOGGING-LEVEL',
            +            'LOGIN-EXPIRATION-TIMESTAMP','LOGIN-HOST','LOGIN-STATE','LOG-THRESHOLD',
            +            'MANDATORY','MANUAL-HIGHLIGHT','MAX-BUTTON','MAX-CHARS',
            +            'MAX-DATA-GUESS','MAX-HEIGHT-CHARS','MAX-HEIGHT-PIXELS','MAX-VALUE',
            +            'MAX-WIDTH-CHARS','MAX-WIDTH-PIXELS','MD5-VALUE','MENU-BAR',
            +            'MENU-KEY','MENU-MOUSE','MERGE-BY-FIELD','MESSAGE-AREA',
            +            'MESSAGE-AREA-FONT','MIN-BUTTON','MIN-COLUMN-WIDTH-CHARS','MIN-COLUMN-WIDTH-PIXELS',
            +            'MIN-HEIGHT-CHARS','MIN-HEIGHT-PIXELS','MIN-SCHEMA-MARSHAL','MIN-VALUE',
            +            'MIN-WIDTH-CHARS','MIN-WIDTH-PIXELS','MODIFIED','MOUSE-POINTER',
            +            'MOVABLE','MULTI-COMPILE','MULTIPLE','MULTITASKING-INTERVAL',
            +            'MUST-UNDERSTAND','NAME','NAMESPACE-PREFIX','NAMESPACE-URI',
            +            'NEEDS-APPSERVER-PROMPT','NEEDS-PROMPT','NESTED','NEW-ROW',
            +            'NEXT-COLUMN','NEXT-ROWID','NEXT-SIBLING','NEXT-TAB-ITEM', 'NO-BOX',
            +            'NO-CURRENT-VALUE','NODE-VALUE','NO-EMPTY-SPACE','NO-FOCUS',
            +            'NONAMESPACE-SCHEMA-LOCATION','NO-SCHEMA-MARSHAL','NO-VALIDATE','NUM-BUFFERS',
            +            'NUM-BUTTONS','NUM-CHILD-RELATIONS','NUM-CHILDREN','NUM-COLUMNS',
            +            'NUM-DROPPED-FILES','NUMERIC-DECIMAL-POINT','NUMERIC-FORMAT','NUMERIC-SEPARATOR',
            +            'NUM-FIELDS','NUM-FORMATS','NUM-HEADER-ENTRIES','NUM-ITEMS',
            +            'NUM-ITERATIONS','NUM-LINES','NUM-LOCKED-COLUMNS','NUM-LOG-FILES',
            +            'NUM-MESSAGES','NUM-PARAMETERS','NUM-REFERENCES','NUM-RELATIONS',
            +            'NUM-REPLACED','NUM-SELECTED-ROWS','NUM-SELECTED-WIDGETS','NUM-SOURCE-BUFFERS',
            +            'NUM-TABS','NUM-TOP-BUFFERS','NUM-TO-RETAIN','NUM-VISIBLE-COLUMNS',
            +            'ON-FRAME-BORDER','ORIGIN-HANDLE','ORIGIN-ROWID','OWNER',
            +            'OWNER-DOCUMENT','PAGE-BOTTOM','PAGE-TOP','PARAMETER',
            +            'PARENT','PARENT-BUFFER','PARENT-RELATION','PARSE-STATUS',
            +            'PASSWORD-FIELD','PATHNAME','PBE-HASH-ALGORITHM','PBE-KEY-ROUNDS',
            +            'PERSISTENT','PERSISTENT-CACHE-DISABLED','PERSISTENT-PROCEDURE','PFCOLOR',
            +            'PIXELS-PER-COLUMN','PIXELS-PER-ROW','POPUP-MENU','POPUP-ONLY',
            +            'POSITION','PREFER-DATASET','PREPARED','PREPARE-STRING',
            +            'PREV-COLUMN','PREV-SIBLING','PREV-TAB-ITEM','PRIMARY',
            +            'PRINTER-CONTROL-HANDLE','PRINTER-HDC','PRINTER-NAME','PRINTER-PORT',
            +            'PRIVATE-DATA','PROCEDURE-NAME','PROGRESS-SOURCE','PROXY',
            +            'PROXY-PASSWORD','PROXY-USERID','PUBLIC-ID','PUBLISHED-EVENTS',
            +            'RADIO-BUTTONS','READ-ONLY','RECORD-LENGTH',
            +            'REFRESHABLE','RELATION-FIELDS','RELATIONS-ACTIVE','REMOTE',
            +            'REMOTE-HOST','REMOTE-PORT','RESIZABLE','RESIZE',
            +            'RESTART-ROWID','RETAIN-SHAPE','RETURN-INSERTED','RETURN-VALUE-DATA-TYPE',
            +            'ROLES','ROUNDED','COL','ROW','ROW-HEIGHT-CHARS',
            +            'ROW-HEIGHT-PIXELS','ROW-MARKERS','ROW-RESIZABLE','ROW-STATE',
            +            'SAVE-WHERE-STRING','SCHEMA-CHANGE','SCHEMA-LOCATION','SCHEMA-MARSHAL',
            +            'SCHEMA-PATH','SCREEN-LINES','SCREEN-VALUE','SCROLLABLE',
            +            'SCROLLBAR-HORIZONTAL','SCROLL-BARS','SCROLLBAR-VERTICAL','SEAL-TIMESTAMP',
            +            'SELECTABLE','SELECTED','SELECTION-END','SELECTION-START',
            +            'SELECTION-TEXT','SENSITIVE','SEPARATOR-FGCOLOR','SEPARATORS',
            +            'SERVER','SERVER-CONNECTION-BOUND','SERVER-CONNECTION-BOUND-REQUEST','SERVER-CONNECTION-CONTEXT',
            +            'SERVER-CONNECTION-ID','SERVER-OPERATING-MODE','SESSION-END','SESSION-ID',
            +            'SHOW-IN-TASKBAR','SIDE-LABEL-HANDLE','SIDE-LABELS','SKIP-DELETED-RECORD',
            +            'SMALL-ICON','SMALL-TITLE','SOAP-FAULT-ACTOR','SOAP-FAULT-CODE',
            +            'SOAP-FAULT-DETAIL','SOAP-FAULT-STRING','SORT','SORT-ASCENDING',
            +            'SORT-NUMBER','SSL-SERVER-NAME','STANDALONE','STARTUP-PARAMETERS',
            +            'STATE-DETAIL','STATUS-AREA','STATUS-AREA-FONT','STOPPED',
            +            'STREAM','STRETCH-TO-FIT','STRICT','STRING-VALUE',
            +            'SUBTYPE','SUPER-PROCEDURES','SUPPRESS-NAMESPACE-PROCESSING','SUPPRESS-WARNINGS',
            +            'SYMMETRIC-ENCRYPTION-ALGORITHM','SYMMETRIC-ENCRYPTION-IV','SYMMETRIC-ENCRYPTION-KEY','SYMMETRIC-SUPPORT',
            +            'system-ALERT-BOXES','system-ID','TABLE','TABLE-CRC-LIST',
            +            'TABLE-HANDLE','TABLE-LIST','TABLE-NUMBER','TAB-POSITION',
            +            'TAB-STOP','TEMP-DIRECTORY','TEXT-SELECTED','THREE-D',
            +            'TIC-MARKS','TIME-SOURCE','TITLE','TITLE-BGCOLOR','FIELD',
            +            'TITLE-DCOLOR','TITLE-FGCOLOR','TITLE-FONT','TOOLTIP',
            +            'TOOLTIPS','TOP-ONLY','TRACKING-CHANGES','TRANSACTION',
            +            'TRANS-INIT-PROCEDURE','TRANSPARENT','TYPE','UNIQUE-ID',
            +            'UNIQUE-MATCH','URL','URL-PASSWORD','URL-USERID','EXTENT',
            +            'USER-ID','V6DISPLAY','VALIDATE-EXPRESSION','VALIDATE-MESSAGE',
            +            'VALIDATE-XML','VALIDATION-ENABLED','VIEW-FIRST-COLUMN-ON-REOPEN',
            +            'VIRTUAL-HEIGHT-CHARS','VIRTUAL-HEIGHT-PIXELS','VIRTUAL-WIDTH-CHARS','VIRTUAL-WIDTH-PIXELS',
            +            'VISIBLE','WARNING','WHERE-STRING','widget-ENTER','DATE',
            +            'widget-LEAVE','WIDTH-CHARS','WIDTH-PIXELS','WINDOW-STATE',
            +            'WINDOW-system','WORD-WRAP','WORK-AREA-HEIGHT-PIXELS','WORK-AREA-WIDTH-PIXELS',
            +            'WORK-AREA-X','WORK-AREA-Y','WRITE-STATUS','X','widget-Handle',
            +            'X-DOCUMENT','XML-DATA-TYPE','XML-NODE-TYPE','XML-SCHEMA-PATH',
            +            'XML-SUPPRESS-NAMESPACE-PROCESSING','Y','YEAR-OFFSET','CHARACTER',
            +            'LONGCHAR','MEMPTR','CHAR','DEC','INT','LOG','DECI','INTE','LOGI','long'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '[', ']', '{', '}',
            +        '<', '>', '=',
            +        '+', '-', '*', '/',
            +        '!', '@', '%', '|', '$',
            +        ':', '.', ';', ',',
            +        '?', '<=','<>','>=', '\\'
            +        ),
            +    'CASE_SENSITIVE' => array (
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false
            +        ),
            +    'STYLES' => array (
            +        'KEYWORDS' => array (
            +            1 => 'color: #0000ff; font-weight: bold;',
            +            2 => 'color: #1D16B2;',
            +            3 => 'color: #993333;',
            +            4 => 'color: #0000ff;'
            +            ),
            +        'COMMENTS' => array (
            +//            1 => 'color: #808080; font-style: italic;',
            +//            2 => 'color: #808080; font-style: italic;',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array (
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array (
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array (
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array (
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array (
            +            0 => 'color: #006600;'
            +            ),
            +        'SYMBOLS' => array (
            +            0 => 'color: #66cc66;'
            +            ),
            +        'REGEXPS' => array (
            +            ),
            +        'SCRIPT' => array (
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        0 => ':'
            +        ),
            +    'REGEXPS' => array (
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array (
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array (
            +        ),
            +    'TAB_WIDTH' => 4,
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            'DISALLOWED_BEFORE' => "(?  "(?![\-a-zA-Z0-9_%])",
            +            1 => array(
            +                'SPACE_AS_WHITESPACE' => true
            +                ),
            +            2 => array(
            +                'SPACE_AS_WHITESPACE' => true
            +                )
            +            )
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/prolog.php b/vendor/easybook/geshi/geshi/prolog.php
            new file mode 100644
            index 0000000000..2ebaac3637
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/prolog.php
            @@ -0,0 +1,142 @@
            + 'Prolog',
            +    'COMMENT_SINGLE' => array(1 => '%'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'HARDQUOTE' => array("'", "'"),
            +    'HARDESCAPE' => array("\'"),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array(),
            +    'ESCAPE_CHAR' => '',
            +    'NUMBERS' =>
            +        GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_FLT_SCI_ZERO,
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'abolish','abs','arg','asserta','assertz','at_end_of_stream','atan',
            +            'atom','atom_chars','atom_codes','atom_concat','atom_length',
            +            'atomic','bagof','call','catch','ceiling','char_code',
            +            'char_conversion','clause','close','compound','consult','copy_term',
            +            'cos','current_char_conversion','current_input','current_op',
            +            'current_output','current_predicate','current_prolog_flag',
            +            'discontiguous','dynamic','ensure_loaded','exp','fail','findall',
            +            'float','float_fractional_part','float_integer_part','floor',
            +            'flush_output','functor','get_byte','get_char','get_code','halt',
            +            'include','initialization','integer','is','listing','log','mod',
            +            'multifile','nl','nonvar','notrace','number','number_chars',
            +            'number_codes','once','op','open','peek_byte','peek_char',
            +            'peek_code','put_byte','put_char','put_code','read','read_term',
            +            'rem','repeat','retract','round','set_input','set_output',
            +            'set_prolog_flag','set_stream_position','setof','sign','sin','sqrt',
            +            'stream_property','sub_atom','throw','trace','true','truncate',
            +            'unify_with_occurs_check','univ','var','write','write_canonical',
            +            'write_term','writeq'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        0 => array('(', ')', '[', ']', '{', '}',),
            +        1 => array('?-', ':-', '=:='),
            +        2 => array('\-', '\+', '\*', '\/'),
            +        3 => array('-', '+', '*', '/'),
            +        4 => array('.', ':', ',', ';'),
            +        5 => array('!', '@', '&', '|'),
            +        6 => array('<', '>', '=')
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #990000;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; font-style: italic;',
            +            'MULTI' => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;',
            +            'HARD' => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #0000ff;',
            +            'HARD' => 'color: #0000ff;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #800080;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #339933;',
            +            1 => 'color: #339933;',
            +            2 => 'color: #339933;',
            +            3 => 'color: #339933;',
            +            4 => 'color: #339933;',
            +            5 => 'color: #339933;',
            +            6 => 'color: #339933;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #008080;'
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => 'http://pauillac.inria.fr/~deransar/prolog/bips.html'
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        //Variables
            +        0 => "(? GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/properties.php b/vendor/easybook/geshi/geshi/properties.php
            new file mode 100644
            index 0000000000..e592795fdf
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/properties.php
            @@ -0,0 +1,126 @@
            + 'PROPERTIES',
            +    'COMMENT_SINGLE' => array(1 => '#'),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        /* Common used variables */
            +        1 => array(
            +            '${user.home}'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '[', ']', '='
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'font-weight: bold;',
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => ''
            +            ),
            +        'BRACKETS' => array(
            +            0 => ''
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #933;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => ''
            +            ),
            +        'METHODS' => array(
            +            0 => ''
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #000080; font-weight:bold;',
            +            1 => 'color: #008000; font-weight:bold;'
            +            ),
            +        'SCRIPT' => array(
            +            0 => ''
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        //Entry names
            +        0 => array(
            +            GESHI_SEARCH => '^(\s*)([.a-zA-Z0-9_\-]+)(\s*=)',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => 'm',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => '\\3'
            +            ),
            +        //Entry values
            +        1 => array(
            +            // Evil hackery to get around GeSHi bug: <>" and ; are added so s can be matched
            +            // Explicit match on variable names because if a comment is before the first < of the span
            +            // gets chewed up...
            +            GESHI_SEARCH => '([<>";a-zA-Z0-9_]+\s*)=(.*)',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\\1=',
            +            GESHI_AFTER => ''
            +            )
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/providex.php b/vendor/easybook/geshi/geshi/providex.php
            new file mode 100644
            index 0000000000..1a7b08bbee
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/providex.php
            @@ -0,0 +1,297 @@
            + 'ProvideX',
            +    'COMMENT_SINGLE' => array(1 => '!'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(
            +        // Single-Line Comments using REM command
            +        2 => "/\bREM\b.*?$/i"
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            // Directives
            +            '*break', '*continue', '*end', '*escape', '*next', '*proceed',
            +            '*retry', '*return', '*same', 'accept', 'add index', 'addr',
            +            'auto', 'begin', 'break', 'button', 'bye', 'call', 'case',
            +            'chart', 'check_box', 'class', 'clear', 'clip_board', 'close',
            +            'continue', 'control', 'create required', 'create table',
            +            'cwdir', 'data', 'day_format', 'def', 'default', 'defctl',
            +            'defprt', 'deftty', 'delete required', 'dictionary', 'dim', 'direct',
            +            'directory', 'disable', 'drop', 'drop_box', 'dump', 'edit',
            +            'else', 'enable', 'end switch', 'end', 'end_if', 'endtrace',
            +            'enter', 'erase', 'error_handler', 'escape', 'event', 'execute',
            +            'exit', 'exitto', 'extract', 'file', 'find', 'floating point',
            +            'for', 'function', 'get_file_box', 'gosub', 'goto', 'grid',
            +            'h_scrollbar', 'hide', 'if', 'index', 'indexed', 'input',
            +            'insert', 'invoke', 'iolist', 'keyed', 'let', 'like',
            +            'line_switch', 'list', 'list_box', 'load', 'local', 'lock',
            +            'long_form', 'menu_bar', 'merge', 'message_lib', 'mnemonic',
            +            'msgbox', 'multi_line', 'multi_media', 'next', 'object', 'obtain',
            +            'on', 'open', 'password', 'perform', 'pop', 'popup_menu',
            +            'precision', 'prefix', 'preinput', 'print', 'process', 'program',
            +            'property', 'purge', 'quit', 'radio_button', 'randomize',
            +            'read', 'record', 'redim', 'refile', 'release', 'rem', 'remove',
            +            'rename', 'renumber', 'repeat', 'reset', 'restore', 'retry',
            +            'return', 'round', 'run', 'save', 'select', 'serial', 'server',
            +            'set_focus', 'set_nbf', 'set_param', 'setctl', 'setday', 'setdev',
            +            'setdrive', 'seterr', 'setesc', 'setfid', 'setmouse', 'settime',
            +            'settrace', 'short_form', 'show', 'sort', 'start', 'static',
            +            'step', 'stop', 'switch', 'system_help', 'system_jrnl', 'table',
            +            'then', 'to', 'translate', 'tristate_box', 'unlock', 'until',
            +            'update', 'user_lex', 'v_scrollbar', 'vardrop_box', 'varlist_box',
            +            'via', 'video_palette', 'wait', 'wend', 'while', 'winprt_setup',
            +            'with', 'write'
            +            ),
            +        2 => array(
            +            // System Functions
            +            '@x', '@y', 'abs', 'acs', 'and', 'arg', 'asc', 'asn', 'ath',
            +            'atn', 'bin', 'bsz', 'chg', 'chr', 'cmp', 'cos', 'cpl',
            +            'crc', 'cse', 'ctl', 'cvs', 'dec', 'dir', 'dll', 'dsk',
            +            'dte', 'env', 'ept', 'err', 'evn', 'evs', 'exp', 'ffn',
            +            'fib', 'fid', 'fin', 'fpt', 'gap', 'gbl', 'gep', 'hsa',
            +            'hsh', 'hta', 'hwn', 'i3e', 'ind', 'int', 'iol', 'ior',
            +            'jul', 'jst', 'kec', 'kef', 'kel', 'ken', 'kep', 'key',
            +            'kgn', 'lcs', 'len', 'lno', 'log', 'lrc', 'lst', 'max',
            +            'mem', 'mid', 'min', 'mnm', 'mod', 'msg', 'msk', 'mxc',
            +            'mxl', 'new', 'not', 'nul', 'num', 'obj', 'opt', 'pad',
            +            'pck', 'pfx', 'pgm', 'pos', 'prc', 'prm', 'pth', 'pub',
            +            'rcd', 'rdx', 'rec', 'ref', 'rnd', 'rno', 'sep', 'sgn',
            +            'sin', 'sqr', 'srt', 'ssz', 'stk', 'stp', 'str', 'sub',
            +            'swp', 'sys', 'tan', 'tbl', 'tcb', 'tmr', 'trx', 'tsk',
            +            'txh', 'txw', 'ucp', 'ucs', 'upk', 'vin', 'vis', 'xeq',
            +            'xfa', 'xor', '_obj'
            +            ),
            +        3 => array(
            +            // System Variables
            +            // Vars that are duplicates of functions
            +            // 'ctl', 'err', 'pfx', 'prm', 'rnd', 'sep', 'sys',
            +            'bkg', 'chn', 'day', 'dlm', 'dsz', 'eom', 'ers', 'esc',
            +            'gfn', 'gid', 'hfn', 'hlp', 'hwd', 'lfa', 'lfo', 'lip',
            +            'lpg', 'lwd', 'mse', 'msl', 'nar', 'nid', 'pgn', 'psz',
            +            'quo', 'ret', 'sid', 'ssn', 'tim', 'tme', 'tms', 'tsm',
            +            'uid', 'unt', 'who'
            +
            +            ),
            +        4 => array(
            +            // Nomads Variables
            +            '%Flmaint_Lib$', '%Flmaint_Msg$', '%Nomads_Activation_Ok',
            +            '%Nomads_Auto_Qry', '%Nomads_Disable_Debug',
            +            '%Nomads_Disable_Trace', '%Nomads_Fkey_Handler$',
            +            '%Nomads_Fkey_Tbl$', '%Nomads_Notest', '%Nomads_Onexit$',
            +            '%Nomads_Post_Display', '%Nomads_Pre_Display$',
            +            '%Nomads_Process$', '%Nomads_Trace_File$',
            +            '%Nomad_Actv_Folder_Colors$', '%Nomad_Automation_Enabled',
            +            '%Nomad_Auto_Close', '%Nomad_Center_Wdw', '%Nomad_Concurrent_Wdw',
            +            '%Nomad_Custom_Define', '%Nomad_Custom_Dir$',
            +            '%Nomad_Custom_Genmtc', '%Nomad_Custom_Skip_Definition',
            +            '%Nomad_Def_Sfx$', '%Nomad_Enter_Tab', '%Nomad_Esc_Sel',
            +            '%Nomad_Isjavx', '%Nomad_Iswindx', '%Nomad_Iswindx$',
            +            '%Nomad_Menu$', '%Nomad_Menu_Leftedge_Clr$',
            +            '%Nomad_Menu_Textbackground_Clr$', '%Nomad_Mln_Sep$',
            +            '%Nomad_Msgmnt$', '%Nomad_Noplusw', '%Nomad_No_Customize',
            +            '%Nomad_Object_Persistence', '%Nomad_Object_Resize',
            +            '%Nomad_Open_Load', '%Nomad_Override_Font$',
            +            '%Nomad_Palette_Loaded', '%Nomad_Panel_Info_Force',
            +            '%Nomad_Panel_Info_Prog$', '%Nomad_Pnl_Def_Colour$',
            +            '%Nomad_Pnl_Def_Font$', '%Nomad_Prg_Cache', '%Nomad_Qry_Attr$',
            +            '%Nomad_Qry_Btn$', '%Nomad_Qry_Clear_Start', '%Nomad_Qry_Tip$',
            +            '%Nomad_Qry_Wide', '%Nomad_Query_Clear_Status', '%Nomad_Query_Kno',
            +            '%Nomad_Query_No_Gray', '%Nomad_Query_Odb_Ignore',
            +            '%Nomad_Query_Retkno', '%Nomad_Query_Sbar_Max',
            +            '%Nomad_Relative_Wdw', '%Nomad_Save_Qry_Path', '%Nomad_Script_Fn',
            +            '%Nomad_Script_Log', '%Nomad_Script_Wdw',
            +            '%Nomad_Skip_Change_Logic', '%Nomad_Skip_Onselect_Logic',
            +            '%Nomad_Stk$', '%Nomad_Tab_Dir', '%Nomad_Timeout',
            +            '%Nomad_Turbo_Off', '%Nomad_Visual_Effect',
            +            '%Nomad_Visual_Override', '%Nomad_Win_Ver', '%Nomad_Xchar',
            +            '%Nomad_Xmax', '%Nomad_Ychar', '%Nomad_Ymax', '%Scr_Def_Attr$',
            +            '%Scr_Def_H_Fl$', '%Scr_Def_H_Id$', '%Scr_Lib', '%Scr_Lib$',
            +            '%Z__Usr_Sec$', 'Alternate_Panel$', 'Alternate_Panel_Type$',
            +            'Arg_1$', 'Arg_10$', 'Arg_11$', 'Arg_12$', 'Arg_13$', 'Arg_14$',
            +            'Arg_15$', 'Arg_16$', 'Arg_17$', 'Arg_18$', 'Arg_19$', 'Arg_2$',
            +            'Arg_20$', 'Arg_3$', 'Arg_4$', 'Arg_5$', 'Arg_6$', 'Arg_7$',
            +            'Arg_8$', 'Arg_9$', 'Change_Flg', 'Cmd_Str$', 'Default_Prog$',
            +            'Disp_Cmd$', 'Entire_Record$', 'Exit_Cmd$', 'Fldr_Default_Prog$',
            +            'Folder_Id$', 'Id', 'Id$', 'Ignore_Exit', 'Initialize_Flg',
            +            'Init_Text$', 'Init_Val$', 'Main_Scrn_K$', 'Mnu_Ln$',
            +            'Next_Folder', 'Next_Id', 'Next_Id$', 'No_Flush', 'Prime_Key$',
            +            'Prior_Val', 'Prior_Val$', 'Qry_Val$', 'Refresh_Flg',
            +            'Replacement_Folder$', 'Replacement_Lib$', 'Replacement_Scrn$',
            +            'Scrn_Id$', 'Scrn_K$', 'Scrn_Lib$', 'Tab_Table$', '_Eom$'
            +            ),
            +        5 => array(
            +            // Mnemonics
            +            "'!w'", "'*c'", "'*h'", "'*i'", "'*o'", "'*r'", "'*x'",
            +            "'+b'", "'+d'", "'+e'", "'+f'", "'+i'", "'+n'",
            +            "'+p'", "'+s'", "'+t'", "'+u'", "'+v'", "'+w'", "'+x'",
            +            "'+z'", "'-b'", "'-d'", "'-e'", "'-f'", "'-i'",
            +            "'-n'", "'-p'", "'-s'", "'-t'", "'-u'", "'-v'", "'-w'",
            +            "'-x'", "'-z'", "'2d'", "'3d'", "'4d'", "'@@'", "'ab'",
            +            "'arc'", "'at'", "'backgr'", "'bb'", "'be'", "'beep'",
            +            "'bg'", "'bi'", "'bj'", "'bk'", "'black'", "'blue'",
            +            "'bm'", "'bo'", "'box'", "'br'", "'bs'", "'bt'", "'bu'",
            +            "'bw'", "'bx'", "'caption'", "'ce'", "'cf'", "'ch'",
            +            "'ci'", "'circle'", "'cl'", "'colour'", "'cp'", "'cpi'",
            +            "'cr'", "'cs'", "'cursor'", "'cyan''_cyan'", "'dc'",
            +            "'default'", "'df'", "'dialogue'", "'dn'", "'do'",
            +            "'drop'", "'eb'", "'ee'", "'ef'", "'eg'", "'ei'", "'ej'",
            +            "'el'", "'em'", "'eo'", "'ep'", "'er'", "'es'", "'et'",
            +            "'eu'", "'ew'", "'ff'", "'fill'", "'fl'", "'font'",
            +            "'frame'", "'gd'", "'ge'", "'gf'", "'goto'", "'green'",
            +            "'gs'", "'hide'", "'ic'", "'image'", "'jc'",
            +            "'jd'", "'jl'", "'jn'", "'jr'", "'js'", "'l6'", "'l8'",
            +            "'lc'", "'ld'", "'lf'", "'li'", "'line'", "'lm'",
            +            "'lpi'", "'lt'", "'magenta'", "'maxsize'", "'me'",
            +            "'message'", "'minsize'", "'mn'", "'mode'",
            +            "'move'", "'mp'", "'ms'", "'ni'", "'offset'", "'option'",
            +            "'pe'", "'pen'", "'picture'", "'pie'", "'pm'", "'polygon'",
            +            "'pop'", "'ps'", "'push'", "'rb'", "'rc'", "'rectangle'",
            +            "'red'", "'rl'", "'rm'", "'rp'", "'rs'", "'rt'", "'sb'",
            +            "'scroll'", "'sd'", "'se'", "'sf'", "'show'", "'size'",
            +            "'sl'", "'sn'", "'sp'", "'sr'", "'swap'", "'sx'", "'text'",
            +            "'textwdw'", "'tr'", "'tw'", "'uc'", "'up'", "'vt'", "'wa'",
            +            "'wc'", "'wd'", "'wg'", "'white'", "'window'", "'wm'",
            +            "'wp'", "'wr'", "'wrap'", "'ws'", "'wx'", "'xp'", "'yellow'",
            +            "'zx'", "'_black'", "'_blue'", "'_colour'", "'_green'",
            +            "'_magenta'", "'_red'", "'_white'", "'_yellow'"
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        0 => array('+', '-', '*', '/', '^', '|'),
            +        1 => array('++', '--', '+=', '-=', '*=', '/=', '^=', '|='),
            +        2 => array('<', '>', '='),
            +        3 => array('(', ')', '[', ']', '{', '}'),
            +        4 => array(',', '@', ';', '\\')
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        5 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: navy;', // Directives
            +            2 => 'color: blue;', // System Functions
            +            3 => 'color: blue;', // System Variables
            +            4 => 'color: #6A5ACD; font-style: italic;', // Nomads Global Variables
            +            5 => 'color: #BDB76B;', // Mnemonics
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #008080; font-style: italic;',
            +            2 => 'color: #008080;',
            +            'MULTI' => 'color: #008080; font-style: italic;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000066;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: green;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #00008B;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #008000;',
            +            1 => 'color: #000099;',
            +            2 => 'color: #000099;',
            +            3 => 'color: #0000C9;',
            +            4 => 'color: #000099;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099;'
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            1 => 'color: #006400; font-weight: bold',
            +            2 => 'color: #6A5ACD;'
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => 'http://www.allbasic.info./wiki/index.php/PX:Directive_{FNAME}',
            +        2 => 'http://www.allbasic.info./wiki/index.php/PX:System_function_{FNAME}',
            +        3 => 'http://www.allbasic.info./wiki/index.php/PX:System_variable_{FNAME}',
            +        4 => 'http://www.allbasic.info./wiki/index.php/PX:Nomads_{FNAME}',
            +        5 => 'http://www.allbasic.info./wiki/index.php/PX:Mnemonic_{FNAMEU}'
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => "'"
            +        ),
            +    'REGEXPS' => array(
            +        1 => array(
            +            // Line Labels
            +            GESHI_SEARCH => '([[:space:]])([a-zA-Z_][a-zA-Z0-9_]+)(:)',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => '\\3'
            +            ),
            +        2 => array(
            +            // Global String Variables
            +            GESHI_SEARCH => '(\%)([a-zA-Z_][a-zA-Z0-9_]+)(\$)',
            +            GESHI_REPLACE => '\\1\\2\\3',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            )
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'PARSER_CONTROL' => array(
            +        'ENABLE_FLAGS' => array(
            +            'NUMBERS' => GESHI_NEVER
            +            )
            +        ),
            +    'TAB_WIDTH' => 4
            +);
            diff --git a/vendor/easybook/geshi/geshi/purebasic.php b/vendor/easybook/geshi/geshi/purebasic.php
            new file mode 100644
            index 0000000000..1bd4e790f1
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/purebasic.php
            @@ -0,0 +1,302 @@
            + 'PureBasic',
            +    'COMMENT_SINGLE' => array( 1 => ";"  ),
            +    'COMMENT_MULTI' => array( ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            // Keywords
            +            'And', 'As', 'Break', 'CallDebugger', 'Case', 'CompilerCase', 'CompilerDefault', 'CompilerElse', 'CompilerEndIf', 'CompilerEndSelect',
            +            'CompilerError', 'CompilerIf', 'CompilerSelect', 'Continue', 'Data', 'DataSection', 'EndDataSection', 'Debug', 'DebugLevel', 'Declare',
            +            'DeclareCDLL', 'DeclareDLL', 'Default', 'Define', 'Dim', 'DisableASM', 'DisableDebugger', 'DisableExplicit', 'Else', 'ElseIf', 'EnableASM',
            +            'EnableDebugger', 'EnableExplicit', 'End', 'EndEnumeration', 'EndIf', 'EndImport', 'EndInterface', 'EndMacro', 'EndProcedure',
            +            'EndSelect', 'EndStructure', 'EndStructureUnion', 'EndWith', 'Enumeration', 'Extends', 'FakeReturn', 'For', 'Next', 'ForEach',
            +            'ForEver', 'Global', 'Gosub', 'Goto', 'If', 'Import', 'ImportC', 'IncludeBinary', 'IncludeFile', 'IncludePath', 'Interface', 'Macro',
            +            'NewList', 'Not', 'Or', 'Procedure', 'ProcedureC', 'ProcedureCDLL', 'ProcedureDLL', 'ProcedureReturn', 'Protected', 'Prototype',
            +            'PrototypeC', 'Read', 'ReDim', 'Repeat', 'Until', 'Restore', 'Return', 'Select', 'Shared', 'Static', 'Step', 'Structure', 'StructureUnion',
            +            'Swap', 'To', 'Wend', 'While', 'With', 'XIncludeFile', 'XOr'
            +            ),
            +        2 => array(
            +            // All Functions
            +            'Abs', 'ACos', 'Add3DArchive', 'AddBillboard', 'AddDate', 'AddElement', 'AddGadgetColumn', 'AddGadgetItem',
            +            'AddKeyboardShortcut', 'AddMaterialLayer', 'AddPackFile', 'AddPackMemory', 'AddStatusBarField', 'AddSysTrayIcon',
            +            'AllocateMemory', 'AmbientColor', 'AnimateEntity', 'Asc', 'ASin', 'ATan', 'AudioCDLength', 'AudioCDName', 'AudioCDStatus',
            +            'AudioCDTrackLength', 'AudioCDTracks', 'AudioCDTrackSeconds', 'AvailableProgramOutput', 'AvailableScreenMemory',
            +            'BackColor', 'Base64Decoder', 'Base64Encoder', 'BillboardGroupLocate', 'BillboardGroupMaterial', 'BillboardGroupX',
            +            'BillboardGroupY', 'BillboardGroupZ', 'BillboardHeight', 'BillboardLocate', 'BillboardWidth', 'BillboardX', 'BillboardY', 'BillboardZ',
            +            'Bin', 'BinQ', 'Blue', 'Box', 'ButtonGadget', 'ButtonImageGadget', 'CalendarGadget', 'CallCFunction', 'CallCFunctionFast',
            +            'CallFunction', 'CallFunctionFast', 'CameraBackColor', 'CameraFOV', 'CameraLocate', 'CameraLookAt', 'CameraProjection',
            +            'CameraRange', 'CameraRenderMode', 'CameraX', 'CameraY', 'CameraZ', 'CatchImage', 'CatchSound', 'CatchSprite',
            +            'CatchXML', 'ChangeAlphaIntensity', 'ChangeCurrentElement', 'ChangeGamma', 'ChangeListIconGadgetDisplay',
            +            'ChangeSysTrayIcon', 'CheckBoxGadget', 'CheckEntityCollision', 'CheckFilename', 'ChildXMLNode', 'Chr', 'Circle',
            +            'ClearBillboards', 'ClearClipboard', 'ClearConsole', 'ClearError', 'ClearGadgetItemList', 'ClearList', 'ClearScreen', 'ClipSprite',
            +            'CloseConsole', 'CloseDatabase', 'CloseFile', 'CloseGadgetList', 'CloseHelp', 'CloseLibrary', 'CloseNetworkConnection',
            +            'CloseNetworkServer', 'ClosePack', 'ClosePreferences', 'CloseProgram', 'CloseScreen', 'CloseSubMenu', 'CloseWindow',
            +            'ColorRequester', 'ComboBoxGadget', 'CompareMemory', 'CompareMemoryString', 'ConnectionID', 'ConsoleColor',
            +            'ConsoleCursor', 'ConsoleError', 'ConsoleLocate', 'ConsoleTitle', 'ContainerGadget', 'CopyDirectory', 'CopyEntity',
            +            'CopyFile', 'CopyImage', 'CopyLight', 'CopyMaterial', 'CopyMemory', 'CopyMemoryString', 'CopyMesh', 'CopySprite',
            +            'CopyTexture', 'CopyXMLNode', 'Cos', 'CountBillboards', 'CountGadgetItems', 'CountLibraryFunctions', 'CountList',
            +            'CountMaterialLayers', 'CountProgramParameters', 'CountRenderedTriangles', 'CountString', 'CRC32Fingerprint',
            +            'CreateBillboardGroup', 'CreateCamera', 'CreateDirectory', 'CreateEntity', 'CreateFile', 'CreateGadgetList',
            +            'CreateImage', 'CreateLight', 'CreateMaterial', 'CreateMenu', 'CreateMesh', 'CreateMutex', 'CreateNetworkServer',
            +            'CreatePack', 'CreatePalette', 'CreateParticleEmitter', 'CreatePopupMenu', 'CreatePreferences', 'CreateSprite',
            +            'CreateSprite3D', 'CreateStatusBar', 'CreateTerrain', 'CreateTexture', 'CreateThread', 'CreateToolBar', 'CreateXML',
            +            'CreateXMLNode', 'DatabaseColumnName', 'DatabaseColumns', 'DatabaseColumnType', 'DatabaseDriverDescription',
            +            'DatabaseDriverName', 'DatabaseError', 'DatabaseQuery', 'DatabaseUpdate', 'Date', 'DateGadget', 'Day', 'DayOfWeek',
            +            'DayOfYear', 'DefaultPrinter', 'Defined', 'Delay', 'DeleteDirectory', 'DeleteElement', 'DeleteFile', 'DeleteXMLNode',
            +            'DESFingerprint', 'DesktopDepth', 'DesktopFrequency', 'DesktopHeight', 'DesktopMouseX', 'DesktopMouseY', 'DesktopName',
            +            'DesktopWidth', 'DirectoryEntryAttributes', 'DirectoryEntryDate', 'DirectoryEntryName', 'DirectoryEntrySize',
            +            'DirectoryEntryType', 'DisableGadget', 'DisableMaterialLighting', 'DisableMenuItem', 'DisableToolBarButton', 'DisableWindow',
            +            'DisASMCommand', 'DisplayAlphaSprite', 'DisplayPalette', 'DisplayPopupMenu', 'DisplayRGBFilter', 'DisplayShadowSprite',
            +            'DisplaySolidSprite', 'DisplaySprite', 'DisplaySprite3D', 'DisplayTranslucentSprite', 'DisplayTransparentSprite', 'DragFiles',
            +            'DragImage', 'DragOSFormats', 'DragPrivate', 'DragText', 'DrawAlphaImage', 'DrawImage', 'DrawingBuffer',
            +            'DrawingBufferPitch', 'DrawingBufferPixelFormat', 'DrawingFont', 'DrawingMode', 'DrawText', 'EditorGadget',
            +            'egrid_AddColumn', 'egrid_AddRows', 'egrid_AppendCells', 'egrid_ClearRows', 'egrid_CopyCells',
            +            'egrid_CreateCellCallback', 'egrid_CreateGrid', 'egrid_DeleteCells', 'egrid_FastDeleteCells', 'egrid_FreeGrid',
            +            'egrid_GetCellSelection', 'egrid_GetCellText', 'egrid_GetColumnOrderArray', 'egrid_HasSelectedCellChanged', 'egrid_Height',
            +            'egrid_HideEdit', 'egrid_HideGrid', 'egrid_MakeCellVisible', 'egrid_NumberOfColumns', 'egrid_NumberOfRows',
            +            'egrid_PasteCells', 'egrid_Register', 'egrid_RemoveCellCallback', 'egrid_RemoveColumn', 'egrid_RemoveRow', 'egrid_Resize',
            +            'egrid_SelectCell', 'egrid_SelectedColumn', 'egrid_SelectedRow', 'egrid_SetCellSelection', 'egrid_SetCellText',
            +            'egrid_SetColumnOrderArray', 'egrid_SetHeaderFont', 'egrid_SetHeaderHeight', 'egrid_SetOption', 'egrid_Width', 'egrid_x',
            +            'egrid_y', 'EjectAudioCD', 'ElapsedMilliseconds', 'Ellipse', 'EnableGadgetDrop', 'EnableGraphicalConsole',
            +            'EnableWindowDrop', 'EnableWorldCollisions', 'EnableWorldPhysics', 'Engine3DFrameRate', 'EntityAngleX',
            +            'EntityAnimationLength', 'EntityLocate', 'EntityMaterial', 'EntityMesh', 'EntityPhysicBody', 'EntityRenderMode',
            +            'EntityX', 'EntityY', 'EntityZ', 'EnvironmentVariableName', 'EnvironmentVariableValue', 'Eof', 'EventClient',
            +            'EventDropAction', 'EventDropBuffer', 'EventDropFiles', 'EventDropImage', 'EventDropPrivate', 'EventDropSize',
            +            'EventDropText', 'EventDropType', 'EventDropX', 'EventDropY', 'EventGadget', 'EventlParam', 'EventMenu', 'EventServer',
            +            'EventType', 'EventWindow', 'EventwParam', 'ExamineDatabaseDrivers', 'ExamineDesktops', 'ExamineDirectory',
            +            'ExamineEnvironmentVariables', 'ExamineIPAddresses', 'ExamineJoystick', 'ExamineKeyboard', 'ExamineLibraryFunctions',
            +            'ExamineMouse', 'ExaminePreferenceGroups', 'ExaminePreferenceKeys', 'ExamineScreenModes', 'ExamineWorldCollisions',
            +            'ExamineXMLAttributes', 'ExplorerComboGadget', 'ExplorerListGadget', 'ExplorerTreeGadget', 'ExportXML',
            +            'ExportXMLSize', 'FileBuffersSize', 'FileID', 'FileSeek', 'FileSize', 'FillArea', 'FindString', 'FinishDirectory',
            +            'FirstDatabaseRow', 'FirstElement', 'FirstWorldCollisionEntity', 'FlipBuffers', 'FlushFileBuffers', 'Fog', 'FontID',
            +            'FontRequester', 'FormatDate', 'FormatXML', 'Frame3DGadget', 'FreeBillboardGroup', 'FreeCamera', 'FreeEntity',
            +            'FreeFont', 'FreeGadget', 'FreeImage', 'FreeLight', 'FreeMaterial', 'FreeMemory', 'FreeMenu', 'FreeMesh',
            +            'FreeModule', 'FreeMovie', 'FreeMutex', 'FreePalette', 'FreeParticleEmitter', 'FreeSound', 'FreeSprite',
            +            'FreeSprite3D', 'FreeStatusBar', 'FreeTexture', 'FreeToolBar', 'FreeXML', 'FrontColor', 'GadgetHeight', 'GadgetID',
            +            'GadgetItemID', 'GadgetToolTip', 'GadgetType', 'GadgetWidth', 'GadgetX', 'GadgetY', 'GetActiveGadget',
            +            'GetActiveWindow', 'GetClientIP', 'GetClientPort', 'GetClipboardImage', 'GetClipboardText', 'GetCurrentDirectory',
            +            'GetCurrentEIP', 'GetDatabaseDouble', 'GetDatabaseFloat', 'GetDatabaseLong', 'GetDatabaseQuad', 'GetDatabaseString',
            +            'GetDisASMString', 'GetEntityAnimationTime', 'GetEntityFriction', 'GetEntityMass', 'GetEnvironmentVariable',
            +            'GetErrorAddress', 'GetErrorCounter', 'GetErrorDescription', 'GetErrorDLL', 'GetErrorLineNR', 'GetErrorModuleName',
            +            'GetErrorNumber', 'GetErrorRegister', 'GetExtensionPart', 'GetFileAttributes', 'GetFileDate', 'GetFilePart', 'GetFunction',
            +            'GetFunctionEntry', 'GetGadgetAttribute', 'GetGadgetColor', 'GetGadgetData', 'GetGadgetFont',
            +            'GetGadgetItemAttribute', 'GetGadgetItemColor', 'GetGadgetItemData', 'GetGadgetItemState', 'GetGadgetItemText',
            +            'GetGadgetState', 'GetGadgetText', 'GetHomeDirectory', 'GetMenuItemState', 'GetMenuItemText', 'GetMenuTitleText',
            +            'GetModulePosition', 'GetModuleRow', 'GetPaletteColor', 'GetPathPart', 'GetTemporaryDirectory',
            +            'GetToolBarButtonState', 'GetWindowColor', 'GetWindowState', 'GetWindowTitle', 'GetXMLAttribute', 'GetXMLEncoding',
            +            'GetXMLNodeName', 'GetXMLNodeOffset', 'GetXMLNodeText', 'GetXMLStandalone', 'GoToEIP', 'GrabImage', 'GrabSprite',
            +            'Green', 'Hex', 'HexQ', 'HideBillboardGroup', 'HideEntity', 'HideGadget', 'HideLight', 'HideMenu', 'HideParticleEmitter',
            +            'HideWindow', 'Hostname', 'Hour', 'HyperLinkGadget', 'ImageDepth', 'ImageGadget', 'ImageHeight', 'ImageID',
            +            'ImageOutput', 'ImageWidth', 'InitAudioCD', 'InitEngine3D', 'InitJoystick', 'InitKeyboard', 'InitMouse', 'InitMovie',
            +            'InitNetwork', 'InitPalette', 'InitScintilla', 'InitSound', 'InitSprite', 'InitSprite3D', 'Inkey', 'Input', 'InputRequester',
            +            'InsertElement', 'Int', 'IntQ', 'IPAddressField', 'IPAddressGadget', 'IPString', 'IsBillboardGroup', 'IsCamera', 'IsDatabase',
            +            'IsDirectory', 'IsEntity', 'IsFile', 'IsFont', 'IsGadget', 'IsImage', 'IsLibrary', 'IsLight', 'IsMaterial', 'IsMenu', 'IsMesh',
            +            'IsModule', 'IsMovie', 'IsPalette', 'IsParticleEmitter', 'IsProgram', 'IsScreenActive', 'IsSound', 'IsSprite', 'IsSprite3D',
            +            'IsStatusBar', 'IsSysTrayIcon', 'IsTexture', 'IsThread', 'IsToolBar', 'IsWindow', 'IsXML', 'JoystickAxisX', 'JoystickAxisY',
            +            'JoystickButton', 'KeyboardInkey', 'KeyboardMode', 'KeyboardPushed', 'KeyboardReleased', 'KillProgram', 'KillThread',
            +            'LastElement', 'LCase', 'Left', 'Len', 'LibraryFunctionAddress', 'LibraryFunctionName', 'LibraryID', 'LightColor',
            +            'LightLocate', 'LightSpecularColor', 'Line', 'LineXY', 'ListIconGadget', 'ListIndex', 'ListViewGadget', 'LoadFont',
            +            'LoadImage', 'LoadMesh', 'LoadModule', 'LoadMovie', 'LoadPalette', 'LoadSound', 'LoadSprite', 'LoadTexture',
            +            'LoadWorld', 'LoadXML', 'Loc', 'LockMutex', 'Lof', 'Log', 'Log10', 'LSet', 'LTrim', 'MainXMLNode', 'MakeIPAddress',
            +            'MaterialAmbientColor', 'MaterialBlendingMode', 'MaterialDiffuseColor', 'MaterialFilteringMode', 'MaterialID',
            +            'MaterialShadingMode', 'MaterialSpecularColor', 'MD5FileFingerprint', 'MD5Fingerprint', 'MDIGadget', 'MemorySize',
            +            'MemoryStringLength', 'MenuBar', 'MenuHeight', 'MenuID', 'MenuItem', 'MenuTitle', 'MeshID', 'MessageRequester',
            +            'Mid', 'Minute', 'ModuleVolume', 'Month', 'MouseButton', 'MouseDeltaX', 'MouseDeltaY', 'MouseLocate', 'MouseWheel',
            +            'MouseX', 'MouseY', 'MoveBillboard', 'MoveBillboardGroup', 'MoveCamera', 'MoveEntity', 'MoveLight', 'MoveMemory',
            +            'MoveParticleEmitter', 'MoveXMLNode', 'MovieAudio', 'MovieHeight', 'MovieInfo', 'MovieLength', 'MovieSeek',
            +            'MovieStatus', 'MovieWidth', 'NetworkClientEvent', 'NetworkServerEvent', 'NewPrinterPage', 'NextDatabaseDriver',
            +            'NextDatabaseRow', 'NextDirectoryEntry', 'NextElement', 'NextEnvironmentVariable', 'NextIPAddress',
            +            'NextLibraryFunction', 'NextPackFile', 'NextPreferenceGroup', 'NextPreferenceKey', 'NextScreenMode',
            +            'NextSelectedFileName', 'NextWorldCollision', 'NextXMLAttribute', 'NextXMLNode', 'OffsetOf', 'OnErrorExit',
            +            'OnErrorGosub', 'OnErrorGoto', 'OnErrorResume', 'OpenComPort', 'OpenConsole', 'OpenDatabase',
            +            'OpenDatabaseRequester', 'OpenFile', 'OpenFileRequester', 'OpenGadgetList', 'OpenHelp', 'OpenLibrary',
            +            'OpenNetworkConnection', 'OpenPack', 'OpenPreferences', 'OpenScreen', 'OpenSubMenu', 'OpenWindow',
            +            'OpenWindowedScreen', 'OptionGadget', 'OSVersion', 'PackerCallback', 'PackFileSize', 'PackMemory', 'PanelGadget',
            +            'ParentXMLNode', 'Parse3DScripts', 'ParseDate', 'ParticleColorFader', 'ParticleColorRange', 'ParticleEmissionRate',
            +            'ParticleEmitterDirection', 'ParticleEmitterLocate', 'ParticleEmitterX', 'ParticleEmitterY', 'ParticleEmitterZ',
            +            'ParticleMaterial', 'ParticleSize', 'ParticleTimeToLive', 'ParticleVelocity', 'PathRequester', 'PauseAudioCD',
            +            'PauseMovie', 'PauseThread', 'PeekB', 'PeekC', 'PeekD', 'PeekF', 'PeekL', 'PeekQ', 'PeekS', 'PeekW', 'PlayAudioCD',
            +            'PlayModule', 'PlayMovie', 'PlaySound', 'Plot', 'Point', 'PokeB', 'PokeC', 'PokeD', 'PokeF', 'PokeL', 'PokeQ', 'PokeS',
            +            'PokeW', 'Pow', 'PreferenceComment', 'PreferenceGroup', 'PreferenceGroupName', 'PreferenceKeyName',
            +            'PreferenceKeyValue', 'PreviousDatabaseRow', 'PreviousElement', 'PreviousXMLNode', 'Print', 'PrinterOutput',
            +            'PrinterPageHeight', 'PrinterPageWidth', 'PrintN', 'PrintRequester', 'ProgramExitCode', 'ProgramFilename',
            +            'ProgramID', 'ProgramParameter', 'ProgramRunning', 'ProgressBarGadget', 'Random', 'RandomSeed', 'RawKey',
            +            'ReadByte', 'ReadCharacter', 'ReadConsoleData', 'ReadData', 'ReadDouble', 'ReadFile', 'ReadFloat', 'ReadLong',
            +            'ReadPreferenceDouble', 'ReadPreferenceFloat', 'ReadPreferenceLong', 'ReadPreferenceQuad',
            +            'ReadPreferenceString', 'ReadProgramData', 'ReadProgramError', 'ReadProgramString', 'ReadQuad', 'ReadString',
            +            'ReadStringFormat', 'ReadWord', 'ReAllocateMemory', 'ReceiveNetworkData', 'ReceiveNetworkFile', 'Red',
            +            'Reg_DeleteEmptyKey', 'Reg_DeleteKey', 'Reg_DeleteValue', 'Reg_GetErrorMsg', 'Reg_GetErrorNr',
            +            'Reg_GetValueTyp', 'Reg_ListSubKey', 'Reg_ListSubValue', 'Reg_ReadBinary', 'Reg_ReadExpandString',
            +            'Reg_ReadLong', 'Reg_ReadMultiLineString', 'Reg_ReadQuad', 'Reg_ReadString', 'Reg_WriteBinary',
            +            'Reg_WriteExpandString', 'Reg_WriteLong', 'Reg_WriteMultiLineString', 'Reg_WriteQuad', 'Reg_WriteString',
            +            'ReleaseMouse', 'RemoveBillboard', 'RemoveEnvironmentVariable', 'RemoveGadgetColumn', 'RemoveGadgetItem',
            +            'RemoveKeyboardShortcut', 'RemoveMaterialLayer', 'RemovePreferenceGroup', 'RemovePreferenceKey',
            +            'RemoveString', 'RemoveSysTrayIcon', 'RemoveXMLAttribute', 'RenameFile', 'RenderMovieFrame', 'RenderWorld',
            +            'ReplaceString', 'ResetList', 'ResizeBillboard', 'ResizeEntity', 'ResizeGadget', 'ResizeImage', 'ResizeMovie',
            +            'ResizeParticleEmitter', 'ResizeWindow', 'ResolveXMLAttributeName', 'ResolveXMLNodeName', 'ResumeAudioCD',
            +            'ResumeMovie', 'ResumeThread', 'RGB', 'Right', 'RootXMLNode', 'RotateBillboardGroup', 'RotateCamera',
            +            'RotateEntity', 'RotateMaterial', 'RotateSprite3D', 'Round', 'RSet', 'RTrim', 'RunProgram', 'SaveFileRequester',
            +            'SaveImage', 'SaveSprite', 'SaveXML', 'ScaleEntity', 'ScaleMaterial', 'ScintillaGadget', 'ScintillaSendMessage',
            +            'ScreenID', 'ScreenModeDepth', 'ScreenModeHeight', 'ScreenModeRefreshRate', 'ScreenModeWidth',
            +            'ScreenOutput', 'ScrollAreaGadget', 'ScrollBarGadget', 'ScrollMaterial', 'Second', 'SecondWorldCollisionEntity',
            +            'SelectedFilePattern', 'SelectedFontColor', 'SelectedFontName', 'SelectedFontSize', 'SelectedFontStyle',
            +            'SelectElement', 'SendNetworkData', 'SendNetworkFile', 'SendNetworkString', 'SetActiveGadget',
            +            'SetActiveWindow', 'SetClipboardImage', 'SetClipboardText', 'SetCurrentDirectory', 'SetDragCallback',
            +            'SetDropCallback', 'SetEntityAnimationTime', 'SetEntityFriction', 'SetEntityMass', 'SetEnvironmentVariable',
            +            'SetErrorNumber', 'SetFileAttributes', 'SetFileDate', 'SetFrameRate', 'SetGadgetAttribute', 'SetGadgetColor',
            +            'SetGadgetData', 'SetGadgetFont', 'SetGadgetItemAttribute', 'SetGadgetItemColor', 'SetGadgetItemData',
            +            'SetGadgetItemState', 'SetGadgetItemText', 'SetGadgetState', 'SetGadgetText', 'SetMenuItemState',
            +            'SetMenuItemText', 'SetMenuTitleText', 'SetMeshData', 'SetModulePosition', 'SetPaletteColor', 'SetRefreshRate',
            +            'SetToolBarButtonState', 'SetWindowCallback', 'SetWindowColor', 'SetWindowState', 'SetWindowTitle',
            +            'SetXMLAttribute', 'SetXMLEncoding', 'SetXMLNodeName', 'SetXMLNodeOffset', 'SetXMLNodeText',
            +            'SetXMLStandalone', 'Sin', 'SizeOf', 'SkyBox', 'SkyDome', 'SmartWindowRefresh', 'SortArray', 'SortList',
            +            'SortStructuredArray', 'SortStructuredList', 'SoundFrequency', 'SoundPan', 'SoundVolume', 'Space',
            +            'SpinGadget', 'SplitterGadget', 'Sprite3DBlendingMode', 'Sprite3DQuality', 'SpriteCollision', 'SpriteDepth',
            +            'SpriteHeight', 'SpriteID', 'SpriteOutput', 'SpritePixelCollision', 'SpriteWidth', 'Sqr', 'Start3D', 'StartDrawing',
            +            'StartPrinting', 'StartSpecialFX', 'StatusBarHeight', 'StatusBarIcon', 'StatusBarID', 'StatusBarText',
            +            'StickyWindow', 'Stop3D', 'StopAudioCD', 'StopDrawing', 'StopModule', 'StopMovie', 'StopPrinting',
            +            'StopSound', 'StopSpecialFX', 'Str', 'StrD', 'StrF', 'StringByteLength', 'StringField', 'StringGadget', 'StrQ',
            +            'StrU', 'Subsystem', 'SwapElements', 'SysTrayIconToolTip', 'Tan', 'TerrainHeight', 'TextGadget', 'TextHeight',
            +            'TextureHeight', 'TextureID', 'TextureOutput', 'TextureWidth', 'TextWidth', 'ThreadID', 'ThreadPriority',
            +            'ToolBarHeight', 'ToolBarID', 'ToolBarImageButton', 'ToolBarSeparator', 'ToolBarStandardButton',
            +            'ToolBarToolTip', 'TrackBarGadget', 'TransformSprite3D', 'TransparentSpriteColor', 'TreeGadget', 'Trim',
            +            'TruncateFile', 'TryLockMutex', 'UCase', 'UnlockMutex', 'UnpackMemory', 'UseAudioCD', 'UseBuffer',
            +            'UseGadgetList', 'UseJPEGImageDecoder', 'UseJPEGImageEncoder', 'UseODBCDatabase', 'UseOGGSoundDecoder',
            +            'UsePNGImageDecoder', 'UsePNGImageEncoder', 'UseTGAImageDecoder', 'UseTIFFImageDecoder', 'Val', 'ValD',
            +            'ValF', 'ValQ', 'WaitProgram', 'WaitThread', 'WaitWindowEvent', 'WebGadget', 'WebGadgetPath', 'WindowEvent',
            +            'WindowHeight', 'WindowID', 'WindowMouseX', 'WindowMouseY', 'WindowOutput', 'WindowWidth', 'WindowX',
            +            'WindowY', 'WorldGravity', 'WorldShadows', 'WriteByte', 'WriteCharacter', 'WriteConsoleData', 'WriteData',
            +            'WriteDouble', 'WriteFloat', 'WriteLong', 'WritePreferenceDouble', 'WritePreferenceFloat', 'WritePreferenceLong',
            +            'WritePreferenceQuad', 'WritePreferenceString', 'WriteProgramData', 'WriteProgramString', 'WriteProgramStringN',
            +            'WriteQuad', 'WriteString', 'WriteStringFormat', 'WriteStringN', 'WriteWord', 'XMLAttributeName', 'XMLAttributeValue',
            +            'XMLChildCount', 'XMLError', 'XMLErrorLine', 'XMLErrorPosition', 'XMLNodeFromID', 'XMLNodeFromPath', 'XMLNodePath',
            +            'XMLNodeType', 'XMLStatus', 'Year', 'ZoomSprite3D'
            +            ),
            +        3 => array(
            +            // some ASM instructions
            +            'AAA', 'AAD', 'AAM', 'AAS', 'ADC', 'ADD', 'AND', 'ARPL', 'BOUND', 'BSF', 'BSR', 'BSWAP', 'BT', 'BTC', 'BTR',
            +            'BTS', 'CALL', 'CBW', 'CDQ', 'CLC', 'CLD', 'CLI', 'CLTS', 'CMC', 'CMP', 'CMPS', 'CMPXCHG', 'CWD', 'CWDE',
            +            'DAA', 'DAS', 'DB', 'DD', 'DEC', 'DIV', 'DW', 'ENTER', 'ESC', 'F2XM1', 'FABS', 'FADD', 'FCHS', 'FCLEX',
            +            'FCOM', 'FDIV', 'FDIVR', 'FFREE', 'FINCSTP', 'FINIT', 'FLD', 'FLD1', 'FLDCW', 'FMUL', 'FNOP', 'FPATAN',
            +            'FPREM', 'FRNDINT', 'FSAVE', 'FSCALE', 'FSETPM', 'FSIN', 'FSQRT', 'FST', 'FSTENV', 'FSTSW', 'FSUB',
            +            'FSUBR', 'FTST', 'FUCOM', 'FWAIT', 'FXAM', 'FXCH', 'FXTRACT', 'FYL2X', 'FYL2XP1', 'HLT', 'IDIV', 'IMUL',
            +            'IN', 'INC', 'INS', 'INT', 'INTO', 'INVLPG', 'IRET', 'IRETD', 'JA', 'JAE', 'JB', 'JBE', 'JC', 'JCXZ', 'JE', 'JECXZ',
            +            'JG', 'JGE', 'JL', 'JLE', 'JMP', 'JNA', 'JNAE', 'JNB', 'JNBE', 'JNC', 'JNE', 'JNG', 'JNGE', 'JNL', 'JNLE', 'JNO', 'JNP',
            +            'JNS', 'JNZ', 'JO', 'JP', 'JPE', 'JPO', 'JS', 'JZ', 'LAHF', 'LAR', 'LDS', 'LEA', 'LEAVE', 'LES', 'LFS', 'LGDT', 'LGS',
            +            'LIDT', 'LLDT', 'LMSW', 'LOCK', 'LODS', 'LOOP', 'LOOPE', 'LOOPNE', 'LOOPNZ', 'LOOPZ', 'LSL', 'LSS', 'LTR',
            +            'MOV', 'MOVS', 'MOVSX', 'MOVZX', 'MUL', 'NEG', 'NOP', 'NOT', 'OR', 'OUT', 'OUTS', 'POP', 'POPA', 'POPAD',
            +            'POPF', 'POPFD', 'PUSH', 'PUSHA', 'PUSHAD', 'PUSHF', 'PUSHFD', 'RCL', 'RCR', 'REP', 'REPE', 'REPNE',
            +            'REPNZ', 'REPZ', 'RET', 'RETF', 'ROL', 'ROR', 'SAHF', 'SAL', 'SAR', 'SBB', 'SCAS', 'SETAE', 'SETB', 'SETBE',
            +            'SETC', 'SETE', 'SETG', 'SETGE', 'SETL', 'SETLE', 'SETNA', 'SETNAE', 'SETNB', 'SETNC', 'SETNE', 'SETNG',
            +            'SETNGE', 'SETNL', 'SETNLE', 'SETNO', 'SETNP', 'SETNS', 'SETNZ', 'SETO', 'SETP', 'SETPE', 'SETPO',
            +            'SETS', 'SETZ', 'SGDT', 'SHL', 'SHLD', 'SHR', 'SHRD', 'SIDT', 'SLDT', 'SMSW', 'STC', 'STD', 'STI',
            +            'STOS', 'STR', 'SUB', 'TEST', 'VERR', 'VERW', 'WAIT', 'WBINVD', 'XCHG', 'XLAT', 'XLATB', 'XOR'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '+', '-', '*', '/', '\\', '>', '<', '=', '<=', '>=', '&', '|', '!', '~', '<>', '>>', '<<', '%'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000066; font-weight: bold;',
            +            2 => 'color: #0000ff;',
            +            3 => 'color: #000fff;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #ff0000; font-style: italic;',
            +            'MULTI' => 'color: #ff0000; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000066;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #CC0000;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #006600;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #000066;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            0 => '',
            +            1 => '',
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '\\'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        0 => false,
            +        1 => false
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/pycon.php b/vendor/easybook/geshi/geshi/pycon.php
            new file mode 100644
            index 0000000000..a2159123b3
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/pycon.php
            @@ -0,0 +1,63 @@
            +>>).*?$(?:\n\.\.\..*?$)*($)/m';
            +$language_data['HIGHLIGHT_STRICT_BLOCK'][-1] = true;
            +
            +$language_data['STYLES']['SCRIPT'][-1] = 'color: #222222;';
            +
            +if(!isset($language_data['COMMENT_REGEXP'])) {
            +    $language_data['COMMENT_REGEXP'] = array();
            +}
            +
            +$language_data['COMMENT_REGEXP'][-1] = '/(?:^|\A\s)(?:>>>|\.\.\.)/m';
            +$language_data['STYLES']['COMMENTS'][-1] = 'color: #444444;';
            +
            diff --git a/vendor/easybook/geshi/geshi/pys60.php b/vendor/easybook/geshi/geshi/pys60.php
            new file mode 100644
            index 0000000000..865b59adbd
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/pys60.php
            @@ -0,0 +1,271 @@
            + 'Python for S60',
            +    'COMMENT_SINGLE' => array(1 => '#'),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"', "'", '"""',"'''",'""','""'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +
            +        /*
            +         ** Set 1: reserved words
            +         ** http://python.org/doc/current/ref/keywords.html
            +         */
            +        1 => array(
            +            'and', 'del', 'for', 'is', 'raise', 'assert', 'elif', 'from', 'lambda', 'return', 'break',
            +            'else', 'global', 'not', 'try', 'class', 'except', 'if', 'or', 'while', 'continue', 'exec',
            +            'import', 'pass', 'yield', 'def', 'finally', 'in', 'print', "<<", ">>", "as"
            +            ),
            +
            +        /*
            +         ** Set 2: builtins
            +         ** http://python.org/doc/current/lib/built-in-funcs.html
            +         */
            +        2 => array(
            +            '__import__', 'abs', 'basestring', 'bool', 'callable', 'chr', 'classmethod', 'cmp',
            +            'compile', 'complex', 'delattr', 'dict', 'dir', 'divmod', 'enumerate', 'eval', 'execfile',
            +            'file', 'filter', 'float', 'frozenset', 'getattr', 'globals', 'hasattr', 'hash', 'help',
            +            'hex', 'id', 'input', 'int', 'isinstance', 'issubclass', 'iter', 'len', 'list', 'locals',
            +            'long', 'map', 'max', 'min', 'object', 'oct', 'open', 'ord', 'pow', 'property', 'range',
            +            'raw_input', 'reduce', 'reload', 'repr', 'reversed', 'round', 'set', 'setattr', 'slice',
            +            'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', 'type', 'unichr', 'unicode',
            +            'vars', 'xrange', 'zip',
            +            // Built-in constants: http://python.org/doc/current/lib/node35.html
            +            'False', 'True', 'None', 'NotImplemented', 'Ellipsis',
            +            // Built-in Exceptions: http://python.org/doc/current/lib/module-exceptions.html
            +            'Exception', 'StandardError', 'ArithmeticError', 'LookupError', 'EnvironmentError',
            +            'AssertionError', 'AttributeError', 'EOFError', 'FloatingPointError', 'IOError',
            +            'ImportError', 'IndexError', 'KeyError', 'KeyboardInterrupt', 'MemoryError', 'NameError',
            +            'NotImplementedError', 'OSError', 'OverflowError', 'ReferenceError', 'RuntimeError',
            +            'StopIteration', 'SyntaxError', 'SystemError', 'SystemExit', 'TypeError',
            +            'UnboundlocalError', 'UnicodeError', 'UnicodeEncodeError', 'UnicodeDecodeError',
            +            'UnicodeTranslateError', 'ValueError', 'WindowsError', 'ZeroDivisionError', 'Warning',
            +            'UserWarning', 'DeprecationWarning', 'PendingDeprecationWarning', 'SyntaxWarning',
            +            'RuntimeWarning', 'FutureWarning',
            +            //Symbian Errors
            +            "SymbianError", "KernelError",
            +            // self: this is a common python convention (but not a reserved word)
            +            'self'
            +            ),
            +
            +        /*
            +         ** Set 3: standard library
            +         ** http://python.org/doc/current/lib/modindex.html
            +         */
            +        3 => array(
            +            '__builtin__', '__future__', '__main__', '_winreg', 'aifc', 'AL', 'al', 'anydbm',
            +            'array', 'asynchat', 'asyncore', 'atexit', 'audioop', 'base64', 'BaseHTTPServer',
            +            'Bastion', 'binascii', 'binhex', 'bisect', 'bsddb', 'bz2', 'calendar', 'cd', 'cgi',
            +            'CGIHTTPServer', 'cgitb', 'chunk', 'cmath', 'cmd', 'code', 'codecs', 'codeop',
            +            'collections', 'colorsys', 'commands', 'compileall', 'compiler',
            +            'ConfigParser', 'Cookie', 'cookielib', 'copy', 'copy_reg', 'cPickle', 'crypt',
            +            'cStringIO', 'csv', 'curses', 'datetime', 'dbhash', 'dbm', 'decimal', 'DEVICE',
            +            'difflib', 'dircache', 'dis', 'distutils', 'dl', 'doctest', 'DocXMLRPCServer', 'dumbdbm',
            +            'dummy_thread', 'dummy_threading', 'email', 'encodings', 'errno', 'exceptions', 'fcntl',
            +            'filecmp', 'fileinput', 'FL', 'fl', 'flp', 'fm', 'fnmatch', 'formatter', 'fpectl',
            +            'fpformat', 'ftplib', 'gc', 'gdbm', 'getopt', 'getpass', 'gettext', 'GL', 'gl', 'glob',
            +            'gopherlib', 'grp', 'gzip', 'heapq', 'hmac', 'hotshot', 'htmlentitydefs', 'htmllib',
            +            'HTMLParser', 'httplib', 'imageop', 'imaplib', 'imgfile', 'imghdr', 'imp', 'inspect',
            +            'itertools', 'jpeg', 'keyword', 'linecache', 'locale', 'logging', 'mailbox', 'mailcap',
            +            'marshal', 'math', 'md5', 'mhlib', 'mimetools', 'mimetypes', 'MimeWriter', 'mimify',
            +            'mmap', 'msvcrt', 'multifile', 'mutex', 'netrc', 'new', 'nis', 'nntplib', 'operator',
            +            'optparse', 'os', 'ossaudiodev', 'parser', 'pdb', 'pickle', 'pickletools', 'pipes',
            +            'pkgutil', 'platform', 'popen2', 'poplib', 'posix', 'posixfile', 'pprint', 'profile',
            +            'pstats', 'pty', 'pwd', 'py_compile', 'pyclbr', 'pydoc', 'Queue', 'quopri', 'random',
            +            're', 'readline', 'resource', 'rexec', 'rgbimg', 'rlcompleter',
            +            'robotparser', 'sched', 'ScrolledText', 'select', 'sets', 'sgmllib', 'sha', 'shelve',
            +            'shlex', 'shutil', 'signal', 'SimpleHTTPServer', 'SimpleXMLRPCServer', 'site', 'smtpd',
            +            'smtplib', 'sndhdr', 'socket', 'SocketServer', 'stat', 'statcache', 'statvfs', 'string',
            +            'StringIO', 'stringprep', 'struct', 'subprocess', 'sunau', 'SUNAUDIODEV', 'sunaudiodev',
            +            'symbol', 'sys', 'syslog', 'tabnanny', 'tarfile', 'telnetlib', 'tempfile', 'termios',
            +            'test', 'textwrap', 'thread', 'threading', 'time', 'timeit', 'Tix', 'Tkinter', 'token',
            +            'tokenize', 'traceback', 'tty', 'turtle', 'types', 'unicodedata', 'unittest', 'urllib2',
            +            'urllib', 'urlparse', 'user', 'UserDict', 'UserList', 'UserString', 'uu', 'warnings',
            +            'wave', 'weakref', 'webbrowser', 'whichdb', 'whrandom', 'winsound', 'xdrlib', 'xml',
            +            'xmllib', 'xmlrpclib', 'zipfile', 'zipimport', 'zlib', "os.path", "sys.path",
            +
            +            //PythonS60 Standard Library
            +            //http://pys60.garage.maemo.org/doc/s60/
            +            //These are the standard modules in the archive
            +
            +            "appuifw", "globalui","e32", "telephone", "aosocket", "btsocket",
            +            "sysinfo","camera","graphics","keycapture","key_codes","topwindow", "gles",
            +            "glcanvas","sensor", "audio","messaging", "inbox","location","positioning",
            +            "contacts", "e32calendar", "e32db","e32dbm","logs","scriptext",
            +            "series60_console",
            +
            +            //These are external but very often usable modules
            +
            +            "appuifw2","ArchetypeUI","elementtree","lightblue",
            +            "activaprofile","Adjustor","akntextutils","aosocketnativenew",
            +            "appreciation","applicationmanager","appswitch","atextit","bt_teror","btconsole",
            +            "btswitch","cElementTree","cenrep","cerealizer","cl_gui","clipboard",
            +            "clipboard_CHN","debugger","decompile2",
            +            "dir_iter","download","easydb","ECenrep","Edit_find","efeature","elocation","envy",
            +            "EProfile","erestart","error","esyagent","Execwap","exprofile","fastcamera",
            +            "feature","fgimage","filebrowser","firmware","fold","fonts","fraction","FTP",
            +            "ftplibnew","fy_manager","fy_menu","gles_utils","gps_location","hack",
            +            "HTML2TXT","iapconnect","icon_image","image_decoder",
            +            "ini","interactive_console","inting","key_modifiers","key_tricks","keypress",
            +            "landmarks","lite_fm","locationacq","locationrequestor",
            +            "logo","markupbase","mbm","mbm2","minidb","miniinfo","MISC",
            +            "misty","Msg","ntpath","odict","Paintbox","pathinfo","pexif","pickcolor",
            +            "powlite_fm","powlite_fm2","powlite_fm3","powlite_fme","prgbar","prodb",
            +            "profileengine","progressbar","progressbartw","progressnotes",
            +            "ProgressBarTW2","proshivka","py_upload","pyConnection","PyFileMan",
            +            "pykeylock","PyPyc","pyqq","pys60crypto","pys60usb","rfc822",
            +            "RUSOS","scmk","scrollpage","SISFIELDS","SISFIELD","sisfile",
            +            "SISINFO","sisreader","Sistools","smidi","smsreject","speechy","sre_compile",
            +            "sre_constants","sre_parse","sre","sysagent","syslang","TextMan",
            +            "textrenderer","TextWrap","topwind","tsocket","uikludge","uikludges","uitricks",
            +            "walkfile","wallpaper","wfm_lite",
            +            "wif_keys","wif","window","wlanmgmt","wlantools","wt_color","wt_requesters",
            +            "zhkey",
            +
            +            //These are recent additions
            +            "miffile"
            +            ),
            +
            +        /*
            +         ** Set 4: special methods
            +         ** http://python.org/doc/current/ref/specialnames.html
            +         */
            +        4 => array(
            +            ///*
            +            //// Iterator types: http://python.org/doc/current/lib/typeiter.html
            +            //'__iter__', 'next',
            +            //// String types: http://python.org/doc/current/lib/string-methods.html
            +            //'capitalize', 'center', 'count', 'decode', 'encode', 'endswith', 'expandtabs',
            +            //'find', 'index', 'isalnum', 'isalpha', 'isdigit', 'islower', 'isspace', 'istitle',
            +            //'isupper', 'join', 'ljust', 'lower', 'lstrip', 'replace', 'rfind', 'rindex', 'rjust',
            +            //'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title',
            +            //'translate', 'upper', 'zfill',
            +            // */
            +
            +            // Basic customization: http://python.org/doc/current/ref/customization.html
            +            '__new__', '__init__', '__del__', '__repr__', '__str__',
            +            '__lt__', '__le__', '__eq__', '__ne__', '__gt__', '__ge__', '__cmp__', '__rcmp__',
            +            '__hash__', '__nonzero__', '__unicode__', '__dict__',
            +            // Attribute access: http://python.org/doc/current/ref/attribute-access.html
            +            '__setattr__', '__delattr__', '__getattr__', '__getattribute__', '__get__', '__set__',
            +            '__delete__', '__slots__',
            +            // Class creation, callable objects
            +            '__metaclass__', '__call__',
            +            // Container types: http://python.org/doc/current/ref/sequence-types.html
            +            '__len__', '__getitem__', '__setitem__', '__delitem__', '__iter__', '__contains__',
            +            '__getslice__', '__setslice__', '__delslice__',
            +            // Numeric types: http://python.org/doc/current/ref/numeric-types.html
            +            '__abs__','__add__','__and__','__coerce__','__div__','__divmod__','__float__',
            +            '__hex__','__iadd__','__isub__','__imod__','__idiv__','__ipow__','__iand__',
            +            '__ior__','__ixor__', '__ilshift__','__irshift__','__invert__','__int__',
            +            '__long__','__lshift__',
            +            '__mod__','__mul__','__neg__','__oct__','__or__','__pos__','__pow__',
            +            '__radd__','__rdiv__','__rdivmod__','__rmod__','__rpow__','__rlshift__','__rrshift__',
            +            '__rshift__','__rsub__','__rmul__','__rand__','__rxor__','__ror__',
            +            '__sub__','__xor__'
            +            )
            +
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '[', ']', '{', '}', '*', '&', '%', '!', ';', '<', '>', '?', '`'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => true,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #006000;font-weight:bold;',   // Reserved
            +            2 => 'color: #800950;font-size:105%',                  // Built-ins + self
            +            3 => 'color: #003399;font-size:106%',                  // Standard lib
            +            4 => 'color: #0000cd;'                  // Special methods
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style:italic;font-size:92%',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #930; font-weight: bold;font-size:105%'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: maroon;font-size:102%;padding:2px'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #666;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #2356F8;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: navy;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66ccFF;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/python.php b/vendor/easybook/geshi/geshi/python.php
            new file mode 100644
            index 0000000000..b534dfc47a
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/python.php
            @@ -0,0 +1,243 @@
            + 'Python',
            +    'COMMENT_SINGLE' => array(1 => '#'),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    //Longest quotemarks ALWAYS first
            +    'QUOTEMARKS' => array('"""', "'''", '"', "'"),
            +    'ESCAPE_CHAR' => '\\',
            +    'NUMBERS' =>
            +        GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_BIN_PREFIX_0B |
            +        GESHI_NUMBER_OCT_PREFIX_0O | GESHI_NUMBER_HEX_PREFIX |
            +        GESHI_NUMBER_FLT_NONSCI | GESHI_NUMBER_FLT_NONSCI_F |
            +        GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO,
            +    'KEYWORDS' => array(
            +
            +        /*
            +        ** Set 1: reserved words
            +        ** http://python.org/doc/current/ref/keywords.html
            +        */
            +        1 => array(
            +            'and', 'del', 'for', 'is', 'raise', 'assert', 'elif', 'from', 'lambda', 'return', 'break',
            +            'else', 'global', 'not', 'try', 'class', 'except', 'if', 'or', 'while', 'continue', 'exec',
            +            'import', 'pass', 'yield', 'def', 'finally', 'in', 'print', 'with', 'as', 'nonlocal'
            +            ),
            +
            +        /*
            +        ** Set 2: builtins
            +        ** http://python.org/doc/current/lib/built-in-funcs.html
            +        */
            +        2 => array(
            +            '__import__', 'abs', 'basestring', 'bool', 'callable', 'chr', 'classmethod', 'cmp',
            +            'compile', 'complex', 'delattr', 'dict', 'dir', 'divmod', 'enumerate', 'eval', 'execfile',
            +            'file', 'filter', 'float', 'frozenset', 'getattr', 'globals', 'hasattr', 'hash', 'help',
            +            'hex', 'id', 'input', 'int', 'isinstance', 'issubclass', 'iter', 'len', 'list', 'locals',
            +            'long', 'map', 'max', 'min', 'object', 'oct', 'open', 'ord', 'pow', 'property', 'range',
            +            'raw_input', 'reduce', 'reload', 'reversed', 'round', 'set', 'setattr', 'slice',
            +            'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', 'type', 'unichr', 'unicode',
            +            'vars', 'xrange', 'zip',
            +            // Built-in constants: http://python.org/doc/current/lib/node35.html
            +            'False', 'True', 'None', 'NotImplemented', 'Ellipsis',
            +            // Built-in Exceptions: http://python.org/doc/current/lib/module-exceptions.html
            +            'Exception', 'StandardError', 'ArithmeticError', 'LookupError', 'EnvironmentError',
            +            'AssertionError', 'AttributeError', 'EOFError', 'FloatingPointError', 'IOError',
            +            'ImportError', 'IndexError', 'KeyError', 'KeyboardInterrupt', 'MemoryError', 'NameError',
            +            'NotImplementedError', 'OSError', 'OverflowError', 'ReferenceError', 'RuntimeError',
            +            'StopIteration', 'SyntaxError', 'SystemError', 'SystemExit', 'TypeError',
            +            'UnboundlocalError', 'UnicodeError', 'UnicodeEncodeError', 'UnicodeDecodeError',
            +            'UnicodeTranslateError', 'ValueError', 'WindowsError', 'ZeroDivisionError', 'Warning',
            +            'UserWarning', 'DeprecationWarning', 'PendingDeprecationWarning', 'SyntaxWarning',
            +            'RuntimeWarning', 'FutureWarning',
            +            // self: this is a common python convention (but not a reserved word)
            +            'self',
            +            // other
            +            'any', 'all'
            +            ),
            +
            +        /*
            +        ** Set 3: standard library
            +        ** http://python.org/doc/current/lib/modindex.html
            +        */
            +        3 => array(
            +            '__builtin__', '__future__', '__main__', '_winreg', 'aifc', 'AL', 'al', 'anydbm',
            +            'array', 'asynchat', 'asyncore', 'atexit', 'audioop', 'base64', 'BaseHTTPServer',
            +            'Bastion', 'binascii', 'binhex', 'bisect', 'bsddb', 'bz2', 'calendar', 'cd', 'cgi',
            +            'CGIHTTPServer', 'cgitb', 'chunk', 'cmath', 'cmd', 'code', 'codecs', 'codeop',
            +            'collections', 'colorsys', 'commands', 'compileall', 'compiler',
            +            'ConfigParser', 'Cookie', 'cookielib', 'copy', 'copy_reg', 'cPickle', 'crypt',
            +            'cStringIO', 'csv', 'curses', 'datetime', 'dbhash', 'dbm', 'decimal', 'DEVICE',
            +            'difflib', 'dircache', 'dis', 'distutils', 'dl', 'doctest', 'DocXMLRPCServer', 'dumbdbm',
            +            'dummy_thread', 'dummy_threading', 'email', 'encodings', 'errno', 'exceptions', 'fcntl',
            +            'filecmp', 'fileinput', 'FL', 'fl', 'flp', 'fm', 'fnmatch', 'formatter', 'fpectl',
            +            'fpformat', 'ftplib', 'gc', 'gdbm', 'getopt', 'getpass', 'gettext', 'GL', 'gl', 'glob',
            +            'gopherlib', 'grp', 'gzip', 'heapq', 'hmac', 'hotshot', 'htmlentitydefs', 'htmllib',
            +            'HTMLParser', 'httplib', 'imageop', 'imaplib', 'imgfile', 'imghdr', 'imp', 'inspect',
            +            'itertools', 'jpeg', 'keyword', 'linecache', 'locale', 'logging', 'mailbox', 'mailcap',
            +            'marshal', 'math', 'md5', 'mhlib', 'mimetools', 'mimetypes', 'MimeWriter', 'mimify',
            +            'mmap', 'msvcrt', 'multifile', 'mutex', 'netrc', 'new', 'nis', 'nntplib', 'operator',
            +            'optparse', 'os', 'ossaudiodev', 'parser', 'pdb', 'pickle', 'pickletools', 'pipes',
            +            'pkgutil', 'platform', 'popen2', 'poplib', 'posix', 'posixfile', 'pprint', 'profile',
            +            'pstats', 'pty', 'pwd', 'py_compile', 'pyclbr', 'pydoc', 'Queue', 'quopri', 'random',
            +            're', 'readline', 'repr', 'resource', 'rexec', 'rfc822', 'rgbimg', 'rlcompleter',
            +            'robotparser', 'sched', 'ScrolledText', 'select', 'sets', 'sgmllib', 'sha', 'shelve',
            +            'shlex', 'shutil', 'signal', 'SimpleHTTPServer', 'SimpleXMLRPCServer', 'site', 'smtpd',
            +            'smtplib', 'sndhdr', 'socket', 'SocketServer', 'stat', 'statcache', 'statvfs', 'string',
            +            'StringIO', 'stringprep', 'struct', 'subprocess', 'sunau', 'SUNAUDIODEV', 'sunaudiodev',
            +            'symbol', 'sys', 'syslog', 'tabnanny', 'tarfile', 'telnetlib', 'tempfile', 'termios',
            +            'test', 'textwrap', 'thread', 'threading', 'time', 'timeit', 'Tix', 'Tkinter', 'token',
            +            'tokenize', 'traceback', 'tty', 'turtle', 'types', 'unicodedata', 'unittest', 'urllib2',
            +            'urllib', 'urlparse', 'user', 'UserDict', 'UserList', 'UserString', 'uu', 'warnings',
            +            'wave', 'weakref', 'webbrowser', 'whichdb', 'whrandom', 'winsound', 'xdrlib', 'xml',
            +            'xmllib', 'xmlrpclib', 'zipfile', 'zipimport', 'zlib',
            +            // Python 3.0
            +            'bytes', 'bytearray'
            +            ),
            +
            +        /*
            +        ** Set 4: special methods
            +        ** http://python.org/doc/current/ref/specialnames.html
            +        */
            +        4 => array(
            +            /*
            +            // Iterator types: http://python.org/doc/current/lib/typeiter.html
            +            '__iter__', 'next',
            +            // String types: http://python.org/doc/current/lib/string-methods.html
            +            'capitalize', 'center', 'count', 'decode', 'encode', 'endswith', 'expandtabs',
            +            'find', 'index', 'isalnum', 'isalpha', 'isdigit', 'islower', 'isspace', 'istitle',
            +            'isupper', 'join', 'ljust', 'lower', 'lstrip', 'replace', 'rfind', 'rindex', 'rjust',
            +            'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title',
            +            'translate', 'upper', 'zfill',
            +            */
            +            // Basic customization: http://python.org/doc/current/ref/customization.html
            +            '__new__', '__init__', '__del__', '__repr__', '__str__',
            +            '__lt__', '__le__', '__eq__', '__ne__', '__gt__', '__ge__', '__cmp__', '__rcmp__',
            +            '__hash__', '__nonzero__', '__unicode__', '__dict__',
            +            // Attribute access: http://python.org/doc/current/ref/attribute-access.html
            +            '__setattr__', '__delattr__', '__getattr__', '__getattribute__', '__get__', '__set__',
            +            '__delete__', '__slots__',
            +            // Class creation, callable objects
            +            '__metaclass__', '__call__',
            +            // Container types: http://python.org/doc/current/ref/sequence-types.html
            +            '__len__', '__getitem__', '__setitem__', '__delitem__', '__iter__', '__contains__',
            +            '__getslice__', '__setslice__', '__delslice__',
            +            // Numeric types: http://python.org/doc/current/ref/numeric-types.html
            +            '__abs__','__add__','__and__','__coerce__','__div__','__divmod__','__float__',
            +            '__hex__','__iadd__','__isub__','__imod__','__idiv__','__ipow__','__iand__',
            +            '__ior__','__ixor__', '__ilshift__','__irshift__','__invert__','__int__',
            +            '__long__','__lshift__',
            +            '__mod__','__mul__','__neg__','__oct__','__or__','__pos__','__pow__',
            +            '__radd__','__rdiv__','__rdivmod__','__rmod__','__rpow__','__rlshift__','__rrshift__',
            +            '__rshift__','__rsub__','__rmul__','__rand__','__rxor__','__ror__',
            +            '__sub__','__xor__'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '<', '>', '=', '!', '<=', '>=',             //·comparison·operators
            +        '~', '@',                                   //·unary·operators
            +        ';', ','                                    //·statement·separator
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #ff7700;font-weight:bold;',    // Reserved
            +            2 => 'color: #008000;',                        // Built-ins + self
            +            3 => 'color: #dc143c;',                        // Standard lib
            +            4 => 'color: #0000cd;'                        // Special methods
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: black;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #483d8b;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #ff4500;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: black;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/q.php b/vendor/easybook/geshi/geshi/q.php
            new file mode 100644
            index 0000000000..c1ea9aa4a3
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/q.php
            @@ -0,0 +1,148 @@
            +)
            + * -------------------------
            + *  - Fix the handling of single line comments
            + *
            + *************************************************************************************
            + *
            + *     This file is part of GeSHi.
            + *
            + *   GeSHi is free software; you can redistribute it and/or modify
            + *   it under the terms of the GNU General Public License as published by
            + *   the Free Software Foundation; either version 2 of the License, or
            + *   (at your option) any later version.
            + *
            + *   GeSHi is distributed in the hope that it will be useful,
            + *   but WITHOUT ANY WARRANTY; without even the implied warranty of
            + *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
            + *   GNU General Public License for more details.
            + *
            + *   You should have received a copy of the GNU General Public License
            + *   along with GeSHi; if not, write to the Free Software
            + *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
            + *
            + ************************************************************************************/
            +
            +$language_data = array (
            +    'LANG_NAME'                 => 'q/kdb+',
            +    'COMMENT_SINGLE'            => array(1 => '//'),
            +    'COMMENT_MULTI'             => array(),
            +    'COMMENT_REGEXP'            => array(
            +        2 => '/ \s\/.*/',         # This needs to get fixed up, since it won't catch some instances
            +        # Multi line comments (Moved from REGEXPS)
            +        3 => '/^\/\s*?\n.*?\n\\\s*?\n/smi'
            +        ),
            +    'CASE_KEYWORDS'             => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS'                => array('"'),
            +    'ESCAPE_CHAR'               => '\\',
            +    'OOLANG'                    => false,
            +    'OBJECT_SPLITTERS'          => array(),
            +    'STRICT_MODE_APPLIES'       => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS'         => array(),
            +    'HIGHLIGHT_STRICT_BLOCK'    => array(),
            +    'TAB_WIDTH'                 => 4,
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'abs', 'acos', 'all', 'and', 'any', 'asc', 'asin', 'asof', 'atan', 'attr', 'avg', 'avgs', 'bin', 'ceiling',
            +            'cols', 'cor', 'cos', 'count', 'cov', 'cross', 'cut', 'deltas', 'desc', 'dev', 'differ', 'distinct',
            +            'div', 'each', 'enlist', 'eval', 'except', 'exec', 'exit', 'exp', 'fills', 'first', 'flip', 'floor',
            +            'fkeys', 'get', 'getenv', 'group', 'gtime', 'hclose', 'hcount', 'hdel', 'hopen', 'hsym', 'iasc', 'idesc',
            +            'in', 'insert', 'inter', 'inv', 'joins', 'key', 'keys', 'last', 'like', 'load', 'log', 'lower',
            +            'lsq', 'ltime', 'ltrim', 'mavg', 'max', 'maxs', 'mcount', 'md5', 'mdev', 'med', 'meta', 'min', 'mins',
            +            'mmax', 'mmin', 'mmu', 'mod', 'msum', 'neg', 'next', 'not', 'null', 'or', 'over', 'parse', 'peach',
            +            'plist', 'prd', 'prds', 'prev', 'rand', 'rank', 'ratios', 'raze', 'read0', 'read1', 'reciprocal',
            +            'reverse', 'rload', 'rotate', 'rsave', 'rtrim', 'save', 'scan', 'set', 'setenv', 'show', 'signum',
            +            'sin', 'sqrt', 'ss', 'ssr', 'string', 'sublist', 'sum', 'sums', 'sv', 'system', 'tables', 'tan', 'til', 'trim',
            +            'txf', 'type', 'ungroup', 'union', 'upper', 'upsert', 'value', 'var', 'view', 'views', 'vs',
            +            'wavg', 'within', 'wsum', 'xasc', 'xbar', 'xcol', 'xcols', 'xdesc', 'xexp', 'xgroup', 'xkey',
            +            'xlog', 'xprev', 'xrank'
            +            ),
            +        # kdb database template keywords
            +        2 => array(
            +            'aj', 'by', 'delete', 'fby', 'from', 'ij', 'lj', 'pj', 'select', 'uj', 'update', 'where', 'wj',
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '?', '#', ',', '_', '@', '.', '^', '~', '$', '!', '\\', '\\', '/:', '\:', "'", "':", '::', '+', '-', '%', '*'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000099; font-weight: bold;',
            +            2 => 'color: #009900; font-weight: bold;',
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; font-style: italic;',
            +            2 => 'color: #666666; font-style: italic;',
            +            3 => 'color: #808080; font-style: italic;',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;',
            +            1 => 'color: #000099; font-weight: bold;',
            +            2 => 'color: #660099; font-weight: bold;',
            +            3 => 'color: #660099; font-weight: bold;',
            +            4 => 'color: #660099; font-weight: bold;',
            +            5 => 'color: #006699; font-weight: bold;',
            +            'HARD' => '',
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #990000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #0000dd;',
            +            GESHI_NUMBER_BIN_PREFIX_0B => 'color: #208080;',
            +            GESHI_NUMBER_OCT_PREFIX => 'color: #208080;',
            +            GESHI_NUMBER_HEX_PREFIX => 'color: #208080;',
            +            GESHI_NUMBER_FLT_SCI_SHORT => 'color:#800080;',
            +            GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;',
            +            GESHI_NUMBER_FLT_NONSCI_F => 'color:#800080;',
            +            GESHI_NUMBER_FLT_NONSCI => 'color:#800080;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #202020;',
            +            2 => 'color: #202020;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #339933;'
            +            ),
            +        'REGEXPS' => array(
            +            2   => 'color: #999900;',
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'REGEXPS' => array(
            +        # Symbols
            +        2 => '`[^\s"]*',
            +        ),
            +    'URLS'  => array(
            +        1   => '',
            +        2   => '',
            +        ),
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/qbasic.php b/vendor/easybook/geshi/geshi/qbasic.php
            new file mode 100644
            index 0000000000..b805d29705
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/qbasic.php
            @@ -0,0 +1,161 @@
            + 'QBasic/QuickBASIC',
            +    'COMMENT_SINGLE' => array(1 => "'"),
            +    'COMMENT_MULTI' => array(),
            +    'COMMENT_REGEXP' => array(
            +        //Single-Line Comments using REM command
            +        2 => "/\bREM.*?$/i",
            +        //Line numbers
            +        3 => "/^\s*\d+/im"
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_UPPER,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '',
            +    'NUMBERS' =>
            +        GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_FLT_NONSCI |
            +        GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT |
            +        GESHI_NUMBER_FLT_SCI_ZERO,
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'DO', 'LOOP', 'WHILE', 'WEND', 'THEN', 'ELSE', 'ELSEIF', 'IF',
            +            'FOR', 'TO', 'NEXT', 'STEP', 'GOTO', 'GOSUB', 'CALL', 'CALLS',
            +            'SUB', 'FUNCTION', 'RETURN', 'RESUME', 'SELECT', 'CASE', 'UNTIL'
            +            ),
            +        3 => array(
            +            'ABS', 'ABSOLUTE', 'ACCESS', 'ALIAS', 'AND', 'ANY', 'APPEND', 'AS', 'ASC', 'ATN',
            +            'BASE', 'BEEP', 'BINARY', 'BLOAD', 'BSAVE', 'BYVAL',
            +            'CDBL', 'CDECL', 'CHAIN', 'CHDIR', 'CHR$', 'CINT', 'CIRCLE', 'CLEAR',
            +            'CLNG', 'CLOSE', 'CLS', 'COM', 'COMMAND$', 'COMMON', 'CONST', 'COS', 'CSNG',
            +            'CSRLIN', 'CVD', 'CVDMBF', 'CVI', 'CVL', 'CVS', 'CVSMDF', 'DATA', 'DATE$',
            +            'DECLARE', 'DEF', 'FN', 'SEG', 'DEFDBL', 'DEFINT', 'DEFLNG', 'DEFSNG', 'DEFSTR',
            +            'DIM', 'DOUBLE', 'DRAW', 'END', 'ENVIRON', 'ENVIRON$', 'EOF', 'EQV', 'ERASE',
            +            'ERDEV', 'ERDEV$', 'ERL', 'ERR', 'ERROR', 'EXIT', 'EXP', 'FIELD', 'FILEATTR',
            +            'FILES', 'FIX', 'FRE', 'FREEFILE', 'GET', 'HEX$', 'IMP', 'INKEY$',
            +            'INP', 'INPUT', 'INPUT$', 'INSTR', 'INT', 'INTEGER', 'IOCTL', 'IOCTL$', 'IS',
            +            'KEY', 'KILL', 'LBOUND', 'LCASE$', 'LEFT$', 'LEN', 'LET', 'LINE', 'LIST', 'LOC',
            +            'LOCAL', 'LOCATE', 'LOCK', 'LOF', 'LOG', 'LONG', 'LPOS', 'LPRINT',
            +            'LSET', 'LTRIM$', 'MID$', 'MKD$', 'MKDIR', 'MKDMBF$', 'MKI$', 'MKL$',
            +            'MKS$', 'MKSMBF$', 'MOD', 'NAME', 'NOT', 'OCT$', 'OFF', 'ON', 'PEN', 'PLAY',
            +            'OPEN', 'OPTION', 'OR', 'OUT', 'OUTPUT',
            +            'PAINT', 'PALETTE', 'PCOPY', 'PEEK', 'PMAP', 'POINT', 'POKE', 'POS', 'PRESET',
            +            'PRINT', 'PSET', 'PUT', 'RANDOM', 'RANDOMIZE', 'READ', 'REDIM', 'RESET',
            +            'RESTORE', 'RIGHT$', 'RMDIR', 'RND', 'RSET', 'RTRIM$', 'RUN', 'SADD', 'SCREEN',
            +            'SEEK', 'SETMEM', 'SGN', 'SHARED', 'SHELL', 'SIGNAL', 'SIN', 'SINGLE', 'SLEEP',
            +            'SOUND', 'SPACE$', 'SPC', 'SQR', 'STATIC', 'STICK', 'STOP', 'STR$', 'STRIG',
            +            'STRING', 'STRING$', 'SWAP', 'SYSTEM', 'TAB', 'TAN', 'TIME$', 'TIMER',
            +            'TROFF', 'TRON', 'TYPE', 'UBOUND', 'UCASE$', 'UEVENT', 'UNLOCK', 'USING', 'VAL',
            +            'VARPTR', 'VARPTR$', 'VARSEG', 'VIEW', 'WAIT', 'WIDTH', 'WINDOW', 'WRITE', 'XOR'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', ',', '+', '-', '*', '/', '=', '<', '>', '^'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        3 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #a1a100;',
            +            3 => 'color: #000066;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080;',
            +            2 => 'color: #808080;',
            +            3 => 'color: #8080C0;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099;'
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            1 => 'color: #cc66cc;',
            +            2 => 'color: #339933;'
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        3 => 'http://www.qbasicnews.com/qboho/qck{FNAMEL}.shtml'
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        1 => '&(?:H[0-9a-fA-F]+|O[0-7]+)(?!\w)',
            +        2 => '#[0-9]+(?!\w)'
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 8
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/racket.php b/vendor/easybook/geshi/geshi/racket.php
            new file mode 100644
            index 0000000000..c0d931b41f
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/racket.php
            @@ -0,0 +1,964 @@
            + 'Racket',
            +    'COMMENT_SINGLE' => array(
            +        1 => ';',
            +        ),
            +    'COMMENT_MULTI' => array(
            +        '#|' => '|#',
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"',
            +        ),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'abort-current-continuation', 'abs', 'absolute-path?', 'acos', 'add1',
            +            'alarm-evt', 'always-evt', 'andmap', 'angle', 'append',
            +            'arithmetic-shift', 'arity-at-least-value', 'arity-at-least?',
            +            'asin', 'assf', 'assoc', 'assq', 'assv', 'atan', 'banner',
            +            'bitwise-and', 'bitwise-bit-field', 'bitwise-bit-set?',
            +            'bitwise-ior', 'bitwise-not', 'bitwise-xor', 'boolean?',
            +            'bound-identifier=?', 'box', 'box-cas!', 'box-immutable', 'box?',
            +            'break-enabled', 'break-thread', 'build-list', 'build-path',
            +            'build-path/convention-type', 'build-string', 'build-vector',
            +            'byte-pregexp', 'byte-pregexp?', 'byte-ready?', 'byte-regexp',
            +            'byte-regexp?', 'byte?', 'bytes', 'bytes>?', 'bytes<?',
            +            'bytes->immutable-bytes', 'bytes->list', 'bytes->path',
            +            'bytes->path-element', 'bytes->string/latin-1',
            +            'bytes->string/locale', 'bytes->string/utf-8',
            +            'bytes-append', 'bytes-close-converter', 'bytes-convert',
            +            'bytes-convert-end', 'bytes-converter?', 'bytes-copy',
            +            'bytes-copy!', 'bytes-fill!', 'bytes-length',
            +            'bytes-open-converter', 'bytes-ref', 'bytes-set!',
            +            'bytes-utf-8-index', 'bytes-utf-8-length', 'bytes-utf-8-ref',
            +            'bytes=?', 'bytes?', 'caaaar', 'caaadr', 'caaar', 'caadar',
            +            'caaddr', 'caadr', 'caar', 'cadaar', 'cadadr', 'cadar', 'caddar',
            +            'cadddr', 'caddr', 'cadr', 'call-in-nested-thread',
            +            'call-with-break-parameterization',
            +            'call-with-composable-continuation',
            +            'call-with-continuation-barrier', 'call-with-continuation-prompt',
            +            'call-with-current-continuation', 'call-with-escape-continuation',
            +            'call-with-exception-handler',
            +            'call-with-immediate-continuation-mark',
            +            'call-with-parameterization', 'call-with-semaphore',
            +            'call-with-semaphore/enable-break', 'call-with-values', 'call/cc',
            +            'call/ec', 'car', 'cdaaar', 'cdaadr', 'cdaar', 'cdadar', 'cdaddr',
            +            'cdadr', 'cdar', 'cddaar', 'cddadr', 'cddar', 'cdddar', 'cddddr',
            +            'cdddr', 'cddr', 'cdr', 'ceiling', 'channel-get', 'channel-put',
            +            'channel-put-evt', 'channel-put-evt?', 'channel-try-get',
            +            'channel?', 'chaperone-box', 'chaperone-continuation-mark-key',
            +            'chaperone-evt', 'chaperone-hash', 'chaperone-of?',
            +            'chaperone-procedure', 'chaperone-prompt-tag', 'chaperone-struct',
            +            'chaperone-struct-type', 'chaperone-vector', 'chaperone?',
            +            'char>=?', 'char>?', 'char<=?', 'char<?',
            +            'char->integer', 'char-alphabetic?', 'char-blank?',
            +            'char-ci>=?', 'char-ci>?', 'char-ci<=?', 'char-ci<?',
            +            'char-ci=?', 'char-downcase', 'char-foldcase',
            +            'char-general-category', 'char-graphic?', 'char-iso-control?',
            +            'char-lower-case?', 'char-numeric?', 'char-punctuation?',
            +            'char-ready?', 'char-symbolic?', 'char-title-case?',
            +            'char-titlecase', 'char-upcase', 'char-upper-case?',
            +            'char-utf-8-length', 'char-whitespace?', 'char=?', 'char?',
            +            'check-duplicate-identifier',
            +            'checked-procedure-check-and-extract', 'choice-evt',
            +            'cleanse-path', 'close-input-port', 'close-output-port',
            +            'collect-garbage', 'collection-file-path', 'collection-path',
            +            'compile', 'compile-allow-set!-undefined',
            +            'compile-context-preservation-enabled',
            +            'compile-enforce-module-constants', 'compile-syntax',
            +            'compiled-expression?', 'compiled-module-expression?',
            +            'complete-path?', 'complex?', 'compose', 'compose1', 'cons',
            +            'continuation-mark-key?', 'continuation-mark-set->context',
            +            'continuation-mark-set->list',
            +            'continuation-mark-set->list*', 'continuation-mark-set-first',
            +            'continuation-mark-set?', 'continuation-marks',
            +            'continuation-prompt-available?', 'continuation-prompt-tag?',
            +            'continuation?', 'copy-file', 'cos',
            +            'current-break-parameterization', 'current-code-inspector',
            +            'current-command-line-arguments', 'current-compile',
            +            'current-compiled-file-roots', 'current-continuation-marks',
            +            'current-custodian', 'current-directory', 'current-drive',
            +            'current-error-port', 'current-eval',
            +            'current-evt-pseudo-random-generator', 'current-gc-milliseconds',
            +            'current-get-interaction-input-port',
            +            'current-inexact-milliseconds', 'current-input-port',
            +            'current-inspector', 'current-library-collection-paths',
            +            'current-load', 'current-load-extension',
            +            'current-load-relative-directory', 'current-load/use-compiled',
            +            'current-locale', 'current-logger', 'current-memory-use',
            +            'current-milliseconds', 'current-module-declare-name',
            +            'current-module-declare-source', 'current-module-name-resolver',
            +            'current-namespace', 'current-output-port',
            +            'current-parameterization', 'current-preserved-thread-cell-values',
            +            'current-print', 'current-process-milliseconds',
            +            'current-prompt-read', 'current-pseudo-random-generator',
            +            'current-read-interaction', 'current-reader-guard',
            +            'current-readtable', 'current-seconds', 'current-security-guard',
            +            'current-subprocess-custodian-mode', 'current-thread',
            +            'current-thread-group', 'current-thread-initial-stack-size',
            +            'current-write-relative-directory', 'custodian-box-value',
            +            'custodian-box?', 'custodian-limit-memory',
            +            'custodian-managed-list', 'custodian-memory-accounting-available?',
            +            'custodian-require-memory', 'custodian-shutdown-all', 'custodian?',
            +            'custom-print-quotable-accessor', 'custom-print-quotable?',
            +            'custom-write-accessor', 'custom-write?', 'date*-nanosecond',
            +            'date*-time-zone-name', 'date*?', 'date-day', 'date-dst?',
            +            'date-hour', 'date-minute', 'date-month', 'date-second',
            +            'date-time-zone-offset', 'date-week-day', 'date-year',
            +            'date-year-day', 'date?', 'datum->syntax',
            +            'datum-intern-literal', 'default-continuation-prompt-tag',
            +            'delete-directory', 'delete-file', 'denominator',
            +            'directory-exists?', 'directory-list', 'display', 'displayln',
            +            'double-flonum?', 'dump-memory-stats', 'dynamic-require',
            +            'dynamic-require-for-syntax', 'dynamic-wind', 'eof', 'eof-object?',
            +            'ephemeron-value', 'ephemeron?', 'eprintf', 'eq-hash-code', 'eq?',
            +            'equal-hash-code', 'equal-secondary-hash-code', 'equal?',
            +            'equal?/recur', 'eqv-hash-code', 'eqv?', 'error',
            +            'error-display-handler', 'error-escape-handler',
            +            'error-print-context-length', 'error-print-source-location',
            +            'error-print-width', 'error-value->string-handler', 'eval',
            +            'eval-jit-enabled', 'eval-syntax', 'even?', 'evt?',
            +            'exact->inexact', 'exact-integer?',
            +            'exact-nonnegative-integer?', 'exact-positive-integer?', 'exact?',
            +            'executable-yield-handler', 'exit', 'exit-handler',
            +            'exn-continuation-marks', 'exn-message', 'exn:break-continuation',
            +            'exn:break:hang-up?', 'exn:break:terminate?', 'exn:break?',
            +            'exn:fail:contract:arity?', 'exn:fail:contract:continuation?',
            +            'exn:fail:contract:divide-by-zero?',
            +            'exn:fail:contract:non-fixnum-result?',
            +            'exn:fail:contract:variable-id', 'exn:fail:contract:variable?',
            +            'exn:fail:contract?', 'exn:fail:filesystem:errno-errno',
            +            'exn:fail:filesystem:errno?', 'exn:fail:filesystem:exists?',
            +            'exn:fail:filesystem:version?', 'exn:fail:filesystem?',
            +            'exn:fail:network:errno-errno', 'exn:fail:network:errno?',
            +            'exn:fail:network?', 'exn:fail:out-of-memory?',
            +            'exn:fail:read-srclocs', 'exn:fail:read:eof?',
            +            'exn:fail:read:non-char?', 'exn:fail:read?',
            +            'exn:fail:syntax-exprs', 'exn:fail:syntax:unbound?',
            +            'exn:fail:syntax?', 'exn:fail:unsupported?', 'exn:fail:user?',
            +            'exn:fail?', 'exn:srclocs-accessor', 'exn:srclocs?', 'exn?', 'exp',
            +            'expand', 'expand-once', 'expand-syntax', 'expand-syntax-once',
            +            'expand-syntax-to-top-form', 'expand-to-top-form',
            +            'expand-user-path', 'expt', 'file-exists?',
            +            'file-or-directory-identity', 'file-or-directory-modify-seconds',
            +            'file-or-directory-permissions', 'file-position', 'file-position*',
            +            'file-size', 'file-stream-buffer-mode', 'file-stream-port?',
            +            'filesystem-root-list', 'filter', 'find-executable-path',
            +            'find-library-collection-paths', 'find-system-path', 'findf',
            +            'fixnum?', 'floating-point-bytes->real', 'flonum?', 'floor',
            +            'flush-output', 'foldl', 'foldr', 'for-each', 'format', 'fprintf',
            +            'free-identifier=?', 'free-label-identifier=?',
            +            'free-template-identifier=?', 'free-transformer-identifier=?',
            +            'gcd', 'generate-temporaries', 'gensym', 'get-output-bytes',
            +            'get-output-string', 'getenv', 'global-port-print-handler',
            +            'guard-evt', 'handle-evt', 'handle-evt?', 'hash', 'hash->list',
            +            'hash-copy', 'hash-count', 'hash-eq?', 'hash-equal?', 'hash-eqv?',
            +            'hash-for-each', 'hash-has-key?', 'hash-iterate-first',
            +            'hash-iterate-key', 'hash-iterate-next', 'hash-iterate-value',
            +            'hash-keys', 'hash-map', 'hash-placeholder?', 'hash-ref',
            +            'hash-ref!', 'hash-remove', 'hash-remove!', 'hash-set',
            +            'hash-set!', 'hash-set*', 'hash-set*!', 'hash-update',
            +            'hash-update!', 'hash-values', 'hash-weak?', 'hash?', 'hasheq',
            +            'hasheqv', 'identifier-binding', 'identifier-label-binding',
            +            'identifier-prune-lexical-context',
            +            'identifier-prune-to-source-module',
            +            'identifier-remove-from-definition-context',
            +            'identifier-template-binding', 'identifier-transformer-binding',
            +            'identifier?', 'imag-part', 'immutable?', 'impersonate-box',
            +            'impersonate-continuation-mark-key', 'impersonate-hash',
            +            'impersonate-procedure', 'impersonate-prompt-tag',
            +            'impersonate-struct', 'impersonate-vector', 'impersonator-of?',
            +            'impersonator-prop:application-mark',
            +            'impersonator-property-accessor-procedure?',
            +            'impersonator-property?', 'impersonator?', 'in-cycle',
            +            'in-directory', 'in-hash', 'in-hash-keys', 'in-hash-pairs',
            +            'in-hash-values', 'in-parallel', 'in-sequences',
            +            'in-values*-sequence', 'in-values-sequence', 'inexact->exact',
            +            'inexact-real?', 'inexact?', 'input-port?', 'inspector?',
            +            'integer->char', 'integer->integer-bytes',
            +            'integer-bytes->integer', 'integer-length', 'integer-sqrt',
            +            'integer-sqrt/remainder', 'integer?',
            +            'internal-definition-context-seal', 'internal-definition-context?',
            +            'keyword<?', 'keyword->string', 'keyword-apply', 'keyword?',
            +            'kill-thread', 'lcm', 'length', 'liberal-define-context?',
            +            'link-exists?', 'list', 'list*', 'list->bytes',
            +            'list->string', 'list->vector', 'list-ref', 'list-tail',
            +            'list?', 'load', 'load-extension', 'load-on-demand-enabled',
            +            'load-relative', 'load-relative-extension', 'load/cd',
            +            'load/use-compiled', 'local-expand', 'local-expand/capture-lifts',
            +            'local-transformer-expand',
            +            'local-transformer-expand/capture-lifts', 'locale-string-encoding',
            +            'log', 'log-level?', 'log-max-level', 'log-message',
            +            'log-receiver?', 'logger-name', 'logger?', 'magnitude',
            +            'make-arity-at-least', 'make-base-empty-namespace',
            +            'make-base-namespace', 'make-bytes', 'make-channel',
            +            'make-continuation-mark-key', 'make-continuation-prompt-tag',
            +            'make-custodian', 'make-custodian-box', 'make-date', 'make-date*',
            +            'make-derived-parameter', 'make-directory', 'make-do-sequence',
            +            'make-empty-namespace', 'make-ephemeron', 'make-exn',
            +            'make-exn:break', 'make-exn:break:hang-up',
            +            'make-exn:break:terminate', 'make-exn:fail',
            +            'make-exn:fail:contract', 'make-exn:fail:contract:arity',
            +            'make-exn:fail:contract:continuation',
            +            'make-exn:fail:contract:divide-by-zero',
            +            'make-exn:fail:contract:non-fixnum-result',
            +            'make-exn:fail:contract:variable', 'make-exn:fail:filesystem',
            +            'make-exn:fail:filesystem:errno',
            +            'make-exn:fail:filesystem:exists',
            +            'make-exn:fail:filesystem:version', 'make-exn:fail:network',
            +            'make-exn:fail:network:errno', 'make-exn:fail:out-of-memory',
            +            'make-exn:fail:read', 'make-exn:fail:read:eof',
            +            'make-exn:fail:read:non-char', 'make-exn:fail:syntax',
            +            'make-exn:fail:syntax:unbound', 'make-exn:fail:unsupported',
            +            'make-exn:fail:user', 'make-file-or-directory-link', 'make-hash',
            +            'make-hash-placeholder', 'make-hasheq', 'make-hasheq-placeholder',
            +            'make-hasheqv', 'make-hasheqv-placeholder', 'make-immutable-hash',
            +            'make-immutable-hasheq', 'make-immutable-hasheqv',
            +            'make-impersonator-property', 'make-input-port', 'make-inspector',
            +            'make-keyword-procedure', 'make-known-char-range-list',
            +            'make-log-receiver', 'make-logger', 'make-output-port',
            +            'make-parameter', 'make-phantom-bytes', 'make-pipe',
            +            'make-placeholder', 'make-polar', 'make-prefab-struct',
            +            'make-pseudo-random-generator', 'make-reader-graph',
            +            'make-readtable', 'make-rectangular', 'make-rename-transformer',
            +            'make-resolved-module-path', 'make-security-guard',
            +            'make-semaphore', 'make-set!-transformer', 'make-shared-bytes',
            +            'make-sibling-inspector', 'make-special-comment', 'make-srcloc',
            +            'make-string', 'make-struct-field-accessor',
            +            'make-struct-field-mutator', 'make-struct-type',
            +            'make-struct-type-property', 'make-syntax-delta-introducer',
            +            'make-syntax-introducer', 'make-thread-cell', 'make-thread-group',
            +            'make-vector', 'make-weak-box', 'make-weak-hash',
            +            'make-weak-hasheq', 'make-weak-hasheqv', 'make-will-executor',
            +            'map', 'max', 'mcar', 'mcdr', 'mcons', 'member', 'memf', 'memq',
            +            'memv', 'min', 'module->exports', 'module->imports',
            +            'module->language-info', 'module->namespace',
            +            'module-compiled-exports', 'module-compiled-imports',
            +            'module-compiled-language-info', 'module-compiled-name',
            +            'module-compiled-submodules', 'module-declared?',
            +            'module-path-index-join', 'module-path-index-resolve',
            +            'module-path-index-split', 'module-path-index-submodule',
            +            'module-path-index?', 'module-path?', 'module-predefined?',
            +            'module-provide-protected?', 'modulo', 'mpair?', 'nack-guard-evt',
            +            'namespace-anchor->empty-namespace',
            +            'namespace-anchor->namespace', 'namespace-anchor?',
            +            'namespace-attach-module', 'namespace-attach-module-declaration',
            +            'namespace-base-phase', 'namespace-mapped-symbols',
            +            'namespace-module-identifier', 'namespace-module-registry',
            +            'namespace-require', 'namespace-require/constant',
            +            'namespace-require/copy', 'namespace-require/expansion-time',
            +            'namespace-set-variable-value!', 'namespace-symbol->identifier',
            +            'namespace-syntax-introduce', 'namespace-undefine-variable!',
            +            'namespace-unprotect-module', 'namespace-variable-value',
            +            'namespace?', 'negative?', 'never-evt', 'newline',
            +            'normal-case-path', 'not', 'null', 'null?', 'number->string',
            +            'number?', 'numerator', 'object-name', 'odd?', 'open-input-bytes',
            +            'open-input-string', 'open-output-bytes', 'open-output-string',
            +            'ormap', 'output-port?', 'pair?', 'parameter-procedure=?',
            +            'parameter?', 'parameterization?', 'path->bytes',
            +            'path->complete-path', 'path->directory-path',
            +            'path->string', 'path-add-suffix', 'path-convention-type',
            +            'path-element->bytes', 'path-element->string',
            +            'path-for-some-system?', 'path-list-string->path-list',
            +            'path-replace-suffix', 'path-string?', 'path?', 'peek-byte',
            +            'peek-byte-or-special', 'peek-bytes', 'peek-bytes!',
            +            'peek-bytes-avail!', 'peek-bytes-avail!*',
            +            'peek-bytes-avail!/enable-break', 'peek-char',
            +            'peek-char-or-special', 'peek-string', 'peek-string!',
            +            'phantom-bytes?', 'pipe-content-length', 'placeholder-get',
            +            'placeholder-set!', 'placeholder?', 'poll-guard-evt',
            +            'port-closed-evt', 'port-closed?', 'port-commit-peeked',
            +            'port-count-lines!', 'port-count-lines-enabled',
            +            'port-display-handler', 'port-file-identity', 'port-file-unlock',
            +            'port-next-location', 'port-print-handler', 'port-progress-evt',
            +            'port-provides-progress-evts?', 'port-read-handler',
            +            'port-try-file-lock?', 'port-write-handler', 'port-writes-atomic?',
            +            'port-writes-special?', 'port?', 'positive?',
            +            'prefab-key->struct-type', 'prefab-key?', 'prefab-struct-key',
            +            'pregexp', 'pregexp?', 'primitive-closure?',
            +            'primitive-result-arity', 'primitive?', 'print',
            +            'print-as-expression', 'print-boolean-long-form', 'print-box',
            +            'print-graph', 'print-hash-table', 'print-mpair-curly-braces',
            +            'print-pair-curly-braces', 'print-reader-abbreviations',
            +            'print-struct', 'print-syntax-width', 'print-unreadable',
            +            'print-vector-length', 'printf', 'procedure->method',
            +            'procedure-arity', 'procedure-arity-includes?', 'procedure-arity?',
            +            'procedure-closure-contents-eq?', 'procedure-extract-target',
            +            'procedure-keywords', 'procedure-reduce-arity',
            +            'procedure-reduce-keyword-arity', 'procedure-rename',
            +            'procedure-struct-type?', 'procedure?', 'progress-evt?',
            +            'prop:arity-string', 'prop:checked-procedure',
            +            'prop:custom-print-quotable', 'prop:custom-write',
            +            'prop:equal+hash', 'prop:evt', 'prop:exn:srclocs',
            +            'prop:impersonator-of', 'prop:input-port',
            +            'prop:liberal-define-context', 'prop:output-port',
            +            'prop:procedure', 'prop:rename-transformer', 'prop:sequence',
            +            'prop:set!-transformer', 'pseudo-random-generator->vector',
            +            'pseudo-random-generator-vector?', 'pseudo-random-generator?',
            +            'putenv', 'quotient', 'quotient/remainder', 'raise',
            +            'raise-argument-error', 'raise-arguments-error',
            +            'raise-arity-error', 'raise-mismatch-error', 'raise-range-error',
            +            'raise-result-error', 'raise-syntax-error', 'raise-type-error',
            +            'raise-user-error', 'random', 'random-seed', 'rational?',
            +            'rationalize', 'read', 'read-accept-bar-quote', 'read-accept-box',
            +            'read-accept-compiled', 'read-accept-dot', 'read-accept-graph',
            +            'read-accept-infix-dot', 'read-accept-lang',
            +            'read-accept-quasiquote', 'read-accept-reader', 'read-byte',
            +            'read-byte-or-special', 'read-bytes', 'read-bytes!',
            +            'read-bytes-avail!', 'read-bytes-avail!*',
            +            'read-bytes-avail!/enable-break', 'read-bytes-line',
            +            'read-case-sensitive', 'read-char', 'read-char-or-special',
            +            'read-curly-brace-as-paren', 'read-decimal-as-inexact',
            +            'read-eval-print-loop', 'read-language', 'read-line',
            +            'read-on-demand-source', 'read-square-bracket-as-paren',
            +            'read-string', 'read-string!', 'read-syntax',
            +            'read-syntax/recursive', 'read/recursive', 'readtable-mapping',
            +            'readtable?', 'real->decimal-string', 'real->double-flonum',
            +            'real->floating-point-bytes', 'real->single-flonum',
            +            'real-part', 'real?', 'regexp', 'regexp-match',
            +            'regexp-match-exact?', 'regexp-match-peek',
            +            'regexp-match-peek-immediate', 'regexp-match-peek-positions',
            +            'regexp-match-peek-positions-immediate',
            +            'regexp-match-peek-positions-immediate/end',
            +            'regexp-match-peek-positions/end', 'regexp-match-positions',
            +            'regexp-match-positions/end', 'regexp-match/end', 'regexp-match?',
            +            'regexp-max-lookbehind', 'regexp-quote', 'regexp-replace',
            +            'regexp-replace*', 'regexp-replace-quote', 'regexp-replaces',
            +            'regexp-split', 'regexp-try-match', 'regexp?', 'relative-path?',
            +            'remainder', 'remove', 'remove*', 'remq', 'remq*', 'remv', 'remv*',
            +            'rename-file-or-directory', 'rename-transformer-target',
            +            'rename-transformer?', 'reroot-path', 'resolve-path',
            +            'resolved-module-path-name', 'resolved-module-path?', 'reverse',
            +            'round', 'seconds->date', 'security-guard?',
            +            'semaphore-peek-evt', 'semaphore-peek-evt?', 'semaphore-post',
            +            'semaphore-try-wait?', 'semaphore-wait',
            +            'semaphore-wait/enable-break', 'semaphore?', 'sequence->stream',
            +            'sequence-generate', 'sequence-generate*', 'sequence?',
            +            'set!-transformer-procedure', 'set!-transformer?', 'set-box!',
            +            'set-mcar!', 'set-mcdr!', 'set-phantom-bytes!',
            +            'set-port-next-location!', 'shared-bytes', 'shell-execute',
            +            'simplify-path', 'sin', 'single-flonum?', 'sleep',
            +            'special-comment-value', 'special-comment?', 'split-path', 'sqrt',
            +            'srcloc-column', 'srcloc-line', 'srcloc-position', 'srcloc-source',
            +            'srcloc-span', 'srcloc?', 'stop-after', 'stop-before', 'string',
            +            'string>=?', 'string>?', 'string<=?', 'string<?',
            +            'string->bytes/latin-1', 'string->bytes/locale',
            +            'string->bytes/utf-8', 'string->immutable-string',
            +            'string->keyword', 'string->list', 'string->number',
            +            'string->path', 'string->path-element', 'string->symbol',
            +            'string->uninterned-symbol', 'string->unreadable-symbol',
            +            'string-append', 'string-ci>=?', 'string-ci>?',
            +            'string-ci<=?', 'string-ci<?', 'string-ci=?', 'string-copy',
            +            'string-copy!', 'string-downcase', 'string-fill!',
            +            'string-foldcase', 'string-length', 'string-locale>?',
            +            'string-locale<?', 'string-locale-ci>?',
            +            'string-locale-ci<?', 'string-locale-ci=?',
            +            'string-locale-downcase', 'string-locale-upcase',
            +            'string-locale=?', 'string-normalize-nfc', 'string-normalize-nfd',
            +            'string-normalize-nfkc', 'string-normalize-nfkd', 'string-ref',
            +            'string-set!', 'string-titlecase', 'string-upcase',
            +            'string-utf-8-length', 'string=?', 'string?', 'struct->vector',
            +            'struct-accessor-procedure?', 'struct-constructor-procedure?',
            +            'struct-info', 'struct-mutator-procedure?',
            +            'struct-predicate-procedure?', 'struct-type-info',
            +            'struct-type-make-constructor', 'struct-type-make-predicate',
            +            'struct-type-property-accessor-procedure?',
            +            'struct-type-property?', 'struct-type?', 'struct:arity-at-least',
            +            'struct:date', 'struct:date*', 'struct:exn', 'struct:exn:break',
            +            'struct:exn:break:hang-up', 'struct:exn:break:terminate',
            +            'struct:exn:fail', 'struct:exn:fail:contract',
            +            'struct:exn:fail:contract:arity',
            +            'struct:exn:fail:contract:continuation',
            +            'struct:exn:fail:contract:divide-by-zero',
            +            'struct:exn:fail:contract:non-fixnum-result',
            +            'struct:exn:fail:contract:variable', 'struct:exn:fail:filesystem',
            +            'struct:exn:fail:filesystem:errno',
            +            'struct:exn:fail:filesystem:exists',
            +            'struct:exn:fail:filesystem:version', 'struct:exn:fail:network',
            +            'struct:exn:fail:network:errno', 'struct:exn:fail:out-of-memory',
            +            'struct:exn:fail:read', 'struct:exn:fail:read:eof',
            +            'struct:exn:fail:read:non-char', 'struct:exn:fail:syntax',
            +            'struct:exn:fail:syntax:unbound', 'struct:exn:fail:unsupported',
            +            'struct:exn:fail:user', 'struct:srcloc', 'struct?', 'sub1',
            +            'subbytes', 'subprocess', 'subprocess-group-enabled',
            +            'subprocess-kill', 'subprocess-pid', 'subprocess-status',
            +            'subprocess-wait', 'subprocess?', 'substring', 'symbol->string',
            +            'symbol-interned?', 'symbol-unreadable?', 'symbol?', 'sync',
            +            'sync/enable-break', 'sync/timeout', 'sync/timeout/enable-break',
            +            'syntax->datum', 'syntax->list', 'syntax-arm',
            +            'syntax-column', 'syntax-disarm', 'syntax-e', 'syntax-line',
            +            'syntax-local-bind-syntaxes', 'syntax-local-certifier',
            +            'syntax-local-context', 'syntax-local-expand-expression',
            +            'syntax-local-get-shadower', 'syntax-local-introduce',
            +            'syntax-local-lift-context', 'syntax-local-lift-expression',
            +            'syntax-local-lift-module-end-declaration',
            +            'syntax-local-lift-provide', 'syntax-local-lift-require',
            +            'syntax-local-lift-values-expression',
            +            'syntax-local-make-definition-context',
            +            'syntax-local-make-delta-introducer',
            +            'syntax-local-module-defined-identifiers',
            +            'syntax-local-module-exports',
            +            'syntax-local-module-required-identifiers', 'syntax-local-name',
            +            'syntax-local-phase-level', 'syntax-local-submodules',
            +            'syntax-local-transforming-module-provides?', 'syntax-local-value',
            +            'syntax-local-value/immediate', 'syntax-original?',
            +            'syntax-position', 'syntax-property',
            +            'syntax-property-symbol-keys', 'syntax-protect', 'syntax-rearm',
            +            'syntax-recertify', 'syntax-shift-phase-level', 'syntax-source',
            +            'syntax-source-module', 'syntax-span', 'syntax-taint',
            +            'syntax-tainted?', 'syntax-track-origin',
            +            'syntax-transforming-module-expression?', 'syntax-transforming?',
            +            'syntax?', 'system-big-endian?', 'system-idle-evt',
            +            'system-language+country', 'system-library-subpath',
            +            'system-path-convention-type', 'system-type', 'tan',
            +            'terminal-port?', 'thread', 'thread-cell-ref', 'thread-cell-set!',
            +            'thread-cell-values?', 'thread-cell?', 'thread-dead-evt',
            +            'thread-dead?', 'thread-group?', 'thread-receive',
            +            'thread-receive-evt', 'thread-resume', 'thread-resume-evt',
            +            'thread-rewind-receive', 'thread-running?', 'thread-send',
            +            'thread-suspend', 'thread-suspend-evt', 'thread-try-receive',
            +            'thread-wait', 'thread/suspend-to-kill', 'thread?', 'time-apply',
            +            'truncate', 'unbox', 'uncaught-exception-handler',
            +            'use-collection-link-paths', 'use-compiled-file-paths',
            +            'use-user-specific-search-paths', 'values',
            +            'variable-reference->empty-namespace',
            +            'variable-reference->module-base-phase',
            +            'variable-reference->module-declaration-inspector',
            +            'variable-reference->module-path-index',
            +            'variable-reference->module-source',
            +            'variable-reference->namespace', 'variable-reference->phase',
            +            'variable-reference->resolved-module-path',
            +            'variable-reference-constant?', 'variable-reference?', 'vector',
            +            'vector->immutable-vector', 'vector->list',
            +            'vector->pseudo-random-generator',
            +            'vector->pseudo-random-generator!', 'vector->values',
            +            'vector-copy!', 'vector-fill!', 'vector-immutable',
            +            'vector-length', 'vector-ref', 'vector-set!',
            +            'vector-set-performance-stats!', 'vector?', 'version', 'void',
            +            'void?', 'weak-box-value', 'weak-box?', 'will-execute',
            +            'will-executor?', 'will-register', 'will-try-execute', 'wrap-evt',
            +            'write', 'write-byte', 'write-bytes', 'write-bytes-avail',
            +            'write-bytes-avail*', 'write-bytes-avail-evt',
            +            'write-bytes-avail/enable-break', 'write-char', 'write-special',
            +            'write-special-avail*', 'write-special-evt', 'write-string',
            +            'zero?',
            +            ),
            +
            +        2 => array(
            +            '#%app', '#%datum', '#%expression', '#%module-begin', '#%plain-app',
            +            '#%plain-lambda', '#%plain-module-begin', '#%provide', '#%require',
            +            '#%stratified-body', '#%top', '#%top-interaction',
            +            '#%variable-reference', ':do-in', 'all-defined-out',
            +            'all-from-out', 'and', 'apply', 'arity-at-least', 'begin',
            +            'begin-for-syntax', 'begin0', 'call-with-input-file',
            +            'call-with-input-file*', 'call-with-output-file',
            +            'call-with-output-file*', 'case', 'case-lambda', 'combine-in',
            +            'combine-out', 'cond', 'date', 'date*', 'define',
            +            'define-for-syntax', 'define-logger', 'define-namespace-anchor',
            +            'define-sequence-syntax', 'define-struct', 'define-struct/derived',
            +            'define-syntax', 'define-syntax-rule', 'define-syntaxes',
            +            'define-values', 'define-values-for-syntax', 'do', 'else',
            +            'except-in', 'except-out', 'exn', 'exn:break', 'exn:break:hang-up',
            +            'exn:break:terminate', 'exn:fail', 'exn:fail:contract',
            +            'exn:fail:contract:arity', 'exn:fail:contract:continuation',
            +            'exn:fail:contract:divide-by-zero',
            +            'exn:fail:contract:non-fixnum-result',
            +            'exn:fail:contract:variable', 'exn:fail:filesystem',
            +            'exn:fail:filesystem:errno', 'exn:fail:filesystem:exists',
            +            'exn:fail:filesystem:version', 'exn:fail:network',
            +            'exn:fail:network:errno', 'exn:fail:out-of-memory',
            +            'exn:fail:read', 'exn:fail:read:eof', 'exn:fail:read:non-char',
            +            'exn:fail:syntax', 'exn:fail:syntax:unbound',
            +            'exn:fail:unsupported', 'exn:fail:user', 'file', 'for', 'for*',
            +            'for*/and', 'for*/first', 'for*/fold', 'for*/fold/derived',
            +            'for*/hash', 'for*/hasheq', 'for*/hasheqv', 'for*/last',
            +            'for*/list', 'for*/lists', 'for*/or', 'for*/product', 'for*/sum',
            +            'for*/vector', 'for-label', 'for-meta', 'for-syntax',
            +            'for-template', 'for/and', 'for/first', 'for/fold',
            +            'for/fold/derived', 'for/hash', 'for/hasheq', 'for/hasheqv',
            +            'for/last', 'for/list', 'for/lists', 'for/or', 'for/product',
            +            'for/sum', 'for/vector', 'gen:custom-write', 'gen:equal+hash',
            +            'if', 'in-bytes', 'in-bytes-lines', 'in-indexed',
            +            'in-input-port-bytes', 'in-input-port-chars', 'in-lines',
            +            'in-list', 'in-mlist', 'in-naturals', 'in-port', 'in-producer',
            +            'in-range', 'in-string', 'in-value', 'in-vector', 'lambda', 'let',
            +            'let*', 'let*-values', 'let-syntax', 'let-syntaxes', 'let-values',
            +            'let/cc', 'let/ec', 'letrec', 'letrec-syntax', 'letrec-syntaxes',
            +            'letrec-syntaxes+values', 'letrec-values', 'lib', 'local-require',
            +            'log-debug', 'log-error', 'log-fatal', 'log-info', 'log-warning',
            +            'module', 'module*', 'module+', 'only-in', 'only-meta-in',
            +            'open-input-file', 'open-input-output-file', 'open-output-file',
            +            'or', 'parameterize', 'parameterize*', 'parameterize-break',
            +            'planet', 'prefix-in', 'prefix-out', 'protect-out', 'provide',
            +            'quasiquote', 'quasisyntax', 'quasisyntax/loc', 'quote',
            +            'quote-syntax', 'quote-syntax/prune', 'regexp-match*',
            +            'regexp-match-peek-positions*', 'regexp-match-positions*',
            +            'relative-in', 'rename-in', 'rename-out', 'require', 'set!',
            +            'set!-values', 'sort', 'srcloc', 'struct', 'struct-copy',
            +            'struct-field-index', 'struct-out', 'submod', 'syntax',
            +            'syntax-case', 'syntax-case*', 'syntax-id-rules', 'syntax-rules',
            +            'syntax/loc', 'time', 'unless', 'unquote', 'unquote-splicing',
            +            'unsyntax', 'unsyntax-splicing', 'when', 'with-continuation-mark',
            +            'with-handlers', 'with-handlers*', 'with-input-from-file',
            +            'with-output-to-file', 'with-syntax', '?',
            +            ),
            +
            +        3 => array(
            +            '>/c', '</c', 'append*', 'append-map', 'argmax', 'argmin',
            +            'bad-number-of-results', 'base->-doms/c', 'base->-rngs/c',
            +            'base->?', 'blame-add-unknown-context', 'blame-context',
            +            'blame-contract', 'blame-fmt->-string', 'blame-negative',
            +            'blame-original?', 'blame-positive', 'blame-replace-negative',
            +            'blame-source', 'blame-swap', 'blame-swapped?', 'blame-value',
            +            'blame?', 'boolean=?', 'build-chaperone-contract-property',
            +            'build-compound-type-name', 'build-contract-property',
            +            'build-flat-contract-property', 'bytes-append*', 'bytes-join',
            +            'bytes-no-nuls?', 'call-with-input-bytes',
            +            'call-with-input-string', 'call-with-output-bytes',
            +            'call-with-output-string', 'chaperone-contract-property?',
            +            'chaperone-contract?', 'class->interface', 'class-info',
            +            'class?', 'coerce-chaperone-contract',
            +            'coerce-chaperone-contracts', 'coerce-contract',
            +            'coerce-contract/f', 'coerce-contracts', 'coerce-flat-contract',
            +            'coerce-flat-contracts', 'conjugate', 'cons?', 'const',
            +            'contract-first-order', 'contract-first-order-passes?',
            +            'contract-name', 'contract-proc', 'contract-projection',
            +            'contract-property?', 'contract-random-generate',
            +            'contract-stronger?', 'contract-struct-exercise',
            +            'contract-struct-generate', 'contract?', 'convert-stream',
            +            'copy-directory/files', 'copy-port', 'cosh', 'count',
            +            'current-blame-format', 'current-future', 'curry', 'curryr',
            +            'degrees->radians', 'delete-directory/files',
            +            'deserialize-info:set-v0', 'dict-iter-contract',
            +            'dict-key-contract', 'dict-value-contract', 'drop', 'drop-right',
            +            'dup-input-port', 'dup-output-port', 'dynamic-get-field',
            +            'dynamic-send', 'dynamic-set-field!', 'eighth', 'empty',
            +            'empty-sequence', 'empty-stream', 'empty?', 'env-stash',
            +            'eq-contract-val', 'eq-contract?', 'equal<%>',
            +            'equal-contract-val', 'equal-contract?', 'exact-ceiling',
            +            'exact-floor', 'exact-round', 'exact-truncate',
            +            'exn:fail:contract:blame-object', 'exn:fail:contract:blame?',
            +            'exn:fail:object?', 'exn:misc:match?', 'explode-path',
            +            'externalizable<%>', 'false', 'false/c', 'false?',
            +            'field-names', 'fifth', 'file-name-from-path',
            +            'filename-extension', 'filter-map', 'filter-not',
            +            'filter-read-input-port', 'find-files', 'first', 'flat-contract',
            +            'flat-contract-predicate', 'flat-contract-property?',
            +            'flat-contract?', 'flat-named-contract', 'flatten', 'fold-files',
            +            'force', 'fourth', 'fsemaphore-count', 'fsemaphore-post',
            +            'fsemaphore-try-wait?', 'fsemaphore-wait', 'fsemaphore?', 'future',
            +            'future?', 'futures-enabled?', 'generate-ctc-fail?',
            +            'generate-env', 'generate-member-key', 'generate/choose',
            +            'generate/direct', 'generic?', 'group-execute-bit',
            +            'group-read-bit', 'group-write-bit', 'has-contract?', 'identity',
            +            'impersonator-contract?', 'impersonator-prop:contracted',
            +            'implementation?', 'implementation?/c', 'in-dict', 'in-dict-keys',
            +            'in-dict-pairs', 'in-dict-values', 'infinite?',
            +            'input-port-append', 'instanceof/c', 'interface->method-names',
            +            'interface-extension?', 'interface?', 'is-a?', 'is-a?/c', 'last',
            +            'last-pair', 'list->set', 'list->seteq', 'list->seteqv',
            +            'make-chaperone-contract', 'make-contract', 'make-custom-hash',
            +            'make-directory*', 'make-exn:fail:contract:blame',
            +            'make-exn:fail:object', 'make-flat-contract', 'make-fsemaphore',
            +            'make-generate-ctc-fail', 'make-generic',
            +            'make-immutable-custom-hash', 'make-input-port/read-to-peek',
            +            'make-limited-input-port', 'make-list', 'make-lock-file-name',
            +            'make-mixin-contract', 'make-none/c', 'make-pipe-with-specials',
            +            'make-primitive-class', 'make-proj-contract',
            +            'make-tentative-pretty-print-output-port', 'make-weak-custom-hash',
            +            'match-equality-test', 'matches-arity-exactly?',
            +            'member-name-key-hash-code', 'member-name-key=?',
            +            'member-name-key?', 'merge-input', 'method-in-interface?',
            +            'mixin-contract', 'n->th', 'nan?', 'natural-number/c', 'negate',
            +            'new-?/c', 'new-?/c', 'ninth', 'normalize-path', 'object%',
            +            'object->vector', 'object-info', 'object-interface',
            +            'object-method-arity-includes?', 'object=?', 'object?',
            +            'open-output-nowhere', 'order-of-magnitude', 'other-execute-bit',
            +            'other-read-bit', 'other-write-bit', 'parse-command-line',
            +            'partition', 'path-element?', 'path-only', 'pathlist-closure',
            +            'pi', 'pi.f', 'place-break', 'place-channel', 'place-channel-get',
            +            'place-channel-put', 'place-channel-put/get', 'place-channel?',
            +            'place-dead-evt', 'place-enabled?', 'place-kill',
            +            'place-message-allowed?', 'place-sleep', 'place-wait', 'place?',
            +            'port->bytes', 'port->list', 'port->string',
            +            'predicate/c', 'preferences-lock-file-mode', 'pretty-display',
            +            'pretty-format', 'pretty-print',
            +            'pretty-print-.-symbol-without-bars',
            +            'pretty-print-abbreviate-read-macros', 'pretty-print-columns',
            +            'pretty-print-current-style-table', 'pretty-print-depth',
            +            'pretty-print-exact-as-decimal', 'pretty-print-extend-style-table',
            +            'pretty-print-handler', 'pretty-print-newline',
            +            'pretty-print-post-print-hook', 'pretty-print-pre-print-hook',
            +            'pretty-print-print-hook', 'pretty-print-print-line',
            +            'pretty-print-remap-stylable', 'pretty-print-show-inexactness',
            +            'pretty-print-size-hook', 'pretty-print-style-table?',
            +            'pretty-printing', 'pretty-write', 'printable<%>',
            +            'printable/c', 'process', 'process*', 'process*/ports',
            +            'process/ports', 'processor-count', 'promise-forced?',
            +            'promise-running?', 'promise?', 'prop:chaperone-contract',
            +            'prop:contract', 'prop:contracted', 'prop:dict',
            +            'prop:flat-contract', 'prop:opt-chaperone-contract',
            +            'prop:opt-chaperone-contract-get-test',
            +            'prop:opt-chaperone-contract?', 'prop:stream', 'proper-subset?',
            +            'put-preferences', 'radians->degrees', 'raise-blame-error',
            +            'raise-contract-error', 'range', 'reencode-input-port',
            +            'reencode-output-port', 'relocate-input-port',
            +            'relocate-output-port', 'rest', 'second', 'sequence->list',
            +            'sequence-add-between', 'sequence-andmap', 'sequence-append',
            +            'sequence-count', 'sequence-filter', 'sequence-fold',
            +            'sequence-for-each', 'sequence-length', 'sequence-map',
            +            'sequence-ormap', 'sequence-ref', 'sequence-tail', 'set',
            +            'set->list', 'set-add', 'set-count', 'set-empty?', 'set-eq?',
            +            'set-equal?', 'set-eqv?', 'set-first', 'set-for-each',
            +            'set-intersect', 'set-map', 'set-member?', 'set-remove',
            +            'set-rest', 'set-subtract', 'set-symmetric-difference',
            +            'set-union', 'set/c', 'set=?', 'set?', 'seteq', 'seteqv',
            +            'seventh', 'sgn', 'shuffle', 'simple-form-path', 'sinh', 'sixth',
            +            'skip-projection-wrapper?', 'some-system-path->string',
            +            'special-filter-input-port', 'split-at', 'split-at-right', 'sqr',
            +            'stream->list', 'stream-add-between', 'stream-andmap',
            +            'stream-append', 'stream-count', 'stream-empty?', 'stream-filter',
            +            'stream-first', 'stream-fold', 'stream-for-each', 'stream-length',
            +            'stream-map', 'stream-ormap', 'stream-ref', 'stream-rest',
            +            'stream-tail', 'stream?', 'string->some-system-path',
            +            'string-append*', 'string-no-nuls?', 'struct-type-property/c',
            +            'struct:exn:fail:contract:blame', 'struct:exn:fail:object',
            +            'subclass?', 'subclass?/c', 'subset?', 'symbol=?', 'system',
            +            'system*', 'system*/exit-code', 'system/exit-code', 'take',
            +            'take-right', 'tanh', 'tcp-abandon-port', 'tcp-accept',
            +            'tcp-accept-evt', 'tcp-accept-ready?', 'tcp-accept/enable-break',
            +            'tcp-addresses', 'tcp-close', 'tcp-connect',
            +            'tcp-connect/enable-break', 'tcp-listen', 'tcp-listener?',
            +            'tcp-port?', 'tentative-pretty-print-port-cancel',
            +            'tentative-pretty-print-port-transfer', 'tenth',
            +            'the-unsupplied-arg', 'third', 'touch', 'transplant-input-port',
            +            'transplant-output-port', 'true', 'udp-addresses', 'udp-bind!',
            +            'udp-bound?', 'udp-close', 'udp-connect!', 'udp-connected?',
            +            'udp-open-socket', 'udp-receive!', 'udp-receive!*',
            +            'udp-receive!-evt', 'udp-receive!/enable-break',
            +            'udp-receive-ready-evt', 'udp-send', 'udp-send*', 'udp-send-evt',
            +            'udp-send-ready-evt', 'udp-send-to', 'udp-send-to*',
            +            'udp-send-to-evt', 'udp-send-to/enable-break',
            +            'udp-send/enable-break', 'udp?', 'unit?', 'unsupplied-arg?',
            +            'user-execute-bit', 'user-read-bit', 'user-write-bit',
            +            'value-contract', 'vector-append', 'vector-argmax',
            +            'vector-argmin', 'vector-copy', 'vector-count', 'vector-drop',
            +            'vector-drop-right', 'vector-filter', 'vector-filter-not',
            +            'vector-map', 'vector-map!', 'vector-member', 'vector-memq',
            +            'vector-memv', 'vector-set*!', 'vector-split-at',
            +            'vector-split-at-right', 'vector-take', 'vector-take-right',
            +            'with-input-from-bytes', 'with-input-from-string',
            +            'with-output-to-bytes', 'with-output-to-string', 'would-be-future',
            +            'writable<%>', 'xor',
            +            ),
            +        4 => array(
            +            '>=/c', '<=/c', '->*m', '->d', '->dm', '->i', '->m',
            +            '=/c', 'absent', 'abstract', 'add-between', 'and/c', 'any',
            +            'any/c', 'augment', 'augment*', 'augment-final', 'augment-final*',
            +            'augride', 'augride*', 'between/c', 'blame-add-context',
            +            'box-immutable/c', 'box/c', 'call-with-file-lock/timeout',
            +            'case->', 'case->m', 'class', 'class*',
            +            'class-field-accessor', 'class-field-mutator', 'class/c',
            +            'class/derived', 'command-line', 'compound-unit',
            +            'compound-unit/infer', 'cons/c', 'continuation-mark-key/c',
            +            'contract', 'contract-out', 'contract-struct', 'contracted',
            +            'current-contract-region', 'define-compound-unit',
            +            'define-compound-unit/infer', 'define-contract-struct',
            +            'define-local-member-name', 'define-match-expander',
            +            'define-member-name', 'define-opt/c', 'define-serializable-class',
            +            'define-serializable-class*', 'define-signature',
            +            'define-signature-form', 'define-struct/contract', 'define-unit',
            +            'define-unit-binding', 'define-unit-from-context',
            +            'define-unit/contract', 'define-unit/new-import-export',
            +            'define-unit/s', 'define-values-for-export',
            +            'define-values/invoke-unit', 'define-values/invoke-unit/infer',
            +            'define/augment', 'define/augment-final', 'define/augride',
            +            'define/contract', 'define/final-prop', 'define/match',
            +            'define/overment', 'define/override', 'define/override-final',
            +            'define/private', 'define/public', 'define/public-final',
            +            'define/pubment', 'define/subexpression-pos-prop', 'delay',
            +            'delay/idle', 'delay/name', 'delay/strict', 'delay/sync',
            +            'delay/thread', 'dict->list', 'dict-can-functional-set?',
            +            'dict-can-remove-keys?', 'dict-count', 'dict-for-each',
            +            'dict-has-key?', 'dict-iterate-first', 'dict-iterate-key',
            +            'dict-iterate-next', 'dict-iterate-value', 'dict-keys', 'dict-map',
            +            'dict-mutable?', 'dict-ref', 'dict-ref!', 'dict-remove',
            +            'dict-remove!', 'dict-set', 'dict-set!', 'dict-set*', 'dict-set*!',
            +            'dict-update', 'dict-update!', 'dict-values', 'dict?',
            +            'display-lines', 'display-lines-to-file', 'display-to-file',
            +            'dynamic-place', 'dynamic-place*', 'eof-evt', 'except',
            +            'exn:fail:contract:blame', 'exn:fail:object', 'export', 'extends',
            +            'field', 'field-bound?', 'file->bytes', 'file->bytes-lines',
            +            'file->lines', 'file->list', 'file->string',
            +            'file->value', 'find-relative-path', 'flat-murec-contract',
            +            'flat-rec-contract', 'for*/set', 'for*/seteq', 'for*/seteqv',
            +            'for/set', 'for/seteq', 'for/seteqv', 'gen:dict', 'gen:stream',
            +            'generic', 'get-field', 'get-preference', 'hash/c', 'implies',
            +            'import', 'in-set', 'in-stream', 'include',
            +            'include-at/relative-to', 'include-at/relative-to/reader',
            +            'include/reader', 'inherit', 'inherit-field', 'inherit/inner',
            +            'inherit/super', 'init', 'init-depend', 'init-field', 'init-rest',
            +            'inner', 'inspect', 'instantiate', 'integer-in', 'interface',
            +            'interface*', 'invoke-unit', 'invoke-unit/infer', 'lazy', 'link',
            +            'list/c', 'listof', 'local', 'make-handle-get-preference-locked',
            +            'make-object', 'make-temporary-file', 'match', 'match*',
            +            'match*/derived', 'match-define', 'match-define-values',
            +            'match-lambda', 'match-lambda*', 'match-lambda**', 'match-let',
            +            'match-let*', 'match-let*-values', 'match-let-values',
            +            'match-letrec', 'match/derived', 'match/values', 'member-name-key',
            +            'method-contract?', 'mixin', 'nand', 'new', 'non-empty-listof',
            +            'none/c', 'nor', 'not/c', 'object-contract', 'object/c',
            +            'one-of/c', 'only', 'open', 'opt/c', 'or/c', 'overment',
            +            'overment*', 'override', 'override*', 'override-final',
            +            'override-final*', 'parameter/c', 'parametric->/c',
            +            'peek-bytes!-evt', 'peek-bytes-avail!-evt', 'peek-bytes-evt',
            +            'peek-string!-evt', 'peek-string-evt', 'peeking-input-port',
            +            'place', 'place*', 'port->bytes-lines', 'port->lines',
            +            'prefix', 'private', 'private*', 'procedure-arity-includes/c',
            +            'promise/c', 'prompt-tag/c', 'prop:dict/contract',
            +            'provide-signature-elements', 'provide/contract', 'public',
            +            'public*', 'public-final', 'public-final*', 'pubment', 'pubment*',
            +            'read-bytes!-evt', 'read-bytes-avail!-evt', 'read-bytes-evt',
            +            'read-bytes-line-evt', 'read-line-evt', 'read-string!-evt',
            +            'read-string-evt', 'real-in', 'recursive-contract',
            +            'regexp-match-evt', 'remove-duplicates', 'rename', 'rename-inner',
            +            'rename-super', 'send', 'send*', 'send+', 'send-generic',
            +            'send/apply', 'send/keyword-apply', 'set-field!', 'shared',
            +            'stream', 'stream-cons', 'string-join', 'string-len/c',
            +            'string-normalize-spaces', 'string-replace', 'string-split',
            +            'string-trim', 'struct*', 'struct/c', 'struct/ctc', 'struct/dc',
            +            'super', 'super-instantiate', 'super-make-object', 'super-new',
            +            'symbols', 'syntax/c', 'tag', 'this', 'this%', 'thunk', 'thunk*',
            +            'unconstrained-domain->', 'unit', 'unit-from-context', 'unit/c',
            +            'unit/new-import-export', 'unit/s', 'vector-immutable/c',
            +            'vector-immutableof', 'vector/c', 'vectorof', 'with-contract',
            +            'with-method', 'write-to-file', '~.a', '~.s', '~.v', '~a', '~e',
            +            '~r', '~s', '~v',
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        0 => array(
            +            '>', '>=', '<', '<=', '*', '+', '-', '->', '->*', '...', '/',
            +            '=', '=>', '==', '_', '#fl', '#fx', '#s', '#', '#f', '#F',
            +            '#false', '#t', '#T', '#true', '#lang', '#reader', '.', '\'', '#`',
            +            '#,@', '#,', '#\'', '`', '@', ',', '#%', '#$', '#&', '#~', '#rx',
            +            '#px', '#<<', '#;', '#hash', '#',
            +            ),
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        ),
            +    'NUMBERS' => array(
            +        1 => '(((#x#e)|(#e#x)|(#x#i)|(#i#x)|(#x))((((((((((((-)|(\+)))?(((('.
            +            '(([0-9])+)?(\.)?(([0-9a-fA-F])+(#)*)))|(((([0-9a-fA-F])+(#)*)'.
            +            '(\.)?(#)*))|(((([0-9a-fA-F])+(#)*)\\/(([0-9a-fA-F])+(#)*))))('.
            +            '([sl]((((-)|(\+)))?([0-9])+)))?)))|((((-)|(\+))(((inf\.)|(nan'.
            +            '\.))[0f])))))?((-)|(\+))(((((((([0-9])+)?(\.)?(([0-9a-fA-F])+'.
            +            '(#)*)))|(((([0-9a-fA-F])+(#)*)(\.)?(#)*))|(((([0-9a-fA-F])+(#'.
            +            ')*)\\/(([0-9a-fA-F])+(#)*))))(([sl]((((-)|(\+)))?([0-9])+)))?'.
            +            '))|((((inf\.)|(nan\.))[0f])))i))|((((((((-)|(\+)))?(((((([0-9'.
            +            '])+)?(\.)?(([0-9a-fA-F])+(#)*)))|(((([0-9a-fA-F])+(#)*)(\.)?('.
            +            '#)*))|(((([0-9a-fA-F])+(#)*)\\/(([0-9a-fA-F])+(#)*))))(([sl]('.
            +            '(((-)|(\+)))?([0-9])+)))?)))|((((-)|(\+))(((inf\.)|(nan\.))[0'.
            +            'f]))))@((((((-)|(\+)))?(((((([0-9])+)?(\.)?(([0-9a-fA-F])+(#)'.
            +            '*)))|(((([0-9a-fA-F])+(#)*)(\.)?(#)*))|(((([0-9a-fA-F])+(#)*)'.
            +            '\\/(([0-9a-fA-F])+(#)*))))(([sl]((((-)|(\+)))?([0-9])+)))?)))'.
            +            '|((((-)|(\+))(((inf\.)|(nan\.))[0f]))))))))|((((((-)|(\+)))?('.
            +            '([0-9])+\\/([0-9])+))((-)|(\+))(([0-9])+\\/([0-9])+)i))|((((('.
            +            '-)|(\+)))?(([0-9])+\\/([0-9])+)))|(((((((-)|(\+)))?(((((([0-9'.
            +            '])+)?(\.)?(([0-9a-fA-F])+(#)*)))|(((([0-9a-fA-F])+(#)*)(\.)?('.
            +            '#)*))|(((([0-9a-fA-F])+(#)*)\\/(([0-9a-fA-F])+(#)*))))(([sl]('.
            +            '(((-)|(\+)))?([0-9])+)))?)))|((((-)|(\+))(((inf\.)|(nan\.))[0'.
            +            'f])))))|(((((-)|(\+)))?([0-9])+))))',
            +        2 => '(((#o#e)|(#e#o)|(#o#i)|(#i#o)|(#o))((((((((((((-)|(\+)))?(((('.
            +            '(([0-9])+)?(\.)?(([0-7])+(#)*)))|(((([0-7])+(#)*)(\.)?(#)*))|'.
            +            '(((([0-7])+(#)*)\\/(([0-7])+(#)*))))(((([sl])|([def]))((((-)|'.
            +            '(\+)))?([0-9])+)))?)))|((((-)|(\+))(((inf\.)|(nan\.))[0f]))))'.
            +            ')?((-)|(\+))(((((((([0-9])+)?(\.)?(([0-7])+(#)*)))|(((([0-7])'.
            +            '+(#)*)(\.)?(#)*))|(((([0-7])+(#)*)\\/(([0-7])+(#)*))))(((([sl'.
            +            '])|([def]))((((-)|(\+)))?([0-9])+)))?))|((((inf\.)|(nan\.))[0'.
            +            'f])))i))|((((((((-)|(\+)))?(((((([0-9])+)?(\.)?(([0-7])+(#)*)'.
            +            '))|(((([0-7])+(#)*)(\.)?(#)*))|(((([0-7])+(#)*)\\/(([0-7])+(#'.
            +            ')*))))(((([sl])|([def]))((((-)|(\+)))?([0-9])+)))?)))|((((-)|'.
            +            '(\+))(((inf\.)|(nan\.))[0f]))))@((((((-)|(\+)))?(((((([0-9])+'.
            +            ')?(\.)?(([0-7])+(#)*)))|(((([0-7])+(#)*)(\.)?(#)*))|(((([0-7]'.
            +            ')+(#)*)\\/(([0-7])+(#)*))))(((([sl])|([def]))((((-)|(\+)))?(['.
            +            '0-9])+)))?)))|((((-)|(\+))(((inf\.)|(nan\.))[0f]))))))))|(((('.
            +            '((-)|(\+)))?(([0-9])+\\/([0-9])+))((-)|(\+))(([0-9])+\\/([0-9'.
            +            '])+)i))|(((((-)|(\+)))?(([0-9])+\\/([0-9])+)))|(((((((-)|(\+)'.
            +            '))?(((((([0-9])+)?(\.)?(([0-7])+(#)*)))|(((([0-7])+(#)*)(\.)?'.
            +            '(#)*))|(((([0-7])+(#)*)\\/(([0-7])+(#)*))))(((([sl])|([def]))'.
            +            '((((-)|(\+)))?([0-9])+)))?)))|((((-)|(\+))(((inf\.)|(nan\.))['.
            +            '0f])))))|(((((-)|(\+)))?([0-9])+))))',
            +        3 => '(((#b#e)|(#e#b)|(#b#i)|(#i#b)|(#b))((((((((((((-)|(\+)))?(((('.
            +            '(([0-9])+)?(\.)?(([0-1])+(#)*)))|(((([0-1])+(#)*)(\.)?(#)*))|'.
            +            '(((([0-1])+(#)*)\\/(([0-1])+(#)*))))(((([sl])|([def]))((((-)|'.
            +            '(\+)))?([0-9])+)))?)))|((((-)|(\+))(((inf\.)|(nan\.))[0f]))))'.
            +            ')?((-)|(\+))(((((((([0-9])+)?(\.)?(([0-1])+(#)*)))|(((([0-1])'.
            +            '+(#)*)(\.)?(#)*))|(((([0-1])+(#)*)\\/(([0-1])+(#)*))))(((([sl'.
            +            '])|([def]))((((-)|(\+)))?([0-9])+)))?))|((((inf\.)|(nan\.))[0'.
            +            'f])))i))|((((((((-)|(\+)))?(((((([0-9])+)?(\.)?(([0-1])+(#)*)'.
            +            '))|(((([0-1])+(#)*)(\.)?(#)*))|(((([0-1])+(#)*)\\/(([0-1])+(#'.
            +            ')*))))(((([sl])|([def]))((((-)|(\+)))?([0-9])+)))?)))|((((-)|'.
            +            '(\+))(((inf\.)|(nan\.))[0f]))))@((((((-)|(\+)))?(((((([0-9])+'.
            +            ')?(\.)?(([0-1])+(#)*)))|(((([0-1])+(#)*)(\.)?(#)*))|(((([0-1]'.
            +            ')+(#)*)\\/(([0-1])+(#)*))))(((([sl])|([def]))((((-)|(\+)))?(['.
            +            '0-9])+)))?)))|((((-)|(\+))(((inf\.)|(nan\.))[0f]))))))))|(((('.
            +            '((-)|(\+)))?(([0-9])+\\/([0-9])+))((-)|(\+))(([0-9])+\\/([0-9'.
            +            '])+)i))|(((((-)|(\+)))?(([0-9])+\\/([0-9])+)))|(((((((-)|(\+)'.
            +            '))?(((((([0-9])+)?(\.)?(([0-1])+(#)*)))|(((([0-1])+(#)*)(\.)?'.
            +            '(#)*))|(((([0-1])+(#)*)\\/(([0-1])+(#)*))))(((([sl])|([def]))'.
            +            '((((-)|(\+)))?([0-9])+)))?)))|((((-)|(\+))(((inf\.)|(nan\.))['.
            +            '0f])))))|(((((-)|(\+)))?([0-9])+))))',
            +        4 => '((((#d#e)|(#e#d)|(#d#i)|(#i#d)|(#e)|(#i)|(#d)))?((((((((((((-'.
            +            ')|(\+)))?(((((([0-9])+)?(\.)?(([0-9])+(#)*)))|(((([0-9])+(#)*'.
            +            ')(\.)?(#)*))|(((([0-9])+(#)*)\\/(([0-9])+(#)*))))(((([sl])|(['.
            +            'def]))((((-)|(\+)))?([0-9])+)))?)))|((((-)|(\+))(((inf\.)|(na'.
            +            'n\.))[0f])))))?((-)|(\+))(((((((([0-9])+)?(\.)?(([0-9])+(#)*)'.
            +            '))|(((([0-9])+(#)*)(\.)?(#)*))|(((([0-9])+(#)*)\\/(([0-9])+(#'.
            +            ')*))))(((([sl])|([def]))((((-)|(\+)))?([0-9])+)))?))|((((inf'.
            +            '\.)|(nan\.))[0f])))i))|((((((((-)|(\+)))?(((((([0-9])+)?(\.)?'.
            +            '(([0-9])+(#)*)))|(((([0-9])+(#)*)(\.)?(#)*))|(((([0-9])+(#)*)'.
            +            '\\/(([0-9])+(#)*))))(((([sl])|([def]))((((-)|(\+)))?([0-9])+)'.
            +            '))?)))|((((-)|(\+))(((inf\.)|(nan\.))[0f]))))@((((((-)|(\+)))'.
            +            '?(((((([0-9])+)?(\.)?(([0-9])+(#)*)))|(((([0-9])+(#)*)(\.)?(#'.
            +            ')*))|(((([0-9])+(#)*)\\/(([0-9])+(#)*))))(((([sl])|([def]))(('.
            +            '((-)|(\+)))?([0-9])+)))?)))|((((-)|(\+))(((inf\.)|(nan\.))[0f'.
            +            ']))))))))|((((((-)|(\+)))?(([0-9])+\\/([0-9])+))((-)|(\+))((['.
            +            '0-9])+\\/([0-9])+)i))|(((((-)|(\+)))?(([0-9])+\\/([0-9])+)))|'.
            +            '(((((((-)|(\+)))?(((((([0-9])+)?(\.)?(([0-9])+(#)*)))|(((([0-'.
            +            '9])+(#)*)(\.)?(#)*))|(((([0-9])+(#)*)\\/(([0-9])+(#)*))))(((('.
            +            '[sl])|([def]))((((-)|(\+)))?([0-9])+)))?)))|((((-)|(\+))(((in'.
            +            'f\.)|(nan\.))[0f])))))|(((((-)|(\+)))?([0-9])+))))',
            +            ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: blue;',
            +            2 => 'color: rgb(34, 34, 139);',
            +            3 => 'color: blue;',
            +            4 => 'color: rgb(34, 34, 139);',
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: rgb(194, 116, 31);',
            +            'MULTI' => 'color: rgb(194, 116, 31);',
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => '',
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: rgb(132, 60,36);',
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: rgb(34, 139, 34);',
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: rgb(34, 139, 34);',
            +            1 => 'color: rgb(34, 139, 34);',
            +            2 => 'color: rgb(34, 139, 34);',
            +            3 => 'color: rgb(34, 139, 34);',
            +            4 => 'color: rgb(34, 139, 34);',
            +            ),
            +        'METHODS' => array(
            +            0 => 'color: #202020;',
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: rgb(132, 60,36);',
            +            ),
            +        'REGEXPS' => array(
            +            1 => 'color: rgb(34, 139, 34);',
            +            2 => 'color: rgb(132, 60,36);',
            +            3 => 'color: rgb(34, 139, 34);',
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        ),
            +    'URLS' => array(
            +        1 => 'http://docs.racket-lang.org/reference/',
            +        2 => 'http://docs.racket-lang.org/reference/',
            +        3 => 'http://docs.racket-lang.org/reference/',
            +        4 => 'http://docs.racket-lang.org/reference/',
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        1 => '#\\\\(nul|null|backspace|tab|newline|linefeed|vtab|page|retur'.
            +            'n|space|rubout|([0-7]{1,3})|(u[[:xdigit:]]{1,4})|(U[[:xdigit:'.
            +            ']]{1,6})|[a-z])',
            +        2 => '#:[^[:space:]()[\\]{}",\']+',
            +        3 => '\'((\\\\ )|([^[:space:]()[\\]{}",\']))+',
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            'DISALLOWED_BEFORE' => '[[:space:]()[\\]{}",\']',
            +            ),
            +        'ENABLE_FLAGS' => array(
            +            'SYMBOLS' => GESHI_MAYBE,
            +            'BRACKETS' => GESHI_MAYBE,
            +            'REGEXPS' => GESHI_MAYBE,
            +            'ESCAPE_CHAR' => GESHI_MAYBE,
            +            )
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/rails.php b/vendor/easybook/geshi/geshi/rails.php
            new file mode 100644
            index 0000000000..d41bd9a6f8
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/rails.php
            @@ -0,0 +1,404 @@
            + 'Rails',
            +    'COMMENT_SINGLE' => array(1 => "#"),
            +    'COMMENT_MULTI' => array("=begin" => "=end"),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"', '`','\''),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'alias', 'and', 'begin', 'break', 'case', 'class',
            +            'def', 'defined', 'do', 'else', 'elsif', 'end',
            +            'ensure', 'for', 'if', 'in', 'module', 'while',
            +            'next', 'not', 'or', 'redo', 'rescue', 'yield',
            +            'retry', 'super', 'then', 'undef', 'unless',
            +            'until', 'when', 'BEGIN', 'END', 'include'
            +            ),
            +        2 => array(
            +            '__FILE__', '__LINE__', 'false', 'nil', 'self', 'true',
            +            'return'
            +            ),
            +        3 => array(
            +            'Array', 'Float', 'Integer', 'String', 'at_exit',
            +            'autoload', 'binding', 'caller', 'catch', 'chop', 'chop!',
            +            'chomp', 'chomp!', 'eval', 'exec', 'exit', 'exit!', 'fail',
            +            'fork', 'format', 'gets', 'global_variables', 'gsub', 'gsub!',
            +            'iterator?', 'lambda', 'load', 'local_variables', 'loop',
            +            'open', 'p', 'print', 'printf', 'proc', 'putc', 'puts',
            +            'raise', 'rand', 'readline', 'readlines', 'require', 'select',
            +            'sleep', 'split', 'sprintf', 'srand', 'sub', 'sub!', 'syscall',
            +            'system', 'trace_var', 'trap', 'untrace_var'
            +            ),
            +        4 => array(
            +            'Abbrev', 'ArgumentError', 'Base64', 'Benchmark',
            +            'Benchmark::Tms', 'Bignum', 'Binding', 'CGI', 'CGI::Cookie',
            +            'CGI::HtmlExtension', 'CGI::QueryExtension',
            +            'CGI::Session', 'CGI::Session::FileStore',
            +            'CGI::Session::MemoryStore', 'Class', 'Comparable', 'Complex',
            +            'ConditionVariable', 'Continuation', 'Data',
            +            'Date', 'DateTime', 'Delegator', 'Dir', 'EOFError', 'ERB',
            +            'ERB::Util', 'Enumerable', 'Enumerable::Enumerator', 'Errno',
            +            'Exception', 'FalseClass', 'File',
            +            'File::Constants', 'File::Stat', 'FileTest', 'FileUtils',
            +            'FileUtils::DryRun', 'FileUtils::NoWrite',
            +            'FileUtils::StreamUtils_', 'FileUtils::Verbose', 'Find',
            +            'Fixnum', 'FloatDomainError', 'Forwardable', 'GC', 'Generator',
            +            'Hash', 'IO', 'IOError', 'Iconv', 'Iconv::BrokenLibrary',
            +            'Iconv::Failure', 'Iconv::IllegalSequence',
            +            'Iconv::InvalidCharacter', 'Iconv::InvalidEncoding',
            +            'Iconv::OutOfRange', 'IndexError', 'Interrupt', 'Kernel',
            +            'LoadError', 'LocalJumpError', 'Logger', 'Logger::Application',
            +            'Logger::Error', 'Logger::Formatter', 'Logger::LogDevice',
            +            'Logger::LogDevice::LogDeviceMutex', 'Logger::Severity',
            +            'Logger::ShiftingError', 'Marshal', 'MatchData',
            +            'Math', 'Matrix', 'Method', 'Module', 'Mutex', 'NameError',
            +            'NameError::message', 'NilClass', 'NoMemoryError',
            +            'NoMethodError', 'NotImplementedError', 'Numeric', 'Object',
            +            'ObjectSpace', 'Observable', 'PStore', 'PStore::Error',
            +            'Pathname', 'Precision', 'Proc', 'Process', 'Process::GID',
            +            'Process::Status', 'Process::Sys', 'Process::UID', 'Queue',
            +            'Range', 'RangeError', 'Rational', 'Regexp', 'RegexpError',
            +            'RuntimeError', 'ScriptError', 'SecurityError', 'Set',
            +            'Shellwords', 'Signal', 'SignalException', 'SimpleDelegator',
            +            'SingleForwardable', 'Singleton', 'SingletonClassMethods',
            +            'SizedQueue', 'SortedSet', 'StandardError', 'StringIO',
            +            'StringScanner', 'StringScanner::Error', 'Struct', 'Symbol',
            +            'SyncEnumerator', 'SyntaxError', 'SystemCallError',
            +            'SystemExit', 'SystemStackError', 'Tempfile',
            +            'Test::Unit::TestCase', 'Test::Unit', 'Test', 'Thread',
            +            'ThreadError', 'ThreadGroup',
            +            'ThreadsWait', 'Time', 'TrueClass', 'TypeError', 'URI',
            +            'URI::BadURIError', 'URI::Error', 'URI::Escape', 'URI::FTP',
            +            'URI::Generic', 'URI::HTTP', 'URI::HTTPS',
            +            'URI::InvalidComponentError', 'URI::InvalidURIError',
            +            'URI::LDAP', 'URI::MailTo', 'URI::REGEXP',
            +            'URI::REGEXP::PATTERN', 'UnboundMethod', 'Vector', 'YAML',
            +            'ZeroDivisionError', 'Zlib',
            +            'Zlib::BufError', 'Zlib::DataError', 'Zlib::Deflate',
            +            'Zlib::Error', 'Zlib::GzipFile', 'Zlib::GzipFile::CRCError',
            +            'Zlib::GzipFile::Error', 'Zlib::GzipFile::LengthError',
            +            'Zlib::GzipFile::NoFooter', 'Zlib::GzipReader',
            +            'Zlib::GzipWriter', 'Zlib::Inflate', 'Zlib::MemError',
            +            'Zlib::NeedDict', 'Zlib::StreamEnd', 'Zlib::StreamError',
            +            'Zlib::VersionError',
            +            'Zlib::ZStream',
            +            'ActionController::AbstractRequest',
            +            'ActionController::Assertions::DomAssertions',
            +            'ActionController::Assertions::ModelAssertions',
            +            'ActionController::Assertions::ResponseAssertions',
            +            'ActionController::Assertions::RoutingAssertions',
            +            'ActionController::Assertions::SelectorAssertions',
            +            'ActionController::Assertions::TagAssertions',
            +            'ActionController::Base',
            +            'ActionController::Benchmarking::ClassMethods',
            +            'ActionController::Caching',
            +            'ActionController::Caching::Actions',
            +            'ActionController::Caching::Actions::ActionCachePath',
            +            'ActionController::Caching::Fragments',
            +            'ActionController::Caching::Pages',
            +            'ActionController::Caching::Pages::ClassMethods',
            +            'ActionController::Caching::Sweeping',
            +            'ActionController::Components',
            +            'ActionController::Components::ClassMethods',
            +            'ActionController::Components::InstanceMethods',
            +            'ActionController::Cookies',
            +            'ActionController::Filters::ClassMethods',
            +            'ActionController::Flash',
            +            'ActionController::Flash::FlashHash',
            +            'ActionController::Helpers::ClassMethods',
            +            'ActionController::Integration::Session',
            +            'ActionController::IntegrationTest',
            +            'ActionController::Layout::ClassMethods',
            +            'ActionController::Macros',
            +            'ActionController::Macros::AutoComplete::ClassMethods',
            +            'ActionController::Macros::InPlaceEditing::ClassMethods',
            +            'ActionController::MimeResponds::InstanceMethods',
            +            'ActionController::Pagination',
            +            'ActionController::Pagination::ClassMethods',
            +            'ActionController::Pagination::Paginator',
            +            'ActionController::Pagination::Paginator::Page',
            +            'ActionController::Pagination::Paginator::Window',
            +            'ActionController::Rescue', 'ActionController::Resources',
            +            'ActionController::Routing',
            +            'ActionController::Scaffolding::ClassMethods',
            +            'ActionController::SessionManagement::ClassMethods',
            +            'ActionController::Streaming', 'ActionController::TestProcess',
            +            'ActionController::TestUploadedFile',
            +            'ActionController::UrlWriter',
            +            'ActionController::Verification::ClassMethods',
            +            'ActionMailer::Base', 'ActionView::Base',
            +            'ActionView::Helpers::ActiveRecordHelper',
            +            'ActionView::Helpers::AssetTagHelper',
            +            'ActionView::Helpers::BenchmarkHelper',
            +            'ActionView::Helpers::CacheHelper',
            +            'ActionView::Helpers::CaptureHelper',
            +            'ActionView::Helpers::DateHelper',
            +            'ActionView::Helpers::DebugHelper',
            +            'ActionView::Helpers::FormHelper',
            +            'ActionView::Helpers::FormOptionsHelper',
            +            'ActionView::Helpers::FormTagHelper',
            +            'ActionView::Helpers::JavaScriptHelper',
            +            'ActionView::Helpers::JavaScriptMacrosHelper',
            +            'ActionView::Helpers::NumberHelper',
            +            'ActionView::Helpers::PaginationHelper',
            +            'ActionView::Helpers::PrototypeHelper',
            +            'ActionView::Helpers::PrototypeHelper::JavaScriptGenerator::GeneratorMethods',
            +            'ActionView::Helpers::ScriptaculousHelper',
            +            'ActionView::Helpers::TagHelper',
            +            'ActionView::Helpers::TextHelper',
            +            'ActionView::Helpers::UrlHelper', 'ActionView::Partials',
            +            'ActionWebService::API::Method', 'ActionWebService::Base',
            +            'ActionWebService::Client::Soap',
            +            'ActionWebService::Client::XmlRpc',
            +            'ActionWebService::Container::ActionController::ClassMethods',
            +            'ActionWebService::Container::Delegated::ClassMethods',
            +            'ActionWebService::Container::Direct::ClassMethods',
            +            'ActionWebService::Invocation::ClassMethods',
            +            'ActionWebService::Scaffolding::ClassMethods',
            +            'ActionWebService::SignatureTypes', 'ActionWebService::Struct',
            +            'ActiveRecord::Acts::List::ClassMethods',
            +            'ActiveRecord::Acts::List::InstanceMethods',
            +            'ActiveRecord::Acts::NestedSet::ClassMethods',
            +            'ActiveRecord::Acts::NestedSet::InstanceMethods',
            +            'ActiveRecord::Acts::Tree::ClassMethods',
            +            'ActiveRecord::Acts::Tree::InstanceMethods',
            +            'ActiveRecord::Aggregations::ClassMethods',
            +            'ActiveRecord::Associations::ClassMethods',
            +            'ActiveRecord::AttributeMethods::ClassMethods',
            +            'ActiveRecord::Base',
            +            'ActiveRecord::Calculations::ClassMethods',
            +            'ActiveRecord::Callbacks',
            +            'ActiveRecord::ConnectionAdapters::AbstractAdapter',
            +            'ActiveRecord::ConnectionAdapters::Column',
            +            'ActiveRecord::ConnectionAdapters::DB2Adapter',
            +            'ActiveRecord::ConnectionAdapters::DatabaseStatements',
            +            'ActiveRecord::ConnectionAdapters::FirebirdAdapter',
            +            'ActiveRecord::ConnectionAdapters::FrontBaseAdapter',
            +            'ActiveRecord::ConnectionAdapters::MysqlAdapter',
            +            'ActiveRecord::ConnectionAdapters::OpenBaseAdapter',
            +            'ActiveRecord::ConnectionAdapters::OracleAdapter',
            +            'ActiveRecord::ConnectionAdapters::PostgreSQLAdapter',
            +            'ActiveRecord::ConnectionAdapters::Quoting',
            +            'ActiveRecord::ConnectionAdapters::SQLServerAdapter',
            +            'ActiveRecord::ConnectionAdapters::SQLiteAdapter',
            +            'ActiveRecord::ConnectionAdapters::SchemaStatements',
            +            'ActiveRecord::ConnectionAdapters::SybaseAdapter::ColumnWithIdentity',
            +            'ActiveRecord::ConnectionAdapters::SybaseAdapterContext',
            +            'ActiveRecord::ConnectionAdapters::TableDefinition',
            +            'ActiveRecord::Errors', 'ActiveRecord::Locking',
            +            'ActiveRecord::Locking::Optimistic',
            +            'ActiveRecord::Locking::Optimistic::ClassMethods',
            +            'ActiveRecord::Locking::Pessimistic',
            +            'ActiveRecord::Migration', 'ActiveRecord::Observer',
            +            'ActiveRecord::Observing::ClassMethods',
            +            'ActiveRecord::Reflection::ClassMethods',
            +            'ActiveRecord::Reflection::MacroReflection',
            +            'ActiveRecord::Schema', 'ActiveRecord::Timestamp',
            +            'ActiveRecord::Transactions::ClassMethods',
            +            'ActiveRecord::Validations',
            +            'ActiveRecord::Validations::ClassMethods',
            +            'ActiveRecord::XmlSerialization',
            +            'ActiveSupport::CachingTools::HashCaching',
            +            'ActiveSupport::CoreExtensions::Array::Conversions',
            +            'ActiveSupport::CoreExtensions::Array::Grouping',
            +            'ActiveSupport::CoreExtensions::Date::Conversions',
            +            'ActiveSupport::CoreExtensions::Hash::Conversions',
            +            'ActiveSupport::CoreExtensions::Hash::Conversions::ClassMethods',
            +            'ActiveSupport::CoreExtensions::Hash::Diff',
            +            'ActiveSupport::CoreExtensions::Hash::Keys',
            +            'ActiveSupport::CoreExtensions::Hash::ReverseMerge',
            +            'ActiveSupport::CoreExtensions::Integer::EvenOdd',
            +            'ActiveSupport::CoreExtensions::Integer::Inflections',
            +            'ActiveSupport::CoreExtensions::Numeric::Bytes',
            +            'ActiveSupport::CoreExtensions::Numeric::Time',
            +            'ActiveSupport::CoreExtensions::Pathname::CleanWithin',
            +            'ActiveSupport::CoreExtensions::Range::Conversions',
            +            'ActiveSupport::CoreExtensions::String::Access',
            +            'ActiveSupport::CoreExtensions::String::Conversions',
            +            'ActiveSupport::CoreExtensions::String::Inflections',
            +            'ActiveSupport::CoreExtensions::String::Iterators',
            +            'ActiveSupport::CoreExtensions::String::StartsEndsWith',
            +            'ActiveSupport::CoreExtensions::String::Unicode',
            +            'ActiveSupport::CoreExtensions::Time::Calculations',
            +            'ActiveSupport::CoreExtensions::Time::Calculations::ClassMethods',
            +            'ActiveSupport::CoreExtensions::Time::Conversions',
            +            'ActiveSupport::Multibyte::Chars',
            +            'ActiveSupport::Multibyte::Handlers::UTF8Handler',
            +            'Breakpoint', 'Builder::BlankSlate', 'Builder::XmlMarkup',
            +            'Fixtures',
            +            'HTML::Selector', 'HashWithIndifferentAccess', 'Inflector',
            +            'Inflector::Inflections', 'Mime', 'Mime::Type',
            +            'OCI8AutoRecover', 'TimeZone', 'XmlSimple'
            +            ),
            +        5 => array(
            +            'image_tag', 'link_to', 'link_to_remote', 'javascript_include_tag',
            +            'assert_equal', 'assert_not_equal', 'before_filter',
            +            'after_filter', 'render', 'redirect_to', 'hide_action',
            +            'render_to_string', 'url_for', 'controller_name',
            +            'controller_class_name', 'controller_path', 'session',
            +            'render_component', 'render_component_as_string', 'cookie',
            +            'layout', 'flash', 'auto_complete_for', 'in_place_editor_for',
            +            'respond_to', 'paginate', 'current_page', 'each', 'first',
            +            'first_page', 'last_page', 'last', 'length', 'new', 'page_count',
            +            'previous', 'scaffold', 'send_data',
            +            'send_file', 'deliver', 'receive', 'error_messages_for',
            +            'error_message_on', 'form', 'input', 'stylesheet_link_tag',
            +            'stylesheet_path', 'content_for', 'select_date', 'ago',
            +            'month', 'day', 'check_box', 'fields_for', 'file_field',
            +            'form_for', 'hidden_field', 'text_area', 'password_field',
            +            'collection_select', 'options_for_select',
            +            'options_from_collection_for_select', 'file_field_tag',
            +            'form_for_tag', 'hidden_field_tag', 'text_area_tag',
            +            'password_field_tag', 'link_to_function', 'javascript_tag',
            +            'human_size', 'number_to_currency', 'pagination_links',
            +            'form_remote_tag', 'form_remote_for',
            +            'submit_to_remote', 'remote_function', 'observe_form',
            +            'observe_field', 'remote_form_for', 'options_for_ajax', 'alert',
            +            'call', 'assign', 'show', 'hide', 'insert_html', 'sortable',
            +            'toggle', 'visual_effect', 'replace', 'replace_html', 'remove',
            +            'save', 'save!', 'draggable', 'drop_receiving', 'literal',
            +            'draggable_element', 'drop_receiving_element', 'sortable_element',
            +            'content_tag', 'tag', 'link_to_image', 'link_to_if',
            +            'link_to_unless', 'mail_to', 'link_image_to', 'button_to',
            +            'current_page?', 'act_as_list', 'act_as_nested', 'act_as_tree',
            +            'has_many', 'has_one', 'belongs_to', 'has_many_and_belogns_to',
            +            'delete', 'destroy', 'destroy_all', 'clone', 'deep_clone', 'copy',
            +            'update', 'table_name', 'primary_key', 'sum', 'maximun', 'minimum',
            +            'count', 'size', 'after_save', 'after_create', 'before_save',
            +            'before_create', 'add_to_base', 'errors', 'add', 'validate',
            +            'validates_presence_of', 'validates_numericality_of',
            +            'validates_uniqueness_of', 'validates_length_of',
            +            'validates_format_of', 'validates_size_of', 'to_a', 'to_s',
            +            'to_xml', 'to_i'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '[', ']', '{', '}', '%', '&', '*', '|', '/', '<', '>',
            +        '+', '-', '=>', '<<'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        5 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color:#9966CC; font-weight:bold;',
            +            2 => 'color:#0000FF; font-weight:bold;',
            +            3 => 'color:#CC0066; font-weight:bold;',
            +            4 => 'color:#CC00FF; font-weight:bold;',
            +            5 => 'color:#5A0A0A; font-weight:bold;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color:#008000; font-style:italic;',
            +                    'MULTI' => 'color:#000080; font-style:italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color:#000099;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color:#006600; font-weight:bold;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color:#996600;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color:#006666;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color:#9900CC;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color:#006600; font-weight:bold;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color:#ff6633; font-weight:bold;',
            +            1 => 'color:#0066ff; font-weight:bold;',
            +            2 => 'color:#6666ff; font-weight:bold;',
            +            3 => 'color:#ff3333; font-weight:bold;'
            +            ),
            +        'SCRIPT' => array(
            +            0 => '',
            +            1 => '',
            +            2 => '',
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        0 => array(
            +            GESHI_SEARCH => "([[:space:]])(\\$[a-zA-Z_][a-zA-Z0-9_]*)",
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => ''
            +            ),
            +        1 => array(
            +            GESHI_SEARCH => "([[:space:]])(@[a-zA-Z_][a-zA-Z0-9_]*)",
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => ''
            +            ),
            +        2 => "([A-Z][a-zA-Z0-9_]*::)+[A-Z][a-zA-Z0-9_]*", //Static OOP References
            +        3 => array(
            +            GESHI_SEARCH => "([[:space:]]|\[|\()(:[a-zA-Z_][a-zA-Z0-9_]*)",
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => ''
            +            )
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_MAYBE,
            +    'SCRIPT_DELIMITERS' => array(
            +        0 => array(
            +            '<%' => '%>'
            +            )
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        0 => true,
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/rbs.php b/vendor/easybook/geshi/geshi/rbs.php
            new file mode 100644
            index 0000000000..02c2fcfa8f
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/rbs.php
            @@ -0,0 +1,224 @@
            + 'RBScript',
            +    'COMMENT_SINGLE' => array( 1 => '//', 2 => "'" ),
            +    'COMMENT_MULTI' => array(),
            +    'COMMENT_REGEXP' => array(
            +        3 => '/REM\s.*$/im',
            +        4 => '/&b[01]+/',
            +        5 => '/&o[0-7]+/',
            +        6 => '/&h[a-f0-9]+/i',
            +        7 => '/&c[a-f0-9]+/i',
            +        8 => '/&u[a-f0-9]+/i',
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'Int8', 'Int16', 'Int32', 'Int64', 'Uint8', 'Uint16', 'Uint32', 'Uint64', 'Byte', 'Integer',
            +            'Single', 'Double', 'Boolean', 'String', 'Color', 'Object', 'Variant'
            +            ),
            +        2 => array(
            +            'Private', 'Public', 'Protected',
            +            'Sub', 'Function', 'Delegate', 'Exception',
            +            ),
            +        3 => array(
            +            'IsA',
            +            'And', 'Or', 'Not', 'Xor',
            +            'If', 'Then', 'Else', 'ElseIf',
            +            'Select', 'Case',
            +            'For', 'Each', 'In', 'To', 'Step', 'Next',
            +            'Do', 'Loop', 'Until',
            +            'While', 'Wend',
            +            'Continue', 'Exit', 'Goto', 'End',
            +            ),
            +        4 => array(
            +            'Const', 'Static',
            +            'Dim', 'As', 'Redim',
            +            'Me', 'Self', 'Super', 'Extends', 'Implements',
            +            'ByRef', 'ByVal', 'Assigns', 'ParamArray',
            +            'Mod',
            +            'Raise',
            +            ),
            +        5 => array(
            +            'False', 'True', 'Nil'
            +            ),
            +        6 => array(
            +            'Abs',
            +            'Acos',
            +            'Asc',
            +            'AscB',
            +            'Asin',
            +            'Atan',
            +            'Atan2',
            +            'CDbl',
            +            'Ceil',
            +            'Chr',
            +            'ChrB',
            +            'CMY',
            +            'Cos',
            +            'CountFields',
            +            'CStr',
            +            'Exp',
            +            'Floor',
            +            'Format',
            +            'Hex',
            +            'HSV',
            +            'InStr',
            +            'InStrB',
            +            'Left',
            +            'LeftB',
            +            'Len',
            +            'LenB',
            +            'Log',
            +            'Lowercase',
            +            'LTrim',
            +            'Max',
            +            'Microseconds',
            +            'Mid',
            +            'MidB',
            +            'Min',
            +            'NthField',
            +            'Oct',
            +            'Pow',
            +            'Replace',
            +            'ReplaceB',
            +            'ReplaceAll',
            +            'ReplaceAllB',
            +            'RGB',
            +            'Right',
            +            'RightB',
            +            'Rnd',
            +            'Round',
            +            'RTrim',
            +            'Sin',
            +            'Sqrt',
            +            'Str',
            +            'StrComp',
            +            'Tan',
            +            'Ticks',
            +            'Titlecase',
            +            'Trim',
            +            'UBound',
            +            'Uppercase',
            +            'Val',
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +            '+', '-', '*', '/', '\\', '^', '<', '>', '=', '<>', '&'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        5 => false,
            +        6 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #F660AB; font-weight: bold;',
            +            2 => 'color: #E56717; font-weight: bold;',
            +            3 => 'color: #8D38C9; font-weight: bold;',
            +            4 => 'color: #151B8D; font-weight: bold;',
            +            5 => 'color: #00C2FF; font-weight: bold;',
            +            6 => 'color: #3EA99F; font-weight: bold;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #008000;',
            +            2 => 'color: #008000;',
            +            3 => 'color: #008000;',
            +
            +            4 => 'color: #800000;',
            +            5 => 'color: #800000;',
            +            6 => 'color: #800000;',
            +            7 => 'color: #800000;',
            +            8 => 'color: #800000;',
            +            ),
            +        'BRACKETS' => array(
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #800000;'
            +            ),
            +        'NUMBERS' => array(
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #800000; font-weight: bold;'
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => '',
            +        6 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'PARSER_CONTROL' => array(
            +        'ENABLE_FLAGS' => array(
            +            'BRACKETS' => GESHI_NEVER,
            +            'SYMBOLS' => GESHI_NEVER,
            +            'NUMBERS' => GESHI_NEVER
            +            )
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/rebol.php b/vendor/easybook/geshi/geshi/rebol.php
            new file mode 100644
            index 0000000000..12d4b9eae1
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/rebol.php
            @@ -0,0 +1,195 @@
            + 'REBOL',
            +    'COMMENT_SINGLE' => array(1 => ';'),
            +    'COMMENT_MULTI' => array('rebol [' => ']', 'comment [' => ']'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'binary!','block!','char!','date!','decimal!','email!','file!',
            +            'hash!','integer!','issue!','list!','logic!','money!','none!',
            +            'object!','paren!','pair!','path!','string!','tag!','time!',
            +            'tuple!','url!',
            +            ),
            +        2 => array(
            +            'all','any','attempt','break','catch','compose','disarm','dispatch',
            +            'do','do-events','does','either','else','exit','for','forall',
            +            'foreach','forever','forskip','func','function','halt','has','if',
            +            'launch','loop','next','quit','reduce','remove-each','repeat',
            +            'return','secure','switch','throw','try','until','wait','while',
            +            ),
            +        3 => array(
            +            'about','abs','absolute','add','alert','alias','alter','and',
            +            'any-block?','any-function?','any-string?','any-type?','any-word?',
            +            'append','arccosine','arcsine','arctangent','array','as-pair',
            +            'ask','at','back','binary?','bind','bitset?','block?','brightness?',
            +            'browse','build-tag','caret-to-offset','center-face','change',
            +            'change-dir','char?','charset','checksum','choose','clean-path',
            +            'clear','clear-fields','close','comment','complement','component?',
            +            'compress','confirm','connected?','construct','context','copy',
            +            'cosine','datatype?','date?','debase','decimal?','decode-cgi',
            +            'decompress','dehex','delete','detab','difference','dir?','dirize',
            +            'divide','dump-face','dump-obj','echo','email?','empty?','enbase',
            +            'entab','equal?','error?','even?','event?','exclude','exists?',
            +            'exp','extract','fifth','file?','find','first','flash','focus',
            +            'form','found?','fourth','free','function?','get','get-modes',
            +            'get-word?','greater-or-equal?','greater?','hash?','head','head?',
            +            'help','hide','hide-popup','image?','import-email','in',
            +            'in-window?','index?','info?','inform','input','input?','insert',
            +            'integer?','intersect','issue?','join','last','layout','length?',
            +            'lesser-or-equal?','lesser?','library?','license','link?',
            +            'list-dir','list?','lit-path?','lit-word?','load','load-image',
            +            'log-10','log-2','log-e','logic?','lowercase','make','make-dir',
            +            'make-face','max','maximum','maximum-of','min','minimum',
            +            'minimum-of','modified?','mold','money?','multiply','native?',
            +            'negate','negative?','none?','not','not-equal?','now','number?',
            +            'object?','odd?','offset-to-caret','offset?','op?','open','or',
            +            'pair?','paren?','parse','parse-xml','path?','pick','poke','port?',
            +            'positive?','power','prin','print','probe','protect',
            +            'protect-system','query','random','read','read-io','recycle',
            +            'refinement?','reform','rejoin','remainder','remold','remove',
            +            'rename',
            +            //'repeat',
            +            'repend','replace','request','request-color','request-date',
            +            'request-download','request-file','request-list','request-pass',
            +            'request-text','resend','reverse','routine?','same?','save',
            +            'script?','second','select','send','series?','set','set-modes',
            +            'set-net','set-path?','set-word?','show','show-popup','sign?',
            +            'sine','size-text','size?','skip','sort','source','span?',
            +            'split-path','square-root','strict-equal?','strict-not-equal?',
            +            'string?','struct?','stylize','subtract','suffix?','tag?','tail',
            +            'tail?','tangent','third','time?','to','to-binary','to-bitset',
            +            'to-block','to-char','to-date','to-decimal','to-email','to-file',
            +            'to-get-word','to-hash','to-hex','to-idate','to-image','to-integer',
            +            'to-issue','to-list','to-lit-path','to-lit-word','to-local-file',
            +            'to-logic','to-money','to-pair','to-paren','to-path',
            +            'to-rebol-file','to-refinement','to-set-path','to-set-word',
            +            'to-string','to-tag','to-time','to-tuple','to-url','to-word',
            +            'trace','trim','tuple?','type?','unfocus','union','unique',
            +            'unprotect','unset','unset?','unview','update','upgrade',
            +            'uppercase','url?','usage','use','value?','view','viewed?','what',
            +            'what-dir','within?','word?','write','write-io','xor','zero?',
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '[', ']', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;',
            +            2 => 'color: #000000; font-weight: bold;',
            +            3 => 'color: #000066;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;',
            +//            2 => 'color: #808080; font-style: italic;',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #006600;',
            +            2 => 'color: #006600;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #0000ff;'
            +            ),
            +        'SCRIPT' => array(
            +            0 => '',
            +            1 => '',
            +            2 => '',
            +            3 => ''
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => ''
            +//        2 => 'includes/dico_rebol.php?word={FNAME}',
            +//        3 => 'includes/dico_rebol.php?word={FNAME}'
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        0 => "[\\$]{1,2}[a-zA-Z_][a-zA-Z0-9_]*",
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/reg.php b/vendor/easybook/geshi/geshi/reg.php
            new file mode 100644
            index 0000000000..2034d5adbe
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/reg.php
            @@ -0,0 +1,231 @@
            + 'Microsoft Registry',
            +    'COMMENT_SINGLE' => array(1 =>';'),
            +    'COMMENT_MULTI' => array( ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array(),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +//        1 => array(),
            +//        2 => array(),
            +        /* Registry Key Constants Not Used */
            +        3 => array(
            +            'HKEY_LOCAL_MACHINE',
            +            'HKEY_CLASSES_ROOT',
            +            'HKEY_CURRENT_USER',
            +            'HKEY_USERS',
            +            'HKEY_CURRENT_CONFIG',
            +            'HKEY_DYN_DATA',
            +            'HKLM', 'HKCR', 'HKCU', 'HKU', 'HKCC', 'HKDD'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '='
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +//        1 => false,
            +//        2 => false,
            +        3 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +//            1 => 'color: #00CCFF;',
            +//            2 => 'color: #0000FF;',
            +            3 => 'color: #800000;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #009900;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'NUMBERS' => array(
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #00CCFF;',
            +            1 => 'color: #0000FF;',
            +            2 => '',
            +            3 => 'color: #0000FF;',
            +            4 => 'color: #0000FF;',
            +            5 => '',
            +            6 => '',
            +            7 => '',
            +            8 => 'color: #FF6600;',
            +            )
            +        ),
            +    'URLS' => array(
            +//        1 => '',
            +//        2 => '',
            +        3 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        // Highlight Key Delimiters
            +        0 => array(
            +            GESHI_SEARCH => '((^|\\n)\\s*)(\\\\\\[(.*)\\\\\\])(\\s*(\\n|$))',
            +            GESHI_REPLACE => '\\3',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => '\\5'
            +//            GESHI_CLASS => 'kw1'
            +            ),
            +        // Highlight File Format Header Version 5
            +        1 => array(
            +            GESHI_SEARCH => '(^\s*)(Windows Registry Editor Version \d+\.\d+)(\s*$)',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => 'm',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => '\\3',
            +            GESHI_CLASS => 'geshi_registry_header'
            +            ),
            +        // Highlight File Format Header Version 4
            +        2 => array(
            +            GESHI_SEARCH => '(^\\s*)(REGEDIT\s?\d+)(\s*$)',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => 'm',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => '\\3',
            +            GESHI_CLASS => 'geshi_registry_header'
            +            ),
            +        // Highlight dword: 32 bit integer values
            +        3 => array(
            +            GESHI_SEARCH => '(=\s*)(dword:[0-9a-fA-F]{8})(\s*$)',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => 'm',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => '\\3'
            +//            GESHI_CLASS => 'kw2'
            +            ),
            +        // Highlight variable names
            +        4 => array(
            +            GESHI_SEARCH => '(^\s*)(\".*?\")(\s*=)',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => 'm',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => '\\3',
            +            GESHI_CLASS => 'geshi_variable'
            +            ),
            +        // Highlight String Values
            +        5 => array(
            +            GESHI_SEARCH => '(=\s*)(\".*?\")(\s*$)',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => 'm',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => '\\3',
            +            GESHI_CLASS => 'st0'
            +            ),
            +        // Highlight Hexadecimal Values (Single-Line and Multi-Line)
            +        6 => array(
            +            GESHI_SEARCH => '(=\s*\n?\s*)(hex:[0-9a-fA-F]{2}(,(\\\s*\n\s*)?[0-9a-fA-F]{2})*)',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => 'm',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => '',
            +            GESHI_CLASS => 'kw2'
            +            ),
            +        // Highlight Default Variable
            +        7 => array(
            +            GESHI_SEARCH => '(^\s*)(@)(\s*=)',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => 'm',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => '\\3',
            +            GESHI_CLASS => 'geshi_variable'
            +            ),
            +        // Highlight GUID's found anywhere.
            +        8 => array(
            +            GESHI_SEARCH => '(\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\})',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => 'i',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => '',
            +            GESHI_CLASS => 'geshi_guid'
            +            )
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'PARSER_CONTROL' => array(
            +        'ENABLE_FLAGS' => array(
            +            'NUMBERS' => GESHI_NEVER,
            +        )
            +    )
            +);
            diff --git a/vendor/easybook/geshi/geshi/rexx.php b/vendor/easybook/geshi/geshi/rexx.php
            new file mode 100644
            index 0000000000..1189ac5be2
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/rexx.php
            @@ -0,0 +1,160 @@
            + 'rexx',
            +    'COMMENT_SINGLE' => array(1 => '--'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'address', 'arg', 'attribute', 'call', 'constant', 'do',
            +            'drop', 'exit', 'forward', 'if',
            +            'interpret', 'iterate', 'leave', 'loop', 'nop', 'numeric',
            +            'options', 'parse', 'procedure', 'pull', 'push', 'queue',
            +            'raise', 'return', 'say', 'select', 'signal', 'trace'
            +            ),
            +        2 => array(
            +            'by', 'digits', 'engineering', 'error', 'expose',
            +            'failure', 'for', 'forever', 'form', 'fuzz', 'halt',
            +            'name', 'novalue', 'off', 'on', 'over', 'scientific', 'source',
            +            'syntax', 'to', 'until', 'upper', 'version',
            +            'while', 'with'
            +            ),
            +        3 => array(
            +            'else', 'end', 'otherwise', 'then', 'when'
            +            ),
            +        4 => array(
            +            'rc', 'result', 'sigl'
            +            ),
            +        5 => array(
            +            'placeholderforoorexxdirectives'
            +            ),
            +        6 => array(
            +            'abbrev', 'abs', 'beep', 'bitand', 'bitor',
            +            'bitxor', 'b2x', 'center', 'centre', 'changestr', 'charin',
            +            'charout', 'chars', 'compare', 'condition', 'copies',
            +            'countstr', 'c2d', 'c2x', 'datatype', 'date', 'delstr',
            +            'delword', 'directory', 'd2c', 'd2x', 'endlocal',
            +            'errortext', 'filespec', 'format', 'insert',
            +            'lastpos', 'left', 'length', 'linein', 'lineout', 'lines',
            +            'lower', 'max', 'min', 'overlay', 'pos', 'queued', 'random',
            +            'reverse', 'right', 'rxfuncadd', 'rxfuncdrop', 'rxfuncquery',
            +            'rxqueue', 'setlocal', 'sign', 'sourceline', 'space',
            +            'stream', 'strip', 'substr', 'subword', 'symbol', 'time',
            +            'translate', 'trunc', 'userid', 'value',
            +            'var', 'verify', 'word', 'wordindex', 'wordlength', 'wordpos',
            +            'words', 'xrange', 'x2b', 'x2c', 'x2d'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '<', '>', '=', '+', '-', '*', '**', '/', '|', '%', '^', '&', ':'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => true,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        5 => false,
            +        6 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;',
            +            2 => 'color: #ff0000; font-weight: bold;',
            +            3 => 'color: #00ff00; font-weight: bold;',
            +            4 => 'color: #0000ff; font-weight: bold;',
            +            5 => 'color: #880088; font-weight: bold;',
            +            6 => 'color: #888800; font-weight: bold;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666;',
            +            'MULTI' => 'color: #808080;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #202020;',
            +            2 => 'color: #202020;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => '',
            +        6 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4
            +);
            diff --git a/vendor/easybook/geshi/geshi/robots.php b/vendor/easybook/geshi/geshi/robots.php
            new file mode 100644
            index 0000000000..ff05c091e5
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/robots.php
            @@ -0,0 +1,99 @@
            + 'robots.txt',
            +    'COMMENT_SINGLE' => array(1 => '#'),
            +    'COMMENT_MULTI' => array(),
            +    'COMMENT_REGEXP' => array(1 => "/^Comment:.*?/m"),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array(),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'Allow', 'Crawl-delay', 'Disallow', 'Request-rate', 'Robot-version',
            +            'Sitemap', 'User-agent', 'Visit-time'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        ':'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;',
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => 'http://www.robotstxt.org/wc/norobots.html'
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/rpmspec.php b/vendor/easybook/geshi/geshi/rpmspec.php
            new file mode 100644
            index 0000000000..43c8a929d5
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/rpmspec.php
            @@ -0,0 +1,132 @@
            + 'RPM Specification File',
            +    'COMMENT_SINGLE' => array(1 => '#'),
            +    'COMMENT_MULTI' => array(),
            +    'QUOTEMARKS' => array('"','`'),
            +    'ESCAPE_CHAR' => '\\',
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        ),
            +    'KEYWORDS' => array(
            +        ),
            +    'SYMBOLS' => array(
            +        '<', '>', '=',
            +        '!', '@', '~', '&', '|', '^',
            +        '+','-', '*', '/', '%',
            +        ',', ';', '?', '.', ':'
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; font-style: italic;',
            +            'MULTI' => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;',
            +            'HARD' => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;',
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #006600;',
            +            2 => 'color: #006600;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #339933;'
            +            ),
            +        'REGEXPS' => array(
            +            1 => 'color: #0000ff;',
            +            2 => 'color: #009999;',
            +            3 => 'color: #000000; font-weight: bold;',
            +            4 => 'color: #ff6600; font-style: italic;',
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'REGEXPS' => array(
            +        1 => array(
            +            // search for generic macros
            +            GESHI_SEARCH => '(%{?[a-zA-Z0-9_]+}?)',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => '',
            +            ),
            +        2 => array(
            +            // search for special macros
            +            GESHI_SEARCH => '(%(?:define|patch\d*|mklibname|mkrel|configure\S+|makeinstall\S+|make_session|make|defattr|config|doc|setup))',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => 'i',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => '',
            +            ),
            +        3 => array (
            +            // special definitions
            +            GESHI_SEARCH => '((?:summary|license|buildroot|buildrequires|provides|version|release|source\d*|group|buildarch|autoreqprov|provides|obsoletes|vendor|distribution|suggests|autoreq|autoprov|conflicts|name|url|requires|patch\d*):)',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => 'i',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => '',
            +            ),
            +        4 => array (
            +            // section delimiting words
            +            GESHI_SEARCH => '(%(?:description|package|prep|build|install|clean|postun|preun|post|pre|files|changelog))',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => 'i',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => '',
            +            ),
            +        ),
            +    'URLS' => array(),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(),
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/rsplus.php b/vendor/easybook/geshi/geshi/rsplus.php
            new file mode 100644
            index 0000000000..944a567e10
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/rsplus.php
            @@ -0,0 +1,482 @@
            + 'R / S+',
            +    'COMMENT_SINGLE' => array(1 => '#'),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"', "'"),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'else','global','in', 'otherwise','persistent',
            +            ),
            +        2 => array( // base package
            +            '$.package_version', '$<-', '$<-.data.frame', 'abbreviate', 'abs', 'acos', 'acosh', 'addNA', 'addTaskCallback',
            +            'agrep', 'alist', 'all', 'all.equal', 'all.equal.character', 'all.equal.default', 'all.equal.factor',
            +            'all.equal.formula', 'all.equal.language', 'all.equal.list', 'all.equal.numeric', 'all.equal.POSIXct',
            +            'all.equal.raw', 'all.names', 'all.vars', 'any', 'aperm', 'append', 'apply', 'Arg', 'args', 'array', 'as.array',
            +            'as.array.default', 'as.call', 'as.character', 'as.character.condition', 'as.character.Date', 'as.character.default',
            +            'as.character.error', 'as.character.factor', 'as.character.hexmode', 'as.character.numeric_version', 'as.character.octmode',
            +            'as.character.POSIXt', 'as.character.srcref', 'as.complex', 'as.data.frame', 'as.data.frame.array', 'as.data.frame.AsIs',
            +            'as.data.frame.character', 'as.data.frame.complex', 'as.data.frame.data.frame', 'as.data.frame.Date', 'as.data.frame.default',
            +            'as.data.frame.difftime', 'as.data.frame.factor', 'as.data.frame.integer', 'as.data.frame.list', 'as.data.frame.logical',
            +            'as.data.frame.matrix', 'as.data.frame.model.matrix', 'as.data.frame.numeric', 'as.data.frame.numeric_version',
            +            'as.data.frame.ordered', 'as.data.frame.POSIXct', 'as.data.frame.POSIXlt', 'as.data.frame.raw', 'as.data.frame.table',
            +            'as.data.frame.ts', 'as.data.frame.vector', 'as.Date', 'as.Date.character', 'as.Date.date', 'as.Date.dates',
            +            'as.Date.default', 'as.Date.factor', 'as.Date.numeric', 'as.Date.POSIXct', 'as.Date.POSIXlt', 'as.difftime', 'as.double',
            +            'as.double.difftime', 'as.double.POSIXlt', 'as.environment', 'as.expression', 'as.expression.default', 'as.factor',
            +            'as.function', 'as.function.default', 'as.hexmode', 'as.integer', 'as.list', 'as.list.data.frame', 'as.list.default',
            +            'as.list.environment', 'as.list.factor', 'as.list.function', 'as.list.numeric_version', 'as.logical', 'as.matrix',
            +            'as.matrix.data.frame', 'as.matrix.default', 'as.matrix.noquote', 'as.matrix.POSIXlt', 'as.name', 'as.null', 'as.null.default',
            +            'as.numeric', 'as.numeric_version', 'as.octmode', 'as.ordered', 'as.package_version', 'as.pairlist', 'as.POSIXct',
            +            'as.POSIXct.date', 'as.POSIXct.Date', 'as.POSIXct.dates', 'as.POSIXct.default', 'as.POSIXct.numeric', 'as.POSIXct.POSIXlt',
            +            'as.POSIXlt', 'as.POSIXlt.character', 'as.POSIXlt.date', 'as.POSIXlt.Date', 'as.POSIXlt.dates', 'as.POSIXlt.default',
            +            'as.POSIXlt.factor', 'as.POSIXlt.numeric', 'as.POSIXlt.POSIXct', 'as.qr', 'as.raw', 'as.real', 'as.single',
            +            'as.single.default', 'as.symbol', 'as.table', 'as.table.default', 'as.vector', 'as.vector.factor', 'asin', 'asinh',
            +            'asNamespace', 'asS4', 'assign', 'atan', 'atan2', 'atanh', 'attach', 'attachNamespace', 'attr', 'attr.all.equal',
            +            'attr<-', 'attributes', 'attributes<-', 'autoload', 'autoloader', 'backsolve', 'baseenv', 'basename', 'besselI',
            +            'besselJ', 'besselK', 'besselY', 'beta', 'bindingIsActive', 'bindingIsLocked', 'bindtextdomain', 'body', 'body<-',
            +            'bquote', 'break', 'browser', 'builtins', 'by', 'by.data.frame', 'by.default', 'bzfile', 'c', 'c.Date', 'c.noquote',
            +            'c.numeric_version', 'c.POSIXct', 'c.POSIXlt', 'call', 'callCC', 'capabilities', 'casefold', 'cat', 'category',
            +            'cbind', 'cbind.data.frame', 'ceiling', 'char.expand', 'character', 'charmatch', 'charToRaw', 'chartr', 'check_tzones',
            +            'chol', 'chol.default', 'chol2inv', 'choose', 'class', 'class<-', 'close', 'close.connection', 'close.srcfile',
            +            'closeAllConnections', 'codes', 'codes.factor', 'codes.ordered', 'codes<-', 'col', 'colMeans', 'colnames',
            +            'colnames<-', 'colSums', 'commandArgs', 'comment', 'comment<-', 'complex', 'computeRestarts', 'conditionCall',
            +            'conditionCall.condition', 'conditionMessage', 'conditionMessage.condition', 'conflicts', 'Conj', 'contributors',
            +            'cos', 'cosh', 'crossprod', 'Cstack_info', 'cummax', 'cummin', 'cumprod', 'cumsum', 'cut', 'cut.Date', 'cut.default',
            +            'cut.POSIXt', 'data.class', 'data.frame', 'data.matrix', 'date', 'debug', 'default.stringsAsFactors', 'delay',
            +            'delayedAssign', 'deparse', 'det', 'detach', 'determinant', 'determinant.matrix', 'dget', 'diag', 'diag<-', 'diff',
            +            'diff.Date', 'diff.default', 'diff.POSIXt', 'difftime', 'digamma', 'dim', 'dim.data.frame', 'dim<-', 'dimnames',
            +            'dimnames.data.frame', 'dimnames<-', 'dimnames<-.data.frame', 'dir', 'dir.create', 'dirname', 'do.call', 'double',
            +            'dput', 'dQuote', 'drop', 'dump', 'duplicated', 'duplicated.array', 'duplicated.data.frame', 'duplicated.default',
            +            'duplicated.matrix', 'duplicated.numeric_version', 'duplicated.POSIXlt', 'dyn.load', 'dyn.unload', 'eapply', 'eigen',
            +            'emptyenv', 'encodeString', 'Encoding', 'Encoding<-', 'env.profile', 'environment', 'environment<-', 'environmentIsLocked',
            +            'environmentName', 'eval', 'eval.parent', 'evalq', 'exists', 'exp', 'expand.grid', 'expm1', 'expression', 'F', 'factor',
            +            'factorial', 'fifo', 'file', 'file.access', 'file.append', 'file.choose', 'file.copy', 'file.create', 'file.exists',
            +            'file.info', 'file.path', 'file.remove', 'file.rename', 'file.show', 'file.symlink', 'Filter', 'Find', 'findInterval',
            +            'findPackageEnv', 'findRestart', 'floor', 'flush', 'flush.connection', 'for', 'force', 'formals', 'formals<-',
            +            'format', 'format.AsIs', 'format.char', 'format.data.frame', 'format.Date', 'format.default', 'format.difftime',
            +            'format.factor', 'format.hexmode', 'format.info', 'format.octmode', 'format.POSIXct', 'format.POSIXlt',
            +            'format.pval', 'formatC', 'formatDL', 'forwardsolve', 'function', 'gamma', 'gammaCody', 'gc', 'gc.time',
            +            'gcinfo', 'gctorture', 'get', 'getAllConnections', 'getCallingDLL', 'getCallingDLLe', 'getCConverterDescriptions',
            +            'getCConverterStatus', 'getConnection', 'getDLLRegisteredRoutines', 'getDLLRegisteredRoutines.character',
            +            'getDLLRegisteredRoutines.DLLInfo', 'getenv', 'geterrmessage', 'getExportedValue', 'getHook', 'getLoadedDLLs',
            +            'getNamespace', 'getNamespaceExports', 'getNamespaceImports', 'getNamespaceInfo', 'getNamespaceName',
            +            'getNamespaceUsers', 'getNamespaceVersion', 'getNativeSymbolInfo', 'getNumCConverters', 'getOption', 'getRversion',
            +            'getSrcLines', 'getTaskCallbackNames', 'gettext', 'gettextf', 'getwd', 'gl', 'globalenv', 'gregexpr', 'grep',
            +            'grepl', 'gsub', 'gzcon', 'gzfile', 'httpclient', 'I', 'iconv', 'iconvlist', 'icuSetCollate', 'identical', 'identity',
            +            'if', 'ifelse', 'Im', 'importIntoEnv', 'inherits', 'integer', 'interaction', 'interactive', 'intersect', 'intToBits',
            +            'intToUtf8', 'inverse.rle', 'invisible', 'invokeRestart', 'invokeRestartInteractively', 'is.array', 'is.atomic',
            +            'is.call', 'is.character', 'is.complex', 'is.data.frame', 'is.double', 'is.element', 'is.environment',
            +            'is.expression', 'is.factor', 'is.finite', 'is.function', 'is.infinite', 'is.integer', 'is.language',
            +            'is.list', 'is.loaded', 'is.logical', 'is.matrix', 'is.na', 'is.na.data.frame', 'is.na.POSIXlt', 'is.na<-',
            +            'is.na<-.default', 'is.na<-.factor', 'is.name', 'is.nan', 'is.null', 'is.numeric', 'is.numeric_version',
            +            'is.numeric.Date', 'is.numeric.POSIXt', 'is.object', 'is.ordered', 'is.package_version', 'is.pairlist', 'is.primitive',
            +            'is.qr', 'is.R', 'is.raw', 'is.real', 'is.recursive', 'is.single', 'is.symbol', 'is.table', 'is.unsorted', 'is.vector',
            +            'isBaseNamespace', 'isdebugged', 'isIncomplete', 'isNamespace', 'ISOdate', 'ISOdatetime', 'isOpen', 'isRestart', 'isS4',
            +            'isSeekable', 'isSymmetric', 'isSymmetric.matrix', 'isTRUE', 'jitter', 'julian', 'julian.Date', 'julian.POSIXt', 'kappa',
            +            'kappa.default', 'kappa.lm', 'kappa.qr', 'kappa.tri', 'kronecker', 'l10n_info', 'La.chol', 'La.chol2inv', 'La.eigen',
            +            'La.svd', 'labels', 'labels.default', 'lapply', 'lazyLoad', 'lazyLoadDBfetch', 'lbeta', 'lchoose', 'length', 'length<-',
            +            'length<-.factor', 'letters', 'LETTERS', 'levels', 'levels.default', 'levels<-', 'levels<-.factor', 'lfactorial', 'lgamma',
            +            'library', 'library.dynam', 'library.dynam.unload', 'licence', 'license', 'list', 'list.files', 'load', 'loadedNamespaces',
            +            'loadingNamespaceInfo', 'loadNamespace', 'loadURL', 'local', 'lockBinding', 'lockEnvironment', 'log', 'log10', 'log1p', 'log2',
            +            'logb', 'logical', 'lower.tri', 'ls', 'machine', 'Machine', 'make.names', 'make.unique', 'makeActiveBinding', 'manglePackageName',
            +            'Map', 'mapply', 'margin.table', 'mat.or.vec', 'match', 'match.arg', 'match.call', 'match.fun', 'Math.data.frame', 'Math.Date',
            +            'Math.difftime', 'Math.factor', 'Math.POSIXt', 'matrix', 'max', 'max.col', 'mean', 'mean.data.frame', 'mean.Date', 'mean.default',
            +            'mean.difftime', 'mean.POSIXct', 'mean.POSIXlt', 'mem.limits', 'memory.profile', 'merge', 'merge.data.frame', 'merge.default',
            +            'message', 'mget', 'min', 'missing', 'Mod', 'mode', 'mode<-', 'month.abb', 'month.name', 'months', 'months.Date',
            +            'months.POSIXt', 'mostattributes<-', 'names', 'names<-', 'namespaceExport', 'namespaceImport', 'namespaceImportClasses',
            +            'namespaceImportFrom', 'namespaceImportMethods', 'nargs', 'nchar', 'ncol', 'NCOL', 'Negate', 'new.env', 'next', 'NextMethod',
            +            'ngettext', 'nlevels', 'noquote', 'nrow', 'NROW', 'numeric', 'numeric_version', 'nzchar', 'objects', 'oldClass',
            +            'oldClass<-', 'on.exit', 'open', 'open.connection', 'open.srcfile', 'open.srcfilecopy', 'Ops.data.frame', 'Ops.Date',
            +            'Ops.difftime', 'Ops.factor', 'Ops.numeric_version', 'Ops.ordered', 'Ops.POSIXt', 'options', 'order', 'ordered',
            +            'outer', 'package_version', 'package.description', 'packageEvent', 'packageHasNamespace', 'packageStartupMessage',
            +            'packBits', 'pairlist', 'parent.env', 'parent.env<-', 'parent.frame', 'parse', 'parse.dcf', 'parseNamespaceFile',
            +            'paste', 'path.expand', 'pentagamma', 'pi', 'pipe', 'Platform', 'pmatch', 'pmax', 'pmax.int', 'pmin', 'pmin.int',
            +            'polyroot', 'pos.to.env', 'Position', 'pretty', 'prettyNum', 'print', 'print.AsIs', 'print.atomic', 'print.by',
            +            'print.condition', 'print.connection', 'print.data.frame', 'print.Date', 'print.default', 'print.difftime',
            +            'print.DLLInfo', 'print.DLLInfoList', 'print.DLLRegisteredRoutines', 'print.factor', 'print.hexmode', 'print.libraryIQR',
            +            'print.listof', 'print.NativeRoutineList', 'print.noquote', 'print.numeric_version', 'print.octmode', 'print.packageInfo',
            +            'print.POSIXct', 'print.POSIXlt', 'print.proc_time', 'print.restart', 'print.rle', 'print.simple.list',
            +            'print.srcfile', 'print.srcref', 'print.summary.table', 'print.table', 'print.warnings', 'printNoClass',
            +            'prmatrix', 'proc.time', 'prod', 'prop.table', 'provide', 'psigamma', 'pushBack', 'pushBackLength', 'q', 'qr',
            +            'qr.coef', 'qr.default', 'qr.fitted', 'qr.Q', 'qr.qty', 'qr.qy', 'qr.R', 'qr.resid', 'qr.solve', 'qr.X', 'quarters',
            +            'quarters.Date', 'quarters.POSIXt', 'quit', 'quote', 'R_system_version', 'R.home', 'R.version', 'R.Version',
            +            'R.version.string', 'range', 'range.default', 'rank', 'rapply', 'raw', 'rawConnection', 'rawConnectionValue',
            +            'rawShift', 'rawToBits', 'rawToChar', 'rbind', 'rbind.data.frame', 'rcond', 'Re', 'read.dcf', 'read.table.url',
            +            'readBin', 'readChar', 'readline', 'readLines', 'real', 'Recall', 'Reduce', 'reg.finalizer', 'regexpr',
            +            'registerS3method', 'registerS3methods', 'remove', 'removeCConverter', 'removeTaskCallback', 'rep', 'rep.Date',
            +            'rep.factor', 'rep.int', 'rep.numeric_version', 'rep.POSIXct', 'rep.POSIXlt', 'repeat', 'replace', 'replicate',
            +            'require', 'restart', 'restartDescription', 'restartFormals', 'retracemem', 'return', 'rev', 'rev.default', 'rle',
            +            'rm', 'RNGkind', 'RNGversion', 'round', 'round.Date', 'round.difftime', 'round.POSIXt', 'row', 'row.names',
            +            'row.names.data.frame', 'row.names.default', 'row.names<-', 'row.names<-.data.frame', 'row.names<-.default',
            +            'rowMeans', 'rownames', 'rownames<-', 'rowsum', 'rowsum.data.frame', 'rowsum.default', 'rowSums', 'sample',
            +            'sample.int', 'sapply', 'save', 'save.image', 'saveNamespaceImage', 'scale', 'scale.default', 'scan', 'scan.url',
            +            'search', 'searchpaths', 'seek', 'seek.connection', 'seq', 'seq_along', 'seq_len', 'seq.Date', 'seq.default',
            +            'seq.int', 'seq.POSIXt', 'sequence', 'serialize', 'set.seed', 'setCConverterStatus', 'setdiff', 'setequal',
            +            'setHook', 'setNamespaceInfo', 'setSessionTimeLimit', 'setTimeLimit', 'setwd', 'showConnections', 'shQuote',
            +            'sign', 'signalCondition', 'signif', 'simpleCondition', 'simpleError', 'simpleMessage', 'simpleWarning', 'sin',
            +            'single', 'sinh', 'sink', 'sink.number', 'slice.index', 'socketConnection', 'socketSelect', 'solve', 'solve.default',
            +            'solve.qr', 'sort', 'sort.default', 'sort.int', 'sort.list', 'sort.POSIXlt', 'source', 'source.url', 'split',
            +            'split.data.frame', 'split.Date', 'split.default', 'split.POSIXct', 'split<-', 'split<-.data.frame', 'split<-.default',
            +            'sprintf', 'sqrt', 'sQuote', 'srcfile', 'srcfilecopy', 'srcref', 'standardGeneric', 'stderr', 'stdin', 'stdout',
            +            'stop', 'stopifnot', 'storage.mode', 'storage.mode<-', 'strftime', 'strptime', 'strsplit', 'strtrim', 'structure',
            +            'strwrap', 'sub', 'subset', 'subset.data.frame', 'subset.default', 'subset.matrix', 'substitute', 'substr',
            +            'substr<-', 'substring', 'substring<-', 'sum', 'summary', 'summary.connection', 'summary.data.frame',
            +            'Summary.data.frame', 'summary.Date', 'Summary.Date', 'summary.default', 'Summary.difftime',
            +            'summary.factor', 'Summary.factor', 'summary.matrix', 'Summary.numeric_version', 'summary.POSIXct',
            +            'Summary.POSIXct', 'summary.POSIXlt', 'Summary.POSIXlt', 'summary.table', 'suppressMessages',
            +            'suppressPackageStartupMessages', 'suppressWarnings', 'svd', 'sweep', 'switch', 'symbol.C',
            +            'symbol.For', 'sys.call', 'sys.calls', 'Sys.chmod', 'Sys.Date', 'sys.frame', 'sys.frames',
            +            'sys.function', 'Sys.getenv', 'Sys.getlocale', 'Sys.getpid', 'Sys.glob', 'Sys.info', 'sys.load.image',
            +            'Sys.localeconv', 'sys.nframe', 'sys.on.exit', 'sys.parent', 'sys.parents', 'Sys.putenv',
            +            'sys.save.image', 'Sys.setenv', 'Sys.setlocale', 'Sys.sleep', 'sys.source', 'sys.status',
            +            'Sys.time', 'Sys.timezone', 'Sys.umask', 'Sys.unsetenv', 'Sys.which', 'system', 'system.file',
            +            'system.time', 't', 'T', 't.data.frame', 't.default', 'table', 'tabulate', 'tan', 'tanh', 'tapply',
            +            'taskCallbackManager', 'tcrossprod', 'tempdir', 'tempfile', 'testPlatformEquivalence', 'tetragamma',
            +            'textConnection', 'textConnectionValue', 'tolower', 'topenv', 'toString', 'toString.default', 'toupper',
            +            'trace', 'traceback', 'tracemem', 'tracingState', 'transform', 'transform.data.frame', 'transform.default',
            +            'trigamma', 'trunc', 'trunc.Date', 'trunc.POSIXt', 'truncate', 'truncate.connection', 'try', 'tryCatch',
            +            'typeof', 'unclass', 'undebug', 'union', 'unique', 'unique.array', 'unique.data.frame', 'unique.default',
            +            'unique.matrix', 'unique.numeric_version', 'unique.POSIXlt', 'units', 'units.difftime', 'units<-',
            +            'units<-.difftime', 'unix', 'unix.time', 'unlink', 'unlist', 'unloadNamespace', 'unlockBinding',
            +            'unname', 'unserialize', 'unsplit', 'untrace', 'untracemem', 'unz', 'upper.tri', 'url', 'UseMethod',
            +            'utf8ToInt', 'vector', 'Vectorize', 'version', 'Version', 'warning', 'warnings', 'weekdays',
            +            'weekdays.Date', 'weekdays.POSIXt', 'which', 'which.max', 'which.min', 'while', 'with',
            +            'with.default', 'withCallingHandlers', 'within', 'within.data.frame', 'within.list', 'withRestarts',
            +            'withVisible', 'write', 'write.dcf', 'write.table0', 'writeBin', 'writeChar', 'writeLines', 'xor',
            +            'xpdrows.data.frame', 'xtfrm', 'xtfrm.Date', 'xtfrm.default', 'xtfrm.factor', 'xtfrm.numeric_version',
            +            'xtfrm.POSIXct', 'xtfrm.POSIXlt', 'xtfrm.Surv', 'zapsmall',
            +            ),
            +        3 => array( // Datasets
            +            'ability.cov', 'airmiles', 'AirPassengers', 'airquality',
            +            'anscombe', 'attenu', 'attitude', 'austres', 'beaver1',
            +            'beaver2', 'BJsales', 'BJsales.lead', 'BOD', 'cars',
            +            'ChickWeight', 'chickwts', 'co2', 'crimtab',
            +            'discoveries', 'DNase', 'esoph', 'euro', 'euro.cross',
            +            'eurodist', 'EuStockMarkets', 'faithful', 'fdeaths',
            +            'Formaldehyde', 'freeny', 'freeny.x', 'freeny.y',
            +            'HairEyeColor', 'Harman23.cor', 'Harman74.cor', 'Indometh',
            +            'infert', 'InsectSprays', 'iris', 'iris3', 'islands',
            +            'JohnsonJohnson', 'LakeHuron', 'ldeaths', 'lh', 'LifeCycleSavings',
            +            'Loblolly', 'longley', 'lynx', 'mdeaths', 'morley', 'mtcars',
            +            'nhtemp', 'Nile', 'nottem', 'occupationalStatus', 'Orange',
            +            'OrchardSprays', 'PlantGrowth', 'precip', 'presidents',
            +            'pressure', 'Puromycin', 'quakes', 'randu', 'rivers', 'rock',
            +            'Seatbelts', 'sleep', 'stack.loss', 'stack.x', 'stackloss',
            +            'state.abb', 'state.area', 'state.center', 'state.division',
            +            'state.name', 'state.region', 'state.x77', 'sunspot.month',
            +            'sunspot.year', 'sunspots', 'swiss', 'Theoph', 'Titanic', 'ToothGrowth',
            +            'treering', 'trees', 'UCBAdmissions', 'UKDriverDeaths', 'UKgas',
            +            'USAccDeaths', 'USArrests', 'USJudgeRatings', 'USPersonalExpenditure',
            +            'uspop', 'VADeaths', 'volcano', 'warpbreaks', 'women', 'WorldPhones',
            +            'WWWusage',
            +            ),
            +        4 => array( // graphics package
            +            'abline', 'arrows', 'assocplot', 'axis', 'Axis', 'axis.Date', 'axis.POSIXct',
            +            'axTicks', 'barplot', 'barplot.default', 'box', 'boxplot', 'boxplot.default',
            +            'boxplot.matrix', 'bxp', 'cdplot', 'clip', 'close.screen', 'co.intervals',
            +            'contour', 'contour.default', 'coplot', 'curve', 'dotchart', 'erase.screen',
            +            'filled.contour', 'fourfoldplot', 'frame', 'grconvertX', 'grconvertY', 'grid',
            +            'hist', 'hist.default', 'identify', 'image', 'image.default', 'layout',
            +            'layout.show', 'lcm', 'legend', 'lines', 'lines.default', 'locator', 'matlines',
            +            'matplot', 'matpoints', 'mosaicplot', 'mtext', 'pairs', 'pairs.default',
            +            'panel.smooth', 'par', 'persp', 'pie', 'piechart', 'plot', 'plot.default',
            +            'plot.design', 'plot.new', 'plot.window', 'plot.xy', 'points', 'points.default',
            +            'polygon', 'rect', 'rug', 'screen', 'segments', 'smoothScatter', 'spineplot',
            +            'split.screen', 'stars', 'stem', 'strheight', 'stripchart', 'strwidth', 'sunflowerplot',
            +            'symbols', 'text', 'text.default', 'title', 'xinch', 'xspline', 'xyinch', 'yinch',
            +            ),
            +        5 => array( // grDevices pkg
            +            'as.graphicsAnnot', 'bitmap', 'blues9', 'bmp', 'boxplot.stats', 'cairo_pdf', 'cairo_ps', 'check.options',
            +            'chull', 'CIDFont', 'cm', 'cm.colors', 'col2rgb', 'colorConverter', 'colorRamp', 'colorRampPalette',
            +            'colors', 'colorspaces', 'colours', 'contourLines', 'convertColor', 'densCols', 'dev.control', 'dev.copy',
            +            'dev.copy2eps', 'dev.copy2pdf', 'dev.cur', 'dev.interactive', 'dev.list', 'dev.new', 'dev.next', 'dev.off',
            +            'dev.prev', 'dev.print', 'dev.set', 'dev.size', 'dev2bitmap', 'devAskNewPage', 'deviceIsInteractive',
            +            'embedFonts', 'extendrange', 'getGraphicsEvent', 'graphics.off', 'gray', 'gray.colors', 'grey', 'grey.colors',
            +            'hcl', 'heat.colors', 'Hershey', 'hsv', 'jpeg', 'make.rgb', 'n2mfrow', 'nclass.FD', 'nclass.scott',
            +            'nclass.Sturges', 'palette', 'pdf', 'pdf.options', 'pdfFonts', 'pictex', 'png', 'postscript', 'postscriptFont',
            +            'postscriptFonts', 'ps.options', 'quartz', 'quartz.options', 'quartzFont', 'quartzFonts', 'rainbow',
            +            'recordGraphics', 'recordPlot', 'replayPlot', 'rgb', 'rgb2hsv', 'savePlot', 'setEPS', 'setPS', 'svg',
            +            'terrain.colors', 'tiff', 'topo.colors', 'trans3d', 'Type1Font', 'x11', 'X11', 'X11.options', 'X11Font',
            +            'X11Fonts', 'xfig', 'xy.coords', 'xyTable', 'xyz.coords',
            +            ),
            +        6 => array( // methods package
            +            'addNextMethod', 'allGenerics', 'allNames', 'Arith', 'as', 'as<-',
            +            'asMethodDefinition', 'assignClassDef', 'assignMethodsMetaData', 'balanceMethodsList',
            +            'cacheGenericsMetaData', 'cacheMetaData', 'cacheMethod', 'callGeneric',
            +            'callNextMethod', 'canCoerce', 'cbind2', 'checkSlotAssignment', 'classesToAM',
            +            'classMetaName', 'coerce', 'coerce<-', 'Compare', 'completeClassDefinition',
            +            'completeExtends', 'completeSubclasses', 'Complex', 'conformMethod', 'defaultDumpName',
            +            'defaultPrototype', 'doPrimitiveMethod', 'dumpMethod', 'dumpMethods', 'el', 'el<-',
            +            'elNamed', 'elNamed<-', 'empty.dump', 'emptyMethodsList', 'existsFunction', 'existsMethod',
            +            'extends', 'finalDefaultMethod', 'findClass', 'findFunction', 'findMethod', 'findMethods',
            +            'findMethodSignatures', 'findUnique', 'fixPre1.8', 'formalArgs', 'functionBody',
            +            'functionBody<-', 'generic.skeleton', 'getAccess', 'getAllMethods', 'getAllSuperClasses',
            +            'getClass', 'getClassDef', 'getClasses', 'getClassName', 'getClassPackage', 'getDataPart',
            +            'getExtends', 'getFunction', 'getGeneric', 'getGenerics', 'getGroup', 'getGroupMembers',
            +            'getMethod', 'getMethods', 'getMethodsForDispatch', 'getMethodsMetaData', 'getPackageName',
            +            'getProperties', 'getPrototype', 'getSlots', 'getSubclasses', 'getValidity', 'getVirtual',
            +            'hasArg', 'hasMethod', 'hasMethods', 'implicitGeneric', 'initialize', 'insertMethod', 'is',
            +            'isClass', 'isClassDef', 'isClassUnion', 'isGeneric', 'isGrammarSymbol', 'isGroup',
            +            'isSealedClass', 'isSealedMethod', 'isVirtualClass', 'isXS3Class', 'languageEl', 'languageEl<-',
            +            'linearizeMlist', 'listFromMethods', 'listFromMlist', 'loadMethod', 'Logic',
            +            'makeClassRepresentation', 'makeExtends', 'makeGeneric', 'makeMethodsList',
            +            'makePrototypeFromClassDef', 'makeStandardGeneric', 'matchSignature', 'Math', 'Math2', 'mergeMethods',
            +            'metaNameUndo', 'method.skeleton', 'MethodAddCoerce', 'methodSignatureMatrix', 'MethodsList',
            +            'MethodsListSelect', 'methodsPackageMetaName', 'missingArg', 'mlistMetaName', 'new', 'newBasic',
            +            'newClassRepresentation', 'newEmptyObject', 'Ops', 'packageSlot', 'packageSlot<-', 'possibleExtends',
            +            'prohibitGeneric', 'promptClass', 'promptMethods', 'prototype', 'Quote', 'rbind2',
            +            'reconcilePropertiesAndPrototype', 'registerImplicitGenerics', 'rematchDefinition',
            +            'removeClass', 'removeGeneric', 'removeMethod', 'removeMethods', 'removeMethodsObject', 'representation',
            +            'requireMethods', 'resetClass', 'resetGeneric', 'S3Class', 'S3Class<-', 'S3Part', 'S3Part<-', 'sealClass',
            +            'seemsS4Object', 'selectMethod', 'selectSuperClasses', 'sessionData', 'setAs', 'setClass', 'setClassUnion',
            +            'setDataPart', 'setGeneric', 'setGenericImplicit', 'setGroupGeneric', 'setIs', 'setMethod', 'setOldClass',
            +            'setPackageName', 'setPrimitiveMethods', 'setReplaceMethod', 'setValidity', 'show', 'showClass', 'showDefault',
            +            'showExtends', 'showMethods', 'showMlist', 'signature', 'SignatureMethod', 'sigToEnv', 'slot', 'slot<-',
            +            'slotNames', 'slotsFromS3', 'substituteDirect', 'substituteFunctionArgs', 'Summary', 'superClassDepth',
            +            'testInheritedMethods', 'testVirtual', 'traceOff', 'traceOn', 'tryNew', 'trySilent', 'unRematchDefinition',
            +            'validObject', 'validSlotNames',
            +            ),
            +        7 => array( // stats pkg
            +            'acf', 'acf2AR', 'add.scope', 'add1', 'addmargins', 'aggregate',
            +            'aggregate.data.frame', 'aggregate.default', 'aggregate.ts', 'AIC',
            +            'alias', 'anova', 'anova.glm', 'anova.glmlist', 'anova.lm', 'anova.lmlist',
            +            'anova.mlm', 'anovalist.lm', 'ansari.test', 'aov', 'approx', 'approxfun',
            +            'ar', 'ar.burg', 'ar.mle', 'ar.ols', 'ar.yw', 'arima', 'arima.sim',
            +            'arima0', 'arima0.diag', 'ARMAacf', 'ARMAtoMA', 'as.dendrogram', 'as.dist',
            +            'as.formula', 'as.hclust', 'as.stepfun', 'as.ts', 'asOneSidedFormula', 'ave',
            +            'bandwidth.kernel', 'bartlett.test', 'binom.test', 'binomial', 'biplot',
            +            'Box.test', 'bw.bcv', 'bw.nrd', 'bw.nrd0', 'bw.SJ', 'bw.ucv', 'C', 'cancor',
            +            'case.names', 'ccf', 'chisq.test', 'clearNames', 'cmdscale', 'coef', 'coefficients',
            +            'complete.cases', 'confint', 'confint.default', 'constrOptim', 'contr.helmert',
            +            'contr.poly', 'contr.SAS', 'contr.sum', 'contr.treatment', 'contrasts', 'contrasts<-',
            +            'convolve', 'cooks.distance', 'cophenetic', 'cor', 'cor.test', 'cov', 'cov.wt',
            +            'cov2cor', 'covratio', 'cpgram', 'cutree', 'cycle', 'D', 'dbeta', 'dbinom', 'dcauchy',
            +            'dchisq', 'decompose', 'delete.response', 'deltat', 'dendrapply', 'density', 'density.default',
            +            'deriv', 'deriv.default', 'deriv.formula', 'deriv3', 'deriv3.default', 'deriv3.formula',
            +            'deviance', 'dexp', 'df', 'df.kernel', 'df.residual', 'dfbeta', 'dfbetas', 'dffits',
            +            'dgamma', 'dgeom', 'dhyper', 'diff.ts', 'diffinv', 'dist', 'dlnorm', 'dlogis',
            +            'dmultinom', 'dnbinom', 'dnorm', 'dpois', 'drop.scope', 'drop.terms', 'drop1',
            +            'dsignrank', 'dt', 'dummy.coef', 'dunif', 'dweibull', 'dwilcox', 'ecdf', 'eff.aovlist',
            +            'effects', 'embed', 'end', 'estVar', 'expand.model.frame', 'extractAIC', 'factanal',
            +            'factor.scope', 'family', 'fft', 'filter', 'fisher.test', 'fitted', 'fitted.values',
            +            'fivenum', 'fligner.test', 'formula', 'frequency', 'friedman.test', 'ftable', 'Gamma',
            +            'gaussian', 'get_all_vars', 'getInitial', 'glm', 'glm.control', 'glm.fit', 'glm.fit.null',
            +            'hasTsp', 'hat', 'hatvalues', 'hatvalues.lm', 'hclust', 'heatmap', 'HoltWinters', 'influence',
            +            'influence.measures', 'integrate', 'interaction.plot', 'inverse.gaussian', 'IQR',
            +            'is.empty.model', 'is.leaf', 'is.mts', 'is.stepfun', 'is.ts', 'is.tskernel', 'isoreg',
            +            'KalmanForecast', 'KalmanLike', 'KalmanRun', 'KalmanSmooth', 'kernapply', 'kernel', 'kmeans',
            +            'knots', 'kruskal.test', 'ks.test', 'ksmooth', 'lag', 'lag.plot', 'line', 'lines.ts', 'lm',
            +            'lm.fit', 'lm.fit.null', 'lm.influence', 'lm.wfit', 'lm.wfit.null', 'loadings', 'loess',
            +            'loess.control', 'loess.smooth', 'logLik', 'loglin', 'lowess', 'ls.diag', 'ls.print', 'lsfit',
            +            'mad', 'mahalanobis', 'make.link', 'makeARIMA', 'makepredictcall', 'manova', 'mantelhaen.test',
            +            'mauchley.test', 'mauchly.test', 'mcnemar.test', 'median', 'median.default', 'medpolish',
            +            'model.extract', 'model.frame', 'model.frame.aovlist', 'model.frame.default', 'model.frame.glm',
            +            'model.frame.lm', 'model.matrix', 'model.matrix.default', 'model.matrix.lm', 'model.offset',
            +            'model.response', 'model.tables', 'model.weights', 'monthplot', 'mood.test', 'mvfft', 'na.action',
            +            'na.contiguous', 'na.exclude', 'na.fail', 'na.omit', 'na.pass', 'napredict', 'naprint', 'naresid',
            +            'nextn', 'nlm', 'nlminb', 'nls', 'nls.control', 'NLSstAsymptotic', 'NLSstClosestX', 'NLSstLfAsymptote',
            +            'NLSstRtAsymptote', 'numericDeriv', 'offset', 'oneway.test', 'optim', 'optimise', 'optimize',
            +            'order.dendrogram', 'p.adjust', 'p.adjust.methods', 'pacf', 'pairwise.prop.test', 'pairwise.t.test',
            +            'pairwise.table', 'pairwise.wilcox.test', 'pbeta', 'pbinom', 'pbirthday', 'pcauchy', 'pchisq', 'pexp',
            +            'pf', 'pgamma', 'pgeom', 'phyper', 'plclust', 'plnorm', 'plogis', 'plot.density', 'plot.ecdf', 'plot.lm',
            +            'plot.mlm', 'plot.spec', 'plot.spec.coherency', 'plot.spec.phase', 'plot.stepfun', 'plot.ts', 'plot.TukeyHSD',
            +            'pnbinom', 'pnorm', 'poisson', 'poisson.test', 'poly', 'polym', 'power', 'power.anova.test', 'power.prop.test',
            +            'power.t.test', 'PP.test', 'ppoints', 'ppois', 'ppr', 'prcomp', 'predict', 'predict.glm', 'predict.lm',
            +            'predict.mlm', 'predict.poly', 'preplot', 'princomp', 'print.anova', 'print.coefmat', 'print.density',
            +            'print.family', 'print.formula', 'print.ftable', 'print.glm', 'print.infl', 'print.integrate', 'print.lm',
            +            'print.logLik', 'print.terms', 'print.ts', 'printCoefmat', 'profile', 'proj', 'promax', 'prop.test',
            +            'prop.trend.test', 'psignrank', 'pt', 'ptukey', 'punif', 'pweibull', 'pwilcox', 'qbeta', 'qbinom',
            +            'qbirthday', 'qcauchy', 'qchisq', 'qexp', 'qf', 'qgamma', 'qgeom', 'qhyper', 'qlnorm', 'qlogis',
            +            'qnbinom', 'qnorm', 'qpois', 'qqline', 'qqnorm', 'qqnorm.default', 'qqplot', 'qsignrank', 'qt',
            +            'qtukey', 'quade.test', 'quantile', 'quantile.default', 'quasi', 'quasibinomial', 'quasipoisson',
            +            'qunif', 'qweibull', 'qwilcox', 'r2dtable', 'rbeta', 'rbinom', 'rcauchy', 'rchisq', 'read.ftable',
            +            'rect.hclust', 'reformulate', 'relevel', 'reorder', 'replications', 'reshape', 'reshapeLong', 'reshapeWide',
            +            'resid', 'residuals', 'residuals.default', 'residuals.glm', 'residuals.lm', 'rexp', 'rf', 'rgamma', 'rgeom',
            +            'rhyper', 'rlnorm', 'rlogis', 'rmultinom', 'rnbinom', 'rnorm', 'rpois', 'rsignrank', 'rstandard', 'rstandard.glm',
            +            'rstandard.lm', 'rstudent', 'rstudent.glm', 'rstudent.lm', 'rt', 'runif', 'runmed', 'rweibull', 'rwilcox',
            +            'scatter.smooth', 'screeplot', 'sd', 'se.contrast', 'selfStart', 'setNames', 'shapiro.test', 'simulate',
            +            'smooth', 'smooth.spline', 'smoothEnds', 'sortedXyData', 'spec.ar', 'spec.pgram', 'spec.taper', 'spectrum',
            +            'spline', 'splinefun', 'splinefunH', 'SSasymp', 'SSasympOff', 'SSasympOrig', 'SSbiexp', 'SSD', 'SSfol',
            +            'SSfpl', 'SSgompertz', 'SSlogis', 'SSmicmen', 'SSweibull', 'start', 'stat.anova', 'step', 'stepfun', 'stl',
            +            'StructTS', 'summary.aov', 'summary.aovlist', 'summary.glm', 'summary.infl', 'summary.lm', 'summary.manova',
            +            'summary.mlm', 'summary.stepfun', 'supsmu', 'symnum', 't.test', 'termplot', 'terms', 'terms.aovlist',
            +            'terms.default', 'terms.formula', 'terms.terms', 'time', 'toeplitz', 'ts', 'ts.intersect', 'ts.plot',
            +            'ts.union', 'tsdiag', 'tsp', 'tsp<-', 'tsSmooth', 'TukeyHSD', 'TukeyHSD.aov', 'uniroot', 'update',
            +            'update.default', 'update.formula', 'var', 'var.test', 'variable.names', 'varimax', 'vcov', 'weighted.mean',
            +            'weighted.residuals', 'weights', 'wilcox.test', 'window', 'window<-', 'write.ftable', 'xtabs',
            +            ),
            +        8 => array( // utils pkg
            +            'alarm', 'apropos', 'argsAnywhere', 'as.person', 'as.personList', 'as.relistable', 'as.roman',
            +            'assignInNamespace', 'available.packages', 'browseEnv', 'browseURL', 'browseVignettes', 'bug.report',
            +            'capture.output', 'checkCRAN', 'chooseCRANmirror', 'citation', 'citEntry', 'citFooter', 'citHeader',
            +            'close.socket', 'combn', 'compareVersion', 'contrib.url', 'count.fields', 'CRAN.packages', 'data',
            +            'data.entry', 'dataentry', 'de', 'de.ncols', 'de.restore', 'de.setup', 'debugger', 'demo', 'download.file',
            +            'download.packages', 'dump.frames', 'edit', 'emacs', 'example', 'file_test', 'file.edit', 'find', 'fix',
            +            'fixInNamespace', 'flush.console', 'formatOL', 'formatUL', 'getAnywhere', 'getCRANmirrors', 'getFromNamespace',
            +            'getS3method', 'getTxtProgressBar', 'glob2rx', 'head', 'head.matrix', 'help', 'help.request', 'help.search',
            +            'help.start', 'history', 'index.search', 'install.packages', 'installed.packages', 'is.relistable',
            +            'limitedLabels', 'loadhistory', 'localeToCharset', 'ls.str', 'lsf.str', 'make.packages.html', 'make.socket',
            +            'makeRweaveLatexCodeRunner', 'memory.limit', 'memory.size', 'menu', 'methods', 'mirror2html', 'modifyList',
            +            'new.packages', 'normalizePath', 'nsl', 'object.size', 'old.packages', 'package.contents', 'package.skeleton',
            +            'packageDescription', 'packageStatus', 'page', 'person', 'personList', 'pico', 'prompt', 'promptData',
            +            'promptPackage', 'rc.getOption', 'rc.options', 'rc.settings', 'rc.status', 'read.csv', 'read.csv2', 'read.delim',
            +            'read.delim2', 'read.DIF', 'read.fortran', 'read.fwf', 'read.socket', 'read.table', 'readCitationFile', 'recover',
            +            'relist', 'remove.packages', 'Rprof', 'Rprofmem', 'RShowDoc', 'RSiteSearch', 'rtags', 'Rtangle', 'RtangleSetup',
            +            'RtangleWritedoc', 'RweaveChunkPrefix', 'RweaveEvalWithOpt', 'RweaveLatex', 'RweaveLatexFinish', 'RweaveLatexOptions',
            +            'RweaveLatexSetup', 'RweaveLatexWritedoc', 'RweaveTryStop', 'savehistory', 'select.list', 'sessionInfo',
            +            'setRepositories', 'setTxtProgressBar', 'stack', 'Stangle', 'str', 'strOptions', 'summaryRprof', 'Sweave',
            +            'SweaveHooks', 'SweaveSyntaxLatex', 'SweaveSyntaxNoweb', 'SweaveSyntConv', 'tail', 'tail.matrix', 'timestamp',
            +            'toBibtex', 'toLatex', 'txtProgressBar', 'type.convert', 'unstack', 'unzip', 'update.packages', 'update.packageStatus',
            +            'upgrade', 'url.show', 'URLdecode', 'URLencode', 'vi', 'View', 'vignette', 'write.csv', 'write.csv2', 'write.socket',
            +            'write.table', 'wsbrowser', 'xedit', 'xemacs', 'zip.file.extract',
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '{', '}', '[', ']', '!', '%', '^', '&', '/','+','-','*','=','<','>',';','|','<-','->',
            +        '^', '-', ':', '::', ':::', '!', '!=', '*', '?',
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => true,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        5 => true,
            +        6 => true,
            +        7 => true,
            +        8 => true,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0000FF; font-weight: bold;',
            +            2 => 'color: #0000FF; font-weight: bold;',
            +            3 => 'color: #CC9900; font-weight: bold;',
            +            4 => 'color: #0000FF; font-weight: bold;',
            +            5 => 'color: #0000FF; font-weight: bold;',
            +            6 => 'color: #0000FF; font-weight: bold;',
            +            7 => 'color: #0000FF; font-weight: bold;',
            +            8 => 'color: #0000FF; font-weight: bold;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #228B22;',
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;',
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #080;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'METHODS' => array(
            +            1 => '',
            +            2 => ''
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #080;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color:#A020F0;'
            +            ),
            +        'SCRIPT' => array(
            +            0 => ''            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => 'http://stat.ethz.ch/R-manual/R-devel/library/base/html/{FNAME}.html', // Base Package
            +        3 => 'http://stat.ethz.ch/R-manual/R-devel/library/datasets/html/{FNAME}.html', // Datasets
            +        4 => 'http://stat.ethz.ch/R-manual/R-devel/library/graphics/html/{FNAME}.html', // Graphics Package
            +        5 => 'http://stat.ethz.ch/R-manual/R-devel/library/grDevices/html/{FNAME}.html', // grDevices
            +        6 => 'http://stat.ethz.ch/R-manual/R-devel/library/methods/html/{FNAME}.html', // methods
            +        7 => 'http://stat.ethz.ch/R-manual/R-devel/library/stats/html/{FNAME}.html', // stats
            +        8 => 'http://stat.ethz.ch/R-manual/R-devel/library/utils/html/{FNAME}.html' // utils
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.',
            +        2 => '::'
            +        ),
            +    'REGEXPS' => array(
            +        0 => array(
            +            GESHI_SEARCH => "([^\w])'([^\\n\\r']*)'",
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => "\\1'",
            +            GESHI_AFTER => "'"
            +            )
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            'DISALLOWED_BEFORE' => "(?|^&\\.])(? "(?![a-zA-Z0-9_\|%\\-&;\\.])"
            +            )
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/ruby.php b/vendor/easybook/geshi/geshi/ruby.php
            new file mode 100644
            index 0000000000..baa0319a15
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/ruby.php
            @@ -0,0 +1,230 @@
            + 'Ruby',
            +    'COMMENT_SINGLE' => array(1 => "#"),
            +    'COMMENT_MULTI' => array("=begin" => "=end"),
            +    'COMMENT_REGEXP' => array(
            +        //Heredoc
            +        4 => '/<<\s*?(\w+)\\n.*?\\n\\1(?![a-zA-Z0-9])/si',
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"', '`','\''),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +                'alias', 'and', 'begin', 'break', 'case', 'class',
            +                'def', 'defined', 'do', 'else', 'elsif', 'end',
            +                'ensure', 'for', 'if', 'in', 'module', 'while',
            +                'next', 'not', 'or', 'redo', 'rescue', 'yield',
            +                'retry', 'super', 'then', 'undef', 'unless',
            +                'until', 'when', 'include'
            +            ),
            +        2 => array(
            +                '__FILE__', '__LINE__', 'false', 'nil', 'self', 'true',
            +                'return'
            +            ),
            +        3 => array(
            +                'Array', 'Float', 'Integer', 'String', 'at_exit',
            +                'autoload', 'binding', 'caller', 'catch', 'chop', 'chop!',
            +                'chomp', 'chomp!', 'eval', 'exec', 'exit', 'exit!', 'fail',
            +                'fork', 'format', 'gets', 'global_variables', 'gsub', 'gsub!',
            +                'iterator?', 'lambda', 'load', 'local_variables', 'loop',
            +                'open', 'p', 'print', 'printf', 'proc', 'putc', 'puts',
            +                'raise', 'rand', 'readline', 'readlines', 'require', 'select',
            +                'sleep', 'split', 'sprintf', 'srand', 'sub', 'sub!', 'syscall',
            +                'system', 'trace_var', 'trap', 'untrace_var'
            +            ),
            +        4 => array(
            +                'Abbrev', 'ArgumentError', 'Base64', 'Benchmark',
            +                'Benchmark::Tms', 'Bignum', 'Binding', 'CGI', 'CGI::Cookie',
            +                'CGI::HtmlExtension', 'CGI::QueryExtension',
            +                'CGI::Session', 'CGI::Session::FileStore',
            +                'CGI::Session::MemoryStore', 'Class', 'Comparable', 'Complex',
            +                'ConditionVariable', 'Continuation', 'Data',
            +                'Date', 'DateTime', 'Delegator', 'Dir', 'EOFError', 'ERB',
            +                'ERB::Util', 'Enumerable', 'Enumerable::Enumerator', 'Errno',
            +                'Exception', 'FalseClass', 'File',
            +                'File::Constants', 'File::Stat', 'FileTest', 'FileUtils',
            +                'FileUtils::DryRun', 'FileUtils::NoWrite',
            +                'FileUtils::StreamUtils_', 'FileUtils::Verbose', 'Find',
            +                'Fixnum', 'FloatDomainError', 'Forwardable', 'GC', 'Generator',
            +                'Hash', 'IO', 'IOError', 'Iconv', 'Iconv::BrokenLibrary',
            +                'Iconv::Failure', 'Iconv::IllegalSequence',
            +                'Iconv::InvalidCharacter', 'Iconv::InvalidEncoding',
            +                'Iconv::OutOfRange', 'IndexError', 'Interrupt', 'Kernel',
            +                'LoadError', 'LocalJumpError', 'Logger', 'Logger::Application',
            +                'Logger::Error', 'Logger::Formatter', 'Logger::LogDevice',
            +                'Logger::LogDevice::LogDeviceMutex', 'Logger::Severity',
            +                'Logger::ShiftingError', 'Marshal', 'MatchData',
            +                'Math', 'Matrix', 'Method', 'Module', 'Mutex', 'NameError',
            +                'NameError::message', 'NilClass', 'NoMemoryError',
            +                'NoMethodError', 'NotImplementedError', 'Numeric', 'Object',
            +                'ObjectSpace', 'Observable', 'PStore', 'PStore::Error',
            +                'Pathname', 'Precision', 'Proc', 'Process', 'Process::GID',
            +                'Process::Status', 'Process::Sys', 'Process::UID', 'Queue',
            +                'Range', 'RangeError', 'Rational', 'Regexp', 'RegexpError',
            +                'RuntimeError', 'ScriptError', 'SecurityError', 'Set',
            +                'Shellwords', 'Signal', 'SignalException', 'SimpleDelegator',
            +                'SingleForwardable', 'Singleton', 'SingletonClassMethods',
            +                'SizedQueue', 'SortedSet', 'StandardError', 'StringIO',
            +                'StringScanner', 'StringScanner::Error', 'Struct', 'Symbol',
            +                'SyncEnumerator', 'SyntaxError', 'SystemCallError',
            +                'SystemExit', 'SystemStackError', 'Tempfile',
            +                'Test::Unit::TestCase', 'Test::Unit', 'Test', 'Thread',
            +                'ThreadError', 'ThreadGroup',
            +                'ThreadsWait', 'Time', 'TrueClass', 'TypeError', 'URI',
            +                'URI::BadURIError', 'URI::Error', 'URI::Escape', 'URI::FTP',
            +                'URI::Generic', 'URI::HTTP', 'URI::HTTPS',
            +                'URI::InvalidComponentError', 'URI::InvalidURIError',
            +                'URI::LDAP', 'URI::MailTo', 'URI::REGEXP',
            +                'URI::REGEXP::PATTERN', 'UnboundMethod', 'Vector', 'YAML',
            +                'ZeroDivisionError', 'Zlib',
            +                'Zlib::BufError', 'Zlib::DataError', 'Zlib::Deflate',
            +                'Zlib::Error', 'Zlib::GzipFile', 'Zlib::GzipFile::CRCError',
            +                'Zlib::GzipFile::Error', 'Zlib::GzipFile::LengthError',
            +                'Zlib::GzipFile::NoFooter', 'Zlib::GzipReader',
            +                'Zlib::GzipWriter', 'Zlib::Inflate', 'Zlib::MemError',
            +                'Zlib::NeedDict', 'Zlib::StreamEnd', 'Zlib::StreamError',
            +                'Zlib::VersionError',
            +                'Zlib::ZStream',
            +                'HTML::Selector', 'HashWithIndifferentAccess', 'Inflector',
            +                'Inflector::Inflections', 'Mime', 'Mime::Type',
            +                'OCI8AutoRecover', 'TimeZone', 'XmlSimple'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '[', ']', '{', '}', '%', '&', '*', '|', '/', '<', '>',
            +        '+', '-', '=>', '<<'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => true,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color:#9966CC; font-weight:bold;',
            +            2 => 'color:#0000FF; font-weight:bold;',
            +            3 => 'color:#CC0066; font-weight:bold;',
            +            4 => 'color:#CC00FF; font-weight:bold;',
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color:#008000; font-style:italic;',
            +            4 => 'color: #cc0000; font-style: italic;',
            +            'MULTI' => 'color:#000080; font-style:italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color:#000099;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color:#006600; font-weight:bold;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color:#996600;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color:#006666;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color:#9900CC;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color:#006600; font-weight:bold;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color:#ff6633; font-weight:bold;',
            +            1 => 'color:#0066ff; font-weight:bold;',
            +            2 => 'color:#6666ff; font-weight:bold;',
            +            3 => 'color:#ff3333; font-weight:bold;'
            +            ),
            +        'SCRIPT' => array(
            +            0 => '',
            +            1 => '',
            +            2 => '',
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        0 => array(//Variables
            +            GESHI_SEARCH => "([[:space:]])(\\$[a-zA-Z_][a-zA-Z0-9_]*)",
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => ''
            +            ),
            +        1 => array(//Arrays
            +            GESHI_SEARCH => "([[:space:]])(@[a-zA-Z_][a-zA-Z0-9_]*)",
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => ''
            +            ),
            +        2 => "([A-Z][a-zA-Z0-9_]*::)+[A-Z][a-zA-Z0-9_]*",//Static OOP symbols
            +        3 => array(
            +            GESHI_SEARCH => "([[:space:]]|\[|\()(:[a-zA-Z_][a-zA-Z0-9_]*)",
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => ''
            +            )
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_MAYBE,
            +    'SCRIPT_DELIMITERS' => array(
            +        0 => array(
            +            '<%' => '%>'
            +            )
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        0 => true,
            +        ),
            +    'TAB_WIDTH' => 2
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/rust.php b/vendor/easybook/geshi/geshi/rust.php
            new file mode 100644
            index 0000000000..07ba51a02a
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/rust.php
            @@ -0,0 +1,228 @@
            + 'Rust',
            +
            +    'COMMENT_SINGLE' => array('//'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(),
            +
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'ESCAPE_REGEXP' => array(
            +        //Simple Single Char Escapes
            +        1 => "#\\\\[\\\\nrt\'\"?\n]#i",
            +        //Hexadecimal Char Specs
            +        2 => "#\\\\x[\da-fA-F]{2}#",
            +        //Hexadecimal Char Specs
            +        3 => "#\\\\u[\da-fA-F]{4}#",
            +        //Hexadecimal Char Specs
            +        4 => "#\\\\U[\da-fA-F]{8}#",
            +        //Octal Char Specs
            +        5 => "#\\\\[0-7]{1,3}#"
            +        ),
            +    'NUMBERS' =>
            +        GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B |
            +        GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI |
            +        GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO,
            +
            +    'KEYWORDS' => array(
            +        // Keywords
            +        1 => array(
            +            'alt', 'as', 'assert', 'break', 'const', 'continue', 'copy', 'do',
            +            'else', 'enum', 'extern', 'fn', 'for', 'if',
            +            'impl', 'in', 'let', 'log', 'loop', 'match', 'mod', 'mut', 'of',
            +            'priv', 'pub', 'ref', 'return', 'self', 'static', 'struct', 'super',
            +            'to', 'trait', 'type', 'unsafe', 'use', 'with', 'while'
            +            ),
            +        // Boolean values
            +        2 => array( 'true', 'false' ),
            +        // Structs and built-in types
            +        3 => array(
            +            'u8', 'i8',
            +            'u16', 'i16',
            +            'u32', 'i32',
            +            'u64', 'i64',
            +            'f32', 'f64',
            +            'int', 'uint',
            +            'float',
            +            'bool',
            +            'str', 'char',
            +            'Argument', 'AsyncWatcher', 'BorrowRecord', 'BufReader',
            +            'BufWriter', 'BufferedReader', 'BufferedStream', 'BufferedWriter',
            +            'ByRef', 'ByteIterator', 'CFile', 'CString', 'CStringIterator',
            +            'Cell', 'Chain', 'Chan', 'ChanOne', 'CharIterator',
            +            'CharOffsetIterator', 'CharRange', 'CharSplitIterator',
            +            'CharSplitNIterator', 'ChunkIter', 'Condition', 'ConnectRequest',
            +            'Coroutine', 'Counter', 'CrateMap', 'Cycle', 'DeflateWriter',
            +            'Display', 'ElementSwaps', 'Enumerate', 'Exp', 'Exp1', 'FileDesc',
            +            'FileReader', 'FileStat', 'FileStream', 'FileWriter', 'Filter',
            +            'FilterMap', 'FlatMap', 'FormatSpec', 'Formatter', 'FsRequest',
            +            'Fuse', 'GarbageCollector', 'GetAddrInfoRequest', 'Handle',
            +            'HashMap', 'HashMapIterator', 'HashMapMoveIterator',
            +            'HashMapMutIterator', 'HashSet', 'HashSetIterator',
            +            'HashSetMoveIterator', 'Hint', 'IdleWatcher', 'InflateReader',
            +            'Info', 'Inspect', 'Invert', 'IoError', 'Isaac64Rng', 'IsaacRng',
            +            'LineBufferedWriter', 'Listener', 'LocalHeap', 'LocalStorage',
            +            'Loop', 'Map', 'MatchesIndexIterator', 'MemReader', 'MemWriter',
            +            'MemoryMap', 'ModEntry', 'MoveIterator', 'MovePtrAdaptor',
            +            'MoveRevIterator', 'NoOpRunnable', 'NonCopyable', 'Normal',
            +            'OSRng', 'OptionIterator', 'Parser', 'Path', 'Peekable',
            +            'Permutations', 'Pipe', 'PipeStream', 'PluralArm', 'Port',
            +            'PortOne', 'Process', 'ProcessConfig', 'ProcessOptions',
            +            'ProcessOutput', 'RC', 'RSplitIterator', 'RandSample', 'Range',
            +            'RangeInclusive', 'RangeStep', 'RangeStepInclusive', 'Rc', 'RcMut',
            +            'ReaderRng', 'Repeat', 'ReprVisitor', 'RequestData',
            +            'ReseedWithDefault', 'ReseedingRng', 'Scan', 'SchedOpts',
            +            'SelectArm', 'SharedChan', 'SharedPort', 'SignalWatcher',
            +            'SipState', 'Skip', 'SkipWhile', 'SocketAddr', 'SplitIterator',
            +            'StackPool', 'StackSegment', 'StandardNormal', 'StdErrLogger',
            +            'StdIn', 'StdOut', 'StdReader', 'StdRng', 'StdWriter',
            +            'StrSplitIterator', 'StreamWatcher', 'TTY', 'Take', 'TakeWhile',
            +            'Task', 'TaskBuilder', 'TaskOpts', 'TcpAcceptor', 'TcpListener',
            +            'TcpStream', 'TcpWatcher', 'Timer', 'TimerWatcher', 'TrieMap',
            +            'TrieMapIterator', 'TrieSet', 'TrieSetIterator', 'Tube',
            +            'UdpSendRequest', 'UdpSocket', 'UdpStream', 'UdpWatcher', 'Unfold',
            +            'UnixAcceptor', 'UnixListener', 'UnixStream', 'Unwinder',
            +            'UvAddrInfo', 'UvError', 'UvEventLoop', 'UvFileStream',
            +            'UvIoFactory', 'UvPausibleIdleCallback', 'UvPipeStream',
            +            'UvProcess', 'UvRemoteCallback', 'UvSignal', 'UvTTY',
            +            'UvTcpAcceptor', 'UvTcpListener', 'UvTcpStream', 'UvTimer',
            +            'UvUdpSocket', 'UvUnboundPipe', 'UvUnixAcceptor', 'UvUnixListener',
            +            'VecIterator', 'VecMutIterator', 'Weighted', 'WeightedChoice',
            +            'WindowIter', 'WriteRequest', 'XorShiftRng', 'Zip', 'addrinfo',
            +            'uv_buf_t', 'uv_err_data', 'uv_process_options_t', 'uv_stat_t',
            +            'uv_stdio_container_t', 'uv_timespec_t'
            +            ),
            +        // Enums
            +        4 => array(
            +            'Alignment', 'Count', 'Either', 'ExponentFormat', 'FPCategory',
            +            'FileAccess', 'FileMode', 'Flag', 'IoErrorKind', 'IpAddr',
            +            'KeyValue', 'MapError', 'MapOption', 'MemoryMapKind', 'Method',
            +            'NullByteResolution', 'Option', 'Ordering', 'PathPrefix', 'Piece',
            +            'PluralKeyword', 'Position', 'Protocol', 'Result', 'SchedHome',
            +            'SchedMode', 'SeekStyle', 'SendStr', 'SignFormat',
            +            'SignificantDigits', 'Signum', 'SocketType', 'StdioContainer',
            +            'TaskResult', 'TaskType', 'UvSocketAddr', 'Void', 'uv_handle_type',
            +            'uv_membership', 'uv_req_type'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '{', '}', '[', ']',
            +        '+', '-', '*', '/', '%',
            +        '&', '|', '^', '!', '<', '>', '~', '@',
            +        ':',
            +        ';', ',',
            +        '='
            +        ),
            +
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true
            +        ),
            +
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #708;',
            +            2 => 'color: #219;',
            +            3 => 'color: #05a;',
            +            4 => 'color: #800;'
            +            ),
            +        'COMMENTS' => array(
            +            0 => 'color: #a50; font-style: italic;',
            +            'MULTI' => 'color: #a50; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;',
            +            1 => 'color: #000099; font-weight: bold;',
            +            2 => 'color: #660099; font-weight: bold;',
            +            3 => 'color: #660099; font-weight: bold;',
            +            4 => 'color: #660099; font-weight: bold;',
            +            5 => 'color: #006699; font-weight: bold;',
            +            'HARD' => ''
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #a11;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #0000dd;',
            +            GESHI_NUMBER_BIN_PREFIX_0B => 'color: #208080;',
            +            GESHI_NUMBER_OCT_PREFIX => 'color: #208080;',
            +            GESHI_NUMBER_HEX_PREFIX => 'color: #208080;',
            +            GESHI_NUMBER_FLT_SCI_SHORT => 'color:#800080;',
            +            GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;',
            +            GESHI_NUMBER_FLT_NONSCI_F => 'color:#800080;',
            +            GESHI_NUMBER_FLT_NONSCI => 'color:#800080;'
            +            ),
            +        'BRACKETS' => array(''),
            +        'METHODS' => array(
            +            1 => 'color: #164;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => ''
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '::'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4
            +);
            diff --git a/vendor/easybook/geshi/geshi/sas.php b/vendor/easybook/geshi/geshi/sas.php
            new file mode 100644
            index 0000000000..faf16ff70d
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/sas.php
            @@ -0,0 +1,289 @@
            + 'SAS',
            +    'COMMENT_SINGLE' => array(),
            +    'COMMENT_MULTI' => array('/*' => '*/', '*' => ';'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            '_ALL_','_CHARACTER_','_INFILE_','_N_','_NULL_','_NUMERIC_',
            +            '_WEBOUT_'
            +            ),
            +        2 => array(
            +            '%BQUOTE','%CMPRES','%COMPSTOR','%DATATYP','%DISPLAY','%DO','%ELSE',
            +            '%END','%EVAL','%GLOBAL','%GOTO','%IF','%INDEX','%INPUT','%KEYDEF',
            +            '%LABEL','%LEFT','%LENGTH','%LET','%LOCAL','%LOWCASE','%MACRO',
            +            '%MEND','%NRBQUOTE','%NRQUOTE','%NRSTR','%PUT','%QCMPRES','%QLEFT',
            +            '%QLOWCASE','%QSCAN','%QSUBSTR','%QSYSFUNC','%QTRIM','%QUOTE',
            +            '%QUPCASE','%SCAN','%STR','%SUBSTR','%SUPERQ','%SYSCALL',
            +            '%SYSEVALF','%SYSEXEC','%SYSFUNC','%SYSGET','%SYSLPUT','%SYSPROD',
            +            '%SYSRC','%SYSRPUT','%THEN','%TO','%TRIM','%UNQUOTE','%UNTIL',
            +            '%UPCASE','%VERIFY','%WHILE','%WINDOW'
            +            ),
            +        3 => array(
            +            'ABS','ADDR','AIRY','ARCOS','ARSIN','ATAN','ATTRC','ATTRN','BAND',
            +            'BETAINV','BLSHIFT','BNOT','BOR','BRSHIFT','BXOR','BYTE','CDF',
            +            'CEIL','CEXIST','CINV','CLOSE','CNONCT','COLLATE','COMPBL',
            +            'COMPOUND','COMPRESS','COSH','COS','CSS','CUROBS','CV','DACCDBSL',
            +            'DACCDB','DACCSL','DACCSYD','DACCTAB','DAIRY','DATETIME','DATEJUL',
            +            'DATEPART','DATE','DAY','DCLOSE','DEPDBSL','DEPDB','DEPSL','DEPSYD',
            +            'DEPTAB','DEQUOTE','DHMS','DIF','DIGAMMA','DIM','DINFO','DNUM',
            +            'DOPEN','DOPTNAME','DOPTNUM','DREAD','DROPNOTE','DSNAME','ERFC',
            +            'ERF','EXIST','EXP','FAPPEND','FCLOSE','FCOL','FDELETE','FETCHOBS',
            +            'FETCH','FEXIST','FGET','FILEEXIST','FILENAME','FILEREF','FINFO',
            +            'FINV','FIPNAMEL','FIPNAME','FIPSTATE','FLOOR','FNONCT','FNOTE',
            +            'FOPEN','FOPTNAME','FOPTNUM','FPOINT','FPOS','FPUT','FREAD',
            +            'FREWIND','FRLEN','FSEP','FUZZ','FWRITE','GAMINV','GAMMA',
            +            'GETOPTION','GETVARC','GETVARN','HBOUND','HMS','HOSTHELP','HOUR',
            +            'IBESSEL','INDEXW','INDEXC','INDEX','INPUTN','INPUTC','INPUT',
            +            'INTRR','INTCK','INTNX','INT','IRR','JBESSEL','JULDATE','KURTOSIS',
            +            'LAG','LBOUND','LEFT','LENGTH','LGAMMA','LIBNAME','LIBREF','LOG10',
            +            'LOG2','LOGPDF','LOGPMF','LOGSDF','LOG','LOWCASE','MAX','MDY',
            +            'MEAN','MINUTE','MIN','MOD','MONTH','MOPEN','MORT','NETPV','NMISS',
            +            'NORMAL','NPV','N','OPEN','ORDINAL','PATHNAME','PDF','PEEKC','PEEK',
            +            'PMF','POINT','POISSON','POKE','PROBBETA','PROBBNML','PROBCHI',
            +            'PROBF','PROBGAM','PROBHYPR','PROBIT','PROBNEGB','PROBNORM','PROBT',
            +            'PUTN','PUTC','PUT','QTR','QUOTE','RANBIN','RANCAU','RANEXP',
            +            'RANGAM','RANGE','RANK','RANNOR','RANPOI','RANTBL','RANTRI',
            +            'RANUNI','REPEAT','RESOLVE','REVERSE','REWIND','RIGHT','ROUND',
            +            'SAVING','SCAN','SDF','SECOND','SIGN','SINH','SIN','SKEWNESS',
            +            'SOUNDEX','SPEDIS','SQRT','STDERR','STD','STFIPS','STNAME',
            +            'STNAMEL','SUBSTR','SUM','SYMGET','SYSGET','SYSMSG','SYSPROD',
            +            'SYSRC','SYSTEM','TANH','TAN','TIMEPART','TIME','TINV','TNONCT',
            +            'TODAY','TRANSLATE','TRANWRD','TRIGAMMA','TRIMN','TRIM','TRUNC',
            +            'UNIFORM','UPCASE','USS','VARFMT','VARINFMT','VARLABEL','VARLEN',
            +            'VARNAME','VARNUM','VARRAYX','VARRAY','VARTYPE','VAR','VERIFY',
            +            'VFORMATX','VFORMATDX','VFORMATD','VFORMATNX','VFORMATN',
            +            'VFORMATWX','VFORMATW','VFORMAT','VINARRAYX','VINARRAY',
            +            'VINFORMATX','VINFORMATDX','VINFORMATD','VINFORMATNX','VINFORMATN',
            +            'VINFORMATWX','VINFORMATW','VINFORMAT','VLABELX','VLABEL',
            +            'VLENGTHX','VLENGTH','VNAMEX','VNAME','VTYPEX','VTYPE','WEEKDAY',
            +            'YEAR','YYQ','ZIPFIPS','ZIPNAME','ZIPNAMEL','ZIPSTATE'
            +            ),
            +        4 => array(
            +            'ABORT','ADD','ALTER','AND','ARRAY','AS','ATTRIB','BY','CALL',
            +            'CARDS4','CASCADE','CATNAME','CHECK','CONTINUE','CREATE',
            +            'DATALINES4','DELETE','DESCRIBE','DISPLAY','DISTINCT','DM','DROP',
            +            'ENDSAS','FILE','FOOTNOTE','FOREIGN','FORMAT','FROM',
            +            'GOTO','GROUP','HAVING','IN','INFILE','INFORMAT',
            +            'INSERT','INTO','KEEP','KEY','LABEL','LEAVE',
            +            'LIKE','LINK','LIST','LOSTCARD','MERGE','MESSAGE','MISSING',
            +            'MODIFY','MSGTYPE','NOT','NULL','ON','OPTIONS','OR','ORDER',
            +            'OUTPUT','PAGE','PRIMARY','REDIRECT','REFERENCES','REMOVE',
            +            'RENAME','REPLACE','RESET','RESTRICT','RETAIN','RETURN','SELECT',
            +            'SET','SKIP','STARTSAS','STOP','SYSTASK','TABLE','TITLE','UNIQUE',
            +            'UPDATE','VALIDATE','VIEW','WAITSAS','WHERE','WINDOW','X'
            +            ),
            +        5 => array(
            +            'DO','ELSE','END','IF','THEN','UNTIL','WHILE'
            +            ),
            +        6 => array(
            +            'RUN','QUIT','DATA'
            +            ),
            +        7 => array(
            +            'ERROR'
            +            ),
            +        8 => array(
            +            'WARNING'
            +            ),
            +        9 => array(
            +            'NOTE'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        5 => false,
            +        6 => false,
            +        7 => false,
            +        8 => false,
            +        9 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0000ff;',
            +            2 => 'color: #0000ff;',
            +            3 => 'color: #0000ff;',
            +            4 => 'color: #0000ff;',
            +            5 => 'color: #0000ff;',
            +            6 => 'color: #000080; font-weight: bold;',
            +            7 => 'color: #ff0000;',
            +            8 => 'color: #00ff00;',
            +            9 => 'color: #0000ff;'
            +            ),
            +        'COMMENTS' => array(
            +//            1 => 'color: #006400; font-style: italic;',
            +            'MULTI' => 'color: #006400; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #a020f0;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #2e8b57; font-weight: bold;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'SCRIPT' => array(
            +            0 => '',
            +            1 => '',
            +            2 => '',
            +            3 => ''
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #0000ff; font-weight: bold;',
            +            1 => 'color: #000080; font-weight: bold;',
            +            2 => 'color: #006400; font-style: italic;',
            +            3 => 'color: #006400; font-style: italic;',
            +            4 => 'color: #006400; font-style: italic;',
            +            5 => 'color: #ff0000; font-weight: bold;',
            +            6 => 'color: #00ff00; font-style: italic;',
            +            7 => 'color: #0000ff; font-style: normal;',
            +            8 => 'color: #b218b2; font-weight: bold;',
            +            9 => 'color: #b218b2; font-weight: bold;'
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => '',
            +        6 => '',
            +        7 => '',
            +        8 => '',
            +        9 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        0 => "&[a-zA-Z_][a-zA-Z0-9_]*",
            +        1 => array(//Procedures
            +            GESHI_SEARCH => '(^\\s*)(PROC \\w+)',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => 'im',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => ''
            +            ),
            +        2 => array(
            +            GESHI_SEARCH => '(^\\s*)(\\*.*;)',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => 'im',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => ''
            +            ),
            +        3 => array(
            +            GESHI_SEARCH => '(.*;\\s*)(\\*.*;)',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => 'im',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => ''
            +            ),
            +        4 => array(
            +            GESHI_SEARCH => '(^\\s*)(%\\*.*;)',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => 'im',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => ''
            +            ),
            +        5 => array(//Error messages
            +            GESHI_SEARCH => '(^ERROR.*)',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => 'im',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        6 => array(//Warning messages
            +            GESHI_SEARCH => '(^WARNING.*)',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => 'im',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        7 => array(//Notice messages
            +            GESHI_SEARCH => '(^NOTE.*)',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => 'im',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        8 => array(
            +            GESHI_SEARCH => '(^\\s*)(CARDS.*)(^\\s*;\\s*$)',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => 'sim',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => '\\3'
            +            ),
            +        9 => array(
            +            GESHI_SEARCH => '(^\\s*)(DATALINES.*)(^\\s*;\\s*$)',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => 'sim',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => '\\3'
            +            )
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_MAYBE,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/sass.php b/vendor/easybook/geshi/geshi/sass.php
            new file mode 100644
            index 0000000000..286f4bfab8
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/sass.php
            @@ -0,0 +1,248 @@
            + 'Sass',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"', "'"),
            +    'ESCAPE_CHAR' => '',
            +    'ESCAPE_REGEXP' => array(
            +        ),
            +    'NUMBERS' =>
            +        GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_FLT_SCI_ZERO,
            +    'KEYWORDS' => array(
            +        // properties
            +        1 => array(
            +            'azimuth', 'background-attachment', 'background-color',
            +            'background-image', 'background-position', 'background-repeat',
            +            'background', 'border-bottom-color', 'border-radius',
            +            'border-top-left-radius', 'border-top-right-radius',
            +            'border-bottom-right-radius', 'border-bottom-left-radius',
            +            'border-bottom-style', 'border-bottom-width', 'border-left-color',
            +            'border-left-style', 'border-left-width', 'border-right',
            +            'border-right-color', 'border-right-style', 'border-right-width',
            +            'border-top-color', 'border-top-style',
            +            'border-top-width','border-bottom', 'border-collapse',
            +            'border-left', 'border-width', 'border-color', 'border-spacing',
            +            'border-style', 'border-top', 'border', 'box-shadow', 'caption-side', 'clear',
            +            'clip', 'color', 'content', 'counter-increment', 'counter-reset',
            +            'cue-after', 'cue-before', 'cue', 'cursor', 'direction', 'display',
            +            'elevation', 'empty-cells', 'float', 'font-family', 'font-size',
            +            'font-size-adjust', 'font-stretch', 'font-style', 'font-variant',
            +            'font-weight', 'font', 'line-height', 'letter-spacing',
            +            'list-style', 'list-style-image', 'list-style-position',
            +            'list-style-type', 'margin-bottom', 'margin-left', 'margin-right',
            +            'margin-top', 'margin', 'marker-offset', 'marks', 'max-height',
            +            'max-width', 'min-height', 'min-width', 'orphans', 'outline',
            +            'outline-color', 'outline-style', 'outline-width', 'overflow',
            +            'padding-bottom', 'padding-left', 'padding-right', 'padding-top',
            +            'padding', 'page', 'page-break-after', 'page-break-before',
            +            'page-break-inside', 'pause-after', 'pause-before', 'pause',
            +            'pitch', 'pitch-range', 'play-during', 'position', 'quotes',
            +            'richness', 'right', 'size', 'speak-header', 'speak-numeral',
            +            'speak-punctuation', 'speak', 'speech-rate', 'stress',
            +            'table-layout', 'text-align', 'text-decoration', 'text-indent',
            +            'text-shadow', 'text-transform', 'top', 'unicode-bidi',
            +            'vertical-align', 'visibility', 'voice-family', 'volume',
            +            'white-space', 'widows', 'width', 'word-spacing', 'z-index',
            +            'bottom', 'left', 'height',
            +            // media queries
            +            'screen', 'orientation', 'min-device-width', 'max-device-width',
            +            ),
            +        // reserved words for values
            +        2 => array(
            +            // colors
            +            'aqua', 'black', 'blue', 'fuchsia', 'gray', 'green', 'lime',
            +            'maroon', 'navy', 'olive', 'orange', 'purple', 'red', 'silver',
            +            'teal', 'white', 'yellow',
            +            // media queries
            +            'landscape', 'portrait', 
            +            // other
            +            'above', 'absolute', 'always', 'armenian', 'aural', 'auto',
            +            'avoid', 'baseline', 'behind', 'below', 'bidi-override', 'blink',
            +            'block', 'bold', 'bolder', 'both', 'capitalize', 'center-left',
            +            'center-right', 'center', 'circle', 'cjk-ideographic',
            +            'close-quote', 'collapse', 'condensed', 'continuous', 'crop',
            +            'crosshair', 'cross', 'cursive', 'dashed', 'decimal-leading-zero',
            +            'decimal', 'default', 'digits', 'disc', 'dotted', 'double',
            +            'e-resize', 'embed', 'extra-condensed', 'extra-expanded',
            +            'expanded', 'fantasy', 'far-left', 'far-right', 'faster', 'fast',
            +            'fixed',  'georgian', 'groove', 'hebrew', 'help', 'hidden',
            +            'hide', 'higher', 'high', 'hiragana-iroha', 'hiragana', 'icon',
            +            'inherit', 'inline-table', 'inline', 'inline-block', 'inset', 'inside',
            +            'invert', 'italic', 'justify', 'katakana-iroha', 'katakana', 'landscape',
            +            'larger', 'large', 'left-side', 'leftwards', 'level', 'lighter', 
            +            'line-through', 'list-item', 'loud', 'lower-alpha', 'lower-greek',
            +            'lower-roman', 'lowercase', 'ltr', 'lower', 'low', 
            +            'medium', 'message-box', 'middle', 'mix', 'monospace', 'n-resize',
            +            'narrower', 'ne-resize', 'no-close-quote',
            +            'no-open-quote', 'no-repeat', 'none', 'normal', 'nowrap',
            +            'nw-resize', 'oblique', 'once', 'open-quote', 'outset',
            +            'outside', 'overline', 'pointer', 'portrait', 'px',
            +             'relative', 'repeat-x', 'repeat-y', 'repeat', 'rgb',
            +            'ridge', 'right-side', 'rightwards', 's-resize', 'sans-serif',
            +            'scroll', 'se-resize', 'semi-condensed', 'semi-expanded',
            +            'separate', 'serif', 'show', 'silent',  'slow', 'slower',
            +            'small-caps', 'small-caption', 'smaller', 'soft', 'solid',
            +            'spell-out', 'square', 'static', 'status-bar', 'super',
            +            'sw-resize', 'table-caption', 'table-cell', 'table-column',
            +            'table-column-group', 'table-footer-group', 'table-header-group',
            +            'table-row', 'table-row-group',  'text', 'text-bottom',
            +            'text-top', 'thick', 'thin', 'transparent', 'ultra-condensed',
            +            'ultra-expanded', 'underline', 'upper-alpha', 'upper-latin',
            +            'upper-roman', 'uppercase', 'url', 'visible', 'w-resize', 'wait',
            +             'wider', 'x-fast', 'x-high', 'x-large', 'x-loud', 'x-low',
            +             'x-small', 'x-soft', 'xx-large', 'xx-small', 'yellow', 'yes'
            +            ),
            +        // directives
            +        3 => array(
            +            '@at-root', '@charset', '@content', '@debug', '@each', '@else', '@elseif',
            +            '@else if', '@extend', '@font-face', '@for', '@function', '@if',
            +            '@import', '@include', '@media', '@mixin', '@namespace', '@page',
            +            '@return', '@warn', '@while', 
            +            ),
            +        // built-in Sass functions
            +        4 => array(
            +            'rgb', 'rgba', 'red', 'green', 'blue', 'mix',
            +            'hsl', 'hsla', 'hue', 'saturation', 'lightness', 'adjust-hue',
            +            'lighten', 'darken', 'saturate', 'desaturate', 'grayscale',
            +            'complement', 'invert',
            +            'alpha', 'rgba', 'opacify', 'transparentize',
            +            'adjust-color', 'scale-color', 'change-color', 'ie-hex-str',
            +            'unquote', 'quote', 'str-length', 'str-insert', 'str-index',
            +            'str-slice', 'to-upper-case', 'to-lower-case',
            +            'percentage', 'round', 'ceil', 'floor', 'abs', 'min', 'max', 'random',
            +            'length', 'nth', 'join', 'append', 'zip', 'index', 'list-separator',
            +            'map-get', 'map-merge', 'map-remove', 'map-keys', 'map-values',
            +            'map-has-key', 'keywords',
            +            'feature-exists', 'variable-exists', 'global-variable-exists',
            +            'function-exists', 'mixin-exists', 'inspect', 'type-of', 'unit',
            +            'unitless', 'comparable', 'call',
            +            'if', 'unique-id',
            +            ),
            +        // reserved words
            +        5 => array(
            +            '!important', '!default', '!optional', 'true', 'false', 'with',
            +            'without', 'null', 'from', 'through', 'to', 'in', 'and', 'or',
            +            'only', 'not',
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '{', '}', ':', ';',
            +        '>', '+', '*', ',', '^', '=',
            +        '&', '~', '!', '%', '?', '...',
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        5 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000000; font-weight: bold;',
            +            2 => 'color: #993333;',
            +            3 => 'color: #990000;',
            +            4 => 'color: #000000; font-weight: bold;',
            +            5 => 'color: #009900;',
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #006600; font-style: italic;',
            +            'MULTI' => 'color: #006600; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #00AA00;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #00AA00;'
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #cc00cc;',
            +            1 => 'color: #6666ff;',
            +            2 => 'color: #3333ff;',
            +            3 => 'color: #933;',
            +            4 => 'color: #ff6633;',
            +            5 => 'color: #0066ff;',
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => '',
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        // Variables
            +        0 => "[$][a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*",
            +        // Hexadecimal colors
            +        1 => "\#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})",
            +        // CSS Pseudo classes
            +        // note: & is needed for > (i.e. > )
            +        2 => "(? "[+\-]?(\d+|(\d*\.\d+))(em|ex|pt|px|cm|in|%)",
            +        // Interpolation
            +        4 => "(\#\{.*\})",
            +        // Browser prefixed properties
            +        5 => "(\-(moz|ms|o|webkit)\-[a-z\-]*)",
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 2,
            +);
            diff --git a/vendor/easybook/geshi/geshi/scala.php b/vendor/easybook/geshi/geshi/scala.php
            new file mode 100644
            index 0000000000..681c1977cc
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/scala.php
            @@ -0,0 +1,137 @@
            + 'Scala',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(2 => "/\\'(?!\w\\'|\\\\)\w+(?=\s)/"),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'",'"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'ESCAPE_REGEXP' => array(
            +        //Simple Single Char Escapes
            +        1 => "#\\\\[nfrtv\$\"\n\\\\]#i",
            +        //Hexadecimal Char Specs
            +        2 => "#\\\\x[\da-fA-F]{1,2}#i",
            +        //Hexadecimal Char Specs (unicode)
            +        3 => "#\\\\u[\da-fA-F]{1,4}#",
            +        //Hexadecimal Char Specs (Extended Unicode)
            +        4 => "#\\\\U[\da-fA-F]{1,8}#",
            +        ),
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'abstract', 'case', 'catch', 'class', 'def',
            +            'do', 'else', 'extends', 'false', 'final',
            +            'finally', 'for', 'forSome', 'if', 'implicit',
            +            'import', 'match', 'new', 'null', 'object',
            +            'override', 'package', 'private', 'protected', 'requires',
            +            'return', 'sealed', 'super', 'this', 'throw',
            +            'trait', 'try', 'true', 'type', 'val',
            +            'var', 'while', 'with', 'yield'
            +            ),
            +        2 => array(
            +            'void', 'double', 'int', 'boolean', 'byte', 'short', 'long', 'char', 'float'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '[', ']', '{', '}', '*', '&', '%', '!', ';', '<', '>', '?',
            +        '_', ':', '=', '=>', '<<:',
            +        '<%', '>:', '#', '@'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0000ff; font-weight: bold;',
            +            2 => 'color: #9999cc; font-weight: bold;',
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #008000; font-style: italic;',
            +            2 => 'color: #CC66FF;',
            +            'MULTI' => 'color: #00ff00; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #6666ff; font-weight: bold;',
            +            1 => 'color: #6666ff; font-weight: bold;',
            +            2 => 'color: #5555ff; font-weight: bold;',
            +            3 => 'color: #4444ff; font-weight: bold;',
            +            4 => 'color: #3333ff; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #F78811;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #6666FF;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #F78811;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #000000;',
            +            2 => 'color: #000000;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #000080;'
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => 'http://scala-lang.org',
            +        2 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/scheme.php b/vendor/easybook/geshi/geshi/scheme.php
            new file mode 100644
            index 0000000000..59870846b3
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/scheme.php
            @@ -0,0 +1,168 @@
            + 'Scheme',
            +    'COMMENT_SINGLE' => array(1 => ';'),
            +    'COMMENT_MULTI' => array('#|' => '|#'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'abs', 'acos', 'and', 'angle', 'append', 'appply', 'approximate',
            +            'asin', 'assoc', 'assq', 'assv', 'atan',
            +
            +            'begin', 'boolean?', 'bound-identifier=?',
            +
            +            'caar', 'caddr', 'cadr', 'call-with-current-continuation',
            +            'call-with-input-file', 'call-with-output-file', 'call/cc', 'car',
            +            'case', 'catch', 'cdddar', 'cddddr', 'cdr', 'ceiling', 'char->integer',
            +            'char-alphabetic?', 'char-ci<=?', 'char-ci=?',
            +            'char-ci>?', 'char-ci=?', 'char-downcase', 'char-lower-case?',
            +            'char-numeric', 'char-ready', 'char-ready?', 'char-upcase',
            +            'char-upper-case?', 'char-whitespace?', 'char<=?', 'char=?', 'char>?', 'char?', 'close-input-port', 'close-output-port',
            +            'complex?', 'cond', 'cons', 'construct-identifier', 'cos',
            +            'current-input-port', 'current-output-port',
            +
            +            'd', 'define', 'define-syntax', 'delay', 'denominator', 'display', 'do',
            +
            +            'e', 'eof-object?', 'eq?', 'equal?', 'eqv?', 'even?', 'exact->inexact',
            +            'exact?', 'exp', 'expt', 'else',
            +
            +            'f', 'floor', 'for-each', 'force', 'free-identifer=?',
            +
            +            'gcd', 'gen-counter', 'gen-loser', 'generate-identifier',
            +
            +            'identifier->symbol', 'identifier', 'if', 'imag-part', 'inexact->exact',
            +            'inexact?', 'input-port?', 'integer->char', 'integer?', 'integrate-system',
            +
            +            'l', 'lambda', 'last-pair', 'lcm', 'length', 'let', 'let*', 'letrec',
            +            'list', 'list->string', 'list->vector', 'list-ref', 'list-tail', 'list?',
            +            'load', 'log',
            +
            +            'magnitude', 'make-polar', 'make-promise', 'make-rectangular',
            +            'make-string', 'make-vector', 'map', 'map-streams', 'max', 'member',
            +            'memq', 'memv', 'min', 'modulo',
            +
            +            'negative', 'newline', 'nil', 'not', 'null?', 'number->string', 'number?',
            +            'numerator',
            +
            +            'odd?', 'open-input-file', 'open-output-file', 'or', 'output-port',
            +
            +            'pair?', 'peek-char', 'positive?', 'procedure?',
            +
            +            'quasiquote', 'quote', 'quotient',
            +
            +            'rational', 'rationalize', 'read', 'read-char', 'real-part', 'real?',
            +            'remainder', 'return', 'reverse',
            +
            +            's', 'sequence', 'set!', 'set-char!', 'set-cdr!', 'sin', 'sqrt', 'string',
            +            'string->list', 'string->number', 'string->symbol', 'string-append',
            +            'string-ci<=?', 'string-ci=?',
            +            'string-ci>?', 'string-copy', 'string-fill!', 'string-length',
            +            'string-ref', 'string-set!', 'string<=?', 'string=?', 'string>?', 'string?', 'substring', 'symbol->string',
            +            'symbol?', 'syntax', 'syntax-rules',
            +
            +            't', 'tan', 'template', 'transcript-off', 'transcript-on', 'truncate',
            +
            +            'unquote', 'unquote-splicing', 'unwrap-syntax',
            +
            +            'vector', 'vector->list', 'vector-fill!', 'vector-length', 'vector-ref',
            +            'vector-set!', 'vector?',
            +
            +            'with-input-from-file', 'with-output-to-file', 'write', 'write-char',
            +
            +            'zero?'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '{', '}', '[', ']', '!', '%', '^', '&', '/','+','-','*','=','<','>',';','|'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            0 => 'color: #202020;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/scilab.php b/vendor/easybook/geshi/geshi/scilab.php
            new file mode 100644
            index 0000000000..ebd1637593
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/scilab.php
            @@ -0,0 +1,294 @@
            + 'SciLab',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array(),
            +    'COMMENT_REGEXP' => array(
            +        2 => "/(?<=\)|\]|\w)'/"
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'HARDQUOTE' => array("'", "'"),
            +    'HARDESCAPE' => array(),
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'if', 'else', 'elseif', 'end', 'select', 'case', 'for', 'while', 'break'
            +            ),
            +        2 => array(
            +            'STDIN', 'STDOUT', 'STDERR',
            +            '%i', '%pi', '%e', '%eps', '%nan', '%inf', '%s', '%t', '%f',
            +            'usual', 'polynomial', 'boolean', 'character', 'function', 'rational', 'state-space',
            +            'sparse', 'boolean sparse', 'list', 'tlist', 'library', 'endfunction'
            +            ),
            +        3 => array(
            +            '%asn', '%helps', '%k', '%sn', 'abcd', 'abinv', 'abort', 'about', 'About_M2SCI_tools',
            +            'abs', 'acos', 'acosh', 'acoshm', 'acosm', 'AdCommunications', 'add_demo', 'add_edge',
            +            'add_help_chapter', 'add_node', 'add_palette', 'addcolor', 'addf', 'addinter', 'addmenu',
            +            'adj_lists', 'adj2sp', 'aff2ab', 'alufunctions', 'amell', 'analpf', 'analyze', 'and',
            +            'ans', 'apropos', 'arc_graph', 'arc_number', 'arc_properties', 'argn', 'arhnk', 'arl2',
            +            'arma', 'arma2p', 'armac', 'armax', 'armax1', 'arsimul', 'artest', 'articul', 'ascii',
            +            'asciimat', 'asin', 'asinh', 'asinhm', 'asinm', 'assignation', 'atan', 'atanh', 'atanhm',
            +            'atanm', 'augment', 'auread', 'auwrite', 'axes_properties', 'axis_properties', 'backslash',
            +            'balanc', 'balreal', 'bandwr', 'banner','bar', 'barh', 'barhomogenize', 'basename', 'bdiag',
            +            'beep', 'besselh', 'besseli', 'besselj', 'besselk', 'bessely', 'best_match', 'beta','bezout',
            +            'bifish', 'bilin', 'binomial', 'black', 'bloc2exp', 'bloc2ss', 'bode', 'bool2s',
            +            'boucle', 'brackets', 'browsevar', 'bsplin3val', 'bstap', 'buttmag', 'buttondialog',
            +            'bvode', 'bvodeS', 'c_link', 'cainv', 'calendar', 'calerf', 'calfrq', 'call', 'canon', 'casc',
            +            'cat', 'catch', 'ccontrg', 'cd', 'cdfbet', 'cdfbin', 'cdfchi', 'cdfchn', 'cdff', 'cdffnc',
            +            'cdfgam', 'cdfnbn', 'cdfnor', 'cdfpoi', 'cdft', 'ceil', 'cell', 'cell2mat', 'cellstr', 'center',
            +            'cepstrum', 'chain_struct', 'chaintest', 'champ', 'champ_properties', 'champ1', 'char', 'chart',
            +            'chartooem', 'chdir', 'cheb1mag', 'cheb2mag', 'check_graph', 'chepol', 'chfact', 'chol', 'chsolve',
            +            'circuit', 'classmarkov', 'clc', 'clean', 'clear', 'clear_pixmap', 'clearfun', 'clearglobal','clf',
            +            'clipboard', 'close', 'cls2dls', 'cmb_lin', 'cmndred', 'cmoment', 'code2str', 'coeff', 'coff', 'coffg',
            +            'colcomp', 'colcompr', 'colinout', 'colon', 'color', 'color_list', 'colorbar', 'colordef', 'colormap',
            +            'colregul', 'comma', 'comments', 'comp', 'companion', 'comparison', 'Compound_properties', 'con_nodes',
            +            'cond', 'config', 'configure_msvc', 'conj', 'connex', 'console', 'cont_frm', 'cont_mat', 'Contents',
            +            'continue', 'contour', 'contour2d', 'contour2di', 'contourf', 'contr', 'contract_edge', 'contrss',
            +            'convex_hull', 'convol', 'convstr', 'copfac', 'copy', 'corr', 'correl', 'cos', 'cosh', 'coshm',
            +            'cosm', 'cotg', 'coth', 'cothm', 'covar', 'create_palette', 'cshep2d', 'csim', 'cspect', 'Cste',
            +            'ctr_gram', 'cumprod', 'cumsum', 'cycle_basis', 'czt', 'dasrt', 'dassl', 'datafit', 'date', 'datenum',
            +            'datevec', 'dbphi', 'dcf', 'ddp', 'debug', 'dec2hex', 'deff', 'definedfields', 'degree', 'delbpt',
            +            'delete', 'delete_arcs', 'delete_nodes', 'delip', 'delmenu', 'demoplay', 'denom', 'derivat', 'derivative',
            +            'des2ss', 'des2tf', 'det', 'determ', 'detr', 'detrend', 'dft', 'dhinf', 'dhnorm', 'diag', 'diary',
            +            'diff', 'diophant', 'dir', 'dirname', 'disp', 'dispbpt', 'dispfiles', 'dlgamma', 'dnaupd', 'do', 'dot',
            +            'double', 'dragrect', 'draw', 'drawaxis', 'drawlater', 'drawnow', 'driver', 'dsaupd', 'dscr',
            +            'dsearch', 'dsimul', 'dt_ility', 'dtsi', 'edge_number', 'edit', 'edit_curv', 'edit_error',
            +            'edit_graph', 'edit_graph_menus', 'editvar', 'eigenmarkov', 'ell1mag',
            +            'empty', 'emptystr', 'eqfir', 'eqiir', 'equal', 'Equal', 'equil', 'equil1',
            +            'ereduc', 'erf', 'erfc', 'erfcx', 'errbar', 'errcatch', 'errclear', 'error', 'error_table', 'etime',
            +            'eval', 'eval_cshep2d', 'eval3d', 'eval3dp', 'evans', 'evstr', 'excel2sci', 'exec', 'execstr', 'exists',
            +            'exit', 'exp', 'expm', 'external', 'extraction', 'eye', 'fac3d', 'factorial', 'factors', 'faurre', 'fchamp',
            +            'fcontour', 'fcontour2d', 'fec', 'fec_properties', 'feedback', 'feval', 'ffilt', 'fft', 'fft2', 'fftshift',
            +            'fgrayplot', 'figure', 'figure_properties', 'figure_style', 'file', 'fileinfo', 'fileparts', 'filter', 'find',
            +            'find_freq', 'find_path', 'findABCD', 'findAC', 'findBD', 'findBDK', 'findm', 'findmsvccompiler', 'findobj',
            +            'findR', 'findx0BD', 'firstnonsingleton', 'fit_dat', 'fix', 'floor', 'flts', 'foo', 'format',
            +            'formatman', 'fort', 'fourplan', 'fplot2d', 'fplot3d', 'fplot3d1', 'fprintf', 'fprintfMat', 'frep2tf',
            +            'freq', 'freson', 'frexp', 'frfit', 'frmag', 'fscanf', 'fscanfMat', 'fsfirlin', 'fsolve', 'fspecg',
            +            'fstabst', 'fstair', 'ftest', 'ftuneq', 'full', 'fullfile', 'fullrf', 'fullrfk', 'fun2string', 'Funcall',
            +            'funcprot', 'functions', 'funptr', 'fusee', 'G_make', 'g_margin', 'gainplot', 'gamitg',
            +            'gamma', 'gammaln', 'gca', 'gcare', 'gcd', 'gce', 'gcf', 'gda', 'gdf', 'gen_net', 'genfac3d', 'genlib',
            +            'genmarkov', 'geom3d', 'geomean', 'get', 'get_contents_infer', 'get_function_path', 'getcolor', 'getcwd',
            +            'getd', 'getdate', 'getenv', 'getf', 'getfield', 'getfont', 'gethistory', 'getio', 'getlinestyle',
            +            'getlongpathname', 'getmark', 'getmemory', 'getos', 'getpid', 'getscilabkeywords', 'getshell',
            +            'getshortpathname', 'getsymbol', 'getvalue', 'getversion', 'gfare', 'gfrancis', 'girth', 'givens',
            +            'glever', 'glist', 'global', 'GlobalProperty', 'glue', 'gmres', 'gpeche', 'gr_menu', 'graduate', 'grand',
            +            'graph_2_mat', 'graph_center', 'graph_complement', 'graph_diameter', 'graph_power', 'graph_simp', 'graph_sum',
            +            'graph_union', 'graphic', 'Graphics', 'graphics_entities', 'graph-list', 'graycolormap', 'grayplot',
            +            'grayplot_properties', 'graypolarplot', 'great', 'grep', 'group', 'gschur', 'gsort', 'gspec', 'gstacksize',
            +            'gtild', 'h_cl', 'h_inf', 'h_inf_st', 'h_norm', 'h2norm', 'halt', 'hamilton', 'hank', 'hankelsv', 'harmean',
            +            'hat', 'havewindow', 'head_comments', 'help', 'help_skeleton', 'hermit', 'hess', 'hex2dec', 'hilb', 'hinf',
            +            'hist3d', 'histplot', 'horner', 'host', 'hotcolormap', 'householder', 'hrmt', 'hsv2rgb', 'hsvcolormap',
            +            'htrianr', 'hypermat', 'hypermatrices', 'iconvert', 'ieee', 'ifft', 'iir', 'iirgroup', 'iirlp',
            +            'ilib_build', 'ilib_compile', 'ilib_for_link', 'ilib_gen_gateway', 'ilib_gen_loader', 'ilib_gen_Make',
            +            'im_inv', 'imag', 'impl', 'imrep2ss', 'imult', 'ind2sub', 'Infer', 'inistate', 'input', 'insertion', 'int',
            +            'int16', 'int2d', 'int32', 'int3d', 'int8', 'intc', 'intdec', 'integrate', 'interp', 'interp1', 'interp2d',
            +            'interp3d', 'interpln', 'intersci', 'intersect', 'intg', 'intl', 'intppty', 'intsplin', 'inttrap', 'inttype',
            +            'inv', 'inv_coeff', 'invr', 'invsyslin', 'iqr', 'is_connex', 'iscellstr', 'isdef', 'isdir', 'isempty',
            +            'isequal', 'isequalbitwise', 'iserror', 'isglobal', 'isinf', 'isnan', 'isoview', 'isreal', 'javasci',
            +            'jetcolormap', 'jmat', 'justify', 'kalm', 'karmarkar', 'kernel', 'keyboard', 'knapsack', 'kpure', 'krac2',
            +            'kron', 'kroneck', 'label_properties', 'labostat', 'LANGUAGE', 'lasterror', 'lattn', 'lattp', 'lcf', 'lcm',
            +            'lcmdiag', 'ldiv', 'ldivf', 'leastsq', 'left', 'legend', 'legend_properties', 'legendre', 'legends', 'length',
            +            'leqr', 'less', 'lev', 'levin', 'lex_sort', 'lft', 'lgfft', 'lib', 'lin', 'lin2mu', 'lindquist',
            +            'line_graph', 'linear_interpn', 'lines', 'LineSpec', 'linf', 'linfn', 'link', 'linmeq', 'linpro', 'linsolve',
            +            'linspace', 'listfiles', 'listvarinfile', 'lmisolver', 'lmitool', 'load', 'load_graph', 'loadhistory',
            +            'loadmatfile', 'loadplots', 'loadwave', 'locate', 'log', 'log10', 'log1p', 'log2', 'logm', 'logspace',
            +            'lotest', 'lqe', 'lqg', 'lqg_ltr', 'lqg2stan', 'lqr', 'ls', 'lsq', 'lsq_splin', 'lsqrsolve', 'lsslist',
            +            'lstcat', 'lstsize', 'ltitr', 'lu', 'ludel', 'lufact', 'luget', 'lusolve', 'lyap', 'm_circle', 'm2scideclare',
            +            'macglov', 'macr2lst', 'macr2tree', 'macro', 'macrovar', 'mad', 'make_graph', 'make_index', 'makecell', 'man',
            +            'manedit', 'mapsound', 'markp2ss', 'mat_2_graph', 'matfile2sci', 'Matlab-Scilab_character_strings', 'Matplot',
            +            'Matplot_properties', 'Matplot1', 'matrices', 'matrix', 'max', 'max_cap_path', 'max_clique', 'max_flow',
            +            'maxi', 'mcisendstring', 'mclearerr', 'mclose', 'mdelete', 'mean', 'meanf', 'median', 'menus', 'meof',
            +            'merror', 'mese', 'mesh', 'mesh2d', 'meshgrid', 'mfft', 'mfile2sci', 'mfprintf', 'mfscanf', 'mget', 'mgeti',
            +            'mgetl', 'mgetstr', 'milk_drop', 'min', 'min_lcost_cflow', 'min_lcost_flow1', 'min_lcost_flow2',
            +            'min_qcost_flow', 'min_weight_tree', 'mine', 'mini', 'minreal', 'minss', 'minus', 'mkdir', 'mlist', 'mode',
            +            'modulo', 'moment', 'mopen', 'move', 'mprintf', 'mps2linpro', 'mput', 'mputl', 'mputstr', 'mrfit', 'mscanf',
            +            'msd', 'mseek', 'msprintf', 'msscanf', 'mstr2sci', 'mtell', 'mtlb_0', 'mtlb_a', 'mtlb_all', 'mtlb_any',
            +            'mtlb_axis', 'mtlb_beta', 'mtlb_box', 'mtlb_close', 'mtlb_colordef', 'mtlb_conv', 'mtlb_cumprod', 'mtlb_cumsum',
            +            'mtlb_dec2hex', 'mtlb_delete', 'mtlb_diag', 'mtlb_diff', 'mtlb_dir', 'mtlb_double', 'mtlb_e', 'mtlb_echo',
            +            'mtlb_eig', 'mtlb_eval', 'mtlb_exist', 'mtlb_eye', 'mtlb_false', 'mtlb_fft', 'mtlb_fftshift', 'mtlb_find',
            +            'mtlb_findstr', 'mtlb_fliplr', 'mtlb_fopen', 'mtlb_format', 'mtlb_fprintf', 'mtlb_fread', 'mtlb_fscanf',
            +            'mtlb_full', 'mtlb_fwrite', 'mtlb_grid', 'mtlb_hold', 'mtlb_i', 'mtlb_ifft', 'mtlb_imp', 'mtlb_int16',
            +            'mtlb_int32', 'mtlb_int8', 'mtlb_is', 'mtlb_isa', 'mtlb_isfield', 'mtlb_isletter', 'mtlb_isspace', 'mtlb_l',
            +            'mtlb_legendre', 'mtlb_linspace', 'mtlb_load', 'mtlb_logic', 'mtlb_logical', 'mtlb_lower', 'mtlb_max',
            +            'mtlb_min', 'mtlb_mode', 'mtlb_more', 'mtlb_num2str', 'mtlb_ones', 'mtlb_plot', 'mtlb_prod', 'mtlb_rand',
            +            'mtlb_randn', 'mtlb_rcond', 'mtlb_realmax', 'mtlb_realmin', 'mtlb_repmat', 'mtlb_s', 'mtlb_save',
            +            'mtlb_setstr', 'mtlb_size', 'mtlb_sort', 'mtlb_sparse', 'mtlb_strcmp', 'mtlb_strcmpi', 'mtlb_strfind',
            +            'mtlb_strrep', 'mtlb_sum', 'mtlb_t', 'mtlb_toeplitz', 'mtlb_tril', 'mtlb_triu', 'mtlb_true', 'mtlb_uint16',
            +            'mtlb_uint32', 'mtlb_uint8', 'mtlb_upper', 'mtlb_zeros', 'mu2lin', 'mucomp', 'mulf', 'mvvacov', 'name2rgb',
            +            'names', 'nancumsum', 'nand2mean', 'nanmax', 'nanmean', 'nanmeanf', 'nanmedian', 'nanmin', 'nanstdev',
            +            'nansum', 'narsimul', 'NDcost', 'ndgrid', 'ndims', 'nearfloat', 'nehari', 'neighbors', 'netclose', 'netwindow',
            +            'netwindows', 'new', 'newaxes', 'newest', 'newfun', 'nextpow2', 'nf3d', 'nfreq', 'nlev', 'nnz', 'node_number',
            +            'nodes_2_path', 'nodes_degrees', 'noisegen', 'norm', 'not', 'null', 'number_properties', 'numdiff', 'numer',
            +            'nyquist', 'object_editor', 'obs_gram', 'obscont', 'obscont1', 'observer', 'obsv_mat', 'obsvss', 'ode',
            +            'ode_discrete', 'ode_optional_output', 'ode_root', 'odedc', 'odeoptions', 'oemtochar', 'old_style',
            +            'oldbesseli', 'oldbesselj', 'oldbesselk', 'oldbessely', 'oldload', 'oldplot', 'oldsave', 'ones',
            +            'Operation', 'optim', 'or', 'orth', 'overloading', 'p_margin', 'param3d', 'param3d_properties',
            +            'param3d1', 'paramfplot2d', 'parents', 'parrot', 'part', 'path_2_nodes', 'pathconvert', 'pause', 'pbig',
            +            'pca', 'pcg', 'pdiv', 'pen2ea', 'pencan', 'penlaur', 'percent', 'perctl', 'perfect_match', 'perl',
            +            'perms', 'permute', 'pertrans', 'pfss', 'phasemag', 'phc', 'pie', 'pinv', 'pipe_network', 'playsnd', 'plot',
            +            'plot_graph', 'plot2d', 'plot2d_old_version', 'plot2d1', 'plot2d2', 'plot2d3', 'plot2d4', 'plot3d',
            +            'plot3d_old_version', 'plot3d1', 'plot3d2', 'plot3d3', 'plotframe', 'plotprofile', 'plus', 'plzr',
            +            'pmodulo', 'pol2des', 'pol2str', 'pol2tex', 'polar', 'polarplot', 'polfact', 'poly', 'polyline_properties',
            +            'portr3d', 'portrait', 'power', 'ppol', 'prbs_a', 'predecessors', 'predef', 'print', 'printf',
            +            'printf_conversion', 'printing', 'printsetupbox', 'prod', 'profile', 'progressionbar', 'proj', 'projsl',
            +            'projspec', 'psmall', 'pspect', 'pvm', 'pvm_addhosts', 'pvm_barrier', 'pvm_bcast', 'pvm_bufinfo', 'pvm_config',
            +            'pvm_delhosts', 'pvm_error', 'pvm_exit', 'pvm_f772sci', 'pvm_get_timer', 'pvm_getinst', 'pvm_gettid',
            +            'pvm_gsize', 'pvm_halt', 'pvm_joingroup', 'pvm_kill', 'pvm_lvgroup', 'pvm_mytid', 'pvm_parent', 'pvm_probe',
            +            'pvm_recv', 'pvm_reduce', 'pvm_sci2f77', 'pvm_send', 'pvm_set_timer', 'pvm_spawn', 'pvm_spawn_independent',
            +            'pvm_start', 'pvm_tasks', 'pvm_tidtohost', 'pvmd3', 'pwd', 'qassign', 'qld', 'qmr', 'qr', 'quapro', 'quart',
            +            'quaskro', 'quit', 'quote', 'rand', 'randpencil', 'range', 'rank', 'rankqr', 'rat',  'rcond',
            +            'rdivf', 'read', 'read4b', 'readb', 'readc_', 'readmps', 'readxls', 'real', 'realtime', 'realtimeinit',
            +            'rectangle_properties', 'recur', 'reglin', 'regress', 'remez', 'remezb', 'repfreq', 'replot', 'resethistory',
            +            'residu', 'resume', 'return', 'rgb2name', 'ric_desc', 'ricc', 'riccati', 'rlist', 'rmdir', 'roots', 'rotate',
            +            'round', 'routh_t', 'rowcomp', 'rowcompr', 'rowinout', 'rowregul', 'rowshuff', 'rpem', 'rref', 'rtitr',
            +            'rubberbox', 'salesman', 'sample', 'samplef', 'samwr', 'save', 'save_format', 'save_graph', 'savehistory',
            +            'savematfile', 'savewave', 'sca', 'scaling', 'scanf', 'scanf_conversion', 'scf', 'schur', 'sci_files',
            +            'sci2exp', 'sci2for', 'sci2map', 'sciargs', 'SciComplex', 'SciComplexArray', 'SciDouble', 'SciDoubleArray',
            +            'scilab', 'Scilab', 'ScilabEval', 'scilink', 'scipad', 'SciString', 'SciStringArray', 'sd2sci', 'sda', 'sdf',
            +            'secto3d', 'segs_properties', 'semi', 'semicolon', 'semidef', 'sensi', 'set', 'set_posfig_dim',
            +            'setbpt', 'setdiff', 'setenv', 'seteventhandler', 'setfield', 'sethomedirectory', 'setlanguage', 'setmenu',
            +            'sfact', 'Sfgrayplot', 'Sgrayplot', 'sgrid', 'shortest_path', 'show_arcs', 'show_graph', 'show_nodes',
            +            'show_pixmap', 'showprofile', 'sident', 'sign', 'Signal', 'signm', 'simp', 'simp_mode', 'sin', 'sinc',
            +            'sincd', 'sinh', 'sinhm', 'sinm', 'size', 'slash', 'sleep', 'sm2des', 'sm2ss', 'smooth', 'solve',
            +            'sorder', 'sort', 'sound', 'soundsec', 'sp2adj', 'spaninter', 'spanplus', 'spantwo', 'spchol',
            +            'spcompack', 'spec', 'specfact', 'speye', 'spget', 'splin', 'splin2d', 'splin3d', 'split_edge', 'spones',
            +            'sprand', 'sprintf', 'spzeros', 'sqroot', 'sqrt', 'sqrtm', 'square', 'squarewave', 'srfaur', 'srkf', 'ss2des',
            +            'ss2ss', 'ss2tf', 'sscanf', 'sskf', 'ssprint', 'ssrand', 'st_deviation', 'st_ility', 'stabil', 'stacksize',
            +            'star', 'startup', 'stdev', 'stdevf', 'str2code', 'strange', 'strcat', 'strindex', 'string', 'stringbox',
            +            'strings', 'stripblanks', 'strong_con_nodes', 'strong_connex', 'strsplit', 'strsubst', 'struct', 'sub2ind',
            +            'subf', 'subgraph', 'subplot', 'successors', 'sum', 'supernode', 'surf', 'surface_properties', 'sva',
            +            'svd', 'svplot', 'sylm', 'sylv', 'symbols', 'sysconv', 'sysdiag', 'sysfact', 'syslin', 'syssize', 'system',
            +            'systems', 'systmat', 'tabul', 'tan', 'tangent', 'tanh', 'tanhm', 'tanm', 'TCL_CreateSlave', 'TCL_DeleteInterp',
            +            'TCL_EvalFile', 'TCL_EvalStr', 'TCL_ExistInterp', 'TCL_ExistVar', 'TCL_GetVar', 'TCL_GetVersion', 'TCL_SetVar',
            +            'TCL_UnsetVar', 'TCL_UpVar', 'tdinit', 'testmatrix', 'texprint', 'text_properties', 'tf2des', 'tf2ss', 'then',
            +            'thrownan', 'tic', 'tilda', 'time_id', 'timer', 'title', 'titlepage', 'TK_EvalFile', 'TK_EvalStr', 'tk_getdir',
            +            'tk_getfile', 'TK_GetVar', 'tk_savefile', 'TK_SetVar',  'toc', 'toeplitz', 'tohome', 'tokenpos',
            +            'tokens', 'toolbar', 'toprint', 'trace', 'trans', 'trans_closure', 'translatepaths', 'tree2code', 'trfmod',
            +            'trianfml', 'tril', 'trimmean', 'trisolve', 'triu', 'try', 'trzeros', 'twinkle', 'type', 'Type', 'typename',
            +            'typeof', 'ui_observer', 'uicontrol', 'uimenu', 'uint16', 'uint32', 'uint8', 'ulink', 'unglue', 'union',
            +            'unique', 'unix', 'unix_g', 'unix_s', 'unix_w', 'unix_x', 'unobs', 'unsetmenu', 'unzoom', 'user', 'varargin',
            +            'varargout', 'Variable', 'variance', 'variancef', 'varn', 'vectorfind', 'waitbar', 'warning', 'wavread',
            +            'wavwrite', 'wcenter', 'wfir', 'what', 'where', 'whereami', 'whereis', 'who', 'who_user', 'whos',
            +            'wiener', 'wigner', 'winclose', 'window', 'winlist', 'winopen', 'winqueryreg', 'winsid', 'with_atlas',
            +            'with_gtk', 'with_javasci', 'with_pvm', 'with_texmacs', 'with_tk', 'writb', 'write', 'write4b', 'x_choices',
            +            'x_choose', 'x_dialog', 'x_matrix', 'x_mdialog', 'x_message', 'x_message_modeless', 'xarc', 'xarcs', 'xarrows',
            +            'xaxis', 'xbasc', 'xbasimp', 'xbasr', 'xchange', 'xclea', 'xclear', 'xclick', 'xclip', 'xdel', 'xend',
            +            'xfarc', 'xfarcs', 'xfpoly', 'xfpolys', 'xfrect', 'xget', 'xgetech', 'xgetfile', 'xgetmouse', 'xgraduate',
            +            'xgrid', 'xinfo', 'xinit', 'xlfont', 'xload', 'xls_open', 'xls_read', 'xmltohtml', 'xname', 'xnumb', 'xpause',
            +            'xpoly', 'xpolys', 'xrect', 'xrects', 'xrpoly', 'xs2bmp', 'xs2emf', 'xs2eps', 'xs2fig', 'xs2gif', 'xs2ppm',
            +            'xs2ps', 'xsave', 'xsegs', 'xselect', 'xset', 'xsetech', 'xsetm', 'xstring', 'xstringb', 'xstringl', 'xtape',
            +            'xtitle', 'yulewalk', 'zeropen', 'zeros', 'zgrid', 'zoom_rect', 'zpbutt', 'zpch1', 'zpch2', 'zpell'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '<', '>', '=',
            +        '!', '@', '~', '&', '|',
            +        '+','-', '*', '/', '%',
            +        ',', ';', '?', ':', "'"
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => true,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;',
            +            2 => 'color: #000000; font-weight: bold;',
            +            3 => 'color: #000066;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; font-style: italic;',
            +            2 => '',
            +            'MULTI' => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;',
            +            'HARD' => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;',
            +            'HARD' => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #006600;',
            +            2 => 'color: #006600;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #339933;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #0000ff;',
            +            4 => 'color: #009999;',
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => 'http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm',
            +        2 => 'http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm',
            +        3 => 'http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm'
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '->',
            +        2 => '::'
            +        ),
            +    'REGEXPS' => array(
            +        //Variable
            +        0 => '[\\$%@]+[a-zA-Z_][a-zA-Z0-9_]*',
            +        //File Descriptor
            +        4 => '<[a-zA-Z_][a-zA-Z0-9_]*>',
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/scl.php b/vendor/easybook/geshi/geshi/scl.php
            new file mode 100644
            index 0000000000..6b0e494f2a
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/scl.php
            @@ -0,0 +1,148 @@
            +
            + * ---------------------------------
            + * Author: Leonhard Hösch (leonhard.hoesch@siemens.com)
            + * Copyright: (c) 2008 by Leonhard Hösch (siemens.de)
            + * Release Version: 1.0.8.12
            + * Date Started: 2012/09/25
            + *
            + * SCL language file for GeSHi.
            + *
            + * A SCL langauge file.
            + *
            + * CHANGES
            + * -------
            + *  ()
            + *  -  First Release
            + *
            + * TODO (updated )
            + * -------------------------
            + * 
            + *
            + *************************************************************************************
            + *
            + *     This file is part of GeSHi.
            + *
            + *   GeSHi is free software; you can redistribute it and/or modify
            + *   it under the terms of the GNU General Public License as published by
            + *   the Free Software Foundation; either version 2 of the License, or
            + *   (at your option) any later version.
            + *
            + *   GeSHi is distributed in the hope that it will be useful,
            + *   but WITHOUT ANY WARRANTY; without even the implied warranty of
            + *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
            + *   GNU General Public License for more details.
            + *
            + *   You should have received a copy of the GNU General Public License
            + *   along with GeSHi; if not, write to the Free Software
            + *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
            + *
            + ************************************************************************************/
            +
            +$language_data = array (
            +    'LANG_NAME' => 'SCL',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array('(*' => '*)'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_UPPER,
            +    'QUOTEMARKS' => array("'"),
            +    'ESCAPE_CHAR' => '$',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'AND','ANY','ARRAY','AT','BEGIN','BLOCK_DB','BLOCK_FB','BLOCK_FC','BLOCK_SDB',
            +            'BLOCK_SFB','BLOCK_SFC','BOOL','BY','BYTE','CASE','CHAR','CONST','CONTINUE','COUNTER',
            +            'DATA_BLOCK','DATE','DATE_AND_TIME','DINT','DIV','DO','DT','DWORD','ELSE','ELSIF',
            +            'EN','END_CASE','END_CONST','END_DATA_BLOCK','END_FOR','END_FUNCTION',
            +            'END_FUNCTION_BLOCK','END_IF','END_LABEL','END_TYPE','END_ORGANIZATION_BLOCK',
            +            'END_REPEAT','END_STRUCT','END_VAR','END_WHILE','ENO','EXIT','FALSE','FOR','FUNCTION',
            +            'FUNCTION_BLOCK','GOTO','IF','INT','LABEL','MOD','NIL','NOT','OF','OK','OR',
            +            'ORGANIZATION_BLOCK','POINTER','PROGRAM','REAL','REPEAT','RETURN','S5TIME','STRING',
            +            'STRUCT','THEN','TIME','TIMER','TIME_OF_DAY','TO','TOD','TRUE','TYPE','VAR',
            +            'VAR_TEMP','UNTIL','VAR_INPUT','VAR_IN_OUT','VAR_OUTPUT','VOID','WHILE','WORD','XOR'
            +            ),
            +        2 =>array(
            +            'UBLKMOV','FILL','CREAT_DB','DEL_DB','TEST_DB','COMPRESS','REPL_VAL','CREA_DBL','READ_DBL',
            +            'WRIT_DBL','CREA_DB','RE_TRIGR','STP','WAIT','MP_ALM','CiR','PROTECT','SET_CLK','READ_CLK',
            +            'SNC_RTCB','SET_CLKS','RTM','SET_RTM','CTRL_RTM','READ_RTM','TIME_TCK','RD_DPARM',
            +            'RD_DPARA','WR_PARM','WR_DPARM','PARM_MOD','WR_REC','RD_REC','RD_DPAR','RDREC','WRREC','RALRM',
            +            'SALRM','RCVREC','PRVREC','SET_TINT','CAN_TINT','ACT_TINT','QRY_TINT','SRT_DINT','QRY_DINT',
            +            'CAN_DINT','MSK_FLT','DMSK_FLT','READ_ERR','DIS_IRT','EN_IRT','DIS_AIRT','EN_AIRT','RD_SINFO',
            +            'RDSYSST','WR_USMSG','OB_RT','C_DIAG','DP_TOPOL','UPDAT_PI','UPDAT_PO','SYNC_PI','SYNC_PO',
            +            'SET','RSET','DRUM','GADR_LGC','LGC_GADR','RD_LGADR','GEO_LOG','LOG_GEO','DP_PRAL','DPSYC_FR',
            +            'D_ACT_DP','DPNRM_DG','DPRD_DAT','DPWR_DAT','PN_IN','PN_OUT','PN_DP','WWW','IP_CONF','GETIO',
            +            'SETIO','GETIO_PART','SETIO_PART','GD_SND','GD_RCV','USEND','URCV','BSEND','BRCV','PUT','GET',
            +            'PRINT','START','STOP','RESUME','STATUS','USTATUS','CONTROL','C_CNTRL','X_SEND','X_RCV',
            +            'X_GET','X_PUT','X_ABORT','I_GET','I_PUT','I_ABORT','TCON','TDISCON','TSEND','TRCV','TUSEND',
            +            'TURCV','NOTIFY','NOTIFY_8P','ALARM','ALARM_8P','ALARM_8','AR_SEND','DIS_MSG','EN_MSG',
            +            'ALARM_SQ','ALARM_S','ALARM_SC','ALARM_DQ','LARM_D','READ_SI','DEL_SI','TP','TON','TOF','CTU',
            +            'CTD','CTUD','CONT_C','CONT_S','PULSEGEN','Analog','DIGITAL','COUNT','FREQUENC','PULSE',
            +            'SEND_PTP','RECV_PTP','RES_RECV','SEND_RK','FETCH_RK','SERVE_RK','H_CTRL','state'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '.', '"', '|', ';', ',', '=>', '>=', '<=', ':=', '=', '<', '>'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0000ff;',
            +            2 => 'color: #ff6f00;',
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #009600; font-style: italic;',
            +            'MULTI' => 'color: #009600; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            0 => 'color: #006600;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            0 => '',
            +            1 => '',
            +            2 => '',
            +            3 => ''
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => ''
            +        ),
            +    'NUMBERS' => GESHI_NUMBER_INT_BASIC,
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '',
            +        2 => ''
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        0 => array(
            +            ' '!!11?>'
            +            ),
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        0 => false,
            +        ),
            +    'TAB_WIDTH' => 4
            +);
            diff --git a/vendor/easybook/geshi/geshi/sdlbasic.php b/vendor/easybook/geshi/geshi/sdlbasic.php
            new file mode 100644
            index 0000000000..b95003fccd
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/sdlbasic.php
            @@ -0,0 +1,163 @@
            + 'sdlBasic',
            +    'COMMENT_SINGLE' => array(1 => "'", 2 => "rem", 3 => "!", 4 => "#"),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'const', 'option', 'explicit', 'qbasic', 'include', 'argc',
            +            'argv', 'command', 'command$', 'run', 'shell', 'os', 'declare',
            +            'sub', 'function', 'return', 'while', 'wend', 'exit', 'end',
            +            'continue', 'if', 'then', 'else', 'elseif',
            +            'select', 'case', 'for', 'each', 'step',
            +            'next', 'to', 'dim', 'shared', 'common', 'lbound', 'bound',
            +            'erase', 'asc', 'chr', 'chr$', 'insert', 'insert$', 'instr', 'lcase',
            +            'lcase$', 'left', 'left$', 'len', 'length', 'ltrim', 'ltrim$', 'mid',
            +            'mid$', 'replace', 'replace$', 'replacesubstr', 'replacesubstr$',
            +            'reverse', 'reverse$', 'right', 'right$', 'rinstr', 'rtrim', 'rtrim$',
            +            'space', 'space$', 'str', 'str$', 'strf', 'strf$', 'string', 'string$',
            +            'tally', 'trim', 'trim$', 'typeof', 'typeof$', 'ucase', 'ucase$', 'val',
            +            'abs', 'acos', 'andbit', 'asin', 'atan', 'bitwiseand', 'bitwiseor',
            +            'bitwisexor', 'cos', 'exp', 'fix', 'floor', 'frac', 'hex', 'hex$', 'int',
            +            'log', 'min', 'max', 'orbit', 'randomize', 'rnd', 'round', 'sgn', 'sin',
            +            'sqr', 'tan', 'xorbit', 'open', 'as', 'file', 'input', 'close', 'output',
            +            'append', 'eof', 'fileexists', 'filecopy', 'filemove', 'filerename',
            +            'freefile', 'kill', 'loc', 'lof', 'readbyte', 'rename', 'seek',
            +            'writebyte', 'chdir', 'dir', 'dir$', 'direxists', 'dirfirst', 'dirnext',
            +            'mkdir', 'rmdir', 'print', 'date', 'date$', 'time', 'time$', 'ticks',
            +            'data', 'read', 'reservebank', 'freebank', 'copybank', 'loadbank',
            +            'savebank', 'setbank', 'sizebank', 'poke', 'doke', 'loke', 'peek', 'deek',
            +            'leek', 'memcopy', 'setdisplay', 'setcaption', 'caption', 'displaywidth',
            +            'displayheight', 'displaybpp', 'screen', 'directscreen', 'screenopen',
            +            'screenclose', 'screenclone', 'screencopy', 'screenfade', 'screenfadein',
            +            'screencrossfade', 'screenalpha', 'screenlock', 'screenunlock',
            +            'screenrect', 'xscreenrect', 'yscreenrect', 'wscreenrect', 'hscreenrect',
            +            'flagscreenrect', 'screenwidth', 'screenheight', 'offset', 'xoffset',
            +            'yoffset', 'cls', 'screenswap', 'autoback', 'setautoback',
            +            'dualplayfield', 'waitvbl', 'fps', 'rgb', 'enablepalette', 'color',
            +            'palette', 'colorcycling', 'ink', 'point', 'dot', 'plot', 'line', 'box',
            +            'bar', 'circle', 'fillcircle', 'ellipse', 'fillellipse', 'paint',
            +            'loadimage', 'saveimage', 'loadsound', 'savesound', 'loadmusic',
            +            'hotspot', 'setcolorkey', 'imageexists', 'imagewidth', 'imageheight',
            +            'deleteimage', 'copyimage', 'setalpha', 'zoomimage', 'rotateimage',
            +            'rotozoomimage', 'blt', 'pastebob', 'pasteicon', 'grab', 'spriteclip',
            +            'sprite', 'deletesprite', 'xsprite', 'ysprite', 'spritewidth',
            +            'spriteheight', 'frsprite', 'livesprite', 'spritehit', 'autoupdatesprite',
            +            'updatesprite', 'setbob', 'bob', 'deletebob', 'xbob', 'ybob', 'bobwidth',
            +            'bobheight', 'frbob', 'livebob', 'bobhit', 'autoupdatebob', 'updatebob',
            +            'text', 'setfont', 'textrender', 'pen', 'paper', 'prints', 'locate',
            +            'atx', 'aty', 'curson', 'cursoff', 'inputs', 'zoneinputs',
            +            'isenabledsound', 'soundexists', 'deletesound', 'copysound',
            +            'musicexists', 'playsound', 'volumesound', 'stopsound', 'pausesound',
            +            'resumesound', 'vumetersound', 'positionsound', 'soundchannels',
            +            'playmusic', 'positionmusic', 'stopmusic', 'fademusic', 'pausemusic',
            +            'resumemusic', 'rewindmusic', 'volumemusic', 'speedmusic', 'numdrivescd',
            +            'namecd', 'getfreecd', 'opencd', 'indrivecd', 'trackscd', 'curtrackcd',
            +            'curframecd', 'playcd', 'playtrackscd',
            +            'pausecd', 'resumecd', 'stopcd', 'ejectcd', 'closecd', 'tracktypecd',
            +            'tracklengthcd', 'trackoffsetcd', 'key', 'inkey', 'waitkey', 'xmouse',
            +            'ymouse', 'xmousescreen', 'ymousescreen', 'bmouse', 'changemouse',
            +            'locatemouse', 'mouseshow', 'mousehide', 'mousezone', 'numjoysticks',
            +            'namejoystick', 'numaxesjoystick', 'numballsjoystick', 'numhatsjoystick',
            +            'numbuttonsjoystick', 'getaxisjoystick', 'gethatjoystick',
            +            'getbuttonjoystick', 'xgetballjoystick', 'ygetballjoystick', 'joy',
            +            'bjoy', 'wait', 'timer', 'isenabledsock', 'getfreesock', 'opensock',
            +            'acceptsock', 'isserverready', 'connectsock', 'connectionreadysock',
            +            'isclientready', 'losesock', 'peeksock', 'readsock', 'readbytesock',
            +            'readlinesock', 'writesock', 'writebytesock', 'writelinesock',
            +            'getremoteip', 'getremoteport', 'getlocalip'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080;',
            +            2 => 'color: #808080;',
            +            3 => 'color: #808080;',
            +            4 => 'color: #808080;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099;'
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/smalltalk.php b/vendor/easybook/geshi/geshi/smalltalk.php
            new file mode 100644
            index 0000000000..176a9b00c4
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/smalltalk.php
            @@ -0,0 +1,153 @@
            + 'Smalltalk',
            +    'COMMENT_SINGLE' => array(),
            +    'COMMENT_MULTI' => array('"' => '"'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'"),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'self','super','true','false','nil'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '[', ']', '=' , ':=', '(', ')', '#'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #7f007f;'
            +            ),
            +        'COMMENTS' => array(
            +            'MULTI' => 'color: #007f00; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => ''
            +            ),
            +        'BRACKETS' => array(
            +            0 => ''
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #7f0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #7f0000;'
            +            ),
            +        'METHODS' => array(
            +            0 => ''
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #000066; font-weight:bold;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #0000ff;',
            +            1 => 'color: #7f0000;',
            +            2 => 'color: #7f0000;',
            +            3 => 'color: #00007f;',
            +            5 => 'color: #00007f;',
            +            6 => 'color: #00007f;'
            +            ),
            +        'SCRIPT' => array(
            +            0 => ''
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        0 => array(
            +            GESHI_SEARCH => '([^a-zA-Z0-9_#<])([A-Z]+[a-zA-Z0-9_]*)(?!>)', //class names
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => ''
            +            ),
            +        1 => array(
            +            GESHI_SEARCH => '(#+)([a-zA-Z0-9_]+)', //symbols
            +            GESHI_REPLACE => '\\1\\2',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        2 => array(
            +            GESHI_SEARCH => '(#\s*\([^)]*\))', //array symbols
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        3 => array(
            +            GESHI_SEARCH => '([a-zA-Z0-9_\s]+)', //temporary variables
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '|',
            +            GESHI_AFTER => '|'
            +            ),
            +        5 => array(
            +            GESHI_SEARCH => '([:(,=[.*\/+-]\s*(?!\d+\/))([a-zA-Z0-9_]+)', //message parameters, message receivers
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => 's',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => ''
            +            ),
            +        6 => array(
            +            GESHI_SEARCH => '([a-zA-Z0-9_]+)(\s*:=)', //assignment targets
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => '\\2'
            +            )
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/smarty.php b/vendor/easybook/geshi/geshi/smarty.php
            new file mode 100644
            index 0000000000..883b3eb7c9
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/smarty.php
            @@ -0,0 +1,190 @@
            + 'Smarty',
            +    'COMMENT_SINGLE' => array(),
            +    'COMMENT_MULTI' => array('{*' => '*}'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            '$smarty', 'now', 'const', 'capture', 'config', 'section', 'foreach', 'template', 'version', 'ldelim', 'rdelim',
            +            'foreachelse', 'include', 'include_php', 'insert', 'if', 'elseif', 'else', 'php',
            +            'sectionelse', 'is_cached',
            +            ),
            +        2 => array(
            +            'capitalize', 'count_characters', 'cat', 'count_paragraphs', 'count_sentences', 'count_words', 'date_format',
            +            'default', 'escape', 'indent', 'lower', 'nl2br', 'regex_replace', 'replace', 'spacify', 'string_format',
            +            'strip', 'strip_tags', 'truncate', 'upper', 'wordwrap',
            +            ),
            +        3 => array(
            +            'counter', 'cycle', 'debug', 'eval', 'html_checkboxes', 'html_image', 'html_options',
            +            'html_radios', 'html_select_date', 'html_select_time', 'html_table', 'math', 'mailto', 'popup_init',
            +            'popup', 'textformat'
            +            ),
            +        4 => array(
            +            '$template_dir', '$compile_dir', '$config_dir', '$plugins_dir', '$debugging', '$debug_tpl',
            +            '$debugging_ctrl', '$autoload_filters', '$compile_check', '$force_compile', '$caching', '$cache_dir',
            +            '$cache_lifetime', '$cache_handler_func', '$cache_modified_check', '$config_overwrite',
            +            '$config_booleanize', '$config_read_hidden', '$config_fix_newlines', '$default_template_handler_func',
            +            '$php_handling', '$security', '$secure_dir', '$security_settings', '$trusted_dir', '$left_delimiter',
            +            '$right_delimiter', '$compiler_class', '$request_vars_order', '$request_use_auto_globals',
            +            '$error_reporting', '$compile_id', '$use_sub_dirs', '$default_modifiers', '$default_resource_type'
            +            ),
            +        5 => array(
            +            'append', 'append_by_ref', 'assign', 'assign_by_ref', 'clear_all_assign', 'clear_all_cache',
            +            'clear_assign', 'clear_cache', 'clear_compiled_tpl', 'clear_config', 'config_load', 'display',
            +            'fetch', 'get_config_vars', 'get_registered_object', 'get_template_vars',
            +            'load_filter', 'register_block', 'register_compiler_function', 'register_function',
            +            'register_modifier', 'register_object', 'register_outputfilter', 'register_postfilter',
            +            'register_prefilter', 'register_resource', 'trigger_error', 'template_exists', 'unregister_block',
            +            'unregister_compiler_function', 'unregister_function', 'unregister_modifier', 'unregister_object',
            +            'unregister_outputfilter', 'unregister_postfilter', 'unregister_prefilter', 'unregister_resource'
            +            ),
            +        6 => array(
            +            'name', 'file', 'scope', 'global', 'key', 'once', 'script',
            +            'loop', 'start', 'step', 'max', 'show', 'values', 'value', 'from', 'item'
            +            ),
            +        7 => array(
            +            'eq', 'neq', 'ne', 'lte', 'gte', 'ge', 'le', 'not', 'mod'
            +            ),
            +        8 => array(
            +            // some common php functions
            +            'isset', 'is_array', 'empty', 'count', 'sizeof'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '/', '=', '==', '!=', '>', '<', '>=', '<=', '!', '%'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        5 => false,
            +        6 => false,
            +        7 => false,
            +        8 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0600FF;',        //Functions
            +            2 => 'color: #008000;',        //Modifiers
            +            3 => 'color: #0600FF;',        //Custom Functions
            +            4 => 'color: #804040;',        //Variables
            +            5 => 'color: #008000;',        //Methods
            +            6 => 'color: #6A0A0A;',        //Attributes
            +            7 => 'color: #D36900;',        //Text-based symbols
            +            8 => 'color: #0600FF;'        //php functions
            +            ),
            +        'COMMENTS' => array(
            +            'MULTI' => 'color: #008080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #D36900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #006600;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #D36900;'
            +            ),
            +        'SCRIPT' => array(
            +            0 => '',
            +            1 => 'color: #808080; font-style: italic;',
            +            2 => 'color: #009000;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #00aaff;'
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => 'http://smarty.php.net/{FNAMEL}',
            +        2 => 'http://smarty.php.net/{FNAMEL}',
            +        3 => 'http://smarty.php.net/{FNAMEL}',
            +        4 => 'http://smarty.php.net/{FNAMEL}',
            +        5 => 'http://smarty.php.net/{FNAMEL}',
            +        6 => '',
            +        7 => 'http://smarty.php.net/{FNAMEL}',
            +        8 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        // variables
            +        0 => '\$[a-zA-Z][a-zA-Z0-9_]*'
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_ALWAYS,
            +    'SCRIPT_DELIMITERS' => array(
            +        0 => array(
            +            '{' => '}'
            +            ),
            +        1 => array(
            +            '',
            +        ),
            +        2 => array(
            +            '<' => '>'
            +            )
            +    ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        0 => true,
            +        1 => false,
            +        2 => false
            +    ),
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            'DISALLOWED_BEFORE' => "(?|^])",
            +            'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_<\|%\\-&])"
            +        )
            +    )
            +);
            diff --git a/vendor/easybook/geshi/geshi/spark.php b/vendor/easybook/geshi/geshi/spark.php
            new file mode 100644
            index 0000000000..ab934990d0
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/spark.php
            @@ -0,0 +1,131 @@
            + 'SPARK',
            +    'COMMENT_SINGLE' => array(1 => '--', 2 => '--#'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'begin', 'declare', 'do', 'else', 'elsif', 'exception', 'for', 'if',
            +            'is', 'loop', 'while', 'then', 'end', 'select', 'case', 'until',
            +            'goto', 'return'
            +            ),
            +        2 => array(
            +            'abs', 'and', 'at', 'mod', 'not', 'or', 'rem', 'xor'
            +            ),
            +        3 => array(
            +            'abort', 'abstract', 'accept', 'access', 'aliased', 'all', 'array',
            +            'body', 'constant', 'delay', 'delta', 'digits', 'entry', 'exit',
            +            'function', 'generic', 'in', 'interface', 'limited', 'new', 'null',
            +            'of', 'others', 'out', 'overriding', 'package', 'pragma', 'private',
            +            'procedure', 'protected', 'raise', 'range', 'record', 'renames',
            +            'requeue', 'reverse', 'separate', 'subtype', 'synchronized',
            +            'tagged', 'task', 'terminate', 'type', 'use', 'when', 'with'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #00007f;',
            +            2 => 'color: #0000ff;',
            +            3 => 'color: #46aa03; font-weight:bold;',
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #adadad; font-style: italic;',
            +            2 => 'color: #adadad; font-style: italic; font-weight: bold;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #7f007f;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #202020;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/sparql.php b/vendor/easybook/geshi/geshi/sparql.php
            new file mode 100644
            index 0000000000..6445fd5536
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/sparql.php
            @@ -0,0 +1,154 @@
            + 'SPARQL',
            +    'COMMENT_SINGLE' => array('#'),
            +    'COMMENT_MULTI' => array('/*' => '*/' ),
            +    'COMMENT_REGEXP' => array(
            +        //IRI (it's not a comment ;)
            +        1 => "/<[^> ]*>/i"
            +        ),
            +    'CASE_KEYWORDS' => 1,
            +    'QUOTEMARKS' => array("'", '"', '`'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'BASE','PREFIX','SELECT','DISTINCT','REDUCED','CONSTRUCT','DESCRIBE','ASK','FROM',
            +            'NAMED','WHERE','ORDER','BY','ASC','DESC','LIMIT','OFFSET','OPTIONAL','GRAPH',
            +            'UNION','FILTER','STR','LANG','LANGMATCHES','DATATYPE','BOUND','SAMETERM',
            +            'ISIRI','ISURI','ISBLANK',
            +            'ISLITERAL','REGEX','SUBSTR','TRUE',
            +            'FALSE','LOAD','CLEAR',
            +            'DROP','ADD','MOVE','COPY',
            +            'CREATE','DELETE','INSERT',
            +            'USING','SILENT','DEFAULT','ALL',
            +            'DATA','WITH','INTO','TO',
            +            'AS','GROUP','HAVING','UNDEF',
            +            'BINDINGS','SERVICE','BIND','MINUS_KEYWORD',
            +            'IRI','URI', 'BNODE',
            +            'RAND','ABS','CEIL','FLOOR','ROUND',
            +            'CONCAT','STRLEN',
            +            'UCASE','LCASE','ENCODE_FOR_URI',
            +            'CONTAINS','STRSTARTS',
            +            'STRENDS','STRBEFORE',
            +            'STRAFTER','REPLACE',
            +            'YEAR','MONTH',
            +            'DAY','HOURS',
            +            'MINUTES','SECONDS',
            +            'TIMEZONE','TZ',
            +            'NOW','MD5',
            +            'SHA1','SHA224',
            +            'SHA256','SHA384',
            +            'SHA512','COALESCE',
            +            'IF','STRLANG','STRDT',
            +            'ISNUMERIC','COUNT',
            +            'SUM','MIN',
            +            'MAX','AVG','SAMPLE',
            +            'GROUP_CONCAT ','NOT',
            +            'IN','EXISTS','SEPARATOR'
            +            )
            +        ),
            +    'REGEXPS' => array(
            +        //Variables without braces
            +        1 => "\\?[a-zA-Z_][a-zA-Z0-9_]*",
            +        //prefix
            +        2 => "[a-zA-Z_.\\-0-9]*:",
            +        //tag lang
            +        3 => "@[^ .)}]*",
            +        ),
            +    'SYMBOLS' => array(
            +        0 => array(
            +            '{', '}' , '.', ';'
            +            ),
            +        1 => array(
            +            '^^',
            +            '<=','>=','!=','=','<','>','|',
            +            '&&','||',
            +            '(',')','[', ']',
            +            '+','-','*','!','/'
            +            ),
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #993333; font-weight: bold;'
            +            ),
            +        'COMMENTS' => array(
            +            0 => 'color: #808080; font-style: italic;',
            +            1 => 'color: #000078;',
            +            //2 => 'color: #808080; font-style: italic;',
            +            'MULTI' => 'color: #808080; font-style: italic;',
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #FF63C3;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #0000FF;',
            +            1 => 'color: #FF8000; font-weight: bold;'
            +            ),
            +        'SCRIPT' => array(),
            +        'REGEXPS' => array(
            +            1 => 'color: #007800;',
            +            2 => 'color: #780078;',
            +            3 => 'color: #005078;'
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(),
            +    'HIGHLIGHT_STRICT_BLOCK' => array()
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/sql.php b/vendor/easybook/geshi/geshi/sql.php
            new file mode 100644
            index 0000000000..5f02d79368
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/sql.php
            @@ -0,0 +1,169 @@
            + 'SQL',
            +    'COMMENT_SINGLE' => array(1 =>'--'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'CASE_KEYWORDS' => 1,
            +    'QUOTEMARKS' => array("'", '"', '`'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'ADD', 'ALL', 'ALTER', 'AND', 'AS', 'ASC', 'AUTO_INCREMENT',
            +            'BEFORE', 'BEGIN', 'BETWEEN', 'BIGINT', 'BINARY', 'BLOB', 'BOOLEAN', 'BOTH', 'BY',
            +            'CALL', 'CASE', 'CAST', 'CEIL', 'CEILING', 'CHANGE', 'CHAR', 'CHAR_LENGTH', 'CHARACTER',
            +            'CHARACTER_LENGTH', 'CHECK', 'CLOB', 'COALESCE', 'COLLATE', 'COLUMN', 'COLUMNS',
            +            'CONNECT', 'CONSTRAINT', 'CONVERT', 'COUNT', 'CREATE', 'CROSS', 'CURRENT',
            +            'CURRENT_DATE', 'CURRENT_TIME', 'CURRENT_TIMESTAMP', 'CURRENT_USER',
            +            'DATA', 'DATABASE', 'DATABASES', 'DATE', 'DAY', 'DEC', 'DECIMAL', 'DECLARE',
            +            'DEFAULT', 'DELAYED', 'DELETE', 'DESC', 'DESCRIBE', 'DISTINCT', 'DOUBLE',
            +            'DOMAIN', 'DROP',
            +            'ELSE', 'ENCLOSED', 'END', 'ESCAPED', 'EXCEPT', 'EXEC', 'EXECUTE', 'EXISTS', 'EXP',
            +            'EXPLAIN', 'EXTRACT',
            +            'FALSE', 'FIELD', 'FIELDS', 'FILTER', 'FIRST', 'FLOAT', 'FLOOR', 'FLUSH', 'FOR',
            +            'FOREIGN', 'FROM', 'FULL', 'FUNCTION',
            +            'GET', 'GROUP', 'GROUPING', 'GO', 'GOTO', 'GRANT', 'GRANTED',
            +            'HAVING', 'HOUR',
            +            'IDENTIFIED', 'IDENTITY', 'IF', 'IGNORE', 'IN', 'INCREMENT', 'INDEX', 'INFILE', 'INNER',
            +            'INOUT', 'INPUT', 'INSERT', 'INT', 'INTEGER', 'INTERSECT', 'INTERSECTION', 'INTERVAL',
            +            'INTO', 'IS',
            +            'JOIN',
            +            'KEY', 'KEYS', 'KILL',
            +            'LANGUAGE', 'LARGE', 'LAST', 'LEADING', 'LEFT', 'LENGTH', 'LIKE', 'LIMIT', 'LINES', 'LOAD',
            +            'LOCAL', 'LOCK', 'LOW_PRIORITY', 'LOWER',
            +            'MATCH', 'MAX', 'MERGE', 'MIN', 'MINUTE', 'MOD', 'MODIFIES', 'MODIFY', 'MONTH',
            +            'NATIONAL', 'NATURAL', 'NCHAR', 'NEW', 'NEXT', 'NEXTVAL', 'NONE', 'NOT',
            +            'NULL', 'NULLABLE', 'NULLIF', 'NULLS', 'NUMBER', 'NUMERIC',
            +            'OF', 'OLD', 'ON', 'ONLY', 'OPEN', 'OPTIMIZE', 'OPTION',
            +            'OPTIONALLY', 'OR', 'ORDER', 'OUT', 'OUTER', 'OUTFILE', 'OVER',
            +            'POSITION', 'POWER', 'PRECISION', 'PREPARE', 'PRIMARY', 'PROCEDURAL', 'PROCEDURE',
            +            'READ', 'REAL', 'REF', 'REFERENCES', 'REFERENCING', 'REGEXP', 'RENAME', 'REPLACE',
            +            'RESULT', 'RETURN', 'RETURNS', 'REVOKE', 'RIGHT', 'RLIKE', 'ROLLBACK', 'ROW',
            +            'ROW_NUMBER', 'ROWS', 'RESTRICT', 'ROLE', 'ROUTINE', 'ROW_COUNT',
            +            'SAVEPOINT', 'SEARCH', 'SECOND', 'SECTION', 'SELECT', 'SELF', 'SEQUENCE',
            +            'SESSION', 'SET', 'SETVAL', 'SHOW', 'SIMILAR', 'SIZE', 'SMALLINT', 'SOME',
            +            'SONAME', 'SOURCE', 'SPACE', 'SQL', 'SQRT', 'START', 'STATUS',
            +            'STRAIGHT_JOIN', 'STRUCTURE', 'STYLE', 'SUBSTRING', 'SUM',
            +            'TABLE', 'TABLE_NAME', 'TABLES', 'TERMINATED', 'TEMPORARY', 'THEN', 'TIME',
            +            'TIMESTAMP', 'TO', 'TRAILING', 'TRANSACTION', 'TRIGGER', 'TRIM', 'TRUE', 'TRUNCATE',
            +            'TRUSTED', 'TYPE',
            +            'UNDER', 'UNION', 'UNIQUE', 'UNKNOWN', 'UNLOCK', 'UNSIGNED',
            +            'UPDATE', 'UPPER', 'USE', 'USER', 'USING',
            +            'VALUE', 'VALUES', 'VARCHAR', 'VARIABLES', 'VARYING', 'VIEW',
            +            'WHEN', 'WHERE', 'WITH', 'WITHIN', 'WITHOUT', 'WORK', 'WRITE',
            +            'XOR',
            +            'YEAR',
            +            'ZEROFILL'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '=', '<', '>', '|', ',', '.', '+', '-', '*', '/'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #993333; font-weight: bold;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;',
            +            //2 => 'color: #808080; font-style: italic;',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array( //'
            +            'DISALLOWED_BEFORE' => "(? 'StoneScript',
            +    'COMMENT_SINGLE' => array(1 => "--"),
            +    'COMMENT_MULTI' => array("--[[" => "]]"),
            +    'COMMENT_REGEXP' => array(
            +        4 => '/<<\s*?(\w+)\\n.*?\\n\\1(?![a-zA-Z0-9])/si',
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"', '`','\''),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        // Blue - General Keywords
            +        1 => array(
            +                'and', 'begin', 'break', 'do', 'else', 'elseif', 'end',
            +                'for', 'if', 'in', 'while', 'next', 'not', 'or', 'redo',
            +                'then', 'unless', 'until', 'when', 'false', 'nil', 'self',
            +                'true', 'local', 'this', 'return',
            +            ),
            +        // Dark Blue - Main API names
            +        2 => array(
            +                'animation', 'application', 'cache', 'camera', 'debug',
            +                'dynamics', 'group', 'hashtable', 'hud', 'input', 'light',
            +                'log', 'math', 'mesh', 'microphone', 'music', 'navigation',
            +                'network', 'object', 'pixelmap', 'projector', 'scene',
            +                'sensor', 'server', 'session', 'sfx', 'shape', 'sound',
            +                'string', 'system', 'table', 'user', 'video', 'xml',
            +                // Plugin API names
            +                'plasma', 'watersim',
            +                'winDirectories',
            +                'ActionSheet', 'Alert', 'Mail', 'Picker', 'StatusBar',
            +            ),
            +        // Constants
            +        // Can be commented out if performance is crucial -> then these keywords will appear in a slightly lighter color
            +        3 => array(
            +                //Animation
            +                'kPlaybackModeLoop', 'kPlaybackModeLoopMirrored', 'kPlaybackModeLoopReversed',
            +                'kPlaybackModeOnce', 'kPlaybackModeOnceReversed',
            +                //Application - Environment
            +                'kStatusLoading', 'kStatusReady', 'kStatusSaving', // 'kStatusNone'
            +                //Application - Options
            +                'kOptionAudioMasterVolume', 'kOptionAutomaticVirtualKeyboard', 'kOptionDynamicShadowsBufferCount',
            +                'kOptionDynamicShadowsBufferSize', 'kOptionDynamicShadowsConstantSampling', 'kOptionDynamicShadowsPCFSampleCount',
            +                'kOptionDynamicShadowsQuality', 'kOptionDynamicShadowsScreenSpaceBlur', 'kOptionFullscreen',
            +                'kOptionFullscreenHeight', 'kOptionFullscreenWidth', 'kOptionHardwareOcclusion',
            +                'kOptionMaxEventBouncesPerFrame', 'kOptionNetworkStreams', 'kOptionNetworkStreamsUseBrowser',
            +                'kOptionPrioritizeEventBounces', 'kOptionRenderingEnabled', 'kOptionShadersQuality',
            +                'kOptionSwapInterval', 'kOptionTerrainsQuality', 'kOptionTexturesAnisotropyLevel',
            +                'kOptionTexturesMipmapBias', 'kOptionTexturesQuality', 'kOptionViewportRotation',
            +                //Application - Resource Types
            +                'kResourceTypeAnimBank', 'kResourceTypeFont', 'kResourceTypeHUD',
            +                'kResourceTypeMaterial', 'kResourceTypeMesh', 'kResourceTypeParticle',
            +                'kResourceTypePixelMap', 'kResourceTypeSoundBank', 'kResourceTypeTexture',
            +                'kResourceTypeTextureClip', 'kResourceTypeTrail',
            +                //Cache
            +                'kPropertyHeight', 'kPropertySize', 'kPropertyWidth',
            +                //Dynamics
            +                'kAxisX', 'kAxisY', 'kAxisZ',
            +                'kTypeBox', 'kTypeCapsule', 'kTypeSphere',
            +                //HUD
            +                'kAddressingModeClamp', 'kAddressingModeRepeat', 'kAlignCenter', 'kAlignJustify','kAlignLeft', 'kAlignRight',
            +                'kAlignTop', 'kBlendModeAdd', 'kBlendModeDefault', 'kBlendModeModulate', 'kCaseFixed', 'kCaseVariable',
            +                'kCommandTypeCallAction', 'kCommandTypeCopyCheckStateToRegister', 'kCommandTypeCopyEditTextToRegister',
            +                'kCommandTypeCopyListItemTextToRegister', 'kCommandTypeCopyListLastSelectedItemToRegister',
            +                'kCommandTypeCopyProgressValueToRegister', 'kCommandTypeCopySliderValueToRegister', 'kCommandTypeCopyTagToRegister',
            +                'kCommandTypeEnterModalMode', 'kCommandTypeInterpolateBackgroundColor', 'kCommandTypeInterpolateBorderColor',
            +                'kCommandTypeInterpolateForegroundColor', 'kCommandTypeInterpolateHeight', 'kCommandTypeInterpolateOpacity',
            +                'kCommandTypeInterpolatePosition', 'kCommandTypeInterpolateProgressValue', 'kCommandTypeInterpolateRotation',
            +                'kCommandTypeInterpolateSize', 'kCommandTypeInterpolateWidth', 'kCommandTypeLeaveModalMode',
            +                'kCommandTypeMatchScreenSpaceBottomLeftCorner', 'kCommandTypeMatchScreenSpaceBottomRightCorner',
            +                'kCommandTypeMatchScreenSpaceCenter', 'kCommandTypeMatchScreenSpaceHeight', 'kCommandTypeMatchScreenSpaceTopLeftCorner',
            +                'kCommandTypeMatchScreenSpaceTopRightCorner', 'kCommandTypeMatchScreenSpaceWidth', 'kCommandTypePauseMovie',
            +                'kCommandTypePauseSound', 'kCommandTypePauseTimer', 'kCommandTypePlayMovie', 'kCommandTypePlaySound',
            +                'kCommandTypePlaySoundLoop', 'kCommandTypeResumeSound', 'kCommandTypeSendEventToUser', 'kCommandTypeSetActive',
            +                'kCommandTypeSetBackgroundColor', 'kCommandTypeSetBackgroundImage', 'kCommandTypeSetBackgroundImageUVOffset',
            +                'kCommandTypeSetBackgroundImageUVScale', 'kCommandTypeSetBorderColor', 'kCommandTypeSetButtonText',
            +                'kCommandTypeSetCheckState', 'kCommandTypeSetCheckText', 'kCommandTypeSetCursorPosition', 'kCommandTypeSetCursorVisible',
            +                'kCommandTypeSetEditText', 'kCommandTypeSetFocus', 'kCommandTypeSetForegroundColor', 'kCommandTypeSetHeight',
            +                'kCommandTypeSetLabelText', 'kCommandTypeSetOpacity', 'kCommandTypeSetPosition', 'kCommandTypeSetRotation',
            +                'kCommandTypeSetSize', 'kCommandTypeSetVisible', 'kCommandTypeSetWidth', 'kCommandTypeSleep', 'kCommandTypeStartTimer',
            +                'kCommandTypeStopAction', 'kCommandTypeStopMovie', 'kCommandTypeStopSound', 'kCommandTypeStopTimer',
            +                'kComponentTypeButton', 'kComponentTypeCheck', 'kComponentTypeContainer', 'kComponentTypeEdit', 'kComponentTypeLabel',
            +                'kComponentTypeList', 'kComponentTypeMovie', 'kComponentTypePicture', 'kComponentTypePixelMap', 'kComponentTypeProgress',
            +                'kComponentTypeRenderMap', 'kComponentTypeSlider', 'kCursorShapeCross', 'kCursorShapeDefault', 'kCursorShapeHandPointing',
            +                'kCursorShapeIBeam', 'kCursorShapeNone', 'kCursorShapeWaiting', 'kDirectionLeftToRight', 'kDirectionRightToLeft',
            +                'kEncodingASCII', 'kEncodingUTF8', 'kEventTypeGainFocus', 'kEventTypeLooseFocus', 'kEventTypeMouseEnter',
            +                'kEventTypeMouseLeave', 'kFillModeSolid', 'kInterpolatorTypeLinear', 'kInterpolatorTypePower2', 'kInterpolatorTypePower3',
            +                'kInterpolatorTypePower4', 'kInterpolatorTypeRoot2', 'kInterpolatorTypeRoot3', 'kInterpolatorTypeRoot4',
            +                'kInterpolatorTypeSpring1', 'kInterpolatorTypeSpring2', 'kInterpolatorTypeSpring3', 'kInterpolatorTypeSpring4',
            +                'kInterpolatorTypeSpring5', 'kInterpolatorTypeSpring6',
            +                'kOriginBottom', 'kOriginBottomLeft', 'kOriginBottomRight', 'kOriginCenter', 'kOriginLeft', 'kOriginRight',
            +                'kOriginTop', 'kOriginTopLeft', 'kOriginTopRight', 'kProgressTypeBottomToTop', 'kProgressTypeLeftToRight',
            +                'kProgressTypeRightToLeft', 'kProgressTypeTopToBottom', 'kRuntimeValueCallArgument0', 'kRuntimeValueCallArgument1',
            +                'kRuntimeValueCallArgument2', 'kRuntimeValueCallArgument3', 'kRuntimeValueCurrentUser', 'kRuntimeValueCurrentUserMainCamera',
            +                'kRuntimeValueRegister0', 'kRuntimeValueRegister1', 'kRuntimeValueRegister2', 'kRuntimeValueRegister3',
            +                'kShapeTypeEllipsoid', 'kShapeTypeRectangle', 'kShapeTypeRoundRectangle', 'kSliderTypeBottomToTop',
            +                'kSliderTypeLeftToRight', 'kSliderTypeRightToLeft', 'kSliderTypeTopToBottom', 'kWaveTypeConstant',
            +                'kWaveTypeSawtooth', 'kWaveTypeSawtoothInv', 'kWaveTypeSinus', 'kWaveTypeSinusNoise', 'kWaveTypeSquare', 'kWaveTypeTriangle',
            +                //Input
            +                'kJoypadTypeIPhone', 'kJoypadTypeNone', 'kJoypadTypePhone', 'kJoypadTypeStandard', 'kJoypadTypeWiimote',
            +                'kKey0', 'kKey1', 'kKey2', 'kKey3', 'kKey4', 'kKey5', 'kKey6', 'kKey7', 'kKey8', 'kKey9', 'kKeyA', 'kKeyB',
            +                'kKeyBackspace', 'kKeyC', 'kKeyD', 'kKeyDelete', 'kKeyDown', 'kKeyE', 'kKeyEnd', 'kKeyEscape', 'kKeyF',
            +                'kKeyF1', 'kKeyF10', 'kKeyF11', 'kKeyF12', 'kKeyF2', 'kKeyF3', 'kKeyF4', 'kKeyF5', 'kKeyF6', 'kKeyF7',
            +                'kKeyF8', 'kKeyF9', 'kKeyG', 'kKeyH', 'kKeyHome', 'kKeyI', 'kKeyInsert', 'kKeyJ', 'kKeyK', 'kKeyL',
            +                'kKeyLAlt', 'kKeyLControl', 'kKeyLeft', 'kKeyLShift', 'kKeyM', 'kKeyN', 'kKeyO', 'kKeyP', 'kKeyPageDown',
            +                'kKeyPageUp', 'kKeyQ', 'kKeyR', 'kKeyRAlt', 'kKeyRControl', 'kKeyReturn', 'kKeyRight', 'kKeyRShift',
            +                'kKeyS', 'kKeySpace', 'kKeyT', 'kKeyTab', 'kKeyU', 'kKeyUp', 'kKeyV', 'kKeyW', 'kKeyX', 'kKeyY',
            +                'kKeyZ', 'kJoypadButtonPSPCircle', 'kJoypadButtonPSPCross', 'kJoypadButtonPSPDown', 'kJoypadButtonPSPL',
            +                'kJoypadButtonPSPLeft', 'kJoypadButtonPSPR', 'kJoypadButtonPSPRight', 'kJoypadButtonPSPSelect',
            +                'kJoypadButtonPSPSquare', 'kJoypadButtonPSPStart', 'kJoypadButtonPSPTriangle', 'kJoypadButtonPSPUp',
            +                'kJoypadTypePSP', 'kJoypadButtonWiimoteA', 'kJoypadButtonWiimoteB', 'kJoypadButtonWiimoteC',
            +                'kJoypadButtonWiimoteDown', 'kJoypadButtonWiimoteHome', 'kJoypadButtonWiimoteLeft',
            +                'kJoypadButtonWiimoteMinus', 'kJoypadButtonWiimoteOne', 'kJoypadButtonWiimotePlus',
            +                'kJoypadButtonWiimoteRight', 'kJoypadButtonWiimoteTwo', 'kJoypadButtonWiimoteUp', 'kJoypadButtonWiimoteZ',
            +                //Light
            +                'kTypeDirectional', 'kTypePoint',
            +                //Math
            +                'kEpsilon', 'kInfinity', 'kPi',
            +                //Mesh
            +                'kLockModeRead', 'kLockModeWrite', 'kLockReadWrite',
            +                //Network
            +                'kBluetoothServerPort', 'kDefaultServerPort', 'kStatusAuthenticated', 'kStatusSearchFinished', // 'kStatusNone', 'kStatusPending',
            +                //Object
            +                'kControllerTypeAI', 'kControllerTypeAnimation', 'kControllerTypeAny', 'kControllerTypeDynamics',
            +                'kControllerTypeNavigation', 'kControllerTypeSound', 'kGlobalSpace', 'kLocalSpace', 'kParentSpace',
            +                'kTransformOptionInheritsParentRotation', 'kTransformOptionInheritsParentScale', 'kTransformOptionInheritsParentTranslation',
            +                'kTransformOptionTranslationAffectedByParentRotation', 'kTransformOptionTranslationAffectedByParentScale', 'kTypeCamera',
            +                'kTypeCollider', 'kTypeDummy', 'kTypeGroup', 'kTypeLight', 'kTypeOccluder', 'kTypeProjector', 'kTypeReflector',
            +                'kTypeSensor', 'kTypeSfx', 'kTypeShape',
            +                //Pixelmap
            +                'kBlendModeDecal', 'kBlendModeReplace', 'kFillModeBrush', 'kFillModeNone', 'kPenModeBrush', // 'kFillModeSolid',
            +                'kPenModeNone', 'kPenModeSolid',
            +                //Projector
            +                'kMapTypeMovie', 'kMapTypePixelMap', 'kMapTypeRenderMap', 'kMapTypeTexture', 'kMapTypeTextureClip',
            +                //Scene
            +                'kFilteringModeBilinear', 'kFilteringModeNearest', 'kFilteringModeTrilinear', // 'kAddressingModeClamp', 'kAddressingModeRepeat',
            +                'kSkyBoxFaceBack', 'kSkyBoxFaceBottom', 'kSkyBoxFaceFront', 'kSkyBoxFaceLeft', 'kSkyBoxFaceRight', 'kSkyBoxFaceTop',
            +                //Sensor
            +                'kShapeTypeBox', 'kShapeTypeSphere',
            +                //Server
            +                'kStatusConnected', 'kStatusNone', 'kStatusPending',
            +                //Session - duplicate keywords
            +                //'kStatusConnected', 'kStatusNone', 'kStatusPending',
            +                //Shape
            +                'kMapTypeUnknown', 'kCurveTypeBezier', 'kCurveTypeBSpline', 'kCurveTypeCatmullRom', 'kCurveTypePolyLine',
            +                // 'kMapTypeMovie', 'kMapTypePixelMap', 'kMapTypeRenderMap', 'kMapTypeTexture',  'kMapTypeTextureClip',
            +
            +                //System
            +                'kOSType3DS', 'kOSTypeBada', 'kOSTypeBrew', 'kOSTypePalm', 'kOSTypePS3',
            +                'kClientTypeEditor', 'kClientTypeEmbedded', 'kClientTypeStandalone',
            +                'kGPUCapabilityBloomFilterSupport', 'kGPUCapabilityContrastFilterSupport', 'kGPUCapabilityDepthBlurFilterSupport',
            +                'kGPUCapabilityDistortionFilterSupport', 'kGPUCapabilityDynamicShadowsSupport', 'kGPUCapabilityHardwareOcclusionSupport',
            +                'kGPUCapabilityHardwareRenderingSupport', 'kGPUCapabilityMonochromeFilterSupport', 'kGPUCapabilityMotionBlurFilterSupport',
            +                'kGPUCapabilityPixelShaderSupport', 'kGPUCapabilityVelocityBlurFilterSupport', 'kGPUCapabilityVertexShaderSupport',
            +                'kLanguageAlbanian', 'kLanguageArabic', 'kLanguageBulgarian', 'kLanguageCatalan', 'kLanguageCzech', 'kLanguageDanish',
            +                'kLanguageDutch', 'kLanguageEnglish', 'kLanguageFinnish', 'kLanguageFrench', 'kLanguageGerman', 'kLanguageGreek',
            +                'kLanguageHebrew', 'kLanguageHungarian', 'kLanguageIcelandic', 'kLanguageItalian', 'kLanguageJapanese', 'kLanguageKorean',
            +                'kLanguageNorwegian', 'kLanguagePolish', 'kLanguagePortuguese', 'kLanguageRomanian', 'kLanguageRussian',
            +                'kLanguageSerboCroatian', 'kLanguageSlovak', 'kLanguageSpanish', 'kLanguageSwedish', 'kLanguageThai',
            +                'kLanguageTurkish', 'kLanguageUnknown', 'kLanguageUrdu', 'kOSTypeAndroid', 'kOSTypeAngstrom', 'kOSTypeIPhone',
            +                'kOSTypeLinux', 'kOSTypeMac', 'kOSTypePSP', 'kOSTypeSymbian', 'kOSTypeWii', 'kOSTypeWindows', 'kOSTypeWindowsCE',
            +            ),
            +        // Not used yet
            +        4 => array(
            +                'dummycommand',
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '[', ']', '{', '}', '%', '&', '*', '|', '/', '<', '>',
            +        '+', '-', '=>', '<<'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => true,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color:#0000FF; font-weight:bold;',
            +            2 => 'color:#000088; font-weight:bold;',
            +            3 => 'color:#C088C0; font-weight:bold;',
            +            4 => 'color:#00FEFE; font-weight:bold;',
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color:#008000; font-style:italic;',
            +            4 => 'color: #cc0000; font-style: italic;',
            +            'MULTI' => 'color:#008000; font-style:italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color:#000099;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color:#000000; font-weight:bold;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color:#888800;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color:#AA0000;'
            +            ),
            +        // names after "."
            +        'METHODS' => array(
            +            1 => 'color:#FF00FF; font-weight:bold;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color:#000000; font-weight:bold;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color:#ff6633; font-weight:bold;',
            +            1 => 'color:#0066ff; font-weight:bold;',
            +            2 => 'color:#6666ff; font-weight:bold;',
            +            3 => 'color:#ff3333; font-weight:bold;'
            +            ),
            +        'SCRIPT' => array(
            +            0 => '',
            +            1 => '',
            +            2 => '',
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        0 => array(//Variables
            +            GESHI_SEARCH => "([[:space:]])(\\$[a-zA-Z_][a-zA-Z0-9_]*)",
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => ''
            +            ),
            +        1 => array(//Arrays
            +            GESHI_SEARCH => "([[:space:]])(@[a-zA-Z_][a-zA-Z0-9_]*)",
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => ''
            +            ),
            +        2 => "([A-Z][a-zA-Z0-9_]*::)+[A-Z][a-zA-Z0-9_]*",//Static OOP symbols
            +        3 => array(
            +            GESHI_SEARCH => "([[:space:]]|\[|\()(:[a-zA-Z_][a-zA-Z0-9_]*)",
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => ''
            +            )
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_MAYBE,
            +    'SCRIPT_DELIMITERS' => array(
            +        0 => array(
            +            '<%' => '%>'
            +            )
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        0 => true,
            +        ),
            +    'TAB_WIDTH' => 2
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/systemverilog.php b/vendor/easybook/geshi/geshi/systemverilog.php
            new file mode 100644
            index 0000000000..ed928fb134
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/systemverilog.php
            @@ -0,0 +1,316 @@
            +.
            + *
            + ************************************************************************
            + * Title:        SystemVerilog Language Keywords File for GeSHi
            + * Description:  This file contains the SV keywords defined in the
            + *               IEEE1800-2009 Draft Standard in the format expected by
            + *               GeSHi.
            + *
            + * Original Author: Sean O'Boyle
            + * Contact:         seanoboyle@intelligentdv.com
            + * Company:         Intelligent Design Verification
            + * Company URL:     http://intelligentdv.com
            + *
            + * Download the most recent version here:
            + *                  http://intelligentdv.com/downloads
            + *
            + * File Bugs Here:  http://bugs.intelligentdv.com
            + *        Project:  SyntaxFiles
            + *
            + * File: systemverilog.php
            + * $LastChangedBy: benbe $
            + * $LastChangedDate: 2012-08-18 01:56:20 +0200 (Sa, 18. Aug 2012) $
            + * $LastChangedRevision: 2542 $
            + *
            + ************************************************************************/
            +
            +$language_data = array (
            +    'LANG_NAME' => 'SystemVerilog',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        // system tasks
            +        1 => array(
            +            'acos','acosh','asin','asinh','assertfailoff','assertfailon',
            +            'assertkill','assertnonvacuouson','assertoff','asserton',
            +            'assertpassoff','assertpasson','assertvacuousoff','async$and$array',
            +            'async$and$plane','async$nand$array','async$nand$plane',
            +            'async$nor$array','async$nor$plane','async$or$array',
            +            'async$or$plane','atan','atan2','atanh','bits','bitstoreal',
            +            'bitstoshortreal','cast','ceil','changed','changed_gclk',
            +            'changing_gclk','clog2','cos','cosh','countones','coverage_control',
            +            'coverage_get','coverage_get_max','coverage_merge','coverage_save',
            +            'dimensions','display','displayb','displayh','displayo',
            +            'dist_chi_square','dist_erlang','dist_exponential','dist_normal',
            +            'dist_poisson','dist_t','dist_uniform','dumpall','dumpfile',
            +            'dumpflush','dumplimit','dumpoff','dumpon','dumpports',
            +            'dumpportsall','dumpportsflush','dumpportslimit','dumpportsoff',
            +            'dumpportson','dumpvars','error','exit','exp','falling_gclk',
            +            'fclose','fdisplay','fdisplayb','fdisplayh','fdisplayo','fell',
            +            'fell_gclk','feof','ferror','fflush','fgetc','fgets','finish',
            +            'floor','fmonitor','fmonitorb','fmonitorh','fmonitoro','fopen',
            +            'fread','fscanf','fseek','fstrobe','fstrobeb','fstrobeh','fstrobeo',
            +            'ftell','future_gclk','fwrite','fwriteb','fwriteh','fwriteo',
            +            'get_coverage','high','hypot','increment','info','isunbounded',
            +            'isunknown','itor','left','ln','load_coverage_db','log10','low',
            +            'monitor','monitorb','monitorh','monitoro','monitoroff','monitoron',
            +            'onehot','onehot0','past','past_gclk','pow','printtimescale',
            +            'q_add','q_exam','q_full','q_initialize','q_remove','random',
            +            'readmemb','readmemh','realtime','realtobits','rewind','right',
            +            'rising_gclk','rose','rose_gclk','rtoi','sampled',
            +            'set_coverage_db_name','sformat','sformatf','shortrealtobits',
            +            'signed','sin','sinh','size','sqrt','sscanf','stable','stable_gclk',
            +            'steady_gclk','stime','stop','strobe','strobeb','strobeh','strobeo',
            +            'swrite','swriteb','swriteh','swriteo','sync$and$array',
            +            'sync$and$plane','sync$nand$array','sync$nand$plane',
            +            'sync$nor$array','sync$nor$plane','sync$or$array','sync$or$plane',
            +            'system','tan','tanh','test$plusargs','time','timeformat',
            +            'typename','ungetc','unpacked_dimensions','unsigned',
            +            'value$plusargs','warning','write','writeb','writeh','writememb',
            +            'writememh','writeo',
            +            ),
            +        // compiler directives
            +        2 => array(
            +            '`__FILE__', '`__LINE__', '`begin_keywords', '`case', '`celldefine',
            +            '`endcelldefine', '`default_nettype', '`define', '`default', '`else',
            +            '`elsif', '`end_keywords', '`endfor', '`endif',
            +            '`endprotect', '`endswitch', '`endwhile', '`for', '`format',
            +            '`if', '`ifdef', '`ifndef', '`include', '`let',
            +            '`line', '`nounconnected_drive', '`pragma', '`protect', '`resetall',
            +            '`switch', '`timescale', '`unconnected_drive', '`undef', '`undefineall',
            +            '`while'
            +            ),
            +        // keywords
            +        3 => array(
            +            'assert', 'assume', 'cover', 'expect', 'disable',
            +            'iff', 'binsof', 'intersect', 'first_match', 'throughout',
            +            'within', 'coverpoint', 'cross', 'wildcard', 'bins',
            +            'ignore_bins', 'illegal_bins', 'genvar', 'if', 'else',
            +            'unique', 'priority', 'matches', 'default', 'forever',
            +            'repeat', 'while', 'for', 'do', 'foreach',
            +            'break', 'continue', 'return', 'pulsestyle_onevent', 'pulsestyle_ondetect',
            +            'noshowcancelled', 'showcancelled', 'ifnone', 'posedge', 'negedge',
            +            'edge', 'wait', 'wait_order', 'timeunit', 'timeprecision',
            +            's', 'ms', 'us', 'ns',
            +            'ps', 'fs', 'step', 'new', 'extends',
            +            'this', 'super', 'protected', 'local', 'rand',
            +            'randc', 'bind', 'constraint', 'solve', 'before',
            +            'dist', 'inside', 'with', 'virtual', 'extern',
            +            'pure', 'forkjoin', 'design', 'instance', 'cell',
            +            'liblist', 'use', 'library', 'incdir', 'include',
            +            'modport', 'sync_accept_on', 'reject_on', 'accept_on',
            +            'sync_reject_on', 'restrict', 'let', 'until', 'until_with',
            +            'unique0', 'eventually', 's_until', 's_always', 's_eventually',
            +            's_nexttime', 's_until_with', 'global', 'untyped', 'implies',
            +            'weak', 'strong', 'nexttime'
            +            ),
            +        // block keywords
            +        4 => array(
            +            'begin', 'end', 'package', 'endpackage', 'macromodule',
            +            'module', 'endmodule', 'generate', 'endgenerate', 'program',
            +            'endprogram', 'class', 'endclass', 'function', 'endfunction',
            +            'case', 'casex', 'casez', 'randcase', 'endcase',
            +            'interface', 'endinterface', 'clocking', 'endclocking', 'task',
            +            'endtask', 'primitive', 'endprimitive', 'fork', 'join',
            +            'join_any', 'join_none', 'covergroup', 'endgroup', 'checker',
            +            'endchecker', 'property', 'endproperty', 'randsequence', 'sequence',
            +            'endsequence', 'specify', 'endspecify', 'config', 'endconfig',
            +            'table', 'endtable', 'initial', 'final', 'always',
            +            'always_comb', 'always_ff', 'always_latch', 'alias', 'assign',
            +            'force', 'release'
            +            ),
            +
            +        // types
            +        5 => array(
            +            'parameter', 'localparam', 'specparam', 'input', 'output',
            +            'inout', 'ref', 'byte', 'shortint', 'int',
            +            'integer', 'longint', 'time', 'bit', 'logic',
            +            'reg', 'supply0', 'supply1', 'tri', 'triand',
            +            'trior', 'trireg', 'tri0', 'tri1', 'wire',
            +            'uwire', 'wand', 'wor', 'signed', 'unsigned',
            +            'shortreal', 'real', 'realtime', 'type', 'void',
            +            'struct', 'union', 'tagged', 'const', 'var',
            +            'automatic', 'static', 'packed', 'vectored', 'scalared',
            +            'typedef', 'enum', 'string', 'chandle', 'event',
            +            'null', 'pullup', 'pulldown', 'cmos', 'rcmos',
            +            'nmos', 'pmos', 'rnmos', 'rpmos', 'and',
            +            'nand', 'or', 'nor', 'xor', 'xnor',
            +            'not', 'buf', 'tran', 'rtran', 'tranif0',
            +            'tranif1', 'rtranif0', 'rtranif1', 'bufif0', 'bufif1',
            +            'notif0', 'notif1', 'strong0', 'strong1', 'pull0',
            +            'pull1', 'weak0', 'weak1', 'highz0', 'highz1',
            +            'small', 'medium', 'large'
            +            ),
            +
            +        // DPI
            +        6 => array(
            +            'DPI', 'DPI-C', 'import', 'export', 'context'
            +            ),
            +
            +        // stdlib
            +        7 => array(
            +            'randomize', 'mailbox', 'semaphore', 'put', 'get',
            +            'try_put', 'try_get', 'peek', 'try_peek', 'process',
            +            'state', 'self', 'status', 'kill', 'await',
            +            'suspend', 'resume', 'size', 'delete', 'insert',
            +            'num', 'first', 'last', 'next', 'prev',
            +            'pop_front', 'pop_back', 'push_front', 'push_back', 'find',
            +            'find_index', 'find_first', 'find_last', 'find_last_index', 'min',
            +            'max', 'unique_index', 'reverse', 'sort', 'rsort',
            +            'shuffle', 'sum', 'product', 'List', 'List_Iterator',
            +            'neq', 'eq', 'data', 'empty', 'front',
            +            'back', 'start', 'finish', 'insert_range', 'erase',
            +            'erase_range', 'set', 'swap', 'clear', 'purge'
            +            ),
            +
            +        // key_deprecated
            +        8 => array(
            +            'defparam', 'deassign', 'TODO'
            +        ),
            +
            +        ),
            +    'SYMBOLS' => array(
            +            '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%',
            +            '^', '&', '|', '~',
            +            '?', ':',
            +            '#', '<<', '<<<',
            +            '>', '<', '>=', '<=',
            +            '@', ';', ','
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        5 => true,
            +        6 => true,
            +        7 => true,
            +        8 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #996666; font-weight: bold;',
            +            2 => 'color: #336600; font-weight: bold;',
            +            3 => 'color: #996600; font-weight: bold;',
            +            4 => 'color: #000033; font-weight: bold;',
            +            5 => 'color: #330033; font-weight: bold;',
            +            6 => 'color: #996600; font-weight: bold;',
            +            7 => 'color: #CC9900; font-weight: bold;',
            +            8 => 'color: #990000; font-weight: bold;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #00008B; font-style: italic;',
            +            'MULTI' => 'color: #00008B; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #9F79EE'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #9F79EE;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #FF00FF;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #ff0055;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #202020;',
            +            2 => 'color: #202020;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #5D478B;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #ff0055;',
            +            1 => 'color: #ff0055;',
            +            2 => 'color: #ff0055;',
            +            3 => 'color: #ff0055;'
            +            ),
            +        'SCRIPT' => array(
            +            0 => '',
            +            1 => '',
            +            2 => '',
            +            3 => ''
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => '',
            +        6 => '',
            +        7 => '',
            +        8 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => ''
            +        ),
            +    'REGEXPS' => array(
            +        // integer
            +        0 => "\d'[bdh][0-9_a-fA-FxXzZ]+",
            +        // realtime
            +        1 => "\d*\.\d+[munpf]?s",
            +        // time s, ms, us, ns, ps, of fs
            +        2 => "\d+[munpf]?s",
            +        // real
            +        3 => "\d*\.\d+"
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        0 => ''
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        0 => true
            +        ),
            +    'TAB_WIDTH' => 3,
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            1 => array(
            +                'DISALLOWED_BEFORE' => '(?<=$)'
            +                )
            +            )
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/tcl.php b/vendor/easybook/geshi/geshi/tcl.php
            new file mode 100644
            index 0000000000..2c1d53ccd6
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/tcl.php
            @@ -0,0 +1,193 @@
            + 'TCL',
            +    'COMMENT_SINGLE' => array(1 => '#'),
            +    'COMMENT_MULTI' => array(),
            +    'COMMENT_REGEXP' => array(
            +        1 => '/(? '/{[^}\n]+}/'
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"', "'"),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        /*
            +         * Set 1: reserved words
            +         * http://python.org/doc/current/ref/keywords.html
            +         */
            +        1 => array(
            +            'proc', 'global', 'upvar', 'if', 'then', 'else', 'elseif', 'for', 'foreach',
            +            'break', 'continue', 'while', 'set', 'eval', 'case', 'in', 'switch',
            +            'default', 'exit', 'error', 'return', 'uplevel', 'loop',
            +            'for_array_keys', 'for_recursive_glob', 'for_file', 'unwind_protect',
            +            'expr', 'catch', 'namespace', 'rename', 'variable',
            +            // itcl
            +            'method', 'itcl_class', 'public', 'protected'),
            +
            +        /*
            +         * Set 2: builtins
            +         * http://asps.activatestate.com/ASPN/docs/ActiveTcl/8.4/tcl/tcl_2_contents.htm
            +         */
            +        2 => array(
            +            // string handling
            +            'append', 'binary', 'format', 're_syntax', 'regexp', 'regsub',
            +            'scan', 'string', 'subst',
            +            // list handling
            +            'concat', 'join', 'lappend', 'lindex', 'list', 'llength', 'lrange',
            +            'lreplace', 'lsearch', 'lset', 'lsort', 'split',
            +            // procedures and output
            +            'incr', 'close', 'eof', 'fblocked', 'fconfigure', 'fcopy', 'file',
            +            'fileevent', 'flush', 'gets', 'open', 'puts', 'read', 'seek',
            +            'socket', 'tell',
            +            // packages and source files
            +            'load', 'loadTk', 'package', 'pgk::create', 'pgk_mkIndex', 'source',
            +            // interpreter routines
            +            'bgerror', 'history', 'info', 'interp', 'memory', 'unknown',
            +            // library routines
            +            'enconding', 'http', 'msgcat',
            +            // system related
            +            'cd', 'clock', 'exec', 'glob', 'pid', 'pwd', 'time',
            +            // platform specified
            +            'dde', 'registry', 'resource',
            +            // special variables
            +            '$argc', '$argv', '$errorCode', '$errorInfo', '$argv0',
            +            '$auto_index', '$auto_oldpath', '$auto_path', '$env',
            +            '$tcl_interactive', '$tcl_libpath', '$tcl_library',
            +            '$tcl_pkgPath', '$tcl_platform', '$tcl_precision', '$tcl_traceExec',
            +            ),
            +
            +        /*
            +         * Set 3: standard library
            +         */
            +        3 => array(
            +            'comment', 'filename', 'library', 'packagens', 'tcltest', 'tclvars',
            +            ),
            +
            +        /*
            +         * Set 4: special methods
            +         */
            +//        4 => array(
            +//            )
            +
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '[', ']', '{', '}', '$', '*', '&', '%', '!', ';', '<', '>', '?'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +//        4 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #ff7700;font-weight:bold;',    // Reserved
            +            2 => 'color: #008000;',                        // Built-ins + self
            +            3 => 'color: #dc143c;',                        // Standard lib
            +//            4 => 'color: #0000cd;'                        // Special methods
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;',
            +//            2 => 'color: #483d8b;',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: black;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #483d8b;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #ff4500;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: black;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #ff3333;'
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +//        4 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '::'
            +        ),
            +    'REGEXPS' => array(
            +        //Special variables
            +        0 => '[\\$]+[a-zA-Z_][a-zA-Z0-9_]*',
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'PARSER_CONTROL' => array(
            +        'COMMENTS' => array(
            +            'DISALLOWED_BEFORE' => '\\'
            +        )
            +    )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/teraterm.php b/vendor/easybook/geshi/geshi/teraterm.php
            new file mode 100644
            index 0000000000..2c12cdc410
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/teraterm.php
            @@ -0,0 +1,353 @@
            + 'Tera Term Macro',
            +    'COMMENT_SINGLE' => array(1 => ';'),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        /* Commands */
            +        1 => array(
            +            'Beep',
            +            'BplusRecv',
            +            'BplusSend',
            +            'Break',
            +            'Call',
            +            'CallMenu',
            +            'ChangeDir',
            +            'ClearScreen',
            +            'Clipb2Var',
            +            'ClosesBox',
            +            'CloseTT',
            +            'Code2Str',
            +            'Connect',
            +            'CRC32',
            +            'CRC32File',
            +            'CygConnect',
            +            'DelPassword',
            +            'Disconnect',
            +            'DispStr',
            +            'Do',
            +            'Else',
            +            'ElseIf',
            +            'EnableKeyb',
            +            'End',
            +            'EndIf',
            +            'EndUntil',
            +            'EndWhile',
            +            'Exec',
            +            'ExecCmnd',
            +            'Exit',
            +            'FileClose',
            +            'FileConcat',
            +            'FileCopy',
            +            'FileCreate',
            +            'FileDelete',
            +            'FileMarkPtr',
            +            'FileNameBox',
            +            'FileOpen',
            +            'FileRead',
            +            'FileReadln',
            +            'FileRename',
            +            'FileSearch',
            +            'FileSeek',
            +            'FileSeekBack',
            +            'FileStat',
            +            'FileStrSeek',
            +            'FileStrSeek2',
            +            'FileTruncate',
            +            'FileWrite',
            +            'FileWriteLn',
            +            'FindClose',
            +            'FindFirst',
            +            'FindNext',
            +            'FlushRecv',
            +            'For',
            +            'GetDate',
            +            'GetDir',
            +            'GetEnv',
            +            'GetHostname',
            +            'GetPassword',
            +            'GetTime',
            +            'GetTitle',
            +            'GetTTDir',
            +            'Getver',
            +            'GoTo',
            +            'If',
            +            'IfDefined',
            +            'Include',
            +            'InputBox',
            +            'Int2Str',
            +            'KmtFinish',
            +            'KmtGet',
            +            'KmtRecv',
            +            'KmtSend',
            +            'LoadKeymap',
            +            'LogClose',
            +            'LogOpen',
            +            'LogPause',
            +            'LogStart',
            +            'LogWrite',
            +            'Loop',
            +            'MakePath',
            +            'MessageBox',
            +            'MPause',
            +            'Next',
            +            'PasswordBox',
            +            'Pause',
            +            'QuickVANRecv',
            +            'QuickVANSend',
            +            'Random',
            +            'RecvLn',
            +            'RestoreSetup',
            +            'Return',
            +            'RotateLeft',
            +            'RotateRight',
            +            'ScpRecv',
            +            'ScpSend',
            +            'Send',
            +            'SendBreak',
            +            'SendBroadcast',
            +            'SendFile',
            +            'SendKCode',
            +            'SendLn',
            +            'SendLnBroadcast',
            +            'SendMulticast',
            +            'SetBaud',
            +            'SetDate',
            +            'SetDebug',
            +            'SetDir',
            +            'SetDlgPos',
            +            'SetDTR',
            +            'SetEcho',
            +            'SetEnv',
            +            'SetExitCode',
            +            'SetMulticastName',
            +            'SetRTS',
            +            'SetSync',
            +            'SetTime',
            +            'SetTitle',
            +            'Show',
            +            'ShowTT',
            +            'SPrintF',
            +            'SPrintF2',
            +            'StatusBox',
            +            'Str2Code',
            +            'Str2Int',
            +            'StrCompare',
            +            'StrConcat',
            +            'StrCopy',
            +            'StrInsert',
            +            'StrJoin',
            +            'StrLen',
            +            'StrMatch',
            +            'StrRemove',
            +            'StrReplace',
            +            'StrScan',
            +            'StrSpecial',
            +            'StrSplit',
            +            'StrTrim',
            +            'TestLink',
            +            'Then',
            +            'ToLower',
            +            'ToUpper',
            +            'UnLink',
            +            'Until',
            +            'Var2Clipb',
            +            'Wait',
            +            'Wait4All',
            +            'WaitEvent',
            +            'WaitLn',
            +            'WaitN',
            +            'WaitRecv',
            +            'WaitRegEx',
            +            'While',
            +            'XmodemRecv',
            +            'XmodemSend',
            +            'YesNoBox',
            +            'YmodemRecv',
            +            'YmodemSend',
            +            'ZmodemRecv',
            +            'ZmodemSend'
            +            ),
            +        /* System Variables */
            +        2 => array(
            +            'groupmatchstr1',
            +            'groupmatchstr2',
            +            'groupmatchstr3',
            +            'groupmatchstr4',
            +            'groupmatchstr5',
            +            'groupmatchstr6',
            +            'groupmatchstr7',
            +            'groupmatchstr8',
            +            'groupmatchstr9',
            +            'inputstr',
            +            'matchstr',
            +            'mtimeout',
            +            'param2',
            +            'param3',
            +            'param4',
            +            'param5',
            +            'param6',
            +            'param7',
            +            'param8',
            +            'param9',
            +            'result',
            +            'timeout'
            +            ),
            +        /* LogMeTT Key Words */
            +        3 => array(
            +            '$[1]',
            +            '$[2]',
            +            '$[3]',
            +            '$[4]',
            +            '$[5]',
            +            '$[6]',
            +            '$[7]',
            +            '$[8]',
            +            '$[9]',
            +            '$branch$',
            +            '$computername$',
            +            '$connection$',
            +            '$email$',
            +            '$logdir$',
            +            '$logfilename$',
            +            '$lttfilename$',
            +            '$mobile$',
            +            '$name$',
            +            '$pager$',
            +            '$parent$',
            +            '$phone$',
            +            '$snippet$',
            +            '$ttdir$',
            +            '$user$',
            +            '$windir$',
            +        ),
            +        /* Keyword Symbols */
            +        4 => array(
            +            'and',
            +            'not',
            +            'or',
            +            'xor'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '[', ']', '{', '}',
            +        '+', '-', '*', '/', '%',
            +        '!', '&', '|', '^',
            +        '<', '>', '=',
            +        '?', ':', ';',
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000080; font-weight: bold!important;',
            +            2 => 'color: #808000; font-weight: bold;',  // System Variables
            +            3 => 'color: #ff0000; font-weight: bold;',  // LogMeTT Key Words
            +            4 => 'color: #ff00ff; font-weight: bold;'   // Keyword Symbols
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #008000; font-style: italic;',
            +            ),
            +        'ESCAPE_CHAR' => array(),
            +        'BRACKETS' => array(
            +            0 => 'color: #ff00ff; font-weight: bold;'
            +        ),
            +        'STRINGS' => array(
            +            0 => 'color: #800080;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #008080;'
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #ff00ff; font-weight: bold;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #0000ff; font-weight: bold;'
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(),
            +    'REGEXPS' => array(
            +        0 => array (
            +            GESHI_SEARCH => '(\:[_a-zA-Z][_a-zA-Z0-9]+)',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            )
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(),
            +    'TAB_WIDTH' => 4
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/text.php b/vendor/easybook/geshi/geshi/text.php
            new file mode 100644
            index 0000000000..3c7f17c62d
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/text.php
            @@ -0,0 +1,82 @@
            + 'Text',
            +    'COMMENT_SINGLE' => array(),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array(),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(),
            +    'SYMBOLS' => array(),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(),
            +        'COMMENTS' => array(),
            +        'ESCAPE_CHAR' => array(),
            +        'BRACKETS' => array(),
            +        'STRINGS' => array(),
            +        'NUMBERS' => array(),
            +        'METHODS' => array(),
            +        'SYMBOLS' => array(),
            +        'SCRIPT' => array(),
            +        'REGEXPS' => array()
            +        ),
            +    'URLS' => array(),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(),
            +    'REGEXPS' => array(),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(),
            +    'PARSER_CONTROL' => array(
            +        'ENABLE_FLAGS' => array(
            +            'ALL' => GESHI_NEVER
            +        ),
            +    )
            +);
            diff --git a/vendor/easybook/geshi/geshi/thinbasic.php b/vendor/easybook/geshi/geshi/thinbasic.php
            new file mode 100644
            index 0000000000..3d2034921f
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/thinbasic.php
            @@ -0,0 +1,866 @@
            + 'thinBasic',
            +    'COMMENT_SINGLE' => array(1 => "'"),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'XOR','XML_TREETOSTRING','XML_PARSEFILE','XML_PARSE','XML_PARENT','XML_NODETYPE','XML_NODETOSTRING','XML_NEXTSIBLING',
            +            'XML_LASTERROR','XML_GETTAG','XML_FREE','XML_FINDNODE','XML_DECODEPARAM','XML_CHILDDATA','XML_CHILD','XML_ATTRIBVALUE',
            +            'XML_ATTRIBNAME','XML_ATTRIBCOUNT','WORD','WITH','WIN_SHOW','WIN_SETTITLE','WIN_SETFOREGROUND','WIN_ISZOOMED',
            +            'WIN_ISVISIBLE','WIN_ISICONIC','WIN_GETTITLE','WIN_GETFOREGROUND','WIN_GETCLASS','WIN_GETACTIVE','WIN_FLASH','WIN_FINDBYTITLE',
            +            'WIN_FINDBYCLASS','WHILE','WEND','VERIFY','VARPTR','VARIANTVT$','VARIANTVT','VARIANT',
            +            'VARIABLE_GETINFO','VARIABLE_EXISTS','VARIABLE_EXIST','VALUE','VAL','USING$','USING','USES',
            +            'USER','UNTIL','UNITS','UNION','UNICODE2ASCII','UDP_SEND','UDP_RECV','UDP_OPENSERVER',
            +            'UDP_OPEN','UDP_FREEFILE','UDP_CLOSE','UCODE$','UCASE$','UBOUND','TYPE','TRIMFULL$',
            +            'TRIM$','TOOLTIP','TOKENIZER_MOVETOEOL','TOKENIZER_KEYSETUSERSTRING','TOKENIZER_KEYSETUSERNUMBER','TOKENIZER_KEYGETUSERSTRING','TOKENIZER_KEYGETUSERNUMBER','TOKENIZER_KEYGETSUBTYPE',
            +            'TOKENIZER_KEYGETNAME','TOKENIZER_KEYGETMAINTYPE','TOKENIZER_KEYFIND','TOKENIZER_KEYADD','TOKENIZER_GETNEXTTOKEN','TOKENIZER_DEFAULT_SET','TOKENIZER_DEFAULT_GET','TOKENIZER_DEFAULT_CODE',
            +            'TOKENIZER_DEFAULT_CHAR','TO','TIMER','TIME$','THEN','TEXTBOX','TEXT','TCP_SEND',
            +            'TCP_RECV','TCP_PRINT','TCP_OPEN','TCP_LINEINPUT','TCP_FREEFILE','TCP_CLOSE','TB_IMGCTX_SETIMAGEADJUSTMENT','TB_IMGCTX_LOADIMAGE',
            +            'TB_IMGCTX_GETIMAGEADJUSTMENT','TBGL_VIEWPORT','TBGL_VERTEX','TBGL_USETEXTUREFLAG','TBGL_USETEXTURE','TBGL_USELINESTIPPLEFLAG','TBGL_USELINESTIPPLE','TBGL_USELIGHTSOURCEFLAG',
            +            'TBGL_USELIGHTSOURCE','TBGL_USELIGHTINGFLAG','TBGL_USELIGHTING','TBGL_USEFOGFLAG','TBGL_USEFOG','TBGL_USEDEPTHMASK','TBGL_USEDEPTHFLAG','TBGL_USEDEPTH',
            +            'TBGL_USECLIPPLANEFLAG','TBGL_USECLIPPLANE','TBGL_USEBLENDFLAG','TBGL_USEBLEND','TBGL_USEALPHATEST','TBGL_TRANSLATE','TBGL_TORUS','TBGL_TEXCOORD2D',
            +            'TBGL_SPHERE','TBGL_SHOWWINDOW','TBGL_SHOWCURSOR','TBGL_SETWINDOWTITLE','TBGL_SETUPLIGHTSOURCE','TBGL_SETUPFOG','TBGL_SETUPCLIPPLANE','TBGL_SETPRIMITIVEQUALITY',
            +            'TBGL_SETLIGHTPARAMETER','TBGL_SETDRAWDISTANCE','TBGL_SCALE','TBGL_SAVESCREENSHOT','TBGL_ROTATEXYZ','TBGL_ROTATE','TBGL_RESETMATRIX','TBGL_RENDERTOTEXTURE',
            +            'TBGL_RENDERMATRIX3D','TBGL_RENDERMATRIX2D','TBGL_PUSHMATRIX','TBGL_PRINTFONT','TBGL_PRINTBMP','TBGL_PRINT','TBGL_POS3DTOPOS2D','TBGL_POPMATRIX',
            +            'TBGL_POLYGONLOOK','TBGL_POINTSIZE','TBGL_POINTINSIDE3D','TBGL_NORMAL','TBGL_NEWLIST','TBGL_MOUSEGETWHEELDELTA','TBGL_MOUSEGETRBUTTON','TBGL_MOUSEGETPOSY',
            +            'TBGL_MOUSEGETPOSX','TBGL_MOUSEGETMBUTTON','TBGL_MOUSEGETLBUTTON','TBGL_M15SETVERTEXZ','TBGL_M15SETVERTEXY','TBGL_M15SETVERTEXXYZ','TBGL_M15SETVERTEXX','TBGL_M15SETVERTEXTEXY',
            +            'TBGL_M15SETVERTEXTEXXY','TBGL_M15SETVERTEXTEXX','TBGL_M15SETVERTEXTEXN','TBGL_M15SETVERTEXRGB','TBGL_M15SETVERTEXR','TBGL_M15SETVERTEXPSTOP','TBGL_M15SETVERTEXPARAM','TBGL_M15SETVERTEXLAYER',
            +            'TBGL_M15SETVERTEXG','TBGL_M15SETVERTEXB','TBGL_M15SETMODELVERTEXCOUNT','TBGL_M15SETBONECHILD','TBGL_M15ROTBONEZ','TBGL_M15ROTBONEY','TBGL_M15ROTBONEX','TBGL_M15ROTBONE',
            +            'TBGL_M15RESETBONES','TBGL_M15RECALCNORMALS','TBGL_M15LOADMODEL','TBGL_M15INITMODELBUFFERS','TBGL_M15GETVERTEXZ','TBGL_M15GETVERTEXY','TBGL_M15GETVERTEXXYZ','TBGL_M15GETVERTEXX',
            +            'TBGL_M15GETVERTEXTEXY','TBGL_M15GETVERTEXTEXXY','TBGL_M15GETVERTEXTEXX','TBGL_M15GETVERTEXTEXN','TBGL_M15GETVERTEXRGB','TBGL_M15GETVERTEXR','TBGL_M15GETVERTEXPSTOP','TBGL_M15GETVERTEXPARAM',
            +            'TBGL_M15GETVERTEXLAYER','TBGL_M15GETVERTEXG','TBGL_M15GETVERTEXB','TBGL_M15GETMODELVERTEXCOUNT','TBGL_M15GETMODELPOLYCOUNT','TBGL_M15ERASECHILDBONES','TBGL_M15DRAWMODEL','TBGL_M15DEFBONERESET',
            +            'TBGL_M15DEFBONELAYER','TBGL_M15DEFBONEBOX','TBGL_M15DEFBONEANCHOR','TBGL_M15DEFBONEADDVERTEX','TBGL_M15CLEARMODEL','TBGL_M15APPLYBONES','TBGL_M15ADDBONETREEITEM','TBGL_LOADTEXTURE',
            +            'TBGL_LOADFONT','TBGL_LOADBMPFONT','TBGL_LINEWIDTH','TBGL_LINESTIPPLE','TBGL_KILLFONT','TBGL_ISWINDOW','TBGL_ISPOINTVISIBLE','TBGL_ISPOINTBEHINDVIEW',
            +            'TBGL_GETWINDOWMULTIKEYSTATE','TBGL_GETWINDOWKEYSTATE','TBGL_GETWINDOWKEYONCE','TBGL_GETWINDOWCLIENT','TBGL_GETTEXTURENAME','TBGL_GETTEXTURELIST','TBGL_GETPIXELINFO','TBGL_GETMULTIASYNCKEYSTATE',
            +            'TBGL_GETLASTGLERROR','TBGL_GETFRAMERATE','TBGL_GETDESKTOPINFO','TBGL_GETASYNCKEYSTATE','TBGL_ERRORMESSAGES','TBGL_ENDPOLY','TBGL_ENDLIST','TBGL_DRAWFRAME',
            +            'TBGL_DESTROYWINDOW','TBGL_DELETELIST','TBGL_CYLINDER','TBGL_CREATEWINDOWEX','TBGL_CREATEWINDOW','TBGL_COLORALPHA','TBGL_COLOR','TBGL_CLEARFRAME',
            +            'TBGL_CAMERA','TBGL_CALLLIST','TBGL_BUILDFONT','TBGL_BOX','TBGL_BLENDFUNC','TBGL_BINDTEXTURE','TBGL_BEGINPOLY','TBGL_BACKCOLOR',
            +            'TBGL_ALPHAFUNC','TBDI_JOYZ','TBDI_JOYY','TBDI_JOYX','TBDI_JOYSTOPEFFECT','TBDI_JOYSLIDER','TBDI_JOYSETRANGEZ','TBDI_JOYSETRANGEY',
            +            'TBDI_JOYSETRANGEXYZ','TBDI_JOYSETRANGEX','TBDI_JOYSETDEADZONEZ','TBDI_JOYSETDEADZONEY','TBDI_JOYSETDEADZONEXYZ','TBDI_JOYSETDEADZONEX','TBDI_JOYSETAUTOCENTER','TBDI_JOYRZ',
            +            'TBDI_JOYRY','TBDI_JOYRX','TBDI_JOYPOV','TBDI_JOYPLAYEFFECT','TBDI_JOYLOADEFFECT','TBDI_JOYHASFF','TBDI_JOYHASEFFECT','TBDI_JOYGETEFFECTNAME',
            +            'TBDI_JOYGETEFFECTGUID','TBDI_JOYCREATEEFFECT','TBDI_JOYCOUNTPOV','TBDI_JOYCOUNTEFFECTS','TBDI_JOYCOUNTBTN','TBDI_JOYCOUNTAXES','TBDI_JOYBUTTON','TBDI_JOYAVAIL',
            +            'TBDI_INIT','TBASS_STREAMFREE','TBASS_STREAMCREATEFILE','TBASS_SETVOLUME','TBASS_SETEAXPRESET','TBASS_SETEAXPARAMETERS','TBASS_SETCONFIG','TBASS_SET3DPOSITION',
            +            'TBASS_SET3DFACTORS','TBASS_SAMPLELOAD','TBASS_SAMPLEGETCHANNEL','TBASS_MUSICLOAD','TBASS_MUSICFREE','TBASS_INIT','TBASS_GETVOLUME','TBASS_GETVERSION',
            +            'TBASS_GETCONFIG','TBASS_FREE','TBASS_ERRORGETCODE','TBASS_CHANNELSTOP','TBASS_CHANNELSETPOSITION','TBASS_CHANNELSETATTRIBUTES','TBASS_CHANNELSET3DPOSITION','TBASS_CHANNELPLAY',
            +            'TBASS_CHANNELPAUSE','TBASS_CHANNELISACTIVE','TBASS_CHANNELGETPOSITION','TBASS_CHANNELGETLENGTH','TBASS_CHANNELGETATTRIBUTES','TBASS_APPLY3D','TANH','TANGENT',
            +            'TAN','TALLY','TABCTRL_ONNOTIFY','TABCTRL_INSERTITEM','TABCTRL_GETCURSEL','SWAP','SUB','STRZIP$',
            +            'STRUNZIP$','STRREVERSE$','STRPTRLEN','STRPTR','STRINSERT$','STRING$','STRING','STRDELETE$',
            +            'STR$','STOP','STEP','STDOUT','STDIN','STAT_SUM','STAT_STDERROR','STAT_STDDEVIATION',
            +            'STAT_RANDOM','STAT_PRODUCT','STAT_MIN','STAT_MEDIAN','STAT_MEANHARMONIC','STAT_MEANGEOMETRIC','STAT_MEANARITHMETIC','STAT_MAX',
            +            'STAT_INVERSESUM','STAT_HISTOGRAM','STAT_FILLARRAY','STAT_COUNT','STAT_COPYARRAY','STAT_CLONEARRAY','STAT_CHISQUARE','STATIC',
            +            'STATE','SQR','SPLIT','SORT','SMTP_STATISTICS','SMTP_SETOPTION','SMTP_SETLOGFILE','SMTP_SENDHTML',
            +            'SMTP_SENDEMAIL','SMTP_GETERROR','SMTP_FINISHED','SMTP_DEBUG','SMTP_CONNECT','SMTP_CLOSE','SLEEP','SIZEOF',
            +            'SIZE','SINH','SINGLE','SIN','SIGNED','SHOW','SHIFT','SHAPETOBMP',
            +            'SGN','SETAT','SET','SENDMESSAGE','SENDKEYSBULK','SENDKEYS','SEND','SELECTEXPRESSION',
            +            'SELECT','SECH','SEC','SCAN','SAPI_SPEAK','SAPI_SETVOLUME','SAPI_SETRATE','SAPI_MODULELOADED',
            +            'SAPI_GETVOLUME','SAPI_GETRATE','RTRIM$','RTF_SETTEXT','RTF_SETFONTSIZE','RTF_SETFONTNAME','RTF_SETFGCOLOR','RTF_SETEFFECT',
            +            'RTF_SETBGCOLOR','RTF_SETALIGN','RTF_SAVETOFILE','RTF_LOADFROMFILE','RTF_GETTEXT','RTF_GETFONTSIZE','RTF_GETFONTNAME','RTF_GETEFFECT',
            +            'RTF_GETCLASS','RTF_APPENDTEXT','RSET$','ROUND','RNDF','RND','RIGHT$','RIGHT',
            +            'RGB','RESOURCE','RESIZE','RESET','REPLACE$','REPEAT$','REMOVE$','REM',
            +            'REGISTRY_SETVALUE','REGISTRY_SETTXTNUM','REGISTRY_SETTXTBOOL','REGISTRY_SETDWORD','REGISTRY_GETVALUE','REGISTRY_GETTXTNUM','REGISTRY_GETTXTBOOL','REGISTRY_GETDWORD',
            +            'REGISTRY_GETALLKEYS','REGISTRY_DELVALUE','REGISTRY_DELKEY','REFERENCE','REF','REDRAW','REDIM','RAS_SETPARAMS',
            +            'RAS_OPENDIALUPDIALOG','RAS_LOADENTRIES','RAS_HANGUPALL','RAS_HANGUP','RAS_GETENTRY','RAS_BEGINDIAL','RANDOMIZE','RADTODEG',
            +            'QUERYPERFORMANCEFREQUENCY','QUERYPERFORMANCECOUNTER','QUAD','PTR','PRESERVE','POST','POPUP','POKE$',
            +            'POKE','PIXELS','PI','PERMUTATIONS','PEEKMESSAGE','PEEK$','PEEK','PC_SYSTEMUPFROM',
            +            'PC_SUSPENDSTATE','PC_SHUTDOWN','PC_SHOWCARET','PC_SETCARETBLINKTIME','PC_RESTARTDIALOG','PC_PREVENTSHUTDOWN','PC_LOCK','PC_INSERTCD',
            +            'PC_HIDECARET','PC_GETSTATEONOFF','PC_GETSCROLLLOCKKEYSTATE','PC_GETNUMLOCKKEYSTATE','PC_GETCARETBLINKTIME','PC_GETCAPSLOCKKEYSTATE','PC_EMPTYBIN','PC_EJECTCD',
            +            'PC_DECODECDERROR','PCT','PARSESET$','PARSECOUNT','PARSE$','PARSE','PARAMETERS','OUTSIDE',
            +            'OS_WINVERSIONTEXT','OS_WINGETVERSIONTIMELINE','OS_SHELLEXECUTE','OS_SHELLABOUT','OS_SHELL','OS_SETLASTCALLDLLERROR','OS_SERVICESTOP','OS_SERVICESTATUSDESCRIPTION',
            +            'OS_SERVICESTARTTYPEDESCRIPTION','OS_SERVICESTART','OS_SERVICESETSTARTTYPE','OS_SERVICEQUERY','OS_SERVICEGETSTARTTYPE','OS_SERVICEGETLIST','OS_PROCESSKILLBYNAME','OS_PROCESSKILLBYID',
            +            'OS_PROCESSISRUNNING','OS_PROCESSGETLIST','OS_PROCESSGETID','OS_PROCESSARERUNNING','OS_MESSAGEBEEP','OS_ISWOW64','OS_ISFEATUREPRESENT','OS_IEVERSION',
            +            'OS_GETWINDOWSDIR','OS_GETUSERNAME','OS_GETTEMPDIR','OS_GETSYSTEMDIR','OS_GETSPECIALFOLDER','OS_GETLASTCALLDLLSTATUS','OS_GETLASTCALLDLLERROR','OS_GETCURRENTTHREADID',
            +            'OS_GETCURRENTPROCESSID','OS_GETCOMPUTERNAME','OS_GETCOMMANDS','OS_GETCOMMAND','OS_FLASHWINDOW','OS_FATALAPPEXIT','OS_ENVIRON','OS_CALLDLL',
            +            'OR','OPTIONAL','OPTION','OPT','ONCE','ON','OFF','NUMBER',
            +            'NOT','NEXT','NEW','MSGBOX','MOUSEPTR','MODULE','MODELESS','MODAL',
            +            'MOD','MKWRD$','MKS$','MKQ$','MKL$','MKI$','MKE$','MKDWD$',
            +            'MKD$','MKCUX$','MKCUR$','MKBYT$','MIN$','MIN','MID$','MENU',
            +            'MDI_CREATE','MCASE$','MAX$','MAX','MAKWRD','MAKLNG','MAKINT','MAKDWR',
            +            'LTRIM$','LSET$','LOWRD','LOOP','LONG','LOINT','LOG_WRITE','LOGB',
            +            'LOG2','LOG10','LOG','LOCAL','LOC','LL_UPDATEBYNAME','LL_UPDATE','LL_TOSTRING',
            +            'LL_TOFILE','LL_NAME','LL_GETITEM','LL_GETBYNUMBER','LL_FROMFILE','LL_FREE','LL_FINDLAST','LL_FINDBYNAME',
            +            'LL_FINDBYDATA','LL_DELETELIKE','LL_DELETEBYNAME','LL_DELETE','LL_DATABYNAME','LL_DATA','LL_COUNT','LL_ADD',
            +            'LISTBOX','LINE','LIBRARY_EXISTS','LIB','LEN','LEFT$','LEFT','LCASE$',
            +            'LBOUND','LABEL','KILL','JOIN$','ITERATE','ISWINDOW','ISUNICODE','ISTRUE',
            +            'ISODD','ISLIKE','ISFALSE','ISEVEN','IP_TOSTRING','IP_ADDR','INTERNALINFO','INTEGER',
            +            'INT','INSTR','INSIDE','INPUTBOX$','INI_SETKEY','INI_GETSECTIONSLIST','INI_GETSECTIONKEYLIST','INI_GETKEY',
            +            'INET_URLDOWNLOAD','INET_PING','INET_OPENDIALUPDIALOG','INET_GETSTATE','INET_GETREMOTEMACADDRESS','INET_GETIP','INET_GETCONNECTIONMODE','INCR',
            +            'IN','IMAGE','IIF$','IIF','IF','ICRYPTO_TESTSHA1','ICRYPTO_TESTMD5','ICRYPTO_TESTCRC32',
            +            'ICRYPTO_TESTCRC16','ICRYPTO_STRING2ASCII','ICRYPTO_SHA1','ICRYPTO_MD5','ICRYPTO_ENCRYPTRIJNDAEL','ICRYPTO_ENCRYPTRC4','ICRYPTO_DECRYPTRIJNDAEL','ICRYPTO_DECRYPTRC4',
            +            'ICRYPTO_CRC32','ICRYPTO_CRC16','ICRYPTO_BYTEXOR','ICRYPTO_BIN2ASCII','ICRYPTO_ASCII2STRING','ICRYPTO_ASCII2BIN','HOST_ADDR','HOSTNAME_TOIP',
            +            'HOSTIP_TONAME','HIWRD','HIINT','HEX$','HASH','HANDLE','GUIDTXT$','GUID$',
            +            'GRAPHIC','GLVOID','GLUSHORT','GLUINT','GLUBYTE','GLSIZEI','GLSHORT','GLOBAL',
            +            'GLINT','GLFLOAT','GLENUM','GLDOUBLE','GLCLAMPF','GLCLAMPD','GLBYTE','GLBOOLEAN',
            +            'GLBITFIELD','GETWINDOWMULTIKEYSTATE','GETWINDOWKEYSTATE','GETTICKCOUNT','GETS','GETMULTIASYNCKEYSTATE','GETMESSAGE','GETCURRENTINSTANCE',
            +            'GETAT','GETASYNCKEYSTATE','GET','FUNCTION_NPARAMS','FUNCTION_EXISTS','FUNCTION_CPARAMS','FUNCTION','FTP_SETSTRING',
            +            'FTP_SETSERVERDIR','FTP_SETNUMBER','FTP_SETMODE','FTP_SETLOGFILE','FTP_SETLOCALDIR','FTP_QUIT','FTP_PUTFILE','FTP_GETSTRING',
            +            'FTP_GETSERVERDIR','FTP_GETNUMBER','FTP_GETLOCALDIR','FTP_GETLIST','FTP_GETFILE','FTP_GETERRORSTRING','FTP_GETERRORNUMBER','FTP_FINISHED',
            +            'FTP_EXTRACT','FTP_DELFILE','FTP_CONNECT','FTP_COMMAND','FRAME','FRAC','FORMAT$','FOR',
            +            'FONT_LIST','FONT_CREATE','FONT','FOCUS','FLUSH','FIX','FILE_SIZE','FILE_SHELLDELETE',
            +            'FILE_SHELLCOPY','FILE_SETDATETIME','FILE_SEEK','FILE_SAVE','FILE_RENAME','FILE_PUT','FILE_PATHSPLIT','FILE_OPEN',
            +            'FILE_LOF','FILE_LOAD','FILE_LINEPRINT','FILE_LINEINPUT','FILE_KILL','FILE_GETVERSIONSTRING','FILE_GETVERSION','FILE_GETTIME',
            +            'FILE_GETDATETIMESTAMP','FILE_GETDATETIME','FILE_GETDATE','FILE_GET','FILE_EXISTS','FILE_EOF','FILE_COPY','FILE_CLOSE',
            +            'FILE_CHANGED','FILE_APPEND','FACTORIAL','EXTRACT$','EXT','EXPORT','EXP2','EXP10',
            +            'EXP','EXIT','EVAL_STRING','EVAL_SETSTRING','EVAL_SETNUMBER','EVAL_MATH','EVAL_LINKEXT','EVAL_GETSTRING',
            +            'EVAL_GETNUMBER','EVAL_ERRORGETTOKEN','EVAL_ERRORDESCRIPTION','EVAL_ERRORCLEAR','EVAL','ERRCLEAR','ERR','ENGINE_GETCURRENTTOKEN',
            +            'ENDIF','END','ENABLE','ELSEIF','ELSE','ECHO','DWORD','DT_YEAR',
            +            'DT_TIMETOSEC','DT_TIMESUBSECONDS','DT_TIMEFORMAT','DT_TIMEADDSECONDS','DT_SETTIMESEPARATOR','DT_SETDATESEPARATOR','DT_SETDATECENTURY','DT_SECTOTIME',
            +            'DT_SECTODATE','DT_SECOND','DT_MONTH','DT_MINUTE','DT_LASTDAYOFMONTH','DT_ISVALIDDATE','DT_ISLEAPYEAR','DT_HOUR',
            +            'DT_GETWEEKDAYNAME','DT_GETWEEKDAY','DT_GETTIMESTAMP','DT_GETTIMESEPARATOR','DT_GETMONTHNAME','DT_GETDATESEPARATOR','DT_GETDATECENTURY','DT_DAY',
            +            'DT_DATETOSEC','DT_DATETIMESUBSECONDS','DT_DATETIMEADDSECONDS','DT_DATESUBDAYS','DT_DATEFORMAT','DT_DATEDIFF','DT_DATEADDDAYS','DT_COOKIEDATE',
            +            'DRAW','DOUBLE','DOEVENTS','DO','DISABLE','DIR_REMOVE','DIR_MAKEALL','DIR_MAKE',
            +            'DIR_LISTARRAY','DIR_LIST','DIR_ISEMPTY','DIR_ISDIR','DIR_GETCURRENT','DIR_EXISTS','DIR_CHANGEDRIVE','DIR_CHANGE',
            +            'DIM','DICTIONARY_MEMINFO','DICTIONARY_LISTKEYS','DICTIONARY_FREE','DICTIONARY_FIND','DICTIONARY_EXISTS','DICTIONARY_CREATE','DICTIONARY_COUNT',
            +            'DICTIONARY_ADD','DIALOG_STOPEVENTS','DIALOG_SAVEFILE','DIALOG_OPENFILE','DIALOG_GETCONTROL','DIALOG_CHOOSECOLOR','DIALOG_BROWSEFORFOLDER','DIALOG',
            +            'DESKTOP','DESCENDING','DESCEND','DELETEOBJECT','DELETE','DEGTORAD','DECR','DECLARE',
            +            'DATE$','CVWRD','CVS','CVQ','CVL','CVI','CVE','CVDWD',
            +            'CVD','CVCUX','CVCUR','CVBYT','CURRENCY','CUR','CSET$','CSCH',
            +            'CSC','CRYPTO_GETPROVIDERTYPESCOUNT','CRYPTO_GETPROVIDERSCOUNT','CRYPTO_GETDEFAULTPROVIDER','CRYPTO_GENRANDOMSTRING','CRYPTO_ENUMPROVIDERTYPES','CRYPTO_ENUMPROVIDERS','CRYPTO_ENCRYPT',
            +            'CRYPTO_DECRYPT','CREATEFONT','COTH','COTAN','COSH','COS','CONTROL_SETTEXT','CONTROL_GETTEXT',
            +            'CONTROL_GETNUMBER','CONTROL','CONST','CONSOLE_WRITELINE','CONSOLE_WRITE','CONSOLE_WAITKEY','CONSOLE_SHOWWINDOW','CONSOLE_SHOWCURSOR',
            +            'CONSOLE_SETTITLE','CONSOLE_SETTEXTATTRIBUTE','CONSOLE_SETSTDHANDLE','CONSOLE_SETSCREENBUFFERSIZE','CONSOLE_SETPROGRESSBARCHAR','CONSOLE_SETOUTPUTMODE','CONSOLE_SETOUTPUTCP','CONSOLE_SETINPUTMODE',
            +            'CONSOLE_SETFILEAPISTOOEM','CONSOLE_SETFILEAPISTOANSI','CONSOLE_SETCURSORSIZE','CONSOLE_SETCURSORPOSITION','CONSOLE_SETCP','CONSOLE_SETACTIVESCREENBUFFER','CONSOLE_SCROLLWINDOW','CONSOLE_SCROLLBUFFERONEROW',
            +            'CONSOLE_SCROLLBUFFER','CONSOLE_SAVESCREEN','CONSOLE_RESTORESCREEN','CONSOLE_READLINE','CONSOLE_READ','CONSOLE_PROGRESSBAR','CONSOLE_PRINTLINE','CONSOLE_PRINTAT',
            +            'CONSOLE_PRINT','CONSOLE_NORMALSCREEN','CONSOLE_LINE','CONSOLE_INKEYB','CONSOLE_INKEY','CONSOLE_HIDECURSOR','CONSOLE_GETTITLE','CONSOLE_GETTEXTATTRIBUTE',
            +            'CONSOLE_GETSTDHANDLE','CONSOLE_GETSIZEY','CONSOLE_GETSIZEX','CONSOLE_GETPROGRESSBARCHAR','CONSOLE_GETOUTPUTMODE','CONSOLE_GETOUTPUTCP','CONSOLE_GETNUMBEROFMOUSEBUTTONS','CONSOLE_GETINPUTMODE',
            +            'CONSOLE_GETCURSORY','CONSOLE_GETCURSORX','CONSOLE_GETCURSORSIZE','CONSOLE_GETCURRENTFONTINDEX','CONSOLE_GETCP','CONSOLE_GENERATECTRLEVENT','CONSOLE_FULLSCREEN','CONSOLE_FREE',
            +            'CONSOLE_FOREGROUNDRGB','CONSOLE_ENABLECTRLC','CONSOLE_DISABLECTRLC','CONSOLE_CREATESCREENBUFFER','CONSOLE_COLORAT','CONSOLE_CLS','CONSOLE_BOX','CONSOLE_BACKGROUNDRGB',
            +            'CONSOLE_ATTACH','CONSOLE_AREFILEAPISANSI','CONSOLE_ALLOC','COM_VARIANTINIT','COM_VARIANTCOPY','COM_VARIANTCLEAR','COM_SUCCEEDED','COM_STRINGFROMCLSID',
            +            'COM_RELEASE','COM_QUERYINTERFACE','COM_PROGIDFROMCLSID','COM_ISEQUALIID','COM_ISEQUALGUID','COM_ISEQUALCLSID','COM_GETOBJECT','COM_GETENGINEGUID',
            +            'COM_EXECUTE','COM_DISPLAYERROR','COM_CREATEOBJECT','COM_CLSIDFROMSTRING','COM_CLSIDFROMPROGID','COM_BUILDVARIANT','COMBOBOX','COMBINATIONS',
            +            'COLOR','CLIPBOARD_SETTEXT','CLIPBOARD_GETTEXT','CLIENT','CLEARMESSAGES','CHR$','CHOOSE$','CHOOSE',
            +            'CHECKBOX','CHECK3STATE','CHECK','CGI_WRITELOGFILE','CGI_WRITE','CGI_URLDECODESTRING','CGI_UPLOADFILESTIME','CGI_UPLOADFILESNUMBER',
            +            'CGI_UPLOADFILESIZE','CGI_STARTSESSION','CGI_SETSESSIONVARIABLE','CGI_RESETDEFAULTSETTINGS','CGI_REMOVESPECIALCHARSPREFIX','CGI_REMOVEQUOTE','CGI_READ','CGI_LOADCONFIGFILE',
            +            'CGI_HEADER','CGI_GETSESSIONVARIABLE','CGI_GETREQUESTMETHOD','CGI_GETQUERYVALUE','CGI_GETCURRENTSESSION','CGI_GETCURRENTGUID','CGI_ENVIRON','CGI_CFGSETOPTION',
            +            'CGI_CFGGETOPTION','CGI_ADDSPECIALCHARSPREFIX','CGI_ADDQUOTE','CEIL','CASE','CALL','BYVAL','BYTE',
            +            'BYREF','BYCMD','BUTTON','BUNDLE_SETSCRIPTPARAMETERS','BUNDLE_SETSCRIPTNAME','BUNDLE_SETFLAGOBFUSCATEMAINSCRIPT','BUNDLE_SETFLAGDELETEAFTERRUN','BUNDLE_SETFLAGCOMPRESSALLFILES',
            +            'BUNDLE_SETFLAGASKBEFOREEXTRACT','BUNDLE_SETEXTRACTIONFOLDER','BUNDLE_SETCREATIONFOLDER','BUNDLE_SETBUNDLENAME','BUNDLE_RESET','BUNDLE_MAKE','BUNDLE_BUILDER','BUNDLE_ADDFOLDER',
            +            'BUNDLE_ADDFILE','BOUNDCHECK','BIN$','BIFF_WRITETEXT','BIFF_WRITENUMBER','BIFF_WRITEDATE','BIFF_SETROWHEIGHT','BIFF_SETCOLWIDTH',
            +            'BIFF_SETBUFFER','BIFF_CREATEFILE','BIFF_CLOSEFILE','BETWEEN','BEEP','BAR','ATTACH','ATN',
            +            'AT','ASSIGN','ASCIZ','ASCIIZ','ASCII2UNICODE','ASCENDING','ASCEND','ASC',
            +            'AS','ARRAY','ARCTANH','ARCSINH','ARCSIN','ARCSECH','ARCSEC','ARCCSCH',
            +            'ARCCSC','ARCCOTH','ARCCOT','ARCCOSH','ARCCOS','APP_TIMER','APP_SOURCEPATH','APP_SOURCENAME',
            +            'APP_SOURCEFULLNAME','APP_PATH','APP_NAME','APP_LISTVARIABLES','APP_LISTKEYWORDS','APP_LISTFUNCTIONS','APP_LISTEQUATES','APP_INCLUDEPATH',
            +            'APP_GETMODULEFULLPATH','APP_COUNTER','APPEND','ANY','ANIMATE_STOP','ANIMATE_PLAY','ANIMATE_OPEN','AND',
            +            'ALIAS','ALERT','ADD','ACODE$','ABS','%DEF','#MINVERSION','#IF',
            +            '#ENDIF','#ELSEIF','#ELSE','#DEFAULT','#DEF','SQLWRITEPRIVATEPROFILESTRING','SQLWRITEFILEDSN','SQLWRITEDSNTOINI',
            +            'SQLVALIDDSN','SQLTRANSACT','SQLTABLES','SQLTABLEPRIVILEGES','SQLSTATISTICS','SQLSPECIALCOLUMNS','SQLSETSTMTOPTION','SQLSETSTMTATTR',
            +            'SQLSETSCROLLOPTIONS','SQLSETPOS','SQLSETPARAM','SQLSETENVATTR','SQLSETDESCREC','SQLSETDESCFIELD','SQLSETCURSORNAME','SQLSETCONNECTOPTION',
            +            'SQLSETCONNECTATTR','SQLSETCONFIGMODE','SQLROWCOUNT','SQLREMOVETRANSLATOR','SQLREMOVEDSNFROMINI','SQLREMOVEDRIVERMANAGER','SQLREMOVEDRIVER','SQLREADFILEDSN',
            +            'SQLPUTDATA','SQLPROCEDURES','SQLPROCEDURECOLUMNS','SQLPRIMARYKEYS','SQLPREPARE','SQLPOSTINSTALLERERROR','SQLPARAMOPTIONS','SQLPARAMDATA',
            +            'SQLNUMRESULTCOLS','SQLNUMPARAMS','SQLNATIVESQL','SQLMORERESULTS','SQLMANAGEDATASOURCES','SQLINSTALLTRANSLATOREX','SQLINSTALLERERROR','SQLINSTALLDRIVERMANAGER',
            +            'SQLINSTALLDRIVEREX','SQLGETTYPEINFO','SQLGETTRANSLATOR','SQLGETSTMTOPTION','SQLGETSTMTATTR','SQLGETPRIVATEPROFILESTRING','SQLGETINSTALLEDDRIVERS','SQLGETINFO',
            +            'SQLGETFUNCTIONS','SQLGETENVATTR','SQLGETDIAGREC','SQLGETDIAGFIELD','SQLGETDESCREC','SQLGETDESCFIELD','SQLGETDATA','SQLGETCURSORNAME',
            +            'SQLGETCONNECTOPTION','SQLGETCONNECTATTR','SQLGETCONFIGMODE','SQLFREESTMT','SQLFREEHANDLE','SQLFREEENV','SQLFREECONNECT','SQLFOREIGNKEYS',
            +            'SQLFETCHSCROLL','SQLFETCH','SQLEXTENDEDFETCH','SQLEXECUTE','SQLEXECDIRECT','SQLERROR','SQLENDTRAN','SQLDRIVERS',
            +            'SQLDRIVERCONNECT','SQLDISCONNECT','SQLDESCRIBEPARAM','SQLDESCRIBECOL','SQLDATASOURCES','SQLCREATEDATASOURCE','SQLCOPYDESC','SQLCONNECT',
            +            'SQLCONFIGDRIVER','SQLCONFIGDATASOURCE','SQLCOLUMNS','SQLCOLUMNPRIVILEGES','SQLCOLATTRIBUTES','SQLCOLATTRIBUTE','SQLCLOSECURSOR','SQLCANCEL',
            +            'SQLBULKOPERATIONS','SQLBROWSECONNECT','SQLBINDPARAMETER','SQLBINDPARAM','SQLBINDCOL','SQLALLOCSTMT','SQLALLOCHANDLE','SQLALLOCENV',
            +            'SQLALLOCCONNECT','ODBCWRONGDRIVER','ODBCWRITEPRIVATEPROFILESTRING','ODBCWRITEFILEDSN','ODBCWRITEDSNTOINI','ODBCVALIDDSN','ODBCUPDATERECORD','ODBCUPDATEBYBOOKMARK',
            +            'ODBCUNLOCKRECORD','ODBCUNBINDCOLUMNS','ODBCUNBINDCOL','ODBCTABLESCOUNT','ODBCTABLES','ODBCTABLEPRIVILEGESCOUNT','ODBCTABLEPRIVILEGES','ODBCSUPPORTS',
            +            'ODBCSTATTABLESCHEMANAME','ODBCSTATTABLEPAGES','ODBCSTATTABLECATALOGNAME','ODBCSTATTABLECARDINALITY','ODBCSTATISTICSCOUNT','ODBCSTATISTICS','ODBCSTATINDEXSORTSEQUENCE','ODBCSTATINDEXSCHEMANAME',
            +            'ODBCSTATINDEXQUALIFIER','ODBCSTATINDEXPAGES','ODBCSTATINDEXFILTERCONDITION','ODBCSTATINDEXCOLUMNORDINALPOSITION','ODBCSTATINDEXCOLUMNNAME','ODBCSTATINDEXCATALOGNAME','ODBCSTATINDEXCARDINALITY','ODBCSTATINDEXALLOWDUPLICATES',
            +            'ODBCSPECIALCOLUMNSCOUNT','ODBCSPECIALCOLUMNS','ODBCSETTXNISOLATION','ODBCSETTRANSLATELIB','ODBCSETTRACEFILE','ODBCSETTRACE','ODBCSETSTMTUSEBOOKMARKS','ODBCSETSTMTSIMULATECURSOR',
            +            'ODBCSETSTMTROWSTATUSPTR','ODBCSETSTMTROWSFETCHEDPTR','ODBCSETSTMTROWOPERATIONPTR','ODBCSETSTMTROWBINDTYPE','ODBCSETSTMTROWBINDOFFSETPTR','ODBCSETSTMTROWARRAYSIZE','ODBCSETSTMTRETRIEVEDATA','ODBCSETSTMTQUERYTIMEOUT',
            +            'ODBCSETSTMTPARAMSTATUSPTR','ODBCSETSTMTPARAMSPROCESSEDPTR','ODBCSETSTMTPARAMSETSIZE','ODBCSETSTMTPARAMOPERATIONPTR','ODBCSETSTMTPARAMBINDTYPE','ODBCSETSTMTPARAMBINDOFFSETPTR','ODBCSETSTMTNOSCAN','ODBCSETSTMTMETADATAID',
            +            'ODBCSETSTMTMAXROWS','ODBCSETSTMTMAXLENGTH','ODBCSETSTMTKEYSETSIZE','ODBCSETSTMTFETCHBOOKMARKPTR','ODBCSETSTMTENABLEAUTOIPD','ODBCSETSTMTCURSORTYPE','ODBCSETSTMTCURSORSENSITIVITY','ODBCSETSTMTCURSORSCROLLABLE',
            +            'ODBCSETSTMTCONCURRENCY','ODBCSETSTMTATTR','ODBCSETSTMTASYNCENABLE','ODBCSETSTMTAPPROWDESC','ODBCSETSTMTAPPPARAMDESC','ODBCSETSTATICCURSOR','ODBCSETROWVERCONCURRENCY','ODBCSETRESULT',
            +            'ODBCSETRELATIVEPOSITION','ODBCSETREADONLYCONCURRENCY','ODBCSETQUIETMODE','ODBCSETPOSITION','ODBCSETPOS','ODBCSETPACKETMODE','ODBCSETOPTIMISTICCONCURRENCY','ODBCSETODBCCURSORS',
            +            'ODBCSETMULTIUSERKEYSETCURSOR','ODBCSETMETADATAID','ODBCSETLOGINTIMEOUT','ODBCSETLOCKCONCURRENCY','ODBCSETKEYSETDRIVENCURSOR','ODBCSETFORWARDONLYCURSOR','ODBCSETENVOUTPUTNTS','ODBCSETENVODBCVERSION',
            +            'ODBCSETENVCPMATCH','ODBCSETENVCONNECTIONPOOLING','ODBCSETENVATTR','ODBCSETDYNAMICCURSOR','ODBCSETDESCREC','ODBCSETDESCFIELD','ODBCSETCURSORTYPE','ODBCSETCURSORSENSITIVITY',
            +            'ODBCSETCURSORSCROLLABILITY','ODBCSETCURSORNAME','ODBCSETCURSORLOCKTYPE','ODBCSETCURSORKEYSETSIZE','ODBCSETCURSORCONCURRENCY','ODBCSETCURRENTCATALOG','ODBCSETCONNECTIONTIMEOUT','ODBCSETCONNECTATTR',
            +            'ODBCSETCONFIGMODE','ODBCSETCONCURVALUESCONCURRENCY','ODBCSETAUTOCOMMITON','ODBCSETAUTOCOMMITOFF','ODBCSETAUTOCOMMIT','ODBCSETASYNCENABLE','ODBCSETACCESSMODE','ODBCSETABSOLUTEPOSITION',
            +            'ODBCROWCOUNT','ODBCROLLBACKTRAN','ODBCROLLBACKENVTRAN','ODBCROLLBACKDBCTRAN','ODBCRESULT','ODBCRESETPARAMS','ODBCREMOVETRANSLATOR','ODBCREMOVEDSNFROMINI',
            +            'ODBCREMOVEDRIVERMANAGER','ODBCREMOVEDRIVER','ODBCREFRESHRECORD','ODBCRECORDCOUNT','ODBCREADFILEDSN','ODBCQUOTEDIDENTIFIERCASE','ODBCPUTDATA','ODBCPROCEDURESCOUNT',
            +            'ODBCPROCEDURES','ODBCPROCEDURECOLUMNSCOUNT','ODBCPROCEDURECOLUMNS','ODBCPRIMARYKEYSCOUNT','ODBCPRIMARYKEYS','ODBCPREPARE','ODBCPOSTINSTALLERERROR','ODBCPARAMDATA',
            +            'ODBCOPENSTMT','ODBCOPENCONNECTION','ODBCNUMRESULTCOLS','ODBCNUMPARAMS','ODBCNATIVESQL','ODBCMOVEPREVIOUS','ODBCMOVENEXT','ODBCMOVELAST',
            +            'ODBCMOVEFIRST','ODBCMOVE','ODBCMORERESULTS','ODBCMANAGEDATASOURCES','ODBCLOCKRECORD','ODBCINSTALLTRANSLATOREX','ODBCINSTALLERERROR','ODBCINSTALLDRIVERMANAGER',
            +            'ODBCINSTALLDRIVEREX','ODBCGETXOPENCLIYEAR','ODBCGETUSERNAME','ODBCGETUNION','ODBCGETTYPEINFOCOUNT','ODBCGETTYPEINFO','ODBCGETTXNISOLATIONOPTION','ODBCGETTXNISOLATION',
            +            'ODBCGETTXNCAPABLE','ODBCGETTRANSLATOR','ODBCGETTRANSLATELIB','ODBCGETTRACEFILE','ODBCGETTRACE','ODBCGETTIMEDATEFUNCTIONS','ODBCGETTIMEDATEDIFFINTERVALS','ODBCGETTIMEDATEADDINTERVALS',
            +            'ODBCGETTABLETERM','ODBCGETSYSTEMFUNCTIONS','ODBCGETSUBQUERIES','ODBCGETSTRINGFUNCTIONS','ODBCGETSTMTUSEBOOKMARKS','ODBCGETSTMTSQLSTATE','ODBCGETSTMTSIMULATECURSOR','ODBCGETSTMTROWSTATUSPTR',
            +            'ODBCGETSTMTROWSFETCHEDPTR','ODBCGETSTMTROWOPERATIONPTR','ODBCGETSTMTROWNUMBER','ODBCGETSTMTROWBINDTYPE','ODBCGETSTMTROWBINDOFFSETPTR','ODBCGETSTMTROWARRAYSIZE','ODBCGETSTMTRETRIEVEDATA','ODBCGETSTMTQUERYTIMEOUT',
            +            'ODBCGETSTMTPARAMSTATUSPTR','ODBCGETSTMTPARAMSPROCESSEDPTR','ODBCGETSTMTPARAMSETSIZE','ODBCGETSTMTPARAMOPERATIONPTR','ODBCGETSTMTPARAMBINDTYPE','ODBCGETSTMTPARAMBINDOFFSETPTR','ODBCGETSTMTNOSCAN','ODBCGETSTMTMETADATAID',
            +            'ODBCGETSTMTMAXROWS','ODBCGETSTMTMAXLENGTH','ODBCGETSTMTKEYSETSIZE','ODBCGETSTMTIMPROWDESC','ODBCGETSTMTIMPPARAMDESC','ODBCGETSTMTFETCHBOOKMARKPTR','ODBCGETSTMTERRORINFO','ODBCGETSTMTENABLEAUTOIPD',
            +            'ODBCGETSTMTCURSORTYPE','ODBCGETSTMTCURSORSENSITIVITY','ODBCGETSTMTCURSORSCROLLABLE','ODBCGETSTMTCONCURRENCY','ODBCGETSTMTATTR','ODBCGETSTMTASYNCENABLE','ODBCGETSTMTAPPROWDESC','ODBCGETSTMTAPPPARAMDESC',
            +            'ODBCGETSTATICCURSORATTRIBUTES2','ODBCGETSTATICCURSORATTRIBUTES1','ODBCGETSTATEMENTSQLSTATE','ODBCGETSTATEMENTERRORINFO','ODBCGETSTANDARDCLICONFORMANCE','ODBCGETSQLSTATE','ODBCGETSQLCONFORMANCE','ODBCGETSQL92VALUEEXPRESSIONS',
            +            'ODBCGETSQL92STRINGFUNCTIONS','ODBCGETSQL92ROWVALUECONSTRUCTOR','ODBCGETSQL92REVOKE','ODBCGETSQL92RELATIONALJOINOPERATORS','ODBCGETSQL92PREDICATES','ODBCGETSQL92NUMERICVALUEFUNCTIONS','ODBCGETSQL92GRANT','ODBCGETSQL92FOREIGNKEYUPDATERULE',
            +            'ODBCGETSQL92FOREIGNKEYDELETERULE','ODBCGETSQL92DATETIMEFUNCTIONS','ODBCGETSPECIALCHARACTERS','ODBCGETSERVERNAME','ODBCGETSEARCHPATTERNESCAPE','ODBCGETSCROLLOPTIONS','ODBCGETSCHEMAUSAGE','ODBCGETSCHEMATERM',
            +            'ODBCGETROWUPDATES','ODBCGETQUIETMODE','ODBCGETPROCEDURETERM','ODBCGETPROCEDURESSUPPORT','ODBCGETPRIVATEPROFILESTRING','ODBCGETPOSOPERATIONS','ODBCGETPARAMARRAYSELECTS','ODBCGETPARAMARRAYROWCOUNTS',
            +            'ODBCGETPACKETMODE','ODBCGETOUTERJOINS','ODBCGETORDERBYCOLUMNSINSELECT','ODBCGETOJCAPABILITIES','ODBCGETODBCVER','ODBCGETODBCINTERFACECONFORMANCE','ODBCGETODBCCURSORS','ODBCGETNUMERICFUNCTIONS',
            +            'ODBCGETNULLCOLLATION','ODBCGETNONNULLABLECOLUMNS','ODBCGETNEEDLONGDATALEN','ODBCGETMULTRESULTSETS','ODBCGETMULTIPLEACTIVETXN','ODBCGETMETADATAID','ODBCGETMAXUSERNAMELEN','ODBCGETMAXTABLESINSELECT',
            +            'ODBCGETMAXTABLENAMELEN','ODBCGETMAXSTATEMENTLEN','ODBCGETMAXSCHEMANAMELEN','ODBCGETMAXROWSIZEINCLUDESLONG','ODBCGETMAXROWSIZE','ODBCGETMAXPROCEDURENAMELEN','ODBCGETMAXINDEXSIZE','ODBCGETMAXIDENTIFIERLEN',
            +            'ODBCGETMAXDRIVERCONNECTIONS','ODBCGETMAXCURSORNAMELEN','ODBCGETMAXCONCURRENTACTIVITIES','ODBCGETMAXCOLUMNSINTABLE','ODBCGETMAXCOLUMNSINSELECT','ODBCGETMAXCOLUMNSINORDERBY','ODBCGETMAXCOLUMNSININDEX','ODBCGETMAXCOLUMNSINGROUPBY',
            +            'ODBCGETMAXCOLUMNNAMELEN','ODBCGETMAXCHARLITERALLEN','ODBCGETMAXCATALOGNAMELEN','ODBCGETMAXBINARYLITERALLEN','ODBCGETMAXASYNCCONCURRENTSTATEMENTS','ODBCGETLONGVARCHARDATABYCOLNAME','ODBCGETLONGVARCHARDATA','ODBCGETLOGINTIMEOUT',
            +            'ODBCGETLIKEESCAPECLAUSE','ODBCGETKEYWORDS','ODBCGETKEYSETCURSORATTRIBUTES2','ODBCGETKEYSETCURSORATTRIBUTES1','ODBCGETINTEGRITY','ODBCGETINSTALLERERRORMESSAGE','ODBCGETINSTALLERERRORCODE','ODBCGETINSTALLEDDRIVERS',
            +            'ODBCGETINSERTSTATEMENT','ODBCGETINFOSTR','ODBCGETINFOSCHEMAVIEWS','ODBCGETINFOLONG','ODBCGETINFOINT','ODBCGETINFO','ODBCGETINDEXKEYWORDS','ODBCGETIMPROWDESCREC',
            +            'ODBCGETIMPROWDESCFIELDTYPE','ODBCGETIMPROWDESCFIELDSCALE','ODBCGETIMPROWDESCFIELDPRECISION','ODBCGETIMPROWDESCFIELDOCTETLENGTH','ODBCGETIMPROWDESCFIELDNULLABLE','ODBCGETIMPROWDESCFIELDNAME','ODBCGETIMPROWDESCFIELD','ODBCGETIMPPARAMDESCREC',
            +            'ODBCGETIMPPARAMDESCFIELDTYPE','ODBCGETIMPPARAMDESCFIELDSCALE','ODBCGETIMPPARAMDESCFIELDPRECISION','ODBCGETIMPPARAMDESCFIELDOCTETLENGTH','ODBCGETIMPPARAMDESCFIELDNULLABLE','ODBCGETIMPPARAMDESCFIELDNAME','ODBCGETIMPPARAMDESCFIELD','ODBCGETIDENTIFIERQUOTECHAR',
            +            'ODBCGETIDENTIFIERCASE','ODBCGETGROUPBY','ODBCGETFUNCTIONS','ODBCGETFORWARDONLYCURSORATTRIBUTES2','ODBCGETFORWARDONLYCURSORATTRIBUTES1','ODBCGETFILEUSAGE','ODBCGETEXPRESSIONSINORDERBY','ODBCGETERRORINFO',
            +            'ODBCGETENVSQLSTATE','ODBCGETENVOUTPUTNTS','ODBCGETENVODBCVERSION','ODBCGETENVIRONMENTSQLSTATE','ODBCGETENVIRONMENTERRORINFO','ODBCGETENVERRORINFO','ODBCGETENVCPMATCH','ODBCGETENVCONNECTIONPOOLING',
            +            'ODBCGETENVATTR','ODBCGETDYNAMICCURSORATTRIBUTES2','ODBCGETDYNAMICCURSORATTRIBUTES1','ODBCGETDROPVIEW','ODBCGETDROPTRANSLATION','ODBCGETDROPTABLE','ODBCGETDROPSCHEMA','ODBCGETDROPDOMAIN',
            +            'ODBCGETDROPCOLLATION','ODBCGETDROPCHARACTERSET','ODBCGETDROPASSERTION','ODBCGETDRIVERVER','ODBCGETDRIVERODBCVER','ODBCGETDRIVERNAME','ODBCGETDRIVERMANAGERINSTALLPATH','ODBCGETDRIVERHLIB',
            +            'ODBCGETDRIVERHENV','ODBCGETDRIVERHDBC','ODBCGETDMVERMINOR','ODBCGETDMVERMAJOR','ODBCGETDMVER','ODBCGETDIAGREC','ODBCGETDIAGFIELD','ODBCGETDESCSQLSTATE',
            +            'ODBCGETDESCRIPTORSQLSTATE','ODBCGETDESCRIPTORERRORINFO','ODBCGETDESCRIBEPARAMETER','ODBCGETDESCREC','ODBCGETDESCFIELD','ODBCGETDESCERRORINFO','ODBCGETDEFAULTTXNISOLATION','ODBCGETDDLINDEX',
            +            'ODBCGETDBMSVER','ODBCGETDBMSNAME','ODBCGETDBCSQLSTATE','ODBCGETDBCERRORINFO','ODBCGETDATETIMELITERALS','ODBCGETDATASTRINGBYCOLNAME','ODBCGETDATASTRING','ODBCGETDATASOURCEREADONLY',
            +            'ODBCGETDATASOURCENAME','ODBCGETDATAEXTENSIONS','ODBCGETDATABASENAME','ODBCGETDATA','ODBCGETCURSORTYPE','ODBCGETCURSORSENSITIVITYSUPPORT','ODBCGETCURSORSENSITIVITY','ODBCGETCURSORSCROLLABILITY',
            +            'ODBCGETCURSORROLLBACKBEHAVIOR','ODBCGETCURSORNAME','ODBCGETCURSORLOCKTYPE','ODBCGETCURSORKEYSETSIZE','ODBCGETCURSORCONCURRENCY','ODBCGETCURSORCOMMITBEHAVIOR','ODBCGETCURRENTCATALOG','ODBCGETCREATEVIEW',
            +            'ODBCGETCREATETRANSLATION','ODBCGETCREATETABLE','ODBCGETCREATESCHEMA','ODBCGETCREATEDOMAIN','ODBCGETCREATECOLLATION','ODBCGETCREATECHARACTERSET','ODBCGETCREATEASSERTION','ODBCGETCORRELATIONNAME',
            +            'ODBCGETCONVERTVARCHAR','ODBCGETCONVERTVARBINARY','ODBCGETCONVERTTINYINT','ODBCGETCONVERTTIMESTAMP','ODBCGETCONVERTTIME','ODBCGETCONVERTSMALLINT','ODBCGETCONVERTREAL','ODBCGETCONVERTNUMERIC',
            +            'ODBCGETCONVERTLONGVARCHAR','ODBCGETCONVERTLONGVARBINARY','ODBCGETCONVERTINTERVALYEARMONTH','ODBCGETCONVERTINTERVALDAYTIME','ODBCGETCONVERTINTEGER','ODBCGETCONVERTFUNCTIONS','ODBCGETCONVERTFLOAT','ODBCGETCONVERTDOUBLE',
            +            'ODBCGETCONVERTDECIMAL','ODBCGETCONVERTDATE','ODBCGETCONVERTCHAR','ODBCGETCONVERTBIT','ODBCGETCONVERTBINARY','ODBCGETCONVERTBIGINT','ODBCGETCONNECTIONTIMEOUT','ODBCGETCONNECTIONSQLSTATE',
            +            'ODBCGETCONNECTIONERRORINFO','ODBCGETCONNECTIONDEAD','ODBCGETCONNECTATTR','ODBCGETCONFIGMODE','ODBCGETCONCATNULLBEHAVIOR','ODBCGETCOLUMNALIAS','ODBCGETCOLLATIONSEQ','ODBCGETCATALOGUSAGE',
            +            'ODBCGETCATALOGTERM','ODBCGETCATALOGNAMESEPARATOR','ODBCGETCATALOGNAME','ODBCGETCATALOGLOCATION','ODBCGETBOOKMARKPERSISTENCE','ODBCGETBATCHSUPPORT','ODBCGETBATCHROWCOUNT','ODBCGETAUTOIPD',
            +            'ODBCGETAUTOCOMMIT','ODBCGETASYNCMODE','ODBCGETASYNCENABLE','ODBCGETALTERTABLE','ODBCGETALTERDOMAIN','ODBCGETAGGREGATEFUNCTIONS','ODBCGETACTIVEENVIRONMENTS','ODBCGETACCESSMODE',
            +            'ODBCGETACCESSIBLETABLES','ODBCGETACCESSIBLEPROCEDURES','ODBCFREESTMT','ODBCFREEHANDLE','ODBCFREEENV','ODBCFREEDESC','ODBCFREEDBC','ODBCFREECONNECT',
            +            'ODBCFOREIGNKEYSCOUNT','ODBCFOREIGNKEYS','ODBCFETCHSCROLL','ODBCFETCHBYBOOKMARK','ODBCFETCH','ODBCEXTENDEDFETCH','ODBCEXECUTE','ODBCEXECDIRECT',
            +            'ODBCERROR','ODBCEOF','ODBCENDTRAN','ODBCDRIVERSCOUNT','ODBCDRIVERS','ODBCDRIVERCONNECT','ODBCDISCONNECT','ODBCDESCRIBEPARAM',
            +            'ODBCDESCRIBECOL','ODBCDELETERECORD','ODBCDELETEBYBOOKMARK','ODBCDATASOURCES','ODBCCREATEDATASOURCE','ODBCCOPYDESC','ODBCCONNECTIONISDEAD','ODBCCONNECTIONISALIVE',
            +            'ODBCCONNECT','ODBCCONFIGDRIVER','ODBCCONFIGDATASOURCE','ODBCCOMMITTRAN','ODBCCOMMITENVTRAN','ODBCCOMMITDBCTRAN','ODBCCOLUPDATABLE','ODBCCOLUNSIGNED',
            +            'ODBCCOLUNNAMED','ODBCCOLUMNSCOUNT','ODBCCOLUMNS','ODBCCOLUMNPRIVILEGESCOUNT','ODBCCOLUMNPRIVILEGES','ODBCCOLUMN','ODBCCOLTYPENAME','ODBCCOLTYPE',
            +            'ODBCCOLTABLENAME','ODBCCOLSEARCHABLE','ODBCCOLSCHEMANAME','ODBCCOLSCALE','ODBCCOLPRECISION','ODBCCOLOCTETLENGTH','ODBCCOLNUMPRECRADIX','ODBCCOLNULLABLE',
            +            'ODBCCOLNAME','ODBCCOLLOCALTYPENAME','ODBCCOLLITERALSUFFIX','ODBCCOLLITERALPREFIX','ODBCCOLLENGTH','ODBCCOLLABEL','ODBCCOLISNULL','ODBCCOLFIXEDPRECSCALE',
            +            'ODBCCOLDISPLAYSIZE','ODBCCOLCOUNT','ODBCCOLCONCISETYPE','ODBCCOLCATALOGNAME','ODBCCOLCASESENSITIVE','ODBCCOLBASETABLENAME','ODBCCOLBASECOLUMNNAME','ODBCCOLAUTOUNIQUEVALUE',
            +            'ODBCCOLATTRIBUTE','ODBCCLOSESTMTCURSOR','ODBCCLOSESTMT','ODBCCLOSECURSOR','ODBCCLOSECONNECTION','ODBCCLEARRESULT','ODBCCANCEL','ODBCBULKOPERATIONS',
            +            'ODBCBROWSECONNECT','ODBCBINDPARAMETER','ODBCBINDCOLTOWORD','ODBCBINDCOLTOTIMESTAMP','ODBCBINDCOLTOTIME','ODBCBINDCOLTOSTRING','ODBCBINDCOLTOSINGLE','ODBCBINDCOLTOQUAD',
            +            'ODBCBINDCOLTONUMERIC','ODBCBINDCOLTOLONG','ODBCBINDCOLTOINTEGER','ODBCBINDCOLTODWORD','ODBCBINDCOLTODOUBLE','ODBCBINDCOLTODECIMAL','ODBCBINDCOLTODATE','ODBCBINDCOLTOCURRENCY',
            +            'ODBCBINDCOLTOBYTE','ODBCBINDCOLTOBIT','ODBCBINDCOLTOBINARY','ODBCBINDCOL','ODBCALLOCSTMT','ODBCALLOCHANDLE','ODBCALLOCENV','ODBCALLOCDESC',
            +            'ODBCALLOCDBC','ODBCALLOCCONNECT','ODBCADDRECORD','GLVIEWPORT','GLVERTEXPOINTER','GLVERTEX4SV','GLVERTEX4S','GLVERTEX4IV',
            +            'GLVERTEX4I','GLVERTEX4FV','GLVERTEX4F','GLVERTEX4DV','GLVERTEX4D','GLVERTEX3SV','GLVERTEX3S','GLVERTEX3IV',
            +            'GLVERTEX3I','GLVERTEX3FV','GLVERTEX3F','GLVERTEX3DV','GLVERTEX3D','GLVERTEX2SV','GLVERTEX2S','GLVERTEX2IV',
            +            'GLVERTEX2I','GLVERTEX2FV','GLVERTEX2F','GLVERTEX2DV','GLVERTEX2D','GLUUNPROJECT','GLUTESSVERTEX','GLUTESSPROPERTY',
            +            'GLUTESSNORMAL','GLUTESSENDPOLYGON','GLUTESSENDCONTOUR','GLUTESSCALLBACK','GLUTESSBEGINPOLYGON','GLUTESSBEGINCONTOUR','GLUSPHERE','GLUSCALEIMAGE',
            +            'GLUQUADRICTEXTURE','GLUQUADRICORIENTATION','GLUQUADRICNORMALS','GLUQUADRICDRAWSTYLE','GLUQUADRICCALLBACK','GLUPWLCURVE','GLUPROJECT','GLUPICKMATRIX',
            +            'GLUPERSPECTIVE','GLUPARTIALDISK','GLUORTHO2D','GLUNURBSSURFACE','GLUNURBSPROPERTY','GLUNURBSCURVE','GLUNURBSCALLBACK','GLUNEXTCONTOUR',
            +            'GLUNEWTESS','GLUNEWQUADRIC','GLUNEWNURBSRENDERER','GLULOOKAT','GLULOADSAMPLINGMATRICES','GLUGETTESSPROPERTY','GLUGETSTRING','GLUGETNURBSPROPERTY',
            +            'GLUERRORSTRING','GLUENDTRIM','GLUENDSURFACE','GLUENDPOLYGON','GLUENDCURVE','GLUDISK','GLUDELETETESS','GLUDELETEQUADRIC',
            +            'GLUDELETENURBSRENDERER','GLUCYLINDER','GLUBUILD2DMIPMAPS','GLUBUILD1DMIPMAPS','GLUBEGINTRIM','GLUBEGINSURFACE','GLUBEGINPOLYGON','GLUBEGINCURVE',
            +            'GLTRANSLATEF','GLTRANSLATED','GLTEXSUBIMAGE2D','GLTEXSUBIMAGE1D','GLTEXPARAMETERIV','GLTEXPARAMETERI','GLTEXPARAMETERFV','GLTEXPARAMETERF',
            +            'GLTEXIMAGE2D','GLTEXIMAGE1D','GLTEXGENIV','GLTEXGENI','GLTEXGENFV','GLTEXGENF','GLTEXGENDV','GLTEXGEND',
            +            'GLTEXENVIV','GLTEXENVI','GLTEXENVFV','GLTEXENVF','GLTEXCOORDPOINTER','GLTEXCOORD4SV','GLTEXCOORD4S','GLTEXCOORD4IV',
            +            'GLTEXCOORD4I','GLTEXCOORD4FV','GLTEXCOORD4F','GLTEXCOORD4DV','GLTEXCOORD4D','GLTEXCOORD3SV','GLTEXCOORD3S','GLTEXCOORD3IV',
            +            'GLTEXCOORD3I','GLTEXCOORD3FV','GLTEXCOORD3F','GLTEXCOORD3DV','GLTEXCOORD3D','GLTEXCOORD2SV','GLTEXCOORD2S','GLTEXCOORD2IV',
            +            'GLTEXCOORD2I','GLTEXCOORD2FV','GLTEXCOORD2F','GLTEXCOORD2DV','GLTEXCOORD2D','GLTEXCOORD1SV','GLTEXCOORD1S','GLTEXCOORD1IV',
            +            'GLTEXCOORD1I','GLTEXCOORD1FV','GLTEXCOORD1F','GLTEXCOORD1DV','GLTEXCOORD1D','GLSTENCILOP','GLSTENCILMASK','GLSTENCILFUNC',
            +            'GLSHADEMODEL','GLSELECTBUFFER','GLSCISSOR','GLSCALEF','GLSCALED','GLROTATEF','GLROTATED','GLRENDERMODE',
            +            'GLRECTSV','GLRECTS','GLRECTIV','GLRECTI','GLRECTFV','GLRECTF','GLRECTDV','GLRECTD',
            +            'GLREADPIXELS','GLREADBUFFER','GLRASTERPOS4SV','GLRASTERPOS4S','GLRASTERPOS4IV','GLRASTERPOS4I','GLRASTERPOS4FV','GLRASTERPOS4F',
            +            'GLRASTERPOS4DV','GLRASTERPOS4D','GLRASTERPOS3SV','GLRASTERPOS3S','GLRASTERPOS3IV','GLRASTERPOS3I','GLRASTERPOS3FV','GLRASTERPOS3F',
            +            'GLRASTERPOS3DV','GLRASTERPOS3D','GLRASTERPOS2SV','GLRASTERPOS2S','GLRASTERPOS2IV','GLRASTERPOS2I','GLRASTERPOS2FV','GLRASTERPOS2F',
            +            'GLRASTERPOS2DV','GLRASTERPOS2D','GLPUSHNAME','GLPUSHMATRIX','GLPUSHCLIENTATTRIB','GLPUSHATTRIB','GLPRIORITIZETEXTURES','GLPOPNAME',
            +            'GLPOPMATRIX','GLPOPCLIENTATTRIB','GLPOPATTRIB','GLPOLYGONSTIPPLE','GLPOLYGONOFFSET','GLPOLYGONMODE','GLPOINTSIZE','GLPIXELZOOM',
            +            'GLPIXELTRANSFERI','GLPIXELTRANSFERF','GLPIXELSTOREI','GLPIXELSTOREF','GLPIXELMAPUSV','GLPIXELMAPUIV','GLPIXELMAPFV','GLPASSTHROUGH',
            +            'GLORTHO','GLNORMALPOINTER','GLNORMAL3SV','GLNORMAL3S','GLNORMAL3IV','GLNORMAL3I','GLNORMAL3FV','GLNORMAL3F',
            +            'GLNORMAL3DV','GLNORMAL3D','GLNORMAL3BV','GLNORMAL3B','GLNEWLIST','GLMULTMATRIXF','GLMULTMATRIXD','GLMATRIXMODE',
            +            'GLMATERIALIV','GLMATERIALI','GLMATERIALFV','GLMATERIALF','GLMAPGRID2F','GLMAPGRID2D','GLMAPGRID1F','GLMAPGRID1D',
            +            'GLMAP2F','GLMAP2D','GLMAP1F','GLMAP1D','GLLOGICOP','GLLOADNAME','GLLOADMATRIXF','GLLOADMATRIXD',
            +            'GLLOADIDENTITY','GLLISTBASE','GLLINEWIDTH','GLLINESTIPPLE','GLLIGHTMODELIV','GLLIGHTMODELI','GLLIGHTMODELFV','GLLIGHTMODELF',
            +            'GLLIGHTIV','GLLIGHTI','GLLIGHTFV','GLLIGHTF','GLISTEXTURE','GLISLIST','GLISENABLED','GLINTERLEAVEDARRAYS',
            +            'GLINITNAMES','GLINDEXUBV','GLINDEXUB','GLINDEXSV','GLINDEXS','GLINDEXPOINTER','GLINDEXMASK','GLINDEXIV',
            +            'GLINDEXI','GLINDEXFV','GLINDEXF','GLINDEXDV','GLINDEXD','GLHINT','GLGETTEXPARAMETERIV','GLGETTEXPARAMETERFV',
            +            'GLGETTEXLEVELPARAMETERIV','GLGETTEXLEVELPARAMETERFV','GLGETTEXIMAGE','GLGETTEXGENIV','GLGETTEXGENFV','GLGETTEXGENDV','GLGETTEXENVIV','GLGETTEXENVFV',
            +            'GLGETSTRING','GLGETPOLYGONSTIPPLE','GLGETPOINTERV','GLGETPIXELMAPUSV','GLGETPIXELMAPUIV','GLGETPIXELMAPFV','GLGETMATERIALIV','GLGETMATERIALFV',
            +            'GLGETMAPIV','GLGETMAPFV','GLGETMAPDV','GLGETLIGHTIV','GLGETLIGHTFV','GLGETINTEGERV','GLGETFLOATV','GLGETERROR',
            +            'GLGETDOUBLEV','GLGETCLIPPLANE','GLGETBOOLEANV','GLGENTEXTURES','GLGENLISTS','GLFRUSTUM','GLFRONTFACE','GLFOGIV',
            +            'GLFOGI','GLFOGFV','GLFOGF','GLFLUSH','GLFINISH','GLFEEDBACKBUFFER','GLEVALPOINT2','GLEVALPOINT1',
            +            'GLEVALMESH2','GLEVALMESH1','GLEVALCOORD2FV','GLEVALCOORD2F','GLEVALCOORD2DV','GLEVALCOORD2D','GLEVALCOORD1FV','GLEVALCOORD1F',
            +            'GLEVALCOORD1DV','GLEVALCOORD1D','GLENDLIST','GLEND','GLENABLECLIENTSTATE','GLENABLE','GLEDGEFLAGV','GLEDGEFLAGPOINTER',
            +            'GLEDGEFLAG','GLDRAWPIXELS','GLDRAWELEMENTS','GLDRAWBUFFER','GLDRAWARRAYS','GLDISABLECLIENTSTATE','GLDISABLE','GLDEPTHRANGE',
            +            'GLDEPTHMASK','GLDEPTHFUNC','GLDELETETEXTURES','GLDELETELISTS','GLCULLFACE','GLCOPYTEXSUBIMAGE2D','GLCOPYTEXSUBIMAGE1D','GLCOPYTEXIMAGE2D',
            +            'GLCOPYTEXIMAGE1D','GLCOPYPIXELS','GLCOLORPOINTER','GLCOLORMATERIAL','GLCOLORMASK','GLCOLOR4USV','GLCOLOR4US','GLCOLOR4UIV',
            +            'GLCOLOR4UI','GLCOLOR4UBV','GLCOLOR4UB','GLCOLOR4SV','GLCOLOR4S','GLCOLOR4IV','GLCOLOR4I','GLCOLOR4FV',
            +            'GLCOLOR4F','GLCOLOR4DV','GLCOLOR4D','GLCOLOR4BV','GLCOLOR4B','GLCOLOR3USV','GLCOLOR3US','GLCOLOR3UIV',
            +            'GLCOLOR3UI','GLCOLOR3UBV','GLCOLOR3UB','GLCOLOR3SV','GLCOLOR3S','GLCOLOR3IV','GLCOLOR3I','GLCOLOR3FV',
            +            'GLCOLOR3F','GLCOLOR3DV','GLCOLOR3D','GLCOLOR3BV','GLCOLOR3B','GLCLIPPLANE','GLCLEARSTENCIL','GLCLEARINDEX',
            +            'GLCLEARDEPTH','GLCLEARCOLOR','GLCLEARACCUM','GLCLEAR','GLCALLLISTS','GLCALLLIST','GLBLENDFUNC','GLBITMAP',
            +            'GLBINDTEXTURE','GLBEGIN','GLARRAYELEMENT','GLARETEXTURESRESIDENT','GLALPHAFUNC','GLACCUM'),
            +        2 => array(
            +            '$BEL','$BS','$CR','$CRLF','$DQ','$DT_DATE_SEPARATOR','$DT_LANGUAGE','$DT_TIME_SEPARATOR',
            +            '$ESC','$FF','$LF','$NUL','$PC_SD_MY_PC','$SPC','$SQL_OPT_TRACE_FILE_DEFAULT','$SQL_SPEC_STRING',
            +            '$TAB','$TRACKBAR_CLASS','$VT','%ACM_OPEN','%ACM_OPENW','%ACM_PLAY','%ACM_STOP','%ACN_START',
            +            '%ACN_STOP','%ACS_AUTOPLAY','%ACS_CENTER','%ACS_TIMER','%ACS_TRANSPARENT','%APP_COUNTER_FUNLOOKUP','%APP_COUNTER_KEYLOOKUP','%APP_COUNTER_LOOKUP',
            +            '%APP_COUNTER_TESTALPHA','%APP_COUNTER_UDTLOOKUP','%APP_COUNTER_VARLOOKUP','%APP_TIMER_EXECTOTAL','%APP_TIMER_INIT','%APP_TIMER_LOAD','%APP_TIMER_PREPROCESSOR','%AW_ACTIVATE',
            +            '%AW_BLEND','%AW_CENTER','%AW_HIDE','%AW_HOR_NEGATIVE','%AW_HOR_POSITIVE','%AW_SLIDE','%AW_VER_NEGATIVE','%AW_VER_POSITIVE',
            +            '%BCM_FIRST','%BLACK','%BLUE','%BM_GETCHECK','%BM_SETCHECK','%BST_CHECKED','%BST_UNCHECKED','%BS_AUTOCHECKBOX',
            +            '%BS_BOTTOM','%BS_CENTER','%BS_DEFAULT','%BS_DEFPUSHBUTTON','%BS_FLAT','%BS_LEFT','%BS_LEFTTEXT','%BS_MULTILINE',
            +            '%BS_NOTIFY','%BS_OWNERDRAW','%BS_PUSHLIKE','%BS_RIGHT','%BS_TOP','%BS_VCENTER','%BUNDLE_BUILDER_CANCELLED','%CBM_FIRST',
            +            '%CBN_CLOSEUP','%CBN_DBLCLK','%CBN_DROPDOWN','%CBN_EDITCHANGE','%CBN_EDITUPDATE','%CBN_ERRSPACE','%CBN_KILLFOCUS','%CBN_SELCANCEL',
            +            '%CBN_SELCHANGE','%CBN_SELENDCANCEL','%CBN_SELENDOK','%CBN_SETFOCUS','%CBS_AUTOHSCROLL','%CBS_DISABLENOSCROLL','%CBS_DROPDOWN','%CBS_DROPDOWNLIST',
            +            '%CBS_HASSTRINGS','%CBS_LOWERCASE','%CBS_NOINTEGRALHEIGHT','%CBS_SIMPLE','%CBS_SORT','%CBS_UPPERCASE','%CB_SELECTSTRING','%CCM_FIRST',
            +            '%CC_ANYCOLOR','%CC_ENABLEHOOK','%CC_ENABLETEMPLATE','%CC_ENABLETEMPLATEHANDLE','%CC_FULLOPEN','%CC_PREVENTFULLOPEN','%CC_RGBINIT','%CC_SHOWHELP',
            +            '%CC_SOLIDCOLOR','%CFE_BOLD','%CFE_ITALIC','%CFE_LINK','%CFE_PROTECTED','%CFE_STRIKEOUT','%CFE_UNDERLINE','%CFM_ANIMATION',
            +            '%CFM_BACKCOLOR','%CFM_BOLD','%CFM_CHARSET','%CFM_COLOR','%CFM_FACE','%CFM_ITALIC','%CFM_KERNING','%CFM_LCID',
            +            '%CFM_LINK','%CFM_OFFSET','%CFM_PROTECTED','%CFM_REVAUTHOR','%CFM_SIZE','%CFM_SPACING','%CFM_STRIKEOUT','%CFM_STYLE',
            +            '%CFM_UNDERLINE','%CFM_UNDERLINETYPE','%CFM_WEIGHT','%CGI_ACCEPT_FILE_UPLOAD','%CGI_AUTO_ADD_SPECIAL_CHARS_PREFIX','%CGI_AUTO_CREATE_VARS','%CGI_BUFFERIZE_OUTPUT','%CGI_DOUBLE_QUOTE',
            +            '%CGI_FILE_UPLOAD_BASEPATH','%CGI_FORCE_SESSION_VALIDATION','%CGI_MAX_BYTE_FROM_STD_IN','%CGI_REQUEST_METHOD_GET','%CGI_REQUEST_METHOD_POST','%CGI_SESSION_FILE_BASEPATH','%CGI_SINGLE_QUOTE','%CGI_SPECIAL_CHARS_PREFIX',
            +            '%CGI_TEMPORARY_UPLOAD_PATH','%CGI_UPLOAD_CAN_OVERWRITE','%CGI_WRITE_LOG_FILE','%CGI_WRITE_VARS_INTO_LOG_FILE','%CONOLE_ATTACH_PARENT_PROCESS','%CONSOLE_BACKGROUND_BLUE','%CONSOLE_BACKGROUND_GREEN','%CONSOLE_BACKGROUND_INTENSITY',
            +            '%CONSOLE_BACKGROUND_RED','%CONSOLE_BOX_FLAG_3DOFF','%CONSOLE_BOX_FLAG_3DON','%CONSOLE_BOX_FLAG_SHADOW','%CONSOLE_COMMON_LVB_GRID_HORIZONTAL','%CONSOLE_COMMON_LVB_GRID_LVERTICAL','%CONSOLE_COMMON_LVB_GRID_RVERTICAL','%CONSOLE_COMMON_LVB_LEADING_BYTE',
            +            '%CONSOLE_COMMON_LVB_REVERSE_VIDEO','%CONSOLE_COMMON_LVB_TRAILING_BYTE','%CONSOLE_COMMON_LVB_UNDERSCORE','%CONSOLE_CTRL_BREAK_EVENT','%CONSOLE_CTRL_C_EVENT','%CONSOLE_DOUBLE_CLICK','%CONSOLE_ENABLE_AUTO_POSITION','%CONSOLE_ENABLE_ECHO_INPUT',
            +            '%CONSOLE_ENABLE_EXTENDED_FLAGS','%CONSOLE_ENABLE_INSERT_MODE','%CONSOLE_ENABLE_LINE_INPUT','%CONSOLE_ENABLE_MOUSE_INPUT','%CONSOLE_ENABLE_PROCESSED_INPUT','%CONSOLE_ENABLE_PROCESSED_OUTPUT','%CONSOLE_ENABLE_QUICK_EDIT_MODE','%CONSOLE_ENABLE_WINDOW_INPUT',
            +            '%CONSOLE_ENABLE_WRAP_AT_EOL_OUTPUT','%CONSOLE_FOREGROUND_BLUE','%CONSOLE_FOREGROUND_GREEN','%CONSOLE_FOREGROUND_INTENSITY','%CONSOLE_FOREGROUND_RED','%CONSOLE_LBUTTON','%CONSOLE_LINE_HORIZONTAL','%CONSOLE_LINE_VERTICAL',
            +            '%CONSOLE_MBUTTON','%CONSOLE_MOUSE_MOVED','%CONSOLE_MOUSE_WHEELED','%CONSOLE_RBUTTON','%CONSOLE_SCROLLBUF_DOWN','%CONSOLE_SCROLLBUF_UP','%CONSOLE_SCROLLWND_ABSOLUTE','%CONSOLE_SCROLLWND_RELATIVE',
            +            '%CONSOLE_STD_ERROR_HANDLE','%CONSOLE_STD_INPUT_HANDLE','%CONSOLE_STD_OUTPUT_HANDLE','%CONSOLE_SW_FORCEMINIMIZE','%CONSOLE_SW_HIDE','%CONSOLE_SW_MAXIMIZE','%CONSOLE_SW_MINIMIZE','%CONSOLE_SW_RESTORE',
            +            '%CONSOLE_SW_SHOW','%CONSOLE_SW_SHOWDEFAULT','%CONSOLE_SW_SHOWMAXIMIZED','%CONSOLE_SW_SHOWMINIMIZED','%CONSOLE_SW_SHOWMINNOACTIVE','%CONSOLE_SW_SHOWNA','%CONSOLE_SW_SHOWNOACTIVATE','%CONSOLE_SW_SHOWNORMAL',
            +            '%CONSOLE_UNAVAILABLE','%CRYPTO_CALG_DES','%CRYPTO_CALG_RC2','%CRYPTO_CALG_RC4','%CRYPTO_PROV_DH_SCHANNEL','%CRYPTO_PROV_DSS','%CRYPTO_PROV_DSS_DH','%CRYPTO_PROV_FORTEZZA',
            +            '%CRYPTO_PROV_MS_EXCHANGE','%CRYPTO_PROV_RSA_FULL','%CRYPTO_PROV_RSA_SCHANNEL','%CRYPTO_PROV_RSA_SIG','%CRYPTO_PROV_SSL','%CSIDL_ADMINTOOLS','%CSIDL_ALTSTARTUP','%CSIDL_APPDATA',
            +            '%CSIDL_BITBUCKET','%CSIDL_CDBURN_AREA','%CSIDL_COMMON_ADMINTOOLS','%CSIDL_COMMON_ALTSTARTUP','%CSIDL_COMMON_APPDATA','%CSIDL_COMMON_DESKTOPDIRECTORY','%CSIDL_COMMON_DOCUMENTS','%CSIDL_COMMON_FAVORITES',
            +            '%CSIDL_COMMON_MUSIC','%CSIDL_COMMON_PICTURES','%CSIDL_COMMON_PROGRAMS','%CSIDL_COMMON_STARTMENU','%CSIDL_COMMON_STARTUP','%CSIDL_COMMON_TEMPLATES','%CSIDL_COMMON_VIDEO','%CSIDL_CONTROLS',
            +            '%CSIDL_COOKIES','%CSIDL_DESKTOP','%CSIDL_DESKTOPDIRECTORY','%CSIDL_DRIVES','%CSIDL_FAVORITES','%CSIDL_FLAG_CREATE','%CSIDL_FONTS','%CSIDL_HISTORY',
            +            '%CSIDL_INTERNET','%CSIDL_INTERNET_CACHE','%CSIDL_LOCAL_APPDATA','%CSIDL_MYDOCUMENTS','%CSIDL_MYMUSIC','%CSIDL_MYPICTURES','%CSIDL_MYVIDEO','%CSIDL_NETHOOD',
            +            '%CSIDL_NETWORK','%CSIDL_PERSONAL','%CSIDL_PRINTERS','%CSIDL_PRINTHOOD','%CSIDL_PROFILE','%CSIDL_PROGRAMS','%CSIDL_PROGRAM_FILES','%CSIDL_PROGRAM_FILES_COMMON',
            +            '%CSIDL_RECENT','%CSIDL_SENDTO','%CSIDL_STARTMENU','%CSIDL_STARTUP','%CSIDL_SYSTEM','%CSIDL_TEMPLATES','%CSIDL_WINDOWS','%CW_USEDEFAULT',
            +            '%CYAN','%DATE_TIME_FILE_CREATION','%DATE_TIME_LAST_FILE_ACCESS','%DATE_TIME_LAST_FILE_WRITE','%DICTIONARY_MEMINFO_DATA','%DICTIONARY_MEMINFO_KEYS','%DICTIONARY_MEMINFO_TOTAL','%DICTIONARY_SORTDESCENDING',
            +            '%DICTIONARY_SORTKEYS','%DSCAPS_CERTIFIED','%DSCAPS_CONTINUOUSRATE','%DSCAPS_EMULDRIVER','%DSCAPS_SECONDARY16BIT','%DSCAPS_SECONDARY8BIT','%DSCAPS_SECONDARYMONO','%DSCAPS_SECONDARYSTEREO',
            +            '%DSCCAPS_CERTIFIED','%DSCCAPS_EMULDRIVER','%DS_3DLOOK','%DS_ABSALIGN','%DS_CENTER','%DS_CENTERMOUSE','%DS_CONTEXTHELP','%DS_CONTROL',
            +            '%DS_MODALFRAME','%DS_NOFAILCREATE','%DS_SETFONT','%DS_SETFOREGROUND','%DS_SYSMODAL','%DTM_FIRST','%DTM_GETMCCOLOR','%DTM_GETMCFONT',
            +            '%DTM_GETMONTHCAL','%DTM_GETRANGE','%DTM_GETSYSTEMTIME','%DTM_SETFORMAT','%DTM_SETFORMATW','%DTM_SETMCCOLOR','%DTM_SETMCFONT','%DTM_SETRANGE',
            +            '%DTM_SETSYSTEMTIME','%DTN_CLOSEUP','%DTN_DATETIMECHANGE','%DTN_DROPDOWN','%DTN_FORMAT','%DTN_FORMATQUERY','%DTN_FORMATQUERYW','%DTN_FORMATW',
            +            '%DTN_USERSTRING','%DTN_USERSTRINGW','%DTN_WMKEYDOWN','%DTN_WMKEYDOWNW','%DTS_APPCANPARSE','%DTS_LONGDATEFORMAT','%DTS_RIGHTALIGN','%DTS_SHORTDATECENTURYFORMAT',
            +            '%DTS_SHORTDATEFORMAT','%DTS_SHOWNONE','%DTS_TIMEFORMAT','%DTS_UPDOWN','%DT_DATE_CENTURY','%DT_DATE_OK','%DT_DAY_IN_YEAR','%DT_DIFF_IN_DAYS',
            +            '%DT_DIFF_IN_HOURS','%DT_DIFF_IN_MINUTES','%DT_DIFF_IN_SECONDS','%DT_HOURS_IN_DAY','%DT_MINUTES_IN_HOUR','%DT_SECONDS_IN_DAY','%DT_SECONDS_IN_HOUR','%DT_SECONDS_IN_MINUTE',
            +            '%DT_SECONDS_IN_YEAR','%DT_USE_LONG_FORM','%DT_USE_SHORT_FORM','%DT_WRONG_DATE','%DT_WRONG_DAY','%DT_WRONG_MONTH','%ECM_FIRST','%ECOOP_AND',
            +            '%ECOOP_OR','%ECOOP_SET','%ECOOP_XOR','%ECO_AUTOHSCROLL','%ECO_AUTOVSCROLL','%ECO_AUTOWORDSELECTION','%ECO_NOHIDESEL','%ECO_READONLY',
            +            '%ECO_SELECTIONBAR','%ECO_WANTRETURN','%EM_AUTOURLDETECT','%EM_CANPASTE','%EM_CANREDO','%EM_CANUNDO','%EM_CHARFROMPOS','%EM_DISPLAYBAND',
            +            '%EM_EMPTYUNDOBUFFER','%EM_EXGETSEL','%EM_EXLIMITTEXT','%EM_EXLINEFROMCHAR','%EM_EXSETSEL','%EM_FINDTEXT','%EM_FINDTEXTEX','%EM_FINDWORDBREAK',
            +            '%EM_FMTLINES','%EM_FORMATRANGE','%EM_GETAUTOURLDETECT','%EM_GETCHARFORMAT','%EM_GETEDITSTYLE','%EM_GETEVENTMASK','%EM_GETFIRSTVISIBLELINE','%EM_GETHANDLE',
            +            '%EM_GETIMESTATUS','%EM_GETLIMITTEXT','%EM_GETLINE','%EM_GETLINECOUNT','%EM_GETMARGINS','%EM_GETMODIFY','%EM_GETOLEINTERFACE','%EM_GETOPTIONS',
            +            '%EM_GETPARAFORMAT','%EM_GETPASSWORDCHAR','%EM_GETRECT','%EM_GETREDONAME','%EM_GETSCROLLPOS','%EM_GETSEL','%EM_GETSELTEXT','%EM_GETTEXTMODE',
            +            '%EM_GETTEXTRANGE','%EM_GETTHUMB','%EM_GETUNDONAME','%EM_GETWORDBREAKPROC','%EM_GETWORDBREAKPROCEX','%EM_HIDESELECTION','%EM_LIMITTEXT','%EM_LINEFROMCHAR',
            +            '%EM_LINEINDEX','%EM_LINELENGTH','%EM_LINESCROLL','%EM_PASTESPECIAL','%EM_POSFROMCHAR','%EM_REDO','%EM_REPLACESEL','%EM_REQUESTRESIZE',
            +            '%EM_SCROLL','%EM_SCROLLCARET','%EM_SELECTIONTYPE','%EM_SETBKGNDCOLOR','%EM_SETCHARFORMAT','%EM_SETEDITSTYLE','%EM_SETEVENTMASK','%EM_SETHANDLE',
            +            '%EM_SETIMESTATUS','%EM_SETLIMITTEXT','%EM_SETMARGINS','%EM_SETMODIFY','%EM_SETOLECALLBACK','%EM_SETOPTIONS','%EM_SETPARAFORMAT','%EM_SETPASSWORDCHAR',
            +            '%EM_SETREADONLY','%EM_SETRECT','%EM_SETRECTNP','%EM_SETSCROLLPOS','%EM_SETSEL','%EM_SETTABSTOPS','%EM_SETTARGETDEVICE','%EM_SETTEXTMODE',
            +            '%EM_SETUNDOLIMIT','%EM_SETWORDBREAKPROC','%EM_SETWORDBREAKPROCEX','%EM_SETWORDWRAPMODE','%EM_SETZOOM','%EM_STOPGROUPTYPING','%EM_STREAMIN','%EM_STREAMOUT',
            +            '%EM_UNDO','%ENM_CHANGE','%ENM_CORRECTTEXT','%ENM_DRAGDROPDONE','%ENM_DROPFILES','%ENM_KEYEVENTS','%ENM_MOUSEEVENTS','%ENM_NONE',
            +            '%ENM_PARAGRAPHEXPANDED','%ENM_PROTECTED','%ENM_REQUESTRESIZE','%ENM_SCROLL','%ENM_SCROLLEVENTS','%ENM_SELCHANGE','%ENM_UPDATE','%EN_CHANGE',
            +            '%EN_MSGFILTER','%EN_SELCHANGE','%EN_UPDATE','%ES_AUTOHSCROLL','%ES_AUTOVSCROLL','%ES_CENTER','%ES_DISABLENOSCROLL','%ES_EX_NOCALLOLEINIT',
            +            '%ES_LEFT','%ES_LOWERCASE','%ES_MULTILINE','%ES_NOHIDESEL','%ES_NOOLEDRAGDROP','%ES_NUMBER','%ES_OEMCONVERT','%ES_PASSWORD',
            +            '%ES_READONLY','%ES_RIGHT','%ES_SAVESEL','%ES_SELECTIONBAR','%ES_SUNKEN','%ES_UPPERCASE','%ES_WANTRETURN','%EVAL_EXEC_STRING',
            +            '%FALSE','%FILE_ADDPATH','%FILE_ARCHIVE','%FILE_BUILDVERSION','%FILE_HIDDEN','%FILE_MAJORVERSION','%FILE_MINORVERSION','%FILE_NORMAL',
            +            '%FILE_READONLY','%FILE_REVISIONVERSION','%FILE_SUBDIR','%FILE_SYSTEM','%FILE_VLABEL','%FTP_GET_CONNECT_STATUS','%FTP_GET_FILE_BYTES_RCVD','%FTP_GET_FILE_BYTES_SENT',
            +            '%FTP_GET_LAST_RESPONSE','%FTP_GET_LOCAL_IP','%FTP_GET_SERVER_IP','%FTP_GET_TOTAL_BYTES_RCVD','%FTP_GET_TOTAL_BYTES_SENT','%FTP_LIST_FULLLIST','%FTP_LIST_FULLLISTDIR','%FTP_LIST_FULLLISTFILE',
            +            '%FTP_SET_ASYNC','%FTP_SET_CONNECT_WAIT','%FTP_SET_MAX_LISTEN_WAIT','%FTP_SET_MAX_RESPONSE_WAIT','%FTP_SET_PASSIVE','%FTP_SET_SYNC','%FW_BLACK','%FW_BOLD',
            +            '%FW_DEMIBOLD','%FW_DONTCARE','%FW_EXTRABOLD','%FW_EXTRALIGHT','%FW_HEAVY','%FW_LIGHT','%FW_MEDIUM','%FW_NORMAL',
            +            '%FW_REGULAR','%FW_SEMIBOLD','%FW_THIN','%FW_ULTRABOLD','%FW_ULTRALIGHT','%GDTR_MAX','%GDTR_MIN','%GLU_AUTO_LOAD_MATRIX',
            +            '%GLU_BEGIN','%GLU_CCW','%GLU_CULLING','%GLU_CW','%GLU_DISPLAY_MODE','%GLU_DOMAIN_DISTANCE','%GLU_EDGE_FLAG','%GLU_END',
            +            '%GLU_ERROR','%GLU_EXTENSIONS','%GLU_EXTERIOR','%GLU_FALSE','%GLU_FILL','%GLU_FLAT','%GLU_INCOMPATIBLE_GL_VERSION','%GLU_INSIDE',
            +            '%GLU_INTERIOR','%GLU_INVALID_ENUM','%GLU_INVALID_VALUE','%GLU_LINE','%GLU_MAP1_TRIM_2','%GLU_MAP1_TRIM_3','%GLU_NONE','%GLU_NURBS_ERROR1',
            +            '%GLU_NURBS_ERROR10','%GLU_NURBS_ERROR11','%GLU_NURBS_ERROR12','%GLU_NURBS_ERROR13','%GLU_NURBS_ERROR14','%GLU_NURBS_ERROR15','%GLU_NURBS_ERROR16','%GLU_NURBS_ERROR17',
            +            '%GLU_NURBS_ERROR18','%GLU_NURBS_ERROR19','%GLU_NURBS_ERROR2','%GLU_NURBS_ERROR20','%GLU_NURBS_ERROR21','%GLU_NURBS_ERROR22','%GLU_NURBS_ERROR23','%GLU_NURBS_ERROR24',
            +            '%GLU_NURBS_ERROR25','%GLU_NURBS_ERROR26','%GLU_NURBS_ERROR27','%GLU_NURBS_ERROR28','%GLU_NURBS_ERROR29','%GLU_NURBS_ERROR3','%GLU_NURBS_ERROR30','%GLU_NURBS_ERROR31',
            +            '%GLU_NURBS_ERROR32','%GLU_NURBS_ERROR33','%GLU_NURBS_ERROR34','%GLU_NURBS_ERROR35','%GLU_NURBS_ERROR36','%GLU_NURBS_ERROR37','%GLU_NURBS_ERROR4','%GLU_NURBS_ERROR5',
            +            '%GLU_NURBS_ERROR6','%GLU_NURBS_ERROR7','%GLU_NURBS_ERROR8','%GLU_NURBS_ERROR9','%GLU_OUTLINE_PATCH','%GLU_OUTLINE_POLYGON','%GLU_OUTSIDE','%GLU_OUT_OF_MEMORY',
            +            '%GLU_PARAMETRIC_ERROR','%GLU_PARAMETRIC_TOLERANCE','%GLU_PATH_LENGTH','%GLU_POINT','%GLU_SAMPLING_METHOD','%GLU_SAMPLING_TOLERANCE','%GLU_SILHOUETTE','%GLU_SMOOTH',
            +            '%GLU_TESS_BEGIN','%GLU_TESS_BEGIN_DATA','%GLU_TESS_BOUNDARY_ONLY','%GLU_TESS_COMBINE','%GLU_TESS_COMBINE_DATA','%GLU_TESS_COORD_TOO_LARGE','%GLU_TESS_EDGE_FLAG','%GLU_TESS_EDGE_FLAG_DATA',
            +            '%GLU_TESS_END','%GLU_TESS_END_DATA','%GLU_TESS_ERROR','%GLU_TESS_ERROR1','%GLU_TESS_ERROR2','%GLU_TESS_ERROR3','%GLU_TESS_ERROR4','%GLU_TESS_ERROR5',
            +            '%GLU_TESS_ERROR6','%GLU_TESS_ERROR7','%GLU_TESS_ERROR8','%GLU_TESS_ERROR_DATA','%GLU_TESS_MISSING_BEGIN_CONTOUR','%GLU_TESS_MISSING_BEGIN_POLYGON','%GLU_TESS_MISSING_END_CONTOUR','%GLU_TESS_MISSING_END_POLYGON',
            +            '%GLU_TESS_NEED_COMBINE_CALLBACK','%GLU_TESS_TOLERANCE','%GLU_TESS_VERTEX','%GLU_TESS_VERTEX_DATA','%GLU_TESS_WINDING_ABS_GEQ_TWO','%GLU_TESS_WINDING_NEGATIVE','%GLU_TESS_WINDING_NONZERO','%GLU_TESS_WINDING_ODD',
            +            '%GLU_TESS_WINDING_POSITIVE','%GLU_TESS_WINDING_RULE','%GLU_TRUE','%GLU_UNKNOWN','%GLU_U_STEP','%GLU_VERSION','%GLU_VERSION_1_1','%GLU_VERSION_1_2',
            +            '%GLU_VERTEX','%GLU_V_STEP','%GL_2D','%GL_2_BYTES','%GL_3D','%GL_3D_COLOR','%GL_3D_COLOR_TEXTURE','%GL_3_BYTES',
            +            '%GL_4D_COLOR_TEXTURE','%GL_4_BYTES','%GL_ABGR_EXT','%GL_ACCUM','%GL_ACCUM_ALPHA_BITS','%GL_ACCUM_BLUE_BITS','%GL_ACCUM_BUFFER_BIT','%GL_ACCUM_CLEAR_VALUE',
            +            '%GL_ACCUM_GREEN_BITS','%GL_ACCUM_RED_BITS','%GL_ADD','%GL_ALL_ATTRIB_BITS','%GL_ALPHA','%GL_ALPHA12','%GL_ALPHA16','%GL_ALPHA4',
            +            '%GL_ALPHA8','%GL_ALPHA_BIAS','%GL_ALPHA_BITS','%GL_ALPHA_SCALE','%GL_ALPHA_TEST','%GL_ALPHA_TEST_FUNC','%GL_ALPHA_TEST_REF','%GL_ALWAYS',
            +            '%GL_AMBIENT','%GL_AMBIENT_AND_DIFFUSE','%GL_AND','%GL_AND_INVERTED','%GL_AND_REVERSE','%GL_ARRAY_ELEMENT_LOCK_COUNT_EXT','%GL_ARRAY_ELEMENT_LOCK_FIRST_EXT','%GL_ATTRIB_STACK_DEPTH',
            +            '%GL_AUTO_NORMAL','%GL_AUX0','%GL_AUX1','%GL_AUX2','%GL_AUX3','%GL_AUX_BUFFERS','%GL_BACK','%GL_BACK_LEFT',
            +            '%GL_BACK_RIGHT','%GL_BGRA_EXT','%GL_BGR_EXT','%GL_BITMAP','%GL_BITMAP_TOKEN','%GL_BLEND','%GL_BLEND_COLOR_EXT','%GL_BLEND_DST',
            +            '%GL_BLEND_EQUATION_EXT','%GL_BLEND_SRC','%GL_BLUE','%GL_BLUE_BIAS','%GL_BLUE_BITS','%GL_BLUE_SCALE','%GL_BYTE','%GL_C3F_V3F',
            +            '%GL_C4F_N3F_V3F','%GL_C4UB_V2F','%GL_C4UB_V3F','%GL_CCW','%GL_CLAMP','%GL_CLEAR','%GL_CLIENT_ALL_ATTRIB_BITS','%GL_CLIENT_ATTRIB_STACK_DEPTH',
            +            '%GL_CLIENT_PIXEL_STORE_BIT','%GL_CLIENT_VERTEX_ARRAY_BIT','%GL_CLIP_PLANE0','%GL_CLIP_PLANE1','%GL_CLIP_PLANE2','%GL_CLIP_PLANE3','%GL_CLIP_PLANE4','%GL_CLIP_PLANE5',
            +            '%GL_CLIP_VOLUME_CLIPPING_HINT_EXT','%GL_COEFF','%GL_COLOR','%GL_COLOR_ARRAY','%GL_COLOR_ARRAY_COUNT_EXT','%GL_COLOR_ARRAY_EXT','%GL_COLOR_ARRAY_POINTER','%GL_COLOR_ARRAY_POINTER_EXT',
            +            '%GL_COLOR_ARRAY_SIZE','%GL_COLOR_ARRAY_SIZE_EXT','%GL_COLOR_ARRAY_STRIDE','%GL_COLOR_ARRAY_STRIDE_EXT','%GL_COLOR_ARRAY_TYPE','%GL_COLOR_ARRAY_TYPE_EXT','%GL_COLOR_BUFFER_BIT','%GL_COLOR_CLEAR_VALUE',
            +            '%GL_COLOR_INDEX','%GL_COLOR_INDEX12_EXT','%GL_COLOR_INDEX16_EXT','%GL_COLOR_INDEX1_EXT','%GL_COLOR_INDEX2_EXT','%GL_COLOR_INDEX4_EXT','%GL_COLOR_INDEX8_EXT','%GL_COLOR_INDEXES',
            +            '%GL_COLOR_LOGIC_OP','%GL_COLOR_MATERIAL','%GL_COLOR_MATERIAL_FACE','%GL_COLOR_MATERIAL_PARAMETER','%GL_COLOR_SUM_EXT','%GL_COLOR_TABLE_ALPHA_SIZE_EXT','%GL_COLOR_TABLE_BIAS_EXT','%GL_COLOR_TABLE_BLUE_SIZE_EXT',
            +            '%GL_COLOR_TABLE_EXT','%GL_COLOR_TABLE_FORMAT_EXT','%GL_COLOR_TABLE_GREEN_SIZE_EXT','%GL_COLOR_TABLE_INTENSITY_SIZE_EXT','%GL_COLOR_TABLE_LUMINANCE_SIZE_EXT','%GL_COLOR_TABLE_RED_SIZE_EXT','%GL_COLOR_TABLE_SCALE_EXT','%GL_COLOR_TABLE_WIDTH_EXT',
            +            '%GL_COLOR_WRITEMASK','%GL_COMPILE','%GL_COMPILE_AND_EXECUTE','%GL_CONSTANT_ALPHA_EXT','%GL_CONSTANT_ATTENUATION','%GL_CONSTANT_COLOR_EXT','%GL_CONVOLUTION_1D_EXT','%GL_CONVOLUTION_2D_EXT',
            +            '%GL_CONVOLUTION_BORDER_MODE_EXT','%GL_CONVOLUTION_FILTER_BIAS_EXT','%GL_CONVOLUTION_FILTER_SCALE_EXT','%GL_CONVOLUTION_FORMAT_EXT','%GL_CONVOLUTION_HEIGHT_EXT','%GL_CONVOLUTION_WIDTH_EXT','%GL_COPY','%GL_COPY_INVERTED',
            +            '%GL_COPY_PIXEL_TOKEN','%GL_CULL_FACE','%GL_CULL_FACE_MODE','%GL_CULL_VERTEX_EXT','%GL_CULL_VERTEX_EYE_POSITION_EXT','%GL_CULL_VERTEX_OBJECT_POSITION_EXT','%GL_CURRENT_BIT','%GL_CURRENT_COLOR',
            +            '%GL_CURRENT_INDEX','%GL_CURRENT_NORMAL','%GL_CURRENT_RASTER_COLOR','%GL_CURRENT_RASTER_DISTANCE','%GL_CURRENT_RASTER_INDEX','%GL_CURRENT_RASTER_POSITION','%GL_CURRENT_RASTER_POSITION_VALID','%GL_CURRENT_RASTER_TEXTURE_COORDS',
            +            '%GL_CURRENT_SECONDARY_COLOR_EXT','%GL_CURRENT_TEXTURE_COORDS','%GL_CW','%GL_DECAL','%GL_DECR','%GL_DEPTH','%GL_DEPTH_BIAS','%GL_DEPTH_BITS',
            +            '%GL_DEPTH_BUFFER_BIT','%GL_DEPTH_CLEAR_VALUE','%GL_DEPTH_COMPONENT','%GL_DEPTH_FUNC','%GL_DEPTH_RANGE','%GL_DEPTH_SCALE','%GL_DEPTH_TEST','%GL_DEPTH_WRITEMASK',
            +            '%GL_DIFFUSE','%GL_DITHER','%GL_DOMAIN','%GL_DONT_CARE','%GL_DOUBLE','%GL_DOUBLEBUFFER','%GL_DOUBLE_EXT','%GL_DRAW_BUFFER',
            +            '%GL_DRAW_PIXEL_TOKEN','%GL_DST_ALPHA','%GL_DST_COLOR','%GL_EDGE_FLAG','%GL_EDGE_FLAG_ARRAY','%GL_EDGE_FLAG_ARRAY_COUNT_EXT','%GL_EDGE_FLAG_ARRAY_EXT','%GL_EDGE_FLAG_ARRAY_POINTER',
            +            '%GL_EDGE_FLAG_ARRAY_POINTER_EXT','%GL_EDGE_FLAG_ARRAY_STRIDE','%GL_EDGE_FLAG_ARRAY_STRIDE_EXT','%GL_EMISSION','%GL_ENABLE_BIT','%GL_EQUAL','%GL_EQUIV','%GL_EVAL_BIT',
            +            '%GL_EXP','%GL_EXP2','%GL_EXTENSIONS','%GL_EXT_ABGR','%GL_EXT_BGRA','%GL_EXT_BLEND_COLOR','%GL_EXT_BLEND_MINMAX','%GL_EXT_BLEND_SUBTRACT',
            +            '%GL_EXT_CLIP_VOLUME_HINT','%GL_EXT_COLOR_TABLE','%GL_EXT_COMPILED_VERTEX_ARRAY','%GL_EXT_CONVOLUTION','%GL_EXT_CULL_VERTEX','%GL_EXT_HISTOGRAM','%GL_EXT_PACKED_PIXELS','%GL_EXT_PALETTED_TEXTURE',
            +            '%GL_EXT_POLYGON_OFFSET','%GL_EXT_SECONDARY_COLOR','%GL_EXT_SEPARATE_SPECULAR_COLOR','%GL_EXT_VERTEX_ARRAY','%GL_EYE_LINEAR','%GL_EYE_PLANE','%GL_FALSE','%GL_FASTEST',
            +            '%GL_FEEDBACK','%GL_FEEDBACK_BUFFER_POINTER','%GL_FEEDBACK_BUFFER_SIZE','%GL_FEEDBACK_BUFFER_TYPE','%GL_FILL','%GL_FLAT','%GL_FLOAT','%GL_FOG',
            +            '%GL_FOG_BIT','%GL_FOG_COLOR','%GL_FOG_DENSITY','%GL_FOG_END','%GL_FOG_HINT','%GL_FOG_INDEX','%GL_FOG_MODE','%GL_FOG_START',
            +            '%GL_FRONT','%GL_FRONT_AND_BACK','%GL_FRONT_FACE','%GL_FRONT_LEFT','%GL_FRONT_RIGHT','%GL_FUNC_ADD_EXT','%GL_FUNC_REVERSE_SUBTRACT_EXT','%GL_FUNC_SUBTRACT_EXT',
            +            '%GL_GEQUAL','%GL_GREATER','%GL_GREEN','%GL_GREEN_BIAS','%GL_GREEN_BITS','%GL_GREEN_SCALE','%GL_HINT_BIT','%GL_HISTOGRAM_ALPHA_SIZE_EXT',
            +            '%GL_HISTOGRAM_BLUE_SIZE_EXT','%GL_HISTOGRAM_EXT','%GL_HISTOGRAM_FORMAT_EXT','%GL_HISTOGRAM_GREEN_SIZE_EXT','%GL_HISTOGRAM_LUMINANCE_SIZE_EXT','%GL_HISTOGRAM_RED_SIZE_EXT','%GL_HISTOGRAM_SINK_EXT','%GL_HISTOGRAM_WIDTH_EXT',
            +            '%GL_INCR','%GL_INDEX_ARRAY','%GL_INDEX_ARRAY_COUNT_EXT','%GL_INDEX_ARRAY_EXT','%GL_INDEX_ARRAY_POINTER','%GL_INDEX_ARRAY_POINTER_EXT','%GL_INDEX_ARRAY_STRIDE','%GL_INDEX_ARRAY_STRIDE_EXT',
            +            '%GL_INDEX_ARRAY_TYPE','%GL_INDEX_ARRAY_TYPE_EXT','%GL_INDEX_BITS','%GL_INDEX_CLEAR_VALUE','%GL_INDEX_LOGIC_OP','%GL_INDEX_MODE','%GL_INDEX_OFFSET','%GL_INDEX_SHIFT',
            +            '%GL_INDEX_WRITEMASK','%GL_INT','%GL_INTENSITY','%GL_INTENSITY12','%GL_INTENSITY16','%GL_INTENSITY4','%GL_INTENSITY8','%GL_INVALID_ENUM',
            +            '%GL_INVALID_OPERATION','%GL_INVALID_VALUE','%GL_INVERT','%GL_KEEP','%GL_LEFT','%GL_LEQUAL','%GL_LESS','%GL_LIGHT0',
            +            '%GL_LIGHT1','%GL_LIGHT2','%GL_LIGHT3','%GL_LIGHT4','%GL_LIGHT5','%GL_LIGHT6','%GL_LIGHT7','%GL_LIGHTING',
            +            '%GL_LIGHTING_BIT','%GL_LIGHT_MODEL_AMBIENT','%GL_LIGHT_MODEL_COLOR_CONTROL_EXT','%GL_LIGHT_MODEL_LOCAL_VIEWER','%GL_LIGHT_MODEL_TWO_SIDE','%GL_LINE','%GL_LINEAR','%GL_LINEAR_ATTENUATION',
            +            '%GL_LINEAR_MIPMAP_LINEAR','%GL_LINEAR_MIPMAP_NEAREST','%GL_LINES','%GL_LINE_BIT','%GL_LINE_LOOP','%GL_LINE_RESET_TOKEN','%GL_LINE_SMOOTH','%GL_LINE_SMOOTH_HINT',
            +            '%GL_LINE_STIPPLE','%GL_LINE_STIPPLE_PATTERN','%GL_LINE_STIPPLE_REPEAT','%GL_LINE_STRIP','%GL_LINE_TOKEN','%GL_LINE_WIDTH','%GL_LINE_WIDTH_GRANULARITY','%GL_LINE_WIDTH_RANGE',
            +            '%GL_LIST_BASE','%GL_LIST_BIT','%GL_LIST_INDEX','%GL_LIST_MODE','%GL_LOAD','%GL_LOGIC_OP','%GL_LOGIC_OP_MODE','%GL_LUMINANCE',
            +            '%GL_LUMINANCE12','%GL_LUMINANCE12_ALPHA12','%GL_LUMINANCE12_ALPHA4','%GL_LUMINANCE16','%GL_LUMINANCE16_ALPHA16','%GL_LUMINANCE4','%GL_LUMINANCE4_ALPHA4','%GL_LUMINANCE6_ALPHA2',
            +            '%GL_LUMINANCE8','%GL_LUMINANCE8_ALPHA8','%GL_LUMINANCE_ALPHA','%GL_MAP1_COLOR_4','%GL_MAP1_GRID_DOMAIN','%GL_MAP1_GRID_SEGMENTS','%GL_MAP1_INDEX','%GL_MAP1_NORMAL',
            +            '%GL_MAP1_TEXTURE_COORD_1','%GL_MAP1_TEXTURE_COORD_2','%GL_MAP1_TEXTURE_COORD_3','%GL_MAP1_TEXTURE_COORD_4','%GL_MAP1_VERTEX_3','%GL_MAP1_VERTEX_4','%GL_MAP2_COLOR_4','%GL_MAP2_GRID_DOMAIN',
            +            '%GL_MAP2_GRID_SEGMENTS','%GL_MAP2_INDEX','%GL_MAP2_NORMAL','%GL_MAP2_TEXTURE_COORD_1','%GL_MAP2_TEXTURE_COORD_2','%GL_MAP2_TEXTURE_COORD_3','%GL_MAP2_TEXTURE_COORD_4','%GL_MAP2_VERTEX_3',
            +            '%GL_MAP2_VERTEX_4','%GL_MAP_COLOR','%GL_MAP_STENCIL','%GL_MATRIX_MODE','%GL_MAX_ATTRIB_STACK_DEPTH','%GL_MAX_CLIENT_ATTRIB_STACK_DEPTH','%GL_MAX_CLIP_PLANES','%GL_MAX_CONVOLUTION_HEIGHT_EXT',
            +            '%GL_MAX_CONVOLUTION_WIDTH_EXT','%GL_MAX_EVAL_ORDER','%GL_MAX_EXT','%GL_MAX_LIGHTS','%GL_MAX_LIST_NESTING','%GL_MAX_MODELVIEW_STACK_DEPTH','%GL_MAX_NAME_STACK_DEPTH','%GL_MAX_PIXEL_MAP_TABLE',
            +            '%GL_MAX_PROJECTION_STACK_DEPTH','%GL_MAX_TEXTURE_SIZE','%GL_MAX_TEXTURE_STACK_DEPTH','%GL_MAX_VIEWPORT_DIMS','%GL_MINMAX_EXT','%GL_MINMAX_FORMAT_EXT','%GL_MINMAX_SINK_EXT','%GL_MIN_EXT',
            +            '%GL_MODELVIEW','%GL_MODELVIEW_MATRIX','%GL_MODELVIEW_STACK_DEPTH','%GL_MODULATE','%GL_MULT','%GL_N3F_V3F','%GL_NAME_STACK_DEPTH','%GL_NAND',
            +            '%GL_NEAREST','%GL_NEAREST_MIPMAP_LINEAR','%GL_NEAREST_MIPMAP_NEAREST','%GL_NEVER','%GL_NICEST','%GL_NONE','%GL_NOOP','%GL_NOR',
            +            '%GL_NORMALIZE','%GL_NORMAL_ARRAY','%GL_NORMAL_ARRAY_COUNT_EXT','%GL_NORMAL_ARRAY_EXT','%GL_NORMAL_ARRAY_POINTER','%GL_NORMAL_ARRAY_POINTER_EXT','%GL_NORMAL_ARRAY_STRIDE','%GL_NORMAL_ARRAY_STRIDE_EXT',
            +            '%GL_NORMAL_ARRAY_TYPE','%GL_NORMAL_ARRAY_TYPE_EXT','%GL_NOTEQUAL','%GL_NO_ERROR','%GL_OBJECT_LINEAR','%GL_OBJECT_PLANE','%GL_ONE','%GL_ONE_MINUS_CONSTANT_ALPHA_EXT',
            +            '%GL_ONE_MINUS_CONSTANT_COLOR_EXT','%GL_ONE_MINUS_DST_ALPHA','%GL_ONE_MINUS_DST_COLOR','%GL_ONE_MINUS_SRC_ALPHA','%GL_ONE_MINUS_SRC_COLOR','%GL_OR','%GL_ORDER','%GL_OR_INVERTED',
            +            '%GL_OR_REVERSE','%GL_OUT_OF_MEMORY','%GL_PACK_ALIGNMENT','%GL_PACK_LSB_FIRST','%GL_PACK_ROW_LENGTH','%GL_PACK_SKIP_PIXELS','%GL_PACK_SKIP_ROWS','%GL_PACK_SWAP_BYTES',
            +            '%GL_PASS_THROUGH_TOKEN','%GL_PERSPECTIVE_CORRECTION_HINT','%GL_PIXEL_MAP_A_TO_A','%GL_PIXEL_MAP_A_TO_A_SIZE','%GL_PIXEL_MAP_B_TO_B','%GL_PIXEL_MAP_B_TO_B_SIZE','%GL_PIXEL_MAP_G_TO_G','%GL_PIXEL_MAP_G_TO_G_SIZE',
            +            '%GL_PIXEL_MAP_I_TO_A','%GL_PIXEL_MAP_I_TO_A_SIZE','%GL_PIXEL_MAP_I_TO_B','%GL_PIXEL_MAP_I_TO_B_SIZE','%GL_PIXEL_MAP_I_TO_G','%GL_PIXEL_MAP_I_TO_G_SIZE','%GL_PIXEL_MAP_I_TO_I','%GL_PIXEL_MAP_I_TO_I_SIZE',
            +            '%GL_PIXEL_MAP_I_TO_R','%GL_PIXEL_MAP_I_TO_R_SIZE','%GL_PIXEL_MAP_R_TO_R','%GL_PIXEL_MAP_R_TO_R_SIZE','%GL_PIXEL_MAP_S_TO_S','%GL_PIXEL_MAP_S_TO_S_SIZE','%GL_PIXEL_MODE_BIT','%GL_POINT',
            +            '%GL_POINTS','%GL_POINT_BIT','%GL_POINT_SIZE','%GL_POINT_SIZE_GRANULARITY','%GL_POINT_SIZE_RANGE','%GL_POINT_SMOOTH','%GL_POINT_SMOOTH_HINT','%GL_POINT_TOKEN',
            +            '%GL_POLYGON','%GL_POLYGON_BIT','%GL_POLYGON_MODE','%GL_POLYGON_OFFSET_BIAS_EXT','%GL_POLYGON_OFFSET_EXT','%GL_POLYGON_OFFSET_FACTOR','%GL_POLYGON_OFFSET_FACTOR_EXT','%GL_POLYGON_OFFSET_FILL',
            +            '%GL_POLYGON_OFFSET_LINE','%GL_POLYGON_OFFSET_POINT','%GL_POLYGON_OFFSET_UNITS','%GL_POLYGON_SMOOTH','%GL_POLYGON_SMOOTH_HINT','%GL_POLYGON_STIPPLE','%GL_POLYGON_STIPPLE_BIT','%GL_POLYGON_TOKEN',
            +            '%GL_POSITION','%GL_POST_COLOR_MATRIX_COLOR_TABLE_EXT','%GL_POST_CONVOLUTION_ALPHA_BIAS_EXT','%GL_POST_CONVOLUTION_ALPHA_SCALE_EXT','%GL_POST_CONVOLUTION_BLUE_BIAS_EXT','%GL_POST_CONVOLUTION_BLUE_SCALE_EXT','%GL_POST_CONVOLUTION_COLOR_TABLE_EXT','%GL_POST_CONVOLUTION_GREEN_BIAS_EXT',
            +            '%GL_POST_CONVOLUTION_GREEN_SCALE_EXT','%GL_POST_CONVOLUTION_RED_BIAS_EXT','%GL_POST_CONVOLUTION_RED_SCALE_EXT','%GL_PROJECTION','%GL_PROJECTION_MATRIX','%GL_PROJECTION_STACK_DEPTH','%GL_PROXY_COLOR_TABLE_EXT','%GL_PROXY_HISTOGRAM_EXT',
            +            '%GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_EXT','%GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_EXT','%GL_PROXY_TEXTURE_1D','%GL_PROXY_TEXTURE_2D','%GL_Q','%GL_QUADRATIC_ATTENUATION','%GL_QUADS','%GL_QUAD_STRIP',
            +            '%GL_R','%GL_R3_G3_B2','%GL_READ_BUFFER','%GL_RED','%GL_REDUCE_EXT','%GL_RED_BIAS','%GL_RED_BITS','%GL_RED_SCALE',
            +            '%GL_RENDER','%GL_RENDERER','%GL_RENDER_MODE','%GL_REPEAT','%GL_REPLACE','%GL_RETURN','%GL_RGB','%GL_RGB10',
            +            '%GL_RGB10_A2','%GL_RGB12','%GL_RGB16','%GL_RGB4','%GL_RGB5','%GL_RGB5_A1','%GL_RGB8','%GL_RGBA',
            +            '%GL_RGBA12','%GL_RGBA16','%GL_RGBA2','%GL_RGBA4','%GL_RGBA8','%GL_RGBA_MODE','%GL_RIGHT','%GL_S',
            +            '%GL_SCISSOR_BIT','%GL_SCISSOR_BOX','%GL_SCISSOR_TEST','%GL_SECONDARY_COLOR_ARRAY_EXT','%GL_SECONDARY_COLOR_ARRAY_POINTER_EXT','%GL_SECONDARY_COLOR_ARRAY_SIZE_EXT','%GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT','%GL_SECONDARY_COLOR_ARRAY_TYPE_EXT',
            +            '%GL_SELECT','%GL_SELECTION_BUFFER_POINTER','%GL_SELECTION_BUFFER_SIZE','%GL_SEPARABLE_2D_EXT','%GL_SEPARATE_SPECULAR_COLOR_EXT','%GL_SET','%GL_SHADE_MODEL','%GL_SHININESS',
            +            '%GL_SHORT','%GL_SINGLE_COLOR_EXT','%GL_SMOOTH','%GL_SPECULAR','%GL_SPHERE_MAP','%GL_SPOT_CUTOFF','%GL_SPOT_DIRECTION','%GL_SPOT_EXPONENT',
            +            '%GL_SRC_ALPHA','%GL_SRC_ALPHA_SATURATE','%GL_SRC_COLOR','%GL_STACK_OVERFLOW','%GL_STACK_UNDERFLOW','%GL_STENCIL','%GL_STENCIL_BITS','%GL_STENCIL_BUFFER_BIT',
            +            '%GL_STENCIL_CLEAR_VALUE','%GL_STENCIL_FAIL','%GL_STENCIL_FUNC','%GL_STENCIL_INDEX','%GL_STENCIL_PASS_DEPTH_FAIL','%GL_STENCIL_PASS_DEPTH_PASS','%GL_STENCIL_REF','%GL_STENCIL_TEST',
            +            '%GL_STENCIL_VALUE_MASK','%GL_STENCIL_WRITEMASK','%GL_STEREO','%GL_SUBPIXEL_BITS','%GL_T','%GL_T2F_C3F_V3F','%GL_T2F_C4F_N3F_V3F','%GL_T2F_C4UB_V3F',
            +            '%GL_T2F_N3F_V3F','%GL_T2F_V3F','%GL_T4F_C4F_N3F_V4F','%GL_T4F_V4F','%GL_TABLE_TOO_LARGE_EXT','%GL_TEXTURE','%GL_TEXTURE_1D','%GL_TEXTURE_2D',
            +            '%GL_TEXTURE_ALPHA_SIZE','%GL_TEXTURE_BINDING_1D','%GL_TEXTURE_BINDING_2D','%GL_TEXTURE_BIT','%GL_TEXTURE_BLUE_SIZE','%GL_TEXTURE_BORDER','%GL_TEXTURE_BORDER_COLOR','%GL_TEXTURE_COMPONENTS',
            +            '%GL_TEXTURE_COORD_ARRAY','%GL_TEXTURE_COORD_ARRAY_COUNT_EXT','%GL_TEXTURE_COORD_ARRAY_EXT','%GL_TEXTURE_COORD_ARRAY_POINTER','%GL_TEXTURE_COORD_ARRAY_POINTER_EXT','%GL_TEXTURE_COORD_ARRAY_SIZE','%GL_TEXTURE_COORD_ARRAY_SIZE_EXT','%GL_TEXTURE_COORD_ARRAY_STRIDE',
            +            '%GL_TEXTURE_COORD_ARRAY_STRIDE_EXT','%GL_TEXTURE_COORD_ARRAY_TYPE','%GL_TEXTURE_COORD_ARRAY_TYPE_EXT','%GL_TEXTURE_ENV','%GL_TEXTURE_ENV_COLOR','%GL_TEXTURE_ENV_MODE','%GL_TEXTURE_GEN_MODE','%GL_TEXTURE_GEN_Q',
            +            '%GL_TEXTURE_GEN_R','%GL_TEXTURE_GEN_S','%GL_TEXTURE_GEN_T','%GL_TEXTURE_GREEN_SIZE','%GL_TEXTURE_HEIGHT','%GL_TEXTURE_INTENSITY_SIZE','%GL_TEXTURE_INTERNAL_FORMAT','%GL_TEXTURE_LUMINANCE_SIZE',
            +            '%GL_TEXTURE_MAG_FILTER','%GL_TEXTURE_MATRIX','%GL_TEXTURE_MIN_FILTER','%GL_TEXTURE_PRIORITY','%GL_TEXTURE_RED_SIZE','%GL_TEXTURE_RESIDENT','%GL_TEXTURE_STACK_DEPTH','%GL_TEXTURE_WIDTH',
            +            '%GL_TEXTURE_WRAP_S','%GL_TEXTURE_WRAP_T','%GL_TRANSFORM_BIT','%GL_TRIANGLES','%GL_TRIANGLE_FAN','%GL_TRIANGLE_STRIP','%GL_TRUE','%GL_UNPACK_ALIGNMENT',
            +            '%GL_UNPACK_LSB_FIRST','%GL_UNPACK_ROW_LENGTH','%GL_UNPACK_SKIP_PIXELS','%GL_UNPACK_SKIP_ROWS','%GL_UNPACK_SWAP_BYTES','%GL_UNSIGNED_BYTE','%GL_UNSIGNED_BYTE_3_3_2_EXT','%GL_UNSIGNED_INT',
            +            '%GL_UNSIGNED_INT_10_10_10_2_EXT','%GL_UNSIGNED_INT_8_8_8_8_EXT','%GL_UNSIGNED_SHORT','%GL_UNSIGNED_SHORT_4_4_4_4_EXT','%GL_UNSIGNED_SHORT_5_5_5_1_EXT','%GL_V2F','%GL_V3F','%GL_VENDOR',
            +            '%GL_VERSION','%GL_VERSION_1_1','%GL_VERTEX_ARRAY','%GL_VERTEX_ARRAY_COUNT_EXT','%GL_VERTEX_ARRAY_EXT','%GL_VERTEX_ARRAY_POINTER','%GL_VERTEX_ARRAY_POINTER_EXT','%GL_VERTEX_ARRAY_SIZE',
            +            '%GL_VERTEX_ARRAY_SIZE_EXT','%GL_VERTEX_ARRAY_STRIDE','%GL_VERTEX_ARRAY_STRIDE_EXT','%GL_VERTEX_ARRAY_TYPE','%GL_VERTEX_ARRAY_TYPE_EXT','%GL_VIEWPORT','%GL_VIEWPORT_BIT','%GL_WIN_SWAP_HINT',
            +            '%GL_XOR','%GL_ZERO','%GL_ZOOM_X','%GL_ZOOM_Y','%GRAY','%GREEN','%GWLP_HINSTANCE','%GWLP_HWNDPARENT',
            +            '%GWLP_ID','%GWLP_USERDATA','%GWLP_WNDPROC','%GWL_EXSTYLE','%GWL_HINSTANCE','%GWL_HWNDPARENT','%GWL_ID','%GWL_STYLE',
            +            '%GWL_USERDATA','%GWL_WNDPROC','%HDM_FIRST','%HTCAPTION','%HWND_BOTTOM','%HWND_DESKTOP','%HWND_MESSAGE','%HWND_NOTOPMOST',
            +            '%HWND_TOP','%HWND_TOPMOST','%ICRYPTO_XOR_DECREASE','%ICRYPTO_XOR_INCREASE','%ICRYPTO_XOR_NORMAL','%IDABORT','%IDCANCEL','%IDCONTINUE',
            +            '%IDIGNORE','%IDNO','%IDOK','%IDRETRY','%IDTIMEOUT','%IDTRYAGAIN','%IDYES','%INTERNET_CONNECTION_CONFIGURED',
            +            '%INTERNET_CONNECTION_LAN','%INTERNET_CONNECTION_MODEM','%INTERNET_CONNECTION_MODEM_BUSY','%INTERNET_CONNECTION_OFFLINE','%INTERNET_CONNECTION_PROXY','%INTERNET_RAS_INSTALLED','%LBN_DBLCLK','%LBN_KILLFOCUS',
            +            '%LBN_SELCANCEL','%LBN_SELCHANGE','%LBN_SETFOCUS','%LBS_DISABLENOSCROLL','%LBS_EXTENDEDSEL','%LBS_MULTICOLUMN','%LBS_MULTIPLESEL','%LBS_NOINTEGRALHEIGHT',
            +            '%LBS_NOSEL','%LBS_NOTIFY','%LBS_SORT','%LBS_STANDARD','%LBS_USETABSTOPS','%LB_ADDFILE','%LB_ADDSTRING','%LB_DELETESTRING',
            +            '%LB_DIR','%LB_FINDSTRING','%LB_FINDSTRINGEXACT','%LB_GETANCHORINDEX','%LB_GETCARETINDEX','%LB_GETCOUNT','%LB_GETCURSEL','%LB_GETHORIZONTALEXTENT',
            +            '%LB_GETITEMDATA','%LB_GETITEMHEIGHT','%LB_GETITEMRECT','%LB_GETLISTBOXINFO','%LB_GETLOCALE','%LB_GETSEL','%LB_GETSELCOUNT','%LB_GETSELITEMS',
            +            '%LB_GETTEXT','%LB_GETTEXTLEN','%LB_GETTOPINDEX','%LB_INITSTORAGE','%LB_INSERTSTRING','%LB_ITEMFROMPOINT','%LB_MULTIPLEADDSTRING','%LB_RESETCONTENT',
            +            '%LB_SELECTSTRING','%LB_SELITEMRANGE','%LB_SELITEMRANGEEX','%LB_SETANCHORINDEX','%LB_SETCARETINDEX','%LB_SETCOLUMNWIDTH','%LB_SETCOUNT','%LB_SETCURSEL',
            +            '%LB_SETHORIZONTALEXTENT','%LB_SETITEMDATA','%LB_SETITEMHEIGHT','%LB_SETLOCALE','%LB_SETSEL','%LB_SETTABSTOPS','%LB_SETTOPINDEX','%LF_FACESIZE',
            +            '%LTGRAY','%LVM_FIRST','%LWA_ALPHA','%LWA_COLORKEY','%MAGENTA','%MAXBYTE','%MAXCHAR','%MAXDWORD',
            +            '%MAXSHORT','%MAXWORD','%MAX_PATH','%MB_ABORTRETRYIGNORE','%MB_APPLMODAL','%MB_CANCELTRYCONTINUE','%MB_DEFBUTTON1','%MB_DEFBUTTON2',
            +            '%MB_DEFBUTTON3','%MB_HELP','%MB_ICONASTERISK','%MB_ICONERROR','%MB_ICONEXCLAMATION','%MB_ICONHAND','%MB_ICONINFORMATION','%MB_ICONQUESTION',
            +            '%MB_ICONSTOP','%MB_ICONWARNING','%MB_OK','%MB_OKCANCEL','%MB_RETRYCANCEL','%MB_SIMPLE','%MB_SYSTEMMODAL','%MB_TOPMOST',
            +            '%MB_YESNO','%MB_YESNOCANCEL','%MF_CHECKED','%MF_DISABLED','%MF_ENABLED','%MF_GRAYED','%MF_SEPARATOR','%MF_UNCHECKED',
            +            '%MINCHAR','%MINLONG','%MINSHORT','%NULL','%ODBC352_INC','%ODBCVER','%ODBC_ADD_DSN','%ODBC_ADD_SYS_DSN',
            +            '%ODBC_BOTH_DSN','%ODBC_CONFIG_DRIVER','%ODBC_CONFIG_DRIVER_MAX','%ODBC_CONFIG_DSN','%ODBC_CONFIG_SYS_DSN','%ODBC_DRIVER_VERSION','%ODBC_ERROR_COMPONENT_NOT_FOUND','%ODBC_ERROR_CREATE_DSN_FAILED',
            +            '%ODBC_ERROR_GENERAL_ERR','%ODBC_ERROR_INVALID_BUFF_LEN','%ODBC_ERROR_INVALID_DSN','%ODBC_ERROR_INVALID_HWND','%ODBC_ERROR_INVALID_INF','%ODBC_ERROR_INVALID_KEYWORD_VALUE','%ODBC_ERROR_INVALID_LOG_FILE','%ODBC_ERROR_INVALID_NAME',
            +            '%ODBC_ERROR_INVALID_PARAM_SEQUENCE','%ODBC_ERROR_INVALID_PATH','%ODBC_ERROR_INVALID_REQUEST_TYPE','%ODBC_ERROR_INVALID_STR','%ODBC_ERROR_LOAD_LIB_FAILED','%ODBC_ERROR_OUTPUT_STRING_TRUNCATED','%ODBC_ERROR_OUT_OF_MEM','%ODBC_ERROR_REMOVE_DSN_FAILED',
            +            '%ODBC_ERROR_REQUEST_FAILED','%ODBC_ERROR_USAGE_UPDATE_FAILED','%ODBC_ERROR_USER_CANCELED','%ODBC_ERROR_WRITING_SYSINFO_FAILED','%ODBC_INSTALL_COMPLETE','%ODBC_INSTALL_DRIVER','%ODBC_INSTALL_INQUIRY','%ODBC_REMOVE_DEFAULT_DSN',
            +            '%ODBC_REMOVE_DRIVER','%ODBC_REMOVE_DSN','%ODBC_REMOVE_SYS_DSN','%ODBC_SYSTEM_DSN','%ODBC_USER_DSN','%OFN_ALLOWMULTISELECT','%OFN_CREATEPROMPT','%OFN_ENABLEHOOK',
            +            '%OFN_ENABLEINCLUDENOTIFY','%OFN_ENABLESIZING','%OFN_ENABLETEMPLATE','%OFN_ENABLETEMPLATEHANDLE','%OFN_EXPLORER','%OFN_EXTENSIONDIFFERENT','%OFN_FILEMUSTEXIST','%OFN_HIDEREADONLY',
            +            '%OFN_LONGNAMES','%OFN_NOCHANGEDIR','%OFN_NODEREFERENCELINKS','%OFN_NOLONGNAMES','%OFN_NONETWORKBUTTON','%OFN_NOREADONLYRETURN','%OFN_NOTESTFILECREATE','%OFN_NOVALIDATE',
            +            '%OFN_OVERWRITEPROMPT','%OFN_PATHMUSTEXIST','%OFN_READONLY','%OFN_SHAREAWARE','%OFN_SHOWHELP','%OS_ERROR_CALLFUNCTION','%OS_ERROR_EMPTYSTRING','%OS_ERROR_LOADLIBRARY',
            +            '%OS_ERROR_SUCCESS','%OS_ERROR_WRONGPARAMETER','%OS_SHELL_ASYNC','%OS_SHELL_SYNC','%OS_WINDOWS_2K','%OS_WINDOWS_95','%OS_WINDOWS_95_OSR2','%OS_WINDOWS_98',
            +            '%OS_WINDOWS_98_SE','%OS_WINDOWS_ME','%OS_WINDOWS_NT','%OS_WINDOWS_SERVER_2003','%OS_WINDOWS_SERVER_LONGHORN','%OS_WINDOWS_SERVER_LONGHORN_DC','%OS_WINDOWS_VISTA','%OS_WINDOWS_XP',
            +            '%OS_WNDSTYLE_HIDE','%OS_WNDSTYLE_MAXIMIZED','%OS_WNDSTYLE_MINIMIZED','%OS_WNDSTYLE_MINIMIZEDNOFOCUS','%OS_WNDSTYLE_NORMAL','%OS_WNDSTYLE_NORMALNOFOCUS','%PATH_EXT','%PATH_FILE',
            +            '%PATH_FILEEXT','%PATH_ROOT','%PATH_ROOTPATH','%PATH_ROOTPATHPROG','%PATH_ROOTPATHPROGEXT','%PBM_DELTAPOS','%PBM_GETPOS','%PBM_GETRANGE',
            +            '%PBM_SETBARCOLOR','%PBM_SETBKCOLOR','%PBM_SETPOS','%PBM_SETRANGE','%PBM_SETRANGE32','%PBM_SETSTEP','%PBM_STEPIT','%PBS_SMOOTH',
            +            '%PBS_VERTICAL','%PC_DISABLEWAKEEVENT_OFF','%PC_DISABLEWAKEEVENT_ON','%PC_EB_NOCONFIRMATION','%PC_EB_NOPROGRESSUI','%PC_EB_NORMAL','%PC_EB_NOSOUND','%PC_FORCECRITICAL_OFF',
            +            '%PC_FORCECRITICAL_ON','%PC_HIBERNATE_OFF','%PC_HIBERNATE_ON','%PC_RD_FORCE','%PC_RD_FORCEIFHUNG','%PC_RD_LOGOFF','%PC_RD_POWEROFF','%PC_RD_REBOOT',
            +            '%PC_RD_SHUTDOWN','%PC_SD_DONOT_FORCE','%PC_SD_DONOT_REBOOT','%PC_SD_FORCE','%PC_SD_REBOOT','%PFA_CENTER','%PFA_LEFT','%PFA_RIGHT',
            +            '%PF_3DNOW_INSTRUCTIONS_AVAILABLE','%PF_CHANNELS_ENABLED','%PF_COMPARE64_EXCHANGE128','%PF_COMPARE_EXCHANGE128','%PF_COMPARE_EXCHANGE_DOUBLE','%PF_FLOATING_POINT_EMULATED','%PF_FLOATING_POINT_PRECISION_ERRATA','%PF_MMX_INSTRUCTIONS_AVAILABLE',
            +            '%PF_NX_ENABLED','%PF_PAE_ENABLED','%PF_RDTSC_INSTRUCTION_AVAILABLE','%PF_SSE3_INSTRUCTIONS_AVAILABLE','%PF_XMMI64_INSTRUCTIONS_AVAILABLE','%PF_XMMI_INSTRUCTIONS_AVAILABLE','%PGM_FIRST','%RED',
            +            '%RTF_UBB','%SAPI_SVSFDEFAULT','%SAPI_SVSFISFILENAME','%SAPI_SVSFISNOTXML','%SAPI_SVSFISXML','%SAPI_SVSFLAGSASYNC','%SAPI_SVSFNLPMASK','%SAPI_SVSFNLPSPEAKPUNC',
            +            '%SAPI_SVSFPERSISTXML','%SAPI_SVSFPURGEBEFORESPEAK','%SAPI_SVSFUNUSEDFLAGS','%SAPI_SVSFVOICEMASK','%SBS_SIZEGRIP','%SB_BOTTOM','%SB_ENDSCROLL','%SB_LEFT',
            +            '%SB_LINEDOWN','%SB_LINELEFT','%SB_LINERIGHT','%SB_LINEUP','%SB_PAGEDOWN','%SB_PAGELEFT','%SB_PAGERIGHT','%SB_PAGEUP',
            +            '%SB_RIGHT','%SB_SETPARTS','%SB_SETTEXT','%SB_THUMBPOSITION','%SB_THUMBTRACK','%SB_TOP','%SCF_ALL','%SCF_ASSOCIATEFONT',
            +            '%SCF_DEFAULT','%SCF_NOKBUPDATE','%SCF_SELECTION','%SCF_USEUIRULES','%SCF_WORD','%SC_CLOSE','%SC_CONTEXTHELP','%SC_HOTKEY',
            +            '%SC_HSCROLL','%SC_KEYMENU','%SC_MAXIMIZE','%SC_MINIMIZE','%SC_MONITORPOWER','%SC_MOUSEMENU','%SC_MOVE','%SC_NEXTWINDOW',
            +            '%SC_PREVWINDOW','%SC_RESTORE','%SC_SCREENSAVE','%SC_SIZE','%SC_TASKLIST','%SC_VSCROLL','%SERVICE_ACTIVE','%SERVICE_AUTO_START',
            +            '%SERVICE_BOOT_START','%SERVICE_CONTINUE_PENDING','%SERVICE_DEMAND_START','%SERVICE_DISABLED','%SERVICE_DRIVER','%SERVICE_INACTIVE','%SERVICE_INFO_DISPLAY_NAME','%SERVICE_INFO_NAME',
            +            '%SERVICE_PAUSED','%SERVICE_PAUSE_PENDING','%SERVICE_RUNNING','%SERVICE_START_PENDING','%SERVICE_STATE_ALL','%SERVICE_STOPPED','%SERVICE_STOP_PENDING','%SERVICE_SYSTEM_START',
            +            '%SERVICE_TYPE_ALL','%SERVICE_WIN32','%SES_ALLOWBEEPS','%SES_BEEPONMAXTEXT','%SES_BIDI','%SES_EMULATE10','%SES_EMULATESYSEDIT','%SES_EXTENDBACKCOLOR',
            +            '%SES_LOWERCASE','%SES_MAPCPS','%SES_NOIME','%SES_NOINPUTSEQUENCECHK','%SES_SCROLLONKILLFOCUS','%SES_UPPERCASE','%SES_USEAIMM','%SES_USECRLF',
            +            '%SES_XLTCRCRLFTOCR','%SF_RTF','%SF_TEXT','%SMTP_SET_ATTACH_CONTENT_TYPE','%SMTP_SET_CONTENT_TYPE_PREFIX','%SQL_AA_FALSE','%SQL_AA_TRUE','%SQL_ACCESSIBLE_PROCEDURES',
            +            '%SQL_ACCESSIBLE_TABLES','%SQL_ACCESS_MODE','%SQL_ACTIVE_CONNECTIONS','%SQL_ACTIVE_ENVIRONMENTS','%SQL_ACTIVE_STATEMENTS','%SQL_ADD','%SQL_AD_ADD_CONSTRAINT_DEFERRABLE','%SQL_AD_ADD_CONSTRAINT_INITIALLY_DEFERRED',
            +            '%SQL_AD_ADD_CONSTRAINT_INITIALLY_IMMEDIATE','%SQL_AD_ADD_CONSTRAINT_NON_DEFERRABLE','%SQL_AD_ADD_DOMAIN_CONSTRAINT','%SQL_AD_ADD_DOMAIN_DEFAULT','%SQL_AD_CONSTRAINT_NAME_DEFINITION','%SQL_AD_DROP_DOMAIN_CONSTRAINT','%SQL_AD_DROP_DOMAIN_DEFAULT','%SQL_AF_ALL',
            +            '%SQL_AF_AVG','%SQL_AF_COUNT','%SQL_AF_DISTINCT','%SQL_AF_MAX','%SQL_AF_MIN','%SQL_AF_SUM','%SQL_AGGREGATE_FUNCTIONS','%SQL_ALL_EXCEPT_LIKE',
            +            '%SQL_ALL_TYPES','%SQL_ALTER_DOMAIN','%SQL_ALTER_TABLE','%SQL_AM_CONNECTION','%SQL_AM_NONE','%SQL_AM_STATEMENT','%SQL_API_ALL_FUNCTIONS','%SQL_API_LOADBYORDINAL',
            +            '%SQL_API_ODBC3_ALL_FUNCTIONS','%SQL_API_ODBC3_ALL_FUNCTIONS_SIZE','%SQL_API_SQLALLOCCONNECT','%SQL_API_SQLALLOCENV','%SQL_API_SQLALLOCHANDLE','%SQL_API_SQLALLOCHANDLESTD','%SQL_API_SQLALLOCSTMT','%SQL_API_SQLBINDCOL',
            +            '%SQL_API_SQLBINDPARAM','%SQL_API_SQLBINDPARAMETER','%SQL_API_SQLBROWSECONNECT','%SQL_API_SQLBULKOPERATIONS','%SQL_API_SQLCANCEL','%SQL_API_SQLCLOSECURSOR','%SQL_API_SQLCOLATTRIBUTE','%SQL_API_SQLCOLATTRIBUTES',
            +            '%SQL_API_SQLCOLUMNPRIVILEGES','%SQL_API_SQLCOLUMNS','%SQL_API_SQLCONNECT','%SQL_API_SQLCOPYDESC','%SQL_API_SQLDATASOURCES','%SQL_API_SQLDESCRIBECOL','%SQL_API_SQLDESCRIBEPARAM','%SQL_API_SQLDISCONNECT',
            +            '%SQL_API_SQLDRIVERCONNECT','%SQL_API_SQLDRIVERS','%SQL_API_SQLENDTRAN','%SQL_API_SQLERROR','%SQL_API_SQLEXECDIRECT','%SQL_API_SQLEXECUTE','%SQL_API_SQLEXTENDEDFETCH','%SQL_API_SQLFETCH',
            +            '%SQL_API_SQLFETCHSCROLL','%SQL_API_SQLFOREIGNKEYS','%SQL_API_SQLFREECONNECT','%SQL_API_SQLFREEENV','%SQL_API_SQLFREEHANDLE','%SQL_API_SQLFREESTMT','%SQL_API_SQLGETCONNECTATTR','%SQL_API_SQLGETCONNECTOPTION',
            +            '%SQL_API_SQLGETCURSORNAME','%SQL_API_SQLGETDATA','%SQL_API_SQLGETDESCFIELD','%SQL_API_SQLGETDESCREC','%SQL_API_SQLGETDIAGFIELD','%SQL_API_SQLGETDIAGREC','%SQL_API_SQLGETENVATTR','%SQL_API_SQLGETFUNCTIONS',
            +            '%SQL_API_SQLGETINFO','%SQL_API_SQLGETSTMTATTR','%SQL_API_SQLGETSTMTOPTION','%SQL_API_SQLGETTYPEINFO','%SQL_API_SQLMORERESULTS','%SQL_API_SQLNATIVESQL','%SQL_API_SQLNUMPARAMS','%SQL_API_SQLNUMRESULTCOLS',
            +            '%SQL_API_SQLPARAMDATA','%SQL_API_SQLPARAMOPTIONS','%SQL_API_SQLPREPARE','%SQL_API_SQLPRIMARYKEYS','%SQL_API_SQLPROCEDURECOLUMNS','%SQL_API_SQLPROCEDURES','%SQL_API_SQLPUTDATA','%SQL_API_SQLROWCOUNT',
            +            '%SQL_API_SQLSETCONNECTATTR','%SQL_API_SQLSETCONNECTOPTION','%SQL_API_SQLSETCURSORNAME','%SQL_API_SQLSETDESCFIELD','%SQL_API_SQLSETDESCREC','%SQL_API_SQLSETENVATTR','%SQL_API_SQLSETPARAM','%SQL_API_SQLSETPOS',
            +            '%SQL_API_SQLSETSCROLLOPTIONS','%SQL_API_SQLSETSTMTATTR','%SQL_API_SQLSETSTMTOPTION','%SQL_API_SQLSPECIALCOLUMNS','%SQL_API_SQLSTATISTICS','%SQL_API_SQLTABLEPRIVILEGES','%SQL_API_SQLTABLES','%SQL_API_SQLTRANSACT',
            +            '%SQL_ARD_TYPE','%SQL_ASYNC_ENABLE','%SQL_ASYNC_ENABLE_DEFAULT','%SQL_ASYNC_ENABLE_OFF','%SQL_ASYNC_ENABLE_ON','%SQL_ASYNC_MODE','%SQL_ATTR_ACCESS_MODE','%SQL_ATTR_ANSI_APP',
            +            '%SQL_ATTR_APP_PARAM_DESC','%SQL_ATTR_APP_ROW_DESC','%SQL_ATTR_ASYNC_ENABLE','%SQL_ATTR_AUTOCOMMIT','%SQL_ATTR_AUTO_IPD','%SQL_ATTR_CONCURRENCY','%SQL_ATTR_CONNECTION_DEAD','%SQL_ATTR_CONNECTION_POOLING',
            +            '%SQL_ATTR_CONNECTION_TIMEOUT','%SQL_ATTR_CP_MATCH','%SQL_ATTR_CURRENT_CATALOG','%SQL_ATTR_CURSOR_SCROLLABLE','%SQL_ATTR_CURSOR_SENSITIVITY','%SQL_ATTR_CURSOR_TYPE','%SQL_ATTR_DISCONNECT_BEHAVIOR','%SQL_ATTR_ENABLE_AUTO_IPD',
            +            '%SQL_ATTR_ENLIST_IN_DTC','%SQL_ATTR_ENLIST_IN_XA','%SQL_ATTR_FETCH_BOOKMARK_PTR','%SQL_ATTR_IMP_PARAM_DESC','%SQL_ATTR_IMP_ROW_DESC','%SQL_ATTR_KEYSET_SIZE','%SQL_ATTR_LOGIN_TIMEOUT','%SQL_ATTR_MAX_LENGTH',
            +            '%SQL_ATTR_MAX_ROWS','%SQL_ATTR_METADATA_ID','%SQL_ATTR_NOSCAN','%SQL_ATTR_ODBC_CURSORS','%SQL_ATTR_ODBC_VERSION','%SQL_ATTR_OUTPUT_NTS','%SQL_ATTR_PACKET_SIZE','%SQL_ATTR_PARAMSET_SIZE',
            +            '%SQL_ATTR_PARAMS_PROCESSED_PTR','%SQL_ATTR_PARAM_BIND_OFFSET_PTR','%SQL_ATTR_PARAM_BIND_TYPE','%SQL_ATTR_PARAM_OPERATION_PTR','%SQL_ATTR_PARAM_STATUS_PTR','%SQL_ATTR_QUERY_TIMEOUT','%SQL_ATTR_QUIET_MODE','%SQL_ATTR_READONLY',
            +            '%SQL_ATTR_READWRITE_UNKNOWN','%SQL_ATTR_RETRIEVE_DATA','%SQL_ATTR_ROWS_FETCHED_PTR','%SQL_ATTR_ROW_ARRAY_SIZE','%SQL_ATTR_ROW_BIND_OFFSET_PTR','%SQL_ATTR_ROW_BIND_TYPE','%SQL_ATTR_ROW_NUMBER','%SQL_ATTR_ROW_OPERATION_PTR',
            +            '%SQL_ATTR_ROW_STATUS_PTR','%SQL_ATTR_SIMULATE_CURSOR','%SQL_ATTR_TRACE','%SQL_ATTR_TRACEFILE','%SQL_ATTR_TRANSLATE_LIB','%SQL_ATTR_TRANSLATE_OPTION','%SQL_ATTR_TXN_ISOLATION','%SQL_ATTR_USE_BOOKMARKS',
            +            '%SQL_ATTR_WRITE','%SQL_AT_ADD_COLUMN','%SQL_AT_ADD_COLUMN_COLLATION','%SQL_AT_ADD_COLUMN_DEFAULT','%SQL_AT_ADD_COLUMN_SINGLE','%SQL_AT_ADD_CONSTRAINT','%SQL_AT_ADD_TABLE_CONSTRAINT','%SQL_AT_CONSTRAINT_DEFERRABLE',
            +            '%SQL_AT_CONSTRAINT_INITIALLY_DEFERRED','%SQL_AT_CONSTRAINT_INITIALLY_IMMEDIATE','%SQL_AT_CONSTRAINT_NAME_DEFINITION','%SQL_AT_CONSTRAINT_NON_DEFERRABLE','%SQL_AT_DROP_COLUMN','%SQL_AT_DROP_COLUMN_CASCADE','%SQL_AT_DROP_COLUMN_DEFAULT','%SQL_AT_DROP_COLUMN_RESTRICT',
            +            '%SQL_AT_DROP_TABLE_CONSTRAINT_CASCADE','%SQL_AT_DROP_TABLE_CONSTRAINT_RESTRICT','%SQL_AT_SET_COLUMN_DEFAULT','%SQL_AUTOCOMMIT','%SQL_AUTOCOMMIT_DEFAULT','%SQL_AUTOCOMMIT_OFF','%SQL_AUTOCOMMIT_ON','%SQL_BATCH_ROW_COUNT',
            +            '%SQL_BATCH_SUPPORT','%SQL_BEST_ROWID','%SQL_BIGINT','%SQL_BINARY','%SQL_BIND_BY_COLUMN','%SQL_BIND_TYPE','%SQL_BIND_TYPE_DEFAULT','%SQL_BIT',
            +            '%SQL_BOOKMARK_PERSISTENCE','%SQL_BP_CLOSE','%SQL_BP_DELETE','%SQL_BP_DROP','%SQL_BP_OTHER_HSTMT','%SQL_BP_SCROLL','%SQL_BP_TRANSACTION','%SQL_BP_UPDATE',
            +            '%SQL_BRC_EXPLICIT','%SQL_BRC_PROCEDURES','%SQL_BRC_ROLLED_UP','%SQL_BS_ROW_COUNT_EXPLICIT','%SQL_BS_ROW_COUNT_PROC','%SQL_BS_SELECT_EXPLICIT','%SQL_BS_SELECT_PROC','%SQL_CA1_ABSOLUTE',
            +            '%SQL_CA1_BOOKMARK','%SQL_CA1_BULK_ADD','%SQL_CA1_BULK_DELETE_BY_BOOKMARK','%SQL_CA1_BULK_FETCH_BY_BOOKMARK','%SQL_CA1_BULK_UPDATE_BY_BOOKMARK','%SQL_CA1_LOCK_EXCLUSIVE','%SQL_CA1_LOCK_NO_CHANGE','%SQL_CA1_LOCK_UNLOCK',
            +            '%SQL_CA1_NEXT','%SQL_CA1_POSITIONED_DELETE','%SQL_CA1_POSITIONED_UPDATE','%SQL_CA1_POS_DELETE','%SQL_CA1_POS_POSITION','%SQL_CA1_POS_REFRESH','%SQL_CA1_POS_UPDATE','%SQL_CA1_RELATIVE',
            +            '%SQL_CA1_SELECT_FOR_UPDATE','%SQL_CA2_CRC_APPROXIMATE','%SQL_CA2_CRC_EXACT','%SQL_CA2_LOCK_CONCURRENCY','%SQL_CA2_MAX_ROWS_AFFECTS_ALL','%SQL_CA2_MAX_ROWS_CATALOG','%SQL_CA2_MAX_ROWS_DELETE','%SQL_CA2_MAX_ROWS_INSERT',
            +            '%SQL_CA2_MAX_ROWS_SELECT','%SQL_CA2_MAX_ROWS_UPDATE','%SQL_CA2_OPT_ROWVER_CONCURRENCY','%SQL_CA2_OPT_VALUES_CONCURRENCY','%SQL_CA2_READ_ONLY_CONCURRENCY','%SQL_CA2_SENSITIVITY_ADDITIONS','%SQL_CA2_SENSITIVITY_DELETIONS','%SQL_CA2_SENSITIVITY_UPDATES',
            +            '%SQL_CA2_SIMULATE_NON_UNIQUE','%SQL_CA2_SIMULATE_TRY_UNIQUE','%SQL_CA2_SIMULATE_UNIQUE','%SQL_CASCADE','%SQL_CATALOG_LOCATION','%SQL_CATALOG_NAME','%SQL_CATALOG_NAME_SEPARATOR','%SQL_CATALOG_TERM',
            +            '%SQL_CATALOG_USAGE','%SQL_CA_CONSTRAINT_DEFERRABLE','%SQL_CA_CONSTRAINT_INITIALLY_DEFERRED','%SQL_CA_CONSTRAINT_INITIALLY_IMMEDIATE','%SQL_CA_CONSTRAINT_NON_DEFERRABLE','%SQL_CA_CREATE_ASSERTION','%SQL_CB_CLOSE','%SQL_CB_DELETE',
            +            '%SQL_CB_NON_NULL','%SQL_CB_NULL','%SQL_CB_PRESERVE','%SQL_CCOL_CREATE_COLLATION','%SQL_CCS_COLLATE_CLAUSE','%SQL_CCS_CREATE_CHARACTER_SET','%SQL_CCS_LIMITED_COLLATION','%SQL_CC_CLOSE',
            +            '%SQL_CC_DELETE','%SQL_CC_PRESERVE','%SQL_CDO_COLLATION','%SQL_CDO_CONSTRAINT','%SQL_CDO_CONSTRAINT_DEFERRABLE','%SQL_CDO_CONSTRAINT_INITIALLY_DEFERRED','%SQL_CDO_CONSTRAINT_INITIALLY_IMMEDIATE','%SQL_CDO_CONSTRAINT_NAME_DEFINITION',
            +            '%SQL_CDO_CONSTRAINT_NON_DEFERRABLE','%SQL_CDO_CREATE_DOMAIN','%SQL_CDO_DEFAULT','%SQL_CD_FALSE','%SQL_CD_TRUE','%SQL_CHAR','%SQL_CLOSE','%SQL_CL_END',
            +            '%SQL_CL_START','%SQL_CN_ANY','%SQL_CN_DIFFERENT','%SQL_CN_NONE','%SQL_CODE_DATE','%SQL_CODE_DAY','%SQL_CODE_DAY_TO_HOUR','%SQL_CODE_DAY_TO_MINUTE',
            +            '%SQL_CODE_DAY_TO_SECOND','%SQL_CODE_HOUR','%SQL_CODE_HOUR_TO_MINUTE','%SQL_CODE_HOUR_TO_SECOND','%SQL_CODE_MINUTE','%SQL_CODE_MINUTE_TO_SECOND','%SQL_CODE_MONTH','%SQL_CODE_SECOND',
            +            '%SQL_CODE_TIME','%SQL_CODE_TIMESTAMP','%SQL_CODE_YEAR','%SQL_CODE_YEAR_TO_MONTH','%SQL_COLATT_OPT_MAX','%SQL_COLATT_OPT_MIN','%SQL_COLLATION_SEQ','%SQL_COLUMN_ALIAS',
            +            '%SQL_COLUMN_AUTO_INCREMENT','%SQL_COLUMN_CASE_SENSITIVE','%SQL_COLUMN_COUNT','%SQL_COLUMN_DISPLAY_SIZE','%SQL_COLUMN_IGNORE','%SQL_COLUMN_LABEL','%SQL_COLUMN_LENGTH','%SQL_COLUMN_MONEY',
            +            '%SQL_COLUMN_NAME','%SQL_COLUMN_NULLABLE','%SQL_COLUMN_NUMBER_UNKNOWN','%SQL_COLUMN_OWNER_NAME','%SQL_COLUMN_PRECISION','%SQL_COLUMN_QUALIFIER_NAME','%SQL_COLUMN_SCALE','%SQL_COLUMN_SEARCHABLE',
            +            '%SQL_COLUMN_TABLE_NAME','%SQL_COLUMN_TYPE','%SQL_COLUMN_TYPE_NAME','%SQL_COLUMN_UNSIGNED','%SQL_COLUMN_UPDATABLE','%SQL_COL_PRED_BASIC','%SQL_COL_PRED_CHAR','%SQL_COMMIT',
            +            '%SQL_CONCAT_NULL_BEHAVIOR','%SQL_CONCURRENCY','%SQL_CONCUR_DEFAULT','%SQL_CONCUR_LOCK','%SQL_CONCUR_READ_ONLY','%SQL_CONCUR_ROWVER','%SQL_CONCUR_TIMESTAMP','%SQL_CONCUR_VALUES',
            +            '%SQL_CONVERT_BIGINT','%SQL_CONVERT_BINARY','%SQL_CONVERT_BIT','%SQL_CONVERT_CHAR','%SQL_CONVERT_DATE','%SQL_CONVERT_DECIMAL','%SQL_CONVERT_DOUBLE','%SQL_CONVERT_FLOAT',
            +            '%SQL_CONVERT_FUNCTIONS','%SQL_CONVERT_GUID','%SQL_CONVERT_INTEGER','%SQL_CONVERT_INTERVAL_DAY_TIME','%SQL_CONVERT_INTERVAL_YEAR_MONTH','%SQL_CONVERT_LONGVARBINARY','%SQL_CONVERT_LONGVARCHAR','%SQL_CONVERT_NUMERIC',
            +            '%SQL_CONVERT_REAL','%SQL_CONVERT_SMALLINT','%SQL_CONVERT_TIME','%SQL_CONVERT_TIMESTAMP','%SQL_CONVERT_TINYINT','%SQL_CONVERT_VARBINARY','%SQL_CONVERT_VARCHAR','%SQL_CONVERT_WCHAR',
            +            '%SQL_CONVERT_WLONGVARCHAR','%SQL_CONVERT_WVARCHAR','%SQL_CORRELATION_NAME','%SQL_CP_DEFAULT','%SQL_CP_MATCH_DEFAULT','%SQL_CP_OFF','%SQL_CP_ONE_PER_DRIVER','%SQL_CP_ONE_PER_HENV',
            +            '%SQL_CP_RELAXED_MATCH','%SQL_CP_STRICT_MATCH','%SQL_CREATE_ASSERTION','%SQL_CREATE_CHARACTER_SET','%SQL_CREATE_COLLATION','%SQL_CREATE_DOMAIN','%SQL_CREATE_SCHEMA','%SQL_CREATE_TABLE',
            +            '%SQL_CREATE_TRANSLATION','%SQL_CREATE_VIEW','%SQL_CR_CLOSE','%SQL_CR_DELETE','%SQL_CR_PRESERVE','%SQL_CS_AUTHORIZATION','%SQL_CS_CREATE_SCHEMA','%SQL_CS_DEFAULT_CHARACTER_SET',
            +            '%SQL_CTR_CREATE_TRANSLATION','%SQL_CT_COLUMN_COLLATION','%SQL_CT_COLUMN_CONSTRAINT','%SQL_CT_COLUMN_DEFAULT','%SQL_CT_COMMIT_DELETE','%SQL_CT_COMMIT_PRESERVE','%SQL_CT_CONSTRAINT_DEFERRABLE','%SQL_CT_CONSTRAINT_INITIALLY_DEFERRED',
            +            '%SQL_CT_CONSTRAINT_INITIALLY_IMMEDIATE','%SQL_CT_CONSTRAINT_NAME_DEFINITION','%SQL_CT_CONSTRAINT_NON_DEFERRABLE','%SQL_CT_CREATE_TABLE','%SQL_CT_GLOBAL_TEMPORARY','%SQL_CT_LOCAL_TEMPORARY','%SQL_CT_TABLE_CONSTRAINT','%SQL_CURRENT_QUALIFIER',
            +            '%SQL_CURSOR_COMMIT_BEHAVIOR','%SQL_CURSOR_DYNAMIC','%SQL_CURSOR_FORWARD_ONLY','%SQL_CURSOR_KEYSET_DRIVEN','%SQL_CURSOR_ROLLBACK_BEHAVIOR','%SQL_CURSOR_SENSITIVITY','%SQL_CURSOR_STATIC','%SQL_CURSOR_TYPE',
            +            '%SQL_CURSOR_TYPE_DEFAULT','%SQL_CUR_DEFAULT','%SQL_CUR_USE_DRIVER','%SQL_CUR_USE_IF_NEEDED','%SQL_CUR_USE_ODBC','%SQL_CU_DML_STATEMENTS','%SQL_CU_INDEX_DEFINITION','%SQL_CU_PRIVILEGE_DEFINITION',
            +            '%SQL_CU_PROCEDURE_INVOCATION','%SQL_CU_TABLE_DEFINITION','%SQL_CVT_BIGINT','%SQL_CVT_BINARY','%SQL_CVT_BIT','%SQL_CVT_CHAR','%SQL_CVT_DATE','%SQL_CVT_DECIMAL',
            +            '%SQL_CVT_DOUBLE','%SQL_CVT_FLOAT','%SQL_CVT_GUID','%SQL_CVT_INTEGER','%SQL_CVT_INTERVAL_DAY_TIME','%SQL_CVT_INTERVAL_YEAR_MONTH','%SQL_CVT_LONGVARBINARY','%SQL_CVT_LONGVARCHAR',
            +            '%SQL_CVT_NUMERIC','%SQL_CVT_REAL','%SQL_CVT_SMALLINT','%SQL_CVT_TIME','%SQL_CVT_TIMESTAMP','%SQL_CVT_TINYINT','%SQL_CVT_VARBINARY','%SQL_CVT_VARCHAR',
            +            '%SQL_CVT_WCHAR','%SQL_CVT_WLONGVARCHAR','%SQL_CVT_WVARCHAR','%SQL_CV_CASCADED','%SQL_CV_CHECK_OPTION','%SQL_CV_CREATE_VIEW','%SQL_CV_LOCAL','%SQL_C_BINARY',
            +            '%SQL_C_BIT','%SQL_C_BOOKMARK','%SQL_C_CHAR','%SQL_C_DATE','%SQL_C_DEFAULT','%SQL_C_DOUBLE','%SQL_C_FLOAT','%SQL_C_GUID',
            +            '%SQL_C_INTERVAL_DAY','%SQL_C_INTERVAL_DAY_TO_HOUR','%SQL_C_INTERVAL_DAY_TO_MINUTE','%SQL_C_INTERVAL_DAY_TO_SECOND','%SQL_C_INTERVAL_HOUR','%SQL_C_INTERVAL_HOUR_TO_MINUTE','%SQL_C_INTERVAL_HOUR_TO_SECOND','%SQL_C_INTERVAL_MINUTE',
            +            '%SQL_C_INTERVAL_MINUTE_TO_SECOND','%SQL_C_INTERVAL_MONTH','%SQL_C_INTERVAL_SECOND','%SQL_C_INTERVAL_YEAR','%SQL_C_INTERVAL_YEAR_TO_MONTH','%SQL_C_LONG','%SQL_C_NUMERIC','%SQL_C_SBIGINT',
            +            '%SQL_C_SHORT','%SQL_C_SLONG','%SQL_C_SSHORT','%SQL_C_STINYINT','%SQL_C_TIME','%SQL_C_TIMESTAMP','%SQL_C_TINYINT','%SQL_C_TYPE_DATE',
            +            '%SQL_C_TYPE_TIME','%SQL_C_TYPE_TIMESTAMP','%SQL_C_UBIGINT','%SQL_C_ULONG','%SQL_C_USHORT','%SQL_C_UTINYINT','%SQL_C_VARBOOKMARK','%SQL_DATABASE_NAME',
            +            '%SQL_DATA_AT_EXEC','%SQL_DATA_SOURCE_NAME','%SQL_DATA_SOURCE_READ_ONLY','%SQL_DATE','%SQL_DATETIME','%SQL_DATETIME_LITERALS','%SQL_DATE_LEN','%SQL_DAY',
            +            '%SQL_DAY_TO_HOUR','%SQL_DAY_TO_MINUTE','%SQL_DAY_TO_SECOND','%SQL_DA_DROP_ASSERTION','%SQL_DBMS_NAME','%SQL_DBMS_VER','%SQL_DB_DEFAULT','%SQL_DB_DISCONNECT',
            +            '%SQL_DB_RETURN_TO_POOL','%SQL_DCS_DROP_CHARACTER_SET','%SQL_DC_DROP_COLLATION','%SQL_DDL_INDEX','%SQL_DD_CASCADE','%SQL_DD_DROP_DOMAIN','%SQL_DD_RESTRICT','%SQL_DECIMAL',
            +            '%SQL_DEFAULT','%SQL_DEFAULT_PARAM','%SQL_DEFAULT_TXN_ISOLATION','%SQL_DELETE','%SQL_DELETE_BY_BOOKMARK','%SQL_DESCRIBE_PARAMETER','%SQL_DESC_ALLOC_AUTO','%SQL_DESC_ALLOC_TYPE',
            +            '%SQL_DESC_ALLOC_USER','%SQL_DESC_ARRAY_SIZE','%SQL_DESC_ARRAY_STATUS_PTR','%SQL_DESC_AUTO_UNIQUE_VALUE','%SQL_DESC_BASE_COLUMN_NAME','%SQL_DESC_BASE_TABLE_NAME','%SQL_DESC_BIND_OFFSET_PTR','%SQL_DESC_BIND_TYPE',
            +            '%SQL_DESC_CASE_SENSITIVE','%SQL_DESC_CATALOG_NAME','%SQL_DESC_CONCISE_TYPE','%SQL_DESC_COUNT','%SQL_DESC_DATA_PTR','%SQL_DESC_DATETIME_INTERVAL_CODE','%SQL_DESC_DATETIME_INTERVAL_PRECISION','%SQL_DESC_DISPLAY_SIZE',
            +            '%SQL_DESC_FIXED_PREC_SCALE','%SQL_DESC_INDICATOR_PTR','%SQL_DESC_LABEL','%SQL_DESC_LENGTH','%SQL_DESC_LITERAL_PREFIX','%SQL_DESC_LITERAL_SUFFIX','%SQL_DESC_LOCAL_TYPE_NAME','%SQL_DESC_MAXIMUM_SCALE',
            +            '%SQL_DESC_MINIMUM_SCALE','%SQL_DESC_NAME','%SQL_DESC_NULLABLE','%SQL_DESC_NUM_PREC_RADIX','%SQL_DESC_OCTET_LENGTH','%SQL_DESC_OCTET_LENGTH_PTR','%SQL_DESC_PARAMETER_TYPE','%SQL_DESC_PRECISION',
            +            '%SQL_DESC_ROWS_PROCESSED_PTR','%SQL_DESC_SCALE','%SQL_DESC_SCHEMA_NAME','%SQL_DESC_SEARCHABLE','%SQL_DESC_TABLE_NAME','%SQL_DESC_TYPE','%SQL_DESC_TYPE_NAME','%SQL_DESC_UNNAMED',
            +            '%SQL_DESC_UNSIGNED','%SQL_DESC_UPDATABLE','%SQL_DIAG_ALTER_TABLE','%SQL_DIAG_CALL','%SQL_DIAG_CLASS_ORIGIN','%SQL_DIAG_COLUMN_NUMBER','%SQL_DIAG_CONNECTION_NAME','%SQL_DIAG_CREATE_INDEX',
            +            '%SQL_DIAG_CREATE_TABLE','%SQL_DIAG_CREATE_VIEW','%SQL_DIAG_CURSOR_ROW_COUNT','%SQL_DIAG_DELETE_WHERE','%SQL_DIAG_DROP_INDEX','%SQL_DIAG_DROP_TABLE','%SQL_DIAG_DROP_VIEW','%SQL_DIAG_DYNAMIC_DELETE_CURSOR',
            +            '%SQL_DIAG_DYNAMIC_FUNCTION','%SQL_DIAG_DYNAMIC_FUNCTION_CODE','%SQL_DIAG_DYNAMIC_UPDATE_CURSOR','%SQL_DIAG_GRANT','%SQL_DIAG_INSERT','%SQL_DIAG_MESSAGE_TEXT','%SQL_DIAG_NATIVE','%SQL_DIAG_NUMBER',
            +            '%SQL_DIAG_RETURNCODE','%SQL_DIAG_REVOKE','%SQL_DIAG_ROW_COUNT','%SQL_DIAG_ROW_NUMBER','%SQL_DIAG_SELECT_CURSOR','%SQL_DIAG_SERVER_NAME','%SQL_DIAG_SQLSTATE','%SQL_DIAG_SUBCLASS_ORIGIN',
            +            '%SQL_DIAG_UNKNOWN_STATEMENT','%SQL_DIAG_UPDATE_WHERE','%SQL_DI_CREATE_INDEX','%SQL_DI_DROP_INDEX','%SQL_DL_SQL92_DATE','%SQL_DL_SQL92_INTERVAL_DAY','%SQL_DL_SQL92_INTERVAL_DAY_TO_HOUR','%SQL_DL_SQL92_INTERVAL_DAY_TO_MINUTE',
            +            '%SQL_DL_SQL92_INTERVAL_DAY_TO_SECOND','%SQL_DL_SQL92_INTERVAL_HOUR','%SQL_DL_SQL92_INTERVAL_HOUR_TO_MINUTE','%SQL_DL_SQL92_INTERVAL_HOUR_TO_SECOND','%SQL_DL_SQL92_INTERVAL_MINUTE','%SQL_DL_SQL92_INTERVAL_MINUTE_TO_SECOND','%SQL_DL_SQL92_INTERVAL_MONTH','%SQL_DL_SQL92_INTERVAL_SECOND',
            +            '%SQL_DL_SQL92_INTERVAL_YEAR','%SQL_DL_SQL92_INTERVAL_YEAR_TO_MONTH','%SQL_DL_SQL92_TIME','%SQL_DL_SQL92_TIMESTAMP','%SQL_DM_VER','%SQL_DOUBLE','%SQL_DRIVER_COMPLETE','%SQL_DRIVER_COMPLETE_REQUIRED',
            +            '%SQL_DRIVER_HDBC','%SQL_DRIVER_HDESC','%SQL_DRIVER_HENV','%SQL_DRIVER_HLIB','%SQL_DRIVER_HSTMT','%SQL_DRIVER_NAME','%SQL_DRIVER_NOPROMPT','%SQL_DRIVER_ODBC_VER',
            +            '%SQL_DRIVER_PROMPT','%SQL_DRIVER_VER','%SQL_DROP','%SQL_DROP_ASSERTION','%SQL_DROP_CHARACTER_SET','%SQL_DROP_COLLATION','%SQL_DROP_DOMAIN','%SQL_DROP_SCHEMA',
            +            '%SQL_DROP_TABLE','%SQL_DROP_TRANSLATION','%SQL_DROP_VIEW','%SQL_DS_CASCADE','%SQL_DS_DROP_SCHEMA','%SQL_DS_RESTRICT','%SQL_DTC_DONE','%SQL_DTC_ENLIST_EXPENSIVE',
            +            '%SQL_DTC_TRANSITION_COST','%SQL_DTC_UNENLIST_EXPENSIVE','%SQL_DTR_DROP_TRANSLATION','%SQL_DT_CASCADE','%SQL_DT_DROP_TABLE','%SQL_DT_RESTRICT','%SQL_DV_CASCADE','%SQL_DV_DROP_VIEW',
            +            '%SQL_DV_RESTRICT','%SQL_DYNAMIC_CURSOR_ATTRIBUTES1','%SQL_DYNAMIC_CURSOR_ATTRIBUTES2','%SQL_ENSURE','%SQL_ENTIRE_ROWSET','%SQL_ERROR','%SQL_EXPRESSIONS_IN_ORDERBY','%SQL_FALSE',
            +            '%SQL_FD_FETCH_ABSOLUTE','%SQL_FD_FETCH_BOOKMARK','%SQL_FD_FETCH_FIRST','%SQL_FD_FETCH_LAST','%SQL_FD_FETCH_NEXT','%SQL_FD_FETCH_PREV','%SQL_FD_FETCH_PRIOR','%SQL_FD_FETCH_RELATIVE',
            +            '%SQL_FETCH_ABSOLUTE','%SQL_FETCH_BOOKMARK','%SQL_FETCH_BY_BOOKMARK','%SQL_FETCH_DIRECTION','%SQL_FETCH_FIRST','%SQL_FETCH_FIRST_SYSTEM','%SQL_FETCH_FIRST_USER','%SQL_FETCH_LAST',
            +            '%SQL_FETCH_NEXT','%SQL_FETCH_PREV','%SQL_FETCH_PRIOR','%SQL_FETCH_RELATIVE','%SQL_FILE_CATALOG','%SQL_FILE_NOT_SUPPORTED','%SQL_FILE_QUALIFIER','%SQL_FILE_TABLE',
            +            '%SQL_FILE_USAGE','%SQL_FLOAT','%SQL_FN_CVT_CAST','%SQL_FN_CVT_CONVERT','%SQL_FN_NUM_ABS','%SQL_FN_NUM_ACOS','%SQL_FN_NUM_ASIN','%SQL_FN_NUM_ATAN',
            +            '%SQL_FN_NUM_ATAN2','%SQL_FN_NUM_CEILING','%SQL_FN_NUM_COS','%SQL_FN_NUM_COT','%SQL_FN_NUM_DEGREES','%SQL_FN_NUM_EXP','%SQL_FN_NUM_FLOOR','%SQL_FN_NUM_LOG',
            +            '%SQL_FN_NUM_LOG10','%SQL_FN_NUM_MOD','%SQL_FN_NUM_PI','%SQL_FN_NUM_POWER','%SQL_FN_NUM_RADIANS','%SQL_FN_NUM_RAND','%SQL_FN_NUM_ROUND','%SQL_FN_NUM_SIGN',
            +            '%SQL_FN_NUM_SIN','%SQL_FN_NUM_SQRT','%SQL_FN_NUM_TAN','%SQL_FN_NUM_TRUNCATE','%SQL_FN_STR_ASCII','%SQL_FN_STR_BIT_LENGTH','%SQL_FN_STR_CHAR','%SQL_FN_STR_CHARACTER_LENGTH',
            +            '%SQL_FN_STR_CHAR_LENGTH','%SQL_FN_STR_CONCAT','%SQL_FN_STR_DIFFERENCE','%SQL_FN_STR_INSERT','%SQL_FN_STR_LCASE','%SQL_FN_STR_LEFT','%SQL_FN_STR_LENGTH','%SQL_FN_STR_LOCATE',
            +            '%SQL_FN_STR_LOCATE_2','%SQL_FN_STR_LTRIM','%SQL_FN_STR_OCTET_LENGTH','%SQL_FN_STR_POSITION','%SQL_FN_STR_REPEAT','%SQL_FN_STR_REPLACE','%SQL_FN_STR_RIGHT','%SQL_FN_STR_RTRIM',
            +            '%SQL_FN_STR_SOUNDEX','%SQL_FN_STR_SPACE','%SQL_FN_STR_SUBSTRING','%SQL_FN_STR_UCASE','%SQL_FN_SYS_DBNAME','%SQL_FN_SYS_IFNULL','%SQL_FN_SYS_USERNAME','%SQL_FN_TD_CURDATE',
            +            '%SQL_FN_TD_CURRENT_DATE','%SQL_FN_TD_CURRENT_TIME','%SQL_FN_TD_CURRENT_TIMESTAMP','%SQL_FN_TD_CURTIME','%SQL_FN_TD_DAYNAME','%SQL_FN_TD_DAYOFMONTH','%SQL_FN_TD_DAYOFWEEK','%SQL_FN_TD_DAYOFYEAR',
            +            '%SQL_FN_TD_EXTRACT','%SQL_FN_TD_HOUR','%SQL_FN_TD_MINUTE','%SQL_FN_TD_MONTH','%SQL_FN_TD_MONTHNAME','%SQL_FN_TD_NOW','%SQL_FN_TD_QUARTER','%SQL_FN_TD_SECOND',
            +            '%SQL_FN_TD_TIMESTAMPADD','%SQL_FN_TD_TIMESTAMPDIFF','%SQL_FN_TD_WEEK','%SQL_FN_TD_YEAR','%SQL_FN_TSI_DAY','%SQL_FN_TSI_FRAC_SECOND','%SQL_FN_TSI_HOUR','%SQL_FN_TSI_MINUTE',
            +            '%SQL_FN_TSI_MONTH','%SQL_FN_TSI_QUARTER','%SQL_FN_TSI_SECOND','%SQL_FN_TSI_WEEK','%SQL_FN_TSI_YEAR','%SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1','%SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2','%SQL_GB_COLLATE',
            +            '%SQL_GB_GROUP_BY_CONTAINS_SELECT','%SQL_GB_GROUP_BY_EQUALS_SELECT','%SQL_GB_NOT_SUPPORTED','%SQL_GB_NO_RELATION','%SQL_GD_ANY_COLUMN','%SQL_GD_ANY_ORDER','%SQL_GD_BLOCK','%SQL_GD_BOUND',
            +            '%SQL_GETDATA_EXTENSIONS','%SQL_GET_BOOKMARK','%SQL_GROUP_BY','%SQL_GUID','%SQL_HANDLE_DBC','%SQL_HANDLE_DESC','%SQL_HANDLE_ENV','%SQL_HANDLE_SENV',
            +            '%SQL_HANDLE_STMT','%SQL_HOUR','%SQL_HOUR_TO_MINUTE','%SQL_HOUR_TO_SECOND','%SQL_IC_LOWER','%SQL_IC_MIXED','%SQL_IC_SENSITIVE','%SQL_IC_UPPER',
            +            '%SQL_IDENTIFIER_CASE','%SQL_IDENTIFIER_QUOTE_CHAR','%SQL_IGNORE','%SQL_IK_ALL','%SQL_IK_ASC','%SQL_IK_DESC','%SQL_IK_NONE','%SQL_INDEX_ALL',
            +            '%SQL_INDEX_CLUSTERED','%SQL_INDEX_HASHED','%SQL_INDEX_KEYWORDS','%SQL_INDEX_OTHER','%SQL_INDEX_UNIQUE','%SQL_INFO_FIRST','%SQL_INFO_SCHEMA_VIEWS','%SQL_INITIALLY_DEFERRED',
            +            '%SQL_INITIALLY_IMMEDIATE','%SQL_INSENSITIVE','%SQL_INSERT_STATEMENT','%SQL_INTEGER','%SQL_INTEGRITY','%SQL_INTERVAL','%SQL_INTERVAL_DAY','%SQL_INTERVAL_DAY_TO_HOUR',
            +            '%SQL_INTERVAL_DAY_TO_MINUTE','%SQL_INTERVAL_DAY_TO_SECOND','%SQL_INTERVAL_HOUR','%SQL_INTERVAL_HOUR_TO_MINUTE','%SQL_INTERVAL_HOUR_TO_SECOND','%SQL_INTERVAL_MINUTE','%SQL_INTERVAL_MINUTE_TO_SECOND','%SQL_INTERVAL_MONTH',
            +            '%SQL_INTERVAL_SECOND','%SQL_INTERVAL_YEAR','%SQL_INTERVAL_YEAR_TO_MONTH','%SQL_INVALID_HANDLE','%SQL_ISV_ASSERTIONS','%SQL_ISV_CHARACTER_SETS','%SQL_ISV_CHECK_CONSTRAINTS','%SQL_ISV_COLLATIONS',
            +            '%SQL_ISV_COLUMNS','%SQL_ISV_COLUMN_DOMAIN_USAGE','%SQL_ISV_COLUMN_PRIVILEGES','%SQL_ISV_CONSTRAINT_COLUMN_USAGE','%SQL_ISV_CONSTRAINT_TABLE_USAGE','%SQL_ISV_DOMAINS','%SQL_ISV_DOMAIN_CONSTRAINTS','%SQL_ISV_KEY_COLUMN_USAGE',
            +            '%SQL_ISV_REFERENTIAL_CONSTRAINTS','%SQL_ISV_SCHEMATA','%SQL_ISV_SQL_LANGUAGES','%SQL_ISV_TABLES','%SQL_ISV_TABLE_CONSTRAINTS','%SQL_ISV_TABLE_PRIVILEGES','%SQL_ISV_TRANSLATIONS','%SQL_ISV_USAGE_PRIVILEGES',
            +            '%SQL_ISV_VIEWS','%SQL_ISV_VIEW_COLUMN_USAGE','%SQL_ISV_VIEW_TABLE_USAGE','%SQL_IS_DAY','%SQL_IS_DAY_TO_HOUR','%SQL_IS_DAY_TO_MINUTE','%SQL_IS_DAY_TO_SECOND','%SQL_IS_HOUR',
            +            '%SQL_IS_HOUR_TO_MINUTE','%SQL_IS_HOUR_TO_SECOND','%SQL_IS_INSERT_LITERALS','%SQL_IS_INSERT_SEARCHED','%SQL_IS_INTEGER','%SQL_IS_MINUTE','%SQL_IS_MINUTE_TO_SECOND','%SQL_IS_MONTH',
            +            '%SQL_IS_POINTER','%SQL_IS_SECOND','%SQL_IS_SELECT_INTO','%SQL_IS_SMALLINT','%SQL_IS_UINTEGER','%SQL_IS_USMALLINT','%SQL_IS_YEAR','%SQL_IS_YEAR_TO_MONTH',
            +            '%SQL_KEYSET_CURSOR_ATTRIBUTES1','%SQL_KEYSET_CURSOR_ATTRIBUTES2','%SQL_KEYSET_SIZE','%SQL_KEYSET_SIZE_DEFAULT','%SQL_KEYWORDS','%SQL_LCK_EXCLUSIVE','%SQL_LCK_NO_CHANGE','%SQL_LCK_UNLOCK',
            +            '%SQL_LEN_BINARY_ATTR_OFFSET','%SQL_LEN_DATA_AT_EXEC_OFFSET','%SQL_LIKE_ESCAPE_CLAUSE','%SQL_LIKE_ONLY','%SQL_LOCK_EXCLUSIVE','%SQL_LOCK_NO_CHANGE','%SQL_LOCK_TYPES','%SQL_LOCK_UNLOCK',
            +            '%SQL_LOGIN_TIMEOUT','%SQL_LOGIN_TIMEOUT_DEFAULT','%SQL_LONGVARBINARY','%SQL_LONGVARCHAR','%SQL_MAXIMUM_CATALOG_NAME_LENGTH','%SQL_MAXIMUM_COLUMNS_IN_GROUP_BY','%SQL_MAXIMUM_COLUMNS_IN_INDEX','%SQL_MAXIMUM_COLUMNS_IN_ORDER_BY',
            +            '%SQL_MAXIMUM_COLUMNS_IN_SELECT','%SQL_MAXIMUM_COLUMN_NAME_LENGTH','%SQL_MAXIMUM_CONCURRENT_ACTIVITIES','%SQL_MAXIMUM_CURSOR_NAME_LENGTH','%SQL_MAXIMUM_DRIVER_CONNECTIONS','%SQL_MAXIMUM_IDENTIFIER_LENGTH','%SQL_MAXIMUM_INDEX_SIZE','%SQL_MAXIMUM_ROW_SIZE',
            +            '%SQL_MAXIMUM_SCHEMA_NAME_LENGTH','%SQL_MAXIMUM_STATEMENT_LENGTH','%SQL_MAXIMUM_TABLES_IN_SELECT','%SQL_MAXIMUM_USER_NAME_LENGTH','%SQL_MAX_ASYNC_CONCURRENT_STATEMENTS','%SQL_MAX_BINARY_LITERAL_LEN','%SQL_MAX_CATALOG_NAME_LEN','%SQL_MAX_CHAR_LITERAL_LEN',
            +            '%SQL_MAX_COLUMNS_IN_GROUP_BY','%SQL_MAX_COLUMNS_IN_INDEX','%SQL_MAX_COLUMNS_IN_ORDER_BY','%SQL_MAX_COLUMNS_IN_SELECT','%SQL_MAX_COLUMNS_IN_TABLE','%SQL_MAX_COLUMN_NAME_LEN','%SQL_MAX_CONCURRENT_ACTIVITIES','%SQL_MAX_CURSOR_NAME_LEN',
            +            '%SQL_MAX_DRIVER_CONNECTIONS','%SQL_MAX_DSN_LENGTH','%SQL_MAX_IDENTIFIER_LEN','%SQL_MAX_INDEX_SIZE','%SQL_MAX_LENGTH','%SQL_MAX_LENGTH_DEFAULT','%SQL_MAX_MESSAGE_LENGTH','%SQL_MAX_NUMERIC_LEN',
            +            '%SQL_MAX_OPTION_STRING_LENGTH','%SQL_MAX_OWNER_NAME_LEN','%SQL_MAX_PROCEDURE_NAME_LEN','%SQL_MAX_QUALIFIER_NAME_LEN','%SQL_MAX_ROWS','%SQL_MAX_ROWS_DEFAULT','%SQL_MAX_ROW_SIZE','%SQL_MAX_ROW_SIZE_INCLUDES_LONG',
            +            '%SQL_MAX_SCHEMA_NAME_LEN','%SQL_MAX_STATEMENT_LEN','%SQL_MAX_TABLES_IN_SELECT','%SQL_MAX_TABLE_NAME_LEN','%SQL_MAX_USER_NAME_LEN','%SQL_MINUTE','%SQL_MINUTE_TO_SECOND','%SQL_MODE_DEFAULT',
            +            '%SQL_MODE_READ_ONLY','%SQL_MODE_READ_WRITE','%SQL_MONTH','%SQL_MULTIPLE_ACTIVE_TXN','%SQL_MULT_RESULT_SETS','%SQL_NAMED','%SQL_NC_END','%SQL_NC_HIGH',
            +            '%SQL_NC_LOW','%SQL_NC_START','%SQL_NEED_DATA','%SQL_NEED_LONG_DATA_LEN','%SQL_NNC_NON_NULL','%SQL_NNC_NULL','%SQL_NONSCROLLABLE','%SQL_NON_NULLABLE_COLUMNS',
            +            '%SQL_NOSCAN','%SQL_NOSCAN_DEFAULT','%SQL_NOSCAN_OFF','%SQL_NOSCAN_ON','%SQL_NOT_DEFERRABLE','%SQL_NO_ACTION','%SQL_NO_COLUMN_NUMBER','%SQL_NO_DATA',
            +            '%SQL_NO_DATA_FOUND','%SQL_NO_NULLS','%SQL_NO_ROW_NUMBER','%SQL_NO_TOTAL','%SQL_NTS','%SQL_NTSL','%SQL_NULLABLE','%SQL_NULLABLE_UNKNOWN',
            +            '%SQL_NULL_COLLATION','%SQL_NULL_DATA','%SQL_NULL_HANDLE','%SQL_NULL_HDBC','%SQL_NULL_HDESC','%SQL_NULL_HENV','%SQL_NULL_HSTMT','%SQL_NUMERIC',
            +            '%SQL_NUMERIC_FUNCTIONS','%SQL_OAC_LEVEL1','%SQL_OAC_LEVEL2','%SQL_OAC_NONE','%SQL_ODBC_API_CONFORMANCE','%SQL_ODBC_CURSORS','%SQL_ODBC_INTERFACE_CONFORMANCE','%SQL_ODBC_SAG_CLI_CONFORMANCE',
            +            '%SQL_ODBC_SQL_CONFORMANCE','%SQL_ODBC_SQL_OPT_IEF','%SQL_ODBC_VER','%SQL_OIC_CORE','%SQL_OIC_LEVEL1','%SQL_OIC_LEVEL2','%SQL_OJ_ALL_COMPARISON_OPS','%SQL_OJ_CAPABILITIES',
            +            '%SQL_OJ_FULL','%SQL_OJ_INNER','%SQL_OJ_LEFT','%SQL_OJ_NESTED','%SQL_OJ_NOT_ORDERED','%SQL_OJ_RIGHT','%SQL_OPT_TRACE','%SQL_OPT_TRACEFILE',
            +            '%SQL_OPT_TRACE_DEFAULT','%SQL_OPT_TRACE_OFF','%SQL_OPT_TRACE_ON','%SQL_ORDER_BY_COLUMNS_IN_SELECT','%SQL_OSCC_COMPLIANT','%SQL_OSCC_NOT_COMPLIANT','%SQL_OSC_CORE','%SQL_OSC_EXTENDED',
            +            '%SQL_OSC_MINIMUM','%SQL_OUTER_JOINS','%SQL_OUTER_JOIN_CAPABILITIES','%SQL_OU_DML_STATEMENTS','%SQL_OU_INDEX_DEFINITION','%SQL_OU_PRIVILEGE_DEFINITION','%SQL_OU_PROCEDURE_INVOCATION','%SQL_OU_TABLE_DEFINITION',
            +            '%SQL_OV_ODBC2','%SQL_OV_ODBC3','%SQL_OWNER_TERM','%SQL_OWNER_USAGE','%SQL_PACKET_SIZE','%SQL_PARAM_ARRAY_ROW_COUNTS','%SQL_PARAM_ARRAY_SELECTS','%SQL_PARAM_BIND_BY_COLUMN',
            +            '%SQL_PARAM_BIND_TYPE_DEFAULT','%SQL_PARAM_DIAG_UNAVAILABLE','%SQL_PARAM_ERROR','%SQL_PARAM_IGNORE','%SQL_PARAM_INPUT','%SQL_PARAM_INPUT_OUTPUT','%SQL_PARAM_OUTPUT','%SQL_PARAM_PROCEED',
            +            '%SQL_PARAM_SUCCESS','%SQL_PARAM_SUCCESS_WITH_INFO','%SQL_PARAM_TYPE_DEFAULT','%SQL_PARAM_TYPE_UNKNOWN','%SQL_PARAM_UNUSED','%SQL_PARC_BATCH','%SQL_PARC_NO_BATCH','%SQL_PAS_BATCH',
            +            '%SQL_PAS_NO_BATCH','%SQL_PAS_NO_SELECT','%SQL_PC_NON_PSEUDO','%SQL_PC_NOT_PSEUDO','%SQL_PC_PSEUDO','%SQL_PC_UNKNOWN','%SQL_POSITION','%SQL_POSITIONED_STATEMENTS',
            +            '%SQL_POS_ADD','%SQL_POS_DELETE','%SQL_POS_OPERATIONS','%SQL_POS_POSITION','%SQL_POS_REFRESH','%SQL_POS_UPDATE','%SQL_PRED_BASIC','%SQL_PRED_CHAR',
            +            '%SQL_PRED_NONE','%SQL_PRED_SEARCHABLE','%SQL_PROCEDURES','%SQL_PROCEDURE_TERM','%SQL_PS_POSITIONED_DELETE','%SQL_PS_POSITIONED_UPDATE','%SQL_PS_SELECT_FOR_UPDATE','%SQL_PT_FUNCTION',
            +            '%SQL_PT_PROCEDURE','%SQL_PT_UNKNOWN','%SQL_QL_END','%SQL_QL_START','%SQL_QUALIFIER_LOCATION','%SQL_QUALIFIER_NAME_SEPARATOR','%SQL_QUALIFIER_TERM','%SQL_QUALIFIER_USAGE',
            +            '%SQL_QUERY_TIMEOUT','%SQL_QUERY_TIMEOUT_DEFAULT','%SQL_QUICK','%SQL_QUIET_MODE','%SQL_QUOTED_IDENTIFIER_CASE','%SQL_QU_DML_STATEMENTS','%SQL_QU_INDEX_DEFINITION','%SQL_QU_PRIVILEGE_DEFINITION',
            +            '%SQL_QU_PROCEDURE_INVOCATION','%SQL_QU_TABLE_DEFINITION','%SQL_RD_DEFAULT','%SQL_RD_OFF','%SQL_RD_ON','%SQL_REAL','%SQL_REFRESH','%SQL_RESET_PARAMS',
            +            '%SQL_RESTRICT','%SQL_RESULT_COL','%SQL_RETRIEVE_DATA','%SQL_RETURN_VALUE','%SQL_ROLLBACK','%SQL_ROWSET_SIZE','%SQL_ROWSET_SIZE_DEFAULT','%SQL_ROWVER',
            +            '%SQL_ROW_ADDED','%SQL_ROW_DELETED','%SQL_ROW_ERROR','%SQL_ROW_IDENTIFIER','%SQL_ROW_IGNORE','%SQL_ROW_NOROW','%SQL_ROW_NUMBER','%SQL_ROW_NUMBER_UNKNOWN',
            +            '%SQL_ROW_PROCEED','%SQL_ROW_SUCCESS','%SQL_ROW_SUCCESS_WITH_INFO','%SQL_ROW_UPDATED','%SQL_ROW_UPDATES','%SQL_SCCO_LOCK','%SQL_SCCO_OPT_ROWVER','%SQL_SCCO_OPT_TIMESTAMP',
            +            '%SQL_SCCO_OPT_VALUES','%SQL_SCCO_READ_ONLY','%SQL_SCC_ISO92_CLI','%SQL_SCC_XOPEN_CLI_VERSION1','%SQL_SCHEMA_TERM','%SQL_SCHEMA_USAGE','%SQL_SCOPE_CURROW','%SQL_SCOPE_SESSION',
            +            '%SQL_SCOPE_TRANSACTION','%SQL_SCROLLABLE','%SQL_SCROLL_CONCURRENCY','%SQL_SCROLL_DYNAMIC','%SQL_SCROLL_FORWARD_ONLY','%SQL_SCROLL_KEYSET_DRIVEN','%SQL_SCROLL_OPTIONS','%SQL_SCROLL_STATIC',
            +            '%SQL_SC_FIPS127_2_TRANSITIONAL','%SQL_SC_NON_UNIQUE','%SQL_SC_SQL92_ENTRY','%SQL_SC_SQL92_FULL','%SQL_SC_SQL92_INTERMEDIATE','%SQL_SC_TRY_UNIQUE','%SQL_SC_UNIQUE','%SQL_SDF_CURRENT_DATE',
            +            '%SQL_SDF_CURRENT_TIME','%SQL_SDF_CURRENT_TIMESTAMP','%SQL_SEARCHABLE','%SQL_SEARCH_PATTERN_ESCAPE','%SQL_SECOND','%SQL_SENSITIVE','%SQL_SERVER_NAME','%SQL_SETPARAM_VALUE_MAX',
            +            '%SQL_SETPOS_MAX_LOCK_VALUE','%SQL_SETPOS_MAX_OPTION_VALUE','%SQL_SET_DEFAULT','%SQL_SET_NULL','%SQL_SFKD_CASCADE','%SQL_SFKD_NO_ACTION','%SQL_SFKD_SET_DEFAULT','%SQL_SFKD_SET_NULL',
            +            '%SQL_SFKU_CASCADE','%SQL_SFKU_NO_ACTION','%SQL_SFKU_SET_DEFAULT','%SQL_SFKU_SET_NULL','%SQL_SG_DELETE_TABLE','%SQL_SG_INSERT_COLUMN','%SQL_SG_INSERT_TABLE','%SQL_SG_REFERENCES_COLUMN',
            +            '%SQL_SG_REFERENCES_TABLE','%SQL_SG_SELECT_TABLE','%SQL_SG_UPDATE_COLUMN','%SQL_SG_UPDATE_TABLE','%SQL_SG_USAGE_ON_CHARACTER_SET','%SQL_SG_USAGE_ON_COLLATION','%SQL_SG_USAGE_ON_DOMAIN','%SQL_SG_USAGE_ON_TRANSLATION',
            +            '%SQL_SG_WITH_GRANT_OPTION','%SQL_SIGNED_OFFSET','%SQL_SIMULATE_CURSOR','%SQL_SMALLINT','%SQL_SNVF_BIT_LENGTH','%SQL_SNVF_CHARACTER_LENGTH','%SQL_SNVF_CHAR_LENGTH','%SQL_SNVF_EXTRACT',
            +            '%SQL_SNVF_OCTET_LENGTH','%SQL_SNVF_POSITION','%SQL_SO_DYNAMIC','%SQL_SO_FORWARD_ONLY','%SQL_SO_KEYSET_DRIVEN','%SQL_SO_MIXED','%SQL_SO_STATIC','%SQL_SPECIAL_CHARACTERS',
            +            '%SQL_SPEC_MAJOR','%SQL_SPEC_MINOR','%SQL_SP_BETWEEN','%SQL_SP_COMPARISON','%SQL_SP_EXISTS','%SQL_SP_IN','%SQL_SP_ISNOTNULL','%SQL_SP_ISNULL',
            +            '%SQL_SP_LIKE','%SQL_SP_MATCH_FULL','%SQL_SP_MATCH_PARTIAL','%SQL_SP_MATCH_UNIQUE_FULL','%SQL_SP_MATCH_UNIQUE_PARTIAL','%SQL_SP_OVERLAPS','%SQL_SP_QUANTIFIED_COMPARISON','%SQL_SP_UNIQUE',
            +            '%SQL_SQL92_DATETIME_FUNCTIONS','%SQL_SQL92_FOREIGN_KEY_DELETE_RULE','%SQL_SQL92_FOREIGN_KEY_UPDATE_RULE','%SQL_SQL92_GRANT','%SQL_SQL92_NUMERIC_VALUE_FUNCTIONS','%SQL_SQL92_PREDICATES','%SQL_SQL92_RELATIONAL_JOIN_OPERATORS','%SQL_SQL92_REVOKE',
            +            '%SQL_SQL92_ROW_VALUE_CONSTRUCTOR','%SQL_SQL92_STRING_FUNCTIONS','%SQL_SQL92_VALUE_EXPRESSIONS','%SQL_SQLSTATE_SIZE','%SQL_SQL_CONFORMANCE','%SQL_SQ_COMPARISON','%SQL_SQ_CORRELATED_SUBQUERIES','%SQL_SQ_EXISTS',
            +            '%SQL_SQ_IN','%SQL_SQ_QUANTIFIED','%SQL_SRJO_CORRESPONDING_CLAUSE','%SQL_SRJO_CROSS_JOIN','%SQL_SRJO_EXCEPT_JOIN','%SQL_SRJO_FULL_OUTER_JOIN','%SQL_SRJO_INNER_JOIN','%SQL_SRJO_INTERSECT_JOIN',
            +            '%SQL_SRJO_LEFT_OUTER_JOIN','%SQL_SRJO_NATURAL_JOIN','%SQL_SRJO_RIGHT_OUTER_JOIN','%SQL_SRJO_UNION_JOIN','%SQL_SRVC_DEFAULT','%SQL_SRVC_NULL','%SQL_SRVC_ROW_SUBQUERY','%SQL_SRVC_VALUE_EXPRESSION',
            +            '%SQL_SR_CASCADE','%SQL_SR_DELETE_TABLE','%SQL_SR_GRANT_OPTION_FOR','%SQL_SR_INSERT_COLUMN','%SQL_SR_INSERT_TABLE','%SQL_SR_REFERENCES_COLUMN','%SQL_SR_REFERENCES_TABLE','%SQL_SR_RESTRICT',
            +            '%SQL_SR_SELECT_TABLE','%SQL_SR_UPDATE_COLUMN','%SQL_SR_UPDATE_TABLE','%SQL_SR_USAGE_ON_CHARACTER_SET','%SQL_SR_USAGE_ON_COLLATION','%SQL_SR_USAGE_ON_DOMAIN','%SQL_SR_USAGE_ON_TRANSLATION','%SQL_SSF_CONVERT',
            +            '%SQL_SSF_LOWER','%SQL_SSF_SUBSTRING','%SQL_SSF_TRANSLATE','%SQL_SSF_TRIM_BOTH','%SQL_SSF_TRIM_LEADING','%SQL_SSF_TRIM_TRAILING','%SQL_SSF_UPPER','%SQL_SS_ADDITIONS',
            +            '%SQL_SS_DELETIONS','%SQL_SS_UPDATES','%SQL_STANDARD_CLI_CONFORMANCE','%SQL_STATIC_CURSOR_ATTRIBUTES1','%SQL_STATIC_CURSOR_ATTRIBUTES2','%SQL_STATIC_SENSITIVITY','%SQL_STILL_EXECUTING','%SQL_STRING_FUNCTIONS',
            +            '%SQL_SUBQUERIES','%SQL_SUCCESS','%SQL_SUCCESS_WITH_INFO','%SQL_SU_DML_STATEMENTS','%SQL_SU_INDEX_DEFINITION','%SQL_SU_PRIVILEGE_DEFINITION','%SQL_SU_PROCEDURE_INVOCATION','%SQL_SU_TABLE_DEFINITION',
            +            '%SQL_SVE_CASE','%SQL_SVE_CAST','%SQL_SVE_COALESCE','%SQL_SVE_NULLIF','%SQL_SYSTEM_FUNCTIONS','%SQL_TABLE_STAT','%SQL_TABLE_TERM','%SQL_TC_ALL',
            +            '%SQL_TC_DDL_COMMIT','%SQL_TC_DDL_IGNORE','%SQL_TC_DML','%SQL_TC_NONE','%SQL_TIME','%SQL_TIMEDATE_ADD_INTERVALS','%SQL_TIMEDATE_DIFF_INTERVALS','%SQL_TIMEDATE_FUNCTIONS',
            +            '%SQL_TIMESTAMP','%SQL_TIMESTAMP_LEN','%SQL_TIME_LEN','%SQL_TINYINT','%SQL_TRANSACTION_CAPABLE','%SQL_TRANSACTION_ISOLATION_OPTION','%SQL_TRANSACTION_READ_COMMITTED','%SQL_TRANSACTION_READ_UNCOMMITTED',
            +            '%SQL_TRANSACTION_REPEATABLE_READ','%SQL_TRANSACTION_SERIALIZABLE','%SQL_TRANSLATE_DLL','%SQL_TRANSLATE_OPTION','%SQL_TRUE','%SQL_TXN_CAPABLE','%SQL_TXN_ISOLATION','%SQL_TXN_ISOLATION_OPTION',
            +            '%SQL_TXN_READ_COMMITTED','%SQL_TXN_READ_UNCOMMITTED','%SQL_TXN_REPEATABLE_READ','%SQL_TXN_SERIALIZABLE','%SQL_TYPE_DATE','%SQL_TYPE_NULL','%SQL_TYPE_TIME','%SQL_TYPE_TIMESTAMP',
            +            '%SQL_UB_DEFAULT','%SQL_UB_FIXED','%SQL_UB_OFF','%SQL_UB_ON','%SQL_UB_VARIABLE','%SQL_UNBIND','%SQL_UNICODE','%SQL_UNICODE_CHAR',
            +            '%SQL_UNICODE_LONGVARCHAR','%SQL_UNICODE_VARCHAR','%SQL_UNION','%SQL_UNION_STATEMENT','%SQL_UNKNOWN_TYPE','%SQL_UNNAMED','%SQL_UNSEARCHABLE','%SQL_UNSIGNED_OFFSET',
            +            '%SQL_UNSPECIFIED','%SQL_UPDATE','%SQL_UPDATE_BY_BOOKMARK','%SQL_USER_NAME','%SQL_USE_BOOKMARKS','%SQL_US_UNION','%SQL_US_UNION_ALL','%SQL_U_UNION',
            +            '%SQL_U_UNION_ALL','%SQL_VARBINARY','%SQL_VARCHAR','%SQL_XOPEN_CLI_YEAR','%SQL_YEAR','%SQL_YEAR_TO_MONTH','%SRCCOPY','%SS_BITMAP',
            +            '%SS_BLACKFRAME','%SS_BLACKRECT','%SS_CENTER','%SS_CENTERIMAGE','%SS_ENDELLIPSIS','%SS_ETCHEDFRAME','%SS_ETCHEDHORZ','%SS_ETCHEDVERT',
            +            '%SS_GRAYFRAME','%SS_GRAYRECT','%SS_LEFT','%SS_NOPREFIX','%SS_NOTIFY','%SS_NOWORDWRAP','%SS_PATHELLIPSIS','%SS_RIGHT',
            +            '%SS_RIGHTJUST','%SS_SIMPLE','%SS_SUNKEN','%SS_WHITEFRAME','%SS_WHITERECT','%SS_WORDELLIPSIS','%STAT_FILL_FROM_MEMORY','%STAT_FILL_NATURAL',
            +            '%STAT_FILL_NATURAL_ERASTONE','%STAT_FILL_NATURAL_EVEN','%STAT_FILL_NATURAL_FIBONACCI','%STAT_FILL_NATURAL_ODD','%STAT_FILL_WITH_NUMBER','%STAT_MINMAX_INDEX','%STAT_MINMAX_VALUE','%STAT_TYPE_BYTE',
            +            '%STAT_TYPE_CURRENCY','%STAT_TYPE_DOUBLE','%STAT_TYPE_DWORD','%STAT_TYPE_EXT','%STAT_TYPE_INTEGER','%STAT_TYPE_LONG','%STAT_TYPE_QUAD','%STAT_TYPE_SINGLE',
            +            '%STAT_TYPE_WORD','%SWP_ASYNCWINDOWPOS','%SWP_DEFERERASE','%SWP_DRAWFRAME','%SWP_FRAMECHANGED','%SWP_HIDEWINDOW','%SWP_NOACTIVATE','%SWP_NOCOPYBITS',
            +            '%SWP_NOMOVE','%SWP_NOOWNERZORDER','%SWP_NOREDRAW','%SWP_NOREPOSITION','%SWP_NOSENDCHANGING','%SWP_NOSIZE','%SWP_NOZORDER','%SWP_SHOWWINDOW',
            +            '%SW_FORCEMINIMIZE','%SW_HIDE','%SW_MAXIMIZE','%SW_MINIMIZE','%SW_NORMAL','%SW_RESTORE','%SW_SHOW','%SW_SHOWDEFAULT',
            +            '%SW_SHOWMAXIMIZED','%SW_SHOWMINIMIZED','%SW_SHOWMINNOACTIVE','%SW_SHOWNA','%SW_SHOWNOACTIVATE','%SW_SHOWNORMAL','%TBASS_3DALG_DEFAULT','%TBASS_3DALG_FULL',
            +            '%TBASS_3DALG_LIGHT','%TBASS_3DALG_OFF','%TBASS_3DMODE_NORMAL','%TBASS_3DMODE_OFF','%TBASS_3DMODE_RELATIVE','%TBASS_ACTIVE_PAUSED','%TBASS_ACTIVE_PLAYING','%TBASS_ACTIVE_STALLED',
            +            '%TBASS_ACTIVE_STOPPED','%TBASS_CONFIG_3DALGORITHM','%TBASS_CONFIG_BUFFER','%TBASS_CONFIG_CURVE_PAN','%TBASS_CONFIG_CURVE_VOL','%TBASS_CONFIG_FLOATDSP','%TBASS_CONFIG_GVOL_MUSIC','%TBASS_CONFIG_GVOL_SAMPLE',
            +            '%TBASS_CONFIG_GVOL_STREAM','%TBASS_CONFIG_MAXVOL','%TBASS_CONFIG_MP3_CODEC','%TBASS_CONFIG_NET_AGENT','%TBASS_CONFIG_NET_BUFFER','%TBASS_CONFIG_NET_PASSIVE','%TBASS_CONFIG_NET_PREBUF','%TBASS_CONFIG_NET_PROXY',
            +            '%TBASS_CONFIG_NET_TIMEOUT','%TBASS_CONFIG_PAUSE_NOPLAY','%TBASS_CONFIG_UPDATEPERIOD','%TBASS_CTYPE_MUSIC_IT','%TBASS_CTYPE_MUSIC_MO3','%TBASS_CTYPE_MUSIC_MOD','%TBASS_CTYPE_MUSIC_MTM','%TBASS_CTYPE_MUSIC_S3M',
            +            '%TBASS_CTYPE_MUSIC_XM','%TBASS_CTYPE_RECORD','%TBASS_CTYPE_SAMPLE','%TBASS_CTYPE_STREAM','%TBASS_CTYPE_STREAM_AIFF','%TBASS_CTYPE_STREAM_MP1','%TBASS_CTYPE_STREAM_MP2','%TBASS_CTYPE_STREAM_MP3',
            +            '%TBASS_CTYPE_STREAM_OGG','%TBASS_CTYPE_STREAM_WAV','%TBASS_CTYPE_STREAM_WAV_FLOAT','%TBASS_CTYPE_STREAM_WAV_PCM','%TBASS_DATA_AVAILABLE','%TBASS_DATA_FFT1024','%TBASS_DATA_FFT2048','%TBASS_DATA_FFT4096',
            +            '%TBASS_DATA_FFT512','%TBASS_DATA_FFT_INDIVIDUAL','%TBASS_DATA_FFT_NOWINDOW','%TBASS_DATA_FLOAT','%TBASS_DEVICE_3D','%TBASS_DEVICE_8BITS','%TBASS_DEVICE_LATENCY','%TBASS_DEVICE_MONO',
            +            '%TBASS_DEVICE_NOSPEAKER','%TBASS_DEVICE_SPEAKERS','%TBASS_EAX_ENVIRONMENT_ALLEY','%TBASS_EAX_ENVIRONMENT_ARENA','%TBASS_EAX_ENVIRONMENT_AUDITORIUM','%TBASS_EAX_ENVIRONMENT_BATHROOM','%TBASS_EAX_ENVIRONMENT_CARPETEDHALLWAY','%TBASS_EAX_ENVIRONMENT_CAVE',
            +            '%TBASS_EAX_ENVIRONMENT_CITY','%TBASS_EAX_ENVIRONMENT_CONCERTHALL','%TBASS_EAX_ENVIRONMENT_COUNT','%TBASS_EAX_ENVIRONMENT_DIZZY','%TBASS_EAX_ENVIRONMENT_DRUGGED','%TBASS_EAX_ENVIRONMENT_FOREST','%TBASS_EAX_ENVIRONMENT_GENERIC','%TBASS_EAX_ENVIRONMENT_HALLWAY',
            +            '%TBASS_EAX_ENVIRONMENT_HANGAR','%TBASS_EAX_ENVIRONMENT_LIVINGROOM','%TBASS_EAX_ENVIRONMENT_MOUNTAINS','%TBASS_EAX_ENVIRONMENT_PADDEDCELL','%TBASS_EAX_ENVIRONMENT_PARKINGLOT','%TBASS_EAX_ENVIRONMENT_PLAIN','%TBASS_EAX_ENVIRONMENT_PSYCHOTIC','%TBASS_EAX_ENVIRONMENT_QUARRY',
            +            '%TBASS_EAX_ENVIRONMENT_ROOM','%TBASS_EAX_ENVIRONMENT_SEWERPIPE','%TBASS_EAX_ENVIRONMENT_STONECORRIDOR','%TBASS_EAX_ENVIRONMENT_STONEROOM','%TBASS_EAX_ENVIRONMENT_UNDERWATER','%TBASS_ERROR_ALREADY','%TBASS_ERROR_BUFLOST','%TBASS_ERROR_CODEC',
            +            '%TBASS_ERROR_CREATE','%TBASS_ERROR_DECODE','%TBASS_ERROR_DEVICE','%TBASS_ERROR_DRIVER','%TBASS_ERROR_DX','%TBASS_ERROR_EMPTY','%TBASS_ERROR_FILEFORM','%TBASS_ERROR_FILEOPEN',
            +            '%TBASS_ERROR_FORMAT','%TBASS_ERROR_FREQ','%TBASS_ERROR_HANDLE','%TBASS_ERROR_ILLPARAM','%TBASS_ERROR_ILLTYPE','%TBASS_ERROR_INIT','%TBASS_ERROR_MEM','%TBASS_ERROR_NO3D',
            +            '%TBASS_ERROR_NOCHAN','%TBASS_ERROR_NOEAX','%TBASS_ERROR_NOFX','%TBASS_ERROR_NOHW','%TBASS_ERROR_NONET','%TBASS_ERROR_NOPAUSE','%TBASS_ERROR_NOPLAY','%TBASS_ERROR_NOTAVAIL',
            +            '%TBASS_ERROR_NOTFILE','%TBASS_ERROR_PLAYING','%TBASS_ERROR_POSITION','%TBASS_ERROR_SPEAKER','%TBASS_ERROR_START','%TBASS_ERROR_TIMEOUT','%TBASS_ERROR_UNKNOWN','%TBASS_ERROR_VERSION',
            +            '%TBASS_FALSE','%TBASS_FILEPOS_CURRENT','%TBASS_FILEPOS_DECODE','%TBASS_FILEPOS_DOWNLOAD','%TBASS_FILEPOS_END','%TBASS_FILEPOS_START','%TBASS_FILE_CLOSE','%TBASS_FILE_LEN',
            +            '%TBASS_FILE_READ','%TBASS_FILE_SEEK','%TBASS_FX_CHORUS','%TBASS_FX_COMPRESSOR','%TBASS_FX_DISTORTION','%TBASS_FX_ECHO','%TBASS_FX_FLANGER','%TBASS_FX_GARGLE',
            +            '%TBASS_FX_I3DL2REVERB','%TBASS_FX_PARAMEQ','%TBASS_FX_PHASE_180','%TBASS_FX_PHASE_90','%TBASS_FX_PHASE_NEG_180','%TBASS_FX_PHASE_NEG_90','%TBASS_FX_PHASE_ZERO','%TBASS_FX_REVERB',
            +            '%TBASS_INPUT_LEVEL','%TBASS_INPUT_OFF','%TBASS_INPUT_ON','%TBASS_INPUT_TYPE_ANALOG','%TBASS_INPUT_TYPE_AUX','%TBASS_INPUT_TYPE_CD','%TBASS_INPUT_TYPE_DIGITAL','%TBASS_INPUT_TYPE_LINE',
            +            '%TBASS_INPUT_TYPE_MASK','%TBASS_INPUT_TYPE_MIC','%TBASS_INPUT_TYPE_PHONE','%TBASS_INPUT_TYPE_SPEAKER','%TBASS_INPUT_TYPE_SYNTH','%TBASS_INPUT_TYPE_UNDEF','%TBASS_INPUT_TYPE_WAVE','%TBASS_MP3_SETPOS',
            +            '%TBASS_MUSIC_3D','%TBASS_MUSIC_ATTRIB_AMPLIFY','%TBASS_MUSIC_ATTRIB_BPM','%TBASS_MUSIC_ATTRIB_PANSEP','%TBASS_MUSIC_ATTRIB_PSCALER','%TBASS_MUSIC_ATTRIB_SPEED','%TBASS_MUSIC_ATTRIB_VOL_CHAN','%TBASS_MUSIC_ATTRIB_VOL_GLOBAL',
            +            '%TBASS_MUSIC_ATTRIB_VOL_INST','%TBASS_MUSIC_AUTOFREE','%TBASS_MUSIC_CALCLEN','%TBASS_MUSIC_DECODE','%TBASS_MUSIC_FLOAT','%TBASS_MUSIC_FT2MOD','%TBASS_MUSIC_FX','%TBASS_MUSIC_LOOP',
            +            '%TBASS_MUSIC_MONO','%TBASS_MUSIC_NONINTER','%TBASS_MUSIC_NOSAMPLE','%TBASS_MUSIC_POSRESET','%TBASS_MUSIC_POSRESETEX','%TBASS_MUSIC_PRESCAN','%TBASS_MUSIC_PT1MOD','%TBASS_MUSIC_RAMP',
            +            '%TBASS_MUSIC_RAMPS','%TBASS_MUSIC_STOPBACK','%TBASS_MUSIC_SURROUND','%TBASS_MUSIC_SURROUND2','%TBASS_OBJECT_DS','%TBASS_OBJECT_DS3DL','%TBASS_OK','%TBASS_RECORD_PAUSE',
            +            '%TBASS_SAMPLE_3D','%TBASS_SAMPLE_8BITS','%TBASS_SAMPLE_FLOAT','%TBASS_SAMPLE_FX','%TBASS_SAMPLE_LOOP','%TBASS_SAMPLE_MONO','%TBASS_SAMPLE_MUTEMAX','%TBASS_SAMPLE_OVER_DIST',
            +            '%TBASS_SAMPLE_OVER_POS','%TBASS_SAMPLE_OVER_VOL','%TBASS_SAMPLE_SOFTWARE','%TBASS_SAMPLE_VAM','%TBASS_SLIDE_FREQ','%TBASS_SLIDE_PAN','%TBASS_SLIDE_VOL','%TBASS_SPEAKER_CENLFE',
            +            '%TBASS_SPEAKER_CENTER','%TBASS_SPEAKER_FRONT','%TBASS_SPEAKER_FRONTLEFT','%TBASS_SPEAKER_FRONTRIGHT','%TBASS_SPEAKER_LEFT','%TBASS_SPEAKER_LFE','%TBASS_SPEAKER_REAR','%TBASS_SPEAKER_REAR2',
            +            '%TBASS_SPEAKER_REAR2LEFT','%TBASS_SPEAKER_REAR2RIGHT','%TBASS_SPEAKER_REARLEFT','%TBASS_SPEAKER_REARRIGHT','%TBASS_SPEAKER_RIGHT','%TBASS_STREAMPROC_END','%TBASS_STREAM_AUTOFREE','%TBASS_STREAM_BLOCK',
            +            '%TBASS_STREAM_DECODE','%TBASS_STREAM_PRESCAN','%TBASS_STREAM_RESTRATE','%TBASS_STREAM_STATUS','%TBASS_SYNC_DOWNLOAD','%TBASS_SYNC_END','%TBASS_SYNC_FREE','%TBASS_SYNC_MESSAGE',
            +            '%TBASS_SYNC_META','%TBASS_SYNC_MIXTIME','%TBASS_SYNC_MUSICFX','%TBASS_SYNC_MUSICINST','%TBASS_SYNC_MUSICPOS','%TBASS_SYNC_ONETIME','%TBASS_SYNC_POS','%TBASS_SYNC_SLIDE',
            +            '%TBASS_SYNC_STALL','%TBASS_TAG_HTTP','%TBASS_TAG_ICY','%TBASS_TAG_ID3','%TBASS_TAG_ID3V2','%TBASS_TAG_META','%TBASS_TAG_MUSIC_INST','%TBASS_TAG_MUSIC_MESSAGE',
            +            '%TBASS_TAG_MUSIC_NAME','%TBASS_TAG_MUSIC_SAMPLE','%TBASS_TAG_OGG','%TBASS_TAG_RIFF_INFO','%TBASS_TAG_VENDOR','%TBASS_TRUE','%TBASS_UNICODE','%TBASS_VAM_HARDWARE',
            +            '%TBASS_VAM_SOFTWARE','%TBASS_VAM_TERM_DIST','%TBASS_VAM_TERM_PRIO','%TBASS_VAM_TERM_TIME','%TBASS_VERSION','%TBCD_CHANNEL','%TBCD_THUMB','%TBCD_TICS',
            +            '%TBGL_ALIGN_CENTER','%TBGL_ALIGN_CENTER_CENTER','%TBGL_ALIGN_CENTER_DOWN','%TBGL_ALIGN_CENTER_UP','%TBGL_ALIGN_LEFT','%TBGL_ALIGN_LEFT_CENTER','%TBGL_ALIGN_LEFT_DOWN','%TBGL_ALIGN_LEFT_UP',
            +            '%TBGL_ALIGN_RIGHT','%TBGL_ALIGN_RIGHT_CENTER','%TBGL_ALIGN_RIGHT_DOWN','%TBGL_ALIGN_RIGHT_UP','%TBGL_ALWAYS','%TBGL_EQUAL','%TBGL_ERROR_FILE','%TBGL_ERROR_MSGBOX',
            +            '%TBGL_ERROR_NONE','%TBGL_GEQUAL','%TBGL_GREATER','%TBGL_LEQUAL','%TBGL_LESS','%TBGL_LIGHT_AMBIENT','%TBGL_LIGHT_CONSTANT_ATTENUATION','%TBGL_LIGHT_DIFFUSE',
            +            '%TBGL_LIGHT_LINEAR_ATTENUATION','%TBGL_LIGHT_POSITION','%TBGL_LIGHT_QUADRATIC_ATTENUATION','%TBGL_LIGHT_SPECULAR','%TBGL_LIGHT_SPOT_CUTOFF','%TBGL_LIGHT_SPOT_DIRECTION','%TBGL_LIGHT_SPOT_EXPONENT','%TBGL_M15B',
            +            '%TBGL_M15G','%TBGL_M15LAYER','%TBGL_M15PSTOP','%TBGL_M15R','%TBGL_M15TEXN','%TBGL_M15TEXX','%TBGL_M15TEXY','%TBGL_M15X',
            +            '%TBGL_M15Y','%TBGL_M15Z','%TBGL_NEVER','%TBGL_NORMAL_NONE','%TBGL_NORMAL_PRECISE','%TBGL_NORMAL_SMOOTH','%TBGL_NOTEQUAL','%TBGL_OBJ_CUBE',
            +            '%TBGL_OBJ_CUBE3','%TBGL_OBJ_CYLINDER','%TBGL_OBJ_SPHERE','%TBGL_PINFO_RGB','%TBGL_PINFO_XYZ','%TBGL_TEX_LINEAR','%TBGL_TEX_MIPMAP','%TBGL_TEX_NEAREST',
            +            '%TBM_CLEARSEL','%TBM_CLEARTICS','%TBM_GETBUDDY','%TBM_GETCHANNELRECT','%TBM_GETLINESIZE','%TBM_GETNUMTICS','%TBM_GETPAGESIZE','%TBM_GETPOS',
            +            '%TBM_GETPTICS','%TBM_GETRANGEMAX','%TBM_GETRANGEMIN','%TBM_GETSELEND','%TBM_GETSELSTART','%TBM_GETTHUMBLENGTH','%TBM_GETTHUMBRECT','%TBM_GETTIC',
            +            '%TBM_GETTICPOS','%TBM_GETTOOLTIPS','%TBM_GETUNICODEFORMAT','%TBM_SETBUDDY','%TBM_SETLINESIZE','%TBM_SETPAGESIZE','%TBM_SETPOS','%TBM_SETRANGE',
            +            '%TBM_SETRANGEMAX','%TBM_SETRANGEMIN','%TBM_SETSEL','%TBM_SETSELEND','%TBM_SETSELSTART','%TBM_SETTHUMBLENGTH','%TBM_SETTIC','%TBM_SETTICFREQ',
            +            '%TBM_SETTIPSIDE','%TBM_SETTOOLTIPS','%TBM_SETUNICODEFORMAT','%TBS_AUTOTICKS','%TBS_BOTH','%TBS_BOTTOM','%TBS_DOWNISLEFT','%TBS_ENABLESELRANGE',
            +            '%TBS_FIXEDLENGTH','%TBS_HORZ','%TBS_LEFT','%TBS_NOTHUMB','%TBS_NOTICKS','%TBS_REVERSED','%TBS_RIGHT','%TBS_TOOLTIPS',
            +            '%TBS_TOP','%TBS_VERT','%TBTS_BOTTOM','%TBTS_LEFT','%TBTS_RIGHT','%TBTS_TOP','%TB_%VT_BSTR','%TB_%VT_CY',
            +            '%TB_%VT_DATE','%TB_%VT_EMPTY','%TB_%VT_I2','%TB_%VT_I4','%TB_%VT_NULL','%TB_%VT_R4','%TB_%VT_R8','%TB_BOTTOM',
            +            '%TB_CLASS_E_NOAGGREGATION','%TB_CO_E_CLASSSTRING','%TB_DISPATCH_METHOD','%TB_DISPATCH_PROPERTYGET','%TB_DISPATCH_PROPERTYPUT','%TB_DISPATCH_PROPERTYPUTREF','%TB_ENDTRACK','%TB_E_INVALIDARG',
            +            '%TB_E_NOINTERFACE','%TB_E_OUTOFMEMORY','%TB_IMGCTX_ACTUALSIZE','%TB_IMGCTX_AUTOSIZE','%TB_IMGCTX_FITTOHEIGHT','%TB_IMGCTX_FITTOWIDTH','%TB_IMGCTX_STRETCH','%TB_LINEDOWN',
            +            '%TB_LINEUP','%TB_MK_E_CONNECTMANUALLY','%TB_MK_E_EXCEEDEDDEADLINE','%TB_MK_E_INTERMEDIATEINTERFACENOTSUPPORTED','%TB_MK_E_NOOBJECT','%TB_MK_E_SYNTAX','%TB_PAGEDOWN','%TB_PAGEUP',
            +            '%TB_REGDB_E_CLASSNOTREG','%TB_REGDB_E_WRITEREGDB','%TB_SIZEOF_TBVARIANT','%TB_S_FALSE','%TB_S_OK','%TB_THUMBPOSITION','%TB_THUMBTRACK','%TB_TOP',
            +            '%TCM_FIRST','%TCM_GETCURSEL','%TCN_FOCUSCHANGE','%TCN_GETOBJECT','%TCN_SELCHANGE','%TCN_SELCHANGING','%TCS_BOTTOM','%TCS_BUTTONS',
            +            '%TCS_EX_FLATSEPARATORS','%TCS_EX_REGISTERDROP','%TCS_FIXEDWIDTH','%TCS_FLATBUTTONS','%TCS_FOCUSNEVER','%TCS_FOCUSONBUTTONDOWN','%TCS_FORCEICONLEFT','%TCS_FORCELABELLEFT',
            +            '%TCS_HOTTRACK','%TCS_MULTILINE','%TCS_MULTISELECT','%TCS_OWNERDRAWFIXED','%TCS_RAGGEDRIGHT','%TCS_RIGHT','%TCS_RIGHTJUSTIFY','%TCS_SCROLLOPPOSITE',
            +            '%TCS_SINGLELINE','%TCS_TABS','%TCS_TOOLTIPS','%TCS_VERTICAL','%TM_PLAINTEXT','%TM_RICHTEXT','%TOKENIZER_DEFAULT_ALPHA','%TOKENIZER_DEFAULT_DELIM',
            +            '%TOKENIZER_DEFAULT_DQUOTE','%TOKENIZER_DEFAULT_NEWLINE','%TOKENIZER_DEFAULT_NUMERIC','%TOKENIZER_DEFAULT_SPACE','%TOKENIZER_DELIMITER','%TOKENIZER_EOL','%TOKENIZER_ERROR','%TOKENIZER_FINISHED',
            +            '%TOKENIZER_NUMBER','%TOKENIZER_QUOTE','%TOKENIZER_STRING','%TOKENIZER_UNDEFTOK','%TRUE','%TV_FIRST','%UDM_GETACCEL','%UDM_GETBASE',
            +            '%UDM_GETBUDDY','%UDM_GETPOS','%UDM_GETPOS32','%UDM_GETRANGE','%UDM_GETRANGE32','%UDM_GETUNICODEFORMAT','%UDM_SETACCEL','%UDM_SETBASE',
            +            '%UDM_SETBUDDY','%UDM_SETPOS','%UDM_SETPOS32','%UDM_SETRANGE','%UDM_SETRANGE32','%UDM_SETUNICODEFORMAT','%UDS_ALIGNLEFT','%UDS_ALIGNRIGHT',
            +            '%UDS_ARROWKEYS','%UDS_AUTOBUDDY','%UDS_HORZ','%UDS_HOTTRACK','%UDS_NOTHOUSANDS','%UDS_SETBUDDYINT','%UDS_WRAP','%UD_MAXVAL',
            +            '%UD_MINVAL','%VK_0','%VK_1','%VK_2','%VK_3','%VK_4','%VK_5','%VK_6',
            +            '%VK_7','%VK_8','%VK_9','%VK_A','%VK_ACCEPT','%VK_ADD','%VK_APPS','%VK_B',
            +            '%VK_BACK','%VK_C','%VK_CANCEL','%VK_CAPITAL','%VK_CLEAR','%VK_CONTROL','%VK_CONVERT','%VK_D',
            +            '%VK_DECIMAL','%VK_DELETE','%VK_DIVIDE','%VK_DOWN','%VK_E','%VK_END','%VK_ESCAPE','%VK_EXECUTE',
            +            '%VK_F','%VK_F1','%VK_F10','%VK_F11','%VK_F12','%VK_F13','%VK_F14','%VK_F15',
            +            '%VK_F16','%VK_F17','%VK_F18','%VK_F19','%VK_F2','%VK_F20','%VK_F21','%VK_F22',
            +            '%VK_F23','%VK_F24','%VK_F3','%VK_F4','%VK_F5','%VK_F6','%VK_F7','%VK_F8',
            +            '%VK_F9','%VK_FINAL','%VK_G','%VK_H','%VK_HANGEUL','%VK_HANGUL','%VK_HANJA','%VK_HELP',
            +            '%VK_HOME','%VK_I','%VK_INSERT','%VK_J','%VK_JUNJA','%VK_K','%VK_KANA','%VK_KANJI',
            +            '%VK_L','%VK_LBUTTON','%VK_LEFT','%VK_LINEFEED','%VK_LWIN','%VK_M','%VK_MBUTTON','%VK_MENU',
            +            '%VK_MODECHANGE','%VK_MULTIPLY','%VK_N','%VK_NEXT','%VK_NONCONVERT','%VK_NUMLOCK','%VK_NUMPAD0','%VK_NUMPAD1',
            +            '%VK_NUMPAD2','%VK_NUMPAD3','%VK_NUMPAD4','%VK_NUMPAD5','%VK_NUMPAD6','%VK_NUMPAD7','%VK_NUMPAD8','%VK_NUMPAD9',
            +            '%VK_O','%VK_P','%VK_PAUSE','%VK_PGDN','%VK_PGUP','%VK_PRINT','%VK_PRIOR','%VK_Q',
            +            '%VK_R','%VK_RBUTTON','%VK_RETURN','%VK_RIGHT','%VK_RWIN','%VK_S','%VK_SCROLL','%VK_SELECT',
            +            '%VK_SEPARATOR','%VK_SHIFT','%VK_SLEEP','%VK_SNAPSHOT','%VK_SPACE','%VK_SUBTRACT','%VK_T','%VK_TAB',
            +            '%VK_U','%VK_UP','%VK_V','%VK_W','%VK_X','%VK_XBUTTON1','%VK_XBUTTON2','%VK_Y',
            +            '%VK_Z','%VT_ARRAY','%VT_BLOB','%VT_BLOB_OBJECT','%VT_BOOL','%VT_BSTR','%VT_BYREF','%VT_CARRAY',
            +            '%VT_CF','%VT_CLSID','%VT_CY','%VT_DATE','%VT_DISPATCH','%VT_EMPTY','%VT_ERROR','%VT_FILETIME',
            +            '%VT_HRESULT','%VT_I1','%VT_I2','%VT_I4','%VT_I8','%VT_INT','%VT_LPSTR','%VT_LPWSTR',
            +            '%VT_NULL','%VT_PTR','%VT_R4','%VT_R8','%VT_RECORD','%VT_RESERVED','%VT_SAFEARRAY','%VT_STORAGE',
            +            '%VT_STORED_OBJECT','%VT_STREAM','%VT_STREAMED_OBJECT','%VT_UI1','%VT_UI2','%VT_UI4','%VT_UI8','%VT_UINT',
            +            '%VT_UNKNOWN','%VT_USERDEFINED','%VT_VARIANT','%VT_VECTOR','%VT_VOID','%WAVE_FORMAT_1M08','%WAVE_FORMAT_1M16','%WAVE_FORMAT_1S08',
            +            '%WAVE_FORMAT_1S16','%WAVE_FORMAT_2M08','%WAVE_FORMAT_2M16','%WAVE_FORMAT_2S08','%WAVE_FORMAT_2S16','%WAVE_FORMAT_4M08','%WAVE_FORMAT_4M16','%WAVE_FORMAT_4S08',
            +            '%WAVE_FORMAT_4S16','%WBF_CUSTOM','%WBF_LEVEL1','%WBF_LEVEL2','%WBF_OVERFLOW','%WBF_WORDBREAK','%WBF_WORDWRAP','%WHITE',
            +            '%WIN_FINDTITLECONTAIN','%WIN_FINDTITLEEND','%WIN_FINDTITLEEQUAL','%WIN_FINDTITLESTART','%WM_ACTIVATE','%WM_ACTIVATEAPP','%WM_CAPTURECHANGED','%WM_CHAR',
            +            '%WM_CLOSE','%WM_COMMAND','%WM_DESTROY','%WM_DROPFILES','%WM_ERASEBKGND','%WM_GETTEXTLENGTH','%WM_HOTKEY','%WM_HSCROLL',
            +            '%WM_IDLE','%WM_INITDIALOG','%WM_KEYDOWN','%WM_KEYUP','%WM_KILLFOCUS','%WM_LBUTTONDBLCLK','%WM_LBUTTONDOWN','%WM_LBUTTONUP',
            +            '%WM_MBUTTONDBLCLK','%WM_MBUTTONDOWN','%WM_MBUTTONUP','%WM_MOUSEFIRST','%WM_MOUSEMOVE','%WM_MOUSEWHEEL','%WM_MOVE','%WM_MOVING',
            +            '%WM_NCLBUTTONDOWN','%WM_NCRBUTTONDOWN','%WM_NEXTDLGCTL','%WM_NOTIFY','%WM_PAINT','%WM_QUIT','%WM_RBUTTONDBLCLK','%WM_RBUTTONDOWN',
            +            '%WM_RBUTTONUP','%WM_SETFOCUS','%WM_SETFONT','%WM_SETTEXT','%WM_SIZE','%WM_SIZING','%WM_SYSCOMMAND','%WM_TIMER',
            +            '%WM_USER','%WM_VSCROLL','%WS_BORDER','%WS_CAPTION','%WS_CHILD','%WS_CLIPCHILDREN','%WS_CLIPSIBLINGS','%WS_DISABLED',
            +            '%WS_DLGFRAME','%WS_EX_ACCEPTFILES','%WS_EX_APPWINDOW','%WS_EX_CLIENTEDGE','%WS_EX_CONTEXTHELP','%WS_EX_CONTROLPARENT','%WS_EX_LAYERED','%WS_EX_LEFT',
            +            '%WS_EX_LEFTSCROLLBAR','%WS_EX_LTRREADING','%WS_EX_MDICHILD','%WS_EX_NOPARENTNOTIFY','%WS_EX_OVERLAPPEDWINDOW','%WS_EX_PALETTEWINDOW','%WS_EX_RIGHT','%WS_EX_RIGHTSCROLLBAR',
            +            '%WS_EX_RTLREADING','%WS_EX_STATICEDGE','%WS_EX_TOOLWINDOW','%WS_EX_TOPMOST','%WS_EX_TRANSPARENT','%WS_EX_WINDOWEDGE','%WS_GROUP','%WS_HSCROLL',
            +            '%WS_ICONIC','%WS_MAXIMIZE','%WS_MAXIMIZEBOX','%WS_MINIMIZE','%WS_MINIMIZEBOX','%WS_OVERLAPPEDWINDOW','%WS_POPUP','%WS_POPUPWINDOW',
            +            '%WS_SYSMENU','%WS_TABSTOP','%WS_THICKFRAME','%WS_VISIBLE','%WS_VSCROLL','%YELLOW','%ZERO','CRLF',
            +            'FALSE','M_E','M_PI','NULL','TAB','TRUE'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0000FF; font-weight: bold;',
            +            2 => 'color: #993333; font-style: italic; font-weight: bold;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #008000;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #333333;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #800080;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #CC0000;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #66cc66;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #333333;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099;'
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '_'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/tsql.php b/vendor/easybook/geshi/geshi/tsql.php
            new file mode 100644
            index 0000000000..9aa6ce52b1
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/tsql.php
            @@ -0,0 +1,374 @@
            + 'T-SQL',
            +    'COMMENT_SINGLE' => array(1 => '--'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            // Datatypes
            +            'bigint', 'tinyint', 'money',
            +            'smallmoney', 'datetime', 'smalldatetime',
            +            'text', 'nvarchar', 'ntext', 'varbinary', 'image',
            +            'sql_variant', 'uniqueidentifier',
            +
            +            // Keywords
            +            'ABSOLUTE', 'ACTION', 'ADD', 'ADMIN', 'AFTER', 'AGGREGATE', 'ALIAS', 'ALLOCATE', 'ALTER', 'ARE', 'ARRAY', 'AS',
            +            'ASC', 'ASSERTION', 'AT', 'AUTHORIZATION', 'BACKUP', 'BEFORE', 'BEGIN', 'BINARY', 'BIT', 'BLOB', 'BOOLEAN', 'BOTH', 'BREADTH',
            +            'BREAK', 'BROWSE', 'BULK', 'BY', 'CALL', 'CASCADE', 'CASCADED', 'CASE', 'CAST', 'CATALOG', 'CATCH', 'CHAR', 'CHARACTER', 'CHECK', 'CHECKPOINT',
            +            'CLASS', 'CLOB', 'CLOSE', 'CLUSTERED', 'COALESCE', 'COLLATE', 'COLLATION', 'COLUMN', 'COMMIT', 'COMPLETION', 'COMPUTE', 'CONNECT',
            +            'CONNECTION', 'CONSTRAINT', 'CONSTRAINTS', 'CONSTRUCTOR', 'CONTAINS', 'CONTAINSTABLE', 'CONTINUE', 'CONVERT', 'CORRESPONDING', 'CREATE',
            +            'CUBE', 'CURRENT', 'CURRENT_DATE', 'CURRENT_PATH', 'CURRENT_ROLE', 'CURRENT_TIME', 'CURRENT_TIMESTAMP', 'CURRENT_USER',
            +            'CURSOR', 'CYCLE', 'DATA', 'DATABASE', 'DATE', 'DAY', 'DBCC', 'DEALLOCATE', 'DEC', 'DECIMAL', 'DECLARE', 'DEFAULT', 'DEFERRABLE',
            +            'DEFERRED', 'DELETE', 'DENY', 'DEPTH', 'DEREF', 'DESC', 'DESCRIBE', 'DESCRIPTOR', 'DESTROY', 'DESTRUCTOR', 'DETERMINISTIC',
            +            'DIAGNOSTICS', 'DICTIONARY', 'DISCONNECT', 'DISK', 'DISTINCT', 'DISTRIBUTED', 'DOMAIN', 'DOUBLE', 'DROP', 'DUMMY', 'DUMP', 'DYNAMIC',
            +            'EACH', 'ELSE', 'END', 'END-EXEC', 'EQUALS', 'ERRLVL', 'ESCAPE', 'EVERY', 'EXCEPT', 'EXCEPTION', 'EXEC', 'EXECUTE', 'EXIT',
            +            'EXTERNAL', 'FALSE', 'FETCH', 'FILE', 'FILLFACTOR', 'FIRST', 'FLOAT', 'FOR', 'FOREIGN', 'FOUND', 'FREE', 'FREETEXT', 'FREETEXTTABLE',
            +            'FROM', 'FULL', 'FUNCTION', 'GENERAL', 'GET', 'GLOBAL', 'GOTO', 'GRANT', 'GROUP', 'GROUPING', 'HAVING', 'HOLDLOCK', 'HOST', 'HOUR',
            +            'IDENTITY', 'IDENTITY_INSERT', 'IDENTITYCOL', 'IF', 'IGNORE', 'IMMEDIATE', 'INDEX', 'INDICATOR', 'INITIALIZE', 'INITIALLY',
            +            'INNER', 'INOUT', 'INPUT', 'INSERT', 'INT', 'INTEGER', 'INTERSECT', 'INTERVAL', 'INTO', 'IS', 'ISOLATION', 'ITERATE', 'KEY',
            +            'KILL', 'LANGUAGE', 'LARGE', 'LAST', 'LATERAL', 'LEADING', 'LEFT', 'LESS', 'LEVEL', 'LIMIT', 'LINENO', 'LOAD', 'LOCAL',
            +            'LOCALTIME', 'LOCALTIMESTAMP', 'LOCATOR', 'MAP', 'MATCH', 'MINUTE', 'MODIFIES', 'MODIFY', 'MODULE', 'MONTH', 'NAMES', 'NATIONAL',
            +            'NATURAL', 'NCHAR', 'NCLOB', 'NEW', 'NEXT', 'NO', 'NOCHECK', 'NONCLUSTERED', 'NONE', 'NULLIF', 'NUMERIC', 'OBJECT', 'OF',
            +            'OFF', 'OFFSETS', 'OLD', 'ON', 'ONLY', 'OPEN', 'OPENDATASOURCE', 'OPENQUERY', 'OPENROWSET', 'OPENXML', 'OPERATION', 'OPTION',
            +            'ORDER', 'ORDINALITY', 'OUT', 'OUTPUT', 'OVER', 'PAD', 'PARAMETER', 'PARAMETERS', 'PARTIAL', 'PATH', 'PERCENT', 'PLAN',
            +            'POSTFIX', 'PRECISION', 'PREFIX', 'PREORDER', 'PREPARE', 'PRESERVE', 'PRIMARY', 'PRINT', 'PRIOR', 'PRIVILEGES', 'PROC', 'PROCEDURE',
            +            'PUBLIC', 'RAISERROR', 'READ', 'READS', 'READTEXT', 'REAL', 'RECONFIGURE', 'RECURSIVE', 'REF', 'REFERENCES', 'REFERENCING', 'RELATIVE',
            +            'REPLICATION', 'RESTORE', 'RESTRICT', 'RESULT', 'RETURN', 'RETURNS', 'REVOKE', 'RIGHT', 'ROLE', 'ROLLBACK', 'ROLLUP', 'ROUTINE', 'ROW',
            +            'ROWGUIDCOL', 'ROWS', 'RULE', 'SAVE', 'SAVEPOINT', 'SCHEMA', 'SCOPE', 'SCROLL', 'SEARCH', 'SECOND', 'SECTION', 'SELECT',
            +            'SEQUENCE', 'SESSION', 'SESSION_USER', 'SET', 'SETS', 'SETUSER', 'SHUTDOWN', 'SIZE', 'SMALLINT', 'SPACE', 'SPECIFIC',
            +            'SPECIFICTYPE', 'SQL', 'SQLEXCEPTION', 'SQLSTATE', 'SQLWARNING', 'START', 'STATE', 'STATEMENT', 'STATIC', 'STATISTICS', 'STRUCTURE',
            +            'SYSTEM_USER', 'TABLE', 'TEMPORARY', 'TERMINATE', 'TEXTSIZE', 'THAN', 'THEN', 'TIME', 'TIMESTAMP', 'TIMEZONE_HOUR', 'TIMEZONE_MINUTE',
            +            'TO', 'TOP', 'TRAILING', 'TRAN', 'TRANSACTION', 'TRANSLATION', 'TREAT', 'TRIGGER', 'TRUE', 'TRUNCATE', 'TRY', 'TSEQUAL', 'UNDER', 'UNION',
            +            'UNIQUE', 'UNKNOWN', 'UNNEST', 'UPDATE', 'UPDATETEXT', 'USAGE', 'USE', 'USER', 'USING', 'VALUE', 'VALUES', 'VARCHAR', 'VARIABLE',
            +            'VARYING', 'VIEW', 'WAITFOR', 'WHEN', 'WHENEVER', 'WHERE', 'WHILE', 'WITH', 'WITHOUT', 'WORK', 'WRITE', 'WRITETEXT', 'YEAR', 'ZONE',
            +            'UNCOMMITTED', 'NOCOUNT',
            +            ),
            +        2 => array(
            +            /*
            +                Built-in functions
            +                Highlighted in pink.
            +            */
            +
            +            //Configuration Functions
            +            '@@DATEFIRST','@@OPTIONS','@@DBTS','@@REMSERVER','@@LANGID','@@SERVERNAME',
            +            '@@LANGUAGE','@@SERVICENAME','@@LOCK_TIMEOUT','@@SPID','@@MAX_CONNECTIONS',
            +            '@@TEXTSIZE','@@MAX_PRECISION','@@VERSION','@@NESTLEVEL',
            +
            +            //Cursor Functions
            +            '@@CURSOR_ROWS','@@FETCH_STATUS',
            +
            +            //Date and Time Functions
            +            'DATEADD','DATEDIFF','DATENAME','DATEPART','GETDATE','GETUTCDATE',
            +
            +            //Mathematical Functions
            +            'ABS','DEGREES','RAND','ACOS','EXP','ROUND','ASIN','FLOOR','SIGN',
            +            'ATAN','LOG','SIN','ATN2','LOG10','SQUARE','CEILING','PI','SQRT','COS',
            +            'POWER','TAN','COT','RADIANS',
            +
            +            //Meta Data Functions
            +            'COL_LENGTH','COL_NAME','FULLTEXTCATALOGPROPERTY',
            +            'COLUMNPROPERTY','FULLTEXTSERVICEPROPERTY','DATABASEPROPERTY','INDEX_COL',
            +            'DATABASEPROPERTYEX','INDEXKEY_PROPERTY','DB_ID','INDEXPROPERTY','DB_NAME',
            +            'OBJECT_ID','FILE_ID','OBJECT_NAME','FILE_NAME','OBJECTPROPERTY','FILEGROUP_ID',
            +            '@@PROCID','FILEGROUP_NAME','SQL_VARIANT_PROPERTY','FILEGROUPPROPERTY',
            +            'TYPEPROPERTY','FILEPROPERTY',
            +
            +            //Security Functions
            +            'IS_SRVROLEMEMBER','SUSER_SID','SUSER_SNAME','USER_ID',
            +            'HAS_DBACCESS','IS_MEMBER',
            +
            +            //String Functions
            +            'ASCII','SOUNDEX','PATINDEX','CHARINDEX','REPLACE','STR',
            +            'DIFFERENCE','QUOTENAME','STUFF','REPLICATE','SUBSTRING','LEN',
            +            'REVERSE','UNICODE','LOWER','UPPER','LTRIM','RTRIM',
            +
            +            //System Functions
            +            'APP_NAME','COLLATIONPROPERTY','@@ERROR','FORMATMESSAGE',
            +            'GETANSINULL','HOST_ID','HOST_NAME','IDENT_CURRENT','IDENT_INCR',
            +            'IDENT_SEED','@@IDENTITY','ISDATE','ISNUMERIC','PARSENAME','PERMISSIONS',
            +            '@@ROWCOUNT','ROWCOUNT_BIG','SCOPE_IDENTITY','SERVERPROPERTY','SESSIONPROPERTY',
            +            'STATS_DATE','@@TRANCOUNT','USER_NAME',
            +
            +            //System Statistical Functions
            +            '@@CONNECTIONS','@@PACK_RECEIVED','@@CPU_BUSY','@@PACK_SENT',
            +            '@@TIMETICKS','@@IDLE','@@TOTAL_ERRORS','@@IO_BUSY',
            +            '@@TOTAL_READ','@@PACKET_ERRORS','@@TOTAL_WRITE',
            +
            +            //Text and Image Functions
            +            'TEXTPTR','TEXTVALID',
            +
            +            //Aggregate functions
            +            'AVG', 'MAX', 'BINARY_CHECKSUM', 'MIN', 'CHECKSUM', 'SUM', 'CHECKSUM_AGG',
            +            'STDEV', 'COUNT', 'STDEVP', 'COUNT_BIG', 'VAR', 'VARP'
            +            ),
            +        3 => array(
            +            /*
            +                System stored procedures
            +                Higlighted dark brown
            +            */
            +
            +            //Active Directory Procedures
            +            'sp_ActiveDirectory_Obj', 'sp_ActiveDirectory_SCP',
            +
            +            //Catalog Procedures
            +            'sp_column_privileges', 'sp_special_columns', 'sp_columns', 'sp_sproc_columns',
            +            'sp_databases', 'sp_statistics', 'sp_fkeys', 'sp_stored_procedures', 'sp_pkeys',
            +            'sp_table_privileges', 'sp_server_info', 'sp_tables',
            +
            +            //Cursor Procedures
            +            'sp_cursor_list', 'sp_describe_cursor_columns', 'sp_describe_cursor', 'sp_describe_cursor_tables',
            +
            +            //Database Maintenance Plan Procedures
            +            'sp_add_maintenance_plan', 'sp_delete_maintenance_plan_db', 'sp_add_maintenance_plan_db',
            +            'sp_delete_maintenance_plan_job', 'sp_add_maintenance_plan_job', 'sp_help_maintenance_plan',
            +            'sp_delete_maintenance_plan',
            +
            +            //Distributed Queries Procedures
            +            'sp_addlinkedserver', 'sp_indexes', 'sp_addlinkedsrvlogin', 'sp_linkedservers', 'sp_catalogs',
            +            'sp_primarykeys', 'sp_column_privileges_ex', 'sp_columns_ex',
            +            'sp_table_privileges_ex', 'sp_tables_ex', 'sp_foreignkeys',
            +
            +            //Full-Text Search Procedures
            +            'sp_fulltext_catalog', 'sp_help_fulltext_catalogs_cursor', 'sp_fulltext_column',
            +            'sp_help_fulltext_columns', 'sp_fulltext_database', 'sp_help_fulltext_columns_cursor',
            +            'sp_fulltext_service', 'sp_help_fulltext_tables', 'sp_fulltext_table',
            +            'sp_help_fulltext_tables_cursor', 'sp_help_fulltext_catalogs',
            +
            +            //Log Shipping Procedures
            +            'sp_add_log_shipping_database', 'sp_delete_log_shipping_database', 'sp_add_log_shipping_plan',
            +            'sp_delete_log_shipping_plan', 'sp_add_log_shipping_plan_database',
            +            'sp_delete_log_shipping_plan_database', 'sp_add_log_shipping_primary',
            +            'sp_delete_log_shipping_primary', 'sp_add_log_shipping_secondary',
            +            'sp_delete_log_shipping_secondary', 'sp_can_tlog_be_applied', 'sp_get_log_shipping_monitor_info',
            +            'sp_change_monitor_role', 'sp_remove_log_shipping_monitor', 'sp_change_primary_role',
            +            'sp_resolve_logins', 'sp_change_secondary_role', 'sp_update_log_shipping_monitor_info',
            +            'sp_create_log_shipping_monitor_account', 'sp_update_log_shipping_plan',
            +            'sp_define_log_shipping_monitor', 'sp_update_log_shipping_plan_database',
            +
            +            //OLE Automation Extended Stored Procedures
            +            'sp_OACreate', 'sp_OAMethod', 'sp_OADestroy', 'sp_OASetProperty', 'sp_OAGetErrorInfo',
            +            'sp_OAStop', 'sp_OAGetProperty',
            +
            +            //Replication Procedures
            +            'sp_add_agent_parameter', 'sp_enableagentoffload', 'sp_add_agent_profile',
            +            'sp_enumcustomresolvers', 'sp_addarticle', 'sp_enumdsn', 'sp_adddistpublisher',
            +            'sp_enumfullsubscribers', 'sp_adddistributiondb', 'sp_expired_subscription_cleanup',
            +            'sp_adddistributor', 'sp_generatefilters', 'sp_addmergealternatepublisher',
            +            'sp_getagentoffloadinfo', 'sp_addmergearticle', 'sp_getmergedeletetype', 'sp_addmergefilter',
            +            'sp_get_distributor', 'sp_addmergepublication', 'sp_getqueuedrows', 'sp_addmergepullsubscription',
            +            'sp_getsubscriptiondtspackagename', 'sp_addmergepullsubscription_agent', 'sp_grant_publication_access',
            +            'sp_addmergesubscription', 'sp_help_agent_default', 'sp_addpublication', 'sp_help_agent_parameter',
            +            'sp_addpublication_snapshot', 'sp_help_agent_profile', 'sp_addpublisher70', 'sp_helparticle',
            +            'sp_addpullsubscription', 'sp_helparticlecolumns', 'sp_addpullsubscription_agent', 'sp_helparticledts',
            +            'sp_addscriptexec', 'sp_helpdistpublisher', 'sp_addsubscriber', 'sp_helpdistributiondb',
            +            'sp_addsubscriber_schedule', 'sp_helpdistributor', 'sp_addsubscription', 'sp_helpmergealternatepublisher',
            +            'sp_addsynctriggers', 'sp_helpmergearticle', 'sp_addtabletocontents', 'sp_helpmergearticlecolumn',
            +            'sp_adjustpublisheridentityrange', 'sp_helpmergearticleconflicts', 'sp_article_validation',
            +            'sp_helpmergeconflictrows', 'sp_articlecolumn', 'sp_helpmergedeleteconflictrows', 'sp_articlefilter',
            +            'sp_helpmergefilter', 'sp_articlesynctranprocs', 'sp_helpmergepublication', 'sp_articleview',
            +            'sp_helpmergepullsubscription', 'sp_attachsubscription', 'sp_helpmergesubscription', 'sp_browsesnapshotfolder',
            +            'sp_helppublication', 'sp_browsemergesnapshotfolder', 'sp_help_publication_access', 'sp_browsereplcmds',
            +            'sp_helppullsubscription', 'sp_change_agent_parameter', 'sp_helpreplfailovermode', 'sp_change_agent_profile',
            +            'sp_helpreplicationdboption', 'sp_changearticle', 'sp_helpreplicationoption', 'sp_changedistpublisher',
            +            'sp_helpsubscriberinfo', 'sp_changedistributiondb', 'sp_helpsubscription', 'sp_changedistributor_password',
            +            'sp_ivindexhasnullcols', 'sp_changedistributor_property', 'sp_helpsubscription_properties', 'sp_changemergearticle',
            +            'sp_link_publication', 'sp_changemergefilter', 'sp_marksubscriptionvalidation', 'sp_changemergepublication',
            +            'sp_mergearticlecolumn', 'sp_changemergepullsubscription', 'sp_mergecleanupmetadata', 'sp_changemergesubscription',
            +            'sp_mergedummyupdate', 'sp_changepublication', 'sp_mergesubscription_cleanup', 'sp_changesubscriber',
            +            'sp_publication_validation', 'sp_changesubscriber_schedule', 'sp_refreshsubscriptions', 'sp_changesubscriptiondtsinfo',
            +            'sp_reinitmergepullsubscription', 'sp_changesubstatus', 'sp_reinitmergesubscription', 'sp_change_subscription_properties',
            +            'sp_reinitpullsubscription', 'sp_check_for_sync_trigger', 'sp_reinitsubscription', 'sp_copymergesnapshot',
            +            'sp_removedbreplication', 'sp_copysnapshot', 'sp_repladdcolumn', 'sp_copysubscription', 'sp_replcmds',
            +            'sp_deletemergeconflictrow', 'sp_replcounters', 'sp_disableagentoffload', 'sp_repldone', 'sp_drop_agent_parameter',
            +            'sp_repldropcolumn', 'sp_drop_agent_profile', 'sp_replflush', 'sp_droparticle', 'sp_replicationdboption',
            +            'sp_dropanonymouseagent', 'sp_replication_agent_checkup', 'sp_dropdistpublisher', 'sp_replqueuemonitor',
            +            'sp_dropdistributiondb', 'sp_replsetoriginator', 'sp_dropmergealternatepublisher', 'sp_replshowcmds',
            +            'sp_dropdistributor', 'sp_repltrans', 'sp_dropmergearticle', 'sp_restoredbreplication', 'sp_dropmergefilter',
            +            'sp_revoke_publication_access', 'sp_scriptsubconflicttable', 'sp_dropmergepublication', 'sp_script_synctran_commands',
            +            'sp_dropmergepullsubscription', 'sp_setreplfailovermode', 'sp_showrowreplicainfo', 'sp_dropmergesubscription',
            +            'sp_subscription_cleanup', 'sp_droppublication', 'sp_table_validation', 'sp_droppullsubscription',
            +            'sp_update_agent_profile', 'sp_dropsubscriber', 'sp_validatemergepublication', 'sp_dropsubscription',
            +            'sp_validatemergesubscription', 'sp_dsninfo', 'sp_vupgrade_replication', 'sp_dumpparamcmd',
            +
            +            //Security Procedures
            +            'sp_addalias', 'sp_droprolemember', 'sp_addapprole', 'sp_dropserver', 'sp_addgroup', 'sp_dropsrvrolemember',
            +            'sp_dropuser', 'sp_addlogin', 'sp_grantdbaccess', 'sp_addremotelogin',
            +            'sp_grantlogin', 'sp_addrole', 'sp_helpdbfixedrole', 'sp_addrolemember', 'sp_helpgroup',
            +            'sp_addserver', 'sp_helplinkedsrvlogin', 'sp_addsrvrolemember', 'sp_helplogins', 'sp_adduser',
            +            'sp_helpntgroup', 'sp_approlepassword', 'sp_helpremotelogin', 'sp_changedbowner', 'sp_helprole',
            +            'sp_changegroup', 'sp_helprolemember', 'sp_changeobjectowner', 'sp_helprotect', 'sp_change_users_login',
            +            'sp_helpsrvrole', 'sp_dbfixedrolepermission', 'sp_helpsrvrolemember', 'sp_defaultdb', 'sp_helpuser',
            +            'sp_defaultlanguage', 'sp_MShasdbaccess', 'sp_denylogin', 'sp_password', 'sp_dropalias', 'sp_remoteoption',
            +            'sp_dropapprole', 'sp_revokedbaccess', 'sp_dropgroup', 'sp_revokelogin', 'sp_droplinkedsrvlogin',
            +            'sp_setapprole', 'sp_droplogin', 'sp_srvrolepermission', 'sp_dropremotelogin', 'sp_validatelogins', 'sp_droprole',
            +
            +            //SQL Mail Procedures
            +            'sp_processmail', 'xp_sendmail', 'xp_deletemail', 'xp_startmail', 'xp_findnextmsg', 'xp_stopmail', 'xp_readmail',
            +
            +            //SQL Profiler Procedures
            +            'sp_trace_create', 'sp_trace_setfilter', 'sp_trace_generateevent', 'sp_trace_setstatus', 'sp_trace_setevent',
            +
            +            //SQL Server Agent Procedures
            +            'sp_add_alert', 'sp_help_jobhistory', 'sp_add_category', 'sp_help_jobschedule', 'sp_add_job',
            +            'sp_help_jobserver', 'sp_add_jobschedule', 'sp_help_jobstep', 'sp_add_jobserver', 'sp_help_notification',
            +            'sp_add_jobstep', 'sp_help_operator', 'sp_add_notification', 'sp_help_targetserver',
            +            'sp_add_operator', 'sp_help_targetservergroup', 'sp_add_targetservergroup', 'sp_helptask',
            +            'sp_add_targetsvrgrp_member', 'sp_manage_jobs_by_login', 'sp_addtask', 'sp_msx_defect',
            +            'sp_apply_job_to_targets', 'sp_msx_enlist', 'sp_delete_alert', 'sp_post_msx_operation',
            +            'sp_delete_category', 'sp_purgehistory', 'sp_delete_job', 'sp_purge_jobhistory', 'sp_delete_jobschedule',
            +            'sp_reassigntask', 'sp_delete_jobserver', 'sp_remove_job_from_targets', 'sp_delete_jobstep',
            +            'sp_resync_targetserver', 'sp_delete_notification', 'sp_start_job', 'sp_delete_operator',
            +            'sp_stop_job', 'sp_delete_targetserver', 'sp_update_alert', 'sp_delete_targetservergroup',
            +            'sp_update_category', 'sp_delete_targetsvrgrp_member', 'sp_update_job', 'sp_droptask',
            +            'sp_update_jobschedule', 'sp_help_alert', 'sp_update_jobstep', 'sp_help_category',
            +            'sp_update_notification', 'sp_help_downloadlist', 'sp_update_operator', 'sp_helphistory',
            +            'sp_update_targetservergroup', 'sp_help_job', 'sp_updatetask', 'xp_sqlagent_proxy_account',
            +
            +            //System Procedures
            +            'sp_add_data_file_recover_suspect_db', 'sp_helpconstraint', 'sp_addextendedproc',
            +            'sp_helpdb', 'sp_addextendedproperty', 'sp_helpdevice', 'sp_add_log_file_recover_suspect_db',
            +            'sp_helpextendedproc', 'sp_addmessage', 'sp_helpfile', 'sp_addtype', 'sp_helpfilegroup',
            +            'sp_addumpdevice', 'sp_helpindex', 'sp_altermessage', 'sp_helplanguage', 'sp_autostats',
            +            'sp_helpserver', 'sp_attach_db', 'sp_helpsort', 'sp_attach_single_file_db', 'sp_helpstats',
            +            'sp_bindefault', 'sp_helptext', 'sp_bindrule', 'sp_helptrigger', 'sp_bindsession',
            +            'sp_indexoption', 'sp_certify_removable', 'sp_invalidate_textptr', 'sp_configure',
            +            'sp_lock', 'sp_create_removable', 'sp_monitor', 'sp_createstats', 'sp_procoption',
            +            'sp_cycle_errorlog', 'sp_recompile', 'sp_datatype_info', 'sp_refreshview', 'sp_dbcmptlevel',
            +            'sp_releaseapplock', 'sp_dboption', 'sp_rename', 'sp_dbremove', 'sp_renamedb',
            +            'sp_delete_backuphistory', 'sp_resetstatus', 'sp_depends', 'sp_serveroption', 'sp_detach_db',
            +            'sp_setnetname', 'sp_dropdevice', 'sp_settriggerorder', 'sp_dropextendedproc', 'sp_spaceused',
            +            'sp_dropextendedproperty', 'sp_tableoption', 'sp_dropmessage', 'sp_unbindefault', 'sp_droptype',
            +            'sp_unbindrule', 'sp_executesql', 'sp_updateextendedproperty', 'sp_getapplock', 'sp_updatestats',
            +            'sp_getbindtoken', 'sp_validname', 'sp_help', 'sp_who',
            +
            +            //Web Assistant Procedures
            +            'sp_dropwebtask', 'sp_makewebtask', 'sp_enumcodepages', 'sp_runwebtask',
            +
            +            //XML Procedures
            +            'sp_xml_preparedocument', 'sp_xml_removedocument',
            +
            +            //General Extended Procedures
            +            'xp_cmdshellxp_logininfo', 'xp_enumgroups', 'xp_msver', 'xp_findnextmsgxp_revokelogin',
            +            'xp_grantlogin', 'xp_sprintf', 'xp_logevent', 'xp_sqlmaint', 'xp_loginconfig', 'xp_sscanf',
            +
            +            //API System Stored Procedures
            +            'sp_cursor', 'sp_cursorclose', 'sp_cursorexecute', 'sp_cursorfetch', 'sp_cursoropen',
            +            'sp_cursoroption', 'sp_cursorprepare', 'sp_cursorunprepare', 'sp_execute', 'sp_prepare', 'sp_unprepare',
            +
            +            //Misc
            +            'sp_createorphan', 'sp_droporphans', 'sp_reset_connection', 'sp_sdidebug'
            +            ),
            +        4 => array(
            +            //Function/sp's higlighted brown.
            +            'fn_helpcollations', 'fn_listextendedproperty ', 'fn_servershareddrives',
            +            'fn_trace_geteventinfo', 'fn_trace_getfilterinfo', 'fn_trace_getinfo',
            +            'fn_trace_gettable', 'fn_virtualfilestats','fn_listextendedproperty',
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '!', '!=', '%', '&', '&&', '(', ')', '*', '+', '-', '/', '<', '<<', '<=',
            +        '<=>', '<>', '=', '>', '>=', '>>', '^', 'ALL', 'AND', 'ANY', 'BETWEEN', 'CROSS',
            +        'EXISTS', 'IN', 'JOIN', 'LIKE', 'NOT', 'NULL', 'OR', 'OUTER', 'SOME', '|', '||', '~'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0000FF;',
            +            2 => 'color: #FF00FF;',
            +            3 => 'color: #AF0000;',
            +            4 => 'color: #AF0000;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #008080;',
            +            'MULTI' => 'color: #008080;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #808080;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #FF0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #000;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #202020;',
            +            2 => 'color: #202020;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #808080;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/twig.php b/vendor/easybook/geshi/geshi/twig.php
            new file mode 100644
            index 0000000000..cc790532c1
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/twig.php
            @@ -0,0 +1,190 @@
            + 'Twig',
            +    'COMMENT_SINGLE' => array('{#' => '#}'),
            +    'COMMENT_MULTI' => array('{#' => '#}'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        //TWIG
            +        //Tags
            +        1 => array(
            +            'autoescape', 'endautoescape', 'block', 'endblock', 'do', 'embed', 'endembed',
            +            'extends', 'filter', 'endfilter', 'for', 'endfor', 'from', 'if', 'else', 'elseif', 'endif',
            +            'import', 'include', 'macro', 'endmacro', 'raw', 'endraw', 'sandbox', 'set', 'endset',
            +            'spaceless', 'endspaceless', 'use', 'verbatim', 'endverbatim',
            +            'trans', 'endtrans', 'transchoice', 'endtranschoice'
            +        ),
            +        //Filters
            +        2 => array(
            +            'abs', 'batch', 'capitalize', 'convert_encoding', 'date', 'date_modify', 'default',
            +            'escape', 'first', 'format', 'join', 'json_encode', 'keys', 'last', 'length', 'lower',
            +            'merge', 'nl2br', 'number_format', 'raw', 'replace', 'reverse', 'slice', 'sort', 'split',
            +            'striptags', 'title', 'trans', 'trim', 'upper', 'url_encode'
            +        ),
            +        //Functions
            +        3 => array(
            +            'attribute', 'block', 'constant', 'cycle', 'date', 'dump', 'include',
            +            'parent', 'random', 'range', 'source', 'template_from_string'
            +        ),
            +        //Tests
            +        4 => array(
            +            'constant', 'defined', 'divisibleby', 'empty', 'even', 'iterable', 'null',
            +            'odd', 'sameas'
            +        ),
            +        //Operators
            +        5 => array(
            +            'in', 'is', 'and', 'b-and', 'or', 'b-or', 'b-xor', 'not', 'into',
            +            'starts with', 'ends with', 'matches'
            +        ),
            +        6 => array(
            +            '{{', '}}', '{%', '%}'
            +        ),
            +    ),
            +    'SYMBOLS' => array(
            +        '+', '-', '/', '/', '*', '**', //Math operators
            +        '==', '!=', '<', '>', '>=', '<=', '===', //Logic operators
            +        '..', '|', '~', '[', ']', '.', '?', ':', '(', ')', //Other
            +        '=' //HTML (attributes)
            +    ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        //Twig
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        5 => true,
            +        6 => false
            +    ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0600FF;', //Tags
            +            2 => 'color: #008000;', //Filters
            +            3 => 'color: #0600FF;', //Functions
            +            4 => 'color: #804040;', //Tests
            +            5 => 'color: #008000;', //Operators
            +            6 => 'color: #008000;'  // {{ and {%
            +        ),
            +        'COMMENTS' => array(
            +            'MULTI' => 'color: #008080; font-style: italic;'
            +        ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +        ),
            +        'BRACKETS' => array(
            +            0 => 'color: #D36900;'
            +        ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +        ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +        ),
            +        'METHODS' => array(
            +            1 => 'color: #006600;'
            +        ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #D36900;'
            +        ),
            +        'SCRIPT' => array(
            +            0 => '',
            +            1 => 'color: #808080; font-style: italic;',
            +            2 => 'color: #009000;'
            +        ),
            +        'REGEXPS' => array(
            +            0 => 'color: #00aaff;',
            +            1 => 'color: #00aaff;'
            +        )
            +    ),
            +    'URLS' => array(
            +        1 => 'http://twig.sensiolabs.org/doc/tags/{FNAMEL}.html',
            +        2 => 'http://twig.sensiolabs.org/doc/filters/{FNAMEL}.html',
            +        3 => 'http://twig.sensiolabs.org/doc/functions/{FNAMEL}.html',
            +        4 => 'http://twig.sensiolabs.org/doc/tests/{FNAMEL}.html',
            +        5 => '',
            +    ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.',
            +        ),
            +    'REGEXPS' => array(
            +        0 => array(
            +            GESHI_SEARCH => "([[:space:]])([a-zA-Z_][a-zA-Z0-9_]*)",
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => ''
            +            ),
            +        1 => array(
            +            GESHI_SEARCH => "\.([a-zA-Z_][a-zA-Z0-9_]*)",
            +            GESHI_REPLACE => '.\\1',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +    ),
            +    'STRICT_MODE_APPLIES' => GESHI_ALWAYS,
            +    'SCRIPT_DELIMITERS' => array(
            +        0 => array(
            +            '{{' => '}}',
            +            '{%' => '%}'         
            +        ),
            +        1 => array(
            +            '{#' => '#}',          
            +        )
            +    ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        0 => true,
            +        1 => true,
            +        2 => true
            +    ),
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +        )
            +    )
            +);
            diff --git a/vendor/easybook/geshi/geshi/typoscript.php b/vendor/easybook/geshi/geshi/typoscript.php
            new file mode 100644
            index 0000000000..25671d7288
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/typoscript.php
            @@ -0,0 +1,298 @@
            + Complete rewrite
            + * 2005/07/29 (1.0.0)
            + *  -  First Release
            + *
            + * TODO (updated 2004/07/14)
            + * -------------------------
            + * 
            + *
            + *************************************************************************************
            + *
            + *     This file is part of GeSHi.
            + *
            + *   GeSHi is free software; you can redistribute it and/or modify
            + *   it under the terms of the GNU General Public License as published by
            + *   the Free Software Foundation; either version 2 of the License, or
            + *   (at your option) any later version.
            + *
            + *   GeSHi is distributed in the hope that it will be useful,
            + *   but WITHOUT ANY WARRANTY; without even the implied warranty of
            + *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
            + *   GNU General Public License for more details.
            + *
            + *   You should have received a copy of the GNU General Public License
            + *   along with GeSHi; if not, write to the Free Software
            + *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
            + *
            + ************************************************************************************/
            +
            +$language_data = array (
            +    'LANG_NAME' => 'TypoScript',
            +    'COMMENT_SINGLE' => array(1  => '//'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(2 => '/(? GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array(),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        // Conditions: http://documentation.typo3.org/documentation/tsref/conditions/
            +        1 => array(
            +            'browser', 'compatVersion', 'dayofmonth', 'dayofweek', 'device',
            +            'globalString', 'globalVars', 'hostname', 'hour',
            +            'ip', 'language', 'loginUser', 'loginuser', 'minute',
            +            'month', 'PIDinRootline', 'PIDupinRootline',
            +            'system', 'treelevel', 'useragent', 'userFunc',
            +            'usergroup', 'version'
            +            ),
            +
            +        // Functions: http://documentation.typo3.org/documentation/tsref/functions/
            +        2 => array(
            +            'addParams', 'encapsLines', 'filelink', 'HTMLparser',
            +            'HTMLparser_tags', 'if', 'imageLinkWrap',
            +            'imgResource', 'makelinks', 'numRows', 'parseFunc',
            +            'select', 'split', 'stdWrap', 'tableStyle', 'tags',
            +            'textStyle', 'typolink'
            +            ),
            +
            +        // Toplevel objects: http://documentation.typo3.org/documentation/tsref/tlo-objects/
            +        3 => array(
            +            'CARRAY', 'CONFIG', 'CONSTANTS', 'FE_DATA', 'FE_TABLE', 'FRAME',
            +            'FRAMESET', 'META', 'PAGE', 'plugin'
            +            ),
            +
            +        // Content Objects (cObject) : http://documentation.typo3.org/documentation/tsref/cobjects/
            +        4 => array(
            +            'CASE', 'CLEARGIF', 'COA', 'COA_INT', 'COBJ_ARRAY', 'COLUMNS',
            +            'CONTENT', 'CTABLE', 'EDITPANEL', 'FILE', 'FORM',
            +            'HMENU', 'HRULER', 'HTML', 'IMAGE', 'IMGTEXT',
            +            'IMG_RESOURCE', 'LOAD_REGISTER', 'MULTIMEDIA',
            +            'OTABLE', 'PHP_SCRIPT', 'PHP_SCRIPT_EXT',
            +            'PHP_SCRIPT_INT', 'RECORDS', 'RESTORE_REGISTER',
            +            'SEARCHRESULT', 'TEMPLATE', 'TEXT', 'USER',
            +            'USER_INT'
            +            ),
            +
            +        // GIFBUILDER toplevel link: http://documentation.typo3.org/documentation/tsref/gifbuilder/
            +        5 => array(
            +            'GIFBUILDER',
            +            ),
            +
            +        // GIFBUILDER: http://documentation.typo3.org/documentation/tsref/gifbuilder/
            +        // skipped fields: IMAGE, TEXT
            +        // NOTE! the IMAGE and TEXT field already are linked in group 4, they
            +        // cannot be linked twice . . . . unfortunately
            +        6 => array(
            +            'ADJUST', 'BOX', 'CROP', 'EFFECT', 'EMBOSS',
            +            'IMGMAP', 'OUTLINE', 'SCALE', 'SHADOW',
            +            'WORKAREA'
            +            ),
            +
            +        // MENU Objects: http://documentation.typo3.org/documentation/tsref/menu/
            +        7 => array(
            +            'GMENU', 'GMENU_FOLDOUT', 'GMENU_LAYERS', 'IMGMENU',
            +            'IMGMENUITEM', 'JSMENU', 'JSMENUITEM', 'TMENU',
            +            'TMENUITEM', 'TMENU_LAYERS'
            +            ),
            +
            +        // MENU common properties: http://documentation.typo3.org/documentation/tsref/menu/common-properties/
            +        8 => array(
            +            'alternativeSortingField', 'begin', 'debugItemConf',
            +            'imgNameNotRandom', 'imgNamePrefix',
            +            'itemArrayProcFunc', 'JSWindow', 'maxItems',
            +            'minItems', 'overrideId', 'sectionIndex',
            +            'showAccessRestrictedPages', 'submenuObjSuffixes'
            +            ),
            +
            +        // MENU item states: http://documentation.typo3.org/documentation/tsref/menu/item-states/
            +        9 => array(
            +            'ACT', 'ACTIFSUB', 'ACTIFSUBRO', 'ACTRO', 'CUR', 'CURIFSUB',
            +            'CURIFSUBRO', 'CURRO', 'IFSUB', 'IFSUBRO', 'NO',
            +            'SPC', 'USERDEF1', 'USERDEF1RO', 'USERDEF2',
            +            'USERDEF2RO', 'USR', 'USRRO'
            +            ),
            +        ),
            +
            +    // Does not include '-' because of stuff like htmlTag_langKey = en-GB and
            +    // lib.nav-sub
            +    'SYMBOLS' => array(
            +        0 => array(
            +            '|',
            +            '+', '*', '/', '%',
            +            '!', '&&', '^',
            +            '<', '>', '=',
            +            '?', ':',
            +            '.'
            +            ),
            +        1 => array(
            +            '(', ')', '{', '}', '[', ']'
            +            )
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        5 => true,
            +        6 => true,
            +        7 => true,
            +        8 => true,
            +        9 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #ed7d14;',
            +            2 => 'font-weight: bold;',
            +            3 => 'color: #990000; font-weight: bold;',
            +            4 => 'color: #990000; font-weight: bold;',
            +            5 => 'color: #990000; font-weight: bold;',
            +            6 => 'color: #990000; font-weight: bold;',
            +            7 => 'color: #990000; font-weight: bold;',
            +            8 => 'font-weight: bold;',
            +            9 => 'color: #990000; font-weight: bold;',
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #aaa; font-style: italic;',
            +            2 => 'color: #aaa; font-style: italic;',
            +            'MULTI' => 'color: #aaa; font-style: italic;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ac14aa;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc0000;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #0000e0; font-weight: bold;',
            +            2 => 'color: #0000e0; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #339933; font-weight: bold;',
            +                // Set this to the same value as brackets above
            +            1 => 'color: #009900; font-weight: bold;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #009900;',
            +            1 => 'color: #009900; font-weight: bold;',
            +            2 => 'color: #3366CC;',
            +            3 => 'color: #000066; font-weight: bold;',
            +            4 => 'color: #ed7d14;',
            +            5 => 'color: #000066; font-weight: bold;',
            +            6 => 'color: #009900;',
            +            7 => 'color: #3366CC;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => 'http://documentation.typo3.org/documentation/tsref/conditions/{FNAME}/',
            +        2 => 'http://documentation.typo3.org/documentation/tsref/functions/{FNAME}/',
            +        3 => 'http://documentation.typo3.org/documentation/tsref/tlo-objects/{FNAME}/',
            +        4 => 'http://documentation.typo3.org/documentation/tsref/cobjects/{FNAME}/',
            +        5 => 'http://documentation.typo3.org/documentation/tsref/gifbuilder/',
            +        6 => 'http://documentation.typo3.org/documentation/tsref/gifbuilder/{FNAME}/',
            +        7 => 'http://documentation.typo3.org/documentation/tsref/menu/{FNAME}/',
            +        8 => 'http://documentation.typo3.org/documentation/tsref/menu/common-properties/',
            +        9 => 'http://documentation.typo3.org/documentation/tsref/menu/item-states/'
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +            // xhtml tag
            +        2 => array(
            +            GESHI_SEARCH => '(<)([a-zA-Z\\/][^\\/\\|]*?)(>)',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => 's',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => '\\3'
            +            ),
            +
            +            // Constant
            +        0 => array(
            +            GESHI_SEARCH => '(\{)(\$[a-zA-Z_\.]+[a-zA-Z0-9_\.]*)(\})',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => '\\3'
            +            ),
            +
            +            // Constant dollar sign
            +        1 => array(
            +            GESHI_SEARCH => '(\$)([a-zA-Z_\.]+[a-zA-Z0-9_\.]*)',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => '\\2'
            +            ),
            +
            +            // extension keys / tables: (static|user|ttx|tx|tt|fe)_something[_something]
            +        3 => array(
            +            GESHI_SEARCH => '(plugin\.|[^\.]\b)((?:static|user|ttx|tx|tt|fe)(?:_[0-9A-Za-z_]+?)\b)',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => ''
            +            ),
            +
            +            // conditions and controls
            +        4 => array(
            +            GESHI_SEARCH => '(\[)(globalVar|global|end)\b',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => 'i',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => ''
            +            ),
            +
            +            // lowlevel setup and constant objects
            +        5 => array(
            +            GESHI_SEARCH => '([^\.\$-\{]\b)(cObj|field|config|content|file|frameset|includeLibs|lib|page|plugin|register|resources|sitemap|sitetitle|styles|temp|tt_content|tt_news|types|xmlnews)\b',
            +            GESHI_REPLACE => '\\2',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '\\1',
            +            GESHI_AFTER => ''
            +            ),
            +
            +            // markers
            +        6 => array(
            +            GESHI_SEARCH => '(###[^#]+###)',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +
            +            // hex color codes
            +        7 => array(
            +            GESHI_SEARCH => '(#[a-fA-F0-9]{6}\b|#[a-fA-F0-9]{3}\b)',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => '',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            )
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +);
            diff --git a/vendor/easybook/geshi/geshi/unicon.php b/vendor/easybook/geshi/geshi/unicon.php
            new file mode 100644
            index 0000000000..fcfc7861c0
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/unicon.php
            @@ -0,0 +1,209 @@
            + 'Unicon (Unified Extended Dialect of Icon)',
            +    'COMMENT_SINGLE' => array(1 => '#'),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"', '\''),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'break', 'case', 'class', 'continue', 'create', 'default', 'do',
            +            'else', 'end', 'every', 'fail', 'for', 'if', 'import', 'initial', 'initially',
            +            'invocable', 'link', 'method', 'next', 'not', 'of', 'package', 'procedure', 'record',
            +            'repeat', 'return', 'switch', 'suspend', 'then', 'to', 'until', 'while'
            +            ),
            +        2 => array(
            +            'global', 'local', 'static'
            +            ),
            +        3 => array(
            +            'allocated', 'ascii', 'clock', 'collections',
            +            'column', 'cset', 'current', 'date', 'dateline', 'digits',
            +            'dump', 'e', 'error', 'errornumber', 'errortext',
            +            'errorvalue', 'errout', 'eventcode', 'eventsource', 'eventvalue',
            +            'fail', 'features', 'file', 'host', 'input', 'lcase',
            +            'letters', 'level', 'line', 'main', 'now', 'null',
            +            'output', 'phi', 'pi', 'pos', 'progname', 'random',
            +            'regions', 'source', 'storage', 'subject', 'syserr', 'time',
            +            'trace', 'ucase', 'version', 'col', 'control', 'interval',
            +            'ldrag', 'lpress', 'lrelease', 'mdrag', 'meta', 'mpress',
            +            'mrelease', 'rdrag', 'resize', 'row', 'rpress', 'rrelease',
            +            'shift', 'window', 'x', 'y'
            +            ),
            +        4 => array(
            +            'abs', 'acos', 'any', 'args', 'asin', 'atan', 'bal', 'center', 'char',
            +            'chmod', 'close', 'cofail', 'collect', 'copy', 'cos', 'cset', 'ctime', 'dbcolumns',
            +            'dbdriver', 'dbkeys', 'dblimits', 'dbproduction', 'dbtables', 'delay', 'delete', 'detab',
            +            'display', 'dtor', 'entab', 'errorclear', 'event', 'eventmask', 'EvGet', 'exit', 'exp',
            +            'fetch', 'fieldnames', 'find', 'flock', 'flush', 'function', 'get', 'getch', 'getche',
            +            'getenv', 'gettimeofday', 'globalnames', 'gtime', 'iand', 'icom', 'image', 'insert',
            +            'integer', 'ior', 'ishift', 'ixor', 'key', 'left', 'list', 'load', 'loadfunc',
            +            'localnames', 'log', 'many', 'map', 'match', 'member', 'mkdir', 'move', 'name', 'numeric',
            +            'open', 'opmask', 'ord', 'paramnames', 'parent', 'pipe', 'pop', 'pos', 'proc', 'pull',
            +            'push', 'put', 'read', 'reads', 'real', 'receive', 'remove', 'rename', 'repl', 'reverse',
            +            'right', 'rmdir', 'rtod', 'runerr', 'seek', 'select', 'send', 'seq', 'serial', 'set',
            +            'setenv', 'sort', 'sortf', 'sql', 'sqrt', 'stat', 'staticnames', 'stop', 'string', 'system', 'tab',
            +            'table', 'tan', 'trap', 'trim', 'truncate', 'type', 'upto', 'utime', 'variable', 'where',
            +            'write', 'writes'
            +            ),
            +        5 => array(
            +            'Active', 'Alert', 'Bg', 'Clip', 'Clone', 'Color', 'ColorValue',
            +            'CopyArea', 'Couple', 'DrawArc', 'DrawCircle', 'DrawCurve', 'DrawCylinder', 'DrawDisk',
            +            'DrawImage', 'DrawLine', 'DrawPoint', 'DrawPolygon', 'DrawRectangle', 'DrawSegment',
            +            'DrawSphere', 'DrawString', 'DrawTorus', 'EraseArea', 'Event', 'Fg', 'FillArc',
            +            'FillCircle', 'FillPolygon', 'FillRectangle', 'Font', 'FreeColor', 'GotoRC', 'GotoXY',
            +            'IdentifyMatrix', 'Lower', 'MatrixMode', 'NewColor', 'PaletteChars', 'PaletteColor',
            +            'PaletteKey', 'Pattern', 'Pending', 'Pixel', 'PopMatrix', 'PushMatrix', 'PushRotate',
            +            'PushScale', 'PushTranslate', 'QueryPointer', 'Raise', 'ReadImage', 'Refresh', 'Rotate',
            +            'Scale', 'Texcoord', 'TextWidth', 'Texture', 'Translate', 'Uncouple', 'WAttrib',
            +            'WDefault', 'WFlush', 'WindowContents', 'WriteImage', 'WSync'
            +            ),
            +        6 => array(
            +            'define', 'include', 'ifdef', 'ifndef', 'else', 'endif', 'error',
            +            'line', 'undef'
            +            ),
            +        7 => array(
            +            '_V9', '_AMIGA', '_ACORN', '_CMS', '_MACINTOSH', '_MSDOS_386',
            +            '_MS_WINDOWS_NT', '_MSDOS', '_MVS', '_OS2', '_POR', 'T', '_UNIX', '_POSIX', '_DBM',
            +            '_VMS', '_ASCII', '_EBCDIC', '_CO_EXPRESSIONS', '_CONSOLE_WINDOW', '_DYNAMIC_LOADING',
            +            '_EVENT_MONITOR', '_EXTERNAL_FUNCTIONS', '_KEYBOARD_FUNCTIONS', '_LARGE_INTEGERS',
            +            '_MULTITASKING', '_PIPES', '_RECORD_IO', '_SYSTEM_FUNCTION', '_MESSAGING', '_GRAPHICS',
            +            '_X_WINDOW_SYSTEM', '_MS_WINDOWS', '_WIN32', '_PRESENTATION_MGR', '_ARM_FUNCTIONS',
            +            '_DOS_FUNCTIONS'
            +            ),
            +        8 => array(
            +            'line')
            +        ),
            +    'SYMBOLS' => array(
            +        1 => array(
            +            '(', ')', '{', '}', '[', ']', '+', '-', '*', '/', '\\', '%', '=', '<', '>', '!', '^',
            +            '&', '|', '?', ':', ';', ',', '.', '~', '@'
            +            ),
            +        2 => array(
            +            '$(', '$)', '$<', '$>'
            +            )
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        5 => true,
            +        6 => true,
            +        7 => true,
            +        8 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;',
            +            2 => 'color: #b1b100;',
            +            3 => 'color: #b1b100;',
            +            4 => 'color: #b1b100;',
            +            5 => 'color: #b1b100;',
            +            6 => 'color: #b1b100;',
            +            7 => 'color: #b1b100;',
            +            8 => 'color: #b1b100;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; font-style: italic;',
            +            'MULTI' => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #0000ff;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;',
            +            ),
            +        'METHODS' => array(
            +            0 => 'color: #004000;'
            +            ),
            +        'SYMBOLS' => array(
            +            1 => 'color: #339933;'
            +            ),
            +        'REGEXPS' => array(),
            +        'SCRIPT' => array()
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => '',
            +        6 => '',
            +        7 => '',
            +        8 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(1 => '.'),
            +    'REGEXPS' => array(),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(),
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            3 => array(
            +                'DISALLOWED_BEFORE' => '(?<=&)'
            +                ),
            +            4 => array(
            +                'DISALLOWED_BEFORE' => "(? "(?![a-zA-Z0-9_\"\'])"
            +                ),
            +            6 => array(
            +                'DISALLOWED_BEFORE' => '(?<=\$)'
            +                ),
            +            8 => array(
            +                'DISALLOWED_BEFORE' => '(?<=#)'
            +                )
            +            )
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/upc.php b/vendor/easybook/geshi/geshi/upc.php
            new file mode 100644
            index 0000000000..98ca885f1a
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/upc.php
            @@ -0,0 +1,269 @@
            + 'UPC',
            +    'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(
            +        //Multiline-continued single-line comments
            +        1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m',
            +        //Multiline-continued preprocessor define
            +        2 => '/#(?:\\\\\\\\|\\\\\\n|.)*$/m'
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'ESCAPE_REGEXP' => array(
            +        //Simple Single Char Escapes
            +        1 => "#\\\\[\\\\abfnrtv\'\"?\n]#i",
            +        //Hexadecimal Char Specs
            +        2 => "#\\\\x[\da-fA-F]{2}#",
            +        //Hexadecimal Char Specs
            +        3 => "#\\\\u[\da-fA-F]{4}#",
            +        //Hexadecimal Char Specs
            +        4 => "#\\\\U[\da-fA-F]{8}#",
            +        //Octal Char Specs
            +        5 => "#\\\\[0-7]{1,3}#"
            +        ),
            +    'NUMBERS' =>
            +        GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B |
            +        GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI |
            +        GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO,
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'if', 'return', 'while', 'case', 'continue', 'default',
            +            'do', 'else', 'for', 'switch', 'goto',
            +
            +            'upc_forall', 'upc_barrier', 'upc_notify', 'upc_wait', 'upc_fence'
            +            ),
            +        2 => array(
            +            'null', 'false', 'break', 'true', 'function', 'enum', 'extern', 'inline'
            +            ),
            +        3 => array(
            +            // assert.h
            +            'assert',
            +
            +            //complex.h
            +            'cabs', 'cacos', 'cacosh', 'carg', 'casin', 'casinh', 'catan',
            +            'catanh', 'ccos', 'ccosh', 'cexp', 'cimag', 'cis', 'clog', 'conj',
            +            'cpow', 'cproj', 'creal', 'csin', 'csinh', 'csqrt', 'ctan', 'ctanh',
            +
            +            //ctype.h
            +            'digittoint', 'isalnum', 'isalpha', 'isascii', 'isblank', 'iscntrl',
            +            'isdigit', 'isgraph', 'islower', 'isprint', 'ispunct', 'isspace',
            +            'isupper', 'isxdigit', 'toascii', 'tolower', 'toupper',
            +
            +            //inttypes.h
            +            'imaxabs', 'imaxdiv', 'strtoimax', 'strtoumax', 'wcstoimax',
            +            'wcstoumax',
            +
            +            //locale.h
            +            'localeconv', 'setlocale',
            +
            +            //math.h
            +            'acos', 'asin', 'atan', 'atan2', 'ceil', 'cos', 'cosh', 'exp',
            +            'fabs', 'floor', 'frexp', 'ldexp', 'log', 'log10', 'modf', 'pow',
            +            'sin', 'sinh', 'sqrt', 'tan', 'tanh',
            +
            +            //setjmp.h
            +            'longjmp', 'setjmp',
            +
            +            //signal.h
            +            'raise',
            +
            +            //stdarg.h
            +            'va_arg', 'va_copy', 'va_end', 'va_start',
            +
            +            //stddef.h
            +            'offsetof',
            +
            +            //stdio.h
            +            'clearerr', 'fclose', 'fdopen', 'feof', 'ferror', 'fflush', 'fgetc',
            +            'fgetpos', 'fgets', 'fopen', 'fprintf', 'fputc', 'fputchar',
            +            'fputs', 'fread', 'freopen', 'fscanf', 'fseek', 'fsetpos', 'ftell',
            +            'fwrite', 'getc', 'getch', 'getchar', 'gets', 'perror', 'printf',
            +            'putc', 'putchar', 'puts', 'remove', 'rename', 'rewind', 'scanf',
            +            'setbuf', 'setvbuf', 'snprintf', 'sprintf', 'sscanf', 'tmpfile',
            +            'tmpnam', 'ungetc', 'vfprintf', 'vfscanf', 'vprintf', 'vscanf',
            +            'vsprintf', 'vsscanf',
            +
            +            //stdlib.h
            +            'abort', 'abs', 'atexit', 'atof', 'atoi', 'atol', 'bsearch',
            +            'calloc', 'div', 'exit', 'free', 'getenv', 'itoa', 'labs', 'ldiv',
            +            'ltoa', 'malloc', 'qsort', 'rand', 'realloc', 'srand', 'strtod',
            +            'strtol', 'strtoul', 'system',
            +
            +            //string.h
            +            'memchr', 'memcmp', 'memcpy', 'memmove', 'memset', 'strcat',
            +            'strchr', 'strcmp', 'strcoll', 'strcpy', 'strcspn', 'strerror',
            +            'strlen', 'strncat', 'strncmp', 'strncpy', 'strpbrk', 'strrchr',
            +            'strspn', 'strstr', 'strtok', 'strxfrm',
            +
            +            //time.h
            +            'asctime', 'clock', 'ctime', 'difftime', 'gmtime', 'localtime',
            +            'mktime', 'strftime', 'time',
            +
            +            //wchar.h
            +            'btowc', 'fgetwc', 'fgetws', 'fputwc', 'fputws', 'fwide',
            +            'fwprintf', 'fwscanf', 'getwc', 'getwchar', 'mbrlen', 'mbrtowc',
            +            'mbsinit', 'mbsrtowcs', 'putwc', 'putwchar', 'swprintf', 'swscanf',
            +            'ungetwc', 'vfwprintf', 'vswprintf', 'vwprintf', 'wcrtomb',
            +            'wcscat', 'wcschr', 'wcscmp', 'wcscoll', 'wcscpy', 'wcscspn',
            +            'wcsftime', 'wcslen', 'wcsncat', 'wcsncmp', 'wcsncpy', 'wcspbrk',
            +            'wcsrchr', 'wcsrtombs', 'wcsspn', 'wcsstr', 'wcstod', 'wcstok',
            +            'wcstol', 'wcstoul', 'wcsxfrm', 'wctob', 'wmemchr', 'wmemcmp',
            +            'wmemcpy', 'wmemmove', 'wmemset', 'wprintf', 'wscanf',
            +
            +            //wctype.h
            +            'iswalnum', 'iswalpha', 'iswcntrl', 'iswctype', 'iswdigit',
            +            'iswgraph', 'iswlower', 'iswprint', 'iswpunct', 'iswspace',
            +            'iswupper', 'iswxdigit', 'towctrans', 'towlower', 'towupper',
            +            'wctrans', 'wctype'
            +            ),
            +        4 => array(
            +            'auto', 'char', 'const', 'double',  'float', 'int', 'long',
            +            'register', 'short', 'signed', 'sizeof', 'static', 'struct',
            +            'typedef', 'union', 'unsigned', 'void', 'volatile', 'wchar_t',
            +
            +            'int8', 'int16', 'int32', 'int64',
            +            'uint8', 'uint16', 'uint32', 'uint64',
            +
            +            'int_fast8_t', 'int_fast16_t', 'int_fast32_t', 'int_fast64_t',
            +            'uint_fast8_t', 'uint_fast16_t', 'uint_fast32_t', 'uint_fast64_t',
            +
            +            'int_least8_t', 'int_least16_t', 'int_least32_t', 'int_least64_t',
            +            'uint_least8_t', 'uint_least16_t', 'uint_least32_t', 'uint_least64_t',
            +
            +            'int8_t', 'int16_t', 'int32_t', 'int64_t',
            +            'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t',
            +
            +            'intmax_t', 'uintmax_t', 'intptr_t', 'uintptr_t',
            +            'size_t', 'off_t',
            +
            +            'upc_lock_t', 'shared', 'strict', 'relaxed', 'upc_blocksizeof',
            +            'upc_localsizeof', 'upc_elemsizeof'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '{', '}', '[', ']',
            +        '+', '-', '*', '/', '%',
            +        '=', '<', '>',
            +        '!', '^', '&', '|',
            +        '?', ':',
            +        ';', ','
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;',
            +            2 => 'color: #000000; font-weight: bold;',
            +            3 => 'color: #000066;',
            +            4 => 'color: #993333;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; font-style: italic;',
            +            2 => 'color: #339933;',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;',
            +            1 => 'color: #000099; font-weight: bold;',
            +            2 => 'color: #660099; font-weight: bold;',
            +            3 => 'color: #660099; font-weight: bold;',
            +            4 => 'color: #660099; font-weight: bold;',
            +            5 => 'color: #006699; font-weight: bold;',
            +            'HARD' => '',
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #0000dd;',
            +            GESHI_NUMBER_BIN_PREFIX_0B => 'color: #208080;',
            +            GESHI_NUMBER_OCT_PREFIX => 'color: #208080;',
            +            GESHI_NUMBER_HEX_PREFIX => 'color: #208080;',
            +            GESHI_NUMBER_FLT_SCI_SHORT => 'color:#800080;',
            +            GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;',
            +            GESHI_NUMBER_FLT_NONSCI_F => 'color:#800080;',
            +            GESHI_NUMBER_FLT_NONSCI => 'color:#800080;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #202020;',
            +            2 => 'color: #202020;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #339933;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => 'http://www.opengroup.org/onlinepubs/009695399/functions/{FNAMEL}.html',
            +        4 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.',
            +        2 => '::'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/urbi.php b/vendor/easybook/geshi/geshi/urbi.php
            new file mode 100644
            index 0000000000..c73e44404f
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/urbi.php
            @@ -0,0 +1,198 @@
            + 'Urbi',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(
            +        //Multiline-continued single-line comments
            +        1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m',
            +        //Multiline-continued preprocessor define
            +        2 => '/#(?:\\\\\\\\|\\\\\\n|.)*$/m',
            +        // Urbi warning.
            +        3 => "#\[[0-9a-f]{8}:warning\].*#",
            +        // Urbi message from echo.
            +        4 => '#\[[0-9a-f]{8}\] \*\*\*.*#',
            +        // Urbi error message.
            +        6 => '#\[[0-9a-f]{8}:error\].*#',
            +        // Urbi system message.
            +        5 => '#\[00.*\].*#',
            +        // Nested comment. Max depth 4.
            +        7 => '#\/\*(.|\n)*\/\*(.|\n)*\*\/(.|\n)*\*\/#',
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array(
            +        0 => '"',
            +        1 => '\'',
            +        ),
            +    // For Urbi, disable escape char is better.
            +    'ESCAPE_CHAR' => '\\',
            +    'ESCAPE_REGEXP' => array(
            +        //Simple Single Char Escapes
            +        1 => "#\\\\[abfnrtv\\\'\"?\n]#",
            +        //Hexadecimal Char Specs
            +        2 => "#\\\\x[\da-fA-F]{2}#",
            +        //Hexadecimal Char Specs
            +        3 => "#\\\\u[\da-fA-F]{4}#",
            +        //Hexadecimal Char Specs
            +        4 => "#\\\\U[\da-fA-F]{8}#",
            +        //Octal Char Specs
            +        5 => "#\\\\[0-7]{1,3}#",
            +        ),
            +    'NUMBERS' =>
            +        GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B |
            +        GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI |
            +        GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO,
            +    'KEYWORDS' => array(
            +        // Condition keywords.
            +        1 => array(
            +            'at', 'at;', 'at|', 'at&', 'at,', 'break', 'call', 'case', 'catch', 'continue',
            +            'do', 'else', 'every', 'every&', 'every,', 'every;', 'every|', 'for', 'for&',
            +            'for,', 'for;', 'foreach', 'for|', 'freezeif', 'goto', 'if', 'in', 'loop',
            +            'loop&', 'loop,', 'loop;', 'loop|', 'or_eq', 'stopif', 'switch', 'try',
            +            'waituntil', 'when', 'whenever', 'while', 'while&', 'while,', 'while;',
            +            'while|', 'throw', 'onleave', 'watch', 'return', 'and_eq', 'default', 'finally',
            +            'timeout', 'xor_eq'
            +            ),
            +        // Type.
            +        2 => array(
            +            'virtual', 'using', 'namespace', 'inline', 'protected', 'private', 'public',
            +            'typename', 'typeid', 'class', 'const_cast', 'dynamic_cast', 'friend',
            +            'template', 'enum', 'static_cast', 'reinterpret_cast', 'mutable', 'explicit'
            +            ),
            +        // Standard function.
            +        3 => array(
            +            'this', 'sizeof', 'delete', 'assert', 'isdef', 'compl', 'detach',
            +            'disown', '__HERE__', 'asm'
            +            ),
            +        // Type.
            +        4 => array(
            +            'char', 'const', 'double', 'int', 'long', 'typedef', 'union',
            +            'unsigned', 'var', 'short', 'wchar_t', 'volatile', 'signed', 'bool',
            +            'float', 'struct', 'auto', 'register', 'static', 'extern', 'function',
            +            'export', 'external', 'internal', 'closure', 'BIN'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        0 => array('(', ')', '{', '}', '[', ']'),
            +        1 => array('<', '>','=', '!=', '==', '==='),
            +        2 => array('+', '-', '*', '/', '%', 'bitand', 'bitor', 'xor'),
            +        3 => array('!', '^', '&', '|'),
            +        4 => array('?', ':', ';')
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0000ff;',
            +            2 => 'color: #0000ff;',
            +            3 => 'color: #0000dd;',
            +            4 => 'color: #0000ff;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666;',
            +            2 => 'color: #339900;',
            +            3 => 'color: #d46b0f;',
            +            4 => 'color: #20b537;',
            +            5 => 'color: #73776f;',
            +            6 => 'color: #a71616;',
            +            7 => 'color: #666666;',
            +            'MULTI' => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #ff0000;',
            +            1 => 'color: #ff0000;',
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #7a0874; font-weight: bold;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;',
            +            1 => 'color: #007788;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #0000dd;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #007788;',
            +            2 => 'color: #007788;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #008000;',
            +            1 => 'color: #0000f8;',
            +            2 => 'color: #000040;',
            +            3 => 'color: #000040; font-weight: bold;',
            +            4 => 'color: #008080;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #0000dd',
            +            1 => 'color: #0000dd;',
            +            2 => 'color: #0000dd;',
            +            3 => 'color: #0000dd;',
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.',
            +        2 => '::',
            +        // FIXME: add -> splitter.
            +        ),
            +    'REGEXPS' => array(
            +        0 => '0x[0-9a-fA-F]([0-9a-fA-F_]*[0-9a-fA-F])*',
            +        1 => '[0-9]([0-9_]*[0-9])*(e|E)(-|\+)?[0-9]([0-9_]*[0-9])*',
            +        2 => '[0-9]([0-9_]*[0-9])*(min|s|ms|h|d)',
            +        3 => '[0-9]+_([0-9_])*[0-9]',
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4,
            +);
            diff --git a/vendor/easybook/geshi/geshi/uscript.php b/vendor/easybook/geshi/geshi/uscript.php
            new file mode 100644
            index 0000000000..03b1d48a6f
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/uscript.php
            @@ -0,0 +1,297 @@
            + 'Unreal Script',
            +    'COMMENT_SINGLE' => array(
            +            1 => '//',
            +            2 => '#'
            +            ),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(        //declaration keywords
            +            'simulated', 'state', 'class', 'function', 'event', 'var', 'local',
            +            'ignores', 'globalconfig', 'config', 'abstract', 'nativereplication', 'native',
            +            'auto', 'coerce', 'const', 'default',
            +            'defaultproperties',
            +            'enum', 'extends', 'expands', 'final', 'guid', 'latent', 'localized',
            +            'new', 'noexport', 'operator', 'preoperator', 'optional', 'out',
            +            'private', 'public', 'protected', 'reliable', 'replication',
            +            'singular', 'static', 'struct', 'transient', 'unreliable',
            +            'hidedropdown', 'cacheexempt', 'exec', 'delegate', 'import', 'placeable', 'exportstructs'
            +            ),
            +        2 => array(        //control flow keywords
            +            'for', 'while', 'do', 'if', 'else', 'switch', 'case', 'return', 'break', 'continue',
            +            'begin', 'loop', 'assert',
            +            'foreach', 'AllActors', 'DynamicActors', 'ChildActors', 'BasedActors', 'TouchingActors',
            +            'TraceActors', 'RadiusActors', 'VisibleActors', 'CollidingActors', 'VisibleCollidingActors'
            +            ),
            +        3 => array(        //global (object) functions
            +            'log', 'warn', 'rot', 'vect', 'Rand', 'Min', 'Max', 'Clamp', 'Abs', 'Sin', 'ASin',
            +            'Cos', 'ACos', 'Tan', 'ATan', 'Exp', 'Loge', 'Sqrt', 'Square', 'FRand', 'FMin', 'FMax', 'FClamp',
            +            'Lerp', 'Smerp', 'Ceil', 'Round', 'VSize', 'Normal', 'Invert', 'VRand', 'MirrorVectorByNormal',
            +            'GetAxes', 'GetUnAxes', 'RotRand', 'OrthoRotation', 'Normalize', 'ClockwiseFrom',
            +            'Len', 'InStr', 'Mid', 'Left', 'Right', 'Caps', 'Chr', 'Asc', 'Locs',
            +            'Divide', 'Split', 'StrCmp', 'Repl', 'Eval',
            +            'InterpCurveEval', 'InterpCurveGetOutputRange', 'InterpCurveGetInputDomain',
            +            'QuatProduct', 'QuatInvert', 'QuatRotateVector', 'QuatFindBetween', 'QuatFromAxisAndAngle',
            +            'QuatFromRotator', 'QuatToRotator', 'QuatSlerp',
            +            'Localize', 'GotoState', 'IsInState', 'GetStateName',
            +            'ClassIsChildOf', 'IsA', 'Enable', 'Disable',
            +            'GetPropertyText', 'SetPropertyText', 'GetEnum', 'DynamicLoadObject', 'FindObject',
            +            'SaveConfig', 'ClearConfig', 'StaticSaveConfig', 'ResetConfig', 'StaticClearConfig',
            +            'GetPerObjectNames', 'RandRange', 'StopWatch', 'IsOnConsole', 'IsSoaking',
            +            'PlatformIsMacOS', 'PlatformIsUnix', 'PlatformIsWindows', 'PlatformIs64Bit',
            +            'BeginState', 'EndState', 'Created', 'AllObjects', 'GetReferencers', 'GetItemName',
            +            'ReplaceText', 'EatStr'
            +            ),
            +        4 => array(        //common almost-global (actor) functions
            +            'ClientMessage', 'ConsoleCommand', 'CopyObjectToClipboard', 'TextToSpeech',
            +            'Error', 'Sleep', 'SetCollision', 'SetCollisionSize', 'SetDrawScale', 'SetDrawScale3D',
            +            'SetStaticMesh', 'SetDrawType', 'Move', 'SetLocation', 'SetRotation',
            +            'SetRelativeLocation', 'SetRelativeRotation', 'MoveSmooth', 'AutonomousPhysics',
            +            'SetBase', 'SetOwner', 'IsJoinedTo', 'GetMeshName', 'PlayAnim', 'LoopAnim', 'TweenAnim',
            +            'IsAnimating', 'FinishAnim', 'HasAnim', 'StopAnimating', 'FreezeFrameAt', 'SetAnimFrame',
            +            'IsTweening', 'AnimStopLooping', 'AnimEnd', 'LinkSkelAnim', 'LinkMesh', 'BoneRefresh',
            +            'GetBoneCoords', 'GetBoneRotation', 'GetRootLocation', 'GetRootRotation', 'AttachToBone',
            +            'DetachFromBone', 'SetBoneScale', 'UpdateURL', 'GetURLOption', 'SetPhysics', 'KAddImpulse',
            +            'KImpact', 'KApplyForce', 'Clock', 'UnClock', 'Destroyed', 'GainedChild', 'LostChild',
            +            'Tick', 'PostNetReceive', 'ClientTrigger', 'Trigger', 'UnTrigger', 'BeginEvent', 'EndEvent',
            +            'Timer', 'HitWall', 'Falling', 'Landed', 'ZoneChange', 'PhysicsVolumeChange', 'Touch',
            +            'PostTouch', 'UnTouch', 'Bump', 'BaseChange', 'Attach', 'Detach', 'SpecialHandling',
            +            'EncroachingOn', 'EncroachedBy', 'RanInto', 'FinishedInterpolation', 'EndedRotation',
            +            'UsedBy', 'FellOutOfWorld', 'KilledBy', 'TakeDamage', 'HealDamage', 'Trace', 'FastTrace',
            +            'TraceThisActor', 'spawn', 'Destroy', 'TornOff', 'SetTimer', 'PlaySound', 'PlayOwnedSound',
            +            'GetSoundDuration', 'MakeNoise', 'BeginPlay', 'GetAllInt', 'RenderOverlays', 'RenderTexture',
            +            'PreBeginPlay', 'PostBeginPlay', 'PostNetBeginPlay', 'HurtRadius', 'Reset', 'Crash'
            +            ),
            +        5 => array(        //data types
            +            'none', 'null',
            +            'float', 'int', 'bool', 'byte', 'char', 'double', 'iterator', 'name', 'string',    //primitive
            +            'plane', 'rotator', 'vector', 'spline',    'coords', 'Quat', 'Range', 'RangeVector', //structs
            +            'Scale', 'Color', 'Box', 'IntBox', 'FloatBox', 'BoundingVolume', 'Matrix', 'InterpCurvePoint',
            +            'InterpCurve', 'CompressedPosition', 'TMultiMap', 'PointRegion',
            +            'KRigidBodyState', 'KSimParams', 'AnimRep', 'FireProperties',
            +            'lodmesh', 'skeletalmesh', 'mesh', 'StaticMesh', 'MeshInstance',    //3d resources
            +            'sound',    //sound resources
            +            'material', 'texture', 'combiner', 'modifier', 'ColorModifier', 'FinalBlend',    //2d resources
            +            'MaterialSequence', 'MaterialSwitch', 'OpacityModifier', 'TexModifier', 'TexEnvMap',
            +            'TexCoordSource', 'TexMatrix', 'TexOscillator', 'TexPanner', 'TexRotator', 'TexScaler',
            +            'RenderedMaterial', 'BitmapMaterial', 'ScriptedTexture', 'ShadowBitmapMaterial', 'Cubemap',
            +            'FractalTexture', 'FireTexture', 'IceTexture', 'WaterTexture', 'FluidTexture', 'WaveTexture',
            +            'WetTexture', 'ConstantMaterial', 'ConstantColor', 'FadeColor', 'ParticleMaterial',
            +            'ProjectorMaterial', 'Shader', 'TerrainMaterial', 'VertexColor'
            +            ),
            +        6 => array(        //misc keywords
            +            'false', 'true', 'self', 'super', 'MaxInt', 'Pi'
            +            ),
            +        7 => array(        //common actor enums & variables
            +            'DT_None', 'DT_Sprite', 'DT_Mesh', 'DT_Brush', 'DT_RopeSprite',
            +            'DT_VerticalSprite', 'DT_TerraForm', 'DT_SpriteAnimOnce', 'DT_StaticMesh', 'DT_DrawType',
            +            'DT_Particle', 'DT_AntiPortal', 'DT_FluidSurface',
            +            'PHYS_None', 'PHYS_Walking', 'PHYS_Falling', 'PHYS_Swimming', 'PHYS_Flying',
            +            'PHYS_Rotating', 'PHYS_Projectile', 'PHYS_Interpolating', 'PHYS_MovingBrush', 'PHYS_Spider',
            +            'PHYS_Trailer', 'PHYS_Ladder', 'PHYS_RootMotion', 'PHYS_Karma', 'PHYS_KarmaRagDoll',
            +            'PHYS_Hovering', 'PHYS_CinMotion',
            +            'ROLE_None', 'ROLE_DumbProxy', 'ROLE_SimulatedProxy',
            +            'ROLE_AutonomousProxy', 'ROLE_Authority',
            +            'STY_None', 'STY_Normal', 'STY_Masked', 'STY_Translucent', 'STY_Modulated', 'STY_Alpha',
            +            'STY_Additive', 'STY_Subtractive', 'STY_Particle', 'STY_AlphaZ',
            +            'OCCLUSION_None', 'OCCLUSION_BSP', 'OCCLUSION_Default', 'OCCLUSION_StaticMeshes',
            +            'SLOT_None', 'SLOT_Misc', 'SLOT_Pain', 'SLOT_Interact', 'SLOT_Ambient', 'SLOT_Talk',
            +            'SLOT_Interface', 'MTRAN_None', 'MTRAN_Instant', 'MTRAN_Segue', 'MTRAN_Fade',
            +            'MTRAN_FastFade', 'MTRAN_SlowFade',
            +
            +            'DrawType', 'Physics', 'Owner', 'Base', 'Level', 'Game', 'Instigator', 'RemoteRole', 'Role',
            +            'LifeSpan', 'Tag', 'Event', 'Location', 'Rotation', 'Velocity', 'Acceleration',
            +            'RelativeLocation', 'RelativeRotation', 'DrawScale', 'DrawScale3D', 'Skins', 'Style',
            +            'SoundVolume', 'SoundPitch', 'SoundRadius', 'TransientSoundVolume', 'TransientSoundRadius',
            +            'CollisionRadius', 'CollisionHeight', 'Mass', 'Buoyancy', 'RotationRate', 'DesiredRotation'
            +            ),
            +        8 => array(        //common non-actor uscript classes
            +            'Object',
            +            'CacheManager', 'CameraEffect', 'Canvas', 'CheatManager', 'Commandlet', 'DecoText', 'GUI',
            +            'InteractionMaster', 'Interactions', 'Interaction', 'KarmaParamsCollision', 'KarmaParamsRBFull',
            +            'KarmaParamsSkel', 'KarmaParams', 'LevelSummary', 'Locale', 'Manifest', 'MaterialFactory',
            +            'MeshObject', 'ObjectPool', 'Pallete',
            +            'ParticleEmitter', 'MeshEmitter', 'BeamEmitter', 'SpriteEmitter', 'SparkEmitter', 'TrailEmitter',
            +            'Player', 'PlayerInput', 'PlayInfo', 'ReachSpec', 'Resource', 'LatentScriptedAction', 'ScriptedAction',
            +            'speciesType', 'StreamBase', 'Stream', 'EditorEngine', 'Engine', 'Time', 'WeaponFire',
            +            'WebApplication', 'WebRequest', 'WebResponse', 'WebSkin', 'xPawnGibGroup', 'xPawnSoundGroup',
            +            'xUtil'
            +            ),
            +        9 => array(        //common actor-based uscript classes
            +            'Actor',
            +            'Controller', 'AIController', 'ScriptedController', 'Bot', 'xBot',
            +            'PlayerController', 'UnrealPlayer', 'xPlayer',
            +            'DamageType', 'WeaponDamageType', 'Effects', 'Emitter', 'NetworkEmitter',
            +            'Gib', 'HUD', 'HudBase', 'Info', 'FluidSurfaceInfo', 'Combo',
            +            'GameInfo', 'UnrealMPGameInfo', 'DeathMatch', 'TeamGame', 'CTFGame',
            +            'xCTFGame', 'xBombingRun', 'xDoubleDom', 'xTeamGame',
            +            'ASGameInfo', 'Invasion', 'ONSOnslaughtGame', 'xDeathmatch',
            +            'Mutator', 'Inventory', 'Ammunition', 'KeyInventory', 'Powerups', 'Armor', 'Weapon',
            +            'InventoryAttachment', 'WeaponAttachment',
            +            'KActor', 'KConstraint', 'KBSJoint', 'KCarWheelJoint', 'KConeLimit', 'KHinge', 'KTire',
            +            'KVehicleFactory', 'Keypoint', 'AIScript', 'ScriptedSequence', 'ScriptedTrigger',
            +            'AmbientSound', 'Light', 'SpotLight', 'SunLight', 'TriggerLight',
            +            'MeshEffect', 'NavigationPoint', 'GameObjective', 'DestroyableObjective',
            +            'PathNode', 'FlyingPathNode', 'RoadPathNode', 'InventorySpot', 'PlayerStart',
            +            'Pawn', 'Vehicle', 'UnrealPawn', 'xPawn', 'Monster', 'ASVehicle', 'KVehicle', 'KCar',
            +            'ONSWeaponPawn', 'SVehicle', 'ONSVehicle', 'ONSChopperCraft', 'ONSHoverCraft',
            +            'ONSPlaneCraft', 'ONSTreadCraft', 'ONSWheeledCraft',
            +            'Pickup', 'Ammo', 'UTAmmoPickup', 'ArmorPickup', 'KeyPickup', 'TournamentPickup',
            +            'Projectile', 'Projector', 'DynamicProjector', 'ShadowProjector', 'xScorch',
            +            'xEmitter', 'xPickupBase', 'xProcMesh', 'xWeatherEffect', 'PhysicsVolume', 'Volume'
            +            ),
            +        10 => array(    //symbol-like operators
            +            'dot','cross'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '+','-','=','/','*','-','%','>','<','&','^','!','|','`','(',')','[',']','{','}',
            +        '<<','>>','$','@'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        5 => false,
            +        6 => false,
            +        7 => false,
            +        8 => false,
            +        9 => false,
            +        10 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0000FF;',
            +            2 => 'color: #0000FF;',
            +            3 => 'color: #0066AA;',
            +            4 => 'color: #0088FF;',
            +            5 => 'color: #E000E0;',
            +            6 => 'color: #900000;',
            +            7 => 'color: #888800;',
            +            8 => 'color: #AA6600;',
            +            9 => 'color: #FF8800;',
            +            10 => 'color: #0000FF;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #008080; font-style: italic;',
            +            2 => 'color: #000000; font-weight: bold;',
            +            'MULTI' => 'color: #008080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => ''
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #999999;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #FF0000;'
            +            ),
            +        'METHODS' => array(
            +            0 => 'color: #006600;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #669966;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #E000E0;',
            +            1 => 'color: #E000E0;'
            +            ),
            +        'SCRIPT' => array(
            +            0 => ''
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => '',
            +        6 => '',
            +        7 => '',
            +        8 => 'http://wiki.beyondunreal.com/wiki?search={FNAME}',
            +        9 => 'http://wiki.beyondunreal.com/wiki?search={FNAME}',
            +        10 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array('.'),
            +    'REGEXPS' => array(            //handle template-style variable definitions
            +        0 => array(
            +            GESHI_SEARCH => '(class\s*)<(\s*(\w+)\s*)>',
            +            GESHI_REPLACE => "\${1}",
            +            GESHI_MODIFIERS => 'i',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => "< \${3} >"
            +            ),
            +        1 => array(
            +            GESHI_SEARCH => '(array\s*)<(\s*(\w+)\s*)>',
            +            GESHI_REPLACE => "\${1}",
            +            GESHI_MODIFIERS => 'i',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => "< \${3} >"
            +            )
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            10 => array(
            +                'DISALLOWED_BEFORE' => '(?)'
            +                )
            +            )
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/vala.php b/vendor/easybook/geshi/geshi/vala.php
            new file mode 100644
            index 0000000000..28f1534270
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/vala.php
            @@ -0,0 +1,149 @@
            + 'Vala',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(
            +        //Using and Namespace directives (basic support)
            +        //Please note that the alias syntax for using is not supported
            +        3 => '/(?:(?<=using[\\n\\s])|(?<=namespace[\\n\\s]))[\\n\\s]*([a-zA-Z0-9_]+\\.)*[a-zA-Z0-9_]+[\n\s]*(?=[;=])/i'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'HARDQUOTE' => array('"""'),
            +    'HARDESCAPE' => array('"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'as', 'abstract', 'base', 'break', 'case', 'catch', 'const',
            +            'construct', 'continue', 'default', 'delete', 'dynamic', 'do',
            +            'else', 'ensures', 'extern', 'false', 'finally', 'for', 'foreach',
            +            'get', 'if', 'in', 'inline', 'internal', 'lock', 'namespace',
            +            'null', 'out', 'override', 'private', 'protected', 'public', 'ref',
            +            'requires', 'return', 'set', 'static', 'switch', 'this', 'throw',
            +            'throws', 'true', 'try', 'using', 'value', 'var', 'virtual',
            +            'volatile', 'void', 'yield', 'yields', 'while'
            +            ),
            +        2 => array(
            +            '#elif', '#endif', '#else', '#if'
            +            ),
            +        3 => array(
            +            'is', 'new', 'owned', 'sizeof', 'typeof', 'unchecked', 'unowned', 'weak'
            +            ),
            +        4 => array(
            +            'bool', 'char', 'class', 'delegate', 'double', 'enum',
            +            'errordomain', 'float', 'int', 'int8', 'int16', 'int32', 'int64',
            +            'interface', 'long', 'short', 'signal', 'size_t', 'ssize_t',
            +            'string', 'struct', 'uchar', 'uint', 'uint8', 'uint16', 'uint32',
            +            'ulong', 'unichar', 'ushort'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '+', '-', '*', '?', '=', '/', '%', '&', '>', '<', '^', '!', ':', ';',
            +        '(', ')', '{', '}', '[', ']', '|'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true,
            +        4 => true,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0600FF;',
            +            2 => 'color: #FF8000; font-weight: bold;',
            +            3 => 'color: #008000;',
            +            4 => 'color: #FF0000;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #008080; font-style: italic;',
            +            3 => 'color: #008080;',
            +            'MULTI' => 'color: #008080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #008080; font-weight: bold;',
            +            'HARD' => 'color: #008080; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #666666;',
            +            'HARD' => 'color: #666666;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #FF0000;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #0000FF;',
            +            2 => 'color: #0000FF;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #008000;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4,
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            'DISALLOWED_BEFORE' => "(?|^])",
            +            'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_<\|%\\-])"
            +        )
            +    )
            +);
            diff --git a/vendor/easybook/geshi/geshi/vb.php b/vendor/easybook/geshi/geshi/vb.php
            new file mode 100644
            index 0000000000..d2f0dd71b5
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/vb.php
            @@ -0,0 +1,156 @@
            + 'Visual Basic',
            +    'COMMENT_SINGLE' => array(),
            +    'COMMENT_MULTI' => array(),
            +    'COMMENT_REGEXP' => array(
            +        // Comments (either single or multiline with _
            +        1 => '/\'.*(? GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'Binary', 'Boolean', 'Byte', 'Currency', 'Date', 'Decimal', 'Double',
            +            'String', 'Enum', 'Integer', 'Long', 'Object', 'Single', 'Variant'
            +            ),
            +        2 => array(
            +            'CreateObject', 'GetObject', 'New', 'Option', 'Function',
            +            'Call', 'Private', 'Public', 'Sub', 'Explicit', 'Compare', 'Exit'
            +            ),
            +        3 => array(
            +            'And', 'Case', 'Do', 'Each', 'Else', 'ElseIf', 'For',
            +            'Goto', 'If', 'Is', 'Loop', 'Next', 'Not', 'Or', 'Select', 'Step',
            +            'Then', 'To', 'Until', 'While', 'With', 'Xor', 'WithEvents',
            +            'DoEvents', 'Close', 'Like', 'In', 'End'
            +            ),
            +        4 => array(
            +            'As', 'Dim', 'Get', 'Set', 'ReDim', 'Error',
            +            'Resume', 'Declare', 'Let', 'ByRef', 'ByVal',
            +            'Optional', 'Property', 'Control', 'UBound', 'Mod',
            +            'GoSub', 'Implements', 'Input', 'LBound', 'Static', 'Stop',
            +            'Type', 'TypeOf', 'On', 'Open', 'Output', 'ParamArray',
            +            'Preserve', 'Print', 'RaiseEvent', 'Random', 'Line'
            +            ),
            +        5 => array(
            +            'Nothing', 'False', 'True', 'Null', 'Empty'
            +            ),
            +        6 => array(
            +            'ErrorHandler','ExitProc', 'PublishReport'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        5 => false,
            +        6 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #F660AB; font-weight: bold;',
            +            2 => 'color: #E56717; font-weight: bold;',
            +            3 => 'color: #8D38C9; font-weight: bold;',
            +            4 => 'color: #151B8D; font-weight: bold;',
            +            5 => 'color: #00C2FF; font-weight: bold;',
            +            6 => 'color: #3EA99F; font-weight: bold;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #008000;'
            +            ),
            +        'BRACKETS' => array(
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #800000;'
            +            ),
            +        'NUMBERS' => array(
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #800000; font-weight: bold;'
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => '',
            +        6 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'PARSER_CONTROL' => array(
            +        'ENABLE_FLAGS' => array(
            +            'BRACKETS' => GESHI_NEVER,
            +            'SYMBOLS' => GESHI_NEVER,
            +            'NUMBERS' => GESHI_NEVER
            +            )
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/vbnet.php b/vendor/easybook/geshi/geshi/vbnet.php
            new file mode 100644
            index 0000000000..862caa7208
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/vbnet.php
            @@ -0,0 +1,181 @@
            + 'vb.net',
            +    'COMMENT_SINGLE' => array(1 => "'"),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        //Keywords
            +        1 => array(
            +            'AddHandler', 'AddressOf', 'Alias', 'And', 'AndAlso', 'As', 'ByRef', 'ByVal',
            +            'Call', 'Case', 'Catch', 'Char', 'Class', 'Const', 'Continue',
            +            'Declare', 'Default',
            +            'Delegate', 'Dim', 'DirectCast', 'Do', 'Each', 'Else', 'ElseIf', 'End', 'EndIf',
            +            'Enum', 'Erase', 'Error', 'Event', 'Exit', 'False', 'Finally', 'For', 'Friend', 'Function',
            +            'Get', 'GetType', 'GetXMLNamespace', 'Global', 'GoSub', 'GoTo', 'Handles', 'If', 'Implements',
            +            'Imports', 'In', 'Inherits', 'Interface', 'Is', 'IsNot', 'Let', 'Lib', 'Like', 'Loop', 'Me',
            +            'Mod', 'Module', 'Module Statement', 'MustInherit', 'MustOverride', 'MyBase', 'MyClass', 'Namespace',
            +            'Narrowing', 'New', 'Next', 'Not', 'Nothing', 'NotInheritable', 'NotOverridable', 'Of', 'On',
            +            'Operator', 'Option', 'Optional', 'Or', 'OrElse', 'Out', 'Overloads', 'Overridable', 'Overrides',
            +            'ParamArray', 'Partial', 'Private', 'Property', 'Protected', 'Public', 'RaiseEvent', 'ReadOnly', 'ReDim',
            +            'REM', 'RemoveHandler', 'Resume', 'Return', 'Select','Set', 'Shadows', 'Shared', 'Static', 'Step',
            +            'Stop', 'Structure', 'Sub', 'SyncLock', 'Then', 'Throw', 'To', 'True', 'Try', 'TryCast', 'TypeOf',
            +            'Using', 'Wend', 'When', 'While', 'Widening', 'With', 'WithEvents', 'WriteOnly', 'Xor'
            +            ),
            +        //Data Types
            +        2 => array(
            +            'Boolean', 'Byte', 'Date', 'Decimal', 'Double', 'Integer', 'Long', 'Object',
            +            'SByte', 'Short', 'Single', 'String', 'UInteger', 'ULong', 'UShort'
            +            ),
            +        //Compiler Directives
            +        3 => array(
            +            '#Const', '#Else', '#ElseIf', '#End', '#If'
            +            ),
            +        //Constants
            +        4 => array(
            +            'CBool', 'CByte', 'CChar', 'CChr', 'CDate', 'CDbl', 'CDec','CInt', 'CLng', 'CLng8', 'CObj', 'CSByte', 'CShort',
            +            'CSng', 'CStr', 'CType', 'CUInt', 'CULng', 'CUShort'
            +            ),
            +        //Linq
            +        5 => array(
            +            'By','From','Group','Where'
            +            ),
            +        //Built-in functions
            +        7 => array(
            +            'ABS', 'ARRAY', 'ASC', 'ASCB', 'ASCW', 'CALLBYNAME', 'CHOOSE', 'CHR', 'CHR$', 'CHRB', 'CHRB$', 'CHRW',
            +            'CLOSE', 'COMMAND', 'COMMAND$', 'CONVERSION',
            +            'COS', 'CREATEOBJECT', 'CURDIR', 'CVDATE', 'DATEADD',
            +            'DATEDIFF', 'DATEPART', 'DATESERIAL', 'DATEVALUE', 'DAY', 'DDB', 'DIR', 'DIR$',
            +            'EOF', 'ERROR$', 'EXP', 'FILEATTR', 'FILECOPY', 'FILEDATATIME', 'FILELEN', 'FILTER',
            +            'FIX', 'FORMAT', 'FORMAT$', 'FORMATCURRENCY', 'FORMATDATETIME', 'FORMATNUMBER',
            +            'FORMATPERCENT', 'FREEFILE', 'FV', 'GETALLSETTINGS', 'GETATTRGETOBJECT', 'GETSETTING',
            +            'HEX', 'HEX$', 'HOUR', 'IIF', 'IMESTATUS', 'INPUT$', 'INPUTB', 'INPUTB$', 'INPUTBOX',
            +            'INSTR', 'INSTRB', 'INSTRREV', 'INT', 'IPMT', 'IRR', 'ISARRAY', 'ISDATE', 'ISEMPTY',
            +            'ISERROR', 'ISNULL', 'ISNUMERIC', 'ISOBJECT', 'JOIN', 'LBOUND', 'LCASE', 'LCASE$',
            +            'LEFT', 'LEFT$', 'LEFTB', 'LEFTB$', 'LENB', 'LINEINPUT', 'LOC', 'LOF', 'LOG', 'LTRIM',
            +            'LTRIM$', 'MID$', 'MIDB', 'MIDB$', 'MINUTE', 'MIRR', 'MKDIR', 'MONTH', 'MONTHNAME',
            +            'MSGBOX', 'NOW', 'NPER', 'NPV', 'OCT', 'OCT$', 'PARTITION', 'PMT', 'PPMT', 'PV',
            +            'RATE', 'REPLACE', 'RIGHT', 'RIGHT$', 'RIGHTB', 'RIGHTB$', 'RMDIR', 'RND', 'RTRIM',
            +            'RTRIM$', 'SECOND', 'SIN', 'SLN', 'SPACE', 'SPACE$', 'SPC', 'SPLIT', 'SQRT', 'STR', 'STR$',
            +            'STRCOMP', 'STRCONV', 'STRING$', 'STRREVERSE', 'SYD', 'TAB', 'TAN', 'TIMEOFDAY',
            +            'TIMER', 'TIMESERIAL', 'TIMEVALUE', 'TODAY', 'TRIM', 'TRIM$', 'TYPENAME', 'UBOUND',
            +            'UCASE', 'UCASE$', 'VAL', 'WEEKDAY', 'WEEKDAYNAME', 'YEAR'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '+', '-', '*', '?', '=', '/', '%', '&', '>', '<', '^', '!',
            +        '(', ')', '{', '}', '.'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        5 => false,
            +        7 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0000FF; font-weight: bold;',  //Keywords
            +            2 => 'color: #6a5acd;',                     //primitive Data Types
            +            3 => 'color: #6a5acd; font-weight: bold;',  //preprocessor-commands
            +            4 => 'color: #cd6a5a;',                     //Constants
            +            5 => 'color: #cd6a5a; font-weight: bold;',  //LinQ
            +            7 => 'color: #000066;',                     //Built-in functions
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #008000; font-style: italic;',
            +            'MULTI' => 'color: #008000; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #008080; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #a52a2a; back-color: #fffacd;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #a52a2a; back-color: #fffacd;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #000000;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => 'http://www.google.com/search?q={FNAMEU}+site:msdn.microsoft.com',
            +        4 => '',
            +        5 => '',
            +        7 => 'http://www.google.com/search?q={FNAMEU}+site:msdn.microsoft.com'
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 =>'.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            7 => array(
            +                'DISALLOWED_AFTER' => '(?!\w)(?=\s*\()'
            +                )
            +            )
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/vbscript.php b/vendor/easybook/geshi/geshi/vbscript.php
            new file mode 100644
            index 0000000000..6db3bbd3f3
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/vbscript.php
            @@ -0,0 +1,153 @@
            + 'VBScript',
            +    'COMMENT_SINGLE' => array(),
            +    'COMMENT_MULTI' => array(),
            +    'COMMENT_REGEXP' => array(
            +        // Comments (either single or multiline with _
            +        1 => '/\'.*(? GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'Empty', 'Nothing', 'Null', 'vbArray', 'vbBoolean', 'vbByte',
            +            'vbCr', 'vbCrLf', 'vbCurrency', 'vbDate', 'vbDouble', 'vbEmpty',
            +            'vbError', 'vbFirstFourDays', 'vbFirstFullWeek', 'vbFirstJan1',
            +            'vbFormFeed', 'vbFriday', 'vbInteger', 'vbLf', 'vbLong', 'vbMonday',
            +            'vbNewLine', 'vbNull', 'vbNullChar', 'vbNullString', 'vbObject',
            +            'vbSaturday', 'vbSingle', 'vbString', 'vbSunday', 'vbTab',
            +            'vbThursday', 'vbTuesday', 'vbUseSystem', 'vbUseSystemDayOfWeek',
            +            'vbVariant', 'vbWednesday', 'FALSE', 'TRUE'
            +            ),
            +        2 => array(
            +            'bs', 'Array', 'Asc', 'Atn', 'CBool', 'CByte', 'CDate', 'CDbl', 'Chr',
            +            'CInt', 'CLng', 'Cos', 'CreateObject', 'CSng', 'CStr', 'Date', 'DateAdd',
            +            'DateDiff', 'DatePart', 'DateSerial', 'DateValue', 'Day', 'Eval', 'Exp',
            +            'Filter', 'Fix', 'FormatDateTime', 'FormatNumber', 'FormatPercent',
            +            'GetObject', 'Hex', 'Hour', 'InputBox', 'InStr', 'InstrRev', 'Int',
            +            'IsArray', 'IsDate', 'IsEmpty', 'IsNull', 'IsNumeric', 'IsObject', 'Join',
            +            'LBound', 'LCase', 'Left', 'Len', 'Log', 'LTrim', 'Mid', 'Minute', 'Month',
            +            'MonthName', 'MsgBox', 'Now', 'Oct', 'Replace', 'RGB', 'Right', 'Rnd',
            +            'Round', 'RTrim', 'ScriptEngine', 'ScriptEngineBuildVersion',
            +            'ScriptEngineMajorVersion', 'ScriptEngineMinorVersion', 'Second',
            +            'Sgn', 'Sin', 'Space', 'Split', 'Sqr', 'StrComp', 'String', 'StrReverse',
            +            'Tan', 'Time', 'TimeSerial', 'TimeValue', 'Trim', 'TypeName', 'UBound',
            +            'UCase', 'VarType', 'Weekday', 'WeekdayName', 'Year'
            +            ),
            +        3 => array(
            +            'Call', 'Case', 'Const', 'Dim', 'Do', 'Each', 'Else', 'End', 'Erase',
            +            'Execute', 'Exit', 'For', 'Function', 'Gosub', 'Goto', 'If', 'Loop',
            +            'Next', 'On Error', 'Option Explicit', 'Private', 'Public',
            +            'Randomize', 'ReDim', 'Rem', 'Resume', 'Select', 'Set', 'Sub', 'Then',
            +            'Wend', 'While', 'With', 'In', 'To', 'Step'
            +            ),
            +        4 => array(
            +            'And', 'Eqv', 'Imp', 'Is', 'Mod', 'Not', 'Or', 'Xor'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '-', '&', '*', '/', '\\', '^', '+', '<', '<=', '<>', '=', '>', '>='
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #F660AB; font-weight: bold;',
            +            2 => 'color: #E56717; font-weight: bold;',
            +            3 => 'color: #8D38C9; font-weight: bold;',
            +            4 => 'color: #151B8D; font-weight: bold;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #008000;'
            +            ),
            +        'BRACKETS' => array(
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #800000;'
            +            ),
            +        'NUMBERS' => array(
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #800000; font-weight: bold;'
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            'SPACE_AS_WHITESPACE' => true
            +            ),
            +        'ENABLE_FLAGS' => array(
            +            'BRACKETS' => GESHI_NEVER
            +            )
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/vedit.php b/vendor/easybook/geshi/geshi/vedit.php
            new file mode 100644
            index 0000000000..c1375eb009
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/vedit.php
            @@ -0,0 +1,102 @@
            + 'Vedit macro language',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"', '\''),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'break', 'breakout', 'break_out', 'continue', 'do', 'else', 'for',
            +            'goto', 'if', 'repeat', 'return', 'while'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        1 => array(
            +            '(', ')', '{', '}', '[', ']', '+', '-', '*', '/', '%',
            +            '=', '<', '>', '!', '^', '&', '|', '?', ':', ';', ','
            +            )
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; font-style: italic;',
            +            'MULTI' => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #0000ff;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;',
            +            ),
            +        'METHODS' => array(
            +            0 => 'color: #004000;'
            +            ),
            +        'SYMBOLS' => array(
            +            1 => 'color: #339933;'
            +            ),
            +        'REGEXPS' => array(),
            +        'SCRIPT' => array()
            +        ),
            +    'URLS' => array(1 => ''),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(),
            +    'REGEXPS' => array(),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(),
            +    'HIGHLIGHT_STRICT_BLOCK' => array()
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/verilog.php b/vendor/easybook/geshi/geshi/verilog.php
            new file mode 100644
            index 0000000000..d6ec086158
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/verilog.php
            @@ -0,0 +1,193 @@
            +
            + * Copyright: (C) 2008 Günter Dannoritzer
            + * Release Version: 1.0.8.11
            + * Date Started: 2008/05/28
            + *
            + * Verilog language file for GeSHi.
            + *
            + * CHANGES
            + * -------
            + * 2008/05/29
            + *   -  added regular expression to find numbers of the form 4'b001xz
            + *   -  added regular expression to find values for `timescale command
            + *   -  extended macro keywords
            + *
            + * TODO (updated 2008/05/29)
            + * -------------------------
            + *
            + * 2013/01/08
            + *   -  extended keywords to include system keywords
            + *
            + *************************************************************************************
            + *
            + *     This file is part of GeSHi.
            + *
            + *   GeSHi is free software; you can redistribute it and/or modify
            + *   it under the terms of the GNU General Public License as published by
            + *   the Free Software Foundation; either version 2 of the License, or
            + *   (at your option) any later version.
            + *
            + *   GeSHi is distributed in the hope that it will be useful,
            + *   but WITHOUT ANY WARRANTY; without even the implied warranty of
            + *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
            + *   GNU General Public License for more details.
            + *
            + *   You should have received a copy of the GNU General Public License
            + *   along with GeSHi; if not, write to the Free Software
            + *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
            + *
            + ************************************************************************************/
            +
            +$language_data = array (
            +    'LANG_NAME' => 'Verilog',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        // keywords
            +        1 => array(
            +            'accept_on','alias',
            +            'always','always_comb','always_ff','always_latch','and','assert',
            +            'assign','assume','automatic','before','begin','bind','bins','binsof',
            +            'bit','break','buf','bufif0','bufif1','byte','case','casex','casez',
            +            'cell','chandle','checker','class','clocking','cmos','config','const',
            +            'constraint','context','continue','cover','covergroup','coverpoint','cross',
            +            'deassign','default','defparam','design','disable','dist','do','edge','else',
            +            'end','endcase','endchecker','endclass','endclocking','endconfig',
            +            'endfunction','endgenerate','endgroup','endinterface','endmodule',
            +            'endpackage','endprimitive','endprogram','endproperty','endspecify',
            +            'endsequence','endtable','endtask','enum','event','eventually','expect',
            +            'export','extends','extern','final','first_match','for','force','foreach',
            +            'forever','fork','forkjoin','function','generate','genvar','global',
            +            'highz0','highz1','if','iff','ifnone','ignore_bins','illegal_bins',
            +            'implies','import','incdir','include','initial','inout','input','inside',
            +            'instance','int','integer','interface','intersect','join','join_any',
            +            'join_none','large','let','liblist','library','local','localparam',
            +            'logic','longint','macromodule','matches','medium','modport','module','nand',
            +            'negedge','new','nexttime','nmos','nor','noshowcancelled','not','notif0',
            +            'notif1','null','or','output','package','packed','parameter','pmos','posedge',
            +            'primitive','priority','program','property','protected','pull0','pull1',
            +            'pulldown','pullup','pulsestyle_ondetect','pulsestyle_onevent','pure',
            +            'rand','randc','randcase','randsequence','rcmos','real','realtime','ref',
            +            'reg','reject_on','release','repeat','restrict','return','rnmos','rpmos',
            +            'rtran','rtranif0','rtranif1','s_always','s_eventually','s_nexttime',
            +            's_until','s_until_with','scalared','sequence','shortint','shortreal',
            +            'showcancelled','signed','small','solve','specify','specparam','static',
            +            'string','strong','strong0','strong1','struct','super','supply0','supply1',
            +            'sync_accept_on','sync_reject_on','table','tagged','task','this','throughout',
            +            'time','timeprecision','timeunit','tran','tranif0','tranif1','tri','tri0',
            +            'tri1','triand','trior','trireg','type','typedef','union','unique','unique0',
            +            'unsigned','until','until_with','untyped','use','uwire','var','vectored',
            +            'virtual','void','wait','wait_order','wand','weak','weak0','weak1','while',
            +            'wildcard','wire','with','within','wor','xnor','xor'
            +            ),
            +        // system tasks
            +        2 => array(
            +            '$display', '$monitor',
            +            '$dumpall', '$dumpfile', '$dumpflush', '$dumplimit', '$dumpoff',
            +            '$dumpon', '$dumpvars',
            +            '$fclose', '$fdisplay', '$fopen',
            +            '$finish', '$fmonitor', '$fstrobe', '$fwrite',
            +            '$fgetc', '$ungetc', '$fgets', '$fscanf', '$fread', '$ftell',
            +            '$fseek', '$frewind', '$ferror', '$fflush', '$feof',
            +            '$random',
            +            '$readmemb', '$readmemh', '$readmemx',
            +            '$signed', '$stime', '$stop',
            +            '$strobe', '$time', '$unsigned', '$write'
            +            ),
            +        // macros
            +        3 => array(
            +            '`default-net', '`define',
            +            '`celldefine', '`default_nettype', '`else', '`elsif', '`endcelldefine',
            +            '`endif', '`ifdef', '`ifndef', '`include', '`line', '`nounconnected_drive',
            +            '`resetall', '`timescale', '`unconnected_drive', '`undef'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%',
            +        '^', '&', '|', '~',
            +        '?', ':',
            +        '#', '<<', '<<<',
            +        '>', '<', '>=', '<=',
            +        '@', ';', ','
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #A52A2A; font-weight: bold;',
            +            2 => 'color: #9932CC;',
            +            3 => 'color: #008800;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #00008B; font-style: italic;',
            +            'MULTI' => 'color: #00008B; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #9F79EE'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #9F79EE;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #FF00FF;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #ff0055;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #202020;',
            +            2 => 'color: #202020;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #5D478B;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #ff0055;',
            +            1 => 'color: #ff0055;',
            +            ),
            +        'SCRIPT' => array(
            +            0 => '',
            +            1 => '',
            +            2 => '',
            +            3 => ''
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => ''
            +        ),
            +    'REGEXPS' => array(
            +        // numbers
            +        0 => "\d'[bdh][0-9_a-fA-FxXzZ]+",
            +        // time -> 1, 10, or 100; s, ms, us, ns, ps, of fs
            +        1 => "1[0]{0,2}[munpf]?s"
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        1 => ''
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        0 => true,
            +        1 => true,
            +        2 => true,
            +        3 => true
            +        ),
            +    'TAB_WIDTH' => 4
            +);
            diff --git a/vendor/easybook/geshi/geshi/vhdl.php b/vendor/easybook/geshi/geshi/vhdl.php
            new file mode 100644
            index 0000000000..cc8158fcf9
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/vhdl.php
            @@ -0,0 +1,181 @@
            + 'VHDL',
            +    'COMMENT_SINGLE' => array(1 => '--'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'COMMENT_REGEXP' => array(
            +        // PSL adds C-preprocessor support
            +        1 => '/(?<=\s)#(?:\\\\\\\\|\\\\\\n|.)*$/m',
            +        // PSL metacomments (single-line only for now)
            +        2 => '/--\s*@?psl(?:.)*?;$/m',
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        /*keywords*/
            +        1 => array(
            +            'access','after','alias','all','attribute','architecture','array','begin',
            +            'block','body','buffer','bus','case','case?','component','configuration','constant','context',
            +            'disconnect','downto','else','elsif','end','entity','exit','file','for','force',
            +            'function','generate','generic','group','guarded','if','impure','in',
            +            'inertial','inout','is','label','library','linkage','literal','loop',
            +            'map','new','next','null','of','on','open','others','out','package',
            +            'port','postponed','procedure','process','protected','pure','range','record','register',
            +            'reject','release','report','return','select','severity','shared','signal','subtype',
            +            'then','to','transport','type','unaffected','units','until','use','variable',
            +            'wait','when','while','with'
            +            ),
            +        /*types and standard libs*/
            +        2 => array(
            +            'bit','bit_vector','character','boolean','integer','real','time','delay_length','string',
            +            'severity_level','positive','natural','signed','unsigned','line','text',
            +            'std_logic','std_logic_vector','std_ulogic','std_ulogic_vector',
            +            'sfixed','ufixed','float','float32','float64','float128',
            +            'work','ieee','std_logic_1164','math_real','math_complex','textio',
            +            'numeric_std','numeric_std_signed','numeric_std_unsigned','numeric_bit'
            +            ),
            +        /*operators*/
            +        3 => array(
            +            'abs','and','mod','nor','not','or','rem','rol','ror','sla','sll','sra','srl','xnor','xor'
            +            ),
            +        /*psl*/
            +        4 => array(
            +            'assert','assume','assume_guarantee','clock','const','countones','cover','default',
            +            'endpoint','fairness','fell','forall','inf','inherit','isunknown','onehot','onehot0','property',
            +            'prev','restrict','restrict_guarantee','rose','sequence','stable','strong','union','vmode','vprop','vunit'
            +            ),
            +        /*psl operators*/
            +        5 => array(
            +            'abort','always','before','before!','before!_','before_','eventually!','never',
            +            'next!','next_a','next_a!','next_e','next_e!','next_event','next_event!','next_event_a','next_event_a!',
            +            'next_event_e','next_event_e!','until!','until!_','until_','within'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '[', ']', '(', ')',
            +        ';',':',
            +        '<','>','=','+','-','*','/','&','|','?'
            +    ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        5 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000080; font-weight: bold;',
            +            2 => 'color: #0000ff;',
            +            3 => 'color: #000066;',
            +            4 => 'color: #000080; font-weight: bold;',
            +            5 => 'color: #000066;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #008000; font-style: italic;',
            +            2 => 'color: #ff0000; font-weight: bold;',
            +            'MULTI' => 'color: #008000; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000066;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #7f007f;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #000066;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #ff0000;',
            +            //1 => 'color: #ff0000;',
            +            2 => 'color: #ee82ee;'
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        //Based literals, scientific notation, and time units
            +        0 => '(\b\d+#[[:xdigit:]_]+#)|'.
            +            '(\b[\d_]+(\.[\d_]+)?[eE][+\-]?[\d_]+)|'.
            +            '(\b(hr|min|sec|ms|us|ns|ps|fs)\b)',
            +        //Character literals
            +        /* GeSHi won't match this pattern for some reason and QUOTEMARKS
            +         * can't be used because it interferes with attribute parsing */
            +        /*1 => "\b'.'\b",*/
            +        //Attributes
            +        2 => "'\w+(?!')"
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/vim.php b/vendor/easybook/geshi/geshi/vim.php
            new file mode 100644
            index 0000000000..e2e363477b
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/vim.php
            @@ -0,0 +1,418 @@
            +  ...   ... works event if they aren't surround by space.
            + *
            + *************************************************************************************
            + *
            + *     This file is part of GeSHi.
            + *
            + *   GeSHi is free software; you can redistribute it and/or modify
            + *   it under the terms of the GNU General Public License as published by
            + *   the Free Software Foundation; either version 2 of the License, or
            + *   (at your option) any later version.
            + *
            + *   GeSHi is distributed in the hope that it will be useful,
            + *   but WITHOUT ANY WARRANTY; without even the implied warranty of
            + *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
            + *   GNU General Public License for more details.
            + *
            + *   You should have received a copy of the GNU General Public License
            + *   along with GeSHi; if not, write to the Free Software
            + *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
            + *
            + ************************************************************************************/
            +
            +$language_data = array(
            +    'LANG_NAME' => 'Vim Script',
            +    'COMMENT_SINGLE' => array(),
            +    'COMMENT_REGEXP' => array(
            +        1 => "/\s*\"[^\"]*?$/m",
            +        //Regular expressions (Ported from perl.php)
            +//        2 => "/(?<=[\\s^])(s|tr|y)\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])*\\/[msixpogcde]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])(m|q[qrwx]?)?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[msixpogc]*(?=[\\s$\\.\\,\\;\\)])/iU",
            +        ),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'au', 'augroup', 'autocmd', 'brea', 'break', 'bufadd',
            +            'bufcreate', 'bufdelete', 'bufenter', 'buffilepost',
            +            'buffilepre', 'bufleave', 'bufnew', 'bufnewfile',
            +            'bufread', 'bufreadcmd', 'bufreadpost', 'bufreadpre',
            +            'bufunload', 'bufwinenter', 'bufwinleave', 'bufwipeout',
            +            'bufwrite', 'bufwritecmd', 'bufwritepost', 'bufwritepre',
            +            'call', 'cat', 'catc', 'catch', 'cmd-event', 'cmdwinenter',
            +            'cmdwinleave', 'colorscheme', 'con', 'confirm', 'cont', 'conti',
            +            'contin', 'continu', 'continue', 'cursorhold', 'cursorholdi',
            +            'cursormoved', 'cursormovedi', 'ec', 'echo', 'echoe',
            +            'echoer', 'echoerr', 'echoh', 'echohl', 'echom', 'echoms',
            +            'echomsg', 'echon', 'el', 'els', 'else', 'elsei', 'elseif',
            +            'en', 'encodingchanged', 'end', 'endfo', 'endfor', 'endi',
            +            'endif', 'endt', 'endtr', 'endtry', 'endw', 'endwh', 'endwhi',
            +            'endwhil', 'endwhile', 'exe', 'exec', 'execu', 'execut',
            +            'execute', 'fileappendcmd', 'fileappendpost', 'fileappendpre',
            +            'filechangedro', 'filechangedshell', 'filechangedshellpost',
            +            'filereadcmd', 'filereadpost', 'filereadpre',
            +            'filetype', 'filewritecmd', 'filewritepost', 'filewritepre',
            +            'filterreadpost', 'filterreadpre', 'filterwritepost',
            +            'filterwritepre', 'fina', 'final', 'finall', 'finally',
            +            'finish', 'focusgained', 'focuslost', 'for', 'fun', 'func',
            +            'funct', 'functi', 'functio', 'function', 'funcundefined',
            +            'guienter', 'guifailed', 'hi', 'highlight', 'if', 'in',
            +            'insertchange', 'insertenter', 'insertleave', 'let', 'lockv',
            +            'lockva', 'lockvar', 'map', 'match', 'menupopup', 'nnoremap',
            +            'quickfixcmdpost', 'quickfixcmdpre', 'remotereply', 'retu',
            +            'retur', 'return', 'sessionloadpost', 'set', 'setlocal',
            +            'shellcmdpost', 'shellfilterpost', 'sourcecmd', 'sourcepre',
            +            'spellfilemissing', 'stdinreadpost', 'stdinreadpre',
            +            'swapexists', 'syntax', 'tabenter', 'tableave', 'termchanged',
            +            'termresponse', 'th', 'thr', 'thro', 'throw', 'tr', 'try', 'unl',
            +            'unle', 'unlet', 'unlo', 'unloc', 'unlock', 'unlockv',
            +            'unlockva', 'unlockvar', 'user', 'usergettingbored',
            +            'vimenter', 'vimleave', 'vimleavepre', 'vimresized', 'wh',
            +            'whi', 'whil', 'while', 'winenter', 'winleave'
            +            ),
            +        2 => array(
            +            '<CR>', '<Esc>', '<F1>', '<F10>',
            +            '<F11>', '<F12>', '<F2>', '<F3>',
            +            '<F4>', '<F5>', '<F6>', '<F7>',
            +            '<F8>', '<F9>', '<cr>', '<silent>',
            +            '-nargs', 'acd', 'ai', 'akm', 'al', 'aleph',
            +            'allowrevins', 'altkeymap', 'ambiwidth', 'ambw',
            +            'anti', 'antialias', 'ar', 'arab', 'arabic',
            +            'arabicshape', 'ari', 'arshape', 'autochdir',
            +            'autoindent', 'autoread', 'autowrite', 'autowriteall',
            +            'aw', 'awa', 'background', 'backspace', 'backup',
            +            'backupcopy', 'backupdir', 'backupext',
            +            'backupskip', 'balloondelay', 'ballooneval', 'balloonexpr',
            +            'bdir', 'bdlay', 'beval', 'bex', 'bexpr', 'bg',
            +            'bh', 'bin', 'binary', 'biosk', 'bioskey',
            +            'bk', 'bkc', 'bl', 'bomb', 'breakat', 'brk',
            +            'bs', 'bsdir', 'bsk', 'bt', 'bufhidden',
            +            'buftype', 'casemap', 'cb',
            +            'ccv', 'cd', 'cdpath', 'cedit', 'cf', 'cfu', 'ch',
            +            'charconvert', 'ci', 'cin', 'cink',
            +            'cinkeys', 'cino', 'cinoptions', 'cinw', 'cinwords',
            +            'clipboard', 'cmdheight', 'cmdwinheight',
            +            'cmp', 'cms', 'co', 'columns', 'com',
            +            'comc', 'comcl', 'comcle', 'comclea', 'comclear', 'comm',
            +            'comma', 'comman', 'command', 'comments', 'commentstring',
            +            'compatible', 'completefunc', 'completeopt',
            +            'consk', 'conskey', 'copyindent',
            +            'cot', 'cp', 'cpo', 'cpoptions', 'cpt',
            +            'cscopepathcomp', 'cscopeprg', 'cscopequickfix', 'cscopetag',
            +            'cscopetagorder', 'cscopeverbose',
            +            'cspc', 'csprg', 'csqf', 'cst', 'csto', 'csverb', 'cuc',
            +            'cul', 'cursorcolumn', 'cursorline', 'cwh', 'debug',
            +            'deco', 'def', 'define', 'delc', 'delco', 'delcom',
            +            'delcombine', 'delcomm', 'delcomman', 'delcommand', 'dex',
            +            'dg', 'dict', 'dictionary', 'diff', 'diffexpr',
            +            'diffopt', 'digraph', 'dip', 'dir', 'directory', 'display',
            +            'dlcomma', 'dy', 'ea', 'ead', 'eadirection',
            +            'eb', 'ed', 'edcompatible', 'ef', 'efm',
            +            'ei', 'ek', 'enc', 'encoding', 'endfun', 'endofline',
            +            'eol', 'ep', 'equalalways', 'equalprg', 'errorbells',
            +            'errorfile', 'errorformat', 'esckeys', 'et',
            +            'eventignore', 'ex', 'expandtab', 'exrc', 'fcl',
            +            'fcs', 'fdc', 'fde', 'fdi', 'fdl', 'fdls', 'fdm',
            +            'fdn', 'fdo', 'fdt', 'fen', 'fenc', 'fencs', 'fex',
            +            'ff', 'ffs', 'fileencoding', 'fileencodings', 'fileformat',
            +            'fileformats', /*'filetype',*/ 'fillchars', 'fk',
            +            'fkmap', 'flp', 'fml', 'fmr', 'fo', 'foldclose',
            +            'foldcolumn', 'foldenable', 'foldexpr', 'foldignore',
            +            'foldlevelstart', 'foldmarker', 'foldmethod', 'foldminlines',
            +            'foldnestmax', 'foldopen', 'formatexpr', 'formatlistpat',
            +            'formatoptions', 'formatprg', 'fp', 'fs', 'fsync', 'ft',
            +            'gcr', 'gd', 'gdefault', 'gfm', 'gfn', 'gfs', 'gfw',
            +            'ghr', 'go', 'gp', 'grepformat', 'grepprg', 'gtl',
            +            'gtt', 'guicursor', 'guifont', 'guifontset',
            +            'guifontwide', 'guiheadroom', 'guioptions', 'guipty',
            +            'guitablabel', 'guitabtooltip', 'helpfile',
            +            'helpheight', 'helplang', 'hf', 'hh', 'hid', 'hidden',
            +            'history', 'hk', 'hkmap', 'hkmapp', 'hkp', 'hl',
            +            'hlg', 'hls', 'hlsearch', 'ic', 'icon', 'iconstring',
            +            'ignorecase', 'im', 'imactivatekey', 'imak', 'imc',
            +            'imcmdline', 'imd', 'imdisable', 'imi', 'iminsert', 'ims',
            +            'imsearch', 'inc', 'include', 'includeexpr',
            +            'incsearch', 'inde', 'indentexpr', 'indentkeys',
            +            'indk', 'inex', 'inf', 'infercase', 'insertmode', 'is', 'isf',
            +            'isfname', 'isi', 'isident', 'isk', 'iskeyword',
            +            'isp', 'isprint', 'joinspaces', 'js', 'key',
            +            'keymap', 'keymodel', 'keywordprg', 'km', 'kmp', 'kp',
            +            'langmap', 'langmenu', 'laststatus', 'lazyredraw', 'lbr',
            +            'lcs', 'linebreak', 'lines', 'linespace', 'lisp',
            +            'lispwords', 'list', 'listchars', 'lm', 'lmap',
            +            'loadplugins', 'lpl', 'ls', 'lsp', 'lw', 'lz', 'ma',
            +            'macatsui', 'magic', 'makeef', 'makeprg', 'mat',
            +            'matchpairs', 'matchtime', 'maxcombine', 'maxfuncdepth',
            +            'maxmapdepth', 'maxmem', 'maxmempattern',
            +            'maxmemtot', 'mco', 'mef', 'menuitems', 'mfd', 'mh',
            +            'mis', 'mkspellmem', 'ml', 'mls', 'mm', 'mmd', 'mmp',
            +            'mmt', 'mod', 'modeline', 'modelines', 'modifiable',
            +            'modified', 'more', 'mouse', 'mousef', 'mousefocus',
            +            'mousehide', 'mousem', 'mousemodel', 'mouses',
            +            'mouseshape', 'mouset', 'mousetime', 'mp', 'mps', 'msm',
            +            'mzq', 'mzquantum', 'nf', 'noacd', 'noai', 'noakm',
            +            'noallowrevins', 'noaltkeymap', 'noanti', 'noantialias',
            +            'noar', 'noarab', 'noarabic', 'noarabicshape', 'noari',
            +            'noarshape', 'noautochdir', 'noautoindent', 'noautoread',
            +            'noautowrite', 'noautowriteall', 'noaw', 'noawa', 'nobackup',
            +            'noballooneval', 'nobeval', 'nobin', 'nobinary', 'nobiosk',
            +            'nobioskey', 'nobk', 'nobl', 'nobomb', 'nobuflisted', 'nocf',
            +            'noci', 'nocin', 'nocindent', 'nocompatible', 'noconfirm',
            +            'noconsk', 'noconskey', 'nocopyindent', 'nocp', 'nocscopetag',
            +            'nocscopeverbose', 'nocst', 'nocsverb', 'nocuc', 'nocul',
            +            'nocursorcolumn', 'nocursorline', 'nodeco', 'nodelcombine',
            +            'nodg', 'nodiff', 'nodigraph', 'nodisable', 'noea', 'noeb',
            +            'noed', 'noedcompatible', 'noek', 'noendofline', 'noeol',
            +            'noequalalways', 'noerrorbells', 'noesckeys', 'noet',
            +            'noex', 'noexpandtab', 'noexrc', 'nofen', 'nofk', 'nofkmap',
            +            'nofoldenable', 'nogd', 'nogdefault', 'noguipty', 'nohid',
            +            'nohidden', 'nohk', 'nohkmap', 'nohkmapp', 'nohkp', 'nohls',
            +            'nohlsearch', 'noic', 'noicon', 'noignorecase', 'noim',
            +            'noimc', 'noimcmdline', 'noimd', 'noincsearch', 'noinf',
            +            'noinfercase', 'noinsertmode', 'nois', 'nojoinspaces',
            +            'nojs', 'nolazyredraw', 'nolbr', 'nolinebreak', 'nolisp',
            +            'nolist', 'noloadplugins', 'nolpl', 'nolz', 'noma',
            +            'nomacatsui', 'nomagic', 'nomh', 'noml', 'nomod',
            +            'nomodeline', 'nomodifiable', 'nomodified', 'nomore',
            +            'nomousef', 'nomousefocus', 'nomousehide', 'nonu',
            +            'nonumber', 'noodev', 'noopendevice', 'nopaste', 'nopi',
            +            'nopreserveindent', 'nopreviewwindow', 'noprompt', 'nopvw',
            +            'noreadonly', 'noremap', 'norestorescreen', 'norevins',
            +            'nori', 'norightleft', 'norightleftcmd', 'norl', 'norlc',
            +            'noro', 'nors', 'noru', 'noruler', 'nosb', 'nosc', 'noscb',
            +            'noscrollbind', 'noscs', 'nosecure', 'nosft', 'noshellslash',
            +            'noshelltemp', 'noshiftround', 'noshortname', 'noshowcmd',
            +            'noshowfulltag', 'noshowmatch', 'noshowmode', 'nosi', 'nosm',
            +            'nosmartcase', 'nosmartindent', 'nosmarttab', 'nosmd',
            +            'nosn', 'nosol', 'nospell', 'nosplitbelow', 'nosplitright',
            +            'nospr', 'nosr', 'nossl', 'nosta', 'nostartofline',
            +            'nostmp', 'noswapfile', 'noswf', 'nota', 'notagbsearch',
            +            'notagrelative', 'notagstack', 'notbi', 'notbidi', 'notbs',
            +            'notermbidi', 'noterse', 'notextauto', 'notextmode',
            +            'notf', 'notgst', 'notildeop', 'notimeout', 'notitle',
            +            'noto', 'notop', 'notr', 'nottimeout', 'nottybuiltin',
            +            'nottyfast', 'notx', 'novb', 'novisualbell', 'nowa',
            +            'nowarn', 'nowb', 'noweirdinvert', 'nowfh', 'nowfw',
            +            'nowildmenu', 'nowinfixheight', 'nowinfixwidth', 'nowiv',
            +            'nowmnu', 'nowrap', 'nowrapscan', 'nowrite', 'nowriteany',
            +            'nowritebackup', 'nows', 'nrformats', 'nu', 'number',
            +            'numberwidth', 'nuw', 'odev', 'oft', 'ofu',
            +            'omnifunc', 'opendevice', 'operatorfunc', 'opfunc',
            +            'osfiletype', 'pa', 'para', 'paragraphs',
            +            'paste', 'pastetoggle', 'patchexpr',
            +            'patchmode', 'path', 'pdev', 'penc', 'pex', 'pexpr',
            +            'pfn', 'ph', 'pheader', 'pi', 'pm', 'pmbcs',
            +            'pmbfn', 'popt', 'preserveindent', 'previewheight',
            +            'previewwindow', 'printdevice', 'printencoding', 'printexpr',
            +            'printfont', 'printheader', 'printmbcharset',
            +            'printmbfont', 'printoptions', 'prompt', 'pt', 'pumheight',
            +            'pvh', 'pvw', 'qe', 'quoteescape', 'rdt',
            +            'readonly', 'redrawtime', 'remap', 'report',
            +            'restorescreen', 'revins', 'ri', 'rightleft', 'rightleftcmd',
            +            'rl', 'rlc', 'ro', 'rs', 'rtp', 'ru',
            +            'ruf', 'ruler', 'rulerformat', 'runtimepath', 'sb', 'sbo',
            +            'sbr', 'sc', 'scb', 'scr', 'scroll', 'scrollbind',
            +            'scrolljump', 'scrolloff', 'scrollopt',
            +            'scs', 'sect', 'sections', 'secure', 'sel',
            +            'selection', 'selectmode', 'sessionoptions', 'sft',
            +            'sh', 'shcf', 'shell', 'shellcmdflag', 'shellpipe',
            +            'shellquote', 'shellredir', 'shellslash',
            +            'shelltemp', 'shelltype', 'shellxquote', 'shiftround',
            +            'shiftwidth', 'shm', 'shortmess', 'shortname',
            +            'showbreak', 'showcmd', 'showfulltag', 'showmatch',
            +            'showmode', 'showtabline', 'shq', 'si', 'sidescroll',
            +            'sidescrolloff', 'siso', 'sj', 'slm', 'sm', 'smartcase',
            +            'smartindent', 'smarttab', 'smc', 'smd', 'sn',
            +            'so', 'softtabstop', 'sol', 'sp', 'spc', 'spell',
            +            'spellcapcheck', 'spellfile', 'spelllang',
            +            'spf', 'spl', 'splitbelow', 'splitright', 'spr',
            +            'sps', 'sr', 'srr', 'ss', 'ssl', 'ssop', 'st', 'sta',
            +            'stal', 'startofline', 'statusline', 'stl', 'stmp',
            +            'sts', 'su', 'sua', 'suffixes', 'suffixesadd', 'sw',
            +            'swapfile', 'swapsync', 'swb', 'swf', 'switchbuf',
            +            'sws', 'sxq', 'syn', 'synmaxcol', 'ta',
            +            'tabline', 'tabpagemax', 'tabstop', 'tag',
            +            'tagbsearch', 'taglength', 'tagrelative', 'tags', 'tagstack',
            +            'tal', 'tb', 'tbi', 'tbidi', 'tbis', 'tbs',
            +            'tenc', 'term', 'termbidi', 'termencoding', 'terse',
            +            'textauto', 'textmode', 'textwidth', 'tf', 'tgst',
            +            'thesaurus', 'tildeop', 'timeout', 'timeoutlen',
            +            'title', 'titlelen', 'titleold', 'titlestring',
            +            'tl', 'tm', 'to', 'toolbar', 'toolbariconsize', 'top',
            +            'tpm', 'ts', 'tsl', 'tsr', 'ttimeout',
            +            'ttimeoutlen', 'ttm', 'tty', 'ttybuiltin', 'ttyfast', 'ttym',
            +            'ttymouse', 'ttyscroll', 'ttytype', 'tw', 'tx', 'uc',
            +            'ul', 'undolevels', 'updatecount', 'updatetime', 'ut',
            +            'vb', 'vbs', 'vdir', 've', 'verbose', 'verbosefile',
            +            'vfile', 'vi', 'viewdir', 'viewoptions', 'viminfo',
            +            'virtualedit', 'visualbell', 'vop', 'wa', 'wak',
            +            'warn', 'wb', 'wc', 'wcm', 'wd', 'weirdinvert', 'wfh',
            +            'wfw', /*'wh',*/ 'whichwrap', 'wi', 'wig', 'wildchar',
            +            'wildcharm', 'wildignore', 'wildmenu',
            +            'wildmode', 'wildoptions', 'wim', 'winaltkeys', 'window',
            +            'winfixheight', 'winfixwidth', 'winheight',
            +            'winminheight', 'winminwidth', 'winwidth', 'wiv',
            +            'wiw', 'wm', 'wmh', 'wmnu', 'wmw', 'wop', 'wrap',
            +            'wrapmargin', 'wrapscan', 'write', 'writeany',
            +            'writebackup', 'writedelay', 'ws', 'ww'
            +            ),
            +        3 => array(
            +            'BufAdd', 'BufCreate', 'BufDelete', 'BufEnter', 'BufFilePost',
            +            'BufFilePre', 'BufHidden', 'BufLeave', 'BufNew', 'BufNewFile',
            +            'BufRead', 'BufReadCmd', 'BufReadPost', 'BufReadPre',
            +            'BufUnload', 'BufWinEnter', 'BufWinLeave', 'BufWipeout',
            +            'BufWrite', 'BufWriteCmd', 'BufWritePost', 'BufWritePre',
            +            'Cmd-event', 'CmdwinEnter', 'CmdwinLeave', 'ColorScheme',
            +            'CursorHold', 'CursorHoldI', 'CursorMoved', 'CursorMovedI',
            +            'EncodingChanged', 'FileAppendCmd', 'FileAppendPost',
            +            'FileAppendPre', 'FileChangedRO', 'FileChangedShell',
            +            'FileChangedShellPost', 'FileEncoding', 'FileReadCmd',
            +            'FileReadPost', 'FileReadPre', 'FileType',
            +            'FileWriteCmd', 'FileWritePost', 'FileWritePre',
            +            'FilterReadPost', 'FilterReadPre', 'FilterWritePost',
            +            'FilterWritePre', 'FocusGained', 'FocusLost', 'FuncUndefined',
            +            'GUIEnter', 'GUIFailed', 'InsertChange', 'InsertEnter',
            +            'InsertLeave', 'MenuPopup', 'QuickFixCmdPost',
            +            'QuickFixCmdPre', 'RemoteReply', 'SessionLoadPost',
            +            'ShellCmdPost', 'ShellFilterPost', 'SourceCmd',
            +            'SourcePre', 'SpellFileMissing', 'StdinReadPost',
            +            'StdinReadPre', 'SwapExists', 'Syntax', 'TabEnter',
            +            'TabLeave', 'TermChanged', 'TermResponse', 'User',
            +            'UserGettingBored', 'VimEnter', 'VimLeave', 'VimLeavePre',
            +            'VimResized', 'WinEnter', 'WinLeave', 'abs', 'add', 'append',
            +            'argc', 'argidx', 'argv', 'atan', 'browse', 'browsedir',
            +            'bufexists', 'buflisted', 'bufloaded', 'bufname', 'bufnr',
            +            'bufwinnr', 'byte2line', 'byteidx', 'ceil', 'changenr',
            +            'char2nr', 'cindent', 'clearmatches', 'col', 'complete',
            +            'complete_add', 'complete_check', 'copy',
            +            'cos', 'count', 'cscope_connection', 'cursor', 'deepcopy',
            +            'delete', 'did_filetype', 'diff_filler', 'diff_hlID',
            +            'empty', 'escape', 'eval', 'eventhandler', 'executable',
            +            'exists', 'expand', 'extend', 'feedkeys', 'filereadable',
            +            'filewritable', 'filter', 'finddir', 'findfile', 'float2nr',
            +            'floor', 'fnameescape', 'fnamemodify', 'foldclosed',
            +            'foldclosedend', 'foldlevel', 'foldtext', 'foldtextresult',
            +            'foreground', 'garbagecollect', 'get', 'getbufline',
            +            'getbufvar', 'getchar', 'getcharmod', 'getcmdline',
            +            'getcmdpos', 'getcmdtype', 'getcwd', 'getfontname',
            +            'getfperm', 'getfsize', 'getftime', 'getftype', 'getline',
            +            'getloclist', 'getmatches', 'getpid', 'getpos', 'getqflist',
            +            'getreg', 'getregtype', 'gettabwinvar', 'getwinposx',
            +            'getwinposy', 'getwinvar', 'glob', 'globpath', 'has',
            +            'has_key', 'haslocaldir', 'hasmapto', 'histadd', 'histdel',
            +            'histget', 'histnr', 'hlID', 'hlexists', 'hostname', 'iconv',
            +            'indent', 'index', 'input', 'inputdialog', 'inputlist',
            +            'inputrestore', 'inputsave', 'inputsecret', 'insert',
            +            'isdirectory', 'islocked', 'items', 'join', 'keys', 'len',
            +            'libcall', 'libcallnr', 'line', 'line2byte', 'lispindent',
            +            'localtime', 'log10', 'maparg', 'mapcheck', 'matchadd',
            +            'matcharg', 'matchdelete', 'matchend', 'matchlist',
            +            'matchstr', 'max', 'min', 'mkdir', 'mode', 'nextnonblank',
            +            'nr2char', 'off', 'on', 'pathshorten', 'plugin', 'pow',
            +            'prevnonblank', 'printf', 'pumvisible', 'range', 'readfile',
            +            'reltime', 'reltimestr', 'remote_expr', 'remote_foreground',
            +            'remote_peek', 'remote_read', 'remote_send', 'remove',
            +            'rename', 'repeat', 'resolve', 'reverse', 'round', 'search',
            +            'searchdecl', 'searchpair', 'searchpairpos', 'searchpos',
            +            'server2client', 'serverlist', 'setbufvar', 'setcmdpos',
            +            'setline', 'setloclist', 'setmatches', 'setpos', 'setqflist',
            +            'setreg', 'settabwinvar', 'setwinvar', 'shellescape',
            +            'simplify', 'sin', 'sort', 'soundfold', 'spellbadword',
            +            'spellsuggest', 'split', 'sqrt', 'str2float', 'str2nr',
            +            'strftime', 'stridx', 'string', 'strlen', 'strpart',
            +            'strridx', 'strtrans', 'submatch', 'substitute',
            +            'synID', 'synIDattr', 'synIDtrans', 'synstack', 'system',
            +            'tabpagebuflist', 'tabpagenr', 'tabpagewinnr', 'tagfiles',
            +            'taglist', 'tempname', 'tolower', 'toupper', 'trunc',
            +            'type', 'values', 'virtcol', 'visualmode', 'winbufnr',
            +            'wincol', 'winline', 'winnr', 'winrestcmd',
            +            'winrestview', 'winsaveview', 'writefile'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '[', ']', '{', '}', '!', '%', '&', '*', '|', '/', '<', '>',
            +        '^', '-', '+', '~', '?', ':', '$', '@', '.'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => true,
            +        2 => true,
            +        3 => true
            +        ),
            +    'STYLES' => array(
            +        'BRACKETS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #adadad; font-style: italic;',
            +//            2 => 'color: #009966; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => ''
            +            ),
            +        'KEYWORDS' => array(
            +            1 => 'color: #804040;',
            +            2 => 'color: #668080;',
            +            3 => 'color: #25BB4D;'
            +            ),
            +        'METHODS' => array(
            +            0 => 'color: #000000;',
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #000000; font-weight:bold;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #C5A22D;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #000000;'
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => ''
            +        ),
            +    'OOLANG' => false, //Save some time as OO identifiers aren't used
            +    'OBJECT_SPLITTERS' => array(),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(),
            +    'HIGHLIGHT_STRICT_BLOCK' => array()
            +);
            diff --git a/vendor/easybook/geshi/geshi/visualfoxpro.php b/vendor/easybook/geshi/geshi/visualfoxpro.php
            new file mode 100644
            index 0000000000..533f030724
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/visualfoxpro.php
            @@ -0,0 +1,455 @@
            + 'Visual Fox Pro',
            +    'COMMENT_SINGLE' => array(1 => "//", 2 => "\n*"),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'Case', 'Else', '#Else', 'Then',
            +            'Endcase', 'Enddefine', 'Enddo', 'Endfor', 'Endfunc', 'Endif', 'Endprintjob',
            +            'Endproc', 'Endscan', 'Endtext', 'Endwith', '#Endif',
            +            '#Elif','#Define','#If','#Include',
            +            '#Itsexpression','#Readclauses','#Region','#Section','#Undef','#Wname',
            +            'Define','Do',
            +            'For','Function','Hidden',
            +            'If','Local','Lparameter','Lparameters','Next','Otherwise',
            +            'Parameters','Printjob','Procedure','Protected','Public','Scan',
            +            'Text','While','With','Abs','Accept','Access','Aclass','Acopy',
            +            'Acos','Adatabases','Adbobjects','Addbs','Addrelationtoenv','Addtabletoenv',
            +            'Adel','Adir','Aelement','Aerror','Afields','Afont',
            +            'Agetclass','Agetfileversion','Ains','Ainstance','Alen','Align',
            +            'Alines','Alltrim','Alter','Amembers','Amouseobj','Anetresources',
            +            'Ansitooem','Append','Aprinters','Ascan','Aselobj','Asin',
            +            'Asort','Assert','Asserts','Assist','Asubscript','Asynchronous',
            +            'At_c','Atan','Atc','Atcc','Atcline','Atline',
            +            'Atn2','Aused','Autoform','Autoreport','Avcxclasses','Average',
            +            'BarCount','BarPrompt','BatchMode','BatchUpdateCount','Begin','BellSound',
            +            'BinToC','Bitand','Bitclear','Bitlshift','Bitnot',
            +            'Bitor','Bitrshift','Bitset','Bittest','Bitxor','Bof',
            +            'Browse','BrowseRefresh','Buffering','BuilderLock','COMArray','COMReturnError',
            +            'CToBin','Calculate','Call','Capslock','Cd','Cdow',
            +            'Ceiling','Central','Change','Char','Chdir','Chr',
            +            'Chrsaw','Chrtran','Chrtranc','Close','Cmonth','Cntbar',
            +            'Cntpad','Col','Comclassinfo','CommandTargetQuery','Compile','Completed',
            +            'Compobj','Compute','Concat','ConnectBusy','ConnectHandle','ConnectName',
            +            'ConnectString','ConnectTimeOut','ContainerReleaseType','Continue','Copy','Cos',
            +            'Cot','Count','Coverage','Cpconvert','Cpcurrent','Cpdbf',
            +            'Cpnotrans','Create','CreateBinary','Createobject','Createobjectex','Createoffline',
            +            'CrsBuffering','CrsFetchMemo','CrsFetchSize','CrsMaxRows','CrsMethodUsed','CrsNumBatch',
            +            'CrsShareConnection','CrsUseMemoSize','CrsWhereClause','Ctod','Ctot',
            +            'Curdate','Curdir','CurrLeft','CurrSymbol','CursorGetProp','CursorSetProp',
            +            'Curtime','Curval','DBGetProp','DBSetProp','DB_BufLockRow','DB_BufLockTable',
            +            'DB_BufOff','DB_BufOptRow','DB_BufOptTable','DB_Complette','DB_DeleteInsert','DB_KeyAndModified',
            +            'DB_KeyAndTimestamp','DB_KeyAndUpdatable','DB_LocalSQL','DB_NoPrompt','DB_Prompt','DB_RemoteSQL',
            +            'DB_TransAuto','DB_TransManual','DB_TransNone','DB_Update','Datetime','Day',
            +            'Dayname','Dayofmonth','Dayofweek','Dayofyear','Dbalias','Dbused',
            +            'Ddeaborttrans','Ddeadvise','Ddeenabled','Ddeexecute','Ddeinitiate','Ddelasterror',
            +            'Ddepoke','Dderequest','Ddesetoption','Ddesetservice','Ddesettopic','Ddeterminate',
            +            'Debugout','Declare','DefOLELCid','DefaultValue','Defaultext','Degrees',
            +            'DeleteTrigger','Desc','Description','Difference','Dimension','Dir',
            +            'Directory','Diskspace','DispLogin','DispWarnings','Display','Dll',
            +            'Dmy','DoDefault','DoEvents','Doc','Dow',
            +            'Drivetype','Drop','Dropoffline','Dtoc','Dtor','Dtos',
            +            'Dtot','DynamicInputMask','Each','Edit','Eject','Elif',
            +            'End','Eof','Erase','Evaluate','Event','Eventtracking',
            +            'Exclude','Exclusive','Exit','Exp','Export','External',
            +            'FDate','FTime','Fchsize','Fclose','Fcount','Fcreate',
            +            'Feof','Ferror','FetchMemo','FetchSize','Fflush','Fgets',
            +            'Filer','Filetostr','Find','Fklabel','Fkmax','Fldlist',
            +            'Flock','Floor','Flush','Fontmetric','Fopen','Forceext',
            +            'Forcepath','FormSetClass','FormSetLib','FormsClass','FormsLib','Found',
            +            'FoxPro','Foxcode','Foxdoc','Foxgen','Foxgraph','Foxview',
            +            'Fputs','Fread','French','Fseek','Fsize','Fv',
            +            'Fwrite','Gather','German','GetPem','Getbar','Getcolor',
            +            'Getcp','Getdir','Getenv','Getexpr','Getfile','Getfldstate',
            +            'Getfont','Gethost','Getnextmodified','Getobject','Getpad','Getpict',
            +            'Getprinter','Go','Gomonth','Goto','Graph','GridHorz',
            +            'GridShow','GridShowPos','GridSnap','GridVert','Help','HelpOn',
            +            'HelpTo','HighLightRow','Home','Hour','IMEStatus','IdleTimeOut',
            +            'Idxcollate','Ifdef','Ifndef','Iif','Import','Include',
            +            'Indbc','Index','Indexseek','Inkey','Inlist','Input',
            +            'Insert','InsertTrigger','Insmode','IsBlank','IsFLocked','IsLeadByte',
            +            'IsMouse','IsNull','IsRLocked','Isalpha','Iscolor','Isdigit',
            +            'IsExclusive','Ishosted','IsLower','IsReadOnly',
            +            'IsUpper','Italian','Japan','Join','Justdrive','Justext',
            +            'Justfname','Justpath','Juststem','KeyField','KeyFieldList','Keyboard'
            +            ),
            +        2 => array('Keymatch','LastProject','Lastkey','Lcase','Leftc','Len',
            +            'Lenc','Length','Likec','Lineno','LoadPicture',
            +            'Locate','Locfile','Log','Log10','Logout','Lookup',
            +            'Loop','Lower','Ltrim','Lupdate','Mail','MaxRecords',
            +            'Mcol','Md','Mdown','Mdx','Mdy','Memlines',
            +            'Menu','Messagebox','Minute','Mkdir','Mline','Modify',
            +            'Month','Monthname','Mouse','Mrkbar','Mrkpad','Mrow',
            +            'Mtdll','Mton','Mwindow','Native','Ndx','Network',
            +            'NoFilter','Nodefault','Normalize','Note','Now','Ntom',
            +            'NullString','Numlock','Nvl','ODBChdbc','ODBChstmt','OLEDropTextInsertion',
            +            'OLELCid','Objnum','Objref','Objtoclient','Objvar','Occurs',
            +            'Oemtoansi','Oldval','OlePublic','Olereturnerror','On','Open',
            +            'Oracle','Order','Os','Outer','PCount','Pack',
            +            'PacketSize','Padc','Padl','Padr','Payment','Pcol',
            +            'PemStatus','Pi','Pivot','Play','Pop','Popup',
            +            'Power','PrimaryKey','Printstatus','Private','Prmbar','Prmpad',
            +            'ProjectClick','Proper','Prow','Prtinfo','Push','Putfile',
            +            'Pv','Qpr','Quater','QueryTimeOut','Quit','Radians',
            +            'Rand','Rat','Ratc','Ratline','Rd','Rdlevel',
            +            'Read','Readkey','Recall','Reccount','RecentlyUsedFiles','Recno',
            +            'Recsize','Regional','Reindex','RelatedChild','RelatedTable','RelatedTag',
            +            'Remove','Rename','Repeat','Replace','Replicate','Report',
            +            'ResHeight','ResWidth','ResourceOn','ResourceTo','Resources','Restore',
            +            'Resume','Retry','Return','Revertoffline','Rgbscheme','Rightc',
            +            'Rlock','Rmdir','Rollback','Round','Rtod','Rtrim',
            +            'RuleExpression','RuleText','Run','Runscript','Rview','SQLAsynchronous',
            +            'SQLBatchMode','SQLCancel','SQLColumns','SQLConnect','SQLConnectTimeOut','SQLDisconnect',
            +            'SQLDispLogin','SQLDispWarnings','SQLExec','SQLGetProp','SQLIdleTimeOut','SQLMoreResults',
            +            'SQLPrepare','SQLQueryTimeOut','SQLSetProp','SQLTables','SQLTransactions','SQLWaitTime',
            +            'Save','SavePicture','ScaleUnits','Scatter','Scols',
            +            'Scroll','Sec','Second','Seek','Select','SendUpdates',
            +            'Set','SetDefault','Setfldstate','Setup','ShareConnection','ShowOLEControls',
            +            'ShowOLEInsertable','ShowVCXs','Sign','Sin','Size','SizeBox',
            +            'Skpbar','Skppad','Sort','Soundex','SourceName','Sqlcommit',
            +            'Sqll','Sqlrollback','Sqlstringconnect','Sqrt','Srows','StatusBar',
            +            'Store','Str','Strconv','Strtofile','Strtran','Stuff',
            +            'Stuffc','Substr','Substrc','Substring','Sum','Suspend',
            +            'Sys','Sysmetric','TabOrdering','Table','TableRefresh','Tablerevert',
            +            'Tableupdate','TagCount','TagNo','Tan','Target','This',
            +            'Thisform','Thisformset','Timestamp','Timestampdiff','Total','Transactions',
            +            'Transform','Trim','Truncate','Ttoc','Ttod','Txnlevel',
            +            'Txtwidth','Type','Ucase','Undefine','Unlock','Unpack',
            +            'Updatable','UpdatableFieldList','Update','UpdateName','UpdateNameList','UpdateTrigger',
            +            'UpdateType','Updated','Upper','Upsizing','Usa','Use',
            +            'UseMemoSize','Used','Val','Validate','Varread','Vartype',
            +            'Version','VersionLanguage','Wait','WaitTime','Wborder','Wchild',
            +            'Wcols','Week','Wexist','Wfont','WhereType','Windcmd',
            +            'Windhelp','Windmemo','Windmenu','Windmodify','Windquery','Windscreen',
            +            'Windsnip','Windstproc','WizardPrompt','Wlast','Wlcol','Wlrow',
            +            'Wmaximum','Wminimum','Wontop','Woutput','Wparent','Wread',
            +            'Wrows','Wtitle','Wvisible','Year','Zap','_Alignment',
            +            '_Asciicols','_Asciirows','_Assist','_Beautify','_Box','_Browser',
            +            '_Builder','_Calcmem','_Calcvalue','_Cliptext','_Converter','_Coverage',
            +            '_Curobj','_Dblclick','_Diarydate','_Dos','_Foxdoc','_Foxgraph',
            +            '_Gallery','_Gengraph','_Genhtml','_Genmenu','_Genpd','_Genscrn',
            +            '_Genxtab','_Getexpr','_Include','_Indent','_Lmargin','_Mac',
            +            '_Mbr_appnd','_Mbr_cpart','_Mbr_delet','_Mbr_font','_Mbr_goto','_Mbr_grid',
            +            '_Mbr_link','_Mbr_mode','_Mbr_mvfld','_Mbr_mvprt','_Mbr_seek','_Mbr_sp100',
            +            '_Mbr_sp200','_Mbr_szfld','_Mbrowse','_Mda_appnd','_Mda_avg','_Mda_brow',
            +            '_Mda_calc','_Mda_copy','_Mda_count','_Mda_label','_Mda_pack','_Mda_reprt',
            +            '_Mda_rindx','_Mda_setup','_Mda_sort','_Mda_sp100','_Mda_sp200','_Mda_sp300',
            +            '_Mda_sum','_Mda_total','_Mdata','_Mdiary','_Med_clear','_Med_copy',
            +            '_Med_cut','_Med_cvtst','_Med_find','_Med_finda','_Med_goto','_Med_insob',
            +            '_Med_link','_Med_obj','_Med_paste','_Med_pref','_Med_pstlk','_Med_redo',
            +            '_Med_repl','_Med_repla','_Med_slcta','_Med_sp100','_Med_sp200','_Med_sp300',
            +            '_Med_sp400','_Med_sp500','_Med_undo','_Medit','_Mfi_clall','_Mfi_close',
            +            '_Mfi_export','_Mfi_import','_Mfi_new','_Mfi_open','_Mfi_pgset','_Mfi_prevu',
            +            '_Mfi_print','_Mfi_quit','_Mfi_revrt','_Mfi_savas','_Mfi_save','_Mfi_send',
            +            '_Mfi_setup','_Mfi_sp100','_Mfi_sp200','_Mfi_sp300','_Mfi_sp400','_Mfile',
            +            '_Mfiler','_Mfirst','_Mlabel','_Mlast','_Mline','_Mmacro',
            +            '_Mmbldr','_Mpr_beaut','_Mpr_cancl','_Mpr_compl','_Mpr_do','_Mpr_docum',
            +            '_Mpr_formwz','_Mpr_gener','_Mpr_graph','_Mpr_resum','_Mpr_sp100','_Mpr_sp200',
            +            '_Mpr_sp300','_Mpr_suspend','_Mprog','_Mproj','_Mrc_appnd','_Mrc_chnge',
            +            '_Mrc_cont','_Mrc_delet','_Mrc_goto','_Mrc_locat','_Mrc_recal','_Mrc_repl',
            +            '_Mrc_seek','_Mrc_sp100','_Mrc_sp200','_Mrecord','_Mreport','_Mrqbe',
            +            '_Mscreen','_Msm_data','_Msm_edit','_Msm_file','_Msm_format','_Msm_prog',
            +            '_Msm_recrd','_Msm_systm','_Msm_text','_Msm_tools','_Msm_view','_Msm_windo',
            +            '_Mst_about','_Mst_ascii','_Mst_calcu','_Mst_captr','_Mst_dbase','_Mst_diary',
            +            '_Mst_filer','_Mst_help','_Mst_hphow','_Mst_hpsch','_Mst_macro','_Mst_office',
            +            '_Mst_puzzl','_Mst_sp100','_Mst_sp200','_Mst_sp300','_Mst_specl','_Msysmenu',
            +            '_Msystem','_Mtable','_Mtb_appnd','_Mtb_cpart','_Mtb_delet','_Mtb_delrc',
            +            '_Mtb_goto','_Mtb_link','_Mtb_mvfld','_Mtb_mvprt','_Mtb_props','_Mtb_recal',
            +            '_Mtb_sp100','_Mtb_sp200','_Mtb_sp300','_Mtb_sp400','_Mtb_szfld','_Mwi_arran',
            +            '_Mwi_clear','_Mwi_cmd','_Mwi_color','_Mwi_debug','_Mwi_hide','_Mwi_hidea',
            +            '_Mwi_min','_Mwi_move','_Mwi_rotat','_Mwi_showa','_Mwi_size','_Mwi_sp100',
            +            '_Mwi_sp200','_Mwi_toolb','_Mwi_trace','_Mwi_view','_Mwi_zoom','_Mwindow',
            +            '_Mwizards','_Mwz_all','_Mwz_form','_Mwz_foxdoc','_Mwz_import','_Mwz_label',
            +            '_Mwz_mail','_Mwz_pivot','_Mwz_query','_Mwz_reprt','_Mwz_setup','_Mwz_table',
            +            '_Mwz_upsizing','_Netware','_Oracle','_Padvance','_Pageno','_Pbpage',
            +            '_Pcolno','_Pcopies','_Pdparms','_Pdriver','_Pdsetup','_Pecode',
            +            '_Peject','_Pepage','_Pform','_Plength','_Plineno','_Ploffset',
            +            '_Ppitch','_Pquality','_Pretext','_Pscode','_Pspacing','_Pwait',
            +            '_Rmargin','_Runactivedoc','_Samples','_Screen','_Shell','_Spellchk',
            +            '_Sqlserver','_Startup','_Tabs','_Tally','_Text','_Throttle',
            +            '_Transport','_Triggerlevel','_Unix','_WebDevOnly','_WebMenu','_WebMsftHomePage',
            +            '_WebVFPHomePage','_WebVfpOnlineSupport','_Windows','_Wizard','_Wrap','_scctext',
            +            '_vfp','Additive','After','Again','Aindent','Alignright',
            +            'All','Alt','Alternate','And','Ansi','Any',
            +            'Aplabout','App','Array','As','Asc','Ascending',
            +            'Ascii','At','Attributes','Automatic','Autosave','Avg',
            +            'Bar','Before','Bell','Between','Bitmap','Blank',
            +            'Blink','Blocksize','Border','Bottom','Brstatus','Bucket',
            +            'Buffers','By','Candidate','Carry','Cascade','Catalog',
            +            'Cdx','Center','Century','Cga','Character','Check',
            +            'Classlib','Clock','Cnt','Codepage','Collate','Color',
            +            'Com1','Com2','Command','Compact','Compatible','Compress',
            +            'Confirm','Connection','Connections','Connstring','Console','Copies',
            +            'Cpcompile','Cpdialog','Csv','Currency','Cycle','Databases',
            +            'Datasource','Date','Db4','Dbc','Dbf','Dbmemo3',
            +            'Debug','Decimals','Defaultsource','Deletetables','Delimited','Delimiters',
            +            'Descending','Design','Development','Device','Dif','Disabled',
            +            'Distinct','Dlls','Dohistory','Dos','Dosmem','Double',
            +            'Driver','Duplex','Echo','Editwork','Ega25','Ega43',
            +            'Ems','Ems64','Encrypt','Encryption','Environment','Escape',
            +            'Events','Exact','Except','Exe','Exists','Expression',
            +            'Extended','F','Fdow','Fetch','Field','Fields',
            +            'File','Files','Fill','Fixed','Float','Foldconst',
            +            'Font','Footer','Force','Foreign','Fox2x','Foxplus',
            +            'Free','Freeze','From','Fullpath','Fw2','Fweek',
            +            'Get','Gets','Global','Group','Grow','Halfheight',
            +            'Having','Heading','Headings','Helpfilter','History','Hmemory',
            +            'Hours','Id','In','Indexes','Information','Instruct',
            +            'Int','Integer','Intensity','Intersect','Into','Is',
            +            'Isometric','Key','Keycolumns','Keycomp','Keyset','Last',
            +            'Ledit','Level','Library','Like','Linked','Lock',
            +            'Logerrors','Long','Lpartition','Mac','Macdesktop','Machelp',
            +            'Mackey','Macros','Mark','Master','Max','Maxmem',
            +            'Mdi','Memlimit','Memory','Memos','Memowidth','Memvar',
            +            'Menus','Messages','Middle','Min','Minimize','Minus',
            +            'Mod','Modal','Module','Mono43','Movers','Multilocks',
            +            'Mvarsiz','Mvcount','N','Near','Negotiate','Noalias',
            +            'Noappend','Noclear','Noclose','Noconsole','Nocptrans','Nodata',
            +            'Nodebug','Nodelete','Nodup','Noedit','Noeject','Noenvironment',
            +            'Nofloat','Nofollow','Nogrow','Noinit','Nolgrid','Nolink',
            +            'Nolock','Nomargin','Nomdi','Nomenu','Nominimize','Nomodify'
            +            ),
            +        3 => array('Nomouse','None','Nooptimize','Nooverwrite','Noprojecthook','Noprompt',
            +            'Noread','Norefresh','Norequery','Norgrid','Norm','Normal',
            +            'Nosave','Noshadow','Noshow','Nospace','Not','Notab',
            +            'Notify','Noupdate','Novalidate','Noverify','Nowait','Nowindow',
            +            'Nowrap','Nozoom','Npv','Null','Number','Objects',
            +            'Odometer','Of','Off','Oleobjects','Only','Optimize',
            +            'Or','Orientation','Output','Outshow','Overlay','Overwrite',
            +            'Pad','Palette','Paperlength','Papersize','Paperwidth','Password',
            +            'Path','Pattern','Pause','Pdox','Pdsetup','Pen',
            +            'Pfs','Pixels','Plain','Popups','Precision','Preference',
            +            'Preview','Primary','Printer','Printquality','Procedures','Production',
            +            'Program','Progwork','Project','Prompt','Query','Random',
            +            'Range','Readborder','Readerror','Record','Recover','Redit',
            +            'Reference','References','Relative','Remote','Reprocess','Resource',
            +            'Rest','Restrict','Rgb','Right','Row','Rowset',
            +            'Rpd','Runtime','Safety','Same','Sample','Say',
            +            'Scale','Scheme','Scoreboard','Screen','Sdf','Seconds',
            +            'Selection','Shadows','Shared','Sheet','Shell','Shift',
            +            'Shutdown','Single','Some','Sortwork','Space','Sql',
            +            'Standalone','Status','Std','Step','Sticky','String',
            +            'Structure','Subclass','Summary','Sylk','Sysformats','Sysmenus',
            +            'System','T','Tab','Tables','Talk','Tedit',
            +            'Textmerge','Time','Timeout','Titles','Tmpfiles','To',
            +            'Topic','Transaction','Trap','Trbetween','Trigger','Ttoption',
            +            'Typeahead','Udfparms','Union','Unique','Userid','Users',
            +            'Values','Var','Verb','Vga25','Vga50','Views',
            +            'Volume','Where','Windows','Wk1','Wk3','Wks',
            +            'Workarea','Wp','Wr1','Wrap','Wrk','Xcmdfile',
            +            'Xl5','Xl8','Xls','Y','Yresolution','Zoom',
            +            'Activate','ActivateCell','Add','AddColumn','AddItem','AddListItem',
            +            'AddObject','AddProperty','AddToSCC','AfterBuild','AfterCloseTables','AfterDock',
            +            'AfterRowColChange','BeforeBuild','BeforeDock','BeforeOpenTables','BeforeRowColChange','Box',
            +            'Build','CheckIn','CheckOut','Circle','Clear','ClearData',
            +            'Cleanup','Click','CloneObject','CloseEditor','CloseTables','Cls',
            +            'CommandTargetExec','CommandTargetQueryStas','ContainerRelease','DataToClip','DblClick','Deactivate',
            +            'Delete','DeleteColumn','Deleted','Destroy','DoCmd','Dock',
            +            'DoScroll','DoVerb','DownClick','Drag','DragDrop','DragOver',
            +            'DropDown','Draw','EnterFocus','Error','ErrorMessage','Eval',
            +            'ExitFocus','FormatChange','GetData','GetFormat','GetLatestVersion','GoBack',
            +            'GotFocus','GoForward','GridHitTest','Hide','HideDoc','IndexToItemId',
            +            'Init','InteractiveChange','Item','ItemIdToIndex','KeyPress','Line',
            +            'Load','LostFocus','Message','MiddleClick','MouseDown','MouseMove',
            +            'MouseUp','MouseWheel','Move','Moved','NavigateTo','Newobject',
            +            'OLECompleteDrag','OLEDrag','OLEDragDrop','OLEDragOver','OLEGiveFeedback','OLESetData',
            +            'OLEStartDrag','OpenEditor','OpenTables','Paint','Point','Print',
            +            'ProgrammaticChange','PSet','QueryAddFile','QueryModifyFile','QueryRemoveFile','QueryRunFile',
            +            'QueryUnload','RangeHigh','RangeLow','ReadActivate','ReadExpression','ReadDeactivate',
            +            'ReadMethod','ReadShow','ReadValid','ReadWhen','Refresh','Release',
            +            'RemoveFromSCC','RemoveItem','RemoveListItem','RemoveObject','Requery','RequestData',
            +            'Reset','ResetToDefault','Resize','RightClick','SaveAs','SaveAsClass',
            +            'Scrolled','SetAll','SetData','SetFocus','SetFormat','SetMain',
            +            'SetVar','SetViewPort','ShowDoc','ShowWhatsThis','TextHeight','TextWidth',
            +            'Timer','UIEnable','UnDock','UndoCheckOut','Unload','UpClick',
            +            'Valid','WhatsThisMode','When','WriteExpression','WriteMethod','ZOrder',
            +            'ATGetColors','ATListColors','Accelerate','ActiveColumn','ActiveControl','ActiveForm',
            +            'ActiveObjectId','ActivePage','ActiveProject','ActiveRow','AddLineFeeds','Alias',
            +            'Alignment','AllowAddNew','AllowHeaderSizing','AllowResize','AllowRowSizing','AllowTabs',
            +            'AlwaysOnTop','Application','AutoActivate','AutoCenter','AutoCloseTables','AutoIncrement',
            +            'AutoOpenTables','AutoRelease','AutoSize','AutoVerbMenu','AutoYield','AvailNum',
            +            'BackColor','BackStyle','BaseClass','BorderColor','BorderStyle','BorderWidth',
            +            'Bound','BoundColumn','BoundTo','BrowseAlignment','BrowseCellMarg','BrowseDestWidth',
            +            'BufferMode','BufferModeOverride','BuildDateTime','ButtonCount','ButtonIndex','Buttons',
            +            'CLSID','CanAccelerate','CanGetFocus','CanLoseFocus','Cancel','Caption',
            +            'ChildAlias','ChildOrder','Class','ClassLibrary','ClipControls','ClipRect',
            +            'Closable','ColorScheme','ColorSource','ColumnCount','ColumnHeaders','ColumnLines',
            +            'ColumnOrder','ColumnWidths','Columns','Comment','ContinuousScroll','ControlBox',
            +            'ControlCount','ControlIndex','ControlSource','Controls','CurrentControl','CurrentX',
            +            'CurrentY','CursorSource','Curvature','DataSession','DataSessionId','DataSourceObj',
            +            'DataType','Database','DateFormat','DateMark','DefButton','DefButtonOrig',
            +            'DefHeight','DefLeft','DefTop','DefWidth','Default','DefaultFilePath',
            +            'DefineWindows','DeleteMark','Desktop','Dirty','DisabledBackColor','DisabledByEOF',
            +            'DisabledForeColor','DisabledItemBackColor','DisabledItemForeColor','DisabledPicture','DispPageHeight','DispPageWidth',
            +            'DisplayCount','DisplayValue','DoCreate','DockPosition','Docked','DocumentFile',
            +            'DownPicture','DragIcon','DragMode','DragState','DrawMode','DrawStyle',
            +            'DrawWidth','DynamicAlignment','DynamicBackColor','DynamicCurrentControl','DynamicFontBold','DynamicFontItalic',
            +            'DynamicFontName','DynamicFontOutline','DynamicFontShadow','DynamicFontSize','DynamicFontStrikethru','DynamicFontUnderline',
            +            'DynamicForeColor','EditFlags','Enabled','EnabledByReadLock','Encrypted','EnvLevel',
            +            'ErasePage','FileClass','FileClassLibrary','FillColor','FillStyle','Filter',
            +            'FirstElement','FontBold','FontItalic','FontName','FontOutline','FontShadow',
            +            'FontSize','FontStrikethru','FontUnderline','ForceFocus','ForeColor','FormCount',
            +            'FormIndex','FormPageCount','FormPageIndex','Format','Forms','FoxFont',
            +            'FullName','GoFirst','GoLast','GridLineColor','GridLineWidth','GridLines'
            +            ),
            +        4 => array('HPROJ','HWnd','HalfHeightCaption','HasClip','HeaderGap','HeaderHeight',
            +            'Height','HelpContextID','HideSelection','Highlight','HomeDir','HostName',
            +            'HotKey','HscrollSmallChange','IMEMode','Icon','IgnoreInsert','InResize',
            +            'Increment','IncrementalSearch','InitialSelectedAlias','InputMask','Instancing','IntegralHeight',
            +            'Interval','ItemBackColor','ItemData','ItemForeColor','ItemIDData','ItemTips',
            +            'JustReadLocked','KeyPreview','KeyboardHighValue','KeyboardLowValue','LastModified','Left',
            +            'LeftColumn','LineSlant','LinkMaster','List','ListCount','ListIndex',
            +            'ListItem','ListItemId','LockDataSource','LockScreen','MDIForm','MainClass',
            +            'MainFile','Margin','MaxButton','MaxHeight','MaxLeft','MaxLength',
            +            'MaxTop','MaxWidth','MemoWindow','MinButton','MinHeight','MinWidth',
            +            'MouseIcon','MousePointer','Movable','MoverBars','MultiSelect','Name',
            +            'NapTime','NewIndex','NewItemId','NoDataOnLoad','NoDefine','NotifyContainer',
            +            'NullDisplay','NumberOfElements','OLEDragMode','OLEDragPicture','OLEDropEffects','OLEDropHasData',
            +            'OLEDropMode','OLERequestPendingTimeOut','OLEServerBusyRaiseError','OLEServerBusyTimeOut','OLETypeAllowed','OleClass',
            +            'OleClassId','OleControlContainer','OleIDispInValue','OleIDispOutValue','OleIDispatchIncoming','OleIDispatchOutgoing',
            +            'OnResize','OneToMany','OpenViews','OpenWindow','PageCount','PageHeight',
            +            'PageOrder','PageWidth','Pages','Panel','PanelLink','Parent',
            +            'ParentAlias','ParentClass','Partition','PasswordChar','Picture','ProcessID',
            +            'ProgID','ProjectHookClass','ProjectHookLibrary','Projects','ReadColors','ReadCycle',
            +            'ReadFiller','ReadLock','ReadMouse','ReadOnly','ReadSave','ReadSize',
            +            'ReadTimeout','RecordMark','RecordSource','RecordSourceType','Rect','RelationalExpr',
            +            'RelativeColumn','RelativeRow','ReleaseErase','ReleaseType','ReleaseWindows','Resizable',
            +            'RightToLeft','RowHeight','RowSource','RowSourceType','SCCProvider','SCCStatus',
            +            'SDIForm','ScaleMode','ScrollBars','SelLength','SelStart','SelText',
            +            'SelectOnEntry','Selected','SelectedBackColor','SelectedForeColor','SelectedID','SelectedItemBackColor',
            +            'SelectedItemForeColor','SelfEdit','ServerClass','ServerClassLibrary','ServerHelpFile','ServerName',
            +            'ServerProject','ShowTips','ShowWindow','Sizable','Size','Size',
            +            'Size','Skip','SkipForm','Sorted','SourceType','Sparse',
            +            'SpecialEffect','SpinnerHighValue','SpinnerLowValue','SplitBar','StartMode','StatusBarText',
            +            'Stretch','StrictDateEntry','Style','SystemRefCount','TabIndex','TabStop',
            +            'TabStretch','TabStyle','Tabhit','Tabs','Tag','TerminateRead',
            +            'ThreadID','TitleBar','ToolTipText','Top','TopIndex','TopItemId',
            +            'TypeLibCLSID','TypeLibDesc','TypeLibName','UnlockDataSource','Value','ValueDirty',
            +            'VersionComments','VersionCompany','VersionCopyright','VersionDescription','VersionNumber','VersionProduct',
            +            'VersionTrademarks','View','ViewPortHeight','ViewPortLeft','ViewPortTop','ViewPortWidth',
            +            'Visible','VscrollSmallChange','WasActive','WasOpen','WhatsThisButton','WhatsThisHelp',
            +            'WhatsThisHelpID','Width','WindowList','WindowNTIList','WindowState','WindowType',
            +            'WordWrap','ZOrderSet','ActiveDoc','Checkbox','Column','ComboBox',
            +            'CommandButton','CommandGroup','Container','Control','Cursor','Custom',
            +            'DataEnvironment','EditBox','Empty','FontClass','Form','Formset',
            +            'General','Grid','Header','HyperLink','Image','Label',
            +            'ListBox','Memo','OleBaseControl','OleBoundControl','OleClassIDispOut','OleControl',
            +            'OptionButton','OptionGroup','Page','PageFrame','ProjectHook','RectClass',
            +            'Relation','Session','Shape','Spinner','TextBox' ,'Toolbar'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        "!", "@", "$", "%",
            +        "(", ")", "{", "}", "[", "]",
            +        "-", "+", "*", "/",
            +        "=", "<", ">",
            +        ":", ";", ",", ".", "&",
            +        "?", "??", "???"
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: blue;',
            +            2 => 'color: blue;',
            +            3 => 'color: blue;',
            +            4 => 'color: blue;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: green; font-style: italic;',
            +            2 => 'color: green; font-style: italic;',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: blue;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #006600;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: blue;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/visualprolog.php b/vendor/easybook/geshi/geshi/visualprolog.php
            new file mode 100644
            index 0000000000..26c438d21d
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/visualprolog.php
            @@ -0,0 +1,127 @@
            + 'Visual Prolog',
            +    'COMMENT_SINGLE' => array(1 => '%'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'HARDQUOTE' => array('@"', '"'),
            +    'HARDESCAPE' => array('""'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'clauses','constants','constructors','delegate','domains','facts',
            +            'goal','guards','inherits','monitor','namespace','open',
            +            'predicates','properties','resolve','supports'
            +            ),
            +        2 => array(
            +            'align','and','anyflow','as','bitsize','catch','determ','digits',
            +            'div','do','else','elseif','erroneous','externally','failure',
            +            'finally','from','language','mod','multi','nondeterm','or',
            +            'procedure','quot','rem','single','then','to'
            +            ),
            +        3 => array(
            +            '#bininclude','#else','#elseif','#endif','#error','#export',
            +            '#externally','#if','#import','#include','#message','#options',
            +            '#orrequires','#requires','#then','#warning'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '+', '-', '*', '?', '=', '/', '>', '<', '^', '!', ':', '(', ')', '{', '}', '[', ']'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => true,
            +        1 => true,
            +        2 => true,
            +        3 => true
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #808000;',
            +            2 => 'color: #333399;',
            +            3 => 'color: #800080;',
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #AA77BD',
            +            'MULTI' => 'color: #AA77BD'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #008080;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #00B7B7;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #0000FF;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #008000;',
            +            1 => 'color: #808000;',
            +            2 => 'color: #333399;',
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => ':',
            +        2 => '::'
            +        ),
            +    'REGEXPS' => array(
            +        0 => "(?)[A-Z_]\w*(?!\w)",
            +        1 => "\\b(end\\s+)?(implement|class|interface)\\b",
            +        2 => "\\b(end\\s+)?(foreach|if|try)\\b",
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4
            +);
            diff --git a/vendor/easybook/geshi/geshi/whitespace.php b/vendor/easybook/geshi/geshi/whitespace.php
            new file mode 100644
            index 0000000000..eec0be3f67
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/whitespace.php
            @@ -0,0 +1,119 @@
            + 'Whitespace',
            +    'COMMENT_SINGLE' => array(),
            +    'COMMENT_MULTI' => array(),
            +    'COMMENT_REGEXP' => array(
            +        3 => "/[^\n\x20\x09]+/s"
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_UPPER,
            +    'QUOTEMARKS' => array(),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        ),
            +    'SYMBOLS' => array(
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            ),
            +        'COMMENTS' => array(
            +            3 => 'color: #666666; font-style: italic;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            2 => 'background-color: #FF9999;',
            +            3 => 'background-color: #9999FF;'
            +            )
            +        ),
            +    'URLS' => array(
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        2 => array(
            +            GESHI_SEARCH => "(? " ",
            +            GESHI_MODIFIERS => 's',
            +            GESHI_BEFORE => "",
            +            GESHI_AFTER => ""
            +            ),
            +        3 => array(
            +            GESHI_SEARCH => "\x09",
            +            GESHI_REPLACE => "	",
            +            GESHI_MODIFIERS => 's',
            +            GESHI_BEFORE => "",
            +            GESHI_AFTER => ""
            +            ),
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4,
            +    'PARSER_CONTROL' => array(
            +        'ENABLE_FLAGS' => array(
            +            'KEYWORDS' => GESHI_NEVER,
            +            'SYMBOLS' => GESHI_NEVER,
            +            'STRINGS' => GESHI_NEVER,
            +//            'REGEXPS' => GESHI_NEVER,
            +            'NUMBERS' => GESHI_NEVER
            +            )
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/whois.php b/vendor/easybook/geshi/geshi/whois.php
            new file mode 100644
            index 0000000000..6d5760882f
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/whois.php
            @@ -0,0 +1,180 @@
            + 'Whois (RPSL format)',
            +    'COMMENT_SINGLE' => array(1 => '% ', 2 => '%ERROR:'),
            +    'COMMENT_MULTI' => array(),
            +    'COMMENT_REGEXP' => array(
            +        //Description
            +        3 => '/(?:(?<=^remarks:)|(?<=^descr:))(.|\n\s)*$/mi',
            +
            +        //Contact Details
            +        4 => '/(?<=^address:)(.|\n\s)*$/mi',
            +        5 => '/\+\d+(?:(?:\s\(\d+(\s\d+)*\))?(?:\s\d+)+|-\d+-\d+)/',
            +        6 => '/\b(?!-|\.)[\w\-\.]+(?!-|\.)@((?!-)[\w\-]+\.)+\w+\b/',
            +
            +        //IP, Networks and AS information\links
            +        7 => '/\b(? '/\bAS\d+\b/'
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array(),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array( //Object Types
            +            'as-block','as-set','aut-num','domain','filter-set','inet-rtr',
            +            'inet6num','inetnum','irt','key-cert','limerick','mntner',
            +            'organisation','peering-set','person','poem','role','route-set',
            +            'route','route6','rtr-set'
            +            ),
            +        2 => array( //Field Types
            +            'abuse-mailbox','address','admin-c','aggr-bndry','aggr-mtd','alias',
            +            'as-block','as-name','as-set','aut-num','auth','author','certif',
            +            'changed','components','country','default','descr','dom-net',
            +            'domain','ds-rdata','e-mail','encryption','export','export-comps',
            +            'fax-no','filter','filter-set','fingerpr','form','holes','ifaddr',
            +            'import','inet-rtr','inet6num','inetnum','inject','interface','irt',
            +            'irt-nfy','key-cert','limerick','local-as','mbrs-by-ref',
            +            'member-of','members','method','mnt-by','mnt-domains','mnt-irt',
            +            'mnt-lower','mnt-nfy','mnt-ref','mnt-routes','mntner','mp-default',
            +            'mp-export','mp-filter','mp-import','mp-members','mp-peer',
            +            'mp-peering','netname','nic-hdl','notify','nserver','org',
            +            'org-name','org-type','organisation','origin','owner','peer',
            +            'peering','peering-set','person','phone','poem','ref-nfy','refer',
            +            'referral-by','remarks','rev-srv','role','route','route-set',
            +            'route6','rtr-set','signature','source','status','sub-dom','tech-c',
            +            'text','upd-to','zone-c'
            +            ),
            +        3 => array( //RPSL reserved
            +            'accept','action','and','announce','any','as-any','at','atomic',
            +            'except','from','inbound','into','networks','not','or','outbound',
            +            'peeras','refine','rs-any','to'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        ':'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0000FF; font-weight: bold;',
            +            2 => 'color: #000080; font-weight: bold;',
            +            3 => 'color: #990000; font-weight: bold;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #666666; font-style: italic;',
            +            2 => 'color: #666666; font-style: italic;',
            +            3 => 'color: #404080;',
            +            4 => 'color: #408040;',
            +            5 => 'color: #408040;',
            +            6 => 'color: #408040;',
            +            7 => 'color: #804040;',
            +            8 => 'color: #804040;',
            +            'MULTI' => 'color: #666666; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;',
            +            'HARD' => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #009900;'
            +            ),
            +        'STRINGS' => array(
            +            0 => '',
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #000080;',
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #0000FF;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #000088;'
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => 'http://www.irr.net/docs/rpsl.html'
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        //Variables
            +        0 => "[\\$]{1,2}[a-zA-Z_][a-zA-Z0-9_]*"
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_MAYBE,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4,
            +    'PARSER_CONTROL' => array(
            +        'KEYWORDS' => array(
            +            1 => array(
            +                'DISALLOWED_BEFORE' => '(?<=\A |\A \n(?m:^)|\n\n(?m:^))'
            +                ),
            +            2 => array(
            +                'DISALLOWED_BEFORE' => '(?m:^)'
            +                )
            +            ),
            +        'ENABLE_FLAGS' => array(
            +            'BRACKETS' => GESHI_NEVER,
            +            'SYMBOLS' => GESHI_NEVER,
            +            'BRACKETS' => GESHI_NEVER,
            +            'STRINGS' => GESHI_NEVER,
            +            'ESCAPE_CHAR' => GESHI_NEVER,
            +            'NUMBERS' => GESHI_NEVER,
            +            'METHODS' => GESHI_NEVER,
            +            'SCRIPT' => GESHI_NEVER
            +            )
            +        ),
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/winbatch.php b/vendor/easybook/geshi/geshi/winbatch.php
            new file mode 100644
            index 0000000000..d8c19ceba5
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/winbatch.php
            @@ -0,0 +1,368 @@
            + 'Winbatch',
            +    'COMMENT_SINGLE' => array(1 => ';', 2 => ':'),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"', '`'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'While', 'To', 'Then', 'Switch', 'Select', 'Return', 'Next', 'IntControl', 'Include', 'In', 'If',
            +            'Goto', 'GoSub', 'ForEach', 'For', 'Exit', 'Execute', 'ErrorMode', 'EndWhile', 'EndSwitch', '#EndSubRoutine',
            +            'EndSelect', 'EndIf', '#EEndFunction', 'EndFor', 'End', 'Else', 'DropWild', 'Drop', '#DefineSubRoutine',
            +            '#DefineFunction', 'Debug', 'Continue', 'Case', 'CallExt', 'Call', 'By', 'BreakPoint', 'Break'
            +            ),
            +        2 => array(
            +            'ZOOMED', 'YES', 'WORD4', 'WORD2', 'WORD1', 'WHOLESECTION', 'WAIT', 'UNSORTED', 'UNCHECK', 'TRUE', 'TILE',
            +            'TAB', 'STRING', 'STACK', 'SPC2NET', 'SORTED', 'SOK', 'SNET2PC', 'SINGLE', 'SHIFT', 'SERVER', 'SERRWINSOCK',
            +            'SERRVOICE', 'SERRSOCKET', 'SERRSERVICE', 'SERRSELECT', 'SERRPARAM', 'SERROUTOFMEM', 'SERRNOTFOUND', 'SERRNOCONN',
            +            'SERRNOANSWER', 'SERRMUSTWAIT', 'SERRIPADDR', 'SERRHOSTNAME', 'SERRFAILURE', 'SERRBUSY', 'SCROLLLOCK', 'SCANCEL',
            +            'SAVE', 'SALREADY', 'ROWS', 'REGUSERS', 'REGROOT', 'REGMACHINE', 'REGCURRENT', 'REGCLASSES', 'RDBLCLICK', 'RCLICK',
            +            'RBUTTON', 'RAD2DEG', 'QSUCCESSINFO', 'QSUCCESS', 'QSTILLEX', 'QROLLBACK', 'QNULL', 'QNODATA', 'QNEXT', 'QNEEDDATA',
            +            'QFIRST', 'QCOMMIT', 'QBADHANDLE', 'PRINTER', 'PLANCKJOULES', 'PLANCKERGS', 'PI', 'PARSEONLY', 'PARSEC', 'P3ERRREPLY',
            +            'OPEN', 'ON', 'OFF', 'NUMLOCK', 'NOWAIT', 'NOTIFY', 'NORMAL', 'NORESIZE', 'NONE', 'NO', 'NCSAFORMAT', 'MULTIPLE',
            +            'MSFORMAT', 'MPLAYRDBLCK', 'MPLAYRCLK', 'MPLAYRBUTTON', 'MPLAYMDBLCK', 'MPLAYMCLK', 'MPLAYMBUTTON', 'MPLAYLDBLCK',
            +            'MPLAYLCLK', 'MPLAYLBUTTON', 'MINOR', 'MDBLCLICK', 'MCLICK', 'MBYESNO', 'MBUTTON', 'MBOKCANCEL', 'MAJOR', 'MAGFIELD',
            +            'LOCALGROUP', 'LIGHTMTPS', 'LIGHTMPS', 'LF', 'LDBLCLICK', 'LCLICK', 'LBUTTON', 'LAFFDBERROR', 'ICON', 'HTTPS', 'HTTP',
            +            'HNOHEADER', 'HMETHODPOST', 'HMETHODGET', 'HIDDEN', 'HHEADERONLY', 'HHEADER', 'GRAVITATION', 'GOPHER', 'GOLDENRATIO',
            +            'GMTSEC', 'GLOBALGROUP', 'GFTSEC', 'GETPROCID', 'GETEXITCODE', 'FWDSCAN', 'FTPPASSIVE', 'FTP', 'FLOAT8', 'FARADAY',
            +            'FALSE', 'EXTENDED', 'EULERS', 'ENABLE', 'ELECTRIC', 'DRIVE', 'DISABLE', 'DESCENDING', 'DEG2RAD', 'DEFAULT', 'CTRL',
            +            'CRLF', 'CR', 'COMMONFORMAT', 'COLUMNS', 'CHECK', 'CAPSLOCK', 'CANCEL', 'BOLTZMANN', 'BACKSCAN', 'AVOGADRO', 'ATTR_X',
            +            'ATTR_T', 'ATTR_SY', 'ATTR_SH', 'ATTR_RO', 'ATTR_RI', 'ATTR_P', 'ATTR_IC', 'ATTR_H', 'ATTR_DM', 'ATTR_DI', 'ATTR_DC',
            +            'ATTR_CI', 'ATTR_A', 'ASCENDING', 'ARRANGE', 'AMC', 'ACC_WRITE', 'ACC_READ_NT', 'ACC_READ_95', 'ACC_READ', 'ACC_PRINT_NT',
            +            'ACC_PMANG_NT', 'ACC_PFULL_NT', 'ACC_LIST', 'ACC_FULL_NT', 'ACC_FULL_95', 'ACC_DELETE', 'ACC_CREATE', 'ACC_CONTROL',
            +            'ACC_CHNG_NT', 'ACC_ATTRIB', 'ABOVEICONS'
            +            ),
            +        3 => array(
            +            'Yields', 'Yield', 'WinZoom', 'WinWaitExist', 'WinWaitClose', 'WinWaitChild', 'WinVersion', 'WinTitle', 'WinSysInfo',
            +            'WinState', 'WinShow', 'WinResources', 'WinPositionChild', 'WinPosition', 'WinPlaceSet', 'WinPlaceGet', 'WinPlaceChild',
            +            'WinPlace', 'WinParmSet', 'WinParmGet', 'WinName', 'WinMetrics', 'WinItemProcId', 'WinItemNameId', 'WinItemizeEx',
            +            'WinItemize', 'WinItemChild', 'WinIsDos', 'WinIdGet', 'WinIconize', 'WinHide', 'WinHelp', 'WinGetactive', 'WinExistchild',
            +            'WinExist', 'WinExename', 'WinConfig', 'WinClosenot', 'WinClose', 'WinArrange', 'WinActivechild', 'WinActivchild',
            +            'WinActivate', 'WebVerifyCard', 'WebSetTimeout', 'WebParamSize', 'WebParamNames', 'WebParamFile', 'WebParamData',
            +            'WebParamBuf', 'WebOutFile', 'WebOutBinary', 'WebOut', 'WebDumpError', 'WebDatData', 'WebCounter', 'WebConSize', 'WebConData',
            +            'WebConBuf', 'WebCmdData', 'WebBaseConv', 'Wallpaper', 'WaitForKeyEX', 'WaitForKey', 'VersionDLL', 'Version', 'VarType',
            +            'TimeYmdHms', 'TimeWait', 'TimeSubtract', 'TimeJulToYmd', 'TimeJulianDay', 'TimeDiffSecs', 'TimeDiffDays', 'TimeDiff', 'TimeDelay',
            +            'TimeDate', 'TimeAdd', 'TextSelect', 'TextBoxSort', 'TextBox', 'Terminate', 'Tanh', 'Tan', 'SysParamInfo', 'SvcWaitForCmd',
            +            'SvcSetState', 'SvcSetAccept', 'StrUpper', 'StrTrim', 'StrSubWild', 'StrSub', 'StrScan', 'StrReplace', 'StrLower', 'StrLenWild',
            +            'StrLen', 'StrIndexWild', 'StrIndexNC', 'StrIndex', 'StriCmp', 'StrFixLeft', 'StrFixCharsL', 'StrFixChars', 'StrFix', 'StrFill',
            +            'StrCnt', 'StrCmp', 'StrClean', 'StrCharCount', 'StrCat', 'StrByteCount', 'Sqrt', 'SoundVolume', 'Sounds', 'Snapshot', 'Sinh', 'Sin',
            +            'ShortCutMake', 'ShortCutInfo', 'ShortCutExtra', 'ShortCutEdit', 'ShortCutDir', 'ShellExecute', 'SendMenusToEx', 'SendMenusTo',
            +            'SendKeysTo', 'SendKeysChild', 'SendKey', 'RunZoomWait', 'RunZoom', 'RunWithLogon', 'RunWait', 'RunShell', 'RunIconWait',
            +            'RunIcon', 'RunHideWait', 'RunHide', 'RunExit', 'RunEnviron', 'Run', 'RtStatus', 'Reload', 'RegUnloadHive', 'RegSetValue',
            +            'RegSetQword', 'RegSetMulSz', 'RegSetExpSz', 'RegSetEx', 'RegSetDword', 'RegSetBin', 'RegQueryValue', 'RegQueryStr',
            +            'RegQueryQword', 'RegQueryMulSz', 'RegQueryKeys', 'RegQueryKeyLastWriteTime', 'RegQueryKey', 'RegQueryItem', 'RegQueryExpSz',
            +            'RegQueryEx', 'RegQueryDword', 'RegQueryBin', 'RegOpenKeyEx', 'RegOpenKey', 'RegOpenFlags', 'RegLoadHive', 'RegExistValue',
            +            'RegExistKey', 'RegEntryType', 'RegDelValue', 'RegDeleteKey', 'RegCreateKey', 'RegConnect', 'RegCloseKey', 'RegApp', 'Random',
            +            'PtrPersistent', 'PtrGlobalDefine', 'PtrGlobal', 'Print', 'PlayWaveform', 'PlayMidi', 'PlayMedia', 'PipeServerWrite', 'PipeServerRead',
            +            'PipeServerCreate', 'PipeServerClose', 'PipeInfo', 'PipeClientSendRecvData', 'PipeClientOpen', 'PipeClientClose', 'Pause',
            +            'ParseData', 'ObjectTypeGet', 'ObjectType', 'ObjectOpen', 'ObjectGet', 'ObjectEventRemove', 'ObjectEventAdd',
            +            'ObjectCreate', 'ObjectConstToArray', 'ObjectConstantsGet', 'ObjectCollectionOpen', 'ObjectCollectionNext',
            +            'ObjectCollectionClose', 'ObjectClose', 'ObjectAccess', 'Num2Char', 'NetInfo', 'MsgTextGet', 'MousePlay', 'MouseMove', 'MouseInfo',
            +            'MouseDrag', 'MouseCoords', 'MouseClickBtn', 'MouseClick', 'mod', 'Min', 'Message', 'Max', 'Loge', 'LogDisk', 'Log10', 'LastError',
            +            'KeyToggleSet', 'KeyToggleGet', 'ItemSortNc', 'ItemSort', 'ItemSelect', 'ItemReplace', 'ItemRemove', 'ItemLocate', 'ItemInsert',
            +            'ItemExtractCSV', 'ItemExtract', 'ItemCountCSV', 'ItemCount', 'IsNumber', 'IsLicensed', 'IsKeyDown', 'IsInt', 'IsFloat', 'IsDefined',
            +            'Int', 'InstallFile', 'IniWritePvt', 'IniWrite', 'IniReadPvt', 'IniRead', 'IniItemizePvt', 'IniItemize', 'IniDeletePvt', 'IniDelete',
            +            'IgnoreInput', 'IconReplace', 'IconInfo', 'IconExtract', 'IconArrange', 'GetTickCount', 'GetObject', 'GetExactTime', 'Floor',
            +            'FindWindow', 'FileYmdHms', 'FileWrite', 'FileVerInfo', 'FileTimeTouch', 'FileTimeSetEx', 'FileTimeSet', 'FileTimeGetEx',
            +            'FileTimeGet', 'FileTimeCode', 'FileSizeEx', 'FileSize', 'FileRoot', 'FileRename', 'FileRead', 'FilePutW', 'FilePut', 'FilePath',
            +            'FileOpen', 'FileNameShort', 'FileNameLong', 'FileNameEval2', 'FileNameEval1', 'FileMoveAttr', 'FileMove', 'FileMapName',
            +            'FileLocate', 'FileItemPath', 'FileItemize', 'FileInfoToArray', 'FileGetW', 'FileGet', 'FileFullname', 'FileExtension', 'FileExist',
            +            'FileDelete', 'FileCreateTemp', 'FileCopyAttr', 'FileCopy', 'FileCompare', 'FileClose', 'FileBaseName', 'FileAttrSetEx',
            +            'FileAttrSet', 'FileAttrGetEx', 'FileAttrGet', 'FileAppend', 'Fabs', 'ExtractAttachedFile', 'Exp', 'ExeTypeInfo', 'Exclusive',
            +            'EnvItemize', 'EnvironSet', 'Environment', 'EndSession', 'DosVersion', 'DllLoad', 'DllLastError', 'DllHwnd', 'DllHinst',
            +            'DllFree', 'DllCallCDecl', 'DllCall', 'Display', 'DiskVolinfo', 'DiskSize', 'DiskScan', 'DiskInfo', 'DiskFree', 'DiskExist',
            +            'DirWindows', 'DirSize', 'DirScript', 'DirRename', 'DirRemove', 'DirMake', 'DirItemize', 'DirInfoToArray', 'DirHome', 'DirGet',
            +            'DirExist', 'DirChange', 'DirAttrSetEx', 'DirAttrSet', 'DirAttrGetEx', 'DirAttrGet', 'DialogProcOptions', 'DialogObject',
            +            'DialogControlState', 'DialogControlSet', 'DialogControlGet', 'DialogBox', 'Dialog', 'Delay', 'Decimals', 'DebugTrace',
            +            'DebugData', 'DDETimeout', 'DDETerminate', 'DDERequest', 'DDEPoke', 'DDEInitiate', 'DDEExecute', 'DateTime', 'CurrFilepath',
            +            'CurrentPath', 'CurrentFile', 'CreateObject', 'Cosh', 'Cos', 'ClipPut', 'ClipHasFormat', 'ClipGetEx', 'ClipGet', 'ClipAppend',
            +            'ChrUnicodeToString', 'ChrUnicodeToHex', 'ChrStringToUnicode', 'ChrSetCodepage', 'ChrHexToUnicode', 'ChrGetCodepage',
            +            'Char2Num', 'Ceiling', 'ButtonNames', 'BoxUpdates', 'BoxTitle', 'BoxTextFont', 'BoxTextColor', 'BoxText', 'BoxShut', 'BoxPen',
            +            'BoxOpen', 'BoxNew', 'BoxMapmode', 'BoxesUp', 'BoxDrawText', 'BoxDrawRect', 'BoxDrawLine', 'BoxDrawCircle', 'BoxDestroy',
            +            'BoxDataTag', 'BoxDataClear', 'BoxColor', 'BoxCaption', 'BoxButtonWait', 'BoxButtonStat', 'BoxButtonKill', 'BoxButtonDraw',
            +            'BoxBitMap', 'BinaryXor', 'BinaryXlate', 'BinaryWriteEx', 'BinaryWrite', 'BinaryTagRepl', 'BinaryTagLen', 'BinaryTagInit',
            +            'BinaryTagIndex', 'BinaryTagFind', 'BinaryTagExtr', 'BinaryStrCnt', 'BinarySort', 'BinaryReplace', 'BinaryReadEx',
            +            'BinaryRead', 'BinaryPokeStrW', 'BinaryPokeStr', 'BinaryPokeHex', 'BinaryPokeFlt', 'BinaryPoke4', 'BinaryPoke2', 'BinaryPoke',
            +            'BinaryPeekStrW', 'BinaryPeekStr', 'BinaryPeekHex', 'BinaryPeekFlt', 'BinaryPeek4', 'BinaryPeek2', 'BinaryPeek', 'BinaryOr',
            +            'BinaryOleType', 'BinaryIndexNc', 'BinaryIndexEx', 'BinaryIndexBin', 'BinaryIndex', 'BinaryIncrFlt', 'BinaryIncr4',
            +            'BinaryIncr2', 'BinaryIncr', 'BinaryHashRec', 'BinaryFree', 'BinaryEodSet', 'BinaryEodGet', 'BinaryCopy', 'BinaryConvert',
            +            'BinaryCompare', 'BinaryClipPut', 'BinaryClipGet', 'BinaryChecksum', 'BinaryBufInfo', 'BinaryAnd', 'BinaryAllocArray',
            +            'BinaryAlloc', 'Beep', 'Average', 'Atan', 'AskYesNo', 'AskTextbox', 'AskPassword', 'AskLine', 'AskItemlist', 'AskFont',
            +            'AskFiletext', 'AskFilename', 'AskDirectory', 'AskColor', 'Asin', 'ArrInitialize', 'ArrInfo', 'ArrDimension',
            +            'Arrayize', 'ArrayFilePutCSV', 'ArrayFilePut', 'ArrayFileGetCSV', 'ArrayFileGet', 'AppWaitClose', 'AppExist', 'AddExtender',
            +            'Acos', 'Abs', 'About'
            +            ),
            +        4 => array(
            +            'zZipFiles', 'zVersionInfo', 'zVersion', 'zUnZipFiles', 'zSetPortBit', 'zRPortShift', 'zPortOut', 'zPortIn', 'zNotPortBit',
            +            'zLPortShift', 'zGetPortBit', 'zClrPortBit', 'xVerifyCCard', 'xSendMessage', 'xMessageBox', 'xMemCompact', 'xHex', 'xGetElapsed',
            +            'xGetChildHwnd', 'xExtenderInfo', 'xEnumStreams', 'xEjectMedia', 'xDriveReady', 'xDiskLabelGet', 'xCursorSet', 'xBaseConvert',
            +            'wxPing', 'wxParmSet', 'wxParmGet', 'wxMsgSetHdr', 'wxMsgGetHdr', 'wxMsgGetBody', 'wxHost2Addr', 'wxGetLastErr', 'wxGetInfo',
            +            'wxGetErrDesc', 'wxAddr2Host', 'wtsWaitSystemEvent', 'wtsVersion', 'wtsTerminateProcess', 'wtsShutdownSystem', 'wtsSendMessage',
            +            'wtsQuerySessionInfo', 'wtsProcIdToSessId', 'wtsLogoffSession', 'wtsLastErrMsg', 'wtsIsTSEnabled', 'wtsIsCitrixEnabled',
            +            'wtsGetActiveConsoleSessId', 'wtsEnumSessions', 'wtsEnumProcesses', 'wtsDisconnectSession', 'wnWrkGroups', 'wnVersion', 'wntWtsUserSet',
            +            'wntWtsUserGet', 'wntVersion', 'wntUserSidChk', 'wntUserSetDat', 'wntUserRename', 'wntUserProps', 'wntUserList', 'wntUserInfo',
            +            'wntUserGetDat', 'wntUserFiles', 'wntUserExist', 'wntUserDel', 'wntUserAddDat', 'wntUserAdd', 'wntSvcStatus', 'wntSvcStart',
            +            'wntSvcList', 'wntSvcDelete', 'wntSvcCreate', 'wntSvcControl', 'wntSvcCfgSet', 'wntSvcCfgGet', 'wntShutdown', 'wntShareUsers',
            +            'wntShareSet', 'wntShareList', 'wntShareInfo', 'wntShareDel', 'wntShareAdd', 'wntServiceInf', 'wntServiceAt', 'wntServerType',
            +            'wntServerList', 'wntServerInfo', 'wntSecurityGet', 'wntRunAsUser', 'wntResources2', 'wntResources', 'wntRemoteTime', 'wntRasUserSet',
            +            'wntRasUserGet', 'wntProfileInfo', 'wntProfileDel', 'wntPrivUsers', 'wntPrivList', 'wntPrivGet', 'wntPrivDel', 'wntPrivAdd',
            +            'wntOwnerSet', 'wntOwnerGet', 'wntMemberSet', 'wntMemberLst2', 'wntMemberList', 'wntMemberGrps', 'wntMemberGet', 'wntMemberDel',
            +            'wntLsaPolSet', 'wntLsaPolGet', 'wntListGroups', 'wntLastErrMsg', 'wntGroupRen', 'wntGroupInfo', 'wntGroupEdit', 'wntGroupDel',
            +            'wntGroupAdd', 'wntGetUser', 'wntGetDrive', 'wntGetDc', 'wntGetCon', 'wntFileUsers', 'wntFilesOpen', 'wntFileClose', 'wntEventWrite',
            +            'wntEventLog', 'wntDomainSync', 'wntDirDialog', 'wntDfsList', 'wntDfsGetInfo', 'wntCurrUsers', 'wntChgPswd', 'wntCancelCon',
            +            'wntAuditMod', 'wntAuditList', 'wntAuditGet', 'wntAuditDel', 'wntAuditAdd2', 'wntAuditAdd', 'wntAddPrinter', 'wntAddDrive',
            +            'wntAcctPolSet', 'wntAcctPolGet', 'wntAcctList', 'wntAcctInfo', 'wntAccessMod', 'wntAccessList', 'wntAccessGet', 'wntAccessDel',
            +            'wntaccessadd2', 'wntAccessAdd', 'wnShares', 'wnSharePath', 'wnShareName', 'wnShareCnt', 'wnServers', 'wnRestore', 'wnNetNames',
            +            'wnGetUser', 'wnGetCon', 'wnGetCaps', 'wnDlgShare', 'wnDlgNoShare', 'wnDlgDiscon', 'wnDlgCon4', 'wnDlgCon3', 'wnDlgCon2', 'wnDlgCon',
            +            'wnDlgBrowse', 'wnDialog', 'wnCmptrInfo', 'wnCancelCon', 'wnAddCon', 'WaitSRQ', 'w9xVersion', 'w9xUserSetDat', 'w9xUserRename',
            +            'w9xUserprops', 'w9xUserList', 'w9xUserinfo', 'w9xUserGetDat', 'w9xUserExist', 'w9xUserDel', 'w9xUserAddDat', 'w9xUserAdd', 'w9xShareSet',
            +            'w9xShareInfo', 'w9xShareDel', 'w9xShareAdd', 'w9xServiceAt', 'w9xServerList', 'w9xRemoteTime', 'w9xOwnerGet', 'w9xMemberSet',
            +            'w9xMemberList', 'w9xMemberGrps', 'w9xMemberGet', 'w9xMemberDel', 'w9xListGroups', 'w9xGroupInfo', 'w9xGroupDel', 'w9xGroupAdd',
            +            'w9xGetDC', 'w9xFileUsers', 'w9xAccessList', 'w9xAccessGet', 'w9xAccessDel', 'w9xAccessAdd', 'w95Version', 'w95ShareUsers',
            +            'w95ShareSet', 'w95ShareList', 'w95ShareInfo', 'w95ShareDel', 'w95ShareAdd', 'w95ServiceInf', 'w95ServiceAt', 'w95ServerType',
            +            'w95ServerInfo', 'w95Resources', 'w95GetUser', 'w95GetDrive', 'w95GetCon', 'w95FileUsers', 'w95FileClose', 'w95DirDialog',
            +            'w95CancelCon', 'w95AddPrinter', 'w95AddDrive', 'w95AccessDel', 'w95AccessAdd', 'w3Version', 'w3PrtBrowse', 'w3NetGetUser',
            +            'w3NetDialog', 'w3GetCon', 'w3GetCaps', 'w3DirBrowse', 'w3CancelCon', 'w3AddCon', 'urlGetScheme', 'urlEncode', 'urlDecode',
            +            'tVersion', 'tSetPriority', 'TriggerList', 'Trigger', 'tRemoteConn', 'tOpenProc', 'tListProc', 'tListMod', 'tKillProc', 'tGetProcInfo',
            +            'tGetPriority', 'tGetModInfo', 'tGetLastError', 'tGetData', 'TestSys', 'TestSRQ', 'tCountProc', 'tCompatible', 'tCloseProc',
            +            'tBrowseCntrs', 'sSendString', 'sSendNum', 'sSendLine', 'sSendBinary', 'sRecvNum', 'sRecvLine', 'sRecvBinary', 'SrchVersion',
            +            'SrchNext', 'SrchInit', 'SrchFree', 'sOpen', 'sOK2Send', 'sOK2Recv', 'smtpSendText', 'smtpSendFile', 'sListen', 'SetRWLS',
            +            'SendSetup', 'SendLLO', 'SendList', 'SendIFC', 'SendDataBytes', 'SendCmds', 'Send', 'sConnect', 'sClose', 'SByteOrder32',
            +            'sByteOrder16', 'sAccept', 'rRegVersion', 'rRegSearch', 'ResetSys', 'ReceiveSetup', 'Receive', 'ReadStsByte', 'RcvRespMsg',
            +            'RasVersion', 'RasTypeSize', 'RasRename', 'RasNumCons', 'RasNameValid', 'RasListActCon', 'RasItemize', 'RasHangUp', 'RasGetLastErr',
            +            'RasGetConStat', 'RasEntrySet', 'RasEntryInfo', 'RasEntryExist', 'RasEntryDel', 'RasEntryAdd', 'RasDialInfo', 'RasDial',
            +            'RasCopy', 'RasConStatus', 'qVersionInfo', 'qTransact', 'qTables', 'qSpecial', 'qSetConnOpt', 'qNumRsltCol', 'qNativeSql', 'qLastCode',
            +            'qGetData', 'qFreeStmt', 'qFreeEnv', 'qFreeConnect', 'qFetch', 'qExecDirect', 'qError', 'qDriverList', 'qDriverCon', 'qDisconnect',
            +            'qDataSources', 'qConnect', 'qConfigError', 'qConfigData', 'qColumns', 'qBindCol', 'qAllocStmt', 'qAllocEnv', 'qAllocConnect',
            +            'pWaitFor', 'pVersionInfo', 'pTimeout', 'pSetPublish', 'pSetPrtInfo', 'pSetPrtAttrib', 'pSetDefPrtEx', 'pSetDefPrt', 'pSendFile',
            +            'pRecvFile', 'pPutString', 'pPutLine', 'pPutChar', 'pPutByte', 'pPutBinary', 'PPollUnconfig', 'PPollConfig', 'PPoll', 'pPeekChar',
            +            'pPeekByte', 'pPaperSizes', 'pPaperBins', 'pModemSReg', 'pModemParams', 'pModemInit', 'pModemHangUp', 'pModemDial', 'pModemControl',
            +            'pModemConnect', 'pModemCommand', 'pModemAnsRing', 'pModemAnsCall', 'pMediaTypes', 'pGetString', 'pGetPublish', 'pGetPrtList',
            +            'pGetPrtInfo', 'pGetPrtAttrib', 'pGetLine', 'pGetLastError', 'pGetErrorMsg', 'pGetErrorCode', 'pGetDefPrtInf', 'pGetChar',
            +            'pGetByte', 'pGetBinary', 'pDelPrtConn', 'pDelPrinter', 'pComOpen', 'pComModify', 'pComInfo', 'pComControl', 'pComClose',
            +            'pCheckSum', 'pCheckBinary', 'pCaptureOn', 'pCaptureOff', 'pCaptureLog', 'PassControl', 'pAddPrtConn', 'pAddPrinter', 'p3RecvText',
            +            'p3RecvFile', 'p3Peek', 'p3Open', 'p3GetReply', 'p3Delete', 'p3Count', 'p3Close', 'nwWhoAmI', 'nwVfyPassword', 'nwVersion',
            +            'nwSrvShutdown', 'nwSrvNLMMgr', 'nwSrvGenGUID', 'nwSrvExecNCF', 'nwSetVolLimit', 'nwSetSrvParam', 'nwSetSrvInfo', 'nwSetPrimServ',
            +            'nwSetPassword', 'nwSetOptions', 'nwSetFileInfo', 'nwSetDirLimit', 'nwSetDirInfo', 'nwSetContext', 'nwSetBcastMode', 'nwServerList',
            +            'nwSendBcastMsg', 'nwSearchObjects', 'nwSearchFilter', 'nwRenameObject', 'nwRemoveObject', 'nwReceiveBcastMsg', 'nwNameConvert',
            +            'nwMutateObject', 'nwMoveObject', 'nwModifyObject', 'nwMapDelete', 'nwMap', 'nwLogout', 'nwLogin', 'nwListUserGroups',
            +            'nwListObjects', 'nwListGroupMembers', 'nwLastErrMsg', 'nwIsUserInGroup', 'nwGetVolLimit', 'nwGetSrvStats', 'nwGetSrvParam',
            +            'nwGetSrvInfo', 'nwGetSrvCfg', 'nwGetOptions', 'nwGetObjValue', 'nwGetObjInfo', 'nwGetNLMInfo', 'nwGetMapped', 'nwGetFileInfo',
            +            'nwGetDirLimit', 'nwGetDirInfo', 'nwGetContext', 'nwGetConnInfo', 'nwGetCapture', 'nwGetBcastMode', 'nwGetAttrInfo',
            +            'nwDriveStatus', 'nwDrivePath', 'nwDetachFromServer', 'nwDelUserFromGroup', 'nwDelConnNum', 'nwCompareObject', 'nwClientInfo',
            +            'nwChgPassword', 'nwAttachToServer', 'nwAddUserToGroup', 'nwAddObject', 'netVersion', 'netResources', 'netGetUser', 'netGetCon',
            +            'netDirDialog', 'netCancelCon', 'netAddPrinter', 'netAddDrive', 'n4Version', 'n4UserGroups', 'n4UserGroupEx', 'n4SetPrimServ',
            +            'n4SetOptions', 'n4SetContextG', 'n4SetContext', 'n4ServerList', 'n4ServerInfo', 'n4ObjSearch', 'n4ObjRename', 'n4ObjOptions',
            +            'n4ObjMove', 'n4ObjGetVal', 'n4ObjectProps', 'n4ObjectList', 'n4ObjectInfo', 'n4ObjDelete', 'n4NameConvert', 'n4MsgsEndAll',
            +            'n4MsgsEnd', 'n4MemberSet', 'n4MemberGet', 'n4MemberDel', 'n4MapRoot', 'n4MapDir', 'n4MapDelete', 'n4Map', 'n4LogoutTree',
            +            'n4Logout', 'n4Login', 'n4GetUserName', 'n4GetUserId', 'n4GetUser', 'n4GetNetAddr', 'n4GetMapped', 'n4GetContext',
            +            'n4GetConnNum', 'n4FileUsers', 'n4FileTimeGet', 'n4FileAttrSet', 'n4FileAttrGet', 'n4DriveStatus', 'n4DrivePath', 'n4DirTimeGet',
            +            'n4DirAttrSet', 'n4DirAttrGet', 'n4Detach', 'n4ChgPassword', 'n4CapturePrt', 'n4CaptureGet', 'n4CaptureEnd', 'n4Attach',
            +            'n3Version', 'n3UserGroups', 'n3ServerList', 'n3ServerInfo', 'n3MsgsEndAll', 'n3MsgsEnd', 'n3MemberSet', 'n3MemberGet',
            +            'n3MemberDel', 'n3Maproot', 'n3Mapdir', 'n3Mapdelete', 'n3Map', 'n3Logout', 'n3GetUserId', 'n3GetUser', 'n3GetNetAddr',
            +            'n3GetMapped', 'n3GetConnNum', 'n3FileTimeGet', 'n3FileAttrSet', 'n3FileAttrGet', 'n3DriveStatus', 'n3DrivePath',
            +            'n3DirTimeGet', 'n3DirAttrSet', 'n3DirAttrGet', 'n3Detach', 'n3ChgPassword', 'n3CapturePrt', 'n3CaptureGet',
            +            'n3CaptureEnd', 'n3Attach', 'mVersion', 'mSyncMail', 'mSendMailEx', 'mSendMail', 'mrecvmail', 'mReadNextMsg', 'mLogOn',
            +            'mLogOff', 'mFindNext', 'mError', 'mCompatible', 'kVerInfo', 'kStatusInfo', 'kSendText', 'kSendFile', 'kManageImap4',
            +            'kInit', 'kGetMail', 'kExtra', 'kDest', 'kDeletePop3', 'iWriteDataBuf', 'iWriteData', 'iVersion', 'IUrlOpen', 'iUrlEncode',
            +            'iUrlDecode', 'iReadDataBuf', 'iReadData', 'ipVersion', 'ipPing', 'iPing', 'ipHost2Addr', 'ipGetLastErr', 'ipGetAddress',
            +            'iParseURL', 'ipAddr2Host', 'iOptionSet', 'iOptionGet', 'ImgWave', 'ImgVersion', 'ImgUnsharpMask', 'ImgThreshold', 'ImgSwirl',
            +            'ImgSpread', 'ImgSolarize', 'ImgShear', 'ImgSharpen', 'ImgShade', 'ImgScale', 'ImgSample', 'ImgRotate', 'ImgResize',
            +            'ImgReduceNoise', 'ImgRaise', 'ImgOilPaint', 'ImgNormalize', 'ImgNegate', 'ImgMotionBlur', 'ImgModulate', 'ImgMinify',
            +            'ImgMedianFilter', 'ImgMagnify', 'ImgLevel', 'ImgIsValid', 'ImgIsPalette', 'ImgIsMono', 'ImgIsGray', 'ImgInfo', 'ImgImplode',
            +            'ImgGetImageType', 'ImgGetColorCount', 'ImgGaussianBlur', 'ImgGamma', 'ImgFrame', 'ImgFlop', 'ImgFlip', 'ImgEqualize',
            +            'ImgEnhance', 'ImgEmboss', 'ImgCrop', 'ImgConvert', 'ImgContrast', 'ImgCompare', 'ImgColorize', 'ImgChop', 'ImgCharcoal',
            +            'ImgBorder', 'ImgBlur', 'ImgAddNoise', 'iLocFindNext', 'iLocFindInit', 'iHttpOpen', 'iHttpInit', 'iHttpHeaders', 'iHttpAccept',
            +            'iHostConnect', 'iHost2Addr', 'iGetResponse', 'iGetLastError', 'iGetIEVer', 'iGetConStatEx', 'iGetConState', 'iFtpRename',
            +            'iFtpPut', 'iFtpOpen', 'iFtpGet', 'iFtpFindNext', 'iFtpFindInit', 'iFtpDirRemove', 'iFtpDirMake', 'iFtpDirGet', 'iFtpDirChange',
            +            'iFtpDialog', 'iFtpDelete', 'iFtpCmd', 'iErrorDialog', 'iDialItemize', 'iDialHangUp', 'iDial', 'iCookieSet', 'iCookieGet',
            +            'iContentURL', 'iContentFile', 'iContentData', 'iClose', 'ibWrtf', 'ibWrt', 'ibWait', 'ibVersion', 'ibUnlock', 'ibTrg',
            +            'ibTmo', 'ibStop', 'ibStatus', 'ibSta', 'ibSre', 'ibSic', 'ibSad', 'ibRsv', 'ibRsp', 'ibRsc', 'ibRpp', 'ibRdf', 'ibRd',
            +            'ibPpc', 'ibPoke', 'ibPct', 'ibPad', 'ibOnl', 'ibMakeAddr', 'ibLock', 'ibLoc', 'ibLn', 'ibLines', 'ibIst', 'ibInit',
            +            'ibGts', 'ibGetSad', 'ibGetPad', 'ibFind', 'ibEvent', 'ibErr', 'ibEot', 'ibEos', 'iBegin', 'ibDma', 'ibDev', 'ibConfig',
            +            'ibCntl', 'ibCnt', 'ibCmda', 'ibCmd', 'ibClr', 'ibCac', 'ibBna', 'ibAsk', 'iAddr2Host', 'huge_Thousands', 'huge_Subtract',
            +            'huge_SetOptions', 'huge_Multiply', 'huge_GetLastError', 'huge_ExtenderInfo', 'huge_Divide', 'huge_Decimal', 'huge_Add',
            +            'httpStripHTML', 'httpRecvTextF', 'httpRecvText', 'httpRecvQuery', 'httpRecvQryF', 'httpRecvFile', 'httpGetServer',
            +            'httpGetQuery', 'httpGetPath', 'httpGetFile', 'httpGetDir', 'httpGetAnchor', 'httpFullPath', 'httpFirewall', 'httpAuth',
            +            'ftpRename', 'ftpQuote', 'ftpPut', 'ftpOpen', 'ftpList', 'ftpGet', 'ftpFirewall', 'ftpDelete', 'ftpClose', 'ftpChDir',
            +            'FindRQS', 'FindLstn', 'EnvSetVar', 'EnvPathDel', 'EnvPathChk', 'EnvPathAdd', 'EnvListVars', 'EnvGetVar', 'EnvGetInfo',
            +            'EnableRemote', 'EnableLocal', 'ehllapiWait', 'ehllapiVersion', 'ehllapiUninit', 'ehllapiStopKeyIntercept', 'ehllapiStopHostNotify',
            +            'ehllapiStopCloseIntercept', 'ehllapiStartKeyIntercept', 'ehllapiStartHostNotify', 'ehllapiStartCloseIntercept',
            +            'ehllapiSetWindowStatus', 'ehllapiSetSessionParams', 'ehllapiSetPSWindowName', 'ehllapiSetCursorLoc', 'ehllapiSendKey',
            +            'ehllapiSendFile', 'ehllapiSearchPS', 'ehllapiSearchField', 'ehllapiRunProfile', 'ehllapiResetSystem', 'ehllapiReserve',
            +            'ehllapiRelease', 'ehllapiReceiveFile', 'ehllapiQuerySystem', 'ehllapiQueryPSStatus', 'ehllapiQueryHostNotify',
            +            'ehllapiQueryFieldAttr', 'ehllapiQueryCursorLoc', 'ehllapiQueryCloseIntercept', 'ehllapiPostInterceptStatus',
            +            'ehllapiPause', 'ehllapiLastErrMsg', 'ehllapiInit', 'ehllapiGetWindowStatus', 'ehllapiGetPSHWND', 'ehllapiGetKey',
            +            'ehllapiFindFieldPos', 'ehllapiFindFieldLen', 'ehllapiDisconnectPS', 'ehllapiCvtRCToPos', 'ehllapiCvtPosToRC',
            +            'ehllapiCopyTextToPS', 'ehllapiCopyTextToField', 'ehllapiCopyTextFromPS', 'ehllapiCopyTextFromField', 'ehllapiCopyOIA',
            +            'ehllapiConnectPS', 'dunItemize', 'dunDisconnect', 'dunConnectEx', 'dunConnect', 'dsTestParam', 'dsSIDtoHexStr', 'dsSetSecProp',
            +            'dsSetProperty', 'dsSetPassword', 'dsSetObj', 'dsSetCredentX', 'dsSetCredent', 'dsRemFromGrp', 'dsRelSecObj', 'dsMoveObj',
            +            'dsIsObject', 'dsIsMemberGrp', 'dsIsContainer', 'dsGetUsersGrps', 'dsGetSecProp', 'dsGetPropName', 'dsGetProperty',
            +            'dsGetPrntPath', 'dsGetPrimGrp', 'dsGetMemGrp', 'dsGetInfo', 'dsGetClass', 'dsGetChldPath', 'dsFindPath', 'dsDeleteObj',
            +            'dsCreatSecObj', 'dsCreateObj', 'dsCopySecObj', 'dsAddToGrp', 'dsAclRemAce', 'dsAclOrderAce', 'dsAclGetAces', 'dsAclAddAce',
            +            'DevClearList', 'DevClear', 'dbTest', 'dbSwapColumns', 'dbSort', 'dbSetRecordField', 'dbSetOptions', 'dbSetErrorReporting',
            +            'dbSetEntireRecord', 'dbSetDelimiter', 'dbSave', 'dbOpen', 'dbNameColumn', 'dbMakeNewItem', 'dbInsertColumn', 'dbGetVersion',
            +            'dbGetSaveStatus', 'dbGetRecordField', 'dbGetRecordCount', 'dbGetNextItem', 'dbGetLastError', 'dbGetEntireRecord',
            +            'dbGetColumnType', 'dbGetColumnNumber', 'dbGetColumnName', 'dbGetColumnCount', 'dbFindRecord', 'dbExist', 'dbEasterEgg',
            +            'dbDeleteRecord', 'dbDeleteColumn', 'dbDebug', 'dbCookDatabases', 'dbClose', 'dbCloneRecord', 'dbBindCol', 'cWndState',
            +            'cWndinfo', 'cWndGetWndSpecName', 'cWndGetWndSpec', 'cWndexist', 'cWndByWndSpecName', 'cWndByWndSpec', 'cWndbyseq',
            +            'cWndbyname', 'cWndbyid', 'cWndbyclass', 'cWinIDConvert', 'cVersionInfo', 'cVendorId', 'cSetWndText', 'cSetUpDownPos',
            +            'cSetTvItem', 'cSetTrackPos', 'cSetTabItem', 'cSetLvItem', 'cSetLbItemEx', 'cSetLbItem', 'cSetIpAddr', 'cSetFocus',
            +            'cSetEditText', 'cSetDtpDate', 'cSetCbItem', 'cSetCalDate', 'cSendMessage', 'cRadioButton', 'cPostMessage', 'cPostButton',
            +            'cMemStat', 'cGetWndCursor', 'cGetUpDownPos', 'cGetUpDownMin', 'cGetUpDownMax', 'cGetTVItem', 'cGetTrackPos', 'cGetTrackMin',
            +            'cGetTrackMax', 'cGetTbText', 'cGetSbText', 'cGetLvText', 'cGetLvSelText', 'cGetLvFocText', 'cGetLvDdtText', 'cGetLvColText',
            +            'cGetLbText', 'cGetLbSelText', 'cGetLbCount', 'cGetIpAddr', 'cGetInfo', 'cGetHrText', 'cGetFocus', 'cGetEditText', 'cGetDtpDate',
            +            'cGetControlImageCRC', 'cGetCBText', 'cGetCbCount', 'cGetCalDate', 'cFindByName', 'cFindByClass', 'cEnablestate', 'cDblClickItem',
            +            'cCpuSupt', 'cCpuSpeed', 'cCpuIdExt', 'cCpuId', 'cCpuFeat', 'cCpuBenchmark', 'cCloneCheck', 'cClickToolbar', 'cClickButton',
            +            'cClearTvItem', 'cClearLvItem', 'cClearLbAll', 'cCheckbox', 'aVersion', 'aStatusbar', 'aShellFolder', 'aMsgTimeout', 'AllSPoll',
            +            'aGetLastError', 'aFileRename', 'aFileMove', 'aFileDelete', 'aFileCopy'
            +            ),
            +        5 => array(
            +            'wWordRight', 'wWordLeft', 'wWinTile', 'wWinRestore', 'wWinNext', 'wWinMinimize', 'wWinMaximize', 'wWinCloseAll', 'wWinClose',
            +            'wWinCascade', 'wWinArricons', 'wViewOutput', 'wViewOptions', 'wViewHtml', 'wUpperCase', 'wUpline', 'wUndo', 'wTopOfFile', 'wToggleIns',
            +            'wTab', 'wStatusMsg', 'wStartSel', 'wSpellcheck', 'wSetProject', 'wSetPrefs', 'wSetColblk', 'wSetBookmark', 'wSelWordRight',
            +            'wSelWordLeft', 'wSelUp', 'wSelTop', 'wSelRight', 'wSelPgUp', 'wSelPgDn', 'wSelLeft', 'wSelInfo', 'wSelHome', 'wSelEnd', 'wSelectAll',
            +            'wSelDown', 'wSelBottom', 'wRunRebuild', 'wRunMake', 'wRunExecute', 'wRunDebug', 'wRunConfig', 'wRunCompile', 'wRunCommand', 'wRight',
            +            'wRepeat', 'wRedo', 'wRecord', 'wProperties', 'wPrintDirect', 'wPrinSetup', 'wPrevError', 'wPaste', 'wPageUp', 'wPageDown', 'wNextError',
            +            'wNewLine', 'wLowerCase', 'wLineCount', 'wLeft', 'wInvertCase', 'wInsString', 'wInsLine', 'wHome', 'wHelpKeyword', 'wHelpKeybrd',
            +            'wHelpIndex', 'wHelpHelp', 'wHelpCmds', 'wHelpAbout', 'wGotoLine', 'wGotoCol', 'wGetWrap', 'wGetWord', 'wGetUndo', 'wGetSelstate',
            +            'wGetRedo', 'wGetOutput', 'wGetModified', 'wGetLineNo', 'wGetIns', 'wGetFilename', 'wGetColNo', 'wGetChar', 'wFtpOpen', 'wFindNext',
            +            'wFindInFiles', 'wFind', 'wFileSaveAs', 'wFileSave', 'wFileRevert', 'wFilePrint', 'wFilePgSetup', 'wFileOpen', 'wFileNew', 'wFileMerge',
            +            'wFileList', 'wFileExit', 'wEndSel', 'wEndOfFile', 'wEnd', 'wEdWrap', 'wEdWordRight', 'wEdWordLeft', 'wEdUpLine', 'wEdUndo', 'wEdTopOfFile',
            +            'wEdToggleIns', 'wEdTab', 'wEdStartSel', 'wEdSetColBlk', 'wEdSelectAll', 'wEdRight', 'wEdRedo', 'wEdPaste', 'wEdPageUp', 'wEdPageDown',
            +            'wEdNewLine', 'wEdLeft', 'wEdInsString', 'wEdHome', 'wEdGoToLine', 'wEdGoToCol', 'wEdGetWord', 'wEdEndSel', 'wEdEndOfFile', 'wEdEnd',
            +            'wEdDownLine', 'wEdDelete', 'wEdCutLine', 'wEdCut', 'wEdCopyLine', 'wEdCopy', 'wEdClearSel', 'wEdBackTab', 'wEdBackspace', 'wDownLine',
            +            'wDelete', 'wDelButton', 'wCutMarked', 'wCutLine', 'wCutAppend', 'wCut', 'wCopyMarked', 'wCopyLine', 'wCopyAppend', 'wCopy', 'wCompile',
            +            'wClearSel', 'wChange', 'wCallMacro', 'wBackTab', 'wBackspace', 'wAutoIndent', 'wAddButton', 'edWindowTile', 'edWindowRestore',
            +            'edWindowNext', 'edWindowMinimize', 'edWindowMaximize', 'edWindowCloseall', 'edWindowClose', 'edWindowCascade', 'edWindowArrangeIcons',
            +            'edStatusMsg', 'edSearchViewOutput', 'edSearchRepeat', 'edSearchPrevError', 'edSearchNextError', 'edSearchFind', 'edSearchChange',
            +            'edRunRebuild', 'edRunMake', 'edRunExecute', 'edRunDebug', 'edRunConfigure', 'edRunCompile', 'edRunCommand', 'edRecord', 'edHelpProcedures',
            +            'edHelpKeyword', 'edHelpKeyboard', 'edHelpIndex', 'edHelpHelp', 'edHelpCommands', 'edHelpAbout', 'edGetWordWrapState', 'edGetWindowName',
            +            'edGetUndoState', 'edGetSelectionState', 'edGetRedoState', 'edGetModifiedStatus', 'edGetLineNumber', 'edGetInsertState', 'edGetColumnNumber',
            +            'edGetChar', 'edFileSetPreferences', 'edFileSaveAs', 'edFileSave', 'edFilePrinterSetup', 'edFilePrint', 'edFilePageSetup', 'edFileOpen',
            +            'edFileNew', 'edFileMerge', 'edFileList', 'edFileExit', 'edEditWrap', 'edEditWordRight', 'edEditWordLeft', 'edEditUpLine', 'edEditUndo',
            +            'edEditToggleIns', 'edEditTab', 'edEditStartSelection', 'edEditSetColumnBlock', 'edEditSetBookmark', 'edEditSelectAll', 'edEditRight',
            +            'edEditRedo', 'edEditPaste', 'edEditPageUp', 'edEditPageDown', 'edEditLeft', 'edEditInsertString', 'edEditGoToLine', 'edEditGoToColumn',
            +            'edEditGoToBookmark', 'edEditGetCurrentWord', 'edEditEndSelection', 'edEditEndOfLine', 'edEditEndOfFile', 'edEditDownline', 'edEditDelete',
            +            'edEditCutline', 'edEditCut', 'edEditCopyline', 'edEditCopy', 'edEditClearSelection', 'edEditBeginningOfLine', 'edEditBeginningOfFile',
            +            'edEditBackTab', 'edEditBackspace', 'edDeleteButton', 'edAddButton'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '[', ']', '{', '}', '!', '+', '-', '~', '$', '^', '?', '@', '%', '#', '&', '*', '|', '/', '<', '>'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false,
            +        5 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #800080;',
            +            2 => 'color: #0080FF; font-weight: bold;',
            +            3 => 'color: #0000FF;',
            +            4 => 'color: #FF00FF;',
            +            5 => 'color: #008000;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #008000; font-style: italic;',
            +            2 => 'color: #FF1010; font-weight: bold;',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            0 => 'color: #006600;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #0000ff;'
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => '',
            +        5 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(),
            +    'REGEXPS' => array(//Variable names
            +        0 => "[\\$]{1,2}[a-zA-Z_][a-zA-Z0-9_]*"
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_MAYBE,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/xbasic.php b/vendor/easybook/geshi/geshi/xbasic.php
            new file mode 100644
            index 0000000000..10e61e4686
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/xbasic.php
            @@ -0,0 +1,142 @@
            + 'XBasic',
            +    'COMMENT_SINGLE' => array(1 => "'"),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'WHILE', 'UNTIL', 'TRUE', 'TO', 'THEN', 'SUB', 'STOP', 'STEP',
            +            'SELECT', 'RETURN', 'PROGRAM', 'NEXT', 'LOOP', 'IFZ',
            +            'IFT', 'IFF', 'IF', 'GOTO', 'GOSUB', 'FOR', 'FALSE', 'EXIT',
            +            'ENDIF', 'END', 'ELSE', 'DO', 'CASE', 'ALL'
            +            ),
            +        2 => array(
            +            'XMAKE', 'XLONGAT', 'XLONG', 'WRITE', 'VOID', 'VERSION$', 'VERSION',
            +            'USHORTAT', 'USHORT', 'UNION', 'ULONGAT', 'ULONG', 'UCASE$',
            +            'UBYTEAT', 'UBYTE', 'UBOUND', 'TYPE','TRIM$', 'TAB', 'SWAP',
            +            'SUBADDRESS', 'SUBADDR', 'STUFF$', 'STRING', 'STRING$', 'STR$',
            +            'STATIC', 'SSHORTAT', 'SSHORT', 'SPACE$', 'SMAKE', 'SLONGAT', 'SLONG',
            +            'SIZE', 'SINGLEAT', 'SINGLE', 'SIGNED$', 'SIGN', 'SHELL', 'SHARED',
            +            'SGN', 'SFUNCTION', 'SET', 'SEEK', 'SCOMPLEX', 'SBYTEAT', 'SBYTE',
            +            'RTRIM$', 'ROTATER', 'ROTATEL', 'RJUST$', 'RINSTRI', 'RINSTR',
            +            'RINCHRI', 'RINCHR', 'RIGHT$', 'REDIM', 'READ', 'RCLIP$', 'QUIT',
            +            'PROGRAM$', 'PRINT', 'POF', 'OPEN', 'OCTO$', 'OCT$', 'NULL$', 'MIN',
            +            'MID$', 'MAX', 'MAKE', 'LTRIM$', 'LOF', 'LJUST$', 'LIBRARY', 'LEN',
            +            'LEFT$', 'LCLIP$', 'LCASE$', 'INTERNAL', 'INT', 'INSTRI', 'INSTR',
            +            'INLINE$', 'INFILE$', 'INCHRI', 'INCHR', 'INC', 'IMPORT', 'HIGH1',
            +            'HIGH0', 'HEXX$', 'HEX$', 'GOADDRESS', 'GOADDR', 'GMAKE', 'GLOW',
            +            'GIANTAT', 'GIANT', 'GHIGH', 'FUNCTION', 'FUNCADDRESS', 'FUNCADDR',
            +            'FORMAT$', 'FIX', 'EXTU', 'EXTS', 'EXTERNAL', 'ERROR', 'ERROR$',
            +            'EOF', 'DOUBLEAT', 'DOUBLE', 'DMAKE', 'DLOW', 'DIM', 'DHIGH',
            +            'DECLARE', 'DEC', 'DCOMPLEX', 'CSTRING$', 'CSIZE', 'CSIZE$', 'CLR',
            +            'CLOSE', 'CLEAR', 'CJUST$', 'CHR$', 'CFUNCTION', 'BITFIELD', 'BINB$',
            +            'BIN$', 'AUTOX', 'AUTOS', 'AUTO', 'ATTACH', 'ASC', 'ABS'
            +            ),
            +        3 => array(
            +            'XOR', 'OR', 'NOT', 'MOD', 'AND'
            +            ),
            +        4 => array(
            +            'TANH', 'TAN', 'SQRT', 'SINH', 'SIN', 'SECH', 'SEC', 'POWER',
            +            'LOG10', 'LOG', 'EXP10', 'EXP', 'CSCH', 'CSC', 'COTH', 'COT', 'COSH',
            +            'COS', 'ATANH', 'ATAN', 'ASINH', 'ASIN', 'ASECH', 'ASEC', 'ACSCH',
            +            'ACSC', 'ACOSH', 'ACOS'
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')', '[', ']', '!', '@', '%', '&', '*', '|', '/', '<', '>',
            +        '=','+','-'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #00a1a1;font-weight: bold',
            +            2 => 'color: #000066;font-weight: bold',
            +            3 => 'color: #00a166;font-weight: bold',
            +            4 => 'color: #0066a1;font-weight: bold'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099;'
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => 'http://www.xbasic.org',
            +        4 => 'http://www.xbasic.org'
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/xml.php b/vendor/easybook/geshi/geshi/xml.php
            new file mode 100644
            index 0000000000..88d17901e8
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/xml.php
            @@ -0,0 +1,155 @@
            + 'XML',
            +    'COMMENT_SINGLE' => array(),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        ),
            +    'SYMBOLS' => array(
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            ),
            +        'COMMENTS' => array(
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'SCRIPT' => array(
            +            -1 => 'color: #808080; font-style: italic;', // comments
            +            0 => 'color: #00bbdd;',
            +            1 => 'color: #ddbb00;',
            +            2 => 'color: #339933;',
            +            3 => 'color: #009900;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #000066;',
            +            1 => 'color: #000000; font-weight: bold;',
            +            2 => 'color: #000000; font-weight: bold;'
            +            )
            +        ),
            +    'URLS' => array(
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        0 => array(//attribute names
            +            GESHI_SEARCH => '([a-z_:][\w\-\.:]*)(=)',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => 'i',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => '\\2'
            +            ),
            +        1 => array(//Initial header line
            +            GESHI_SEARCH => '(<[\/?|(\?xml)]?[a-z_:][\w\-\.:]*(\??>)?)',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => 'i',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        2 => array(//Tag end markers
            +            GESHI_SEARCH => '(([\/|\?])?>)',
            +            GESHI_REPLACE => '\\1',
            +            GESHI_MODIFIERS => 'i',
            +            GESHI_BEFORE => '',
            +            GESHI_AFTER => ''
            +            ),
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_ALWAYS,
            +    'SCRIPT_DELIMITERS' => array(
            +        -1 => array(
            +            ''
            +            ),
            +        0 => array(
            +            ' '>'
            +            ),
            +        1 => array(
            +            '&' => ';'
            +            ),
            +        2 => array(
            +            ' ']]>'
            +            ),
            +        3 => array(
            +            '<' => '>'
            +            )
            +    ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        -1 => false,
            +        0 => false,
            +        1 => false,
            +        2 => false,
            +        3 => true
            +        ),
            +    'TAB_WIDTH' => 2,
            +    'PARSER_CONTROL' => array(
            +        'ENABLE_FLAGS' => array(
            +            'NUMBERS' => GESHI_NEVER
            +        )
            +    )
            +);
            diff --git a/vendor/easybook/geshi/geshi/xojo.php b/vendor/easybook/geshi/geshi/xojo.php
            new file mode 100644
            index 0000000000..73589e81f5
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/xojo.php
            @@ -0,0 +1,165 @@
            + 'Xojo',
            +    'COMMENT_SINGLE' => array(1 => "'", 2 => '//', 3 => 'rem'),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '',
            +	'NUMBERS' => array(
            +	        1 => GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE, // integers
            +	        2 => GESHI_NUMBER_FLT_NONSCI // floating point numbers
            +	        ),    
            +    'KEYWORDS' => array(
            +        //Keywords
            +        1 => array(
            +	        'AddHandler', 'AddressOf', 'Aggregates', 'And', 'Array', 'As', 'Assigns', 'Attributes', 
            +	        'Break', 'ByRef', 'ByVal', 'Call', 'Case', 'Catch', 'Class', 'Const', 'Continue',
            +	        'CType', 'Declare', 'Delegate', 'Dim', 'Do', 'DownTo', 'Each', 'Else', 'Elseif', 'End', 
            +	        'Enum', 'Event', 'Exception', 'Exit', 'Extends', 'False', 'Finally', 'For', 
            +	        'Function', 'Global', 'GoTo', 'Handles', 'If', 'Implements', 'In', 'Inherits', 
            +	        'Inline68K', 'Interface', 'Is', 'IsA', 'Lib', 'Loop', 'Me', 'Mod', 'Module', 
            +	        'Namespace', 'New', 'Next', 'Nil', 'Not', 'Object', 'Of', 'Optional', 'Or', 
            +	        'ParamArray', 'Private', 'Property', 'Protected', 'Public', 'Raise', 
            +	        'RaiseEvent', 'Rect', 'Redim', 'RemoveHandler', 'Return', 'Select', 'Self', 'Shared', 
            +	        'Soft', 'Static', 'Step', 'Sub', 'Super', 'Then', 'To', 'True', 'Try',
            +	        'Until', 'Using', 'Wend', 'While', 'With', 'WeakAddressOf', 'Xor'
            +            ),
            +        //Data Types
            +        2 => array(
            +            'Boolean', 'CFStringRef', 'CString', 'Currency', 'Double', 'Int8', 'Int16', 'Int32',
            +            'Int64', 'Integer', 'OSType', 'PString', 'Ptr', 'Short', 'Single', 'String', 
            +            'Structure', 'UInt8', 'UInt16', 'UInt32', 'UInt64', 'UShort', 'WindowPtr', 
            +            'WString', 'XMLNodeType'
            +            ),
            +        //Compiler Directives
            +        3 => array(
            +            '#Bad', '#Else', '#Endif', '#If', '#Pragma', '#Tag'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '+', '-', '*', '=', '/', '>', '<', '^', '(', ')', '.'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0000FF;',  // keywords
            +            2 => 'color: #0000FF;',  // primitive data types
            +            3 => 'color: #0000FF;',  // compiler commands
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #7F0000;',
            +            'MULTI' => 'color: #7F0000;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #008080;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #6500FE;'
            +            ),
            +        'NUMBERS' => array(
            +            1 => 'color: #326598;', // integers
            +            2 => 'color: #006532;', // floating point numbers
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #000000;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'REGEXPS' => array(
            +	        1 => 'color: #326598;', // &h hex numbers
            +	        2 => 'color: #326598;', // &b hex numbers
            +	        3 => 'color: #326598;', // &o hex numbers
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => 'http://docs.xojo.com/index.php/{FNAMEU}',
            +        2 => 'http://docs.xojo.com/index.php/{FNAMEU}',
            +        3 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 =>'.'
            +        ),
            +    'REGEXPS' => array(
            +		1 => array( // &h numbers
            +		    // search for &h, then any number of letters a-f or numbers 0-9
            +		    GESHI_SEARCH => '(&h[0-9a-fA-F]*\b)',
            +		    GESHI_REPLACE => '\\1',
            +		    GESHI_MODIFIERS => '',
            +		    GESHI_BEFORE => '',
            +		    GESHI_AFTER => ''
            +		    ),
            +		2 => array( // &b numbers
            +		    // search for &b, then any number of 0-1 digits
            +		    GESHI_SEARCH => '(&b[0-1]*\b)',
            +		    GESHI_REPLACE => '\\1',
            +		    GESHI_MODIFIERS => '',
            +		    GESHI_BEFORE => '',
            +		    GESHI_AFTER => ''
            +		    ),
            +		3 => array( // &o octal numbers
            +		    // search for &o, then any number of 0-7 digits
            +		    GESHI_SEARCH => '(&o[0-7]*\b)',
            +		    GESHI_REPLACE => '\\1',
            +		    GESHI_MODIFIERS => '',
            +		    GESHI_BEFORE => '',
            +		    GESHI_AFTER => ''
            +		    )
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/xorg_conf.php b/vendor/easybook/geshi/geshi/xorg_conf.php
            new file mode 100644
            index 0000000000..41e4496eeb
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/xorg_conf.php
            @@ -0,0 +1,122 @@
            + 'Xorg configuration',
            +    'COMMENT_SINGLE' => array(1 => '#'),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        // sections
            +        1 => array(
            +            'Section', 'EndSection', 'SubSection', 'EndSubSection'
            +            ),
            +        2 => array(
            +            // see http://www.x.org/archive/X11R6.9.0/doc/html/xorg.conf.5.html
            +            'BiosBase', 'Black', 'Boardname', 'BusID', 'ChipID', 'ChipRev',
            +            'Chipset', 'ClockChip', 'Clocks', 'DacSpeed',
            +            'DefaultDepth', 'DefaultFbBpp', 'Depth', 'Device',
            +            'DisplaySize', 'Driver', 'FbBpp', 'Gamma',
            +            'HorizSync', 'IOBase', 'Identifier', 'InputDevice',
            +            'Load', 'MemBase', 'Mode', 'Modeline', 'Modelname',
            +            'Modes', 'Monitor', 'Option', 'Ramdac', 'RgbPath',
            +            'Screen', 'TextClockFreq', 'UseModes', 'VendorName',
            +            'VertRefresh', 'VideoAdaptor', 'VideoRam',
            +            'ViewPort', 'Virtual', 'Visual', 'Weight', 'White'
            +            ),
            +        3 => array(
            +            // some sub-keywords
            +            // screen position
            +            'Above', 'Absolute', 'Below', 'LeftOf', 'Relative', 'RightOf',
            +            // modes
            +            'DotClock', 'Flags', 'HSkew', 'HTimings', 'VScan', 'VTimings'
            +            ),
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'SYMBOLS' => array(
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #b1b100;',
            +            2 => 'color: #990000;',
            +            3 => 'color: #550000;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #adadad; font-style: italic;',
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            ),
            +        'BRACKETS' => array(
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #0000ff;',
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #cc66cc;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 4
            +);
            diff --git a/vendor/easybook/geshi/geshi/xpp.php b/vendor/easybook/geshi/geshi/xpp.php
            new file mode 100644
            index 0000000000..52db2727b9
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/xpp.php
            @@ -0,0 +1,434 @@
            +
            + *
            + * CHANGES
            + * -------
            + * 2007/02/28 (1.0.0)
            + *  -  First Release
            + *
            + * TODO (updated 2007/02/27)
            + * -------------------------
            + *
            + *************************************************************************************
            + *
            + *     This file is part of GeSHi.
            + *
            + *   GeSHi is free software; you can redistribute it and/or modify
            + *   it under the terms of the GNU General Public License as published by
            + *   the Free Software Foundation; either version 2 of the License, or
            + *   (at your option) any later version.
            + *
            + *   GeSHi is distributed in the hope that it will be useful,
            + *   but WITHOUT ANY WARRANTY; without even the implied warranty of
            + *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
            + *   GNU General Public License for more details.
            + *
            + *   You should have received a copy of the GNU General Public License
            + *   along with GeSHi; if not, write to the Free Software
            + *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
            + *
            + ************************************************************************************/
            +
            +$language_data = array (
            +    'LANG_NAME' => 'X++',
            +    'COMMENT_SINGLE' => array(1 => '//'),
            +    'COMMENT_MULTI' => array('/*' => '*/'),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array( // Primitive types
            +            'void',
            +            'str',
            +            'real',
            +            'int64',
            +            'int',
            +            'date',
            +            'container',
            +            'boolean',
            +            'anytype'
            +            ),
            +        2 => array( // Keywords
            +            'window',
            +            'while',
            +            'try',
            +            'true',
            +            'throw',
            +            'switch',
            +            'super',
            +            'static',
            +            'server',
            +            'right',
            +            'return',
            +            'retry',
            +            'public',
            +            'protected',
            +            'private',
            +            'print',
            +            'pause',
            +            'null',
            +            'new',
            +            'mod',
            +            'left',
            +            'interface',
            +            'implements',
            +            'if',
            +            'for',
            +            'final',
            +            'false',
            +            'extends',
            +            'else',
            +            'edit',
            +            'do',
            +            'div',
            +            'display',
            +            'default',
            +            'continue',
            +            'client',
            +            'class',
            +            'changeCompany',
            +            'case',
            +            'breakpoint',
            +            'break',
            +            'at',
            +            'abstract'
            +            ),
            +        3 => array( // Functions within the Axapta kernel
            +            'year',
            +            'wkofyr',
            +            'webwebpartstr',
            +            'webstaticfilestr',
            +            'websitetempstr',
            +            'websitedefstr',
            +            'webreportstr',
            +            'webpagedefstr',
            +            'weboutputcontentitemstr',
            +            'webmenustr',
            +            'webletitemstr',
            +            'webformstr',
            +            'webdisplaycontentitemstr',
            +            'webactionitemstr',
            +            'varstr',
            +            'utilmoyr',
            +            'uint2str',
            +            'typeof',
            +            'typeid',
            +            'trunc',
            +            'today',
            +            'timenow',
            +            'time2str',
            +            'term',
            +            'tanh',
            +            'tan',
            +            'tablestr',
            +            'tablestaticmethodstr',
            +            'tablepname',
            +            'tablenum',
            +            'tablename2id',
            +            'tablemethodstr',
            +            'tableid2pname',
            +            'tableid2name',
            +            'tablefieldgroupstr',
            +            'tablecollectionstr',
            +            'systemdateset',
            +            'systemdateget',
            +            'syd',
            +            'substr',
            +            'strupr',
            +            'strscan',
            +            'strrtrim',
            +            'strrep',
            +            'strrem',
            +            'strprompt',
            +            'strpoke',
            +            'strnfind',
            +            'strlwr',
            +            'strltrim',
            +            'strline',
            +            'strlen',
            +            'strkeep',
            +            'strins',
            +            'strfmt',
            +            'strfind',
            +            'strdel',
            +            'strcolseq',
            +            'strcmp',
            +            'stralpha',
            +            'str2time',
            +            'str2num',
            +            'str2int64',
            +            'str2int',
            +            'str2guid',
            +            'str2enum',
            +            'str2date',
            +            'staticmethodstr',
            +            'sln',
            +            'sleep',
            +            'sinh',
            +            'sin',
            +            'setprefix',
            +            'sessionid',
            +            'securitykeystr',
            +            'securitykeynum',
            +            'runbuf',
            +            'runas',
            +            'round',
            +            'resourcestr',
            +            'reportstr',
            +            'refprintall',
            +            'rate',
            +            'querystr',
            +            'pv',
            +            'pt',
            +            'prmisdefault',
            +            'primoyr',
            +            'prevyr',
            +            'prevqtr',
            +            'prevmth',
            +            'power',
            +            'pmt',
            +            'num2str',
            +            'num2date',
            +            'num2char',
            +            'nextyr',
            +            'nextqtr',
            +            'nextmth',
            +            'newguid',
            +            'mthofyr',
            +            'mthname',
            +            'mkdate',
            +            'minint',
            +            'min',
            +            'methodstr',
            +            'menustr',
            +            'menuitemoutputstr',
            +            'menuitemdisplaystr',
            +            'menuitemactionstr',
            +            'maxint',
            +            'maxdate',
            +            'max',
            +            'match',
            +            'logn',
            +            'log10',
            +            'literalstr',
            +            'licensecodestr',
            +            'licensecodenum',
            +            'intvnorm',
            +            'intvno',
            +            'intvname',
            +            'intvmax',
            +            'int64str',
            +            'indexstr',
            +            'indexnum',
            +            'indexname2id',
            +            'indexid2name',
            +            'idg',
            +            'identifierstr',
            +            'helpfilestr',
            +            'helpdevstr',
            +            'helpapplstr',
            +            'guid2str',
            +            'getprefix',
            +            'getCurrentUTCTime',
            +            'fv',
            +            'funcname',
            +            'frac',
            +            'formstr',
            +            'fieldstr',
            +            'fieldpname',
            +            'fieldnum',
            +            'fieldname2id',
            +            'fieldid2pname',
            +            'fieldid2name',
            +            'extendedTypeStr',
            +            'extendedTypeNum',
            +            'exp10',
            +            'exp',
            +            'evalbuf',
            +            'enumstr',
            +            'enumnum',
            +            'enumcnt',
            +            'enum2str',
            +            'endmth',
            +            'dimof',
            +            'dg',
            +            'decround',
            +            'ddb',
            +            'dayofyr',
            +            'dayofwk',
            +            'dayofmth',
            +            'dayname',
            +            'date2str',
            +            'date2num',
            +            'curuserid',
            +            'curext',
            +            'cterm',
            +            'cosh',
            +            'cos',
            +            'corrflagset',
            +            'corrflagget',
            +            'convertUTCTimeToLocalTime',
            +            'convertUTCDateToLocalDate',
            +            'conpoke',
            +            'conpeek',
            +            'connull',
            +            'conlen',
            +            'conins',
            +            'confind',
            +            'configurationkeystr',
            +            'configurationkeynum',
            +            'condel',
            +            'classstr',
            +            'classnum',
            +            'classidget',
            +            'char2num',
            +            'beep',
            +            'atan',
            +            'asin',
            +            'ascii2ansi',
            +            'any2str',
            +            'any2real',
            +            'any2int64',
            +            'any2int',
            +            'any2guid',
            +            'any2enum',
            +            'any2date',
            +            'ansi2ascii',
            +            'acos',
            +            'abs'
            +            ),
            +        4 => array( // X++ SQL stuff
            +            'where',
            +            'update_recordset',
            +            'ttsCommit',
            +            'ttsBegin',
            +            'ttsAbort',
            +            'sum',
            +            'setting',
            +            'select',
            +            'reverse',
            +            'pessimisticLock',
            +            'outer',
            +            'order by',
            +            'optimisticLock',
            +            'notExists',
            +            'noFetch',
            +            'next',
            +            'minof',
            +            'maxof',
            +            'like',
            +            'join',
            +            'insert_recordset',
            +            'index hint',
            +            'index',
            +            'group by',
            +            'from',
            +            'forUpdate',
            +            'forceSelectOrder',
            +            'forcePlaceholders',
            +            'forceNestedLoop',
            +            'forceLiterals',
            +            'flush',
            +            'firstOnly',
            +            'firstFast',
            +            'exists',
            +            'desc',
            +            'delete_from',
            +            'count',
            +            'avg',
            +            'asc'
            +            )
            +        ),
            +    'SYMBOLS' => array( // X++ symbols
            +        '!',
            +        '&',
            +        '(',
            +        ')',
            +        '*',
            +        '^',
            +        '|',
            +        '~',
            +        '+',
            +        ',',
            +        '-',
            +        '/',
            +        ':',
            +        '<',
            +        '=',
            +        '>',
            +        '?',
            +        '[',
            +        ']',
            +        '{',
            +        '}'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0000ff;',
            +            2 => 'color: #0000ff;',
            +            3 => 'color: #0000ff;',
            +            4 => 'color: #0000ff;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #007f00;',
            +            'MULTI' => 'color: #007f00; font-style: italic;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #ff0000;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #000000;'
            +            ),
            +        'METHODS' => array(
            +            1 => 'color: #000000;',
            +            2 => 'color: #000000;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #00007f;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.',
            +        2 => '::'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            diff --git a/vendor/easybook/geshi/geshi/yaml.php b/vendor/easybook/geshi/geshi/yaml.php
            new file mode 100644
            index 0000000000..9de6401bba
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/yaml.php
            @@ -0,0 +1,149 @@
            +: since PHP offers no variable-width lookbehind,
            + *      these blocks will still be highlighted even when commented out. As it happens,
            + *      any line ending with | or > could result in the unintentional highlighting of
            + *      all remaining lines in the file, just because I couldn't check for this regex
            + *      as a lookbehind:  '/:(\s+)(!!(\w+)(\s+))?/'
            + *      If there is a workaround for that, it needs implemented.
            + *   *  I may be missing some operators. I deliberately omitted inline array notation
            + *      as, in general, it's ugly and tends to conflict with plain-text. Ensuring all
            + *      highlighted list delimiters are not plain text would be as simple as checking
            + *      that they follow a colon directly. Alas, without variable-length lookbehinds,
            + *      if there is a way to do so in GeSHi I am unaware of it.
            + *   *  I kind of whored the comment regexp array. It seemed like a safe bet, so it's
            + *      where I crammed everything. Some of it may need moved elsewhere for neatness.
            + *   *  The !!typename highlight needs not to interfere with ": |" and ": >": Pairing
            + *      key: !!type | value is perfectly legal, but again due to lookbehind issues, I
            + *      can't add a case for that. Also, it is likely that multiple spaces can be put
            + *      between the colon and pipe symbol, which would also break it.
            + *
            + *************************************************************************************
            + *
            + *     This file is part of GeSHi.
            + *
            + *   GeSHi is free software; you can redistribute it and/or modify it
            + *   under the terms of the GNU General Public License as published by
            + *   the Free Software Foundation; either version 2 of the License, or
            + *   (at your option) any later version.
            + *
            + *   GeSHi is distributed in the hope that it will be useful,
            + *   but WITHOUT ANY WARRANTY; without even the implied warranty of
            + *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
            + *   GNU General Public License for more details.
            + *
            + *   You should have received a copy of the GNU General Public License
            + *   along with GeSHi; if not, write to the Free Software
            + *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
            + *
            + ************************************************************************************/
            +
            +$language_data = array (
            +    'LANG_NAME' => 'YAML',
            +    'COMMENT_SINGLE' => array(),
            +    'COMMENT_MULTI' => array(),
            +    //Keys
            +    'COMMENT_REGEXP' => array( // ENTRY ZERO  SHOULD CHECK FOR (\n(\s*)([^#%]+?):(\s+)(!!(\w+)(\s+))?) AS A LOOKBEHIND, BUT IT CAN'T.
            +        0 => '/(?<=\s[\|>]\n)(\s+)(.*)((?=[\n$])(([\n^](\1(.*)|(?=[\n$])))*)|$)/', // Pipe blocks and > blocks.
            +        1 => '/#(.*)/', // Blue # comments
            +        2 => '/%(.*)/', // Red % comments
            +        3 => '/(^|\n)([^#%^\n]+?)(?=: )/',  // Key-value names
            +        4 => '/(^|\n)([^#%^\n]+?)(?=:\n)/',// Key-group names
            +        5 => '/(?<=^---)(\s*)!(\S+)/',    // Comments after ---
            +        6 => '/(?<=: )(\s*)\&(\S+)/',    // References
            +        7 => '/(?<=: )(\s*)\*(\S+)/',   // Dereferences
            +        8 => '/!!(\w+)/',              // Types
            +        //9 => '/(?<=\n)(\s*)-(?!-)/',       // List items: This needs to search within comments 3 and 4, but I don't know how.
            +        ),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            'all','any','none', "yes", "no"
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        1 => array('---', '...'),
            +        2 => array(': ', ">\n", "|\n", '<<:', ":\n") // It'd be nice if I could specify that the colon must
            +        //                                              follow comment 3 or 4 to be considered, and the > and |
            +        //                                              must follow such a colon.
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'font-weight: bold;'
            +            ),
            +        'COMMENTS' => array(
            +            0 => 'color: #303050;background-color: #F5F5F5',
            +            1 => 'color: blue;',
            +            2 => 'font-weight: bold; color: red;',
            +            3 => 'color: green;',
            +            4 => 'color: #007F45;',
            +            5 => 'color: #7f7fFF;',
            +            6 => 'color: #FF7000;',
            +            7 => 'color: #FF45C0;',
            +            8 => 'font-weight: bold; color: #005F5F;',
            +            //9 => 'font-weight: bold; color: #000000;',
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            ),
            +        'BRACKETS' => array(
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #CF00CF;'
            +            ),
            +        'NUMBERS' => array(
            +            // 0 => 'color: #33f;' // Don't highlight numbers, really...
            +            ),
            +        'METHODS' => array(
            +            1 => '',
            +            2 => ''
            +            ),
            +        'SYMBOLS' => array(
            +            1 => 'color: cyan;',
            +            2 => 'font-weight: bold; color: brown;'
            +            ),
            +        'REGEXPS' => array(
            +            ),
            +        'SCRIPT' => array(
            +            0 => ''
            +            )
            +        ),
            +    'URLS' => array(1 => ''),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array( ),
            +    'REGEXPS' => array( ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array( ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array( )
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/z80.php b/vendor/easybook/geshi/geshi/z80.php
            new file mode 100644
            index 0000000000..71305ff938
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/z80.php
            @@ -0,0 +1,143 @@
            + 'ZiLOG Z80 Assembler',
            +    'COMMENT_SINGLE' => array(1 => ';'),
            +    'COMMENT_MULTI' => array(),
            +    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array("'", '"'),
            +    'ESCAPE_CHAR' => '',
            +    'KEYWORDS' => array(
            +        /*CPU*/
            +        1 => array(
            +            'adc','add','and','bit','call','ccf','cp','cpd','cpdr','cpir','cpi',
            +            'cpl','daa','dec','di','djnz','ei','ex','exx','halt','im','in',
            +            'in0','inc','ind','indr','inir','ini','jp','jr','ld','ldd','lddr',
            +            'ldir','ldi','mlt','neg','nop','or','otdm','otdmr','otdr','otim',
            +            'otimr','otir','out','out0','outd','outi','pop','push','res','ret',
            +            'reti','retn','rl','rla','rlc','rlca','rld','rr','rra','rrc','rrca',
            +            'rrd','rst','sbc','scf','set','sla','sl1','sll','slp','sra','srl',
            +            'sub','tst','tstio','xor'
            +            ),
            +        /*registers*/
            +        2 => array(
            +            'a','b','c','d','e','h','l',
            +            'af','bc','de','hl','ix','iy','sp',
            +            'af\'','ixh','ixl','iyh','iyl'
            +            ),
            +        /*Directive*/
            +        3 => array(
            +            '#define','#endif','#else','#ifdef','#ifndef','#include','#undef',
            +            '.db','.dd','.df','.dq','.dt','.dw','.end','.org','equ'
            +            ),
            +        ),
            +    'SYMBOLS' => array(
            +        '[', ']', '(', ')', '?', '+', '-', '*', '/', '%', '$'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #0000ff; font-weight:bold;',
            +            2 => 'color: #0000ff;',
            +            3 => 'color: #46aa03; font-weight:bold;'
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #adadad; font-style: italic;',
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099; font-weight: bold;'
            +            ),
            +        'BRACKETS' => array(
            +            0 => 'color: #0000ff;'
            +            ),
            +        'STRINGS' => array(
            +            0 => 'color: #7f007f;'
            +            ),
            +        'NUMBERS' => array(
            +            0 => 'color: #dd22dd;'
            +            ),
            +        'METHODS' => array(
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #008000;'
            +            ),
            +        'REGEXPS' => array(
            +            0 => 'color: #22bbff;',
            +            1 => 'color: #22bbff;',
            +            2 => 'color: #993333;'
            +            ),
            +        'SCRIPT' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => ''
            +        ),
            +    'OOLANG' => false,
            +    'OBJECT_SPLITTERS' => array(
            +        ),
            +    'REGEXPS' => array(
            +        //Hex numbers
            +        0 => '0[0-9a-fA-F]{1,32}[hH]',
            +        //Binary numbers
            +        1 => '\%[01]{1,64}|[01]{1,64}[bB]?(?![^<]*>)',
            +        //Labels
            +        2 => '^[_a-zA-Z][_a-zA-Z0-9]?\:'
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        ),
            +    'TAB_WIDTH' => 8
            +);
            +
            diff --git a/vendor/easybook/geshi/geshi/zxbasic.php b/vendor/easybook/geshi/geshi/zxbasic.php
            new file mode 100644
            index 0000000000..fd2c7f312a
            --- /dev/null
            +++ b/vendor/easybook/geshi/geshi/zxbasic.php
            @@ -0,0 +1,149 @@
            + 'ZXBasic',
            +    'COMMENT_SINGLE' => array(
            +        1 => "'",
            +        2 => '#',
            +        3 => 'REM'
            +        ),
            +    'COMMENT_MULTI' => array("/'" => "'/"),
            +    'CASE_KEYWORDS' => GESHI_CAPS_UPPER, //GESHI_CAPS_NO_CHANGE,
            +    'QUOTEMARKS' => array('"'),
            +    'ESCAPE_CHAR' => '\\',
            +    'KEYWORDS' => array(
            +        1 => array(
            +            "ASM", "BEEP", "BOLD", "BORDER", "BRIGHT", "ByRef", "ByVal", "CAST",
            +            "CIRCLE", "CLS", "CONST", "CONTINUE", "DECLARE", "DIM", "DO",
            +            "DRAW", "ELSE", "ELSEIF", "END", "EXIT", "FastCall", "FLASH", "FOR",
            +            "FUNCTION", "GOTO", "GOSUB", "GO", "IF", "INK", "INVERSE", "ITALIC",
            +            "LET", "LOAD", "LOOP", "NEXT", "OVER", "PAPER", "PAUSE", "PI",
            +            "PLOT", "POKE", "PRINT", "RANDOMIZE", "REM", "RETURN", "SAVE",
            +            "StdCall", "Sub", "THEN", "TO", "UNTIL", "VERIFY", "WEND", "WHILE",
            +            ),
            +
            +        // types
            +        2 => array(
            +            'byte', 'ubyte', 'integer', 'uinteger', 'long', 'ulong', 'fixed',
            +            'float', 'string'
            +            ),
            +
            +        // Functions
            +        3 => array(
            +            "ABS", "ACS", "ASN", "ATN", "CHR", "CODE", "COS", "CSRLIN", "EXP",
            +            "HEX", "HEX16", "INKEY", "INT", "LEN", "LN", "PEEK", "POS", "RND",
            +            "SCREEN$", "SGN", "SIN", "SQR", "STR", "TAN", "VAL",
            +            ),
            +
            +        // Operators and modifiers
            +        4 => array(
            +            "AT", "AS", "AND", "MOD", "NOT", "OR", "SHL", "SHR", "STEP", "XOR"
            +            )
            +        ),
            +    'SYMBOLS' => array(
            +        '(', ')'
            +        ),
            +    'CASE_SENSITIVE' => array(
            +        GESHI_COMMENTS => false,
            +        1 => false,
            +        2 => false,
            +        3 => false,
            +        4 => false
            +        ),
            +    'STYLES' => array(
            +        'KEYWORDS' => array(
            +            1 => 'color: #000080; font-weight: bold;', // Commands
            +            2 => 'color: #800080; font-weight: bold;', // Types
            +            3 => 'color: #006000; font-weight: bold;', // Functions
            +            4 => 'color: #801010; font-weight: bold;'  // Operators and Modifiers
            +            ),
            +        'COMMENTS' => array(
            +            1 => 'color: #808080; font-style: italic;',
            +            2 => 'color: #339933;',
            +            3 => 'color: #808080; font-style: italic;',
            +            'MULTI' => 'color: #808080; font-style: italic;'
            +            ),
            +        'BRACKETS' => array(
            +            //0 => 'color: #66cc66;'
            +            0 => 'color: #007676;'
            +            ),
            +        'STRINGS' => array(
            +            //0 => 'color: #ff0000;'
            +            0 => 'color: #A00000; font-style: italic;'
            +            ),
            +        'NUMBERS' => array(
            +            //0 => 'color: #cc66cc;'
            +            0 => 'color: #b05103;'// font-weight: bold;'
            +            ),
            +        'METHODS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'SYMBOLS' => array(
            +            0 => 'color: #66cc66;'
            +            ),
            +        'ESCAPE_CHAR' => array(
            +            0 => 'color: #000099;'
            +            ),
            +        'SCRIPT' => array(
            +            ),
            +        'REGEXPS' => array(
            +            )
            +        ),
            +    'URLS' => array(
            +        1 => '',
            +        2 => '',
            +        3 => '',
            +        4 => ''
            +        ),
            +    'OOLANG' => true,
            +    'OBJECT_SPLITTERS' => array(
            +        1 => '.'
            +        ),
            +    'REGEXPS' => array(
            +        ),
            +    'STRICT_MODE_APPLIES' => GESHI_NEVER,
            +    'SCRIPT_DELIMITERS' => array(
            +        ),
            +    'HIGHLIGHT_STRICT_BLOCK' => array(
            +        )
            +);
            +
            diff --git a/lib/htmlpurifier-4.8.0-lite/CREDITS b/vendor/ezyang/htmlpurifier/CREDITS
            similarity index 100%
            rename from lib/htmlpurifier-4.8.0-lite/CREDITS
            rename to vendor/ezyang/htmlpurifier/CREDITS
            diff --git a/lib/htmlpurifier-4.8.0-lite/INSTALL b/vendor/ezyang/htmlpurifier/INSTALL
            similarity index 100%
            rename from lib/htmlpurifier-4.8.0-lite/INSTALL
            rename to vendor/ezyang/htmlpurifier/INSTALL
            diff --git a/vendor/ezyang/htmlpurifier/INSTALL.fr.utf8 b/vendor/ezyang/htmlpurifier/INSTALL.fr.utf8
            new file mode 100644
            index 0000000000..95164abba5
            --- /dev/null
            +++ b/vendor/ezyang/htmlpurifier/INSTALL.fr.utf8
            @@ -0,0 +1,60 @@
            +
            +Installation
            +    Comment installer HTML Purifier
            +
            +Attention : Ce document est encodé en UTF-8, si les lettres avec des accents
            +ne s'affichent pas, prenez un meilleur éditeur de texte.
            +
            +L'installation de HTML Purifier est très simple, parce qu'il n'a pas besoin
            +de configuration. Pour les utilisateurs impatients, le code se trouve dans le
            +pied de page, mais je recommande de lire le document.
            +
            +1.  Compatibilité
            +
            +HTML Purifier fonctionne avec PHP 5. PHP 5.0.5 est la dernière version testée.
            +Il ne dépend pas d'autres librairies.
            +
            +Les extensions optionnelles sont iconv (généralement déjà installée) et tidy
            +(répendue aussi). Si vous utilisez UTF-8 et que vous ne voulez pas l'indentation,
            +vous pouvez utiliser HTML Purifier sans ces extensions.
            +
            +
            +2.  Inclure la librairie
            +
            +Quand vous devez l'utilisez, incluez le :
            +
            +    require_once('/path/to/library/HTMLPurifier.auto.php');
            +
            +Ne pas l'inclure si ce n'est pas nécessaire, car HTML Purifier est lourd.
            +
            +HTML Purifier utilise "autoload". Si vous avez défini la fonction __autoload,
            +vous devez ajouter cette fonction :
            +
            +    spl_autoload_register('__autoload')
            +
            +Plus d'informations dans le document "INSTALL".
            +
            +3.  Installation rapide
            +
            +Si votre site Web est en UTF-8 et XHTML Transitional, utilisez :
            +
            +purify($html_a_purifier);
            +?>
            +
            +Sinon, utilisez :
            +
            +set('Core', 'Encoding', 'ISO-8859-1'); //Remplacez par votre
            +    encodage
            +    $config->set('Core', 'XHTML', true); //Remplacer par false si HTML 4.01
            +    $purificateur = new HTMLPurifier($config);
            +    $html_propre = $purificateur->purify($html_a_purifier);
            +?>
            +
            +
            +    vim: et sw=4 sts=4
            diff --git a/lib/htmlpurifier-4.8.0-lite/LICENSE b/vendor/ezyang/htmlpurifier/LICENSE
            similarity index 100%
            rename from lib/htmlpurifier-4.8.0-lite/LICENSE
            rename to vendor/ezyang/htmlpurifier/LICENSE
            diff --git a/lib/htmlpurifier-4.8.0-lite/NEWS b/vendor/ezyang/htmlpurifier/NEWS
            similarity index 100%
            rename from lib/htmlpurifier-4.8.0-lite/NEWS
            rename to vendor/ezyang/htmlpurifier/NEWS
            diff --git a/vendor/ezyang/htmlpurifier/README.md b/vendor/ezyang/htmlpurifier/README.md
            new file mode 100644
            index 0000000000..029369f6f3
            --- /dev/null
            +++ b/vendor/ezyang/htmlpurifier/README.md
            @@ -0,0 +1,29 @@
            +HTML Purifier
            +=============
            +
            +HTML Purifier is an HTML filtering solution that uses a unique combination
            +of robust whitelists and agressive parsing to ensure that not only are
            +XSS attacks thwarted, but the resulting HTML is standards compliant.
            +
            +HTML Purifier is oriented towards richly formatted documents from
            +untrusted sources that require CSS and a full tag-set.  This library can
            +be configured to accept a more restrictive set of tags, but it won't be
            +as efficient as more bare-bones parsers. It will, however, do the job
            +right, which may be more important.
            +
            +Places to go:
            +
            +* See INSTALL for a quick installation guide
            +* See docs/ for developer-oriented documentation, code examples and
            +  an in-depth installation guide.
            +* See WYSIWYG for information on editors like TinyMCE and FCKeditor
            +
            +HTML Purifier can be found on the web at: [http://htmlpurifier.org/](http://htmlpurifier.org/)
            +
            +## Installation
            +
            +Package available on [Composer](https://packagist.org/packages/ezyang/htmlpurifier).
            +
            +If you're using Composer to manage dependencies, you can use
            +
            +    $ composer require "ezyang/htmlpurifier": "dev-master"
            diff --git a/vendor/ezyang/htmlpurifier/TODO b/vendor/ezyang/htmlpurifier/TODO
            new file mode 100644
            index 0000000000..1afb33cbf7
            --- /dev/null
            +++ b/vendor/ezyang/htmlpurifier/TODO
            @@ -0,0 +1,150 @@
            +
            +TODO List
            +
            += KEY ====================
            +    # Flagship
            +    - Regular
            +    ? Maybe I'll Do It
            +==========================
            +
            +If no interest is expressed for a feature that may require a considerable
            +amount of effort to implement, it may get endlessly delayed. Do not be
            +afraid to cast your vote for the next feature to be implemented!
            +
            +Things to do as soon as possible:
            +
            + - http://htmlpurifier.org/phorum/read.php?3,5560,6307#msg-6307
            + - Think about allowing explicit order of operations hooks for transforms
            + - Fix "<.<" bug (trailing < is removed if not EOD)
            + - Build in better internal state dumps and debugging tools for remote
            +   debugging
            + - Allowed/Allowed* have strange interactions when both set
            + ? Transform lone embeds into object tags
            + - Deprecated config options that emit warnings when you set them (with'
            +   a way of muting the warning if you really want to)
            + - Make HTML.Trusted work with Output.FlashCompat
            + - HTML.Trusted and HTML.SafeObject have funny interaction; general
            +   problem is what to do when a module "supersedes" another
            +   (see also tables and basic tables.)  This is a little dicier
            +   because HTML.SafeObject has some extra functionality that
            +   trusted might find useful.  See http://htmlpurifier.org/phorum/read.php?3,5762,6100
            +
            +FUTURE VERSIONS
            +---------------
            +
            +4.9 release [OMG CONFIG PONIES]
            + ! Fix Printer. It's from the old days when we didn't have decent XML classes
            + ! Factor demo.php into a set of Printer classes, and then create a stub
            +   file for users here (inside the actual HTML Purifier library)
            + - Fix error handling with form construction
            + - Do encoding validation in Printers, or at least, where user data comes in
            + - Config: Add examples to everything (make built-in which also automatically
            +   gives output)
            + - Add "register" field to config schemas to eliminate dependence on
            +   naming conventions (try to remember why we ultimately decided on tihs)
            +
            +5.0 release [HTML 5]
            + # Swap out code to use html5lib tokenizer and tree-builder
            + ! Allow turning off of FixNesting and required attribute insertion
            +
            +5.1 release [It's All About Trust] (floating)
            + # Implement untrusted, dangerous elements/attributes
            + # Implement IDREF support (harder than it seems, since you cannot have
            +   IDREFs to non-existent IDs)
            +     - Implement  (client and server side image maps are blocking
            +       on IDREF support)
            + # Frameset XHTML 1.0 and HTML 4.01 doctypes
            + - Figure out how to simultaneously set %CSS.Trusted and %HTML.Trusted (?)
            +
            +5.2 release [Error'ed]
            + # Error logging for filtering/cleanup procedures
            + # Additional support for poorly written HTML
            +    - Microsoft Word HTML cleaning (i.e. MsoNormal, but research essential!)
            +    - Friendly strict handling of 
            (block ->
            ) + - XSS-attempt detection--certain errors are flagged XSS-like + - Append something to duplicate IDs so they're still usable (impl. note: the + dupe detector would also need to detect the suffix as well) + +6.0 release [Beyond HTML] + # Legit token based CSS parsing (will require revamping almost every + AttrDef class). Probably will use CSSTidy + # More control over allowed CSS properties using a modularization + # IRI support (this includes IDN) + - Standardize token armor for all areas of processing + +7.0 release [To XML and Beyond] + - Extended HTML capabilities based on namespacing and tag transforms (COMPLEX) + - Hooks for adding custom processors to custom namespaced tags and + attributes, offer default implementation + - Lots of documentation and samples + +Ongoing + - More refactoring to take advantage of PHP5's facilities + - Refactor unit tests into lots of test methods + - Plugins for major CMSes (COMPLEX) + - phpBB + - Also, a FAQ for extension writers with HTML Purifier + +AutoFormat + - Smileys + - Syntax highlighting (with GeSHi) with
             and possibly  tags; may be troublesome
            +   because regular CSS has no way of uniquely identifying nodes, so we'd
            +   have to generate IDs
            + - Explain how to use HTML Purifier in non-PHP languages / create
            +   a simple command line stub (or complicated?)
            + - Fixes for Firefox's inability to handle COL alignment props (Bug 915)
            + - Automatically add non-breaking spaces to empty table cells when
            +   empty-cells:show is applied to have compatibility with Internet Explorer
            + - Table of Contents generation (XHTML Compiler might be reusable). May also
            +   be out-of-band information.
            + - Full set of color keywords. Also, a way to add onto them without
            +   finalizing the configuration object.
            + - Write a var_export and memcached DefinitionCache - Denis
            + - Built-in support for target="_blank" on all external links
            + - Convert RTL/LTR override characters to  tags, or vice versa on demand.
            +   Also, enable disabling of directionality
            + ? Externalize inline CSS to promote clean HTML, proposed by Sander Tekelenburg
            + ? Remove redundant tags, ex. Underlined. Implementation notes:
            +    1. Analyzing which tags to remove duplicants
            +    2. Ensure attributes are merged into the parent tag
            +    3. Extend the tag exclusion system to specify whether or not the
            +    contents should be dropped or not (currently, there's code that could do
            +    something like this if it didn't drop the inner text too.)
            + ? Make AutoParagraph also support paragraph-izing double 
            tags, and not + just double newlines. This is kind of tough to do in the current framework, + though, and might be reasonably approximated by search replacing double
            s + with newlines before running it through HTML Purifier. + +Maintenance related (slightly boring) + # CHMOD install script for PEAR installs + ! Factor out command line parser into its own class, and unit test it + - Reduce size of internal data-structures (esp. HTMLDefinition) + - Allow merging configurations. Thus, + a -> b -> default + c -> d -> default + becomes + a -> b -> c -> d -> default + Maybe allow more fine-grained tuning of this behavior. Alternatively, + encourage people to use short plist depths before building them up. + - Time PHPT tests + +ChildDef related (very boring) + - Abstract ChildDef_BlockQuote to work with all elements that only + allow blocks in them, required or optional + - Implement lenient child validation + +Wontfix + - Non-lossy smart alternate character encoding transformations (unless + patch provided) + - Pretty-printing HTML: users can use Tidy on the output on entire page + - Native content compression, whitespace stripping: use gzip if this is + really important + + vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/VERSION b/vendor/ezyang/htmlpurifier/VERSION new file mode 100644 index 0000000000..6ca6df113f --- /dev/null +++ b/vendor/ezyang/htmlpurifier/VERSION @@ -0,0 +1 @@ +4.8.0 \ No newline at end of file diff --git a/vendor/ezyang/htmlpurifier/WHATSNEW b/vendor/ezyang/htmlpurifier/WHATSNEW new file mode 100644 index 0000000000..7acce06dfb --- /dev/null +++ b/vendor/ezyang/htmlpurifier/WHATSNEW @@ -0,0 +1,9 @@ +HTML Purifier 4.8.0 is a bugfix release, collecting a year +of accumulated bug fixes. In particular, we fixed some minor +bugs and now declare full PHP 7 compatibility. The primary +backwards-incompatible change is that HTML Purifier will now +add rel="noreferrer" to all links with target attributes +(you can disable this with %HTML.TargetNoReferrer.) Other +changes: new configuration options %CSS.AllowDuplicates and +%Attr.ID.HTML5; border-radius is partially supported when +%CSS.AllowProprietary, and tel URIs are supported by default. diff --git a/vendor/ezyang/htmlpurifier/WYSIWYG b/vendor/ezyang/htmlpurifier/WYSIWYG new file mode 100644 index 0000000000..c518aacdd9 --- /dev/null +++ b/vendor/ezyang/htmlpurifier/WYSIWYG @@ -0,0 +1,20 @@ + +WYSIWYG - What You See Is What You Get + HTML Purifier: A Pretty Good Fit for TinyMCE and FCKeditor + +Javascript-based WYSIWYG editors, simply stated, are quite amazing. But I've +always been wary about using them due to security issues: they handle the +client-side magic, but once you've been served a piping hot load of unfiltered +HTML, what should be done then? In some situations, you can serve it uncleaned, +since you only offer these facilities to trusted(?) authors. + +Unfortunantely, for blog comments and anonymous input, BBCode, Textile and +other markup languages still reign supreme. Put simply: filtering HTML is +hard work, and these WYSIWYG authors don't offer anything to alleviate that +trouble. Therein lies the solution: + +HTML Purifier is perfect for filtering pure-HTML input from WYSIWYG editors. + +Enough said. + + vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/composer.json b/vendor/ezyang/htmlpurifier/composer.json new file mode 100644 index 0000000000..2f59d0fede --- /dev/null +++ b/vendor/ezyang/htmlpurifier/composer.json @@ -0,0 +1,22 @@ +{ + "name": "ezyang/htmlpurifier", + "description": "Standards compliant HTML filter written in PHP", + "type": "library", + "keywords": ["html"], + "homepage": "http://htmlpurifier.org/", + "license": "LGPL", + "authors": [ + { + "name": "Edward Z. Yang", + "email": "admin@htmlpurifier.org", + "homepage": "http://ezyang.com" + } + ], + "require": { + "php": ">=5.2" + }, + "autoload": { + "psr-0": { "HTMLPurifier": "library/" }, + "files": ["library/HTMLPurifier.composer.php"] + } +} diff --git a/vendor/ezyang/htmlpurifier/extras/ConfigDoc/HTMLXSLTProcessor.php b/vendor/ezyang/htmlpurifier/extras/ConfigDoc/HTMLXSLTProcessor.php new file mode 100644 index 0000000000..1cfec5d762 --- /dev/null +++ b/vendor/ezyang/htmlpurifier/extras/ConfigDoc/HTMLXSLTProcessor.php @@ -0,0 +1,91 @@ +xsltProcessor = $proc; + } + + /** + * @note Allows a string $xsl filename to be passed + */ + public function importStylesheet($xsl) + { + if (is_string($xsl)) { + $xsl_file = $xsl; + $xsl = new DOMDocument(); + $xsl->load($xsl_file); + } + return $this->xsltProcessor->importStylesheet($xsl); + } + + /** + * Transforms an XML file into compatible XHTML based on the stylesheet + * @param $xml XML DOM tree, or string filename + * @return string HTML output + * @todo Rename to transformToXHTML, as transformToHTML is misleading + */ + public function transformToHTML($xml) + { + if (is_string($xml)) { + $dom = new DOMDocument(); + $dom->load($xml); + } else { + $dom = $xml; + } + $out = $this->xsltProcessor->transformToXML($dom); + + // fudges for HTML backwards compatibility + // assumes that document is XHTML + $out = str_replace('/>', ' />', $out); //
            not
            + $out = str_replace(' xmlns=""', '', $out); // rm unnecessary xmlns + + if (class_exists('Tidy')) { + // cleanup output + $config = array( + 'indent' => true, + 'output-xhtml' => true, + 'wrap' => 80 + ); + $tidy = new Tidy; + $tidy->parseString($out, $config, 'utf8'); + $tidy->cleanRepair(); + $out = (string) $tidy; + } + + return $out; + } + + /** + * Bulk sets parameters for the XSL stylesheet + * @param array $options Associative array of options to set + */ + public function setParameters($options) + { + foreach ($options as $name => $value) { + $this->xsltProcessor->setParameter('', $name, $value); + } + } + + /** + * Forward any other calls to the XSLT processor + */ + public function __call($name, $arguments) + { + call_user_func_array(array($this->xsltProcessor, $name), $arguments); + } + +} + +// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/extras/FSTools.php b/vendor/ezyang/htmlpurifier/extras/FSTools.php new file mode 100644 index 0000000000..ce00763166 --- /dev/null +++ b/vendor/ezyang/htmlpurifier/extras/FSTools.php @@ -0,0 +1,164 @@ +mkdir($base); + } + $base .= DIRECTORY_SEPARATOR; + } + } + + /** + * Copy a file, or recursively copy a folder and its contents; modified + * so that copied files, if PHP, have includes removed + * @note Adapted from http://aidanlister.com/repos/v/function.copyr.php + */ + public function copyr($source, $dest) + { + // Simple copy for a file + if (is_file($source)) { + return $this->copy($source, $dest); + } + // Make destination directory + if (!is_dir($dest)) { + $this->mkdir($dest); + } + // Loop through the folder + $dir = $this->dir($source); + while ( false !== ($entry = $dir->read()) ) { + // Skip pointers + if ($entry == '.' || $entry == '..') { + continue; + } + if (!$this->copyable($entry)) { + continue; + } + // Deep copy directories + if ($dest !== "$source/$entry") { + $this->copyr("$source/$entry", "$dest/$entry"); + } + } + // Clean up + $dir->close(); + return true; + } + + /** + * Overloadable function that tests a filename for copyability. By + * default, everything should be copied; you can restrict things to + * ignore hidden files, unreadable files, etc. This function + * applies to copyr(). + */ + public function copyable($file) + { + return true; + } + + /** + * Delete a file, or a folder and its contents + * @note Adapted from http://aidanlister.com/repos/v/function.rmdirr.php + */ + public function rmdirr($dirname) + { + // Sanity check + if (!$this->file_exists($dirname)) { + return false; + } + + // Simple delete for a file + if ($this->is_file($dirname) || $this->is_link($dirname)) { + return $this->unlink($dirname); + } + + // Loop through the folder + $dir = $this->dir($dirname); + while (false !== $entry = $dir->read()) { + // Skip pointers + if ($entry == '.' || $entry == '..') { + continue; + } + // Recurse + $this->rmdirr($dirname . DIRECTORY_SEPARATOR . $entry); + } + + // Clean up + $dir->close(); + return $this->rmdir($dirname); + } + + /** + * Recursively globs a directory. + */ + public function globr($dir, $pattern, $flags = NULL) + { + $files = $this->glob("$dir/$pattern", $flags); + if ($files === false) $files = array(); + $sub_dirs = $this->glob("$dir/*", GLOB_ONLYDIR); + if ($sub_dirs === false) $sub_dirs = array(); + foreach ($sub_dirs as $sub_dir) { + $sub_files = $this->globr($sub_dir, $pattern, $flags); + $files = array_merge($files, $sub_files); + } + return $files; + } + + /** + * Allows for PHP functions to be called and be stubbed. + * @warning This function will not work for functions that need + * to pass references; manually define a stub function for those. + */ + public function __call($name, $args) + { + return call_user_func_array($name, $args); + } + +} + +// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/extras/FSTools/File.php b/vendor/ezyang/htmlpurifier/extras/FSTools/File.php new file mode 100644 index 0000000000..6453a7a450 --- /dev/null +++ b/vendor/ezyang/htmlpurifier/extras/FSTools/File.php @@ -0,0 +1,141 @@ +name = $name; + $this->fs = $fs ? $fs : FSTools::singleton(); + } + + /** Returns the filename of the file. */ + public function getName() {return $this->name;} + + /** Returns directory of the file without trailing slash */ + public function getDirectory() {return $this->fs->dirname($this->name);} + + /** + * Retrieves the contents of a file + * @todo Throw an exception if file doesn't exist + */ + public function get() + { + return $this->fs->file_get_contents($this->name); + } + + /** Writes contents to a file, creates new file if necessary */ + public function write($contents) + { + return $this->fs->file_put_contents($this->name, $contents); + } + + /** Deletes the file */ + public function delete() + { + return $this->fs->unlink($this->name); + } + + /** Returns true if file exists and is a file. */ + public function exists() + { + return $this->fs->is_file($this->name); + } + + /** Returns last file modification time */ + public function getMTime() + { + return $this->fs->filemtime($this->name); + } + + /** + * Chmod a file + * @note We ignore errors because of some weird owner trickery due + * to SVN duality + */ + public function chmod($octal_code) + { + return @$this->fs->chmod($this->name, $octal_code); + } + + /** Opens file's handle */ + public function open($mode) + { + if ($this->handle) $this->close(); + $this->handle = $this->fs->fopen($this->name, $mode); + return true; + } + + /** Closes file's handle */ + public function close() + { + if (!$this->handle) return false; + $status = $this->fs->fclose($this->handle); + $this->handle = false; + return $status; + } + + /** Retrieves a line from an open file, with optional max length $length */ + public function getLine($length = null) + { + if (!$this->handle) $this->open('r'); + if ($length === null) return $this->fs->fgets($this->handle); + else return $this->fs->fgets($this->handle, $length); + } + + /** Retrieves a character from an open file */ + public function getChar() + { + if (!$this->handle) $this->open('r'); + return $this->fs->fgetc($this->handle); + } + + /** Retrieves an $length bytes of data from an open data */ + public function read($length) + { + if (!$this->handle) $this->open('r'); + return $this->fs->fread($this->handle, $length); + } + + /** Writes to an open file */ + public function put($string) + { + if (!$this->handle) $this->open('a'); + return $this->fs->fwrite($this->handle, $string); + } + + /** Returns TRUE if the end of the file has been reached */ + public function eof() + { + if (!$this->handle) return true; + return $this->fs->feof($this->handle); + } + + public function __destruct() + { + if ($this->handle) $this->close(); + } + +} + +// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/extras/HTMLPurifierExtras.auto.php b/vendor/ezyang/htmlpurifier/extras/HTMLPurifierExtras.auto.php new file mode 100644 index 0000000000..4016d8afd1 --- /dev/null +++ b/vendor/ezyang/htmlpurifier/extras/HTMLPurifierExtras.auto.php @@ -0,0 +1,11 @@ +fopen(...). + This makes it a lot simpler to mock these filesystem calls for unit testing. + +- FSTools_File: This object represents a single file, and has almost any + method imaginable one would need. + +Check the files themselves for more information. + + vim: et sw=4 sts=4 diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier.auto.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier.auto.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier.auto.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier.auto.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier.autoload.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier.autoload.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier.autoload.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier.autoload.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier.composer.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier.composer.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier.composer.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier.composer.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier.func.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier.func.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier.func.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier.func.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier.includes.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier.includes.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier.includes.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier.includes.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier.kses.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier.kses.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier.kses.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier.kses.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier.path.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier.path.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier.path.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier.path.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier.safe-includes.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier.safe-includes.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier.safe-includes.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier.safe-includes.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Arborize.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Arborize.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Arborize.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Arborize.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrCollections.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrCollections.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrCollections.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrCollections.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/AlphaValue.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/AlphaValue.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/AlphaValue.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/AlphaValue.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/Background.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Background.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/Background.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Background.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/BackgroundPosition.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/BackgroundPosition.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/BackgroundPosition.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/BackgroundPosition.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/Border.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Border.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/Border.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Border.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/Color.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Color.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/Color.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Color.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/Composite.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Composite.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/Composite.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Composite.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/Filter.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Filter.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/Filter.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Filter.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/Font.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Font.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/Font.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Font.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/FontFamily.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/FontFamily.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/FontFamily.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/FontFamily.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/Ident.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Ident.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/Ident.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Ident.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/ImportantDecorator.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/ImportantDecorator.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/ImportantDecorator.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/ImportantDecorator.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/Length.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Length.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/Length.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Length.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/ListStyle.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/ListStyle.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/ListStyle.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/ListStyle.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/Multiple.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Multiple.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/Multiple.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Multiple.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/Number.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Number.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/Number.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Number.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/Percentage.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Percentage.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/Percentage.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Percentage.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/TextDecoration.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/TextDecoration.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/TextDecoration.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/TextDecoration.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/URI.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/URI.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/CSS/URI.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/URI.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/Clone.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Clone.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/Clone.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Clone.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/Enum.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Enum.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/Enum.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Enum.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/HTML/Bool.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Bool.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/HTML/Bool.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Bool.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/HTML/Class.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Class.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/HTML/Class.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Class.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/HTML/Color.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Color.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/HTML/Color.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Color.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/HTML/FrameTarget.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/FrameTarget.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/HTML/FrameTarget.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/FrameTarget.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/HTML/ID.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/ID.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/HTML/ID.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/ID.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/HTML/Length.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Length.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/HTML/Length.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Length.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/HTML/LinkTypes.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/LinkTypes.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/HTML/LinkTypes.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/LinkTypes.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/HTML/MultiLength.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/MultiLength.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/HTML/MultiLength.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/MultiLength.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/HTML/Nmtokens.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Nmtokens.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/HTML/Nmtokens.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Nmtokens.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/HTML/Pixels.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Pixels.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/HTML/Pixels.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Pixels.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/Integer.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Integer.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/Integer.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Integer.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/Lang.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Lang.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/Lang.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Lang.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/Switch.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Switch.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/Switch.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Switch.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/Text.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Text.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/Text.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Text.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/URI.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/URI.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/URI/Email.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Email.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/URI/Email.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Email.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/URI/Email/SimpleCheck.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Email/SimpleCheck.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/URI/Email/SimpleCheck.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Email/SimpleCheck.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/URI/Host.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Host.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/URI/Host.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Host.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/URI/IPv4.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/IPv4.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/URI/IPv4.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/IPv4.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/URI/IPv6.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/IPv6.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrDef/URI/IPv6.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/IPv6.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/Background.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Background.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/Background.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Background.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/BdoDir.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/BdoDir.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/BdoDir.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/BdoDir.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/BgColor.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/BgColor.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/BgColor.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/BgColor.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/BoolToCSS.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/BoolToCSS.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/BoolToCSS.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/BoolToCSS.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/Border.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Border.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/Border.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Border.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/EnumToCSS.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/EnumToCSS.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/EnumToCSS.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/EnumToCSS.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/ImgRequired.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/ImgRequired.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/ImgRequired.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/ImgRequired.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/ImgSpace.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/ImgSpace.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/ImgSpace.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/ImgSpace.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/Input.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Input.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/Input.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Input.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/Lang.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Lang.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/Lang.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Lang.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/Length.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Length.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/Length.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Length.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/Name.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Name.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/Name.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Name.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/NameSync.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/NameSync.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/NameSync.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/NameSync.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/Nofollow.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Nofollow.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/Nofollow.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Nofollow.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/SafeEmbed.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/SafeEmbed.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/SafeEmbed.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/SafeEmbed.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/SafeObject.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/SafeObject.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/SafeObject.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/SafeObject.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/SafeParam.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/SafeParam.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/SafeParam.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/SafeParam.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/ScriptRequired.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/ScriptRequired.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/ScriptRequired.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/ScriptRequired.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/TargetBlank.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/TargetBlank.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/TargetBlank.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/TargetBlank.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/TargetNoreferrer.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/TargetNoreferrer.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/TargetNoreferrer.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/TargetNoreferrer.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/Textarea.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Textarea.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTransform/Textarea.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Textarea.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTypes.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTypes.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrTypes.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTypes.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrValidator.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrValidator.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/AttrValidator.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrValidator.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Bootstrap.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Bootstrap.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Bootstrap.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Bootstrap.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/CSSDefinition.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/CSSDefinition.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/CSSDefinition.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/CSSDefinition.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ChildDef.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ChildDef.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ChildDef/Chameleon.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Chameleon.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ChildDef/Chameleon.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Chameleon.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ChildDef/Custom.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Custom.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ChildDef/Custom.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Custom.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ChildDef/Empty.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Empty.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ChildDef/Empty.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Empty.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ChildDef/List.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/List.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ChildDef/List.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/List.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ChildDef/Optional.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Optional.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ChildDef/Optional.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Optional.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ChildDef/Required.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Required.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ChildDef/Required.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Required.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ChildDef/StrictBlockquote.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/StrictBlockquote.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ChildDef/StrictBlockquote.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/StrictBlockquote.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ChildDef/Table.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Table.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ChildDef/Table.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Table.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Config.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Config.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Config.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Config.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/Builder/ConfigSchema.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Builder/ConfigSchema.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/Builder/ConfigSchema.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Builder/ConfigSchema.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/Builder/Xml.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Builder/Xml.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/Builder/Xml.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Builder/Xml.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/Exception.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Exception.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/Exception.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Exception.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/Interchange.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/Interchange.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/Interchange/Directive.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange/Directive.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/Interchange/Directive.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange/Directive.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/Interchange/Id.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange/Id.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/Interchange/Id.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange/Id.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/InterchangeBuilder.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/InterchangeBuilder.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/InterchangeBuilder.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/InterchangeBuilder.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/Validator.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Validator.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/Validator.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Validator.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/ValidatorAtom.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/ValidatorAtom.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/ValidatorAtom.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/ValidatorAtom.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema.ser b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema.ser similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema.ser rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema.ser diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedClasses.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedClasses.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedClasses.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedClasses.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedFrameTargets.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedFrameTargets.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedFrameTargets.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedFrameTargets.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRel.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRel.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRel.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRel.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRev.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRev.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRev.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRev.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Attr.ClassUseCDATA.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.ClassUseCDATA.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Attr.ClassUseCDATA.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.ClassUseCDATA.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultImageAlt.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultImageAlt.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultImageAlt.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultImageAlt.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImage.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImage.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImage.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImage.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImageAlt.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImageAlt.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImageAlt.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImageAlt.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultTextDir.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultTextDir.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultTextDir.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultTextDir.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Attr.EnableID.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.EnableID.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Attr.EnableID.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.EnableID.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Attr.ForbiddenClasses.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.ForbiddenClasses.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Attr.ForbiddenClasses.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.ForbiddenClasses.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Attr.ID.HTML5.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.ID.HTML5.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Attr.ID.HTML5.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.ID.HTML5.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklist.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklist.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklist.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklist.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklistRegexp.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklistRegexp.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklistRegexp.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklistRegexp.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefix.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefix.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefix.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefix.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefixLocal.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefixLocal.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefixLocal.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefixLocal.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.AutoParagraph.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.AutoParagraph.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.AutoParagraph.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.AutoParagraph.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.Custom.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.Custom.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.Custom.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.Custom.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.DisplayLinkURI.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.DisplayLinkURI.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.DisplayLinkURI.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.DisplayLinkURI.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.Linkify.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.Linkify.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.Linkify.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.Linkify.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.DocURL.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.DocURL.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.DocURL.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.DocURL.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.Predicate.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.Predicate.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.Predicate.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.Predicate.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.RemoveNbsp.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.RemoveNbsp.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.RemoveNbsp.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.RemoveNbsp.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveSpansWithoutAttributes.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveSpansWithoutAttributes.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveSpansWithoutAttributes.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveSpansWithoutAttributes.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowDuplicates.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowDuplicates.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowDuplicates.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowDuplicates.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowImportant.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowImportant.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowImportant.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowImportant.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowTricky.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowTricky.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowTricky.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowTricky.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowedFonts.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowedFonts.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowedFonts.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowedFonts.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowedProperties.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowedProperties.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowedProperties.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowedProperties.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/CSS.DefinitionRev.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.DefinitionRev.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/CSS.DefinitionRev.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.DefinitionRev.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/CSS.ForbiddenProperties.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.ForbiddenProperties.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/CSS.ForbiddenProperties.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.ForbiddenProperties.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/CSS.MaxImgLength.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.MaxImgLength.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/CSS.MaxImgLength.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.MaxImgLength.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/CSS.Proprietary.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.Proprietary.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/CSS.Proprietary.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.Proprietary.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/CSS.Trusted.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.Trusted.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/CSS.Trusted.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.Trusted.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Cache.DefinitionImpl.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Cache.DefinitionImpl.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Cache.DefinitionImpl.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Cache.DefinitionImpl.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Cache.SerializerPath.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Cache.SerializerPath.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Cache.SerializerPath.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Cache.SerializerPath.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Cache.SerializerPermissions.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Cache.SerializerPermissions.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Cache.SerializerPermissions.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Cache.SerializerPermissions.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.AggressivelyFixLt.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.AggressivelyFixLt.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.AggressivelyFixLt.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.AggressivelyFixLt.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.AllowHostnameUnderscore.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.AllowHostnameUnderscore.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.AllowHostnameUnderscore.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.AllowHostnameUnderscore.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.CollectErrors.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.CollectErrors.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.CollectErrors.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.CollectErrors.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.ColorKeywords.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.ColorKeywords.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.ColorKeywords.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.ColorKeywords.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.ConvertDocumentToFragment.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.ConvertDocumentToFragment.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.ConvertDocumentToFragment.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.ConvertDocumentToFragment.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.DirectLexLineNumberSyncInterval.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.DirectLexLineNumberSyncInterval.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.DirectLexLineNumberSyncInterval.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.DirectLexLineNumberSyncInterval.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.DisableExcludes.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.DisableExcludes.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.DisableExcludes.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.DisableExcludes.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.EnableIDNA.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.EnableIDNA.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.EnableIDNA.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.EnableIDNA.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.Encoding.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.Encoding.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.Encoding.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.Encoding.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidChildren.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidChildren.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidChildren.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidChildren.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidTags.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidTags.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidTags.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidTags.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeNonASCIICharacters.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeNonASCIICharacters.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeNonASCIICharacters.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeNonASCIICharacters.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.HiddenElements.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.HiddenElements.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.HiddenElements.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.HiddenElements.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.Language.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.Language.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.Language.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.Language.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.LexerImpl.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.LexerImpl.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.LexerImpl.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.LexerImpl.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.MaintainLineNumbers.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.MaintainLineNumbers.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.MaintainLineNumbers.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.MaintainLineNumbers.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.NormalizeNewlines.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.NormalizeNewlines.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.NormalizeNewlines.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.NormalizeNewlines.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveInvalidImg.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveInvalidImg.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveInvalidImg.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveInvalidImg.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveProcessingInstructions.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveProcessingInstructions.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveProcessingInstructions.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveProcessingInstructions.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveScriptContents.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveScriptContents.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveScriptContents.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveScriptContents.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Filter.Custom.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.Custom.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Filter.Custom.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.Custom.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.Escaping.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.Escaping.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.Escaping.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.Escaping.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.Scope.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.Scope.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.Scope.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.Scope.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.TidyImpl.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.TidyImpl.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.TidyImpl.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.TidyImpl.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Filter.YouTube.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.YouTube.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Filter.YouTube.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.YouTube.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.Allowed.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Allowed.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.Allowed.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Allowed.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedAttributes.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedAttributes.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedAttributes.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedAttributes.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedComments.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedComments.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedComments.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedComments.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedCommentsRegexp.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedCommentsRegexp.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedCommentsRegexp.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedCommentsRegexp.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedElements.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedElements.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedElements.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedElements.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedModules.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedModules.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedModules.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedModules.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.Attr.Name.UseCDATA.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Attr.Name.UseCDATA.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.Attr.Name.UseCDATA.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Attr.Name.UseCDATA.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.BlockWrapper.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.BlockWrapper.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.BlockWrapper.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.BlockWrapper.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.CoreModules.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.CoreModules.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.CoreModules.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.CoreModules.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.CustomDoctype.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.CustomDoctype.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.CustomDoctype.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.CustomDoctype.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionID.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionID.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionID.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionID.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionRev.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionRev.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionRev.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionRev.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.Doctype.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Doctype.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.Doctype.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Doctype.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.FlashAllowFullScreen.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.FlashAllowFullScreen.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.FlashAllowFullScreen.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.FlashAllowFullScreen.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenAttributes.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenAttributes.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenAttributes.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenAttributes.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenElements.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenElements.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenElements.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenElements.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.MaxImgLength.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.MaxImgLength.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.MaxImgLength.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.MaxImgLength.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.Nofollow.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Nofollow.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.Nofollow.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Nofollow.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.Parent.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Parent.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.Parent.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Parent.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.Proprietary.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Proprietary.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.Proprietary.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Proprietary.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeEmbed.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeEmbed.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeEmbed.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeEmbed.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeIframe.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeIframe.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeIframe.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeIframe.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeObject.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeObject.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeObject.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeObject.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeScripting.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeScripting.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeScripting.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeScripting.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.Strict.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Strict.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.Strict.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Strict.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.TargetBlank.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TargetBlank.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.TargetBlank.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TargetBlank.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.TargetNoreferrer.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TargetNoreferrer.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.TargetNoreferrer.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TargetNoreferrer.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyAdd.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyAdd.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyAdd.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyAdd.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyLevel.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyLevel.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyLevel.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyLevel.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyRemove.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyRemove.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyRemove.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyRemove.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.Trusted.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Trusted.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.Trusted.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Trusted.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.XHTML.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.XHTML.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/HTML.XHTML.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.XHTML.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Output.CommentScriptContents.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.CommentScriptContents.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Output.CommentScriptContents.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.CommentScriptContents.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Output.FixInnerHTML.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.FixInnerHTML.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Output.FixInnerHTML.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.FixInnerHTML.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Output.FlashCompat.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.FlashCompat.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Output.FlashCompat.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.FlashCompat.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Output.Newline.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.Newline.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Output.Newline.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.Newline.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Output.SortAttr.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.SortAttr.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Output.SortAttr.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.SortAttr.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Output.TidyFormat.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.TidyFormat.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Output.TidyFormat.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.TidyFormat.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Test.ForceNoIconv.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Test.ForceNoIconv.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/Test.ForceNoIconv.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Test.ForceNoIconv.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.AllowedSchemes.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.AllowedSchemes.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.AllowedSchemes.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.AllowedSchemes.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.Base.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Base.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.Base.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Base.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.DefaultScheme.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DefaultScheme.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.DefaultScheme.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DefaultScheme.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.DefinitionID.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DefinitionID.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.DefinitionID.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DefinitionID.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.DefinitionRev.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DefinitionRev.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.DefinitionRev.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DefinitionRev.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.Disable.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Disable.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.Disable.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Disable.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.DisableExternal.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DisableExternal.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.DisableExternal.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DisableExternal.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.DisableExternalResources.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DisableExternalResources.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.DisableExternalResources.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DisableExternalResources.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.DisableResources.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DisableResources.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.DisableResources.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DisableResources.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.Host.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Host.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.Host.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Host.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.HostBlacklist.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.HostBlacklist.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.HostBlacklist.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.HostBlacklist.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.MakeAbsolute.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.MakeAbsolute.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.MakeAbsolute.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.MakeAbsolute.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.Munge.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Munge.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.Munge.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Munge.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.MungeResources.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.MungeResources.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.MungeResources.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.MungeResources.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.MungeSecretKey.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.MungeSecretKey.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.MungeSecretKey.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.MungeSecretKey.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.OverrideAllowedSchemes.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.OverrideAllowedSchemes.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.OverrideAllowedSchemes.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.OverrideAllowedSchemes.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.SafeIframeRegexp.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.SafeIframeRegexp.txt similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/URI.SafeIframeRegexp.txt rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.SafeIframeRegexp.txt diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/info.ini b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/info.ini similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ConfigSchema/schema/info.ini rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/info.ini diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ContentSets.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ContentSets.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ContentSets.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ContentSets.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Context.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Context.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Context.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Context.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Definition.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Definition.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Definition.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Definition.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/DefinitionCache.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/DefinitionCache.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/DefinitionCache/Decorator.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/DefinitionCache/Decorator.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/DefinitionCache/Decorator/Cleanup.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator/Cleanup.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/DefinitionCache/Decorator/Cleanup.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator/Cleanup.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/DefinitionCache/Decorator/Memory.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator/Memory.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/DefinitionCache/Decorator/Memory.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator/Memory.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/DefinitionCache/Decorator/Template.php.in b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator/Template.php.in similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/DefinitionCache/Decorator/Template.php.in rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator/Template.php.in diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/DefinitionCache/Null.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Null.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/DefinitionCache/Null.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Null.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/DefinitionCache/Serializer.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/DefinitionCache/Serializer.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/DefinitionCache/Serializer/README b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer/README similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/DefinitionCache/Serializer/README rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer/README diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/DefinitionCacheFactory.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCacheFactory.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/DefinitionCacheFactory.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCacheFactory.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Doctype.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Doctype.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Doctype.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Doctype.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/DoctypeRegistry.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DoctypeRegistry.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/DoctypeRegistry.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/DoctypeRegistry.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ElementDef.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ElementDef.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ElementDef.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ElementDef.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Encoder.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Encoder.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Encoder.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Encoder.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/EntityLookup.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/EntityLookup.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/EntityLookup.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/EntityLookup.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/EntityLookup/entities.ser b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/EntityLookup/entities.ser similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/EntityLookup/entities.ser rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/EntityLookup/entities.ser diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/EntityParser.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/EntityParser.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/EntityParser.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/EntityParser.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ErrorCollector.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ErrorCollector.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ErrorCollector.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ErrorCollector.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ErrorStruct.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ErrorStruct.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/ErrorStruct.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/ErrorStruct.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Exception.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Exception.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Exception.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Exception.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Filter.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Filter.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Filter.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Filter.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Filter/ExtractStyleBlocks.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Filter/ExtractStyleBlocks.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Filter/ExtractStyleBlocks.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Filter/ExtractStyleBlocks.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Filter/YouTube.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Filter/YouTube.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Filter/YouTube.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Filter/YouTube.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Generator.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Generator.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Generator.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Generator.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLDefinition.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLDefinition.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLDefinition.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLDefinition.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Bdo.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Bdo.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Bdo.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Bdo.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/CommonAttributes.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/CommonAttributes.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/CommonAttributes.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/CommonAttributes.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Edit.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Edit.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Edit.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Edit.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Forms.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Forms.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Forms.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Forms.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Hypertext.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Hypertext.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Hypertext.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Hypertext.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Iframe.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Iframe.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Iframe.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Iframe.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Image.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Image.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Image.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Image.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Legacy.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Legacy.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Legacy.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Legacy.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/List.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/List.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/List.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/List.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Name.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Name.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Name.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Name.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Nofollow.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Nofollow.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Nofollow.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Nofollow.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/NonXMLCommonAttributes.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/NonXMLCommonAttributes.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/NonXMLCommonAttributes.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/NonXMLCommonAttributes.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Object.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Object.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Object.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Object.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Presentation.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Presentation.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Presentation.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Presentation.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Proprietary.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Proprietary.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Proprietary.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Proprietary.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Ruby.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Ruby.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Ruby.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Ruby.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/SafeEmbed.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/SafeEmbed.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/SafeEmbed.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/SafeEmbed.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/SafeObject.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/SafeObject.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/SafeObject.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/SafeObject.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/SafeScripting.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/SafeScripting.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/SafeScripting.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/SafeScripting.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Scripting.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Scripting.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Scripting.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Scripting.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/StyleAttribute.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/StyleAttribute.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/StyleAttribute.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/StyleAttribute.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Tables.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tables.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Tables.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tables.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Target.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Target.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Target.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Target.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/TargetBlank.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/TargetBlank.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/TargetBlank.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/TargetBlank.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/TargetNoreferrer.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/TargetNoreferrer.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/TargetNoreferrer.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/TargetNoreferrer.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Text.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Text.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Text.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Text.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Tidy.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Tidy.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Tidy/Name.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/Name.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Tidy/Name.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/Name.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Tidy/Proprietary.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/Proprietary.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Tidy/Proprietary.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/Proprietary.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Tidy/Strict.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/Strict.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Tidy/Strict.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/Strict.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Tidy/Transitional.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/Transitional.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Tidy/Transitional.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/Transitional.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Tidy/XHTML.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/XHTML.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Tidy/XHTML.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/XHTML.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Tidy/XHTMLAndHTML4.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/XHTMLAndHTML4.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/Tidy/XHTMLAndHTML4.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/XHTMLAndHTML4.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/XMLCommonAttributes.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/XMLCommonAttributes.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModule/XMLCommonAttributes.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/XMLCommonAttributes.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModuleManager.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModuleManager.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/HTMLModuleManager.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModuleManager.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/IDAccumulator.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/IDAccumulator.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/IDAccumulator.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/IDAccumulator.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Injector.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Injector.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Injector.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Injector.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Injector/AutoParagraph.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Injector/AutoParagraph.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Injector/AutoParagraph.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Injector/AutoParagraph.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Injector/DisplayLinkURI.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Injector/DisplayLinkURI.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Injector/DisplayLinkURI.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Injector/DisplayLinkURI.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Injector/Linkify.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Injector/Linkify.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Injector/Linkify.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Injector/Linkify.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Injector/PurifierLinkify.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Injector/PurifierLinkify.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Injector/PurifierLinkify.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Injector/PurifierLinkify.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Injector/RemoveEmpty.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Injector/RemoveEmpty.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Injector/RemoveEmpty.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Injector/RemoveEmpty.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Injector/RemoveSpansWithoutAttributes.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Injector/RemoveSpansWithoutAttributes.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Injector/RemoveSpansWithoutAttributes.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Injector/RemoveSpansWithoutAttributes.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Injector/SafeObject.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Injector/SafeObject.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Injector/SafeObject.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Injector/SafeObject.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Language.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Language.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Language.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Language.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Language/classes/en-x-test.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Language/classes/en-x-test.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Language/classes/en-x-test.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Language/classes/en-x-test.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Language/messages/en-x-test.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Language/messages/en-x-test.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Language/messages/en-x-test.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Language/messages/en-x-test.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Language/messages/en-x-testmini.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Language/messages/en-x-testmini.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Language/messages/en-x-testmini.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Language/messages/en-x-testmini.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Language/messages/en.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Language/messages/en.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Language/messages/en.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Language/messages/en.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/LanguageFactory.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/LanguageFactory.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/LanguageFactory.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/LanguageFactory.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Length.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Length.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Length.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Length.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Lexer.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Lexer.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Lexer/DOMLex.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/DOMLex.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Lexer/DOMLex.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/DOMLex.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Lexer/DirectLex.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/DirectLex.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Lexer/DirectLex.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/DirectLex.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Lexer/PH5P.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/PH5P.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Lexer/PH5P.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/PH5P.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Node.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Node.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Node.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Node.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Node/Comment.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Node/Comment.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Node/Comment.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Node/Comment.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Node/Element.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Node/Element.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Node/Element.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Node/Element.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Node/Text.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Node/Text.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Node/Text.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Node/Text.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/PercentEncoder.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/PercentEncoder.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/PercentEncoder.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/PercentEncoder.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Printer.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Printer.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Printer/CSSDefinition.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer/CSSDefinition.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Printer/CSSDefinition.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer/CSSDefinition.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Printer/ConfigForm.css b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.css similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Printer/ConfigForm.css rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.css diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Printer/ConfigForm.js b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.js similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Printer/ConfigForm.js rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.js diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Printer/ConfigForm.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Printer/ConfigForm.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Printer/HTMLDefinition.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer/HTMLDefinition.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Printer/HTMLDefinition.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer/HTMLDefinition.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/PropertyList.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/PropertyList.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/PropertyList.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/PropertyList.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/PropertyListIterator.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/PropertyListIterator.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/PropertyListIterator.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/PropertyListIterator.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Queue.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Queue.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Queue.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Queue.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Strategy.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Strategy.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Strategy/Composite.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/Composite.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Strategy/Composite.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/Composite.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Strategy/Core.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/Core.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Strategy/Core.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/Core.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Strategy/FixNesting.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/FixNesting.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Strategy/FixNesting.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/FixNesting.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Strategy/MakeWellFormed.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/MakeWellFormed.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Strategy/MakeWellFormed.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/MakeWellFormed.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Strategy/RemoveForeignElements.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/RemoveForeignElements.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Strategy/RemoveForeignElements.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/RemoveForeignElements.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Strategy/ValidateAttributes.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/ValidateAttributes.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Strategy/ValidateAttributes.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/ValidateAttributes.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/StringHash.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/StringHash.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/StringHash.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/StringHash.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/StringHashParser.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/StringHashParser.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/StringHashParser.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/StringHashParser.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/TagTransform.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/TagTransform.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/TagTransform.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/TagTransform.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/TagTransform/Font.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/TagTransform/Font.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/TagTransform/Font.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/TagTransform/Font.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/TagTransform/Simple.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/TagTransform/Simple.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/TagTransform/Simple.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/TagTransform/Simple.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Token.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Token.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Token/Comment.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/Comment.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Token/Comment.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/Comment.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Token/Empty.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/Empty.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Token/Empty.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/Empty.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Token/End.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/End.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Token/End.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/End.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Token/Start.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/Start.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Token/Start.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/Start.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Token/Tag.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/Tag.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Token/Tag.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/Tag.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Token/Text.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/Text.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Token/Text.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/Text.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/TokenFactory.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/TokenFactory.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/TokenFactory.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/TokenFactory.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URI.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URI.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URI.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/URI.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIDefinition.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIDefinition.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIDefinition.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIDefinition.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIFilter.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIFilter.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIFilter/DisableExternal.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/DisableExternal.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIFilter/DisableExternal.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/DisableExternal.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIFilter/DisableExternalResources.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/DisableExternalResources.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIFilter/DisableExternalResources.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/DisableExternalResources.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIFilter/DisableResources.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/DisableResources.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIFilter/DisableResources.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/DisableResources.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIFilter/HostBlacklist.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/HostBlacklist.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIFilter/HostBlacklist.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/HostBlacklist.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIFilter/MakeAbsolute.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/MakeAbsolute.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIFilter/MakeAbsolute.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/MakeAbsolute.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIFilter/Munge.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/Munge.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIFilter/Munge.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/Munge.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIFilter/SafeIframe.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/SafeIframe.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIFilter/SafeIframe.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/SafeIframe.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIParser.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIParser.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIParser.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIParser.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIScheme.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIScheme.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIScheme/data.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/data.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIScheme/data.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/data.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIScheme/file.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/file.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIScheme/file.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/file.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIScheme/ftp.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/ftp.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIScheme/ftp.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/ftp.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIScheme/http.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/http.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIScheme/http.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/http.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIScheme/https.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/https.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIScheme/https.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/https.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIScheme/mailto.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/mailto.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIScheme/mailto.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/mailto.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIScheme/news.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/news.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIScheme/news.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/news.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIScheme/nntp.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/nntp.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIScheme/nntp.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/nntp.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIScheme/tel.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/tel.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URIScheme/tel.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/tel.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URISchemeRegistry.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URISchemeRegistry.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/URISchemeRegistry.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/URISchemeRegistry.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/UnitConverter.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/UnitConverter.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/UnitConverter.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/UnitConverter.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/VarParser.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/VarParser.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/VarParser.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/VarParser.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/VarParser/Flexible.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/VarParser/Flexible.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/VarParser/Flexible.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/VarParser/Flexible.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/VarParser/Native.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/VarParser/Native.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/VarParser/Native.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/VarParser/Native.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/VarParserException.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/VarParserException.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/VarParserException.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/VarParserException.php diff --git a/lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Zipper.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Zipper.php similarity index 100% rename from lib/htmlpurifier-4.8.0-lite/library/HTMLPurifier/Zipper.php rename to vendor/ezyang/htmlpurifier/library/HTMLPurifier/Zipper.php diff --git a/vendor/ezyang/htmlpurifier/maintenance/PH5P.patch b/vendor/ezyang/htmlpurifier/maintenance/PH5P.patch new file mode 100644 index 0000000000..763709509b --- /dev/null +++ b/vendor/ezyang/htmlpurifier/maintenance/PH5P.patch @@ -0,0 +1,102 @@ +--- C:\Users\Edward\Webs\htmlpurifier\maintenance\PH5P.php 2008-07-07 09:12:12.000000000 -0400 ++++ C:\Users\Edward\Webs\htmlpurifier\maintenance/PH5P.new.php 2008-12-06 02:29:34.988800000 -0500 +@@ -65,7 +65,7 @@ + + public function __construct($data) { + $data = str_replace("\r\n", "\n", $data); +- $date = str_replace("\r", null, $data); ++ $data = str_replace("\r", null, $data); + + $this->data = $data; + $this->char = -1; +@@ -211,7 +211,10 @@ + // If nothing is returned, emit a U+0026 AMPERSAND character token. + // Otherwise, emit the character token that was returned. + $char = (!$entity) ? '&' : $entity; +- $this->emitToken($char); ++ $this->emitToken(array( ++ 'type' => self::CHARACTR, ++ 'data' => $char ++ )); + + // Finally, switch to the data state. + $this->state = 'data'; +@@ -708,7 +711,7 @@ + } elseif($char === '&') { + /* U+0026 AMPERSAND (&) + Switch to the entity in attribute value state. */ +- $this->entityInAttributeValueState('non'); ++ $this->entityInAttributeValueState(); + + } elseif($char === '>') { + /* U+003E GREATER-THAN SIGN (>) +@@ -738,7 +741,8 @@ + ? '&' + : $entity; + +- $this->emitToken($char); ++ $last = count($this->token['attr']) - 1; ++ $this->token['attr'][$last]['value'] .= $char; + } + + private function bogusCommentState() { +@@ -1066,6 +1070,11 @@ + $this->char++; + + if(in_array($id, $this->entities)) { ++ if ($e_name[$c-1] !== ';') { ++ if ($c < $len && $e_name[$c] == ';') { ++ $this->char++; // consume extra semicolon ++ } ++ } + $entity = $id; + break; + } +@@ -2084,7 +2093,7 @@ + /* Reconstruct the active formatting elements, if any. */ + $this->reconstructActiveFormattingElements(); + +- $this->insertElement($token); ++ $this->insertElement($token, true, true); + break; + } + break; +@@ -3465,7 +3474,18 @@ + } + } + +- private function insertElement($token, $append = true) { ++ private function insertElement($token, $append = true, $check = false) { ++ // Proprietary workaround for libxml2's limitations with tag names ++ if ($check) { ++ // Slightly modified HTML5 tag-name modification, ++ // removing anything that's not an ASCII letter, digit, or hyphen ++ $token['name'] = preg_replace('/[^a-z0-9-]/i', '', $token['name']); ++ // Remove leading hyphens and numbers ++ $token['name'] = ltrim($token['name'], '-0..9'); ++ // In theory, this should ever be needed, but just in case ++ if ($token['name'] === '') $token['name'] = 'span'; // arbitrary generic choice ++ } ++ + $el = $this->dom->createElement($token['name']); + + foreach($token['attr'] as $attr) { +@@ -3659,7 +3679,7 @@ + } + } + +- private function generateImpliedEndTags(array $exclude = array()) { ++ private function generateImpliedEndTags($exclude = array()) { + /* When the steps below require the UA to generate implied end tags, + then, if the current node is a dd element, a dt element, an li element, + a p element, a td element, a th element, or a tr element, the UA must +@@ -3673,7 +3693,8 @@ + } + } + +- private function getElementCategory($name) { ++ private function getElementCategory($node) { ++ $name = $node->tagName; + if(in_array($name, $this->special)) + return self::SPECIAL; + diff --git a/vendor/ezyang/htmlpurifier/maintenance/PH5P.php b/vendor/ezyang/htmlpurifier/maintenance/PH5P.php new file mode 100644 index 0000000000..9d83dcbf55 --- /dev/null +++ b/vendor/ezyang/htmlpurifier/maintenance/PH5P.php @@ -0,0 +1,3889 @@ +data = $data; + $this->char = -1; + $this->EOF = strlen($data); + $this->tree = new HTML5TreeConstructer; + $this->content_model = self::PCDATA; + + $this->state = 'data'; + + while($this->state !== null) { + $this->{$this->state.'State'}(); + } + } + + public function save() + { + return $this->tree->save(); + } + + private function char() + { + return ($this->char < $this->EOF) + ? $this->data[$this->char] + : false; + } + + private function character($s, $l = 0) + { + if($s + $l < $this->EOF) { + if($l === 0) { + return $this->data[$s]; + } else { + return substr($this->data, $s, $l); + } + } + } + + private function characters($char_class, $start) + { + return preg_replace('#^(['.$char_class.']+).*#s', '\\1', substr($this->data, $start)); + } + + private function dataState() + { + // Consume the next input character + $this->char++; + $char = $this->char(); + + if($char === '&' && ($this->content_model === self::PCDATA || $this->content_model === self::RCDATA)) { + /* U+0026 AMPERSAND (&) + When the content model flag is set to one of the PCDATA or RCDATA + states: switch to the entity data state. Otherwise: treat it as per + the "anything else" entry below. */ + $this->state = 'entityData'; + + } elseif($char === '-') { + /* If the content model flag is set to either the RCDATA state or + the CDATA state, and the escape flag is false, and there are at + least three characters before this one in the input stream, and the + last four characters in the input stream, including this one, are + U+003C LESS-THAN SIGN, U+0021 EXCLAMATION MARK, U+002D HYPHEN-MINUS, + and U+002D HYPHEN-MINUS (""), + set the escape flag to false. */ + if(($this->content_model === self::RCDATA || + $this->content_model === self::CDATA) && $this->escape === true && + $this->character($this->char, 3) === '-->') { + $this->escape = false; + } + + /* In any case, emit the input character as a character token. + Stay in the data state. */ + $this->emitToken(array( + 'type' => self::CHARACTR, + 'data' => $char + )); + + } elseif($this->char === $this->EOF) { + /* EOF + Emit an end-of-file token. */ + $this->EOF(); + + } elseif($this->content_model === self::PLAINTEXT) { + /* When the content model flag is set to the PLAINTEXT state + THIS DIFFERS GREATLY FROM THE SPEC: Get the remaining characters of + the text and emit it as a character token. */ + $this->emitToken(array( + 'type' => self::CHARACTR, + 'data' => substr($this->data, $this->char) + )); + + $this->EOF(); + + } else { + /* Anything else + THIS DIFFERS GREATLY FROM THE SPEC: Get as many character that + otherwise would also be treated as a character token and emit it + as a single character token. Stay in the data state. */ + $len = strcspn($this->data, '<&', $this->char); + $char = substr($this->data, $this->char, $len); + $this->char += $len - 1; + + $this->emitToken(array( + 'type' => self::CHARACTR, + 'data' => $char + )); + + $this->state = 'data'; + } + } + + private function entityDataState() + { + // Attempt to consume an entity. + $entity = $this->entity(); + + // If nothing is returned, emit a U+0026 AMPERSAND character token. + // Otherwise, emit the character token that was returned. + $char = (!$entity) ? '&' : $entity; + $this->emitToken($char); + + // Finally, switch to the data state. + $this->state = 'data'; + } + + private function tagOpenState() + { + switch($this->content_model) { + case self::RCDATA: + case self::CDATA: + /* If the next input character is a U+002F SOLIDUS (/) character, + consume it and switch to the close tag open state. If the next + input character is not a U+002F SOLIDUS (/) character, emit a + U+003C LESS-THAN SIGN character token and switch to the data + state to process the next input character. */ + if($this->character($this->char + 1) === '/') { + $this->char++; + $this->state = 'closeTagOpen'; + + } else { + $this->emitToken(array( + 'type' => self::CHARACTR, + 'data' => '<' + )); + + $this->state = 'data'; + } + break; + + case self::PCDATA: + // If the content model flag is set to the PCDATA state + // Consume the next input character: + $this->char++; + $char = $this->char(); + + if($char === '!') { + /* U+0021 EXCLAMATION MARK (!) + Switch to the markup declaration open state. */ + $this->state = 'markupDeclarationOpen'; + + } elseif($char === '/') { + /* U+002F SOLIDUS (/) + Switch to the close tag open state. */ + $this->state = 'closeTagOpen'; + + } elseif(preg_match('/^[A-Za-z]$/', $char)) { + /* U+0041 LATIN LETTER A through to U+005A LATIN LETTER Z + Create a new start tag token, set its tag name to the lowercase + version of the input character (add 0x0020 to the character's code + point), then switch to the tag name state. (Don't emit the token + yet; further details will be filled in before it is emitted.) */ + $this->token = array( + 'name' => strtolower($char), + 'type' => self::STARTTAG, + 'attr' => array() + ); + + $this->state = 'tagName'; + + } elseif($char === '>') { + /* U+003E GREATER-THAN SIGN (>) + Parse error. Emit a U+003C LESS-THAN SIGN character token and a + U+003E GREATER-THAN SIGN character token. Switch to the data state. */ + $this->emitToken(array( + 'type' => self::CHARACTR, + 'data' => '<>' + )); + + $this->state = 'data'; + + } elseif($char === '?') { + /* U+003F QUESTION MARK (?) + Parse error. Switch to the bogus comment state. */ + $this->state = 'bogusComment'; + + } else { + /* Anything else + Parse error. Emit a U+003C LESS-THAN SIGN character token and + reconsume the current input character in the data state. */ + $this->emitToken(array( + 'type' => self::CHARACTR, + 'data' => '<' + )); + + $this->char--; + $this->state = 'data'; + } + break; + } + } + + private function closeTagOpenState() + { + $next_node = strtolower($this->characters('A-Za-z', $this->char + 1)); + $the_same = count($this->tree->stack) > 0 && $next_node === end($this->tree->stack)->nodeName; + + if(($this->content_model === self::RCDATA || $this->content_model === self::CDATA) && + (!$the_same || ($the_same && (!preg_match('/[\t\n\x0b\x0c >\/]/', + $this->character($this->char + 1 + strlen($next_node))) || $this->EOF === $this->char)))) { + /* If the content model flag is set to the RCDATA or CDATA states then + examine the next few characters. If they do not match the tag name of + the last start tag token emitted (case insensitively), or if they do but + they are not immediately followed by one of the following characters: + * U+0009 CHARACTER TABULATION + * U+000A LINE FEED (LF) + * U+000B LINE TABULATION + * U+000C FORM FEED (FF) + * U+0020 SPACE + * U+003E GREATER-THAN SIGN (>) + * U+002F SOLIDUS (/) + * EOF + ...then there is a parse error. Emit a U+003C LESS-THAN SIGN character + token, a U+002F SOLIDUS character token, and switch to the data state + to process the next input character. */ + $this->emitToken(array( + 'type' => self::CHARACTR, + 'data' => 'state = 'data'; + + } else { + /* Otherwise, if the content model flag is set to the PCDATA state, + or if the next few characters do match that tag name, consume the + next input character: */ + $this->char++; + $char = $this->char(); + + if(preg_match('/^[A-Za-z]$/', $char)) { + /* U+0041 LATIN LETTER A through to U+005A LATIN LETTER Z + Create a new end tag token, set its tag name to the lowercase version + of the input character (add 0x0020 to the character's code point), then + switch to the tag name state. (Don't emit the token yet; further details + will be filled in before it is emitted.) */ + $this->token = array( + 'name' => strtolower($char), + 'type' => self::ENDTAG + ); + + $this->state = 'tagName'; + + } elseif($char === '>') { + /* U+003E GREATER-THAN SIGN (>) + Parse error. Switch to the data state. */ + $this->state = 'data'; + + } elseif($this->char === $this->EOF) { + /* EOF + Parse error. Emit a U+003C LESS-THAN SIGN character token and a U+002F + SOLIDUS character token. Reconsume the EOF character in the data state. */ + $this->emitToken(array( + 'type' => self::CHARACTR, + 'data' => 'char--; + $this->state = 'data'; + + } else { + /* Parse error. Switch to the bogus comment state. */ + $this->state = 'bogusComment'; + } + } + } + + private function tagNameState() + { + // Consume the next input character: + $this->char++; + $char = $this->character($this->char); + + if(preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { + /* U+0009 CHARACTER TABULATION + U+000A LINE FEED (LF) + U+000B LINE TABULATION + U+000C FORM FEED (FF) + U+0020 SPACE + Switch to the before attribute name state. */ + $this->state = 'beforeAttributeName'; + + } elseif($char === '>') { + /* U+003E GREATER-THAN SIGN (>) + Emit the current tag token. Switch to the data state. */ + $this->emitToken($this->token); + $this->state = 'data'; + + } elseif($this->char === $this->EOF) { + /* EOF + Parse error. Emit the current tag token. Reconsume the EOF + character in the data state. */ + $this->emitToken($this->token); + + $this->char--; + $this->state = 'data'; + + } elseif($char === '/') { + /* U+002F SOLIDUS (/) + Parse error unless this is a permitted slash. Switch to the before + attribute name state. */ + $this->state = 'beforeAttributeName'; + + } else { + /* Anything else + Append the current input character to the current tag token's tag name. + Stay in the tag name state. */ + $this->token['name'] .= strtolower($char); + $this->state = 'tagName'; + } + } + + private function beforeAttributeNameState() + { + // Consume the next input character: + $this->char++; + $char = $this->character($this->char); + + if(preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { + /* U+0009 CHARACTER TABULATION + U+000A LINE FEED (LF) + U+000B LINE TABULATION + U+000C FORM FEED (FF) + U+0020 SPACE + Stay in the before attribute name state. */ + $this->state = 'beforeAttributeName'; + + } elseif($char === '>') { + /* U+003E GREATER-THAN SIGN (>) + Emit the current tag token. Switch to the data state. */ + $this->emitToken($this->token); + $this->state = 'data'; + + } elseif($char === '/') { + /* U+002F SOLIDUS (/) + Parse error unless this is a permitted slash. Stay in the before + attribute name state. */ + $this->state = 'beforeAttributeName'; + + } elseif($this->char === $this->EOF) { + /* EOF + Parse error. Emit the current tag token. Reconsume the EOF + character in the data state. */ + $this->emitToken($this->token); + + $this->char--; + $this->state = 'data'; + + } else { + /* Anything else + Start a new attribute in the current tag token. Set that attribute's + name to the current input character, and its value to the empty string. + Switch to the attribute name state. */ + $this->token['attr'][] = array( + 'name' => strtolower($char), + 'value' => null + ); + + $this->state = 'attributeName'; + } + } + + private function attributeNameState() + { + // Consume the next input character: + $this->char++; + $char = $this->character($this->char); + + if(preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { + /* U+0009 CHARACTER TABULATION + U+000A LINE FEED (LF) + U+000B LINE TABULATION + U+000C FORM FEED (FF) + U+0020 SPACE + Stay in the before attribute name state. */ + $this->state = 'afterAttributeName'; + + } elseif($char === '=') { + /* U+003D EQUALS SIGN (=) + Switch to the before attribute value state. */ + $this->state = 'beforeAttributeValue'; + + } elseif($char === '>') { + /* U+003E GREATER-THAN SIGN (>) + Emit the current tag token. Switch to the data state. */ + $this->emitToken($this->token); + $this->state = 'data'; + + } elseif($char === '/' && $this->character($this->char + 1) !== '>') { + /* U+002F SOLIDUS (/) + Parse error unless this is a permitted slash. Switch to the before + attribute name state. */ + $this->state = 'beforeAttributeName'; + + } elseif($this->char === $this->EOF) { + /* EOF + Parse error. Emit the current tag token. Reconsume the EOF + character in the data state. */ + $this->emitToken($this->token); + + $this->char--; + $this->state = 'data'; + + } else { + /* Anything else + Append the current input character to the current attribute's name. + Stay in the attribute name state. */ + $last = count($this->token['attr']) - 1; + $this->token['attr'][$last]['name'] .= strtolower($char); + + $this->state = 'attributeName'; + } + } + + private function afterAttributeNameState() + { + // Consume the next input character: + $this->char++; + $char = $this->character($this->char); + + if(preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { + /* U+0009 CHARACTER TABULATION + U+000A LINE FEED (LF) + U+000B LINE TABULATION + U+000C FORM FEED (FF) + U+0020 SPACE + Stay in the after attribute name state. */ + $this->state = 'afterAttributeName'; + + } elseif($char === '=') { + /* U+003D EQUALS SIGN (=) + Switch to the before attribute value state. */ + $this->state = 'beforeAttributeValue'; + + } elseif($char === '>') { + /* U+003E GREATER-THAN SIGN (>) + Emit the current tag token. Switch to the data state. */ + $this->emitToken($this->token); + $this->state = 'data'; + + } elseif($char === '/' && $this->character($this->char + 1) !== '>') { + /* U+002F SOLIDUS (/) + Parse error unless this is a permitted slash. Switch to the + before attribute name state. */ + $this->state = 'beforeAttributeName'; + + } elseif($this->char === $this->EOF) { + /* EOF + Parse error. Emit the current tag token. Reconsume the EOF + character in the data state. */ + $this->emitToken($this->token); + + $this->char--; + $this->state = 'data'; + + } else { + /* Anything else + Start a new attribute in the current tag token. Set that attribute's + name to the current input character, and its value to the empty string. + Switch to the attribute name state. */ + $this->token['attr'][] = array( + 'name' => strtolower($char), + 'value' => null + ); + + $this->state = 'attributeName'; + } + } + + private function beforeAttributeValueState() + { + // Consume the next input character: + $this->char++; + $char = $this->character($this->char); + + if(preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { + /* U+0009 CHARACTER TABULATION + U+000A LINE FEED (LF) + U+000B LINE TABULATION + U+000C FORM FEED (FF) + U+0020 SPACE + Stay in the before attribute value state. */ + $this->state = 'beforeAttributeValue'; + + } elseif($char === '"') { + /* U+0022 QUOTATION MARK (") + Switch to the attribute value (double-quoted) state. */ + $this->state = 'attributeValueDoubleQuoted'; + + } elseif($char === '&') { + /* U+0026 AMPERSAND (&) + Switch to the attribute value (unquoted) state and reconsume + this input character. */ + $this->char--; + $this->state = 'attributeValueUnquoted'; + + } elseif($char === '\'') { + /* U+0027 APOSTROPHE (') + Switch to the attribute value (single-quoted) state. */ + $this->state = 'attributeValueSingleQuoted'; + + } elseif($char === '>') { + /* U+003E GREATER-THAN SIGN (>) + Emit the current tag token. Switch to the data state. */ + $this->emitToken($this->token); + $this->state = 'data'; + + } else { + /* Anything else + Append the current input character to the current attribute's value. + Switch to the attribute value (unquoted) state. */ + $last = count($this->token['attr']) - 1; + $this->token['attr'][$last]['value'] .= $char; + + $this->state = 'attributeValueUnquoted'; + } + } + + private function attributeValueDoubleQuotedState() + { + // Consume the next input character: + $this->char++; + $char = $this->character($this->char); + + if($char === '"') { + /* U+0022 QUOTATION MARK (") + Switch to the before attribute name state. */ + $this->state = 'beforeAttributeName'; + + } elseif($char === '&') { + /* U+0026 AMPERSAND (&) + Switch to the entity in attribute value state. */ + $this->entityInAttributeValueState('double'); + + } elseif($this->char === $this->EOF) { + /* EOF + Parse error. Emit the current tag token. Reconsume the character + in the data state. */ + $this->emitToken($this->token); + + $this->char--; + $this->state = 'data'; + + } else { + /* Anything else + Append the current input character to the current attribute's value. + Stay in the attribute value (double-quoted) state. */ + $last = count($this->token['attr']) - 1; + $this->token['attr'][$last]['value'] .= $char; + + $this->state = 'attributeValueDoubleQuoted'; + } + } + + private function attributeValueSingleQuotedState() + { + // Consume the next input character: + $this->char++; + $char = $this->character($this->char); + + if($char === '\'') { + /* U+0022 QUOTATION MARK (') + Switch to the before attribute name state. */ + $this->state = 'beforeAttributeName'; + + } elseif($char === '&') { + /* U+0026 AMPERSAND (&) + Switch to the entity in attribute value state. */ + $this->entityInAttributeValueState('single'); + + } elseif($this->char === $this->EOF) { + /* EOF + Parse error. Emit the current tag token. Reconsume the character + in the data state. */ + $this->emitToken($this->token); + + $this->char--; + $this->state = 'data'; + + } else { + /* Anything else + Append the current input character to the current attribute's value. + Stay in the attribute value (single-quoted) state. */ + $last = count($this->token['attr']) - 1; + $this->token['attr'][$last]['value'] .= $char; + + $this->state = 'attributeValueSingleQuoted'; + } + } + + private function attributeValueUnquotedState() + { + // Consume the next input character: + $this->char++; + $char = $this->character($this->char); + + if(preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { + /* U+0009 CHARACTER TABULATION + U+000A LINE FEED (LF) + U+000B LINE TABULATION + U+000C FORM FEED (FF) + U+0020 SPACE + Switch to the before attribute name state. */ + $this->state = 'beforeAttributeName'; + + } elseif($char === '&') { + /* U+0026 AMPERSAND (&) + Switch to the entity in attribute value state. */ + $this->entityInAttributeValueState('non'); + + } elseif($char === '>') { + /* U+003E GREATER-THAN SIGN (>) + Emit the current tag token. Switch to the data state. */ + $this->emitToken($this->token); + $this->state = 'data'; + + } else { + /* Anything else + Append the current input character to the current attribute's value. + Stay in the attribute value (unquoted) state. */ + $last = count($this->token['attr']) - 1; + $this->token['attr'][$last]['value'] .= $char; + + $this->state = 'attributeValueUnquoted'; + } + } + + private function entityInAttributeValueState() + { + // Attempt to consume an entity. + $entity = $this->entity(); + + // If nothing is returned, append a U+0026 AMPERSAND character to the + // current attribute's value. Otherwise, emit the character token that + // was returned. + $char = (!$entity) + ? '&' + : $entity; + + $this->emitToken($char); + } + + private function bogusCommentState() + { + /* Consume every character up to the first U+003E GREATER-THAN SIGN + character (>) or the end of the file (EOF), whichever comes first. Emit + a comment token whose data is the concatenation of all the characters + starting from and including the character that caused the state machine + to switch into the bogus comment state, up to and including the last + consumed character before the U+003E character, if any, or up to the + end of the file otherwise. (If the comment was started by the end of + the file (EOF), the token is empty.) */ + $data = $this->characters('^>', $this->char); + $this->emitToken(array( + 'data' => $data, + 'type' => self::COMMENT + )); + + $this->char += strlen($data); + + /* Switch to the data state. */ + $this->state = 'data'; + + /* If the end of the file was reached, reconsume the EOF character. */ + if($this->char === $this->EOF) { + $this->char = $this->EOF - 1; + } + } + + private function markupDeclarationOpenState() + { + /* If the next two characters are both U+002D HYPHEN-MINUS (-) + characters, consume those two characters, create a comment token whose + data is the empty string, and switch to the comment state. */ + if($this->character($this->char + 1, 2) === '--') { + $this->char += 2; + $this->state = 'comment'; + $this->token = array( + 'data' => null, + 'type' => self::COMMENT + ); + + /* Otherwise if the next seven chacacters are a case-insensitive match + for the word "DOCTYPE", then consume those characters and switch to the + DOCTYPE state. */ + } elseif(strtolower($this->character($this->char + 1, 7)) === 'doctype') { + $this->char += 7; + $this->state = 'doctype'; + + /* Otherwise, is is a parse error. Switch to the bogus comment state. + The next character that is consumed, if any, is the first character + that will be in the comment. */ + } else { + $this->char++; + $this->state = 'bogusComment'; + } + } + + private function commentState() + { + /* Consume the next input character: */ + $this->char++; + $char = $this->char(); + + /* U+002D HYPHEN-MINUS (-) */ + if($char === '-') { + /* Switch to the comment dash state */ + $this->state = 'commentDash'; + + /* EOF */ + } elseif($this->char === $this->EOF) { + /* Parse error. Emit the comment token. Reconsume the EOF character + in the data state. */ + $this->emitToken($this->token); + $this->char--; + $this->state = 'data'; + + /* Anything else */ + } else { + /* Append the input character to the comment token's data. Stay in + the comment state. */ + $this->token['data'] .= $char; + } + } + + private function commentDashState() + { + /* Consume the next input character: */ + $this->char++; + $char = $this->char(); + + /* U+002D HYPHEN-MINUS (-) */ + if($char === '-') { + /* Switch to the comment end state */ + $this->state = 'commentEnd'; + + /* EOF */ + } elseif($this->char === $this->EOF) { + /* Parse error. Emit the comment token. Reconsume the EOF character + in the data state. */ + $this->emitToken($this->token); + $this->char--; + $this->state = 'data'; + + /* Anything else */ + } else { + /* Append a U+002D HYPHEN-MINUS (-) character and the input + character to the comment token's data. Switch to the comment state. */ + $this->token['data'] .= '-'.$char; + $this->state = 'comment'; + } + } + + private function commentEndState() + { + /* Consume the next input character: */ + $this->char++; + $char = $this->char(); + + if($char === '>') { + $this->emitToken($this->token); + $this->state = 'data'; + + } elseif($char === '-') { + $this->token['data'] .= '-'; + + } elseif($this->char === $this->EOF) { + $this->emitToken($this->token); + $this->char--; + $this->state = 'data'; + + } else { + $this->token['data'] .= '--'.$char; + $this->state = 'comment'; + } + } + + private function doctypeState() + { + /* Consume the next input character: */ + $this->char++; + $char = $this->char(); + + if(preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { + $this->state = 'beforeDoctypeName'; + + } else { + $this->char--; + $this->state = 'beforeDoctypeName'; + } + } + + private function beforeDoctypeNameState() + { + /* Consume the next input character: */ + $this->char++; + $char = $this->char(); + + if(preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { + // Stay in the before DOCTYPE name state. + + } elseif(preg_match('/^[a-z]$/', $char)) { + $this->token = array( + 'name' => strtoupper($char), + 'type' => self::DOCTYPE, + 'error' => true + ); + + $this->state = 'doctypeName'; + + } elseif($char === '>') { + $this->emitToken(array( + 'name' => null, + 'type' => self::DOCTYPE, + 'error' => true + )); + + $this->state = 'data'; + + } elseif($this->char === $this->EOF) { + $this->emitToken(array( + 'name' => null, + 'type' => self::DOCTYPE, + 'error' => true + )); + + $this->char--; + $this->state = 'data'; + + } else { + $this->token = array( + 'name' => $char, + 'type' => self::DOCTYPE, + 'error' => true + ); + + $this->state = 'doctypeName'; + } + } + + private function doctypeNameState() + { + /* Consume the next input character: */ + $this->char++; + $char = $this->char(); + + if(preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { + $this->state = 'AfterDoctypeName'; + + } elseif($char === '>') { + $this->emitToken($this->token); + $this->state = 'data'; + + } elseif(preg_match('/^[a-z]$/', $char)) { + $this->token['name'] .= strtoupper($char); + + } elseif($this->char === $this->EOF) { + $this->emitToken($this->token); + $this->char--; + $this->state = 'data'; + + } else { + $this->token['name'] .= $char; + } + + $this->token['error'] = ($this->token['name'] === 'HTML') + ? false + : true; + } + + private function afterDoctypeNameState() + { + /* Consume the next input character: */ + $this->char++; + $char = $this->char(); + + if(preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { + // Stay in the DOCTYPE name state. + + } elseif($char === '>') { + $this->emitToken($this->token); + $this->state = 'data'; + + } elseif($this->char === $this->EOF) { + $this->emitToken($this->token); + $this->char--; + $this->state = 'data'; + + } else { + $this->token['error'] = true; + $this->state = 'bogusDoctype'; + } + } + + private function bogusDoctypeState() + { + /* Consume the next input character: */ + $this->char++; + $char = $this->char(); + + if($char === '>') { + $this->emitToken($this->token); + $this->state = 'data'; + + } elseif($this->char === $this->EOF) { + $this->emitToken($this->token); + $this->char--; + $this->state = 'data'; + + } else { + // Stay in the bogus DOCTYPE state. + } + } + + private function entity() + { + $start = $this->char; + + // This section defines how to consume an entity. This definition is + // used when parsing entities in text and in attributes. + + // The behaviour depends on the identity of the next character (the + // one immediately after the U+0026 AMPERSAND character): + + switch($this->character($this->char + 1)) { + // U+0023 NUMBER SIGN (#) + case '#': + + // The behaviour further depends on the character after the + // U+0023 NUMBER SIGN: + switch($this->character($this->char + 1)) { + // U+0078 LATIN SMALL LETTER X + // U+0058 LATIN CAPITAL LETTER X + case 'x': + case 'X': + // Follow the steps below, but using the range of + // characters U+0030 DIGIT ZERO through to U+0039 DIGIT + // NINE, U+0061 LATIN SMALL LETTER A through to U+0066 + // LATIN SMALL LETTER F, and U+0041 LATIN CAPITAL LETTER + // A, through to U+0046 LATIN CAPITAL LETTER F (in other + // words, 0-9, A-F, a-f). + $char = 1; + $char_class = '0-9A-Fa-f'; + break; + + // Anything else + default: + // Follow the steps below, but using the range of + // characters U+0030 DIGIT ZERO through to U+0039 DIGIT + // NINE (i.e. just 0-9). + $char = 0; + $char_class = '0-9'; + break; + } + + // Consume as many characters as match the range of characters + // given above. + $this->char++; + $e_name = $this->characters($char_class, $this->char + $char + 1); + $entity = $this->character($start, $this->char); + $cond = strlen($e_name) > 0; + + // The rest of the parsing happens bellow. + break; + + // Anything else + default: + // Consume the maximum number of characters possible, with the + // consumed characters case-sensitively matching one of the + // identifiers in the first column of the entities table. + $e_name = $this->characters('0-9A-Za-z;', $this->char + 1); + $len = strlen($e_name); + + for($c = 1; $c <= $len; $c++) { + $id = substr($e_name, 0, $c); + $this->char++; + + if(in_array($id, $this->entities)) { + $entity = $id; + break; + } + } + + $cond = isset($entity); + // The rest of the parsing happens bellow. + break; + } + + if(!$cond) { + // If no match can be made, then this is a parse error. No + // characters are consumed, and nothing is returned. + $this->char = $start; + return false; + } + + // Return a character token for the character corresponding to the + // entity name (as given by the second column of the entities table). + return html_entity_decode('&'.$entity.';', ENT_QUOTES, 'UTF-8'); + } + + private function emitToken($token) + { + $emit = $this->tree->emitToken($token); + + if(is_int($emit)) { + $this->content_model = $emit; + + } elseif($token['type'] === self::ENDTAG) { + $this->content_model = self::PCDATA; + } + } + + private function EOF() + { + $this->state = null; + $this->tree->emitToken(array( + 'type' => self::EOF + )); + } +} + +class HTML5TreeConstructer +{ + public $stack = array(); + + private $phase; + private $mode; + private $dom; + private $foster_parent = null; + private $a_formatting = array(); + + private $head_pointer = null; + private $form_pointer = null; + + private $scoping = array('button','caption','html','marquee','object','table','td','th'); + private $formatting = array('a','b','big','em','font','i','nobr','s','small','strike','strong','tt','u'); + private $special = array('address','area','base','basefont','bgsound', + 'blockquote','body','br','center','col','colgroup','dd','dir','div','dl', + 'dt','embed','fieldset','form','frame','frameset','h1','h2','h3','h4','h5', + 'h6','head','hr','iframe','image','img','input','isindex','li','link', + 'listing','menu','meta','noembed','noframes','noscript','ol','optgroup', + 'option','p','param','plaintext','pre','script','select','spacer','style', + 'tbody','textarea','tfoot','thead','title','tr','ul','wbr'); + + // The different phases. + const INIT_PHASE = 0; + const ROOT_PHASE = 1; + const MAIN_PHASE = 2; + const END_PHASE = 3; + + // The different insertion modes for the main phase. + const BEFOR_HEAD = 0; + const IN_HEAD = 1; + const AFTER_HEAD = 2; + const IN_BODY = 3; + const IN_TABLE = 4; + const IN_CAPTION = 5; + const IN_CGROUP = 6; + const IN_TBODY = 7; + const IN_ROW = 8; + const IN_CELL = 9; + const IN_SELECT = 10; + const AFTER_BODY = 11; + const IN_FRAME = 12; + const AFTR_FRAME = 13; + + // The different types of elements. + const SPECIAL = 0; + const SCOPING = 1; + const FORMATTING = 2; + const PHRASING = 3; + + const MARKER = 0; + + public function __construct() + { + $this->phase = self::INIT_PHASE; + $this->mode = self::BEFOR_HEAD; + $this->dom = new DOMDocument; + + $this->dom->encoding = 'UTF-8'; + $this->dom->preserveWhiteSpace = true; + $this->dom->substituteEntities = true; + $this->dom->strictErrorChecking = false; + } + + // Process tag tokens + public function emitToken($token) + { + switch($this->phase) { + case self::INIT_PHASE: return $this->initPhase($token); break; + case self::ROOT_PHASE: return $this->rootElementPhase($token); break; + case self::MAIN_PHASE: return $this->mainPhase($token); break; + case self::END_PHASE : return $this->trailingEndPhase($token); break; + } + } + + private function initPhase($token) + { + /* Initially, the tree construction stage must handle each token + emitted from the tokenisation stage as follows: */ + + /* A DOCTYPE token that is marked as being in error + A comment token + A start tag token + An end tag token + A character token that is not one of one of U+0009 CHARACTER TABULATION, + U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), + or U+0020 SPACE + An end-of-file token */ + if((isset($token['error']) && $token['error']) || + $token['type'] === HTML5::COMMENT || + $token['type'] === HTML5::STARTTAG || + $token['type'] === HTML5::ENDTAG || + $token['type'] === HTML5::EOF || + ($token['type'] === HTML5::CHARACTR && isset($token['data']) && + !preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data']))) { + /* This specification does not define how to handle this case. In + particular, user agents may ignore the entirety of this specification + altogether for such documents, and instead invoke special parse modes + with a greater emphasis on backwards compatibility. */ + + $this->phase = self::ROOT_PHASE; + return $this->rootElementPhase($token); + + /* A DOCTYPE token marked as being correct */ + } elseif(isset($token['error']) && !$token['error']) { + /* Append a DocumentType node to the Document node, with the name + attribute set to the name given in the DOCTYPE token (which will be + "HTML"), and the other attributes specific to DocumentType objects + set to null, empty lists, or the empty string as appropriate. */ + $doctype = new DOMDocumentType(null, null, 'HTML'); + + /* Then, switch to the root element phase of the tree construction + stage. */ + $this->phase = self::ROOT_PHASE; + + /* A character token that is one of one of U+0009 CHARACTER TABULATION, + U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), + or U+0020 SPACE */ + } elseif(isset($token['data']) && preg_match('/^[\t\n\x0b\x0c ]+$/', + $token['data'])) { + /* Append that character to the Document node. */ + $text = $this->dom->createTextNode($token['data']); + $this->dom->appendChild($text); + } + } + + private function rootElementPhase($token) + { + /* After the initial phase, as each token is emitted from the tokenisation + stage, it must be processed as described in this section. */ + + /* A DOCTYPE token */ + if($token['type'] === HTML5::DOCTYPE) { + // Parse error. Ignore the token. + + /* A comment token */ + } elseif($token['type'] === HTML5::COMMENT) { + /* Append a Comment node to the Document object with the data + attribute set to the data given in the comment token. */ + $comment = $this->dom->createComment($token['data']); + $this->dom->appendChild($comment); + + /* A character token that is one of one of U+0009 CHARACTER TABULATION, + U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), + or U+0020 SPACE */ + } elseif($token['type'] === HTML5::CHARACTR && + preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data'])) { + /* Append that character to the Document node. */ + $text = $this->dom->createTextNode($token['data']); + $this->dom->appendChild($text); + + /* A character token that is not one of U+0009 CHARACTER TABULATION, + U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED + (FF), or U+0020 SPACE + A start tag token + An end tag token + An end-of-file token */ + } elseif(($token['type'] === HTML5::CHARACTR && + !preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data'])) || + $token['type'] === HTML5::STARTTAG || + $token['type'] === HTML5::ENDTAG || + $token['type'] === HTML5::EOF) { + /* Create an HTMLElement node with the tag name html, in the HTML + namespace. Append it to the Document object. Switch to the main + phase and reprocess the current token. */ + $html = $this->dom->createElement('html'); + $this->dom->appendChild($html); + $this->stack[] = $html; + + $this->phase = self::MAIN_PHASE; + return $this->mainPhase($token); + } + } + + private function mainPhase($token) + { + /* Tokens in the main phase must be handled as follows: */ + + /* A DOCTYPE token */ + if($token['type'] === HTML5::DOCTYPE) { + // Parse error. Ignore the token. + + /* A start tag token with the tag name "html" */ + } elseif($token['type'] === HTML5::STARTTAG && $token['name'] === 'html') { + /* If this start tag token was not the first start tag token, then + it is a parse error. */ + + /* For each attribute on the token, check to see if the attribute + is already present on the top element of the stack of open elements. + If it is not, add the attribute and its corresponding value to that + element. */ + foreach($token['attr'] as $attr) { + if(!$this->stack[0]->hasAttribute($attr['name'])) { + $this->stack[0]->setAttribute($attr['name'], $attr['value']); + } + } + + /* An end-of-file token */ + } elseif($token['type'] === HTML5::EOF) { + /* Generate implied end tags. */ + $this->generateImpliedEndTags(); + + /* Anything else. */ + } else { + /* Depends on the insertion mode: */ + switch($this->mode) { + case self::BEFOR_HEAD: return $this->beforeHead($token); break; + case self::IN_HEAD: return $this->inHead($token); break; + case self::AFTER_HEAD: return $this->afterHead($token); break; + case self::IN_BODY: return $this->inBody($token); break; + case self::IN_TABLE: return $this->inTable($token); break; + case self::IN_CAPTION: return $this->inCaption($token); break; + case self::IN_CGROUP: return $this->inColumnGroup($token); break; + case self::IN_TBODY: return $this->inTableBody($token); break; + case self::IN_ROW: return $this->inRow($token); break; + case self::IN_CELL: return $this->inCell($token); break; + case self::IN_SELECT: return $this->inSelect($token); break; + case self::AFTER_BODY: return $this->afterBody($token); break; + case self::IN_FRAME: return $this->inFrameset($token); break; + case self::AFTR_FRAME: return $this->afterFrameset($token); break; + case self::END_PHASE: return $this->trailingEndPhase($token); break; + } + } + } + + private function beforeHead($token) + { + /* Handle the token as follows: */ + + /* A character token that is one of one of U+0009 CHARACTER TABULATION, + U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), + or U+0020 SPACE */ + if($token['type'] === HTML5::CHARACTR && + preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data'])) { + /* Append the character to the current node. */ + $this->insertText($token['data']); + + /* A comment token */ + } elseif($token['type'] === HTML5::COMMENT) { + /* Append a Comment node to the current node with the data attribute + set to the data given in the comment token. */ + $this->insertComment($token['data']); + + /* A start tag token with the tag name "head" */ + } elseif($token['type'] === HTML5::STARTTAG && $token['name'] === 'head') { + /* Create an element for the token, append the new element to the + current node and push it onto the stack of open elements. */ + $element = $this->insertElement($token); + + /* Set the head element pointer to this new element node. */ + $this->head_pointer = $element; + + /* Change the insertion mode to "in head". */ + $this->mode = self::IN_HEAD; + + /* A start tag token whose tag name is one of: "base", "link", "meta", + "script", "style", "title". Or an end tag with the tag name "html". + Or a character token that is not one of U+0009 CHARACTER TABULATION, + U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), + or U+0020 SPACE. Or any other start tag token */ + } elseif($token['type'] === HTML5::STARTTAG || + ($token['type'] === HTML5::ENDTAG && $token['name'] === 'html') || + ($token['type'] === HTML5::CHARACTR && !preg_match('/^[\t\n\x0b\x0c ]$/', + $token['data']))) { + /* Act as if a start tag token with the tag name "head" and no + attributes had been seen, then reprocess the current token. */ + $this->beforeHead(array( + 'name' => 'head', + 'type' => HTML5::STARTTAG, + 'attr' => array() + )); + + return $this->inHead($token); + + /* Any other end tag */ + } elseif($token['type'] === HTML5::ENDTAG) { + /* Parse error. Ignore the token. */ + } + } + + private function inHead($token) + { + /* Handle the token as follows: */ + + /* A character token that is one of one of U+0009 CHARACTER TABULATION, + U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), + or U+0020 SPACE. + + THIS DIFFERS FROM THE SPEC: If the current node is either a title, style + or script element, append the character to the current node regardless + of its content. */ + if(($token['type'] === HTML5::CHARACTR && + preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data'])) || ( + $token['type'] === HTML5::CHARACTR && in_array(end($this->stack)->nodeName, + array('title', 'style', 'script')))) { + /* Append the character to the current node. */ + $this->insertText($token['data']); + + /* A comment token */ + } elseif($token['type'] === HTML5::COMMENT) { + /* Append a Comment node to the current node with the data attribute + set to the data given in the comment token. */ + $this->insertComment($token['data']); + + } elseif($token['type'] === HTML5::ENDTAG && + in_array($token['name'], array('title', 'style', 'script'))) { + array_pop($this->stack); + return HTML5::PCDATA; + + /* A start tag with the tag name "title" */ + } elseif($token['type'] === HTML5::STARTTAG && $token['name'] === 'title') { + /* Create an element for the token and append the new element to the + node pointed to by the head element pointer, or, if that is null + (innerHTML case), to the current node. */ + if($this->head_pointer !== null) { + $element = $this->insertElement($token, false); + $this->head_pointer->appendChild($element); + + } else { + $element = $this->insertElement($token); + } + + /* Switch the tokeniser's content model flag to the RCDATA state. */ + return HTML5::RCDATA; + + /* A start tag with the tag name "style" */ + } elseif($token['type'] === HTML5::STARTTAG && $token['name'] === 'style') { + /* Create an element for the token and append the new element to the + node pointed to by the head element pointer, or, if that is null + (innerHTML case), to the current node. */ + if($this->head_pointer !== null) { + $element = $this->insertElement($token, false); + $this->head_pointer->appendChild($element); + + } else { + $this->insertElement($token); + } + + /* Switch the tokeniser's content model flag to the CDATA state. */ + return HTML5::CDATA; + + /* A start tag with the tag name "script" */ + } elseif($token['type'] === HTML5::STARTTAG && $token['name'] === 'script') { + /* Create an element for the token. */ + $element = $this->insertElement($token, false); + $this->head_pointer->appendChild($element); + + /* Switch the tokeniser's content model flag to the CDATA state. */ + return HTML5::CDATA; + + /* A start tag with the tag name "base", "link", or "meta" */ + } elseif($token['type'] === HTML5::STARTTAG && in_array($token['name'], + array('base', 'link', 'meta'))) { + /* Create an element for the token and append the new element to the + node pointed to by the head element pointer, or, if that is null + (innerHTML case), to the current node. */ + if($this->head_pointer !== null) { + $element = $this->insertElement($token, false); + $this->head_pointer->appendChild($element); + array_pop($this->stack); + + } else { + $this->insertElement($token); + } + + /* An end tag with the tag name "head" */ + } elseif($token['type'] === HTML5::ENDTAG && $token['name'] === 'head') { + /* If the current node is a head element, pop the current node off + the stack of open elements. */ + if($this->head_pointer->isSameNode(end($this->stack))) { + array_pop($this->stack); + + /* Otherwise, this is a parse error. */ + } else { + // k + } + + /* Change the insertion mode to "after head". */ + $this->mode = self::AFTER_HEAD; + + /* A start tag with the tag name "head" or an end tag except "html". */ + } elseif(($token['type'] === HTML5::STARTTAG && $token['name'] === 'head') || + ($token['type'] === HTML5::ENDTAG && $token['name'] !== 'html')) { + // Parse error. Ignore the token. + + /* Anything else */ + } else { + /* If the current node is a head element, act as if an end tag + token with the tag name "head" had been seen. */ + if($this->head_pointer->isSameNode(end($this->stack))) { + $this->inHead(array( + 'name' => 'head', + 'type' => HTML5::ENDTAG + )); + + /* Otherwise, change the insertion mode to "after head". */ + } else { + $this->mode = self::AFTER_HEAD; + } + + /* Then, reprocess the current token. */ + return $this->afterHead($token); + } + } + + private function afterHead($token) + { + /* Handle the token as follows: */ + + /* A character token that is one of one of U+0009 CHARACTER TABULATION, + U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), + or U+0020 SPACE */ + if($token['type'] === HTML5::CHARACTR && + preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data'])) { + /* Append the character to the current node. */ + $this->insertText($token['data']); + + /* A comment token */ + } elseif($token['type'] === HTML5::COMMENT) { + /* Append a Comment node to the current node with the data attribute + set to the data given in the comment token. */ + $this->insertComment($token['data']); + + /* A start tag token with the tag name "body" */ + } elseif($token['type'] === HTML5::STARTTAG && $token['name'] === 'body') { + /* Insert a body element for the token. */ + $this->insertElement($token); + + /* Change the insertion mode to "in body". */ + $this->mode = self::IN_BODY; + + /* A start tag token with the tag name "frameset" */ + } elseif($token['type'] === HTML5::STARTTAG && $token['name'] === 'frameset') { + /* Insert a frameset element for the token. */ + $this->insertElement($token); + + /* Change the insertion mode to "in frameset". */ + $this->mode = self::IN_FRAME; + + /* A start tag token whose tag name is one of: "base", "link", "meta", + "script", "style", "title" */ + } elseif($token['type'] === HTML5::STARTTAG && in_array($token['name'], + array('base', 'link', 'meta', 'script', 'style', 'title'))) { + /* Parse error. Switch the insertion mode back to "in head" and + reprocess the token. */ + $this->mode = self::IN_HEAD; + return $this->inHead($token); + + /* Anything else */ + } else { + /* Act as if a start tag token with the tag name "body" and no + attributes had been seen, and then reprocess the current token. */ + $this->afterHead(array( + 'name' => 'body', + 'type' => HTML5::STARTTAG, + 'attr' => array() + )); + + return $this->inBody($token); + } + } + + private function inBody($token) + { + /* Handle the token as follows: */ + + switch($token['type']) { + /* A character token */ + case HTML5::CHARACTR: + /* Reconstruct the active formatting elements, if any. */ + $this->reconstructActiveFormattingElements(); + + /* Append the token's character to the current node. */ + $this->insertText($token['data']); + break; + + /* A comment token */ + case HTML5::COMMENT: + /* Append a Comment node to the current node with the data + attribute set to the data given in the comment token. */ + $this->insertComment($token['data']); + break; + + case HTML5::STARTTAG: + switch($token['name']) { + /* A start tag token whose tag name is one of: "script", + "style" */ + case 'script': case 'style': + /* Process the token as if the insertion mode had been "in + head". */ + return $this->inHead($token); + break; + + /* A start tag token whose tag name is one of: "base", "link", + "meta", "title" */ + case 'base': case 'link': case 'meta': case 'title': + /* Parse error. Process the token as if the insertion mode + had been "in head". */ + return $this->inHead($token); + break; + + /* A start tag token with the tag name "body" */ + case 'body': + /* Parse error. If the second element on the stack of open + elements is not a body element, or, if the stack of open + elements has only one node on it, then ignore the token. + (innerHTML case) */ + if(count($this->stack) === 1 || $this->stack[1]->nodeName !== 'body') { + // Ignore + + /* Otherwise, for each attribute on the token, check to see + if the attribute is already present on the body element (the + second element) on the stack of open elements. If it is not, + add the attribute and its corresponding value to that + element. */ + } else { + foreach($token['attr'] as $attr) { + if(!$this->stack[1]->hasAttribute($attr['name'])) { + $this->stack[1]->setAttribute($attr['name'], $attr['value']); + } + } + } + break; + + /* A start tag whose tag name is one of: "address", + "blockquote", "center", "dir", "div", "dl", "fieldset", + "listing", "menu", "ol", "p", "ul" */ + case 'address': case 'blockquote': case 'center': case 'dir': + case 'div': case 'dl': case 'fieldset': case 'listing': + case 'menu': case 'ol': case 'p': case 'ul': + /* If the stack of open elements has a p element in scope, + then act as if an end tag with the tag name p had been + seen. */ + if($this->elementInScope('p')) { + $this->emitToken(array( + 'name' => 'p', + 'type' => HTML5::ENDTAG + )); + } + + /* Insert an HTML element for the token. */ + $this->insertElement($token); + break; + + /* A start tag whose tag name is "form" */ + case 'form': + /* If the form element pointer is not null, ignore the + token with a parse error. */ + if($this->form_pointer !== null) { + // Ignore. + + /* Otherwise: */ + } else { + /* If the stack of open elements has a p element in + scope, then act as if an end tag with the tag name p + had been seen. */ + if($this->elementInScope('p')) { + $this->emitToken(array( + 'name' => 'p', + 'type' => HTML5::ENDTAG + )); + } + + /* Insert an HTML element for the token, and set the + form element pointer to point to the element created. */ + $element = $this->insertElement($token); + $this->form_pointer = $element; + } + break; + + /* A start tag whose tag name is "li", "dd" or "dt" */ + case 'li': case 'dd': case 'dt': + /* If the stack of open elements has a p element in scope, + then act as if an end tag with the tag name p had been + seen. */ + if($this->elementInScope('p')) { + $this->emitToken(array( + 'name' => 'p', + 'type' => HTML5::ENDTAG + )); + } + + $stack_length = count($this->stack) - 1; + + for($n = $stack_length; 0 <= $n; $n--) { + /* 1. Initialise node to be the current node (the + bottommost node of the stack). */ + $stop = false; + $node = $this->stack[$n]; + $cat = $this->getElementCategory($node->tagName); + + /* 2. If node is an li, dd or dt element, then pop all + the nodes from the current node up to node, including + node, then stop this algorithm. */ + if($token['name'] === $node->tagName || ($token['name'] !== 'li' + && ($node->tagName === 'dd' || $node->tagName === 'dt'))) { + for($x = $stack_length; $x >= $n ; $x--) { + array_pop($this->stack); + } + + break; + } + + /* 3. If node is not in the formatting category, and is + not in the phrasing category, and is not an address or + div element, then stop this algorithm. */ + if($cat !== self::FORMATTING && $cat !== self::PHRASING && + $node->tagName !== 'address' && $node->tagName !== 'div') { + break; + } + } + + /* Finally, insert an HTML element with the same tag + name as the token's. */ + $this->insertElement($token); + break; + + /* A start tag token whose tag name is "plaintext" */ + case 'plaintext': + /* If the stack of open elements has a p element in scope, + then act as if an end tag with the tag name p had been + seen. */ + if($this->elementInScope('p')) { + $this->emitToken(array( + 'name' => 'p', + 'type' => HTML5::ENDTAG + )); + } + + /* Insert an HTML element for the token. */ + $this->insertElement($token); + + return HTML5::PLAINTEXT; + break; + + /* A start tag whose tag name is one of: "h1", "h2", "h3", "h4", + "h5", "h6" */ + case 'h1': case 'h2': case 'h3': case 'h4': case 'h5': case 'h6': + /* If the stack of open elements has a p element in scope, + then act as if an end tag with the tag name p had been seen. */ + if($this->elementInScope('p')) { + $this->emitToken(array( + 'name' => 'p', + 'type' => HTML5::ENDTAG + )); + } + + /* If the stack of open elements has in scope an element whose + tag name is one of "h1", "h2", "h3", "h4", "h5", or "h6", then + this is a parse error; pop elements from the stack until an + element with one of those tag names has been popped from the + stack. */ + while($this->elementInScope(array('h1', 'h2', 'h3', 'h4', 'h5', 'h6'))) { + array_pop($this->stack); + } + + /* Insert an HTML element for the token. */ + $this->insertElement($token); + break; + + /* A start tag whose tag name is "a" */ + case 'a': + /* If the list of active formatting elements contains + an element whose tag name is "a" between the end of the + list and the last marker on the list (or the start of + the list if there is no marker on the list), then this + is a parse error; act as if an end tag with the tag name + "a" had been seen, then remove that element from the list + of active formatting elements and the stack of open + elements if the end tag didn't already remove it (it + might not have if the element is not in table scope). */ + $leng = count($this->a_formatting); + + for($n = $leng - 1; $n >= 0; $n--) { + if($this->a_formatting[$n] === self::MARKER) { + break; + + } elseif($this->a_formatting[$n]->nodeName === 'a') { + $this->emitToken(array( + 'name' => 'a', + 'type' => HTML5::ENDTAG + )); + break; + } + } + + /* Reconstruct the active formatting elements, if any. */ + $this->reconstructActiveFormattingElements(); + + /* Insert an HTML element for the token. */ + $el = $this->insertElement($token); + + /* Add that element to the list of active formatting + elements. */ + $this->a_formatting[] = $el; + break; + + /* A start tag whose tag name is one of: "b", "big", "em", "font", + "i", "nobr", "s", "small", "strike", "strong", "tt", "u" */ + case 'b': case 'big': case 'em': case 'font': case 'i': + case 'nobr': case 's': case 'small': case 'strike': + case 'strong': case 'tt': case 'u': + /* Reconstruct the active formatting elements, if any. */ + $this->reconstructActiveFormattingElements(); + + /* Insert an HTML element for the token. */ + $el = $this->insertElement($token); + + /* Add that element to the list of active formatting + elements. */ + $this->a_formatting[] = $el; + break; + + /* A start tag token whose tag name is "button" */ + case 'button': + /* If the stack of open elements has a button element in scope, + then this is a parse error; act as if an end tag with the tag + name "button" had been seen, then reprocess the token. (We don't + do that. Unnecessary.) */ + if($this->elementInScope('button')) { + $this->inBody(array( + 'name' => 'button', + 'type' => HTML5::ENDTAG + )); + } + + /* Reconstruct the active formatting elements, if any. */ + $this->reconstructActiveFormattingElements(); + + /* Insert an HTML element for the token. */ + $this->insertElement($token); + + /* Insert a marker at the end of the list of active + formatting elements. */ + $this->a_formatting[] = self::MARKER; + break; + + /* A start tag token whose tag name is one of: "marquee", "object" */ + case 'marquee': case 'object': + /* Reconstruct the active formatting elements, if any. */ + $this->reconstructActiveFormattingElements(); + + /* Insert an HTML element for the token. */ + $this->insertElement($token); + + /* Insert a marker at the end of the list of active + formatting elements. */ + $this->a_formatting[] = self::MARKER; + break; + + /* A start tag token whose tag name is "xmp" */ + case 'xmp': + /* Reconstruct the active formatting elements, if any. */ + $this->reconstructActiveFormattingElements(); + + /* Insert an HTML element for the token. */ + $this->insertElement($token); + + /* Switch the content model flag to the CDATA state. */ + return HTML5::CDATA; + break; + + /* A start tag whose tag name is "table" */ + case 'table': + /* If the stack of open elements has a p element in scope, + then act as if an end tag with the tag name p had been seen. */ + if($this->elementInScope('p')) { + $this->emitToken(array( + 'name' => 'p', + 'type' => HTML5::ENDTAG + )); + } + + /* Insert an HTML element for the token. */ + $this->insertElement($token); + + /* Change the insertion mode to "in table". */ + $this->mode = self::IN_TABLE; + break; + + /* A start tag whose tag name is one of: "area", "basefont", + "bgsound", "br", "embed", "img", "param", "spacer", "wbr" */ + case 'area': case 'basefont': case 'bgsound': case 'br': + case 'embed': case 'img': case 'param': case 'spacer': + case 'wbr': + /* Reconstruct the active formatting elements, if any. */ + $this->reconstructActiveFormattingElements(); + + /* Insert an HTML element for the token. */ + $this->insertElement($token); + + /* Immediately pop the current node off the stack of open elements. */ + array_pop($this->stack); + break; + + /* A start tag whose tag name is "hr" */ + case 'hr': + /* If the stack of open elements has a p element in scope, + then act as if an end tag with the tag name p had been seen. */ + if($this->elementInScope('p')) { + $this->emitToken(array( + 'name' => 'p', + 'type' => HTML5::ENDTAG + )); + } + + /* Insert an HTML element for the token. */ + $this->insertElement($token); + + /* Immediately pop the current node off the stack of open elements. */ + array_pop($this->stack); + break; + + /* A start tag whose tag name is "image" */ + case 'image': + /* Parse error. Change the token's tag name to "img" and + reprocess it. (Don't ask.) */ + $token['name'] = 'img'; + return $this->inBody($token); + break; + + /* A start tag whose tag name is "input" */ + case 'input': + /* Reconstruct the active formatting elements, if any. */ + $this->reconstructActiveFormattingElements(); + + /* Insert an input element for the token. */ + $element = $this->insertElement($token, false); + + /* If the form element pointer is not null, then associate the + input element with the form element pointed to by the form + element pointer. */ + $this->form_pointer !== null + ? $this->form_pointer->appendChild($element) + : end($this->stack)->appendChild($element); + + /* Pop that input element off the stack of open elements. */ + array_pop($this->stack); + break; + + /* A start tag whose tag name is "isindex" */ + case 'isindex': + /* Parse error. */ + // w/e + + /* If the form element pointer is not null, + then ignore the token. */ + if($this->form_pointer === null) { + /* Act as if a start tag token with the tag name "form" had + been seen. */ + $this->inBody(array( + 'name' => 'body', + 'type' => HTML5::STARTTAG, + 'attr' => array() + )); + + /* Act as if a start tag token with the tag name "hr" had + been seen. */ + $this->inBody(array( + 'name' => 'hr', + 'type' => HTML5::STARTTAG, + 'attr' => array() + )); + + /* Act as if a start tag token with the tag name "p" had + been seen. */ + $this->inBody(array( + 'name' => 'p', + 'type' => HTML5::STARTTAG, + 'attr' => array() + )); + + /* Act as if a start tag token with the tag name "label" + had been seen. */ + $this->inBody(array( + 'name' => 'label', + 'type' => HTML5::STARTTAG, + 'attr' => array() + )); + + /* Act as if a stream of character tokens had been seen. */ + $this->insertText('This is a searchable index. '. + 'Insert your search keywords here: '); + + /* Act as if a start tag token with the tag name "input" + had been seen, with all the attributes from the "isindex" + token, except with the "name" attribute set to the value + "isindex" (ignoring any explicit "name" attribute). */ + $attr = $token['attr']; + $attr[] = array('name' => 'name', 'value' => 'isindex'); + + $this->inBody(array( + 'name' => 'input', + 'type' => HTML5::STARTTAG, + 'attr' => $attr + )); + + /* Act as if a stream of character tokens had been seen + (see below for what they should say). */ + $this->insertText('This is a searchable index. '. + 'Insert your search keywords here: '); + + /* Act as if an end tag token with the tag name "label" + had been seen. */ + $this->inBody(array( + 'name' => 'label', + 'type' => HTML5::ENDTAG + )); + + /* Act as if an end tag token with the tag name "p" had + been seen. */ + $this->inBody(array( + 'name' => 'p', + 'type' => HTML5::ENDTAG + )); + + /* Act as if a start tag token with the tag name "hr" had + been seen. */ + $this->inBody(array( + 'name' => 'hr', + 'type' => HTML5::ENDTAG + )); + + /* Act as if an end tag token with the tag name "form" had + been seen. */ + $this->inBody(array( + 'name' => 'form', + 'type' => HTML5::ENDTAG + )); + } + break; + + /* A start tag whose tag name is "textarea" */ + case 'textarea': + $this->insertElement($token); + + /* Switch the tokeniser's content model flag to the + RCDATA state. */ + return HTML5::RCDATA; + break; + + /* A start tag whose tag name is one of: "iframe", "noembed", + "noframes" */ + case 'iframe': case 'noembed': case 'noframes': + $this->insertElement($token); + + /* Switch the tokeniser's content model flag to the CDATA state. */ + return HTML5::CDATA; + break; + + /* A start tag whose tag name is "select" */ + case 'select': + /* Reconstruct the active formatting elements, if any. */ + $this->reconstructActiveFormattingElements(); + + /* Insert an HTML element for the token. */ + $this->insertElement($token); + + /* Change the insertion mode to "in select". */ + $this->mode = self::IN_SELECT; + break; + + /* A start or end tag whose tag name is one of: "caption", "col", + "colgroup", "frame", "frameset", "head", "option", "optgroup", + "tbody", "td", "tfoot", "th", "thead", "tr". */ + case 'caption': case 'col': case 'colgroup': case 'frame': + case 'frameset': case 'head': case 'option': case 'optgroup': + case 'tbody': case 'td': case 'tfoot': case 'th': case 'thead': + case 'tr': + // Parse error. Ignore the token. + break; + + /* A start or end tag whose tag name is one of: "event-source", + "section", "nav", "article", "aside", "header", "footer", + "datagrid", "command" */ + case 'event-source': case 'section': case 'nav': case 'article': + case 'aside': case 'header': case 'footer': case 'datagrid': + case 'command': + // Work in progress! + break; + + /* A start tag token not covered by the previous entries */ + default: + /* Reconstruct the active formatting elements, if any. */ + $this->reconstructActiveFormattingElements(); + + $this->insertElement($token); + break; + } + break; + + case HTML5::ENDTAG: + switch($token['name']) { + /* An end tag with the tag name "body" */ + case 'body': + /* If the second element in the stack of open elements is + not a body element, this is a parse error. Ignore the token. + (innerHTML case) */ + if(count($this->stack) < 2 || $this->stack[1]->nodeName !== 'body') { + // Ignore. + + /* If the current node is not the body element, then this + is a parse error. */ + } elseif(end($this->stack)->nodeName !== 'body') { + // Parse error. + } + + /* Change the insertion mode to "after body". */ + $this->mode = self::AFTER_BODY; + break; + + /* An end tag with the tag name "html" */ + case 'html': + /* Act as if an end tag with tag name "body" had been seen, + then, if that token wasn't ignored, reprocess the current + token. */ + $this->inBody(array( + 'name' => 'body', + 'type' => HTML5::ENDTAG + )); + + return $this->afterBody($token); + break; + + /* An end tag whose tag name is one of: "address", "blockquote", + "center", "dir", "div", "dl", "fieldset", "listing", "menu", + "ol", "pre", "ul" */ + case 'address': case 'blockquote': case 'center': case 'dir': + case 'div': case 'dl': case 'fieldset': case 'listing': + case 'menu': case 'ol': case 'pre': case 'ul': + /* If the stack of open elements has an element in scope + with the same tag name as that of the token, then generate + implied end tags. */ + if($this->elementInScope($token['name'])) { + $this->generateImpliedEndTags(); + + /* Now, if the current node is not an element with + the same tag name as that of the token, then this + is a parse error. */ + // w/e + + /* If the stack of open elements has an element in + scope with the same tag name as that of the token, + then pop elements from this stack until an element + with that tag name has been popped from the stack. */ + for($n = count($this->stack) - 1; $n >= 0; $n--) { + if($this->stack[$n]->nodeName === $token['name']) { + $n = -1; + } + + array_pop($this->stack); + } + } + break; + + /* An end tag whose tag name is "form" */ + case 'form': + /* If the stack of open elements has an element in scope + with the same tag name as that of the token, then generate + implied end tags. */ + if($this->elementInScope($token['name'])) { + $this->generateImpliedEndTags(); + + } + + if(end($this->stack)->nodeName !== $token['name']) { + /* Now, if the current node is not an element with the + same tag name as that of the token, then this is a parse + error. */ + // w/e + + } else { + /* Otherwise, if the current node is an element with + the same tag name as that of the token pop that element + from the stack. */ + array_pop($this->stack); + } + + /* In any case, set the form element pointer to null. */ + $this->form_pointer = null; + break; + + /* An end tag whose tag name is "p" */ + case 'p': + /* If the stack of open elements has a p element in scope, + then generate implied end tags, except for p elements. */ + if($this->elementInScope('p')) { + $this->generateImpliedEndTags(array('p')); + + /* If the current node is not a p element, then this is + a parse error. */ + // k + + /* If the stack of open elements has a p element in + scope, then pop elements from this stack until the stack + no longer has a p element in scope. */ + for($n = count($this->stack) - 1; $n >= 0; $n--) { + if($this->elementInScope('p')) { + array_pop($this->stack); + + } else { + break; + } + } + } + break; + + /* An end tag whose tag name is "dd", "dt", or "li" */ + case 'dd': case 'dt': case 'li': + /* If the stack of open elements has an element in scope + whose tag name matches the tag name of the token, then + generate implied end tags, except for elements with the + same tag name as the token. */ + if($this->elementInScope($token['name'])) { + $this->generateImpliedEndTags(array($token['name'])); + + /* If the current node is not an element with the same + tag name as the token, then this is a parse error. */ + // w/e + + /* If the stack of open elements has an element in scope + whose tag name matches the tag name of the token, then + pop elements from this stack until an element with that + tag name has been popped from the stack. */ + for($n = count($this->stack) - 1; $n >= 0; $n--) { + if($this->stack[$n]->nodeName === $token['name']) { + $n = -1; + } + + array_pop($this->stack); + } + } + break; + + /* An end tag whose tag name is one of: "h1", "h2", "h3", "h4", + "h5", "h6" */ + case 'h1': case 'h2': case 'h3': case 'h4': case 'h5': case 'h6': + $elements = array('h1', 'h2', 'h3', 'h4', 'h5', 'h6'); + + /* If the stack of open elements has in scope an element whose + tag name is one of "h1", "h2", "h3", "h4", "h5", or "h6", then + generate implied end tags. */ + if($this->elementInScope($elements)) { + $this->generateImpliedEndTags(); + + /* Now, if the current node is not an element with the same + tag name as that of the token, then this is a parse error. */ + // w/e + + /* If the stack of open elements has in scope an element + whose tag name is one of "h1", "h2", "h3", "h4", "h5", or + "h6", then pop elements from the stack until an element + with one of those tag names has been popped from the stack. */ + while($this->elementInScope($elements)) { + array_pop($this->stack); + } + } + break; + + /* An end tag whose tag name is one of: "a", "b", "big", "em", + "font", "i", "nobr", "s", "small", "strike", "strong", "tt", "u" */ + case 'a': case 'b': case 'big': case 'em': case 'font': + case 'i': case 'nobr': case 's': case 'small': case 'strike': + case 'strong': case 'tt': case 'u': + /* 1. Let the formatting element be the last element in + the list of active formatting elements that: + * is between the end of the list and the last scope + marker in the list, if any, or the start of the list + otherwise, and + * has the same tag name as the token. + */ + while(true) { + for($a = count($this->a_formatting) - 1; $a >= 0; $a--) { + if($this->a_formatting[$a] === self::MARKER) { + break; + + } elseif($this->a_formatting[$a]->tagName === $token['name']) { + $formatting_element = $this->a_formatting[$a]; + $in_stack = in_array($formatting_element, $this->stack, true); + $fe_af_pos = $a; + break; + } + } + + /* If there is no such node, or, if that node is + also in the stack of open elements but the element + is not in scope, then this is a parse error. Abort + these steps. The token is ignored. */ + if(!isset($formatting_element) || ($in_stack && + !$this->elementInScope($token['name']))) { + break; + + /* Otherwise, if there is such a node, but that node + is not in the stack of open elements, then this is a + parse error; remove the element from the list, and + abort these steps. */ + } elseif(isset($formatting_element) && !$in_stack) { + unset($this->a_formatting[$fe_af_pos]); + $this->a_formatting = array_merge($this->a_formatting); + break; + } + + /* 2. Let the furthest block be the topmost node in the + stack of open elements that is lower in the stack + than the formatting element, and is not an element in + the phrasing or formatting categories. There might + not be one. */ + $fe_s_pos = array_search($formatting_element, $this->stack, true); + $length = count($this->stack); + + for($s = $fe_s_pos + 1; $s < $length; $s++) { + $category = $this->getElementCategory($this->stack[$s]->nodeName); + + if($category !== self::PHRASING && $category !== self::FORMATTING) { + $furthest_block = $this->stack[$s]; + } + } + + /* 3. If there is no furthest block, then the UA must + skip the subsequent steps and instead just pop all + the nodes from the bottom of the stack of open + elements, from the current node up to the formatting + element, and remove the formatting element from the + list of active formatting elements. */ + if(!isset($furthest_block)) { + for($n = $length - 1; $n >= $fe_s_pos; $n--) { + array_pop($this->stack); + } + + unset($this->a_formatting[$fe_af_pos]); + $this->a_formatting = array_merge($this->a_formatting); + break; + } + + /* 4. Let the common ancestor be the element + immediately above the formatting element in the stack + of open elements. */ + $common_ancestor = $this->stack[$fe_s_pos - 1]; + + /* 5. If the furthest block has a parent node, then + remove the furthest block from its parent node. */ + if($furthest_block->parentNode !== null) { + $furthest_block->parentNode->removeChild($furthest_block); + } + + /* 6. Let a bookmark note the position of the + formatting element in the list of active formatting + elements relative to the elements on either side + of it in the list. */ + $bookmark = $fe_af_pos; + + /* 7. Let node and last node be the furthest block. + Follow these steps: */ + $node = $furthest_block; + $last_node = $furthest_block; + + while(true) { + for($n = array_search($node, $this->stack, true) - 1; $n >= 0; $n--) { + /* 7.1 Let node be the element immediately + prior to node in the stack of open elements. */ + $node = $this->stack[$n]; + + /* 7.2 If node is not in the list of active + formatting elements, then remove node from + the stack of open elements and then go back + to step 1. */ + if(!in_array($node, $this->a_formatting, true)) { + unset($this->stack[$n]); + $this->stack = array_merge($this->stack); + + } else { + break; + } + } + + /* 7.3 Otherwise, if node is the formatting + element, then go to the next step in the overall + algorithm. */ + if($node === $formatting_element) { + break; + + /* 7.4 Otherwise, if last node is the furthest + block, then move the aforementioned bookmark to + be immediately after the node in the list of + active formatting elements. */ + } elseif($last_node === $furthest_block) { + $bookmark = array_search($node, $this->a_formatting, true) + 1; + } + + /* 7.5 If node has any children, perform a + shallow clone of node, replace the entry for + node in the list of active formatting elements + with an entry for the clone, replace the entry + for node in the stack of open elements with an + entry for the clone, and let node be the clone. */ + if($node->hasChildNodes()) { + $clone = $node->cloneNode(); + $s_pos = array_search($node, $this->stack, true); + $a_pos = array_search($node, $this->a_formatting, true); + + $this->stack[$s_pos] = $clone; + $this->a_formatting[$a_pos] = $clone; + $node = $clone; + } + + /* 7.6 Insert last node into node, first removing + it from its previous parent node if any. */ + if($last_node->parentNode !== null) { + $last_node->parentNode->removeChild($last_node); + } + + $node->appendChild($last_node); + + /* 7.7 Let last node be node. */ + $last_node = $node; + } + + /* 8. Insert whatever last node ended up being in + the previous step into the common ancestor node, + first removing it from its previous parent node if + any. */ + if($last_node->parentNode !== null) { + $last_node->parentNode->removeChild($last_node); + } + + $common_ancestor->appendChild($last_node); + + /* 9. Perform a shallow clone of the formatting + element. */ + $clone = $formatting_element->cloneNode(); + + /* 10. Take all of the child nodes of the furthest + block and append them to the clone created in the + last step. */ + while($furthest_block->hasChildNodes()) { + $child = $furthest_block->firstChild; + $furthest_block->removeChild($child); + $clone->appendChild($child); + } + + /* 11. Append that clone to the furthest block. */ + $furthest_block->appendChild($clone); + + /* 12. Remove the formatting element from the list + of active formatting elements, and insert the clone + into the list of active formatting elements at the + position of the aforementioned bookmark. */ + $fe_af_pos = array_search($formatting_element, $this->a_formatting, true); + unset($this->a_formatting[$fe_af_pos]); + $this->a_formatting = array_merge($this->a_formatting); + + $af_part1 = array_slice($this->a_formatting, 0, $bookmark - 1); + $af_part2 = array_slice($this->a_formatting, $bookmark, count($this->a_formatting)); + $this->a_formatting = array_merge($af_part1, array($clone), $af_part2); + + /* 13. Remove the formatting element from the stack + of open elements, and insert the clone into the stack + of open elements immediately after (i.e. in a more + deeply nested position than) the position of the + furthest block in that stack. */ + $fe_s_pos = array_search($formatting_element, $this->stack, true); + $fb_s_pos = array_search($furthest_block, $this->stack, true); + unset($this->stack[$fe_s_pos]); + + $s_part1 = array_slice($this->stack, 0, $fb_s_pos); + $s_part2 = array_slice($this->stack, $fb_s_pos + 1, count($this->stack)); + $this->stack = array_merge($s_part1, array($clone), $s_part2); + + /* 14. Jump back to step 1 in this series of steps. */ + unset($formatting_element, $fe_af_pos, $fe_s_pos, $furthest_block); + } + break; + + /* An end tag token whose tag name is one of: "button", + "marquee", "object" */ + case 'button': case 'marquee': case 'object': + /* If the stack of open elements has an element in scope whose + tag name matches the tag name of the token, then generate implied + tags. */ + if($this->elementInScope($token['name'])) { + $this->generateImpliedEndTags(); + + /* Now, if the current node is not an element with the same + tag name as the token, then this is a parse error. */ + // k + + /* Now, if the stack of open elements has an element in scope + whose tag name matches the tag name of the token, then pop + elements from the stack until that element has been popped from + the stack, and clear the list of active formatting elements up + to the last marker. */ + for($n = count($this->stack) - 1; $n >= 0; $n--) { + if($this->stack[$n]->nodeName === $token['name']) { + $n = -1; + } + + array_pop($this->stack); + } + + $marker = end(array_keys($this->a_formatting, self::MARKER, true)); + + for($n = count($this->a_formatting) - 1; $n > $marker; $n--) { + array_pop($this->a_formatting); + } + } + break; + + /* Or an end tag whose tag name is one of: "area", "basefont", + "bgsound", "br", "embed", "hr", "iframe", "image", "img", + "input", "isindex", "noembed", "noframes", "param", "select", + "spacer", "table", "textarea", "wbr" */ + case 'area': case 'basefont': case 'bgsound': case 'br': + case 'embed': case 'hr': case 'iframe': case 'image': + case 'img': case 'input': case 'isindex': case 'noembed': + case 'noframes': case 'param': case 'select': case 'spacer': + case 'table': case 'textarea': case 'wbr': + // Parse error. Ignore the token. + break; + + /* An end tag token not covered by the previous entries */ + default: + for($n = count($this->stack) - 1; $n >= 0; $n--) { + /* Initialise node to be the current node (the bottommost + node of the stack). */ + $node = end($this->stack); + + /* If node has the same tag name as the end tag token, + then: */ + if($token['name'] === $node->nodeName) { + /* Generate implied end tags. */ + $this->generateImpliedEndTags(); + + /* If the tag name of the end tag token does not + match the tag name of the current node, this is a + parse error. */ + // k + + /* Pop all the nodes from the current node up to + node, including node, then stop this algorithm. */ + for($x = count($this->stack) - $n; $x >= $n; $x--) { + array_pop($this->stack); + } + + } else { + $category = $this->getElementCategory($node); + + if($category !== self::SPECIAL && $category !== self::SCOPING) { + /* Otherwise, if node is in neither the formatting + category nor the phrasing category, then this is a + parse error. Stop this algorithm. The end tag token + is ignored. */ + return false; + } + } + } + break; + } + break; + } + } + + private function inTable($token) + { + $clear = array('html', 'table'); + + /* A character token that is one of one of U+0009 CHARACTER TABULATION, + U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), + or U+0020 SPACE */ + if($token['type'] === HTML5::CHARACTR && + preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data'])) { + /* Append the character to the current node. */ + $text = $this->dom->createTextNode($token['data']); + end($this->stack)->appendChild($text); + + /* A comment token */ + } elseif($token['type'] === HTML5::COMMENT) { + /* Append a Comment node to the current node with the data + attribute set to the data given in the comment token. */ + $comment = $this->dom->createComment($token['data']); + end($this->stack)->appendChild($comment); + + /* A start tag whose tag name is "caption" */ + } elseif($token['type'] === HTML5::STARTTAG && + $token['name'] === 'caption') { + /* Clear the stack back to a table context. */ + $this->clearStackToTableContext($clear); + + /* Insert a marker at the end of the list of active + formatting elements. */ + $this->a_formatting[] = self::MARKER; + + /* Insert an HTML element for the token, then switch the + insertion mode to "in caption". */ + $this->insertElement($token); + $this->mode = self::IN_CAPTION; + + /* A start tag whose tag name is "colgroup" */ + } elseif($token['type'] === HTML5::STARTTAG && + $token['name'] === 'colgroup') { + /* Clear the stack back to a table context. */ + $this->clearStackToTableContext($clear); + + /* Insert an HTML element for the token, then switch the + insertion mode to "in column group". */ + $this->insertElement($token); + $this->mode = self::IN_CGROUP; + + /* A start tag whose tag name is "col" */ + } elseif($token['type'] === HTML5::STARTTAG && + $token['name'] === 'col') { + $this->inTable(array( + 'name' => 'colgroup', + 'type' => HTML5::STARTTAG, + 'attr' => array() + )); + + $this->inColumnGroup($token); + + /* A start tag whose tag name is one of: "tbody", "tfoot", "thead" */ + } elseif($token['type'] === HTML5::STARTTAG && in_array($token['name'], + array('tbody', 'tfoot', 'thead'))) { + /* Clear the stack back to a table context. */ + $this->clearStackToTableContext($clear); + + /* Insert an HTML element for the token, then switch the insertion + mode to "in table body". */ + $this->insertElement($token); + $this->mode = self::IN_TBODY; + + /* A start tag whose tag name is one of: "td", "th", "tr" */ + } elseif($token['type'] === HTML5::STARTTAG && + in_array($token['name'], array('td', 'th', 'tr'))) { + /* Act as if a start tag token with the tag name "tbody" had been + seen, then reprocess the current token. */ + $this->inTable(array( + 'name' => 'tbody', + 'type' => HTML5::STARTTAG, + 'attr' => array() + )); + + return $this->inTableBody($token); + + /* A start tag whose tag name is "table" */ + } elseif($token['type'] === HTML5::STARTTAG && + $token['name'] === 'table') { + /* Parse error. Act as if an end tag token with the tag name "table" + had been seen, then, if that token wasn't ignored, reprocess the + current token. */ + $this->inTable(array( + 'name' => 'table', + 'type' => HTML5::ENDTAG + )); + + return $this->mainPhase($token); + + /* An end tag whose tag name is "table" */ + } elseif($token['type'] === HTML5::ENDTAG && + $token['name'] === 'table') { + /* If the stack of open elements does not have an element in table + scope with the same tag name as the token, this is a parse error. + Ignore the token. (innerHTML case) */ + if(!$this->elementInScope($token['name'], true)) { + return false; + + /* Otherwise: */ + } else { + /* Generate implied end tags. */ + $this->generateImpliedEndTags(); + + /* Now, if the current node is not a table element, then this + is a parse error. */ + // w/e + + /* Pop elements from this stack until a table element has been + popped from the stack. */ + while(true) { + $current = end($this->stack)->nodeName; + array_pop($this->stack); + + if($current === 'table') { + break; + } + } + + /* Reset the insertion mode appropriately. */ + $this->resetInsertionMode(); + } + + /* An end tag whose tag name is one of: "body", "caption", "col", + "colgroup", "html", "tbody", "td", "tfoot", "th", "thead", "tr" */ + } elseif($token['type'] === HTML5::ENDTAG && in_array($token['name'], + array('body', 'caption', 'col', 'colgroup', 'html', 'tbody', 'td', + 'tfoot', 'th', 'thead', 'tr'))) { + // Parse error. Ignore the token. + + /* Anything else */ + } else { + /* Parse error. Process the token as if the insertion mode was "in + body", with the following exception: */ + + /* If the current node is a table, tbody, tfoot, thead, or tr + element, then, whenever a node would be inserted into the current + node, it must instead be inserted into the foster parent element. */ + if(in_array(end($this->stack)->nodeName, + array('table', 'tbody', 'tfoot', 'thead', 'tr'))) { + /* The foster parent element is the parent element of the last + table element in the stack of open elements, if there is a + table element and it has such a parent element. If there is no + table element in the stack of open elements (innerHTML case), + then the foster parent element is the first element in the + stack of open elements (the html element). Otherwise, if there + is a table element in the stack of open elements, but the last + table element in the stack of open elements has no parent, or + its parent node is not an element, then the foster parent + element is the element before the last table element in the + stack of open elements. */ + for($n = count($this->stack) - 1; $n >= 0; $n--) { + if($this->stack[$n]->nodeName === 'table') { + $table = $this->stack[$n]; + break; + } + } + + if(isset($table) && $table->parentNode !== null) { + $this->foster_parent = $table->parentNode; + + } elseif(!isset($table)) { + $this->foster_parent = $this->stack[0]; + + } elseif(isset($table) && ($table->parentNode === null || + $table->parentNode->nodeType !== XML_ELEMENT_NODE)) { + $this->foster_parent = $this->stack[$n - 1]; + } + } + + $this->inBody($token); + } + } + + private function inCaption($token) + { + /* An end tag whose tag name is "caption" */ + if($token['type'] === HTML5::ENDTAG && $token['name'] === 'caption') { + /* If the stack of open elements does not have an element in table + scope with the same tag name as the token, this is a parse error. + Ignore the token. (innerHTML case) */ + if(!$this->elementInScope($token['name'], true)) { + // Ignore + + /* Otherwise: */ + } else { + /* Generate implied end tags. */ + $this->generateImpliedEndTags(); + + /* Now, if the current node is not a caption element, then this + is a parse error. */ + // w/e + + /* Pop elements from this stack until a caption element has + been popped from the stack. */ + while(true) { + $node = end($this->stack)->nodeName; + array_pop($this->stack); + + if($node === 'caption') { + break; + } + } + + /* Clear the list of active formatting elements up to the last + marker. */ + $this->clearTheActiveFormattingElementsUpToTheLastMarker(); + + /* Switch the insertion mode to "in table". */ + $this->mode = self::IN_TABLE; + } + + /* A start tag whose tag name is one of: "caption", "col", "colgroup", + "tbody", "td", "tfoot", "th", "thead", "tr", or an end tag whose tag + name is "table" */ + } elseif(($token['type'] === HTML5::STARTTAG && in_array($token['name'], + array('caption', 'col', 'colgroup', 'tbody', 'td', 'tfoot', 'th', + 'thead', 'tr'))) || ($token['type'] === HTML5::ENDTAG && + $token['name'] === 'table')) { + /* Parse error. Act as if an end tag with the tag name "caption" + had been seen, then, if that token wasn't ignored, reprocess the + current token. */ + $this->inCaption(array( + 'name' => 'caption', + 'type' => HTML5::ENDTAG + )); + + return $this->inTable($token); + + /* An end tag whose tag name is one of: "body", "col", "colgroup", + "html", "tbody", "td", "tfoot", "th", "thead", "tr" */ + } elseif($token['type'] === HTML5::ENDTAG && in_array($token['name'], + array('body', 'col', 'colgroup', 'html', 'tbody', 'tfoot', 'th', + 'thead', 'tr'))) { + // Parse error. Ignore the token. + + /* Anything else */ + } else { + /* Process the token as if the insertion mode was "in body". */ + $this->inBody($token); + } + } + + private function inColumnGroup($token) + { + /* A character token that is one of one of U+0009 CHARACTER TABULATION, + U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), + or U+0020 SPACE */ + if($token['type'] === HTML5::CHARACTR && + preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data'])) { + /* Append the character to the current node. */ + $text = $this->dom->createTextNode($token['data']); + end($this->stack)->appendChild($text); + + /* A comment token */ + } elseif($token['type'] === HTML5::COMMENT) { + /* Append a Comment node to the current node with the data + attribute set to the data given in the comment token. */ + $comment = $this->dom->createComment($token['data']); + end($this->stack)->appendChild($comment); + + /* A start tag whose tag name is "col" */ + } elseif($token['type'] === HTML5::STARTTAG && $token['name'] === 'col') { + /* Insert a col element for the token. Immediately pop the current + node off the stack of open elements. */ + $this->insertElement($token); + array_pop($this->stack); + + /* An end tag whose tag name is "colgroup" */ + } elseif($token['type'] === HTML5::ENDTAG && + $token['name'] === 'colgroup') { + /* If the current node is the root html element, then this is a + parse error, ignore the token. (innerHTML case) */ + if(end($this->stack)->nodeName === 'html') { + // Ignore + + /* Otherwise, pop the current node (which will be a colgroup + element) from the stack of open elements. Switch the insertion + mode to "in table". */ + } else { + array_pop($this->stack); + $this->mode = self::IN_TABLE; + } + + /* An end tag whose tag name is "col" */ + } elseif($token['type'] === HTML5::ENDTAG && $token['name'] === 'col') { + /* Parse error. Ignore the token. */ + + /* Anything else */ + } else { + /* Act as if an end tag with the tag name "colgroup" had been seen, + and then, if that token wasn't ignored, reprocess the current token. */ + $this->inColumnGroup(array( + 'name' => 'colgroup', + 'type' => HTML5::ENDTAG + )); + + return $this->inTable($token); + } + } + + private function inTableBody($token) + { + $clear = array('tbody', 'tfoot', 'thead', 'html'); + + /* A start tag whose tag name is "tr" */ + if($token['type'] === HTML5::STARTTAG && $token['name'] === 'tr') { + /* Clear the stack back to a table body context. */ + $this->clearStackToTableContext($clear); + + /* Insert a tr element for the token, then switch the insertion + mode to "in row". */ + $this->insertElement($token); + $this->mode = self::IN_ROW; + + /* A start tag whose tag name is one of: "th", "td" */ + } elseif($token['type'] === HTML5::STARTTAG && + ($token['name'] === 'th' || $token['name'] === 'td')) { + /* Parse error. Act as if a start tag with the tag name "tr" had + been seen, then reprocess the current token. */ + $this->inTableBody(array( + 'name' => 'tr', + 'type' => HTML5::STARTTAG, + 'attr' => array() + )); + + return $this->inRow($token); + + /* An end tag whose tag name is one of: "tbody", "tfoot", "thead" */ + } elseif($token['type'] === HTML5::ENDTAG && + in_array($token['name'], array('tbody', 'tfoot', 'thead'))) { + /* If the stack of open elements does not have an element in table + scope with the same tag name as the token, this is a parse error. + Ignore the token. */ + if(!$this->elementInScope($token['name'], true)) { + // Ignore + + /* Otherwise: */ + } else { + /* Clear the stack back to a table body context. */ + $this->clearStackToTableContext($clear); + + /* Pop the current node from the stack of open elements. Switch + the insertion mode to "in table". */ + array_pop($this->stack); + $this->mode = self::IN_TABLE; + } + + /* A start tag whose tag name is one of: "caption", "col", "colgroup", + "tbody", "tfoot", "thead", or an end tag whose tag name is "table" */ + } elseif(($token['type'] === HTML5::STARTTAG && in_array($token['name'], + array('caption', 'col', 'colgroup', 'tbody', 'tfoor', 'thead'))) || + ($token['type'] === HTML5::STARTTAG && $token['name'] === 'table')) { + /* If the stack of open elements does not have a tbody, thead, or + tfoot element in table scope, this is a parse error. Ignore the + token. (innerHTML case) */ + if(!$this->elementInScope(array('tbody', 'thead', 'tfoot'), true)) { + // Ignore. + + /* Otherwise: */ + } else { + /* Clear the stack back to a table body context. */ + $this->clearStackToTableContext($clear); + + /* Act as if an end tag with the same tag name as the current + node ("tbody", "tfoot", or "thead") had been seen, then + reprocess the current token. */ + $this->inTableBody(array( + 'name' => end($this->stack)->nodeName, + 'type' => HTML5::ENDTAG + )); + + return $this->mainPhase($token); + } + + /* An end tag whose tag name is one of: "body", "caption", "col", + "colgroup", "html", "td", "th", "tr" */ + } elseif($token['type'] === HTML5::ENDTAG && in_array($token['name'], + array('body', 'caption', 'col', 'colgroup', 'html', 'td', 'th', 'tr'))) { + /* Parse error. Ignore the token. */ + + /* Anything else */ + } else { + /* Process the token as if the insertion mode was "in table". */ + $this->inTable($token); + } + } + + private function inRow($token) + { + $clear = array('tr', 'html'); + + /* A start tag whose tag name is one of: "th", "td" */ + if($token['type'] === HTML5::STARTTAG && + ($token['name'] === 'th' || $token['name'] === 'td')) { + /* Clear the stack back to a table row context. */ + $this->clearStackToTableContext($clear); + + /* Insert an HTML element for the token, then switch the insertion + mode to "in cell". */ + $this->insertElement($token); + $this->mode = self::IN_CELL; + + /* Insert a marker at the end of the list of active formatting + elements. */ + $this->a_formatting[] = self::MARKER; + + /* An end tag whose tag name is "tr" */ + } elseif($token['type'] === HTML5::ENDTAG && $token['name'] === 'tr') { + /* If the stack of open elements does not have an element in table + scope with the same tag name as the token, this is a parse error. + Ignore the token. (innerHTML case) */ + if(!$this->elementInScope($token['name'], true)) { + // Ignore. + + /* Otherwise: */ + } else { + /* Clear the stack back to a table row context. */ + $this->clearStackToTableContext($clear); + + /* Pop the current node (which will be a tr element) from the + stack of open elements. Switch the insertion mode to "in table + body". */ + array_pop($this->stack); + $this->mode = self::IN_TBODY; + } + + /* A start tag whose tag name is one of: "caption", "col", "colgroup", + "tbody", "tfoot", "thead", "tr" or an end tag whose tag name is "table" */ + } elseif($token['type'] === HTML5::STARTTAG && in_array($token['name'], + array('caption', 'col', 'colgroup', 'tbody', 'tfoot', 'thead', 'tr'))) { + /* Act as if an end tag with the tag name "tr" had been seen, then, + if that token wasn't ignored, reprocess the current token. */ + $this->inRow(array( + 'name' => 'tr', + 'type' => HTML5::ENDTAG + )); + + return $this->inCell($token); + + /* An end tag whose tag name is one of: "tbody", "tfoot", "thead" */ + } elseif($token['type'] === HTML5::ENDTAG && + in_array($token['name'], array('tbody', 'tfoot', 'thead'))) { + /* If the stack of open elements does not have an element in table + scope with the same tag name as the token, this is a parse error. + Ignore the token. */ + if(!$this->elementInScope($token['name'], true)) { + // Ignore. + + /* Otherwise: */ + } else { + /* Otherwise, act as if an end tag with the tag name "tr" had + been seen, then reprocess the current token. */ + $this->inRow(array( + 'name' => 'tr', + 'type' => HTML5::ENDTAG + )); + + return $this->inCell($token); + } + + /* An end tag whose tag name is one of: "body", "caption", "col", + "colgroup", "html", "td", "th" */ + } elseif($token['type'] === HTML5::ENDTAG && in_array($token['name'], + array('body', 'caption', 'col', 'colgroup', 'html', 'td', 'th', 'tr'))) { + /* Parse error. Ignore the token. */ + + /* Anything else */ + } else { + /* Process the token as if the insertion mode was "in table". */ + $this->inTable($token); + } + } + + private function inCell($token) + { + /* An end tag whose tag name is one of: "td", "th" */ + if($token['type'] === HTML5::ENDTAG && + ($token['name'] === 'td' || $token['name'] === 'th')) { + /* If the stack of open elements does not have an element in table + scope with the same tag name as that of the token, then this is a + parse error and the token must be ignored. */ + if(!$this->elementInScope($token['name'], true)) { + // Ignore. + + /* Otherwise: */ + } else { + /* Generate implied end tags, except for elements with the same + tag name as the token. */ + $this->generateImpliedEndTags(array($token['name'])); + + /* Now, if the current node is not an element with the same tag + name as the token, then this is a parse error. */ + // k + + /* Pop elements from this stack until an element with the same + tag name as the token has been popped from the stack. */ + while(true) { + $node = end($this->stack)->nodeName; + array_pop($this->stack); + + if($node === $token['name']) { + break; + } + } + + /* Clear the list of active formatting elements up to the last + marker. */ + $this->clearTheActiveFormattingElementsUpToTheLastMarker(); + + /* Switch the insertion mode to "in row". (The current node + will be a tr element at this point.) */ + $this->mode = self::IN_ROW; + } + + /* A start tag whose tag name is one of: "caption", "col", "colgroup", + "tbody", "td", "tfoot", "th", "thead", "tr" */ + } elseif($token['type'] === HTML5::STARTTAG && in_array($token['name'], + array('caption', 'col', 'colgroup', 'tbody', 'td', 'tfoot', 'th', + 'thead', 'tr'))) { + /* If the stack of open elements does not have a td or th element + in table scope, then this is a parse error; ignore the token. + (innerHTML case) */ + if(!$this->elementInScope(array('td', 'th'), true)) { + // Ignore. + + /* Otherwise, close the cell (see below) and reprocess the current + token. */ + } else { + $this->closeCell(); + return $this->inRow($token); + } + + /* A start tag whose tag name is one of: "caption", "col", "colgroup", + "tbody", "td", "tfoot", "th", "thead", "tr" */ + } elseif($token['type'] === HTML5::STARTTAG && in_array($token['name'], + array('caption', 'col', 'colgroup', 'tbody', 'td', 'tfoot', 'th', + 'thead', 'tr'))) { + /* If the stack of open elements does not have a td or th element + in table scope, then this is a parse error; ignore the token. + (innerHTML case) */ + if(!$this->elementInScope(array('td', 'th'), true)) { + // Ignore. + + /* Otherwise, close the cell (see below) and reprocess the current + token. */ + } else { + $this->closeCell(); + return $this->inRow($token); + } + + /* An end tag whose tag name is one of: "body", "caption", "col", + "colgroup", "html" */ + } elseif($token['type'] === HTML5::ENDTAG && in_array($token['name'], + array('body', 'caption', 'col', 'colgroup', 'html'))) { + /* Parse error. Ignore the token. */ + + /* An end tag whose tag name is one of: "table", "tbody", "tfoot", + "thead", "tr" */ + } elseif($token['type'] === HTML5::ENDTAG && in_array($token['name'], + array('table', 'tbody', 'tfoot', 'thead', 'tr'))) { + /* If the stack of open elements does not have an element in table + scope with the same tag name as that of the token (which can only + happen for "tbody", "tfoot" and "thead", or, in the innerHTML case), + then this is a parse error and the token must be ignored. */ + if(!$this->elementInScope($token['name'], true)) { + // Ignore. + + /* Otherwise, close the cell (see below) and reprocess the current + token. */ + } else { + $this->closeCell(); + return $this->inRow($token); + } + + /* Anything else */ + } else { + /* Process the token as if the insertion mode was "in body". */ + $this->inBody($token); + } + } + + private function inSelect($token) + { + /* Handle the token as follows: */ + + /* A character token */ + if($token['type'] === HTML5::CHARACTR) { + /* Append the token's character to the current node. */ + $this->insertText($token['data']); + + /* A comment token */ + } elseif($token['type'] === HTML5::COMMENT) { + /* Append a Comment node to the current node with the data + attribute set to the data given in the comment token. */ + $this->insertComment($token['data']); + + /* A start tag token whose tag name is "option" */ + } elseif($token['type'] === HTML5::STARTTAG && + $token['name'] === 'option') { + /* If the current node is an option element, act as if an end tag + with the tag name "option" had been seen. */ + if(end($this->stack)->nodeName === 'option') { + $this->inSelect(array( + 'name' => 'option', + 'type' => HTML5::ENDTAG + )); + } + + /* Insert an HTML element for the token. */ + $this->insertElement($token); + + /* A start tag token whose tag name is "optgroup" */ + } elseif($token['type'] === HTML5::STARTTAG && + $token['name'] === 'optgroup') { + /* If the current node is an option element, act as if an end tag + with the tag name "option" had been seen. */ + if(end($this->stack)->nodeName === 'option') { + $this->inSelect(array( + 'name' => 'option', + 'type' => HTML5::ENDTAG + )); + } + + /* If the current node is an optgroup element, act as if an end tag + with the tag name "optgroup" had been seen. */ + if(end($this->stack)->nodeName === 'optgroup') { + $this->inSelect(array( + 'name' => 'optgroup', + 'type' => HTML5::ENDTAG + )); + } + + /* Insert an HTML element for the token. */ + $this->insertElement($token); + + /* An end tag token whose tag name is "optgroup" */ + } elseif($token['type'] === HTML5::ENDTAG && + $token['name'] === 'optgroup') { + /* First, if the current node is an option element, and the node + immediately before it in the stack of open elements is an optgroup + element, then act as if an end tag with the tag name "option" had + been seen. */ + $elements_in_stack = count($this->stack); + + if($this->stack[$elements_in_stack - 1]->nodeName === 'option' && + $this->stack[$elements_in_stack - 2]->nodeName === 'optgroup') { + $this->inSelect(array( + 'name' => 'option', + 'type' => HTML5::ENDTAG + )); + } + + /* If the current node is an optgroup element, then pop that node + from the stack of open elements. Otherwise, this is a parse error, + ignore the token. */ + if($this->stack[$elements_in_stack - 1] === 'optgroup') { + array_pop($this->stack); + } + + /* An end tag token whose tag name is "option" */ + } elseif($token['type'] === HTML5::ENDTAG && + $token['name'] === 'option') { + /* If the current node is an option element, then pop that node + from the stack of open elements. Otherwise, this is a parse error, + ignore the token. */ + if(end($this->stack)->nodeName === 'option') { + array_pop($this->stack); + } + + /* An end tag whose tag name is "select" */ + } elseif($token['type'] === HTML5::ENDTAG && + $token['name'] === 'select') { + /* If the stack of open elements does not have an element in table + scope with the same tag name as the token, this is a parse error. + Ignore the token. (innerHTML case) */ + if(!$this->elementInScope($token['name'], true)) { + // w/e + + /* Otherwise: */ + } else { + /* Pop elements from the stack of open elements until a select + element has been popped from the stack. */ + while(true) { + $current = end($this->stack)->nodeName; + array_pop($this->stack); + + if($current === 'select') { + break; + } + } + + /* Reset the insertion mode appropriately. */ + $this->resetInsertionMode(); + } + + /* A start tag whose tag name is "select" */ + } elseif($token['name'] === 'select' && + $token['type'] === HTML5::STARTTAG) { + /* Parse error. Act as if the token had been an end tag with the + tag name "select" instead. */ + $this->inSelect(array( + 'name' => 'select', + 'type' => HTML5::ENDTAG + )); + + /* An end tag whose tag name is one of: "caption", "table", "tbody", + "tfoot", "thead", "tr", "td", "th" */ + } elseif(in_array($token['name'], array('caption', 'table', 'tbody', + 'tfoot', 'thead', 'tr', 'td', 'th')) && $token['type'] === HTML5::ENDTAG) { + /* Parse error. */ + // w/e + + /* If the stack of open elements has an element in table scope with + the same tag name as that of the token, then act as if an end tag + with the tag name "select" had been seen, and reprocess the token. + Otherwise, ignore the token. */ + if($this->elementInScope($token['name'], true)) { + $this->inSelect(array( + 'name' => 'select', + 'type' => HTML5::ENDTAG + )); + + $this->mainPhase($token); + } + + /* Anything else */ + } else { + /* Parse error. Ignore the token. */ + } + } + + private function afterBody($token) + { + /* Handle the token as follows: */ + + /* A character token that is one of one of U+0009 CHARACTER TABULATION, + U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), + or U+0020 SPACE */ + if($token['type'] === HTML5::CHARACTR && + preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data'])) { + /* Process the token as it would be processed if the insertion mode + was "in body". */ + $this->inBody($token); + + /* A comment token */ + } elseif($token['type'] === HTML5::COMMENT) { + /* Append a Comment node to the first element in the stack of open + elements (the html element), with the data attribute set to the + data given in the comment token. */ + $comment = $this->dom->createComment($token['data']); + $this->stack[0]->appendChild($comment); + + /* An end tag with the tag name "html" */ + } elseif($token['type'] === HTML5::ENDTAG && $token['name'] === 'html') { + /* If the parser was originally created in order to handle the + setting of an element's innerHTML attribute, this is a parse error; + ignore the token. (The element will be an html element in this + case.) (innerHTML case) */ + + /* Otherwise, switch to the trailing end phase. */ + $this->phase = self::END_PHASE; + + /* Anything else */ + } else { + /* Parse error. Set the insertion mode to "in body" and reprocess + the token. */ + $this->mode = self::IN_BODY; + return $this->inBody($token); + } + } + + private function inFrameset($token) + { + /* Handle the token as follows: */ + + /* A character token that is one of one of U+0009 CHARACTER TABULATION, + U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), + U+000D CARRIAGE RETURN (CR), or U+0020 SPACE */ + if($token['type'] === HTML5::CHARACTR && + preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data'])) { + /* Append the character to the current node. */ + $this->insertText($token['data']); + + /* A comment token */ + } elseif($token['type'] === HTML5::COMMENT) { + /* Append a Comment node to the current node with the data + attribute set to the data given in the comment token. */ + $this->insertComment($token['data']); + + /* A start tag with the tag name "frameset" */ + } elseif($token['name'] === 'frameset' && + $token['type'] === HTML5::STARTTAG) { + $this->insertElement($token); + + /* An end tag with the tag name "frameset" */ + } elseif($token['name'] === 'frameset' && + $token['type'] === HTML5::ENDTAG) { + /* If the current node is the root html element, then this is a + parse error; ignore the token. (innerHTML case) */ + if(end($this->stack)->nodeName === 'html') { + // Ignore + + } else { + /* Otherwise, pop the current node from the stack of open + elements. */ + array_pop($this->stack); + + /* If the parser was not originally created in order to handle + the setting of an element's innerHTML attribute (innerHTML case), + and the current node is no longer a frameset element, then change + the insertion mode to "after frameset". */ + $this->mode = self::AFTR_FRAME; + } + + /* A start tag with the tag name "frame" */ + } elseif($token['name'] === 'frame' && + $token['type'] === HTML5::STARTTAG) { + /* Insert an HTML element for the token. */ + $this->insertElement($token); + + /* Immediately pop the current node off the stack of open elements. */ + array_pop($this->stack); + + /* A start tag with the tag name "noframes" */ + } elseif($token['name'] === 'noframes' && + $token['type'] === HTML5::STARTTAG) { + /* Process the token as if the insertion mode had been "in body". */ + $this->inBody($token); + + /* Anything else */ + } else { + /* Parse error. Ignore the token. */ + } + } + + private function afterFrameset($token) + { + /* Handle the token as follows: */ + + /* A character token that is one of one of U+0009 CHARACTER TABULATION, + U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), + U+000D CARRIAGE RETURN (CR), or U+0020 SPACE */ + if($token['type'] === HTML5::CHARACTR && + preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data'])) { + /* Append the character to the current node. */ + $this->insertText($token['data']); + + /* A comment token */ + } elseif($token['type'] === HTML5::COMMENT) { + /* Append a Comment node to the current node with the data + attribute set to the data given in the comment token. */ + $this->insertComment($token['data']); + + /* An end tag with the tag name "html" */ + } elseif($token['name'] === 'html' && + $token['type'] === HTML5::ENDTAG) { + /* Switch to the trailing end phase. */ + $this->phase = self::END_PHASE; + + /* A start tag with the tag name "noframes" */ + } elseif($token['name'] === 'noframes' && + $token['type'] === HTML5::STARTTAG) { + /* Process the token as if the insertion mode had been "in body". */ + $this->inBody($token); + + /* Anything else */ + } else { + /* Parse error. Ignore the token. */ + } + } + + private function trailingEndPhase($token) + { + /* After the main phase, as each token is emitted from the tokenisation + stage, it must be processed as described in this section. */ + + /* A DOCTYPE token */ + if($token['type'] === HTML5::DOCTYPE) { + // Parse error. Ignore the token. + + /* A comment token */ + } elseif($token['type'] === HTML5::COMMENT) { + /* Append a Comment node to the Document object with the data + attribute set to the data given in the comment token. */ + $comment = $this->dom->createComment($token['data']); + $this->dom->appendChild($comment); + + /* A character token that is one of one of U+0009 CHARACTER TABULATION, + U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), + or U+0020 SPACE */ + } elseif($token['type'] === HTML5::CHARACTR && + preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data'])) { + /* Process the token as it would be processed in the main phase. */ + $this->mainPhase($token); + + /* A character token that is not one of U+0009 CHARACTER TABULATION, + U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), + or U+0020 SPACE. Or a start tag token. Or an end tag token. */ + } elseif(($token['type'] === HTML5::CHARACTR && + preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data'])) || + $token['type'] === HTML5::STARTTAG || $token['type'] === HTML5::ENDTAG) { + /* Parse error. Switch back to the main phase and reprocess the + token. */ + $this->phase = self::MAIN_PHASE; + return $this->mainPhase($token); + + /* An end-of-file token */ + } elseif($token['type'] === HTML5::EOF) { + /* OMG DONE!! */ + } + } + + private function insertElement($token, $append = true) + { + $el = $this->dom->createElement($token['name']); + + foreach($token['attr'] as $attr) { + if(!$el->hasAttribute($attr['name'])) { + $el->setAttribute($attr['name'], $attr['value']); + } + } + + $this->appendToRealParent($el); + $this->stack[] = $el; + + return $el; + } + + private function insertText($data) + { + $text = $this->dom->createTextNode($data); + $this->appendToRealParent($text); + } + + private function insertComment($data) + { + $comment = $this->dom->createComment($data); + $this->appendToRealParent($comment); + } + + private function appendToRealParent($node) + { + if($this->foster_parent === null) { + end($this->stack)->appendChild($node); + + } elseif($this->foster_parent !== null) { + /* If the foster parent element is the parent element of the + last table element in the stack of open elements, then the new + node must be inserted immediately before the last table element + in the stack of open elements in the foster parent element; + otherwise, the new node must be appended to the foster parent + element. */ + for($n = count($this->stack) - 1; $n >= 0; $n--) { + if($this->stack[$n]->nodeName === 'table' && + $this->stack[$n]->parentNode !== null) { + $table = $this->stack[$n]; + break; + } + } + + if(isset($table) && $this->foster_parent->isSameNode($table->parentNode)) + $this->foster_parent->insertBefore($node, $table); + else + $this->foster_parent->appendChild($node); + + $this->foster_parent = null; + } + } + + private function elementInScope($el, $table = false) + { + if(is_array($el)) { + foreach($el as $element) { + if($this->elementInScope($element, $table)) { + return true; + } + } + + return false; + } + + $leng = count($this->stack); + + for($n = 0; $n < $leng; $n++) { + /* 1. Initialise node to be the current node (the bottommost node of + the stack). */ + $node = $this->stack[$leng - 1 - $n]; + + if($node->tagName === $el) { + /* 2. If node is the target node, terminate in a match state. */ + return true; + + } elseif($node->tagName === 'table') { + /* 3. Otherwise, if node is a table element, terminate in a failure + state. */ + return false; + + } elseif($table === true && in_array($node->tagName, array('caption', 'td', + 'th', 'button', 'marquee', 'object'))) { + /* 4. Otherwise, if the algorithm is the "has an element in scope" + variant (rather than the "has an element in table scope" variant), + and node is one of the following, terminate in a failure state. */ + return false; + + } elseif($node === $node->ownerDocument->documentElement) { + /* 5. Otherwise, if node is an html element (root element), terminate + in a failure state. (This can only happen if the node is the topmost + node of the stack of open elements, and prevents the next step from + being invoked if there are no more elements in the stack.) */ + return false; + } + + /* Otherwise, set node to the previous entry in the stack of open + elements and return to step 2. (This will never fail, since the loop + will always terminate in the previous step if the top of the stack + is reached.) */ + } + } + + private function reconstructActiveFormattingElements() + { + /* 1. If there are no entries in the list of active formatting elements, + then there is nothing to reconstruct; stop this algorithm. */ + $formatting_elements = count($this->a_formatting); + + if($formatting_elements === 0) { + return false; + } + + /* 3. Let entry be the last (most recently added) element in the list + of active formatting elements. */ + $entry = end($this->a_formatting); + + /* 2. If the last (most recently added) entry in the list of active + formatting elements is a marker, or if it is an element that is in the + stack of open elements, then there is nothing to reconstruct; stop this + algorithm. */ + if($entry === self::MARKER || in_array($entry, $this->stack, true)) { + return false; + } + + for($a = $formatting_elements - 1; $a >= 0; true) { + /* 4. If there are no entries before entry in the list of active + formatting elements, then jump to step 8. */ + if($a === 0) { + $step_seven = false; + break; + } + + /* 5. Let entry be the entry one earlier than entry in the list of + active formatting elements. */ + $a--; + $entry = $this->a_formatting[$a]; + + /* 6. If entry is neither a marker nor an element that is also in + thetack of open elements, go to step 4. */ + if($entry === self::MARKER || in_array($entry, $this->stack, true)) { + break; + } + } + + while(true) { + /* 7. Let entry be the element one later than entry in the list of + active formatting elements. */ + if(isset($step_seven) && $step_seven === true) { + $a++; + $entry = $this->a_formatting[$a]; + } + + /* 8. Perform a shallow clone of the element entry to obtain clone. */ + $clone = $entry->cloneNode(); + + /* 9. Append clone to the current node and push it onto the stack + of open elements so that it is the new current node. */ + end($this->stack)->appendChild($clone); + $this->stack[] = $clone; + + /* 10. Replace the entry for entry in the list with an entry for + clone. */ + $this->a_formatting[$a] = $clone; + + /* 11. If the entry for clone in the list of active formatting + elements is not the last entry in the list, return to step 7. */ + if(end($this->a_formatting) !== $clone) { + $step_seven = true; + } else { + break; + } + } + } + + private function clearTheActiveFormattingElementsUpToTheLastMarker() + { + /* When the steps below require the UA to clear the list of active + formatting elements up to the last marker, the UA must perform the + following steps: */ + + while(true) { + /* 1. Let entry be the last (most recently added) entry in the list + of active formatting elements. */ + $entry = end($this->a_formatting); + + /* 2. Remove entry from the list of active formatting elements. */ + array_pop($this->a_formatting); + + /* 3. If entry was a marker, then stop the algorithm at this point. + The list has been cleared up to the last marker. */ + if($entry === self::MARKER) { + break; + } + } + } + + private function generateImpliedEndTags(array $exclude = array()) + { + /* When the steps below require the UA to generate implied end tags, + then, if the current node is a dd element, a dt element, an li element, + a p element, a td element, a th element, or a tr element, the UA must + act as if an end tag with the respective tag name had been seen and + then generate implied end tags again. */ + $node = end($this->stack); + $elements = array_diff(array('dd', 'dt', 'li', 'p', 'td', 'th', 'tr'), $exclude); + + while(in_array(end($this->stack)->nodeName, $elements)) { + array_pop($this->stack); + } + } + + private function getElementCategory($name) + { + if(in_array($name, $this->special)) + return self::SPECIAL; + + elseif(in_array($name, $this->scoping)) + return self::SCOPING; + + elseif(in_array($name, $this->formatting)) + return self::FORMATTING; + + else + return self::PHRASING; + } + + private function clearStackToTableContext($elements) + { + /* When the steps above require the UA to clear the stack back to a + table context, it means that the UA must, while the current node is not + a table element or an html element, pop elements from the stack of open + elements. If this causes any elements to be popped from the stack, then + this is a parse error. */ + while(true) { + $node = end($this->stack)->nodeName; + + if(in_array($node, $elements)) { + break; + } else { + array_pop($this->stack); + } + } + } + + private function resetInsertionMode() + { + /* 1. Let last be false. */ + $last = false; + $leng = count($this->stack); + + for($n = $leng - 1; $n >= 0; $n--) { + /* 2. Let node be the last node in the stack of open elements. */ + $node = $this->stack[$n]; + + /* 3. If node is the first node in the stack of open elements, then + set last to true. If the element whose innerHTML attribute is being + set is neither a td element nor a th element, then set node to the + element whose innerHTML attribute is being set. (innerHTML case) */ + if($this->stack[0]->isSameNode($node)) { + $last = true; + } + + /* 4. If node is a select element, then switch the insertion mode to + "in select" and abort these steps. (innerHTML case) */ + if($node->nodeName === 'select') { + $this->mode = self::IN_SELECT; + break; + + /* 5. If node is a td or th element, then switch the insertion mode + to "in cell" and abort these steps. */ + } elseif($node->nodeName === 'td' || $node->nodeName === 'th') { + $this->mode = self::IN_CELL; + break; + + /* 6. If node is a tr element, then switch the insertion mode to + "in row" and abort these steps. */ + } elseif($node->nodeName === 'tr') { + $this->mode = self::IN_ROW; + break; + + /* 7. If node is a tbody, thead, or tfoot element, then switch the + insertion mode to "in table body" and abort these steps. */ + } elseif(in_array($node->nodeName, array('tbody', 'thead', 'tfoot'))) { + $this->mode = self::IN_TBODY; + break; + + /* 8. If node is a caption element, then switch the insertion mode + to "in caption" and abort these steps. */ + } elseif($node->nodeName === 'caption') { + $this->mode = self::IN_CAPTION; + break; + + /* 9. If node is a colgroup element, then switch the insertion mode + to "in column group" and abort these steps. (innerHTML case) */ + } elseif($node->nodeName === 'colgroup') { + $this->mode = self::IN_CGROUP; + break; + + /* 10. If node is a table element, then switch the insertion mode + to "in table" and abort these steps. */ + } elseif($node->nodeName === 'table') { + $this->mode = self::IN_TABLE; + break; + + /* 11. If node is a head element, then switch the insertion mode + to "in body" ("in body"! not "in head"!) and abort these steps. + (innerHTML case) */ + } elseif($node->nodeName === 'head') { + $this->mode = self::IN_BODY; + break; + + /* 12. If node is a body element, then switch the insertion mode to + "in body" and abort these steps. */ + } elseif($node->nodeName === 'body') { + $this->mode = self::IN_BODY; + break; + + /* 13. If node is a frameset element, then switch the insertion + mode to "in frameset" and abort these steps. (innerHTML case) */ + } elseif($node->nodeName === 'frameset') { + $this->mode = self::IN_FRAME; + break; + + /* 14. If node is an html element, then: if the head element + pointer is null, switch the insertion mode to "before head", + otherwise, switch the insertion mode to "after head". In either + case, abort these steps. (innerHTML case) */ + } elseif($node->nodeName === 'html') { + $this->mode = ($this->head_pointer === null) + ? self::BEFOR_HEAD + : self::AFTER_HEAD; + + break; + + /* 15. If last is true, then set the insertion mode to "in body" + and abort these steps. (innerHTML case) */ + } elseif($last) { + $this->mode = self::IN_BODY; + break; + } + } + } + + private function closeCell() + { + /* If the stack of open elements has a td or th element in table scope, + then act as if an end tag token with that tag name had been seen. */ + foreach(array('td', 'th') as $cell) { + if($this->elementInScope($cell, true)) { + $this->inCell(array( + 'name' => $cell, + 'type' => HTML5::ENDTAG + )); + + break; + } + } + } + + public function save() + { + return $this->dom; + } +} diff --git a/vendor/ezyang/htmlpurifier/maintenance/add-vimline.php b/vendor/ezyang/htmlpurifier/maintenance/add-vimline.php new file mode 100644 index 0000000000..d6a8eb202a --- /dev/null +++ b/vendor/ezyang/htmlpurifier/maintenance/add-vimline.php @@ -0,0 +1,130 @@ +#!/usr/bin/php +globr('.', '*'); +foreach ($files as $file) { + if ( + !is_file($file) || + prefix_is('./docs/doxygen', $file) || + prefix_is('./library/standalone', $file) || + prefix_is('./docs/specimens', $file) || + postfix_is('.ser', $file) || + postfix_is('.tgz', $file) || + postfix_is('.patch', $file) || + postfix_is('.dtd', $file) || + postfix_is('.ent', $file) || + postfix_is('.png', $file) || + postfix_is('.ico', $file) || + // wontfix + postfix_is('.vtest', $file) || + postfix_is('.svg', $file) || + postfix_is('.phpt', $file) || + postfix_is('VERSION', $file) || + postfix_is('WHATSNEW', $file) || + postfix_is('configdoc/usage.xml', $file) || + postfix_is('library/HTMLPurifier.includes.php', $file) || + postfix_is('library/HTMLPurifier.safe-includes.php', $file) || + postfix_is('smoketests/xssAttacks.xml', $file) || + // phpt files + postfix_is('.diff', $file) || + postfix_is('.exp', $file) || + postfix_is('.log', $file) || + postfix_is('.out', $file) || + + $file == './library/HTMLPurifier/Lexer/PH5P.php' || + $file == './maintenance/PH5P.php' + ) continue; + $ext = strrchr($file, '.'); + if ( + postfix_is('README', $file) || + postfix_is('LICENSE', $file) || + postfix_is('CREDITS', $file) || + postfix_is('INSTALL', $file) || + postfix_is('NEWS', $file) || + postfix_is('TODO', $file) || + postfix_is('WYSIWYG', $file) || + postfix_is('Changelog', $file) + ) $ext = '.txt'; + if (postfix_is('Doxyfile', $file)) $ext = 'Doxyfile'; + if (postfix_is('.php.in', $file)) $ext = '.php'; + $no_nl = false; + switch ($ext) { + case '.php': + case '.inc': + case '.js': + $line = '// %s'; + break; + case '.html': + case '.xsl': + case '.xml': + case '.htc': + $line = ""; + break; + case '.htmlt': + $no_nl = true; + $line = '--# %s'; + break; + case '.ini': + $line = '; %s'; + break; + case '.css': + $line = '/* %s */'; + break; + case '.bat': + $line = 'rem %s'; + break; + case '.txt': + case '.utf8': + if ( + prefix_is('./library/HTMLPurifier/ConfigSchema', $file) || + prefix_is('./smoketests/test-schema', $file) || + prefix_is('./tests/HTMLPurifier/StringHashParser', $file) + ) { + $no_nl = true; + $line = '--# %s'; + } else { + $line = ' %s'; + } + break; + case 'Doxyfile': + $line = '# %s'; + break; + default: + throw new Exception('Unknown file: ' . $file); + } + + echo "$file\n"; + $contents = file_get_contents($file); + + $regex = '~' . str_replace('%s', 'vim: .+', preg_quote($line, '~')) . '~m'; + $contents = preg_replace($regex, '', $contents); + + $contents = rtrim($contents); + + if (strpos($contents, "\r\n") !== false) $nl = "\r\n"; + elseif (strpos($contents, "\n") !== false) $nl = "\n"; + elseif (strpos($contents, "\r") !== false) $nl = "\r"; + else $nl = PHP_EOL; + + if (!$no_nl) $contents .= $nl; + $contents .= $nl . str_replace('%s', $vimline, $line) . $nl; + + file_put_contents($file, $contents); + +} + +// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/maintenance/common.php b/vendor/ezyang/htmlpurifier/maintenance/common.php new file mode 100644 index 0000000000..342bc205ab --- /dev/null +++ b/vendor/ezyang/htmlpurifier/maintenance/common.php @@ -0,0 +1,25 @@ +docs/doxygen/info.log 2>docs/doxygen/errors.log +if [ "$?" != 0 ]; then + cat docs/doxygen/errors.log + exit +fi +cd docs +tar czf doxygen.tgz doxygen diff --git a/vendor/ezyang/htmlpurifier/maintenance/config-scanner.php b/vendor/ezyang/htmlpurifier/maintenance/config-scanner.php new file mode 100644 index 0000000000..c614d1fbc2 --- /dev/null +++ b/vendor/ezyang/htmlpurifier/maintenance/config-scanner.php @@ -0,0 +1,155 @@ +#!/usr/bin/php +globr('.', '*.php'); +$files = array(); +foreach ($raw_files as $file) { + $file = substr($file, 2); // rm leading './' + if (strncmp('standalone/', $file, 11) === 0) continue; // rm generated files + if (substr_count($file, '.') > 1) continue; // rm meta files + $files[] = $file; +} + +/** + * Moves the $i cursor to the next non-whitespace token + */ +function consumeWhitespace($tokens, &$i) +{ + do {$i++;} while (is_array($tokens[$i]) && $tokens[$i][0] === T_WHITESPACE); +} + +/** + * Tests whether or not a token is a particular type. There are three run-cases: + * - ($token, $expect_token): tests if the token is $expect_token type; + * - ($token, $expect_value): tests if the token is the string $expect_value; + * - ($token, $expect_token, $expect_value): tests if token is $expect_token type, and + * its string representation is $expect_value + */ +function testToken($token, $value_or_token, $value = null) +{ + if (is_null($value)) { + if (is_int($value_or_token)) return is_array($token) && $token[0] === $value_or_token; + else return $token === $value_or_token; + } else { + return is_array($token) && $token[0] === $value_or_token && $token[1] === $value; + } +} + +$counter = 0; +$full_counter = 0; +$tracker = array(); + +foreach ($files as $file) { + $tokens = token_get_all(file_get_contents($file)); + $file = str_replace('\\', '/', $file); + for ($i = 0, $c = count($tokens); $i < $c; $i++) { + $ok = false; + // Match $config + if (!$ok && testToken($tokens[$i], T_VARIABLE, '$config')) $ok = true; + // Match $this->config + while (!$ok && testToken($tokens[$i], T_VARIABLE, '$this')) { + consumeWhitespace($tokens, $i); + if (!testToken($tokens[$i], T_OBJECT_OPERATOR)) break; + consumeWhitespace($tokens, $i); + if (testToken($tokens[$i], T_STRING, 'config')) $ok = true; + break; + } + if (!$ok) continue; + + $ok = false; + for($i++; $i < $c; $i++) { + if ($tokens[$i] === ',' || $tokens[$i] === ')' || $tokens[$i] === ';') { + break; + } + if (is_string($tokens[$i])) continue; + if ($tokens[$i][0] === T_OBJECT_OPERATOR) { + $ok = true; + break; + } + } + if (!$ok) continue; + + $line = $tokens[$i][2]; + + consumeWhitespace($tokens, $i); + if (!testToken($tokens[$i], T_STRING, 'get')) continue; + + consumeWhitespace($tokens, $i); + if (!testToken($tokens[$i], '(')) continue; + + $full_counter++; + + $matched = false; + do { + + // What we currently don't match are batch retrievals, and + // wildcard retrievals. This data might be useful in the future, + // which is why we have a do {} while loop that doesn't actually + // do anything. + + consumeWhitespace($tokens, $i); + if (!testToken($tokens[$i], T_CONSTANT_ENCAPSED_STRING)) continue; + $id = substr($tokens[$i][1], 1, -1); + + $counter++; + $matched = true; + + if (!isset($tracker[$id])) $tracker[$id] = array(); + if (!isset($tracker[$id][$file])) $tracker[$id][$file] = array(); + $tracker[$id][$file][] = $line; + + } while (0); + + //echo "$file:$line uses $namespace.$directive\n"; + } +} + +echo "\n$counter/$full_counter instances of \$config or \$this->config found in source code.\n"; + +echo "Generating XML... "; + +$xw = new XMLWriter(); +$xw->openURI('../configdoc/usage.xml'); +$xw->setIndent(true); +$xw->startDocument('1.0', 'UTF-8'); +$xw->startElement('usage'); +foreach ($tracker as $id => $files) { + $xw->startElement('directive'); + $xw->writeAttribute('id', $id); + foreach ($files as $file => $lines) { + $xw->startElement('file'); + $xw->writeAttribute('name', $file); + foreach ($lines as $line) { + $xw->writeElement('line', $line); + } + $xw->endElement(); + } + $xw->endElement(); +} +$xw->endElement(); +$xw->flush(); + +echo "done!\n"; + +// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/maintenance/flush-definition-cache.php b/vendor/ezyang/htmlpurifier/maintenance/flush-definition-cache.php new file mode 100755 index 0000000000..138badb659 --- /dev/null +++ b/vendor/ezyang/htmlpurifier/maintenance/flush-definition-cache.php @@ -0,0 +1,42 @@ +#!/usr/bin/php +flush($config); +} + +echo "Cache flushed successfully.\n"; + +// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/maintenance/flush.php b/vendor/ezyang/htmlpurifier/maintenance/flush.php new file mode 100644 index 0000000000..c0853d230b --- /dev/null +++ b/vendor/ezyang/htmlpurifier/maintenance/flush.php @@ -0,0 +1,30 @@ +#!/usr/bin/php +/'; + +foreach ( $entity_files as $file ) { + $contents = file_get_contents($entity_dir . $file); + $matches = array(); + preg_match_all($regexp, $contents, $matches, PREG_SET_ORDER); + foreach ($matches as $match) { + $entity_table[$match[1]] = unichr($match[2]); + } +} + +$output = serialize($entity_table); + +$fh = fopen($output_file, 'w'); +fwrite($fh, $output); +fclose($fh); + +echo "Completed successfully."; + +// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/maintenance/generate-includes.php b/vendor/ezyang/htmlpurifier/maintenance/generate-includes.php new file mode 100644 index 0000000000..01e1c2abab --- /dev/null +++ b/vendor/ezyang/htmlpurifier/maintenance/generate-includes.php @@ -0,0 +1,192 @@ +#!/usr/bin/php +globr('.', '*.php'); +if (!$raw_files) throw new Exception('Did not find any PHP source files'); +$files = array(); +foreach ($raw_files as $file) { + $file = substr($file, 2); // rm leading './' + if (strncmp('standalone/', $file, 11) === 0) continue; // rm generated files + if (substr_count($file, '.') > 1) continue; // rm meta files + $ok = true; + foreach ($exclude_dirs as $dir) { + if (strncmp($dir, $file, strlen($dir)) === 0) { + $ok = false; + break; + } + } + if (!$ok) continue; // rm excluded directories + if (in_array($file, $exclude_files)) continue; // rm excluded files + $files[] = $file; +} +echo "done!\n"; + +// Reorder list so that dependencies are included first: + +/** + * Returns a lookup array of dependencies for a file. + * + * @note This function expects that format $name extends $parent on one line + * + * @param string $file + * File to check dependencies of. + * @return array + * Lookup array of files the file is dependent on, sorted accordingly. + */ +function get_dependency_lookup($file) +{ + static $cache = array(); + if (isset($cache[$file])) return $cache[$file]; + if (!file_exists($file)) { + echo "File doesn't exist: $file\n"; + return array(); + } + $fh = fopen($file, 'r'); + $deps = array(); + while (!feof($fh)) { + $line = fgets($fh); + if (strncmp('class', $line, 5) === 0) { + // The implementation here is fragile and will break if we attempt + // to use interfaces. Beware! + $arr = explode(' extends ', trim($line, ' {'."\n\r"), 2); + if (count($arr) < 2) break; + $parent = $arr[1]; + $dep_file = HTMLPurifier_Bootstrap::getPath($parent); + if (!$dep_file) break; + $deps[$dep_file] = true; + break; + } + } + fclose($fh); + foreach (array_keys($deps) as $file) { + // Extra dependencies must come *before* base dependencies + $deps = get_dependency_lookup($file) + $deps; + } + $cache[$file] = $deps; + return $deps; +} + +/** + * Sorts files based on dependencies. This function is lazy and will not + * group files with dependencies together; it will merely ensure that a file + * is never included before its dependencies are. + * + * @param $files + * Files array to sort. + * @return + * Sorted array ($files is not modified by reference!) + */ +function dep_sort($files) +{ + $ret = array(); + $cache = array(); + foreach ($files as $file) { + if (isset($cache[$file])) continue; + $deps = get_dependency_lookup($file); + foreach (array_keys($deps) as $dep) { + if (!isset($cache[$dep])) { + $ret[] = $dep; + $cache[$dep] = true; + } + } + $cache[$file] = true; + $ret[] = $file; + } + return $ret; +} + +$files = dep_sort($files); + +// Build the actual include stub: + +$version = trim(file_get_contents('../VERSION')); + +// stub +$php = " PH5P.patch"); +unlink($newt); + +// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/maintenance/generate-schema-cache.php b/vendor/ezyang/htmlpurifier/maintenance/generate-schema-cache.php new file mode 100644 index 0000000000..339ff12dae --- /dev/null +++ b/vendor/ezyang/htmlpurifier/maintenance/generate-schema-cache.php @@ -0,0 +1,45 @@ +#!/usr/bin/php +buildDir($interchange); + +$loader = dirname(__FILE__) . '/../config-schema.php'; +if (file_exists($loader)) include $loader; +foreach ($_SERVER['argv'] as $i => $dir) { + if ($i === 0) continue; + $builder->buildDir($interchange, realpath($dir)); +} + +$interchange->validate(); + +$schema_builder = new HTMLPurifier_ConfigSchema_Builder_ConfigSchema(); +$schema = $schema_builder->build($interchange); + +echo "Saving schema... "; +file_put_contents($target, serialize($schema)); +echo "done!\n"; + +// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/maintenance/generate-standalone.php b/vendor/ezyang/htmlpurifier/maintenance/generate-standalone.php new file mode 100755 index 0000000000..254d4d83bc --- /dev/null +++ b/vendor/ezyang/htmlpurifier/maintenance/generate-standalone.php @@ -0,0 +1,159 @@ +#!/usr/bin/php +copyr($dir, 'standalone/' . $dir); +} + +/** + * Copies the contents of a file to the standalone directory + * @param string $file File to copy + */ +function make_file_standalone($file) +{ + global $FS; + $FS->mkdirr('standalone/' . dirname($file)); + copy_and_remove_includes($file, 'standalone/' . $file); + return true; +} + +/** + * Copies a file to another location recursively, if it is a PHP file + * remove includes + * @param string $file Original file + * @param string $sfile New location of file + */ +function copy_and_remove_includes($file, $sfile) +{ + $contents = file_get_contents($file); + if (strrchr($file, '.') === '.php') $contents = replace_includes($contents); + return file_put_contents($sfile, $contents); +} + +/** + * @param $matches preg_replace_callback matches array, where index 1 + * is the filename to include + */ +function replace_includes_callback($matches) +{ + $file = $matches[1]; + $preserve = array( + // PEAR (external) + 'XML/HTMLSax3.php' => 1 + ); + if (isset($preserve[$file])) { + return $matches[0]; + } + if (isset($GLOBALS['loaded'][$file])) return ''; + $GLOBALS['loaded'][$file] = true; + return replace_includes(remove_php_tags(file_get_contents($file))); +} + +echo 'Generating includes file... '; +shell_exec('php generate-includes.php'); +echo "done!\n"; + +chdir(dirname(__FILE__) . '/../library/'); + +echo 'Creating full file...'; +$contents = replace_includes(file_get_contents('HTMLPurifier.includes.php')); +$contents = str_replace( + // Note that bootstrap is now inside the standalone file + "define('HTMLPURIFIER_PREFIX', realpath(dirname(__FILE__) . '/..'));", + "define('HTMLPURIFIER_PREFIX', dirname(__FILE__) . '/standalone'); + set_include_path(HTMLPURIFIER_PREFIX . PATH_SEPARATOR . get_include_path());", + $contents +); +file_put_contents('HTMLPurifier.standalone.php', $contents); +echo ' done!' . PHP_EOL; + +echo 'Creating standalone directory...'; +$FS->rmdirr('standalone'); // ensure a clean copy + +// data files +$FS->mkdirr('standalone/HTMLPurifier/DefinitionCache/Serializer'); +make_file_standalone('HTMLPurifier/EntityLookup/entities.ser'); +make_file_standalone('HTMLPurifier/ConfigSchema/schema.ser'); + +// non-standard inclusion setup +make_dir_standalone('HTMLPurifier/ConfigSchema'); +make_dir_standalone('HTMLPurifier/Language'); +make_dir_standalone('HTMLPurifier/Filter'); +make_dir_standalone('HTMLPurifier/Printer'); +make_file_standalone('HTMLPurifier/Printer.php'); +make_file_standalone('HTMLPurifier/Lexer/PH5P.php'); + +echo ' done!' . PHP_EOL; + +// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/maintenance/merge-library.php b/vendor/ezyang/htmlpurifier/maintenance/merge-library.php new file mode 100755 index 0000000000..de2eecdc08 --- /dev/null +++ b/vendor/ezyang/htmlpurifier/maintenance/merge-library.php @@ -0,0 +1,11 @@ +#!/usr/bin/php +open('w'); + $multiline = false; + foreach ($hash as $key => $value) { + $multiline = $multiline || (strpos($value, "\n") !== false); + if ($multiline) { + $file->put("--$key--" . PHP_EOL); + $file->put(str_replace("\n", PHP_EOL, $value) . PHP_EOL); + } else { + if ($key == 'ID') { + $file->put("$value" . PHP_EOL); + } else { + $file->put("$key: $value" . PHP_EOL); + } + } + } + $file->close(); +} + +$schema = HTMLPurifier_ConfigSchema::instance(); +$adapter = new HTMLPurifier_ConfigSchema_StringHashReverseAdapter($schema); + +foreach ($schema->info as $ns => $ns_array) { + saveHash($adapter->get($ns)); + foreach ($ns_array as $dir => $x) { + saveHash($adapter->get($ns, $dir)); + } +} + +// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/maintenance/old-remove-require-once.php b/vendor/ezyang/htmlpurifier/maintenance/old-remove-require-once.php new file mode 100644 index 0000000000..f47c7d0f1a --- /dev/null +++ b/vendor/ezyang/htmlpurifier/maintenance/old-remove-require-once.php @@ -0,0 +1,32 @@ +#!/usr/bin/php +globr('.', '*.php'); +foreach ($files as $file) { + if (substr_count(basename($file), '.') > 1) continue; + $old_code = file_get_contents($file); + $new_code = preg_replace("#^require_once .+[\n\r]*#m", '', $old_code); + if ($old_code !== $new_code) { + file_put_contents($file, $new_code); + } +} + +// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/maintenance/old-remove-schema-def.php b/vendor/ezyang/htmlpurifier/maintenance/old-remove-schema-def.php new file mode 100644 index 0000000000..5ae0319736 --- /dev/null +++ b/vendor/ezyang/htmlpurifier/maintenance/old-remove-schema-def.php @@ -0,0 +1,32 @@ +#!/usr/bin/php +globr('.', '*.php'); +foreach ($files as $file) { + if (substr_count(basename($file), '.') > 1) continue; + $old_code = file_get_contents($file); + $new_code = preg_replace("#^HTMLPurifier_ConfigSchema::.+?\);[\n\r]*#ms", '', $old_code); + if ($old_code !== $new_code) { + file_put_contents($file, $new_code); + } + if (preg_match('#^\s+HTMLPurifier_ConfigSchema::#m', $new_code)) { + echo "Indented ConfigSchema call in $file\n"; + } +} + +// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/maintenance/regenerate-docs.sh b/vendor/ezyang/htmlpurifier/maintenance/regenerate-docs.sh new file mode 100755 index 0000000000..6f4d720ff3 --- /dev/null +++ b/vendor/ezyang/htmlpurifier/maintenance/regenerate-docs.sh @@ -0,0 +1,5 @@ +#!/bin/bash -e +./compile-doxygen.sh +cd ../docs +scp doxygen.tgz htmlpurifier.org:/home/ezyang/htmlpurifier.org +ssh htmlpurifier.org "cd /home/ezyang/htmlpurifier.org && ./reload-docs.sh" diff --git a/vendor/ezyang/htmlpurifier/maintenance/remove-trailing-whitespace.php b/vendor/ezyang/htmlpurifier/maintenance/remove-trailing-whitespace.php new file mode 100644 index 0000000000..857870546a --- /dev/null +++ b/vendor/ezyang/htmlpurifier/maintenance/remove-trailing-whitespace.php @@ -0,0 +1,37 @@ +#!/usr/bin/php +globr('.', '{,.}*', GLOB_BRACE); +foreach ($files as $file) { + if ( + !is_file($file) || + prefix_is('./.git', $file) || + prefix_is('./docs/doxygen', $file) || + postfix_is('.ser', $file) || + postfix_is('.tgz', $file) || + postfix_is('.patch', $file) || + postfix_is('.dtd', $file) || + postfix_is('.ent', $file) || + $file == './library/HTMLPurifier/Lexer/PH5P.php' || + $file == './maintenance/PH5P.php' + ) continue; + $contents = file_get_contents($file); + $result = preg_replace('/^(.*?)[ \t]+(\r?)$/m', '\1\2', $contents, -1, $count); + if (!$count) continue; + echo "$file\n"; + file_put_contents($file, $result); +} + +// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/maintenance/rename-config.php b/vendor/ezyang/htmlpurifier/maintenance/rename-config.php new file mode 100644 index 0000000000..6e59e2a791 --- /dev/null +++ b/vendor/ezyang/htmlpurifier/maintenance/rename-config.php @@ -0,0 +1,84 @@ +#!/usr/bin/php +buildFile($interchange, $file); +$contents = file_get_contents($file); + +if (strpos($contents, "\r\n") !== false) { + $nl = "\r\n"; +} elseif (strpos($contents, "\r") !== false) { + $nl = "\r"; +} else { + $nl = "\n"; +} + +// replace name with new name +$contents = str_replace($old, $new, $contents); + +if ($interchange->directives[$old]->aliases) { + $pos_alias = strpos($contents, 'ALIASES:'); + $pos_ins = strpos($contents, $nl, $pos_alias); + if ($pos_ins === false) $pos_ins = strlen($contents); + $contents = + substr($contents, 0, $pos_ins) . ", $old" . substr($contents, $pos_ins); + file_put_contents($file, $contents); +} else { + $lines = explode($nl, $contents); + $insert = false; + foreach ($lines as $n => $line) { + if (strncmp($line, '--', 2) === 0) { + $insert = $n; + break; + } + } + if (!$insert) { + $lines[] = "ALIASES: $old"; + } else { + array_splice($lines, $insert, 0, "ALIASES: $old"); + } + file_put_contents($file, implode($nl, $lines)); +} + +rename("$old.txt", "$new.txt") || exit(1); diff --git a/vendor/ezyang/htmlpurifier/maintenance/update-config.php b/vendor/ezyang/htmlpurifier/maintenance/update-config.php new file mode 100644 index 0000000000..2d8a7a9c10 --- /dev/null +++ b/vendor/ezyang/htmlpurifier/maintenance/update-config.php @@ -0,0 +1,34 @@ +#!/usr/bin/php +set and $config->get to the new + * format, as described by docs/dev-config-bcbreaks.txt + */ + +$FS = new FSTools(); +chdir(dirname(__FILE__) . '/..'); +$raw_files = $FS->globr('.', '*.php'); +foreach ($raw_files as $file) { + $file = substr($file, 2); // rm leading './' + if (strpos($file, 'library/standalone/') === 0) continue; + if (strpos($file, 'maintenance/update-config.php') === 0) continue; + if (strpos($file, 'test-settings.php') === 0) continue; + if (substr_count($file, '.') > 1) continue; // rm meta files + // process the file + $contents = file_get_contents($file); + $contents = preg_replace( + "#config->(set|get)\('(.+?)', '(.+?)'#", + "config->\\1('\\2.\\3'", + $contents + ); + if ($contents === '') continue; + file_put_contents($file, $contents); +} + +// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/package.php b/vendor/ezyang/htmlpurifier/package.php new file mode 100644 index 0000000000..bfef93622d --- /dev/null +++ b/vendor/ezyang/htmlpurifier/package.php @@ -0,0 +1,61 @@ +setOptions( + array( + 'baseinstalldir' => '/', + 'packagefile' => 'package.xml', + 'packagedirectory' => realpath(dirname(__FILE__) . '/library'), + 'filelistgenerator' => 'file', + 'include' => array('*'), + 'dir_roles' => array('/' => 'php'), // hack to put *.ser files in the right place + 'ignore' => array( + 'HTMLPurifier.standalone.php', + 'HTMLPurifier.path.php', + '*.tar.gz', + '*.tgz', + 'standalone/' + ), + ) +); + +$pkg->setPackage('HTMLPurifier'); +$pkg->setLicense('LGPL', 'http://www.gnu.org/licenses/lgpl.html'); +$pkg->setSummary('Standards-compliant HTML filter'); +$pkg->setDescription( + 'HTML Purifier is an HTML filter that will remove all malicious code + (better known as XSS) with a thoroughly audited, secure yet permissive + whitelist and will also make sure your documents are standards + compliant.' +); + +$pkg->addMaintainer('lead', 'ezyang', 'Edward Z. Yang', 'admin@htmlpurifier.org', 'yes'); + +$version = trim(file_get_contents('VERSION')); +$api_version = substr($version, 0, strrpos($version, '.')); + +$pkg->setChannel('htmlpurifier.org'); +$pkg->setAPIVersion($api_version); +$pkg->setAPIStability('stable'); +$pkg->setReleaseVersion($version); +$pkg->setReleaseStability('stable'); + +$pkg->addRelease(); + +$pkg->setNotes(file_get_contents('WHATSNEW')); +$pkg->setPackageType('php'); + +$pkg->setPhpDep('5.0.0'); +$pkg->setPearinstallerDep('1.4.3'); + +$pkg->generateContents(); + +$pkg->writePackageFile(); + +// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/phpdoc.ini b/vendor/ezyang/htmlpurifier/phpdoc.ini new file mode 100644 index 0000000000..c4c3723538 --- /dev/null +++ b/vendor/ezyang/htmlpurifier/phpdoc.ini @@ -0,0 +1,102 @@ +;; phpDocumentor parse configuration file +;; +;; This file is designed to cut down on repetitive typing on the command-line or web interface +;; You can copy this file to create a number of configuration files that can be used with the +;; command-line switch -c, as in phpdoc -c default.ini or phpdoc -c myini.ini. The web +;; interface will automatically generate a list of .ini files that can be used. +;; +;; default.ini is used to generate the online manual at http://www.phpdoc.org/docs +;; +;; ALL .ini files must be in the user subdirectory of phpDocumentor with an extension of .ini +;; +;; Copyright 2002, Greg Beaver +;; +;; WARNING: do not change the name of any command-line parameters, phpDocumentor will ignore them + +[Parse Data] +;; title of all the documentation +;; legal values: any string +title = HTML Purifier API Documentation + +;; parse files that start with a . like .bash_profile +;; legal values: true, false +hidden = false + +;; show elements marked @access private in documentation by setting this to on +;; legal values: on, off +parseprivate = off + +;; parse with javadoc-like description (first sentence is always the short description) +;; legal values: on, off +javadocdesc = on + +;; add any custom @tags separated by commas here +;; legal values: any legal tagname separated by commas. +;customtags = mytag1,mytag2 + +;; This is only used by the XML:DocBook/peardoc2 converter +defaultcategoryname = Documentation + +;; what is the main package? +;; legal values: alphanumeric string plus - and _ +defaultpackagename = HTMLPurifier + +;; output any parsing information? set to on for cron jobs +;; legal values: on +;quiet = on + +;; parse a PEAR-style repository. Do not turn this on if your project does +;; not have a parent directory named "pear" +;; legal values: on/off +;pear = on + +;; where should the documentation be written? +;; legal values: a legal path +target = docs/phpdoc + +;; Which files should be parsed out as special documentation files, such as README, +;; INSTALL and CHANGELOG? This overrides the default files found in +;; phpDocumentor.ini (this file is not a user .ini file, but the global file) +readmeinstallchangelog = README, INSTALL, NEWS, WYSIWYG, SLOW, LICENSE, CREDITS + +;; limit output to the specified packages, even if others are parsed +;; legal values: package names separated by commas +;packageoutput = package1,package2 + +;; comma-separated list of files to parse +;; legal values: paths separated by commas +;filename = /path/to/file1,/path/to/file2,fileincurrentdirectory + +;; comma-separated list of directories to parse +;; legal values: directory paths separated by commas +;directory = /path1,/path2,.,..,subdirectory +;directory = /home/jeichorn/cvs/pear +directory = . + +;; template base directory (the equivalent directory of /phpDocumentor) +;templatebase = /path/to/my/templates + +;; directory to find any example files in through @example and {@example} tags +;examplesdir = /path/to/my/templates + +;; comma-separated list of files, directories or wildcards ? and * (any wildcard) to ignore +;; legal values: any wildcard strings separated by commas +;ignore = /path/to/ignore*,*list.php,myfile.php,subdirectory/ +ignore = *tests*,*benchmarks*,*docs*,*test-settings.php,*configdoc*,*maintenance*,*smoketests*,*standalone*,*.svn*,*conf* + +sourcecode = on + +;; comma-separated list of Converters to use in outputformat:Convertername:templatedirectory format +;; legal values: HTML:frames:default,HTML:frames:l0l33t,HTML:frames:phpdoc.de,HTML:frames:phphtmllib, +;; HTML:frames:earthli, +;; HTML:frames:DOM/default,HTML:frames:DOM/l0l33t,HTML:frames:DOM/phpdoc.de, +;; HTML:frames:DOM/phphtmllib,HTML:frames:DOM/earthli +;; HTML:Smarty:default,HTML:Smarty:PHP,HTML:Smarty:HandS +;; PDF:default:default,CHM:default:default,XML:DocBook/peardoc2:default +output=HTML:frames:default + +;; turn this option on if you want highlighted source code for every file +;; legal values: on/off +sourcecode = on + +; vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/plugins/modx.txt b/vendor/ezyang/htmlpurifier/plugins/modx.txt new file mode 100644 index 0000000000..0763821b50 --- /dev/null +++ b/vendor/ezyang/htmlpurifier/plugins/modx.txt @@ -0,0 +1,112 @@ + +MODx Plugin + +MODx is an open source PHP application framework. +I first came across them in my referrer logs when tillda asked if anyone +could implement an HTML Purifier plugin. This forum thread + eventually resulted +in the fruition of this plugin that davidm says, "is on top of my favorite +list." HTML Purifier goes great with WYSIWYG editors! + + + +1. Credits + +PaulGregory wrote the overall structure of the code. I added the +slashes hack. + + + +2. Install + +First, you need to place HTML Purifier library somewhere. The code here +assumes that you've placed in MODx's assets/plugins/htmlpurifier (no version +number). + +Log into the manager, and navigate: + +Resources > Manage Resources > Plugins tab > New Plugin + +Type in a name (probably HTML Purifier), and copy paste this code into the +textarea: + +-------------------------------------------------------------------------------- +$e = &$modx->Event; +if ($e->name == 'OnBeforeDocFormSave') { + global $content; + + include_once '../assets/plugins/htmlpurifier/library/HTMLPurifier.auto.php'; + $purifier = new HTMLPurifier(); + + static $magic_quotes = null; + if ($magic_quotes === null) { + // this is an ugly hack because this hook hasn't + // had the backslashes removed yet when magic_quotes_gpc is on, + // but HTMLPurifier must not have the quotes slashed. + $magic_quotes = get_magic_quotes_gpc(); + } + + if ($magic_quotes) $content = stripslashes($content); + $content = $purifier->purify($content); + if ($magic_quotes) $content = addslashes($content); +} +-------------------------------------------------------------------------------- + +Then navigate to the System Events tab and check "OnBeforeDocFormSave". +Save the plugin. HTML Purifier now is integrated! + + + +3. Making sure it works + +You can test HTML Purifier by deliberately putting in crappy HTML and seeing +whether or not it gets fixed. A better way is to put in something like this: + +

            Il est bon

            + +...and seeing whether or not the content comes out as: + +

            Il est bon

            + +(lang to xml:lang synchronization is one of the many features HTML Purifier +has). + + + +4. Caveat Emptor + +This code does not intercept save requests from the QuickEdit plugin, this may +be added in a later version. It also modifies things on save, so there's a +slight chance that HTML Purifier may make a boo-boo and accidently mess things +up (the original version is not saved). + +Finally, make sure that MODx is using UTF-8. If you are using, say, a French +localisation, you may be using Latin-1, if that's the case, configure +HTML Purifier properly like this: + +$config = HTMLPurifier_Config::createDefault(); +$config->set('Core', 'Encoding', 'ISO-8859-1'); // or whatever encoding +$purifier = new HTMLPurifier($config); + + + +5. Known Bugs + +'rn' characters sometimes mysteriously appear after purification. We are +currently investigating this issue. See: + + + +6. See Also + +A modified version of Jot 1.1.3 is available, which integrates with HTML +Purifier. You can check it out here: + + +X. Changelog + +2008-06-16 +- Updated code to work with 3.1.0 and later +- Add Known Bugs and See Also section + + vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/plugins/phorum/Changelog b/vendor/ezyang/htmlpurifier/plugins/phorum/Changelog new file mode 100644 index 0000000000..9f939e54ae --- /dev/null +++ b/vendor/ezyang/htmlpurifier/plugins/phorum/Changelog @@ -0,0 +1,27 @@ +Changelog HTMLPurifier : Phorum Mod +||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| + += KEY ==================== + # Breaks back-compat + ! Feature + - Bugfix + + Sub-comment + . Internal change +========================== + +Version 4.0.0 for Phorum 5.2, released July 9, 2009 +# Works only with HTML Purifier 4.0.0 +! Better installation documentation +- Fixed double encoded quotes +- Fixed fatal error when migrate.php is blank + +Version 3.0.0 for Phorum 5.2, released January 12, 2008 +# WYSIWYG and suppress_message options are now configurable via web + interface. +- Module now compatible with Phorum 5.2, primary bugs were in migration + code as well as signature and edit message handling. This module is NOT + compatible with Phorum 5.1. +- Buggy WYSIWYG mode refined +. AutoFormatParam added to list of default configuration namespaces + + vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/plugins/phorum/INSTALL b/vendor/ezyang/htmlpurifier/plugins/phorum/INSTALL new file mode 100644 index 0000000000..23c76fc5c6 --- /dev/null +++ b/vendor/ezyang/htmlpurifier/plugins/phorum/INSTALL @@ -0,0 +1,84 @@ + +Install + How to install the Phorum HTML Purifier plugin + +0. PREREQUISITES +---------------- +This Phorum module only works on PHP5 and with HTML Purifier 4.0.0 +or later. + +1. UNZIP +-------- +Unzip phorum-htmlpurifier-x.y.z, producing an htmlpurifier folder. +You've already done this step if you're reading this! + +2. MOVE +------- +Move the htmlpurifier folder to the mods/ folder of your Phorum +installation, so the directory structure looks like: + +phorum/ + mods/ + htmlpurifier/ + INSTALL - this install file + info.txt, ... - the module files + htmlpurifier/ + +3. INSTALL HTML PURIFIER +------------------------ +Download and unzip HTML Purifier . Place the contents of +the library/ folder in the htmlpurifier/htmlpurifier folder. Your directory +structure will look like: + +phorum/ + mods/ + htmlpurifier/ + htmlpurifier/ + HTMLPurifier.auto.php + ... - other files + HTMLPurifier/ + +Advanced users: + If you have HTML Purifier installed elsewhere on your server, + all you need is an HTMLPurifier.auto.php file in the library folder which + includes the HTMLPurifier.auto.php file in your install. + +4. MIGRATE +---------- +If you're setting up a new Phorum installation, all you need to do is create +a blank migrate.php file in the htmlpurifier module folder (NOT the library +folder. + +If you have an old Phorum installation and was using BBCode, +copy migrate.bbcode.php to migrate.php. If you were using a different input +format, follow the instructions in migrate.bbcode.php to create your own custom +migrate.php file. + +Your directory structure should now look like this: + +phorum/ + mods/ + htmlpurifier/ + migrate.php + +5. ENABLE +--------- +Navigate to your Phorum admin panel at http://example.com/phorum/admin.php, +click on Global Settings > Modules, scroll to "HTML Purifier Phorum Mod" and +turn it On. + +6. MIGRATE SIGNATURES +--------------------- +If you're setting up a new Phorum installation, skip this step. + +If you allowed your users to make signatures, navigate to the module settings +page of HTML Purifier (Global Settings > Modules > HTML Purifier Phorum Mod > +Configure), type in "yes" in the "Confirm" box, and press "Migrate." + +ONLY DO THIS ONCE! BE SURE TO BACK UP YOUR DATABASE! + +7. CONFIGURE +------------ +Configure using Edit settings. See that page for more information. + + vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/plugins/phorum/README b/vendor/ezyang/htmlpurifier/plugins/phorum/README new file mode 100644 index 0000000000..0524ed39db --- /dev/null +++ b/vendor/ezyang/htmlpurifier/plugins/phorum/README @@ -0,0 +1,45 @@ + +HTML Purifier Phorum Mod - Filter your HTML the Standards-Compliant Way! + +This Phorum mod enables HTML posting on Phorum. Under normal circumstances, +this would cause a huge security risk, but because we are running +HTML through HTML Purifier, output is guaranteed to be XSS free and +standards-compliant. + +This mod requires HTML input, and previous markup languages need to be +converted accordingly. Thus, it is vital that you create a 'migrate.php' +file that works with your installation. If you're using the built-in +BBCode formatting, simply move migrate.bbcode.php to that place; for +other markup languages, consult said file for instructions on how +to adapt it to your needs. + + -- NOTE ------------------------------------------------- + You can also run this module in parallel with another + formatting module; this module attempts to place itself + at the end of the filtering chain. However, if any + previous modules produce insecure HTML (for instance, + a JavaScript email obfuscator) they will get cleaned. + +This module will not work if 'migrate.php' is not created, and an improperly +made migration file may *CORRUPT* Phorum, so please take your time to +do this correctly. It should go without saying to *BACKUP YOUR DATABASE* +before attempting anything here. If no migration is necessary, you can +simply create a blank migrate.php file. HTML Purifier is smart and will +not re-migrate already processed messages. However, the original code +is irretrievably lost (we may change this in the future.) + +This module will not automatically migrate user signatures, because this +process may take a long time. After installing the HTML Purifier module and +then configuring 'migrate.php', navigate to Settings and click 'Migrate +Signatures' to migrate all user signatures to HTML. + +All of HTML Purifier's usual functions are configurable via the mod settings +page. If you require custom configuration, create config.php file in +the mod directory that edits a $config variable. Be sure, also, to +set $PHORUM['mod_htmlpurifier']['wysiwyg'] to TRUE if you are using a +WYSIWYG editor (you can do this through a common hook or the web +configuration form). + +Visit HTML Purifier at . + + vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/plugins/phorum/config.default.php b/vendor/ezyang/htmlpurifier/plugins/phorum/config.default.php new file mode 100644 index 0000000000..e047c0b423 --- /dev/null +++ b/vendor/ezyang/htmlpurifier/plugins/phorum/config.default.php @@ -0,0 +1,57 @@ +set('HTML.Allowed', + // alphabetically sorted +'a[href|title] +abbr[title] +acronym[title] +b +blockquote[cite] +br +caption +cite +code +dd +del +dfn +div +dl +dt +em +i +img[src|alt|title|class] +ins +kbd +li +ol +p +pre +s +strike +strong +sub +sup +table +tbody +td +tfoot +th +thead +tr +tt +u +ul +var'); +$config->set('AutoFormat.AutoParagraph', true); +$config->set('AutoFormat.Linkify', true); +$config->set('HTML.Doctype', 'XHTML 1.0 Transitional'); +$config->set('Core.AggressivelyFixLt', true); +$config->set('Core.Encoding', $GLOBALS['PHORUM']['DATA']['CHARSET']); // we'll change this eventually +if (strtolower($GLOBALS['PHORUM']['DATA']['CHARSET']) !== 'utf-8') { + $config->set('Core.EscapeNonASCIICharacters', true); +} + +// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/plugins/phorum/htmlpurifier.php b/vendor/ezyang/htmlpurifier/plugins/phorum/htmlpurifier.php new file mode 100644 index 0000000000..f66d8c36cd --- /dev/null +++ b/vendor/ezyang/htmlpurifier/plugins/phorum/htmlpurifier.php @@ -0,0 +1,316 @@ + $message){ + if(isset($message['body'])) { + + if ($message_id) { + // we're dealing with a real message, not a fake, so + // there a number of shortcuts that can be taken + + if (isset($message['meta']['htmlpurifier_light'])) { + // format hook was called outside of Phorum's normal + // functions, do the abridged purification + $data[$message_id]['body'] = $purifier->purify($message['body']); + continue; + } + + if (!empty($PHORUM['args']['purge'])) { + // purge the cache, must be below the following if + unset($message['meta']['body_cache']); + } + + if ( + isset($message['meta']['body_cache']) && + isset($message['meta']['body_cache_serial']) && + $message['meta']['body_cache_serial'] == $cache_serial + ) { + // cached version is present, bail out early + $data[$message_id]['body'] = base64_decode($message['meta']['body_cache']); + continue; + } + } + + // migration might edit this array, that's why it's defined + // so early + $updated_message = array(); + + // create the $body variable + if ( + $message_id && // message must be real to migrate + !isset($message['meta']['body_cache_serial']) + ) { + // perform migration + $fake_data = array(); + list($signature, $edit_message) = phorum_htmlpurifier_remove_sig_and_editmessage($message); + $fake_data[$message_id] = $message; + $fake_data = phorum_htmlpurifier_migrate($fake_data); + $body = $fake_data[$message_id]['body']; + $body = str_replace("\n", "\n", $body); + $updated_message['body'] = $body; // save it in + $body .= $signature . $edit_message; // add it back in + } else { + // reverse Phorum's pre-processing + $body = $message['body']; + // order is important + $body = str_replace("\n", "\n", $body); + $body = str_replace(array('<','>','&', '"'), array('<','>','&','"'), $body); + if (!$message_id && defined('PHORUM_CONTROL_CENTER')) { + // we're in control.php, so it was double-escaped + $body = str_replace(array('<','>','&', '"'), array('<','>','&','"'), $body); + } + } + + $body = $purifier->purify($body); + + // dynamically update the cache (MUST BE DONE HERE!) + // this is inefficient because it's one db call per + // cache miss, but once the cache is in place things are + // a lot zippier. + + if ($message_id) { // make sure it's not a fake id + $updated_message['meta'] = $message['meta']; + $updated_message['meta']['body_cache'] = base64_encode($body); + $updated_message['meta']['body_cache_serial'] = $cache_serial; + phorum_db_update_message($message_id, $updated_message); + } + + // must not get overloaded until after we cache it, otherwise + // we'll inadvertently change the original text + $data[$message_id]['body'] = $body; + + } + } + + return $data; +} + +// ----------------------------------------------------------------------- +// This is fragile code, copied from read.php:596 (Phorum 5.2.6). Please +// keep this code in-sync with Phorum + +/** + * Generates a signature based on a message array + */ +function phorum_htmlpurifier_generate_sig($row) +{ + $phorum_sig = ''; + if(isset($row["user"]["signature"]) + && isset($row['meta']['show_signature']) && $row['meta']['show_signature']==1){ + $phorum_sig=trim($row["user"]["signature"]); + if(!empty($phorum_sig)){ + $phorum_sig="\n\n$phorum_sig"; + } + } + return $phorum_sig; +} + +/** + * Generates an edit message based on a message array + */ +function phorum_htmlpurifier_generate_editmessage($row) +{ + $PHORUM = $GLOBALS['PHORUM']; + $editmessage = ''; + if(isset($row['meta']['edit_count']) && $row['meta']['edit_count'] > 0) { + $editmessage = str_replace ("%count%", $row['meta']['edit_count'], $PHORUM["DATA"]["LANG"]["EditedMessage"]); + $editmessage = str_replace ("%lastedit%", phorum_date($PHORUM["short_date_time"],$row['meta']['edit_date']), $editmessage); + $editmessage = str_replace ("%lastuser%", $row['meta']['edit_username'], $editmessage); + $editmessage = "\n\n\n\n$editmessage"; + } + return $editmessage; +} + +// End fragile code +// ----------------------------------------------------------------------- + +/** + * Removes the signature and edit message from a message + * @param $row Message passed by reference + */ +function phorum_htmlpurifier_remove_sig_and_editmessage(&$row) +{ + $signature = phorum_htmlpurifier_generate_sig($row); + $editmessage = phorum_htmlpurifier_generate_editmessage($row); + $replacements = array(); + // we need to remove add as that is the form these + // extra bits are in. + if ($signature) $replacements[str_replace("\n", "\n", $signature)] = ''; + if ($editmessage) $replacements[str_replace("\n", "\n", $editmessage)] = ''; + $row['body'] = strtr($row['body'], $replacements); + return array($signature, $editmessage); +} + +/** + * Indicate that data is fully HTML and not from migration, invalidate + * previous caches + * @note This function could generate the actual cache entries, but + * since there's data missing that must be deferred to the first read + */ +function phorum_htmlpurifier_posting($message) +{ + $PHORUM = $GLOBALS["PHORUM"]; + unset($message['meta']['body_cache']); // invalidate the cache + $message['meta']['body_cache_serial'] = $PHORUM['mod_htmlpurifier']['body_cache_serial']; + return $message; +} + +/** + * Overload quoting mechanism to prevent default, mail-style quote from happening + */ +function phorum_htmlpurifier_quote($array) +{ + $PHORUM = $GLOBALS["PHORUM"]; + $purifier =& HTMLPurifier::getInstance(); + $text = $purifier->purify($array[1]); + $source = htmlspecialchars($array[0]); + return "
            \n$text\n
            "; +} + +/** + * Ensure that our format hook is processed last. Also, loads the library. + * @credits + */ +function phorum_htmlpurifier_common() +{ + require_once(dirname(__FILE__).'/htmlpurifier/HTMLPurifier.auto.php'); + require(dirname(__FILE__).'/init-config.php'); + + $config = phorum_htmlpurifier_get_config(); + HTMLPurifier::getInstance($config); + + // increment revision.txt if you want to invalidate the cache + $GLOBALS['PHORUM']['mod_htmlpurifier']['body_cache_serial'] = $config->getSerial(); + + // load migration + if (file_exists(dirname(__FILE__) . '/migrate.php')) { + include(dirname(__FILE__) . '/migrate.php'); + } else { + echo 'Error: No migration path specified for HTML Purifier, please check + modes/htmlpurifier/migrate.bbcode.php for instructions on + how to migrate from your previous markup language.'; + exit; + } + + if (!function_exists('phorum_htmlpurifier_migrate')) { + // Dummy function + function phorum_htmlpurifier_migrate($data) {return $data;} + } + +} + +/** + * Pre-emptively performs purification if it looks like a WYSIWYG editor + * is being used + */ +function phorum_htmlpurifier_before_editor($message) +{ + if (!empty($GLOBALS['PHORUM']['mod_htmlpurifier']['wysiwyg'])) { + if (!empty($message['body'])) { + $body = $message['body']; + // de-entity-ize contents + $body = str_replace(array('<','>','&'), array('<','>','&'), $body); + $purifier =& HTMLPurifier::getInstance(); + $body = $purifier->purify($body); + // re-entity-ize contents + $body = htmlspecialchars($body, ENT_QUOTES, $GLOBALS['PHORUM']['DATA']['CHARSET']); + $message['body'] = $body; + } + } + return $message; +} + +function phorum_htmlpurifier_editor_after_subject() +{ + // don't show this message if it's a WYSIWYG editor, since it will + // then be handled automatically + if (!empty($GLOBALS['PHORUM']['mod_htmlpurifier']['wysiwyg'])) { + $i = $GLOBALS['PHORUM']['DATA']['MODE']; + if ($i == 'quote' || $i == 'edit' || $i == 'moderation') { + ?> +
            +

            + Notice: HTML has been scrubbed for your safety. + If you would like to see the original, turn off WYSIWYG mode + (consult your administrator for details.) +

            +
            +
            +

            + HTML input is enabled. Make sure you escape all HTML and + angled brackets with &lt; and &gt;. +

            config; + if ($config->get('AutoFormat.AutoParagraph')) { + ?>

            + Auto-paragraphing is enabled. Double + newlines will be converted to paragraphs; for single + newlines, use the pre tag. +

            getDefinition('HTML'); + $allowed = array(); + foreach ($html_definition->info as $name => $x) $allowed[] = "$name"; + sort($allowed); + $allowed_text = implode(', ', $allowed); + ?>

            Allowed tags: .

            +

            +

            + For inputting literal code such as HTML and PHP for display, use + CDATA tags to auto-escape your angled brackets, and pre + to preserve newlines: +

            +
            <pre><![CDATA[
            +Place code here
            +]]></pre>
            +

            + Power users, you can hide this notice with: +

            .htmlpurifier-help {display:none;}
            +

            +
            '; +phorum_htmlpurifier_show_form(); + +// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/plugins/phorum/settings/form.php b/vendor/ezyang/htmlpurifier/plugins/phorum/settings/form.php new file mode 100644 index 0000000000..9b6ad5f39e --- /dev/null +++ b/vendor/ezyang/htmlpurifier/plugins/phorum/settings/form.php @@ -0,0 +1,95 @@ +hidden("module", "modsettings"); + $frm->hidden("mod", "htmlpurifier"); // this is the directory name that the Settings file lives in + + if (!empty($error)){ + echo "$error
            "; + } + + $frm->addbreak("Edit settings for the HTML Purifier module"); + + $frm->addMessage('

            The box below sets $PHORUM[\'mod_htmlpurifier\'][\'wysiwyg\']. + When checked, contents sent for edit are now purified and the + informative message is disabled. If your WYSIWYG editor is disabled for + admin edits, you can safely keep this unchecked.

            '); + $frm->addRow('Use WYSIWYG?', $frm->checkbox('wysiwyg', '1', '', $PHORUM['mod_htmlpurifier']['wysiwyg'])); + + $frm->addMessage('

            The box below sets $PHORUM[\'mod_htmlpurifier\'][\'suppress_message\'], + which removes the big how-to use + HTML Purifier message.

            '); + $frm->addRow('Suppress information?', $frm->checkbox('suppress_message', '1', '', $PHORUM['mod_htmlpurifier']['suppress_message'])); + + $frm->addMessage('

            Click on directive links to read what each option does + (links do not open in new windows).

            +

            For more flexibility (for instance, you want to edit the full + range of configuration directives), you can create a config.php + file in your mods/htmlpurifier/ directory. Doing so will, + however, make the web configuration interface unavailable.

            '); + + require_once 'HTMLPurifier/Printer/ConfigForm.php'; + $htmlpurifier_form = new HTMLPurifier_Printer_ConfigForm('config', 'http://htmlpurifier.org/live/configdoc/plain.html#%s'); + $htmlpurifier_form->setTextareaDimensions(23, 7); // widen a little, since we have space + + $frm->addMessage($htmlpurifier_form->render( + $config, $PHORUM['mod_htmlpurifier']['directives'], false)); + + $frm->addMessage("Warning: Changing HTML Purifier's configuration will invalidate + the cache. Expect to see a flurry of database activity after you change + any of these settings."); + + $frm->addrow('Reset to defaults:', $frm->checkbox("reset", "1", "", false)); + + // hack to include extra styling + echo ''; + $js = $htmlpurifier_form->getJavaScript(); + echo ''; + + $frm->show(); +} + +function phorum_htmlpurifier_show_config_info() +{ + global $PHORUM; + + // update mod_htmlpurifier for housekeeping + phorum_htmlpurifier_commit_settings(); + + // politely tell user how to edit settings manually +?> +
            How to edit settings for HTML Purifier module
            +

            + A config.php file exists in your mods/htmlpurifier/ + directory. This file contains your custom configuration: in order to + change it, please navigate to that file and edit it accordingly. + You can also set $GLOBALS['PHORUM']['mod_htmlpurifier']['wysiwyg'] + or $GLOBALS['PHORUM']['mod_htmlpurifier']['suppress_message'] +

            +

            + To use the web interface, delete config.php (or rename it to + config.php.bak). +

            +

            + Warning: Changing HTML Purifier's configuration will invalidate + the cache. Expect to see a flurry of database activity after you change + any of these settings. +

            +hidden("module", "modsettings"); + $frm->hidden("mod", "htmlpurifier"); + $frm->hidden("migrate-sigs", "1"); + $frm->addbreak("Migrate user signatures to HTML"); + $frm->addMessage('This operation will migrate your users signatures + to HTML. This process is irreversible and must only be performed once. + Type in yes in the confirmation field to migrate.'); + if (!file_exists(dirname(__FILE__) . '/../migrate.php')) { + $frm->addMessage('Migration file does not exist, cannot migrate signatures. + Please check migrate.bbcode.php on how to create an appropriate file.'); + } else { + $frm->addrow('Confirm:', $frm->text_box("confirmation", "")); + } + $frm->show(); +} + +// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/plugins/phorum/settings/migrate-sigs.php b/vendor/ezyang/htmlpurifier/plugins/phorum/settings/migrate-sigs.php new file mode 100644 index 0000000000..5ea9cd0b81 --- /dev/null +++ b/vendor/ezyang/htmlpurifier/plugins/phorum/settings/migrate-sigs.php @@ -0,0 +1,79 @@ +$PHORUM["mod_htmlpurifier"])); + $offset = 1; + } elseif (!empty($_GET['migrate-sigs']) && $PHORUM['mod_htmlpurifier']['migrate-sigs']) { + $offset = (int) $_GET['migrate-sigs']; + } + return $offset; +} + +function phorum_htmlpurifier_migrate_sigs($offset) +{ + global $PHORUM; + + if(!$offset) return; // bail out quick if $offset == 0 + + // theoretically, we could get rid of this multi-request + // doo-hickery if safe mode is off + @set_time_limit(0); // attempt to let this run + $increment = $PHORUM['mod_htmlpurifier']['migrate-sigs-increment']; + + require_once(dirname(__FILE__) . '/../migrate.php'); + // migrate signatures + // do this in batches so we don't run out of time/space + $end = $offset + $increment; + $user_ids = array(); + for ($i = $offset; $i < $end; $i++) { + $user_ids[] = $i; + } + $userinfos = phorum_db_user_get_fields($user_ids, 'signature'); + foreach ($userinfos as $i => $user) { + if (empty($user['signature'])) continue; + $sig = $user['signature']; + // perform standard Phorum processing on the sig + $sig = str_replace(array("&","<",">"), array("&","<",">"), $sig); + $sig = preg_replace("/<((http|https|ftp):\/\/[a-z0-9;\/\?:@=\&\$\-_\.\+!*'\(\),~%]+?)>/i", "$1", $sig); + // prepare fake data to pass to migration function + $fake_data = array(array("author"=>"", "email"=>"", "subject"=>"", 'body' => $sig)); + list($fake_message) = phorum_htmlpurifier_migrate($fake_data); + $user['signature'] = $fake_message['body']; + if (!phorum_api_user_save($user)) { + exit('Error while saving user data'); + } + } + unset($userinfos); // free up memory + + // query for highest ID in database + $type = $PHORUM['DBCONFIG']['type']; + $sql = "select MAX(user_id) from {$PHORUM['user_table']}"; + $row = phorum_db_interact(DB_RETURN_ROW, $sql); + $top_id = (int) $row[0]; + + $offset += $increment; + if ($offset > $top_id) { // test for end condition + echo 'Migration finished'; + $PHORUM['mod_htmlpurifier']['migrate-sigs'] = false; + phorum_htmlpurifier_commit_settings(); + return true; + } + $host = $_SERVER['HTTP_HOST']; + $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\'); + $extra = 'admin.php?module=modsettings&mod=htmlpurifier&migrate-sigs=' . $offset; + // relies on output buffering to work + header("Location: http://$host$uri/$extra"); + exit; + +} + +// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/plugins/phorum/settings/save.php b/vendor/ezyang/htmlpurifier/plugins/phorum/settings/save.php new file mode 100644 index 0000000000..2aefaf83a0 --- /dev/null +++ b/vendor/ezyang/htmlpurifier/plugins/phorum/settings/save.php @@ -0,0 +1,29 @@ +mods/htmlpurifier/config.php
            already exists. To change + settings, edit that file. To use the web form, delete that file.
            "; + } else { + $config = phorum_htmlpurifier_get_config(true); + if (!isset($_POST['reset'])) $config->mergeArrayFromForm($_POST, 'config', $PHORUM['mod_htmlpurifier']['directives']); + $PHORUM['mod_htmlpurifier']['config'] = $config->getAll(); + } + $PHORUM['mod_htmlpurifier']['wysiwyg'] = !empty($_POST['wysiwyg']); + $PHORUM['mod_htmlpurifier']['suppress_message'] = !empty($_POST['suppress_message']); + if(!phorum_htmlpurifier_commit_settings()){ + $error="Database error while updating settings."; + } else { + echo "Settings Updated
            "; + } +} + +function phorum_htmlpurifier_commit_settings() +{ + global $PHORUM; + return phorum_db_update_settings(array("mod_htmlpurifier"=>$PHORUM["mod_htmlpurifier"])); +} + +// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/release1-update.php b/vendor/ezyang/htmlpurifier/release1-update.php new file mode 100644 index 0000000000..834d385676 --- /dev/null +++ b/vendor/ezyang/htmlpurifier/release1-update.php @@ -0,0 +1,110 @@ + 1) { + echo 'More than one release declaration in NEWS replaced' . PHP_EOL; + exit; + } + file_put_contents('NEWS', $news_c); +} + +// ...in Doxyfile +$doxyfile_c = preg_replace( + '/(?<=PROJECT_NUMBER {9}= )[^\s]+/m', // brittle + $version, + file_get_contents('Doxyfile'), + 1, $c +); +if (!$c) { + echo 'Could not update Doxyfile, missing PROJECT_NUMBER.' . PHP_EOL; + exit; +} +file_put_contents('Doxyfile', $doxyfile_c); + +// ...in HTMLPurifier.php +$htmlpurifier_c = file_get_contents('library/HTMLPurifier.php'); +$htmlpurifier_c = preg_replace( + '/HTML Purifier .+? - /', + "HTML Purifier $version - ", + $htmlpurifier_c, + 1, $c +); +if (!$c) { + echo 'Could not update HTMLPurifier.php, missing HTML Purifier [version] header.' . PHP_EOL; + exit; +} +$htmlpurifier_c = preg_replace( + '/public \$version = \'.+?\';/', + "public \$version = '$version';", + $htmlpurifier_c, + 1, $c +); +if (!$c) { + echo 'Could not update HTMLPurifier.php, missing public $version.' . PHP_EOL; + exit; +} +$htmlpurifier_c = preg_replace( + '/const VERSION = \'.+?\';/', + "const VERSION = '$version';", + $htmlpurifier_c, + 1, $c +); +if (!$c) { + echo 'Could not update HTMLPurifier.php, missing const $version.' . PHP_EOL; + exit; +} +file_put_contents('library/HTMLPurifier.php', $htmlpurifier_c); + +$config_c = file_get_contents('library/HTMLPurifier/Config.php'); +$config_c = preg_replace( + '/public \$version = \'.+?\';/', + "public \$version = '$version';", + $config_c, + 1, $c +); +if (!$c) { + echo 'Could not update Config.php, missing public $version.' . PHP_EOL; + exit; +} +file_put_contents('library/HTMLPurifier/Config.php', $config_c); + +passthru('php maintenance/flush.php'); + +if ($is_dev) echo "Review changes, write something in WHATSNEW and FOCUS, and then commit with log 'Release $version.'" . PHP_EOL; +else echo "Numbers updated to dev, no other modifications necessary!"; + +// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/release2-tag.php b/vendor/ezyang/htmlpurifier/release2-tag.php new file mode 100644 index 0000000000..25e5300d81 --- /dev/null +++ b/vendor/ezyang/htmlpurifier/release2-tag.php @@ -0,0 +1,22 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @link http://pear.php.net/package/Console_Color2 + */ + + + +/** + * A simple class to use ANSI Colorcodes. + * + * Of all the functions, you probably only want to use convert() and escape(). + * They are easier to use. However, if you want to access colorcodes more + * directly, look into the other functions. + * + * @category Console + * @package Console_Color + * @author Stefan Walk + * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @link http://pear.php.net/package/Console_Color + */ +class Console_Color2 +{ + + protected $color_codes; + + public function __construct() { + $this->setColorCodes(array( + 'color' => array( + 'black' => 30, + 'red' => 31, + 'green' => 32, + 'brown' => 33, + 'blue' => 34, + 'purple' => 35, + 'cyan' => 36, + 'grey' => 37, + 'yellow' => 33 + ), + 'style' => array( + 'normal' => 0, + 'bold' => 1, + 'light' => 1, + 'underscore' => 4, + 'underline' => 4, + 'blink' => 5, + 'inverse' => 6, + 'hidden' => 8, + 'concealed' => 8 + ), + 'background' => array( + 'black' => 40, + 'red' => 41, + 'green' => 42, + 'brown' => 43, + 'yellow' => 43, + 'blue' => 44, + 'purple' => 45, + 'cyan' => 46, + 'grey' => 47 + ) + ) + ); + } + + public function setColorCodes($color_codes) + { + $this->color_codes = $color_codes; + } + + public function getColorCodes() + { + return $this->color_codes; + } + + /** + * Returns an ANSI-Controlcode + * + * Takes 1 to 3 Arguments: either 1 to 3 strings containing the name of the + * FG Color, style and BG color, or one array with the indices color, style + * or background. + * + * @param mixed $color Optional. + * Either a string with the name of the foreground + * color, or an array with the indices 'color', + * 'style', 'background' and corresponding names as + * values. + * @param string $style Optional name of the style + * @param string $background Optional name of the background color + * + * @return string + */ + public function color($color = null, $style = null, $background = null) // {{{ + { + $colors = $this->getColorCodes(); + if (is_array($color)) { + $style = isset($color['style']) ? $color['style'] : null; + $background = isset($color['background']) ? $color['background'] : null; + $color = isset($color['color']) ? $color['color'] : null; + } + + if ($color == 'reset') { + return "\033[0m"; + } + + $code = array(); + if (isset($style)) { + $code[] = $colors['style'][$style]; + } + + if (isset($color)) { + $code[] = $colors['color'][$color]; + } + + if (isset($background)) { + $code[] = $colors['background'][$background]; + } + + if (empty($code)) { + $code[] = 0; + } + + $code = implode(';', $code); + return "\033[{$code}m"; + } // }}} + + /** + * Returns a FG color controlcode + * + * @param string $name Name of controlcode + * + * @return string + */ + public function fgcolor($name) + { + $colors = $this->getColorCodes(); + + return "\033[".$colors['color'][$name].'m'; + } + + /** + * Returns a style controlcode + * + * @param string $name Name of controlcode + * + * @return string + */ + function bgcolor($name) + { + $colors = $this->getColorCodes(); + return "\033[".$colors['background'][$name].'m'; + } + + /** + * Converts colorcodes in the format %y (for yellow) into ansi-control + * codes. The conversion table is: ('bold' meaning 'light' on some + * terminals). It's almost the same conversion table irssi uses. + *
             
            +     *                  text      text            background
            +     *      ------------------------------------------------
            +     *      %k %K %0    black     dark grey       black
            +     *      %r %R %1    red       bold red        red
            +     *      %g %G %2    green     bold green      green
            +     *      %y %Y %3    yellow    bold yellow     yellow
            +     *      %b %B %4    blue      bold blue       blue
            +     *      %m %M %5    magenta   bold magenta    magenta
            +     *      %p %P       magenta (think: purple)
            +     *      %c %C %6    cyan      bold cyan       cyan
            +     *      %w %W %7    white     bold white      white
            +     *
            +     *      %F     Blinking, Flashing
            +     *      %U     Underline
            +     *      %8     Reverse
            +     *      %_,%9  Bold
            +     *
            +     *      %n     Resets the color
            +     *      %%     A single %
            +     * 
            + * First param is the string to convert, second is an optional flag if + * colors should be used. It defaults to true, if set to false, the + * colorcodes will just be removed (And %% will be transformed into %) + * + * @param string $string String to convert + * @param bool $colored Should the string be colored? + * + * @return string + */ + public function convert($string, $colored = true) + { + static $conversions = array ( // static so the array doesn't get built + // everytime + // %y - yellow, and so on... {{{ + '%y' => array('color' => 'yellow', 'style' => 'normal'), + '%g' => array('color' => 'green', 'style' => 'normal'), + '%b' => array('color' => 'blue', 'style' => 'normal'), + '%r' => array('color' => 'red', 'style' => 'normal'), + '%p' => array('color' => 'purple', 'style' => 'normal'), + '%m' => array('color' => 'purple', 'style' => 'normal'), + '%c' => array('color' => 'cyan', 'style' => 'normal'), + '%w' => array('color' => 'grey', 'style' => 'normal'), + '%k' => array('color' => 'black', 'style' => 'normal'), + '%n' => array('color' => 'reset' ), + '%Y' => array('color' => 'yellow', 'style' => 'light'), + '%G' => array('color' => 'green', 'style' => 'light'), + '%B' => array('color' => 'blue', 'style' => 'light'), + '%R' => array('color' => 'red', 'style' => 'light'), + '%P' => array('color' => 'purple', 'style' => 'light'), + '%M' => array('color' => 'purple', 'style' => 'light'), + '%C' => array('color' => 'cyan', 'style' => 'light'), + '%W' => array('color' => 'grey', 'style' => 'light'), + '%K' => array('color' => 'black', 'style' => 'light'), + '%N' => array('color' => 'reset', 'style' => 'light'), + '%3' => array('background' => 'yellow'), + '%2' => array('background' => 'green' ), + '%4' => array('background' => 'blue' ), + '%1' => array('background' => 'red' ), + '%5' => array('background' => 'purple'), + '%6' => array('background' => 'cyan' ), + '%7' => array('background' => 'grey' ), + '%0' => array('background' => 'black' ), + // Don't use this, I can't stand flashing text + '%F' => array('style' => 'blink'), + '%U' => array('style' => 'underline'), + '%8' => array('style' => 'inverse'), + '%9' => array('style' => 'bold'), + '%_' => array('style' => 'bold') + // }}} + ); + + if ($colored) { + $string = str_replace('%%', '% ', $string); + foreach ($conversions as $key => $value) { + $string = str_replace($key, $this->color($value), + $string); + } + $string = str_replace('% ', '%', $string); + + } else { + $string = preg_replace('/%((%)|.)/', '$2', $string); + } + + return $string; + } + + /** + * Escapes % so they don't get interpreted as color codes + * + * @param string $string String to escape + * + * @return string + */ + public function escape($string) + { + return str_replace('%', '%%', $string); + } + + /** + * Strips ANSI color codes from a string + * + * @param string $string String to strip + * + * @acess public + * @return string + */ + public function strip($string) + { + return preg_replace('/\033\[[\d;]+m/', '', $string); + } + +} diff --git a/vendor/pear/console_color2/LICENSE b/vendor/pear/console_color2/LICENSE new file mode 100644 index 0000000000..982d8742e5 --- /dev/null +++ b/vendor/pear/console_color2/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2007 Stefan Walk + +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. diff --git a/vendor/pear/console_color2/README b/vendor/pear/console_color2/README new file mode 100644 index 0000000000..98d68d4bd9 --- /dev/null +++ b/vendor/pear/console_color2/README @@ -0,0 +1,19 @@ +This package is http://pear.php.net/package/Console_Color and has been migrated from http://svn.php.net/repository/pear/packages/Console_Color + +Please report all new issues via the PEAR bug tracker. + +If this package is marked as unmaintained and you have fixes, please submit your pull requests and start discussion on the pear-qa mailing list. + +To test, run either +$ phpunit tests/ + or +$ pear run-tests -r + +To build, simply +$ pear package + +To install from scratch +$ pear install package.xml + +To upgrade +$ pear upgrade -f package.xml diff --git a/vendor/pear/console_color2/composer.json b/vendor/pear/console_color2/composer.json new file mode 100644 index 0000000000..7375e7d37e --- /dev/null +++ b/vendor/pear/console_color2/composer.json @@ -0,0 +1,28 @@ +{ + "name": "pear/Console_Color2", + "description": "This Class allows you to easily use ANSI console colors in your application.", + "type": "library", + "keywords": [ "console" ], + "homepage": "https://github.com/pear/Console_Color2", + "license": "MIT", + "authors": [ + { + "name": "Daniel O'Connor", + "email": "daniel.oconnor@gmail.com" + }, + { + "name": "Stefan Walk", + "email": "et@php.net" + }, + { + "name": "Scott Mattocks", + "email": "scottmattocks@php.net" + } + ], + "require": { + "php": ">=5.0.0" + }, + "autoload": { + "psr-0": { "Console_Color2": "" } + } +} diff --git a/vendor/pear/console_color2/examples/color_example.php b/vendor/pear/console_color2/examples/color_example.php new file mode 100644 index 0000000000..5434a1e1d0 --- /dev/null +++ b/vendor/pear/console_color2/examples/color_example.php @@ -0,0 +1,21 @@ +convert("%bHello World!%n\n"); +// Colorless mode, in case you need to strip colorcodes off a text +print $color->convert("%rHello World!%n\n", false); +// The uppercase version makes a colorcode bold/bright +print $color->convert("%BHello World!%n\n"); +// To print a %, you use %% +print $color->convert("3 out of 4 people make up about %r75%% %nof the " + ."world population.\n"); +// Or you can use the escape() method. +print $color->convert("%y" + .$color->escape('If you feel that you do everying wrong, be random' + .', there\'s a 50% Chance of making the right ' + .'decision.')."%n\n"); + diff --git a/vendor/pear/console_color2/examples/documentation b/vendor/pear/console_color2/examples/documentation new file mode 100644 index 0000000000..bccb65d0e3 --- /dev/null +++ b/vendor/pear/console_color2/examples/documentation @@ -0,0 +1,66 @@ +PEAR PACKAGE: Console_Color +Version: 0.0.2 +Author: Stefan Walk +License: PHP License + +Console_Color is a simple class to use ANSI Colorcodes. +Of all the functions, you probably only want to use convert() and escape(). +They are easier to use. However, if you want to access colorcodes more +directly, look into the other functions. + +Class method list: +color - Returns an ANSI-Controlcode +fgcolor - Returns an ANSI-Controlcode for foreground color +bgcolor - Returns an ANSI-Controlcode for background color +style - Returns an ANSI-Controlcode for text style (bold, underlined...) +convert - Transforms Colorcodes like %y into ANSI Control codes +escape - Escape %s in text so they don't get interpreted as colorcodes + + +Console_Color::color() - Returns an ANSI-Controlcode + Takes 1 to 3 Arguments: either 1 to 3 strings containing the name of the + FG Color, style and BG color, or one array with the indices color, style + or background. + +Console_Color::fgcolor() - Returns an ANSI-Controlcode for foreground color + Takes the name of a foreground color as an argument and returns the ANSI + control code. + +Console_Color:bfgcolor() - Returns an ANSI-Controlcode for background color + Takes the name of a background color as an argument and returns the ANSI + control code. + +Console_Color::fgcolor() - Returns an ANSI-Controlcode for text style + Takes the name of a text style as an argument and returns the ANSI + control code. + +Console_Color::convert() - Transform Colorcodes into ANSI Control Codes + Converts colorcodes in the format %y (for yellow) into ansi-control + codes. The conversion table is: ('bold' meaning 'light' on some + terminals). It's almost the same conversion table irssi uses. + + text text background + ------------------------------------------------ + %k %K %0 black dark grey black + %r %R %1 red bold red red + %g %G %2 green bold green green + %y %Y %3 yellow bold yellow yellow + %b %B %4 blue bold blue blue + %m %M %5 magenta bold magenta magenta + %p %P magenta (think: purple) + %c %C %6 cyan bold cyan cyan + %w %W %7 white bold white white + %F Blinking, Flashing + %U Underline + %8 Reverse + %_,%9 Bold + %n Resets the color + %% A single % + + First param is the string to convert, second is an optional flag if + colors should be used. It defaults to true, if set to false, the + colorcodes will just be removed (And %% will be transformed into %) + The transformed string is returned. + +Console_Color::escape() - Escapes % so they don't get interpreted as color codes + Takes a string as an argument and returns the escaped string. diff --git a/vendor/pear/console_color2/package.xml b/vendor/pear/console_color2/package.xml new file mode 100644 index 0000000000..9c59057118 --- /dev/null +++ b/vendor/pear/console_color2/package.xml @@ -0,0 +1,109 @@ + + + Console_Color2 + pear.php.net + This Class allows you to easily use ANSI console colors in your application. + You can use Console_Color::convert to transform colorcodes like %r into ANSI +control codes. $console = new Console_Color2(); print $console->convert("%rHello World!%n"); would print +"Hello World" in red, for example. + + Daniel O'Connor + doconnor + daniel.oconnor@gmail.com + yes + + + Stefan Walk + et + et@php.net + no + + + Scott Mattocks + scottmattocks + scottmattocks@php.net + no + + 2012-10-23 + + + 0.1.2 + 0.1.0 + + + alpha + alpha + + MIT + +Bug #19626 Going from Light to Dark color does not work + + + + + + + + + + + + + + + 5.0.0 + + + 1.5.6 + + + + + + + + 0.1.0 + 0.1.0 + + + alpha + alpha + + 2011-12-18 + MIT + +PHP5 syntax + + + + + 0.1.1 + 0.1.0 + + + alpha + alpha + + 2012-03-14 + MIT + +Fix undefined index E_NOTICEs [Tarcisio Gruppi] + + + + + 0.1.2 + 0.1.0 + + + alpha + alpha + + 2012-10-23 + MIT + +Bug #19626 Going from Light to Dark color does not work + + + + diff --git a/vendor/pear/console_table/Table.php b/vendor/pear/console_table/Table.php new file mode 100755 index 0000000000..72d6bd8e23 --- /dev/null +++ b/vendor/pear/console_table/Table.php @@ -0,0 +1,974 @@ + + * @author Jan Schneider + * @copyright 2002-2005 Richard Heyes + * @copyright 2006-2008 Jan Schneider + * @license http://www.debian.org/misc/bsd.license BSD License (3 Clause) + * @version CVS: $Id$ + * @link http://pear.php.net/package/Console_Table + */ + +define('CONSOLE_TABLE_HORIZONTAL_RULE', 1); +define('CONSOLE_TABLE_ALIGN_LEFT', -1); +define('CONSOLE_TABLE_ALIGN_CENTER', 0); +define('CONSOLE_TABLE_ALIGN_RIGHT', 1); +define('CONSOLE_TABLE_BORDER_ASCII', -1); + +/** + * The main class. + * + * @category Console + * @package Console_Table + * @author Jan Schneider + * @license http://www.debian.org/misc/bsd.license BSD License (3 Clause) + * @link http://pear.php.net/package/Console_Table + */ +class Console_Table +{ + /** + * The table headers. + * + * @var array + */ + var $_headers = array(); + + /** + * The data of the table. + * + * @var array + */ + var $_data = array(); + + /** + * The maximum number of columns in a row. + * + * @var integer + */ + var $_max_cols = 0; + + /** + * The maximum number of rows in the table. + * + * @var integer + */ + var $_max_rows = 0; + + /** + * Lengths of the columns, calculated when rows are added to the table. + * + * @var array + */ + var $_cell_lengths = array(); + + /** + * Heights of the rows. + * + * @var array + */ + var $_row_heights = array(); + + /** + * How many spaces to use to pad the table. + * + * @var integer + */ + var $_padding = 1; + + /** + * Column filters. + * + * @var array + */ + var $_filters = array(); + + /** + * Columns to calculate totals for. + * + * @var array + */ + var $_calculateTotals; + + /** + * Alignment of the columns. + * + * @var array + */ + var $_col_align = array(); + + /** + * Default alignment of columns. + * + * @var integer + */ + var $_defaultAlign; + + /** + * Character set of the data. + * + * @var string + */ + var $_charset = 'utf-8'; + + /** + * Border characters. + * Allowed keys: + * - intersection - intersection ("+") + * - horizontal - horizontal rule character ("-") + * - vertical - vertical rule character ("|") + * + * @var array + */ + var $_border = array( + 'intersection' => '+', + 'horizontal' => '-', + 'vertical' => '|', + ); + + /** + * If borders are shown or not + * Allowed keys: top, right, bottom, left, inner: true and false + * + * @var array + */ + var $_borderVisibility = array( + 'top' => true, + 'right' => true, + 'bottom' => true, + 'left' => true, + 'inner' => true + ); + + /** + * Whether the data has ANSI colors. + * + * @var Console_Color2 + */ + var $_ansiColor = false; + + /** + * Constructor. + * + * @param integer $align Default alignment. One of + * CONSOLE_TABLE_ALIGN_LEFT, + * CONSOLE_TABLE_ALIGN_CENTER or + * CONSOLE_TABLE_ALIGN_RIGHT. + * @param string $border The character used for table borders or + * CONSOLE_TABLE_BORDER_ASCII. + * @param integer $padding How many spaces to use to pad the table. + * @param string $charset A charset supported by the mbstring PHP + * extension. + * @param boolean $color Whether the data contains ansi color codes. + */ + function __construct($align = CONSOLE_TABLE_ALIGN_LEFT, + $border = CONSOLE_TABLE_BORDER_ASCII, $padding = 1, + $charset = null, $color = false) + { + $this->_defaultAlign = $align; + $this->setBorder($border); + $this->_padding = $padding; + if ($color) { + if (!class_exists('Console_Color2')) { + include_once 'Console/Color2.php'; + } + $this->_ansiColor = new Console_Color2(); + } + if (!empty($charset)) { + $this->setCharset($charset); + } + } + + /** + * Converts an array to a table. + * + * @param array $headers Headers for the table. + * @param array $data A two dimensional array with the table + * data. + * @param boolean $returnObject Whether to return the Console_Table object + * instead of the rendered table. + * + * @static + * + * @return Console_Table|string A Console_Table object or the generated + * table. + */ + function fromArray($headers, $data, $returnObject = false) + { + if (!is_array($headers) || !is_array($data)) { + return false; + } + + $table = new Console_Table(); + $table->setHeaders($headers); + + foreach ($data as $row) { + $table->addRow($row); + } + + return $returnObject ? $table : $table->getTable(); + } + + /** + * Adds a filter to a column. + * + * Filters are standard PHP callbacks which are run on the data before + * table generation is performed. Filters are applied in the order they + * are added. The callback function must accept a single argument, which + * is a single table cell. + * + * @param integer $col Column to apply filter to. + * @param mixed &$callback PHP callback to apply. + * + * @return void + */ + function addFilter($col, &$callback) + { + $this->_filters[] = array($col, &$callback); + } + + /** + * Sets the charset of the provided table data. + * + * @param string $charset A charset supported by the mbstring PHP + * extension. + * + * @return void + */ + function setCharset($charset) + { + $locale = setlocale(LC_CTYPE, 0); + setlocale(LC_CTYPE, 'en_US'); + $this->_charset = strtolower($charset); + setlocale(LC_CTYPE, $locale); + } + + /** + * Set the table border settings + * + * Border definition modes: + * - CONSOLE_TABLE_BORDER_ASCII: Default border with +, - and | + * - array with keys "intersection", "horizontal" and "vertical" + * - single character string that sets all three of the array keys + * + * @param mixed $border Border definition + * + * @return void + * @see $_border + */ + function setBorder($border) + { + if ($border === CONSOLE_TABLE_BORDER_ASCII) { + $intersection = '+'; + $horizontal = '-'; + $vertical = '|'; + } else if (is_string($border)) { + $intersection = $horizontal = $vertical = $border; + } else if ($border == '') { + $intersection = $horizontal = $vertical = ''; + } else { + extract($border); + } + + $this->_border = array( + 'intersection' => $intersection, + 'horizontal' => $horizontal, + 'vertical' => $vertical, + ); + } + + /** + * Set which borders shall be shown. + * + * @param array $visibility Visibility settings. + * Allowed keys: left, right, top, bottom, inner + * + * @return void + * @see $_borderVisibility + */ + function setBorderVisibility($visibility) + { + $this->_borderVisibility = array_merge( + $this->_borderVisibility, + array_intersect_key( + $visibility, + $this->_borderVisibility + ) + ); + } + + /** + * Sets the alignment for the columns. + * + * @param integer $col_id The column number. + * @param integer $align Alignment to set for this column. One of + * CONSOLE_TABLE_ALIGN_LEFT + * CONSOLE_TABLE_ALIGN_CENTER + * CONSOLE_TABLE_ALIGN_RIGHT. + * + * @return void + */ + function setAlign($col_id, $align = CONSOLE_TABLE_ALIGN_LEFT) + { + switch ($align) { + case CONSOLE_TABLE_ALIGN_CENTER: + $pad = STR_PAD_BOTH; + break; + case CONSOLE_TABLE_ALIGN_RIGHT: + $pad = STR_PAD_LEFT; + break; + default: + $pad = STR_PAD_RIGHT; + break; + } + $this->_col_align[$col_id] = $pad; + } + + /** + * Specifies which columns are to have totals calculated for them and + * added as a new row at the bottom. + * + * @param array $cols Array of column numbers (starting with 0). + * + * @return void + */ + function calculateTotalsFor($cols) + { + $this->_calculateTotals = $cols; + } + + /** + * Sets the headers for the columns. + * + * @param array $headers The column headers. + * + * @return void + */ + function setHeaders($headers) + { + $this->_headers = array(array_values($headers)); + $this->_updateRowsCols($headers); + } + + /** + * Adds a row to the table. + * + * @param array $row The row data to add. + * @param boolean $append Whether to append or prepend the row. + * + * @return void + */ + function addRow($row, $append = true) + { + if ($append) { + $this->_data[] = array_values($row); + } else { + array_unshift($this->_data, array_values($row)); + } + + $this->_updateRowsCols($row); + } + + /** + * Inserts a row after a given row number in the table. + * + * If $row_id is not given it will prepend the row. + * + * @param array $row The data to insert. + * @param integer $row_id Row number to insert before. + * + * @return void + */ + function insertRow($row, $row_id = 0) + { + array_splice($this->_data, $row_id, 0, array($row)); + + $this->_updateRowsCols($row); + } + + /** + * Adds a column to the table. + * + * @param array $col_data The data of the column. + * @param integer $col_id The column index to populate. + * @param integer $row_id If starting row is not zero, specify it here. + * + * @return void + */ + function addCol($col_data, $col_id = 0, $row_id = 0) + { + foreach ($col_data as $col_cell) { + $this->_data[$row_id++][$col_id] = $col_cell; + } + + $this->_updateRowsCols(); + $this->_max_cols = max($this->_max_cols, $col_id + 1); + } + + /** + * Adds data to the table. + * + * @param array $data A two dimensional array with the table data. + * @param integer $col_id Starting column number. + * @param integer $row_id Starting row number. + * + * @return void + */ + function addData($data, $col_id = 0, $row_id = 0) + { + foreach ($data as $row) { + if ($row === CONSOLE_TABLE_HORIZONTAL_RULE) { + $this->_data[$row_id] = CONSOLE_TABLE_HORIZONTAL_RULE; + $row_id++; + continue; + } + $starting_col = $col_id; + foreach ($row as $cell) { + $this->_data[$row_id][$starting_col++] = $cell; + } + $this->_updateRowsCols(); + $this->_max_cols = max($this->_max_cols, $starting_col); + $row_id++; + } + } + + /** + * Adds a horizontal seperator to the table. + * + * @return void + */ + function addSeparator() + { + $this->_data[] = CONSOLE_TABLE_HORIZONTAL_RULE; + } + + /** + * Returns the generated table. + * + * @return string The generated table. + */ + function getTable() + { + $this->_applyFilters(); + $this->_calculateTotals(); + $this->_validateTable(); + + return $this->_buildTable(); + } + + /** + * Calculates totals for columns. + * + * @return void + */ + function _calculateTotals() + { + if (empty($this->_calculateTotals)) { + return; + } + + $this->addSeparator(); + + $totals = array(); + foreach ($this->_data as $row) { + if (is_array($row)) { + foreach ($this->_calculateTotals as $columnID) { + $totals[$columnID] += $row[$columnID]; + } + } + } + + $this->_data[] = $totals; + $this->_updateRowsCols(); + } + + /** + * Applies any column filters to the data. + * + * @return void + */ + function _applyFilters() + { + if (empty($this->_filters)) { + return; + } + + foreach ($this->_filters as $filter) { + $column = $filter[0]; + $callback = $filter[1]; + + foreach ($this->_data as $row_id => $row_data) { + if ($row_data !== CONSOLE_TABLE_HORIZONTAL_RULE) { + $this->_data[$row_id][$column] = + call_user_func($callback, $row_data[$column]); + } + } + } + } + + /** + * Ensures that column and row counts are correct. + * + * @return void + */ + function _validateTable() + { + if (!empty($this->_headers)) { + $this->_calculateRowHeight(-1, $this->_headers[0]); + } + + for ($i = 0; $i < $this->_max_rows; $i++) { + for ($j = 0; $j < $this->_max_cols; $j++) { + if (!isset($this->_data[$i][$j]) && + (!isset($this->_data[$i]) || + $this->_data[$i] !== CONSOLE_TABLE_HORIZONTAL_RULE)) { + $this->_data[$i][$j] = ''; + } + + } + $this->_calculateRowHeight($i, $this->_data[$i]); + + if ($this->_data[$i] !== CONSOLE_TABLE_HORIZONTAL_RULE) { + ksort($this->_data[$i]); + } + + } + + $this->_splitMultilineRows(); + + // Update cell lengths. + for ($i = 0; $i < count($this->_headers); $i++) { + $this->_calculateCellLengths($this->_headers[$i]); + } + for ($i = 0; $i < $this->_max_rows; $i++) { + $this->_calculateCellLengths($this->_data[$i]); + } + + ksort($this->_data); + } + + /** + * Splits multiline rows into many smaller one-line rows. + * + * @return void + */ + function _splitMultilineRows() + { + ksort($this->_data); + $sections = array(&$this->_headers, &$this->_data); + $max_rows = array(count($this->_headers), $this->_max_rows); + $row_height_offset = array(-1, 0); + + for ($s = 0; $s <= 1; $s++) { + $inserted = 0; + $new_data = $sections[$s]; + + for ($i = 0; $i < $max_rows[$s]; $i++) { + // Process only rows that have many lines. + $height = $this->_row_heights[$i + $row_height_offset[$s]]; + if ($height > 1) { + // Split column data into one-liners. + $split = array(); + for ($j = 0; $j < $this->_max_cols; $j++) { + $split[$j] = preg_split('/\r?\n|\r/', + $sections[$s][$i][$j]); + } + + $new_rows = array(); + // Construct new 'virtual' rows - insert empty strings for + // columns that have less lines that the highest one. + for ($i2 = 0; $i2 < $height; $i2++) { + for ($j = 0; $j < $this->_max_cols; $j++) { + $new_rows[$i2][$j] = !isset($split[$j][$i2]) + ? '' + : $split[$j][$i2]; + } + } + + // Replace current row with smaller rows. $inserted is + // used to take account of bigger array because of already + // inserted rows. + array_splice($new_data, $i + $inserted, 1, $new_rows); + $inserted += count($new_rows) - 1; + } + } + + // Has the data been modified? + if ($inserted > 0) { + $sections[$s] = $new_data; + $this->_updateRowsCols(); + } + } + } + + /** + * Builds the table. + * + * @return string The generated table string. + */ + function _buildTable() + { + if (!count($this->_data)) { + return ''; + } + + $vertical = $this->_border['vertical']; + $separator = $this->_getSeparator(); + + $return = array(); + for ($i = 0; $i < count($this->_data); $i++) { + for ($j = 0; $j < count($this->_data[$i]); $j++) { + if ($this->_data[$i] !== CONSOLE_TABLE_HORIZONTAL_RULE && + $this->_strlen($this->_data[$i][$j]) < + $this->_cell_lengths[$j]) { + $this->_data[$i][$j] = $this->_strpad($this->_data[$i][$j], + $this->_cell_lengths[$j], + ' ', + $this->_col_align[$j]); + } + } + + if ($this->_data[$i] !== CONSOLE_TABLE_HORIZONTAL_RULE) { + $row_begin = $this->_borderVisibility['left'] + ? $vertical . str_repeat(' ', $this->_padding) + : ''; + $row_end = $this->_borderVisibility['right'] + ? str_repeat(' ', $this->_padding) . $vertical + : ''; + $implode_char = str_repeat(' ', $this->_padding) . $vertical + . str_repeat(' ', $this->_padding); + $return[] = $row_begin + . implode($implode_char, $this->_data[$i]) . $row_end; + } elseif (!empty($separator)) { + $return[] = $separator; + } + + } + + $return = implode(PHP_EOL, $return); + if (!empty($separator)) { + if ($this->_borderVisibility['inner']) { + $return = $separator . PHP_EOL . $return; + } + if ($this->_borderVisibility['bottom']) { + $return .= PHP_EOL . $separator; + } + } + $return .= PHP_EOL; + + if (!empty($this->_headers)) { + $return = $this->_getHeaderLine() . PHP_EOL . $return; + } + + return $return; + } + + /** + * Creates a horizontal separator for header separation and table + * start/end etc. + * + * @return string The horizontal separator. + */ + function _getSeparator() + { + if (!$this->_border) { + return; + } + + $horizontal = $this->_border['horizontal']; + $intersection = $this->_border['intersection']; + + $return = array(); + foreach ($this->_cell_lengths as $cl) { + $return[] = str_repeat($horizontal, $cl); + } + + $row_begin = $this->_borderVisibility['left'] + ? $intersection . str_repeat($horizontal, $this->_padding) + : ''; + $row_end = $this->_borderVisibility['right'] + ? str_repeat($horizontal, $this->_padding) . $intersection + : ''; + $implode_char = str_repeat($horizontal, $this->_padding) . $intersection + . str_repeat($horizontal, $this->_padding); + + return $row_begin . implode($implode_char, $return) . $row_end; + } + + /** + * Returns the header line for the table. + * + * @return string The header line of the table. + */ + function _getHeaderLine() + { + // Make sure column count is correct + for ($j = 0; $j < count($this->_headers); $j++) { + for ($i = 0; $i < $this->_max_cols; $i++) { + if (!isset($this->_headers[$j][$i])) { + $this->_headers[$j][$i] = ''; + } + } + } + + for ($j = 0; $j < count($this->_headers); $j++) { + for ($i = 0; $i < count($this->_headers[$j]); $i++) { + if ($this->_strlen($this->_headers[$j][$i]) < + $this->_cell_lengths[$i]) { + $this->_headers[$j][$i] = + $this->_strpad($this->_headers[$j][$i], + $this->_cell_lengths[$i], + ' ', + $this->_col_align[$i]); + } + } + } + + $vertical = $this->_border['vertical']; + $row_begin = $this->_borderVisibility['left'] + ? $vertical . str_repeat(' ', $this->_padding) + : ''; + $row_end = $this->_borderVisibility['right'] + ? str_repeat(' ', $this->_padding) . $vertical + : ''; + $implode_char = str_repeat(' ', $this->_padding) . $vertical + . str_repeat(' ', $this->_padding); + + $separator = $this->_getSeparator(); + if (!empty($separator) && $this->_borderVisibility['top']) { + $return[] = $separator; + } + for ($j = 0; $j < count($this->_headers); $j++) { + $return[] = $row_begin + . implode($implode_char, $this->_headers[$j]) . $row_end; + } + + return implode(PHP_EOL, $return); + } + + /** + * Updates values for maximum columns and rows. + * + * @param array $rowdata Data array of a single row. + * + * @return void + */ + function _updateRowsCols($rowdata = null) + { + // Update maximum columns. + $this->_max_cols = max($this->_max_cols, count($rowdata)); + + // Update maximum rows. + ksort($this->_data); + $keys = array_keys($this->_data); + $this->_max_rows = end($keys) + 1; + + switch ($this->_defaultAlign) { + case CONSOLE_TABLE_ALIGN_CENTER: + $pad = STR_PAD_BOTH; + break; + case CONSOLE_TABLE_ALIGN_RIGHT: + $pad = STR_PAD_LEFT; + break; + default: + $pad = STR_PAD_RIGHT; + break; + } + + // Set default column alignments + for ($i = 0; $i < $this->_max_cols; $i++) { + if (!isset($this->_col_align[$i])) { + $this->_col_align[$i] = $pad; + } + } + } + + /** + * Calculates the maximum length for each column of a row. + * + * @param array $row The row data. + * + * @return void + */ + function _calculateCellLengths($row) + { + for ($i = 0; $i < count($row); $i++) { + if (!isset($this->_cell_lengths[$i])) { + $this->_cell_lengths[$i] = 0; + } + $this->_cell_lengths[$i] = max($this->_cell_lengths[$i], + $this->_strlen($row[$i])); + } + } + + /** + * Calculates the maximum height for all columns of a row. + * + * @param integer $row_number The row number. + * @param array $row The row data. + * + * @return void + */ + function _calculateRowHeight($row_number, $row) + { + if (!isset($this->_row_heights[$row_number])) { + $this->_row_heights[$row_number] = 1; + } + + // Do not process horizontal rule rows. + if ($row === CONSOLE_TABLE_HORIZONTAL_RULE) { + return; + } + + for ($i = 0, $c = count($row); $i < $c; ++$i) { + $lines = preg_split('/\r?\n|\r/', $row[$i]); + $this->_row_heights[$row_number] = max($this->_row_heights[$row_number], + count($lines)); + } + } + + /** + * Returns the character length of a string. + * + * @param string $str A multibyte or singlebyte string. + * + * @return integer The string length. + */ + function _strlen($str) + { + static $mbstring; + + // Strip ANSI color codes if requested. + if ($this->_ansiColor) { + $str = $this->_ansiColor->strip($str); + } + + // Cache expensive function_exists() calls. + if (!isset($mbstring)) { + $mbstring = function_exists('mb_strwidth'); + } + + if ($mbstring) { + return mb_strwidth($str, $this->_charset); + } + + return strlen($str); + } + + /** + * Returns part of a string. + * + * @param string $string The string to be converted. + * @param integer $start The part's start position, zero based. + * @param integer $length The part's length. + * + * @return string The string's part. + */ + function _substr($string, $start, $length = null) + { + static $mbstring; + + // Cache expensive function_exists() calls. + if (!isset($mbstring)) { + $mbstring = function_exists('mb_substr'); + } + + if (is_null($length)) { + $length = $this->_strlen($string); + } + if ($mbstring) { + $ret = @mb_substr($string, $start, $length, $this->_charset); + if (!empty($ret)) { + return $ret; + } + } + return substr($string, $start, $length); + } + + /** + * Returns a string padded to a certain length with another string. + * + * This method behaves exactly like str_pad but is multibyte safe. + * + * @param string $input The string to be padded. + * @param integer $length The length of the resulting string. + * @param string $pad The string to pad the input string with. Must + * be in the same charset like the input string. + * @param const $type The padding type. One of STR_PAD_LEFT, + * STR_PAD_RIGHT, or STR_PAD_BOTH. + * + * @return string The padded string. + */ + function _strpad($input, $length, $pad = ' ', $type = STR_PAD_RIGHT) + { + $mb_length = $this->_strlen($input); + $sb_length = strlen($input); + $pad_length = $this->_strlen($pad); + + /* Return if we already have the length. */ + if ($mb_length >= $length) { + return $input; + } + + /* Shortcut for single byte strings. */ + if ($mb_length == $sb_length && $pad_length == strlen($pad)) { + return str_pad($input, $length, $pad, $type); + } + + switch ($type) { + case STR_PAD_LEFT: + $left = $length - $mb_length; + $output = $this->_substr(str_repeat($pad, ceil($left / $pad_length)), + 0, $left, $this->_charset) . $input; + break; + case STR_PAD_BOTH: + $left = floor(($length - $mb_length) / 2); + $right = ceil(($length - $mb_length) / 2); + $output = $this->_substr(str_repeat($pad, ceil($left / $pad_length)), + 0, $left, $this->_charset) . + $input . + $this->_substr(str_repeat($pad, ceil($right / $pad_length)), + 0, $right, $this->_charset); + break; + case STR_PAD_RIGHT: + $right = $length - $mb_length; + $output = $input . + $this->_substr(str_repeat($pad, ceil($right / $pad_length)), + 0, $right, $this->_charset); + break; + } + + return $output; + } + +} diff --git a/vendor/pear/console_table/composer.json b/vendor/pear/console_table/composer.json new file mode 100644 index 0000000000..cfc37a3387 --- /dev/null +++ b/vendor/pear/console_table/composer.json @@ -0,0 +1,43 @@ +{ + "name": "pear/console_table", + "type": "library", + "description": "Library that makes it easy to build console style tables.", + "keywords": [ + "console" + ], + "homepage": "http://pear.php.net/package/Console_Table/", + "license": "BSD-2-Clause", + "authors": [ + { + "name": "Jan Schneider", + "homepage": "http://pear.php.net/user/yunosh" + }, + { + "name": "Tal Peer", + "homepage": "http://pear.php.net/user/tal" + }, + { + "name": "Xavier Noguer", + "homepage": "http://pear.php.net/user/xnoguer" + }, + { + "name": "Richard Heyes", + "homepage": "http://pear.php.net/user/richard" + } + ], + "require": { + "php": ">=5.2.0" + }, + "suggest": { + "pear/Console_Color2": ">=0.1.2" + }, + "autoload": { + "classmap": [ + "Table.php" + ] + }, + "support": { + "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=Console_Table", + "source": "https://github.com/pear/Console_Table" + } +} diff --git a/vendor/pear/console_table/package.xml b/vendor/pear/console_table/package.xml new file mode 100644 index 0000000000..ac8ee5fdf4 --- /dev/null +++ b/vendor/pear/console_table/package.xml @@ -0,0 +1,401 @@ + + + Console_Table + pear.php.net + Library that makes it easy to build console style tables + Provides a Console_Table class with methods such as addRow(), insertRow(), addCol() etc. to build console tables with or without headers and with user defined table rules, padding, and alignment. + + Jan Schneider + yunosh + jan@horde.org + yes + + + Richard Heyes + richard + richard@phpguru.org + no + + + Tal Peer + tal + tal@php.net + no + + + Xavier Noguer + xnoguer + xnoguer@php.net + no + + 2016-01-21 + + 1.3.0 + 1.3.0 + + + stable + stable + + BSD + +* Fix warning with PHP 7 and bump required PHP version to 5.2.0 (Pieter Frenssen PR #13). + + + + + + + + + + + + + + + + + + + + + + + + + + + 5.2.0 + + + 1.4.0b1 + + + + + Console_Color2 + pear.php.net + 0.1.2 + + + + + + + + 0.8 + 0.8 + + + beta + beta + + 2002-09-02 + BSD + +* Initial release. + + + + + 1.0 + 1.0.0 + + + stable + stable + + 2003-01-24 + BSD + +* Removed a few options and added addData() method. + + + + + 1.0.1 + 1.0.0 + + + stable + stable + + 2003-03-03 + BSD + +* Fixed a caching bug. + + + + + 1.0.2 + 1.0.0 + + + stable + stable + + 2005-07-16 + BSD + +* Added support for column alignment (Michael Richter). + + + + + 1.0.3 + 1.0.0 + + + stable + stable + + 2006-03-13 + BSD + +* Fix cell width calculation if setting header with associative array (Bug #4299). +* Fix fatal reference error with some PHP versions (Bug #5309). +* Fix notice if no data has been provided (Bug #5851). +* Added multibyte support (Requests #2934, Request #7014). + + + + + 1.0.4 + 1.0.0 + + + stable + stable + + 2006-04-08 + BSD + +* Add support for multi-line cells (koto at webworkers dot pl, Request #7017). + + + + + 1.0.5 + 1.0.0 + + + stable + stable + + 2006-08-28 + BSD + +* Allow to specify separator rules in addData(). +* Fix warnings when combining separator rules and callback filters (Bug #8566). + + + + + 1.0.6 + 1.0.0 + + + stable + stable + + 2007-01-19 + BSD + +* Add support for multi-line headers (Request #8615). + + + + 2007-05-17 + + 1.0.7 + 1.0.0 + + + stable + stable + + BSD + +* Fix header height if first data row has more than one line (Bug #11064). +* Fix notice if header is not set. + + + + 2008-01-09 + + 1.0.8 + 1.0.0 + + + stable + stable + + BSD + +* Fix cell padding with multibyte strings under certain circumstances (Bug #12853). + + + + 2008-03-28 + + 1.1.0 + 1.1.0 + + + stable + stable + + BSD + +* Add option to set table border character. +* Extend constructor to set table borders, padding, and charset on instantiation. + + + + 2008-04-09 + + 1.1.1 + 1.1.0 + + + stable + stable + + BSD + +* Fix rendering of multiline rows with cells that contain zeros (Bug #13629). + + + + 2008-07-27 + + 1.1.2 + 1.1.0 + + + stable + stable + + BSD + +* Don't render anything if no data has been provided (Bug #14405). + + + + 2008-10-20 + + 1.1.3 + 1.1.1 + + + stable + stable + + BSD + +* Add option to render data with ANSI color codes (Igor Feghali, Request #14835). + + + + + 1.1.4 + 1.1.1 + + + stable + stable + + 2010-10-25 + BSD + +* Automatically built QA release. +* Add Console_Color support (Request #14835). + +* Improve documentation (Christian Weiske, Bug #15006). + + + + 2012-12-07 + + + 1.1.5 + 1.1.1 + + + stable + stable + + BSD + +* Use mb_strwidth() instead of mb_strlen() to determine lengths of multi-byte strings (Bug #19423). + + + + 2013-10-12 + + 1.1.6 + 1.1.1 + + + stable + stable + + BSD + +* Use line breaks dependent on the current operating system (Bug #20092). + + + + 2014-02-17 + + 1.2.0 + 1.2.0 + + + stable + stable + + BSD + +* Make border visibility configurable (Christian Weiske, Request #20186). +* Allow to customize all border characters (Christian Weiske, Request #20182). +* Fix notice when using setAlign() on other than first column (Christian Weiske, Bug #20181). +* Use Console_Color2 to avoid notices from PHP 4 code (Christian Weiske, Bug #20188) + + + + 2014-10-27 + + 1.2.1 + 1.2.0 + + + stable + stable + + BSD + +* Add travis configuration (Christian Weiske). +* Try to autoload Console_Color2 first (Jurgen Rutten, PR #11). +* Fix Composer definition syntax (Rob Loach, PR #9). + + + + 2016-01-21 + + 1.3.0 + 1.3.0 + + + stable + stable + + BSD + +* Fix warning with PHP 7 and bump required PHP version to 5.2.0 (Pieter Frenssen PR #13). + + + + diff --git a/vendor/pear/console_table/tests/assoziative_arrays.phpt b/vendor/pear/console_table/tests/assoziative_arrays.phpt new file mode 100644 index 0000000000..91bc49b753 --- /dev/null +++ b/vendor/pear/console_table/tests/assoziative_arrays.phpt @@ -0,0 +1,35 @@ +--TEST-- +Header and data as associative arrays. +--FILE-- + 'foo', + 'two' => 'bar' +); + +$data = array( + array( + 'x' => 'baz', + ) +); + +$table = new Console_Table(); +$table->setHeaders($headers); +$table->addData($data); + +echo $table->getTable(); + +?> +--EXPECT-- ++-----+-----+ +| foo | bar | ++-----+-----+ +| baz | | ++-----+-----+ diff --git a/vendor/pear/console_table/tests/border-ascii.phpt b/vendor/pear/console_table/tests/border-ascii.phpt new file mode 100644 index 0000000000..e8ca63100b --- /dev/null +++ b/vendor/pear/console_table/tests/border-ascii.phpt @@ -0,0 +1,24 @@ +--TEST-- +Border: default ASCII mode +--FILE-- +setHeaders(array('City', 'Mayor')); +$table->addRow(array('Leipzig', 'Major Tom')); +$table->addRow(array('New York', 'Towerhouse')); + +echo $table->getTable(); +?> +--EXPECT-- ++----------+------------+ +| City | Mayor | ++----------+------------+ +| Leipzig | Major Tom | +| New York | Towerhouse | ++----------+------------+ diff --git a/vendor/pear/console_table/tests/border-custom.phpt b/vendor/pear/console_table/tests/border-custom.phpt new file mode 100644 index 0000000000..62be737a84 --- /dev/null +++ b/vendor/pear/console_table/tests/border-custom.phpt @@ -0,0 +1,27 @@ +--TEST-- +Border: new custom mode +--FILE-- + '=', 'vertical' => ':', 'intersection' => '*') +); +$table->setHeaders(array('City', 'Mayor')); +$table->addRow(array('Leipzig', 'Major Tom')); +$table->addRow(array('New York', 'Towerhouse')); + +echo $table->getTable(); +?> +--EXPECT-- +*==========*============* +: City : Mayor : +*==========*============* +: Leipzig : Major Tom : +: New York : Towerhouse : +*==========*============* diff --git a/vendor/pear/console_table/tests/border-custom2.phpt b/vendor/pear/console_table/tests/border-custom2.phpt new file mode 100644 index 0000000000..c129c8d68b --- /dev/null +++ b/vendor/pear/console_table/tests/border-custom2.phpt @@ -0,0 +1,27 @@ +--TEST-- +Border: new custom mode, alternative style +--FILE-- + '=', 'vertical' => '', 'intersection' => '') +); +$table->setHeaders(array('City', 'Mayor')); +$table->addRow(array('Leipzig', 'Major Tom')); +$table->addRow(array('New York', 'Towerhouse')); + +echo $table->getTable(); +?> +--EXPECT-- +====================== + City Mayor +====================== + Leipzig Major Tom + New York Towerhouse +====================== diff --git a/vendor/pear/console_table/tests/border-disable.phpt b/vendor/pear/console_table/tests/border-disable.phpt new file mode 100644 index 0000000000..c753e98ba8 --- /dev/null +++ b/vendor/pear/console_table/tests/border-disable.phpt @@ -0,0 +1,68 @@ +--TEST-- +Border: disable it +--FILE-- +setHeaders(array('City', 'Mayor')); +$table->addRow(array('Leipzig', 'Major Tom')); +$table->addRow(array('New York', 'Towerhouse')); + +$table->setBorderVisibility( + array( + 'left' => false, + 'right' => false, + ) +); +echo "Horizontal borders only:\n"; +echo $table->getTable() . "\n"; + +$table->setBorderVisibility( + array( + 'top' => false, + 'right' => false, + 'bottom' => false, + 'left' => false, + 'inner' => false, + ) +); +echo "No borders:\n"; +echo $table->getTable() . "\n"; + +$table->setBorderVisibility( + array( + 'top' => false, + 'right' => true, + 'bottom' => false, + 'left' => true, + 'inner' => true, + ) +); +echo "Vertical and inner only:\n"; +echo $table->getTable() . "\n"; +?> +--EXPECT-- +Horizontal borders only: +---------+----------- +City | Mayor +---------+----------- +Leipzig | Major Tom +New York | Towerhouse +---------+----------- + +No borders: +City | Mayor +Leipzig | Major Tom +New York | Towerhouse + +Vertical and inner only: +| City | Mayor | ++----------+------------+ +| Leipzig | Major Tom | +| New York | Towerhouse | + diff --git a/vendor/pear/console_table/tests/border-dot.phpt b/vendor/pear/console_table/tests/border-dot.phpt new file mode 100644 index 0000000000..8d6f1033ce --- /dev/null +++ b/vendor/pear/console_table/tests/border-dot.phpt @@ -0,0 +1,24 @@ +--TEST-- +Border: custom border character +--FILE-- +setHeaders(array('City', 'Mayor')); +$table->addRow(array('Leipzig', 'Major Tom')); +$table->addRow(array('New York', 'Towerhouse')); + +echo $table->getTable(); +?> +--EXPECT-- +......................... +. City . Mayor . +......................... +. Leipzig . Major Tom . +. New York . Towerhouse . +......................... diff --git a/vendor/pear/console_table/tests/border-empty.phpt b/vendor/pear/console_table/tests/border-empty.phpt new file mode 100644 index 0000000000..a9c635b21f --- /dev/null +++ b/vendor/pear/console_table/tests/border-empty.phpt @@ -0,0 +1,21 @@ +--TEST-- +Border: empty character +--FILE-- +setHeaders(array('City', 'Mayor')); +$table->addRow(array('Leipzig', 'Major Tom')); +$table->addRow(array('New York', 'Towerhouse')); + +echo $table->getTable() . "\n"; +?> +--EXPECT-- + City Mayor + Leipzig Major Tom + New York Towerhouse diff --git a/vendor/pear/console_table/tests/bug20181.phpt b/vendor/pear/console_table/tests/bug20181.phpt new file mode 100644 index 0000000000..2a604b3036 --- /dev/null +++ b/vendor/pear/console_table/tests/bug20181.phpt @@ -0,0 +1,23 @@ +--TEST-- +Bug #20181: setAlign() on non-zero column +--FILE-- +setAlign(1, CONSOLE_TABLE_ALIGN_RIGHT); +$table->setHeaders(array('f', 'bar')); +$table->addRow(array('baz', 'b')); + +echo $table->getTable(); +?> +--EXPECT-- ++-----+-----+ +| f | bar | ++-----+-----+ +| baz | b | ++-----+-----+ diff --git a/vendor/pear/console_table/tests/colors.phpt b/vendor/pear/console_table/tests/colors.phpt new file mode 100644 index 0000000000..ac7f923fc2 --- /dev/null +++ b/vendor/pear/console_table/tests/colors.phpt @@ -0,0 +1,28 @@ +--TEST-- +Data with ANSI color codes +--SKIPIF-- + +--FILE-- +setHeaders(array('foo', 'bar')); +$table->addRow(array('baz', $cc->convert("%bblue%n"))); + +echo $table->getTable(); + +?> +--EXPECT-- ++-----+------+ +| foo | bar | ++-----+------+ +| baz | blue | ++-----+------+ diff --git a/vendor/pear/console_table/tests/filters.phpt b/vendor/pear/console_table/tests/filters.phpt new file mode 100644 index 0000000000..f96e78a75f --- /dev/null +++ b/vendor/pear/console_table/tests/filters.phpt @@ -0,0 +1,38 @@ +--TEST-- +Callback filters +--FILE-- +setHeaders(array('foo', 'bar')); +$table->addData($data); +$table->addFilter(0, $filter); + +echo $table->getTable(); + +?> +--EXPECT-- ++-------+-------+ +| foo | bar | ++-------+-------+ +| ONE | two | +| THREE | four | ++-------+-------+ +| FIVE | six | +| SEVEN | eight | ++-------+-------+ diff --git a/vendor/pear/console_table/tests/multibyte.phpt b/vendor/pear/console_table/tests/multibyte.phpt new file mode 100644 index 0000000000..0ac7723e20 --- /dev/null +++ b/vendor/pear/console_table/tests/multibyte.phpt @@ -0,0 +1,35 @@ +--TEST-- +Multibyte strings +--FILE-- +setHeaders(array('Schön', 'Häßlich')); +$table->addData(array(array('Ich', 'Du'), array('Ä', 'Ü'))); +echo $table->getTable(); + +$table = new Console_Table(); +$table->addRow(array("I'm from 中国")); +$table->addRow(array("我是中国人")); +$table->addRow(array("I'm from China")); +echo $table->getTable(); + +?> +--EXPECT-- ++-------+---------+ +| Schön | Häßlich | ++-------+---------+ +| Ich | Du | +| Ä | Ü | ++-------+---------+ ++----------------+ +| I'm from 中国 | +| 我是中国人 | +| I'm from China | ++----------------+ diff --git a/vendor/pear/console_table/tests/multiline.phpt b/vendor/pear/console_table/tests/multiline.phpt new file mode 100644 index 0000000000..1e72e58a21 --- /dev/null +++ b/vendor/pear/console_table/tests/multiline.phpt @@ -0,0 +1,51 @@ +--TEST-- +Multiline table cells +--FILE-- +setHeaders(array("h1\nmultiline", 'h2', "h3", 'h4')); +$table->addData($data); +echo $table->getTable(); + +echo Console_Table::fromArray(array('one line header'), + array(array("multiple\nlines"), + array('one line'))); + +?> +--EXPECT-- ++-----------+--------+-----------+--------+ +| h1 | h2 | h3 | h4 | +| multiline | | | | ++-----------+--------+-----------+--------+ +| col1 | 0 | col3 | col4 | +| | | multiline | | +| r2col1 | r2col2 | r2col3 | r2col4 | +| | | multiline | | +| r3col1 | r3col2 | r3col3 | r3col4 | +| | | multiline | | +| | | verymuch | | +| r4col1 | r4col2 | r4col3 | r4col4 | +| r5col1 | r5col2 | r5col3 | r5col4 | ++-----------+--------+-----------+--------+ ++-----------------+ +| one line header | ++-----------------+ +| multiple | +| lines | +| one line | ++-----------------+ diff --git a/vendor/pear/console_table/tests/no_header.phpt b/vendor/pear/console_table/tests/no_header.phpt new file mode 100644 index 0000000000..8d4b61bec4 --- /dev/null +++ b/vendor/pear/console_table/tests/no_header.phpt @@ -0,0 +1,21 @@ +--TEST-- +Table without header +--FILE-- +addData(array(array('foo', 'bar'))); + +echo $table->getTable(); + +?> +--EXPECT-- ++-----+-----+ +| foo | bar | ++-----+-----+ diff --git a/vendor/pear/console_table/tests/no_rows.phpt b/vendor/pear/console_table/tests/no_rows.phpt new file mode 100644 index 0000000000..386da343bd --- /dev/null +++ b/vendor/pear/console_table/tests/no_rows.phpt @@ -0,0 +1,25 @@ +--TEST-- +Table without data +--FILE-- +setHeaders(array('foo', 'bar')); +echo $table->getTable(); + +$table = new Console_Table(); +echo $table->getTable(); + +?> +--EXPECT-- ++-----+-----+ +| foo | bar | ++-----+-----+ +| | | ++-----+-----+ diff --git a/vendor/pear/console_table/tests/rules.phpt b/vendor/pear/console_table/tests/rules.phpt new file mode 100644 index 0000000000..ddbbc3fc6b --- /dev/null +++ b/vendor/pear/console_table/tests/rules.phpt @@ -0,0 +1,74 @@ +--TEST-- +Horizontal rules +--FILE-- +setHeaders(array('foo', 'bar')); +$table->addData($data); +$table->addSeparator(); +echo $table->getTable(); +echo "=========================\n"; + +$table = new Console_Table(CONSOLE_TABLE_ALIGN_LEFT, ''); +$table->setHeaders(array('foo', 'bar')); +$table->addData($data); +$table->addSeparator(); +echo $table->getTable(); +echo "=========================\n"; + +$table = new Console_Table(CONSOLE_TABLE_ALIGN_LEFT, '#', 0); +$table->setHeaders(array('foo', 'bar')); +$table->addData($data); +$table->addSeparator(); +echo $table->getTable(); + +?> +--EXPECT-- ++-------+-------+ +| foo | bar | ++-------+-------+ +| one | two | ++-------+-------+ +| three | four | ++-------+-------+ ++-------+-------+ +| five | six | +| seven | eight | ++-------+-------+ ++-------+-------+ +========================= + foo bar + one two + three four + five six + seven eight +========================= +############# +#foo #bar # +############# +#one #two # +############# +#three#four # +############# +############# +#five #six # +#seven#eight# +############# +############# diff --git a/vendor/php-amqplib/php-amqplib/CREDITS b/vendor/php-amqplib/php-amqplib/CREDITS new file mode 100644 index 0000000000..d043f38646 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/CREDITS @@ -0,0 +1,10 @@ + +Following people contributed to this project: + +Barry Pederson - author of original Python lib +Vadim Zaliva - PHP paort +taavi013@gmail.com patches - patches +Sean Murphy http://code.google.com/u/sgmurphy/ - patches +spiderbill http://code.google.com/u/spiderbill/ - patches + + diff --git a/vendor/php-amqplib/php-amqplib/LICENSE b/vendor/php-amqplib/php-amqplib/LICENSE new file mode 100644 index 0000000000..3b473dbfc0 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/LICENSE @@ -0,0 +1,458 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS diff --git a/vendor/php-amqplib/php-amqplib/Makefile b/vendor/php-amqplib/php-amqplib/Makefile new file mode 100644 index 0000000000..d83d4ddf64 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/Makefile @@ -0,0 +1,12 @@ +test: + phpunit +.PHONY: benchmark +benchmark: + @echo "Publishing 4000 msgs with 1KB of content:" + php benchmark/producer.php 4000 + @echo "Consuming 4000:" + php benchmark/consumer.php + @echo "Stream produce 100:" + php benchmark/stream_tmp_produce.php 100 + @echo "Socket produce 100:" + php benchmark/socket_tmp_produce.php 100 \ No newline at end of file diff --git a/vendor/php-amqplib/php-amqplib/NOTE.DEVELOPMENT.NOV.2011.md b/vendor/php-amqplib/php-amqplib/NOTE.DEVELOPMENT.NOV.2011.md new file mode 100644 index 0000000000..a9519a7c17 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/NOTE.DEVELOPMENT.NOV.2011.md @@ -0,0 +1,7 @@ +## BC BREAKING CHANGES ## + +As of November 2011 I retook the development of this library therefore I __tagged__ the __previous version__ of the library [here](https://github.com/videlalvaro/php-amqplib/tarball/v1.0). If you are looking for the old library then use the code on that tag. + +If you are going to use it in a new project I advice that you use the current master branch. There are many performance improvements in that branch and I'm adding more and more tests to it. + +Besides that the library has been refactored to use PHP 5.3 `namespaces`. The classes have been split into their separate files and so on. The idea is to make the library easier to test. diff --git a/vendor/php-amqplib/php-amqplib/NOTE.THENETCIRCLE.md b/vendor/php-amqplib/php-amqplib/NOTE.THENETCIRCLE.md new file mode 100644 index 0000000000..0dde4685de --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/NOTE.THENETCIRCLE.md @@ -0,0 +1,9 @@ +## NOTE ## + +This library is a fork of the [php-amqplib](http://code.google.com/p/php-amqplib/) library. + +At The Netcircle we modified that library in order to work with PHP 5.3 Strict. + +Also we improved the debug method to increase performance. + +We use it daily in prod for sending/consuming 600K + messages per day. diff --git a/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Channel/AMQPChannel.php b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Channel/AMQPChannel.php new file mode 100644 index 0000000000..e5243194c0 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Channel/AMQPChannel.php @@ -0,0 +1,785 @@ +get_free_channel_id(); + } + + parent::__construct($connection, $channel_id); + + if ($this->debug) { + MiscHelper::debug_msg("using channel_id: " . $channel_id); + } + + $this->default_ticket = 0; + $this->is_open = false; + $this->active = true; // Flow control + $this->alerts = array(); + $this->callbacks = array(); + $this->auto_decode = $auto_decode; + + $this->x_open(); + } + + public function __destruct() + { + //TODO:???if($this->connection) + // $this->close("destroying channel"); + } + + /** + * Tear down this object, after we've agreed to close with the server. + */ + protected function do_close() + { + $this->is_open = false; + unset($this->connection->channels[$this->channel_id]); + $this->channel_id = $this->connection = null; + } + + /** + * Only for AMQP0.8.0 + * This method allows the server to send a non-fatal warning to + * the client. This is used for methods that are normally + * asynchronous and thus do not have confirmations, and for which + * the server may detect errors that need to be reported. Fatal + * errors are handled as channel or connection exceptions; non- + * fatal errors are sent through this method. + */ + protected function channel_alert($args) + { + $reply_code = $args->read_short(); + $reply_text = $args->read_shortstr(); + $details = $args->read_table(); + + array_push($this->alerts,array($reply_code, $reply_text, $details)); + } + + /** + * request a channel close + */ + public function close($reply_code=0, + $reply_text="", + $method_sig=array(0, 0)) + { + list($class_id, $method_id, $args) = $this->protocolWriter->channelClose( + $reply_code, + $reply_text, + $method_sig[0], + $method_sig[1] + ); + + $this->send_method_frame(array($class_id, $method_id), $args); + + return $this->wait(array( + $this->waitHelper->get_wait('channel.close_ok') + )); + } + + + protected function channel_close($args) + { + $reply_code = $args->read_short(); + $reply_text = $args->read_shortstr(); + $class_id = $args->read_short(); + $method_id = $args->read_short(); + + $this->send_method_frame(array(20, 41)); + $this->do_close(); + + throw new AMQPProtocolChannelException($reply_code, $reply_text, + array($class_id, $method_id)); + } + + /** + * confirm a channel close + */ + protected function channel_close_ok($args) + { + $this->do_close(); + } + + /** + * enable/disable flow from peer + */ + public function flow($active) + { + list($class_id, $method_id, $args) = $this->protocolWriter->channelFlow($active); + $this->send_method_frame(array($class_id, $method_id), $args); + + return $this->wait(array( + $this->waitHelper->get_wait('channel.flow_ok') + )); + } + + protected function channel_flow($args) + { + $this->active = $args->read_bit(); + $this->x_flow_ok($this->active); + } + + protected function x_flow_ok($active) + { + list($class_id, $method_id, $args) = $this->protocolWriter->channelFlow($active); + $this->send_method_frame(array($class_id, $method_id), $args); + } + + protected function channel_flow_ok($args) + { + return $args->read_bit(); + } + + protected function x_open($out_of_band="") + { + if ($this->is_open) { + return; + } + + list($class_id, $method_id, $args) = $this->protocolWriter->channelOpen($out_of_band); + $this->send_method_frame(array($class_id, $method_id), $args); + + return $this->wait(array( + $this->waitHelper->get_wait('channel.open_ok') + )); + } + + protected function channel_open_ok($args) + { + $this->is_open = true; + if ($this->debug) { + MiscHelper::debug_msg("Channel open"); + } + } + + /** + * request an access ticket + */ + public function access_request($realm, $exclusive=false, + $passive=false, $active=false, $write=false, $read=false) + { + list($class_id, $method_id, $args) = $this->protocolWriter->accessRequest($realm, $exclusive, + $passive, $active, + $write, $read); + $this->send_method_frame(array($class_id, $method_id), $args); + + return $this->wait(array( + $this->waitHelper->get_wait('access.request_ok') + )); + } + + /** + * grant access to server resources + */ + protected function access_request_ok($args) + { + $this->default_ticket = $args->read_short(); + + return $this->default_ticket; + } + + + /** + * declare exchange, create if needed + */ + public function exchange_declare($exchange, + $type, + $passive=false, + $durable=false, + $auto_delete=true, + $internal=false, + $nowait=false, + $arguments=null, + $ticket=null) + { + + $arguments = $this->getArguments($arguments); + $ticket = $this->getTicket($ticket); + + list($class_id, $method_id, $args) = + $this->protocolWriter->exchangeDeclare( + $ticket, $exchange, $type, $passive, $durable, + $auto_delete, $internal, $nowait, $arguments + ); + + $this->send_method_frame(array($class_id, $method_id), $args); + + if (!$nowait) { + return $this->wait(array( + $this->waitHelper->get_wait('exchange.declare_ok') + )); + } + + } + + /** + * confirms an exchange declaration + */ + protected function exchange_declare_ok($args) + { + } + + /** + * delete an exchange + */ + public function exchange_delete($exchange, $if_unused=false, + $nowait=false, $ticket=null) + { + $ticket = $this->getTicket($ticket); + list($class_id, $method_id, $args) = $this->protocolWriter->exchangeDelete($ticket, $exchange, $if_unused, $nowait); + $this->send_method_frame(array($class_id, $method_id), $args); + + if (!$nowait) { + return $this->wait(array( + $this->waitHelper->get_wait('exchange.delete_ok') + )); + } + } + + /** + * confirm deletion of an exchange + */ + protected function exchange_delete_ok($args) + { + } + + /** + * bind dest exchange to source exchange + */ + public function exchange_bind($destination, $source, $routing_key="", + $nowait=false, $arguments=null, $ticket=null) + { + $arguments = $this->getArguments($arguments); + $ticket = $this->getTicket($ticket); + + list($class_id, $method_id, $args) = $this->protocolWriter->exchangeBind($ticket, $destination, $source, $routing_key, $nowait, $arguments); + + $this->send_method_frame(array($class_id, $method_id), $args); + + if (!$nowait) { + return $this->wait(array( + $this->waitHelper->get_wait('exchange.bind_ok') + )); + } + } + + /** + * confirm bind successful + */ + protected function exchange_bind_ok($args) + { + } + + /** + * unbind dest exchange from source exchange + */ + public function exchange_unbind($source, $destination, $routing_key="", + $arguments=null, $ticket=null) + { + $arguments = $this->getArguments($arguments); + $ticket = $this->getTicket($ticket); + + list($class_id, $method_id, $args) = $this->protocolWriter->exchangeUnbind($ticket, $source, $destination, $routing_key, $arguments); + + $this->send_method_frame(array($class_id, $method_id), $args); + + return $this->wait(array( + $this->waitHelper->get_wait('exchange.unbind_ok') + )); + } + + /** + * confirm unbind successful + */ + protected function exchange_unbind_ok($args) + { + } + + + /** + * bind queue to an exchange + */ + public function queue_bind($queue, $exchange, $routing_key="", + $nowait=false, $arguments=null, $ticket=null) + { + $arguments = $this->getArguments($arguments); + $ticket = $this->getTicket($ticket); + + list($class_id, $method_id, $args) = $this->protocolWriter->queueBind($ticket, $queue, $exchange, $routing_key, $nowait, $arguments); + + $this->send_method_frame(array($class_id, $method_id), $args); + + if (!$nowait) { + return $this->wait(array( + $this->waitHelper->get_wait('queue.bind_ok') + )); + } + } + + /** + * confirm bind successful + */ + protected function queue_bind_ok($args) + { + } + + /** + * unbind queue from an exchange + */ + public function queue_unbind($queue, $exchange, $routing_key="", + $arguments=null, $ticket=null) + { + $arguments = $this->getArguments($arguments); + $ticket = $this->getTicket($ticket); + + list($class_id, $method_id, $args) = $this->protocolWriter->queueUnbind($ticket, $queue, $exchange, $routing_key, $arguments); + + $this->send_method_frame(array($class_id, $method_id), $args); + + return $this->wait(array( + $this->waitHelper->get_wait('queue.unbind_ok') + )); + } + + /** + * confirm unbind successful + */ + protected function queue_unbind_ok($args) + { + } + + /** + * declare queue, create if needed + */ + public function queue_declare($queue="", + $passive=false, + $durable=false, + $exclusive=false, + $auto_delete=true, + $nowait=false, + $arguments=null, + $ticket=null) + { + $arguments = $this->getArguments($arguments); + $ticket = $this->getTicket($ticket); + + list($class_id, $method_id, $args) = + $this->protocolWriter->queueDeclare( + $ticket, $queue, $passive, $durable, $exclusive, + $auto_delete, $nowait, $arguments + ); + $this->send_method_frame(array($class_id, $method_id), $args); + + if (!$nowait) { + return $this->wait(array( + $this->waitHelper->get_wait('queue.declare_ok') + )); + } + } + + /** + * confirms a queue definition + */ + protected function queue_declare_ok($args) + { + $queue = $args->read_shortstr(); + $message_count = $args->read_long(); + $consumer_count = $args->read_long(); + + return array($queue, $message_count, $consumer_count); + } + + /** + * delete a queue + */ + public function queue_delete($queue="", $if_unused=false, $if_empty=false, + $nowait=false, $ticket=null) + { + $ticket = $this->getTicket($ticket); + + list($class_id, $method_id, $args) = $this->protocolWriter->queueDelete($ticket, $queue, $if_unused, $if_empty, $nowait); + + $this->send_method_frame(array($class_id, $method_id), $args); + + if (!$nowait) { + return $this->wait(array( + $this->waitHelper->get_wait('queue.delete_ok') + )); + } + } + + /** + * confirm deletion of a queue + */ + protected function queue_delete_ok($args) + { + return $args->read_long(); + } + + /** + * purge a queue + */ + public function queue_purge($queue="", $nowait=false, $ticket=null) + { + $ticket = $this->getTicket($ticket); + list($class_id, $method_id, $args) = $this->protocolWriter->queuePurge($ticket, $queue, $nowait); + + $this->send_method_frame(array($class_id, $method_id), $args); + + if (!$nowait) { + return $this->wait(array( + $this->waitHelper->get_wait('queue.purge_ok') + )); + } + } + + /** + * confirms a queue purge + */ + protected function queue_purge_ok($args) + { + return $args->read_long(); + } + + /** + * acknowledge one or more messages + */ + public function basic_ack($delivery_tag, $multiple=false) + { + list($class_id, $method_id, $args) = $this->protocolWriter->basicAck($delivery_tag, $multiple); + $this->send_method_frame(array($class_id, $method_id), $args); + } + + /** + * reject one or several received messages. + */ + public function basic_nack($delivery_tag, $multiple=false, $requeue=false) + { + list($class_id, $method_id, $args) = $this->protocolWriter->basicNack($delivery_tag, $multiple, $requeue); + $this->send_method_frame(array($class_id, $method_id), $args); + } + + /** + * end a queue consumer + */ + public function basic_cancel($consumer_tag, $nowait=false) + { + list($class_id, $method_id, $args) = $this->protocolWriter->basicCancel($consumer_tag, $nowait); + $this->send_method_frame(array($class_id, $method_id), $args); + + return $this->wait(array( + $this->waitHelper->get_wait('basic.cancel_ok') + )); + } + + /** + * confirm a cancelled consumer + */ + protected function basic_cancel_ok($args) + { + $consumer_tag = $args->read_shortstr(); + unset($this->callbacks[$consumer_tag]); + } + + /** + * start a queue consumer + */ + public function basic_consume($queue="", $consumer_tag="", $no_local=false, + $no_ack=false, $exclusive=false, $nowait=false, + $callback=null, $ticket=null) + { + $ticket = $this->getTicket($ticket); + list($class_id, $method_id, $args) = + $this->protocolWriter->basicConsume( + $ticket, $queue, $consumer_tag, $no_local, + $no_ack, $exclusive, $nowait + ); + + $this->send_method_frame(array($class_id, $method_id), $args); + + if (!$nowait) { + $consumer_tag = $this->wait(array( + $this->waitHelper->get_wait('basic.consume_ok') + )); + } + + $this->callbacks[$consumer_tag] = $callback; + + return $consumer_tag; + } + + /** + * confirm a new consumer + */ + protected function basic_consume_ok($args) + { + return $args->read_shortstr(); + } + + /** + * notify the client of a consumer message + */ + protected function basic_deliver($args, $msg) + { + $consumer_tag = $args->read_shortstr(); + $delivery_tag = $args->read_longlong(); + $redelivered = $args->read_bit(); + $exchange = $args->read_shortstr(); + $routing_key = $args->read_shortstr(); + + $msg->delivery_info = array( + "channel" => $this, + "consumer_tag" => $consumer_tag, + "delivery_tag" => $delivery_tag, + "redelivered" => $redelivered, + "exchange" => $exchange, + "routing_key" => $routing_key + ); + + if (isset($this->callbacks[$consumer_tag])) { + $func = $this->callbacks[$consumer_tag]; + } else { + $func = null; + } + + if ($func != null) { + call_user_func($func, $msg); + } + } + + /** + * direct access to a queue + */ + public function basic_get($queue="", $no_ack=false, $ticket=null) + { + $ticket = $this->getTicket($ticket); + list($class_id, $method_id, $args) = $this->protocolWriter->basicGet($ticket, $queue, $no_ack); + + $this->send_method_frame(array($class_id, $method_id), $args); + + return $this->wait(array( + $this->waitHelper->get_wait('basic.get_ok'), + $this->waitHelper->get_wait('basic.get_empty') + )); + } + + /** + * indicate no messages available + */ + protected function basic_get_empty($args) + { + $cluster_id = $args->read_shortstr(); + } + + /** + * provide client with a message + */ + protected function basic_get_ok($args, $msg) + { + $delivery_tag = $args->read_longlong(); + $redelivered = $args->read_bit(); + $exchange = $args->read_shortstr(); + $routing_key = $args->read_shortstr(); + $message_count = $args->read_long(); + + $msg->delivery_info = array( + "delivery_tag" => $delivery_tag, + "redelivered" => $redelivered, + "exchange" => $exchange, + "routing_key" => $routing_key, + "message_count" => $message_count + ); + + return $msg; + } + + /** + * publish a message + */ + public function basic_publish($msg, $exchange="", $routing_key="", + $mandatory=false, $immediate=false, + $ticket=null) + { + $ticket = $this->getTicket($ticket); + list($class_id, $method_id, $args) = + $this->protocolWriter->basicPublish($ticket, $exchange, $routing_key, $mandatory, $immediate); + + $this->send_method_frame(array($class_id, $method_id), $args); + + $this->connection->send_content($this->channel_id, 60, 0, + strlen($msg->body), + $msg->serialize_properties(), + $msg->body); + } + + /** + * specify quality of service + */ + public function basic_qos($prefetch_size, $prefetch_count, $a_global) + { + list($class_id, $method_id, $args) = $this->protocolWriter->basicQos($prefetch_size, $prefetch_count, $a_global); + $this->send_method_frame(array($class_id, $method_id), $args); + + return $this->wait(array( + $this->waitHelper->get_wait('basic.qos_ok') + )); + } + + /** + * confirm the requested qos + */ + protected function basic_qos_ok($args) + { + } + + /** + * redeliver unacknowledged messages + */ + public function basic_recover($requeue=false) + { + list($class_id, $method_id, $args) = $this->protocolWriter->basicRecover($requeue); + $this->send_method_frame(array($class_id, $method_id), $args); + + return $this->wait(array( + $this->waitHelper->get_wait('basic.recover_ok') + )); + } + + /** + * confirm the requested recover + */ + protected function basic_recover_ok($args) + { + } + + /** + * reject an incoming message + */ + public function basic_reject($delivery_tag, $requeue) + { + list($class_id, $method_id, $args) = $this->protocolWriter->basicReject($delivery_tag, $requeue); + $this->send_method_frame(array($class_id, $method_id), $args); + } + + /** + * return a failed message + */ + protected function basic_return($args, $msg) + { + $reply_code = $args->read_short(); + $reply_text = $args->read_shortstr(); + $exchange = $args->read_shortstr(); + $routing_key = $args->read_shortstr(); + + if ( !is_null($this->basic_return_callback )) { + call_user_func_array($this->basic_return_callback, array( + $reply_code, + $reply_text, + $exchange, + $routing_key, + $msg, + )); + } elseif ($this->debug) { + MiscHelper::debug_msg("Skipping unhandled basic_return message"); + } + } + public function tx_commit() + { + $this->send_method_frame(array(90, 20)); + + return $this->wait(array( + $this->waitHelper->get_wait('tx.commit_ok') + )); + } + + /** + * confirm a successful commit + */ + protected function tx_commit_ok($args) + { + } + + /** + * abandon the current transaction + */ + public function tx_rollback() + { + $this->send_method_frame(array(90, 30)); + + return $this->wait(array( + $this->waitHelper->get_wait('tx.rollback_ok') + )); + } + + /** + * confirm a successful rollback + */ + protected function tx_rollback_ok($args) + { + } + + /** + * select standard transaction mode + */ + public function tx_select() + { + $this->send_method_frame(array(90, 10)); + + return $this->wait(array( + $this->waitHelper->get_wait('tx.select_ok') + )); + } + + /** + * confirm transaction mode + */ + protected function tx_select_ok($args) + { + } + + protected function getArguments($arguments) + { + return (null === $arguments) ? array() : $arguments; + } + + protected function getTicket($ticket) + { + return (null === $ticket) ? $this->default_ticket : $ticket; + } + /** + * set callback for basic_return + * @param callable $callback + * @throws \InvalidArgumentException if $callback is not callable + */ + public function set_return_listener($callback) + { + if (!is_callable($callback)) { + throw new \InvalidArgumentException("$callback should be callable."); + } + $this->basic_return_callback = $callback; + } +} diff --git a/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Channel/AbstractChannel.php b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Channel/AbstractChannel.php new file mode 100644 index 0000000000..24418bd462 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Channel/AbstractChannel.php @@ -0,0 +1,252 @@ +connection = $connection; + $this->channel_id = $channel_id; + $connection->channels[$channel_id] = $this; + $this->frame_queue = array(); // Lower level queue for frames + $this->method_queue = array(); // Higher level queue for methods + $this->auto_decode = false; + $this->debug = defined('AMQP_DEBUG') ? AMQP_DEBUG : false; + + $this->protocolVersion = defined('AMQP_PROTOCOL') ? AMQP_PROTOCOL : '0.9.1'; + switch ($this->protocolVersion) { + case '0.9.1': + self::$PROTOCOL_CONSTANTS_CLASS = 'PhpAmqpLib\Wire\Constants091'; + $c = self::$PROTOCOL_CONSTANTS_CLASS; + $this->amqp_protocol_header = $c::$AMQP_PROTOCOL_HEADER; + $this->protocolWriter = new Protocol091(); + $this->waitHelper = new Wait091(); + $this->methodMap = new MethodMap091(); + break; + case '0.8': + self::$PROTOCOL_CONSTANTS_CLASS = 'PhpAmqpLib\Wire\Constants080'; + $c = self::$PROTOCOL_CONSTANTS_CLASS; + $this->amqp_protocol_header = $c::$AMQP_PROTOCOL_HEADER; + $this->protocolWriter = new Protocol080(); + $this->waitHelper = new Wait080(); + $this->methodMap = new MethodMap080(); + break; + default: + throw new AMQPRuntimeException('Protocol: ' . $this->protocolVersion . ' not implemented.'); + } + } + + public function getChannelId() + { + return $this->channel_id; + } + + public function dispatch($method_sig, $args, $content) + { + if (!$this->methodMap->valid_method($method_sig)) { + throw new AMQPRuntimeException("Unknown AMQP method $method_sig"); + } + + $amqp_method = $this->methodMap->get_method($method_sig); + + if (!method_exists($this, $amqp_method)) { + throw new AMQPRuntimeException("Method: $amqp_method not implemented by class: " . get_class($this)); + } + + if ($content == null) { + return call_user_func(array($this, $amqp_method), $args); + } + + return call_user_func(array($this, $amqp_method), $args, $content); + } + + public function next_frame($timeout = 0) + { + if ($this->debug) { + MiscHelper::debug_msg("waiting for a new frame"); + } + + if (!empty($this->frame_queue)) { + return array_shift($this->frame_queue); + } + + return $this->connection->wait_channel($this->channel_id, $timeout); + } + + protected function send_method_frame($method_sig, $args="") + { + $this->connection->send_channel_method_frame($this->channel_id, $method_sig, $args); + } + + public function wait_content() + { + $frm = $this->next_frame(); + $frame_type = $frm[0]; + $payload = $frm[1]; + + if ($frame_type != 2) { + throw new AMQPRuntimeException("Expecting Content header"); + } + + $payload_reader = new AMQPReader(substr($payload,0,12)); + $class_id = $payload_reader->read_short(); + $weight = $payload_reader->read_short(); + + $body_size = $payload_reader->read_longlong(); + $msg = new AMQPMessage(); + $msg->load_properties(substr($payload,12)); + + $body_parts = array(); + $body_received = 0; + while (bccomp($body_size,$body_received) == 1) { + $frm = $this->next_frame(); + $frame_type = $frm[0]; + $payload = $frm[1]; + + if ($frame_type != 3) { + $PROTOCOL_CONSTANTS_CLASS = self::$PROTOCOL_CONSTANTS_CLASS; + throw new AMQPRuntimeException("Expecting Content body, received frame type $frame_type (" + .$PROTOCOL_CONSTANTS_CLASS::$FRAME_TYPES[$frame_type].")"); + } + + $body_parts[] = $payload; + $body_received = bcadd($body_received, strlen($payload)); + } + + $msg->body = implode("",$body_parts); + + if ($this->auto_decode && isset($msg->content_encoding)) { + try { + $msg->body = $msg->body->decode($msg->content_encoding); + } catch (\Exception $e) { + if ($this->debug) { + MiscHelper::debug_msg("Ignoring body decoding exception: " . $e->getMessage()); + } + } + } + + return $msg; + } + + /** + * Wait for some expected AMQP methods and dispatch to them. + * Unexpected methods are queued up for later calls to this PHP + * method. + */ + public function wait($allowed_methods=null, $non_blocking = false, $timeout = 0) + { + $PROTOCOL_CONSTANTS_CLASS = self::$PROTOCOL_CONSTANTS_CLASS; + + if ($allowed_methods && $this->debug) { + MiscHelper::debug_msg("waiting for " . implode(", ", $allowed_methods)); + } elseif ($this->debug) { + MiscHelper::debug_msg("waiting for any method"); + } + + //Process deferred methods + foreach ($this->method_queue as $qk=>$queued_method) { + if ($this->debug) { + MiscHelper::debug_msg("checking queue method " . $qk); + } + + $method_sig = $queued_method[0]; + if ($allowed_methods==null || in_array($method_sig, $allowed_methods)) { + unset($this->method_queue[$qk]); + + if ($this->debug) { + MiscHelper::debug_msg("Executing queued method: $method_sig: " . + $PROTOCOL_CONSTANTS_CLASS::$GLOBAL_METHOD_NAMES[MiscHelper::methodSig($method_sig)]); + } + + return $this->dispatch($queued_method[0], + $queued_method[1], + $queued_method[2]); + } + } + + // No deferred methods? wait for new ones + while (true) { + $frm = $this->next_frame($timeout); + $frame_type = $frm[0]; + $payload = $frm[1]; + + if ($frame_type != 1) { + throw new AMQPRuntimeException("Expecting AMQP method, received frame type: $frame_type (" + .$PROTOCOL_CONSTANTS_CLASS::$FRAME_TYPES[$frame_type].")"); + } + + if (strlen($payload) < 4) { + throw new AMQPOutOfBoundsException("Method frame too short"); + } + + $method_sig_array = unpack("n2", substr($payload,0,4)); + $method_sig = "" . $method_sig_array[1] . "," . $method_sig_array[2]; + $args = new AMQPReader(substr($payload,4)); + + if ($this->debug) { + MiscHelper::debug_msg("> $method_sig: " . $PROTOCOL_CONSTANTS_CLASS::$GLOBAL_METHOD_NAMES[MiscHelper::methodSig($method_sig)]); + } + + if (in_array($method_sig, $PROTOCOL_CONSTANTS_CLASS::$CONTENT_METHODS)) { + $content = $this->wait_content(); + } else { + $content = null; + } + + if ($allowed_methods == null || + in_array($method_sig,$allowed_methods) || + in_array($method_sig, $PROTOCOL_CONSTANTS_CLASS::$CLOSE_METHODS) + ) { + return $this->dispatch($method_sig, $args, $content); + } + + // Wasn't what we were looking for? save it for later + if ($this->debug) { + MiscHelper::debug_msg("Queueing for later: $method_sig: " . $PROTOCOL_CONSTANTS_CLASS::$GLOBAL_METHOD_NAMES[MiscHelper::methodSig($method_sig)]); + } + $this->method_queue[] = array($method_sig, $args, $content); + + if ($non_blocking) { + break; + }; + } + } +} diff --git a/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AMQPConnection.php b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AMQPConnection.php new file mode 100644 index 0000000000..bba299a807 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AMQPConnection.php @@ -0,0 +1,8 @@ +create_ssl_context($ssl_options); + + parent::__construct($host, $port, $user, $password, $vhost, + isset($options['insist']) ? $options['insist'] : false, + isset($options['login_method']) ? $options['login_method'] : "AMQPLAIN", + isset($options['login_response']) ? $options['login_response'] : null, + isset($options['locale']) ? $options['locale'] : "en_US", + isset($options['connection_timeout']) ? $options['connection_timeout'] : 3, + isset($options['read_write_timeout']) ? $options['read_write_timeout'] : 3, + $ssl_context); + } + + private function create_ssl_context($options) + { + $ssl_context = stream_context_create(); + foreach ($options as $k => $v) { + stream_context_set_option($ssl_context, 'ssl', $k, $v); + } + + return $ssl_context; + } +} diff --git a/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AMQPSocketConnection.php b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AMQPSocketConnection.php new file mode 100644 index 0000000000..7ac512e53a --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AMQPSocketConnection.php @@ -0,0 +1,21 @@ +sock = $io->get_socket(); + + parent::__construct($user, $password, $vhost, $insist, $login_method, $login_response, $locale, $io); + } + + /** + * get socket from current connection + * + * @deprecated + */ + public function getSocket() + { + return $this->sock; + } + +} diff --git a/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AbstractConnection.php b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AbstractConnection.php new file mode 100644 index 0000000000..57ff43d826 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AbstractConnection.php @@ -0,0 +1,512 @@ + array('S', "PHP AMQP Lib"), + "library_version" => array('S', "2.0") + ); + + /** + * contructor parameters for clone + * @var array + */ + protected $construct_params; + /** + * close the connection in destructur + * @var bool + */ + protected $close_on_destruct = true ; + + protected $io = null; + + public function __construct($user, $password, + $vhost="/",$insist=false, + $login_method="AMQPLAIN", + $login_response=null, + $locale="en_US", + AbstractIO $io) + { + $this->construct_params = func_get_args(); + + if ($user && $password) { + $login_response = new AMQPWriter(); + $login_response->write_table(array("LOGIN" => array('S',$user), + "PASSWORD" => array('S',$password))); + $login_response = substr($login_response->getvalue(),4); //Skip the length + } else { + $login_response = null; + } + + $d = self::$LIBRARY_PROPERTIES; + while (true) { + $this->channels = array(); + // The connection object itself is treated as channel 0 + parent::__construct($this, 0); + + $this->channel_max = 65535; + $this->frame_max = 131072; + + $this->io = $io; + $this->input = new AMQPReader(null, $this->io); + + $this->write($this->amqp_protocol_header); + $this->wait(array($this->waitHelper->get_wait('connection.start'))); + $this->x_start_ok($d, $login_method, $login_response, $locale); + + $this->wait_tune_ok = true; + while ($this->wait_tune_ok) { + $this->wait(array( + $this->waitHelper->get_wait('connection.secure'), + $this->waitHelper->get_wait('connection.tune') + )); + } + + $host = $this->x_open($vhost,"", $insist); + if (!$host) { + return; // we weren't redirected + } + + // we were redirected, close the socket, loop and try again + $this->close_socket(); + } + } + /** + * clossing will use the old properties to make a new connection to the same server + */ + public function __clone() + { + call_user_func_array(array($this, '__construct'), $this->construct_params); + } + + public function __destruct() + { + if ($this->close_on_destruct) { + if (isset($this->input) && $this->input) { + // close() always tries to connect to the server to shutdown + // the connection. If the server has gone away, it will + // throw an error in the connection class, so catch it + // and shutdown quietly + try { + $this->close(); + } catch (\Exception $e) { } + } + } + } + + public function select($sec, $usec = 0) + { + return $this->io->select($sec, $usec); + } + + /** + * allows to not close the connection + * it`s useful after the fork when you don`t want to close parent process connection + * @param bool $close + */ + public function set_close_on_destruct($close = true) + { + $this->close_on_destruct = (bool) $close; + } + + protected function close_socket() + { + if ($this->debug) { + MiscHelper::debug_msg("closing socket"); + } + + $this->io->close(); + } + + protected function write($data) + { + if ($this->debug) { + MiscHelper::debug_msg("< [hex]:\n" . MiscHelper::hexdump($data, $htmloutput = false, $uppercase = true, $return = true)); + } + + $this->io->write($data); + } + + protected function do_close() + { + if (isset($this->input) && $this->input) { + $this->input->close(); + $this->input = null; + } + + $this->close_socket(); + } + + public function get_free_channel_id() + { + for ($i=1; $i <= $this->channel_max; $i++) { + if (!isset($this->channels[$i])) { + return $i; + } + } + + throw new AMQPRuntimeException("No free channel ids"); + } + + public function send_content($channel, $class_id, $weight, $body_size, + $packed_properties, $body) + { + $pkt = new AMQPWriter(); + + $pkt->write_octet(2); + $pkt->write_short($channel); + $pkt->write_long(strlen($packed_properties)+12); + + $pkt->write_short($class_id); + $pkt->write_short($weight); + $pkt->write_longlong($body_size); + $pkt->write($packed_properties); + + $pkt->write_octet(0xCE); + $pkt = $pkt->getvalue(); + $this->write($pkt); + + while ($body) { + $payload = substr($body,0, $this->frame_max-8); + $body = substr($body,$this->frame_max-8); + $pkt = new AMQPWriter(); + + $pkt->write_octet(3); + $pkt->write_short($channel); + $pkt->write_long(strlen($payload)); + + $pkt->write($payload); + + $pkt->write_octet(0xCE); + $pkt = $pkt->getvalue(); + $this->write($pkt); + } + } + + protected function send_channel_method_frame($channel, $method_sig, $args="") + { + if ($args instanceof AMQPWriter) { + $args = $args->getvalue(); + } + + $pkt = new AMQPWriter(); + + $pkt->write_octet(1); + $pkt->write_short($channel); + $pkt->write_long(strlen($args)+4); // 4 = length of class_id and method_id + // in payload + + $pkt->write_short($method_sig[0]); // class_id + $pkt->write_short($method_sig[1]); // method_id + $pkt->write($args); + + $pkt->write_octet(0xCE); + $pkt = $pkt->getvalue(); + $this->write($pkt); + + if ($this->debug) { + $PROTOCOL_CONSTANTS_CLASS = self::$PROTOCOL_CONSTANTS_CLASS; + MiscHelper::debug_msg("< " . MiscHelper::methodSig($method_sig) . ": " . + $PROTOCOL_CONSTANTS_CLASS::$GLOBAL_METHOD_NAMES[MiscHelper::methodSig($method_sig)]); + } + + } + + /** + * Wait for a frame from the server + */ + protected function wait_frame($timeout = 0) + { + $currentTimeout = $this->input->getTimeout(); + $this->input->setTimeout($timeout); + + try { + $frame_type = $this->input->read_octet(); + $channel = $this->input->read_short(); + $size = $this->input->read_long(); + $payload = $this->input->read($size); + + $ch = $this->input->read_octet(); + } catch(AMQPTimeoutException $e) { + $this->input->setTimeout($currentTimeout); + + throw $e; + } + + $this->input->setTimeout($currentTimeout); + + if ($ch != 0xCE) { + throw new AMQPRuntimeException(sprintf("Framing error, unexpected byte: %x", $ch)); + } + + return array($frame_type, $channel, $payload); + } + + /** + * Wait for a frame from the server destined for + * a particular channel. + */ + protected function wait_channel($channel_id, $timeout = 0) + { + while (true) { + list($frame_type, $frame_channel, $payload) = $this->wait_frame($timeout); + if ($frame_channel == $channel_id) { + return array($frame_type, $payload); + } + + // Not the channel we were looking for. Queue this frame + //for later, when the other channel is looking for frames. + array_push($this->channels[$frame_channel]->frame_queue, + array($frame_type, $payload)); + + // If we just queued up a method for channel 0 (the Connection + // itself) it's probably a close method in reaction to some + // error, so deal with it right away. + if (($frame_type == 1) && ($frame_channel == 0)) { + $this->wait(); + } + } + } + + /** + * Fetch a Channel object identified by the numeric channel_id, or + * create that object if it doesn't already exist. + */ + public function channel($channel_id = null) + { + if (isset($this->channels[$channel_id])) { + return $this->channels[$channel_id]; + } else { + $channel_id = $channel_id ? $channel_id : $this->get_free_channel_id(); + $ch = new AMQPChannel($this->connection, $channel_id); + $this->channels[$channel_id] = $ch; + + return $ch; + } + } + + /** + * request a connection close + */ + public function close($reply_code=0, $reply_text="", $method_sig=array(0, 0)) + { + list($class_id, $method_id, $args) = $this->protocolWriter->connectionClose( + $reply_code, + $reply_text, + $method_sig[0], + $method_sig[1] + ); + $this->send_method_frame(array($class_id, $method_id), $args); + + return $this->wait(array( + $this->waitHelper->get_wait('connection.close_ok') + )); + } + + public static function dump_table($table) + { + $tokens = array(); + foreach ($table as $name => $value) { + switch ($value[0]) { + case 'D': + $val = $value[1]->n . 'E' . $value[1]->e; + break; + case 'F': + $val = '(' . self::dump_table($value[1]) . ')'; + break; + case 'T': + $val = date('Y-m-d H:i:s', $value[1]); + break; + default: + $val = $value[1]; + } + $tokens[] = $name . '=' . $val; + } + + return implode(', ', $tokens); + + } + + protected function connection_close($args) + { + $reply_code = $args->read_short(); + $reply_text = $args->read_shortstr(); + $class_id = $args->read_short(); + $method_id = $args->read_short(); + + $this->x_close_ok(); + + throw new AMQPProtocolConnectionException($reply_code, $reply_text, array($class_id, $method_id)); + } + + + /** + * confirm a connection close + */ + protected function x_close_ok() + { + $this->send_method_frame(array(10, 61)); + $this->do_close(); + } + + /** + * confirm a connection close + */ + protected function connection_close_ok($args) + { + $this->do_close(); + } + + protected function x_open($virtual_host, $capabilities="", $insist=false) + { + $args = new AMQPWriter(); + $args->write_shortstr($virtual_host); + $args->write_shortstr($capabilities); + $args->write_bit($insist); + $this->send_method_frame(array(10, 40), $args); + + $wait = array( + $this->waitHelper->get_wait('connection.open_ok') + ); + + if ($this->protocolVersion == '0.8') { + $wait[] = $this->waitHelper->get_wait('connection.redirect'); + } + + return $this->wait($wait); + } + + + /** + * signal that the connection is ready + */ + protected function connection_open_ok($args) + { + $this->known_hosts = $args->read_shortstr(); + if ($this->debug) { + MiscHelper::debug_msg("Open OK! known_hosts: " . $this->known_hosts); + } + + return null; + } + + + /** + * asks the client to use a different server + */ + protected function connection_redirect($args) + { + $host = $args->read_shortstr(); + $this->known_hosts = $args->read_shortstr(); + if ($this->debug) { + MiscHelper::debug_msg("Redirected to [". $host . "], known_hosts [" . $this->known_hosts . "]" ); + } + + return $host; + } + + /** + * security mechanism challenge + */ + protected function connection_secure($args) + { + $challenge = $args->read_longstr(); + } + + /** + * security mechanism response + */ + protected function x_secure_ok($response) + { + $args = new AMQPWriter(); + $args->write_longstr($response); + $this->send_method_frame(array(10, 21), $args); + } + + /** + * start connection negotiation + */ + protected function connection_start($args) + { + $this->version_major = $args->read_octet(); + $this->version_minor = $args->read_octet(); + $this->server_properties = $args->read_table(); + $this->mechanisms = explode(" ", $args->read_longstr()); + $this->locales = explode(" ", $args->read_longstr()); + + if ($this->debug) { + MiscHelper::debug_msg(sprintf("Start from server, version: %d.%d, properties: %s, mechanisms: %s, locales: %s", + $this->version_major, + $this->version_minor, + self::dump_table($this->server_properties), + implode(', ', $this->mechanisms), + implode(', ', $this->locales))); + } + + } + + protected function x_start_ok($client_properties, $mechanism, $response, $locale) + { + $args = new AMQPWriter(); + $args->write_table($client_properties); + $args->write_shortstr($mechanism); + $args->write_longstr($response); + $args->write_shortstr($locale); + $this->send_method_frame(array(10, 11), $args); + } + + /** + * propose connection tuning parameters + */ + protected function connection_tune($args) + { + $v = $args->read_short(); + if ($v) { + $this->channel_max = $v; + } + + $v = $args->read_long(); + + if ($v) { + $this->frame_max = $v; + } + + $this->heartbeat = $args->read_short(); + + $this->x_tune_ok($this->channel_max, $this->frame_max, 0); + } + + /** + * negotiate connection tuning parameters + */ + protected function x_tune_ok($channel_max, $frame_max, $heartbeat) + { + $args = new AMQPWriter(); + $args->write_short($channel_max); + $args->write_long($frame_max); + $args->write_short($heartbeat); + $this->send_method_frame(array(10, 31), $args); + $this->wait_tune_ok = false; + } + + /** + * get socket from current connection + */ + public function getSocket() + { + return $this->sock; + } + +} diff --git a/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Exception/AMQPChannelException.php b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Exception/AMQPChannelException.php new file mode 100644 index 0000000000..161b37a5dc --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Exception/AMQPChannelException.php @@ -0,0 +1,12 @@ +amqp_reply_code = $reply_code; // redundant, but kept for BC + $this->amqp_reply_text = $reply_text; // redundant, but kept for BC + $this->amqp_method_sig = $method_sig; + + $ms = MiscHelper::methodSig($method_sig); + $PROTOCOL_CONSTANTS_CLASS = AbstractChannel::$PROTOCOL_CONSTANTS_CLASS; + $mn = isset($PROTOCOL_CONSTANTS_CLASS::$GLOBAL_METHOD_NAMES[$ms]) + ? $PROTOCOL_CONSTANTS_CLASS::$GLOBAL_METHOD_NAMES[$ms] + : $mn = ""; + + $this->args = array( + $reply_code, + $reply_text, + $method_sig, + $mn + ); + } +} diff --git a/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Exception/AMQPExceptionInterface.php b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Exception/AMQPExceptionInterface.php new file mode 100644 index 0000000000..fa9d193d3f --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Exception/AMQPExceptionInterface.php @@ -0,0 +1,7 @@ +amqp_reply_code = $reply_code; // redundant, but kept for BC + $this->amqp_reply_text = $reply_text; // redundant, but kept for BC + $this->amqp_method_sig = $method_sig; + + $ms = MiscHelper::methodSig($method_sig); + + $PROTOCOL_CONSTANTS_CLASS = AbstractChannel::$PROTOCOL_CONSTANTS_CLASS; + $mn = isset($PROTOCOL_CONSTANTS_CLASS::$GLOBAL_METHOD_NAMES[$ms]) + ? $PROTOCOL_CONSTANTS_CLASS::$GLOBAL_METHOD_NAMES[$ms] + : $mn = ""; + + $this->args = array( + $reply_code, + $reply_text, + $method_sig, + $mn + ); + } +} diff --git a/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Exception/AMQPRuntimeException.php b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Exception/AMQPRuntimeException.php new file mode 100644 index 0000000000..34f5b17ca0 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Exception/AMQPRuntimeException.php @@ -0,0 +1,7 @@ + + * @author Peter Waller + * @link http://aidanlister.com/repos/v/function.hexdump.php + * @param string $data The string to be dumped + * @param bool $htmloutput Set to false for non-HTML output + * @param bool $uppercase Set to true for uppercase hex + * @param bool $return Set to true to return the dump + */ + public static function hexdump($data, $htmloutput = true, $uppercase = false, $return = false) + { + // Init + $hexi = ''; + $ascii = ''; + $dump = ($htmloutput === true) ? '
            ' : '';
            +        $offset = 0;
            +        $len    = strlen($data);
            +
            +        // Upper or lower case hexidecimal
            +        $x = ($uppercase === false) ? 'x' : 'X';
            +
            +        // Iterate string
            +        for ($i = $j = 0; $i < $len; $i++) {
            +            // Convert to hexidecimal
            +            $hexi .= sprintf("%02$x ", ord($data[$i]));
            +
            +            // Replace non-viewable bytes with '.'
            +            if (ord($data[$i]) >= 32) {
            +                $ascii .= ($htmloutput === true) ?
            +                                htmlentities($data[$i]) :
            +                                $data[$i];
            +            } else {
            +                $ascii .= '.';
            +            }
            +
            +            // Add extra column spacing
            +            if ($j === 7) {
            +                $hexi  .= ' ';
            +                $ascii .= ' ';
            +            }
            +
            +            // Add row
            +            if (++$j === 16 || $i === $len - 1) {
            +                // Join the hexi / ascii output
            +                $dump .= sprintf("%04$x  %-49s  %s", $offset, $hexi, $ascii);
            +
            +                // Reset vars
            +                $hexi   = $ascii = '';
            +                $offset += 16;
            +                $j      = 0;
            +
            +                // Add newline
            +                if ($i !== $len - 1) {
            +                    $dump .= "\n";
            +                }
            +            }
            +        }
            +
            +        // Finish dump
            +        $dump .= $htmloutput === true ?
            +                    '
            ' : + ''; + $dump .= "\n"; + + // Output method + if ($return === false) { + echo $dump; + } else { + return $dump; + } + } +} diff --git a/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Helper/Protocol/MethodMap080.php b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Helper/Protocol/MethodMap080.php new file mode 100644 index 0000000000..f2661938b2 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Helper/Protocol/MethodMap080.php @@ -0,0 +1,111 @@ + 'connection_start', + '10,11' => 'connection_start_ok', + '10,20' => 'connection_secure', + '10,21' => 'connection_secure_ok', + '10,30' => 'connection_tune', + '10,31' => 'connection_tune_ok', + '10,40' => 'connection_open', + '10,41' => 'connection_open_ok', + '10,50' => 'connection_redirect', + '10,60' => 'connection_close', + '10,61' => 'connection_close_ok', + '20,10' => 'channel_open', + '20,11' => 'channel_open_ok', + '20,20' => 'channel_flow', + '20,21' => 'channel_flow_ok', + '20,30' => 'channel_alert', + '20,40' => 'channel_close', + '20,41' => 'channel_close_ok', + '30,10' => 'access_request', + '30,11' => 'access_request_ok', + '40,10' => 'exchange_declare', + '40,11' => 'exchange_declare_ok', + '40,20' => 'exchange_delete', + '40,21' => 'exchange_delete_ok', + '50,10' => 'queue_declare', + '50,11' => 'queue_declare_ok', + '50,20' => 'queue_bind', + '50,21' => 'queue_bind_ok', + '50,30' => 'queue_purge', + '50,31' => 'queue_purge_ok', + '50,40' => 'queue_delete', + '50,41' => 'queue_delete_ok', + '50,50' => 'queue_unbind', + '50,51' => 'queue_unbind_ok', + '60,10' => 'basic_qos', + '60,11' => 'basic_qos_ok', + '60,20' => 'basic_consume', + '60,21' => 'basic_consume_ok', + '60,30' => 'basic_cancel', + '60,31' => 'basic_cancel_ok', + '60,40' => 'basic_publish', + '60,50' => 'basic_return', + '60,60' => 'basic_deliver', + '60,70' => 'basic_get', + '60,71' => 'basic_get_ok', + '60,72' => 'basic_get_empty', + '60,80' => 'basic_ack', + '60,90' => 'basic_reject', + '60,100' => 'basic_recover_async', + '60,110' => 'basic_recover', + '60,111' => 'basic_recover_ok', + '70,10' => 'file_qos', + '70,11' => 'file_qos_ok', + '70,20' => 'file_consume', + '70,21' => 'file_consume_ok', + '70,30' => 'file_cancel', + '70,31' => 'file_cancel_ok', + '70,40' => 'file_open', + '70,41' => 'file_open_ok', + '70,50' => 'file_stage', + '70,60' => 'file_publish', + '70,70' => 'file_return', + '70,80' => 'file_deliver', + '70,90' => 'file_ack', + '70,100' => 'file_reject', + '80,10' => 'stream_qos', + '80,11' => 'stream_qos_ok', + '80,20' => 'stream_consume', + '80,21' => 'stream_consume_ok', + '80,30' => 'stream_cancel', + '80,31' => 'stream_cancel_ok', + '80,40' => 'stream_publish', + '80,50' => 'stream_return', + '80,60' => 'stream_deliver', + '90,10' => 'tx_select', + '90,11' => 'tx_select_ok', + '90,20' => 'tx_commit', + '90,21' => 'tx_commit_ok', + '90,30' => 'tx_rollback', + '90,31' => 'tx_rollback_ok', + '100,10' => 'dtx_select', + '100,11' => 'dtx_select_ok', + '100,20' => 'dtx_start', + '100,21' => 'dtx_start_ok', + '110,10' => 'tunnel_request', + '120,10' => 'test_integer', + '120,11' => 'test_integer_ok', + '120,20' => 'test_string', + '120,21' => 'test_string_ok', + '120,30' => 'test_table', + '120,31' => 'test_table_ok', + '120,40' => 'test_content', + '120,41' => 'test_content_ok', +); + + public function get_method($method_sig) { + return $this->method_map[$method_sig]; + } + public function valid_method($method_sig) { + return array_key_exists($method_sig, $this->method_map); + } +} diff --git a/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Helper/Protocol/MethodMap091.php b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Helper/Protocol/MethodMap091.php new file mode 100644 index 0000000000..d3fba7ed2e --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Helper/Protocol/MethodMap091.php @@ -0,0 +1,80 @@ + 'connection_start', + '10,11' => 'connection_start_ok', + '10,20' => 'connection_secure', + '10,21' => 'connection_secure_ok', + '10,30' => 'connection_tune', + '10,31' => 'connection_tune_ok', + '10,40' => 'connection_open', + '10,41' => 'connection_open_ok', + '10,50' => 'connection_close', + '10,51' => 'connection_close_ok', + '20,10' => 'channel_open', + '20,11' => 'channel_open_ok', + '20,20' => 'channel_flow', + '20,21' => 'channel_flow_ok', + '20,40' => 'channel_close', + '20,41' => 'channel_close_ok', + '30,10' => 'access_request', + '30,11' => 'access_request_ok', + '40,10' => 'exchange_declare', + '40,11' => 'exchange_declare_ok', + '40,20' => 'exchange_delete', + '40,21' => 'exchange_delete_ok', + '40,30' => 'exchange_bind', + '40,31' => 'exchange_bind_ok', + '40,40' => 'exchange_unbind', + '40,51' => 'exchange_unbind_ok', + '50,10' => 'queue_declare', + '50,11' => 'queue_declare_ok', + '50,20' => 'queue_bind', + '50,21' => 'queue_bind_ok', + '50,30' => 'queue_purge', + '50,31' => 'queue_purge_ok', + '50,40' => 'queue_delete', + '50,41' => 'queue_delete_ok', + '50,50' => 'queue_unbind', + '50,51' => 'queue_unbind_ok', + '60,10' => 'basic_qos', + '60,11' => 'basic_qos_ok', + '60,20' => 'basic_consume', + '60,21' => 'basic_consume_ok', + '60,30' => 'basic_cancel', + '60,31' => 'basic_cancel_ok', + '60,40' => 'basic_publish', + '60,50' => 'basic_return', + '60,60' => 'basic_deliver', + '60,70' => 'basic_get', + '60,71' => 'basic_get_ok', + '60,72' => 'basic_get_empty', + '60,80' => 'basic_ack', + '60,90' => 'basic_reject', + '60,100' => 'basic_recover_async', + '60,110' => 'basic_recover', + '60,111' => 'basic_recover_ok', + '60,120' => 'basic_nack', + '90,10' => 'tx_select', + '90,11' => 'tx_select_ok', + '90,20' => 'tx_commit', + '90,21' => 'tx_commit_ok', + '90,30' => 'tx_rollback', + '90,31' => 'tx_rollback_ok', + '85,10' => 'confirm_select', + '85,11' => 'confirm_select_ok', +); + + public function get_method($method_sig) { + return $this->method_map[$method_sig]; + } + public function valid_method($method_sig) { + return array_key_exists($method_sig, $this->method_map); + } +} diff --git a/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Helper/Protocol/Protocol080.php b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Helper/Protocol/Protocol080.php new file mode 100644 index 0000000000..6120ab6d45 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Helper/Protocol/Protocol080.php @@ -0,0 +1,695 @@ +write_octet($version_major); + $args->write_octet($version_minor); + $args->write_table($server_properties); + $args->write_longstr($mechanisms); + $args->write_longstr($locales); + return array(10, 10, $args); + } + + public static function connectionStartOk($args) { + $ret = array(); + $ret[] = $args->read_table(); + $ret[] = $args->read_shortstr(); + $ret[] = $args->read_longstr(); + $ret[] = $args->read_shortstr(); + return $ret; + } + + public function connectionSecure($challenge) { + $args = new AMQPWriter(); + $args->write_longstr($challenge); + return array(10, 20, $args); + } + + public static function connectionSecureOk($args) { + $ret = array(); + $ret[] = $args->read_longstr(); + return $ret; + } + + public function connectionTune($channel_max = 0, $frame_max = 0, $heartbeat = 0) { + $args = new AMQPWriter(); + $args->write_short($channel_max); + $args->write_long($frame_max); + $args->write_short($heartbeat); + return array(10, 30, $args); + } + + public static function connectionTuneOk($args) { + $ret = array(); + $ret[] = $args->read_short(); + $ret[] = $args->read_long(); + $ret[] = $args->read_short(); + return $ret; + } + + public function connectionOpen($virtual_host = '/', $capabilities = '', $insist = false) { + $args = new AMQPWriter(); + $args->write_shortstr($virtual_host); + $args->write_shortstr($capabilities); + $args->write_bit($insist); + return array(10, 40, $args); + } + + public static function connectionOpenOk($args) { + $ret = array(); + $ret[] = $args->read_shortstr(); + return $ret; + } + + public function connectionRedirect($host, $known_hosts = '') { + $args = new AMQPWriter(); + $args->write_shortstr($host); + $args->write_shortstr($known_hosts); + return array(10, 50, $args); + } + + public function connectionClose($reply_code, $reply_text = '', $class_id, $method_id) { + $args = new AMQPWriter(); + $args->write_short($reply_code); + $args->write_shortstr($reply_text); + $args->write_short($class_id); + $args->write_short($method_id); + return array(10, 60, $args); + } + + public static function connectionCloseOk($args) { + $ret = array(); + return $ret; + } + + public function channelOpen($out_of_band = '') { + $args = new AMQPWriter(); + $args->write_shortstr($out_of_band); + return array(20, 10, $args); + } + + public static function channelOpenOk($args) { + $ret = array(); + return $ret; + } + + public function channelFlow($active) { + $args = new AMQPWriter(); + $args->write_bit($active); + return array(20, 20, $args); + } + + public static function channelFlowOk($args) { + $ret = array(); + $ret[] = $args->read_bit(); + return $ret; + } + + public function channelAlert($reply_code, $reply_text = '', $details = array ( +)) { + $args = new AMQPWriter(); + $args->write_short($reply_code); + $args->write_shortstr($reply_text); + $args->write_table($details); + return array(20, 30, $args); + } + + public function channelClose($reply_code, $reply_text = '', $class_id, $method_id) { + $args = new AMQPWriter(); + $args->write_short($reply_code); + $args->write_shortstr($reply_text); + $args->write_short($class_id); + $args->write_short($method_id); + return array(20, 40, $args); + } + + public static function channelCloseOk($args) { + $ret = array(); + return $ret; + } + + public function accessRequest($realm = '/data', $exclusive = false, $passive = true, $active = true, $write = true, $read = true) { + $args = new AMQPWriter(); + $args->write_shortstr($realm); + $args->write_bit($exclusive); + $args->write_bit($passive); + $args->write_bit($active); + $args->write_bit($write); + $args->write_bit($read); + return array(30, 10, $args); + } + + public static function accessRequestOk($args) { + $ret = array(); + $ret[] = $args->read_short(); + return $ret; + } + + public function exchangeDeclare($ticket = 1, $exchange, $type = 'direct', $passive = false, $durable = false, $auto_delete = false, $internal = false, $nowait = false, $arguments = array ( +)) { + $args = new AMQPWriter(); + $args->write_short($ticket); + $args->write_shortstr($exchange); + $args->write_shortstr($type); + $args->write_bit($passive); + $args->write_bit($durable); + $args->write_bit($auto_delete); + $args->write_bit($internal); + $args->write_bit($nowait); + $args->write_table($arguments); + return array(40, 10, $args); + } + + public static function exchangeDeclareOk($args) { + $ret = array(); + return $ret; + } + + public function exchangeDelete($ticket = 1, $exchange, $if_unused = false, $nowait = false) { + $args = new AMQPWriter(); + $args->write_short($ticket); + $args->write_shortstr($exchange); + $args->write_bit($if_unused); + $args->write_bit($nowait); + return array(40, 20, $args); + } + + public static function exchangeDeleteOk($args) { + $ret = array(); + return $ret; + } + + public function queueDeclare($ticket = 1, $queue = '', $passive = false, $durable = false, $exclusive = false, $auto_delete = false, $nowait = false, $arguments = array ( +)) { + $args = new AMQPWriter(); + $args->write_short($ticket); + $args->write_shortstr($queue); + $args->write_bit($passive); + $args->write_bit($durable); + $args->write_bit($exclusive); + $args->write_bit($auto_delete); + $args->write_bit($nowait); + $args->write_table($arguments); + return array(50, 10, $args); + } + + public static function queueDeclareOk($args) { + $ret = array(); + $ret[] = $args->read_shortstr(); + $ret[] = $args->read_long(); + $ret[] = $args->read_long(); + return $ret; + } + + public function queueBind($ticket = 1, $queue = '', $exchange, $routing_key = '', $nowait = false, $arguments = array ( +)) { + $args = new AMQPWriter(); + $args->write_short($ticket); + $args->write_shortstr($queue); + $args->write_shortstr($exchange); + $args->write_shortstr($routing_key); + $args->write_bit($nowait); + $args->write_table($arguments); + return array(50, 20, $args); + } + + public static function queueBindOk($args) { + $ret = array(); + return $ret; + } + + public function queuePurge($ticket = 1, $queue = '', $nowait = false) { + $args = new AMQPWriter(); + $args->write_short($ticket); + $args->write_shortstr($queue); + $args->write_bit($nowait); + return array(50, 30, $args); + } + + public static function queuePurgeOk($args) { + $ret = array(); + $ret[] = $args->read_long(); + return $ret; + } + + public function queueDelete($ticket = 1, $queue = '', $if_unused = false, $if_empty = false, $nowait = false) { + $args = new AMQPWriter(); + $args->write_short($ticket); + $args->write_shortstr($queue); + $args->write_bit($if_unused); + $args->write_bit($if_empty); + $args->write_bit($nowait); + return array(50, 40, $args); + } + + public static function queueDeleteOk($args) { + $ret = array(); + $ret[] = $args->read_long(); + return $ret; + } + + public function queueUnbind($ticket = 1, $queue = '', $exchange, $routing_key = '', $arguments = array ( +)) { + $args = new AMQPWriter(); + $args->write_short($ticket); + $args->write_shortstr($queue); + $args->write_shortstr($exchange); + $args->write_shortstr($routing_key); + $args->write_table($arguments); + return array(50, 50, $args); + } + + public static function queueUnbindOk($args) { + $ret = array(); + return $ret; + } + + public function basicQos($prefetch_size = 0, $prefetch_count = 0, $global = false) { + $args = new AMQPWriter(); + $args->write_long($prefetch_size); + $args->write_short($prefetch_count); + $args->write_bit($global); + return array(60, 10, $args); + } + + public static function basicQosOk($args) { + $ret = array(); + return $ret; + } + + public function basicConsume($ticket = 1, $queue = '', $consumer_tag = '', $no_local = false, $no_ack = false, $exclusive = false, $nowait = false) { + $args = new AMQPWriter(); + $args->write_short($ticket); + $args->write_shortstr($queue); + $args->write_shortstr($consumer_tag); + $args->write_bit($no_local); + $args->write_bit($no_ack); + $args->write_bit($exclusive); + $args->write_bit($nowait); + return array(60, 20, $args); + } + + public static function basicConsumeOk($args) { + $ret = array(); + $ret[] = $args->read_shortstr(); + return $ret; + } + + public function basicCancel($consumer_tag, $nowait = false) { + $args = new AMQPWriter(); + $args->write_shortstr($consumer_tag); + $args->write_bit($nowait); + return array(60, 30, $args); + } + + public static function basicCancelOk($args) { + $ret = array(); + $ret[] = $args->read_shortstr(); + return $ret; + } + + public function basicPublish($ticket = 1, $exchange = '', $routing_key = '', $mandatory = false, $immediate = false) { + $args = new AMQPWriter(); + $args->write_short($ticket); + $args->write_shortstr($exchange); + $args->write_shortstr($routing_key); + $args->write_bit($mandatory); + $args->write_bit($immediate); + return array(60, 40, $args); + } + + public function basicReturn($reply_code, $reply_text = '', $exchange, $routing_key) { + $args = new AMQPWriter(); + $args->write_short($reply_code); + $args->write_shortstr($reply_text); + $args->write_shortstr($exchange); + $args->write_shortstr($routing_key); + return array(60, 50, $args); + } + + public function basicDeliver($consumer_tag, $delivery_tag, $redelivered = false, $exchange, $routing_key) { + $args = new AMQPWriter(); + $args->write_shortstr($consumer_tag); + $args->write_longlong($delivery_tag); + $args->write_bit($redelivered); + $args->write_shortstr($exchange); + $args->write_shortstr($routing_key); + return array(60, 60, $args); + } + + public function basicGet($ticket = 1, $queue = '', $no_ack = false) { + $args = new AMQPWriter(); + $args->write_short($ticket); + $args->write_shortstr($queue); + $args->write_bit($no_ack); + return array(60, 70, $args); + } + + public static function basicGetOk($args) { + $ret = array(); + $ret[] = $args->read_longlong(); + $ret[] = $args->read_bit(); + $ret[] = $args->read_shortstr(); + $ret[] = $args->read_shortstr(); + $ret[] = $args->read_long(); + return $ret; + } + + public static function basicGetEmpty($args) { + $ret = array(); + $ret[] = $args->read_shortstr(); + return $ret; + } + + public function basicAck($delivery_tag = 0, $multiple = false) { + $args = new AMQPWriter(); + $args->write_longlong($delivery_tag); + $args->write_bit($multiple); + return array(60, 80, $args); + } + + public function basicReject($delivery_tag, $requeue = true) { + $args = new AMQPWriter(); + $args->write_longlong($delivery_tag); + $args->write_bit($requeue); + return array(60, 90, $args); + } + + public function basicRecoverAsync($requeue = false) { + $args = new AMQPWriter(); + $args->write_bit($requeue); + return array(60, 100, $args); + } + + public function basicRecover($requeue = false) { + $args = new AMQPWriter(); + $args->write_bit($requeue); + return array(60, 110, $args); + } + + public static function basicRecoverOk($args) { + $ret = array(); + return $ret; + } + + public function fileQos($prefetch_size = 0, $prefetch_count = 0, $global = false) { + $args = new AMQPWriter(); + $args->write_long($prefetch_size); + $args->write_short($prefetch_count); + $args->write_bit($global); + return array(70, 10, $args); + } + + public static function fileQosOk($args) { + $ret = array(); + return $ret; + } + + public function fileConsume($ticket = 1, $queue = '', $consumer_tag = '', $no_local = false, $no_ack = false, $exclusive = false, $nowait = false) { + $args = new AMQPWriter(); + $args->write_short($ticket); + $args->write_shortstr($queue); + $args->write_shortstr($consumer_tag); + $args->write_bit($no_local); + $args->write_bit($no_ack); + $args->write_bit($exclusive); + $args->write_bit($nowait); + return array(70, 20, $args); + } + + public static function fileConsumeOk($args) { + $ret = array(); + $ret[] = $args->read_shortstr(); + return $ret; + } + + public function fileCancel($consumer_tag, $nowait = false) { + $args = new AMQPWriter(); + $args->write_shortstr($consumer_tag); + $args->write_bit($nowait); + return array(70, 30, $args); + } + + public static function fileCancelOk($args) { + $ret = array(); + $ret[] = $args->read_shortstr(); + return $ret; + } + + public function fileOpen($identifier, $content_size) { + $args = new AMQPWriter(); + $args->write_shortstr($identifier); + $args->write_longlong($content_size); + return array(70, 40, $args); + } + + public static function fileOpenOk($args) { + $ret = array(); + $ret[] = $args->read_longlong(); + return $ret; + } + + public function fileStage() { + $args = new AMQPWriter(); + return array(70, 50, $args); + } + + public function filePublish($ticket = 1, $exchange = '', $routing_key = '', $mandatory = false, $immediate = false, $identifier) { + $args = new AMQPWriter(); + $args->write_short($ticket); + $args->write_shortstr($exchange); + $args->write_shortstr($routing_key); + $args->write_bit($mandatory); + $args->write_bit($immediate); + $args->write_shortstr($identifier); + return array(70, 60, $args); + } + + public function fileReturn($reply_code = 200, $reply_text = '', $exchange, $routing_key) { + $args = new AMQPWriter(); + $args->write_short($reply_code); + $args->write_shortstr($reply_text); + $args->write_shortstr($exchange); + $args->write_shortstr($routing_key); + return array(70, 70, $args); + } + + public function fileDeliver($consumer_tag, $delivery_tag, $redelivered = false, $exchange, $routing_key, $identifier) { + $args = new AMQPWriter(); + $args->write_shortstr($consumer_tag); + $args->write_longlong($delivery_tag); + $args->write_bit($redelivered); + $args->write_shortstr($exchange); + $args->write_shortstr($routing_key); + $args->write_shortstr($identifier); + return array(70, 80, $args); + } + + public function fileAck($delivery_tag = 0, $multiple = false) { + $args = new AMQPWriter(); + $args->write_longlong($delivery_tag); + $args->write_bit($multiple); + return array(70, 90, $args); + } + + public function fileReject($delivery_tag, $requeue = true) { + $args = new AMQPWriter(); + $args->write_longlong($delivery_tag); + $args->write_bit($requeue); + return array(70, 100, $args); + } + + public function streamQos($prefetch_size = 0, $prefetch_count = 0, $consume_rate = 0, $global = false) { + $args = new AMQPWriter(); + $args->write_long($prefetch_size); + $args->write_short($prefetch_count); + $args->write_long($consume_rate); + $args->write_bit($global); + return array(80, 10, $args); + } + + public static function streamQosOk($args) { + $ret = array(); + return $ret; + } + + public function streamConsume($ticket = 1, $queue = '', $consumer_tag = '', $no_local = false, $exclusive = false, $nowait = false) { + $args = new AMQPWriter(); + $args->write_short($ticket); + $args->write_shortstr($queue); + $args->write_shortstr($consumer_tag); + $args->write_bit($no_local); + $args->write_bit($exclusive); + $args->write_bit($nowait); + return array(80, 20, $args); + } + + public static function streamConsumeOk($args) { + $ret = array(); + $ret[] = $args->read_shortstr(); + return $ret; + } + + public function streamCancel($consumer_tag, $nowait = false) { + $args = new AMQPWriter(); + $args->write_shortstr($consumer_tag); + $args->write_bit($nowait); + return array(80, 30, $args); + } + + public static function streamCancelOk($args) { + $ret = array(); + $ret[] = $args->read_shortstr(); + return $ret; + } + + public function streamPublish($ticket = 1, $exchange = '', $routing_key = '', $mandatory = false, $immediate = false) { + $args = new AMQPWriter(); + $args->write_short($ticket); + $args->write_shortstr($exchange); + $args->write_shortstr($routing_key); + $args->write_bit($mandatory); + $args->write_bit($immediate); + return array(80, 40, $args); + } + + public function streamReturn($reply_code = 200, $reply_text = '', $exchange, $routing_key) { + $args = new AMQPWriter(); + $args->write_short($reply_code); + $args->write_shortstr($reply_text); + $args->write_shortstr($exchange); + $args->write_shortstr($routing_key); + return array(80, 50, $args); + } + + public function streamDeliver($consumer_tag, $delivery_tag, $exchange, $queue) { + $args = new AMQPWriter(); + $args->write_shortstr($consumer_tag); + $args->write_longlong($delivery_tag); + $args->write_shortstr($exchange); + $args->write_shortstr($queue); + return array(80, 60, $args); + } + + public function txSelect() { + $args = new AMQPWriter(); + return array(90, 10, $args); + } + + public static function txSelectOk($args) { + $ret = array(); + return $ret; + } + + public function txCommit() { + $args = new AMQPWriter(); + return array(90, 20, $args); + } + + public static function txCommitOk($args) { + $ret = array(); + return $ret; + } + + public function txRollback() { + $args = new AMQPWriter(); + return array(90, 30, $args); + } + + public static function txRollbackOk($args) { + $ret = array(); + return $ret; + } + + public function dtxSelect() { + $args = new AMQPWriter(); + return array(100, 10, $args); + } + + public static function dtxSelectOk($args) { + $ret = array(); + return $ret; + } + + public function dtxStart($dtx_identifier) { + $args = new AMQPWriter(); + $args->write_shortstr($dtx_identifier); + return array(100, 20, $args); + } + + public static function dtxStartOk($args) { + $ret = array(); + return $ret; + } + + public function tunnelRequest($meta_data) { + $args = new AMQPWriter(); + $args->write_table($meta_data); + return array(110, 10, $args); + } + + public function testInteger($integer_1, $integer_2, $integer_3, $integer_4, $operation) { + $args = new AMQPWriter(); + $args->write_octet($integer_1); + $args->write_short($integer_2); + $args->write_long($integer_3); + $args->write_longlong($integer_4); + $args->write_octet($operation); + return array(120, 10, $args); + } + + public static function testIntegerOk($args) { + $ret = array(); + $ret[] = $args->read_longlong(); + return $ret; + } + + public function testString($string_1, $string_2, $operation) { + $args = new AMQPWriter(); + $args->write_shortstr($string_1); + $args->write_longstr($string_2); + $args->write_octet($operation); + return array(120, 20, $args); + } + + public static function testStringOk($args) { + $ret = array(); + $ret[] = $args->read_longstr(); + return $ret; + } + + public function testTable($table, $integer_op, $string_op) { + $args = new AMQPWriter(); + $args->write_table($table); + $args->write_octet($integer_op); + $args->write_octet($string_op); + return array(120, 30, $args); + } + + public static function testTableOk($args) { + $ret = array(); + $ret[] = $args->read_longlong(); + $ret[] = $args->read_longstr(); + return $ret; + } + + public function testContent() { + $args = new AMQPWriter(); + return array(120, 40, $args); + } + + public static function testContentOk($args) { + $ret = array(); + $ret[] = $args->read_long(); + return $ret; + } +} diff --git a/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Helper/Protocol/Protocol091.php b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Helper/Protocol/Protocol091.php new file mode 100644 index 0000000000..0c1affaed8 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Helper/Protocol/Protocol091.php @@ -0,0 +1,473 @@ +write_octet($version_major); + $args->write_octet($version_minor); + $args->write_table($server_properties); + $args->write_longstr($mechanisms); + $args->write_longstr($locales); + return array(10, 10, $args); + } + + public static function connectionStartOk($args) { + $ret = array(); + $ret[] = $args->read_table(); + $ret[] = $args->read_shortstr(); + $ret[] = $args->read_longstr(); + $ret[] = $args->read_shortstr(); + return $ret; + } + + public function connectionSecure($challenge) { + $args = new AMQPWriter(); + $args->write_longstr($challenge); + return array(10, 20, $args); + } + + public static function connectionSecureOk($args) { + $ret = array(); + $ret[] = $args->read_longstr(); + return $ret; + } + + public function connectionTune($channel_max = 0, $frame_max = 0, $heartbeat = 0) { + $args = new AMQPWriter(); + $args->write_short($channel_max); + $args->write_long($frame_max); + $args->write_short($heartbeat); + return array(10, 30, $args); + } + + public static function connectionTuneOk($args) { + $ret = array(); + $ret[] = $args->read_short(); + $ret[] = $args->read_long(); + $ret[] = $args->read_short(); + return $ret; + } + + public function connectionOpen($virtual_host = '/', $capabilities = '', $insist = false) { + $args = new AMQPWriter(); + $args->write_shortstr($virtual_host); + $args->write_shortstr($capabilities); + $args->write_bit($insist); + return array(10, 40, $args); + } + + public static function connectionOpenOk($args) { + $ret = array(); + $ret[] = $args->read_shortstr(); + return $ret; + } + + public function connectionClose($reply_code, $reply_text = '', $class_id, $method_id) { + $args = new AMQPWriter(); + $args->write_short($reply_code); + $args->write_shortstr($reply_text); + $args->write_short($class_id); + $args->write_short($method_id); + return array(10, 50, $args); + } + + public static function connectionCloseOk($args) { + $ret = array(); + return $ret; + } + + public function channelOpen($out_of_band = '') { + $args = new AMQPWriter(); + $args->write_shortstr($out_of_band); + return array(20, 10, $args); + } + + public static function channelOpenOk($args) { + $ret = array(); + $ret[] = $args->read_longstr(); + return $ret; + } + + public function channelFlow($active) { + $args = new AMQPWriter(); + $args->write_bit($active); + return array(20, 20, $args); + } + + public static function channelFlowOk($args) { + $ret = array(); + $ret[] = $args->read_bit(); + return $ret; + } + + public function channelClose($reply_code, $reply_text = '', $class_id, $method_id) { + $args = new AMQPWriter(); + $args->write_short($reply_code); + $args->write_shortstr($reply_text); + $args->write_short($class_id); + $args->write_short($method_id); + return array(20, 40, $args); + } + + public static function channelCloseOk($args) { + $ret = array(); + return $ret; + } + + public function accessRequest($realm = '/data', $exclusive = false, $passive = true, $active = true, $write = true, $read = true) { + $args = new AMQPWriter(); + $args->write_shortstr($realm); + $args->write_bit($exclusive); + $args->write_bit($passive); + $args->write_bit($active); + $args->write_bit($write); + $args->write_bit($read); + return array(30, 10, $args); + } + + public static function accessRequestOk($args) { + $ret = array(); + $ret[] = $args->read_short(); + return $ret; + } + + public function exchangeDeclare($ticket = 0, $exchange, $type = 'direct', $passive = false, $durable = false, $auto_delete = false, $internal = false, $nowait = false, $arguments = array ( +)) { + $args = new AMQPWriter(); + $args->write_short($ticket); + $args->write_shortstr($exchange); + $args->write_shortstr($type); + $args->write_bit($passive); + $args->write_bit($durable); + $args->write_bit($auto_delete); + $args->write_bit($internal); + $args->write_bit($nowait); + $args->write_table($arguments); + return array(40, 10, $args); + } + + public static function exchangeDeclareOk($args) { + $ret = array(); + return $ret; + } + + public function exchangeDelete($ticket = 0, $exchange, $if_unused = false, $nowait = false) { + $args = new AMQPWriter(); + $args->write_short($ticket); + $args->write_shortstr($exchange); + $args->write_bit($if_unused); + $args->write_bit($nowait); + return array(40, 20, $args); + } + + public static function exchangeDeleteOk($args) { + $ret = array(); + return $ret; + } + + public function exchangeBind($ticket = 0, $destination, $source, $routing_key = '', $nowait = false, $arguments = array ( +)) { + $args = new AMQPWriter(); + $args->write_short($ticket); + $args->write_shortstr($destination); + $args->write_shortstr($source); + $args->write_shortstr($routing_key); + $args->write_bit($nowait); + $args->write_table($arguments); + return array(40, 30, $args); + } + + public static function exchangeBindOk($args) { + $ret = array(); + return $ret; + } + + public function exchangeUnbind($ticket = 0, $destination, $source, $routing_key = '', $nowait = false, $arguments = array ( +)) { + $args = new AMQPWriter(); + $args->write_short($ticket); + $args->write_shortstr($destination); + $args->write_shortstr($source); + $args->write_shortstr($routing_key); + $args->write_bit($nowait); + $args->write_table($arguments); + return array(40, 40, $args); + } + + public static function exchangeUnbindOk($args) { + $ret = array(); + return $ret; + } + + public function queueDeclare($ticket = 0, $queue = '', $passive = false, $durable = false, $exclusive = false, $auto_delete = false, $nowait = false, $arguments = array ( +)) { + $args = new AMQPWriter(); + $args->write_short($ticket); + $args->write_shortstr($queue); + $args->write_bit($passive); + $args->write_bit($durable); + $args->write_bit($exclusive); + $args->write_bit($auto_delete); + $args->write_bit($nowait); + $args->write_table($arguments); + return array(50, 10, $args); + } + + public static function queueDeclareOk($args) { + $ret = array(); + $ret[] = $args->read_shortstr(); + $ret[] = $args->read_long(); + $ret[] = $args->read_long(); + return $ret; + } + + public function queueBind($ticket = 0, $queue = '', $exchange, $routing_key = '', $nowait = false, $arguments = array ( +)) { + $args = new AMQPWriter(); + $args->write_short($ticket); + $args->write_shortstr($queue); + $args->write_shortstr($exchange); + $args->write_shortstr($routing_key); + $args->write_bit($nowait); + $args->write_table($arguments); + return array(50, 20, $args); + } + + public static function queueBindOk($args) { + $ret = array(); + return $ret; + } + + public function queuePurge($ticket = 0, $queue = '', $nowait = false) { + $args = new AMQPWriter(); + $args->write_short($ticket); + $args->write_shortstr($queue); + $args->write_bit($nowait); + return array(50, 30, $args); + } + + public static function queuePurgeOk($args) { + $ret = array(); + $ret[] = $args->read_long(); + return $ret; + } + + public function queueDelete($ticket = 0, $queue = '', $if_unused = false, $if_empty = false, $nowait = false) { + $args = new AMQPWriter(); + $args->write_short($ticket); + $args->write_shortstr($queue); + $args->write_bit($if_unused); + $args->write_bit($if_empty); + $args->write_bit($nowait); + return array(50, 40, $args); + } + + public static function queueDeleteOk($args) { + $ret = array(); + $ret[] = $args->read_long(); + return $ret; + } + + public function queueUnbind($ticket = 0, $queue = '', $exchange, $routing_key = '', $arguments = array ( +)) { + $args = new AMQPWriter(); + $args->write_short($ticket); + $args->write_shortstr($queue); + $args->write_shortstr($exchange); + $args->write_shortstr($routing_key); + $args->write_table($arguments); + return array(50, 50, $args); + } + + public static function queueUnbindOk($args) { + $ret = array(); + return $ret; + } + + public function basicQos($prefetch_size = 0, $prefetch_count = 0, $global = false) { + $args = new AMQPWriter(); + $args->write_long($prefetch_size); + $args->write_short($prefetch_count); + $args->write_bit($global); + return array(60, 10, $args); + } + + public static function basicQosOk($args) { + $ret = array(); + return $ret; + } + + public function basicConsume($ticket = 0, $queue = '', $consumer_tag = '', $no_local = false, $no_ack = false, $exclusive = false, $nowait = false, $arguments = array ( +)) { + $args = new AMQPWriter(); + $args->write_short($ticket); + $args->write_shortstr($queue); + $args->write_shortstr($consumer_tag); + $args->write_bit($no_local); + $args->write_bit($no_ack); + $args->write_bit($exclusive); + $args->write_bit($nowait); + $args->write_table($arguments); + return array(60, 20, $args); + } + + public static function basicConsumeOk($args) { + $ret = array(); + $ret[] = $args->read_shortstr(); + return $ret; + } + + public function basicCancel($consumer_tag, $nowait = false) { + $args = new AMQPWriter(); + $args->write_shortstr($consumer_tag); + $args->write_bit($nowait); + return array(60, 30, $args); + } + + public static function basicCancelOk($args) { + $ret = array(); + $ret[] = $args->read_shortstr(); + return $ret; + } + + public function basicPublish($ticket = 0, $exchange = '', $routing_key = '', $mandatory = false, $immediate = false) { + $args = new AMQPWriter(); + $args->write_short($ticket); + $args->write_shortstr($exchange); + $args->write_shortstr($routing_key); + $args->write_bit($mandatory); + $args->write_bit($immediate); + return array(60, 40, $args); + } + + public function basicReturn($reply_code, $reply_text = '', $exchange, $routing_key) { + $args = new AMQPWriter(); + $args->write_short($reply_code); + $args->write_shortstr($reply_text); + $args->write_shortstr($exchange); + $args->write_shortstr($routing_key); + return array(60, 50, $args); + } + + public function basicDeliver($consumer_tag, $delivery_tag, $redelivered = false, $exchange, $routing_key) { + $args = new AMQPWriter(); + $args->write_shortstr($consumer_tag); + $args->write_longlong($delivery_tag); + $args->write_bit($redelivered); + $args->write_shortstr($exchange); + $args->write_shortstr($routing_key); + return array(60, 60, $args); + } + + public function basicGet($ticket = 0, $queue = '', $no_ack = false) { + $args = new AMQPWriter(); + $args->write_short($ticket); + $args->write_shortstr($queue); + $args->write_bit($no_ack); + return array(60, 70, $args); + } + + public static function basicGetOk($args) { + $ret = array(); + $ret[] = $args->read_longlong(); + $ret[] = $args->read_bit(); + $ret[] = $args->read_shortstr(); + $ret[] = $args->read_shortstr(); + $ret[] = $args->read_long(); + return $ret; + } + + public static function basicGetEmpty($args) { + $ret = array(); + $ret[] = $args->read_shortstr(); + return $ret; + } + + public function basicAck($delivery_tag = 0, $multiple = false) { + $args = new AMQPWriter(); + $args->write_longlong($delivery_tag); + $args->write_bit($multiple); + return array(60, 80, $args); + } + + public function basicReject($delivery_tag, $requeue = true) { + $args = new AMQPWriter(); + $args->write_longlong($delivery_tag); + $args->write_bit($requeue); + return array(60, 90, $args); + } + + public function basicRecoverAsync($requeue = false) { + $args = new AMQPWriter(); + $args->write_bit($requeue); + return array(60, 100, $args); + } + + public function basicRecover($requeue = false) { + $args = new AMQPWriter(); + $args->write_bit($requeue); + return array(60, 110, $args); + } + + public static function basicRecoverOk($args) { + $ret = array(); + return $ret; + } + + public function basicNack($delivery_tag = 0, $multiple = false, $requeue = true) { + $args = new AMQPWriter(); + $args->write_longlong($delivery_tag); + $args->write_bit($multiple); + $args->write_bit($requeue); + return array(60, 120, $args); + } + + public function txSelect() { + $args = new AMQPWriter(); + return array(90, 10, $args); + } + + public static function txSelectOk($args) { + $ret = array(); + return $ret; + } + + public function txCommit() { + $args = new AMQPWriter(); + return array(90, 20, $args); + } + + public static function txCommitOk($args) { + $ret = array(); + return $ret; + } + + public function txRollback() { + $args = new AMQPWriter(); + return array(90, 30, $args); + } + + public static function txRollbackOk($args) { + $ret = array(); + return $ret; + } + + public function confirmSelect($nowait = false) { + $args = new AMQPWriter(); + $args->write_bit($nowait); + return array(85, 10, $args); + } + + public static function confirmSelectOk($args) { + $ret = array(); + return $ret; + } +} diff --git a/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Helper/Protocol/Wait080.php b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Helper/Protocol/Wait080.php new file mode 100644 index 0000000000..d82ab0b7ca --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Helper/Protocol/Wait080.php @@ -0,0 +1,108 @@ + '10,10', + 'connection.start_ok' => '10,11', + 'connection.secure' => '10,20', + 'connection.secure_ok' => '10,21', + 'connection.tune' => '10,30', + 'connection.tune_ok' => '10,31', + 'connection.open' => '10,40', + 'connection.open_ok' => '10,41', + 'connection.redirect' => '10,50', + 'connection.close' => '10,60', + 'connection.close_ok' => '10,61', + 'channel.open' => '20,10', + 'channel.open_ok' => '20,11', + 'channel.flow' => '20,20', + 'channel.flow_ok' => '20,21', + 'channel.alert' => '20,30', + 'channel.close' => '20,40', + 'channel.close_ok' => '20,41', + 'access.request' => '30,10', + 'access.request_ok' => '30,11', + 'exchange.declare' => '40,10', + 'exchange.declare_ok' => '40,11', + 'exchange.delete' => '40,20', + 'exchange.delete_ok' => '40,21', + 'queue.declare' => '50,10', + 'queue.declare_ok' => '50,11', + 'queue.bind' => '50,20', + 'queue.bind_ok' => '50,21', + 'queue.purge' => '50,30', + 'queue.purge_ok' => '50,31', + 'queue.delete' => '50,40', + 'queue.delete_ok' => '50,41', + 'queue.unbind' => '50,50', + 'queue.unbind_ok' => '50,51', + 'basic.qos' => '60,10', + 'basic.qos_ok' => '60,11', + 'basic.consume' => '60,20', + 'basic.consume_ok' => '60,21', + 'basic.cancel' => '60,30', + 'basic.cancel_ok' => '60,31', + 'basic.publish' => '60,40', + 'basic.return' => '60,50', + 'basic.deliver' => '60,60', + 'basic.get' => '60,70', + 'basic.get_ok' => '60,71', + 'basic.get_empty' => '60,72', + 'basic.ack' => '60,80', + 'basic.reject' => '60,90', + 'basic.recover_async' => '60,100', + 'basic.recover' => '60,110', + 'basic.recover_ok' => '60,111', + 'file.qos' => '70,10', + 'file.qos_ok' => '70,11', + 'file.consume' => '70,20', + 'file.consume_ok' => '70,21', + 'file.cancel' => '70,30', + 'file.cancel_ok' => '70,31', + 'file.open' => '70,40', + 'file.open_ok' => '70,41', + 'file.stage' => '70,50', + 'file.publish' => '70,60', + 'file.return' => '70,70', + 'file.deliver' => '70,80', + 'file.ack' => '70,90', + 'file.reject' => '70,100', + 'stream.qos' => '80,10', + 'stream.qos_ok' => '80,11', + 'stream.consume' => '80,20', + 'stream.consume_ok' => '80,21', + 'stream.cancel' => '80,30', + 'stream.cancel_ok' => '80,31', + 'stream.publish' => '80,40', + 'stream.return' => '80,50', + 'stream.deliver' => '80,60', + 'tx.select' => '90,10', + 'tx.select_ok' => '90,11', + 'tx.commit' => '90,20', + 'tx.commit_ok' => '90,21', + 'tx.rollback' => '90,30', + 'tx.rollback_ok' => '90,31', + 'dtx.select' => '100,10', + 'dtx.select_ok' => '100,11', + 'dtx.start' => '100,20', + 'dtx.start_ok' => '100,21', + 'tunnel.request' => '110,10', + 'test.integer' => '120,10', + 'test.integer_ok' => '120,11', + 'test.string' => '120,20', + 'test.string_ok' => '120,21', + 'test.table' => '120,30', + 'test.table_ok' => '120,31', + 'test.content' => '120,40', + 'test.content_ok' => '120,41', +); + + public function get_wait($method) { + return $this->wait[$method]; + } +} diff --git a/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Helper/Protocol/Wait091.php b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Helper/Protocol/Wait091.php new file mode 100644 index 0000000000..f2b7aac21a --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Helper/Protocol/Wait091.php @@ -0,0 +1,77 @@ + '10,10', + 'connection.start_ok' => '10,11', + 'connection.secure' => '10,20', + 'connection.secure_ok' => '10,21', + 'connection.tune' => '10,30', + 'connection.tune_ok' => '10,31', + 'connection.open' => '10,40', + 'connection.open_ok' => '10,41', + 'connection.close' => '10,50', + 'connection.close_ok' => '10,51', + 'channel.open' => '20,10', + 'channel.open_ok' => '20,11', + 'channel.flow' => '20,20', + 'channel.flow_ok' => '20,21', + 'channel.close' => '20,40', + 'channel.close_ok' => '20,41', + 'access.request' => '30,10', + 'access.request_ok' => '30,11', + 'exchange.declare' => '40,10', + 'exchange.declare_ok' => '40,11', + 'exchange.delete' => '40,20', + 'exchange.delete_ok' => '40,21', + 'exchange.bind' => '40,30', + 'exchange.bind_ok' => '40,31', + 'exchange.unbind' => '40,40', + 'exchange.unbind_ok' => '40,51', + 'queue.declare' => '50,10', + 'queue.declare_ok' => '50,11', + 'queue.bind' => '50,20', + 'queue.bind_ok' => '50,21', + 'queue.purge' => '50,30', + 'queue.purge_ok' => '50,31', + 'queue.delete' => '50,40', + 'queue.delete_ok' => '50,41', + 'queue.unbind' => '50,50', + 'queue.unbind_ok' => '50,51', + 'basic.qos' => '60,10', + 'basic.qos_ok' => '60,11', + 'basic.consume' => '60,20', + 'basic.consume_ok' => '60,21', + 'basic.cancel' => '60,30', + 'basic.cancel_ok' => '60,31', + 'basic.publish' => '60,40', + 'basic.return' => '60,50', + 'basic.deliver' => '60,60', + 'basic.get' => '60,70', + 'basic.get_ok' => '60,71', + 'basic.get_empty' => '60,72', + 'basic.ack' => '60,80', + 'basic.reject' => '60,90', + 'basic.recover_async' => '60,100', + 'basic.recover' => '60,110', + 'basic.recover_ok' => '60,111', + 'basic.nack' => '60,120', + 'tx.select' => '90,10', + 'tx.select_ok' => '90,11', + 'tx.commit' => '90,20', + 'tx.commit_ok' => '90,21', + 'tx.rollback' => '90,30', + 'tx.rollback_ok' => '90,31', + 'confirm.select' => '85,10', + 'confirm.select_ok' => '85,11', +); + + public function get_wait($method) { + return $this->wait[$method]; + } +} diff --git a/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Message/AMQPMessage.php b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Message/AMQPMessage.php new file mode 100644 index 0000000000..adc2c71cd7 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Message/AMQPMessage.php @@ -0,0 +1,37 @@ + "shortstr", + "content_encoding" => "shortstr", + "application_headers" => "table", + "delivery_mode" => "octet", + "priority" => "octet", + "correlation_id" => "shortstr", + "reply_to" => "shortstr", + "expiration" => "shortstr", + "message_id" => "shortstr", + "timestamp" => "timestamp", + "type" => "shortstr", + "user_id" => "shortstr", + "app_id" => "shortstr", + "cluster_id" => "shortstr" + ); + + public function __construct($body = '', $properties = null) + { + $this->body = $body; + + parent::__construct($properties, static::$PROPERTIES); + } +} diff --git a/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Functional/AbstractPublishConsumeTest.php b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Functional/AbstractPublishConsumeTest.php new file mode 100644 index 0000000000..671798fa16 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Functional/AbstractPublishConsumeTest.php @@ -0,0 +1,83 @@ +conn = $this->createConnection(); + $this->ch = $this->conn->channel(); + + $this->ch->exchange_declare($this->exchange_name, 'direct', false, false, false); + list($this->queue_name,,) = $this->ch->queue_declare(); + $this->ch->queue_bind($this->queue_name, $this->exchange_name, $this->queue_name); + } + + abstract protected function createConnection(); + + public function testPublishConsume() + { + $this->msg_body = 'foo bar baz äëïöü'; + + $msg = new AMQPMessage($this->msg_body, array( + 'content_type' => 'text/plain', + 'delivery_mode' => 1, + 'correlation_id' => 'my_correlation_id', + 'reply_to' => 'my_reply_to' + )); + + $this->ch->basic_publish($msg, $this->exchange_name, $this->queue_name); + + $this->ch->basic_consume( + $this->queue_name, + getmypid(), + false, + false, + false, + false, + array($this, 'process_msg') + ); + + while (count($this->ch->callbacks)) { + $this->ch->wait(); + } + } + + public function process_msg($msg) + { + $delivery_info = $msg->delivery_info; + + $delivery_info['channel']->basic_ack($delivery_info['delivery_tag']); + $delivery_info['channel']->basic_cancel($delivery_info['consumer_tag']); + + $this->assertEquals($this->msg_body, $msg->body); + + //delivery tests + $this->assertEquals(getmypid(), $delivery_info['consumer_tag']); + $this->assertEquals($this->queue_name, $delivery_info['routing_key']); + $this->assertEquals($this->exchange_name, $delivery_info['exchange']); + $this->assertEquals(false, $delivery_info['redelivered']); + + //msg property tests + $this->assertEquals('text/plain', $msg->get('content_type')); + $this->assertEquals('my_correlation_id', $msg->get('correlation_id')); + $this->assertEquals('my_reply_to', $msg->get('reply_to')); + + $this->setExpectedException('OutOfBoundsException'); + $msg->get('no_property'); + } + + public function tearDown() + { + $this->ch->exchange_delete($this->exchange_name); + $this->ch->close(); + $this->conn->close(); + } +} diff --git a/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Functional/Bug40Test.php b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Functional/Bug40Test.php new file mode 100644 index 0000000000..7bc73ae761 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Functional/Bug40Test.php @@ -0,0 +1,89 @@ +conn = new AMQPConnection(HOST, PORT, USER, PASS, VHOST); + $this->ch = $this->conn->channel(); + $this->ch2 = $this->conn->channel(); + + $this->ch->exchange_declare($this->exchange_name, 'direct', false, false, false); + list($this->queue_name1,,) = $this->ch->queue_declare(); + list($this->queue_name2,,) = $this->ch->queue_declare(); + $this->ch->queue_bind($this->queue_name1, $this->exchange_name, $this->queue_name1); + $this->ch->queue_bind($this->queue_name2, $this->exchange_name, $this->queue_name2); + } + + public function testFrameOrder() + { + $msg = new AMQPMessage("test message"); + $this->ch->basic_publish($msg, $this->exchange_name, $this->queue_name1); + $this->ch->basic_publish($msg, $this->exchange_name, $this->queue_name1); + $this->ch->basic_publish($msg, $this->exchange_name, $this->queue_name2); + + $this->ch->basic_consume( + $this->queue_name1, + "", + false, + true, + false, + false, + array($this, 'process_msg1') + ); + + while (count($this->ch->callbacks)) { + $this->ch->wait(); + } + } + + public function process_msg1($msg) + { + $delivery_info = $msg->delivery_info; + $this->q1msgs++; + + if ($this->q1msgs < 2) { + $this->ch2->basic_consume( + $this->queue_name2, + "", + false, + true, + false, + false, + array($this, 'process_msg2') + ); + } + + while (count($this->ch2->callbacks)) { + $this->ch2->wait(); + } + + if ($this->q1msgs == 2) { + $delivery_info['channel']->basic_cancel($delivery_info['consumer_tag']); + } + + } + + public function process_msg2($msg) + { + $delivery_info = $msg->delivery_info; + $delivery_info['channel']->basic_cancel($delivery_info['consumer_tag']); + } + + public function tearDown() + { + $this->ch->exchange_delete($this->exchange_name); + $this->ch->close(); + $this->conn->close(); + } +} diff --git a/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Functional/Bug49Test.php b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Functional/Bug49Test.php new file mode 100644 index 0000000000..bf8f42e43e --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Functional/Bug49Test.php @@ -0,0 +1,40 @@ +conn = new AMQPConnection(HOST, PORT, USER, PASS, VHOST); + $this->ch = $this->conn->channel(); + $this->ch2 = $this->conn->channel(); + } + + public function testDeclaration() + { + try { + $this->ch->queue_declare('pretty.queue', true, true); + $this->fail('Should have raised an exception'); + } catch (AMQPProtocolException $e) { + if ($e->getCode() == 404) { + $this->ch2->queue_declare('pretty.queue', false, true, true, true); + } else { + $this->fail('Should have raised a 404 Error'); + } + } + } + + public function tearDown() { + $this->ch2->close(); + $this->conn->close(); + } +} diff --git a/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Functional/FileTransferTest.php b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Functional/FileTransferTest.php new file mode 100644 index 0000000000..01768e597b --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Functional/FileTransferTest.php @@ -0,0 +1,62 @@ +conn = new AMQPConnection(HOST, PORT, USER, PASS, VHOST); + $this->ch = $this->conn->channel(); + + $this->ch->exchange_declare($this->exchange_name, 'direct', false, false, false); + list($this->queue_name,,) = $this->ch->queue_declare(); + $this->ch->queue_bind($this->queue_name, $this->exchange_name, $this->queue_name); + } + + public function testSendFile() + { + $this->msg_body = file_get_contents(__DIR__.'/fixtures/data_1mb.bin'); + + $msg = new AMQPMessage($this->msg_body, array('delivery_mode' => 1)); + + $this->ch->basic_publish($msg, $this->exchange_name, $this->queue_name); + + $this->ch->basic_consume( + $this->queue_name, + '', + false, + false, + false, + false, + array($this, 'process_msg') + ); + + while (count($this->ch->callbacks)) { + $this->ch->wait(); + } + } + + public function process_msg($msg) + { + $delivery_info = $msg->delivery_info; + + $delivery_info['channel']->basic_ack($delivery_info['delivery_tag']); + $delivery_info['channel']->basic_cancel($delivery_info['consumer_tag']); + + $this->assertEquals($this->msg_body, $msg->body); + } + + public function tearDown() + { + $this->ch->exchange_delete($this->exchange_name); + $this->ch->close(); + $this->conn->close(); + } +} diff --git a/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Functional/SocketPublishConsumeTest.php b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Functional/SocketPublishConsumeTest.php new file mode 100644 index 0000000000..5ae683e7e8 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Functional/SocketPublishConsumeTest.php @@ -0,0 +1,13 @@ +protocol091 = new Protocol091(); + } + + public function testChannelClose() + { + $expected = "\x00\x00\x00\x00\x00\x00\x00"; + list($class_id, $method_id, $args) = $this->protocol091->channelClose(0, "", 0, 0); + $this->assertEquals($expected, $args->getvalue()); + + $expected = "\x00\x00\x05error\x00\x00\x00\x00"; + list($class_id, $method_id, $args) = $this->protocol091->channelClose(0, "error", 0, 0); + $this->assertEquals($expected, $args->getvalue()); + + $expected = "\x00\x00\x05error\x00\x14\x00\x28"; + list($class_id, $method_id, $args) = $this->protocol091->channelClose(0, "error", 20, 40); + $this->assertEquals($expected, $args->getvalue()); + } + + public function testFlow() + { + $expected = "\x01"; + list($class_id, $method_id, $args) = $this->protocol091->channelFlow(true); + $this->assertEquals($expected, $args->getvalue()); + + $expected = "\x00"; + list($class_id, $method_id, $args) = $this->protocol091->channelFlow(false); + $this->assertEquals($expected, $args->getvalue()); + } + + public function testXOpen() + { + $expected = "\x03foo"; + list($class_id, $method_id, $args) = $this->protocol091->channelOpen("foo"); + $this->assertEquals($expected, $args->getvalue()); + + $expected = "\x00"; + list($class_id, $method_id, $args) = $this->protocol091->channelOpen(""); + $this->assertEquals($expected, $args->getvalue()); + } + + public function testAccessRequest() + { + $expected = "\x01/\x00"; + list($class_id, $method_id, $args) = $this->protocol091->accessRequest("/", false, false, false, false, false); + $this->assertEquals($expected, $args->getvalue()); + + $expected = "\x04/foo\x00"; + list($class_id, $method_id, $args) = $this->protocol091->accessRequest("/foo", false, false, false, false, false); + $this->assertEquals($expected, $args->getvalue()); + } + + public function testExchangeDeclare() + { + $expected = "\x00\x00\x03foo\x06direct\x00\x00\x00\x00\x00"; + list($class_id, $method_id, $args) = $this->protocol091->exchangeDeclare( + 0, 'foo', 'direct', false, + false, false, + false, false, + array() + ); + $this->assertEquals($expected, $args->getvalue()); + } + + public function testExchangeDelete() + { + $expected = "\x00\x00\x03foo\x00"; + list($class_id, $method_id, $args) = $this->protocol091->exchangeDelete(0, 'foo', false, false); + $this->assertEquals($expected, $args->getvalue()); + } + + public function testExchangeBind() + { + $expected = "\x00\x00\x03foo\x03bar\x03baz\x00\x00\x00\x00\x00"; + list($class_id, $method_id, $args) = $this->protocol091->exchangeBind(0, 'foo', 'bar', 'baz', false, array()); + $this->assertEquals($expected, $args->getvalue()); + } + + public function testExchangeUnbind() + { + $expected = "\x00\x00\x03foo\x03bar\x03baz\x00\x00\x00\x00\x00"; + list($class_id, $method_id, $args) = $this->protocol091->exchangeUnbind(0, 'foo', 'bar', 'baz', false, array()); + $this->assertEquals($expected, $args->getvalue()); + } + + public function testQueueBind() + { + $expected = "\x00\x00\x03foo\x03bar\x03baz\x00\x00\x00\x00\x00"; + list($class_id, $method_id, $args) = $this->protocol091->queueBind(0, 'foo', 'bar', 'baz', false, array()); + $this->assertEquals($expected, $args->getvalue()); + } + + public function testQueueUnbind() + { + $expected = "\x00\x00\x03foo\x03bar\x03baz\x00\x00\x00\x00"; + list($class_id, $method_id, $args) = $this->protocol091->queueUnbind(0, 'foo', 'bar', 'baz', array()); + $this->assertEquals($expected, $args->getvalue()); + } + + public function testQueueDeclare() + { + $expected = "\x00\x00\x03foo\x00\x00\x00\x00\x00"; + list($class_id, $method_id, $args) = $this->protocol091->queueDeclare( + 0, 'foo', false, + false, false, + false, false, + array() + ); + $this->assertEquals($expected, $args->getvalue()); + } + + public function testQueueDelete() + { + $expected = "\x00\x00\x03foo\x00"; + list($class_id, $method_id, $args) = $this->protocol091->queueDelete(0, 'foo', false, false, false); + $this->assertEquals($expected, $args->getvalue()); + } + + public function testQueuePurge() + { + $expected = "\x00\x00\x03foo\x00"; + list($class_id, $method_id, $args) = $this->protocol091->queuePurge(0, 'foo', false); + $this->assertEquals($expected, $args->getvalue()); + } + + public function testBasicAck() + { + $expected = "\x00\x00\x00\x00\x00\x00\x00\x01\x00"; + list($class_id, $method_id, $args) = $this->protocol091->basicAck(1, false); + $this->assertEquals($expected, $args->getvalue()); + } + + public function testBasicCancel() + { + $expected = "\x03foo\x00"; + list($class_id, $method_id, $args) = $this->protocol091->basicCancel('foo', false); + $this->assertEquals($expected, $args->getvalue()); + } + + public function testBasicConsume() + { + $expected = "\x00\x00\x03foo\x03bar\x00\x00\x00\x00\x00"; + list($class_id, $method_id, $args) = $this->protocol091->basicConsume(0, 'foo', 'bar', false, false, false, false); + $this->assertEquals($expected, $args->getvalue()); + } + + public function testBasicGet() + { + $expected = "\x00\x00\x03foo\x00"; + list($class_id, $method_id, $args) = $this->protocol091->basicGet(0, 'foo', false); + $this->assertEquals($expected, $args->getvalue()); + } + + public function testBasicPublish() + { + $expected = "\x00\x00\x03foo\x03bar\x00"; + list($class_id, $method_id, $args) = $this->protocol091->basicPublish(0, 'foo', 'bar', false, false); + $this->assertEquals($expected, $args->getvalue()); + } + + public function testBasicQos() + { + $expected = "\x00\x00\x00\xA\x00\x01\x00"; + list($class_id, $method_id, $args) = $this->protocol091->basicQos(10, 1, false); + $this->assertEquals($expected, $args->getvalue()); + } + + public function testBasicRecover() + { + $expected = "\x01"; + list($class_id, $method_id, $args) = $this->protocol091->basicRecover(true); + $this->assertEquals($expected, $args->getvalue()); + + $expected = "\x00"; + list($class_id, $method_id, $args) = $this->protocol091->basicRecover(false); + $this->assertEquals($expected, $args->getvalue()); + } + + public function testBasicReject() + { + $expected = "\x00\x00\x00\x00\x00\x00\x00\x01\x01"; + list($class_id, $method_id, $args) = $this->protocol091->basicReject(1, true); + $this->assertEquals($expected, $args->getvalue()); + + $expected = "\x00\x00\x00\x00\x00\x00\x00\x01\x00"; + list($class_id, $method_id, $args) = $this->protocol091->basicReject(1, false); + $this->assertEquals($expected, $args->getvalue()); + } +} diff --git a/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Unit/Wire/AMQPWriterTest.php b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Unit/Wire/AMQPWriterTest.php new file mode 100644 index 0000000000..e55e9f9c57 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Unit/Wire/AMQPWriterTest.php @@ -0,0 +1,60 @@ +_writer = new AMQPWriter(); + } + + public function tearDown() + { + $this->_writer = null; + } + + public function testWriteArray() + { + $this->_writer->write_array(array( + 'rabbit@localhost', + 'hare@localhost' + )); + + $out = $this->_writer->getvalue(); + + $this->assertEquals(44, strlen($out)); + + $expected = "\x00\x00\x00(S\x00\x00\x00\x10rabbit@localhostS\x00\x00\x00\x0Ehare@localhost"; + + $this->assertEquals($expected, $out); + } + + public function testWriteTable() + { + $this->_writer->write_table(array( + 'x-foo' => array('S', 'bar'), + 'x-bar' => array('A', array('baz', 'qux')), + )); + + $out = $this->_writer->getvalue(); + + + $expected = "\x00\x00\x00)\x05x-fooS\x00\x00\x00\x03bar\x05x-barA\x00\x00\x00\x10S\x00\x00\x00\x03bazS\x00\x00\x00\x03qux"; + + $this->assertEquals($expected, $out); + } + + public function testWriteTableThrowsExceptionOnInvalidType() + { + $this->setExpectedException('InvalidArgumentException', "Invalid type '_'"); + + $this->_writer->write_table(array( + 'x-foo' => array('_', 'bar'), + )); + } +} diff --git a/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Unit/WireTest.php b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Unit/WireTest.php new file mode 100644 index 0000000000..ed82730fb4 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Tests/Unit/WireTest.php @@ -0,0 +1,122 @@ +bitWriteRead(true); + $this->bitWriteRead(false); + } + + protected function bitWriteRead($v) + { + $this->writeAndRead($v, 'write_bit', 'read_bit'); + } + + public function testOctetWriteRead() + { + for ($i = 0; $i < 100; $i++) { + $this->octetWriteRead(rand(0, 255)); + } + $this->setExpectedException('InvalidArgumentException'); + $this->octetWriteRead(-1); + $this->octetWriteRead(256); + } + + protected function octetWriteRead($v) + { + $this->writeAndRead($v, 'write_octet', 'read_octet'); + } + + public function testShortWriteRead() + { + for ($i = 0; $i < 100; $i++) { + $this->shortWriteRead(rand(0, 65535)); + } + + $this->setExpectedException('InvalidArgumentException'); + $this->shortWriteRead(-1); + $this->shortWriteRead(65536); + } + + protected function shortWriteRead($v) + { + $this->writeAndRead($v, 'write_short', 'read_short'); + } + + public function testLongWriteRead() + { + $max = 4294967295; //2^32-1 + for ($i = 0; $i < 100; $i++) { + $this->longWriteRead(rand(0, $max)); + } + } + + protected function longWriteRead($v) + { + $this->writeAndRead($v, 'write_long', 'read_long'); + } + + public function testShortstrWriteRead() + { + $this->shortstrWriteRead('a'); + $this->shortstrWriteRead('üıß∑œ´®†¥¨πøˆ¨¥†®'); + + $this->setExpectedException('InvalidArgumentException'); + $this->shortstrWriteRead('abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz + abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz + abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'); + } + + protected function shortstrWriteRead($v) + { + $this->writeAndRead($v, 'write_shortstr', 'read_shortstr'); + } + + public function testLongstrWriteRead() + { + $this->longstrWriteRead('a'); + $this->longstrWriteRead('üıß∑œ´®†¥¨πøˆ¨¥†®'); + $this->longstrWriteRead('abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz + abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz + abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'); + } + + protected function longstrWriteRead($v) + { + $this->writeAndRead($v, 'write_longstr', 'read_longstr'); + } + + public function testLongLongWriteRead() + { + // First test with values represented as strings + $this->longlongWriteRead('0'); + $this->longlongWriteRead('123'); + $this->longlongWriteRead('4294967296'); + $this->longlongWriteRead('994294967296'); + + // Now, with real int values + $this->longlongWriteRead(0); + $this->longlongWriteRead(123); + $this->longlongWriteRead(4294967296); + } + + protected function longlongWriteRead($v) + { + $this->writeAndRead($v, 'write_longlong', 'read_longlong'); + } + + protected function writeAndRead($v, $write_method, $read_method) + { + $w = new AMQPWriter(); + $w->{$write_method}($v); + + $r = new AMQPReader($w->getvalue()); + $this->assertEquals($v, $r->{$read_method}()); + } +} diff --git a/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Tests/bootstrap.php b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Tests/bootstrap.php new file mode 100644 index 0000000000..cddfdf6c25 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Tests/bootstrap.php @@ -0,0 +1,4 @@ +n = $n; + $this->e = $e; + } + + public function asBCvalue() + { + return bcdiv($this->n, bcpow(10,$this->e)); + } +} diff --git a/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/AMQPReader.php b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/AMQPReader.php new file mode 100644 index 0000000000..dc6a8e4cb9 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/AMQPReader.php @@ -0,0 +1,391 @@ +str = $str; + $this->io = $io; + $this->offset = 0; + $this->bitcount = $this->bits = 0; + $this->timeout = $timeout; + + $this->is64bits = ((int) 4294967296) != 0 ? true : false; + } + + /** + * close the stream + */ + public function close() + { + if($this->io) { + $this->io->close(); + } + } + + /** + * @param int $n + * + * @return string + */ + public function read($n) + { + $this->bitcount = $this->bits = 0; + + return $this->rawread($n); + } + + /** + * Wait until some data is retrieved from the socket. + * + * AMQPTimeoutException can be raised if the timeout is set + * + * @throws \PhpAmqpLib\Exception\AMQPTimeoutException + */ + protected function wait() + { + if ($this->timeout == 0) { + return; + } + + // wait .. + $result = $this->io->select($this->timeout, 0); + + if ($result === false) { + throw new AMQPRuntimeException(sprintf("An error occurs", $this->timeout)); + } + + if ($result === 0) { + throw new AMQPTimeoutException(sprintf("A timeout occurs while waiting for incoming data", $this->timeout)); + } + } + + /** + * @param $n + * + * @return string + * @throws \RuntimeException + * @throws \PhpAmqpLib\Exception\AMQPRuntimeException + */ + + protected function rawread($n) + { + if ($this->io) { + $this->wait(); + $res = $this->io->read($n); + $this->offset += $n; + } else { + if (strlen($this->str) < $n) { + throw new AMQPRuntimeException("Error reading data. Requested $n bytes while string buffer has only " . + strlen($this->str)); + } + + $res = substr($this->str,0,$n); + $this->str = substr($this->str,$n); + $this->offset += $n; + } + + return $res; + } + + /** + * @return bool + */ + public function read_bit() + { + if (!$this->bitcount) { + $this->bits = ord($this->rawread(1)); + $this->bitcount = 8; + } + + $result = ($this->bits & 1) == 1; + $this->bits >>= 1; + $this->bitcount -= 1; + + return $result; + } + + /** + * @return mixed + */ + public function read_octet() + { + $this->bitcount = $this->bits = 0; + list(,$res) = unpack('C', $this->rawread(1)); + + return $res; + } + + /** + * @return mixed + */ + public function read_short() + { + $this->bitcount = $this->bits = 0; + list(,$res) = unpack('n', $this->rawread(2)); + + return $res; + } + + /** + * Reads 32 bit integer in big-endian byte order. + * + * On 64 bit systems it will return always usngined int + * value in 0..2^32 range. + * + * On 32 bit systems it will return signed int value in + * -2^31...+2^31 range. + * + * Use with caution! + */ + public function read_php_int() + { + list(,$res) = unpack('N', $this->rawread(4)); + if ($this->is64bits) { + $sres = sprintf ( "%u", $res ); + + return (int) $sres; + } else { + return $res; + } + } + + /** + * PHP does not have unsigned 32 bit int, + * so we return it as a string + * @return string + */ + public function read_long() + { + $this->bitcount = $this->bits = 0; + list(,$res) = unpack('N', $this->rawread(4)); + $sres = sprintf ( "%u", $res ); + + return $sres; + } + + /** + * @return long + */ + private function read_signed_long() + { + $this->bitcount = $this->bits = 0; + // In PHP unpack('N') always return signed value, + // on both 32 and 64 bit systems! + list(,$res) = unpack('N', $this->rawread(4)); + + return $res; + } + + + /** + * Even on 64 bit systems PHP integers are singed. + * Since we need an unsigned value here we return it + * as a string. + * + * @return string + */ + public function read_longlong() + { + $this->bitcount = $this->bits = 0; + $hi = unpack('N', $this->rawread(4)); + $lo = unpack('N', $this->rawread(4)); + + // workaround signed/unsigned braindamage in php + $hi = sprintf ( "%u", $hi[1] ); + $lo = sprintf ( "%u", $lo[1] ); + + return bcadd(bcmul($hi, "4294967296" ), $lo); + } + + /** + * Read a utf-8 encoded string that's stored in up to + * 255 bytes. Return it decoded as a PHP unicode object. + */ + public function read_shortstr() + { + $this->bitcount = $this->bits = 0; + list(,$slen) = unpack('C', $this->rawread(1)); + + return $this->rawread($slen); + } + + /** + * Read a string that's up to 2**32 bytes, the encoding + * isn't specified in the AMQP spec, so just return it as + * a plain PHP string. + */ + public function read_longstr() + { + $this->bitcount = $this->bits = 0; + $slen = $this->read_php_int(); + + if ($slen < 0) { + throw new AMQPOutOfBoundsException("Strings longer than supported on this platform"); + } + + return $this->rawread($slen); + } + + /** + * Read and AMQP timestamp, which is a 64-bit integer representing + * seconds since the Unix epoch in 1-second resolution. + */ + public function read_timestamp() + { + return $this->read_longlong(); + } + + /** + * Read an AMQP table, and return as a PHP array. keys are strings, + * values are (type,value) tuples. + */ + public function read_table() + { + $this->bitcount = $this->bits = 0; + $tlen = $this->read_php_int(); + + if ($tlen<0) { + throw new AMQPOutOfBoundsException("Table is longer than supported"); + } + + $table_data = new AMQPReader($this->rawread($tlen), null); + $result = array(); + while ($table_data->tell() < $tlen) { + $name = $table_data->read_shortstr(); + $ftype = $table_data->rawread(1); + $val = $table_data->read_value($ftype); + $result[$name] = array($ftype,$val); + } + + return $result; + } + + /** + * Reads the array in the next value. + * + * @return array + */ + public function read_array() + { + $this->bitcount = $this->bits = 0; + + // Determine array length and its end position + $arrayLength = $this->read_php_int(); + $endOffset = $this->offset + $arrayLength; + + $result = array(); + // Read values until we reach the end of the array + while ($this->offset < $endOffset) { + $fieldType = $this->rawread(1); + $result[] = $this->read_value($fieldType); + } + + return $result; + } + + /** + * Reads the next value as the provided field type. + * + * @param string $fieldType the char field type + * + * @return mixed + */ + public function read_value($fieldType) + { + $this->bitcount = $this->bits = 0; + + $val = NULL; + switch ($fieldType) { + case 'S': // Long string + $val = $this->read_longstr(); + break; + case 'I': // Signed 32-bit + $val = $this->read_signed_long(); + break; + case 'D': // Decimal + $e = $this->read_octet(); + $n = $this->read_signed_long(); + $val = new AMQPDecimal($n, $e); + break; + case 't': + $val = $this->read_octet(); + break; + case 'l': + $val = $this->read_longlong(); + break; + case 'T': // Timestamp + $val = $this->read_timestamp(); + break; + case 'F': // Table + $val = $this->read_table(); + break; + case 'A': // Array + $val = $this->read_array(); + break; + default: + // UNKNOWN TYPE + throw new \RuntimeException("Usupported table field type {$fieldType}"); + break; + } + + return $val; + } + + /** + * @return int + */ + protected function tell() + { + return $this->offset; + } + + /** + * Set the timeout (second) + * + * @param $timeout + */ + public function setTimeout($timeout) + { + $this->timeout = $timeout; + } + + /** + * @return int + */ + public function getTimeout() + { + return $this->timeout; + } +} diff --git a/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/AMQPWriter.php b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/AMQPWriter.php new file mode 100644 index 0000000000..cd02139987 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/AMQPWriter.php @@ -0,0 +1,289 @@ +out = ""; + $this->bits = array(); + $this->bitcount = 0; + } + + private static function chrbytesplit($x, $bytes) + { + return array_map('chr', AMQPWriter::bytesplit($x,$bytes)); + } + + /** + * Splits number (could be either int or string) into array of byte + * values (represented as integers) in big-endian byte order. + */ + private static function bytesplit($x, $bytes) + { + if (is_int($x)) { + if ($x<0) { + $x = sprintf("%u", $x); + } + } + + $res = array(); + + while ($bytes > 0) { + $b = bcmod($x,'256'); + $res[] = (int) $b; + $x = bcdiv($x,'256', 0); + $bytes--; + } + + $res = array_reverse($res); + + if ($x!=0) { + throw new AMQPOutOfBoundsException("Value too big!"); + } + + return $res; + } + + private function flushbits() + { + if (!empty($this->bits)) { + $this->out .= implode("", array_map('chr', $this->bits)); + $this->bits = array(); + $this->bitcount = 0; + } + } + + /** + * Get what's been encoded so far. + */ + public function getvalue() + { + $this->flushbits(); + + return $this->out; + } + + /** + * Write a plain PHP string, with no special encoding. + */ + public function write($s) + { + $this->flushbits(); + $this->out .= $s; + + return $this; + } + + /** + * Write a boolean value. + */ + public function write_bit($b) + { + if ($b) { + $b = 1; + } else { + $b = 0; + } + + $shift = $this->bitcount % 8; + + if ($shift == 0) { + $last = 0; + } else { + $last = array_pop($this->bits); + } + + $last |= ($b << $shift); + array_push($this->bits, $last); + + $this->bitcount += 1; + + return $this; + } + + /** + * Write an integer as an unsigned 8-bit value. + */ + public function write_octet($n) + { + if ($n < 0 || $n > 255) { + throw new \InvalidArgumentException('Octet out of range 0..255'); + } + + $this->flushbits(); + $this->out .= chr($n); + + return $this; + } + + /** + * Write an integer as an unsigned 16-bit value. + */ + public function write_short($n) + { + if ($n < 0 || $n > 65535) { + throw new \InvalidArgumentException('Octet out of range 0..65535'); + } + + $this->flushbits(); + $this->out .= pack('n', $n); + + return $this; + } + + /** + * Write an integer as an unsigned 32-bit value. + */ + public function write_long($n) + { + $this->flushbits(); + $this->out .= implode("", AMQPWriter::chrbytesplit($n,4)); + + return $this; + } + + private function write_signed_long($n) + { + $this->flushbits(); + // although format spec for 'N' mentions unsigned + // it will deal with sinned integers as well. tested. + $this->out .= pack('N', $n); + + return $this; + } + + /** + * Write an integer as an unsigned 64-bit value. + */ + public function write_longlong($n) + { + $this->flushbits(); + $this->out .= implode("", AMQPWriter::chrbytesplit($n,8)); + + return $this; + } + + /** + * Write a string up to 255 bytes long after encoding. + * Assume UTF-8 encoding. + */ + public function write_shortstr($s) + { + $this->flushbits(); + if (strlen($s) > 255) { + throw new \InvalidArgumentException('String too long'); + } + + $this->write_octet(strlen($s)); + $this->out .= $s; + + return $this; + } + + + /* + * Write a string up to 2**32 bytes long. Assume UTF-8 encoding. + */ + public function write_longstr($s) + { + $this->flushbits(); + $this->write_long(strlen($s)); + $this->out .= $s; + + return $this; + } + + /** + * Supports the writing of Array types, so that you can implement + * array methods, like Rabbitmq's HA parameters + * + * @param array $a + * + * @return self + */ + public function write_array($a) + { + $this->flushbits(); + $data = new AMQPWriter(); + + foreach ($a as $v) { + if (is_string($v)) { + $data->write('S'); + $data->write_longstr($v); + } elseif (is_int($v)) { + $data->write('I'); + $data->write_signed_long($v); + } elseif ($v instanceof AMQPDecimal) { + $data->write('D'); + $data->write_octet($v->e); + $data->write_signed_long($v->n); + } elseif (is_array($v)) { + $data->write('A'); + $data->write_array($v); + } + } + + $data = $data->getvalue(); + $this->write_long(strlen($data)); + $this->write($data); + + return $this; + } + + /** + * Write unix time_t value as 64 bit timestamp. + */ + public function write_timestamp($v) + { + $this->write_longlong($v); + + return $this; + } + + /** + * Write PHP array, as table. Input array format: keys are strings, + * values are (type,value) tuples. + */ + public function write_table($d) + { + $this->flushbits(); + $table_data = new AMQPWriter(); + foreach ($d as $k=>$va) { + list($ftype,$v) = $va; + $table_data->write_shortstr($k); + if ($ftype=='S') { + $table_data->write('S'); + $table_data->write_longstr($v); + } elseif ($ftype=='I') { + $table_data->write('I'); + $table_data->write_signed_long($v); + } elseif ($ftype=='D') { + // 'D' type values are passed AMQPDecimal instances. + $table_data->write('D'); + $table_data->write_octet($v->e); + $table_data->write_signed_long($v->n); + } elseif ($ftype=='T') { + $table_data->write('T'); + $table_data->write_timestamp($v); + } elseif ($ftype=='F') { + $table_data->write('F'); + $table_data->write_table($v); + } elseif ($ftype=='A') { + $table_data->write('A'); + $table_data->write_array($v); + } else { + throw new \InvalidArgumentException(sprintf("Invalid type '%s'", $ftype)); + } + } + + $table_data = $table_data->getvalue(); + $this->write_long(strlen($table_data)); + $this->write($table_data); + + return $this; + } +} diff --git a/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/Constants080.php b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/Constants080.php new file mode 100644 index 0000000000..de423e7a6a --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/Constants080.php @@ -0,0 +1,140 @@ + 'FRAME-METHOD', + 2 => 'FRAME-HEADER', + 3 => 'FRAME-BODY', + 4 => 'FRAME-OOB-METHOD', + 5 => 'FRAME-OOB-HEADER', + 6 => 'FRAME-OOB-BODY', + 7 => 'FRAME-TRACE', + 8 => 'FRAME-HEARTBEAT', + 4096 => 'FRAME-MIN-SIZE', + 206 => 'FRAME-END', + 501 => 'FRAME-ERROR', +); + + public static $CONTENT_METHODS = array ( + 0 => '60,40', + 1 => '60,50', + 2 => '60,60', + 3 => '60,71', + 4 => '70,50', + 5 => '70,70', + 6 => '80,40', + 7 => '80,50', + 8 => '80,60', + 9 => '110,10', + 10 => '120,40', + 11 => '120,41', +); + + public static $CLOSE_METHODS = array ( + 0 => '10,60', + 1 => '20,40', +); + + public static $GLOBAL_METHOD_NAMES = array ( + '10,10' => 'Connection.start', + '10,11' => 'Connection.start_ok', + '10,20' => 'Connection.secure', + '10,21' => 'Connection.secure_ok', + '10,30' => 'Connection.tune', + '10,31' => 'Connection.tune_ok', + '10,40' => 'Connection.open', + '10,41' => 'Connection.open_ok', + '10,50' => 'Connection.redirect', + '10,60' => 'Connection.close', + '10,61' => 'Connection.close_ok', + '20,10' => 'Channel.open', + '20,11' => 'Channel.open_ok', + '20,20' => 'Channel.flow', + '20,21' => 'Channel.flow_ok', + '20,30' => 'Channel.alert', + '20,40' => 'Channel.close', + '20,41' => 'Channel.close_ok', + '30,10' => 'Access.request', + '30,11' => 'Access.request_ok', + '40,10' => 'Exchange.declare', + '40,11' => 'Exchange.declare_ok', + '40,20' => 'Exchange.delete', + '40,21' => 'Exchange.delete_ok', + '50,10' => 'Queue.declare', + '50,11' => 'Queue.declare_ok', + '50,20' => 'Queue.bind', + '50,21' => 'Queue.bind_ok', + '50,30' => 'Queue.purge', + '50,31' => 'Queue.purge_ok', + '50,40' => 'Queue.delete', + '50,41' => 'Queue.delete_ok', + '50,50' => 'Queue.unbind', + '50,51' => 'Queue.unbind_ok', + '60,10' => 'Basic.qos', + '60,11' => 'Basic.qos_ok', + '60,20' => 'Basic.consume', + '60,21' => 'Basic.consume_ok', + '60,30' => 'Basic.cancel', + '60,31' => 'Basic.cancel_ok', + '60,40' => 'Basic.publish', + '60,50' => 'Basic.return', + '60,60' => 'Basic.deliver', + '60,70' => 'Basic.get', + '60,71' => 'Basic.get_ok', + '60,72' => 'Basic.get_empty', + '60,80' => 'Basic.ack', + '60,90' => 'Basic.reject', + '60,100' => 'Basic.recover_async', + '60,110' => 'Basic.recover', + '60,111' => 'Basic.recover_ok', + '70,10' => 'File.qos', + '70,11' => 'File.qos_ok', + '70,20' => 'File.consume', + '70,21' => 'File.consume_ok', + '70,30' => 'File.cancel', + '70,31' => 'File.cancel_ok', + '70,40' => 'File.open', + '70,41' => 'File.open_ok', + '70,50' => 'File.stage', + '70,60' => 'File.publish', + '70,70' => 'File.return', + '70,80' => 'File.deliver', + '70,90' => 'File.ack', + '70,100' => 'File.reject', + '80,10' => 'Stream.qos', + '80,11' => 'Stream.qos_ok', + '80,20' => 'Stream.consume', + '80,21' => 'Stream.consume_ok', + '80,30' => 'Stream.cancel', + '80,31' => 'Stream.cancel_ok', + '80,40' => 'Stream.publish', + '80,50' => 'Stream.return', + '80,60' => 'Stream.deliver', + '90,10' => 'Tx.select', + '90,11' => 'Tx.select_ok', + '90,20' => 'Tx.commit', + '90,21' => 'Tx.commit_ok', + '90,30' => 'Tx.rollback', + '90,31' => 'Tx.rollback_ok', + '100,10' => 'Dtx.select', + '100,11' => 'Dtx.select_ok', + '100,20' => 'Dtx.start', + '100,21' => 'Dtx.start_ok', + '110,10' => 'Tunnel.request', + '120,10' => 'Test.integer', + '120,11' => 'Test.integer_ok', + '120,20' => 'Test.string', + '120,21' => 'Test.string_ok', + '120,30' => 'Test.table', + '120,31' => 'Test.table_ok', + '120,40' => 'Test.content', + '120,41' => 'Test.content_ok', +); +} diff --git a/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/Constants091.php b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/Constants091.php new file mode 100644 index 0000000000..393c197b29 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/Constants091.php @@ -0,0 +1,97 @@ + 'FRAME-METHOD', + 2 => 'FRAME-HEADER', + 3 => 'FRAME-BODY', + 8 => 'FRAME-HEARTBEAT', + 4096 => 'FRAME-MIN-SIZE', + 206 => 'FRAME-END', + 501 => 'FRAME-ERROR', +); + + public static $CONTENT_METHODS = array ( + 0 => '60,40', + 1 => '60,50', + 2 => '60,60', + 3 => '60,71', +); + + public static $CLOSE_METHODS = array ( + 0 => '10,50', + 1 => '20,40', +); + + public static $GLOBAL_METHOD_NAMES = array ( + '10,10' => 'Connection.start', + '10,11' => 'Connection.start_ok', + '10,20' => 'Connection.secure', + '10,21' => 'Connection.secure_ok', + '10,30' => 'Connection.tune', + '10,31' => 'Connection.tune_ok', + '10,40' => 'Connection.open', + '10,41' => 'Connection.open_ok', + '10,50' => 'Connection.close', + '10,51' => 'Connection.close_ok', + '20,10' => 'Channel.open', + '20,11' => 'Channel.open_ok', + '20,20' => 'Channel.flow', + '20,21' => 'Channel.flow_ok', + '20,40' => 'Channel.close', + '20,41' => 'Channel.close_ok', + '30,10' => 'Access.request', + '30,11' => 'Access.request_ok', + '40,10' => 'Exchange.declare', + '40,11' => 'Exchange.declare_ok', + '40,20' => 'Exchange.delete', + '40,21' => 'Exchange.delete_ok', + '40,30' => 'Exchange.bind', + '40,31' => 'Exchange.bind_ok', + '40,40' => 'Exchange.unbind', + '40,51' => 'Exchange.unbind_ok', + '50,10' => 'Queue.declare', + '50,11' => 'Queue.declare_ok', + '50,20' => 'Queue.bind', + '50,21' => 'Queue.bind_ok', + '50,30' => 'Queue.purge', + '50,31' => 'Queue.purge_ok', + '50,40' => 'Queue.delete', + '50,41' => 'Queue.delete_ok', + '50,50' => 'Queue.unbind', + '50,51' => 'Queue.unbind_ok', + '60,10' => 'Basic.qos', + '60,11' => 'Basic.qos_ok', + '60,20' => 'Basic.consume', + '60,21' => 'Basic.consume_ok', + '60,30' => 'Basic.cancel', + '60,31' => 'Basic.cancel_ok', + '60,40' => 'Basic.publish', + '60,50' => 'Basic.return', + '60,60' => 'Basic.deliver', + '60,70' => 'Basic.get', + '60,71' => 'Basic.get_ok', + '60,72' => 'Basic.get_empty', + '60,80' => 'Basic.ack', + '60,90' => 'Basic.reject', + '60,100' => 'Basic.recover_async', + '60,110' => 'Basic.recover', + '60,111' => 'Basic.recover_ok', + '60,120' => 'Basic.nack', + '90,10' => 'Tx.select', + '90,11' => 'Tx.select_ok', + '90,20' => 'Tx.commit', + '90,21' => 'Tx.commit_ok', + '90,30' => 'Tx.rollback', + '90,31' => 'Tx.rollback_ok', + '85,10' => 'Confirm.select', + '85,11' => 'Confirm.select_ok', +); +} diff --git a/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/GenericContent.php b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/GenericContent.php new file mode 100644 index 0000000000..cccef96827 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/GenericContent.php @@ -0,0 +1,153 @@ + "shortstr" + ); + + public function __construct($props, $prop_types=null) + { + if($prop_types) + $this->prop_types = $prop_types; + else + $this->prop_types = self::$PROPERTIES; + $d = array(); + if ($props) + $d = array_intersect_key($props, $this->prop_types); + else + $d = array(); + $this->properties = $d; + } + + /** + * Check wheter a property exists in the 'properties' dictionary + * or if present - in the 'delivery_info' dictionary. + */ + public function has($name) + { + return isset($this->properties[$name]) || isset($this->delivery_info[$name]); + } + + /** + * Look for additional properties in the 'properties' dictionary, + * and if present - the 'delivery_info' dictionary. + */ + public function get($name) + { + if(isset($this->properties[$name])) { + return $this->properties[$name]; + } + if(isset($this->delivery_info[$name])) { + return $this->delivery_info[$name]; + } + + throw new \OutOfBoundsException("No '$name' property"); + } + + /** + * allows to set the property after creation of the object + */ + public function set($name, $value) + { + if(array_key_exists($name, $this->prop_types)) + $this->properties[$name] = $value; + else + throw new \OutOfBoundsException("No '$name' property"); + } + /** + * Given the raw bytes containing the property-flags and + * property-list from a content-frame-header, parse and insert + * into a dictionary stored in this object as an attribute named + * 'properties'. + */ + public function load_properties($raw_bytes) + { + $r = new AMQPReader($raw_bytes); + + // Read 16-bit shorts until we get one with a low bit set to zero + $flags = array(); + while (true) { + $flag_bits = $r->read_short(); + $flags[] = $flag_bits; + if(($flag_bits & 1) == 0) + break; + } + + $shift = 0; + $d = array(); + foreach ($this->prop_types as $key => $proptype) { + if ($shift == 0) { + if (!$flags) { + break; + } + $flag_bits = array_shift($flags); + $shift = 15; + } + if ($flag_bits & (1 << $shift)) { + $d[$key] = $r->{'read_'.$proptype}(); + } + + $shift -= 1; + } + $this->properties = $d; + } + + /** + * serialize the 'properties' attribute (a dictionary) into the + * raw bytes making up a set of property flags and a property + * list, suitable for putting into a content frame header. + */ + public function serialize_properties() + { + $shift = 15; + $flag_bits = 0; + $flags = array(); + $raw_bytes = new AMQPWriter(); + + foreach ($this->prop_types as $key => $proptype) { + if (isset($this->properties[$key])) { + $val = $this->properties[$key]; + } else { + $val = null; + } + + if ($val != null) { + if ($shift == 0) { + $flags[] = $flag_bits; + $flag_bits = 0; + $shift = 15; + } + + $flag_bits |= (1 << $shift); + if ($proptype != "bit") { + $raw_bytes->{'write_'.$proptype}($val); + } + + } + $shift -= 1; + } + + $flags[] = $flag_bits; + $result = new AMQPWriter(); + foreach ($flags as $flag_bits) { + $result->write_short($flag_bits); + } + + $result->write($raw_bytes->getvalue()); + + return $result->getvalue(); + } +} diff --git a/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/AbstractIO.php b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/AbstractIO.php new file mode 100644 index 0000000000..2218496e89 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/AbstractIO.php @@ -0,0 +1,14 @@ +sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); + + socket_set_option($this->sock, SOL_SOCKET, SO_RCVTIMEO, array('sec' => $timeout, 'usec' => 0)); + socket_set_option($this->sock, SOL_SOCKET, SO_SNDTIMEO, array('sec' => $timeout, 'usec' => 0)); + + if (!socket_connect($this->sock, $host, $port)) { + $errno = socket_last_error($this->sock); + $errstr = socket_strerror($errno); + throw new \Exception ("Error Connecting to server($errno): $errstr "); + } + + socket_set_block($this->sock); + socket_set_option($this->sock, SOL_TCP, TCP_NODELAY, 1); + } + + public function read($n) + { + $res = ''; + $read = 0; + + $buf = socket_read($this->sock, $n); + while ($read < $n && $buf !== '') { + $read += strlen($buf); + $res .= $buf; + $buf = socket_read($this->sock, $n - $read); + } + + if (strlen($res)!=$n) { + throw new \Exception("Error reading data. Received " . + strlen($res) . " instead of expected $n bytes"); + } + + return $res; + } + + public function write($data) + { + $len = strlen($data); + + while (true) { + $sent = socket_write($this->sock, $data, $len); + if ($sent === false) { + throw new \Exception ("Error sending data"); + } + // Check if the entire message has been sented + if ($sent < $len) { + // If not sent the entire message. + // Get the part of the message that has not yet been sented as message + $data = substr($data, $sent); + // Get the length of the not sented part + $len -= $sent; + } else { + break; + } + } + } + + public function close() + { + if (is_resource($this->sock)) { + socket_close($this->sock); + } + $this->sock = null; + } + + public function select($sec, $usec) + { + $read = array($this->sock); + $write = null; + $except = null; + return socket_select($read, $write, $except, $sec, $usec); + } +} \ No newline at end of file diff --git a/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php new file mode 100644 index 0000000000..8ec351cceb --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php @@ -0,0 +1,103 @@ +sock = null; + + //TODO clean up + if ($context) { + $remote = sprintf('ssl://%s:%s', $host, $port); + $this->sock = @stream_socket_client($remote, $errno, $errstr, $connection_timeout, STREAM_CLIENT_CONNECT, $context); + } else { + $remote = sprintf('tcp://%s:%s', $host, $port); + $this->sock = @stream_socket_client($remote, $errno, $errstr, $connection_timeout, STREAM_CLIENT_CONNECT); + } + + if (!$this->sock) { + throw new AMQPRuntimeException("Error Connecting to server($errno): $errstr "); + } + + if(!stream_set_timeout($this->sock, $read_write_timeout)) { + throw new \Exception ("Timeout could not be set"); + } + + stream_set_blocking($this->sock, 1); + } + + public function read($n) + { + $res = ''; + $read = 0; + + while ($read < $n && !feof($this->sock) && + (false !== ($buf = fread($this->sock, $n - $read)))) { + + $read += strlen($buf); + $res .= $buf; + } + + if (strlen($res)!=$n) { + throw new AMQPRuntimeException("Error reading data. Received " . + strlen($res) . " instead of expected $n bytes"); + } + + return $res; + } + + public function write($data) + { + $len = strlen($data); + while (true) { + if (false === ($written = fwrite($this->sock, $data))) { + throw new AMQPRuntimeException("Error sending data"); + } + if ($written === 0) { + throw new AMQPRuntimeException("Broken pipe or closed connection"); + } + + // get status of socket to determine whether or not it has timed out + $info = stream_get_meta_data($this->sock); + if($info['timed_out']) { + throw new AMQPTimeoutException("Error sending data. Socket connection timed out"); + } + + $len = $len - $written; + if ($len > 0) { + $data = substr($data,0-$len); + } else { + break; + } + } + } + + public function close() + { + if (is_resource($this->sock)) { + fclose($this->sock); + } + $this->sock = null; + } + + public function get_socket() + { + return $this->sock; + } + + public function select($sec, $usec) + { + $read = array($this->sock); + $write = null; + $except = null; + return stream_select($read, $write, $except, $sec, $usec); + } +} \ No newline at end of file diff --git a/vendor/php-amqplib/php-amqplib/README.md b/vendor/php-amqplib/php-amqplib/README.md new file mode 100644 index 0000000000..cb74e07eca --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/README.md @@ -0,0 +1,147 @@ +# php-amqplib # + +[![Build Status](https://secure.travis-ci.org/videlalvaro/php-amqplib.png)](http://travis-ci.org/videlalvaro/php-amqplib) + +This library is a _pure PHP_ implementation of the AMQP protocol. It's been tested against [RabbitMQ](http://www.rabbitmq.com/). + +**Requirements: PHP 5.3** due to the use of `namespaces`. + +## BC BREAKING CHANGES ## + +Since version 2.0 this library uses `AMQP 0.9.1` by default. You shouldn't need to change your code, but test before upgrading. + +## New since version 2.0 ## + +Since now the library uses `AMQP 0.9.1` we added support for the following RabbitMQ extensions: + +* Exchange to Exchange Bindings +* Basic Nack + +Extensions that modify existing methods like `alternate exchanges` are also supported. + +## Setup ## + +Get the library source code: + +```bash +$ git clone git://github.com/videlalvaro/php-amqplib.git +``` + +Class autoloading and dependencies are managed by `composer` so install it: + +```bash +$ curl --silent https://getcomposer.org/installer | php +``` + +And then install the library dependencies and genereta the `autoload.php` file: + + $ php composer.phar install + +## Usage ## + +With RabbitMQ running open two Terminals and on the first one execute the following commands to start the consumer: + +```bash +$ cd php-amqplib/demo +$ php amqp_consumer.php +``` + +Then on the other Terminal do: + +```bash +$ cd php-amqplib/demo +$ php amqp_publisher.php some text to publish +``` + +You should see the message arriving to the process on the other Terminal + +Then to stop the consumer, send to it the `quit` message: + +```bash +$ php amqp_publisher.php quit +``` + +If you need to listen to the sockets used to connect to RabbitMQ then see the example in the non blocking consumer. + +```bash +$ php amqp_consumer_non_blocking.php +``` + +## More Examples ## + +- `amqp_ha_consumer.php`: demoes the use of mirrored queues +- `amqp_consumer_exclusive.php` and `amqp_publisher_exclusive.php`: demoes fanout exchanges using exclusive queues. +- `amqp_consumer_fanout_{1,2}.php` and `amqp_publisher_fanout.php`: demoes fanout exchanges with named queues. +- `basic_get.php`: demoes obtaining messages from the queues by using the _basic get_ AMQP call. + +## Debugging ## + +If you want to know what's going on at a protocol level then add the following constant to your code: + +```php + +``` + +## Benchmarks ## + +To run the publishing/consume benchmark type: + +```bash +$ make benchmark +``` + +## Tests ## + +To successfully run the tests you need to first setup the test `user` and test `virtual host`. + +You can do that by running the following commands after starting RabbitMQ: + +```bash +$ rabbitmqctl add_vhost phpamqplib_testbed +$ rabbitmqctl add_user phpamqplib phpamqplib_password +$ rabbitmqctl set_permissions -p phpamqplib_testbed phpamqplib ".*" ".*" ".*" +``` + +Once your environment is set up you can run your tests like this: + +```bash +$ make test +``` + +## Using AMQP 0.8 ## + +If you still want to use the old version of the protcol then you can do it by settings the following constant in your configuration code: + +```php +define('AMQP_PROTOCOL', '0.8'); +``` + +The default value is `'0.9.1'`. + +## Original README: ## + +Below is the original README file content. Credits goes to the original authors. + +PHP library implementing Advanced Message Queuing Protocol (AMQP). + +The library is port of python code of py-amqplib +http://barryp.org/software/py-amqplib/ + +It have been tested with RabbitMQ server. + +Project home page: http://code.google.com/p/php-amqplib/ + +For discussion, please join the group: + +http://groups.google.com/group/php-amqplib-devel + +For bug reports, please use bug tracking system at the project page. + +Patches are very welcome! + +Author: Vadim Zaliva diff --git a/vendor/php-amqplib/php-amqplib/benchmark/consumer.php b/vendor/php-amqplib/php-amqplib/benchmark/consumer.php new file mode 100644 index 0000000000..301e6f5ce9 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/benchmark/consumer.php @@ -0,0 +1,47 @@ +channel(); + +$ch->queue_declare($queue, false, false, false, false); +$ch->exchange_declare($exchange, 'direct', false, false, false); +$ch->queue_bind($queue, $exchange); + +class consumer +{ + protected $msgCount = 0; + protected $startTime = null; + + public function process_message($msg) + { + if ($this->startTime === null) { + $this->startTime = microtime(true); + } + + if ($msg->body == 'quit') { + echo sprintf("Pid: %s, Count: %s, Time: %.4f\n", getmypid(), $this->msgCount, microtime(true) - $this->startTime); + die; + } + $this->msgCount++; + } +} + +$ch->basic_consume($queue, '', false, true, false, false, array(new Consumer(), 'process_message')); + +function shutdown($ch, $conn) +{ + $ch->close(); + $conn->close(); +} +register_shutdown_function('shutdown', $ch, $conn); + +while (count($ch->callbacks)) { + $ch->wait(); +} diff --git a/vendor/php-amqplib/php-amqplib/benchmark/file_consume.php b/vendor/php-amqplib/php-amqplib/benchmark/file_consume.php new file mode 100644 index 0000000000..e1bebca084 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/benchmark/file_consume.php @@ -0,0 +1,51 @@ +channel(); + +$ch->queue_declare($queue, false, false, false, false); +$ch->exchange_declare($exchange, 'direct', false, false, false); +$ch->queue_bind($queue, $exchange); + +class Consumer +{ + protected $msgCount = 0; + protected $startTime = null; + + public function process_message($msg) + { + if ($this->startTime === null) { + $this->startTime = microtime(true); + } + + if ($msg->body == 'quit') { + echo sprintf("Pid: %s, Count: %s, Time: %.4f\n", getmypid(), $this->msgCount, microtime(true) - $this->startTime); + die; + } + $this->msgCount++; + } +} + +$ch->basic_consume($queue, '', false, true, false, false, array(new Consumer(), 'process_message')); + +function shutdown($ch, $conn) +{ + $ch->close(); + $conn->close(); +} +register_shutdown_function('shutdown', $ch, $conn); + +while (count($ch->callbacks)) { + $ch->wait(); +} diff --git a/vendor/php-amqplib/php-amqplib/benchmark/file_publish.php b/vendor/php-amqplib/php-amqplib/benchmark/file_publish.php new file mode 100644 index 0000000000..ea94590737 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/benchmark/file_publish.php @@ -0,0 +1,64 @@ +channel(); + +$ch->queue_declare($queue, false, false, false, false); +$ch->exchange_declare($exchange, 'direct', false, false, false); +$ch->queue_bind($queue, $exchange); + +$max = isset($argv[1]) ? (int) $argv[1] : 1; +$msg_size = 1024*1024*5+1; +$msg_body = generate_random_content($msg_size); + +$msg = new AMQPMessage($msg_body); + +$time = microtime(true); + +// Publishes $max messages using $msg_body as the content. +for ($i = 0; $i < $max; $i++) { + $ch->basic_publish($msg, $exchange); +} + +echo microtime(true) - $time, "\n"; + +$ch->basic_publish(new AMQPMessage('quit'), $exchange); + +$ch->close(); +$conn->close(); diff --git a/vendor/php-amqplib/php-amqplib/benchmark/producer.php b/vendor/php-amqplib/php-amqplib/benchmark/producer.php new file mode 100644 index 0000000000..b848731b12 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/benchmark/producer.php @@ -0,0 +1,55 @@ +channel(); + +$ch->queue_declare($queue, false, false, false, false); + +$ch->exchange_declare($exchange, 'direct', false, false, false); + +$ch->queue_bind($queue, $exchange); + +$msg_body = <<basic_publish($msg, $exchange); +} + +echo microtime(true) - $time, "\n"; + +$ch->basic_publish(new AMQPMessage('quit'), $exchange); + +$ch->close(); +$conn->close(); diff --git a/vendor/php-amqplib/php-amqplib/benchmark/socket_tmp_produce.php b/vendor/php-amqplib/php-amqplib/benchmark/socket_tmp_produce.php new file mode 100644 index 0000000000..ebb8535889 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/benchmark/socket_tmp_produce.php @@ -0,0 +1,42 @@ +channel(); + list($queue,) = $ch->queue_declare("", false, false, true, true); + $msg = new AMQPMessage($msg_body); + $ch->basic_publish($msg, "", $queue); + $ch->close(); + +} + +echo microtime(true) - $time, "\n"; +$conn->close(); diff --git a/vendor/php-amqplib/php-amqplib/benchmark/stream_tmp_produce.php b/vendor/php-amqplib/php-amqplib/benchmark/stream_tmp_produce.php new file mode 100644 index 0000000000..b1a0ea359b --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/benchmark/stream_tmp_produce.php @@ -0,0 +1,41 @@ +channel(); + list($queue,) = $ch->queue_declare("", false, false, true, true); + $msg = new AMQPMessage($msg_body); + $ch->basic_publish($msg, "", $queue); + $ch->close(); +} + +echo microtime(true) - $time, "\n"; +$conn->close(); diff --git a/vendor/php-amqplib/php-amqplib/bin/ci/before_build.sh b/vendor/php-amqplib/php-amqplib/bin/ci/before_build.sh new file mode 100755 index 0000000000..3cade66276 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/bin/ci/before_build.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +curl --silent https://getcomposer.org/installer | php +php composer.phar install + +# phpamqplib:phpamqplib_password has full access to phpamqplib_testbed + +sudo rabbitmqctl add_vhost phpamqplib_testbed +sudo rabbitmqctl add_user phpamqplib phpamqplib_password +sudo rabbitmqctl set_permissions -p phpamqplib_testbed phpamqplib ".*" ".*" ".*" diff --git a/vendor/php-amqplib/php-amqplib/composer.json b/vendor/php-amqplib/php-amqplib/composer.json new file mode 100644 index 0000000000..d12d2d569f --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/composer.json @@ -0,0 +1,19 @@ +{ + "name": "videlalvaro/php-amqplib", + "type": "library", + "description": "This library is a pure PHP implementation of the AMQP protocol. It's been tested against RabbitMQ.", + "keywords": ["rabbitmq", "message", "queue"], + "homepage": "https://github.com/videlalvaro/php-amqplib/", + "authors": [ + { + "name" : "Alvaro Videla" + } + ], + "require": { + "php": ">=5.3.0" + }, + "autoload": { + "psr-0": {"PhpAmqpLib": ""} + }, + "license": "LGPL-2.1" +} diff --git a/vendor/php-amqplib/php-amqplib/demo/amqp_consumer.php b/vendor/php-amqplib/php-amqplib/demo/amqp_consumer.php new file mode 100644 index 0000000000..9a3788ffd6 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/demo/amqp_consumer.php @@ -0,0 +1,78 @@ +channel(); + +/* + The following code is the same both in the consumer and the producer. + In this way we are sure we always have a queue to consume from and an + exchange where to publish messages. +*/ + +/* + name: $queue + passive: false + durable: true // the queue will survive server restarts + exclusive: false // the queue can be accessed in other channels + auto_delete: false //the queue won't be deleted once the channel is closed. +*/ +$ch->queue_declare($queue, false, true, false, false); + +/* + name: $exchange + type: direct + passive: false + durable: true // the exchange will survive server restarts + auto_delete: false //the exchange won't be deleted once the channel is closed. +*/ + +$ch->exchange_declare($exchange, 'direct', false, true, false); + +$ch->queue_bind($queue, $exchange); + +function process_message($msg) +{ + echo "\n--------\n"; + echo $msg->body; + echo "\n--------\n"; + + $msg->delivery_info['channel']-> + basic_ack($msg->delivery_info['delivery_tag']); + + // Send a message with the string "quit" to cancel the consumer. + if ($msg->body === 'quit') { + $msg->delivery_info['channel']-> + basic_cancel($msg->delivery_info['consumer_tag']); + } +} + +/* + queue: Queue from where to get the messages + consumer_tag: Consumer identifier + no_local: Don't receive messages published by this consumer. + no_ack: Tells the server if the consumer will acknowledge the messages. + exclusive: Request exclusive consumer access, meaning only this consumer can access the queue + nowait: + callback: A PHP Callback +*/ + +$ch->basic_consume($queue, $consumer_tag, false, false, false, false, 'process_message'); + +function shutdown($ch, $conn) +{ + $ch->close(); + $conn->close(); +} +register_shutdown_function('shutdown', $ch, $conn); + +// Loop as long as the channel has callbacks registered +while (count($ch->callbacks)) { + $ch->wait(); +} diff --git a/vendor/php-amqplib/php-amqplib/demo/amqp_consumer_exclusive.php b/vendor/php-amqplib/php-amqplib/demo/amqp_consumer_exclusive.php new file mode 100644 index 0000000000..c9bf7463f8 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/demo/amqp_consumer_exclusive.php @@ -0,0 +1,79 @@ +channel(); + +/* + name: $queue // should be unique in fanout exchange. Let RabbitMQ create + // a queue name for us + passive: false // don't check if a queue with the same name exists + durable: false // the queue will not survive server restarts + exclusive: true // the queue can not be accessed by other channels + auto_delete: true //the queue will be deleted once the channel is closed. +*/ +list($queue_name, ,)=$ch->queue_declare($queue, false, false, true, true); + +/* + name: $exchange + type: direct + passive: false // don't check if a exchange with the same name exists + durable: false // the exchange will not survive server restarts + auto_delete: true //the exchange will be deleted once the channel is closed. +*/ + +$ch->exchange_declare($exchange, 'fanout', false, false, true); + +$ch->queue_bind($queue_name, $exchange); + +function process_message($msg) +{ + echo "\n--------\n"; + echo $msg->body; + echo "\n--------\n"; + + $msg->delivery_info['channel']-> + basic_ack($msg->delivery_info['delivery_tag']); + + // Send a message with the string "quit" to cancel the consumer. + if ($msg->body === 'quit') { + $msg->delivery_info['channel']-> + basic_cancel($msg->delivery_info['consumer_tag']); + } +} + +/* + queue: Queue from where to get the messages + consumer_tag: Consumer identifier + no_local: Don't receive messages published by this consumer. + no_ack: Tells the server if the consumer will acknowledge the messages. + exclusive: Request exclusive consumer access, meaning only this consumer can access the queue + nowait: don't wait for a server response. In case of error the server will raise a channel + exception + callback: A PHP Callback +*/ + +$ch->basic_consume($queue_name, $consumer_tag, false, false, true, false, 'process_message'); + +function shutdown($ch, $conn) +{ + $ch->close(); + $conn->close(); +} +register_shutdown_function('shutdown', $ch, $conn); + +// Loop as long as the channel has callbacks registered +while (count($ch->callbacks)) { + $ch->wait(); +} diff --git a/vendor/php-amqplib/php-amqplib/demo/amqp_consumer_fanout_1.php b/vendor/php-amqplib/php-amqplib/demo/amqp_consumer_fanout_1.php new file mode 100644 index 0000000000..253e8c3782 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/demo/amqp_consumer_fanout_1.php @@ -0,0 +1,76 @@ +channel(); + +/* + name: $queue // should be unique in fanout exchange. + passive: false // don't check if a queue with the same name exists + durable: false // the queue will not survive server restarts + exclusive: false // the queue might be accessed by other channels + auto_delete: true //the queue will be deleted once the channel is closed. +*/ +$ch->queue_declare($queue, false, false, false, true); + +/* + name: $exchange + type: direct + passive: false // don't check if a exchange with the same name exists + durable: false // the exchange will not survive server restarts + auto_delete: true //the exchange will be deleted once the channel is closed. +*/ + +$ch->exchange_declare($exchange, 'fanout', false, false, true); + +$ch->queue_bind($queue, $exchange); + +function process_message($msg) +{ + echo "\n--------\n"; + echo $msg->body; + echo "\n--------\n"; + + $msg->delivery_info['channel']-> + basic_ack($msg->delivery_info['delivery_tag']); + + // Send a message with the string "quit" to cancel the consumer. + if ($msg->body === 'quit') { + $msg->delivery_info['channel']-> + basic_cancel($msg->delivery_info['consumer_tag']); + } +} + +/* + queue: Queue from where to get the messages + consumer_tag: Consumer identifier + no_local: Don't receive messages published by this consumer. + no_ack: Tells the server if the consumer will acknowledge the messages. + exclusive: Request exclusive consumer access, meaning only this consumer can access the queue + nowait: don't wait for a server response. In case of error the server will raise a channel + exception + callback: A PHP Callback +*/ + +$ch->basic_consume($queue, $consumer_tag, false, false, false, false, 'process_message'); + +function shutdown($ch, $conn) +{ + $ch->close(); + $conn->close(); +} +register_shutdown_function('shutdown', $ch, $conn); + +// Loop as long as the channel has callbacks registered +while (count($ch->callbacks)) { + $ch->wait(); +} diff --git a/vendor/php-amqplib/php-amqplib/demo/amqp_consumer_fanout_2.php b/vendor/php-amqplib/php-amqplib/demo/amqp_consumer_fanout_2.php new file mode 100644 index 0000000000..c3f04d0f31 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/demo/amqp_consumer_fanout_2.php @@ -0,0 +1,76 @@ +channel(); + +/* + name: $queue // should be unique in fanout exchange. + passive: false // don't check if a queue with the same name exists + durable: false // the queue will not survive server restarts + exclusive: false // the queue might be accessed by other channels + auto_delete: true //the queue will be deleted once the channel is closed. +*/ +$ch->queue_declare($queue, false, false, false, true); + +/* + name: $exchange + type: direct + passive: false // don't check if a exchange with the same name exists + durable: false // the exchange will not survive server restarts + auto_delete: true //the exchange will be deleted once the channel is closed. +*/ + +$ch->exchange_declare($exchange, 'fanout', false, false, true); + +$ch->queue_bind($queue, $exchange); + +function process_message($msg) +{ + echo "\n--------\n"; + echo $msg->body; + echo "\n--------\n"; + + $msg->delivery_info['channel']-> + basic_ack($msg->delivery_info['delivery_tag']); + + // Send a message with the string "quit" to cancel the consumer. + if ($msg->body === 'quit') { + $msg->delivery_info['channel']-> + basic_cancel($msg->delivery_info['consumer_tag']); + } +} + +/* + queue: Queue from where to get the messages + consumer_tag: Consumer identifier + no_local: Don't receive messages published by this consumer. + no_ack: Tells the server if the consumer will acknowledge the messages. + exclusive: Request exclusive consumer access, meaning only this consumer can access the queue + nowait: don't wait for a server response. In case of error the server will raise a channel + exception + callback: A PHP Callback +*/ + +$ch->basic_consume($queue, $consumer_tag, false, false, false, false, 'process_message'); + +function shutdown($ch, $conn) +{ + $ch->close(); + $conn->close(); +} +register_shutdown_function('shutdown', $ch, $conn); + +// Loop as long as the channel has callbacks registered +while (count($ch->callbacks)) { + $ch->wait(); +} diff --git a/vendor/php-amqplib/php-amqplib/demo/amqp_consumer_non_blocking.php b/vendor/php-amqplib/php-amqplib/demo/amqp_consumer_non_blocking.php new file mode 100644 index 0000000000..612fea364d --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/demo/amqp_consumer_non_blocking.php @@ -0,0 +1,85 @@ +channel(); + +/* + The following code is the same both in the consumer and the producer. + In this way we are sure we always have a queue to consume from and an + exchange where to publish messages. +*/ + +/* + name: $queue + passive: false + durable: true // the queue will survive server restarts + exclusive: false // the queue can be accessed in other channels + auto_delete: false //the queue won't be deleted once the channel is closed. +*/ +$ch->queue_declare($queue, false, true, false, false); + +/* + name: $exchange + type: direct + passive: false + durable: true // the exchange will survive server restarts + auto_delete: false //the exchange won't be deleted once the channel is closed. +*/ + +$ch->exchange_declare($exchange, 'direct', false, true, false); + +$ch->queue_bind($queue, $exchange); + +function process_message($msg) +{ + echo "\n--------\n"; + echo $msg->body; + echo "\n--------\n"; + + $msg->delivery_info['channel']-> + basic_ack($msg->delivery_info['delivery_tag']); + + // Send a message with the string "quit" to cancel the consumer. + if ($msg->body === 'quit') { + $msg->delivery_info['channel']-> + basic_cancel($msg->delivery_info['consumer_tag']); + } +} + +/* + queue: Queue from where to get the messages + consumer_tag: Consumer identifier + no_local: Don't receive messages published by this consumer. + no_ack: Tells the server if the consumer will acknowledge the messages. + exclusive: Request exclusive consumer access, meaning only this consumer can access the queue + nowait: + callback: A PHP Callback +*/ + +$ch->basic_consume($queue, $consumer_tag, false, false, false, false, 'process_message'); + +function shutdown($ch, $conn) +{ + $ch->close(); + $conn->close(); +} +register_shutdown_function('shutdown', $ch, $conn); + +// Loop as long as the channel has callbacks registered +while (count($ch->callbacks)) { + $read = array($conn->getSocket()); // add here other sockets that you need to attend + $write = null; + $except = null; + if (false === ($num_changed_streams = stream_select($read, $write, $except, 60))) { + /* Error handling */ + } elseif ($num_changed_streams > 0) { + $ch->wait(); + } +} diff --git a/vendor/php-amqplib/php-amqplib/demo/amqp_ha_consumer.php b/vendor/php-amqplib/php-amqplib/demo/amqp_ha_consumer.php new file mode 100644 index 0000000000..f82d150fb4 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/demo/amqp_ha_consumer.php @@ -0,0 +1,102 @@ +channel(); + +/* + The following code is the same both in the consumer and the producer. + In this way we are sure we always have a queue to consume from and an + exchange where to publish messages. +*/ + +$ha_connection = array( + 'x-ha-policy' => array( + 'S', 'all' + ), +); + +$ha_specific_connection = array( + 'x-ha-policy' => array( + 'S', 'nodes' + ), + 'x-ha-policy-params' => array( + 'A', array( + 'rabbit@' . HOST, + 'hare@' . HOST, + ), + ), +); + +/* + name: $queue + passive: false + durable: true // the queue will survive server restarts + exclusive: false // the queue can be accessed in other channels + auto_delete: false //the queue won't be deleted once the channel is closed. + nowait: false // Doesn't wait on replies for certain things. + parameters: array // How you send certain extra data to the queue declare +*/ +$ch->queue_declare($queue, false, false, false, false, false, $ha_connection); +$ch->queue_declare($specific_queue, false, false, false, false, false, $ha_specific_connection); + +/* + name: $exchange + type: direct + passive: false + durable: true // the exchange will survive server restarts + auto_delete: false //the exchange won't be deleted once the channel is closed. +*/ + +$ch->exchange_declare($exchange, 'direct', false, true, false); + +$ch->queue_bind($queue, $exchange); +$ch->queue_bind($specific_queue, $exchange); + +function process_message($msg) +{ + echo "\n--------\n"; + echo $msg->body; + echo "\n--------\n"; + + $msg->delivery_info['channel']-> + basic_ack($msg->delivery_info['delivery_tag']); + + // Send a message with the string "quit" to cancel the consumer. + if ($msg->body === 'quit') { + $msg->delivery_info['channel']-> + basic_cancel($msg->delivery_info['consumer_tag']); + } +} + +/* + queue: Queue from where to get the messages + consumer_tag: Consumer identifier + no_local: Don't receive messages published by this consumer. + no_ack: Tells the server if the consumer will acknowledge the messages. + exclusive: Request exclusive consumer access, meaning only this consumer can access the queue + nowait: + callback: A PHP Callback +*/ + +$ch->basic_consume($queue, $consumer_tag, false, false, false, false, 'process_message'); + +function shutdown($ch, $conn) +{ + $ch->close(); + $conn->close(); +} +register_shutdown_function('shutdown', $ch, $conn); + +// Loop as long as the channel has callbacks registered +while (count($ch->callbacks)) { + $ch->wait(); +} diff --git a/vendor/php-amqplib/php-amqplib/demo/amqp_publisher.php b/vendor/php-amqplib/php-amqplib/demo/amqp_publisher.php new file mode 100644 index 0000000000..1167f11885 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/demo/amqp_publisher.php @@ -0,0 +1,45 @@ +channel(); + +/* + The following code is the same both in the consumer and the producer. + In this way we are sure we always have a queue to consume from and an + exchange where to publish messages. +*/ + +/* + name: $queue + passive: false + durable: true // the queue will survive server restarts + exclusive: false // the queue can be accessed in other channels + auto_delete: false //the queue won't be deleted once the channel is closed. +*/ +$ch->queue_declare($queue, false, true, false, false); + +/* + name: $exchange + type: direct + passive: false + durable: true // the exchange will survive server restarts + auto_delete: false //the exchange won't be deleted once the channel is closed. +*/ + +$ch->exchange_declare($exchange, 'direct', false, true, false); + +$ch->queue_bind($queue, $exchange); + +$msg_body = implode(' ', array_slice($argv, 1)); +$msg = new AMQPMessage($msg_body, array('content_type' => 'text/plain', 'delivery_mode' => 2)); +$ch->basic_publish($msg, $exchange); + +$ch->close(); +$conn->close(); diff --git a/vendor/php-amqplib/php-amqplib/demo/amqp_publisher_exclusive.php b/vendor/php-amqplib/php-amqplib/demo/amqp_publisher_exclusive.php new file mode 100644 index 0000000000..5777875a1d --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/demo/amqp_publisher_exclusive.php @@ -0,0 +1,27 @@ +channel(); + +/* + name: $exchange + type: fanout + passive: false // don't check is an exchange with the same name exists + durable: false // the exchange won't survive server restarts + auto_delete: true //the exchange will be deleted once the channel is closed. +*/ + +$ch->exchange_declare($exchange, 'fanout', false, false, true); + +$msg_body = implode(' ', array_slice($argv, 1)); +$msg = new AMQPMessage($msg_body,array('content_type' => 'text/plain')); +$ch->basic_publish($msg, $exchange); + +$ch->close(); +$conn->close(); diff --git a/vendor/php-amqplib/php-amqplib/demo/amqp_publisher_fanout.php b/vendor/php-amqplib/php-amqplib/demo/amqp_publisher_fanout.php new file mode 100644 index 0000000000..c271aabc73 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/demo/amqp_publisher_fanout.php @@ -0,0 +1,27 @@ +channel(); + +/* + name: $exchange + type: fanout + passive: false // don't check is an exchange with the same name exists + durable: false // the exchange won't survive server restarts + auto_delete: true //the exchange will be deleted once the channel is closed. +*/ + +$ch->exchange_declare($exchange, 'fanout', false, false, true); + +$msg_body = implode(' ', array_slice($argv, 1)); +$msg = new AMQPMessage($msg_body,array('content_type' => 'text/plain')); +$ch->basic_publish($msg, $exchange); + +$ch->close(); +$conn->close(); diff --git a/vendor/php-amqplib/php-amqplib/demo/basic_get.php b/vendor/php-amqplib/php-amqplib/demo/basic_get.php new file mode 100644 index 0000000000..9d87e80064 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/demo/basic_get.php @@ -0,0 +1,50 @@ +channel(); + +/* + The following code is the same both in the consumer and the producer. + In this way we are sure we always have a queue to consume from and an + exchange where to publish messages. +*/ + +/* + name: $queue + passive: false + durable: true // the queue will survive server restarts + exclusive: false // the queue can be accessed in other channels + auto_delete: false //the queue won't be deleted once the channel is closed. +*/ +$ch->queue_declare($queue, false, true, false, false); + +/* + name: $exchange + type: direct + passive: false + durable: true // the exchange will survive server restarts + auto_delete: false //the exchange won't be deleted once the channel is closed. +*/ + +$ch->exchange_declare($exchange, 'direct', false, true, false); + +$ch->queue_bind($queue, $exchange); + +$toSend = new AMQPMessage('test message', array('content_type' => 'text/plain', 'delivery_mode' => 2)); +$ch->basic_publish($toSend, $exchange); + +$msg = $ch->basic_get($queue); + +$ch->basic_ack($msg->delivery_info['delivery_tag']); + +var_dump($msg->body); + +$ch->close(); +$conn->close(); diff --git a/vendor/php-amqplib/php-amqplib/demo/basic_return.php b/vendor/php-amqplib/php-amqplib/demo/basic_return.php new file mode 100644 index 0000000000..80e294cad8 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/demo/basic_return.php @@ -0,0 +1,50 @@ +channel(); + +// declare exchange but don`t bind any queue +$channel->exchange_declare('hidden_exchange', 'topic'); + +$msg = new AMQPMessage("Hello World!"); + +echo " [x] Sent non-mandatory ..."; +$channel->basic_publish($msg, + 'hidden_exchange', + 'rkey'); +echo " done.\n"; + +$wait = true; + +$return_listener = function ($reply_code, $reply_text, + $exchange, $routing_key, $msg) use ($wait) { + $GLOBALS['wait'] = false; + + echo "return: ", + $reply_code, "\n", + $reply_text, "\n", + $exchange, "\n", + $routing_key, "\n", + $msg->body, "\n"; +}; + +$channel->set_return_listener($return_listener); + +echo " [x] Sent mandatory ... "; +$channel->basic_publish($msg, + 'hidden_exchange', + 'rkey', + true ); +echo " done.\n"; + +while ($wait) { + $channel->wait(); +} + +$channel->close(); +$connection->close(); diff --git a/vendor/php-amqplib/php-amqplib/demo/queue_arguments.php b/vendor/php-amqplib/php-amqplib/demo/queue_arguments.php new file mode 100644 index 0000000000..45e9e1c4b5 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/demo/queue_arguments.php @@ -0,0 +1,23 @@ +channel(); + +$ch->queue_declare('test11', false, true, false, false, false, + array( + "x-dead-letter-exchange" => array("S", "t_test1"), + "x-message-ttl" => array("I", 15000), + "x-expires" => array("I", 16000) + )); + +$ch->close(); +$conn->close(); diff --git a/vendor/php-amqplib/php-amqplib/demo/ssl_connection.php b/vendor/php-amqplib/php-amqplib/demo/ssl_connection.php new file mode 100644 index 0000000000..382fce8803 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/demo/ssl_connection.php @@ -0,0 +1,24 @@ + CERTS_PATH . '/rmqca/cacert.pem', + 'local_cert' => CERTS_PATH . '/phpcert.pem', + 'verify_peer' => true + ); + +$conn = new AMQPSSLConnection(HOST, PORT, USER, PASS, VHOST, $ssl_options); + +function shutdown($conn) +{ + $conn->close(); +} + +register_shutdown_function('shutdown', $conn); + +while (true) {} diff --git a/vendor/php-amqplib/php-amqplib/doc/AMQPMessage.md b/vendor/php-amqplib/php-amqplib/doc/AMQPMessage.md new file mode 100644 index 0000000000..709416b748 --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/doc/AMQPMessage.md @@ -0,0 +1,63 @@ +# AMQPMessage # + +## Message Durability ## + +When creating a new message set the `delivery_mode` to __2__: + + $msg = new AMQPMessage( + $msg_body, + array( + 'delivery_mode' = 2 + ) + ); + +## Supported message properties ## + + "content_type" => "shortstr", + "content_encoding" => "shortstr", + "application_headers" => "table", + "delivery_mode" => "octet", + "priority" => "octet", + "correlation_id" => "shortstr", + "reply_to" => "shortstr", + "expiration" => "shortstr", + "message_id" => "shortstr", + "timestamp" => "timestamp", + "type" => "shortstr", + "user_id" => "shortstr", + "app_id" => "shortstr", + "cluster_id" => "shortst" + + +Getting message properties: + + $msg->get('correlation_id'); + $msg->get('delivery_mode'); + +## Acknowledging messages ## + +You can acknowledge messages by sending a `basic_ack` on the channel: + + $msg->delivery_info['channel']-> + basic_ack($msg->delivery_info['delivery_tag']); + +Keep in mind that the `delivery_tag` has to be valid so most of the time just use the one provide by the server. + +If you don't want to access the `delivery_info` array directly you can also use `$msg->get('delivery_tag')` but keep in mind that's slower than just accessing the array by key. + +## What's on the delivery info? ## + +When RabbitMQ delivers a message the library will add the following `delivery_info` to the message: + + $delivery_info = array( + "channel" => $this, + "consumer_tag" => $consumer_tag, + "delivery_tag" => $delivery_tag, + "redelivered" => $redelivered, + "exchange" => $exchange, + "routing_key" => $routing_key + ); + +They can also be accessed using the AMQPMessage::get function: + + $msg->get('channel'); \ No newline at end of file diff --git a/vendor/php-amqplib/php-amqplib/phpunit.xml b/vendor/php-amqplib/php-amqplib/phpunit.xml new file mode 100644 index 0000000000..600cfe752a --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/phpunit.xml @@ -0,0 +1,10 @@ + + + + PhpAmqpLib/Tests/Unit + + + PhpAmqpLib/Tests/Functional + + + \ No newline at end of file diff --git a/vendor/php-amqplib/php-amqplib/spec/amqp-rabbitmq-0.8.json b/vendor/php-amqplib/php-amqplib/spec/amqp-rabbitmq-0.8.json new file mode 100644 index 0000000000..08f3066c9a --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/spec/amqp-rabbitmq-0.8.json @@ -0,0 +1,659 @@ +{ + "name": "AMQP", + "major-version": 8, + "minor-version": 0, + "port": 5672, + "copyright": [ + "Copyright (C) 2008-2012 VMware, Inc.\n", + "\n", + "Permission is hereby granted, free of charge, to any person\n", + "obtaining a copy of this file (the \"Software\"), to deal in the\n", + "Software without restriction, including without limitation the \n", + "rights to use, copy, modify, merge, publish, distribute, \n", + "sublicense, and/or sell copies of the Software, and to permit \n", + "persons to whom the Software is furnished to do so, subject to \n", + "the following conditions:\n", + "\n", + "The above copyright notice and this permission notice shall be\n", + "included in all copies or substantial portions of the Software.\n", + "\n", + "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n", + "EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n", + "OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n", + "NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n", + "HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n", + "WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n", + "FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n", + "OTHER DEALINGS IN THE SOFTWARE.\n", + "\n", + "Class information entered from amqp_xml0-8.pdf and domain types from amqp-xml-doc0-9.pdf\n", + "\n", + "b3cb053f15e7b98808c0ccc67f23cb3e amqp_xml0-8.pdf\n", + "http://www.twiststandards.org/index.php?option=com_docman&task=cat_view&gid=28&&Itemid=90\n", + "8444db91e2949dbecfb2585e9eef6d64 amqp-xml-doc0-9.pdf\n", + "https://jira.amqp.org/confluence/download/attachments/720900/amqp-xml-doc0-9.pdf?version=1\n"], + + "domains": [ + ["access-ticket", "short"], + ["bit", "bit"], + ["channel-id", "longstr"], + ["class-id", "short"], + ["consumer-tag", "shortstr"], + ["delivery-tag", "longlong"], + ["destination", "shortstr"], + ["duration", "longlong"], + ["exchange-name", "shortstr"], + ["known-hosts", "shortstr"], + ["long", "long"], + ["longlong", "longlong"], + ["longstr", "longstr"], + ["method-id", "short"], + ["no-ack", "bit"], + ["no-local", "bit"], + ["octet", "octet"], + ["offset", "longlong"], + ["path", "shortstr"], + ["peer-properties", "table"], + ["queue-name", "shortstr"], + ["redelivered", "bit"], + ["reference", "longstr"], + ["reject-code", "short"], + ["reject-text", "shortstr"], + ["reply-code", "short"], + ["reply-text", "shortstr"], + ["security-token", "longstr"], + ["short", "short"], + ["shortstr", "shortstr"], + ["table", "table"], + ["timestamp", "timestamp"] + ], + + "constants": [ + {"name": "FRAME-METHOD", "value": 1}, + {"name": "FRAME-HEADER", "value": 2}, + {"name": "FRAME-BODY", "value": 3}, + {"name": "FRAME-OOB-METHOD", "value": 4}, + {"name": "FRAME-OOB-HEADER", "value": 5}, + {"name": "FRAME-OOB-BODY", "value": 6}, + {"name": "FRAME-TRACE", "value": 7}, + {"name": "FRAME-HEARTBEAT", "value": 8}, + {"name": "FRAME-MIN-SIZE", "value": 4096}, + {"name": "FRAME-END", "value": 206}, + {"name": "REPLY-SUCCESS", "value": 200}, + {"name": "NOT-DELIVERED", "value": 310, "class": "soft-error"}, + {"name": "CONTENT-TOO-LARGE", "value": 311, "class": "soft-error"}, + {"name": "NO-ROUTE", "value": 312, "class": "soft-error"}, + {"name": "NO-CONSUMERS", "value": 313, "class": "soft-error"}, + {"name": "ACCESS-REFUSED", "value": 403, "class": "soft-error"}, + {"name": "NOT-FOUND", "value": 404, "class": "soft-error"}, + {"name": "RESOURCE-LOCKED", "value": 405, "class": "soft-error"}, + {"name": "PRECONDITION-FAILED", "value": 406, "class": "soft-error"}, + {"name": "CONNECTION-FORCED", "value": 320, "class": "hard-error"}, + {"name": "INVALID-PATH", "value": 402, "class": "hard-error"}, + {"name": "FRAME-ERROR", "value": 501, "class": "hard-error"}, + {"name": "SYNTAX-ERROR", "value": 502, "class": "hard-error"}, + {"name": "COMMAND-INVALID", "value": 503, "class": "hard-error"}, + {"name": "CHANNEL-ERROR", "value": 504, "class": "hard-error"}, + {"name": "UNEXPECTED-FRAME", "value": 505, "class": "hard-error"}, + {"name": "RESOURCE-ERROR", "value": 506, "class": "hard-error"}, + {"name": "NOT-ALLOWED", "value": 530, "class": "hard-error"}, + {"name": "NOT-IMPLEMENTED", "value": 540, "class": "hard-error"}, + {"name": "INTERNAL-ERROR", "value": 541, "class": "hard-error"} + ], + + "classes": [ + { + "id": 10, + "methods": [{"id": 10, + "arguments": [{"type": "octet", "name": "version-major", "default-value": 0}, + {"type": "octet", "name": "version-minor", "default-value": 8}, + {"domain": "peer-properties", "name": "server-properties"}, + {"type": "longstr", "name": "mechanisms", "default-value": "PLAIN"}, + {"type": "longstr", "name": "locales", "default-value": "en_US"}], + "name": "start", + "synchronous" : true}, + {"id": 11, + "arguments": [{"domain": "peer-properties", "name": "client-properties"}, + {"type": "shortstr", "name": "mechanism", "default-value": "PLAIN"}, + {"type": "longstr", "name": "response"}, + {"type": "shortstr", "name": "locale", "default-value": "en_US"}], + "name": "start-ok"}, + {"id": 20, + "arguments": [{"type": "longstr", "name": "challenge"}], + "name": "secure", + "synchronous" : true}, + {"id": 21, + "arguments": [{"type": "longstr", "name": "response"}], + "name": "secure-ok"}, + {"id": 30, + "arguments": [{"type": "short", "name": "channel-max", "default-value": 0}, + {"type": "long", "name": "frame-max", "default-value": 0}, + {"type": "short", "name": "heartbeat", "default-value": 0}], + "name": "tune", + "synchronous" : true}, + {"id": 31, + "arguments": [{"type": "short", "name": "channel-max", "default-value": 0}, + {"type": "long", "name": "frame-max", "default-value": 0}, + {"type": "short", "name": "heartbeat", "default-value": 0}], + "name": "tune-ok"}, + {"id": 40, + "arguments": [{"type": "shortstr", "name": "virtual-host", "default-value": "/"}, + {"type": "shortstr", "name": "capabilities", "default-value": ""}, + {"type": "bit", "name": "insist", "default-value": false}], + "name": "open", + "synchronous" : true}, + {"id": 41, + "arguments": [{"type": "shortstr", "name": "known-hosts", "default-value": ""}], + "name": "open-ok"}, + {"id": 50, + "arguments": [{"type": "shortstr", "name": "host"}, + {"type": "shortstr", "name": "known-hosts", "default-value": ""}], + "name": "redirect"}, + {"id": 60, + "arguments": [{"type": "short", "name": "reply-code"}, + {"type": "shortstr", "name": "reply-text", "default-value": ""}, + {"type": "short", "name": "class-id"}, + {"type": "short", "name": "method-id"}], + "name": "close", + "synchronous" : true}, + {"id": 61, + "arguments": [], + "name": "close-ok"}], + "name": "connection", + "properties": [] + }, + { + "id": 20, + "methods": [{"id": 10, + "arguments": [{"type": "shortstr", "name": "out-of-band", "default-value": ""}], + "name": "open", + "synchronous" : true}, + {"id": 11, + "arguments": [], + "name": "open-ok"}, + {"id": 20, + "arguments": [{"type": "bit", "name": "active"}], + "name": "flow", + "synchronous" : true}, + {"id": 21, + "arguments": [{"type": "bit", "name": "active"}], + "name": "flow-ok"}, + {"id": 30, + "arguments": [{"type": "short", "name": "reply-code"}, + {"type": "shortstr", "name": "reply-text", "default-value": ""}, + {"type": "table", "name": "details", "default-value": {}}], + "name": "alert"}, + {"id": 40, + "arguments": [{"type": "short", "name": "reply-code"}, + {"type": "shortstr", "name": "reply-text", "default-value": ""}, + {"type": "short", "name": "class-id"}, + {"type": "short", "name": "method-id"}], + "name": "close", + "synchronous" : true}, + {"id": 41, + "arguments": [], + "name": "close-ok"}], + "name": "channel" + }, + { + "id": 30, + "methods": [{"id": 10, + "arguments": [{"type": "shortstr", "name": "realm", "default-value": "/data"}, + {"type": "bit", "name": "exclusive", "default-value": false}, + {"type": "bit", "name": "passive", "default-value": true}, + {"type": "bit", "name": "active", "default-value": true}, + {"type": "bit", "name": "write", "default-value": true}, + {"type": "bit", "name": "read", "default-value": true}], + "name": "request", + "synchronous" : true}, + {"id": 11, + "arguments": [{"type": "short", "name": "ticket", "default-value": 1}], + "name": "request-ok"}], + "name": "access" + }, + { + "id": 40, + "methods": [{"id": 10, + "arguments": [{"type": "short", "name": "ticket", "default-value": 1}, + {"type": "shortstr", "name": "exchange"}, + {"type": "shortstr", "name": "type", "default-value": "direct"}, + {"type": "bit", "name": "passive", "default-value": false}, + {"type": "bit", "name": "durable", "default-value": false}, + {"type": "bit", "name": "auto-delete", "default-value": false}, + {"type": "bit", "name": "internal", "default-value": false}, + {"type": "bit", "name": "nowait", "default-value": false}, + {"type": "table", "name": "arguments", "default-value": {}}], + "name": "declare", + "synchronous" : true}, + {"id": 11, + "arguments": [], + "name": "declare-ok"}, + {"id": 20, + "arguments": [{"type": "short", "name": "ticket", "default-value": 1}, + {"type": "shortstr", "name": "exchange"}, + {"type": "bit", "name": "if-unused", "default-value": false}, + {"type": "bit", "name": "nowait", "default-value": false}], + "name": "delete", + "synchronous" : true}, + {"id": 21, + "arguments": [], + "name": "delete-ok"}], + "name": "exchange" + }, + { + "id": 50, + "methods": [{"id": 10, + "arguments": [{"type": "short", "name": "ticket", "default-value": 1}, + {"type": "shortstr", "name": "queue", "default-value": ""}, + {"type": "bit", "name": "passive", "default-value": false}, + {"type": "bit", "name": "durable", "default-value": false}, + {"type": "bit", "name": "exclusive", "default-value": false}, + {"type": "bit", "name": "auto-delete", "default-value": false}, + {"type": "bit", "name": "nowait", "default-value": false}, + {"type": "table", "name": "arguments", "default-value": {}}], + "name": "declare", + "synchronous" : true}, + {"id": 11, + "arguments": [{"type": "shortstr", "name": "queue"}, + {"type": "long", "name": "message-count"}, + {"type": "long", "name": "consumer-count"}], + "name": "declare-ok"}, + {"id": 20, + "arguments": [{"type": "short", "name": "ticket", "default-value": 1}, + {"type": "shortstr", "name": "queue", "default-value": ""}, + {"type": "shortstr", "name": "exchange"}, + {"type": "shortstr", "name": "routing-key", "default-value": ""}, + {"type": "bit", "name": "nowait", "default-value": false}, + {"type": "table", "name": "arguments", "default-value": {}}], + "name": "bind", + "synchronous" : true}, + {"id": 21, + "arguments": [], + "name": "bind-ok"}, + {"id": 30, + "arguments": [{"type": "short", "name": "ticket", "default-value": 1}, + {"type": "shortstr", "name": "queue", "default-value": ""}, + {"type": "bit", "name": "nowait", "default-value": false}], + "name": "purge", + "synchronous" : true}, + {"id": 31, + "arguments": [{"type": "long", "name": "message-count"}], + "name": "purge-ok"}, + {"id": 40, + "arguments": [{"type": "short", "name": "ticket", "default-value": 1}, + {"type": "shortstr", "name": "queue", "default-value": ""}, + {"type": "bit", "name": "if-unused", "default-value": false}, + {"type": "bit", "name": "if-empty", "default-value": false}, + {"type": "bit", "name": "nowait", "default-value": false}], + "name": "delete", + "synchronous" : true}, + {"id": 41, + "arguments": [{"type": "long", "name": "message-count"}], + "name": "delete-ok"}, + {"id": 50, + "arguments": [{"type": "short", "name": "ticket", "default-value": 1}, + {"type": "shortstr", "name": "queue", "default-value": ""}, + {"type": "shortstr", "name": "exchange"}, + {"type": "shortstr", "name": "routing-key", "default-value": ""}, + {"type": "table", "name": "arguments", "default-value": {}}], + "name": "unbind", + "synchronous" : true}, + {"id": 51, + "arguments": [], + "name": "unbind-ok"} + ], + "name": "queue" + }, + { + "id": 60, + "methods": [{"id": 10, + "arguments": [{"type": "long", "name": "prefetch-size", "default-value": 0}, + {"type": "short", "name": "prefetch-count", "default-value": 0}, + {"type": "bit", "name": "global", "default-value": false}], + "name": "qos", + "synchronous" : true}, + {"id": 11, + "arguments": [], + "name": "qos-ok"}, + {"id": 20, + "arguments": [{"domain": "access-ticket", "name": "ticket", "default-value": 1}, + {"type": "shortstr", "name": "queue", "default-value": ""}, + {"type": "shortstr", "name": "consumer-tag", "default-value": ""}, + {"type": "bit", "name": "no-local", "default-value": false}, + {"type": "bit", "name": "no-ack", "default-value": false}, + {"type": "bit", "name": "exclusive", "default-value": false}, + {"type": "bit", "name": "nowait", "default-value": false}], + "name": "consume", + "synchronous" : true}, + {"id": 21, + "arguments": [{"type": "shortstr", "name": "consumer-tag"}], + "name": "consume-ok"}, + {"id": 30, + "arguments": [{"type": "shortstr", "name": "consumer-tag"}, + {"type": "bit", "name": "nowait", "default-value": false}], + "name": "cancel", + "synchronous" : true}, + {"id": 31, + "arguments": [{"type": "shortstr", "name": "consumer-tag"}], + "name": "cancel-ok"}, + {"content": true, + "id": 40, + "arguments": [{"type": "short", "name": "ticket", "default-value": 1}, + {"type": "shortstr", "name": "exchange", "default-value": ""}, + {"type": "shortstr", "name": "routing-key", "default-value": ""}, + {"type": "bit", "name": "mandatory", "default-value": false}, + {"type": "bit", "name": "immediate", "default-value": false}], + "name": "publish"}, + {"content": true, + "id": 50, + "arguments": [{"type": "short", "name": "reply-code"}, + {"type": "shortstr", "name": "reply-text", "default-value": ""}, + {"type": "shortstr", "name": "exchange"}, + {"type": "shortstr", "name": "routing-key"}], + "name": "return"}, + {"content": true, + "id": 60, + "arguments": [{"type": "shortstr", "name": "consumer-tag"}, + {"type": "longlong", "name": "delivery-tag"}, + {"type": "bit", "name": "redelivered", "default-value": false}, + {"type": "shortstr", "name": "exchange"}, + {"type": "shortstr", "name": "routing-key"}], + "name": "deliver"}, + {"id": 70, + "arguments": [{"type": "short", "name": "ticket", "default-value": 1}, + {"type": "shortstr", "name": "queue", "default-value": ""}, + {"type": "bit", "name": "no-ack", "default-value": false}], + "name": "get", + "synchronous" : true}, + {"content": true, + "id": 71, + "arguments": [{"type": "longlong", "name": "delivery-tag"}, + {"type": "bit", "name": "redelivered", "default-value": false}, + {"type": "shortstr", "name": "exchange"}, + {"type": "shortstr", "name": "routing-key"}, + {"type": "long", "name": "message-count"}], + "name": "get-ok"}, + {"id": 72, + "arguments": [{"type": "shortstr", "name": "cluster-id", "default-value": ""}], + "name": "get-empty"}, + {"id": 80, + "arguments": [{"type": "longlong", "name": "delivery-tag", "default-value": 0}, + {"type": "bit", "name": "multiple", "default-value": false}], + "name": "ack"}, + {"id": 90, + "arguments": [{"type": "longlong", "name": "delivery-tag"}, + {"type": "bit", "name": "requeue", "default-value": true}], + "name": "reject"}, + {"id": 100, + "arguments": [{"type": "bit", "name": "requeue", "default-value": false}], + "name": "recover-async"}, + {"id": 110, + "arguments": [{"type": "bit", "name": "requeue", "default-value": false}], + "name": "recover", + "synchronous" : true}, + {"id": 111, + "arguments": [], + "name": "recover-ok"}], + "name": "basic", + "properties": [{"type": "shortstr", "name": "content-type"}, + {"type": "shortstr", "name": "content-encoding"}, + {"type": "table", "name": "headers"}, + {"type": "octet", "name": "delivery-mode"}, + {"type": "octet", "name": "priority"}, + {"type": "shortstr", "name": "correlation-id"}, + {"type": "shortstr", "name": "reply-to"}, + {"type": "shortstr", "name": "expiration"}, + {"type": "shortstr", "name": "message-id"}, + {"type": "timestamp", "name": "timestamp"}, + {"type": "shortstr", "name": "type"}, + {"type": "shortstr", "name": "user-id"}, + {"type": "shortstr", "name": "app-id"}, + {"type": "shortstr", "name": "cluster-id"}] + }, + { + "id": 70, + "methods": [{"id": 10, + "arguments": [{"type": "long", "name": "prefetch-size", "default-value": 0}, + {"type": "short", "name": "prefetch-count", "default-value": 0}, + {"type": "bit", "name": "global", "default-value": false}], + "name": "qos", + "synchronous" : true}, + {"id": 11, + "arguments": [], + "name": "qos-ok"}, + {"id": 20, + "arguments": [{"type": "short", "name": "ticket", "default-value": 1}, + {"type": "shortstr", "name": "queue", "default-value": ""}, + {"type": "shortstr", "name": "consumer-tag", "default-value": ""}, + {"type": "bit", "name": "no-local", "default-value": false}, + {"type": "bit", "name": "no-ack", "default-value": false}, + {"type": "bit", "name": "exclusive", "default-value": false}, + {"type": "bit", "name": "nowait", "default-value": false}], + "name": "consume", + "synchronous" : true}, + {"id": 21, + "arguments": [{"type": "shortstr", "name": "consumer-tag"}], + "name": "consume-ok"}, + {"id": 30, + "arguments": [{"type": "shortstr", "name": "consumer-tag"}, + {"type": "bit", "name": "nowait", "default-value": false}], + "name": "cancel", + "synchronous" : true}, + {"id": 31, + "arguments": [{"type": "shortstr", "name": "consumer-tag"}], + "name": "cancel-ok"}, + {"id": 40, + "arguments": [{"type": "shortstr", "name": "identifier"}, + {"type": "longlong", "name": "content-size"}], + "name": "open", + "synchronous" : true}, + {"id": 41, + "arguments": [{"type": "longlong", "name": "staged-size"}], + "name": "open-ok"}, + {"content": true, + "id": 50, + "arguments": [], + "name": "stage"}, + {"id": 60, + "arguments": [{"type": "short", "name": "ticket", "default-value": 1}, + {"type": "shortstr", "name": "exchange", "default-value": ""}, + {"type": "shortstr", "name": "routing-key", "default-value": ""}, + {"type": "bit", "name": "mandatory", "default-value": false}, + {"type": "bit", "name": "immediate", "default-value": false}, + {"type": "shortstr", "name": "identifier"}], + "name": "publish"}, + {"content": true, + "id": 70, + "arguments": [{"type": "short", "name": "reply-code", "default-value": 200}, + {"type": "shortstr", "name": "reply-text", "default-value": ""}, + {"type": "shortstr", "name": "exchange"}, + {"type": "shortstr", "name": "routing-key"}], + "name": "return"}, + {"id": 80, + "arguments": [{"type": "shortstr", "name": "consumer-tag"}, + {"type": "longlong", "name": "delivery-tag"}, + {"type": "bit", "name": "redelivered", "default-value": false}, + {"type": "shortstr", "name": "exchange"}, + {"type": "shortstr", "name": "routing-key"}, + {"type": "shortstr", "name": "identifier"}], + "name": "deliver"}, + {"id": 90, + "arguments": [{"type": "longlong", "name": "delivery-tag", "default-value": 0}, + {"type": "bit", "name": "multiple", "default-value": false}], + "name": "ack"}, + {"id": 100, + "arguments": [{"type": "longlong", "name": "delivery-tag"}, + {"type": "bit", "name": "requeue", "default-value": true}], + "name": "reject"}], + "name": "file", + "properties": [{"type": "shortstr", "name": "content-type"}, + {"type": "shortstr", "name": "content-encoding"}, + {"type": "table", "name": "headers"}, + {"type": "octet", "name": "priority"}, + {"type": "shortstr", "name": "reply-to"}, + {"type": "shortstr", "name": "message-id"}, + {"type": "shortstr", "name": "filename"}, + {"type": "timestamp", "name": "timestamp"}, + {"type": "shortstr", "name": "cluster-id"}] + }, + { + "id": 80, + "methods": [{"id": 10, + "arguments": [{"type": "long", "name": "prefetch-size", "default-value": 0}, + {"type": "short", "name": "prefetch-count", "default-value": 0}, + {"type": "long", "name": "consume-rate", "default-value": 0}, + {"type": "bit", "name": "global", "default-value": false}], + "name": "qos", + "synchronous" : true}, + {"id": 11, + "arguments": [], + "name": "qos-ok"}, + {"id": 20, + "arguments": [{"type": "short", "name": "ticket", "default-value": 1}, + {"type": "shortstr", "name": "queue", "default-value": ""}, + {"type": "shortstr", "name": "consumer-tag", "default-value": ""}, + {"type": "bit", "name": "no-local", "default-value": false}, + {"type": "bit", "name": "exclusive", "default-value": false}, + {"type": "bit", "name": "nowait", "default-value": false}], + "name": "consume", + "synchronous" : true}, + {"id": 21, + "arguments": [{"type": "shortstr", "name": "consumer-tag"}], + "name": "consume-ok"}, + {"id": 30, + "arguments": [{"type": "shortstr", "name": "consumer-tag"}, + {"type": "bit", "name": "nowait", "default-value": false}], + "name": "cancel", + "synchronous" : true}, + {"id": 31, + "arguments": [{"type": "shortstr", "name": "consumer-tag"}], + "name": "cancel-ok"}, + {"content": true, + "id": 40, + "arguments": [{"type": "short", "name": "ticket", "default-value": 1}, + {"type": "shortstr", "name": "exchange", "default-value": ""}, + {"type": "shortstr", "name": "routing-key", "default-value": ""}, + {"type": "bit", "name": "mandatory", "default-value": false}, + {"type": "bit", "name": "immediate", "default-value": false}], + "name": "publish"}, + {"content": true, + "id": 50, + "arguments": [{"type": "short", "name": "reply-code", "default-value": 200}, + {"type": "shortstr", "name": "reply-text", "default-value": ""}, + {"type": "shortstr", "name": "exchange"}, + {"type": "shortstr", "name": "routing-key"}], + "name": "return"}, + {"content": true, + "id": 60, + "arguments": [{"type": "shortstr", "name": "consumer-tag"}, + {"type": "longlong", "name": "delivery-tag"}, + {"type": "shortstr", "name": "exchange"}, + {"type": "shortstr", "name": "queue"}], + "name": "deliver"}], + "name": "stream", + "properties": [{"type": "shortstr", "name": "content-type"}, + {"type": "shortstr", "name": "content-encoding"}, + {"type": "table", "name": "headers"}, + {"type": "octet", "name": "priority"}, + {"type": "timestamp", "name": "timestamp"}] + }, + { + "id": 90, + "methods": [{"id": 10, + "arguments": [], + "name": "select", + "synchronous" : true}, + {"id": 11, + "arguments": [], + "name": "select-ok"}, + {"id": 20, + "arguments": [], + "name": "commit", + "synchronous" : true}, + {"id": 21, + "arguments": [], + "name": "commit-ok"}, + {"id": 30, + "arguments": [], + "name": "rollback", + "synchronous" : true}, + {"id": 31, + "arguments": [], + "name": "rollback-ok"}], + "name": "tx" + }, + { + "id": 100, + "methods": [{"id": 10, + "arguments": [], + "name": "select", + "synchronous" : true}, + {"id": 11, + "arguments": [], + "name": "select-ok"}, + {"id": 20, + "arguments": [{"type": "shortstr", "name": "dtx-identifier"}], + "name": "start", + "synchronous" : true}, + {"id": 21, + "arguments": [], "name": "start-ok"}], + "name": "dtx" + }, + { + "id": 110, + "methods": [{"content": true, + "id": 10, + "arguments": [{"type": "table", "name": "meta-data"}], + "name": "request"}], + "name": "tunnel", + "properties": [{"type": "table", "name": "headers"}, + {"type": "shortstr", "name": "proxy-name"}, + {"type": "shortstr", "name": "data-name"}, + {"type": "octet", "name": "durable"}, + {"type": "octet", "name": "broadcast"}] + }, + { + "id": 120, + "methods": [{"id": 10, + "arguments": [{"type": "octet", "name": "integer-1"}, + {"type": "short", "name": "integer-2"}, + {"type": "long", "name": "integer-3"}, + {"type": "longlong", "name": "integer-4"}, + {"type": "octet", "name": "operation"}], + "name": "integer", + "synchronous" : true}, + {"id": 11, + "arguments": [{"type": "longlong", "name": "result"}], + "name": "integer-ok"}, + {"id": 20, + "arguments": [{"type": "shortstr", "name": "string-1"}, + {"type": "longstr", "name": "string-2"}, + {"type": "octet", "name": "operation"}], + "name": "string", + "synchronous" : true}, + {"id": 21, + "arguments": [{"type": "longstr", "name": "result"}], + "name": "string-ok"}, + {"id": 30, + "arguments": [{"type": "table", "name": "table"}, + {"type": "octet", "name": "integer-op"}, + {"type": "octet", "name": "string-op"}], + "name": "table", + "synchronous" : true}, + {"id": 31, + "arguments": [{"type": "longlong", "name": "integer-result"}, + {"type": "longstr", "name": "string-result"}], + "name": "table-ok"}, + {"content": true, + "id": 40, + "arguments": [], + "name": "content", + "synchronous" : true}, + {"content": true, + "id": 41, + "arguments": [{"type": "long", "name": "content-checksum"}], + "name": "content-ok"}], + "name": "test" + } + ] +} diff --git a/vendor/php-amqplib/php-amqplib/spec/amqp-rabbitmq-0.9.1.json b/vendor/php-amqplib/php-amqplib/spec/amqp-rabbitmq-0.9.1.json new file mode 100644 index 0000000000..9e6d55ef5e --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/spec/amqp-rabbitmq-0.9.1.json @@ -0,0 +1,467 @@ +{ + "name": "AMQP", + "major-version": 0, + "minor-version": 9, + "revision": 1, + "port": 5672, + "copyright": [ + "Copyright (C) 2008-2012 VMware, Inc.\n", + "\n", + "Permission is hereby granted, free of charge, to any person\n", + "obtaining a copy of this file (the \"Software\"), to deal in the\n", + "Software without restriction, including without limitation the \n", + "rights to use, copy, modify, merge, publish, distribute, \n", + "sublicense, and/or sell copies of the Software, and to permit \n", + "persons to whom the Software is furnished to do so, subject to \n", + "the following conditions:\n", + "\n", + "The above copyright notice and this permission notice shall be\n", + "included in all copies or substantial portions of the Software.\n", + "\n", + "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n", + "EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n", + "OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n", + "NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n", + "HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n", + "WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n", + "FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n", + "OTHER DEALINGS IN THE SOFTWARE.\n", + "\n", + "Class information entered from amqp_xml0-8.pdf and domain types from amqp-xml-doc0-9.pdf\n", + "Updated for 0-9-1 by Tony Garnock-Jones\n", + "\n", + "b3cb053f15e7b98808c0ccc67f23cb3e amqp_xml0-8.pdf\n", + "http://www.twiststandards.org/index.php?option=com_docman&task=cat_view&gid=28&&Itemid=90\n", + "8444db91e2949dbecfb2585e9eef6d64 amqp-xml-doc0-9.pdf\n", + "https://jira.amqp.org/confluence/download/attachments/720900/amqp-xml-doc0-9.pdf?version=1\n"], + + "domains": [ + ["bit", "bit"], + ["channel-id", "longstr"], + ["class-id", "short"], + ["consumer-tag", "shortstr"], + ["delivery-tag", "longlong"], + ["destination", "shortstr"], + ["duration", "longlong"], + ["exchange-name", "shortstr"], + ["long", "long"], + ["longlong", "longlong"], + ["longstr", "longstr"], + ["method-id", "short"], + ["no-ack", "bit"], + ["no-local", "bit"], + ["octet", "octet"], + ["offset", "longlong"], + ["path", "shortstr"], + ["peer-properties", "table"], + ["queue-name", "shortstr"], + ["redelivered", "bit"], + ["reference", "longstr"], + ["reject-code", "short"], + ["reject-text", "shortstr"], + ["reply-code", "short"], + ["reply-text", "shortstr"], + ["security-token", "longstr"], + ["short", "short"], + ["shortstr", "shortstr"], + ["table", "table"], + ["timestamp", "timestamp"] + ], + + "constants": [ + {"name": "FRAME-METHOD", "value": 1}, + {"name": "FRAME-HEADER", "value": 2}, + {"name": "FRAME-BODY", "value": 3}, + {"name": "FRAME-HEARTBEAT", "value": 8}, + {"name": "FRAME-MIN-SIZE", "value": 4096}, + {"name": "FRAME-END", "value": 206}, + {"name": "REPLY-SUCCESS", "value": 200}, + {"name": "CONTENT-TOO-LARGE", "value": 311, "class": "soft-error"}, + {"name": "NO-ROUTE", "value": 312, "class": "soft-error"}, + {"name": "NO-CONSUMERS", "value": 313, "class": "soft-error"}, + {"name": "ACCESS-REFUSED", "value": 403, "class": "soft-error"}, + {"name": "NOT-FOUND", "value": 404, "class": "soft-error"}, + {"name": "RESOURCE-LOCKED", "value": 405, "class": "soft-error"}, + {"name": "PRECONDITION-FAILED", "value": 406, "class": "soft-error"}, + {"name": "CONNECTION-FORCED", "value": 320, "class": "hard-error"}, + {"name": "INVALID-PATH", "value": 402, "class": "hard-error"}, + {"name": "FRAME-ERROR", "value": 501, "class": "hard-error"}, + {"name": "SYNTAX-ERROR", "value": 502, "class": "hard-error"}, + {"name": "COMMAND-INVALID", "value": 503, "class": "hard-error"}, + {"name": "CHANNEL-ERROR", "value": 504, "class": "hard-error"}, + {"name": "UNEXPECTED-FRAME", "value": 505, "class": "hard-error"}, + {"name": "RESOURCE-ERROR", "value": 506, "class": "hard-error"}, + {"name": "NOT-ALLOWED", "value": 530, "class": "hard-error"}, + {"name": "NOT-IMPLEMENTED", "value": 540, "class": "hard-error"}, + {"name": "INTERNAL-ERROR", "value": 541, "class": "hard-error"} + ], + + "classes": [ + { + "id": 10, + "methods": [{"id": 10, + "arguments": [{"type": "octet", "name": "version-major", "default-value": 0}, + {"type": "octet", "name": "version-minor", "default-value": 9}, + {"domain": "peer-properties", "name": "server-properties"}, + {"type": "longstr", "name": "mechanisms", "default-value": "PLAIN"}, + {"type": "longstr", "name": "locales", "default-value": "en_US"}], + "name": "start", + "synchronous" : true}, + {"id": 11, + "arguments": [{"domain": "peer-properties", "name": "client-properties"}, + {"type": "shortstr", "name": "mechanism", "default-value": "PLAIN"}, + {"type": "longstr", "name": "response"}, + {"type": "shortstr", "name": "locale", "default-value": "en_US"}], + "name": "start-ok"}, + {"id": 20, + "arguments": [{"type": "longstr", "name": "challenge"}], + "name": "secure", + "synchronous" : true}, + {"id": 21, + "arguments": [{"type": "longstr", "name": "response"}], + "name": "secure-ok"}, + {"id": 30, + "arguments": [{"type": "short", "name": "channel-max", "default-value": 0}, + {"type": "long", "name": "frame-max", "default-value": 0}, + {"type": "short", "name": "heartbeat", "default-value": 0}], + "name": "tune", + "synchronous" : true}, + {"id": 31, + "arguments": [{"type": "short", "name": "channel-max", "default-value": 0}, + {"type": "long", "name": "frame-max", "default-value": 0}, + {"type": "short", "name": "heartbeat", "default-value": 0}], + "name": "tune-ok"}, + {"id": 40, + "arguments": [{"type": "shortstr", "name": "virtual-host", "default-value": "/"}, + {"type": "shortstr", "name": "capabilities", "default-value": ""}, + {"type": "bit", "name": "insist", "default-value": false}], + "name": "open", + "synchronous" : true}, + {"id": 41, + "arguments": [{"type": "shortstr", "name": "known-hosts", "default-value": ""}], + "name": "open-ok"}, + {"id": 50, + "arguments": [{"type": "short", "name": "reply-code"}, + {"type": "shortstr", "name": "reply-text", "default-value": ""}, + {"type": "short", "name": "class-id"}, + {"type": "short", "name": "method-id"}], + "name": "close", + "synchronous" : true}, + {"id": 51, + "arguments": [], + "name": "close-ok"}], + "name": "connection", + "properties": [] + }, + { + "id": 20, + "methods": [{"id": 10, + "arguments": [{"type": "shortstr", "name": "out-of-band", "default-value": ""}], + "name": "open", + "synchronous" : true}, + {"id": 11, + "arguments": [{"type": "longstr", "name": "channel-id", "default-value": ""}], + "name": "open-ok"}, + {"id": 20, + "arguments": [{"type": "bit", "name": "active"}], + "name": "flow", + "synchronous" : true}, + {"id": 21, + "arguments": [{"type": "bit", "name": "active"}], + "name": "flow-ok"}, + {"id": 40, + "arguments": [{"type": "short", "name": "reply-code"}, + {"type": "shortstr", "name": "reply-text", "default-value": ""}, + {"type": "short", "name": "class-id"}, + {"type": "short", "name": "method-id"}], + "name": "close", + "synchronous" : true}, + {"id": 41, + "arguments": [], + "name": "close-ok"}], + "name": "channel" + }, + { + "id": 30, + "methods": [{"id": 10, + "arguments": [{"type": "shortstr", "name": "realm", "default-value": "/data"}, + {"type": "bit", "name": "exclusive", "default-value": false}, + {"type": "bit", "name": "passive", "default-value": true}, + {"type": "bit", "name": "active", "default-value": true}, + {"type": "bit", "name": "write", "default-value": true}, + {"type": "bit", "name": "read", "default-value": true}], + "name": "request", + "synchronous" : true}, + {"id": 11, + "arguments": [{"type": "short", "name": "ticket", "default-value": 1}], + "name": "request-ok"}], + "name": "access" + }, + { + "id": 40, + "methods": [{"id": 10, + "arguments": [{"type": "short", "name": "ticket", "default-value": 0}, + {"type": "shortstr", "name": "exchange"}, + {"type": "shortstr", "name": "type", "default-value": "direct"}, + {"type": "bit", "name": "passive", "default-value": false}, + {"type": "bit", "name": "durable", "default-value": false}, + {"type": "bit", "name": "auto-delete", "default-value": false}, + {"type": "bit", "name": "internal", "default-value": false}, + {"type": "bit", "name": "nowait", "default-value": false}, + {"type": "table", "name": "arguments", "default-value": {}}], + "name": "declare", + "synchronous" : true}, + {"id": 11, + "arguments": [], + "name": "declare-ok"}, + {"id": 20, + "arguments": [{"type": "short", "name": "ticket", "default-value": 0}, + {"type": "shortstr", "name": "exchange"}, + {"type": "bit", "name": "if-unused", "default-value": false}, + {"type": "bit", "name": "nowait", "default-value": false}], + "name": "delete", + "synchronous" : true}, + {"id": 21, + "arguments": [], + "name": "delete-ok"}, + {"id": 30, + "arguments": [{"type": "short", "name": "ticket", "default-value": 0}, + {"type": "shortstr", "name": "destination"}, + {"type": "shortstr", "name": "source"}, + {"type": "shortstr", "name": "routing-key", "default-value": ""}, + {"type": "bit", "name": "nowait", "default-value": false}, + {"type": "table", "name": "arguments", "default-value": {}}], + "name": "bind", + "synchronous" : true}, + {"id": 31, + "arguments": [], + "name": "bind-ok"}, + {"id": 40, + "arguments": [{"type": "short", "name": "ticket", "default-value": 0}, + {"type": "shortstr", "name": "destination"}, + {"type": "shortstr", "name": "source"}, + {"type": "shortstr", "name": "routing-key", "default-value": ""}, + {"type": "bit", "name": "nowait", "default-value": false}, + {"type": "table", "name": "arguments", "default-value": {}}], + "name": "unbind", + "synchronous" : true}, + {"id": 51, + "arguments": [], + "name": "unbind-ok"}], + "name": "exchange" + }, + { + "id": 50, + "methods": [{"id": 10, + "arguments": [{"type": "short", "name": "ticket", "default-value": 0}, + {"type": "shortstr", "name": "queue", "default-value": ""}, + {"type": "bit", "name": "passive", "default-value": false}, + {"type": "bit", "name": "durable", "default-value": false}, + {"type": "bit", "name": "exclusive", "default-value": false}, + {"type": "bit", "name": "auto-delete", "default-value": false}, + {"type": "bit", "name": "nowait", "default-value": false}, + {"type": "table", "name": "arguments", "default-value": {}}], + "name": "declare", + "synchronous" : true}, + {"id": 11, + "arguments": [{"type": "shortstr", "name": "queue"}, + {"type": "long", "name": "message-count"}, + {"type": "long", "name": "consumer-count"}], + "name": "declare-ok"}, + {"id": 20, + "arguments": [{"type": "short", "name": "ticket", "default-value": 0}, + {"type": "shortstr", "name": "queue", "default-value": ""}, + {"type": "shortstr", "name": "exchange"}, + {"type": "shortstr", "name": "routing-key", "default-value": ""}, + {"type": "bit", "name": "nowait", "default-value": false}, + {"type": "table", "name": "arguments", "default-value": {}}], + "name": "bind", + "synchronous" : true}, + {"id": 21, + "arguments": [], + "name": "bind-ok"}, + {"id": 30, + "arguments": [{"type": "short", "name": "ticket", "default-value": 0}, + {"type": "shortstr", "name": "queue", "default-value": ""}, + {"type": "bit", "name": "nowait", "default-value": false}], + "name": "purge", + "synchronous" : true}, + {"id": 31, + "arguments": [{"type": "long", "name": "message-count"}], + "name": "purge-ok"}, + {"id": 40, + "arguments": [{"type": "short", "name": "ticket", "default-value": 0}, + {"type": "shortstr", "name": "queue", "default-value": ""}, + {"type": "bit", "name": "if-unused", "default-value": false}, + {"type": "bit", "name": "if-empty", "default-value": false}, + {"type": "bit", "name": "nowait", "default-value": false}], + "name": "delete", + "synchronous" : true}, + {"id": 41, + "arguments": [{"type": "long", "name": "message-count"}], + "name": "delete-ok"}, + {"id": 50, + "arguments": [{"type": "short", "name": "ticket", "default-value": 0}, + {"type": "shortstr", "name": "queue", "default-value": ""}, + {"type": "shortstr", "name": "exchange"}, + {"type": "shortstr", "name": "routing-key", "default-value": ""}, + {"type": "table", "name": "arguments", "default-value": {}}], + "name": "unbind", + "synchronous" : true}, + {"id": 51, + "arguments": [], + "name": "unbind-ok"} + ], + "name": "queue" + }, + { + "id": 60, + "methods": [{"id": 10, + "arguments": [{"type": "long", "name": "prefetch-size", "default-value": 0}, + {"type": "short", "name": "prefetch-count", "default-value": 0}, + {"type": "bit", "name": "global", "default-value": false}], + "name": "qos", + "synchronous" : true}, + {"id": 11, + "arguments": [], + "name": "qos-ok"}, + {"id": 20, + "arguments": [{"domain": "short", "name": "ticket", "default-value": 0}, + {"type": "shortstr", "name": "queue", "default-value": ""}, + {"type": "shortstr", "name": "consumer-tag", "default-value": ""}, + {"type": "bit", "name": "no-local", "default-value": false}, + {"type": "bit", "name": "no-ack", "default-value": false}, + {"type": "bit", "name": "exclusive", "default-value": false}, + {"type": "bit", "name": "nowait", "default-value": false}, + {"type": "table", "name": "arguments", "default-value": {}}], + "name": "consume", + "synchronous" : true}, + {"id": 21, + "arguments": [{"type": "shortstr", "name": "consumer-tag"}], + "name": "consume-ok"}, + {"id": 30, + "arguments": [{"type": "shortstr", "name": "consumer-tag"}, + {"type": "bit", "name": "nowait", "default-value": false}], + "name": "cancel", + "synchronous" : true}, + {"id": 31, + "arguments": [{"type": "shortstr", "name": "consumer-tag"}], + "name": "cancel-ok"}, + {"content": true, + "id": 40, + "arguments": [{"type": "short", "name": "ticket", "default-value": 0}, + {"type": "shortstr", "name": "exchange", "default-value": ""}, + {"type": "shortstr", "name": "routing-key", "default-value": ""}, + {"type": "bit", "name": "mandatory", "default-value": false}, + {"type": "bit", "name": "immediate", "default-value": false}], + "name": "publish"}, + {"content": true, + "id": 50, + "arguments": [{"type": "short", "name": "reply-code"}, + {"type": "shortstr", "name": "reply-text", "default-value": ""}, + {"type": "shortstr", "name": "exchange"}, + {"type": "shortstr", "name": "routing-key"}], + "name": "return"}, + {"content": true, + "id": 60, + "arguments": [{"type": "shortstr", "name": "consumer-tag"}, + {"type": "longlong", "name": "delivery-tag"}, + {"type": "bit", "name": "redelivered", "default-value": false}, + {"type": "shortstr", "name": "exchange"}, + {"type": "shortstr", "name": "routing-key"}], + "name": "deliver"}, + {"id": 70, + "arguments": [{"type": "short", "name": "ticket", "default-value": 0}, + {"type": "shortstr", "name": "queue", "default-value": ""}, + {"type": "bit", "name": "no-ack", "default-value": false}], + "name": "get", + "synchronous" : true}, + {"content": true, + "id": 71, + "arguments": [{"type": "longlong", "name": "delivery-tag"}, + {"type": "bit", "name": "redelivered", "default-value": false}, + {"type": "shortstr", "name": "exchange"}, + {"type": "shortstr", "name": "routing-key"}, + {"type": "long", "name": "message-count"}], + "name": "get-ok"}, + {"id": 72, + "arguments": [{"type": "shortstr", "name": "cluster-id", "default-value": ""}], + "name": "get-empty"}, + {"id": 80, + "arguments": [{"type": "longlong", "name": "delivery-tag", "default-value": 0}, + {"type": "bit", "name": "multiple", "default-value": false}], + "name": "ack"}, + {"id": 90, + "arguments": [{"type": "longlong", "name": "delivery-tag"}, + {"type": "bit", "name": "requeue", "default-value": true}], + "name": "reject"}, + {"id": 100, + "arguments": [{"type": "bit", "name": "requeue", "default-value": false}], + "name": "recover-async"}, + {"id": 110, + "arguments": [{"type": "bit", "name": "requeue", "default-value": false}], + "name": "recover", + "synchronous" : true}, + {"id": 111, + "arguments": [], + "name": "recover-ok"}, + {"id": 120, + "arguments": [{"type": "longlong", "name": "delivery-tag", "default-value": 0}, + {"type": "bit", "name": "multiple", "default-value": false}, + {"type": "bit", "name": "requeue", "default-value": true}], + "name": "nack"}], + "name": "basic", + "properties": [{"type": "shortstr", "name": "content-type"}, + {"type": "shortstr", "name": "content-encoding"}, + {"type": "table", "name": "headers"}, + {"type": "octet", "name": "delivery-mode"}, + {"type": "octet", "name": "priority"}, + {"type": "shortstr", "name": "correlation-id"}, + {"type": "shortstr", "name": "reply-to"}, + {"type": "shortstr", "name": "expiration"}, + {"type": "shortstr", "name": "message-id"}, + {"type": "timestamp", "name": "timestamp"}, + {"type": "shortstr", "name": "type"}, + {"type": "shortstr", "name": "user-id"}, + {"type": "shortstr", "name": "app-id"}, + {"type": "shortstr", "name": "cluster-id"}] + }, + { + "id": 90, + "methods": [{"id": 10, + "arguments": [], + "name": "select", + "synchronous" : true}, + {"id": 11, + "arguments": [], + "name": "select-ok"}, + {"id": 20, + "arguments": [], + "name": "commit", + "synchronous" : true}, + {"id": 21, + "arguments": [], + "name": "commit-ok"}, + {"id": 30, + "arguments": [], + "name": "rollback", + "synchronous" : true}, + {"id": 31, + "arguments": [], + "name": "rollback-ok"}], + "name": "tx" + }, + { + "id": 85, + "methods": [{"id": 10, + "arguments": [ + {"type": "bit", "name": "nowait", "default-value": false}], + "name": "select", + "synchronous": true}, + {"id": 11, + "arguments": [], + "name": "select-ok"}], + "name": "confirm" + } + ] +} diff --git a/vendor/php-amqplib/php-amqplib/spec/parser.php b/vendor/php-amqplib/php-amqplib/spec/parser.php new file mode 100644 index 0000000000..fd276bc61b --- /dev/null +++ b/vendor/php-amqplib/php-amqplib/spec/parser.php @@ -0,0 +1,226 @@ +write_" . argument_type($domains, $arg) . '($' . to_snake_case($arg['name']) . ");\n"; +} + +function call_read_argument($domains, $arg) { + return "\$args->read_" . argument_type($domains, $arg) . "();\n"; +} + +function protocol_version($json_spec) { + if (isset($json_spec['revision'])) { + return $json_spec['major-version'] . $json_spec['minor-version'] . $json_spec['revision']; + } else { + return "0" . $json_spec['major-version'] . $json_spec['minor-version']; + } +} + +function protocol_header($json_spec) { + if (isset($json_spec['revision'])) { + return sprintf("AMQP\x%02x\x%02x\x%02x\x%02x", 0, $json_spec['major-version'], $json_spec['minor-version'], $json_spec['revision']); + } else { + return sprintf("AMQP\x%02x\x%02x\x%02x\x%02x", 1, 1, $json_spec['major-version'],$json_spec['minor-version']); + } +} + +$out = "wait[\$method];\n"; +$out .= "\t}\n"; +$out .= "}\n"; + +file_put_contents(__DIR__ . '/../PhpAmqpLib/Helper/Protocol/Wait' . protocol_version($json_spec) . '.php', $out); + +function method_map($json_spec) { + $ret = array(); + foreach ($json_spec['classes'] as $c) { + foreach($c['methods'] as $m) { + $ret[$c['id'] . "," . $m['id']] = $c['name'] . '_' . to_snake_case($m['name']); + } + } + return var_export($ret, true); +} + +$out = "method_map[\$method_sig];\n"; +$out .= "\t}\n"; +$out .= "\tpublic function valid_method(\$method_sig) {\n"; +$out .= "\t\treturn array_key_exists(\$method_sig, \$this->method_map);\n"; +$out .= "\t}\n"; +$out .= "}\n"; + +file_put_contents(__DIR__ . '/../PhpAmqpLib/Helper/Protocol/MethodMap' . protocol_version($json_spec) . '.php', $out); \ No newline at end of file diff --git a/vendor/phpmailer/phpmailer/LICENSE b/vendor/phpmailer/phpmailer/LICENSE new file mode 100644 index 0000000000..8e0763d1c2 --- /dev/null +++ b/vendor/phpmailer/phpmailer/LICENSE @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/lib/phpmailer/PHPMailerAutoload.php b/vendor/phpmailer/phpmailer/PHPMailerAutoload.php similarity index 100% rename from lib/phpmailer/PHPMailerAutoload.php rename to vendor/phpmailer/phpmailer/PHPMailerAutoload.php diff --git a/vendor/phpmailer/phpmailer/VERSION b/vendor/phpmailer/phpmailer/VERSION new file mode 100644 index 0000000000..567eefa2cd --- /dev/null +++ b/vendor/phpmailer/phpmailer/VERSION @@ -0,0 +1 @@ +5.2.21 diff --git a/vendor/phpmailer/phpmailer/class.phpmailer.php b/vendor/phpmailer/phpmailer/class.phpmailer.php new file mode 100644 index 0000000000..8ff13f1104 --- /dev/null +++ b/vendor/phpmailer/phpmailer/class.phpmailer.php @@ -0,0 +1,4025 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2014 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * PHPMailer - PHP email creation and transport class. + * @package PHPMailer + * @author Marcus Bointon (Synchro/coolbru) + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + */ +class PHPMailer +{ + /** + * The PHPMailer Version number. + * @var string + */ + public $Version = '5.2.21'; + + /** + * Email priority. + * Options: null (default), 1 = High, 3 = Normal, 5 = low. + * When null, the header is not set at all. + * @var integer + */ + public $Priority = null; + + /** + * The character set of the message. + * @var string + */ + public $CharSet = 'iso-8859-1'; + + /** + * The MIME Content-type of the message. + * @var string + */ + public $ContentType = 'text/plain'; + + /** + * The message encoding. + * Options: "8bit", "7bit", "binary", "base64", and "quoted-printable". + * @var string + */ + public $Encoding = '8bit'; + + /** + * Holds the most recent mailer error message. + * @var string + */ + public $ErrorInfo = ''; + + /** + * The From email address for the message. + * @var string + */ + public $From = 'root@localhost'; + + /** + * The From name of the message. + * @var string + */ + public $FromName = 'Root User'; + + /** + * The Sender email (Return-Path) of the message. + * If not empty, will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode. + * @var string + */ + public $Sender = ''; + + /** + * The Return-Path of the message. + * If empty, it will be set to either From or Sender. + * @var string + * @deprecated Email senders should never set a return-path header; + * it's the receiver's job (RFC5321 section 4.4), so this no longer does anything. + * @link https://tools.ietf.org/html/rfc5321#section-4.4 RFC5321 reference + */ + public $ReturnPath = ''; + + /** + * The Subject of the message. + * @var string + */ + public $Subject = ''; + + /** + * An HTML or plain text message body. + * If HTML then call isHTML(true). + * @var string + */ + public $Body = ''; + + /** + * The plain-text message body. + * This body can be read by mail clients that do not have HTML email + * capability such as mutt & Eudora. + * Clients that can read HTML will view the normal Body. + * @var string + */ + public $AltBody = ''; + + /** + * An iCal message part body. + * Only supported in simple alt or alt_inline message types + * To generate iCal events, use the bundled extras/EasyPeasyICS.php class or iCalcreator + * @link http://sprain.ch/blog/downloads/php-class-easypeasyics-create-ical-files-with-php/ + * @link http://kigkonsult.se/iCalcreator/ + * @var string + */ + public $Ical = ''; + + /** + * The complete compiled MIME message body. + * @access protected + * @var string + */ + protected $MIMEBody = ''; + + /** + * The complete compiled MIME message headers. + * @var string + * @access protected + */ + protected $MIMEHeader = ''; + + /** + * Extra headers that createHeader() doesn't fold in. + * @var string + * @access protected + */ + protected $mailHeader = ''; + + /** + * Word-wrap the message body to this number of chars. + * Set to 0 to not wrap. A useful value here is 78, for RFC2822 section 2.1.1 compliance. + * @var integer + */ + public $WordWrap = 0; + + /** + * Which method to use to send mail. + * Options: "mail", "sendmail", or "smtp". + * @var string + */ + public $Mailer = 'mail'; + + /** + * The path to the sendmail program. + * @var string + */ + public $Sendmail = '/usr/sbin/sendmail'; + + /** + * Whether mail() uses a fully sendmail-compatible MTA. + * One which supports sendmail's "-oi -f" options. + * @var boolean + */ + public $UseSendmailOptions = true; + + /** + * Path to PHPMailer plugins. + * Useful if the SMTP class is not in the PHP include path. + * @var string + * @deprecated Should not be needed now there is an autoloader. + */ + public $PluginDir = ''; + + /** + * The email address that a reading confirmation should be sent to, also known as read receipt. + * @var string + */ + public $ConfirmReadingTo = ''; + + /** + * The hostname to use in the Message-ID header and as default HELO string. + * If empty, PHPMailer attempts to find one with, in order, + * $_SERVER['SERVER_NAME'], gethostname(), php_uname('n'), or the value + * 'localhost.localdomain'. + * @var string + */ + public $Hostname = ''; + + /** + * An ID to be used in the Message-ID header. + * If empty, a unique id will be generated. + * You can set your own, but it must be in the format "", + * as defined in RFC5322 section 3.6.4 or it will be ignored. + * @see https://tools.ietf.org/html/rfc5322#section-3.6.4 + * @var string + */ + public $MessageID = ''; + + /** + * The message Date to be used in the Date header. + * If empty, the current date will be added. + * @var string + */ + public $MessageDate = ''; + + /** + * SMTP hosts. + * Either a single hostname or multiple semicolon-delimited hostnames. + * You can also specify a different port + * for each host by using this format: [hostname:port] + * (e.g. "smtp1.example.com:25;smtp2.example.com"). + * You can also specify encryption type, for example: + * (e.g. "tls://smtp1.example.com:587;ssl://smtp2.example.com:465"). + * Hosts will be tried in order. + * @var string + */ + public $Host = 'localhost'; + + /** + * The default SMTP server port. + * @var integer + * @TODO Why is this needed when the SMTP class takes care of it? + */ + public $Port = 25; + + /** + * The SMTP HELO of the message. + * Default is $Hostname. If $Hostname is empty, PHPMailer attempts to find + * one with the same method described above for $Hostname. + * @var string + * @see PHPMailer::$Hostname + */ + public $Helo = ''; + + /** + * What kind of encryption to use on the SMTP connection. + * Options: '', 'ssl' or 'tls' + * @var string + */ + public $SMTPSecure = ''; + + /** + * Whether to enable TLS encryption automatically if a server supports it, + * even if `SMTPSecure` is not set to 'tls'. + * Be aware that in PHP >= 5.6 this requires that the server's certificates are valid. + * @var boolean + */ + public $SMTPAutoTLS = true; + + /** + * Whether to use SMTP authentication. + * Uses the Username and Password properties. + * @var boolean + * @see PHPMailer::$Username + * @see PHPMailer::$Password + */ + public $SMTPAuth = false; + + /** + * Options array passed to stream_context_create when connecting via SMTP. + * @var array + */ + public $SMTPOptions = array(); + + /** + * SMTP username. + * @var string + */ + public $Username = ''; + + /** + * SMTP password. + * @var string + */ + public $Password = ''; + + /** + * SMTP auth type. + * Options are CRAM-MD5, LOGIN, PLAIN, NTLM, XOAUTH2, attempted in that order if not specified + * @var string + */ + public $AuthType = ''; + + /** + * SMTP realm. + * Used for NTLM auth + * @var string + */ + public $Realm = ''; + + /** + * SMTP workstation. + * Used for NTLM auth + * @var string + */ + public $Workstation = ''; + + /** + * The SMTP server timeout in seconds. + * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2 + * @var integer + */ + public $Timeout = 300; + + /** + * SMTP class debug output mode. + * Debug output level. + * Options: + * * `0` No output + * * `1` Commands + * * `2` Data and commands + * * `3` As 2 plus connection status + * * `4` Low-level data output + * @var integer + * @see SMTP::$do_debug + */ + public $SMTPDebug = 0; + + /** + * How to handle debug output. + * Options: + * * `echo` Output plain-text as-is, appropriate for CLI + * * `html` Output escaped, line breaks converted to `
            `, appropriate for browser output + * * `error_log` Output to error log as configured in php.ini + * + * Alternatively, you can provide a callable expecting two params: a message string and the debug level: + * + * $mail->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";}; + * + * @var string|callable + * @see SMTP::$Debugoutput + */ + public $Debugoutput = 'echo'; + + /** + * Whether to keep SMTP connection open after each message. + * If this is set to true then to close the connection + * requires an explicit call to smtpClose(). + * @var boolean + */ + public $SMTPKeepAlive = false; + + /** + * Whether to split multiple to addresses into multiple messages + * or send them all in one message. + * Only supported in `mail` and `sendmail` transports, not in SMTP. + * @var boolean + */ + public $SingleTo = false; + + /** + * Storage for addresses when SingleTo is enabled. + * @var array + * @TODO This should really not be public + */ + public $SingleToArray = array(); + + /** + * Whether to generate VERP addresses on send. + * Only applicable when sending via SMTP. + * @link https://en.wikipedia.org/wiki/Variable_envelope_return_path + * @link http://www.postfix.org/VERP_README.html Postfix VERP info + * @var boolean + */ + public $do_verp = false; + + /** + * Whether to allow sending messages with an empty body. + * @var boolean + */ + public $AllowEmpty = false; + + /** + * The default line ending. + * @note The default remains "\n". We force CRLF where we know + * it must be used via self::CRLF. + * @var string + */ + public $LE = "\n"; + + /** + * DKIM selector. + * @var string + */ + public $DKIM_selector = ''; + + /** + * DKIM Identity. + * Usually the email address used as the source of the email. + * @var string + */ + public $DKIM_identity = ''; + + /** + * DKIM passphrase. + * Used if your key is encrypted. + * @var string + */ + public $DKIM_passphrase = ''; + + /** + * DKIM signing domain name. + * @example 'example.com' + * @var string + */ + public $DKIM_domain = ''; + + /** + * DKIM private key file path. + * @var string + */ + public $DKIM_private = ''; + + /** + * DKIM private key string. + * If set, takes precedence over `$DKIM_private`. + * @var string + */ + public $DKIM_private_string = ''; + + /** + * Callback Action function name. + * + * The function that handles the result of the send email action. + * It is called out by send() for each email sent. + * + * Value can be any php callable: http://www.php.net/is_callable + * + * Parameters: + * boolean $result result of the send action + * string $to email address of the recipient + * string $cc cc email addresses + * string $bcc bcc email addresses + * string $subject the subject + * string $body the email body + * string $from email address of sender + * @var string + */ + public $action_function = ''; + + /** + * What to put in the X-Mailer header. + * Options: An empty string for PHPMailer default, whitespace for none, or a string to use + * @var string + */ + public $XMailer = ''; + + /** + * Which validator to use by default when validating email addresses. + * May be a callable to inject your own validator, but there are several built-in validators. + * @see PHPMailer::validateAddress() + * @var string|callable + * @static + */ + public static $validator = 'auto'; + + /** + * An instance of the SMTP sender class. + * @var SMTP + * @access protected + */ + protected $smtp = null; + + /** + * The array of 'to' names and addresses. + * @var array + * @access protected + */ + protected $to = array(); + + /** + * The array of 'cc' names and addresses. + * @var array + * @access protected + */ + protected $cc = array(); + + /** + * The array of 'bcc' names and addresses. + * @var array + * @access protected + */ + protected $bcc = array(); + + /** + * The array of reply-to names and addresses. + * @var array + * @access protected + */ + protected $ReplyTo = array(); + + /** + * An array of all kinds of addresses. + * Includes all of $to, $cc, $bcc + * @var array + * @access protected + * @see PHPMailer::$to @see PHPMailer::$cc @see PHPMailer::$bcc + */ + protected $all_recipients = array(); + + /** + * An array of names and addresses queued for validation. + * In send(), valid and non duplicate entries are moved to $all_recipients + * and one of $to, $cc, or $bcc. + * This array is used only for addresses with IDN. + * @var array + * @access protected + * @see PHPMailer::$to @see PHPMailer::$cc @see PHPMailer::$bcc + * @see PHPMailer::$all_recipients + */ + protected $RecipientsQueue = array(); + + /** + * An array of reply-to names and addresses queued for validation. + * In send(), valid and non duplicate entries are moved to $ReplyTo. + * This array is used only for addresses with IDN. + * @var array + * @access protected + * @see PHPMailer::$ReplyTo + */ + protected $ReplyToQueue = array(); + + /** + * The array of attachments. + * @var array + * @access protected + */ + protected $attachment = array(); + + /** + * The array of custom headers. + * @var array + * @access protected + */ + protected $CustomHeader = array(); + + /** + * The most recent Message-ID (including angular brackets). + * @var string + * @access protected + */ + protected $lastMessageID = ''; + + /** + * The message's MIME type. + * @var string + * @access protected + */ + protected $message_type = ''; + + /** + * The array of MIME boundary strings. + * @var array + * @access protected + */ + protected $boundary = array(); + + /** + * The array of available languages. + * @var array + * @access protected + */ + protected $language = array(); + + /** + * The number of errors encountered. + * @var integer + * @access protected + */ + protected $error_count = 0; + + /** + * The S/MIME certificate file path. + * @var string + * @access protected + */ + protected $sign_cert_file = ''; + + /** + * The S/MIME key file path. + * @var string + * @access protected + */ + protected $sign_key_file = ''; + + /** + * The optional S/MIME extra certificates ("CA Chain") file path. + * @var string + * @access protected + */ + protected $sign_extracerts_file = ''; + + /** + * The S/MIME password for the key. + * Used only if the key is encrypted. + * @var string + * @access protected + */ + protected $sign_key_pass = ''; + + /** + * Whether to throw exceptions for errors. + * @var boolean + * @access protected + */ + protected $exceptions = false; + + /** + * Unique ID used for message ID and boundaries. + * @var string + * @access protected + */ + protected $uniqueid = ''; + + /** + * Error severity: message only, continue processing. + */ + const STOP_MESSAGE = 0; + + /** + * Error severity: message, likely ok to continue processing. + */ + const STOP_CONTINUE = 1; + + /** + * Error severity: message, plus full stop, critical error reached. + */ + const STOP_CRITICAL = 2; + + /** + * SMTP RFC standard line ending. + */ + const CRLF = "\r\n"; + + /** + * The maximum line length allowed by RFC 2822 section 2.1.1 + * @var integer + */ + const MAX_LINE_LENGTH = 998; + + /** + * Constructor. + * @param boolean $exceptions Should we throw external exceptions? + */ + public function __construct($exceptions = null) + { + if ($exceptions !== null) { + $this->exceptions = (boolean)$exceptions; + } + } + + /** + * Destructor. + */ + public function __destruct() + { + //Close any open SMTP connection nicely + $this->smtpClose(); + } + + /** + * Call mail() in a safe_mode-aware fashion. + * Also, unless sendmail_path points to sendmail (or something that + * claims to be sendmail), don't pass params (not a perfect fix, + * but it will do) + * @param string $to To + * @param string $subject Subject + * @param string $body Message Body + * @param string $header Additional Header(s) + * @param string $params Params + * @access private + * @return boolean + */ + private function mailPassthru($to, $subject, $body, $header, $params) + { + //Check overloading of mail function to avoid double-encoding + if (ini_get('mbstring.func_overload') & 1) { + $subject = $this->secureHeader($subject); + } else { + $subject = $this->encodeHeader($this->secureHeader($subject)); + } + + //Can't use additional_parameters in safe_mode, calling mail() with null params breaks + //@link http://php.net/manual/en/function.mail.php + if (ini_get('safe_mode') or !$this->UseSendmailOptions or is_null($params)) { + $result = @mail($to, $subject, $body, $header); + } else { + $result = @mail($to, $subject, $body, $header, $params); + } + return $result; + } + /** + * Output debugging info via user-defined method. + * Only generates output if SMTP debug output is enabled (@see SMTP::$do_debug). + * @see PHPMailer::$Debugoutput + * @see PHPMailer::$SMTPDebug + * @param string $str + */ + protected function edebug($str) + { + if ($this->SMTPDebug <= 0) { + return; + } + //Avoid clash with built-in function names + if (!in_array($this->Debugoutput, array('error_log', 'html', 'echo')) and is_callable($this->Debugoutput)) { + call_user_func($this->Debugoutput, $str, $this->SMTPDebug); + return; + } + switch ($this->Debugoutput) { + case 'error_log': + //Don't output, just log + error_log($str); + break; + case 'html': + //Cleans up output a bit for a better looking, HTML-safe output + echo htmlentities( + preg_replace('/[\r\n]+/', '', $str), + ENT_QUOTES, + 'UTF-8' + ) + . "
            \n"; + break; + case 'echo': + default: + //Normalize line breaks + $str = preg_replace('/\r\n?/ms', "\n", $str); + echo gmdate('Y-m-d H:i:s') . "\t" . str_replace( + "\n", + "\n \t ", + trim($str) + ) . "\n"; + } + } + + /** + * Sets message type to HTML or plain. + * @param boolean $isHtml True for HTML mode. + * @return void + */ + public function isHTML($isHtml = true) + { + if ($isHtml) { + $this->ContentType = 'text/html'; + } else { + $this->ContentType = 'text/plain'; + } + } + + /** + * Send messages using SMTP. + * @return void + */ + public function isSMTP() + { + $this->Mailer = 'smtp'; + } + + /** + * Send messages using PHP's mail() function. + * @return void + */ + public function isMail() + { + $this->Mailer = 'mail'; + } + + /** + * Send messages using $Sendmail. + * @return void + */ + public function isSendmail() + { + $ini_sendmail_path = ini_get('sendmail_path'); + + if (!stristr($ini_sendmail_path, 'sendmail')) { + $this->Sendmail = '/usr/sbin/sendmail'; + } else { + $this->Sendmail = $ini_sendmail_path; + } + $this->Mailer = 'sendmail'; + } + + /** + * Send messages using qmail. + * @return void + */ + public function isQmail() + { + $ini_sendmail_path = ini_get('sendmail_path'); + + if (!stristr($ini_sendmail_path, 'qmail')) { + $this->Sendmail = '/var/qmail/bin/qmail-inject'; + } else { + $this->Sendmail = $ini_sendmail_path; + } + $this->Mailer = 'qmail'; + } + + /** + * Add a "To" address. + * @param string $address The email address to send to + * @param string $name + * @return boolean true on success, false if address already used or invalid in some way + */ + public function addAddress($address, $name = '') + { + return $this->addOrEnqueueAnAddress('to', $address, $name); + } + + /** + * Add a "CC" address. + * @note: This function works with the SMTP mailer on win32, not with the "mail" mailer. + * @param string $address The email address to send to + * @param string $name + * @return boolean true on success, false if address already used or invalid in some way + */ + public function addCC($address, $name = '') + { + return $this->addOrEnqueueAnAddress('cc', $address, $name); + } + + /** + * Add a "BCC" address. + * @note: This function works with the SMTP mailer on win32, not with the "mail" mailer. + * @param string $address The email address to send to + * @param string $name + * @return boolean true on success, false if address already used or invalid in some way + */ + public function addBCC($address, $name = '') + { + return $this->addOrEnqueueAnAddress('bcc', $address, $name); + } + + /** + * Add a "Reply-To" address. + * @param string $address The email address to reply to + * @param string $name + * @return boolean true on success, false if address already used or invalid in some way + */ + public function addReplyTo($address, $name = '') + { + return $this->addOrEnqueueAnAddress('Reply-To', $address, $name); + } + + /** + * Add an address to one of the recipient arrays or to the ReplyTo array. Because PHPMailer + * can't validate addresses with an IDN without knowing the PHPMailer::$CharSet (that can still + * be modified after calling this function), addition of such addresses is delayed until send(). + * Addresses that have been added already return false, but do not throw exceptions. + * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo' + * @param string $address The email address to send, resp. to reply to + * @param string $name + * @throws phpmailerException + * @return boolean true on success, false if address already used or invalid in some way + * @access protected + */ + protected function addOrEnqueueAnAddress($kind, $address, $name) + { + $address = trim($address); + $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim + if (($pos = strrpos($address, '@')) === false) { + // At-sign is misssing. + $error_message = $this->lang('invalid_address') . " (addAnAddress $kind): $address"; + $this->setError($error_message); + $this->edebug($error_message); + if ($this->exceptions) { + throw new phpmailerException($error_message); + } + return false; + } + $params = array($kind, $address, $name); + // Enqueue addresses with IDN until we know the PHPMailer::$CharSet. + if ($this->has8bitChars(substr($address, ++$pos)) and $this->idnSupported()) { + if ($kind != 'Reply-To') { + if (!array_key_exists($address, $this->RecipientsQueue)) { + $this->RecipientsQueue[$address] = $params; + return true; + } + } else { + if (!array_key_exists($address, $this->ReplyToQueue)) { + $this->ReplyToQueue[$address] = $params; + return true; + } + } + return false; + } + // Immediately add standard addresses without IDN. + return call_user_func_array(array($this, 'addAnAddress'), $params); + } + + /** + * Add an address to one of the recipient arrays or to the ReplyTo array. + * Addresses that have been added already return false, but do not throw exceptions. + * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo' + * @param string $address The email address to send, resp. to reply to + * @param string $name + * @throws phpmailerException + * @return boolean true on success, false if address already used or invalid in some way + * @access protected + */ + protected function addAnAddress($kind, $address, $name = '') + { + if (!in_array($kind, array('to', 'cc', 'bcc', 'Reply-To'))) { + $error_message = $this->lang('Invalid recipient kind: ') . $kind; + $this->setError($error_message); + $this->edebug($error_message); + if ($this->exceptions) { + throw new phpmailerException($error_message); + } + return false; + } + if (!$this->validateAddress($address)) { + $error_message = $this->lang('invalid_address') . " (addAnAddress $kind): $address"; + $this->setError($error_message); + $this->edebug($error_message); + if ($this->exceptions) { + throw new phpmailerException($error_message); + } + return false; + } + if ($kind != 'Reply-To') { + if (!array_key_exists(strtolower($address), $this->all_recipients)) { + array_push($this->$kind, array($address, $name)); + $this->all_recipients[strtolower($address)] = true; + return true; + } + } else { + if (!array_key_exists(strtolower($address), $this->ReplyTo)) { + $this->ReplyTo[strtolower($address)] = array($address, $name); + return true; + } + } + return false; + } + + /** + * Parse and validate a string containing one or more RFC822-style comma-separated email addresses + * of the form "display name
            " into an array of name/address pairs. + * Uses the imap_rfc822_parse_adrlist function if the IMAP extension is available. + * Note that quotes in the name part are removed. + * @param string $addrstr The address list string + * @param bool $useimap Whether to use the IMAP extension to parse the list + * @return array + * @link http://www.andrew.cmu.edu/user/agreen1/testing/mrbs/web/Mail/RFC822.php A more careful implementation + */ + public function parseAddresses($addrstr, $useimap = true) + { + $addresses = array(); + if ($useimap and function_exists('imap_rfc822_parse_adrlist')) { + //Use this built-in parser if it's available + $list = imap_rfc822_parse_adrlist($addrstr, ''); + foreach ($list as $address) { + if ($address->host != '.SYNTAX-ERROR.') { + if ($this->validateAddress($address->mailbox . '@' . $address->host)) { + $addresses[] = array( + 'name' => (property_exists($address, 'personal') ? $address->personal : ''), + 'address' => $address->mailbox . '@' . $address->host + ); + } + } + } + } else { + //Use this simpler parser + $list = explode(',', $addrstr); + foreach ($list as $address) { + $address = trim($address); + //Is there a separate name part? + if (strpos($address, '<') === false) { + //No separate name, just use the whole thing + if ($this->validateAddress($address)) { + $addresses[] = array( + 'name' => '', + 'address' => $address + ); + } + } else { + list($name, $email) = explode('<', $address); + $email = trim(str_replace('>', '', $email)); + if ($this->validateAddress($email)) { + $addresses[] = array( + 'name' => trim(str_replace(array('"', "'"), '', $name)), + 'address' => $email + ); + } + } + } + } + return $addresses; + } + + /** + * Set the From and FromName properties. + * @param string $address + * @param string $name + * @param boolean $auto Whether to also set the Sender address, defaults to true + * @throws phpmailerException + * @return boolean + */ + public function setFrom($address, $name = '', $auto = true) + { + $address = trim($address); + $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim + // Don't validate now addresses with IDN. Will be done in send(). + if (($pos = strrpos($address, '@')) === false or + (!$this->has8bitChars(substr($address, ++$pos)) or !$this->idnSupported()) and + !$this->validateAddress($address)) { + $error_message = $this->lang('invalid_address') . " (setFrom) $address"; + $this->setError($error_message); + $this->edebug($error_message); + if ($this->exceptions) { + throw new phpmailerException($error_message); + } + return false; + } + $this->From = $address; + $this->FromName = $name; + if ($auto) { + if (empty($this->Sender)) { + $this->Sender = $address; + } + } + return true; + } + + /** + * Return the Message-ID header of the last email. + * Technically this is the value from the last time the headers were created, + * but it's also the message ID of the last sent message except in + * pathological cases. + * @return string + */ + public function getLastMessageID() + { + return $this->lastMessageID; + } + + /** + * Check that a string looks like an email address. + * @param string $address The email address to check + * @param string|callable $patternselect A selector for the validation pattern to use : + * * `auto` Pick best pattern automatically; + * * `pcre8` Use the squiloople.com pattern, requires PCRE > 8.0, PHP >= 5.3.2, 5.2.14; + * * `pcre` Use old PCRE implementation; + * * `php` Use PHP built-in FILTER_VALIDATE_EMAIL; + * * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements. + * * `noregex` Don't use a regex: super fast, really dumb. + * Alternatively you may pass in a callable to inject your own validator, for example: + * PHPMailer::validateAddress('user@example.com', function($address) { + * return (strpos($address, '@') !== false); + * }); + * You can also set the PHPMailer::$validator static to a callable, allowing built-in methods to use your validator. + * @return boolean + * @static + * @access public + */ + public static function validateAddress($address, $patternselect = null) + { + if (is_null($patternselect)) { + $patternselect = self::$validator; + } + if (is_callable($patternselect)) { + return call_user_func($patternselect, $address); + } + //Reject line breaks in addresses; it's valid RFC5322, but not RFC5321 + if (strpos($address, "\n") !== false or strpos($address, "\r") !== false) { + return false; + } + if (!$patternselect or $patternselect == 'auto') { + //Check this constant first so it works when extension_loaded() is disabled by safe mode + //Constant was added in PHP 5.2.4 + if (defined('PCRE_VERSION')) { + //This pattern can get stuck in a recursive loop in PCRE <= 8.0.2 + if (version_compare(PCRE_VERSION, '8.0.3') >= 0) { + $patternselect = 'pcre8'; + } else { + $patternselect = 'pcre'; + } + } elseif (function_exists('extension_loaded') and extension_loaded('pcre')) { + //Fall back to older PCRE + $patternselect = 'pcre'; + } else { + //Filter_var appeared in PHP 5.2.0 and does not require the PCRE extension + if (version_compare(PHP_VERSION, '5.2.0') >= 0) { + $patternselect = 'php'; + } else { + $patternselect = 'noregex'; + } + } + } + switch ($patternselect) { + case 'pcre8': + /** + * Uses the same RFC5322 regex on which FILTER_VALIDATE_EMAIL is based, but allows dotless domains. + * @link http://squiloople.com/2009/12/20/email-address-validation/ + * @copyright 2009-2010 Michael Rushton + * Feel free to use and redistribute this code. But please keep this copyright notice. + */ + return (boolean)preg_match( + '/^(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){255,})(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){65,}@)' . + '((?>(?>(?>((?>(?>(?>\x0D\x0A)?[\t ])+|(?>[\t ]*\x0D\x0A)?[\t ]+)?)(\((?>(?2)' . + '(?>[\x01-\x08\x0B\x0C\x0E-\'*-\[\]-\x7F]|\\\[\x00-\x7F]|(?3)))*(?2)\)))+(?2))|(?2))?)' . + '([!#-\'*+\/-9=?^-~-]+|"(?>(?2)(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\x7F]))*' . + '(?2)")(?>(?1)\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)' . + '(?>(?1)\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}' . + '|(?!(?:.*[a-f0-9][:\]]){8,})((?6)(?>:(?6)){0,6})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:' . + '|(?!(?:.*[a-f0-9]:){6,})(?8)?::(?>((?6)(?>:(?6)){0,4}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}' . + '|[1-9]?[0-9])(?>\.(?9)){3}))\])(?1)$/isD', + $address + ); + case 'pcre': + //An older regex that doesn't need a recent PCRE + return (boolean)preg_match( + '/^(?!(?>"?(?>\\\[ -~]|[^"])"?){255,})(?!(?>"?(?>\\\[ -~]|[^"])"?){65,}@)(?>' . + '[!#-\'*+\/-9=?^-~-]+|"(?>(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\xFF]))*")' . + '(?>\.(?>[!#-\'*+\/-9=?^-~-]+|"(?>(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\xFF]))*"))*' . + '@(?>(?![a-z0-9-]{64,})(?>[a-z0-9](?>[a-z0-9-]*[a-z0-9])?)(?>\.(?![a-z0-9-]{64,})' . + '(?>[a-z0-9](?>[a-z0-9-]*[a-z0-9])?)){0,126}|\[(?:(?>IPv6:(?>(?>[a-f0-9]{1,4})(?>:' . + '[a-f0-9]{1,4}){7}|(?!(?:.*[a-f0-9][:\]]){8,})(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,6})?' . + '::(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,6})?))|(?>(?>IPv6:(?>[a-f0-9]{1,4}(?>:' . + '[a-f0-9]{1,4}){5}:|(?!(?:.*[a-f0-9]:){6,})(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,4})?' . + '::(?>(?:[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,4}):)?))?(?>25[0-5]|2[0-4][0-9]|1[0-9]{2}' . + '|[1-9]?[0-9])(?>\.(?>25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}))\])$/isD', + $address + ); + case 'html5': + /** + * This is the pattern used in the HTML5 spec for validation of 'email' type form input elements. + * @link http://www.whatwg.org/specs/web-apps/current-work/#e-mail-state-(type=email) + */ + return (boolean)preg_match( + '/^[a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}' . + '[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/sD', + $address + ); + case 'noregex': + //No PCRE! Do something _very_ approximate! + //Check the address is 3 chars or longer and contains an @ that's not the first or last char + return (strlen($address) >= 3 + and strpos($address, '@') >= 1 + and strpos($address, '@') != strlen($address) - 1); + case 'php': + default: + return (boolean)filter_var($address, FILTER_VALIDATE_EMAIL); + } + } + + /** + * Tells whether IDNs (Internationalized Domain Names) are supported or not. This requires the + * "intl" and "mbstring" PHP extensions. + * @return bool "true" if required functions for IDN support are present + */ + public function idnSupported() + { + // @TODO: Write our own "idn_to_ascii" function for PHP <= 5.2. + return function_exists('idn_to_ascii') and function_exists('mb_convert_encoding'); + } + + /** + * Converts IDN in given email address to its ASCII form, also known as punycode, if possible. + * Important: Address must be passed in same encoding as currently set in PHPMailer::$CharSet. + * This function silently returns unmodified address if: + * - No conversion is necessary (i.e. domain name is not an IDN, or is already in ASCII form) + * - Conversion to punycode is impossible (e.g. required PHP functions are not available) + * or fails for any reason (e.g. domain has characters not allowed in an IDN) + * @see PHPMailer::$CharSet + * @param string $address The email address to convert + * @return string The encoded address in ASCII form + */ + public function punyencodeAddress($address) + { + // Verify we have required functions, CharSet, and at-sign. + if ($this->idnSupported() and + !empty($this->CharSet) and + ($pos = strrpos($address, '@')) !== false) { + $domain = substr($address, ++$pos); + // Verify CharSet string is a valid one, and domain properly encoded in this CharSet. + if ($this->has8bitChars($domain) and @mb_check_encoding($domain, $this->CharSet)) { + $domain = mb_convert_encoding($domain, 'UTF-8', $this->CharSet); + if (($punycode = defined('INTL_IDNA_VARIANT_UTS46') ? + idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46) : + idn_to_ascii($domain)) !== false) { + return substr($address, 0, $pos) . $punycode; + } + } + } + return $address; + } + + /** + * Create a message and send it. + * Uses the sending method specified by $Mailer. + * @throws phpmailerException + * @return boolean false on error - See the ErrorInfo property for details of the error. + */ + public function send() + { + try { + if (!$this->preSend()) { + return false; + } + return $this->postSend(); + } catch (phpmailerException $exc) { + $this->mailHeader = ''; + $this->setError($exc->getMessage()); + if ($this->exceptions) { + throw $exc; + } + return false; + } + } + + /** + * Prepare a message for sending. + * @throws phpmailerException + * @return boolean + */ + public function preSend() + { + try { + $this->error_count = 0; // Reset errors + $this->mailHeader = ''; + + // Dequeue recipient and Reply-To addresses with IDN + foreach (array_merge($this->RecipientsQueue, $this->ReplyToQueue) as $params) { + $params[1] = $this->punyencodeAddress($params[1]); + call_user_func_array(array($this, 'addAnAddress'), $params); + } + if ((count($this->to) + count($this->cc) + count($this->bcc)) < 1) { + throw new phpmailerException($this->lang('provide_address'), self::STOP_CRITICAL); + } + + // Validate From, Sender, and ConfirmReadingTo addresses + foreach (array('From', 'Sender', 'ConfirmReadingTo') as $address_kind) { + $this->$address_kind = trim($this->$address_kind); + if (empty($this->$address_kind)) { + continue; + } + $this->$address_kind = $this->punyencodeAddress($this->$address_kind); + if (!$this->validateAddress($this->$address_kind)) { + $error_message = $this->lang('invalid_address') . ' (punyEncode) ' . $this->$address_kind; + $this->setError($error_message); + $this->edebug($error_message); + if ($this->exceptions) { + throw new phpmailerException($error_message); + } + return false; + } + } + + // Set whether the message is multipart/alternative + if ($this->alternativeExists()) { + $this->ContentType = 'multipart/alternative'; + } + + $this->setMessageType(); + // Refuse to send an empty message unless we are specifically allowing it + if (!$this->AllowEmpty and empty($this->Body)) { + throw new phpmailerException($this->lang('empty_message'), self::STOP_CRITICAL); + } + + // Create body before headers in case body makes changes to headers (e.g. altering transfer encoding) + $this->MIMEHeader = ''; + $this->MIMEBody = $this->createBody(); + // createBody may have added some headers, so retain them + $tempheaders = $this->MIMEHeader; + $this->MIMEHeader = $this->createHeader(); + $this->MIMEHeader .= $tempheaders; + + // To capture the complete message when using mail(), create + // an extra header list which createHeader() doesn't fold in + if ($this->Mailer == 'mail') { + if (count($this->to) > 0) { + $this->mailHeader .= $this->addrAppend('To', $this->to); + } else { + $this->mailHeader .= $this->headerLine('To', 'undisclosed-recipients:;'); + } + $this->mailHeader .= $this->headerLine( + 'Subject', + $this->encodeHeader($this->secureHeader(trim($this->Subject))) + ); + } + + // Sign with DKIM if enabled + if (!empty($this->DKIM_domain) + && !empty($this->DKIM_selector) + && (!empty($this->DKIM_private_string) + || (!empty($this->DKIM_private) && file_exists($this->DKIM_private)) + ) + ) { + $header_dkim = $this->DKIM_Add( + $this->MIMEHeader . $this->mailHeader, + $this->encodeHeader($this->secureHeader($this->Subject)), + $this->MIMEBody + ); + $this->MIMEHeader = rtrim($this->MIMEHeader, "\r\n ") . self::CRLF . + str_replace("\r\n", "\n", $header_dkim) . self::CRLF; + } + return true; + } catch (phpmailerException $exc) { + $this->setError($exc->getMessage()); + if ($this->exceptions) { + throw $exc; + } + return false; + } + } + + /** + * Actually send a message. + * Send the email via the selected mechanism + * @throws phpmailerException + * @return boolean + */ + public function postSend() + { + try { + // Choose the mailer and send through it + switch ($this->Mailer) { + case 'sendmail': + case 'qmail': + return $this->sendmailSend($this->MIMEHeader, $this->MIMEBody); + case 'smtp': + return $this->smtpSend($this->MIMEHeader, $this->MIMEBody); + case 'mail': + return $this->mailSend($this->MIMEHeader, $this->MIMEBody); + default: + $sendMethod = $this->Mailer.'Send'; + if (method_exists($this, $sendMethod)) { + return $this->$sendMethod($this->MIMEHeader, $this->MIMEBody); + } + + return $this->mailSend($this->MIMEHeader, $this->MIMEBody); + } + } catch (phpmailerException $exc) { + $this->setError($exc->getMessage()); + $this->edebug($exc->getMessage()); + if ($this->exceptions) { + throw $exc; + } + } + return false; + } + + /** + * Send mail using the $Sendmail program. + * @param string $header The message headers + * @param string $body The message body + * @see PHPMailer::$Sendmail + * @throws phpmailerException + * @access protected + * @return boolean + */ + protected function sendmailSend($header, $body) + { + // CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped. + if (!empty($this->Sender) and self::isShellSafe($this->Sender)) { + if ($this->Mailer == 'qmail') { + $sendmailFmt = '%s -f%s'; + } else { + $sendmailFmt = '%s -oi -f%s -t'; + } + } else { + if ($this->Mailer == 'qmail') { + $sendmailFmt = '%s'; + } else { + $sendmailFmt = '%s -oi -t'; + } + } + + // TODO: If possible, this should be changed to escapeshellarg. Needs thorough testing. + $sendmail = sprintf($sendmailFmt, escapeshellcmd($this->Sendmail), $this->Sender); + + if ($this->SingleTo) { + foreach ($this->SingleToArray as $toAddr) { + if (!@$mail = popen($sendmail, 'w')) { + throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + fputs($mail, 'To: ' . $toAddr . "\n"); + fputs($mail, $header); + fputs($mail, $body); + $result = pclose($mail); + $this->doCallback( + ($result == 0), + array($toAddr), + $this->cc, + $this->bcc, + $this->Subject, + $body, + $this->From + ); + if ($result != 0) { + throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + } + } else { + if (!@$mail = popen($sendmail, 'w')) { + throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + fputs($mail, $header); + fputs($mail, $body); + $result = pclose($mail); + $this->doCallback( + ($result == 0), + $this->to, + $this->cc, + $this->bcc, + $this->Subject, + $body, + $this->From + ); + if ($result != 0) { + throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + } + return true; + } + + /** + * Fix CVE-2016-10033 and CVE-2016-10045 by disallowing potentially unsafe shell characters. + * + * Note that escapeshellarg and escapeshellcmd are inadequate for our purposes, especially on Windows. + * @param string $string The string to be validated + * @see https://github.com/PHPMailer/PHPMailer/issues/924 CVE-2016-10045 bug report + * @access protected + * @return boolean + */ + protected static function isShellSafe($string) + { + // Future-proof + if (escapeshellcmd($string) !== $string + or !in_array(escapeshellarg($string), array("'$string'", "\"$string\"")) + ) { + return false; + } + + $length = strlen($string); + + for ($i = 0; $i < $length; $i++) { + $c = $string[$i]; + + // All other characters have a special meaning in at least one common shell, including = and +. + // Full stop (.) has a special meaning in cmd.exe, but its impact should be negligible here. + // Note that this does permit non-Latin alphanumeric characters based on the current locale. + if (!ctype_alnum($c) && strpos('@_-.', $c) === false) { + return false; + } + } + + return true; + } + + /** + * Send mail using the PHP mail() function. + * @param string $header The message headers + * @param string $body The message body + * @link http://www.php.net/manual/en/book.mail.php + * @throws phpmailerException + * @access protected + * @return boolean + */ + protected function mailSend($header, $body) + { + $toArr = array(); + foreach ($this->to as $toaddr) { + $toArr[] = $this->addrFormat($toaddr); + } + $to = implode(', ', $toArr); + + $params = null; + //This sets the SMTP envelope sender which gets turned into a return-path header by the receiver + if (!empty($this->Sender) and $this->validateAddress($this->Sender)) { + // CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped. + if (self::isShellSafe($this->Sender)) { + $params = sprintf('-f%s', $this->Sender); + } + } + if (!empty($this->Sender) and !ini_get('safe_mode') and $this->validateAddress($this->Sender)) { + $old_from = ini_get('sendmail_from'); + ini_set('sendmail_from', $this->Sender); + } + $result = false; + if ($this->SingleTo and count($toArr) > 1) { + foreach ($toArr as $toAddr) { + $result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params); + $this->doCallback($result, array($toAddr), $this->cc, $this->bcc, $this->Subject, $body, $this->From); + } + } else { + $result = $this->mailPassthru($to, $this->Subject, $body, $header, $params); + $this->doCallback($result, $this->to, $this->cc, $this->bcc, $this->Subject, $body, $this->From); + } + if (isset($old_from)) { + ini_set('sendmail_from', $old_from); + } + if (!$result) { + throw new phpmailerException($this->lang('instantiate'), self::STOP_CRITICAL); + } + return true; + } + + /** + * Get an instance to use for SMTP operations. + * Override this function to load your own SMTP implementation + * @return SMTP + */ + public function getSMTPInstance() + { + if (!is_object($this->smtp)) { + $this->smtp = new SMTP; + } + return $this->smtp; + } + + /** + * Send mail via SMTP. + * Returns false if there is a bad MAIL FROM, RCPT, or DATA input. + * Uses the PHPMailerSMTP class by default. + * @see PHPMailer::getSMTPInstance() to use a different class. + * @param string $header The message headers + * @param string $body The message body + * @throws phpmailerException + * @uses SMTP + * @access protected + * @return boolean + */ + protected function smtpSend($header, $body) + { + $bad_rcpt = array(); + if (!$this->smtpConnect($this->SMTPOptions)) { + throw new phpmailerException($this->lang('smtp_connect_failed'), self::STOP_CRITICAL); + } + if (!empty($this->Sender) and $this->validateAddress($this->Sender)) { + $smtp_from = $this->Sender; + } else { + $smtp_from = $this->From; + } + if (!$this->smtp->mail($smtp_from)) { + $this->setError($this->lang('from_failed') . $smtp_from . ' : ' . implode(',', $this->smtp->getError())); + throw new phpmailerException($this->ErrorInfo, self::STOP_CRITICAL); + } + + // Attempt to send to all recipients + foreach (array($this->to, $this->cc, $this->bcc) as $togroup) { + foreach ($togroup as $to) { + if (!$this->smtp->recipient($to[0])) { + $error = $this->smtp->getError(); + $bad_rcpt[] = array('to' => $to[0], 'error' => $error['detail']); + $isSent = false; + } else { + $isSent = true; + } + $this->doCallback($isSent, array($to[0]), array(), array(), $this->Subject, $body, $this->From); + } + } + + // Only send the DATA command if we have viable recipients + if ((count($this->all_recipients) > count($bad_rcpt)) and !$this->smtp->data($header . $body)) { + throw new phpmailerException($this->lang('data_not_accepted'), self::STOP_CRITICAL); + } + if ($this->SMTPKeepAlive) { + $this->smtp->reset(); + } else { + $this->smtp->quit(); + $this->smtp->close(); + } + //Create error message for any bad addresses + if (count($bad_rcpt) > 0) { + $errstr = ''; + foreach ($bad_rcpt as $bad) { + $errstr .= $bad['to'] . ': ' . $bad['error']; + } + throw new phpmailerException( + $this->lang('recipients_failed') . $errstr, + self::STOP_CONTINUE + ); + } + return true; + } + + /** + * Initiate a connection to an SMTP server. + * Returns false if the operation failed. + * @param array $options An array of options compatible with stream_context_create() + * @uses SMTP + * @access public + * @throws phpmailerException + * @return boolean + */ + public function smtpConnect($options = null) + { + if (is_null($this->smtp)) { + $this->smtp = $this->getSMTPInstance(); + } + + //If no options are provided, use whatever is set in the instance + if (is_null($options)) { + $options = $this->SMTPOptions; + } + + // Already connected? + if ($this->smtp->connected()) { + return true; + } + + $this->smtp->setTimeout($this->Timeout); + $this->smtp->setDebugLevel($this->SMTPDebug); + $this->smtp->setDebugOutput($this->Debugoutput); + $this->smtp->setVerp($this->do_verp); + $hosts = explode(';', $this->Host); + $lastexception = null; + + foreach ($hosts as $hostentry) { + $hostinfo = array(); + if (!preg_match('/^((ssl|tls):\/\/)*([a-zA-Z0-9\.-]*):?([0-9]*)$/', trim($hostentry), $hostinfo)) { + // Not a valid host entry + continue; + } + // $hostinfo[2]: optional ssl or tls prefix + // $hostinfo[3]: the hostname + // $hostinfo[4]: optional port number + // The host string prefix can temporarily override the current setting for SMTPSecure + // If it's not specified, the default value is used + $prefix = ''; + $secure = $this->SMTPSecure; + $tls = ($this->SMTPSecure == 'tls'); + if ('ssl' == $hostinfo[2] or ('' == $hostinfo[2] and 'ssl' == $this->SMTPSecure)) { + $prefix = 'ssl://'; + $tls = false; // Can't have SSL and TLS at the same time + $secure = 'ssl'; + } elseif ($hostinfo[2] == 'tls') { + $tls = true; + // tls doesn't use a prefix + $secure = 'tls'; + } + //Do we need the OpenSSL extension? + $sslext = defined('OPENSSL_ALGO_SHA1'); + if ('tls' === $secure or 'ssl' === $secure) { + //Check for an OpenSSL constant rather than using extension_loaded, which is sometimes disabled + if (!$sslext) { + throw new phpmailerException($this->lang('extension_missing').'openssl', self::STOP_CRITICAL); + } + } + $host = $hostinfo[3]; + $port = $this->Port; + $tport = (integer)$hostinfo[4]; + if ($tport > 0 and $tport < 65536) { + $port = $tport; + } + if ($this->smtp->connect($prefix . $host, $port, $this->Timeout, $options)) { + try { + if ($this->Helo) { + $hello = $this->Helo; + } else { + $hello = $this->serverHostname(); + } + $this->smtp->hello($hello); + //Automatically enable TLS encryption if: + // * it's not disabled + // * we have openssl extension + // * we are not already using SSL + // * the server offers STARTTLS + if ($this->SMTPAutoTLS and $sslext and $secure != 'ssl' and $this->smtp->getServerExt('STARTTLS')) { + $tls = true; + } + if ($tls) { + if (!$this->smtp->startTLS()) { + throw new phpmailerException($this->lang('connect_host')); + } + // We must resend EHLO after TLS negotiation + $this->smtp->hello($hello); + } + if ($this->SMTPAuth) { + if (!$this->smtp->authenticate( + $this->Username, + $this->Password, + $this->AuthType, + $this->Realm, + $this->Workstation + ) + ) { + throw new phpmailerException($this->lang('authenticate')); + } + } + return true; + } catch (phpmailerException $exc) { + $lastexception = $exc; + $this->edebug($exc->getMessage()); + // We must have connected, but then failed TLS or Auth, so close connection nicely + $this->smtp->quit(); + } + } + } + // If we get here, all connection attempts have failed, so close connection hard + $this->smtp->close(); + // As we've caught all exceptions, just report whatever the last one was + if ($this->exceptions and !is_null($lastexception)) { + throw $lastexception; + } + return false; + } + + /** + * Close the active SMTP session if one exists. + * @return void + */ + public function smtpClose() + { + if (is_a($this->smtp, 'SMTP')) { + if ($this->smtp->connected()) { + $this->smtp->quit(); + $this->smtp->close(); + } + } + } + + /** + * Set the language for error messages. + * Returns false if it cannot load the language file. + * The default language is English. + * @param string $langcode ISO 639-1 2-character language code (e.g. French is "fr") + * @param string $lang_path Path to the language file directory, with trailing separator (slash) + * @return boolean + * @access public + */ + public function setLanguage($langcode = 'en', $lang_path = '') + { + // Backwards compatibility for renamed language codes + $renamed_langcodes = array( + 'br' => 'pt_br', + 'cz' => 'cs', + 'dk' => 'da', + 'no' => 'nb', + 'se' => 'sv', + ); + + if (isset($renamed_langcodes[$langcode])) { + $langcode = $renamed_langcodes[$langcode]; + } + + // Define full set of translatable strings in English + $PHPMAILER_LANG = array( + 'authenticate' => 'SMTP Error: Could not authenticate.', + 'connect_host' => 'SMTP Error: Could not connect to SMTP host.', + 'data_not_accepted' => 'SMTP Error: data not accepted.', + 'empty_message' => 'Message body empty', + 'encoding' => 'Unknown encoding: ', + 'execute' => 'Could not execute: ', + 'file_access' => 'Could not access file: ', + 'file_open' => 'File Error: Could not open file: ', + 'from_failed' => 'The following From address failed: ', + 'instantiate' => 'Could not instantiate mail function.', + 'invalid_address' => 'Invalid address: ', + 'mailer_not_supported' => ' mailer is not supported.', + 'provide_address' => 'You must provide at least one recipient email address.', + 'recipients_failed' => 'SMTP Error: The following recipients failed: ', + 'signing' => 'Signing Error: ', + 'smtp_connect_failed' => 'SMTP connect() failed.', + 'smtp_error' => 'SMTP server error: ', + 'variable_set' => 'Cannot set or reset variable: ', + 'extension_missing' => 'Extension missing: ' + ); + if (empty($lang_path)) { + // Calculate an absolute path so it can work if CWD is not here + $lang_path = dirname(__FILE__). DIRECTORY_SEPARATOR . 'language'. DIRECTORY_SEPARATOR; + } + //Validate $langcode + if (!preg_match('/^[a-z]{2}(?:_[a-zA-Z]{2})?$/', $langcode)) { + $langcode = 'en'; + } + $foundlang = true; + $lang_file = $lang_path . 'phpmailer.lang-' . $langcode . '.php'; + // There is no English translation file + if ($langcode != 'en') { + // Make sure language file path is readable + if (!is_readable($lang_file)) { + $foundlang = false; + } else { + // Overwrite language-specific strings. + // This way we'll never have missing translation keys. + $foundlang = include $lang_file; + } + } + $this->language = $PHPMAILER_LANG; + return (boolean)$foundlang; // Returns false if language not found + } + + /** + * Get the array of strings for the current language. + * @return array + */ + public function getTranslations() + { + return $this->language; + } + + /** + * Create recipient headers. + * @access public + * @param string $type + * @param array $addr An array of recipient, + * where each recipient is a 2-element indexed array with element 0 containing an address + * and element 1 containing a name, like: + * array(array('joe@example.com', 'Joe User'), array('zoe@example.com', 'Zoe User')) + * @return string + */ + public function addrAppend($type, $addr) + { + $addresses = array(); + foreach ($addr as $address) { + $addresses[] = $this->addrFormat($address); + } + return $type . ': ' . implode(', ', $addresses) . $this->LE; + } + + /** + * Format an address for use in a message header. + * @access public + * @param array $addr A 2-element indexed array, element 0 containing an address, element 1 containing a name + * like array('joe@example.com', 'Joe User') + * @return string + */ + public function addrFormat($addr) + { + if (empty($addr[1])) { // No name provided + return $this->secureHeader($addr[0]); + } else { + return $this->encodeHeader($this->secureHeader($addr[1]), 'phrase') . ' <' . $this->secureHeader( + $addr[0] + ) . '>'; + } + } + + /** + * Word-wrap message. + * For use with mailers that do not automatically perform wrapping + * and for quoted-printable encoded messages. + * Original written by philippe. + * @param string $message The message to wrap + * @param integer $length The line length to wrap to + * @param boolean $qp_mode Whether to run in Quoted-Printable mode + * @access public + * @return string + */ + public function wrapText($message, $length, $qp_mode = false) + { + if ($qp_mode) { + $soft_break = sprintf(' =%s', $this->LE); + } else { + $soft_break = $this->LE; + } + // If utf-8 encoding is used, we will need to make sure we don't + // split multibyte characters when we wrap + $is_utf8 = (strtolower($this->CharSet) == 'utf-8'); + $lelen = strlen($this->LE); + $crlflen = strlen(self::CRLF); + + $message = $this->fixEOL($message); + //Remove a trailing line break + if (substr($message, -$lelen) == $this->LE) { + $message = substr($message, 0, -$lelen); + } + + //Split message into lines + $lines = explode($this->LE, $message); + //Message will be rebuilt in here + $message = ''; + foreach ($lines as $line) { + $words = explode(' ', $line); + $buf = ''; + $firstword = true; + foreach ($words as $word) { + if ($qp_mode and (strlen($word) > $length)) { + $space_left = $length - strlen($buf) - $crlflen; + if (!$firstword) { + if ($space_left > 20) { + $len = $space_left; + if ($is_utf8) { + $len = $this->utf8CharBoundary($word, $len); + } elseif (substr($word, $len - 1, 1) == '=') { + $len--; + } elseif (substr($word, $len - 2, 1) == '=') { + $len -= 2; + } + $part = substr($word, 0, $len); + $word = substr($word, $len); + $buf .= ' ' . $part; + $message .= $buf . sprintf('=%s', self::CRLF); + } else { + $message .= $buf . $soft_break; + } + $buf = ''; + } + while (strlen($word) > 0) { + if ($length <= 0) { + break; + } + $len = $length; + if ($is_utf8) { + $len = $this->utf8CharBoundary($word, $len); + } elseif (substr($word, $len - 1, 1) == '=') { + $len--; + } elseif (substr($word, $len - 2, 1) == '=') { + $len -= 2; + } + $part = substr($word, 0, $len); + $word = substr($word, $len); + + if (strlen($word) > 0) { + $message .= $part . sprintf('=%s', self::CRLF); + } else { + $buf = $part; + } + } + } else { + $buf_o = $buf; + if (!$firstword) { + $buf .= ' '; + } + $buf .= $word; + + if (strlen($buf) > $length and $buf_o != '') { + $message .= $buf_o . $soft_break; + $buf = $word; + } + } + $firstword = false; + } + $message .= $buf . self::CRLF; + } + + return $message; + } + + /** + * Find the last character boundary prior to $maxLength in a utf-8 + * quoted-printable encoded string. + * Original written by Colin Brown. + * @access public + * @param string $encodedText utf-8 QP text + * @param integer $maxLength Find the last character boundary prior to this length + * @return integer + */ + public function utf8CharBoundary($encodedText, $maxLength) + { + $foundSplitPos = false; + $lookBack = 3; + while (!$foundSplitPos) { + $lastChunk = substr($encodedText, $maxLength - $lookBack, $lookBack); + $encodedCharPos = strpos($lastChunk, '='); + if (false !== $encodedCharPos) { + // Found start of encoded character byte within $lookBack block. + // Check the encoded byte value (the 2 chars after the '=') + $hex = substr($encodedText, $maxLength - $lookBack + $encodedCharPos + 1, 2); + $dec = hexdec($hex); + if ($dec < 128) { + // Single byte character. + // If the encoded char was found at pos 0, it will fit + // otherwise reduce maxLength to start of the encoded char + if ($encodedCharPos > 0) { + $maxLength = $maxLength - ($lookBack - $encodedCharPos); + } + $foundSplitPos = true; + } elseif ($dec >= 192) { + // First byte of a multi byte character + // Reduce maxLength to split at start of character + $maxLength = $maxLength - ($lookBack - $encodedCharPos); + $foundSplitPos = true; + } elseif ($dec < 192) { + // Middle byte of a multi byte character, look further back + $lookBack += 3; + } + } else { + // No encoded character found + $foundSplitPos = true; + } + } + return $maxLength; + } + + /** + * Apply word wrapping to the message body. + * Wraps the message body to the number of chars set in the WordWrap property. + * You should only do this to plain-text bodies as wrapping HTML tags may break them. + * This is called automatically by createBody(), so you don't need to call it yourself. + * @access public + * @return void + */ + public function setWordWrap() + { + if ($this->WordWrap < 1) { + return; + } + + switch ($this->message_type) { + case 'alt': + case 'alt_inline': + case 'alt_attach': + case 'alt_inline_attach': + $this->AltBody = $this->wrapText($this->AltBody, $this->WordWrap); + break; + default: + $this->Body = $this->wrapText($this->Body, $this->WordWrap); + break; + } + } + + /** + * Assemble message headers. + * @access public + * @return string The assembled headers + */ + public function createHeader() + { + $result = ''; + + if ($this->MessageDate == '') { + $this->MessageDate = self::rfcDate(); + } + $result .= $this->headerLine('Date', $this->MessageDate); + + // To be created automatically by mail() + if ($this->SingleTo) { + if ($this->Mailer != 'mail') { + foreach ($this->to as $toaddr) { + $this->SingleToArray[] = $this->addrFormat($toaddr); + } + } + } else { + if (count($this->to) > 0) { + if ($this->Mailer != 'mail') { + $result .= $this->addrAppend('To', $this->to); + } + } elseif (count($this->cc) == 0) { + $result .= $this->headerLine('To', 'undisclosed-recipients:;'); + } + } + + $result .= $this->addrAppend('From', array(array(trim($this->From), $this->FromName))); + + // sendmail and mail() extract Cc from the header before sending + if (count($this->cc) > 0) { + $result .= $this->addrAppend('Cc', $this->cc); + } + + // sendmail and mail() extract Bcc from the header before sending + if (( + $this->Mailer == 'sendmail' or $this->Mailer == 'qmail' or $this->Mailer == 'mail' + ) + and count($this->bcc) > 0 + ) { + $result .= $this->addrAppend('Bcc', $this->bcc); + } + + if (count($this->ReplyTo) > 0) { + $result .= $this->addrAppend('Reply-To', $this->ReplyTo); + } + + // mail() sets the subject itself + if ($this->Mailer != 'mail') { + $result .= $this->headerLine('Subject', $this->encodeHeader($this->secureHeader($this->Subject))); + } + + // Only allow a custom message ID if it conforms to RFC 5322 section 3.6.4 + // https://tools.ietf.org/html/rfc5322#section-3.6.4 + if ('' != $this->MessageID and preg_match('/^<.*@.*>$/', $this->MessageID)) { + $this->lastMessageID = $this->MessageID; + } else { + $this->lastMessageID = sprintf('<%s@%s>', $this->uniqueid, $this->serverHostname()); + } + $result .= $this->headerLine('Message-ID', $this->lastMessageID); + if (!is_null($this->Priority)) { + $result .= $this->headerLine('X-Priority', $this->Priority); + } + if ($this->XMailer == '') { + $result .= $this->headerLine( + 'X-Mailer', + 'PHPMailer ' . $this->Version . ' (https://github.com/PHPMailer/PHPMailer)' + ); + } else { + $myXmailer = trim($this->XMailer); + if ($myXmailer) { + $result .= $this->headerLine('X-Mailer', $myXmailer); + } + } + + if ($this->ConfirmReadingTo != '') { + $result .= $this->headerLine('Disposition-Notification-To', '<' . $this->ConfirmReadingTo . '>'); + } + + // Add custom headers + foreach ($this->CustomHeader as $header) { + $result .= $this->headerLine( + trim($header[0]), + $this->encodeHeader(trim($header[1])) + ); + } + if (!$this->sign_key_file) { + $result .= $this->headerLine('MIME-Version', '1.0'); + $result .= $this->getMailMIME(); + } + + return $result; + } + + /** + * Get the message MIME type headers. + * @access public + * @return string + */ + public function getMailMIME() + { + $result = ''; + $ismultipart = true; + switch ($this->message_type) { + case 'inline': + $result .= $this->headerLine('Content-Type', 'multipart/related;'); + $result .= $this->textLine("\tboundary=\"" . $this->boundary[1] . '"'); + break; + case 'attach': + case 'inline_attach': + case 'alt_attach': + case 'alt_inline_attach': + $result .= $this->headerLine('Content-Type', 'multipart/mixed;'); + $result .= $this->textLine("\tboundary=\"" . $this->boundary[1] . '"'); + break; + case 'alt': + case 'alt_inline': + $result .= $this->headerLine('Content-Type', 'multipart/alternative;'); + $result .= $this->textLine("\tboundary=\"" . $this->boundary[1] . '"'); + break; + default: + // Catches case 'plain': and case '': + $result .= $this->textLine('Content-Type: ' . $this->ContentType . '; charset=' . $this->CharSet); + $ismultipart = false; + break; + } + // RFC1341 part 5 says 7bit is assumed if not specified + if ($this->Encoding != '7bit') { + // RFC 2045 section 6.4 says multipart MIME parts may only use 7bit, 8bit or binary CTE + if ($ismultipart) { + if ($this->Encoding == '8bit') { + $result .= $this->headerLine('Content-Transfer-Encoding', '8bit'); + } + // The only remaining alternatives are quoted-printable and base64, which are both 7bit compatible + } else { + $result .= $this->headerLine('Content-Transfer-Encoding', $this->Encoding); + } + } + + if ($this->Mailer != 'mail') { + $result .= $this->LE; + } + + return $result; + } + + /** + * Returns the whole MIME message. + * Includes complete headers and body. + * Only valid post preSend(). + * @see PHPMailer::preSend() + * @access public + * @return string + */ + public function getSentMIMEMessage() + { + return rtrim($this->MIMEHeader . $this->mailHeader, "\n\r") . self::CRLF . self::CRLF . $this->MIMEBody; + } + + /** + * Create unique ID + * @return string + */ + protected function generateId() { + return md5(uniqid(time())); + } + + /** + * Assemble the message body. + * Returns an empty string on failure. + * @access public + * @throws phpmailerException + * @return string The assembled message body + */ + public function createBody() + { + $body = ''; + //Create unique IDs and preset boundaries + $this->uniqueid = $this->generateId(); + $this->boundary[1] = 'b1_' . $this->uniqueid; + $this->boundary[2] = 'b2_' . $this->uniqueid; + $this->boundary[3] = 'b3_' . $this->uniqueid; + + if ($this->sign_key_file) { + $body .= $this->getMailMIME() . $this->LE; + } + + $this->setWordWrap(); + + $bodyEncoding = $this->Encoding; + $bodyCharSet = $this->CharSet; + //Can we do a 7-bit downgrade? + if ($bodyEncoding == '8bit' and !$this->has8bitChars($this->Body)) { + $bodyEncoding = '7bit'; + //All ISO 8859, Windows codepage and UTF-8 charsets are ascii compatible up to 7-bit + $bodyCharSet = 'us-ascii'; + } + //If lines are too long, and we're not already using an encoding that will shorten them, + //change to quoted-printable transfer encoding for the body part only + if ('base64' != $this->Encoding and self::hasLineLongerThanMax($this->Body)) { + $bodyEncoding = 'quoted-printable'; + } + + $altBodyEncoding = $this->Encoding; + $altBodyCharSet = $this->CharSet; + //Can we do a 7-bit downgrade? + if ($altBodyEncoding == '8bit' and !$this->has8bitChars($this->AltBody)) { + $altBodyEncoding = '7bit'; + //All ISO 8859, Windows codepage and UTF-8 charsets are ascii compatible up to 7-bit + $altBodyCharSet = 'us-ascii'; + } + //If lines are too long, and we're not already using an encoding that will shorten them, + //change to quoted-printable transfer encoding for the alt body part only + if ('base64' != $altBodyEncoding and self::hasLineLongerThanMax($this->AltBody)) { + $altBodyEncoding = 'quoted-printable'; + } + //Use this as a preamble in all multipart message types + $mimepre = "This is a multi-part message in MIME format." . $this->LE . $this->LE; + switch ($this->message_type) { + case 'inline': + $body .= $mimepre; + $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, '', $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= $this->LE . $this->LE; + $body .= $this->attachAll('inline', $this->boundary[1]); + break; + case 'attach': + $body .= $mimepre; + $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, '', $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= $this->LE . $this->LE; + $body .= $this->attachAll('attachment', $this->boundary[1]); + break; + case 'inline_attach': + $body .= $mimepre; + $body .= $this->textLine('--' . $this->boundary[1]); + $body .= $this->headerLine('Content-Type', 'multipart/related;'); + $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"'); + $body .= $this->LE; + $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, '', $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= $this->LE . $this->LE; + $body .= $this->attachAll('inline', $this->boundary[2]); + $body .= $this->LE; + $body .= $this->attachAll('attachment', $this->boundary[1]); + break; + case 'alt': + $body .= $mimepre; + $body .= $this->getBoundary($this->boundary[1], $altBodyCharSet, 'text/plain', $altBodyEncoding); + $body .= $this->encodeString($this->AltBody, $altBodyEncoding); + $body .= $this->LE . $this->LE; + $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, 'text/html', $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= $this->LE . $this->LE; + if (!empty($this->Ical)) { + $body .= $this->getBoundary($this->boundary[1], '', 'text/calendar; method=REQUEST', ''); + $body .= $this->encodeString($this->Ical, $this->Encoding); + $body .= $this->LE . $this->LE; + } + $body .= $this->endBoundary($this->boundary[1]); + break; + case 'alt_inline': + $body .= $mimepre; + $body .= $this->getBoundary($this->boundary[1], $altBodyCharSet, 'text/plain', $altBodyEncoding); + $body .= $this->encodeString($this->AltBody, $altBodyEncoding); + $body .= $this->LE . $this->LE; + $body .= $this->textLine('--' . $this->boundary[1]); + $body .= $this->headerLine('Content-Type', 'multipart/related;'); + $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"'); + $body .= $this->LE; + $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, 'text/html', $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= $this->LE . $this->LE; + $body .= $this->attachAll('inline', $this->boundary[2]); + $body .= $this->LE; + $body .= $this->endBoundary($this->boundary[1]); + break; + case 'alt_attach': + $body .= $mimepre; + $body .= $this->textLine('--' . $this->boundary[1]); + $body .= $this->headerLine('Content-Type', 'multipart/alternative;'); + $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"'); + $body .= $this->LE; + $body .= $this->getBoundary($this->boundary[2], $altBodyCharSet, 'text/plain', $altBodyEncoding); + $body .= $this->encodeString($this->AltBody, $altBodyEncoding); + $body .= $this->LE . $this->LE; + $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, 'text/html', $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= $this->LE . $this->LE; + $body .= $this->endBoundary($this->boundary[2]); + $body .= $this->LE; + $body .= $this->attachAll('attachment', $this->boundary[1]); + break; + case 'alt_inline_attach': + $body .= $mimepre; + $body .= $this->textLine('--' . $this->boundary[1]); + $body .= $this->headerLine('Content-Type', 'multipart/alternative;'); + $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"'); + $body .= $this->LE; + $body .= $this->getBoundary($this->boundary[2], $altBodyCharSet, 'text/plain', $altBodyEncoding); + $body .= $this->encodeString($this->AltBody, $altBodyEncoding); + $body .= $this->LE . $this->LE; + $body .= $this->textLine('--' . $this->boundary[2]); + $body .= $this->headerLine('Content-Type', 'multipart/related;'); + $body .= $this->textLine("\tboundary=\"" . $this->boundary[3] . '"'); + $body .= $this->LE; + $body .= $this->getBoundary($this->boundary[3], $bodyCharSet, 'text/html', $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= $this->LE . $this->LE; + $body .= $this->attachAll('inline', $this->boundary[3]); + $body .= $this->LE; + $body .= $this->endBoundary($this->boundary[2]); + $body .= $this->LE; + $body .= $this->attachAll('attachment', $this->boundary[1]); + break; + default: + // Catch case 'plain' and case '', applies to simple `text/plain` and `text/html` body content types + //Reset the `Encoding` property in case we changed it for line length reasons + $this->Encoding = $bodyEncoding; + $body .= $this->encodeString($this->Body, $this->Encoding); + break; + } + + if ($this->isError()) { + $body = ''; + } elseif ($this->sign_key_file) { + try { + if (!defined('PKCS7_TEXT')) { + throw new phpmailerException($this->lang('extension_missing') . 'openssl'); + } + // @TODO would be nice to use php://temp streams here, but need to wrap for PHP < 5.1 + $file = tempnam(sys_get_temp_dir(), 'mail'); + if (false === file_put_contents($file, $body)) { + throw new phpmailerException($this->lang('signing') . ' Could not write temp file'); + } + $signed = tempnam(sys_get_temp_dir(), 'signed'); + //Workaround for PHP bug https://bugs.php.net/bug.php?id=69197 + if (empty($this->sign_extracerts_file)) { + $sign = @openssl_pkcs7_sign( + $file, + $signed, + 'file://' . realpath($this->sign_cert_file), + array('file://' . realpath($this->sign_key_file), $this->sign_key_pass), + null + ); + } else { + $sign = @openssl_pkcs7_sign( + $file, + $signed, + 'file://' . realpath($this->sign_cert_file), + array('file://' . realpath($this->sign_key_file), $this->sign_key_pass), + null, + PKCS7_DETACHED, + $this->sign_extracerts_file + ); + } + if ($sign) { + @unlink($file); + $body = file_get_contents($signed); + @unlink($signed); + //The message returned by openssl contains both headers and body, so need to split them up + $parts = explode("\n\n", $body, 2); + $this->MIMEHeader .= $parts[0] . $this->LE . $this->LE; + $body = $parts[1]; + } else { + @unlink($file); + @unlink($signed); + throw new phpmailerException($this->lang('signing') . openssl_error_string()); + } + } catch (phpmailerException $exc) { + $body = ''; + if ($this->exceptions) { + throw $exc; + } + } + } + return $body; + } + + /** + * Return the start of a message boundary. + * @access protected + * @param string $boundary + * @param string $charSet + * @param string $contentType + * @param string $encoding + * @return string + */ + protected function getBoundary($boundary, $charSet, $contentType, $encoding) + { + $result = ''; + if ($charSet == '') { + $charSet = $this->CharSet; + } + if ($contentType == '') { + $contentType = $this->ContentType; + } + if ($encoding == '') { + $encoding = $this->Encoding; + } + $result .= $this->textLine('--' . $boundary); + $result .= sprintf('Content-Type: %s; charset=%s', $contentType, $charSet); + $result .= $this->LE; + // RFC1341 part 5 says 7bit is assumed if not specified + if ($encoding != '7bit') { + $result .= $this->headerLine('Content-Transfer-Encoding', $encoding); + } + $result .= $this->LE; + + return $result; + } + + /** + * Return the end of a message boundary. + * @access protected + * @param string $boundary + * @return string + */ + protected function endBoundary($boundary) + { + return $this->LE . '--' . $boundary . '--' . $this->LE; + } + + /** + * Set the message type. + * PHPMailer only supports some preset message types, not arbitrary MIME structures. + * @access protected + * @return void + */ + protected function setMessageType() + { + $type = array(); + if ($this->alternativeExists()) { + $type[] = 'alt'; + } + if ($this->inlineImageExists()) { + $type[] = 'inline'; + } + if ($this->attachmentExists()) { + $type[] = 'attach'; + } + $this->message_type = implode('_', $type); + if ($this->message_type == '') { + //The 'plain' message_type refers to the message having a single body element, not that it is plain-text + $this->message_type = 'plain'; + } + } + + /** + * Format a header line. + * @access public + * @param string $name + * @param string $value + * @return string + */ + public function headerLine($name, $value) + { + return $name . ': ' . $value . $this->LE; + } + + /** + * Return a formatted mail line. + * @access public + * @param string $value + * @return string + */ + public function textLine($value) + { + return $value . $this->LE; + } + + /** + * Add an attachment from a path on the filesystem. + * Returns false if the file could not be found or read. + * @param string $path Path to the attachment. + * @param string $name Overrides the attachment name. + * @param string $encoding File encoding (see $Encoding). + * @param string $type File extension (MIME) type. + * @param string $disposition Disposition to use + * @throws phpmailerException + * @return boolean + */ + public function addAttachment($path, $name = '', $encoding = 'base64', $type = '', $disposition = 'attachment') + { + try { + if (!@is_file($path)) { + throw new phpmailerException($this->lang('file_access') . $path, self::STOP_CONTINUE); + } + + // If a MIME type is not specified, try to work it out from the file name + if ($type == '') { + $type = self::filenameToType($path); + } + + $filename = basename($path); + if ($name == '') { + $name = $filename; + } + + $this->attachment[] = array( + 0 => $path, + 1 => $filename, + 2 => $name, + 3 => $encoding, + 4 => $type, + 5 => false, // isStringAttachment + 6 => $disposition, + 7 => 0 + ); + + } catch (phpmailerException $exc) { + $this->setError($exc->getMessage()); + $this->edebug($exc->getMessage()); + if ($this->exceptions) { + throw $exc; + } + return false; + } + return true; + } + + /** + * Return the array of attachments. + * @return array + */ + public function getAttachments() + { + return $this->attachment; + } + + /** + * Attach all file, string, and binary attachments to the message. + * Returns an empty string on failure. + * @access protected + * @param string $disposition_type + * @param string $boundary + * @return string + */ + protected function attachAll($disposition_type, $boundary) + { + // Return text of body + $mime = array(); + $cidUniq = array(); + $incl = array(); + + // Add all attachments + foreach ($this->attachment as $attachment) { + // Check if it is a valid disposition_filter + if ($attachment[6] == $disposition_type) { + // Check for string attachment + $string = ''; + $path = ''; + $bString = $attachment[5]; + if ($bString) { + $string = $attachment[0]; + } else { + $path = $attachment[0]; + } + + $inclhash = md5(serialize($attachment)); + if (in_array($inclhash, $incl)) { + continue; + } + $incl[] = $inclhash; + $name = $attachment[2]; + $encoding = $attachment[3]; + $type = $attachment[4]; + $disposition = $attachment[6]; + $cid = $attachment[7]; + if ($disposition == 'inline' && array_key_exists($cid, $cidUniq)) { + continue; + } + $cidUniq[$cid] = true; + + $mime[] = sprintf('--%s%s', $boundary, $this->LE); + //Only include a filename property if we have one + if (!empty($name)) { + $mime[] = sprintf( + 'Content-Type: %s; name="%s"%s', + $type, + $this->encodeHeader($this->secureHeader($name)), + $this->LE + ); + } else { + $mime[] = sprintf( + 'Content-Type: %s%s', + $type, + $this->LE + ); + } + // RFC1341 part 5 says 7bit is assumed if not specified + if ($encoding != '7bit') { + $mime[] = sprintf('Content-Transfer-Encoding: %s%s', $encoding, $this->LE); + } + + if ($disposition == 'inline') { + $mime[] = sprintf('Content-ID: <%s>%s', $cid, $this->LE); + } + + // If a filename contains any of these chars, it should be quoted, + // but not otherwise: RFC2183 & RFC2045 5.1 + // Fixes a warning in IETF's msglint MIME checker + // Allow for bypassing the Content-Disposition header totally + if (!(empty($disposition))) { + $encoded_name = $this->encodeHeader($this->secureHeader($name)); + if (preg_match('/[ \(\)<>@,;:\\"\/\[\]\?=]/', $encoded_name)) { + $mime[] = sprintf( + 'Content-Disposition: %s; filename="%s"%s', + $disposition, + $encoded_name, + $this->LE . $this->LE + ); + } else { + if (!empty($encoded_name)) { + $mime[] = sprintf( + 'Content-Disposition: %s; filename=%s%s', + $disposition, + $encoded_name, + $this->LE . $this->LE + ); + } else { + $mime[] = sprintf( + 'Content-Disposition: %s%s', + $disposition, + $this->LE . $this->LE + ); + } + } + } else { + $mime[] = $this->LE; + } + + // Encode as string attachment + if ($bString) { + $mime[] = $this->encodeString($string, $encoding); + if ($this->isError()) { + return ''; + } + $mime[] = $this->LE . $this->LE; + } else { + $mime[] = $this->encodeFile($path, $encoding); + if ($this->isError()) { + return ''; + } + $mime[] = $this->LE . $this->LE; + } + } + } + + $mime[] = sprintf('--%s--%s', $boundary, $this->LE); + + return implode('', $mime); + } + + /** + * Encode a file attachment in requested format. + * Returns an empty string on failure. + * @param string $path The full path to the file + * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' + * @throws phpmailerException + * @access protected + * @return string + */ + protected function encodeFile($path, $encoding = 'base64') + { + try { + if (!is_readable($path)) { + throw new phpmailerException($this->lang('file_open') . $path, self::STOP_CONTINUE); + } + $magic_quotes = get_magic_quotes_runtime(); + if ($magic_quotes) { + if (version_compare(PHP_VERSION, '5.3.0', '<')) { + set_magic_quotes_runtime(false); + } else { + //Doesn't exist in PHP 5.4, but we don't need to check because + //get_magic_quotes_runtime always returns false in 5.4+ + //so it will never get here + ini_set('magic_quotes_runtime', false); + } + } + $file_buffer = file_get_contents($path); + $file_buffer = $this->encodeString($file_buffer, $encoding); + if ($magic_quotes) { + if (version_compare(PHP_VERSION, '5.3.0', '<')) { + set_magic_quotes_runtime($magic_quotes); + } else { + ini_set('magic_quotes_runtime', $magic_quotes); + } + } + return $file_buffer; + } catch (Exception $exc) { + $this->setError($exc->getMessage()); + return ''; + } + } + + /** + * Encode a string in requested format. + * Returns an empty string on failure. + * @param string $str The text to encode + * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' + * @access public + * @return string + */ + public function encodeString($str, $encoding = 'base64') + { + $encoded = ''; + switch (strtolower($encoding)) { + case 'base64': + $encoded = chunk_split(base64_encode($str), 76, $this->LE); + break; + case '7bit': + case '8bit': + $encoded = $this->fixEOL($str); + // Make sure it ends with a line break + if (substr($encoded, -(strlen($this->LE))) != $this->LE) { + $encoded .= $this->LE; + } + break; + case 'binary': + $encoded = $str; + break; + case 'quoted-printable': + $encoded = $this->encodeQP($str); + break; + default: + $this->setError($this->lang('encoding') . $encoding); + break; + } + return $encoded; + } + + /** + * Encode a header string optimally. + * Picks shortest of Q, B, quoted-printable or none. + * @access public + * @param string $str + * @param string $position + * @return string + */ + public function encodeHeader($str, $position = 'text') + { + $matchcount = 0; + switch (strtolower($position)) { + case 'phrase': + if (!preg_match('/[\200-\377]/', $str)) { + // Can't use addslashes as we don't know the value of magic_quotes_sybase + $encoded = addcslashes($str, "\0..\37\177\\\""); + if (($str == $encoded) && !preg_match('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str)) { + return ($encoded); + } else { + return ("\"$encoded\""); + } + } + $matchcount = preg_match_all('/[^\040\041\043-\133\135-\176]/', $str, $matches); + break; + /** @noinspection PhpMissingBreakStatementInspection */ + case 'comment': + $matchcount = preg_match_all('/[()"]/', $str, $matches); + // Intentional fall-through + case 'text': + default: + $matchcount += preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches); + break; + } + + //There are no chars that need encoding + if ($matchcount == 0) { + return ($str); + } + + $maxlen = 75 - 7 - strlen($this->CharSet); + // Try to select the encoding which should produce the shortest output + if ($matchcount > strlen($str) / 3) { + // More than a third of the content will need encoding, so B encoding will be most efficient + $encoding = 'B'; + if (function_exists('mb_strlen') && $this->hasMultiBytes($str)) { + // Use a custom function which correctly encodes and wraps long + // multibyte strings without breaking lines within a character + $encoded = $this->base64EncodeWrapMB($str, "\n"); + } else { + $encoded = base64_encode($str); + $maxlen -= $maxlen % 4; + $encoded = trim(chunk_split($encoded, $maxlen, "\n")); + } + } else { + $encoding = 'Q'; + $encoded = $this->encodeQ($str, $position); + $encoded = $this->wrapText($encoded, $maxlen, true); + $encoded = str_replace('=' . self::CRLF, "\n", trim($encoded)); + } + + $encoded = preg_replace('/^(.*)$/m', ' =?' . $this->CharSet . "?$encoding?\\1?=", $encoded); + $encoded = trim(str_replace("\n", $this->LE, $encoded)); + + return $encoded; + } + + /** + * Check if a string contains multi-byte characters. + * @access public + * @param string $str multi-byte text to wrap encode + * @return boolean + */ + public function hasMultiBytes($str) + { + if (function_exists('mb_strlen')) { + return (strlen($str) > mb_strlen($str, $this->CharSet)); + } else { // Assume no multibytes (we can't handle without mbstring functions anyway) + return false; + } + } + + /** + * Does a string contain any 8-bit chars (in any charset)? + * @param string $text + * @return boolean + */ + public function has8bitChars($text) + { + return (boolean)preg_match('/[\x80-\xFF]/', $text); + } + + /** + * Encode and wrap long multibyte strings for mail headers + * without breaking lines within a character. + * Adapted from a function by paravoid + * @link http://www.php.net/manual/en/function.mb-encode-mimeheader.php#60283 + * @access public + * @param string $str multi-byte text to wrap encode + * @param string $linebreak string to use as linefeed/end-of-line + * @return string + */ + public function base64EncodeWrapMB($str, $linebreak = null) + { + $start = '=?' . $this->CharSet . '?B?'; + $end = '?='; + $encoded = ''; + if ($linebreak === null) { + $linebreak = $this->LE; + } + + $mb_length = mb_strlen($str, $this->CharSet); + // Each line must have length <= 75, including $start and $end + $length = 75 - strlen($start) - strlen($end); + // Average multi-byte ratio + $ratio = $mb_length / strlen($str); + // Base64 has a 4:3 ratio + $avgLength = floor($length * $ratio * .75); + + for ($i = 0; $i < $mb_length; $i += $offset) { + $lookBack = 0; + do { + $offset = $avgLength - $lookBack; + $chunk = mb_substr($str, $i, $offset, $this->CharSet); + $chunk = base64_encode($chunk); + $lookBack++; + } while (strlen($chunk) > $length); + $encoded .= $chunk . $linebreak; + } + + // Chomp the last linefeed + $encoded = substr($encoded, 0, -strlen($linebreak)); + return $encoded; + } + + /** + * Encode a string in quoted-printable format. + * According to RFC2045 section 6.7. + * @access public + * @param string $string The text to encode + * @param integer $line_max Number of chars allowed on a line before wrapping + * @return string + * @link http://www.php.net/manual/en/function.quoted-printable-decode.php#89417 Adapted from this comment + */ + public function encodeQP($string, $line_max = 76) + { + // Use native function if it's available (>= PHP5.3) + if (function_exists('quoted_printable_encode')) { + return quoted_printable_encode($string); + } + // Fall back to a pure PHP implementation + $string = str_replace( + array('%20', '%0D%0A.', '%0D%0A', '%'), + array(' ', "\r\n=2E", "\r\n", '='), + rawurlencode($string) + ); + return preg_replace('/[^\r\n]{' . ($line_max - 3) . '}[^=\r\n]{2}/', "$0=\r\n", $string); + } + + /** + * Backward compatibility wrapper for an old QP encoding function that was removed. + * @see PHPMailer::encodeQP() + * @access public + * @param string $string + * @param integer $line_max + * @param boolean $space_conv + * @return string + * @deprecated Use encodeQP instead. + */ + public function encodeQPphp( + $string, + $line_max = 76, + /** @noinspection PhpUnusedParameterInspection */ $space_conv = false + ) { + return $this->encodeQP($string, $line_max); + } + + /** + * Encode a string using Q encoding. + * @link http://tools.ietf.org/html/rfc2047 + * @param string $str the text to encode + * @param string $position Where the text is going to be used, see the RFC for what that means + * @access public + * @return string + */ + public function encodeQ($str, $position = 'text') + { + // There should not be any EOL in the string + $pattern = ''; + $encoded = str_replace(array("\r", "\n"), '', $str); + switch (strtolower($position)) { + case 'phrase': + // RFC 2047 section 5.3 + $pattern = '^A-Za-z0-9!*+\/ -'; + break; + /** @noinspection PhpMissingBreakStatementInspection */ + case 'comment': + // RFC 2047 section 5.2 + $pattern = '\(\)"'; + // intentional fall-through + // for this reason we build the $pattern without including delimiters and [] + case 'text': + default: + // RFC 2047 section 5.1 + // Replace every high ascii, control, =, ? and _ characters + $pattern = '\000-\011\013\014\016-\037\075\077\137\177-\377' . $pattern; + break; + } + $matches = array(); + if (preg_match_all("/[{$pattern}]/", $encoded, $matches)) { + // If the string contains an '=', make sure it's the first thing we replace + // so as to avoid double-encoding + $eqkey = array_search('=', $matches[0]); + if (false !== $eqkey) { + unset($matches[0][$eqkey]); + array_unshift($matches[0], '='); + } + foreach (array_unique($matches[0]) as $char) { + $encoded = str_replace($char, '=' . sprintf('%02X', ord($char)), $encoded); + } + } + // Replace every spaces to _ (more readable than =20) + return str_replace(' ', '_', $encoded); + } + + /** + * Add a string or binary attachment (non-filesystem). + * This method can be used to attach ascii or binary data, + * such as a BLOB record from a database. + * @param string $string String attachment data. + * @param string $filename Name of the attachment. + * @param string $encoding File encoding (see $Encoding). + * @param string $type File extension (MIME) type. + * @param string $disposition Disposition to use + * @return void + */ + public function addStringAttachment( + $string, + $filename, + $encoding = 'base64', + $type = '', + $disposition = 'attachment' + ) { + // If a MIME type is not specified, try to work it out from the file name + if ($type == '') { + $type = self::filenameToType($filename); + } + // Append to $attachment array + $this->attachment[] = array( + 0 => $string, + 1 => $filename, + 2 => basename($filename), + 3 => $encoding, + 4 => $type, + 5 => true, // isStringAttachment + 6 => $disposition, + 7 => 0 + ); + } + + /** + * Add an embedded (inline) attachment from a file. + * This can include images, sounds, and just about any other document type. + * These differ from 'regular' attachments in that they are intended to be + * displayed inline with the message, not just attached for download. + * This is used in HTML messages that embed the images + * the HTML refers to using the $cid value. + * @param string $path Path to the attachment. + * @param string $cid Content ID of the attachment; Use this to reference + * the content when using an embedded image in HTML. + * @param string $name Overrides the attachment name. + * @param string $encoding File encoding (see $Encoding). + * @param string $type File MIME type. + * @param string $disposition Disposition to use + * @return boolean True on successfully adding an attachment + */ + public function addEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = '', $disposition = 'inline') + { + if (!@is_file($path)) { + $this->setError($this->lang('file_access') . $path); + return false; + } + + // If a MIME type is not specified, try to work it out from the file name + if ($type == '') { + $type = self::filenameToType($path); + } + + $filename = basename($path); + if ($name == '') { + $name = $filename; + } + + // Append to $attachment array + $this->attachment[] = array( + 0 => $path, + 1 => $filename, + 2 => $name, + 3 => $encoding, + 4 => $type, + 5 => false, // isStringAttachment + 6 => $disposition, + 7 => $cid + ); + return true; + } + + /** + * Add an embedded stringified attachment. + * This can include images, sounds, and just about any other document type. + * Be sure to set the $type to an image type for images: + * JPEG images use 'image/jpeg', GIF uses 'image/gif', PNG uses 'image/png'. + * @param string $string The attachment binary data. + * @param string $cid Content ID of the attachment; Use this to reference + * the content when using an embedded image in HTML. + * @param string $name + * @param string $encoding File encoding (see $Encoding). + * @param string $type MIME type. + * @param string $disposition Disposition to use + * @return boolean True on successfully adding an attachment + */ + public function addStringEmbeddedImage( + $string, + $cid, + $name = '', + $encoding = 'base64', + $type = '', + $disposition = 'inline' + ) { + // If a MIME type is not specified, try to work it out from the name + if ($type == '' and !empty($name)) { + $type = self::filenameToType($name); + } + + // Append to $attachment array + $this->attachment[] = array( + 0 => $string, + 1 => $name, + 2 => $name, + 3 => $encoding, + 4 => $type, + 5 => true, // isStringAttachment + 6 => $disposition, + 7 => $cid + ); + return true; + } + + /** + * Check if an inline attachment is present. + * @access public + * @return boolean + */ + public function inlineImageExists() + { + foreach ($this->attachment as $attachment) { + if ($attachment[6] == 'inline') { + return true; + } + } + return false; + } + + /** + * Check if an attachment (non-inline) is present. + * @return boolean + */ + public function attachmentExists() + { + foreach ($this->attachment as $attachment) { + if ($attachment[6] == 'attachment') { + return true; + } + } + return false; + } + + /** + * Check if this message has an alternative body set. + * @return boolean + */ + public function alternativeExists() + { + return !empty($this->AltBody); + } + + /** + * Clear queued addresses of given kind. + * @access protected + * @param string $kind 'to', 'cc', or 'bcc' + * @return void + */ + public function clearQueuedAddresses($kind) + { + $RecipientsQueue = $this->RecipientsQueue; + foreach ($RecipientsQueue as $address => $params) { + if ($params[0] == $kind) { + unset($this->RecipientsQueue[$address]); + } + } + } + + /** + * Clear all To recipients. + * @return void + */ + public function clearAddresses() + { + foreach ($this->to as $to) { + unset($this->all_recipients[strtolower($to[0])]); + } + $this->to = array(); + $this->clearQueuedAddresses('to'); + } + + /** + * Clear all CC recipients. + * @return void + */ + public function clearCCs() + { + foreach ($this->cc as $cc) { + unset($this->all_recipients[strtolower($cc[0])]); + } + $this->cc = array(); + $this->clearQueuedAddresses('cc'); + } + + /** + * Clear all BCC recipients. + * @return void + */ + public function clearBCCs() + { + foreach ($this->bcc as $bcc) { + unset($this->all_recipients[strtolower($bcc[0])]); + } + $this->bcc = array(); + $this->clearQueuedAddresses('bcc'); + } + + /** + * Clear all ReplyTo recipients. + * @return void + */ + public function clearReplyTos() + { + $this->ReplyTo = array(); + $this->ReplyToQueue = array(); + } + + /** + * Clear all recipient types. + * @return void + */ + public function clearAllRecipients() + { + $this->to = array(); + $this->cc = array(); + $this->bcc = array(); + $this->all_recipients = array(); + $this->RecipientsQueue = array(); + } + + /** + * Clear all filesystem, string, and binary attachments. + * @return void + */ + public function clearAttachments() + { + $this->attachment = array(); + } + + /** + * Clear all custom headers. + * @return void + */ + public function clearCustomHeaders() + { + $this->CustomHeader = array(); + } + + /** + * Add an error message to the error container. + * @access protected + * @param string $msg + * @return void + */ + protected function setError($msg) + { + $this->error_count++; + if ($this->Mailer == 'smtp' and !is_null($this->smtp)) { + $lasterror = $this->smtp->getError(); + if (!empty($lasterror['error'])) { + $msg .= $this->lang('smtp_error') . $lasterror['error']; + if (!empty($lasterror['detail'])) { + $msg .= ' Detail: '. $lasterror['detail']; + } + if (!empty($lasterror['smtp_code'])) { + $msg .= ' SMTP code: ' . $lasterror['smtp_code']; + } + if (!empty($lasterror['smtp_code_ex'])) { + $msg .= ' Additional SMTP info: ' . $lasterror['smtp_code_ex']; + } + } + } + $this->ErrorInfo = $msg; + } + + /** + * Return an RFC 822 formatted date. + * @access public + * @return string + * @static + */ + public static function rfcDate() + { + // Set the time zone to whatever the default is to avoid 500 errors + // Will default to UTC if it's not set properly in php.ini + date_default_timezone_set(@date_default_timezone_get()); + return date('D, j M Y H:i:s O'); + } + + /** + * Get the server hostname. + * Returns 'localhost.localdomain' if unknown. + * @access protected + * @return string + */ + protected function serverHostname() + { + $result = 'localhost.localdomain'; + if (!empty($this->Hostname)) { + $result = $this->Hostname; + } elseif (isset($_SERVER) and array_key_exists('SERVER_NAME', $_SERVER) and !empty($_SERVER['SERVER_NAME'])) { + $result = $_SERVER['SERVER_NAME']; + } elseif (function_exists('gethostname') && gethostname() !== false) { + $result = gethostname(); + } elseif (php_uname('n') !== false) { + $result = php_uname('n'); + } + return $result; + } + + /** + * Get an error message in the current language. + * @access protected + * @param string $key + * @return string + */ + protected function lang($key) + { + if (count($this->language) < 1) { + $this->setLanguage('en'); // set the default language + } + + if (array_key_exists($key, $this->language)) { + if ($key == 'smtp_connect_failed') { + //Include a link to troubleshooting docs on SMTP connection failure + //this is by far the biggest cause of support questions + //but it's usually not PHPMailer's fault. + return $this->language[$key] . ' https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting'; + } + return $this->language[$key]; + } else { + //Return the key as a fallback + return $key; + } + } + + /** + * Check if an error occurred. + * @access public + * @return boolean True if an error did occur. + */ + public function isError() + { + return ($this->error_count > 0); + } + + /** + * Ensure consistent line endings in a string. + * Changes every end of line from CRLF, CR or LF to $this->LE. + * @access public + * @param string $str String to fixEOL + * @return string + */ + public function fixEOL($str) + { + // Normalise to \n + $nstr = str_replace(array("\r\n", "\r"), "\n", $str); + // Now convert LE as needed + if ($this->LE !== "\n") { + $nstr = str_replace("\n", $this->LE, $nstr); + } + return $nstr; + } + + /** + * Add a custom header. + * $name value can be overloaded to contain + * both header name and value (name:value) + * @access public + * @param string $name Custom header name + * @param string $value Header value + * @return void + */ + public function addCustomHeader($name, $value = null) + { + if ($value === null) { + // Value passed in as name:value + $this->CustomHeader[] = explode(':', $name, 2); + } else { + $this->CustomHeader[] = array($name, $value); + } + } + + /** + * Returns all custom headers. + * @return array + */ + public function getCustomHeaders() + { + return $this->CustomHeader; + } + + /** + * Create a message body from an HTML string. + * Automatically inlines images and creates a plain-text version by converting the HTML, + * overwriting any existing values in Body and AltBody. + * $basedir is used when handling relative image paths, e.g. + * will look for an image file in $basedir/images/a.png and convert it to inline. + * If you don't want to apply these transformations to your HTML, just set Body and AltBody yourself. + * @access public + * @param string $message HTML message string + * @param string $basedir base directory for relative paths to images + * @param boolean|callable $advanced Whether to use the internal HTML to text converter + * or your own custom converter @see PHPMailer::html2text() + * @return string $message The transformed message Body + */ + public function msgHTML($message, $basedir = '', $advanced = false) + { + preg_match_all('/(src|background)=["\'](.*)["\']/Ui', $message, $images); + if (array_key_exists(2, $images)) { + foreach ($images[2] as $imgindex => $url) { + // Convert data URIs into embedded images + if (preg_match('#^data:(image[^;,]*)(;base64)?,#', $url, $match)) { + $data = substr($url, strpos($url, ',')); + if ($match[2]) { + $data = base64_decode($data); + } else { + $data = rawurldecode($data); + } + $cid = md5($url) . '@phpmailer.0'; // RFC2392 S 2 + if ($this->addStringEmbeddedImage($data, $cid, 'embed' . $imgindex, 'base64', $match[1])) { + $message = str_replace( + $images[0][$imgindex], + $images[1][$imgindex] . '="cid:' . $cid . '"', + $message + ); + } + } elseif (substr($url, 0, 4) !== 'cid:' && !preg_match('#^[a-z][a-z0-9+.-]*://#i', $url)) { + // Do not change urls for absolute images (thanks to corvuscorax) + // Do not change urls that are already inline images + $filename = basename($url); + $directory = dirname($url); + if ($directory == '.') { + $directory = ''; + } + $cid = md5($url) . '@phpmailer.0'; // RFC2392 S 2 + if (strlen($basedir) > 1 && substr($basedir, -1) != '/') { + $basedir .= '/'; + } + if (strlen($directory) > 1 && substr($directory, -1) != '/') { + $directory .= '/'; + } + if ($this->addEmbeddedImage( + $basedir . $directory . $filename, + $cid, + $filename, + 'base64', + self::_mime_types((string)self::mb_pathinfo($filename, PATHINFO_EXTENSION)) + ) + ) { + $message = preg_replace( + '/' . $images[1][$imgindex] . '=["\']' . preg_quote($url, '/') . '["\']/Ui', + $images[1][$imgindex] . '="cid:' . $cid . '"', + $message + ); + } + } + } + } + $this->isHTML(true); + // Convert all message body line breaks to CRLF, makes quoted-printable encoding work much better + $this->Body = $this->normalizeBreaks($message); + $this->AltBody = $this->normalizeBreaks($this->html2text($message, $advanced)); + if (!$this->alternativeExists()) { + $this->AltBody = 'To view this email message, open it in a program that understands HTML!' . + self::CRLF . self::CRLF; + } + return $this->Body; + } + + /** + * Convert an HTML string into plain text. + * This is used by msgHTML(). + * Note - older versions of this function used a bundled advanced converter + * which was been removed for license reasons in #232. + * Example usage: + * + * // Use default conversion + * $plain = $mail->html2text($html); + * // Use your own custom converter + * $plain = $mail->html2text($html, function($html) { + * $converter = new MyHtml2text($html); + * return $converter->get_text(); + * }); + * + * @param string $html The HTML text to convert + * @param boolean|callable $advanced Any boolean value to use the internal converter, + * or provide your own callable for custom conversion. + * @return string + */ + public function html2text($html, $advanced = false) + { + if (is_callable($advanced)) { + return call_user_func($advanced, $html); + } + return html_entity_decode( + trim(strip_tags(preg_replace('/<(head|title|style|script)[^>]*>.*?<\/\\1>/si', '', $html))), + ENT_QUOTES, + $this->CharSet + ); + } + + /** + * Get the MIME type for a file extension. + * @param string $ext File extension + * @access public + * @return string MIME type of file. + * @static + */ + public static function _mime_types($ext = '') + { + $mimes = array( + 'xl' => 'application/excel', + 'js' => 'application/javascript', + 'hqx' => 'application/mac-binhex40', + 'cpt' => 'application/mac-compactpro', + 'bin' => 'application/macbinary', + 'doc' => 'application/msword', + 'word' => 'application/msword', + 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', + 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template', + 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', + 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', + 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide', + 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', + 'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12', + 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12', + 'class' => 'application/octet-stream', + 'dll' => 'application/octet-stream', + 'dms' => 'application/octet-stream', + 'exe' => 'application/octet-stream', + 'lha' => 'application/octet-stream', + 'lzh' => 'application/octet-stream', + 'psd' => 'application/octet-stream', + 'sea' => 'application/octet-stream', + 'so' => 'application/octet-stream', + 'oda' => 'application/oda', + 'pdf' => 'application/pdf', + 'ai' => 'application/postscript', + 'eps' => 'application/postscript', + 'ps' => 'application/postscript', + 'smi' => 'application/smil', + 'smil' => 'application/smil', + 'mif' => 'application/vnd.mif', + 'xls' => 'application/vnd.ms-excel', + 'ppt' => 'application/vnd.ms-powerpoint', + 'wbxml' => 'application/vnd.wap.wbxml', + 'wmlc' => 'application/vnd.wap.wmlc', + 'dcr' => 'application/x-director', + 'dir' => 'application/x-director', + 'dxr' => 'application/x-director', + 'dvi' => 'application/x-dvi', + 'gtar' => 'application/x-gtar', + 'php3' => 'application/x-httpd-php', + 'php4' => 'application/x-httpd-php', + 'php' => 'application/x-httpd-php', + 'phtml' => 'application/x-httpd-php', + 'phps' => 'application/x-httpd-php-source', + 'swf' => 'application/x-shockwave-flash', + 'sit' => 'application/x-stuffit', + 'tar' => 'application/x-tar', + 'tgz' => 'application/x-tar', + 'xht' => 'application/xhtml+xml', + 'xhtml' => 'application/xhtml+xml', + 'zip' => 'application/zip', + 'mid' => 'audio/midi', + 'midi' => 'audio/midi', + 'mp2' => 'audio/mpeg', + 'mp3' => 'audio/mpeg', + 'mpga' => 'audio/mpeg', + 'aif' => 'audio/x-aiff', + 'aifc' => 'audio/x-aiff', + 'aiff' => 'audio/x-aiff', + 'ram' => 'audio/x-pn-realaudio', + 'rm' => 'audio/x-pn-realaudio', + 'rpm' => 'audio/x-pn-realaudio-plugin', + 'ra' => 'audio/x-realaudio', + 'wav' => 'audio/x-wav', + 'bmp' => 'image/bmp', + 'gif' => 'image/gif', + 'jpeg' => 'image/jpeg', + 'jpe' => 'image/jpeg', + 'jpg' => 'image/jpeg', + 'png' => 'image/png', + 'tiff' => 'image/tiff', + 'tif' => 'image/tiff', + 'eml' => 'message/rfc822', + 'css' => 'text/css', + 'html' => 'text/html', + 'htm' => 'text/html', + 'shtml' => 'text/html', + 'log' => 'text/plain', + 'text' => 'text/plain', + 'txt' => 'text/plain', + 'rtx' => 'text/richtext', + 'rtf' => 'text/rtf', + 'vcf' => 'text/vcard', + 'vcard' => 'text/vcard', + 'xml' => 'text/xml', + 'xsl' => 'text/xml', + 'mpeg' => 'video/mpeg', + 'mpe' => 'video/mpeg', + 'mpg' => 'video/mpeg', + 'mov' => 'video/quicktime', + 'qt' => 'video/quicktime', + 'rv' => 'video/vnd.rn-realvideo', + 'avi' => 'video/x-msvideo', + 'movie' => 'video/x-sgi-movie' + ); + if (array_key_exists(strtolower($ext), $mimes)) { + return $mimes[strtolower($ext)]; + } + return 'application/octet-stream'; + } + + /** + * Map a file name to a MIME type. + * Defaults to 'application/octet-stream', i.e.. arbitrary binary data. + * @param string $filename A file name or full path, does not need to exist as a file + * @return string + * @static + */ + public static function filenameToType($filename) + { + // In case the path is a URL, strip any query string before getting extension + $qpos = strpos($filename, '?'); + if (false !== $qpos) { + $filename = substr($filename, 0, $qpos); + } + $pathinfo = self::mb_pathinfo($filename); + return self::_mime_types($pathinfo['extension']); + } + + /** + * Multi-byte-safe pathinfo replacement. + * Drop-in replacement for pathinfo(), but multibyte-safe, cross-platform-safe, old-version-safe. + * Works similarly to the one in PHP >= 5.2.0 + * @link http://www.php.net/manual/en/function.pathinfo.php#107461 + * @param string $path A filename or path, does not need to exist as a file + * @param integer|string $options Either a PATHINFO_* constant, + * or a string name to return only the specified piece, allows 'filename' to work on PHP < 5.2 + * @return string|array + * @static + */ + public static function mb_pathinfo($path, $options = null) + { + $ret = array('dirname' => '', 'basename' => '', 'extension' => '', 'filename' => ''); + $pathinfo = array(); + if (preg_match('%^(.*?)[\\\\/]*(([^/\\\\]*?)(\.([^\.\\\\/]+?)|))[\\\\/\.]*$%im', $path, $pathinfo)) { + if (array_key_exists(1, $pathinfo)) { + $ret['dirname'] = $pathinfo[1]; + } + if (array_key_exists(2, $pathinfo)) { + $ret['basename'] = $pathinfo[2]; + } + if (array_key_exists(5, $pathinfo)) { + $ret['extension'] = $pathinfo[5]; + } + if (array_key_exists(3, $pathinfo)) { + $ret['filename'] = $pathinfo[3]; + } + } + switch ($options) { + case PATHINFO_DIRNAME: + case 'dirname': + return $ret['dirname']; + case PATHINFO_BASENAME: + case 'basename': + return $ret['basename']; + case PATHINFO_EXTENSION: + case 'extension': + return $ret['extension']; + case PATHINFO_FILENAME: + case 'filename': + return $ret['filename']; + default: + return $ret; + } + } + + /** + * Set or reset instance properties. + * You should avoid this function - it's more verbose, less efficient, more error-prone and + * harder to debug than setting properties directly. + * Usage Example: + * `$mail->set('SMTPSecure', 'tls');` + * is the same as: + * `$mail->SMTPSecure = 'tls';` + * @access public + * @param string $name The property name to set + * @param mixed $value The value to set the property to + * @return boolean + * @TODO Should this not be using the __set() magic function? + */ + public function set($name, $value = '') + { + if (property_exists($this, $name)) { + $this->$name = $value; + return true; + } else { + $this->setError($this->lang('variable_set') . $name); + return false; + } + } + + /** + * Strip newlines to prevent header injection. + * @access public + * @param string $str + * @return string + */ + public function secureHeader($str) + { + return trim(str_replace(array("\r", "\n"), '', $str)); + } + + /** + * Normalize line breaks in a string. + * Converts UNIX LF, Mac CR and Windows CRLF line breaks into a single line break format. + * Defaults to CRLF (for message bodies) and preserves consecutive breaks. + * @param string $text + * @param string $breaktype What kind of line break to use, defaults to CRLF + * @return string + * @access public + * @static + */ + public static function normalizeBreaks($text, $breaktype = "\r\n") + { + return preg_replace('/(\r\n|\r|\n)/ms', $breaktype, $text); + } + + /** + * Set the public and private key files and password for S/MIME signing. + * @access public + * @param string $cert_filename + * @param string $key_filename + * @param string $key_pass Password for private key + * @param string $extracerts_filename Optional path to chain certificate + */ + public function sign($cert_filename, $key_filename, $key_pass, $extracerts_filename = '') + { + $this->sign_cert_file = $cert_filename; + $this->sign_key_file = $key_filename; + $this->sign_key_pass = $key_pass; + $this->sign_extracerts_file = $extracerts_filename; + } + + /** + * Quoted-Printable-encode a DKIM header. + * @access public + * @param string $txt + * @return string + */ + public function DKIM_QP($txt) + { + $line = ''; + for ($i = 0; $i < strlen($txt); $i++) { + $ord = ord($txt[$i]); + if (((0x21 <= $ord) && ($ord <= 0x3A)) || $ord == 0x3C || ((0x3E <= $ord) && ($ord <= 0x7E))) { + $line .= $txt[$i]; + } else { + $line .= '=' . sprintf('%02X', $ord); + } + } + return $line; + } + + /** + * Generate a DKIM signature. + * @access public + * @param string $signHeader + * @throws phpmailerException + * @return string The DKIM signature value + */ + public function DKIM_Sign($signHeader) + { + if (!defined('PKCS7_TEXT')) { + if ($this->exceptions) { + throw new phpmailerException($this->lang('extension_missing') . 'openssl'); + } + return ''; + } + $privKeyStr = !empty($this->DKIM_private_string) ? $this->DKIM_private_string : file_get_contents($this->DKIM_private); + if ('' != $this->DKIM_passphrase) { + $privKey = openssl_pkey_get_private($privKeyStr, $this->DKIM_passphrase); + } else { + $privKey = openssl_pkey_get_private($privKeyStr); + } + //Workaround for missing digest algorithms in old PHP & OpenSSL versions + //@link http://stackoverflow.com/a/11117338/333340 + if (version_compare(PHP_VERSION, '5.3.0') >= 0 and + in_array('sha256WithRSAEncryption', openssl_get_md_methods(true))) { + if (openssl_sign($signHeader, $signature, $privKey, 'sha256WithRSAEncryption')) { + openssl_pkey_free($privKey); + return base64_encode($signature); + } + } else { + $pinfo = openssl_pkey_get_details($privKey); + $hash = hash('sha256', $signHeader); + //'Magic' constant for SHA256 from RFC3447 + //@link https://tools.ietf.org/html/rfc3447#page-43 + $t = '3031300d060960864801650304020105000420' . $hash; + $pslen = $pinfo['bits'] / 8 - (strlen($t) / 2 + 3); + $eb = pack('H*', '0001' . str_repeat('FF', $pslen) . '00' . $t); + + if (openssl_private_encrypt($eb, $signature, $privKey, OPENSSL_NO_PADDING)) { + openssl_pkey_free($privKey); + return base64_encode($signature); + } + } + openssl_pkey_free($privKey); + return ''; + } + + /** + * Generate a DKIM canonicalization header. + * @access public + * @param string $signHeader Header + * @return string + */ + public function DKIM_HeaderC($signHeader) + { + $signHeader = preg_replace('/\r\n\s+/', ' ', $signHeader); + $lines = explode("\r\n", $signHeader); + foreach ($lines as $key => $line) { + list($heading, $value) = explode(':', $line, 2); + $heading = strtolower($heading); + $value = preg_replace('/\s{2,}/', ' ', $value); // Compress useless spaces + $lines[$key] = $heading . ':' . trim($value); // Don't forget to remove WSP around the value + } + $signHeader = implode("\r\n", $lines); + return $signHeader; + } + + /** + * Generate a DKIM canonicalization body. + * @access public + * @param string $body Message Body + * @return string + */ + public function DKIM_BodyC($body) + { + if ($body == '') { + return "\r\n"; + } + // stabilize line endings + $body = str_replace("\r\n", "\n", $body); + $body = str_replace("\n", "\r\n", $body); + // END stabilize line endings + while (substr($body, strlen($body) - 4, 4) == "\r\n\r\n") { + $body = substr($body, 0, strlen($body) - 2); + } + return $body; + } + + /** + * Create the DKIM header and body in a new message header. + * @access public + * @param string $headers_line Header lines + * @param string $subject Subject + * @param string $body Body + * @return string + */ + public function DKIM_Add($headers_line, $subject, $body) + { + $DKIMsignatureType = 'rsa-sha256'; // Signature & hash algorithms + $DKIMcanonicalization = 'relaxed/simple'; // Canonicalization of header/body + $DKIMquery = 'dns/txt'; // Query method + $DKIMtime = time(); // Signature Timestamp = seconds since 00:00:00 - Jan 1, 1970 (UTC time zone) + $subject_header = "Subject: $subject"; + $headers = explode($this->LE, $headers_line); + $from_header = ''; + $to_header = ''; + $date_header = ''; + $current = ''; + foreach ($headers as $header) { + if (strpos($header, 'From:') === 0) { + $from_header = $header; + $current = 'from_header'; + } elseif (strpos($header, 'To:') === 0) { + $to_header = $header; + $current = 'to_header'; + } elseif (strpos($header, 'Date:') === 0) { + $date_header = $header; + $current = 'date_header'; + } else { + if (!empty($$current) && strpos($header, ' =?') === 0) { + $$current .= $header; + } else { + $current = ''; + } + } + } + $from = str_replace('|', '=7C', $this->DKIM_QP($from_header)); + $to = str_replace('|', '=7C', $this->DKIM_QP($to_header)); + $date = str_replace('|', '=7C', $this->DKIM_QP($date_header)); + $subject = str_replace( + '|', + '=7C', + $this->DKIM_QP($subject_header) + ); // Copied header fields (dkim-quoted-printable) + $body = $this->DKIM_BodyC($body); + $DKIMlen = strlen($body); // Length of body + $DKIMb64 = base64_encode(pack('H*', hash('sha256', $body))); // Base64 of packed binary SHA-256 hash of body + if ('' == $this->DKIM_identity) { + $ident = ''; + } else { + $ident = ' i=' . $this->DKIM_identity . ';'; + } + $dkimhdrs = 'DKIM-Signature: v=1; a=' . + $DKIMsignatureType . '; q=' . + $DKIMquery . '; l=' . + $DKIMlen . '; s=' . + $this->DKIM_selector . + ";\r\n" . + "\tt=" . $DKIMtime . '; c=' . $DKIMcanonicalization . ";\r\n" . + "\th=From:To:Date:Subject;\r\n" . + "\td=" . $this->DKIM_domain . ';' . $ident . "\r\n" . + "\tz=$from\r\n" . + "\t|$to\r\n" . + "\t|$date\r\n" . + "\t|$subject;\r\n" . + "\tbh=" . $DKIMb64 . ";\r\n" . + "\tb="; + $toSign = $this->DKIM_HeaderC( + $from_header . "\r\n" . + $to_header . "\r\n" . + $date_header . "\r\n" . + $subject_header . "\r\n" . + $dkimhdrs + ); + $signed = $this->DKIM_Sign($toSign); + return $dkimhdrs . $signed . "\r\n"; + } + + /** + * Detect if a string contains a line longer than the maximum line length allowed. + * @param string $str + * @return boolean + * @static + */ + public static function hasLineLongerThanMax($str) + { + //+2 to include CRLF line break for a 1000 total + return (boolean)preg_match('/^(.{'.(self::MAX_LINE_LENGTH + 2).',})/m', $str); + } + + /** + * Allows for public read access to 'to' property. + * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * @access public + * @return array + */ + public function getToAddresses() + { + return $this->to; + } + + /** + * Allows for public read access to 'cc' property. + * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * @access public + * @return array + */ + public function getCcAddresses() + { + return $this->cc; + } + + /** + * Allows for public read access to 'bcc' property. + * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * @access public + * @return array + */ + public function getBccAddresses() + { + return $this->bcc; + } + + /** + * Allows for public read access to 'ReplyTo' property. + * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * @access public + * @return array + */ + public function getReplyToAddresses() + { + return $this->ReplyTo; + } + + /** + * Allows for public read access to 'all_recipients' property. + * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * @access public + * @return array + */ + public function getAllRecipientAddresses() + { + return $this->all_recipients; + } + + /** + * Perform a callback. + * @param boolean $isSent + * @param array $to + * @param array $cc + * @param array $bcc + * @param string $subject + * @param string $body + * @param string $from + */ + protected function doCallback($isSent, $to, $cc, $bcc, $subject, $body, $from) + { + if (!empty($this->action_function) && is_callable($this->action_function)) { + $params = array($isSent, $to, $cc, $bcc, $subject, $body, $from); + call_user_func_array($this->action_function, $params); + } + } +} + +/** + * PHPMailer exception handler + * @package PHPMailer + */ +class phpmailerException extends Exception +{ + /** + * Prettify error message output + * @return string + */ + public function errorMessage() + { + $errorMsg = '' . $this->getMessage() . "
            \n"; + return $errorMsg; + } +} diff --git a/vendor/phpmailer/phpmailer/class.phpmaileroauth.php b/vendor/phpmailer/phpmailer/class.phpmaileroauth.php new file mode 100644 index 0000000000..b1bb09f0a3 --- /dev/null +++ b/vendor/phpmailer/phpmailer/class.phpmaileroauth.php @@ -0,0 +1,197 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2014 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * PHPMailerOAuth - PHPMailer subclass adding OAuth support. + * @package PHPMailer + * @author @sherryl4george + * @author Marcus Bointon (@Synchro) + */ +class PHPMailerOAuth extends PHPMailer +{ + /** + * The OAuth user's email address + * @var string + */ + public $oauthUserEmail = ''; + + /** + * The OAuth refresh token + * @var string + */ + public $oauthRefreshToken = ''; + + /** + * The OAuth client ID + * @var string + */ + public $oauthClientId = ''; + + /** + * The OAuth client secret + * @var string + */ + public $oauthClientSecret = ''; + + /** + * An instance of the PHPMailerOAuthGoogle class. + * @var PHPMailerOAuthGoogle + * @access protected + */ + protected $oauth = null; + + /** + * Get a PHPMailerOAuthGoogle instance to use. + * @return PHPMailerOAuthGoogle + */ + public function getOAUTHInstance() + { + if (!is_object($this->oauth)) { + $this->oauth = new PHPMailerOAuthGoogle( + $this->oauthUserEmail, + $this->oauthClientSecret, + $this->oauthClientId, + $this->oauthRefreshToken + ); + } + return $this->oauth; + } + + /** + * Initiate a connection to an SMTP server. + * Overrides the original smtpConnect method to add support for OAuth. + * @param array $options An array of options compatible with stream_context_create() + * @uses SMTP + * @access public + * @return bool + * @throws phpmailerException + */ + public function smtpConnect($options = array()) + { + if (is_null($this->smtp)) { + $this->smtp = $this->getSMTPInstance(); + } + + if (is_null($this->oauth)) { + $this->oauth = $this->getOAUTHInstance(); + } + + // Already connected? + if ($this->smtp->connected()) { + return true; + } + + $this->smtp->setTimeout($this->Timeout); + $this->smtp->setDebugLevel($this->SMTPDebug); + $this->smtp->setDebugOutput($this->Debugoutput); + $this->smtp->setVerp($this->do_verp); + $hosts = explode(';', $this->Host); + $lastexception = null; + + foreach ($hosts as $hostentry) { + $hostinfo = array(); + if (!preg_match('/^((ssl|tls):\/\/)*([a-zA-Z0-9\.-]*):?([0-9]*)$/', trim($hostentry), $hostinfo)) { + // Not a valid host entry + continue; + } + // $hostinfo[2]: optional ssl or tls prefix + // $hostinfo[3]: the hostname + // $hostinfo[4]: optional port number + // The host string prefix can temporarily override the current setting for SMTPSecure + // If it's not specified, the default value is used + $prefix = ''; + $secure = $this->SMTPSecure; + $tls = ($this->SMTPSecure == 'tls'); + if ('ssl' == $hostinfo[2] or ('' == $hostinfo[2] and 'ssl' == $this->SMTPSecure)) { + $prefix = 'ssl://'; + $tls = false; // Can't have SSL and TLS at the same time + $secure = 'ssl'; + } elseif ($hostinfo[2] == 'tls') { + $tls = true; + // tls doesn't use a prefix + $secure = 'tls'; + } + //Do we need the OpenSSL extension? + $sslext = defined('OPENSSL_ALGO_SHA1'); + if ('tls' === $secure or 'ssl' === $secure) { + //Check for an OpenSSL constant rather than using extension_loaded, which is sometimes disabled + if (!$sslext) { + throw new phpmailerException($this->lang('extension_missing').'openssl', self::STOP_CRITICAL); + } + } + $host = $hostinfo[3]; + $port = $this->Port; + $tport = (integer)$hostinfo[4]; + if ($tport > 0 and $tport < 65536) { + $port = $tport; + } + if ($this->smtp->connect($prefix . $host, $port, $this->Timeout, $options)) { + try { + if ($this->Helo) { + $hello = $this->Helo; + } else { + $hello = $this->serverHostname(); + } + $this->smtp->hello($hello); + //Automatically enable TLS encryption if: + // * it's not disabled + // * we have openssl extension + // * we are not already using SSL + // * the server offers STARTTLS + if ($this->SMTPAutoTLS and $sslext and $secure != 'ssl' and $this->smtp->getServerExt('STARTTLS')) { + $tls = true; + } + if ($tls) { + if (!$this->smtp->startTLS()) { + throw new phpmailerException($this->lang('connect_host')); + } + // We must resend HELO after tls negotiation + $this->smtp->hello($hello); + } + if ($this->SMTPAuth) { + if (!$this->smtp->authenticate( + $this->Username, + $this->Password, + $this->AuthType, + $this->Realm, + $this->Workstation, + $this->oauth + ) + ) { + throw new phpmailerException($this->lang('authenticate')); + } + } + return true; + } catch (phpmailerException $exc) { + $lastexception = $exc; + $this->edebug($exc->getMessage()); + // We must have connected, but then failed TLS or Auth, so close connection nicely + $this->smtp->quit(); + } + } + } + // If we get here, all connection attempts have failed, so close connection hard + $this->smtp->close(); + // As we've caught all exceptions, just report whatever the last one was + if ($this->exceptions and !is_null($lastexception)) { + throw $lastexception; + } + return false; + } +} diff --git a/vendor/phpmailer/phpmailer/class.phpmaileroauthgoogle.php b/vendor/phpmailer/phpmailer/class.phpmaileroauthgoogle.php new file mode 100644 index 0000000000..71c9bd32ff --- /dev/null +++ b/vendor/phpmailer/phpmailer/class.phpmaileroauthgoogle.php @@ -0,0 +1,77 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2014 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * PHPMailerOAuthGoogle - Wrapper for League OAuth2 Google provider. + * @package PHPMailer + * @author @sherryl4george + * @author Marcus Bointon (@Synchro) + * @link https://github.com/thephpleague/oauth2-client + */ +class PHPMailerOAuthGoogle +{ + private $oauthUserEmail = ''; + private $oauthRefreshToken = ''; + private $oauthClientId = ''; + private $oauthClientSecret = ''; + + /** + * @param string $UserEmail + * @param string $ClientSecret + * @param string $ClientId + * @param string $RefreshToken + */ + public function __construct( + $UserEmail, + $ClientSecret, + $ClientId, + $RefreshToken + ) { + $this->oauthClientId = $ClientId; + $this->oauthClientSecret = $ClientSecret; + $this->oauthRefreshToken = $RefreshToken; + $this->oauthUserEmail = $UserEmail; + } + + private function getProvider() + { + return new League\OAuth2\Client\Provider\Google([ + 'clientId' => $this->oauthClientId, + 'clientSecret' => $this->oauthClientSecret + ]); + } + + private function getGrant() + { + return new \League\OAuth2\Client\Grant\RefreshToken(); + } + + private function getToken() + { + $provider = $this->getProvider(); + $grant = $this->getGrant(); + return $provider->getAccessToken($grant, ['refresh_token' => $this->oauthRefreshToken]); + } + + public function getOauth64() + { + $token = $this->getToken(); + return base64_encode("user=" . $this->oauthUserEmail . "\001auth=Bearer " . $token . "\001\001"); + } +} diff --git a/vendor/phpmailer/phpmailer/class.pop3.php b/vendor/phpmailer/phpmailer/class.pop3.php new file mode 100644 index 0000000000..373c886cde --- /dev/null +++ b/vendor/phpmailer/phpmailer/class.pop3.php @@ -0,0 +1,407 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2014 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * PHPMailer POP-Before-SMTP Authentication Class. + * Specifically for PHPMailer to use for RFC1939 POP-before-SMTP authentication. + * Does not support APOP. + * @package PHPMailer + * @author Richard Davey (original author) + * @author Marcus Bointon (Synchro/coolbru) + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + */ +class POP3 +{ + /** + * The POP3 PHPMailer Version number. + * @var string + * @access public + */ + public $Version = '5.2.21'; + + /** + * Default POP3 port number. + * @var integer + * @access public + */ + public $POP3_PORT = 110; + + /** + * Default timeout in seconds. + * @var integer + * @access public + */ + public $POP3_TIMEOUT = 30; + + /** + * POP3 Carriage Return + Line Feed. + * @var string + * @access public + * @deprecated Use the constant instead + */ + public $CRLF = "\r\n"; + + /** + * Debug display level. + * Options: 0 = no, 1+ = yes + * @var integer + * @access public + */ + public $do_debug = 0; + + /** + * POP3 mail server hostname. + * @var string + * @access public + */ + public $host; + + /** + * POP3 port number. + * @var integer + * @access public + */ + public $port; + + /** + * POP3 Timeout Value in seconds. + * @var integer + * @access public + */ + public $tval; + + /** + * POP3 username + * @var string + * @access public + */ + public $username; + + /** + * POP3 password. + * @var string + * @access public + */ + public $password; + + /** + * Resource handle for the POP3 connection socket. + * @var resource + * @access protected + */ + protected $pop_conn; + + /** + * Are we connected? + * @var boolean + * @access protected + */ + protected $connected = false; + + /** + * Error container. + * @var array + * @access protected + */ + protected $errors = array(); + + /** + * Line break constant + */ + const CRLF = "\r\n"; + + /** + * Simple static wrapper for all-in-one POP before SMTP + * @param $host + * @param integer|boolean $port The port number to connect to + * @param integer|boolean $timeout The timeout value + * @param string $username + * @param string $password + * @param integer $debug_level + * @return boolean + */ + public static function popBeforeSmtp( + $host, + $port = false, + $timeout = false, + $username = '', + $password = '', + $debug_level = 0 + ) { + $pop = new POP3; + return $pop->authorise($host, $port, $timeout, $username, $password, $debug_level); + } + + /** + * Authenticate with a POP3 server. + * A connect, login, disconnect sequence + * appropriate for POP-before SMTP authorisation. + * @access public + * @param string $host The hostname to connect to + * @param integer|boolean $port The port number to connect to + * @param integer|boolean $timeout The timeout value + * @param string $username + * @param string $password + * @param integer $debug_level + * @return boolean + */ + public function authorise($host, $port = false, $timeout = false, $username = '', $password = '', $debug_level = 0) + { + $this->host = $host; + // If no port value provided, use default + if (false === $port) { + $this->port = $this->POP3_PORT; + } else { + $this->port = (integer)$port; + } + // If no timeout value provided, use default + if (false === $timeout) { + $this->tval = $this->POP3_TIMEOUT; + } else { + $this->tval = (integer)$timeout; + } + $this->do_debug = $debug_level; + $this->username = $username; + $this->password = $password; + // Reset the error log + $this->errors = array(); + // connect + $result = $this->connect($this->host, $this->port, $this->tval); + if ($result) { + $login_result = $this->login($this->username, $this->password); + if ($login_result) { + $this->disconnect(); + return true; + } + } + // We need to disconnect regardless of whether the login succeeded + $this->disconnect(); + return false; + } + + /** + * Connect to a POP3 server. + * @access public + * @param string $host + * @param integer|boolean $port + * @param integer $tval + * @return boolean + */ + public function connect($host, $port = false, $tval = 30) + { + // Are we already connected? + if ($this->connected) { + return true; + } + + //On Windows this will raise a PHP Warning error if the hostname doesn't exist. + //Rather than suppress it with @fsockopen, capture it cleanly instead + set_error_handler(array($this, 'catchWarning')); + + if (false === $port) { + $port = $this->POP3_PORT; + } + + // connect to the POP3 server + $this->pop_conn = fsockopen( + $host, // POP3 Host + $port, // Port # + $errno, // Error Number + $errstr, // Error Message + $tval + ); // Timeout (seconds) + // Restore the error handler + restore_error_handler(); + + // Did we connect? + if (false === $this->pop_conn) { + // It would appear not... + $this->setError(array( + 'error' => "Failed to connect to server $host on port $port", + 'errno' => $errno, + 'errstr' => $errstr + )); + return false; + } + + // Increase the stream time-out + stream_set_timeout($this->pop_conn, $tval, 0); + + // Get the POP3 server response + $pop3_response = $this->getResponse(); + // Check for the +OK + if ($this->checkResponse($pop3_response)) { + // The connection is established and the POP3 server is talking + $this->connected = true; + return true; + } + return false; + } + + /** + * Log in to the POP3 server. + * Does not support APOP (RFC 2828, 4949). + * @access public + * @param string $username + * @param string $password + * @return boolean + */ + public function login($username = '', $password = '') + { + if (!$this->connected) { + $this->setError('Not connected to POP3 server'); + } + if (empty($username)) { + $username = $this->username; + } + if (empty($password)) { + $password = $this->password; + } + + // Send the Username + $this->sendString("USER $username" . self::CRLF); + $pop3_response = $this->getResponse(); + if ($this->checkResponse($pop3_response)) { + // Send the Password + $this->sendString("PASS $password" . self::CRLF); + $pop3_response = $this->getResponse(); + if ($this->checkResponse($pop3_response)) { + return true; + } + } + return false; + } + + /** + * Disconnect from the POP3 server. + * @access public + */ + public function disconnect() + { + $this->sendString('QUIT'); + //The QUIT command may cause the daemon to exit, which will kill our connection + //So ignore errors here + try { + @fclose($this->pop_conn); + } catch (Exception $e) { + //Do nothing + }; + } + + /** + * Get a response from the POP3 server. + * $size is the maximum number of bytes to retrieve + * @param integer $size + * @return string + * @access protected + */ + protected function getResponse($size = 128) + { + $response = fgets($this->pop_conn, $size); + if ($this->do_debug >= 1) { + echo "Server -> Client: $response"; + } + return $response; + } + + /** + * Send raw data to the POP3 server. + * @param string $string + * @return integer + * @access protected + */ + protected function sendString($string) + { + if ($this->pop_conn) { + if ($this->do_debug >= 2) { //Show client messages when debug >= 2 + echo "Client -> Server: $string"; + } + return fwrite($this->pop_conn, $string, strlen($string)); + } + return 0; + } + + /** + * Checks the POP3 server response. + * Looks for for +OK or -ERR. + * @param string $string + * @return boolean + * @access protected + */ + protected function checkResponse($string) + { + if (substr($string, 0, 3) !== '+OK') { + $this->setError(array( + 'error' => "Server reported an error: $string", + 'errno' => 0, + 'errstr' => '' + )); + return false; + } else { + return true; + } + } + + /** + * Add an error to the internal error store. + * Also display debug output if it's enabled. + * @param $error + * @access protected + */ + protected function setError($error) + { + $this->errors[] = $error; + if ($this->do_debug >= 1) { + echo '
            ';
            +            foreach ($this->errors as $error) {
            +                print_r($error);
            +            }
            +            echo '
            '; + } + } + + /** + * Get an array of error messages, if any. + * @return array + */ + public function getErrors() + { + return $this->errors; + } + + /** + * POP3 connection error handler. + * @param integer $errno + * @param string $errstr + * @param string $errfile + * @param integer $errline + * @access protected + */ + protected function catchWarning($errno, $errstr, $errfile, $errline) + { + $this->setError(array( + 'error' => "Connecting to the POP3 server raised a PHP warning: ", + 'errno' => $errno, + 'errstr' => $errstr, + 'errfile' => $errfile, + 'errline' => $errline + )); + } +} diff --git a/vendor/phpmailer/phpmailer/class.smtp.php b/vendor/phpmailer/phpmailer/class.smtp.php new file mode 100644 index 0000000000..270162b264 --- /dev/null +++ b/vendor/phpmailer/phpmailer/class.smtp.php @@ -0,0 +1,1249 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2014 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * PHPMailer RFC821 SMTP email transport class. + * Implements RFC 821 SMTP commands and provides some utility methods for sending mail to an SMTP server. + * @package PHPMailer + * @author Chris Ryan + * @author Marcus Bointon + */ +class SMTP +{ + /** + * The PHPMailer SMTP version number. + * @var string + */ + const VERSION = '5.2.21'; + + /** + * SMTP line break constant. + * @var string + */ + const CRLF = "\r\n"; + + /** + * The SMTP port to use if one is not specified. + * @var integer + */ + const DEFAULT_SMTP_PORT = 25; + + /** + * The maximum line length allowed by RFC 2822 section 2.1.1 + * @var integer + */ + const MAX_LINE_LENGTH = 998; + + /** + * Debug level for no output + */ + const DEBUG_OFF = 0; + + /** + * Debug level to show client -> server messages + */ + const DEBUG_CLIENT = 1; + + /** + * Debug level to show client -> server and server -> client messages + */ + const DEBUG_SERVER = 2; + + /** + * Debug level to show connection status, client -> server and server -> client messages + */ + const DEBUG_CONNECTION = 3; + + /** + * Debug level to show all messages + */ + const DEBUG_LOWLEVEL = 4; + + /** + * The PHPMailer SMTP Version number. + * @var string + * @deprecated Use the `VERSION` constant instead + * @see SMTP::VERSION + */ + public $Version = '5.2.21'; + + /** + * SMTP server port number. + * @var integer + * @deprecated This is only ever used as a default value, so use the `DEFAULT_SMTP_PORT` constant instead + * @see SMTP::DEFAULT_SMTP_PORT + */ + public $SMTP_PORT = 25; + + /** + * SMTP reply line ending. + * @var string + * @deprecated Use the `CRLF` constant instead + * @see SMTP::CRLF + */ + public $CRLF = "\r\n"; + + /** + * Debug output level. + * Options: + * * self::DEBUG_OFF (`0`) No debug output, default + * * self::DEBUG_CLIENT (`1`) Client commands + * * self::DEBUG_SERVER (`2`) Client commands and server responses + * * self::DEBUG_CONNECTION (`3`) As DEBUG_SERVER plus connection status + * * self::DEBUG_LOWLEVEL (`4`) Low-level data output, all messages + * @var integer + */ + public $do_debug = self::DEBUG_OFF; + + /** + * How to handle debug output. + * Options: + * * `echo` Output plain-text as-is, appropriate for CLI + * * `html` Output escaped, line breaks converted to `
            `, appropriate for browser output + * * `error_log` Output to error log as configured in php.ini + * + * Alternatively, you can provide a callable expecting two params: a message string and the debug level: + * + * $smtp->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";}; + * + * @var string|callable + */ + public $Debugoutput = 'echo'; + + /** + * Whether to use VERP. + * @link http://en.wikipedia.org/wiki/Variable_envelope_return_path + * @link http://www.postfix.org/VERP_README.html Info on VERP + * @var boolean + */ + public $do_verp = false; + + /** + * The timeout value for connection, in seconds. + * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2 + * This needs to be quite high to function correctly with hosts using greetdelay as an anti-spam measure. + * @link http://tools.ietf.org/html/rfc2821#section-4.5.3.2 + * @var integer + */ + public $Timeout = 300; + + /** + * How long to wait for commands to complete, in seconds. + * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2 + * @var integer + */ + public $Timelimit = 300; + + /** + * @var array patterns to extract smtp transaction id from smtp reply + * Only first capture group will be use, use non-capturing group to deal with it + * Extend this class to override this property to fulfil your needs. + */ + protected $smtp_transaction_id_patterns = array( + 'exim' => '/[0-9]{3} OK id=(.*)/', + 'sendmail' => '/[0-9]{3} 2.0.0 (.*) Message/', + 'postfix' => '/[0-9]{3} 2.0.0 Ok: queued as (.*)/' + ); + + /** + * The socket for the server connection. + * @var resource + */ + protected $smtp_conn; + + /** + * Error information, if any, for the last SMTP command. + * @var array + */ + protected $error = array( + 'error' => '', + 'detail' => '', + 'smtp_code' => '', + 'smtp_code_ex' => '' + ); + + /** + * The reply the server sent to us for HELO. + * If null, no HELO string has yet been received. + * @var string|null + */ + protected $helo_rply = null; + + /** + * The set of SMTP extensions sent in reply to EHLO command. + * Indexes of the array are extension names. + * Value at index 'HELO' or 'EHLO' (according to command that was sent) + * represents the server name. In case of HELO it is the only element of the array. + * Other values can be boolean TRUE or an array containing extension options. + * If null, no HELO/EHLO string has yet been received. + * @var array|null + */ + protected $server_caps = null; + + /** + * The most recent reply received from the server. + * @var string + */ + protected $last_reply = ''; + + /** + * Output debugging info via a user-selected method. + * @see SMTP::$Debugoutput + * @see SMTP::$do_debug + * @param string $str Debug string to output + * @param integer $level The debug level of this message; see DEBUG_* constants + * @return void + */ + protected function edebug($str, $level = 0) + { + if ($level > $this->do_debug) { + return; + } + //Avoid clash with built-in function names + if (!in_array($this->Debugoutput, array('error_log', 'html', 'echo')) and is_callable($this->Debugoutput)) { + call_user_func($this->Debugoutput, $str, $level); + return; + } + switch ($this->Debugoutput) { + case 'error_log': + //Don't output, just log + error_log($str); + break; + case 'html': + //Cleans up output a bit for a better looking, HTML-safe output + echo htmlentities( + preg_replace('/[\r\n]+/', '', $str), + ENT_QUOTES, + 'UTF-8' + ) + . "
            \n"; + break; + case 'echo': + default: + //Normalize line breaks + $str = preg_replace('/(\r\n|\r|\n)/ms', "\n", $str); + echo gmdate('Y-m-d H:i:s') . "\t" . str_replace( + "\n", + "\n \t ", + trim($str) + )."\n"; + } + } + + /** + * Connect to an SMTP server. + * @param string $host SMTP server IP or host name + * @param integer $port The port number to connect to + * @param integer $timeout How long to wait for the connection to open + * @param array $options An array of options for stream_context_create() + * @access public + * @return boolean + */ + public function connect($host, $port = null, $timeout = 30, $options = array()) + { + static $streamok; + //This is enabled by default since 5.0.0 but some providers disable it + //Check this once and cache the result + if (is_null($streamok)) { + $streamok = function_exists('stream_socket_client'); + } + // Clear errors to avoid confusion + $this->setError(''); + // Make sure we are __not__ connected + if ($this->connected()) { + // Already connected, generate error + $this->setError('Already connected to a server'); + return false; + } + if (empty($port)) { + $port = self::DEFAULT_SMTP_PORT; + } + // Connect to the SMTP server + $this->edebug( + "Connection: opening to $host:$port, timeout=$timeout, options=".var_export($options, true), + self::DEBUG_CONNECTION + ); + $errno = 0; + $errstr = ''; + if ($streamok) { + $socket_context = stream_context_create($options); + set_error_handler(array($this, 'errorHandler')); + $this->smtp_conn = stream_socket_client( + $host . ":" . $port, + $errno, + $errstr, + $timeout, + STREAM_CLIENT_CONNECT, + $socket_context + ); + restore_error_handler(); + } else { + //Fall back to fsockopen which should work in more places, but is missing some features + $this->edebug( + "Connection: stream_socket_client not available, falling back to fsockopen", + self::DEBUG_CONNECTION + ); + set_error_handler(array($this, 'errorHandler')); + $this->smtp_conn = fsockopen( + $host, + $port, + $errno, + $errstr, + $timeout + ); + restore_error_handler(); + } + // Verify we connected properly + if (!is_resource($this->smtp_conn)) { + $this->setError( + 'Failed to connect to server', + $errno, + $errstr + ); + $this->edebug( + 'SMTP ERROR: ' . $this->error['error'] + . ": $errstr ($errno)", + self::DEBUG_CLIENT + ); + return false; + } + $this->edebug('Connection: opened', self::DEBUG_CONNECTION); + // SMTP server can take longer to respond, give longer timeout for first read + // Windows does not have support for this timeout function + if (substr(PHP_OS, 0, 3) != 'WIN') { + $max = ini_get('max_execution_time'); + // Don't bother if unlimited + if ($max != 0 && $timeout > $max) { + @set_time_limit($timeout); + } + stream_set_timeout($this->smtp_conn, $timeout, 0); + } + // Get any announcement + $announce = $this->get_lines(); + $this->edebug('SERVER -> CLIENT: ' . $announce, self::DEBUG_SERVER); + return true; + } + + /** + * Initiate a TLS (encrypted) session. + * @access public + * @return boolean + */ + public function startTLS() + { + if (!$this->sendCommand('STARTTLS', 'STARTTLS', 220)) { + return false; + } + + //Allow the best TLS version(s) we can + $crypto_method = STREAM_CRYPTO_METHOD_TLS_CLIENT; + + //PHP 5.6.7 dropped inclusion of TLS 1.1 and 1.2 in STREAM_CRYPTO_METHOD_TLS_CLIENT + //so add them back in manually if we can + if (defined('STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT')) { + $crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT; + $crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT; + } + + // Begin encrypted connection + if (!stream_socket_enable_crypto( + $this->smtp_conn, + true, + $crypto_method + )) { + return false; + } + return true; + } + + /** + * Perform SMTP authentication. + * Must be run after hello(). + * @see hello() + * @param string $username The user name + * @param string $password The password + * @param string $authtype The auth type (PLAIN, LOGIN, NTLM, CRAM-MD5, XOAUTH2) + * @param string $realm The auth realm for NTLM + * @param string $workstation The auth workstation for NTLM + * @param null|OAuth $OAuth An optional OAuth instance (@see PHPMailerOAuth) + * @return bool True if successfully authenticated.* @access public + */ + public function authenticate( + $username, + $password, + $authtype = null, + $realm = '', + $workstation = '', + $OAuth = null + ) { + if (!$this->server_caps) { + $this->setError('Authentication is not allowed before HELO/EHLO'); + return false; + } + + if (array_key_exists('EHLO', $this->server_caps)) { + // SMTP extensions are available. Let's try to find a proper authentication method + + if (!array_key_exists('AUTH', $this->server_caps)) { + $this->setError('Authentication is not allowed at this stage'); + // 'at this stage' means that auth may be allowed after the stage changes + // e.g. after STARTTLS + return false; + } + + self::edebug('Auth method requested: ' . ($authtype ? $authtype : 'UNKNOWN'), self::DEBUG_LOWLEVEL); + self::edebug( + 'Auth methods available on the server: ' . implode(',', $this->server_caps['AUTH']), + self::DEBUG_LOWLEVEL + ); + + if (empty($authtype)) { + foreach (array('CRAM-MD5', 'LOGIN', 'PLAIN', 'NTLM', 'XOAUTH2') as $method) { + if (in_array($method, $this->server_caps['AUTH'])) { + $authtype = $method; + break; + } + } + if (empty($authtype)) { + $this->setError('No supported authentication methods found'); + return false; + } + self::edebug('Auth method selected: '.$authtype, self::DEBUG_LOWLEVEL); + } + + if (!in_array($authtype, $this->server_caps['AUTH'])) { + $this->setError("The requested authentication method \"$authtype\" is not supported by the server"); + return false; + } + } elseif (empty($authtype)) { + $authtype = 'LOGIN'; + } + switch ($authtype) { + case 'PLAIN': + // Start authentication + if (!$this->sendCommand('AUTH', 'AUTH PLAIN', 334)) { + return false; + } + // Send encoded username and password + if (!$this->sendCommand( + 'User & Password', + base64_encode("\0" . $username . "\0" . $password), + 235 + ) + ) { + return false; + } + break; + case 'LOGIN': + // Start authentication + if (!$this->sendCommand('AUTH', 'AUTH LOGIN', 334)) { + return false; + } + if (!$this->sendCommand("Username", base64_encode($username), 334)) { + return false; + } + if (!$this->sendCommand("Password", base64_encode($password), 235)) { + return false; + } + break; + case 'XOAUTH2': + //If the OAuth Instance is not set. Can be a case when PHPMailer is used + //instead of PHPMailerOAuth + if (is_null($OAuth)) { + return false; + } + $oauth = $OAuth->getOauth64(); + + // Start authentication + if (!$this->sendCommand('AUTH', 'AUTH XOAUTH2 ' . $oauth, 235)) { + return false; + } + break; + case 'NTLM': + /* + * ntlm_sasl_client.php + * Bundled with Permission + * + * How to telnet in windows: + * http://technet.microsoft.com/en-us/library/aa995718%28EXCHG.65%29.aspx + * PROTOCOL Docs http://curl.haxx.se/rfc/ntlm.html#ntlmSmtpAuthentication + */ + require_once 'extras/ntlm_sasl_client.php'; + $temp = new stdClass; + $ntlm_client = new ntlm_sasl_client_class; + //Check that functions are available + if (!$ntlm_client->initialize($temp)) { + $this->setError($temp->error); + $this->edebug( + 'You need to enable some modules in your php.ini file: ' + . $this->error['error'], + self::DEBUG_CLIENT + ); + return false; + } + //msg1 + $msg1 = $ntlm_client->typeMsg1($realm, $workstation); //msg1 + + if (!$this->sendCommand( + 'AUTH NTLM', + 'AUTH NTLM ' . base64_encode($msg1), + 334 + ) + ) { + return false; + } + //Though 0 based, there is a white space after the 3 digit number + //msg2 + $challenge = substr($this->last_reply, 3); + $challenge = base64_decode($challenge); + $ntlm_res = $ntlm_client->NTLMResponse( + substr($challenge, 24, 8), + $password + ); + //msg3 + $msg3 = $ntlm_client->typeMsg3( + $ntlm_res, + $username, + $realm, + $workstation + ); + // send encoded username + return $this->sendCommand('Username', base64_encode($msg3), 235); + case 'CRAM-MD5': + // Start authentication + if (!$this->sendCommand('AUTH CRAM-MD5', 'AUTH CRAM-MD5', 334)) { + return false; + } + // Get the challenge + $challenge = base64_decode(substr($this->last_reply, 4)); + + // Build the response + $response = $username . ' ' . $this->hmac($challenge, $password); + + // send encoded credentials + return $this->sendCommand('Username', base64_encode($response), 235); + default: + $this->setError("Authentication method \"$authtype\" is not supported"); + return false; + } + return true; + } + + /** + * Calculate an MD5 HMAC hash. + * Works like hash_hmac('md5', $data, $key) + * in case that function is not available + * @param string $data The data to hash + * @param string $key The key to hash with + * @access protected + * @return string + */ + protected function hmac($data, $key) + { + if (function_exists('hash_hmac')) { + return hash_hmac('md5', $data, $key); + } + + // The following borrowed from + // http://php.net/manual/en/function.mhash.php#27225 + + // RFC 2104 HMAC implementation for php. + // Creates an md5 HMAC. + // Eliminates the need to install mhash to compute a HMAC + // by Lance Rushing + + $bytelen = 64; // byte length for md5 + if (strlen($key) > $bytelen) { + $key = pack('H*', md5($key)); + } + $key = str_pad($key, $bytelen, chr(0x00)); + $ipad = str_pad('', $bytelen, chr(0x36)); + $opad = str_pad('', $bytelen, chr(0x5c)); + $k_ipad = $key ^ $ipad; + $k_opad = $key ^ $opad; + + return md5($k_opad . pack('H*', md5($k_ipad . $data))); + } + + /** + * Check connection state. + * @access public + * @return boolean True if connected. + */ + public function connected() + { + if (is_resource($this->smtp_conn)) { + $sock_status = stream_get_meta_data($this->smtp_conn); + if ($sock_status['eof']) { + // The socket is valid but we are not connected + $this->edebug( + 'SMTP NOTICE: EOF caught while checking if connected', + self::DEBUG_CLIENT + ); + $this->close(); + return false; + } + return true; // everything looks good + } + return false; + } + + /** + * Close the socket and clean up the state of the class. + * Don't use this function without first trying to use QUIT. + * @see quit() + * @access public + * @return void + */ + public function close() + { + $this->setError(''); + $this->server_caps = null; + $this->helo_rply = null; + if (is_resource($this->smtp_conn)) { + // close the connection and cleanup + fclose($this->smtp_conn); + $this->smtp_conn = null; //Makes for cleaner serialization + $this->edebug('Connection: closed', self::DEBUG_CONNECTION); + } + } + + /** + * Send an SMTP DATA command. + * Issues a data command and sends the msg_data to the server, + * finializing the mail transaction. $msg_data is the message + * that is to be send with the headers. Each header needs to be + * on a single line followed by a with the message headers + * and the message body being separated by and additional . + * Implements rfc 821: DATA + * @param string $msg_data Message data to send + * @access public + * @return boolean + */ + public function data($msg_data) + { + //This will use the standard timelimit + if (!$this->sendCommand('DATA', 'DATA', 354)) { + return false; + } + + /* The server is ready to accept data! + * According to rfc821 we should not send more than 1000 characters on a single line (including the CRLF) + * so we will break the data up into lines by \r and/or \n then if needed we will break each of those into + * smaller lines to fit within the limit. + * We will also look for lines that start with a '.' and prepend an additional '.'. + * NOTE: this does not count towards line-length limit. + */ + + // Normalize line breaks before exploding + $lines = explode("\n", str_replace(array("\r\n", "\r"), "\n", $msg_data)); + + /* To distinguish between a complete RFC822 message and a plain message body, we check if the first field + * of the first line (':' separated) does not contain a space then it _should_ be a header and we will + * process all lines before a blank line as headers. + */ + + $field = substr($lines[0], 0, strpos($lines[0], ':')); + $in_headers = false; + if (!empty($field) && strpos($field, ' ') === false) { + $in_headers = true; + } + + foreach ($lines as $line) { + $lines_out = array(); + if ($in_headers and $line == '') { + $in_headers = false; + } + //Break this line up into several smaller lines if it's too long + //Micro-optimisation: isset($str[$len]) is faster than (strlen($str) > $len), + while (isset($line[self::MAX_LINE_LENGTH])) { + //Working backwards, try to find a space within the last MAX_LINE_LENGTH chars of the line to break on + //so as to avoid breaking in the middle of a word + $pos = strrpos(substr($line, 0, self::MAX_LINE_LENGTH), ' '); + //Deliberately matches both false and 0 + if (!$pos) { + //No nice break found, add a hard break + $pos = self::MAX_LINE_LENGTH - 1; + $lines_out[] = substr($line, 0, $pos); + $line = substr($line, $pos); + } else { + //Break at the found point + $lines_out[] = substr($line, 0, $pos); + //Move along by the amount we dealt with + $line = substr($line, $pos + 1); + } + //If processing headers add a LWSP-char to the front of new line RFC822 section 3.1.1 + if ($in_headers) { + $line = "\t" . $line; + } + } + $lines_out[] = $line; + + //Send the lines to the server + foreach ($lines_out as $line_out) { + //RFC2821 section 4.5.2 + if (!empty($line_out) and $line_out[0] == '.') { + $line_out = '.' . $line_out; + } + $this->client_send($line_out . self::CRLF); + } + } + + //Message data has been sent, complete the command + //Increase timelimit for end of DATA command + $savetimelimit = $this->Timelimit; + $this->Timelimit = $this->Timelimit * 2; + $result = $this->sendCommand('DATA END', '.', 250); + //Restore timelimit + $this->Timelimit = $savetimelimit; + return $result; + } + + /** + * Send an SMTP HELO or EHLO command. + * Used to identify the sending server to the receiving server. + * This makes sure that client and server are in a known state. + * Implements RFC 821: HELO + * and RFC 2821 EHLO. + * @param string $host The host name or IP to connect to + * @access public + * @return boolean + */ + public function hello($host = '') + { + //Try extended hello first (RFC 2821) + return (boolean)($this->sendHello('EHLO', $host) or $this->sendHello('HELO', $host)); + } + + /** + * Send an SMTP HELO or EHLO command. + * Low-level implementation used by hello() + * @see hello() + * @param string $hello The HELO string + * @param string $host The hostname to say we are + * @access protected + * @return boolean + */ + protected function sendHello($hello, $host) + { + $noerror = $this->sendCommand($hello, $hello . ' ' . $host, 250); + $this->helo_rply = $this->last_reply; + if ($noerror) { + $this->parseHelloFields($hello); + } else { + $this->server_caps = null; + } + return $noerror; + } + + /** + * Parse a reply to HELO/EHLO command to discover server extensions. + * In case of HELO, the only parameter that can be discovered is a server name. + * @access protected + * @param string $type - 'HELO' or 'EHLO' + */ + protected function parseHelloFields($type) + { + $this->server_caps = array(); + $lines = explode("\n", $this->helo_rply); + + foreach ($lines as $n => $s) { + //First 4 chars contain response code followed by - or space + $s = trim(substr($s, 4)); + if (empty($s)) { + continue; + } + $fields = explode(' ', $s); + if (!empty($fields)) { + if (!$n) { + $name = $type; + $fields = $fields[0]; + } else { + $name = array_shift($fields); + switch ($name) { + case 'SIZE': + $fields = ($fields ? $fields[0] : 0); + break; + case 'AUTH': + if (!is_array($fields)) { + $fields = array(); + } + break; + default: + $fields = true; + } + } + $this->server_caps[$name] = $fields; + } + } + } + + /** + * Send an SMTP MAIL command. + * Starts a mail transaction from the email address specified in + * $from. Returns true if successful or false otherwise. If True + * the mail transaction is started and then one or more recipient + * commands may be called followed by a data command. + * Implements rfc 821: MAIL FROM: + * @param string $from Source address of this message + * @access public + * @return boolean + */ + public function mail($from) + { + $useVerp = ($this->do_verp ? ' XVERP' : ''); + return $this->sendCommand( + 'MAIL FROM', + 'MAIL FROM:<' . $from . '>' . $useVerp, + 250 + ); + } + + /** + * Send an SMTP QUIT command. + * Closes the socket if there is no error or the $close_on_error argument is true. + * Implements from rfc 821: QUIT + * @param boolean $close_on_error Should the connection close if an error occurs? + * @access public + * @return boolean + */ + public function quit($close_on_error = true) + { + $noerror = $this->sendCommand('QUIT', 'QUIT', 221); + $err = $this->error; //Save any error + if ($noerror or $close_on_error) { + $this->close(); + $this->error = $err; //Restore any error from the quit command + } + return $noerror; + } + + /** + * Send an SMTP RCPT command. + * Sets the TO argument to $toaddr. + * Returns true if the recipient was accepted false if it was rejected. + * Implements from rfc 821: RCPT TO: + * @param string $address The address the message is being sent to + * @access public + * @return boolean + */ + public function recipient($address) + { + return $this->sendCommand( + 'RCPT TO', + 'RCPT TO:<' . $address . '>', + array(250, 251) + ); + } + + /** + * Send an SMTP RSET command. + * Abort any transaction that is currently in progress. + * Implements rfc 821: RSET + * @access public + * @return boolean True on success. + */ + public function reset() + { + return $this->sendCommand('RSET', 'RSET', 250); + } + + /** + * Send a command to an SMTP server and check its return code. + * @param string $command The command name - not sent to the server + * @param string $commandstring The actual command to send + * @param integer|array $expect One or more expected integer success codes + * @access protected + * @return boolean True on success. + */ + protected function sendCommand($command, $commandstring, $expect) + { + if (!$this->connected()) { + $this->setError("Called $command without being connected"); + return false; + } + //Reject line breaks in all commands + if (strpos($commandstring, "\n") !== false or strpos($commandstring, "\r") !== false) { + $this->setError("Command '$command' contained line breaks"); + return false; + } + $this->client_send($commandstring . self::CRLF); + + $this->last_reply = $this->get_lines(); + // Fetch SMTP code and possible error code explanation + $matches = array(); + if (preg_match("/^([0-9]{3})[ -](?:([0-9]\\.[0-9]\\.[0-9]) )?/", $this->last_reply, $matches)) { + $code = $matches[1]; + $code_ex = (count($matches) > 2 ? $matches[2] : null); + // Cut off error code from each response line + $detail = preg_replace( + "/{$code}[ -]".($code_ex ? str_replace('.', '\\.', $code_ex).' ' : '')."/m", + '', + $this->last_reply + ); + } else { + // Fall back to simple parsing if regex fails + $code = substr($this->last_reply, 0, 3); + $code_ex = null; + $detail = substr($this->last_reply, 4); + } + + $this->edebug('SERVER -> CLIENT: ' . $this->last_reply, self::DEBUG_SERVER); + + if (!in_array($code, (array)$expect)) { + $this->setError( + "$command command failed", + $detail, + $code, + $code_ex + ); + $this->edebug( + 'SMTP ERROR: ' . $this->error['error'] . ': ' . $this->last_reply, + self::DEBUG_CLIENT + ); + return false; + } + + $this->setError(''); + return true; + } + + /** + * Send an SMTP SAML command. + * Starts a mail transaction from the email address specified in $from. + * Returns true if successful or false otherwise. If True + * the mail transaction is started and then one or more recipient + * commands may be called followed by a data command. This command + * will send the message to the users terminal if they are logged + * in and send them an email. + * Implements rfc 821: SAML FROM: + * @param string $from The address the message is from + * @access public + * @return boolean + */ + public function sendAndMail($from) + { + return $this->sendCommand('SAML', "SAML FROM:$from", 250); + } + + /** + * Send an SMTP VRFY command. + * @param string $name The name to verify + * @access public + * @return boolean + */ + public function verify($name) + { + return $this->sendCommand('VRFY', "VRFY $name", array(250, 251)); + } + + /** + * Send an SMTP NOOP command. + * Used to keep keep-alives alive, doesn't actually do anything + * @access public + * @return boolean + */ + public function noop() + { + return $this->sendCommand('NOOP', 'NOOP', 250); + } + + /** + * Send an SMTP TURN command. + * This is an optional command for SMTP that this class does not support. + * This method is here to make the RFC821 Definition complete for this class + * and _may_ be implemented in future + * Implements from rfc 821: TURN + * @access public + * @return boolean + */ + public function turn() + { + $this->setError('The SMTP TURN command is not implemented'); + $this->edebug('SMTP NOTICE: ' . $this->error['error'], self::DEBUG_CLIENT); + return false; + } + + /** + * Send raw data to the server. + * @param string $data The data to send + * @access public + * @return integer|boolean The number of bytes sent to the server or false on error + */ + public function client_send($data) + { + $this->edebug("CLIENT -> SERVER: $data", self::DEBUG_CLIENT); + return fwrite($this->smtp_conn, $data); + } + + /** + * Get the latest error. + * @access public + * @return array + */ + public function getError() + { + return $this->error; + } + + /** + * Get SMTP extensions available on the server + * @access public + * @return array|null + */ + public function getServerExtList() + { + return $this->server_caps; + } + + /** + * A multipurpose method + * The method works in three ways, dependent on argument value and current state + * 1. HELO/EHLO was not sent - returns null and set up $this->error + * 2. HELO was sent + * $name = 'HELO': returns server name + * $name = 'EHLO': returns boolean false + * $name = any string: returns null and set up $this->error + * 3. EHLO was sent + * $name = 'HELO'|'EHLO': returns server name + * $name = any string: if extension $name exists, returns boolean True + * or its options. Otherwise returns boolean False + * In other words, one can use this method to detect 3 conditions: + * - null returned: handshake was not or we don't know about ext (refer to $this->error) + * - false returned: the requested feature exactly not exists + * - positive value returned: the requested feature exists + * @param string $name Name of SMTP extension or 'HELO'|'EHLO' + * @return mixed + */ + public function getServerExt($name) + { + if (!$this->server_caps) { + $this->setError('No HELO/EHLO was sent'); + return null; + } + + // the tight logic knot ;) + if (!array_key_exists($name, $this->server_caps)) { + if ($name == 'HELO') { + return $this->server_caps['EHLO']; + } + if ($name == 'EHLO' || array_key_exists('EHLO', $this->server_caps)) { + return false; + } + $this->setError('HELO handshake was used. Client knows nothing about server extensions'); + return null; + } + + return $this->server_caps[$name]; + } + + /** + * Get the last reply from the server. + * @access public + * @return string + */ + public function getLastReply() + { + return $this->last_reply; + } + + /** + * Read the SMTP server's response. + * Either before eof or socket timeout occurs on the operation. + * With SMTP we can tell if we have more lines to read if the + * 4th character is '-' symbol. If it is a space then we don't + * need to read anything else. + * @access protected + * @return string + */ + protected function get_lines() + { + // If the connection is bad, give up straight away + if (!is_resource($this->smtp_conn)) { + return ''; + } + $data = ''; + $endtime = 0; + stream_set_timeout($this->smtp_conn, $this->Timeout); + if ($this->Timelimit > 0) { + $endtime = time() + $this->Timelimit; + } + while (is_resource($this->smtp_conn) && !feof($this->smtp_conn)) { + $str = @fgets($this->smtp_conn, 515); + $this->edebug("SMTP -> get_lines(): \$data is \"$data\"", self::DEBUG_LOWLEVEL); + $this->edebug("SMTP -> get_lines(): \$str is \"$str\"", self::DEBUG_LOWLEVEL); + $data .= $str; + // If 4th character is a space, we are done reading, break the loop, micro-optimisation over strlen + if ((isset($str[3]) and $str[3] == ' ')) { + break; + } + // Timed-out? Log and break + $info = stream_get_meta_data($this->smtp_conn); + if ($info['timed_out']) { + $this->edebug( + 'SMTP -> get_lines(): timed-out (' . $this->Timeout . ' sec)', + self::DEBUG_LOWLEVEL + ); + break; + } + // Now check if reads took too long + if ($endtime and time() > $endtime) { + $this->edebug( + 'SMTP -> get_lines(): timelimit reached ('. + $this->Timelimit . ' sec)', + self::DEBUG_LOWLEVEL + ); + break; + } + } + return $data; + } + + /** + * Enable or disable VERP address generation. + * @param boolean $enabled + */ + public function setVerp($enabled = false) + { + $this->do_verp = $enabled; + } + + /** + * Get VERP address generation mode. + * @return boolean + */ + public function getVerp() + { + return $this->do_verp; + } + + /** + * Set error messages and codes. + * @param string $message The error message + * @param string $detail Further detail on the error + * @param string $smtp_code An associated SMTP error code + * @param string $smtp_code_ex Extended SMTP code + */ + protected function setError($message, $detail = '', $smtp_code = '', $smtp_code_ex = '') + { + $this->error = array( + 'error' => $message, + 'detail' => $detail, + 'smtp_code' => $smtp_code, + 'smtp_code_ex' => $smtp_code_ex + ); + } + + /** + * Set debug output method. + * @param string|callable $method The name of the mechanism to use for debugging output, or a callable to handle it. + */ + public function setDebugOutput($method = 'echo') + { + $this->Debugoutput = $method; + } + + /** + * Get debug output method. + * @return string + */ + public function getDebugOutput() + { + return $this->Debugoutput; + } + + /** + * Set debug output level. + * @param integer $level + */ + public function setDebugLevel($level = 0) + { + $this->do_debug = $level; + } + + /** + * Get debug output level. + * @return integer + */ + public function getDebugLevel() + { + return $this->do_debug; + } + + /** + * Set SMTP timeout. + * @param integer $timeout + */ + public function setTimeout($timeout = 0) + { + $this->Timeout = $timeout; + } + + /** + * Get SMTP timeout. + * @return integer + */ + public function getTimeout() + { + return $this->Timeout; + } + + /** + * Reports an error number and string. + * @param integer $errno The error number returned by PHP. + * @param string $errmsg The error message returned by PHP. + */ + protected function errorHandler($errno, $errmsg) + { + $notice = 'Connection: Failed to connect to server.'; + $this->setError( + $notice, + $errno, + $errmsg + ); + $this->edebug( + $notice . ' Error number ' . $errno . '. "Error notice: ' . $errmsg, + self::DEBUG_CONNECTION + ); + } + + /** + * Will return the ID of the last smtp transaction based on a list of patterns provided + * in SMTP::$smtp_transaction_id_patterns. + * If no reply has been received yet, it will return null. + * If no pattern has been matched, it will return false. + * @return bool|null|string + */ + public function getLastTransactionID() + { + $reply = $this->getLastReply(); + + if (empty($reply)) { + return null; + } + + foreach($this->smtp_transaction_id_patterns as $smtp_transaction_id_pattern) { + if(preg_match($smtp_transaction_id_pattern, $reply, $matches)) { + return $matches[1]; + } + } + + return false; + } +} diff --git a/vendor/phpmailer/phpmailer/composer.json b/vendor/phpmailer/phpmailer/composer.json new file mode 100644 index 0000000000..1112fb99a8 --- /dev/null +++ b/vendor/phpmailer/phpmailer/composer.json @@ -0,0 +1,44 @@ +{ + "name": "phpmailer/phpmailer", + "type": "library", + "description": "PHPMailer is a full-featured email creation and transfer class for PHP", + "authors": [ + { + "name": "Marcus Bointon", + "email": "phpmailer@synchromedia.co.uk" + }, + { + "name": "Jim Jagielski", + "email": "jimjag@gmail.com" + }, + { + "name": "Andy Prevost", + "email": "codeworxtech@users.sourceforge.net" + }, + { + "name": "Brent R. Matzelle" + } + ], + "require": { + "php": ">=5.0.0" + }, + "require-dev": { + "phpdocumentor/phpdocumentor": "*", + "phpunit/phpunit": "4.7.*" + }, + "suggest": { + "league/oauth2-google": "Needed for Google XOAUTH2 authentication" + }, + "autoload": { + "classmap": [ + "class.phpmailer.php", + "class.phpmaileroauth.php", + "class.phpmaileroauthgoogle.php", + "class.smtp.php", + "class.pop3.php", + "extras/EasyPeasyICS.php", + "extras/ntlm_sasl_client.php" + ] + }, + "license": "LGPL-2.1" +} diff --git a/vendor/phpmailer/phpmailer/composer.lock b/vendor/phpmailer/phpmailer/composer.lock new file mode 100644 index 0000000000..9edbf55c92 --- /dev/null +++ b/vendor/phpmailer/phpmailer/composer.lock @@ -0,0 +1,3576 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "hash": "ca5abc72444d9608a35c39f9064c139b", + "content-hash": "8b66ed71ae9ca8cd0258c814615d624f", + "packages": [], + "packages-dev": [ + { + "name": "cilex/cilex", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/Cilex/Cilex.git", + "reference": "7acd965a609a56d0345e8b6071c261fbdb926cb5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Cilex/Cilex/zipball/7acd965a609a56d0345e8b6071c261fbdb926cb5", + "reference": "7acd965a609a56d0345e8b6071c261fbdb926cb5", + "shasum": "" + }, + "require": { + "cilex/console-service-provider": "1.*", + "php": ">=5.3.3", + "pimple/pimple": "~1.0", + "symfony/finder": "~2.1", + "symfony/process": "~2.1" + }, + "require-dev": { + "phpunit/phpunit": "3.7.*", + "symfony/validator": "~2.1" + }, + "suggest": { + "monolog/monolog": ">=1.0.0", + "symfony/validator": ">=1.0.0", + "symfony/yaml": ">=1.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-0": { + "Cilex": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "mike.vanriel@naenius.com" + } + ], + "description": "The PHP micro-framework for Command line tools based on the Symfony2 Components", + "homepage": "http://cilex.github.com", + "keywords": [ + "cli", + "microframework" + ], + "time": "2014-03-29 14:03:13" + }, + { + "name": "cilex/console-service-provider", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/Cilex/console-service-provider.git", + "reference": "25ee3d1875243d38e1a3448ff94bdf944f70d24e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Cilex/console-service-provider/zipball/25ee3d1875243d38e1a3448ff94bdf944f70d24e", + "reference": "25ee3d1875243d38e1a3448ff94bdf944f70d24e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "pimple/pimple": "1.*@dev", + "symfony/console": "~2.1" + }, + "require-dev": { + "cilex/cilex": "1.*@dev", + "silex/silex": "1.*@dev" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-0": { + "Cilex\\Provider\\Console": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Beau Simensen", + "email": "beau@dflydev.com", + "homepage": "http://beausimensen.com" + }, + { + "name": "Mike van Riel", + "email": "mike.vanriel@naenius.com" + } + ], + "description": "Console Service Provider", + "keywords": [ + "cilex", + "console", + "pimple", + "service-provider", + "silex" + ], + "time": "2012-12-19 10:50:58" + }, + { + "name": "container-interop/container-interop", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/container-interop/container-interop.git", + "reference": "fc08354828f8fd3245f77a66b9e23a6bca48297e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/container-interop/container-interop/zipball/fc08354828f8fd3245f77a66b9e23a6bca48297e", + "reference": "fc08354828f8fd3245f77a66b9e23a6bca48297e", + "shasum": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Interop\\Container\\": "src/Interop/Container/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", + "time": "2014-12-30 15:22:37" + }, + { + "name": "doctrine/annotations", + "version": "v1.2.7", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/f25c8aab83e0c3e976fd7d19875f198ccf2f7535", + "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535", + "shasum": "" + }, + "require": { + "doctrine/lexer": "1.*", + "php": ">=5.3.2" + }, + "require-dev": { + "doctrine/cache": "1.*", + "phpunit/phpunit": "4.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Annotations\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Docblock Annotations Parser", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "time": "2015-08-31 12:32:49" + }, + { + "name": "doctrine/instantiator", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "shasum": "" + }, + "require": { + "php": ">=5.3,<8.0-DEV" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2015-06-14 21:17:01" + }, + { + "name": "doctrine/lexer", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Lexer\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "lexer", + "parser" + ], + "time": "2014-09-09 13:34:57" + }, + { + "name": "erusev/parsedown", + "version": "1.6.0", + "source": { + "type": "git", + "url": "https://github.com/erusev/parsedown.git", + "reference": "3ebbd730b5c2cf5ce78bc1bf64071407fc6674b7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/erusev/parsedown/zipball/3ebbd730b5c2cf5ce78bc1bf64071407fc6674b7", + "reference": "3ebbd730b5c2cf5ce78bc1bf64071407fc6674b7", + "shasum": "" + }, + "type": "library", + "autoload": { + "psr-0": { + "Parsedown": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Emanuil Rusev", + "email": "hello@erusev.com", + "homepage": "http://erusev.com" + } + ], + "description": "Parser for Markdown.", + "homepage": "http://parsedown.org", + "keywords": [ + "markdown", + "parser" + ], + "time": "2015-10-04 16:44:32" + }, + { + "name": "herrera-io/json", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/kherge-abandoned/php-json.git", + "reference": "60c696c9370a1e5136816ca557c17f82a6fa83f1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kherge-abandoned/php-json/zipball/60c696c9370a1e5136816ca557c17f82a6fa83f1", + "reference": "60c696c9370a1e5136816ca557c17f82a6fa83f1", + "shasum": "" + }, + "require": { + "ext-json": "*", + "justinrainbow/json-schema": ">=1.0,<2.0-dev", + "php": ">=5.3.3", + "seld/jsonlint": ">=1.0,<2.0-dev" + }, + "require-dev": { + "herrera-io/phpunit-test-case": "1.*", + "mikey179/vfsstream": "1.1.0", + "phpunit/phpunit": "3.7.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "files": [ + "src/lib/json_version.php" + ], + "psr-0": { + "Herrera\\Json": "src/lib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kevin Herrera", + "email": "kevin@herrera.io", + "homepage": "http://kevin.herrera.io/", + "role": "Developer" + } + ], + "description": "A library for simplifying JSON linting and validation.", + "homepage": "http://herrera-io.github.com/php-json", + "keywords": [ + "json", + "lint", + "schema", + "validate" + ], + "time": "2013-10-30 16:51:34" + }, + { + "name": "herrera-io/phar-update", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/kherge-abandoned/php-phar-update.git", + "reference": "00a79e1d5b8cf3c080a2e3becf1ddf7a7fea025b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kherge-abandoned/php-phar-update/zipball/00a79e1d5b8cf3c080a2e3becf1ddf7a7fea025b", + "reference": "00a79e1d5b8cf3c080a2e3becf1ddf7a7fea025b", + "shasum": "" + }, + "require": { + "herrera-io/json": "1.*", + "kherge/version": "1.*", + "php": ">=5.3.3" + }, + "require-dev": { + "herrera-io/phpunit-test-case": "1.*", + "mikey179/vfsstream": "1.1.0", + "phpunit/phpunit": "3.7.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "files": [ + "src/lib/constants.php" + ], + "psr-0": { + "Herrera\\Phar\\Update": "src/lib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kevin Herrera", + "email": "kevin@herrera.io", + "homepage": "http://kevin.herrera.io/", + "role": "Developer" + } + ], + "description": "A library for self-updating Phars.", + "homepage": "http://herrera-io.github.com/php-phar-update", + "keywords": [ + "phar", + "update" + ], + "time": "2013-10-30 17:23:01" + }, + { + "name": "jms/metadata", + "version": "1.5.1", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/metadata.git", + "reference": "22b72455559a25777cfd28c4ffda81ff7639f353" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/metadata/zipball/22b72455559a25777cfd28c4ffda81ff7639f353", + "reference": "22b72455559a25777cfd28c4ffda81ff7639f353", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "doctrine/cache": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.5.x-dev" + } + }, + "autoload": { + "psr-0": { + "Metadata\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache" + ], + "authors": [ + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com", + "homepage": "https://github.com/schmittjoh", + "role": "Developer of wrapped JMSSerializerBundle" + } + ], + "description": "Class/method/property metadata management in PHP", + "keywords": [ + "annotations", + "metadata", + "xml", + "yaml" + ], + "time": "2014-07-12 07:13:19" + }, + { + "name": "jms/parser-lib", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/parser-lib.git", + "reference": "c509473bc1b4866415627af0e1c6cc8ac97fa51d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/parser-lib/zipball/c509473bc1b4866415627af0e1c6cc8ac97fa51d", + "reference": "c509473bc1b4866415627af0e1c6cc8ac97fa51d", + "shasum": "" + }, + "require": { + "phpoption/phpoption": ">=0.9,<2.0-dev" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-0": { + "JMS\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache2" + ], + "description": "A library for easily creating recursive-descent parsers.", + "time": "2012-11-18 18:08:43" + }, + { + "name": "jms/serializer", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/serializer.git", + "reference": "fe13a1f993ea3456e195b7820692f2eb2b6bbb48" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/fe13a1f993ea3456e195b7820692f2eb2b6bbb48", + "reference": "fe13a1f993ea3456e195b7820692f2eb2b6bbb48", + "shasum": "" + }, + "require": { + "doctrine/annotations": "1.*", + "doctrine/instantiator": "~1.0.3", + "jms/metadata": "~1.1", + "jms/parser-lib": "1.*", + "php": ">=5.4.0", + "phpcollection/phpcollection": "~0.1" + }, + "conflict": { + "twig/twig": "<1.12" + }, + "require-dev": { + "doctrine/orm": "~2.1", + "doctrine/phpcr-odm": "~1.0.1", + "jackalope/jackalope-doctrine-dbal": "1.0.*", + "phpunit/phpunit": "~4.0", + "propel/propel1": "~1.7", + "symfony/filesystem": "2.*", + "symfony/form": "~2.1", + "symfony/translation": "~2.0", + "symfony/validator": "~2.0", + "symfony/yaml": "2.*", + "twig/twig": "~1.12|~2.0" + }, + "suggest": { + "symfony/yaml": "Required if you'd like to serialize data to YAML format." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-0": { + "JMS\\Serializer": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache2" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML.", + "homepage": "http://jmsyst.com/libs/serializer", + "keywords": [ + "deserialization", + "jaxb", + "json", + "serialization", + "xml" + ], + "time": "2015-10-27 09:24:41" + }, + { + "name": "justinrainbow/json-schema", + "version": "1.6.1", + "source": { + "type": "git", + "url": "https://github.com/justinrainbow/json-schema.git", + "reference": "cc84765fb7317f6b07bd8ac78364747f95b86341" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/cc84765fb7317f6b07bd8ac78364747f95b86341", + "reference": "cc84765fb7317f6b07bd8ac78364747f95b86341", + "shasum": "" + }, + "require": { + "php": ">=5.3.29" + }, + "require-dev": { + "json-schema/json-schema-test-suite": "1.1.0", + "phpdocumentor/phpdocumentor": "~2", + "phpunit/phpunit": "~3.7" + }, + "bin": [ + "bin/validate-json" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-4": { + "JsonSchema\\": "src/JsonSchema/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Bruno Prieto Reis", + "email": "bruno.p.reis@gmail.com" + }, + { + "name": "Justin Rainbow", + "email": "justin.rainbow@gmail.com" + }, + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + }, + { + "name": "Robert Schönthal", + "email": "seroscho@googlemail.com" + } + ], + "description": "A library to validate a json schema.", + "homepage": "https://github.com/justinrainbow/json-schema", + "keywords": [ + "json", + "schema" + ], + "time": "2016-01-25 15:43:01" + }, + { + "name": "kherge/version", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/kherge-abandoned/Version.git", + "reference": "f07cf83f8ce533be8f93d2893d96d674bbeb7e30" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kherge-abandoned/Version/zipball/f07cf83f8ce533be8f93d2893d96d674bbeb7e30", + "reference": "f07cf83f8ce533be8f93d2893d96d674bbeb7e30", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-0": { + "KevinGH\\Version": "src/lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kevin Herrera", + "email": "me@kevingh.com", + "homepage": "http://www.kevingh.com/" + } + ], + "description": "A parsing and comparison library for semantic versioning.", + "homepage": "http://github.com/kherge/Version", + "time": "2012-08-16 17:13:03" + }, + { + "name": "monolog/monolog", + "version": "1.19.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "5f56ed5212dc509c8dc8caeba2715732abb32dbf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/5f56ed5212dc509c8dc8caeba2715732abb32dbf", + "reference": "5f56ed5212dc509c8dc8caeba2715732abb32dbf", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "psr/log": "~1.0" + }, + "provide": { + "psr/log-implementation": "1.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "^2.4.9", + "doctrine/couchdb": "~1.0@dev", + "graylog2/gelf-php": "~1.0", + "jakub-onderka/php-parallel-lint": "0.9", + "php-amqplib/php-amqplib": "~2.4", + "php-console/php-console": "^3.1.3", + "phpunit/phpunit": "~4.5", + "phpunit/phpunit-mock-objects": "2.3.0", + "raven/raven": "^0.13", + "ruflin/elastica": ">=0.90 <3.0", + "swiftmailer/swiftmailer": "~5.3" + }, + "suggest": { + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-mongo": "Allow sending log messages to a MongoDB server", + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "php-console/php-console": "Allow sending log messages to Google Chrome", + "raven/raven": "Allow sending log messages to a Sentry server", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Monolog\\": "src/Monolog" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "homepage": "http://github.com/Seldaek/monolog", + "keywords": [ + "log", + "logging", + "psr-3" + ], + "time": "2016-04-12 18:29:35" + }, + { + "name": "nikic/php-parser", + "version": "v1.4.1", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "f78af2c9c86107aa1a34cd1dbb5bbe9eeb0d9f51" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f78af2c9c86107aa1a34cd1dbb5bbe9eeb0d9f51", + "reference": "f78af2c9c86107aa1a34cd1dbb5bbe9eeb0d9f51", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "files": [ + "lib/bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "time": "2015-09-19 14:15:08" + }, + { + "name": "phpcollection/phpcollection", + "version": "0.4.0", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/php-collection.git", + "reference": "b8bf55a0a929ca43b01232b36719f176f86c7e83" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/php-collection/zipball/b8bf55a0a929ca43b01232b36719f176f86c7e83", + "reference": "b8bf55a0a929ca43b01232b36719f176f86c7e83", + "shasum": "" + }, + "require": { + "phpoption/phpoption": "1.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.3-dev" + } + }, + "autoload": { + "psr-0": { + "PhpCollection": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache2" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com", + "homepage": "http://jmsyst.com", + "role": "Developer of wrapped JMSSerializerBundle" + } + ], + "description": "General-Purpose Collection Library for PHP", + "keywords": [ + "collection", + "list", + "map", + "sequence", + "set" + ], + "time": "2014-03-11 13:46:42" + }, + { + "name": "phpdocumentor/fileset", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/Fileset.git", + "reference": "bfa78d8fa9763dfce6d0e5d3730c1d8ab25d34b0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/Fileset/zipball/bfa78d8fa9763dfce6d0e5d3730c1d8ab25d34b0", + "reference": "bfa78d8fa9763dfce6d0e5d3730c1d8ab25d34b0", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/finder": "~2.1" + }, + "require-dev": { + "phpunit/phpunit": "~3.7" + }, + "type": "library", + "autoload": { + "psr-0": { + "phpDocumentor": [ + "src/", + "tests/unit/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Fileset component for collecting a set of files given directories and file paths", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "files", + "fileset", + "phpdoc" + ], + "time": "2013-08-06 21:07:42" + }, + { + "name": "phpdocumentor/graphviz", + "version": "1.0.4", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/GraphViz.git", + "reference": "a906a90a9f230535f25ea31caf81b2323956283f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/GraphViz/zipball/a906a90a9f230535f25ea31caf81b2323956283f", + "reference": "a906a90a9f230535f25ea31caf81b2323956283f", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "phpDocumentor": [ + "src/", + "tests/unit" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "mike.vanriel@naenius.com" + } + ], + "time": "2016-02-02 13:00:08" + }, + { + "name": "phpdocumentor/phpdocumentor", + "version": "v2.9.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/phpDocumentor2.git", + "reference": "be607da0eef9b9249c43c5b4820d25d631c73667" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/phpDocumentor2/zipball/be607da0eef9b9249c43c5b4820d25d631c73667", + "reference": "be607da0eef9b9249c43c5b4820d25d631c73667", + "shasum": "" + }, + "require": { + "cilex/cilex": "~1.0", + "erusev/parsedown": "~1.0", + "herrera-io/phar-update": "1.0.3", + "jms/serializer": ">=0.12", + "monolog/monolog": "~1.6", + "php": ">=5.3.3", + "phpdocumentor/fileset": "~1.0", + "phpdocumentor/graphviz": "~1.0", + "phpdocumentor/reflection": "^3.0", + "phpdocumentor/reflection-docblock": "~2.0", + "symfony/config": "~2.3", + "symfony/console": "~2.3", + "symfony/event-dispatcher": "~2.1", + "symfony/process": "~2.0", + "symfony/stopwatch": "~2.3", + "symfony/validator": "~2.2", + "twig/twig": "~1.3", + "zendframework/zend-cache": "~2.1", + "zendframework/zend-config": "~2.1", + "zendframework/zend-filter": "~2.1", + "zendframework/zend-i18n": "~2.1", + "zendframework/zend-serializer": "~2.1", + "zendframework/zend-servicemanager": "~2.1", + "zendframework/zend-stdlib": "~2.1", + "zetacomponents/document": ">=1.3.1" + }, + "require-dev": { + "behat/behat": "~3.0", + "mikey179/vfsstream": "~1.2", + "mockery/mockery": "~0.9@dev", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~1.4", + "symfony/expression-language": "~2.4" + }, + "suggest": { + "ext-twig": "Enabling the twig extension improves the generation of twig based templates.", + "ext-xslcache": "Enabling the XSLCache extension improves the generation of xml based templates." + }, + "bin": [ + "bin/phpdoc.php", + "bin/phpdoc" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-develop": "2.9-dev" + } + }, + "autoload": { + "psr-0": { + "phpDocumentor": [ + "src/", + "tests/unit/" + ], + "Cilex\\Provider": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Documentation Generator for PHP", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "api", + "application", + "dga", + "documentation", + "phpdoc" + ], + "time": "2016-05-22 09:50:56" + }, + { + "name": "phpdocumentor/reflection", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/Reflection.git", + "reference": "793bfd92d9a0fc96ae9608fb3e947c3f59fb3a0d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/Reflection/zipball/793bfd92d9a0fc96ae9608fb3e947c3f59fb3a0d", + "reference": "793bfd92d9a0fc96ae9608fb3e947c3f59fb3a0d", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^1.0", + "php": ">=5.3.3", + "phpdocumentor/reflection-docblock": "~2.0", + "psr/log": "~1.0" + }, + "require-dev": { + "behat/behat": "~2.4", + "mockery/mockery": "~0.8", + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "phpDocumentor": [ + "src/", + "tests/unit/", + "tests/mocks/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Reflection library to do Static Analysis for PHP Projects", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2016-05-21 08:42:32" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", + "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "dflydev/markdown": "~1.0", + "erusev/parsedown": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "phpDocumentor": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "mike.vanriel@naenius.com" + } + ], + "time": "2015-02-03 12:10:50" + }, + { + "name": "phpoption/phpoption", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/php-option.git", + "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/94e644f7d2051a5f0fcf77d81605f152eecff0ed", + "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "4.7.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-0": { + "PhpOption\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache2" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Option Type for PHP", + "keywords": [ + "language", + "option", + "php", + "type" + ], + "time": "2015-07-25 16:39:46" + }, + { + "name": "phpspec/prophecy", + "version": "v1.6.1", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "58a8137754bc24b25740d4281399a4a3596058e0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/58a8137754bc24b25740d4281399a4a3596058e0", + "reference": "58a8137754bc24b25740d4281399a4a3596058e0", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", + "sebastian/comparator": "^1.1", + "sebastian/recursion-context": "^1.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2016-06-07 08:13:47" + }, + { + "name": "phpunit/php-code-coverage", + "version": "2.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "phpunit/php-file-iterator": "~1.3", + "phpunit/php-text-template": "~1.2", + "phpunit/php-token-stream": "~1.3", + "sebastian/environment": "^1.3.2", + "sebastian/version": "~1.0" + }, + "require-dev": { + "ext-xdebug": ">=2.1.4", + "phpunit/phpunit": "~4" + }, + "suggest": { + "ext-dom": "*", + "ext-xdebug": ">=2.2.1", + "ext-xmlwriter": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2015-10-06 15:47:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0", + "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2015-06-21 13:08:43" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21 13:50:34" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260", + "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4|~5" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2016-05-12 18:03:57" + }, + { + "name": "phpunit/php-token-stream", + "version": "1.4.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", + "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2015-09-15 10:49:45" + }, + { + "name": "phpunit/phpunit", + "version": "4.7.7", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "9b97f9d807b862c2de2a36e86690000801c85724" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9b97f9d807b862c2de2a36e86690000801c85724", + "reference": "9b97f9d807b862c2de2a36e86690000801c85724", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=5.3.3", + "phpspec/prophecy": "~1.3,>=1.3.1", + "phpunit/php-code-coverage": "~2.1", + "phpunit/php-file-iterator": "~1.4", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": ">=1.0.6", + "phpunit/phpunit-mock-objects": "~2.3", + "sebastian/comparator": "~1.1", + "sebastian/diff": "~1.2", + "sebastian/environment": "~1.2", + "sebastian/exporter": "~1.2", + "sebastian/global-state": "~1.0", + "sebastian/version": "~1.0", + "symfony/yaml": "~2.1|~3.0" + }, + "suggest": { + "phpunit/php-invoker": "~1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.7.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2015-07-13 11:28:34" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "2.3.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": ">=5.3.3", + "phpunit/php-text-template": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "time": "2015-10-02 06:51:40" + }, + { + "name": "pimple/pimple", + "version": "v1.1.1", + "source": { + "type": "git", + "url": "https://github.com/silexphp/Pimple.git", + "reference": "2019c145fe393923f3441b23f29bbdfaa5c58c4d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/silexphp/Pimple/zipball/2019c145fe393923f3441b23f29bbdfaa5c58c4d", + "reference": "2019c145fe393923f3441b23f29bbdfaa5c58c4d", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-0": { + "Pimple": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" + } + ], + "description": "Pimple is a simple Dependency Injection Container for PHP 5.3", + "homepage": "http://pimple.sensiolabs.org", + "keywords": [ + "container", + "dependency injection" + ], + "time": "2013-11-22 08:30:29" + }, + { + "name": "psr/log", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", + "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", + "shasum": "" + }, + "type": "library", + "autoload": { + "psr-0": { + "Psr\\Log\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2012-12-21 11:40:51" + }, + { + "name": "sebastian/comparator", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", + "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2015-07-26 15:48:44" + }, + { + "name": "sebastian/diff", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "time": "2015-12-08 07:14:41" + }, + { + "name": "sebastian/environment", + "version": "1.3.7", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/4e8f0da10ac5802913afc151413bc8c53b6c2716", + "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2016-05-17 03:18:57" + }, + { + "name": "sebastian/exporter", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/recursion-context": "~1.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2016-06-17 09:04:28" + }, + { + "name": "sebastian/global-state", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2015-10-12 03:26:01" + }, + { + "name": "sebastian/recursion-context", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "913401df809e99e4f47b27cdd781f4a258d58791" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", + "reference": "913401df809e99e4f47b27cdd781f4a258d58791", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2015-11-11 19:50:13" + }, + { + "name": "sebastian/version", + "version": "1.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "shasum": "" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2015-06-21 13:59:46" + }, + { + "name": "seld/jsonlint", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/jsonlint.git", + "reference": "66834d3e3566bb5798db7294619388786ae99394" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/66834d3e3566bb5798db7294619388786ae99394", + "reference": "66834d3e3566bb5798db7294619388786ae99394", + "shasum": "" + }, + "require": { + "php": "^5.3 || ^7.0" + }, + "bin": [ + "bin/jsonlint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Seld\\JsonLint\\": "src/Seld/JsonLint/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "JSON Linter", + "keywords": [ + "json", + "linter", + "parser", + "validator" + ], + "time": "2015-11-21 02:21:41" + }, + { + "name": "symfony/config", + "version": "v2.8.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "a2edd59c2163c65747fc3f35d132b5a39266bd05" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/a2edd59c2163c65747fc3f35d132b5a39266bd05", + "reference": "a2edd59c2163c65747fc3f35d132b5a39266bd05", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "symfony/filesystem": "~2.3|~3.0.0" + }, + "suggest": { + "symfony/yaml": "To use the yaml reference dumper" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Config\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Config Component", + "homepage": "https://symfony.com", + "time": "2016-06-06 11:11:27" + }, + { + "name": "symfony/console", + "version": "v2.8.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "5ac8bc9aa77bb2edf06af3a1bb6bc1020d23acd3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/5ac8bc9aa77bb2edf06af3a1bb6bc1020d23acd3", + "reference": "5ac8bc9aa77bb2edf06af3a1bb6bc1020d23acd3", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/event-dispatcher": "~2.1|~3.0.0", + "symfony/process": "~2.1|~3.0.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Console Component", + "homepage": "https://symfony.com", + "time": "2016-06-06 15:06:25" + }, + { + "name": "symfony/event-dispatcher", + "version": "v2.8.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "2a6b8713f8bdb582058cfda463527f195b066110" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/2a6b8713f8bdb582058cfda463527f195b066110", + "reference": "2a6b8713f8bdb582058cfda463527f195b066110", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.0,>=2.0.5|~3.0.0", + "symfony/dependency-injection": "~2.6|~3.0.0", + "symfony/expression-language": "~2.6|~3.0.0", + "symfony/stopwatch": "~2.3|~3.0.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "time": "2016-06-06 11:11:27" + }, + { + "name": "symfony/filesystem", + "version": "v3.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "74fec3511b62cb934b64bce1d96f06fffa4beafd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/74fec3511b62cb934b64bce1d96f06fffa4beafd", + "reference": "74fec3511b62cb934b64bce1d96f06fffa4beafd", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Filesystem Component", + "homepage": "https://symfony.com", + "time": "2016-04-12 18:09:53" + }, + { + "name": "symfony/finder", + "version": "v2.8.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "3ec095fab1800222732ca522a95dce8fa124007b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/3ec095fab1800222732ca522a95dce8fa124007b", + "reference": "3ec095fab1800222732ca522a95dce8fa124007b", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Finder Component", + "homepage": "https://symfony.com", + "time": "2016-06-06 11:11:27" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "dff51f72b0706335131b00a7f49606168c582594" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/dff51f72b0706335131b00a7f49606168c582594", + "reference": "dff51f72b0706335131b00a7f49606168c582594", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2016-05-18 14:26:46" + }, + { + "name": "symfony/process", + "version": "v2.8.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "115347d00c342198cdc52a7bd8bc15b5ab43500c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/115347d00c342198cdc52a7bd8bc15b5ab43500c", + "reference": "115347d00c342198cdc52a7bd8bc15b5ab43500c", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Process Component", + "homepage": "https://symfony.com", + "time": "2016-06-06 11:11:27" + }, + { + "name": "symfony/stopwatch", + "version": "v2.8.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "5e628055488bcc42dbace3af65be435d094e37e4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/5e628055488bcc42dbace3af65be435d094e37e4", + "reference": "5e628055488bcc42dbace3af65be435d094e37e4", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Stopwatch Component", + "homepage": "https://symfony.com", + "time": "2016-06-06 11:11:27" + }, + { + "name": "symfony/translation", + "version": "v3.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation.git", + "reference": "2b0aacaa613c0ec1ad8046f972d8abdcb19c1db7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation/zipball/2b0aacaa613c0ec1ad8046f972d8abdcb19c1db7", + "reference": "2b0aacaa613c0ec1ad8046f972d8abdcb19c1db7", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/config": "<2.8" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0", + "symfony/intl": "~2.8|~3.0", + "symfony/yaml": "~2.8|~3.0" + }, + "suggest": { + "psr/log": "To use logging capability in translator", + "symfony/config": "", + "symfony/yaml": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Translation Component", + "homepage": "https://symfony.com", + "time": "2016-06-06 11:33:26" + }, + { + "name": "symfony/validator", + "version": "v2.8.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/validator.git", + "reference": "4c8f9fd8e2150dbc4745ef13378e690588365df0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/validator/zipball/4c8f9fd8e2150dbc4745ef13378e690588365df0", + "reference": "4c8f9fd8e2150dbc4745ef13378e690588365df0", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "symfony/polyfill-mbstring": "~1.0", + "symfony/translation": "~2.4|~3.0.0" + }, + "require-dev": { + "doctrine/annotations": "~1.0", + "doctrine/cache": "~1.0", + "egulias/email-validator": "~1.2,>=1.2.1", + "symfony/config": "~2.2|~3.0.0", + "symfony/expression-language": "~2.4|~3.0.0", + "symfony/http-foundation": "~2.1|~3.0.0", + "symfony/intl": "~2.7.4|~2.8|~3.0.0", + "symfony/property-access": "~2.3|~3.0.0", + "symfony/yaml": "~2.0,>=2.0.5|~3.0.0" + }, + "suggest": { + "doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.", + "doctrine/cache": "For using the default cached annotation reader and metadata cache.", + "egulias/email-validator": "Strict (RFC compliant) email validation", + "symfony/config": "", + "symfony/expression-language": "For using the 2.4 Expression validator", + "symfony/http-foundation": "", + "symfony/intl": "", + "symfony/property-access": "For using the 2.4 Validator API", + "symfony/yaml": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Validator\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Validator Component", + "homepage": "https://symfony.com", + "time": "2016-04-14 08:48:44" + }, + { + "name": "symfony/yaml", + "version": "v3.1.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "c5a7e7fc273c758b92b85dcb9c46149ccda89623" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/c5a7e7fc273c758b92b85dcb9c46149ccda89623", + "reference": "c5a7e7fc273c758b92b85dcb9c46149ccda89623", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "time": "2016-06-14 11:18:07" + }, + { + "name": "twig/twig", + "version": "v1.24.1", + "source": { + "type": "git", + "url": "https://github.com/twigphp/Twig.git", + "reference": "3566d311a92aae4deec6e48682dc5a4528c4a512" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/3566d311a92aae4deec6e48682dc5a4528c4a512", + "reference": "3566d311a92aae4deec6e48682dc5a4528c4a512", + "shasum": "" + }, + "require": { + "php": ">=5.2.7" + }, + "require-dev": { + "symfony/debug": "~2.7", + "symfony/phpunit-bridge": "~2.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.24-dev" + } + }, + "autoload": { + "psr-0": { + "Twig_": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" + }, + { + "name": "Armin Ronacher", + "email": "armin.ronacher@active-4.com", + "role": "Project Founder" + }, + { + "name": "Twig Team", + "homepage": "http://twig.sensiolabs.org/contributors", + "role": "Contributors" + } + ], + "description": "Twig, the flexible, fast, and secure template language for PHP", + "homepage": "http://twig.sensiolabs.org", + "keywords": [ + "templating" + ], + "time": "2016-05-30 09:11:59" + }, + { + "name": "zendframework/zend-cache", + "version": "2.7.1", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-cache.git", + "reference": "2c68def8f96ce842d2f2a9a69e2f3508c2f5312d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-cache/zipball/2c68def8f96ce842d2f2a9a69e2f3508c2f5312d", + "reference": "2c68def8f96ce842d2f2a9a69e2f3508c2f5312d", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0", + "zendframework/zend-eventmanager": "^2.6.2 || ^3.0", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3", + "zendframework/zend-stdlib": "^2.7 || ^3.0" + }, + "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpbench/phpbench": "^0.10.0", + "phpunit/phpunit": "^4.5", + "zendframework/zend-serializer": "^2.6", + "zendframework/zend-session": "^2.6.2" + }, + "suggest": { + "ext-apc": "APC or compatible extension, to use the APC storage adapter", + "ext-apcu": "APCU >= 5.1.0, to use the APCu storage adapter", + "ext-dba": "DBA, to use the DBA storage adapter", + "ext-memcache": "Memcache >= 2.0.0 to use the Memcache storage adapter", + "ext-memcached": "Memcached >= 1.0.0 to use the Memcached storage adapter", + "ext-mongo": "Mongo, to use MongoDb storage adapter", + "ext-redis": "Redis, to use Redis storage adapter", + "ext-wincache": "WinCache, to use the WinCache storage adapter", + "ext-xcache": "XCache, to use the XCache storage adapter", + "mongofill/mongofill": "Alternative to ext-mongo - a pure PHP implementation designed as a drop in replacement", + "zendframework/zend-serializer": "Zend\\Serializer component", + "zendframework/zend-session": "Zend\\Session component" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev", + "dev-develop": "2.8-dev" + }, + "zf": { + "component": "Zend\\Cache", + "config-provider": "Zend\\Cache\\ConfigProvider" + } + }, + "autoload": { + "psr-4": { + "Zend\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "provides a generic way to cache any data", + "homepage": "https://github.com/zendframework/zend-cache", + "keywords": [ + "cache", + "zf2" + ], + "time": "2016-05-12 21:47:55" + }, + { + "name": "zendframework/zend-config", + "version": "2.6.0", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-config.git", + "reference": "2920e877a9f6dca9fa8f6bd3b1ffc2e19bb1e30d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-config/zipball/2920e877a9f6dca9fa8f6bd3b1ffc2e19bb1e30d", + "reference": "2920e877a9f6dca9fa8f6bd3b1ffc2e19bb1e30d", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0", + "zendframework/zend-stdlib": "^2.7 || ^3.0" + }, + "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "zendframework/zend-filter": "^2.6", + "zendframework/zend-i18n": "^2.5", + "zendframework/zend-json": "^2.6.1", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3" + }, + "suggest": { + "zendframework/zend-filter": "Zend\\Filter component", + "zendframework/zend-i18n": "Zend\\I18n component", + "zendframework/zend-json": "Zend\\Json to use the Json reader or writer classes", + "zendframework/zend-servicemanager": "Zend\\ServiceManager for use with the Config Factory to retrieve reader and writer instances" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6-dev", + "dev-develop": "2.7-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Config\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "provides a nested object property based user interface for accessing this configuration data within application code", + "homepage": "https://github.com/zendframework/zend-config", + "keywords": [ + "config", + "zf2" + ], + "time": "2016-02-04 23:01:10" + }, + { + "name": "zendframework/zend-eventmanager", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-eventmanager.git", + "reference": "5c80bdee0e952be112dcec0968bad770082c3a6e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-eventmanager/zipball/5c80bdee0e952be112dcec0968bad770082c3a6e", + "reference": "5c80bdee0e952be112dcec0968bad770082c3a6e", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0" + }, + "require-dev": { + "athletic/athletic": "^0.1", + "container-interop/container-interop": "^1.1.0", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "^2.0", + "zendframework/zend-stdlib": "^2.7.3 || ^3.0" + }, + "suggest": { + "container-interop/container-interop": "^1.1.0, to use the lazy listeners feature", + "zendframework/zend-stdlib": "^2.7.3 || ^3.0, to use the FilterChain feature" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev", + "dev-develop": "3.1-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\EventManager\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Trigger and listen to events within a PHP application", + "homepage": "https://github.com/zendframework/zend-eventmanager", + "keywords": [ + "event", + "eventmanager", + "events", + "zf2" + ], + "time": "2016-02-18 20:53:00" + }, + { + "name": "zendframework/zend-filter", + "version": "2.7.1", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-filter.git", + "reference": "84c50246428efb0a1e52868e162dab3e149d5b80" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-filter/zipball/84c50246428efb0a1e52868e162dab3e149d5b80", + "reference": "84c50246428efb0a1e52868e162dab3e149d5b80", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0", + "zendframework/zend-stdlib": "^2.7 || ^3.0" + }, + "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "pear/archive_tar": "^1.4", + "phpunit/phpunit": "~4.0", + "zendframework/zend-crypt": "^2.6", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3", + "zendframework/zend-uri": "^2.5" + }, + "suggest": { + "zendframework/zend-crypt": "Zend\\Crypt component, for encryption filters", + "zendframework/zend-i18n": "Zend\\I18n component for filters depending on i18n functionality", + "zendframework/zend-servicemanager": "Zend\\ServiceManager component, for using the filter chain functionality", + "zendframework/zend-uri": "Zend\\Uri component, for the UriNormalize filter" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev", + "dev-develop": "2.8-dev" + }, + "zf": { + "component": "Zend\\Filter", + "config-provider": "Zend\\Filter\\ConfigProvider" + } + }, + "autoload": { + "psr-4": { + "Zend\\Filter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "provides a set of commonly needed data filters", + "homepage": "https://github.com/zendframework/zend-filter", + "keywords": [ + "filter", + "zf2" + ], + "time": "2016-04-18 18:32:43" + }, + { + "name": "zendframework/zend-hydrator", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-hydrator.git", + "reference": "22652e1661a5a10b3f564cf7824a2206cf5a4a65" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-hydrator/zipball/22652e1661a5a10b3f564cf7824a2206cf5a4a65", + "reference": "22652e1661a5a10b3f564cf7824a2206cf5a4a65", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0", + "zendframework/zend-stdlib": "^2.7 || ^3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "^2.0@dev", + "zendframework/zend-eventmanager": "^2.6.2 || ^3.0", + "zendframework/zend-filter": "^2.6", + "zendframework/zend-inputfilter": "^2.6", + "zendframework/zend-serializer": "^2.6.1", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3" + }, + "suggest": { + "zendframework/zend-eventmanager": "^2.6.2 || ^3.0, to support aggregate hydrator usage", + "zendframework/zend-filter": "^2.6, to support naming strategy hydrator usage", + "zendframework/zend-serializer": "^2.6.1, to use the SerializableStrategy", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3, to support hydrator plugin manager usage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-release-1.0": "1.0-dev", + "dev-release-1.1": "1.1-dev", + "dev-master": "2.0-dev", + "dev-develop": "2.1-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Hydrator\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "homepage": "https://github.com/zendframework/zend-hydrator", + "keywords": [ + "hydrator", + "zf2" + ], + "time": "2016-02-18 22:38:26" + }, + { + "name": "zendframework/zend-i18n", + "version": "2.7.3", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-i18n.git", + "reference": "b2db0d8246a865c659f93199f90f5fc2cd2f3cd8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-i18n/zipball/b2db0d8246a865c659f93199f90f5fc2cd2f3cd8", + "reference": "b2db0d8246a865c659f93199f90f5fc2cd2f3cd8", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0", + "zendframework/zend-stdlib": "^2.7 || ^3.0" + }, + "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "zendframework/zend-cache": "^2.6.1", + "zendframework/zend-config": "^2.6", + "zendframework/zend-eventmanager": "^2.6.2 || ^3.0", + "zendframework/zend-filter": "^2.6.1", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3", + "zendframework/zend-validator": "^2.6", + "zendframework/zend-view": "^2.6.3" + }, + "suggest": { + "ext-intl": "Required for most features of Zend\\I18n; included in default builds of PHP", + "zendframework/zend-cache": "Zend\\Cache component", + "zendframework/zend-config": "Zend\\Config component", + "zendframework/zend-eventmanager": "You should install this package to use the events in the translator", + "zendframework/zend-filter": "You should install this package to use the provided filters", + "zendframework/zend-i18n-resources": "Translation resources", + "zendframework/zend-servicemanager": "Zend\\ServiceManager component", + "zendframework/zend-validator": "You should install this package to use the provided validators", + "zendframework/zend-view": "You should install this package to use the provided view helpers" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev", + "dev-develop": "2.8-dev" + }, + "zf": { + "component": "Zend\\I18n", + "config-provider": "Zend\\I18n\\ConfigProvider" + } + }, + "autoload": { + "psr-4": { + "Zend\\I18n\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "homepage": "https://github.com/zendframework/zend-i18n", + "keywords": [ + "i18n", + "zf2" + ], + "time": "2016-06-07 21:08:30" + }, + { + "name": "zendframework/zend-json", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-json.git", + "reference": "f42a1588e75c2a3e338cd94c37906231e616daab" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-json/zipball/f42a1588e75c2a3e338cd94c37906231e616daab", + "reference": "f42a1588e75c2a3e338cd94c37906231e616daab", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "^2.3", + "zendframework/zend-stdlib": "^2.7 || ^3.0" + }, + "suggest": { + "zendframework/zend-json-server": "For implementing JSON-RPC servers", + "zendframework/zend-xml2json": "For converting XML documents to JSON" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev", + "dev-develop": "3.1-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Json\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "provides convenience methods for serializing native PHP to JSON and decoding JSON to native PHP", + "homepage": "https://github.com/zendframework/zend-json", + "keywords": [ + "json", + "zf2" + ], + "time": "2016-04-01 02:34:00" + }, + { + "name": "zendframework/zend-serializer", + "version": "2.8.0", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-serializer.git", + "reference": "ff74ea020f5f90866eb28365327e9bc765a61a6e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-serializer/zipball/ff74ea020f5f90866eb28365327e9bc765a61a6e", + "reference": "ff74ea020f5f90866eb28365327e9bc765a61a6e", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0", + "zendframework/zend-json": "^2.5 || ^3.0", + "zendframework/zend-stdlib": "^2.7 || ^3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.5", + "squizlabs/php_codesniffer": "^2.3.1", + "zendframework/zend-math": "^2.6", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3" + }, + "suggest": { + "zendframework/zend-math": "(^2.6 || ^3.0) To support Python Pickle serialization", + "zendframework/zend-servicemanager": "(^2.7.5 || ^3.0.3) To support plugin manager support" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev", + "dev-develop": "2.9-dev" + }, + "zf": { + "component": "Zend\\Serializer", + "config-provider": "Zend\\Serializer\\ConfigProvider" + } + }, + "autoload": { + "psr-4": { + "Zend\\Serializer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "provides an adapter based interface to simply generate storable representation of PHP types by different facilities, and recover", + "homepage": "https://github.com/zendframework/zend-serializer", + "keywords": [ + "serializer", + "zf2" + ], + "time": "2016-06-21 17:01:55" + }, + { + "name": "zendframework/zend-servicemanager", + "version": "2.7.6", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-servicemanager.git", + "reference": "a6db4d13b9141fccce5dcb553df0295d6ad7d477" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-servicemanager/zipball/a6db4d13b9141fccce5dcb553df0295d6ad7d477", + "reference": "a6db4d13b9141fccce5dcb553df0295d6ad7d477", + "shasum": "" + }, + "require": { + "container-interop/container-interop": "~1.0", + "php": "^5.5 || ^7.0" + }, + "require-dev": { + "athletic/athletic": "dev-master", + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "zendframework/zend-di": "~2.5", + "zendframework/zend-mvc": "~2.5" + }, + "suggest": { + "ocramius/proxy-manager": "ProxyManager 0.5.* to handle lazy initialization of services", + "zendframework/zend-di": "Zend\\Di component" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev", + "dev-develop": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\ServiceManager\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "homepage": "https://github.com/zendframework/zend-servicemanager", + "keywords": [ + "servicemanager", + "zf2" + ], + "time": "2016-04-27 19:07:40" + }, + { + "name": "zendframework/zend-stdlib", + "version": "2.7.7", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-stdlib.git", + "reference": "0e44eb46788f65e09e077eb7f44d2659143bcc1f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/0e44eb46788f65e09e077eb7f44d2659143bcc1f", + "reference": "0e44eb46788f65e09e077eb7f44d2659143bcc1f", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0", + "zendframework/zend-hydrator": "~1.1" + }, + "require-dev": { + "athletic/athletic": "~0.1", + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "zendframework/zend-config": "~2.5", + "zendframework/zend-eventmanager": "~2.5", + "zendframework/zend-filter": "~2.5", + "zendframework/zend-inputfilter": "~2.5", + "zendframework/zend-serializer": "~2.5", + "zendframework/zend-servicemanager": "~2.5" + }, + "suggest": { + "zendframework/zend-eventmanager": "To support aggregate hydrator usage", + "zendframework/zend-filter": "To support naming strategy hydrator usage", + "zendframework/zend-serializer": "Zend\\Serializer component", + "zendframework/zend-servicemanager": "To support hydrator plugin manager usage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-release-2.7": "2.7-dev", + "dev-master": "3.0-dev", + "dev-develop": "3.1-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Stdlib\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "homepage": "https://github.com/zendframework/zend-stdlib", + "keywords": [ + "stdlib", + "zf2" + ], + "time": "2016-04-12 21:17:31" + }, + { + "name": "zetacomponents/base", + "version": "1.9", + "source": { + "type": "git", + "url": "https://github.com/zetacomponents/Base.git", + "reference": "f20df24e8de3e48b6b69b2503f917e457281e687" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zetacomponents/Base/zipball/f20df24e8de3e48b6b69b2503f917e457281e687", + "reference": "f20df24e8de3e48b6b69b2503f917e457281e687", + "shasum": "" + }, + "require-dev": { + "zetacomponents/unit-test": "*" + }, + "type": "library", + "autoload": { + "classmap": [ + "src" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Sergey Alexeev" + }, + { + "name": "Sebastian Bergmann" + }, + { + "name": "Jan Borsodi" + }, + { + "name": "Raymond Bosman" + }, + { + "name": "Frederik Holljen" + }, + { + "name": "Kore Nordmann" + }, + { + "name": "Derick Rethans" + }, + { + "name": "Vadym Savchuk" + }, + { + "name": "Tobias Schlitt" + }, + { + "name": "Alexandru Stanoi" + } + ], + "description": "The Base package provides the basic infrastructure that all packages rely on. Therefore every component relies on this package.", + "homepage": "https://github.com/zetacomponents", + "time": "2014-09-19 03:28:34" + }, + { + "name": "zetacomponents/document", + "version": "1.3.1", + "source": { + "type": "git", + "url": "https://github.com/zetacomponents/Document.git", + "reference": "688abfde573cf3fe0730f82538fbd7aa9fc95bc8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zetacomponents/Document/zipball/688abfde573cf3fe0730f82538fbd7aa9fc95bc8", + "reference": "688abfde573cf3fe0730f82538fbd7aa9fc95bc8", + "shasum": "" + }, + "require": { + "zetacomponents/base": "*" + }, + "require-dev": { + "zetacomponents/unit-test": "dev-master" + }, + "type": "library", + "autoload": { + "classmap": [ + "src" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Sebastian Bergmann" + }, + { + "name": "Kore Nordmann" + }, + { + "name": "Derick Rethans" + }, + { + "name": "Tobias Schlitt" + }, + { + "name": "Alexandru Stanoi" + } + ], + "description": "The Document components provides a general conversion framework for different semantic document markup languages like XHTML, Docbook, RST and similar.", + "homepage": "https://github.com/zetacomponents", + "time": "2013-12-19 11:40:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=5.0.0" + }, + "platform-dev": [] +} diff --git a/vendor/phpmailer/phpmailer/examples/DKIM.phps b/vendor/phpmailer/phpmailer/examples/DKIM.phps new file mode 100644 index 0000000000..e3d2bae02a --- /dev/null +++ b/vendor/phpmailer/phpmailer/examples/DKIM.phps @@ -0,0 +1,38 @@ +setFrom('from@example.com', 'First Last'); +//Set an alternative reply-to address +$mail->addReplyTo('replyto@example.com', 'First Last'); +//Set who the message is to be sent to +$mail->addAddress('whoto@example.com', 'John Doe'); +//Set the subject line +$mail->Subject = 'PHPMailer DKIM test'; +//This should be the same as the domain of your From address +$mail->DKIM_domain = 'example.com'; +//Path to your private key file +$mail->DKIM_private = 'dkim_private.pem'; +//Set this to your own selector +$mail->DKIM_selector = 'phpmailer'; +//If your private key has a passphrase, set it here +$mail->DKIM_passphrase = ''; +//The identity you're signing as - usually your From address +$mail->DKIM_identity = $mail->From; + +//send the message, check for errors +if (!$mail->send()) { + echo "Mailer Error: " . $mail->ErrorInfo; +} else { + echo "Message sent!"; +} diff --git a/vendor/phpmailer/phpmailer/examples/code_generator.phps b/vendor/phpmailer/phpmailer/examples/code_generator.phps new file mode 100644 index 0000000000..23458561ba --- /dev/null +++ b/vendor/phpmailer/phpmailer/examples/code_generator.phps @@ -0,0 +1,597 @@ +CharSet = 'utf-8'; +ini_set('default_charset', 'UTF-8'); +$mail->Debugoutput = $CFG['smtp_debugoutput']; +$example_code .= "\n\n\$mail = new PHPMailer(true);"; +$example_code .= "\n\$mail->CharSet = 'utf-8';"; +$example_code .= "\nini_set('default_charset', 'UTF-8');"; + +class phpmailerAppException extends phpmailerException +{ +} + +$example_code .= "\n\nclass phpmailerAppException extends phpmailerException {}"; +$example_code .= "\n\ntry {"; + +try { + if (isset($_POST["submit"]) && $_POST['submit'] == "Submit") { + $to = $_POST['To_Email']; + if (!PHPMailer::validateAddress($to)) { + throw new phpmailerAppException("Email address " . $to . " is invalid -- aborting!"); + } + + $example_code .= "\n\$to = '{$_POST['To_Email']}';"; + $example_code .= "\nif(!PHPMailer::validateAddress(\$to)) {"; + $example_code .= "\n throw new phpmailerAppException(\"Email address \" . " . + "\$to . \" is invalid -- aborting!\");"; + $example_code .= "\n}"; + + switch ($_POST['test_type']) { + case 'smtp': + $mail->isSMTP(); // telling the class to use SMTP + $mail->SMTPDebug = (integer)$_POST['smtp_debug']; + $mail->Host = $_POST['smtp_server']; // SMTP server + $mail->Port = (integer)$_POST['smtp_port']; // set the SMTP port + if ($_POST['smtp_secure']) { + $mail->SMTPSecure = strtolower($_POST['smtp_secure']); + } + $mail->SMTPAuth = array_key_exists('smtp_authenticate', $_POST); // enable SMTP authentication? + if (array_key_exists('smtp_authenticate', $_POST)) { + $mail->Username = $_POST['authenticate_username']; // SMTP account username + $mail->Password = $_POST['authenticate_password']; // SMTP account password + } + + $example_code .= "\n\$mail->isSMTP();"; + $example_code .= "\n\$mail->SMTPDebug = " . $_POST['smtp_debug'] . ";"; + $example_code .= "\n\$mail->Host = \"" . $_POST['smtp_server'] . "\";"; + $example_code .= "\n\$mail->Port = \"" . $_POST['smtp_port'] . "\";"; + $example_code .= "\n\$mail->SMTPSecure = \"" . strtolower($_POST['smtp_secure']) . "\";"; + $example_code .= "\n\$mail->SMTPAuth = " . (array_key_exists( + 'smtp_authenticate', + $_POST + ) ? 'true' : 'false') . ";"; + if (array_key_exists('smtp_authenticate', $_POST)) { + $example_code .= "\n\$mail->Username = \"" . $_POST['authenticate_username'] . "\";"; + $example_code .= "\n\$mail->Password = \"" . $_POST['authenticate_password'] . "\";"; + } + break; + case 'mail': + $mail->isMail(); // telling the class to use PHP's mail() + $example_code .= "\n\$mail->isMail();"; + break; + case 'sendmail': + $mail->isSendmail(); // telling the class to use Sendmail + $example_code .= "\n\$mail->isSendmail();"; + break; + case 'qmail': + $mail->isQmail(); // telling the class to use Qmail + $example_code .= "\n\$mail->isQmail();"; + break; + default: + throw new phpmailerAppException('Invalid test_type provided'); + } + + try { + if ($_POST['From_Name'] != '') { + $mail->addReplyTo($_POST['From_Email'], $_POST['From_Name']); + $mail->setFrom($_POST['From_Email'], $_POST['From_Name']); + + $example_code .= "\n\$mail->addReplyTo(\"" . + $_POST['From_Email'] . "\", \"" . $_POST['From_Name'] . "\");"; + $example_code .= "\n\$mail->setFrom(\"" . + $_POST['From_Email'] . "\", \"" . $_POST['From_Name'] . "\");"; + } else { + $mail->addReplyTo($_POST['From_Email']); + $mail->setFrom($_POST['From_Email'], $_POST['From_Email']); + + $example_code .= "\n\$mail->addReplyTo(\"" . $_POST['From_Email'] . "\");"; + $example_code .= "\n\$mail->setFrom(\"" . + $_POST['From_Email'] . "\", \"" . $_POST['From_Email'] . "\");"; + } + + if ($_POST['To_Name'] != '') { + $mail->addAddress($to, $_POST['To_Name']); + $example_code .= "\n\$mail->addAddress(\"$to\", \"" . $_POST['To_Name'] . "\");"; + } else { + $mail->addAddress($to); + $example_code .= "\n\$mail->addAddress(\"$to\");"; + } + + if ($_POST['bcc_Email'] != '') { + $indiBCC = explode(" ", $_POST['bcc_Email']); + foreach ($indiBCC as $key => $value) { + $mail->addBCC($value); + $example_code .= "\n\$mail->addBCC(\"$value\");"; + } + } + + if ($_POST['cc_Email'] != '') { + $indiCC = explode(" ", $_POST['cc_Email']); + foreach ($indiCC as $key => $value) { + $mail->addCC($value); + $example_code .= "\n\$mail->addCC(\"$value\");"; + } + } + } catch (phpmailerException $e) { //Catch all kinds of bad addressing + throw new phpmailerAppException($e->getMessage()); + } + $mail->Subject = $_POST['Subject'] . ' (PHPMailer test using ' . strtoupper($_POST['test_type']) . ')'; + $example_code .= "\n\$mail->Subject = \"" . $_POST['Subject'] . + ' (PHPMailer test using ' . strtoupper($_POST['test_type']) . ')";'; + + if ($_POST['Message'] == '') { + $body = file_get_contents('contents.html'); + } else { + $body = $_POST['Message']; + } + + $example_code .= "\n\$body = <<<'EOT'\n" . htmlentities($body) . "\nEOT;"; + + $mail->WordWrap = 78; // set word wrap to the RFC2822 limit + $mail->msgHTML($body, dirname(__FILE__), true); //Create message bodies and embed images + + $example_code .= "\n\$mail->WordWrap = 78;"; + $example_code .= "\n\$mail->msgHTML(\$body, dirname(__FILE__), true); //Create message bodies and embed images"; + + $mail->addAttachment('images/phpmailer_mini.png', 'phpmailer_mini.png'); // optional name + $mail->addAttachment('images/phpmailer.png', 'phpmailer.png'); // optional name + $example_code .= "\n\$mail->addAttachment('images/phpmailer_mini.png'," . + "'phpmailer_mini.png'); // optional name"; + $example_code .= "\n\$mail->addAttachment('images/phpmailer.png', 'phpmailer.png'); // optional name"; + + $example_code .= "\n\ntry {"; + $example_code .= "\n \$mail->send();"; + $example_code .= "\n \$results_messages[] = \"Message has been sent using " . + strtoupper($_POST['test_type']) . "\";"; + $example_code .= "\n}"; + $example_code .= "\ncatch (phpmailerException \$e) {"; + $example_code .= "\n throw new phpmailerAppException('Unable to send to: ' . \$to. ': '.\$e->getMessage());"; + $example_code .= "\n}"; + + try { + $mail->send(); + $results_messages[] = "Message has been sent using " . strtoupper($_POST["test_type"]); + } catch (phpmailerException $e) { + throw new phpmailerAppException("Unable to send to: " . $to . ': ' . $e->getMessage()); + } + } +} catch (phpmailerAppException $e) { + $results_messages[] = $e->errorMessage(); +} +$example_code .= "\n}"; +$example_code .= "\ncatch (phpmailerAppException \$e) {"; +$example_code .= "\n \$results_messages[] = \$e->errorMessage();"; +$example_code .= "\n}"; +$example_code .= "\n\nif (count(\$results_messages) > 0) {"; +$example_code .= "\n echo \"

            Run results

            \\n\";"; +$example_code .= "\n echo \"
              \\n\";"; +$example_code .= "\nforeach (\$results_messages as \$result) {"; +$example_code .= "\n echo \"
            • \$result
            • \\n\";"; +$example_code .= "\n}"; +$example_code .= "\necho \"
            \\n\";"; +$example_code .= "\n}"; +?> + + + + PHPMailer Test Page + + + + + + + + +"; + echo exit("ERROR: Wrong PHP version. Must be PHP 5 or above."); +} + +if (count($results_messages) > 0) { + echo '

            Run results

            '; + echo '
              '; + foreach ($results_messages as $result) { + echo "
            • $result
            • "; + } + echo '
            '; +} + +if (isset($_POST["submit"]) && $_POST["submit"] == "Submit") { + echo "
            \n"; + echo "
            Script:\n"; + echo "
            \n";
            +    echo $example_code;
            +    echo "\n
            \n"; + echo "\n
            \n"; +} +?> +
            +
            +
            +
            + Mail Details + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            + + + +
            + + + +
            + + + +
            + + + +
            + + + +
            + + + +
            + + + +
            + + + +
            +
            Test will include two attachments.
            +
            +
            +
            +
            + Mail Test Specs + + + + + +
            Test Type +
            + + + required> +
            +
            + + + required> +
            +
            + + + required> +
            +
            + + + required> +
            +
            +
            "> + SMTP Specific Options: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            + +
            + +
            + +
            + +
            + + value=""> +
            + +
            + +
            +
            +
            +
            +
            + +
            +
            + +
            + +
            +
            +
            + + diff --git a/vendor/phpmailer/phpmailer/examples/contents.html b/vendor/phpmailer/phpmailer/examples/contents.html new file mode 100644 index 0000000000..dc3fc6676c --- /dev/null +++ b/vendor/phpmailer/phpmailer/examples/contents.html @@ -0,0 +1,17 @@ + + + + + PHPMailer Test + + +
            +

            This is a test of PHPMailer.

            +
            + PHPMailer rocks +
            +

            This example uses HTML.

            +

            ISO-8859-1 text: éèîüçÅñæß

            +
            + + diff --git a/vendor/phpmailer/phpmailer/examples/contentsutf8.html b/vendor/phpmailer/phpmailer/examples/contentsutf8.html new file mode 100644 index 0000000000..81a202405b --- /dev/null +++ b/vendor/phpmailer/phpmailer/examples/contentsutf8.html @@ -0,0 +1,20 @@ + + + + + PHPMailer Test + + +
            +

            This is a test of PHPMailer.

            +
            + PHPMailer rocks +
            +

            This example uses HTML.

            +

            Chinese text: 郵件內容為空

            +

            Russian text: ПуÑтое тело ÑообщениÑ

            +

            Armenian text: Õ€Õ¡Õ²Õ¸Ö€Õ¤Õ¡Õ£Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨ Õ¤Õ¡Õ¿Õ¡Ö€Õ¯ Õ§

            +

            Czech text: Prázdné tělo zprávy

            +
            + + diff --git a/vendor/phpmailer/phpmailer/examples/exceptions.phps b/vendor/phpmailer/phpmailer/examples/exceptions.phps new file mode 100644 index 0000000000..0e941e7336 --- /dev/null +++ b/vendor/phpmailer/phpmailer/examples/exceptions.phps @@ -0,0 +1,35 @@ +setFrom('from@example.com', 'First Last'); + //Set an alternative reply-to address + $mail->addReplyTo('replyto@example.com', 'First Last'); + //Set who the message is to be sent to + $mail->addAddress('whoto@example.com', 'John Doe'); + //Set the subject line + $mail->Subject = 'PHPMailer Exceptions test'; + //Read an HTML message body from an external file, convert referenced images to embedded, + //and convert the HTML into a basic plain-text alternative body + $mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__)); + //Replace the plain text body with one created manually + $mail->AltBody = 'This is a plain-text message body'; + //Attach an image file + $mail->addAttachment('images/phpmailer_mini.png'); + //send the message + //Note that we don't need check the response from this because it will throw an exception if it has trouble + $mail->send(); + echo "Message sent!"; +} catch (phpmailerException $e) { + echo $e->errorMessage(); //Pretty error messages from PHPMailer +} catch (Exception $e) { + echo $e->getMessage(); //Boring error messages from anything else! +} diff --git a/vendor/phpmailer/phpmailer/examples/gmail.phps b/vendor/phpmailer/phpmailer/examples/gmail.phps new file mode 100644 index 0000000000..b3cc02d53e --- /dev/null +++ b/vendor/phpmailer/phpmailer/examples/gmail.phps @@ -0,0 +1,75 @@ +isSMTP(); + +//Enable SMTP debugging +// 0 = off (for production use) +// 1 = client messages +// 2 = client and server messages +$mail->SMTPDebug = 2; + +//Ask for HTML-friendly debug output +$mail->Debugoutput = 'html'; + +//Set the hostname of the mail server +$mail->Host = 'smtp.gmail.com'; +// use +// $mail->Host = gethostbyname('smtp.gmail.com'); +// if your network does not support SMTP over IPv6 + +//Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission +$mail->Port = 587; + +//Set the encryption system to use - ssl (deprecated) or tls +$mail->SMTPSecure = 'tls'; + +//Whether to use SMTP authentication +$mail->SMTPAuth = true; + +//Username to use for SMTP authentication - use full email address for gmail +$mail->Username = "username@gmail.com"; + +//Password to use for SMTP authentication +$mail->Password = "yourpassword"; + +//Set who the message is to be sent from +$mail->setFrom('from@example.com', 'First Last'); + +//Set an alternative reply-to address +$mail->addReplyTo('replyto@example.com', 'First Last'); + +//Set who the message is to be sent to +$mail->addAddress('whoto@example.com', 'John Doe'); + +//Set the subject line +$mail->Subject = 'PHPMailer GMail SMTP test'; + +//Read an HTML message body from an external file, convert referenced images to embedded, +//convert HTML into a basic plain-text alternative body +$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__)); + +//Replace the plain text body with one created manually +$mail->AltBody = 'This is a plain-text message body'; + +//Attach an image file +$mail->addAttachment('images/phpmailer_mini.png'); + +//send the message, check for errors +if (!$mail->send()) { + echo "Mailer Error: " . $mail->ErrorInfo; +} else { + echo "Message sent!"; +} diff --git a/vendor/phpmailer/phpmailer/examples/gmail_xoauth.phps b/vendor/phpmailer/phpmailer/examples/gmail_xoauth.phps new file mode 100644 index 0000000000..d64483a4d7 --- /dev/null +++ b/vendor/phpmailer/phpmailer/examples/gmail_xoauth.phps @@ -0,0 +1,85 @@ +isSMTP(); + +//Enable SMTP debugging +// 0 = off (for production use) +// 1 = client messages +// 2 = client and server messages +$mail->SMTPDebug = 0; + +//Ask for HTML-friendly debug output +$mail->Debugoutput = 'html'; + +//Set the hostname of the mail server +$mail->Host = 'smtp.gmail.com'; + +//Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission +$mail->Port = 587; + +//Set the encryption system to use - ssl (deprecated) or tls +$mail->SMTPSecure = 'tls'; + +//Whether to use SMTP authentication +$mail->SMTPAuth = true; + +//Set AuthType +$mail->AuthType = 'XOAUTH2'; + +//User Email to use for SMTP authentication - Use the same Email used in Google Developer Console +$mail->oauthUserEmail = "someone@gmail.com"; + +//Obtained From Google Developer Console +$mail->oauthClientId = "RANDOMCHARS-----duv1n2.apps.googleusercontent.com"; + +//Obtained From Google Developer Console +$mail->oauthClientSecret = "RANDOMCHARS-----lGyjPcRtvP"; + +//Obtained By running get_oauth_token.php after setting up APP in Google Developer Console. +//Set Redirect URI in Developer Console as [https/http]:////get_oauth_token.php +// eg: http://localhost/phpmail/get_oauth_token.php +$mail->oauthRefreshToken = "RANDOMCHARS-----DWxgOvPT003r-yFUV49TQYag7_Aod7y0"; + +//Set who the message is to be sent from +//For gmail, this generally needs to be the same as the user you logged in as +$mail->setFrom('from@example.com', 'First Last'); + +//Set who the message is to be sent to +$mail->addAddress('whoto@example.com', 'John Doe'); + +//Set the subject line +$mail->Subject = 'PHPMailer GMail SMTP test'; + +//Read an HTML message body from an external file, convert referenced images to embedded, +//convert HTML into a basic plain-text alternative body +$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__)); + +//Replace the plain text body with one created manually +$mail->AltBody = 'This is a plain-text message body'; + +//Attach an image file +$mail->addAttachment('images/phpmailer_mini.png'); + +//send the message, check for errors +if (!$mail->send()) { + echo "Mailer Error: " . $mail->ErrorInfo; +} else { + echo "Message sent!"; +} diff --git a/vendor/phpmailer/phpmailer/examples/images/phpmailer.png b/vendor/phpmailer/phpmailer/examples/images/phpmailer.png new file mode 100644 index 0000000000..9bdd83c8de Binary files /dev/null and b/vendor/phpmailer/phpmailer/examples/images/phpmailer.png differ diff --git a/vendor/phpmailer/phpmailer/examples/images/phpmailer_mini.png b/vendor/phpmailer/phpmailer/examples/images/phpmailer_mini.png new file mode 100644 index 0000000000..e6915f4317 Binary files /dev/null and b/vendor/phpmailer/phpmailer/examples/images/phpmailer_mini.png differ diff --git a/vendor/phpmailer/phpmailer/examples/index.html b/vendor/phpmailer/phpmailer/examples/index.html new file mode 100644 index 0000000000..bbb830d19b --- /dev/null +++ b/vendor/phpmailer/phpmailer/examples/index.html @@ -0,0 +1,48 @@ + + + + + PHPMailer Examples + + +

            PHPMailer code examplesPHPMailer logo

            +

            This folder contains a collection of examples of using PHPMailer.

            +

            About testing email sending

            +

            When working on email sending code you'll find yourself worrying about what might happen if all these test emails got sent to your mailing list. The solution is to use a fake mail server, one that acts just like the real thing, but just doesn't actually send anything out. Some offer web interfaces, feedback, logging, the ability to return specific error codes, all things that are useful for testing error handling, authentication etc. Here's a selection of mail testing tools you might like to try:

            +
              +
            • FakeSMTP, a Java desktop app with the ability to show an SMTP log and save messages to a folder.
            • +
            • FakeEmail, a Python-based fake mail server with a web interface.
            • +
            • smtp-sink, part of the Postfix mail server, so you probably already have this installed. This is used in the Travis-CI configuration to run PHPMailer's unit tests.
            • +
            • smtp4dev, a dummy SMTP server for Windows.
            • +
            • fakesendmail.sh, part of PHPMailer's test setup, this is a shell script that emulates sendmail for testing 'mail' or 'sendmail' methods in PHPMailer.
            • +
            • msglint, not a mail server, the IETF's MIME structure analyser checks the formatting of your messages.
            • +
            +
            +

            Security note

            +

            Before running these examples you'll need to rename them with '.php' extensions. They are supplied as '.phps' files which will usually be displayed with syntax highlighting by PHP instead of running them. This prevents potential security issues with running potential spam-gateway code if you happen to deploy these code examples on a live site - please don't do that! Similarly, don't leave your passwords in these files as they will be visible to the world!

            +
            +

            code_generator.phps

            +

            This script is a simple code generator - fill in the form and hit submit, and it will use when you entered to email you a message, and will also generate PHP code using your settings that you can copy and paste to use in your own apps. If you need to get going quickly, this is probably the best place to start.

            +

            mail.phps

            +

            This script is a basic example which creates an email message from an external HTML file, creates a plain text body, sets various addresses, adds an attachment and sends the message. It uses PHP's built-in mail() function which is the simplest to use, but relies on the presence of a local mail server, something which is not usually available on Windows. If you find yourself in that situation, either install a local mail server, or use a remote one and send using SMTP instead.

            +

            exceptions.phps

            +

            The same as the mail example, but shows how to use PHPMailer's optional exceptions for error handling.

            +

            smtp.phps

            +

            A simple example sending using SMTP with authentication.

            +

            smtp_no_auth.phps

            +

            A simple example sending using SMTP without authentication.

            +

            sendmail.phps

            +

            A simple example using sendmail. Sendmail is a program (usually found on Linux/BSD, OS X and other UNIX-alikes) that can be used to submit messages to a local mail server without a lengthy SMTP conversation. It's probably the fastest sending mechanism, but lacks some error reporting features. There are sendmail emulators for most popular mail servers including postfix, qmail, exim etc.

            +

            gmail.phps

            +

            Submitting email via Google's Gmail service is a popular use of PHPMailer. It's much the same as normal SMTP sending, just with some specific settings, namely using TLS encryption, authentication is enabled, and it connects to the SMTP submission port 587 on the smtp.gmail.com host. This example does all that.

            +

            pop_before_smtp.phps

            +

            Before effective SMTP authentication mechanisms were available, it was common for ISPs to use POP-before-SMTP authentication. As it implies, you authenticate using the POP3 protocol (an older protocol now mostly replaced by the far superior IMAP), and then the SMTP server will allow send access from your IP address for a short while, usually 5-15 minutes. PHPMailer includes a POP3 protocol client, so it can carry out this sequence - it's just like a normal SMTP conversation (without authentication), but connects via POP first.

            +

            mailing_list.phps

            +

            This is a somewhat naïve example of sending similar emails to a list of different addresses. It sets up a PHPMailer instance using SMTP, then connects to a MySQL database to retrieve a list of recipients. The code loops over this list, sending email to each person using their info and marks them as sent in the database. It makes use of SMTP keepalive which saves reconnecting and re-authenticating between each message.

            +
            +

            smtp_check.phps

            +

            This is an example showing how to use the SMTP class by itself (without PHPMailer) to check an SMTP connection.

            +
            +

            Most of these examples use the 'example.com' domain. This domain is reserved by IANA for illustrative purposes, as documented in RFC 2606. Don't use made-up domains like 'mydomain.com' or 'somedomain.com' in examples as someone, somewhere, probably owns them!

            + + diff --git a/vendor/phpmailer/phpmailer/examples/mail.phps b/vendor/phpmailer/phpmailer/examples/mail.phps new file mode 100644 index 0000000000..8e129f47dd --- /dev/null +++ b/vendor/phpmailer/phpmailer/examples/mail.phps @@ -0,0 +1,31 @@ +setFrom('from@example.com', 'First Last'); +//Set an alternative reply-to address +$mail->addReplyTo('replyto@example.com', 'First Last'); +//Set who the message is to be sent to +$mail->addAddress('whoto@example.com', 'John Doe'); +//Set the subject line +$mail->Subject = 'PHPMailer mail() test'; +//Read an HTML message body from an external file, convert referenced images to embedded, +//convert HTML into a basic plain-text alternative body +$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__)); +//Replace the plain text body with one created manually +$mail->AltBody = 'This is a plain-text message body'; +//Attach an image file +$mail->addAttachment('images/phpmailer_mini.png'); + +//send the message, check for errors +if (!$mail->send()) { + echo "Mailer Error: " . $mail->ErrorInfo; +} else { + echo "Message sent!"; +} diff --git a/vendor/phpmailer/phpmailer/examples/mailing_list.phps b/vendor/phpmailer/phpmailer/examples/mailing_list.phps new file mode 100644 index 0000000000..8644bb5968 --- /dev/null +++ b/vendor/phpmailer/phpmailer/examples/mailing_list.phps @@ -0,0 +1,59 @@ +isSMTP(); +$mail->Host = 'smtp.example.com'; +$mail->SMTPAuth = true; +$mail->SMTPKeepAlive = true; // SMTP connection will not close after each email sent, reduces SMTP overhead +$mail->Port = 25; +$mail->Username = 'yourname@example.com'; +$mail->Password = 'yourpassword'; +$mail->setFrom('list@example.com', 'List manager'); +$mail->addReplyTo('list@example.com', 'List manager'); + +$mail->Subject = "PHPMailer Simple database mailing list test"; + +//Same body for all messages, so set this before the sending loop +//If you generate a different body for each recipient (e.g. you're using a templating system), +//set it inside the loop +$mail->msgHTML($body); +//msgHTML also sets AltBody, but if you want a custom one, set it afterwards +$mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; + +//Connect to the database and select the recipients from your mailing list that have not yet been sent to +//You'll need to alter this to match your database +$mysql = mysqli_connect('localhost', 'username', 'password'); +mysqli_select_db($mysql, 'mydb'); +$result = mysqli_query($mysql, 'SELECT full_name, email, photo FROM mailinglist WHERE sent = false'); + +foreach ($result as $row) { //This iterator syntax only works in PHP 5.4+ + $mail->addAddress($row['email'], $row['full_name']); + if (!empty($row['photo'])) { + $mail->addStringAttachment($row['photo'], 'YourPhoto.jpg'); //Assumes the image data is stored in the DB + } + + if (!$mail->send()) { + echo "Mailer Error (" . str_replace("@", "@", $row["email"]) . ') ' . $mail->ErrorInfo . '
            '; + break; //Abandon sending + } else { + echo "Message sent to :" . $row['full_name'] . ' (' . str_replace("@", "@", $row['email']) . ')
            '; + //Mark it as sent in the DB + mysqli_query( + $mysql, + "UPDATE mailinglist SET sent = true WHERE email = '" . + mysqli_real_escape_string($mysql, $row['email']) . "'" + ); + } + // Clear all addresses and attachments for next loop + $mail->clearAddresses(); + $mail->clearAttachments(); +} diff --git a/vendor/phpmailer/phpmailer/examples/pop_before_smtp.phps b/vendor/phpmailer/phpmailer/examples/pop_before_smtp.phps new file mode 100644 index 0000000000..164dfe8dd8 --- /dev/null +++ b/vendor/phpmailer/phpmailer/examples/pop_before_smtp.phps @@ -0,0 +1,54 @@ +isSMTP(); + //Enable SMTP debugging + // 0 = off (for production use) + // 1 = client messages + // 2 = client and server messages + $mail->SMTPDebug = 2; + //Ask for HTML-friendly debug output + $mail->Debugoutput = 'html'; + //Set the hostname of the mail server + $mail->Host = "mail.example.com"; + //Set the SMTP port number - likely to be 25, 465 or 587 + $mail->Port = 25; + //Whether to use SMTP authentication + $mail->SMTPAuth = false; + //Set who the message is to be sent from + $mail->setFrom('from@example.com', 'First Last'); + //Set an alternative reply-to address + $mail->addReplyTo('replyto@example.com', 'First Last'); + //Set who the message is to be sent to + $mail->addAddress('whoto@example.com', 'John Doe'); + //Set the subject line + $mail->Subject = 'PHPMailer POP-before-SMTP test'; + //Read an HTML message body from an external file, convert referenced images to embedded, + //and convert the HTML into a basic plain-text alternative body + $mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__)); + //Replace the plain text body with one created manually + $mail->AltBody = 'This is a plain-text message body'; + //Attach an image file + $mail->addAttachment('images/phpmailer_mini.png'); + //send the message + //Note that we don't need check the response from this because it will throw an exception if it has trouble + $mail->send(); + echo "Message sent!"; +} catch (phpmailerException $e) { + echo $e->errorMessage(); //Pretty error messages from PHPMailer +} catch (Exception $e) { + echo $e->getMessage(); //Boring error messages from anything else! +} diff --git a/vendor/phpmailer/phpmailer/examples/scripts/XRegExp.js b/vendor/phpmailer/phpmailer/examples/scripts/XRegExp.js new file mode 100644 index 0000000000..ebdb9c9485 --- /dev/null +++ b/vendor/phpmailer/phpmailer/examples/scripts/XRegExp.js @@ -0,0 +1,664 @@ +// XRegExp 1.5.1 +// (c) 2007-2012 Steven Levithan +// MIT License +// +// Provides an augmented, extensible, cross-browser implementation of regular expressions, +// including support for additional syntax, flags, and methods + +var XRegExp; + +if (XRegExp) { + // Avoid running twice, since that would break references to native globals + throw Error("can't load XRegExp twice in the same frame"); +} + +// Run within an anonymous function to protect variables and avoid new globals +(function (undefined) { + + //--------------------------------- + // Constructor + //--------------------------------- + + // Accepts a pattern and flags; returns a new, extended `RegExp` object. Differs from a native + // regular expression in that additional syntax and flags are supported and cross-browser + // syntax inconsistencies are ameliorated. `XRegExp(/regex/)` clones an existing regex and + // converts to type XRegExp + XRegExp = function (pattern, flags) { + var output = [], + currScope = XRegExp.OUTSIDE_CLASS, + pos = 0, + context, tokenResult, match, chr, regex; + + if (XRegExp.isRegExp(pattern)) { + if (flags !== undefined) + throw TypeError("can't supply flags when constructing one RegExp from another"); + return clone(pattern); + } + // Tokens become part of the regex construction process, so protect against infinite + // recursion when an XRegExp is constructed within a token handler or trigger + if (isInsideConstructor) + throw Error("can't call the XRegExp constructor within token definition functions"); + + flags = flags || ""; + context = { // `this` object for custom tokens + hasNamedCapture: false, + captureNames: [], + hasFlag: function (flag) {return flags.indexOf(flag) > -1;}, + setFlag: function (flag) {flags += flag;} + }; + + while (pos < pattern.length) { + // Check for custom tokens at the current position + tokenResult = runTokens(pattern, pos, currScope, context); + + if (tokenResult) { + output.push(tokenResult.output); + pos += (tokenResult.match[0].length || 1); + } else { + // Check for native multicharacter metasequences (excluding character classes) at + // the current position + if (match = nativ.exec.call(nativeTokens[currScope], pattern.slice(pos))) { + output.push(match[0]); + pos += match[0].length; + } else { + chr = pattern.charAt(pos); + if (chr === "[") + currScope = XRegExp.INSIDE_CLASS; + else if (chr === "]") + currScope = XRegExp.OUTSIDE_CLASS; + // Advance position one character + output.push(chr); + pos++; + } + } + } + + regex = RegExp(output.join(""), nativ.replace.call(flags, flagClip, "")); + regex._xregexp = { + source: pattern, + captureNames: context.hasNamedCapture ? context.captureNames : null + }; + return regex; + }; + + + //--------------------------------- + // Public properties + //--------------------------------- + + XRegExp.version = "1.5.1"; + + // Token scope bitflags + XRegExp.INSIDE_CLASS = 1; + XRegExp.OUTSIDE_CLASS = 2; + + + //--------------------------------- + // Private variables + //--------------------------------- + + var replacementToken = /\$(?:(\d\d?|[$&`'])|{([$\w]+)})/g, + flagClip = /[^gimy]+|([\s\S])(?=[\s\S]*\1)/g, // Nonnative and duplicate flags + quantifier = /^(?:[?*+]|{\d+(?:,\d*)?})\??/, + isInsideConstructor = false, + tokens = [], + // Copy native globals for reference ("native" is an ES3 reserved keyword) + nativ = { + exec: RegExp.prototype.exec, + test: RegExp.prototype.test, + match: String.prototype.match, + replace: String.prototype.replace, + split: String.prototype.split + }, + compliantExecNpcg = nativ.exec.call(/()??/, "")[1] === undefined, // check `exec` handling of nonparticipating capturing groups + compliantLastIndexIncrement = function () { + var x = /^/g; + nativ.test.call(x, ""); + return !x.lastIndex; + }(), + hasNativeY = RegExp.prototype.sticky !== undefined, + nativeTokens = {}; + + // `nativeTokens` match native multicharacter metasequences only (including deprecated octals, + // excluding character classes) + nativeTokens[XRegExp.INSIDE_CLASS] = /^(?:\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S]))/; + nativeTokens[XRegExp.OUTSIDE_CLASS] = /^(?:\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|\(\?[:=!]|[?*+]\?|{\d+(?:,\d*)?}\??)/; + + + //--------------------------------- + // Public methods + //--------------------------------- + + // Lets you extend or change XRegExp syntax and create custom flags. This is used internally by + // the XRegExp library and can be used to create XRegExp plugins. This function is intended for + // users with advanced knowledge of JavaScript's regular expression syntax and behavior. It can + // be disabled by `XRegExp.freezeTokens` + XRegExp.addToken = function (regex, handler, scope, trigger) { + tokens.push({ + pattern: clone(regex, "g" + (hasNativeY ? "y" : "")), + handler: handler, + scope: scope || XRegExp.OUTSIDE_CLASS, + trigger: trigger || null + }); + }; + + // Accepts a pattern and flags; returns an extended `RegExp` object. If the pattern and flag + // combination has previously been cached, the cached copy is returned; otherwise the newly + // created regex is cached + XRegExp.cache = function (pattern, flags) { + var key = pattern + "/" + (flags || ""); + return XRegExp.cache[key] || (XRegExp.cache[key] = XRegExp(pattern, flags)); + }; + + // Accepts a `RegExp` instance; returns a copy with the `/g` flag set. The copy has a fresh + // `lastIndex` (set to zero). If you want to copy a regex without forcing the `global` + // property, use `XRegExp(regex)`. Do not use `RegExp(regex)` because it will not preserve + // special properties required for named capture + XRegExp.copyAsGlobal = function (regex) { + return clone(regex, "g"); + }; + + // Accepts a string; returns the string with regex metacharacters escaped. The returned string + // can safely be used at any point within a regex to match the provided literal string. Escaped + // characters are [ ] { } ( ) * + ? - . , \ ^ $ | # and whitespace + XRegExp.escape = function (str) { + return str.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + }; + + // Accepts a string to search, regex to search with, position to start the search within the + // string (default: 0), and an optional Boolean indicating whether matches must start at-or- + // after the position or at the specified position only. This function ignores the `lastIndex` + // of the provided regex in its own handling, but updates the property for compatibility + XRegExp.execAt = function (str, regex, pos, anchored) { + var r2 = clone(regex, "g" + ((anchored && hasNativeY) ? "y" : "")), + match; + r2.lastIndex = pos = pos || 0; + match = r2.exec(str); // Run the altered `exec` (required for `lastIndex` fix, etc.) + if (anchored && match && match.index !== pos) + match = null; + if (regex.global) + regex.lastIndex = match ? r2.lastIndex : 0; + return match; + }; + + // Breaks the unrestorable link to XRegExp's private list of tokens, thereby preventing + // syntax and flag changes. Should be run after XRegExp and any plugins are loaded + XRegExp.freezeTokens = function () { + XRegExp.addToken = function () { + throw Error("can't run addToken after freezeTokens"); + }; + }; + + // Accepts any value; returns a Boolean indicating whether the argument is a `RegExp` object. + // Note that this is also `true` for regex literals and regexes created by the `XRegExp` + // constructor. This works correctly for variables created in another frame, when `instanceof` + // and `constructor` checks would fail to work as intended + XRegExp.isRegExp = function (o) { + return Object.prototype.toString.call(o) === "[object RegExp]"; + }; + + // Executes `callback` once per match within `str`. Provides a simpler and cleaner way to + // iterate over regex matches compared to the traditional approaches of subverting + // `String.prototype.replace` or repeatedly calling `exec` within a `while` loop + XRegExp.iterate = function (str, regex, callback, context) { + var r2 = clone(regex, "g"), + i = -1, match; + while (match = r2.exec(str)) { // Run the altered `exec` (required for `lastIndex` fix, etc.) + if (regex.global) + regex.lastIndex = r2.lastIndex; // Doing this to follow expectations if `lastIndex` is checked within `callback` + callback.call(context, match, ++i, str, regex); + if (r2.lastIndex === match.index) + r2.lastIndex++; + } + if (regex.global) + regex.lastIndex = 0; + }; + + // Accepts a string and an array of regexes; returns the result of using each successive regex + // to search within the matches of the previous regex. The array of regexes can also contain + // objects with `regex` and `backref` properties, in which case the named or numbered back- + // references specified are passed forward to the next regex or returned. E.g.: + // var xregexpImgFileNames = XRegExp.matchChain(html, [ + // {regex: /]+)>/i, backref: 1}, // tag attributes + // {regex: XRegExp('(?ix) \\s src=" (? [^"]+ )'), backref: "src"}, // src attribute values + // {regex: XRegExp("^http://xregexp\\.com(/[^#?]+)", "i"), backref: 1}, // xregexp.com paths + // /[^\/]+$/ // filenames (strip directory paths) + // ]); + XRegExp.matchChain = function (str, chain) { + return function recurseChain (values, level) { + var item = chain[level].regex ? chain[level] : {regex: chain[level]}, + regex = clone(item.regex, "g"), + matches = [], i; + for (i = 0; i < values.length; i++) { + XRegExp.iterate(values[i], regex, function (match) { + matches.push(item.backref ? (match[item.backref] || "") : match[0]); + }); + } + return ((level === chain.length - 1) || !matches.length) ? + matches : recurseChain(matches, level + 1); + }([str], 0); + }; + + + //--------------------------------- + // New RegExp prototype methods + //--------------------------------- + + // Accepts a context object and arguments array; returns the result of calling `exec` with the + // first value in the arguments array. the context is ignored but is accepted for congruity + // with `Function.prototype.apply` + RegExp.prototype.apply = function (context, args) { + return this.exec(args[0]); + }; + + // Accepts a context object and string; returns the result of calling `exec` with the provided + // string. the context is ignored but is accepted for congruity with `Function.prototype.call` + RegExp.prototype.call = function (context, str) { + return this.exec(str); + }; + + + //--------------------------------- + // Overriden native methods + //--------------------------------- + + // Adds named capture support (with backreferences returned as `result.name`), and fixes two + // cross-browser issues per ES3: + // - Captured values for nonparticipating capturing groups should be returned as `undefined`, + // rather than the empty string. + // - `lastIndex` should not be incremented after zero-length matches. + RegExp.prototype.exec = function (str) { + var match, name, r2, origLastIndex; + if (!this.global) + origLastIndex = this.lastIndex; + match = nativ.exec.apply(this, arguments); + if (match) { + // Fix browsers whose `exec` methods don't consistently return `undefined` for + // nonparticipating capturing groups + if (!compliantExecNpcg && match.length > 1 && indexOf(match, "") > -1) { + r2 = RegExp(this.source, nativ.replace.call(getNativeFlags(this), "g", "")); + // Using `str.slice(match.index)` rather than `match[0]` in case lookahead allowed + // matching due to characters outside the match + nativ.replace.call((str + "").slice(match.index), r2, function () { + for (var i = 1; i < arguments.length - 2; i++) { + if (arguments[i] === undefined) + match[i] = undefined; + } + }); + } + // Attach named capture properties + if (this._xregexp && this._xregexp.captureNames) { + for (var i = 1; i < match.length; i++) { + name = this._xregexp.captureNames[i - 1]; + if (name) + match[name] = match[i]; + } + } + // Fix browsers that increment `lastIndex` after zero-length matches + if (!compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index)) + this.lastIndex--; + } + if (!this.global) + this.lastIndex = origLastIndex; // Fix IE, Opera bug (last tested IE 9.0.5, Opera 11.61 on Windows) + return match; + }; + + // Fix browser bugs in native method + RegExp.prototype.test = function (str) { + // Use the native `exec` to skip some processing overhead, even though the altered + // `exec` would take care of the `lastIndex` fixes + var match, origLastIndex; + if (!this.global) + origLastIndex = this.lastIndex; + match = nativ.exec.call(this, str); + // Fix browsers that increment `lastIndex` after zero-length matches + if (match && !compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index)) + this.lastIndex--; + if (!this.global) + this.lastIndex = origLastIndex; // Fix IE, Opera bug (last tested IE 9.0.5, Opera 11.61 on Windows) + return !!match; + }; + + // Adds named capture support and fixes browser bugs in native method + String.prototype.match = function (regex) { + if (!XRegExp.isRegExp(regex)) + regex = RegExp(regex); // Native `RegExp` + if (regex.global) { + var result = nativ.match.apply(this, arguments); + regex.lastIndex = 0; // Fix IE bug + return result; + } + return regex.exec(this); // Run the altered `exec` + }; + + // Adds support for `${n}` tokens for named and numbered backreferences in replacement text, + // and provides named backreferences to replacement functions as `arguments[0].name`. Also + // fixes cross-browser differences in replacement text syntax when performing a replacement + // using a nonregex search value, and the value of replacement regexes' `lastIndex` property + // during replacement iterations. Note that this doesn't support SpiderMonkey's proprietary + // third (`flags`) parameter + String.prototype.replace = function (search, replacement) { + var isRegex = XRegExp.isRegExp(search), + captureNames, result, str, origLastIndex; + + // There are too many combinations of search/replacement types/values and browser bugs that + // preclude passing to native `replace`, so don't try + //if (...) + // return nativ.replace.apply(this, arguments); + + if (isRegex) { + if (search._xregexp) + captureNames = search._xregexp.captureNames; // Array or `null` + if (!search.global) + origLastIndex = search.lastIndex; + } else { + search = search + ""; // Type conversion + } + + if (Object.prototype.toString.call(replacement) === "[object Function]") { + result = nativ.replace.call(this + "", search, function () { + if (captureNames) { + // Change the `arguments[0]` string primitive to a String object which can store properties + arguments[0] = new String(arguments[0]); + // Store named backreferences on `arguments[0]` + for (var i = 0; i < captureNames.length; i++) { + if (captureNames[i]) + arguments[0][captureNames[i]] = arguments[i + 1]; + } + } + // Update `lastIndex` before calling `replacement` (fix browsers) + if (isRegex && search.global) + search.lastIndex = arguments[arguments.length - 2] + arguments[0].length; + return replacement.apply(null, arguments); + }); + } else { + str = this + ""; // Type conversion, so `args[args.length - 1]` will be a string (given nonstring `this`) + result = nativ.replace.call(str, search, function () { + var args = arguments; // Keep this function's `arguments` available through closure + return nativ.replace.call(replacement + "", replacementToken, function ($0, $1, $2) { + // Numbered backreference (without delimiters) or special variable + if ($1) { + switch ($1) { + case "$": return "$"; + case "&": return args[0]; + case "`": return args[args.length - 1].slice(0, args[args.length - 2]); + case "'": return args[args.length - 1].slice(args[args.length - 2] + args[0].length); + // Numbered backreference + default: + // What does "$10" mean? + // - Backreference 10, if 10 or more capturing groups exist + // - Backreference 1 followed by "0", if 1-9 capturing groups exist + // - Otherwise, it's the string "$10" + // Also note: + // - Backreferences cannot be more than two digits (enforced by `replacementToken`) + // - "$01" is equivalent to "$1" if a capturing group exists, otherwise it's the string "$01" + // - There is no "$0" token ("$&" is the entire match) + var literalNumbers = ""; + $1 = +$1; // Type conversion; drop leading zero + if (!$1) // `$1` was "0" or "00" + return $0; + while ($1 > args.length - 3) { + literalNumbers = String.prototype.slice.call($1, -1) + literalNumbers; + $1 = Math.floor($1 / 10); // Drop the last digit + } + return ($1 ? args[$1] || "" : "$") + literalNumbers; + } + // Named backreference or delimited numbered backreference + } else { + // What does "${n}" mean? + // - Backreference to numbered capture n. Two differences from "$n": + // - n can be more than two digits + // - Backreference 0 is allowed, and is the entire match + // - Backreference to named capture n, if it exists and is not a number overridden by numbered capture + // - Otherwise, it's the string "${n}" + var n = +$2; // Type conversion; drop leading zeros + if (n <= args.length - 3) + return args[n]; + n = captureNames ? indexOf(captureNames, $2) : -1; + return n > -1 ? args[n + 1] : $0; + } + }); + }); + } + + if (isRegex) { + if (search.global) + search.lastIndex = 0; // Fix IE, Safari bug (last tested IE 9.0.5, Safari 5.1.2 on Windows) + else + search.lastIndex = origLastIndex; // Fix IE, Opera bug (last tested IE 9.0.5, Opera 11.61 on Windows) + } + + return result; + }; + + // A consistent cross-browser, ES3 compliant `split` + String.prototype.split = function (s /* separator */, limit) { + // If separator `s` is not a regex, use the native `split` + if (!XRegExp.isRegExp(s)) + return nativ.split.apply(this, arguments); + + var str = this + "", // Type conversion + output = [], + lastLastIndex = 0, + match, lastLength; + + // Behavior for `limit`: if it's... + // - `undefined`: No limit + // - `NaN` or zero: Return an empty array + // - A positive number: Use `Math.floor(limit)` + // - A negative number: No limit + // - Other: Type-convert, then use the above rules + if (limit === undefined || +limit < 0) { + limit = Infinity; + } else { + limit = Math.floor(+limit); + if (!limit) + return []; + } + + // This is required if not `s.global`, and it avoids needing to set `s.lastIndex` to zero + // and restore it to its original value when we're done using the regex + s = XRegExp.copyAsGlobal(s); + + while (match = s.exec(str)) { // Run the altered `exec` (required for `lastIndex` fix, etc.) + if (s.lastIndex > lastLastIndex) { + output.push(str.slice(lastLastIndex, match.index)); + + if (match.length > 1 && match.index < str.length) + Array.prototype.push.apply(output, match.slice(1)); + + lastLength = match[0].length; + lastLastIndex = s.lastIndex; + + if (output.length >= limit) + break; + } + + if (s.lastIndex === match.index) + s.lastIndex++; + } + + if (lastLastIndex === str.length) { + if (!nativ.test.call(s, "") || lastLength) + output.push(""); + } else { + output.push(str.slice(lastLastIndex)); + } + + return output.length > limit ? output.slice(0, limit) : output; + }; + + + //--------------------------------- + // Private helper functions + //--------------------------------- + + // Supporting function for `XRegExp`, `XRegExp.copyAsGlobal`, etc. Returns a copy of a `RegExp` + // instance with a fresh `lastIndex` (set to zero), preserving properties required for named + // capture. Also allows adding new flags in the process of copying the regex + function clone (regex, additionalFlags) { + if (!XRegExp.isRegExp(regex)) + throw TypeError("type RegExp expected"); + var x = regex._xregexp; + regex = XRegExp(regex.source, getNativeFlags(regex) + (additionalFlags || "")); + if (x) { + regex._xregexp = { + source: x.source, + captureNames: x.captureNames ? x.captureNames.slice(0) : null + }; + } + return regex; + } + + function getNativeFlags (regex) { + return (regex.global ? "g" : "") + + (regex.ignoreCase ? "i" : "") + + (regex.multiline ? "m" : "") + + (regex.extended ? "x" : "") + // Proposed for ES4; included in AS3 + (regex.sticky ? "y" : ""); + } + + function runTokens (pattern, index, scope, context) { + var i = tokens.length, + result, match, t; + // Protect against constructing XRegExps within token handler and trigger functions + isInsideConstructor = true; + // Must reset `isInsideConstructor`, even if a `trigger` or `handler` throws + try { + while (i--) { // Run in reverse order + t = tokens[i]; + if ((scope & t.scope) && (!t.trigger || t.trigger.call(context))) { + t.pattern.lastIndex = index; + match = t.pattern.exec(pattern); // Running the altered `exec` here allows use of named backreferences, etc. + if (match && match.index === index) { + result = { + output: t.handler.call(context, match, scope), + match: match + }; + break; + } + } + } + } catch (err) { + throw err; + } finally { + isInsideConstructor = false; + } + return result; + } + + function indexOf (array, item, from) { + if (Array.prototype.indexOf) // Use the native array method if available + return array.indexOf(item, from); + for (var i = from || 0; i < array.length; i++) { + if (array[i] === item) + return i; + } + return -1; + } + + + //--------------------------------- + // Built-in tokens + //--------------------------------- + + // Augment XRegExp's regular expression syntax and flags. Note that when adding tokens, the + // third (`scope`) argument defaults to `XRegExp.OUTSIDE_CLASS` + + // Comment pattern: (?# ) + XRegExp.addToken( + /\(\?#[^)]*\)/, + function (match) { + // Keep tokens separated unless the following token is a quantifier + return nativ.test.call(quantifier, match.input.slice(match.index + match[0].length)) ? "" : "(?:)"; + } + ); + + // Capturing group (match the opening parenthesis only). + // Required for support of named capturing groups + XRegExp.addToken( + /\((?!\?)/, + function () { + this.captureNames.push(null); + return "("; + } + ); + + // Named capturing group (match the opening delimiter only): (? + XRegExp.addToken( + /\(\?<([$\w]+)>/, + function (match) { + this.captureNames.push(match[1]); + this.hasNamedCapture = true; + return "("; + } + ); + + // Named backreference: \k + XRegExp.addToken( + /\\k<([\w$]+)>/, + function (match) { + var index = indexOf(this.captureNames, match[1]); + // Keep backreferences separate from subsequent literal numbers. Preserve back- + // references to named groups that are undefined at this point as literal strings + return index > -1 ? + "\\" + (index + 1) + (isNaN(match.input.charAt(match.index + match[0].length)) ? "" : "(?:)") : + match[0]; + } + ); + + // Empty character class: [] or [^] + XRegExp.addToken( + /\[\^?]/, + function (match) { + // For cross-browser compatibility with ES3, convert [] to \b\B and [^] to [\s\S]. + // (?!) should work like \b\B, but is unreliable in Firefox + return match[0] === "[]" ? "\\b\\B" : "[\\s\\S]"; + } + ); + + // Mode modifier at the start of the pattern only, with any combination of flags imsx: (?imsx) + // Does not support x(?i), (?-i), (?i-m), (?i: ), (?i)(?m), etc. + XRegExp.addToken( + /^\(\?([imsx]+)\)/, + function (match) { + this.setFlag(match[1]); + return ""; + } + ); + + // Whitespace and comments, in free-spacing (aka extended) mode only + XRegExp.addToken( + /(?:\s+|#.*)+/, + function (match) { + // Keep tokens separated unless the following token is a quantifier + return nativ.test.call(quantifier, match.input.slice(match.index + match[0].length)) ? "" : "(?:)"; + }, + XRegExp.OUTSIDE_CLASS, + function () {return this.hasFlag("x");} + ); + + // Dot, in dotall (aka singleline) mode only + XRegExp.addToken( + /\./, + function () {return "[\\s\\S]";}, + XRegExp.OUTSIDE_CLASS, + function () {return this.hasFlag("s");} + ); + + + //--------------------------------- + // Backward compatibility + //--------------------------------- + + // Uncomment the following block for compatibility with XRegExp 1.0-1.2: + /* + XRegExp.matchWithinChain = XRegExp.matchChain; + RegExp.prototype.addFlags = function (s) {return clone(this, s);}; + RegExp.prototype.execAll = function (s) {var r = []; XRegExp.iterate(s, this, function (m) {r.push(m);}); return r;}; + RegExp.prototype.forEachExec = function (s, f, c) {return XRegExp.iterate(s, this, f, c);}; + RegExp.prototype.validate = function (s) {var r = RegExp("^(?:" + this.source + ")$(?!\\s)", getNativeFlags(this)); if (this.global) this.lastIndex = 0; return s.search(r) === 0;}; + */ + +})(); + diff --git a/vendor/phpmailer/phpmailer/examples/scripts/shAutoloader.js b/vendor/phpmailer/phpmailer/examples/scripts/shAutoloader.js new file mode 100644 index 0000000000..9f5942ee27 --- /dev/null +++ b/vendor/phpmailer/phpmailer/examples/scripts/shAutoloader.js @@ -0,0 +1,122 @@ +(function() { + +var sh = SyntaxHighlighter; + +/** + * Provides functionality to dynamically load only the brushes that a needed to render the current page. + * + * There are two syntaxes that autoload understands. For example: + * + * SyntaxHighlighter.autoloader( + * [ 'applescript', 'Scripts/shBrushAppleScript.js' ], + * [ 'actionscript3', 'as3', 'Scripts/shBrushAS3.js' ] + * ); + * + * or a more easily comprehendable one: + * + * SyntaxHighlighter.autoloader( + * 'applescript Scripts/shBrushAppleScript.js', + * 'actionscript3 as3 Scripts/shBrushAS3.js' + * ); + */ +sh.autoloader = function() +{ + var list = arguments, + elements = sh.findElements(), + brushes = {}, + scripts = {}, + all = SyntaxHighlighter.all, + allCalled = false, + allParams = null, + i + ; + + SyntaxHighlighter.all = function(params) + { + allParams = params; + allCalled = true; + }; + + function addBrush(aliases, url) + { + for (var i = 0; i < aliases.length; i++) + brushes[aliases[i]] = url; + }; + + function getAliases(item) + { + return item.pop + ? item + : item.split(/\s+/) + ; + } + + // create table of aliases and script urls + for (i = 0; i < list.length; i++) + { + var aliases = getAliases(list[i]), + url = aliases.pop() + ; + + addBrush(aliases, url); + } + + // dynamically add